123456 |
- /*!
- fflate - fast JavaScript compression/decompression
- <https://101arrowz.github.io/fflate>
- Licensed under MIT. https://github.com/101arrowz/fflate/blob/master/LICENSE
- */
- var gn={},bn=function(n,r,t,e,i){var a=gn[r]||(gn[r]=URL.createObjectURL(new Blob([n],{type:"text/javascript"}))),o=new Worker(a);return o.onerror=function(f){return i(f.error,null)},o.onmessage=function(f){return i(null,f.data)},o.postMessage(t,e),o},A=Uint8Array,R=Uint16Array,nr=Uint32Array,ur=new A([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]),lr=new A([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]),Mr=new A([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),wn=function(n,r){for(var t=new R(31),e=0;e<31;++e)t[e]=r+=1<<n[e-1];for(var i=new nr(t[30]),e=1;e<30;++e)for(var a=t[e];a<t[e+1];++a)i[a]=a-t[e]<<5|e;return[t,i]},yn=wn(ur,2),Nr=yn[0],Ir=yn[1];Nr[28]=258,Ir[258]=28;for(var mn=wn(lr,0),zn=mn[0],Qr=mn[1],Ur=new R(32768),T=0;T<32768;++T){var ir=(T&43690)>>>1|(T&21845)<<1;ir=(ir&52428)>>>2|(ir&13107)<<2,ir=(ir&61680)>>>4|(ir&3855)<<4,Ur[T]=((ir&65280)>>>8|(ir&255)<<8)>>>1}for(var V=function(n,r,t){for(var e=n.length,i=0,a=new R(r);i<e;++i)++a[n[i]-1];var o=new R(r);for(i=0;i<r;++i)o[i]=o[i-1]+a[i-1]<<1;var f;if(t){f=new R(1<<r);var h=15-r;for(i=0;i<e;++i)if(n[i])for(var s=i<<4|n[i],u=r-n[i],l=o[n[i]-1]++<<u,p=l|(1<<u)-1;l<=p;++l)f[Ur[l]>>>h]=s}else for(f=new R(e),i=0;i<e;++i)n[i]&&(f[i]=Ur[o[n[i]-1]++]>>>15-n[i]);return f},tr=new A(288),T=0;T<144;++T)tr[T]=8;for(var T=144;T<256;++T)tr[T]=9;for(var T=256;T<280;++T)tr[T]=7;for(var T=280;T<288;++T)tr[T]=8;for(var vr=new A(32),T=0;T<32;++T)vr[T]=5;var xn=V(tr,9,0),An=V(tr,9,1),Dn=V(vr,5,0),Mn=V(vr,5,1),Gr=function(n){for(var r=n[0],t=1;t<n.length;++t)n[t]>r&&(r=n[t]);return r},X=function(n,r,t){var e=r/8|0;return(n[e]|n[e+1]<<8)>>(r&7)&t},Or=function(n,r){var t=r/8|0;return(n[t]|n[t+1]<<8|n[t+2]<<16)>>(r&7)},Cr=function(n){return(n/8|0)+(n&7&&1)},$=function(n,r,t){(r==null||r<0)&&(r=0),(t==null||t>n.length)&&(t=n.length);var e=new(n instanceof R?R:n instanceof nr?nr:A)(t-r);return e.set(n.subarray(r,t)),e},Fr=function(n,r,t){var e=n.length;if(!e||t&&!t.l&&e<5)return r||new A(0);var i=!r||t,a=!t||t.i;t||(t={}),r||(r=new A(e*3));var o=function(Tr){var Dr=r.length;if(Tr>Dr){var hr=new A(Math.max(Dr*2,Tr));hr.set(r),r=hr}},f=t.f||0,h=t.p||0,s=t.b||0,u=t.l,l=t.d,p=t.m,y=t.n,c=e*8;do{if(!u){t.f=f=X(n,h,1);var g=X(n,h+1,3);if(h+=3,g)if(g==1)u=An,l=Mn,p=9,y=5;else if(g==2){var m=X(n,h,31)+257,D=X(n,h+10,15)+4,C=m+X(n,h+5,31)+1;h+=14;for(var U=new A(C),x=new A(19),v=0;v<D;++v)x[Mr[v]]=X(n,h+v*3,7);h+=D*3;var E=Gr(x),S=(1<<E)-1;if(!a&&h+C*(E+7)>c)break;for(var K=V(x,E,1),v=0;v<C;){var I=K[X(n,h,S)];h+=I&15;var w=I>>>4;if(w<16)U[v++]=w;else{var Z=0,B=0;for(w==16?(B=3+X(n,h,3),h+=2,Z=U[v-1]):w==17?(B=3+X(n,h,7),h+=3):w==18&&(B=11+X(n,h,127),h+=7);B--;)U[v++]=Z}}var G=U.subarray(0,m),k=U.subarray(m);p=Gr(G),y=Gr(k),u=V(G,p,1),l=V(k,y,1)}else throw"invalid block type";else{var w=Cr(h)+4,M=n[w-4]|n[w-3]<<8,z=w+M;if(z>e){if(a)throw"unexpected EOF";break}i&&o(s+M),r.set(n.subarray(w,z),s),t.b=s+=M,t.p=h=z*8;continue}if(h>c)throw"unexpected EOF"}i&&o(s+131072);for(var O=(1<<p)-1,H=(1<<y)-1,N=p+y+18;a||h+N<c;){var Z=u[Or(n,h)&O],Q=Z>>>4;if(h+=Z&15,h>c)throw"unexpected EOF";if(!Z)throw"invalid length/literal";if(Q<256)r[s++]=Q;else if(Q==256){u=null;break}else{var W=Q-254;if(Q>264){var v=Q-257,d=ur[v];W=X(n,h,(1<<d)-1)+Nr[v],h+=d}var _=l[Or(n,h)&H],j=_>>>4;if(!_)throw"invalid distance";h+=_&15;var k=zn[j];if(j>3){var d=lr[j];k+=Or(n,h)&(1<<d)-1,h+=d}if(h>c)throw"unexpected EOF";i&&o(s+131072);for(var q=s+W;s<q;s+=4)r[s]=r[s-k],r[s+1]=r[s+1-k],r[s+2]=r[s+2-k],r[s+3]=r[s+3-k];s=q}}t.l=u,t.p=h,t.b=s,u&&(f=1,t.m=p,t.d=l,t.n=y)}while(!f);return s==r.length?r:$(r,0,s)},b=function(n,r,t){t<<=r&7;var e=r/8|0;n[e]|=t,n[e+1]|=t>>>8},cr=function(n,r,t){t<<=r&7;var e=r/8|0;n[e]|=t,n[e+1]|=t>>>8,n[e+2]|=t>>>16},Er=function(n,r){for(var t=[],e=0;e<n.length;++e)n[e]&&t.push({s:e,f:n[e]});var i=t.length,a=t.slice();if(!i)return[er,0];if(i==1){var o=new A(t[0].s+1);return o[t[0].s]=1,[o,1]}t.sort(function(C,U){return C.f-U.f}),t.push({s:-1,f:25001});var f=t[0],h=t[1],s=0,u=1,l=2;for(t[0]={s:-1,f:f.f+h.f,l:f,r:h};u!=i-1;)f=t[t[s].f<t[l].f?s++:l++],h=t[s!=u&&t[s].f<t[l].f?s++:l++],t[u++]={s:-1,f:f.f+h.f,l:f,r:h};for(var p=a[0].s,e=1;e<i;++e)a[e].s>p&&(p=a[e].s);var y=new R(p+1),c=Pr(t[u-1],y,0);if(c>r){var e=0,g=0,w=c-r,M=1<<w;for(a.sort(function(U,x){return y[x.s]-y[U.s]||U.f-x.f});e<i;++e){var z=a[e].s;if(y[z]>r)g+=M-(1<<c-y[z]),y[z]=r;else break}for(g>>>=w;g>0;){var m=a[e].s;y[m]<r?g-=1<<r-y[m]++-1:++e}for(;e>=0&&g;--e){var D=a[e].s;y[D]==r&&(--y[D],++g)}c=r}return[new A(y),c]},Pr=function(n,r,t){return n.s==-1?Math.max(Pr(n.l,r,t+1),Pr(n.r,r,t+1)):r[n.s]=t},Vr=function(n){for(var r=n.length;r&&!n[--r];);for(var t=new R(++r),e=0,i=n[0],a=1,o=function(h){t[e++]=h},f=1;f<=r;++f)if(n[f]==i&&f!=r)++a;else{if(!i&&a>2){for(;a>138;a-=138)o(32754);a>2&&(o(a>10?a-11<<5|28690:a-3<<5|12305),a=0)}else if(a>3){for(o(i),--a;a>6;a-=6)o(8304);a>2&&(o(a-3<<5|8208),a=0)}for(;a--;)o(i);a=1,i=n[f]}return[t.subarray(0,e),r]},pr=function(n,r){for(var t=0,e=0;e<r.length;++e)t+=n[e]*r[e];return t},Sr=function(n,r,t){var e=t.length,i=Cr(r+2);n[i]=e&255,n[i+1]=e>>>8,n[i+2]=n[i]^255,n[i+3]=n[i+1]^255;for(var a=0;a<e;++a)n[i+a+4]=t[a];return(i+4+e)*8},Xr=function(n,r,t,e,i,a,o,f,h,s,u){b(r,u++,t),++i[256];for(var l=Er(i,15),p=l[0],y=l[1],c=Er(a,15),g=c[0],w=c[1],M=Vr(p),z=M[0],m=M[1],D=Vr(g),C=D[0],U=D[1],x=new R(19),v=0;v<z.length;++v)x[z[v]&31]++;for(var v=0;v<C.length;++v)x[C[v]&31]++;for(var E=Er(x,7),S=E[0],K=E[1],I=19;I>4&&!S[Mr[I-1]];--I);var Z=s+5<<3,B=pr(i,tr)+pr(a,vr)+o,G=pr(i,p)+pr(a,g)+o+14+3*I+pr(x,S)+(2*x[16]+3*x[17]+7*x[18]);if(Z<=B&&Z<=G)return Sr(r,u,n.subarray(h,h+s));var k,O,H,N;if(b(r,u,1+(G<B)),u+=2,G<B){k=V(p,y,0),O=p,H=V(g,w,0),N=g;var Q=V(S,K,0);b(r,u,m-257),b(r,u+5,U-1),b(r,u+10,I-4),u+=14;for(var v=0;v<I;++v)b(r,u+3*v,S[Mr[v]]);u+=3*I;for(var W=[z,C],d=0;d<2;++d)for(var _=W[d],v=0;v<_.length;++v){var j=_[v]&31;b(r,u,Q[j]),u+=S[j],j>15&&(b(r,u,_[v]>>>5&127),u+=_[v]>>>12)}}else k=xn,O=tr,H=Dn,N=vr;for(var v=0;v<f;++v)if(e[v]>255){var j=e[v]>>>18&31;cr(r,u,k[j+257]),u+=O[j+257],j>7&&(b(r,u,e[v]>>>23&31),u+=ur[j]);var q=e[v]&31;cr(r,u,H[q]),u+=N[q],q>3&&(cr(r,u,e[v]>>>5&8191),u+=lr[q])}else cr(r,u,k[e[v]]),u+=O[e[v]];return cr(r,u,k[256]),u+O[256]},Un=new nr([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),er=new A(0),Cn=function(n,r,t,e,i,a){var o=n.length,f=new A(e+o+5*(1+Math.ceil(o/7e3))+i),h=f.subarray(e,f.length-i),s=0;if(!r||o<8)for(var u=0;u<=o;u+=65535){var l=u+65535;l<o?s=Sr(h,s,n.subarray(u,l)):(h[u]=a,s=Sr(h,s,n.subarray(u,o)))}else{for(var p=Un[r-1],y=p>>>13,c=p&8191,g=(1<<t)-1,w=new R(32768),M=new R(g+1),z=Math.ceil(t/3),m=2*z,D=function(Kr){return(n[Kr]^n[Kr+1]<<z^n[Kr+2]<<m)&g},C=new nr(25e3),U=new R(288),x=new R(32),v=0,E=0,u=0,S=0,K=0,I=0;u<o;++u){var Z=D(u),B=u&32767,G=M[Z];if(w[B]=G,M[Z]=B,K<=u){var k=o-u;if((v>7e3||S>24576)&&k>423){s=Xr(n,h,0,C,U,x,E,S,I,u-I,s),S=v=E=0,I=u;for(var O=0;O<286;++O)U[O]=0;for(var O=0;O<30;++O)x[O]=0}var H=2,N=0,Q=c,W=B-G&32767;if(k>2&&Z==D(u-W))for(var d=Math.min(y,k)-1,_=Math.min(32767,u),j=Math.min(258,k);W<=_&&--Q&&B!=G;){if(n[u+H]==n[u+H-W]){for(var q=0;q<j&&n[u+q]==n[u+q-W];++q);if(q>H){if(H=q,N=W,q>d)break;for(var Tr=Math.min(W,q-2),Dr=0,O=0;O<Tr;++O){var hr=u-W+O+32768&32767,_n=w[hr],vn=hr-_n+32768&32767;vn>Dr&&(Dr=vn,G=hr)}}}B=G,G=w[B],W+=B-G+32768&32767}if(N){C[S++]=268435456|Ir[H]<<18|Qr[N];var cn=Ir[H]&31,pn=Qr[N]&31;E+=ur[cn]+lr[pn],++U[257+cn],++x[pn],K=u+H,++v}else C[S++]=n[u],++U[n[u]]}}s=Xr(n,h,a,C,U,x,E,S,I,u-I,s),!a&&s&7&&(s=Sr(h,s+1,er))}return $(f,0,e+Cr(s)+i)},Fn=function(){for(var n=new nr(256),r=0;r<256;++r){for(var t=r,e=9;--e;)t=(t&1&&3988292384)^t>>>1;n[r]=t}return n}(),gr=function(){var n=-1;return{p:function(r){for(var t=n,e=0;e<r.length;++e)t=Fn[t&255^r[e]]^t>>>8;n=t},d:function(){return~n}}},$r=function(){var n=1,r=0;return{p:function(t){for(var e=n,i=r,a=t.length,o=0;o!=a;){for(var f=Math.min(o+2655,a);o<f;++o)i+=e+=t[o];e=(e&65535)+15*(e>>16),i=(i&65535)+15*(i>>16)}n=e,r=i},d:function(){return n%=65521,r%=65521,(n>>>8<<16|(r&255)<<8|r>>>8)+((n&255)<<23)*2}}},sr=function(n,r,t,e,i){return Cn(n,r.level==null?6:r.level,r.mem==null?Math.ceil(Math.max(8,Math.min(13,Math.log(n.length)))*1.5):12+r.mem,t,e,!i)},Zr=function(n,r){var t={};for(var e in n)t[e]=n[e];for(var e in r)t[e]=r[e];return t},Sn=function(n,r,t){for(var e=n(),i=n.toString(),a=i.slice(i.indexOf("[")+1,i.lastIndexOf("]")).replace(/ /g,"").split(","),o=0;o<e.length;++o){var f=e[o],h=a[o];if(typeof f=="function"){r+=";"+h+"=";var s=f.toString();if(f.prototype)if(s.indexOf("[native code]")!=-1){var u=s.indexOf(" ",8)+1;r+=s.slice(u,s.indexOf("(",u))}else{r+=s;for(var l in f.prototype)r+=";"+h+".prototype."+l+"="+f.prototype[l].toString()}else r+=s}else t[h]=f}return[r,t]},Rr=[],rt=function(n){var r=[];for(var t in n)(n[t]instanceof A||n[t]instanceof R||n[t]instanceof nr)&&r.push((n[t]=new n[t].constructor(n[t])).buffer);return r},Zn=function(n,r,t,e){var i;if(!Rr[t]){for(var a="",o={},f=n.length-1,h=0;h<f;++h)i=Sn(n[h],a,o),a=i[0],o=i[1];Rr[t]=Sn(n[f],a,o)}var s=Zr({},Rr[t][1]);return bn(Rr[t][0]+";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage="+r.toString()+"}",t,s,rt(s),e)},wr=function(){return[A,R,nr,ur,lr,Mr,Nr,zn,An,Mn,Ur,V,Gr,X,Or,Cr,$,Fr,xr,ar,Lr]},yr=function(){return[A,R,nr,ur,lr,Mr,Ir,Qr,xn,tr,Dn,vr,Ur,Un,er,V,b,cr,Er,Pr,Vr,pr,Sr,Xr,Cr,$,Cn,sr,kr,ar]},kn=function(){return[_r,rn,F,gr,Fn]},Bn=function(){return[br,Gn]},Tn=function(){return[nn,F,$r]},In=function(){return[On]},ar=function(n){return postMessage(n,[n.buffer])},Lr=function(n){return n&&n.size&&new A(n.size)},mr=function(n,r,t,e,i,a){var o=Zn(t,e,i,function(f,h){o.terminate(),a(f,h)});return o.postMessage([n,r],r.consume?[n.buffer]:[]),function(){o.terminate()}},L=function(n){return n.ondata=function(r,t){return postMessage([r,t],[r.buffer])},function(r){return n.push(r.data[0],r.data[1])}},zr=function(n,r,t,e,i){var a,o=Zn(n,e,i,function(f,h){f?(o.terminate(),r.ondata.call(r,f)):(h[1]&&o.terminate(),r.ondata.call(r,f,h[0],h[1]))});o.postMessage(t),r.push=function(f,h){if(a)throw"stream finished";if(!r.ondata)throw"no stream handler";o.postMessage([f,a=h],[f.buffer])},r.terminate=function(){o.terminate()}},Y=function(n,r){return n[r]|n[r+1]<<8},P=function(n,r){return(n[r]|n[r+1]<<8|n[r+2]<<16)+(n[r+3]<<23)*2},dr=function(n,r){return P(n,r)|P(n,r)*4294967296},F=function(n,r,t){for(;t;++r)n[r]=t,t>>>=8},_r=function(n,r){var t=r.filename;if(n[0]=31,n[1]=139,n[2]=8,n[8]=r.level<2?4:r.level==9?2:0,n[9]=3,r.mtime!=0&&F(n,4,Math.floor(new Date(r.mtime||Date.now())/1e3)),t){n[3]=8;for(var e=0;e<=t.length;++e)n[e+10]=t.charCodeAt(e)}},br=function(n){if(n[0]!=31||n[1]!=139||n[2]!=8)throw"invalid gzip data";var r=n[3],t=10;r&4&&(t+=n[10]|(n[11]<<8)+2);for(var e=(r>>3&1)+(r>>4&1);e>0;e-=!n[t++]);return t+(r&2)},Gn=function(n){var r=n.length;return(n[r-4]|n[r-3]<<8|n[r-2]<<16)+2*(n[r-1]<<23)},rn=function(n){return 10+(n.filename&&n.filename.length+1||0)},nn=function(n,r){var t=r.level,e=t==0?0:t<6?1:t==9?3:2;n[0]=120,n[1]=e<<6|(e?32-2*e:1)},On=function(n){if((n[0]&15)!=8||n[0]>>>4>7||(n[0]<<8|n[1])%31)throw"invalid zlib data";if(n[1]&32)throw"invalid zlib data: preset dictionaries not supported"};function tn(n,r){return!r&&typeof n=="function"&&(r=n,n={}),this.ondata=r,n}var rr=function(){function n(r,t){!t&&typeof r=="function"&&(t=r,r={}),this.ondata=t,this.o=r||{}}return n.prototype.p=function(r,t){this.ondata(sr(r,this.o,0,0,!t),t)},n.prototype.push=function(r,t){if(this.d)throw"stream finished";if(!this.ondata)throw"no stream handler";this.d=t,this.p(r,t||!1)},n}(),En=function(){function n(r,t){zr([yr,function(){return[L,rr]}],this,tn.call(this,r,t),function(e){var i=new rr(e.data);onmessage=L(i)},6)}return n}();function Pn(n,r,t){if(t||(t=r,r={}),typeof t!="function")throw"no callback";return mr(n,r,[yr],function(e){return ar(kr(e.data[0],e.data[1]))},0,t)}function kr(n,r){return sr(n,r||{},0,0)}var J=function(){function n(r){this.s={},this.p=new A(0),this.ondata=r}return n.prototype.e=function(r){if(this.d)throw"stream finished";if(!this.ondata)throw"no stream handler";var t=this.p.length,e=new A(t+r.length);e.set(this.p),e.set(r,t),this.p=e},n.prototype.c=function(r){this.d=this.s.i=r||!1;var t=this.s.b,e=Fr(this.p,this.o,this.s);this.ondata($(e,t,this.s.b),this.d),this.o=$(e,this.s.b-32768),this.s.b=this.o.length,this.p=$(this.p,this.s.p/8|0),this.s.p&=7},n.prototype.push=function(r,t){this.e(r),this.c(t)},n}(),en=function(){function n(r){this.ondata=r,zr([wr,function(){return[L,J]}],this,0,function(){var t=new J;onmessage=L(t)},7)}return n}();function an(n,r,t){if(t||(t=r,r={}),typeof t!="function")throw"no callback";return mr(n,r,[wr],function(e){return ar(xr(e.data[0],Lr(e.data[1])))},1,t)}function xr(n,r){return Fr(n,r)}var qr=function(){function n(r,t){this.c=gr(),this.l=0,this.v=1,rr.call(this,r,t)}return n.prototype.push=function(r,t){rr.prototype.push.call(this,r,t)},n.prototype.p=function(r,t){this.c.p(r),this.l+=r.length;var e=sr(r,this.o,this.v&&rn(this.o),t&&8,!t);this.v&&(_r(e,this.o),this.v=0),t&&(F(e,e.length-8,this.c.d()),F(e,e.length-4,this.l)),this.ondata(e,t)},n}(),Rn=function(){function n(r,t){zr([yr,kn,function(){return[L,rr,qr]}],this,tn.call(this,r,t),function(e){var i=new qr(e.data);onmessage=L(i)},8)}return n}();function qn(n,r,t){if(t||(t=r,r={}),typeof t!="function")throw"no callback";return mr(n,r,[yr,kn,function(){return[Hr]}],function(e){return ar(Hr(e.data[0],e.data[1]))},2,t)}function Hr(n,r){r||(r={});var t=gr(),e=n.length;t.p(n);var i=sr(n,r,rn(r),8),a=i.length;return _r(i,r),F(i,a-8,t.d()),F(i,a-4,e),i}var Wr=function(){function n(r){this.v=1,J.call(this,r)}return n.prototype.push=function(r,t){if(J.prototype.e.call(this,r),this.v){var e=this.p.length>3?br(this.p):4;if(e>=this.p.length&&!t)return;this.p=this.p.subarray(e),this.v=0}if(t){if(this.p.length<8)throw"invalid gzip stream";this.p=this.p.subarray(0,-8)}J.prototype.c.call(this,t)},n}(),Hn=function(){function n(r){this.ondata=r,zr([wr,Bn,function(){return[L,J,Wr]}],this,0,function(){var t=new Wr;onmessage=L(t)},9)}return n}();function Wn(n,r,t){if(t||(t=r,r={}),typeof t!="function")throw"no callback";return mr(n,r,[wr,Bn,function(){return[Yr]}],function(e){return ar(Yr(e.data[0]))},3,t)}function Yr(n,r){return Fr(n.subarray(br(n),-8),r||new A(Gn(n)))}var on=function(){function n(r,t){this.c=$r(),this.v=1,rr.call(this,r,t)}return n.prototype.push=function(r,t){rr.prototype.push.call(this,r,t)},n.prototype.p=function(r,t){this.c.p(r);var e=sr(r,this.o,this.v&&2,t&&4,!t);this.v&&(nn(e,this.o),this.v=0),t&&F(e,e.length-4,this.c.d()),this.ondata(e,t)},n}(),nt=function(){function n(r,t){zr([yr,Tn,function(){return[L,rr,on]}],this,tn.call(this,r,t),function(e){var i=new on(e.data);onmessage=L(i)},10)}return n}();function tt(n,r,t){if(t||(t=r,r={}),typeof t!="function")throw"no callback";return mr(n,r,[yr,Tn,function(){return[fn]}],function(e){return ar(fn(e.data[0],e.data[1]))},4,t)}function fn(n,r){r||(r={});var t=$r();t.p(n);var e=sr(n,r,2,4);return nn(e,r),F(e,e.length-4,t.d()),e}var jr=function(){function n(r){this.v=1,J.call(this,r)}return n.prototype.push=function(r,t){if(J.prototype.e.call(this,r),this.v){if(this.p.length<2&&!t)return;this.p=this.p.subarray(2),this.v=0}if(t){if(this.p.length<4)throw"invalid zlib stream";this.p=this.p.subarray(0,-4)}J.prototype.c.call(this,t)},n}(),Yn=function(){function n(r){this.ondata=r,zr([wr,In,function(){return[L,J,jr]}],this,0,function(){var t=new jr;onmessage=L(t)},11)}return n}();function jn(n,r,t){if(t||(t=r,r={}),typeof t!="function")throw"no callback";return mr(n,r,[wr,In,function(){return[Jr]}],function(e){return ar(Jr(e.data[0],Lr(e.data[1])))},5,t)}function Jr(n,r){return Fr((On(n),n.subarray(2,-4)),r)}var Jn=function(){function n(r){this.G=Wr,this.I=J,this.Z=jr,this.ondata=r}return n.prototype.push=function(r,t){if(!this.ondata)throw"no stream handler";if(this.s)this.s.push(r,t);else{if(this.p&&this.p.length){var e=new A(this.p.length+r.length);e.set(this.p),e.set(r,this.p.length)}else this.p=r;if(this.p.length>2){var i=this,a=function(){i.ondata.apply(i,arguments)};this.s=this.p[0]==31&&this.p[1]==139&&this.p[2]==8?new this.G(a):(this.p[0]&15)!=8||this.p[0]>>4>7||(this.p[0]<<8|this.p[1])%31?new this.I(a):new this.Z(a),this.s.push(this.p,t),this.p=null}}},n}(),et=function(){function n(r){this.G=Hn,this.I=en,this.Z=Yn,this.ondata=r}return n.prototype.push=function(r,t){Jn.prototype.push.call(this,r,t)},n}();function it(n,r,t){if(t||(t=r,r={}),typeof t!="function")throw"no callback";return n[0]==31&&n[1]==139&&n[2]==8?Wn(n,r,t):(n[0]&15)!=8||n[0]>>4>7||(n[0]<<8|n[1])%31?an(n,r,t):jn(n,r,t)}function at(n,r){return n[0]==31&&n[1]==139&&n[2]==8?Yr(n,r):(n[0]&15)!=8||n[0]>>4>7||(n[0]<<8|n[1])%31?xr(n,r):Jr(n,r)}var sn=function(n,r,t,e){for(var i in n){var a=n[i],o=r+i;a instanceof A?t[o]=[a,e]:Array.isArray(a)?t[o]=[a[0],Zr(e,a[1])]:sn(a,o+"/",t,e)}},Kn=typeof TextEncoder!="undefined"&&new TextEncoder,hn=typeof TextDecoder!="undefined"&&new TextDecoder,Nn=0;try{hn.decode(er,{stream:!0}),Nn=1}catch(n){}var Qn=function(n){for(var r="",t=0;;){var e=n[t++],i=(e>127)+(e>223)+(e>239);if(t+i>n.length)return[r,$(n,t-1)];i?i==3?(e=((e&15)<<18|(n[t++]&63)<<12|(n[t++]&63)<<6|n[t++]&63)-65536,r+=String.fromCharCode(55296|e>>10,56320|e&1023)):i&1?r+=String.fromCharCode((e&31)<<6|n[t++]&63):r+=String.fromCharCode((e&15)<<12|(n[t++]&63)<<6|n[t++]&63):r+=String.fromCharCode(e)}},ot=function(){function n(r){this.ondata=r,Nn?this.t=new TextDecoder:this.p=er}return n.prototype.push=function(r,t){if(!this.ondata)throw"no callback";if(t||(t=!1),this.t)return this.ondata(this.t.decode(r,{stream:!t}),t);var e=new A(this.p.length+r.length);e.set(this.p),e.set(r,this.p.length);var i=Qn(e),a=i[0],o=i[1];if(t&&o.length)throw"invalid utf-8 data";this.p=o,this.ondata(a,t)},n}(),ft=function(){function n(r){this.ondata=r}return n.prototype.push=function(r,t){if(!this.ondata)throw"no callback";this.ondata(or(r),t||!1)},n}();function or(n,r){if(r){for(var t=new A(n.length),e=0;e<n.length;++e)t[e]=n.charCodeAt(e);return t}if(Kn)return Kn.encode(n);for(var i=n.length,a=new A(n.length+(n.length>>1)),o=0,f=function(u){a[o++]=u},e=0;e<i;++e){if(o+5>a.length){var h=new A(o+8+(i-e<<1));h.set(a),a=h}var s=n.charCodeAt(e);s<128||r?f(s):s<2048?(f(192|s>>>6),f(128|s&63)):s>55295&&s<57344?(s=65536+(s&1023<<10)|n.charCodeAt(++e)&1023,f(240|s>>>18),f(128|s>>>12&63),f(128|s>>>6&63),f(128|s&63)):(f(224|s>>>12),f(128|s>>>6&63),f(128|s&63))}return $(a,0,o)}function un(n,r){if(r){for(var t="",e=0;e<n.length;e+=16384)t+=String.fromCharCode.apply(null,n.subarray(e,e+16384));return t}else{if(hn)return hn.decode(n);var i=Qn(n),a=i[0],o=i[1];if(o.length)throw"invalid utf-8 data";return a}}var Vn=function(n){return n==1?3:n<6?2:n==9?1:0},Xn=function(n,r){return r+30+Y(n,r+26)+Y(n,r+28)},$n=function(n,r,t){var e=Y(n,r+28),i=un(n.subarray(r+46,r+46+e),!(Y(n,r+8)&2048)),a=r+46+e,o=P(n,r+20),f=t&&o==4294967295?Ln(n,a):[o,P(n,r+24),P(n,r+42)],h=f[0],s=f[1],u=f[2];return[Y(n,r+10),h,s,i,a+Y(n,r+30)+Y(n,r+32),u]},Ln=function(n,r){for(;Y(n,r)!=1;r+=4+Y(n,r+2));return[dr(n,r+12),dr(n,r+4),dr(n,r+20)]},fr=function(n){var r=0;if(n)for(var t in n){var e=n[t].length;if(e>65535)throw"extra field too long";r+=e+4}return r},Ar=function(n,r,t,e,i,a,o,f){var h=e.length,s=t.extra,u=f&&f.length,l=fr(s);F(n,r,o!=null?33639248:67324752),r+=4,o!=null&&(n[r++]=20,n[r++]=t.os),n[r]=20,r+=2,n[r++]=t.flag<<1|(a==null&&8),n[r++]=i&&8,n[r++]=t.compression&255,n[r++]=t.compression>>8;var p=new Date(t.mtime==null?Date.now():t.mtime),y=p.getFullYear()-1980;if(y<0||y>119)throw"date not in range 1980-2099";if(F(n,r,(y<<24)*2|p.getMonth()+1<<21|p.getDate()<<16|p.getHours()<<11|p.getMinutes()<<5|p.getSeconds()>>>1),r+=4,a!=null&&(F(n,r,t.crc),F(n,r+4,a),F(n,r+8,t.size)),F(n,r+12,h),F(n,r+14,l),r+=16,o!=null&&(F(n,r,u),F(n,r+6,t.attrs),F(n,r+10,o),r+=14),n.set(e,r),r+=h,l)for(var c in s){var g=s[c],w=g.length;F(n,r,+c),F(n,r+2,w),n.set(g,r+4),r+=4+w}return u&&(n.set(f,r),r+=u),r},ln=function(n,r,t,e,i){F(n,r,101010256),F(n,r+8,t),F(n,r+10,t),F(n,r+12,e),F(n,r+16,i)},Br=function(){function n(r){this.filename=r,this.c=gr(),this.size=0,this.compression=0}return n.prototype.process=function(r,t){this.ondata(null,r,t)},n.prototype.push=function(r,t){if(!this.ondata)throw"no callback - add to ZIP archive before pushing";this.c.p(r),this.size+=r.length,t&&(this.crc=this.c.d()),this.process(r,t||!1)},n}(),st=function(){function n(r,t){var e=this;t||(t={}),Br.call(this,r),this.d=new rr(t,function(i,a){e.ondata(null,i,a)}),this.compression=8,this.flag=Vn(t.level)}return n.prototype.process=function(r,t){try{this.d.push(r,t)}catch(e){this.ondata(e,null,t)}},n.prototype.push=function(r,t){Br.prototype.push.call(this,r,t)},n}(),ht=function(){function n(r,t){var e=this;t||(t={}),Br.call(this,r),this.d=new En(t,function(i,a,o){e.ondata(i,a,o)}),this.compression=8,this.flag=Vn(t.level),this.terminate=this.d.terminate}return n.prototype.process=function(r,t){this.d.push(r,t)},n.prototype.push=function(r,t){Br.prototype.push.call(this,r,t)},n}(),ut=function(){function n(r){this.ondata=r,this.u=[],this.d=1}return n.prototype.add=function(r){var t=this;if(this.d&2)throw"stream finished";var e=or(r.filename),i=e.length,a=r.comment,o=a&&or(a),f=i!=r.filename.length||o&&a.length!=o.length,h=i+fr(r.extra)+30;if(i>65535)throw"filename too long";var s=new A(h);Ar(s,0,r,e,f);var u=[s],l=function(){for(var w=0,M=u;w<M.length;w++){var z=M[w];t.ondata(null,z,!1)}u=[]},p=this.d;this.d=0;var y=this.u.length,c=Zr(r,{f:e,u:f,o,t:function(){r.terminate&&r.terminate()},r:function(){if(l(),p){var w=t.u[y+1];w?w.r():t.d=1}p=1}}),g=0;r.ondata=function(w,M,z){if(w)t.ondata(w,M,z),t.terminate();else if(g+=M.length,u.push(M),z){var m=new A(16);F(m,0,134695760),F(m,4,r.crc),F(m,8,g),F(m,12,r.size),u.push(m),c.c=g,c.b=h+g+16,c.crc=r.crc,c.size=r.size,p&&c.r(),p=1}else p&&l()},this.u.push(c)},n.prototype.end=function(){var r=this;if(this.d&2)throw this.d&1?"stream finishing":"stream finished";this.d?this.e():this.u.push({r:function(){if(!(r.d&1))return;r.u.splice(-1,1),r.e()},t:function(){}}),this.d=3},n.prototype.e=function(){for(var r=0,t=0,e=0,i=0,a=this.u;i<a.length;i++){var o=a[i];e+=46+o.f.length+fr(o.extra)+(o.o?o.o.length:0)}for(var f=new A(e+22),h=0,s=this.u;h<s.length;h++){var o=s[h];Ar(f,r,o,o.f,o.u,o.c,t,o.o),r+=46+o.f.length+fr(o.extra)+(o.o?o.o.length:0),t+=o.b}ln(f,r,this.u.length,e,t),this.ondata(null,f,!0),this.d=2},n.prototype.terminate=function(){for(var r=0,t=this.u;r<t.length;r++){var e=t[r];e.t()}this.d=2},n}();function lt(n,r,t){if(t||(t=r,r={}),typeof t!="function")throw"no callback";var e={};sn(n,"",e,r);var i=Object.keys(e),a=i.length,o=0,f=0,h=a,s=new Array(a),u=[],l=function(){for(var g=0;g<u.length;++g)u[g]()},p=function(){var g=new A(f+22),w=o,M=f-o;f=0;for(var z=0;z<h;++z){var m=s[z];try{var D=m.c.length;Ar(g,f,m,m.f,m.u,D);var C=30+m.f.length+fr(m.extra),U=f+C;g.set(m.c,U),Ar(g,o,m,m.f,m.u,D,f,m.m),o+=16+C+(m.m?m.m.length:0),f=U+D}catch(x){return t(x,null)}}ln(g,o,s.length,M,w),t(null,g)};a||p();for(var y=function(g){var w=i[g],M=e[w],z=M[0],m=M[1],D=gr(),C=z.length;D.p(z);var U=or(w),x=U.length,v=m.comment,E=v&&or(v),S=E&&E.length,K=fr(m.extra),I=m.level==0?0:8,Z=function(B,G){if(B)l(),t(B,null);else{var k=G.length;s[g]=Zr(m,{size:C,crc:D.d(),c:G,f:U,m:E,u:x!=w.length||E&&v.length!=S,compression:I}),o+=30+x+K+k,f+=76+2*(x+K)+(S||0)+k,--a||p()}};if(x>65535&&Z("filename too long",null),!I)Z(null,z);else if(C<16e4)try{Z(null,kr(z,m))}catch(B){Z(B,null)}else u.push(Pn(z,m,Z))},c=0;c<h;++c)y(c);return l}function vt(n,r){r||(r={});var t={},e=[];sn(n,"",t,r);var i=0,a=0;for(var o in t){var f=t[o],h=f[0],s=f[1],u=s.level==0?0:8,l=or(o),p=l.length,y=s.comment,c=y&&or(y),g=c&&c.length,w=fr(s.extra);if(p>65535)throw"filename too long";var M=u?kr(h,s):h,z=M.length,m=gr();m.p(h),e.push(Zr(s,{size:h.length,crc:m.d(),c:M,f:l,m:c,u:p!=o.length||c&&y.length!=g,o:i,compression:u})),i+=30+p+w+z,a+=76+2*(p+w)+(g||0)+z}for(var D=new A(a+22),C=i,U=a-i,x=0;x<e.length;++x){var l=e[x];Ar(D,l.o,l,l.f,l.u,l.c.length);var v=30+l.f.length+fr(l.extra);D.set(l.c,l.o+v),Ar(D,i,l,l.f,l.u,l.c.length,l.o,l.m),i+=16+v+(l.m?l.m.length:0)}return ln(D,i,e.length,U,C),D}var dn=function(){function n(){}return n.prototype.push=function(r,t){this.ondata(null,r,t)},n.compression=0,n}(),ct=function(){function n(){var r=this;this.i=new J(function(t,e){r.ondata(null,t,e)})}return n.prototype.push=function(r,t){try{this.i.push(r,t)}catch(e){this.ondata(e,r,t)}},n.compression=8,n}(),pt=function(){function n(r,t){var e=this;t<32e4?this.i=new J(function(i,a){e.ondata(null,i,a)}):(this.i=new en(function(i,a,o){e.ondata(i,a,o)}),this.terminate=this.i.terminate)}return n.prototype.push=function(r,t){this.i.terminate&&(r=$(r,0)),this.i.push(r,t)},n.compression=8,n}(),gt=function(){function n(r){this.onfile=r,this.k=[],this.o={0:dn},this.p=er}return n.prototype.push=function(r,t){var e=this;if(!this.onfile)throw"no callback";if(this.c>0){var i=Math.min(this.c,r.length),a=r.subarray(0,i);if(this.c-=i,this.d?this.d.push(a,!this.c):this.k[0].push(a),r=r.subarray(i),r.length)return this.push(r,t)}else{var o=0,f=0,h=void 0,s=void 0;this.p.length?r.length?(s=new A(this.p.length+r.length),s.set(this.p),s.set(r,this.p.length)):s=this.p:s=r;for(var u=s.length,l=this.c,p=l&&this.d,y=function(){var M,z=P(s,f);if(z==67324752){o=1,h=f,c.d=null,c.c=0;var m=Y(s,f+6),D=Y(s,f+8),C=m&2048,U=m&8,x=Y(s,f+26),v=Y(s,f+28);if(u>f+30+x+v){var E=[];c.k.unshift(E),o=2;var S=P(s,f+18),K=P(s,f+22),I=un(s.subarray(f+30,f+=30+x),!C);S==4294967295?(M=U?[-2]:Ln(s,f),S=M[0],K=M[1]):U&&(S=-1),f+=v,c.c=S;var Z={name:I,compression:D,start:function(){if(!Z.ondata)throw"no callback";if(!S)Z.ondata(null,er,!0);else{var B=e.o[D];if(!B)throw"unknown compression type "+D;var G=S<0?new B(I):new B(I,S,K);G.ondata=function(N,Q,W){Z.ondata(N,Q,W)};for(var k=0,O=E;k<O.length;k++){var H=O[k];G.push(H,!1)}e.k[0]==E?e.d=G:G.push(er,!0)}},terminate:function(){e.k[0]==E&&e.d.terminate&&e.d.terminate()}};S>=0&&(Z.size=S,Z.originalSize=K),c.onfile(Z)}return"break"}else if(l){if(z==134695760)return h=f+=12+(l==-2&&8),o=2,c.c=0,"break";if(z==33639248)return h=f-=4,o=2,c.c=0,"break"}},c=this;f<u-4;++f){var g=y();if(g==="break")break}if(this.p=er,l<0){var w=o?s.subarray(0,h-12-(l==-2&&8)-(P(s,h-16)==134695760&&4)):s.subarray(0,f);p?p.push(w,!!o):this.k[+(o==2)].push(w)}if(o&2)return this.push(s.subarray(f),t);this.p=s.subarray(f)}if(t&&this.c)throw"invalid zip file"},n.prototype.register=function(r){this.o[r.compression]=r},n}();function wt(n,r){if(typeof r!="function")throw"no callback";for(var t=[],e=function(){for(var p=0;p<t.length;++p)t[p]()},i={},a=n.length-22;P(n,a)!=101010256;--a)if(!a||n.length-a>65558){r("invalid zip file",null);return}var o=Y(n,a+8);o||r(null,{});var f=o,h=P(n,a+16),s=h==4294967295;if(s){if(a=P(n,a-12),P(n,a)!=101075792){r("invalid zip file",null);return}f=o=P(n,a+32),h=P(n,a+48)}for(var u=function(p){var y=$n(n,h,s),c=y[0],g=y[1],w=y[2],M=y[3],z=y[4],m=y[5],D=Xn(n,m);h=z;var C=function(x,v){x?(e(),r(x,null)):(i[M]=v,--o||r(null,i))};if(!c)C(null,$(n,D,D+g));else if(c==8){var U=n.subarray(D,D+g);if(g<32e4)try{C(null,xr(U,new A(w)))}catch(x){C(x,null)}else t.push(an(U,{size:w},C))}else C("unknown compression type "+c,null)},l=0;l<f;++l)u();return e}function yt(n){for(var r={},t=n.length-22;P(n,t)!=101010256;--t)if(!t||n.length-t>65558)throw"invalid zip file";var e=Y(n,t+8);if(!e)return{};var i=P(n,t+16),a=i==4294967295;if(a){if(t=P(n,t-12),P(n,t)!=101075792)throw"invalid zip file";e=P(n,t+32),i=P(n,t+48)}for(var o=0;o<e;++o){var f=$n(n,i,a),h=f[0],s=f[1],u=f[2],l=f[3],p=f[4],y=f[5],c=Xn(n,y);if(i=p,!h)r[l]=$(n,c,c+s);else if(h==8)r[l]=xr(n.subarray(c,c+s),new A(u));else throw"unknown compression type "+h}return r}export{Rn as AsyncCompress,et as AsyncDecompress,En as AsyncDeflate,Hn as AsyncGunzip,Rn as AsyncGzip,en as AsyncInflate,pt as AsyncUnzipInflate,Yn as AsyncUnzlib,ht as AsyncZipDeflate,nt as AsyncZlib,qr as Compress,ot as DecodeUTF8,Jn as Decompress,rr as Deflate,ft as EncodeUTF8,Wr as Gunzip,qr as Gzip,J as Inflate,gt as Unzip,ct as UnzipInflate,dn as UnzipPassThrough,jr as Unzlib,ut as Zip,st as ZipDeflate,Br as ZipPassThrough,on as Zlib,qn as compress,Hr as compressSync,it as decompress,at as decompressSync,Pn as deflate,kr as deflateSync,Wn as gunzip,Yr as gunzipSync,qn as gzip,Hr as gzipSync,an as inflate,xr as inflateSync,un as strFromU8,or as strToU8,wt as unzip,yt as unzipSync,jn as unzlib,Jr as unzlibSync,lt as zip,vt as zipSync,tt as zlib,fn as zlibSync};export default null;
|