@substrate-system/fflate
Version:
High performance (de)compression in an 8kB package
3 lines (2 loc) • 32.5 kB
JavaScript
var nn=Object.defineProperty;var l=(e,t)=>nn(e,"name",{value:t,configurable:!0}),rn=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,n)=>(typeof require<"u"?require:t)[n]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var vt,sn=";var __w=require('worker_threads');__w.parentPort.on('message',function(m){onmessage({data:m})}),postMessage=function(m,t){__w.parentPort.postMessage(m,t)},close=process.exit;self=global";try{vt=rn("worker_threads").Worker}catch{}var he=vt?(e,t,n,r,i)=>{let s=!1,a=new vt(e+sn,{eval:!0}).on("error",c=>i(c,null)).on("message",c=>i(null,c)).on("exit",c=>{c&&!s&&i(new Error("exited with code "+c),null)});return a.postMessage(n,r),a.terminate=()=>(s=!0,vt.prototype.terminate.call(a)),a}:(e,t,n,r,i)=>{setImmediate(()=>i(new Error("async operations unsupported - update to Node 12+ (or Node 10-11 with the --experimental-worker CLI flag)"),null));let s=l(()=>{},"NOP");return{terminate:s,postMessage:s}};var w=Uint8Array,W=Uint16Array,zt=Int32Array,ft=new w([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]),ut=new w([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]),gt=new w([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),He=l((e,t)=>{let n=new W(31);for(let i=0;i<31;++i)n[i]=t+=1<<e[i-1];let r=new zt(n[30]);for(let i=1;i<30;++i)for(let s=n[i];s<n[i+1];++s)r[s]=s-n[i]<<5|i;return{b:n,r}},"freb"),{b:ee,r:Dt}=He(ft,2);ee[28]=258,Dt[258]=28;var{b:Ce,r:Pt}=He(ut,0),Ut=new W(32768);for(let e=0;e<32768;++e){let t=(e&43690)>>1|(e&21845)<<1;t=(t&52428)>>2|(t&13107)<<2,t=(t&61680)>>4|(t&3855)<<4,Ut[e]=((t&65280)>>8|(t&255)<<8)>>1}var V=l((e,t,n)=>{let r=e.length,i=0,s=new W(t);for(;i<r;++i)e[i]&&++s[e[i]-1];let a=new W(t);for(i=1;i<t;++i)a[i]=a[i-1]+s[i-1]<<1;let c;if(n){c=new W(1<<t);let u=15-t;for(i=0;i<r;++i)if(e[i]){let f=i<<4|e[i],o=t-e[i],p=a[e[i]-1]++<<o;for(let m=p|(1<<o)-1;p<=m;++p)c[Ut[p]>>u]=f}}else for(c=new W(r),i=0;i<r;++i)e[i]&&(c[i]=Ut[a[e[i]-1]++]>>15-e[i]);return c},"hMap"),Q=new w(288);for(let e=0;e<144;++e)Q[e]=8;for(let e=144;e<256;++e)Q[e]=9;for(let e=256;e<280;++e)Q[e]=7;for(let e=280;e<288;++e)Q[e]=8;var lt=new w(32);for(let e=0;e<32;++e)lt[e]=5;var Ie=V(Q,9,0),Ze=V(Q,9,1),De=V(lt,5,0),Te=V(lt,5,1),Ct=l(e=>{let t=e[0];for(let n=1;n<e.length;++n)e[n]>t&&(t=e[n]);return t},"max"),j=l((e,t,n)=>{let r=t/8|0;return(e[r]|e[r+1]<<8)>>(t&7)&n},"bits"),It=l((e,t)=>{let n=t/8|0;return(e[n]|e[n+1]<<8|e[n+2]<<16)>>(t&7)},"bits16"),ht=l(e=>(e+7)/8|0,"shft"),Y=l((e,t,n)=>((t==null||t<0)&&(t=0),(n==null||n>e.length)&&(n=e.length),new w(e.subarray(t,n))),"slc"),mn={UnexpectedEOF:0,InvalidBlockType:1,InvalidLengthLiteral:2,InvalidDistance:3,StreamFinished:4,NoStreamHandler:5,InvalidHeader:6,NoCallback:7,InvalidUTF8:8,ExtraFieldTooLong:9,InvalidDate:10,FilenameTooLong:11,StreamFinishing:12,InvalidZipData:13,UnknownCompressionMethod:14},Me=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],b=l((e,t,n)=>{let r=new Error(t||Me[e]);if(r.code=e,Error.captureStackTrace&&Error.captureStackTrace(r,b),!n)throw r;return r},"err"),wt=l((e,t,n,r)=>{let i=e.length,s=r?r.length:0;if(!i||t.f&&!t.l)return n||new w(0);let a=!n,c=a||t.i!=2,u=t.i;a&&(n=new w(i*3));let f=l(A=>{let O=n.length;if(A>O){let S=new w(Math.max(O*2,A));S.set(n),n=S}},"cbuf"),o=t.f||0,p=t.p||0,m=t.b||0,h=t.l,y=t.d,d=t.m,z=t.n,g=i*8;do{if(!h){o=j(e,p,1);let x=j(e,p+1,3);if(p+=3,x)if(x==1)h=Ze,y=Te,d=9,z=5;else if(x==2){let U=j(e,p,31)+257,v=j(e,p+10,15)+4,Z=U+j(e,p+5,31)+1;p+=14;let F=new w(Z),H=new w(19);for(let C=0;C<v;++C)H[gt[C]]=j(e,p+C*3,7);p+=v*3;let T=Ct(H),D=(1<<T)-1,M=V(H,T,1);for(let C=0;C<Z;){let B=M[j(e,p,D)];p+=B&15;let _=B>>4;if(_<16)F[C++]=_;else{let X=0,N=0;for(_==16?(N=3+j(e,p,3),p+=2,X=F[C-1]):_==17?(N=3+j(e,p,7),p+=3):_==18&&(N=11+j(e,p,127),p+=7);N--;)F[C++]=X}}let I=F.subarray(0,U),E=F.subarray(U);d=Ct(I),z=Ct(E),h=V(I,d,1),y=V(E,z,1)}else b(1);else{let U=ht(p)+4,v=e[U-4]|e[U-3]<<8,Z=U+v;if(Z>i){u&&b(0);break}c&&f(m+v),n.set(e.subarray(U,Z),m),t.b=m+=v,t.p=p=Z*8,t.f=o;continue}if(p>g){u&&b(0);break}}c&&f(m+131072);let A=(1<<d)-1,O=(1<<z)-1,S=p;for(;;S=p){let x=h[It(e,p)&A],U=x>>4;if(p+=x&15,p>g){u&&b(0);break}if(x||b(2),U<256)n[m++]=U;else if(U==256){S=p,h=null;break}else{let v=U-254;if(U>264){let D=U-257,M=ft[D];v=j(e,p,(1<<M)-1)+ee[D],p+=M}let Z=y[It(e,p)&O],F=Z>>4;Z||b(3),p+=Z&15;let H=Ce[F];if(F>3){let D=ut[F];H+=It(e,p)&(1<<D)-1,p+=D}if(p>g){u&&b(0);break}c&&f(m+131072);let T=m+v;if(m<H){let D=s-H,M=Math.min(H,T);for(D+m<0&&b(3);m<M;++m)n[m]=r[D+m]}for(;m<T;++m)n[m]=n[m-H]}}t.l=h,t.p=S,t.b=m,t.f=o,h&&(o=1,t.m=d,t.d=y,t.n=z)}while(!o);return m!=n.length&&a?Y(n,0,m):n.subarray(0,m)},"inflt"),K=l((e,t,n)=>{n<<=t&7;let r=t/8|0;e[r]|=n,e[r+1]|=n>>8},"wbits"),at=l((e,t,n)=>{n<<=t&7;let r=t/8|0;e[r]|=n,e[r+1]|=n>>8,e[r+2]|=n>>16},"wbits16"),Zt=l((e,t)=>{let n=[];for(let h=0;h<e.length;++h)e[h]&&n.push({s:h,f:e[h]});let r=n.length,i=n.slice();if(!r)return{t:tt,l:0};if(r==1){let h=new w(n[0].s+1);return h[n[0].s]=1,{t:h,l:1}}n.sort((h,y)=>h.f-y.f),n.push({s:-1,f:25001});let s=n[0],a=n[1],c=0,u=1,f=2;for(n[0]={s:-1,f:s.f+a.f,l:s,r:a};u!=r-1;)s=n[n[c].f<n[f].f?c++:f++],a=n[c!=u&&n[c].f<n[f].f?c++:f++],n[u++]={s:-1,f:s.f+a.f,l:s,r:a};let o=i[0].s;for(let h=1;h<r;++h)i[h].s>o&&(o=i[h].s);let p=new W(o+1),m=Tt(n[u-1],p,0);if(m>t){let h=0,y=0,d=m-t,z=1<<d;for(i.sort((g,A)=>p[A.s]-p[g.s]||g.f-A.f);h<r;++h){let g=i[h].s;if(p[g]>t)y+=z-(1<<m-p[g]),p[g]=t;else break}for(y>>=d;y>0;){let g=i[h].s;p[g]<t?y-=1<<t-p[g]++-1:++h}for(;h>=0&&y;--h){let g=i[h].s;p[g]==t&&(--p[g],++y)}m=t}return{t:new w(p),l:m}},"hTree"),Tt=l((e,t,n)=>e.s==-1?Math.max(Tt(e.l,t,n+1),Tt(e.r,t,n+1)):t[e.s]=n,"ln"),jt=l(e=>{let t=e.length;for(;t&&!e[--t];);let n=new W(++t),r=0,i=e[0],s=1,a=l(c=>{n[r++]=c},"w");for(let c=1;c<=t;++c)if(e[c]==i&&c!=t)++s;else{if(!i&&s>2){for(;s>138;s-=138)a(32754);s>2&&(a(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(a(i),--s;s>6;s-=6)a(8304);s>2&&(a(s-3<<5|8208),s=0)}for(;s--;)a(i);s=1,i=e[c]}return{c:n.subarray(0,r),n:t}},"lc"),ot=l((e,t)=>{let n=0;for(let r=0;r<t.length;++r)n+=e[r]*t[r];return n},"clen"),ne=l((e,t,n)=>{let r=n.length,i=ht(t+2);e[i]=r&255,e[i+1]=r>>8,e[i+2]=e[i]^255,e[i+3]=e[i+1]^255;for(let s=0;s<r;++s)e[i+s+4]=n[s];return(i+4+r)*8},"wfblk"),Vt=l((e,t,n,r,i,s,a,c,u,f,o)=>{K(t,o++,n),++i[256];let{t:p,l:m}=Zt(i,15),{t:h,l:y}=Zt(s,15),{c:d,n:z}=jt(p),{c:g,n:A}=jt(h),O=new W(19);for(let I=0;I<d.length;++I)++O[d[I]&31];for(let I=0;I<g.length;++I)++O[g[I]&31];let{t:S,l:x}=Zt(O,7),U=19;for(;U>4&&!S[gt[U-1]];--U);let v=f+5<<3,Z=ot(i,Q)+ot(s,lt)+a,F=ot(i,p)+ot(s,h)+a+14+3*U+ot(O,S)+2*O[16]+3*O[17]+7*O[18];if(u>=0&&v<=Z&&v<=F)return ne(t,o,e.subarray(u,u+f));let H,T,D,M;if(K(t,o,1+(F<Z)),o+=2,F<Z){H=V(p,m,0),T=p,D=V(h,y,0),M=h;let I=V(S,x,0);K(t,o,z-257),K(t,o+5,A-1),K(t,o+10,U-4),o+=14;for(let C=0;C<U;++C)K(t,o+3*C,S[gt[C]]);o+=3*U;let E=[d,g];for(let C=0;C<2;++C){let B=E[C];for(let _=0;_<B.length;++_){let X=B[_]&31;K(t,o,I[X]),o+=S[X],X>15&&(K(t,o,B[_]>>5&127),o+=B[_]>>12)}}}else H=Ie,T=Q,D=De,M=lt;for(let I=0;I<c;++I){let E=r[I];if(E>255){let C=E>>18&31;at(t,o,H[C+257]),o+=T[C+257],C>7&&(K(t,o,E>>23&31),o+=ft[C]);let B=E&31;at(t,o,D[B]),o+=M[B],B>3&&(at(t,o,E>>5&8191),o+=ut[B])}else at(t,o,H[E]),o+=T[E]}return at(t,o,H[256]),o+T[256]},"wblk"),Ge=new zt([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),tt=new w(0),Ee=l((e,t,n,r,i,s)=>{let a=s.z||e.length,c=new w(r+a+5*(1+Math.ceil(a/7e3))+i),u=c.subarray(r,c.length-i),f=s.l,o=(s.r||0)&7;if(t){o&&(u[0]=s.r>>3);let p=Ge[t-1],m=p>>13,h=p&8191,y=(1<<n)-1,d=s.p||new W(32768),z=s.h||new W(y+1),g=Math.ceil(n/3),A=2*g,O=l(M=>(e[M]^e[M+1]<<g^e[M+2]<<A)&y,"hsh"),S=new zt(25e3),x=new W(288),U=new W(32),v=0,Z=0,F=s.i||0,H=0,T=s.w||0,D=0;for(;F+2<a;++F){let M=O(F),I=F&32767,E=z[M];if(d[I]=E,z[M]=I,T<=F){let C=a-F;if((v>7e3||H>24576)&&(C>423||!f)){o=Vt(e,u,0,S,x,U,Z,H,D,F-D,o),H=v=Z=0,D=F;for(let P=0;P<286;++P)x[P]=0;for(let P=0;P<30;++P)U[P]=0}let B=2,_=0,X=h,N=I-E&32767;if(C>2&&M==O(F-N)){let P=Math.min(m,C)-1,kt=Math.min(32767,F),$e=Math.min(258,C);for(;N<=kt&&--X&&I!=E;){if(e[F+B]==e[F+B-N]){let $=0;for(;$<$e&&e[F+$]==e[F+$-N];++$);if($>B){if(B=$,_=N,$>P)break;let tn=Math.min(N,$-2),fe=0;for(let Wt=0;Wt<tn;++Wt){let Nt=F-N+Wt&32767,en=d[Nt],ue=Nt-en&32767;ue>fe&&(fe=ue,E=Nt)}}}I=E,E=d[I],N+=I-E&32767}}if(_){S[H++]=268435456|Dt[B]<<18|Pt[_];let P=Dt[B]&31,kt=Pt[_]&31;Z+=ft[P]+ut[kt],++x[257+P],++U[kt],T=F+B,++v}else S[H++]=e[F],++x[e[F]]}}for(F=Math.max(F,T);F<a;++F)S[H++]=e[F],++x[e[F]];o=Vt(e,u,f,S,x,U,Z,H,D,F-D,o),f||(s.r=o&7|u[o/8|0]<<3,o-=7,s.h=z,s.p=d,s.i=F,s.w=T)}else{for(let p=s.w||0;p<a+f;p+=65535){let m=p+65535;m>=a&&(u[o/8|0]=f,m=a),o=ne(u,o+1,e.subarray(p,m))}s.i=a}return Y(c,0,r+ht(o)+i)},"dflt"),Be=(()=>{let e=new Int32Array(256);for(let t=0;t<256;++t){let n=t,r=9;for(;--r;)n=(n&1&&-306674912)^n>>>1;e[t]=n}return e})(),mt=l(()=>{let e=-1;return{p(t){let n=e;for(let r=0;r<t.length;++r)n=Be[n&255^t[r]]^n>>>8;e=n},d(){return~e}}},"crc"),Rt=l(()=>{let e=1,t=0;return{p(n){let r=e,i=t,s=n.length|0;for(let a=0;a!=s;){let c=Math.min(a+2655,s);for(;a<c;++a)i+=r+=n[a];r=(r&65535)+15*(r>>16),i=(i&65535)+15*(i>>16)}e=r,t=i},d(){return e%=65521,t%=65521,(e&255)<<24|(e&65280)<<8|(t&255)<<8|t>>8}}},"adler"),it=l((e,t,n,r,i)=>{if(!i&&(i={l:1},t.dictionary)){let s=t.dictionary.subarray(-32768),a=new w(s.length+e.length);a.set(s),a.set(e,s.length),e=a,i.w=s.length}return Ee(e,t.level==null?6:t.level,t.mem==null?i.l?Math.ceil(Math.max(8,Math.min(13,Math.log(e.length)))*1.5):20:12+t.mem,n,r,i)},"dopt"),St=l((e,t)=>{let n={};for(let r in e)n[r]=e[r];for(let r in t)n[r]=t[r];return n},"mrg"),me=l((e,t,n)=>{let r=e(),i=e.toString(),s=i.slice(i.indexOf("[")+1,i.lastIndexOf("]")).replace(/\s+/g,"").split(",");for(let a=0;a<r.length;++a){let c=r[a],u=s[a];if(typeof c=="function"){t+=";"+u+"=";let f=c.toString();if(c.prototype)if(f.indexOf("[native code]")!=-1){let o=f.indexOf(" ",8)+1;t+=f.slice(o,f.indexOf("(",o))}else{t+=f;for(let o in c.prototype)t+=";"+u+".prototype."+o+"="+c.prototype[o].toString()}else t+=f}else n[u]=c}return t},"wcln"),Ht=[],an=l(e=>{let t=[];for(let n in e)e[n].buffer&&t.push((e[n]=new e[n].constructor(e[n])).buffer);return t},"cbfs"),_e=l((e,t,n,r)=>{if(!Ht[n]){let s="",a={},c=e.length-1;for(let u=0;u<c;++u)s=me(e[u],s,a);Ht[n]={c:me(e[c],s,a),e:a}}let i=St({},Ht[n].e);return he(Ht[n].c+";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage="+t.toString()+"}",n,i,an(i),r)},"wrkr"),yt=l(()=>[w,W,zt,ft,ut,gt,ee,Ce,Ze,Te,Ut,Me,V,Ct,j,It,ht,Y,b,wt,Ot,nt,re],"bInflt"),bt=l(()=>[w,W,zt,ft,ut,gt,Dt,Pt,Ie,Q,De,lt,Ut,Ge,tt,V,K,at,Zt,Tt,jt,ot,ne,Vt,ht,Y,Ee,it,qt,nt],"bDflt"),Re=l(()=>[ie,ae,k,mt,Be],"gze"),qe=l(()=>[se,Le],"guze"),We=l(()=>[oe,k,Rt],"zle"),Ne=l(()=>[le],"zule"),nt=l(e=>postMessage(e,[e.buffer]),"pbf"),re=l(e=>e&&{out:e.size&&new w(e.size),dictionary:e.dictionary},"gopt"),dt=l((e,t,n,r,i,s)=>{let a=_e(n,r,i,(c,u)=>{a.terminate(),s(c,u)});return a.postMessage([e,t],t.consume?[e.buffer]:[]),()=>{a.terminate()}},"cbify"),J=l(e=>(e.ondata=(t,n)=>postMessage([t,n],[t.buffer]),t=>{t.data.length?(e.push(t.data[0],t.data[1]),postMessage([t.data[0].length])):e.flush()}),"astrm"),At=l((e,t,n,r,i,s,a)=>{let c,u=_e(e,r,i,(f,o)=>{f?(u.terminate(),t.ondata.call(t,f)):Array.isArray(o)?o.length==1?(t.queuedSize-=o[0],t.ondrain&&t.ondrain(o[0])):(o[1]&&u.terminate(),t.ondata.call(t,f,o[0],o[1])):a(o)});u.postMessage(n),t.queuedSize=0,t.push=(f,o)=>{t.ondata||b(5),c&&t.ondata(b(4,0,1),null,!!o),t.queuedSize+=f.length,u.postMessage([f,c=o],[f.buffer])},t.terminate=()=>{u.terminate()},s&&(t.flush=()=>{u.postMessage([])})},"astrmify"),q=l((e,t)=>e[t]|e[t+1]<<8,"b2"),G=l((e,t)=>(e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0,"b4"),Lt=l((e,t)=>G(e,t)+G(e,t+4)*4294967296,"b8"),k=l((e,t,n)=>{for(;n;++t)e[t]=n,n>>>=8},"wbytes"),ie=l((e,t)=>{let n=t.filename;if(e[0]=31,e[1]=139,e[2]=8,e[8]=t.level<2?4:t.level==9?2:0,e[9]=3,t.mtime!=0&&k(e,4,Math.floor(new Date(t.mtime||Date.now())/1e3)),n){e[3]=8;for(let r=0;r<=n.length;++r)e[r+10]=n.charCodeAt(r)}},"gzh"),se=l(e=>{(e[0]!=31||e[1]!=139||e[2]!=8)&&b(6,"invalid gzip data");let t=e[3],n=10;t&4&&(n+=(e[10]|e[11]<<8)+2);for(let r=(t>>3&1)+(t>>4&1);r>0;r-=!e[n++]);return n+(t&2)},"gzs"),Le=l(e=>{let t=e.length;return(e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24)>>>0},"gzl"),ae=l(e=>10+(e.filename?e.filename.length+1:0),"gzhl"),oe=l((e,t)=>{let n=t.level,r=n==0?0:n<6?1:n==9?3:2;if(e[0]=120,e[1]=r<<6|(t.dictionary&&32),e[1]|=31-(e[0]<<8|e[1])%31,t.dictionary){let i=Rt();i.p(t.dictionary),k(e,2,i.d())}},"zlh"),le=l((e,t)=>(((e[0]&15)!=8||e[0]>>4>7||(e[0]<<8|e[1])%31)&&b(6,"invalid zlib data"),(e[1]>>5&1)==+!t&&b(6,"invalid zlib data: "+(e[1]&32?"need":"unexpected")+" dictionary"),(e[1]>>3&4)+2),"zls");function st(e,t){return typeof e=="function"&&(t=e,e={}),this.ondata=t,e}l(st,"StrmOpt");var L=class{static{l(this,"Deflate")}constructor(t,n){if(typeof t=="function"&&(n=t,t={}),this.ondata=n,this.o=t||{},this.s={l:0,i:32768,w:32768,z:32768},this.b=new w(98304),this.o.dictionary){let r=this.o.dictionary.subarray(-32768);this.b.set(r,32768-r.length),this.s.i=32768-r.length}}b;s;o;ondata;p(t,n){this.ondata(it(t,this.o,0,0,this.s),n)}push(t,n){this.ondata||b(5),this.s.l&&b(4);let r=t.length+this.s.z;if(r>this.b.length){if(r>2*this.b.length-32768){let s=new w(r&-32768);s.set(this.b.subarray(0,this.s.z)),this.b=s}let i=this.b.length-this.s.z;this.b.set(t.subarray(0,i),this.s.z),this.s.z=this.b.length,this.p(this.b,!1),this.b.set(this.b.subarray(-32768)),this.b.set(t.subarray(i),32768),this.s.z=t.length-i+32768,this.s.i=32766,this.s.w=32768}else this.b.set(t,this.s.z),this.s.z+=t.length;this.s.l=n&1,(this.s.z>this.s.w+8191||n)&&(this.p(this.b,n||!1),this.s.w=this.s.i,this.s.i-=2)}flush(){this.ondata||b(5),this.s.l&&b(4),this.p(this.b,!1),this.s.w=this.s.i,this.s.i-=2}},Yt=class{static{l(this,"AsyncDeflate")}ondata;ondrain;queuedSize;constructor(t,n){At([bt,()=>[J,L]],this,st.call(this,t,n),r=>{let i=new L(r.data);onmessage=J(i)},6,1)}terminate};function on(e,t,n){return n||(n=t,t={}),typeof n!="function"&&b(7),dt(e,t,[bt],r=>nt(qt(r.data[0],r.data[1])),0,n)}l(on,"deflate");function qt(e,t){return it(e,t||{},0,0)}l(qt,"deflateSync");var R=class{static{l(this,"Inflate")}s;o;p;d;ondata;constructor(t,n){typeof t=="function"&&(n=t,t={}),this.ondata=n;let r=t&&t.dictionary&&t.dictionary.subarray(-32768);this.s={i:0,b:r?r.length:0},this.o=new w(32768),this.p=new w(0),r&&this.o.set(r)}e(t){if(this.ondata||b(5),this.d&&b(4),!this.p.length)this.p=t;else if(t.length){let n=new w(this.p.length+t.length);n.set(this.p),n.set(t,this.p.length),this.p=n}}c(t){this.s.i=+(this.d=t||!1);let n=this.s.b,r=wt(this.p,this.s,this.o);this.ondata(Y(r,n,this.s.b),this.d),this.o=Y(r,this.s.b-32768),this.s.b=this.o.length,this.p=Y(this.p,this.s.p/8|0),this.s.p&=7}push(t,n){this.e(t),this.c(n)}},Mt=class{static{l(this,"AsyncInflate")}ondata;ondrain;queuedSize;constructor(t,n){At([yt,()=>[J,R]],this,st.call(this,t,n),r=>{let i=new R(r.data);onmessage=J(i)},7,0)}terminate};function Pe(e,t,n){return n||(n=t,t={}),typeof n!="function"&&b(7),dt(e,t,[yt],r=>nt(Ot(r.data[0],re(r.data[1]))),1,n)}l(Pe,"inflate");function Ot(e,t){return wt(e,{i:2},t&&t.out,t&&t.dictionary)}l(Ot,"inflateSync");var Gt=class{static{l(this,"Gzip")}c=mt();l=0;v=1;o;s;ondata;constructor(t,n){L.call(this,t,n)}push(t,n){this.c.p(t),this.l+=t.length,L.prototype.push.call(this,t,n)}p(t,n){let r=it(t,this.o,this.v&&ae(this.o),n&&8,this.s);this.v&&(ie(r,this.o),this.v=0),n&&(k(r,r.length-8,this.c.d()),k(r,r.length-4,this.l)),this.ondata(r,n)}flush(){L.prototype.flush.call(this)}},ye=class{static{l(this,"AsyncGzip")}ondata;ondrain;queuedSize;constructor(t,n){At([bt,Re,()=>[J,L,Gt]],this,st.call(this,t,n),r=>{let i=new Gt(r.data);onmessage=J(i)},8,1)}terminate};function yn(e,t,n){return n||(n=t,t={}),typeof n!="function"&&b(7),dt(e,t,[bt,Re,()=>[be]],r=>nt(be(r.data[0],r.data[1])),2,n)}l(yn,"gzip");function be(e,t){t||(t={});let n=mt(),r=e.length;n.p(e);let i=it(e,t,ae(t),8),s=i.length;return ie(i,t),k(i,s-8,n.d()),k(i,s-4,r),i}l(be,"gzipSync");var Ft=class{static{l(this,"Gunzip")}v=1;r=0;o;p;s;ondata;onmember;constructor(t,n){R.call(this,t,n)}push(t,n){if(R.prototype.e.call(this,t),this.r+=t.length,this.v){let r=this.p.subarray(this.v-1),i=r.length>3?se(r):4;if(i>r.length){if(!n)return}else this.v>1&&this.onmember&&this.onmember(this.r-r.length);this.p=r.subarray(i),this.v=0}R.prototype.c.call(this,0),this.s.f&&!this.s.l?(this.v=ht(this.s.p)+9,this.s={i:0},this.o=new w(0),this.push(new w(0),n)):n&&R.prototype.c.call(this,n)}},Jt=class{static{l(this,"AsyncGunzip")}ondata;ondrain;queuedSize;onmember;constructor(t,n){At([yt,qe,()=>[J,R,Ft]],this,st.call(this,t,n),r=>{let i=new Ft(r.data);i.onmember=s=>postMessage(s),onmessage=J(i)},9,0,r=>this.onmember&&this.onmember(r))}terminate};function ln(e,t,n){return n||(n=t,t={}),typeof n!="function"&&b(7),dt(e,t,[yt,qe,()=>[Kt]],r=>nt(Kt(r.data[0],r.data[1])),3,n)}l(ln,"gunzip");function Kt(e,t){let n=se(e);return n+8>e.length&&b(6,"invalid gzip data"),wt(e.subarray(n,-8),{i:2},t&&t.out||new w(Le(e)),t&&t.dictionary)}l(Kt,"gunzipSync");var Et=class{static{l(this,"Zlib")}c=Rt();v=1;o;s;ondata;constructor(t,n){L.call(this,t,n)}push(t,n){this.c.p(t),L.prototype.push.call(this,t,n)}p(t,n){let r=it(t,this.o,this.v&&(this.o.dictionary?6:2),n&&4,this.s);this.v&&(oe(r,this.o),this.v=0),n&&k(r,r.length-4,this.c.d()),this.ondata(r,n)}flush(){L.prototype.flush.call(this)}},de=class{static{l(this,"AsyncZlib")}ondata;ondrain;queuedSize;constructor(t,n){At([bt,We,()=>[J,L,Et]],this,st.call(this,t,n),r=>{let i=new Et(r.data);onmessage=J(i)},10,1)}terminate};function bn(e,t,n){return n||(n=t,t={}),typeof n!="function"&&b(7),dt(e,t,[bt,We,()=>[Ae]],r=>nt(Ae(r.data[0],r.data[1])),4,n)}l(bn,"zlib");function Ae(e,t){t||(t={});let n=Rt();n.p(e);let r=it(e,t,t.dictionary?6:2,4);return oe(r,t),k(r,r.length-4,n.d()),r}l(Ae,"zlibSync");var xt=class{static{l(this,"Unzlib")}v;p;ondata;constructor(t,n){R.call(this,t,n),this.v=t&&t.dictionary?2:1}push(t,n){if(R.prototype.e.call(this,t),this.v){if(this.p.length<6&&!n)return;this.p=this.p.subarray(le(this.p,this.v-1)),this.v=0}n&&(this.p.length<4&&b(6,"invalid zlib data"),this.p=this.p.subarray(0,-4)),R.prototype.c.call(this,n)}},Qt=class{static{l(this,"AsyncUnzlib")}ondata;ondrain;queuedSize;constructor(t,n){At([yt,Ne,()=>[J,R,xt]],this,st.call(this,t,n),r=>{let i=new xt(r.data);onmessage=J(i)},11,0)}terminate};function cn(e,t,n){return n||(n=t,t={}),typeof n!="function"&&b(7),dt(e,t,[yt,Ne,()=>[Xt]],r=>nt(Xt(r.data[0],re(r.data[1]))),5,n)}l(cn,"unzlib");function Xt(e,t){return wt(e.subarray(le(e,t&&t.dictionary),-4),{i:2},t&&t.out,t&&t.dictionary)}l(Xt,"unzlibSync");var Bt=class{static{l(this,"Decompress")}G;I;Z;o;s;p;ondata;constructor(t,n){this.o=st.call(this,t,n)||{},this.G=Ft,this.I=R,this.Z=xt}i(){this.s.ondata=(t,n)=>{this.ondata(t,n)}}push(t,n){if(this.ondata||b(5),this.s)this.s.push(t,n);else{if(this.p&&this.p.length){let r=new w(this.p.length+t.length);r.set(this.p),r.set(t,this.p.length)}else this.p=t;this.p.length>2&&(this.s=this.p[0]==31&&this.p[1]==139&&this.p[2]==8?new this.G(this.o):(this.p[0]&15)!=8||this.p[0]>>4>7||(this.p[0]<<8|this.p[1])%31?new this.I(this.o):new this.Z(this.o),this.i(),this.s.push(this.p,n),this.p=null)}}},ge=class{static{l(this,"AsyncDecompress")}G;I;Z;ondata;ondrain;queuedSize;constructor(t,n){Bt.call(this,t,n),this.queuedSize=0,this.G=Jt,this.I=Mt,this.Z=Qt}i(){this.s.ondata=(t,n,r)=>{this.ondata(t,n,r)},this.s.ondrain=t=>{this.queuedSize-=t,this.ondrain&&this.ondrain(t)}}push(t,n){this.queuedSize+=t.length,Bt.prototype.push.call(this,t,n)}};function dn(e,t,n){return n||(n=t,t={}),typeof n!="function"&&b(7),e[0]==31&&e[1]==139&&e[2]==8?ln(e,t,n):(e[0]&15)!=8||e[0]>>4>7||(e[0]<<8|e[1])%31?Pe(e,t,n):cn(e,t,n)}l(dn,"decompress");function An(e,t){return e[0]==31&&e[1]==139&&e[2]==8?Kt(e,t):(e[0]&15)!=8||e[0]>>4>7||(e[0]<<8|e[1])%31?Ot(e,t):Xt(e,t)}l(An,"decompressSync");async function gn(e,t={hiddenFiles:!1}){let n=t?.hiddenFiles;return await Array.from(e).reduce(async(i,s)=>{let a=await i;return s.webkitRelativePath.split("/").pop()?.startsWith(".")&&!n||(a[s.webkitRelativePath]=new Uint8Array(await s.arrayBuffer())),a},Promise.resolve({}))}l(gn,"createZippable");var ce=l((e,t,n,r)=>{for(let i in e){let s=e[i],a=t+i,c=r;Array.isArray(s)&&(c=St(r,s[1]),s=s[0]),s instanceof w?n[a]=[s,c]:(n[a+="/"]=[new w(0),c],ce(s,a,n,r))}},"fltn"),Ue=typeof TextEncoder<"u"&&new TextEncoder,$t=typeof TextDecoder<"u"&&new TextDecoder,je=0;try{$t.decode(tt,{stream:!0}),je=1}catch{}var Ve=l(e=>{for(let t="",n=0;;){let r=e[n++],i=(r>127)+(r>223)+(r>239);if(n+i>e.length)return{s:t,r:Y(e,n-1)};i?i==3?(r=((r&15)<<18|(e[n++]&63)<<12|(e[n++]&63)<<6|e[n++]&63)-65536,t+=String.fromCharCode(55296|r>>10,56320|r&1023)):i&1?t+=String.fromCharCode((r&31)<<6|e[n++]&63):t+=String.fromCharCode((r&15)<<12|(e[n++]&63)<<6|e[n++]&63):t+=String.fromCharCode(r)}},"dutf8"),Fe=class{static{l(this,"DecodeUTF8")}p;t;constructor(t){this.ondata=t,je?this.t=new TextDecoder:this.p=tt}push(t,n){if(this.ondata||b(5),n=!!n,this.t){this.ondata(this.t.decode(t,{stream:!0}),n),n&&(this.t.decode().length&&b(8),this.t=null);return}this.p||b(4);let r=new w(this.p.length+t.length);r.set(this.p),r.set(t,this.p.length);let{s:i,r:s}=Ve(r);n?(s.length&&b(8),this.p=null):this.p=s,this.ondata(i,n)}ondata},xe=class{static{l(this,"EncodeUTF8")}d;constructor(t){this.ondata=t}push(t,n){this.ondata||b(5),this.d&&b(4),this.ondata(rt(t),this.d=n||!1)}ondata};function rt(e,t){if(t){let a=new w(e.length);for(let c=0;c<e.length;++c)a[c]=e.charCodeAt(c);return a}if(Ue)return Ue.encode(e);let n=e.length,r=new w(e.length+(e.length>>1)),i=0,s=l(a=>{r[i++]=a},"w");for(let a=0;a<n;++a){if(i+5>r.length){let u=new w(i+8+(n-a<<1));u.set(r),r=u}let c=e.charCodeAt(a);c<128||t?s(c):c<2048?(s(192|c>>6),s(128|c&63)):c>55295&&c<57344?(c=65536+(c&1047552)|e.charCodeAt(++a)&1023,s(240|c>>18),s(128|c>>12&63),s(128|c>>6&63),s(128|c&63)):(s(224|c>>12),s(128|c>>6&63),s(128|c&63))}return Y(r,0,i)}l(rt,"strToU8");function Ye(e,t){if(t){let n="";for(let r=0;r<e.length;r+=16384)n+=String.fromCharCode.apply(null,e.subarray(r,r+16384));return n}else{if($t)return $t.decode(e);{let{s:n,r}=Ve(e);return r.length&&b(8),n}}}l(Ye,"strFromU8");var Je=l(e=>e==1?3:e<6?2:e==9?1:0,"dbf"),Ke=l((e,t)=>t+30+q(e,t+26)+q(e,t+28),"slzh"),Qe=l((e,t,n)=>{let r=q(e,t+28),i=Ye(e.subarray(t+46,t+46+r),!(q(e,t+8)&2048)),s=t+46+r,a=G(e,t+20),[c,u,f]=n&&a==4294967295?Xe(e,s):[a,G(e,t+24),G(e,t+42)];return[q(e,t+10),c,u,i,s+q(e,t+30)+q(e,t+32),f]},"zh"),Xe=l((e,t)=>{for(;q(e,t)!=1;t+=4+q(e,t+2));return[Lt(e,t+12),Lt(e,t+4),Lt(e,t+20)]},"z64e"),et=l(e=>{let t=0;if(e)for(let n in e){let r=e[n].length;r>65535&&b(9),t+=r+4}return t},"exfl"),ct=l((e,t,n,r,i,s,a,c)=>{let u=r.length,f=n.extra,o=c&&c.length,p=et(f);k(e,t,a!=null?33639248:67324752),t+=4,a!=null&&(e[t++]=20,e[t++]=n.os),e[t]=20,t+=2,e[t++]=n.flag<<1|(s<0&&8),e[t++]=i&&8,e[t++]=n.compression&255,e[t++]=n.compression>>8;let m=new Date(n.mtime==null?Date.now():n.mtime),h=m.getFullYear()-1980;if((h<0||h>119)&&b(10),k(e,t,h<<25|m.getMonth()+1<<21|m.getDate()<<16|m.getHours()<<11|m.getMinutes()<<5|m.getSeconds()>>1),t+=4,s!=-1&&(k(e,t,n.crc),k(e,t+4,s<0?-s-2:s),k(e,t+8,n.size)),k(e,t+12,u),k(e,t+14,p),t+=16,a!=null&&(k(e,t,o),k(e,t+6,n.attrs),k(e,t+10,a),t+=14),e.set(r,t),t+=u,p)for(let y in f){let d=f[y],z=d.length;k(e,t,+y),k(e,t+2,z),e.set(d,t+4),t+=4+z}return o&&(e.set(c,t),t+=o),t},"wzh"),pe=l((e,t,n,r,i)=>{k(e,t,101010256),k(e,t+8,n),k(e,t+10,n),k(e,t+12,r),k(e,t+16,i)},"wzf"),pt=class{static{l(this,"ZipPassThrough")}filename;crc;size;compression;os;attrs;comment;extra;mtime;ondata;c;constructor(t){this.filename=t,this.c=mt(),this.size=0,this.compression=0}process(t,n){this.ondata(null,t,n)}push(t,n){this.ondata||b(5),this.c.p(t),this.size+=t.length,n&&(this.crc=this.c.d()),this.process(t,n||!1)}},ze=class{static{l(this,"ZipDeflate")}filename;crc;size;compression;flag;os;attrs;comment;extra;mtime;ondata;d;constructor(t,n){n||(n={}),pt.call(this,t),this.d=new L(n,(r,i)=>{this.ondata(null,r,i)}),this.compression=8,this.flag=Je(n.level)}process(t,n){try{this.d.push(t,n)}catch(r){this.ondata(r,null,n)}}push(t,n){pt.prototype.push.call(this,t,n)}},we=class{static{l(this,"AsyncZipDeflate")}filename;crc;size;compression;flag;os;attrs;comment;extra;mtime;ondata;d;terminate;constructor(t,n){n||(n={}),pt.call(this,t),this.d=new Yt(n,(r,i,s)=>{this.ondata(r,i,s)}),this.compression=8,this.flag=Je(n.level),this.terminate=this.d.terminate}process(t,n){this.d.push(t,n)}push(t,n){pt.prototype.push.call(this,t,n)}},Se=class{static{l(this,"Zip")}u;d;constructor(t){this.ondata=t,this.u=[],this.d=1}add(t){if(this.ondata||b(5),this.d&2)this.ondata(b(4+(this.d&1)*8,0,1),null,!1);else{let n=rt(t.filename),r=n.length,i=t.comment,s=i&&rt(i),a=r!=t.filename.length||s&&i.length!=s.length,c=r+et(t.extra)+30;r>65535&&this.ondata(b(11,0,1),null,!1);let u=new w(c);ct(u,0,t,n,a,-1);let f=[u],o=l(()=>{for(let d of f)this.ondata(null,d,!1);f=[]},"pAll"),p=this.d;this.d=0;let m=this.u.length,h=St(t,{f:n,u:a,o:s,t:l(()=>{t.terminate&&t.terminate()},"t"),r:l(()=>{if(o(),p){let d=this.u[m+1];d?d.r():this.d=1}p=1},"r")}),y=0;t.ondata=(d,z,g)=>{if(d)this.ondata(d,z,g),this.terminate();else if(y+=z.length,f.push(z),g){let A=new w(16);k(A,0,134695760),k(A,4,t.crc),k(A,8,y),k(A,12,t.size),f.push(A),h.c=y,h.b=c+y+16,h.crc=t.crc,h.size=t.size,p&&h.r(),p=1}else p&&o()},this.u.push(h)}}end(){if(this.d&2){this.ondata(b(4+(this.d&1)*8,0,1),null,!0);return}this.d?this.e():this.u.push({r:l(()=>{this.d&1&&(this.u.splice(-1,1),this.e())},"r"),t:l(()=>{},"t")}),this.d=3}e(){let t=0,n=0,r=0;for(let s of this.u)r+=46+s.f.length+et(s.extra)+(s.o?s.o.length:0);let i=new w(r+22);for(let s of this.u)ct(i,t,s,s.f,s.u,-s.c-2,n,s.o),t+=46+s.f.length+et(s.extra)+(s.o?s.o.length:0),n+=s.b;pe(i,t,this.u.length,r,n),this.ondata(null,i,!0),this.d=2}terminate(){for(let t of this.u)t.t();this.d=2}ondata};function Un(e,t,n){n||(n=t,t={}),typeof n!="function"&&b(7);let r={};ce(e,"",r,t);let i=Object.keys(r),s=i.length,a=0,c=0,u=s,f=new Array(s),o=[],p=l(()=>{for(let y=0;y<o.length;++y)o[y]()},"tAll"),m=l((y,d)=>{_t(()=>{n(y,d)})},"cbd");_t(()=>{m=n});let h=l(()=>{let y=new w(c+22),d=a,z=c-a;c=0;for(let g=0;g<u;++g){let A=f[g];try{let O=A.c.length;ct(y,c,A,A.f,A.u,O);let S=30+A.f.length+et(A.extra),x=c+S;y.set(A.c,x),ct(y,a,A,A.f,A.u,O,c,A.m),a+=16+S+(A.m?A.m.length:0),c=x+O}catch(O){return m(O,null)}}pe(y,a,f.length,z,d),m(null,y)},"cbf");s||h();for(let y=0;y<u;++y){let d=i[y],[z,g]=r[d],A=mt(),O=z.length;A.p(z);let S=rt(d),x=S.length,U=g.comment,v=U&&rt(U),Z=v&&v.length,F=et(g.extra),H=g.level==0?0:8,T=l((D,M)=>{if(D)p(),m(D,null);else{let I=M.length;f[y]=St(g,{size:O,crc:A.d(),c:M,f:S,m:v,u:x!=d.length||v&&U.length!=Z,compression:H}),a+=30+x+F+I,c+=76+2*(x+F)+(Z||0)+I,--s||h()}},"cbl");if(x>65535&&T(b(11,0,1),null),!H)T(null,z);else if(O<16e4)try{T(null,qt(z,g))}catch(D){T(D,null)}else o.push(on(z,g,T))}return p}l(Un,"zip");function Fn(e,t){t||(t={});let n={},r=[];ce(e,"",n,t);let i=0,s=0;for(let f in n){let[o,p]=n[f],m=p.level==0?0:8,h=rt(f),y=h.length,d=p.comment,z=d&&rt(d),g=z&&z.length,A=et(p.extra);y>65535&&b(11);let O=m?qt(o,p):o,S=O.length,x=mt();x.p(o),r.push(St(p,{size:o.length,crc:x.d(),c:O,f:h,m:z,u:y!=f.length||z&&d.length!=g,o:i,compression:m})),i+=30+y+A+S,s+=76+2*(y+A)+(g||0)+S}let a=new w(s+22),c=i,u=s-i;for(let f=0;f<r.length;++f){let o=r[f];ct(a,o.o,o,o.f,o.u,o.c.length);let p=30+o.f.length+et(o.extra);a.set(o.c,o.o+p),ct(a,i,o,o.f,o.u,o.c.length,o.o,o.m),i+=16+p+(o.m?o.m.length:0)}return pe(a,i,r.length,u,c),a}l(Fn,"zipSync");var te=class{static{l(this,"UnzipPassThrough")}static compression=0;ondata;push(t,n){this.ondata(null,t,n)}},Oe=class{static{l(this,"UnzipInflate")}static compression=8;i;ondata;constructor(){this.i=new R((t,n)=>{this.ondata(null,t,n)})}push(t,n){try{this.i.push(t,n)}catch(r){this.ondata(r,null,n)}}},ke=class{static{l(this,"AsyncUnzipInflate")}static compression=8;i;ondata;terminate;constructor(t,n){n<32e4?this.i=new R((r,i)=>{this.ondata(null,r,i)}):(this.i=new Mt((r,i,s)=>{this.ondata(r,i,s)}),this.terminate=this.i.terminate)}push(t,n){this.i.terminate&&(t=Y(t,0)),this.i.push(t,n)}},ve=class{static{l(this,"Unzip")}d;c;p;k;o;constructor(t){this.onfile=t,this.k=[],this.o={0:te},this.p=tt}push(t,n){if(this.onfile||b(5),this.p||b(4),this.c>0){let r=Math.min(this.c,t.length),i=t.subarray(0,r);if(this.c-=r,this.d?this.d.push(i,!this.c):this.k[0].push(i),t=t.subarray(r),t.length)return this.push(t,n)}else{let r=0,i=0,s,a;this.p.length?t.length?(a=new w(this.p.length+t.length),a.set(this.p),a.set(t,this.p.length)):a=this.p:a=t;let c=a.length,u=this.c,f=u&&this.d;for(;i<c-4;++i){let o=G(a,i);if(o==67324752){r=1,s=i,this.d=null,this.c=0;let p=q(a,i+6),m=q(a,i+8),h=p&2048,y=p&8,d=q(a,i+26),z=q(a,i+28);if(c>i+30+d+z){let g=[];this.k.unshift(g),r=2;let A=G(a,i+18),O=G(a,i+22),S=Ye(a.subarray(i+30,i+=30+d),!h);A==4294967295?[A,O]=y?[-2]:Xe(a,i):y&&(A=-1),i+=z,this.c=A;let x,U={name:S,compression:m,start:l(()=>{if(U.ondata||b(5),!A)U.ondata(null,tt,!0);else{let v=this.o[m];v||U.ondata(b(14,"unknown compression type "+m,1),null,!1),x=A<0?new v(S):new v(S,A,O),x.ondata=(Z,F,H)=>{U.ondata(Z,F,H)};for(let Z of g)x.push(Z,!1);this.k[0]==g&&this.c?this.d=x:x.push(tt,!0)}},"start"),terminate:l(()=>{x&&x.terminate&&x.terminate()},"terminate")};A>=0&&(U.size=A,U.originalSize=O),this.onfile(U)}break}else if(u){if(o==134695760){s=i+=12+(u==-2&&8),r=3,this.c=0;break}else if(o==33639248){s=i-=4,r=3,this.c=0;break}}}if(this.p=tt,u<0){let o=r?a.subarray(0,s-12-(u==-2&&8)-(G(a,s-16)==134695760&&4)):a.subarray(0,i);f?f.push(o,!!r):this.k[+(r==2)].push(o)}if(r&2)return this.push(a.subarray(i),n);this.p=a.subarray(i)}n&&(this.c&&b(13),this.p=null)}register(t){this.o[t.compression]=t}onfile},_t=typeof queueMicrotask=="function"?queueMicrotask:typeof setTimeout=="function"?setTimeout:e=>{e()};function xn(e,t,n){n||(n=t,t={}),typeof n!="function"&&b(7);let r=[],i=l(()=>{for(let f=0;f<r.length;++f)r[f]()},"tAll"),s={},a=l((f,o)=>{_t(()=>{n(f,o)})},"cbd");_t(()=>{a=n});let c=e.length-22;for(;G(e,c)!=101010256;--c)if(!c||e.length-c>65558)return a(b(13,0,1),null),i;let u=q(e,c+8);if(u){let f=u,o=G(e,c+16),p=o==4294967295||f==65535;if(p){let h=G(e,c-12);p=G(e,h)==101075792,p&&(f=u=G(e,h+32),o=G(e,h+48))}let m=t&&t.filter;for(let h=0;h<f;++h){let[y,d,z,g,A,O]=Qe(e,o,p),S=Ke(e,O);o=A;let x=l((U,v)=>{U?(i(),a(U,null)):(v&&(s[g]=v),--u||a(null,s))},"cbl");if(!m||m({name:g,size:d,originalSize:z,compression:y}))if(!y)x(null,Y(e,S,S+d));else if(y==8){let U=e.subarray(S,S+d);if(z<524288||d>.8*z)try{x(null,Ot(U,{out:new w(z)}))}catch(v){x(v,null)}else r.push(Pe(U,{size:z},x))}else x(b(14,"unknown compression type "+y,1),null);else x(null,null)}}else a(null,{});return i}l(xn,"unzip");function zn(e,t){let n={},r=e.length-22;for(;G(e,r)!=101010256;--r)(!r||e.length-r>65558)&&b(13);let i=q(e,r+8);if(!i)return{};let s=G(e,r+16),a=s==4294967295||i==65535;if(a){let u=G(e,r-12);a=G(e,u)==101075792,a&&(i=G(e,u+32),s=G(e,u+48))}let c=t&&t.filter;for(let u=0;u<i;++u){let[f,o,p,m,h,y]=Qe(e,s,a),d=Ke(e,y);s=h,(!c||c({name:m,size:o,originalSize:p,compression:f}))&&(f?f==8?n[m]=Ot(e.subarray(d,d+o),{out:new w(p)}):b(14,"unknown compression type "+f):n[m]=Y(e,d,d+o))}return n}l(zn,"unzipSync");export{ye as AsyncCompress,ge as AsyncDecompress,Yt as AsyncDeflate,Jt as AsyncGunzip,ye as AsyncGzip,Mt as AsyncInflate,ke as AsyncUnzipInflate,Qt as AsyncUnzlib,we as AsyncZipDeflate,de as AsyncZlib,Gt as Compress,Fe as DecodeUTF8,Bt as Decompress,L as Deflate,xe as EncodeUTF8,mn as FlateErrorCode,Ft as Gunzip,Gt as Gzip,R as Inflate,ve as Unzip,Oe as UnzipInflate,te as UnzipPassThrough,xt as Unzlib,Se as Zip,ze as ZipDeflate,pt as ZipPassThrough,Et as Zlib,yn as compress,be as compressSync,gn as createZippable,dn as decompress,An as decompressSync,on as deflate,qt as deflateSync,ln as gunzip,Kt as gunzipSync,yn as gzip,be as gzipSync,Pe as inflate,Ot as inflateSync,Ye as strFromU8,rt as strToU8,xn as unzip,zn as unzipSync,cn as unzlib,Xt as unzlibSync,Un as zip,Fn as zipSync,bn as zlib,Ae as zlibSync};
//# sourceMappingURL=index.min.js.map