"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6960],{4966:(e,r,n)=>{let i;function f(e,r){return new Promise(function(n,i){let f;return a(e).then(function(e){try{return f=e,n(new Blob([r.slice(0,2),f,r.slice(2)],{type:"image/jpeg"}))}catch(e){return i(e)}},i)})}n.d(r,{A:()=>k});let a=e=>new Promise((r,n)=>{let i=new FileReader;i.addEventListener("load",({target:{result:e}})=>{let i=new DataView(e),f=0;if(65496!==i.getUint16(f))return n("not a valid JPEG");for(f+=2;;){let a=i.getUint16(f);if(65498===a)break;let o=i.getUint16(f+2);if(65505===a&&0x45786966===i.getUint32(f+4)){let a,l=f+10;switch(i.getUint16(l)){case 18761:a=!0;break;case 19789:a=!1;break;default:return n("TIFF header contains invalid endian")}if(42!==i.getUint16(l+2,a))return n("TIFF header contains invalid version");let s=i.getUint32(l+4,a),u=l+s+2+12*i.getUint16(l+s,a);for(let e=l+s+2;e>>24&255,f[n+1]=a>>>16&255,f[n+2]=a>>>8&255,f[n+3]=a>>>0&255,new Uint8Array(f.buffer,0,n+4)},i.deflateRaw=function(e,r){null==r&&(r={level:6});var n=new Uint8Array(50+Math.floor(1.1*e.length)),f=i.F.deflateRaw(e,n,f,r.level);return new Uint8Array(n.buffer,0,f)},i.encode=function(e,r){null==r&&(r=!1);var n=0,f=i.bin.writeUint,a=i.bin.writeUshort,o={};for(var l in e){var s=!i._noNeed(l)&&!r,u=e[l],c=i.crc.crc(u,0,u.length);o[l]={cpr:s,usize:u.length,crc:c,file:s?i.deflateRaw(u):u}}for(var l in o)n+=o[l].file.length+30+46+2*i.bin.sizeUTF8(l);var h=new Uint8Array(n+=22),d=0,g=[];for(var l in o){var A=o[l];g.push(d),d=i._writeHeader(h,d,l,A,0)}var w=0,p=d;for(var l in o)A=o[l],g.push(d),d=i._writeHeader(h,d,l,A,1,g[w++]);var v=d-p;return f(h,d,0x6054b50),d+=4,a(h,d+=4,w),a(h,d+=2,w),f(h,d+=2,v),f(h,d+=4,p),d+=4,d+=2,h.buffer},i._noNeed=function(e){var r=e.split(".").pop().toLowerCase();return -1!="png,jpg,jpeg,zip".indexOf(r)},i._writeHeader=function(e,r,n,f,a,o){var l=i.bin.writeUint,s=i.bin.writeUshort,u=f.file;return l(e,r,0==a?0x4034b50:0x2014b50),r+=4,1==a&&(r+=2),s(e,r,20),s(e,r+=2,0),s(e,r+=2,8*!!f.cpr),l(e,r+=2,0),l(e,r+=4,f.crc),l(e,r+=4,u.length),l(e,r+=4,f.usize),s(e,r+=4,i.bin.sizeUTF8(n)),s(e,r+=2,0),r+=2,1==a&&(r+=2,r+=2,l(e,r+=6,o),r+=4),r+=i.bin.writeUTF8(e,r,n),0==a&&(e.set(u,r),r+=u.length),r},i.crc={table:function(){for(var e=new Uint32Array(256),r=0;r<256;r++){for(var n=r,i=0;i<8;i++)1&n?n=0xedb88320^n>>>1:n>>>=1;e[r]=n}return e}(),update:function(e,r,n,f){for(var a=0;a>>8;return e},crc:function(e,r,n){return 0xffffffff^i.crc.update(0xffffffff,e,r,n)}},i.adler=function(e,r,n){for(var i=1,f=0,a=r,o=r+n;a>8&255},readUint:function(e,r){return 0x1000000*e[r+3]+(e[r+2]<<16|e[r+1]<<8|e[r])},writeUint:function(e,r,n){e[r]=255&n,e[r+1]=n>>8&255,e[r+2]=n>>16&255,e[r+3]=n>>24&255},readASCII:function(e,r,n){for(var i="",f=0;f>6,e[r+f+1]=128|(0|o)&63,f+=2;else if(0==(0xffff0000&o))e[r+f]=224|o>>12,e[r+f+1]=128|o>>6&63,e[r+f+2]=128|(0|o)&63,f+=3;else{if(0!=(0xffe00000&o))throw"e";e[r+f]=240|o>>18,e[r+f+1]=128|o>>12&63,e[r+f+2]=128|o>>6&63,e[r+f+3]=128|(0|o)&63,f+=4}}return f},sizeUTF8:function(e){for(var r=e.length,n=0,i=0;i>>3}var g=o.lits,A=o.strt,w=o.prev,p=0,v=0,b=0,m=0,y=0,U=0;for(d>2&&(A[U=i.F._hash(e,0)]=0),u=0;u14e3||v>26697)&&d-u>100&&(h>>16,_=65535&E;if(0!=E){_=65535&E;var C=l(x=E>>>16,o.of0);o.lhst[257+C]++;var B=l(_,o.df0);o.dhst[B]++,m+=o.exb[C]+o.dxb[B],g[p]=x<<23|u-h,g[p+1]=_<<16|C<<8|B,p+=2,h=u+x}else o.lhst[e[u]]++;v++}}for(b==u&&0!=e.length||(h>>3},i.F._bestMatch=function(e,r,n,f,a,o){var l=32767&r,s=n[l],u=l-s+32768&32767;if(s==l||f!=i.F._hash(e,r-u))return 0;for(var c=0,h=0,d=Math.min(32767,r);u<=d&&0!=--o&&s!=l;){if(0==c||e[r+c]==e[r+c-u]){var g=i.F._howLong(e,r,u);if(g>c){if(h=u,(c=g)>=a)break;u+2A&&(A=v,s=p)}}}u+=(l=s)-(s=n[l])+32768&32767}return c<<16|h},i.F._howLong=function(e,r,n){if(e[r]!=e[r-n]||e[r+1]!=e[r+1-n]||e[r+2]!=e[r+2-n])return 0;var i=r,f=Math.min(e.length,r+258);for(r+=3;r>>23,k=R+(8388607&T);R>16,L=O>>8&255,D=255&O;E(s,u=i.F._writeLit(257+L,c,s,u),Q-U.of0[L]),u+=U.exb[L],F(s,u=i.F._writeLit(D,h,s,u),P-U.df0[D]),u+=U.dxb[D],R+=Q}}u=i.F._writeLit(256,c,s,u)}return u},i.F._copyExact=function(e,r,n,i,f){var a=f>>>3;return i[a]=n,i[a+1]=n>>>8,i[a+2]=255-i[a],i[a+3]=255-i[a+1],a+=4,i.set(new Uint8Array(e.buffer,r,n),a),f+(n+4<<3)},i.F.getTrees=function(){for(var e=i.F.U,r=i.F._hufTree(e.lhst,e.ltree,15),n=i.F._hufTree(e.dhst,e.dtree,15),f=[],a=i.F._lenCodes(e.ltree,f),o=[],l=i.F._lenCodes(e.dtree,o),s=0;s4&&0==e.itree[1+(e.ordr[c-1]<<1)];)c--;return[r,n,u,a,l,c,f,o]},i.F.getSecond=function(e){for(var r=[],n=0;n>1)+",");return r},i.F.contSize=function(e,r){for(var n=0,i=0;i15&&(i.F._putsE(n,f,l,s),f+=s)}return f},i.F._lenCodes=function(e,r){for(var n=e.length;2!=n&&0==e[n-1];)n-=2;for(var i=0;i>>1,138))<11?r.push(17,u-3):r.push(18,u-11),i+=2*u-2}else if(f==l&&a==f&&o==f){for(s=i+5;s+2>>1,6);r.push(16,u-3),i+=2*u-2}else r.push(f,0)}return n>>>1},i.F._hufTree=function(e,r,n){var f=[],a=e.length,o=r.length,l=0;for(l=0;ln&&(i.F.restrictDepth(u,n,p),p=n),l=0;lr;i++){var o=e[i].d;e[i].d=r,a+=f-(1<>>=n-r;a>0;)(o=e[i].d)=0;i--)e[i].d==r&&a<0&&(e[i].d--,a++);0!=a&&console.log("debt left")},i.F._goodIndex=function(e,r){var n=0;return r[16]<=e&&(n|=16),r[8|n]<=e&&(n|=8),r[4|n]<=e&&(n|=4),r[2|n]<=e&&(n|=2),r[1|n]<=e&&(n|=1),n},i.F._writeLit=function(e,r,n,f){return i.F._putsF(n,f,r[e<<1]),f+r[1+(e<<1)]},i.F.inflate=function(e,r){var n=Uint8Array;if(3==e[0]&&0==e[1])return r||new n(0);var f=i.F,a=f._bitsF,o=f._bitsE,l=f._decodeTiny,s=f.makeCodes,u=f.codes2map,c=f._get17,h=f.U,d=null==r;d&&(r=new n(e.length>>>2<<3));for(var g,A,w=0,p=0,v=0,b=0,m=0,y=0,U=0,F=0,E=0;0==w;)if(w=a(e,E,1),p=a(e,E+1,2),E+=3,0!=p){if(d&&(r=i.F._check(r,F+131072)),1==p&&(g=h.flmap,A=h.fdmap,y=511,U=31),2==p){v=o(e,E,5)+257,b=o(e,E+5,5)+1,m=o(e,E+10,4)+4,E+=14;for(var x=0;x<38;x+=2)h.itree[x]=0,h.itree[x+1]=0;var _=1;for(x=0;x_&&(_=C)}E+=3*m,s(h.itree,_),u(h.itree,_,h.imap),g=h.lmap,A=h.dmap,E=l(h.imap,(1<<_)-1,v+b,e,E,h.ttree);var B=f._copyOut(h.ttree,0,v,h.ltree);y=(1<>>4;if(R>>>8==0)r[F++]=R;else{if(256==R)break;var S=F+R-254;if(R>264){var T=h.ldef[R-257];S=F+(T>>>3)+o(e,E,7&T),E+=7&T}var Q=A[c(e,E)&U];E+=15&Q;var k=Q>>>4,O=h.ddef[k],P=(O>>>4)+a(e,E,15&O);for(E+=15&O,d&&(r=i.F._check(r,F+131072));F>>3),D=e[L-4]|e[L-3]<<8;d&&(r=i.F._check(r,F+D)),r.set(new n(e.buffer,e.byteOffset+L,D),F),E=L+D<<3,F+=D}return r.length==F?r:r.slice(0,F)},i.F._check=function(e,r){var n=e.length;if(r<=n)return e;var i=new Uint8Array(Math.max(n<<1,r));return i.set(e,0),i},i.F._decodeTiny=function(e,r,n,f,a,o){for(var l=i.F._bitsE,s=i.F._get17,u=0;u>>4;if(h<=15)o[u]=h,u++;else{var d=0,g=0;16==h?(g=3+l(f,a,2),a+=2,d=o[u-1]):17==h?(g=3+l(f,a,3),a+=3):18==h&&(g=11+l(f,a,7),a+=7);for(var A=u+g;u>>1;af&&(f=l),a++}for(;a>1,s=e[o+1],u=l<<4|s,c=r-s,h=e[o]<>>15-r]=u,h++},i.F.revCodes=function(e,r){for(var n=i.F.U.rev15,f=15-r,a=0;a>>f}},i.F._putsE=function(e,r,n){n<<=7&r;var i=r>>>3;e[i]|=n,e[i+1]|=n>>>8},i.F._putsF=function(e,r,n){n<<=7&r;var i=r>>>3;e[i]|=n,e[i+1]|=n>>>8,e[i+2]|=n>>>16},i.F._bitsE=function(e,r,n){return(e[r>>>3]|e[1+(r>>>3)]<<8)>>>(7&r)&(1<>>3]|e[1+(r>>>3)]<<8|e[2+(r>>>3)]<<16)>>>(7&r)&(1<>>3]|e[1+(r>>>3)]<<8|e[2+(r>>>3)]<<16)>>>(7&r)},i.F._get25=function(e,r){return(e[r>>>3]|e[1+(r>>>3)]<<8|e[2+(r>>>3)]<<16|e[3+(r>>>3)]<<24)>>>(7&r)},i.F.U=(r=Uint16Array,n=Uint32Array,{next_code:new r(16),bl_count:new r(16),ordr:[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],of0:[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,999,999,999],exb:[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0],ldef:new r(32),df0:[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,65535,65535],dxb:[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0],ddef:new n(32),flmap:new r(512),fltree:[],fdmap:new r(32),fdtree:[],lmap:new r(32768),ltree:[],ttree:[],dmap:new r(32768),dtree:[],imap:new r(512),itree:[],rev15:new r(32768),lhst:new n(286),dhst:new n(30),ihst:new n(19),lits:new n(15e3),strt:new r(65536),prev:new r(32768)}),function(){for(var e=i.F.U,r=0;r<32768;r++){var n=r;n=(0xff00ff00&(n=(0xf0f0f0f0&(n=(0xcccccccc&(n=(0xaaaaaaaa&n)>>>1|(0x55555555&n)<<1))>>>2|(0x33333333&n)<<2))>>>4|(0xf0f0f0f&n)<<4))>>>8|(0xff00ff&n)<<8,e.rev15[r]=(n>>>16|n<<16)>>>17}function f(e,r,n){for(;0!=r--;)e.push(0,n)}for(r=0;r<32;r++)e.ldef[r]=e.of0[r]<<3|e.exb[r],e.ddef[r]=e.df0[r]<<4|e.dxb[r];f(e.fltree,144,8),f(e.fltree,112,9),f(e.fltree,24,7),f(e.fltree,8,8),i.F.makeCodes(e.fltree,9),i.F.codes2map(e.fltree,9,e.flmap),i.F.revCodes(e.fltree,9),f(e.fdtree,32,5),i.F.makeCodes(e.fdtree,5),i.F.codes2map(e.fdtree,5,e.fdmap),i.F.revCodes(e.fdtree,5),f(e.itree,19,0),f(e.ltree,286,0),f(e.dtree,30,0),f(e.ttree,320,0)}()}();var s=function(e,r){return r.forEach(function(r){r&&"string"!=typeof r&&!Array.isArray(r)&&Object.keys(r).forEach(function(n){if("default"!==n&&!(n in e)){var i=Object.getOwnPropertyDescriptor(r,n);Object.defineProperty(e,n,i.get?i:{enumerable:!0,get:function(){return r[n]}})}})}),Object.freeze(e)}({__proto__:null,default:o},[o]);let u=function(){var e={nextZero(e,r){for(;0!=e[r];)r++;return r},readUshort:(e,r)=>e[r]<<8|e[r+1],writeUshort(e,r,n){e[r]=n>>8&255,e[r+1]=255&n},readUint:(e,r)=>0x1000000*e[r]+(e[r+1]<<16|e[r+2]<<8|e[r+3]),writeUint(e,r,n){e[r]=n>>24&255,e[r+1]=n>>16&255,e[r+2]=n>>8&255,e[r+3]=255&n},readASCII(e,r,n){let i="";for(let f=0;fe.length<2?`0${e}`:e,readUTF8(r,n,i){let f,a="";for(let f=0;f>3)]>>7-(7&g)&1);s[p]=e[U],s[p+1]=e[U+1],s[p+2]=e[U+2],s[p+3]=v>2)]>>6-((3&g)<<1)&3),s[p]=e[U],s[p+1]=e[U+1],s[p+2]=e[U+2],s[p+3]=v>1)]>>4-((1&g)<<2)&15),s[p]=e[U],s[p+1]=e[U+1],s[p+2]=e[U+2],s[p+3]=v>>3)]>>>7-(7&x)&1))!=255*w);u[i+x]=_<<24|E<<16|E<<8|E}else if(2==h)for(x=0;x>>2)]>>>6-((3&x)<<1)&3))!=85*w),u[i+x]=_<<24|E<<16|E<<8|E;else if(4==h)for(x=0;x>>1)]>>>4-((1&x)<<2)&15))!=17*w),u[i+x]=_<<24|E<<16|E<<8|E;else if(8==h)for(x=0;x>3,s=Math.ceil(n*f/8),u=new Uint8Array(i*s),c=0,h=[0,0,4,0,2,0,1],d=[0,4,0,2,0,1,0],g=[8,8,8,4,4,2,2],A=[8,8,4,4,2,2,1],w=0;for(;w<7;){let a=g[w],v=A[w],b=0,m=0,y=h[w];for(;y>3])>>7-(7&i)&1,u[x*s+(r>>3)]|=p<<7-(7&r)),2==f&&(p=(p=e[i>>3])>>6-(7&i)&3,u[x*s+(r>>2)]|=p<<6-((3&r)<<1)),4==f&&(p=(p=e[i>>3])>>4-(7&i)&15,u[x*s+(r>>1)]|=p<<4-((1&r)<<2)),f>=8){let n=x*s+r*l;for(let r=0;r>3)+r]}i+=f,r+=v}E++,x+=a}b*m!=0&&(c+=m*(1+F)),w+=1}return u}(r,e)),r}function i(e,r){return f(new Uint8Array(e.buffer,2,e.length-6),r)}var f=function(){let e={};return e.N=function(r,n){let i=Uint8Array,f,a,o=0,l=0,s=0,u=0,c=0,h=0,d=0,g=0,A=0;if(3==r[0]&&0==r[1])return n||new i(0);let w=e.b,p=e.e,v=e.R,b=e.n,m=e.A,y=e.Z,U=e.m,F=null==n;for(F&&(n=new i(r.length>>>2<<5));0==o;)if(o=w(r,A,1),l=w(r,A+1,2),A+=3,0!=l){if(F&&(n=e.W(n,g+131072)),1==l&&(f=U.J,a=U.h,h=511,d=31),2==l){s=p(r,A,5)+257,u=p(r,A+5,5)+1,c=p(r,A+10,4)+4,A+=14;let n=1;for(var E=0;E<38;E+=2)U.Q[E]=0,U.Q[E+1]=0;for(E=0;En&&(n=e)}A+=3*c,b(U.Q,n),m(U.Q,n,U.u),f=U.w,a=U.d,A=v(U.u,(1<>>4;if(i>>>8==0)n[g++]=i;else{if(256==i)break;{let e=g+i-254;if(i>264){let n=U.q[i-257];e=g+(n>>>3)+p(r,A,7&n),A+=7&n}let f=a[y(r,A)&d];A+=15&f;let o=f>>>4,l=U.c[o],s=(l>>>4)+w(r,A,15&l);for(A+=15&l;g>>3),a=r[f-4]|r[f-3]<<8;F&&(n=e.W(n,g+a)),n.set(new i(r.buffer,r.byteOffset+f,a),g),A=f+a<<3,g+=a}return n.length==g?n:n.slice(0,g)},e.W=function(e,r){let n=e.length;if(r<=n)return e;let i=new Uint8Array(n<<1);return i.set(e,0),i},e.R=function(r,n,i,f,a,o){let l=e.e,s=e.Z,u=0;for(;u>>4;if(i<=15)o[u]=i,u++;else{let e=0,r=0;16==i?(r=3+l(f,a,2),a+=2,e=o[u-1]):17==i?(r=3+l(f,a,3),a+=3):18==i&&(r=11+l(f,a,7),a+=7);let n=u+r;for(;u>>1;for(;af&&(f=n),a++}for(;a>1,o=r[e+1],l=f<<4|o,s=n-o,u=r[e]<>>15-n]=l,u++}},e.l=function(r,n){let i=e.m.r,f=15-n;for(let e=0;e>>f}},e.M=function(e,r,n){n<<=7&r;let i=r>>>3;e[i]|=n,e[i+1]|=n>>>8},e.I=function(e,r,n){n<<=7&r;let i=r>>>3;e[i]|=n,e[i+1]|=n>>>8,e[i+2]|=n>>>16},e.e=function(e,r,n){return(e[r>>>3]|e[1+(r>>>3)]<<8)>>>(7&r)&(1<>>3]|e[1+(r>>>3)]<<8|e[2+(r>>>3)]<<16)>>>(7&r)&(1<>>3]|e[1+(r>>>3)]<<8|e[2+(r>>>3)]<<16)>>>(7&r)},e.i=function(e,r){return(e[r>>>3]|e[1+(r>>>3)]<<8|e[2+(r>>>3)]<<16|e[3+(r>>>3)]<<24)>>>(7&r)},e.m=function(){let e=Uint16Array,r=Uint32Array;return{K:new e(16),j:new e(16),X:[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],S:[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,999,999,999],T:[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0],q:new e(32),p:[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,65535,65535],z:[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0],c:new r(32),J:new e(512),_:[],h:new e(32),$:[],w:new e(32768),C:[],v:[],d:new e(32768),D:[],u:new e(512),Q:[],r:new e(32768),s:new r(286),Y:new r(30),a:new r(19),t:new r(15e3),k:new e(65536),g:new e(32768)}}(),function(){let r=e.m;for(var n=0;n<32768;n++){let e=n;e=(0xff00ff00&(e=(0xf0f0f0f0&(e=(0xcccccccc&(e=(0xaaaaaaaa&e)>>>1|(0x55555555&e)<<1))>>>2|(0x33333333&e)<<2))>>>4|(0xf0f0f0f&e)<<4))>>>8|(0xff00ff&e)<<8,r.r[n]=(e>>>16|e<<16)>>>17}function i(e,r,n){for(;0!=r--;)e.push(0,n)}for(n=0;n<32;n++)r.q[n]=r.S[n]<<3|r.T[n],r.c[n]=r.p[n]<<4|r.z[n];i(r._,144,8),i(r._,112,9),i(r._,24,7),i(r._,8,8),e.n(r._,9),e.A(r._,9,r.J),e.l(r._,9),i(r.$,32,5),e.n(r.$,5),e.A(r.$,5,r.h),e.l(r.$,5),i(r.Q,19,0),i(r.C,286,0),i(r.D,30,0),i(r.v,320,0)}(),e.N}();function a(e){return[1,null,3,1,2,null,4][e.ctype]*e.depth}function o(e,r,n,i,f){let o,s,u=a(r),c=Math.ceil(i*u/8);u=Math.ceil(u/8);let h=e[n],d=0;if(h>1&&(e[n]=[0,0,1][h-2]),3==h)for(d=u;d>>1)&255;for(let r=0;r>>1);for(;d>>1)}else{for(;d=0&&l>=0?(h=n*r+a<<2,d=(l+n)*f+o+a<<2):(h=(-l+n)*r-o+a<<2,d=n*f+a<<2),0==s)i[d]=e[h],i[d+1]=e[h+1],i[d+2]=e[h+2],i[d+3]=e[h+3];else if(1==s){var g=e[h+3]*(1/255),A=e[h]*g,w=e[h+1]*g,p=e[h+2]*g,v=i[d+3]*(1/255),b=i[d]*v,m=i[d+1]*v,y=i[d+2]*v;let r=1-g,n=g+v*r,f=0==n?0:1/n;i[d+3]=255*n,i[d+0]=(A+b*r)*f,i[d+1]=(w+m*r)*f,i[d+2]=(p+y*r)*f}else if(2==s)g=e[h+3],A=e[h],w=e[h+1],p=e[h+2],v=i[d+3],b=i[d],m=i[d+1],y=i[d+2],g==v&&A==b&&w==m&&p==y?(i[d]=0,i[d+1]=0,i[d+2]=0,i[d+3]=0):(i[d]=A,i[d+1]=w,i[d+2]=p,i[d+3]=g);else if(3==s){if(g=e[h+3],A=e[h],w=e[h+1],p=e[h+2],v=i[d+3],b=i[d],m=i[d+1],y=i[d+2],g==v&&A==b&&w==m&&p==y)continue;if(g<220&&v>20)return!1}return!0}return{decode:function(r){let a=new Uint8Array(r),o=8,l=e.readUshort,s=e.readUint,u={tabs:{},frames:[]},c=new Uint8Array(a.length),h,d=0,g=0,A=[137,80,78,71,13,10,26,10];for(var w,p=0;p<8;p++)if(a[p]!=A[p])throw"The input is not a PNG file!";for(;o>>1:n>>>=1;e[r]=n}return e}(),update(e,r,n,f){for(let a=0;a>>8;return e},crc:(e,r,n)=>0xffffffff^i.update(0xffffffff,e,r,n)};function f(e,r,n,i){r[n]+=e[0]*i>>4,r[n+1]+=e[1]*i>>4,r[n+2]+=e[2]*i>>4,r[n+3]+=e[3]*i>>4}function a(e){return Math.max(0,Math.min(255,e))}function o(e,r){let n=e[0]-r[0],i=e[1]-r[1],f=e[2]-r[2],a=e[3]-r[3];return n*n+i*i+f*f+a*a}function l(e,r,n,i,l,s,u){null==u&&(u=1);let c=i.length,h=[];for(var d,g=0;g>>0&255,e>>>8&255,e>>>16&255,e>>>24&255])}for(g=0;g>2]=A,v[g>>2]=i[A]}}function c(e,n,f,a,o){null==o&&(o={});let{crc:l}=i,s=r.writeUint,u=r.writeUshort,c=r.writeASCII,h=8,d=e.frames.length>1,g,A=!1,w=33+20*!!d;if(null!=o.sRGB&&(w+=13),null!=o.pHYs&&(w+=21),null!=o.iCCP&&(w+=21+(g=pako.deflate(o.iCCP)).length+4),3==e.ctype){for(var p=e.plte.length,v=0;v>>24!=255&&(A=!0);w+=8+3*p+4+(A?8+ +p+4:0)}for(var b=0;b>>8&255,a=n>>>16&255;m[h+r+0]=i,m[h+r+1]=f,m[h+r+2]=a}if(s(m,h+=3*p,l(m,h-3*p-4,3*p+4)),h+=4,A){for(s(m,h,p),c(m,h+=4,"tRNS"),h+=4,v=0;v>>24&255;s(m,h+=p,l(m,h-p-4,p+4)),h+=4}}let U=0;for(b=0;b5e5||1==i)&&(h=[0]),l&&(c={level:0});for(var d=0;d>1)+256&255;if(4==o)for(u=a;u>1)&255;for(u=a;u>1)&255}if(4==o){for(u=0;us&&(s=r),eA&&(A=e));-1==s&&(o=l=s=A=0),a&&(1==(1&o)&&o--,1==(1&l)&&l--);let m=(s-o+1)*(A-l+1);m>2,e>>2);C.push(B);let i=new Uint8Array(r.abuf,n,e);d&&l(I.img,I.rect.width,I.rect.height,_,i,B),I.img.set(i),n+=e}}else for(m=0;mM&&r==e[U-M])B[U]=B[U-M];else{let e=x[r];if(null==e&&(x[r]=e=_.length,_.push(r),_.length>=300))break;B[U]=e}}}let R=_.length;for(R<=256&&0==h&&(v=Math.max(v=R<=2?1:R<=4?2:R<=16?4:8,c)),m=0;m>1)]|=f[e+T]<<4-4*(1&T);else if(2==v)for(T=0;T>2)]|=f[e+T]<<6-2*(3&T);else if(1==v)for(T=0;T>3)]|=f[e+T]<<7-(7&T)}r=S,p=3,i=1}else if(0==F&&1==E.length){S=new Uint8Array(M*e*3);let f=M*e;for(U=0;Ub&&(b=i),lm&&(m=l))}-1==b&&(p=v=b=m=0),l&&(1==(1&p)&&p--,1==(1&v)&&v--),o={x:p,y:v,width:b-p+1,height:m-v+1};let y=f[a];y.rect=o,y.blend=1,y.img=new Uint8Array(o.width*o.height*4),0==f[a-1].dispose?(e(c,n,i,y.img,o.width,o.height,-o.x,-o.y,0),A(g,n,i,y.img,o)):e(g,n,i,y.img,o.width,o.height,-o.x,-o.y,0)}function A(r,n,i,f,a){e(r,n,i,f,a.width,a.height,-a.x,-a.y,2)}function w(e,r){let n,i=new Uint8Array(e),f=i.slice(0),a=new Uint32Array(f.buffer),o=p(f,r),l=o[0],s=o[1],u=i.length,c=new Uint8Array(u>>2);if(i.length<2e7)for(var h=0;h>2]=n.ind,a[h>>2]=n.est.rgba;else for(h=0;h=b(n.est,d,g,A,w)?n.left:n.right;c[h>>2]=n.ind,a[h>>2]=n.est.rgba}return{abuf:f.buffer,inds:c,plte:s}}function p(e,r,n){null==n&&(n=1e-4);let i=new Uint32Array(e.buffer),f={i0:0,i1:e.length,bst:null,est:null,tdst:0,left:null,right:null};f.bst=y(e,f.i0,f.i1),f.est=U(f.bst);let a=[f];for(;a.lengthr&&(r=a[o].est.L,f=o);if(ra;)i-=4;if(n>=i)break;let o=r[n>>2];r[n>>2]=r[i>>2],r[i>>2]=o,n+=4,i-=4}for(;m(e,n,f)>a;)n-=4;return n+4}(e,i,l.i0,l.i1,l.est.e,l.est.eMq255);if(l.i0>=s||l.i1<=s){l.est.L=0;continue}let u={i0:l.i0,i1:s,bst:null,est:null,tdst:0,left:null,right:null};u.bst=y(e,u.i0,u.i1),u.est=U(u.bst);let c={i0:s,i1:l.i1,bst:null,est:null,tdst:0,left:null,right:null};for(o=0,c.bst={R:[],m:[],N:l.bst.N-u.bst.N};o<16;o++)c.bst.R[o]=l.bst.R[o]-u.bst.R[o];for(o=0;o<4;o++)c.bst.m[o]=l.bst.m[o]-u.bst.m[o];c.est=U(c.bst),l.left=u,l.right=c,a[f]=u,a.push(c)}for(a.sort((e,r)=>r.bst.N-e.bst.N),o=0;o0&&(o=e.right,l=e.left);let s=v(o,r,n,i,f);if(s.tdst<=a*a)return s;let u=v(l,r,n,i,f);return u.tdst>2}}function U(e){let{R:r}=e,{m:n}=e,{N:i}=e,f=n[0],a=n[1],o=n[2],l=n[3],s=0==i?0:1/i,u=[r[0]-f*f*s,r[1]-f*a*s,r[2]-f*o*s,r[3]-f*l*s,r[4]-a*f*s,r[5]-a*a*s,r[6]-a*o*s,r[7]-a*l*s,r[8]-o*f*s,r[9]-o*a*s,r[10]-o*o*s,r[11]-o*l*s,r[12]-l*f*s,r[13]-l*a*s,r[14]-l*o*s,r[15]-l*l*s],c=[Math.random(),Math.random(),Math.random(),Math.random()],h=0,d=0;if(0!=i)for(let e=0;e<16&&(c=F.multVec(u,c),d=Math.sqrt(F.dot(c,c)),c=F.sml(1/d,c),!(0!=e&&1e-9>Math.abs(d-h)));e++)h=d;let g=[f*s,a*s,o*s,l*s];return{Cov:u,q:g,e:c,L:h,eMq255:F.dot(F.sml(255,g),c),eMq:F.dot(c,g),rgba:(Math.round(255*g[3])<<24|Math.round(255*g[2])<<16|Math.round(255*g[1])<<8|(0|Math.round(255*g[0])))>>>0}}var F={multVec:(e,r)=>[e[0]*r[0]+e[1]*r[1]+e[2]*r[2]+e[3]*r[3],e[4]*r[0]+e[5]*r[1]+e[6]*r[2]+e[7]*r[3],e[8]*r[0]+e[9]*r[1]+e[10]*r[2]+e[11]*r[3],e[12]*r[0]+e[13]*r[1]+e[14]*r[2]+e[15]*r[3]],dot:(e,r)=>e[0]*r[0]+e[1]*r[1]+e[2]*r[2]+e[3]*r[3],sml:(e,r)=>[e*r[0],e*r[1],e*r[2],e*r[3]]};u.encode=function(e,r,n,i,f,a,o){null==i&&(i=0),null==o&&(o=!1);let l=d(e,r,n,i,[!1,!1,!1,0,o,!1]);return h(l,-1),c(l,r,n,f,a)},u.encodeLL=function(e,r,n,i,f,a,o,l){let s={ctype:0+2*(1!=i)+4*(0!=f),depth:a,frames:[]},u=(i+f)*a,d=u*r;for(let i=0;i>>0),y(1),y(32),U(3),U(l),U(2835),U(2835),b+=8,U(0xff0000),U(65280),U(255),U(0xff000000),U(0x57696e20),function e(){for(;v0;){for(w=122+v*o,d=0;d>>24,h.setUint32(w+d,g<<8|A),d+=4;v++}m{r(new Blob([e],{type:"image/bmp"}))})},_dly:9};var h={CHROME:"CHROME",FIREFOX:"FIREFOX",DESKTOP_SAFARI:"DESKTOP_SAFARI",IE:"IE",IOS:"IOS",ETC:"ETC"},d={[h.CHROME]:16384,[h.FIREFOX]:11180,[h.DESKTOP_SAFARI]:16384,[h.IE]:8192,[h.IOS]:4096,[h.ETC]:8192};let g="undefined"!=typeof window,A="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope,w=g&&window.cordova&&window.cordova.require&&window.cordova.require("cordova/modulemapper"),p=(g||A)&&(w&&w.getOriginalSymbol(window,"File")||"undefined"!=typeof File&&File),v=(g||A)&&(w&&w.getOriginalSymbol(window,"FileReader")||"undefined"!=typeof FileReader&&FileReader);function b(e,r,n=Date.now()){return new Promise(i=>{let f=e.split(","),a=f[0].match(/:(.*?);/)[1],o=globalThis.atob(f[1]),l=o.length,s=new Uint8Array(l);for(;l--;)s[l]=o.charCodeAt(l);let u=new Blob([s],{type:a});u.name=r,u.lastModified=n,i(u)})}function m(e){return new Promise((r,n)=>{let i=new v;i.onload=()=>r(i.result),i.onerror=e=>n(e),i.readAsDataURL(e)})}function y(e){return new Promise((r,n)=>{let i=new Image;i.onload=()=>r(i),i.onerror=e=>n(e),i.src=e})}function U(){if(void 0!==U.cachedResult)return U.cachedResult;let e=h.ETC,{userAgent:r}=navigator;return/Chrom(e|ium)/i.test(r)?e=h.CHROME:/iP(ad|od|hone)/i.test(r)&&/WebKit/i.test(r)?e=h.IOS:/Safari/i.test(r)?e=h.DESKTOP_SAFARI:/Firefox/i.test(r)?e=h.FIREFOX:(/MSIE/i.test(r)||!0==!!document.documentMode)&&(e=h.IE),U.cachedResult=e,U.cachedResult}function F(e,r){let n=d[U()],i=e,f=r,a=i*f,o=i>f?f/i:i/f;for(;a>n*n;){let e=(n+i)/2,r=(n+f)/2;ec.toBlob(e,r)).then((function(e){try{return(l=e).name=n,l.lastModified=i,h.call(this)}catch(e){return o(e)}}).bind(this),o);if("function"==typeof OffscreenCanvas&&e instanceof OffscreenCanvas)return e.convertToBlob({type:r,quality:f}).then((function(e){try{return(l=e).name=n,l.lastModified=i,s.call(this)}catch(e){return o(e)}}).bind(this),o);return b(e.toDataURL(r,f),n,i).then((function(e){try{return l=e,s.call(this)}catch(e){return o(e)}}).bind(this),o);function s(){return h.call(this)}function h(){return d.call(this)}function d(){return a(l)}})}function I(e){e.width=0,e.height=0}function M(){return new Promise(function(e,r){let n,i,f,a;return void 0!==M.cachedResult?e(M.cachedResult):b("data:image/jpeg;base64,/9j/4QAiRXhpZgAATU0AKgAAAAgAAQESAAMAAAABAAYAAAAAAAD/2wCEAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAf/AABEIAAEAAgMBEQACEQEDEQH/xABKAAEAAAAAAAAAAAAAAAAAAAALEAEAAAAAAAAAAAAAAAAAAAAAAQEAAAAAAAAAAAAAAAAAAAAAEQEAAAAAAAAAAAAAAAAAAAAA/9oADAMBAAIRAxEAPwA/8H//2Q==","test.jpg",Date.now()).then(function(o){try{return n=o,C(n).then(function(o){try{return i=o[1],B(i,n.type,n.name,n.lastModified).then(function(n){try{return f=n,I(i),C(f).then(function(n){try{return a=n[0],M.cachedResult=1===a.width&&2===a.height,e(M.cachedResult)}catch(e){return r(e)}},r)}catch(e){return r(e)}},r)}catch(e){return r(e)}},r)}catch(e){return r(e)}},r)})}function R(e){return new Promise((r,n)=>{let i=new v;i.onload=e=>{let n=new DataView(e.target.result);if(65496!=n.getUint16(0,!1))return r(-2);let i=n.byteLength,f=2;for(;f=n.getUint16(f+2,!1));){let e=n.getUint16(f,!1);if(f+=2,65505==e){if(0x45786966!=n.getUint32(f+=2,!1))return r(-1);let e=18761==n.getUint16(f+=6,!1);f+=n.getUint32(f+4,e);let i=n.getUint16(f,e);f+=2;for(let a=0;an(e),i.readAsArrayBuffer(e)})}function S(e,r){let{width:n}=e,{height:i}=e,{maxWidthOrHeight:f}=r,a,o=e;return isFinite(f)&&(n>f||i>f)&&([o,a]=E(n,i),n>i?(o.width=f,o.height=i/n*f):(o.width=n/i*f,o.height=f),a.drawImage(e,0,0,o.width,o.height),I(e)),o}function T(e,r){let{width:n}=e,{height:i}=e,[f,a]=E(n,i);switch(r>4&&r<9?(f.width=i,f.height=n):(f.width=n,f.height=i),r){case 2:a.transform(-1,0,0,1,n,0);break;case 3:a.transform(-1,0,0,-1,n,i);break;case 4:a.transform(1,0,0,-1,0,i);break;case 5:a.transform(0,1,1,0,0,0);break;case 6:a.transform(0,1,-1,0,i,0);break;case 7:a.transform(0,-1,-1,0,i,n);break;case 8:a.transform(0,-1,1,0,0,n)}return a.drawImage(e,0,0,n,i),I(e),f}function Q(e,r,n=0){return new Promise(function(i,f){let a,o,l,s,u,c,h,d,g,A,w,p,v,b,m,y,U,F,x,_;function Q(e=5){if(r.signal&&r.signal.aborted)throw r.signal.reason;a+=e,r.onProgress(Math.min(a,100))}function k(e){if(r.signal&&r.signal.aborted)throw r.signal.reason;a=Math.min(Math.max(e,a),100),r.onProgress(a)}return a=n,o=r.maxIteration||10,l=1024*r.maxSizeMB*1024,Q(),C(e,r).then((function(n){try{return[,s]=n,Q(),u=S(s,r),Q(),new Promise(function(n,i){var f;if(!(f=r.exifOrientation))return R(e).then((function(e){try{return f=e,a.call(this)}catch(e){return i(e)}}).bind(this),i);function a(){return n(f)}return a.call(this)}).then((function(n){try{return c=n,Q(),M().then((function(n){try{return h=n?u:T(u,c),Q(),d=r.initialQuality||1,g=r.fileType||e.type,B(h,g,e.name,e.lastModified,d).then((function(n){try{var a;if(A=n,Q(),w=A.size>l,p=A.size>e.size,!w&&!p)return k(100),i(A);function c(){if(o--&&(m>l||m>v)){let r,n;return r=_?.95*x.width:x.width,n=_?.95*x.height:x.height,[U,F]=E(r,n),F.drawImage(x,0,0,r,n),d*="image/png"===g?.85:.95,B(U,g,e.name,e.lastModified,d).then(function(e){try{return y=e,I(x),x=U,m=y.size,k(Math.min(99,Math.floor((b-m)/(b-l)*100))),c}catch(e){return f(e)}},f)}return[1]}return v=e.size,m=b=A.size,x=h,_=!r.alwaysKeepResolution&&w,(a=(function(e){for(;e;){if(e.then)return void e.then(a,f);try{if(e.pop){if(e.length)return e.pop()?C.call(this):e;e=c}else e=e.call(this)}catch(e){return f(e)}}}).bind(this))(c);function C(){return I(x),I(U),I(u),I(h),I(s),k(100),i(y)}}catch(e){return f(e)}}).bind(this),f)}catch(e){return f(e)}}).bind(this),f)}catch(e){return f(e)}}).bind(this),f)}catch(e){return f(e)}}).bind(this),f)})}function k(e,r){return new Promise(function(n,a){let o,l,s,u,c,h;if(o={...r},s=0,{onProgress:u}=o,o.maxSizeMB=o.maxSizeMB||1/0,c="boolean"!=typeof o.useWebWorker||o.useWebWorker,delete o.useWebWorker,o.onProgress=e=>{s=e,"function"==typeof u&&u(s)},!(e instanceof Blob||e instanceof p))return a(Error("The file given is not an instance of Blob or File"));if(!/^image/.test(e.type))return a(Error("The file given is not an image"));if(h="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope,!c||"function"!=typeof Worker||h)return Q(e,o).then((function(e){try{return l=e,A.call(this)}catch(e){return a(e)}}).bind(this),a);var d=(function(){try{return A.call(this)}catch(e){return a(e)}}).bind(this),g=function(r){try{return Q(e,o).then(function(e){try{return l=e,d()}catch(e){return a(e)}},a)}catch(e){return a(e)}};try{return o.libURL=o.libURL||"https://cdn.jsdelivr.net/npm/browser-image-compression@2.0.2/dist/browser-image-compression.js",new Promise((r,n)=>{i||(i=function(e){let r=[];return"function"==typeof e?r.push(`(${e})()`):r.push(e),URL.createObjectURL(new Blob(r))}("\nlet scriptImported = false\nself.addEventListener('message', async (e) => {\n const { file, id, imageCompressionLibUrl, options } = e.data\n options.onProgress = (progress) => self.postMessage({ progress, id })\n try {\n if (!scriptImported) {\n // console.log('[worker] importScripts', imageCompressionLibUrl)\n self.importScripts(imageCompressionLibUrl)\n scriptImported = true\n }\n // console.log('[worker] self', self)\n const compressedFile = await imageCompression(file, options)\n self.postMessage({ file: compressedFile, id })\n } catch (e) {\n // console.error('[worker] error', e)\n self.postMessage({ error: e.message + '\\n' + e.stack, id })\n }\n})\n"));let f=new Worker(i);f.addEventListener("message",function(e){if(o.signal&&o.signal.aborted)f.terminate();else if(void 0===e.data.progress){if(e.data.error)return n(Error(e.data.error)),void f.terminate();r(e.data.file),f.terminate()}else o.onProgress(e.data.progress)}),f.addEventListener("error",n),o.signal&&o.signal.addEventListener("abort",()=>{n(o.signal.reason),f.terminate()}),f.postMessage({file:e,imageCompressionLibUrl:o.libURL,options:{...o,onProgress:void 0,signal:void 0}})}).then(function(e){try{return l=e,d()}catch(e){return g()}},g)}catch(e){g()}function A(){try{l.name=e.name,l.lastModified=e.lastModified}catch(e){}try{o.preserveExif&&"image/jpeg"===e.type&&(!o.fileType||o.fileType&&o.fileType===e.type)&&(l=f(e,l))}catch(e){}return n(l)}})}k.getDataUrlFromFile=m,k.getFilefromDataUrl=b,k.loadImage=y,k.drawImageInCanvas=x,k.drawFileInCanvas=C,k.canvasToFile=B,k.getExifOrientation=R,k.handleMaxWidthOrHeight=S,k.followExifOrientation=T,k.cleanupCanvasMemory=I,k.isAutoOrientationInBrowser=M,k.approximateBelowMaximumCanvasSizeOfBrowser=F,k.copyExifWithoutOrientation=f,k.getBrowserName=U,k.version="2.0.2"}}]);