diff --git a/demos/lib/zip-fs-full.js b/demos/lib/zip-fs-full.js index b9e26d08..4a91a8f7 100644 --- a/demos/lib/zip-fs-full.js +++ b/demos/lib/zip-fs-full.js @@ -8633,35 +8633,43 @@ const { preventHeadRequest, useRangeHeader, - forceRangeRequests + forceRangeRequests, + combineSizeEocd } = options; options = Object.assign({}, options); delete options.preventHeadRequest; delete options.useRangeHeader; delete options.forceRangeRequests; + delete options.combineSizeEocd; delete options.useXHR; Object.assign(httpReader, { url, options, preventHeadRequest, useRangeHeader, - forceRangeRequests + forceRangeRequests, + combineSizeEocd }); } async function initHttpReader(httpReader, sendRequest, getRequestData) { const { url, + preventHeadRequest, useRangeHeader, - forceRangeRequests + forceRangeRequests, + combineSizeEocd } = httpReader; - if (isHttpFamily(url) && (useRangeHeader || forceRangeRequests)) { - const { headers } = await sendRequest(HTTP_METHOD_GET, httpReader, getRangeHeaders(httpReader)); - if (!forceRangeRequests && headers.get(HTTP_HEADER_ACCEPT_RANGES) != HTTP_RANGE_UNIT) { + if (isHttpFamily(url) && (useRangeHeader || forceRangeRequests) && (typeof preventHeadRequest == "undefined" || preventHeadRequest)) { + const response = await sendRequest(HTTP_METHOD_GET, httpReader, getRangeHeaders(httpReader, combineSizeEocd ? -END_OF_CENTRAL_DIR_LENGTH : undefined)); + if (!forceRangeRequests && response.headers.get(HTTP_HEADER_ACCEPT_RANGES) != HTTP_RANGE_UNIT) { throw new Error(ERR_HTTP_RANGE); } else { + if (combineSizeEocd) { + httpReader.eocdCache = new Uint8Array(await response.arrayBuffer()); + } let contentSize; - const contentRangeHeader = headers.get(HTTP_HEADER_CONTENT_RANGE); + const contentRangeHeader = response.headers.get(HTTP_HEADER_CONTENT_RANGE); if (contentRangeHeader) { const splitHeader = contentRangeHeader.trim().split(/\s*\/\s*/); if (splitHeader.length) { @@ -8686,9 +8694,14 @@ const { useRangeHeader, forceRangeRequests, + eocdCache, + size, options } = httpReader; if (useRangeHeader || forceRangeRequests) { + if (eocdCache && index == size - END_OF_CENTRAL_DIR_LENGTH && length == END_OF_CENTRAL_DIR_LENGTH) { + return eocdCache; + } const response = await sendRequest(HTTP_METHOD_GET, httpReader, getRangeHeaders(httpReader, index, length)); if (response.status != 206) { throw new Error(ERR_HTTP_RANGE); @@ -8704,7 +8717,7 @@ } function getRangeHeaders(httpReader, index = 0, length = 1) { - return Object.assign({}, getHeaders(httpReader), { [HTTP_HEADER_RANGE]: HTTP_RANGE_UNIT + "=" + index + "-" + (index + length - 1) }); + return Object.assign({}, getHeaders(httpReader), { [HTTP_HEADER_RANGE]: HTTP_RANGE_UNIT + "=" + (index < 0 ? index : index + "-" + (index + length - 1)) }); } function getHeaders({ options }) { @@ -9399,9 +9412,10 @@ commentUTF8, rawExtraField: directoryArray.subarray(extraFieldOffset, commentOffset) }); + const decode = getOptionValue$1(zipReader, options, "decodeText") || decodeText; const [filename, comment] = await Promise.all([ - decodeText(rawFilename, filenameUTF8 ? CHARSET_UTF8 : filenameEncoding || CHARSET_CP437), - decodeText(rawComment, commentUTF8 ? CHARSET_UTF8 : commentEncoding || CHARSET_CP437) + decode(rawFilename, filenameUTF8 ? CHARSET_UTF8 : filenameEncoding || CHARSET_CP437), + decode(rawComment, commentUTF8 ? CHARSET_UTF8 : commentEncoding || CHARSET_CP437) ]); Object.assign(fileEntry, { rawComment, @@ -10005,12 +10019,13 @@ } else { options.directory = name.endsWith(DIRECTORY_SIGNATURE); } - const rawFilename = encodeText(name); + const encode = getOptionValue(zipWriter, options, "encodeText", encodeText); + const rawFilename = encode(name); if (getLength(rawFilename) > MAX_16_BITS) { throw new Error(ERR_INVALID_ENTRY_NAME); } const comment = options.comment || ""; - const rawComment = encodeText(comment); + const rawComment = encode(comment); if (getLength(rawComment) > MAX_16_BITS) { throw new Error(ERR_INVALID_ENTRY_COMMENT); } @@ -10113,7 +10128,7 @@ zip64DiskNumberStart, password, rawPassword, - level, + level: !useCompressionStream && zipWriter.config.CompressionStream === UNDEFINED_VALUE ? 0 : level, useWebWorkers, encryptionStrength, extendedTimestamp, diff --git a/demos/lib/zip-fs-full.min.js b/demos/lib/zip-fs-full.min.js index 53bb4a56..f9250f4e 100644 --- a/demos/lib/zip-fs-full.min.js +++ b/demos/lib/zip-fs-full.min.js @@ -1 +1 @@ -((e,t)=>{"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).zip={})})(this,(function(e){"use strict";const{Array:t,Object:n,String:r,Number:i,BigInt:s,Math:a,Date:o,Map:l,Set:c,Response:d,URL:f,Error:u,Uint8Array:p,Uint16Array:m,Uint32Array:h,DataView:w,Blob:x,Promise:g,TextEncoder:b,TextDecoder:v,document:y,crypto:_,btoa:k,TransformStream:z,ReadableStream:S,WritableStream:A,CompressionStream:D,DecompressionStream:C,navigator:R,Worker:W}="undefined"!=typeof globalThis?globalThis:this||self,E=-2;function F(e){return T(e.map((([e,n])=>new t(e).fill(n,0,e))))}function T(e){return e.reduce(((e,n)=>e.concat(t.isArray(n)?T(n):n)),[])}const q=[0,1,2,3].concat(...F([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function L(){const e=this;function t(e,t){let n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1}e.build_tree=n=>{const r=e.dyn_tree,i=e.stat_desc.static_tree,s=e.stat_desc.elems;let o,l,c,d=-1;for(n.heap_len=0,n.heap_max=573,o=0;s>o;o++)0!==r[2*o]?(n.heap[++n.heap_len]=d=o,n.depth[o]=0):r[2*o+1]=0;for(;2>n.heap_len;)c=n.heap[++n.heap_len]=2>d?++d:0,r[2*c]=1,n.depth[c]=0,n.opt_len--,i&&(n.static_len-=i[2*c+1]);for(e.max_code=d,o=a.floor(n.heap_len/2);o>=1;o--)n.pqdownheap(r,o);c=s;do{o=n.heap[1],n.heap[1]=n.heap[n.heap_len--],n.pqdownheap(r,1),l=n.heap[1],n.heap[--n.heap_max]=o,n.heap[--n.heap_max]=l,r[2*c]=r[2*o]+r[2*l],n.depth[c]=a.max(n.depth[o],n.depth[l])+1,r[2*o+1]=r[2*l+1]=c,n.heap[1]=c++,n.pqdownheap(r,1)}while(n.heap_len>=2);n.heap[--n.heap_max]=n.heap[1],(t=>{const n=e.dyn_tree,r=e.stat_desc.static_tree,i=e.stat_desc.extra_bits,s=e.stat_desc.extra_base,a=e.stat_desc.max_length;let o,l,c,d,f,u,p=0;for(d=0;15>=d;d++)t.bl_count[d]=0;for(n[2*t.heap[t.heap_max]+1]=0,o=t.heap_max+1;573>o;o++)l=t.heap[o],d=n[2*n[2*l+1]+1]+1,d>a&&(d=a,p++),n[2*l+1]=d,l>e.max_code||(t.bl_count[d]++,f=0,s>l||(f=i[l-s]),u=n[2*l],t.opt_len+=u*(d+f),r&&(t.static_len+=u*(r[2*l+1]+f)));if(0!==p){do{for(d=a-1;0===t.bl_count[d];)d--;t.bl_count[d]--,t.bl_count[d+1]+=2,t.bl_count[a]--,p-=2}while(p>0);for(d=a;0!==d;d--)for(l=t.bl_count[d];0!==l;)c=t.heap[--o],c>e.max_code||(n[2*c+1]!=d&&(t.opt_len+=(d-n[2*c+1])*n[2*c],n[2*c+1]=d),l--)}})(n),((e,n,r)=>{const i=[];let s,a,o,l=0;for(s=1;15>=s;s++)i[s]=l=l+r[s-1]<<1;for(a=0;n>=a;a++)o=e[2*a+1],0!==o&&(e[2*a]=t(i[o]++,o))})(r,e.max_code,n.bl_count)}}function U(e,t,n,r,i){const s=this;s.static_tree=e,s.extra_bits=t,s.extra_base=n,s.elems=r,s.max_length=i}L._length_code=[0,1,2,3,4,5,6,7].concat(...F([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]])),L.base_length=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0],L.base_dist=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576],L.d_code=e=>256>e?q[e]:q[256+(e>>>7)],L.extra_lbits=[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],L.extra_dbits=[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],L.extra_blbits=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],L.bl_order=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];const I=F([[144,8],[112,9],[24,7],[8,8]]);U.static_ltree=T([12,140,76,204,44,172,108,236,28,156,92,220,60,188,124,252,2,130,66,194,34,162,98,226,18,146,82,210,50,178,114,242,10,138,74,202,42,170,106,234,26,154,90,218,58,186,122,250,6,134,70,198,38,166,102,230,22,150,86,214,54,182,118,246,14,142,78,206,46,174,110,238,30,158,94,222,62,190,126,254,1,129,65,193,33,161,97,225,17,145,81,209,49,177,113,241,9,137,73,201,41,169,105,233,25,153,89,217,57,185,121,249,5,133,69,197,37,165,101,229,21,149,85,213,53,181,117,245,13,141,77,205,45,173,109,237,29,157,93,221,61,189,125,253,19,275,147,403,83,339,211,467,51,307,179,435,115,371,243,499,11,267,139,395,75,331,203,459,43,299,171,427,107,363,235,491,27,283,155,411,91,347,219,475,59,315,187,443,123,379,251,507,7,263,135,391,71,327,199,455,39,295,167,423,103,359,231,487,23,279,151,407,87,343,215,471,55,311,183,439,119,375,247,503,15,271,143,399,79,335,207,463,47,303,175,431,111,367,239,495,31,287,159,415,95,351,223,479,63,319,191,447,127,383,255,511,0,64,32,96,16,80,48,112,8,72,40,104,24,88,56,120,4,68,36,100,20,84,52,116,3,131,67,195,35,163,99,227].map(((e,t)=>[e,I[t]])));const N=F([[30,5]]);function P(e,t,n,r,i){const s=this;s.good_length=e,s.max_lazy=t,s.nice_length=n,s.max_chain=r,s.func=i}U.static_dtree=T([0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30,1,17,9,25,5,21,13,29,3,19,11,27,7,23].map(((e,t)=>[e,N[t]]))),U.static_l_desc=new U(U.static_ltree,L.extra_lbits,257,286,15),U.static_d_desc=new U(U.static_dtree,L.extra_dbits,0,30,15),U.static_bl_desc=new U(null,L.extra_blbits,0,19,7);const j=[new P(0,0,0,0,0),new P(4,4,8,4,1),new P(4,5,16,8,1),new P(4,6,32,32,1),new P(4,4,16,16,2),new P(8,16,32,32,2),new P(8,16,128,128,2),new P(8,32,128,256,2),new P(32,128,258,1024,2),new P(32,258,258,4096,2)],O=["need dictionary","stream end","","","stream error","data error","","buffer error","",""],H=113,B=666,M=262;function Z(e,t,n,r){const i=e[2*t],s=e[2*n];return s>i||i==s&&r[t]<=r[n]}function V(){const e=this;let t,n,r,i,s,o,l,c,d,f,u,h,w,x,g,b,v,y,_,k,z,S,A,D,C,R,W,F,T,q,I,N,P;const V=new L,K=new L,G=new L;let X,Y,J,Q,$,ee;function te(){let t;for(t=0;286>t;t++)I[2*t]=0;for(t=0;30>t;t++)N[2*t]=0;for(t=0;19>t;t++)P[2*t]=0;I[512]=1,e.opt_len=e.static_len=0,Y=J=0}function ne(e,t){let n,r=-1,i=e[1],s=0,a=7,o=4;0===i&&(a=138,o=3),e[2*(t+1)+1]=65535;for(let l=0;t>=l;l++)n=i,i=e[2*(l+1)+1],++ss?P[2*n]+=s:0!==n?(n!=r&&P[2*n]++,P[32]++):s>10?P[36]++:P[34]++,s=0,r=n,0===i?(a=138,o=3):n==i?(a=6,o=3):(a=7,o=4))}function re(t){e.pending_buf[e.pending++]=t}function ie(e){re(255&e),re(e>>>8&255)}function se(e,t){let n;const r=t;ee>16-r?(n=e,$|=n<>>16-ee,ee+=r-16):($|=e<=n;n++)if(r=s,s=e[2*(n+1)+1],++a>=o||r!=s){if(l>a)do{ae(r,P)}while(0!=--a);else 0!==r?(r!=i&&(ae(r,P),a--),ae(16,P),se(a-3,2)):a>10?(ae(18,P),se(a-11,7)):(ae(17,P),se(a-3,3));a=0,i=r,0===s?(o=138,l=3):r==s?(o=6,l=3):(o=7,l=4)}}function le(){16==ee?(ie($),$=0,ee=0):8>ee||(re(255&$),$>>>=8,ee-=8)}function ce(t,n){let r,i,s;if(e.dist_buf[Y]=t,e.lc_buf[Y]=255&n,Y++,0===t?I[2*n]++:(J++,t--,I[2*(L._length_code[n]+256+1)]++,N[2*L.d_code(t)]++),0==(8191&Y)&&W>2){for(r=8*Y,i=z-v,s=0;30>s;s++)r+=N[2*s]*(5+L.extra_dbits[s]);if(r>>>=3,Jo);ae(256,t),Q=t[513]}function fe(){ee>8?ie($):ee>0&&re(255&$),$=0,ee=0}function ue(t,n,r){se(0+(r?1:0),3),((t,n)=>{fe(),Q=8,ie(n),ie(~n),e.pending_buf.set(c.subarray(t,t+n),e.pending),e.pending+=n})(t,n)}function pe(n){((t,n,r)=>{let i,s,a=0;W>0?(V.build_tree(e),K.build_tree(e),a=(()=>{let t;for(ne(I,V.max_code),ne(N,K.max_code),G.build_tree(e),t=18;t>=3&&0===P[2*L.bl_order[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t})(),i=e.opt_len+3+7>>>3,s=e.static_len+3+7>>>3,s>i||(i=s)):i=s=n+5,n+4>i||-1==t?s==i?(se(2+(r?1:0),3),de(U.static_ltree,U.static_dtree)):(se(4+(r?1:0),3),((e,t,n)=>{let r;for(se(e-257,5),se(t-1,5),se(n-4,4),r=0;n>r;r++)se(P[2*L.bl_order[r]+1],3);oe(I,e-1),oe(N,t-1)})(V.max_code+1,K.max_code+1,a+1),de(I,N)):ue(t,n,r),te(),r&&fe()})(0>v?-1:v,z-v,n),v=z,t.flush_pending()}function me(){let e,n,r,i;do{if(i=d-A-z,0===i&&0===z&&0===A)i=s;else if(-1==i)i--;else if(z>=s+s-M){c.set(c.subarray(s,s+s),0),S-=s,z-=s,v-=s,e=w,r=e;do{n=65535&u[--r],u[r]=s>n?0:n-s}while(0!=--e);e=s,r=e;do{n=65535&f[--r],f[r]=s>n?0:n-s}while(0!=--e);i+=s}if(0===t.avail_in)return;e=t.read_buf(c,z+A,i),A+=e,3>A||(h=255&c[z],h=(h<A&&0!==t.avail_in)}function he(e){let t,n,r=C,i=z,a=D;const o=z>s-M?z-(s-M):0;let d=q;const u=l,p=z+258;let m=c[i+a-1],h=c[i+a];T>D||(r>>=2),d>A&&(d=A);do{if(t=e,c[t+a]==h&&c[t+a-1]==m&&c[t]==c[i]&&c[++t]==c[i+1]){i+=2,t++;do{}while(c[++i]==c[++t]&&c[++i]==c[++t]&&c[++i]==c[++t]&&c[++i]==c[++t]&&c[++i]==c[++t]&&c[++i]==c[++t]&&c[++i]==c[++t]&&c[++i]==c[++t]&&p>i);if(n=258-(p-i),i=p-258,n>a){if(S=e,a=n,n>=d)break;m=c[i+a-1],h=c[i+a]}}}while((e=65535&f[e&u])>o&&0!=--r);return a>A?A:a}e.depth=[],e.bl_count=[],e.heap=[],I=[],N=[],P=[],e.pqdownheap=(t,n)=>{const r=e.heap,i=r[n];let s=n<<1;for(;s<=e.heap_len&&(s(L||(L=8),O||(O=8),B||(B=0),t.msg=null,-1==_&&(_=6),1>O||O>9||8!=L||9>S||S>15||0>_||_>9||0>B||B>2?E:(t.dstate=e,o=S,s=1<(t.total_in=t.total_out=0,t.msg=null,e.pending=0,e.pending_out=0,n=H,i=0,V.dyn_tree=I,V.stat_desc=U.static_l_desc,K.dyn_tree=N,K.stat_desc=U.static_d_desc,G.dyn_tree=P,G.stat_desc=U.static_bl_desc,$=0,ee=0,Q=8,te(),(()=>{d=2*s,u[w-1]=0;for(let e=0;w-1>e;e++)u[e]=0;R=j[W].max_lazy,T=j[W].good_length,q=j[W].nice_length,C=j[W].max_chain,z=0,v=0,A=0,y=D=2,k=0,h=0})(),0))(t))),e.deflateEnd=()=>42!=n&&n!=H&&n!=B?E:(e.lc_buf=null,e.dist_buf=null,e.pending_buf=null,u=null,f=null,c=null,e.dstate=null,n==H?-3:0),e.deflateParams=(e,t,n)=>{let r=0;return-1==t&&(t=6),0>t||t>9||0>n||n>2?E:(j[W].func!=j[t].func&&0!==e.total_in&&(r=e.deflate(1)),W!=t&&(W=t,R=j[W].max_lazy,T=j[W].good_length,q=j[W].nice_length,C=j[W].max_chain),F=n,r)},e.deflateSetDictionary=(e,t,r)=>{let i,a=r,o=0;if(!t||42!=n)return E;if(3>a)return 0;for(a>s-M&&(a=s-M,o=r-a),c.set(t.subarray(o,o+a),0),z=a,v=a,h=255&c[0],h=(h<=i;i++)h=(h<{let p,m,x,C,T;if(d>4||0>d)return E;if(!a.next_out||!a.next_in&&0!==a.avail_in||n==B&&4!=d)return a.msg=O[4],E;if(0===a.avail_out)return a.msg=O[7],-5;var q;if(t=a,C=i,i=d,42==n&&(m=8+(o-8<<4)<<8,x=(W-1&255)>>1,x>3&&(x=3),m|=x<<6,0!==z&&(m|=32),m+=31-m%31,n=H,re((q=m)>>8&255),re(255&q)),0!==e.pending){if(t.flush_pending(),0===t.avail_out)return i=-1,0}else if(0===t.avail_in&&C>=d&&4!=d)return t.msg=O[7],-5;if(n==B&&0!==t.avail_in)return a.msg=O[7],-5;if(0!==t.avail_in||0!==A||0!=d&&n!=B){switch(T=-1,j[W].func){case 0:T=(e=>{let n,i=65535;for(i>r-5&&(i=r-5);;){if(1>=A){if(me(),0===A&&0==e)return 0;if(0===A)break}if(z+=A,A=0,n=v+i,(0===z||z>=n)&&(A=z-n,z=n,pe(!1),0===t.avail_out))return 0;if(z-v>=s-M&&(pe(!1),0===t.avail_out))return 0}return pe(4==e),0===t.avail_out?4==e?2:0:4==e?3:1})(d);break;case 1:T=(e=>{let n,r=0;for(;;){if(M>A){if(me(),M>A&&0==e)return 0;if(0===A)break}if(3>A||(h=(h<s-M||2!=F&&(y=he(r)),3>y)n=ce(0,255&c[z]),A--,z++;else if(n=ce(z-S,y-3),A-=y,y>R||3>A)z+=y,y=0,h=255&c[z],h=(h<{let n,r,i=0;for(;;){if(M>A){if(me(),M>A&&0==e)return 0;if(0===A)break}if(3>A||(h=(h<D&&s-M>=(z-i&65535)&&(2!=F&&(y=he(i)),5>=y&&(1==F||3==y&&z-S>4096)&&(y=2)),3>D||y>D)if(0!==k){if(n=ce(0,255&c[z-1]),n&&pe(!1),z++,A--,0===t.avail_out)return 0}else k=1,z++,A--;else{r=z+A-3,n=ce(z-1-_,D-3),A-=D-1,D-=2;do{++z>r||(h=(h<1+Q+10-ee&&(se(2,3),ae(256,U.static_ltree),le()),Q=7;else if(ue(0,0,!1),3==d)for(p=0;w>p;p++)u[p]=0;if(t.flush_pending(),0===t.avail_out)return i=-1,0}}return 4!=d?0:1}}function K(){const e=this;e.next_in_index=0,e.next_out_index=0,e.avail_in=0,e.total_in=0,e.avail_out=0,e.total_out=0}K.prototype={deflateInit(e,t){const n=this;return n.dstate=new V,t||(t=15),n.dstate.deflateInit(n,e,t)},deflate(e){const t=this;return t.dstate?t.dstate.deflate(t,e):E},deflateEnd(){const e=this;if(!e.dstate)return E;const t=e.dstate.deflateEnd();return e.dstate=null,t},deflateParams(e,t){const n=this;return n.dstate?n.dstate.deflateParams(n,e,t):E},deflateSetDictionary(e,t){const n=this;return n.dstate?n.dstate.deflateSetDictionary(n,e,t):E},read_buf(e,t,n){const r=this;let i=r.avail_in;return i>n&&(i=n),0===i?0:(r.avail_in-=i,e.set(r.next_in.subarray(r.next_in_index,r.next_in_index+i),t),r.next_in_index+=i,r.total_in+=i,i)},flush_pending(){const e=this;let t=e.dstate.pending;t>e.avail_out&&(t=e.avail_out),0!==t&&(e.next_out.set(e.dstate.pending_buf.subarray(e.dstate.pending_out,e.dstate.pending_out+t),e.next_out_index),e.next_out_index+=t,e.dstate.pending_out+=t,e.total_out+=t,e.avail_out-=t,e.dstate.pending-=t,0===e.dstate.pending&&(e.dstate.pending_out=0))}};const G=-2,X=-3,Y=-5,J=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],Q=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],$=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],ee=[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,0,0],te=[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,112,112],ne=[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],re=[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];function ie(){let e,t,n,r,i,s;function a(e,t,a,o,l,c,d,f,u,p,m){let h,w,x,g,b,v,y,_,k,z,S,A,D,C,R;z=0,b=a;do{n[e[t+z]]++,z++,b--}while(0!==b);if(n[0]==a)return d[0]=-1,f[0]=0,0;for(_=f[0],v=1;15>=v&&0===n[v];v++);for(y=v,v>_&&(_=v),b=15;0!==b&&0===n[b];b--);for(x=b,_>b&&(_=b),f[0]=_,C=1<v;v++,C<<=1)if(0>(C-=n[v]))return X;if(0>(C-=n[b]))return X;for(n[b]+=C,s[1]=v=0,z=1,D=2;0!=--b;)s[D]=v+=n[z],D++,z++;b=0,z=0;do{0!==(v=e[t+z])&&(m[s[v]++]=b),z++}while(++b=y;y++)for(h=n[y];0!=h--;){for(;y>A+_;){if(g++,A+=_,R=x-A,R=R>_?_:R,(w=1<<(v=y-A))>h+1&&(w-=h+1,D=y,R>v))for(;++vn[++D];)w-=n[D];if(R=1<1440)return X;i[g]=S=p[0],p[0]+=R,0!==g?(s[g]=b,r[0]=v,r[1]=_,v=b>>>A-_,r[2]=S-i[g-1]-v,u.set(r,3*(i[g-1]+v))):d[0]=S}for(r[1]=y-A,a>z?m[z]m[z]?0:96,r[2]=m[z++]):(r[0]=c[m[z]-o]+16+64,r[2]=l[m[z++]-o]):r[0]=192,w=1<>>A;R>v;v+=w)u.set(r,3*(S+v));for(v=1<>>=1)b^=v;for(b^=v,k=(1<o;o++)t[o]=0;for(o=0;16>o;o++)n[o]=0;for(o=0;3>o;o++)r[o]=0;i.set(n.subarray(0,15),0),s.set(n.subarray(0,16),0)}this.inflate_trees_bits=(n,r,i,s,l)=>{let c;return o(19),e[0]=0,c=a(n,0,19,19,null,null,i,r,s,e,t),c==X?l.msg="oversubscribed dynamic bit lengths tree":c!=Y&&0!==r[0]||(l.msg="incomplete dynamic bit lengths tree",c=X),c},this.inflate_trees_dynamic=(n,r,i,s,l,c,d,f,u)=>{let p;return o(288),e[0]=0,p=a(i,0,n,257,ee,te,c,s,f,e,t),0!=p||0===s[0]?(p==X?u.msg="oversubscribed literal/length tree":-4!=p&&(u.msg="incomplete literal/length tree",p=X),p):(o(288),p=a(i,n,r,0,ne,re,d,l,f,e,t),0!=p||0===l[0]&&n>257?(p==X?u.msg="oversubscribed distance tree":p==Y?(u.msg="incomplete distance tree",p=X):-4!=p&&(u.msg="empty distance tree with lengths",p=X),p):0)}}function se(){const e=this;let t,n,r,i,s=0,a=0,o=0,l=0,c=0,d=0,f=0,u=0,p=0,m=0;function h(e,t,n,r,i,s,a,o){let l,c,d,f,u,p,m,h,w,x,g,b,v,y,_,k;m=o.next_in_index,h=o.avail_in,u=a.bitb,p=a.bitk,w=a.write,x=wp;)h--,u|=(255&o.read_byte(m++))<>=c[k+1],p-=c[k+1],0!=(16&f)){for(f&=15,v=c[k+2]+(u&J[f]),u>>=f,p-=f;15>p;)h--,u|=(255&o.read_byte(m++))<>=c[k+1],p-=c[k+1],0!=(16&f)){for(f&=15;f>p;)h--,u|=(255&o.read_byte(m++))<>=f,p-=f,x-=v,y>w){_=w-y;do{_+=a.end}while(0>_);if(f=a.end-_,v>f){if(v-=f,w-_>0&&f>w-_)do{a.win[w++]=a.win[_++]}while(0!=--f);else a.win.set(a.win.subarray(_,_+f),w),w+=f,_+=f,f=0;_=0}}else _=w-y,w-_>0&&2>w-_?(a.win[w++]=a.win[_++],a.win[w++]=a.win[_++],v-=2):(a.win.set(a.win.subarray(_,_+2),w),w+=2,_+=2,v-=2);if(w-_>0&&v>w-_)do{a.win[w++]=a.win[_++]}while(0!=--v);else a.win.set(a.win.subarray(_,_+v),w),w+=v,_+=v,v=0;break}if(0!=(64&f))return o.msg="invalid distance code",v=o.avail_in-h,v=v>p>>3?p>>3:v,h+=v,m-=v,p-=v<<3,a.bitb=u,a.bitk=p,o.avail_in=h,o.total_in+=m-o.next_in_index,o.next_in_index=m,a.write=w,X;l+=c[k+2],l+=u&J[f],k=3*(d+l),f=c[k]}break}if(0!=(64&f))return 0!=(32&f)?(v=o.avail_in-h,v=v>p>>3?p>>3:v,h+=v,m-=v,p-=v<<3,a.bitb=u,a.bitk=p,o.avail_in=h,o.total_in+=m-o.next_in_index,o.next_in_index=m,a.write=w,1):(o.msg="invalid literal/length code",v=o.avail_in-h,v=v>p>>3?p>>3:v,h+=v,m-=v,p-=v<<3,a.bitb=u,a.bitk=p,o.avail_in=h,o.total_in+=m-o.next_in_index,o.next_in_index=m,a.write=w,X);if(l+=c[k+2],l+=u&J[f],k=3*(d+l),0===(f=c[k])){u>>=c[k+1],p-=c[k+1],a.win[w++]=c[k+2],x--;break}}else u>>=c[k+1],p-=c[k+1],a.win[w++]=c[k+2],x--}while(x>=258&&h>=10);return v=o.avail_in-h,v=v>p>>3?p>>3:v,h+=v,m-=v,p-=v<<3,a.bitb=u,a.bitk=p,o.avail_in=h,o.total_in+=m-o.next_in_index,o.next_in_index=m,a.write=w,0}e.init=(e,s,a,o,l,c)=>{t=0,f=e,u=s,r=a,p=o,i=l,m=c,n=null},e.proc=(e,w,x)=>{let g,b,v,y,_,k,z,S=0,A=0,D=0;for(D=w.next_in_index,y=w.avail_in,S=e.bitb,A=e.bitk,_=e.write,k=_=258&&y>=10&&(e.bitb=S,e.bitk=A,w.avail_in=y,w.total_in+=D-w.next_in_index,w.next_in_index=D,e.write=_,x=h(f,u,r,p,i,m,e,w),D=w.next_in_index,y=w.avail_in,S=e.bitb,A=e.bitk,_=e.write,k=_A;){if(0===y)return e.bitb=S,e.bitk=A,w.avail_in=y,w.total_in+=D-w.next_in_index,w.next_in_index=D,e.write=_,e.inflate_flush(w,x);x=0,y--,S|=(255&w.read_byte(D++))<>>=n[b+1],A-=n[b+1],v=n[b],0===v){l=n[b+2],t=6;break}if(0!=(16&v)){c=15&v,s=n[b+2],t=2;break}if(0==(64&v)){o=v,a=b/3+n[b+2];break}if(0!=(32&v)){t=7;break}return t=9,w.msg="invalid literal/length code",x=X,e.bitb=S,e.bitk=A,w.avail_in=y,w.total_in+=D-w.next_in_index,w.next_in_index=D,e.write=_,e.inflate_flush(w,x);case 2:for(g=c;g>A;){if(0===y)return e.bitb=S,e.bitk=A,w.avail_in=y,w.total_in+=D-w.next_in_index,w.next_in_index=D,e.write=_,e.inflate_flush(w,x);x=0,y--,S|=(255&w.read_byte(D++))<>=g,A-=g,o=u,n=i,a=m,t=3;case 3:for(g=o;g>A;){if(0===y)return e.bitb=S,e.bitk=A,w.avail_in=y,w.total_in+=D-w.next_in_index,w.next_in_index=D,e.write=_,e.inflate_flush(w,x);x=0,y--,S|=(255&w.read_byte(D++))<>=n[b+1],A-=n[b+1],v=n[b],0!=(16&v)){c=15&v,d=n[b+2],t=4;break}if(0==(64&v)){o=v,a=b/3+n[b+2];break}return t=9,w.msg="invalid distance code",x=X,e.bitb=S,e.bitk=A,w.avail_in=y,w.total_in+=D-w.next_in_index,w.next_in_index=D,e.write=_,e.inflate_flush(w,x);case 4:for(g=c;g>A;){if(0===y)return e.bitb=S,e.bitk=A,w.avail_in=y,w.total_in+=D-w.next_in_index,w.next_in_index=D,e.write=_,e.inflate_flush(w,x);x=0,y--,S|=(255&w.read_byte(D++))<>=g,A-=g,t=5;case 5:for(z=_-d;0>z;)z+=e.end;for(;0!==s;){if(0===k&&(_==e.end&&0!==e.read&&(_=0,k=_7&&(A-=8,y++,D--),e.write=_,x=e.inflate_flush(w,x),_=e.write,k=_{}}ie.inflate_trees_fixed=(e,t,n,r)=>(e[0]=9,t[0]=5,n[0]=Q,r[0]=$,0);const ae=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function oe(e,t){const n=this;let r,i=0,s=0,a=0,o=0;const l=[0],c=[0],d=new se;let f=0,u=new Int32Array(4320);const m=new ie;n.bitk=0,n.bitb=0,n.win=new p(t),n.end=t,n.read=0,n.write=0,n.reset=(e,t)=>{t&&(t[0]=0),6==i&&d.free(e),i=0,n.bitk=0,n.bitb=0,n.read=n.write=0},n.reset(e,null),n.inflate_flush=(e,t)=>{let r,i,s;return i=e.next_out_index,s=n.read,r=(s>n.write?n.end:n.write)-s,r>e.avail_out&&(r=e.avail_out),0!==r&&t==Y&&(t=0),e.avail_out-=r,e.total_out+=r,e.next_out.set(n.win.subarray(s,s+r),i),i+=r,s+=r,s==n.end&&(s=0,n.write==n.end&&(n.write=0),r=n.write-s,r>e.avail_out&&(r=e.avail_out),0!==r&&t==Y&&(t=0),e.avail_out-=r,e.total_out+=r,e.next_out.set(n.win.subarray(s,s+r),i),i+=r,s+=r),e.next_out_index=i,n.read=s,t},n.proc=(e,t)=>{let p,h,w,x,g,b,v,y;for(x=e.next_in_index,g=e.avail_in,h=n.bitb,w=n.bitk,b=n.write,v=bw;){if(0===g)return n.bitb=h,n.bitk=w,e.avail_in=g,e.total_in+=x-e.next_in_index,e.next_in_index=x,n.write=b,n.inflate_flush(e,t);t=0,g--,h|=(255&e.read_byte(x++))<>>1){case 0:h>>>=3,w-=3,p=7&w,h>>>=p,w-=p,i=1;break;case 1:_=[],k=[],z=[[]],S=[[]],ie.inflate_trees_fixed(_,k,z,S),d.init(_[0],k[0],z[0],0,S[0],0),h>>>=3,w-=3,i=6;break;case 2:h>>>=3,w-=3,i=3;break;case 3:return h>>>=3,w-=3,i=9,e.msg="invalid block type",t=X,n.bitb=h,n.bitk=w,e.avail_in=g,e.total_in+=x-e.next_in_index,e.next_in_index=x,n.write=b,n.inflate_flush(e,t)}break;case 1:for(;32>w;){if(0===g)return n.bitb=h,n.bitk=w,e.avail_in=g,e.total_in+=x-e.next_in_index,e.next_in_index=x,n.write=b,n.inflate_flush(e,t);t=0,g--,h|=(255&e.read_byte(x++))<>>16&65535)!=(65535&h))return i=9,e.msg="invalid stored block lengths",t=X,n.bitb=h,n.bitk=w,e.avail_in=g,e.total_in+=x-e.next_in_index,e.next_in_index=x,n.write=b,n.inflate_flush(e,t);s=65535&h,h=w=0,i=0!==s?2:0!==f?7:0;break;case 2:if(0===g)return n.bitb=h,n.bitk=w,e.avail_in=g,e.total_in+=x-e.next_in_index,e.next_in_index=x,n.write=b,n.inflate_flush(e,t);if(0===v&&(b==n.end&&0!==n.read&&(b=0,v=bg&&(p=g),p>v&&(p=v),n.win.set(e.read_buf(x,p),b),x+=p,g-=p,b+=p,v-=p,0!=(s-=p))break;i=0!==f?7:0;break;case 3:for(;14>w;){if(0===g)return n.bitb=h,n.bitk=w,e.avail_in=g,e.total_in+=x-e.next_in_index,e.next_in_index=x,n.write=b,n.inflate_flush(e,t);t=0,g--,h|=(255&e.read_byte(x++))<29||(p>>5&31)>29)return i=9,e.msg="too many length or distance symbols",t=X,n.bitb=h,n.bitk=w,e.avail_in=g,e.total_in+=x-e.next_in_index,e.next_in_index=x,n.write=b,n.inflate_flush(e,t);if(p=258+(31&p)+(p>>5&31),!r||r.lengthy;y++)r[y]=0;h>>>=14,w-=14,o=0,i=4;case 4:for(;4+(a>>>10)>o;){for(;3>w;){if(0===g)return n.bitb=h,n.bitk=w,e.avail_in=g,e.total_in+=x-e.next_in_index,e.next_in_index=x,n.write=b,n.inflate_flush(e,t);t=0,g--,h|=(255&e.read_byte(x++))<>>=3,w-=3}for(;19>o;)r[ae[o++]]=0;if(l[0]=7,p=m.inflate_trees_bits(r,l,c,u,e),0!=p)return(t=p)==X&&(r=null,i=9),n.bitb=h,n.bitk=w,e.avail_in=g,e.total_in+=x-e.next_in_index,e.next_in_index=x,n.write=b,n.inflate_flush(e,t);o=0,i=5;case 5:for(;p=a,258+(31&p)+(p>>5&31)>o;){let s,d;for(p=l[0];p>w;){if(0===g)return n.bitb=h,n.bitk=w,e.avail_in=g,e.total_in+=x-e.next_in_index,e.next_in_index=x,n.write=b,n.inflate_flush(e,t);t=0,g--,h|=(255&e.read_byte(x++))<d)h>>>=p,w-=p,r[o++]=d;else{for(y=18==d?7:d-14,s=18==d?11:3;p+y>w;){if(0===g)return n.bitb=h,n.bitk=w,e.avail_in=g,e.total_in+=x-e.next_in_index,e.next_in_index=x,n.write=b,n.inflate_flush(e,t);t=0,g--,h|=(255&e.read_byte(x++))<>>=p,w-=p,s+=h&J[y],h>>>=y,w-=y,y=o,p=a,y+s>258+(31&p)+(p>>5&31)||16==d&&1>y)return r=null,i=9,e.msg="invalid bit length repeat",t=X,n.bitb=h,n.bitk=w,e.avail_in=g,e.total_in+=x-e.next_in_index,e.next_in_index=x,n.write=b,n.inflate_flush(e,t);d=16==d?r[y-1]:0;do{r[y++]=d}while(0!=--s);o=y}}if(c[0]=-1,A=[],D=[],C=[],R=[],A[0]=9,D[0]=6,p=a,p=m.inflate_trees_dynamic(257+(31&p),1+(p>>5&31),r,A,D,C,R,u,e),0!=p)return p==X&&(r=null,i=9),t=p,n.bitb=h,n.bitk=w,e.avail_in=g,e.total_in+=x-e.next_in_index,e.next_in_index=x,n.write=b,n.inflate_flush(e,t);d.init(A[0],D[0],u,C[0],u,R[0]),i=6;case 6:if(n.bitb=h,n.bitk=w,e.avail_in=g,e.total_in+=x-e.next_in_index,e.next_in_index=x,n.write=b,1!=(t=d.proc(n,e,t)))return n.inflate_flush(e,t);if(t=0,d.free(e),x=e.next_in_index,g=e.avail_in,h=n.bitb,w=n.bitk,b=n.write,v=b{n.reset(e,null),n.win=null,u=null},n.set_dictionary=(e,t,r)=>{n.win.set(e.subarray(t,t+r),0),n.read=n.write=r},n.sync_point=()=>1==i?1:0}const le=13,ce=[0,0,255,255];function de(){const e=this;function t(e){return e&&e.istate?(e.total_in=e.total_out=0,e.msg=null,e.istate.mode=7,e.istate.blocks.reset(e,null),0):G}e.mode=0,e.method=0,e.was=[0],e.need=0,e.marker=0,e.wbits=0,e.inflateEnd=t=>(e.blocks&&e.blocks.free(t),e.blocks=null,0),e.inflateInit=(n,r)=>(n.msg=null,e.blocks=null,8>r||r>15?(e.inflateEnd(n),G):(e.wbits=r,n.istate.blocks=new oe(n,1<{let n,r;if(!e||!e.istate||!e.next_in)return G;const i=e.istate;for(t=4==t?Y:0,n=Y;;)switch(i.mode){case 0:if(0===e.avail_in)return n;if(n=t,e.avail_in--,e.total_in++,8!=(15&(i.method=e.read_byte(e.next_in_index++)))){i.mode=le,e.msg="unknown compression method",i.marker=5;break}if(8+(i.method>>4)>i.wbits){i.mode=le,e.msg="invalid win size",i.marker=5;break}i.mode=1;case 1:if(0===e.avail_in)return n;if(n=t,e.avail_in--,e.total_in++,r=255&e.read_byte(e.next_in_index++),((i.method<<8)+r)%31!=0){i.mode=le,e.msg="incorrect header check",i.marker=5;break}if(0==(32&r)){i.mode=7;break}i.mode=2;case 2:if(0===e.avail_in)return n;n=t,e.avail_in--,e.total_in++,i.need=(255&e.read_byte(e.next_in_index++))<<24&4278190080,i.mode=3;case 3:if(0===e.avail_in)return n;n=t,e.avail_in--,e.total_in++,i.need+=(255&e.read_byte(e.next_in_index++))<<16&16711680,i.mode=4;case 4:if(0===e.avail_in)return n;n=t,e.avail_in--,e.total_in++,i.need+=(255&e.read_byte(e.next_in_index++))<<8&65280,i.mode=5;case 5:return 0===e.avail_in?n:(n=t,e.avail_in--,e.total_in++,i.need+=255&e.read_byte(e.next_in_index++),i.mode=6,2);case 6:return i.mode=le,e.msg="need dictionary",i.marker=0,G;case 7:if(n=i.blocks.proc(e,n),n==X){i.mode=le,i.marker=0;break}if(0==n&&(n=t),1!=n)return n;n=t,i.blocks.reset(e,i.was),i.mode=12;case 12:return e.avail_in=0,1;case le:return X;default:return G}},e.inflateSetDictionary=(e,t,n)=>{let r=0,i=n;if(!e||!e.istate||6!=e.istate.mode)return G;const s=e.istate;return i<1<{let n,r,i,s,a;if(!e||!e.istate)return G;const o=e.istate;if(o.mode!=le&&(o.mode=le,o.marker=0),0===(n=e.avail_in))return Y;for(r=e.next_in_index,i=o.marker;0!==n&&4>i;)e.read_byte(r)==ce[i]?i++:i=0!==e.read_byte(r)?0:4-i,r++,n--;return e.total_in+=r-e.next_in_index,e.next_in_index=r,e.avail_in=n,o.marker=i,4!=i?X:(s=e.total_in,a=e.total_out,t(e),e.total_in=s,e.total_out=a,o.mode=7,0)},e.inflateSyncPoint=e=>e&&e.istate&&e.istate.blocks?e.istate.blocks.sync_point():G}function fe(){}fe.prototype={inflateInit(e){const t=this;return t.istate=new de,e||(e=15),t.istate.inflateInit(t,e)},inflate(e){const t=this;return t.istate?t.istate.inflate(t,e):G},inflateEnd(){const e=this;if(!e.istate)return G;const t=e.istate.inflateEnd(e);return e.istate=null,t},inflateSync(){const e=this;return e.istate?e.istate.inflateSync(e):G},inflateSetDictionary(e,t){const n=this;return n.istate?n.istate.inflateSetDictionary(n,e,t):G},read_byte(e){return this.next_in[e]},read_buf(e,t){return this.next_in.subarray(e,e+t)}};const ue=4294967295,pe=65535,me=67324752,he=134695760,we=33639248,xe=101075792,ge=117853008,be=22,ve=21589,ye=2048,_e="/",ke=new o(2107,11,31),ze=new o(1980,0,1),Se=void 0,Ae="undefined",De="function";class Ce{constructor(e){return class extends z{constructor(t,n){const r=new e(n);super({transform(e,t){t.enqueue(r.append(e))},flush(e){const t=r.flush();t&&e.enqueue(t)}})}}}}let Re=2;try{typeof R!=Ae&&R.hardwareConcurrency&&(Re=R.hardwareConcurrency)}catch(e){}const We={chunkSize:524288,maxWorkers:Re,terminateWorkerTimeout:5e3,useWebWorkers:!0,useCompressionStream:!0,workerScripts:Se,CompressionStreamNative:typeof D!=Ae&&D,DecompressionStreamNative:typeof C!=Ae&&C},Ee=n.assign({},We);function Fe(){return Ee}function Te(e){return a.max(e.chunkSize,64)}function qe(e){const{baseURL:n,chunkSize:r,maxWorkers:i,terminateWorkerTimeout:s,useCompressionStream:a,useWebWorkers:o,Deflate:l,Inflate:c,CompressionStream:d,DecompressionStream:f,workerScripts:p}=e;if(Le("baseURL",n),Le("chunkSize",r),Le("maxWorkers",i),Le("terminateWorkerTimeout",s),Le("useCompressionStream",a),Le("useWebWorkers",o),l&&(Ee.CompressionStream=new Ce(l)),c&&(Ee.DecompressionStream=new Ce(c)),Le("CompressionStream",d),Le("DecompressionStream",f),p!==Se){const{deflate:e,inflate:n}=p;if((e||n)&&(Ee.workerScripts||(Ee.workerScripts={})),e){if(!t.isArray(e))throw new u("workerScripts.deflate must be an array");Ee.workerScripts.deflate=e}if(n){if(!t.isArray(n))throw new u("workerScripts.inflate must be an array");Ee.workerScripts.inflate=n}}}function Le(e,t){t!==Se&&(Ee[e]=t)}const Ue={application:{"andrew-inset":"ez",annodex:"anx","atom+xml":"atom","atomcat+xml":"atomcat","atomserv+xml":"atomsrv",bbolin:"lin","cu-seeme":"cu","davmount+xml":"davmount",dsptype:"tsp",ecmascript:["es","ecma"],futuresplash:"spl",hta:"hta","java-archive":"jar","java-serialized-object":"ser","java-vm":"class",m3g:"m3g","mac-binhex40":"hqx",mathematica:["nb","ma","mb"],msaccess:"mdb",msword:["doc","dot","wiz"],mxf:"mxf",oda:"oda",ogg:"ogx",pdf:"pdf","pgp-keys":"key","pgp-signature":["asc","sig"],"pics-rules":"prf",postscript:["ps","ai","eps","epsi","epsf","eps2","eps3"],rar:"rar","rdf+xml":"rdf","rss+xml":"rss",rtf:"rtf","xhtml+xml":["xhtml","xht"],xml:["xml","xsl","xsd","xpdl"],"xspf+xml":"xspf",zip:"zip","vnd.android.package-archive":"apk","vnd.cinderella":"cdy","vnd.google-earth.kml+xml":"kml","vnd.google-earth.kmz":"kmz","vnd.mozilla.xul+xml":"xul","vnd.ms-excel":["xls","xlb","xlt","xlm","xla","xlc","xlw"],"vnd.ms-pki.seccat":"cat","vnd.ms-pki.stl":"stl","vnd.ms-powerpoint":["ppt","pps","pot","ppa","pwz"],"vnd.oasis.opendocument.chart":"odc","vnd.oasis.opendocument.database":"odb","vnd.oasis.opendocument.formula":"odf","vnd.oasis.opendocument.graphics":"odg","vnd.oasis.opendocument.graphics-template":"otg","vnd.oasis.opendocument.image":"odi","vnd.oasis.opendocument.presentation":"odp","vnd.oasis.opendocument.presentation-template":"otp","vnd.oasis.opendocument.spreadsheet":"ods","vnd.oasis.opendocument.spreadsheet-template":"ots","vnd.oasis.opendocument.text":"odt","vnd.oasis.opendocument.text-master":["odm","otm"],"vnd.oasis.opendocument.text-template":"ott","vnd.oasis.opendocument.text-web":"oth","vnd.openxmlformats-officedocument.spreadsheetml.sheet":"xlsx","vnd.openxmlformats-officedocument.spreadsheetml.template":"xltx","vnd.openxmlformats-officedocument.presentationml.presentation":"pptx","vnd.openxmlformats-officedocument.presentationml.slideshow":"ppsx","vnd.openxmlformats-officedocument.presentationml.template":"potx","vnd.openxmlformats-officedocument.wordprocessingml.document":"docx","vnd.openxmlformats-officedocument.wordprocessingml.template":"dotx","vnd.smaf":"mmf","vnd.stardivision.calc":"sdc","vnd.stardivision.chart":"sds","vnd.stardivision.draw":"sda","vnd.stardivision.impress":"sdd","vnd.stardivision.math":["sdf","smf"],"vnd.stardivision.writer":["sdw","vor"],"vnd.stardivision.writer-global":"sgl","vnd.sun.xml.calc":"sxc","vnd.sun.xml.calc.template":"stc","vnd.sun.xml.draw":"sxd","vnd.sun.xml.draw.template":"std","vnd.sun.xml.impress":"sxi","vnd.sun.xml.impress.template":"sti","vnd.sun.xml.math":"sxm","vnd.sun.xml.writer":"sxw","vnd.sun.xml.writer.global":"sxg","vnd.sun.xml.writer.template":"stw","vnd.symbian.install":["sis","sisx"],"vnd.visio":["vsd","vst","vss","vsw","vsdx","vssx","vstx","vssm","vstm"],"vnd.wap.wbxml":"wbxml","vnd.wap.wmlc":"wmlc","vnd.wap.wmlscriptc":"wmlsc","vnd.wordperfect":"wpd","vnd.wordperfect5.1":"wp5","x-123":"wk","x-7z-compressed":"7z","x-abiword":"abw","x-apple-diskimage":"dmg","x-bcpio":"bcpio","x-bittorrent":"torrent","x-cbr":["cbr","cba","cbt","cb7"],"x-cbz":"cbz","x-cdf":["cdf","cda"],"x-cdlink":"vcd","x-chess-pgn":"pgn","x-cpio":"cpio","x-csh":"csh","x-director":["dir","dxr","cst","cct","cxt","w3d","fgd","swa"],"x-dms":"dms","x-doom":"wad","x-dvi":"dvi","x-httpd-eruby":"rhtml","x-font":"pcf.Z","x-freemind":"mm","x-gnumeric":"gnumeric","x-go-sgf":"sgf","x-graphing-calculator":"gcf","x-gtar":["gtar","taz"],"x-hdf":"hdf","x-httpd-php":["phtml","pht","php"],"x-httpd-php-source":"phps","x-httpd-php3":"php3","x-httpd-php3-preprocessed":"php3p","x-httpd-php4":"php4","x-httpd-php5":"php5","x-ica":"ica","x-info":"info","x-internet-signup":["ins","isp"],"x-iphone":"iii","x-iso9660-image":"iso","x-java-jnlp-file":"jnlp","x-jmol":"jmz","x-killustrator":"kil","x-latex":"latex","x-lyx":"lyx","x-lzx":"lzx","x-maker":["frm","fb","fbdoc"],"x-ms-wmd":"wmd","x-msdos-program":["com","exe","bat","dll"],"x-netcdf":["nc"],"x-ns-proxy-autoconfig":["pac","dat"],"x-nwc":"nwc","x-object":"o","x-oz-application":"oza","x-pkcs7-certreqresp":"p7r","x-python-code":["pyc","pyo"],"x-qgis":["qgs","shp","shx"],"x-quicktimeplayer":"qtl","x-redhat-package-manager":["rpm","rpa"],"x-ruby":"rb","x-sh":"sh","x-shar":"shar","x-shockwave-flash":["swf","swfl"],"x-silverlight":"scr","x-stuffit":"sit","x-sv4cpio":"sv4cpio","x-sv4crc":"sv4crc","x-tar":"tar","x-tex-gf":"gf","x-tex-pk":"pk","x-texinfo":["texinfo","texi"],"x-trash":["~","%","bak","old","sik"],"x-ustar":"ustar","x-wais-source":"src","x-wingz":"wz","x-x509-ca-cert":["crt","der","cer"],"x-xcf":"xcf","x-xfig":"fig","x-xpinstall":"xpi",applixware:"aw","atomsvc+xml":"atomsvc","ccxml+xml":"ccxml","cdmi-capability":"cdmia","cdmi-container":"cdmic","cdmi-domain":"cdmid","cdmi-object":"cdmio","cdmi-queue":"cdmiq","docbook+xml":"dbk","dssc+der":"dssc","dssc+xml":"xdssc","emma+xml":"emma","epub+zip":"epub",exi:"exi","font-tdpfr":"pfr","gml+xml":"gml","gpx+xml":"gpx",gxf:"gxf",hyperstudio:"stk","inkml+xml":["ink","inkml"],ipfix:"ipfix","jsonml+json":"jsonml","lost+xml":"lostxml","mads+xml":"mads",marc:"mrc","marcxml+xml":"mrcx","mathml+xml":["mathml","mml"],mbox:"mbox","mediaservercontrol+xml":"mscml","metalink+xml":"metalink","metalink4+xml":"meta4","mets+xml":"mets","mods+xml":"mods",mp21:["m21","mp21"],mp4:"mp4s","oebps-package+xml":"opf","omdoc+xml":"omdoc",onenote:["onetoc","onetoc2","onetmp","onepkg"],oxps:"oxps","patch-ops-error+xml":"xer","pgp-encrypted":"pgp",pkcs10:"p10","pkcs7-mime":["p7m","p7c"],"pkcs7-signature":"p7s",pkcs8:"p8","pkix-attr-cert":"ac","pkix-crl":"crl","pkix-pkipath":"pkipath",pkixcmp:"pki","pls+xml":"pls","prs.cww":"cww","pskc+xml":"pskcxml","reginfo+xml":"rif","relax-ng-compact-syntax":"rnc","resource-lists+xml":"rl","resource-lists-diff+xml":"rld","rls-services+xml":"rs","rpki-ghostbusters":"gbr","rpki-manifest":"mft","rpki-roa":"roa","rsd+xml":"rsd","sbml+xml":"sbml","scvp-cv-request":"scq","scvp-cv-response":"scs","scvp-vp-request":"spq","scvp-vp-response":"spp",sdp:"sdp","set-payment-initiation":"setpay","set-registration-initiation":"setreg","shf+xml":"shf","sparql-query":"rq","sparql-results+xml":"srx",srgs:"gram","srgs+xml":"grxml","sru+xml":"sru","ssdl+xml":"ssdl","ssml+xml":"ssml","tei+xml":["tei","teicorpus"],"thraud+xml":"tfi","timestamped-data":"tsd","vnd.3gpp.pic-bw-large":"plb","vnd.3gpp.pic-bw-small":"psb","vnd.3gpp.pic-bw-var":"pvb","vnd.3gpp2.tcap":"tcap","vnd.3m.post-it-notes":"pwn","vnd.accpac.simply.aso":"aso","vnd.accpac.simply.imp":"imp","vnd.acucobol":"acu","vnd.acucorp":["atc","acutc"],"vnd.adobe.air-application-installer-package+zip":"air","vnd.adobe.formscentral.fcdt":"fcdt","vnd.adobe.fxp":["fxp","fxpl"],"vnd.adobe.xdp+xml":"xdp","vnd.adobe.xfdf":"xfdf","vnd.ahead.space":"ahead","vnd.airzip.filesecure.azf":"azf","vnd.airzip.filesecure.azs":"azs","vnd.amazon.ebook":"azw","vnd.americandynamics.acc":"acc","vnd.amiga.ami":"ami","vnd.anser-web-certificate-issue-initiation":"cii","vnd.anser-web-funds-transfer-initiation":"fti","vnd.antix.game-component":"atx","vnd.apple.installer+xml":"mpkg","vnd.apple.mpegurl":"m3u8","vnd.aristanetworks.swi":"swi","vnd.astraea-software.iota":"iota","vnd.audiograph":"aep","vnd.blueice.multipass":"mpm","vnd.bmi":"bmi","vnd.businessobjects":"rep","vnd.chemdraw+xml":"cdxml","vnd.chipnuts.karaoke-mmd":"mmd","vnd.claymore":"cla","vnd.cloanto.rp9":"rp9","vnd.clonk.c4group":["c4g","c4d","c4f","c4p","c4u"],"vnd.cluetrust.cartomobile-config":"c11amc","vnd.cluetrust.cartomobile-config-pkg":"c11amz","vnd.commonspace":"csp","vnd.contact.cmsg":"cdbcmsg","vnd.cosmocaller":"cmc","vnd.crick.clicker":"clkx","vnd.crick.clicker.keyboard":"clkk","vnd.crick.clicker.palette":"clkp","vnd.crick.clicker.template":"clkt","vnd.crick.clicker.wordbank":"clkw","vnd.criticaltools.wbs+xml":"wbs","vnd.ctc-posml":"pml","vnd.cups-ppd":"ppd","vnd.curl.car":"car","vnd.curl.pcurl":"pcurl","vnd.dart":"dart","vnd.data-vision.rdz":"rdz","vnd.dece.data":["uvf","uvvf","uvd","uvvd"],"vnd.dece.ttml+xml":["uvt","uvvt"],"vnd.dece.unspecified":["uvx","uvvx"],"vnd.dece.zip":["uvz","uvvz"],"vnd.denovo.fcselayout-link":"fe_launch","vnd.dna":"dna","vnd.dolby.mlp":"mlp","vnd.dpgraph":"dpg","vnd.dreamfactory":"dfac","vnd.ds-keypoint":"kpxx","vnd.dvb.ait":"ait","vnd.dvb.service":"svc","vnd.dynageo":"geo","vnd.ecowin.chart":"mag","vnd.enliven":"nml","vnd.epson.esf":"esf","vnd.epson.msf":"msf","vnd.epson.quickanime":"qam","vnd.epson.salt":"slt","vnd.epson.ssf":"ssf","vnd.eszigno3+xml":["es3","et3"],"vnd.ezpix-album":"ez2","vnd.ezpix-package":"ez3","vnd.fdf":"fdf","vnd.fdsn.mseed":"mseed","vnd.fdsn.seed":["seed","dataless"],"vnd.flographit":"gph","vnd.fluxtime.clip":"ftc","vnd.framemaker":["fm","frame","maker","book"],"vnd.frogans.fnc":"fnc","vnd.frogans.ltf":"ltf","vnd.fsc.weblaunch":"fsc","vnd.fujitsu.oasys":"oas","vnd.fujitsu.oasys2":"oa2","vnd.fujitsu.oasys3":"oa3","vnd.fujitsu.oasysgp":"fg5","vnd.fujitsu.oasysprs":"bh2","vnd.fujixerox.ddd":"ddd","vnd.fujixerox.docuworks":"xdw","vnd.fujixerox.docuworks.binder":"xbd","vnd.fuzzysheet":"fzs","vnd.genomatix.tuxedo":"txd","vnd.geogebra.file":"ggb","vnd.geogebra.tool":"ggt","vnd.geometry-explorer":["gex","gre"],"vnd.geonext":"gxt","vnd.geoplan":"g2w","vnd.geospace":"g3w","vnd.gmx":"gmx","vnd.grafeq":["gqf","gqs"],"vnd.groove-account":"gac","vnd.groove-help":"ghf","vnd.groove-identity-message":"gim","vnd.groove-injector":"grv","vnd.groove-tool-message":"gtm","vnd.groove-tool-template":"tpl","vnd.groove-vcard":"vcg","vnd.hal+xml":"hal","vnd.handheld-entertainment+xml":"zmm","vnd.hbci":"hbci","vnd.hhe.lesson-player":"les","vnd.hp-hpgl":"hpgl","vnd.hp-hpid":"hpid","vnd.hp-hps":"hps","vnd.hp-jlyt":"jlt","vnd.hp-pcl":"pcl","vnd.hp-pclxl":"pclxl","vnd.hydrostatix.sof-data":"sfd-hdstx","vnd.ibm.minipay":"mpy","vnd.ibm.modcap":["afp","listafp","list3820"],"vnd.ibm.rights-management":"irm","vnd.ibm.secure-container":"sc","vnd.iccprofile":["icc","icm"],"vnd.igloader":"igl","vnd.immervision-ivp":"ivp","vnd.immervision-ivu":"ivu","vnd.insors.igm":"igm","vnd.intercon.formnet":["xpw","xpx"],"vnd.intergeo":"i2g","vnd.intu.qbo":"qbo","vnd.intu.qfx":"qfx","vnd.ipunplugged.rcprofile":"rcprofile","vnd.irepository.package+xml":"irp","vnd.is-xpr":"xpr","vnd.isac.fcs":"fcs","vnd.jam":"jam","vnd.jcp.javame.midlet-rms":"rms","vnd.jisp":"jisp","vnd.joost.joda-archive":"joda","vnd.kahootz":["ktz","ktr"],"vnd.kde.karbon":"karbon","vnd.kde.kchart":"chrt","vnd.kde.kformula":"kfo","vnd.kde.kivio":"flw","vnd.kde.kontour":"kon","vnd.kde.kpresenter":["kpr","kpt"],"vnd.kde.kspread":"ksp","vnd.kde.kword":["kwd","kwt"],"vnd.kenameaapp":"htke","vnd.kidspiration":"kia","vnd.kinar":["kne","knp"],"vnd.koan":["skp","skd","skt","skm"],"vnd.kodak-descriptor":"sse","vnd.las.las+xml":"lasxml","vnd.llamagraphics.life-balance.desktop":"lbd","vnd.llamagraphics.life-balance.exchange+xml":"lbe","vnd.lotus-1-2-3":"123","vnd.lotus-approach":"apr","vnd.lotus-freelance":"pre","vnd.lotus-notes":"nsf","vnd.lotus-organizer":"org","vnd.lotus-screencam":"scm","vnd.lotus-wordpro":"lwp","vnd.macports.portpkg":"portpkg","vnd.mcd":"mcd","vnd.medcalcdata":"mc1","vnd.mediastation.cdkey":"cdkey","vnd.mfer":"mwf","vnd.mfmp":"mfm","vnd.micrografx.flo":"flo","vnd.micrografx.igx":"igx","vnd.mif":"mif","vnd.mobius.daf":"daf","vnd.mobius.dis":"dis","vnd.mobius.mbk":"mbk","vnd.mobius.mqy":"mqy","vnd.mobius.msl":"msl","vnd.mobius.plc":"plc","vnd.mobius.txf":"txf","vnd.mophun.application":"mpn","vnd.mophun.certificate":"mpc","vnd.ms-artgalry":"cil","vnd.ms-cab-compressed":"cab","vnd.ms-excel.addin.macroenabled.12":"xlam","vnd.ms-excel.sheet.binary.macroenabled.12":"xlsb","vnd.ms-excel.sheet.macroenabled.12":"xlsm","vnd.ms-excel.template.macroenabled.12":"xltm","vnd.ms-fontobject":"eot","vnd.ms-htmlhelp":"chm","vnd.ms-ims":"ims","vnd.ms-lrm":"lrm","vnd.ms-officetheme":"thmx","vnd.ms-powerpoint.addin.macroenabled.12":"ppam","vnd.ms-powerpoint.presentation.macroenabled.12":"pptm","vnd.ms-powerpoint.slide.macroenabled.12":"sldm","vnd.ms-powerpoint.slideshow.macroenabled.12":"ppsm","vnd.ms-powerpoint.template.macroenabled.12":"potm","vnd.ms-project":["mpp","mpt"],"vnd.ms-word.document.macroenabled.12":"docm","vnd.ms-word.template.macroenabled.12":"dotm","vnd.ms-works":["wps","wks","wcm","wdb"],"vnd.ms-wpl":"wpl","vnd.ms-xpsdocument":"xps","vnd.mseq":"mseq","vnd.musician":"mus","vnd.muvee.style":"msty","vnd.mynfc":"taglet","vnd.neurolanguage.nlu":"nlu","vnd.nitf":["ntf","nitf"],"vnd.noblenet-directory":"nnd","vnd.noblenet-sealer":"nns","vnd.noblenet-web":"nnw","vnd.nokia.n-gage.data":"ngdat","vnd.nokia.n-gage.symbian.install":"n-gage","vnd.nokia.radio-preset":"rpst","vnd.nokia.radio-presets":"rpss","vnd.novadigm.edm":"edm","vnd.novadigm.edx":"edx","vnd.novadigm.ext":"ext","vnd.oasis.opendocument.chart-template":"otc","vnd.oasis.opendocument.formula-template":"odft","vnd.oasis.opendocument.image-template":"oti","vnd.olpc-sugar":"xo","vnd.oma.dd2+xml":"dd2","vnd.openofficeorg.extension":"oxt","vnd.openxmlformats-officedocument.presentationml.slide":"sldx","vnd.osgeo.mapguide.package":"mgp","vnd.osgi.dp":"dp","vnd.osgi.subsystem":"esa","vnd.palm":["pdb","pqa","oprc"],"vnd.pawaafile":"paw","vnd.pg.format":"str","vnd.pg.osasli":"ei6","vnd.picsel":"efif","vnd.pmi.widget":"wg","vnd.pocketlearn":"plf","vnd.powerbuilder6":"pbd","vnd.previewsystems.box":"box","vnd.proteus.magazine":"mgz","vnd.publishare-delta-tree":"qps","vnd.pvi.ptid1":"ptid","vnd.quark.quarkxpress":["qxd","qxt","qwd","qwt","qxl","qxb"],"vnd.realvnc.bed":"bed","vnd.recordare.musicxml":"mxl","vnd.recordare.musicxml+xml":"musicxml","vnd.rig.cryptonote":"cryptonote","vnd.rn-realmedia":"rm","vnd.rn-realmedia-vbr":"rmvb","vnd.route66.link66+xml":"link66","vnd.sailingtracker.track":"st","vnd.seemail":"see","vnd.sema":"sema","vnd.semd":"semd","vnd.semf":"semf","vnd.shana.informed.formdata":"ifm","vnd.shana.informed.formtemplate":"itp","vnd.shana.informed.interchange":"iif","vnd.shana.informed.package":"ipk","vnd.simtech-mindmapper":["twd","twds"],"vnd.smart.teacher":"teacher","vnd.solent.sdkm+xml":["sdkm","sdkd"],"vnd.spotfire.dxp":"dxp","vnd.spotfire.sfs":"sfs","vnd.stepmania.package":"smzip","vnd.stepmania.stepchart":"sm","vnd.sus-calendar":["sus","susp"],"vnd.svd":"svd","vnd.syncml+xml":"xsm","vnd.syncml.dm+wbxml":"bdm","vnd.syncml.dm+xml":"xdm","vnd.tao.intent-module-archive":"tao","vnd.tcpdump.pcap":["pcap","cap","dmp"],"vnd.tmobile-livetv":"tmo","vnd.trid.tpt":"tpt","vnd.triscape.mxs":"mxs","vnd.trueapp":"tra","vnd.ufdl":["ufd","ufdl"],"vnd.uiq.theme":"utz","vnd.umajin":"umj","vnd.unity":"unityweb","vnd.uoml+xml":"uoml","vnd.vcx":"vcx","vnd.visionary":"vis","vnd.vsf":"vsf","vnd.webturbo":"wtb","vnd.wolfram.player":"nbp","vnd.wqd":"wqd","vnd.wt.stf":"stf","vnd.xara":"xar","vnd.xfdl":"xfdl","vnd.yamaha.hv-dic":"hvd","vnd.yamaha.hv-script":"hvs","vnd.yamaha.hv-voice":"hvp","vnd.yamaha.openscoreformat":"osf","vnd.yamaha.openscoreformat.osfpvg+xml":"osfpvg","vnd.yamaha.smaf-audio":"saf","vnd.yamaha.smaf-phrase":"spf","vnd.yellowriver-custom-menu":"cmp","vnd.zul":["zir","zirz"],"vnd.zzazz.deck+xml":"zaz","voicexml+xml":"vxml",widget:"wgt",winhlp:"hlp","wsdl+xml":"wsdl","wspolicy+xml":"wspolicy","x-ace-compressed":"ace","x-authorware-bin":["aab","x32","u32","vox"],"x-authorware-map":"aam","x-authorware-seg":"aas","x-blorb":["blb","blorb"],"x-bzip":"bz","x-bzip2":["bz2","boz"],"x-cfs-compressed":"cfs","x-chat":"chat","x-conference":"nsc","x-dgc-compressed":"dgc","x-dtbncx+xml":"ncx","x-dtbook+xml":"dtb","x-dtbresource+xml":"res","x-eva":"eva","x-font-bdf":"bdf","x-font-ghostscript":"gsf","x-font-linux-psf":"psf","x-font-pcf":"pcf","x-font-snf":"snf","x-font-ttf":["ttf","ttc"],"x-font-type1":["pfa","pfb","pfm","afm"],"x-freearc":"arc","x-gca-compressed":"gca","x-glulx":"ulx","x-gramps-xml":"gramps","x-install-instructions":"install","x-lzh-compressed":["lzh","lha"],"x-mie":"mie","x-mobipocket-ebook":["prc","mobi"],"x-ms-application":"application","x-ms-shortcut":"lnk","x-ms-xbap":"xbap","x-msbinder":"obd","x-mscardfile":"crd","x-msclip":"clp","application/x-ms-installer":"msi","x-msmediaview":["mvb","m13","m14"],"x-msmetafile":["wmf","wmz","emf","emz"],"x-msmoney":"mny","x-mspublisher":"pub","x-msschedule":"scd","x-msterminal":"trm","x-mswrite":"wri","x-nzb":"nzb","x-pkcs12":["p12","pfx"],"x-pkcs7-certificates":["p7b","spc"],"x-research-info-systems":"ris","x-silverlight-app":"xap","x-sql":"sql","x-stuffitx":"sitx","x-subrip":"srt","x-t3vm-image":"t3","x-tex-tfm":"tfm","x-tgif":"obj","x-xliff+xml":"xlf","x-xz":"xz","x-zmachine":["z1","z2","z3","z4","z5","z6","z7","z8"],"xaml+xml":"xaml","xcap-diff+xml":"xdf","xenc+xml":"xenc","xml-dtd":"dtd","xop+xml":"xop","xproc+xml":"xpl","xslt+xml":"xslt","xv+xml":["mxml","xhvml","xvml","xvm"],yang:"yang","yin+xml":"yin",envoy:"evy",fractals:"fif","internet-property-stream":"acx",olescript:"axs","vnd.ms-outlook":"msg","vnd.ms-pkicertstore":"sst","x-compress":"z","x-perfmon":["pma","pmc","pmr","pmw"],"ynd.ms-pkipko":"pko",gzip:["gz","tgz"],"smil+xml":["smi","smil"],"vnd.debian.binary-package":["deb","udeb"],"vnd.hzn-3d-crossword":"x3d","vnd.sqlite3":["db","sqlite","sqlite3","db-wal","sqlite-wal","db-shm","sqlite-shm"],"vnd.wap.sic":"sic","vnd.wap.slc":"slc","x-krita":["kra","krz"],"x-perl":["pm","pl"],yaml:["yaml","yml"]},audio:{amr:"amr","amr-wb":"awb",annodex:"axa",basic:["au","snd"],flac:"flac",midi:["mid","midi","kar","rmi"],mpeg:["mpga","mpega","mp3","m4a","mp2a","m2a","m3a"],mpegurl:"m3u",ogg:["oga","ogg","spx"],"prs.sid":"sid","x-aiff":"aifc","x-gsm":"gsm","x-ms-wma":"wma","x-ms-wax":"wax","x-pn-realaudio":"ram","x-realaudio":"ra","x-sd2":"sd2",adpcm:"adp",mp4:"mp4a",s3m:"s3m",silk:"sil","vnd.dece.audio":["uva","uvva"],"vnd.digital-winds":"eol","vnd.dra":"dra","vnd.dts":"dts","vnd.dts.hd":"dtshd","vnd.lucent.voice":"lvp","vnd.ms-playready.media.pya":"pya","vnd.nuera.ecelp4800":"ecelp4800","vnd.nuera.ecelp7470":"ecelp7470","vnd.nuera.ecelp9600":"ecelp9600","vnd.rip":"rip",webm:"weba","x-caf":"caf","x-matroska":"mka","x-pn-realaudio-plugin":"rmp",xm:"xm",aac:"aac",aiff:["aiff","aif","aff"],opus:"opus",wav:"wav"},chemical:{"x-alchemy":"alc","x-cache":["cac","cache"],"x-cache-csf":"csf","x-cactvs-binary":["cbin","cascii","ctab"],"x-cdx":"cdx","x-chem3d":"c3d","x-cif":"cif","x-cmdf":"cmdf","x-cml":"cml","x-compass":"cpa","x-crossfire":"bsd","x-csml":["csml","csm"],"x-ctx":"ctx","x-cxf":["cxf","cef"],"x-embl-dl-nucleotide":["emb","embl"],"x-gamess-input":["inp","gam","gamin"],"x-gaussian-checkpoint":["fch","fchk"],"x-gaussian-cube":"cub","x-gaussian-input":["gau","gjc","gjf"],"x-gaussian-log":"gal","x-gcg8-sequence":"gcg","x-genbank":"gen","x-hin":"hin","x-isostar":["istr","ist"],"x-jcamp-dx":["jdx","dx"],"x-kinemage":"kin","x-macmolecule":"mcm","x-macromodel-input":"mmod","x-mdl-molfile":"mol","x-mdl-rdfile":"rd","x-mdl-rxnfile":"rxn","x-mdl-sdfile":"sd","x-mdl-tgf":"tgf","x-mmcif":"mcif","x-mol2":"mol2","x-molconn-Z":"b","x-mopac-graph":"gpt","x-mopac-input":["mop","mopcrt","zmt"],"x-mopac-out":"moo","x-ncbi-asn1":"asn","x-ncbi-asn1-ascii":["prt","ent"],"x-ncbi-asn1-binary":"val","x-rosdal":"ros","x-swissprot":"sw","x-vamas-iso14976":"vms","x-vmd":"vmd","x-xtel":"xtel","x-xyz":"xyz"},font:{otf:"otf",woff:"woff",woff2:"woff2"},image:{gif:"gif",ief:"ief",jpeg:["jpeg","jpg","jpe","jfif","jfif-tbnl","jif"],pcx:"pcx",png:"png","svg+xml":["svg","svgz"],tiff:["tiff","tif"],"vnd.djvu":["djvu","djv"],"vnd.wap.wbmp":"wbmp","x-canon-cr2":"cr2","x-canon-crw":"crw","x-cmu-raster":"ras","x-coreldraw":"cdr","x-coreldrawpattern":"pat","x-coreldrawtemplate":"cdt","x-corelphotopaint":"cpt","x-epson-erf":"erf","x-icon":"ico","x-jg":"art","x-jng":"jng","x-nikon-nef":"nef","x-olympus-orf":"orf","x-portable-anymap":"pnm","x-portable-bitmap":"pbm","x-portable-graymap":"pgm","x-portable-pixmap":"ppm","x-rgb":"rgb","x-xbitmap":"xbm","x-xpixmap":"xpm","x-xwindowdump":"xwd",bmp:"bmp",cgm:"cgm",g3fax:"g3",ktx:"ktx","prs.btif":"btif",sgi:"sgi","vnd.dece.graphic":["uvi","uvvi","uvg","uvvg"],"vnd.dwg":"dwg","vnd.dxf":"dxf","vnd.fastbidsheet":"fbs","vnd.fpx":"fpx","vnd.fst":"fst","vnd.fujixerox.edmics-mmr":"mmr","vnd.fujixerox.edmics-rlc":"rlc","vnd.ms-modi":"mdi","vnd.ms-photo":"wdp","vnd.net-fpx":"npx","vnd.xiff":"xif",webp:"webp","x-3ds":"3ds","x-cmx":"cmx","x-freehand":["fh","fhc","fh4","fh5","fh7"],"x-pict":["pic","pct"],"x-tga":"tga","cis-cod":"cod",avif:"avifs",heic:["heif","heic"],pjpeg:["pjpg"],"vnd.adobe.photoshop":"psd","x-adobe-dng":"dng","x-fuji-raf":"raf","x-icns":"icns","x-kodak-dcr":"dcr","x-kodak-k25":"k25","x-kodak-kdc":"kdc","x-minolta-mrw":"mrw","x-panasonic-raw":["raw","rw2","rwl"],"x-pentax-pef":["pef","ptx"],"x-sigma-x3f":"x3f","x-sony-arw":"arw","x-sony-sr2":"sr2","x-sony-srf":"srf"},message:{rfc822:["eml","mime","mht","mhtml","nws"]},model:{iges:["igs","iges"],mesh:["msh","mesh","silo"],vrml:["wrl","vrml"],"x3d+vrml":["x3dv","x3dvz"],"x3d+xml":"x3dz","x3d+binary":["x3db","x3dbz"],"vnd.collada+xml":"dae","vnd.dwf":"dwf","vnd.gdl":"gdl","vnd.gtw":"gtw","vnd.mts":"mts","vnd.usdz+zip":"usdz","vnd.vtu":"vtu"},text:{"cache-manifest":["manifest","appcache"],calendar:["ics","icz","ifb"],css:"css",csv:"csv",h323:"323",html:["html","htm","shtml","stm"],iuls:"uls",plain:["txt","text","brf","conf","def","list","log","in","bas","diff","ksh"],richtext:"rtx",scriptlet:["sct","wsc"],texmacs:"tm","tab-separated-values":"tsv","vnd.sun.j2me.app-descriptor":"jad","vnd.wap.wml":"wml","vnd.wap.wmlscript":"wmls","x-bibtex":"bib","x-boo":"boo","x-c++hdr":["h++","hpp","hxx","hh"],"x-c++src":["c++","cpp","cxx","cc"],"x-component":"htc","x-dsrc":"d","x-diff":"patch","x-haskell":"hs","x-java":"java","x-literate-haskell":"lhs","x-moc":"moc","x-pascal":["p","pas","pp","inc"],"x-pcs-gcd":"gcd","x-python":"py","x-scala":"scala","x-setext":"etx","x-tcl":["tcl","tk"],"x-tex":["tex","ltx","sty","cls"],"x-vcalendar":"vcs","x-vcard":"vcf",n3:"n3","prs.lines.tag":"dsc",sgml:["sgml","sgm"],troff:["t","tr","roff","man","me","ms"],turtle:"ttl","uri-list":["uri","uris","urls"],vcard:"vcard","vnd.curl":"curl","vnd.curl.dcurl":"dcurl","vnd.curl.scurl":"scurl","vnd.curl.mcurl":"mcurl","vnd.dvb.subtitle":"sub","vnd.fly":"fly","vnd.fmi.flexstor":"flx","vnd.graphviz":"gv","vnd.in3d.3dml":"3dml","vnd.in3d.spot":"spot","x-asm":["s","asm"],"x-c":["c","h","dic"],"x-fortran":["f","for","f77","f90"],"x-opml":"opml","x-nfo":"nfo","x-sfv":"sfv","x-uuencode":"uu",webviewhtml:"htt",javascript:"js",json:"json",markdown:["md","markdown","mdown","markdn"],"vnd.wap.si":"si","vnd.wap.sl":"sl"},video:{avif:"avif","3gpp":"3gp",annodex:"axv",dl:"dl",dv:["dif","dv"],fli:"fli",gl:"gl",mpeg:["mpeg","mpg","mpe","m1v","m2v","mp2","mpa","mpv2"],mp4:["mp4","mp4v","mpg4"],quicktime:["qt","mov"],ogg:"ogv","vnd.mpegurl":["mxu","m4u"],"x-flv":"flv","x-la-asf":["lsf","lsx"],"x-mng":"mng","x-ms-asf":["asf","asx","asr"],"x-ms-wm":"wm","x-ms-wmv":"wmv","x-ms-wmx":"wmx","x-ms-wvx":"wvx","x-msvideo":"avi","x-sgi-movie":"movie","x-matroska":["mpv","mkv","mk3d","mks"],"3gpp2":"3g2",h261:"h261",h263:"h263",h264:"h264",jpeg:"jpgv",jpm:["jpm","jpgm"],mj2:["mj2","mjp2"],"vnd.dece.hd":["uvh","uvvh"],"vnd.dece.mobile":["uvm","uvvm"],"vnd.dece.pd":["uvp","uvvp"],"vnd.dece.sd":["uvs","uvvs"],"vnd.dece.video":["uvv","uvvv"],"vnd.dvb.file":"dvb","vnd.fvt":"fvt","vnd.ms-playready.media.pyv":"pyv","vnd.uvvu.mp4":["uvu","uvvu"],"vnd.vivo":"viv",webm:"webm","x-f4v":"f4v","x-m4v":"m4v","x-ms-vob":"vob","x-smv":"smv",mp2t:"ts"},"x-conference":{"x-cooltalk":"ice"},"x-world":{"x-vrml":["vrm","flr","wrz","xaf","xof"]}},Ie=(()=>{const e={};for(const t of n.keys(Ue))for(const r of n.keys(Ue[t])){const n=Ue[t][r];if("string"==typeof n)e[n]=t+"/"+r;else for(let i=0;ie;e++){let t=e;for(let e=0;8>e;e++)1&t?t=t>>>1^3988292384:t>>>=1;Ne[e]=t}class Pe{constructor(e){this.crc=e||-1}append(e){let t=0|this.crc;for(let n=0,r=0|e.length;r>n;n++)t=t>>>8^Ne[255&(t^e[n])];this.crc=t}get(){return~this.crc}}class je extends z{constructor(){let e;const t=new Pe;super({transform(e,n){t.append(e),n.enqueue(e)},flush(){const n=new p(4);new w(n.buffer).setUint32(0,t.get()),e.value=n}}),e=this}}function Oe(e){if(typeof b==Ae){const t=new p((e=unescape(encodeURIComponent(e))).length);for(let n=0;n0&&t&&(e[n-1]=He.partial(t,e[n-1]&2147483648>>t-1,1)),e},partial:(e,t,n)=>32===e?t:(n?0|t:t<<32-e)+1099511627776*e,getPartial:e=>a.round(e/1099511627776)||32,_shiftRight(e,t,n,r){for(void 0===r&&(r=[]);t>=32;t-=32)r.push(n),n=0;if(0===t)return r.concat(e);for(let i=0;i>>t),n=e[i]<<32-t;const i=e.length?e[e.length-1]:0,s=He.getPartial(i);return r.push(He.partial(t+s&31,t+s>32?n:r.pop(),1)),r}},Be={bytes:{fromBits(e){const t=He.bitLength(e)/8,n=new p(t);let r;for(let i=0;t>i;i++)0==(3&i)&&(r=e[i/4]),n[i]=r>>>24,r<<=8;return n},toBits(e){const t=[];let n,r=0;for(n=0;n9007199254740991)throw new u("Cannot hash more than 2^53 - 1 bits");const s=new h(n);let a=0;for(let e=t.blockSize+r-(t.blockSize+r&t.blockSize-1);i>=e;e+=t.blockSize)t._block(s.subarray(16*a,16*(a+1))),a+=1;return n.splice(0,16*a),t}finalize(){const e=this;let t=e._buffer;const n=e._h;t=He.concat(t,[He.partial(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(a.floor(e._length/4294967296)),t.push(0|e._length);t.length;)e._block(t.splice(0,16));return e.reset(),n}_f(e,t,n,r){return e>19?e>39?e>59?e>79?void 0:t^n^r:t&n|t&r|n&r:t^n^r:t&n|~t&r}_S(e,t){return t<>>32-e}_block(e){const n=this,r=n._h,i=t(80);for(let t=0;16>t;t++)i[t]=e[t];let s=r[0],o=r[1],l=r[2],c=r[3],d=r[4];for(let e=0;79>=e;e++){16>e||(i[e]=n._S(1,i[e-3]^i[e-8]^i[e-14]^i[e-16]));const t=n._S(5,s)+n._f(e,o,l,c)+d+i[e]+n._key[a.floor(e/20)]|0;d=c,c=l,l=n._S(30,o),o=s,s=t}r[0]=r[0]+s|0,r[1]=r[1]+o|0,r[2]=r[2]+l|0,r[3]=r[3]+c|0,r[4]=r[4]+d|0}},Ze={getRandomValues(e){const t=new h(e.buffer),n=e=>{let t=987654321;const n=4294967295;return()=>(t=36969*(65535&t)+(t>>16)&n,(((t<<16)+(e=18e3*(65535&e)+(e>>16)&n)&n)/4294967296+.5)*(a.random()>.5?1:-1))};for(let r,i=0;inew Ve.hmacSha1(Be.bytes.toBits(e)),pbkdf2(e,t,n,r){if(n=n||1e4,0>r||0>n)throw new u("invalid params to pbkdf2");const i=1+(r>>5)<<2;let s,a,o,l,c;const d=new ArrayBuffer(i),f=new w(d);let p=0;const m=He;for(t=Be.bytes.toBits(t),c=1;(i||1)>p;c++){for(s=a=e.encrypt(m.concat(t,[c])),o=1;n>o;o++)for(a=e.encrypt(a),l=0;lp&&oi&&(e=(new n).update(e).finalize());for(let t=0;i>t;t++)r[0][t]=909522486^e[t],r[1][t]=1549556828^e[t];t._baseHash[0].update(r[0]),t._baseHash[1].update(r[1]),t._resultHash=new n(t._baseHash[0])}reset(){const e=this;e._resultHash=new e._hash(e._baseHash[0]),e._updated=!1}update(e){this._updated=!0,this._resultHash.update(e)}digest(){const e=this,t=e._resultHash.finalize(),n=new e._hash(e._baseHash[1]).update(t).finalize();return e.reset(),n}encrypt(e){if(this._updated)throw new u("encrypt on already updated hmac called!");return this.update(e),this.digest(e)}}},Ke=typeof _!=Ae&&typeof _.getRandomValues==De,Ge="Invalid password",Xe="Invalid signature",Ye="zipjs-abort-check-password";function Je(e){return Ke?_.getRandomValues(e):Ze.getRandomValues(e)}const Qe=16,$e={name:"PBKDF2"},et=n.assign({hash:{name:"HMAC"}},$e),tt=n.assign({iterations:1e3,hash:{name:"SHA-1"}},$e),nt=["deriveBits"],rt=[8,12,16],it=[16,24,32],st=10,at=[0,0,0,0],ot=typeof _!=Ae,lt=ot&&_.subtle,ct=ot&&typeof lt!=Ae,dt=Be.bytes,ft=class{constructor(e){const t=this;t._tables=[[[],[],[],[],[]],[[],[],[],[],[]]],t._tables[0][0][0]||t._precompute();const n=t._tables[0][4],r=t._tables[1],i=e.length;let s,a,o,l=1;if(4!==i&&6!==i&&8!==i)throw new u("invalid aes key size");for(t._key=[a=e.slice(0),o=[]],s=i;4*i+28>s;s++){let e=a[s-1];(s%i==0||8===i&&s%i==4)&&(e=n[e>>>24]<<24^n[e>>16&255]<<16^n[e>>8&255]<<8^n[255&e],s%i==0&&(e=e<<8^e>>>24^l<<24,l=l<<1^283*(l>>7))),a[s]=a[s-i]^e}for(let e=0;s;e++,s--){const t=a[3&e?s:s-4];o[e]=4>=s||4>e?t:r[0][n[t>>>24]]^r[1][n[t>>16&255]]^r[2][n[t>>8&255]]^r[3][n[255&t]]}}encrypt(e){return this._crypt(e,0)}decrypt(e){return this._crypt(e,1)}_precompute(){const e=this._tables[0],t=this._tables[1],n=e[4],r=t[4],i=[],s=[];let a,o,l,c;for(let e=0;256>e;e++)s[(i[e]=e<<1^283*(e>>7))^e]=e;for(let d=a=0;!n[d];d^=o||1,a=s[a]||1){let s=a^a<<1^a<<2^a<<3^a<<4;s=s>>8^255&s^99,n[d]=s,r[s]=d,c=i[l=i[o=i[d]]];let f=16843009*c^65537*l^257*o^16843008*d,u=257*i[s]^16843008*s;for(let n=0;4>n;n++)e[n][d]=u=u<<24^u>>>8,t[n][s]=f=f<<24^f>>>8}for(let n=0;5>n;n++)e[n]=e[n].slice(0),t[n]=t[n].slice(0)}_crypt(e,t){if(4!==e.length)throw new u("invalid aes block size");const n=this._key[t],r=n.length/4-2,i=[0,0,0,0],s=this._tables[t],a=s[0],o=s[1],l=s[2],c=s[3],d=s[4];let f,p,m,h=e[0]^n[0],w=e[t?3:1]^n[1],x=e[2]^n[2],g=e[t?1:3]^n[3],b=4;for(let e=0;r>e;e++)f=a[h>>>24]^o[w>>16&255]^l[x>>8&255]^c[255&g]^n[b],p=a[w>>>24]^o[x>>16&255]^l[g>>8&255]^c[255&h]^n[b+1],m=a[x>>>24]^o[g>>16&255]^l[h>>8&255]^c[255&w]^n[b+2],g=a[g>>>24]^o[h>>16&255]^l[w>>8&255]^c[255&x]^n[b+3],b+=4,h=f,w=p,x=m;for(let e=0;4>e;e++)i[t?3&-e:e]=d[h>>>24]<<24^d[w>>16&255]<<16^d[x>>8&255]<<8^d[255&g]^n[b++],f=h,h=w,w=x,x=g,g=f;return i}},ut=class{constructor(e,t){this._prf=e,this._initIv=t,this._iv=t}reset(){this._iv=this._initIv}update(e){return this.calculate(this._prf,e,this._iv)}incWord(e){if(255==(e>>24&255)){let t=e>>16&255,n=e>>8&255,r=255&e;255===t?(t=0,255===n?(n=0,255===r?r=0:++r):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=r}else e+=1<<24;return e}incCounter(e){0===(e[0]=this.incWord(e[0]))&&(e[1]=this.incWord(e[1]))}calculate(e,t,n){let r;if(!(r=t.length))return[];const i=He.bitLength(t);for(let i=0;r>i;i+=4){this.incCounter(n);const r=e.encrypt(n);t[i]^=r[0],t[i+1]^=r[1],t[i+2]^=r[2],t[i+3]^=r[3]}return He.clamp(t,i)}},pt=Ve.hmacSha1;let mt=ot&&ct&&typeof lt.importKey==De,ht=ot&&ct&&typeof lt.deriveBits==De;class wt extends z{constructor({password:e,rawPassword:t,signed:r,encryptionStrength:i,checkPasswordOnly:s}){super({start(){n.assign(this,{ready:new g((e=>this.resolveReady=e)),password:vt(e,t),signed:r,strength:i-1,pending:new p})},async transform(e,t){const n=this,{password:r,strength:i,resolveReady:a,ready:o}=n;r?(await(async(e,t,n,r)=>{const i=await bt(e,t,n,_t(r,0,rt[t])),s=_t(r,rt[t]);if(i[0]!=s[0]||i[1]!=s[1])throw new u(Ge)})(n,i,r,_t(e,0,rt[i]+2)),e=_t(e,rt[i]+2),s?t.error(new u(Ye)):a()):await o;const l=new p(e.length-st-(e.length-st)%Qe);t.enqueue(gt(n,e,l,0,st,!0))},async flush(e){const{signed:t,ctr:n,hmac:r,pending:i,ready:s}=this;if(r&&n){await s;const a=_t(i,0,i.length-st),o=_t(i,i.length-st);let l=new p;if(a.length){const e=zt(dt,a);r.update(e);const t=n.update(e);l=kt(dt,t)}if(t){const e=_t(kt(dt,r.digest()),0,st);for(let t=0;st>t;t++)if(e[t]!=o[t])throw new u(Xe)}e.enqueue(l)}}})}}class xt extends z{constructor({password:e,rawPassword:t,encryptionStrength:r}){let i;super({start(){n.assign(this,{ready:new g((e=>this.resolveReady=e)),password:vt(e,t),strength:r-1,pending:new p})},async transform(e,t){const n=this,{password:r,strength:i,resolveReady:s,ready:a}=n;let o=new p;r?(o=await(async(e,t,n)=>{const r=Je(new p(rt[t]));return yt(r,await bt(e,t,n,r))})(n,i,r),s()):await a;const l=new p(o.length+e.length-e.length%Qe);l.set(o,0),t.enqueue(gt(n,e,l,o.length,0))},async flush(e){const{ctr:t,hmac:n,pending:r,ready:s}=this;if(n&&t){await s;let a=new p;if(r.length){const e=t.update(zt(dt,r));n.update(e),a=kt(dt,e)}i.signature=kt(dt,n.digest()).slice(0,st),e.enqueue(yt(a,i.signature))}}}),i=this}}function gt(e,t,n,r,i,s){const{ctr:a,hmac:o,pending:l}=e,c=t.length-i;let d;for(l.length&&(t=yt(l,t),n=((e,t)=>{if(t&&t>e.length){const n=e;(e=new p(t)).set(n,0)}return e})(n,c-c%Qe)),d=0;c-Qe>=d;d+=Qe){const e=zt(dt,_t(t,d,d+Qe));s&&o.update(e);const i=a.update(e);s||o.update(i),n.set(kt(dt,i),d+r)}return e.pending=_t(t,d),n}async function bt(e,r,i,s){e.password=null;const a=await(async(e,t,n,r,i)=>{if(!mt)return Ve.importKey(t);try{return await lt.importKey("raw",t,n,!1,i)}catch(e){return mt=!1,Ve.importKey(t)}})(0,i,et,0,nt),o=await(async(e,t,n)=>{if(!ht)return Ve.pbkdf2(t,e.salt,tt.iterations,n);try{return await lt.deriveBits(e,t,n)}catch(r){return ht=!1,Ve.pbkdf2(t,e.salt,tt.iterations,n)}})(n.assign({salt:s},tt),a,8*(2*it[r]+2)),l=new p(o),c=zt(dt,_t(l,0,it[r])),d=zt(dt,_t(l,it[r],2*it[r])),f=_t(l,2*it[r]);return n.assign(e,{keys:{key:c,authentication:d,passwordVerification:f},ctr:new ut(new ft(c),t.from(at)),hmac:new pt(d)}),f}function vt(e,t){return t===Se?Oe(e):t}function yt(e,t){let n=e;return e.length+t.length&&(n=new p(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function _t(e,t,n){return e.subarray(t,n)}function kt(e,t){return e.fromBits(t)}function zt(e,t){return e.toBits(t)}class St extends z{constructor({password:e,passwordVerification:t,checkPasswordOnly:r}){super({start(){n.assign(this,{password:e,passwordVerification:t}),Rt(this,e)},transform(e,t){const n=this;if(n.password){const t=Dt(n,e.subarray(0,12));if(n.password=null,t[11]!=n.passwordVerification)throw new u(Ge);e=e.subarray(12)}r?t.error(new u(Ye)):t.enqueue(Dt(n,e))}})}}class At extends z{constructor({password:e,passwordVerification:t}){super({start(){n.assign(this,{password:e,passwordVerification:t}),Rt(this,e)},transform(e,t){const n=this;let r,i;if(n.password){n.password=null;const t=Je(new p(12));t[11]=n.passwordVerification,r=new p(e.length+t.length),r.set(Ct(n,t),0),i=12}else r=new p(e.length),i=0;r.set(Ct(n,e),i),t.enqueue(r)}})}}function Dt(e,t){const n=new p(t.length);for(let r=0;r>>24]),i=~e.crcKey2.get(),e.keys=[n,r,i]}function Et(e){const t=2|e.keys[2];return Ft(a.imul(t,1^t)>>>8)}function Ft(e){return 255&e}function Tt(e){return 4294967295&e}const qt="deflate-raw";class Lt extends z{constructor(e,{chunkSize:t,CompressionStream:n,CompressionStreamNative:r}){super({});const{compressed:i,encrypted:s,useCompressionStream:a,zipCrypto:o,signed:l,level:c}=e,d=this;let f,u,p=It(super.readable);s&&!o||!l||(f=new je,p=jt(p,f)),i&&(p=Pt(p,a,{level:c,chunkSize:t},r,n)),s&&(o?p=jt(p,new At(e)):(u=new xt(e),p=jt(p,u))),Nt(d,p,(()=>{let e;s&&!o&&(e=u.signature),s&&!o||!l||(e=new w(f.value.buffer).getUint32(0)),d.signature=e}))}}class Ut extends z{constructor(e,{chunkSize:t,DecompressionStream:n,DecompressionStreamNative:r}){super({});const{zipCrypto:i,encrypted:s,signed:a,signature:o,compressed:l,useCompressionStream:c}=e;let d,f,p=It(super.readable);s&&(i?p=jt(p,new St(e)):(f=new wt(e),p=jt(p,f))),l&&(p=Pt(p,c,{chunkSize:t},r,n)),s&&!i||!a||(d=new je,p=jt(p,d)),Nt(this,p,(()=>{if((!s||i)&&a){const e=new w(d.value.buffer);if(o!=e.getUint32(0,!1))throw new u(Xe)}}))}}function It(e){return jt(e,new z({transform(e,t){e&&e.length&&t.enqueue(e)}}))}function Nt(e,t,r){t=jt(t,new z({flush:r})),n.defineProperty(e,"readable",{get:()=>t})}function Pt(e,t,n,r,i){try{e=jt(e,new(t&&r?r:i)(qt,n))}catch(r){if(!t)return e;try{e=jt(e,new i(qt,n))}catch(t){return e}}return e}function jt(e,t){return e.pipeThrough(t)}const Ot="data",Ht="close",Bt="deflate",Mt="inflate";class Zt extends z{constructor(e,t){super({});const r=this,{codecType:i}=e;let s;i.startsWith(Bt)?s=Lt:i.startsWith(Mt)&&(s=Ut);let a=0,o=0;const l=new s(e,t),c=super.readable,d=new z({transform(e,t){e&&e.length&&(o+=e.length,t.enqueue(e))},flush(){n.assign(r,{inputSize:o})}}),f=new z({transform(e,t){e&&e.length&&(a+=e.length,t.enqueue(e))},flush(){const{signature:e}=l;n.assign(r,{signature:e,outputSize:a,inputSize:o})}});n.defineProperty(r,"readable",{get:()=>c.pipeThrough(d).pipeThrough(l).pipeThrough(f)})}}class Vt extends z{constructor(e){let t;super({transform:function n(r,i){if(t){const e=new p(t.length+r.length);e.set(t),e.set(r,t.length),r=e,t=null}r.length>e?(i.enqueue(r.slice(0,e)),n(r.slice(e),i)):t=r},flush(e){t&&t.length&&e.enqueue(t)}})}}let Kt=typeof W!=Ae;class Gt{constructor(e,{readable:t,writable:r},{options:i,config:s,streamOptions:a,useWebWorkers:o,transferStreams:l,scripts:c},d){const{signal:f}=a;return n.assign(e,{busy:!0,readable:t.pipeThrough(new Vt(s.chunkSize)).pipeThrough(new Xt(t,a),{signal:f}),writable:r,options:n.assign({},i),scripts:c,transferStreams:l,terminate:()=>new g((t=>{const{worker:n,busy:r}=e;n?(r?e.resolveTerminated=t:(n.terminate(),t()),e.interface=null):t()})),onTaskFinished(){const{resolveTerminated:t}=e;t&&(e.resolveTerminated=null,e.terminated=!0,e.worker.terminate(),t()),e.busy=!1,d(e)}}),(o&&Kt?Qt:Jt)(e,s)}}class Xt extends z{constructor(e,{onstart:t,onprogress:n,size:r,onend:i}){let s=0;super({async start(){t&&await Yt(t,r)},async transform(e,t){s+=e.length,n&&await Yt(n,s,r),t.enqueue(e)},async flush(){e.size=s,i&&await Yt(i,s)}})}}async function Yt(e,...t){try{await e(...t)}catch(e){}}function Jt(e,t){return{run:()=>(async({options:e,readable:t,writable:n,onTaskFinished:r},i)=>{try{const s=new Zt(e,i);await t.pipeThrough(s).pipeTo(n,{preventClose:!0,preventAbort:!0});const{signature:a,inputSize:o,outputSize:l}=s;return{signature:a,inputSize:o,outputSize:l}}finally{r()}})(e,t)}}function Qt(e,t){const{baseURL:r,chunkSize:i}=t;if(!e.interface){let s;try{s=((e,t,r)=>{const i={type:"module"};let s,a;typeof e==De&&(e=e());try{s=new f(e,t)}catch(t){s=e}if($t)try{a=new W(s)}catch(e){$t=!1,a=new W(s,i)}else a=new W(s,i);return a.addEventListener("message",(e=>(async({data:e},t)=>{const{type:r,value:i,messageId:s,result:a,error:o}=e,{reader:l,writer:c,resolveResult:d,rejectResult:f,onTaskFinished:m}=t;try{if(o){const{message:e,stack:t,code:r,name:i}=o,s=new u(e);n.assign(s,{stack:t,code:r,name:i}),h(s)}else{if("pull"==r){const{value:e,done:n}=await l.read();tn({type:Ot,value:e,done:n,messageId:s},t)}r==Ot&&(await c.ready,await c.write(new p(i)),tn({type:"ack",messageId:s},t)),r==Ht&&h(null,a)}}catch(o){tn({type:Ht,messageId:s},t),h(o)}function h(e,t){e?f(e):d(t),c&&c.releaseLock(),m()}})(e,r))),a})(e.scripts[0],r,e)}catch(n){return Kt=!1,Jt(e,t)}n.assign(e,{worker:s,interface:{run:()=>(async(e,t)=>{let r,i;const s=new g(((e,t)=>{r=e,i=t}));n.assign(e,{reader:null,writer:null,resolveResult:r,rejectResult:i,result:s});const{readable:a,options:o,scripts:l}=e,{writable:c,closed:d}=(e=>{let t;const n=new g((e=>t=e));return{writable:new A({async write(t){const n=e.getWriter();await n.ready,await n.write(t),n.releaseLock()},close(){t()},abort:t=>e.getWriter().abort(t)}),closed:n}})(e.writable),f=tn({type:"start",scripts:l.slice(1),options:o,config:t,readable:a,writable:c},e);f||n.assign(e,{reader:a.getReader(),writer:c.getWriter()});const u=await s;return f||await c.getWriter().close(),await d,u})(e,{chunkSize:i})}})}return e.interface}let $t=!0,en=!0;function tn(e,{worker:t,writer:n,onTaskFinished:r,transferStreams:i}){try{let{value:n,readable:r,writable:s}=e;const a=[];if(n&&(n.byteLength{const n=nn.find((e=>!e.busy));if(n)return on(n),new Gt(n,e,t,h);if(nn.lengthrn.push({resolve:n,stream:e,workerOptions:t})))})()).run();function h(e){if(rn.length){const[{resolve:t,stream:n,workerOptions:r}]=rn.splice(0,1);t(new Gt(e,n,r,h))}else e.worker?(on(e),((e,t)=>{const{config:n}=t,{terminateWorkerTimeout:r}=n;i.isFinite(r)&&r>=0&&(e.terminated?e.terminated=!1:e.terminateTimeout=setTimeout((async()=>{nn=nn.filter((t=>t!=e));try{await e.terminate()}catch(e){}}),r))})(e,t)):nn=nn.filter((t=>t!=e))}}function on(e){const{terminateTimeout:t}=e;t&&(clearTimeout(t),e.terminateTimeout=null)}function ln(e,t,r){return class{constructor(i){const s=this;var a,o;a=i,o="level",(typeof n.hasOwn===De?n.hasOwn(a,o):a.hasOwnProperty(o))&&i.level===Se&&delete i.level,s.codec=new e(n.assign({},t,i)),r(s.codec,(e=>{if(s.pendingData){const t=s.pendingData;s.pendingData=new p(t.length+e.length);const{pendingData:n}=s;n.set(t,0),n.set(e,t.length)}else s.pendingData=new p(e)}))}append(e){return this.codec.push(e),i(this)}flush(){return this.codec.push(new p,!0),i(this)}};function i(e){if(e.pendingData){const t=e.pendingData;return e.pendingData=null,t}return new p}}const cn="HTTP error ",dn="HTTP Range not supported",fn="Writer iterator completed too soon",un="GET",pn="bytes",mn=65536,hn="writable";class wn{constructor(){this.size=0}init(){this.initialized=!0}}class xn extends wn{get readable(){const e=this,{chunkSize:t=mn}=e,n=new S({start(){this.chunkOffset=0},async pull(r){const{offset:i=0,size:s,diskNumberStart:o}=n,{chunkOffset:l}=this;r.enqueue(await Vn(e,i+l,a.min(t,s-l),o)),l+t>s?r.close():this.chunkOffset+=t}});return n}}class gn extends wn{constructor(){super();const e=this,t=new A({write:t=>e.writeUint8Array(t)});n.defineProperty(e,hn,{get:()=>t})}writeUint8Array(){}}class bn extends xn{constructor(e){super();let t=e.length;for(;"="==e.charAt(t-1);)t--;const r=e.indexOf(",")+1;n.assign(this,{dataURI:e,dataStart:r,size:a.floor(.75*(t-r))})}readUint8Array(e,t){const{dataStart:n,dataURI:r}=this,i=new p(t),s=4*a.floor(e/3),o=atob(r.substring(s+n,4*a.ceil((e+t)/3)+n)),l=e-3*a.floor(s/4);for(let e=l;l+t>e;e++)i[e-l]=o.charCodeAt(e);return i}}class vn extends gn{constructor(e){super(),n.assign(this,{data:"data:"+(e||"")+";base64,",pending:[]})}writeUint8Array(e){const t=this;let n=0,i=t.pending;const s=t.pending.length;for(t.pending="",n=0;n<3*a.floor((s+e.length)/3)-s;n++)i+=r.fromCharCode(e[n]);for(;n2?t.data+=k(i):t.pending=i}getData(){return this.data+k(this.pending)}}class yn extends xn{constructor(e){super(),n.assign(this,{blob:e,size:e.size})}async readUint8Array(e,t){const n=this,r=e+t,i=e||rt&&(s=s.slice(e,r)),new p(s)}}class _n extends wn{constructor(e){super();const t=new z,r=[];e&&r.push(["Content-Type",e]),n.defineProperty(this,hn,{get:()=>t.writable}),this.blob=new d(t.readable,{headers:r}).blob()}getData(){return this.blob}}class kn extends yn{constructor(e){super(new x([e],{type:"text/plain"}))}}class zn extends _n{constructor(e){super(e),n.assign(this,{encoding:e,utf8:!e||"utf-8"==e.toLowerCase()})}async getData(){const{encoding:e,utf8:t}=this,r=await super.getData();if(r.text&&t)return r.text();{const t=new FileReader;return new g(((i,s)=>{n.assign(t,{onload:({target:e})=>i(e.result),onerror:()=>s(t.error)}),t.readAsText(r,e)}))}}}class Sn extends xn{constructor(e,t){super(),Dn(this,e,t)}async init(){await Cn(this,Un,Fn),super.init()}readUint8Array(e,t){return Rn(this,e,t,Un,Fn)}}class An extends xn{constructor(e,t){super(),Dn(this,e,t)}async init(){await Cn(this,In,Tn),super.init()}readUint8Array(e,t){return Rn(this,e,t,In,Tn)}}function Dn(e,t,r){const{preventHeadRequest:i,useRangeHeader:s,forceRangeRequests:a}=r;delete(r=n.assign({},r)).preventHeadRequest,delete r.useRangeHeader,delete r.forceRangeRequests,delete r.useXHR,n.assign(e,{url:t,options:r,preventHeadRequest:i,useRangeHeader:s,forceRangeRequests:a})}async function Cn(e,t,n){const{url:r,useRangeHeader:s,forceRangeRequests:a}=e;if((e=>{const{baseURL:t}=Fe(),{protocol:n}=new f(e,t);return"http:"==n||"https:"==n})(r)&&(s||a)){const{headers:r}=await t(un,e,Wn(e));if(!a&&r.get("Accept-Ranges")!=pn)throw new u(dn);{let s;const a=r.get("Content-Range");if(a){const e=a.trim().split(/\s*\/\s*/);if(e.length){const t=e[1];t&&"*"!=t&&(s=i(t))}}s===Se?await Ln(e,t,n):e.size=s}}else await Ln(e,t,n)}async function Rn(e,t,n,r,i){const{useRangeHeader:s,forceRangeRequests:a,options:o}=e;if(s||a){const i=await r(un,e,Wn(e,t,n));if(206!=i.status)throw new u(dn);return new p(await i.arrayBuffer())}{const{data:r}=e;return r||await i(e,o),new p(e.data.subarray(t,t+n))}}function Wn(e,t=0,r=1){return n.assign({},En(e),{Range:pn+"="+t+"-"+(t+r-1)})}function En({options:e}){const{headers:t}=e;if(t)return Symbol.iterator in t?n.fromEntries(t):t}async function Fn(e){await qn(e,Un)}async function Tn(e){await qn(e,In)}async function qn(e,t){const n=await t(un,e,En(e));e.data=new p(await n.arrayBuffer()),e.size||(e.size=e.data.length)}async function Ln(e,t,n){if(e.preventHeadRequest)await n(e,e.options);else{const r=(await t("HEAD",e,En(e))).headers.get("Content-Length");r?e.size=i(r):await n(e,e.options)}}async function Un(e,{options:t,url:r},i){const s=await fetch(r,n.assign({},t,{method:e,headers:i}));if(400>s.status)return s;throw 416==s.status?new u(dn):new u(cn+(s.statusText||s.status))}function In(e,{url:t},r){return new g(((i,s)=>{const a=new XMLHttpRequest;if(a.addEventListener("load",(()=>{if(400>a.status){const e=[];a.getAllResponseHeaders().trim().split(/[\r\n]+/).forEach((t=>{const n=t.trim().split(/\s*:\s*/);n[0]=n[0].trim().replace(/^[a-z]|-[a-z]/g,(e=>e.toUpperCase())),e.push(n)})),i({status:a.status,arrayBuffer:()=>a.response,headers:new l(e)})}else s(416==a.status?new u(dn):new u(cn+(a.statusText||a.status)))}),!1),a.addEventListener("error",(e=>s(e.detail?e.detail.error:new u("Network error"))),!1),a.open(e,t),r)for(const e of n.entries(r))a.setRequestHeader(e[0],e[1]);a.responseType="arraybuffer",a.send()}))}class Nn extends xn{constructor(e,t={}){super(),n.assign(this,{url:e,reader:t.useXHR?new An(e,t):new Sn(e,t)})}set size(e){}get size(){return this.reader.size}async init(){await this.reader.init(),super.init()}readUint8Array(e,t){return this.reader.readUint8Array(e,t)}}class Pn extends xn{constructor(e){super(),n.assign(this,{array:e,size:e.length})}readUint8Array(e,t){return this.array.slice(e,e+t)}}class jn extends gn{init(e=0){n.assign(this,{offset:0,array:new p(e)}),super.init()}writeUint8Array(e){const t=this;if(t.offset+e.length>t.array.length){const n=t.array;t.array=new p(n.length+e.length),t.array.set(n)}t.array.set(e,t.offset),t.offset+=e.length}getData(){return this.array}}class On extends xn{constructor(e){super(),this.readers=e}async init(){const e=this,{readers:t}=e;e.lastDiskNumber=0,e.lastDiskOffset=0,await g.all(t.map((async(n,r)=>{await n.init(),r!=t.length-1&&(e.lastDiskOffset+=n.size),e.size+=n.size}))),super.init()}async readUint8Array(e,t,n=0){const r=this,{readers:i}=this;let s,o=n;-1==o&&(o=i.length-1);let l=e;for(;l>=i[o].size;)l-=i[o].size,o++;const c=i[o],d=c.size;if(l+t>d){const i=d-l;s=new p(t),s.set(await Vn(c,l,i)),s.set(await r.readUint8Array(e+i,t-i,n),i)}else s=await Vn(c,l,t);return r.lastDiskNumber=a.max(o,r.lastDiskNumber),s}}class Hn extends wn{constructor(e,t=4294967295){super();const r=this;let i,s,a;n.assign(r,{diskNumber:0,diskOffset:0,size:0,maxSize:t,availableSize:t});const o=new A({async write(t){const{availableSize:n}=r;if(a)t.lengtho})}}async function Bn(e,t){if(!e.init||e.initialized)return g.resolve();await e.init(t)}function Mn(e){return t.isArray(e)&&(e=new On(e)),e instanceof S&&(e={readable:e}),e}function Zn(e){e.writable===Se&&typeof e.next==De&&(e=new Hn(e)),e instanceof A&&(e={writable:e});const{writable:t}=e;return t.size===Se&&(t.size=0),e instanceof Hn||n.assign(e,{diskNumber:0,diskOffset:0,availableSize:1/0,maxSize:1/0}),e}function Vn(e,t,n,r){return e.readUint8Array(t,n,r)}const Kn=On,Gn=Hn,Xn="\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ ".split("");function Yn(e,t){return t&&"cp437"==t.trim().toLowerCase()?(e=>{{let t="";for(let n=0;nthis[t]=e[t]))}}const hr="File format is not recognized",wr="End of central directory not found",xr="End of Zip64 central directory not found",gr="End of Zip64 central directory locator not found",br="Central directory header not found",vr="Local file header not found",yr="Zip64 extra field not found",_r="File contains encrypted entry",kr="Encryption method not supported",zr="Compression method not supported",Sr="Split zip file",Ar="utf-8",Dr="cp437",Cr=[[tr,ue],[nr,ue],[rr,ue],[ir,pe]],Rr={[pe]:{getValue:jr,bytes:4},[ue]:{getValue:Or,bytes:8}};class Wr{constructor(e,t={}){n.assign(this,{reader:Mn(e),options:t,config:Fe()})}async*getEntriesGenerator(e={}){const t=this;let{reader:r}=t;const{config:i}=t;if(await Bn(r),r.size!==Se&&r.readUint8Array||(r=new yn(await new d(r.readable).blob()),await Bn(r)),r.size{const r=new p(4);return Hr(r).setUint32(0,101010256,!0),await i(22)||await i(a.min(1048582,n));async function i(t){const i=n-t,s=await Vn(e,i,t);for(let e=s.length-22;e>=0;e--)if(s[e]==r[0]&&s[e+1]==r[1]&&s[e+2]==r[2]&&s[e+3]==r[3])return{offset:i+e,buffer:s.slice(e,e+22).buffer}}})(r,0,r.size);if(!s)throw jr(Hr(await Vn(r,0,4)))==he?new u(Sr):new u(wr);const o=Hr(s);let l=jr(o,12),c=jr(o,16);const f=s.offset,m=Pr(o,20),h=f+be+m;let w=Pr(o,4);const x=r.lastDiskNumber||0;let b=Pr(o,6),v=Pr(o,8),y=0,_=0;if(c==ue||l==ue||v==pe||b==pe){const e=Hr(await Vn(r,s.offset-20,20));if(jr(e,0)!=ge)throw new u(xr);c=Or(e,8);let t=await Vn(r,c,56,-1),n=Hr(t);const i=s.offset-20-56;if(jr(n,0)!=xe&&c!=i){const e=c;c=i,y=c-e,t=await Vn(r,c,56,-1),n=Hr(t)}if(jr(n,0)!=xe)throw new u(gr);w==pe&&(w=jr(n,16)),b==pe&&(b=jr(n,20)),v==pe&&(v=Or(n,32)),l==ue&&(l=Or(n,40)),c-=l}if(cc)throw new u(hr);let k=0,z=await Vn(r,c,l,b),S=Hr(z);if(l){const e=s.offset-l;if(jr(S,k)!=we&&c!=e){const t=c;c=e,y+=c-t,z=await Vn(r,c,l,b),S=Hr(z)}}const A=s.offset-c-(r.lastDiskOffset||0);if(l==A||0>A||(l=A,z=await Vn(r,c,l,b),S=Hr(z)),0>c||c>=r.size)throw new u(hr);const D=Lr(t,e,"filenameEncoding"),C=Lr(t,e,"commentEncoding");for(let s=0;v>s;s++){const o=new Er(r,i,t.options);if(jr(S,k)!=we)throw new u(br);Fr(o,S,k+6);const l=!!o.bitFlag.languageEncodingFlag,c=k+46,d=c+o.filenameLength,f=d+o.extraFieldLength,p=Pr(S,k+4),m=0==(0&p),h=z.subarray(c,d),w=Pr(S,k+32),x=f+w,b=z.subarray(f,x),A=l,R=l,W=m&&16==(16&Nr(S,k+38)),E=jr(S,k+42)+y;n.assign(o,{versionMadeBy:p,msDosCompatible:m,compressedSize:0,uncompressedSize:0,commentLength:w,directory:W,offset:E,diskNumberStart:Pr(S,k+34),internalFileAttribute:Pr(S,k+36),externalFileAttribute:jr(S,k+38),rawFilename:h,filenameUTF8:A,commentUTF8:R,rawExtraField:z.subarray(d,f)});const[F,T]=await g.all([Yn(h,A?Ar:D||Dr),Yn(b,R?Ar:C||Dr)]);n.assign(o,{rawComment:b,filename:F,comment:T,directory:W||F.endsWith(_e)}),_=a.max(E,_),await Tr(o,o,S,k+6);const q=new mr(o);q.getData=(e,t)=>o.getData(e,q,t),k=x;const{onprogress:L}=e;if(L)try{await L(s+1,v,new mr(o))}catch(e){}yield q}const R=Lr(t,e,"extractPrependedData"),W=Lr(t,e,"extractAppendedData");return R&&(t.prependedData=_>0?await Vn(r,0,_):new p),t.comment=m?await Vn(r,f+be,m):new p,W&&(t.appendedData=h>>8&255:m>>>24&255),signature:m,compressed:0!=c,encrypted:_,useWebWorkers:Lr(i,r,"useWebWorkers"),useCompressionStream:Lr(i,r,"useCompressionStream"),transferStreams:Lr(i,r,"transferStreams"),checkPasswordOnly:R},config:d,streamOptions:{signal:C,size:S,onstart:E,onprogress:F,onend:T}};let L=0;try{({outputSize:L}=await an({readable:D,writable:W},q))}catch(e){if(!R||e.message!=Ye)throw e}finally{const e=Lr(i,r,"preventClose");W.size+=L,e||W.locked||await W.getWriter().close()}return R?Se:e.getData?e.getData():W}}function Fr(e,t,r){const i=e.rawBitFlag=Pr(t,r+2),s=1==(1&i),a=jr(t,r+6);n.assign(e,{encrypted:s,version:Pr(t,r),bitFlag:{level:(6&i)>>1,dataDescriptor:8==(8&i),languageEncodingFlag:(i&ye)==ye},rawLastModDate:a,lastModDate:Ur(a),filenameLength:Pr(t,r+22),extraFieldLength:Pr(t,r+24)})}async function Tr(e,t,r,i,s){const{rawExtraField:a}=t,c=t.extraField=new l,d=Hr(new p(a));let f=0;try{for(;f{t.zip64=!0;const n=Hr(e.data),r=Cr.filter((([e,n])=>t[e]==n));for(let i=0,s=0;i{const i=Hr(e.data),s=Nr(i,4);n.assign(e,{vendorVersion:Nr(i,0),vendorId:Nr(i,2),strength:s,originalCompressionMethod:r,compressionMethod:Pr(i,5)}),t.compressionMethod=e.compressionMethod})(g,t,m),t.extraFieldAES=g):t.compressionMethod=m;const b=c.get(10);b&&(((e,t)=>{const r=Hr(e.data);let i,s=4;try{for(;s{const r=Hr(e.data),i=Nr(r,0),s=[],a=[];n?(1==(1&i)&&(s.push(sr),a.push(ar)),2==(2&i)&&(s.push(or),a.push("rawLastAccessDate")),4==(4&i)&&(s.push(lr),a.push("rawCreationDate"))):5>e.data.length||(s.push(sr),a.push(ar));let l=1;s.forEach(((n,i)=>{if(e.data.length>=l+4){const s=jr(r,l);t[n]=e[n]=new o(1e3*s);const c=a[i];e[c]=s}l+=4}))})(v,t,s),t.extraFieldExtendedTimestamp=v);const y=c.get(6534);y&&(t.extraFieldUSDZ=y)}async function qr(e,t,r,i,s){const a=Hr(e.data),o=new Pe;o.append(s[r]);const l=Hr(new p(4));l.setUint32(0,o.get(),!0);const c=jr(a,1);n.assign(e,{version:Nr(a,0),[t]:Yn(e.data.subarray(5)),valid:!s.bitFlag.languageEncodingFlag&&c==jr(l,0)}),e.valid&&(i[t]=e[t],i[t+"UTF8"]=!0)}function Lr(e,t,n){return t[n]===Se?e.options[n]:t[n]}function Ur(e){const t=(4294901760&e)>>16,n=65535&e;try{return new o(1980+((65024&t)>>9),((480&t)>>5)-1,31&t,(63488&n)>>11,(2016&n)>>5,2*(31&n),0)}catch(e){}}function Ir(e){return new o(i(e/s(1e4)-s(116444736e5)))}function Nr(e,t){return e.getUint8(t)}function Pr(e,t){return e.getUint16(t,!0)}function jr(e,t){return e.getUint32(t,!0)}function Or(e,t){return i(e.getBigUint64(t,!0))}function Hr(e){return new w(e.buffer)}const Br="File already exists",Mr="Zip file comment exceeds 64KB",Zr="File entry comment exceeds 64KB",Vr="File entry name exceeds 64KB",Kr="Version exceeds 65535",Gr="The strength must equal 1, 2, or 3",Xr="Extra field type exceeds 65535",Yr="Extra field data exceeds 64KB",Jr="Zip64 is not supported (make sure 'keepOrder' is set to 'true')",Qr=new p([7,0,2,0,65,69,3,0,0]);let $r=0;const ei=[];class ti{constructor(e,t={}){const r=(e=Zn(e)).availableSize!==Se&&e.availableSize>0&&e.availableSize!==1/0&&e.maxSize!==Se&&e.maxSize>0&&e.maxSize!==1/0;n.assign(this,{writer:e,addSplitZipSignature:r,options:t,config:Fe(),files:new l,filenames:new c,offset:e.writable.size,pendingEntriesSize:0,pendingAddFileCalls:new c,bufferedWrites:0})}async add(e="",r,i={}){const l=this,{pendingAddFileCalls:c,config:f}=l;let x;$rei.push(e)));try{if(e=e.trim(),l.filenames.has(e))throw new u(Br);return l.filenames.add(e),x=(async(e,r,i,l)=>{r=r.trim(),l.directory&&!r.endsWith(_e)?r+=_e:l.directory=r.endsWith(_e);const c=Oe(r);if(fi(c)>pe)throw new u(Vr);const f=l.comment||"",x=Oe(f);if(fi(x)>pe)throw new u(Zr);const b=ii(e,l,"version",20);if(b>pe)throw new u(Kr);const v=ii(e,l,"versionMadeBy",20);if(v>pe)throw new u(Kr);const y=ii(e,l,sr,new o),_=ii(e,l,or),k=ii(e,l,lr),S=ii(e,l,fr,!0),A=ii(e,l,cr,0),D=ii(e,l,dr,0),C=ii(e,l,"password"),R=ii(e,l,"rawPassword"),W=ii(e,l,"encryptionStrength",3),E=ii(e,l,"zipCrypto"),F=ii(e,l,"extendedTimestamp",!0),T=ii(e,l,"keepOrder",!0),q=ii(e,l,"level"),L=ii(e,l,"useWebWorkers"),U=ii(e,l,"bufferedWrite"),I=ii(e,l,"dataDescriptorSignature",!1),N=ii(e,l,"signal"),P=ii(e,l,"useCompressionStream");let j=ii(e,l,"dataDescriptor",!0),O=ii(e,l,ur);if(C!==Se&&W!==Se&&(1>W||W>3))throw new u(Gr);let H=new p;const{extraField:B}=l;if(B){let e=0,t=0;B.forEach((t=>e+=4+fi(t))),H=new p(e),B.forEach(((e,n)=>{if(n>pe)throw new u(Xr);if(fi(e)>pe)throw new u(Yr);ci(H,new m([n]),t),ci(H,new m([fi(e)]),t+2),ci(H,e,t+4),t+=4+fi(e)}))}let M=0,Z=0,V=0;const K=!0===O;i&&(i=Mn(i),await Bn(i),i.size===Se?(j=!0,(O||O===Se)&&(O=!0,V=M=ue)):(V=i.size,M=(e=>e+5*(a.floor(e/16383)+1))(V)));const{diskOffset:G,diskNumber:X,maxSize:Y}=e.writer,J=K||V>=ue,Q=K||M>=ue,$=K||e.offset+e.pendingEntriesSize-G>=ue,ee=ii(e,l,"supportZip64SplitFile",!0)&&K||X+a.ceil(e.pendingEntriesSize/Y)>=pe;if($||J||Q||ee){if(!1===O||!T)throw new u(Jr);O=!0}O=O||!1;const te=(e=>{const{rawFilename:t,lastModDate:n,lastAccessDate:r,creationDate:i,rawPassword:s,password:o,level:l,zip64:c,zipCrypto:d,dataDescriptor:f,directory:u,rawExtraField:m,encryptionStrength:w,extendedTimestamp:x}=e,g=0!==l&&!u,b=!!(o&&fi(o)||s&&fi(s));let v,y,_,k,z=e.version;if(b&&!d){v=new p(fi(Qr)+2);const e=di(v);ai(e,0,39169),ci(v,Qr,2),si(e,8,w)}else v=new p;if(x){_=new p(9+(r?4:0)+(i?4:0));const e=di(_);ai(e,0,ve),ai(e,2,fi(_)-4),k=1+(r?2:0)+(i?4:0),si(e,4,k);let t=5;oi(e,t,a.floor(n.getTime()/1e3)),t+=4,r&&(oi(e,t,a.floor(r.getTime()/1e3)),t+=4),i&&oi(e,t,a.floor(i.getTime()/1e3));try{y=new p(36);const e=di(y),t=ri(n);ai(e,0,10),ai(e,2,32),ai(e,8,1),ai(e,10,24),li(e,12,t),li(e,20,ri(r)||t),li(e,28,ri(i)||t)}catch(e){y=new p}}else y=_=new p;let S=ye;f&&(S|=8);let A=0;g&&(A=8),c&&(z=z>45?z:45),b&&(S|=1,d||(z=z>51?z:51,A=99,g&&(v[9]=8)));const D=new p(26),C=di(D);ai(C,0,z),ai(C,2,S),ai(C,4,A);const R=new h(1),W=di(R);let E;E=ze>n?ze:n>ke?ke:n,ai(W,0,(E.getHours()<<6|E.getMinutes())<<5|E.getSeconds()/2),ai(W,2,(E.getFullYear()-1980<<4|E.getMonth()+1)<<5|E.getDate());const F=R[0];oi(C,6,F),ai(C,22,fi(t));const T=fi(v,_,y,m);ai(C,24,T);const q=new p(30+fi(t)+T);return oi(di(q),0,me),ci(q,D,4),ci(q,t,30),ci(q,v,30+fi(t)),ci(q,_,30+fi(t,v)),ci(q,y,30+fi(t,v,_)),ci(q,m,30+fi(t,v,_,y)),{localHeaderArray:q,headerArray:D,headerView:C,lastModDate:n,rawLastModDate:F,encrypted:b,compressed:g,version:z,compressionMethod:A,extraFieldExtendedTimestampFlag:k,rawExtraFieldExtendedTimestamp:_,rawExtraFieldNTFS:y,rawExtraFieldAES:v,extraFieldLength:T}})(l=n.assign({},l,{rawFilename:c,rawComment:x,version:b,versionMadeBy:v,lastModDate:y,lastAccessDate:_,creationDate:k,rawExtraField:H,zip64:O,zip64UncompressedSize:J,zip64CompressedSize:Q,zip64Offset:$,zip64DiskNumberStart:ee,password:C,rawPassword:R,level:q,useWebWorkers:L,encryptionStrength:W,extendedTimestamp:F,zipCrypto:E,bufferedWrite:U,keepOrder:T,dataDescriptor:j,dataDescriptorSignature:I,signal:N,msDosCompatible:S,internalFileAttribute:A,externalFileAttribute:D,useCompressionStream:P})),ne=(e=>{const{zip64:t,dataDescriptor:n,dataDescriptorSignature:r}=e;let i,s=new p,a=0;return n&&(s=new p(t?r?24:20:r?16:12),i=di(s),r&&(a=4,oi(i,0,134695760))),{dataDescriptorArray:s,dataDescriptorView:i,dataDescriptorOffset:a}})(l),re=fi(te.localHeaderArray,ne.dataDescriptorArray);let ie;Z=re+M,e.options.usdz&&(Z+=Z+64),e.pendingEntriesSize+=Z;try{ie=await(async(e,r,i,a,o)=>{const{files:l,writer:c}=e,{keepOrder:f,dataDescriptor:m,signal:h}=o,{headerInfo:x}=a,{usdz:b}=e.options,v=t.from(l.values()).pop();let y,_,k,S,A,D,C,R={};l.set(r,R);try{let t;f&&(t=v&&v.lock,R.lock=new g((e=>k=e))),!(o.bufferedWrite||e.writerLocked||e.bufferedWrites&&f)&&m||b?(D=c,await W()):(D=new z,C=new d(D.readable).blob(),D.writable.size=0,y=!0,e.bufferedWrites++,await Bn(c)),await Bn(D);const{writable:x}=c;let{diskOffset:F}=c;if(e.addSplitZipSignature){delete e.addSplitZipSignature;const t=new p(4);oi(di(t),0,he),await ni(x,t),e.offset+=4}b&&((e,t)=>{const{headerInfo:n}=e;let{localHeaderArray:r,extraFieldLength:i}=n,s=di(r),a=64-(t+fi(r))%64;4>a&&(a+=64);const o=new p(a),l=di(o);ai(l,0,6534),ai(l,2,a-2);const c=r;n.localHeaderArray=r=new p(fi(c)+a),ci(r,c),ci(r,o,fi(c)),s=di(r),ai(s,28,i+a),e.metadataSize+=a})(a,e.offset-F),y||(await t,await E(x));const{diskNumber:T}=c;if(A=!0,R.diskNumberStart=T,R=await(async(e,t,{diskNumberStart:r,lock:i},a,o,l)=>{const{headerInfo:c,dataDescriptorInfo:d,metadataSize:f}=a,{localHeaderArray:u,headerArray:m,lastModDate:h,rawLastModDate:w,encrypted:x,compressed:g,version:b,compressionMethod:v,rawExtraFieldExtendedTimestamp:y,extraFieldExtendedTimestampFlag:_,rawExtraFieldNTFS:k,rawExtraFieldAES:z}=c,{dataDescriptorArray:S}=d,{rawFilename:A,lastAccessDate:D,creationDate:C,password:R,rawPassword:W,level:E,zip64:F,zip64UncompressedSize:T,zip64CompressedSize:q,zip64Offset:L,zip64DiskNumberStart:U,zipCrypto:I,dataDescriptor:N,directory:P,versionMadeBy:j,rawComment:O,rawExtraField:H,useWebWorkers:B,onstart:M,onprogress:Z,onend:V,signal:K,encryptionStrength:G,extendedTimestamp:X,msDosCompatible:Y,internalFileAttribute:J,externalFileAttribute:Q,useCompressionStream:$}=l,ee={lock:i,versionMadeBy:j,zip64:F,directory:!!P,filenameUTF8:!0,rawFilename:A,commentUTF8:!0,rawComment:O,rawExtraFieldExtendedTimestamp:y,rawExtraFieldNTFS:k,rawExtraFieldAES:z,rawExtraField:H,extendedTimestamp:X,msDosCompatible:Y,internalFileAttribute:J,externalFileAttribute:Q,diskNumberStart:r};let te,ne=0,re=0;const{writable:ie}=t;if(e){e.chunkSize=Te(o),await ni(ie,u);const t=e.readable,n=t.size=e.size,r={options:{codecType:Bt,level:E,rawPassword:W,password:R,encryptionStrength:G,zipCrypto:x&&I,passwordVerification:x&&I&&w>>8&255,signed:!0,compressed:g,encrypted:x,useWebWorkers:B,useCompressionStream:$,transferStreams:!1},config:o,streamOptions:{signal:K,size:n,onstart:M,onprogress:Z,onend:V}},i=await an({readable:t,writable:ie},r);re=i.inputSize,ne=i.outputSize,te=i.signature,ie.size+=re}else await ni(ie,u);let se;if(F){let e=4;T&&(e+=8),q&&(e+=8),L&&(e+=8),U&&(e+=4),se=new p(e)}else se=new p;return((e,t)=>{const{signature:n,rawExtraFieldZip64:r,compressedSize:i,uncompressedSize:a,headerInfo:o,dataDescriptorInfo:l}=e,{headerView:c,encrypted:d}=o,{dataDescriptorView:f,dataDescriptorOffset:u}=l,{zip64:p,zip64UncompressedSize:m,zip64CompressedSize:h,zipCrypto:w,dataDescriptor:x}=t;if(d&&!w||n===Se||(oi(c,10,n),x&&oi(f,u,n)),p){const e=di(r);ai(e,0,1),ai(e,2,fi(r)-4);let t=4;m&&(oi(c,18,ue),li(e,t,s(a)),t+=8),h&&(oi(c,14,ue),li(e,t,s(i))),x&&(li(f,u+4,s(i)),li(f,u+12,s(a)))}else oi(c,14,i),oi(c,18,a),x&&(oi(f,u+4,i),oi(f,u+8,a))})({signature:te,rawExtraFieldZip64:se,compressedSize:ne,uncompressedSize:re,headerInfo:c,dataDescriptorInfo:d},l),N&&await ni(ie,S),n.assign(ee,{uncompressedSize:re,compressedSize:ne,lastModDate:h,rawLastModDate:w,creationDate:C,lastAccessDate:D,encrypted:x,size:f+ne,compressionMethod:v,version:b,headerArray:m,signature:te,rawExtraFieldZip64:se,extraFieldExtendedTimestampFlag:_,zip64UncompressedSize:T,zip64CompressedSize:q,zip64Offset:L,zip64DiskNumberStart:U}),ee})(i,D,R,a,e.config,o),A=!1,l.set(r,R),R.filename=r,y){await D.writable.getWriter().close();let e=await C;await t,await W(),S=!0,m||(e=await(async(e,t,n,{zipCrypto:r})=>{let i;i=await t.slice(0,26).arrayBuffer(),26!=i.byteLength&&(i=i.slice(0,26));const s=new w(i);return e.encrypted&&!r||oi(s,14,e.signature),e.zip64?(oi(s,18,ue),oi(s,22,ue)):(oi(s,18,e.compressedSize),oi(s,22,e.uncompressedSize)),await ni(n,new p(i)),t.slice(i.byteLength)})(R,e,x,o)),await E(x),R.diskNumberStart=c.diskNumber,F=c.diskOffset,await e.stream().pipeTo(x,{preventClose:!0,preventAbort:!0,signal:h}),x.size+=e.size,S=!1}if(R.offset=e.offset-F,R.zip64)((e,t)=>{const{rawExtraFieldZip64:n,offset:r,diskNumberStart:i}=e,{zip64UncompressedSize:a,zip64CompressedSize:o,zip64Offset:l,zip64DiskNumberStart:c}=t,d=di(n);let f=4;a&&(f+=8),o&&(f+=8),l&&(li(d,f,s(r)),f+=8),c&&oi(d,f,i)})(R,o);else if(R.offset>=ue)throw new u(Jr);return e.offset+=R.size,R}catch(t){if(y&&S||!y&&A){if(e.hasCorruptedEntries=!0,t)try{t.corruptedEntry=!0}catch(e){}y?e.offset+=D.writable.size:e.offset=D.writable.size}throw l.delete(r),t}finally{y&&e.bufferedWrites--,k&&k(),_&&_()}async function W(){e.writerLocked=!0;const{lockWriter:t}=e;e.lockWriter=new g((t=>_=()=>{e.writerLocked=!1,t()})),await t}async function E(e){fi(x.localHeaderArray)>c.availableSize&&(c.availableSize=0,await ni(e,new p))}})(e,r,i,{headerInfo:te,dataDescriptorInfo:ne,metadataSize:re},l)}finally{e.pendingEntriesSize-=Z}return n.assign(ie,{name:r,comment:f,extraField:B}),new mr(ie)})(l,e,r,i),c.add(x),await x}catch(t){throw l.filenames.delete(e),t}finally{c.delete(x);const e=ei.shift();e?e():$r--}}async close(e=new p,n={}){const{pendingAddFileCalls:r,writer:i}=this,{writable:o}=i;for(;r.size;)await g.allSettled(t.from(r));return await(async(e,n,r)=>{const{files:i,writer:o}=e,{diskOffset:l,writable:c}=o;let{diskNumber:d}=o,f=0,m=0,h=e.offset-l,w=i.size;for(const[,e]of i){const{rawFilename:t,rawExtraFieldZip64:n,rawExtraFieldAES:r,rawComment:i,rawExtraFieldNTFS:s,rawExtraField:o,extendedTimestamp:l,extraFieldExtendedTimestampFlag:c,lastModDate:d}=e;let f;if(l){f=new p(9);const e=di(f);ai(e,0,ve),ai(e,2,5),si(e,4,c),oi(e,5,a.floor(d.getTime()/1e3))}else f=new p;e.rawExtraFieldCDExtendedTimestamp=f,m+=46+fi(t,i,n,r,s,f,o)}const x=new p(m),g=di(x);await Bn(o);let b=0;for(const[e,n]of t.from(i.values()).entries()){const{offset:t,rawFilename:s,rawExtraFieldZip64:a,rawExtraFieldAES:l,rawExtraFieldCDExtendedTimestamp:d,rawExtraFieldNTFS:u,rawExtraField:p,rawComment:m,versionMadeBy:h,headerArray:w,directory:v,zip64:y,zip64UncompressedSize:_,zip64CompressedSize:k,zip64DiskNumberStart:z,zip64Offset:S,msDosCompatible:A,internalFileAttribute:D,externalFileAttribute:C,diskNumberStart:R,uncompressedSize:W,compressedSize:E}=n,F=fi(a,l,d,u,p);oi(g,f,we),ai(g,f+4,h);const T=di(w);_||oi(T,18,W),k||oi(T,14,E),ci(x,w,f+6),ai(g,f+30,F),ai(g,f+32,fi(m)),ai(g,f+34,y&&z?pe:R),ai(g,f+36,D),C?oi(g,f+38,C):v&&A&&si(g,f+38,16),oi(g,f+42,y&&S?ue:t),ci(x,s,f+46),ci(x,a,f+46+fi(s)),ci(x,l,f+46+fi(s,a)),ci(x,d,f+46+fi(s,a,l)),ci(x,u,f+46+fi(s,a,l,d)),ci(x,p,f+46+fi(s,a,l,d,u)),ci(x,m,f+46+fi(s)+F);const q=46+fi(s,m)+F;if(f-b>o.availableSize&&(o.availableSize=0,await ni(c,x.slice(b,f)),b=f),f+=q,r.onprogress)try{await r.onprogress(e+1,i.size,new mr(n))}catch(e){}}await ni(c,b?x.slice(b):x);let v=o.diskNumber;const{availableSize:y}=o;be>y&&v++;let _=ii(e,r,"zip64");if(!(ue>h&&ue>m&&pe>w&&pe>v)){if(!1===_)throw new u(Jr);_=!0}const k=new p(_?98:be),z=di(k);f=0,_&&(oi(z,0,xe),li(z,4,s(44)),ai(z,12,45),ai(z,14,45),oi(z,16,v),oi(z,20,d),li(z,24,s(w)),li(z,32,s(w)),li(z,40,s(m)),li(z,48,s(h)),oi(z,56,ge),li(z,64,s(h)+s(m)),oi(z,72,v+1),ii(e,r,"supportZip64SplitFile",!0)&&(v=pe,d=pe),w=pe,h=ue,m=ue,f+=76),oi(z,f,101010256),ai(z,f+4,v),ai(z,f+6,d),ai(z,f+8,w),ai(z,f+10,w),oi(z,f+12,m),oi(z,f+16,h);const S=fi(n);if(S){if(S>pe)throw new u(Mr);ai(z,f+20,S)}await ni(c,k),S&&await ni(c,n)})(this,e,n),ii(this,n,"preventClose")||await o.getWriter().close(),i.getData?i.getData():o}}async function ni(e,t){const n=e.getWriter();try{await n.ready,e.size+=fi(t),await n.write(t)}finally{n.releaseLock()}}function ri(e){if(e)return(s(e.getTime())+s(116444736e5))*s(1e4)}function ii(e,t,n,r){const i=t[n]===Se?e.options[n]:t[n];return i===Se?r:i}function si(e,t,n){e.setUint8(t,n)}function ai(e,t,n){e.setUint16(t,n,!0)}function oi(e,t,n){e.setUint32(t,n,!0)}function li(e,t,n){e.setBigUint64(t,n,!0)}function ci(e,t,n){e.set(t,n)}function di(e){return new w(e.buffer)}function fi(...e){let t=0;return e.forEach((e=>e&&(t+=e.length))),t}class ui{constructor(e,t,r,i){const s=this;if(e.root&&i&&i.getChildByName(t))throw new u("Entry filename already exists");r||(r={}),n.assign(s,{fs:e,name:t,data:r.data,options:r.options,id:e.entries.length,parent:i,children:[],uncompressedSize:r.uncompressedSize||0}),e.entries.push(s),i&&s.parent.children.push(s)}moveTo(e){this.fs.move(this,e)}getFullname(){return this.getRelativeName()}getRelativeName(e=this.fs.root){let t=this.name,n=this.parent;for(;n&&n!=e;)t=(n.name?n.name+"/":"")+t,n=n.parent;return t}isDescendantOf(e){let t=this.parent;for(;t&&t.id!=e.id;)t=t.parent;return!!t}rename(e){const t=this.parent;if(t&&t.getChildByName(e))throw new u("Entry filename already exists");this.name=e}}class pi extends ui{constructor(e,t,n,r){super(e,t,n,r);const i=this;i.Reader=n.Reader,i.Writer=n.Writer,n.getData&&(i.getData=n.getData)}clone(){return new pi(this.fs,this.name,this)}async getData(e,t={}){const n=this;if(!e||e.constructor==n.Writer&&n.data)return n.data;{const r=n.reader=new n.Reader(n.data,t),i=n.data?n.data.uncompressedSize:r.size;await g.all([Bn(r),Bn(e,i)]);const s=r.readable;return s.size=n.uncompressedSize=r.size,await s.pipeTo(e.writable),e.getData?e.getData():e.writable}}isPasswordProtected(){return this.data.encrypted}async checkPassword(e,t={}){const n=this;if(!n.isPasswordProtected())return!0;t.password=e,t.checkPasswordOnly=!0;try{return await n.data.getData(null,t),!0}catch(e){if(e.message==Ge)return!1;throw e}}getText(e,t){return this.getData(new zn(e),t)}getBlob(e,t){return this.getData(new _n(e),t)}getData64URI(e,t){return this.getData(new vn(e),t)}getUint8Array(e){return this.getData(new jn,e)}getWritable(e=new A,t){return this.getData({writable:e},t)}replaceBlob(e){n.assign(this,{data:e,Reader:yn,Writer:_n,reader:null})}replaceText(e){n.assign(this,{data:e,Reader:kn,Writer:zn,reader:null})}replaceData64URI(e){n.assign(this,{data:e,Reader:bn,Writer:vn,reader:null})}replaceUint8Array(e){n.assign(this,{data:e,Reader:Pn,Writer:jn,reader:null})}replaceReadable(e){n.assign(this,{data:null,Reader:()=>({readable:e}),Writer:null,reader:null})}}class mi extends ui{constructor(e,t,n,r){super(e,t,n,r),this.directory=!0}clone(e){const t=this,n=new mi(t.fs,t.name);return e&&(n.children=t.children.map((t=>{const r=t.clone(e);return r.parent=n,r}))),n}addDirectory(e,t){return _i(this,e,{options:t},!0)}addText(e,t,n={}){return _i(this,e,{data:t,Reader:kn,Writer:zn,options:n,uncompressedSize:t.length})}addBlob(e,t,n={}){return _i(this,e,{data:t,Reader:yn,Writer:_n,options:n,uncompressedSize:t.size})}addData64URI(e,t,n={}){let r=t.length;for(;"="==t.charAt(r-1);)r--;const i=t.indexOf(",")+1;return _i(this,e,{data:t,Reader:bn,Writer:vn,options:n,uncompressedSize:a.floor(.75*(r-i))})}addUint8Array(e,t,n={}){return _i(this,e,{data:t,Reader:Pn,Writer:jn,options:n,uncompressedSize:t.length})}addHttpContent(e,t,n={}){return _i(this,e,{data:t,Reader:class extends Nn{constructor(e){super(e,n)}},options:n})}addReadable(e,t,n={}){return _i(this,e,{Reader:()=>({readable:t}),options:n})}addFileSystemEntry(e,t={}){return bi(this,e,t)}addFileSystemHandle(e,t={}){return bi(this,e,t)}addFile(e,t={}){return t.lastModDate||(t.lastModDate=new o(e.lastModified)),_i(this,e.name,{data:e,Reader:()=>({readable:e.stream(),size:e.size}),options:t,uncompressedSize:e.size})}addData(e,t){return _i(this,e,t)}importBlob(e,t){return this.importZip(new yn(e),t)}importData64URI(e,t){return this.importZip(new bn(e),t)}importUint8Array(e,t){return this.importZip(new Pn(e),t)}importHttpContent(e,t){return this.importZip(new Nn(e,t),t)}importReadable(e,t){return this.importZip({readable:e},t)}exportBlob(e={}){return this.exportZip(new _n(e.mimeType||"application/zip"),e)}exportData64URI(e={}){return this.exportZip(new vn(e.mimeType||"application/zip"),e)}exportUint8Array(e={}){return this.exportZip(new jn,e)}async exportWritable(e=new A,t={}){return await this.exportZip({writable:e},t),e}async importZip(e,t={}){await Bn(e);const r=new Wr(e,t),i=[],s=await r.getEntries();for(const e of s){let r=this;try{const s=e.filename.split("/"),a=s.pop();s.forEach(((t,n)=>{const a=r;r=r.getChildByName(t),r||(r=new mi(this.fs,t,{data:n==s.length-1?e:null},a),i.push(r))})),e.directory||i.push(_i(r,a,{data:e,Reader:wi(n.assign({},t)),uncompressedSize:e.uncompressedSize}))}catch(t){try{t.cause={entry:e}}catch(e){}throw t}}return i}async exportZip(e,r){const i=this;r.bufferedWrite===Se&&(r.bufferedWrite=!0),await g.all([xi(i,r.readerOptions),Bn(e)]);const s=new ti(e,r);return await(async(e,r,i,s)=>{const a=r,o=new l;await async function e(r,l){async function c(l){const c=s.relativePath?l.getRelativeName(a):l.getFullname();let d=l.options||{},f={};if(l.data instanceof mr){const{externalFileAttribute:e,versionMadeBy:t,comment:n,lastModDate:r,creationDate:i,lastAccessDate:s}=l.data;f={externalFileAttribute:e,versionMadeBy:t,comment:n,lastModDate:r,creationDate:i,lastAccessDate:s}}await r.add(c,l.reader,n.assign({directory:l.directory},n.assign({},s,f,d,{onprogress:async e=>{if(s.onprogress){o.set(c,e);try{await s.onprogress(t.from(o.values()).reduce(((e,t)=>e+t)),i)}catch(e){}}}}))),await e(r,l)}await(async()=>{if(s.bufferedWrite)await g.allSettled(l.children.map(c));else for(const e of l.children)await c(e)})()}(e,r)})(s,i,(e=>{let t=0;return e.forEach((function e(n){t+=n.uncompressedSize,n.children&&n.children.forEach(e)})),t})([i]),r),await s.close(),e.getData?e.getData():e.writable}getChildByName(e){const t=this.children;for(let n=0;nn.checkPassword(e,t))))).includes(!1)}}const hi={FS:class{constructor(){yi(this)}get children(){return this.root.children}remove(e){gi(e),this.entries[e.id]=null}move(e,t){if(e==this.root)throw new u("Root directory cannot be moved");if(!t.directory)throw new u("Target entry is not a directory");if(t.isDescendantOf(e))throw new u("Entry is a ancestor of target entry");if(e!=t){if(t.getChildByName(e.name))throw new u("Entry filename already exists");gi(e),e.parent=t,t.children.push(e)}}find(e){const t=e.split("/");let n=this.root;for(let e=0;n&&e{if(e.directory)await xi(e,t);else{const n=e.reader=new e.Reader(e.data,t);try{await Bn(n)}catch(t){try{t.entryId=e.id,t.cause={entry:e}}catch(e){}throw t}e.uncompressedSize=n.size}})))}function gi(e){if(e.parent){const t=e.parent.children;t.forEach(((n,r)=>{n.id==e.id&&t.splice(r,1)}))}}async function bi(e,t,r){return async function e(t,i,s){if(i)try{if((i.isFile||i.isDirectory)&&(i=await vi(i)),"file"==i.kind){const e=await i.getFile();s.push(t.addData(e.name,{Reader:()=>({readable:e.stream(),size:e.size}),options:n.assign({},{lastModDate:new o(e.lastModified)},r),uncompressedSize:e.size}))}else if("directory"==i.kind){const n=t.addDirectory(i.name);s.push(n);for await(const t of i.values())await e(n,t,s)}}catch(e){const t=e.message+(i?" ("+i.name+")":"");throw new u(t)}return s}(e,t,[])}async function vi(e){const t={name:e.name};if(e.isFile&&(t.kind="file",t.getFile=()=>new g(((t,n)=>e.file(t,n)))),e.isDirectory){t.kind="directory";const n=await(async e=>{const t=[];function n(e,r,i){e.readEntries((async s=>{if(s.length){for(const e of s)t.push(await vi(e));n(e,r,i)}else r(t)}),i)}return await new g(((t,r)=>n(e.createReader(),t,r))),{[Symbol.iterator](){let e=0;return{next(){const n={value:t[e],done:e===t.length};return e++,n}}}}})(e);t.values=()=>n}return t}function yi(e){e.entries=[],e.root=new mi(e)}function _i(e,t,n,r){if(e.directory)return r?new mi(e.fs,t,n,e):new pi(e.fs,t,n,e);throw new u("Parent entry is not a directory")}let ki;try{ki=void 0===y&&"undefined"==typeof location?new(require("url").URL)("file:"+__filename).href:void 0===y?location.href:y.currentScript&&y.currentScript.src||new f("zip-fs-full.min.js",y.baseURI).href}catch(e){}qe({baseURL:ki}),(e=>{const t=()=>f.createObjectURL(new x(['const{Array:e,Object:t,Number:n,Math:r,Error:s,Uint8Array:i,Uint16Array:o,Uint32Array:c,Int32Array:f,Map:a,DataView:l,Promise:u,TextEncoder:w,crypto:h,postMessage:d,TransformStream:p,ReadableStream:y,WritableStream:m,CompressionStream:b,DecompressionStream:g}=self,k=void 0,v="undefined",S="function";class z{constructor(e){return class extends p{constructor(t,n){const r=new e(n);super({transform(e,t){t.enqueue(r.append(e))},flush(e){const t=r.flush();t&&e.enqueue(t)}})}}}}const C=[];for(let e=0;256>e;e++){let t=e;for(let e=0;8>e;e++)1&t?t=t>>>1^3988292384:t>>>=1;C[e]=t}class x{constructor(e){this.t=e||-1}append(e){let t=0|this.t;for(let n=0,r=0|e.length;r>n;n++)t=t>>>8^C[255&(t^e[n])];this.t=t}get(){return~this.t}}class A extends p{constructor(){let e;const t=new x;super({transform(e,n){t.append(e),n.enqueue(e)},flush(){const n=new i(4);new l(n.buffer).setUint32(0,t.get()),e.value=n}}),e=this}}const _={concat(e,t){if(0===e.length||0===t.length)return e.concat(t);const n=e[e.length-1],r=_.i(n);return 32===r?e.concat(t):_.o(t,r,0|n,e.slice(0,e.length-1))},l(e){const t=e.length;if(0===t)return 0;const n=e[t-1];return 32*(t-1)+_.i(n)},u(e,t){if(32*e.length0&&t&&(e[n-1]=_.h(t,e[n-1]&2147483648>>t-1,1)),e},h:(e,t,n)=>32===e?t:(n?0|t:t<<32-e)+1099511627776*e,i:e=>r.round(e/1099511627776)||32,o(e,t,n,r){for(void 0===r&&(r=[]);t>=32;t-=32)r.push(n),n=0;if(0===t)return r.concat(e);for(let s=0;s>>t),n=e[s]<<32-t;const s=e.length?e[e.length-1]:0,i=_.i(s);return r.push(_.h(t+i&31,t+i>32?n:r.pop(),1)),r}},I={p:{m(e){const t=_.l(e)/8,n=new i(t);let r;for(let s=0;t>s;s++)0==(3&s)&&(r=e[s/4]),n[s]=r>>>24,r<<=8;return n},g(e){const t=[];let n,r=0;for(n=0;n9007199254740991)throw new s("Cannot hash more than 2^53 - 1 bits");const o=new c(n);let f=0;for(let e=t.blockSize+r-(t.blockSize+r&t.blockSize-1);i>=e;e+=t.blockSize)t.I(o.subarray(16*f,16*(f+1))),f+=1;return n.splice(0,16*f),t}P(){const e=this;let t=e.C;const n=e.S;t=_.concat(t,[_.h(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(r.floor(e.A/4294967296)),t.push(0|e.A);t.length;)e.I(t.splice(0,16));return e.reset(),n}D(e,t,n,r){return e>19?e>39?e>59?e>79?void 0:t^n^r:t&n|t&r|n&r:t^n^r:t&n|~t&r}V(e,t){return t<>>32-e}I(t){const n=this,s=n.S,i=e(80);for(let e=0;16>e;e++)i[e]=t[e];let o=s[0],c=s[1],f=s[2],a=s[3],l=s[4];for(let e=0;79>=e;e++){16>e||(i[e]=n.V(1,i[e-3]^i[e-8]^i[e-14]^i[e-16]));const t=n.V(5,o)+n.D(e,c,f,a)+l+i[e]+n.v[r.floor(e/20)]|0;l=a,a=f,f=n.V(30,c),c=o,o=t}s[0]=s[0]+o|0,s[1]=s[1]+c|0,s[2]=s[2]+f|0,s[3]=s[3]+a|0,s[4]=s[4]+l|0}},D={getRandomValues(e){const t=new c(e.buffer),n=e=>{let t=987654321;const n=4294967295;return()=>(t=36969*(65535&t)+(t>>16)&n,(((t<<16)+(e=18e3*(65535&e)+(e>>16)&n)&n)/4294967296+.5)*(r.random()>.5?1:-1))};for(let s,i=0;inew V.R(I.p.g(e)),B(e,t,n,r){if(n=n||1e4,0>r||0>n)throw new s("invalid params to pbkdf2");const i=1+(r>>5)<<2;let o,c,f,a,u;const w=new ArrayBuffer(i),h=new l(w);let d=0;const p=_;for(t=I.p.g(t),u=1;(i||1)>d;u++){for(o=c=e.encrypt(p.concat(t,[u])),f=1;n>f;f++)for(c=e.encrypt(c),a=0;ad&&fs&&(e=(new n).update(e).P());for(let t=0;s>t;t++)r[0][t]=909522486^e[t],r[1][t]=1549556828^e[t];t.U[0].update(r[0]),t.U[1].update(r[1]),t.K=new n(t.U[0])}reset(){const e=this;e.K=new e.M(e.U[0]),e.N=!1}update(e){this.N=!0,this.K.update(e)}digest(){const e=this,t=e.K.P(),n=new e.M(e.U[1]).update(t).P();return e.reset(),n}encrypt(e){if(this.N)throw new s("encrypt on already updated hmac called!");return this.update(e),this.digest(e)}}},R=typeof h!=v&&typeof h.getRandomValues==S,B="Invalid password",E="Invalid signature",M="zipjs-abort-check-password";function U(e){return R?h.getRandomValues(e):D.getRandomValues(e)}const K=16,N={name:"PBKDF2"},O=t.assign({hash:{name:"HMAC"}},N),T=t.assign({iterations:1e3,hash:{name:"SHA-1"}},N),W=["deriveBits"],j=[8,12,16],H=[16,24,32],L=10,F=[0,0,0,0],q=typeof h!=v,G=q&&h.subtle,J=q&&typeof G!=v,Q=I.p,X=class{constructor(e){const t=this;t.O=[[[],[],[],[],[]],[[],[],[],[],[]]],t.O[0][0][0]||t.T();const n=t.O[0][4],r=t.O[1],i=e.length;let o,c,f,a=1;if(4!==i&&6!==i&&8!==i)throw new s("invalid aes key size");for(t.v=[c=e.slice(0),f=[]],o=i;4*i+28>o;o++){let e=c[o-1];(o%i==0||8===i&&o%i==4)&&(e=n[e>>>24]<<24^n[e>>16&255]<<16^n[e>>8&255]<<8^n[255&e],o%i==0&&(e=e<<8^e>>>24^a<<24,a=a<<1^283*(a>>7))),c[o]=c[o-i]^e}for(let e=0;o;e++,o--){const t=c[3&e?o:o-4];f[e]=4>=o||4>e?t:r[0][n[t>>>24]]^r[1][n[t>>16&255]]^r[2][n[t>>8&255]]^r[3][n[255&t]]}}encrypt(e){return this.W(e,0)}decrypt(e){return this.W(e,1)}T(){const e=this.O[0],t=this.O[1],n=e[4],r=t[4],s=[],i=[];let o,c,f,a;for(let e=0;256>e;e++)i[(s[e]=e<<1^283*(e>>7))^e]=e;for(let l=o=0;!n[l];l^=c||1,o=i[o]||1){let i=o^o<<1^o<<2^o<<3^o<<4;i=i>>8^255&i^99,n[l]=i,r[i]=l,a=s[f=s[c=s[l]]];let u=16843009*a^65537*f^257*c^16843008*l,w=257*s[i]^16843008*i;for(let n=0;4>n;n++)e[n][l]=w=w<<24^w>>>8,t[n][i]=u=u<<24^u>>>8}for(let n=0;5>n;n++)e[n]=e[n].slice(0),t[n]=t[n].slice(0)}W(e,t){if(4!==e.length)throw new s("invalid aes block size");const n=this.v[t],r=n.length/4-2,i=[0,0,0,0],o=this.O[t],c=o[0],f=o[1],a=o[2],l=o[3],u=o[4];let w,h,d,p=e[0]^n[0],y=e[t?3:1]^n[1],m=e[2]^n[2],b=e[t?1:3]^n[3],g=4;for(let e=0;r>e;e++)w=c[p>>>24]^f[y>>16&255]^a[m>>8&255]^l[255&b]^n[g],h=c[y>>>24]^f[m>>16&255]^a[b>>8&255]^l[255&p]^n[g+1],d=c[m>>>24]^f[b>>16&255]^a[p>>8&255]^l[255&y]^n[g+2],b=c[b>>>24]^f[p>>16&255]^a[y>>8&255]^l[255&m]^n[g+3],g+=4,p=w,y=h,m=d;for(let e=0;4>e;e++)i[t?3&-e:e]=u[p>>>24]<<24^u[y>>16&255]<<16^u[m>>8&255]<<8^u[255&b]^n[g++],w=p,p=y,y=m,m=b,b=w;return i}},Y=class{constructor(e,t){this.j=e,this.H=t,this.L=t}reset(){this.L=this.H}update(e){return this.F(this.j,e,this.L)}q(e){if(255==(e>>24&255)){let t=e>>16&255,n=e>>8&255,r=255&e;255===t?(t=0,255===n?(n=0,255===r?r=0:++r):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=r}else e+=1<<24;return e}G(e){0===(e[0]=this.q(e[0]))&&(e[1]=this.q(e[1]))}F(e,t,n){let r;if(!(r=t.length))return[];const s=_.l(t);for(let s=0;r>s;s+=4){this.G(n);const r=e.encrypt(n);t[s]^=r[0],t[s+1]^=r[1],t[s+2]^=r[2],t[s+3]^=r[3]}return _.u(t,s)}},Z=V.R;let $=q&&J&&typeof G.importKey==S,ee=q&&J&&typeof G.deriveBits==S;class te extends p{constructor({password:e,rawPassword:n,signed:r,encryptionStrength:o,checkPasswordOnly:c}){super({start(){t.assign(this,{ready:new u((e=>this.J=e)),password:ie(e,n),signed:r,X:o-1,pending:new i})},async transform(e,t){const n=this,{password:r,X:o,J:f,ready:a}=n;r?(await(async(e,t,n,r)=>{const i=await se(e,t,n,ce(r,0,j[t])),o=ce(r,j[t]);if(i[0]!=o[0]||i[1]!=o[1])throw new s(B)})(n,o,r,ce(e,0,j[o]+2)),e=ce(e,j[o]+2),c?t.error(new s(M)):f()):await a;const l=new i(e.length-L-(e.length-L)%K);t.enqueue(re(n,e,l,0,L,!0))},async flush(e){const{signed:t,Y:n,Z:r,pending:o,ready:c}=this;if(r&&n){await c;const f=ce(o,0,o.length-L),a=ce(o,o.length-L);let l=new i;if(f.length){const e=ae(Q,f);r.update(e);const t=n.update(e);l=fe(Q,t)}if(t){const e=ce(fe(Q,r.digest()),0,L);for(let t=0;L>t;t++)if(e[t]!=a[t])throw new s(E)}e.enqueue(l)}}})}}class ne extends p{constructor({password:e,rawPassword:n,encryptionStrength:r}){let s;super({start(){t.assign(this,{ready:new u((e=>this.J=e)),password:ie(e,n),X:r-1,pending:new i})},async transform(e,t){const n=this,{password:r,X:s,J:o,ready:c}=n;let f=new i;r?(f=await(async(e,t,n)=>{const r=U(new i(j[t]));return oe(r,await se(e,t,n,r))})(n,s,r),o()):await c;const a=new i(f.length+e.length-e.length%K);a.set(f,0),t.enqueue(re(n,e,a,f.length,0))},async flush(e){const{Y:t,Z:n,pending:r,ready:o}=this;if(n&&t){await o;let c=new i;if(r.length){const e=t.update(ae(Q,r));n.update(e),c=fe(Q,e)}s.signature=fe(Q,n.digest()).slice(0,L),e.enqueue(oe(c,s.signature))}}}),s=this}}function re(e,t,n,r,s,o){const{Y:c,Z:f,pending:a}=e,l=t.length-s;let u;for(a.length&&(t=oe(a,t),n=((e,t)=>{if(t&&t>e.length){const n=e;(e=new i(t)).set(n,0)}return e})(n,l-l%K)),u=0;l-K>=u;u+=K){const e=ae(Q,ce(t,u,u+K));o&&f.update(e);const s=c.update(e);o||f.update(s),n.set(fe(Q,s),u+r)}return e.pending=ce(t,u),n}async function se(n,r,s,o){n.password=null;const c=await(async(e,t,n,r,s)=>{if(!$)return V.importKey(t);try{return await G.importKey("raw",t,n,!1,s)}catch(e){return $=!1,V.importKey(t)}})(0,s,O,0,W),f=await(async(e,t,n)=>{if(!ee)return V.B(t,e.salt,T.iterations,n);try{return await G.deriveBits(e,t,n)}catch(r){return ee=!1,V.B(t,e.salt,T.iterations,n)}})(t.assign({salt:o},T),c,8*(2*H[r]+2)),a=new i(f),l=ae(Q,ce(a,0,H[r])),u=ae(Q,ce(a,H[r],2*H[r])),w=ce(a,2*H[r]);return t.assign(n,{keys:{key:l,$:u,passwordVerification:w},Y:new Y(new X(l),e.from(F)),Z:new Z(u)}),w}function ie(e,t){return t===k?(e=>{if(typeof w==v){const t=new i((e=unescape(encodeURIComponent(e))).length);for(let n=0;n>>24]),i=~e.te.get(),e.keys=[n,s,i]}function ye(e){const t=2|e.keys[2];return me(r.imul(t,1^t)>>>8)}function me(e){return 255&e}function be(e){return 4294967295&e}const ge="deflate-raw";class ke extends p{constructor(e,{chunkSize:t,CompressionStream:n,CompressionStreamNative:r}){super({});const{compressed:s,encrypted:i,useCompressionStream:o,zipCrypto:c,signed:f,level:a}=e,u=this;let w,h,d=Se(super.readable);i&&!c||!f||(w=new A,d=xe(d,w)),s&&(d=Ce(d,o,{level:a,chunkSize:t},r,n)),i&&(c?d=xe(d,new ue(e)):(h=new ne(e),d=xe(d,h))),ze(u,d,(()=>{let e;i&&!c&&(e=h.signature),i&&!c||!f||(e=new l(w.value.buffer).getUint32(0)),u.signature=e}))}}class ve extends p{constructor(e,{chunkSize:t,DecompressionStream:n,DecompressionStreamNative:r}){super({});const{zipCrypto:i,encrypted:o,signed:c,signature:f,compressed:a,useCompressionStream:u}=e;let w,h,d=Se(super.readable);o&&(i?d=xe(d,new le(e)):(h=new te(e),d=xe(d,h))),a&&(d=Ce(d,u,{chunkSize:t},r,n)),o&&!i||!c||(w=new A,d=xe(d,w)),ze(this,d,(()=>{if((!o||i)&&c){const e=new l(w.value.buffer);if(f!=e.getUint32(0,!1))throw new s(E)}}))}}function Se(e){return xe(e,new p({transform(e,t){e&&e.length&&t.enqueue(e)}}))}function ze(e,n,r){n=xe(n,new p({flush:r})),t.defineProperty(e,"readable",{get:()=>n})}function Ce(e,t,n,r,s){try{e=xe(e,new(t&&r?r:s)(ge,n))}catch(r){if(!t)return e;try{e=xe(e,new s(ge,n))}catch(t){return e}}return e}function xe(e,t){return e.pipeThrough(t)}const Ae="data",_e="close";class Ie extends p{constructor(e,n){super({});const r=this,{codecType:s}=e;let i;s.startsWith("deflate")?i=ke:s.startsWith("inflate")&&(i=ve);let o=0,c=0;const f=new i(e,n),a=super.readable,l=new p({transform(e,t){e&&e.length&&(c+=e.length,t.enqueue(e))},flush(){t.assign(r,{inputSize:c})}}),u=new p({transform(e,t){e&&e.length&&(o+=e.length,t.enqueue(e))},flush(){const{signature:e}=f;t.assign(r,{signature:e,outputSize:o,inputSize:c})}});t.defineProperty(r,"readable",{get:()=>a.pipeThrough(l).pipeThrough(f).pipeThrough(u)})}}class Pe extends p{constructor(e){let t;super({transform:function n(r,s){if(t){const e=new i(t.length+r.length);e.set(t),e.set(r,t.length),r=e,t=null}r.length>e?(s.enqueue(r.slice(0,e)),n(r.slice(e),s)):t=r},flush(e){t&&t.length&&e.enqueue(t)}})}}const De=new a,Ve=new a;let Re,Be=0,Ee=!0;async function Me(e){try{const{options:t,scripts:r,config:s}=e;if(r&&r.length)try{Ee?importScripts.apply(k,r):await Ue(r)}catch(e){Ee=!1,await Ue(r)}self.initCodec&&self.initCodec(),s.CompressionStreamNative=self.CompressionStream,s.DecompressionStreamNative=self.DecompressionStream,self.Deflate&&(s.CompressionStream=new z(self.Deflate)),self.Inflate&&(s.DecompressionStream=new z(self.Inflate));const i={highWaterMark:1},o=e.readable||new y({async pull(e){const t=new u((e=>De.set(Be,e)));Ke({type:"pull",messageId:Be}),Be=(Be+1)%n.MAX_SAFE_INTEGER;const{value:r,done:s}=await t;e.enqueue(r),s&&e.close()}},i),c=e.writable||new m({async write(e){let t;const r=new u((e=>t=e));Ve.set(Be,t),Ke({type:Ae,value:e,messageId:Be}),Be=(Be+1)%n.MAX_SAFE_INTEGER,await r}},i),f=new Ie(t,s);Re=new AbortController;const{signal:a}=Re;await o.pipeThrough(f).pipeThrough(new Pe(s.chunkSize)).pipeTo(c,{signal:a,preventClose:!0,preventAbort:!0}),await c.getWriter().close();const{signature:l,inputSize:w,outputSize:h}=f;Ke({type:_e,result:{signature:l,inputSize:w,outputSize:h}})}catch(e){Ne(e)}}async function Ue(e){for(const t of e)await import(t)}function Ke(e){let{value:t}=e;if(t)if(t.length)try{t=new i(t),e.value=t.buffer,d(e,[e.value])}catch(t){d(e)}else d(e);else d(e)}function Ne(e=new s("Unknown error")){const{message:t,stack:n,code:r,name:i}=e;d({error:{message:t,stack:n,code:r,name:i}})}addEventListener("message",(({data:e})=>{const{type:t,messageId:n,value:r,done:s}=e;try{if("start"==t&&Me(e),t==Ae){const e=De.get(n);De.delete(n),e({value:new i(r),done:s})}if("ack"==t){const e=Ve.get(n);Ve.delete(n),e()}t==_e&&Re.abort()}catch(e){Ne(e)}}));const Oe=-2;function Te(t){return We(t.map((([t,n])=>new e(t).fill(n,0,t))))}function We(t){return t.reduce(((t,n)=>t.concat(e.isArray(n)?We(n):n)),[])}const je=[0,1,2,3].concat(...Te([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function He(){const e=this;function t(e,t){let n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1}e.ne=n=>{const s=e.re,i=e.ie.se,o=e.ie.oe;let c,f,a,l=-1;for(n.ce=0,n.fe=573,c=0;o>c;c++)0!==s[2*c]?(n.ae[++n.ce]=l=c,n.le[c]=0):s[2*c+1]=0;for(;2>n.ce;)a=n.ae[++n.ce]=2>l?++l:0,s[2*a]=1,n.le[a]=0,n.ue--,i&&(n.we-=i[2*a+1]);for(e.he=l,c=r.floor(n.ce/2);c>=1;c--)n.de(s,c);a=o;do{c=n.ae[1],n.ae[1]=n.ae[n.ce--],n.de(s,1),f=n.ae[1],n.ae[--n.fe]=c,n.ae[--n.fe]=f,s[2*a]=s[2*c]+s[2*f],n.le[a]=r.max(n.le[c],n.le[f])+1,s[2*c+1]=s[2*f+1]=a,n.ae[1]=a++,n.de(s,1)}while(n.ce>=2);n.ae[--n.fe]=n.ae[1],(t=>{const n=e.re,r=e.ie.se,s=e.ie.pe,i=e.ie.ye,o=e.ie.me;let c,f,a,l,u,w,h=0;for(l=0;15>=l;l++)t.be[l]=0;for(n[2*t.ae[t.fe]+1]=0,c=t.fe+1;573>c;c++)f=t.ae[c],l=n[2*n[2*f+1]+1]+1,l>o&&(l=o,h++),n[2*f+1]=l,f>e.he||(t.be[l]++,u=0,i>f||(u=s[f-i]),w=n[2*f],t.ue+=w*(l+u),r&&(t.we+=w*(r[2*f+1]+u)));if(0!==h){do{for(l=o-1;0===t.be[l];)l--;t.be[l]--,t.be[l+1]+=2,t.be[o]--,h-=2}while(h>0);for(l=o;0!==l;l--)for(f=t.be[l];0!==f;)a=t.ae[--c],a>e.he||(n[2*a+1]!=l&&(t.ue+=(l-n[2*a+1])*n[2*a],n[2*a+1]=l),f--)}})(n),((e,n,r)=>{const s=[];let i,o,c,f=0;for(i=1;15>=i;i++)s[i]=f=f+r[i-1]<<1;for(o=0;n>=o;o++)c=e[2*o+1],0!==c&&(e[2*o]=t(s[c]++,c))})(s,e.he,n.be)}}function Le(e,t,n,r,s){const i=this;i.se=e,i.pe=t,i.ye=n,i.oe=r,i.me=s}He.ge=[0,1,2,3,4,5,6,7].concat(...Te([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]])),He.ke=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0],He.ve=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576],He.Se=e=>256>e?je[e]:je[256+(e>>>7)],He.ze=[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],He.Ce=[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],He.xe=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],He.Ae=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];const Fe=Te([[144,8],[112,9],[24,7],[8,8]]);Le._e=We([12,140,76,204,44,172,108,236,28,156,92,220,60,188,124,252,2,130,66,194,34,162,98,226,18,146,82,210,50,178,114,242,10,138,74,202,42,170,106,234,26,154,90,218,58,186,122,250,6,134,70,198,38,166,102,230,22,150,86,214,54,182,118,246,14,142,78,206,46,174,110,238,30,158,94,222,62,190,126,254,1,129,65,193,33,161,97,225,17,145,81,209,49,177,113,241,9,137,73,201,41,169,105,233,25,153,89,217,57,185,121,249,5,133,69,197,37,165,101,229,21,149,85,213,53,181,117,245,13,141,77,205,45,173,109,237,29,157,93,221,61,189,125,253,19,275,147,403,83,339,211,467,51,307,179,435,115,371,243,499,11,267,139,395,75,331,203,459,43,299,171,427,107,363,235,491,27,283,155,411,91,347,219,475,59,315,187,443,123,379,251,507,7,263,135,391,71,327,199,455,39,295,167,423,103,359,231,487,23,279,151,407,87,343,215,471,55,311,183,439,119,375,247,503,15,271,143,399,79,335,207,463,47,303,175,431,111,367,239,495,31,287,159,415,95,351,223,479,63,319,191,447,127,383,255,511,0,64,32,96,16,80,48,112,8,72,40,104,24,88,56,120,4,68,36,100,20,84,52,116,3,131,67,195,35,163,99,227].map(((e,t)=>[e,Fe[t]])));const qe=Te([[30,5]]);function Ge(e,t,n,r,s){const i=this;i.Ie=e,i.Pe=t,i.De=n,i.Ve=r,i.Re=s}Le.Be=We([0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30,1,17,9,25,5,21,13,29,3,19,11,27,7,23].map(((e,t)=>[e,qe[t]]))),Le.Ee=new Le(Le._e,He.ze,257,286,15),Le.Me=new Le(Le.Be,He.Ce,0,30,15),Le.Ue=new Le(null,He.xe,0,19,7);const Je=[new Ge(0,0,0,0,0),new Ge(4,4,8,4,1),new Ge(4,5,16,8,1),new Ge(4,6,32,32,1),new Ge(4,4,16,16,2),new Ge(8,16,32,32,2),new Ge(8,16,128,128,2),new Ge(8,32,128,256,2),new Ge(32,128,258,1024,2),new Ge(32,258,258,4096,2)],Qe=["need dictionary","stream end","","","stream error","data error","","buffer error","",""],Xe=113,Ye=666,Ze=262;function $e(e,t,n,r){const s=e[2*t],i=e[2*n];return i>s||s==i&&r[t]<=r[n]}function et(){const e=this;let t,n,s,c,f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z,C,x,A,_,I,P,D,V,R,B,E,M,U;const K=new He,N=new He,O=new He;let T,W,j,H,L,F;function q(){let t;for(t=0;286>t;t++)E[2*t]=0;for(t=0;30>t;t++)M[2*t]=0;for(t=0;19>t;t++)U[2*t]=0;E[512]=1,e.ue=e.we=0,W=j=0}function G(e,t){let n,r=-1,s=e[1],i=0,o=7,c=4;0===s&&(o=138,c=3),e[2*(t+1)+1]=65535;for(let f=0;t>=f;f++)n=s,s=e[2*(f+1)+1],++ii?U[2*n]+=i:0!==n?(n!=r&&U[2*n]++,U[32]++):i>10?U[36]++:U[34]++,i=0,r=n,0===s?(o=138,c=3):n==s?(o=6,c=3):(o=7,c=4))}function J(t){e.Ke[e.pending++]=t}function Q(e){J(255&e),J(e>>>8&255)}function X(e,t){let n;const r=t;F>16-r?(n=e,L|=n<>>16-F,F+=r-16):(L|=e<=n;n++)if(r=i,i=e[2*(n+1)+1],++o>=c||r!=i){if(f>o)do{Y(r,U)}while(0!=--o);else 0!==r?(r!=s&&(Y(r,U),o--),Y(16,U),X(o-3,2)):o>10?(Y(18,U),X(o-11,7)):(Y(17,U),X(o-3,3));o=0,s=r,0===i?(c=138,f=3):r==i?(c=6,f=3):(c=7,f=4)}}function $(){16==F?(Q(L),L=0,F=0):8>F||(J(255&L),L>>>=8,F-=8)}function ee(t,n){let s,i,o;if(e.Ne[W]=t,e.Oe[W]=255&n,W++,0===t?E[2*n]++:(j++,t--,E[2*(He.ge[n]+256+1)]++,M[2*He.Se(t)]++),0==(8191&W)&&D>2){for(s=8*W,i=C-k,o=0;30>o;o++)s+=M[2*o]*(5+He.Ce[o]);if(s>>>=3,jc);Y(256,t),H=t[513]}function ne(){F>8?Q(L):F>0&&J(255&L),L=0,F=0}function re(t,n,r){X(0+(r?1:0),3),((t,n)=>{ne(),H=8,Q(n),Q(~n),e.Ke.set(u.subarray(t,t+n),e.pending),e.pending+=n})(t,n)}function se(n){((t,n,r)=>{let s,i,o=0;D>0?(K.ne(e),N.ne(e),o=(()=>{let t;for(G(E,K.he),G(M,N.he),O.ne(e),t=18;t>=3&&0===U[2*He.Ae[t]+1];t--);return e.ue+=14+3*(t+1),t})(),s=e.ue+3+7>>>3,i=e.we+3+7>>>3,i>s||(s=i)):s=i=n+5,n+4>s||-1==t?i==s?(X(2+(r?1:0),3),te(Le._e,Le.Be)):(X(4+(r?1:0),3),((e,t,n)=>{let r;for(X(e-257,5),X(t-1,5),X(n-4,4),r=0;n>r;r++)X(U[2*He.Ae[r]+1],3);Z(E,e-1),Z(M,t-1)})(K.he+1,N.he+1,o+1),te(E,M)):re(t,n,r),q(),r&&ne()})(0>k?-1:k,C-k,n),k=C,t.Te()}function ie(){let e,n,r,s;do{if(s=w-A-C,0===s&&0===C&&0===A)s=f;else if(-1==s)s--;else if(C>=f+f-Ze){u.set(u.subarray(f,f+f),0),x-=f,C-=f,k-=f,e=y,r=e;do{n=65535&d[--r],d[r]=f>n?0:n-f}while(0!=--e);e=f,r=e;do{n=65535&h[--r],h[r]=f>n?0:n-f}while(0!=--e);s+=f}if(0===t.We)return;e=t.je(u,C+A,s),A+=e,3>A||(p=255&u[C],p=(p<A&&0!==t.We)}function oe(e){let t,n,r=I,s=C,i=_;const o=C>f-Ze?C-(f-Ze):0;let c=B;const a=l,w=C+258;let d=u[s+i-1],p=u[s+i];R>_||(r>>=2),c>A&&(c=A);do{if(t=e,u[t+i]==p&&u[t+i-1]==d&&u[t]==u[s]&&u[++t]==u[s+1]){s+=2,t++;do{}while(u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&w>s);if(n=258-(w-s),s=w-258,n>i){if(x=e,i=n,n>=c)break;d=u[s+i-1],p=u[s+i]}}}while((e=65535&h[e&a])>o&&0!=--r);return i>A?A:i}e.le=[],e.be=[],e.ae=[],E=[],M=[],U=[],e.de=(t,n)=>{const r=e.ae,s=r[n];let i=n<<1;for(;i<=e.ce&&(i(W||(W=8),j||(j=8),G||(G=0),t.Le=null,-1==S&&(S=6),1>j||j>9||8!=W||9>x||x>15||0>S||S>9||0>G||G>2?Oe:(t.Fe=e,a=x,f=1<(t.qe=t.Ge=0,t.Le=null,e.pending=0,e.Je=0,n=Xe,c=0,K.re=E,K.ie=Le.Ee,N.re=M,N.ie=Le.Me,O.re=U,O.ie=Le.Ue,L=0,F=0,H=8,q(),(()=>{w=2*f,d[y-1]=0;for(let e=0;y-1>e;e++)d[e]=0;P=Je[D].Pe,R=Je[D].Ie,B=Je[D].De,I=Je[D].Ve,C=0,k=0,A=0,v=_=2,z=0,p=0})(),0))(t))),e.Qe=()=>42!=n&&n!=Xe&&n!=Ye?Oe:(e.Oe=null,e.Ne=null,e.Ke=null,d=null,h=null,u=null,e.Fe=null,n==Xe?-3:0),e.Xe=(e,t,n)=>{let r=0;return-1==t&&(t=6),0>t||t>9||0>n||n>2?Oe:(Je[D].Re!=Je[t].Re&&0!==e.qe&&(r=e.Ye(1)),D!=t&&(D=t,P=Je[D].Pe,R=Je[D].Ie,B=Je[D].De,I=Je[D].Ve),V=n,r)},e.Ze=(e,t,r)=>{let s,i=r,o=0;if(!t||42!=n)return Oe;if(3>i)return 0;for(i>f-Ze&&(i=f-Ze,o=r-i),u.set(t.subarray(o,o+i),0),C=i,k=i,p=255&u[0],p=(p<=s;s++)p=(p<{let o,w,m,I,R;if(i>4||0>i)return Oe;if(!r.$e||!r.et&&0!==r.We||n==Ye&&4!=i)return r.Le=Qe[4],Oe;if(0===r.tt)return r.Le=Qe[7],-5;var B;if(t=r,I=c,c=i,42==n&&(w=8+(a-8<<4)<<8,m=(D-1&255)>>1,m>3&&(m=3),w|=m<<6,0!==C&&(w|=32),w+=31-w%31,n=Xe,J((B=w)>>8&255),J(255&B)),0!==e.pending){if(t.Te(),0===t.tt)return c=-1,0}else if(0===t.We&&I>=i&&4!=i)return t.Le=Qe[7],-5;if(n==Ye&&0!==t.We)return r.Le=Qe[7],-5;if(0!==t.We||0!==A||0!=i&&n!=Ye){switch(R=-1,Je[D].Re){case 0:R=(e=>{let n,r=65535;for(r>s-5&&(r=s-5);;){if(1>=A){if(ie(),0===A&&0==e)return 0;if(0===A)break}if(C+=A,A=0,n=k+r,(0===C||C>=n)&&(A=C-n,C=n,se(!1),0===t.tt))return 0;if(C-k>=f-Ze&&(se(!1),0===t.tt))return 0}return se(4==e),0===t.tt?4==e?2:0:4==e?3:1})(i);break;case 1:R=(e=>{let n,r=0;for(;;){if(Ze>A){if(ie(),Ze>A&&0==e)return 0;if(0===A)break}if(3>A||(p=(p<f-Ze||2!=V&&(v=oe(r)),3>v)n=ee(0,255&u[C]),A--,C++;else if(n=ee(C-x,v-3),A-=v,v>P||3>A)C+=v,v=0,p=255&u[C],p=(p<{let n,r,s=0;for(;;){if(Ze>A){if(ie(),Ze>A&&0==e)return 0;if(0===A)break}if(3>A||(p=(p<_&&f-Ze>=(C-s&65535)&&(2!=V&&(v=oe(s)),5>=v&&(1==V||3==v&&C-x>4096)&&(v=2)),3>_||v>_)if(0!==z){if(n=ee(0,255&u[C-1]),n&&se(!1),C++,A--,0===t.tt)return 0}else z=1,C++,A--;else{r=C+A-3,n=ee(C-1-S,_-3),A-=_-1,_-=2;do{++C>r||(p=(p<1+H+10-F&&(X(2,3),Y(256,Le._e),$()),H=7;else if(re(0,0,!1),3==i)for(o=0;y>o;o++)d[o]=0;if(t.Te(),0===t.tt)return c=-1,0}}return 4!=i?0:1}}function tt(){const e=this;e.nt=0,e.rt=0,e.We=0,e.qe=0,e.tt=0,e.Ge=0}function nt(e){const t=new tt,n=(o=e&&e.chunkSize?e.chunkSize:65536)+5*(r.floor(o/16383)+1);var o;const c=new i(n);let f=e?e.level:-1;void 0===f&&(f=-1),t.He(f),t.$e=c,this.append=(e,r)=>{let o,f,a=0,l=0,u=0;const w=[];if(e.length){t.nt=0,t.et=e,t.We=e.length;do{if(t.rt=0,t.tt=n,o=t.Ye(0),0!=o)throw new s("deflating: "+t.Le);t.rt&&(t.rt==n?w.push(new i(c)):w.push(c.subarray(0,t.rt))),u+=t.rt,r&&t.nt>0&&t.nt!=a&&(r(t.nt),a=t.nt)}while(t.We>0||0===t.tt);return w.length>1?(f=new i(u),w.forEach((e=>{f.set(e,l),l+=e.length}))):f=w[0]?new i(w[0]):new i,f}},this.flush=()=>{let e,r,o=0,f=0;const a=[];do{if(t.rt=0,t.tt=n,e=t.Ye(4),1!=e&&0!=e)throw new s("deflating: "+t.Le);n-t.tt>0&&a.push(c.slice(0,t.rt)),f+=t.rt}while(t.We>0||0===t.tt);return t.Qe(),r=new i(f),a.forEach((e=>{r.set(e,o),o+=e.length})),r}}tt.prototype={He(e,t){const n=this;return n.Fe=new et,t||(t=15),n.Fe.He(n,e,t)},Ye(e){const t=this;return t.Fe?t.Fe.Ye(t,e):Oe},Qe(){const e=this;if(!e.Fe)return Oe;const t=e.Fe.Qe();return e.Fe=null,t},Xe(e,t){const n=this;return n.Fe?n.Fe.Xe(n,e,t):Oe},Ze(e,t){const n=this;return n.Fe?n.Fe.Ze(n,e,t):Oe},je(e,t,n){const r=this;let s=r.We;return s>n&&(s=n),0===s?0:(r.We-=s,e.set(r.et.subarray(r.nt,r.nt+s),t),r.nt+=s,r.qe+=s,s)},Te(){const e=this;let t=e.Fe.pending;t>e.tt&&(t=e.tt),0!==t&&(e.$e.set(e.Fe.Ke.subarray(e.Fe.Je,e.Fe.Je+t),e.rt),e.rt+=t,e.Fe.Je+=t,e.Ge+=t,e.tt-=t,e.Fe.pending-=t,0===e.Fe.pending&&(e.Fe.Je=0))}};const rt=-2,st=-3,it=-5,ot=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],ct=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],ft=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],at=[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,0,0],lt=[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,112,112],ut=[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],wt=[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];function ht(){let e,t,n,r,s,i;function o(e,t,o,c,f,a,l,u,w,h,d){let p,y,m,b,g,k,v,S,z,C,x,A,_,I,P;C=0,g=o;do{n[e[t+C]]++,C++,g--}while(0!==g);if(n[0]==o)return l[0]=-1,u[0]=0,0;for(S=u[0],k=1;15>=k&&0===n[k];k++);for(v=k,k>S&&(S=k),g=15;0!==g&&0===n[g];g--);for(m=g,S>g&&(S=g),u[0]=S,I=1<k;k++,I<<=1)if(0>(I-=n[k]))return st;if(0>(I-=n[g]))return st;for(n[g]+=I,i[1]=k=0,C=1,_=2;0!=--g;)i[_]=k+=n[C],_++,C++;g=0,C=0;do{0!==(k=e[t+C])&&(d[i[k]++]=g),C++}while(++g=v;v++)for(p=n[v];0!=p--;){for(;v>A+S;){if(b++,A+=S,P=m-A,P=P>S?S:P,(y=1<<(k=v-A))>p+1&&(y-=p+1,_=v,P>k))for(;++kn[++_];)y-=n[_];if(P=1<1440)return st;s[b]=x=h[0],h[0]+=P,0!==b?(i[b]=g,r[0]=k,r[1]=S,k=g>>>A-S,r[2]=x-s[b-1]-k,w.set(r,3*(s[b-1]+k))):l[0]=x}for(r[1]=v-A,o>C?d[C]d[C]?0:96,r[2]=d[C++]):(r[0]=a[d[C]-c]+16+64,r[2]=f[d[C++]-c]):r[0]=192,y=1<>>A;P>k;k+=y)w.set(r,3*(x+k));for(k=1<>>=1)g^=k;for(g^=k,z=(1<c;c++)t[c]=0;for(c=0;16>c;c++)n[c]=0;for(c=0;3>c;c++)r[c]=0;s.set(n.subarray(0,15),0),i.set(n.subarray(0,16),0)}this.st=(n,r,s,i,f)=>{let a;return c(19),e[0]=0,a=o(n,0,19,19,null,null,s,r,i,e,t),a==st?f.Le="oversubscribed dynamic bit lengths tree":a!=it&&0!==r[0]||(f.Le="incomplete dynamic bit lengths tree",a=st),a},this.it=(n,r,s,i,f,a,l,u,w)=>{let h;return c(288),e[0]=0,h=o(s,0,n,257,at,lt,a,i,u,e,t),0!=h||0===i[0]?(h==st?w.Le="oversubscribed literal/length tree":-4!=h&&(w.Le="incomplete literal/length tree",h=st),h):(c(288),h=o(s,n,r,0,ut,wt,l,f,u,e,t),0!=h||0===f[0]&&n>257?(h==st?w.Le="oversubscribed distance tree":h==it?(w.Le="incomplete distance tree",h=st):-4!=h&&(w.Le="empty distance tree with lengths",h=st),h):0)}}function dt(){const e=this;let t,n,r,s,i=0,o=0,c=0,f=0,a=0,l=0,u=0,w=0,h=0,d=0;function p(e,t,n,r,s,i,o,c){let f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z;d=c.nt,p=c.We,w=o.ot,h=o.ct,y=o.write,m=yh;)p--,w|=(255&c.ft(d++))<>=a[z+1],h-=a[z+1],0!=(16&u)){for(u&=15,k=a[z+2]+(w&ot[u]),w>>=u,h-=u;15>h;)p--,w|=(255&c.ft(d++))<>=a[z+1],h-=a[z+1],0!=(16&u)){for(u&=15;u>h;)p--,w|=(255&c.ft(d++))<>=u,h-=u,m-=k,v>y){S=y-v;do{S+=o.end}while(0>S);if(u=o.end-S,k>u){if(k-=u,y-S>0&&u>y-S)do{o.lt[y++]=o.lt[S++]}while(0!=--u);else o.lt.set(o.lt.subarray(S,S+u),y),y+=u,S+=u,u=0;S=0}}else S=y-v,y-S>0&&2>y-S?(o.lt[y++]=o.lt[S++],o.lt[y++]=o.lt[S++],k-=2):(o.lt.set(o.lt.subarray(S,S+2),y),y+=2,S+=2,k-=2);if(y-S>0&&k>y-S)do{o.lt[y++]=o.lt[S++]}while(0!=--k);else o.lt.set(o.lt.subarray(S,S+k),y),y+=k,S+=k,k=0;break}if(0!=(64&u))return c.Le="invalid distance code",k=c.We-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ot=w,o.ct=h,c.We=p,c.qe+=d-c.nt,c.nt=d,o.write=y,st;f+=a[z+2],f+=w&ot[u],z=3*(l+f),u=a[z]}break}if(0!=(64&u))return 0!=(32&u)?(k=c.We-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ot=w,o.ct=h,c.We=p,c.qe+=d-c.nt,c.nt=d,o.write=y,1):(c.Le="invalid literal/length code",k=c.We-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ot=w,o.ct=h,c.We=p,c.qe+=d-c.nt,c.nt=d,o.write=y,st);if(f+=a[z+2],f+=w&ot[u],z=3*(l+f),0===(u=a[z])){w>>=a[z+1],h-=a[z+1],o.lt[y++]=a[z+2],m--;break}}else w>>=a[z+1],h-=a[z+1],o.lt[y++]=a[z+2],m--}while(m>=258&&p>=10);return k=c.We-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ot=w,o.ct=h,c.We=p,c.qe+=d-c.nt,c.nt=d,o.write=y,0}e.init=(e,i,o,c,f,a)=>{t=0,u=e,w=i,r=o,h=c,s=f,d=a,n=null},e.ut=(e,y,m)=>{let b,g,k,v,S,z,C,x=0,A=0,_=0;for(_=y.nt,v=y.We,x=e.ot,A=e.ct,S=e.write,z=S=258&&v>=10&&(e.ot=x,e.ct=A,y.We=v,y.qe+=_-y.nt,y.nt=_,e.write=S,m=p(u,w,r,h,s,d,e,y),_=y.nt,v=y.We,x=e.ot,A=e.ct,S=e.write,z=SA;){if(0===v)return e.ot=x,e.ct=A,y.We=v,y.qe+=_-y.nt,y.nt=_,e.write=S,e.wt(y,m);m=0,v--,x|=(255&y.ft(_++))<>>=n[g+1],A-=n[g+1],k=n[g],0===k){f=n[g+2],t=6;break}if(0!=(16&k)){a=15&k,i=n[g+2],t=2;break}if(0==(64&k)){c=k,o=g/3+n[g+2];break}if(0!=(32&k)){t=7;break}return t=9,y.Le="invalid literal/length code",m=st,e.ot=x,e.ct=A,y.We=v,y.qe+=_-y.nt,y.nt=_,e.write=S,e.wt(y,m);case 2:for(b=a;b>A;){if(0===v)return e.ot=x,e.ct=A,y.We=v,y.qe+=_-y.nt,y.nt=_,e.write=S,e.wt(y,m);m=0,v--,x|=(255&y.ft(_++))<>=b,A-=b,c=w,n=s,o=d,t=3;case 3:for(b=c;b>A;){if(0===v)return e.ot=x,e.ct=A,y.We=v,y.qe+=_-y.nt,y.nt=_,e.write=S,e.wt(y,m);m=0,v--,x|=(255&y.ft(_++))<>=n[g+1],A-=n[g+1],k=n[g],0!=(16&k)){a=15&k,l=n[g+2],t=4;break}if(0==(64&k)){c=k,o=g/3+n[g+2];break}return t=9,y.Le="invalid distance code",m=st,e.ot=x,e.ct=A,y.We=v,y.qe+=_-y.nt,y.nt=_,e.write=S,e.wt(y,m);case 4:for(b=a;b>A;){if(0===v)return e.ot=x,e.ct=A,y.We=v,y.qe+=_-y.nt,y.nt=_,e.write=S,e.wt(y,m);m=0,v--,x|=(255&y.ft(_++))<>=b,A-=b,t=5;case 5:for(C=S-l;0>C;)C+=e.end;for(;0!==i;){if(0===z&&(S==e.end&&0!==e.read&&(S=0,z=S7&&(A-=8,v++,_--),e.write=S,m=e.wt(y,m),S=e.write,z=S{}}ht.dt=(e,t,n,r)=>(e[0]=9,t[0]=5,n[0]=ct,r[0]=ft,0);const pt=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function yt(e,t){const n=this;let r,s=0,o=0,c=0,a=0;const l=[0],u=[0],w=new dt;let h=0,d=new f(4320);const p=new ht;n.ct=0,n.ot=0,n.lt=new i(t),n.end=t,n.read=0,n.write=0,n.reset=(e,t)=>{t&&(t[0]=0),6==s&&w.ht(e),s=0,n.ct=0,n.ot=0,n.read=n.write=0},n.reset(e,null),n.wt=(e,t)=>{let r,s,i;return s=e.rt,i=n.read,r=(i>n.write?n.end:n.write)-i,r>e.tt&&(r=e.tt),0!==r&&t==it&&(t=0),e.tt-=r,e.Ge+=r,e.$e.set(n.lt.subarray(i,i+r),s),s+=r,i+=r,i==n.end&&(i=0,n.write==n.end&&(n.write=0),r=n.write-i,r>e.tt&&(r=e.tt),0!==r&&t==it&&(t=0),e.tt-=r,e.Ge+=r,e.$e.set(n.lt.subarray(i,i+r),s),s+=r,i+=r),e.rt=s,n.read=i,t},n.ut=(e,t)=>{let i,f,y,m,b,g,k,v;for(m=e.nt,b=e.We,f=n.ot,y=n.ct,g=n.write,k=gy;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<>>1){case 0:f>>>=3,y-=3,i=7&y,f>>>=i,y-=i,s=1;break;case 1:S=[],z=[],C=[[]],x=[[]],ht.dt(S,z,C,x),w.init(S[0],z[0],C[0],0,x[0],0),f>>>=3,y-=3,s=6;break;case 2:f>>>=3,y-=3,s=3;break;case 3:return f>>>=3,y-=3,s=9,e.Le="invalid block type",t=st,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t)}break;case 1:for(;32>y;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<>>16&65535)!=(65535&f))return s=9,e.Le="invalid stored block lengths",t=st,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);o=65535&f,f=y=0,s=0!==o?2:0!==h?7:0;break;case 2:if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);if(0===k&&(g==n.end&&0!==n.read&&(g=0,k=gb&&(i=b),i>k&&(i=k),n.lt.set(e.je(m,i),g),m+=i,b-=i,g+=i,k-=i,0!=(o-=i))break;s=0!==h?7:0;break;case 3:for(;14>y;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<29||(i>>5&31)>29)return s=9,e.Le="too many length or distance symbols",t=st,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);if(i=258+(31&i)+(i>>5&31),!r||r.lengthv;v++)r[v]=0;f>>>=14,y-=14,a=0,s=4;case 4:for(;4+(c>>>10)>a;){for(;3>y;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<>>=3,y-=3}for(;19>a;)r[pt[a++]]=0;if(l[0]=7,i=p.st(r,l,u,d,e),0!=i)return(t=i)==st&&(r=null,s=9),n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);a=0,s=5;case 5:for(;i=c,258+(31&i)+(i>>5&31)>a;){let o,w;for(i=l[0];i>y;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<w)f>>>=i,y-=i,r[a++]=w;else{for(v=18==w?7:w-14,o=18==w?11:3;i+v>y;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<>>=i,y-=i,o+=f&ot[v],f>>>=v,y-=v,v=a,i=c,v+o>258+(31&i)+(i>>5&31)||16==w&&1>v)return r=null,s=9,e.Le="invalid bit length repeat",t=st,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);w=16==w?r[v-1]:0;do{r[v++]=w}while(0!=--o);a=v}}if(u[0]=-1,A=[],_=[],I=[],P=[],A[0]=9,_[0]=6,i=c,i=p.it(257+(31&i),1+(i>>5&31),r,A,_,I,P,d,e),0!=i)return i==st&&(r=null,s=9),t=i,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);w.init(A[0],_[0],d,I[0],d,P[0]),s=6;case 6:if(n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,1!=(t=w.ut(n,e,t)))return n.wt(e,t);if(t=0,w.ht(e),m=e.nt,b=e.We,f=n.ot,y=n.ct,g=n.write,k=g{n.reset(e,null),n.lt=null,d=null},n.yt=(e,t,r)=>{n.lt.set(e.subarray(t,t+r),0),n.read=n.write=r},n.bt=()=>1==s?1:0}const mt=13,bt=[0,0,255,255];function gt(){const e=this;function t(e){return e&&e.gt?(e.qe=e.Ge=0,e.Le=null,e.gt.mode=7,e.gt.kt.reset(e,null),0):rt}e.mode=0,e.method=0,e.vt=[0],e.St=0,e.marker=0,e.zt=0,e.Ct=t=>(e.kt&&e.kt.ht(t),e.kt=null,0),e.xt=(n,r)=>(n.Le=null,e.kt=null,8>r||r>15?(e.Ct(n),rt):(e.zt=r,n.gt.kt=new yt(n,1<{let n,r;if(!e||!e.gt||!e.et)return rt;const s=e.gt;for(t=4==t?it:0,n=it;;)switch(s.mode){case 0:if(0===e.We)return n;if(n=t,e.We--,e.qe++,8!=(15&(s.method=e.ft(e.nt++)))){s.mode=mt,e.Le="unknown compression method",s.marker=5;break}if(8+(s.method>>4)>s.zt){s.mode=mt,e.Le="invalid win size",s.marker=5;break}s.mode=1;case 1:if(0===e.We)return n;if(n=t,e.We--,e.qe++,r=255&e.ft(e.nt++),((s.method<<8)+r)%31!=0){s.mode=mt,e.Le="incorrect header check",s.marker=5;break}if(0==(32&r)){s.mode=7;break}s.mode=2;case 2:if(0===e.We)return n;n=t,e.We--,e.qe++,s.St=(255&e.ft(e.nt++))<<24&4278190080,s.mode=3;case 3:if(0===e.We)return n;n=t,e.We--,e.qe++,s.St+=(255&e.ft(e.nt++))<<16&16711680,s.mode=4;case 4:if(0===e.We)return n;n=t,e.We--,e.qe++,s.St+=(255&e.ft(e.nt++))<<8&65280,s.mode=5;case 5:return 0===e.We?n:(n=t,e.We--,e.qe++,s.St+=255&e.ft(e.nt++),s.mode=6,2);case 6:return s.mode=mt,e.Le="need dictionary",s.marker=0,rt;case 7:if(n=s.kt.ut(e,n),n==st){s.mode=mt,s.marker=0;break}if(0==n&&(n=t),1!=n)return n;n=t,s.kt.reset(e,s.vt),s.mode=12;case 12:return e.We=0,1;case mt:return st;default:return rt}},e._t=(e,t,n)=>{let r=0,s=n;if(!e||!e.gt||6!=e.gt.mode)return rt;const i=e.gt;return s<1<{let n,r,s,i,o;if(!e||!e.gt)return rt;const c=e.gt;if(c.mode!=mt&&(c.mode=mt,c.marker=0),0===(n=e.We))return it;for(r=e.nt,s=c.marker;0!==n&&4>s;)e.ft(r)==bt[s]?s++:s=0!==e.ft(r)?0:4-s,r++,n--;return e.qe+=r-e.nt,e.nt=r,e.We=n,c.marker=s,4!=s?st:(i=e.qe,o=e.Ge,t(e),e.qe=i,e.Ge=o,c.mode=7,0)},e.Pt=e=>e&&e.gt&&e.gt.kt?e.gt.kt.bt():rt}function kt(){}function vt(e){const t=new kt,n=e&&e.chunkSize?r.floor(2*e.chunkSize):131072,o=new i(n);let c=!1;t.xt(),t.$e=o,this.append=(e,r)=>{const f=[];let a,l,u=0,w=0,h=0;if(0!==e.length){t.nt=0,t.et=e,t.We=e.length;do{if(t.rt=0,t.tt=n,0!==t.We||c||(t.nt=0,c=!0),a=t.At(0),c&&a===it){if(0!==t.We)throw new s("inflating: bad input")}else if(0!==a&&1!==a)throw new s("inflating: "+t.Le);if((c||1===a)&&t.We===e.length)throw new s("inflating: bad input");t.rt&&(t.rt===n?f.push(new i(o)):f.push(o.subarray(0,t.rt))),h+=t.rt,r&&t.nt>0&&t.nt!=u&&(r(t.nt),u=t.nt)}while(t.We>0||0===t.tt);return f.length>1?(l=new i(h),f.forEach((e=>{l.set(e,w),w+=e.length}))):l=f[0]?new i(f[0]):new i,l}},this.flush=()=>{t.Ct()}}kt.prototype={xt(e){const t=this;return t.gt=new gt,e||(e=15),t.gt.xt(t,e)},At(e){const t=this;return t.gt?t.gt.At(t,e):rt},Ct(){const e=this;if(!e.gt)return rt;const t=e.gt.Ct(e);return e.gt=null,t},It(){const e=this;return e.gt?e.gt.It(e):rt},_t(e,t){const n=this;return n.gt?n.gt._t(n,e,t):rt},ft(e){return this.et[e]},je(e,t){return this.et.subarray(e,e+t)}},self.initCodec=()=>{self.Deflate=nt,self.Inflate=vt};\n'],{type:"text/javascript"}));e({workerScripts:{inflate:[t],deflate:[t]}})})(qe),qe({Deflate:function(e){const t=new K,n=(r=e&&e.chunkSize?e.chunkSize:65536)+5*(a.floor(r/16383)+1);var r;const i=new p(n);let s=e?e.level:-1;void 0===s&&(s=-1),t.deflateInit(s),t.next_out=i,this.append=(e,r)=>{let s,a,o=0,l=0,c=0;const d=[];if(e.length){t.next_in_index=0,t.next_in=e,t.avail_in=e.length;do{if(t.next_out_index=0,t.avail_out=n,s=t.deflate(0),0!=s)throw new u("deflating: "+t.msg);t.next_out_index&&(t.next_out_index==n?d.push(new p(i)):d.push(i.subarray(0,t.next_out_index))),c+=t.next_out_index,r&&t.next_in_index>0&&t.next_in_index!=o&&(r(t.next_in_index),o=t.next_in_index)}while(t.avail_in>0||0===t.avail_out);return d.length>1?(a=new p(c),d.forEach((e=>{a.set(e,l),l+=e.length}))):a=d[0]?new p(d[0]):new p,a}},this.flush=()=>{let e,r,s=0,a=0;const o=[];do{if(t.next_out_index=0,t.avail_out=n,e=t.deflate(4),1!=e&&0!=e)throw new u("deflating: "+t.msg);n-t.avail_out>0&&o.push(i.slice(0,t.next_out_index)),a+=t.next_out_index}while(t.avail_in>0||0===t.avail_out);return t.deflateEnd(),r=new p(a),o.forEach((e=>{r.set(e,s),s+=e.length})),r}},Inflate:function(e){const t=new fe,n=e&&e.chunkSize?a.floor(2*e.chunkSize):131072,r=new p(n);let i=!1;t.inflateInit(),t.next_out=r,this.append=(e,s)=>{const a=[];let o,l,c=0,d=0,f=0;if(0!==e.length){t.next_in_index=0,t.next_in=e,t.avail_in=e.length;do{if(t.next_out_index=0,t.avail_out=n,0!==t.avail_in||i||(t.next_in_index=0,i=!0),o=t.inflate(0),i&&o===Y){if(0!==t.avail_in)throw new u("inflating: bad input")}else if(0!==o&&1!==o)throw new u("inflating: "+t.msg);if((i||1===o)&&t.avail_in===e.length)throw new u("inflating: bad input");t.next_out_index&&(t.next_out_index===n?a.push(new p(r)):a.push(r.subarray(0,t.next_out_index))),f+=t.next_out_index,s&&t.next_in_index>0&&t.next_in_index!=c&&(s(t.next_in_index),c=t.next_in_index)}while(t.avail_in>0||0===t.avail_out);return a.length>1?(l=new p(f),a.forEach((e=>{l.set(e,d),d+=e.length}))):l=a[0]?new p(a[0]):new p,l}},this.flush=()=>{t.inflateEnd()}}}),e.BlobReader=yn,e.BlobWriter=_n,e.Data64URIReader=bn,e.Data64URIWriter=vn,e.ERR_BAD_FORMAT=hr,e.ERR_CENTRAL_DIRECTORY_NOT_FOUND=br,e.ERR_DUPLICATED_NAME=Br,e.ERR_ENCRYPTED=_r,e.ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND=gr,e.ERR_EOCDR_NOT_FOUND=wr,e.ERR_EOCDR_ZIP64_NOT_FOUND=xr,e.ERR_EXTRAFIELD_ZIP64_NOT_FOUND=yr,e.ERR_HTTP_RANGE=dn,e.ERR_INVALID_COMMENT=Mr,e.ERR_INVALID_ENCRYPTION_STRENGTH=Gr,e.ERR_INVALID_ENTRY_COMMENT=Zr,e.ERR_INVALID_ENTRY_NAME=Vr,e.ERR_INVALID_EXTRAFIELD_DATA=Yr,e.ERR_INVALID_EXTRAFIELD_TYPE=Xr,e.ERR_INVALID_PASSWORD=Ge,e.ERR_INVALID_SIGNATURE=Xe,e.ERR_INVALID_VERSION=Kr,e.ERR_ITERATOR_COMPLETED_TOO_SOON=fn,e.ERR_LOCAL_FILE_HEADER_NOT_FOUND=vr,e.ERR_SPLIT_ZIP_FILE=Sr,e.ERR_UNSUPPORTED_COMPRESSION=zr,e.ERR_UNSUPPORTED_ENCRYPTION=kr,e.ERR_UNSUPPORTED_FORMAT=Jr,e.HttpRangeReader=class extends Nn{constructor(e,t={}){t.useRangeHeader=!0,super(e,t)}},e.HttpReader=Nn,e.Reader=xn,e.SplitDataReader=On,e.SplitDataWriter=Hn,e.SplitZipReader=Kn,e.SplitZipWriter=Gn,e.TextReader=kn,e.TextWriter=zn,e.Uint8ArrayReader=Pn,e.Uint8ArrayWriter=jn,e.Writer=gn,e.ZipReader=Wr,e.ZipReaderStream=class{constructor(e={}){const{readable:t,writable:n}=new z,r=new Wr(t,e).getEntriesGenerator();this.readable=new S({async pull(e){const{done:t,value:n}=await r.next();if(t)return e.close();const i={...n,readable:(()=>{const{readable:e,writable:t}=new z;if(n.getData)return n.getData(t),e})()};delete i.getData,e.enqueue(i)}}),this.writable=n}},e.ZipWriter=ti,e.ZipWriterStream=class{constructor(e={}){const{readable:t,writable:n}=new z;this.readable=t,this.zipWriter=new ti(n,e)}transform(e){const{readable:t,writable:n}=new z({flush:()=>{this.zipWriter.close()}});return this.zipWriter.add(e,t),{readable:this.readable,writable:n}}writable(e){const{readable:t,writable:n}=new z;return this.zipWriter.add(e,t),n}close(e,t={}){return this.zipWriter.close(e,t)}},e.configure=qe,e.fs=hi,e.getMimeType=e=>e&&Ie[e.split(".").pop().toLowerCase()]||"application/octet-stream",e.initShimAsyncCodec=(e,t={},n)=>({Deflate:ln(e.Deflate,t.deflate,n),Inflate:ln(e.Inflate,t.inflate,n)}),e.terminateWorkers=async()=>{await g.allSettled(nn.map((e=>(on(e),e.terminate()))))},n.defineProperty(e,"__esModule",{value:!0})})); +((e,t)=>{"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).zip={})})(this,(function(e){"use strict";const{Array:t,Object:n,String:r,Number:i,BigInt:s,Math:a,Date:o,Map:l,Set:c,Response:d,URL:f,Error:u,Uint8Array:p,Uint16Array:m,Uint32Array:h,DataView:w,Blob:x,Promise:g,TextEncoder:b,TextDecoder:v,document:y,crypto:_,btoa:k,TransformStream:z,ReadableStream:S,WritableStream:A,CompressionStream:D,DecompressionStream:C,navigator:R,Worker:E}="undefined"!=typeof globalThis?globalThis:this||self,W=-2;function F(e){return T(e.map((([e,n])=>new t(e).fill(n,0,e))))}function T(e){return e.reduce(((e,n)=>e.concat(t.isArray(n)?T(n):n)),[])}const q=[0,1,2,3].concat(...F([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function L(){const e=this;function t(e,t){let n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1}e.build_tree=n=>{const r=e.dyn_tree,i=e.stat_desc.static_tree,s=e.stat_desc.elems;let o,l,c,d=-1;for(n.heap_len=0,n.heap_max=573,o=0;s>o;o++)0!==r[2*o]?(n.heap[++n.heap_len]=d=o,n.depth[o]=0):r[2*o+1]=0;for(;2>n.heap_len;)c=n.heap[++n.heap_len]=2>d?++d:0,r[2*c]=1,n.depth[c]=0,n.opt_len--,i&&(n.static_len-=i[2*c+1]);for(e.max_code=d,o=a.floor(n.heap_len/2);o>=1;o--)n.pqdownheap(r,o);c=s;do{o=n.heap[1],n.heap[1]=n.heap[n.heap_len--],n.pqdownheap(r,1),l=n.heap[1],n.heap[--n.heap_max]=o,n.heap[--n.heap_max]=l,r[2*c]=r[2*o]+r[2*l],n.depth[c]=a.max(n.depth[o],n.depth[l])+1,r[2*o+1]=r[2*l+1]=c,n.heap[1]=c++,n.pqdownheap(r,1)}while(n.heap_len>=2);n.heap[--n.heap_max]=n.heap[1],(t=>{const n=e.dyn_tree,r=e.stat_desc.static_tree,i=e.stat_desc.extra_bits,s=e.stat_desc.extra_base,a=e.stat_desc.max_length;let o,l,c,d,f,u,p=0;for(d=0;15>=d;d++)t.bl_count[d]=0;for(n[2*t.heap[t.heap_max]+1]=0,o=t.heap_max+1;573>o;o++)l=t.heap[o],d=n[2*n[2*l+1]+1]+1,d>a&&(d=a,p++),n[2*l+1]=d,l>e.max_code||(t.bl_count[d]++,f=0,s>l||(f=i[l-s]),u=n[2*l],t.opt_len+=u*(d+f),r&&(t.static_len+=u*(r[2*l+1]+f)));if(0!==p){do{for(d=a-1;0===t.bl_count[d];)d--;t.bl_count[d]--,t.bl_count[d+1]+=2,t.bl_count[a]--,p-=2}while(p>0);for(d=a;0!==d;d--)for(l=t.bl_count[d];0!==l;)c=t.heap[--o],c>e.max_code||(n[2*c+1]!=d&&(t.opt_len+=(d-n[2*c+1])*n[2*c],n[2*c+1]=d),l--)}})(n),((e,n,r)=>{const i=[];let s,a,o,l=0;for(s=1;15>=s;s++)i[s]=l=l+r[s-1]<<1;for(a=0;n>=a;a++)o=e[2*a+1],0!==o&&(e[2*a]=t(i[o]++,o))})(r,e.max_code,n.bl_count)}}function U(e,t,n,r,i){const s=this;s.static_tree=e,s.extra_bits=t,s.extra_base=n,s.elems=r,s.max_length=i}L._length_code=[0,1,2,3,4,5,6,7].concat(...F([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]])),L.base_length=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0],L.base_dist=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576],L.d_code=e=>256>e?q[e]:q[256+(e>>>7)],L.extra_lbits=[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],L.extra_dbits=[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],L.extra_blbits=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],L.bl_order=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];const I=F([[144,8],[112,9],[24,7],[8,8]]);U.static_ltree=T([12,140,76,204,44,172,108,236,28,156,92,220,60,188,124,252,2,130,66,194,34,162,98,226,18,146,82,210,50,178,114,242,10,138,74,202,42,170,106,234,26,154,90,218,58,186,122,250,6,134,70,198,38,166,102,230,22,150,86,214,54,182,118,246,14,142,78,206,46,174,110,238,30,158,94,222,62,190,126,254,1,129,65,193,33,161,97,225,17,145,81,209,49,177,113,241,9,137,73,201,41,169,105,233,25,153,89,217,57,185,121,249,5,133,69,197,37,165,101,229,21,149,85,213,53,181,117,245,13,141,77,205,45,173,109,237,29,157,93,221,61,189,125,253,19,275,147,403,83,339,211,467,51,307,179,435,115,371,243,499,11,267,139,395,75,331,203,459,43,299,171,427,107,363,235,491,27,283,155,411,91,347,219,475,59,315,187,443,123,379,251,507,7,263,135,391,71,327,199,455,39,295,167,423,103,359,231,487,23,279,151,407,87,343,215,471,55,311,183,439,119,375,247,503,15,271,143,399,79,335,207,463,47,303,175,431,111,367,239,495,31,287,159,415,95,351,223,479,63,319,191,447,127,383,255,511,0,64,32,96,16,80,48,112,8,72,40,104,24,88,56,120,4,68,36,100,20,84,52,116,3,131,67,195,35,163,99,227].map(((e,t)=>[e,I[t]])));const N=F([[30,5]]);function P(e,t,n,r,i){const s=this;s.good_length=e,s.max_lazy=t,s.nice_length=n,s.max_chain=r,s.func=i}U.static_dtree=T([0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30,1,17,9,25,5,21,13,29,3,19,11,27,7,23].map(((e,t)=>[e,N[t]]))),U.static_l_desc=new U(U.static_ltree,L.extra_lbits,257,286,15),U.static_d_desc=new U(U.static_dtree,L.extra_dbits,0,30,15),U.static_bl_desc=new U(null,L.extra_blbits,0,19,7);const j=[new P(0,0,0,0,0),new P(4,4,8,4,1),new P(4,5,16,8,1),new P(4,6,32,32,1),new P(4,4,16,16,2),new P(8,16,32,32,2),new P(8,16,128,128,2),new P(8,32,128,256,2),new P(32,128,258,1024,2),new P(32,258,258,4096,2)],O=["need dictionary","stream end","","","stream error","data error","","buffer error","",""],H=113,B=666,M=262;function Z(e,t,n,r){const i=e[2*t],s=e[2*n];return s>i||i==s&&r[t]<=r[n]}function V(){const e=this;let t,n,r,i,s,o,l,c,d,f,u,h,w,x,g,b,v,y,_,k,z,S,A,D,C,R,E,F,T,q,I,N,P;const V=new L,K=new L,G=new L;let X,Y,J,Q,$,ee;function te(){let t;for(t=0;286>t;t++)I[2*t]=0;for(t=0;30>t;t++)N[2*t]=0;for(t=0;19>t;t++)P[2*t]=0;I[512]=1,e.opt_len=e.static_len=0,Y=J=0}function ne(e,t){let n,r=-1,i=e[1],s=0,a=7,o=4;0===i&&(a=138,o=3),e[2*(t+1)+1]=65535;for(let l=0;t>=l;l++)n=i,i=e[2*(l+1)+1],++ss?P[2*n]+=s:0!==n?(n!=r&&P[2*n]++,P[32]++):s>10?P[36]++:P[34]++,s=0,r=n,0===i?(a=138,o=3):n==i?(a=6,o=3):(a=7,o=4))}function re(t){e.pending_buf[e.pending++]=t}function ie(e){re(255&e),re(e>>>8&255)}function se(e,t){let n;const r=t;ee>16-r?(n=e,$|=n<>>16-ee,ee+=r-16):($|=e<=n;n++)if(r=s,s=e[2*(n+1)+1],++a>=o||r!=s){if(l>a)do{ae(r,P)}while(0!=--a);else 0!==r?(r!=i&&(ae(r,P),a--),ae(16,P),se(a-3,2)):a>10?(ae(18,P),se(a-11,7)):(ae(17,P),se(a-3,3));a=0,i=r,0===s?(o=138,l=3):r==s?(o=6,l=3):(o=7,l=4)}}function le(){16==ee?(ie($),$=0,ee=0):8>ee||(re(255&$),$>>>=8,ee-=8)}function ce(t,n){let r,i,s;if(e.dist_buf[Y]=t,e.lc_buf[Y]=255&n,Y++,0===t?I[2*n]++:(J++,t--,I[2*(L._length_code[n]+256+1)]++,N[2*L.d_code(t)]++),0==(8191&Y)&&E>2){for(r=8*Y,i=z-v,s=0;30>s;s++)r+=N[2*s]*(5+L.extra_dbits[s]);if(r>>>=3,Jo);ae(256,t),Q=t[513]}function fe(){ee>8?ie($):ee>0&&re(255&$),$=0,ee=0}function ue(t,n,r){se(0+(r?1:0),3),((t,n)=>{fe(),Q=8,ie(n),ie(~n),e.pending_buf.set(c.subarray(t,t+n),e.pending),e.pending+=n})(t,n)}function pe(n){((t,n,r)=>{let i,s,a=0;E>0?(V.build_tree(e),K.build_tree(e),a=(()=>{let t;for(ne(I,V.max_code),ne(N,K.max_code),G.build_tree(e),t=18;t>=3&&0===P[2*L.bl_order[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t})(),i=e.opt_len+3+7>>>3,s=e.static_len+3+7>>>3,s>i||(i=s)):i=s=n+5,n+4>i||-1==t?s==i?(se(2+(r?1:0),3),de(U.static_ltree,U.static_dtree)):(se(4+(r?1:0),3),((e,t,n)=>{let r;for(se(e-257,5),se(t-1,5),se(n-4,4),r=0;n>r;r++)se(P[2*L.bl_order[r]+1],3);oe(I,e-1),oe(N,t-1)})(V.max_code+1,K.max_code+1,a+1),de(I,N)):ue(t,n,r),te(),r&&fe()})(0>v?-1:v,z-v,n),v=z,t.flush_pending()}function me(){let e,n,r,i;do{if(i=d-A-z,0===i&&0===z&&0===A)i=s;else if(-1==i)i--;else if(z>=s+s-M){c.set(c.subarray(s,s+s),0),S-=s,z-=s,v-=s,e=w,r=e;do{n=65535&u[--r],u[r]=s>n?0:n-s}while(0!=--e);e=s,r=e;do{n=65535&f[--r],f[r]=s>n?0:n-s}while(0!=--e);i+=s}if(0===t.avail_in)return;e=t.read_buf(c,z+A,i),A+=e,3>A||(h=255&c[z],h=(h<A&&0!==t.avail_in)}function he(e){let t,n,r=C,i=z,a=D;const o=z>s-M?z-(s-M):0;let d=q;const u=l,p=z+258;let m=c[i+a-1],h=c[i+a];T>D||(r>>=2),d>A&&(d=A);do{if(t=e,c[t+a]==h&&c[t+a-1]==m&&c[t]==c[i]&&c[++t]==c[i+1]){i+=2,t++;do{}while(c[++i]==c[++t]&&c[++i]==c[++t]&&c[++i]==c[++t]&&c[++i]==c[++t]&&c[++i]==c[++t]&&c[++i]==c[++t]&&c[++i]==c[++t]&&c[++i]==c[++t]&&p>i);if(n=258-(p-i),i=p-258,n>a){if(S=e,a=n,n>=d)break;m=c[i+a-1],h=c[i+a]}}}while((e=65535&f[e&u])>o&&0!=--r);return a>A?A:a}e.depth=[],e.bl_count=[],e.heap=[],I=[],N=[],P=[],e.pqdownheap=(t,n)=>{const r=e.heap,i=r[n];let s=n<<1;for(;s<=e.heap_len&&(s(L||(L=8),O||(O=8),B||(B=0),t.msg=null,-1==_&&(_=6),1>O||O>9||8!=L||9>S||S>15||0>_||_>9||0>B||B>2?W:(t.dstate=e,o=S,s=1<(t.total_in=t.total_out=0,t.msg=null,e.pending=0,e.pending_out=0,n=H,i=0,V.dyn_tree=I,V.stat_desc=U.static_l_desc,K.dyn_tree=N,K.stat_desc=U.static_d_desc,G.dyn_tree=P,G.stat_desc=U.static_bl_desc,$=0,ee=0,Q=8,te(),(()=>{d=2*s,u[w-1]=0;for(let e=0;w-1>e;e++)u[e]=0;R=j[E].max_lazy,T=j[E].good_length,q=j[E].nice_length,C=j[E].max_chain,z=0,v=0,A=0,y=D=2,k=0,h=0})(),0))(t))),e.deflateEnd=()=>42!=n&&n!=H&&n!=B?W:(e.lc_buf=null,e.dist_buf=null,e.pending_buf=null,u=null,f=null,c=null,e.dstate=null,n==H?-3:0),e.deflateParams=(e,t,n)=>{let r=0;return-1==t&&(t=6),0>t||t>9||0>n||n>2?W:(j[E].func!=j[t].func&&0!==e.total_in&&(r=e.deflate(1)),E!=t&&(E=t,R=j[E].max_lazy,T=j[E].good_length,q=j[E].nice_length,C=j[E].max_chain),F=n,r)},e.deflateSetDictionary=(e,t,r)=>{let i,a=r,o=0;if(!t||42!=n)return W;if(3>a)return 0;for(a>s-M&&(a=s-M,o=r-a),c.set(t.subarray(o,o+a),0),z=a,v=a,h=255&c[0],h=(h<=i;i++)h=(h<{let p,m,x,C,T;if(d>4||0>d)return W;if(!a.next_out||!a.next_in&&0!==a.avail_in||n==B&&4!=d)return a.msg=O[4],W;if(0===a.avail_out)return a.msg=O[7],-5;var q;if(t=a,C=i,i=d,42==n&&(m=8+(o-8<<4)<<8,x=(E-1&255)>>1,x>3&&(x=3),m|=x<<6,0!==z&&(m|=32),m+=31-m%31,n=H,re((q=m)>>8&255),re(255&q)),0!==e.pending){if(t.flush_pending(),0===t.avail_out)return i=-1,0}else if(0===t.avail_in&&C>=d&&4!=d)return t.msg=O[7],-5;if(n==B&&0!==t.avail_in)return a.msg=O[7],-5;if(0!==t.avail_in||0!==A||0!=d&&n!=B){switch(T=-1,j[E].func){case 0:T=(e=>{let n,i=65535;for(i>r-5&&(i=r-5);;){if(1>=A){if(me(),0===A&&0==e)return 0;if(0===A)break}if(z+=A,A=0,n=v+i,(0===z||z>=n)&&(A=z-n,z=n,pe(!1),0===t.avail_out))return 0;if(z-v>=s-M&&(pe(!1),0===t.avail_out))return 0}return pe(4==e),0===t.avail_out?4==e?2:0:4==e?3:1})(d);break;case 1:T=(e=>{let n,r=0;for(;;){if(M>A){if(me(),M>A&&0==e)return 0;if(0===A)break}if(3>A||(h=(h<s-M||2!=F&&(y=he(r)),3>y)n=ce(0,255&c[z]),A--,z++;else if(n=ce(z-S,y-3),A-=y,y>R||3>A)z+=y,y=0,h=255&c[z],h=(h<{let n,r,i=0;for(;;){if(M>A){if(me(),M>A&&0==e)return 0;if(0===A)break}if(3>A||(h=(h<D&&s-M>=(z-i&65535)&&(2!=F&&(y=he(i)),5>=y&&(1==F||3==y&&z-S>4096)&&(y=2)),3>D||y>D)if(0!==k){if(n=ce(0,255&c[z-1]),n&&pe(!1),z++,A--,0===t.avail_out)return 0}else k=1,z++,A--;else{r=z+A-3,n=ce(z-1-_,D-3),A-=D-1,D-=2;do{++z>r||(h=(h<1+Q+10-ee&&(se(2,3),ae(256,U.static_ltree),le()),Q=7;else if(ue(0,0,!1),3==d)for(p=0;w>p;p++)u[p]=0;if(t.flush_pending(),0===t.avail_out)return i=-1,0}}return 4!=d?0:1}}function K(){const e=this;e.next_in_index=0,e.next_out_index=0,e.avail_in=0,e.total_in=0,e.avail_out=0,e.total_out=0}K.prototype={deflateInit(e,t){const n=this;return n.dstate=new V,t||(t=15),n.dstate.deflateInit(n,e,t)},deflate(e){const t=this;return t.dstate?t.dstate.deflate(t,e):W},deflateEnd(){const e=this;if(!e.dstate)return W;const t=e.dstate.deflateEnd();return e.dstate=null,t},deflateParams(e,t){const n=this;return n.dstate?n.dstate.deflateParams(n,e,t):W},deflateSetDictionary(e,t){const n=this;return n.dstate?n.dstate.deflateSetDictionary(n,e,t):W},read_buf(e,t,n){const r=this;let i=r.avail_in;return i>n&&(i=n),0===i?0:(r.avail_in-=i,e.set(r.next_in.subarray(r.next_in_index,r.next_in_index+i),t),r.next_in_index+=i,r.total_in+=i,i)},flush_pending(){const e=this;let t=e.dstate.pending;t>e.avail_out&&(t=e.avail_out),0!==t&&(e.next_out.set(e.dstate.pending_buf.subarray(e.dstate.pending_out,e.dstate.pending_out+t),e.next_out_index),e.next_out_index+=t,e.dstate.pending_out+=t,e.total_out+=t,e.avail_out-=t,e.dstate.pending-=t,0===e.dstate.pending&&(e.dstate.pending_out=0))}};const G=-2,X=-3,Y=-5,J=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],Q=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],$=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],ee=[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,0,0],te=[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,112,112],ne=[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],re=[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];function ie(){let e,t,n,r,i,s;function a(e,t,a,o,l,c,d,f,u,p,m){let h,w,x,g,b,v,y,_,k,z,S,A,D,C,R;z=0,b=a;do{n[e[t+z]]++,z++,b--}while(0!==b);if(n[0]==a)return d[0]=-1,f[0]=0,0;for(_=f[0],v=1;15>=v&&0===n[v];v++);for(y=v,v>_&&(_=v),b=15;0!==b&&0===n[b];b--);for(x=b,_>b&&(_=b),f[0]=_,C=1<v;v++,C<<=1)if(0>(C-=n[v]))return X;if(0>(C-=n[b]))return X;for(n[b]+=C,s[1]=v=0,z=1,D=2;0!=--b;)s[D]=v+=n[z],D++,z++;b=0,z=0;do{0!==(v=e[t+z])&&(m[s[v]++]=b),z++}while(++b=y;y++)for(h=n[y];0!=h--;){for(;y>A+_;){if(g++,A+=_,R=x-A,R=R>_?_:R,(w=1<<(v=y-A))>h+1&&(w-=h+1,D=y,R>v))for(;++vn[++D];)w-=n[D];if(R=1<1440)return X;i[g]=S=p[0],p[0]+=R,0!==g?(s[g]=b,r[0]=v,r[1]=_,v=b>>>A-_,r[2]=S-i[g-1]-v,u.set(r,3*(i[g-1]+v))):d[0]=S}for(r[1]=y-A,a>z?m[z]m[z]?0:96,r[2]=m[z++]):(r[0]=c[m[z]-o]+16+64,r[2]=l[m[z++]-o]):r[0]=192,w=1<>>A;R>v;v+=w)u.set(r,3*(S+v));for(v=1<>>=1)b^=v;for(b^=v,k=(1<o;o++)t[o]=0;for(o=0;16>o;o++)n[o]=0;for(o=0;3>o;o++)r[o]=0;i.set(n.subarray(0,15),0),s.set(n.subarray(0,16),0)}this.inflate_trees_bits=(n,r,i,s,l)=>{let c;return o(19),e[0]=0,c=a(n,0,19,19,null,null,i,r,s,e,t),c==X?l.msg="oversubscribed dynamic bit lengths tree":c!=Y&&0!==r[0]||(l.msg="incomplete dynamic bit lengths tree",c=X),c},this.inflate_trees_dynamic=(n,r,i,s,l,c,d,f,u)=>{let p;return o(288),e[0]=0,p=a(i,0,n,257,ee,te,c,s,f,e,t),0!=p||0===s[0]?(p==X?u.msg="oversubscribed literal/length tree":-4!=p&&(u.msg="incomplete literal/length tree",p=X),p):(o(288),p=a(i,n,r,0,ne,re,d,l,f,e,t),0!=p||0===l[0]&&n>257?(p==X?u.msg="oversubscribed distance tree":p==Y?(u.msg="incomplete distance tree",p=X):-4!=p&&(u.msg="empty distance tree with lengths",p=X),p):0)}}function se(){const e=this;let t,n,r,i,s=0,a=0,o=0,l=0,c=0,d=0,f=0,u=0,p=0,m=0;function h(e,t,n,r,i,s,a,o){let l,c,d,f,u,p,m,h,w,x,g,b,v,y,_,k;m=o.next_in_index,h=o.avail_in,u=a.bitb,p=a.bitk,w=a.write,x=wp;)h--,u|=(255&o.read_byte(m++))<>=c[k+1],p-=c[k+1],0!=(16&f)){for(f&=15,v=c[k+2]+(u&J[f]),u>>=f,p-=f;15>p;)h--,u|=(255&o.read_byte(m++))<>=c[k+1],p-=c[k+1],0!=(16&f)){for(f&=15;f>p;)h--,u|=(255&o.read_byte(m++))<>=f,p-=f,x-=v,y>w){_=w-y;do{_+=a.end}while(0>_);if(f=a.end-_,v>f){if(v-=f,w-_>0&&f>w-_)do{a.win[w++]=a.win[_++]}while(0!=--f);else a.win.set(a.win.subarray(_,_+f),w),w+=f,_+=f,f=0;_=0}}else _=w-y,w-_>0&&2>w-_?(a.win[w++]=a.win[_++],a.win[w++]=a.win[_++],v-=2):(a.win.set(a.win.subarray(_,_+2),w),w+=2,_+=2,v-=2);if(w-_>0&&v>w-_)do{a.win[w++]=a.win[_++]}while(0!=--v);else a.win.set(a.win.subarray(_,_+v),w),w+=v,_+=v,v=0;break}if(0!=(64&f))return o.msg="invalid distance code",v=o.avail_in-h,v=v>p>>3?p>>3:v,h+=v,m-=v,p-=v<<3,a.bitb=u,a.bitk=p,o.avail_in=h,o.total_in+=m-o.next_in_index,o.next_in_index=m,a.write=w,X;l+=c[k+2],l+=u&J[f],k=3*(d+l),f=c[k]}break}if(0!=(64&f))return 0!=(32&f)?(v=o.avail_in-h,v=v>p>>3?p>>3:v,h+=v,m-=v,p-=v<<3,a.bitb=u,a.bitk=p,o.avail_in=h,o.total_in+=m-o.next_in_index,o.next_in_index=m,a.write=w,1):(o.msg="invalid literal/length code",v=o.avail_in-h,v=v>p>>3?p>>3:v,h+=v,m-=v,p-=v<<3,a.bitb=u,a.bitk=p,o.avail_in=h,o.total_in+=m-o.next_in_index,o.next_in_index=m,a.write=w,X);if(l+=c[k+2],l+=u&J[f],k=3*(d+l),0===(f=c[k])){u>>=c[k+1],p-=c[k+1],a.win[w++]=c[k+2],x--;break}}else u>>=c[k+1],p-=c[k+1],a.win[w++]=c[k+2],x--}while(x>=258&&h>=10);return v=o.avail_in-h,v=v>p>>3?p>>3:v,h+=v,m-=v,p-=v<<3,a.bitb=u,a.bitk=p,o.avail_in=h,o.total_in+=m-o.next_in_index,o.next_in_index=m,a.write=w,0}e.init=(e,s,a,o,l,c)=>{t=0,f=e,u=s,r=a,p=o,i=l,m=c,n=null},e.proc=(e,w,x)=>{let g,b,v,y,_,k,z,S=0,A=0,D=0;for(D=w.next_in_index,y=w.avail_in,S=e.bitb,A=e.bitk,_=e.write,k=_=258&&y>=10&&(e.bitb=S,e.bitk=A,w.avail_in=y,w.total_in+=D-w.next_in_index,w.next_in_index=D,e.write=_,x=h(f,u,r,p,i,m,e,w),D=w.next_in_index,y=w.avail_in,S=e.bitb,A=e.bitk,_=e.write,k=_A;){if(0===y)return e.bitb=S,e.bitk=A,w.avail_in=y,w.total_in+=D-w.next_in_index,w.next_in_index=D,e.write=_,e.inflate_flush(w,x);x=0,y--,S|=(255&w.read_byte(D++))<>>=n[b+1],A-=n[b+1],v=n[b],0===v){l=n[b+2],t=6;break}if(0!=(16&v)){c=15&v,s=n[b+2],t=2;break}if(0==(64&v)){o=v,a=b/3+n[b+2];break}if(0!=(32&v)){t=7;break}return t=9,w.msg="invalid literal/length code",x=X,e.bitb=S,e.bitk=A,w.avail_in=y,w.total_in+=D-w.next_in_index,w.next_in_index=D,e.write=_,e.inflate_flush(w,x);case 2:for(g=c;g>A;){if(0===y)return e.bitb=S,e.bitk=A,w.avail_in=y,w.total_in+=D-w.next_in_index,w.next_in_index=D,e.write=_,e.inflate_flush(w,x);x=0,y--,S|=(255&w.read_byte(D++))<>=g,A-=g,o=u,n=i,a=m,t=3;case 3:for(g=o;g>A;){if(0===y)return e.bitb=S,e.bitk=A,w.avail_in=y,w.total_in+=D-w.next_in_index,w.next_in_index=D,e.write=_,e.inflate_flush(w,x);x=0,y--,S|=(255&w.read_byte(D++))<>=n[b+1],A-=n[b+1],v=n[b],0!=(16&v)){c=15&v,d=n[b+2],t=4;break}if(0==(64&v)){o=v,a=b/3+n[b+2];break}return t=9,w.msg="invalid distance code",x=X,e.bitb=S,e.bitk=A,w.avail_in=y,w.total_in+=D-w.next_in_index,w.next_in_index=D,e.write=_,e.inflate_flush(w,x);case 4:for(g=c;g>A;){if(0===y)return e.bitb=S,e.bitk=A,w.avail_in=y,w.total_in+=D-w.next_in_index,w.next_in_index=D,e.write=_,e.inflate_flush(w,x);x=0,y--,S|=(255&w.read_byte(D++))<>=g,A-=g,t=5;case 5:for(z=_-d;0>z;)z+=e.end;for(;0!==s;){if(0===k&&(_==e.end&&0!==e.read&&(_=0,k=_7&&(A-=8,y++,D--),e.write=_,x=e.inflate_flush(w,x),_=e.write,k=_{}}ie.inflate_trees_fixed=(e,t,n,r)=>(e[0]=9,t[0]=5,n[0]=Q,r[0]=$,0);const ae=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function oe(e,t){const n=this;let r,i=0,s=0,a=0,o=0;const l=[0],c=[0],d=new se;let f=0,u=new Int32Array(4320);const m=new ie;n.bitk=0,n.bitb=0,n.win=new p(t),n.end=t,n.read=0,n.write=0,n.reset=(e,t)=>{t&&(t[0]=0),6==i&&d.free(e),i=0,n.bitk=0,n.bitb=0,n.read=n.write=0},n.reset(e,null),n.inflate_flush=(e,t)=>{let r,i,s;return i=e.next_out_index,s=n.read,r=(s>n.write?n.end:n.write)-s,r>e.avail_out&&(r=e.avail_out),0!==r&&t==Y&&(t=0),e.avail_out-=r,e.total_out+=r,e.next_out.set(n.win.subarray(s,s+r),i),i+=r,s+=r,s==n.end&&(s=0,n.write==n.end&&(n.write=0),r=n.write-s,r>e.avail_out&&(r=e.avail_out),0!==r&&t==Y&&(t=0),e.avail_out-=r,e.total_out+=r,e.next_out.set(n.win.subarray(s,s+r),i),i+=r,s+=r),e.next_out_index=i,n.read=s,t},n.proc=(e,t)=>{let p,h,w,x,g,b,v,y;for(x=e.next_in_index,g=e.avail_in,h=n.bitb,w=n.bitk,b=n.write,v=bw;){if(0===g)return n.bitb=h,n.bitk=w,e.avail_in=g,e.total_in+=x-e.next_in_index,e.next_in_index=x,n.write=b,n.inflate_flush(e,t);t=0,g--,h|=(255&e.read_byte(x++))<>>1){case 0:h>>>=3,w-=3,p=7&w,h>>>=p,w-=p,i=1;break;case 1:_=[],k=[],z=[[]],S=[[]],ie.inflate_trees_fixed(_,k,z,S),d.init(_[0],k[0],z[0],0,S[0],0),h>>>=3,w-=3,i=6;break;case 2:h>>>=3,w-=3,i=3;break;case 3:return h>>>=3,w-=3,i=9,e.msg="invalid block type",t=X,n.bitb=h,n.bitk=w,e.avail_in=g,e.total_in+=x-e.next_in_index,e.next_in_index=x,n.write=b,n.inflate_flush(e,t)}break;case 1:for(;32>w;){if(0===g)return n.bitb=h,n.bitk=w,e.avail_in=g,e.total_in+=x-e.next_in_index,e.next_in_index=x,n.write=b,n.inflate_flush(e,t);t=0,g--,h|=(255&e.read_byte(x++))<>>16&65535)!=(65535&h))return i=9,e.msg="invalid stored block lengths",t=X,n.bitb=h,n.bitk=w,e.avail_in=g,e.total_in+=x-e.next_in_index,e.next_in_index=x,n.write=b,n.inflate_flush(e,t);s=65535&h,h=w=0,i=0!==s?2:0!==f?7:0;break;case 2:if(0===g)return n.bitb=h,n.bitk=w,e.avail_in=g,e.total_in+=x-e.next_in_index,e.next_in_index=x,n.write=b,n.inflate_flush(e,t);if(0===v&&(b==n.end&&0!==n.read&&(b=0,v=bg&&(p=g),p>v&&(p=v),n.win.set(e.read_buf(x,p),b),x+=p,g-=p,b+=p,v-=p,0!=(s-=p))break;i=0!==f?7:0;break;case 3:for(;14>w;){if(0===g)return n.bitb=h,n.bitk=w,e.avail_in=g,e.total_in+=x-e.next_in_index,e.next_in_index=x,n.write=b,n.inflate_flush(e,t);t=0,g--,h|=(255&e.read_byte(x++))<29||(p>>5&31)>29)return i=9,e.msg="too many length or distance symbols",t=X,n.bitb=h,n.bitk=w,e.avail_in=g,e.total_in+=x-e.next_in_index,e.next_in_index=x,n.write=b,n.inflate_flush(e,t);if(p=258+(31&p)+(p>>5&31),!r||r.lengthy;y++)r[y]=0;h>>>=14,w-=14,o=0,i=4;case 4:for(;4+(a>>>10)>o;){for(;3>w;){if(0===g)return n.bitb=h,n.bitk=w,e.avail_in=g,e.total_in+=x-e.next_in_index,e.next_in_index=x,n.write=b,n.inflate_flush(e,t);t=0,g--,h|=(255&e.read_byte(x++))<>>=3,w-=3}for(;19>o;)r[ae[o++]]=0;if(l[0]=7,p=m.inflate_trees_bits(r,l,c,u,e),0!=p)return(t=p)==X&&(r=null,i=9),n.bitb=h,n.bitk=w,e.avail_in=g,e.total_in+=x-e.next_in_index,e.next_in_index=x,n.write=b,n.inflate_flush(e,t);o=0,i=5;case 5:for(;p=a,258+(31&p)+(p>>5&31)>o;){let s,d;for(p=l[0];p>w;){if(0===g)return n.bitb=h,n.bitk=w,e.avail_in=g,e.total_in+=x-e.next_in_index,e.next_in_index=x,n.write=b,n.inflate_flush(e,t);t=0,g--,h|=(255&e.read_byte(x++))<d)h>>>=p,w-=p,r[o++]=d;else{for(y=18==d?7:d-14,s=18==d?11:3;p+y>w;){if(0===g)return n.bitb=h,n.bitk=w,e.avail_in=g,e.total_in+=x-e.next_in_index,e.next_in_index=x,n.write=b,n.inflate_flush(e,t);t=0,g--,h|=(255&e.read_byte(x++))<>>=p,w-=p,s+=h&J[y],h>>>=y,w-=y,y=o,p=a,y+s>258+(31&p)+(p>>5&31)||16==d&&1>y)return r=null,i=9,e.msg="invalid bit length repeat",t=X,n.bitb=h,n.bitk=w,e.avail_in=g,e.total_in+=x-e.next_in_index,e.next_in_index=x,n.write=b,n.inflate_flush(e,t);d=16==d?r[y-1]:0;do{r[y++]=d}while(0!=--s);o=y}}if(c[0]=-1,A=[],D=[],C=[],R=[],A[0]=9,D[0]=6,p=a,p=m.inflate_trees_dynamic(257+(31&p),1+(p>>5&31),r,A,D,C,R,u,e),0!=p)return p==X&&(r=null,i=9),t=p,n.bitb=h,n.bitk=w,e.avail_in=g,e.total_in+=x-e.next_in_index,e.next_in_index=x,n.write=b,n.inflate_flush(e,t);d.init(A[0],D[0],u,C[0],u,R[0]),i=6;case 6:if(n.bitb=h,n.bitk=w,e.avail_in=g,e.total_in+=x-e.next_in_index,e.next_in_index=x,n.write=b,1!=(t=d.proc(n,e,t)))return n.inflate_flush(e,t);if(t=0,d.free(e),x=e.next_in_index,g=e.avail_in,h=n.bitb,w=n.bitk,b=n.write,v=b{n.reset(e,null),n.win=null,u=null},n.set_dictionary=(e,t,r)=>{n.win.set(e.subarray(t,t+r),0),n.read=n.write=r},n.sync_point=()=>1==i?1:0}const le=13,ce=[0,0,255,255];function de(){const e=this;function t(e){return e&&e.istate?(e.total_in=e.total_out=0,e.msg=null,e.istate.mode=7,e.istate.blocks.reset(e,null),0):G}e.mode=0,e.method=0,e.was=[0],e.need=0,e.marker=0,e.wbits=0,e.inflateEnd=t=>(e.blocks&&e.blocks.free(t),e.blocks=null,0),e.inflateInit=(n,r)=>(n.msg=null,e.blocks=null,8>r||r>15?(e.inflateEnd(n),G):(e.wbits=r,n.istate.blocks=new oe(n,1<{let n,r;if(!e||!e.istate||!e.next_in)return G;const i=e.istate;for(t=4==t?Y:0,n=Y;;)switch(i.mode){case 0:if(0===e.avail_in)return n;if(n=t,e.avail_in--,e.total_in++,8!=(15&(i.method=e.read_byte(e.next_in_index++)))){i.mode=le,e.msg="unknown compression method",i.marker=5;break}if(8+(i.method>>4)>i.wbits){i.mode=le,e.msg="invalid win size",i.marker=5;break}i.mode=1;case 1:if(0===e.avail_in)return n;if(n=t,e.avail_in--,e.total_in++,r=255&e.read_byte(e.next_in_index++),((i.method<<8)+r)%31!=0){i.mode=le,e.msg="incorrect header check",i.marker=5;break}if(0==(32&r)){i.mode=7;break}i.mode=2;case 2:if(0===e.avail_in)return n;n=t,e.avail_in--,e.total_in++,i.need=(255&e.read_byte(e.next_in_index++))<<24&4278190080,i.mode=3;case 3:if(0===e.avail_in)return n;n=t,e.avail_in--,e.total_in++,i.need+=(255&e.read_byte(e.next_in_index++))<<16&16711680,i.mode=4;case 4:if(0===e.avail_in)return n;n=t,e.avail_in--,e.total_in++,i.need+=(255&e.read_byte(e.next_in_index++))<<8&65280,i.mode=5;case 5:return 0===e.avail_in?n:(n=t,e.avail_in--,e.total_in++,i.need+=255&e.read_byte(e.next_in_index++),i.mode=6,2);case 6:return i.mode=le,e.msg="need dictionary",i.marker=0,G;case 7:if(n=i.blocks.proc(e,n),n==X){i.mode=le,i.marker=0;break}if(0==n&&(n=t),1!=n)return n;n=t,i.blocks.reset(e,i.was),i.mode=12;case 12:return e.avail_in=0,1;case le:return X;default:return G}},e.inflateSetDictionary=(e,t,n)=>{let r=0,i=n;if(!e||!e.istate||6!=e.istate.mode)return G;const s=e.istate;return i<1<{let n,r,i,s,a;if(!e||!e.istate)return G;const o=e.istate;if(o.mode!=le&&(o.mode=le,o.marker=0),0===(n=e.avail_in))return Y;for(r=e.next_in_index,i=o.marker;0!==n&&4>i;)e.read_byte(r)==ce[i]?i++:i=0!==e.read_byte(r)?0:4-i,r++,n--;return e.total_in+=r-e.next_in_index,e.next_in_index=r,e.avail_in=n,o.marker=i,4!=i?X:(s=e.total_in,a=e.total_out,t(e),e.total_in=s,e.total_out=a,o.mode=7,0)},e.inflateSyncPoint=e=>e&&e.istate&&e.istate.blocks?e.istate.blocks.sync_point():G}function fe(){}fe.prototype={inflateInit(e){const t=this;return t.istate=new de,e||(e=15),t.istate.inflateInit(t,e)},inflate(e){const t=this;return t.istate?t.istate.inflate(t,e):G},inflateEnd(){const e=this;if(!e.istate)return G;const t=e.istate.inflateEnd(e);return e.istate=null,t},inflateSync(){const e=this;return e.istate?e.istate.inflateSync(e):G},inflateSetDictionary(e,t){const n=this;return n.istate?n.istate.inflateSetDictionary(n,e,t):G},read_byte(e){return this.next_in[e]},read_buf(e,t){return this.next_in.subarray(e,e+t)}};const ue=4294967295,pe=65535,me=67324752,he=134695760,we=33639248,xe=101075792,ge=117853008,be=22,ve=21589,ye=2048,_e="/",ke=new o(2107,11,31),ze=new o(1980,0,1),Se=void 0,Ae="undefined",De="function";class Ce{constructor(e){return class extends z{constructor(t,n){const r=new e(n);super({transform(e,t){t.enqueue(r.append(e))},flush(e){const t=r.flush();t&&e.enqueue(t)}})}}}}let Re=2;try{typeof R!=Ae&&R.hardwareConcurrency&&(Re=R.hardwareConcurrency)}catch(e){}const Ee={chunkSize:524288,maxWorkers:Re,terminateWorkerTimeout:5e3,useWebWorkers:!0,useCompressionStream:!0,workerScripts:Se,CompressionStreamNative:typeof D!=Ae&&D,DecompressionStreamNative:typeof C!=Ae&&C},We=n.assign({},Ee);function Fe(){return We}function Te(e){return a.max(e.chunkSize,64)}function qe(e){const{baseURL:n,chunkSize:r,maxWorkers:i,terminateWorkerTimeout:s,useCompressionStream:a,useWebWorkers:o,Deflate:l,Inflate:c,CompressionStream:d,DecompressionStream:f,workerScripts:p}=e;if(Le("baseURL",n),Le("chunkSize",r),Le("maxWorkers",i),Le("terminateWorkerTimeout",s),Le("useCompressionStream",a),Le("useWebWorkers",o),l&&(We.CompressionStream=new Ce(l)),c&&(We.DecompressionStream=new Ce(c)),Le("CompressionStream",d),Le("DecompressionStream",f),p!==Se){const{deflate:e,inflate:n}=p;if((e||n)&&(We.workerScripts||(We.workerScripts={})),e){if(!t.isArray(e))throw new u("workerScripts.deflate must be an array");We.workerScripts.deflate=e}if(n){if(!t.isArray(n))throw new u("workerScripts.inflate must be an array");We.workerScripts.inflate=n}}}function Le(e,t){t!==Se&&(We[e]=t)}const Ue={application:{"andrew-inset":"ez",annodex:"anx","atom+xml":"atom","atomcat+xml":"atomcat","atomserv+xml":"atomsrv",bbolin:"lin","cu-seeme":"cu","davmount+xml":"davmount",dsptype:"tsp",ecmascript:["es","ecma"],futuresplash:"spl",hta:"hta","java-archive":"jar","java-serialized-object":"ser","java-vm":"class",m3g:"m3g","mac-binhex40":"hqx",mathematica:["nb","ma","mb"],msaccess:"mdb",msword:["doc","dot","wiz"],mxf:"mxf",oda:"oda",ogg:"ogx",pdf:"pdf","pgp-keys":"key","pgp-signature":["asc","sig"],"pics-rules":"prf",postscript:["ps","ai","eps","epsi","epsf","eps2","eps3"],rar:"rar","rdf+xml":"rdf","rss+xml":"rss",rtf:"rtf","xhtml+xml":["xhtml","xht"],xml:["xml","xsl","xsd","xpdl"],"xspf+xml":"xspf",zip:"zip","vnd.android.package-archive":"apk","vnd.cinderella":"cdy","vnd.google-earth.kml+xml":"kml","vnd.google-earth.kmz":"kmz","vnd.mozilla.xul+xml":"xul","vnd.ms-excel":["xls","xlb","xlt","xlm","xla","xlc","xlw"],"vnd.ms-pki.seccat":"cat","vnd.ms-pki.stl":"stl","vnd.ms-powerpoint":["ppt","pps","pot","ppa","pwz"],"vnd.oasis.opendocument.chart":"odc","vnd.oasis.opendocument.database":"odb","vnd.oasis.opendocument.formula":"odf","vnd.oasis.opendocument.graphics":"odg","vnd.oasis.opendocument.graphics-template":"otg","vnd.oasis.opendocument.image":"odi","vnd.oasis.opendocument.presentation":"odp","vnd.oasis.opendocument.presentation-template":"otp","vnd.oasis.opendocument.spreadsheet":"ods","vnd.oasis.opendocument.spreadsheet-template":"ots","vnd.oasis.opendocument.text":"odt","vnd.oasis.opendocument.text-master":["odm","otm"],"vnd.oasis.opendocument.text-template":"ott","vnd.oasis.opendocument.text-web":"oth","vnd.openxmlformats-officedocument.spreadsheetml.sheet":"xlsx","vnd.openxmlformats-officedocument.spreadsheetml.template":"xltx","vnd.openxmlformats-officedocument.presentationml.presentation":"pptx","vnd.openxmlformats-officedocument.presentationml.slideshow":"ppsx","vnd.openxmlformats-officedocument.presentationml.template":"potx","vnd.openxmlformats-officedocument.wordprocessingml.document":"docx","vnd.openxmlformats-officedocument.wordprocessingml.template":"dotx","vnd.smaf":"mmf","vnd.stardivision.calc":"sdc","vnd.stardivision.chart":"sds","vnd.stardivision.draw":"sda","vnd.stardivision.impress":"sdd","vnd.stardivision.math":["sdf","smf"],"vnd.stardivision.writer":["sdw","vor"],"vnd.stardivision.writer-global":"sgl","vnd.sun.xml.calc":"sxc","vnd.sun.xml.calc.template":"stc","vnd.sun.xml.draw":"sxd","vnd.sun.xml.draw.template":"std","vnd.sun.xml.impress":"sxi","vnd.sun.xml.impress.template":"sti","vnd.sun.xml.math":"sxm","vnd.sun.xml.writer":"sxw","vnd.sun.xml.writer.global":"sxg","vnd.sun.xml.writer.template":"stw","vnd.symbian.install":["sis","sisx"],"vnd.visio":["vsd","vst","vss","vsw","vsdx","vssx","vstx","vssm","vstm"],"vnd.wap.wbxml":"wbxml","vnd.wap.wmlc":"wmlc","vnd.wap.wmlscriptc":"wmlsc","vnd.wordperfect":"wpd","vnd.wordperfect5.1":"wp5","x-123":"wk","x-7z-compressed":"7z","x-abiword":"abw","x-apple-diskimage":"dmg","x-bcpio":"bcpio","x-bittorrent":"torrent","x-cbr":["cbr","cba","cbt","cb7"],"x-cbz":"cbz","x-cdf":["cdf","cda"],"x-cdlink":"vcd","x-chess-pgn":"pgn","x-cpio":"cpio","x-csh":"csh","x-director":["dir","dxr","cst","cct","cxt","w3d","fgd","swa"],"x-dms":"dms","x-doom":"wad","x-dvi":"dvi","x-httpd-eruby":"rhtml","x-font":"pcf.Z","x-freemind":"mm","x-gnumeric":"gnumeric","x-go-sgf":"sgf","x-graphing-calculator":"gcf","x-gtar":["gtar","taz"],"x-hdf":"hdf","x-httpd-php":["phtml","pht","php"],"x-httpd-php-source":"phps","x-httpd-php3":"php3","x-httpd-php3-preprocessed":"php3p","x-httpd-php4":"php4","x-httpd-php5":"php5","x-ica":"ica","x-info":"info","x-internet-signup":["ins","isp"],"x-iphone":"iii","x-iso9660-image":"iso","x-java-jnlp-file":"jnlp","x-jmol":"jmz","x-killustrator":"kil","x-latex":"latex","x-lyx":"lyx","x-lzx":"lzx","x-maker":["frm","fb","fbdoc"],"x-ms-wmd":"wmd","x-msdos-program":["com","exe","bat","dll"],"x-netcdf":["nc"],"x-ns-proxy-autoconfig":["pac","dat"],"x-nwc":"nwc","x-object":"o","x-oz-application":"oza","x-pkcs7-certreqresp":"p7r","x-python-code":["pyc","pyo"],"x-qgis":["qgs","shp","shx"],"x-quicktimeplayer":"qtl","x-redhat-package-manager":["rpm","rpa"],"x-ruby":"rb","x-sh":"sh","x-shar":"shar","x-shockwave-flash":["swf","swfl"],"x-silverlight":"scr","x-stuffit":"sit","x-sv4cpio":"sv4cpio","x-sv4crc":"sv4crc","x-tar":"tar","x-tex-gf":"gf","x-tex-pk":"pk","x-texinfo":["texinfo","texi"],"x-trash":["~","%","bak","old","sik"],"x-ustar":"ustar","x-wais-source":"src","x-wingz":"wz","x-x509-ca-cert":["crt","der","cer"],"x-xcf":"xcf","x-xfig":"fig","x-xpinstall":"xpi",applixware:"aw","atomsvc+xml":"atomsvc","ccxml+xml":"ccxml","cdmi-capability":"cdmia","cdmi-container":"cdmic","cdmi-domain":"cdmid","cdmi-object":"cdmio","cdmi-queue":"cdmiq","docbook+xml":"dbk","dssc+der":"dssc","dssc+xml":"xdssc","emma+xml":"emma","epub+zip":"epub",exi:"exi","font-tdpfr":"pfr","gml+xml":"gml","gpx+xml":"gpx",gxf:"gxf",hyperstudio:"stk","inkml+xml":["ink","inkml"],ipfix:"ipfix","jsonml+json":"jsonml","lost+xml":"lostxml","mads+xml":"mads",marc:"mrc","marcxml+xml":"mrcx","mathml+xml":["mathml","mml"],mbox:"mbox","mediaservercontrol+xml":"mscml","metalink+xml":"metalink","metalink4+xml":"meta4","mets+xml":"mets","mods+xml":"mods",mp21:["m21","mp21"],mp4:"mp4s","oebps-package+xml":"opf","omdoc+xml":"omdoc",onenote:["onetoc","onetoc2","onetmp","onepkg"],oxps:"oxps","patch-ops-error+xml":"xer","pgp-encrypted":"pgp",pkcs10:"p10","pkcs7-mime":["p7m","p7c"],"pkcs7-signature":"p7s",pkcs8:"p8","pkix-attr-cert":"ac","pkix-crl":"crl","pkix-pkipath":"pkipath",pkixcmp:"pki","pls+xml":"pls","prs.cww":"cww","pskc+xml":"pskcxml","reginfo+xml":"rif","relax-ng-compact-syntax":"rnc","resource-lists+xml":"rl","resource-lists-diff+xml":"rld","rls-services+xml":"rs","rpki-ghostbusters":"gbr","rpki-manifest":"mft","rpki-roa":"roa","rsd+xml":"rsd","sbml+xml":"sbml","scvp-cv-request":"scq","scvp-cv-response":"scs","scvp-vp-request":"spq","scvp-vp-response":"spp",sdp:"sdp","set-payment-initiation":"setpay","set-registration-initiation":"setreg","shf+xml":"shf","sparql-query":"rq","sparql-results+xml":"srx",srgs:"gram","srgs+xml":"grxml","sru+xml":"sru","ssdl+xml":"ssdl","ssml+xml":"ssml","tei+xml":["tei","teicorpus"],"thraud+xml":"tfi","timestamped-data":"tsd","vnd.3gpp.pic-bw-large":"plb","vnd.3gpp.pic-bw-small":"psb","vnd.3gpp.pic-bw-var":"pvb","vnd.3gpp2.tcap":"tcap","vnd.3m.post-it-notes":"pwn","vnd.accpac.simply.aso":"aso","vnd.accpac.simply.imp":"imp","vnd.acucobol":"acu","vnd.acucorp":["atc","acutc"],"vnd.adobe.air-application-installer-package+zip":"air","vnd.adobe.formscentral.fcdt":"fcdt","vnd.adobe.fxp":["fxp","fxpl"],"vnd.adobe.xdp+xml":"xdp","vnd.adobe.xfdf":"xfdf","vnd.ahead.space":"ahead","vnd.airzip.filesecure.azf":"azf","vnd.airzip.filesecure.azs":"azs","vnd.amazon.ebook":"azw","vnd.americandynamics.acc":"acc","vnd.amiga.ami":"ami","vnd.anser-web-certificate-issue-initiation":"cii","vnd.anser-web-funds-transfer-initiation":"fti","vnd.antix.game-component":"atx","vnd.apple.installer+xml":"mpkg","vnd.apple.mpegurl":"m3u8","vnd.aristanetworks.swi":"swi","vnd.astraea-software.iota":"iota","vnd.audiograph":"aep","vnd.blueice.multipass":"mpm","vnd.bmi":"bmi","vnd.businessobjects":"rep","vnd.chemdraw+xml":"cdxml","vnd.chipnuts.karaoke-mmd":"mmd","vnd.claymore":"cla","vnd.cloanto.rp9":"rp9","vnd.clonk.c4group":["c4g","c4d","c4f","c4p","c4u"],"vnd.cluetrust.cartomobile-config":"c11amc","vnd.cluetrust.cartomobile-config-pkg":"c11amz","vnd.commonspace":"csp","vnd.contact.cmsg":"cdbcmsg","vnd.cosmocaller":"cmc","vnd.crick.clicker":"clkx","vnd.crick.clicker.keyboard":"clkk","vnd.crick.clicker.palette":"clkp","vnd.crick.clicker.template":"clkt","vnd.crick.clicker.wordbank":"clkw","vnd.criticaltools.wbs+xml":"wbs","vnd.ctc-posml":"pml","vnd.cups-ppd":"ppd","vnd.curl.car":"car","vnd.curl.pcurl":"pcurl","vnd.dart":"dart","vnd.data-vision.rdz":"rdz","vnd.dece.data":["uvf","uvvf","uvd","uvvd"],"vnd.dece.ttml+xml":["uvt","uvvt"],"vnd.dece.unspecified":["uvx","uvvx"],"vnd.dece.zip":["uvz","uvvz"],"vnd.denovo.fcselayout-link":"fe_launch","vnd.dna":"dna","vnd.dolby.mlp":"mlp","vnd.dpgraph":"dpg","vnd.dreamfactory":"dfac","vnd.ds-keypoint":"kpxx","vnd.dvb.ait":"ait","vnd.dvb.service":"svc","vnd.dynageo":"geo","vnd.ecowin.chart":"mag","vnd.enliven":"nml","vnd.epson.esf":"esf","vnd.epson.msf":"msf","vnd.epson.quickanime":"qam","vnd.epson.salt":"slt","vnd.epson.ssf":"ssf","vnd.eszigno3+xml":["es3","et3"],"vnd.ezpix-album":"ez2","vnd.ezpix-package":"ez3","vnd.fdf":"fdf","vnd.fdsn.mseed":"mseed","vnd.fdsn.seed":["seed","dataless"],"vnd.flographit":"gph","vnd.fluxtime.clip":"ftc","vnd.framemaker":["fm","frame","maker","book"],"vnd.frogans.fnc":"fnc","vnd.frogans.ltf":"ltf","vnd.fsc.weblaunch":"fsc","vnd.fujitsu.oasys":"oas","vnd.fujitsu.oasys2":"oa2","vnd.fujitsu.oasys3":"oa3","vnd.fujitsu.oasysgp":"fg5","vnd.fujitsu.oasysprs":"bh2","vnd.fujixerox.ddd":"ddd","vnd.fujixerox.docuworks":"xdw","vnd.fujixerox.docuworks.binder":"xbd","vnd.fuzzysheet":"fzs","vnd.genomatix.tuxedo":"txd","vnd.geogebra.file":"ggb","vnd.geogebra.tool":"ggt","vnd.geometry-explorer":["gex","gre"],"vnd.geonext":"gxt","vnd.geoplan":"g2w","vnd.geospace":"g3w","vnd.gmx":"gmx","vnd.grafeq":["gqf","gqs"],"vnd.groove-account":"gac","vnd.groove-help":"ghf","vnd.groove-identity-message":"gim","vnd.groove-injector":"grv","vnd.groove-tool-message":"gtm","vnd.groove-tool-template":"tpl","vnd.groove-vcard":"vcg","vnd.hal+xml":"hal","vnd.handheld-entertainment+xml":"zmm","vnd.hbci":"hbci","vnd.hhe.lesson-player":"les","vnd.hp-hpgl":"hpgl","vnd.hp-hpid":"hpid","vnd.hp-hps":"hps","vnd.hp-jlyt":"jlt","vnd.hp-pcl":"pcl","vnd.hp-pclxl":"pclxl","vnd.hydrostatix.sof-data":"sfd-hdstx","vnd.ibm.minipay":"mpy","vnd.ibm.modcap":["afp","listafp","list3820"],"vnd.ibm.rights-management":"irm","vnd.ibm.secure-container":"sc","vnd.iccprofile":["icc","icm"],"vnd.igloader":"igl","vnd.immervision-ivp":"ivp","vnd.immervision-ivu":"ivu","vnd.insors.igm":"igm","vnd.intercon.formnet":["xpw","xpx"],"vnd.intergeo":"i2g","vnd.intu.qbo":"qbo","vnd.intu.qfx":"qfx","vnd.ipunplugged.rcprofile":"rcprofile","vnd.irepository.package+xml":"irp","vnd.is-xpr":"xpr","vnd.isac.fcs":"fcs","vnd.jam":"jam","vnd.jcp.javame.midlet-rms":"rms","vnd.jisp":"jisp","vnd.joost.joda-archive":"joda","vnd.kahootz":["ktz","ktr"],"vnd.kde.karbon":"karbon","vnd.kde.kchart":"chrt","vnd.kde.kformula":"kfo","vnd.kde.kivio":"flw","vnd.kde.kontour":"kon","vnd.kde.kpresenter":["kpr","kpt"],"vnd.kde.kspread":"ksp","vnd.kde.kword":["kwd","kwt"],"vnd.kenameaapp":"htke","vnd.kidspiration":"kia","vnd.kinar":["kne","knp"],"vnd.koan":["skp","skd","skt","skm"],"vnd.kodak-descriptor":"sse","vnd.las.las+xml":"lasxml","vnd.llamagraphics.life-balance.desktop":"lbd","vnd.llamagraphics.life-balance.exchange+xml":"lbe","vnd.lotus-1-2-3":"123","vnd.lotus-approach":"apr","vnd.lotus-freelance":"pre","vnd.lotus-notes":"nsf","vnd.lotus-organizer":"org","vnd.lotus-screencam":"scm","vnd.lotus-wordpro":"lwp","vnd.macports.portpkg":"portpkg","vnd.mcd":"mcd","vnd.medcalcdata":"mc1","vnd.mediastation.cdkey":"cdkey","vnd.mfer":"mwf","vnd.mfmp":"mfm","vnd.micrografx.flo":"flo","vnd.micrografx.igx":"igx","vnd.mif":"mif","vnd.mobius.daf":"daf","vnd.mobius.dis":"dis","vnd.mobius.mbk":"mbk","vnd.mobius.mqy":"mqy","vnd.mobius.msl":"msl","vnd.mobius.plc":"plc","vnd.mobius.txf":"txf","vnd.mophun.application":"mpn","vnd.mophun.certificate":"mpc","vnd.ms-artgalry":"cil","vnd.ms-cab-compressed":"cab","vnd.ms-excel.addin.macroenabled.12":"xlam","vnd.ms-excel.sheet.binary.macroenabled.12":"xlsb","vnd.ms-excel.sheet.macroenabled.12":"xlsm","vnd.ms-excel.template.macroenabled.12":"xltm","vnd.ms-fontobject":"eot","vnd.ms-htmlhelp":"chm","vnd.ms-ims":"ims","vnd.ms-lrm":"lrm","vnd.ms-officetheme":"thmx","vnd.ms-powerpoint.addin.macroenabled.12":"ppam","vnd.ms-powerpoint.presentation.macroenabled.12":"pptm","vnd.ms-powerpoint.slide.macroenabled.12":"sldm","vnd.ms-powerpoint.slideshow.macroenabled.12":"ppsm","vnd.ms-powerpoint.template.macroenabled.12":"potm","vnd.ms-project":["mpp","mpt"],"vnd.ms-word.document.macroenabled.12":"docm","vnd.ms-word.template.macroenabled.12":"dotm","vnd.ms-works":["wps","wks","wcm","wdb"],"vnd.ms-wpl":"wpl","vnd.ms-xpsdocument":"xps","vnd.mseq":"mseq","vnd.musician":"mus","vnd.muvee.style":"msty","vnd.mynfc":"taglet","vnd.neurolanguage.nlu":"nlu","vnd.nitf":["ntf","nitf"],"vnd.noblenet-directory":"nnd","vnd.noblenet-sealer":"nns","vnd.noblenet-web":"nnw","vnd.nokia.n-gage.data":"ngdat","vnd.nokia.n-gage.symbian.install":"n-gage","vnd.nokia.radio-preset":"rpst","vnd.nokia.radio-presets":"rpss","vnd.novadigm.edm":"edm","vnd.novadigm.edx":"edx","vnd.novadigm.ext":"ext","vnd.oasis.opendocument.chart-template":"otc","vnd.oasis.opendocument.formula-template":"odft","vnd.oasis.opendocument.image-template":"oti","vnd.olpc-sugar":"xo","vnd.oma.dd2+xml":"dd2","vnd.openofficeorg.extension":"oxt","vnd.openxmlformats-officedocument.presentationml.slide":"sldx","vnd.osgeo.mapguide.package":"mgp","vnd.osgi.dp":"dp","vnd.osgi.subsystem":"esa","vnd.palm":["pdb","pqa","oprc"],"vnd.pawaafile":"paw","vnd.pg.format":"str","vnd.pg.osasli":"ei6","vnd.picsel":"efif","vnd.pmi.widget":"wg","vnd.pocketlearn":"plf","vnd.powerbuilder6":"pbd","vnd.previewsystems.box":"box","vnd.proteus.magazine":"mgz","vnd.publishare-delta-tree":"qps","vnd.pvi.ptid1":"ptid","vnd.quark.quarkxpress":["qxd","qxt","qwd","qwt","qxl","qxb"],"vnd.realvnc.bed":"bed","vnd.recordare.musicxml":"mxl","vnd.recordare.musicxml+xml":"musicxml","vnd.rig.cryptonote":"cryptonote","vnd.rn-realmedia":"rm","vnd.rn-realmedia-vbr":"rmvb","vnd.route66.link66+xml":"link66","vnd.sailingtracker.track":"st","vnd.seemail":"see","vnd.sema":"sema","vnd.semd":"semd","vnd.semf":"semf","vnd.shana.informed.formdata":"ifm","vnd.shana.informed.formtemplate":"itp","vnd.shana.informed.interchange":"iif","vnd.shana.informed.package":"ipk","vnd.simtech-mindmapper":["twd","twds"],"vnd.smart.teacher":"teacher","vnd.solent.sdkm+xml":["sdkm","sdkd"],"vnd.spotfire.dxp":"dxp","vnd.spotfire.sfs":"sfs","vnd.stepmania.package":"smzip","vnd.stepmania.stepchart":"sm","vnd.sus-calendar":["sus","susp"],"vnd.svd":"svd","vnd.syncml+xml":"xsm","vnd.syncml.dm+wbxml":"bdm","vnd.syncml.dm+xml":"xdm","vnd.tao.intent-module-archive":"tao","vnd.tcpdump.pcap":["pcap","cap","dmp"],"vnd.tmobile-livetv":"tmo","vnd.trid.tpt":"tpt","vnd.triscape.mxs":"mxs","vnd.trueapp":"tra","vnd.ufdl":["ufd","ufdl"],"vnd.uiq.theme":"utz","vnd.umajin":"umj","vnd.unity":"unityweb","vnd.uoml+xml":"uoml","vnd.vcx":"vcx","vnd.visionary":"vis","vnd.vsf":"vsf","vnd.webturbo":"wtb","vnd.wolfram.player":"nbp","vnd.wqd":"wqd","vnd.wt.stf":"stf","vnd.xara":"xar","vnd.xfdl":"xfdl","vnd.yamaha.hv-dic":"hvd","vnd.yamaha.hv-script":"hvs","vnd.yamaha.hv-voice":"hvp","vnd.yamaha.openscoreformat":"osf","vnd.yamaha.openscoreformat.osfpvg+xml":"osfpvg","vnd.yamaha.smaf-audio":"saf","vnd.yamaha.smaf-phrase":"spf","vnd.yellowriver-custom-menu":"cmp","vnd.zul":["zir","zirz"],"vnd.zzazz.deck+xml":"zaz","voicexml+xml":"vxml",widget:"wgt",winhlp:"hlp","wsdl+xml":"wsdl","wspolicy+xml":"wspolicy","x-ace-compressed":"ace","x-authorware-bin":["aab","x32","u32","vox"],"x-authorware-map":"aam","x-authorware-seg":"aas","x-blorb":["blb","blorb"],"x-bzip":"bz","x-bzip2":["bz2","boz"],"x-cfs-compressed":"cfs","x-chat":"chat","x-conference":"nsc","x-dgc-compressed":"dgc","x-dtbncx+xml":"ncx","x-dtbook+xml":"dtb","x-dtbresource+xml":"res","x-eva":"eva","x-font-bdf":"bdf","x-font-ghostscript":"gsf","x-font-linux-psf":"psf","x-font-pcf":"pcf","x-font-snf":"snf","x-font-ttf":["ttf","ttc"],"x-font-type1":["pfa","pfb","pfm","afm"],"x-freearc":"arc","x-gca-compressed":"gca","x-glulx":"ulx","x-gramps-xml":"gramps","x-install-instructions":"install","x-lzh-compressed":["lzh","lha"],"x-mie":"mie","x-mobipocket-ebook":["prc","mobi"],"x-ms-application":"application","x-ms-shortcut":"lnk","x-ms-xbap":"xbap","x-msbinder":"obd","x-mscardfile":"crd","x-msclip":"clp","application/x-ms-installer":"msi","x-msmediaview":["mvb","m13","m14"],"x-msmetafile":["wmf","wmz","emf","emz"],"x-msmoney":"mny","x-mspublisher":"pub","x-msschedule":"scd","x-msterminal":"trm","x-mswrite":"wri","x-nzb":"nzb","x-pkcs12":["p12","pfx"],"x-pkcs7-certificates":["p7b","spc"],"x-research-info-systems":"ris","x-silverlight-app":"xap","x-sql":"sql","x-stuffitx":"sitx","x-subrip":"srt","x-t3vm-image":"t3","x-tex-tfm":"tfm","x-tgif":"obj","x-xliff+xml":"xlf","x-xz":"xz","x-zmachine":["z1","z2","z3","z4","z5","z6","z7","z8"],"xaml+xml":"xaml","xcap-diff+xml":"xdf","xenc+xml":"xenc","xml-dtd":"dtd","xop+xml":"xop","xproc+xml":"xpl","xslt+xml":"xslt","xv+xml":["mxml","xhvml","xvml","xvm"],yang:"yang","yin+xml":"yin",envoy:"evy",fractals:"fif","internet-property-stream":"acx",olescript:"axs","vnd.ms-outlook":"msg","vnd.ms-pkicertstore":"sst","x-compress":"z","x-perfmon":["pma","pmc","pmr","pmw"],"ynd.ms-pkipko":"pko",gzip:["gz","tgz"],"smil+xml":["smi","smil"],"vnd.debian.binary-package":["deb","udeb"],"vnd.hzn-3d-crossword":"x3d","vnd.sqlite3":["db","sqlite","sqlite3","db-wal","sqlite-wal","db-shm","sqlite-shm"],"vnd.wap.sic":"sic","vnd.wap.slc":"slc","x-krita":["kra","krz"],"x-perl":["pm","pl"],yaml:["yaml","yml"]},audio:{amr:"amr","amr-wb":"awb",annodex:"axa",basic:["au","snd"],flac:"flac",midi:["mid","midi","kar","rmi"],mpeg:["mpga","mpega","mp3","m4a","mp2a","m2a","m3a"],mpegurl:"m3u",ogg:["oga","ogg","spx"],"prs.sid":"sid","x-aiff":"aifc","x-gsm":"gsm","x-ms-wma":"wma","x-ms-wax":"wax","x-pn-realaudio":"ram","x-realaudio":"ra","x-sd2":"sd2",adpcm:"adp",mp4:"mp4a",s3m:"s3m",silk:"sil","vnd.dece.audio":["uva","uvva"],"vnd.digital-winds":"eol","vnd.dra":"dra","vnd.dts":"dts","vnd.dts.hd":"dtshd","vnd.lucent.voice":"lvp","vnd.ms-playready.media.pya":"pya","vnd.nuera.ecelp4800":"ecelp4800","vnd.nuera.ecelp7470":"ecelp7470","vnd.nuera.ecelp9600":"ecelp9600","vnd.rip":"rip",webm:"weba","x-caf":"caf","x-matroska":"mka","x-pn-realaudio-plugin":"rmp",xm:"xm",aac:"aac",aiff:["aiff","aif","aff"],opus:"opus",wav:"wav"},chemical:{"x-alchemy":"alc","x-cache":["cac","cache"],"x-cache-csf":"csf","x-cactvs-binary":["cbin","cascii","ctab"],"x-cdx":"cdx","x-chem3d":"c3d","x-cif":"cif","x-cmdf":"cmdf","x-cml":"cml","x-compass":"cpa","x-crossfire":"bsd","x-csml":["csml","csm"],"x-ctx":"ctx","x-cxf":["cxf","cef"],"x-embl-dl-nucleotide":["emb","embl"],"x-gamess-input":["inp","gam","gamin"],"x-gaussian-checkpoint":["fch","fchk"],"x-gaussian-cube":"cub","x-gaussian-input":["gau","gjc","gjf"],"x-gaussian-log":"gal","x-gcg8-sequence":"gcg","x-genbank":"gen","x-hin":"hin","x-isostar":["istr","ist"],"x-jcamp-dx":["jdx","dx"],"x-kinemage":"kin","x-macmolecule":"mcm","x-macromodel-input":"mmod","x-mdl-molfile":"mol","x-mdl-rdfile":"rd","x-mdl-rxnfile":"rxn","x-mdl-sdfile":"sd","x-mdl-tgf":"tgf","x-mmcif":"mcif","x-mol2":"mol2","x-molconn-Z":"b","x-mopac-graph":"gpt","x-mopac-input":["mop","mopcrt","zmt"],"x-mopac-out":"moo","x-ncbi-asn1":"asn","x-ncbi-asn1-ascii":["prt","ent"],"x-ncbi-asn1-binary":"val","x-rosdal":"ros","x-swissprot":"sw","x-vamas-iso14976":"vms","x-vmd":"vmd","x-xtel":"xtel","x-xyz":"xyz"},font:{otf:"otf",woff:"woff",woff2:"woff2"},image:{gif:"gif",ief:"ief",jpeg:["jpeg","jpg","jpe","jfif","jfif-tbnl","jif"],pcx:"pcx",png:"png","svg+xml":["svg","svgz"],tiff:["tiff","tif"],"vnd.djvu":["djvu","djv"],"vnd.wap.wbmp":"wbmp","x-canon-cr2":"cr2","x-canon-crw":"crw","x-cmu-raster":"ras","x-coreldraw":"cdr","x-coreldrawpattern":"pat","x-coreldrawtemplate":"cdt","x-corelphotopaint":"cpt","x-epson-erf":"erf","x-icon":"ico","x-jg":"art","x-jng":"jng","x-nikon-nef":"nef","x-olympus-orf":"orf","x-portable-anymap":"pnm","x-portable-bitmap":"pbm","x-portable-graymap":"pgm","x-portable-pixmap":"ppm","x-rgb":"rgb","x-xbitmap":"xbm","x-xpixmap":"xpm","x-xwindowdump":"xwd",bmp:"bmp",cgm:"cgm",g3fax:"g3",ktx:"ktx","prs.btif":"btif",sgi:"sgi","vnd.dece.graphic":["uvi","uvvi","uvg","uvvg"],"vnd.dwg":"dwg","vnd.dxf":"dxf","vnd.fastbidsheet":"fbs","vnd.fpx":"fpx","vnd.fst":"fst","vnd.fujixerox.edmics-mmr":"mmr","vnd.fujixerox.edmics-rlc":"rlc","vnd.ms-modi":"mdi","vnd.ms-photo":"wdp","vnd.net-fpx":"npx","vnd.xiff":"xif",webp:"webp","x-3ds":"3ds","x-cmx":"cmx","x-freehand":["fh","fhc","fh4","fh5","fh7"],"x-pict":["pic","pct"],"x-tga":"tga","cis-cod":"cod",avif:"avifs",heic:["heif","heic"],pjpeg:["pjpg"],"vnd.adobe.photoshop":"psd","x-adobe-dng":"dng","x-fuji-raf":"raf","x-icns":"icns","x-kodak-dcr":"dcr","x-kodak-k25":"k25","x-kodak-kdc":"kdc","x-minolta-mrw":"mrw","x-panasonic-raw":["raw","rw2","rwl"],"x-pentax-pef":["pef","ptx"],"x-sigma-x3f":"x3f","x-sony-arw":"arw","x-sony-sr2":"sr2","x-sony-srf":"srf"},message:{rfc822:["eml","mime","mht","mhtml","nws"]},model:{iges:["igs","iges"],mesh:["msh","mesh","silo"],vrml:["wrl","vrml"],"x3d+vrml":["x3dv","x3dvz"],"x3d+xml":"x3dz","x3d+binary":["x3db","x3dbz"],"vnd.collada+xml":"dae","vnd.dwf":"dwf","vnd.gdl":"gdl","vnd.gtw":"gtw","vnd.mts":"mts","vnd.usdz+zip":"usdz","vnd.vtu":"vtu"},text:{"cache-manifest":["manifest","appcache"],calendar:["ics","icz","ifb"],css:"css",csv:"csv",h323:"323",html:["html","htm","shtml","stm"],iuls:"uls",plain:["txt","text","brf","conf","def","list","log","in","bas","diff","ksh"],richtext:"rtx",scriptlet:["sct","wsc"],texmacs:"tm","tab-separated-values":"tsv","vnd.sun.j2me.app-descriptor":"jad","vnd.wap.wml":"wml","vnd.wap.wmlscript":"wmls","x-bibtex":"bib","x-boo":"boo","x-c++hdr":["h++","hpp","hxx","hh"],"x-c++src":["c++","cpp","cxx","cc"],"x-component":"htc","x-dsrc":"d","x-diff":"patch","x-haskell":"hs","x-java":"java","x-literate-haskell":"lhs","x-moc":"moc","x-pascal":["p","pas","pp","inc"],"x-pcs-gcd":"gcd","x-python":"py","x-scala":"scala","x-setext":"etx","x-tcl":["tcl","tk"],"x-tex":["tex","ltx","sty","cls"],"x-vcalendar":"vcs","x-vcard":"vcf",n3:"n3","prs.lines.tag":"dsc",sgml:["sgml","sgm"],troff:["t","tr","roff","man","me","ms"],turtle:"ttl","uri-list":["uri","uris","urls"],vcard:"vcard","vnd.curl":"curl","vnd.curl.dcurl":"dcurl","vnd.curl.scurl":"scurl","vnd.curl.mcurl":"mcurl","vnd.dvb.subtitle":"sub","vnd.fly":"fly","vnd.fmi.flexstor":"flx","vnd.graphviz":"gv","vnd.in3d.3dml":"3dml","vnd.in3d.spot":"spot","x-asm":["s","asm"],"x-c":["c","h","dic"],"x-fortran":["f","for","f77","f90"],"x-opml":"opml","x-nfo":"nfo","x-sfv":"sfv","x-uuencode":"uu",webviewhtml:"htt",javascript:"js",json:"json",markdown:["md","markdown","mdown","markdn"],"vnd.wap.si":"si","vnd.wap.sl":"sl"},video:{avif:"avif","3gpp":"3gp",annodex:"axv",dl:"dl",dv:["dif","dv"],fli:"fli",gl:"gl",mpeg:["mpeg","mpg","mpe","m1v","m2v","mp2","mpa","mpv2"],mp4:["mp4","mp4v","mpg4"],quicktime:["qt","mov"],ogg:"ogv","vnd.mpegurl":["mxu","m4u"],"x-flv":"flv","x-la-asf":["lsf","lsx"],"x-mng":"mng","x-ms-asf":["asf","asx","asr"],"x-ms-wm":"wm","x-ms-wmv":"wmv","x-ms-wmx":"wmx","x-ms-wvx":"wvx","x-msvideo":"avi","x-sgi-movie":"movie","x-matroska":["mpv","mkv","mk3d","mks"],"3gpp2":"3g2",h261:"h261",h263:"h263",h264:"h264",jpeg:"jpgv",jpm:["jpm","jpgm"],mj2:["mj2","mjp2"],"vnd.dece.hd":["uvh","uvvh"],"vnd.dece.mobile":["uvm","uvvm"],"vnd.dece.pd":["uvp","uvvp"],"vnd.dece.sd":["uvs","uvvs"],"vnd.dece.video":["uvv","uvvv"],"vnd.dvb.file":"dvb","vnd.fvt":"fvt","vnd.ms-playready.media.pyv":"pyv","vnd.uvvu.mp4":["uvu","uvvu"],"vnd.vivo":"viv",webm:"webm","x-f4v":"f4v","x-m4v":"m4v","x-ms-vob":"vob","x-smv":"smv",mp2t:"ts"},"x-conference":{"x-cooltalk":"ice"},"x-world":{"x-vrml":["vrm","flr","wrz","xaf","xof"]}},Ie=(()=>{const e={};for(const t of n.keys(Ue))for(const r of n.keys(Ue[t])){const n=Ue[t][r];if("string"==typeof n)e[n]=t+"/"+r;else for(let i=0;ie;e++){let t=e;for(let e=0;8>e;e++)1&t?t=t>>>1^3988292384:t>>>=1;Ne[e]=t}class Pe{constructor(e){this.crc=e||-1}append(e){let t=0|this.crc;for(let n=0,r=0|e.length;r>n;n++)t=t>>>8^Ne[255&(t^e[n])];this.crc=t}get(){return~this.crc}}class je extends z{constructor(){let e;const t=new Pe;super({transform(e,n){t.append(e),n.enqueue(e)},flush(){const n=new p(4);new w(n.buffer).setUint32(0,t.get()),e.value=n}}),e=this}}function Oe(e){if(typeof b==Ae){const t=new p((e=unescape(encodeURIComponent(e))).length);for(let n=0;n0&&t&&(e[n-1]=He.partial(t,e[n-1]&2147483648>>t-1,1)),e},partial:(e,t,n)=>32===e?t:(n?0|t:t<<32-e)+1099511627776*e,getPartial:e=>a.round(e/1099511627776)||32,_shiftRight(e,t,n,r){for(void 0===r&&(r=[]);t>=32;t-=32)r.push(n),n=0;if(0===t)return r.concat(e);for(let i=0;i>>t),n=e[i]<<32-t;const i=e.length?e[e.length-1]:0,s=He.getPartial(i);return r.push(He.partial(t+s&31,t+s>32?n:r.pop(),1)),r}},Be={bytes:{fromBits(e){const t=He.bitLength(e)/8,n=new p(t);let r;for(let i=0;t>i;i++)0==(3&i)&&(r=e[i/4]),n[i]=r>>>24,r<<=8;return n},toBits(e){const t=[];let n,r=0;for(n=0;n9007199254740991)throw new u("Cannot hash more than 2^53 - 1 bits");const s=new h(n);let a=0;for(let e=t.blockSize+r-(t.blockSize+r&t.blockSize-1);i>=e;e+=t.blockSize)t._block(s.subarray(16*a,16*(a+1))),a+=1;return n.splice(0,16*a),t}finalize(){const e=this;let t=e._buffer;const n=e._h;t=He.concat(t,[He.partial(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(a.floor(e._length/4294967296)),t.push(0|e._length);t.length;)e._block(t.splice(0,16));return e.reset(),n}_f(e,t,n,r){return e>19?e>39?e>59?e>79?void 0:t^n^r:t&n|t&r|n&r:t^n^r:t&n|~t&r}_S(e,t){return t<>>32-e}_block(e){const n=this,r=n._h,i=t(80);for(let t=0;16>t;t++)i[t]=e[t];let s=r[0],o=r[1],l=r[2],c=r[3],d=r[4];for(let e=0;79>=e;e++){16>e||(i[e]=n._S(1,i[e-3]^i[e-8]^i[e-14]^i[e-16]));const t=n._S(5,s)+n._f(e,o,l,c)+d+i[e]+n._key[a.floor(e/20)]|0;d=c,c=l,l=n._S(30,o),o=s,s=t}r[0]=r[0]+s|0,r[1]=r[1]+o|0,r[2]=r[2]+l|0,r[3]=r[3]+c|0,r[4]=r[4]+d|0}},Ze={getRandomValues(e){const t=new h(e.buffer),n=e=>{let t=987654321;const n=4294967295;return()=>(t=36969*(65535&t)+(t>>16)&n,(((t<<16)+(e=18e3*(65535&e)+(e>>16)&n)&n)/4294967296+.5)*(a.random()>.5?1:-1))};for(let r,i=0;inew Ve.hmacSha1(Be.bytes.toBits(e)),pbkdf2(e,t,n,r){if(n=n||1e4,0>r||0>n)throw new u("invalid params to pbkdf2");const i=1+(r>>5)<<2;let s,a,o,l,c;const d=new ArrayBuffer(i),f=new w(d);let p=0;const m=He;for(t=Be.bytes.toBits(t),c=1;(i||1)>p;c++){for(s=a=e.encrypt(m.concat(t,[c])),o=1;n>o;o++)for(a=e.encrypt(a),l=0;lp&&oi&&(e=(new n).update(e).finalize());for(let t=0;i>t;t++)r[0][t]=909522486^e[t],r[1][t]=1549556828^e[t];t._baseHash[0].update(r[0]),t._baseHash[1].update(r[1]),t._resultHash=new n(t._baseHash[0])}reset(){const e=this;e._resultHash=new e._hash(e._baseHash[0]),e._updated=!1}update(e){this._updated=!0,this._resultHash.update(e)}digest(){const e=this,t=e._resultHash.finalize(),n=new e._hash(e._baseHash[1]).update(t).finalize();return e.reset(),n}encrypt(e){if(this._updated)throw new u("encrypt on already updated hmac called!");return this.update(e),this.digest(e)}}},Ke=typeof _!=Ae&&typeof _.getRandomValues==De,Ge="Invalid password",Xe="Invalid signature",Ye="zipjs-abort-check-password";function Je(e){return Ke?_.getRandomValues(e):Ze.getRandomValues(e)}const Qe=16,$e={name:"PBKDF2"},et=n.assign({hash:{name:"HMAC"}},$e),tt=n.assign({iterations:1e3,hash:{name:"SHA-1"}},$e),nt=["deriveBits"],rt=[8,12,16],it=[16,24,32],st=10,at=[0,0,0,0],ot=typeof _!=Ae,lt=ot&&_.subtle,ct=ot&&typeof lt!=Ae,dt=Be.bytes,ft=class{constructor(e){const t=this;t._tables=[[[],[],[],[],[]],[[],[],[],[],[]]],t._tables[0][0][0]||t._precompute();const n=t._tables[0][4],r=t._tables[1],i=e.length;let s,a,o,l=1;if(4!==i&&6!==i&&8!==i)throw new u("invalid aes key size");for(t._key=[a=e.slice(0),o=[]],s=i;4*i+28>s;s++){let e=a[s-1];(s%i==0||8===i&&s%i==4)&&(e=n[e>>>24]<<24^n[e>>16&255]<<16^n[e>>8&255]<<8^n[255&e],s%i==0&&(e=e<<8^e>>>24^l<<24,l=l<<1^283*(l>>7))),a[s]=a[s-i]^e}for(let e=0;s;e++,s--){const t=a[3&e?s:s-4];o[e]=4>=s||4>e?t:r[0][n[t>>>24]]^r[1][n[t>>16&255]]^r[2][n[t>>8&255]]^r[3][n[255&t]]}}encrypt(e){return this._crypt(e,0)}decrypt(e){return this._crypt(e,1)}_precompute(){const e=this._tables[0],t=this._tables[1],n=e[4],r=t[4],i=[],s=[];let a,o,l,c;for(let e=0;256>e;e++)s[(i[e]=e<<1^283*(e>>7))^e]=e;for(let d=a=0;!n[d];d^=o||1,a=s[a]||1){let s=a^a<<1^a<<2^a<<3^a<<4;s=s>>8^255&s^99,n[d]=s,r[s]=d,c=i[l=i[o=i[d]]];let f=16843009*c^65537*l^257*o^16843008*d,u=257*i[s]^16843008*s;for(let n=0;4>n;n++)e[n][d]=u=u<<24^u>>>8,t[n][s]=f=f<<24^f>>>8}for(let n=0;5>n;n++)e[n]=e[n].slice(0),t[n]=t[n].slice(0)}_crypt(e,t){if(4!==e.length)throw new u("invalid aes block size");const n=this._key[t],r=n.length/4-2,i=[0,0,0,0],s=this._tables[t],a=s[0],o=s[1],l=s[2],c=s[3],d=s[4];let f,p,m,h=e[0]^n[0],w=e[t?3:1]^n[1],x=e[2]^n[2],g=e[t?1:3]^n[3],b=4;for(let e=0;r>e;e++)f=a[h>>>24]^o[w>>16&255]^l[x>>8&255]^c[255&g]^n[b],p=a[w>>>24]^o[x>>16&255]^l[g>>8&255]^c[255&h]^n[b+1],m=a[x>>>24]^o[g>>16&255]^l[h>>8&255]^c[255&w]^n[b+2],g=a[g>>>24]^o[h>>16&255]^l[w>>8&255]^c[255&x]^n[b+3],b+=4,h=f,w=p,x=m;for(let e=0;4>e;e++)i[t?3&-e:e]=d[h>>>24]<<24^d[w>>16&255]<<16^d[x>>8&255]<<8^d[255&g]^n[b++],f=h,h=w,w=x,x=g,g=f;return i}},ut=class{constructor(e,t){this._prf=e,this._initIv=t,this._iv=t}reset(){this._iv=this._initIv}update(e){return this.calculate(this._prf,e,this._iv)}incWord(e){if(255==(e>>24&255)){let t=e>>16&255,n=e>>8&255,r=255&e;255===t?(t=0,255===n?(n=0,255===r?r=0:++r):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=r}else e+=1<<24;return e}incCounter(e){0===(e[0]=this.incWord(e[0]))&&(e[1]=this.incWord(e[1]))}calculate(e,t,n){let r;if(!(r=t.length))return[];const i=He.bitLength(t);for(let i=0;r>i;i+=4){this.incCounter(n);const r=e.encrypt(n);t[i]^=r[0],t[i+1]^=r[1],t[i+2]^=r[2],t[i+3]^=r[3]}return He.clamp(t,i)}},pt=Ve.hmacSha1;let mt=ot&&ct&&typeof lt.importKey==De,ht=ot&&ct&&typeof lt.deriveBits==De;class wt extends z{constructor({password:e,rawPassword:t,signed:r,encryptionStrength:i,checkPasswordOnly:s}){super({start(){n.assign(this,{ready:new g((e=>this.resolveReady=e)),password:vt(e,t),signed:r,strength:i-1,pending:new p})},async transform(e,t){const n=this,{password:r,strength:i,resolveReady:a,ready:o}=n;r?(await(async(e,t,n,r)=>{const i=await bt(e,t,n,_t(r,0,rt[t])),s=_t(r,rt[t]);if(i[0]!=s[0]||i[1]!=s[1])throw new u(Ge)})(n,i,r,_t(e,0,rt[i]+2)),e=_t(e,rt[i]+2),s?t.error(new u(Ye)):a()):await o;const l=new p(e.length-st-(e.length-st)%Qe);t.enqueue(gt(n,e,l,0,st,!0))},async flush(e){const{signed:t,ctr:n,hmac:r,pending:i,ready:s}=this;if(r&&n){await s;const a=_t(i,0,i.length-st),o=_t(i,i.length-st);let l=new p;if(a.length){const e=zt(dt,a);r.update(e);const t=n.update(e);l=kt(dt,t)}if(t){const e=_t(kt(dt,r.digest()),0,st);for(let t=0;st>t;t++)if(e[t]!=o[t])throw new u(Xe)}e.enqueue(l)}}})}}class xt extends z{constructor({password:e,rawPassword:t,encryptionStrength:r}){let i;super({start(){n.assign(this,{ready:new g((e=>this.resolveReady=e)),password:vt(e,t),strength:r-1,pending:new p})},async transform(e,t){const n=this,{password:r,strength:i,resolveReady:s,ready:a}=n;let o=new p;r?(o=await(async(e,t,n)=>{const r=Je(new p(rt[t]));return yt(r,await bt(e,t,n,r))})(n,i,r),s()):await a;const l=new p(o.length+e.length-e.length%Qe);l.set(o,0),t.enqueue(gt(n,e,l,o.length,0))},async flush(e){const{ctr:t,hmac:n,pending:r,ready:s}=this;if(n&&t){await s;let a=new p;if(r.length){const e=t.update(zt(dt,r));n.update(e),a=kt(dt,e)}i.signature=kt(dt,n.digest()).slice(0,st),e.enqueue(yt(a,i.signature))}}}),i=this}}function gt(e,t,n,r,i,s){const{ctr:a,hmac:o,pending:l}=e,c=t.length-i;let d;for(l.length&&(t=yt(l,t),n=((e,t)=>{if(t&&t>e.length){const n=e;(e=new p(t)).set(n,0)}return e})(n,c-c%Qe)),d=0;c-Qe>=d;d+=Qe){const e=zt(dt,_t(t,d,d+Qe));s&&o.update(e);const i=a.update(e);s||o.update(i),n.set(kt(dt,i),d+r)}return e.pending=_t(t,d),n}async function bt(e,r,i,s){e.password=null;const a=await(async(e,t,n,r,i)=>{if(!mt)return Ve.importKey(t);try{return await lt.importKey("raw",t,n,!1,i)}catch(e){return mt=!1,Ve.importKey(t)}})(0,i,et,0,nt),o=await(async(e,t,n)=>{if(!ht)return Ve.pbkdf2(t,e.salt,tt.iterations,n);try{return await lt.deriveBits(e,t,n)}catch(r){return ht=!1,Ve.pbkdf2(t,e.salt,tt.iterations,n)}})(n.assign({salt:s},tt),a,8*(2*it[r]+2)),l=new p(o),c=zt(dt,_t(l,0,it[r])),d=zt(dt,_t(l,it[r],2*it[r])),f=_t(l,2*it[r]);return n.assign(e,{keys:{key:c,authentication:d,passwordVerification:f},ctr:new ut(new ft(c),t.from(at)),hmac:new pt(d)}),f}function vt(e,t){return t===Se?Oe(e):t}function yt(e,t){let n=e;return e.length+t.length&&(n=new p(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function _t(e,t,n){return e.subarray(t,n)}function kt(e,t){return e.fromBits(t)}function zt(e,t){return e.toBits(t)}class St extends z{constructor({password:e,passwordVerification:t,checkPasswordOnly:r}){super({start(){n.assign(this,{password:e,passwordVerification:t}),Rt(this,e)},transform(e,t){const n=this;if(n.password){const t=Dt(n,e.subarray(0,12));if(n.password=null,t[11]!=n.passwordVerification)throw new u(Ge);e=e.subarray(12)}r?t.error(new u(Ye)):t.enqueue(Dt(n,e))}})}}class At extends z{constructor({password:e,passwordVerification:t}){super({start(){n.assign(this,{password:e,passwordVerification:t}),Rt(this,e)},transform(e,t){const n=this;let r,i;if(n.password){n.password=null;const t=Je(new p(12));t[11]=n.passwordVerification,r=new p(e.length+t.length),r.set(Ct(n,t),0),i=12}else r=new p(e.length),i=0;r.set(Ct(n,e),i),t.enqueue(r)}})}}function Dt(e,t){const n=new p(t.length);for(let r=0;r>>24]),i=~e.crcKey2.get(),e.keys=[n,r,i]}function Wt(e){const t=2|e.keys[2];return Ft(a.imul(t,1^t)>>>8)}function Ft(e){return 255&e}function Tt(e){return 4294967295&e}const qt="deflate-raw";class Lt extends z{constructor(e,{chunkSize:t,CompressionStream:n,CompressionStreamNative:r}){super({});const{compressed:i,encrypted:s,useCompressionStream:a,zipCrypto:o,signed:l,level:c}=e,d=this;let f,u,p=It(super.readable);s&&!o||!l||(f=new je,p=jt(p,f)),i&&(p=Pt(p,a,{level:c,chunkSize:t},r,n)),s&&(o?p=jt(p,new At(e)):(u=new xt(e),p=jt(p,u))),Nt(d,p,(()=>{let e;s&&!o&&(e=u.signature),s&&!o||!l||(e=new w(f.value.buffer).getUint32(0)),d.signature=e}))}}class Ut extends z{constructor(e,{chunkSize:t,DecompressionStream:n,DecompressionStreamNative:r}){super({});const{zipCrypto:i,encrypted:s,signed:a,signature:o,compressed:l,useCompressionStream:c}=e;let d,f,p=It(super.readable);s&&(i?p=jt(p,new St(e)):(f=new wt(e),p=jt(p,f))),l&&(p=Pt(p,c,{chunkSize:t},r,n)),s&&!i||!a||(d=new je,p=jt(p,d)),Nt(this,p,(()=>{if((!s||i)&&a){const e=new w(d.value.buffer);if(o!=e.getUint32(0,!1))throw new u(Xe)}}))}}function It(e){return jt(e,new z({transform(e,t){e&&e.length&&t.enqueue(e)}}))}function Nt(e,t,r){t=jt(t,new z({flush:r})),n.defineProperty(e,"readable",{get:()=>t})}function Pt(e,t,n,r,i){try{e=jt(e,new(t&&r?r:i)(qt,n))}catch(r){if(!t)return e;try{e=jt(e,new i(qt,n))}catch(t){return e}}return e}function jt(e,t){return e.pipeThrough(t)}const Ot="data",Ht="close",Bt="deflate",Mt="inflate";class Zt extends z{constructor(e,t){super({});const r=this,{codecType:i}=e;let s;i.startsWith(Bt)?s=Lt:i.startsWith(Mt)&&(s=Ut);let a=0,o=0;const l=new s(e,t),c=super.readable,d=new z({transform(e,t){e&&e.length&&(o+=e.length,t.enqueue(e))},flush(){n.assign(r,{inputSize:o})}}),f=new z({transform(e,t){e&&e.length&&(a+=e.length,t.enqueue(e))},flush(){const{signature:e}=l;n.assign(r,{signature:e,outputSize:a,inputSize:o})}});n.defineProperty(r,"readable",{get:()=>c.pipeThrough(d).pipeThrough(l).pipeThrough(f)})}}class Vt extends z{constructor(e){let t;super({transform:function n(r,i){if(t){const e=new p(t.length+r.length);e.set(t),e.set(r,t.length),r=e,t=null}r.length>e?(i.enqueue(r.slice(0,e)),n(r.slice(e),i)):t=r},flush(e){t&&t.length&&e.enqueue(t)}})}}let Kt=typeof E!=Ae;class Gt{constructor(e,{readable:t,writable:r},{options:i,config:s,streamOptions:a,useWebWorkers:o,transferStreams:l,scripts:c},d){const{signal:f}=a;return n.assign(e,{busy:!0,readable:t.pipeThrough(new Vt(s.chunkSize)).pipeThrough(new Xt(t,a),{signal:f}),writable:r,options:n.assign({},i),scripts:c,transferStreams:l,terminate:()=>new g((t=>{const{worker:n,busy:r}=e;n?(r?e.resolveTerminated=t:(n.terminate(),t()),e.interface=null):t()})),onTaskFinished(){const{resolveTerminated:t}=e;t&&(e.resolveTerminated=null,e.terminated=!0,e.worker.terminate(),t()),e.busy=!1,d(e)}}),(o&&Kt?Qt:Jt)(e,s)}}class Xt extends z{constructor(e,{onstart:t,onprogress:n,size:r,onend:i}){let s=0;super({async start(){t&&await Yt(t,r)},async transform(e,t){s+=e.length,n&&await Yt(n,s,r),t.enqueue(e)},async flush(){e.size=s,i&&await Yt(i,s)}})}}async function Yt(e,...t){try{await e(...t)}catch(e){}}function Jt(e,t){return{run:()=>(async({options:e,readable:t,writable:n,onTaskFinished:r},i)=>{try{const s=new Zt(e,i);await t.pipeThrough(s).pipeTo(n,{preventClose:!0,preventAbort:!0});const{signature:a,inputSize:o,outputSize:l}=s;return{signature:a,inputSize:o,outputSize:l}}finally{r()}})(e,t)}}function Qt(e,t){const{baseURL:r,chunkSize:i}=t;if(!e.interface){let s;try{s=((e,t,r)=>{const i={type:"module"};let s,a;typeof e==De&&(e=e());try{s=new f(e,t)}catch(t){s=e}if($t)try{a=new E(s)}catch(e){$t=!1,a=new E(s,i)}else a=new E(s,i);return a.addEventListener("message",(e=>(async({data:e},t)=>{const{type:r,value:i,messageId:s,result:a,error:o}=e,{reader:l,writer:c,resolveResult:d,rejectResult:f,onTaskFinished:m}=t;try{if(o){const{message:e,stack:t,code:r,name:i}=o,s=new u(e);n.assign(s,{stack:t,code:r,name:i}),h(s)}else{if("pull"==r){const{value:e,done:n}=await l.read();tn({type:Ot,value:e,done:n,messageId:s},t)}r==Ot&&(await c.ready,await c.write(new p(i)),tn({type:"ack",messageId:s},t)),r==Ht&&h(null,a)}}catch(o){tn({type:Ht,messageId:s},t),h(o)}function h(e,t){e?f(e):d(t),c&&c.releaseLock(),m()}})(e,r))),a})(e.scripts[0],r,e)}catch(n){return Kt=!1,Jt(e,t)}n.assign(e,{worker:s,interface:{run:()=>(async(e,t)=>{let r,i;const s=new g(((e,t)=>{r=e,i=t}));n.assign(e,{reader:null,writer:null,resolveResult:r,rejectResult:i,result:s});const{readable:a,options:o,scripts:l}=e,{writable:c,closed:d}=(e=>{let t;const n=new g((e=>t=e));return{writable:new A({async write(t){const n=e.getWriter();await n.ready,await n.write(t),n.releaseLock()},close(){t()},abort:t=>e.getWriter().abort(t)}),closed:n}})(e.writable),f=tn({type:"start",scripts:l.slice(1),options:o,config:t,readable:a,writable:c},e);f||n.assign(e,{reader:a.getReader(),writer:c.getWriter()});const u=await s;return f||await c.getWriter().close(),await d,u})(e,{chunkSize:i})}})}return e.interface}let $t=!0,en=!0;function tn(e,{worker:t,writer:n,onTaskFinished:r,transferStreams:i}){try{let{value:n,readable:r,writable:s}=e;const a=[];if(n&&(n.byteLength{const n=nn.find((e=>!e.busy));if(n)return on(n),new Gt(n,e,t,h);if(nn.lengthrn.push({resolve:n,stream:e,workerOptions:t})))})()).run();function h(e){if(rn.length){const[{resolve:t,stream:n,workerOptions:r}]=rn.splice(0,1);t(new Gt(e,n,r,h))}else e.worker?(on(e),((e,t)=>{const{config:n}=t,{terminateWorkerTimeout:r}=n;i.isFinite(r)&&r>=0&&(e.terminated?e.terminated=!1:e.terminateTimeout=setTimeout((async()=>{nn=nn.filter((t=>t!=e));try{await e.terminate()}catch(e){}}),r))})(e,t)):nn=nn.filter((t=>t!=e))}}function on(e){const{terminateTimeout:t}=e;t&&(clearTimeout(t),e.terminateTimeout=null)}function ln(e,t,r){return class{constructor(i){const s=this;var a,o;a=i,o="level",(typeof n.hasOwn===De?n.hasOwn(a,o):a.hasOwnProperty(o))&&i.level===Se&&delete i.level,s.codec=new e(n.assign({},t,i)),r(s.codec,(e=>{if(s.pendingData){const t=s.pendingData;s.pendingData=new p(t.length+e.length);const{pendingData:n}=s;n.set(t,0),n.set(e,t.length)}else s.pendingData=new p(e)}))}append(e){return this.codec.push(e),i(this)}flush(){return this.codec.push(new p,!0),i(this)}};function i(e){if(e.pendingData){const t=e.pendingData;return e.pendingData=null,t}return new p}}const cn="HTTP error ",dn="HTTP Range not supported",fn="Writer iterator completed too soon",un="GET",pn="bytes",mn=65536,hn="writable";class wn{constructor(){this.size=0}init(){this.initialized=!0}}class xn extends wn{get readable(){const e=this,{chunkSize:t=mn}=e,n=new S({start(){this.chunkOffset=0},async pull(r){const{offset:i=0,size:s,diskNumberStart:o}=n,{chunkOffset:l}=this;r.enqueue(await Vn(e,i+l,a.min(t,s-l),o)),l+t>s?r.close():this.chunkOffset+=t}});return n}}class gn extends wn{constructor(){super();const e=this,t=new A({write:t=>e.writeUint8Array(t)});n.defineProperty(e,hn,{get:()=>t})}writeUint8Array(){}}class bn extends xn{constructor(e){super();let t=e.length;for(;"="==e.charAt(t-1);)t--;const r=e.indexOf(",")+1;n.assign(this,{dataURI:e,dataStart:r,size:a.floor(.75*(t-r))})}readUint8Array(e,t){const{dataStart:n,dataURI:r}=this,i=new p(t),s=4*a.floor(e/3),o=atob(r.substring(s+n,4*a.ceil((e+t)/3)+n)),l=e-3*a.floor(s/4);for(let e=l;l+t>e;e++)i[e-l]=o.charCodeAt(e);return i}}class vn extends gn{constructor(e){super(),n.assign(this,{data:"data:"+(e||"")+";base64,",pending:[]})}writeUint8Array(e){const t=this;let n=0,i=t.pending;const s=t.pending.length;for(t.pending="",n=0;n<3*a.floor((s+e.length)/3)-s;n++)i+=r.fromCharCode(e[n]);for(;n2?t.data+=k(i):t.pending=i}getData(){return this.data+k(this.pending)}}class yn extends xn{constructor(e){super(),n.assign(this,{blob:e,size:e.size})}async readUint8Array(e,t){const n=this,r=e+t,i=e||rt&&(s=s.slice(e,r)),new p(s)}}class _n extends wn{constructor(e){super();const t=new z,r=[];e&&r.push(["Content-Type",e]),n.defineProperty(this,hn,{get:()=>t.writable}),this.blob=new d(t.readable,{headers:r}).blob()}getData(){return this.blob}}class kn extends yn{constructor(e){super(new x([e],{type:"text/plain"}))}}class zn extends _n{constructor(e){super(e),n.assign(this,{encoding:e,utf8:!e||"utf-8"==e.toLowerCase()})}async getData(){const{encoding:e,utf8:t}=this,r=await super.getData();if(r.text&&t)return r.text();{const t=new FileReader;return new g(((i,s)=>{n.assign(t,{onload:({target:e})=>i(e.result),onerror:()=>s(t.error)}),t.readAsText(r,e)}))}}}class Sn extends xn{constructor(e,t){super(),Dn(this,e,t)}async init(){await Cn(this,Un,Fn),super.init()}readUint8Array(e,t){return Rn(this,e,t,Un,Fn)}}class An extends xn{constructor(e,t){super(),Dn(this,e,t)}async init(){await Cn(this,In,Tn),super.init()}readUint8Array(e,t){return Rn(this,e,t,In,Tn)}}function Dn(e,t,r){const{preventHeadRequest:i,useRangeHeader:s,forceRangeRequests:a,combineSizeEocd:o}=r;delete(r=n.assign({},r)).preventHeadRequest,delete r.useRangeHeader,delete r.forceRangeRequests,delete r.combineSizeEocd,delete r.useXHR,n.assign(e,{url:t,options:r,preventHeadRequest:i,useRangeHeader:s,forceRangeRequests:a,combineSizeEocd:o})}async function Cn(e,t,n){const{url:r,preventHeadRequest:s,useRangeHeader:a,forceRangeRequests:o,combineSizeEocd:l}=e;if((e=>{const{baseURL:t}=Fe(),{protocol:n}=new f(e,t);return"http:"==n||"https:"==n})(r)&&(a||o)&&(void 0===s||s)){const r=await t(un,e,En(e,l?-22:void 0));if(!o&&r.headers.get("Accept-Ranges")!=pn)throw new u(dn);{let s;l&&(e.eocdCache=new p(await r.arrayBuffer()));const a=r.headers.get("Content-Range");if(a){const e=a.trim().split(/\s*\/\s*/);if(e.length){const t=e[1];t&&"*"!=t&&(s=i(t))}}s===Se?await Ln(e,t,n):e.size=s}}else await Ln(e,t,n)}async function Rn(e,t,n,r,i){const{useRangeHeader:s,forceRangeRequests:a,eocdCache:o,size:l,options:c}=e;if(s||a){if(o&&t==l-be&&n==be)return o;const i=await r(un,e,En(e,t,n));if(206!=i.status)throw new u(dn);return new p(await i.arrayBuffer())}{const{data:r}=e;return r||await i(e,c),new p(e.data.subarray(t,t+n))}}function En(e,t=0,r=1){return n.assign({},Wn(e),{Range:pn+"="+(0>t?t:t+"-"+(t+r-1))})}function Wn({options:e}){const{headers:t}=e;if(t)return Symbol.iterator in t?n.fromEntries(t):t}async function Fn(e){await qn(e,Un)}async function Tn(e){await qn(e,In)}async function qn(e,t){const n=await t(un,e,Wn(e));e.data=new p(await n.arrayBuffer()),e.size||(e.size=e.data.length)}async function Ln(e,t,n){if(e.preventHeadRequest)await n(e,e.options);else{const r=(await t("HEAD",e,Wn(e))).headers.get("Content-Length");r?e.size=i(r):await n(e,e.options)}}async function Un(e,{options:t,url:r},i){const s=await fetch(r,n.assign({},t,{method:e,headers:i}));if(400>s.status)return s;throw 416==s.status?new u(dn):new u(cn+(s.statusText||s.status))}function In(e,{url:t},r){return new g(((i,s)=>{const a=new XMLHttpRequest;if(a.addEventListener("load",(()=>{if(400>a.status){const e=[];a.getAllResponseHeaders().trim().split(/[\r\n]+/).forEach((t=>{const n=t.trim().split(/\s*:\s*/);n[0]=n[0].trim().replace(/^[a-z]|-[a-z]/g,(e=>e.toUpperCase())),e.push(n)})),i({status:a.status,arrayBuffer:()=>a.response,headers:new l(e)})}else s(416==a.status?new u(dn):new u(cn+(a.statusText||a.status)))}),!1),a.addEventListener("error",(e=>s(e.detail?e.detail.error:new u("Network error"))),!1),a.open(e,t),r)for(const e of n.entries(r))a.setRequestHeader(e[0],e[1]);a.responseType="arraybuffer",a.send()}))}class Nn extends xn{constructor(e,t={}){super(),n.assign(this,{url:e,reader:t.useXHR?new An(e,t):new Sn(e,t)})}set size(e){}get size(){return this.reader.size}async init(){await this.reader.init(),super.init()}readUint8Array(e,t){return this.reader.readUint8Array(e,t)}}class Pn extends xn{constructor(e){super(),n.assign(this,{array:e,size:e.length})}readUint8Array(e,t){return this.array.slice(e,e+t)}}class jn extends gn{init(e=0){n.assign(this,{offset:0,array:new p(e)}),super.init()}writeUint8Array(e){const t=this;if(t.offset+e.length>t.array.length){const n=t.array;t.array=new p(n.length+e.length),t.array.set(n)}t.array.set(e,t.offset),t.offset+=e.length}getData(){return this.array}}class On extends xn{constructor(e){super(),this.readers=e}async init(){const e=this,{readers:t}=e;e.lastDiskNumber=0,e.lastDiskOffset=0,await g.all(t.map((async(n,r)=>{await n.init(),r!=t.length-1&&(e.lastDiskOffset+=n.size),e.size+=n.size}))),super.init()}async readUint8Array(e,t,n=0){const r=this,{readers:i}=this;let s,o=n;-1==o&&(o=i.length-1);let l=e;for(;l>=i[o].size;)l-=i[o].size,o++;const c=i[o],d=c.size;if(l+t>d){const i=d-l;s=new p(t),s.set(await Vn(c,l,i)),s.set(await r.readUint8Array(e+i,t-i,n),i)}else s=await Vn(c,l,t);return r.lastDiskNumber=a.max(o,r.lastDiskNumber),s}}class Hn extends wn{constructor(e,t=4294967295){super();const r=this;let i,s,a;n.assign(r,{diskNumber:0,diskOffset:0,size:0,maxSize:t,availableSize:t});const o=new A({async write(t){const{availableSize:n}=r;if(a)t.lengtho})}}async function Bn(e,t){if(!e.init||e.initialized)return g.resolve();await e.init(t)}function Mn(e){return t.isArray(e)&&(e=new On(e)),e instanceof S&&(e={readable:e}),e}function Zn(e){e.writable===Se&&typeof e.next==De&&(e=new Hn(e)),e instanceof A&&(e={writable:e});const{writable:t}=e;return t.size===Se&&(t.size=0),e instanceof Hn||n.assign(e,{diskNumber:0,diskOffset:0,availableSize:1/0,maxSize:1/0}),e}function Vn(e,t,n,r){return e.readUint8Array(t,n,r)}const Kn=On,Gn=Hn,Xn="\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ ".split("");function Yn(e,t){return t&&"cp437"==t.trim().toLowerCase()?(e=>{{let t="";for(let n=0;nthis[t]=e[t]))}}const hr="File format is not recognized",wr="End of central directory not found",xr="End of Zip64 central directory not found",gr="End of Zip64 central directory locator not found",br="Central directory header not found",vr="Local file header not found",yr="Zip64 extra field not found",_r="File contains encrypted entry",kr="Encryption method not supported",zr="Compression method not supported",Sr="Split zip file",Ar="utf-8",Dr="cp437",Cr=[[tr,ue],[nr,ue],[rr,ue],[ir,pe]],Rr={[pe]:{getValue:jr,bytes:4},[ue]:{getValue:Or,bytes:8}};class Er{constructor(e,t={}){n.assign(this,{reader:Mn(e),options:t,config:Fe()})}async*getEntriesGenerator(e={}){const t=this;let{reader:r}=t;const{config:i}=t;if(await Bn(r),r.size!==Se&&r.readUint8Array||(r=new yn(await new d(r.readable).blob()),await Bn(r)),r.size{const r=new p(4);return Hr(r).setUint32(0,101010256,!0),await i(22)||await i(a.min(1048582,n));async function i(t){const i=n-t,s=await Vn(e,i,t);for(let e=s.length-22;e>=0;e--)if(s[e]==r[0]&&s[e+1]==r[1]&&s[e+2]==r[2]&&s[e+3]==r[3])return{offset:i+e,buffer:s.slice(e,e+22).buffer}}})(r,0,r.size);if(!s)throw jr(Hr(await Vn(r,0,4)))==he?new u(Sr):new u(wr);const o=Hr(s);let l=jr(o,12),c=jr(o,16);const f=s.offset,m=Pr(o,20),h=f+be+m;let w=Pr(o,4);const x=r.lastDiskNumber||0;let b=Pr(o,6),v=Pr(o,8),y=0,_=0;if(c==ue||l==ue||v==pe||b==pe){const e=Hr(await Vn(r,s.offset-20,20));if(jr(e,0)!=ge)throw new u(xr);c=Or(e,8);let t=await Vn(r,c,56,-1),n=Hr(t);const i=s.offset-20-56;if(jr(n,0)!=xe&&c!=i){const e=c;c=i,y=c-e,t=await Vn(r,c,56,-1),n=Hr(t)}if(jr(n,0)!=xe)throw new u(gr);w==pe&&(w=jr(n,16)),b==pe&&(b=jr(n,20)),v==pe&&(v=Or(n,32)),l==ue&&(l=Or(n,40)),c-=l}if(cc)throw new u(hr);let k=0,z=await Vn(r,c,l,b),S=Hr(z);if(l){const e=s.offset-l;if(jr(S,k)!=we&&c!=e){const t=c;c=e,y+=c-t,z=await Vn(r,c,l,b),S=Hr(z)}}const A=s.offset-c-(r.lastDiskOffset||0);if(l==A||0>A||(l=A,z=await Vn(r,c,l,b),S=Hr(z)),0>c||c>=r.size)throw new u(hr);const D=Lr(t,e,"filenameEncoding"),C=Lr(t,e,"commentEncoding");for(let s=0;v>s;s++){const o=new Wr(r,i,t.options);if(jr(S,k)!=we)throw new u(br);Fr(o,S,k+6);const l=!!o.bitFlag.languageEncodingFlag,c=k+46,d=c+o.filenameLength,f=d+o.extraFieldLength,p=Pr(S,k+4),m=0==(0&p),h=z.subarray(c,d),w=Pr(S,k+32),x=f+w,b=z.subarray(f,x),A=l,R=l,E=m&&16==(16&Nr(S,k+38)),W=jr(S,k+42)+y;n.assign(o,{versionMadeBy:p,msDosCompatible:m,compressedSize:0,uncompressedSize:0,commentLength:w,directory:E,offset:W,diskNumberStart:Pr(S,k+34),internalFileAttribute:Pr(S,k+36),externalFileAttribute:jr(S,k+38),rawFilename:h,filenameUTF8:A,commentUTF8:R,rawExtraField:z.subarray(d,f)});const F=Lr(t,e,"decodeText")||Yn,[T,q]=await g.all([F(h,A?Ar:D||Dr),F(b,R?Ar:C||Dr)]);n.assign(o,{rawComment:b,filename:T,comment:q,directory:E||T.endsWith(_e)}),_=a.max(W,_),await Tr(o,o,S,k+6);const L=new mr(o);L.getData=(e,t)=>o.getData(e,L,t),k=x;const{onprogress:U}=e;if(U)try{await U(s+1,v,new mr(o))}catch(e){}yield L}const R=Lr(t,e,"extractPrependedData"),E=Lr(t,e,"extractAppendedData");return R&&(t.prependedData=_>0?await Vn(r,0,_):new p),t.comment=m?await Vn(r,f+be,m):new p,E&&(t.appendedData=h>>8&255:m>>>24&255),signature:m,compressed:0!=c,encrypted:_,useWebWorkers:Lr(i,r,"useWebWorkers"),useCompressionStream:Lr(i,r,"useCompressionStream"),transferStreams:Lr(i,r,"transferStreams"),checkPasswordOnly:R},config:d,streamOptions:{signal:C,size:S,onstart:W,onprogress:F,onend:T}};let L=0;try{({outputSize:L}=await an({readable:D,writable:E},q))}catch(e){if(!R||e.message!=Ye)throw e}finally{const e=Lr(i,r,"preventClose");E.size+=L,e||E.locked||await E.getWriter().close()}return R?Se:e.getData?e.getData():E}}function Fr(e,t,r){const i=e.rawBitFlag=Pr(t,r+2),s=1==(1&i),a=jr(t,r+6);n.assign(e,{encrypted:s,version:Pr(t,r),bitFlag:{level:(6&i)>>1,dataDescriptor:8==(8&i),languageEncodingFlag:(i&ye)==ye},rawLastModDate:a,lastModDate:Ur(a),filenameLength:Pr(t,r+22),extraFieldLength:Pr(t,r+24)})}async function Tr(e,t,r,i,s){const{rawExtraField:a}=t,c=t.extraField=new l,d=Hr(new p(a));let f=0;try{for(;f{t.zip64=!0;const n=Hr(e.data),r=Cr.filter((([e,n])=>t[e]==n));for(let i=0,s=0;i{const i=Hr(e.data),s=Nr(i,4);n.assign(e,{vendorVersion:Nr(i,0),vendorId:Nr(i,2),strength:s,originalCompressionMethod:r,compressionMethod:Pr(i,5)}),t.compressionMethod=e.compressionMethod})(g,t,m),t.extraFieldAES=g):t.compressionMethod=m;const b=c.get(10);b&&(((e,t)=>{const r=Hr(e.data);let i,s=4;try{for(;s{const r=Hr(e.data),i=Nr(r,0),s=[],a=[];n?(1==(1&i)&&(s.push(sr),a.push(ar)),2==(2&i)&&(s.push(or),a.push("rawLastAccessDate")),4==(4&i)&&(s.push(lr),a.push("rawCreationDate"))):5>e.data.length||(s.push(sr),a.push(ar));let l=1;s.forEach(((n,i)=>{if(e.data.length>=l+4){const s=jr(r,l);t[n]=e[n]=new o(1e3*s);const c=a[i];e[c]=s}l+=4}))})(v,t,s),t.extraFieldExtendedTimestamp=v);const y=c.get(6534);y&&(t.extraFieldUSDZ=y)}async function qr(e,t,r,i,s){const a=Hr(e.data),o=new Pe;o.append(s[r]);const l=Hr(new p(4));l.setUint32(0,o.get(),!0);const c=jr(a,1);n.assign(e,{version:Nr(a,0),[t]:Yn(e.data.subarray(5)),valid:!s.bitFlag.languageEncodingFlag&&c==jr(l,0)}),e.valid&&(i[t]=e[t],i[t+"UTF8"]=!0)}function Lr(e,t,n){return t[n]===Se?e.options[n]:t[n]}function Ur(e){const t=(4294901760&e)>>16,n=65535&e;try{return new o(1980+((65024&t)>>9),((480&t)>>5)-1,31&t,(63488&n)>>11,(2016&n)>>5,2*(31&n),0)}catch(e){}}function Ir(e){return new o(i(e/s(1e4)-s(116444736e5)))}function Nr(e,t){return e.getUint8(t)}function Pr(e,t){return e.getUint16(t,!0)}function jr(e,t){return e.getUint32(t,!0)}function Or(e,t){return i(e.getBigUint64(t,!0))}function Hr(e){return new w(e.buffer)}const Br="File already exists",Mr="Zip file comment exceeds 64KB",Zr="File entry comment exceeds 64KB",Vr="File entry name exceeds 64KB",Kr="Version exceeds 65535",Gr="The strength must equal 1, 2, or 3",Xr="Extra field type exceeds 65535",Yr="Extra field data exceeds 64KB",Jr="Zip64 is not supported (make sure 'keepOrder' is set to 'true')",Qr=new p([7,0,2,0,65,69,3,0,0]);let $r=0;const ei=[];class ti{constructor(e,t={}){const r=(e=Zn(e)).availableSize!==Se&&e.availableSize>0&&e.availableSize!==1/0&&e.maxSize!==Se&&e.maxSize>0&&e.maxSize!==1/0;n.assign(this,{writer:e,addSplitZipSignature:r,options:t,config:Fe(),files:new l,filenames:new c,offset:e.writable.size,pendingEntriesSize:0,pendingAddFileCalls:new c,bufferedWrites:0})}async add(e="",r,i={}){const l=this,{pendingAddFileCalls:c,config:f}=l;let x;$rei.push(e)));try{if(e=e.trim(),l.filenames.has(e))throw new u(Br);return l.filenames.add(e),x=(async(e,r,i,l)=>{r=r.trim(),l.directory&&!r.endsWith(_e)?r+=_e:l.directory=r.endsWith(_e);const c=ii(e,l,"encodeText",Oe),f=c(r);if(fi(f)>pe)throw new u(Vr);const x=l.comment||"",b=c(x);if(fi(b)>pe)throw new u(Zr);const v=ii(e,l,"version",20);if(v>pe)throw new u(Kr);const y=ii(e,l,"versionMadeBy",20);if(y>pe)throw new u(Kr);const _=ii(e,l,sr,new o),k=ii(e,l,or),S=ii(e,l,lr),A=ii(e,l,fr,!0),D=ii(e,l,cr,0),C=ii(e,l,dr,0),R=ii(e,l,"password"),E=ii(e,l,"rawPassword"),W=ii(e,l,"encryptionStrength",3),F=ii(e,l,"zipCrypto"),T=ii(e,l,"extendedTimestamp",!0),q=ii(e,l,"keepOrder",!0),L=ii(e,l,"level"),U=ii(e,l,"useWebWorkers"),I=ii(e,l,"bufferedWrite"),N=ii(e,l,"dataDescriptorSignature",!1),P=ii(e,l,"signal"),j=ii(e,l,"useCompressionStream");let O=ii(e,l,"dataDescriptor",!0),H=ii(e,l,ur);if(R!==Se&&W!==Se&&(1>W||W>3))throw new u(Gr);let B=new p;const{extraField:M}=l;if(M){let e=0,t=0;M.forEach((t=>e+=4+fi(t))),B=new p(e),M.forEach(((e,n)=>{if(n>pe)throw new u(Xr);if(fi(e)>pe)throw new u(Yr);ci(B,new m([n]),t),ci(B,new m([fi(e)]),t+2),ci(B,e,t+4),t+=4+fi(e)}))}let Z=0,V=0,K=0;const G=!0===H;i&&(i=Mn(i),await Bn(i),i.size===Se?(O=!0,(H||H===Se)&&(H=!0,K=Z=ue)):(K=i.size,Z=(e=>e+5*(a.floor(e/16383)+1))(K)));const{diskOffset:X,diskNumber:Y,maxSize:J}=e.writer,Q=G||K>=ue,$=G||Z>=ue,ee=G||e.offset+e.pendingEntriesSize-X>=ue,te=ii(e,l,"supportZip64SplitFile",!0)&&G||Y+a.ceil(e.pendingEntriesSize/J)>=pe;if(ee||Q||$||te){if(!1===H||!q)throw new u(Jr);H=!0}H=H||!1;const ne=(e=>{const{rawFilename:t,lastModDate:n,lastAccessDate:r,creationDate:i,rawPassword:s,password:o,level:l,zip64:c,zipCrypto:d,dataDescriptor:f,directory:u,rawExtraField:m,encryptionStrength:w,extendedTimestamp:x}=e,g=0!==l&&!u,b=!!(o&&fi(o)||s&&fi(s));let v,y,_,k,z=e.version;if(b&&!d){v=new p(fi(Qr)+2);const e=di(v);ai(e,0,39169),ci(v,Qr,2),si(e,8,w)}else v=new p;if(x){_=new p(9+(r?4:0)+(i?4:0));const e=di(_);ai(e,0,ve),ai(e,2,fi(_)-4),k=1+(r?2:0)+(i?4:0),si(e,4,k);let t=5;oi(e,t,a.floor(n.getTime()/1e3)),t+=4,r&&(oi(e,t,a.floor(r.getTime()/1e3)),t+=4),i&&oi(e,t,a.floor(i.getTime()/1e3));try{y=new p(36);const e=di(y),t=ri(n);ai(e,0,10),ai(e,2,32),ai(e,8,1),ai(e,10,24),li(e,12,t),li(e,20,ri(r)||t),li(e,28,ri(i)||t)}catch(e){y=new p}}else y=_=new p;let S=ye;f&&(S|=8);let A=0;g&&(A=8),c&&(z=z>45?z:45),b&&(S|=1,d||(z=z>51?z:51,A=99,g&&(v[9]=8)));const D=new p(26),C=di(D);ai(C,0,z),ai(C,2,S),ai(C,4,A);const R=new h(1),E=di(R);let W;W=ze>n?ze:n>ke?ke:n,ai(E,0,(W.getHours()<<6|W.getMinutes())<<5|W.getSeconds()/2),ai(E,2,(W.getFullYear()-1980<<4|W.getMonth()+1)<<5|W.getDate());const F=R[0];oi(C,6,F),ai(C,22,fi(t));const T=fi(v,_,y,m);ai(C,24,T);const q=new p(30+fi(t)+T);return oi(di(q),0,me),ci(q,D,4),ci(q,t,30),ci(q,v,30+fi(t)),ci(q,_,30+fi(t,v)),ci(q,y,30+fi(t,v,_)),ci(q,m,30+fi(t,v,_,y)),{localHeaderArray:q,headerArray:D,headerView:C,lastModDate:n,rawLastModDate:F,encrypted:b,compressed:g,version:z,compressionMethod:A,extraFieldExtendedTimestampFlag:k,rawExtraFieldExtendedTimestamp:_,rawExtraFieldNTFS:y,rawExtraFieldAES:v,extraFieldLength:T}})(l=n.assign({},l,{rawFilename:f,rawComment:b,version:v,versionMadeBy:y,lastModDate:_,lastAccessDate:k,creationDate:S,rawExtraField:B,zip64:H,zip64UncompressedSize:Q,zip64CompressedSize:$,zip64Offset:ee,zip64DiskNumberStart:te,password:R,rawPassword:E,level:j||e.config.CompressionStream!==Se?L:0,useWebWorkers:U,encryptionStrength:W,extendedTimestamp:T,zipCrypto:F,bufferedWrite:I,keepOrder:q,dataDescriptor:O,dataDescriptorSignature:N,signal:P,msDosCompatible:A,internalFileAttribute:D,externalFileAttribute:C,useCompressionStream:j})),re=(e=>{const{zip64:t,dataDescriptor:n,dataDescriptorSignature:r}=e;let i,s=new p,a=0;return n&&(s=new p(t?r?24:20:r?16:12),i=di(s),r&&(a=4,oi(i,0,134695760))),{dataDescriptorArray:s,dataDescriptorView:i,dataDescriptorOffset:a}})(l),ie=fi(ne.localHeaderArray,re.dataDescriptorArray);let se;V=ie+Z,e.options.usdz&&(V+=V+64),e.pendingEntriesSize+=V;try{se=await(async(e,r,i,a,o)=>{const{files:l,writer:c}=e,{keepOrder:f,dataDescriptor:m,signal:h}=o,{headerInfo:x}=a,{usdz:b}=e.options,v=t.from(l.values()).pop();let y,_,k,S,A,D,C,R={};l.set(r,R);try{let t;f&&(t=v&&v.lock,R.lock=new g((e=>k=e))),!(o.bufferedWrite||e.writerLocked||e.bufferedWrites&&f)&&m||b?(D=c,await E()):(D=new z,C=new d(D.readable).blob(),D.writable.size=0,y=!0,e.bufferedWrites++,await Bn(c)),await Bn(D);const{writable:x}=c;let{diskOffset:F}=c;if(e.addSplitZipSignature){delete e.addSplitZipSignature;const t=new p(4);oi(di(t),0,he),await ni(x,t),e.offset+=4}b&&((e,t)=>{const{headerInfo:n}=e;let{localHeaderArray:r,extraFieldLength:i}=n,s=di(r),a=64-(t+fi(r))%64;4>a&&(a+=64);const o=new p(a),l=di(o);ai(l,0,6534),ai(l,2,a-2);const c=r;n.localHeaderArray=r=new p(fi(c)+a),ci(r,c),ci(r,o,fi(c)),s=di(r),ai(s,28,i+a),e.metadataSize+=a})(a,e.offset-F),y||(await t,await W(x));const{diskNumber:T}=c;if(A=!0,R.diskNumberStart=T,R=await(async(e,t,{diskNumberStart:r,lock:i},a,o,l)=>{const{headerInfo:c,dataDescriptorInfo:d,metadataSize:f}=a,{localHeaderArray:u,headerArray:m,lastModDate:h,rawLastModDate:w,encrypted:x,compressed:g,version:b,compressionMethod:v,rawExtraFieldExtendedTimestamp:y,extraFieldExtendedTimestampFlag:_,rawExtraFieldNTFS:k,rawExtraFieldAES:z}=c,{dataDescriptorArray:S}=d,{rawFilename:A,lastAccessDate:D,creationDate:C,password:R,rawPassword:E,level:W,zip64:F,zip64UncompressedSize:T,zip64CompressedSize:q,zip64Offset:L,zip64DiskNumberStart:U,zipCrypto:I,dataDescriptor:N,directory:P,versionMadeBy:j,rawComment:O,rawExtraField:H,useWebWorkers:B,onstart:M,onprogress:Z,onend:V,signal:K,encryptionStrength:G,extendedTimestamp:X,msDosCompatible:Y,internalFileAttribute:J,externalFileAttribute:Q,useCompressionStream:$}=l,ee={lock:i,versionMadeBy:j,zip64:F,directory:!!P,filenameUTF8:!0,rawFilename:A,commentUTF8:!0,rawComment:O,rawExtraFieldExtendedTimestamp:y,rawExtraFieldNTFS:k,rawExtraFieldAES:z,rawExtraField:H,extendedTimestamp:X,msDosCompatible:Y,internalFileAttribute:J,externalFileAttribute:Q,diskNumberStart:r};let te,ne=0,re=0;const{writable:ie}=t;if(e){e.chunkSize=Te(o),await ni(ie,u);const t=e.readable,n=t.size=e.size,r={options:{codecType:Bt,level:W,rawPassword:E,password:R,encryptionStrength:G,zipCrypto:x&&I,passwordVerification:x&&I&&w>>8&255,signed:!0,compressed:g,encrypted:x,useWebWorkers:B,useCompressionStream:$,transferStreams:!1},config:o,streamOptions:{signal:K,size:n,onstart:M,onprogress:Z,onend:V}},i=await an({readable:t,writable:ie},r);re=i.inputSize,ne=i.outputSize,te=i.signature,ie.size+=re}else await ni(ie,u);let se;if(F){let e=4;T&&(e+=8),q&&(e+=8),L&&(e+=8),U&&(e+=4),se=new p(e)}else se=new p;return((e,t)=>{const{signature:n,rawExtraFieldZip64:r,compressedSize:i,uncompressedSize:a,headerInfo:o,dataDescriptorInfo:l}=e,{headerView:c,encrypted:d}=o,{dataDescriptorView:f,dataDescriptorOffset:u}=l,{zip64:p,zip64UncompressedSize:m,zip64CompressedSize:h,zipCrypto:w,dataDescriptor:x}=t;if(d&&!w||n===Se||(oi(c,10,n),x&&oi(f,u,n)),p){const e=di(r);ai(e,0,1),ai(e,2,fi(r)-4);let t=4;m&&(oi(c,18,ue),li(e,t,s(a)),t+=8),h&&(oi(c,14,ue),li(e,t,s(i))),x&&(li(f,u+4,s(i)),li(f,u+12,s(a)))}else oi(c,14,i),oi(c,18,a),x&&(oi(f,u+4,i),oi(f,u+8,a))})({signature:te,rawExtraFieldZip64:se,compressedSize:ne,uncompressedSize:re,headerInfo:c,dataDescriptorInfo:d},l),N&&await ni(ie,S),n.assign(ee,{uncompressedSize:re,compressedSize:ne,lastModDate:h,rawLastModDate:w,creationDate:C,lastAccessDate:D,encrypted:x,size:f+ne,compressionMethod:v,version:b,headerArray:m,signature:te,rawExtraFieldZip64:se,extraFieldExtendedTimestampFlag:_,zip64UncompressedSize:T,zip64CompressedSize:q,zip64Offset:L,zip64DiskNumberStart:U}),ee})(i,D,R,a,e.config,o),A=!1,l.set(r,R),R.filename=r,y){await D.writable.getWriter().close();let e=await C;await t,await E(),S=!0,m||(e=await(async(e,t,n,{zipCrypto:r})=>{let i;i=await t.slice(0,26).arrayBuffer(),26!=i.byteLength&&(i=i.slice(0,26));const s=new w(i);return e.encrypted&&!r||oi(s,14,e.signature),e.zip64?(oi(s,18,ue),oi(s,22,ue)):(oi(s,18,e.compressedSize),oi(s,22,e.uncompressedSize)),await ni(n,new p(i)),t.slice(i.byteLength)})(R,e,x,o)),await W(x),R.diskNumberStart=c.diskNumber,F=c.diskOffset,await e.stream().pipeTo(x,{preventClose:!0,preventAbort:!0,signal:h}),x.size+=e.size,S=!1}if(R.offset=e.offset-F,R.zip64)((e,t)=>{const{rawExtraFieldZip64:n,offset:r,diskNumberStart:i}=e,{zip64UncompressedSize:a,zip64CompressedSize:o,zip64Offset:l,zip64DiskNumberStart:c}=t,d=di(n);let f=4;a&&(f+=8),o&&(f+=8),l&&(li(d,f,s(r)),f+=8),c&&oi(d,f,i)})(R,o);else if(R.offset>=ue)throw new u(Jr);return e.offset+=R.size,R}catch(t){if(y&&S||!y&&A){if(e.hasCorruptedEntries=!0,t)try{t.corruptedEntry=!0}catch(e){}y?e.offset+=D.writable.size:e.offset=D.writable.size}throw l.delete(r),t}finally{y&&e.bufferedWrites--,k&&k(),_&&_()}async function E(){e.writerLocked=!0;const{lockWriter:t}=e;e.lockWriter=new g((t=>_=()=>{e.writerLocked=!1,t()})),await t}async function W(e){fi(x.localHeaderArray)>c.availableSize&&(c.availableSize=0,await ni(e,new p))}})(e,r,i,{headerInfo:ne,dataDescriptorInfo:re,metadataSize:ie},l)}finally{e.pendingEntriesSize-=V}return n.assign(se,{name:r,comment:x,extraField:M}),new mr(se)})(l,e,r,i),c.add(x),await x}catch(t){throw l.filenames.delete(e),t}finally{c.delete(x);const e=ei.shift();e?e():$r--}}async close(e=new p,n={}){const{pendingAddFileCalls:r,writer:i}=this,{writable:o}=i;for(;r.size;)await g.allSettled(t.from(r));return await(async(e,n,r)=>{const{files:i,writer:o}=e,{diskOffset:l,writable:c}=o;let{diskNumber:d}=o,f=0,m=0,h=e.offset-l,w=i.size;for(const[,e]of i){const{rawFilename:t,rawExtraFieldZip64:n,rawExtraFieldAES:r,rawComment:i,rawExtraFieldNTFS:s,rawExtraField:o,extendedTimestamp:l,extraFieldExtendedTimestampFlag:c,lastModDate:d}=e;let f;if(l){f=new p(9);const e=di(f);ai(e,0,ve),ai(e,2,5),si(e,4,c),oi(e,5,a.floor(d.getTime()/1e3))}else f=new p;e.rawExtraFieldCDExtendedTimestamp=f,m+=46+fi(t,i,n,r,s,f,o)}const x=new p(m),g=di(x);await Bn(o);let b=0;for(const[e,n]of t.from(i.values()).entries()){const{offset:t,rawFilename:s,rawExtraFieldZip64:a,rawExtraFieldAES:l,rawExtraFieldCDExtendedTimestamp:d,rawExtraFieldNTFS:u,rawExtraField:p,rawComment:m,versionMadeBy:h,headerArray:w,directory:v,zip64:y,zip64UncompressedSize:_,zip64CompressedSize:k,zip64DiskNumberStart:z,zip64Offset:S,msDosCompatible:A,internalFileAttribute:D,externalFileAttribute:C,diskNumberStart:R,uncompressedSize:E,compressedSize:W}=n,F=fi(a,l,d,u,p);oi(g,f,we),ai(g,f+4,h);const T=di(w);_||oi(T,18,E),k||oi(T,14,W),ci(x,w,f+6),ai(g,f+30,F),ai(g,f+32,fi(m)),ai(g,f+34,y&&z?pe:R),ai(g,f+36,D),C?oi(g,f+38,C):v&&A&&si(g,f+38,16),oi(g,f+42,y&&S?ue:t),ci(x,s,f+46),ci(x,a,f+46+fi(s)),ci(x,l,f+46+fi(s,a)),ci(x,d,f+46+fi(s,a,l)),ci(x,u,f+46+fi(s,a,l,d)),ci(x,p,f+46+fi(s,a,l,d,u)),ci(x,m,f+46+fi(s)+F);const q=46+fi(s,m)+F;if(f-b>o.availableSize&&(o.availableSize=0,await ni(c,x.slice(b,f)),b=f),f+=q,r.onprogress)try{await r.onprogress(e+1,i.size,new mr(n))}catch(e){}}await ni(c,b?x.slice(b):x);let v=o.diskNumber;const{availableSize:y}=o;be>y&&v++;let _=ii(e,r,"zip64");if(!(ue>h&&ue>m&&pe>w&&pe>v)){if(!1===_)throw new u(Jr);_=!0}const k=new p(_?98:be),z=di(k);f=0,_&&(oi(z,0,xe),li(z,4,s(44)),ai(z,12,45),ai(z,14,45),oi(z,16,v),oi(z,20,d),li(z,24,s(w)),li(z,32,s(w)),li(z,40,s(m)),li(z,48,s(h)),oi(z,56,ge),li(z,64,s(h)+s(m)),oi(z,72,v+1),ii(e,r,"supportZip64SplitFile",!0)&&(v=pe,d=pe),w=pe,h=ue,m=ue,f+=76),oi(z,f,101010256),ai(z,f+4,v),ai(z,f+6,d),ai(z,f+8,w),ai(z,f+10,w),oi(z,f+12,m),oi(z,f+16,h);const S=fi(n);if(S){if(S>pe)throw new u(Mr);ai(z,f+20,S)}await ni(c,k),S&&await ni(c,n)})(this,e,n),ii(this,n,"preventClose")||await o.getWriter().close(),i.getData?i.getData():o}}async function ni(e,t){const n=e.getWriter();try{await n.ready,e.size+=fi(t),await n.write(t)}finally{n.releaseLock()}}function ri(e){if(e)return(s(e.getTime())+s(116444736e5))*s(1e4)}function ii(e,t,n,r){const i=t[n]===Se?e.options[n]:t[n];return i===Se?r:i}function si(e,t,n){e.setUint8(t,n)}function ai(e,t,n){e.setUint16(t,n,!0)}function oi(e,t,n){e.setUint32(t,n,!0)}function li(e,t,n){e.setBigUint64(t,n,!0)}function ci(e,t,n){e.set(t,n)}function di(e){return new w(e.buffer)}function fi(...e){let t=0;return e.forEach((e=>e&&(t+=e.length))),t}class ui{constructor(e,t,r,i){const s=this;if(e.root&&i&&i.getChildByName(t))throw new u("Entry filename already exists");r||(r={}),n.assign(s,{fs:e,name:t,data:r.data,options:r.options,id:e.entries.length,parent:i,children:[],uncompressedSize:r.uncompressedSize||0}),e.entries.push(s),i&&s.parent.children.push(s)}moveTo(e){this.fs.move(this,e)}getFullname(){return this.getRelativeName()}getRelativeName(e=this.fs.root){let t=this.name,n=this.parent;for(;n&&n!=e;)t=(n.name?n.name+"/":"")+t,n=n.parent;return t}isDescendantOf(e){let t=this.parent;for(;t&&t.id!=e.id;)t=t.parent;return!!t}rename(e){const t=this.parent;if(t&&t.getChildByName(e))throw new u("Entry filename already exists");this.name=e}}class pi extends ui{constructor(e,t,n,r){super(e,t,n,r);const i=this;i.Reader=n.Reader,i.Writer=n.Writer,n.getData&&(i.getData=n.getData)}clone(){return new pi(this.fs,this.name,this)}async getData(e,t={}){const n=this;if(!e||e.constructor==n.Writer&&n.data)return n.data;{const r=n.reader=new n.Reader(n.data,t),i=n.data?n.data.uncompressedSize:r.size;await g.all([Bn(r),Bn(e,i)]);const s=r.readable;return s.size=n.uncompressedSize=r.size,await s.pipeTo(e.writable),e.getData?e.getData():e.writable}}isPasswordProtected(){return this.data.encrypted}async checkPassword(e,t={}){const n=this;if(!n.isPasswordProtected())return!0;t.password=e,t.checkPasswordOnly=!0;try{return await n.data.getData(null,t),!0}catch(e){if(e.message==Ge)return!1;throw e}}getText(e,t){return this.getData(new zn(e),t)}getBlob(e,t){return this.getData(new _n(e),t)}getData64URI(e,t){return this.getData(new vn(e),t)}getUint8Array(e){return this.getData(new jn,e)}getWritable(e=new A,t){return this.getData({writable:e},t)}replaceBlob(e){n.assign(this,{data:e,Reader:yn,Writer:_n,reader:null})}replaceText(e){n.assign(this,{data:e,Reader:kn,Writer:zn,reader:null})}replaceData64URI(e){n.assign(this,{data:e,Reader:bn,Writer:vn,reader:null})}replaceUint8Array(e){n.assign(this,{data:e,Reader:Pn,Writer:jn,reader:null})}replaceReadable(e){n.assign(this,{data:null,Reader:()=>({readable:e}),Writer:null,reader:null})}}class mi extends ui{constructor(e,t,n,r){super(e,t,n,r),this.directory=!0}clone(e){const t=this,n=new mi(t.fs,t.name);return e&&(n.children=t.children.map((t=>{const r=t.clone(e);return r.parent=n,r}))),n}addDirectory(e,t){return _i(this,e,{options:t},!0)}addText(e,t,n={}){return _i(this,e,{data:t,Reader:kn,Writer:zn,options:n,uncompressedSize:t.length})}addBlob(e,t,n={}){return _i(this,e,{data:t,Reader:yn,Writer:_n,options:n,uncompressedSize:t.size})}addData64URI(e,t,n={}){let r=t.length;for(;"="==t.charAt(r-1);)r--;const i=t.indexOf(",")+1;return _i(this,e,{data:t,Reader:bn,Writer:vn,options:n,uncompressedSize:a.floor(.75*(r-i))})}addUint8Array(e,t,n={}){return _i(this,e,{data:t,Reader:Pn,Writer:jn,options:n,uncompressedSize:t.length})}addHttpContent(e,t,n={}){return _i(this,e,{data:t,Reader:class extends Nn{constructor(e){super(e,n)}},options:n})}addReadable(e,t,n={}){return _i(this,e,{Reader:()=>({readable:t}),options:n})}addFileSystemEntry(e,t={}){return bi(this,e,t)}addFileSystemHandle(e,t={}){return bi(this,e,t)}addFile(e,t={}){return t.lastModDate||(t.lastModDate=new o(e.lastModified)),_i(this,e.name,{data:e,Reader:()=>({readable:e.stream(),size:e.size}),options:t,uncompressedSize:e.size})}addData(e,t){return _i(this,e,t)}importBlob(e,t){return this.importZip(new yn(e),t)}importData64URI(e,t){return this.importZip(new bn(e),t)}importUint8Array(e,t){return this.importZip(new Pn(e),t)}importHttpContent(e,t){return this.importZip(new Nn(e,t),t)}importReadable(e,t){return this.importZip({readable:e},t)}exportBlob(e={}){return this.exportZip(new _n(e.mimeType||"application/zip"),e)}exportData64URI(e={}){return this.exportZip(new vn(e.mimeType||"application/zip"),e)}exportUint8Array(e={}){return this.exportZip(new jn,e)}async exportWritable(e=new A,t={}){return await this.exportZip({writable:e},t),e}async importZip(e,t={}){await Bn(e);const r=new Er(e,t),i=[],s=await r.getEntries();for(const e of s){let r=this;try{const s=e.filename.split("/"),a=s.pop();s.forEach(((t,n)=>{const a=r;r=r.getChildByName(t),r||(r=new mi(this.fs,t,{data:n==s.length-1?e:null},a),i.push(r))})),e.directory||i.push(_i(r,a,{data:e,Reader:wi(n.assign({},t)),uncompressedSize:e.uncompressedSize}))}catch(t){try{t.cause={entry:e}}catch(e){}throw t}}return i}async exportZip(e,r){const i=this;r.bufferedWrite===Se&&(r.bufferedWrite=!0),await g.all([xi(i,r.readerOptions),Bn(e)]);const s=new ti(e,r);return await(async(e,r,i,s)=>{const a=r,o=new l;await async function e(r,l){async function c(l){const c=s.relativePath?l.getRelativeName(a):l.getFullname();let d=l.options||{},f={};if(l.data instanceof mr){const{externalFileAttribute:e,versionMadeBy:t,comment:n,lastModDate:r,creationDate:i,lastAccessDate:s}=l.data;f={externalFileAttribute:e,versionMadeBy:t,comment:n,lastModDate:r,creationDate:i,lastAccessDate:s}}await r.add(c,l.reader,n.assign({directory:l.directory},n.assign({},s,f,d,{onprogress:async e=>{if(s.onprogress){o.set(c,e);try{await s.onprogress(t.from(o.values()).reduce(((e,t)=>e+t)),i)}catch(e){}}}}))),await e(r,l)}await(async()=>{if(s.bufferedWrite)await g.allSettled(l.children.map(c));else for(const e of l.children)await c(e)})()}(e,r)})(s,i,(e=>{let t=0;return e.forEach((function e(n){t+=n.uncompressedSize,n.children&&n.children.forEach(e)})),t})([i]),r),await s.close(),e.getData?e.getData():e.writable}getChildByName(e){const t=this.children;for(let n=0;nn.checkPassword(e,t))))).includes(!1)}}const hi={FS:class{constructor(){yi(this)}get children(){return this.root.children}remove(e){gi(e),this.entries[e.id]=null}move(e,t){if(e==this.root)throw new u("Root directory cannot be moved");if(!t.directory)throw new u("Target entry is not a directory");if(t.isDescendantOf(e))throw new u("Entry is a ancestor of target entry");if(e!=t){if(t.getChildByName(e.name))throw new u("Entry filename already exists");gi(e),e.parent=t,t.children.push(e)}}find(e){const t=e.split("/");let n=this.root;for(let e=0;n&&e{if(e.directory)await xi(e,t);else{const n=e.reader=new e.Reader(e.data,t);try{await Bn(n)}catch(t){try{t.entryId=e.id,t.cause={entry:e}}catch(e){}throw t}e.uncompressedSize=n.size}})))}function gi(e){if(e.parent){const t=e.parent.children;t.forEach(((n,r)=>{n.id==e.id&&t.splice(r,1)}))}}async function bi(e,t,r){return async function e(t,i,s){if(i)try{if((i.isFile||i.isDirectory)&&(i=await vi(i)),"file"==i.kind){const e=await i.getFile();s.push(t.addData(e.name,{Reader:()=>({readable:e.stream(),size:e.size}),options:n.assign({},{lastModDate:new o(e.lastModified)},r),uncompressedSize:e.size}))}else if("directory"==i.kind){const n=t.addDirectory(i.name);s.push(n);for await(const t of i.values())await e(n,t,s)}}catch(e){const t=e.message+(i?" ("+i.name+")":"");throw new u(t)}return s}(e,t,[])}async function vi(e){const t={name:e.name};if(e.isFile&&(t.kind="file",t.getFile=()=>new g(((t,n)=>e.file(t,n)))),e.isDirectory){t.kind="directory";const n=await(async e=>{const t=[];function n(e,r,i){e.readEntries((async s=>{if(s.length){for(const e of s)t.push(await vi(e));n(e,r,i)}else r(t)}),i)}return await new g(((t,r)=>n(e.createReader(),t,r))),{[Symbol.iterator](){let e=0;return{next(){const n={value:t[e],done:e===t.length};return e++,n}}}}})(e);t.values=()=>n}return t}function yi(e){e.entries=[],e.root=new mi(e)}function _i(e,t,n,r){if(e.directory)return r?new mi(e.fs,t,n,e):new pi(e.fs,t,n,e);throw new u("Parent entry is not a directory")}let ki;try{ki=void 0===y&&"undefined"==typeof location?new(require("url").URL)("file:"+__filename).href:void 0===y?location.href:y.currentScript&&y.currentScript.src||new f("zip-fs-full.min.js",y.baseURI).href}catch(e){}qe({baseURL:ki}),(e=>{const t=()=>f.createObjectURL(new x(['const{Array:e,Object:t,Number:n,Math:r,Error:s,Uint8Array:i,Uint16Array:o,Uint32Array:c,Int32Array:f,Map:a,DataView:l,Promise:u,TextEncoder:w,crypto:h,postMessage:d,TransformStream:p,ReadableStream:y,WritableStream:m,CompressionStream:b,DecompressionStream:g}=self,k=void 0,v="undefined",S="function";class z{constructor(e){return class extends p{constructor(t,n){const r=new e(n);super({transform(e,t){t.enqueue(r.append(e))},flush(e){const t=r.flush();t&&e.enqueue(t)}})}}}}const C=[];for(let e=0;256>e;e++){let t=e;for(let e=0;8>e;e++)1&t?t=t>>>1^3988292384:t>>>=1;C[e]=t}class x{constructor(e){this.t=e||-1}append(e){let t=0|this.t;for(let n=0,r=0|e.length;r>n;n++)t=t>>>8^C[255&(t^e[n])];this.t=t}get(){return~this.t}}class A extends p{constructor(){let e;const t=new x;super({transform(e,n){t.append(e),n.enqueue(e)},flush(){const n=new i(4);new l(n.buffer).setUint32(0,t.get()),e.value=n}}),e=this}}const _={concat(e,t){if(0===e.length||0===t.length)return e.concat(t);const n=e[e.length-1],r=_.i(n);return 32===r?e.concat(t):_.o(t,r,0|n,e.slice(0,e.length-1))},l(e){const t=e.length;if(0===t)return 0;const n=e[t-1];return 32*(t-1)+_.i(n)},u(e,t){if(32*e.length0&&t&&(e[n-1]=_.h(t,e[n-1]&2147483648>>t-1,1)),e},h:(e,t,n)=>32===e?t:(n?0|t:t<<32-e)+1099511627776*e,i:e=>r.round(e/1099511627776)||32,o(e,t,n,r){for(void 0===r&&(r=[]);t>=32;t-=32)r.push(n),n=0;if(0===t)return r.concat(e);for(let s=0;s>>t),n=e[s]<<32-t;const s=e.length?e[e.length-1]:0,i=_.i(s);return r.push(_.h(t+i&31,t+i>32?n:r.pop(),1)),r}},I={p:{m(e){const t=_.l(e)/8,n=new i(t);let r;for(let s=0;t>s;s++)0==(3&s)&&(r=e[s/4]),n[s]=r>>>24,r<<=8;return n},g(e){const t=[];let n,r=0;for(n=0;n9007199254740991)throw new s("Cannot hash more than 2^53 - 1 bits");const o=new c(n);let f=0;for(let e=t.blockSize+r-(t.blockSize+r&t.blockSize-1);i>=e;e+=t.blockSize)t.I(o.subarray(16*f,16*(f+1))),f+=1;return n.splice(0,16*f),t}P(){const e=this;let t=e.C;const n=e.S;t=_.concat(t,[_.h(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(r.floor(e.A/4294967296)),t.push(0|e.A);t.length;)e.I(t.splice(0,16));return e.reset(),n}D(e,t,n,r){return e>19?e>39?e>59?e>79?void 0:t^n^r:t&n|t&r|n&r:t^n^r:t&n|~t&r}V(e,t){return t<>>32-e}I(t){const n=this,s=n.S,i=e(80);for(let e=0;16>e;e++)i[e]=t[e];let o=s[0],c=s[1],f=s[2],a=s[3],l=s[4];for(let e=0;79>=e;e++){16>e||(i[e]=n.V(1,i[e-3]^i[e-8]^i[e-14]^i[e-16]));const t=n.V(5,o)+n.D(e,c,f,a)+l+i[e]+n.v[r.floor(e/20)]|0;l=a,a=f,f=n.V(30,c),c=o,o=t}s[0]=s[0]+o|0,s[1]=s[1]+c|0,s[2]=s[2]+f|0,s[3]=s[3]+a|0,s[4]=s[4]+l|0}},D={getRandomValues(e){const t=new c(e.buffer),n=e=>{let t=987654321;const n=4294967295;return()=>(t=36969*(65535&t)+(t>>16)&n,(((t<<16)+(e=18e3*(65535&e)+(e>>16)&n)&n)/4294967296+.5)*(r.random()>.5?1:-1))};for(let s,i=0;inew V.R(I.p.g(e)),B(e,t,n,r){if(n=n||1e4,0>r||0>n)throw new s("invalid params to pbkdf2");const i=1+(r>>5)<<2;let o,c,f,a,u;const w=new ArrayBuffer(i),h=new l(w);let d=0;const p=_;for(t=I.p.g(t),u=1;(i||1)>d;u++){for(o=c=e.encrypt(p.concat(t,[u])),f=1;n>f;f++)for(c=e.encrypt(c),a=0;ad&&fs&&(e=(new n).update(e).P());for(let t=0;s>t;t++)r[0][t]=909522486^e[t],r[1][t]=1549556828^e[t];t.U[0].update(r[0]),t.U[1].update(r[1]),t.K=new n(t.U[0])}reset(){const e=this;e.K=new e.M(e.U[0]),e.N=!1}update(e){this.N=!0,this.K.update(e)}digest(){const e=this,t=e.K.P(),n=new e.M(e.U[1]).update(t).P();return e.reset(),n}encrypt(e){if(this.N)throw new s("encrypt on already updated hmac called!");return this.update(e),this.digest(e)}}},R=typeof h!=v&&typeof h.getRandomValues==S,B="Invalid password",E="Invalid signature",M="zipjs-abort-check-password";function U(e){return R?h.getRandomValues(e):D.getRandomValues(e)}const K=16,N={name:"PBKDF2"},O=t.assign({hash:{name:"HMAC"}},N),T=t.assign({iterations:1e3,hash:{name:"SHA-1"}},N),W=["deriveBits"],j=[8,12,16],H=[16,24,32],L=10,F=[0,0,0,0],q=typeof h!=v,G=q&&h.subtle,J=q&&typeof G!=v,Q=I.p,X=class{constructor(e){const t=this;t.O=[[[],[],[],[],[]],[[],[],[],[],[]]],t.O[0][0][0]||t.T();const n=t.O[0][4],r=t.O[1],i=e.length;let o,c,f,a=1;if(4!==i&&6!==i&&8!==i)throw new s("invalid aes key size");for(t.v=[c=e.slice(0),f=[]],o=i;4*i+28>o;o++){let e=c[o-1];(o%i==0||8===i&&o%i==4)&&(e=n[e>>>24]<<24^n[e>>16&255]<<16^n[e>>8&255]<<8^n[255&e],o%i==0&&(e=e<<8^e>>>24^a<<24,a=a<<1^283*(a>>7))),c[o]=c[o-i]^e}for(let e=0;o;e++,o--){const t=c[3&e?o:o-4];f[e]=4>=o||4>e?t:r[0][n[t>>>24]]^r[1][n[t>>16&255]]^r[2][n[t>>8&255]]^r[3][n[255&t]]}}encrypt(e){return this.W(e,0)}decrypt(e){return this.W(e,1)}T(){const e=this.O[0],t=this.O[1],n=e[4],r=t[4],s=[],i=[];let o,c,f,a;for(let e=0;256>e;e++)i[(s[e]=e<<1^283*(e>>7))^e]=e;for(let l=o=0;!n[l];l^=c||1,o=i[o]||1){let i=o^o<<1^o<<2^o<<3^o<<4;i=i>>8^255&i^99,n[l]=i,r[i]=l,a=s[f=s[c=s[l]]];let u=16843009*a^65537*f^257*c^16843008*l,w=257*s[i]^16843008*i;for(let n=0;4>n;n++)e[n][l]=w=w<<24^w>>>8,t[n][i]=u=u<<24^u>>>8}for(let n=0;5>n;n++)e[n]=e[n].slice(0),t[n]=t[n].slice(0)}W(e,t){if(4!==e.length)throw new s("invalid aes block size");const n=this.v[t],r=n.length/4-2,i=[0,0,0,0],o=this.O[t],c=o[0],f=o[1],a=o[2],l=o[3],u=o[4];let w,h,d,p=e[0]^n[0],y=e[t?3:1]^n[1],m=e[2]^n[2],b=e[t?1:3]^n[3],g=4;for(let e=0;r>e;e++)w=c[p>>>24]^f[y>>16&255]^a[m>>8&255]^l[255&b]^n[g],h=c[y>>>24]^f[m>>16&255]^a[b>>8&255]^l[255&p]^n[g+1],d=c[m>>>24]^f[b>>16&255]^a[p>>8&255]^l[255&y]^n[g+2],b=c[b>>>24]^f[p>>16&255]^a[y>>8&255]^l[255&m]^n[g+3],g+=4,p=w,y=h,m=d;for(let e=0;4>e;e++)i[t?3&-e:e]=u[p>>>24]<<24^u[y>>16&255]<<16^u[m>>8&255]<<8^u[255&b]^n[g++],w=p,p=y,y=m,m=b,b=w;return i}},Y=class{constructor(e,t){this.j=e,this.H=t,this.L=t}reset(){this.L=this.H}update(e){return this.F(this.j,e,this.L)}q(e){if(255==(e>>24&255)){let t=e>>16&255,n=e>>8&255,r=255&e;255===t?(t=0,255===n?(n=0,255===r?r=0:++r):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=r}else e+=1<<24;return e}G(e){0===(e[0]=this.q(e[0]))&&(e[1]=this.q(e[1]))}F(e,t,n){let r;if(!(r=t.length))return[];const s=_.l(t);for(let s=0;r>s;s+=4){this.G(n);const r=e.encrypt(n);t[s]^=r[0],t[s+1]^=r[1],t[s+2]^=r[2],t[s+3]^=r[3]}return _.u(t,s)}},Z=V.R;let $=q&&J&&typeof G.importKey==S,ee=q&&J&&typeof G.deriveBits==S;class te extends p{constructor({password:e,rawPassword:n,signed:r,encryptionStrength:o,checkPasswordOnly:c}){super({start(){t.assign(this,{ready:new u((e=>this.J=e)),password:ie(e,n),signed:r,X:o-1,pending:new i})},async transform(e,t){const n=this,{password:r,X:o,J:f,ready:a}=n;r?(await(async(e,t,n,r)=>{const i=await se(e,t,n,ce(r,0,j[t])),o=ce(r,j[t]);if(i[0]!=o[0]||i[1]!=o[1])throw new s(B)})(n,o,r,ce(e,0,j[o]+2)),e=ce(e,j[o]+2),c?t.error(new s(M)):f()):await a;const l=new i(e.length-L-(e.length-L)%K);t.enqueue(re(n,e,l,0,L,!0))},async flush(e){const{signed:t,Y:n,Z:r,pending:o,ready:c}=this;if(r&&n){await c;const f=ce(o,0,o.length-L),a=ce(o,o.length-L);let l=new i;if(f.length){const e=ae(Q,f);r.update(e);const t=n.update(e);l=fe(Q,t)}if(t){const e=ce(fe(Q,r.digest()),0,L);for(let t=0;L>t;t++)if(e[t]!=a[t])throw new s(E)}e.enqueue(l)}}})}}class ne extends p{constructor({password:e,rawPassword:n,encryptionStrength:r}){let s;super({start(){t.assign(this,{ready:new u((e=>this.J=e)),password:ie(e,n),X:r-1,pending:new i})},async transform(e,t){const n=this,{password:r,X:s,J:o,ready:c}=n;let f=new i;r?(f=await(async(e,t,n)=>{const r=U(new i(j[t]));return oe(r,await se(e,t,n,r))})(n,s,r),o()):await c;const a=new i(f.length+e.length-e.length%K);a.set(f,0),t.enqueue(re(n,e,a,f.length,0))},async flush(e){const{Y:t,Z:n,pending:r,ready:o}=this;if(n&&t){await o;let c=new i;if(r.length){const e=t.update(ae(Q,r));n.update(e),c=fe(Q,e)}s.signature=fe(Q,n.digest()).slice(0,L),e.enqueue(oe(c,s.signature))}}}),s=this}}function re(e,t,n,r,s,o){const{Y:c,Z:f,pending:a}=e,l=t.length-s;let u;for(a.length&&(t=oe(a,t),n=((e,t)=>{if(t&&t>e.length){const n=e;(e=new i(t)).set(n,0)}return e})(n,l-l%K)),u=0;l-K>=u;u+=K){const e=ae(Q,ce(t,u,u+K));o&&f.update(e);const s=c.update(e);o||f.update(s),n.set(fe(Q,s),u+r)}return e.pending=ce(t,u),n}async function se(n,r,s,o){n.password=null;const c=await(async(e,t,n,r,s)=>{if(!$)return V.importKey(t);try{return await G.importKey("raw",t,n,!1,s)}catch(e){return $=!1,V.importKey(t)}})(0,s,O,0,W),f=await(async(e,t,n)=>{if(!ee)return V.B(t,e.salt,T.iterations,n);try{return await G.deriveBits(e,t,n)}catch(r){return ee=!1,V.B(t,e.salt,T.iterations,n)}})(t.assign({salt:o},T),c,8*(2*H[r]+2)),a=new i(f),l=ae(Q,ce(a,0,H[r])),u=ae(Q,ce(a,H[r],2*H[r])),w=ce(a,2*H[r]);return t.assign(n,{keys:{key:l,$:u,passwordVerification:w},Y:new Y(new X(l),e.from(F)),Z:new Z(u)}),w}function ie(e,t){return t===k?(e=>{if(typeof w==v){const t=new i((e=unescape(encodeURIComponent(e))).length);for(let n=0;n>>24]),i=~e.te.get(),e.keys=[n,s,i]}function ye(e){const t=2|e.keys[2];return me(r.imul(t,1^t)>>>8)}function me(e){return 255&e}function be(e){return 4294967295&e}const ge="deflate-raw";class ke extends p{constructor(e,{chunkSize:t,CompressionStream:n,CompressionStreamNative:r}){super({});const{compressed:s,encrypted:i,useCompressionStream:o,zipCrypto:c,signed:f,level:a}=e,u=this;let w,h,d=Se(super.readable);i&&!c||!f||(w=new A,d=xe(d,w)),s&&(d=Ce(d,o,{level:a,chunkSize:t},r,n)),i&&(c?d=xe(d,new ue(e)):(h=new ne(e),d=xe(d,h))),ze(u,d,(()=>{let e;i&&!c&&(e=h.signature),i&&!c||!f||(e=new l(w.value.buffer).getUint32(0)),u.signature=e}))}}class ve extends p{constructor(e,{chunkSize:t,DecompressionStream:n,DecompressionStreamNative:r}){super({});const{zipCrypto:i,encrypted:o,signed:c,signature:f,compressed:a,useCompressionStream:u}=e;let w,h,d=Se(super.readable);o&&(i?d=xe(d,new le(e)):(h=new te(e),d=xe(d,h))),a&&(d=Ce(d,u,{chunkSize:t},r,n)),o&&!i||!c||(w=new A,d=xe(d,w)),ze(this,d,(()=>{if((!o||i)&&c){const e=new l(w.value.buffer);if(f!=e.getUint32(0,!1))throw new s(E)}}))}}function Se(e){return xe(e,new p({transform(e,t){e&&e.length&&t.enqueue(e)}}))}function ze(e,n,r){n=xe(n,new p({flush:r})),t.defineProperty(e,"readable",{get:()=>n})}function Ce(e,t,n,r,s){try{e=xe(e,new(t&&r?r:s)(ge,n))}catch(r){if(!t)return e;try{e=xe(e,new s(ge,n))}catch(t){return e}}return e}function xe(e,t){return e.pipeThrough(t)}const Ae="data",_e="close";class Ie extends p{constructor(e,n){super({});const r=this,{codecType:s}=e;let i;s.startsWith("deflate")?i=ke:s.startsWith("inflate")&&(i=ve);let o=0,c=0;const f=new i(e,n),a=super.readable,l=new p({transform(e,t){e&&e.length&&(c+=e.length,t.enqueue(e))},flush(){t.assign(r,{inputSize:c})}}),u=new p({transform(e,t){e&&e.length&&(o+=e.length,t.enqueue(e))},flush(){const{signature:e}=f;t.assign(r,{signature:e,outputSize:o,inputSize:c})}});t.defineProperty(r,"readable",{get:()=>a.pipeThrough(l).pipeThrough(f).pipeThrough(u)})}}class Pe extends p{constructor(e){let t;super({transform:function n(r,s){if(t){const e=new i(t.length+r.length);e.set(t),e.set(r,t.length),r=e,t=null}r.length>e?(s.enqueue(r.slice(0,e)),n(r.slice(e),s)):t=r},flush(e){t&&t.length&&e.enqueue(t)}})}}const De=new a,Ve=new a;let Re,Be=0,Ee=!0;async function Me(e){try{const{options:t,scripts:r,config:s}=e;if(r&&r.length)try{Ee?importScripts.apply(k,r):await Ue(r)}catch(e){Ee=!1,await Ue(r)}self.initCodec&&self.initCodec(),s.CompressionStreamNative=self.CompressionStream,s.DecompressionStreamNative=self.DecompressionStream,self.Deflate&&(s.CompressionStream=new z(self.Deflate)),self.Inflate&&(s.DecompressionStream=new z(self.Inflate));const i={highWaterMark:1},o=e.readable||new y({async pull(e){const t=new u((e=>De.set(Be,e)));Ke({type:"pull",messageId:Be}),Be=(Be+1)%n.MAX_SAFE_INTEGER;const{value:r,done:s}=await t;e.enqueue(r),s&&e.close()}},i),c=e.writable||new m({async write(e){let t;const r=new u((e=>t=e));Ve.set(Be,t),Ke({type:Ae,value:e,messageId:Be}),Be=(Be+1)%n.MAX_SAFE_INTEGER,await r}},i),f=new Ie(t,s);Re=new AbortController;const{signal:a}=Re;await o.pipeThrough(f).pipeThrough(new Pe(s.chunkSize)).pipeTo(c,{signal:a,preventClose:!0,preventAbort:!0}),await c.getWriter().close();const{signature:l,inputSize:w,outputSize:h}=f;Ke({type:_e,result:{signature:l,inputSize:w,outputSize:h}})}catch(e){Ne(e)}}async function Ue(e){for(const t of e)await import(t)}function Ke(e){let{value:t}=e;if(t)if(t.length)try{t=new i(t),e.value=t.buffer,d(e,[e.value])}catch(t){d(e)}else d(e);else d(e)}function Ne(e=new s("Unknown error")){const{message:t,stack:n,code:r,name:i}=e;d({error:{message:t,stack:n,code:r,name:i}})}addEventListener("message",(({data:e})=>{const{type:t,messageId:n,value:r,done:s}=e;try{if("start"==t&&Me(e),t==Ae){const e=De.get(n);De.delete(n),e({value:new i(r),done:s})}if("ack"==t){const e=Ve.get(n);Ve.delete(n),e()}t==_e&&Re.abort()}catch(e){Ne(e)}}));const Oe=-2;function Te(t){return We(t.map((([t,n])=>new e(t).fill(n,0,t))))}function We(t){return t.reduce(((t,n)=>t.concat(e.isArray(n)?We(n):n)),[])}const je=[0,1,2,3].concat(...Te([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function He(){const e=this;function t(e,t){let n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1}e.ne=n=>{const s=e.re,i=e.ie.se,o=e.ie.oe;let c,f,a,l=-1;for(n.ce=0,n.fe=573,c=0;o>c;c++)0!==s[2*c]?(n.ae[++n.ce]=l=c,n.le[c]=0):s[2*c+1]=0;for(;2>n.ce;)a=n.ae[++n.ce]=2>l?++l:0,s[2*a]=1,n.le[a]=0,n.ue--,i&&(n.we-=i[2*a+1]);for(e.he=l,c=r.floor(n.ce/2);c>=1;c--)n.de(s,c);a=o;do{c=n.ae[1],n.ae[1]=n.ae[n.ce--],n.de(s,1),f=n.ae[1],n.ae[--n.fe]=c,n.ae[--n.fe]=f,s[2*a]=s[2*c]+s[2*f],n.le[a]=r.max(n.le[c],n.le[f])+1,s[2*c+1]=s[2*f+1]=a,n.ae[1]=a++,n.de(s,1)}while(n.ce>=2);n.ae[--n.fe]=n.ae[1],(t=>{const n=e.re,r=e.ie.se,s=e.ie.pe,i=e.ie.ye,o=e.ie.me;let c,f,a,l,u,w,h=0;for(l=0;15>=l;l++)t.be[l]=0;for(n[2*t.ae[t.fe]+1]=0,c=t.fe+1;573>c;c++)f=t.ae[c],l=n[2*n[2*f+1]+1]+1,l>o&&(l=o,h++),n[2*f+1]=l,f>e.he||(t.be[l]++,u=0,i>f||(u=s[f-i]),w=n[2*f],t.ue+=w*(l+u),r&&(t.we+=w*(r[2*f+1]+u)));if(0!==h){do{for(l=o-1;0===t.be[l];)l--;t.be[l]--,t.be[l+1]+=2,t.be[o]--,h-=2}while(h>0);for(l=o;0!==l;l--)for(f=t.be[l];0!==f;)a=t.ae[--c],a>e.he||(n[2*a+1]!=l&&(t.ue+=(l-n[2*a+1])*n[2*a],n[2*a+1]=l),f--)}})(n),((e,n,r)=>{const s=[];let i,o,c,f=0;for(i=1;15>=i;i++)s[i]=f=f+r[i-1]<<1;for(o=0;n>=o;o++)c=e[2*o+1],0!==c&&(e[2*o]=t(s[c]++,c))})(s,e.he,n.be)}}function Le(e,t,n,r,s){const i=this;i.se=e,i.pe=t,i.ye=n,i.oe=r,i.me=s}He.ge=[0,1,2,3,4,5,6,7].concat(...Te([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]])),He.ke=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0],He.ve=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576],He.Se=e=>256>e?je[e]:je[256+(e>>>7)],He.ze=[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],He.Ce=[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],He.xe=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],He.Ae=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];const Fe=Te([[144,8],[112,9],[24,7],[8,8]]);Le._e=We([12,140,76,204,44,172,108,236,28,156,92,220,60,188,124,252,2,130,66,194,34,162,98,226,18,146,82,210,50,178,114,242,10,138,74,202,42,170,106,234,26,154,90,218,58,186,122,250,6,134,70,198,38,166,102,230,22,150,86,214,54,182,118,246,14,142,78,206,46,174,110,238,30,158,94,222,62,190,126,254,1,129,65,193,33,161,97,225,17,145,81,209,49,177,113,241,9,137,73,201,41,169,105,233,25,153,89,217,57,185,121,249,5,133,69,197,37,165,101,229,21,149,85,213,53,181,117,245,13,141,77,205,45,173,109,237,29,157,93,221,61,189,125,253,19,275,147,403,83,339,211,467,51,307,179,435,115,371,243,499,11,267,139,395,75,331,203,459,43,299,171,427,107,363,235,491,27,283,155,411,91,347,219,475,59,315,187,443,123,379,251,507,7,263,135,391,71,327,199,455,39,295,167,423,103,359,231,487,23,279,151,407,87,343,215,471,55,311,183,439,119,375,247,503,15,271,143,399,79,335,207,463,47,303,175,431,111,367,239,495,31,287,159,415,95,351,223,479,63,319,191,447,127,383,255,511,0,64,32,96,16,80,48,112,8,72,40,104,24,88,56,120,4,68,36,100,20,84,52,116,3,131,67,195,35,163,99,227].map(((e,t)=>[e,Fe[t]])));const qe=Te([[30,5]]);function Ge(e,t,n,r,s){const i=this;i.Ie=e,i.Pe=t,i.De=n,i.Ve=r,i.Re=s}Le.Be=We([0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30,1,17,9,25,5,21,13,29,3,19,11,27,7,23].map(((e,t)=>[e,qe[t]]))),Le.Ee=new Le(Le._e,He.ze,257,286,15),Le.Me=new Le(Le.Be,He.Ce,0,30,15),Le.Ue=new Le(null,He.xe,0,19,7);const Je=[new Ge(0,0,0,0,0),new Ge(4,4,8,4,1),new Ge(4,5,16,8,1),new Ge(4,6,32,32,1),new Ge(4,4,16,16,2),new Ge(8,16,32,32,2),new Ge(8,16,128,128,2),new Ge(8,32,128,256,2),new Ge(32,128,258,1024,2),new Ge(32,258,258,4096,2)],Qe=["need dictionary","stream end","","","stream error","data error","","buffer error","",""],Xe=113,Ye=666,Ze=262;function $e(e,t,n,r){const s=e[2*t],i=e[2*n];return i>s||s==i&&r[t]<=r[n]}function et(){const e=this;let t,n,s,c,f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z,C,x,A,_,I,P,D,V,R,B,E,M,U;const K=new He,N=new He,O=new He;let T,W,j,H,L,F;function q(){let t;for(t=0;286>t;t++)E[2*t]=0;for(t=0;30>t;t++)M[2*t]=0;for(t=0;19>t;t++)U[2*t]=0;E[512]=1,e.ue=e.we=0,W=j=0}function G(e,t){let n,r=-1,s=e[1],i=0,o=7,c=4;0===s&&(o=138,c=3),e[2*(t+1)+1]=65535;for(let f=0;t>=f;f++)n=s,s=e[2*(f+1)+1],++ii?U[2*n]+=i:0!==n?(n!=r&&U[2*n]++,U[32]++):i>10?U[36]++:U[34]++,i=0,r=n,0===s?(o=138,c=3):n==s?(o=6,c=3):(o=7,c=4))}function J(t){e.Ke[e.pending++]=t}function Q(e){J(255&e),J(e>>>8&255)}function X(e,t){let n;const r=t;F>16-r?(n=e,L|=n<>>16-F,F+=r-16):(L|=e<=n;n++)if(r=i,i=e[2*(n+1)+1],++o>=c||r!=i){if(f>o)do{Y(r,U)}while(0!=--o);else 0!==r?(r!=s&&(Y(r,U),o--),Y(16,U),X(o-3,2)):o>10?(Y(18,U),X(o-11,7)):(Y(17,U),X(o-3,3));o=0,s=r,0===i?(c=138,f=3):r==i?(c=6,f=3):(c=7,f=4)}}function $(){16==F?(Q(L),L=0,F=0):8>F||(J(255&L),L>>>=8,F-=8)}function ee(t,n){let s,i,o;if(e.Ne[W]=t,e.Oe[W]=255&n,W++,0===t?E[2*n]++:(j++,t--,E[2*(He.ge[n]+256+1)]++,M[2*He.Se(t)]++),0==(8191&W)&&D>2){for(s=8*W,i=C-k,o=0;30>o;o++)s+=M[2*o]*(5+He.Ce[o]);if(s>>>=3,jc);Y(256,t),H=t[513]}function ne(){F>8?Q(L):F>0&&J(255&L),L=0,F=0}function re(t,n,r){X(0+(r?1:0),3),((t,n)=>{ne(),H=8,Q(n),Q(~n),e.Ke.set(u.subarray(t,t+n),e.pending),e.pending+=n})(t,n)}function se(n){((t,n,r)=>{let s,i,o=0;D>0?(K.ne(e),N.ne(e),o=(()=>{let t;for(G(E,K.he),G(M,N.he),O.ne(e),t=18;t>=3&&0===U[2*He.Ae[t]+1];t--);return e.ue+=14+3*(t+1),t})(),s=e.ue+3+7>>>3,i=e.we+3+7>>>3,i>s||(s=i)):s=i=n+5,n+4>s||-1==t?i==s?(X(2+(r?1:0),3),te(Le._e,Le.Be)):(X(4+(r?1:0),3),((e,t,n)=>{let r;for(X(e-257,5),X(t-1,5),X(n-4,4),r=0;n>r;r++)X(U[2*He.Ae[r]+1],3);Z(E,e-1),Z(M,t-1)})(K.he+1,N.he+1,o+1),te(E,M)):re(t,n,r),q(),r&&ne()})(0>k?-1:k,C-k,n),k=C,t.Te()}function ie(){let e,n,r,s;do{if(s=w-A-C,0===s&&0===C&&0===A)s=f;else if(-1==s)s--;else if(C>=f+f-Ze){u.set(u.subarray(f,f+f),0),x-=f,C-=f,k-=f,e=y,r=e;do{n=65535&d[--r],d[r]=f>n?0:n-f}while(0!=--e);e=f,r=e;do{n=65535&h[--r],h[r]=f>n?0:n-f}while(0!=--e);s+=f}if(0===t.We)return;e=t.je(u,C+A,s),A+=e,3>A||(p=255&u[C],p=(p<A&&0!==t.We)}function oe(e){let t,n,r=I,s=C,i=_;const o=C>f-Ze?C-(f-Ze):0;let c=B;const a=l,w=C+258;let d=u[s+i-1],p=u[s+i];R>_||(r>>=2),c>A&&(c=A);do{if(t=e,u[t+i]==p&&u[t+i-1]==d&&u[t]==u[s]&&u[++t]==u[s+1]){s+=2,t++;do{}while(u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&w>s);if(n=258-(w-s),s=w-258,n>i){if(x=e,i=n,n>=c)break;d=u[s+i-1],p=u[s+i]}}}while((e=65535&h[e&a])>o&&0!=--r);return i>A?A:i}e.le=[],e.be=[],e.ae=[],E=[],M=[],U=[],e.de=(t,n)=>{const r=e.ae,s=r[n];let i=n<<1;for(;i<=e.ce&&(i(W||(W=8),j||(j=8),G||(G=0),t.Le=null,-1==S&&(S=6),1>j||j>9||8!=W||9>x||x>15||0>S||S>9||0>G||G>2?Oe:(t.Fe=e,a=x,f=1<(t.qe=t.Ge=0,t.Le=null,e.pending=0,e.Je=0,n=Xe,c=0,K.re=E,K.ie=Le.Ee,N.re=M,N.ie=Le.Me,O.re=U,O.ie=Le.Ue,L=0,F=0,H=8,q(),(()=>{w=2*f,d[y-1]=0;for(let e=0;y-1>e;e++)d[e]=0;P=Je[D].Pe,R=Je[D].Ie,B=Je[D].De,I=Je[D].Ve,C=0,k=0,A=0,v=_=2,z=0,p=0})(),0))(t))),e.Qe=()=>42!=n&&n!=Xe&&n!=Ye?Oe:(e.Oe=null,e.Ne=null,e.Ke=null,d=null,h=null,u=null,e.Fe=null,n==Xe?-3:0),e.Xe=(e,t,n)=>{let r=0;return-1==t&&(t=6),0>t||t>9||0>n||n>2?Oe:(Je[D].Re!=Je[t].Re&&0!==e.qe&&(r=e.Ye(1)),D!=t&&(D=t,P=Je[D].Pe,R=Je[D].Ie,B=Je[D].De,I=Je[D].Ve),V=n,r)},e.Ze=(e,t,r)=>{let s,i=r,o=0;if(!t||42!=n)return Oe;if(3>i)return 0;for(i>f-Ze&&(i=f-Ze,o=r-i),u.set(t.subarray(o,o+i),0),C=i,k=i,p=255&u[0],p=(p<=s;s++)p=(p<{let o,w,m,I,R;if(i>4||0>i)return Oe;if(!r.$e||!r.et&&0!==r.We||n==Ye&&4!=i)return r.Le=Qe[4],Oe;if(0===r.tt)return r.Le=Qe[7],-5;var B;if(t=r,I=c,c=i,42==n&&(w=8+(a-8<<4)<<8,m=(D-1&255)>>1,m>3&&(m=3),w|=m<<6,0!==C&&(w|=32),w+=31-w%31,n=Xe,J((B=w)>>8&255),J(255&B)),0!==e.pending){if(t.Te(),0===t.tt)return c=-1,0}else if(0===t.We&&I>=i&&4!=i)return t.Le=Qe[7],-5;if(n==Ye&&0!==t.We)return r.Le=Qe[7],-5;if(0!==t.We||0!==A||0!=i&&n!=Ye){switch(R=-1,Je[D].Re){case 0:R=(e=>{let n,r=65535;for(r>s-5&&(r=s-5);;){if(1>=A){if(ie(),0===A&&0==e)return 0;if(0===A)break}if(C+=A,A=0,n=k+r,(0===C||C>=n)&&(A=C-n,C=n,se(!1),0===t.tt))return 0;if(C-k>=f-Ze&&(se(!1),0===t.tt))return 0}return se(4==e),0===t.tt?4==e?2:0:4==e?3:1})(i);break;case 1:R=(e=>{let n,r=0;for(;;){if(Ze>A){if(ie(),Ze>A&&0==e)return 0;if(0===A)break}if(3>A||(p=(p<f-Ze||2!=V&&(v=oe(r)),3>v)n=ee(0,255&u[C]),A--,C++;else if(n=ee(C-x,v-3),A-=v,v>P||3>A)C+=v,v=0,p=255&u[C],p=(p<{let n,r,s=0;for(;;){if(Ze>A){if(ie(),Ze>A&&0==e)return 0;if(0===A)break}if(3>A||(p=(p<_&&f-Ze>=(C-s&65535)&&(2!=V&&(v=oe(s)),5>=v&&(1==V||3==v&&C-x>4096)&&(v=2)),3>_||v>_)if(0!==z){if(n=ee(0,255&u[C-1]),n&&se(!1),C++,A--,0===t.tt)return 0}else z=1,C++,A--;else{r=C+A-3,n=ee(C-1-S,_-3),A-=_-1,_-=2;do{++C>r||(p=(p<1+H+10-F&&(X(2,3),Y(256,Le._e),$()),H=7;else if(re(0,0,!1),3==i)for(o=0;y>o;o++)d[o]=0;if(t.Te(),0===t.tt)return c=-1,0}}return 4!=i?0:1}}function tt(){const e=this;e.nt=0,e.rt=0,e.We=0,e.qe=0,e.tt=0,e.Ge=0}function nt(e){const t=new tt,n=(o=e&&e.chunkSize?e.chunkSize:65536)+5*(r.floor(o/16383)+1);var o;const c=new i(n);let f=e?e.level:-1;void 0===f&&(f=-1),t.He(f),t.$e=c,this.append=(e,r)=>{let o,f,a=0,l=0,u=0;const w=[];if(e.length){t.nt=0,t.et=e,t.We=e.length;do{if(t.rt=0,t.tt=n,o=t.Ye(0),0!=o)throw new s("deflating: "+t.Le);t.rt&&(t.rt==n?w.push(new i(c)):w.push(c.subarray(0,t.rt))),u+=t.rt,r&&t.nt>0&&t.nt!=a&&(r(t.nt),a=t.nt)}while(t.We>0||0===t.tt);return w.length>1?(f=new i(u),w.forEach((e=>{f.set(e,l),l+=e.length}))):f=w[0]?new i(w[0]):new i,f}},this.flush=()=>{let e,r,o=0,f=0;const a=[];do{if(t.rt=0,t.tt=n,e=t.Ye(4),1!=e&&0!=e)throw new s("deflating: "+t.Le);n-t.tt>0&&a.push(c.slice(0,t.rt)),f+=t.rt}while(t.We>0||0===t.tt);return t.Qe(),r=new i(f),a.forEach((e=>{r.set(e,o),o+=e.length})),r}}tt.prototype={He(e,t){const n=this;return n.Fe=new et,t||(t=15),n.Fe.He(n,e,t)},Ye(e){const t=this;return t.Fe?t.Fe.Ye(t,e):Oe},Qe(){const e=this;if(!e.Fe)return Oe;const t=e.Fe.Qe();return e.Fe=null,t},Xe(e,t){const n=this;return n.Fe?n.Fe.Xe(n,e,t):Oe},Ze(e,t){const n=this;return n.Fe?n.Fe.Ze(n,e,t):Oe},je(e,t,n){const r=this;let s=r.We;return s>n&&(s=n),0===s?0:(r.We-=s,e.set(r.et.subarray(r.nt,r.nt+s),t),r.nt+=s,r.qe+=s,s)},Te(){const e=this;let t=e.Fe.pending;t>e.tt&&(t=e.tt),0!==t&&(e.$e.set(e.Fe.Ke.subarray(e.Fe.Je,e.Fe.Je+t),e.rt),e.rt+=t,e.Fe.Je+=t,e.Ge+=t,e.tt-=t,e.Fe.pending-=t,0===e.Fe.pending&&(e.Fe.Je=0))}};const rt=-2,st=-3,it=-5,ot=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],ct=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],ft=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],at=[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,0,0],lt=[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,112,112],ut=[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],wt=[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];function ht(){let e,t,n,r,s,i;function o(e,t,o,c,f,a,l,u,w,h,d){let p,y,m,b,g,k,v,S,z,C,x,A,_,I,P;C=0,g=o;do{n[e[t+C]]++,C++,g--}while(0!==g);if(n[0]==o)return l[0]=-1,u[0]=0,0;for(S=u[0],k=1;15>=k&&0===n[k];k++);for(v=k,k>S&&(S=k),g=15;0!==g&&0===n[g];g--);for(m=g,S>g&&(S=g),u[0]=S,I=1<k;k++,I<<=1)if(0>(I-=n[k]))return st;if(0>(I-=n[g]))return st;for(n[g]+=I,i[1]=k=0,C=1,_=2;0!=--g;)i[_]=k+=n[C],_++,C++;g=0,C=0;do{0!==(k=e[t+C])&&(d[i[k]++]=g),C++}while(++g=v;v++)for(p=n[v];0!=p--;){for(;v>A+S;){if(b++,A+=S,P=m-A,P=P>S?S:P,(y=1<<(k=v-A))>p+1&&(y-=p+1,_=v,P>k))for(;++kn[++_];)y-=n[_];if(P=1<1440)return st;s[b]=x=h[0],h[0]+=P,0!==b?(i[b]=g,r[0]=k,r[1]=S,k=g>>>A-S,r[2]=x-s[b-1]-k,w.set(r,3*(s[b-1]+k))):l[0]=x}for(r[1]=v-A,o>C?d[C]d[C]?0:96,r[2]=d[C++]):(r[0]=a[d[C]-c]+16+64,r[2]=f[d[C++]-c]):r[0]=192,y=1<>>A;P>k;k+=y)w.set(r,3*(x+k));for(k=1<>>=1)g^=k;for(g^=k,z=(1<c;c++)t[c]=0;for(c=0;16>c;c++)n[c]=0;for(c=0;3>c;c++)r[c]=0;s.set(n.subarray(0,15),0),i.set(n.subarray(0,16),0)}this.st=(n,r,s,i,f)=>{let a;return c(19),e[0]=0,a=o(n,0,19,19,null,null,s,r,i,e,t),a==st?f.Le="oversubscribed dynamic bit lengths tree":a!=it&&0!==r[0]||(f.Le="incomplete dynamic bit lengths tree",a=st),a},this.it=(n,r,s,i,f,a,l,u,w)=>{let h;return c(288),e[0]=0,h=o(s,0,n,257,at,lt,a,i,u,e,t),0!=h||0===i[0]?(h==st?w.Le="oversubscribed literal/length tree":-4!=h&&(w.Le="incomplete literal/length tree",h=st),h):(c(288),h=o(s,n,r,0,ut,wt,l,f,u,e,t),0!=h||0===f[0]&&n>257?(h==st?w.Le="oversubscribed distance tree":h==it?(w.Le="incomplete distance tree",h=st):-4!=h&&(w.Le="empty distance tree with lengths",h=st),h):0)}}function dt(){const e=this;let t,n,r,s,i=0,o=0,c=0,f=0,a=0,l=0,u=0,w=0,h=0,d=0;function p(e,t,n,r,s,i,o,c){let f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z;d=c.nt,p=c.We,w=o.ot,h=o.ct,y=o.write,m=yh;)p--,w|=(255&c.ft(d++))<>=a[z+1],h-=a[z+1],0!=(16&u)){for(u&=15,k=a[z+2]+(w&ot[u]),w>>=u,h-=u;15>h;)p--,w|=(255&c.ft(d++))<>=a[z+1],h-=a[z+1],0!=(16&u)){for(u&=15;u>h;)p--,w|=(255&c.ft(d++))<>=u,h-=u,m-=k,v>y){S=y-v;do{S+=o.end}while(0>S);if(u=o.end-S,k>u){if(k-=u,y-S>0&&u>y-S)do{o.lt[y++]=o.lt[S++]}while(0!=--u);else o.lt.set(o.lt.subarray(S,S+u),y),y+=u,S+=u,u=0;S=0}}else S=y-v,y-S>0&&2>y-S?(o.lt[y++]=o.lt[S++],o.lt[y++]=o.lt[S++],k-=2):(o.lt.set(o.lt.subarray(S,S+2),y),y+=2,S+=2,k-=2);if(y-S>0&&k>y-S)do{o.lt[y++]=o.lt[S++]}while(0!=--k);else o.lt.set(o.lt.subarray(S,S+k),y),y+=k,S+=k,k=0;break}if(0!=(64&u))return c.Le="invalid distance code",k=c.We-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ot=w,o.ct=h,c.We=p,c.qe+=d-c.nt,c.nt=d,o.write=y,st;f+=a[z+2],f+=w&ot[u],z=3*(l+f),u=a[z]}break}if(0!=(64&u))return 0!=(32&u)?(k=c.We-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ot=w,o.ct=h,c.We=p,c.qe+=d-c.nt,c.nt=d,o.write=y,1):(c.Le="invalid literal/length code",k=c.We-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ot=w,o.ct=h,c.We=p,c.qe+=d-c.nt,c.nt=d,o.write=y,st);if(f+=a[z+2],f+=w&ot[u],z=3*(l+f),0===(u=a[z])){w>>=a[z+1],h-=a[z+1],o.lt[y++]=a[z+2],m--;break}}else w>>=a[z+1],h-=a[z+1],o.lt[y++]=a[z+2],m--}while(m>=258&&p>=10);return k=c.We-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ot=w,o.ct=h,c.We=p,c.qe+=d-c.nt,c.nt=d,o.write=y,0}e.init=(e,i,o,c,f,a)=>{t=0,u=e,w=i,r=o,h=c,s=f,d=a,n=null},e.ut=(e,y,m)=>{let b,g,k,v,S,z,C,x=0,A=0,_=0;for(_=y.nt,v=y.We,x=e.ot,A=e.ct,S=e.write,z=S=258&&v>=10&&(e.ot=x,e.ct=A,y.We=v,y.qe+=_-y.nt,y.nt=_,e.write=S,m=p(u,w,r,h,s,d,e,y),_=y.nt,v=y.We,x=e.ot,A=e.ct,S=e.write,z=SA;){if(0===v)return e.ot=x,e.ct=A,y.We=v,y.qe+=_-y.nt,y.nt=_,e.write=S,e.wt(y,m);m=0,v--,x|=(255&y.ft(_++))<>>=n[g+1],A-=n[g+1],k=n[g],0===k){f=n[g+2],t=6;break}if(0!=(16&k)){a=15&k,i=n[g+2],t=2;break}if(0==(64&k)){c=k,o=g/3+n[g+2];break}if(0!=(32&k)){t=7;break}return t=9,y.Le="invalid literal/length code",m=st,e.ot=x,e.ct=A,y.We=v,y.qe+=_-y.nt,y.nt=_,e.write=S,e.wt(y,m);case 2:for(b=a;b>A;){if(0===v)return e.ot=x,e.ct=A,y.We=v,y.qe+=_-y.nt,y.nt=_,e.write=S,e.wt(y,m);m=0,v--,x|=(255&y.ft(_++))<>=b,A-=b,c=w,n=s,o=d,t=3;case 3:for(b=c;b>A;){if(0===v)return e.ot=x,e.ct=A,y.We=v,y.qe+=_-y.nt,y.nt=_,e.write=S,e.wt(y,m);m=0,v--,x|=(255&y.ft(_++))<>=n[g+1],A-=n[g+1],k=n[g],0!=(16&k)){a=15&k,l=n[g+2],t=4;break}if(0==(64&k)){c=k,o=g/3+n[g+2];break}return t=9,y.Le="invalid distance code",m=st,e.ot=x,e.ct=A,y.We=v,y.qe+=_-y.nt,y.nt=_,e.write=S,e.wt(y,m);case 4:for(b=a;b>A;){if(0===v)return e.ot=x,e.ct=A,y.We=v,y.qe+=_-y.nt,y.nt=_,e.write=S,e.wt(y,m);m=0,v--,x|=(255&y.ft(_++))<>=b,A-=b,t=5;case 5:for(C=S-l;0>C;)C+=e.end;for(;0!==i;){if(0===z&&(S==e.end&&0!==e.read&&(S=0,z=S7&&(A-=8,v++,_--),e.write=S,m=e.wt(y,m),S=e.write,z=S{}}ht.dt=(e,t,n,r)=>(e[0]=9,t[0]=5,n[0]=ct,r[0]=ft,0);const pt=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function yt(e,t){const n=this;let r,s=0,o=0,c=0,a=0;const l=[0],u=[0],w=new dt;let h=0,d=new f(4320);const p=new ht;n.ct=0,n.ot=0,n.lt=new i(t),n.end=t,n.read=0,n.write=0,n.reset=(e,t)=>{t&&(t[0]=0),6==s&&w.ht(e),s=0,n.ct=0,n.ot=0,n.read=n.write=0},n.reset(e,null),n.wt=(e,t)=>{let r,s,i;return s=e.rt,i=n.read,r=(i>n.write?n.end:n.write)-i,r>e.tt&&(r=e.tt),0!==r&&t==it&&(t=0),e.tt-=r,e.Ge+=r,e.$e.set(n.lt.subarray(i,i+r),s),s+=r,i+=r,i==n.end&&(i=0,n.write==n.end&&(n.write=0),r=n.write-i,r>e.tt&&(r=e.tt),0!==r&&t==it&&(t=0),e.tt-=r,e.Ge+=r,e.$e.set(n.lt.subarray(i,i+r),s),s+=r,i+=r),e.rt=s,n.read=i,t},n.ut=(e,t)=>{let i,f,y,m,b,g,k,v;for(m=e.nt,b=e.We,f=n.ot,y=n.ct,g=n.write,k=gy;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<>>1){case 0:f>>>=3,y-=3,i=7&y,f>>>=i,y-=i,s=1;break;case 1:S=[],z=[],C=[[]],x=[[]],ht.dt(S,z,C,x),w.init(S[0],z[0],C[0],0,x[0],0),f>>>=3,y-=3,s=6;break;case 2:f>>>=3,y-=3,s=3;break;case 3:return f>>>=3,y-=3,s=9,e.Le="invalid block type",t=st,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t)}break;case 1:for(;32>y;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<>>16&65535)!=(65535&f))return s=9,e.Le="invalid stored block lengths",t=st,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);o=65535&f,f=y=0,s=0!==o?2:0!==h?7:0;break;case 2:if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);if(0===k&&(g==n.end&&0!==n.read&&(g=0,k=gb&&(i=b),i>k&&(i=k),n.lt.set(e.je(m,i),g),m+=i,b-=i,g+=i,k-=i,0!=(o-=i))break;s=0!==h?7:0;break;case 3:for(;14>y;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<29||(i>>5&31)>29)return s=9,e.Le="too many length or distance symbols",t=st,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);if(i=258+(31&i)+(i>>5&31),!r||r.lengthv;v++)r[v]=0;f>>>=14,y-=14,a=0,s=4;case 4:for(;4+(c>>>10)>a;){for(;3>y;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<>>=3,y-=3}for(;19>a;)r[pt[a++]]=0;if(l[0]=7,i=p.st(r,l,u,d,e),0!=i)return(t=i)==st&&(r=null,s=9),n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);a=0,s=5;case 5:for(;i=c,258+(31&i)+(i>>5&31)>a;){let o,w;for(i=l[0];i>y;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<w)f>>>=i,y-=i,r[a++]=w;else{for(v=18==w?7:w-14,o=18==w?11:3;i+v>y;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<>>=i,y-=i,o+=f&ot[v],f>>>=v,y-=v,v=a,i=c,v+o>258+(31&i)+(i>>5&31)||16==w&&1>v)return r=null,s=9,e.Le="invalid bit length repeat",t=st,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);w=16==w?r[v-1]:0;do{r[v++]=w}while(0!=--o);a=v}}if(u[0]=-1,A=[],_=[],I=[],P=[],A[0]=9,_[0]=6,i=c,i=p.it(257+(31&i),1+(i>>5&31),r,A,_,I,P,d,e),0!=i)return i==st&&(r=null,s=9),t=i,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);w.init(A[0],_[0],d,I[0],d,P[0]),s=6;case 6:if(n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,1!=(t=w.ut(n,e,t)))return n.wt(e,t);if(t=0,w.ht(e),m=e.nt,b=e.We,f=n.ot,y=n.ct,g=n.write,k=g{n.reset(e,null),n.lt=null,d=null},n.yt=(e,t,r)=>{n.lt.set(e.subarray(t,t+r),0),n.read=n.write=r},n.bt=()=>1==s?1:0}const mt=13,bt=[0,0,255,255];function gt(){const e=this;function t(e){return e&&e.gt?(e.qe=e.Ge=0,e.Le=null,e.gt.mode=7,e.gt.kt.reset(e,null),0):rt}e.mode=0,e.method=0,e.vt=[0],e.St=0,e.marker=0,e.zt=0,e.Ct=t=>(e.kt&&e.kt.ht(t),e.kt=null,0),e.xt=(n,r)=>(n.Le=null,e.kt=null,8>r||r>15?(e.Ct(n),rt):(e.zt=r,n.gt.kt=new yt(n,1<{let n,r;if(!e||!e.gt||!e.et)return rt;const s=e.gt;for(t=4==t?it:0,n=it;;)switch(s.mode){case 0:if(0===e.We)return n;if(n=t,e.We--,e.qe++,8!=(15&(s.method=e.ft(e.nt++)))){s.mode=mt,e.Le="unknown compression method",s.marker=5;break}if(8+(s.method>>4)>s.zt){s.mode=mt,e.Le="invalid win size",s.marker=5;break}s.mode=1;case 1:if(0===e.We)return n;if(n=t,e.We--,e.qe++,r=255&e.ft(e.nt++),((s.method<<8)+r)%31!=0){s.mode=mt,e.Le="incorrect header check",s.marker=5;break}if(0==(32&r)){s.mode=7;break}s.mode=2;case 2:if(0===e.We)return n;n=t,e.We--,e.qe++,s.St=(255&e.ft(e.nt++))<<24&4278190080,s.mode=3;case 3:if(0===e.We)return n;n=t,e.We--,e.qe++,s.St+=(255&e.ft(e.nt++))<<16&16711680,s.mode=4;case 4:if(0===e.We)return n;n=t,e.We--,e.qe++,s.St+=(255&e.ft(e.nt++))<<8&65280,s.mode=5;case 5:return 0===e.We?n:(n=t,e.We--,e.qe++,s.St+=255&e.ft(e.nt++),s.mode=6,2);case 6:return s.mode=mt,e.Le="need dictionary",s.marker=0,rt;case 7:if(n=s.kt.ut(e,n),n==st){s.mode=mt,s.marker=0;break}if(0==n&&(n=t),1!=n)return n;n=t,s.kt.reset(e,s.vt),s.mode=12;case 12:return e.We=0,1;case mt:return st;default:return rt}},e._t=(e,t,n)=>{let r=0,s=n;if(!e||!e.gt||6!=e.gt.mode)return rt;const i=e.gt;return s<1<{let n,r,s,i,o;if(!e||!e.gt)return rt;const c=e.gt;if(c.mode!=mt&&(c.mode=mt,c.marker=0),0===(n=e.We))return it;for(r=e.nt,s=c.marker;0!==n&&4>s;)e.ft(r)==bt[s]?s++:s=0!==e.ft(r)?0:4-s,r++,n--;return e.qe+=r-e.nt,e.nt=r,e.We=n,c.marker=s,4!=s?st:(i=e.qe,o=e.Ge,t(e),e.qe=i,e.Ge=o,c.mode=7,0)},e.Pt=e=>e&&e.gt&&e.gt.kt?e.gt.kt.bt():rt}function kt(){}function vt(e){const t=new kt,n=e&&e.chunkSize?r.floor(2*e.chunkSize):131072,o=new i(n);let c=!1;t.xt(),t.$e=o,this.append=(e,r)=>{const f=[];let a,l,u=0,w=0,h=0;if(0!==e.length){t.nt=0,t.et=e,t.We=e.length;do{if(t.rt=0,t.tt=n,0!==t.We||c||(t.nt=0,c=!0),a=t.At(0),c&&a===it){if(0!==t.We)throw new s("inflating: bad input")}else if(0!==a&&1!==a)throw new s("inflating: "+t.Le);if((c||1===a)&&t.We===e.length)throw new s("inflating: bad input");t.rt&&(t.rt===n?f.push(new i(o)):f.push(o.subarray(0,t.rt))),h+=t.rt,r&&t.nt>0&&t.nt!=u&&(r(t.nt),u=t.nt)}while(t.We>0||0===t.tt);return f.length>1?(l=new i(h),f.forEach((e=>{l.set(e,w),w+=e.length}))):l=f[0]?new i(f[0]):new i,l}},this.flush=()=>{t.Ct()}}kt.prototype={xt(e){const t=this;return t.gt=new gt,e||(e=15),t.gt.xt(t,e)},At(e){const t=this;return t.gt?t.gt.At(t,e):rt},Ct(){const e=this;if(!e.gt)return rt;const t=e.gt.Ct(e);return e.gt=null,t},It(){const e=this;return e.gt?e.gt.It(e):rt},_t(e,t){const n=this;return n.gt?n.gt._t(n,e,t):rt},ft(e){return this.et[e]},je(e,t){return this.et.subarray(e,e+t)}},self.initCodec=()=>{self.Deflate=nt,self.Inflate=vt};\n'],{type:"text/javascript"}));e({workerScripts:{inflate:[t],deflate:[t]}})})(qe),qe({Deflate:function(e){const t=new K,n=(r=e&&e.chunkSize?e.chunkSize:65536)+5*(a.floor(r/16383)+1);var r;const i=new p(n);let s=e?e.level:-1;void 0===s&&(s=-1),t.deflateInit(s),t.next_out=i,this.append=(e,r)=>{let s,a,o=0,l=0,c=0;const d=[];if(e.length){t.next_in_index=0,t.next_in=e,t.avail_in=e.length;do{if(t.next_out_index=0,t.avail_out=n,s=t.deflate(0),0!=s)throw new u("deflating: "+t.msg);t.next_out_index&&(t.next_out_index==n?d.push(new p(i)):d.push(i.subarray(0,t.next_out_index))),c+=t.next_out_index,r&&t.next_in_index>0&&t.next_in_index!=o&&(r(t.next_in_index),o=t.next_in_index)}while(t.avail_in>0||0===t.avail_out);return d.length>1?(a=new p(c),d.forEach((e=>{a.set(e,l),l+=e.length}))):a=d[0]?new p(d[0]):new p,a}},this.flush=()=>{let e,r,s=0,a=0;const o=[];do{if(t.next_out_index=0,t.avail_out=n,e=t.deflate(4),1!=e&&0!=e)throw new u("deflating: "+t.msg);n-t.avail_out>0&&o.push(i.slice(0,t.next_out_index)),a+=t.next_out_index}while(t.avail_in>0||0===t.avail_out);return t.deflateEnd(),r=new p(a),o.forEach((e=>{r.set(e,s),s+=e.length})),r}},Inflate:function(e){const t=new fe,n=e&&e.chunkSize?a.floor(2*e.chunkSize):131072,r=new p(n);let i=!1;t.inflateInit(),t.next_out=r,this.append=(e,s)=>{const a=[];let o,l,c=0,d=0,f=0;if(0!==e.length){t.next_in_index=0,t.next_in=e,t.avail_in=e.length;do{if(t.next_out_index=0,t.avail_out=n,0!==t.avail_in||i||(t.next_in_index=0,i=!0),o=t.inflate(0),i&&o===Y){if(0!==t.avail_in)throw new u("inflating: bad input")}else if(0!==o&&1!==o)throw new u("inflating: "+t.msg);if((i||1===o)&&t.avail_in===e.length)throw new u("inflating: bad input");t.next_out_index&&(t.next_out_index===n?a.push(new p(r)):a.push(r.subarray(0,t.next_out_index))),f+=t.next_out_index,s&&t.next_in_index>0&&t.next_in_index!=c&&(s(t.next_in_index),c=t.next_in_index)}while(t.avail_in>0||0===t.avail_out);return a.length>1?(l=new p(f),a.forEach((e=>{l.set(e,d),d+=e.length}))):l=a[0]?new p(a[0]):new p,l}},this.flush=()=>{t.inflateEnd()}}}),e.BlobReader=yn,e.BlobWriter=_n,e.Data64URIReader=bn,e.Data64URIWriter=vn,e.ERR_BAD_FORMAT=hr,e.ERR_CENTRAL_DIRECTORY_NOT_FOUND=br,e.ERR_DUPLICATED_NAME=Br,e.ERR_ENCRYPTED=_r,e.ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND=gr,e.ERR_EOCDR_NOT_FOUND=wr,e.ERR_EOCDR_ZIP64_NOT_FOUND=xr,e.ERR_EXTRAFIELD_ZIP64_NOT_FOUND=yr,e.ERR_HTTP_RANGE=dn,e.ERR_INVALID_COMMENT=Mr,e.ERR_INVALID_ENCRYPTION_STRENGTH=Gr,e.ERR_INVALID_ENTRY_COMMENT=Zr,e.ERR_INVALID_ENTRY_NAME=Vr,e.ERR_INVALID_EXTRAFIELD_DATA=Yr,e.ERR_INVALID_EXTRAFIELD_TYPE=Xr,e.ERR_INVALID_PASSWORD=Ge,e.ERR_INVALID_SIGNATURE=Xe,e.ERR_INVALID_VERSION=Kr,e.ERR_ITERATOR_COMPLETED_TOO_SOON=fn,e.ERR_LOCAL_FILE_HEADER_NOT_FOUND=vr,e.ERR_SPLIT_ZIP_FILE=Sr,e.ERR_UNSUPPORTED_COMPRESSION=zr,e.ERR_UNSUPPORTED_ENCRYPTION=kr,e.ERR_UNSUPPORTED_FORMAT=Jr,e.HttpRangeReader=class extends Nn{constructor(e,t={}){t.useRangeHeader=!0,super(e,t)}},e.HttpReader=Nn,e.Reader=xn,e.SplitDataReader=On,e.SplitDataWriter=Hn,e.SplitZipReader=Kn,e.SplitZipWriter=Gn,e.TextReader=kn,e.TextWriter=zn,e.Uint8ArrayReader=Pn,e.Uint8ArrayWriter=jn,e.Writer=gn,e.ZipReader=Er,e.ZipReaderStream=class{constructor(e={}){const{readable:t,writable:n}=new z,r=new Er(t,e).getEntriesGenerator();this.readable=new S({async pull(e){const{done:t,value:n}=await r.next();if(t)return e.close();const i={...n,readable:(()=>{const{readable:e,writable:t}=new z;if(n.getData)return n.getData(t),e})()};delete i.getData,e.enqueue(i)}}),this.writable=n}},e.ZipWriter=ti,e.ZipWriterStream=class{constructor(e={}){const{readable:t,writable:n}=new z;this.readable=t,this.zipWriter=new ti(n,e)}transform(e){const{readable:t,writable:n}=new z({flush:()=>{this.zipWriter.close()}});return this.zipWriter.add(e,t),{readable:this.readable,writable:n}}writable(e){const{readable:t,writable:n}=new z;return this.zipWriter.add(e,t),n}close(e,t={}){return this.zipWriter.close(e,t)}},e.configure=qe,e.fs=hi,e.getMimeType=e=>e&&Ie[e.split(".").pop().toLowerCase()]||"application/octet-stream",e.initShimAsyncCodec=(e,t={},n)=>({Deflate:ln(e.Deflate,t.deflate,n),Inflate:ln(e.Inflate,t.inflate,n)}),e.terminateWorkers=async()=>{await g.allSettled(nn.map((e=>(on(e),e.terminate()))))},n.defineProperty(e,"__esModule",{value:!0})})); diff --git a/demos/lib/zip-fs.js b/demos/lib/zip-fs.js index 30f090e7..3e836288 100644 --- a/demos/lib/zip-fs.js +++ b/demos/lib/zip-fs.js @@ -2779,35 +2779,43 @@ const { preventHeadRequest, useRangeHeader, - forceRangeRequests + forceRangeRequests, + combineSizeEocd } = options; options = Object.assign({}, options); delete options.preventHeadRequest; delete options.useRangeHeader; delete options.forceRangeRequests; + delete options.combineSizeEocd; delete options.useXHR; Object.assign(httpReader, { url, options, preventHeadRequest, useRangeHeader, - forceRangeRequests + forceRangeRequests, + combineSizeEocd }); } async function initHttpReader(httpReader, sendRequest, getRequestData) { const { url, + preventHeadRequest, useRangeHeader, - forceRangeRequests + forceRangeRequests, + combineSizeEocd } = httpReader; - if (isHttpFamily(url) && (useRangeHeader || forceRangeRequests)) { - const { headers } = await sendRequest(HTTP_METHOD_GET, httpReader, getRangeHeaders(httpReader)); - if (!forceRangeRequests && headers.get(HTTP_HEADER_ACCEPT_RANGES) != HTTP_RANGE_UNIT) { + if (isHttpFamily(url) && (useRangeHeader || forceRangeRequests) && (typeof preventHeadRequest == "undefined" || preventHeadRequest)) { + const response = await sendRequest(HTTP_METHOD_GET, httpReader, getRangeHeaders(httpReader, combineSizeEocd ? -END_OF_CENTRAL_DIR_LENGTH : undefined)); + if (!forceRangeRequests && response.headers.get(HTTP_HEADER_ACCEPT_RANGES) != HTTP_RANGE_UNIT) { throw new Error(ERR_HTTP_RANGE); } else { + if (combineSizeEocd) { + httpReader.eocdCache = new Uint8Array(await response.arrayBuffer()); + } let contentSize; - const contentRangeHeader = headers.get(HTTP_HEADER_CONTENT_RANGE); + const contentRangeHeader = response.headers.get(HTTP_HEADER_CONTENT_RANGE); if (contentRangeHeader) { const splitHeader = contentRangeHeader.trim().split(/\s*\/\s*/); if (splitHeader.length) { @@ -2832,9 +2840,14 @@ const { useRangeHeader, forceRangeRequests, + eocdCache, + size, options } = httpReader; if (useRangeHeader || forceRangeRequests) { + if (eocdCache && index == size - END_OF_CENTRAL_DIR_LENGTH && length == END_OF_CENTRAL_DIR_LENGTH) { + return eocdCache; + } const response = await sendRequest(HTTP_METHOD_GET, httpReader, getRangeHeaders(httpReader, index, length)); if (response.status != 206) { throw new Error(ERR_HTTP_RANGE); @@ -2850,7 +2863,7 @@ } function getRangeHeaders(httpReader, index = 0, length = 1) { - return Object.assign({}, getHeaders(httpReader), { [HTTP_HEADER_RANGE]: HTTP_RANGE_UNIT + "=" + index + "-" + (index + length - 1) }); + return Object.assign({}, getHeaders(httpReader), { [HTTP_HEADER_RANGE]: HTTP_RANGE_UNIT + "=" + (index < 0 ? index : index + "-" + (index + length - 1)) }); } function getHeaders({ options }) { @@ -3545,9 +3558,10 @@ commentUTF8, rawExtraField: directoryArray.subarray(extraFieldOffset, commentOffset) }); + const decode = getOptionValue$1(zipReader, options, "decodeText") || decodeText; const [filename, comment] = await Promise.all([ - decodeText(rawFilename, filenameUTF8 ? CHARSET_UTF8 : filenameEncoding || CHARSET_CP437), - decodeText(rawComment, commentUTF8 ? CHARSET_UTF8 : commentEncoding || CHARSET_CP437) + decode(rawFilename, filenameUTF8 ? CHARSET_UTF8 : filenameEncoding || CHARSET_CP437), + decode(rawComment, commentUTF8 ? CHARSET_UTF8 : commentEncoding || CHARSET_CP437) ]); Object.assign(fileEntry, { rawComment, @@ -4151,12 +4165,13 @@ } else { options.directory = name.endsWith(DIRECTORY_SIGNATURE); } - const rawFilename = encodeText(name); + const encode = getOptionValue(zipWriter, options, "encodeText", encodeText); + const rawFilename = encode(name); if (getLength(rawFilename) > MAX_16_BITS) { throw new Error(ERR_INVALID_ENTRY_NAME); } const comment = options.comment || ""; - const rawComment = encodeText(comment); + const rawComment = encode(comment); if (getLength(rawComment) > MAX_16_BITS) { throw new Error(ERR_INVALID_ENTRY_COMMENT); } @@ -4259,7 +4274,7 @@ zip64DiskNumberStart, password, rawPassword, - level, + level: !useCompressionStream && zipWriter.config.CompressionStream === UNDEFINED_VALUE ? 0 : level, useWebWorkers, encryptionStrength, extendedTimestamp, diff --git a/demos/lib/zip-fs.min.js b/demos/lib/zip-fs.min.js index ca78e1e8..3b5e8c9c 100644 --- a/demos/lib/zip-fs.min.js +++ b/demos/lib/zip-fs.min.js @@ -1 +1 @@ -((e,t)=>{"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).zip={})})(this,(function(e){"use strict";const{Array:t,Object:n,String:r,Number:s,BigInt:i,Math:a,Date:o,Map:c,Set:l,Response:u,URL:d,Error:f,Uint8Array:w,Uint16Array:h,Uint32Array:p,DataView:g,Blob:m,Promise:y,TextEncoder:b,TextDecoder:S,document:k,crypto:z,btoa:x,TransformStream:v,ReadableStream:A,WritableStream:D,CompressionStream:C,DecompressionStream:_,navigator:R,Worker:W}="undefined"!=typeof globalThis?globalThis:this||self,F=4294967295,E=65535,T=67324752,L=134695760,U=33639248,I=101075792,N=117853008,O=22,P=21589,q=2048,H="/",B=new o(2107,11,31),M=new o(1980,0,1),Z=void 0,V="undefined",K="function";class G{constructor(e){return class extends v{constructor(t,n){const r=new e(n);super({transform(e,t){t.enqueue(r.append(e))},flush(e){const t=r.flush();t&&e.enqueue(t)}})}}}}let X=2;try{typeof R!=V&&R.hardwareConcurrency&&(X=R.hardwareConcurrency)}catch(e){}const Y={chunkSize:524288,maxWorkers:X,terminateWorkerTimeout:5e3,useWebWorkers:!0,useCompressionStream:!0,workerScripts:Z,CompressionStreamNative:typeof C!=V&&C,DecompressionStreamNative:typeof _!=V&&_},j=n.assign({},Y);function J(){return j}function Q(e){return a.max(e.chunkSize,64)}function $(e){const{baseURL:n,chunkSize:r,maxWorkers:s,terminateWorkerTimeout:i,useCompressionStream:a,useWebWorkers:o,Deflate:c,Inflate:l,CompressionStream:u,DecompressionStream:d,workerScripts:w}=e;if(ee("baseURL",n),ee("chunkSize",r),ee("maxWorkers",s),ee("terminateWorkerTimeout",i),ee("useCompressionStream",a),ee("useWebWorkers",o),c&&(j.CompressionStream=new G(c)),l&&(j.DecompressionStream=new G(l)),ee("CompressionStream",u),ee("DecompressionStream",d),w!==Z){const{deflate:e,inflate:n}=w;if((e||n)&&(j.workerScripts||(j.workerScripts={})),e){if(!t.isArray(e))throw new f("workerScripts.deflate must be an array");j.workerScripts.deflate=e}if(n){if(!t.isArray(n))throw new f("workerScripts.inflate must be an array");j.workerScripts.inflate=n}}}function ee(e,t){t!==Z&&(j[e]=t)}function te(e,t,r){return class{constructor(s){const i=this;var a,o;a=s,o="level",(typeof n.hasOwn===K?n.hasOwn(a,o):a.hasOwnProperty(o))&&s.level===Z&&delete s.level,i.codec=new e(n.assign({},t,s)),r(i.codec,(e=>{if(i.pendingData){const t=i.pendingData;i.pendingData=new w(t.length+e.length);const{pendingData:n}=i;n.set(t,0),n.set(e,t.length)}else i.pendingData=new w(e)}))}append(e){return this.codec.push(e),s(this)}flush(){return this.codec.push(new w,!0),s(this)}};function s(e){if(e.pendingData){const t=e.pendingData;return e.pendingData=null,t}return new w}}const ne=[];for(let e=0;256>e;e++){let t=e;for(let e=0;8>e;e++)1&t?t=t>>>1^3988292384:t>>>=1;ne[e]=t}class re{constructor(e){this.crc=e||-1}append(e){let t=0|this.crc;for(let n=0,r=0|e.length;r>n;n++)t=t>>>8^ne[255&(t^e[n])];this.crc=t}get(){return~this.crc}}class se extends v{constructor(){let e;const t=new re;super({transform(e,n){t.append(e),n.enqueue(e)},flush(){const n=new w(4);new g(n.buffer).setUint32(0,t.get()),e.value=n}}),e=this}}function ie(e){if(typeof b==V){const t=new w((e=unescape(encodeURIComponent(e))).length);for(let n=0;n0&&t&&(e[n-1]=ae.partial(t,e[n-1]&2147483648>>t-1,1)),e},partial:(e,t,n)=>32===e?t:(n?0|t:t<<32-e)+1099511627776*e,getPartial:e=>a.round(e/1099511627776)||32,_shiftRight(e,t,n,r){for(void 0===r&&(r=[]);t>=32;t-=32)r.push(n),n=0;if(0===t)return r.concat(e);for(let s=0;s>>t),n=e[s]<<32-t;const s=e.length?e[e.length-1]:0,i=ae.getPartial(s);return r.push(ae.partial(t+i&31,t+i>32?n:r.pop(),1)),r}},oe={bytes:{fromBits(e){const t=ae.bitLength(e)/8,n=new w(t);let r;for(let s=0;t>s;s++)0==(3&s)&&(r=e[s/4]),n[s]=r>>>24,r<<=8;return n},toBits(e){const t=[];let n,r=0;for(n=0;n9007199254740991)throw new f("Cannot hash more than 2^53 - 1 bits");const i=new p(n);let a=0;for(let e=t.blockSize+r-(t.blockSize+r&t.blockSize-1);s>=e;e+=t.blockSize)t._block(i.subarray(16*a,16*(a+1))),a+=1;return n.splice(0,16*a),t}finalize(){const e=this;let t=e._buffer;const n=e._h;t=ae.concat(t,[ae.partial(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(a.floor(e._length/4294967296)),t.push(0|e._length);t.length;)e._block(t.splice(0,16));return e.reset(),n}_f(e,t,n,r){return e>19?e>39?e>59?e>79?void 0:t^n^r:t&n|t&r|n&r:t^n^r:t&n|~t&r}_S(e,t){return t<>>32-e}_block(e){const n=this,r=n._h,s=t(80);for(let t=0;16>t;t++)s[t]=e[t];let i=r[0],o=r[1],c=r[2],l=r[3],u=r[4];for(let e=0;79>=e;e++){16>e||(s[e]=n._S(1,s[e-3]^s[e-8]^s[e-14]^s[e-16]));const t=n._S(5,i)+n._f(e,o,c,l)+u+s[e]+n._key[a.floor(e/20)]|0;u=l,l=c,c=n._S(30,o),o=i,i=t}r[0]=r[0]+i|0,r[1]=r[1]+o|0,r[2]=r[2]+c|0,r[3]=r[3]+l|0,r[4]=r[4]+u|0}},le={getRandomValues(e){const t=new p(e.buffer),n=e=>{let t=987654321;const n=4294967295;return()=>(t=36969*(65535&t)+(t>>16)&n,(((t<<16)+(e=18e3*(65535&e)+(e>>16)&n)&n)/4294967296+.5)*(a.random()>.5?1:-1))};for(let r,s=0;snew ue.hmacSha1(oe.bytes.toBits(e)),pbkdf2(e,t,n,r){if(n=n||1e4,0>r||0>n)throw new f("invalid params to pbkdf2");const s=1+(r>>5)<<2;let i,a,o,c,l;const u=new ArrayBuffer(s),d=new g(u);let w=0;const h=ae;for(t=oe.bytes.toBits(t),l=1;(s||1)>w;l++){for(i=a=e.encrypt(h.concat(t,[l])),o=1;n>o;o++)for(a=e.encrypt(a),c=0;cw&&os&&(e=(new n).update(e).finalize());for(let t=0;s>t;t++)r[0][t]=909522486^e[t],r[1][t]=1549556828^e[t];t._baseHash[0].update(r[0]),t._baseHash[1].update(r[1]),t._resultHash=new n(t._baseHash[0])}reset(){const e=this;e._resultHash=new e._hash(e._baseHash[0]),e._updated=!1}update(e){this._updated=!0,this._resultHash.update(e)}digest(){const e=this,t=e._resultHash.finalize(),n=new e._hash(e._baseHash[1]).update(t).finalize();return e.reset(),n}encrypt(e){if(this._updated)throw new f("encrypt on already updated hmac called!");return this.update(e),this.digest(e)}}},de=typeof z!=V&&typeof z.getRandomValues==K,fe="Invalid password",we="Invalid signature",he="zipjs-abort-check-password";function pe(e){return de?z.getRandomValues(e):le.getRandomValues(e)}const ge=16,me={name:"PBKDF2"},ye=n.assign({hash:{name:"HMAC"}},me),be=n.assign({iterations:1e3,hash:{name:"SHA-1"}},me),Se=["deriveBits"],ke=[8,12,16],ze=[16,24,32],xe=10,ve=[0,0,0,0],Ae=typeof z!=V,De=Ae&&z.subtle,Ce=Ae&&typeof De!=V,_e=oe.bytes,Re=class{constructor(e){const t=this;t._tables=[[[],[],[],[],[]],[[],[],[],[],[]]],t._tables[0][0][0]||t._precompute();const n=t._tables[0][4],r=t._tables[1],s=e.length;let i,a,o,c=1;if(4!==s&&6!==s&&8!==s)throw new f("invalid aes key size");for(t._key=[a=e.slice(0),o=[]],i=s;4*s+28>i;i++){let e=a[i-1];(i%s==0||8===s&&i%s==4)&&(e=n[e>>>24]<<24^n[e>>16&255]<<16^n[e>>8&255]<<8^n[255&e],i%s==0&&(e=e<<8^e>>>24^c<<24,c=c<<1^283*(c>>7))),a[i]=a[i-s]^e}for(let e=0;i;e++,i--){const t=a[3&e?i:i-4];o[e]=4>=i||4>e?t:r[0][n[t>>>24]]^r[1][n[t>>16&255]]^r[2][n[t>>8&255]]^r[3][n[255&t]]}}encrypt(e){return this._crypt(e,0)}decrypt(e){return this._crypt(e,1)}_precompute(){const e=this._tables[0],t=this._tables[1],n=e[4],r=t[4],s=[],i=[];let a,o,c,l;for(let e=0;256>e;e++)i[(s[e]=e<<1^283*(e>>7))^e]=e;for(let u=a=0;!n[u];u^=o||1,a=i[a]||1){let i=a^a<<1^a<<2^a<<3^a<<4;i=i>>8^255&i^99,n[u]=i,r[i]=u,l=s[c=s[o=s[u]]];let d=16843009*l^65537*c^257*o^16843008*u,f=257*s[i]^16843008*i;for(let n=0;4>n;n++)e[n][u]=f=f<<24^f>>>8,t[n][i]=d=d<<24^d>>>8}for(let n=0;5>n;n++)e[n]=e[n].slice(0),t[n]=t[n].slice(0)}_crypt(e,t){if(4!==e.length)throw new f("invalid aes block size");const n=this._key[t],r=n.length/4-2,s=[0,0,0,0],i=this._tables[t],a=i[0],o=i[1],c=i[2],l=i[3],u=i[4];let d,w,h,p=e[0]^n[0],g=e[t?3:1]^n[1],m=e[2]^n[2],y=e[t?1:3]^n[3],b=4;for(let e=0;r>e;e++)d=a[p>>>24]^o[g>>16&255]^c[m>>8&255]^l[255&y]^n[b],w=a[g>>>24]^o[m>>16&255]^c[y>>8&255]^l[255&p]^n[b+1],h=a[m>>>24]^o[y>>16&255]^c[p>>8&255]^l[255&g]^n[b+2],y=a[y>>>24]^o[p>>16&255]^c[g>>8&255]^l[255&m]^n[b+3],b+=4,p=d,g=w,m=h;for(let e=0;4>e;e++)s[t?3&-e:e]=u[p>>>24]<<24^u[g>>16&255]<<16^u[m>>8&255]<<8^u[255&y]^n[b++],d=p,p=g,g=m,m=y,y=d;return s}},We=class{constructor(e,t){this._prf=e,this._initIv=t,this._iv=t}reset(){this._iv=this._initIv}update(e){return this.calculate(this._prf,e,this._iv)}incWord(e){if(255==(e>>24&255)){let t=e>>16&255,n=e>>8&255,r=255&e;255===t?(t=0,255===n?(n=0,255===r?r=0:++r):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=r}else e+=1<<24;return e}incCounter(e){0===(e[0]=this.incWord(e[0]))&&(e[1]=this.incWord(e[1]))}calculate(e,t,n){let r;if(!(r=t.length))return[];const s=ae.bitLength(t);for(let s=0;r>s;s+=4){this.incCounter(n);const r=e.encrypt(n);t[s]^=r[0],t[s+1]^=r[1],t[s+2]^=r[2],t[s+3]^=r[3]}return ae.clamp(t,s)}},Fe=ue.hmacSha1;let Ee=Ae&&Ce&&typeof De.importKey==K,Te=Ae&&Ce&&typeof De.deriveBits==K;class Le extends v{constructor({password:e,rawPassword:t,signed:r,encryptionStrength:s,checkPasswordOnly:i}){super({start(){n.assign(this,{ready:new y((e=>this.resolveReady=e)),password:Oe(e,t),signed:r,strength:s-1,pending:new w})},async transform(e,t){const n=this,{password:r,strength:s,resolveReady:a,ready:o}=n;r?(await(async(e,t,n,r)=>{const s=await Ne(e,t,n,qe(r,0,ke[t])),i=qe(r,ke[t]);if(s[0]!=i[0]||s[1]!=i[1])throw new f(fe)})(n,s,r,qe(e,0,ke[s]+2)),e=qe(e,ke[s]+2),i?t.error(new f(he)):a()):await o;const c=new w(e.length-xe-(e.length-xe)%ge);t.enqueue(Ie(n,e,c,0,xe,!0))},async flush(e){const{signed:t,ctr:n,hmac:r,pending:s,ready:i}=this;if(r&&n){await i;const a=qe(s,0,s.length-xe),o=qe(s,s.length-xe);let c=new w;if(a.length){const e=Be(_e,a);r.update(e);const t=n.update(e);c=He(_e,t)}if(t){const e=qe(He(_e,r.digest()),0,xe);for(let t=0;xe>t;t++)if(e[t]!=o[t])throw new f(we)}e.enqueue(c)}}})}}class Ue extends v{constructor({password:e,rawPassword:t,encryptionStrength:r}){let s;super({start(){n.assign(this,{ready:new y((e=>this.resolveReady=e)),password:Oe(e,t),strength:r-1,pending:new w})},async transform(e,t){const n=this,{password:r,strength:s,resolveReady:i,ready:a}=n;let o=new w;r?(o=await(async(e,t,n)=>{const r=pe(new w(ke[t]));return Pe(r,await Ne(e,t,n,r))})(n,s,r),i()):await a;const c=new w(o.length+e.length-e.length%ge);c.set(o,0),t.enqueue(Ie(n,e,c,o.length,0))},async flush(e){const{ctr:t,hmac:n,pending:r,ready:i}=this;if(n&&t){await i;let a=new w;if(r.length){const e=t.update(Be(_e,r));n.update(e),a=He(_e,e)}s.signature=He(_e,n.digest()).slice(0,xe),e.enqueue(Pe(a,s.signature))}}}),s=this}}function Ie(e,t,n,r,s,i){const{ctr:a,hmac:o,pending:c}=e,l=t.length-s;let u;for(c.length&&(t=Pe(c,t),n=((e,t)=>{if(t&&t>e.length){const n=e;(e=new w(t)).set(n,0)}return e})(n,l-l%ge)),u=0;l-ge>=u;u+=ge){const e=Be(_e,qe(t,u,u+ge));i&&o.update(e);const s=a.update(e);i||o.update(s),n.set(He(_e,s),u+r)}return e.pending=qe(t,u),n}async function Ne(e,r,s,i){e.password=null;const a=await(async(e,t,n,r,s)=>{if(!Ee)return ue.importKey(t);try{return await De.importKey("raw",t,n,!1,s)}catch(e){return Ee=!1,ue.importKey(t)}})(0,s,ye,0,Se),o=await(async(e,t,n)=>{if(!Te)return ue.pbkdf2(t,e.salt,be.iterations,n);try{return await De.deriveBits(e,t,n)}catch(r){return Te=!1,ue.pbkdf2(t,e.salt,be.iterations,n)}})(n.assign({salt:i},be),a,8*(2*ze[r]+2)),c=new w(o),l=Be(_e,qe(c,0,ze[r])),u=Be(_e,qe(c,ze[r],2*ze[r])),d=qe(c,2*ze[r]);return n.assign(e,{keys:{key:l,authentication:u,passwordVerification:d},ctr:new We(new Re(l),t.from(ve)),hmac:new Fe(u)}),d}function Oe(e,t){return t===Z?ie(e):t}function Pe(e,t){let n=e;return e.length+t.length&&(n=new w(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function qe(e,t,n){return e.subarray(t,n)}function He(e,t){return e.fromBits(t)}function Be(e,t){return e.toBits(t)}class Me extends v{constructor({password:e,passwordVerification:t,checkPasswordOnly:r}){super({start(){n.assign(this,{password:e,passwordVerification:t}),Ge(this,e)},transform(e,t){const n=this;if(n.password){const t=Ve(n,e.subarray(0,12));if(n.password=null,t[11]!=n.passwordVerification)throw new f(fe);e=e.subarray(12)}r?t.error(new f(he)):t.enqueue(Ve(n,e))}})}}class Ze extends v{constructor({password:e,passwordVerification:t}){super({start(){n.assign(this,{password:e,passwordVerification:t}),Ge(this,e)},transform(e,t){const n=this;let r,s;if(n.password){n.password=null;const t=pe(new w(12));t[11]=n.passwordVerification,r=new w(e.length+t.length),r.set(Ke(n,t),0),s=12}else r=new w(e.length),s=0;r.set(Ke(n,e),s),t.enqueue(r)}})}}function Ve(e,t){const n=new w(t.length);for(let r=0;r>>24]),s=~e.crcKey2.get(),e.keys=[n,r,s]}function Ye(e){const t=2|e.keys[2];return je(a.imul(t,1^t)>>>8)}function je(e){return 255&e}function Je(e){return 4294967295&e}const Qe="deflate-raw";class $e extends v{constructor(e,{chunkSize:t,CompressionStream:n,CompressionStreamNative:r}){super({});const{compressed:s,encrypted:i,useCompressionStream:a,zipCrypto:o,signed:c,level:l}=e,u=this;let d,f,w=tt(super.readable);i&&!o||!c||(d=new se,w=st(w,d)),s&&(w=rt(w,a,{level:l,chunkSize:t},r,n)),i&&(o?w=st(w,new Ze(e)):(f=new Ue(e),w=st(w,f))),nt(u,w,(()=>{let e;i&&!o&&(e=f.signature),i&&!o||!c||(e=new g(d.value.buffer).getUint32(0)),u.signature=e}))}}class et extends v{constructor(e,{chunkSize:t,DecompressionStream:n,DecompressionStreamNative:r}){super({});const{zipCrypto:s,encrypted:i,signed:a,signature:o,compressed:c,useCompressionStream:l}=e;let u,d,w=tt(super.readable);i&&(s?w=st(w,new Me(e)):(d=new Le(e),w=st(w,d))),c&&(w=rt(w,l,{chunkSize:t},r,n)),i&&!s||!a||(u=new se,w=st(w,u)),nt(this,w,(()=>{if((!i||s)&&a){const e=new g(u.value.buffer);if(o!=e.getUint32(0,!1))throw new f(we)}}))}}function tt(e){return st(e,new v({transform(e,t){e&&e.length&&t.enqueue(e)}}))}function nt(e,t,r){t=st(t,new v({flush:r})),n.defineProperty(e,"readable",{get:()=>t})}function rt(e,t,n,r,s){try{e=st(e,new(t&&r?r:s)(Qe,n))}catch(r){if(!t)return e;try{e=st(e,new s(Qe,n))}catch(t){return e}}return e}function st(e,t){return e.pipeThrough(t)}const it="data",at="close",ot="deflate",ct="inflate";class lt extends v{constructor(e,t){super({});const r=this,{codecType:s}=e;let i;s.startsWith(ot)?i=$e:s.startsWith(ct)&&(i=et);let a=0,o=0;const c=new i(e,t),l=super.readable,u=new v({transform(e,t){e&&e.length&&(o+=e.length,t.enqueue(e))},flush(){n.assign(r,{inputSize:o})}}),d=new v({transform(e,t){e&&e.length&&(a+=e.length,t.enqueue(e))},flush(){const{signature:e}=c;n.assign(r,{signature:e,outputSize:a,inputSize:o})}});n.defineProperty(r,"readable",{get:()=>l.pipeThrough(u).pipeThrough(c).pipeThrough(d)})}}class ut extends v{constructor(e){let t;super({transform:function n(r,s){if(t){const e=new w(t.length+r.length);e.set(t),e.set(r,t.length),r=e,t=null}r.length>e?(s.enqueue(r.slice(0,e)),n(r.slice(e),s)):t=r},flush(e){t&&t.length&&e.enqueue(t)}})}}let dt=typeof W!=V;class ft{constructor(e,{readable:t,writable:r},{options:s,config:i,streamOptions:a,useWebWorkers:o,transferStreams:c,scripts:l},u){const{signal:d}=a;return n.assign(e,{busy:!0,readable:t.pipeThrough(new ut(i.chunkSize)).pipeThrough(new wt(t,a),{signal:d}),writable:r,options:n.assign({},s),scripts:l,transferStreams:c,terminate:()=>new y((t=>{const{worker:n,busy:r}=e;n?(r?e.resolveTerminated=t:(n.terminate(),t()),e.interface=null):t()})),onTaskFinished(){const{resolveTerminated:t}=e;t&&(e.resolveTerminated=null,e.terminated=!0,e.worker.terminate(),t()),e.busy=!1,u(e)}}),(o&&dt?gt:pt)(e,i)}}class wt extends v{constructor(e,{onstart:t,onprogress:n,size:r,onend:s}){let i=0;super({async start(){t&&await ht(t,r)},async transform(e,t){i+=e.length,n&&await ht(n,i,r),t.enqueue(e)},async flush(){e.size=i,s&&await ht(s,i)}})}}async function ht(e,...t){try{await e(...t)}catch(e){}}function pt(e,t){return{run:()=>(async({options:e,readable:t,writable:n,onTaskFinished:r},s)=>{try{const i=new lt(e,s);await t.pipeThrough(i).pipeTo(n,{preventClose:!0,preventAbort:!0});const{signature:a,inputSize:o,outputSize:c}=i;return{signature:a,inputSize:o,outputSize:c}}finally{r()}})(e,t)}}function gt(e,t){const{baseURL:r,chunkSize:s}=t;if(!e.interface){let i;try{i=((e,t,r)=>{const s={type:"module"};let i,a;typeof e==K&&(e=e());try{i=new d(e,t)}catch(t){i=e}if(mt)try{a=new W(i)}catch(e){mt=!1,a=new W(i,s)}else a=new W(i,s);return a.addEventListener("message",(e=>(async({data:e},t)=>{const{type:r,value:s,messageId:i,result:a,error:o}=e,{reader:c,writer:l,resolveResult:u,rejectResult:d,onTaskFinished:h}=t;try{if(o){const{message:e,stack:t,code:r,name:s}=o,i=new f(e);n.assign(i,{stack:t,code:r,name:s}),p(i)}else{if("pull"==r){const{value:e,done:n}=await c.read();bt({type:it,value:e,done:n,messageId:i},t)}r==it&&(await l.ready,await l.write(new w(s)),bt({type:"ack",messageId:i},t)),r==at&&p(null,a)}}catch(o){bt({type:at,messageId:i},t),p(o)}function p(e,t){e?d(e):u(t),l&&l.releaseLock(),h()}})(e,r))),a})(e.scripts[0],r,e)}catch(n){return dt=!1,pt(e,t)}n.assign(e,{worker:i,interface:{run:()=>(async(e,t)=>{let r,s;const i=new y(((e,t)=>{r=e,s=t}));n.assign(e,{reader:null,writer:null,resolveResult:r,rejectResult:s,result:i});const{readable:a,options:o,scripts:c}=e,{writable:l,closed:u}=(e=>{let t;const n=new y((e=>t=e));return{writable:new D({async write(t){const n=e.getWriter();await n.ready,await n.write(t),n.releaseLock()},close(){t()},abort:t=>e.getWriter().abort(t)}),closed:n}})(e.writable),d=bt({type:"start",scripts:c.slice(1),options:o,config:t,readable:a,writable:l},e);d||n.assign(e,{reader:a.getReader(),writer:l.getWriter()});const f=await i;return d||await l.getWriter().close(),await u,f})(e,{chunkSize:s})}})}return e.interface}let mt=!0,yt=!0;function bt(e,{worker:t,writer:n,onTaskFinished:r,transferStreams:s}){try{let{value:n,readable:r,writable:i}=e;const a=[];if(n&&(n.byteLength{const n=St.find((e=>!e.busy));if(n)return vt(n),new ft(n,e,t,p);if(St.lengthkt.push({resolve:n,stream:e,workerOptions:t})))})()).run();function p(e){if(kt.length){const[{resolve:t,stream:n,workerOptions:r}]=kt.splice(0,1);t(new ft(e,n,r,p))}else e.worker?(vt(e),((e,t)=>{const{config:n}=t,{terminateWorkerTimeout:r}=n;s.isFinite(r)&&r>=0&&(e.terminated?e.terminated=!1:e.terminateTimeout=setTimeout((async()=>{St=St.filter((t=>t!=e));try{await e.terminate()}catch(e){}}),r))})(e,t)):St=St.filter((t=>t!=e))}}function vt(e){const{terminateTimeout:t}=e;t&&(clearTimeout(t),e.terminateTimeout=null)}const At="HTTP error ",Dt="HTTP Range not supported",Ct="Writer iterator completed too soon",_t="GET",Rt="bytes",Wt=65536,Ft="writable";class Et{constructor(){this.size=0}init(){this.initialized=!0}}class Tt extends Et{get readable(){const e=this,{chunkSize:t=Wt}=e,n=new A({start(){this.chunkOffset=0},async pull(r){const{offset:s=0,size:i,diskNumberStart:o}=n,{chunkOffset:c}=this;r.enqueue(await ln(e,s+c,a.min(t,i-c),o)),c+t>i?r.close():this.chunkOffset+=t}});return n}}class Lt extends Et{constructor(){super();const e=this,t=new D({write:t=>e.writeUint8Array(t)});n.defineProperty(e,Ft,{get:()=>t})}writeUint8Array(){}}class Ut extends Tt{constructor(e){super();let t=e.length;for(;"="==e.charAt(t-1);)t--;const r=e.indexOf(",")+1;n.assign(this,{dataURI:e,dataStart:r,size:a.floor(.75*(t-r))})}readUint8Array(e,t){const{dataStart:n,dataURI:r}=this,s=new w(t),i=4*a.floor(e/3),o=atob(r.substring(i+n,4*a.ceil((e+t)/3)+n)),c=e-3*a.floor(i/4);for(let e=c;c+t>e;e++)s[e-c]=o.charCodeAt(e);return s}}class It extends Lt{constructor(e){super(),n.assign(this,{data:"data:"+(e||"")+";base64,",pending:[]})}writeUint8Array(e){const t=this;let n=0,s=t.pending;const i=t.pending.length;for(t.pending="",n=0;n<3*a.floor((i+e.length)/3)-i;n++)s+=r.fromCharCode(e[n]);for(;n2?t.data+=x(s):t.pending=s}getData(){return this.data+x(this.pending)}}class Nt extends Tt{constructor(e){super(),n.assign(this,{blob:e,size:e.size})}async readUint8Array(e,t){const n=this,r=e+t,s=e||rt&&(i=i.slice(e,r)),new w(i)}}class Ot extends Et{constructor(e){super();const t=new v,r=[];e&&r.push(["Content-Type",e]),n.defineProperty(this,Ft,{get:()=>t.writable}),this.blob=new u(t.readable,{headers:r}).blob()}getData(){return this.blob}}class Pt extends Nt{constructor(e){super(new m([e],{type:"text/plain"}))}}class qt extends Ot{constructor(e){super(e),n.assign(this,{encoding:e,utf8:!e||"utf-8"==e.toLowerCase()})}async getData(){const{encoding:e,utf8:t}=this,r=await super.getData();if(r.text&&t)return r.text();{const t=new FileReader;return new y(((s,i)=>{n.assign(t,{onload:({target:e})=>s(e.result),onerror:()=>i(t.error)}),t.readAsText(r,e)}))}}}class Ht extends Tt{constructor(e,t){super(),Mt(this,e,t)}async init(){await Zt(this,Qt,Xt),super.init()}readUint8Array(e,t){return Vt(this,e,t,Qt,Xt)}}class Bt extends Tt{constructor(e,t){super(),Mt(this,e,t)}async init(){await Zt(this,$t,Yt),super.init()}readUint8Array(e,t){return Vt(this,e,t,$t,Yt)}}function Mt(e,t,r){const{preventHeadRequest:s,useRangeHeader:i,forceRangeRequests:a}=r;delete(r=n.assign({},r)).preventHeadRequest,delete r.useRangeHeader,delete r.forceRangeRequests,delete r.useXHR,n.assign(e,{url:t,options:r,preventHeadRequest:s,useRangeHeader:i,forceRangeRequests:a})}async function Zt(e,t,n){const{url:r,useRangeHeader:i,forceRangeRequests:a}=e;if((e=>{const{baseURL:t}=J(),{protocol:n}=new d(e,t);return"http:"==n||"https:"==n})(r)&&(i||a)){const{headers:r}=await t(_t,e,Kt(e));if(!a&&r.get("Accept-Ranges")!=Rt)throw new f(Dt);{let i;const a=r.get("Content-Range");if(a){const e=a.trim().split(/\s*\/\s*/);if(e.length){const t=e[1];t&&"*"!=t&&(i=s(t))}}i===Z?await Jt(e,t,n):e.size=i}}else await Jt(e,t,n)}async function Vt(e,t,n,r,s){const{useRangeHeader:i,forceRangeRequests:a,options:o}=e;if(i||a){const s=await r(_t,e,Kt(e,t,n));if(206!=s.status)throw new f(Dt);return new w(await s.arrayBuffer())}{const{data:r}=e;return r||await s(e,o),new w(e.data.subarray(t,t+n))}}function Kt(e,t=0,r=1){return n.assign({},Gt(e),{Range:Rt+"="+t+"-"+(t+r-1)})}function Gt({options:e}){const{headers:t}=e;if(t)return Symbol.iterator in t?n.fromEntries(t):t}async function Xt(e){await jt(e,Qt)}async function Yt(e){await jt(e,$t)}async function jt(e,t){const n=await t(_t,e,Gt(e));e.data=new w(await n.arrayBuffer()),e.size||(e.size=e.data.length)}async function Jt(e,t,n){if(e.preventHeadRequest)await n(e,e.options);else{const r=(await t("HEAD",e,Gt(e))).headers.get("Content-Length");r?e.size=s(r):await n(e,e.options)}}async function Qt(e,{options:t,url:r},s){const i=await fetch(r,n.assign({},t,{method:e,headers:s}));if(400>i.status)return i;throw 416==i.status?new f(Dt):new f(At+(i.statusText||i.status))}function $t(e,{url:t},r){return new y(((s,i)=>{const a=new XMLHttpRequest;if(a.addEventListener("load",(()=>{if(400>a.status){const e=[];a.getAllResponseHeaders().trim().split(/[\r\n]+/).forEach((t=>{const n=t.trim().split(/\s*:\s*/);n[0]=n[0].trim().replace(/^[a-z]|-[a-z]/g,(e=>e.toUpperCase())),e.push(n)})),s({status:a.status,arrayBuffer:()=>a.response,headers:new c(e)})}else i(416==a.status?new f(Dt):new f(At+(a.statusText||a.status)))}),!1),a.addEventListener("error",(e=>i(e.detail?e.detail.error:new f("Network error"))),!1),a.open(e,t),r)for(const e of n.entries(r))a.setRequestHeader(e[0],e[1]);a.responseType="arraybuffer",a.send()}))}class en extends Tt{constructor(e,t={}){super(),n.assign(this,{url:e,reader:t.useXHR?new Bt(e,t):new Ht(e,t)})}set size(e){}get size(){return this.reader.size}async init(){await this.reader.init(),super.init()}readUint8Array(e,t){return this.reader.readUint8Array(e,t)}}class tn extends Tt{constructor(e){super(),n.assign(this,{array:e,size:e.length})}readUint8Array(e,t){return this.array.slice(e,e+t)}}class nn extends Lt{init(e=0){n.assign(this,{offset:0,array:new w(e)}),super.init()}writeUint8Array(e){const t=this;if(t.offset+e.length>t.array.length){const n=t.array;t.array=new w(n.length+e.length),t.array.set(n)}t.array.set(e,t.offset),t.offset+=e.length}getData(){return this.array}}class rn extends Tt{constructor(e){super(),this.readers=e}async init(){const e=this,{readers:t}=e;e.lastDiskNumber=0,e.lastDiskOffset=0,await y.all(t.map((async(n,r)=>{await n.init(),r!=t.length-1&&(e.lastDiskOffset+=n.size),e.size+=n.size}))),super.init()}async readUint8Array(e,t,n=0){const r=this,{readers:s}=this;let i,o=n;-1==o&&(o=s.length-1);let c=e;for(;c>=s[o].size;)c-=s[o].size,o++;const l=s[o],u=l.size;if(c+t>u){const s=u-c;i=new w(t),i.set(await ln(l,c,s)),i.set(await r.readUint8Array(e+s,t-s,n),s)}else i=await ln(l,c,t);return r.lastDiskNumber=a.max(o,r.lastDiskNumber),i}}class sn extends Et{constructor(e,t=4294967295){super();const r=this;let s,i,a;n.assign(r,{diskNumber:0,diskOffset:0,size:0,maxSize:t,availableSize:t});const o=new D({async write(t){const{availableSize:n}=r;if(a)t.lengtho})}}async function an(e,t){if(!e.init||e.initialized)return y.resolve();await e.init(t)}function on(e){return t.isArray(e)&&(e=new rn(e)),e instanceof A&&(e={readable:e}),e}function cn(e){e.writable===Z&&typeof e.next==K&&(e=new sn(e)),e instanceof D&&(e={writable:e});const{writable:t}=e;return t.size===Z&&(t.size=0),e instanceof sn||n.assign(e,{diskNumber:0,diskOffset:0,availableSize:1/0,maxSize:1/0}),e}function ln(e,t,n,r){return e.readUint8Array(t,n,r)}const un=rn,dn=sn,fn="\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ ".split("");function wn(e,t){return t&&"cp437"==t.trim().toLowerCase()?(e=>{{let t="";for(let n=0;nthis[t]=e[t]))}}const En="File format is not recognized",Tn="End of central directory not found",Ln="End of Zip64 central directory not found",Un="End of Zip64 central directory locator not found",In="Central directory header not found",Nn="Local file header not found",On="Zip64 extra field not found",Pn="File contains encrypted entry",qn="Encryption method not supported",Hn="Compression method not supported",Bn="Split zip file",Mn="utf-8",Zn="cp437",Vn=[[yn,F],[bn,F],[Sn,F],[kn,E]],Kn={[E]:{getValue:rr,bytes:4},[F]:{getValue:sr,bytes:8}};class Gn{constructor(e,t={}){n.assign(this,{reader:on(e),options:t,config:J()})}async*getEntriesGenerator(e={}){const t=this;let{reader:r}=t;const{config:s}=t;if(await an(r),r.size!==Z&&r.readUint8Array||(r=new Nt(await new u(r.readable).blob()),await an(r)),r.size{const r=new w(4);return ir(r).setUint32(0,101010256,!0),await s(22)||await s(a.min(1048582,n));async function s(t){const s=n-t,i=await ln(e,s,t);for(let e=i.length-22;e>=0;e--)if(i[e]==r[0]&&i[e+1]==r[1]&&i[e+2]==r[2]&&i[e+3]==r[3])return{offset:s+e,buffer:i.slice(e,e+22).buffer}}})(r,0,r.size);if(!i)throw rr(ir(await ln(r,0,4)))==L?new f(Bn):new f(Tn);const o=ir(i);let c=rr(o,12),l=rr(o,16);const d=i.offset,h=nr(o,20),p=d+O+h;let g=nr(o,4);const m=r.lastDiskNumber||0;let b=nr(o,6),S=nr(o,8),k=0,z=0;if(l==F||c==F||S==E||b==E){const e=ir(await ln(r,i.offset-20,20));if(rr(e,0)!=N)throw new f(Ln);l=sr(e,8);let t=await ln(r,l,56,-1),n=ir(t);const s=i.offset-20-56;if(rr(n,0)!=I&&l!=s){const e=l;l=s,k=l-e,t=await ln(r,l,56,-1),n=ir(t)}if(rr(n,0)!=I)throw new f(Un);g==E&&(g=rr(n,16)),b==E&&(b=rr(n,20)),S==E&&(S=sr(n,32)),c==F&&(c=sr(n,40)),l-=c}if(ll)throw new f(En);let x=0,v=await ln(r,l,c,b),A=ir(v);if(c){const e=i.offset-c;if(rr(A,x)!=U&&l!=e){const t=l;l=e,k+=l-t,v=await ln(r,l,c,b),A=ir(v)}}const D=i.offset-l-(r.lastDiskOffset||0);if(c==D||0>D||(c=D,v=await ln(r,l,c,b),A=ir(v)),0>l||l>=r.size)throw new f(En);const C=Qn(t,e,"filenameEncoding"),_=Qn(t,e,"commentEncoding");for(let i=0;S>i;i++){const o=new Xn(r,s,t.options);if(rr(A,x)!=U)throw new f(In);Yn(o,A,x+6);const c=!!o.bitFlag.languageEncodingFlag,l=x+46,u=l+o.filenameLength,d=u+o.extraFieldLength,w=nr(A,x+4),h=0==(0&w),p=v.subarray(l,u),g=nr(A,x+32),m=d+g,b=v.subarray(d,m),D=c,R=c,W=h&&16==(16&tr(A,x+38)),F=rr(A,x+42)+k;n.assign(o,{versionMadeBy:w,msDosCompatible:h,compressedSize:0,uncompressedSize:0,commentLength:g,directory:W,offset:F,diskNumberStart:nr(A,x+34),internalFileAttribute:nr(A,x+36),externalFileAttribute:rr(A,x+38),rawFilename:p,filenameUTF8:D,commentUTF8:R,rawExtraField:v.subarray(u,d)});const[E,T]=await y.all([wn(p,D?Mn:C||Zn),wn(b,R?Mn:_||Zn)]);n.assign(o,{rawComment:b,filename:E,comment:T,directory:W||E.endsWith(H)}),z=a.max(F,z),await jn(o,o,A,x+6);const L=new Fn(o);L.getData=(e,t)=>o.getData(e,L,t),x=m;const{onprogress:I}=e;if(I)try{await I(i+1,S,new Fn(o))}catch(e){}yield L}const R=Qn(t,e,"extractPrependedData"),W=Qn(t,e,"extractAppendedData");return R&&(t.prependedData=z>0?await ln(r,0,z):new w),t.comment=h?await ln(r,d+O,h):new w,W&&(t.appendedData=p>>8&255:h>>>24&255),signature:h,compressed:0!=l,encrypted:z,useWebWorkers:Qn(s,r,"useWebWorkers"),useCompressionStream:Qn(s,r,"useCompressionStream"),transferStreams:Qn(s,r,"transferStreams"),checkPasswordOnly:R},config:u,streamOptions:{signal:_,size:A,onstart:F,onprogress:E,onend:L}};let I=0;try{({outputSize:I}=await xt({readable:C,writable:W},U))}catch(e){if(!R||e.message!=he)throw e}finally{const e=Qn(s,r,"preventClose");W.size+=I,e||W.locked||await W.getWriter().close()}return R?Z:e.getData?e.getData():W}}function Yn(e,t,r){const s=e.rawBitFlag=nr(t,r+2),i=1==(1&s),a=rr(t,r+6);n.assign(e,{encrypted:i,version:nr(t,r),bitFlag:{level:(6&s)>>1,dataDescriptor:8==(8&s),languageEncodingFlag:(s&q)==q},rawLastModDate:a,lastModDate:$n(a),filenameLength:nr(t,r+22),extraFieldLength:nr(t,r+24)})}async function jn(e,t,r,s,i){const{rawExtraField:a}=t,l=t.extraField=new c,u=ir(new w(a));let d=0;try{for(;d{t.zip64=!0;const n=ir(e.data),r=Vn.filter((([e,n])=>t[e]==n));for(let s=0,i=0;s{const s=ir(e.data),i=tr(s,4);n.assign(e,{vendorVersion:tr(s,0),vendorId:tr(s,2),strength:i,originalCompressionMethod:r,compressionMethod:nr(s,5)}),t.compressionMethod=e.compressionMethod})(y,t,h),t.extraFieldAES=y):t.compressionMethod=h;const b=l.get(10);b&&(((e,t)=>{const r=ir(e.data);let s,i=4;try{for(;i{const r=ir(e.data),s=tr(r,0),i=[],a=[];n?(1==(1&s)&&(i.push(zn),a.push(xn)),2==(2&s)&&(i.push(vn),a.push("rawLastAccessDate")),4==(4&s)&&(i.push(An),a.push("rawCreationDate"))):5>e.data.length||(i.push(zn),a.push(xn));let c=1;i.forEach(((n,s)=>{if(e.data.length>=c+4){const i=rr(r,c);t[n]=e[n]=new o(1e3*i);const l=a[s];e[l]=i}c+=4}))})(S,t,i),t.extraFieldExtendedTimestamp=S);const k=l.get(6534);k&&(t.extraFieldUSDZ=k)}async function Jn(e,t,r,s,i){const a=ir(e.data),o=new re;o.append(i[r]);const c=ir(new w(4));c.setUint32(0,o.get(),!0);const l=rr(a,1);n.assign(e,{version:tr(a,0),[t]:wn(e.data.subarray(5)),valid:!i.bitFlag.languageEncodingFlag&&l==rr(c,0)}),e.valid&&(s[t]=e[t],s[t+"UTF8"]=!0)}function Qn(e,t,n){return t[n]===Z?e.options[n]:t[n]}function $n(e){const t=(4294901760&e)>>16,n=65535&e;try{return new o(1980+((65024&t)>>9),((480&t)>>5)-1,31&t,(63488&n)>>11,(2016&n)>>5,2*(31&n),0)}catch(e){}}function er(e){return new o(s(e/i(1e4)-i(116444736e5)))}function tr(e,t){return e.getUint8(t)}function nr(e,t){return e.getUint16(t,!0)}function rr(e,t){return e.getUint32(t,!0)}function sr(e,t){return s(e.getBigUint64(t,!0))}function ir(e){return new g(e.buffer)}const ar="File already exists",or="Zip file comment exceeds 64KB",cr="File entry comment exceeds 64KB",lr="File entry name exceeds 64KB",ur="Version exceeds 65535",dr="The strength must equal 1, 2, or 3",fr="Extra field type exceeds 65535",wr="Extra field data exceeds 64KB",hr="Zip64 is not supported (make sure 'keepOrder' is set to 'true')",pr=new w([7,0,2,0,65,69,3,0,0]);let gr=0;const mr=[];class yr{constructor(e,t={}){const r=(e=cn(e)).availableSize!==Z&&e.availableSize>0&&e.availableSize!==1/0&&e.maxSize!==Z&&e.maxSize>0&&e.maxSize!==1/0;n.assign(this,{writer:e,addSplitZipSignature:r,options:t,config:J(),files:new c,filenames:new l,offset:e.writable.size,pendingEntriesSize:0,pendingAddFileCalls:new l,bufferedWrites:0})}async add(e="",r,s={}){const c=this,{pendingAddFileCalls:l,config:d}=c;let m;grmr.push(e)));try{if(e=e.trim(),c.filenames.has(e))throw new f(ar);return c.filenames.add(e),m=(async(e,r,s,c)=>{r=r.trim(),c.directory&&!r.endsWith(H)?r+=H:c.directory=r.endsWith(H);const l=ie(r);if(_r(l)>E)throw new f(lr);const d=c.comment||"",m=ie(d);if(_r(m)>E)throw new f(cr);const b=kr(e,c,"version",20);if(b>E)throw new f(ur);const S=kr(e,c,"versionMadeBy",20);if(S>E)throw new f(ur);const k=kr(e,c,zn,new o),z=kr(e,c,vn),x=kr(e,c,An),A=kr(e,c,_n,!0),D=kr(e,c,Dn,0),C=kr(e,c,Cn,0),_=kr(e,c,"password"),R=kr(e,c,"rawPassword"),W=kr(e,c,"encryptionStrength",3),U=kr(e,c,"zipCrypto"),I=kr(e,c,"extendedTimestamp",!0),N=kr(e,c,"keepOrder",!0),O=kr(e,c,"level"),V=kr(e,c,"useWebWorkers"),K=kr(e,c,"bufferedWrite"),G=kr(e,c,"dataDescriptorSignature",!1),X=kr(e,c,"signal"),Y=kr(e,c,"useCompressionStream");let j=kr(e,c,"dataDescriptor",!0),J=kr(e,c,Rn);if(_!==Z&&W!==Z&&(1>W||W>3))throw new f(dr);let $=new w;const{extraField:ee}=c;if(ee){let e=0,t=0;ee.forEach((t=>e+=4+_r(t))),$=new w(e),ee.forEach(((e,n)=>{if(n>E)throw new f(fr);if(_r(e)>E)throw new f(wr);Dr($,new h([n]),t),Dr($,new h([_r(e)]),t+2),Dr($,e,t+4),t+=4+_r(e)}))}let te=0,ne=0,re=0;const se=!0===J;s&&(s=on(s),await an(s),s.size===Z?(j=!0,(J||J===Z)&&(J=!0,re=te=F)):(re=s.size,te=(e=>e+5*(a.floor(e/16383)+1))(re)));const{diskOffset:ae,diskNumber:oe,maxSize:ce}=e.writer,le=se||re>=F,ue=se||te>=F,de=se||e.offset+e.pendingEntriesSize-ae>=F,fe=kr(e,c,"supportZip64SplitFile",!0)&&se||oe+a.ceil(e.pendingEntriesSize/ce)>=E;if(de||le||ue||fe){if(!1===J||!N)throw new f(hr);J=!0}J=J||!1;const we=(e=>{const{rawFilename:t,lastModDate:n,lastAccessDate:r,creationDate:s,rawPassword:i,password:o,level:c,zip64:l,zipCrypto:u,dataDescriptor:d,directory:f,rawExtraField:h,encryptionStrength:g,extendedTimestamp:m}=e,y=0!==c&&!f,b=!!(o&&_r(o)||i&&_r(i));let S,k,z,x,v=e.version;if(b&&!u){S=new w(_r(pr)+2);const e=Cr(S);xr(e,0,39169),Dr(S,pr,2),zr(e,8,g)}else S=new w;if(m){z=new w(9+(r?4:0)+(s?4:0));const e=Cr(z);xr(e,0,P),xr(e,2,_r(z)-4),x=1+(r?2:0)+(s?4:0),zr(e,4,x);let t=5;vr(e,t,a.floor(n.getTime()/1e3)),t+=4,r&&(vr(e,t,a.floor(r.getTime()/1e3)),t+=4),s&&vr(e,t,a.floor(s.getTime()/1e3));try{k=new w(36);const e=Cr(k),t=Sr(n);xr(e,0,10),xr(e,2,32),xr(e,8,1),xr(e,10,24),Ar(e,12,t),Ar(e,20,Sr(r)||t),Ar(e,28,Sr(s)||t)}catch(e){k=new w}}else k=z=new w;let A=q;d&&(A|=8);let D=0;y&&(D=8),l&&(v=v>45?v:45),b&&(A|=1,u||(v=v>51?v:51,D=99,y&&(S[9]=8)));const C=new w(26),_=Cr(C);xr(_,0,v),xr(_,2,A),xr(_,4,D);const R=new p(1),W=Cr(R);let F;F=M>n?M:n>B?B:n,xr(W,0,(F.getHours()<<6|F.getMinutes())<<5|F.getSeconds()/2),xr(W,2,(F.getFullYear()-1980<<4|F.getMonth()+1)<<5|F.getDate());const E=R[0];vr(_,6,E),xr(_,22,_r(t));const L=_r(S,z,k,h);xr(_,24,L);const U=new w(30+_r(t)+L);return vr(Cr(U),0,T),Dr(U,C,4),Dr(U,t,30),Dr(U,S,30+_r(t)),Dr(U,z,30+_r(t,S)),Dr(U,k,30+_r(t,S,z)),Dr(U,h,30+_r(t,S,z,k)),{localHeaderArray:U,headerArray:C,headerView:_,lastModDate:n,rawLastModDate:E,encrypted:b,compressed:y,version:v,compressionMethod:D,extraFieldExtendedTimestampFlag:x,rawExtraFieldExtendedTimestamp:z,rawExtraFieldNTFS:k,rawExtraFieldAES:S,extraFieldLength:L}})(c=n.assign({},c,{rawFilename:l,rawComment:m,version:b,versionMadeBy:S,lastModDate:k,lastAccessDate:z,creationDate:x,rawExtraField:$,zip64:J,zip64UncompressedSize:le,zip64CompressedSize:ue,zip64Offset:de,zip64DiskNumberStart:fe,password:_,rawPassword:R,level:O,useWebWorkers:V,encryptionStrength:W,extendedTimestamp:I,zipCrypto:U,bufferedWrite:K,keepOrder:N,dataDescriptor:j,dataDescriptorSignature:G,signal:X,msDosCompatible:A,internalFileAttribute:D,externalFileAttribute:C,useCompressionStream:Y})),he=(e=>{const{zip64:t,dataDescriptor:n,dataDescriptorSignature:r}=e;let s,i=new w,a=0;return n&&(i=new w(t?r?24:20:r?16:12),s=Cr(i),r&&(a=4,vr(s,0,134695760))),{dataDescriptorArray:i,dataDescriptorView:s,dataDescriptorOffset:a}})(c),pe=_r(we.localHeaderArray,he.dataDescriptorArray);let ge;ne=pe+te,e.options.usdz&&(ne+=ne+64),e.pendingEntriesSize+=ne;try{ge=await(async(e,r,s,a,o)=>{const{files:c,writer:l}=e,{keepOrder:d,dataDescriptor:h,signal:p}=o,{headerInfo:m}=a,{usdz:b}=e.options,S=t.from(c.values()).pop();let k,z,x,A,D,C,_,R={};c.set(r,R);try{let t;d&&(t=S&&S.lock,R.lock=new y((e=>x=e))),!(o.bufferedWrite||e.writerLocked||e.bufferedWrites&&d)&&h||b?(C=l,await W()):(C=new v,_=new u(C.readable).blob(),C.writable.size=0,k=!0,e.bufferedWrites++,await an(l)),await an(C);const{writable:m}=l;let{diskOffset:T}=l;if(e.addSplitZipSignature){delete e.addSplitZipSignature;const t=new w(4);vr(Cr(t),0,L),await br(m,t),e.offset+=4}b&&((e,t)=>{const{headerInfo:n}=e;let{localHeaderArray:r,extraFieldLength:s}=n,i=Cr(r),a=64-(t+_r(r))%64;4>a&&(a+=64);const o=new w(a),c=Cr(o);xr(c,0,6534),xr(c,2,a-2);const l=r;n.localHeaderArray=r=new w(_r(l)+a),Dr(r,l),Dr(r,o,_r(l)),i=Cr(r),xr(i,28,s+a),e.metadataSize+=a})(a,e.offset-T),k||(await t,await E(m));const{diskNumber:U}=l;if(D=!0,R.diskNumberStart=U,R=await(async(e,t,{diskNumberStart:r,lock:s},a,o,c)=>{const{headerInfo:l,dataDescriptorInfo:u,metadataSize:d}=a,{localHeaderArray:f,headerArray:h,lastModDate:p,rawLastModDate:g,encrypted:m,compressed:y,version:b,compressionMethod:S,rawExtraFieldExtendedTimestamp:k,extraFieldExtendedTimestampFlag:z,rawExtraFieldNTFS:x,rawExtraFieldAES:v}=l,{dataDescriptorArray:A}=u,{rawFilename:D,lastAccessDate:C,creationDate:_,password:R,rawPassword:W,level:E,zip64:T,zip64UncompressedSize:L,zip64CompressedSize:U,zip64Offset:I,zip64DiskNumberStart:N,zipCrypto:O,dataDescriptor:P,directory:q,versionMadeBy:H,rawComment:B,rawExtraField:M,useWebWorkers:V,onstart:K,onprogress:G,onend:X,signal:Y,encryptionStrength:j,extendedTimestamp:J,msDosCompatible:$,internalFileAttribute:ee,externalFileAttribute:te,useCompressionStream:ne}=c,re={lock:s,versionMadeBy:H,zip64:T,directory:!!q,filenameUTF8:!0,rawFilename:D,commentUTF8:!0,rawComment:B,rawExtraFieldExtendedTimestamp:k,rawExtraFieldNTFS:x,rawExtraFieldAES:v,rawExtraField:M,extendedTimestamp:J,msDosCompatible:$,internalFileAttribute:ee,externalFileAttribute:te,diskNumberStart:r};let se,ie=0,ae=0;const{writable:oe}=t;if(e){e.chunkSize=Q(o),await br(oe,f);const t=e.readable,n=t.size=e.size,r={options:{codecType:ot,level:E,rawPassword:W,password:R,encryptionStrength:j,zipCrypto:m&&O,passwordVerification:m&&O&&g>>8&255,signed:!0,compressed:y,encrypted:m,useWebWorkers:V,useCompressionStream:ne,transferStreams:!1},config:o,streamOptions:{signal:Y,size:n,onstart:K,onprogress:G,onend:X}},s=await xt({readable:t,writable:oe},r);ae=s.inputSize,ie=s.outputSize,se=s.signature,oe.size+=ae}else await br(oe,f);let ce;if(T){let e=4;L&&(e+=8),U&&(e+=8),I&&(e+=8),N&&(e+=4),ce=new w(e)}else ce=new w;return((e,t)=>{const{signature:n,rawExtraFieldZip64:r,compressedSize:s,uncompressedSize:a,headerInfo:o,dataDescriptorInfo:c}=e,{headerView:l,encrypted:u}=o,{dataDescriptorView:d,dataDescriptorOffset:f}=c,{zip64:w,zip64UncompressedSize:h,zip64CompressedSize:p,zipCrypto:g,dataDescriptor:m}=t;if(u&&!g||n===Z||(vr(l,10,n),m&&vr(d,f,n)),w){const e=Cr(r);xr(e,0,1),xr(e,2,_r(r)-4);let t=4;h&&(vr(l,18,F),Ar(e,t,i(a)),t+=8),p&&(vr(l,14,F),Ar(e,t,i(s))),m&&(Ar(d,f+4,i(s)),Ar(d,f+12,i(a)))}else vr(l,14,s),vr(l,18,a),m&&(vr(d,f+4,s),vr(d,f+8,a))})({signature:se,rawExtraFieldZip64:ce,compressedSize:ie,uncompressedSize:ae,headerInfo:l,dataDescriptorInfo:u},c),P&&await br(oe,A),n.assign(re,{uncompressedSize:ae,compressedSize:ie,lastModDate:p,rawLastModDate:g,creationDate:_,lastAccessDate:C,encrypted:m,size:d+ie,compressionMethod:S,version:b,headerArray:h,signature:se,rawExtraFieldZip64:ce,extraFieldExtendedTimestampFlag:z,zip64UncompressedSize:L,zip64CompressedSize:U,zip64Offset:I,zip64DiskNumberStart:N}),re})(s,C,R,a,e.config,o),D=!1,c.set(r,R),R.filename=r,k){await C.writable.getWriter().close();let e=await _;await t,await W(),A=!0,h||(e=await(async(e,t,n,{zipCrypto:r})=>{let s;s=await t.slice(0,26).arrayBuffer(),26!=s.byteLength&&(s=s.slice(0,26));const i=new g(s);return e.encrypted&&!r||vr(i,14,e.signature),e.zip64?(vr(i,18,F),vr(i,22,F)):(vr(i,18,e.compressedSize),vr(i,22,e.uncompressedSize)),await br(n,new w(s)),t.slice(s.byteLength)})(R,e,m,o)),await E(m),R.diskNumberStart=l.diskNumber,T=l.diskOffset,await e.stream().pipeTo(m,{preventClose:!0,preventAbort:!0,signal:p}),m.size+=e.size,A=!1}if(R.offset=e.offset-T,R.zip64)((e,t)=>{const{rawExtraFieldZip64:n,offset:r,diskNumberStart:s}=e,{zip64UncompressedSize:a,zip64CompressedSize:o,zip64Offset:c,zip64DiskNumberStart:l}=t,u=Cr(n);let d=4;a&&(d+=8),o&&(d+=8),c&&(Ar(u,d,i(r)),d+=8),l&&vr(u,d,s)})(R,o);else if(R.offset>=F)throw new f(hr);return e.offset+=R.size,R}catch(t){if(k&&A||!k&&D){if(e.hasCorruptedEntries=!0,t)try{t.corruptedEntry=!0}catch(e){}k?e.offset+=C.writable.size:e.offset=C.writable.size}throw c.delete(r),t}finally{k&&e.bufferedWrites--,x&&x(),z&&z()}async function W(){e.writerLocked=!0;const{lockWriter:t}=e;e.lockWriter=new y((t=>z=()=>{e.writerLocked=!1,t()})),await t}async function E(e){_r(m.localHeaderArray)>l.availableSize&&(l.availableSize=0,await br(e,new w))}})(e,r,s,{headerInfo:we,dataDescriptorInfo:he,metadataSize:pe},c)}finally{e.pendingEntriesSize-=ne}return n.assign(ge,{name:r,comment:d,extraField:ee}),new Fn(ge)})(c,e,r,s),l.add(m),await m}catch(t){throw c.filenames.delete(e),t}finally{l.delete(m);const e=mr.shift();e?e():gr--}}async close(e=new w,n={}){const{pendingAddFileCalls:r,writer:s}=this,{writable:o}=s;for(;r.size;)await y.allSettled(t.from(r));return await(async(e,n,r)=>{const{files:s,writer:o}=e,{diskOffset:c,writable:l}=o;let{diskNumber:u}=o,d=0,h=0,p=e.offset-c,g=s.size;for(const[,e]of s){const{rawFilename:t,rawExtraFieldZip64:n,rawExtraFieldAES:r,rawComment:s,rawExtraFieldNTFS:i,rawExtraField:o,extendedTimestamp:c,extraFieldExtendedTimestampFlag:l,lastModDate:u}=e;let d;if(c){d=new w(9);const e=Cr(d);xr(e,0,P),xr(e,2,5),zr(e,4,l),vr(e,5,a.floor(u.getTime()/1e3))}else d=new w;e.rawExtraFieldCDExtendedTimestamp=d,h+=46+_r(t,s,n,r,i,d,o)}const m=new w(h),y=Cr(m);await an(o);let b=0;for(const[e,n]of t.from(s.values()).entries()){const{offset:t,rawFilename:i,rawExtraFieldZip64:a,rawExtraFieldAES:c,rawExtraFieldCDExtendedTimestamp:u,rawExtraFieldNTFS:f,rawExtraField:w,rawComment:h,versionMadeBy:p,headerArray:g,directory:S,zip64:k,zip64UncompressedSize:z,zip64CompressedSize:x,zip64DiskNumberStart:v,zip64Offset:A,msDosCompatible:D,internalFileAttribute:C,externalFileAttribute:_,diskNumberStart:R,uncompressedSize:W,compressedSize:T}=n,L=_r(a,c,u,f,w);vr(y,d,U),xr(y,d+4,p);const I=Cr(g);z||vr(I,18,W),x||vr(I,14,T),Dr(m,g,d+6),xr(y,d+30,L),xr(y,d+32,_r(h)),xr(y,d+34,k&&v?E:R),xr(y,d+36,C),_?vr(y,d+38,_):S&&D&&zr(y,d+38,16),vr(y,d+42,k&&A?F:t),Dr(m,i,d+46),Dr(m,a,d+46+_r(i)),Dr(m,c,d+46+_r(i,a)),Dr(m,u,d+46+_r(i,a,c)),Dr(m,f,d+46+_r(i,a,c,u)),Dr(m,w,d+46+_r(i,a,c,u,f)),Dr(m,h,d+46+_r(i)+L);const N=46+_r(i,h)+L;if(d-b>o.availableSize&&(o.availableSize=0,await br(l,m.slice(b,d)),b=d),d+=N,r.onprogress)try{await r.onprogress(e+1,s.size,new Fn(n))}catch(e){}}await br(l,b?m.slice(b):m);let S=o.diskNumber;const{availableSize:k}=o;O>k&&S++;let z=kr(e,r,"zip64");if(!(F>p&&F>h&&E>g&&E>S)){if(!1===z)throw new f(hr);z=!0}const x=new w(z?98:O),v=Cr(x);d=0,z&&(vr(v,0,I),Ar(v,4,i(44)),xr(v,12,45),xr(v,14,45),vr(v,16,S),vr(v,20,u),Ar(v,24,i(g)),Ar(v,32,i(g)),Ar(v,40,i(h)),Ar(v,48,i(p)),vr(v,56,N),Ar(v,64,i(p)+i(h)),vr(v,72,S+1),kr(e,r,"supportZip64SplitFile",!0)&&(S=E,u=E),g=E,p=F,h=F,d+=76),vr(v,d,101010256),xr(v,d+4,S),xr(v,d+6,u),xr(v,d+8,g),xr(v,d+10,g),vr(v,d+12,h),vr(v,d+16,p);const A=_r(n);if(A){if(A>E)throw new f(or);xr(v,d+20,A)}await br(l,x),A&&await br(l,n)})(this,e,n),kr(this,n,"preventClose")||await o.getWriter().close(),s.getData?s.getData():o}}async function br(e,t){const n=e.getWriter();try{await n.ready,e.size+=_r(t),await n.write(t)}finally{n.releaseLock()}}function Sr(e){if(e)return(i(e.getTime())+i(116444736e5))*i(1e4)}function kr(e,t,n,r){const s=t[n]===Z?e.options[n]:t[n];return s===Z?r:s}function zr(e,t,n){e.setUint8(t,n)}function xr(e,t,n){e.setUint16(t,n,!0)}function vr(e,t,n){e.setUint32(t,n,!0)}function Ar(e,t,n){e.setBigUint64(t,n,!0)}function Dr(e,t,n){e.set(t,n)}function Cr(e){return new g(e.buffer)}function _r(...e){let t=0;return e.forEach((e=>e&&(t+=e.length))),t}class Rr{constructor(e,t,r,s){const i=this;if(e.root&&s&&s.getChildByName(t))throw new f("Entry filename already exists");r||(r={}),n.assign(i,{fs:e,name:t,data:r.data,options:r.options,id:e.entries.length,parent:s,children:[],uncompressedSize:r.uncompressedSize||0}),e.entries.push(i),s&&i.parent.children.push(i)}moveTo(e){this.fs.move(this,e)}getFullname(){return this.getRelativeName()}getRelativeName(e=this.fs.root){let t=this.name,n=this.parent;for(;n&&n!=e;)t=(n.name?n.name+"/":"")+t,n=n.parent;return t}isDescendantOf(e){let t=this.parent;for(;t&&t.id!=e.id;)t=t.parent;return!!t}rename(e){const t=this.parent;if(t&&t.getChildByName(e))throw new f("Entry filename already exists");this.name=e}}class Wr extends Rr{constructor(e,t,n,r){super(e,t,n,r);const s=this;s.Reader=n.Reader,s.Writer=n.Writer,n.getData&&(s.getData=n.getData)}clone(){return new Wr(this.fs,this.name,this)}async getData(e,t={}){const n=this;if(!e||e.constructor==n.Writer&&n.data)return n.data;{const r=n.reader=new n.Reader(n.data,t),s=n.data?n.data.uncompressedSize:r.size;await y.all([an(r),an(e,s)]);const i=r.readable;return i.size=n.uncompressedSize=r.size,await i.pipeTo(e.writable),e.getData?e.getData():e.writable}}isPasswordProtected(){return this.data.encrypted}async checkPassword(e,t={}){const n=this;if(!n.isPasswordProtected())return!0;t.password=e,t.checkPasswordOnly=!0;try{return await n.data.getData(null,t),!0}catch(e){if(e.message==fe)return!1;throw e}}getText(e,t){return this.getData(new qt(e),t)}getBlob(e,t){return this.getData(new Ot(e),t)}getData64URI(e,t){return this.getData(new It(e),t)}getUint8Array(e){return this.getData(new nn,e)}getWritable(e=new D,t){return this.getData({writable:e},t)}replaceBlob(e){n.assign(this,{data:e,Reader:Nt,Writer:Ot,reader:null})}replaceText(e){n.assign(this,{data:e,Reader:Pt,Writer:qt,reader:null})}replaceData64URI(e){n.assign(this,{data:e,Reader:Ut,Writer:It,reader:null})}replaceUint8Array(e){n.assign(this,{data:e,Reader:tn,Writer:nn,reader:null})}replaceReadable(e){n.assign(this,{data:null,Reader:()=>({readable:e}),Writer:null,reader:null})}}class Fr extends Rr{constructor(e,t,n,r){super(e,t,n,r),this.directory=!0}clone(e){const t=this,n=new Fr(t.fs,t.name);return e&&(n.children=t.children.map((t=>{const r=t.clone(e);return r.parent=n,r}))),n}addDirectory(e,t){return Pr(this,e,{options:t},!0)}addText(e,t,n={}){return Pr(this,e,{data:t,Reader:Pt,Writer:qt,options:n,uncompressedSize:t.length})}addBlob(e,t,n={}){return Pr(this,e,{data:t,Reader:Nt,Writer:Ot,options:n,uncompressedSize:t.size})}addData64URI(e,t,n={}){let r=t.length;for(;"="==t.charAt(r-1);)r--;const s=t.indexOf(",")+1;return Pr(this,e,{data:t,Reader:Ut,Writer:It,options:n,uncompressedSize:a.floor(.75*(r-s))})}addUint8Array(e,t,n={}){return Pr(this,e,{data:t,Reader:tn,Writer:nn,options:n,uncompressedSize:t.length})}addHttpContent(e,t,n={}){return Pr(this,e,{data:t,Reader:class extends en{constructor(e){super(e,n)}},options:n})}addReadable(e,t,n={}){return Pr(this,e,{Reader:()=>({readable:t}),options:n})}addFileSystemEntry(e,t={}){return Ir(this,e,t)}addFileSystemHandle(e,t={}){return Ir(this,e,t)}addFile(e,t={}){return t.lastModDate||(t.lastModDate=new o(e.lastModified)),Pr(this,e.name,{data:e,Reader:()=>({readable:e.stream(),size:e.size}),options:t,uncompressedSize:e.size})}addData(e,t){return Pr(this,e,t)}importBlob(e,t){return this.importZip(new Nt(e),t)}importData64URI(e,t){return this.importZip(new Ut(e),t)}importUint8Array(e,t){return this.importZip(new tn(e),t)}importHttpContent(e,t){return this.importZip(new en(e,t),t)}importReadable(e,t){return this.importZip({readable:e},t)}exportBlob(e={}){return this.exportZip(new Ot(e.mimeType||"application/zip"),e)}exportData64URI(e={}){return this.exportZip(new It(e.mimeType||"application/zip"),e)}exportUint8Array(e={}){return this.exportZip(new nn,e)}async exportWritable(e=new D,t={}){return await this.exportZip({writable:e},t),e}async importZip(e,t={}){await an(e);const r=new Gn(e,t),s=[],i=await r.getEntries();for(const e of i){let r=this;try{const i=e.filename.split("/"),a=i.pop();i.forEach(((t,n)=>{const a=r;r=r.getChildByName(t),r||(r=new Fr(this.fs,t,{data:n==i.length-1?e:null},a),s.push(r))})),e.directory||s.push(Pr(r,a,{data:e,Reader:Tr(n.assign({},t)),uncompressedSize:e.uncompressedSize}))}catch(t){try{t.cause={entry:e}}catch(e){}throw t}}return s}async exportZip(e,r){const s=this;r.bufferedWrite===Z&&(r.bufferedWrite=!0),await y.all([Lr(s,r.readerOptions),an(e)]);const i=new yr(e,r);return await(async(e,r,s,i)=>{const a=r,o=new c;await async function e(r,c){async function l(c){const l=i.relativePath?c.getRelativeName(a):c.getFullname();let u=c.options||{},d={};if(c.data instanceof Fn){const{externalFileAttribute:e,versionMadeBy:t,comment:n,lastModDate:r,creationDate:s,lastAccessDate:i}=c.data;d={externalFileAttribute:e,versionMadeBy:t,comment:n,lastModDate:r,creationDate:s,lastAccessDate:i}}await r.add(l,c.reader,n.assign({directory:c.directory},n.assign({},i,d,u,{onprogress:async e=>{if(i.onprogress){o.set(l,e);try{await i.onprogress(t.from(o.values()).reduce(((e,t)=>e+t)),s)}catch(e){}}}}))),await e(r,c)}await(async()=>{if(i.bufferedWrite)await y.allSettled(c.children.map(l));else for(const e of c.children)await l(e)})()}(e,r)})(i,s,(e=>{let t=0;return e.forEach((function e(n){t+=n.uncompressedSize,n.children&&n.children.forEach(e)})),t})([s]),r),await i.close(),e.getData?e.getData():e.writable}getChildByName(e){const t=this.children;for(let n=0;nn.checkPassword(e,t))))).includes(!1)}}const Er={FS:class{constructor(){Or(this)}get children(){return this.root.children}remove(e){Ur(e),this.entries[e.id]=null}move(e,t){if(e==this.root)throw new f("Root directory cannot be moved");if(!t.directory)throw new f("Target entry is not a directory");if(t.isDescendantOf(e))throw new f("Entry is a ancestor of target entry");if(e!=t){if(t.getChildByName(e.name))throw new f("Entry filename already exists");Ur(e),e.parent=t,t.children.push(e)}}find(e){const t=e.split("/");let n=this.root;for(let e=0;n&&e{if(e.directory)await Lr(e,t);else{const n=e.reader=new e.Reader(e.data,t);try{await an(n)}catch(t){try{t.entryId=e.id,t.cause={entry:e}}catch(e){}throw t}e.uncompressedSize=n.size}})))}function Ur(e){if(e.parent){const t=e.parent.children;t.forEach(((n,r)=>{n.id==e.id&&t.splice(r,1)}))}}async function Ir(e,t,r){return async function e(t,s,i){if(s)try{if((s.isFile||s.isDirectory)&&(s=await Nr(s)),"file"==s.kind){const e=await s.getFile();i.push(t.addData(e.name,{Reader:()=>({readable:e.stream(),size:e.size}),options:n.assign({},{lastModDate:new o(e.lastModified)},r),uncompressedSize:e.size}))}else if("directory"==s.kind){const n=t.addDirectory(s.name);i.push(n);for await(const t of s.values())await e(n,t,i)}}catch(e){const t=e.message+(s?" ("+s.name+")":"");throw new f(t)}return i}(e,t,[])}async function Nr(e){const t={name:e.name};if(e.isFile&&(t.kind="file",t.getFile=()=>new y(((t,n)=>e.file(t,n)))),e.isDirectory){t.kind="directory";const n=await(async e=>{const t=[];function n(e,r,s){e.readEntries((async i=>{if(i.length){for(const e of i)t.push(await Nr(e));n(e,r,s)}else r(t)}),s)}return await new y(((t,r)=>n(e.createReader(),t,r))),{[Symbol.iterator](){let e=0;return{next(){const n={value:t[e],done:e===t.length};return e++,n}}}}})(e);t.values=()=>n}return t}function Or(e){e.entries=[],e.root=new Fr(e)}function Pr(e,t,n,r){if(e.directory)return r?new Fr(e.fs,t,n,e):new Wr(e.fs,t,n,e);throw new f("Parent entry is not a directory")}let qr;try{qr=void 0===k&&"undefined"==typeof location?new(require("url").URL)("file:"+__filename).href:void 0===k?location.href:k.currentScript&&k.currentScript.src||new d("zip-fs.min.js",k.baseURI).href}catch(e){}$({baseURL:qr}),(e=>{const t=()=>d.createObjectURL(new m(['const{Array:e,Object:t,Number:n,Math:r,Error:s,Uint8Array:i,Uint16Array:o,Uint32Array:c,Int32Array:f,Map:a,DataView:l,Promise:u,TextEncoder:w,crypto:h,postMessage:d,TransformStream:p,ReadableStream:y,WritableStream:m,CompressionStream:b,DecompressionStream:g}=self,k=void 0,v="undefined",S="function";class z{constructor(e){return class extends p{constructor(t,n){const r=new e(n);super({transform(e,t){t.enqueue(r.append(e))},flush(e){const t=r.flush();t&&e.enqueue(t)}})}}}}const C=[];for(let e=0;256>e;e++){let t=e;for(let e=0;8>e;e++)1&t?t=t>>>1^3988292384:t>>>=1;C[e]=t}class x{constructor(e){this.t=e||-1}append(e){let t=0|this.t;for(let n=0,r=0|e.length;r>n;n++)t=t>>>8^C[255&(t^e[n])];this.t=t}get(){return~this.t}}class A extends p{constructor(){let e;const t=new x;super({transform(e,n){t.append(e),n.enqueue(e)},flush(){const n=new i(4);new l(n.buffer).setUint32(0,t.get()),e.value=n}}),e=this}}const _={concat(e,t){if(0===e.length||0===t.length)return e.concat(t);const n=e[e.length-1],r=_.i(n);return 32===r?e.concat(t):_.o(t,r,0|n,e.slice(0,e.length-1))},l(e){const t=e.length;if(0===t)return 0;const n=e[t-1];return 32*(t-1)+_.i(n)},u(e,t){if(32*e.length0&&t&&(e[n-1]=_.h(t,e[n-1]&2147483648>>t-1,1)),e},h:(e,t,n)=>32===e?t:(n?0|t:t<<32-e)+1099511627776*e,i:e=>r.round(e/1099511627776)||32,o(e,t,n,r){for(void 0===r&&(r=[]);t>=32;t-=32)r.push(n),n=0;if(0===t)return r.concat(e);for(let s=0;s>>t),n=e[s]<<32-t;const s=e.length?e[e.length-1]:0,i=_.i(s);return r.push(_.h(t+i&31,t+i>32?n:r.pop(),1)),r}},I={p:{m(e){const t=_.l(e)/8,n=new i(t);let r;for(let s=0;t>s;s++)0==(3&s)&&(r=e[s/4]),n[s]=r>>>24,r<<=8;return n},g(e){const t=[];let n,r=0;for(n=0;n9007199254740991)throw new s("Cannot hash more than 2^53 - 1 bits");const o=new c(n);let f=0;for(let e=t.blockSize+r-(t.blockSize+r&t.blockSize-1);i>=e;e+=t.blockSize)t.I(o.subarray(16*f,16*(f+1))),f+=1;return n.splice(0,16*f),t}P(){const e=this;let t=e.C;const n=e.S;t=_.concat(t,[_.h(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(r.floor(e.A/4294967296)),t.push(0|e.A);t.length;)e.I(t.splice(0,16));return e.reset(),n}D(e,t,n,r){return e>19?e>39?e>59?e>79?void 0:t^n^r:t&n|t&r|n&r:t^n^r:t&n|~t&r}V(e,t){return t<>>32-e}I(t){const n=this,s=n.S,i=e(80);for(let e=0;16>e;e++)i[e]=t[e];let o=s[0],c=s[1],f=s[2],a=s[3],l=s[4];for(let e=0;79>=e;e++){16>e||(i[e]=n.V(1,i[e-3]^i[e-8]^i[e-14]^i[e-16]));const t=n.V(5,o)+n.D(e,c,f,a)+l+i[e]+n.v[r.floor(e/20)]|0;l=a,a=f,f=n.V(30,c),c=o,o=t}s[0]=s[0]+o|0,s[1]=s[1]+c|0,s[2]=s[2]+f|0,s[3]=s[3]+a|0,s[4]=s[4]+l|0}},D={getRandomValues(e){const t=new c(e.buffer),n=e=>{let t=987654321;const n=4294967295;return()=>(t=36969*(65535&t)+(t>>16)&n,(((t<<16)+(e=18e3*(65535&e)+(e>>16)&n)&n)/4294967296+.5)*(r.random()>.5?1:-1))};for(let s,i=0;inew V.R(I.p.g(e)),B(e,t,n,r){if(n=n||1e4,0>r||0>n)throw new s("invalid params to pbkdf2");const i=1+(r>>5)<<2;let o,c,f,a,u;const w=new ArrayBuffer(i),h=new l(w);let d=0;const p=_;for(t=I.p.g(t),u=1;(i||1)>d;u++){for(o=c=e.encrypt(p.concat(t,[u])),f=1;n>f;f++)for(c=e.encrypt(c),a=0;ad&&fs&&(e=(new n).update(e).P());for(let t=0;s>t;t++)r[0][t]=909522486^e[t],r[1][t]=1549556828^e[t];t.U[0].update(r[0]),t.U[1].update(r[1]),t.K=new n(t.U[0])}reset(){const e=this;e.K=new e.M(e.U[0]),e.N=!1}update(e){this.N=!0,this.K.update(e)}digest(){const e=this,t=e.K.P(),n=new e.M(e.U[1]).update(t).P();return e.reset(),n}encrypt(e){if(this.N)throw new s("encrypt on already updated hmac called!");return this.update(e),this.digest(e)}}},R=typeof h!=v&&typeof h.getRandomValues==S,B="Invalid password",E="Invalid signature",M="zipjs-abort-check-password";function U(e){return R?h.getRandomValues(e):D.getRandomValues(e)}const K=16,N={name:"PBKDF2"},O=t.assign({hash:{name:"HMAC"}},N),T=t.assign({iterations:1e3,hash:{name:"SHA-1"}},N),W=["deriveBits"],j=[8,12,16],H=[16,24,32],L=10,F=[0,0,0,0],q=typeof h!=v,G=q&&h.subtle,J=q&&typeof G!=v,Q=I.p,X=class{constructor(e){const t=this;t.O=[[[],[],[],[],[]],[[],[],[],[],[]]],t.O[0][0][0]||t.T();const n=t.O[0][4],r=t.O[1],i=e.length;let o,c,f,a=1;if(4!==i&&6!==i&&8!==i)throw new s("invalid aes key size");for(t.v=[c=e.slice(0),f=[]],o=i;4*i+28>o;o++){let e=c[o-1];(o%i==0||8===i&&o%i==4)&&(e=n[e>>>24]<<24^n[e>>16&255]<<16^n[e>>8&255]<<8^n[255&e],o%i==0&&(e=e<<8^e>>>24^a<<24,a=a<<1^283*(a>>7))),c[o]=c[o-i]^e}for(let e=0;o;e++,o--){const t=c[3&e?o:o-4];f[e]=4>=o||4>e?t:r[0][n[t>>>24]]^r[1][n[t>>16&255]]^r[2][n[t>>8&255]]^r[3][n[255&t]]}}encrypt(e){return this.W(e,0)}decrypt(e){return this.W(e,1)}T(){const e=this.O[0],t=this.O[1],n=e[4],r=t[4],s=[],i=[];let o,c,f,a;for(let e=0;256>e;e++)i[(s[e]=e<<1^283*(e>>7))^e]=e;for(let l=o=0;!n[l];l^=c||1,o=i[o]||1){let i=o^o<<1^o<<2^o<<3^o<<4;i=i>>8^255&i^99,n[l]=i,r[i]=l,a=s[f=s[c=s[l]]];let u=16843009*a^65537*f^257*c^16843008*l,w=257*s[i]^16843008*i;for(let n=0;4>n;n++)e[n][l]=w=w<<24^w>>>8,t[n][i]=u=u<<24^u>>>8}for(let n=0;5>n;n++)e[n]=e[n].slice(0),t[n]=t[n].slice(0)}W(e,t){if(4!==e.length)throw new s("invalid aes block size");const n=this.v[t],r=n.length/4-2,i=[0,0,0,0],o=this.O[t],c=o[0],f=o[1],a=o[2],l=o[3],u=o[4];let w,h,d,p=e[0]^n[0],y=e[t?3:1]^n[1],m=e[2]^n[2],b=e[t?1:3]^n[3],g=4;for(let e=0;r>e;e++)w=c[p>>>24]^f[y>>16&255]^a[m>>8&255]^l[255&b]^n[g],h=c[y>>>24]^f[m>>16&255]^a[b>>8&255]^l[255&p]^n[g+1],d=c[m>>>24]^f[b>>16&255]^a[p>>8&255]^l[255&y]^n[g+2],b=c[b>>>24]^f[p>>16&255]^a[y>>8&255]^l[255&m]^n[g+3],g+=4,p=w,y=h,m=d;for(let e=0;4>e;e++)i[t?3&-e:e]=u[p>>>24]<<24^u[y>>16&255]<<16^u[m>>8&255]<<8^u[255&b]^n[g++],w=p,p=y,y=m,m=b,b=w;return i}},Y=class{constructor(e,t){this.j=e,this.H=t,this.L=t}reset(){this.L=this.H}update(e){return this.F(this.j,e,this.L)}q(e){if(255==(e>>24&255)){let t=e>>16&255,n=e>>8&255,r=255&e;255===t?(t=0,255===n?(n=0,255===r?r=0:++r):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=r}else e+=1<<24;return e}G(e){0===(e[0]=this.q(e[0]))&&(e[1]=this.q(e[1]))}F(e,t,n){let r;if(!(r=t.length))return[];const s=_.l(t);for(let s=0;r>s;s+=4){this.G(n);const r=e.encrypt(n);t[s]^=r[0],t[s+1]^=r[1],t[s+2]^=r[2],t[s+3]^=r[3]}return _.u(t,s)}},Z=V.R;let $=q&&J&&typeof G.importKey==S,ee=q&&J&&typeof G.deriveBits==S;class te extends p{constructor({password:e,rawPassword:n,signed:r,encryptionStrength:o,checkPasswordOnly:c}){super({start(){t.assign(this,{ready:new u((e=>this.J=e)),password:ie(e,n),signed:r,X:o-1,pending:new i})},async transform(e,t){const n=this,{password:r,X:o,J:f,ready:a}=n;r?(await(async(e,t,n,r)=>{const i=await se(e,t,n,ce(r,0,j[t])),o=ce(r,j[t]);if(i[0]!=o[0]||i[1]!=o[1])throw new s(B)})(n,o,r,ce(e,0,j[o]+2)),e=ce(e,j[o]+2),c?t.error(new s(M)):f()):await a;const l=new i(e.length-L-(e.length-L)%K);t.enqueue(re(n,e,l,0,L,!0))},async flush(e){const{signed:t,Y:n,Z:r,pending:o,ready:c}=this;if(r&&n){await c;const f=ce(o,0,o.length-L),a=ce(o,o.length-L);let l=new i;if(f.length){const e=ae(Q,f);r.update(e);const t=n.update(e);l=fe(Q,t)}if(t){const e=ce(fe(Q,r.digest()),0,L);for(let t=0;L>t;t++)if(e[t]!=a[t])throw new s(E)}e.enqueue(l)}}})}}class ne extends p{constructor({password:e,rawPassword:n,encryptionStrength:r}){let s;super({start(){t.assign(this,{ready:new u((e=>this.J=e)),password:ie(e,n),X:r-1,pending:new i})},async transform(e,t){const n=this,{password:r,X:s,J:o,ready:c}=n;let f=new i;r?(f=await(async(e,t,n)=>{const r=U(new i(j[t]));return oe(r,await se(e,t,n,r))})(n,s,r),o()):await c;const a=new i(f.length+e.length-e.length%K);a.set(f,0),t.enqueue(re(n,e,a,f.length,0))},async flush(e){const{Y:t,Z:n,pending:r,ready:o}=this;if(n&&t){await o;let c=new i;if(r.length){const e=t.update(ae(Q,r));n.update(e),c=fe(Q,e)}s.signature=fe(Q,n.digest()).slice(0,L),e.enqueue(oe(c,s.signature))}}}),s=this}}function re(e,t,n,r,s,o){const{Y:c,Z:f,pending:a}=e,l=t.length-s;let u;for(a.length&&(t=oe(a,t),n=((e,t)=>{if(t&&t>e.length){const n=e;(e=new i(t)).set(n,0)}return e})(n,l-l%K)),u=0;l-K>=u;u+=K){const e=ae(Q,ce(t,u,u+K));o&&f.update(e);const s=c.update(e);o||f.update(s),n.set(fe(Q,s),u+r)}return e.pending=ce(t,u),n}async function se(n,r,s,o){n.password=null;const c=await(async(e,t,n,r,s)=>{if(!$)return V.importKey(t);try{return await G.importKey("raw",t,n,!1,s)}catch(e){return $=!1,V.importKey(t)}})(0,s,O,0,W),f=await(async(e,t,n)=>{if(!ee)return V.B(t,e.salt,T.iterations,n);try{return await G.deriveBits(e,t,n)}catch(r){return ee=!1,V.B(t,e.salt,T.iterations,n)}})(t.assign({salt:o},T),c,8*(2*H[r]+2)),a=new i(f),l=ae(Q,ce(a,0,H[r])),u=ae(Q,ce(a,H[r],2*H[r])),w=ce(a,2*H[r]);return t.assign(n,{keys:{key:l,$:u,passwordVerification:w},Y:new Y(new X(l),e.from(F)),Z:new Z(u)}),w}function ie(e,t){return t===k?(e=>{if(typeof w==v){const t=new i((e=unescape(encodeURIComponent(e))).length);for(let n=0;n>>24]),i=~e.te.get(),e.keys=[n,s,i]}function ye(e){const t=2|e.keys[2];return me(r.imul(t,1^t)>>>8)}function me(e){return 255&e}function be(e){return 4294967295&e}const ge="deflate-raw";class ke extends p{constructor(e,{chunkSize:t,CompressionStream:n,CompressionStreamNative:r}){super({});const{compressed:s,encrypted:i,useCompressionStream:o,zipCrypto:c,signed:f,level:a}=e,u=this;let w,h,d=Se(super.readable);i&&!c||!f||(w=new A,d=xe(d,w)),s&&(d=Ce(d,o,{level:a,chunkSize:t},r,n)),i&&(c?d=xe(d,new ue(e)):(h=new ne(e),d=xe(d,h))),ze(u,d,(()=>{let e;i&&!c&&(e=h.signature),i&&!c||!f||(e=new l(w.value.buffer).getUint32(0)),u.signature=e}))}}class ve extends p{constructor(e,{chunkSize:t,DecompressionStream:n,DecompressionStreamNative:r}){super({});const{zipCrypto:i,encrypted:o,signed:c,signature:f,compressed:a,useCompressionStream:u}=e;let w,h,d=Se(super.readable);o&&(i?d=xe(d,new le(e)):(h=new te(e),d=xe(d,h))),a&&(d=Ce(d,u,{chunkSize:t},r,n)),o&&!i||!c||(w=new A,d=xe(d,w)),ze(this,d,(()=>{if((!o||i)&&c){const e=new l(w.value.buffer);if(f!=e.getUint32(0,!1))throw new s(E)}}))}}function Se(e){return xe(e,new p({transform(e,t){e&&e.length&&t.enqueue(e)}}))}function ze(e,n,r){n=xe(n,new p({flush:r})),t.defineProperty(e,"readable",{get:()=>n})}function Ce(e,t,n,r,s){try{e=xe(e,new(t&&r?r:s)(ge,n))}catch(r){if(!t)return e;try{e=xe(e,new s(ge,n))}catch(t){return e}}return e}function xe(e,t){return e.pipeThrough(t)}const Ae="data",_e="close";class Ie extends p{constructor(e,n){super({});const r=this,{codecType:s}=e;let i;s.startsWith("deflate")?i=ke:s.startsWith("inflate")&&(i=ve);let o=0,c=0;const f=new i(e,n),a=super.readable,l=new p({transform(e,t){e&&e.length&&(c+=e.length,t.enqueue(e))},flush(){t.assign(r,{inputSize:c})}}),u=new p({transform(e,t){e&&e.length&&(o+=e.length,t.enqueue(e))},flush(){const{signature:e}=f;t.assign(r,{signature:e,outputSize:o,inputSize:c})}});t.defineProperty(r,"readable",{get:()=>a.pipeThrough(l).pipeThrough(f).pipeThrough(u)})}}class Pe extends p{constructor(e){let t;super({transform:function n(r,s){if(t){const e=new i(t.length+r.length);e.set(t),e.set(r,t.length),r=e,t=null}r.length>e?(s.enqueue(r.slice(0,e)),n(r.slice(e),s)):t=r},flush(e){t&&t.length&&e.enqueue(t)}})}}const De=new a,Ve=new a;let Re,Be=0,Ee=!0;async function Me(e){try{const{options:t,scripts:r,config:s}=e;if(r&&r.length)try{Ee?importScripts.apply(k,r):await Ue(r)}catch(e){Ee=!1,await Ue(r)}self.initCodec&&self.initCodec(),s.CompressionStreamNative=self.CompressionStream,s.DecompressionStreamNative=self.DecompressionStream,self.Deflate&&(s.CompressionStream=new z(self.Deflate)),self.Inflate&&(s.DecompressionStream=new z(self.Inflate));const i={highWaterMark:1},o=e.readable||new y({async pull(e){const t=new u((e=>De.set(Be,e)));Ke({type:"pull",messageId:Be}),Be=(Be+1)%n.MAX_SAFE_INTEGER;const{value:r,done:s}=await t;e.enqueue(r),s&&e.close()}},i),c=e.writable||new m({async write(e){let t;const r=new u((e=>t=e));Ve.set(Be,t),Ke({type:Ae,value:e,messageId:Be}),Be=(Be+1)%n.MAX_SAFE_INTEGER,await r}},i),f=new Ie(t,s);Re=new AbortController;const{signal:a}=Re;await o.pipeThrough(f).pipeThrough(new Pe(s.chunkSize)).pipeTo(c,{signal:a,preventClose:!0,preventAbort:!0}),await c.getWriter().close();const{signature:l,inputSize:w,outputSize:h}=f;Ke({type:_e,result:{signature:l,inputSize:w,outputSize:h}})}catch(e){Ne(e)}}async function Ue(e){for(const t of e)await import(t)}function Ke(e){let{value:t}=e;if(t)if(t.length)try{t=new i(t),e.value=t.buffer,d(e,[e.value])}catch(t){d(e)}else d(e);else d(e)}function Ne(e=new s("Unknown error")){const{message:t,stack:n,code:r,name:i}=e;d({error:{message:t,stack:n,code:r,name:i}})}addEventListener("message",(({data:e})=>{const{type:t,messageId:n,value:r,done:s}=e;try{if("start"==t&&Me(e),t==Ae){const e=De.get(n);De.delete(n),e({value:new i(r),done:s})}if("ack"==t){const e=Ve.get(n);Ve.delete(n),e()}t==_e&&Re.abort()}catch(e){Ne(e)}}));const Oe=-2;function Te(t){return We(t.map((([t,n])=>new e(t).fill(n,0,t))))}function We(t){return t.reduce(((t,n)=>t.concat(e.isArray(n)?We(n):n)),[])}const je=[0,1,2,3].concat(...Te([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function He(){const e=this;function t(e,t){let n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1}e.ne=n=>{const s=e.re,i=e.ie.se,o=e.ie.oe;let c,f,a,l=-1;for(n.ce=0,n.fe=573,c=0;o>c;c++)0!==s[2*c]?(n.ae[++n.ce]=l=c,n.le[c]=0):s[2*c+1]=0;for(;2>n.ce;)a=n.ae[++n.ce]=2>l?++l:0,s[2*a]=1,n.le[a]=0,n.ue--,i&&(n.we-=i[2*a+1]);for(e.he=l,c=r.floor(n.ce/2);c>=1;c--)n.de(s,c);a=o;do{c=n.ae[1],n.ae[1]=n.ae[n.ce--],n.de(s,1),f=n.ae[1],n.ae[--n.fe]=c,n.ae[--n.fe]=f,s[2*a]=s[2*c]+s[2*f],n.le[a]=r.max(n.le[c],n.le[f])+1,s[2*c+1]=s[2*f+1]=a,n.ae[1]=a++,n.de(s,1)}while(n.ce>=2);n.ae[--n.fe]=n.ae[1],(t=>{const n=e.re,r=e.ie.se,s=e.ie.pe,i=e.ie.ye,o=e.ie.me;let c,f,a,l,u,w,h=0;for(l=0;15>=l;l++)t.be[l]=0;for(n[2*t.ae[t.fe]+1]=0,c=t.fe+1;573>c;c++)f=t.ae[c],l=n[2*n[2*f+1]+1]+1,l>o&&(l=o,h++),n[2*f+1]=l,f>e.he||(t.be[l]++,u=0,i>f||(u=s[f-i]),w=n[2*f],t.ue+=w*(l+u),r&&(t.we+=w*(r[2*f+1]+u)));if(0!==h){do{for(l=o-1;0===t.be[l];)l--;t.be[l]--,t.be[l+1]+=2,t.be[o]--,h-=2}while(h>0);for(l=o;0!==l;l--)for(f=t.be[l];0!==f;)a=t.ae[--c],a>e.he||(n[2*a+1]!=l&&(t.ue+=(l-n[2*a+1])*n[2*a],n[2*a+1]=l),f--)}})(n),((e,n,r)=>{const s=[];let i,o,c,f=0;for(i=1;15>=i;i++)s[i]=f=f+r[i-1]<<1;for(o=0;n>=o;o++)c=e[2*o+1],0!==c&&(e[2*o]=t(s[c]++,c))})(s,e.he,n.be)}}function Le(e,t,n,r,s){const i=this;i.se=e,i.pe=t,i.ye=n,i.oe=r,i.me=s}He.ge=[0,1,2,3,4,5,6,7].concat(...Te([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]])),He.ke=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0],He.ve=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576],He.Se=e=>256>e?je[e]:je[256+(e>>>7)],He.ze=[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],He.Ce=[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],He.xe=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],He.Ae=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];const Fe=Te([[144,8],[112,9],[24,7],[8,8]]);Le._e=We([12,140,76,204,44,172,108,236,28,156,92,220,60,188,124,252,2,130,66,194,34,162,98,226,18,146,82,210,50,178,114,242,10,138,74,202,42,170,106,234,26,154,90,218,58,186,122,250,6,134,70,198,38,166,102,230,22,150,86,214,54,182,118,246,14,142,78,206,46,174,110,238,30,158,94,222,62,190,126,254,1,129,65,193,33,161,97,225,17,145,81,209,49,177,113,241,9,137,73,201,41,169,105,233,25,153,89,217,57,185,121,249,5,133,69,197,37,165,101,229,21,149,85,213,53,181,117,245,13,141,77,205,45,173,109,237,29,157,93,221,61,189,125,253,19,275,147,403,83,339,211,467,51,307,179,435,115,371,243,499,11,267,139,395,75,331,203,459,43,299,171,427,107,363,235,491,27,283,155,411,91,347,219,475,59,315,187,443,123,379,251,507,7,263,135,391,71,327,199,455,39,295,167,423,103,359,231,487,23,279,151,407,87,343,215,471,55,311,183,439,119,375,247,503,15,271,143,399,79,335,207,463,47,303,175,431,111,367,239,495,31,287,159,415,95,351,223,479,63,319,191,447,127,383,255,511,0,64,32,96,16,80,48,112,8,72,40,104,24,88,56,120,4,68,36,100,20,84,52,116,3,131,67,195,35,163,99,227].map(((e,t)=>[e,Fe[t]])));const qe=Te([[30,5]]);function Ge(e,t,n,r,s){const i=this;i.Ie=e,i.Pe=t,i.De=n,i.Ve=r,i.Re=s}Le.Be=We([0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30,1,17,9,25,5,21,13,29,3,19,11,27,7,23].map(((e,t)=>[e,qe[t]]))),Le.Ee=new Le(Le._e,He.ze,257,286,15),Le.Me=new Le(Le.Be,He.Ce,0,30,15),Le.Ue=new Le(null,He.xe,0,19,7);const Je=[new Ge(0,0,0,0,0),new Ge(4,4,8,4,1),new Ge(4,5,16,8,1),new Ge(4,6,32,32,1),new Ge(4,4,16,16,2),new Ge(8,16,32,32,2),new Ge(8,16,128,128,2),new Ge(8,32,128,256,2),new Ge(32,128,258,1024,2),new Ge(32,258,258,4096,2)],Qe=["need dictionary","stream end","","","stream error","data error","","buffer error","",""],Xe=113,Ye=666,Ze=262;function $e(e,t,n,r){const s=e[2*t],i=e[2*n];return i>s||s==i&&r[t]<=r[n]}function et(){const e=this;let t,n,s,c,f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z,C,x,A,_,I,P,D,V,R,B,E,M,U;const K=new He,N=new He,O=new He;let T,W,j,H,L,F;function q(){let t;for(t=0;286>t;t++)E[2*t]=0;for(t=0;30>t;t++)M[2*t]=0;for(t=0;19>t;t++)U[2*t]=0;E[512]=1,e.ue=e.we=0,W=j=0}function G(e,t){let n,r=-1,s=e[1],i=0,o=7,c=4;0===s&&(o=138,c=3),e[2*(t+1)+1]=65535;for(let f=0;t>=f;f++)n=s,s=e[2*(f+1)+1],++ii?U[2*n]+=i:0!==n?(n!=r&&U[2*n]++,U[32]++):i>10?U[36]++:U[34]++,i=0,r=n,0===s?(o=138,c=3):n==s?(o=6,c=3):(o=7,c=4))}function J(t){e.Ke[e.pending++]=t}function Q(e){J(255&e),J(e>>>8&255)}function X(e,t){let n;const r=t;F>16-r?(n=e,L|=n<>>16-F,F+=r-16):(L|=e<=n;n++)if(r=i,i=e[2*(n+1)+1],++o>=c||r!=i){if(f>o)do{Y(r,U)}while(0!=--o);else 0!==r?(r!=s&&(Y(r,U),o--),Y(16,U),X(o-3,2)):o>10?(Y(18,U),X(o-11,7)):(Y(17,U),X(o-3,3));o=0,s=r,0===i?(c=138,f=3):r==i?(c=6,f=3):(c=7,f=4)}}function $(){16==F?(Q(L),L=0,F=0):8>F||(J(255&L),L>>>=8,F-=8)}function ee(t,n){let s,i,o;if(e.Ne[W]=t,e.Oe[W]=255&n,W++,0===t?E[2*n]++:(j++,t--,E[2*(He.ge[n]+256+1)]++,M[2*He.Se(t)]++),0==(8191&W)&&D>2){for(s=8*W,i=C-k,o=0;30>o;o++)s+=M[2*o]*(5+He.Ce[o]);if(s>>>=3,jc);Y(256,t),H=t[513]}function ne(){F>8?Q(L):F>0&&J(255&L),L=0,F=0}function re(t,n,r){X(0+(r?1:0),3),((t,n)=>{ne(),H=8,Q(n),Q(~n),e.Ke.set(u.subarray(t,t+n),e.pending),e.pending+=n})(t,n)}function se(n){((t,n,r)=>{let s,i,o=0;D>0?(K.ne(e),N.ne(e),o=(()=>{let t;for(G(E,K.he),G(M,N.he),O.ne(e),t=18;t>=3&&0===U[2*He.Ae[t]+1];t--);return e.ue+=14+3*(t+1),t})(),s=e.ue+3+7>>>3,i=e.we+3+7>>>3,i>s||(s=i)):s=i=n+5,n+4>s||-1==t?i==s?(X(2+(r?1:0),3),te(Le._e,Le.Be)):(X(4+(r?1:0),3),((e,t,n)=>{let r;for(X(e-257,5),X(t-1,5),X(n-4,4),r=0;n>r;r++)X(U[2*He.Ae[r]+1],3);Z(E,e-1),Z(M,t-1)})(K.he+1,N.he+1,o+1),te(E,M)):re(t,n,r),q(),r&&ne()})(0>k?-1:k,C-k,n),k=C,t.Te()}function ie(){let e,n,r,s;do{if(s=w-A-C,0===s&&0===C&&0===A)s=f;else if(-1==s)s--;else if(C>=f+f-Ze){u.set(u.subarray(f,f+f),0),x-=f,C-=f,k-=f,e=y,r=e;do{n=65535&d[--r],d[r]=f>n?0:n-f}while(0!=--e);e=f,r=e;do{n=65535&h[--r],h[r]=f>n?0:n-f}while(0!=--e);s+=f}if(0===t.We)return;e=t.je(u,C+A,s),A+=e,3>A||(p=255&u[C],p=(p<A&&0!==t.We)}function oe(e){let t,n,r=I,s=C,i=_;const o=C>f-Ze?C-(f-Ze):0;let c=B;const a=l,w=C+258;let d=u[s+i-1],p=u[s+i];R>_||(r>>=2),c>A&&(c=A);do{if(t=e,u[t+i]==p&&u[t+i-1]==d&&u[t]==u[s]&&u[++t]==u[s+1]){s+=2,t++;do{}while(u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&w>s);if(n=258-(w-s),s=w-258,n>i){if(x=e,i=n,n>=c)break;d=u[s+i-1],p=u[s+i]}}}while((e=65535&h[e&a])>o&&0!=--r);return i>A?A:i}e.le=[],e.be=[],e.ae=[],E=[],M=[],U=[],e.de=(t,n)=>{const r=e.ae,s=r[n];let i=n<<1;for(;i<=e.ce&&(i(W||(W=8),j||(j=8),G||(G=0),t.Le=null,-1==S&&(S=6),1>j||j>9||8!=W||9>x||x>15||0>S||S>9||0>G||G>2?Oe:(t.Fe=e,a=x,f=1<(t.qe=t.Ge=0,t.Le=null,e.pending=0,e.Je=0,n=Xe,c=0,K.re=E,K.ie=Le.Ee,N.re=M,N.ie=Le.Me,O.re=U,O.ie=Le.Ue,L=0,F=0,H=8,q(),(()=>{w=2*f,d[y-1]=0;for(let e=0;y-1>e;e++)d[e]=0;P=Je[D].Pe,R=Je[D].Ie,B=Je[D].De,I=Je[D].Ve,C=0,k=0,A=0,v=_=2,z=0,p=0})(),0))(t))),e.Qe=()=>42!=n&&n!=Xe&&n!=Ye?Oe:(e.Oe=null,e.Ne=null,e.Ke=null,d=null,h=null,u=null,e.Fe=null,n==Xe?-3:0),e.Xe=(e,t,n)=>{let r=0;return-1==t&&(t=6),0>t||t>9||0>n||n>2?Oe:(Je[D].Re!=Je[t].Re&&0!==e.qe&&(r=e.Ye(1)),D!=t&&(D=t,P=Je[D].Pe,R=Je[D].Ie,B=Je[D].De,I=Je[D].Ve),V=n,r)},e.Ze=(e,t,r)=>{let s,i=r,o=0;if(!t||42!=n)return Oe;if(3>i)return 0;for(i>f-Ze&&(i=f-Ze,o=r-i),u.set(t.subarray(o,o+i),0),C=i,k=i,p=255&u[0],p=(p<=s;s++)p=(p<{let o,w,m,I,R;if(i>4||0>i)return Oe;if(!r.$e||!r.et&&0!==r.We||n==Ye&&4!=i)return r.Le=Qe[4],Oe;if(0===r.tt)return r.Le=Qe[7],-5;var B;if(t=r,I=c,c=i,42==n&&(w=8+(a-8<<4)<<8,m=(D-1&255)>>1,m>3&&(m=3),w|=m<<6,0!==C&&(w|=32),w+=31-w%31,n=Xe,J((B=w)>>8&255),J(255&B)),0!==e.pending){if(t.Te(),0===t.tt)return c=-1,0}else if(0===t.We&&I>=i&&4!=i)return t.Le=Qe[7],-5;if(n==Ye&&0!==t.We)return r.Le=Qe[7],-5;if(0!==t.We||0!==A||0!=i&&n!=Ye){switch(R=-1,Je[D].Re){case 0:R=(e=>{let n,r=65535;for(r>s-5&&(r=s-5);;){if(1>=A){if(ie(),0===A&&0==e)return 0;if(0===A)break}if(C+=A,A=0,n=k+r,(0===C||C>=n)&&(A=C-n,C=n,se(!1),0===t.tt))return 0;if(C-k>=f-Ze&&(se(!1),0===t.tt))return 0}return se(4==e),0===t.tt?4==e?2:0:4==e?3:1})(i);break;case 1:R=(e=>{let n,r=0;for(;;){if(Ze>A){if(ie(),Ze>A&&0==e)return 0;if(0===A)break}if(3>A||(p=(p<f-Ze||2!=V&&(v=oe(r)),3>v)n=ee(0,255&u[C]),A--,C++;else if(n=ee(C-x,v-3),A-=v,v>P||3>A)C+=v,v=0,p=255&u[C],p=(p<{let n,r,s=0;for(;;){if(Ze>A){if(ie(),Ze>A&&0==e)return 0;if(0===A)break}if(3>A||(p=(p<_&&f-Ze>=(C-s&65535)&&(2!=V&&(v=oe(s)),5>=v&&(1==V||3==v&&C-x>4096)&&(v=2)),3>_||v>_)if(0!==z){if(n=ee(0,255&u[C-1]),n&&se(!1),C++,A--,0===t.tt)return 0}else z=1,C++,A--;else{r=C+A-3,n=ee(C-1-S,_-3),A-=_-1,_-=2;do{++C>r||(p=(p<1+H+10-F&&(X(2,3),Y(256,Le._e),$()),H=7;else if(re(0,0,!1),3==i)for(o=0;y>o;o++)d[o]=0;if(t.Te(),0===t.tt)return c=-1,0}}return 4!=i?0:1}}function tt(){const e=this;e.nt=0,e.rt=0,e.We=0,e.qe=0,e.tt=0,e.Ge=0}function nt(e){const t=new tt,n=(o=e&&e.chunkSize?e.chunkSize:65536)+5*(r.floor(o/16383)+1);var o;const c=new i(n);let f=e?e.level:-1;void 0===f&&(f=-1),t.He(f),t.$e=c,this.append=(e,r)=>{let o,f,a=0,l=0,u=0;const w=[];if(e.length){t.nt=0,t.et=e,t.We=e.length;do{if(t.rt=0,t.tt=n,o=t.Ye(0),0!=o)throw new s("deflating: "+t.Le);t.rt&&(t.rt==n?w.push(new i(c)):w.push(c.subarray(0,t.rt))),u+=t.rt,r&&t.nt>0&&t.nt!=a&&(r(t.nt),a=t.nt)}while(t.We>0||0===t.tt);return w.length>1?(f=new i(u),w.forEach((e=>{f.set(e,l),l+=e.length}))):f=w[0]?new i(w[0]):new i,f}},this.flush=()=>{let e,r,o=0,f=0;const a=[];do{if(t.rt=0,t.tt=n,e=t.Ye(4),1!=e&&0!=e)throw new s("deflating: "+t.Le);n-t.tt>0&&a.push(c.slice(0,t.rt)),f+=t.rt}while(t.We>0||0===t.tt);return t.Qe(),r=new i(f),a.forEach((e=>{r.set(e,o),o+=e.length})),r}}tt.prototype={He(e,t){const n=this;return n.Fe=new et,t||(t=15),n.Fe.He(n,e,t)},Ye(e){const t=this;return t.Fe?t.Fe.Ye(t,e):Oe},Qe(){const e=this;if(!e.Fe)return Oe;const t=e.Fe.Qe();return e.Fe=null,t},Xe(e,t){const n=this;return n.Fe?n.Fe.Xe(n,e,t):Oe},Ze(e,t){const n=this;return n.Fe?n.Fe.Ze(n,e,t):Oe},je(e,t,n){const r=this;let s=r.We;return s>n&&(s=n),0===s?0:(r.We-=s,e.set(r.et.subarray(r.nt,r.nt+s),t),r.nt+=s,r.qe+=s,s)},Te(){const e=this;let t=e.Fe.pending;t>e.tt&&(t=e.tt),0!==t&&(e.$e.set(e.Fe.Ke.subarray(e.Fe.Je,e.Fe.Je+t),e.rt),e.rt+=t,e.Fe.Je+=t,e.Ge+=t,e.tt-=t,e.Fe.pending-=t,0===e.Fe.pending&&(e.Fe.Je=0))}};const rt=-2,st=-3,it=-5,ot=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],ct=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],ft=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],at=[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,0,0],lt=[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,112,112],ut=[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],wt=[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];function ht(){let e,t,n,r,s,i;function o(e,t,o,c,f,a,l,u,w,h,d){let p,y,m,b,g,k,v,S,z,C,x,A,_,I,P;C=0,g=o;do{n[e[t+C]]++,C++,g--}while(0!==g);if(n[0]==o)return l[0]=-1,u[0]=0,0;for(S=u[0],k=1;15>=k&&0===n[k];k++);for(v=k,k>S&&(S=k),g=15;0!==g&&0===n[g];g--);for(m=g,S>g&&(S=g),u[0]=S,I=1<k;k++,I<<=1)if(0>(I-=n[k]))return st;if(0>(I-=n[g]))return st;for(n[g]+=I,i[1]=k=0,C=1,_=2;0!=--g;)i[_]=k+=n[C],_++,C++;g=0,C=0;do{0!==(k=e[t+C])&&(d[i[k]++]=g),C++}while(++g=v;v++)for(p=n[v];0!=p--;){for(;v>A+S;){if(b++,A+=S,P=m-A,P=P>S?S:P,(y=1<<(k=v-A))>p+1&&(y-=p+1,_=v,P>k))for(;++kn[++_];)y-=n[_];if(P=1<1440)return st;s[b]=x=h[0],h[0]+=P,0!==b?(i[b]=g,r[0]=k,r[1]=S,k=g>>>A-S,r[2]=x-s[b-1]-k,w.set(r,3*(s[b-1]+k))):l[0]=x}for(r[1]=v-A,o>C?d[C]d[C]?0:96,r[2]=d[C++]):(r[0]=a[d[C]-c]+16+64,r[2]=f[d[C++]-c]):r[0]=192,y=1<>>A;P>k;k+=y)w.set(r,3*(x+k));for(k=1<>>=1)g^=k;for(g^=k,z=(1<c;c++)t[c]=0;for(c=0;16>c;c++)n[c]=0;for(c=0;3>c;c++)r[c]=0;s.set(n.subarray(0,15),0),i.set(n.subarray(0,16),0)}this.st=(n,r,s,i,f)=>{let a;return c(19),e[0]=0,a=o(n,0,19,19,null,null,s,r,i,e,t),a==st?f.Le="oversubscribed dynamic bit lengths tree":a!=it&&0!==r[0]||(f.Le="incomplete dynamic bit lengths tree",a=st),a},this.it=(n,r,s,i,f,a,l,u,w)=>{let h;return c(288),e[0]=0,h=o(s,0,n,257,at,lt,a,i,u,e,t),0!=h||0===i[0]?(h==st?w.Le="oversubscribed literal/length tree":-4!=h&&(w.Le="incomplete literal/length tree",h=st),h):(c(288),h=o(s,n,r,0,ut,wt,l,f,u,e,t),0!=h||0===f[0]&&n>257?(h==st?w.Le="oversubscribed distance tree":h==it?(w.Le="incomplete distance tree",h=st):-4!=h&&(w.Le="empty distance tree with lengths",h=st),h):0)}}function dt(){const e=this;let t,n,r,s,i=0,o=0,c=0,f=0,a=0,l=0,u=0,w=0,h=0,d=0;function p(e,t,n,r,s,i,o,c){let f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z;d=c.nt,p=c.We,w=o.ot,h=o.ct,y=o.write,m=yh;)p--,w|=(255&c.ft(d++))<>=a[z+1],h-=a[z+1],0!=(16&u)){for(u&=15,k=a[z+2]+(w&ot[u]),w>>=u,h-=u;15>h;)p--,w|=(255&c.ft(d++))<>=a[z+1],h-=a[z+1],0!=(16&u)){for(u&=15;u>h;)p--,w|=(255&c.ft(d++))<>=u,h-=u,m-=k,v>y){S=y-v;do{S+=o.end}while(0>S);if(u=o.end-S,k>u){if(k-=u,y-S>0&&u>y-S)do{o.lt[y++]=o.lt[S++]}while(0!=--u);else o.lt.set(o.lt.subarray(S,S+u),y),y+=u,S+=u,u=0;S=0}}else S=y-v,y-S>0&&2>y-S?(o.lt[y++]=o.lt[S++],o.lt[y++]=o.lt[S++],k-=2):(o.lt.set(o.lt.subarray(S,S+2),y),y+=2,S+=2,k-=2);if(y-S>0&&k>y-S)do{o.lt[y++]=o.lt[S++]}while(0!=--k);else o.lt.set(o.lt.subarray(S,S+k),y),y+=k,S+=k,k=0;break}if(0!=(64&u))return c.Le="invalid distance code",k=c.We-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ot=w,o.ct=h,c.We=p,c.qe+=d-c.nt,c.nt=d,o.write=y,st;f+=a[z+2],f+=w&ot[u],z=3*(l+f),u=a[z]}break}if(0!=(64&u))return 0!=(32&u)?(k=c.We-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ot=w,o.ct=h,c.We=p,c.qe+=d-c.nt,c.nt=d,o.write=y,1):(c.Le="invalid literal/length code",k=c.We-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ot=w,o.ct=h,c.We=p,c.qe+=d-c.nt,c.nt=d,o.write=y,st);if(f+=a[z+2],f+=w&ot[u],z=3*(l+f),0===(u=a[z])){w>>=a[z+1],h-=a[z+1],o.lt[y++]=a[z+2],m--;break}}else w>>=a[z+1],h-=a[z+1],o.lt[y++]=a[z+2],m--}while(m>=258&&p>=10);return k=c.We-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ot=w,o.ct=h,c.We=p,c.qe+=d-c.nt,c.nt=d,o.write=y,0}e.init=(e,i,o,c,f,a)=>{t=0,u=e,w=i,r=o,h=c,s=f,d=a,n=null},e.ut=(e,y,m)=>{let b,g,k,v,S,z,C,x=0,A=0,_=0;for(_=y.nt,v=y.We,x=e.ot,A=e.ct,S=e.write,z=S=258&&v>=10&&(e.ot=x,e.ct=A,y.We=v,y.qe+=_-y.nt,y.nt=_,e.write=S,m=p(u,w,r,h,s,d,e,y),_=y.nt,v=y.We,x=e.ot,A=e.ct,S=e.write,z=SA;){if(0===v)return e.ot=x,e.ct=A,y.We=v,y.qe+=_-y.nt,y.nt=_,e.write=S,e.wt(y,m);m=0,v--,x|=(255&y.ft(_++))<>>=n[g+1],A-=n[g+1],k=n[g],0===k){f=n[g+2],t=6;break}if(0!=(16&k)){a=15&k,i=n[g+2],t=2;break}if(0==(64&k)){c=k,o=g/3+n[g+2];break}if(0!=(32&k)){t=7;break}return t=9,y.Le="invalid literal/length code",m=st,e.ot=x,e.ct=A,y.We=v,y.qe+=_-y.nt,y.nt=_,e.write=S,e.wt(y,m);case 2:for(b=a;b>A;){if(0===v)return e.ot=x,e.ct=A,y.We=v,y.qe+=_-y.nt,y.nt=_,e.write=S,e.wt(y,m);m=0,v--,x|=(255&y.ft(_++))<>=b,A-=b,c=w,n=s,o=d,t=3;case 3:for(b=c;b>A;){if(0===v)return e.ot=x,e.ct=A,y.We=v,y.qe+=_-y.nt,y.nt=_,e.write=S,e.wt(y,m);m=0,v--,x|=(255&y.ft(_++))<>=n[g+1],A-=n[g+1],k=n[g],0!=(16&k)){a=15&k,l=n[g+2],t=4;break}if(0==(64&k)){c=k,o=g/3+n[g+2];break}return t=9,y.Le="invalid distance code",m=st,e.ot=x,e.ct=A,y.We=v,y.qe+=_-y.nt,y.nt=_,e.write=S,e.wt(y,m);case 4:for(b=a;b>A;){if(0===v)return e.ot=x,e.ct=A,y.We=v,y.qe+=_-y.nt,y.nt=_,e.write=S,e.wt(y,m);m=0,v--,x|=(255&y.ft(_++))<>=b,A-=b,t=5;case 5:for(C=S-l;0>C;)C+=e.end;for(;0!==i;){if(0===z&&(S==e.end&&0!==e.read&&(S=0,z=S7&&(A-=8,v++,_--),e.write=S,m=e.wt(y,m),S=e.write,z=S{}}ht.dt=(e,t,n,r)=>(e[0]=9,t[0]=5,n[0]=ct,r[0]=ft,0);const pt=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function yt(e,t){const n=this;let r,s=0,o=0,c=0,a=0;const l=[0],u=[0],w=new dt;let h=0,d=new f(4320);const p=new ht;n.ct=0,n.ot=0,n.lt=new i(t),n.end=t,n.read=0,n.write=0,n.reset=(e,t)=>{t&&(t[0]=0),6==s&&w.ht(e),s=0,n.ct=0,n.ot=0,n.read=n.write=0},n.reset(e,null),n.wt=(e,t)=>{let r,s,i;return s=e.rt,i=n.read,r=(i>n.write?n.end:n.write)-i,r>e.tt&&(r=e.tt),0!==r&&t==it&&(t=0),e.tt-=r,e.Ge+=r,e.$e.set(n.lt.subarray(i,i+r),s),s+=r,i+=r,i==n.end&&(i=0,n.write==n.end&&(n.write=0),r=n.write-i,r>e.tt&&(r=e.tt),0!==r&&t==it&&(t=0),e.tt-=r,e.Ge+=r,e.$e.set(n.lt.subarray(i,i+r),s),s+=r,i+=r),e.rt=s,n.read=i,t},n.ut=(e,t)=>{let i,f,y,m,b,g,k,v;for(m=e.nt,b=e.We,f=n.ot,y=n.ct,g=n.write,k=gy;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<>>1){case 0:f>>>=3,y-=3,i=7&y,f>>>=i,y-=i,s=1;break;case 1:S=[],z=[],C=[[]],x=[[]],ht.dt(S,z,C,x),w.init(S[0],z[0],C[0],0,x[0],0),f>>>=3,y-=3,s=6;break;case 2:f>>>=3,y-=3,s=3;break;case 3:return f>>>=3,y-=3,s=9,e.Le="invalid block type",t=st,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t)}break;case 1:for(;32>y;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<>>16&65535)!=(65535&f))return s=9,e.Le="invalid stored block lengths",t=st,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);o=65535&f,f=y=0,s=0!==o?2:0!==h?7:0;break;case 2:if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);if(0===k&&(g==n.end&&0!==n.read&&(g=0,k=gb&&(i=b),i>k&&(i=k),n.lt.set(e.je(m,i),g),m+=i,b-=i,g+=i,k-=i,0!=(o-=i))break;s=0!==h?7:0;break;case 3:for(;14>y;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<29||(i>>5&31)>29)return s=9,e.Le="too many length or distance symbols",t=st,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);if(i=258+(31&i)+(i>>5&31),!r||r.lengthv;v++)r[v]=0;f>>>=14,y-=14,a=0,s=4;case 4:for(;4+(c>>>10)>a;){for(;3>y;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<>>=3,y-=3}for(;19>a;)r[pt[a++]]=0;if(l[0]=7,i=p.st(r,l,u,d,e),0!=i)return(t=i)==st&&(r=null,s=9),n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);a=0,s=5;case 5:for(;i=c,258+(31&i)+(i>>5&31)>a;){let o,w;for(i=l[0];i>y;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<w)f>>>=i,y-=i,r[a++]=w;else{for(v=18==w?7:w-14,o=18==w?11:3;i+v>y;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<>>=i,y-=i,o+=f&ot[v],f>>>=v,y-=v,v=a,i=c,v+o>258+(31&i)+(i>>5&31)||16==w&&1>v)return r=null,s=9,e.Le="invalid bit length repeat",t=st,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);w=16==w?r[v-1]:0;do{r[v++]=w}while(0!=--o);a=v}}if(u[0]=-1,A=[],_=[],I=[],P=[],A[0]=9,_[0]=6,i=c,i=p.it(257+(31&i),1+(i>>5&31),r,A,_,I,P,d,e),0!=i)return i==st&&(r=null,s=9),t=i,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);w.init(A[0],_[0],d,I[0],d,P[0]),s=6;case 6:if(n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,1!=(t=w.ut(n,e,t)))return n.wt(e,t);if(t=0,w.ht(e),m=e.nt,b=e.We,f=n.ot,y=n.ct,g=n.write,k=g{n.reset(e,null),n.lt=null,d=null},n.yt=(e,t,r)=>{n.lt.set(e.subarray(t,t+r),0),n.read=n.write=r},n.bt=()=>1==s?1:0}const mt=13,bt=[0,0,255,255];function gt(){const e=this;function t(e){return e&&e.gt?(e.qe=e.Ge=0,e.Le=null,e.gt.mode=7,e.gt.kt.reset(e,null),0):rt}e.mode=0,e.method=0,e.vt=[0],e.St=0,e.marker=0,e.zt=0,e.Ct=t=>(e.kt&&e.kt.ht(t),e.kt=null,0),e.xt=(n,r)=>(n.Le=null,e.kt=null,8>r||r>15?(e.Ct(n),rt):(e.zt=r,n.gt.kt=new yt(n,1<{let n,r;if(!e||!e.gt||!e.et)return rt;const s=e.gt;for(t=4==t?it:0,n=it;;)switch(s.mode){case 0:if(0===e.We)return n;if(n=t,e.We--,e.qe++,8!=(15&(s.method=e.ft(e.nt++)))){s.mode=mt,e.Le="unknown compression method",s.marker=5;break}if(8+(s.method>>4)>s.zt){s.mode=mt,e.Le="invalid win size",s.marker=5;break}s.mode=1;case 1:if(0===e.We)return n;if(n=t,e.We--,e.qe++,r=255&e.ft(e.nt++),((s.method<<8)+r)%31!=0){s.mode=mt,e.Le="incorrect header check",s.marker=5;break}if(0==(32&r)){s.mode=7;break}s.mode=2;case 2:if(0===e.We)return n;n=t,e.We--,e.qe++,s.St=(255&e.ft(e.nt++))<<24&4278190080,s.mode=3;case 3:if(0===e.We)return n;n=t,e.We--,e.qe++,s.St+=(255&e.ft(e.nt++))<<16&16711680,s.mode=4;case 4:if(0===e.We)return n;n=t,e.We--,e.qe++,s.St+=(255&e.ft(e.nt++))<<8&65280,s.mode=5;case 5:return 0===e.We?n:(n=t,e.We--,e.qe++,s.St+=255&e.ft(e.nt++),s.mode=6,2);case 6:return s.mode=mt,e.Le="need dictionary",s.marker=0,rt;case 7:if(n=s.kt.ut(e,n),n==st){s.mode=mt,s.marker=0;break}if(0==n&&(n=t),1!=n)return n;n=t,s.kt.reset(e,s.vt),s.mode=12;case 12:return e.We=0,1;case mt:return st;default:return rt}},e._t=(e,t,n)=>{let r=0,s=n;if(!e||!e.gt||6!=e.gt.mode)return rt;const i=e.gt;return s<1<{let n,r,s,i,o;if(!e||!e.gt)return rt;const c=e.gt;if(c.mode!=mt&&(c.mode=mt,c.marker=0),0===(n=e.We))return it;for(r=e.nt,s=c.marker;0!==n&&4>s;)e.ft(r)==bt[s]?s++:s=0!==e.ft(r)?0:4-s,r++,n--;return e.qe+=r-e.nt,e.nt=r,e.We=n,c.marker=s,4!=s?st:(i=e.qe,o=e.Ge,t(e),e.qe=i,e.Ge=o,c.mode=7,0)},e.Pt=e=>e&&e.gt&&e.gt.kt?e.gt.kt.bt():rt}function kt(){}function vt(e){const t=new kt,n=e&&e.chunkSize?r.floor(2*e.chunkSize):131072,o=new i(n);let c=!1;t.xt(),t.$e=o,this.append=(e,r)=>{const f=[];let a,l,u=0,w=0,h=0;if(0!==e.length){t.nt=0,t.et=e,t.We=e.length;do{if(t.rt=0,t.tt=n,0!==t.We||c||(t.nt=0,c=!0),a=t.At(0),c&&a===it){if(0!==t.We)throw new s("inflating: bad input")}else if(0!==a&&1!==a)throw new s("inflating: "+t.Le);if((c||1===a)&&t.We===e.length)throw new s("inflating: bad input");t.rt&&(t.rt===n?f.push(new i(o)):f.push(o.subarray(0,t.rt))),h+=t.rt,r&&t.nt>0&&t.nt!=u&&(r(t.nt),u=t.nt)}while(t.We>0||0===t.tt);return f.length>1?(l=new i(h),f.forEach((e=>{l.set(e,w),w+=e.length}))):l=f[0]?new i(f[0]):new i,l}},this.flush=()=>{t.Ct()}}kt.prototype={xt(e){const t=this;return t.gt=new gt,e||(e=15),t.gt.xt(t,e)},At(e){const t=this;return t.gt?t.gt.At(t,e):rt},Ct(){const e=this;if(!e.gt)return rt;const t=e.gt.Ct(e);return e.gt=null,t},It(){const e=this;return e.gt?e.gt.It(e):rt},_t(e,t){const n=this;return n.gt?n.gt._t(n,e,t):rt},ft(e){return this.et[e]},je(e,t){return this.et.subarray(e,e+t)}},self.initCodec=()=>{self.Deflate=nt,self.Inflate=vt};\n'],{type:"text/javascript"}));e({workerScripts:{inflate:[t],deflate:[t]}})})($),e.BlobReader=Nt,e.BlobWriter=Ot,e.Data64URIReader=Ut,e.Data64URIWriter=It,e.ERR_BAD_FORMAT=En,e.ERR_CENTRAL_DIRECTORY_NOT_FOUND=In,e.ERR_DUPLICATED_NAME=ar,e.ERR_ENCRYPTED=Pn,e.ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND=Un,e.ERR_EOCDR_NOT_FOUND=Tn,e.ERR_EOCDR_ZIP64_NOT_FOUND=Ln,e.ERR_EXTRAFIELD_ZIP64_NOT_FOUND=On,e.ERR_HTTP_RANGE=Dt,e.ERR_INVALID_COMMENT=or,e.ERR_INVALID_ENCRYPTION_STRENGTH=dr,e.ERR_INVALID_ENTRY_COMMENT=cr,e.ERR_INVALID_ENTRY_NAME=lr,e.ERR_INVALID_EXTRAFIELD_DATA=wr,e.ERR_INVALID_EXTRAFIELD_TYPE=fr,e.ERR_INVALID_PASSWORD=fe,e.ERR_INVALID_SIGNATURE=we,e.ERR_INVALID_VERSION=ur,e.ERR_ITERATOR_COMPLETED_TOO_SOON=Ct,e.ERR_LOCAL_FILE_HEADER_NOT_FOUND=Nn,e.ERR_SPLIT_ZIP_FILE=Bn,e.ERR_UNSUPPORTED_COMPRESSION=Hn,e.ERR_UNSUPPORTED_ENCRYPTION=qn,e.ERR_UNSUPPORTED_FORMAT=hr,e.HttpRangeReader=class extends en{constructor(e,t={}){t.useRangeHeader=!0,super(e,t)}},e.HttpReader=en,e.Reader=Tt,e.SplitDataReader=rn,e.SplitDataWriter=sn,e.SplitZipReader=un,e.SplitZipWriter=dn,e.TextReader=Pt,e.TextWriter=qt,e.Uint8ArrayReader=tn,e.Uint8ArrayWriter=nn,e.Writer=Lt,e.ZipReader=Gn,e.ZipReaderStream=class{constructor(e={}){const{readable:t,writable:n}=new v,r=new Gn(t,e).getEntriesGenerator();this.readable=new A({async pull(e){const{done:t,value:n}=await r.next();if(t)return e.close();const s={...n,readable:(()=>{const{readable:e,writable:t}=new v;if(n.getData)return n.getData(t),e})()};delete s.getData,e.enqueue(s)}}),this.writable=n}},e.ZipWriter=yr,e.ZipWriterStream=class{constructor(e={}){const{readable:t,writable:n}=new v;this.readable=t,this.zipWriter=new yr(n,e)}transform(e){const{readable:t,writable:n}=new v({flush:()=>{this.zipWriter.close()}});return this.zipWriter.add(e,t),{readable:this.readable,writable:n}}writable(e){const{readable:t,writable:n}=new v;return this.zipWriter.add(e,t),n}close(e,t={}){return this.zipWriter.close(e,t)}},e.configure=$,e.fs=Er,e.getMimeType=()=>"application/octet-stream",e.initReader=on,e.initShimAsyncCodec=(e,t={},n)=>({Deflate:te(e.Deflate,t.deflate,n),Inflate:te(e.Inflate,t.inflate,n)}),e.initStream=an,e.initWriter=cn,e.readUint8Array=ln,e.terminateWorkers=async()=>{await y.allSettled(St.map((e=>(vt(e),e.terminate()))))},n.defineProperty(e,"__esModule",{value:!0})})); +((e,t)=>{"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).zip={})})(this,(function(e){"use strict";const{Array:t,Object:n,String:r,Number:s,BigInt:i,Math:a,Date:o,Map:c,Set:l,Response:u,URL:d,Error:f,Uint8Array:w,Uint16Array:h,Uint32Array:p,DataView:g,Blob:m,Promise:y,TextEncoder:b,TextDecoder:S,document:k,crypto:z,btoa:x,TransformStream:v,ReadableStream:A,WritableStream:D,CompressionStream:C,DecompressionStream:_,navigator:R,Worker:W}="undefined"!=typeof globalThis?globalThis:this||self,F=4294967295,E=65535,T=67324752,L=134695760,U=33639248,I=101075792,N=117853008,O=22,P=21589,q=2048,H="/",B=new o(2107,11,31),M=new o(1980,0,1),Z=void 0,V="undefined",K="function";class G{constructor(e){return class extends v{constructor(t,n){const r=new e(n);super({transform(e,t){t.enqueue(r.append(e))},flush(e){const t=r.flush();t&&e.enqueue(t)}})}}}}let X=2;try{typeof R!=V&&R.hardwareConcurrency&&(X=R.hardwareConcurrency)}catch(e){}const Y={chunkSize:524288,maxWorkers:X,terminateWorkerTimeout:5e3,useWebWorkers:!0,useCompressionStream:!0,workerScripts:Z,CompressionStreamNative:typeof C!=V&&C,DecompressionStreamNative:typeof _!=V&&_},j=n.assign({},Y);function J(){return j}function Q(e){return a.max(e.chunkSize,64)}function $(e){const{baseURL:n,chunkSize:r,maxWorkers:s,terminateWorkerTimeout:i,useCompressionStream:a,useWebWorkers:o,Deflate:c,Inflate:l,CompressionStream:u,DecompressionStream:d,workerScripts:w}=e;if(ee("baseURL",n),ee("chunkSize",r),ee("maxWorkers",s),ee("terminateWorkerTimeout",i),ee("useCompressionStream",a),ee("useWebWorkers",o),c&&(j.CompressionStream=new G(c)),l&&(j.DecompressionStream=new G(l)),ee("CompressionStream",u),ee("DecompressionStream",d),w!==Z){const{deflate:e,inflate:n}=w;if((e||n)&&(j.workerScripts||(j.workerScripts={})),e){if(!t.isArray(e))throw new f("workerScripts.deflate must be an array");j.workerScripts.deflate=e}if(n){if(!t.isArray(n))throw new f("workerScripts.inflate must be an array");j.workerScripts.inflate=n}}}function ee(e,t){t!==Z&&(j[e]=t)}function te(e,t,r){return class{constructor(s){const i=this;var a,o;a=s,o="level",(typeof n.hasOwn===K?n.hasOwn(a,o):a.hasOwnProperty(o))&&s.level===Z&&delete s.level,i.codec=new e(n.assign({},t,s)),r(i.codec,(e=>{if(i.pendingData){const t=i.pendingData;i.pendingData=new w(t.length+e.length);const{pendingData:n}=i;n.set(t,0),n.set(e,t.length)}else i.pendingData=new w(e)}))}append(e){return this.codec.push(e),s(this)}flush(){return this.codec.push(new w,!0),s(this)}};function s(e){if(e.pendingData){const t=e.pendingData;return e.pendingData=null,t}return new w}}const ne=[];for(let e=0;256>e;e++){let t=e;for(let e=0;8>e;e++)1&t?t=t>>>1^3988292384:t>>>=1;ne[e]=t}class re{constructor(e){this.crc=e||-1}append(e){let t=0|this.crc;for(let n=0,r=0|e.length;r>n;n++)t=t>>>8^ne[255&(t^e[n])];this.crc=t}get(){return~this.crc}}class se extends v{constructor(){let e;const t=new re;super({transform(e,n){t.append(e),n.enqueue(e)},flush(){const n=new w(4);new g(n.buffer).setUint32(0,t.get()),e.value=n}}),e=this}}function ie(e){if(typeof b==V){const t=new w((e=unescape(encodeURIComponent(e))).length);for(let n=0;n0&&t&&(e[n-1]=ae.partial(t,e[n-1]&2147483648>>t-1,1)),e},partial:(e,t,n)=>32===e?t:(n?0|t:t<<32-e)+1099511627776*e,getPartial:e=>a.round(e/1099511627776)||32,_shiftRight(e,t,n,r){for(void 0===r&&(r=[]);t>=32;t-=32)r.push(n),n=0;if(0===t)return r.concat(e);for(let s=0;s>>t),n=e[s]<<32-t;const s=e.length?e[e.length-1]:0,i=ae.getPartial(s);return r.push(ae.partial(t+i&31,t+i>32?n:r.pop(),1)),r}},oe={bytes:{fromBits(e){const t=ae.bitLength(e)/8,n=new w(t);let r;for(let s=0;t>s;s++)0==(3&s)&&(r=e[s/4]),n[s]=r>>>24,r<<=8;return n},toBits(e){const t=[];let n,r=0;for(n=0;n9007199254740991)throw new f("Cannot hash more than 2^53 - 1 bits");const i=new p(n);let a=0;for(let e=t.blockSize+r-(t.blockSize+r&t.blockSize-1);s>=e;e+=t.blockSize)t._block(i.subarray(16*a,16*(a+1))),a+=1;return n.splice(0,16*a),t}finalize(){const e=this;let t=e._buffer;const n=e._h;t=ae.concat(t,[ae.partial(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(a.floor(e._length/4294967296)),t.push(0|e._length);t.length;)e._block(t.splice(0,16));return e.reset(),n}_f(e,t,n,r){return e>19?e>39?e>59?e>79?void 0:t^n^r:t&n|t&r|n&r:t^n^r:t&n|~t&r}_S(e,t){return t<>>32-e}_block(e){const n=this,r=n._h,s=t(80);for(let t=0;16>t;t++)s[t]=e[t];let i=r[0],o=r[1],c=r[2],l=r[3],u=r[4];for(let e=0;79>=e;e++){16>e||(s[e]=n._S(1,s[e-3]^s[e-8]^s[e-14]^s[e-16]));const t=n._S(5,i)+n._f(e,o,c,l)+u+s[e]+n._key[a.floor(e/20)]|0;u=l,l=c,c=n._S(30,o),o=i,i=t}r[0]=r[0]+i|0,r[1]=r[1]+o|0,r[2]=r[2]+c|0,r[3]=r[3]+l|0,r[4]=r[4]+u|0}},le={getRandomValues(e){const t=new p(e.buffer),n=e=>{let t=987654321;const n=4294967295;return()=>(t=36969*(65535&t)+(t>>16)&n,(((t<<16)+(e=18e3*(65535&e)+(e>>16)&n)&n)/4294967296+.5)*(a.random()>.5?1:-1))};for(let r,s=0;snew ue.hmacSha1(oe.bytes.toBits(e)),pbkdf2(e,t,n,r){if(n=n||1e4,0>r||0>n)throw new f("invalid params to pbkdf2");const s=1+(r>>5)<<2;let i,a,o,c,l;const u=new ArrayBuffer(s),d=new g(u);let w=0;const h=ae;for(t=oe.bytes.toBits(t),l=1;(s||1)>w;l++){for(i=a=e.encrypt(h.concat(t,[l])),o=1;n>o;o++)for(a=e.encrypt(a),c=0;cw&&os&&(e=(new n).update(e).finalize());for(let t=0;s>t;t++)r[0][t]=909522486^e[t],r[1][t]=1549556828^e[t];t._baseHash[0].update(r[0]),t._baseHash[1].update(r[1]),t._resultHash=new n(t._baseHash[0])}reset(){const e=this;e._resultHash=new e._hash(e._baseHash[0]),e._updated=!1}update(e){this._updated=!0,this._resultHash.update(e)}digest(){const e=this,t=e._resultHash.finalize(),n=new e._hash(e._baseHash[1]).update(t).finalize();return e.reset(),n}encrypt(e){if(this._updated)throw new f("encrypt on already updated hmac called!");return this.update(e),this.digest(e)}}},de=typeof z!=V&&typeof z.getRandomValues==K,fe="Invalid password",we="Invalid signature",he="zipjs-abort-check-password";function pe(e){return de?z.getRandomValues(e):le.getRandomValues(e)}const ge=16,me={name:"PBKDF2"},ye=n.assign({hash:{name:"HMAC"}},me),be=n.assign({iterations:1e3,hash:{name:"SHA-1"}},me),Se=["deriveBits"],ke=[8,12,16],ze=[16,24,32],xe=10,ve=[0,0,0,0],Ae=typeof z!=V,De=Ae&&z.subtle,Ce=Ae&&typeof De!=V,_e=oe.bytes,Re=class{constructor(e){const t=this;t._tables=[[[],[],[],[],[]],[[],[],[],[],[]]],t._tables[0][0][0]||t._precompute();const n=t._tables[0][4],r=t._tables[1],s=e.length;let i,a,o,c=1;if(4!==s&&6!==s&&8!==s)throw new f("invalid aes key size");for(t._key=[a=e.slice(0),o=[]],i=s;4*s+28>i;i++){let e=a[i-1];(i%s==0||8===s&&i%s==4)&&(e=n[e>>>24]<<24^n[e>>16&255]<<16^n[e>>8&255]<<8^n[255&e],i%s==0&&(e=e<<8^e>>>24^c<<24,c=c<<1^283*(c>>7))),a[i]=a[i-s]^e}for(let e=0;i;e++,i--){const t=a[3&e?i:i-4];o[e]=4>=i||4>e?t:r[0][n[t>>>24]]^r[1][n[t>>16&255]]^r[2][n[t>>8&255]]^r[3][n[255&t]]}}encrypt(e){return this._crypt(e,0)}decrypt(e){return this._crypt(e,1)}_precompute(){const e=this._tables[0],t=this._tables[1],n=e[4],r=t[4],s=[],i=[];let a,o,c,l;for(let e=0;256>e;e++)i[(s[e]=e<<1^283*(e>>7))^e]=e;for(let u=a=0;!n[u];u^=o||1,a=i[a]||1){let i=a^a<<1^a<<2^a<<3^a<<4;i=i>>8^255&i^99,n[u]=i,r[i]=u,l=s[c=s[o=s[u]]];let d=16843009*l^65537*c^257*o^16843008*u,f=257*s[i]^16843008*i;for(let n=0;4>n;n++)e[n][u]=f=f<<24^f>>>8,t[n][i]=d=d<<24^d>>>8}for(let n=0;5>n;n++)e[n]=e[n].slice(0),t[n]=t[n].slice(0)}_crypt(e,t){if(4!==e.length)throw new f("invalid aes block size");const n=this._key[t],r=n.length/4-2,s=[0,0,0,0],i=this._tables[t],a=i[0],o=i[1],c=i[2],l=i[3],u=i[4];let d,w,h,p=e[0]^n[0],g=e[t?3:1]^n[1],m=e[2]^n[2],y=e[t?1:3]^n[3],b=4;for(let e=0;r>e;e++)d=a[p>>>24]^o[g>>16&255]^c[m>>8&255]^l[255&y]^n[b],w=a[g>>>24]^o[m>>16&255]^c[y>>8&255]^l[255&p]^n[b+1],h=a[m>>>24]^o[y>>16&255]^c[p>>8&255]^l[255&g]^n[b+2],y=a[y>>>24]^o[p>>16&255]^c[g>>8&255]^l[255&m]^n[b+3],b+=4,p=d,g=w,m=h;for(let e=0;4>e;e++)s[t?3&-e:e]=u[p>>>24]<<24^u[g>>16&255]<<16^u[m>>8&255]<<8^u[255&y]^n[b++],d=p,p=g,g=m,m=y,y=d;return s}},We=class{constructor(e,t){this._prf=e,this._initIv=t,this._iv=t}reset(){this._iv=this._initIv}update(e){return this.calculate(this._prf,e,this._iv)}incWord(e){if(255==(e>>24&255)){let t=e>>16&255,n=e>>8&255,r=255&e;255===t?(t=0,255===n?(n=0,255===r?r=0:++r):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=r}else e+=1<<24;return e}incCounter(e){0===(e[0]=this.incWord(e[0]))&&(e[1]=this.incWord(e[1]))}calculate(e,t,n){let r;if(!(r=t.length))return[];const s=ae.bitLength(t);for(let s=0;r>s;s+=4){this.incCounter(n);const r=e.encrypt(n);t[s]^=r[0],t[s+1]^=r[1],t[s+2]^=r[2],t[s+3]^=r[3]}return ae.clamp(t,s)}},Fe=ue.hmacSha1;let Ee=Ae&&Ce&&typeof De.importKey==K,Te=Ae&&Ce&&typeof De.deriveBits==K;class Le extends v{constructor({password:e,rawPassword:t,signed:r,encryptionStrength:s,checkPasswordOnly:i}){super({start(){n.assign(this,{ready:new y((e=>this.resolveReady=e)),password:Oe(e,t),signed:r,strength:s-1,pending:new w})},async transform(e,t){const n=this,{password:r,strength:s,resolveReady:a,ready:o}=n;r?(await(async(e,t,n,r)=>{const s=await Ne(e,t,n,qe(r,0,ke[t])),i=qe(r,ke[t]);if(s[0]!=i[0]||s[1]!=i[1])throw new f(fe)})(n,s,r,qe(e,0,ke[s]+2)),e=qe(e,ke[s]+2),i?t.error(new f(he)):a()):await o;const c=new w(e.length-xe-(e.length-xe)%ge);t.enqueue(Ie(n,e,c,0,xe,!0))},async flush(e){const{signed:t,ctr:n,hmac:r,pending:s,ready:i}=this;if(r&&n){await i;const a=qe(s,0,s.length-xe),o=qe(s,s.length-xe);let c=new w;if(a.length){const e=Be(_e,a);r.update(e);const t=n.update(e);c=He(_e,t)}if(t){const e=qe(He(_e,r.digest()),0,xe);for(let t=0;xe>t;t++)if(e[t]!=o[t])throw new f(we)}e.enqueue(c)}}})}}class Ue extends v{constructor({password:e,rawPassword:t,encryptionStrength:r}){let s;super({start(){n.assign(this,{ready:new y((e=>this.resolveReady=e)),password:Oe(e,t),strength:r-1,pending:new w})},async transform(e,t){const n=this,{password:r,strength:s,resolveReady:i,ready:a}=n;let o=new w;r?(o=await(async(e,t,n)=>{const r=pe(new w(ke[t]));return Pe(r,await Ne(e,t,n,r))})(n,s,r),i()):await a;const c=new w(o.length+e.length-e.length%ge);c.set(o,0),t.enqueue(Ie(n,e,c,o.length,0))},async flush(e){const{ctr:t,hmac:n,pending:r,ready:i}=this;if(n&&t){await i;let a=new w;if(r.length){const e=t.update(Be(_e,r));n.update(e),a=He(_e,e)}s.signature=He(_e,n.digest()).slice(0,xe),e.enqueue(Pe(a,s.signature))}}}),s=this}}function Ie(e,t,n,r,s,i){const{ctr:a,hmac:o,pending:c}=e,l=t.length-s;let u;for(c.length&&(t=Pe(c,t),n=((e,t)=>{if(t&&t>e.length){const n=e;(e=new w(t)).set(n,0)}return e})(n,l-l%ge)),u=0;l-ge>=u;u+=ge){const e=Be(_e,qe(t,u,u+ge));i&&o.update(e);const s=a.update(e);i||o.update(s),n.set(He(_e,s),u+r)}return e.pending=qe(t,u),n}async function Ne(e,r,s,i){e.password=null;const a=await(async(e,t,n,r,s)=>{if(!Ee)return ue.importKey(t);try{return await De.importKey("raw",t,n,!1,s)}catch(e){return Ee=!1,ue.importKey(t)}})(0,s,ye,0,Se),o=await(async(e,t,n)=>{if(!Te)return ue.pbkdf2(t,e.salt,be.iterations,n);try{return await De.deriveBits(e,t,n)}catch(r){return Te=!1,ue.pbkdf2(t,e.salt,be.iterations,n)}})(n.assign({salt:i},be),a,8*(2*ze[r]+2)),c=new w(o),l=Be(_e,qe(c,0,ze[r])),u=Be(_e,qe(c,ze[r],2*ze[r])),d=qe(c,2*ze[r]);return n.assign(e,{keys:{key:l,authentication:u,passwordVerification:d},ctr:new We(new Re(l),t.from(ve)),hmac:new Fe(u)}),d}function Oe(e,t){return t===Z?ie(e):t}function Pe(e,t){let n=e;return e.length+t.length&&(n=new w(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function qe(e,t,n){return e.subarray(t,n)}function He(e,t){return e.fromBits(t)}function Be(e,t){return e.toBits(t)}class Me extends v{constructor({password:e,passwordVerification:t,checkPasswordOnly:r}){super({start(){n.assign(this,{password:e,passwordVerification:t}),Ge(this,e)},transform(e,t){const n=this;if(n.password){const t=Ve(n,e.subarray(0,12));if(n.password=null,t[11]!=n.passwordVerification)throw new f(fe);e=e.subarray(12)}r?t.error(new f(he)):t.enqueue(Ve(n,e))}})}}class Ze extends v{constructor({password:e,passwordVerification:t}){super({start(){n.assign(this,{password:e,passwordVerification:t}),Ge(this,e)},transform(e,t){const n=this;let r,s;if(n.password){n.password=null;const t=pe(new w(12));t[11]=n.passwordVerification,r=new w(e.length+t.length),r.set(Ke(n,t),0),s=12}else r=new w(e.length),s=0;r.set(Ke(n,e),s),t.enqueue(r)}})}}function Ve(e,t){const n=new w(t.length);for(let r=0;r>>24]),s=~e.crcKey2.get(),e.keys=[n,r,s]}function Ye(e){const t=2|e.keys[2];return je(a.imul(t,1^t)>>>8)}function je(e){return 255&e}function Je(e){return 4294967295&e}const Qe="deflate-raw";class $e extends v{constructor(e,{chunkSize:t,CompressionStream:n,CompressionStreamNative:r}){super({});const{compressed:s,encrypted:i,useCompressionStream:a,zipCrypto:o,signed:c,level:l}=e,u=this;let d,f,w=tt(super.readable);i&&!o||!c||(d=new se,w=st(w,d)),s&&(w=rt(w,a,{level:l,chunkSize:t},r,n)),i&&(o?w=st(w,new Ze(e)):(f=new Ue(e),w=st(w,f))),nt(u,w,(()=>{let e;i&&!o&&(e=f.signature),i&&!o||!c||(e=new g(d.value.buffer).getUint32(0)),u.signature=e}))}}class et extends v{constructor(e,{chunkSize:t,DecompressionStream:n,DecompressionStreamNative:r}){super({});const{zipCrypto:s,encrypted:i,signed:a,signature:o,compressed:c,useCompressionStream:l}=e;let u,d,w=tt(super.readable);i&&(s?w=st(w,new Me(e)):(d=new Le(e),w=st(w,d))),c&&(w=rt(w,l,{chunkSize:t},r,n)),i&&!s||!a||(u=new se,w=st(w,u)),nt(this,w,(()=>{if((!i||s)&&a){const e=new g(u.value.buffer);if(o!=e.getUint32(0,!1))throw new f(we)}}))}}function tt(e){return st(e,new v({transform(e,t){e&&e.length&&t.enqueue(e)}}))}function nt(e,t,r){t=st(t,new v({flush:r})),n.defineProperty(e,"readable",{get:()=>t})}function rt(e,t,n,r,s){try{e=st(e,new(t&&r?r:s)(Qe,n))}catch(r){if(!t)return e;try{e=st(e,new s(Qe,n))}catch(t){return e}}return e}function st(e,t){return e.pipeThrough(t)}const it="data",at="close",ot="deflate",ct="inflate";class lt extends v{constructor(e,t){super({});const r=this,{codecType:s}=e;let i;s.startsWith(ot)?i=$e:s.startsWith(ct)&&(i=et);let a=0,o=0;const c=new i(e,t),l=super.readable,u=new v({transform(e,t){e&&e.length&&(o+=e.length,t.enqueue(e))},flush(){n.assign(r,{inputSize:o})}}),d=new v({transform(e,t){e&&e.length&&(a+=e.length,t.enqueue(e))},flush(){const{signature:e}=c;n.assign(r,{signature:e,outputSize:a,inputSize:o})}});n.defineProperty(r,"readable",{get:()=>l.pipeThrough(u).pipeThrough(c).pipeThrough(d)})}}class ut extends v{constructor(e){let t;super({transform:function n(r,s){if(t){const e=new w(t.length+r.length);e.set(t),e.set(r,t.length),r=e,t=null}r.length>e?(s.enqueue(r.slice(0,e)),n(r.slice(e),s)):t=r},flush(e){t&&t.length&&e.enqueue(t)}})}}let dt=typeof W!=V;class ft{constructor(e,{readable:t,writable:r},{options:s,config:i,streamOptions:a,useWebWorkers:o,transferStreams:c,scripts:l},u){const{signal:d}=a;return n.assign(e,{busy:!0,readable:t.pipeThrough(new ut(i.chunkSize)).pipeThrough(new wt(t,a),{signal:d}),writable:r,options:n.assign({},s),scripts:l,transferStreams:c,terminate:()=>new y((t=>{const{worker:n,busy:r}=e;n?(r?e.resolveTerminated=t:(n.terminate(),t()),e.interface=null):t()})),onTaskFinished(){const{resolveTerminated:t}=e;t&&(e.resolveTerminated=null,e.terminated=!0,e.worker.terminate(),t()),e.busy=!1,u(e)}}),(o&&dt?gt:pt)(e,i)}}class wt extends v{constructor(e,{onstart:t,onprogress:n,size:r,onend:s}){let i=0;super({async start(){t&&await ht(t,r)},async transform(e,t){i+=e.length,n&&await ht(n,i,r),t.enqueue(e)},async flush(){e.size=i,s&&await ht(s,i)}})}}async function ht(e,...t){try{await e(...t)}catch(e){}}function pt(e,t){return{run:()=>(async({options:e,readable:t,writable:n,onTaskFinished:r},s)=>{try{const i=new lt(e,s);await t.pipeThrough(i).pipeTo(n,{preventClose:!0,preventAbort:!0});const{signature:a,inputSize:o,outputSize:c}=i;return{signature:a,inputSize:o,outputSize:c}}finally{r()}})(e,t)}}function gt(e,t){const{baseURL:r,chunkSize:s}=t;if(!e.interface){let i;try{i=((e,t,r)=>{const s={type:"module"};let i,a;typeof e==K&&(e=e());try{i=new d(e,t)}catch(t){i=e}if(mt)try{a=new W(i)}catch(e){mt=!1,a=new W(i,s)}else a=new W(i,s);return a.addEventListener("message",(e=>(async({data:e},t)=>{const{type:r,value:s,messageId:i,result:a,error:o}=e,{reader:c,writer:l,resolveResult:u,rejectResult:d,onTaskFinished:h}=t;try{if(o){const{message:e,stack:t,code:r,name:s}=o,i=new f(e);n.assign(i,{stack:t,code:r,name:s}),p(i)}else{if("pull"==r){const{value:e,done:n}=await c.read();bt({type:it,value:e,done:n,messageId:i},t)}r==it&&(await l.ready,await l.write(new w(s)),bt({type:"ack",messageId:i},t)),r==at&&p(null,a)}}catch(o){bt({type:at,messageId:i},t),p(o)}function p(e,t){e?d(e):u(t),l&&l.releaseLock(),h()}})(e,r))),a})(e.scripts[0],r,e)}catch(n){return dt=!1,pt(e,t)}n.assign(e,{worker:i,interface:{run:()=>(async(e,t)=>{let r,s;const i=new y(((e,t)=>{r=e,s=t}));n.assign(e,{reader:null,writer:null,resolveResult:r,rejectResult:s,result:i});const{readable:a,options:o,scripts:c}=e,{writable:l,closed:u}=(e=>{let t;const n=new y((e=>t=e));return{writable:new D({async write(t){const n=e.getWriter();await n.ready,await n.write(t),n.releaseLock()},close(){t()},abort:t=>e.getWriter().abort(t)}),closed:n}})(e.writable),d=bt({type:"start",scripts:c.slice(1),options:o,config:t,readable:a,writable:l},e);d||n.assign(e,{reader:a.getReader(),writer:l.getWriter()});const f=await i;return d||await l.getWriter().close(),await u,f})(e,{chunkSize:s})}})}return e.interface}let mt=!0,yt=!0;function bt(e,{worker:t,writer:n,onTaskFinished:r,transferStreams:s}){try{let{value:n,readable:r,writable:i}=e;const a=[];if(n&&(n.byteLength{const n=St.find((e=>!e.busy));if(n)return vt(n),new ft(n,e,t,p);if(St.lengthkt.push({resolve:n,stream:e,workerOptions:t})))})()).run();function p(e){if(kt.length){const[{resolve:t,stream:n,workerOptions:r}]=kt.splice(0,1);t(new ft(e,n,r,p))}else e.worker?(vt(e),((e,t)=>{const{config:n}=t,{terminateWorkerTimeout:r}=n;s.isFinite(r)&&r>=0&&(e.terminated?e.terminated=!1:e.terminateTimeout=setTimeout((async()=>{St=St.filter((t=>t!=e));try{await e.terminate()}catch(e){}}),r))})(e,t)):St=St.filter((t=>t!=e))}}function vt(e){const{terminateTimeout:t}=e;t&&(clearTimeout(t),e.terminateTimeout=null)}const At="HTTP error ",Dt="HTTP Range not supported",Ct="Writer iterator completed too soon",_t="GET",Rt="bytes",Wt=65536,Ft="writable";class Et{constructor(){this.size=0}init(){this.initialized=!0}}class Tt extends Et{get readable(){const e=this,{chunkSize:t=Wt}=e,n=new A({start(){this.chunkOffset=0},async pull(r){const{offset:s=0,size:i,diskNumberStart:o}=n,{chunkOffset:c}=this;r.enqueue(await ln(e,s+c,a.min(t,i-c),o)),c+t>i?r.close():this.chunkOffset+=t}});return n}}class Lt extends Et{constructor(){super();const e=this,t=new D({write:t=>e.writeUint8Array(t)});n.defineProperty(e,Ft,{get:()=>t})}writeUint8Array(){}}class Ut extends Tt{constructor(e){super();let t=e.length;for(;"="==e.charAt(t-1);)t--;const r=e.indexOf(",")+1;n.assign(this,{dataURI:e,dataStart:r,size:a.floor(.75*(t-r))})}readUint8Array(e,t){const{dataStart:n,dataURI:r}=this,s=new w(t),i=4*a.floor(e/3),o=atob(r.substring(i+n,4*a.ceil((e+t)/3)+n)),c=e-3*a.floor(i/4);for(let e=c;c+t>e;e++)s[e-c]=o.charCodeAt(e);return s}}class It extends Lt{constructor(e){super(),n.assign(this,{data:"data:"+(e||"")+";base64,",pending:[]})}writeUint8Array(e){const t=this;let n=0,s=t.pending;const i=t.pending.length;for(t.pending="",n=0;n<3*a.floor((i+e.length)/3)-i;n++)s+=r.fromCharCode(e[n]);for(;n2?t.data+=x(s):t.pending=s}getData(){return this.data+x(this.pending)}}class Nt extends Tt{constructor(e){super(),n.assign(this,{blob:e,size:e.size})}async readUint8Array(e,t){const n=this,r=e+t,s=e||rt&&(i=i.slice(e,r)),new w(i)}}class Ot extends Et{constructor(e){super();const t=new v,r=[];e&&r.push(["Content-Type",e]),n.defineProperty(this,Ft,{get:()=>t.writable}),this.blob=new u(t.readable,{headers:r}).blob()}getData(){return this.blob}}class Pt extends Nt{constructor(e){super(new m([e],{type:"text/plain"}))}}class qt extends Ot{constructor(e){super(e),n.assign(this,{encoding:e,utf8:!e||"utf-8"==e.toLowerCase()})}async getData(){const{encoding:e,utf8:t}=this,r=await super.getData();if(r.text&&t)return r.text();{const t=new FileReader;return new y(((s,i)=>{n.assign(t,{onload:({target:e})=>s(e.result),onerror:()=>i(t.error)}),t.readAsText(r,e)}))}}}class Ht extends Tt{constructor(e,t){super(),Mt(this,e,t)}async init(){await Zt(this,Qt,Xt),super.init()}readUint8Array(e,t){return Vt(this,e,t,Qt,Xt)}}class Bt extends Tt{constructor(e,t){super(),Mt(this,e,t)}async init(){await Zt(this,$t,Yt),super.init()}readUint8Array(e,t){return Vt(this,e,t,$t,Yt)}}function Mt(e,t,r){const{preventHeadRequest:s,useRangeHeader:i,forceRangeRequests:a,combineSizeEocd:o}=r;delete(r=n.assign({},r)).preventHeadRequest,delete r.useRangeHeader,delete r.forceRangeRequests,delete r.combineSizeEocd,delete r.useXHR,n.assign(e,{url:t,options:r,preventHeadRequest:s,useRangeHeader:i,forceRangeRequests:a,combineSizeEocd:o})}async function Zt(e,t,n){const{url:r,preventHeadRequest:i,useRangeHeader:a,forceRangeRequests:o,combineSizeEocd:c}=e;if((e=>{const{baseURL:t}=J(),{protocol:n}=new d(e,t);return"http:"==n||"https:"==n})(r)&&(a||o)&&(void 0===i||i)){const r=await t(_t,e,Kt(e,c?-22:void 0));if(!o&&r.headers.get("Accept-Ranges")!=Rt)throw new f(Dt);{let i;c&&(e.eocdCache=new w(await r.arrayBuffer()));const a=r.headers.get("Content-Range");if(a){const e=a.trim().split(/\s*\/\s*/);if(e.length){const t=e[1];t&&"*"!=t&&(i=s(t))}}i===Z?await Jt(e,t,n):e.size=i}}else await Jt(e,t,n)}async function Vt(e,t,n,r,s){const{useRangeHeader:i,forceRangeRequests:a,eocdCache:o,size:c,options:l}=e;if(i||a){if(o&&t==c-O&&n==O)return o;const s=await r(_t,e,Kt(e,t,n));if(206!=s.status)throw new f(Dt);return new w(await s.arrayBuffer())}{const{data:r}=e;return r||await s(e,l),new w(e.data.subarray(t,t+n))}}function Kt(e,t=0,r=1){return n.assign({},Gt(e),{Range:Rt+"="+(0>t?t:t+"-"+(t+r-1))})}function Gt({options:e}){const{headers:t}=e;if(t)return Symbol.iterator in t?n.fromEntries(t):t}async function Xt(e){await jt(e,Qt)}async function Yt(e){await jt(e,$t)}async function jt(e,t){const n=await t(_t,e,Gt(e));e.data=new w(await n.arrayBuffer()),e.size||(e.size=e.data.length)}async function Jt(e,t,n){if(e.preventHeadRequest)await n(e,e.options);else{const r=(await t("HEAD",e,Gt(e))).headers.get("Content-Length");r?e.size=s(r):await n(e,e.options)}}async function Qt(e,{options:t,url:r},s){const i=await fetch(r,n.assign({},t,{method:e,headers:s}));if(400>i.status)return i;throw 416==i.status?new f(Dt):new f(At+(i.statusText||i.status))}function $t(e,{url:t},r){return new y(((s,i)=>{const a=new XMLHttpRequest;if(a.addEventListener("load",(()=>{if(400>a.status){const e=[];a.getAllResponseHeaders().trim().split(/[\r\n]+/).forEach((t=>{const n=t.trim().split(/\s*:\s*/);n[0]=n[0].trim().replace(/^[a-z]|-[a-z]/g,(e=>e.toUpperCase())),e.push(n)})),s({status:a.status,arrayBuffer:()=>a.response,headers:new c(e)})}else i(416==a.status?new f(Dt):new f(At+(a.statusText||a.status)))}),!1),a.addEventListener("error",(e=>i(e.detail?e.detail.error:new f("Network error"))),!1),a.open(e,t),r)for(const e of n.entries(r))a.setRequestHeader(e[0],e[1]);a.responseType="arraybuffer",a.send()}))}class en extends Tt{constructor(e,t={}){super(),n.assign(this,{url:e,reader:t.useXHR?new Bt(e,t):new Ht(e,t)})}set size(e){}get size(){return this.reader.size}async init(){await this.reader.init(),super.init()}readUint8Array(e,t){return this.reader.readUint8Array(e,t)}}class tn extends Tt{constructor(e){super(),n.assign(this,{array:e,size:e.length})}readUint8Array(e,t){return this.array.slice(e,e+t)}}class nn extends Lt{init(e=0){n.assign(this,{offset:0,array:new w(e)}),super.init()}writeUint8Array(e){const t=this;if(t.offset+e.length>t.array.length){const n=t.array;t.array=new w(n.length+e.length),t.array.set(n)}t.array.set(e,t.offset),t.offset+=e.length}getData(){return this.array}}class rn extends Tt{constructor(e){super(),this.readers=e}async init(){const e=this,{readers:t}=e;e.lastDiskNumber=0,e.lastDiskOffset=0,await y.all(t.map((async(n,r)=>{await n.init(),r!=t.length-1&&(e.lastDiskOffset+=n.size),e.size+=n.size}))),super.init()}async readUint8Array(e,t,n=0){const r=this,{readers:s}=this;let i,o=n;-1==o&&(o=s.length-1);let c=e;for(;c>=s[o].size;)c-=s[o].size,o++;const l=s[o],u=l.size;if(c+t>u){const s=u-c;i=new w(t),i.set(await ln(l,c,s)),i.set(await r.readUint8Array(e+s,t-s,n),s)}else i=await ln(l,c,t);return r.lastDiskNumber=a.max(o,r.lastDiskNumber),i}}class sn extends Et{constructor(e,t=4294967295){super();const r=this;let s,i,a;n.assign(r,{diskNumber:0,diskOffset:0,size:0,maxSize:t,availableSize:t});const o=new D({async write(t){const{availableSize:n}=r;if(a)t.lengtho})}}async function an(e,t){if(!e.init||e.initialized)return y.resolve();await e.init(t)}function on(e){return t.isArray(e)&&(e=new rn(e)),e instanceof A&&(e={readable:e}),e}function cn(e){e.writable===Z&&typeof e.next==K&&(e=new sn(e)),e instanceof D&&(e={writable:e});const{writable:t}=e;return t.size===Z&&(t.size=0),e instanceof sn||n.assign(e,{diskNumber:0,diskOffset:0,availableSize:1/0,maxSize:1/0}),e}function ln(e,t,n,r){return e.readUint8Array(t,n,r)}const un=rn,dn=sn,fn="\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ ".split("");function wn(e,t){return t&&"cp437"==t.trim().toLowerCase()?(e=>{{let t="";for(let n=0;nthis[t]=e[t]))}}const En="File format is not recognized",Tn="End of central directory not found",Ln="End of Zip64 central directory not found",Un="End of Zip64 central directory locator not found",In="Central directory header not found",Nn="Local file header not found",On="Zip64 extra field not found",Pn="File contains encrypted entry",qn="Encryption method not supported",Hn="Compression method not supported",Bn="Split zip file",Mn="utf-8",Zn="cp437",Vn=[[yn,F],[bn,F],[Sn,F],[kn,E]],Kn={[E]:{getValue:rr,bytes:4},[F]:{getValue:sr,bytes:8}};class Gn{constructor(e,t={}){n.assign(this,{reader:on(e),options:t,config:J()})}async*getEntriesGenerator(e={}){const t=this;let{reader:r}=t;const{config:s}=t;if(await an(r),r.size!==Z&&r.readUint8Array||(r=new Nt(await new u(r.readable).blob()),await an(r)),r.size{const r=new w(4);return ir(r).setUint32(0,101010256,!0),await s(22)||await s(a.min(1048582,n));async function s(t){const s=n-t,i=await ln(e,s,t);for(let e=i.length-22;e>=0;e--)if(i[e]==r[0]&&i[e+1]==r[1]&&i[e+2]==r[2]&&i[e+3]==r[3])return{offset:s+e,buffer:i.slice(e,e+22).buffer}}})(r,0,r.size);if(!i)throw rr(ir(await ln(r,0,4)))==L?new f(Bn):new f(Tn);const o=ir(i);let c=rr(o,12),l=rr(o,16);const d=i.offset,h=nr(o,20),p=d+O+h;let g=nr(o,4);const m=r.lastDiskNumber||0;let b=nr(o,6),S=nr(o,8),k=0,z=0;if(l==F||c==F||S==E||b==E){const e=ir(await ln(r,i.offset-20,20));if(rr(e,0)!=N)throw new f(Ln);l=sr(e,8);let t=await ln(r,l,56,-1),n=ir(t);const s=i.offset-20-56;if(rr(n,0)!=I&&l!=s){const e=l;l=s,k=l-e,t=await ln(r,l,56,-1),n=ir(t)}if(rr(n,0)!=I)throw new f(Un);g==E&&(g=rr(n,16)),b==E&&(b=rr(n,20)),S==E&&(S=sr(n,32)),c==F&&(c=sr(n,40)),l-=c}if(ll)throw new f(En);let x=0,v=await ln(r,l,c,b),A=ir(v);if(c){const e=i.offset-c;if(rr(A,x)!=U&&l!=e){const t=l;l=e,k+=l-t,v=await ln(r,l,c,b),A=ir(v)}}const D=i.offset-l-(r.lastDiskOffset||0);if(c==D||0>D||(c=D,v=await ln(r,l,c,b),A=ir(v)),0>l||l>=r.size)throw new f(En);const C=Qn(t,e,"filenameEncoding"),_=Qn(t,e,"commentEncoding");for(let i=0;S>i;i++){const o=new Xn(r,s,t.options);if(rr(A,x)!=U)throw new f(In);Yn(o,A,x+6);const c=!!o.bitFlag.languageEncodingFlag,l=x+46,u=l+o.filenameLength,d=u+o.extraFieldLength,w=nr(A,x+4),h=0==(0&w),p=v.subarray(l,u),g=nr(A,x+32),m=d+g,b=v.subarray(d,m),D=c,R=c,W=h&&16==(16&tr(A,x+38)),F=rr(A,x+42)+k;n.assign(o,{versionMadeBy:w,msDosCompatible:h,compressedSize:0,uncompressedSize:0,commentLength:g,directory:W,offset:F,diskNumberStart:nr(A,x+34),internalFileAttribute:nr(A,x+36),externalFileAttribute:rr(A,x+38),rawFilename:p,filenameUTF8:D,commentUTF8:R,rawExtraField:v.subarray(u,d)});const E=Qn(t,e,"decodeText")||wn,[T,L]=await y.all([E(p,D?Mn:C||Zn),E(b,R?Mn:_||Zn)]);n.assign(o,{rawComment:b,filename:T,comment:L,directory:W||T.endsWith(H)}),z=a.max(F,z),await jn(o,o,A,x+6);const I=new Fn(o);I.getData=(e,t)=>o.getData(e,I,t),x=m;const{onprogress:N}=e;if(N)try{await N(i+1,S,new Fn(o))}catch(e){}yield I}const R=Qn(t,e,"extractPrependedData"),W=Qn(t,e,"extractAppendedData");return R&&(t.prependedData=z>0?await ln(r,0,z):new w),t.comment=h?await ln(r,d+O,h):new w,W&&(t.appendedData=p>>8&255:h>>>24&255),signature:h,compressed:0!=l,encrypted:z,useWebWorkers:Qn(s,r,"useWebWorkers"),useCompressionStream:Qn(s,r,"useCompressionStream"),transferStreams:Qn(s,r,"transferStreams"),checkPasswordOnly:R},config:u,streamOptions:{signal:_,size:A,onstart:F,onprogress:E,onend:L}};let I=0;try{({outputSize:I}=await xt({readable:C,writable:W},U))}catch(e){if(!R||e.message!=he)throw e}finally{const e=Qn(s,r,"preventClose");W.size+=I,e||W.locked||await W.getWriter().close()}return R?Z:e.getData?e.getData():W}}function Yn(e,t,r){const s=e.rawBitFlag=nr(t,r+2),i=1==(1&s),a=rr(t,r+6);n.assign(e,{encrypted:i,version:nr(t,r),bitFlag:{level:(6&s)>>1,dataDescriptor:8==(8&s),languageEncodingFlag:(s&q)==q},rawLastModDate:a,lastModDate:$n(a),filenameLength:nr(t,r+22),extraFieldLength:nr(t,r+24)})}async function jn(e,t,r,s,i){const{rawExtraField:a}=t,l=t.extraField=new c,u=ir(new w(a));let d=0;try{for(;d{t.zip64=!0;const n=ir(e.data),r=Vn.filter((([e,n])=>t[e]==n));for(let s=0,i=0;s{const s=ir(e.data),i=tr(s,4);n.assign(e,{vendorVersion:tr(s,0),vendorId:tr(s,2),strength:i,originalCompressionMethod:r,compressionMethod:nr(s,5)}),t.compressionMethod=e.compressionMethod})(y,t,h),t.extraFieldAES=y):t.compressionMethod=h;const b=l.get(10);b&&(((e,t)=>{const r=ir(e.data);let s,i=4;try{for(;i{const r=ir(e.data),s=tr(r,0),i=[],a=[];n?(1==(1&s)&&(i.push(zn),a.push(xn)),2==(2&s)&&(i.push(vn),a.push("rawLastAccessDate")),4==(4&s)&&(i.push(An),a.push("rawCreationDate"))):5>e.data.length||(i.push(zn),a.push(xn));let c=1;i.forEach(((n,s)=>{if(e.data.length>=c+4){const i=rr(r,c);t[n]=e[n]=new o(1e3*i);const l=a[s];e[l]=i}c+=4}))})(S,t,i),t.extraFieldExtendedTimestamp=S);const k=l.get(6534);k&&(t.extraFieldUSDZ=k)}async function Jn(e,t,r,s,i){const a=ir(e.data),o=new re;o.append(i[r]);const c=ir(new w(4));c.setUint32(0,o.get(),!0);const l=rr(a,1);n.assign(e,{version:tr(a,0),[t]:wn(e.data.subarray(5)),valid:!i.bitFlag.languageEncodingFlag&&l==rr(c,0)}),e.valid&&(s[t]=e[t],s[t+"UTF8"]=!0)}function Qn(e,t,n){return t[n]===Z?e.options[n]:t[n]}function $n(e){const t=(4294901760&e)>>16,n=65535&e;try{return new o(1980+((65024&t)>>9),((480&t)>>5)-1,31&t,(63488&n)>>11,(2016&n)>>5,2*(31&n),0)}catch(e){}}function er(e){return new o(s(e/i(1e4)-i(116444736e5)))}function tr(e,t){return e.getUint8(t)}function nr(e,t){return e.getUint16(t,!0)}function rr(e,t){return e.getUint32(t,!0)}function sr(e,t){return s(e.getBigUint64(t,!0))}function ir(e){return new g(e.buffer)}const ar="File already exists",or="Zip file comment exceeds 64KB",cr="File entry comment exceeds 64KB",lr="File entry name exceeds 64KB",ur="Version exceeds 65535",dr="The strength must equal 1, 2, or 3",fr="Extra field type exceeds 65535",wr="Extra field data exceeds 64KB",hr="Zip64 is not supported (make sure 'keepOrder' is set to 'true')",pr=new w([7,0,2,0,65,69,3,0,0]);let gr=0;const mr=[];class yr{constructor(e,t={}){const r=(e=cn(e)).availableSize!==Z&&e.availableSize>0&&e.availableSize!==1/0&&e.maxSize!==Z&&e.maxSize>0&&e.maxSize!==1/0;n.assign(this,{writer:e,addSplitZipSignature:r,options:t,config:J(),files:new c,filenames:new l,offset:e.writable.size,pendingEntriesSize:0,pendingAddFileCalls:new l,bufferedWrites:0})}async add(e="",r,s={}){const c=this,{pendingAddFileCalls:l,config:d}=c;let m;grmr.push(e)));try{if(e=e.trim(),c.filenames.has(e))throw new f(ar);return c.filenames.add(e),m=(async(e,r,s,c)=>{r=r.trim(),c.directory&&!r.endsWith(H)?r+=H:c.directory=r.endsWith(H);const l=kr(e,c,"encodeText",ie),d=l(r);if(_r(d)>E)throw new f(lr);const m=c.comment||"",b=l(m);if(_r(b)>E)throw new f(cr);const S=kr(e,c,"version",20);if(S>E)throw new f(ur);const k=kr(e,c,"versionMadeBy",20);if(k>E)throw new f(ur);const z=kr(e,c,zn,new o),x=kr(e,c,vn),A=kr(e,c,An),D=kr(e,c,_n,!0),C=kr(e,c,Dn,0),_=kr(e,c,Cn,0),R=kr(e,c,"password"),W=kr(e,c,"rawPassword"),U=kr(e,c,"encryptionStrength",3),I=kr(e,c,"zipCrypto"),N=kr(e,c,"extendedTimestamp",!0),O=kr(e,c,"keepOrder",!0),V=kr(e,c,"level"),K=kr(e,c,"useWebWorkers"),G=kr(e,c,"bufferedWrite"),X=kr(e,c,"dataDescriptorSignature",!1),Y=kr(e,c,"signal"),j=kr(e,c,"useCompressionStream");let J=kr(e,c,"dataDescriptor",!0),$=kr(e,c,Rn);if(R!==Z&&U!==Z&&(1>U||U>3))throw new f(dr);let ee=new w;const{extraField:te}=c;if(te){let e=0,t=0;te.forEach((t=>e+=4+_r(t))),ee=new w(e),te.forEach(((e,n)=>{if(n>E)throw new f(fr);if(_r(e)>E)throw new f(wr);Dr(ee,new h([n]),t),Dr(ee,new h([_r(e)]),t+2),Dr(ee,e,t+4),t+=4+_r(e)}))}let ne=0,re=0,se=0;const ae=!0===$;s&&(s=on(s),await an(s),s.size===Z?(J=!0,($||$===Z)&&($=!0,se=ne=F)):(se=s.size,ne=(e=>e+5*(a.floor(e/16383)+1))(se)));const{diskOffset:oe,diskNumber:ce,maxSize:le}=e.writer,ue=ae||se>=F,de=ae||ne>=F,fe=ae||e.offset+e.pendingEntriesSize-oe>=F,we=kr(e,c,"supportZip64SplitFile",!0)&&ae||ce+a.ceil(e.pendingEntriesSize/le)>=E;if(fe||ue||de||we){if(!1===$||!O)throw new f(hr);$=!0}$=$||!1;const he=(e=>{const{rawFilename:t,lastModDate:n,lastAccessDate:r,creationDate:s,rawPassword:i,password:o,level:c,zip64:l,zipCrypto:u,dataDescriptor:d,directory:f,rawExtraField:h,encryptionStrength:g,extendedTimestamp:m}=e,y=0!==c&&!f,b=!!(o&&_r(o)||i&&_r(i));let S,k,z,x,v=e.version;if(b&&!u){S=new w(_r(pr)+2);const e=Cr(S);xr(e,0,39169),Dr(S,pr,2),zr(e,8,g)}else S=new w;if(m){z=new w(9+(r?4:0)+(s?4:0));const e=Cr(z);xr(e,0,P),xr(e,2,_r(z)-4),x=1+(r?2:0)+(s?4:0),zr(e,4,x);let t=5;vr(e,t,a.floor(n.getTime()/1e3)),t+=4,r&&(vr(e,t,a.floor(r.getTime()/1e3)),t+=4),s&&vr(e,t,a.floor(s.getTime()/1e3));try{k=new w(36);const e=Cr(k),t=Sr(n);xr(e,0,10),xr(e,2,32),xr(e,8,1),xr(e,10,24),Ar(e,12,t),Ar(e,20,Sr(r)||t),Ar(e,28,Sr(s)||t)}catch(e){k=new w}}else k=z=new w;let A=q;d&&(A|=8);let D=0;y&&(D=8),l&&(v=v>45?v:45),b&&(A|=1,u||(v=v>51?v:51,D=99,y&&(S[9]=8)));const C=new w(26),_=Cr(C);xr(_,0,v),xr(_,2,A),xr(_,4,D);const R=new p(1),W=Cr(R);let F;F=M>n?M:n>B?B:n,xr(W,0,(F.getHours()<<6|F.getMinutes())<<5|F.getSeconds()/2),xr(W,2,(F.getFullYear()-1980<<4|F.getMonth()+1)<<5|F.getDate());const E=R[0];vr(_,6,E),xr(_,22,_r(t));const L=_r(S,z,k,h);xr(_,24,L);const U=new w(30+_r(t)+L);return vr(Cr(U),0,T),Dr(U,C,4),Dr(U,t,30),Dr(U,S,30+_r(t)),Dr(U,z,30+_r(t,S)),Dr(U,k,30+_r(t,S,z)),Dr(U,h,30+_r(t,S,z,k)),{localHeaderArray:U,headerArray:C,headerView:_,lastModDate:n,rawLastModDate:E,encrypted:b,compressed:y,version:v,compressionMethod:D,extraFieldExtendedTimestampFlag:x,rawExtraFieldExtendedTimestamp:z,rawExtraFieldNTFS:k,rawExtraFieldAES:S,extraFieldLength:L}})(c=n.assign({},c,{rawFilename:d,rawComment:b,version:S,versionMadeBy:k,lastModDate:z,lastAccessDate:x,creationDate:A,rawExtraField:ee,zip64:$,zip64UncompressedSize:ue,zip64CompressedSize:de,zip64Offset:fe,zip64DiskNumberStart:we,password:R,rawPassword:W,level:j||e.config.CompressionStream!==Z?V:0,useWebWorkers:K,encryptionStrength:U,extendedTimestamp:N,zipCrypto:I,bufferedWrite:G,keepOrder:O,dataDescriptor:J,dataDescriptorSignature:X,signal:Y,msDosCompatible:D,internalFileAttribute:C,externalFileAttribute:_,useCompressionStream:j})),pe=(e=>{const{zip64:t,dataDescriptor:n,dataDescriptorSignature:r}=e;let s,i=new w,a=0;return n&&(i=new w(t?r?24:20:r?16:12),s=Cr(i),r&&(a=4,vr(s,0,134695760))),{dataDescriptorArray:i,dataDescriptorView:s,dataDescriptorOffset:a}})(c),ge=_r(he.localHeaderArray,pe.dataDescriptorArray);let me;re=ge+ne,e.options.usdz&&(re+=re+64),e.pendingEntriesSize+=re;try{me=await(async(e,r,s,a,o)=>{const{files:c,writer:l}=e,{keepOrder:d,dataDescriptor:h,signal:p}=o,{headerInfo:m}=a,{usdz:b}=e.options,S=t.from(c.values()).pop();let k,z,x,A,D,C,_,R={};c.set(r,R);try{let t;d&&(t=S&&S.lock,R.lock=new y((e=>x=e))),!(o.bufferedWrite||e.writerLocked||e.bufferedWrites&&d)&&h||b?(C=l,await W()):(C=new v,_=new u(C.readable).blob(),C.writable.size=0,k=!0,e.bufferedWrites++,await an(l)),await an(C);const{writable:m}=l;let{diskOffset:T}=l;if(e.addSplitZipSignature){delete e.addSplitZipSignature;const t=new w(4);vr(Cr(t),0,L),await br(m,t),e.offset+=4}b&&((e,t)=>{const{headerInfo:n}=e;let{localHeaderArray:r,extraFieldLength:s}=n,i=Cr(r),a=64-(t+_r(r))%64;4>a&&(a+=64);const o=new w(a),c=Cr(o);xr(c,0,6534),xr(c,2,a-2);const l=r;n.localHeaderArray=r=new w(_r(l)+a),Dr(r,l),Dr(r,o,_r(l)),i=Cr(r),xr(i,28,s+a),e.metadataSize+=a})(a,e.offset-T),k||(await t,await E(m));const{diskNumber:U}=l;if(D=!0,R.diskNumberStart=U,R=await(async(e,t,{diskNumberStart:r,lock:s},a,o,c)=>{const{headerInfo:l,dataDescriptorInfo:u,metadataSize:d}=a,{localHeaderArray:f,headerArray:h,lastModDate:p,rawLastModDate:g,encrypted:m,compressed:y,version:b,compressionMethod:S,rawExtraFieldExtendedTimestamp:k,extraFieldExtendedTimestampFlag:z,rawExtraFieldNTFS:x,rawExtraFieldAES:v}=l,{dataDescriptorArray:A}=u,{rawFilename:D,lastAccessDate:C,creationDate:_,password:R,rawPassword:W,level:E,zip64:T,zip64UncompressedSize:L,zip64CompressedSize:U,zip64Offset:I,zip64DiskNumberStart:N,zipCrypto:O,dataDescriptor:P,directory:q,versionMadeBy:H,rawComment:B,rawExtraField:M,useWebWorkers:V,onstart:K,onprogress:G,onend:X,signal:Y,encryptionStrength:j,extendedTimestamp:J,msDosCompatible:$,internalFileAttribute:ee,externalFileAttribute:te,useCompressionStream:ne}=c,re={lock:s,versionMadeBy:H,zip64:T,directory:!!q,filenameUTF8:!0,rawFilename:D,commentUTF8:!0,rawComment:B,rawExtraFieldExtendedTimestamp:k,rawExtraFieldNTFS:x,rawExtraFieldAES:v,rawExtraField:M,extendedTimestamp:J,msDosCompatible:$,internalFileAttribute:ee,externalFileAttribute:te,diskNumberStart:r};let se,ie=0,ae=0;const{writable:oe}=t;if(e){e.chunkSize=Q(o),await br(oe,f);const t=e.readable,n=t.size=e.size,r={options:{codecType:ot,level:E,rawPassword:W,password:R,encryptionStrength:j,zipCrypto:m&&O,passwordVerification:m&&O&&g>>8&255,signed:!0,compressed:y,encrypted:m,useWebWorkers:V,useCompressionStream:ne,transferStreams:!1},config:o,streamOptions:{signal:Y,size:n,onstart:K,onprogress:G,onend:X}},s=await xt({readable:t,writable:oe},r);ae=s.inputSize,ie=s.outputSize,se=s.signature,oe.size+=ae}else await br(oe,f);let ce;if(T){let e=4;L&&(e+=8),U&&(e+=8),I&&(e+=8),N&&(e+=4),ce=new w(e)}else ce=new w;return((e,t)=>{const{signature:n,rawExtraFieldZip64:r,compressedSize:s,uncompressedSize:a,headerInfo:o,dataDescriptorInfo:c}=e,{headerView:l,encrypted:u}=o,{dataDescriptorView:d,dataDescriptorOffset:f}=c,{zip64:w,zip64UncompressedSize:h,zip64CompressedSize:p,zipCrypto:g,dataDescriptor:m}=t;if(u&&!g||n===Z||(vr(l,10,n),m&&vr(d,f,n)),w){const e=Cr(r);xr(e,0,1),xr(e,2,_r(r)-4);let t=4;h&&(vr(l,18,F),Ar(e,t,i(a)),t+=8),p&&(vr(l,14,F),Ar(e,t,i(s))),m&&(Ar(d,f+4,i(s)),Ar(d,f+12,i(a)))}else vr(l,14,s),vr(l,18,a),m&&(vr(d,f+4,s),vr(d,f+8,a))})({signature:se,rawExtraFieldZip64:ce,compressedSize:ie,uncompressedSize:ae,headerInfo:l,dataDescriptorInfo:u},c),P&&await br(oe,A),n.assign(re,{uncompressedSize:ae,compressedSize:ie,lastModDate:p,rawLastModDate:g,creationDate:_,lastAccessDate:C,encrypted:m,size:d+ie,compressionMethod:S,version:b,headerArray:h,signature:se,rawExtraFieldZip64:ce,extraFieldExtendedTimestampFlag:z,zip64UncompressedSize:L,zip64CompressedSize:U,zip64Offset:I,zip64DiskNumberStart:N}),re})(s,C,R,a,e.config,o),D=!1,c.set(r,R),R.filename=r,k){await C.writable.getWriter().close();let e=await _;await t,await W(),A=!0,h||(e=await(async(e,t,n,{zipCrypto:r})=>{let s;s=await t.slice(0,26).arrayBuffer(),26!=s.byteLength&&(s=s.slice(0,26));const i=new g(s);return e.encrypted&&!r||vr(i,14,e.signature),e.zip64?(vr(i,18,F),vr(i,22,F)):(vr(i,18,e.compressedSize),vr(i,22,e.uncompressedSize)),await br(n,new w(s)),t.slice(s.byteLength)})(R,e,m,o)),await E(m),R.diskNumberStart=l.diskNumber,T=l.diskOffset,await e.stream().pipeTo(m,{preventClose:!0,preventAbort:!0,signal:p}),m.size+=e.size,A=!1}if(R.offset=e.offset-T,R.zip64)((e,t)=>{const{rawExtraFieldZip64:n,offset:r,diskNumberStart:s}=e,{zip64UncompressedSize:a,zip64CompressedSize:o,zip64Offset:c,zip64DiskNumberStart:l}=t,u=Cr(n);let d=4;a&&(d+=8),o&&(d+=8),c&&(Ar(u,d,i(r)),d+=8),l&&vr(u,d,s)})(R,o);else if(R.offset>=F)throw new f(hr);return e.offset+=R.size,R}catch(t){if(k&&A||!k&&D){if(e.hasCorruptedEntries=!0,t)try{t.corruptedEntry=!0}catch(e){}k?e.offset+=C.writable.size:e.offset=C.writable.size}throw c.delete(r),t}finally{k&&e.bufferedWrites--,x&&x(),z&&z()}async function W(){e.writerLocked=!0;const{lockWriter:t}=e;e.lockWriter=new y((t=>z=()=>{e.writerLocked=!1,t()})),await t}async function E(e){_r(m.localHeaderArray)>l.availableSize&&(l.availableSize=0,await br(e,new w))}})(e,r,s,{headerInfo:he,dataDescriptorInfo:pe,metadataSize:ge},c)}finally{e.pendingEntriesSize-=re}return n.assign(me,{name:r,comment:m,extraField:te}),new Fn(me)})(c,e,r,s),l.add(m),await m}catch(t){throw c.filenames.delete(e),t}finally{l.delete(m);const e=mr.shift();e?e():gr--}}async close(e=new w,n={}){const{pendingAddFileCalls:r,writer:s}=this,{writable:o}=s;for(;r.size;)await y.allSettled(t.from(r));return await(async(e,n,r)=>{const{files:s,writer:o}=e,{diskOffset:c,writable:l}=o;let{diskNumber:u}=o,d=0,h=0,p=e.offset-c,g=s.size;for(const[,e]of s){const{rawFilename:t,rawExtraFieldZip64:n,rawExtraFieldAES:r,rawComment:s,rawExtraFieldNTFS:i,rawExtraField:o,extendedTimestamp:c,extraFieldExtendedTimestampFlag:l,lastModDate:u}=e;let d;if(c){d=new w(9);const e=Cr(d);xr(e,0,P),xr(e,2,5),zr(e,4,l),vr(e,5,a.floor(u.getTime()/1e3))}else d=new w;e.rawExtraFieldCDExtendedTimestamp=d,h+=46+_r(t,s,n,r,i,d,o)}const m=new w(h),y=Cr(m);await an(o);let b=0;for(const[e,n]of t.from(s.values()).entries()){const{offset:t,rawFilename:i,rawExtraFieldZip64:a,rawExtraFieldAES:c,rawExtraFieldCDExtendedTimestamp:u,rawExtraFieldNTFS:f,rawExtraField:w,rawComment:h,versionMadeBy:p,headerArray:g,directory:S,zip64:k,zip64UncompressedSize:z,zip64CompressedSize:x,zip64DiskNumberStart:v,zip64Offset:A,msDosCompatible:D,internalFileAttribute:C,externalFileAttribute:_,diskNumberStart:R,uncompressedSize:W,compressedSize:T}=n,L=_r(a,c,u,f,w);vr(y,d,U),xr(y,d+4,p);const I=Cr(g);z||vr(I,18,W),x||vr(I,14,T),Dr(m,g,d+6),xr(y,d+30,L),xr(y,d+32,_r(h)),xr(y,d+34,k&&v?E:R),xr(y,d+36,C),_?vr(y,d+38,_):S&&D&&zr(y,d+38,16),vr(y,d+42,k&&A?F:t),Dr(m,i,d+46),Dr(m,a,d+46+_r(i)),Dr(m,c,d+46+_r(i,a)),Dr(m,u,d+46+_r(i,a,c)),Dr(m,f,d+46+_r(i,a,c,u)),Dr(m,w,d+46+_r(i,a,c,u,f)),Dr(m,h,d+46+_r(i)+L);const N=46+_r(i,h)+L;if(d-b>o.availableSize&&(o.availableSize=0,await br(l,m.slice(b,d)),b=d),d+=N,r.onprogress)try{await r.onprogress(e+1,s.size,new Fn(n))}catch(e){}}await br(l,b?m.slice(b):m);let S=o.diskNumber;const{availableSize:k}=o;O>k&&S++;let z=kr(e,r,"zip64");if(!(F>p&&F>h&&E>g&&E>S)){if(!1===z)throw new f(hr);z=!0}const x=new w(z?98:O),v=Cr(x);d=0,z&&(vr(v,0,I),Ar(v,4,i(44)),xr(v,12,45),xr(v,14,45),vr(v,16,S),vr(v,20,u),Ar(v,24,i(g)),Ar(v,32,i(g)),Ar(v,40,i(h)),Ar(v,48,i(p)),vr(v,56,N),Ar(v,64,i(p)+i(h)),vr(v,72,S+1),kr(e,r,"supportZip64SplitFile",!0)&&(S=E,u=E),g=E,p=F,h=F,d+=76),vr(v,d,101010256),xr(v,d+4,S),xr(v,d+6,u),xr(v,d+8,g),xr(v,d+10,g),vr(v,d+12,h),vr(v,d+16,p);const A=_r(n);if(A){if(A>E)throw new f(or);xr(v,d+20,A)}await br(l,x),A&&await br(l,n)})(this,e,n),kr(this,n,"preventClose")||await o.getWriter().close(),s.getData?s.getData():o}}async function br(e,t){const n=e.getWriter();try{await n.ready,e.size+=_r(t),await n.write(t)}finally{n.releaseLock()}}function Sr(e){if(e)return(i(e.getTime())+i(116444736e5))*i(1e4)}function kr(e,t,n,r){const s=t[n]===Z?e.options[n]:t[n];return s===Z?r:s}function zr(e,t,n){e.setUint8(t,n)}function xr(e,t,n){e.setUint16(t,n,!0)}function vr(e,t,n){e.setUint32(t,n,!0)}function Ar(e,t,n){e.setBigUint64(t,n,!0)}function Dr(e,t,n){e.set(t,n)}function Cr(e){return new g(e.buffer)}function _r(...e){let t=0;return e.forEach((e=>e&&(t+=e.length))),t}class Rr{constructor(e,t,r,s){const i=this;if(e.root&&s&&s.getChildByName(t))throw new f("Entry filename already exists");r||(r={}),n.assign(i,{fs:e,name:t,data:r.data,options:r.options,id:e.entries.length,parent:s,children:[],uncompressedSize:r.uncompressedSize||0}),e.entries.push(i),s&&i.parent.children.push(i)}moveTo(e){this.fs.move(this,e)}getFullname(){return this.getRelativeName()}getRelativeName(e=this.fs.root){let t=this.name,n=this.parent;for(;n&&n!=e;)t=(n.name?n.name+"/":"")+t,n=n.parent;return t}isDescendantOf(e){let t=this.parent;for(;t&&t.id!=e.id;)t=t.parent;return!!t}rename(e){const t=this.parent;if(t&&t.getChildByName(e))throw new f("Entry filename already exists");this.name=e}}class Wr extends Rr{constructor(e,t,n,r){super(e,t,n,r);const s=this;s.Reader=n.Reader,s.Writer=n.Writer,n.getData&&(s.getData=n.getData)}clone(){return new Wr(this.fs,this.name,this)}async getData(e,t={}){const n=this;if(!e||e.constructor==n.Writer&&n.data)return n.data;{const r=n.reader=new n.Reader(n.data,t),s=n.data?n.data.uncompressedSize:r.size;await y.all([an(r),an(e,s)]);const i=r.readable;return i.size=n.uncompressedSize=r.size,await i.pipeTo(e.writable),e.getData?e.getData():e.writable}}isPasswordProtected(){return this.data.encrypted}async checkPassword(e,t={}){const n=this;if(!n.isPasswordProtected())return!0;t.password=e,t.checkPasswordOnly=!0;try{return await n.data.getData(null,t),!0}catch(e){if(e.message==fe)return!1;throw e}}getText(e,t){return this.getData(new qt(e),t)}getBlob(e,t){return this.getData(new Ot(e),t)}getData64URI(e,t){return this.getData(new It(e),t)}getUint8Array(e){return this.getData(new nn,e)}getWritable(e=new D,t){return this.getData({writable:e},t)}replaceBlob(e){n.assign(this,{data:e,Reader:Nt,Writer:Ot,reader:null})}replaceText(e){n.assign(this,{data:e,Reader:Pt,Writer:qt,reader:null})}replaceData64URI(e){n.assign(this,{data:e,Reader:Ut,Writer:It,reader:null})}replaceUint8Array(e){n.assign(this,{data:e,Reader:tn,Writer:nn,reader:null})}replaceReadable(e){n.assign(this,{data:null,Reader:()=>({readable:e}),Writer:null,reader:null})}}class Fr extends Rr{constructor(e,t,n,r){super(e,t,n,r),this.directory=!0}clone(e){const t=this,n=new Fr(t.fs,t.name);return e&&(n.children=t.children.map((t=>{const r=t.clone(e);return r.parent=n,r}))),n}addDirectory(e,t){return Pr(this,e,{options:t},!0)}addText(e,t,n={}){return Pr(this,e,{data:t,Reader:Pt,Writer:qt,options:n,uncompressedSize:t.length})}addBlob(e,t,n={}){return Pr(this,e,{data:t,Reader:Nt,Writer:Ot,options:n,uncompressedSize:t.size})}addData64URI(e,t,n={}){let r=t.length;for(;"="==t.charAt(r-1);)r--;const s=t.indexOf(",")+1;return Pr(this,e,{data:t,Reader:Ut,Writer:It,options:n,uncompressedSize:a.floor(.75*(r-s))})}addUint8Array(e,t,n={}){return Pr(this,e,{data:t,Reader:tn,Writer:nn,options:n,uncompressedSize:t.length})}addHttpContent(e,t,n={}){return Pr(this,e,{data:t,Reader:class extends en{constructor(e){super(e,n)}},options:n})}addReadable(e,t,n={}){return Pr(this,e,{Reader:()=>({readable:t}),options:n})}addFileSystemEntry(e,t={}){return Ir(this,e,t)}addFileSystemHandle(e,t={}){return Ir(this,e,t)}addFile(e,t={}){return t.lastModDate||(t.lastModDate=new o(e.lastModified)),Pr(this,e.name,{data:e,Reader:()=>({readable:e.stream(),size:e.size}),options:t,uncompressedSize:e.size})}addData(e,t){return Pr(this,e,t)}importBlob(e,t){return this.importZip(new Nt(e),t)}importData64URI(e,t){return this.importZip(new Ut(e),t)}importUint8Array(e,t){return this.importZip(new tn(e),t)}importHttpContent(e,t){return this.importZip(new en(e,t),t)}importReadable(e,t){return this.importZip({readable:e},t)}exportBlob(e={}){return this.exportZip(new Ot(e.mimeType||"application/zip"),e)}exportData64URI(e={}){return this.exportZip(new It(e.mimeType||"application/zip"),e)}exportUint8Array(e={}){return this.exportZip(new nn,e)}async exportWritable(e=new D,t={}){return await this.exportZip({writable:e},t),e}async importZip(e,t={}){await an(e);const r=new Gn(e,t),s=[],i=await r.getEntries();for(const e of i){let r=this;try{const i=e.filename.split("/"),a=i.pop();i.forEach(((t,n)=>{const a=r;r=r.getChildByName(t),r||(r=new Fr(this.fs,t,{data:n==i.length-1?e:null},a),s.push(r))})),e.directory||s.push(Pr(r,a,{data:e,Reader:Tr(n.assign({},t)),uncompressedSize:e.uncompressedSize}))}catch(t){try{t.cause={entry:e}}catch(e){}throw t}}return s}async exportZip(e,r){const s=this;r.bufferedWrite===Z&&(r.bufferedWrite=!0),await y.all([Lr(s,r.readerOptions),an(e)]);const i=new yr(e,r);return await(async(e,r,s,i)=>{const a=r,o=new c;await async function e(r,c){async function l(c){const l=i.relativePath?c.getRelativeName(a):c.getFullname();let u=c.options||{},d={};if(c.data instanceof Fn){const{externalFileAttribute:e,versionMadeBy:t,comment:n,lastModDate:r,creationDate:s,lastAccessDate:i}=c.data;d={externalFileAttribute:e,versionMadeBy:t,comment:n,lastModDate:r,creationDate:s,lastAccessDate:i}}await r.add(l,c.reader,n.assign({directory:c.directory},n.assign({},i,d,u,{onprogress:async e=>{if(i.onprogress){o.set(l,e);try{await i.onprogress(t.from(o.values()).reduce(((e,t)=>e+t)),s)}catch(e){}}}}))),await e(r,c)}await(async()=>{if(i.bufferedWrite)await y.allSettled(c.children.map(l));else for(const e of c.children)await l(e)})()}(e,r)})(i,s,(e=>{let t=0;return e.forEach((function e(n){t+=n.uncompressedSize,n.children&&n.children.forEach(e)})),t})([s]),r),await i.close(),e.getData?e.getData():e.writable}getChildByName(e){const t=this.children;for(let n=0;nn.checkPassword(e,t))))).includes(!1)}}const Er={FS:class{constructor(){Or(this)}get children(){return this.root.children}remove(e){Ur(e),this.entries[e.id]=null}move(e,t){if(e==this.root)throw new f("Root directory cannot be moved");if(!t.directory)throw new f("Target entry is not a directory");if(t.isDescendantOf(e))throw new f("Entry is a ancestor of target entry");if(e!=t){if(t.getChildByName(e.name))throw new f("Entry filename already exists");Ur(e),e.parent=t,t.children.push(e)}}find(e){const t=e.split("/");let n=this.root;for(let e=0;n&&e{if(e.directory)await Lr(e,t);else{const n=e.reader=new e.Reader(e.data,t);try{await an(n)}catch(t){try{t.entryId=e.id,t.cause={entry:e}}catch(e){}throw t}e.uncompressedSize=n.size}})))}function Ur(e){if(e.parent){const t=e.parent.children;t.forEach(((n,r)=>{n.id==e.id&&t.splice(r,1)}))}}async function Ir(e,t,r){return async function e(t,s,i){if(s)try{if((s.isFile||s.isDirectory)&&(s=await Nr(s)),"file"==s.kind){const e=await s.getFile();i.push(t.addData(e.name,{Reader:()=>({readable:e.stream(),size:e.size}),options:n.assign({},{lastModDate:new o(e.lastModified)},r),uncompressedSize:e.size}))}else if("directory"==s.kind){const n=t.addDirectory(s.name);i.push(n);for await(const t of s.values())await e(n,t,i)}}catch(e){const t=e.message+(s?" ("+s.name+")":"");throw new f(t)}return i}(e,t,[])}async function Nr(e){const t={name:e.name};if(e.isFile&&(t.kind="file",t.getFile=()=>new y(((t,n)=>e.file(t,n)))),e.isDirectory){t.kind="directory";const n=await(async e=>{const t=[];function n(e,r,s){e.readEntries((async i=>{if(i.length){for(const e of i)t.push(await Nr(e));n(e,r,s)}else r(t)}),s)}return await new y(((t,r)=>n(e.createReader(),t,r))),{[Symbol.iterator](){let e=0;return{next(){const n={value:t[e],done:e===t.length};return e++,n}}}}})(e);t.values=()=>n}return t}function Or(e){e.entries=[],e.root=new Fr(e)}function Pr(e,t,n,r){if(e.directory)return r?new Fr(e.fs,t,n,e):new Wr(e.fs,t,n,e);throw new f("Parent entry is not a directory")}let qr;try{qr=void 0===k&&"undefined"==typeof location?new(require("url").URL)("file:"+__filename).href:void 0===k?location.href:k.currentScript&&k.currentScript.src||new d("zip-fs.min.js",k.baseURI).href}catch(e){}$({baseURL:qr}),(e=>{const t=()=>d.createObjectURL(new m(['const{Array:e,Object:t,Number:n,Math:r,Error:s,Uint8Array:i,Uint16Array:o,Uint32Array:c,Int32Array:f,Map:a,DataView:l,Promise:u,TextEncoder:w,crypto:h,postMessage:d,TransformStream:p,ReadableStream:y,WritableStream:m,CompressionStream:b,DecompressionStream:g}=self,k=void 0,v="undefined",S="function";class z{constructor(e){return class extends p{constructor(t,n){const r=new e(n);super({transform(e,t){t.enqueue(r.append(e))},flush(e){const t=r.flush();t&&e.enqueue(t)}})}}}}const C=[];for(let e=0;256>e;e++){let t=e;for(let e=0;8>e;e++)1&t?t=t>>>1^3988292384:t>>>=1;C[e]=t}class x{constructor(e){this.t=e||-1}append(e){let t=0|this.t;for(let n=0,r=0|e.length;r>n;n++)t=t>>>8^C[255&(t^e[n])];this.t=t}get(){return~this.t}}class A extends p{constructor(){let e;const t=new x;super({transform(e,n){t.append(e),n.enqueue(e)},flush(){const n=new i(4);new l(n.buffer).setUint32(0,t.get()),e.value=n}}),e=this}}const _={concat(e,t){if(0===e.length||0===t.length)return e.concat(t);const n=e[e.length-1],r=_.i(n);return 32===r?e.concat(t):_.o(t,r,0|n,e.slice(0,e.length-1))},l(e){const t=e.length;if(0===t)return 0;const n=e[t-1];return 32*(t-1)+_.i(n)},u(e,t){if(32*e.length0&&t&&(e[n-1]=_.h(t,e[n-1]&2147483648>>t-1,1)),e},h:(e,t,n)=>32===e?t:(n?0|t:t<<32-e)+1099511627776*e,i:e=>r.round(e/1099511627776)||32,o(e,t,n,r){for(void 0===r&&(r=[]);t>=32;t-=32)r.push(n),n=0;if(0===t)return r.concat(e);for(let s=0;s>>t),n=e[s]<<32-t;const s=e.length?e[e.length-1]:0,i=_.i(s);return r.push(_.h(t+i&31,t+i>32?n:r.pop(),1)),r}},I={p:{m(e){const t=_.l(e)/8,n=new i(t);let r;for(let s=0;t>s;s++)0==(3&s)&&(r=e[s/4]),n[s]=r>>>24,r<<=8;return n},g(e){const t=[];let n,r=0;for(n=0;n9007199254740991)throw new s("Cannot hash more than 2^53 - 1 bits");const o=new c(n);let f=0;for(let e=t.blockSize+r-(t.blockSize+r&t.blockSize-1);i>=e;e+=t.blockSize)t.I(o.subarray(16*f,16*(f+1))),f+=1;return n.splice(0,16*f),t}P(){const e=this;let t=e.C;const n=e.S;t=_.concat(t,[_.h(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(r.floor(e.A/4294967296)),t.push(0|e.A);t.length;)e.I(t.splice(0,16));return e.reset(),n}D(e,t,n,r){return e>19?e>39?e>59?e>79?void 0:t^n^r:t&n|t&r|n&r:t^n^r:t&n|~t&r}V(e,t){return t<>>32-e}I(t){const n=this,s=n.S,i=e(80);for(let e=0;16>e;e++)i[e]=t[e];let o=s[0],c=s[1],f=s[2],a=s[3],l=s[4];for(let e=0;79>=e;e++){16>e||(i[e]=n.V(1,i[e-3]^i[e-8]^i[e-14]^i[e-16]));const t=n.V(5,o)+n.D(e,c,f,a)+l+i[e]+n.v[r.floor(e/20)]|0;l=a,a=f,f=n.V(30,c),c=o,o=t}s[0]=s[0]+o|0,s[1]=s[1]+c|0,s[2]=s[2]+f|0,s[3]=s[3]+a|0,s[4]=s[4]+l|0}},D={getRandomValues(e){const t=new c(e.buffer),n=e=>{let t=987654321;const n=4294967295;return()=>(t=36969*(65535&t)+(t>>16)&n,(((t<<16)+(e=18e3*(65535&e)+(e>>16)&n)&n)/4294967296+.5)*(r.random()>.5?1:-1))};for(let s,i=0;inew V.R(I.p.g(e)),B(e,t,n,r){if(n=n||1e4,0>r||0>n)throw new s("invalid params to pbkdf2");const i=1+(r>>5)<<2;let o,c,f,a,u;const w=new ArrayBuffer(i),h=new l(w);let d=0;const p=_;for(t=I.p.g(t),u=1;(i||1)>d;u++){for(o=c=e.encrypt(p.concat(t,[u])),f=1;n>f;f++)for(c=e.encrypt(c),a=0;ad&&fs&&(e=(new n).update(e).P());for(let t=0;s>t;t++)r[0][t]=909522486^e[t],r[1][t]=1549556828^e[t];t.U[0].update(r[0]),t.U[1].update(r[1]),t.K=new n(t.U[0])}reset(){const e=this;e.K=new e.M(e.U[0]),e.N=!1}update(e){this.N=!0,this.K.update(e)}digest(){const e=this,t=e.K.P(),n=new e.M(e.U[1]).update(t).P();return e.reset(),n}encrypt(e){if(this.N)throw new s("encrypt on already updated hmac called!");return this.update(e),this.digest(e)}}},R=typeof h!=v&&typeof h.getRandomValues==S,B="Invalid password",E="Invalid signature",M="zipjs-abort-check-password";function U(e){return R?h.getRandomValues(e):D.getRandomValues(e)}const K=16,N={name:"PBKDF2"},O=t.assign({hash:{name:"HMAC"}},N),T=t.assign({iterations:1e3,hash:{name:"SHA-1"}},N),W=["deriveBits"],j=[8,12,16],H=[16,24,32],L=10,F=[0,0,0,0],q=typeof h!=v,G=q&&h.subtle,J=q&&typeof G!=v,Q=I.p,X=class{constructor(e){const t=this;t.O=[[[],[],[],[],[]],[[],[],[],[],[]]],t.O[0][0][0]||t.T();const n=t.O[0][4],r=t.O[1],i=e.length;let o,c,f,a=1;if(4!==i&&6!==i&&8!==i)throw new s("invalid aes key size");for(t.v=[c=e.slice(0),f=[]],o=i;4*i+28>o;o++){let e=c[o-1];(o%i==0||8===i&&o%i==4)&&(e=n[e>>>24]<<24^n[e>>16&255]<<16^n[e>>8&255]<<8^n[255&e],o%i==0&&(e=e<<8^e>>>24^a<<24,a=a<<1^283*(a>>7))),c[o]=c[o-i]^e}for(let e=0;o;e++,o--){const t=c[3&e?o:o-4];f[e]=4>=o||4>e?t:r[0][n[t>>>24]]^r[1][n[t>>16&255]]^r[2][n[t>>8&255]]^r[3][n[255&t]]}}encrypt(e){return this.W(e,0)}decrypt(e){return this.W(e,1)}T(){const e=this.O[0],t=this.O[1],n=e[4],r=t[4],s=[],i=[];let o,c,f,a;for(let e=0;256>e;e++)i[(s[e]=e<<1^283*(e>>7))^e]=e;for(let l=o=0;!n[l];l^=c||1,o=i[o]||1){let i=o^o<<1^o<<2^o<<3^o<<4;i=i>>8^255&i^99,n[l]=i,r[i]=l,a=s[f=s[c=s[l]]];let u=16843009*a^65537*f^257*c^16843008*l,w=257*s[i]^16843008*i;for(let n=0;4>n;n++)e[n][l]=w=w<<24^w>>>8,t[n][i]=u=u<<24^u>>>8}for(let n=0;5>n;n++)e[n]=e[n].slice(0),t[n]=t[n].slice(0)}W(e,t){if(4!==e.length)throw new s("invalid aes block size");const n=this.v[t],r=n.length/4-2,i=[0,0,0,0],o=this.O[t],c=o[0],f=o[1],a=o[2],l=o[3],u=o[4];let w,h,d,p=e[0]^n[0],y=e[t?3:1]^n[1],m=e[2]^n[2],b=e[t?1:3]^n[3],g=4;for(let e=0;r>e;e++)w=c[p>>>24]^f[y>>16&255]^a[m>>8&255]^l[255&b]^n[g],h=c[y>>>24]^f[m>>16&255]^a[b>>8&255]^l[255&p]^n[g+1],d=c[m>>>24]^f[b>>16&255]^a[p>>8&255]^l[255&y]^n[g+2],b=c[b>>>24]^f[p>>16&255]^a[y>>8&255]^l[255&m]^n[g+3],g+=4,p=w,y=h,m=d;for(let e=0;4>e;e++)i[t?3&-e:e]=u[p>>>24]<<24^u[y>>16&255]<<16^u[m>>8&255]<<8^u[255&b]^n[g++],w=p,p=y,y=m,m=b,b=w;return i}},Y=class{constructor(e,t){this.j=e,this.H=t,this.L=t}reset(){this.L=this.H}update(e){return this.F(this.j,e,this.L)}q(e){if(255==(e>>24&255)){let t=e>>16&255,n=e>>8&255,r=255&e;255===t?(t=0,255===n?(n=0,255===r?r=0:++r):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=r}else e+=1<<24;return e}G(e){0===(e[0]=this.q(e[0]))&&(e[1]=this.q(e[1]))}F(e,t,n){let r;if(!(r=t.length))return[];const s=_.l(t);for(let s=0;r>s;s+=4){this.G(n);const r=e.encrypt(n);t[s]^=r[0],t[s+1]^=r[1],t[s+2]^=r[2],t[s+3]^=r[3]}return _.u(t,s)}},Z=V.R;let $=q&&J&&typeof G.importKey==S,ee=q&&J&&typeof G.deriveBits==S;class te extends p{constructor({password:e,rawPassword:n,signed:r,encryptionStrength:o,checkPasswordOnly:c}){super({start(){t.assign(this,{ready:new u((e=>this.J=e)),password:ie(e,n),signed:r,X:o-1,pending:new i})},async transform(e,t){const n=this,{password:r,X:o,J:f,ready:a}=n;r?(await(async(e,t,n,r)=>{const i=await se(e,t,n,ce(r,0,j[t])),o=ce(r,j[t]);if(i[0]!=o[0]||i[1]!=o[1])throw new s(B)})(n,o,r,ce(e,0,j[o]+2)),e=ce(e,j[o]+2),c?t.error(new s(M)):f()):await a;const l=new i(e.length-L-(e.length-L)%K);t.enqueue(re(n,e,l,0,L,!0))},async flush(e){const{signed:t,Y:n,Z:r,pending:o,ready:c}=this;if(r&&n){await c;const f=ce(o,0,o.length-L),a=ce(o,o.length-L);let l=new i;if(f.length){const e=ae(Q,f);r.update(e);const t=n.update(e);l=fe(Q,t)}if(t){const e=ce(fe(Q,r.digest()),0,L);for(let t=0;L>t;t++)if(e[t]!=a[t])throw new s(E)}e.enqueue(l)}}})}}class ne extends p{constructor({password:e,rawPassword:n,encryptionStrength:r}){let s;super({start(){t.assign(this,{ready:new u((e=>this.J=e)),password:ie(e,n),X:r-1,pending:new i})},async transform(e,t){const n=this,{password:r,X:s,J:o,ready:c}=n;let f=new i;r?(f=await(async(e,t,n)=>{const r=U(new i(j[t]));return oe(r,await se(e,t,n,r))})(n,s,r),o()):await c;const a=new i(f.length+e.length-e.length%K);a.set(f,0),t.enqueue(re(n,e,a,f.length,0))},async flush(e){const{Y:t,Z:n,pending:r,ready:o}=this;if(n&&t){await o;let c=new i;if(r.length){const e=t.update(ae(Q,r));n.update(e),c=fe(Q,e)}s.signature=fe(Q,n.digest()).slice(0,L),e.enqueue(oe(c,s.signature))}}}),s=this}}function re(e,t,n,r,s,o){const{Y:c,Z:f,pending:a}=e,l=t.length-s;let u;for(a.length&&(t=oe(a,t),n=((e,t)=>{if(t&&t>e.length){const n=e;(e=new i(t)).set(n,0)}return e})(n,l-l%K)),u=0;l-K>=u;u+=K){const e=ae(Q,ce(t,u,u+K));o&&f.update(e);const s=c.update(e);o||f.update(s),n.set(fe(Q,s),u+r)}return e.pending=ce(t,u),n}async function se(n,r,s,o){n.password=null;const c=await(async(e,t,n,r,s)=>{if(!$)return V.importKey(t);try{return await G.importKey("raw",t,n,!1,s)}catch(e){return $=!1,V.importKey(t)}})(0,s,O,0,W),f=await(async(e,t,n)=>{if(!ee)return V.B(t,e.salt,T.iterations,n);try{return await G.deriveBits(e,t,n)}catch(r){return ee=!1,V.B(t,e.salt,T.iterations,n)}})(t.assign({salt:o},T),c,8*(2*H[r]+2)),a=new i(f),l=ae(Q,ce(a,0,H[r])),u=ae(Q,ce(a,H[r],2*H[r])),w=ce(a,2*H[r]);return t.assign(n,{keys:{key:l,$:u,passwordVerification:w},Y:new Y(new X(l),e.from(F)),Z:new Z(u)}),w}function ie(e,t){return t===k?(e=>{if(typeof w==v){const t=new i((e=unescape(encodeURIComponent(e))).length);for(let n=0;n>>24]),i=~e.te.get(),e.keys=[n,s,i]}function ye(e){const t=2|e.keys[2];return me(r.imul(t,1^t)>>>8)}function me(e){return 255&e}function be(e){return 4294967295&e}const ge="deflate-raw";class ke extends p{constructor(e,{chunkSize:t,CompressionStream:n,CompressionStreamNative:r}){super({});const{compressed:s,encrypted:i,useCompressionStream:o,zipCrypto:c,signed:f,level:a}=e,u=this;let w,h,d=Se(super.readable);i&&!c||!f||(w=new A,d=xe(d,w)),s&&(d=Ce(d,o,{level:a,chunkSize:t},r,n)),i&&(c?d=xe(d,new ue(e)):(h=new ne(e),d=xe(d,h))),ze(u,d,(()=>{let e;i&&!c&&(e=h.signature),i&&!c||!f||(e=new l(w.value.buffer).getUint32(0)),u.signature=e}))}}class ve extends p{constructor(e,{chunkSize:t,DecompressionStream:n,DecompressionStreamNative:r}){super({});const{zipCrypto:i,encrypted:o,signed:c,signature:f,compressed:a,useCompressionStream:u}=e;let w,h,d=Se(super.readable);o&&(i?d=xe(d,new le(e)):(h=new te(e),d=xe(d,h))),a&&(d=Ce(d,u,{chunkSize:t},r,n)),o&&!i||!c||(w=new A,d=xe(d,w)),ze(this,d,(()=>{if((!o||i)&&c){const e=new l(w.value.buffer);if(f!=e.getUint32(0,!1))throw new s(E)}}))}}function Se(e){return xe(e,new p({transform(e,t){e&&e.length&&t.enqueue(e)}}))}function ze(e,n,r){n=xe(n,new p({flush:r})),t.defineProperty(e,"readable",{get:()=>n})}function Ce(e,t,n,r,s){try{e=xe(e,new(t&&r?r:s)(ge,n))}catch(r){if(!t)return e;try{e=xe(e,new s(ge,n))}catch(t){return e}}return e}function xe(e,t){return e.pipeThrough(t)}const Ae="data",_e="close";class Ie extends p{constructor(e,n){super({});const r=this,{codecType:s}=e;let i;s.startsWith("deflate")?i=ke:s.startsWith("inflate")&&(i=ve);let o=0,c=0;const f=new i(e,n),a=super.readable,l=new p({transform(e,t){e&&e.length&&(c+=e.length,t.enqueue(e))},flush(){t.assign(r,{inputSize:c})}}),u=new p({transform(e,t){e&&e.length&&(o+=e.length,t.enqueue(e))},flush(){const{signature:e}=f;t.assign(r,{signature:e,outputSize:o,inputSize:c})}});t.defineProperty(r,"readable",{get:()=>a.pipeThrough(l).pipeThrough(f).pipeThrough(u)})}}class Pe extends p{constructor(e){let t;super({transform:function n(r,s){if(t){const e=new i(t.length+r.length);e.set(t),e.set(r,t.length),r=e,t=null}r.length>e?(s.enqueue(r.slice(0,e)),n(r.slice(e),s)):t=r},flush(e){t&&t.length&&e.enqueue(t)}})}}const De=new a,Ve=new a;let Re,Be=0,Ee=!0;async function Me(e){try{const{options:t,scripts:r,config:s}=e;if(r&&r.length)try{Ee?importScripts.apply(k,r):await Ue(r)}catch(e){Ee=!1,await Ue(r)}self.initCodec&&self.initCodec(),s.CompressionStreamNative=self.CompressionStream,s.DecompressionStreamNative=self.DecompressionStream,self.Deflate&&(s.CompressionStream=new z(self.Deflate)),self.Inflate&&(s.DecompressionStream=new z(self.Inflate));const i={highWaterMark:1},o=e.readable||new y({async pull(e){const t=new u((e=>De.set(Be,e)));Ke({type:"pull",messageId:Be}),Be=(Be+1)%n.MAX_SAFE_INTEGER;const{value:r,done:s}=await t;e.enqueue(r),s&&e.close()}},i),c=e.writable||new m({async write(e){let t;const r=new u((e=>t=e));Ve.set(Be,t),Ke({type:Ae,value:e,messageId:Be}),Be=(Be+1)%n.MAX_SAFE_INTEGER,await r}},i),f=new Ie(t,s);Re=new AbortController;const{signal:a}=Re;await o.pipeThrough(f).pipeThrough(new Pe(s.chunkSize)).pipeTo(c,{signal:a,preventClose:!0,preventAbort:!0}),await c.getWriter().close();const{signature:l,inputSize:w,outputSize:h}=f;Ke({type:_e,result:{signature:l,inputSize:w,outputSize:h}})}catch(e){Ne(e)}}async function Ue(e){for(const t of e)await import(t)}function Ke(e){let{value:t}=e;if(t)if(t.length)try{t=new i(t),e.value=t.buffer,d(e,[e.value])}catch(t){d(e)}else d(e);else d(e)}function Ne(e=new s("Unknown error")){const{message:t,stack:n,code:r,name:i}=e;d({error:{message:t,stack:n,code:r,name:i}})}addEventListener("message",(({data:e})=>{const{type:t,messageId:n,value:r,done:s}=e;try{if("start"==t&&Me(e),t==Ae){const e=De.get(n);De.delete(n),e({value:new i(r),done:s})}if("ack"==t){const e=Ve.get(n);Ve.delete(n),e()}t==_e&&Re.abort()}catch(e){Ne(e)}}));const Oe=-2;function Te(t){return We(t.map((([t,n])=>new e(t).fill(n,0,t))))}function We(t){return t.reduce(((t,n)=>t.concat(e.isArray(n)?We(n):n)),[])}const je=[0,1,2,3].concat(...Te([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function He(){const e=this;function t(e,t){let n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1}e.ne=n=>{const s=e.re,i=e.ie.se,o=e.ie.oe;let c,f,a,l=-1;for(n.ce=0,n.fe=573,c=0;o>c;c++)0!==s[2*c]?(n.ae[++n.ce]=l=c,n.le[c]=0):s[2*c+1]=0;for(;2>n.ce;)a=n.ae[++n.ce]=2>l?++l:0,s[2*a]=1,n.le[a]=0,n.ue--,i&&(n.we-=i[2*a+1]);for(e.he=l,c=r.floor(n.ce/2);c>=1;c--)n.de(s,c);a=o;do{c=n.ae[1],n.ae[1]=n.ae[n.ce--],n.de(s,1),f=n.ae[1],n.ae[--n.fe]=c,n.ae[--n.fe]=f,s[2*a]=s[2*c]+s[2*f],n.le[a]=r.max(n.le[c],n.le[f])+1,s[2*c+1]=s[2*f+1]=a,n.ae[1]=a++,n.de(s,1)}while(n.ce>=2);n.ae[--n.fe]=n.ae[1],(t=>{const n=e.re,r=e.ie.se,s=e.ie.pe,i=e.ie.ye,o=e.ie.me;let c,f,a,l,u,w,h=0;for(l=0;15>=l;l++)t.be[l]=0;for(n[2*t.ae[t.fe]+1]=0,c=t.fe+1;573>c;c++)f=t.ae[c],l=n[2*n[2*f+1]+1]+1,l>o&&(l=o,h++),n[2*f+1]=l,f>e.he||(t.be[l]++,u=0,i>f||(u=s[f-i]),w=n[2*f],t.ue+=w*(l+u),r&&(t.we+=w*(r[2*f+1]+u)));if(0!==h){do{for(l=o-1;0===t.be[l];)l--;t.be[l]--,t.be[l+1]+=2,t.be[o]--,h-=2}while(h>0);for(l=o;0!==l;l--)for(f=t.be[l];0!==f;)a=t.ae[--c],a>e.he||(n[2*a+1]!=l&&(t.ue+=(l-n[2*a+1])*n[2*a],n[2*a+1]=l),f--)}})(n),((e,n,r)=>{const s=[];let i,o,c,f=0;for(i=1;15>=i;i++)s[i]=f=f+r[i-1]<<1;for(o=0;n>=o;o++)c=e[2*o+1],0!==c&&(e[2*o]=t(s[c]++,c))})(s,e.he,n.be)}}function Le(e,t,n,r,s){const i=this;i.se=e,i.pe=t,i.ye=n,i.oe=r,i.me=s}He.ge=[0,1,2,3,4,5,6,7].concat(...Te([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]])),He.ke=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0],He.ve=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576],He.Se=e=>256>e?je[e]:je[256+(e>>>7)],He.ze=[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],He.Ce=[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],He.xe=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],He.Ae=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];const Fe=Te([[144,8],[112,9],[24,7],[8,8]]);Le._e=We([12,140,76,204,44,172,108,236,28,156,92,220,60,188,124,252,2,130,66,194,34,162,98,226,18,146,82,210,50,178,114,242,10,138,74,202,42,170,106,234,26,154,90,218,58,186,122,250,6,134,70,198,38,166,102,230,22,150,86,214,54,182,118,246,14,142,78,206,46,174,110,238,30,158,94,222,62,190,126,254,1,129,65,193,33,161,97,225,17,145,81,209,49,177,113,241,9,137,73,201,41,169,105,233,25,153,89,217,57,185,121,249,5,133,69,197,37,165,101,229,21,149,85,213,53,181,117,245,13,141,77,205,45,173,109,237,29,157,93,221,61,189,125,253,19,275,147,403,83,339,211,467,51,307,179,435,115,371,243,499,11,267,139,395,75,331,203,459,43,299,171,427,107,363,235,491,27,283,155,411,91,347,219,475,59,315,187,443,123,379,251,507,7,263,135,391,71,327,199,455,39,295,167,423,103,359,231,487,23,279,151,407,87,343,215,471,55,311,183,439,119,375,247,503,15,271,143,399,79,335,207,463,47,303,175,431,111,367,239,495,31,287,159,415,95,351,223,479,63,319,191,447,127,383,255,511,0,64,32,96,16,80,48,112,8,72,40,104,24,88,56,120,4,68,36,100,20,84,52,116,3,131,67,195,35,163,99,227].map(((e,t)=>[e,Fe[t]])));const qe=Te([[30,5]]);function Ge(e,t,n,r,s){const i=this;i.Ie=e,i.Pe=t,i.De=n,i.Ve=r,i.Re=s}Le.Be=We([0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30,1,17,9,25,5,21,13,29,3,19,11,27,7,23].map(((e,t)=>[e,qe[t]]))),Le.Ee=new Le(Le._e,He.ze,257,286,15),Le.Me=new Le(Le.Be,He.Ce,0,30,15),Le.Ue=new Le(null,He.xe,0,19,7);const Je=[new Ge(0,0,0,0,0),new Ge(4,4,8,4,1),new Ge(4,5,16,8,1),new Ge(4,6,32,32,1),new Ge(4,4,16,16,2),new Ge(8,16,32,32,2),new Ge(8,16,128,128,2),new Ge(8,32,128,256,2),new Ge(32,128,258,1024,2),new Ge(32,258,258,4096,2)],Qe=["need dictionary","stream end","","","stream error","data error","","buffer error","",""],Xe=113,Ye=666,Ze=262;function $e(e,t,n,r){const s=e[2*t],i=e[2*n];return i>s||s==i&&r[t]<=r[n]}function et(){const e=this;let t,n,s,c,f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z,C,x,A,_,I,P,D,V,R,B,E,M,U;const K=new He,N=new He,O=new He;let T,W,j,H,L,F;function q(){let t;for(t=0;286>t;t++)E[2*t]=0;for(t=0;30>t;t++)M[2*t]=0;for(t=0;19>t;t++)U[2*t]=0;E[512]=1,e.ue=e.we=0,W=j=0}function G(e,t){let n,r=-1,s=e[1],i=0,o=7,c=4;0===s&&(o=138,c=3),e[2*(t+1)+1]=65535;for(let f=0;t>=f;f++)n=s,s=e[2*(f+1)+1],++ii?U[2*n]+=i:0!==n?(n!=r&&U[2*n]++,U[32]++):i>10?U[36]++:U[34]++,i=0,r=n,0===s?(o=138,c=3):n==s?(o=6,c=3):(o=7,c=4))}function J(t){e.Ke[e.pending++]=t}function Q(e){J(255&e),J(e>>>8&255)}function X(e,t){let n;const r=t;F>16-r?(n=e,L|=n<>>16-F,F+=r-16):(L|=e<=n;n++)if(r=i,i=e[2*(n+1)+1],++o>=c||r!=i){if(f>o)do{Y(r,U)}while(0!=--o);else 0!==r?(r!=s&&(Y(r,U),o--),Y(16,U),X(o-3,2)):o>10?(Y(18,U),X(o-11,7)):(Y(17,U),X(o-3,3));o=0,s=r,0===i?(c=138,f=3):r==i?(c=6,f=3):(c=7,f=4)}}function $(){16==F?(Q(L),L=0,F=0):8>F||(J(255&L),L>>>=8,F-=8)}function ee(t,n){let s,i,o;if(e.Ne[W]=t,e.Oe[W]=255&n,W++,0===t?E[2*n]++:(j++,t--,E[2*(He.ge[n]+256+1)]++,M[2*He.Se(t)]++),0==(8191&W)&&D>2){for(s=8*W,i=C-k,o=0;30>o;o++)s+=M[2*o]*(5+He.Ce[o]);if(s>>>=3,jc);Y(256,t),H=t[513]}function ne(){F>8?Q(L):F>0&&J(255&L),L=0,F=0}function re(t,n,r){X(0+(r?1:0),3),((t,n)=>{ne(),H=8,Q(n),Q(~n),e.Ke.set(u.subarray(t,t+n),e.pending),e.pending+=n})(t,n)}function se(n){((t,n,r)=>{let s,i,o=0;D>0?(K.ne(e),N.ne(e),o=(()=>{let t;for(G(E,K.he),G(M,N.he),O.ne(e),t=18;t>=3&&0===U[2*He.Ae[t]+1];t--);return e.ue+=14+3*(t+1),t})(),s=e.ue+3+7>>>3,i=e.we+3+7>>>3,i>s||(s=i)):s=i=n+5,n+4>s||-1==t?i==s?(X(2+(r?1:0),3),te(Le._e,Le.Be)):(X(4+(r?1:0),3),((e,t,n)=>{let r;for(X(e-257,5),X(t-1,5),X(n-4,4),r=0;n>r;r++)X(U[2*He.Ae[r]+1],3);Z(E,e-1),Z(M,t-1)})(K.he+1,N.he+1,o+1),te(E,M)):re(t,n,r),q(),r&&ne()})(0>k?-1:k,C-k,n),k=C,t.Te()}function ie(){let e,n,r,s;do{if(s=w-A-C,0===s&&0===C&&0===A)s=f;else if(-1==s)s--;else if(C>=f+f-Ze){u.set(u.subarray(f,f+f),0),x-=f,C-=f,k-=f,e=y,r=e;do{n=65535&d[--r],d[r]=f>n?0:n-f}while(0!=--e);e=f,r=e;do{n=65535&h[--r],h[r]=f>n?0:n-f}while(0!=--e);s+=f}if(0===t.We)return;e=t.je(u,C+A,s),A+=e,3>A||(p=255&u[C],p=(p<A&&0!==t.We)}function oe(e){let t,n,r=I,s=C,i=_;const o=C>f-Ze?C-(f-Ze):0;let c=B;const a=l,w=C+258;let d=u[s+i-1],p=u[s+i];R>_||(r>>=2),c>A&&(c=A);do{if(t=e,u[t+i]==p&&u[t+i-1]==d&&u[t]==u[s]&&u[++t]==u[s+1]){s+=2,t++;do{}while(u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&w>s);if(n=258-(w-s),s=w-258,n>i){if(x=e,i=n,n>=c)break;d=u[s+i-1],p=u[s+i]}}}while((e=65535&h[e&a])>o&&0!=--r);return i>A?A:i}e.le=[],e.be=[],e.ae=[],E=[],M=[],U=[],e.de=(t,n)=>{const r=e.ae,s=r[n];let i=n<<1;for(;i<=e.ce&&(i(W||(W=8),j||(j=8),G||(G=0),t.Le=null,-1==S&&(S=6),1>j||j>9||8!=W||9>x||x>15||0>S||S>9||0>G||G>2?Oe:(t.Fe=e,a=x,f=1<(t.qe=t.Ge=0,t.Le=null,e.pending=0,e.Je=0,n=Xe,c=0,K.re=E,K.ie=Le.Ee,N.re=M,N.ie=Le.Me,O.re=U,O.ie=Le.Ue,L=0,F=0,H=8,q(),(()=>{w=2*f,d[y-1]=0;for(let e=0;y-1>e;e++)d[e]=0;P=Je[D].Pe,R=Je[D].Ie,B=Je[D].De,I=Je[D].Ve,C=0,k=0,A=0,v=_=2,z=0,p=0})(),0))(t))),e.Qe=()=>42!=n&&n!=Xe&&n!=Ye?Oe:(e.Oe=null,e.Ne=null,e.Ke=null,d=null,h=null,u=null,e.Fe=null,n==Xe?-3:0),e.Xe=(e,t,n)=>{let r=0;return-1==t&&(t=6),0>t||t>9||0>n||n>2?Oe:(Je[D].Re!=Je[t].Re&&0!==e.qe&&(r=e.Ye(1)),D!=t&&(D=t,P=Je[D].Pe,R=Je[D].Ie,B=Je[D].De,I=Je[D].Ve),V=n,r)},e.Ze=(e,t,r)=>{let s,i=r,o=0;if(!t||42!=n)return Oe;if(3>i)return 0;for(i>f-Ze&&(i=f-Ze,o=r-i),u.set(t.subarray(o,o+i),0),C=i,k=i,p=255&u[0],p=(p<=s;s++)p=(p<{let o,w,m,I,R;if(i>4||0>i)return Oe;if(!r.$e||!r.et&&0!==r.We||n==Ye&&4!=i)return r.Le=Qe[4],Oe;if(0===r.tt)return r.Le=Qe[7],-5;var B;if(t=r,I=c,c=i,42==n&&(w=8+(a-8<<4)<<8,m=(D-1&255)>>1,m>3&&(m=3),w|=m<<6,0!==C&&(w|=32),w+=31-w%31,n=Xe,J((B=w)>>8&255),J(255&B)),0!==e.pending){if(t.Te(),0===t.tt)return c=-1,0}else if(0===t.We&&I>=i&&4!=i)return t.Le=Qe[7],-5;if(n==Ye&&0!==t.We)return r.Le=Qe[7],-5;if(0!==t.We||0!==A||0!=i&&n!=Ye){switch(R=-1,Je[D].Re){case 0:R=(e=>{let n,r=65535;for(r>s-5&&(r=s-5);;){if(1>=A){if(ie(),0===A&&0==e)return 0;if(0===A)break}if(C+=A,A=0,n=k+r,(0===C||C>=n)&&(A=C-n,C=n,se(!1),0===t.tt))return 0;if(C-k>=f-Ze&&(se(!1),0===t.tt))return 0}return se(4==e),0===t.tt?4==e?2:0:4==e?3:1})(i);break;case 1:R=(e=>{let n,r=0;for(;;){if(Ze>A){if(ie(),Ze>A&&0==e)return 0;if(0===A)break}if(3>A||(p=(p<f-Ze||2!=V&&(v=oe(r)),3>v)n=ee(0,255&u[C]),A--,C++;else if(n=ee(C-x,v-3),A-=v,v>P||3>A)C+=v,v=0,p=255&u[C],p=(p<{let n,r,s=0;for(;;){if(Ze>A){if(ie(),Ze>A&&0==e)return 0;if(0===A)break}if(3>A||(p=(p<_&&f-Ze>=(C-s&65535)&&(2!=V&&(v=oe(s)),5>=v&&(1==V||3==v&&C-x>4096)&&(v=2)),3>_||v>_)if(0!==z){if(n=ee(0,255&u[C-1]),n&&se(!1),C++,A--,0===t.tt)return 0}else z=1,C++,A--;else{r=C+A-3,n=ee(C-1-S,_-3),A-=_-1,_-=2;do{++C>r||(p=(p<1+H+10-F&&(X(2,3),Y(256,Le._e),$()),H=7;else if(re(0,0,!1),3==i)for(o=0;y>o;o++)d[o]=0;if(t.Te(),0===t.tt)return c=-1,0}}return 4!=i?0:1}}function tt(){const e=this;e.nt=0,e.rt=0,e.We=0,e.qe=0,e.tt=0,e.Ge=0}function nt(e){const t=new tt,n=(o=e&&e.chunkSize?e.chunkSize:65536)+5*(r.floor(o/16383)+1);var o;const c=new i(n);let f=e?e.level:-1;void 0===f&&(f=-1),t.He(f),t.$e=c,this.append=(e,r)=>{let o,f,a=0,l=0,u=0;const w=[];if(e.length){t.nt=0,t.et=e,t.We=e.length;do{if(t.rt=0,t.tt=n,o=t.Ye(0),0!=o)throw new s("deflating: "+t.Le);t.rt&&(t.rt==n?w.push(new i(c)):w.push(c.subarray(0,t.rt))),u+=t.rt,r&&t.nt>0&&t.nt!=a&&(r(t.nt),a=t.nt)}while(t.We>0||0===t.tt);return w.length>1?(f=new i(u),w.forEach((e=>{f.set(e,l),l+=e.length}))):f=w[0]?new i(w[0]):new i,f}},this.flush=()=>{let e,r,o=0,f=0;const a=[];do{if(t.rt=0,t.tt=n,e=t.Ye(4),1!=e&&0!=e)throw new s("deflating: "+t.Le);n-t.tt>0&&a.push(c.slice(0,t.rt)),f+=t.rt}while(t.We>0||0===t.tt);return t.Qe(),r=new i(f),a.forEach((e=>{r.set(e,o),o+=e.length})),r}}tt.prototype={He(e,t){const n=this;return n.Fe=new et,t||(t=15),n.Fe.He(n,e,t)},Ye(e){const t=this;return t.Fe?t.Fe.Ye(t,e):Oe},Qe(){const e=this;if(!e.Fe)return Oe;const t=e.Fe.Qe();return e.Fe=null,t},Xe(e,t){const n=this;return n.Fe?n.Fe.Xe(n,e,t):Oe},Ze(e,t){const n=this;return n.Fe?n.Fe.Ze(n,e,t):Oe},je(e,t,n){const r=this;let s=r.We;return s>n&&(s=n),0===s?0:(r.We-=s,e.set(r.et.subarray(r.nt,r.nt+s),t),r.nt+=s,r.qe+=s,s)},Te(){const e=this;let t=e.Fe.pending;t>e.tt&&(t=e.tt),0!==t&&(e.$e.set(e.Fe.Ke.subarray(e.Fe.Je,e.Fe.Je+t),e.rt),e.rt+=t,e.Fe.Je+=t,e.Ge+=t,e.tt-=t,e.Fe.pending-=t,0===e.Fe.pending&&(e.Fe.Je=0))}};const rt=-2,st=-3,it=-5,ot=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],ct=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],ft=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],at=[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,0,0],lt=[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,112,112],ut=[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],wt=[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];function ht(){let e,t,n,r,s,i;function o(e,t,o,c,f,a,l,u,w,h,d){let p,y,m,b,g,k,v,S,z,C,x,A,_,I,P;C=0,g=o;do{n[e[t+C]]++,C++,g--}while(0!==g);if(n[0]==o)return l[0]=-1,u[0]=0,0;for(S=u[0],k=1;15>=k&&0===n[k];k++);for(v=k,k>S&&(S=k),g=15;0!==g&&0===n[g];g--);for(m=g,S>g&&(S=g),u[0]=S,I=1<k;k++,I<<=1)if(0>(I-=n[k]))return st;if(0>(I-=n[g]))return st;for(n[g]+=I,i[1]=k=0,C=1,_=2;0!=--g;)i[_]=k+=n[C],_++,C++;g=0,C=0;do{0!==(k=e[t+C])&&(d[i[k]++]=g),C++}while(++g=v;v++)for(p=n[v];0!=p--;){for(;v>A+S;){if(b++,A+=S,P=m-A,P=P>S?S:P,(y=1<<(k=v-A))>p+1&&(y-=p+1,_=v,P>k))for(;++kn[++_];)y-=n[_];if(P=1<1440)return st;s[b]=x=h[0],h[0]+=P,0!==b?(i[b]=g,r[0]=k,r[1]=S,k=g>>>A-S,r[2]=x-s[b-1]-k,w.set(r,3*(s[b-1]+k))):l[0]=x}for(r[1]=v-A,o>C?d[C]d[C]?0:96,r[2]=d[C++]):(r[0]=a[d[C]-c]+16+64,r[2]=f[d[C++]-c]):r[0]=192,y=1<>>A;P>k;k+=y)w.set(r,3*(x+k));for(k=1<>>=1)g^=k;for(g^=k,z=(1<c;c++)t[c]=0;for(c=0;16>c;c++)n[c]=0;for(c=0;3>c;c++)r[c]=0;s.set(n.subarray(0,15),0),i.set(n.subarray(0,16),0)}this.st=(n,r,s,i,f)=>{let a;return c(19),e[0]=0,a=o(n,0,19,19,null,null,s,r,i,e,t),a==st?f.Le="oversubscribed dynamic bit lengths tree":a!=it&&0!==r[0]||(f.Le="incomplete dynamic bit lengths tree",a=st),a},this.it=(n,r,s,i,f,a,l,u,w)=>{let h;return c(288),e[0]=0,h=o(s,0,n,257,at,lt,a,i,u,e,t),0!=h||0===i[0]?(h==st?w.Le="oversubscribed literal/length tree":-4!=h&&(w.Le="incomplete literal/length tree",h=st),h):(c(288),h=o(s,n,r,0,ut,wt,l,f,u,e,t),0!=h||0===f[0]&&n>257?(h==st?w.Le="oversubscribed distance tree":h==it?(w.Le="incomplete distance tree",h=st):-4!=h&&(w.Le="empty distance tree with lengths",h=st),h):0)}}function dt(){const e=this;let t,n,r,s,i=0,o=0,c=0,f=0,a=0,l=0,u=0,w=0,h=0,d=0;function p(e,t,n,r,s,i,o,c){let f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z;d=c.nt,p=c.We,w=o.ot,h=o.ct,y=o.write,m=yh;)p--,w|=(255&c.ft(d++))<>=a[z+1],h-=a[z+1],0!=(16&u)){for(u&=15,k=a[z+2]+(w&ot[u]),w>>=u,h-=u;15>h;)p--,w|=(255&c.ft(d++))<>=a[z+1],h-=a[z+1],0!=(16&u)){for(u&=15;u>h;)p--,w|=(255&c.ft(d++))<>=u,h-=u,m-=k,v>y){S=y-v;do{S+=o.end}while(0>S);if(u=o.end-S,k>u){if(k-=u,y-S>0&&u>y-S)do{o.lt[y++]=o.lt[S++]}while(0!=--u);else o.lt.set(o.lt.subarray(S,S+u),y),y+=u,S+=u,u=0;S=0}}else S=y-v,y-S>0&&2>y-S?(o.lt[y++]=o.lt[S++],o.lt[y++]=o.lt[S++],k-=2):(o.lt.set(o.lt.subarray(S,S+2),y),y+=2,S+=2,k-=2);if(y-S>0&&k>y-S)do{o.lt[y++]=o.lt[S++]}while(0!=--k);else o.lt.set(o.lt.subarray(S,S+k),y),y+=k,S+=k,k=0;break}if(0!=(64&u))return c.Le="invalid distance code",k=c.We-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ot=w,o.ct=h,c.We=p,c.qe+=d-c.nt,c.nt=d,o.write=y,st;f+=a[z+2],f+=w&ot[u],z=3*(l+f),u=a[z]}break}if(0!=(64&u))return 0!=(32&u)?(k=c.We-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ot=w,o.ct=h,c.We=p,c.qe+=d-c.nt,c.nt=d,o.write=y,1):(c.Le="invalid literal/length code",k=c.We-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ot=w,o.ct=h,c.We=p,c.qe+=d-c.nt,c.nt=d,o.write=y,st);if(f+=a[z+2],f+=w&ot[u],z=3*(l+f),0===(u=a[z])){w>>=a[z+1],h-=a[z+1],o.lt[y++]=a[z+2],m--;break}}else w>>=a[z+1],h-=a[z+1],o.lt[y++]=a[z+2],m--}while(m>=258&&p>=10);return k=c.We-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ot=w,o.ct=h,c.We=p,c.qe+=d-c.nt,c.nt=d,o.write=y,0}e.init=(e,i,o,c,f,a)=>{t=0,u=e,w=i,r=o,h=c,s=f,d=a,n=null},e.ut=(e,y,m)=>{let b,g,k,v,S,z,C,x=0,A=0,_=0;for(_=y.nt,v=y.We,x=e.ot,A=e.ct,S=e.write,z=S=258&&v>=10&&(e.ot=x,e.ct=A,y.We=v,y.qe+=_-y.nt,y.nt=_,e.write=S,m=p(u,w,r,h,s,d,e,y),_=y.nt,v=y.We,x=e.ot,A=e.ct,S=e.write,z=SA;){if(0===v)return e.ot=x,e.ct=A,y.We=v,y.qe+=_-y.nt,y.nt=_,e.write=S,e.wt(y,m);m=0,v--,x|=(255&y.ft(_++))<>>=n[g+1],A-=n[g+1],k=n[g],0===k){f=n[g+2],t=6;break}if(0!=(16&k)){a=15&k,i=n[g+2],t=2;break}if(0==(64&k)){c=k,o=g/3+n[g+2];break}if(0!=(32&k)){t=7;break}return t=9,y.Le="invalid literal/length code",m=st,e.ot=x,e.ct=A,y.We=v,y.qe+=_-y.nt,y.nt=_,e.write=S,e.wt(y,m);case 2:for(b=a;b>A;){if(0===v)return e.ot=x,e.ct=A,y.We=v,y.qe+=_-y.nt,y.nt=_,e.write=S,e.wt(y,m);m=0,v--,x|=(255&y.ft(_++))<>=b,A-=b,c=w,n=s,o=d,t=3;case 3:for(b=c;b>A;){if(0===v)return e.ot=x,e.ct=A,y.We=v,y.qe+=_-y.nt,y.nt=_,e.write=S,e.wt(y,m);m=0,v--,x|=(255&y.ft(_++))<>=n[g+1],A-=n[g+1],k=n[g],0!=(16&k)){a=15&k,l=n[g+2],t=4;break}if(0==(64&k)){c=k,o=g/3+n[g+2];break}return t=9,y.Le="invalid distance code",m=st,e.ot=x,e.ct=A,y.We=v,y.qe+=_-y.nt,y.nt=_,e.write=S,e.wt(y,m);case 4:for(b=a;b>A;){if(0===v)return e.ot=x,e.ct=A,y.We=v,y.qe+=_-y.nt,y.nt=_,e.write=S,e.wt(y,m);m=0,v--,x|=(255&y.ft(_++))<>=b,A-=b,t=5;case 5:for(C=S-l;0>C;)C+=e.end;for(;0!==i;){if(0===z&&(S==e.end&&0!==e.read&&(S=0,z=S7&&(A-=8,v++,_--),e.write=S,m=e.wt(y,m),S=e.write,z=S{}}ht.dt=(e,t,n,r)=>(e[0]=9,t[0]=5,n[0]=ct,r[0]=ft,0);const pt=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function yt(e,t){const n=this;let r,s=0,o=0,c=0,a=0;const l=[0],u=[0],w=new dt;let h=0,d=new f(4320);const p=new ht;n.ct=0,n.ot=0,n.lt=new i(t),n.end=t,n.read=0,n.write=0,n.reset=(e,t)=>{t&&(t[0]=0),6==s&&w.ht(e),s=0,n.ct=0,n.ot=0,n.read=n.write=0},n.reset(e,null),n.wt=(e,t)=>{let r,s,i;return s=e.rt,i=n.read,r=(i>n.write?n.end:n.write)-i,r>e.tt&&(r=e.tt),0!==r&&t==it&&(t=0),e.tt-=r,e.Ge+=r,e.$e.set(n.lt.subarray(i,i+r),s),s+=r,i+=r,i==n.end&&(i=0,n.write==n.end&&(n.write=0),r=n.write-i,r>e.tt&&(r=e.tt),0!==r&&t==it&&(t=0),e.tt-=r,e.Ge+=r,e.$e.set(n.lt.subarray(i,i+r),s),s+=r,i+=r),e.rt=s,n.read=i,t},n.ut=(e,t)=>{let i,f,y,m,b,g,k,v;for(m=e.nt,b=e.We,f=n.ot,y=n.ct,g=n.write,k=gy;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<>>1){case 0:f>>>=3,y-=3,i=7&y,f>>>=i,y-=i,s=1;break;case 1:S=[],z=[],C=[[]],x=[[]],ht.dt(S,z,C,x),w.init(S[0],z[0],C[0],0,x[0],0),f>>>=3,y-=3,s=6;break;case 2:f>>>=3,y-=3,s=3;break;case 3:return f>>>=3,y-=3,s=9,e.Le="invalid block type",t=st,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t)}break;case 1:for(;32>y;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<>>16&65535)!=(65535&f))return s=9,e.Le="invalid stored block lengths",t=st,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);o=65535&f,f=y=0,s=0!==o?2:0!==h?7:0;break;case 2:if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);if(0===k&&(g==n.end&&0!==n.read&&(g=0,k=gb&&(i=b),i>k&&(i=k),n.lt.set(e.je(m,i),g),m+=i,b-=i,g+=i,k-=i,0!=(o-=i))break;s=0!==h?7:0;break;case 3:for(;14>y;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<29||(i>>5&31)>29)return s=9,e.Le="too many length or distance symbols",t=st,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);if(i=258+(31&i)+(i>>5&31),!r||r.lengthv;v++)r[v]=0;f>>>=14,y-=14,a=0,s=4;case 4:for(;4+(c>>>10)>a;){for(;3>y;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<>>=3,y-=3}for(;19>a;)r[pt[a++]]=0;if(l[0]=7,i=p.st(r,l,u,d,e),0!=i)return(t=i)==st&&(r=null,s=9),n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);a=0,s=5;case 5:for(;i=c,258+(31&i)+(i>>5&31)>a;){let o,w;for(i=l[0];i>y;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<w)f>>>=i,y-=i,r[a++]=w;else{for(v=18==w?7:w-14,o=18==w?11:3;i+v>y;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<>>=i,y-=i,o+=f&ot[v],f>>>=v,y-=v,v=a,i=c,v+o>258+(31&i)+(i>>5&31)||16==w&&1>v)return r=null,s=9,e.Le="invalid bit length repeat",t=st,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);w=16==w?r[v-1]:0;do{r[v++]=w}while(0!=--o);a=v}}if(u[0]=-1,A=[],_=[],I=[],P=[],A[0]=9,_[0]=6,i=c,i=p.it(257+(31&i),1+(i>>5&31),r,A,_,I,P,d,e),0!=i)return i==st&&(r=null,s=9),t=i,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);w.init(A[0],_[0],d,I[0],d,P[0]),s=6;case 6:if(n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,1!=(t=w.ut(n,e,t)))return n.wt(e,t);if(t=0,w.ht(e),m=e.nt,b=e.We,f=n.ot,y=n.ct,g=n.write,k=g{n.reset(e,null),n.lt=null,d=null},n.yt=(e,t,r)=>{n.lt.set(e.subarray(t,t+r),0),n.read=n.write=r},n.bt=()=>1==s?1:0}const mt=13,bt=[0,0,255,255];function gt(){const e=this;function t(e){return e&&e.gt?(e.qe=e.Ge=0,e.Le=null,e.gt.mode=7,e.gt.kt.reset(e,null),0):rt}e.mode=0,e.method=0,e.vt=[0],e.St=0,e.marker=0,e.zt=0,e.Ct=t=>(e.kt&&e.kt.ht(t),e.kt=null,0),e.xt=(n,r)=>(n.Le=null,e.kt=null,8>r||r>15?(e.Ct(n),rt):(e.zt=r,n.gt.kt=new yt(n,1<{let n,r;if(!e||!e.gt||!e.et)return rt;const s=e.gt;for(t=4==t?it:0,n=it;;)switch(s.mode){case 0:if(0===e.We)return n;if(n=t,e.We--,e.qe++,8!=(15&(s.method=e.ft(e.nt++)))){s.mode=mt,e.Le="unknown compression method",s.marker=5;break}if(8+(s.method>>4)>s.zt){s.mode=mt,e.Le="invalid win size",s.marker=5;break}s.mode=1;case 1:if(0===e.We)return n;if(n=t,e.We--,e.qe++,r=255&e.ft(e.nt++),((s.method<<8)+r)%31!=0){s.mode=mt,e.Le="incorrect header check",s.marker=5;break}if(0==(32&r)){s.mode=7;break}s.mode=2;case 2:if(0===e.We)return n;n=t,e.We--,e.qe++,s.St=(255&e.ft(e.nt++))<<24&4278190080,s.mode=3;case 3:if(0===e.We)return n;n=t,e.We--,e.qe++,s.St+=(255&e.ft(e.nt++))<<16&16711680,s.mode=4;case 4:if(0===e.We)return n;n=t,e.We--,e.qe++,s.St+=(255&e.ft(e.nt++))<<8&65280,s.mode=5;case 5:return 0===e.We?n:(n=t,e.We--,e.qe++,s.St+=255&e.ft(e.nt++),s.mode=6,2);case 6:return s.mode=mt,e.Le="need dictionary",s.marker=0,rt;case 7:if(n=s.kt.ut(e,n),n==st){s.mode=mt,s.marker=0;break}if(0==n&&(n=t),1!=n)return n;n=t,s.kt.reset(e,s.vt),s.mode=12;case 12:return e.We=0,1;case mt:return st;default:return rt}},e._t=(e,t,n)=>{let r=0,s=n;if(!e||!e.gt||6!=e.gt.mode)return rt;const i=e.gt;return s<1<{let n,r,s,i,o;if(!e||!e.gt)return rt;const c=e.gt;if(c.mode!=mt&&(c.mode=mt,c.marker=0),0===(n=e.We))return it;for(r=e.nt,s=c.marker;0!==n&&4>s;)e.ft(r)==bt[s]?s++:s=0!==e.ft(r)?0:4-s,r++,n--;return e.qe+=r-e.nt,e.nt=r,e.We=n,c.marker=s,4!=s?st:(i=e.qe,o=e.Ge,t(e),e.qe=i,e.Ge=o,c.mode=7,0)},e.Pt=e=>e&&e.gt&&e.gt.kt?e.gt.kt.bt():rt}function kt(){}function vt(e){const t=new kt,n=e&&e.chunkSize?r.floor(2*e.chunkSize):131072,o=new i(n);let c=!1;t.xt(),t.$e=o,this.append=(e,r)=>{const f=[];let a,l,u=0,w=0,h=0;if(0!==e.length){t.nt=0,t.et=e,t.We=e.length;do{if(t.rt=0,t.tt=n,0!==t.We||c||(t.nt=0,c=!0),a=t.At(0),c&&a===it){if(0!==t.We)throw new s("inflating: bad input")}else if(0!==a&&1!==a)throw new s("inflating: "+t.Le);if((c||1===a)&&t.We===e.length)throw new s("inflating: bad input");t.rt&&(t.rt===n?f.push(new i(o)):f.push(o.subarray(0,t.rt))),h+=t.rt,r&&t.nt>0&&t.nt!=u&&(r(t.nt),u=t.nt)}while(t.We>0||0===t.tt);return f.length>1?(l=new i(h),f.forEach((e=>{l.set(e,w),w+=e.length}))):l=f[0]?new i(f[0]):new i,l}},this.flush=()=>{t.Ct()}}kt.prototype={xt(e){const t=this;return t.gt=new gt,e||(e=15),t.gt.xt(t,e)},At(e){const t=this;return t.gt?t.gt.At(t,e):rt},Ct(){const e=this;if(!e.gt)return rt;const t=e.gt.Ct(e);return e.gt=null,t},It(){const e=this;return e.gt?e.gt.It(e):rt},_t(e,t){const n=this;return n.gt?n.gt._t(n,e,t):rt},ft(e){return this.et[e]},je(e,t){return this.et.subarray(e,e+t)}},self.initCodec=()=>{self.Deflate=nt,self.Inflate=vt};\n'],{type:"text/javascript"}));e({workerScripts:{inflate:[t],deflate:[t]}})})($),e.BlobReader=Nt,e.BlobWriter=Ot,e.Data64URIReader=Ut,e.Data64URIWriter=It,e.ERR_BAD_FORMAT=En,e.ERR_CENTRAL_DIRECTORY_NOT_FOUND=In,e.ERR_DUPLICATED_NAME=ar,e.ERR_ENCRYPTED=Pn,e.ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND=Un,e.ERR_EOCDR_NOT_FOUND=Tn,e.ERR_EOCDR_ZIP64_NOT_FOUND=Ln,e.ERR_EXTRAFIELD_ZIP64_NOT_FOUND=On,e.ERR_HTTP_RANGE=Dt,e.ERR_INVALID_COMMENT=or,e.ERR_INVALID_ENCRYPTION_STRENGTH=dr,e.ERR_INVALID_ENTRY_COMMENT=cr,e.ERR_INVALID_ENTRY_NAME=lr,e.ERR_INVALID_EXTRAFIELD_DATA=wr,e.ERR_INVALID_EXTRAFIELD_TYPE=fr,e.ERR_INVALID_PASSWORD=fe,e.ERR_INVALID_SIGNATURE=we,e.ERR_INVALID_VERSION=ur,e.ERR_ITERATOR_COMPLETED_TOO_SOON=Ct,e.ERR_LOCAL_FILE_HEADER_NOT_FOUND=Nn,e.ERR_SPLIT_ZIP_FILE=Bn,e.ERR_UNSUPPORTED_COMPRESSION=Hn,e.ERR_UNSUPPORTED_ENCRYPTION=qn,e.ERR_UNSUPPORTED_FORMAT=hr,e.HttpRangeReader=class extends en{constructor(e,t={}){t.useRangeHeader=!0,super(e,t)}},e.HttpReader=en,e.Reader=Tt,e.SplitDataReader=rn,e.SplitDataWriter=sn,e.SplitZipReader=un,e.SplitZipWriter=dn,e.TextReader=Pt,e.TextWriter=qt,e.Uint8ArrayReader=tn,e.Uint8ArrayWriter=nn,e.Writer=Lt,e.ZipReader=Gn,e.ZipReaderStream=class{constructor(e={}){const{readable:t,writable:n}=new v,r=new Gn(t,e).getEntriesGenerator();this.readable=new A({async pull(e){const{done:t,value:n}=await r.next();if(t)return e.close();const s={...n,readable:(()=>{const{readable:e,writable:t}=new v;if(n.getData)return n.getData(t),e})()};delete s.getData,e.enqueue(s)}}),this.writable=n}},e.ZipWriter=yr,e.ZipWriterStream=class{constructor(e={}){const{readable:t,writable:n}=new v;this.readable=t,this.zipWriter=new yr(n,e)}transform(e){const{readable:t,writable:n}=new v({flush:()=>{this.zipWriter.close()}});return this.zipWriter.add(e,t),{readable:this.readable,writable:n}}writable(e){const{readable:t,writable:n}=new v;return this.zipWriter.add(e,t),n}close(e,t={}){return this.zipWriter.close(e,t)}},e.configure=$,e.fs=Er,e.getMimeType=()=>"application/octet-stream",e.initReader=on,e.initShimAsyncCodec=(e,t={},n)=>({Deflate:te(e.Deflate,t.deflate,n),Inflate:te(e.Inflate,t.inflate,n)}),e.initStream=an,e.initWriter=cn,e.readUint8Array=ln,e.terminateWorkers=async()=>{await y.allSettled(St.map((e=>(vt(e),e.terminate()))))},n.defineProperty(e,"__esModule",{value:!0})})); diff --git a/demos/lib/zip-full.js b/demos/lib/zip-full.js index cd9e3dae..bb640b46 100644 --- a/demos/lib/zip-full.js +++ b/demos/lib/zip-full.js @@ -7002,35 +7002,43 @@ const { preventHeadRequest, useRangeHeader, - forceRangeRequests + forceRangeRequests, + combineSizeEocd } = options; options = Object.assign({}, options); delete options.preventHeadRequest; delete options.useRangeHeader; delete options.forceRangeRequests; + delete options.combineSizeEocd; delete options.useXHR; Object.assign(httpReader, { url, options, preventHeadRequest, useRangeHeader, - forceRangeRequests + forceRangeRequests, + combineSizeEocd }); } async function initHttpReader(httpReader, sendRequest, getRequestData) { const { url, + preventHeadRequest, useRangeHeader, - forceRangeRequests + forceRangeRequests, + combineSizeEocd } = httpReader; - if (isHttpFamily(url) && (useRangeHeader || forceRangeRequests)) { - const { headers } = await sendRequest(HTTP_METHOD_GET, httpReader, getRangeHeaders(httpReader)); - if (!forceRangeRequests && headers.get(HTTP_HEADER_ACCEPT_RANGES) != HTTP_RANGE_UNIT) { + if (isHttpFamily(url) && (useRangeHeader || forceRangeRequests) && (typeof preventHeadRequest == "undefined" || preventHeadRequest)) { + const response = await sendRequest(HTTP_METHOD_GET, httpReader, getRangeHeaders(httpReader, combineSizeEocd ? -END_OF_CENTRAL_DIR_LENGTH : undefined)); + if (!forceRangeRequests && response.headers.get(HTTP_HEADER_ACCEPT_RANGES) != HTTP_RANGE_UNIT) { throw new Error(ERR_HTTP_RANGE); } else { + if (combineSizeEocd) { + httpReader.eocdCache = new Uint8Array(await response.arrayBuffer()); + } let contentSize; - const contentRangeHeader = headers.get(HTTP_HEADER_CONTENT_RANGE); + const contentRangeHeader = response.headers.get(HTTP_HEADER_CONTENT_RANGE); if (contentRangeHeader) { const splitHeader = contentRangeHeader.trim().split(/\s*\/\s*/); if (splitHeader.length) { @@ -7055,9 +7063,14 @@ const { useRangeHeader, forceRangeRequests, + eocdCache, + size, options } = httpReader; if (useRangeHeader || forceRangeRequests) { + if (eocdCache && index == size - END_OF_CENTRAL_DIR_LENGTH && length == END_OF_CENTRAL_DIR_LENGTH) { + return eocdCache; + } const response = await sendRequest(HTTP_METHOD_GET, httpReader, getRangeHeaders(httpReader, index, length)); if (response.status != 206) { throw new Error(ERR_HTTP_RANGE); @@ -7073,7 +7086,7 @@ } function getRangeHeaders(httpReader, index = 0, length = 1) { - return Object.assign({}, getHeaders(httpReader), { [HTTP_HEADER_RANGE]: HTTP_RANGE_UNIT + "=" + index + "-" + (index + length - 1) }); + return Object.assign({}, getHeaders(httpReader), { [HTTP_HEADER_RANGE]: HTTP_RANGE_UNIT + "=" + (index < 0 ? index : index + "-" + (index + length - 1)) }); } function getHeaders({ options }) { @@ -7768,9 +7781,10 @@ commentUTF8, rawExtraField: directoryArray.subarray(extraFieldOffset, commentOffset) }); + const decode = getOptionValue$1(zipReader, options, "decodeText") || decodeText; const [filename, comment] = await Promise.all([ - decodeText(rawFilename, filenameUTF8 ? CHARSET_UTF8 : filenameEncoding || CHARSET_CP437), - decodeText(rawComment, commentUTF8 ? CHARSET_UTF8 : commentEncoding || CHARSET_CP437) + decode(rawFilename, filenameUTF8 ? CHARSET_UTF8 : filenameEncoding || CHARSET_CP437), + decode(rawComment, commentUTF8 ? CHARSET_UTF8 : commentEncoding || CHARSET_CP437) ]); Object.assign(fileEntry, { rawComment, @@ -8374,12 +8388,13 @@ } else { options.directory = name.endsWith(DIRECTORY_SIGNATURE); } - const rawFilename = encodeText(name); + const encode = getOptionValue(zipWriter, options, "encodeText", encodeText); + const rawFilename = encode(name); if (getLength(rawFilename) > MAX_16_BITS) { throw new Error(ERR_INVALID_ENTRY_NAME); } const comment = options.comment || ""; - const rawComment = encodeText(comment); + const rawComment = encode(comment); if (getLength(rawComment) > MAX_16_BITS) { throw new Error(ERR_INVALID_ENTRY_COMMENT); } @@ -8482,7 +8497,7 @@ zip64DiskNumberStart, password, rawPassword, - level, + level: !useCompressionStream && zipWriter.config.CompressionStream === UNDEFINED_VALUE ? 0 : level, useWebWorkers, encryptionStrength, extendedTimestamp, diff --git a/demos/lib/zip-full.min.js b/demos/lib/zip-full.min.js index 81a05174..cce5557d 100644 --- a/demos/lib/zip-full.min.js +++ b/demos/lib/zip-full.min.js @@ -1 +1 @@ -((e,t)=>{"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).zip={})})(this,(function(e){"use strict";const{Array:t,Object:n,String:r,Number:i,BigInt:s,Math:a,Date:o,Map:l,Set:c,Response:u,URL:f,Error:d,Uint8Array:w,Uint16Array:h,Uint32Array:p,DataView:_,Blob:g,Promise:m,TextEncoder:b,TextDecoder:y,document:x,crypto:k,btoa:S,TransformStream:v,ReadableStream:z,WritableStream:A,CompressionStream:C,DecompressionStream:D,navigator:W,Worker:E}="undefined"!=typeof globalThis?globalThis:this||self,R=-2;function F(e){return T(e.map((([e,n])=>new t(e).fill(n,0,e))))}function T(e){return e.reduce(((e,n)=>e.concat(t.isArray(n)?T(n):n)),[])}const L=[0,1,2,3].concat(...F([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function I(){const e=this;function t(e,t){let n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1}e.build_tree=n=>{const r=e.dyn_tree,i=e.stat_desc.static_tree,s=e.stat_desc.elems;let o,l,c,u=-1;for(n.heap_len=0,n.heap_max=573,o=0;s>o;o++)0!==r[2*o]?(n.heap[++n.heap_len]=u=o,n.depth[o]=0):r[2*o+1]=0;for(;2>n.heap_len;)c=n.heap[++n.heap_len]=2>u?++u:0,r[2*c]=1,n.depth[c]=0,n.opt_len--,i&&(n.static_len-=i[2*c+1]);for(e.max_code=u,o=a.floor(n.heap_len/2);o>=1;o--)n.pqdownheap(r,o);c=s;do{o=n.heap[1],n.heap[1]=n.heap[n.heap_len--],n.pqdownheap(r,1),l=n.heap[1],n.heap[--n.heap_max]=o,n.heap[--n.heap_max]=l,r[2*c]=r[2*o]+r[2*l],n.depth[c]=a.max(n.depth[o],n.depth[l])+1,r[2*o+1]=r[2*l+1]=c,n.heap[1]=c++,n.pqdownheap(r,1)}while(n.heap_len>=2);n.heap[--n.heap_max]=n.heap[1],(t=>{const n=e.dyn_tree,r=e.stat_desc.static_tree,i=e.stat_desc.extra_bits,s=e.stat_desc.extra_base,a=e.stat_desc.max_length;let o,l,c,u,f,d,w=0;for(u=0;15>=u;u++)t.bl_count[u]=0;for(n[2*t.heap[t.heap_max]+1]=0,o=t.heap_max+1;573>o;o++)l=t.heap[o],u=n[2*n[2*l+1]+1]+1,u>a&&(u=a,w++),n[2*l+1]=u,l>e.max_code||(t.bl_count[u]++,f=0,s>l||(f=i[l-s]),d=n[2*l],t.opt_len+=d*(u+f),r&&(t.static_len+=d*(r[2*l+1]+f)));if(0!==w){do{for(u=a-1;0===t.bl_count[u];)u--;t.bl_count[u]--,t.bl_count[u+1]+=2,t.bl_count[a]--,w-=2}while(w>0);for(u=a;0!==u;u--)for(l=t.bl_count[u];0!==l;)c=t.heap[--o],c>e.max_code||(n[2*c+1]!=u&&(t.opt_len+=(u-n[2*c+1])*n[2*c],n[2*c+1]=u),l--)}})(n),((e,n,r)=>{const i=[];let s,a,o,l=0;for(s=1;15>=s;s++)i[s]=l=l+r[s-1]<<1;for(a=0;n>=a;a++)o=e[2*a+1],0!==o&&(e[2*a]=t(i[o]++,o))})(r,e.max_code,n.bl_count)}}function U(e,t,n,r,i){const s=this;s.static_tree=e,s.extra_bits=t,s.extra_base=n,s.elems=r,s.max_length=i}I._length_code=[0,1,2,3,4,5,6,7].concat(...F([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]])),I.base_length=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0],I.base_dist=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576],I.d_code=e=>256>e?L[e]:L[256+(e>>>7)],I.extra_lbits=[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],I.extra_dbits=[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],I.extra_blbits=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],I.bl_order=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];const q=F([[144,8],[112,9],[24,7],[8,8]]);U.static_ltree=T([12,140,76,204,44,172,108,236,28,156,92,220,60,188,124,252,2,130,66,194,34,162,98,226,18,146,82,210,50,178,114,242,10,138,74,202,42,170,106,234,26,154,90,218,58,186,122,250,6,134,70,198,38,166,102,230,22,150,86,214,54,182,118,246,14,142,78,206,46,174,110,238,30,158,94,222,62,190,126,254,1,129,65,193,33,161,97,225,17,145,81,209,49,177,113,241,9,137,73,201,41,169,105,233,25,153,89,217,57,185,121,249,5,133,69,197,37,165,101,229,21,149,85,213,53,181,117,245,13,141,77,205,45,173,109,237,29,157,93,221,61,189,125,253,19,275,147,403,83,339,211,467,51,307,179,435,115,371,243,499,11,267,139,395,75,331,203,459,43,299,171,427,107,363,235,491,27,283,155,411,91,347,219,475,59,315,187,443,123,379,251,507,7,263,135,391,71,327,199,455,39,295,167,423,103,359,231,487,23,279,151,407,87,343,215,471,55,311,183,439,119,375,247,503,15,271,143,399,79,335,207,463,47,303,175,431,111,367,239,495,31,287,159,415,95,351,223,479,63,319,191,447,127,383,255,511,0,64,32,96,16,80,48,112,8,72,40,104,24,88,56,120,4,68,36,100,20,84,52,116,3,131,67,195,35,163,99,227].map(((e,t)=>[e,q[t]])));const N=F([[30,5]]);function O(e,t,n,r,i){const s=this;s.good_length=e,s.max_lazy=t,s.nice_length=n,s.max_chain=r,s.func=i}U.static_dtree=T([0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30,1,17,9,25,5,21,13,29,3,19,11,27,7,23].map(((e,t)=>[e,N[t]]))),U.static_l_desc=new U(U.static_ltree,I.extra_lbits,257,286,15),U.static_d_desc=new U(U.static_dtree,I.extra_dbits,0,30,15),U.static_bl_desc=new U(null,I.extra_blbits,0,19,7);const P=[new O(0,0,0,0,0),new O(4,4,8,4,1),new O(4,5,16,8,1),new O(4,6,32,32,1),new O(4,4,16,16,2),new O(8,16,32,32,2),new O(8,16,128,128,2),new O(8,32,128,256,2),new O(32,128,258,1024,2),new O(32,258,258,4096,2)],H=["need dictionary","stream end","","","stream error","data error","","buffer error","",""],M=113,B=666,V=262;function Z(e,t,n,r){const i=e[2*t],s=e[2*n];return s>i||i==s&&r[t]<=r[n]}function K(){const e=this;let t,n,r,i,s,o,l,c,u,f,d,p,_,g,m,b,y,x,k,S,v,z,A,C,D,W,E,F,T,L,q,N,O;const K=new I,G=new I,X=new I;let Y,j,J,Q,$,ee;function te(){let t;for(t=0;286>t;t++)q[2*t]=0;for(t=0;30>t;t++)N[2*t]=0;for(t=0;19>t;t++)O[2*t]=0;q[512]=1,e.opt_len=e.static_len=0,j=J=0}function ne(e,t){let n,r=-1,i=e[1],s=0,a=7,o=4;0===i&&(a=138,o=3),e[2*(t+1)+1]=65535;for(let l=0;t>=l;l++)n=i,i=e[2*(l+1)+1],++ss?O[2*n]+=s:0!==n?(n!=r&&O[2*n]++,O[32]++):s>10?O[36]++:O[34]++,s=0,r=n,0===i?(a=138,o=3):n==i?(a=6,o=3):(a=7,o=4))}function re(t){e.pending_buf[e.pending++]=t}function ie(e){re(255&e),re(e>>>8&255)}function se(e,t){let n;const r=t;ee>16-r?(n=e,$|=n<>>16-ee,ee+=r-16):($|=e<=n;n++)if(r=s,s=e[2*(n+1)+1],++a>=o||r!=s){if(l>a)do{ae(r,O)}while(0!=--a);else 0!==r?(r!=i&&(ae(r,O),a--),ae(16,O),se(a-3,2)):a>10?(ae(18,O),se(a-11,7)):(ae(17,O),se(a-3,3));a=0,i=r,0===s?(o=138,l=3):r==s?(o=6,l=3):(o=7,l=4)}}function le(){16==ee?(ie($),$=0,ee=0):8>ee||(re(255&$),$>>>=8,ee-=8)}function ce(t,n){let r,i,s;if(e.dist_buf[j]=t,e.lc_buf[j]=255&n,j++,0===t?q[2*n]++:(J++,t--,q[2*(I._length_code[n]+256+1)]++,N[2*I.d_code(t)]++),0==(8191&j)&&E>2){for(r=8*j,i=v-y,s=0;30>s;s++)r+=N[2*s]*(5+I.extra_dbits[s]);if(r>>>=3,Jo);ae(256,t),Q=t[513]}function fe(){ee>8?ie($):ee>0&&re(255&$),$=0,ee=0}function de(t,n,r){se(0+(r?1:0),3),((t,n)=>{fe(),Q=8,ie(n),ie(~n),e.pending_buf.set(c.subarray(t,t+n),e.pending),e.pending+=n})(t,n)}function we(n){((t,n,r)=>{let i,s,a=0;E>0?(K.build_tree(e),G.build_tree(e),a=(()=>{let t;for(ne(q,K.max_code),ne(N,G.max_code),X.build_tree(e),t=18;t>=3&&0===O[2*I.bl_order[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t})(),i=e.opt_len+3+7>>>3,s=e.static_len+3+7>>>3,s>i||(i=s)):i=s=n+5,n+4>i||-1==t?s==i?(se(2+(r?1:0),3),ue(U.static_ltree,U.static_dtree)):(se(4+(r?1:0),3),((e,t,n)=>{let r;for(se(e-257,5),se(t-1,5),se(n-4,4),r=0;n>r;r++)se(O[2*I.bl_order[r]+1],3);oe(q,e-1),oe(N,t-1)})(K.max_code+1,G.max_code+1,a+1),ue(q,N)):de(t,n,r),te(),r&&fe()})(0>y?-1:y,v-y,n),y=v,t.flush_pending()}function he(){let e,n,r,i;do{if(i=u-A-v,0===i&&0===v&&0===A)i=s;else if(-1==i)i--;else if(v>=s+s-V){c.set(c.subarray(s,s+s),0),z-=s,v-=s,y-=s,e=_,r=e;do{n=65535&d[--r],d[r]=s>n?0:n-s}while(0!=--e);e=s,r=e;do{n=65535&f[--r],f[r]=s>n?0:n-s}while(0!=--e);i+=s}if(0===t.avail_in)return;e=t.read_buf(c,v+A,i),A+=e,3>A||(p=255&c[v],p=(p<A&&0!==t.avail_in)}function pe(e){let t,n,r=D,i=v,a=C;const o=v>s-V?v-(s-V):0;let u=L;const d=l,w=v+258;let h=c[i+a-1],p=c[i+a];T>C||(r>>=2),u>A&&(u=A);do{if(t=e,c[t+a]==p&&c[t+a-1]==h&&c[t]==c[i]&&c[++t]==c[i+1]){i+=2,t++;do{}while(c[++i]==c[++t]&&c[++i]==c[++t]&&c[++i]==c[++t]&&c[++i]==c[++t]&&c[++i]==c[++t]&&c[++i]==c[++t]&&c[++i]==c[++t]&&c[++i]==c[++t]&&w>i);if(n=258-(w-i),i=w-258,n>a){if(z=e,a=n,n>=u)break;h=c[i+a-1],p=c[i+a]}}}while((e=65535&f[e&d])>o&&0!=--r);return a>A?A:a}e.depth=[],e.bl_count=[],e.heap=[],q=[],N=[],O=[],e.pqdownheap=(t,n)=>{const r=e.heap,i=r[n];let s=n<<1;for(;s<=e.heap_len&&(s(I||(I=8),H||(H=8),B||(B=0),t.msg=null,-1==k&&(k=6),1>H||H>9||8!=I||9>z||z>15||0>k||k>9||0>B||B>2?R:(t.dstate=e,o=z,s=1<(t.total_in=t.total_out=0,t.msg=null,e.pending=0,e.pending_out=0,n=M,i=0,K.dyn_tree=q,K.stat_desc=U.static_l_desc,G.dyn_tree=N,G.stat_desc=U.static_d_desc,X.dyn_tree=O,X.stat_desc=U.static_bl_desc,$=0,ee=0,Q=8,te(),(()=>{u=2*s,d[_-1]=0;for(let e=0;_-1>e;e++)d[e]=0;W=P[E].max_lazy,T=P[E].good_length,L=P[E].nice_length,D=P[E].max_chain,v=0,y=0,A=0,x=C=2,S=0,p=0})(),0))(t))),e.deflateEnd=()=>42!=n&&n!=M&&n!=B?R:(e.lc_buf=null,e.dist_buf=null,e.pending_buf=null,d=null,f=null,c=null,e.dstate=null,n==M?-3:0),e.deflateParams=(e,t,n)=>{let r=0;return-1==t&&(t=6),0>t||t>9||0>n||n>2?R:(P[E].func!=P[t].func&&0!==e.total_in&&(r=e.deflate(1)),E!=t&&(E=t,W=P[E].max_lazy,T=P[E].good_length,L=P[E].nice_length,D=P[E].max_chain),F=n,r)},e.deflateSetDictionary=(e,t,r)=>{let i,a=r,o=0;if(!t||42!=n)return R;if(3>a)return 0;for(a>s-V&&(a=s-V,o=r-a),c.set(t.subarray(o,o+a),0),v=a,y=a,p=255&c[0],p=(p<=i;i++)p=(p<{let w,h,g,D,T;if(u>4||0>u)return R;if(!a.next_out||!a.next_in&&0!==a.avail_in||n==B&&4!=u)return a.msg=H[4],R;if(0===a.avail_out)return a.msg=H[7],-5;var L;if(t=a,D=i,i=u,42==n&&(h=8+(o-8<<4)<<8,g=(E-1&255)>>1,g>3&&(g=3),h|=g<<6,0!==v&&(h|=32),h+=31-h%31,n=M,re((L=h)>>8&255),re(255&L)),0!==e.pending){if(t.flush_pending(),0===t.avail_out)return i=-1,0}else if(0===t.avail_in&&D>=u&&4!=u)return t.msg=H[7],-5;if(n==B&&0!==t.avail_in)return a.msg=H[7],-5;if(0!==t.avail_in||0!==A||0!=u&&n!=B){switch(T=-1,P[E].func){case 0:T=(e=>{let n,i=65535;for(i>r-5&&(i=r-5);;){if(1>=A){if(he(),0===A&&0==e)return 0;if(0===A)break}if(v+=A,A=0,n=y+i,(0===v||v>=n)&&(A=v-n,v=n,we(!1),0===t.avail_out))return 0;if(v-y>=s-V&&(we(!1),0===t.avail_out))return 0}return we(4==e),0===t.avail_out?4==e?2:0:4==e?3:1})(u);break;case 1:T=(e=>{let n,r=0;for(;;){if(V>A){if(he(),V>A&&0==e)return 0;if(0===A)break}if(3>A||(p=(p<s-V||2!=F&&(x=pe(r)),3>x)n=ce(0,255&c[v]),A--,v++;else if(n=ce(v-z,x-3),A-=x,x>W||3>A)v+=x,x=0,p=255&c[v],p=(p<{let n,r,i=0;for(;;){if(V>A){if(he(),V>A&&0==e)return 0;if(0===A)break}if(3>A||(p=(p<C&&s-V>=(v-i&65535)&&(2!=F&&(x=pe(i)),5>=x&&(1==F||3==x&&v-z>4096)&&(x=2)),3>C||x>C)if(0!==S){if(n=ce(0,255&c[v-1]),n&&we(!1),v++,A--,0===t.avail_out)return 0}else S=1,v++,A--;else{r=v+A-3,n=ce(v-1-k,C-3),A-=C-1,C-=2;do{++v>r||(p=(p<1+Q+10-ee&&(se(2,3),ae(256,U.static_ltree),le()),Q=7;else if(de(0,0,!1),3==u)for(w=0;_>w;w++)d[w]=0;if(t.flush_pending(),0===t.avail_out)return i=-1,0}}return 4!=u?0:1}}function G(){const e=this;e.next_in_index=0,e.next_out_index=0,e.avail_in=0,e.total_in=0,e.avail_out=0,e.total_out=0}G.prototype={deflateInit(e,t){const n=this;return n.dstate=new K,t||(t=15),n.dstate.deflateInit(n,e,t)},deflate(e){const t=this;return t.dstate?t.dstate.deflate(t,e):R},deflateEnd(){const e=this;if(!e.dstate)return R;const t=e.dstate.deflateEnd();return e.dstate=null,t},deflateParams(e,t){const n=this;return n.dstate?n.dstate.deflateParams(n,e,t):R},deflateSetDictionary(e,t){const n=this;return n.dstate?n.dstate.deflateSetDictionary(n,e,t):R},read_buf(e,t,n){const r=this;let i=r.avail_in;return i>n&&(i=n),0===i?0:(r.avail_in-=i,e.set(r.next_in.subarray(r.next_in_index,r.next_in_index+i),t),r.next_in_index+=i,r.total_in+=i,i)},flush_pending(){const e=this;let t=e.dstate.pending;t>e.avail_out&&(t=e.avail_out),0!==t&&(e.next_out.set(e.dstate.pending_buf.subarray(e.dstate.pending_out,e.dstate.pending_out+t),e.next_out_index),e.next_out_index+=t,e.dstate.pending_out+=t,e.total_out+=t,e.avail_out-=t,e.dstate.pending-=t,0===e.dstate.pending&&(e.dstate.pending_out=0))}};const X=-2,Y=-3,j=-5,J=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],Q=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],$=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],ee=[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,0,0],te=[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,112,112],ne=[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],re=[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];function ie(){let e,t,n,r,i,s;function a(e,t,a,o,l,c,u,f,d,w,h){let p,_,g,m,b,y,x,k,S,v,z,A,C,D,W;v=0,b=a;do{n[e[t+v]]++,v++,b--}while(0!==b);if(n[0]==a)return u[0]=-1,f[0]=0,0;for(k=f[0],y=1;15>=y&&0===n[y];y++);for(x=y,y>k&&(k=y),b=15;0!==b&&0===n[b];b--);for(g=b,k>b&&(k=b),f[0]=k,D=1<y;y++,D<<=1)if(0>(D-=n[y]))return Y;if(0>(D-=n[b]))return Y;for(n[b]+=D,s[1]=y=0,v=1,C=2;0!=--b;)s[C]=y+=n[v],C++,v++;b=0,v=0;do{0!==(y=e[t+v])&&(h[s[y]++]=b),v++}while(++b=x;x++)for(p=n[x];0!=p--;){for(;x>A+k;){if(m++,A+=k,W=g-A,W=W>k?k:W,(_=1<<(y=x-A))>p+1&&(_-=p+1,C=x,W>y))for(;++yn[++C];)_-=n[C];if(W=1<1440)return Y;i[m]=z=w[0],w[0]+=W,0!==m?(s[m]=b,r[0]=y,r[1]=k,y=b>>>A-k,r[2]=z-i[m-1]-y,d.set(r,3*(i[m-1]+y))):u[0]=z}for(r[1]=x-A,a>v?h[v]h[v]?0:96,r[2]=h[v++]):(r[0]=c[h[v]-o]+16+64,r[2]=l[h[v++]-o]):r[0]=192,_=1<>>A;W>y;y+=_)d.set(r,3*(z+y));for(y=1<>>=1)b^=y;for(b^=y,S=(1<o;o++)t[o]=0;for(o=0;16>o;o++)n[o]=0;for(o=0;3>o;o++)r[o]=0;i.set(n.subarray(0,15),0),s.set(n.subarray(0,16),0)}this.inflate_trees_bits=(n,r,i,s,l)=>{let c;return o(19),e[0]=0,c=a(n,0,19,19,null,null,i,r,s,e,t),c==Y?l.msg="oversubscribed dynamic bit lengths tree":c!=j&&0!==r[0]||(l.msg="incomplete dynamic bit lengths tree",c=Y),c},this.inflate_trees_dynamic=(n,r,i,s,l,c,u,f,d)=>{let w;return o(288),e[0]=0,w=a(i,0,n,257,ee,te,c,s,f,e,t),0!=w||0===s[0]?(w==Y?d.msg="oversubscribed literal/length tree":-4!=w&&(d.msg="incomplete literal/length tree",w=Y),w):(o(288),w=a(i,n,r,0,ne,re,u,l,f,e,t),0!=w||0===l[0]&&n>257?(w==Y?d.msg="oversubscribed distance tree":w==j?(d.msg="incomplete distance tree",w=Y):-4!=w&&(d.msg="empty distance tree with lengths",w=Y),w):0)}}function se(){const e=this;let t,n,r,i,s=0,a=0,o=0,l=0,c=0,u=0,f=0,d=0,w=0,h=0;function p(e,t,n,r,i,s,a,o){let l,c,u,f,d,w,h,p,_,g,m,b,y,x,k,S;h=o.next_in_index,p=o.avail_in,d=a.bitb,w=a.bitk,_=a.write,g=_w;)p--,d|=(255&o.read_byte(h++))<>=c[S+1],w-=c[S+1],0!=(16&f)){for(f&=15,y=c[S+2]+(d&J[f]),d>>=f,w-=f;15>w;)p--,d|=(255&o.read_byte(h++))<>=c[S+1],w-=c[S+1],0!=(16&f)){for(f&=15;f>w;)p--,d|=(255&o.read_byte(h++))<>=f,w-=f,g-=y,x>_){k=_-x;do{k+=a.end}while(0>k);if(f=a.end-k,y>f){if(y-=f,_-k>0&&f>_-k)do{a.win[_++]=a.win[k++]}while(0!=--f);else a.win.set(a.win.subarray(k,k+f),_),_+=f,k+=f,f=0;k=0}}else k=_-x,_-k>0&&2>_-k?(a.win[_++]=a.win[k++],a.win[_++]=a.win[k++],y-=2):(a.win.set(a.win.subarray(k,k+2),_),_+=2,k+=2,y-=2);if(_-k>0&&y>_-k)do{a.win[_++]=a.win[k++]}while(0!=--y);else a.win.set(a.win.subarray(k,k+y),_),_+=y,k+=y,y=0;break}if(0!=(64&f))return o.msg="invalid distance code",y=o.avail_in-p,y=y>w>>3?w>>3:y,p+=y,h-=y,w-=y<<3,a.bitb=d,a.bitk=w,o.avail_in=p,o.total_in+=h-o.next_in_index,o.next_in_index=h,a.write=_,Y;l+=c[S+2],l+=d&J[f],S=3*(u+l),f=c[S]}break}if(0!=(64&f))return 0!=(32&f)?(y=o.avail_in-p,y=y>w>>3?w>>3:y,p+=y,h-=y,w-=y<<3,a.bitb=d,a.bitk=w,o.avail_in=p,o.total_in+=h-o.next_in_index,o.next_in_index=h,a.write=_,1):(o.msg="invalid literal/length code",y=o.avail_in-p,y=y>w>>3?w>>3:y,p+=y,h-=y,w-=y<<3,a.bitb=d,a.bitk=w,o.avail_in=p,o.total_in+=h-o.next_in_index,o.next_in_index=h,a.write=_,Y);if(l+=c[S+2],l+=d&J[f],S=3*(u+l),0===(f=c[S])){d>>=c[S+1],w-=c[S+1],a.win[_++]=c[S+2],g--;break}}else d>>=c[S+1],w-=c[S+1],a.win[_++]=c[S+2],g--}while(g>=258&&p>=10);return y=o.avail_in-p,y=y>w>>3?w>>3:y,p+=y,h-=y,w-=y<<3,a.bitb=d,a.bitk=w,o.avail_in=p,o.total_in+=h-o.next_in_index,o.next_in_index=h,a.write=_,0}e.init=(e,s,a,o,l,c)=>{t=0,f=e,d=s,r=a,w=o,i=l,h=c,n=null},e.proc=(e,_,g)=>{let m,b,y,x,k,S,v,z=0,A=0,C=0;for(C=_.next_in_index,x=_.avail_in,z=e.bitb,A=e.bitk,k=e.write,S=k=258&&x>=10&&(e.bitb=z,e.bitk=A,_.avail_in=x,_.total_in+=C-_.next_in_index,_.next_in_index=C,e.write=k,g=p(f,d,r,w,i,h,e,_),C=_.next_in_index,x=_.avail_in,z=e.bitb,A=e.bitk,k=e.write,S=kA;){if(0===x)return e.bitb=z,e.bitk=A,_.avail_in=x,_.total_in+=C-_.next_in_index,_.next_in_index=C,e.write=k,e.inflate_flush(_,g);g=0,x--,z|=(255&_.read_byte(C++))<>>=n[b+1],A-=n[b+1],y=n[b],0===y){l=n[b+2],t=6;break}if(0!=(16&y)){c=15&y,s=n[b+2],t=2;break}if(0==(64&y)){o=y,a=b/3+n[b+2];break}if(0!=(32&y)){t=7;break}return t=9,_.msg="invalid literal/length code",g=Y,e.bitb=z,e.bitk=A,_.avail_in=x,_.total_in+=C-_.next_in_index,_.next_in_index=C,e.write=k,e.inflate_flush(_,g);case 2:for(m=c;m>A;){if(0===x)return e.bitb=z,e.bitk=A,_.avail_in=x,_.total_in+=C-_.next_in_index,_.next_in_index=C,e.write=k,e.inflate_flush(_,g);g=0,x--,z|=(255&_.read_byte(C++))<>=m,A-=m,o=d,n=i,a=h,t=3;case 3:for(m=o;m>A;){if(0===x)return e.bitb=z,e.bitk=A,_.avail_in=x,_.total_in+=C-_.next_in_index,_.next_in_index=C,e.write=k,e.inflate_flush(_,g);g=0,x--,z|=(255&_.read_byte(C++))<>=n[b+1],A-=n[b+1],y=n[b],0!=(16&y)){c=15&y,u=n[b+2],t=4;break}if(0==(64&y)){o=y,a=b/3+n[b+2];break}return t=9,_.msg="invalid distance code",g=Y,e.bitb=z,e.bitk=A,_.avail_in=x,_.total_in+=C-_.next_in_index,_.next_in_index=C,e.write=k,e.inflate_flush(_,g);case 4:for(m=c;m>A;){if(0===x)return e.bitb=z,e.bitk=A,_.avail_in=x,_.total_in+=C-_.next_in_index,_.next_in_index=C,e.write=k,e.inflate_flush(_,g);g=0,x--,z|=(255&_.read_byte(C++))<>=m,A-=m,t=5;case 5:for(v=k-u;0>v;)v+=e.end;for(;0!==s;){if(0===S&&(k==e.end&&0!==e.read&&(k=0,S=k7&&(A-=8,x++,C--),e.write=k,g=e.inflate_flush(_,g),k=e.write,S=k{}}ie.inflate_trees_fixed=(e,t,n,r)=>(e[0]=9,t[0]=5,n[0]=Q,r[0]=$,0);const ae=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function oe(e,t){const n=this;let r,i=0,s=0,a=0,o=0;const l=[0],c=[0],u=new se;let f=0,d=new Int32Array(4320);const h=new ie;n.bitk=0,n.bitb=0,n.win=new w(t),n.end=t,n.read=0,n.write=0,n.reset=(e,t)=>{t&&(t[0]=0),6==i&&u.free(e),i=0,n.bitk=0,n.bitb=0,n.read=n.write=0},n.reset(e,null),n.inflate_flush=(e,t)=>{let r,i,s;return i=e.next_out_index,s=n.read,r=(s>n.write?n.end:n.write)-s,r>e.avail_out&&(r=e.avail_out),0!==r&&t==j&&(t=0),e.avail_out-=r,e.total_out+=r,e.next_out.set(n.win.subarray(s,s+r),i),i+=r,s+=r,s==n.end&&(s=0,n.write==n.end&&(n.write=0),r=n.write-s,r>e.avail_out&&(r=e.avail_out),0!==r&&t==j&&(t=0),e.avail_out-=r,e.total_out+=r,e.next_out.set(n.win.subarray(s,s+r),i),i+=r,s+=r),e.next_out_index=i,n.read=s,t},n.proc=(e,t)=>{let w,p,_,g,m,b,y,x;for(g=e.next_in_index,m=e.avail_in,p=n.bitb,_=n.bitk,b=n.write,y=b_;){if(0===m)return n.bitb=p,n.bitk=_,e.avail_in=m,e.total_in+=g-e.next_in_index,e.next_in_index=g,n.write=b,n.inflate_flush(e,t);t=0,m--,p|=(255&e.read_byte(g++))<<_,_+=8}switch(w=7&p,f=1&w,w>>>1){case 0:p>>>=3,_-=3,w=7&_,p>>>=w,_-=w,i=1;break;case 1:k=[],S=[],v=[[]],z=[[]],ie.inflate_trees_fixed(k,S,v,z),u.init(k[0],S[0],v[0],0,z[0],0),p>>>=3,_-=3,i=6;break;case 2:p>>>=3,_-=3,i=3;break;case 3:return p>>>=3,_-=3,i=9,e.msg="invalid block type",t=Y,n.bitb=p,n.bitk=_,e.avail_in=m,e.total_in+=g-e.next_in_index,e.next_in_index=g,n.write=b,n.inflate_flush(e,t)}break;case 1:for(;32>_;){if(0===m)return n.bitb=p,n.bitk=_,e.avail_in=m,e.total_in+=g-e.next_in_index,e.next_in_index=g,n.write=b,n.inflate_flush(e,t);t=0,m--,p|=(255&e.read_byte(g++))<<_,_+=8}if((~p>>>16&65535)!=(65535&p))return i=9,e.msg="invalid stored block lengths",t=Y,n.bitb=p,n.bitk=_,e.avail_in=m,e.total_in+=g-e.next_in_index,e.next_in_index=g,n.write=b,n.inflate_flush(e,t);s=65535&p,p=_=0,i=0!==s?2:0!==f?7:0;break;case 2:if(0===m)return n.bitb=p,n.bitk=_,e.avail_in=m,e.total_in+=g-e.next_in_index,e.next_in_index=g,n.write=b,n.inflate_flush(e,t);if(0===y&&(b==n.end&&0!==n.read&&(b=0,y=bm&&(w=m),w>y&&(w=y),n.win.set(e.read_buf(g,w),b),g+=w,m-=w,b+=w,y-=w,0!=(s-=w))break;i=0!==f?7:0;break;case 3:for(;14>_;){if(0===m)return n.bitb=p,n.bitk=_,e.avail_in=m,e.total_in+=g-e.next_in_index,e.next_in_index=g,n.write=b,n.inflate_flush(e,t);t=0,m--,p|=(255&e.read_byte(g++))<<_,_+=8}if(a=w=16383&p,(31&w)>29||(w>>5&31)>29)return i=9,e.msg="too many length or distance symbols",t=Y,n.bitb=p,n.bitk=_,e.avail_in=m,e.total_in+=g-e.next_in_index,e.next_in_index=g,n.write=b,n.inflate_flush(e,t);if(w=258+(31&w)+(w>>5&31),!r||r.lengthx;x++)r[x]=0;p>>>=14,_-=14,o=0,i=4;case 4:for(;4+(a>>>10)>o;){for(;3>_;){if(0===m)return n.bitb=p,n.bitk=_,e.avail_in=m,e.total_in+=g-e.next_in_index,e.next_in_index=g,n.write=b,n.inflate_flush(e,t);t=0,m--,p|=(255&e.read_byte(g++))<<_,_+=8}r[ae[o++]]=7&p,p>>>=3,_-=3}for(;19>o;)r[ae[o++]]=0;if(l[0]=7,w=h.inflate_trees_bits(r,l,c,d,e),0!=w)return(t=w)==Y&&(r=null,i=9),n.bitb=p,n.bitk=_,e.avail_in=m,e.total_in+=g-e.next_in_index,e.next_in_index=g,n.write=b,n.inflate_flush(e,t);o=0,i=5;case 5:for(;w=a,258+(31&w)+(w>>5&31)>o;){let s,u;for(w=l[0];w>_;){if(0===m)return n.bitb=p,n.bitk=_,e.avail_in=m,e.total_in+=g-e.next_in_index,e.next_in_index=g,n.write=b,n.inflate_flush(e,t);t=0,m--,p|=(255&e.read_byte(g++))<<_,_+=8}if(w=d[3*(c[0]+(p&J[w]))+1],u=d[3*(c[0]+(p&J[w]))+2],16>u)p>>>=w,_-=w,r[o++]=u;else{for(x=18==u?7:u-14,s=18==u?11:3;w+x>_;){if(0===m)return n.bitb=p,n.bitk=_,e.avail_in=m,e.total_in+=g-e.next_in_index,e.next_in_index=g,n.write=b,n.inflate_flush(e,t);t=0,m--,p|=(255&e.read_byte(g++))<<_,_+=8}if(p>>>=w,_-=w,s+=p&J[x],p>>>=x,_-=x,x=o,w=a,x+s>258+(31&w)+(w>>5&31)||16==u&&1>x)return r=null,i=9,e.msg="invalid bit length repeat",t=Y,n.bitb=p,n.bitk=_,e.avail_in=m,e.total_in+=g-e.next_in_index,e.next_in_index=g,n.write=b,n.inflate_flush(e,t);u=16==u?r[x-1]:0;do{r[x++]=u}while(0!=--s);o=x}}if(c[0]=-1,A=[],C=[],D=[],W=[],A[0]=9,C[0]=6,w=a,w=h.inflate_trees_dynamic(257+(31&w),1+(w>>5&31),r,A,C,D,W,d,e),0!=w)return w==Y&&(r=null,i=9),t=w,n.bitb=p,n.bitk=_,e.avail_in=m,e.total_in+=g-e.next_in_index,e.next_in_index=g,n.write=b,n.inflate_flush(e,t);u.init(A[0],C[0],d,D[0],d,W[0]),i=6;case 6:if(n.bitb=p,n.bitk=_,e.avail_in=m,e.total_in+=g-e.next_in_index,e.next_in_index=g,n.write=b,1!=(t=u.proc(n,e,t)))return n.inflate_flush(e,t);if(t=0,u.free(e),g=e.next_in_index,m=e.avail_in,p=n.bitb,_=n.bitk,b=n.write,y=b{n.reset(e,null),n.win=null,d=null},n.set_dictionary=(e,t,r)=>{n.win.set(e.subarray(t,t+r),0),n.read=n.write=r},n.sync_point=()=>1==i?1:0}const le=13,ce=[0,0,255,255];function ue(){const e=this;function t(e){return e&&e.istate?(e.total_in=e.total_out=0,e.msg=null,e.istate.mode=7,e.istate.blocks.reset(e,null),0):X}e.mode=0,e.method=0,e.was=[0],e.need=0,e.marker=0,e.wbits=0,e.inflateEnd=t=>(e.blocks&&e.blocks.free(t),e.blocks=null,0),e.inflateInit=(n,r)=>(n.msg=null,e.blocks=null,8>r||r>15?(e.inflateEnd(n),X):(e.wbits=r,n.istate.blocks=new oe(n,1<{let n,r;if(!e||!e.istate||!e.next_in)return X;const i=e.istate;for(t=4==t?j:0,n=j;;)switch(i.mode){case 0:if(0===e.avail_in)return n;if(n=t,e.avail_in--,e.total_in++,8!=(15&(i.method=e.read_byte(e.next_in_index++)))){i.mode=le,e.msg="unknown compression method",i.marker=5;break}if(8+(i.method>>4)>i.wbits){i.mode=le,e.msg="invalid win size",i.marker=5;break}i.mode=1;case 1:if(0===e.avail_in)return n;if(n=t,e.avail_in--,e.total_in++,r=255&e.read_byte(e.next_in_index++),((i.method<<8)+r)%31!=0){i.mode=le,e.msg="incorrect header check",i.marker=5;break}if(0==(32&r)){i.mode=7;break}i.mode=2;case 2:if(0===e.avail_in)return n;n=t,e.avail_in--,e.total_in++,i.need=(255&e.read_byte(e.next_in_index++))<<24&4278190080,i.mode=3;case 3:if(0===e.avail_in)return n;n=t,e.avail_in--,e.total_in++,i.need+=(255&e.read_byte(e.next_in_index++))<<16&16711680,i.mode=4;case 4:if(0===e.avail_in)return n;n=t,e.avail_in--,e.total_in++,i.need+=(255&e.read_byte(e.next_in_index++))<<8&65280,i.mode=5;case 5:return 0===e.avail_in?n:(n=t,e.avail_in--,e.total_in++,i.need+=255&e.read_byte(e.next_in_index++),i.mode=6,2);case 6:return i.mode=le,e.msg="need dictionary",i.marker=0,X;case 7:if(n=i.blocks.proc(e,n),n==Y){i.mode=le,i.marker=0;break}if(0==n&&(n=t),1!=n)return n;n=t,i.blocks.reset(e,i.was),i.mode=12;case 12:return e.avail_in=0,1;case le:return Y;default:return X}},e.inflateSetDictionary=(e,t,n)=>{let r=0,i=n;if(!e||!e.istate||6!=e.istate.mode)return X;const s=e.istate;return i<1<{let n,r,i,s,a;if(!e||!e.istate)return X;const o=e.istate;if(o.mode!=le&&(o.mode=le,o.marker=0),0===(n=e.avail_in))return j;for(r=e.next_in_index,i=o.marker;0!==n&&4>i;)e.read_byte(r)==ce[i]?i++:i=0!==e.read_byte(r)?0:4-i,r++,n--;return e.total_in+=r-e.next_in_index,e.next_in_index=r,e.avail_in=n,o.marker=i,4!=i?Y:(s=e.total_in,a=e.total_out,t(e),e.total_in=s,e.total_out=a,o.mode=7,0)},e.inflateSyncPoint=e=>e&&e.istate&&e.istate.blocks?e.istate.blocks.sync_point():X}function fe(){}fe.prototype={inflateInit(e){const t=this;return t.istate=new ue,e||(e=15),t.istate.inflateInit(t,e)},inflate(e){const t=this;return t.istate?t.istate.inflate(t,e):X},inflateEnd(){const e=this;if(!e.istate)return X;const t=e.istate.inflateEnd(e);return e.istate=null,t},inflateSync(){const e=this;return e.istate?e.istate.inflateSync(e):X},inflateSetDictionary(e,t){const n=this;return n.istate?n.istate.inflateSetDictionary(n,e,t):X},read_byte(e){return this.next_in[e]},read_buf(e,t){return this.next_in.subarray(e,e+t)}};const de=4294967295,we=65535,he=67324752,pe=134695760,_e=33639248,ge=101075792,me=117853008,be=22,ye=21589,xe=2048,ke="/",Se=new o(2107,11,31),ve=new o(1980,0,1),ze=void 0,Ae="undefined",Ce="function";class De{constructor(e){return class extends v{constructor(t,n){const r=new e(n);super({transform(e,t){t.enqueue(r.append(e))},flush(e){const t=r.flush();t&&e.enqueue(t)}})}}}}let We=2;try{typeof W!=Ae&&W.hardwareConcurrency&&(We=W.hardwareConcurrency)}catch(e){}const Ee={chunkSize:524288,maxWorkers:We,terminateWorkerTimeout:5e3,useWebWorkers:!0,useCompressionStream:!0,workerScripts:ze,CompressionStreamNative:typeof C!=Ae&&C,DecompressionStreamNative:typeof D!=Ae&&D},Re=n.assign({},Ee);function Fe(){return Re}function Te(e){return a.max(e.chunkSize,64)}function Le(e){const{baseURL:n,chunkSize:r,maxWorkers:i,terminateWorkerTimeout:s,useCompressionStream:a,useWebWorkers:o,Deflate:l,Inflate:c,CompressionStream:u,DecompressionStream:f,workerScripts:w}=e;if(Ie("baseURL",n),Ie("chunkSize",r),Ie("maxWorkers",i),Ie("terminateWorkerTimeout",s),Ie("useCompressionStream",a),Ie("useWebWorkers",o),l&&(Re.CompressionStream=new De(l)),c&&(Re.DecompressionStream=new De(c)),Ie("CompressionStream",u),Ie("DecompressionStream",f),w!==ze){const{deflate:e,inflate:n}=w;if((e||n)&&(Re.workerScripts||(Re.workerScripts={})),e){if(!t.isArray(e))throw new d("workerScripts.deflate must be an array");Re.workerScripts.deflate=e}if(n){if(!t.isArray(n))throw new d("workerScripts.inflate must be an array");Re.workerScripts.inflate=n}}}function Ie(e,t){t!==ze&&(Re[e]=t)}function Ue(e,t,r){return class{constructor(i){const s=this;var a,o;a=i,o="level",(typeof n.hasOwn===Ce?n.hasOwn(a,o):a.hasOwnProperty(o))&&i.level===ze&&delete i.level,s.codec=new e(n.assign({},t,i)),r(s.codec,(e=>{if(s.pendingData){const t=s.pendingData;s.pendingData=new w(t.length+e.length);const{pendingData:n}=s;n.set(t,0),n.set(e,t.length)}else s.pendingData=new w(e)}))}append(e){return this.codec.push(e),i(this)}flush(){return this.codec.push(new w,!0),i(this)}};function i(e){if(e.pendingData){const t=e.pendingData;return e.pendingData=null,t}return new w}}const qe=[];for(let e=0;256>e;e++){let t=e;for(let e=0;8>e;e++)1&t?t=t>>>1^3988292384:t>>>=1;qe[e]=t}class Ne{constructor(e){this.crc=e||-1}append(e){let t=0|this.crc;for(let n=0,r=0|e.length;r>n;n++)t=t>>>8^qe[255&(t^e[n])];this.crc=t}get(){return~this.crc}}class Oe extends v{constructor(){let e;const t=new Ne;super({transform(e,n){t.append(e),n.enqueue(e)},flush(){const n=new w(4);new _(n.buffer).setUint32(0,t.get()),e.value=n}}),e=this}}function Pe(e){if(typeof b==Ae){const t=new w((e=unescape(encodeURIComponent(e))).length);for(let n=0;n0&&t&&(e[n-1]=He.partial(t,e[n-1]&2147483648>>t-1,1)),e},partial:(e,t,n)=>32===e?t:(n?0|t:t<<32-e)+1099511627776*e,getPartial:e=>a.round(e/1099511627776)||32,_shiftRight(e,t,n,r){for(void 0===r&&(r=[]);t>=32;t-=32)r.push(n),n=0;if(0===t)return r.concat(e);for(let i=0;i>>t),n=e[i]<<32-t;const i=e.length?e[e.length-1]:0,s=He.getPartial(i);return r.push(He.partial(t+s&31,t+s>32?n:r.pop(),1)),r}},Me={bytes:{fromBits(e){const t=He.bitLength(e)/8,n=new w(t);let r;for(let i=0;t>i;i++)0==(3&i)&&(r=e[i/4]),n[i]=r>>>24,r<<=8;return n},toBits(e){const t=[];let n,r=0;for(n=0;n9007199254740991)throw new d("Cannot hash more than 2^53 - 1 bits");const s=new p(n);let a=0;for(let e=t.blockSize+r-(t.blockSize+r&t.blockSize-1);i>=e;e+=t.blockSize)t._block(s.subarray(16*a,16*(a+1))),a+=1;return n.splice(0,16*a),t}finalize(){const e=this;let t=e._buffer;const n=e._h;t=He.concat(t,[He.partial(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(a.floor(e._length/4294967296)),t.push(0|e._length);t.length;)e._block(t.splice(0,16));return e.reset(),n}_f(e,t,n,r){return e>19?e>39?e>59?e>79?void 0:t^n^r:t&n|t&r|n&r:t^n^r:t&n|~t&r}_S(e,t){return t<>>32-e}_block(e){const n=this,r=n._h,i=t(80);for(let t=0;16>t;t++)i[t]=e[t];let s=r[0],o=r[1],l=r[2],c=r[3],u=r[4];for(let e=0;79>=e;e++){16>e||(i[e]=n._S(1,i[e-3]^i[e-8]^i[e-14]^i[e-16]));const t=n._S(5,s)+n._f(e,o,l,c)+u+i[e]+n._key[a.floor(e/20)]|0;u=c,c=l,l=n._S(30,o),o=s,s=t}r[0]=r[0]+s|0,r[1]=r[1]+o|0,r[2]=r[2]+l|0,r[3]=r[3]+c|0,r[4]=r[4]+u|0}},Ve={getRandomValues(e){const t=new p(e.buffer),n=e=>{let t=987654321;const n=4294967295;return()=>(t=36969*(65535&t)+(t>>16)&n,(((t<<16)+(e=18e3*(65535&e)+(e>>16)&n)&n)/4294967296+.5)*(a.random()>.5?1:-1))};for(let r,i=0;inew Ze.hmacSha1(Me.bytes.toBits(e)),pbkdf2(e,t,n,r){if(n=n||1e4,0>r||0>n)throw new d("invalid params to pbkdf2");const i=1+(r>>5)<<2;let s,a,o,l,c;const u=new ArrayBuffer(i),f=new _(u);let w=0;const h=He;for(t=Me.bytes.toBits(t),c=1;(i||1)>w;c++){for(s=a=e.encrypt(h.concat(t,[c])),o=1;n>o;o++)for(a=e.encrypt(a),l=0;lw&&oi&&(e=(new n).update(e).finalize());for(let t=0;i>t;t++)r[0][t]=909522486^e[t],r[1][t]=1549556828^e[t];t._baseHash[0].update(r[0]),t._baseHash[1].update(r[1]),t._resultHash=new n(t._baseHash[0])}reset(){const e=this;e._resultHash=new e._hash(e._baseHash[0]),e._updated=!1}update(e){this._updated=!0,this._resultHash.update(e)}digest(){const e=this,t=e._resultHash.finalize(),n=new e._hash(e._baseHash[1]).update(t).finalize();return e.reset(),n}encrypt(e){if(this._updated)throw new d("encrypt on already updated hmac called!");return this.update(e),this.digest(e)}}},Ke=typeof k!=Ae&&typeof k.getRandomValues==Ce,Ge="Invalid password",Xe="Invalid signature",Ye="zipjs-abort-check-password";function je(e){return Ke?k.getRandomValues(e):Ve.getRandomValues(e)}const Je=16,Qe={name:"PBKDF2"},$e=n.assign({hash:{name:"HMAC"}},Qe),et=n.assign({iterations:1e3,hash:{name:"SHA-1"}},Qe),tt=["deriveBits"],nt=[8,12,16],rt=[16,24,32],it=10,st=[0,0,0,0],at=typeof k!=Ae,ot=at&&k.subtle,lt=at&&typeof ot!=Ae,ct=Me.bytes,ut=class{constructor(e){const t=this;t._tables=[[[],[],[],[],[]],[[],[],[],[],[]]],t._tables[0][0][0]||t._precompute();const n=t._tables[0][4],r=t._tables[1],i=e.length;let s,a,o,l=1;if(4!==i&&6!==i&&8!==i)throw new d("invalid aes key size");for(t._key=[a=e.slice(0),o=[]],s=i;4*i+28>s;s++){let e=a[s-1];(s%i==0||8===i&&s%i==4)&&(e=n[e>>>24]<<24^n[e>>16&255]<<16^n[e>>8&255]<<8^n[255&e],s%i==0&&(e=e<<8^e>>>24^l<<24,l=l<<1^283*(l>>7))),a[s]=a[s-i]^e}for(let e=0;s;e++,s--){const t=a[3&e?s:s-4];o[e]=4>=s||4>e?t:r[0][n[t>>>24]]^r[1][n[t>>16&255]]^r[2][n[t>>8&255]]^r[3][n[255&t]]}}encrypt(e){return this._crypt(e,0)}decrypt(e){return this._crypt(e,1)}_precompute(){const e=this._tables[0],t=this._tables[1],n=e[4],r=t[4],i=[],s=[];let a,o,l,c;for(let e=0;256>e;e++)s[(i[e]=e<<1^283*(e>>7))^e]=e;for(let u=a=0;!n[u];u^=o||1,a=s[a]||1){let s=a^a<<1^a<<2^a<<3^a<<4;s=s>>8^255&s^99,n[u]=s,r[s]=u,c=i[l=i[o=i[u]]];let f=16843009*c^65537*l^257*o^16843008*u,d=257*i[s]^16843008*s;for(let n=0;4>n;n++)e[n][u]=d=d<<24^d>>>8,t[n][s]=f=f<<24^f>>>8}for(let n=0;5>n;n++)e[n]=e[n].slice(0),t[n]=t[n].slice(0)}_crypt(e,t){if(4!==e.length)throw new d("invalid aes block size");const n=this._key[t],r=n.length/4-2,i=[0,0,0,0],s=this._tables[t],a=s[0],o=s[1],l=s[2],c=s[3],u=s[4];let f,w,h,p=e[0]^n[0],_=e[t?3:1]^n[1],g=e[2]^n[2],m=e[t?1:3]^n[3],b=4;for(let e=0;r>e;e++)f=a[p>>>24]^o[_>>16&255]^l[g>>8&255]^c[255&m]^n[b],w=a[_>>>24]^o[g>>16&255]^l[m>>8&255]^c[255&p]^n[b+1],h=a[g>>>24]^o[m>>16&255]^l[p>>8&255]^c[255&_]^n[b+2],m=a[m>>>24]^o[p>>16&255]^l[_>>8&255]^c[255&g]^n[b+3],b+=4,p=f,_=w,g=h;for(let e=0;4>e;e++)i[t?3&-e:e]=u[p>>>24]<<24^u[_>>16&255]<<16^u[g>>8&255]<<8^u[255&m]^n[b++],f=p,p=_,_=g,g=m,m=f;return i}},ft=class{constructor(e,t){this._prf=e,this._initIv=t,this._iv=t}reset(){this._iv=this._initIv}update(e){return this.calculate(this._prf,e,this._iv)}incWord(e){if(255==(e>>24&255)){let t=e>>16&255,n=e>>8&255,r=255&e;255===t?(t=0,255===n?(n=0,255===r?r=0:++r):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=r}else e+=1<<24;return e}incCounter(e){0===(e[0]=this.incWord(e[0]))&&(e[1]=this.incWord(e[1]))}calculate(e,t,n){let r;if(!(r=t.length))return[];const i=He.bitLength(t);for(let i=0;r>i;i+=4){this.incCounter(n);const r=e.encrypt(n);t[i]^=r[0],t[i+1]^=r[1],t[i+2]^=r[2],t[i+3]^=r[3]}return He.clamp(t,i)}},dt=Ze.hmacSha1;let wt=at&<&&typeof ot.importKey==Ce,ht=at&<&&typeof ot.deriveBits==Ce;class pt extends v{constructor({password:e,rawPassword:t,signed:r,encryptionStrength:i,checkPasswordOnly:s}){super({start(){n.assign(this,{ready:new m((e=>this.resolveReady=e)),password:bt(e,t),signed:r,strength:i-1,pending:new w})},async transform(e,t){const n=this,{password:r,strength:i,resolveReady:a,ready:o}=n;r?(await(async(e,t,n,r)=>{const i=await mt(e,t,n,xt(r,0,nt[t])),s=xt(r,nt[t]);if(i[0]!=s[0]||i[1]!=s[1])throw new d(Ge)})(n,i,r,xt(e,0,nt[i]+2)),e=xt(e,nt[i]+2),s?t.error(new d(Ye)):a()):await o;const l=new w(e.length-it-(e.length-it)%Je);t.enqueue(gt(n,e,l,0,it,!0))},async flush(e){const{signed:t,ctr:n,hmac:r,pending:i,ready:s}=this;if(r&&n){await s;const a=xt(i,0,i.length-it),o=xt(i,i.length-it);let l=new w;if(a.length){const e=St(ct,a);r.update(e);const t=n.update(e);l=kt(ct,t)}if(t){const e=xt(kt(ct,r.digest()),0,it);for(let t=0;it>t;t++)if(e[t]!=o[t])throw new d(Xe)}e.enqueue(l)}}})}}class _t extends v{constructor({password:e,rawPassword:t,encryptionStrength:r}){let i;super({start(){n.assign(this,{ready:new m((e=>this.resolveReady=e)),password:bt(e,t),strength:r-1,pending:new w})},async transform(e,t){const n=this,{password:r,strength:i,resolveReady:s,ready:a}=n;let o=new w;r?(o=await(async(e,t,n)=>{const r=je(new w(nt[t]));return yt(r,await mt(e,t,n,r))})(n,i,r),s()):await a;const l=new w(o.length+e.length-e.length%Je);l.set(o,0),t.enqueue(gt(n,e,l,o.length,0))},async flush(e){const{ctr:t,hmac:n,pending:r,ready:s}=this;if(n&&t){await s;let a=new w;if(r.length){const e=t.update(St(ct,r));n.update(e),a=kt(ct,e)}i.signature=kt(ct,n.digest()).slice(0,it),e.enqueue(yt(a,i.signature))}}}),i=this}}function gt(e,t,n,r,i,s){const{ctr:a,hmac:o,pending:l}=e,c=t.length-i;let u;for(l.length&&(t=yt(l,t),n=((e,t)=>{if(t&&t>e.length){const n=e;(e=new w(t)).set(n,0)}return e})(n,c-c%Je)),u=0;c-Je>=u;u+=Je){const e=St(ct,xt(t,u,u+Je));s&&o.update(e);const i=a.update(e);s||o.update(i),n.set(kt(ct,i),u+r)}return e.pending=xt(t,u),n}async function mt(e,r,i,s){e.password=null;const a=await(async(e,t,n,r,i)=>{if(!wt)return Ze.importKey(t);try{return await ot.importKey("raw",t,n,!1,i)}catch(e){return wt=!1,Ze.importKey(t)}})(0,i,$e,0,tt),o=await(async(e,t,n)=>{if(!ht)return Ze.pbkdf2(t,e.salt,et.iterations,n);try{return await ot.deriveBits(e,t,n)}catch(r){return ht=!1,Ze.pbkdf2(t,e.salt,et.iterations,n)}})(n.assign({salt:s},et),a,8*(2*rt[r]+2)),l=new w(o),c=St(ct,xt(l,0,rt[r])),u=St(ct,xt(l,rt[r],2*rt[r])),f=xt(l,2*rt[r]);return n.assign(e,{keys:{key:c,authentication:u,passwordVerification:f},ctr:new ft(new ut(c),t.from(st)),hmac:new dt(u)}),f}function bt(e,t){return t===ze?Pe(e):t}function yt(e,t){let n=e;return e.length+t.length&&(n=new w(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function xt(e,t,n){return e.subarray(t,n)}function kt(e,t){return e.fromBits(t)}function St(e,t){return e.toBits(t)}class vt extends v{constructor({password:e,passwordVerification:t,checkPasswordOnly:r}){super({start(){n.assign(this,{password:e,passwordVerification:t}),Dt(this,e)},transform(e,t){const n=this;if(n.password){const t=At(n,e.subarray(0,12));if(n.password=null,t[11]!=n.passwordVerification)throw new d(Ge);e=e.subarray(12)}r?t.error(new d(Ye)):t.enqueue(At(n,e))}})}}class zt extends v{constructor({password:e,passwordVerification:t}){super({start(){n.assign(this,{password:e,passwordVerification:t}),Dt(this,e)},transform(e,t){const n=this;let r,i;if(n.password){n.password=null;const t=je(new w(12));t[11]=n.passwordVerification,r=new w(e.length+t.length),r.set(Ct(n,t),0),i=12}else r=new w(e.length),i=0;r.set(Ct(n,e),i),t.enqueue(r)}})}}function At(e,t){const n=new w(t.length);for(let r=0;r>>24]),i=~e.crcKey2.get(),e.keys=[n,r,i]}function Et(e){const t=2|e.keys[2];return Rt(a.imul(t,1^t)>>>8)}function Rt(e){return 255&e}function Ft(e){return 4294967295&e}const Tt="deflate-raw";class Lt extends v{constructor(e,{chunkSize:t,CompressionStream:n,CompressionStreamNative:r}){super({});const{compressed:i,encrypted:s,useCompressionStream:a,zipCrypto:o,signed:l,level:c}=e,u=this;let f,d,w=Ut(super.readable);s&&!o||!l||(f=new Oe,w=Ot(w,f)),i&&(w=Nt(w,a,{level:c,chunkSize:t},r,n)),s&&(o?w=Ot(w,new zt(e)):(d=new _t(e),w=Ot(w,d))),qt(u,w,(()=>{let e;s&&!o&&(e=d.signature),s&&!o||!l||(e=new _(f.value.buffer).getUint32(0)),u.signature=e}))}}class It extends v{constructor(e,{chunkSize:t,DecompressionStream:n,DecompressionStreamNative:r}){super({});const{zipCrypto:i,encrypted:s,signed:a,signature:o,compressed:l,useCompressionStream:c}=e;let u,f,w=Ut(super.readable);s&&(i?w=Ot(w,new vt(e)):(f=new pt(e),w=Ot(w,f))),l&&(w=Nt(w,c,{chunkSize:t},r,n)),s&&!i||!a||(u=new Oe,w=Ot(w,u)),qt(this,w,(()=>{if((!s||i)&&a){const e=new _(u.value.buffer);if(o!=e.getUint32(0,!1))throw new d(Xe)}}))}}function Ut(e){return Ot(e,new v({transform(e,t){e&&e.length&&t.enqueue(e)}}))}function qt(e,t,r){t=Ot(t,new v({flush:r})),n.defineProperty(e,"readable",{get:()=>t})}function Nt(e,t,n,r,i){try{e=Ot(e,new(t&&r?r:i)(Tt,n))}catch(r){if(!t)return e;try{e=Ot(e,new i(Tt,n))}catch(t){return e}}return e}function Ot(e,t){return e.pipeThrough(t)}const Pt="data",Ht="close",Mt="deflate",Bt="inflate";class Vt extends v{constructor(e,t){super({});const r=this,{codecType:i}=e;let s;i.startsWith(Mt)?s=Lt:i.startsWith(Bt)&&(s=It);let a=0,o=0;const l=new s(e,t),c=super.readable,u=new v({transform(e,t){e&&e.length&&(o+=e.length,t.enqueue(e))},flush(){n.assign(r,{inputSize:o})}}),f=new v({transform(e,t){e&&e.length&&(a+=e.length,t.enqueue(e))},flush(){const{signature:e}=l;n.assign(r,{signature:e,outputSize:a,inputSize:o})}});n.defineProperty(r,"readable",{get:()=>c.pipeThrough(u).pipeThrough(l).pipeThrough(f)})}}class Zt extends v{constructor(e){let t;super({transform:function n(r,i){if(t){const e=new w(t.length+r.length);e.set(t),e.set(r,t.length),r=e,t=null}r.length>e?(i.enqueue(r.slice(0,e)),n(r.slice(e),i)):t=r},flush(e){t&&t.length&&e.enqueue(t)}})}}let Kt=typeof E!=Ae;class Gt{constructor(e,{readable:t,writable:r},{options:i,config:s,streamOptions:a,useWebWorkers:o,transferStreams:l,scripts:c},u){const{signal:f}=a;return n.assign(e,{busy:!0,readable:t.pipeThrough(new Zt(s.chunkSize)).pipeThrough(new Xt(t,a),{signal:f}),writable:r,options:n.assign({},i),scripts:c,transferStreams:l,terminate:()=>new m((t=>{const{worker:n,busy:r}=e;n?(r?e.resolveTerminated=t:(n.terminate(),t()),e.interface=null):t()})),onTaskFinished(){const{resolveTerminated:t}=e;t&&(e.resolveTerminated=null,e.terminated=!0,e.worker.terminate(),t()),e.busy=!1,u(e)}}),(o&&Kt?Jt:jt)(e,s)}}class Xt extends v{constructor(e,{onstart:t,onprogress:n,size:r,onend:i}){let s=0;super({async start(){t&&await Yt(t,r)},async transform(e,t){s+=e.length,n&&await Yt(n,s,r),t.enqueue(e)},async flush(){e.size=s,i&&await Yt(i,s)}})}}async function Yt(e,...t){try{await e(...t)}catch(e){}}function jt(e,t){return{run:()=>(async({options:e,readable:t,writable:n,onTaskFinished:r},i)=>{try{const s=new Vt(e,i);await t.pipeThrough(s).pipeTo(n,{preventClose:!0,preventAbort:!0});const{signature:a,inputSize:o,outputSize:l}=s;return{signature:a,inputSize:o,outputSize:l}}finally{r()}})(e,t)}}function Jt(e,t){const{baseURL:r,chunkSize:i}=t;if(!e.interface){let s;try{s=((e,t,r)=>{const i={type:"module"};let s,a;typeof e==Ce&&(e=e());try{s=new f(e,t)}catch(t){s=e}if(Qt)try{a=new E(s)}catch(e){Qt=!1,a=new E(s,i)}else a=new E(s,i);return a.addEventListener("message",(e=>(async({data:e},t)=>{const{type:r,value:i,messageId:s,result:a,error:o}=e,{reader:l,writer:c,resolveResult:u,rejectResult:f,onTaskFinished:h}=t;try{if(o){const{message:e,stack:t,code:r,name:i}=o,s=new d(e);n.assign(s,{stack:t,code:r,name:i}),p(s)}else{if("pull"==r){const{value:e,done:n}=await l.read();en({type:Pt,value:e,done:n,messageId:s},t)}r==Pt&&(await c.ready,await c.write(new w(i)),en({type:"ack",messageId:s},t)),r==Ht&&p(null,a)}}catch(o){en({type:Ht,messageId:s},t),p(o)}function p(e,t){e?f(e):u(t),c&&c.releaseLock(),h()}})(e,r))),a})(e.scripts[0],r,e)}catch(n){return Kt=!1,jt(e,t)}n.assign(e,{worker:s,interface:{run:()=>(async(e,t)=>{let r,i;const s=new m(((e,t)=>{r=e,i=t}));n.assign(e,{reader:null,writer:null,resolveResult:r,rejectResult:i,result:s});const{readable:a,options:o,scripts:l}=e,{writable:c,closed:u}=(e=>{let t;const n=new m((e=>t=e));return{writable:new A({async write(t){const n=e.getWriter();await n.ready,await n.write(t),n.releaseLock()},close(){t()},abort:t=>e.getWriter().abort(t)}),closed:n}})(e.writable),f=en({type:"start",scripts:l.slice(1),options:o,config:t,readable:a,writable:c},e);f||n.assign(e,{reader:a.getReader(),writer:c.getWriter()});const d=await s;return f||await c.getWriter().close(),await u,d})(e,{chunkSize:i})}})}return e.interface}let Qt=!0,$t=!0;function en(e,{worker:t,writer:n,onTaskFinished:r,transferStreams:i}){try{let{value:n,readable:r,writable:s}=e;const a=[];if(n&&(n.byteLength{const n=tn.find((e=>!e.busy));if(n)return an(n),new Gt(n,e,t,p);if(tn.lengthnn.push({resolve:n,stream:e,workerOptions:t})))})()).run();function p(e){if(nn.length){const[{resolve:t,stream:n,workerOptions:r}]=nn.splice(0,1);t(new Gt(e,n,r,p))}else e.worker?(an(e),((e,t)=>{const{config:n}=t,{terminateWorkerTimeout:r}=n;i.isFinite(r)&&r>=0&&(e.terminated?e.terminated=!1:e.terminateTimeout=setTimeout((async()=>{tn=tn.filter((t=>t!=e));try{await e.terminate()}catch(e){}}),r))})(e,t)):tn=tn.filter((t=>t!=e))}}function an(e){const{terminateTimeout:t}=e;t&&(clearTimeout(t),e.terminateTimeout=null)}const on="HTTP error ",ln="HTTP Range not supported",cn="Writer iterator completed too soon",un="GET",fn="bytes",dn=65536,wn="writable";class hn{constructor(){this.size=0}init(){this.initialized=!0}}class pn extends hn{get readable(){const e=this,{chunkSize:t=dn}=e,n=new z({start(){this.chunkOffset=0},async pull(r){const{offset:i=0,size:s,diskNumberStart:o}=n,{chunkOffset:l}=this;r.enqueue(await Nn(e,i+l,a.min(t,s-l),o)),l+t>s?r.close():this.chunkOffset+=t}});return n}}class _n extends hn{constructor(){super();const e=this,t=new A({write:t=>e.writeUint8Array(t)});n.defineProperty(e,wn,{get:()=>t})}writeUint8Array(){}}class gn extends pn{constructor(e){super(),n.assign(this,{blob:e,size:e.size})}async readUint8Array(e,t){const n=this,r=e+t,i=e||rt&&(s=s.slice(e,r)),new w(s)}}class mn extends hn{constructor(e){super();const t=new v,r=[];e&&r.push(["Content-Type",e]),n.defineProperty(this,wn,{get:()=>t.writable}),this.blob=new u(t.readable,{headers:r}).blob()}getData(){return this.blob}}class bn extends pn{constructor(e,t){super(),xn(this,e,t)}async init(){await kn(this,En,An),super.init()}readUint8Array(e,t){return Sn(this,e,t,En,An)}}class yn extends pn{constructor(e,t){super(),xn(this,e,t)}async init(){await kn(this,Rn,Cn),super.init()}readUint8Array(e,t){return Sn(this,e,t,Rn,Cn)}}function xn(e,t,r){const{preventHeadRequest:i,useRangeHeader:s,forceRangeRequests:a}=r;delete(r=n.assign({},r)).preventHeadRequest,delete r.useRangeHeader,delete r.forceRangeRequests,delete r.useXHR,n.assign(e,{url:t,options:r,preventHeadRequest:i,useRangeHeader:s,forceRangeRequests:a})}async function kn(e,t,n){const{url:r,useRangeHeader:s,forceRangeRequests:a}=e;if((e=>{const{baseURL:t}=Fe(),{protocol:n}=new f(e,t);return"http:"==n||"https:"==n})(r)&&(s||a)){const{headers:r}=await t(un,e,vn(e));if(!a&&r.get("Accept-Ranges")!=fn)throw new d(ln);{let s;const a=r.get("Content-Range");if(a){const e=a.trim().split(/\s*\/\s*/);if(e.length){const t=e[1];t&&"*"!=t&&(s=i(t))}}s===ze?await Wn(e,t,n):e.size=s}}else await Wn(e,t,n)}async function Sn(e,t,n,r,i){const{useRangeHeader:s,forceRangeRequests:a,options:o}=e;if(s||a){const i=await r(un,e,vn(e,t,n));if(206!=i.status)throw new d(ln);return new w(await i.arrayBuffer())}{const{data:r}=e;return r||await i(e,o),new w(e.data.subarray(t,t+n))}}function vn(e,t=0,r=1){return n.assign({},zn(e),{Range:fn+"="+t+"-"+(t+r-1)})}function zn({options:e}){const{headers:t}=e;if(t)return Symbol.iterator in t?n.fromEntries(t):t}async function An(e){await Dn(e,En)}async function Cn(e){await Dn(e,Rn)}async function Dn(e,t){const n=await t(un,e,zn(e));e.data=new w(await n.arrayBuffer()),e.size||(e.size=e.data.length)}async function Wn(e,t,n){if(e.preventHeadRequest)await n(e,e.options);else{const r=(await t("HEAD",e,zn(e))).headers.get("Content-Length");r?e.size=i(r):await n(e,e.options)}}async function En(e,{options:t,url:r},i){const s=await fetch(r,n.assign({},t,{method:e,headers:i}));if(400>s.status)return s;throw 416==s.status?new d(ln):new d(on+(s.statusText||s.status))}function Rn(e,{url:t},r){return new m(((i,s)=>{const a=new XMLHttpRequest;if(a.addEventListener("load",(()=>{if(400>a.status){const e=[];a.getAllResponseHeaders().trim().split(/[\r\n]+/).forEach((t=>{const n=t.trim().split(/\s*:\s*/);n[0]=n[0].trim().replace(/^[a-z]|-[a-z]/g,(e=>e.toUpperCase())),e.push(n)})),i({status:a.status,arrayBuffer:()=>a.response,headers:new l(e)})}else s(416==a.status?new d(ln):new d(on+(a.statusText||a.status)))}),!1),a.addEventListener("error",(e=>s(e.detail?e.detail.error:new d("Network error"))),!1),a.open(e,t),r)for(const e of n.entries(r))a.setRequestHeader(e[0],e[1]);a.responseType="arraybuffer",a.send()}))}class Fn extends pn{constructor(e,t={}){super(),n.assign(this,{url:e,reader:t.useXHR?new yn(e,t):new bn(e,t)})}set size(e){}get size(){return this.reader.size}async init(){await this.reader.init(),super.init()}readUint8Array(e,t){return this.reader.readUint8Array(e,t)}}class Tn extends pn{constructor(e){super(),this.readers=e}async init(){const e=this,{readers:t}=e;e.lastDiskNumber=0,e.lastDiskOffset=0,await m.all(t.map((async(n,r)=>{await n.init(),r!=t.length-1&&(e.lastDiskOffset+=n.size),e.size+=n.size}))),super.init()}async readUint8Array(e,t,n=0){const r=this,{readers:i}=this;let s,o=n;-1==o&&(o=i.length-1);let l=e;for(;l>=i[o].size;)l-=i[o].size,o++;const c=i[o],u=c.size;if(l+t>u){const i=u-l;s=new w(t),s.set(await Nn(c,l,i)),s.set(await r.readUint8Array(e+i,t-i,n),i)}else s=await Nn(c,l,t);return r.lastDiskNumber=a.max(o,r.lastDiskNumber),s}}class Ln extends hn{constructor(e,t=4294967295){super();const r=this;let i,s,a;n.assign(r,{diskNumber:0,diskOffset:0,size:0,maxSize:t,availableSize:t});const o=new A({async write(t){const{availableSize:n}=r;if(a)t.lengtho})}}async function In(e,t){if(!e.init||e.initialized)return m.resolve();await e.init(t)}function Un(e){return t.isArray(e)&&(e=new Tn(e)),e instanceof z&&(e={readable:e}),e}function qn(e){e.writable===ze&&typeof e.next==Ce&&(e=new Ln(e)),e instanceof A&&(e={writable:e});const{writable:t}=e;return t.size===ze&&(t.size=0),e instanceof Ln||n.assign(e,{diskNumber:0,diskOffset:0,availableSize:1/0,maxSize:1/0}),e}function Nn(e,t,n,r){return e.readUint8Array(t,n,r)}const On=Tn,Pn=Ln,Hn="\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ ".split("");function Mn(e,t){return t&&"cp437"==t.trim().toLowerCase()?(e=>{{let t="";for(let n=0;nthis[t]=e[t]))}}const or="File format is not recognized",lr="End of central directory not found",cr="End of Zip64 central directory not found",ur="End of Zip64 central directory locator not found",fr="Central directory header not found",dr="Local file header not found",wr="Zip64 extra field not found",hr="File contains encrypted entry",pr="Encryption method not supported",_r="Compression method not supported",gr="Split zip file",mr="utf-8",br="cp437",yr=[[Gn,de],[Xn,de],[Yn,de],[jn,we]],xr={[we]:{getValue:Fr,bytes:4},[de]:{getValue:Tr,bytes:8}};class kr{constructor(e,t={}){n.assign(this,{reader:Un(e),options:t,config:Fe()})}async*getEntriesGenerator(e={}){const t=this;let{reader:r}=t;const{config:i}=t;if(await In(r),r.size!==ze&&r.readUint8Array||(r=new gn(await new u(r.readable).blob()),await In(r)),r.size{const r=new w(4);return Lr(r).setUint32(0,101010256,!0),await i(22)||await i(a.min(1048582,n));async function i(t){const i=n-t,s=await Nn(e,i,t);for(let e=s.length-22;e>=0;e--)if(s[e]==r[0]&&s[e+1]==r[1]&&s[e+2]==r[2]&&s[e+3]==r[3])return{offset:i+e,buffer:s.slice(e,e+22).buffer}}})(r,0,r.size);if(!s)throw Fr(Lr(await Nn(r,0,4)))==pe?new d(gr):new d(lr);const o=Lr(s);let l=Fr(o,12),c=Fr(o,16);const f=s.offset,h=Rr(o,20),p=f+be+h;let _=Rr(o,4);const g=r.lastDiskNumber||0;let b=Rr(o,6),y=Rr(o,8),x=0,k=0;if(c==de||l==de||y==we||b==we){const e=Lr(await Nn(r,s.offset-20,20));if(Fr(e,0)!=me)throw new d(cr);c=Tr(e,8);let t=await Nn(r,c,56,-1),n=Lr(t);const i=s.offset-20-56;if(Fr(n,0)!=ge&&c!=i){const e=c;c=i,x=c-e,t=await Nn(r,c,56,-1),n=Lr(t)}if(Fr(n,0)!=ge)throw new d(ur);_==we&&(_=Fr(n,16)),b==we&&(b=Fr(n,20)),y==we&&(y=Tr(n,32)),l==de&&(l=Tr(n,40)),c-=l}if(cc)throw new d(or);let S=0,v=await Nn(r,c,l,b),z=Lr(v);if(l){const e=s.offset-l;if(Fr(z,S)!=_e&&c!=e){const t=c;c=e,x+=c-t,v=await Nn(r,c,l,b),z=Lr(v)}}const A=s.offset-c-(r.lastDiskOffset||0);if(l==A||0>A||(l=A,v=await Nn(r,c,l,b),z=Lr(v)),0>c||c>=r.size)throw new d(or);const C=Cr(t,e,"filenameEncoding"),D=Cr(t,e,"commentEncoding");for(let s=0;y>s;s++){const o=new Sr(r,i,t.options);if(Fr(z,S)!=_e)throw new d(fr);vr(o,z,S+6);const l=!!o.bitFlag.languageEncodingFlag,c=S+46,u=c+o.filenameLength,f=u+o.extraFieldLength,w=Rr(z,S+4),h=0==(0&w),p=v.subarray(c,u),_=Rr(z,S+32),g=f+_,b=v.subarray(f,g),A=l,W=l,E=h&&16==(16&Er(z,S+38)),R=Fr(z,S+42)+x;n.assign(o,{versionMadeBy:w,msDosCompatible:h,compressedSize:0,uncompressedSize:0,commentLength:_,directory:E,offset:R,diskNumberStart:Rr(z,S+34),internalFileAttribute:Rr(z,S+36),externalFileAttribute:Fr(z,S+38),rawFilename:p,filenameUTF8:A,commentUTF8:W,rawExtraField:v.subarray(u,f)});const[F,T]=await m.all([Mn(p,A?mr:C||br),Mn(b,W?mr:D||br)]);n.assign(o,{rawComment:b,filename:F,comment:T,directory:E||F.endsWith(ke)}),k=a.max(R,k),await zr(o,o,z,S+6);const L=new ar(o);L.getData=(e,t)=>o.getData(e,L,t),S=g;const{onprogress:I}=e;if(I)try{await I(s+1,y,new ar(o))}catch(e){}yield L}const W=Cr(t,e,"extractPrependedData"),E=Cr(t,e,"extractAppendedData");return W&&(t.prependedData=k>0?await Nn(r,0,k):new w),t.comment=h?await Nn(r,f+be,h):new w,E&&(t.appendedData=p>>8&255:h>>>24&255),signature:h,compressed:0!=c,encrypted:k,useWebWorkers:Cr(i,r,"useWebWorkers"),useCompressionStream:Cr(i,r,"useCompressionStream"),transferStreams:Cr(i,r,"transferStreams"),checkPasswordOnly:W},config:u,streamOptions:{signal:D,size:z,onstart:R,onprogress:F,onend:T}};let I=0;try{({outputSize:I}=await sn({readable:C,writable:E},L))}catch(e){if(!W||e.message!=Ye)throw e}finally{const e=Cr(i,r,"preventClose");E.size+=I,e||E.locked||await E.getWriter().close()}return W?ze:e.getData?e.getData():E}}function vr(e,t,r){const i=e.rawBitFlag=Rr(t,r+2),s=1==(1&i),a=Fr(t,r+6);n.assign(e,{encrypted:s,version:Rr(t,r),bitFlag:{level:(6&i)>>1,dataDescriptor:8==(8&i),languageEncodingFlag:(i&xe)==xe},rawLastModDate:a,lastModDate:Dr(a),filenameLength:Rr(t,r+22),extraFieldLength:Rr(t,r+24)})}async function zr(e,t,r,i,s){const{rawExtraField:a}=t,c=t.extraField=new l,u=Lr(new w(a));let f=0;try{for(;f{t.zip64=!0;const n=Lr(e.data),r=yr.filter((([e,n])=>t[e]==n));for(let i=0,s=0;i{const i=Lr(e.data),s=Er(i,4);n.assign(e,{vendorVersion:Er(i,0),vendorId:Er(i,2),strength:s,originalCompressionMethod:r,compressionMethod:Rr(i,5)}),t.compressionMethod=e.compressionMethod})(m,t,h),t.extraFieldAES=m):t.compressionMethod=h;const b=c.get(10);b&&(((e,t)=>{const r=Lr(e.data);let i,s=4;try{for(;s{const r=Lr(e.data),i=Er(r,0),s=[],a=[];n?(1==(1&i)&&(s.push(Jn),a.push(Qn)),2==(2&i)&&(s.push($n),a.push("rawLastAccessDate")),4==(4&i)&&(s.push(er),a.push("rawCreationDate"))):5>e.data.length||(s.push(Jn),a.push(Qn));let l=1;s.forEach(((n,i)=>{if(e.data.length>=l+4){const s=Fr(r,l);t[n]=e[n]=new o(1e3*s);const c=a[i];e[c]=s}l+=4}))})(y,t,s),t.extraFieldExtendedTimestamp=y);const x=c.get(6534);x&&(t.extraFieldUSDZ=x)}async function Ar(e,t,r,i,s){const a=Lr(e.data),o=new Ne;o.append(s[r]);const l=Lr(new w(4));l.setUint32(0,o.get(),!0);const c=Fr(a,1);n.assign(e,{version:Er(a,0),[t]:Mn(e.data.subarray(5)),valid:!s.bitFlag.languageEncodingFlag&&c==Fr(l,0)}),e.valid&&(i[t]=e[t],i[t+"UTF8"]=!0)}function Cr(e,t,n){return t[n]===ze?e.options[n]:t[n]}function Dr(e){const t=(4294901760&e)>>16,n=65535&e;try{return new o(1980+((65024&t)>>9),((480&t)>>5)-1,31&t,(63488&n)>>11,(2016&n)>>5,2*(31&n),0)}catch(e){}}function Wr(e){return new o(i(e/s(1e4)-s(116444736e5)))}function Er(e,t){return e.getUint8(t)}function Rr(e,t){return e.getUint16(t,!0)}function Fr(e,t){return e.getUint32(t,!0)}function Tr(e,t){return i(e.getBigUint64(t,!0))}function Lr(e){return new _(e.buffer)}const Ir="File already exists",Ur="Zip file comment exceeds 64KB",qr="File entry comment exceeds 64KB",Nr="File entry name exceeds 64KB",Or="Version exceeds 65535",Pr="The strength must equal 1, 2, or 3",Hr="Extra field type exceeds 65535",Mr="Extra field data exceeds 64KB",Br="Zip64 is not supported (make sure 'keepOrder' is set to 'true')",Vr=new w([7,0,2,0,65,69,3,0,0]);let Zr=0;const Kr=[];class Gr{constructor(e,t={}){const r=(e=qn(e)).availableSize!==ze&&e.availableSize>0&&e.availableSize!==1/0&&e.maxSize!==ze&&e.maxSize>0&&e.maxSize!==1/0;n.assign(this,{writer:e,addSplitZipSignature:r,options:t,config:Fe(),files:new l,filenames:new c,offset:e.writable.size,pendingEntriesSize:0,pendingAddFileCalls:new c,bufferedWrites:0})}async add(e="",r,i={}){const l=this,{pendingAddFileCalls:c,config:f}=l;let g;ZrKr.push(e)));try{if(e=e.trim(),l.filenames.has(e))throw new d(Ir);return l.filenames.add(e),g=(async(e,r,i,l)=>{r=r.trim(),l.directory&&!r.endsWith(ke)?r+=ke:l.directory=r.endsWith(ke);const c=Pe(r);if(ri(c)>we)throw new d(Nr);const f=l.comment||"",g=Pe(f);if(ri(g)>we)throw new d(qr);const b=jr(e,l,"version",20);if(b>we)throw new d(Or);const y=jr(e,l,"versionMadeBy",20);if(y>we)throw new d(Or);const x=jr(e,l,Jn,new o),k=jr(e,l,$n),S=jr(e,l,er),z=jr(e,l,rr,!0),A=jr(e,l,tr,0),C=jr(e,l,nr,0),D=jr(e,l,"password"),W=jr(e,l,"rawPassword"),E=jr(e,l,"encryptionStrength",3),R=jr(e,l,"zipCrypto"),F=jr(e,l,"extendedTimestamp",!0),T=jr(e,l,"keepOrder",!0),L=jr(e,l,"level"),I=jr(e,l,"useWebWorkers"),U=jr(e,l,"bufferedWrite"),q=jr(e,l,"dataDescriptorSignature",!1),N=jr(e,l,"signal"),O=jr(e,l,"useCompressionStream");let P=jr(e,l,"dataDescriptor",!0),H=jr(e,l,ir);if(D!==ze&&E!==ze&&(1>E||E>3))throw new d(Pr);let M=new w;const{extraField:B}=l;if(B){let e=0,t=0;B.forEach((t=>e+=4+ri(t))),M=new w(e),B.forEach(((e,n)=>{if(n>we)throw new d(Hr);if(ri(e)>we)throw new d(Mr);ti(M,new h([n]),t),ti(M,new h([ri(e)]),t+2),ti(M,e,t+4),t+=4+ri(e)}))}let V=0,Z=0,K=0;const G=!0===H;i&&(i=Un(i),await In(i),i.size===ze?(P=!0,(H||H===ze)&&(H=!0,K=V=de)):(K=i.size,V=(e=>e+5*(a.floor(e/16383)+1))(K)));const{diskOffset:X,diskNumber:Y,maxSize:j}=e.writer,J=G||K>=de,Q=G||V>=de,$=G||e.offset+e.pendingEntriesSize-X>=de,ee=jr(e,l,"supportZip64SplitFile",!0)&&G||Y+a.ceil(e.pendingEntriesSize/j)>=we;if($||J||Q||ee){if(!1===H||!T)throw new d(Br);H=!0}H=H||!1;const te=(e=>{const{rawFilename:t,lastModDate:n,lastAccessDate:r,creationDate:i,rawPassword:s,password:o,level:l,zip64:c,zipCrypto:u,dataDescriptor:f,directory:d,rawExtraField:h,encryptionStrength:_,extendedTimestamp:g}=e,m=0!==l&&!d,b=!!(o&&ri(o)||s&&ri(s));let y,x,k,S,v=e.version;if(b&&!u){y=new w(ri(Vr)+2);const e=ni(y);Qr(e,0,39169),ti(y,Vr,2),Jr(e,8,_)}else y=new w;if(g){k=new w(9+(r?4:0)+(i?4:0));const e=ni(k);Qr(e,0,ye),Qr(e,2,ri(k)-4),S=1+(r?2:0)+(i?4:0),Jr(e,4,S);let t=5;$r(e,t,a.floor(n.getTime()/1e3)),t+=4,r&&($r(e,t,a.floor(r.getTime()/1e3)),t+=4),i&&$r(e,t,a.floor(i.getTime()/1e3));try{x=new w(36);const e=ni(x),t=Yr(n);Qr(e,0,10),Qr(e,2,32),Qr(e,8,1),Qr(e,10,24),ei(e,12,t),ei(e,20,Yr(r)||t),ei(e,28,Yr(i)||t)}catch(e){x=new w}}else x=k=new w;let z=xe;f&&(z|=8);let A=0;m&&(A=8),c&&(v=v>45?v:45),b&&(z|=1,u||(v=v>51?v:51,A=99,m&&(y[9]=8)));const C=new w(26),D=ni(C);Qr(D,0,v),Qr(D,2,z),Qr(D,4,A);const W=new p(1),E=ni(W);let R;R=ve>n?ve:n>Se?Se:n,Qr(E,0,(R.getHours()<<6|R.getMinutes())<<5|R.getSeconds()/2),Qr(E,2,(R.getFullYear()-1980<<4|R.getMonth()+1)<<5|R.getDate());const F=W[0];$r(D,6,F),Qr(D,22,ri(t));const T=ri(y,k,x,h);Qr(D,24,T);const L=new w(30+ri(t)+T);return $r(ni(L),0,he),ti(L,C,4),ti(L,t,30),ti(L,y,30+ri(t)),ti(L,k,30+ri(t,y)),ti(L,x,30+ri(t,y,k)),ti(L,h,30+ri(t,y,k,x)),{localHeaderArray:L,headerArray:C,headerView:D,lastModDate:n,rawLastModDate:F,encrypted:b,compressed:m,version:v,compressionMethod:A,extraFieldExtendedTimestampFlag:S,rawExtraFieldExtendedTimestamp:k,rawExtraFieldNTFS:x,rawExtraFieldAES:y,extraFieldLength:T}})(l=n.assign({},l,{rawFilename:c,rawComment:g,version:b,versionMadeBy:y,lastModDate:x,lastAccessDate:k,creationDate:S,rawExtraField:M,zip64:H,zip64UncompressedSize:J,zip64CompressedSize:Q,zip64Offset:$,zip64DiskNumberStart:ee,password:D,rawPassword:W,level:L,useWebWorkers:I,encryptionStrength:E,extendedTimestamp:F,zipCrypto:R,bufferedWrite:U,keepOrder:T,dataDescriptor:P,dataDescriptorSignature:q,signal:N,msDosCompatible:z,internalFileAttribute:A,externalFileAttribute:C,useCompressionStream:O})),ne=(e=>{const{zip64:t,dataDescriptor:n,dataDescriptorSignature:r}=e;let i,s=new w,a=0;return n&&(s=new w(t?r?24:20:r?16:12),i=ni(s),r&&(a=4,$r(i,0,134695760))),{dataDescriptorArray:s,dataDescriptorView:i,dataDescriptorOffset:a}})(l),re=ri(te.localHeaderArray,ne.dataDescriptorArray);let ie;Z=re+V,e.options.usdz&&(Z+=Z+64),e.pendingEntriesSize+=Z;try{ie=await(async(e,r,i,a,o)=>{const{files:l,writer:c}=e,{keepOrder:f,dataDescriptor:h,signal:p}=o,{headerInfo:g}=a,{usdz:b}=e.options,y=t.from(l.values()).pop();let x,k,S,z,A,C,D,W={};l.set(r,W);try{let t;f&&(t=y&&y.lock,W.lock=new m((e=>S=e))),!(o.bufferedWrite||e.writerLocked||e.bufferedWrites&&f)&&h||b?(C=c,await E()):(C=new v,D=new u(C.readable).blob(),C.writable.size=0,x=!0,e.bufferedWrites++,await In(c)),await In(C);const{writable:g}=c;let{diskOffset:F}=c;if(e.addSplitZipSignature){delete e.addSplitZipSignature;const t=new w(4);$r(ni(t),0,pe),await Xr(g,t),e.offset+=4}b&&((e,t)=>{const{headerInfo:n}=e;let{localHeaderArray:r,extraFieldLength:i}=n,s=ni(r),a=64-(t+ri(r))%64;4>a&&(a+=64);const o=new w(a),l=ni(o);Qr(l,0,6534),Qr(l,2,a-2);const c=r;n.localHeaderArray=r=new w(ri(c)+a),ti(r,c),ti(r,o,ri(c)),s=ni(r),Qr(s,28,i+a),e.metadataSize+=a})(a,e.offset-F),x||(await t,await R(g));const{diskNumber:T}=c;if(A=!0,W.diskNumberStart=T,W=await(async(e,t,{diskNumberStart:r,lock:i},a,o,l)=>{const{headerInfo:c,dataDescriptorInfo:u,metadataSize:f}=a,{localHeaderArray:d,headerArray:h,lastModDate:p,rawLastModDate:_,encrypted:g,compressed:m,version:b,compressionMethod:y,rawExtraFieldExtendedTimestamp:x,extraFieldExtendedTimestampFlag:k,rawExtraFieldNTFS:S,rawExtraFieldAES:v}=c,{dataDescriptorArray:z}=u,{rawFilename:A,lastAccessDate:C,creationDate:D,password:W,rawPassword:E,level:R,zip64:F,zip64UncompressedSize:T,zip64CompressedSize:L,zip64Offset:I,zip64DiskNumberStart:U,zipCrypto:q,dataDescriptor:N,directory:O,versionMadeBy:P,rawComment:H,rawExtraField:M,useWebWorkers:B,onstart:V,onprogress:Z,onend:K,signal:G,encryptionStrength:X,extendedTimestamp:Y,msDosCompatible:j,internalFileAttribute:J,externalFileAttribute:Q,useCompressionStream:$}=l,ee={lock:i,versionMadeBy:P,zip64:F,directory:!!O,filenameUTF8:!0,rawFilename:A,commentUTF8:!0,rawComment:H,rawExtraFieldExtendedTimestamp:x,rawExtraFieldNTFS:S,rawExtraFieldAES:v,rawExtraField:M,extendedTimestamp:Y,msDosCompatible:j,internalFileAttribute:J,externalFileAttribute:Q,diskNumberStart:r};let te,ne=0,re=0;const{writable:ie}=t;if(e){e.chunkSize=Te(o),await Xr(ie,d);const t=e.readable,n=t.size=e.size,r={options:{codecType:Mt,level:R,rawPassword:E,password:W,encryptionStrength:X,zipCrypto:g&&q,passwordVerification:g&&q&&_>>8&255,signed:!0,compressed:m,encrypted:g,useWebWorkers:B,useCompressionStream:$,transferStreams:!1},config:o,streamOptions:{signal:G,size:n,onstart:V,onprogress:Z,onend:K}},i=await sn({readable:t,writable:ie},r);re=i.inputSize,ne=i.outputSize,te=i.signature,ie.size+=re}else await Xr(ie,d);let se;if(F){let e=4;T&&(e+=8),L&&(e+=8),I&&(e+=8),U&&(e+=4),se=new w(e)}else se=new w;return((e,t)=>{const{signature:n,rawExtraFieldZip64:r,compressedSize:i,uncompressedSize:a,headerInfo:o,dataDescriptorInfo:l}=e,{headerView:c,encrypted:u}=o,{dataDescriptorView:f,dataDescriptorOffset:d}=l,{zip64:w,zip64UncompressedSize:h,zip64CompressedSize:p,zipCrypto:_,dataDescriptor:g}=t;if(u&&!_||n===ze||($r(c,10,n),g&&$r(f,d,n)),w){const e=ni(r);Qr(e,0,1),Qr(e,2,ri(r)-4);let t=4;h&&($r(c,18,de),ei(e,t,s(a)),t+=8),p&&($r(c,14,de),ei(e,t,s(i))),g&&(ei(f,d+4,s(i)),ei(f,d+12,s(a)))}else $r(c,14,i),$r(c,18,a),g&&($r(f,d+4,i),$r(f,d+8,a))})({signature:te,rawExtraFieldZip64:se,compressedSize:ne,uncompressedSize:re,headerInfo:c,dataDescriptorInfo:u},l),N&&await Xr(ie,z),n.assign(ee,{uncompressedSize:re,compressedSize:ne,lastModDate:p,rawLastModDate:_,creationDate:D,lastAccessDate:C,encrypted:g,size:f+ne,compressionMethod:y,version:b,headerArray:h,signature:te,rawExtraFieldZip64:se,extraFieldExtendedTimestampFlag:k,zip64UncompressedSize:T,zip64CompressedSize:L,zip64Offset:I,zip64DiskNumberStart:U}),ee})(i,C,W,a,e.config,o),A=!1,l.set(r,W),W.filename=r,x){await C.writable.getWriter().close();let e=await D;await t,await E(),z=!0,h||(e=await(async(e,t,n,{zipCrypto:r})=>{let i;i=await t.slice(0,26).arrayBuffer(),26!=i.byteLength&&(i=i.slice(0,26));const s=new _(i);return e.encrypted&&!r||$r(s,14,e.signature),e.zip64?($r(s,18,de),$r(s,22,de)):($r(s,18,e.compressedSize),$r(s,22,e.uncompressedSize)),await Xr(n,new w(i)),t.slice(i.byteLength)})(W,e,g,o)),await R(g),W.diskNumberStart=c.diskNumber,F=c.diskOffset,await e.stream().pipeTo(g,{preventClose:!0,preventAbort:!0,signal:p}),g.size+=e.size,z=!1}if(W.offset=e.offset-F,W.zip64)((e,t)=>{const{rawExtraFieldZip64:n,offset:r,diskNumberStart:i}=e,{zip64UncompressedSize:a,zip64CompressedSize:o,zip64Offset:l,zip64DiskNumberStart:c}=t,u=ni(n);let f=4;a&&(f+=8),o&&(f+=8),l&&(ei(u,f,s(r)),f+=8),c&&$r(u,f,i)})(W,o);else if(W.offset>=de)throw new d(Br);return e.offset+=W.size,W}catch(t){if(x&&z||!x&&A){if(e.hasCorruptedEntries=!0,t)try{t.corruptedEntry=!0}catch(e){}x?e.offset+=C.writable.size:e.offset=C.writable.size}throw l.delete(r),t}finally{x&&e.bufferedWrites--,S&&S(),k&&k()}async function E(){e.writerLocked=!0;const{lockWriter:t}=e;e.lockWriter=new m((t=>k=()=>{e.writerLocked=!1,t()})),await t}async function R(e){ri(g.localHeaderArray)>c.availableSize&&(c.availableSize=0,await Xr(e,new w))}})(e,r,i,{headerInfo:te,dataDescriptorInfo:ne,metadataSize:re},l)}finally{e.pendingEntriesSize-=Z}return n.assign(ie,{name:r,comment:f,extraField:B}),new ar(ie)})(l,e,r,i),c.add(g),await g}catch(t){throw l.filenames.delete(e),t}finally{c.delete(g);const e=Kr.shift();e?e():Zr--}}async close(e=new w,n={}){const{pendingAddFileCalls:r,writer:i}=this,{writable:o}=i;for(;r.size;)await m.allSettled(t.from(r));return await(async(e,n,r)=>{const{files:i,writer:o}=e,{diskOffset:l,writable:c}=o;let{diskNumber:u}=o,f=0,h=0,p=e.offset-l,_=i.size;for(const[,e]of i){const{rawFilename:t,rawExtraFieldZip64:n,rawExtraFieldAES:r,rawComment:i,rawExtraFieldNTFS:s,rawExtraField:o,extendedTimestamp:l,extraFieldExtendedTimestampFlag:c,lastModDate:u}=e;let f;if(l){f=new w(9);const e=ni(f);Qr(e,0,ye),Qr(e,2,5),Jr(e,4,c),$r(e,5,a.floor(u.getTime()/1e3))}else f=new w;e.rawExtraFieldCDExtendedTimestamp=f,h+=46+ri(t,i,n,r,s,f,o)}const g=new w(h),m=ni(g);await In(o);let b=0;for(const[e,n]of t.from(i.values()).entries()){const{offset:t,rawFilename:s,rawExtraFieldZip64:a,rawExtraFieldAES:l,rawExtraFieldCDExtendedTimestamp:u,rawExtraFieldNTFS:d,rawExtraField:w,rawComment:h,versionMadeBy:p,headerArray:_,directory:y,zip64:x,zip64UncompressedSize:k,zip64CompressedSize:S,zip64DiskNumberStart:v,zip64Offset:z,msDosCompatible:A,internalFileAttribute:C,externalFileAttribute:D,diskNumberStart:W,uncompressedSize:E,compressedSize:R}=n,F=ri(a,l,u,d,w);$r(m,f,_e),Qr(m,f+4,p);const T=ni(_);k||$r(T,18,E),S||$r(T,14,R),ti(g,_,f+6),Qr(m,f+30,F),Qr(m,f+32,ri(h)),Qr(m,f+34,x&&v?we:W),Qr(m,f+36,C),D?$r(m,f+38,D):y&&A&&Jr(m,f+38,16),$r(m,f+42,x&&z?de:t),ti(g,s,f+46),ti(g,a,f+46+ri(s)),ti(g,l,f+46+ri(s,a)),ti(g,u,f+46+ri(s,a,l)),ti(g,d,f+46+ri(s,a,l,u)),ti(g,w,f+46+ri(s,a,l,u,d)),ti(g,h,f+46+ri(s)+F);const L=46+ri(s,h)+F;if(f-b>o.availableSize&&(o.availableSize=0,await Xr(c,g.slice(b,f)),b=f),f+=L,r.onprogress)try{await r.onprogress(e+1,i.size,new ar(n))}catch(e){}}await Xr(c,b?g.slice(b):g);let y=o.diskNumber;const{availableSize:x}=o;be>x&&y++;let k=jr(e,r,"zip64");if(!(de>p&&de>h&&we>_&&we>y)){if(!1===k)throw new d(Br);k=!0}const S=new w(k?98:be),v=ni(S);f=0,k&&($r(v,0,ge),ei(v,4,s(44)),Qr(v,12,45),Qr(v,14,45),$r(v,16,y),$r(v,20,u),ei(v,24,s(_)),ei(v,32,s(_)),ei(v,40,s(h)),ei(v,48,s(p)),$r(v,56,me),ei(v,64,s(p)+s(h)),$r(v,72,y+1),jr(e,r,"supportZip64SplitFile",!0)&&(y=we,u=we),_=we,p=de,h=de,f+=76),$r(v,f,101010256),Qr(v,f+4,y),Qr(v,f+6,u),Qr(v,f+8,_),Qr(v,f+10,_),$r(v,f+12,h),$r(v,f+16,p);const z=ri(n);if(z){if(z>we)throw new d(Ur);Qr(v,f+20,z)}await Xr(c,S),z&&await Xr(c,n)})(this,e,n),jr(this,n,"preventClose")||await o.getWriter().close(),i.getData?i.getData():o}}async function Xr(e,t){const n=e.getWriter();try{await n.ready,e.size+=ri(t),await n.write(t)}finally{n.releaseLock()}}function Yr(e){if(e)return(s(e.getTime())+s(116444736e5))*s(1e4)}function jr(e,t,n,r){const i=t[n]===ze?e.options[n]:t[n];return i===ze?r:i}function Jr(e,t,n){e.setUint8(t,n)}function Qr(e,t,n){e.setUint16(t,n,!0)}function $r(e,t,n){e.setUint32(t,n,!0)}function ei(e,t,n){e.setBigUint64(t,n,!0)}function ti(e,t,n){e.set(t,n)}function ni(e){return new _(e.buffer)}function ri(...e){let t=0;return e.forEach((e=>e&&(t+=e.length))),t}let ii;try{ii=void 0===x&&"undefined"==typeof location?new(require("url").URL)("file:"+__filename).href:void 0===x?location.href:x.currentScript&&x.currentScript.src||new f("zip-full.min.js",x.baseURI).href}catch(e){}(e=>{const t=()=>f.createObjectURL(new g(['const{Array:e,Object:t,Number:n,Math:r,Error:s,Uint8Array:i,Uint16Array:o,Uint32Array:c,Int32Array:f,Map:a,DataView:l,Promise:u,TextEncoder:w,crypto:h,postMessage:d,TransformStream:p,ReadableStream:y,WritableStream:m,CompressionStream:b,DecompressionStream:g}=self,k=void 0,v="undefined",S="function";class z{constructor(e){return class extends p{constructor(t,n){const r=new e(n);super({transform(e,t){t.enqueue(r.append(e))},flush(e){const t=r.flush();t&&e.enqueue(t)}})}}}}const C=[];for(let e=0;256>e;e++){let t=e;for(let e=0;8>e;e++)1&t?t=t>>>1^3988292384:t>>>=1;C[e]=t}class x{constructor(e){this.t=e||-1}append(e){let t=0|this.t;for(let n=0,r=0|e.length;r>n;n++)t=t>>>8^C[255&(t^e[n])];this.t=t}get(){return~this.t}}class A extends p{constructor(){let e;const t=new x;super({transform(e,n){t.append(e),n.enqueue(e)},flush(){const n=new i(4);new l(n.buffer).setUint32(0,t.get()),e.value=n}}),e=this}}const _={concat(e,t){if(0===e.length||0===t.length)return e.concat(t);const n=e[e.length-1],r=_.i(n);return 32===r?e.concat(t):_.o(t,r,0|n,e.slice(0,e.length-1))},l(e){const t=e.length;if(0===t)return 0;const n=e[t-1];return 32*(t-1)+_.i(n)},u(e,t){if(32*e.length0&&t&&(e[n-1]=_.h(t,e[n-1]&2147483648>>t-1,1)),e},h:(e,t,n)=>32===e?t:(n?0|t:t<<32-e)+1099511627776*e,i:e=>r.round(e/1099511627776)||32,o(e,t,n,r){for(void 0===r&&(r=[]);t>=32;t-=32)r.push(n),n=0;if(0===t)return r.concat(e);for(let s=0;s>>t),n=e[s]<<32-t;const s=e.length?e[e.length-1]:0,i=_.i(s);return r.push(_.h(t+i&31,t+i>32?n:r.pop(),1)),r}},I={p:{m(e){const t=_.l(e)/8,n=new i(t);let r;for(let s=0;t>s;s++)0==(3&s)&&(r=e[s/4]),n[s]=r>>>24,r<<=8;return n},g(e){const t=[];let n,r=0;for(n=0;n9007199254740991)throw new s("Cannot hash more than 2^53 - 1 bits");const o=new c(n);let f=0;for(let e=t.blockSize+r-(t.blockSize+r&t.blockSize-1);i>=e;e+=t.blockSize)t.I(o.subarray(16*f,16*(f+1))),f+=1;return n.splice(0,16*f),t}P(){const e=this;let t=e.C;const n=e.S;t=_.concat(t,[_.h(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(r.floor(e.A/4294967296)),t.push(0|e.A);t.length;)e.I(t.splice(0,16));return e.reset(),n}D(e,t,n,r){return e>19?e>39?e>59?e>79?void 0:t^n^r:t&n|t&r|n&r:t^n^r:t&n|~t&r}V(e,t){return t<>>32-e}I(t){const n=this,s=n.S,i=e(80);for(let e=0;16>e;e++)i[e]=t[e];let o=s[0],c=s[1],f=s[2],a=s[3],l=s[4];for(let e=0;79>=e;e++){16>e||(i[e]=n.V(1,i[e-3]^i[e-8]^i[e-14]^i[e-16]));const t=n.V(5,o)+n.D(e,c,f,a)+l+i[e]+n.v[r.floor(e/20)]|0;l=a,a=f,f=n.V(30,c),c=o,o=t}s[0]=s[0]+o|0,s[1]=s[1]+c|0,s[2]=s[2]+f|0,s[3]=s[3]+a|0,s[4]=s[4]+l|0}},D={getRandomValues(e){const t=new c(e.buffer),n=e=>{let t=987654321;const n=4294967295;return()=>(t=36969*(65535&t)+(t>>16)&n,(((t<<16)+(e=18e3*(65535&e)+(e>>16)&n)&n)/4294967296+.5)*(r.random()>.5?1:-1))};for(let s,i=0;inew V.R(I.p.g(e)),B(e,t,n,r){if(n=n||1e4,0>r||0>n)throw new s("invalid params to pbkdf2");const i=1+(r>>5)<<2;let o,c,f,a,u;const w=new ArrayBuffer(i),h=new l(w);let d=0;const p=_;for(t=I.p.g(t),u=1;(i||1)>d;u++){for(o=c=e.encrypt(p.concat(t,[u])),f=1;n>f;f++)for(c=e.encrypt(c),a=0;ad&&fs&&(e=(new n).update(e).P());for(let t=0;s>t;t++)r[0][t]=909522486^e[t],r[1][t]=1549556828^e[t];t.U[0].update(r[0]),t.U[1].update(r[1]),t.K=new n(t.U[0])}reset(){const e=this;e.K=new e.M(e.U[0]),e.N=!1}update(e){this.N=!0,this.K.update(e)}digest(){const e=this,t=e.K.P(),n=new e.M(e.U[1]).update(t).P();return e.reset(),n}encrypt(e){if(this.N)throw new s("encrypt on already updated hmac called!");return this.update(e),this.digest(e)}}},R=typeof h!=v&&typeof h.getRandomValues==S,B="Invalid password",E="Invalid signature",M="zipjs-abort-check-password";function U(e){return R?h.getRandomValues(e):D.getRandomValues(e)}const K=16,N={name:"PBKDF2"},O=t.assign({hash:{name:"HMAC"}},N),T=t.assign({iterations:1e3,hash:{name:"SHA-1"}},N),W=["deriveBits"],j=[8,12,16],H=[16,24,32],L=10,F=[0,0,0,0],q=typeof h!=v,G=q&&h.subtle,J=q&&typeof G!=v,Q=I.p,X=class{constructor(e){const t=this;t.O=[[[],[],[],[],[]],[[],[],[],[],[]]],t.O[0][0][0]||t.T();const n=t.O[0][4],r=t.O[1],i=e.length;let o,c,f,a=1;if(4!==i&&6!==i&&8!==i)throw new s("invalid aes key size");for(t.v=[c=e.slice(0),f=[]],o=i;4*i+28>o;o++){let e=c[o-1];(o%i==0||8===i&&o%i==4)&&(e=n[e>>>24]<<24^n[e>>16&255]<<16^n[e>>8&255]<<8^n[255&e],o%i==0&&(e=e<<8^e>>>24^a<<24,a=a<<1^283*(a>>7))),c[o]=c[o-i]^e}for(let e=0;o;e++,o--){const t=c[3&e?o:o-4];f[e]=4>=o||4>e?t:r[0][n[t>>>24]]^r[1][n[t>>16&255]]^r[2][n[t>>8&255]]^r[3][n[255&t]]}}encrypt(e){return this.W(e,0)}decrypt(e){return this.W(e,1)}T(){const e=this.O[0],t=this.O[1],n=e[4],r=t[4],s=[],i=[];let o,c,f,a;for(let e=0;256>e;e++)i[(s[e]=e<<1^283*(e>>7))^e]=e;for(let l=o=0;!n[l];l^=c||1,o=i[o]||1){let i=o^o<<1^o<<2^o<<3^o<<4;i=i>>8^255&i^99,n[l]=i,r[i]=l,a=s[f=s[c=s[l]]];let u=16843009*a^65537*f^257*c^16843008*l,w=257*s[i]^16843008*i;for(let n=0;4>n;n++)e[n][l]=w=w<<24^w>>>8,t[n][i]=u=u<<24^u>>>8}for(let n=0;5>n;n++)e[n]=e[n].slice(0),t[n]=t[n].slice(0)}W(e,t){if(4!==e.length)throw new s("invalid aes block size");const n=this.v[t],r=n.length/4-2,i=[0,0,0,0],o=this.O[t],c=o[0],f=o[1],a=o[2],l=o[3],u=o[4];let w,h,d,p=e[0]^n[0],y=e[t?3:1]^n[1],m=e[2]^n[2],b=e[t?1:3]^n[3],g=4;for(let e=0;r>e;e++)w=c[p>>>24]^f[y>>16&255]^a[m>>8&255]^l[255&b]^n[g],h=c[y>>>24]^f[m>>16&255]^a[b>>8&255]^l[255&p]^n[g+1],d=c[m>>>24]^f[b>>16&255]^a[p>>8&255]^l[255&y]^n[g+2],b=c[b>>>24]^f[p>>16&255]^a[y>>8&255]^l[255&m]^n[g+3],g+=4,p=w,y=h,m=d;for(let e=0;4>e;e++)i[t?3&-e:e]=u[p>>>24]<<24^u[y>>16&255]<<16^u[m>>8&255]<<8^u[255&b]^n[g++],w=p,p=y,y=m,m=b,b=w;return i}},Y=class{constructor(e,t){this.j=e,this.H=t,this.L=t}reset(){this.L=this.H}update(e){return this.F(this.j,e,this.L)}q(e){if(255==(e>>24&255)){let t=e>>16&255,n=e>>8&255,r=255&e;255===t?(t=0,255===n?(n=0,255===r?r=0:++r):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=r}else e+=1<<24;return e}G(e){0===(e[0]=this.q(e[0]))&&(e[1]=this.q(e[1]))}F(e,t,n){let r;if(!(r=t.length))return[];const s=_.l(t);for(let s=0;r>s;s+=4){this.G(n);const r=e.encrypt(n);t[s]^=r[0],t[s+1]^=r[1],t[s+2]^=r[2],t[s+3]^=r[3]}return _.u(t,s)}},Z=V.R;let $=q&&J&&typeof G.importKey==S,ee=q&&J&&typeof G.deriveBits==S;class te extends p{constructor({password:e,rawPassword:n,signed:r,encryptionStrength:o,checkPasswordOnly:c}){super({start(){t.assign(this,{ready:new u((e=>this.J=e)),password:ie(e,n),signed:r,X:o-1,pending:new i})},async transform(e,t){const n=this,{password:r,X:o,J:f,ready:a}=n;r?(await(async(e,t,n,r)=>{const i=await se(e,t,n,ce(r,0,j[t])),o=ce(r,j[t]);if(i[0]!=o[0]||i[1]!=o[1])throw new s(B)})(n,o,r,ce(e,0,j[o]+2)),e=ce(e,j[o]+2),c?t.error(new s(M)):f()):await a;const l=new i(e.length-L-(e.length-L)%K);t.enqueue(re(n,e,l,0,L,!0))},async flush(e){const{signed:t,Y:n,Z:r,pending:o,ready:c}=this;if(r&&n){await c;const f=ce(o,0,o.length-L),a=ce(o,o.length-L);let l=new i;if(f.length){const e=ae(Q,f);r.update(e);const t=n.update(e);l=fe(Q,t)}if(t){const e=ce(fe(Q,r.digest()),0,L);for(let t=0;L>t;t++)if(e[t]!=a[t])throw new s(E)}e.enqueue(l)}}})}}class ne extends p{constructor({password:e,rawPassword:n,encryptionStrength:r}){let s;super({start(){t.assign(this,{ready:new u((e=>this.J=e)),password:ie(e,n),X:r-1,pending:new i})},async transform(e,t){const n=this,{password:r,X:s,J:o,ready:c}=n;let f=new i;r?(f=await(async(e,t,n)=>{const r=U(new i(j[t]));return oe(r,await se(e,t,n,r))})(n,s,r),o()):await c;const a=new i(f.length+e.length-e.length%K);a.set(f,0),t.enqueue(re(n,e,a,f.length,0))},async flush(e){const{Y:t,Z:n,pending:r,ready:o}=this;if(n&&t){await o;let c=new i;if(r.length){const e=t.update(ae(Q,r));n.update(e),c=fe(Q,e)}s.signature=fe(Q,n.digest()).slice(0,L),e.enqueue(oe(c,s.signature))}}}),s=this}}function re(e,t,n,r,s,o){const{Y:c,Z:f,pending:a}=e,l=t.length-s;let u;for(a.length&&(t=oe(a,t),n=((e,t)=>{if(t&&t>e.length){const n=e;(e=new i(t)).set(n,0)}return e})(n,l-l%K)),u=0;l-K>=u;u+=K){const e=ae(Q,ce(t,u,u+K));o&&f.update(e);const s=c.update(e);o||f.update(s),n.set(fe(Q,s),u+r)}return e.pending=ce(t,u),n}async function se(n,r,s,o){n.password=null;const c=await(async(e,t,n,r,s)=>{if(!$)return V.importKey(t);try{return await G.importKey("raw",t,n,!1,s)}catch(e){return $=!1,V.importKey(t)}})(0,s,O,0,W),f=await(async(e,t,n)=>{if(!ee)return V.B(t,e.salt,T.iterations,n);try{return await G.deriveBits(e,t,n)}catch(r){return ee=!1,V.B(t,e.salt,T.iterations,n)}})(t.assign({salt:o},T),c,8*(2*H[r]+2)),a=new i(f),l=ae(Q,ce(a,0,H[r])),u=ae(Q,ce(a,H[r],2*H[r])),w=ce(a,2*H[r]);return t.assign(n,{keys:{key:l,$:u,passwordVerification:w},Y:new Y(new X(l),e.from(F)),Z:new Z(u)}),w}function ie(e,t){return t===k?(e=>{if(typeof w==v){const t=new i((e=unescape(encodeURIComponent(e))).length);for(let n=0;n>>24]),i=~e.te.get(),e.keys=[n,s,i]}function ye(e){const t=2|e.keys[2];return me(r.imul(t,1^t)>>>8)}function me(e){return 255&e}function be(e){return 4294967295&e}const ge="deflate-raw";class ke extends p{constructor(e,{chunkSize:t,CompressionStream:n,CompressionStreamNative:r}){super({});const{compressed:s,encrypted:i,useCompressionStream:o,zipCrypto:c,signed:f,level:a}=e,u=this;let w,h,d=Se(super.readable);i&&!c||!f||(w=new A,d=xe(d,w)),s&&(d=Ce(d,o,{level:a,chunkSize:t},r,n)),i&&(c?d=xe(d,new ue(e)):(h=new ne(e),d=xe(d,h))),ze(u,d,(()=>{let e;i&&!c&&(e=h.signature),i&&!c||!f||(e=new l(w.value.buffer).getUint32(0)),u.signature=e}))}}class ve extends p{constructor(e,{chunkSize:t,DecompressionStream:n,DecompressionStreamNative:r}){super({});const{zipCrypto:i,encrypted:o,signed:c,signature:f,compressed:a,useCompressionStream:u}=e;let w,h,d=Se(super.readable);o&&(i?d=xe(d,new le(e)):(h=new te(e),d=xe(d,h))),a&&(d=Ce(d,u,{chunkSize:t},r,n)),o&&!i||!c||(w=new A,d=xe(d,w)),ze(this,d,(()=>{if((!o||i)&&c){const e=new l(w.value.buffer);if(f!=e.getUint32(0,!1))throw new s(E)}}))}}function Se(e){return xe(e,new p({transform(e,t){e&&e.length&&t.enqueue(e)}}))}function ze(e,n,r){n=xe(n,new p({flush:r})),t.defineProperty(e,"readable",{get:()=>n})}function Ce(e,t,n,r,s){try{e=xe(e,new(t&&r?r:s)(ge,n))}catch(r){if(!t)return e;try{e=xe(e,new s(ge,n))}catch(t){return e}}return e}function xe(e,t){return e.pipeThrough(t)}const Ae="data",_e="close";class Ie extends p{constructor(e,n){super({});const r=this,{codecType:s}=e;let i;s.startsWith("deflate")?i=ke:s.startsWith("inflate")&&(i=ve);let o=0,c=0;const f=new i(e,n),a=super.readable,l=new p({transform(e,t){e&&e.length&&(c+=e.length,t.enqueue(e))},flush(){t.assign(r,{inputSize:c})}}),u=new p({transform(e,t){e&&e.length&&(o+=e.length,t.enqueue(e))},flush(){const{signature:e}=f;t.assign(r,{signature:e,outputSize:o,inputSize:c})}});t.defineProperty(r,"readable",{get:()=>a.pipeThrough(l).pipeThrough(f).pipeThrough(u)})}}class Pe extends p{constructor(e){let t;super({transform:function n(r,s){if(t){const e=new i(t.length+r.length);e.set(t),e.set(r,t.length),r=e,t=null}r.length>e?(s.enqueue(r.slice(0,e)),n(r.slice(e),s)):t=r},flush(e){t&&t.length&&e.enqueue(t)}})}}const De=new a,Ve=new a;let Re,Be=0,Ee=!0;async function Me(e){try{const{options:t,scripts:r,config:s}=e;if(r&&r.length)try{Ee?importScripts.apply(k,r):await Ue(r)}catch(e){Ee=!1,await Ue(r)}self.initCodec&&self.initCodec(),s.CompressionStreamNative=self.CompressionStream,s.DecompressionStreamNative=self.DecompressionStream,self.Deflate&&(s.CompressionStream=new z(self.Deflate)),self.Inflate&&(s.DecompressionStream=new z(self.Inflate));const i={highWaterMark:1},o=e.readable||new y({async pull(e){const t=new u((e=>De.set(Be,e)));Ke({type:"pull",messageId:Be}),Be=(Be+1)%n.MAX_SAFE_INTEGER;const{value:r,done:s}=await t;e.enqueue(r),s&&e.close()}},i),c=e.writable||new m({async write(e){let t;const r=new u((e=>t=e));Ve.set(Be,t),Ke({type:Ae,value:e,messageId:Be}),Be=(Be+1)%n.MAX_SAFE_INTEGER,await r}},i),f=new Ie(t,s);Re=new AbortController;const{signal:a}=Re;await o.pipeThrough(f).pipeThrough(new Pe(s.chunkSize)).pipeTo(c,{signal:a,preventClose:!0,preventAbort:!0}),await c.getWriter().close();const{signature:l,inputSize:w,outputSize:h}=f;Ke({type:_e,result:{signature:l,inputSize:w,outputSize:h}})}catch(e){Ne(e)}}async function Ue(e){for(const t of e)await import(t)}function Ke(e){let{value:t}=e;if(t)if(t.length)try{t=new i(t),e.value=t.buffer,d(e,[e.value])}catch(t){d(e)}else d(e);else d(e)}function Ne(e=new s("Unknown error")){const{message:t,stack:n,code:r,name:i}=e;d({error:{message:t,stack:n,code:r,name:i}})}addEventListener("message",(({data:e})=>{const{type:t,messageId:n,value:r,done:s}=e;try{if("start"==t&&Me(e),t==Ae){const e=De.get(n);De.delete(n),e({value:new i(r),done:s})}if("ack"==t){const e=Ve.get(n);Ve.delete(n),e()}t==_e&&Re.abort()}catch(e){Ne(e)}}));const Oe=-2;function Te(t){return We(t.map((([t,n])=>new e(t).fill(n,0,t))))}function We(t){return t.reduce(((t,n)=>t.concat(e.isArray(n)?We(n):n)),[])}const je=[0,1,2,3].concat(...Te([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function He(){const e=this;function t(e,t){let n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1}e.ne=n=>{const s=e.re,i=e.ie.se,o=e.ie.oe;let c,f,a,l=-1;for(n.ce=0,n.fe=573,c=0;o>c;c++)0!==s[2*c]?(n.ae[++n.ce]=l=c,n.le[c]=0):s[2*c+1]=0;for(;2>n.ce;)a=n.ae[++n.ce]=2>l?++l:0,s[2*a]=1,n.le[a]=0,n.ue--,i&&(n.we-=i[2*a+1]);for(e.he=l,c=r.floor(n.ce/2);c>=1;c--)n.de(s,c);a=o;do{c=n.ae[1],n.ae[1]=n.ae[n.ce--],n.de(s,1),f=n.ae[1],n.ae[--n.fe]=c,n.ae[--n.fe]=f,s[2*a]=s[2*c]+s[2*f],n.le[a]=r.max(n.le[c],n.le[f])+1,s[2*c+1]=s[2*f+1]=a,n.ae[1]=a++,n.de(s,1)}while(n.ce>=2);n.ae[--n.fe]=n.ae[1],(t=>{const n=e.re,r=e.ie.se,s=e.ie.pe,i=e.ie.ye,o=e.ie.me;let c,f,a,l,u,w,h=0;for(l=0;15>=l;l++)t.be[l]=0;for(n[2*t.ae[t.fe]+1]=0,c=t.fe+1;573>c;c++)f=t.ae[c],l=n[2*n[2*f+1]+1]+1,l>o&&(l=o,h++),n[2*f+1]=l,f>e.he||(t.be[l]++,u=0,i>f||(u=s[f-i]),w=n[2*f],t.ue+=w*(l+u),r&&(t.we+=w*(r[2*f+1]+u)));if(0!==h){do{for(l=o-1;0===t.be[l];)l--;t.be[l]--,t.be[l+1]+=2,t.be[o]--,h-=2}while(h>0);for(l=o;0!==l;l--)for(f=t.be[l];0!==f;)a=t.ae[--c],a>e.he||(n[2*a+1]!=l&&(t.ue+=(l-n[2*a+1])*n[2*a],n[2*a+1]=l),f--)}})(n),((e,n,r)=>{const s=[];let i,o,c,f=0;for(i=1;15>=i;i++)s[i]=f=f+r[i-1]<<1;for(o=0;n>=o;o++)c=e[2*o+1],0!==c&&(e[2*o]=t(s[c]++,c))})(s,e.he,n.be)}}function Le(e,t,n,r,s){const i=this;i.se=e,i.pe=t,i.ye=n,i.oe=r,i.me=s}He.ge=[0,1,2,3,4,5,6,7].concat(...Te([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]])),He.ke=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0],He.ve=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576],He.Se=e=>256>e?je[e]:je[256+(e>>>7)],He.ze=[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],He.Ce=[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],He.xe=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],He.Ae=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];const Fe=Te([[144,8],[112,9],[24,7],[8,8]]);Le._e=We([12,140,76,204,44,172,108,236,28,156,92,220,60,188,124,252,2,130,66,194,34,162,98,226,18,146,82,210,50,178,114,242,10,138,74,202,42,170,106,234,26,154,90,218,58,186,122,250,6,134,70,198,38,166,102,230,22,150,86,214,54,182,118,246,14,142,78,206,46,174,110,238,30,158,94,222,62,190,126,254,1,129,65,193,33,161,97,225,17,145,81,209,49,177,113,241,9,137,73,201,41,169,105,233,25,153,89,217,57,185,121,249,5,133,69,197,37,165,101,229,21,149,85,213,53,181,117,245,13,141,77,205,45,173,109,237,29,157,93,221,61,189,125,253,19,275,147,403,83,339,211,467,51,307,179,435,115,371,243,499,11,267,139,395,75,331,203,459,43,299,171,427,107,363,235,491,27,283,155,411,91,347,219,475,59,315,187,443,123,379,251,507,7,263,135,391,71,327,199,455,39,295,167,423,103,359,231,487,23,279,151,407,87,343,215,471,55,311,183,439,119,375,247,503,15,271,143,399,79,335,207,463,47,303,175,431,111,367,239,495,31,287,159,415,95,351,223,479,63,319,191,447,127,383,255,511,0,64,32,96,16,80,48,112,8,72,40,104,24,88,56,120,4,68,36,100,20,84,52,116,3,131,67,195,35,163,99,227].map(((e,t)=>[e,Fe[t]])));const qe=Te([[30,5]]);function Ge(e,t,n,r,s){const i=this;i.Ie=e,i.Pe=t,i.De=n,i.Ve=r,i.Re=s}Le.Be=We([0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30,1,17,9,25,5,21,13,29,3,19,11,27,7,23].map(((e,t)=>[e,qe[t]]))),Le.Ee=new Le(Le._e,He.ze,257,286,15),Le.Me=new Le(Le.Be,He.Ce,0,30,15),Le.Ue=new Le(null,He.xe,0,19,7);const Je=[new Ge(0,0,0,0,0),new Ge(4,4,8,4,1),new Ge(4,5,16,8,1),new Ge(4,6,32,32,1),new Ge(4,4,16,16,2),new Ge(8,16,32,32,2),new Ge(8,16,128,128,2),new Ge(8,32,128,256,2),new Ge(32,128,258,1024,2),new Ge(32,258,258,4096,2)],Qe=["need dictionary","stream end","","","stream error","data error","","buffer error","",""],Xe=113,Ye=666,Ze=262;function $e(e,t,n,r){const s=e[2*t],i=e[2*n];return i>s||s==i&&r[t]<=r[n]}function et(){const e=this;let t,n,s,c,f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z,C,x,A,_,I,P,D,V,R,B,E,M,U;const K=new He,N=new He,O=new He;let T,W,j,H,L,F;function q(){let t;for(t=0;286>t;t++)E[2*t]=0;for(t=0;30>t;t++)M[2*t]=0;for(t=0;19>t;t++)U[2*t]=0;E[512]=1,e.ue=e.we=0,W=j=0}function G(e,t){let n,r=-1,s=e[1],i=0,o=7,c=4;0===s&&(o=138,c=3),e[2*(t+1)+1]=65535;for(let f=0;t>=f;f++)n=s,s=e[2*(f+1)+1],++ii?U[2*n]+=i:0!==n?(n!=r&&U[2*n]++,U[32]++):i>10?U[36]++:U[34]++,i=0,r=n,0===s?(o=138,c=3):n==s?(o=6,c=3):(o=7,c=4))}function J(t){e.Ke[e.pending++]=t}function Q(e){J(255&e),J(e>>>8&255)}function X(e,t){let n;const r=t;F>16-r?(n=e,L|=n<>>16-F,F+=r-16):(L|=e<=n;n++)if(r=i,i=e[2*(n+1)+1],++o>=c||r!=i){if(f>o)do{Y(r,U)}while(0!=--o);else 0!==r?(r!=s&&(Y(r,U),o--),Y(16,U),X(o-3,2)):o>10?(Y(18,U),X(o-11,7)):(Y(17,U),X(o-3,3));o=0,s=r,0===i?(c=138,f=3):r==i?(c=6,f=3):(c=7,f=4)}}function $(){16==F?(Q(L),L=0,F=0):8>F||(J(255&L),L>>>=8,F-=8)}function ee(t,n){let s,i,o;if(e.Ne[W]=t,e.Oe[W]=255&n,W++,0===t?E[2*n]++:(j++,t--,E[2*(He.ge[n]+256+1)]++,M[2*He.Se(t)]++),0==(8191&W)&&D>2){for(s=8*W,i=C-k,o=0;30>o;o++)s+=M[2*o]*(5+He.Ce[o]);if(s>>>=3,jc);Y(256,t),H=t[513]}function ne(){F>8?Q(L):F>0&&J(255&L),L=0,F=0}function re(t,n,r){X(0+(r?1:0),3),((t,n)=>{ne(),H=8,Q(n),Q(~n),e.Ke.set(u.subarray(t,t+n),e.pending),e.pending+=n})(t,n)}function se(n){((t,n,r)=>{let s,i,o=0;D>0?(K.ne(e),N.ne(e),o=(()=>{let t;for(G(E,K.he),G(M,N.he),O.ne(e),t=18;t>=3&&0===U[2*He.Ae[t]+1];t--);return e.ue+=14+3*(t+1),t})(),s=e.ue+3+7>>>3,i=e.we+3+7>>>3,i>s||(s=i)):s=i=n+5,n+4>s||-1==t?i==s?(X(2+(r?1:0),3),te(Le._e,Le.Be)):(X(4+(r?1:0),3),((e,t,n)=>{let r;for(X(e-257,5),X(t-1,5),X(n-4,4),r=0;n>r;r++)X(U[2*He.Ae[r]+1],3);Z(E,e-1),Z(M,t-1)})(K.he+1,N.he+1,o+1),te(E,M)):re(t,n,r),q(),r&&ne()})(0>k?-1:k,C-k,n),k=C,t.Te()}function ie(){let e,n,r,s;do{if(s=w-A-C,0===s&&0===C&&0===A)s=f;else if(-1==s)s--;else if(C>=f+f-Ze){u.set(u.subarray(f,f+f),0),x-=f,C-=f,k-=f,e=y,r=e;do{n=65535&d[--r],d[r]=f>n?0:n-f}while(0!=--e);e=f,r=e;do{n=65535&h[--r],h[r]=f>n?0:n-f}while(0!=--e);s+=f}if(0===t.We)return;e=t.je(u,C+A,s),A+=e,3>A||(p=255&u[C],p=(p<A&&0!==t.We)}function oe(e){let t,n,r=I,s=C,i=_;const o=C>f-Ze?C-(f-Ze):0;let c=B;const a=l,w=C+258;let d=u[s+i-1],p=u[s+i];R>_||(r>>=2),c>A&&(c=A);do{if(t=e,u[t+i]==p&&u[t+i-1]==d&&u[t]==u[s]&&u[++t]==u[s+1]){s+=2,t++;do{}while(u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&w>s);if(n=258-(w-s),s=w-258,n>i){if(x=e,i=n,n>=c)break;d=u[s+i-1],p=u[s+i]}}}while((e=65535&h[e&a])>o&&0!=--r);return i>A?A:i}e.le=[],e.be=[],e.ae=[],E=[],M=[],U=[],e.de=(t,n)=>{const r=e.ae,s=r[n];let i=n<<1;for(;i<=e.ce&&(i(W||(W=8),j||(j=8),G||(G=0),t.Le=null,-1==S&&(S=6),1>j||j>9||8!=W||9>x||x>15||0>S||S>9||0>G||G>2?Oe:(t.Fe=e,a=x,f=1<(t.qe=t.Ge=0,t.Le=null,e.pending=0,e.Je=0,n=Xe,c=0,K.re=E,K.ie=Le.Ee,N.re=M,N.ie=Le.Me,O.re=U,O.ie=Le.Ue,L=0,F=0,H=8,q(),(()=>{w=2*f,d[y-1]=0;for(let e=0;y-1>e;e++)d[e]=0;P=Je[D].Pe,R=Je[D].Ie,B=Je[D].De,I=Je[D].Ve,C=0,k=0,A=0,v=_=2,z=0,p=0})(),0))(t))),e.Qe=()=>42!=n&&n!=Xe&&n!=Ye?Oe:(e.Oe=null,e.Ne=null,e.Ke=null,d=null,h=null,u=null,e.Fe=null,n==Xe?-3:0),e.Xe=(e,t,n)=>{let r=0;return-1==t&&(t=6),0>t||t>9||0>n||n>2?Oe:(Je[D].Re!=Je[t].Re&&0!==e.qe&&(r=e.Ye(1)),D!=t&&(D=t,P=Je[D].Pe,R=Je[D].Ie,B=Je[D].De,I=Je[D].Ve),V=n,r)},e.Ze=(e,t,r)=>{let s,i=r,o=0;if(!t||42!=n)return Oe;if(3>i)return 0;for(i>f-Ze&&(i=f-Ze,o=r-i),u.set(t.subarray(o,o+i),0),C=i,k=i,p=255&u[0],p=(p<=s;s++)p=(p<{let o,w,m,I,R;if(i>4||0>i)return Oe;if(!r.$e||!r.et&&0!==r.We||n==Ye&&4!=i)return r.Le=Qe[4],Oe;if(0===r.tt)return r.Le=Qe[7],-5;var B;if(t=r,I=c,c=i,42==n&&(w=8+(a-8<<4)<<8,m=(D-1&255)>>1,m>3&&(m=3),w|=m<<6,0!==C&&(w|=32),w+=31-w%31,n=Xe,J((B=w)>>8&255),J(255&B)),0!==e.pending){if(t.Te(),0===t.tt)return c=-1,0}else if(0===t.We&&I>=i&&4!=i)return t.Le=Qe[7],-5;if(n==Ye&&0!==t.We)return r.Le=Qe[7],-5;if(0!==t.We||0!==A||0!=i&&n!=Ye){switch(R=-1,Je[D].Re){case 0:R=(e=>{let n,r=65535;for(r>s-5&&(r=s-5);;){if(1>=A){if(ie(),0===A&&0==e)return 0;if(0===A)break}if(C+=A,A=0,n=k+r,(0===C||C>=n)&&(A=C-n,C=n,se(!1),0===t.tt))return 0;if(C-k>=f-Ze&&(se(!1),0===t.tt))return 0}return se(4==e),0===t.tt?4==e?2:0:4==e?3:1})(i);break;case 1:R=(e=>{let n,r=0;for(;;){if(Ze>A){if(ie(),Ze>A&&0==e)return 0;if(0===A)break}if(3>A||(p=(p<f-Ze||2!=V&&(v=oe(r)),3>v)n=ee(0,255&u[C]),A--,C++;else if(n=ee(C-x,v-3),A-=v,v>P||3>A)C+=v,v=0,p=255&u[C],p=(p<{let n,r,s=0;for(;;){if(Ze>A){if(ie(),Ze>A&&0==e)return 0;if(0===A)break}if(3>A||(p=(p<_&&f-Ze>=(C-s&65535)&&(2!=V&&(v=oe(s)),5>=v&&(1==V||3==v&&C-x>4096)&&(v=2)),3>_||v>_)if(0!==z){if(n=ee(0,255&u[C-1]),n&&se(!1),C++,A--,0===t.tt)return 0}else z=1,C++,A--;else{r=C+A-3,n=ee(C-1-S,_-3),A-=_-1,_-=2;do{++C>r||(p=(p<1+H+10-F&&(X(2,3),Y(256,Le._e),$()),H=7;else if(re(0,0,!1),3==i)for(o=0;y>o;o++)d[o]=0;if(t.Te(),0===t.tt)return c=-1,0}}return 4!=i?0:1}}function tt(){const e=this;e.nt=0,e.rt=0,e.We=0,e.qe=0,e.tt=0,e.Ge=0}function nt(e){const t=new tt,n=(o=e&&e.chunkSize?e.chunkSize:65536)+5*(r.floor(o/16383)+1);var o;const c=new i(n);let f=e?e.level:-1;void 0===f&&(f=-1),t.He(f),t.$e=c,this.append=(e,r)=>{let o,f,a=0,l=0,u=0;const w=[];if(e.length){t.nt=0,t.et=e,t.We=e.length;do{if(t.rt=0,t.tt=n,o=t.Ye(0),0!=o)throw new s("deflating: "+t.Le);t.rt&&(t.rt==n?w.push(new i(c)):w.push(c.subarray(0,t.rt))),u+=t.rt,r&&t.nt>0&&t.nt!=a&&(r(t.nt),a=t.nt)}while(t.We>0||0===t.tt);return w.length>1?(f=new i(u),w.forEach((e=>{f.set(e,l),l+=e.length}))):f=w[0]?new i(w[0]):new i,f}},this.flush=()=>{let e,r,o=0,f=0;const a=[];do{if(t.rt=0,t.tt=n,e=t.Ye(4),1!=e&&0!=e)throw new s("deflating: "+t.Le);n-t.tt>0&&a.push(c.slice(0,t.rt)),f+=t.rt}while(t.We>0||0===t.tt);return t.Qe(),r=new i(f),a.forEach((e=>{r.set(e,o),o+=e.length})),r}}tt.prototype={He(e,t){const n=this;return n.Fe=new et,t||(t=15),n.Fe.He(n,e,t)},Ye(e){const t=this;return t.Fe?t.Fe.Ye(t,e):Oe},Qe(){const e=this;if(!e.Fe)return Oe;const t=e.Fe.Qe();return e.Fe=null,t},Xe(e,t){const n=this;return n.Fe?n.Fe.Xe(n,e,t):Oe},Ze(e,t){const n=this;return n.Fe?n.Fe.Ze(n,e,t):Oe},je(e,t,n){const r=this;let s=r.We;return s>n&&(s=n),0===s?0:(r.We-=s,e.set(r.et.subarray(r.nt,r.nt+s),t),r.nt+=s,r.qe+=s,s)},Te(){const e=this;let t=e.Fe.pending;t>e.tt&&(t=e.tt),0!==t&&(e.$e.set(e.Fe.Ke.subarray(e.Fe.Je,e.Fe.Je+t),e.rt),e.rt+=t,e.Fe.Je+=t,e.Ge+=t,e.tt-=t,e.Fe.pending-=t,0===e.Fe.pending&&(e.Fe.Je=0))}};const rt=-2,st=-3,it=-5,ot=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],ct=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],ft=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],at=[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,0,0],lt=[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,112,112],ut=[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],wt=[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];function ht(){let e,t,n,r,s,i;function o(e,t,o,c,f,a,l,u,w,h,d){let p,y,m,b,g,k,v,S,z,C,x,A,_,I,P;C=0,g=o;do{n[e[t+C]]++,C++,g--}while(0!==g);if(n[0]==o)return l[0]=-1,u[0]=0,0;for(S=u[0],k=1;15>=k&&0===n[k];k++);for(v=k,k>S&&(S=k),g=15;0!==g&&0===n[g];g--);for(m=g,S>g&&(S=g),u[0]=S,I=1<k;k++,I<<=1)if(0>(I-=n[k]))return st;if(0>(I-=n[g]))return st;for(n[g]+=I,i[1]=k=0,C=1,_=2;0!=--g;)i[_]=k+=n[C],_++,C++;g=0,C=0;do{0!==(k=e[t+C])&&(d[i[k]++]=g),C++}while(++g=v;v++)for(p=n[v];0!=p--;){for(;v>A+S;){if(b++,A+=S,P=m-A,P=P>S?S:P,(y=1<<(k=v-A))>p+1&&(y-=p+1,_=v,P>k))for(;++kn[++_];)y-=n[_];if(P=1<1440)return st;s[b]=x=h[0],h[0]+=P,0!==b?(i[b]=g,r[0]=k,r[1]=S,k=g>>>A-S,r[2]=x-s[b-1]-k,w.set(r,3*(s[b-1]+k))):l[0]=x}for(r[1]=v-A,o>C?d[C]d[C]?0:96,r[2]=d[C++]):(r[0]=a[d[C]-c]+16+64,r[2]=f[d[C++]-c]):r[0]=192,y=1<>>A;P>k;k+=y)w.set(r,3*(x+k));for(k=1<>>=1)g^=k;for(g^=k,z=(1<c;c++)t[c]=0;for(c=0;16>c;c++)n[c]=0;for(c=0;3>c;c++)r[c]=0;s.set(n.subarray(0,15),0),i.set(n.subarray(0,16),0)}this.st=(n,r,s,i,f)=>{let a;return c(19),e[0]=0,a=o(n,0,19,19,null,null,s,r,i,e,t),a==st?f.Le="oversubscribed dynamic bit lengths tree":a!=it&&0!==r[0]||(f.Le="incomplete dynamic bit lengths tree",a=st),a},this.it=(n,r,s,i,f,a,l,u,w)=>{let h;return c(288),e[0]=0,h=o(s,0,n,257,at,lt,a,i,u,e,t),0!=h||0===i[0]?(h==st?w.Le="oversubscribed literal/length tree":-4!=h&&(w.Le="incomplete literal/length tree",h=st),h):(c(288),h=o(s,n,r,0,ut,wt,l,f,u,e,t),0!=h||0===f[0]&&n>257?(h==st?w.Le="oversubscribed distance tree":h==it?(w.Le="incomplete distance tree",h=st):-4!=h&&(w.Le="empty distance tree with lengths",h=st),h):0)}}function dt(){const e=this;let t,n,r,s,i=0,o=0,c=0,f=0,a=0,l=0,u=0,w=0,h=0,d=0;function p(e,t,n,r,s,i,o,c){let f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z;d=c.nt,p=c.We,w=o.ot,h=o.ct,y=o.write,m=yh;)p--,w|=(255&c.ft(d++))<>=a[z+1],h-=a[z+1],0!=(16&u)){for(u&=15,k=a[z+2]+(w&ot[u]),w>>=u,h-=u;15>h;)p--,w|=(255&c.ft(d++))<>=a[z+1],h-=a[z+1],0!=(16&u)){for(u&=15;u>h;)p--,w|=(255&c.ft(d++))<>=u,h-=u,m-=k,v>y){S=y-v;do{S+=o.end}while(0>S);if(u=o.end-S,k>u){if(k-=u,y-S>0&&u>y-S)do{o.lt[y++]=o.lt[S++]}while(0!=--u);else o.lt.set(o.lt.subarray(S,S+u),y),y+=u,S+=u,u=0;S=0}}else S=y-v,y-S>0&&2>y-S?(o.lt[y++]=o.lt[S++],o.lt[y++]=o.lt[S++],k-=2):(o.lt.set(o.lt.subarray(S,S+2),y),y+=2,S+=2,k-=2);if(y-S>0&&k>y-S)do{o.lt[y++]=o.lt[S++]}while(0!=--k);else o.lt.set(o.lt.subarray(S,S+k),y),y+=k,S+=k,k=0;break}if(0!=(64&u))return c.Le="invalid distance code",k=c.We-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ot=w,o.ct=h,c.We=p,c.qe+=d-c.nt,c.nt=d,o.write=y,st;f+=a[z+2],f+=w&ot[u],z=3*(l+f),u=a[z]}break}if(0!=(64&u))return 0!=(32&u)?(k=c.We-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ot=w,o.ct=h,c.We=p,c.qe+=d-c.nt,c.nt=d,o.write=y,1):(c.Le="invalid literal/length code",k=c.We-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ot=w,o.ct=h,c.We=p,c.qe+=d-c.nt,c.nt=d,o.write=y,st);if(f+=a[z+2],f+=w&ot[u],z=3*(l+f),0===(u=a[z])){w>>=a[z+1],h-=a[z+1],o.lt[y++]=a[z+2],m--;break}}else w>>=a[z+1],h-=a[z+1],o.lt[y++]=a[z+2],m--}while(m>=258&&p>=10);return k=c.We-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ot=w,o.ct=h,c.We=p,c.qe+=d-c.nt,c.nt=d,o.write=y,0}e.init=(e,i,o,c,f,a)=>{t=0,u=e,w=i,r=o,h=c,s=f,d=a,n=null},e.ut=(e,y,m)=>{let b,g,k,v,S,z,C,x=0,A=0,_=0;for(_=y.nt,v=y.We,x=e.ot,A=e.ct,S=e.write,z=S=258&&v>=10&&(e.ot=x,e.ct=A,y.We=v,y.qe+=_-y.nt,y.nt=_,e.write=S,m=p(u,w,r,h,s,d,e,y),_=y.nt,v=y.We,x=e.ot,A=e.ct,S=e.write,z=SA;){if(0===v)return e.ot=x,e.ct=A,y.We=v,y.qe+=_-y.nt,y.nt=_,e.write=S,e.wt(y,m);m=0,v--,x|=(255&y.ft(_++))<>>=n[g+1],A-=n[g+1],k=n[g],0===k){f=n[g+2],t=6;break}if(0!=(16&k)){a=15&k,i=n[g+2],t=2;break}if(0==(64&k)){c=k,o=g/3+n[g+2];break}if(0!=(32&k)){t=7;break}return t=9,y.Le="invalid literal/length code",m=st,e.ot=x,e.ct=A,y.We=v,y.qe+=_-y.nt,y.nt=_,e.write=S,e.wt(y,m);case 2:for(b=a;b>A;){if(0===v)return e.ot=x,e.ct=A,y.We=v,y.qe+=_-y.nt,y.nt=_,e.write=S,e.wt(y,m);m=0,v--,x|=(255&y.ft(_++))<>=b,A-=b,c=w,n=s,o=d,t=3;case 3:for(b=c;b>A;){if(0===v)return e.ot=x,e.ct=A,y.We=v,y.qe+=_-y.nt,y.nt=_,e.write=S,e.wt(y,m);m=0,v--,x|=(255&y.ft(_++))<>=n[g+1],A-=n[g+1],k=n[g],0!=(16&k)){a=15&k,l=n[g+2],t=4;break}if(0==(64&k)){c=k,o=g/3+n[g+2];break}return t=9,y.Le="invalid distance code",m=st,e.ot=x,e.ct=A,y.We=v,y.qe+=_-y.nt,y.nt=_,e.write=S,e.wt(y,m);case 4:for(b=a;b>A;){if(0===v)return e.ot=x,e.ct=A,y.We=v,y.qe+=_-y.nt,y.nt=_,e.write=S,e.wt(y,m);m=0,v--,x|=(255&y.ft(_++))<>=b,A-=b,t=5;case 5:for(C=S-l;0>C;)C+=e.end;for(;0!==i;){if(0===z&&(S==e.end&&0!==e.read&&(S=0,z=S7&&(A-=8,v++,_--),e.write=S,m=e.wt(y,m),S=e.write,z=S{}}ht.dt=(e,t,n,r)=>(e[0]=9,t[0]=5,n[0]=ct,r[0]=ft,0);const pt=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function yt(e,t){const n=this;let r,s=0,o=0,c=0,a=0;const l=[0],u=[0],w=new dt;let h=0,d=new f(4320);const p=new ht;n.ct=0,n.ot=0,n.lt=new i(t),n.end=t,n.read=0,n.write=0,n.reset=(e,t)=>{t&&(t[0]=0),6==s&&w.ht(e),s=0,n.ct=0,n.ot=0,n.read=n.write=0},n.reset(e,null),n.wt=(e,t)=>{let r,s,i;return s=e.rt,i=n.read,r=(i>n.write?n.end:n.write)-i,r>e.tt&&(r=e.tt),0!==r&&t==it&&(t=0),e.tt-=r,e.Ge+=r,e.$e.set(n.lt.subarray(i,i+r),s),s+=r,i+=r,i==n.end&&(i=0,n.write==n.end&&(n.write=0),r=n.write-i,r>e.tt&&(r=e.tt),0!==r&&t==it&&(t=0),e.tt-=r,e.Ge+=r,e.$e.set(n.lt.subarray(i,i+r),s),s+=r,i+=r),e.rt=s,n.read=i,t},n.ut=(e,t)=>{let i,f,y,m,b,g,k,v;for(m=e.nt,b=e.We,f=n.ot,y=n.ct,g=n.write,k=gy;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<>>1){case 0:f>>>=3,y-=3,i=7&y,f>>>=i,y-=i,s=1;break;case 1:S=[],z=[],C=[[]],x=[[]],ht.dt(S,z,C,x),w.init(S[0],z[0],C[0],0,x[0],0),f>>>=3,y-=3,s=6;break;case 2:f>>>=3,y-=3,s=3;break;case 3:return f>>>=3,y-=3,s=9,e.Le="invalid block type",t=st,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t)}break;case 1:for(;32>y;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<>>16&65535)!=(65535&f))return s=9,e.Le="invalid stored block lengths",t=st,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);o=65535&f,f=y=0,s=0!==o?2:0!==h?7:0;break;case 2:if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);if(0===k&&(g==n.end&&0!==n.read&&(g=0,k=gb&&(i=b),i>k&&(i=k),n.lt.set(e.je(m,i),g),m+=i,b-=i,g+=i,k-=i,0!=(o-=i))break;s=0!==h?7:0;break;case 3:for(;14>y;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<29||(i>>5&31)>29)return s=9,e.Le="too many length or distance symbols",t=st,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);if(i=258+(31&i)+(i>>5&31),!r||r.lengthv;v++)r[v]=0;f>>>=14,y-=14,a=0,s=4;case 4:for(;4+(c>>>10)>a;){for(;3>y;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<>>=3,y-=3}for(;19>a;)r[pt[a++]]=0;if(l[0]=7,i=p.st(r,l,u,d,e),0!=i)return(t=i)==st&&(r=null,s=9),n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);a=0,s=5;case 5:for(;i=c,258+(31&i)+(i>>5&31)>a;){let o,w;for(i=l[0];i>y;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<w)f>>>=i,y-=i,r[a++]=w;else{for(v=18==w?7:w-14,o=18==w?11:3;i+v>y;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<>>=i,y-=i,o+=f&ot[v],f>>>=v,y-=v,v=a,i=c,v+o>258+(31&i)+(i>>5&31)||16==w&&1>v)return r=null,s=9,e.Le="invalid bit length repeat",t=st,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);w=16==w?r[v-1]:0;do{r[v++]=w}while(0!=--o);a=v}}if(u[0]=-1,A=[],_=[],I=[],P=[],A[0]=9,_[0]=6,i=c,i=p.it(257+(31&i),1+(i>>5&31),r,A,_,I,P,d,e),0!=i)return i==st&&(r=null,s=9),t=i,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);w.init(A[0],_[0],d,I[0],d,P[0]),s=6;case 6:if(n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,1!=(t=w.ut(n,e,t)))return n.wt(e,t);if(t=0,w.ht(e),m=e.nt,b=e.We,f=n.ot,y=n.ct,g=n.write,k=g{n.reset(e,null),n.lt=null,d=null},n.yt=(e,t,r)=>{n.lt.set(e.subarray(t,t+r),0),n.read=n.write=r},n.bt=()=>1==s?1:0}const mt=13,bt=[0,0,255,255];function gt(){const e=this;function t(e){return e&&e.gt?(e.qe=e.Ge=0,e.Le=null,e.gt.mode=7,e.gt.kt.reset(e,null),0):rt}e.mode=0,e.method=0,e.vt=[0],e.St=0,e.marker=0,e.zt=0,e.Ct=t=>(e.kt&&e.kt.ht(t),e.kt=null,0),e.xt=(n,r)=>(n.Le=null,e.kt=null,8>r||r>15?(e.Ct(n),rt):(e.zt=r,n.gt.kt=new yt(n,1<{let n,r;if(!e||!e.gt||!e.et)return rt;const s=e.gt;for(t=4==t?it:0,n=it;;)switch(s.mode){case 0:if(0===e.We)return n;if(n=t,e.We--,e.qe++,8!=(15&(s.method=e.ft(e.nt++)))){s.mode=mt,e.Le="unknown compression method",s.marker=5;break}if(8+(s.method>>4)>s.zt){s.mode=mt,e.Le="invalid win size",s.marker=5;break}s.mode=1;case 1:if(0===e.We)return n;if(n=t,e.We--,e.qe++,r=255&e.ft(e.nt++),((s.method<<8)+r)%31!=0){s.mode=mt,e.Le="incorrect header check",s.marker=5;break}if(0==(32&r)){s.mode=7;break}s.mode=2;case 2:if(0===e.We)return n;n=t,e.We--,e.qe++,s.St=(255&e.ft(e.nt++))<<24&4278190080,s.mode=3;case 3:if(0===e.We)return n;n=t,e.We--,e.qe++,s.St+=(255&e.ft(e.nt++))<<16&16711680,s.mode=4;case 4:if(0===e.We)return n;n=t,e.We--,e.qe++,s.St+=(255&e.ft(e.nt++))<<8&65280,s.mode=5;case 5:return 0===e.We?n:(n=t,e.We--,e.qe++,s.St+=255&e.ft(e.nt++),s.mode=6,2);case 6:return s.mode=mt,e.Le="need dictionary",s.marker=0,rt;case 7:if(n=s.kt.ut(e,n),n==st){s.mode=mt,s.marker=0;break}if(0==n&&(n=t),1!=n)return n;n=t,s.kt.reset(e,s.vt),s.mode=12;case 12:return e.We=0,1;case mt:return st;default:return rt}},e._t=(e,t,n)=>{let r=0,s=n;if(!e||!e.gt||6!=e.gt.mode)return rt;const i=e.gt;return s<1<{let n,r,s,i,o;if(!e||!e.gt)return rt;const c=e.gt;if(c.mode!=mt&&(c.mode=mt,c.marker=0),0===(n=e.We))return it;for(r=e.nt,s=c.marker;0!==n&&4>s;)e.ft(r)==bt[s]?s++:s=0!==e.ft(r)?0:4-s,r++,n--;return e.qe+=r-e.nt,e.nt=r,e.We=n,c.marker=s,4!=s?st:(i=e.qe,o=e.Ge,t(e),e.qe=i,e.Ge=o,c.mode=7,0)},e.Pt=e=>e&&e.gt&&e.gt.kt?e.gt.kt.bt():rt}function kt(){}function vt(e){const t=new kt,n=e&&e.chunkSize?r.floor(2*e.chunkSize):131072,o=new i(n);let c=!1;t.xt(),t.$e=o,this.append=(e,r)=>{const f=[];let a,l,u=0,w=0,h=0;if(0!==e.length){t.nt=0,t.et=e,t.We=e.length;do{if(t.rt=0,t.tt=n,0!==t.We||c||(t.nt=0,c=!0),a=t.At(0),c&&a===it){if(0!==t.We)throw new s("inflating: bad input")}else if(0!==a&&1!==a)throw new s("inflating: "+t.Le);if((c||1===a)&&t.We===e.length)throw new s("inflating: bad input");t.rt&&(t.rt===n?f.push(new i(o)):f.push(o.subarray(0,t.rt))),h+=t.rt,r&&t.nt>0&&t.nt!=u&&(r(t.nt),u=t.nt)}while(t.We>0||0===t.tt);return f.length>1?(l=new i(h),f.forEach((e=>{l.set(e,w),w+=e.length}))):l=f[0]?new i(f[0]):new i,l}},this.flush=()=>{t.Ct()}}kt.prototype={xt(e){const t=this;return t.gt=new gt,e||(e=15),t.gt.xt(t,e)},At(e){const t=this;return t.gt?t.gt.At(t,e):rt},Ct(){const e=this;if(!e.gt)return rt;const t=e.gt.Ct(e);return e.gt=null,t},It(){const e=this;return e.gt?e.gt.It(e):rt},_t(e,t){const n=this;return n.gt?n.gt._t(n,e,t):rt},ft(e){return this.et[e]},je(e,t){return this.et.subarray(e,e+t)}},self.initCodec=()=>{self.Deflate=nt,self.Inflate=vt};\n'],{type:"text/javascript"}));e({workerScripts:{inflate:[t],deflate:[t]}})})(Le),Le({Deflate:function(e){const t=new G,n=(r=e&&e.chunkSize?e.chunkSize:65536)+5*(a.floor(r/16383)+1);var r;const i=new w(n);let s=e?e.level:-1;void 0===s&&(s=-1),t.deflateInit(s),t.next_out=i,this.append=(e,r)=>{let s,a,o=0,l=0,c=0;const u=[];if(e.length){t.next_in_index=0,t.next_in=e,t.avail_in=e.length;do{if(t.next_out_index=0,t.avail_out=n,s=t.deflate(0),0!=s)throw new d("deflating: "+t.msg);t.next_out_index&&(t.next_out_index==n?u.push(new w(i)):u.push(i.subarray(0,t.next_out_index))),c+=t.next_out_index,r&&t.next_in_index>0&&t.next_in_index!=o&&(r(t.next_in_index),o=t.next_in_index)}while(t.avail_in>0||0===t.avail_out);return u.length>1?(a=new w(c),u.forEach((e=>{a.set(e,l),l+=e.length}))):a=u[0]?new w(u[0]):new w,a}},this.flush=()=>{let e,r,s=0,a=0;const o=[];do{if(t.next_out_index=0,t.avail_out=n,e=t.deflate(4),1!=e&&0!=e)throw new d("deflating: "+t.msg);n-t.avail_out>0&&o.push(i.slice(0,t.next_out_index)),a+=t.next_out_index}while(t.avail_in>0||0===t.avail_out);return t.deflateEnd(),r=new w(a),o.forEach((e=>{r.set(e,s),s+=e.length})),r}},Inflate:function(e){const t=new fe,n=e&&e.chunkSize?a.floor(2*e.chunkSize):131072,r=new w(n);let i=!1;t.inflateInit(),t.next_out=r,this.append=(e,s)=>{const a=[];let o,l,c=0,u=0,f=0;if(0!==e.length){t.next_in_index=0,t.next_in=e,t.avail_in=e.length;do{if(t.next_out_index=0,t.avail_out=n,0!==t.avail_in||i||(t.next_in_index=0,i=!0),o=t.inflate(0),i&&o===j){if(0!==t.avail_in)throw new d("inflating: bad input")}else if(0!==o&&1!==o)throw new d("inflating: "+t.msg);if((i||1===o)&&t.avail_in===e.length)throw new d("inflating: bad input");t.next_out_index&&(t.next_out_index===n?a.push(new w(r)):a.push(r.subarray(0,t.next_out_index))),f+=t.next_out_index,s&&t.next_in_index>0&&t.next_in_index!=c&&(s(t.next_in_index),c=t.next_in_index)}while(t.avail_in>0||0===t.avail_out);return a.length>1?(l=new w(f),a.forEach((e=>{l.set(e,u),u+=e.length}))):l=a[0]?new w(a[0]):new w,l}},this.flush=()=>{t.inflateEnd()}},baseURL:ii}),e.BlobReader=gn,e.BlobWriter=mn,e.Data64URIReader=class extends pn{constructor(e){super();let t=e.length;for(;"="==e.charAt(t-1);)t--;const r=e.indexOf(",")+1;n.assign(this,{dataURI:e,dataStart:r,size:a.floor(.75*(t-r))})}readUint8Array(e,t){const{dataStart:n,dataURI:r}=this,i=new w(t),s=4*a.floor(e/3),o=atob(r.substring(s+n,4*a.ceil((e+t)/3)+n)),l=e-3*a.floor(s/4);for(let e=l;l+t>e;e++)i[e-l]=o.charCodeAt(e);return i}},e.Data64URIWriter=class extends _n{constructor(e){super(),n.assign(this,{data:"data:"+(e||"")+";base64,",pending:[]})}writeUint8Array(e){const t=this;let n=0,i=t.pending;const s=t.pending.length;for(t.pending="",n=0;n<3*a.floor((s+e.length)/3)-s;n++)i+=r.fromCharCode(e[n]);for(;n2?t.data+=S(i):t.pending=i}getData(){return this.data+S(this.pending)}},e.ERR_BAD_FORMAT=or,e.ERR_CENTRAL_DIRECTORY_NOT_FOUND=fr,e.ERR_DUPLICATED_NAME=Ir,e.ERR_ENCRYPTED=hr,e.ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND=ur,e.ERR_EOCDR_NOT_FOUND=lr,e.ERR_EOCDR_ZIP64_NOT_FOUND=cr,e.ERR_EXTRAFIELD_ZIP64_NOT_FOUND=wr,e.ERR_HTTP_RANGE=ln,e.ERR_INVALID_COMMENT=Ur,e.ERR_INVALID_ENCRYPTION_STRENGTH=Pr,e.ERR_INVALID_ENTRY_COMMENT=qr,e.ERR_INVALID_ENTRY_NAME=Nr,e.ERR_INVALID_EXTRAFIELD_DATA=Mr,e.ERR_INVALID_EXTRAFIELD_TYPE=Hr,e.ERR_INVALID_PASSWORD=Ge,e.ERR_INVALID_SIGNATURE=Xe,e.ERR_INVALID_VERSION=Or,e.ERR_ITERATOR_COMPLETED_TOO_SOON=cn,e.ERR_LOCAL_FILE_HEADER_NOT_FOUND=dr,e.ERR_SPLIT_ZIP_FILE=gr,e.ERR_UNSUPPORTED_COMPRESSION=_r,e.ERR_UNSUPPORTED_ENCRYPTION=pr,e.ERR_UNSUPPORTED_FORMAT=Br,e.HttpRangeReader=class extends Fn{constructor(e,t={}){t.useRangeHeader=!0,super(e,t)}},e.HttpReader=Fn,e.Reader=pn,e.SplitDataReader=Tn,e.SplitDataWriter=Ln,e.SplitZipReader=On,e.SplitZipWriter=Pn,e.TextReader=class extends gn{constructor(e){super(new g([e],{type:"text/plain"}))}},e.TextWriter=class extends mn{constructor(e){super(e),n.assign(this,{encoding:e,utf8:!e||"utf-8"==e.toLowerCase()})}async getData(){const{encoding:e,utf8:t}=this,r=await super.getData();if(r.text&&t)return r.text();{const t=new FileReader;return new m(((i,s)=>{n.assign(t,{onload:({target:e})=>i(e.result),onerror:()=>s(t.error)}),t.readAsText(r,e)}))}}},e.Uint8ArrayReader=class extends pn{constructor(e){super(),n.assign(this,{array:e,size:e.length})}readUint8Array(e,t){return this.array.slice(e,e+t)}},e.Uint8ArrayWriter=class extends _n{init(e=0){n.assign(this,{offset:0,array:new w(e)}),super.init()}writeUint8Array(e){const t=this;if(t.offset+e.length>t.array.length){const n=t.array;t.array=new w(n.length+e.length),t.array.set(n)}t.array.set(e,t.offset),t.offset+=e.length}getData(){return this.array}},e.Writer=_n,e.ZipReader=kr,e.ZipReaderStream=class{constructor(e={}){const{readable:t,writable:n}=new v,r=new kr(t,e).getEntriesGenerator();this.readable=new z({async pull(e){const{done:t,value:n}=await r.next();if(t)return e.close();const i={...n,readable:(()=>{const{readable:e,writable:t}=new v;if(n.getData)return n.getData(t),e})()};delete i.getData,e.enqueue(i)}}),this.writable=n}},e.ZipWriter=Gr,e.ZipWriterStream=class{constructor(e={}){const{readable:t,writable:n}=new v;this.readable=t,this.zipWriter=new Gr(n,e)}transform(e){const{readable:t,writable:n}=new v({flush:()=>{this.zipWriter.close()}});return this.zipWriter.add(e,t),{readable:this.readable,writable:n}}writable(e){const{readable:t,writable:n}=new v;return this.zipWriter.add(e,t),n}close(e,t={}){return this.zipWriter.close(e,t)}},e.configure=Le,e.getMimeType=()=>"application/octet-stream",e.initReader=Un,e.initShimAsyncCodec=(e,t={},n)=>({Deflate:Ue(e.Deflate,t.deflate,n),Inflate:Ue(e.Inflate,t.inflate,n)}),e.initStream=In,e.initWriter=qn,e.readUint8Array=Nn,e.terminateWorkers=async()=>{await m.allSettled(tn.map((e=>(an(e),e.terminate()))))},n.defineProperty(e,"__esModule",{value:!0})})); +((e,t)=>{"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).zip={})})(this,(function(e){"use strict";const{Array:t,Object:n,String:r,Number:i,BigInt:s,Math:a,Date:o,Map:l,Set:c,Response:u,URL:f,Error:d,Uint8Array:w,Uint16Array:h,Uint32Array:p,DataView:_,Blob:g,Promise:m,TextEncoder:b,TextDecoder:y,document:x,crypto:k,btoa:S,TransformStream:v,ReadableStream:z,WritableStream:A,CompressionStream:C,DecompressionStream:D,navigator:E,Worker:W}="undefined"!=typeof globalThis?globalThis:this||self,R=-2;function F(e){return T(e.map((([e,n])=>new t(e).fill(n,0,e))))}function T(e){return e.reduce(((e,n)=>e.concat(t.isArray(n)?T(n):n)),[])}const L=[0,1,2,3].concat(...F([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function I(){const e=this;function t(e,t){let n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1}e.build_tree=n=>{const r=e.dyn_tree,i=e.stat_desc.static_tree,s=e.stat_desc.elems;let o,l,c,u=-1;for(n.heap_len=0,n.heap_max=573,o=0;s>o;o++)0!==r[2*o]?(n.heap[++n.heap_len]=u=o,n.depth[o]=0):r[2*o+1]=0;for(;2>n.heap_len;)c=n.heap[++n.heap_len]=2>u?++u:0,r[2*c]=1,n.depth[c]=0,n.opt_len--,i&&(n.static_len-=i[2*c+1]);for(e.max_code=u,o=a.floor(n.heap_len/2);o>=1;o--)n.pqdownheap(r,o);c=s;do{o=n.heap[1],n.heap[1]=n.heap[n.heap_len--],n.pqdownheap(r,1),l=n.heap[1],n.heap[--n.heap_max]=o,n.heap[--n.heap_max]=l,r[2*c]=r[2*o]+r[2*l],n.depth[c]=a.max(n.depth[o],n.depth[l])+1,r[2*o+1]=r[2*l+1]=c,n.heap[1]=c++,n.pqdownheap(r,1)}while(n.heap_len>=2);n.heap[--n.heap_max]=n.heap[1],(t=>{const n=e.dyn_tree,r=e.stat_desc.static_tree,i=e.stat_desc.extra_bits,s=e.stat_desc.extra_base,a=e.stat_desc.max_length;let o,l,c,u,f,d,w=0;for(u=0;15>=u;u++)t.bl_count[u]=0;for(n[2*t.heap[t.heap_max]+1]=0,o=t.heap_max+1;573>o;o++)l=t.heap[o],u=n[2*n[2*l+1]+1]+1,u>a&&(u=a,w++),n[2*l+1]=u,l>e.max_code||(t.bl_count[u]++,f=0,s>l||(f=i[l-s]),d=n[2*l],t.opt_len+=d*(u+f),r&&(t.static_len+=d*(r[2*l+1]+f)));if(0!==w){do{for(u=a-1;0===t.bl_count[u];)u--;t.bl_count[u]--,t.bl_count[u+1]+=2,t.bl_count[a]--,w-=2}while(w>0);for(u=a;0!==u;u--)for(l=t.bl_count[u];0!==l;)c=t.heap[--o],c>e.max_code||(n[2*c+1]!=u&&(t.opt_len+=(u-n[2*c+1])*n[2*c],n[2*c+1]=u),l--)}})(n),((e,n,r)=>{const i=[];let s,a,o,l=0;for(s=1;15>=s;s++)i[s]=l=l+r[s-1]<<1;for(a=0;n>=a;a++)o=e[2*a+1],0!==o&&(e[2*a]=t(i[o]++,o))})(r,e.max_code,n.bl_count)}}function U(e,t,n,r,i){const s=this;s.static_tree=e,s.extra_bits=t,s.extra_base=n,s.elems=r,s.max_length=i}I._length_code=[0,1,2,3,4,5,6,7].concat(...F([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]])),I.base_length=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0],I.base_dist=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576],I.d_code=e=>256>e?L[e]:L[256+(e>>>7)],I.extra_lbits=[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],I.extra_dbits=[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],I.extra_blbits=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],I.bl_order=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];const q=F([[144,8],[112,9],[24,7],[8,8]]);U.static_ltree=T([12,140,76,204,44,172,108,236,28,156,92,220,60,188,124,252,2,130,66,194,34,162,98,226,18,146,82,210,50,178,114,242,10,138,74,202,42,170,106,234,26,154,90,218,58,186,122,250,6,134,70,198,38,166,102,230,22,150,86,214,54,182,118,246,14,142,78,206,46,174,110,238,30,158,94,222,62,190,126,254,1,129,65,193,33,161,97,225,17,145,81,209,49,177,113,241,9,137,73,201,41,169,105,233,25,153,89,217,57,185,121,249,5,133,69,197,37,165,101,229,21,149,85,213,53,181,117,245,13,141,77,205,45,173,109,237,29,157,93,221,61,189,125,253,19,275,147,403,83,339,211,467,51,307,179,435,115,371,243,499,11,267,139,395,75,331,203,459,43,299,171,427,107,363,235,491,27,283,155,411,91,347,219,475,59,315,187,443,123,379,251,507,7,263,135,391,71,327,199,455,39,295,167,423,103,359,231,487,23,279,151,407,87,343,215,471,55,311,183,439,119,375,247,503,15,271,143,399,79,335,207,463,47,303,175,431,111,367,239,495,31,287,159,415,95,351,223,479,63,319,191,447,127,383,255,511,0,64,32,96,16,80,48,112,8,72,40,104,24,88,56,120,4,68,36,100,20,84,52,116,3,131,67,195,35,163,99,227].map(((e,t)=>[e,q[t]])));const N=F([[30,5]]);function O(e,t,n,r,i){const s=this;s.good_length=e,s.max_lazy=t,s.nice_length=n,s.max_chain=r,s.func=i}U.static_dtree=T([0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30,1,17,9,25,5,21,13,29,3,19,11,27,7,23].map(((e,t)=>[e,N[t]]))),U.static_l_desc=new U(U.static_ltree,I.extra_lbits,257,286,15),U.static_d_desc=new U(U.static_dtree,I.extra_dbits,0,30,15),U.static_bl_desc=new U(null,I.extra_blbits,0,19,7);const P=[new O(0,0,0,0,0),new O(4,4,8,4,1),new O(4,5,16,8,1),new O(4,6,32,32,1),new O(4,4,16,16,2),new O(8,16,32,32,2),new O(8,16,128,128,2),new O(8,32,128,256,2),new O(32,128,258,1024,2),new O(32,258,258,4096,2)],H=["need dictionary","stream end","","","stream error","data error","","buffer error","",""],M=113,B=666,V=262;function Z(e,t,n,r){const i=e[2*t],s=e[2*n];return s>i||i==s&&r[t]<=r[n]}function K(){const e=this;let t,n,r,i,s,o,l,c,u,f,d,p,_,g,m,b,y,x,k,S,v,z,A,C,D,E,W,F,T,L,q,N,O;const K=new I,G=new I,X=new I;let Y,j,J,Q,$,ee;function te(){let t;for(t=0;286>t;t++)q[2*t]=0;for(t=0;30>t;t++)N[2*t]=0;for(t=0;19>t;t++)O[2*t]=0;q[512]=1,e.opt_len=e.static_len=0,j=J=0}function ne(e,t){let n,r=-1,i=e[1],s=0,a=7,o=4;0===i&&(a=138,o=3),e[2*(t+1)+1]=65535;for(let l=0;t>=l;l++)n=i,i=e[2*(l+1)+1],++ss?O[2*n]+=s:0!==n?(n!=r&&O[2*n]++,O[32]++):s>10?O[36]++:O[34]++,s=0,r=n,0===i?(a=138,o=3):n==i?(a=6,o=3):(a=7,o=4))}function re(t){e.pending_buf[e.pending++]=t}function ie(e){re(255&e),re(e>>>8&255)}function se(e,t){let n;const r=t;ee>16-r?(n=e,$|=n<>>16-ee,ee+=r-16):($|=e<=n;n++)if(r=s,s=e[2*(n+1)+1],++a>=o||r!=s){if(l>a)do{ae(r,O)}while(0!=--a);else 0!==r?(r!=i&&(ae(r,O),a--),ae(16,O),se(a-3,2)):a>10?(ae(18,O),se(a-11,7)):(ae(17,O),se(a-3,3));a=0,i=r,0===s?(o=138,l=3):r==s?(o=6,l=3):(o=7,l=4)}}function le(){16==ee?(ie($),$=0,ee=0):8>ee||(re(255&$),$>>>=8,ee-=8)}function ce(t,n){let r,i,s;if(e.dist_buf[j]=t,e.lc_buf[j]=255&n,j++,0===t?q[2*n]++:(J++,t--,q[2*(I._length_code[n]+256+1)]++,N[2*I.d_code(t)]++),0==(8191&j)&&W>2){for(r=8*j,i=v-y,s=0;30>s;s++)r+=N[2*s]*(5+I.extra_dbits[s]);if(r>>>=3,Jo);ae(256,t),Q=t[513]}function fe(){ee>8?ie($):ee>0&&re(255&$),$=0,ee=0}function de(t,n,r){se(0+(r?1:0),3),((t,n)=>{fe(),Q=8,ie(n),ie(~n),e.pending_buf.set(c.subarray(t,t+n),e.pending),e.pending+=n})(t,n)}function we(n){((t,n,r)=>{let i,s,a=0;W>0?(K.build_tree(e),G.build_tree(e),a=(()=>{let t;for(ne(q,K.max_code),ne(N,G.max_code),X.build_tree(e),t=18;t>=3&&0===O[2*I.bl_order[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t})(),i=e.opt_len+3+7>>>3,s=e.static_len+3+7>>>3,s>i||(i=s)):i=s=n+5,n+4>i||-1==t?s==i?(se(2+(r?1:0),3),ue(U.static_ltree,U.static_dtree)):(se(4+(r?1:0),3),((e,t,n)=>{let r;for(se(e-257,5),se(t-1,5),se(n-4,4),r=0;n>r;r++)se(O[2*I.bl_order[r]+1],3);oe(q,e-1),oe(N,t-1)})(K.max_code+1,G.max_code+1,a+1),ue(q,N)):de(t,n,r),te(),r&&fe()})(0>y?-1:y,v-y,n),y=v,t.flush_pending()}function he(){let e,n,r,i;do{if(i=u-A-v,0===i&&0===v&&0===A)i=s;else if(-1==i)i--;else if(v>=s+s-V){c.set(c.subarray(s,s+s),0),z-=s,v-=s,y-=s,e=_,r=e;do{n=65535&d[--r],d[r]=s>n?0:n-s}while(0!=--e);e=s,r=e;do{n=65535&f[--r],f[r]=s>n?0:n-s}while(0!=--e);i+=s}if(0===t.avail_in)return;e=t.read_buf(c,v+A,i),A+=e,3>A||(p=255&c[v],p=(p<A&&0!==t.avail_in)}function pe(e){let t,n,r=D,i=v,a=C;const o=v>s-V?v-(s-V):0;let u=L;const d=l,w=v+258;let h=c[i+a-1],p=c[i+a];T>C||(r>>=2),u>A&&(u=A);do{if(t=e,c[t+a]==p&&c[t+a-1]==h&&c[t]==c[i]&&c[++t]==c[i+1]){i+=2,t++;do{}while(c[++i]==c[++t]&&c[++i]==c[++t]&&c[++i]==c[++t]&&c[++i]==c[++t]&&c[++i]==c[++t]&&c[++i]==c[++t]&&c[++i]==c[++t]&&c[++i]==c[++t]&&w>i);if(n=258-(w-i),i=w-258,n>a){if(z=e,a=n,n>=u)break;h=c[i+a-1],p=c[i+a]}}}while((e=65535&f[e&d])>o&&0!=--r);return a>A?A:a}e.depth=[],e.bl_count=[],e.heap=[],q=[],N=[],O=[],e.pqdownheap=(t,n)=>{const r=e.heap,i=r[n];let s=n<<1;for(;s<=e.heap_len&&(s(I||(I=8),H||(H=8),B||(B=0),t.msg=null,-1==k&&(k=6),1>H||H>9||8!=I||9>z||z>15||0>k||k>9||0>B||B>2?R:(t.dstate=e,o=z,s=1<(t.total_in=t.total_out=0,t.msg=null,e.pending=0,e.pending_out=0,n=M,i=0,K.dyn_tree=q,K.stat_desc=U.static_l_desc,G.dyn_tree=N,G.stat_desc=U.static_d_desc,X.dyn_tree=O,X.stat_desc=U.static_bl_desc,$=0,ee=0,Q=8,te(),(()=>{u=2*s,d[_-1]=0;for(let e=0;_-1>e;e++)d[e]=0;E=P[W].max_lazy,T=P[W].good_length,L=P[W].nice_length,D=P[W].max_chain,v=0,y=0,A=0,x=C=2,S=0,p=0})(),0))(t))),e.deflateEnd=()=>42!=n&&n!=M&&n!=B?R:(e.lc_buf=null,e.dist_buf=null,e.pending_buf=null,d=null,f=null,c=null,e.dstate=null,n==M?-3:0),e.deflateParams=(e,t,n)=>{let r=0;return-1==t&&(t=6),0>t||t>9||0>n||n>2?R:(P[W].func!=P[t].func&&0!==e.total_in&&(r=e.deflate(1)),W!=t&&(W=t,E=P[W].max_lazy,T=P[W].good_length,L=P[W].nice_length,D=P[W].max_chain),F=n,r)},e.deflateSetDictionary=(e,t,r)=>{let i,a=r,o=0;if(!t||42!=n)return R;if(3>a)return 0;for(a>s-V&&(a=s-V,o=r-a),c.set(t.subarray(o,o+a),0),v=a,y=a,p=255&c[0],p=(p<=i;i++)p=(p<{let w,h,g,D,T;if(u>4||0>u)return R;if(!a.next_out||!a.next_in&&0!==a.avail_in||n==B&&4!=u)return a.msg=H[4],R;if(0===a.avail_out)return a.msg=H[7],-5;var L;if(t=a,D=i,i=u,42==n&&(h=8+(o-8<<4)<<8,g=(W-1&255)>>1,g>3&&(g=3),h|=g<<6,0!==v&&(h|=32),h+=31-h%31,n=M,re((L=h)>>8&255),re(255&L)),0!==e.pending){if(t.flush_pending(),0===t.avail_out)return i=-1,0}else if(0===t.avail_in&&D>=u&&4!=u)return t.msg=H[7],-5;if(n==B&&0!==t.avail_in)return a.msg=H[7],-5;if(0!==t.avail_in||0!==A||0!=u&&n!=B){switch(T=-1,P[W].func){case 0:T=(e=>{let n,i=65535;for(i>r-5&&(i=r-5);;){if(1>=A){if(he(),0===A&&0==e)return 0;if(0===A)break}if(v+=A,A=0,n=y+i,(0===v||v>=n)&&(A=v-n,v=n,we(!1),0===t.avail_out))return 0;if(v-y>=s-V&&(we(!1),0===t.avail_out))return 0}return we(4==e),0===t.avail_out?4==e?2:0:4==e?3:1})(u);break;case 1:T=(e=>{let n,r=0;for(;;){if(V>A){if(he(),V>A&&0==e)return 0;if(0===A)break}if(3>A||(p=(p<s-V||2!=F&&(x=pe(r)),3>x)n=ce(0,255&c[v]),A--,v++;else if(n=ce(v-z,x-3),A-=x,x>E||3>A)v+=x,x=0,p=255&c[v],p=(p<{let n,r,i=0;for(;;){if(V>A){if(he(),V>A&&0==e)return 0;if(0===A)break}if(3>A||(p=(p<C&&s-V>=(v-i&65535)&&(2!=F&&(x=pe(i)),5>=x&&(1==F||3==x&&v-z>4096)&&(x=2)),3>C||x>C)if(0!==S){if(n=ce(0,255&c[v-1]),n&&we(!1),v++,A--,0===t.avail_out)return 0}else S=1,v++,A--;else{r=v+A-3,n=ce(v-1-k,C-3),A-=C-1,C-=2;do{++v>r||(p=(p<1+Q+10-ee&&(se(2,3),ae(256,U.static_ltree),le()),Q=7;else if(de(0,0,!1),3==u)for(w=0;_>w;w++)d[w]=0;if(t.flush_pending(),0===t.avail_out)return i=-1,0}}return 4!=u?0:1}}function G(){const e=this;e.next_in_index=0,e.next_out_index=0,e.avail_in=0,e.total_in=0,e.avail_out=0,e.total_out=0}G.prototype={deflateInit(e,t){const n=this;return n.dstate=new K,t||(t=15),n.dstate.deflateInit(n,e,t)},deflate(e){const t=this;return t.dstate?t.dstate.deflate(t,e):R},deflateEnd(){const e=this;if(!e.dstate)return R;const t=e.dstate.deflateEnd();return e.dstate=null,t},deflateParams(e,t){const n=this;return n.dstate?n.dstate.deflateParams(n,e,t):R},deflateSetDictionary(e,t){const n=this;return n.dstate?n.dstate.deflateSetDictionary(n,e,t):R},read_buf(e,t,n){const r=this;let i=r.avail_in;return i>n&&(i=n),0===i?0:(r.avail_in-=i,e.set(r.next_in.subarray(r.next_in_index,r.next_in_index+i),t),r.next_in_index+=i,r.total_in+=i,i)},flush_pending(){const e=this;let t=e.dstate.pending;t>e.avail_out&&(t=e.avail_out),0!==t&&(e.next_out.set(e.dstate.pending_buf.subarray(e.dstate.pending_out,e.dstate.pending_out+t),e.next_out_index),e.next_out_index+=t,e.dstate.pending_out+=t,e.total_out+=t,e.avail_out-=t,e.dstate.pending-=t,0===e.dstate.pending&&(e.dstate.pending_out=0))}};const X=-2,Y=-3,j=-5,J=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],Q=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],$=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],ee=[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,0,0],te=[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,112,112],ne=[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],re=[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];function ie(){let e,t,n,r,i,s;function a(e,t,a,o,l,c,u,f,d,w,h){let p,_,g,m,b,y,x,k,S,v,z,A,C,D,E;v=0,b=a;do{n[e[t+v]]++,v++,b--}while(0!==b);if(n[0]==a)return u[0]=-1,f[0]=0,0;for(k=f[0],y=1;15>=y&&0===n[y];y++);for(x=y,y>k&&(k=y),b=15;0!==b&&0===n[b];b--);for(g=b,k>b&&(k=b),f[0]=k,D=1<y;y++,D<<=1)if(0>(D-=n[y]))return Y;if(0>(D-=n[b]))return Y;for(n[b]+=D,s[1]=y=0,v=1,C=2;0!=--b;)s[C]=y+=n[v],C++,v++;b=0,v=0;do{0!==(y=e[t+v])&&(h[s[y]++]=b),v++}while(++b=x;x++)for(p=n[x];0!=p--;){for(;x>A+k;){if(m++,A+=k,E=g-A,E=E>k?k:E,(_=1<<(y=x-A))>p+1&&(_-=p+1,C=x,E>y))for(;++yn[++C];)_-=n[C];if(E=1<1440)return Y;i[m]=z=w[0],w[0]+=E,0!==m?(s[m]=b,r[0]=y,r[1]=k,y=b>>>A-k,r[2]=z-i[m-1]-y,d.set(r,3*(i[m-1]+y))):u[0]=z}for(r[1]=x-A,a>v?h[v]h[v]?0:96,r[2]=h[v++]):(r[0]=c[h[v]-o]+16+64,r[2]=l[h[v++]-o]):r[0]=192,_=1<>>A;E>y;y+=_)d.set(r,3*(z+y));for(y=1<>>=1)b^=y;for(b^=y,S=(1<o;o++)t[o]=0;for(o=0;16>o;o++)n[o]=0;for(o=0;3>o;o++)r[o]=0;i.set(n.subarray(0,15),0),s.set(n.subarray(0,16),0)}this.inflate_trees_bits=(n,r,i,s,l)=>{let c;return o(19),e[0]=0,c=a(n,0,19,19,null,null,i,r,s,e,t),c==Y?l.msg="oversubscribed dynamic bit lengths tree":c!=j&&0!==r[0]||(l.msg="incomplete dynamic bit lengths tree",c=Y),c},this.inflate_trees_dynamic=(n,r,i,s,l,c,u,f,d)=>{let w;return o(288),e[0]=0,w=a(i,0,n,257,ee,te,c,s,f,e,t),0!=w||0===s[0]?(w==Y?d.msg="oversubscribed literal/length tree":-4!=w&&(d.msg="incomplete literal/length tree",w=Y),w):(o(288),w=a(i,n,r,0,ne,re,u,l,f,e,t),0!=w||0===l[0]&&n>257?(w==Y?d.msg="oversubscribed distance tree":w==j?(d.msg="incomplete distance tree",w=Y):-4!=w&&(d.msg="empty distance tree with lengths",w=Y),w):0)}}function se(){const e=this;let t,n,r,i,s=0,a=0,o=0,l=0,c=0,u=0,f=0,d=0,w=0,h=0;function p(e,t,n,r,i,s,a,o){let l,c,u,f,d,w,h,p,_,g,m,b,y,x,k,S;h=o.next_in_index,p=o.avail_in,d=a.bitb,w=a.bitk,_=a.write,g=_w;)p--,d|=(255&o.read_byte(h++))<>=c[S+1],w-=c[S+1],0!=(16&f)){for(f&=15,y=c[S+2]+(d&J[f]),d>>=f,w-=f;15>w;)p--,d|=(255&o.read_byte(h++))<>=c[S+1],w-=c[S+1],0!=(16&f)){for(f&=15;f>w;)p--,d|=(255&o.read_byte(h++))<>=f,w-=f,g-=y,x>_){k=_-x;do{k+=a.end}while(0>k);if(f=a.end-k,y>f){if(y-=f,_-k>0&&f>_-k)do{a.win[_++]=a.win[k++]}while(0!=--f);else a.win.set(a.win.subarray(k,k+f),_),_+=f,k+=f,f=0;k=0}}else k=_-x,_-k>0&&2>_-k?(a.win[_++]=a.win[k++],a.win[_++]=a.win[k++],y-=2):(a.win.set(a.win.subarray(k,k+2),_),_+=2,k+=2,y-=2);if(_-k>0&&y>_-k)do{a.win[_++]=a.win[k++]}while(0!=--y);else a.win.set(a.win.subarray(k,k+y),_),_+=y,k+=y,y=0;break}if(0!=(64&f))return o.msg="invalid distance code",y=o.avail_in-p,y=y>w>>3?w>>3:y,p+=y,h-=y,w-=y<<3,a.bitb=d,a.bitk=w,o.avail_in=p,o.total_in+=h-o.next_in_index,o.next_in_index=h,a.write=_,Y;l+=c[S+2],l+=d&J[f],S=3*(u+l),f=c[S]}break}if(0!=(64&f))return 0!=(32&f)?(y=o.avail_in-p,y=y>w>>3?w>>3:y,p+=y,h-=y,w-=y<<3,a.bitb=d,a.bitk=w,o.avail_in=p,o.total_in+=h-o.next_in_index,o.next_in_index=h,a.write=_,1):(o.msg="invalid literal/length code",y=o.avail_in-p,y=y>w>>3?w>>3:y,p+=y,h-=y,w-=y<<3,a.bitb=d,a.bitk=w,o.avail_in=p,o.total_in+=h-o.next_in_index,o.next_in_index=h,a.write=_,Y);if(l+=c[S+2],l+=d&J[f],S=3*(u+l),0===(f=c[S])){d>>=c[S+1],w-=c[S+1],a.win[_++]=c[S+2],g--;break}}else d>>=c[S+1],w-=c[S+1],a.win[_++]=c[S+2],g--}while(g>=258&&p>=10);return y=o.avail_in-p,y=y>w>>3?w>>3:y,p+=y,h-=y,w-=y<<3,a.bitb=d,a.bitk=w,o.avail_in=p,o.total_in+=h-o.next_in_index,o.next_in_index=h,a.write=_,0}e.init=(e,s,a,o,l,c)=>{t=0,f=e,d=s,r=a,w=o,i=l,h=c,n=null},e.proc=(e,_,g)=>{let m,b,y,x,k,S,v,z=0,A=0,C=0;for(C=_.next_in_index,x=_.avail_in,z=e.bitb,A=e.bitk,k=e.write,S=k=258&&x>=10&&(e.bitb=z,e.bitk=A,_.avail_in=x,_.total_in+=C-_.next_in_index,_.next_in_index=C,e.write=k,g=p(f,d,r,w,i,h,e,_),C=_.next_in_index,x=_.avail_in,z=e.bitb,A=e.bitk,k=e.write,S=kA;){if(0===x)return e.bitb=z,e.bitk=A,_.avail_in=x,_.total_in+=C-_.next_in_index,_.next_in_index=C,e.write=k,e.inflate_flush(_,g);g=0,x--,z|=(255&_.read_byte(C++))<>>=n[b+1],A-=n[b+1],y=n[b],0===y){l=n[b+2],t=6;break}if(0!=(16&y)){c=15&y,s=n[b+2],t=2;break}if(0==(64&y)){o=y,a=b/3+n[b+2];break}if(0!=(32&y)){t=7;break}return t=9,_.msg="invalid literal/length code",g=Y,e.bitb=z,e.bitk=A,_.avail_in=x,_.total_in+=C-_.next_in_index,_.next_in_index=C,e.write=k,e.inflate_flush(_,g);case 2:for(m=c;m>A;){if(0===x)return e.bitb=z,e.bitk=A,_.avail_in=x,_.total_in+=C-_.next_in_index,_.next_in_index=C,e.write=k,e.inflate_flush(_,g);g=0,x--,z|=(255&_.read_byte(C++))<>=m,A-=m,o=d,n=i,a=h,t=3;case 3:for(m=o;m>A;){if(0===x)return e.bitb=z,e.bitk=A,_.avail_in=x,_.total_in+=C-_.next_in_index,_.next_in_index=C,e.write=k,e.inflate_flush(_,g);g=0,x--,z|=(255&_.read_byte(C++))<>=n[b+1],A-=n[b+1],y=n[b],0!=(16&y)){c=15&y,u=n[b+2],t=4;break}if(0==(64&y)){o=y,a=b/3+n[b+2];break}return t=9,_.msg="invalid distance code",g=Y,e.bitb=z,e.bitk=A,_.avail_in=x,_.total_in+=C-_.next_in_index,_.next_in_index=C,e.write=k,e.inflate_flush(_,g);case 4:for(m=c;m>A;){if(0===x)return e.bitb=z,e.bitk=A,_.avail_in=x,_.total_in+=C-_.next_in_index,_.next_in_index=C,e.write=k,e.inflate_flush(_,g);g=0,x--,z|=(255&_.read_byte(C++))<>=m,A-=m,t=5;case 5:for(v=k-u;0>v;)v+=e.end;for(;0!==s;){if(0===S&&(k==e.end&&0!==e.read&&(k=0,S=k7&&(A-=8,x++,C--),e.write=k,g=e.inflate_flush(_,g),k=e.write,S=k{}}ie.inflate_trees_fixed=(e,t,n,r)=>(e[0]=9,t[0]=5,n[0]=Q,r[0]=$,0);const ae=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function oe(e,t){const n=this;let r,i=0,s=0,a=0,o=0;const l=[0],c=[0],u=new se;let f=0,d=new Int32Array(4320);const h=new ie;n.bitk=0,n.bitb=0,n.win=new w(t),n.end=t,n.read=0,n.write=0,n.reset=(e,t)=>{t&&(t[0]=0),6==i&&u.free(e),i=0,n.bitk=0,n.bitb=0,n.read=n.write=0},n.reset(e,null),n.inflate_flush=(e,t)=>{let r,i,s;return i=e.next_out_index,s=n.read,r=(s>n.write?n.end:n.write)-s,r>e.avail_out&&(r=e.avail_out),0!==r&&t==j&&(t=0),e.avail_out-=r,e.total_out+=r,e.next_out.set(n.win.subarray(s,s+r),i),i+=r,s+=r,s==n.end&&(s=0,n.write==n.end&&(n.write=0),r=n.write-s,r>e.avail_out&&(r=e.avail_out),0!==r&&t==j&&(t=0),e.avail_out-=r,e.total_out+=r,e.next_out.set(n.win.subarray(s,s+r),i),i+=r,s+=r),e.next_out_index=i,n.read=s,t},n.proc=(e,t)=>{let w,p,_,g,m,b,y,x;for(g=e.next_in_index,m=e.avail_in,p=n.bitb,_=n.bitk,b=n.write,y=b_;){if(0===m)return n.bitb=p,n.bitk=_,e.avail_in=m,e.total_in+=g-e.next_in_index,e.next_in_index=g,n.write=b,n.inflate_flush(e,t);t=0,m--,p|=(255&e.read_byte(g++))<<_,_+=8}switch(w=7&p,f=1&w,w>>>1){case 0:p>>>=3,_-=3,w=7&_,p>>>=w,_-=w,i=1;break;case 1:k=[],S=[],v=[[]],z=[[]],ie.inflate_trees_fixed(k,S,v,z),u.init(k[0],S[0],v[0],0,z[0],0),p>>>=3,_-=3,i=6;break;case 2:p>>>=3,_-=3,i=3;break;case 3:return p>>>=3,_-=3,i=9,e.msg="invalid block type",t=Y,n.bitb=p,n.bitk=_,e.avail_in=m,e.total_in+=g-e.next_in_index,e.next_in_index=g,n.write=b,n.inflate_flush(e,t)}break;case 1:for(;32>_;){if(0===m)return n.bitb=p,n.bitk=_,e.avail_in=m,e.total_in+=g-e.next_in_index,e.next_in_index=g,n.write=b,n.inflate_flush(e,t);t=0,m--,p|=(255&e.read_byte(g++))<<_,_+=8}if((~p>>>16&65535)!=(65535&p))return i=9,e.msg="invalid stored block lengths",t=Y,n.bitb=p,n.bitk=_,e.avail_in=m,e.total_in+=g-e.next_in_index,e.next_in_index=g,n.write=b,n.inflate_flush(e,t);s=65535&p,p=_=0,i=0!==s?2:0!==f?7:0;break;case 2:if(0===m)return n.bitb=p,n.bitk=_,e.avail_in=m,e.total_in+=g-e.next_in_index,e.next_in_index=g,n.write=b,n.inflate_flush(e,t);if(0===y&&(b==n.end&&0!==n.read&&(b=0,y=bm&&(w=m),w>y&&(w=y),n.win.set(e.read_buf(g,w),b),g+=w,m-=w,b+=w,y-=w,0!=(s-=w))break;i=0!==f?7:0;break;case 3:for(;14>_;){if(0===m)return n.bitb=p,n.bitk=_,e.avail_in=m,e.total_in+=g-e.next_in_index,e.next_in_index=g,n.write=b,n.inflate_flush(e,t);t=0,m--,p|=(255&e.read_byte(g++))<<_,_+=8}if(a=w=16383&p,(31&w)>29||(w>>5&31)>29)return i=9,e.msg="too many length or distance symbols",t=Y,n.bitb=p,n.bitk=_,e.avail_in=m,e.total_in+=g-e.next_in_index,e.next_in_index=g,n.write=b,n.inflate_flush(e,t);if(w=258+(31&w)+(w>>5&31),!r||r.lengthx;x++)r[x]=0;p>>>=14,_-=14,o=0,i=4;case 4:for(;4+(a>>>10)>o;){for(;3>_;){if(0===m)return n.bitb=p,n.bitk=_,e.avail_in=m,e.total_in+=g-e.next_in_index,e.next_in_index=g,n.write=b,n.inflate_flush(e,t);t=0,m--,p|=(255&e.read_byte(g++))<<_,_+=8}r[ae[o++]]=7&p,p>>>=3,_-=3}for(;19>o;)r[ae[o++]]=0;if(l[0]=7,w=h.inflate_trees_bits(r,l,c,d,e),0!=w)return(t=w)==Y&&(r=null,i=9),n.bitb=p,n.bitk=_,e.avail_in=m,e.total_in+=g-e.next_in_index,e.next_in_index=g,n.write=b,n.inflate_flush(e,t);o=0,i=5;case 5:for(;w=a,258+(31&w)+(w>>5&31)>o;){let s,u;for(w=l[0];w>_;){if(0===m)return n.bitb=p,n.bitk=_,e.avail_in=m,e.total_in+=g-e.next_in_index,e.next_in_index=g,n.write=b,n.inflate_flush(e,t);t=0,m--,p|=(255&e.read_byte(g++))<<_,_+=8}if(w=d[3*(c[0]+(p&J[w]))+1],u=d[3*(c[0]+(p&J[w]))+2],16>u)p>>>=w,_-=w,r[o++]=u;else{for(x=18==u?7:u-14,s=18==u?11:3;w+x>_;){if(0===m)return n.bitb=p,n.bitk=_,e.avail_in=m,e.total_in+=g-e.next_in_index,e.next_in_index=g,n.write=b,n.inflate_flush(e,t);t=0,m--,p|=(255&e.read_byte(g++))<<_,_+=8}if(p>>>=w,_-=w,s+=p&J[x],p>>>=x,_-=x,x=o,w=a,x+s>258+(31&w)+(w>>5&31)||16==u&&1>x)return r=null,i=9,e.msg="invalid bit length repeat",t=Y,n.bitb=p,n.bitk=_,e.avail_in=m,e.total_in+=g-e.next_in_index,e.next_in_index=g,n.write=b,n.inflate_flush(e,t);u=16==u?r[x-1]:0;do{r[x++]=u}while(0!=--s);o=x}}if(c[0]=-1,A=[],C=[],D=[],E=[],A[0]=9,C[0]=6,w=a,w=h.inflate_trees_dynamic(257+(31&w),1+(w>>5&31),r,A,C,D,E,d,e),0!=w)return w==Y&&(r=null,i=9),t=w,n.bitb=p,n.bitk=_,e.avail_in=m,e.total_in+=g-e.next_in_index,e.next_in_index=g,n.write=b,n.inflate_flush(e,t);u.init(A[0],C[0],d,D[0],d,E[0]),i=6;case 6:if(n.bitb=p,n.bitk=_,e.avail_in=m,e.total_in+=g-e.next_in_index,e.next_in_index=g,n.write=b,1!=(t=u.proc(n,e,t)))return n.inflate_flush(e,t);if(t=0,u.free(e),g=e.next_in_index,m=e.avail_in,p=n.bitb,_=n.bitk,b=n.write,y=b{n.reset(e,null),n.win=null,d=null},n.set_dictionary=(e,t,r)=>{n.win.set(e.subarray(t,t+r),0),n.read=n.write=r},n.sync_point=()=>1==i?1:0}const le=13,ce=[0,0,255,255];function ue(){const e=this;function t(e){return e&&e.istate?(e.total_in=e.total_out=0,e.msg=null,e.istate.mode=7,e.istate.blocks.reset(e,null),0):X}e.mode=0,e.method=0,e.was=[0],e.need=0,e.marker=0,e.wbits=0,e.inflateEnd=t=>(e.blocks&&e.blocks.free(t),e.blocks=null,0),e.inflateInit=(n,r)=>(n.msg=null,e.blocks=null,8>r||r>15?(e.inflateEnd(n),X):(e.wbits=r,n.istate.blocks=new oe(n,1<{let n,r;if(!e||!e.istate||!e.next_in)return X;const i=e.istate;for(t=4==t?j:0,n=j;;)switch(i.mode){case 0:if(0===e.avail_in)return n;if(n=t,e.avail_in--,e.total_in++,8!=(15&(i.method=e.read_byte(e.next_in_index++)))){i.mode=le,e.msg="unknown compression method",i.marker=5;break}if(8+(i.method>>4)>i.wbits){i.mode=le,e.msg="invalid win size",i.marker=5;break}i.mode=1;case 1:if(0===e.avail_in)return n;if(n=t,e.avail_in--,e.total_in++,r=255&e.read_byte(e.next_in_index++),((i.method<<8)+r)%31!=0){i.mode=le,e.msg="incorrect header check",i.marker=5;break}if(0==(32&r)){i.mode=7;break}i.mode=2;case 2:if(0===e.avail_in)return n;n=t,e.avail_in--,e.total_in++,i.need=(255&e.read_byte(e.next_in_index++))<<24&4278190080,i.mode=3;case 3:if(0===e.avail_in)return n;n=t,e.avail_in--,e.total_in++,i.need+=(255&e.read_byte(e.next_in_index++))<<16&16711680,i.mode=4;case 4:if(0===e.avail_in)return n;n=t,e.avail_in--,e.total_in++,i.need+=(255&e.read_byte(e.next_in_index++))<<8&65280,i.mode=5;case 5:return 0===e.avail_in?n:(n=t,e.avail_in--,e.total_in++,i.need+=255&e.read_byte(e.next_in_index++),i.mode=6,2);case 6:return i.mode=le,e.msg="need dictionary",i.marker=0,X;case 7:if(n=i.blocks.proc(e,n),n==Y){i.mode=le,i.marker=0;break}if(0==n&&(n=t),1!=n)return n;n=t,i.blocks.reset(e,i.was),i.mode=12;case 12:return e.avail_in=0,1;case le:return Y;default:return X}},e.inflateSetDictionary=(e,t,n)=>{let r=0,i=n;if(!e||!e.istate||6!=e.istate.mode)return X;const s=e.istate;return i<1<{let n,r,i,s,a;if(!e||!e.istate)return X;const o=e.istate;if(o.mode!=le&&(o.mode=le,o.marker=0),0===(n=e.avail_in))return j;for(r=e.next_in_index,i=o.marker;0!==n&&4>i;)e.read_byte(r)==ce[i]?i++:i=0!==e.read_byte(r)?0:4-i,r++,n--;return e.total_in+=r-e.next_in_index,e.next_in_index=r,e.avail_in=n,o.marker=i,4!=i?Y:(s=e.total_in,a=e.total_out,t(e),e.total_in=s,e.total_out=a,o.mode=7,0)},e.inflateSyncPoint=e=>e&&e.istate&&e.istate.blocks?e.istate.blocks.sync_point():X}function fe(){}fe.prototype={inflateInit(e){const t=this;return t.istate=new ue,e||(e=15),t.istate.inflateInit(t,e)},inflate(e){const t=this;return t.istate?t.istate.inflate(t,e):X},inflateEnd(){const e=this;if(!e.istate)return X;const t=e.istate.inflateEnd(e);return e.istate=null,t},inflateSync(){const e=this;return e.istate?e.istate.inflateSync(e):X},inflateSetDictionary(e,t){const n=this;return n.istate?n.istate.inflateSetDictionary(n,e,t):X},read_byte(e){return this.next_in[e]},read_buf(e,t){return this.next_in.subarray(e,e+t)}};const de=4294967295,we=65535,he=67324752,pe=134695760,_e=33639248,ge=101075792,me=117853008,be=22,ye=21589,xe=2048,ke="/",Se=new o(2107,11,31),ve=new o(1980,0,1),ze=void 0,Ae="undefined",Ce="function";class De{constructor(e){return class extends v{constructor(t,n){const r=new e(n);super({transform(e,t){t.enqueue(r.append(e))},flush(e){const t=r.flush();t&&e.enqueue(t)}})}}}}let Ee=2;try{typeof E!=Ae&&E.hardwareConcurrency&&(Ee=E.hardwareConcurrency)}catch(e){}const We={chunkSize:524288,maxWorkers:Ee,terminateWorkerTimeout:5e3,useWebWorkers:!0,useCompressionStream:!0,workerScripts:ze,CompressionStreamNative:typeof C!=Ae&&C,DecompressionStreamNative:typeof D!=Ae&&D},Re=n.assign({},We);function Fe(){return Re}function Te(e){return a.max(e.chunkSize,64)}function Le(e){const{baseURL:n,chunkSize:r,maxWorkers:i,terminateWorkerTimeout:s,useCompressionStream:a,useWebWorkers:o,Deflate:l,Inflate:c,CompressionStream:u,DecompressionStream:f,workerScripts:w}=e;if(Ie("baseURL",n),Ie("chunkSize",r),Ie("maxWorkers",i),Ie("terminateWorkerTimeout",s),Ie("useCompressionStream",a),Ie("useWebWorkers",o),l&&(Re.CompressionStream=new De(l)),c&&(Re.DecompressionStream=new De(c)),Ie("CompressionStream",u),Ie("DecompressionStream",f),w!==ze){const{deflate:e,inflate:n}=w;if((e||n)&&(Re.workerScripts||(Re.workerScripts={})),e){if(!t.isArray(e))throw new d("workerScripts.deflate must be an array");Re.workerScripts.deflate=e}if(n){if(!t.isArray(n))throw new d("workerScripts.inflate must be an array");Re.workerScripts.inflate=n}}}function Ie(e,t){t!==ze&&(Re[e]=t)}function Ue(e,t,r){return class{constructor(i){const s=this;var a,o;a=i,o="level",(typeof n.hasOwn===Ce?n.hasOwn(a,o):a.hasOwnProperty(o))&&i.level===ze&&delete i.level,s.codec=new e(n.assign({},t,i)),r(s.codec,(e=>{if(s.pendingData){const t=s.pendingData;s.pendingData=new w(t.length+e.length);const{pendingData:n}=s;n.set(t,0),n.set(e,t.length)}else s.pendingData=new w(e)}))}append(e){return this.codec.push(e),i(this)}flush(){return this.codec.push(new w,!0),i(this)}};function i(e){if(e.pendingData){const t=e.pendingData;return e.pendingData=null,t}return new w}}const qe=[];for(let e=0;256>e;e++){let t=e;for(let e=0;8>e;e++)1&t?t=t>>>1^3988292384:t>>>=1;qe[e]=t}class Ne{constructor(e){this.crc=e||-1}append(e){let t=0|this.crc;for(let n=0,r=0|e.length;r>n;n++)t=t>>>8^qe[255&(t^e[n])];this.crc=t}get(){return~this.crc}}class Oe extends v{constructor(){let e;const t=new Ne;super({transform(e,n){t.append(e),n.enqueue(e)},flush(){const n=new w(4);new _(n.buffer).setUint32(0,t.get()),e.value=n}}),e=this}}function Pe(e){if(typeof b==Ae){const t=new w((e=unescape(encodeURIComponent(e))).length);for(let n=0;n0&&t&&(e[n-1]=He.partial(t,e[n-1]&2147483648>>t-1,1)),e},partial:(e,t,n)=>32===e?t:(n?0|t:t<<32-e)+1099511627776*e,getPartial:e=>a.round(e/1099511627776)||32,_shiftRight(e,t,n,r){for(void 0===r&&(r=[]);t>=32;t-=32)r.push(n),n=0;if(0===t)return r.concat(e);for(let i=0;i>>t),n=e[i]<<32-t;const i=e.length?e[e.length-1]:0,s=He.getPartial(i);return r.push(He.partial(t+s&31,t+s>32?n:r.pop(),1)),r}},Me={bytes:{fromBits(e){const t=He.bitLength(e)/8,n=new w(t);let r;for(let i=0;t>i;i++)0==(3&i)&&(r=e[i/4]),n[i]=r>>>24,r<<=8;return n},toBits(e){const t=[];let n,r=0;for(n=0;n9007199254740991)throw new d("Cannot hash more than 2^53 - 1 bits");const s=new p(n);let a=0;for(let e=t.blockSize+r-(t.blockSize+r&t.blockSize-1);i>=e;e+=t.blockSize)t._block(s.subarray(16*a,16*(a+1))),a+=1;return n.splice(0,16*a),t}finalize(){const e=this;let t=e._buffer;const n=e._h;t=He.concat(t,[He.partial(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(a.floor(e._length/4294967296)),t.push(0|e._length);t.length;)e._block(t.splice(0,16));return e.reset(),n}_f(e,t,n,r){return e>19?e>39?e>59?e>79?void 0:t^n^r:t&n|t&r|n&r:t^n^r:t&n|~t&r}_S(e,t){return t<>>32-e}_block(e){const n=this,r=n._h,i=t(80);for(let t=0;16>t;t++)i[t]=e[t];let s=r[0],o=r[1],l=r[2],c=r[3],u=r[4];for(let e=0;79>=e;e++){16>e||(i[e]=n._S(1,i[e-3]^i[e-8]^i[e-14]^i[e-16]));const t=n._S(5,s)+n._f(e,o,l,c)+u+i[e]+n._key[a.floor(e/20)]|0;u=c,c=l,l=n._S(30,o),o=s,s=t}r[0]=r[0]+s|0,r[1]=r[1]+o|0,r[2]=r[2]+l|0,r[3]=r[3]+c|0,r[4]=r[4]+u|0}},Ve={getRandomValues(e){const t=new p(e.buffer),n=e=>{let t=987654321;const n=4294967295;return()=>(t=36969*(65535&t)+(t>>16)&n,(((t<<16)+(e=18e3*(65535&e)+(e>>16)&n)&n)/4294967296+.5)*(a.random()>.5?1:-1))};for(let r,i=0;inew Ze.hmacSha1(Me.bytes.toBits(e)),pbkdf2(e,t,n,r){if(n=n||1e4,0>r||0>n)throw new d("invalid params to pbkdf2");const i=1+(r>>5)<<2;let s,a,o,l,c;const u=new ArrayBuffer(i),f=new _(u);let w=0;const h=He;for(t=Me.bytes.toBits(t),c=1;(i||1)>w;c++){for(s=a=e.encrypt(h.concat(t,[c])),o=1;n>o;o++)for(a=e.encrypt(a),l=0;lw&&oi&&(e=(new n).update(e).finalize());for(let t=0;i>t;t++)r[0][t]=909522486^e[t],r[1][t]=1549556828^e[t];t._baseHash[0].update(r[0]),t._baseHash[1].update(r[1]),t._resultHash=new n(t._baseHash[0])}reset(){const e=this;e._resultHash=new e._hash(e._baseHash[0]),e._updated=!1}update(e){this._updated=!0,this._resultHash.update(e)}digest(){const e=this,t=e._resultHash.finalize(),n=new e._hash(e._baseHash[1]).update(t).finalize();return e.reset(),n}encrypt(e){if(this._updated)throw new d("encrypt on already updated hmac called!");return this.update(e),this.digest(e)}}},Ke=typeof k!=Ae&&typeof k.getRandomValues==Ce,Ge="Invalid password",Xe="Invalid signature",Ye="zipjs-abort-check-password";function je(e){return Ke?k.getRandomValues(e):Ve.getRandomValues(e)}const Je=16,Qe={name:"PBKDF2"},$e=n.assign({hash:{name:"HMAC"}},Qe),et=n.assign({iterations:1e3,hash:{name:"SHA-1"}},Qe),tt=["deriveBits"],nt=[8,12,16],rt=[16,24,32],it=10,st=[0,0,0,0],at=typeof k!=Ae,ot=at&&k.subtle,lt=at&&typeof ot!=Ae,ct=Me.bytes,ut=class{constructor(e){const t=this;t._tables=[[[],[],[],[],[]],[[],[],[],[],[]]],t._tables[0][0][0]||t._precompute();const n=t._tables[0][4],r=t._tables[1],i=e.length;let s,a,o,l=1;if(4!==i&&6!==i&&8!==i)throw new d("invalid aes key size");for(t._key=[a=e.slice(0),o=[]],s=i;4*i+28>s;s++){let e=a[s-1];(s%i==0||8===i&&s%i==4)&&(e=n[e>>>24]<<24^n[e>>16&255]<<16^n[e>>8&255]<<8^n[255&e],s%i==0&&(e=e<<8^e>>>24^l<<24,l=l<<1^283*(l>>7))),a[s]=a[s-i]^e}for(let e=0;s;e++,s--){const t=a[3&e?s:s-4];o[e]=4>=s||4>e?t:r[0][n[t>>>24]]^r[1][n[t>>16&255]]^r[2][n[t>>8&255]]^r[3][n[255&t]]}}encrypt(e){return this._crypt(e,0)}decrypt(e){return this._crypt(e,1)}_precompute(){const e=this._tables[0],t=this._tables[1],n=e[4],r=t[4],i=[],s=[];let a,o,l,c;for(let e=0;256>e;e++)s[(i[e]=e<<1^283*(e>>7))^e]=e;for(let u=a=0;!n[u];u^=o||1,a=s[a]||1){let s=a^a<<1^a<<2^a<<3^a<<4;s=s>>8^255&s^99,n[u]=s,r[s]=u,c=i[l=i[o=i[u]]];let f=16843009*c^65537*l^257*o^16843008*u,d=257*i[s]^16843008*s;for(let n=0;4>n;n++)e[n][u]=d=d<<24^d>>>8,t[n][s]=f=f<<24^f>>>8}for(let n=0;5>n;n++)e[n]=e[n].slice(0),t[n]=t[n].slice(0)}_crypt(e,t){if(4!==e.length)throw new d("invalid aes block size");const n=this._key[t],r=n.length/4-2,i=[0,0,0,0],s=this._tables[t],a=s[0],o=s[1],l=s[2],c=s[3],u=s[4];let f,w,h,p=e[0]^n[0],_=e[t?3:1]^n[1],g=e[2]^n[2],m=e[t?1:3]^n[3],b=4;for(let e=0;r>e;e++)f=a[p>>>24]^o[_>>16&255]^l[g>>8&255]^c[255&m]^n[b],w=a[_>>>24]^o[g>>16&255]^l[m>>8&255]^c[255&p]^n[b+1],h=a[g>>>24]^o[m>>16&255]^l[p>>8&255]^c[255&_]^n[b+2],m=a[m>>>24]^o[p>>16&255]^l[_>>8&255]^c[255&g]^n[b+3],b+=4,p=f,_=w,g=h;for(let e=0;4>e;e++)i[t?3&-e:e]=u[p>>>24]<<24^u[_>>16&255]<<16^u[g>>8&255]<<8^u[255&m]^n[b++],f=p,p=_,_=g,g=m,m=f;return i}},ft=class{constructor(e,t){this._prf=e,this._initIv=t,this._iv=t}reset(){this._iv=this._initIv}update(e){return this.calculate(this._prf,e,this._iv)}incWord(e){if(255==(e>>24&255)){let t=e>>16&255,n=e>>8&255,r=255&e;255===t?(t=0,255===n?(n=0,255===r?r=0:++r):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=r}else e+=1<<24;return e}incCounter(e){0===(e[0]=this.incWord(e[0]))&&(e[1]=this.incWord(e[1]))}calculate(e,t,n){let r;if(!(r=t.length))return[];const i=He.bitLength(t);for(let i=0;r>i;i+=4){this.incCounter(n);const r=e.encrypt(n);t[i]^=r[0],t[i+1]^=r[1],t[i+2]^=r[2],t[i+3]^=r[3]}return He.clamp(t,i)}},dt=Ze.hmacSha1;let wt=at&<&&typeof ot.importKey==Ce,ht=at&<&&typeof ot.deriveBits==Ce;class pt extends v{constructor({password:e,rawPassword:t,signed:r,encryptionStrength:i,checkPasswordOnly:s}){super({start(){n.assign(this,{ready:new m((e=>this.resolveReady=e)),password:bt(e,t),signed:r,strength:i-1,pending:new w})},async transform(e,t){const n=this,{password:r,strength:i,resolveReady:a,ready:o}=n;r?(await(async(e,t,n,r)=>{const i=await mt(e,t,n,xt(r,0,nt[t])),s=xt(r,nt[t]);if(i[0]!=s[0]||i[1]!=s[1])throw new d(Ge)})(n,i,r,xt(e,0,nt[i]+2)),e=xt(e,nt[i]+2),s?t.error(new d(Ye)):a()):await o;const l=new w(e.length-it-(e.length-it)%Je);t.enqueue(gt(n,e,l,0,it,!0))},async flush(e){const{signed:t,ctr:n,hmac:r,pending:i,ready:s}=this;if(r&&n){await s;const a=xt(i,0,i.length-it),o=xt(i,i.length-it);let l=new w;if(a.length){const e=St(ct,a);r.update(e);const t=n.update(e);l=kt(ct,t)}if(t){const e=xt(kt(ct,r.digest()),0,it);for(let t=0;it>t;t++)if(e[t]!=o[t])throw new d(Xe)}e.enqueue(l)}}})}}class _t extends v{constructor({password:e,rawPassword:t,encryptionStrength:r}){let i;super({start(){n.assign(this,{ready:new m((e=>this.resolveReady=e)),password:bt(e,t),strength:r-1,pending:new w})},async transform(e,t){const n=this,{password:r,strength:i,resolveReady:s,ready:a}=n;let o=new w;r?(o=await(async(e,t,n)=>{const r=je(new w(nt[t]));return yt(r,await mt(e,t,n,r))})(n,i,r),s()):await a;const l=new w(o.length+e.length-e.length%Je);l.set(o,0),t.enqueue(gt(n,e,l,o.length,0))},async flush(e){const{ctr:t,hmac:n,pending:r,ready:s}=this;if(n&&t){await s;let a=new w;if(r.length){const e=t.update(St(ct,r));n.update(e),a=kt(ct,e)}i.signature=kt(ct,n.digest()).slice(0,it),e.enqueue(yt(a,i.signature))}}}),i=this}}function gt(e,t,n,r,i,s){const{ctr:a,hmac:o,pending:l}=e,c=t.length-i;let u;for(l.length&&(t=yt(l,t),n=((e,t)=>{if(t&&t>e.length){const n=e;(e=new w(t)).set(n,0)}return e})(n,c-c%Je)),u=0;c-Je>=u;u+=Je){const e=St(ct,xt(t,u,u+Je));s&&o.update(e);const i=a.update(e);s||o.update(i),n.set(kt(ct,i),u+r)}return e.pending=xt(t,u),n}async function mt(e,r,i,s){e.password=null;const a=await(async(e,t,n,r,i)=>{if(!wt)return Ze.importKey(t);try{return await ot.importKey("raw",t,n,!1,i)}catch(e){return wt=!1,Ze.importKey(t)}})(0,i,$e,0,tt),o=await(async(e,t,n)=>{if(!ht)return Ze.pbkdf2(t,e.salt,et.iterations,n);try{return await ot.deriveBits(e,t,n)}catch(r){return ht=!1,Ze.pbkdf2(t,e.salt,et.iterations,n)}})(n.assign({salt:s},et),a,8*(2*rt[r]+2)),l=new w(o),c=St(ct,xt(l,0,rt[r])),u=St(ct,xt(l,rt[r],2*rt[r])),f=xt(l,2*rt[r]);return n.assign(e,{keys:{key:c,authentication:u,passwordVerification:f},ctr:new ft(new ut(c),t.from(st)),hmac:new dt(u)}),f}function bt(e,t){return t===ze?Pe(e):t}function yt(e,t){let n=e;return e.length+t.length&&(n=new w(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function xt(e,t,n){return e.subarray(t,n)}function kt(e,t){return e.fromBits(t)}function St(e,t){return e.toBits(t)}class vt extends v{constructor({password:e,passwordVerification:t,checkPasswordOnly:r}){super({start(){n.assign(this,{password:e,passwordVerification:t}),Dt(this,e)},transform(e,t){const n=this;if(n.password){const t=At(n,e.subarray(0,12));if(n.password=null,t[11]!=n.passwordVerification)throw new d(Ge);e=e.subarray(12)}r?t.error(new d(Ye)):t.enqueue(At(n,e))}})}}class zt extends v{constructor({password:e,passwordVerification:t}){super({start(){n.assign(this,{password:e,passwordVerification:t}),Dt(this,e)},transform(e,t){const n=this;let r,i;if(n.password){n.password=null;const t=je(new w(12));t[11]=n.passwordVerification,r=new w(e.length+t.length),r.set(Ct(n,t),0),i=12}else r=new w(e.length),i=0;r.set(Ct(n,e),i),t.enqueue(r)}})}}function At(e,t){const n=new w(t.length);for(let r=0;r>>24]),i=~e.crcKey2.get(),e.keys=[n,r,i]}function Wt(e){const t=2|e.keys[2];return Rt(a.imul(t,1^t)>>>8)}function Rt(e){return 255&e}function Ft(e){return 4294967295&e}const Tt="deflate-raw";class Lt extends v{constructor(e,{chunkSize:t,CompressionStream:n,CompressionStreamNative:r}){super({});const{compressed:i,encrypted:s,useCompressionStream:a,zipCrypto:o,signed:l,level:c}=e,u=this;let f,d,w=Ut(super.readable);s&&!o||!l||(f=new Oe,w=Ot(w,f)),i&&(w=Nt(w,a,{level:c,chunkSize:t},r,n)),s&&(o?w=Ot(w,new zt(e)):(d=new _t(e),w=Ot(w,d))),qt(u,w,(()=>{let e;s&&!o&&(e=d.signature),s&&!o||!l||(e=new _(f.value.buffer).getUint32(0)),u.signature=e}))}}class It extends v{constructor(e,{chunkSize:t,DecompressionStream:n,DecompressionStreamNative:r}){super({});const{zipCrypto:i,encrypted:s,signed:a,signature:o,compressed:l,useCompressionStream:c}=e;let u,f,w=Ut(super.readable);s&&(i?w=Ot(w,new vt(e)):(f=new pt(e),w=Ot(w,f))),l&&(w=Nt(w,c,{chunkSize:t},r,n)),s&&!i||!a||(u=new Oe,w=Ot(w,u)),qt(this,w,(()=>{if((!s||i)&&a){const e=new _(u.value.buffer);if(o!=e.getUint32(0,!1))throw new d(Xe)}}))}}function Ut(e){return Ot(e,new v({transform(e,t){e&&e.length&&t.enqueue(e)}}))}function qt(e,t,r){t=Ot(t,new v({flush:r})),n.defineProperty(e,"readable",{get:()=>t})}function Nt(e,t,n,r,i){try{e=Ot(e,new(t&&r?r:i)(Tt,n))}catch(r){if(!t)return e;try{e=Ot(e,new i(Tt,n))}catch(t){return e}}return e}function Ot(e,t){return e.pipeThrough(t)}const Pt="data",Ht="close",Mt="deflate",Bt="inflate";class Vt extends v{constructor(e,t){super({});const r=this,{codecType:i}=e;let s;i.startsWith(Mt)?s=Lt:i.startsWith(Bt)&&(s=It);let a=0,o=0;const l=new s(e,t),c=super.readable,u=new v({transform(e,t){e&&e.length&&(o+=e.length,t.enqueue(e))},flush(){n.assign(r,{inputSize:o})}}),f=new v({transform(e,t){e&&e.length&&(a+=e.length,t.enqueue(e))},flush(){const{signature:e}=l;n.assign(r,{signature:e,outputSize:a,inputSize:o})}});n.defineProperty(r,"readable",{get:()=>c.pipeThrough(u).pipeThrough(l).pipeThrough(f)})}}class Zt extends v{constructor(e){let t;super({transform:function n(r,i){if(t){const e=new w(t.length+r.length);e.set(t),e.set(r,t.length),r=e,t=null}r.length>e?(i.enqueue(r.slice(0,e)),n(r.slice(e),i)):t=r},flush(e){t&&t.length&&e.enqueue(t)}})}}let Kt=typeof W!=Ae;class Gt{constructor(e,{readable:t,writable:r},{options:i,config:s,streamOptions:a,useWebWorkers:o,transferStreams:l,scripts:c},u){const{signal:f}=a;return n.assign(e,{busy:!0,readable:t.pipeThrough(new Zt(s.chunkSize)).pipeThrough(new Xt(t,a),{signal:f}),writable:r,options:n.assign({},i),scripts:c,transferStreams:l,terminate:()=>new m((t=>{const{worker:n,busy:r}=e;n?(r?e.resolveTerminated=t:(n.terminate(),t()),e.interface=null):t()})),onTaskFinished(){const{resolveTerminated:t}=e;t&&(e.resolveTerminated=null,e.terminated=!0,e.worker.terminate(),t()),e.busy=!1,u(e)}}),(o&&Kt?Jt:jt)(e,s)}}class Xt extends v{constructor(e,{onstart:t,onprogress:n,size:r,onend:i}){let s=0;super({async start(){t&&await Yt(t,r)},async transform(e,t){s+=e.length,n&&await Yt(n,s,r),t.enqueue(e)},async flush(){e.size=s,i&&await Yt(i,s)}})}}async function Yt(e,...t){try{await e(...t)}catch(e){}}function jt(e,t){return{run:()=>(async({options:e,readable:t,writable:n,onTaskFinished:r},i)=>{try{const s=new Vt(e,i);await t.pipeThrough(s).pipeTo(n,{preventClose:!0,preventAbort:!0});const{signature:a,inputSize:o,outputSize:l}=s;return{signature:a,inputSize:o,outputSize:l}}finally{r()}})(e,t)}}function Jt(e,t){const{baseURL:r,chunkSize:i}=t;if(!e.interface){let s;try{s=((e,t,r)=>{const i={type:"module"};let s,a;typeof e==Ce&&(e=e());try{s=new f(e,t)}catch(t){s=e}if(Qt)try{a=new W(s)}catch(e){Qt=!1,a=new W(s,i)}else a=new W(s,i);return a.addEventListener("message",(e=>(async({data:e},t)=>{const{type:r,value:i,messageId:s,result:a,error:o}=e,{reader:l,writer:c,resolveResult:u,rejectResult:f,onTaskFinished:h}=t;try{if(o){const{message:e,stack:t,code:r,name:i}=o,s=new d(e);n.assign(s,{stack:t,code:r,name:i}),p(s)}else{if("pull"==r){const{value:e,done:n}=await l.read();en({type:Pt,value:e,done:n,messageId:s},t)}r==Pt&&(await c.ready,await c.write(new w(i)),en({type:"ack",messageId:s},t)),r==Ht&&p(null,a)}}catch(o){en({type:Ht,messageId:s},t),p(o)}function p(e,t){e?f(e):u(t),c&&c.releaseLock(),h()}})(e,r))),a})(e.scripts[0],r,e)}catch(n){return Kt=!1,jt(e,t)}n.assign(e,{worker:s,interface:{run:()=>(async(e,t)=>{let r,i;const s=new m(((e,t)=>{r=e,i=t}));n.assign(e,{reader:null,writer:null,resolveResult:r,rejectResult:i,result:s});const{readable:a,options:o,scripts:l}=e,{writable:c,closed:u}=(e=>{let t;const n=new m((e=>t=e));return{writable:new A({async write(t){const n=e.getWriter();await n.ready,await n.write(t),n.releaseLock()},close(){t()},abort:t=>e.getWriter().abort(t)}),closed:n}})(e.writable),f=en({type:"start",scripts:l.slice(1),options:o,config:t,readable:a,writable:c},e);f||n.assign(e,{reader:a.getReader(),writer:c.getWriter()});const d=await s;return f||await c.getWriter().close(),await u,d})(e,{chunkSize:i})}})}return e.interface}let Qt=!0,$t=!0;function en(e,{worker:t,writer:n,onTaskFinished:r,transferStreams:i}){try{let{value:n,readable:r,writable:s}=e;const a=[];if(n&&(n.byteLength{const n=tn.find((e=>!e.busy));if(n)return an(n),new Gt(n,e,t,p);if(tn.lengthnn.push({resolve:n,stream:e,workerOptions:t})))})()).run();function p(e){if(nn.length){const[{resolve:t,stream:n,workerOptions:r}]=nn.splice(0,1);t(new Gt(e,n,r,p))}else e.worker?(an(e),((e,t)=>{const{config:n}=t,{terminateWorkerTimeout:r}=n;i.isFinite(r)&&r>=0&&(e.terminated?e.terminated=!1:e.terminateTimeout=setTimeout((async()=>{tn=tn.filter((t=>t!=e));try{await e.terminate()}catch(e){}}),r))})(e,t)):tn=tn.filter((t=>t!=e))}}function an(e){const{terminateTimeout:t}=e;t&&(clearTimeout(t),e.terminateTimeout=null)}const on="HTTP error ",ln="HTTP Range not supported",cn="Writer iterator completed too soon",un="GET",fn="bytes",dn=65536,wn="writable";class hn{constructor(){this.size=0}init(){this.initialized=!0}}class pn extends hn{get readable(){const e=this,{chunkSize:t=dn}=e,n=new z({start(){this.chunkOffset=0},async pull(r){const{offset:i=0,size:s,diskNumberStart:o}=n,{chunkOffset:l}=this;r.enqueue(await Nn(e,i+l,a.min(t,s-l),o)),l+t>s?r.close():this.chunkOffset+=t}});return n}}class _n extends hn{constructor(){super();const e=this,t=new A({write:t=>e.writeUint8Array(t)});n.defineProperty(e,wn,{get:()=>t})}writeUint8Array(){}}class gn extends pn{constructor(e){super(),n.assign(this,{blob:e,size:e.size})}async readUint8Array(e,t){const n=this,r=e+t,i=e||rt&&(s=s.slice(e,r)),new w(s)}}class mn extends hn{constructor(e){super();const t=new v,r=[];e&&r.push(["Content-Type",e]),n.defineProperty(this,wn,{get:()=>t.writable}),this.blob=new u(t.readable,{headers:r}).blob()}getData(){return this.blob}}class bn extends pn{constructor(e,t){super(),xn(this,e,t)}async init(){await kn(this,Wn,An),super.init()}readUint8Array(e,t){return Sn(this,e,t,Wn,An)}}class yn extends pn{constructor(e,t){super(),xn(this,e,t)}async init(){await kn(this,Rn,Cn),super.init()}readUint8Array(e,t){return Sn(this,e,t,Rn,Cn)}}function xn(e,t,r){const{preventHeadRequest:i,useRangeHeader:s,forceRangeRequests:a,combineSizeEocd:o}=r;delete(r=n.assign({},r)).preventHeadRequest,delete r.useRangeHeader,delete r.forceRangeRequests,delete r.combineSizeEocd,delete r.useXHR,n.assign(e,{url:t,options:r,preventHeadRequest:i,useRangeHeader:s,forceRangeRequests:a,combineSizeEocd:o})}async function kn(e,t,n){const{url:r,preventHeadRequest:s,useRangeHeader:a,forceRangeRequests:o,combineSizeEocd:l}=e;if((e=>{const{baseURL:t}=Fe(),{protocol:n}=new f(e,t);return"http:"==n||"https:"==n})(r)&&(a||o)&&(void 0===s||s)){const r=await t(un,e,vn(e,l?-22:void 0));if(!o&&r.headers.get("Accept-Ranges")!=fn)throw new d(ln);{let s;l&&(e.eocdCache=new w(await r.arrayBuffer()));const a=r.headers.get("Content-Range");if(a){const e=a.trim().split(/\s*\/\s*/);if(e.length){const t=e[1];t&&"*"!=t&&(s=i(t))}}s===ze?await En(e,t,n):e.size=s}}else await En(e,t,n)}async function Sn(e,t,n,r,i){const{useRangeHeader:s,forceRangeRequests:a,eocdCache:o,size:l,options:c}=e;if(s||a){if(o&&t==l-be&&n==be)return o;const i=await r(un,e,vn(e,t,n));if(206!=i.status)throw new d(ln);return new w(await i.arrayBuffer())}{const{data:r}=e;return r||await i(e,c),new w(e.data.subarray(t,t+n))}}function vn(e,t=0,r=1){return n.assign({},zn(e),{Range:fn+"="+(0>t?t:t+"-"+(t+r-1))})}function zn({options:e}){const{headers:t}=e;if(t)return Symbol.iterator in t?n.fromEntries(t):t}async function An(e){await Dn(e,Wn)}async function Cn(e){await Dn(e,Rn)}async function Dn(e,t){const n=await t(un,e,zn(e));e.data=new w(await n.arrayBuffer()),e.size||(e.size=e.data.length)}async function En(e,t,n){if(e.preventHeadRequest)await n(e,e.options);else{const r=(await t("HEAD",e,zn(e))).headers.get("Content-Length");r?e.size=i(r):await n(e,e.options)}}async function Wn(e,{options:t,url:r},i){const s=await fetch(r,n.assign({},t,{method:e,headers:i}));if(400>s.status)return s;throw 416==s.status?new d(ln):new d(on+(s.statusText||s.status))}function Rn(e,{url:t},r){return new m(((i,s)=>{const a=new XMLHttpRequest;if(a.addEventListener("load",(()=>{if(400>a.status){const e=[];a.getAllResponseHeaders().trim().split(/[\r\n]+/).forEach((t=>{const n=t.trim().split(/\s*:\s*/);n[0]=n[0].trim().replace(/^[a-z]|-[a-z]/g,(e=>e.toUpperCase())),e.push(n)})),i({status:a.status,arrayBuffer:()=>a.response,headers:new l(e)})}else s(416==a.status?new d(ln):new d(on+(a.statusText||a.status)))}),!1),a.addEventListener("error",(e=>s(e.detail?e.detail.error:new d("Network error"))),!1),a.open(e,t),r)for(const e of n.entries(r))a.setRequestHeader(e[0],e[1]);a.responseType="arraybuffer",a.send()}))}class Fn extends pn{constructor(e,t={}){super(),n.assign(this,{url:e,reader:t.useXHR?new yn(e,t):new bn(e,t)})}set size(e){}get size(){return this.reader.size}async init(){await this.reader.init(),super.init()}readUint8Array(e,t){return this.reader.readUint8Array(e,t)}}class Tn extends pn{constructor(e){super(),this.readers=e}async init(){const e=this,{readers:t}=e;e.lastDiskNumber=0,e.lastDiskOffset=0,await m.all(t.map((async(n,r)=>{await n.init(),r!=t.length-1&&(e.lastDiskOffset+=n.size),e.size+=n.size}))),super.init()}async readUint8Array(e,t,n=0){const r=this,{readers:i}=this;let s,o=n;-1==o&&(o=i.length-1);let l=e;for(;l>=i[o].size;)l-=i[o].size,o++;const c=i[o],u=c.size;if(l+t>u){const i=u-l;s=new w(t),s.set(await Nn(c,l,i)),s.set(await r.readUint8Array(e+i,t-i,n),i)}else s=await Nn(c,l,t);return r.lastDiskNumber=a.max(o,r.lastDiskNumber),s}}class Ln extends hn{constructor(e,t=4294967295){super();const r=this;let i,s,a;n.assign(r,{diskNumber:0,diskOffset:0,size:0,maxSize:t,availableSize:t});const o=new A({async write(t){const{availableSize:n}=r;if(a)t.lengtho})}}async function In(e,t){if(!e.init||e.initialized)return m.resolve();await e.init(t)}function Un(e){return t.isArray(e)&&(e=new Tn(e)),e instanceof z&&(e={readable:e}),e}function qn(e){e.writable===ze&&typeof e.next==Ce&&(e=new Ln(e)),e instanceof A&&(e={writable:e});const{writable:t}=e;return t.size===ze&&(t.size=0),e instanceof Ln||n.assign(e,{diskNumber:0,diskOffset:0,availableSize:1/0,maxSize:1/0}),e}function Nn(e,t,n,r){return e.readUint8Array(t,n,r)}const On=Tn,Pn=Ln,Hn="\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ ".split("");function Mn(e,t){return t&&"cp437"==t.trim().toLowerCase()?(e=>{{let t="";for(let n=0;nthis[t]=e[t]))}}const or="File format is not recognized",lr="End of central directory not found",cr="End of Zip64 central directory not found",ur="End of Zip64 central directory locator not found",fr="Central directory header not found",dr="Local file header not found",wr="Zip64 extra field not found",hr="File contains encrypted entry",pr="Encryption method not supported",_r="Compression method not supported",gr="Split zip file",mr="utf-8",br="cp437",yr=[[Gn,de],[Xn,de],[Yn,de],[jn,we]],xr={[we]:{getValue:Fr,bytes:4},[de]:{getValue:Tr,bytes:8}};class kr{constructor(e,t={}){n.assign(this,{reader:Un(e),options:t,config:Fe()})}async*getEntriesGenerator(e={}){const t=this;let{reader:r}=t;const{config:i}=t;if(await In(r),r.size!==ze&&r.readUint8Array||(r=new gn(await new u(r.readable).blob()),await In(r)),r.size{const r=new w(4);return Lr(r).setUint32(0,101010256,!0),await i(22)||await i(a.min(1048582,n));async function i(t){const i=n-t,s=await Nn(e,i,t);for(let e=s.length-22;e>=0;e--)if(s[e]==r[0]&&s[e+1]==r[1]&&s[e+2]==r[2]&&s[e+3]==r[3])return{offset:i+e,buffer:s.slice(e,e+22).buffer}}})(r,0,r.size);if(!s)throw Fr(Lr(await Nn(r,0,4)))==pe?new d(gr):new d(lr);const o=Lr(s);let l=Fr(o,12),c=Fr(o,16);const f=s.offset,h=Rr(o,20),p=f+be+h;let _=Rr(o,4);const g=r.lastDiskNumber||0;let b=Rr(o,6),y=Rr(o,8),x=0,k=0;if(c==de||l==de||y==we||b==we){const e=Lr(await Nn(r,s.offset-20,20));if(Fr(e,0)!=me)throw new d(cr);c=Tr(e,8);let t=await Nn(r,c,56,-1),n=Lr(t);const i=s.offset-20-56;if(Fr(n,0)!=ge&&c!=i){const e=c;c=i,x=c-e,t=await Nn(r,c,56,-1),n=Lr(t)}if(Fr(n,0)!=ge)throw new d(ur);_==we&&(_=Fr(n,16)),b==we&&(b=Fr(n,20)),y==we&&(y=Tr(n,32)),l==de&&(l=Tr(n,40)),c-=l}if(cc)throw new d(or);let S=0,v=await Nn(r,c,l,b),z=Lr(v);if(l){const e=s.offset-l;if(Fr(z,S)!=_e&&c!=e){const t=c;c=e,x+=c-t,v=await Nn(r,c,l,b),z=Lr(v)}}const A=s.offset-c-(r.lastDiskOffset||0);if(l==A||0>A||(l=A,v=await Nn(r,c,l,b),z=Lr(v)),0>c||c>=r.size)throw new d(or);const C=Cr(t,e,"filenameEncoding"),D=Cr(t,e,"commentEncoding");for(let s=0;y>s;s++){const o=new Sr(r,i,t.options);if(Fr(z,S)!=_e)throw new d(fr);vr(o,z,S+6);const l=!!o.bitFlag.languageEncodingFlag,c=S+46,u=c+o.filenameLength,f=u+o.extraFieldLength,w=Rr(z,S+4),h=0==(0&w),p=v.subarray(c,u),_=Rr(z,S+32),g=f+_,b=v.subarray(f,g),A=l,E=l,W=h&&16==(16&Wr(z,S+38)),R=Fr(z,S+42)+x;n.assign(o,{versionMadeBy:w,msDosCompatible:h,compressedSize:0,uncompressedSize:0,commentLength:_,directory:W,offset:R,diskNumberStart:Rr(z,S+34),internalFileAttribute:Rr(z,S+36),externalFileAttribute:Fr(z,S+38),rawFilename:p,filenameUTF8:A,commentUTF8:E,rawExtraField:v.subarray(u,f)});const F=Cr(t,e,"decodeText")||Mn,[T,L]=await m.all([F(p,A?mr:C||br),F(b,E?mr:D||br)]);n.assign(o,{rawComment:b,filename:T,comment:L,directory:W||T.endsWith(ke)}),k=a.max(R,k),await zr(o,o,z,S+6);const I=new ar(o);I.getData=(e,t)=>o.getData(e,I,t),S=g;const{onprogress:U}=e;if(U)try{await U(s+1,y,new ar(o))}catch(e){}yield I}const E=Cr(t,e,"extractPrependedData"),W=Cr(t,e,"extractAppendedData");return E&&(t.prependedData=k>0?await Nn(r,0,k):new w),t.comment=h?await Nn(r,f+be,h):new w,W&&(t.appendedData=p>>8&255:h>>>24&255),signature:h,compressed:0!=c,encrypted:k,useWebWorkers:Cr(i,r,"useWebWorkers"),useCompressionStream:Cr(i,r,"useCompressionStream"),transferStreams:Cr(i,r,"transferStreams"),checkPasswordOnly:E},config:u,streamOptions:{signal:D,size:z,onstart:R,onprogress:F,onend:T}};let I=0;try{({outputSize:I}=await sn({readable:C,writable:W},L))}catch(e){if(!E||e.message!=Ye)throw e}finally{const e=Cr(i,r,"preventClose");W.size+=I,e||W.locked||await W.getWriter().close()}return E?ze:e.getData?e.getData():W}}function vr(e,t,r){const i=e.rawBitFlag=Rr(t,r+2),s=1==(1&i),a=Fr(t,r+6);n.assign(e,{encrypted:s,version:Rr(t,r),bitFlag:{level:(6&i)>>1,dataDescriptor:8==(8&i),languageEncodingFlag:(i&xe)==xe},rawLastModDate:a,lastModDate:Dr(a),filenameLength:Rr(t,r+22),extraFieldLength:Rr(t,r+24)})}async function zr(e,t,r,i,s){const{rawExtraField:a}=t,c=t.extraField=new l,u=Lr(new w(a));let f=0;try{for(;f{t.zip64=!0;const n=Lr(e.data),r=yr.filter((([e,n])=>t[e]==n));for(let i=0,s=0;i{const i=Lr(e.data),s=Wr(i,4);n.assign(e,{vendorVersion:Wr(i,0),vendorId:Wr(i,2),strength:s,originalCompressionMethod:r,compressionMethod:Rr(i,5)}),t.compressionMethod=e.compressionMethod})(m,t,h),t.extraFieldAES=m):t.compressionMethod=h;const b=c.get(10);b&&(((e,t)=>{const r=Lr(e.data);let i,s=4;try{for(;s{const r=Lr(e.data),i=Wr(r,0),s=[],a=[];n?(1==(1&i)&&(s.push(Jn),a.push(Qn)),2==(2&i)&&(s.push($n),a.push("rawLastAccessDate")),4==(4&i)&&(s.push(er),a.push("rawCreationDate"))):5>e.data.length||(s.push(Jn),a.push(Qn));let l=1;s.forEach(((n,i)=>{if(e.data.length>=l+4){const s=Fr(r,l);t[n]=e[n]=new o(1e3*s);const c=a[i];e[c]=s}l+=4}))})(y,t,s),t.extraFieldExtendedTimestamp=y);const x=c.get(6534);x&&(t.extraFieldUSDZ=x)}async function Ar(e,t,r,i,s){const a=Lr(e.data),o=new Ne;o.append(s[r]);const l=Lr(new w(4));l.setUint32(0,o.get(),!0);const c=Fr(a,1);n.assign(e,{version:Wr(a,0),[t]:Mn(e.data.subarray(5)),valid:!s.bitFlag.languageEncodingFlag&&c==Fr(l,0)}),e.valid&&(i[t]=e[t],i[t+"UTF8"]=!0)}function Cr(e,t,n){return t[n]===ze?e.options[n]:t[n]}function Dr(e){const t=(4294901760&e)>>16,n=65535&e;try{return new o(1980+((65024&t)>>9),((480&t)>>5)-1,31&t,(63488&n)>>11,(2016&n)>>5,2*(31&n),0)}catch(e){}}function Er(e){return new o(i(e/s(1e4)-s(116444736e5)))}function Wr(e,t){return e.getUint8(t)}function Rr(e,t){return e.getUint16(t,!0)}function Fr(e,t){return e.getUint32(t,!0)}function Tr(e,t){return i(e.getBigUint64(t,!0))}function Lr(e){return new _(e.buffer)}const Ir="File already exists",Ur="Zip file comment exceeds 64KB",qr="File entry comment exceeds 64KB",Nr="File entry name exceeds 64KB",Or="Version exceeds 65535",Pr="The strength must equal 1, 2, or 3",Hr="Extra field type exceeds 65535",Mr="Extra field data exceeds 64KB",Br="Zip64 is not supported (make sure 'keepOrder' is set to 'true')",Vr=new w([7,0,2,0,65,69,3,0,0]);let Zr=0;const Kr=[];class Gr{constructor(e,t={}){const r=(e=qn(e)).availableSize!==ze&&e.availableSize>0&&e.availableSize!==1/0&&e.maxSize!==ze&&e.maxSize>0&&e.maxSize!==1/0;n.assign(this,{writer:e,addSplitZipSignature:r,options:t,config:Fe(),files:new l,filenames:new c,offset:e.writable.size,pendingEntriesSize:0,pendingAddFileCalls:new c,bufferedWrites:0})}async add(e="",r,i={}){const l=this,{pendingAddFileCalls:c,config:f}=l;let g;ZrKr.push(e)));try{if(e=e.trim(),l.filenames.has(e))throw new d(Ir);return l.filenames.add(e),g=(async(e,r,i,l)=>{r=r.trim(),l.directory&&!r.endsWith(ke)?r+=ke:l.directory=r.endsWith(ke);const c=jr(e,l,"encodeText",Pe),f=c(r);if(ri(f)>we)throw new d(Nr);const g=l.comment||"",b=c(g);if(ri(b)>we)throw new d(qr);const y=jr(e,l,"version",20);if(y>we)throw new d(Or);const x=jr(e,l,"versionMadeBy",20);if(x>we)throw new d(Or);const k=jr(e,l,Jn,new o),S=jr(e,l,$n),z=jr(e,l,er),A=jr(e,l,rr,!0),C=jr(e,l,tr,0),D=jr(e,l,nr,0),E=jr(e,l,"password"),W=jr(e,l,"rawPassword"),R=jr(e,l,"encryptionStrength",3),F=jr(e,l,"zipCrypto"),T=jr(e,l,"extendedTimestamp",!0),L=jr(e,l,"keepOrder",!0),I=jr(e,l,"level"),U=jr(e,l,"useWebWorkers"),q=jr(e,l,"bufferedWrite"),N=jr(e,l,"dataDescriptorSignature",!1),O=jr(e,l,"signal"),P=jr(e,l,"useCompressionStream");let H=jr(e,l,"dataDescriptor",!0),M=jr(e,l,ir);if(E!==ze&&R!==ze&&(1>R||R>3))throw new d(Pr);let B=new w;const{extraField:V}=l;if(V){let e=0,t=0;V.forEach((t=>e+=4+ri(t))),B=new w(e),V.forEach(((e,n)=>{if(n>we)throw new d(Hr);if(ri(e)>we)throw new d(Mr);ti(B,new h([n]),t),ti(B,new h([ri(e)]),t+2),ti(B,e,t+4),t+=4+ri(e)}))}let Z=0,K=0,G=0;const X=!0===M;i&&(i=Un(i),await In(i),i.size===ze?(H=!0,(M||M===ze)&&(M=!0,G=Z=de)):(G=i.size,Z=(e=>e+5*(a.floor(e/16383)+1))(G)));const{diskOffset:Y,diskNumber:j,maxSize:J}=e.writer,Q=X||G>=de,$=X||Z>=de,ee=X||e.offset+e.pendingEntriesSize-Y>=de,te=jr(e,l,"supportZip64SplitFile",!0)&&X||j+a.ceil(e.pendingEntriesSize/J)>=we;if(ee||Q||$||te){if(!1===M||!L)throw new d(Br);M=!0}M=M||!1;const ne=(e=>{const{rawFilename:t,lastModDate:n,lastAccessDate:r,creationDate:i,rawPassword:s,password:o,level:l,zip64:c,zipCrypto:u,dataDescriptor:f,directory:d,rawExtraField:h,encryptionStrength:_,extendedTimestamp:g}=e,m=0!==l&&!d,b=!!(o&&ri(o)||s&&ri(s));let y,x,k,S,v=e.version;if(b&&!u){y=new w(ri(Vr)+2);const e=ni(y);Qr(e,0,39169),ti(y,Vr,2),Jr(e,8,_)}else y=new w;if(g){k=new w(9+(r?4:0)+(i?4:0));const e=ni(k);Qr(e,0,ye),Qr(e,2,ri(k)-4),S=1+(r?2:0)+(i?4:0),Jr(e,4,S);let t=5;$r(e,t,a.floor(n.getTime()/1e3)),t+=4,r&&($r(e,t,a.floor(r.getTime()/1e3)),t+=4),i&&$r(e,t,a.floor(i.getTime()/1e3));try{x=new w(36);const e=ni(x),t=Yr(n);Qr(e,0,10),Qr(e,2,32),Qr(e,8,1),Qr(e,10,24),ei(e,12,t),ei(e,20,Yr(r)||t),ei(e,28,Yr(i)||t)}catch(e){x=new w}}else x=k=new w;let z=xe;f&&(z|=8);let A=0;m&&(A=8),c&&(v=v>45?v:45),b&&(z|=1,u||(v=v>51?v:51,A=99,m&&(y[9]=8)));const C=new w(26),D=ni(C);Qr(D,0,v),Qr(D,2,z),Qr(D,4,A);const E=new p(1),W=ni(E);let R;R=ve>n?ve:n>Se?Se:n,Qr(W,0,(R.getHours()<<6|R.getMinutes())<<5|R.getSeconds()/2),Qr(W,2,(R.getFullYear()-1980<<4|R.getMonth()+1)<<5|R.getDate());const F=E[0];$r(D,6,F),Qr(D,22,ri(t));const T=ri(y,k,x,h);Qr(D,24,T);const L=new w(30+ri(t)+T);return $r(ni(L),0,he),ti(L,C,4),ti(L,t,30),ti(L,y,30+ri(t)),ti(L,k,30+ri(t,y)),ti(L,x,30+ri(t,y,k)),ti(L,h,30+ri(t,y,k,x)),{localHeaderArray:L,headerArray:C,headerView:D,lastModDate:n,rawLastModDate:F,encrypted:b,compressed:m,version:v,compressionMethod:A,extraFieldExtendedTimestampFlag:S,rawExtraFieldExtendedTimestamp:k,rawExtraFieldNTFS:x,rawExtraFieldAES:y,extraFieldLength:T}})(l=n.assign({},l,{rawFilename:f,rawComment:b,version:y,versionMadeBy:x,lastModDate:k,lastAccessDate:S,creationDate:z,rawExtraField:B,zip64:M,zip64UncompressedSize:Q,zip64CompressedSize:$,zip64Offset:ee,zip64DiskNumberStart:te,password:E,rawPassword:W,level:P||e.config.CompressionStream!==ze?I:0,useWebWorkers:U,encryptionStrength:R,extendedTimestamp:T,zipCrypto:F,bufferedWrite:q,keepOrder:L,dataDescriptor:H,dataDescriptorSignature:N,signal:O,msDosCompatible:A,internalFileAttribute:C,externalFileAttribute:D,useCompressionStream:P})),re=(e=>{const{zip64:t,dataDescriptor:n,dataDescriptorSignature:r}=e;let i,s=new w,a=0;return n&&(s=new w(t?r?24:20:r?16:12),i=ni(s),r&&(a=4,$r(i,0,134695760))),{dataDescriptorArray:s,dataDescriptorView:i,dataDescriptorOffset:a}})(l),ie=ri(ne.localHeaderArray,re.dataDescriptorArray);let se;K=ie+Z,e.options.usdz&&(K+=K+64),e.pendingEntriesSize+=K;try{se=await(async(e,r,i,a,o)=>{const{files:l,writer:c}=e,{keepOrder:f,dataDescriptor:h,signal:p}=o,{headerInfo:g}=a,{usdz:b}=e.options,y=t.from(l.values()).pop();let x,k,S,z,A,C,D,E={};l.set(r,E);try{let t;f&&(t=y&&y.lock,E.lock=new m((e=>S=e))),!(o.bufferedWrite||e.writerLocked||e.bufferedWrites&&f)&&h||b?(C=c,await W()):(C=new v,D=new u(C.readable).blob(),C.writable.size=0,x=!0,e.bufferedWrites++,await In(c)),await In(C);const{writable:g}=c;let{diskOffset:F}=c;if(e.addSplitZipSignature){delete e.addSplitZipSignature;const t=new w(4);$r(ni(t),0,pe),await Xr(g,t),e.offset+=4}b&&((e,t)=>{const{headerInfo:n}=e;let{localHeaderArray:r,extraFieldLength:i}=n,s=ni(r),a=64-(t+ri(r))%64;4>a&&(a+=64);const o=new w(a),l=ni(o);Qr(l,0,6534),Qr(l,2,a-2);const c=r;n.localHeaderArray=r=new w(ri(c)+a),ti(r,c),ti(r,o,ri(c)),s=ni(r),Qr(s,28,i+a),e.metadataSize+=a})(a,e.offset-F),x||(await t,await R(g));const{diskNumber:T}=c;if(A=!0,E.diskNumberStart=T,E=await(async(e,t,{diskNumberStart:r,lock:i},a,o,l)=>{const{headerInfo:c,dataDescriptorInfo:u,metadataSize:f}=a,{localHeaderArray:d,headerArray:h,lastModDate:p,rawLastModDate:_,encrypted:g,compressed:m,version:b,compressionMethod:y,rawExtraFieldExtendedTimestamp:x,extraFieldExtendedTimestampFlag:k,rawExtraFieldNTFS:S,rawExtraFieldAES:v}=c,{dataDescriptorArray:z}=u,{rawFilename:A,lastAccessDate:C,creationDate:D,password:E,rawPassword:W,level:R,zip64:F,zip64UncompressedSize:T,zip64CompressedSize:L,zip64Offset:I,zip64DiskNumberStart:U,zipCrypto:q,dataDescriptor:N,directory:O,versionMadeBy:P,rawComment:H,rawExtraField:M,useWebWorkers:B,onstart:V,onprogress:Z,onend:K,signal:G,encryptionStrength:X,extendedTimestamp:Y,msDosCompatible:j,internalFileAttribute:J,externalFileAttribute:Q,useCompressionStream:$}=l,ee={lock:i,versionMadeBy:P,zip64:F,directory:!!O,filenameUTF8:!0,rawFilename:A,commentUTF8:!0,rawComment:H,rawExtraFieldExtendedTimestamp:x,rawExtraFieldNTFS:S,rawExtraFieldAES:v,rawExtraField:M,extendedTimestamp:Y,msDosCompatible:j,internalFileAttribute:J,externalFileAttribute:Q,diskNumberStart:r};let te,ne=0,re=0;const{writable:ie}=t;if(e){e.chunkSize=Te(o),await Xr(ie,d);const t=e.readable,n=t.size=e.size,r={options:{codecType:Mt,level:R,rawPassword:W,password:E,encryptionStrength:X,zipCrypto:g&&q,passwordVerification:g&&q&&_>>8&255,signed:!0,compressed:m,encrypted:g,useWebWorkers:B,useCompressionStream:$,transferStreams:!1},config:o,streamOptions:{signal:G,size:n,onstart:V,onprogress:Z,onend:K}},i=await sn({readable:t,writable:ie},r);re=i.inputSize,ne=i.outputSize,te=i.signature,ie.size+=re}else await Xr(ie,d);let se;if(F){let e=4;T&&(e+=8),L&&(e+=8),I&&(e+=8),U&&(e+=4),se=new w(e)}else se=new w;return((e,t)=>{const{signature:n,rawExtraFieldZip64:r,compressedSize:i,uncompressedSize:a,headerInfo:o,dataDescriptorInfo:l}=e,{headerView:c,encrypted:u}=o,{dataDescriptorView:f,dataDescriptorOffset:d}=l,{zip64:w,zip64UncompressedSize:h,zip64CompressedSize:p,zipCrypto:_,dataDescriptor:g}=t;if(u&&!_||n===ze||($r(c,10,n),g&&$r(f,d,n)),w){const e=ni(r);Qr(e,0,1),Qr(e,2,ri(r)-4);let t=4;h&&($r(c,18,de),ei(e,t,s(a)),t+=8),p&&($r(c,14,de),ei(e,t,s(i))),g&&(ei(f,d+4,s(i)),ei(f,d+12,s(a)))}else $r(c,14,i),$r(c,18,a),g&&($r(f,d+4,i),$r(f,d+8,a))})({signature:te,rawExtraFieldZip64:se,compressedSize:ne,uncompressedSize:re,headerInfo:c,dataDescriptorInfo:u},l),N&&await Xr(ie,z),n.assign(ee,{uncompressedSize:re,compressedSize:ne,lastModDate:p,rawLastModDate:_,creationDate:D,lastAccessDate:C,encrypted:g,size:f+ne,compressionMethod:y,version:b,headerArray:h,signature:te,rawExtraFieldZip64:se,extraFieldExtendedTimestampFlag:k,zip64UncompressedSize:T,zip64CompressedSize:L,zip64Offset:I,zip64DiskNumberStart:U}),ee})(i,C,E,a,e.config,o),A=!1,l.set(r,E),E.filename=r,x){await C.writable.getWriter().close();let e=await D;await t,await W(),z=!0,h||(e=await(async(e,t,n,{zipCrypto:r})=>{let i;i=await t.slice(0,26).arrayBuffer(),26!=i.byteLength&&(i=i.slice(0,26));const s=new _(i);return e.encrypted&&!r||$r(s,14,e.signature),e.zip64?($r(s,18,de),$r(s,22,de)):($r(s,18,e.compressedSize),$r(s,22,e.uncompressedSize)),await Xr(n,new w(i)),t.slice(i.byteLength)})(E,e,g,o)),await R(g),E.diskNumberStart=c.diskNumber,F=c.diskOffset,await e.stream().pipeTo(g,{preventClose:!0,preventAbort:!0,signal:p}),g.size+=e.size,z=!1}if(E.offset=e.offset-F,E.zip64)((e,t)=>{const{rawExtraFieldZip64:n,offset:r,diskNumberStart:i}=e,{zip64UncompressedSize:a,zip64CompressedSize:o,zip64Offset:l,zip64DiskNumberStart:c}=t,u=ni(n);let f=4;a&&(f+=8),o&&(f+=8),l&&(ei(u,f,s(r)),f+=8),c&&$r(u,f,i)})(E,o);else if(E.offset>=de)throw new d(Br);return e.offset+=E.size,E}catch(t){if(x&&z||!x&&A){if(e.hasCorruptedEntries=!0,t)try{t.corruptedEntry=!0}catch(e){}x?e.offset+=C.writable.size:e.offset=C.writable.size}throw l.delete(r),t}finally{x&&e.bufferedWrites--,S&&S(),k&&k()}async function W(){e.writerLocked=!0;const{lockWriter:t}=e;e.lockWriter=new m((t=>k=()=>{e.writerLocked=!1,t()})),await t}async function R(e){ri(g.localHeaderArray)>c.availableSize&&(c.availableSize=0,await Xr(e,new w))}})(e,r,i,{headerInfo:ne,dataDescriptorInfo:re,metadataSize:ie},l)}finally{e.pendingEntriesSize-=K}return n.assign(se,{name:r,comment:g,extraField:V}),new ar(se)})(l,e,r,i),c.add(g),await g}catch(t){throw l.filenames.delete(e),t}finally{c.delete(g);const e=Kr.shift();e?e():Zr--}}async close(e=new w,n={}){const{pendingAddFileCalls:r,writer:i}=this,{writable:o}=i;for(;r.size;)await m.allSettled(t.from(r));return await(async(e,n,r)=>{const{files:i,writer:o}=e,{diskOffset:l,writable:c}=o;let{diskNumber:u}=o,f=0,h=0,p=e.offset-l,_=i.size;for(const[,e]of i){const{rawFilename:t,rawExtraFieldZip64:n,rawExtraFieldAES:r,rawComment:i,rawExtraFieldNTFS:s,rawExtraField:o,extendedTimestamp:l,extraFieldExtendedTimestampFlag:c,lastModDate:u}=e;let f;if(l){f=new w(9);const e=ni(f);Qr(e,0,ye),Qr(e,2,5),Jr(e,4,c),$r(e,5,a.floor(u.getTime()/1e3))}else f=new w;e.rawExtraFieldCDExtendedTimestamp=f,h+=46+ri(t,i,n,r,s,f,o)}const g=new w(h),m=ni(g);await In(o);let b=0;for(const[e,n]of t.from(i.values()).entries()){const{offset:t,rawFilename:s,rawExtraFieldZip64:a,rawExtraFieldAES:l,rawExtraFieldCDExtendedTimestamp:u,rawExtraFieldNTFS:d,rawExtraField:w,rawComment:h,versionMadeBy:p,headerArray:_,directory:y,zip64:x,zip64UncompressedSize:k,zip64CompressedSize:S,zip64DiskNumberStart:v,zip64Offset:z,msDosCompatible:A,internalFileAttribute:C,externalFileAttribute:D,diskNumberStart:E,uncompressedSize:W,compressedSize:R}=n,F=ri(a,l,u,d,w);$r(m,f,_e),Qr(m,f+4,p);const T=ni(_);k||$r(T,18,W),S||$r(T,14,R),ti(g,_,f+6),Qr(m,f+30,F),Qr(m,f+32,ri(h)),Qr(m,f+34,x&&v?we:E),Qr(m,f+36,C),D?$r(m,f+38,D):y&&A&&Jr(m,f+38,16),$r(m,f+42,x&&z?de:t),ti(g,s,f+46),ti(g,a,f+46+ri(s)),ti(g,l,f+46+ri(s,a)),ti(g,u,f+46+ri(s,a,l)),ti(g,d,f+46+ri(s,a,l,u)),ti(g,w,f+46+ri(s,a,l,u,d)),ti(g,h,f+46+ri(s)+F);const L=46+ri(s,h)+F;if(f-b>o.availableSize&&(o.availableSize=0,await Xr(c,g.slice(b,f)),b=f),f+=L,r.onprogress)try{await r.onprogress(e+1,i.size,new ar(n))}catch(e){}}await Xr(c,b?g.slice(b):g);let y=o.diskNumber;const{availableSize:x}=o;be>x&&y++;let k=jr(e,r,"zip64");if(!(de>p&&de>h&&we>_&&we>y)){if(!1===k)throw new d(Br);k=!0}const S=new w(k?98:be),v=ni(S);f=0,k&&($r(v,0,ge),ei(v,4,s(44)),Qr(v,12,45),Qr(v,14,45),$r(v,16,y),$r(v,20,u),ei(v,24,s(_)),ei(v,32,s(_)),ei(v,40,s(h)),ei(v,48,s(p)),$r(v,56,me),ei(v,64,s(p)+s(h)),$r(v,72,y+1),jr(e,r,"supportZip64SplitFile",!0)&&(y=we,u=we),_=we,p=de,h=de,f+=76),$r(v,f,101010256),Qr(v,f+4,y),Qr(v,f+6,u),Qr(v,f+8,_),Qr(v,f+10,_),$r(v,f+12,h),$r(v,f+16,p);const z=ri(n);if(z){if(z>we)throw new d(Ur);Qr(v,f+20,z)}await Xr(c,S),z&&await Xr(c,n)})(this,e,n),jr(this,n,"preventClose")||await o.getWriter().close(),i.getData?i.getData():o}}async function Xr(e,t){const n=e.getWriter();try{await n.ready,e.size+=ri(t),await n.write(t)}finally{n.releaseLock()}}function Yr(e){if(e)return(s(e.getTime())+s(116444736e5))*s(1e4)}function jr(e,t,n,r){const i=t[n]===ze?e.options[n]:t[n];return i===ze?r:i}function Jr(e,t,n){e.setUint8(t,n)}function Qr(e,t,n){e.setUint16(t,n,!0)}function $r(e,t,n){e.setUint32(t,n,!0)}function ei(e,t,n){e.setBigUint64(t,n,!0)}function ti(e,t,n){e.set(t,n)}function ni(e){return new _(e.buffer)}function ri(...e){let t=0;return e.forEach((e=>e&&(t+=e.length))),t}let ii;try{ii=void 0===x&&"undefined"==typeof location?new(require("url").URL)("file:"+__filename).href:void 0===x?location.href:x.currentScript&&x.currentScript.src||new f("zip-full.min.js",x.baseURI).href}catch(e){}(e=>{const t=()=>f.createObjectURL(new g(['const{Array:e,Object:t,Number:n,Math:r,Error:s,Uint8Array:i,Uint16Array:o,Uint32Array:c,Int32Array:f,Map:a,DataView:l,Promise:u,TextEncoder:w,crypto:h,postMessage:d,TransformStream:p,ReadableStream:y,WritableStream:m,CompressionStream:b,DecompressionStream:g}=self,k=void 0,v="undefined",S="function";class z{constructor(e){return class extends p{constructor(t,n){const r=new e(n);super({transform(e,t){t.enqueue(r.append(e))},flush(e){const t=r.flush();t&&e.enqueue(t)}})}}}}const C=[];for(let e=0;256>e;e++){let t=e;for(let e=0;8>e;e++)1&t?t=t>>>1^3988292384:t>>>=1;C[e]=t}class x{constructor(e){this.t=e||-1}append(e){let t=0|this.t;for(let n=0,r=0|e.length;r>n;n++)t=t>>>8^C[255&(t^e[n])];this.t=t}get(){return~this.t}}class A extends p{constructor(){let e;const t=new x;super({transform(e,n){t.append(e),n.enqueue(e)},flush(){const n=new i(4);new l(n.buffer).setUint32(0,t.get()),e.value=n}}),e=this}}const _={concat(e,t){if(0===e.length||0===t.length)return e.concat(t);const n=e[e.length-1],r=_.i(n);return 32===r?e.concat(t):_.o(t,r,0|n,e.slice(0,e.length-1))},l(e){const t=e.length;if(0===t)return 0;const n=e[t-1];return 32*(t-1)+_.i(n)},u(e,t){if(32*e.length0&&t&&(e[n-1]=_.h(t,e[n-1]&2147483648>>t-1,1)),e},h:(e,t,n)=>32===e?t:(n?0|t:t<<32-e)+1099511627776*e,i:e=>r.round(e/1099511627776)||32,o(e,t,n,r){for(void 0===r&&(r=[]);t>=32;t-=32)r.push(n),n=0;if(0===t)return r.concat(e);for(let s=0;s>>t),n=e[s]<<32-t;const s=e.length?e[e.length-1]:0,i=_.i(s);return r.push(_.h(t+i&31,t+i>32?n:r.pop(),1)),r}},I={p:{m(e){const t=_.l(e)/8,n=new i(t);let r;for(let s=0;t>s;s++)0==(3&s)&&(r=e[s/4]),n[s]=r>>>24,r<<=8;return n},g(e){const t=[];let n,r=0;for(n=0;n9007199254740991)throw new s("Cannot hash more than 2^53 - 1 bits");const o=new c(n);let f=0;for(let e=t.blockSize+r-(t.blockSize+r&t.blockSize-1);i>=e;e+=t.blockSize)t.I(o.subarray(16*f,16*(f+1))),f+=1;return n.splice(0,16*f),t}P(){const e=this;let t=e.C;const n=e.S;t=_.concat(t,[_.h(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(r.floor(e.A/4294967296)),t.push(0|e.A);t.length;)e.I(t.splice(0,16));return e.reset(),n}D(e,t,n,r){return e>19?e>39?e>59?e>79?void 0:t^n^r:t&n|t&r|n&r:t^n^r:t&n|~t&r}V(e,t){return t<>>32-e}I(t){const n=this,s=n.S,i=e(80);for(let e=0;16>e;e++)i[e]=t[e];let o=s[0],c=s[1],f=s[2],a=s[3],l=s[4];for(let e=0;79>=e;e++){16>e||(i[e]=n.V(1,i[e-3]^i[e-8]^i[e-14]^i[e-16]));const t=n.V(5,o)+n.D(e,c,f,a)+l+i[e]+n.v[r.floor(e/20)]|0;l=a,a=f,f=n.V(30,c),c=o,o=t}s[0]=s[0]+o|0,s[1]=s[1]+c|0,s[2]=s[2]+f|0,s[3]=s[3]+a|0,s[4]=s[4]+l|0}},D={getRandomValues(e){const t=new c(e.buffer),n=e=>{let t=987654321;const n=4294967295;return()=>(t=36969*(65535&t)+(t>>16)&n,(((t<<16)+(e=18e3*(65535&e)+(e>>16)&n)&n)/4294967296+.5)*(r.random()>.5?1:-1))};for(let s,i=0;inew V.R(I.p.g(e)),B(e,t,n,r){if(n=n||1e4,0>r||0>n)throw new s("invalid params to pbkdf2");const i=1+(r>>5)<<2;let o,c,f,a,u;const w=new ArrayBuffer(i),h=new l(w);let d=0;const p=_;for(t=I.p.g(t),u=1;(i||1)>d;u++){for(o=c=e.encrypt(p.concat(t,[u])),f=1;n>f;f++)for(c=e.encrypt(c),a=0;ad&&fs&&(e=(new n).update(e).P());for(let t=0;s>t;t++)r[0][t]=909522486^e[t],r[1][t]=1549556828^e[t];t.U[0].update(r[0]),t.U[1].update(r[1]),t.K=new n(t.U[0])}reset(){const e=this;e.K=new e.M(e.U[0]),e.N=!1}update(e){this.N=!0,this.K.update(e)}digest(){const e=this,t=e.K.P(),n=new e.M(e.U[1]).update(t).P();return e.reset(),n}encrypt(e){if(this.N)throw new s("encrypt on already updated hmac called!");return this.update(e),this.digest(e)}}},R=typeof h!=v&&typeof h.getRandomValues==S,B="Invalid password",E="Invalid signature",M="zipjs-abort-check-password";function U(e){return R?h.getRandomValues(e):D.getRandomValues(e)}const K=16,N={name:"PBKDF2"},O=t.assign({hash:{name:"HMAC"}},N),T=t.assign({iterations:1e3,hash:{name:"SHA-1"}},N),W=["deriveBits"],j=[8,12,16],H=[16,24,32],L=10,F=[0,0,0,0],q=typeof h!=v,G=q&&h.subtle,J=q&&typeof G!=v,Q=I.p,X=class{constructor(e){const t=this;t.O=[[[],[],[],[],[]],[[],[],[],[],[]]],t.O[0][0][0]||t.T();const n=t.O[0][4],r=t.O[1],i=e.length;let o,c,f,a=1;if(4!==i&&6!==i&&8!==i)throw new s("invalid aes key size");for(t.v=[c=e.slice(0),f=[]],o=i;4*i+28>o;o++){let e=c[o-1];(o%i==0||8===i&&o%i==4)&&(e=n[e>>>24]<<24^n[e>>16&255]<<16^n[e>>8&255]<<8^n[255&e],o%i==0&&(e=e<<8^e>>>24^a<<24,a=a<<1^283*(a>>7))),c[o]=c[o-i]^e}for(let e=0;o;e++,o--){const t=c[3&e?o:o-4];f[e]=4>=o||4>e?t:r[0][n[t>>>24]]^r[1][n[t>>16&255]]^r[2][n[t>>8&255]]^r[3][n[255&t]]}}encrypt(e){return this.W(e,0)}decrypt(e){return this.W(e,1)}T(){const e=this.O[0],t=this.O[1],n=e[4],r=t[4],s=[],i=[];let o,c,f,a;for(let e=0;256>e;e++)i[(s[e]=e<<1^283*(e>>7))^e]=e;for(let l=o=0;!n[l];l^=c||1,o=i[o]||1){let i=o^o<<1^o<<2^o<<3^o<<4;i=i>>8^255&i^99,n[l]=i,r[i]=l,a=s[f=s[c=s[l]]];let u=16843009*a^65537*f^257*c^16843008*l,w=257*s[i]^16843008*i;for(let n=0;4>n;n++)e[n][l]=w=w<<24^w>>>8,t[n][i]=u=u<<24^u>>>8}for(let n=0;5>n;n++)e[n]=e[n].slice(0),t[n]=t[n].slice(0)}W(e,t){if(4!==e.length)throw new s("invalid aes block size");const n=this.v[t],r=n.length/4-2,i=[0,0,0,0],o=this.O[t],c=o[0],f=o[1],a=o[2],l=o[3],u=o[4];let w,h,d,p=e[0]^n[0],y=e[t?3:1]^n[1],m=e[2]^n[2],b=e[t?1:3]^n[3],g=4;for(let e=0;r>e;e++)w=c[p>>>24]^f[y>>16&255]^a[m>>8&255]^l[255&b]^n[g],h=c[y>>>24]^f[m>>16&255]^a[b>>8&255]^l[255&p]^n[g+1],d=c[m>>>24]^f[b>>16&255]^a[p>>8&255]^l[255&y]^n[g+2],b=c[b>>>24]^f[p>>16&255]^a[y>>8&255]^l[255&m]^n[g+3],g+=4,p=w,y=h,m=d;for(let e=0;4>e;e++)i[t?3&-e:e]=u[p>>>24]<<24^u[y>>16&255]<<16^u[m>>8&255]<<8^u[255&b]^n[g++],w=p,p=y,y=m,m=b,b=w;return i}},Y=class{constructor(e,t){this.j=e,this.H=t,this.L=t}reset(){this.L=this.H}update(e){return this.F(this.j,e,this.L)}q(e){if(255==(e>>24&255)){let t=e>>16&255,n=e>>8&255,r=255&e;255===t?(t=0,255===n?(n=0,255===r?r=0:++r):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=r}else e+=1<<24;return e}G(e){0===(e[0]=this.q(e[0]))&&(e[1]=this.q(e[1]))}F(e,t,n){let r;if(!(r=t.length))return[];const s=_.l(t);for(let s=0;r>s;s+=4){this.G(n);const r=e.encrypt(n);t[s]^=r[0],t[s+1]^=r[1],t[s+2]^=r[2],t[s+3]^=r[3]}return _.u(t,s)}},Z=V.R;let $=q&&J&&typeof G.importKey==S,ee=q&&J&&typeof G.deriveBits==S;class te extends p{constructor({password:e,rawPassword:n,signed:r,encryptionStrength:o,checkPasswordOnly:c}){super({start(){t.assign(this,{ready:new u((e=>this.J=e)),password:ie(e,n),signed:r,X:o-1,pending:new i})},async transform(e,t){const n=this,{password:r,X:o,J:f,ready:a}=n;r?(await(async(e,t,n,r)=>{const i=await se(e,t,n,ce(r,0,j[t])),o=ce(r,j[t]);if(i[0]!=o[0]||i[1]!=o[1])throw new s(B)})(n,o,r,ce(e,0,j[o]+2)),e=ce(e,j[o]+2),c?t.error(new s(M)):f()):await a;const l=new i(e.length-L-(e.length-L)%K);t.enqueue(re(n,e,l,0,L,!0))},async flush(e){const{signed:t,Y:n,Z:r,pending:o,ready:c}=this;if(r&&n){await c;const f=ce(o,0,o.length-L),a=ce(o,o.length-L);let l=new i;if(f.length){const e=ae(Q,f);r.update(e);const t=n.update(e);l=fe(Q,t)}if(t){const e=ce(fe(Q,r.digest()),0,L);for(let t=0;L>t;t++)if(e[t]!=a[t])throw new s(E)}e.enqueue(l)}}})}}class ne extends p{constructor({password:e,rawPassword:n,encryptionStrength:r}){let s;super({start(){t.assign(this,{ready:new u((e=>this.J=e)),password:ie(e,n),X:r-1,pending:new i})},async transform(e,t){const n=this,{password:r,X:s,J:o,ready:c}=n;let f=new i;r?(f=await(async(e,t,n)=>{const r=U(new i(j[t]));return oe(r,await se(e,t,n,r))})(n,s,r),o()):await c;const a=new i(f.length+e.length-e.length%K);a.set(f,0),t.enqueue(re(n,e,a,f.length,0))},async flush(e){const{Y:t,Z:n,pending:r,ready:o}=this;if(n&&t){await o;let c=new i;if(r.length){const e=t.update(ae(Q,r));n.update(e),c=fe(Q,e)}s.signature=fe(Q,n.digest()).slice(0,L),e.enqueue(oe(c,s.signature))}}}),s=this}}function re(e,t,n,r,s,o){const{Y:c,Z:f,pending:a}=e,l=t.length-s;let u;for(a.length&&(t=oe(a,t),n=((e,t)=>{if(t&&t>e.length){const n=e;(e=new i(t)).set(n,0)}return e})(n,l-l%K)),u=0;l-K>=u;u+=K){const e=ae(Q,ce(t,u,u+K));o&&f.update(e);const s=c.update(e);o||f.update(s),n.set(fe(Q,s),u+r)}return e.pending=ce(t,u),n}async function se(n,r,s,o){n.password=null;const c=await(async(e,t,n,r,s)=>{if(!$)return V.importKey(t);try{return await G.importKey("raw",t,n,!1,s)}catch(e){return $=!1,V.importKey(t)}})(0,s,O,0,W),f=await(async(e,t,n)=>{if(!ee)return V.B(t,e.salt,T.iterations,n);try{return await G.deriveBits(e,t,n)}catch(r){return ee=!1,V.B(t,e.salt,T.iterations,n)}})(t.assign({salt:o},T),c,8*(2*H[r]+2)),a=new i(f),l=ae(Q,ce(a,0,H[r])),u=ae(Q,ce(a,H[r],2*H[r])),w=ce(a,2*H[r]);return t.assign(n,{keys:{key:l,$:u,passwordVerification:w},Y:new Y(new X(l),e.from(F)),Z:new Z(u)}),w}function ie(e,t){return t===k?(e=>{if(typeof w==v){const t=new i((e=unescape(encodeURIComponent(e))).length);for(let n=0;n>>24]),i=~e.te.get(),e.keys=[n,s,i]}function ye(e){const t=2|e.keys[2];return me(r.imul(t,1^t)>>>8)}function me(e){return 255&e}function be(e){return 4294967295&e}const ge="deflate-raw";class ke extends p{constructor(e,{chunkSize:t,CompressionStream:n,CompressionStreamNative:r}){super({});const{compressed:s,encrypted:i,useCompressionStream:o,zipCrypto:c,signed:f,level:a}=e,u=this;let w,h,d=Se(super.readable);i&&!c||!f||(w=new A,d=xe(d,w)),s&&(d=Ce(d,o,{level:a,chunkSize:t},r,n)),i&&(c?d=xe(d,new ue(e)):(h=new ne(e),d=xe(d,h))),ze(u,d,(()=>{let e;i&&!c&&(e=h.signature),i&&!c||!f||(e=new l(w.value.buffer).getUint32(0)),u.signature=e}))}}class ve extends p{constructor(e,{chunkSize:t,DecompressionStream:n,DecompressionStreamNative:r}){super({});const{zipCrypto:i,encrypted:o,signed:c,signature:f,compressed:a,useCompressionStream:u}=e;let w,h,d=Se(super.readable);o&&(i?d=xe(d,new le(e)):(h=new te(e),d=xe(d,h))),a&&(d=Ce(d,u,{chunkSize:t},r,n)),o&&!i||!c||(w=new A,d=xe(d,w)),ze(this,d,(()=>{if((!o||i)&&c){const e=new l(w.value.buffer);if(f!=e.getUint32(0,!1))throw new s(E)}}))}}function Se(e){return xe(e,new p({transform(e,t){e&&e.length&&t.enqueue(e)}}))}function ze(e,n,r){n=xe(n,new p({flush:r})),t.defineProperty(e,"readable",{get:()=>n})}function Ce(e,t,n,r,s){try{e=xe(e,new(t&&r?r:s)(ge,n))}catch(r){if(!t)return e;try{e=xe(e,new s(ge,n))}catch(t){return e}}return e}function xe(e,t){return e.pipeThrough(t)}const Ae="data",_e="close";class Ie extends p{constructor(e,n){super({});const r=this,{codecType:s}=e;let i;s.startsWith("deflate")?i=ke:s.startsWith("inflate")&&(i=ve);let o=0,c=0;const f=new i(e,n),a=super.readable,l=new p({transform(e,t){e&&e.length&&(c+=e.length,t.enqueue(e))},flush(){t.assign(r,{inputSize:c})}}),u=new p({transform(e,t){e&&e.length&&(o+=e.length,t.enqueue(e))},flush(){const{signature:e}=f;t.assign(r,{signature:e,outputSize:o,inputSize:c})}});t.defineProperty(r,"readable",{get:()=>a.pipeThrough(l).pipeThrough(f).pipeThrough(u)})}}class Pe extends p{constructor(e){let t;super({transform:function n(r,s){if(t){const e=new i(t.length+r.length);e.set(t),e.set(r,t.length),r=e,t=null}r.length>e?(s.enqueue(r.slice(0,e)),n(r.slice(e),s)):t=r},flush(e){t&&t.length&&e.enqueue(t)}})}}const De=new a,Ve=new a;let Re,Be=0,Ee=!0;async function Me(e){try{const{options:t,scripts:r,config:s}=e;if(r&&r.length)try{Ee?importScripts.apply(k,r):await Ue(r)}catch(e){Ee=!1,await Ue(r)}self.initCodec&&self.initCodec(),s.CompressionStreamNative=self.CompressionStream,s.DecompressionStreamNative=self.DecompressionStream,self.Deflate&&(s.CompressionStream=new z(self.Deflate)),self.Inflate&&(s.DecompressionStream=new z(self.Inflate));const i={highWaterMark:1},o=e.readable||new y({async pull(e){const t=new u((e=>De.set(Be,e)));Ke({type:"pull",messageId:Be}),Be=(Be+1)%n.MAX_SAFE_INTEGER;const{value:r,done:s}=await t;e.enqueue(r),s&&e.close()}},i),c=e.writable||new m({async write(e){let t;const r=new u((e=>t=e));Ve.set(Be,t),Ke({type:Ae,value:e,messageId:Be}),Be=(Be+1)%n.MAX_SAFE_INTEGER,await r}},i),f=new Ie(t,s);Re=new AbortController;const{signal:a}=Re;await o.pipeThrough(f).pipeThrough(new Pe(s.chunkSize)).pipeTo(c,{signal:a,preventClose:!0,preventAbort:!0}),await c.getWriter().close();const{signature:l,inputSize:w,outputSize:h}=f;Ke({type:_e,result:{signature:l,inputSize:w,outputSize:h}})}catch(e){Ne(e)}}async function Ue(e){for(const t of e)await import(t)}function Ke(e){let{value:t}=e;if(t)if(t.length)try{t=new i(t),e.value=t.buffer,d(e,[e.value])}catch(t){d(e)}else d(e);else d(e)}function Ne(e=new s("Unknown error")){const{message:t,stack:n,code:r,name:i}=e;d({error:{message:t,stack:n,code:r,name:i}})}addEventListener("message",(({data:e})=>{const{type:t,messageId:n,value:r,done:s}=e;try{if("start"==t&&Me(e),t==Ae){const e=De.get(n);De.delete(n),e({value:new i(r),done:s})}if("ack"==t){const e=Ve.get(n);Ve.delete(n),e()}t==_e&&Re.abort()}catch(e){Ne(e)}}));const Oe=-2;function Te(t){return We(t.map((([t,n])=>new e(t).fill(n,0,t))))}function We(t){return t.reduce(((t,n)=>t.concat(e.isArray(n)?We(n):n)),[])}const je=[0,1,2,3].concat(...Te([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function He(){const e=this;function t(e,t){let n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1}e.ne=n=>{const s=e.re,i=e.ie.se,o=e.ie.oe;let c,f,a,l=-1;for(n.ce=0,n.fe=573,c=0;o>c;c++)0!==s[2*c]?(n.ae[++n.ce]=l=c,n.le[c]=0):s[2*c+1]=0;for(;2>n.ce;)a=n.ae[++n.ce]=2>l?++l:0,s[2*a]=1,n.le[a]=0,n.ue--,i&&(n.we-=i[2*a+1]);for(e.he=l,c=r.floor(n.ce/2);c>=1;c--)n.de(s,c);a=o;do{c=n.ae[1],n.ae[1]=n.ae[n.ce--],n.de(s,1),f=n.ae[1],n.ae[--n.fe]=c,n.ae[--n.fe]=f,s[2*a]=s[2*c]+s[2*f],n.le[a]=r.max(n.le[c],n.le[f])+1,s[2*c+1]=s[2*f+1]=a,n.ae[1]=a++,n.de(s,1)}while(n.ce>=2);n.ae[--n.fe]=n.ae[1],(t=>{const n=e.re,r=e.ie.se,s=e.ie.pe,i=e.ie.ye,o=e.ie.me;let c,f,a,l,u,w,h=0;for(l=0;15>=l;l++)t.be[l]=0;for(n[2*t.ae[t.fe]+1]=0,c=t.fe+1;573>c;c++)f=t.ae[c],l=n[2*n[2*f+1]+1]+1,l>o&&(l=o,h++),n[2*f+1]=l,f>e.he||(t.be[l]++,u=0,i>f||(u=s[f-i]),w=n[2*f],t.ue+=w*(l+u),r&&(t.we+=w*(r[2*f+1]+u)));if(0!==h){do{for(l=o-1;0===t.be[l];)l--;t.be[l]--,t.be[l+1]+=2,t.be[o]--,h-=2}while(h>0);for(l=o;0!==l;l--)for(f=t.be[l];0!==f;)a=t.ae[--c],a>e.he||(n[2*a+1]!=l&&(t.ue+=(l-n[2*a+1])*n[2*a],n[2*a+1]=l),f--)}})(n),((e,n,r)=>{const s=[];let i,o,c,f=0;for(i=1;15>=i;i++)s[i]=f=f+r[i-1]<<1;for(o=0;n>=o;o++)c=e[2*o+1],0!==c&&(e[2*o]=t(s[c]++,c))})(s,e.he,n.be)}}function Le(e,t,n,r,s){const i=this;i.se=e,i.pe=t,i.ye=n,i.oe=r,i.me=s}He.ge=[0,1,2,3,4,5,6,7].concat(...Te([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]])),He.ke=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0],He.ve=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576],He.Se=e=>256>e?je[e]:je[256+(e>>>7)],He.ze=[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],He.Ce=[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],He.xe=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],He.Ae=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];const Fe=Te([[144,8],[112,9],[24,7],[8,8]]);Le._e=We([12,140,76,204,44,172,108,236,28,156,92,220,60,188,124,252,2,130,66,194,34,162,98,226,18,146,82,210,50,178,114,242,10,138,74,202,42,170,106,234,26,154,90,218,58,186,122,250,6,134,70,198,38,166,102,230,22,150,86,214,54,182,118,246,14,142,78,206,46,174,110,238,30,158,94,222,62,190,126,254,1,129,65,193,33,161,97,225,17,145,81,209,49,177,113,241,9,137,73,201,41,169,105,233,25,153,89,217,57,185,121,249,5,133,69,197,37,165,101,229,21,149,85,213,53,181,117,245,13,141,77,205,45,173,109,237,29,157,93,221,61,189,125,253,19,275,147,403,83,339,211,467,51,307,179,435,115,371,243,499,11,267,139,395,75,331,203,459,43,299,171,427,107,363,235,491,27,283,155,411,91,347,219,475,59,315,187,443,123,379,251,507,7,263,135,391,71,327,199,455,39,295,167,423,103,359,231,487,23,279,151,407,87,343,215,471,55,311,183,439,119,375,247,503,15,271,143,399,79,335,207,463,47,303,175,431,111,367,239,495,31,287,159,415,95,351,223,479,63,319,191,447,127,383,255,511,0,64,32,96,16,80,48,112,8,72,40,104,24,88,56,120,4,68,36,100,20,84,52,116,3,131,67,195,35,163,99,227].map(((e,t)=>[e,Fe[t]])));const qe=Te([[30,5]]);function Ge(e,t,n,r,s){const i=this;i.Ie=e,i.Pe=t,i.De=n,i.Ve=r,i.Re=s}Le.Be=We([0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30,1,17,9,25,5,21,13,29,3,19,11,27,7,23].map(((e,t)=>[e,qe[t]]))),Le.Ee=new Le(Le._e,He.ze,257,286,15),Le.Me=new Le(Le.Be,He.Ce,0,30,15),Le.Ue=new Le(null,He.xe,0,19,7);const Je=[new Ge(0,0,0,0,0),new Ge(4,4,8,4,1),new Ge(4,5,16,8,1),new Ge(4,6,32,32,1),new Ge(4,4,16,16,2),new Ge(8,16,32,32,2),new Ge(8,16,128,128,2),new Ge(8,32,128,256,2),new Ge(32,128,258,1024,2),new Ge(32,258,258,4096,2)],Qe=["need dictionary","stream end","","","stream error","data error","","buffer error","",""],Xe=113,Ye=666,Ze=262;function $e(e,t,n,r){const s=e[2*t],i=e[2*n];return i>s||s==i&&r[t]<=r[n]}function et(){const e=this;let t,n,s,c,f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z,C,x,A,_,I,P,D,V,R,B,E,M,U;const K=new He,N=new He,O=new He;let T,W,j,H,L,F;function q(){let t;for(t=0;286>t;t++)E[2*t]=0;for(t=0;30>t;t++)M[2*t]=0;for(t=0;19>t;t++)U[2*t]=0;E[512]=1,e.ue=e.we=0,W=j=0}function G(e,t){let n,r=-1,s=e[1],i=0,o=7,c=4;0===s&&(o=138,c=3),e[2*(t+1)+1]=65535;for(let f=0;t>=f;f++)n=s,s=e[2*(f+1)+1],++ii?U[2*n]+=i:0!==n?(n!=r&&U[2*n]++,U[32]++):i>10?U[36]++:U[34]++,i=0,r=n,0===s?(o=138,c=3):n==s?(o=6,c=3):(o=7,c=4))}function J(t){e.Ke[e.pending++]=t}function Q(e){J(255&e),J(e>>>8&255)}function X(e,t){let n;const r=t;F>16-r?(n=e,L|=n<>>16-F,F+=r-16):(L|=e<=n;n++)if(r=i,i=e[2*(n+1)+1],++o>=c||r!=i){if(f>o)do{Y(r,U)}while(0!=--o);else 0!==r?(r!=s&&(Y(r,U),o--),Y(16,U),X(o-3,2)):o>10?(Y(18,U),X(o-11,7)):(Y(17,U),X(o-3,3));o=0,s=r,0===i?(c=138,f=3):r==i?(c=6,f=3):(c=7,f=4)}}function $(){16==F?(Q(L),L=0,F=0):8>F||(J(255&L),L>>>=8,F-=8)}function ee(t,n){let s,i,o;if(e.Ne[W]=t,e.Oe[W]=255&n,W++,0===t?E[2*n]++:(j++,t--,E[2*(He.ge[n]+256+1)]++,M[2*He.Se(t)]++),0==(8191&W)&&D>2){for(s=8*W,i=C-k,o=0;30>o;o++)s+=M[2*o]*(5+He.Ce[o]);if(s>>>=3,jc);Y(256,t),H=t[513]}function ne(){F>8?Q(L):F>0&&J(255&L),L=0,F=0}function re(t,n,r){X(0+(r?1:0),3),((t,n)=>{ne(),H=8,Q(n),Q(~n),e.Ke.set(u.subarray(t,t+n),e.pending),e.pending+=n})(t,n)}function se(n){((t,n,r)=>{let s,i,o=0;D>0?(K.ne(e),N.ne(e),o=(()=>{let t;for(G(E,K.he),G(M,N.he),O.ne(e),t=18;t>=3&&0===U[2*He.Ae[t]+1];t--);return e.ue+=14+3*(t+1),t})(),s=e.ue+3+7>>>3,i=e.we+3+7>>>3,i>s||(s=i)):s=i=n+5,n+4>s||-1==t?i==s?(X(2+(r?1:0),3),te(Le._e,Le.Be)):(X(4+(r?1:0),3),((e,t,n)=>{let r;for(X(e-257,5),X(t-1,5),X(n-4,4),r=0;n>r;r++)X(U[2*He.Ae[r]+1],3);Z(E,e-1),Z(M,t-1)})(K.he+1,N.he+1,o+1),te(E,M)):re(t,n,r),q(),r&&ne()})(0>k?-1:k,C-k,n),k=C,t.Te()}function ie(){let e,n,r,s;do{if(s=w-A-C,0===s&&0===C&&0===A)s=f;else if(-1==s)s--;else if(C>=f+f-Ze){u.set(u.subarray(f,f+f),0),x-=f,C-=f,k-=f,e=y,r=e;do{n=65535&d[--r],d[r]=f>n?0:n-f}while(0!=--e);e=f,r=e;do{n=65535&h[--r],h[r]=f>n?0:n-f}while(0!=--e);s+=f}if(0===t.We)return;e=t.je(u,C+A,s),A+=e,3>A||(p=255&u[C],p=(p<A&&0!==t.We)}function oe(e){let t,n,r=I,s=C,i=_;const o=C>f-Ze?C-(f-Ze):0;let c=B;const a=l,w=C+258;let d=u[s+i-1],p=u[s+i];R>_||(r>>=2),c>A&&(c=A);do{if(t=e,u[t+i]==p&&u[t+i-1]==d&&u[t]==u[s]&&u[++t]==u[s+1]){s+=2,t++;do{}while(u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&w>s);if(n=258-(w-s),s=w-258,n>i){if(x=e,i=n,n>=c)break;d=u[s+i-1],p=u[s+i]}}}while((e=65535&h[e&a])>o&&0!=--r);return i>A?A:i}e.le=[],e.be=[],e.ae=[],E=[],M=[],U=[],e.de=(t,n)=>{const r=e.ae,s=r[n];let i=n<<1;for(;i<=e.ce&&(i(W||(W=8),j||(j=8),G||(G=0),t.Le=null,-1==S&&(S=6),1>j||j>9||8!=W||9>x||x>15||0>S||S>9||0>G||G>2?Oe:(t.Fe=e,a=x,f=1<(t.qe=t.Ge=0,t.Le=null,e.pending=0,e.Je=0,n=Xe,c=0,K.re=E,K.ie=Le.Ee,N.re=M,N.ie=Le.Me,O.re=U,O.ie=Le.Ue,L=0,F=0,H=8,q(),(()=>{w=2*f,d[y-1]=0;for(let e=0;y-1>e;e++)d[e]=0;P=Je[D].Pe,R=Je[D].Ie,B=Je[D].De,I=Je[D].Ve,C=0,k=0,A=0,v=_=2,z=0,p=0})(),0))(t))),e.Qe=()=>42!=n&&n!=Xe&&n!=Ye?Oe:(e.Oe=null,e.Ne=null,e.Ke=null,d=null,h=null,u=null,e.Fe=null,n==Xe?-3:0),e.Xe=(e,t,n)=>{let r=0;return-1==t&&(t=6),0>t||t>9||0>n||n>2?Oe:(Je[D].Re!=Je[t].Re&&0!==e.qe&&(r=e.Ye(1)),D!=t&&(D=t,P=Je[D].Pe,R=Je[D].Ie,B=Je[D].De,I=Je[D].Ve),V=n,r)},e.Ze=(e,t,r)=>{let s,i=r,o=0;if(!t||42!=n)return Oe;if(3>i)return 0;for(i>f-Ze&&(i=f-Ze,o=r-i),u.set(t.subarray(o,o+i),0),C=i,k=i,p=255&u[0],p=(p<=s;s++)p=(p<{let o,w,m,I,R;if(i>4||0>i)return Oe;if(!r.$e||!r.et&&0!==r.We||n==Ye&&4!=i)return r.Le=Qe[4],Oe;if(0===r.tt)return r.Le=Qe[7],-5;var B;if(t=r,I=c,c=i,42==n&&(w=8+(a-8<<4)<<8,m=(D-1&255)>>1,m>3&&(m=3),w|=m<<6,0!==C&&(w|=32),w+=31-w%31,n=Xe,J((B=w)>>8&255),J(255&B)),0!==e.pending){if(t.Te(),0===t.tt)return c=-1,0}else if(0===t.We&&I>=i&&4!=i)return t.Le=Qe[7],-5;if(n==Ye&&0!==t.We)return r.Le=Qe[7],-5;if(0!==t.We||0!==A||0!=i&&n!=Ye){switch(R=-1,Je[D].Re){case 0:R=(e=>{let n,r=65535;for(r>s-5&&(r=s-5);;){if(1>=A){if(ie(),0===A&&0==e)return 0;if(0===A)break}if(C+=A,A=0,n=k+r,(0===C||C>=n)&&(A=C-n,C=n,se(!1),0===t.tt))return 0;if(C-k>=f-Ze&&(se(!1),0===t.tt))return 0}return se(4==e),0===t.tt?4==e?2:0:4==e?3:1})(i);break;case 1:R=(e=>{let n,r=0;for(;;){if(Ze>A){if(ie(),Ze>A&&0==e)return 0;if(0===A)break}if(3>A||(p=(p<f-Ze||2!=V&&(v=oe(r)),3>v)n=ee(0,255&u[C]),A--,C++;else if(n=ee(C-x,v-3),A-=v,v>P||3>A)C+=v,v=0,p=255&u[C],p=(p<{let n,r,s=0;for(;;){if(Ze>A){if(ie(),Ze>A&&0==e)return 0;if(0===A)break}if(3>A||(p=(p<_&&f-Ze>=(C-s&65535)&&(2!=V&&(v=oe(s)),5>=v&&(1==V||3==v&&C-x>4096)&&(v=2)),3>_||v>_)if(0!==z){if(n=ee(0,255&u[C-1]),n&&se(!1),C++,A--,0===t.tt)return 0}else z=1,C++,A--;else{r=C+A-3,n=ee(C-1-S,_-3),A-=_-1,_-=2;do{++C>r||(p=(p<1+H+10-F&&(X(2,3),Y(256,Le._e),$()),H=7;else if(re(0,0,!1),3==i)for(o=0;y>o;o++)d[o]=0;if(t.Te(),0===t.tt)return c=-1,0}}return 4!=i?0:1}}function tt(){const e=this;e.nt=0,e.rt=0,e.We=0,e.qe=0,e.tt=0,e.Ge=0}function nt(e){const t=new tt,n=(o=e&&e.chunkSize?e.chunkSize:65536)+5*(r.floor(o/16383)+1);var o;const c=new i(n);let f=e?e.level:-1;void 0===f&&(f=-1),t.He(f),t.$e=c,this.append=(e,r)=>{let o,f,a=0,l=0,u=0;const w=[];if(e.length){t.nt=0,t.et=e,t.We=e.length;do{if(t.rt=0,t.tt=n,o=t.Ye(0),0!=o)throw new s("deflating: "+t.Le);t.rt&&(t.rt==n?w.push(new i(c)):w.push(c.subarray(0,t.rt))),u+=t.rt,r&&t.nt>0&&t.nt!=a&&(r(t.nt),a=t.nt)}while(t.We>0||0===t.tt);return w.length>1?(f=new i(u),w.forEach((e=>{f.set(e,l),l+=e.length}))):f=w[0]?new i(w[0]):new i,f}},this.flush=()=>{let e,r,o=0,f=0;const a=[];do{if(t.rt=0,t.tt=n,e=t.Ye(4),1!=e&&0!=e)throw new s("deflating: "+t.Le);n-t.tt>0&&a.push(c.slice(0,t.rt)),f+=t.rt}while(t.We>0||0===t.tt);return t.Qe(),r=new i(f),a.forEach((e=>{r.set(e,o),o+=e.length})),r}}tt.prototype={He(e,t){const n=this;return n.Fe=new et,t||(t=15),n.Fe.He(n,e,t)},Ye(e){const t=this;return t.Fe?t.Fe.Ye(t,e):Oe},Qe(){const e=this;if(!e.Fe)return Oe;const t=e.Fe.Qe();return e.Fe=null,t},Xe(e,t){const n=this;return n.Fe?n.Fe.Xe(n,e,t):Oe},Ze(e,t){const n=this;return n.Fe?n.Fe.Ze(n,e,t):Oe},je(e,t,n){const r=this;let s=r.We;return s>n&&(s=n),0===s?0:(r.We-=s,e.set(r.et.subarray(r.nt,r.nt+s),t),r.nt+=s,r.qe+=s,s)},Te(){const e=this;let t=e.Fe.pending;t>e.tt&&(t=e.tt),0!==t&&(e.$e.set(e.Fe.Ke.subarray(e.Fe.Je,e.Fe.Je+t),e.rt),e.rt+=t,e.Fe.Je+=t,e.Ge+=t,e.tt-=t,e.Fe.pending-=t,0===e.Fe.pending&&(e.Fe.Je=0))}};const rt=-2,st=-3,it=-5,ot=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],ct=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],ft=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],at=[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,0,0],lt=[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,112,112],ut=[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],wt=[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];function ht(){let e,t,n,r,s,i;function o(e,t,o,c,f,a,l,u,w,h,d){let p,y,m,b,g,k,v,S,z,C,x,A,_,I,P;C=0,g=o;do{n[e[t+C]]++,C++,g--}while(0!==g);if(n[0]==o)return l[0]=-1,u[0]=0,0;for(S=u[0],k=1;15>=k&&0===n[k];k++);for(v=k,k>S&&(S=k),g=15;0!==g&&0===n[g];g--);for(m=g,S>g&&(S=g),u[0]=S,I=1<k;k++,I<<=1)if(0>(I-=n[k]))return st;if(0>(I-=n[g]))return st;for(n[g]+=I,i[1]=k=0,C=1,_=2;0!=--g;)i[_]=k+=n[C],_++,C++;g=0,C=0;do{0!==(k=e[t+C])&&(d[i[k]++]=g),C++}while(++g=v;v++)for(p=n[v];0!=p--;){for(;v>A+S;){if(b++,A+=S,P=m-A,P=P>S?S:P,(y=1<<(k=v-A))>p+1&&(y-=p+1,_=v,P>k))for(;++kn[++_];)y-=n[_];if(P=1<1440)return st;s[b]=x=h[0],h[0]+=P,0!==b?(i[b]=g,r[0]=k,r[1]=S,k=g>>>A-S,r[2]=x-s[b-1]-k,w.set(r,3*(s[b-1]+k))):l[0]=x}for(r[1]=v-A,o>C?d[C]d[C]?0:96,r[2]=d[C++]):(r[0]=a[d[C]-c]+16+64,r[2]=f[d[C++]-c]):r[0]=192,y=1<>>A;P>k;k+=y)w.set(r,3*(x+k));for(k=1<>>=1)g^=k;for(g^=k,z=(1<c;c++)t[c]=0;for(c=0;16>c;c++)n[c]=0;for(c=0;3>c;c++)r[c]=0;s.set(n.subarray(0,15),0),i.set(n.subarray(0,16),0)}this.st=(n,r,s,i,f)=>{let a;return c(19),e[0]=0,a=o(n,0,19,19,null,null,s,r,i,e,t),a==st?f.Le="oversubscribed dynamic bit lengths tree":a!=it&&0!==r[0]||(f.Le="incomplete dynamic bit lengths tree",a=st),a},this.it=(n,r,s,i,f,a,l,u,w)=>{let h;return c(288),e[0]=0,h=o(s,0,n,257,at,lt,a,i,u,e,t),0!=h||0===i[0]?(h==st?w.Le="oversubscribed literal/length tree":-4!=h&&(w.Le="incomplete literal/length tree",h=st),h):(c(288),h=o(s,n,r,0,ut,wt,l,f,u,e,t),0!=h||0===f[0]&&n>257?(h==st?w.Le="oversubscribed distance tree":h==it?(w.Le="incomplete distance tree",h=st):-4!=h&&(w.Le="empty distance tree with lengths",h=st),h):0)}}function dt(){const e=this;let t,n,r,s,i=0,o=0,c=0,f=0,a=0,l=0,u=0,w=0,h=0,d=0;function p(e,t,n,r,s,i,o,c){let f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z;d=c.nt,p=c.We,w=o.ot,h=o.ct,y=o.write,m=yh;)p--,w|=(255&c.ft(d++))<>=a[z+1],h-=a[z+1],0!=(16&u)){for(u&=15,k=a[z+2]+(w&ot[u]),w>>=u,h-=u;15>h;)p--,w|=(255&c.ft(d++))<>=a[z+1],h-=a[z+1],0!=(16&u)){for(u&=15;u>h;)p--,w|=(255&c.ft(d++))<>=u,h-=u,m-=k,v>y){S=y-v;do{S+=o.end}while(0>S);if(u=o.end-S,k>u){if(k-=u,y-S>0&&u>y-S)do{o.lt[y++]=o.lt[S++]}while(0!=--u);else o.lt.set(o.lt.subarray(S,S+u),y),y+=u,S+=u,u=0;S=0}}else S=y-v,y-S>0&&2>y-S?(o.lt[y++]=o.lt[S++],o.lt[y++]=o.lt[S++],k-=2):(o.lt.set(o.lt.subarray(S,S+2),y),y+=2,S+=2,k-=2);if(y-S>0&&k>y-S)do{o.lt[y++]=o.lt[S++]}while(0!=--k);else o.lt.set(o.lt.subarray(S,S+k),y),y+=k,S+=k,k=0;break}if(0!=(64&u))return c.Le="invalid distance code",k=c.We-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ot=w,o.ct=h,c.We=p,c.qe+=d-c.nt,c.nt=d,o.write=y,st;f+=a[z+2],f+=w&ot[u],z=3*(l+f),u=a[z]}break}if(0!=(64&u))return 0!=(32&u)?(k=c.We-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ot=w,o.ct=h,c.We=p,c.qe+=d-c.nt,c.nt=d,o.write=y,1):(c.Le="invalid literal/length code",k=c.We-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ot=w,o.ct=h,c.We=p,c.qe+=d-c.nt,c.nt=d,o.write=y,st);if(f+=a[z+2],f+=w&ot[u],z=3*(l+f),0===(u=a[z])){w>>=a[z+1],h-=a[z+1],o.lt[y++]=a[z+2],m--;break}}else w>>=a[z+1],h-=a[z+1],o.lt[y++]=a[z+2],m--}while(m>=258&&p>=10);return k=c.We-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ot=w,o.ct=h,c.We=p,c.qe+=d-c.nt,c.nt=d,o.write=y,0}e.init=(e,i,o,c,f,a)=>{t=0,u=e,w=i,r=o,h=c,s=f,d=a,n=null},e.ut=(e,y,m)=>{let b,g,k,v,S,z,C,x=0,A=0,_=0;for(_=y.nt,v=y.We,x=e.ot,A=e.ct,S=e.write,z=S=258&&v>=10&&(e.ot=x,e.ct=A,y.We=v,y.qe+=_-y.nt,y.nt=_,e.write=S,m=p(u,w,r,h,s,d,e,y),_=y.nt,v=y.We,x=e.ot,A=e.ct,S=e.write,z=SA;){if(0===v)return e.ot=x,e.ct=A,y.We=v,y.qe+=_-y.nt,y.nt=_,e.write=S,e.wt(y,m);m=0,v--,x|=(255&y.ft(_++))<>>=n[g+1],A-=n[g+1],k=n[g],0===k){f=n[g+2],t=6;break}if(0!=(16&k)){a=15&k,i=n[g+2],t=2;break}if(0==(64&k)){c=k,o=g/3+n[g+2];break}if(0!=(32&k)){t=7;break}return t=9,y.Le="invalid literal/length code",m=st,e.ot=x,e.ct=A,y.We=v,y.qe+=_-y.nt,y.nt=_,e.write=S,e.wt(y,m);case 2:for(b=a;b>A;){if(0===v)return e.ot=x,e.ct=A,y.We=v,y.qe+=_-y.nt,y.nt=_,e.write=S,e.wt(y,m);m=0,v--,x|=(255&y.ft(_++))<>=b,A-=b,c=w,n=s,o=d,t=3;case 3:for(b=c;b>A;){if(0===v)return e.ot=x,e.ct=A,y.We=v,y.qe+=_-y.nt,y.nt=_,e.write=S,e.wt(y,m);m=0,v--,x|=(255&y.ft(_++))<>=n[g+1],A-=n[g+1],k=n[g],0!=(16&k)){a=15&k,l=n[g+2],t=4;break}if(0==(64&k)){c=k,o=g/3+n[g+2];break}return t=9,y.Le="invalid distance code",m=st,e.ot=x,e.ct=A,y.We=v,y.qe+=_-y.nt,y.nt=_,e.write=S,e.wt(y,m);case 4:for(b=a;b>A;){if(0===v)return e.ot=x,e.ct=A,y.We=v,y.qe+=_-y.nt,y.nt=_,e.write=S,e.wt(y,m);m=0,v--,x|=(255&y.ft(_++))<>=b,A-=b,t=5;case 5:for(C=S-l;0>C;)C+=e.end;for(;0!==i;){if(0===z&&(S==e.end&&0!==e.read&&(S=0,z=S7&&(A-=8,v++,_--),e.write=S,m=e.wt(y,m),S=e.write,z=S{}}ht.dt=(e,t,n,r)=>(e[0]=9,t[0]=5,n[0]=ct,r[0]=ft,0);const pt=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function yt(e,t){const n=this;let r,s=0,o=0,c=0,a=0;const l=[0],u=[0],w=new dt;let h=0,d=new f(4320);const p=new ht;n.ct=0,n.ot=0,n.lt=new i(t),n.end=t,n.read=0,n.write=0,n.reset=(e,t)=>{t&&(t[0]=0),6==s&&w.ht(e),s=0,n.ct=0,n.ot=0,n.read=n.write=0},n.reset(e,null),n.wt=(e,t)=>{let r,s,i;return s=e.rt,i=n.read,r=(i>n.write?n.end:n.write)-i,r>e.tt&&(r=e.tt),0!==r&&t==it&&(t=0),e.tt-=r,e.Ge+=r,e.$e.set(n.lt.subarray(i,i+r),s),s+=r,i+=r,i==n.end&&(i=0,n.write==n.end&&(n.write=0),r=n.write-i,r>e.tt&&(r=e.tt),0!==r&&t==it&&(t=0),e.tt-=r,e.Ge+=r,e.$e.set(n.lt.subarray(i,i+r),s),s+=r,i+=r),e.rt=s,n.read=i,t},n.ut=(e,t)=>{let i,f,y,m,b,g,k,v;for(m=e.nt,b=e.We,f=n.ot,y=n.ct,g=n.write,k=gy;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<>>1){case 0:f>>>=3,y-=3,i=7&y,f>>>=i,y-=i,s=1;break;case 1:S=[],z=[],C=[[]],x=[[]],ht.dt(S,z,C,x),w.init(S[0],z[0],C[0],0,x[0],0),f>>>=3,y-=3,s=6;break;case 2:f>>>=3,y-=3,s=3;break;case 3:return f>>>=3,y-=3,s=9,e.Le="invalid block type",t=st,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t)}break;case 1:for(;32>y;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<>>16&65535)!=(65535&f))return s=9,e.Le="invalid stored block lengths",t=st,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);o=65535&f,f=y=0,s=0!==o?2:0!==h?7:0;break;case 2:if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);if(0===k&&(g==n.end&&0!==n.read&&(g=0,k=gb&&(i=b),i>k&&(i=k),n.lt.set(e.je(m,i),g),m+=i,b-=i,g+=i,k-=i,0!=(o-=i))break;s=0!==h?7:0;break;case 3:for(;14>y;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<29||(i>>5&31)>29)return s=9,e.Le="too many length or distance symbols",t=st,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);if(i=258+(31&i)+(i>>5&31),!r||r.lengthv;v++)r[v]=0;f>>>=14,y-=14,a=0,s=4;case 4:for(;4+(c>>>10)>a;){for(;3>y;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<>>=3,y-=3}for(;19>a;)r[pt[a++]]=0;if(l[0]=7,i=p.st(r,l,u,d,e),0!=i)return(t=i)==st&&(r=null,s=9),n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);a=0,s=5;case 5:for(;i=c,258+(31&i)+(i>>5&31)>a;){let o,w;for(i=l[0];i>y;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<w)f>>>=i,y-=i,r[a++]=w;else{for(v=18==w?7:w-14,o=18==w?11:3;i+v>y;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<>>=i,y-=i,o+=f&ot[v],f>>>=v,y-=v,v=a,i=c,v+o>258+(31&i)+(i>>5&31)||16==w&&1>v)return r=null,s=9,e.Le="invalid bit length repeat",t=st,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);w=16==w?r[v-1]:0;do{r[v++]=w}while(0!=--o);a=v}}if(u[0]=-1,A=[],_=[],I=[],P=[],A[0]=9,_[0]=6,i=c,i=p.it(257+(31&i),1+(i>>5&31),r,A,_,I,P,d,e),0!=i)return i==st&&(r=null,s=9),t=i,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);w.init(A[0],_[0],d,I[0],d,P[0]),s=6;case 6:if(n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,1!=(t=w.ut(n,e,t)))return n.wt(e,t);if(t=0,w.ht(e),m=e.nt,b=e.We,f=n.ot,y=n.ct,g=n.write,k=g{n.reset(e,null),n.lt=null,d=null},n.yt=(e,t,r)=>{n.lt.set(e.subarray(t,t+r),0),n.read=n.write=r},n.bt=()=>1==s?1:0}const mt=13,bt=[0,0,255,255];function gt(){const e=this;function t(e){return e&&e.gt?(e.qe=e.Ge=0,e.Le=null,e.gt.mode=7,e.gt.kt.reset(e,null),0):rt}e.mode=0,e.method=0,e.vt=[0],e.St=0,e.marker=0,e.zt=0,e.Ct=t=>(e.kt&&e.kt.ht(t),e.kt=null,0),e.xt=(n,r)=>(n.Le=null,e.kt=null,8>r||r>15?(e.Ct(n),rt):(e.zt=r,n.gt.kt=new yt(n,1<{let n,r;if(!e||!e.gt||!e.et)return rt;const s=e.gt;for(t=4==t?it:0,n=it;;)switch(s.mode){case 0:if(0===e.We)return n;if(n=t,e.We--,e.qe++,8!=(15&(s.method=e.ft(e.nt++)))){s.mode=mt,e.Le="unknown compression method",s.marker=5;break}if(8+(s.method>>4)>s.zt){s.mode=mt,e.Le="invalid win size",s.marker=5;break}s.mode=1;case 1:if(0===e.We)return n;if(n=t,e.We--,e.qe++,r=255&e.ft(e.nt++),((s.method<<8)+r)%31!=0){s.mode=mt,e.Le="incorrect header check",s.marker=5;break}if(0==(32&r)){s.mode=7;break}s.mode=2;case 2:if(0===e.We)return n;n=t,e.We--,e.qe++,s.St=(255&e.ft(e.nt++))<<24&4278190080,s.mode=3;case 3:if(0===e.We)return n;n=t,e.We--,e.qe++,s.St+=(255&e.ft(e.nt++))<<16&16711680,s.mode=4;case 4:if(0===e.We)return n;n=t,e.We--,e.qe++,s.St+=(255&e.ft(e.nt++))<<8&65280,s.mode=5;case 5:return 0===e.We?n:(n=t,e.We--,e.qe++,s.St+=255&e.ft(e.nt++),s.mode=6,2);case 6:return s.mode=mt,e.Le="need dictionary",s.marker=0,rt;case 7:if(n=s.kt.ut(e,n),n==st){s.mode=mt,s.marker=0;break}if(0==n&&(n=t),1!=n)return n;n=t,s.kt.reset(e,s.vt),s.mode=12;case 12:return e.We=0,1;case mt:return st;default:return rt}},e._t=(e,t,n)=>{let r=0,s=n;if(!e||!e.gt||6!=e.gt.mode)return rt;const i=e.gt;return s<1<{let n,r,s,i,o;if(!e||!e.gt)return rt;const c=e.gt;if(c.mode!=mt&&(c.mode=mt,c.marker=0),0===(n=e.We))return it;for(r=e.nt,s=c.marker;0!==n&&4>s;)e.ft(r)==bt[s]?s++:s=0!==e.ft(r)?0:4-s,r++,n--;return e.qe+=r-e.nt,e.nt=r,e.We=n,c.marker=s,4!=s?st:(i=e.qe,o=e.Ge,t(e),e.qe=i,e.Ge=o,c.mode=7,0)},e.Pt=e=>e&&e.gt&&e.gt.kt?e.gt.kt.bt():rt}function kt(){}function vt(e){const t=new kt,n=e&&e.chunkSize?r.floor(2*e.chunkSize):131072,o=new i(n);let c=!1;t.xt(),t.$e=o,this.append=(e,r)=>{const f=[];let a,l,u=0,w=0,h=0;if(0!==e.length){t.nt=0,t.et=e,t.We=e.length;do{if(t.rt=0,t.tt=n,0!==t.We||c||(t.nt=0,c=!0),a=t.At(0),c&&a===it){if(0!==t.We)throw new s("inflating: bad input")}else if(0!==a&&1!==a)throw new s("inflating: "+t.Le);if((c||1===a)&&t.We===e.length)throw new s("inflating: bad input");t.rt&&(t.rt===n?f.push(new i(o)):f.push(o.subarray(0,t.rt))),h+=t.rt,r&&t.nt>0&&t.nt!=u&&(r(t.nt),u=t.nt)}while(t.We>0||0===t.tt);return f.length>1?(l=new i(h),f.forEach((e=>{l.set(e,w),w+=e.length}))):l=f[0]?new i(f[0]):new i,l}},this.flush=()=>{t.Ct()}}kt.prototype={xt(e){const t=this;return t.gt=new gt,e||(e=15),t.gt.xt(t,e)},At(e){const t=this;return t.gt?t.gt.At(t,e):rt},Ct(){const e=this;if(!e.gt)return rt;const t=e.gt.Ct(e);return e.gt=null,t},It(){const e=this;return e.gt?e.gt.It(e):rt},_t(e,t){const n=this;return n.gt?n.gt._t(n,e,t):rt},ft(e){return this.et[e]},je(e,t){return this.et.subarray(e,e+t)}},self.initCodec=()=>{self.Deflate=nt,self.Inflate=vt};\n'],{type:"text/javascript"}));e({workerScripts:{inflate:[t],deflate:[t]}})})(Le),Le({Deflate:function(e){const t=new G,n=(r=e&&e.chunkSize?e.chunkSize:65536)+5*(a.floor(r/16383)+1);var r;const i=new w(n);let s=e?e.level:-1;void 0===s&&(s=-1),t.deflateInit(s),t.next_out=i,this.append=(e,r)=>{let s,a,o=0,l=0,c=0;const u=[];if(e.length){t.next_in_index=0,t.next_in=e,t.avail_in=e.length;do{if(t.next_out_index=0,t.avail_out=n,s=t.deflate(0),0!=s)throw new d("deflating: "+t.msg);t.next_out_index&&(t.next_out_index==n?u.push(new w(i)):u.push(i.subarray(0,t.next_out_index))),c+=t.next_out_index,r&&t.next_in_index>0&&t.next_in_index!=o&&(r(t.next_in_index),o=t.next_in_index)}while(t.avail_in>0||0===t.avail_out);return u.length>1?(a=new w(c),u.forEach((e=>{a.set(e,l),l+=e.length}))):a=u[0]?new w(u[0]):new w,a}},this.flush=()=>{let e,r,s=0,a=0;const o=[];do{if(t.next_out_index=0,t.avail_out=n,e=t.deflate(4),1!=e&&0!=e)throw new d("deflating: "+t.msg);n-t.avail_out>0&&o.push(i.slice(0,t.next_out_index)),a+=t.next_out_index}while(t.avail_in>0||0===t.avail_out);return t.deflateEnd(),r=new w(a),o.forEach((e=>{r.set(e,s),s+=e.length})),r}},Inflate:function(e){const t=new fe,n=e&&e.chunkSize?a.floor(2*e.chunkSize):131072,r=new w(n);let i=!1;t.inflateInit(),t.next_out=r,this.append=(e,s)=>{const a=[];let o,l,c=0,u=0,f=0;if(0!==e.length){t.next_in_index=0,t.next_in=e,t.avail_in=e.length;do{if(t.next_out_index=0,t.avail_out=n,0!==t.avail_in||i||(t.next_in_index=0,i=!0),o=t.inflate(0),i&&o===j){if(0!==t.avail_in)throw new d("inflating: bad input")}else if(0!==o&&1!==o)throw new d("inflating: "+t.msg);if((i||1===o)&&t.avail_in===e.length)throw new d("inflating: bad input");t.next_out_index&&(t.next_out_index===n?a.push(new w(r)):a.push(r.subarray(0,t.next_out_index))),f+=t.next_out_index,s&&t.next_in_index>0&&t.next_in_index!=c&&(s(t.next_in_index),c=t.next_in_index)}while(t.avail_in>0||0===t.avail_out);return a.length>1?(l=new w(f),a.forEach((e=>{l.set(e,u),u+=e.length}))):l=a[0]?new w(a[0]):new w,l}},this.flush=()=>{t.inflateEnd()}},baseURL:ii}),e.BlobReader=gn,e.BlobWriter=mn,e.Data64URIReader=class extends pn{constructor(e){super();let t=e.length;for(;"="==e.charAt(t-1);)t--;const r=e.indexOf(",")+1;n.assign(this,{dataURI:e,dataStart:r,size:a.floor(.75*(t-r))})}readUint8Array(e,t){const{dataStart:n,dataURI:r}=this,i=new w(t),s=4*a.floor(e/3),o=atob(r.substring(s+n,4*a.ceil((e+t)/3)+n)),l=e-3*a.floor(s/4);for(let e=l;l+t>e;e++)i[e-l]=o.charCodeAt(e);return i}},e.Data64URIWriter=class extends _n{constructor(e){super(),n.assign(this,{data:"data:"+(e||"")+";base64,",pending:[]})}writeUint8Array(e){const t=this;let n=0,i=t.pending;const s=t.pending.length;for(t.pending="",n=0;n<3*a.floor((s+e.length)/3)-s;n++)i+=r.fromCharCode(e[n]);for(;n2?t.data+=S(i):t.pending=i}getData(){return this.data+S(this.pending)}},e.ERR_BAD_FORMAT=or,e.ERR_CENTRAL_DIRECTORY_NOT_FOUND=fr,e.ERR_DUPLICATED_NAME=Ir,e.ERR_ENCRYPTED=hr,e.ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND=ur,e.ERR_EOCDR_NOT_FOUND=lr,e.ERR_EOCDR_ZIP64_NOT_FOUND=cr,e.ERR_EXTRAFIELD_ZIP64_NOT_FOUND=wr,e.ERR_HTTP_RANGE=ln,e.ERR_INVALID_COMMENT=Ur,e.ERR_INVALID_ENCRYPTION_STRENGTH=Pr,e.ERR_INVALID_ENTRY_COMMENT=qr,e.ERR_INVALID_ENTRY_NAME=Nr,e.ERR_INVALID_EXTRAFIELD_DATA=Mr,e.ERR_INVALID_EXTRAFIELD_TYPE=Hr,e.ERR_INVALID_PASSWORD=Ge,e.ERR_INVALID_SIGNATURE=Xe,e.ERR_INVALID_VERSION=Or,e.ERR_ITERATOR_COMPLETED_TOO_SOON=cn,e.ERR_LOCAL_FILE_HEADER_NOT_FOUND=dr,e.ERR_SPLIT_ZIP_FILE=gr,e.ERR_UNSUPPORTED_COMPRESSION=_r,e.ERR_UNSUPPORTED_ENCRYPTION=pr,e.ERR_UNSUPPORTED_FORMAT=Br,e.HttpRangeReader=class extends Fn{constructor(e,t={}){t.useRangeHeader=!0,super(e,t)}},e.HttpReader=Fn,e.Reader=pn,e.SplitDataReader=Tn,e.SplitDataWriter=Ln,e.SplitZipReader=On,e.SplitZipWriter=Pn,e.TextReader=class extends gn{constructor(e){super(new g([e],{type:"text/plain"}))}},e.TextWriter=class extends mn{constructor(e){super(e),n.assign(this,{encoding:e,utf8:!e||"utf-8"==e.toLowerCase()})}async getData(){const{encoding:e,utf8:t}=this,r=await super.getData();if(r.text&&t)return r.text();{const t=new FileReader;return new m(((i,s)=>{n.assign(t,{onload:({target:e})=>i(e.result),onerror:()=>s(t.error)}),t.readAsText(r,e)}))}}},e.Uint8ArrayReader=class extends pn{constructor(e){super(),n.assign(this,{array:e,size:e.length})}readUint8Array(e,t){return this.array.slice(e,e+t)}},e.Uint8ArrayWriter=class extends _n{init(e=0){n.assign(this,{offset:0,array:new w(e)}),super.init()}writeUint8Array(e){const t=this;if(t.offset+e.length>t.array.length){const n=t.array;t.array=new w(n.length+e.length),t.array.set(n)}t.array.set(e,t.offset),t.offset+=e.length}getData(){return this.array}},e.Writer=_n,e.ZipReader=kr,e.ZipReaderStream=class{constructor(e={}){const{readable:t,writable:n}=new v,r=new kr(t,e).getEntriesGenerator();this.readable=new z({async pull(e){const{done:t,value:n}=await r.next();if(t)return e.close();const i={...n,readable:(()=>{const{readable:e,writable:t}=new v;if(n.getData)return n.getData(t),e})()};delete i.getData,e.enqueue(i)}}),this.writable=n}},e.ZipWriter=Gr,e.ZipWriterStream=class{constructor(e={}){const{readable:t,writable:n}=new v;this.readable=t,this.zipWriter=new Gr(n,e)}transform(e){const{readable:t,writable:n}=new v({flush:()=>{this.zipWriter.close()}});return this.zipWriter.add(e,t),{readable:this.readable,writable:n}}writable(e){const{readable:t,writable:n}=new v;return this.zipWriter.add(e,t),n}close(e,t={}){return this.zipWriter.close(e,t)}},e.configure=Le,e.getMimeType=()=>"application/octet-stream",e.initReader=Un,e.initShimAsyncCodec=(e,t={},n)=>({Deflate:Ue(e.Deflate,t.deflate,n),Inflate:Ue(e.Inflate,t.inflate,n)}),e.initStream=In,e.initWriter=qn,e.readUint8Array=Nn,e.terminateWorkers=async()=>{await m.allSettled(tn.map((e=>(an(e),e.terminate()))))},n.defineProperty(e,"__esModule",{value:!0})})); diff --git a/demos/lib/zip-no-worker-deflate.min.js b/demos/lib/zip-no-worker-deflate.min.js index cabe6e24..4bd785e0 100644 --- a/demos/lib/zip-no-worker-deflate.min.js +++ b/demos/lib/zip-no-worker-deflate.min.js @@ -1 +1 @@ -((e,t)=>{"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).zip={})})(this,(function(e){"use strict";const{Array:t,Object:r,String:n,Number:s,BigInt:a,Math:i,Date:o,Map:l,Set:c,Response:d,URL:u,Error:f,Uint8Array:p,Uint16Array:h,Uint32Array:w,DataView:m,Blob:g,Promise:_,TextEncoder:y,TextDecoder:b,document:x,crypto:S,btoa:z,TransformStream:k,ReadableStream:v,WritableStream:E,CompressionStream:D,DecompressionStream:R,navigator:T,Worker:F}="undefined"!=typeof globalThis?globalThis:this||self,A=-2;function C(e){return W(e.map((([e,r])=>new t(e).fill(r,0,e))))}function W(e){return e.reduce(((e,r)=>e.concat(t.isArray(r)?W(r):r)),[])}const N=[0,1,2,3].concat(...C([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function U(){const e=this;function t(e,t){let r=0;do{r|=1&e,e>>>=1,r<<=1}while(--t>0);return r>>>1}e.build_tree=r=>{const n=e.dyn_tree,s=e.stat_desc.static_tree,a=e.stat_desc.elems;let o,l,c,d=-1;for(r.heap_len=0,r.heap_max=573,o=0;a>o;o++)0!==n[2*o]?(r.heap[++r.heap_len]=d=o,r.depth[o]=0):n[2*o+1]=0;for(;2>r.heap_len;)c=r.heap[++r.heap_len]=2>d?++d:0,n[2*c]=1,r.depth[c]=0,r.opt_len--,s&&(r.static_len-=s[2*c+1]);for(e.max_code=d,o=i.floor(r.heap_len/2);o>=1;o--)r.pqdownheap(n,o);c=a;do{o=r.heap[1],r.heap[1]=r.heap[r.heap_len--],r.pqdownheap(n,1),l=r.heap[1],r.heap[--r.heap_max]=o,r.heap[--r.heap_max]=l,n[2*c]=n[2*o]+n[2*l],r.depth[c]=i.max(r.depth[o],r.depth[l])+1,n[2*o+1]=n[2*l+1]=c,r.heap[1]=c++,r.pqdownheap(n,1)}while(r.heap_len>=2);r.heap[--r.heap_max]=r.heap[1],(t=>{const r=e.dyn_tree,n=e.stat_desc.static_tree,s=e.stat_desc.extra_bits,a=e.stat_desc.extra_base,i=e.stat_desc.max_length;let o,l,c,d,u,f,p=0;for(d=0;15>=d;d++)t.bl_count[d]=0;for(r[2*t.heap[t.heap_max]+1]=0,o=t.heap_max+1;573>o;o++)l=t.heap[o],d=r[2*r[2*l+1]+1]+1,d>i&&(d=i,p++),r[2*l+1]=d,l>e.max_code||(t.bl_count[d]++,u=0,a>l||(u=s[l-a]),f=r[2*l],t.opt_len+=f*(d+u),n&&(t.static_len+=f*(n[2*l+1]+u)));if(0!==p){do{for(d=i-1;0===t.bl_count[d];)d--;t.bl_count[d]--,t.bl_count[d+1]+=2,t.bl_count[i]--,p-=2}while(p>0);for(d=i;0!==d;d--)for(l=t.bl_count[d];0!==l;)c=t.heap[--o],c>e.max_code||(r[2*c+1]!=d&&(t.opt_len+=(d-r[2*c+1])*r[2*c],r[2*c+1]=d),l--)}})(r),((e,r,n)=>{const s=[];let a,i,o,l=0;for(a=1;15>=a;a++)s[a]=l=l+n[a-1]<<1;for(i=0;r>=i;i++)o=e[2*i+1],0!==o&&(e[2*i]=t(s[o]++,o))})(n,e.max_code,r.bl_count)}}function I(e,t,r,n,s){const a=this;a.static_tree=e,a.extra_bits=t,a.extra_base=r,a.elems=n,a.max_length=s}U._length_code=[0,1,2,3,4,5,6,7].concat(...C([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]])),U.base_length=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0],U.base_dist=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576],U.d_code=e=>256>e?N[e]:N[256+(e>>>7)],U.extra_lbits=[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],U.extra_dbits=[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],U.extra_blbits=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],U.bl_order=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];const L=C([[144,8],[112,9],[24,7],[8,8]]);I.static_ltree=W([12,140,76,204,44,172,108,236,28,156,92,220,60,188,124,252,2,130,66,194,34,162,98,226,18,146,82,210,50,178,114,242,10,138,74,202,42,170,106,234,26,154,90,218,58,186,122,250,6,134,70,198,38,166,102,230,22,150,86,214,54,182,118,246,14,142,78,206,46,174,110,238,30,158,94,222,62,190,126,254,1,129,65,193,33,161,97,225,17,145,81,209,49,177,113,241,9,137,73,201,41,169,105,233,25,153,89,217,57,185,121,249,5,133,69,197,37,165,101,229,21,149,85,213,53,181,117,245,13,141,77,205,45,173,109,237,29,157,93,221,61,189,125,253,19,275,147,403,83,339,211,467,51,307,179,435,115,371,243,499,11,267,139,395,75,331,203,459,43,299,171,427,107,363,235,491,27,283,155,411,91,347,219,475,59,315,187,443,123,379,251,507,7,263,135,391,71,327,199,455,39,295,167,423,103,359,231,487,23,279,151,407,87,343,215,471,55,311,183,439,119,375,247,503,15,271,143,399,79,335,207,463,47,303,175,431,111,367,239,495,31,287,159,415,95,351,223,479,63,319,191,447,127,383,255,511,0,64,32,96,16,80,48,112,8,72,40,104,24,88,56,120,4,68,36,100,20,84,52,116,3,131,67,195,35,163,99,227].map(((e,t)=>[e,L[t]])));const O=C([[30,5]]);function H(e,t,r,n,s){const a=this;a.good_length=e,a.max_lazy=t,a.nice_length=r,a.max_chain=n,a.func=s}I.static_dtree=W([0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30,1,17,9,25,5,21,13,29,3,19,11,27,7,23].map(((e,t)=>[e,O[t]]))),I.static_l_desc=new I(I.static_ltree,U.extra_lbits,257,286,15),I.static_d_desc=new I(I.static_dtree,U.extra_dbits,0,30,15),I.static_bl_desc=new I(null,U.extra_blbits,0,19,7);const M=[new H(0,0,0,0,0),new H(4,4,8,4,1),new H(4,5,16,8,1),new H(4,6,32,32,1),new H(4,4,16,16,2),new H(8,16,32,32,2),new H(8,16,128,128,2),new H(8,32,128,256,2),new H(32,128,258,1024,2),new H(32,258,258,4096,2)],P=["need dictionary","stream end","","","stream error","data error","","buffer error","",""],q=113,B=666,V=262;function Z(e,t,r,n){const s=e[2*t],a=e[2*r];return a>s||s==a&&n[t]<=n[r]}function K(){const e=this;let t,r,n,s,a,o,l,c,d,u,f,w,m,g,_,y,b,x,S,z,k,v,E,D,R,T,F,C,W,N,L,O,H;const K=new U,j=new U,X=new U;let Y,G,J,Q,$,ee;function te(){let t;for(t=0;286>t;t++)L[2*t]=0;for(t=0;30>t;t++)O[2*t]=0;for(t=0;19>t;t++)H[2*t]=0;L[512]=1,e.opt_len=e.static_len=0,G=J=0}function re(e,t){let r,n=-1,s=e[1],a=0,i=7,o=4;0===s&&(i=138,o=3),e[2*(t+1)+1]=65535;for(let l=0;t>=l;l++)r=s,s=e[2*(l+1)+1],++aa?H[2*r]+=a:0!==r?(r!=n&&H[2*r]++,H[32]++):a>10?H[36]++:H[34]++,a=0,n=r,0===s?(i=138,o=3):r==s?(i=6,o=3):(i=7,o=4))}function ne(t){e.pending_buf[e.pending++]=t}function se(e){ne(255&e),ne(e>>>8&255)}function ae(e,t){let r;const n=t;ee>16-n?(r=e,$|=r<>>16-ee,ee+=n-16):($|=e<=r;r++)if(n=a,a=e[2*(r+1)+1],++i>=o||n!=a){if(l>i)do{ie(n,H)}while(0!=--i);else 0!==n?(n!=s&&(ie(n,H),i--),ie(16,H),ae(i-3,2)):i>10?(ie(18,H),ae(i-11,7)):(ie(17,H),ae(i-3,3));i=0,s=n,0===a?(o=138,l=3):n==a?(o=6,l=3):(o=7,l=4)}}function le(){16==ee?(se($),$=0,ee=0):8>ee||(ne(255&$),$>>>=8,ee-=8)}function ce(t,r){let n,s,a;if(e.dist_buf[G]=t,e.lc_buf[G]=255&r,G++,0===t?L[2*r]++:(J++,t--,L[2*(U._length_code[r]+256+1)]++,O[2*U.d_code(t)]++),0==(8191&G)&&F>2){for(n=8*G,s=k-b,a=0;30>a;a++)n+=O[2*a]*(5+U.extra_dbits[a]);if(n>>>=3,Jo);ie(256,t),Q=t[513]}function ue(){ee>8?se($):ee>0&&ne(255&$),$=0,ee=0}function fe(t,r,n){ae(0+(n?1:0),3),((t,r)=>{ue(),Q=8,se(r),se(~r),e.pending_buf.set(c.subarray(t,t+r),e.pending),e.pending+=r})(t,r)}function pe(r){((t,r,n)=>{let s,a,i=0;F>0?(K.build_tree(e),j.build_tree(e),i=(()=>{let t;for(re(L,K.max_code),re(O,j.max_code),X.build_tree(e),t=18;t>=3&&0===H[2*U.bl_order[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t})(),s=e.opt_len+3+7>>>3,a=e.static_len+3+7>>>3,a>s||(s=a)):s=a=r+5,r+4>s||-1==t?a==s?(ae(2+(n?1:0),3),de(I.static_ltree,I.static_dtree)):(ae(4+(n?1:0),3),((e,t,r)=>{let n;for(ae(e-257,5),ae(t-1,5),ae(r-4,4),n=0;r>n;n++)ae(H[2*U.bl_order[n]+1],3);oe(L,e-1),oe(O,t-1)})(K.max_code+1,j.max_code+1,i+1),de(L,O)):fe(t,r,n),te(),n&&ue()})(0>b?-1:b,k-b,r),b=k,t.flush_pending()}function he(){let e,r,n,s;do{if(s=d-E-k,0===s&&0===k&&0===E)s=a;else if(-1==s)s--;else if(k>=a+a-V){c.set(c.subarray(a,a+a),0),v-=a,k-=a,b-=a,e=m,n=e;do{r=65535&f[--n],f[n]=a>r?0:r-a}while(0!=--e);e=a,n=e;do{r=65535&u[--n],u[n]=a>r?0:r-a}while(0!=--e);s+=a}if(0===t.avail_in)return;e=t.read_buf(c,k+E,s),E+=e,3>E||(w=255&c[k],w=(w<E&&0!==t.avail_in)}function we(e){let t,r,n=R,s=k,i=D;const o=k>a-V?k-(a-V):0;let d=N;const f=l,p=k+258;let h=c[s+i-1],w=c[s+i];W>D||(n>>=2),d>E&&(d=E);do{if(t=e,c[t+i]==w&&c[t+i-1]==h&&c[t]==c[s]&&c[++t]==c[s+1]){s+=2,t++;do{}while(c[++s]==c[++t]&&c[++s]==c[++t]&&c[++s]==c[++t]&&c[++s]==c[++t]&&c[++s]==c[++t]&&c[++s]==c[++t]&&c[++s]==c[++t]&&c[++s]==c[++t]&&p>s);if(r=258-(p-s),s=p-258,r>i){if(v=e,i=r,r>=d)break;h=c[s+i-1],w=c[s+i]}}}while((e=65535&u[e&f])>o&&0!=--n);return i>E?E:i}e.depth=[],e.bl_count=[],e.heap=[],L=[],O=[],H=[],e.pqdownheap=(t,r)=>{const n=e.heap,s=n[r];let a=r<<1;for(;a<=e.heap_len&&(a(U||(U=8),P||(P=8),B||(B=0),t.msg=null,-1==S&&(S=6),1>P||P>9||8!=U||9>v||v>15||0>S||S>9||0>B||B>2?A:(t.dstate=e,o=v,a=1<(t.total_in=t.total_out=0,t.msg=null,e.pending=0,e.pending_out=0,r=q,s=0,K.dyn_tree=L,K.stat_desc=I.static_l_desc,j.dyn_tree=O,j.stat_desc=I.static_d_desc,X.dyn_tree=H,X.stat_desc=I.static_bl_desc,$=0,ee=0,Q=8,te(),(()=>{d=2*a,f[m-1]=0;for(let e=0;m-1>e;e++)f[e]=0;T=M[F].max_lazy,W=M[F].good_length,N=M[F].nice_length,R=M[F].max_chain,k=0,b=0,E=0,x=D=2,z=0,w=0})(),0))(t))),e.deflateEnd=()=>42!=r&&r!=q&&r!=B?A:(e.lc_buf=null,e.dist_buf=null,e.pending_buf=null,f=null,u=null,c=null,e.dstate=null,r==q?-3:0),e.deflateParams=(e,t,r)=>{let n=0;return-1==t&&(t=6),0>t||t>9||0>r||r>2?A:(M[F].func!=M[t].func&&0!==e.total_in&&(n=e.deflate(1)),F!=t&&(F=t,T=M[F].max_lazy,W=M[F].good_length,N=M[F].nice_length,R=M[F].max_chain),C=r,n)},e.deflateSetDictionary=(e,t,n)=>{let s,i=n,o=0;if(!t||42!=r)return A;if(3>i)return 0;for(i>a-V&&(i=a-V,o=n-i),c.set(t.subarray(o,o+i),0),k=i,b=i,w=255&c[0],w=(w<=s;s++)w=(w<{let p,h,g,R,W;if(d>4||0>d)return A;if(!i.next_out||!i.next_in&&0!==i.avail_in||r==B&&4!=d)return i.msg=P[4],A;if(0===i.avail_out)return i.msg=P[7],-5;var N;if(t=i,R=s,s=d,42==r&&(h=8+(o-8<<4)<<8,g=(F-1&255)>>1,g>3&&(g=3),h|=g<<6,0!==k&&(h|=32),h+=31-h%31,r=q,ne((N=h)>>8&255),ne(255&N)),0!==e.pending){if(t.flush_pending(),0===t.avail_out)return s=-1,0}else if(0===t.avail_in&&R>=d&&4!=d)return t.msg=P[7],-5;if(r==B&&0!==t.avail_in)return i.msg=P[7],-5;if(0!==t.avail_in||0!==E||0!=d&&r!=B){switch(W=-1,M[F].func){case 0:W=(e=>{let r,s=65535;for(s>n-5&&(s=n-5);;){if(1>=E){if(he(),0===E&&0==e)return 0;if(0===E)break}if(k+=E,E=0,r=b+s,(0===k||k>=r)&&(E=k-r,k=r,pe(!1),0===t.avail_out))return 0;if(k-b>=a-V&&(pe(!1),0===t.avail_out))return 0}return pe(4==e),0===t.avail_out?4==e?2:0:4==e?3:1})(d);break;case 1:W=(e=>{let r,n=0;for(;;){if(V>E){if(he(),V>E&&0==e)return 0;if(0===E)break}if(3>E||(w=(w<a-V||2!=C&&(x=we(n)),3>x)r=ce(0,255&c[k]),E--,k++;else if(r=ce(k-v,x-3),E-=x,x>T||3>E)k+=x,x=0,w=255&c[k],w=(w<{let r,n,s=0;for(;;){if(V>E){if(he(),V>E&&0==e)return 0;if(0===E)break}if(3>E||(w=(w<D&&a-V>=(k-s&65535)&&(2!=C&&(x=we(s)),5>=x&&(1==C||3==x&&k-v>4096)&&(x=2)),3>D||x>D)if(0!==z){if(r=ce(0,255&c[k-1]),r&&pe(!1),k++,E--,0===t.avail_out)return 0}else z=1,k++,E--;else{n=k+E-3,r=ce(k-1-S,D-3),E-=D-1,D-=2;do{++k>n||(w=(w<1+Q+10-ee&&(ae(2,3),ie(256,I.static_ltree),le()),Q=7;else if(fe(0,0,!1),3==d)for(p=0;m>p;p++)f[p]=0;if(t.flush_pending(),0===t.avail_out)return s=-1,0}}return 4!=d?0:1}}function j(){const e=this;e.next_in_index=0,e.next_out_index=0,e.avail_in=0,e.total_in=0,e.avail_out=0,e.total_out=0}j.prototype={deflateInit(e,t){const r=this;return r.dstate=new K,t||(t=15),r.dstate.deflateInit(r,e,t)},deflate(e){const t=this;return t.dstate?t.dstate.deflate(t,e):A},deflateEnd(){const e=this;if(!e.dstate)return A;const t=e.dstate.deflateEnd();return e.dstate=null,t},deflateParams(e,t){const r=this;return r.dstate?r.dstate.deflateParams(r,e,t):A},deflateSetDictionary(e,t){const r=this;return r.dstate?r.dstate.deflateSetDictionary(r,e,t):A},read_buf(e,t,r){const n=this;let s=n.avail_in;return s>r&&(s=r),0===s?0:(n.avail_in-=s,e.set(n.next_in.subarray(n.next_in_index,n.next_in_index+s),t),n.next_in_index+=s,n.total_in+=s,s)},flush_pending(){const e=this;let t=e.dstate.pending;t>e.avail_out&&(t=e.avail_out),0!==t&&(e.next_out.set(e.dstate.pending_buf.subarray(e.dstate.pending_out,e.dstate.pending_out+t),e.next_out_index),e.next_out_index+=t,e.dstate.pending_out+=t,e.total_out+=t,e.avail_out-=t,e.dstate.pending-=t,0===e.dstate.pending&&(e.dstate.pending_out=0))}};const X=4294967295,Y=65535,G=new o(2107,11,31),J=new o(1980,0,1),Q=void 0,$="undefined",ee="function";class te{constructor(e){return class extends k{constructor(t,r){const n=new e(r);super({transform(e,t){t.enqueue(n.append(e))},flush(e){const t=n.flush();t&&e.enqueue(t)}})}}}}let re=2;try{typeof T!=$&&T.hardwareConcurrency&&(re=T.hardwareConcurrency)}catch(e){}const ne={chunkSize:524288,maxWorkers:re,terminateWorkerTimeout:5e3,useWebWorkers:!0,useCompressionStream:!0,workerScripts:Q,CompressionStreamNative:typeof D!=$&&D,DecompressionStreamNative:typeof R!=$&&R},se=r.assign({},ne);function ae(){return se}function ie(e){const{baseURL:r,chunkSize:n,maxWorkers:s,terminateWorkerTimeout:a,useCompressionStream:i,useWebWorkers:o,Deflate:l,Inflate:c,CompressionStream:d,DecompressionStream:u,workerScripts:p}=e;if(oe("baseURL",r),oe("chunkSize",n),oe("maxWorkers",s),oe("terminateWorkerTimeout",a),oe("useCompressionStream",i),oe("useWebWorkers",o),l&&(se.CompressionStream=new te(l)),c&&(se.DecompressionStream=new te(c)),oe("CompressionStream",d),oe("DecompressionStream",u),p!==Q){const{deflate:e,inflate:r}=p;if((e||r)&&(se.workerScripts||(se.workerScripts={})),e){if(!t.isArray(e))throw new f("workerScripts.deflate must be an array");se.workerScripts.deflate=e}if(r){if(!t.isArray(r))throw new f("workerScripts.inflate must be an array");se.workerScripts.inflate=r}}}function oe(e,t){t!==Q&&(se[e]=t)}const le=[];for(let e=0;256>e;e++){let t=e;for(let e=0;8>e;e++)1&t?t=t>>>1^3988292384:t>>>=1;le[e]=t}class ce{constructor(e){this.crc=e||-1}append(e){let t=0|this.crc;for(let r=0,n=0|e.length;n>r;r++)t=t>>>8^le[255&(t^e[r])];this.crc=t}get(){return~this.crc}}class de extends k{constructor(){let e;const t=new ce;super({transform(e,r){t.append(e),r.enqueue(e)},flush(){const r=new p(4);new m(r.buffer).setUint32(0,t.get()),e.value=r}}),e=this}}function ue(e){if(typeof y==$){const t=new p((e=unescape(encodeURIComponent(e))).length);for(let r=0;r0&&t&&(e[r-1]=fe.partial(t,e[r-1]&2147483648>>t-1,1)),e},partial:(e,t,r)=>32===e?t:(r?0|t:t<<32-e)+1099511627776*e,getPartial:e=>i.round(e/1099511627776)||32,_shiftRight(e,t,r,n){for(void 0===n&&(n=[]);t>=32;t-=32)n.push(r),r=0;if(0===t)return n.concat(e);for(let s=0;s>>t),r=e[s]<<32-t;const s=e.length?e[e.length-1]:0,a=fe.getPartial(s);return n.push(fe.partial(t+a&31,t+a>32?r:n.pop(),1)),n}},pe={bytes:{fromBits(e){const t=fe.bitLength(e)/8,r=new p(t);let n;for(let s=0;t>s;s++)0==(3&s)&&(n=e[s/4]),r[s]=n>>>24,n<<=8;return r},toBits(e){const t=[];let r,n=0;for(r=0;r9007199254740991)throw new f("Cannot hash more than 2^53 - 1 bits");const a=new w(r);let i=0;for(let e=t.blockSize+n-(t.blockSize+n&t.blockSize-1);s>=e;e+=t.blockSize)t._block(a.subarray(16*i,16*(i+1))),i+=1;return r.splice(0,16*i),t}finalize(){const e=this;let t=e._buffer;const r=e._h;t=fe.concat(t,[fe.partial(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(i.floor(e._length/4294967296)),t.push(0|e._length);t.length;)e._block(t.splice(0,16));return e.reset(),r}_f(e,t,r,n){return e>19?e>39?e>59?e>79?void 0:t^r^n:t&r|t&n|r&n:t^r^n:t&r|~t&n}_S(e,t){return t<>>32-e}_block(e){const r=this,n=r._h,s=t(80);for(let t=0;16>t;t++)s[t]=e[t];let a=n[0],o=n[1],l=n[2],c=n[3],d=n[4];for(let e=0;79>=e;e++){16>e||(s[e]=r._S(1,s[e-3]^s[e-8]^s[e-14]^s[e-16]));const t=r._S(5,a)+r._f(e,o,l,c)+d+s[e]+r._key[i.floor(e/20)]|0;d=c,c=l,l=r._S(30,o),o=a,a=t}n[0]=n[0]+a|0,n[1]=n[1]+o|0,n[2]=n[2]+l|0,n[3]=n[3]+c|0,n[4]=n[4]+d|0}},we={getRandomValues(e){const t=new w(e.buffer),r=e=>{let t=987654321;const r=4294967295;return()=>(t=36969*(65535&t)+(t>>16)&r,(((t<<16)+(e=18e3*(65535&e)+(e>>16)&r)&r)/4294967296+.5)*(i.random()>.5?1:-1))};for(let n,s=0;snew me.hmacSha1(pe.bytes.toBits(e)),pbkdf2(e,t,r,n){if(r=r||1e4,0>n||0>r)throw new f("invalid params to pbkdf2");const s=1+(n>>5)<<2;let a,i,o,l,c;const d=new ArrayBuffer(s),u=new m(d);let p=0;const h=fe;for(t=pe.bytes.toBits(t),c=1;(s||1)>p;c++){for(a=i=e.encrypt(h.concat(t,[c])),o=1;r>o;o++)for(i=e.encrypt(i),l=0;lp&&os&&(e=(new r).update(e).finalize());for(let t=0;s>t;t++)n[0][t]=909522486^e[t],n[1][t]=1549556828^e[t];t._baseHash[0].update(n[0]),t._baseHash[1].update(n[1]),t._resultHash=new r(t._baseHash[0])}reset(){const e=this;e._resultHash=new e._hash(e._baseHash[0]),e._updated=!1}update(e){this._updated=!0,this._resultHash.update(e)}digest(){const e=this,t=e._resultHash.finalize(),r=new e._hash(e._baseHash[1]).update(t).finalize();return e.reset(),r}encrypt(e){if(this._updated)throw new f("encrypt on already updated hmac called!");return this.update(e),this.digest(e)}}},ge=typeof S!=$&&typeof S.getRandomValues==ee,_e="Invalid password",ye="Invalid signature",be="zipjs-abort-check-password";function xe(e){return ge?S.getRandomValues(e):we.getRandomValues(e)}const Se=16,ze={name:"PBKDF2"},ke=r.assign({hash:{name:"HMAC"}},ze),ve=r.assign({iterations:1e3,hash:{name:"SHA-1"}},ze),Ee=["deriveBits"],De=[8,12,16],Re=[16,24,32],Te=10,Fe=[0,0,0,0],Ae=typeof S!=$,Ce=Ae&&S.subtle,We=Ae&&typeof Ce!=$,Ne=pe.bytes,Ue=class{constructor(e){const t=this;t._tables=[[[],[],[],[],[]],[[],[],[],[],[]]],t._tables[0][0][0]||t._precompute();const r=t._tables[0][4],n=t._tables[1],s=e.length;let a,i,o,l=1;if(4!==s&&6!==s&&8!==s)throw new f("invalid aes key size");for(t._key=[i=e.slice(0),o=[]],a=s;4*s+28>a;a++){let e=i[a-1];(a%s==0||8===s&&a%s==4)&&(e=r[e>>>24]<<24^r[e>>16&255]<<16^r[e>>8&255]<<8^r[255&e],a%s==0&&(e=e<<8^e>>>24^l<<24,l=l<<1^283*(l>>7))),i[a]=i[a-s]^e}for(let e=0;a;e++,a--){const t=i[3&e?a:a-4];o[e]=4>=a||4>e?t:n[0][r[t>>>24]]^n[1][r[t>>16&255]]^n[2][r[t>>8&255]]^n[3][r[255&t]]}}encrypt(e){return this._crypt(e,0)}decrypt(e){return this._crypt(e,1)}_precompute(){const e=this._tables[0],t=this._tables[1],r=e[4],n=t[4],s=[],a=[];let i,o,l,c;for(let e=0;256>e;e++)a[(s[e]=e<<1^283*(e>>7))^e]=e;for(let d=i=0;!r[d];d^=o||1,i=a[i]||1){let a=i^i<<1^i<<2^i<<3^i<<4;a=a>>8^255&a^99,r[d]=a,n[a]=d,c=s[l=s[o=s[d]]];let u=16843009*c^65537*l^257*o^16843008*d,f=257*s[a]^16843008*a;for(let r=0;4>r;r++)e[r][d]=f=f<<24^f>>>8,t[r][a]=u=u<<24^u>>>8}for(let r=0;5>r;r++)e[r]=e[r].slice(0),t[r]=t[r].slice(0)}_crypt(e,t){if(4!==e.length)throw new f("invalid aes block size");const r=this._key[t],n=r.length/4-2,s=[0,0,0,0],a=this._tables[t],i=a[0],o=a[1],l=a[2],c=a[3],d=a[4];let u,p,h,w=e[0]^r[0],m=e[t?3:1]^r[1],g=e[2]^r[2],_=e[t?1:3]^r[3],y=4;for(let e=0;n>e;e++)u=i[w>>>24]^o[m>>16&255]^l[g>>8&255]^c[255&_]^r[y],p=i[m>>>24]^o[g>>16&255]^l[_>>8&255]^c[255&w]^r[y+1],h=i[g>>>24]^o[_>>16&255]^l[w>>8&255]^c[255&m]^r[y+2],_=i[_>>>24]^o[w>>16&255]^l[m>>8&255]^c[255&g]^r[y+3],y+=4,w=u,m=p,g=h;for(let e=0;4>e;e++)s[t?3&-e:e]=d[w>>>24]<<24^d[m>>16&255]<<16^d[g>>8&255]<<8^d[255&_]^r[y++],u=w,w=m,m=g,g=_,_=u;return s}},Ie=class{constructor(e,t){this._prf=e,this._initIv=t,this._iv=t}reset(){this._iv=this._initIv}update(e){return this.calculate(this._prf,e,this._iv)}incWord(e){if(255==(e>>24&255)){let t=e>>16&255,r=e>>8&255,n=255&e;255===t?(t=0,255===r?(r=0,255===n?n=0:++n):++r):++t,e=0,e+=t<<16,e+=r<<8,e+=n}else e+=1<<24;return e}incCounter(e){0===(e[0]=this.incWord(e[0]))&&(e[1]=this.incWord(e[1]))}calculate(e,t,r){let n;if(!(n=t.length))return[];const s=fe.bitLength(t);for(let s=0;n>s;s+=4){this.incCounter(r);const n=e.encrypt(r);t[s]^=n[0],t[s+1]^=n[1],t[s+2]^=n[2],t[s+3]^=n[3]}return fe.clamp(t,s)}},Le=me.hmacSha1;let Oe=Ae&&We&&typeof Ce.importKey==ee,He=Ae&&We&&typeof Ce.deriveBits==ee;class Me extends k{constructor({password:e,rawPassword:t,signed:n,encryptionStrength:s,checkPasswordOnly:a}){super({start(){r.assign(this,{ready:new _((e=>this.resolveReady=e)),password:Ve(e,t),signed:n,strength:s-1,pending:new p})},async transform(e,t){const r=this,{password:n,strength:s,resolveReady:i,ready:o}=r;n?(await(async(e,t,r,n)=>{const s=await Be(e,t,r,Ke(n,0,De[t])),a=Ke(n,De[t]);if(s[0]!=a[0]||s[1]!=a[1])throw new f(_e)})(r,s,n,Ke(e,0,De[s]+2)),e=Ke(e,De[s]+2),a?t.error(new f(be)):i()):await o;const l=new p(e.length-Te-(e.length-Te)%Se);t.enqueue(qe(r,e,l,0,Te,!0))},async flush(e){const{signed:t,ctr:r,hmac:n,pending:s,ready:a}=this;if(n&&r){await a;const i=Ke(s,0,s.length-Te),o=Ke(s,s.length-Te);let l=new p;if(i.length){const e=Xe(Ne,i);n.update(e);const t=r.update(e);l=je(Ne,t)}if(t){const e=Ke(je(Ne,n.digest()),0,Te);for(let t=0;Te>t;t++)if(e[t]!=o[t])throw new f(ye)}e.enqueue(l)}}})}}class Pe extends k{constructor({password:e,rawPassword:t,encryptionStrength:n}){let s;super({start(){r.assign(this,{ready:new _((e=>this.resolveReady=e)),password:Ve(e,t),strength:n-1,pending:new p})},async transform(e,t){const r=this,{password:n,strength:s,resolveReady:a,ready:i}=r;let o=new p;n?(o=await(async(e,t,r)=>{const n=xe(new p(De[t]));return Ze(n,await Be(e,t,r,n))})(r,s,n),a()):await i;const l=new p(o.length+e.length-e.length%Se);l.set(o,0),t.enqueue(qe(r,e,l,o.length,0))},async flush(e){const{ctr:t,hmac:r,pending:n,ready:a}=this;if(r&&t){await a;let i=new p;if(n.length){const e=t.update(Xe(Ne,n));r.update(e),i=je(Ne,e)}s.signature=je(Ne,r.digest()).slice(0,Te),e.enqueue(Ze(i,s.signature))}}}),s=this}}function qe(e,t,r,n,s,a){const{ctr:i,hmac:o,pending:l}=e,c=t.length-s;let d;for(l.length&&(t=Ze(l,t),r=((e,t)=>{if(t&&t>e.length){const r=e;(e=new p(t)).set(r,0)}return e})(r,c-c%Se)),d=0;c-Se>=d;d+=Se){const e=Xe(Ne,Ke(t,d,d+Se));a&&o.update(e);const s=i.update(e);a||o.update(s),r.set(je(Ne,s),d+n)}return e.pending=Ke(t,d),r}async function Be(e,n,s,a){e.password=null;const i=await(async(e,t,r,n,s)=>{if(!Oe)return me.importKey(t);try{return await Ce.importKey("raw",t,r,!1,s)}catch(e){return Oe=!1,me.importKey(t)}})(0,s,ke,0,Ee),o=await(async(e,t,r)=>{if(!He)return me.pbkdf2(t,e.salt,ve.iterations,r);try{return await Ce.deriveBits(e,t,r)}catch(n){return He=!1,me.pbkdf2(t,e.salt,ve.iterations,r)}})(r.assign({salt:a},ve),i,8*(2*Re[n]+2)),l=new p(o),c=Xe(Ne,Ke(l,0,Re[n])),d=Xe(Ne,Ke(l,Re[n],2*Re[n])),u=Ke(l,2*Re[n]);return r.assign(e,{keys:{key:c,authentication:d,passwordVerification:u},ctr:new Ie(new Ue(c),t.from(Fe)),hmac:new Le(d)}),u}function Ve(e,t){return t===Q?ue(e):t}function Ze(e,t){let r=e;return e.length+t.length&&(r=new p(e.length+t.length),r.set(e,0),r.set(t,e.length)),r}function Ke(e,t,r){return e.subarray(t,r)}function je(e,t){return e.fromBits(t)}function Xe(e,t){return e.toBits(t)}class Ye extends k{constructor({password:e,passwordVerification:t,checkPasswordOnly:n}){super({start(){r.assign(this,{password:e,passwordVerification:t}),$e(this,e)},transform(e,t){const r=this;if(r.password){const t=Je(r,e.subarray(0,12));if(r.password=null,t[11]!=r.passwordVerification)throw new f(_e);e=e.subarray(12)}n?t.error(new f(be)):t.enqueue(Je(r,e))}})}}class Ge extends k{constructor({password:e,passwordVerification:t}){super({start(){r.assign(this,{password:e,passwordVerification:t}),$e(this,e)},transform(e,t){const r=this;let n,s;if(r.password){r.password=null;const t=xe(new p(12));t[11]=r.passwordVerification,n=new p(e.length+t.length),n.set(Qe(r,t),0),s=12}else n=new p(e.length),s=0;n.set(Qe(r,e),s),t.enqueue(n)}})}}function Je(e,t){const r=new p(t.length);for(let n=0;n>>24]),s=~e.crcKey2.get(),e.keys=[r,n,s]}function tt(e){const t=2|e.keys[2];return rt(i.imul(t,1^t)>>>8)}function rt(e){return 255&e}function nt(e){return 4294967295&e}const st="deflate-raw";class at extends k{constructor(e,{chunkSize:t,CompressionStream:r,CompressionStreamNative:n}){super({});const{compressed:s,encrypted:a,useCompressionStream:i,zipCrypto:o,signed:l,level:c}=e,d=this;let u,f,p=ot(super.readable);a&&!o||!l||(u=new de,p=dt(p,u)),s&&(p=ct(p,i,{level:c,chunkSize:t},n,r)),a&&(o?p=dt(p,new Ge(e)):(f=new Pe(e),p=dt(p,f))),lt(d,p,(()=>{let e;a&&!o&&(e=f.signature),a&&!o||!l||(e=new m(u.value.buffer).getUint32(0)),d.signature=e}))}}class it extends k{constructor(e,{chunkSize:t,DecompressionStream:r,DecompressionStreamNative:n}){super({});const{zipCrypto:s,encrypted:a,signed:i,signature:o,compressed:l,useCompressionStream:c}=e;let d,u,p=ot(super.readable);a&&(s?p=dt(p,new Ye(e)):(u=new Me(e),p=dt(p,u))),l&&(p=ct(p,c,{chunkSize:t},n,r)),a&&!s||!i||(d=new de,p=dt(p,d)),lt(this,p,(()=>{if((!a||s)&&i){const e=new m(d.value.buffer);if(o!=e.getUint32(0,!1))throw new f(ye)}}))}}function ot(e){return dt(e,new k({transform(e,t){e&&e.length&&t.enqueue(e)}}))}function lt(e,t,n){t=dt(t,new k({flush:n})),r.defineProperty(e,"readable",{get:()=>t})}function ct(e,t,r,n,s){try{e=dt(e,new(t&&n?n:s)(st,r))}catch(n){if(!t)return e;try{e=dt(e,new s(st,r))}catch(t){return e}}return e}function dt(e,t){return e.pipeThrough(t)}const ut="data",ft="close",pt="deflate";class ht extends k{constructor(e,t){super({});const n=this,{codecType:s}=e;let a;s.startsWith(pt)?a=at:s.startsWith("inflate")&&(a=it);let i=0,o=0;const l=new a(e,t),c=super.readable,d=new k({transform(e,t){e&&e.length&&(o+=e.length,t.enqueue(e))},flush(){r.assign(n,{inputSize:o})}}),u=new k({transform(e,t){e&&e.length&&(i+=e.length,t.enqueue(e))},flush(){const{signature:e}=l;r.assign(n,{signature:e,outputSize:i,inputSize:o})}});r.defineProperty(n,"readable",{get:()=>c.pipeThrough(d).pipeThrough(l).pipeThrough(u)})}}class wt extends k{constructor(e){let t;super({transform:function r(n,s){if(t){const e=new p(t.length+n.length);e.set(t),e.set(n,t.length),n=e,t=null}n.length>e?(s.enqueue(n.slice(0,e)),r(n.slice(e),s)):t=n},flush(e){t&&t.length&&e.enqueue(t)}})}}let mt=typeof F!=$;class gt{constructor(e,{readable:t,writable:n},{options:s,config:a,streamOptions:i,useWebWorkers:o,transferStreams:l,scripts:c},d){const{signal:u}=i;return r.assign(e,{busy:!0,readable:t.pipeThrough(new wt(a.chunkSize)).pipeThrough(new _t(t,i),{signal:u}),writable:n,options:r.assign({},s),scripts:c,transferStreams:l,terminate:()=>new _((t=>{const{worker:r,busy:n}=e;r?(n?e.resolveTerminated=t:(r.terminate(),t()),e.interface=null):t()})),onTaskFinished(){const{resolveTerminated:t}=e;t&&(e.resolveTerminated=null,e.terminated=!0,e.worker.terminate(),t()),e.busy=!1,d(e)}}),(o&&mt?xt:bt)(e,a)}}class _t extends k{constructor(e,{onstart:t,onprogress:r,size:n,onend:s}){let a=0;super({async start(){t&&await yt(t,n)},async transform(e,t){a+=e.length,r&&await yt(r,a,n),t.enqueue(e)},async flush(){e.size=a,s&&await yt(s,a)}})}}async function yt(e,...t){try{await e(...t)}catch(e){}}function bt(e,t){return{run:()=>(async({options:e,readable:t,writable:r,onTaskFinished:n},s)=>{try{const a=new ht(e,s);await t.pipeThrough(a).pipeTo(r,{preventClose:!0,preventAbort:!0});const{signature:i,inputSize:o,outputSize:l}=a;return{signature:i,inputSize:o,outputSize:l}}finally{n()}})(e,t)}}function xt(e,t){const{baseURL:n,chunkSize:s}=t;if(!e.interface){let a;try{a=((e,t,n)=>{const s={type:"module"};let a,i;typeof e==ee&&(e=e());try{a=new u(e,t)}catch(t){a=e}if(St)try{i=new F(a)}catch(e){St=!1,i=new F(a,s)}else i=new F(a,s);return i.addEventListener("message",(e=>(async({data:e},t)=>{const{type:n,value:s,messageId:a,result:i,error:o}=e,{reader:l,writer:c,resolveResult:d,rejectResult:u,onTaskFinished:h}=t;try{if(o){const{message:e,stack:t,code:n,name:s}=o,a=new f(e);r.assign(a,{stack:t,code:n,name:s}),w(a)}else{if("pull"==n){const{value:e,done:r}=await l.read();kt({type:ut,value:e,done:r,messageId:a},t)}n==ut&&(await c.ready,await c.write(new p(s)),kt({type:"ack",messageId:a},t)),n==ft&&w(null,i)}}catch(o){kt({type:ft,messageId:a},t),w(o)}function w(e,t){e?u(e):d(t),c&&c.releaseLock(),h()}})(e,n))),i})(e.scripts[0],n,e)}catch(r){return mt=!1,bt(e,t)}r.assign(e,{worker:a,interface:{run:()=>(async(e,t)=>{let n,s;const a=new _(((e,t)=>{n=e,s=t}));r.assign(e,{reader:null,writer:null,resolveResult:n,rejectResult:s,result:a});const{readable:i,options:o,scripts:l}=e,{writable:c,closed:d}=(e=>{let t;const r=new _((e=>t=e));return{writable:new E({async write(t){const r=e.getWriter();await r.ready,await r.write(t),r.releaseLock()},close(){t()},abort:t=>e.getWriter().abort(t)}),closed:r}})(e.writable),u=kt({type:"start",scripts:l.slice(1),options:o,config:t,readable:i,writable:c},e);u||r.assign(e,{reader:i.getReader(),writer:c.getWriter()});const f=await a;return u||await c.getWriter().close(),await d,f})(e,{chunkSize:s})}})}return e.interface}let St=!0,zt=!0;function kt(e,{worker:t,writer:r,onTaskFinished:n,transferStreams:s}){try{let{value:r,readable:n,writable:a}=e;const i=[];if(r&&(r.byteLengtha?n.close():this.chunkOffset+=t}});return r}}class Ot extends It{constructor(){super();const e=this,t=new E({write:t=>e.writeUint8Array(t)});r.defineProperty(e,Ut,{get:()=>t})}writeUint8Array(){}}class Ht extends Lt{constructor(e){super(),r.assign(this,{blob:e,size:e.size})}async readUint8Array(e,t){const r=this,n=e+t,s=e||nt&&(a=a.slice(e,n)),new p(a)}}class Mt extends It{constructor(e){super();const t=new k,n=[];e&&n.push(["Content-Type",e]),r.defineProperty(this,Ut,{get:()=>t.writable}),this.blob=new d(t.readable,{headers:n}).blob()}getData(){return this.blob}}class Pt extends Lt{constructor(e,t){super(),Bt(this,e,t)}async init(){await Vt(this,Qt,Xt),super.init()}readUint8Array(e,t){return Zt(this,e,t,Qt,Xt)}}class qt extends Lt{constructor(e,t){super(),Bt(this,e,t)}async init(){await Vt(this,$t,Yt),super.init()}readUint8Array(e,t){return Zt(this,e,t,$t,Yt)}}function Bt(e,t,n){const{preventHeadRequest:s,useRangeHeader:a,forceRangeRequests:i}=n;delete(n=r.assign({},n)).preventHeadRequest,delete n.useRangeHeader,delete n.forceRangeRequests,delete n.useXHR,r.assign(e,{url:t,options:n,preventHeadRequest:s,useRangeHeader:a,forceRangeRequests:i})}async function Vt(e,t,r){const{url:n,useRangeHeader:a,forceRangeRequests:i}=e;if((e=>{const{baseURL:t}=ae(),{protocol:r}=new u(e,t);return"http:"==r||"https:"==r})(n)&&(a||i)){const{headers:n}=await t(Ct,e,Kt(e));if(!i&&n.get("Accept-Ranges")!=Wt)throw new f(Ft);{let a;const i=n.get("Content-Range");if(i){const e=i.trim().split(/\s*\/\s*/);if(e.length){const t=e[1];t&&"*"!=t&&(a=s(t))}}a===Q?await Jt(e,t,r):e.size=a}}else await Jt(e,t,r)}async function Zt(e,t,r,n,s){const{useRangeHeader:a,forceRangeRequests:i,options:o}=e;if(a||i){const s=await n(Ct,e,Kt(e,t,r));if(206!=s.status)throw new f(Ft);return new p(await s.arrayBuffer())}{const{data:n}=e;return n||await s(e,o),new p(e.data.subarray(t,t+r))}}function Kt(e,t=0,n=1){return r.assign({},jt(e),{Range:Wt+"="+t+"-"+(t+n-1)})}function jt({options:e}){const{headers:t}=e;if(t)return Symbol.iterator in t?r.fromEntries(t):t}async function Xt(e){await Gt(e,Qt)}async function Yt(e){await Gt(e,$t)}async function Gt(e,t){const r=await t(Ct,e,jt(e));e.data=new p(await r.arrayBuffer()),e.size||(e.size=e.data.length)}async function Jt(e,t,r){if(e.preventHeadRequest)await r(e,e.options);else{const n=(await t("HEAD",e,jt(e))).headers.get("Content-Length");n?e.size=s(n):await r(e,e.options)}}async function Qt(e,{options:t,url:n},s){const a=await fetch(n,r.assign({},t,{method:e,headers:s}));if(400>a.status)return a;throw 416==a.status?new f(Ft):new f(Tt+(a.statusText||a.status))}function $t(e,{url:t},n){return new _(((s,a)=>{const i=new XMLHttpRequest;if(i.addEventListener("load",(()=>{if(400>i.status){const e=[];i.getAllResponseHeaders().trim().split(/[\r\n]+/).forEach((t=>{const r=t.trim().split(/\s*:\s*/);r[0]=r[0].trim().replace(/^[a-z]|-[a-z]/g,(e=>e.toUpperCase())),e.push(r)})),s({status:i.status,arrayBuffer:()=>i.response,headers:new l(e)})}else a(416==i.status?new f(Ft):new f(Tt+(i.statusText||i.status)))}),!1),i.addEventListener("error",(e=>a(e.detail?e.detail.error:new f("Network error"))),!1),i.open(e,t),n)for(const e of r.entries(n))i.setRequestHeader(e[0],e[1]);i.responseType="arraybuffer",i.send()}))}class er extends Lt{constructor(e,t={}){super(),r.assign(this,{url:e,reader:t.useXHR?new qt(e,t):new Pt(e,t)})}set size(e){}get size(){return this.reader.size}async init(){await this.reader.init(),super.init()}readUint8Array(e,t){return this.reader.readUint8Array(e,t)}}class tr extends Lt{constructor(e){super(),this.readers=e}async init(){const e=this,{readers:t}=e;e.lastDiskNumber=0,e.lastDiskOffset=0,await _.all(t.map((async(r,n)=>{await r.init(),n!=t.length-1&&(e.lastDiskOffset+=r.size),e.size+=r.size}))),super.init()}async readUint8Array(e,t,r=0){const n=this,{readers:s}=this;let a,o=r;-1==o&&(o=s.length-1);let l=e;for(;l>=s[o].size;)l-=s[o].size,o++;const c=s[o],d=c.size;if(l+t>d){const s=d-l;a=new p(t),a.set(await ir(c,l,s)),a.set(await n.readUint8Array(e+s,t-s,r),s)}else a=await ir(c,l,t);return n.lastDiskNumber=i.max(o,n.lastDiskNumber),a}}class rr extends It{constructor(e,t=4294967295){super();const n=this;let s,a,i;r.assign(n,{diskNumber:0,diskOffset:0,size:0,maxSize:t,availableSize:t});const o=new E({async write(t){const{availableSize:r}=n;if(i)t.lengtho})}}async function nr(e,t){if(!e.init||e.initialized)return _.resolve();await e.init(t)}function sr(e){return t.isArray(e)&&(e=new tr(e)),e instanceof v&&(e={readable:e}),e}function ar(e){e.writable===Q&&typeof e.next==ee&&(e=new rr(e)),e instanceof E&&(e={writable:e});const{writable:t}=e;return t.size===Q&&(t.size=0),e instanceof rr||r.assign(e,{diskNumber:0,diskOffset:0,availableSize:1/0,maxSize:1/0}),e}function ir(e,t,r,n){return e.readUint8Array(t,r,n)}const or=tr,lr=rr,cr="diskNumberStart",dr="lastModDate",ur="lastAccessDate",fr="creationDate",pr="internalFileAttribute",hr="externalFileAttribute",wr="msDosCompatible",mr="zip64",gr=["filename","rawFilename","compressedSize","uncompressedSize",dr,"rawLastModDate","comment","rawComment",ur,fr,"offset",cr,cr,pr,hr,wr,mr,"directory","bitFlag","encrypted","signature","filenameUTF8","commentUTF8","compressionMethod","version","versionMadeBy","extraField","rawExtraField","extraFieldZip64","extraFieldUnicodePath","extraFieldUnicodeComment","extraFieldAES","extraFieldNTFS","extraFieldExtendedTimestamp"];class _r{constructor(e){gr.forEach((t=>this[t]=e[t]))}}const yr="File already exists",br="Zip file comment exceeds 64KB",xr="File entry comment exceeds 64KB",Sr="File entry name exceeds 64KB",zr="Version exceeds 65535",kr="The strength must equal 1, 2, or 3",vr="Extra field type exceeds 65535",Er="Extra field data exceeds 64KB",Dr="Zip64 is not supported (make sure 'keepOrder' is set to 'true')",Rr=new p([7,0,2,0,65,69,3,0,0]);let Tr=0;const Fr=[];class Ar{constructor(e,t={}){const n=(e=ar(e)).availableSize!==Q&&e.availableSize>0&&e.availableSize!==1/0&&e.maxSize!==Q&&e.maxSize>0&&e.maxSize!==1/0;r.assign(this,{writer:e,addSplitZipSignature:n,options:t,config:ae(),files:new l,filenames:new c,offset:e.writable.size,pendingEntriesSize:0,pendingAddFileCalls:new c,bufferedWrites:0})}async add(e="",n,l={}){const c=this,{pendingAddFileCalls:u,config:g}=c;let y;TrFr.push(e)));try{if(e=e.trim(),c.filenames.has(e))throw new f(yr);return c.filenames.add(e),y=(async(e,n,l,c)=>{n=n.trim(),c.directory&&!n.endsWith("/")?n+="/":c.directory=n.endsWith("/");const u=ue(n);if(Pr(u)>Y)throw new f(Sr);const g=c.comment||"",y=ue(g);if(Pr(y)>Y)throw new f(xr);const b=Nr(e,c,"version",20);if(b>Y)throw new f(zr);const x=Nr(e,c,"versionMadeBy",20);if(x>Y)throw new f(zr);const S=Nr(e,c,dr,new o),z=Nr(e,c,ur),v=Nr(e,c,fr),E=Nr(e,c,wr,!0),D=Nr(e,c,pr,0),R=Nr(e,c,hr,0),T=Nr(e,c,"password"),F=Nr(e,c,"rawPassword"),A=Nr(e,c,"encryptionStrength",3),C=Nr(e,c,"zipCrypto"),W=Nr(e,c,"extendedTimestamp",!0),N=Nr(e,c,"keepOrder",!0),U=Nr(e,c,"level"),I=Nr(e,c,"useWebWorkers"),L=Nr(e,c,"bufferedWrite"),O=Nr(e,c,"dataDescriptorSignature",!1),H=Nr(e,c,"signal"),M=Nr(e,c,"useCompressionStream");let P=Nr(e,c,"dataDescriptor",!0),q=Nr(e,c,mr);if(T!==Q&&A!==Q&&(1>A||A>3))throw new f(kr);let B=new p;const{extraField:V}=c;if(V){let e=0,t=0;V.forEach((t=>e+=4+Pr(t))),B=new p(e),V.forEach(((e,r)=>{if(r>Y)throw new f(vr);if(Pr(e)>Y)throw new f(Er);Hr(B,new h([r]),t),Hr(B,new h([Pr(e)]),t+2),Hr(B,e,t+4),t+=4+Pr(e)}))}let Z=0,K=0,j=0;const $=!0===q;l&&(l=sr(l),await nr(l),l.size===Q?(P=!0,(q||q===Q)&&(q=!0,j=Z=X)):(j=l.size,Z=(e=>e+5*(i.floor(e/16383)+1))(j)));const{diskOffset:ee,diskNumber:te,maxSize:re}=e.writer,ne=$||j>=X,se=$||Z>=X,ae=$||e.offset+e.pendingEntriesSize-ee>=X,ie=Nr(e,c,"supportZip64SplitFile",!0)&&$||te+i.ceil(e.pendingEntriesSize/re)>=Y;if(ae||ne||se||ie){if(!1===q||!N)throw new f(Dr);q=!0}q=q||!1;const oe=(e=>{const{rawFilename:t,lastModDate:r,lastAccessDate:n,creationDate:s,rawPassword:a,password:o,level:l,zip64:c,zipCrypto:d,dataDescriptor:u,directory:f,rawExtraField:h,encryptionStrength:m,extendedTimestamp:g}=e,_=0!==l&&!f,y=!!(o&&Pr(o)||a&&Pr(a));let b,x,S,z,k=e.version;if(y&&!d){b=new p(Pr(Rr)+2);const e=Mr(b);Ir(e,0,39169),Hr(b,Rr,2),Ur(e,8,m)}else b=new p;if(g){S=new p(9+(n?4:0)+(s?4:0));const e=Mr(S);Ir(e,0,21589),Ir(e,2,Pr(S)-4),z=1+(n?2:0)+(s?4:0),Ur(e,4,z);let t=5;Lr(e,t,i.floor(r.getTime()/1e3)),t+=4,n&&(Lr(e,t,i.floor(n.getTime()/1e3)),t+=4),s&&Lr(e,t,i.floor(s.getTime()/1e3));try{x=new p(36);const e=Mr(x),t=Wr(r);Ir(e,0,10),Ir(e,2,32),Ir(e,8,1),Ir(e,10,24),Or(e,12,t),Or(e,20,Wr(n)||t),Or(e,28,Wr(s)||t)}catch(e){x=new p}}else x=S=new p;let v=2048;u&&(v|=8);let E=0;_&&(E=8),c&&(k=k>45?k:45),y&&(v|=1,d||(k=k>51?k:51,E=99,_&&(b[9]=8)));const D=new p(26),R=Mr(D);Ir(R,0,k),Ir(R,2,v),Ir(R,4,E);const T=new w(1),F=Mr(T);let A;A=J>r?J:r>G?G:r,Ir(F,0,(A.getHours()<<6|A.getMinutes())<<5|A.getSeconds()/2),Ir(F,2,(A.getFullYear()-1980<<4|A.getMonth()+1)<<5|A.getDate());const C=T[0];Lr(R,6,C),Ir(R,22,Pr(t));const W=Pr(b,S,x,h);Ir(R,24,W);const N=new p(30+Pr(t)+W);return Lr(Mr(N),0,67324752),Hr(N,D,4),Hr(N,t,30),Hr(N,b,30+Pr(t)),Hr(N,S,30+Pr(t,b)),Hr(N,x,30+Pr(t,b,S)),Hr(N,h,30+Pr(t,b,S,x)),{localHeaderArray:N,headerArray:D,headerView:R,lastModDate:r,rawLastModDate:C,encrypted:y,compressed:_,version:k,compressionMethod:E,extraFieldExtendedTimestampFlag:z,rawExtraFieldExtendedTimestamp:S,rawExtraFieldNTFS:x,rawExtraFieldAES:b,extraFieldLength:W}})(c=r.assign({},c,{rawFilename:u,rawComment:y,version:b,versionMadeBy:x,lastModDate:S,lastAccessDate:z,creationDate:v,rawExtraField:B,zip64:q,zip64UncompressedSize:ne,zip64CompressedSize:se,zip64Offset:ae,zip64DiskNumberStart:ie,password:T,rawPassword:F,level:U,useWebWorkers:I,encryptionStrength:A,extendedTimestamp:W,zipCrypto:C,bufferedWrite:L,keepOrder:N,dataDescriptor:P,dataDescriptorSignature:O,signal:H,msDosCompatible:E,internalFileAttribute:D,externalFileAttribute:R,useCompressionStream:M})),le=(e=>{const{zip64:t,dataDescriptor:r,dataDescriptorSignature:n}=e;let s,a=new p,i=0;return r&&(a=new p(t?n?24:20:n?16:12),s=Mr(a),n&&(i=4,Lr(s,0,134695760))),{dataDescriptorArray:a,dataDescriptorView:s,dataDescriptorOffset:i}})(c),ce=Pr(oe.localHeaderArray,le.dataDescriptorArray);let de;K=ce+Z,e.options.usdz&&(K+=K+64),e.pendingEntriesSize+=K;try{de=await(async(e,n,o,l,c)=>{const{files:u,writer:h}=e,{keepOrder:w,dataDescriptor:g,signal:y}=c,{headerInfo:b}=l,{usdz:x}=e.options,S=t.from(u.values()).pop();let z,v,E,D,R,T,F,A={};u.set(n,A);try{let t;w&&(t=S&&S.lock,A.lock=new _((e=>E=e))),!(c.bufferedWrite||e.writerLocked||e.bufferedWrites&&w)&&g||x?(T=h,await C()):(T=new k,F=new d(T.readable).blob(),T.writable.size=0,z=!0,e.bufferedWrites++,await nr(h)),await nr(T);const{writable:b}=h;let{diskOffset:N}=h;if(e.addSplitZipSignature){delete e.addSplitZipSignature;const t=new p(4);Lr(Mr(t),0,134695760),await Cr(b,t),e.offset+=4}x&&((e,t)=>{const{headerInfo:r}=e;let{localHeaderArray:n,extraFieldLength:s}=r,a=Mr(n),i=64-(t+Pr(n))%64;4>i&&(i+=64);const o=new p(i),l=Mr(o);Ir(l,0,6534),Ir(l,2,i-2);const c=n;r.localHeaderArray=n=new p(Pr(c)+i),Hr(n,c),Hr(n,o,Pr(c)),a=Mr(n),Ir(a,28,s+i),e.metadataSize+=i})(l,e.offset-N),z||(await t,await W(b));const{diskNumber:U}=h;if(R=!0,A.diskNumberStart=U,A=await(async(e,t,{diskNumberStart:n,lock:o},l,c,d)=>{const{headerInfo:u,dataDescriptorInfo:f,metadataSize:h}=l,{localHeaderArray:w,headerArray:m,lastModDate:g,rawLastModDate:y,encrypted:b,compressed:x,version:S,compressionMethod:z,rawExtraFieldExtendedTimestamp:k,extraFieldExtendedTimestampFlag:v,rawExtraFieldNTFS:E,rawExtraFieldAES:D}=u,{dataDescriptorArray:R}=f,{rawFilename:T,lastAccessDate:F,creationDate:A,password:C,rawPassword:W,level:N,zip64:U,zip64UncompressedSize:I,zip64CompressedSize:L,zip64Offset:O,zip64DiskNumberStart:H,zipCrypto:M,dataDescriptor:P,directory:q,versionMadeBy:B,rawComment:V,rawExtraField:Z,useWebWorkers:K,onstart:j,onprogress:Y,onend:G,signal:J,encryptionStrength:$,extendedTimestamp:ee,msDosCompatible:te,internalFileAttribute:re,externalFileAttribute:ne,useCompressionStream:se}=d,ae={lock:o,versionMadeBy:B,zip64:U,directory:!!q,filenameUTF8:!0,rawFilename:T,commentUTF8:!0,rawComment:V,rawExtraFieldExtendedTimestamp:k,rawExtraFieldNTFS:E,rawExtraFieldAES:D,rawExtraField:Z,extendedTimestamp:ee,msDosCompatible:te,internalFileAttribute:re,externalFileAttribute:ne,diskNumberStart:n};let ie,oe=0,le=0;const{writable:ce}=t;if(e){e.chunkSize=(e=>i.max(e.chunkSize,64))(c),await Cr(ce,w);const t=e.readable,r=t.size=e.size,n={options:{codecType:pt,level:N,rawPassword:W,password:C,encryptionStrength:$,zipCrypto:b&&M,passwordVerification:b&&M&&y>>8&255,signed:!0,compressed:x,encrypted:b,useWebWorkers:K,useCompressionStream:se,transferStreams:!1},config:c,streamOptions:{signal:J,size:r,onstart:j,onprogress:Y,onend:G}},a=await(async(e,t)=>{const{options:r,config:n}=t,{transferStreams:a,useWebWorkers:i,useCompressionStream:o,codecType:l,compressed:c,signed:d,encrypted:u}=r,{workerScripts:f,maxWorkers:p}=n;t.transferStreams=a||a===Q;const h=!(c||d||u||t.transferStreams);return t.useWebWorkers=!h&&(i||i===Q&&n.useWebWorkers),t.scripts=t.useWebWorkers&&f?f[l]:[],r.useCompressionStream=o||o===Q&&n.useCompressionStream,(await(async()=>{const r=vt.find((e=>!e.busy));if(r)return Rt(r),new gt(r,e,t,w);if(vt.lengthEt.push({resolve:r,stream:e,workerOptions:t})))})()).run();function w(e){if(Et.length){const[{resolve:t,stream:r,workerOptions:n}]=Et.splice(0,1);t(new gt(e,r,n,w))}else e.worker?(Rt(e),((e,t)=>{const{config:r}=t,{terminateWorkerTimeout:n}=r;s.isFinite(n)&&n>=0&&(e.terminated?e.terminated=!1:e.terminateTimeout=setTimeout((async()=>{vt=vt.filter((t=>t!=e));try{await e.terminate()}catch(e){}}),n))})(e,t)):vt=vt.filter((t=>t!=e))}})({readable:t,writable:ce},n);le=a.inputSize,oe=a.outputSize,ie=a.signature,ce.size+=le}else await Cr(ce,w);let de;if(U){let e=4;I&&(e+=8),L&&(e+=8),O&&(e+=8),H&&(e+=4),de=new p(e)}else de=new p;return((e,t)=>{const{signature:r,rawExtraFieldZip64:n,compressedSize:s,uncompressedSize:i,headerInfo:o,dataDescriptorInfo:l}=e,{headerView:c,encrypted:d}=o,{dataDescriptorView:u,dataDescriptorOffset:f}=l,{zip64:p,zip64UncompressedSize:h,zip64CompressedSize:w,zipCrypto:m,dataDescriptor:g}=t;if(d&&!m||r===Q||(Lr(c,10,r),g&&Lr(u,f,r)),p){const e=Mr(n);Ir(e,0,1),Ir(e,2,Pr(n)-4);let t=4;h&&(Lr(c,18,X),Or(e,t,a(i)),t+=8),w&&(Lr(c,14,X),Or(e,t,a(s))),g&&(Or(u,f+4,a(s)),Or(u,f+12,a(i)))}else Lr(c,14,s),Lr(c,18,i),g&&(Lr(u,f+4,s),Lr(u,f+8,i))})({signature:ie,rawExtraFieldZip64:de,compressedSize:oe,uncompressedSize:le,headerInfo:u,dataDescriptorInfo:f},d),P&&await Cr(ce,R),r.assign(ae,{uncompressedSize:le,compressedSize:oe,lastModDate:g,rawLastModDate:y,creationDate:A,lastAccessDate:F,encrypted:b,size:h+oe,compressionMethod:z,version:S,headerArray:m,signature:ie,rawExtraFieldZip64:de,extraFieldExtendedTimestampFlag:v,zip64UncompressedSize:I,zip64CompressedSize:L,zip64Offset:O,zip64DiskNumberStart:H}),ae})(o,T,A,l,e.config,c),R=!1,u.set(n,A),A.filename=n,z){await T.writable.getWriter().close();let e=await F;await t,await C(),D=!0,g||(e=await(async(e,t,r,{zipCrypto:n})=>{let s;s=await t.slice(0,26).arrayBuffer(),26!=s.byteLength&&(s=s.slice(0,26));const a=new m(s);return e.encrypted&&!n||Lr(a,14,e.signature),e.zip64?(Lr(a,18,X),Lr(a,22,X)):(Lr(a,18,e.compressedSize),Lr(a,22,e.uncompressedSize)),await Cr(r,new p(s)),t.slice(s.byteLength)})(A,e,b,c)),await W(b),A.diskNumberStart=h.diskNumber,N=h.diskOffset,await e.stream().pipeTo(b,{preventClose:!0,preventAbort:!0,signal:y}),b.size+=e.size,D=!1}if(A.offset=e.offset-N,A.zip64)((e,t)=>{const{rawExtraFieldZip64:r,offset:n,diskNumberStart:s}=e,{zip64UncompressedSize:i,zip64CompressedSize:o,zip64Offset:l,zip64DiskNumberStart:c}=t,d=Mr(r);let u=4;i&&(u+=8),o&&(u+=8),l&&(Or(d,u,a(n)),u+=8),c&&Lr(d,u,s)})(A,c);else if(A.offset>=X)throw new f(Dr);return e.offset+=A.size,A}catch(t){if(z&&D||!z&&R){if(e.hasCorruptedEntries=!0,t)try{t.corruptedEntry=!0}catch(e){}z?e.offset+=T.writable.size:e.offset=T.writable.size}throw u.delete(n),t}finally{z&&e.bufferedWrites--,E&&E(),v&&v()}async function C(){e.writerLocked=!0;const{lockWriter:t}=e;e.lockWriter=new _((t=>v=()=>{e.writerLocked=!1,t()})),await t}async function W(e){Pr(b.localHeaderArray)>h.availableSize&&(h.availableSize=0,await Cr(e,new p))}})(e,n,l,{headerInfo:oe,dataDescriptorInfo:le,metadataSize:ce},c)}finally{e.pendingEntriesSize-=K}return r.assign(de,{name:n,comment:g,extraField:V}),new _r(de)})(c,e,n,l),u.add(y),await y}catch(t){throw c.filenames.delete(e),t}finally{u.delete(y);const e=Fr.shift();e?e():Tr--}}async close(e=new p,r={}){const{pendingAddFileCalls:n,writer:s}=this,{writable:o}=s;for(;n.size;)await _.allSettled(t.from(n));return await(async(e,r,n)=>{const{files:s,writer:o}=e,{diskOffset:l,writable:c}=o;let{diskNumber:d}=o,u=0,h=0,w=e.offset-l,m=s.size;for(const[,e]of s){const{rawFilename:t,rawExtraFieldZip64:r,rawExtraFieldAES:n,rawComment:s,rawExtraFieldNTFS:a,rawExtraField:o,extendedTimestamp:l,extraFieldExtendedTimestampFlag:c,lastModDate:d}=e;let u;if(l){u=new p(9);const e=Mr(u);Ir(e,0,21589),Ir(e,2,5),Ur(e,4,c),Lr(e,5,i.floor(d.getTime()/1e3))}else u=new p;e.rawExtraFieldCDExtendedTimestamp=u,h+=46+Pr(t,s,r,n,a,u,o)}const g=new p(h),_=Mr(g);await nr(o);let y=0;for(const[e,r]of t.from(s.values()).entries()){const{offset:t,rawFilename:a,rawExtraFieldZip64:i,rawExtraFieldAES:l,rawExtraFieldCDExtendedTimestamp:d,rawExtraFieldNTFS:f,rawExtraField:p,rawComment:h,versionMadeBy:w,headerArray:m,directory:b,zip64:x,zip64UncompressedSize:S,zip64CompressedSize:z,zip64DiskNumberStart:k,zip64Offset:v,msDosCompatible:E,internalFileAttribute:D,externalFileAttribute:R,diskNumberStart:T,uncompressedSize:F,compressedSize:A}=r,C=Pr(i,l,d,f,p);Lr(_,u,33639248),Ir(_,u+4,w);const W=Mr(m);S||Lr(W,18,F),z||Lr(W,14,A),Hr(g,m,u+6),Ir(_,u+30,C),Ir(_,u+32,Pr(h)),Ir(_,u+34,x&&k?Y:T),Ir(_,u+36,D),R?Lr(_,u+38,R):b&&E&&Ur(_,u+38,16),Lr(_,u+42,x&&v?X:t),Hr(g,a,u+46),Hr(g,i,u+46+Pr(a)),Hr(g,l,u+46+Pr(a,i)),Hr(g,d,u+46+Pr(a,i,l)),Hr(g,f,u+46+Pr(a,i,l,d)),Hr(g,p,u+46+Pr(a,i,l,d,f)),Hr(g,h,u+46+Pr(a)+C);const N=46+Pr(a,h)+C;if(u-y>o.availableSize&&(o.availableSize=0,await Cr(c,g.slice(y,u)),y=u),u+=N,n.onprogress)try{await n.onprogress(e+1,s.size,new _r(r))}catch(e){}}await Cr(c,y?g.slice(y):g);let b=o.diskNumber;const{availableSize:x}=o;22>x&&b++;let S=Nr(e,n,"zip64");if(!(X>w&&X>h&&Y>m&&Y>b)){if(!1===S)throw new f(Dr);S=!0}const z=new p(S?98:22),k=Mr(z);u=0,S&&(Lr(k,0,101075792),Or(k,4,a(44)),Ir(k,12,45),Ir(k,14,45),Lr(k,16,b),Lr(k,20,d),Or(k,24,a(m)),Or(k,32,a(m)),Or(k,40,a(h)),Or(k,48,a(w)),Lr(k,56,117853008),Or(k,64,a(w)+a(h)),Lr(k,72,b+1),Nr(e,n,"supportZip64SplitFile",!0)&&(b=Y,d=Y),m=Y,w=X,h=X,u+=76),Lr(k,u,101010256),Ir(k,u+4,b),Ir(k,u+6,d),Ir(k,u+8,m),Ir(k,u+10,m),Lr(k,u+12,h),Lr(k,u+16,w);const v=Pr(r);if(v){if(v>Y)throw new f(br);Ir(k,u+20,v)}await Cr(c,z),v&&await Cr(c,r)})(this,e,r),Nr(this,r,"preventClose")||await o.getWriter().close(),s.getData?s.getData():o}}async function Cr(e,t){const r=e.getWriter();try{await r.ready,e.size+=Pr(t),await r.write(t)}finally{r.releaseLock()}}function Wr(e){if(e)return(a(e.getTime())+a(116444736e5))*a(1e4)}function Nr(e,t,r,n){const s=t[r]===Q?e.options[r]:t[r];return s===Q?n:s}function Ur(e,t,r){e.setUint8(t,r)}function Ir(e,t,r){e.setUint16(t,r,!0)}function Lr(e,t,r){e.setUint32(t,r,!0)}function Or(e,t,r){e.setBigUint64(t,r,!0)}function Hr(e,t,r){e.set(t,r)}function Mr(e){return new m(e.buffer)}function Pr(...e){let t=0;return e.forEach((e=>e&&(t+=e.length))),t}ie({Deflate:function(e){const t=new j,r=(n=e&&e.chunkSize?e.chunkSize:65536)+5*(i.floor(n/16383)+1);var n;const s=new p(r);let a=e?e.level:-1;void 0===a&&(a=-1),t.deflateInit(a),t.next_out=s,this.append=(e,n)=>{let a,i,o=0,l=0,c=0;const d=[];if(e.length){t.next_in_index=0,t.next_in=e,t.avail_in=e.length;do{if(t.next_out_index=0,t.avail_out=r,a=t.deflate(0),0!=a)throw new f("deflating: "+t.msg);t.next_out_index&&(t.next_out_index==r?d.push(new p(s)):d.push(s.subarray(0,t.next_out_index))),c+=t.next_out_index,n&&t.next_in_index>0&&t.next_in_index!=o&&(n(t.next_in_index),o=t.next_in_index)}while(t.avail_in>0||0===t.avail_out);return d.length>1?(i=new p(c),d.forEach((e=>{i.set(e,l),l+=e.length}))):i=d[0]?new p(d[0]):new p,i}},this.flush=()=>{let e,n,a=0,i=0;const o=[];do{if(t.next_out_index=0,t.avail_out=r,e=t.deflate(4),1!=e&&0!=e)throw new f("deflating: "+t.msg);r-t.avail_out>0&&o.push(s.slice(0,t.next_out_index)),i+=t.next_out_index}while(t.avail_in>0||0===t.avail_out);return t.deflateEnd(),n=new p(i),o.forEach((e=>{n.set(e,a),a+=e.length})),n}}}),e.BlobReader=Ht,e.BlobWriter=Mt,e.Data64URIReader=class extends Lt{constructor(e){super();let t=e.length;for(;"="==e.charAt(t-1);)t--;const n=e.indexOf(",")+1;r.assign(this,{dataURI:e,dataStart:n,size:i.floor(.75*(t-n))})}readUint8Array(e,t){const{dataStart:r,dataURI:n}=this,s=new p(t),a=4*i.floor(e/3),o=atob(n.substring(a+r,4*i.ceil((e+t)/3)+r)),l=e-3*i.floor(a/4);for(let e=l;l+t>e;e++)s[e-l]=o.charCodeAt(e);return s}},e.Data64URIWriter=class extends Ot{constructor(e){super(),r.assign(this,{data:"data:"+(e||"")+";base64,",pending:[]})}writeUint8Array(e){const t=this;let r=0,s=t.pending;const a=t.pending.length;for(t.pending="",r=0;r<3*i.floor((a+e.length)/3)-a;r++)s+=n.fromCharCode(e[r]);for(;r2?t.data+=z(s):t.pending=s}getData(){return this.data+z(this.pending)}},e.ERR_DUPLICATED_NAME=yr,e.ERR_HTTP_RANGE=Ft,e.ERR_INVALID_COMMENT=br,e.ERR_INVALID_ENCRYPTION_STRENGTH=kr,e.ERR_INVALID_ENTRY_COMMENT=xr,e.ERR_INVALID_ENTRY_NAME=Sr,e.ERR_INVALID_EXTRAFIELD_DATA=Er,e.ERR_INVALID_EXTRAFIELD_TYPE=vr,e.ERR_INVALID_VERSION=zr,e.ERR_ITERATOR_COMPLETED_TOO_SOON=At,e.ERR_UNSUPPORTED_FORMAT=Dr,e.HttpRangeReader=class extends er{constructor(e,t={}){t.useRangeHeader=!0,super(e,t)}},e.HttpReader=er,e.Reader=Lt,e.SplitDataReader=tr,e.SplitDataWriter=rr,e.SplitZipReader=or,e.SplitZipWriter=lr,e.TextReader=class extends Ht{constructor(e){super(new g([e],{type:"text/plain"}))}},e.TextWriter=class extends Mt{constructor(e){super(e),r.assign(this,{encoding:e,utf8:!e||"utf-8"==e.toLowerCase()})}async getData(){const{encoding:e,utf8:t}=this,n=await super.getData();if(n.text&&t)return n.text();{const t=new FileReader;return new _(((s,a)=>{r.assign(t,{onload:({target:e})=>s(e.result),onerror:()=>a(t.error)}),t.readAsText(n,e)}))}}},e.Uint8ArrayReader=class extends Lt{constructor(e){super(),r.assign(this,{array:e,size:e.length})}readUint8Array(e,t){return this.array.slice(e,e+t)}},e.Uint8ArrayWriter=class extends Ot{init(e=0){r.assign(this,{offset:0,array:new p(e)}),super.init()}writeUint8Array(e){const t=this;if(t.offset+e.length>t.array.length){const r=t.array;t.array=new p(r.length+e.length),t.array.set(r)}t.array.set(e,t.offset),t.offset+=e.length}getData(){return this.array}},e.Writer=Ot,e.ZipWriter=Ar,e.ZipWriterStream=class{constructor(e={}){const{readable:t,writable:r}=new k;this.readable=t,this.zipWriter=new Ar(r,e)}transform(e){const{readable:t,writable:r}=new k({flush:()=>{this.zipWriter.close()}});return this.zipWriter.add(e,t),{readable:this.readable,writable:r}}writable(e){const{readable:t,writable:r}=new k;return this.zipWriter.add(e,t),r}close(e,t={}){return this.zipWriter.close(e,t)}},e.configure=ie,e.getMimeType=()=>"application/octet-stream",e.initReader=sr,e.initStream=nr,e.initWriter=ar,e.readUint8Array=ir,e.terminateWorkers=async()=>{await _.allSettled(vt.map((e=>(Rt(e),e.terminate()))))},r.defineProperty(e,"__esModule",{value:!0})})); +((e,t)=>{"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).zip={})})(this,(function(e){"use strict";const{Array:t,Object:r,String:n,Number:s,BigInt:a,Math:i,Date:o,Map:l,Set:c,Response:d,URL:u,Error:f,Uint8Array:p,Uint16Array:h,Uint32Array:w,DataView:m,Blob:g,Promise:_,TextEncoder:y,TextDecoder:b,document:x,crypto:S,btoa:z,TransformStream:k,ReadableStream:v,WritableStream:E,CompressionStream:R,DecompressionStream:D,navigator:T,Worker:F}="undefined"!=typeof globalThis?globalThis:this||self,A=-2;function C(e){return W(e.map((([e,r])=>new t(e).fill(r,0,e))))}function W(e){return e.reduce(((e,r)=>e.concat(t.isArray(r)?W(r):r)),[])}const N=[0,1,2,3].concat(...C([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function U(){const e=this;function t(e,t){let r=0;do{r|=1&e,e>>>=1,r<<=1}while(--t>0);return r>>>1}e.build_tree=r=>{const n=e.dyn_tree,s=e.stat_desc.static_tree,a=e.stat_desc.elems;let o,l,c,d=-1;for(r.heap_len=0,r.heap_max=573,o=0;a>o;o++)0!==n[2*o]?(r.heap[++r.heap_len]=d=o,r.depth[o]=0):n[2*o+1]=0;for(;2>r.heap_len;)c=r.heap[++r.heap_len]=2>d?++d:0,n[2*c]=1,r.depth[c]=0,r.opt_len--,s&&(r.static_len-=s[2*c+1]);for(e.max_code=d,o=i.floor(r.heap_len/2);o>=1;o--)r.pqdownheap(n,o);c=a;do{o=r.heap[1],r.heap[1]=r.heap[r.heap_len--],r.pqdownheap(n,1),l=r.heap[1],r.heap[--r.heap_max]=o,r.heap[--r.heap_max]=l,n[2*c]=n[2*o]+n[2*l],r.depth[c]=i.max(r.depth[o],r.depth[l])+1,n[2*o+1]=n[2*l+1]=c,r.heap[1]=c++,r.pqdownheap(n,1)}while(r.heap_len>=2);r.heap[--r.heap_max]=r.heap[1],(t=>{const r=e.dyn_tree,n=e.stat_desc.static_tree,s=e.stat_desc.extra_bits,a=e.stat_desc.extra_base,i=e.stat_desc.max_length;let o,l,c,d,u,f,p=0;for(d=0;15>=d;d++)t.bl_count[d]=0;for(r[2*t.heap[t.heap_max]+1]=0,o=t.heap_max+1;573>o;o++)l=t.heap[o],d=r[2*r[2*l+1]+1]+1,d>i&&(d=i,p++),r[2*l+1]=d,l>e.max_code||(t.bl_count[d]++,u=0,a>l||(u=s[l-a]),f=r[2*l],t.opt_len+=f*(d+u),n&&(t.static_len+=f*(n[2*l+1]+u)));if(0!==p){do{for(d=i-1;0===t.bl_count[d];)d--;t.bl_count[d]--,t.bl_count[d+1]+=2,t.bl_count[i]--,p-=2}while(p>0);for(d=i;0!==d;d--)for(l=t.bl_count[d];0!==l;)c=t.heap[--o],c>e.max_code||(r[2*c+1]!=d&&(t.opt_len+=(d-r[2*c+1])*r[2*c],r[2*c+1]=d),l--)}})(r),((e,r,n)=>{const s=[];let a,i,o,l=0;for(a=1;15>=a;a++)s[a]=l=l+n[a-1]<<1;for(i=0;r>=i;i++)o=e[2*i+1],0!==o&&(e[2*i]=t(s[o]++,o))})(n,e.max_code,r.bl_count)}}function I(e,t,r,n,s){const a=this;a.static_tree=e,a.extra_bits=t,a.extra_base=r,a.elems=n,a.max_length=s}U._length_code=[0,1,2,3,4,5,6,7].concat(...C([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]])),U.base_length=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0],U.base_dist=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576],U.d_code=e=>256>e?N[e]:N[256+(e>>>7)],U.extra_lbits=[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],U.extra_dbits=[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],U.extra_blbits=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],U.bl_order=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];const L=C([[144,8],[112,9],[24,7],[8,8]]);I.static_ltree=W([12,140,76,204,44,172,108,236,28,156,92,220,60,188,124,252,2,130,66,194,34,162,98,226,18,146,82,210,50,178,114,242,10,138,74,202,42,170,106,234,26,154,90,218,58,186,122,250,6,134,70,198,38,166,102,230,22,150,86,214,54,182,118,246,14,142,78,206,46,174,110,238,30,158,94,222,62,190,126,254,1,129,65,193,33,161,97,225,17,145,81,209,49,177,113,241,9,137,73,201,41,169,105,233,25,153,89,217,57,185,121,249,5,133,69,197,37,165,101,229,21,149,85,213,53,181,117,245,13,141,77,205,45,173,109,237,29,157,93,221,61,189,125,253,19,275,147,403,83,339,211,467,51,307,179,435,115,371,243,499,11,267,139,395,75,331,203,459,43,299,171,427,107,363,235,491,27,283,155,411,91,347,219,475,59,315,187,443,123,379,251,507,7,263,135,391,71,327,199,455,39,295,167,423,103,359,231,487,23,279,151,407,87,343,215,471,55,311,183,439,119,375,247,503,15,271,143,399,79,335,207,463,47,303,175,431,111,367,239,495,31,287,159,415,95,351,223,479,63,319,191,447,127,383,255,511,0,64,32,96,16,80,48,112,8,72,40,104,24,88,56,120,4,68,36,100,20,84,52,116,3,131,67,195,35,163,99,227].map(((e,t)=>[e,L[t]])));const H=C([[30,5]]);function O(e,t,r,n,s){const a=this;a.good_length=e,a.max_lazy=t,a.nice_length=r,a.max_chain=n,a.func=s}I.static_dtree=W([0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30,1,17,9,25,5,21,13,29,3,19,11,27,7,23].map(((e,t)=>[e,H[t]]))),I.static_l_desc=new I(I.static_ltree,U.extra_lbits,257,286,15),I.static_d_desc=new I(I.static_dtree,U.extra_dbits,0,30,15),I.static_bl_desc=new I(null,U.extra_blbits,0,19,7);const M=[new O(0,0,0,0,0),new O(4,4,8,4,1),new O(4,5,16,8,1),new O(4,6,32,32,1),new O(4,4,16,16,2),new O(8,16,32,32,2),new O(8,16,128,128,2),new O(8,32,128,256,2),new O(32,128,258,1024,2),new O(32,258,258,4096,2)],P=["need dictionary","stream end","","","stream error","data error","","buffer error","",""],q=113,B=666,V=262;function Z(e,t,r,n){const s=e[2*t],a=e[2*r];return a>s||s==a&&n[t]<=n[r]}function K(){const e=this;let t,r,n,s,a,o,l,c,d,u,f,w,m,g,_,y,b,x,S,z,k,v,E,R,D,T,F,C,W,N,L,H,O;const K=new U,j=new U,X=new U;let Y,G,J,Q,$,ee;function te(){let t;for(t=0;286>t;t++)L[2*t]=0;for(t=0;30>t;t++)H[2*t]=0;for(t=0;19>t;t++)O[2*t]=0;L[512]=1,e.opt_len=e.static_len=0,G=J=0}function re(e,t){let r,n=-1,s=e[1],a=0,i=7,o=4;0===s&&(i=138,o=3),e[2*(t+1)+1]=65535;for(let l=0;t>=l;l++)r=s,s=e[2*(l+1)+1],++aa?O[2*r]+=a:0!==r?(r!=n&&O[2*r]++,O[32]++):a>10?O[36]++:O[34]++,a=0,n=r,0===s?(i=138,o=3):r==s?(i=6,o=3):(i=7,o=4))}function ne(t){e.pending_buf[e.pending++]=t}function se(e){ne(255&e),ne(e>>>8&255)}function ae(e,t){let r;const n=t;ee>16-n?(r=e,$|=r<>>16-ee,ee+=n-16):($|=e<=r;r++)if(n=a,a=e[2*(r+1)+1],++i>=o||n!=a){if(l>i)do{ie(n,O)}while(0!=--i);else 0!==n?(n!=s&&(ie(n,O),i--),ie(16,O),ae(i-3,2)):i>10?(ie(18,O),ae(i-11,7)):(ie(17,O),ae(i-3,3));i=0,s=n,0===a?(o=138,l=3):n==a?(o=6,l=3):(o=7,l=4)}}function le(){16==ee?(se($),$=0,ee=0):8>ee||(ne(255&$),$>>>=8,ee-=8)}function ce(t,r){let n,s,a;if(e.dist_buf[G]=t,e.lc_buf[G]=255&r,G++,0===t?L[2*r]++:(J++,t--,L[2*(U._length_code[r]+256+1)]++,H[2*U.d_code(t)]++),0==(8191&G)&&F>2){for(n=8*G,s=k-b,a=0;30>a;a++)n+=H[2*a]*(5+U.extra_dbits[a]);if(n>>>=3,Jo);ie(256,t),Q=t[513]}function ue(){ee>8?se($):ee>0&&ne(255&$),$=0,ee=0}function fe(t,r,n){ae(0+(n?1:0),3),((t,r)=>{ue(),Q=8,se(r),se(~r),e.pending_buf.set(c.subarray(t,t+r),e.pending),e.pending+=r})(t,r)}function pe(r){((t,r,n)=>{let s,a,i=0;F>0?(K.build_tree(e),j.build_tree(e),i=(()=>{let t;for(re(L,K.max_code),re(H,j.max_code),X.build_tree(e),t=18;t>=3&&0===O[2*U.bl_order[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t})(),s=e.opt_len+3+7>>>3,a=e.static_len+3+7>>>3,a>s||(s=a)):s=a=r+5,r+4>s||-1==t?a==s?(ae(2+(n?1:0),3),de(I.static_ltree,I.static_dtree)):(ae(4+(n?1:0),3),((e,t,r)=>{let n;for(ae(e-257,5),ae(t-1,5),ae(r-4,4),n=0;r>n;n++)ae(O[2*U.bl_order[n]+1],3);oe(L,e-1),oe(H,t-1)})(K.max_code+1,j.max_code+1,i+1),de(L,H)):fe(t,r,n),te(),n&&ue()})(0>b?-1:b,k-b,r),b=k,t.flush_pending()}function he(){let e,r,n,s;do{if(s=d-E-k,0===s&&0===k&&0===E)s=a;else if(-1==s)s--;else if(k>=a+a-V){c.set(c.subarray(a,a+a),0),v-=a,k-=a,b-=a,e=m,n=e;do{r=65535&f[--n],f[n]=a>r?0:r-a}while(0!=--e);e=a,n=e;do{r=65535&u[--n],u[n]=a>r?0:r-a}while(0!=--e);s+=a}if(0===t.avail_in)return;e=t.read_buf(c,k+E,s),E+=e,3>E||(w=255&c[k],w=(w<E&&0!==t.avail_in)}function we(e){let t,r,n=D,s=k,i=R;const o=k>a-V?k-(a-V):0;let d=N;const f=l,p=k+258;let h=c[s+i-1],w=c[s+i];W>R||(n>>=2),d>E&&(d=E);do{if(t=e,c[t+i]==w&&c[t+i-1]==h&&c[t]==c[s]&&c[++t]==c[s+1]){s+=2,t++;do{}while(c[++s]==c[++t]&&c[++s]==c[++t]&&c[++s]==c[++t]&&c[++s]==c[++t]&&c[++s]==c[++t]&&c[++s]==c[++t]&&c[++s]==c[++t]&&c[++s]==c[++t]&&p>s);if(r=258-(p-s),s=p-258,r>i){if(v=e,i=r,r>=d)break;h=c[s+i-1],w=c[s+i]}}}while((e=65535&u[e&f])>o&&0!=--n);return i>E?E:i}e.depth=[],e.bl_count=[],e.heap=[],L=[],H=[],O=[],e.pqdownheap=(t,r)=>{const n=e.heap,s=n[r];let a=r<<1;for(;a<=e.heap_len&&(a(U||(U=8),P||(P=8),B||(B=0),t.msg=null,-1==S&&(S=6),1>P||P>9||8!=U||9>v||v>15||0>S||S>9||0>B||B>2?A:(t.dstate=e,o=v,a=1<(t.total_in=t.total_out=0,t.msg=null,e.pending=0,e.pending_out=0,r=q,s=0,K.dyn_tree=L,K.stat_desc=I.static_l_desc,j.dyn_tree=H,j.stat_desc=I.static_d_desc,X.dyn_tree=O,X.stat_desc=I.static_bl_desc,$=0,ee=0,Q=8,te(),(()=>{d=2*a,f[m-1]=0;for(let e=0;m-1>e;e++)f[e]=0;T=M[F].max_lazy,W=M[F].good_length,N=M[F].nice_length,D=M[F].max_chain,k=0,b=0,E=0,x=R=2,z=0,w=0})(),0))(t))),e.deflateEnd=()=>42!=r&&r!=q&&r!=B?A:(e.lc_buf=null,e.dist_buf=null,e.pending_buf=null,f=null,u=null,c=null,e.dstate=null,r==q?-3:0),e.deflateParams=(e,t,r)=>{let n=0;return-1==t&&(t=6),0>t||t>9||0>r||r>2?A:(M[F].func!=M[t].func&&0!==e.total_in&&(n=e.deflate(1)),F!=t&&(F=t,T=M[F].max_lazy,W=M[F].good_length,N=M[F].nice_length,D=M[F].max_chain),C=r,n)},e.deflateSetDictionary=(e,t,n)=>{let s,i=n,o=0;if(!t||42!=r)return A;if(3>i)return 0;for(i>a-V&&(i=a-V,o=n-i),c.set(t.subarray(o,o+i),0),k=i,b=i,w=255&c[0],w=(w<=s;s++)w=(w<{let p,h,g,D,W;if(d>4||0>d)return A;if(!i.next_out||!i.next_in&&0!==i.avail_in||r==B&&4!=d)return i.msg=P[4],A;if(0===i.avail_out)return i.msg=P[7],-5;var N;if(t=i,D=s,s=d,42==r&&(h=8+(o-8<<4)<<8,g=(F-1&255)>>1,g>3&&(g=3),h|=g<<6,0!==k&&(h|=32),h+=31-h%31,r=q,ne((N=h)>>8&255),ne(255&N)),0!==e.pending){if(t.flush_pending(),0===t.avail_out)return s=-1,0}else if(0===t.avail_in&&D>=d&&4!=d)return t.msg=P[7],-5;if(r==B&&0!==t.avail_in)return i.msg=P[7],-5;if(0!==t.avail_in||0!==E||0!=d&&r!=B){switch(W=-1,M[F].func){case 0:W=(e=>{let r,s=65535;for(s>n-5&&(s=n-5);;){if(1>=E){if(he(),0===E&&0==e)return 0;if(0===E)break}if(k+=E,E=0,r=b+s,(0===k||k>=r)&&(E=k-r,k=r,pe(!1),0===t.avail_out))return 0;if(k-b>=a-V&&(pe(!1),0===t.avail_out))return 0}return pe(4==e),0===t.avail_out?4==e?2:0:4==e?3:1})(d);break;case 1:W=(e=>{let r,n=0;for(;;){if(V>E){if(he(),V>E&&0==e)return 0;if(0===E)break}if(3>E||(w=(w<a-V||2!=C&&(x=we(n)),3>x)r=ce(0,255&c[k]),E--,k++;else if(r=ce(k-v,x-3),E-=x,x>T||3>E)k+=x,x=0,w=255&c[k],w=(w<{let r,n,s=0;for(;;){if(V>E){if(he(),V>E&&0==e)return 0;if(0===E)break}if(3>E||(w=(w<R&&a-V>=(k-s&65535)&&(2!=C&&(x=we(s)),5>=x&&(1==C||3==x&&k-v>4096)&&(x=2)),3>R||x>R)if(0!==z){if(r=ce(0,255&c[k-1]),r&&pe(!1),k++,E--,0===t.avail_out)return 0}else z=1,k++,E--;else{n=k+E-3,r=ce(k-1-S,R-3),E-=R-1,R-=2;do{++k>n||(w=(w<1+Q+10-ee&&(ae(2,3),ie(256,I.static_ltree),le()),Q=7;else if(fe(0,0,!1),3==d)for(p=0;m>p;p++)f[p]=0;if(t.flush_pending(),0===t.avail_out)return s=-1,0}}return 4!=d?0:1}}function j(){const e=this;e.next_in_index=0,e.next_out_index=0,e.avail_in=0,e.total_in=0,e.avail_out=0,e.total_out=0}j.prototype={deflateInit(e,t){const r=this;return r.dstate=new K,t||(t=15),r.dstate.deflateInit(r,e,t)},deflate(e){const t=this;return t.dstate?t.dstate.deflate(t,e):A},deflateEnd(){const e=this;if(!e.dstate)return A;const t=e.dstate.deflateEnd();return e.dstate=null,t},deflateParams(e,t){const r=this;return r.dstate?r.dstate.deflateParams(r,e,t):A},deflateSetDictionary(e,t){const r=this;return r.dstate?r.dstate.deflateSetDictionary(r,e,t):A},read_buf(e,t,r){const n=this;let s=n.avail_in;return s>r&&(s=r),0===s?0:(n.avail_in-=s,e.set(n.next_in.subarray(n.next_in_index,n.next_in_index+s),t),n.next_in_index+=s,n.total_in+=s,s)},flush_pending(){const e=this;let t=e.dstate.pending;t>e.avail_out&&(t=e.avail_out),0!==t&&(e.next_out.set(e.dstate.pending_buf.subarray(e.dstate.pending_out,e.dstate.pending_out+t),e.next_out_index),e.next_out_index+=t,e.dstate.pending_out+=t,e.total_out+=t,e.avail_out-=t,e.dstate.pending-=t,0===e.dstate.pending&&(e.dstate.pending_out=0))}};const X=4294967295,Y=65535,G=new o(2107,11,31),J=new o(1980,0,1),Q=void 0,$="undefined",ee="function";class te{constructor(e){return class extends k{constructor(t,r){const n=new e(r);super({transform(e,t){t.enqueue(n.append(e))},flush(e){const t=n.flush();t&&e.enqueue(t)}})}}}}let re=2;try{typeof T!=$&&T.hardwareConcurrency&&(re=T.hardwareConcurrency)}catch(e){}const ne={chunkSize:524288,maxWorkers:re,terminateWorkerTimeout:5e3,useWebWorkers:!0,useCompressionStream:!0,workerScripts:Q,CompressionStreamNative:typeof R!=$&&R,DecompressionStreamNative:typeof D!=$&&D},se=r.assign({},ne);function ae(){return se}function ie(e){const{baseURL:r,chunkSize:n,maxWorkers:s,terminateWorkerTimeout:a,useCompressionStream:i,useWebWorkers:o,Deflate:l,Inflate:c,CompressionStream:d,DecompressionStream:u,workerScripts:p}=e;if(oe("baseURL",r),oe("chunkSize",n),oe("maxWorkers",s),oe("terminateWorkerTimeout",a),oe("useCompressionStream",i),oe("useWebWorkers",o),l&&(se.CompressionStream=new te(l)),c&&(se.DecompressionStream=new te(c)),oe("CompressionStream",d),oe("DecompressionStream",u),p!==Q){const{deflate:e,inflate:r}=p;if((e||r)&&(se.workerScripts||(se.workerScripts={})),e){if(!t.isArray(e))throw new f("workerScripts.deflate must be an array");se.workerScripts.deflate=e}if(r){if(!t.isArray(r))throw new f("workerScripts.inflate must be an array");se.workerScripts.inflate=r}}}function oe(e,t){t!==Q&&(se[e]=t)}const le=[];for(let e=0;256>e;e++){let t=e;for(let e=0;8>e;e++)1&t?t=t>>>1^3988292384:t>>>=1;le[e]=t}class ce{constructor(e){this.crc=e||-1}append(e){let t=0|this.crc;for(let r=0,n=0|e.length;n>r;r++)t=t>>>8^le[255&(t^e[r])];this.crc=t}get(){return~this.crc}}class de extends k{constructor(){let e;const t=new ce;super({transform(e,r){t.append(e),r.enqueue(e)},flush(){const r=new p(4);new m(r.buffer).setUint32(0,t.get()),e.value=r}}),e=this}}function ue(e){if(typeof y==$){const t=new p((e=unescape(encodeURIComponent(e))).length);for(let r=0;r0&&t&&(e[r-1]=fe.partial(t,e[r-1]&2147483648>>t-1,1)),e},partial:(e,t,r)=>32===e?t:(r?0|t:t<<32-e)+1099511627776*e,getPartial:e=>i.round(e/1099511627776)||32,_shiftRight(e,t,r,n){for(void 0===n&&(n=[]);t>=32;t-=32)n.push(r),r=0;if(0===t)return n.concat(e);for(let s=0;s>>t),r=e[s]<<32-t;const s=e.length?e[e.length-1]:0,a=fe.getPartial(s);return n.push(fe.partial(t+a&31,t+a>32?r:n.pop(),1)),n}},pe={bytes:{fromBits(e){const t=fe.bitLength(e)/8,r=new p(t);let n;for(let s=0;t>s;s++)0==(3&s)&&(n=e[s/4]),r[s]=n>>>24,n<<=8;return r},toBits(e){const t=[];let r,n=0;for(r=0;r9007199254740991)throw new f("Cannot hash more than 2^53 - 1 bits");const a=new w(r);let i=0;for(let e=t.blockSize+n-(t.blockSize+n&t.blockSize-1);s>=e;e+=t.blockSize)t._block(a.subarray(16*i,16*(i+1))),i+=1;return r.splice(0,16*i),t}finalize(){const e=this;let t=e._buffer;const r=e._h;t=fe.concat(t,[fe.partial(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(i.floor(e._length/4294967296)),t.push(0|e._length);t.length;)e._block(t.splice(0,16));return e.reset(),r}_f(e,t,r,n){return e>19?e>39?e>59?e>79?void 0:t^r^n:t&r|t&n|r&n:t^r^n:t&r|~t&n}_S(e,t){return t<>>32-e}_block(e){const r=this,n=r._h,s=t(80);for(let t=0;16>t;t++)s[t]=e[t];let a=n[0],o=n[1],l=n[2],c=n[3],d=n[4];for(let e=0;79>=e;e++){16>e||(s[e]=r._S(1,s[e-3]^s[e-8]^s[e-14]^s[e-16]));const t=r._S(5,a)+r._f(e,o,l,c)+d+s[e]+r._key[i.floor(e/20)]|0;d=c,c=l,l=r._S(30,o),o=a,a=t}n[0]=n[0]+a|0,n[1]=n[1]+o|0,n[2]=n[2]+l|0,n[3]=n[3]+c|0,n[4]=n[4]+d|0}},we={getRandomValues(e){const t=new w(e.buffer),r=e=>{let t=987654321;const r=4294967295;return()=>(t=36969*(65535&t)+(t>>16)&r,(((t<<16)+(e=18e3*(65535&e)+(e>>16)&r)&r)/4294967296+.5)*(i.random()>.5?1:-1))};for(let n,s=0;snew me.hmacSha1(pe.bytes.toBits(e)),pbkdf2(e,t,r,n){if(r=r||1e4,0>n||0>r)throw new f("invalid params to pbkdf2");const s=1+(n>>5)<<2;let a,i,o,l,c;const d=new ArrayBuffer(s),u=new m(d);let p=0;const h=fe;for(t=pe.bytes.toBits(t),c=1;(s||1)>p;c++){for(a=i=e.encrypt(h.concat(t,[c])),o=1;r>o;o++)for(i=e.encrypt(i),l=0;lp&&os&&(e=(new r).update(e).finalize());for(let t=0;s>t;t++)n[0][t]=909522486^e[t],n[1][t]=1549556828^e[t];t._baseHash[0].update(n[0]),t._baseHash[1].update(n[1]),t._resultHash=new r(t._baseHash[0])}reset(){const e=this;e._resultHash=new e._hash(e._baseHash[0]),e._updated=!1}update(e){this._updated=!0,this._resultHash.update(e)}digest(){const e=this,t=e._resultHash.finalize(),r=new e._hash(e._baseHash[1]).update(t).finalize();return e.reset(),r}encrypt(e){if(this._updated)throw new f("encrypt on already updated hmac called!");return this.update(e),this.digest(e)}}},ge=typeof S!=$&&typeof S.getRandomValues==ee,_e="Invalid password",ye="Invalid signature",be="zipjs-abort-check-password";function xe(e){return ge?S.getRandomValues(e):we.getRandomValues(e)}const Se=16,ze={name:"PBKDF2"},ke=r.assign({hash:{name:"HMAC"}},ze),ve=r.assign({iterations:1e3,hash:{name:"SHA-1"}},ze),Ee=["deriveBits"],Re=[8,12,16],De=[16,24,32],Te=10,Fe=[0,0,0,0],Ae=typeof S!=$,Ce=Ae&&S.subtle,We=Ae&&typeof Ce!=$,Ne=pe.bytes,Ue=class{constructor(e){const t=this;t._tables=[[[],[],[],[],[]],[[],[],[],[],[]]],t._tables[0][0][0]||t._precompute();const r=t._tables[0][4],n=t._tables[1],s=e.length;let a,i,o,l=1;if(4!==s&&6!==s&&8!==s)throw new f("invalid aes key size");for(t._key=[i=e.slice(0),o=[]],a=s;4*s+28>a;a++){let e=i[a-1];(a%s==0||8===s&&a%s==4)&&(e=r[e>>>24]<<24^r[e>>16&255]<<16^r[e>>8&255]<<8^r[255&e],a%s==0&&(e=e<<8^e>>>24^l<<24,l=l<<1^283*(l>>7))),i[a]=i[a-s]^e}for(let e=0;a;e++,a--){const t=i[3&e?a:a-4];o[e]=4>=a||4>e?t:n[0][r[t>>>24]]^n[1][r[t>>16&255]]^n[2][r[t>>8&255]]^n[3][r[255&t]]}}encrypt(e){return this._crypt(e,0)}decrypt(e){return this._crypt(e,1)}_precompute(){const e=this._tables[0],t=this._tables[1],r=e[4],n=t[4],s=[],a=[];let i,o,l,c;for(let e=0;256>e;e++)a[(s[e]=e<<1^283*(e>>7))^e]=e;for(let d=i=0;!r[d];d^=o||1,i=a[i]||1){let a=i^i<<1^i<<2^i<<3^i<<4;a=a>>8^255&a^99,r[d]=a,n[a]=d,c=s[l=s[o=s[d]]];let u=16843009*c^65537*l^257*o^16843008*d,f=257*s[a]^16843008*a;for(let r=0;4>r;r++)e[r][d]=f=f<<24^f>>>8,t[r][a]=u=u<<24^u>>>8}for(let r=0;5>r;r++)e[r]=e[r].slice(0),t[r]=t[r].slice(0)}_crypt(e,t){if(4!==e.length)throw new f("invalid aes block size");const r=this._key[t],n=r.length/4-2,s=[0,0,0,0],a=this._tables[t],i=a[0],o=a[1],l=a[2],c=a[3],d=a[4];let u,p,h,w=e[0]^r[0],m=e[t?3:1]^r[1],g=e[2]^r[2],_=e[t?1:3]^r[3],y=4;for(let e=0;n>e;e++)u=i[w>>>24]^o[m>>16&255]^l[g>>8&255]^c[255&_]^r[y],p=i[m>>>24]^o[g>>16&255]^l[_>>8&255]^c[255&w]^r[y+1],h=i[g>>>24]^o[_>>16&255]^l[w>>8&255]^c[255&m]^r[y+2],_=i[_>>>24]^o[w>>16&255]^l[m>>8&255]^c[255&g]^r[y+3],y+=4,w=u,m=p,g=h;for(let e=0;4>e;e++)s[t?3&-e:e]=d[w>>>24]<<24^d[m>>16&255]<<16^d[g>>8&255]<<8^d[255&_]^r[y++],u=w,w=m,m=g,g=_,_=u;return s}},Ie=class{constructor(e,t){this._prf=e,this._initIv=t,this._iv=t}reset(){this._iv=this._initIv}update(e){return this.calculate(this._prf,e,this._iv)}incWord(e){if(255==(e>>24&255)){let t=e>>16&255,r=e>>8&255,n=255&e;255===t?(t=0,255===r?(r=0,255===n?n=0:++n):++r):++t,e=0,e+=t<<16,e+=r<<8,e+=n}else e+=1<<24;return e}incCounter(e){0===(e[0]=this.incWord(e[0]))&&(e[1]=this.incWord(e[1]))}calculate(e,t,r){let n;if(!(n=t.length))return[];const s=fe.bitLength(t);for(let s=0;n>s;s+=4){this.incCounter(r);const n=e.encrypt(r);t[s]^=n[0],t[s+1]^=n[1],t[s+2]^=n[2],t[s+3]^=n[3]}return fe.clamp(t,s)}},Le=me.hmacSha1;let He=Ae&&We&&typeof Ce.importKey==ee,Oe=Ae&&We&&typeof Ce.deriveBits==ee;class Me extends k{constructor({password:e,rawPassword:t,signed:n,encryptionStrength:s,checkPasswordOnly:a}){super({start(){r.assign(this,{ready:new _((e=>this.resolveReady=e)),password:Ve(e,t),signed:n,strength:s-1,pending:new p})},async transform(e,t){const r=this,{password:n,strength:s,resolveReady:i,ready:o}=r;n?(await(async(e,t,r,n)=>{const s=await Be(e,t,r,Ke(n,0,Re[t])),a=Ke(n,Re[t]);if(s[0]!=a[0]||s[1]!=a[1])throw new f(_e)})(r,s,n,Ke(e,0,Re[s]+2)),e=Ke(e,Re[s]+2),a?t.error(new f(be)):i()):await o;const l=new p(e.length-Te-(e.length-Te)%Se);t.enqueue(qe(r,e,l,0,Te,!0))},async flush(e){const{signed:t,ctr:r,hmac:n,pending:s,ready:a}=this;if(n&&r){await a;const i=Ke(s,0,s.length-Te),o=Ke(s,s.length-Te);let l=new p;if(i.length){const e=Xe(Ne,i);n.update(e);const t=r.update(e);l=je(Ne,t)}if(t){const e=Ke(je(Ne,n.digest()),0,Te);for(let t=0;Te>t;t++)if(e[t]!=o[t])throw new f(ye)}e.enqueue(l)}}})}}class Pe extends k{constructor({password:e,rawPassword:t,encryptionStrength:n}){let s;super({start(){r.assign(this,{ready:new _((e=>this.resolveReady=e)),password:Ve(e,t),strength:n-1,pending:new p})},async transform(e,t){const r=this,{password:n,strength:s,resolveReady:a,ready:i}=r;let o=new p;n?(o=await(async(e,t,r)=>{const n=xe(new p(Re[t]));return Ze(n,await Be(e,t,r,n))})(r,s,n),a()):await i;const l=new p(o.length+e.length-e.length%Se);l.set(o,0),t.enqueue(qe(r,e,l,o.length,0))},async flush(e){const{ctr:t,hmac:r,pending:n,ready:a}=this;if(r&&t){await a;let i=new p;if(n.length){const e=t.update(Xe(Ne,n));r.update(e),i=je(Ne,e)}s.signature=je(Ne,r.digest()).slice(0,Te),e.enqueue(Ze(i,s.signature))}}}),s=this}}function qe(e,t,r,n,s,a){const{ctr:i,hmac:o,pending:l}=e,c=t.length-s;let d;for(l.length&&(t=Ze(l,t),r=((e,t)=>{if(t&&t>e.length){const r=e;(e=new p(t)).set(r,0)}return e})(r,c-c%Se)),d=0;c-Se>=d;d+=Se){const e=Xe(Ne,Ke(t,d,d+Se));a&&o.update(e);const s=i.update(e);a||o.update(s),r.set(je(Ne,s),d+n)}return e.pending=Ke(t,d),r}async function Be(e,n,s,a){e.password=null;const i=await(async(e,t,r,n,s)=>{if(!He)return me.importKey(t);try{return await Ce.importKey("raw",t,r,!1,s)}catch(e){return He=!1,me.importKey(t)}})(0,s,ke,0,Ee),o=await(async(e,t,r)=>{if(!Oe)return me.pbkdf2(t,e.salt,ve.iterations,r);try{return await Ce.deriveBits(e,t,r)}catch(n){return Oe=!1,me.pbkdf2(t,e.salt,ve.iterations,r)}})(r.assign({salt:a},ve),i,8*(2*De[n]+2)),l=new p(o),c=Xe(Ne,Ke(l,0,De[n])),d=Xe(Ne,Ke(l,De[n],2*De[n])),u=Ke(l,2*De[n]);return r.assign(e,{keys:{key:c,authentication:d,passwordVerification:u},ctr:new Ie(new Ue(c),t.from(Fe)),hmac:new Le(d)}),u}function Ve(e,t){return t===Q?ue(e):t}function Ze(e,t){let r=e;return e.length+t.length&&(r=new p(e.length+t.length),r.set(e,0),r.set(t,e.length)),r}function Ke(e,t,r){return e.subarray(t,r)}function je(e,t){return e.fromBits(t)}function Xe(e,t){return e.toBits(t)}class Ye extends k{constructor({password:e,passwordVerification:t,checkPasswordOnly:n}){super({start(){r.assign(this,{password:e,passwordVerification:t}),$e(this,e)},transform(e,t){const r=this;if(r.password){const t=Je(r,e.subarray(0,12));if(r.password=null,t[11]!=r.passwordVerification)throw new f(_e);e=e.subarray(12)}n?t.error(new f(be)):t.enqueue(Je(r,e))}})}}class Ge extends k{constructor({password:e,passwordVerification:t}){super({start(){r.assign(this,{password:e,passwordVerification:t}),$e(this,e)},transform(e,t){const r=this;let n,s;if(r.password){r.password=null;const t=xe(new p(12));t[11]=r.passwordVerification,n=new p(e.length+t.length),n.set(Qe(r,t),0),s=12}else n=new p(e.length),s=0;n.set(Qe(r,e),s),t.enqueue(n)}})}}function Je(e,t){const r=new p(t.length);for(let n=0;n>>24]),s=~e.crcKey2.get(),e.keys=[r,n,s]}function tt(e){const t=2|e.keys[2];return rt(i.imul(t,1^t)>>>8)}function rt(e){return 255&e}function nt(e){return 4294967295&e}const st="deflate-raw";class at extends k{constructor(e,{chunkSize:t,CompressionStream:r,CompressionStreamNative:n}){super({});const{compressed:s,encrypted:a,useCompressionStream:i,zipCrypto:o,signed:l,level:c}=e,d=this;let u,f,p=ot(super.readable);a&&!o||!l||(u=new de,p=dt(p,u)),s&&(p=ct(p,i,{level:c,chunkSize:t},n,r)),a&&(o?p=dt(p,new Ge(e)):(f=new Pe(e),p=dt(p,f))),lt(d,p,(()=>{let e;a&&!o&&(e=f.signature),a&&!o||!l||(e=new m(u.value.buffer).getUint32(0)),d.signature=e}))}}class it extends k{constructor(e,{chunkSize:t,DecompressionStream:r,DecompressionStreamNative:n}){super({});const{zipCrypto:s,encrypted:a,signed:i,signature:o,compressed:l,useCompressionStream:c}=e;let d,u,p=ot(super.readable);a&&(s?p=dt(p,new Ye(e)):(u=new Me(e),p=dt(p,u))),l&&(p=ct(p,c,{chunkSize:t},n,r)),a&&!s||!i||(d=new de,p=dt(p,d)),lt(this,p,(()=>{if((!a||s)&&i){const e=new m(d.value.buffer);if(o!=e.getUint32(0,!1))throw new f(ye)}}))}}function ot(e){return dt(e,new k({transform(e,t){e&&e.length&&t.enqueue(e)}}))}function lt(e,t,n){t=dt(t,new k({flush:n})),r.defineProperty(e,"readable",{get:()=>t})}function ct(e,t,r,n,s){try{e=dt(e,new(t&&n?n:s)(st,r))}catch(n){if(!t)return e;try{e=dt(e,new s(st,r))}catch(t){return e}}return e}function dt(e,t){return e.pipeThrough(t)}const ut="data",ft="close",pt="deflate";class ht extends k{constructor(e,t){super({});const n=this,{codecType:s}=e;let a;s.startsWith(pt)?a=at:s.startsWith("inflate")&&(a=it);let i=0,o=0;const l=new a(e,t),c=super.readable,d=new k({transform(e,t){e&&e.length&&(o+=e.length,t.enqueue(e))},flush(){r.assign(n,{inputSize:o})}}),u=new k({transform(e,t){e&&e.length&&(i+=e.length,t.enqueue(e))},flush(){const{signature:e}=l;r.assign(n,{signature:e,outputSize:i,inputSize:o})}});r.defineProperty(n,"readable",{get:()=>c.pipeThrough(d).pipeThrough(l).pipeThrough(u)})}}class wt extends k{constructor(e){let t;super({transform:function r(n,s){if(t){const e=new p(t.length+n.length);e.set(t),e.set(n,t.length),n=e,t=null}n.length>e?(s.enqueue(n.slice(0,e)),r(n.slice(e),s)):t=n},flush(e){t&&t.length&&e.enqueue(t)}})}}let mt=typeof F!=$;class gt{constructor(e,{readable:t,writable:n},{options:s,config:a,streamOptions:i,useWebWorkers:o,transferStreams:l,scripts:c},d){const{signal:u}=i;return r.assign(e,{busy:!0,readable:t.pipeThrough(new wt(a.chunkSize)).pipeThrough(new _t(t,i),{signal:u}),writable:n,options:r.assign({},s),scripts:c,transferStreams:l,terminate:()=>new _((t=>{const{worker:r,busy:n}=e;r?(n?e.resolveTerminated=t:(r.terminate(),t()),e.interface=null):t()})),onTaskFinished(){const{resolveTerminated:t}=e;t&&(e.resolveTerminated=null,e.terminated=!0,e.worker.terminate(),t()),e.busy=!1,d(e)}}),(o&&mt?xt:bt)(e,a)}}class _t extends k{constructor(e,{onstart:t,onprogress:r,size:n,onend:s}){let a=0;super({async start(){t&&await yt(t,n)},async transform(e,t){a+=e.length,r&&await yt(r,a,n),t.enqueue(e)},async flush(){e.size=a,s&&await yt(s,a)}})}}async function yt(e,...t){try{await e(...t)}catch(e){}}function bt(e,t){return{run:()=>(async({options:e,readable:t,writable:r,onTaskFinished:n},s)=>{try{const a=new ht(e,s);await t.pipeThrough(a).pipeTo(r,{preventClose:!0,preventAbort:!0});const{signature:i,inputSize:o,outputSize:l}=a;return{signature:i,inputSize:o,outputSize:l}}finally{n()}})(e,t)}}function xt(e,t){const{baseURL:n,chunkSize:s}=t;if(!e.interface){let a;try{a=((e,t,n)=>{const s={type:"module"};let a,i;typeof e==ee&&(e=e());try{a=new u(e,t)}catch(t){a=e}if(St)try{i=new F(a)}catch(e){St=!1,i=new F(a,s)}else i=new F(a,s);return i.addEventListener("message",(e=>(async({data:e},t)=>{const{type:n,value:s,messageId:a,result:i,error:o}=e,{reader:l,writer:c,resolveResult:d,rejectResult:u,onTaskFinished:h}=t;try{if(o){const{message:e,stack:t,code:n,name:s}=o,a=new f(e);r.assign(a,{stack:t,code:n,name:s}),w(a)}else{if("pull"==n){const{value:e,done:r}=await l.read();kt({type:ut,value:e,done:r,messageId:a},t)}n==ut&&(await c.ready,await c.write(new p(s)),kt({type:"ack",messageId:a},t)),n==ft&&w(null,i)}}catch(o){kt({type:ft,messageId:a},t),w(o)}function w(e,t){e?u(e):d(t),c&&c.releaseLock(),h()}})(e,n))),i})(e.scripts[0],n,e)}catch(r){return mt=!1,bt(e,t)}r.assign(e,{worker:a,interface:{run:()=>(async(e,t)=>{let n,s;const a=new _(((e,t)=>{n=e,s=t}));r.assign(e,{reader:null,writer:null,resolveResult:n,rejectResult:s,result:a});const{readable:i,options:o,scripts:l}=e,{writable:c,closed:d}=(e=>{let t;const r=new _((e=>t=e));return{writable:new E({async write(t){const r=e.getWriter();await r.ready,await r.write(t),r.releaseLock()},close(){t()},abort:t=>e.getWriter().abort(t)}),closed:r}})(e.writable),u=kt({type:"start",scripts:l.slice(1),options:o,config:t,readable:i,writable:c},e);u||r.assign(e,{reader:i.getReader(),writer:c.getWriter()});const f=await a;return u||await c.getWriter().close(),await d,f})(e,{chunkSize:s})}})}return e.interface}let St=!0,zt=!0;function kt(e,{worker:t,writer:r,onTaskFinished:n,transferStreams:s}){try{let{value:r,readable:n,writable:a}=e;const i=[];if(r&&(r.byteLengtha?n.close():this.chunkOffset+=t}});return r}}class Ht extends It{constructor(){super();const e=this,t=new E({write:t=>e.writeUint8Array(t)});r.defineProperty(e,Ut,{get:()=>t})}writeUint8Array(){}}class Ot extends Lt{constructor(e){super(),r.assign(this,{blob:e,size:e.size})}async readUint8Array(e,t){const r=this,n=e+t,s=e||nt&&(a=a.slice(e,n)),new p(a)}}class Mt extends It{constructor(e){super();const t=new k,n=[];e&&n.push(["Content-Type",e]),r.defineProperty(this,Ut,{get:()=>t.writable}),this.blob=new d(t.readable,{headers:n}).blob()}getData(){return this.blob}}class Pt extends Lt{constructor(e,t){super(),Bt(this,e,t)}async init(){await Vt(this,Qt,Xt),super.init()}readUint8Array(e,t){return Zt(this,e,t,Qt,Xt)}}class qt extends Lt{constructor(e,t){super(),Bt(this,e,t)}async init(){await Vt(this,$t,Yt),super.init()}readUint8Array(e,t){return Zt(this,e,t,$t,Yt)}}function Bt(e,t,n){const{preventHeadRequest:s,useRangeHeader:a,forceRangeRequests:i,combineSizeEocd:o}=n;delete(n=r.assign({},n)).preventHeadRequest,delete n.useRangeHeader,delete n.forceRangeRequests,delete n.combineSizeEocd,delete n.useXHR,r.assign(e,{url:t,options:n,preventHeadRequest:s,useRangeHeader:a,forceRangeRequests:i,combineSizeEocd:o})}async function Vt(e,t,r){const{url:n,preventHeadRequest:a,useRangeHeader:i,forceRangeRequests:o,combineSizeEocd:l}=e;if((e=>{const{baseURL:t}=ae(),{protocol:r}=new u(e,t);return"http:"==r||"https:"==r})(n)&&(i||o)&&(void 0===a||a)){const n=await t(Ct,e,Kt(e,l?-22:void 0));if(!o&&n.headers.get("Accept-Ranges")!=Wt)throw new f(Ft);{let a;l&&(e.eocdCache=new p(await n.arrayBuffer()));const i=n.headers.get("Content-Range");if(i){const e=i.trim().split(/\s*\/\s*/);if(e.length){const t=e[1];t&&"*"!=t&&(a=s(t))}}a===Q?await Jt(e,t,r):e.size=a}}else await Jt(e,t,r)}async function Zt(e,t,r,n,s){const{useRangeHeader:a,forceRangeRequests:i,eocdCache:o,size:l,options:c}=e;if(a||i){if(o&&t==l-22&&22==r)return o;const s=await n(Ct,e,Kt(e,t,r));if(206!=s.status)throw new f(Ft);return new p(await s.arrayBuffer())}{const{data:n}=e;return n||await s(e,c),new p(e.data.subarray(t,t+r))}}function Kt(e,t=0,n=1){return r.assign({},jt(e),{Range:Wt+"="+(0>t?t:t+"-"+(t+n-1))})}function jt({options:e}){const{headers:t}=e;if(t)return Symbol.iterator in t?r.fromEntries(t):t}async function Xt(e){await Gt(e,Qt)}async function Yt(e){await Gt(e,$t)}async function Gt(e,t){const r=await t(Ct,e,jt(e));e.data=new p(await r.arrayBuffer()),e.size||(e.size=e.data.length)}async function Jt(e,t,r){if(e.preventHeadRequest)await r(e,e.options);else{const n=(await t("HEAD",e,jt(e))).headers.get("Content-Length");n?e.size=s(n):await r(e,e.options)}}async function Qt(e,{options:t,url:n},s){const a=await fetch(n,r.assign({},t,{method:e,headers:s}));if(400>a.status)return a;throw 416==a.status?new f(Ft):new f(Tt+(a.statusText||a.status))}function $t(e,{url:t},n){return new _(((s,a)=>{const i=new XMLHttpRequest;if(i.addEventListener("load",(()=>{if(400>i.status){const e=[];i.getAllResponseHeaders().trim().split(/[\r\n]+/).forEach((t=>{const r=t.trim().split(/\s*:\s*/);r[0]=r[0].trim().replace(/^[a-z]|-[a-z]/g,(e=>e.toUpperCase())),e.push(r)})),s({status:i.status,arrayBuffer:()=>i.response,headers:new l(e)})}else a(416==i.status?new f(Ft):new f(Tt+(i.statusText||i.status)))}),!1),i.addEventListener("error",(e=>a(e.detail?e.detail.error:new f("Network error"))),!1),i.open(e,t),n)for(const e of r.entries(n))i.setRequestHeader(e[0],e[1]);i.responseType="arraybuffer",i.send()}))}class er extends Lt{constructor(e,t={}){super(),r.assign(this,{url:e,reader:t.useXHR?new qt(e,t):new Pt(e,t)})}set size(e){}get size(){return this.reader.size}async init(){await this.reader.init(),super.init()}readUint8Array(e,t){return this.reader.readUint8Array(e,t)}}class tr extends Lt{constructor(e){super(),this.readers=e}async init(){const e=this,{readers:t}=e;e.lastDiskNumber=0,e.lastDiskOffset=0,await _.all(t.map((async(r,n)=>{await r.init(),n!=t.length-1&&(e.lastDiskOffset+=r.size),e.size+=r.size}))),super.init()}async readUint8Array(e,t,r=0){const n=this,{readers:s}=this;let a,o=r;-1==o&&(o=s.length-1);let l=e;for(;l>=s[o].size;)l-=s[o].size,o++;const c=s[o],d=c.size;if(l+t>d){const s=d-l;a=new p(t),a.set(await ir(c,l,s)),a.set(await n.readUint8Array(e+s,t-s,r),s)}else a=await ir(c,l,t);return n.lastDiskNumber=i.max(o,n.lastDiskNumber),a}}class rr extends It{constructor(e,t=4294967295){super();const n=this;let s,a,i;r.assign(n,{diskNumber:0,diskOffset:0,size:0,maxSize:t,availableSize:t});const o=new E({async write(t){const{availableSize:r}=n;if(i)t.lengtho})}}async function nr(e,t){if(!e.init||e.initialized)return _.resolve();await e.init(t)}function sr(e){return t.isArray(e)&&(e=new tr(e)),e instanceof v&&(e={readable:e}),e}function ar(e){e.writable===Q&&typeof e.next==ee&&(e=new rr(e)),e instanceof E&&(e={writable:e});const{writable:t}=e;return t.size===Q&&(t.size=0),e instanceof rr||r.assign(e,{diskNumber:0,diskOffset:0,availableSize:1/0,maxSize:1/0}),e}function ir(e,t,r,n){return e.readUint8Array(t,r,n)}const or=tr,lr=rr,cr="diskNumberStart",dr="lastModDate",ur="lastAccessDate",fr="creationDate",pr="internalFileAttribute",hr="externalFileAttribute",wr="msDosCompatible",mr="zip64",gr=["filename","rawFilename","compressedSize","uncompressedSize",dr,"rawLastModDate","comment","rawComment",ur,fr,"offset",cr,cr,pr,hr,wr,mr,"directory","bitFlag","encrypted","signature","filenameUTF8","commentUTF8","compressionMethod","version","versionMadeBy","extraField","rawExtraField","extraFieldZip64","extraFieldUnicodePath","extraFieldUnicodeComment","extraFieldAES","extraFieldNTFS","extraFieldExtendedTimestamp"];class _r{constructor(e){gr.forEach((t=>this[t]=e[t]))}}const yr="File already exists",br="Zip file comment exceeds 64KB",xr="File entry comment exceeds 64KB",Sr="File entry name exceeds 64KB",zr="Version exceeds 65535",kr="The strength must equal 1, 2, or 3",vr="Extra field type exceeds 65535",Er="Extra field data exceeds 64KB",Rr="Zip64 is not supported (make sure 'keepOrder' is set to 'true')",Dr=new p([7,0,2,0,65,69,3,0,0]);let Tr=0;const Fr=[];class Ar{constructor(e,t={}){const n=(e=ar(e)).availableSize!==Q&&e.availableSize>0&&e.availableSize!==1/0&&e.maxSize!==Q&&e.maxSize>0&&e.maxSize!==1/0;r.assign(this,{writer:e,addSplitZipSignature:n,options:t,config:ae(),files:new l,filenames:new c,offset:e.writable.size,pendingEntriesSize:0,pendingAddFileCalls:new c,bufferedWrites:0})}async add(e="",n,l={}){const c=this,{pendingAddFileCalls:u,config:g}=c;let y;TrFr.push(e)));try{if(e=e.trim(),c.filenames.has(e))throw new f(yr);return c.filenames.add(e),y=(async(e,n,l,c)=>{n=n.trim(),c.directory&&!n.endsWith("/")?n+="/":c.directory=n.endsWith("/");const u=Nr(e,c,"encodeText",ue),g=u(n);if(Pr(g)>Y)throw new f(Sr);const y=c.comment||"",b=u(y);if(Pr(b)>Y)throw new f(xr);const x=Nr(e,c,"version",20);if(x>Y)throw new f(zr);const S=Nr(e,c,"versionMadeBy",20);if(S>Y)throw new f(zr);const z=Nr(e,c,dr,new o),v=Nr(e,c,ur),E=Nr(e,c,fr),R=Nr(e,c,wr,!0),D=Nr(e,c,pr,0),T=Nr(e,c,hr,0),F=Nr(e,c,"password"),A=Nr(e,c,"rawPassword"),C=Nr(e,c,"encryptionStrength",3),W=Nr(e,c,"zipCrypto"),N=Nr(e,c,"extendedTimestamp",!0),U=Nr(e,c,"keepOrder",!0),I=Nr(e,c,"level"),L=Nr(e,c,"useWebWorkers"),H=Nr(e,c,"bufferedWrite"),O=Nr(e,c,"dataDescriptorSignature",!1),M=Nr(e,c,"signal"),P=Nr(e,c,"useCompressionStream");let q=Nr(e,c,"dataDescriptor",!0),B=Nr(e,c,mr);if(F!==Q&&C!==Q&&(1>C||C>3))throw new f(kr);let V=new p;const{extraField:Z}=c;if(Z){let e=0,t=0;Z.forEach((t=>e+=4+Pr(t))),V=new p(e),Z.forEach(((e,r)=>{if(r>Y)throw new f(vr);if(Pr(e)>Y)throw new f(Er);Or(V,new h([r]),t),Or(V,new h([Pr(e)]),t+2),Or(V,e,t+4),t+=4+Pr(e)}))}let K=0,j=0,$=0;const ee=!0===B;l&&(l=sr(l),await nr(l),l.size===Q?(q=!0,(B||B===Q)&&(B=!0,$=K=X)):($=l.size,K=(e=>e+5*(i.floor(e/16383)+1))($)));const{diskOffset:te,diskNumber:re,maxSize:ne}=e.writer,se=ee||$>=X,ae=ee||K>=X,ie=ee||e.offset+e.pendingEntriesSize-te>=X,oe=Nr(e,c,"supportZip64SplitFile",!0)&&ee||re+i.ceil(e.pendingEntriesSize/ne)>=Y;if(ie||se||ae||oe){if(!1===B||!U)throw new f(Rr);B=!0}B=B||!1;const le=(e=>{const{rawFilename:t,lastModDate:r,lastAccessDate:n,creationDate:s,rawPassword:a,password:o,level:l,zip64:c,zipCrypto:d,dataDescriptor:u,directory:f,rawExtraField:h,encryptionStrength:m,extendedTimestamp:g}=e,_=0!==l&&!f,y=!!(o&&Pr(o)||a&&Pr(a));let b,x,S,z,k=e.version;if(y&&!d){b=new p(Pr(Dr)+2);const e=Mr(b);Ir(e,0,39169),Or(b,Dr,2),Ur(e,8,m)}else b=new p;if(g){S=new p(9+(n?4:0)+(s?4:0));const e=Mr(S);Ir(e,0,21589),Ir(e,2,Pr(S)-4),z=1+(n?2:0)+(s?4:0),Ur(e,4,z);let t=5;Lr(e,t,i.floor(r.getTime()/1e3)),t+=4,n&&(Lr(e,t,i.floor(n.getTime()/1e3)),t+=4),s&&Lr(e,t,i.floor(s.getTime()/1e3));try{x=new p(36);const e=Mr(x),t=Wr(r);Ir(e,0,10),Ir(e,2,32),Ir(e,8,1),Ir(e,10,24),Hr(e,12,t),Hr(e,20,Wr(n)||t),Hr(e,28,Wr(s)||t)}catch(e){x=new p}}else x=S=new p;let v=2048;u&&(v|=8);let E=0;_&&(E=8),c&&(k=k>45?k:45),y&&(v|=1,d||(k=k>51?k:51,E=99,_&&(b[9]=8)));const R=new p(26),D=Mr(R);Ir(D,0,k),Ir(D,2,v),Ir(D,4,E);const T=new w(1),F=Mr(T);let A;A=J>r?J:r>G?G:r,Ir(F,0,(A.getHours()<<6|A.getMinutes())<<5|A.getSeconds()/2),Ir(F,2,(A.getFullYear()-1980<<4|A.getMonth()+1)<<5|A.getDate());const C=T[0];Lr(D,6,C),Ir(D,22,Pr(t));const W=Pr(b,S,x,h);Ir(D,24,W);const N=new p(30+Pr(t)+W);return Lr(Mr(N),0,67324752),Or(N,R,4),Or(N,t,30),Or(N,b,30+Pr(t)),Or(N,S,30+Pr(t,b)),Or(N,x,30+Pr(t,b,S)),Or(N,h,30+Pr(t,b,S,x)),{localHeaderArray:N,headerArray:R,headerView:D,lastModDate:r,rawLastModDate:C,encrypted:y,compressed:_,version:k,compressionMethod:E,extraFieldExtendedTimestampFlag:z,rawExtraFieldExtendedTimestamp:S,rawExtraFieldNTFS:x,rawExtraFieldAES:b,extraFieldLength:W}})(c=r.assign({},c,{rawFilename:g,rawComment:b,version:x,versionMadeBy:S,lastModDate:z,lastAccessDate:v,creationDate:E,rawExtraField:V,zip64:B,zip64UncompressedSize:se,zip64CompressedSize:ae,zip64Offset:ie,zip64DiskNumberStart:oe,password:F,rawPassword:A,level:P||e.config.CompressionStream!==Q?I:0,useWebWorkers:L,encryptionStrength:C,extendedTimestamp:N,zipCrypto:W,bufferedWrite:H,keepOrder:U,dataDescriptor:q,dataDescriptorSignature:O,signal:M,msDosCompatible:R,internalFileAttribute:D,externalFileAttribute:T,useCompressionStream:P})),ce=(e=>{const{zip64:t,dataDescriptor:r,dataDescriptorSignature:n}=e;let s,a=new p,i=0;return r&&(a=new p(t?n?24:20:n?16:12),s=Mr(a),n&&(i=4,Lr(s,0,134695760))),{dataDescriptorArray:a,dataDescriptorView:s,dataDescriptorOffset:i}})(c),de=Pr(le.localHeaderArray,ce.dataDescriptorArray);let fe;j=de+K,e.options.usdz&&(j+=j+64),e.pendingEntriesSize+=j;try{fe=await(async(e,n,o,l,c)=>{const{files:u,writer:h}=e,{keepOrder:w,dataDescriptor:g,signal:y}=c,{headerInfo:b}=l,{usdz:x}=e.options,S=t.from(u.values()).pop();let z,v,E,R,D,T,F,A={};u.set(n,A);try{let t;w&&(t=S&&S.lock,A.lock=new _((e=>E=e))),!(c.bufferedWrite||e.writerLocked||e.bufferedWrites&&w)&&g||x?(T=h,await C()):(T=new k,F=new d(T.readable).blob(),T.writable.size=0,z=!0,e.bufferedWrites++,await nr(h)),await nr(T);const{writable:b}=h;let{diskOffset:N}=h;if(e.addSplitZipSignature){delete e.addSplitZipSignature;const t=new p(4);Lr(Mr(t),0,134695760),await Cr(b,t),e.offset+=4}x&&((e,t)=>{const{headerInfo:r}=e;let{localHeaderArray:n,extraFieldLength:s}=r,a=Mr(n),i=64-(t+Pr(n))%64;4>i&&(i+=64);const o=new p(i),l=Mr(o);Ir(l,0,6534),Ir(l,2,i-2);const c=n;r.localHeaderArray=n=new p(Pr(c)+i),Or(n,c),Or(n,o,Pr(c)),a=Mr(n),Ir(a,28,s+i),e.metadataSize+=i})(l,e.offset-N),z||(await t,await W(b));const{diskNumber:U}=h;if(D=!0,A.diskNumberStart=U,A=await(async(e,t,{diskNumberStart:n,lock:o},l,c,d)=>{const{headerInfo:u,dataDescriptorInfo:f,metadataSize:h}=l,{localHeaderArray:w,headerArray:m,lastModDate:g,rawLastModDate:y,encrypted:b,compressed:x,version:S,compressionMethod:z,rawExtraFieldExtendedTimestamp:k,extraFieldExtendedTimestampFlag:v,rawExtraFieldNTFS:E,rawExtraFieldAES:R}=u,{dataDescriptorArray:D}=f,{rawFilename:T,lastAccessDate:F,creationDate:A,password:C,rawPassword:W,level:N,zip64:U,zip64UncompressedSize:I,zip64CompressedSize:L,zip64Offset:H,zip64DiskNumberStart:O,zipCrypto:M,dataDescriptor:P,directory:q,versionMadeBy:B,rawComment:V,rawExtraField:Z,useWebWorkers:K,onstart:j,onprogress:Y,onend:G,signal:J,encryptionStrength:$,extendedTimestamp:ee,msDosCompatible:te,internalFileAttribute:re,externalFileAttribute:ne,useCompressionStream:se}=d,ae={lock:o,versionMadeBy:B,zip64:U,directory:!!q,filenameUTF8:!0,rawFilename:T,commentUTF8:!0,rawComment:V,rawExtraFieldExtendedTimestamp:k,rawExtraFieldNTFS:E,rawExtraFieldAES:R,rawExtraField:Z,extendedTimestamp:ee,msDosCompatible:te,internalFileAttribute:re,externalFileAttribute:ne,diskNumberStart:n};let ie,oe=0,le=0;const{writable:ce}=t;if(e){e.chunkSize=(e=>i.max(e.chunkSize,64))(c),await Cr(ce,w);const t=e.readable,r=t.size=e.size,n={options:{codecType:pt,level:N,rawPassword:W,password:C,encryptionStrength:$,zipCrypto:b&&M,passwordVerification:b&&M&&y>>8&255,signed:!0,compressed:x,encrypted:b,useWebWorkers:K,useCompressionStream:se,transferStreams:!1},config:c,streamOptions:{signal:J,size:r,onstart:j,onprogress:Y,onend:G}},a=await(async(e,t)=>{const{options:r,config:n}=t,{transferStreams:a,useWebWorkers:i,useCompressionStream:o,codecType:l,compressed:c,signed:d,encrypted:u}=r,{workerScripts:f,maxWorkers:p}=n;t.transferStreams=a||a===Q;const h=!(c||d||u||t.transferStreams);return t.useWebWorkers=!h&&(i||i===Q&&n.useWebWorkers),t.scripts=t.useWebWorkers&&f?f[l]:[],r.useCompressionStream=o||o===Q&&n.useCompressionStream,(await(async()=>{const r=vt.find((e=>!e.busy));if(r)return Dt(r),new gt(r,e,t,w);if(vt.lengthEt.push({resolve:r,stream:e,workerOptions:t})))})()).run();function w(e){if(Et.length){const[{resolve:t,stream:r,workerOptions:n}]=Et.splice(0,1);t(new gt(e,r,n,w))}else e.worker?(Dt(e),((e,t)=>{const{config:r}=t,{terminateWorkerTimeout:n}=r;s.isFinite(n)&&n>=0&&(e.terminated?e.terminated=!1:e.terminateTimeout=setTimeout((async()=>{vt=vt.filter((t=>t!=e));try{await e.terminate()}catch(e){}}),n))})(e,t)):vt=vt.filter((t=>t!=e))}})({readable:t,writable:ce},n);le=a.inputSize,oe=a.outputSize,ie=a.signature,ce.size+=le}else await Cr(ce,w);let de;if(U){let e=4;I&&(e+=8),L&&(e+=8),H&&(e+=8),O&&(e+=4),de=new p(e)}else de=new p;return((e,t)=>{const{signature:r,rawExtraFieldZip64:n,compressedSize:s,uncompressedSize:i,headerInfo:o,dataDescriptorInfo:l}=e,{headerView:c,encrypted:d}=o,{dataDescriptorView:u,dataDescriptorOffset:f}=l,{zip64:p,zip64UncompressedSize:h,zip64CompressedSize:w,zipCrypto:m,dataDescriptor:g}=t;if(d&&!m||r===Q||(Lr(c,10,r),g&&Lr(u,f,r)),p){const e=Mr(n);Ir(e,0,1),Ir(e,2,Pr(n)-4);let t=4;h&&(Lr(c,18,X),Hr(e,t,a(i)),t+=8),w&&(Lr(c,14,X),Hr(e,t,a(s))),g&&(Hr(u,f+4,a(s)),Hr(u,f+12,a(i)))}else Lr(c,14,s),Lr(c,18,i),g&&(Lr(u,f+4,s),Lr(u,f+8,i))})({signature:ie,rawExtraFieldZip64:de,compressedSize:oe,uncompressedSize:le,headerInfo:u,dataDescriptorInfo:f},d),P&&await Cr(ce,D),r.assign(ae,{uncompressedSize:le,compressedSize:oe,lastModDate:g,rawLastModDate:y,creationDate:A,lastAccessDate:F,encrypted:b,size:h+oe,compressionMethod:z,version:S,headerArray:m,signature:ie,rawExtraFieldZip64:de,extraFieldExtendedTimestampFlag:v,zip64UncompressedSize:I,zip64CompressedSize:L,zip64Offset:H,zip64DiskNumberStart:O}),ae})(o,T,A,l,e.config,c),D=!1,u.set(n,A),A.filename=n,z){await T.writable.getWriter().close();let e=await F;await t,await C(),R=!0,g||(e=await(async(e,t,r,{zipCrypto:n})=>{let s;s=await t.slice(0,26).arrayBuffer(),26!=s.byteLength&&(s=s.slice(0,26));const a=new m(s);return e.encrypted&&!n||Lr(a,14,e.signature),e.zip64?(Lr(a,18,X),Lr(a,22,X)):(Lr(a,18,e.compressedSize),Lr(a,22,e.uncompressedSize)),await Cr(r,new p(s)),t.slice(s.byteLength)})(A,e,b,c)),await W(b),A.diskNumberStart=h.diskNumber,N=h.diskOffset,await e.stream().pipeTo(b,{preventClose:!0,preventAbort:!0,signal:y}),b.size+=e.size,R=!1}if(A.offset=e.offset-N,A.zip64)((e,t)=>{const{rawExtraFieldZip64:r,offset:n,diskNumberStart:s}=e,{zip64UncompressedSize:i,zip64CompressedSize:o,zip64Offset:l,zip64DiskNumberStart:c}=t,d=Mr(r);let u=4;i&&(u+=8),o&&(u+=8),l&&(Hr(d,u,a(n)),u+=8),c&&Lr(d,u,s)})(A,c);else if(A.offset>=X)throw new f(Rr);return e.offset+=A.size,A}catch(t){if(z&&R||!z&&D){if(e.hasCorruptedEntries=!0,t)try{t.corruptedEntry=!0}catch(e){}z?e.offset+=T.writable.size:e.offset=T.writable.size}throw u.delete(n),t}finally{z&&e.bufferedWrites--,E&&E(),v&&v()}async function C(){e.writerLocked=!0;const{lockWriter:t}=e;e.lockWriter=new _((t=>v=()=>{e.writerLocked=!1,t()})),await t}async function W(e){Pr(b.localHeaderArray)>h.availableSize&&(h.availableSize=0,await Cr(e,new p))}})(e,n,l,{headerInfo:le,dataDescriptorInfo:ce,metadataSize:de},c)}finally{e.pendingEntriesSize-=j}return r.assign(fe,{name:n,comment:y,extraField:Z}),new _r(fe)})(c,e,n,l),u.add(y),await y}catch(t){throw c.filenames.delete(e),t}finally{u.delete(y);const e=Fr.shift();e?e():Tr--}}async close(e=new p,r={}){const{pendingAddFileCalls:n,writer:s}=this,{writable:o}=s;for(;n.size;)await _.allSettled(t.from(n));return await(async(e,r,n)=>{const{files:s,writer:o}=e,{diskOffset:l,writable:c}=o;let{diskNumber:d}=o,u=0,h=0,w=e.offset-l,m=s.size;for(const[,e]of s){const{rawFilename:t,rawExtraFieldZip64:r,rawExtraFieldAES:n,rawComment:s,rawExtraFieldNTFS:a,rawExtraField:o,extendedTimestamp:l,extraFieldExtendedTimestampFlag:c,lastModDate:d}=e;let u;if(l){u=new p(9);const e=Mr(u);Ir(e,0,21589),Ir(e,2,5),Ur(e,4,c),Lr(e,5,i.floor(d.getTime()/1e3))}else u=new p;e.rawExtraFieldCDExtendedTimestamp=u,h+=46+Pr(t,s,r,n,a,u,o)}const g=new p(h),_=Mr(g);await nr(o);let y=0;for(const[e,r]of t.from(s.values()).entries()){const{offset:t,rawFilename:a,rawExtraFieldZip64:i,rawExtraFieldAES:l,rawExtraFieldCDExtendedTimestamp:d,rawExtraFieldNTFS:f,rawExtraField:p,rawComment:h,versionMadeBy:w,headerArray:m,directory:b,zip64:x,zip64UncompressedSize:S,zip64CompressedSize:z,zip64DiskNumberStart:k,zip64Offset:v,msDosCompatible:E,internalFileAttribute:R,externalFileAttribute:D,diskNumberStart:T,uncompressedSize:F,compressedSize:A}=r,C=Pr(i,l,d,f,p);Lr(_,u,33639248),Ir(_,u+4,w);const W=Mr(m);S||Lr(W,18,F),z||Lr(W,14,A),Or(g,m,u+6),Ir(_,u+30,C),Ir(_,u+32,Pr(h)),Ir(_,u+34,x&&k?Y:T),Ir(_,u+36,R),D?Lr(_,u+38,D):b&&E&&Ur(_,u+38,16),Lr(_,u+42,x&&v?X:t),Or(g,a,u+46),Or(g,i,u+46+Pr(a)),Or(g,l,u+46+Pr(a,i)),Or(g,d,u+46+Pr(a,i,l)),Or(g,f,u+46+Pr(a,i,l,d)),Or(g,p,u+46+Pr(a,i,l,d,f)),Or(g,h,u+46+Pr(a)+C);const N=46+Pr(a,h)+C;if(u-y>o.availableSize&&(o.availableSize=0,await Cr(c,g.slice(y,u)),y=u),u+=N,n.onprogress)try{await n.onprogress(e+1,s.size,new _r(r))}catch(e){}}await Cr(c,y?g.slice(y):g);let b=o.diskNumber;const{availableSize:x}=o;22>x&&b++;let S=Nr(e,n,"zip64");if(!(X>w&&X>h&&Y>m&&Y>b)){if(!1===S)throw new f(Rr);S=!0}const z=new p(S?98:22),k=Mr(z);u=0,S&&(Lr(k,0,101075792),Hr(k,4,a(44)),Ir(k,12,45),Ir(k,14,45),Lr(k,16,b),Lr(k,20,d),Hr(k,24,a(m)),Hr(k,32,a(m)),Hr(k,40,a(h)),Hr(k,48,a(w)),Lr(k,56,117853008),Hr(k,64,a(w)+a(h)),Lr(k,72,b+1),Nr(e,n,"supportZip64SplitFile",!0)&&(b=Y,d=Y),m=Y,w=X,h=X,u+=76),Lr(k,u,101010256),Ir(k,u+4,b),Ir(k,u+6,d),Ir(k,u+8,m),Ir(k,u+10,m),Lr(k,u+12,h),Lr(k,u+16,w);const v=Pr(r);if(v){if(v>Y)throw new f(br);Ir(k,u+20,v)}await Cr(c,z),v&&await Cr(c,r)})(this,e,r),Nr(this,r,"preventClose")||await o.getWriter().close(),s.getData?s.getData():o}}async function Cr(e,t){const r=e.getWriter();try{await r.ready,e.size+=Pr(t),await r.write(t)}finally{r.releaseLock()}}function Wr(e){if(e)return(a(e.getTime())+a(116444736e5))*a(1e4)}function Nr(e,t,r,n){const s=t[r]===Q?e.options[r]:t[r];return s===Q?n:s}function Ur(e,t,r){e.setUint8(t,r)}function Ir(e,t,r){e.setUint16(t,r,!0)}function Lr(e,t,r){e.setUint32(t,r,!0)}function Hr(e,t,r){e.setBigUint64(t,r,!0)}function Or(e,t,r){e.set(t,r)}function Mr(e){return new m(e.buffer)}function Pr(...e){let t=0;return e.forEach((e=>e&&(t+=e.length))),t}ie({Deflate:function(e){const t=new j,r=(n=e&&e.chunkSize?e.chunkSize:65536)+5*(i.floor(n/16383)+1);var n;const s=new p(r);let a=e?e.level:-1;void 0===a&&(a=-1),t.deflateInit(a),t.next_out=s,this.append=(e,n)=>{let a,i,o=0,l=0,c=0;const d=[];if(e.length){t.next_in_index=0,t.next_in=e,t.avail_in=e.length;do{if(t.next_out_index=0,t.avail_out=r,a=t.deflate(0),0!=a)throw new f("deflating: "+t.msg);t.next_out_index&&(t.next_out_index==r?d.push(new p(s)):d.push(s.subarray(0,t.next_out_index))),c+=t.next_out_index,n&&t.next_in_index>0&&t.next_in_index!=o&&(n(t.next_in_index),o=t.next_in_index)}while(t.avail_in>0||0===t.avail_out);return d.length>1?(i=new p(c),d.forEach((e=>{i.set(e,l),l+=e.length}))):i=d[0]?new p(d[0]):new p,i}},this.flush=()=>{let e,n,a=0,i=0;const o=[];do{if(t.next_out_index=0,t.avail_out=r,e=t.deflate(4),1!=e&&0!=e)throw new f("deflating: "+t.msg);r-t.avail_out>0&&o.push(s.slice(0,t.next_out_index)),i+=t.next_out_index}while(t.avail_in>0||0===t.avail_out);return t.deflateEnd(),n=new p(i),o.forEach((e=>{n.set(e,a),a+=e.length})),n}}}),e.BlobReader=Ot,e.BlobWriter=Mt,e.Data64URIReader=class extends Lt{constructor(e){super();let t=e.length;for(;"="==e.charAt(t-1);)t--;const n=e.indexOf(",")+1;r.assign(this,{dataURI:e,dataStart:n,size:i.floor(.75*(t-n))})}readUint8Array(e,t){const{dataStart:r,dataURI:n}=this,s=new p(t),a=4*i.floor(e/3),o=atob(n.substring(a+r,4*i.ceil((e+t)/3)+r)),l=e-3*i.floor(a/4);for(let e=l;l+t>e;e++)s[e-l]=o.charCodeAt(e);return s}},e.Data64URIWriter=class extends Ht{constructor(e){super(),r.assign(this,{data:"data:"+(e||"")+";base64,",pending:[]})}writeUint8Array(e){const t=this;let r=0,s=t.pending;const a=t.pending.length;for(t.pending="",r=0;r<3*i.floor((a+e.length)/3)-a;r++)s+=n.fromCharCode(e[r]);for(;r2?t.data+=z(s):t.pending=s}getData(){return this.data+z(this.pending)}},e.ERR_DUPLICATED_NAME=yr,e.ERR_HTTP_RANGE=Ft,e.ERR_INVALID_COMMENT=br,e.ERR_INVALID_ENCRYPTION_STRENGTH=kr,e.ERR_INVALID_ENTRY_COMMENT=xr,e.ERR_INVALID_ENTRY_NAME=Sr,e.ERR_INVALID_EXTRAFIELD_DATA=Er,e.ERR_INVALID_EXTRAFIELD_TYPE=vr,e.ERR_INVALID_VERSION=zr,e.ERR_ITERATOR_COMPLETED_TOO_SOON=At,e.ERR_UNSUPPORTED_FORMAT=Rr,e.HttpRangeReader=class extends er{constructor(e,t={}){t.useRangeHeader=!0,super(e,t)}},e.HttpReader=er,e.Reader=Lt,e.SplitDataReader=tr,e.SplitDataWriter=rr,e.SplitZipReader=or,e.SplitZipWriter=lr,e.TextReader=class extends Ot{constructor(e){super(new g([e],{type:"text/plain"}))}},e.TextWriter=class extends Mt{constructor(e){super(e),r.assign(this,{encoding:e,utf8:!e||"utf-8"==e.toLowerCase()})}async getData(){const{encoding:e,utf8:t}=this,n=await super.getData();if(n.text&&t)return n.text();{const t=new FileReader;return new _(((s,a)=>{r.assign(t,{onload:({target:e})=>s(e.result),onerror:()=>a(t.error)}),t.readAsText(n,e)}))}}},e.Uint8ArrayReader=class extends Lt{constructor(e){super(),r.assign(this,{array:e,size:e.length})}readUint8Array(e,t){return this.array.slice(e,e+t)}},e.Uint8ArrayWriter=class extends Ht{init(e=0){r.assign(this,{offset:0,array:new p(e)}),super.init()}writeUint8Array(e){const t=this;if(t.offset+e.length>t.array.length){const r=t.array;t.array=new p(r.length+e.length),t.array.set(r)}t.array.set(e,t.offset),t.offset+=e.length}getData(){return this.array}},e.Writer=Ht,e.ZipWriter=Ar,e.ZipWriterStream=class{constructor(e={}){const{readable:t,writable:r}=new k;this.readable=t,this.zipWriter=new Ar(r,e)}transform(e){const{readable:t,writable:r}=new k({flush:()=>{this.zipWriter.close()}});return this.zipWriter.add(e,t),{readable:this.readable,writable:r}}writable(e){const{readable:t,writable:r}=new k;return this.zipWriter.add(e,t),r}close(e,t={}){return this.zipWriter.close(e,t)}},e.configure=ie,e.getMimeType=()=>"application/octet-stream",e.initReader=sr,e.initStream=nr,e.initWriter=ar,e.readUint8Array=ir,e.terminateWorkers=async()=>{await _.allSettled(vt.map((e=>(Dt(e),e.terminate()))))},r.defineProperty(e,"__esModule",{value:!0})})); diff --git a/demos/lib/zip-no-worker-inflate.min.js b/demos/lib/zip-no-worker-inflate.min.js index e20ee566..b821ef67 100644 --- a/demos/lib/zip-no-worker-inflate.min.js +++ b/demos/lib/zip-no-worker-inflate.min.js @@ -1 +1 @@ -((e,t)=>{"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).zip={})})(this,(function(e){"use strict";const{Array:t,Object:n,String:i,Number:r,BigInt:a,Math:s,Date:o,Map:l,Set:c,Response:u,URL:d,Error:f,Uint8Array:h,Uint16Array:w,Uint32Array:_,DataView:p,Blob:b,Promise:g,TextEncoder:m,TextDecoder:y,document:x,crypto:k,btoa:v,TransformStream:S,ReadableStream:R,WritableStream:z,CompressionStream:D,DecompressionStream:T,navigator:E,Worker:A}="undefined"!=typeof globalThis?globalThis:this||self,F=-2,C=-3,U=-5,W=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],L=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],O=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],N=[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,0,0],I=[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,112,112],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],H=[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];function M(){let e,t,n,i,r,a;function s(e,t,s,o,l,c,u,d,f,h,w){let _,p,b,g,m,y,x,k,v,S,R,z,D,T,E;S=0,m=s;do{n[e[t+S]]++,S++,m--}while(0!==m);if(n[0]==s)return u[0]=-1,d[0]=0,0;for(k=d[0],y=1;15>=y&&0===n[y];y++);for(x=y,y>k&&(k=y),m=15;0!==m&&0===n[m];m--);for(b=m,k>m&&(k=m),d[0]=k,T=1<y;y++,T<<=1)if(0>(T-=n[y]))return C;if(0>(T-=n[m]))return C;for(n[m]+=T,a[1]=y=0,S=1,D=2;0!=--m;)a[D]=y+=n[S],D++,S++;m=0,S=0;do{0!==(y=e[t+S])&&(w[a[y]++]=m),S++}while(++m=x;x++)for(_=n[x];0!=_--;){for(;x>z+k;){if(g++,z+=k,E=b-z,E=E>k?k:E,(p=1<<(y=x-z))>_+1&&(p-=_+1,D=x,E>y))for(;++yn[++D];)p-=n[D];if(E=1<1440)return C;r[g]=R=h[0],h[0]+=E,0!==g?(a[g]=m,i[0]=y,i[1]=k,y=m>>>z-k,i[2]=R-r[g-1]-y,f.set(i,3*(r[g-1]+y))):u[0]=R}for(i[1]=x-z,s>S?w[S]w[S]?0:96,i[2]=w[S++]):(i[0]=c[w[S]-o]+16+64,i[2]=l[w[S++]-o]):i[0]=192,p=1<>>z;E>y;y+=p)f.set(i,3*(R+y));for(y=1<>>=1)m^=y;for(m^=y,v=(1<o;o++)t[o]=0;for(o=0;16>o;o++)n[o]=0;for(o=0;3>o;o++)i[o]=0;r.set(n.subarray(0,15),0),a.set(n.subarray(0,16),0)}this.inflate_trees_bits=(n,i,r,a,l)=>{let c;return o(19),e[0]=0,c=s(n,0,19,19,null,null,r,i,a,e,t),c==C?l.msg="oversubscribed dynamic bit lengths tree":c!=U&&0!==i[0]||(l.msg="incomplete dynamic bit lengths tree",c=C),c},this.inflate_trees_dynamic=(n,i,r,a,l,c,u,d,f)=>{let h;return o(288),e[0]=0,h=s(r,0,n,257,N,I,c,a,d,e,t),0!=h||0===a[0]?(h==C?f.msg="oversubscribed literal/length tree":-4!=h&&(f.msg="incomplete literal/length tree",h=C),h):(o(288),h=s(r,n,i,0,P,H,u,l,d,e,t),0!=h||0===l[0]&&n>257?(h==C?f.msg="oversubscribed distance tree":h==U?(f.msg="incomplete distance tree",h=C):-4!=h&&(f.msg="empty distance tree with lengths",h=C),h):0)}}function q(){const e=this;let t,n,i,r,a=0,s=0,o=0,l=0,c=0,u=0,d=0,f=0,h=0,w=0;function _(e,t,n,i,r,a,s,o){let l,c,u,d,f,h,w,_,p,b,g,m,y,x,k,v;w=o.next_in_index,_=o.avail_in,f=s.bitb,h=s.bitk,p=s.write,b=ph;)_--,f|=(255&o.read_byte(w++))<>=c[v+1],h-=c[v+1],0!=(16&d)){for(d&=15,y=c[v+2]+(f&W[d]),f>>=d,h-=d;15>h;)_--,f|=(255&o.read_byte(w++))<>=c[v+1],h-=c[v+1],0!=(16&d)){for(d&=15;d>h;)_--,f|=(255&o.read_byte(w++))<>=d,h-=d,b-=y,x>p){k=p-x;do{k+=s.end}while(0>k);if(d=s.end-k,y>d){if(y-=d,p-k>0&&d>p-k)do{s.win[p++]=s.win[k++]}while(0!=--d);else s.win.set(s.win.subarray(k,k+d),p),p+=d,k+=d,d=0;k=0}}else k=p-x,p-k>0&&2>p-k?(s.win[p++]=s.win[k++],s.win[p++]=s.win[k++],y-=2):(s.win.set(s.win.subarray(k,k+2),p),p+=2,k+=2,y-=2);if(p-k>0&&y>p-k)do{s.win[p++]=s.win[k++]}while(0!=--y);else s.win.set(s.win.subarray(k,k+y),p),p+=y,k+=y,y=0;break}if(0!=(64&d))return o.msg="invalid distance code",y=o.avail_in-_,y=y>h>>3?h>>3:y,_+=y,w-=y,h-=y<<3,s.bitb=f,s.bitk=h,o.avail_in=_,o.total_in+=w-o.next_in_index,o.next_in_index=w,s.write=p,C;l+=c[v+2],l+=f&W[d],v=3*(u+l),d=c[v]}break}if(0!=(64&d))return 0!=(32&d)?(y=o.avail_in-_,y=y>h>>3?h>>3:y,_+=y,w-=y,h-=y<<3,s.bitb=f,s.bitk=h,o.avail_in=_,o.total_in+=w-o.next_in_index,o.next_in_index=w,s.write=p,1):(o.msg="invalid literal/length code",y=o.avail_in-_,y=y>h>>3?h>>3:y,_+=y,w-=y,h-=y<<3,s.bitb=f,s.bitk=h,o.avail_in=_,o.total_in+=w-o.next_in_index,o.next_in_index=w,s.write=p,C);if(l+=c[v+2],l+=f&W[d],v=3*(u+l),0===(d=c[v])){f>>=c[v+1],h-=c[v+1],s.win[p++]=c[v+2],b--;break}}else f>>=c[v+1],h-=c[v+1],s.win[p++]=c[v+2],b--}while(b>=258&&_>=10);return y=o.avail_in-_,y=y>h>>3?h>>3:y,_+=y,w-=y,h-=y<<3,s.bitb=f,s.bitk=h,o.avail_in=_,o.total_in+=w-o.next_in_index,o.next_in_index=w,s.write=p,0}e.init=(e,a,s,o,l,c)=>{t=0,d=e,f=a,i=s,h=o,r=l,w=c,n=null},e.proc=(e,p,b)=>{let g,m,y,x,k,v,S,R=0,z=0,D=0;for(D=p.next_in_index,x=p.avail_in,R=e.bitb,z=e.bitk,k=e.write,v=k=258&&x>=10&&(e.bitb=R,e.bitk=z,p.avail_in=x,p.total_in+=D-p.next_in_index,p.next_in_index=D,e.write=k,b=_(d,f,i,h,r,w,e,p),D=p.next_in_index,x=p.avail_in,R=e.bitb,z=e.bitk,k=e.write,v=kz;){if(0===x)return e.bitb=R,e.bitk=z,p.avail_in=x,p.total_in+=D-p.next_in_index,p.next_in_index=D,e.write=k,e.inflate_flush(p,b);b=0,x--,R|=(255&p.read_byte(D++))<>>=n[m+1],z-=n[m+1],y=n[m],0===y){l=n[m+2],t=6;break}if(0!=(16&y)){c=15&y,a=n[m+2],t=2;break}if(0==(64&y)){o=y,s=m/3+n[m+2];break}if(0!=(32&y)){t=7;break}return t=9,p.msg="invalid literal/length code",b=C,e.bitb=R,e.bitk=z,p.avail_in=x,p.total_in+=D-p.next_in_index,p.next_in_index=D,e.write=k,e.inflate_flush(p,b);case 2:for(g=c;g>z;){if(0===x)return e.bitb=R,e.bitk=z,p.avail_in=x,p.total_in+=D-p.next_in_index,p.next_in_index=D,e.write=k,e.inflate_flush(p,b);b=0,x--,R|=(255&p.read_byte(D++))<>=g,z-=g,o=f,n=r,s=w,t=3;case 3:for(g=o;g>z;){if(0===x)return e.bitb=R,e.bitk=z,p.avail_in=x,p.total_in+=D-p.next_in_index,p.next_in_index=D,e.write=k,e.inflate_flush(p,b);b=0,x--,R|=(255&p.read_byte(D++))<>=n[m+1],z-=n[m+1],y=n[m],0!=(16&y)){c=15&y,u=n[m+2],t=4;break}if(0==(64&y)){o=y,s=m/3+n[m+2];break}return t=9,p.msg="invalid distance code",b=C,e.bitb=R,e.bitk=z,p.avail_in=x,p.total_in+=D-p.next_in_index,p.next_in_index=D,e.write=k,e.inflate_flush(p,b);case 4:for(g=c;g>z;){if(0===x)return e.bitb=R,e.bitk=z,p.avail_in=x,p.total_in+=D-p.next_in_index,p.next_in_index=D,e.write=k,e.inflate_flush(p,b);b=0,x--,R|=(255&p.read_byte(D++))<>=g,z-=g,t=5;case 5:for(S=k-u;0>S;)S+=e.end;for(;0!==a;){if(0===v&&(k==e.end&&0!==e.read&&(k=0,v=k7&&(z-=8,x++,D--),e.write=k,b=e.inflate_flush(p,b),k=e.write,v=k{}}M.inflate_trees_fixed=(e,t,n,i)=>(e[0]=9,t[0]=5,n[0]=L,i[0]=O,0);const B=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function V(e,t){const n=this;let i,r=0,a=0,s=0,o=0;const l=[0],c=[0],u=new q;let d=0,f=new Int32Array(4320);const w=new M;n.bitk=0,n.bitb=0,n.win=new h(t),n.end=t,n.read=0,n.write=0,n.reset=(e,t)=>{t&&(t[0]=0),6==r&&u.free(e),r=0,n.bitk=0,n.bitb=0,n.read=n.write=0},n.reset(e,null),n.inflate_flush=(e,t)=>{let i,r,a;return r=e.next_out_index,a=n.read,i=(a>n.write?n.end:n.write)-a,i>e.avail_out&&(i=e.avail_out),0!==i&&t==U&&(t=0),e.avail_out-=i,e.total_out+=i,e.next_out.set(n.win.subarray(a,a+i),r),r+=i,a+=i,a==n.end&&(a=0,n.write==n.end&&(n.write=0),i=n.write-a,i>e.avail_out&&(i=e.avail_out),0!==i&&t==U&&(t=0),e.avail_out-=i,e.total_out+=i,e.next_out.set(n.win.subarray(a,a+i),r),r+=i,a+=i),e.next_out_index=r,n.read=a,t},n.proc=(e,t)=>{let h,_,p,b,g,m,y,x;for(b=e.next_in_index,g=e.avail_in,_=n.bitb,p=n.bitk,m=n.write,y=mp;){if(0===g)return n.bitb=_,n.bitk=p,e.avail_in=g,e.total_in+=b-e.next_in_index,e.next_in_index=b,n.write=m,n.inflate_flush(e,t);t=0,g--,_|=(255&e.read_byte(b++))<>>1){case 0:_>>>=3,p-=3,h=7&p,_>>>=h,p-=h,r=1;break;case 1:k=[],v=[],S=[[]],R=[[]],M.inflate_trees_fixed(k,v,S,R),u.init(k[0],v[0],S[0],0,R[0],0),_>>>=3,p-=3,r=6;break;case 2:_>>>=3,p-=3,r=3;break;case 3:return _>>>=3,p-=3,r=9,e.msg="invalid block type",t=C,n.bitb=_,n.bitk=p,e.avail_in=g,e.total_in+=b-e.next_in_index,e.next_in_index=b,n.write=m,n.inflate_flush(e,t)}break;case 1:for(;32>p;){if(0===g)return n.bitb=_,n.bitk=p,e.avail_in=g,e.total_in+=b-e.next_in_index,e.next_in_index=b,n.write=m,n.inflate_flush(e,t);t=0,g--,_|=(255&e.read_byte(b++))<>>16&65535)!=(65535&_))return r=9,e.msg="invalid stored block lengths",t=C,n.bitb=_,n.bitk=p,e.avail_in=g,e.total_in+=b-e.next_in_index,e.next_in_index=b,n.write=m,n.inflate_flush(e,t);a=65535&_,_=p=0,r=0!==a?2:0!==d?7:0;break;case 2:if(0===g)return n.bitb=_,n.bitk=p,e.avail_in=g,e.total_in+=b-e.next_in_index,e.next_in_index=b,n.write=m,n.inflate_flush(e,t);if(0===y&&(m==n.end&&0!==n.read&&(m=0,y=mg&&(h=g),h>y&&(h=y),n.win.set(e.read_buf(b,h),m),b+=h,g-=h,m+=h,y-=h,0!=(a-=h))break;r=0!==d?7:0;break;case 3:for(;14>p;){if(0===g)return n.bitb=_,n.bitk=p,e.avail_in=g,e.total_in+=b-e.next_in_index,e.next_in_index=b,n.write=m,n.inflate_flush(e,t);t=0,g--,_|=(255&e.read_byte(b++))<29||(h>>5&31)>29)return r=9,e.msg="too many length or distance symbols",t=C,n.bitb=_,n.bitk=p,e.avail_in=g,e.total_in+=b-e.next_in_index,e.next_in_index=b,n.write=m,n.inflate_flush(e,t);if(h=258+(31&h)+(h>>5&31),!i||i.lengthx;x++)i[x]=0;_>>>=14,p-=14,o=0,r=4;case 4:for(;4+(s>>>10)>o;){for(;3>p;){if(0===g)return n.bitb=_,n.bitk=p,e.avail_in=g,e.total_in+=b-e.next_in_index,e.next_in_index=b,n.write=m,n.inflate_flush(e,t);t=0,g--,_|=(255&e.read_byte(b++))<>>=3,p-=3}for(;19>o;)i[B[o++]]=0;if(l[0]=7,h=w.inflate_trees_bits(i,l,c,f,e),0!=h)return(t=h)==C&&(i=null,r=9),n.bitb=_,n.bitk=p,e.avail_in=g,e.total_in+=b-e.next_in_index,e.next_in_index=b,n.write=m,n.inflate_flush(e,t);o=0,r=5;case 5:for(;h=s,258+(31&h)+(h>>5&31)>o;){let a,u;for(h=l[0];h>p;){if(0===g)return n.bitb=_,n.bitk=p,e.avail_in=g,e.total_in+=b-e.next_in_index,e.next_in_index=b,n.write=m,n.inflate_flush(e,t);t=0,g--,_|=(255&e.read_byte(b++))<u)_>>>=h,p-=h,i[o++]=u;else{for(x=18==u?7:u-14,a=18==u?11:3;h+x>p;){if(0===g)return n.bitb=_,n.bitk=p,e.avail_in=g,e.total_in+=b-e.next_in_index,e.next_in_index=b,n.write=m,n.inflate_flush(e,t);t=0,g--,_|=(255&e.read_byte(b++))<>>=h,p-=h,a+=_&W[x],_>>>=x,p-=x,x=o,h=s,x+a>258+(31&h)+(h>>5&31)||16==u&&1>x)return i=null,r=9,e.msg="invalid bit length repeat",t=C,n.bitb=_,n.bitk=p,e.avail_in=g,e.total_in+=b-e.next_in_index,e.next_in_index=b,n.write=m,n.inflate_flush(e,t);u=16==u?i[x-1]:0;do{i[x++]=u}while(0!=--a);o=x}}if(c[0]=-1,z=[],D=[],T=[],E=[],z[0]=9,D[0]=6,h=s,h=w.inflate_trees_dynamic(257+(31&h),1+(h>>5&31),i,z,D,T,E,f,e),0!=h)return h==C&&(i=null,r=9),t=h,n.bitb=_,n.bitk=p,e.avail_in=g,e.total_in+=b-e.next_in_index,e.next_in_index=b,n.write=m,n.inflate_flush(e,t);u.init(z[0],D[0],f,T[0],f,E[0]),r=6;case 6:if(n.bitb=_,n.bitk=p,e.avail_in=g,e.total_in+=b-e.next_in_index,e.next_in_index=b,n.write=m,1!=(t=u.proc(n,e,t)))return n.inflate_flush(e,t);if(t=0,u.free(e),b=e.next_in_index,g=e.avail_in,_=n.bitb,p=n.bitk,m=n.write,y=m{n.reset(e,null),n.win=null,f=null},n.set_dictionary=(e,t,i)=>{n.win.set(e.subarray(t,t+i),0),n.read=n.write=i},n.sync_point=()=>1==r?1:0}const Z=13,K=[0,0,255,255];function G(){const e=this;function t(e){return e&&e.istate?(e.total_in=e.total_out=0,e.msg=null,e.istate.mode=7,e.istate.blocks.reset(e,null),0):F}e.mode=0,e.method=0,e.was=[0],e.need=0,e.marker=0,e.wbits=0,e.inflateEnd=t=>(e.blocks&&e.blocks.free(t),e.blocks=null,0),e.inflateInit=(n,i)=>(n.msg=null,e.blocks=null,8>i||i>15?(e.inflateEnd(n),F):(e.wbits=i,n.istate.blocks=new V(n,1<{let n,i;if(!e||!e.istate||!e.next_in)return F;const r=e.istate;for(t=4==t?U:0,n=U;;)switch(r.mode){case 0:if(0===e.avail_in)return n;if(n=t,e.avail_in--,e.total_in++,8!=(15&(r.method=e.read_byte(e.next_in_index++)))){r.mode=Z,e.msg="unknown compression method",r.marker=5;break}if(8+(r.method>>4)>r.wbits){r.mode=Z,e.msg="invalid win size",r.marker=5;break}r.mode=1;case 1:if(0===e.avail_in)return n;if(n=t,e.avail_in--,e.total_in++,i=255&e.read_byte(e.next_in_index++),((r.method<<8)+i)%31!=0){r.mode=Z,e.msg="incorrect header check",r.marker=5;break}if(0==(32&i)){r.mode=7;break}r.mode=2;case 2:if(0===e.avail_in)return n;n=t,e.avail_in--,e.total_in++,r.need=(255&e.read_byte(e.next_in_index++))<<24&4278190080,r.mode=3;case 3:if(0===e.avail_in)return n;n=t,e.avail_in--,e.total_in++,r.need+=(255&e.read_byte(e.next_in_index++))<<16&16711680,r.mode=4;case 4:if(0===e.avail_in)return n;n=t,e.avail_in--,e.total_in++,r.need+=(255&e.read_byte(e.next_in_index++))<<8&65280,r.mode=5;case 5:return 0===e.avail_in?n:(n=t,e.avail_in--,e.total_in++,r.need+=255&e.read_byte(e.next_in_index++),r.mode=6,2);case 6:return r.mode=Z,e.msg="need dictionary",r.marker=0,F;case 7:if(n=r.blocks.proc(e,n),n==C){r.mode=Z,r.marker=0;break}if(0==n&&(n=t),1!=n)return n;n=t,r.blocks.reset(e,r.was),r.mode=12;case 12:return e.avail_in=0,1;case Z:return C;default:return F}},e.inflateSetDictionary=(e,t,n)=>{let i=0,r=n;if(!e||!e.istate||6!=e.istate.mode)return F;const a=e.istate;return r<1<{let n,i,r,a,s;if(!e||!e.istate)return F;const o=e.istate;if(o.mode!=Z&&(o.mode=Z,o.marker=0),0===(n=e.avail_in))return U;for(i=e.next_in_index,r=o.marker;0!==n&&4>r;)e.read_byte(i)==K[r]?r++:r=0!==e.read_byte(i)?0:4-r,i++,n--;return e.total_in+=i-e.next_in_index,e.next_in_index=i,e.avail_in=n,o.marker=r,4!=r?C:(a=e.total_in,s=e.total_out,t(e),e.total_in=a,e.total_out=s,o.mode=7,0)},e.inflateSyncPoint=e=>e&&e.istate&&e.istate.blocks?e.istate.blocks.sync_point():F}function j(){}j.prototype={inflateInit(e){const t=this;return t.istate=new G,e||(e=15),t.istate.inflateInit(t,e)},inflate(e){const t=this;return t.istate?t.istate.inflate(t,e):F},inflateEnd(){const e=this;if(!e.istate)return F;const t=e.istate.inflateEnd(e);return e.istate=null,t},inflateSync(){const e=this;return e.istate?e.istate.inflateSync(e):F},inflateSetDictionary(e,t){const n=this;return n.istate?n.istate.inflateSetDictionary(n,e,t):F},read_byte(e){return this.next_in[e]},read_buf(e,t){return this.next_in.subarray(e,e+t)}};const X=4294967295,Y=65535,J=33639248,Q=101075792,$=void 0,ee="undefined",te="function";class ne{constructor(e){return class extends S{constructor(t,n){const i=new e(n);super({transform(e,t){t.enqueue(i.append(e))},flush(e){const t=i.flush();t&&e.enqueue(t)}})}}}}let ie=2;try{typeof E!=ee&&E.hardwareConcurrency&&(ie=E.hardwareConcurrency)}catch(e){}const re={chunkSize:524288,maxWorkers:ie,terminateWorkerTimeout:5e3,useWebWorkers:!0,useCompressionStream:!0,workerScripts:$,CompressionStreamNative:typeof D!=ee&&D,DecompressionStreamNative:typeof T!=ee&&T},ae=n.assign({},re);function se(){return ae}function oe(e){const{baseURL:n,chunkSize:i,maxWorkers:r,terminateWorkerTimeout:a,useCompressionStream:s,useWebWorkers:o,Deflate:l,Inflate:c,CompressionStream:u,DecompressionStream:d,workerScripts:h}=e;if(le("baseURL",n),le("chunkSize",i),le("maxWorkers",r),le("terminateWorkerTimeout",a),le("useCompressionStream",s),le("useWebWorkers",o),l&&(ae.CompressionStream=new ne(l)),c&&(ae.DecompressionStream=new ne(c)),le("CompressionStream",u),le("DecompressionStream",d),h!==$){const{deflate:e,inflate:n}=h;if((e||n)&&(ae.workerScripts||(ae.workerScripts={})),e){if(!t.isArray(e))throw new f("workerScripts.deflate must be an array");ae.workerScripts.deflate=e}if(n){if(!t.isArray(n))throw new f("workerScripts.inflate must be an array");ae.workerScripts.inflate=n}}}function le(e,t){t!==$&&(ae[e]=t)}const ce=[];for(let e=0;256>e;e++){let t=e;for(let e=0;8>e;e++)1&t?t=t>>>1^3988292384:t>>>=1;ce[e]=t}class ue{constructor(e){this.crc=e||-1}append(e){let t=0|this.crc;for(let n=0,i=0|e.length;i>n;n++)t=t>>>8^ce[255&(t^e[n])];this.crc=t}get(){return~this.crc}}class de extends S{constructor(){let e;const t=new ue;super({transform(e,n){t.append(e),n.enqueue(e)},flush(){const n=new h(4);new p(n.buffer).setUint32(0,t.get()),e.value=n}}),e=this}}const fe={concat(e,t){if(0===e.length||0===t.length)return e.concat(t);const n=e[e.length-1],i=fe.getPartial(n);return 32===i?e.concat(t):fe._shiftRight(t,i,0|n,e.slice(0,e.length-1))},bitLength(e){const t=e.length;if(0===t)return 0;const n=e[t-1];return 32*(t-1)+fe.getPartial(n)},clamp(e,t){if(32*e.length0&&t&&(e[n-1]=fe.partial(t,e[n-1]&2147483648>>t-1,1)),e},partial:(e,t,n)=>32===e?t:(n?0|t:t<<32-e)+1099511627776*e,getPartial:e=>s.round(e/1099511627776)||32,_shiftRight(e,t,n,i){for(void 0===i&&(i=[]);t>=32;t-=32)i.push(n),n=0;if(0===t)return i.concat(e);for(let r=0;r>>t),n=e[r]<<32-t;const r=e.length?e[e.length-1]:0,a=fe.getPartial(r);return i.push(fe.partial(t+a&31,t+a>32?n:i.pop(),1)),i}},he={bytes:{fromBits(e){const t=fe.bitLength(e)/8,n=new h(t);let i;for(let r=0;t>r;r++)0==(3&r)&&(i=e[r/4]),n[r]=i>>>24,i<<=8;return n},toBits(e){const t=[];let n,i=0;for(n=0;n9007199254740991)throw new f("Cannot hash more than 2^53 - 1 bits");const a=new _(n);let s=0;for(let e=t.blockSize+i-(t.blockSize+i&t.blockSize-1);r>=e;e+=t.blockSize)t._block(a.subarray(16*s,16*(s+1))),s+=1;return n.splice(0,16*s),t}finalize(){const e=this;let t=e._buffer;const n=e._h;t=fe.concat(t,[fe.partial(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(s.floor(e._length/4294967296)),t.push(0|e._length);t.length;)e._block(t.splice(0,16));return e.reset(),n}_f(e,t,n,i){return e>19?e>39?e>59?e>79?void 0:t^n^i:t&n|t&i|n&i:t^n^i:t&n|~t&i}_S(e,t){return t<>>32-e}_block(e){const n=this,i=n._h,r=t(80);for(let t=0;16>t;t++)r[t]=e[t];let a=i[0],o=i[1],l=i[2],c=i[3],u=i[4];for(let e=0;79>=e;e++){16>e||(r[e]=n._S(1,r[e-3]^r[e-8]^r[e-14]^r[e-16]));const t=n._S(5,a)+n._f(e,o,l,c)+u+r[e]+n._key[s.floor(e/20)]|0;u=c,c=l,l=n._S(30,o),o=a,a=t}i[0]=i[0]+a|0,i[1]=i[1]+o|0,i[2]=i[2]+l|0,i[3]=i[3]+c|0,i[4]=i[4]+u|0}},_e={getRandomValues(e){const t=new _(e.buffer),n=e=>{let t=987654321;const n=4294967295;return()=>(t=36969*(65535&t)+(t>>16)&n,(((t<<16)+(e=18e3*(65535&e)+(e>>16)&n)&n)/4294967296+.5)*(s.random()>.5?1:-1))};for(let i,r=0;rnew pe.hmacSha1(he.bytes.toBits(e)),pbkdf2(e,t,n,i){if(n=n||1e4,0>i||0>n)throw new f("invalid params to pbkdf2");const r=1+(i>>5)<<2;let a,s,o,l,c;const u=new ArrayBuffer(r),d=new p(u);let h=0;const w=fe;for(t=he.bytes.toBits(t),c=1;(r||1)>h;c++){for(a=s=e.encrypt(w.concat(t,[c])),o=1;n>o;o++)for(s=e.encrypt(s),l=0;lh&&or&&(e=(new n).update(e).finalize());for(let t=0;r>t;t++)i[0][t]=909522486^e[t],i[1][t]=1549556828^e[t];t._baseHash[0].update(i[0]),t._baseHash[1].update(i[1]),t._resultHash=new n(t._baseHash[0])}reset(){const e=this;e._resultHash=new e._hash(e._baseHash[0]),e._updated=!1}update(e){this._updated=!0,this._resultHash.update(e)}digest(){const e=this,t=e._resultHash.finalize(),n=new e._hash(e._baseHash[1]).update(t).finalize();return e.reset(),n}encrypt(e){if(this._updated)throw new f("encrypt on already updated hmac called!");return this.update(e),this.digest(e)}}},be=typeof k!=ee&&typeof k.getRandomValues==te,ge="Invalid password",me="Invalid signature",ye="zipjs-abort-check-password";function xe(e){return be?k.getRandomValues(e):_e.getRandomValues(e)}const ke=16,ve={name:"PBKDF2"},Se=n.assign({hash:{name:"HMAC"}},ve),Re=n.assign({iterations:1e3,hash:{name:"SHA-1"}},ve),ze=["deriveBits"],De=[8,12,16],Te=[16,24,32],Ee=10,Ae=[0,0,0,0],Fe=typeof k!=ee,Ce=Fe&&k.subtle,Ue=Fe&&typeof Ce!=ee,We=he.bytes,Le=class{constructor(e){const t=this;t._tables=[[[],[],[],[],[]],[[],[],[],[],[]]],t._tables[0][0][0]||t._precompute();const n=t._tables[0][4],i=t._tables[1],r=e.length;let a,s,o,l=1;if(4!==r&&6!==r&&8!==r)throw new f("invalid aes key size");for(t._key=[s=e.slice(0),o=[]],a=r;4*r+28>a;a++){let e=s[a-1];(a%r==0||8===r&&a%r==4)&&(e=n[e>>>24]<<24^n[e>>16&255]<<16^n[e>>8&255]<<8^n[255&e],a%r==0&&(e=e<<8^e>>>24^l<<24,l=l<<1^283*(l>>7))),s[a]=s[a-r]^e}for(let e=0;a;e++,a--){const t=s[3&e?a:a-4];o[e]=4>=a||4>e?t:i[0][n[t>>>24]]^i[1][n[t>>16&255]]^i[2][n[t>>8&255]]^i[3][n[255&t]]}}encrypt(e){return this._crypt(e,0)}decrypt(e){return this._crypt(e,1)}_precompute(){const e=this._tables[0],t=this._tables[1],n=e[4],i=t[4],r=[],a=[];let s,o,l,c;for(let e=0;256>e;e++)a[(r[e]=e<<1^283*(e>>7))^e]=e;for(let u=s=0;!n[u];u^=o||1,s=a[s]||1){let a=s^s<<1^s<<2^s<<3^s<<4;a=a>>8^255&a^99,n[u]=a,i[a]=u,c=r[l=r[o=r[u]]];let d=16843009*c^65537*l^257*o^16843008*u,f=257*r[a]^16843008*a;for(let n=0;4>n;n++)e[n][u]=f=f<<24^f>>>8,t[n][a]=d=d<<24^d>>>8}for(let n=0;5>n;n++)e[n]=e[n].slice(0),t[n]=t[n].slice(0)}_crypt(e,t){if(4!==e.length)throw new f("invalid aes block size");const n=this._key[t],i=n.length/4-2,r=[0,0,0,0],a=this._tables[t],s=a[0],o=a[1],l=a[2],c=a[3],u=a[4];let d,h,w,_=e[0]^n[0],p=e[t?3:1]^n[1],b=e[2]^n[2],g=e[t?1:3]^n[3],m=4;for(let e=0;i>e;e++)d=s[_>>>24]^o[p>>16&255]^l[b>>8&255]^c[255&g]^n[m],h=s[p>>>24]^o[b>>16&255]^l[g>>8&255]^c[255&_]^n[m+1],w=s[b>>>24]^o[g>>16&255]^l[_>>8&255]^c[255&p]^n[m+2],g=s[g>>>24]^o[_>>16&255]^l[p>>8&255]^c[255&b]^n[m+3],m+=4,_=d,p=h,b=w;for(let e=0;4>e;e++)r[t?3&-e:e]=u[_>>>24]<<24^u[p>>16&255]<<16^u[b>>8&255]<<8^u[255&g]^n[m++],d=_,_=p,p=b,b=g,g=d;return r}},Oe=class{constructor(e,t){this._prf=e,this._initIv=t,this._iv=t}reset(){this._iv=this._initIv}update(e){return this.calculate(this._prf,e,this._iv)}incWord(e){if(255==(e>>24&255)){let t=e>>16&255,n=e>>8&255,i=255&e;255===t?(t=0,255===n?(n=0,255===i?i=0:++i):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=i}else e+=1<<24;return e}incCounter(e){0===(e[0]=this.incWord(e[0]))&&(e[1]=this.incWord(e[1]))}calculate(e,t,n){let i;if(!(i=t.length))return[];const r=fe.bitLength(t);for(let r=0;i>r;r+=4){this.incCounter(n);const i=e.encrypt(n);t[r]^=i[0],t[r+1]^=i[1],t[r+2]^=i[2],t[r+3]^=i[3]}return fe.clamp(t,r)}},Ne=pe.hmacSha1;let Ie=Fe&&Ue&&typeof Ce.importKey==te,Pe=Fe&&Ue&&typeof Ce.deriveBits==te;class He extends S{constructor({password:e,rawPassword:t,signed:i,encryptionStrength:r,checkPasswordOnly:a}){super({start(){n.assign(this,{ready:new g((e=>this.resolveReady=e)),password:Ve(e,t),signed:i,strength:r-1,pending:new h})},async transform(e,t){const n=this,{password:i,strength:r,resolveReady:s,ready:o}=n;i?(await(async(e,t,n,i)=>{const r=await Be(e,t,n,Ke(i,0,De[t])),a=Ke(i,De[t]);if(r[0]!=a[0]||r[1]!=a[1])throw new f(ge)})(n,r,i,Ke(e,0,De[r]+2)),e=Ke(e,De[r]+2),a?t.error(new f(ye)):s()):await o;const l=new h(e.length-Ee-(e.length-Ee)%ke);t.enqueue(qe(n,e,l,0,Ee,!0))},async flush(e){const{signed:t,ctr:n,hmac:i,pending:r,ready:a}=this;if(i&&n){await a;const s=Ke(r,0,r.length-Ee),o=Ke(r,r.length-Ee);let l=new h;if(s.length){const e=je(We,s);i.update(e);const t=n.update(e);l=Ge(We,t)}if(t){const e=Ke(Ge(We,i.digest()),0,Ee);for(let t=0;Ee>t;t++)if(e[t]!=o[t])throw new f(me)}e.enqueue(l)}}})}}class Me extends S{constructor({password:e,rawPassword:t,encryptionStrength:i}){let r;super({start(){n.assign(this,{ready:new g((e=>this.resolveReady=e)),password:Ve(e,t),strength:i-1,pending:new h})},async transform(e,t){const n=this,{password:i,strength:r,resolveReady:a,ready:s}=n;let o=new h;i?(o=await(async(e,t,n)=>{const i=xe(new h(De[t]));return Ze(i,await Be(e,t,n,i))})(n,r,i),a()):await s;const l=new h(o.length+e.length-e.length%ke);l.set(o,0),t.enqueue(qe(n,e,l,o.length,0))},async flush(e){const{ctr:t,hmac:n,pending:i,ready:a}=this;if(n&&t){await a;let s=new h;if(i.length){const e=t.update(je(We,i));n.update(e),s=Ge(We,e)}r.signature=Ge(We,n.digest()).slice(0,Ee),e.enqueue(Ze(s,r.signature))}}}),r=this}}function qe(e,t,n,i,r,a){const{ctr:s,hmac:o,pending:l}=e,c=t.length-r;let u;for(l.length&&(t=Ze(l,t),n=((e,t)=>{if(t&&t>e.length){const n=e;(e=new h(t)).set(n,0)}return e})(n,c-c%ke)),u=0;c-ke>=u;u+=ke){const e=je(We,Ke(t,u,u+ke));a&&o.update(e);const r=s.update(e);a||o.update(r),n.set(Ge(We,r),u+i)}return e.pending=Ke(t,u),n}async function Be(e,i,r,a){e.password=null;const s=await(async(e,t,n,i,r)=>{if(!Ie)return pe.importKey(t);try{return await Ce.importKey("raw",t,n,!1,r)}catch(e){return Ie=!1,pe.importKey(t)}})(0,r,Se,0,ze),o=await(async(e,t,n)=>{if(!Pe)return pe.pbkdf2(t,e.salt,Re.iterations,n);try{return await Ce.deriveBits(e,t,n)}catch(i){return Pe=!1,pe.pbkdf2(t,e.salt,Re.iterations,n)}})(n.assign({salt:a},Re),s,8*(2*Te[i]+2)),l=new h(o),c=je(We,Ke(l,0,Te[i])),u=je(We,Ke(l,Te[i],2*Te[i])),d=Ke(l,2*Te[i]);return n.assign(e,{keys:{key:c,authentication:u,passwordVerification:d},ctr:new Oe(new Le(c),t.from(Ae)),hmac:new Ne(u)}),d}function Ve(e,t){return t===$?(e=>{if(typeof m==ee){const t=new h((e=unescape(encodeURIComponent(e))).length);for(let n=0;n>>24]),r=~e.crcKey2.get(),e.keys=[n,i,r]}function tt(e){const t=2|e.keys[2];return nt(s.imul(t,1^t)>>>8)}function nt(e){return 255&e}function it(e){return 4294967295&e}const rt="deflate-raw";class at extends S{constructor(e,{chunkSize:t,CompressionStream:n,CompressionStreamNative:i}){super({});const{compressed:r,encrypted:a,useCompressionStream:s,zipCrypto:o,signed:l,level:c}=e,u=this;let d,f,h=ot(super.readable);a&&!o||!l||(d=new de,h=ut(h,d)),r&&(h=ct(h,s,{level:c,chunkSize:t},i,n)),a&&(o?h=ut(h,new Ye(e)):(f=new Me(e),h=ut(h,f))),lt(u,h,(()=>{let e;a&&!o&&(e=f.signature),a&&!o||!l||(e=new p(d.value.buffer).getUint32(0)),u.signature=e}))}}class st extends S{constructor(e,{chunkSize:t,DecompressionStream:n,DecompressionStreamNative:i}){super({});const{zipCrypto:r,encrypted:a,signed:s,signature:o,compressed:l,useCompressionStream:c}=e;let u,d,h=ot(super.readable);a&&(r?h=ut(h,new Xe(e)):(d=new He(e),h=ut(h,d))),l&&(h=ct(h,c,{chunkSize:t},i,n)),a&&!r||!s||(u=new de,h=ut(h,u)),lt(this,h,(()=>{if((!a||r)&&s){const e=new p(u.value.buffer);if(o!=e.getUint32(0,!1))throw new f(me)}}))}}function ot(e){return ut(e,new S({transform(e,t){e&&e.length&&t.enqueue(e)}}))}function lt(e,t,i){t=ut(t,new S({flush:i})),n.defineProperty(e,"readable",{get:()=>t})}function ct(e,t,n,i,r){try{e=ut(e,new(t&&i?i:r)(rt,n))}catch(i){if(!t)return e;try{e=ut(e,new r(rt,n))}catch(t){return e}}return e}function ut(e,t){return e.pipeThrough(t)}const dt="data",ft="close",ht="inflate";class wt extends S{constructor(e,t){super({});const i=this,{codecType:r}=e;let a;r.startsWith("deflate")?a=at:r.startsWith(ht)&&(a=st);let s=0,o=0;const l=new a(e,t),c=super.readable,u=new S({transform(e,t){e&&e.length&&(o+=e.length,t.enqueue(e))},flush(){n.assign(i,{inputSize:o})}}),d=new S({transform(e,t){e&&e.length&&(s+=e.length,t.enqueue(e))},flush(){const{signature:e}=l;n.assign(i,{signature:e,outputSize:s,inputSize:o})}});n.defineProperty(i,"readable",{get:()=>c.pipeThrough(u).pipeThrough(l).pipeThrough(d)})}}class _t extends S{constructor(e){let t;super({transform:function n(i,r){if(t){const e=new h(t.length+i.length);e.set(t),e.set(i,t.length),i=e,t=null}i.length>e?(r.enqueue(i.slice(0,e)),n(i.slice(e),r)):t=i},flush(e){t&&t.length&&e.enqueue(t)}})}}let pt=typeof A!=ee;class bt{constructor(e,{readable:t,writable:i},{options:r,config:a,streamOptions:s,useWebWorkers:o,transferStreams:l,scripts:c},u){const{signal:d}=s;return n.assign(e,{busy:!0,readable:t.pipeThrough(new _t(a.chunkSize)).pipeThrough(new gt(t,s),{signal:d}),writable:i,options:n.assign({},r),scripts:c,transferStreams:l,terminate:()=>new g((t=>{const{worker:n,busy:i}=e;n?(i?e.resolveTerminated=t:(n.terminate(),t()),e.interface=null):t()})),onTaskFinished(){const{resolveTerminated:t}=e;t&&(e.resolveTerminated=null,e.terminated=!0,e.worker.terminate(),t()),e.busy=!1,u(e)}}),(o&&pt?xt:yt)(e,a)}}class gt extends S{constructor(e,{onstart:t,onprogress:n,size:i,onend:r}){let a=0;super({async start(){t&&await mt(t,i)},async transform(e,t){a+=e.length,n&&await mt(n,a,i),t.enqueue(e)},async flush(){e.size=a,r&&await mt(r,a)}})}}async function mt(e,...t){try{await e(...t)}catch(e){}}function yt(e,t){return{run:()=>(async({options:e,readable:t,writable:n,onTaskFinished:i},r)=>{try{const a=new wt(e,r);await t.pipeThrough(a).pipeTo(n,{preventClose:!0,preventAbort:!0});const{signature:s,inputSize:o,outputSize:l}=a;return{signature:s,inputSize:o,outputSize:l}}finally{i()}})(e,t)}}function xt(e,t){const{baseURL:i,chunkSize:r}=t;if(!e.interface){let a;try{a=((e,t,i)=>{const r={type:"module"};let a,s;typeof e==te&&(e=e());try{a=new d(e,t)}catch(t){a=e}if(kt)try{s=new A(a)}catch(e){kt=!1,s=new A(a,r)}else s=new A(a,r);return s.addEventListener("message",(e=>(async({data:e},t)=>{const{type:i,value:r,messageId:a,result:s,error:o}=e,{reader:l,writer:c,resolveResult:u,rejectResult:d,onTaskFinished:w}=t;try{if(o){const{message:e,stack:t,code:i,name:r}=o,a=new f(e);n.assign(a,{stack:t,code:i,name:r}),_(a)}else{if("pull"==i){const{value:e,done:n}=await l.read();St({type:dt,value:e,done:n,messageId:a},t)}i==dt&&(await c.ready,await c.write(new h(r)),St({type:"ack",messageId:a},t)),i==ft&&_(null,s)}}catch(o){St({type:ft,messageId:a},t),_(o)}function _(e,t){e?d(e):u(t),c&&c.releaseLock(),w()}})(e,i))),s})(e.scripts[0],i,e)}catch(n){return pt=!1,yt(e,t)}n.assign(e,{worker:a,interface:{run:()=>(async(e,t)=>{let i,r;const a=new g(((e,t)=>{i=e,r=t}));n.assign(e,{reader:null,writer:null,resolveResult:i,rejectResult:r,result:a});const{readable:s,options:o,scripts:l}=e,{writable:c,closed:u}=(e=>{let t;const n=new g((e=>t=e));return{writable:new z({async write(t){const n=e.getWriter();await n.ready,await n.write(t),n.releaseLock()},close(){t()},abort:t=>e.getWriter().abort(t)}),closed:n}})(e.writable),d=St({type:"start",scripts:l.slice(1),options:o,config:t,readable:s,writable:c},e);d||n.assign(e,{reader:s.getReader(),writer:c.getWriter()});const f=await a;return d||await c.getWriter().close(),await u,f})(e,{chunkSize:r})}})}return e.interface}let kt=!0,vt=!0;function St(e,{worker:t,writer:n,onTaskFinished:i,transferStreams:r}){try{let{value:n,readable:i,writable:a}=e;const s=[];if(n&&(n.byteLengtha?i.close():this.chunkOffset+=t}});return n}}class It extends Ot{constructor(){super();const e=this,t=new z({write:t=>e.writeUint8Array(t)});n.defineProperty(e,Lt,{get:()=>t})}writeUint8Array(){}}class Pt extends Nt{constructor(e){super(),n.assign(this,{blob:e,size:e.size})}async readUint8Array(e,t){const n=this,i=e+t,r=e||it&&(a=a.slice(e,i)),new h(a)}}class Ht extends Ot{constructor(e){super();const t=new S,i=[];e&&i.push(["Content-Type",e]),n.defineProperty(this,Lt,{get:()=>t.writable}),this.blob=new u(t.readable,{headers:i}).blob()}getData(){return this.blob}}class Mt extends Nt{constructor(e,t){super(),Bt(this,e,t)}async init(){await Vt(this,Qt,jt),super.init()}readUint8Array(e,t){return Zt(this,e,t,Qt,jt)}}class qt extends Nt{constructor(e,t){super(),Bt(this,e,t)}async init(){await Vt(this,$t,Xt),super.init()}readUint8Array(e,t){return Zt(this,e,t,$t,Xt)}}function Bt(e,t,i){const{preventHeadRequest:r,useRangeHeader:a,forceRangeRequests:s}=i;delete(i=n.assign({},i)).preventHeadRequest,delete i.useRangeHeader,delete i.forceRangeRequests,delete i.useXHR,n.assign(e,{url:t,options:i,preventHeadRequest:r,useRangeHeader:a,forceRangeRequests:s})}async function Vt(e,t,n){const{url:i,useRangeHeader:a,forceRangeRequests:s}=e;if((e=>{const{baseURL:t}=se(),{protocol:n}=new d(e,t);return"http:"==n||"https:"==n})(i)&&(a||s)){const{headers:i}=await t(Ct,e,Kt(e));if(!s&&i.get("Accept-Ranges")!=Ut)throw new f(At);{let a;const s=i.get("Content-Range");if(s){const e=s.trim().split(/\s*\/\s*/);if(e.length){const t=e[1];t&&"*"!=t&&(a=r(t))}}a===$?await Jt(e,t,n):e.size=a}}else await Jt(e,t,n)}async function Zt(e,t,n,i,r){const{useRangeHeader:a,forceRangeRequests:s,options:o}=e;if(a||s){const r=await i(Ct,e,Kt(e,t,n));if(206!=r.status)throw new f(At);return new h(await r.arrayBuffer())}{const{data:i}=e;return i||await r(e,o),new h(e.data.subarray(t,t+n))}}function Kt(e,t=0,i=1){return n.assign({},Gt(e),{Range:Ut+"="+t+"-"+(t+i-1)})}function Gt({options:e}){const{headers:t}=e;if(t)return Symbol.iterator in t?n.fromEntries(t):t}async function jt(e){await Yt(e,Qt)}async function Xt(e){await Yt(e,$t)}async function Yt(e,t){const n=await t(Ct,e,Gt(e));e.data=new h(await n.arrayBuffer()),e.size||(e.size=e.data.length)}async function Jt(e,t,n){if(e.preventHeadRequest)await n(e,e.options);else{const i=(await t("HEAD",e,Gt(e))).headers.get("Content-Length");i?e.size=r(i):await n(e,e.options)}}async function Qt(e,{options:t,url:i},r){const a=await fetch(i,n.assign({},t,{method:e,headers:r}));if(400>a.status)return a;throw 416==a.status?new f(At):new f(Et+(a.statusText||a.status))}function $t(e,{url:t},i){return new g(((r,a)=>{const s=new XMLHttpRequest;if(s.addEventListener("load",(()=>{if(400>s.status){const e=[];s.getAllResponseHeaders().trim().split(/[\r\n]+/).forEach((t=>{const n=t.trim().split(/\s*:\s*/);n[0]=n[0].trim().replace(/^[a-z]|-[a-z]/g,(e=>e.toUpperCase())),e.push(n)})),r({status:s.status,arrayBuffer:()=>s.response,headers:new l(e)})}else a(416==s.status?new f(At):new f(Et+(s.statusText||s.status)))}),!1),s.addEventListener("error",(e=>a(e.detail?e.detail.error:new f("Network error"))),!1),s.open(e,t),i)for(const e of n.entries(i))s.setRequestHeader(e[0],e[1]);s.responseType="arraybuffer",s.send()}))}class en extends Nt{constructor(e,t={}){super(),n.assign(this,{url:e,reader:t.useXHR?new qt(e,t):new Mt(e,t)})}set size(e){}get size(){return this.reader.size}async init(){await this.reader.init(),super.init()}readUint8Array(e,t){return this.reader.readUint8Array(e,t)}}class tn extends Nt{constructor(e){super(),this.readers=e}async init(){const e=this,{readers:t}=e;e.lastDiskNumber=0,e.lastDiskOffset=0,await g.all(t.map((async(n,i)=>{await n.init(),i!=t.length-1&&(e.lastDiskOffset+=n.size),e.size+=n.size}))),super.init()}async readUint8Array(e,t,n=0){const i=this,{readers:r}=this;let a,o=n;-1==o&&(o=r.length-1);let l=e;for(;l>=r[o].size;)l-=r[o].size,o++;const c=r[o],u=c.size;if(l+t>u){const r=u-l;a=new h(t),a.set(await on(c,l,r)),a.set(await i.readUint8Array(e+r,t-r,n),r)}else a=await on(c,l,t);return i.lastDiskNumber=s.max(o,i.lastDiskNumber),a}}class nn extends Ot{constructor(e,t=4294967295){super();const i=this;let r,a,s;n.assign(i,{diskNumber:0,diskOffset:0,size:0,maxSize:t,availableSize:t});const o=new z({async write(t){const{availableSize:n}=i;if(s)t.lengtho})}}async function rn(e,t){if(!e.init||e.initialized)return g.resolve();await e.init(t)}function an(e){return t.isArray(e)&&(e=new tn(e)),e instanceof R&&(e={readable:e}),e}function sn(e){e.writable===$&&typeof e.next==te&&(e=new nn(e)),e instanceof z&&(e={writable:e});const{writable:t}=e;return t.size===$&&(t.size=0),e instanceof nn||n.assign(e,{diskNumber:0,diskOffset:0,availableSize:1/0,maxSize:1/0}),e}function on(e,t,n,i){return e.readUint8Array(t,n,i)}const ln=tn,cn=nn,un="\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ ".split("");function dn(e,t){return t&&"cp437"==t.trim().toLowerCase()?(e=>{{let t="";for(let n=0;nthis[t]=e[t]))}}const zn="File format is not recognized",Dn="End of central directory not found",Tn="End of Zip64 central directory not found",En="End of Zip64 central directory locator not found",An="Central directory header not found",Fn="Local file header not found",Cn="Zip64 extra field not found",Un="File contains encrypted entry",Wn="Encryption method not supported",Ln="Compression method not supported",On="Split zip file",Nn="utf-8",In="cp437",Pn=[[pn,X],[bn,X],[gn,X],[mn,Y]],Hn={[Y]:{getValue:Jn,bytes:4},[X]:{getValue:Qn,bytes:8}};class Mn{constructor(e,t={}){n.assign(this,{reader:an(e),options:t,config:se()})}async*getEntriesGenerator(e={}){const t=this;let{reader:i}=t;const{config:r}=t;if(await rn(i),i.size!==$&&i.readUint8Array||(i=new Pt(await new u(i.readable).blob()),await rn(i)),22>i.size)throw new f(zn);i.chunkSize=(e=>s.max(e.chunkSize,64))(r);const a=await(async(e,t,n)=>{const i=new h(4);return $n(i).setUint32(0,101010256,!0),await r(22)||await r(s.min(1048582,n));async function r(t){const r=n-t,a=await on(e,r,t);for(let e=a.length-22;e>=0;e--)if(a[e]==i[0]&&a[e+1]==i[1]&&a[e+2]==i[2]&&a[e+3]==i[3])return{offset:r+e,buffer:a.slice(e,e+22).buffer}}})(i,0,i.size);if(!a)throw 134695760==Jn($n(await on(i,0,4)))?new f(On):new f(Dn);const o=$n(a);let l=Jn(o,12),c=Jn(o,16);const d=a.offset,w=Yn(o,20),_=d+22+w;let p=Yn(o,4);const b=i.lastDiskNumber||0;let m=Yn(o,6),y=Yn(o,8),x=0,k=0;if(c==X||l==X||y==Y||m==Y){const e=$n(await on(i,a.offset-20,20));if(117853008!=Jn(e,0))throw new f(Tn);c=Qn(e,8);let t=await on(i,c,56,-1),n=$n(t);const r=a.offset-20-56;if(Jn(n,0)!=Q&&c!=r){const e=c;c=r,x=c-e,t=await on(i,c,56,-1),n=$n(t)}if(Jn(n,0)!=Q)throw new f(En);p==Y&&(p=Jn(n,16)),m==Y&&(m=Jn(n,20)),y==Y&&(y=Qn(n,32)),l==X&&(l=Qn(n,40)),c-=l}if(cc)throw new f(zn);let v=0,S=await on(i,c,l,m),R=$n(S);if(l){const e=a.offset-l;if(Jn(R,v)!=J&&c!=e){const t=c;c=e,x+=c-t,S=await on(i,c,l,m),R=$n(S)}}const z=a.offset-c-(i.lastDiskOffset||0);if(l==z||0>z||(l=z,S=await on(i,c,l,m),R=$n(S)),0>c||c>=i.size)throw new f(zn);const D=Kn(t,e,"filenameEncoding"),T=Kn(t,e,"commentEncoding");for(let a=0;y>a;a++){const o=new qn(i,r,t.options);if(Jn(R,v)!=J)throw new f(An);Bn(o,R,v+6);const l=!!o.bitFlag.languageEncodingFlag,c=v+46,u=c+o.filenameLength,d=u+o.extraFieldLength,h=Yn(R,v+4),w=0==(0&h),_=S.subarray(c,u),p=Yn(R,v+32),b=d+p,m=S.subarray(d,b),z=l,E=l,A=w&&16==(16&Xn(R,v+38)),F=Jn(R,v+42)+x;n.assign(o,{versionMadeBy:h,msDosCompatible:w,compressedSize:0,uncompressedSize:0,commentLength:p,directory:A,offset:F,diskNumberStart:Yn(R,v+34),internalFileAttribute:Yn(R,v+36),externalFileAttribute:Jn(R,v+38),rawFilename:_,filenameUTF8:z,commentUTF8:E,rawExtraField:S.subarray(u,d)});const[C,U]=await g.all([dn(_,z?Nn:D||In),dn(m,E?Nn:T||In)]);n.assign(o,{rawComment:m,filename:C,comment:U,directory:A||C.endsWith("/")}),k=s.max(F,k),await Vn(o,o,R,v+6);const W=new Rn(o);W.getData=(e,t)=>o.getData(e,W,t),v=b;const{onprogress:L}=e;if(L)try{await L(a+1,y,new Rn(o))}catch(e){}yield W}const E=Kn(t,e,"extractPrependedData"),A=Kn(t,e,"extractAppendedData");return E&&(t.prependedData=k>0?await on(i,0,k):new h),t.comment=w?await on(i,d+22,w):new h,A&&(t.appendedData=_>>8&255:_>>>24&255),signature:_,compressed:0!=u,encrypted:S,useWebWorkers:Kn(a,i,"useWebWorkers"),useCompressionStream:Kn(a,i,"useCompressionStream"),transferStreams:Kn(a,i,"transferStreams"),checkPasswordOnly:F},config:d,streamOptions:{signal:A,size:T,onstart:U,onprogress:W,onend:L}};let N=0;try{({outputSize:N}=await(async(e,t)=>{const{options:n,config:i}=t,{transferStreams:a,useWebWorkers:s,useCompressionStream:o,codecType:l,compressed:c,signed:u,encrypted:d}=n,{workerScripts:f,maxWorkers:h}=i;t.transferStreams=a||a===$;const w=!(c||u||d||t.transferStreams);return t.useWebWorkers=!w&&(s||s===$&&i.useWebWorkers),t.scripts=t.useWebWorkers&&f?f[l]:[],n.useCompressionStream=o||o===$&&i.useCompressionStream,(await(async()=>{const n=Rt.find((e=>!e.busy));if(n)return Tt(n),new bt(n,e,t,_);if(Rt.lengthzt.push({resolve:n,stream:e,workerOptions:t})))})()).run();function _(e){if(zt.length){const[{resolve:t,stream:n,workerOptions:i}]=zt.splice(0,1);t(new bt(e,n,i,_))}else e.worker?(Tt(e),((e,t)=>{const{config:n}=t,{terminateWorkerTimeout:i}=n;r.isFinite(i)&&i>=0&&(e.terminated?e.terminated=!1:e.terminateTimeout=setTimeout((async()=>{Rt=Rt.filter((t=>t!=e));try{await e.terminate()}catch(e){}}),i))})(e,t)):Rt=Rt.filter((t=>t!=e))}})({readable:E,writable:C},O))}catch(e){if(!F||e.message!=ye)throw e}finally{const e=Kn(a,i,"preventClose");C.size+=N,e||C.locked||await C.getWriter().close()}return F?$:e.getData?e.getData():C}}function Bn(e,t,i){const r=e.rawBitFlag=Yn(t,i+2),a=1==(1&r),s=Jn(t,i+6);n.assign(e,{encrypted:a,version:Yn(t,i),bitFlag:{level:(6&r)>>1,dataDescriptor:8==(8&r),languageEncodingFlag:2048==(2048&r)},rawLastModDate:s,lastModDate:Gn(s),filenameLength:Yn(t,i+22),extraFieldLength:Yn(t,i+24)})}async function Vn(e,t,i,r,a){const{rawExtraField:s}=t,c=t.extraField=new l,u=$n(new h(s));let d=0;try{for(;d{t.zip64=!0;const n=$n(e.data),i=Pn.filter((([e,n])=>t[e]==n));for(let r=0,a=0;r{const r=$n(e.data),a=Xn(r,4);n.assign(e,{vendorVersion:Xn(r,0),vendorId:Xn(r,2),strength:a,originalCompressionMethod:i,compressionMethod:Yn(r,5)}),t.compressionMethod=e.compressionMethod})(g,t,w),t.extraFieldAES=g):t.compressionMethod=w;const m=c.get(10);m&&(((e,t)=>{const i=$n(e.data);let r,a=4;try{for(;a{const i=$n(e.data),r=Xn(i,0),a=[],s=[];n?(1==(1&r)&&(a.push(yn),s.push(xn)),2==(2&r)&&(a.push(kn),s.push("rawLastAccessDate")),4==(4&r)&&(a.push(vn),s.push("rawCreationDate"))):5>e.data.length||(a.push(yn),s.push(xn));let l=1;a.forEach(((n,r)=>{if(e.data.length>=l+4){const a=Jn(i,l);t[n]=e[n]=new o(1e3*a);const c=s[r];e[c]=a}l+=4}))})(y,t,a),t.extraFieldExtendedTimestamp=y);const x=c.get(6534);x&&(t.extraFieldUSDZ=x)}async function Zn(e,t,i,r,a){const s=$n(e.data),o=new ue;o.append(a[i]);const l=$n(new h(4));l.setUint32(0,o.get(),!0);const c=Jn(s,1);n.assign(e,{version:Xn(s,0),[t]:dn(e.data.subarray(5)),valid:!a.bitFlag.languageEncodingFlag&&c==Jn(l,0)}),e.valid&&(r[t]=e[t],r[t+"UTF8"]=!0)}function Kn(e,t,n){return t[n]===$?e.options[n]:t[n]}function Gn(e){const t=(4294901760&e)>>16,n=65535&e;try{return new o(1980+((65024&t)>>9),((480&t)>>5)-1,31&t,(63488&n)>>11,(2016&n)>>5,2*(31&n),0)}catch(e){}}function jn(e){return new o(r(e/a(1e4)-a(116444736e5)))}function Xn(e,t){return e.getUint8(t)}function Yn(e,t){return e.getUint16(t,!0)}function Jn(e,t){return e.getUint32(t,!0)}function Qn(e,t){return r(e.getBigUint64(t,!0))}function $n(e){return new p(e.buffer)}oe({Inflate:function(e){const t=new j,n=e&&e.chunkSize?s.floor(2*e.chunkSize):131072,i=new h(n);let r=!1;t.inflateInit(),t.next_out=i,this.append=(e,a)=>{const s=[];let o,l,c=0,u=0,d=0;if(0!==e.length){t.next_in_index=0,t.next_in=e,t.avail_in=e.length;do{if(t.next_out_index=0,t.avail_out=n,0!==t.avail_in||r||(t.next_in_index=0,r=!0),o=t.inflate(0),r&&o===U){if(0!==t.avail_in)throw new f("inflating: bad input")}else if(0!==o&&1!==o)throw new f("inflating: "+t.msg);if((r||1===o)&&t.avail_in===e.length)throw new f("inflating: bad input");t.next_out_index&&(t.next_out_index===n?s.push(new h(i)):s.push(i.subarray(0,t.next_out_index))),d+=t.next_out_index,a&&t.next_in_index>0&&t.next_in_index!=c&&(a(t.next_in_index),c=t.next_in_index)}while(t.avail_in>0||0===t.avail_out);return s.length>1?(l=new h(d),s.forEach((e=>{l.set(e,u),u+=e.length}))):l=s[0]?new h(s[0]):new h,l}},this.flush=()=>{t.inflateEnd()}}}),e.BlobReader=Pt,e.BlobWriter=Ht,e.Data64URIReader=class extends Nt{constructor(e){super();let t=e.length;for(;"="==e.charAt(t-1);)t--;const i=e.indexOf(",")+1;n.assign(this,{dataURI:e,dataStart:i,size:s.floor(.75*(t-i))})}readUint8Array(e,t){const{dataStart:n,dataURI:i}=this,r=new h(t),a=4*s.floor(e/3),o=atob(i.substring(a+n,4*s.ceil((e+t)/3)+n)),l=e-3*s.floor(a/4);for(let e=l;l+t>e;e++)r[e-l]=o.charCodeAt(e);return r}},e.Data64URIWriter=class extends It{constructor(e){super(),n.assign(this,{data:"data:"+(e||"")+";base64,",pending:[]})}writeUint8Array(e){const t=this;let n=0,r=t.pending;const a=t.pending.length;for(t.pending="",n=0;n<3*s.floor((a+e.length)/3)-a;n++)r+=i.fromCharCode(e[n]);for(;n2?t.data+=v(r):t.pending=r}getData(){return this.data+v(this.pending)}},e.ERR_BAD_FORMAT=zn,e.ERR_CENTRAL_DIRECTORY_NOT_FOUND=An,e.ERR_ENCRYPTED=Un,e.ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND=En,e.ERR_EOCDR_NOT_FOUND=Dn,e.ERR_EOCDR_ZIP64_NOT_FOUND=Tn,e.ERR_EXTRAFIELD_ZIP64_NOT_FOUND=Cn,e.ERR_HTTP_RANGE=At,e.ERR_INVALID_PASSWORD=ge,e.ERR_INVALID_SIGNATURE=me,e.ERR_ITERATOR_COMPLETED_TOO_SOON=Ft,e.ERR_LOCAL_FILE_HEADER_NOT_FOUND=Fn,e.ERR_SPLIT_ZIP_FILE=On,e.ERR_UNSUPPORTED_COMPRESSION=Ln,e.ERR_UNSUPPORTED_ENCRYPTION=Wn,e.HttpRangeReader=class extends en{constructor(e,t={}){t.useRangeHeader=!0,super(e,t)}},e.HttpReader=en,e.Reader=Nt,e.SplitDataReader=tn,e.SplitDataWriter=nn,e.SplitZipReader=ln,e.SplitZipWriter=cn,e.TextReader=class extends Pt{constructor(e){super(new b([e],{type:"text/plain"}))}},e.TextWriter=class extends Ht{constructor(e){super(e),n.assign(this,{encoding:e,utf8:!e||"utf-8"==e.toLowerCase()})}async getData(){const{encoding:e,utf8:t}=this,i=await super.getData();if(i.text&&t)return i.text();{const t=new FileReader;return new g(((r,a)=>{n.assign(t,{onload:({target:e})=>r(e.result),onerror:()=>a(t.error)}),t.readAsText(i,e)}))}}},e.Uint8ArrayReader=class extends Nt{constructor(e){super(),n.assign(this,{array:e,size:e.length})}readUint8Array(e,t){return this.array.slice(e,e+t)}},e.Uint8ArrayWriter=class extends It{init(e=0){n.assign(this,{offset:0,array:new h(e)}),super.init()}writeUint8Array(e){const t=this;if(t.offset+e.length>t.array.length){const n=t.array;t.array=new h(n.length+e.length),t.array.set(n)}t.array.set(e,t.offset),t.offset+=e.length}getData(){return this.array}},e.Writer=It,e.ZipReader=Mn,e.ZipReaderStream=class{constructor(e={}){const{readable:t,writable:n}=new S,i=new Mn(t,e).getEntriesGenerator();this.readable=new R({async pull(e){const{done:t,value:n}=await i.next();if(t)return e.close();const r={...n,readable:(()=>{const{readable:e,writable:t}=new S;if(n.getData)return n.getData(t),e})()};delete r.getData,e.enqueue(r)}}),this.writable=n}},e.configure=oe,e.getMimeType=()=>"application/octet-stream",e.initReader=an,e.initStream=rn,e.initWriter=sn,e.readUint8Array=on,e.terminateWorkers=async()=>{await g.allSettled(Rt.map((e=>(Tt(e),e.terminate()))))},n.defineProperty(e,"__esModule",{value:!0})})); +((e,t)=>{"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).zip={})})(this,(function(e){"use strict";const{Array:t,Object:n,String:i,Number:r,BigInt:a,Math:s,Date:o,Map:l,Set:c,Response:d,URL:u,Error:f,Uint8Array:h,Uint16Array:w,Uint32Array:_,DataView:p,Blob:b,Promise:g,TextEncoder:m,TextDecoder:y,document:x,crypto:k,btoa:v,TransformStream:S,ReadableStream:R,WritableStream:z,CompressionStream:D,DecompressionStream:E,navigator:T,Worker:A}="undefined"!=typeof globalThis?globalThis:this||self,C=-2,F=-3,U=-5,W=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],L=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],O=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],N=[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,0,0],I=[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,112,112],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],H=[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];function q(){let e,t,n,i,r,a;function s(e,t,s,o,l,c,d,u,f,h,w){let _,p,b,g,m,y,x,k,v,S,R,z,D,E,T;S=0,m=s;do{n[e[t+S]]++,S++,m--}while(0!==m);if(n[0]==s)return d[0]=-1,u[0]=0,0;for(k=u[0],y=1;15>=y&&0===n[y];y++);for(x=y,y>k&&(k=y),m=15;0!==m&&0===n[m];m--);for(b=m,k>m&&(k=m),u[0]=k,E=1<y;y++,E<<=1)if(0>(E-=n[y]))return F;if(0>(E-=n[m]))return F;for(n[m]+=E,a[1]=y=0,S=1,D=2;0!=--m;)a[D]=y+=n[S],D++,S++;m=0,S=0;do{0!==(y=e[t+S])&&(w[a[y]++]=m),S++}while(++m=x;x++)for(_=n[x];0!=_--;){for(;x>z+k;){if(g++,z+=k,T=b-z,T=T>k?k:T,(p=1<<(y=x-z))>_+1&&(p-=_+1,D=x,T>y))for(;++yn[++D];)p-=n[D];if(T=1<1440)return F;r[g]=R=h[0],h[0]+=T,0!==g?(a[g]=m,i[0]=y,i[1]=k,y=m>>>z-k,i[2]=R-r[g-1]-y,f.set(i,3*(r[g-1]+y))):d[0]=R}for(i[1]=x-z,s>S?w[S]w[S]?0:96,i[2]=w[S++]):(i[0]=c[w[S]-o]+16+64,i[2]=l[w[S++]-o]):i[0]=192,p=1<>>z;T>y;y+=p)f.set(i,3*(R+y));for(y=1<>>=1)m^=y;for(m^=y,v=(1<o;o++)t[o]=0;for(o=0;16>o;o++)n[o]=0;for(o=0;3>o;o++)i[o]=0;r.set(n.subarray(0,15),0),a.set(n.subarray(0,16),0)}this.inflate_trees_bits=(n,i,r,a,l)=>{let c;return o(19),e[0]=0,c=s(n,0,19,19,null,null,r,i,a,e,t),c==F?l.msg="oversubscribed dynamic bit lengths tree":c!=U&&0!==i[0]||(l.msg="incomplete dynamic bit lengths tree",c=F),c},this.inflate_trees_dynamic=(n,i,r,a,l,c,d,u,f)=>{let h;return o(288),e[0]=0,h=s(r,0,n,257,N,I,c,a,u,e,t),0!=h||0===a[0]?(h==F?f.msg="oversubscribed literal/length tree":-4!=h&&(f.msg="incomplete literal/length tree",h=F),h):(o(288),h=s(r,n,i,0,P,H,d,l,u,e,t),0!=h||0===l[0]&&n>257?(h==F?f.msg="oversubscribed distance tree":h==U?(f.msg="incomplete distance tree",h=F):-4!=h&&(f.msg="empty distance tree with lengths",h=F),h):0)}}function B(){const e=this;let t,n,i,r,a=0,s=0,o=0,l=0,c=0,d=0,u=0,f=0,h=0,w=0;function _(e,t,n,i,r,a,s,o){let l,c,d,u,f,h,w,_,p,b,g,m,y,x,k,v;w=o.next_in_index,_=o.avail_in,f=s.bitb,h=s.bitk,p=s.write,b=ph;)_--,f|=(255&o.read_byte(w++))<>=c[v+1],h-=c[v+1],0!=(16&u)){for(u&=15,y=c[v+2]+(f&W[u]),f>>=u,h-=u;15>h;)_--,f|=(255&o.read_byte(w++))<>=c[v+1],h-=c[v+1],0!=(16&u)){for(u&=15;u>h;)_--,f|=(255&o.read_byte(w++))<>=u,h-=u,b-=y,x>p){k=p-x;do{k+=s.end}while(0>k);if(u=s.end-k,y>u){if(y-=u,p-k>0&&u>p-k)do{s.win[p++]=s.win[k++]}while(0!=--u);else s.win.set(s.win.subarray(k,k+u),p),p+=u,k+=u,u=0;k=0}}else k=p-x,p-k>0&&2>p-k?(s.win[p++]=s.win[k++],s.win[p++]=s.win[k++],y-=2):(s.win.set(s.win.subarray(k,k+2),p),p+=2,k+=2,y-=2);if(p-k>0&&y>p-k)do{s.win[p++]=s.win[k++]}while(0!=--y);else s.win.set(s.win.subarray(k,k+y),p),p+=y,k+=y,y=0;break}if(0!=(64&u))return o.msg="invalid distance code",y=o.avail_in-_,y=y>h>>3?h>>3:y,_+=y,w-=y,h-=y<<3,s.bitb=f,s.bitk=h,o.avail_in=_,o.total_in+=w-o.next_in_index,o.next_in_index=w,s.write=p,F;l+=c[v+2],l+=f&W[u],v=3*(d+l),u=c[v]}break}if(0!=(64&u))return 0!=(32&u)?(y=o.avail_in-_,y=y>h>>3?h>>3:y,_+=y,w-=y,h-=y<<3,s.bitb=f,s.bitk=h,o.avail_in=_,o.total_in+=w-o.next_in_index,o.next_in_index=w,s.write=p,1):(o.msg="invalid literal/length code",y=o.avail_in-_,y=y>h>>3?h>>3:y,_+=y,w-=y,h-=y<<3,s.bitb=f,s.bitk=h,o.avail_in=_,o.total_in+=w-o.next_in_index,o.next_in_index=w,s.write=p,F);if(l+=c[v+2],l+=f&W[u],v=3*(d+l),0===(u=c[v])){f>>=c[v+1],h-=c[v+1],s.win[p++]=c[v+2],b--;break}}else f>>=c[v+1],h-=c[v+1],s.win[p++]=c[v+2],b--}while(b>=258&&_>=10);return y=o.avail_in-_,y=y>h>>3?h>>3:y,_+=y,w-=y,h-=y<<3,s.bitb=f,s.bitk=h,o.avail_in=_,o.total_in+=w-o.next_in_index,o.next_in_index=w,s.write=p,0}e.init=(e,a,s,o,l,c)=>{t=0,u=e,f=a,i=s,h=o,r=l,w=c,n=null},e.proc=(e,p,b)=>{let g,m,y,x,k,v,S,R=0,z=0,D=0;for(D=p.next_in_index,x=p.avail_in,R=e.bitb,z=e.bitk,k=e.write,v=k=258&&x>=10&&(e.bitb=R,e.bitk=z,p.avail_in=x,p.total_in+=D-p.next_in_index,p.next_in_index=D,e.write=k,b=_(u,f,i,h,r,w,e,p),D=p.next_in_index,x=p.avail_in,R=e.bitb,z=e.bitk,k=e.write,v=kz;){if(0===x)return e.bitb=R,e.bitk=z,p.avail_in=x,p.total_in+=D-p.next_in_index,p.next_in_index=D,e.write=k,e.inflate_flush(p,b);b=0,x--,R|=(255&p.read_byte(D++))<>>=n[m+1],z-=n[m+1],y=n[m],0===y){l=n[m+2],t=6;break}if(0!=(16&y)){c=15&y,a=n[m+2],t=2;break}if(0==(64&y)){o=y,s=m/3+n[m+2];break}if(0!=(32&y)){t=7;break}return t=9,p.msg="invalid literal/length code",b=F,e.bitb=R,e.bitk=z,p.avail_in=x,p.total_in+=D-p.next_in_index,p.next_in_index=D,e.write=k,e.inflate_flush(p,b);case 2:for(g=c;g>z;){if(0===x)return e.bitb=R,e.bitk=z,p.avail_in=x,p.total_in+=D-p.next_in_index,p.next_in_index=D,e.write=k,e.inflate_flush(p,b);b=0,x--,R|=(255&p.read_byte(D++))<>=g,z-=g,o=f,n=r,s=w,t=3;case 3:for(g=o;g>z;){if(0===x)return e.bitb=R,e.bitk=z,p.avail_in=x,p.total_in+=D-p.next_in_index,p.next_in_index=D,e.write=k,e.inflate_flush(p,b);b=0,x--,R|=(255&p.read_byte(D++))<>=n[m+1],z-=n[m+1],y=n[m],0!=(16&y)){c=15&y,d=n[m+2],t=4;break}if(0==(64&y)){o=y,s=m/3+n[m+2];break}return t=9,p.msg="invalid distance code",b=F,e.bitb=R,e.bitk=z,p.avail_in=x,p.total_in+=D-p.next_in_index,p.next_in_index=D,e.write=k,e.inflate_flush(p,b);case 4:for(g=c;g>z;){if(0===x)return e.bitb=R,e.bitk=z,p.avail_in=x,p.total_in+=D-p.next_in_index,p.next_in_index=D,e.write=k,e.inflate_flush(p,b);b=0,x--,R|=(255&p.read_byte(D++))<>=g,z-=g,t=5;case 5:for(S=k-d;0>S;)S+=e.end;for(;0!==a;){if(0===v&&(k==e.end&&0!==e.read&&(k=0,v=k7&&(z-=8,x++,D--),e.write=k,b=e.inflate_flush(p,b),k=e.write,v=k{}}q.inflate_trees_fixed=(e,t,n,i)=>(e[0]=9,t[0]=5,n[0]=L,i[0]=O,0);const M=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function V(e,t){const n=this;let i,r=0,a=0,s=0,o=0;const l=[0],c=[0],d=new B;let u=0,f=new Int32Array(4320);const w=new q;n.bitk=0,n.bitb=0,n.win=new h(t),n.end=t,n.read=0,n.write=0,n.reset=(e,t)=>{t&&(t[0]=0),6==r&&d.free(e),r=0,n.bitk=0,n.bitb=0,n.read=n.write=0},n.reset(e,null),n.inflate_flush=(e,t)=>{let i,r,a;return r=e.next_out_index,a=n.read,i=(a>n.write?n.end:n.write)-a,i>e.avail_out&&(i=e.avail_out),0!==i&&t==U&&(t=0),e.avail_out-=i,e.total_out+=i,e.next_out.set(n.win.subarray(a,a+i),r),r+=i,a+=i,a==n.end&&(a=0,n.write==n.end&&(n.write=0),i=n.write-a,i>e.avail_out&&(i=e.avail_out),0!==i&&t==U&&(t=0),e.avail_out-=i,e.total_out+=i,e.next_out.set(n.win.subarray(a,a+i),r),r+=i,a+=i),e.next_out_index=r,n.read=a,t},n.proc=(e,t)=>{let h,_,p,b,g,m,y,x;for(b=e.next_in_index,g=e.avail_in,_=n.bitb,p=n.bitk,m=n.write,y=mp;){if(0===g)return n.bitb=_,n.bitk=p,e.avail_in=g,e.total_in+=b-e.next_in_index,e.next_in_index=b,n.write=m,n.inflate_flush(e,t);t=0,g--,_|=(255&e.read_byte(b++))<>>1){case 0:_>>>=3,p-=3,h=7&p,_>>>=h,p-=h,r=1;break;case 1:k=[],v=[],S=[[]],R=[[]],q.inflate_trees_fixed(k,v,S,R),d.init(k[0],v[0],S[0],0,R[0],0),_>>>=3,p-=3,r=6;break;case 2:_>>>=3,p-=3,r=3;break;case 3:return _>>>=3,p-=3,r=9,e.msg="invalid block type",t=F,n.bitb=_,n.bitk=p,e.avail_in=g,e.total_in+=b-e.next_in_index,e.next_in_index=b,n.write=m,n.inflate_flush(e,t)}break;case 1:for(;32>p;){if(0===g)return n.bitb=_,n.bitk=p,e.avail_in=g,e.total_in+=b-e.next_in_index,e.next_in_index=b,n.write=m,n.inflate_flush(e,t);t=0,g--,_|=(255&e.read_byte(b++))<>>16&65535)!=(65535&_))return r=9,e.msg="invalid stored block lengths",t=F,n.bitb=_,n.bitk=p,e.avail_in=g,e.total_in+=b-e.next_in_index,e.next_in_index=b,n.write=m,n.inflate_flush(e,t);a=65535&_,_=p=0,r=0!==a?2:0!==u?7:0;break;case 2:if(0===g)return n.bitb=_,n.bitk=p,e.avail_in=g,e.total_in+=b-e.next_in_index,e.next_in_index=b,n.write=m,n.inflate_flush(e,t);if(0===y&&(m==n.end&&0!==n.read&&(m=0,y=mg&&(h=g),h>y&&(h=y),n.win.set(e.read_buf(b,h),m),b+=h,g-=h,m+=h,y-=h,0!=(a-=h))break;r=0!==u?7:0;break;case 3:for(;14>p;){if(0===g)return n.bitb=_,n.bitk=p,e.avail_in=g,e.total_in+=b-e.next_in_index,e.next_in_index=b,n.write=m,n.inflate_flush(e,t);t=0,g--,_|=(255&e.read_byte(b++))<29||(h>>5&31)>29)return r=9,e.msg="too many length or distance symbols",t=F,n.bitb=_,n.bitk=p,e.avail_in=g,e.total_in+=b-e.next_in_index,e.next_in_index=b,n.write=m,n.inflate_flush(e,t);if(h=258+(31&h)+(h>>5&31),!i||i.lengthx;x++)i[x]=0;_>>>=14,p-=14,o=0,r=4;case 4:for(;4+(s>>>10)>o;){for(;3>p;){if(0===g)return n.bitb=_,n.bitk=p,e.avail_in=g,e.total_in+=b-e.next_in_index,e.next_in_index=b,n.write=m,n.inflate_flush(e,t);t=0,g--,_|=(255&e.read_byte(b++))<>>=3,p-=3}for(;19>o;)i[M[o++]]=0;if(l[0]=7,h=w.inflate_trees_bits(i,l,c,f,e),0!=h)return(t=h)==F&&(i=null,r=9),n.bitb=_,n.bitk=p,e.avail_in=g,e.total_in+=b-e.next_in_index,e.next_in_index=b,n.write=m,n.inflate_flush(e,t);o=0,r=5;case 5:for(;h=s,258+(31&h)+(h>>5&31)>o;){let a,d;for(h=l[0];h>p;){if(0===g)return n.bitb=_,n.bitk=p,e.avail_in=g,e.total_in+=b-e.next_in_index,e.next_in_index=b,n.write=m,n.inflate_flush(e,t);t=0,g--,_|=(255&e.read_byte(b++))<d)_>>>=h,p-=h,i[o++]=d;else{for(x=18==d?7:d-14,a=18==d?11:3;h+x>p;){if(0===g)return n.bitb=_,n.bitk=p,e.avail_in=g,e.total_in+=b-e.next_in_index,e.next_in_index=b,n.write=m,n.inflate_flush(e,t);t=0,g--,_|=(255&e.read_byte(b++))<>>=h,p-=h,a+=_&W[x],_>>>=x,p-=x,x=o,h=s,x+a>258+(31&h)+(h>>5&31)||16==d&&1>x)return i=null,r=9,e.msg="invalid bit length repeat",t=F,n.bitb=_,n.bitk=p,e.avail_in=g,e.total_in+=b-e.next_in_index,e.next_in_index=b,n.write=m,n.inflate_flush(e,t);d=16==d?i[x-1]:0;do{i[x++]=d}while(0!=--a);o=x}}if(c[0]=-1,z=[],D=[],E=[],T=[],z[0]=9,D[0]=6,h=s,h=w.inflate_trees_dynamic(257+(31&h),1+(h>>5&31),i,z,D,E,T,f,e),0!=h)return h==F&&(i=null,r=9),t=h,n.bitb=_,n.bitk=p,e.avail_in=g,e.total_in+=b-e.next_in_index,e.next_in_index=b,n.write=m,n.inflate_flush(e,t);d.init(z[0],D[0],f,E[0],f,T[0]),r=6;case 6:if(n.bitb=_,n.bitk=p,e.avail_in=g,e.total_in+=b-e.next_in_index,e.next_in_index=b,n.write=m,1!=(t=d.proc(n,e,t)))return n.inflate_flush(e,t);if(t=0,d.free(e),b=e.next_in_index,g=e.avail_in,_=n.bitb,p=n.bitk,m=n.write,y=m{n.reset(e,null),n.win=null,f=null},n.set_dictionary=(e,t,i)=>{n.win.set(e.subarray(t,t+i),0),n.read=n.write=i},n.sync_point=()=>1==r?1:0}const Z=13,K=[0,0,255,255];function G(){const e=this;function t(e){return e&&e.istate?(e.total_in=e.total_out=0,e.msg=null,e.istate.mode=7,e.istate.blocks.reset(e,null),0):C}e.mode=0,e.method=0,e.was=[0],e.need=0,e.marker=0,e.wbits=0,e.inflateEnd=t=>(e.blocks&&e.blocks.free(t),e.blocks=null,0),e.inflateInit=(n,i)=>(n.msg=null,e.blocks=null,8>i||i>15?(e.inflateEnd(n),C):(e.wbits=i,n.istate.blocks=new V(n,1<{let n,i;if(!e||!e.istate||!e.next_in)return C;const r=e.istate;for(t=4==t?U:0,n=U;;)switch(r.mode){case 0:if(0===e.avail_in)return n;if(n=t,e.avail_in--,e.total_in++,8!=(15&(r.method=e.read_byte(e.next_in_index++)))){r.mode=Z,e.msg="unknown compression method",r.marker=5;break}if(8+(r.method>>4)>r.wbits){r.mode=Z,e.msg="invalid win size",r.marker=5;break}r.mode=1;case 1:if(0===e.avail_in)return n;if(n=t,e.avail_in--,e.total_in++,i=255&e.read_byte(e.next_in_index++),((r.method<<8)+i)%31!=0){r.mode=Z,e.msg="incorrect header check",r.marker=5;break}if(0==(32&i)){r.mode=7;break}r.mode=2;case 2:if(0===e.avail_in)return n;n=t,e.avail_in--,e.total_in++,r.need=(255&e.read_byte(e.next_in_index++))<<24&4278190080,r.mode=3;case 3:if(0===e.avail_in)return n;n=t,e.avail_in--,e.total_in++,r.need+=(255&e.read_byte(e.next_in_index++))<<16&16711680,r.mode=4;case 4:if(0===e.avail_in)return n;n=t,e.avail_in--,e.total_in++,r.need+=(255&e.read_byte(e.next_in_index++))<<8&65280,r.mode=5;case 5:return 0===e.avail_in?n:(n=t,e.avail_in--,e.total_in++,r.need+=255&e.read_byte(e.next_in_index++),r.mode=6,2);case 6:return r.mode=Z,e.msg="need dictionary",r.marker=0,C;case 7:if(n=r.blocks.proc(e,n),n==F){r.mode=Z,r.marker=0;break}if(0==n&&(n=t),1!=n)return n;n=t,r.blocks.reset(e,r.was),r.mode=12;case 12:return e.avail_in=0,1;case Z:return F;default:return C}},e.inflateSetDictionary=(e,t,n)=>{let i=0,r=n;if(!e||!e.istate||6!=e.istate.mode)return C;const a=e.istate;return r<1<{let n,i,r,a,s;if(!e||!e.istate)return C;const o=e.istate;if(o.mode!=Z&&(o.mode=Z,o.marker=0),0===(n=e.avail_in))return U;for(i=e.next_in_index,r=o.marker;0!==n&&4>r;)e.read_byte(i)==K[r]?r++:r=0!==e.read_byte(i)?0:4-r,i++,n--;return e.total_in+=i-e.next_in_index,e.next_in_index=i,e.avail_in=n,o.marker=r,4!=r?F:(a=e.total_in,s=e.total_out,t(e),e.total_in=a,e.total_out=s,o.mode=7,0)},e.inflateSyncPoint=e=>e&&e.istate&&e.istate.blocks?e.istate.blocks.sync_point():C}function j(){}j.prototype={inflateInit(e){const t=this;return t.istate=new G,e||(e=15),t.istate.inflateInit(t,e)},inflate(e){const t=this;return t.istate?t.istate.inflate(t,e):C},inflateEnd(){const e=this;if(!e.istate)return C;const t=e.istate.inflateEnd(e);return e.istate=null,t},inflateSync(){const e=this;return e.istate?e.istate.inflateSync(e):C},inflateSetDictionary(e,t){const n=this;return n.istate?n.istate.inflateSetDictionary(n,e,t):C},read_byte(e){return this.next_in[e]},read_buf(e,t){return this.next_in.subarray(e,e+t)}};const X=4294967295,Y=65535,J=33639248,Q=101075792,$=22,ee=void 0,te="undefined",ne="function";class ie{constructor(e){return class extends S{constructor(t,n){const i=new e(n);super({transform(e,t){t.enqueue(i.append(e))},flush(e){const t=i.flush();t&&e.enqueue(t)}})}}}}let re=2;try{typeof T!=te&&T.hardwareConcurrency&&(re=T.hardwareConcurrency)}catch(e){}const ae={chunkSize:524288,maxWorkers:re,terminateWorkerTimeout:5e3,useWebWorkers:!0,useCompressionStream:!0,workerScripts:ee,CompressionStreamNative:typeof D!=te&&D,DecompressionStreamNative:typeof E!=te&&E},se=n.assign({},ae);function oe(){return se}function le(e){const{baseURL:n,chunkSize:i,maxWorkers:r,terminateWorkerTimeout:a,useCompressionStream:s,useWebWorkers:o,Deflate:l,Inflate:c,CompressionStream:d,DecompressionStream:u,workerScripts:h}=e;if(ce("baseURL",n),ce("chunkSize",i),ce("maxWorkers",r),ce("terminateWorkerTimeout",a),ce("useCompressionStream",s),ce("useWebWorkers",o),l&&(se.CompressionStream=new ie(l)),c&&(se.DecompressionStream=new ie(c)),ce("CompressionStream",d),ce("DecompressionStream",u),h!==ee){const{deflate:e,inflate:n}=h;if((e||n)&&(se.workerScripts||(se.workerScripts={})),e){if(!t.isArray(e))throw new f("workerScripts.deflate must be an array");se.workerScripts.deflate=e}if(n){if(!t.isArray(n))throw new f("workerScripts.inflate must be an array");se.workerScripts.inflate=n}}}function ce(e,t){t!==ee&&(se[e]=t)}const de=[];for(let e=0;256>e;e++){let t=e;for(let e=0;8>e;e++)1&t?t=t>>>1^3988292384:t>>>=1;de[e]=t}class ue{constructor(e){this.crc=e||-1}append(e){let t=0|this.crc;for(let n=0,i=0|e.length;i>n;n++)t=t>>>8^de[255&(t^e[n])];this.crc=t}get(){return~this.crc}}class fe extends S{constructor(){let e;const t=new ue;super({transform(e,n){t.append(e),n.enqueue(e)},flush(){const n=new h(4);new p(n.buffer).setUint32(0,t.get()),e.value=n}}),e=this}}const he={concat(e,t){if(0===e.length||0===t.length)return e.concat(t);const n=e[e.length-1],i=he.getPartial(n);return 32===i?e.concat(t):he._shiftRight(t,i,0|n,e.slice(0,e.length-1))},bitLength(e){const t=e.length;if(0===t)return 0;const n=e[t-1];return 32*(t-1)+he.getPartial(n)},clamp(e,t){if(32*e.length0&&t&&(e[n-1]=he.partial(t,e[n-1]&2147483648>>t-1,1)),e},partial:(e,t,n)=>32===e?t:(n?0|t:t<<32-e)+1099511627776*e,getPartial:e=>s.round(e/1099511627776)||32,_shiftRight(e,t,n,i){for(void 0===i&&(i=[]);t>=32;t-=32)i.push(n),n=0;if(0===t)return i.concat(e);for(let r=0;r>>t),n=e[r]<<32-t;const r=e.length?e[e.length-1]:0,a=he.getPartial(r);return i.push(he.partial(t+a&31,t+a>32?n:i.pop(),1)),i}},we={bytes:{fromBits(e){const t=he.bitLength(e)/8,n=new h(t);let i;for(let r=0;t>r;r++)0==(3&r)&&(i=e[r/4]),n[r]=i>>>24,i<<=8;return n},toBits(e){const t=[];let n,i=0;for(n=0;n9007199254740991)throw new f("Cannot hash more than 2^53 - 1 bits");const a=new _(n);let s=0;for(let e=t.blockSize+i-(t.blockSize+i&t.blockSize-1);r>=e;e+=t.blockSize)t._block(a.subarray(16*s,16*(s+1))),s+=1;return n.splice(0,16*s),t}finalize(){const e=this;let t=e._buffer;const n=e._h;t=he.concat(t,[he.partial(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(s.floor(e._length/4294967296)),t.push(0|e._length);t.length;)e._block(t.splice(0,16));return e.reset(),n}_f(e,t,n,i){return e>19?e>39?e>59?e>79?void 0:t^n^i:t&n|t&i|n&i:t^n^i:t&n|~t&i}_S(e,t){return t<>>32-e}_block(e){const n=this,i=n._h,r=t(80);for(let t=0;16>t;t++)r[t]=e[t];let a=i[0],o=i[1],l=i[2],c=i[3],d=i[4];for(let e=0;79>=e;e++){16>e||(r[e]=n._S(1,r[e-3]^r[e-8]^r[e-14]^r[e-16]));const t=n._S(5,a)+n._f(e,o,l,c)+d+r[e]+n._key[s.floor(e/20)]|0;d=c,c=l,l=n._S(30,o),o=a,a=t}i[0]=i[0]+a|0,i[1]=i[1]+o|0,i[2]=i[2]+l|0,i[3]=i[3]+c|0,i[4]=i[4]+d|0}},pe={getRandomValues(e){const t=new _(e.buffer),n=e=>{let t=987654321;const n=4294967295;return()=>(t=36969*(65535&t)+(t>>16)&n,(((t<<16)+(e=18e3*(65535&e)+(e>>16)&n)&n)/4294967296+.5)*(s.random()>.5?1:-1))};for(let i,r=0;rnew be.hmacSha1(we.bytes.toBits(e)),pbkdf2(e,t,n,i){if(n=n||1e4,0>i||0>n)throw new f("invalid params to pbkdf2");const r=1+(i>>5)<<2;let a,s,o,l,c;const d=new ArrayBuffer(r),u=new p(d);let h=0;const w=he;for(t=we.bytes.toBits(t),c=1;(r||1)>h;c++){for(a=s=e.encrypt(w.concat(t,[c])),o=1;n>o;o++)for(s=e.encrypt(s),l=0;lh&&or&&(e=(new n).update(e).finalize());for(let t=0;r>t;t++)i[0][t]=909522486^e[t],i[1][t]=1549556828^e[t];t._baseHash[0].update(i[0]),t._baseHash[1].update(i[1]),t._resultHash=new n(t._baseHash[0])}reset(){const e=this;e._resultHash=new e._hash(e._baseHash[0]),e._updated=!1}update(e){this._updated=!0,this._resultHash.update(e)}digest(){const e=this,t=e._resultHash.finalize(),n=new e._hash(e._baseHash[1]).update(t).finalize();return e.reset(),n}encrypt(e){if(this._updated)throw new f("encrypt on already updated hmac called!");return this.update(e),this.digest(e)}}},ge=typeof k!=te&&typeof k.getRandomValues==ne,me="Invalid password",ye="Invalid signature",xe="zipjs-abort-check-password";function ke(e){return ge?k.getRandomValues(e):pe.getRandomValues(e)}const ve=16,Se={name:"PBKDF2"},Re=n.assign({hash:{name:"HMAC"}},Se),ze=n.assign({iterations:1e3,hash:{name:"SHA-1"}},Se),De=["deriveBits"],Ee=[8,12,16],Te=[16,24,32],Ae=10,Ce=[0,0,0,0],Fe=typeof k!=te,Ue=Fe&&k.subtle,We=Fe&&typeof Ue!=te,Le=we.bytes,Oe=class{constructor(e){const t=this;t._tables=[[[],[],[],[],[]],[[],[],[],[],[]]],t._tables[0][0][0]||t._precompute();const n=t._tables[0][4],i=t._tables[1],r=e.length;let a,s,o,l=1;if(4!==r&&6!==r&&8!==r)throw new f("invalid aes key size");for(t._key=[s=e.slice(0),o=[]],a=r;4*r+28>a;a++){let e=s[a-1];(a%r==0||8===r&&a%r==4)&&(e=n[e>>>24]<<24^n[e>>16&255]<<16^n[e>>8&255]<<8^n[255&e],a%r==0&&(e=e<<8^e>>>24^l<<24,l=l<<1^283*(l>>7))),s[a]=s[a-r]^e}for(let e=0;a;e++,a--){const t=s[3&e?a:a-4];o[e]=4>=a||4>e?t:i[0][n[t>>>24]]^i[1][n[t>>16&255]]^i[2][n[t>>8&255]]^i[3][n[255&t]]}}encrypt(e){return this._crypt(e,0)}decrypt(e){return this._crypt(e,1)}_precompute(){const e=this._tables[0],t=this._tables[1],n=e[4],i=t[4],r=[],a=[];let s,o,l,c;for(let e=0;256>e;e++)a[(r[e]=e<<1^283*(e>>7))^e]=e;for(let d=s=0;!n[d];d^=o||1,s=a[s]||1){let a=s^s<<1^s<<2^s<<3^s<<4;a=a>>8^255&a^99,n[d]=a,i[a]=d,c=r[l=r[o=r[d]]];let u=16843009*c^65537*l^257*o^16843008*d,f=257*r[a]^16843008*a;for(let n=0;4>n;n++)e[n][d]=f=f<<24^f>>>8,t[n][a]=u=u<<24^u>>>8}for(let n=0;5>n;n++)e[n]=e[n].slice(0),t[n]=t[n].slice(0)}_crypt(e,t){if(4!==e.length)throw new f("invalid aes block size");const n=this._key[t],i=n.length/4-2,r=[0,0,0,0],a=this._tables[t],s=a[0],o=a[1],l=a[2],c=a[3],d=a[4];let u,h,w,_=e[0]^n[0],p=e[t?3:1]^n[1],b=e[2]^n[2],g=e[t?1:3]^n[3],m=4;for(let e=0;i>e;e++)u=s[_>>>24]^o[p>>16&255]^l[b>>8&255]^c[255&g]^n[m],h=s[p>>>24]^o[b>>16&255]^l[g>>8&255]^c[255&_]^n[m+1],w=s[b>>>24]^o[g>>16&255]^l[_>>8&255]^c[255&p]^n[m+2],g=s[g>>>24]^o[_>>16&255]^l[p>>8&255]^c[255&b]^n[m+3],m+=4,_=u,p=h,b=w;for(let e=0;4>e;e++)r[t?3&-e:e]=d[_>>>24]<<24^d[p>>16&255]<<16^d[b>>8&255]<<8^d[255&g]^n[m++],u=_,_=p,p=b,b=g,g=u;return r}},Ne=class{constructor(e,t){this._prf=e,this._initIv=t,this._iv=t}reset(){this._iv=this._initIv}update(e){return this.calculate(this._prf,e,this._iv)}incWord(e){if(255==(e>>24&255)){let t=e>>16&255,n=e>>8&255,i=255&e;255===t?(t=0,255===n?(n=0,255===i?i=0:++i):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=i}else e+=1<<24;return e}incCounter(e){0===(e[0]=this.incWord(e[0]))&&(e[1]=this.incWord(e[1]))}calculate(e,t,n){let i;if(!(i=t.length))return[];const r=he.bitLength(t);for(let r=0;i>r;r+=4){this.incCounter(n);const i=e.encrypt(n);t[r]^=i[0],t[r+1]^=i[1],t[r+2]^=i[2],t[r+3]^=i[3]}return he.clamp(t,r)}},Ie=be.hmacSha1;let Pe=Fe&&We&&typeof Ue.importKey==ne,He=Fe&&We&&typeof Ue.deriveBits==ne;class qe extends S{constructor({password:e,rawPassword:t,signed:i,encryptionStrength:r,checkPasswordOnly:a}){super({start(){n.assign(this,{ready:new g((e=>this.resolveReady=e)),password:Ze(e,t),signed:i,strength:r-1,pending:new h})},async transform(e,t){const n=this,{password:i,strength:r,resolveReady:s,ready:o}=n;i?(await(async(e,t,n,i)=>{const r=await Ve(e,t,n,Ge(i,0,Ee[t])),a=Ge(i,Ee[t]);if(r[0]!=a[0]||r[1]!=a[1])throw new f(me)})(n,r,i,Ge(e,0,Ee[r]+2)),e=Ge(e,Ee[r]+2),a?t.error(new f(xe)):s()):await o;const l=new h(e.length-Ae-(e.length-Ae)%ve);t.enqueue(Me(n,e,l,0,Ae,!0))},async flush(e){const{signed:t,ctr:n,hmac:i,pending:r,ready:a}=this;if(i&&n){await a;const s=Ge(r,0,r.length-Ae),o=Ge(r,r.length-Ae);let l=new h;if(s.length){const e=Xe(Le,s);i.update(e);const t=n.update(e);l=je(Le,t)}if(t){const e=Ge(je(Le,i.digest()),0,Ae);for(let t=0;Ae>t;t++)if(e[t]!=o[t])throw new f(ye)}e.enqueue(l)}}})}}class Be extends S{constructor({password:e,rawPassword:t,encryptionStrength:i}){let r;super({start(){n.assign(this,{ready:new g((e=>this.resolveReady=e)),password:Ze(e,t),strength:i-1,pending:new h})},async transform(e,t){const n=this,{password:i,strength:r,resolveReady:a,ready:s}=n;let o=new h;i?(o=await(async(e,t,n)=>{const i=ke(new h(Ee[t]));return Ke(i,await Ve(e,t,n,i))})(n,r,i),a()):await s;const l=new h(o.length+e.length-e.length%ve);l.set(o,0),t.enqueue(Me(n,e,l,o.length,0))},async flush(e){const{ctr:t,hmac:n,pending:i,ready:a}=this;if(n&&t){await a;let s=new h;if(i.length){const e=t.update(Xe(Le,i));n.update(e),s=je(Le,e)}r.signature=je(Le,n.digest()).slice(0,Ae),e.enqueue(Ke(s,r.signature))}}}),r=this}}function Me(e,t,n,i,r,a){const{ctr:s,hmac:o,pending:l}=e,c=t.length-r;let d;for(l.length&&(t=Ke(l,t),n=((e,t)=>{if(t&&t>e.length){const n=e;(e=new h(t)).set(n,0)}return e})(n,c-c%ve)),d=0;c-ve>=d;d+=ve){const e=Xe(Le,Ge(t,d,d+ve));a&&o.update(e);const r=s.update(e);a||o.update(r),n.set(je(Le,r),d+i)}return e.pending=Ge(t,d),n}async function Ve(e,i,r,a){e.password=null;const s=await(async(e,t,n,i,r)=>{if(!Pe)return be.importKey(t);try{return await Ue.importKey("raw",t,n,!1,r)}catch(e){return Pe=!1,be.importKey(t)}})(0,r,Re,0,De),o=await(async(e,t,n)=>{if(!He)return be.pbkdf2(t,e.salt,ze.iterations,n);try{return await Ue.deriveBits(e,t,n)}catch(i){return He=!1,be.pbkdf2(t,e.salt,ze.iterations,n)}})(n.assign({salt:a},ze),s,8*(2*Te[i]+2)),l=new h(o),c=Xe(Le,Ge(l,0,Te[i])),d=Xe(Le,Ge(l,Te[i],2*Te[i])),u=Ge(l,2*Te[i]);return n.assign(e,{keys:{key:c,authentication:d,passwordVerification:u},ctr:new Ne(new Oe(c),t.from(Ce)),hmac:new Ie(d)}),u}function Ze(e,t){return t===ee?(e=>{if(typeof m==te){const t=new h((e=unescape(encodeURIComponent(e))).length);for(let n=0;n>>24]),r=~e.crcKey2.get(),e.keys=[n,i,r]}function nt(e){const t=2|e.keys[2];return it(s.imul(t,1^t)>>>8)}function it(e){return 255&e}function rt(e){return 4294967295&e}const at="deflate-raw";class st extends S{constructor(e,{chunkSize:t,CompressionStream:n,CompressionStreamNative:i}){super({});const{compressed:r,encrypted:a,useCompressionStream:s,zipCrypto:o,signed:l,level:c}=e,d=this;let u,f,h=lt(super.readable);a&&!o||!l||(u=new fe,h=ut(h,u)),r&&(h=dt(h,s,{level:c,chunkSize:t},i,n)),a&&(o?h=ut(h,new Je(e)):(f=new Be(e),h=ut(h,f))),ct(d,h,(()=>{let e;a&&!o&&(e=f.signature),a&&!o||!l||(e=new p(u.value.buffer).getUint32(0)),d.signature=e}))}}class ot extends S{constructor(e,{chunkSize:t,DecompressionStream:n,DecompressionStreamNative:i}){super({});const{zipCrypto:r,encrypted:a,signed:s,signature:o,compressed:l,useCompressionStream:c}=e;let d,u,h=lt(super.readable);a&&(r?h=ut(h,new Ye(e)):(u=new qe(e),h=ut(h,u))),l&&(h=dt(h,c,{chunkSize:t},i,n)),a&&!r||!s||(d=new fe,h=ut(h,d)),ct(this,h,(()=>{if((!a||r)&&s){const e=new p(d.value.buffer);if(o!=e.getUint32(0,!1))throw new f(ye)}}))}}function lt(e){return ut(e,new S({transform(e,t){e&&e.length&&t.enqueue(e)}}))}function ct(e,t,i){t=ut(t,new S({flush:i})),n.defineProperty(e,"readable",{get:()=>t})}function dt(e,t,n,i,r){try{e=ut(e,new(t&&i?i:r)(at,n))}catch(i){if(!t)return e;try{e=ut(e,new r(at,n))}catch(t){return e}}return e}function ut(e,t){return e.pipeThrough(t)}const ft="data",ht="close",wt="inflate";class _t extends S{constructor(e,t){super({});const i=this,{codecType:r}=e;let a;r.startsWith("deflate")?a=st:r.startsWith(wt)&&(a=ot);let s=0,o=0;const l=new a(e,t),c=super.readable,d=new S({transform(e,t){e&&e.length&&(o+=e.length,t.enqueue(e))},flush(){n.assign(i,{inputSize:o})}}),u=new S({transform(e,t){e&&e.length&&(s+=e.length,t.enqueue(e))},flush(){const{signature:e}=l;n.assign(i,{signature:e,outputSize:s,inputSize:o})}});n.defineProperty(i,"readable",{get:()=>c.pipeThrough(d).pipeThrough(l).pipeThrough(u)})}}class pt extends S{constructor(e){let t;super({transform:function n(i,r){if(t){const e=new h(t.length+i.length);e.set(t),e.set(i,t.length),i=e,t=null}i.length>e?(r.enqueue(i.slice(0,e)),n(i.slice(e),r)):t=i},flush(e){t&&t.length&&e.enqueue(t)}})}}let bt=typeof A!=te;class gt{constructor(e,{readable:t,writable:i},{options:r,config:a,streamOptions:s,useWebWorkers:o,transferStreams:l,scripts:c},d){const{signal:u}=s;return n.assign(e,{busy:!0,readable:t.pipeThrough(new pt(a.chunkSize)).pipeThrough(new mt(t,s),{signal:u}),writable:i,options:n.assign({},r),scripts:c,transferStreams:l,terminate:()=>new g((t=>{const{worker:n,busy:i}=e;n?(i?e.resolveTerminated=t:(n.terminate(),t()),e.interface=null):t()})),onTaskFinished(){const{resolveTerminated:t}=e;t&&(e.resolveTerminated=null,e.terminated=!0,e.worker.terminate(),t()),e.busy=!1,d(e)}}),(o&&bt?kt:xt)(e,a)}}class mt extends S{constructor(e,{onstart:t,onprogress:n,size:i,onend:r}){let a=0;super({async start(){t&&await yt(t,i)},async transform(e,t){a+=e.length,n&&await yt(n,a,i),t.enqueue(e)},async flush(){e.size=a,r&&await yt(r,a)}})}}async function yt(e,...t){try{await e(...t)}catch(e){}}function xt(e,t){return{run:()=>(async({options:e,readable:t,writable:n,onTaskFinished:i},r)=>{try{const a=new _t(e,r);await t.pipeThrough(a).pipeTo(n,{preventClose:!0,preventAbort:!0});const{signature:s,inputSize:o,outputSize:l}=a;return{signature:s,inputSize:o,outputSize:l}}finally{i()}})(e,t)}}function kt(e,t){const{baseURL:i,chunkSize:r}=t;if(!e.interface){let a;try{a=((e,t,i)=>{const r={type:"module"};let a,s;typeof e==ne&&(e=e());try{a=new u(e,t)}catch(t){a=e}if(vt)try{s=new A(a)}catch(e){vt=!1,s=new A(a,r)}else s=new A(a,r);return s.addEventListener("message",(e=>(async({data:e},t)=>{const{type:i,value:r,messageId:a,result:s,error:o}=e,{reader:l,writer:c,resolveResult:d,rejectResult:u,onTaskFinished:w}=t;try{if(o){const{message:e,stack:t,code:i,name:r}=o,a=new f(e);n.assign(a,{stack:t,code:i,name:r}),_(a)}else{if("pull"==i){const{value:e,done:n}=await l.read();Rt({type:ft,value:e,done:n,messageId:a},t)}i==ft&&(await c.ready,await c.write(new h(r)),Rt({type:"ack",messageId:a},t)),i==ht&&_(null,s)}}catch(o){Rt({type:ht,messageId:a},t),_(o)}function _(e,t){e?u(e):d(t),c&&c.releaseLock(),w()}})(e,i))),s})(e.scripts[0],i,e)}catch(n){return bt=!1,xt(e,t)}n.assign(e,{worker:a,interface:{run:()=>(async(e,t)=>{let i,r;const a=new g(((e,t)=>{i=e,r=t}));n.assign(e,{reader:null,writer:null,resolveResult:i,rejectResult:r,result:a});const{readable:s,options:o,scripts:l}=e,{writable:c,closed:d}=(e=>{let t;const n=new g((e=>t=e));return{writable:new z({async write(t){const n=e.getWriter();await n.ready,await n.write(t),n.releaseLock()},close(){t()},abort:t=>e.getWriter().abort(t)}),closed:n}})(e.writable),u=Rt({type:"start",scripts:l.slice(1),options:o,config:t,readable:s,writable:c},e);u||n.assign(e,{reader:s.getReader(),writer:c.getWriter()});const f=await a;return u||await c.getWriter().close(),await d,f})(e,{chunkSize:r})}})}return e.interface}let vt=!0,St=!0;function Rt(e,{worker:t,writer:n,onTaskFinished:i,transferStreams:r}){try{let{value:n,readable:i,writable:a}=e;const s=[];if(n&&(n.byteLengtha?i.close():this.chunkOffset+=t}});return n}}class Pt extends Nt{constructor(){super();const e=this,t=new z({write:t=>e.writeUint8Array(t)});n.defineProperty(e,Ot,{get:()=>t})}writeUint8Array(){}}class Ht extends It{constructor(e){super(),n.assign(this,{blob:e,size:e.size})}async readUint8Array(e,t){const n=this,i=e+t,r=e||it&&(a=a.slice(e,i)),new h(a)}}class qt extends Nt{constructor(e){super();const t=new S,i=[];e&&i.push(["Content-Type",e]),n.defineProperty(this,Ot,{get:()=>t.writable}),this.blob=new d(t.readable,{headers:i}).blob()}getData(){return this.blob}}class Bt extends It{constructor(e,t){super(),Vt(this,e,t)}async init(){await Zt(this,$t,Xt),super.init()}readUint8Array(e,t){return Kt(this,e,t,$t,Xt)}}class Mt extends It{constructor(e,t){super(),Vt(this,e,t)}async init(){await Zt(this,en,Yt),super.init()}readUint8Array(e,t){return Kt(this,e,t,en,Yt)}}function Vt(e,t,i){const{preventHeadRequest:r,useRangeHeader:a,forceRangeRequests:s,combineSizeEocd:o}=i;delete(i=n.assign({},i)).preventHeadRequest,delete i.useRangeHeader,delete i.forceRangeRequests,delete i.combineSizeEocd,delete i.useXHR,n.assign(e,{url:t,options:i,preventHeadRequest:r,useRangeHeader:a,forceRangeRequests:s,combineSizeEocd:o})}async function Zt(e,t,n){const{url:i,preventHeadRequest:a,useRangeHeader:s,forceRangeRequests:o,combineSizeEocd:l}=e;if((e=>{const{baseURL:t}=oe(),{protocol:n}=new u(e,t);return"http:"==n||"https:"==n})(i)&&(s||o)&&(void 0===a||a)){const i=await t(Ut,e,Gt(e,l?-22:void 0));if(!o&&i.headers.get("Accept-Ranges")!=Wt)throw new f(Ct);{let a;l&&(e.eocdCache=new h(await i.arrayBuffer()));const s=i.headers.get("Content-Range");if(s){const e=s.trim().split(/\s*\/\s*/);if(e.length){const t=e[1];t&&"*"!=t&&(a=r(t))}}a===ee?await Qt(e,t,n):e.size=a}}else await Qt(e,t,n)}async function Kt(e,t,n,i,r){const{useRangeHeader:a,forceRangeRequests:s,eocdCache:o,size:l,options:c}=e;if(a||s){if(o&&t==l-$&&n==$)return o;const r=await i(Ut,e,Gt(e,t,n));if(206!=r.status)throw new f(Ct);return new h(await r.arrayBuffer())}{const{data:i}=e;return i||await r(e,c),new h(e.data.subarray(t,t+n))}}function Gt(e,t=0,i=1){return n.assign({},jt(e),{Range:Wt+"="+(0>t?t:t+"-"+(t+i-1))})}function jt({options:e}){const{headers:t}=e;if(t)return Symbol.iterator in t?n.fromEntries(t):t}async function Xt(e){await Jt(e,$t)}async function Yt(e){await Jt(e,en)}async function Jt(e,t){const n=await t(Ut,e,jt(e));e.data=new h(await n.arrayBuffer()),e.size||(e.size=e.data.length)}async function Qt(e,t,n){if(e.preventHeadRequest)await n(e,e.options);else{const i=(await t("HEAD",e,jt(e))).headers.get("Content-Length");i?e.size=r(i):await n(e,e.options)}}async function $t(e,{options:t,url:i},r){const a=await fetch(i,n.assign({},t,{method:e,headers:r}));if(400>a.status)return a;throw 416==a.status?new f(Ct):new f(At+(a.statusText||a.status))}function en(e,{url:t},i){return new g(((r,a)=>{const s=new XMLHttpRequest;if(s.addEventListener("load",(()=>{if(400>s.status){const e=[];s.getAllResponseHeaders().trim().split(/[\r\n]+/).forEach((t=>{const n=t.trim().split(/\s*:\s*/);n[0]=n[0].trim().replace(/^[a-z]|-[a-z]/g,(e=>e.toUpperCase())),e.push(n)})),r({status:s.status,arrayBuffer:()=>s.response,headers:new l(e)})}else a(416==s.status?new f(Ct):new f(At+(s.statusText||s.status)))}),!1),s.addEventListener("error",(e=>a(e.detail?e.detail.error:new f("Network error"))),!1),s.open(e,t),i)for(const e of n.entries(i))s.setRequestHeader(e[0],e[1]);s.responseType="arraybuffer",s.send()}))}class tn extends It{constructor(e,t={}){super(),n.assign(this,{url:e,reader:t.useXHR?new Mt(e,t):new Bt(e,t)})}set size(e){}get size(){return this.reader.size}async init(){await this.reader.init(),super.init()}readUint8Array(e,t){return this.reader.readUint8Array(e,t)}}class nn extends It{constructor(e){super(),this.readers=e}async init(){const e=this,{readers:t}=e;e.lastDiskNumber=0,e.lastDiskOffset=0,await g.all(t.map((async(n,i)=>{await n.init(),i!=t.length-1&&(e.lastDiskOffset+=n.size),e.size+=n.size}))),super.init()}async readUint8Array(e,t,n=0){const i=this,{readers:r}=this;let a,o=n;-1==o&&(o=r.length-1);let l=e;for(;l>=r[o].size;)l-=r[o].size,o++;const c=r[o],d=c.size;if(l+t>d){const r=d-l;a=new h(t),a.set(await ln(c,l,r)),a.set(await i.readUint8Array(e+r,t-r,n),r)}else a=await ln(c,l,t);return i.lastDiskNumber=s.max(o,i.lastDiskNumber),a}}class rn extends Nt{constructor(e,t=4294967295){super();const i=this;let r,a,s;n.assign(i,{diskNumber:0,diskOffset:0,size:0,maxSize:t,availableSize:t});const o=new z({async write(t){const{availableSize:n}=i;if(s)t.lengtho})}}async function an(e,t){if(!e.init||e.initialized)return g.resolve();await e.init(t)}function sn(e){return t.isArray(e)&&(e=new nn(e)),e instanceof R&&(e={readable:e}),e}function on(e){e.writable===ee&&typeof e.next==ne&&(e=new rn(e)),e instanceof z&&(e={writable:e});const{writable:t}=e;return t.size===ee&&(t.size=0),e instanceof rn||n.assign(e,{diskNumber:0,diskOffset:0,availableSize:1/0,maxSize:1/0}),e}function ln(e,t,n,i){return e.readUint8Array(t,n,i)}const cn=nn,dn=rn,un="\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ ".split("");function fn(e,t){return t&&"cp437"==t.trim().toLowerCase()?(e=>{{let t="";for(let n=0;nthis[t]=e[t]))}}const Dn="File format is not recognized",En="End of central directory not found",Tn="End of Zip64 central directory not found",An="End of Zip64 central directory locator not found",Cn="Central directory header not found",Fn="Local file header not found",Un="Zip64 extra field not found",Wn="File contains encrypted entry",Ln="Encryption method not supported",On="Compression method not supported",Nn="Split zip file",In="utf-8",Pn="cp437",Hn=[[bn,X],[gn,X],[mn,X],[yn,Y]],qn={[Y]:{getValue:Qn,bytes:4},[X]:{getValue:$n,bytes:8}};class Bn{constructor(e,t={}){n.assign(this,{reader:sn(e),options:t,config:oe()})}async*getEntriesGenerator(e={}){const t=this;let{reader:i}=t;const{config:r}=t;if(await an(i),i.size!==ee&&i.readUint8Array||(i=new Ht(await new d(i.readable).blob()),await an(i)),i.size<$)throw new f(Dn);i.chunkSize=(e=>s.max(e.chunkSize,64))(r);const a=await(async(e,t,n)=>{const i=new h(4);return ei(i).setUint32(0,101010256,!0),await r(22)||await r(s.min(1048582,n));async function r(t){const r=n-t,a=await ln(e,r,t);for(let e=a.length-22;e>=0;e--)if(a[e]==i[0]&&a[e+1]==i[1]&&a[e+2]==i[2]&&a[e+3]==i[3])return{offset:r+e,buffer:a.slice(e,e+22).buffer}}})(i,0,i.size);if(!a)throw 134695760==Qn(ei(await ln(i,0,4)))?new f(Nn):new f(En);const o=ei(a);let l=Qn(o,12),c=Qn(o,16);const u=a.offset,w=Jn(o,20),_=u+$+w;let p=Jn(o,4);const b=i.lastDiskNumber||0;let m=Jn(o,6),y=Jn(o,8),x=0,k=0;if(c==X||l==X||y==Y||m==Y){const e=ei(await ln(i,a.offset-20,20));if(117853008!=Qn(e,0))throw new f(Tn);c=$n(e,8);let t=await ln(i,c,56,-1),n=ei(t);const r=a.offset-20-56;if(Qn(n,0)!=Q&&c!=r){const e=c;c=r,x=c-e,t=await ln(i,c,56,-1),n=ei(t)}if(Qn(n,0)!=Q)throw new f(An);p==Y&&(p=Qn(n,16)),m==Y&&(m=Qn(n,20)),y==Y&&(y=$n(n,32)),l==X&&(l=$n(n,40)),c-=l}if(cc)throw new f(Dn);let v=0,S=await ln(i,c,l,m),R=ei(S);if(l){const e=a.offset-l;if(Qn(R,v)!=J&&c!=e){const t=c;c=e,x+=c-t,S=await ln(i,c,l,m),R=ei(S)}}const z=a.offset-c-(i.lastDiskOffset||0);if(l==z||0>z||(l=z,S=await ln(i,c,l,m),R=ei(S)),0>c||c>=i.size)throw new f(Dn);const D=Gn(t,e,"filenameEncoding"),E=Gn(t,e,"commentEncoding");for(let a=0;y>a;a++){const o=new Mn(i,r,t.options);if(Qn(R,v)!=J)throw new f(Cn);Vn(o,R,v+6);const l=!!o.bitFlag.languageEncodingFlag,c=v+46,d=c+o.filenameLength,u=d+o.extraFieldLength,h=Jn(R,v+4),w=0==(0&h),_=S.subarray(c,d),p=Jn(R,v+32),b=u+p,m=S.subarray(u,b),z=l,T=l,A=w&&16==(16&Yn(R,v+38)),C=Qn(R,v+42)+x;n.assign(o,{versionMadeBy:h,msDosCompatible:w,compressedSize:0,uncompressedSize:0,commentLength:p,directory:A,offset:C,diskNumberStart:Jn(R,v+34),internalFileAttribute:Jn(R,v+36),externalFileAttribute:Qn(R,v+38),rawFilename:_,filenameUTF8:z,commentUTF8:T,rawExtraField:S.subarray(d,u)});const F=Gn(t,e,"decodeText")||fn,[U,W]=await g.all([F(_,z?In:D||Pn),F(m,T?In:E||Pn)]);n.assign(o,{rawComment:m,filename:U,comment:W,directory:A||U.endsWith("/")}),k=s.max(C,k),await Zn(o,o,R,v+6);const L=new zn(o);L.getData=(e,t)=>o.getData(e,L,t),v=b;const{onprogress:O}=e;if(O)try{await O(a+1,y,new zn(o))}catch(e){}yield L}const T=Gn(t,e,"extractPrependedData"),A=Gn(t,e,"extractAppendedData");return T&&(t.prependedData=k>0?await ln(i,0,k):new h),t.comment=w?await ln(i,u+$,w):new h,A&&(t.appendedData=_>>8&255:_>>>24&255),signature:_,compressed:0!=d,encrypted:S,useWebWorkers:Gn(a,i,"useWebWorkers"),useCompressionStream:Gn(a,i,"useCompressionStream"),transferStreams:Gn(a,i,"transferStreams"),checkPasswordOnly:C},config:u,streamOptions:{signal:A,size:E,onstart:U,onprogress:W,onend:L}};let N=0;try{({outputSize:N}=await(async(e,t)=>{const{options:n,config:i}=t,{transferStreams:a,useWebWorkers:s,useCompressionStream:o,codecType:l,compressed:c,signed:d,encrypted:u}=n,{workerScripts:f,maxWorkers:h}=i;t.transferStreams=a||a===ee;const w=!(c||d||u||t.transferStreams);return t.useWebWorkers=!w&&(s||s===ee&&i.useWebWorkers),t.scripts=t.useWebWorkers&&f?f[l]:[],n.useCompressionStream=o||o===ee&&i.useCompressionStream,(await(async()=>{const n=zt.find((e=>!e.busy));if(n)return Tt(n),new gt(n,e,t,_);if(zt.lengthDt.push({resolve:n,stream:e,workerOptions:t})))})()).run();function _(e){if(Dt.length){const[{resolve:t,stream:n,workerOptions:i}]=Dt.splice(0,1);t(new gt(e,n,i,_))}else e.worker?(Tt(e),((e,t)=>{const{config:n}=t,{terminateWorkerTimeout:i}=n;r.isFinite(i)&&i>=0&&(e.terminated?e.terminated=!1:e.terminateTimeout=setTimeout((async()=>{zt=zt.filter((t=>t!=e));try{await e.terminate()}catch(e){}}),i))})(e,t)):zt=zt.filter((t=>t!=e))}})({readable:T,writable:F},O))}catch(e){if(!C||e.message!=xe)throw e}finally{const e=Gn(a,i,"preventClose");F.size+=N,e||F.locked||await F.getWriter().close()}return C?ee:e.getData?e.getData():F}}function Vn(e,t,i){const r=e.rawBitFlag=Jn(t,i+2),a=1==(1&r),s=Qn(t,i+6);n.assign(e,{encrypted:a,version:Jn(t,i),bitFlag:{level:(6&r)>>1,dataDescriptor:8==(8&r),languageEncodingFlag:2048==(2048&r)},rawLastModDate:s,lastModDate:jn(s),filenameLength:Jn(t,i+22),extraFieldLength:Jn(t,i+24)})}async function Zn(e,t,i,r,a){const{rawExtraField:s}=t,c=t.extraField=new l,d=ei(new h(s));let u=0;try{for(;u{t.zip64=!0;const n=ei(e.data),i=Hn.filter((([e,n])=>t[e]==n));for(let r=0,a=0;r{const r=ei(e.data),a=Yn(r,4);n.assign(e,{vendorVersion:Yn(r,0),vendorId:Yn(r,2),strength:a,originalCompressionMethod:i,compressionMethod:Jn(r,5)}),t.compressionMethod=e.compressionMethod})(g,t,w),t.extraFieldAES=g):t.compressionMethod=w;const m=c.get(10);m&&(((e,t)=>{const i=ei(e.data);let r,a=4;try{for(;a{const i=ei(e.data),r=Yn(i,0),a=[],s=[];n?(1==(1&r)&&(a.push(xn),s.push(kn)),2==(2&r)&&(a.push(vn),s.push("rawLastAccessDate")),4==(4&r)&&(a.push(Sn),s.push("rawCreationDate"))):5>e.data.length||(a.push(xn),s.push(kn));let l=1;a.forEach(((n,r)=>{if(e.data.length>=l+4){const a=Qn(i,l);t[n]=e[n]=new o(1e3*a);const c=s[r];e[c]=a}l+=4}))})(y,t,a),t.extraFieldExtendedTimestamp=y);const x=c.get(6534);x&&(t.extraFieldUSDZ=x)}async function Kn(e,t,i,r,a){const s=ei(e.data),o=new ue;o.append(a[i]);const l=ei(new h(4));l.setUint32(0,o.get(),!0);const c=Qn(s,1);n.assign(e,{version:Yn(s,0),[t]:fn(e.data.subarray(5)),valid:!a.bitFlag.languageEncodingFlag&&c==Qn(l,0)}),e.valid&&(r[t]=e[t],r[t+"UTF8"]=!0)}function Gn(e,t,n){return t[n]===ee?e.options[n]:t[n]}function jn(e){const t=(4294901760&e)>>16,n=65535&e;try{return new o(1980+((65024&t)>>9),((480&t)>>5)-1,31&t,(63488&n)>>11,(2016&n)>>5,2*(31&n),0)}catch(e){}}function Xn(e){return new o(r(e/a(1e4)-a(116444736e5)))}function Yn(e,t){return e.getUint8(t)}function Jn(e,t){return e.getUint16(t,!0)}function Qn(e,t){return e.getUint32(t,!0)}function $n(e,t){return r(e.getBigUint64(t,!0))}function ei(e){return new p(e.buffer)}le({Inflate:function(e){const t=new j,n=e&&e.chunkSize?s.floor(2*e.chunkSize):131072,i=new h(n);let r=!1;t.inflateInit(),t.next_out=i,this.append=(e,a)=>{const s=[];let o,l,c=0,d=0,u=0;if(0!==e.length){t.next_in_index=0,t.next_in=e,t.avail_in=e.length;do{if(t.next_out_index=0,t.avail_out=n,0!==t.avail_in||r||(t.next_in_index=0,r=!0),o=t.inflate(0),r&&o===U){if(0!==t.avail_in)throw new f("inflating: bad input")}else if(0!==o&&1!==o)throw new f("inflating: "+t.msg);if((r||1===o)&&t.avail_in===e.length)throw new f("inflating: bad input");t.next_out_index&&(t.next_out_index===n?s.push(new h(i)):s.push(i.subarray(0,t.next_out_index))),u+=t.next_out_index,a&&t.next_in_index>0&&t.next_in_index!=c&&(a(t.next_in_index),c=t.next_in_index)}while(t.avail_in>0||0===t.avail_out);return s.length>1?(l=new h(u),s.forEach((e=>{l.set(e,d),d+=e.length}))):l=s[0]?new h(s[0]):new h,l}},this.flush=()=>{t.inflateEnd()}}}),e.BlobReader=Ht,e.BlobWriter=qt,e.Data64URIReader=class extends It{constructor(e){super();let t=e.length;for(;"="==e.charAt(t-1);)t--;const i=e.indexOf(",")+1;n.assign(this,{dataURI:e,dataStart:i,size:s.floor(.75*(t-i))})}readUint8Array(e,t){const{dataStart:n,dataURI:i}=this,r=new h(t),a=4*s.floor(e/3),o=atob(i.substring(a+n,4*s.ceil((e+t)/3)+n)),l=e-3*s.floor(a/4);for(let e=l;l+t>e;e++)r[e-l]=o.charCodeAt(e);return r}},e.Data64URIWriter=class extends Pt{constructor(e){super(),n.assign(this,{data:"data:"+(e||"")+";base64,",pending:[]})}writeUint8Array(e){const t=this;let n=0,r=t.pending;const a=t.pending.length;for(t.pending="",n=0;n<3*s.floor((a+e.length)/3)-a;n++)r+=i.fromCharCode(e[n]);for(;n2?t.data+=v(r):t.pending=r}getData(){return this.data+v(this.pending)}},e.ERR_BAD_FORMAT=Dn,e.ERR_CENTRAL_DIRECTORY_NOT_FOUND=Cn,e.ERR_ENCRYPTED=Wn,e.ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND=An,e.ERR_EOCDR_NOT_FOUND=En,e.ERR_EOCDR_ZIP64_NOT_FOUND=Tn,e.ERR_EXTRAFIELD_ZIP64_NOT_FOUND=Un,e.ERR_HTTP_RANGE=Ct,e.ERR_INVALID_PASSWORD=me,e.ERR_INVALID_SIGNATURE=ye,e.ERR_ITERATOR_COMPLETED_TOO_SOON=Ft,e.ERR_LOCAL_FILE_HEADER_NOT_FOUND=Fn,e.ERR_SPLIT_ZIP_FILE=Nn,e.ERR_UNSUPPORTED_COMPRESSION=On,e.ERR_UNSUPPORTED_ENCRYPTION=Ln,e.HttpRangeReader=class extends tn{constructor(e,t={}){t.useRangeHeader=!0,super(e,t)}},e.HttpReader=tn,e.Reader=It,e.SplitDataReader=nn,e.SplitDataWriter=rn,e.SplitZipReader=cn,e.SplitZipWriter=dn,e.TextReader=class extends Ht{constructor(e){super(new b([e],{type:"text/plain"}))}},e.TextWriter=class extends qt{constructor(e){super(e),n.assign(this,{encoding:e,utf8:!e||"utf-8"==e.toLowerCase()})}async getData(){const{encoding:e,utf8:t}=this,i=await super.getData();if(i.text&&t)return i.text();{const t=new FileReader;return new g(((r,a)=>{n.assign(t,{onload:({target:e})=>r(e.result),onerror:()=>a(t.error)}),t.readAsText(i,e)}))}}},e.Uint8ArrayReader=class extends It{constructor(e){super(),n.assign(this,{array:e,size:e.length})}readUint8Array(e,t){return this.array.slice(e,e+t)}},e.Uint8ArrayWriter=class extends Pt{init(e=0){n.assign(this,{offset:0,array:new h(e)}),super.init()}writeUint8Array(e){const t=this;if(t.offset+e.length>t.array.length){const n=t.array;t.array=new h(n.length+e.length),t.array.set(n)}t.array.set(e,t.offset),t.offset+=e.length}getData(){return this.array}},e.Writer=Pt,e.ZipReader=Bn,e.ZipReaderStream=class{constructor(e={}){const{readable:t,writable:n}=new S,i=new Bn(t,e).getEntriesGenerator();this.readable=new R({async pull(e){const{done:t,value:n}=await i.next();if(t)return e.close();const r={...n,readable:(()=>{const{readable:e,writable:t}=new S;if(n.getData)return n.getData(t),e})()};delete r.getData,e.enqueue(r)}}),this.writable=n}},e.configure=le,e.getMimeType=()=>"application/octet-stream",e.initReader=sn,e.initStream=an,e.initWriter=on,e.readUint8Array=ln,e.terminateWorkers=async()=>{await g.allSettled(zt.map((e=>(Tt(e),e.terminate()))))},n.defineProperty(e,"__esModule",{value:!0})})); diff --git a/demos/lib/zip-no-worker.min.js b/demos/lib/zip-no-worker.min.js index 08ad66cb..a963c002 100644 --- a/demos/lib/zip-no-worker.min.js +++ b/demos/lib/zip-no-worker.min.js @@ -1 +1 @@ -((e,t)=>{"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).zip={})})(this,(function(e){"use strict";const{Array:t,Object:n,String:i,Number:r,BigInt:a,Math:s,Date:o,Map:l,Set:c,Response:d,URL:u,Error:f,Uint8Array:_,Uint16Array:w,Uint32Array:p,DataView:h,Blob:b,Promise:g,TextEncoder:m,TextDecoder:x,document:y,crypto:k,btoa:S,TransformStream:z,ReadableStream:v,WritableStream:E,CompressionStream:D,DecompressionStream:R,navigator:F,Worker:T}="undefined"!=typeof globalThis?globalThis:this||self,A=-2;function C(e){return W(e.map((([e,n])=>new t(e).fill(n,0,e))))}function W(e){return e.reduce(((e,n)=>e.concat(t.isArray(n)?W(n):n)),[])}const N=[0,1,2,3].concat(...C([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function U(){const e=this;function t(e,t){let n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1}e.build_tree=n=>{const i=e.dyn_tree,r=e.stat_desc.static_tree,a=e.stat_desc.elems;let o,l,c,d=-1;for(n.heap_len=0,n.heap_max=573,o=0;a>o;o++)0!==i[2*o]?(n.heap[++n.heap_len]=d=o,n.depth[o]=0):i[2*o+1]=0;for(;2>n.heap_len;)c=n.heap[++n.heap_len]=2>d?++d:0,i[2*c]=1,n.depth[c]=0,n.opt_len--,r&&(n.static_len-=r[2*c+1]);for(e.max_code=d,o=s.floor(n.heap_len/2);o>=1;o--)n.pqdownheap(i,o);c=a;do{o=n.heap[1],n.heap[1]=n.heap[n.heap_len--],n.pqdownheap(i,1),l=n.heap[1],n.heap[--n.heap_max]=o,n.heap[--n.heap_max]=l,i[2*c]=i[2*o]+i[2*l],n.depth[c]=s.max(n.depth[o],n.depth[l])+1,i[2*o+1]=i[2*l+1]=c,n.heap[1]=c++,n.pqdownheap(i,1)}while(n.heap_len>=2);n.heap[--n.heap_max]=n.heap[1],(t=>{const n=e.dyn_tree,i=e.stat_desc.static_tree,r=e.stat_desc.extra_bits,a=e.stat_desc.extra_base,s=e.stat_desc.max_length;let o,l,c,d,u,f,_=0;for(d=0;15>=d;d++)t.bl_count[d]=0;for(n[2*t.heap[t.heap_max]+1]=0,o=t.heap_max+1;573>o;o++)l=t.heap[o],d=n[2*n[2*l+1]+1]+1,d>s&&(d=s,_++),n[2*l+1]=d,l>e.max_code||(t.bl_count[d]++,u=0,a>l||(u=r[l-a]),f=n[2*l],t.opt_len+=f*(d+u),i&&(t.static_len+=f*(i[2*l+1]+u)));if(0!==_){do{for(d=s-1;0===t.bl_count[d];)d--;t.bl_count[d]--,t.bl_count[d+1]+=2,t.bl_count[s]--,_-=2}while(_>0);for(d=s;0!==d;d--)for(l=t.bl_count[d];0!==l;)c=t.heap[--o],c>e.max_code||(n[2*c+1]!=d&&(t.opt_len+=(d-n[2*c+1])*n[2*c],n[2*c+1]=d),l--)}})(n),((e,n,i)=>{const r=[];let a,s,o,l=0;for(a=1;15>=a;a++)r[a]=l=l+i[a-1]<<1;for(s=0;n>=s;s++)o=e[2*s+1],0!==o&&(e[2*s]=t(r[o]++,o))})(i,e.max_code,n.bl_count)}}function I(e,t,n,i,r){const a=this;a.static_tree=e,a.extra_bits=t,a.extra_base=n,a.elems=i,a.max_length=r}U._length_code=[0,1,2,3,4,5,6,7].concat(...C([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]])),U.base_length=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0],U.base_dist=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576],U.d_code=e=>256>e?N[e]:N[256+(e>>>7)],U.extra_lbits=[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],U.extra_dbits=[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],U.extra_blbits=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],U.bl_order=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];const O=C([[144,8],[112,9],[24,7],[8,8]]);I.static_ltree=W([12,140,76,204,44,172,108,236,28,156,92,220,60,188,124,252,2,130,66,194,34,162,98,226,18,146,82,210,50,178,114,242,10,138,74,202,42,170,106,234,26,154,90,218,58,186,122,250,6,134,70,198,38,166,102,230,22,150,86,214,54,182,118,246,14,142,78,206,46,174,110,238,30,158,94,222,62,190,126,254,1,129,65,193,33,161,97,225,17,145,81,209,49,177,113,241,9,137,73,201,41,169,105,233,25,153,89,217,57,185,121,249,5,133,69,197,37,165,101,229,21,149,85,213,53,181,117,245,13,141,77,205,45,173,109,237,29,157,93,221,61,189,125,253,19,275,147,403,83,339,211,467,51,307,179,435,115,371,243,499,11,267,139,395,75,331,203,459,43,299,171,427,107,363,235,491,27,283,155,411,91,347,219,475,59,315,187,443,123,379,251,507,7,263,135,391,71,327,199,455,39,295,167,423,103,359,231,487,23,279,151,407,87,343,215,471,55,311,183,439,119,375,247,503,15,271,143,399,79,335,207,463,47,303,175,431,111,367,239,495,31,287,159,415,95,351,223,479,63,319,191,447,127,383,255,511,0,64,32,96,16,80,48,112,8,72,40,104,24,88,56,120,4,68,36,100,20,84,52,116,3,131,67,195,35,163,99,227].map(((e,t)=>[e,O[t]])));const L=C([[30,5]]);function M(e,t,n,i,r){const a=this;a.good_length=e,a.max_lazy=t,a.nice_length=n,a.max_chain=i,a.func=r}I.static_dtree=W([0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30,1,17,9,25,5,21,13,29,3,19,11,27,7,23].map(((e,t)=>[e,L[t]]))),I.static_l_desc=new I(I.static_ltree,U.extra_lbits,257,286,15),I.static_d_desc=new I(I.static_dtree,U.extra_dbits,0,30,15),I.static_bl_desc=new I(null,U.extra_blbits,0,19,7);const P=[new M(0,0,0,0,0),new M(4,4,8,4,1),new M(4,5,16,8,1),new M(4,6,32,32,1),new M(4,4,16,16,2),new M(8,16,32,32,2),new M(8,16,128,128,2),new M(8,32,128,256,2),new M(32,128,258,1024,2),new M(32,258,258,4096,2)],H=["need dictionary","stream end","","","stream error","data error","","buffer error","",""],B=113,q=666,V=262;function Z(e,t,n,i){const r=e[2*t],a=e[2*n];return a>r||r==a&&i[t]<=i[n]}function K(){const e=this;let t,n,i,r,a,o,l,c,d,u,f,p,h,b,g,m,x,y,k,S,z,v,E,D,R,F,T,C,W,N,O,L,M;const K=new U,Y=new U,G=new U;let X,j,J,Q,$,ee;function te(){let t;for(t=0;286>t;t++)O[2*t]=0;for(t=0;30>t;t++)L[2*t]=0;for(t=0;19>t;t++)M[2*t]=0;O[512]=1,e.opt_len=e.static_len=0,j=J=0}function ne(e,t){let n,i=-1,r=e[1],a=0,s=7,o=4;0===r&&(s=138,o=3),e[2*(t+1)+1]=65535;for(let l=0;t>=l;l++)n=r,r=e[2*(l+1)+1],++aa?M[2*n]+=a:0!==n?(n!=i&&M[2*n]++,M[32]++):a>10?M[36]++:M[34]++,a=0,i=n,0===r?(s=138,o=3):n==r?(s=6,o=3):(s=7,o=4))}function ie(t){e.pending_buf[e.pending++]=t}function re(e){ie(255&e),ie(e>>>8&255)}function ae(e,t){let n;const i=t;ee>16-i?(n=e,$|=n<>>16-ee,ee+=i-16):($|=e<=n;n++)if(i=a,a=e[2*(n+1)+1],++s>=o||i!=a){if(l>s)do{se(i,M)}while(0!=--s);else 0!==i?(i!=r&&(se(i,M),s--),se(16,M),ae(s-3,2)):s>10?(se(18,M),ae(s-11,7)):(se(17,M),ae(s-3,3));s=0,r=i,0===a?(o=138,l=3):i==a?(o=6,l=3):(o=7,l=4)}}function le(){16==ee?(re($),$=0,ee=0):8>ee||(ie(255&$),$>>>=8,ee-=8)}function ce(t,n){let i,r,a;if(e.dist_buf[j]=t,e.lc_buf[j]=255&n,j++,0===t?O[2*n]++:(J++,t--,O[2*(U._length_code[n]+256+1)]++,L[2*U.d_code(t)]++),0==(8191&j)&&T>2){for(i=8*j,r=z-x,a=0;30>a;a++)i+=L[2*a]*(5+U.extra_dbits[a]);if(i>>>=3,Jo);se(256,t),Q=t[513]}function ue(){ee>8?re($):ee>0&&ie(255&$),$=0,ee=0}function fe(t,n,i){ae(0+(i?1:0),3),((t,n)=>{ue(),Q=8,re(n),re(~n),e.pending_buf.set(c.subarray(t,t+n),e.pending),e.pending+=n})(t,n)}function _e(n){((t,n,i)=>{let r,a,s=0;T>0?(K.build_tree(e),Y.build_tree(e),s=(()=>{let t;for(ne(O,K.max_code),ne(L,Y.max_code),G.build_tree(e),t=18;t>=3&&0===M[2*U.bl_order[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t})(),r=e.opt_len+3+7>>>3,a=e.static_len+3+7>>>3,a>r||(r=a)):r=a=n+5,n+4>r||-1==t?a==r?(ae(2+(i?1:0),3),de(I.static_ltree,I.static_dtree)):(ae(4+(i?1:0),3),((e,t,n)=>{let i;for(ae(e-257,5),ae(t-1,5),ae(n-4,4),i=0;n>i;i++)ae(M[2*U.bl_order[i]+1],3);oe(O,e-1),oe(L,t-1)})(K.max_code+1,Y.max_code+1,s+1),de(O,L)):fe(t,n,i),te(),i&&ue()})(0>x?-1:x,z-x,n),x=z,t.flush_pending()}function we(){let e,n,i,r;do{if(r=d-E-z,0===r&&0===z&&0===E)r=a;else if(-1==r)r--;else if(z>=a+a-V){c.set(c.subarray(a,a+a),0),v-=a,z-=a,x-=a,e=h,i=e;do{n=65535&f[--i],f[i]=a>n?0:n-a}while(0!=--e);e=a,i=e;do{n=65535&u[--i],u[i]=a>n?0:n-a}while(0!=--e);r+=a}if(0===t.avail_in)return;e=t.read_buf(c,z+E,r),E+=e,3>E||(p=255&c[z],p=(p<E&&0!==t.avail_in)}function pe(e){let t,n,i=R,r=z,s=D;const o=z>a-V?z-(a-V):0;let d=N;const f=l,_=z+258;let w=c[r+s-1],p=c[r+s];W>D||(i>>=2),d>E&&(d=E);do{if(t=e,c[t+s]==p&&c[t+s-1]==w&&c[t]==c[r]&&c[++t]==c[r+1]){r+=2,t++;do{}while(c[++r]==c[++t]&&c[++r]==c[++t]&&c[++r]==c[++t]&&c[++r]==c[++t]&&c[++r]==c[++t]&&c[++r]==c[++t]&&c[++r]==c[++t]&&c[++r]==c[++t]&&_>r);if(n=258-(_-r),r=_-258,n>s){if(v=e,s=n,n>=d)break;w=c[r+s-1],p=c[r+s]}}}while((e=65535&u[e&f])>o&&0!=--i);return s>E?E:s}e.depth=[],e.bl_count=[],e.heap=[],O=[],L=[],M=[],e.pqdownheap=(t,n)=>{const i=e.heap,r=i[n];let a=n<<1;for(;a<=e.heap_len&&(a(U||(U=8),H||(H=8),q||(q=0),t.msg=null,-1==k&&(k=6),1>H||H>9||8!=U||9>v||v>15||0>k||k>9||0>q||q>2?A:(t.dstate=e,o=v,a=1<(t.total_in=t.total_out=0,t.msg=null,e.pending=0,e.pending_out=0,n=B,r=0,K.dyn_tree=O,K.stat_desc=I.static_l_desc,Y.dyn_tree=L,Y.stat_desc=I.static_d_desc,G.dyn_tree=M,G.stat_desc=I.static_bl_desc,$=0,ee=0,Q=8,te(),(()=>{d=2*a,f[h-1]=0;for(let e=0;h-1>e;e++)f[e]=0;F=P[T].max_lazy,W=P[T].good_length,N=P[T].nice_length,R=P[T].max_chain,z=0,x=0,E=0,y=D=2,S=0,p=0})(),0))(t))),e.deflateEnd=()=>42!=n&&n!=B&&n!=q?A:(e.lc_buf=null,e.dist_buf=null,e.pending_buf=null,f=null,u=null,c=null,e.dstate=null,n==B?-3:0),e.deflateParams=(e,t,n)=>{let i=0;return-1==t&&(t=6),0>t||t>9||0>n||n>2?A:(P[T].func!=P[t].func&&0!==e.total_in&&(i=e.deflate(1)),T!=t&&(T=t,F=P[T].max_lazy,W=P[T].good_length,N=P[T].nice_length,R=P[T].max_chain),C=n,i)},e.deflateSetDictionary=(e,t,i)=>{let r,s=i,o=0;if(!t||42!=n)return A;if(3>s)return 0;for(s>a-V&&(s=a-V,o=i-s),c.set(t.subarray(o,o+s),0),z=s,x=s,p=255&c[0],p=(p<=r;r++)p=(p<{let _,w,b,R,W;if(d>4||0>d)return A;if(!s.next_out||!s.next_in&&0!==s.avail_in||n==q&&4!=d)return s.msg=H[4],A;if(0===s.avail_out)return s.msg=H[7],-5;var N;if(t=s,R=r,r=d,42==n&&(w=8+(o-8<<4)<<8,b=(T-1&255)>>1,b>3&&(b=3),w|=b<<6,0!==z&&(w|=32),w+=31-w%31,n=B,ie((N=w)>>8&255),ie(255&N)),0!==e.pending){if(t.flush_pending(),0===t.avail_out)return r=-1,0}else if(0===t.avail_in&&R>=d&&4!=d)return t.msg=H[7],-5;if(n==q&&0!==t.avail_in)return s.msg=H[7],-5;if(0!==t.avail_in||0!==E||0!=d&&n!=q){switch(W=-1,P[T].func){case 0:W=(e=>{let n,r=65535;for(r>i-5&&(r=i-5);;){if(1>=E){if(we(),0===E&&0==e)return 0;if(0===E)break}if(z+=E,E=0,n=x+r,(0===z||z>=n)&&(E=z-n,z=n,_e(!1),0===t.avail_out))return 0;if(z-x>=a-V&&(_e(!1),0===t.avail_out))return 0}return _e(4==e),0===t.avail_out?4==e?2:0:4==e?3:1})(d);break;case 1:W=(e=>{let n,i=0;for(;;){if(V>E){if(we(),V>E&&0==e)return 0;if(0===E)break}if(3>E||(p=(p<a-V||2!=C&&(y=pe(i)),3>y)n=ce(0,255&c[z]),E--,z++;else if(n=ce(z-v,y-3),E-=y,y>F||3>E)z+=y,y=0,p=255&c[z],p=(p<{let n,i,r=0;for(;;){if(V>E){if(we(),V>E&&0==e)return 0;if(0===E)break}if(3>E||(p=(p<D&&a-V>=(z-r&65535)&&(2!=C&&(y=pe(r)),5>=y&&(1==C||3==y&&z-v>4096)&&(y=2)),3>D||y>D)if(0!==S){if(n=ce(0,255&c[z-1]),n&&_e(!1),z++,E--,0===t.avail_out)return 0}else S=1,z++,E--;else{i=z+E-3,n=ce(z-1-k,D-3),E-=D-1,D-=2;do{++z>i||(p=(p<1+Q+10-ee&&(ae(2,3),se(256,I.static_ltree),le()),Q=7;else if(fe(0,0,!1),3==d)for(_=0;h>_;_++)f[_]=0;if(t.flush_pending(),0===t.avail_out)return r=-1,0}}return 4!=d?0:1}}function Y(){const e=this;e.next_in_index=0,e.next_out_index=0,e.avail_in=0,e.total_in=0,e.avail_out=0,e.total_out=0}Y.prototype={deflateInit(e,t){const n=this;return n.dstate=new K,t||(t=15),n.dstate.deflateInit(n,e,t)},deflate(e){const t=this;return t.dstate?t.dstate.deflate(t,e):A},deflateEnd(){const e=this;if(!e.dstate)return A;const t=e.dstate.deflateEnd();return e.dstate=null,t},deflateParams(e,t){const n=this;return n.dstate?n.dstate.deflateParams(n,e,t):A},deflateSetDictionary(e,t){const n=this;return n.dstate?n.dstate.deflateSetDictionary(n,e,t):A},read_buf(e,t,n){const i=this;let r=i.avail_in;return r>n&&(r=n),0===r?0:(i.avail_in-=r,e.set(i.next_in.subarray(i.next_in_index,i.next_in_index+r),t),i.next_in_index+=r,i.total_in+=r,r)},flush_pending(){const e=this;let t=e.dstate.pending;t>e.avail_out&&(t=e.avail_out),0!==t&&(e.next_out.set(e.dstate.pending_buf.subarray(e.dstate.pending_out,e.dstate.pending_out+t),e.next_out_index),e.next_out_index+=t,e.dstate.pending_out+=t,e.total_out+=t,e.avail_out-=t,e.dstate.pending-=t,0===e.dstate.pending&&(e.dstate.pending_out=0))}};const G=-2,X=-3,j=-5,J=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],Q=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],$=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],ee=[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,0,0],te=[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,112,112],ne=[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],ie=[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];function re(){let e,t,n,i,r,a;function s(e,t,s,o,l,c,d,u,f,_,w){let p,h,b,g,m,x,y,k,S,z,v,E,D,R,F;z=0,m=s;do{n[e[t+z]]++,z++,m--}while(0!==m);if(n[0]==s)return d[0]=-1,u[0]=0,0;for(k=u[0],x=1;15>=x&&0===n[x];x++);for(y=x,x>k&&(k=x),m=15;0!==m&&0===n[m];m--);for(b=m,k>m&&(k=m),u[0]=k,R=1<x;x++,R<<=1)if(0>(R-=n[x]))return X;if(0>(R-=n[m]))return X;for(n[m]+=R,a[1]=x=0,z=1,D=2;0!=--m;)a[D]=x+=n[z],D++,z++;m=0,z=0;do{0!==(x=e[t+z])&&(w[a[x]++]=m),z++}while(++m=y;y++)for(p=n[y];0!=p--;){for(;y>E+k;){if(g++,E+=k,F=b-E,F=F>k?k:F,(h=1<<(x=y-E))>p+1&&(h-=p+1,D=y,F>x))for(;++xn[++D];)h-=n[D];if(F=1<1440)return X;r[g]=v=_[0],_[0]+=F,0!==g?(a[g]=m,i[0]=x,i[1]=k,x=m>>>E-k,i[2]=v-r[g-1]-x,f.set(i,3*(r[g-1]+x))):d[0]=v}for(i[1]=y-E,s>z?w[z]w[z]?0:96,i[2]=w[z++]):(i[0]=c[w[z]-o]+16+64,i[2]=l[w[z++]-o]):i[0]=192,h=1<>>E;F>x;x+=h)f.set(i,3*(v+x));for(x=1<>>=1)m^=x;for(m^=x,S=(1<o;o++)t[o]=0;for(o=0;16>o;o++)n[o]=0;for(o=0;3>o;o++)i[o]=0;r.set(n.subarray(0,15),0),a.set(n.subarray(0,16),0)}this.inflate_trees_bits=(n,i,r,a,l)=>{let c;return o(19),e[0]=0,c=s(n,0,19,19,null,null,r,i,a,e,t),c==X?l.msg="oversubscribed dynamic bit lengths tree":c!=j&&0!==i[0]||(l.msg="incomplete dynamic bit lengths tree",c=X),c},this.inflate_trees_dynamic=(n,i,r,a,l,c,d,u,f)=>{let _;return o(288),e[0]=0,_=s(r,0,n,257,ee,te,c,a,u,e,t),0!=_||0===a[0]?(_==X?f.msg="oversubscribed literal/length tree":-4!=_&&(f.msg="incomplete literal/length tree",_=X),_):(o(288),_=s(r,n,i,0,ne,ie,d,l,u,e,t),0!=_||0===l[0]&&n>257?(_==X?f.msg="oversubscribed distance tree":_==j?(f.msg="incomplete distance tree",_=X):-4!=_&&(f.msg="empty distance tree with lengths",_=X),_):0)}}function ae(){const e=this;let t,n,i,r,a=0,s=0,o=0,l=0,c=0,d=0,u=0,f=0,_=0,w=0;function p(e,t,n,i,r,a,s,o){let l,c,d,u,f,_,w,p,h,b,g,m,x,y,k,S;w=o.next_in_index,p=o.avail_in,f=s.bitb,_=s.bitk,h=s.write,b=h_;)p--,f|=(255&o.read_byte(w++))<<_,_+=8;if(l=f&g,c=n,d=i,S=3*(d+l),0!==(u=c[S]))for(;;){if(f>>=c[S+1],_-=c[S+1],0!=(16&u)){for(u&=15,x=c[S+2]+(f&J[u]),f>>=u,_-=u;15>_;)p--,f|=(255&o.read_byte(w++))<<_,_+=8;for(l=f&m,c=r,d=a,S=3*(d+l),u=c[S];;){if(f>>=c[S+1],_-=c[S+1],0!=(16&u)){for(u&=15;u>_;)p--,f|=(255&o.read_byte(w++))<<_,_+=8;if(y=c[S+2]+(f&J[u]),f>>=u,_-=u,b-=x,y>h){k=h-y;do{k+=s.end}while(0>k);if(u=s.end-k,x>u){if(x-=u,h-k>0&&u>h-k)do{s.win[h++]=s.win[k++]}while(0!=--u);else s.win.set(s.win.subarray(k,k+u),h),h+=u,k+=u,u=0;k=0}}else k=h-y,h-k>0&&2>h-k?(s.win[h++]=s.win[k++],s.win[h++]=s.win[k++],x-=2):(s.win.set(s.win.subarray(k,k+2),h),h+=2,k+=2,x-=2);if(h-k>0&&x>h-k)do{s.win[h++]=s.win[k++]}while(0!=--x);else s.win.set(s.win.subarray(k,k+x),h),h+=x,k+=x,x=0;break}if(0!=(64&u))return o.msg="invalid distance code",x=o.avail_in-p,x=x>_>>3?_>>3:x,p+=x,w-=x,_-=x<<3,s.bitb=f,s.bitk=_,o.avail_in=p,o.total_in+=w-o.next_in_index,o.next_in_index=w,s.write=h,X;l+=c[S+2],l+=f&J[u],S=3*(d+l),u=c[S]}break}if(0!=(64&u))return 0!=(32&u)?(x=o.avail_in-p,x=x>_>>3?_>>3:x,p+=x,w-=x,_-=x<<3,s.bitb=f,s.bitk=_,o.avail_in=p,o.total_in+=w-o.next_in_index,o.next_in_index=w,s.write=h,1):(o.msg="invalid literal/length code",x=o.avail_in-p,x=x>_>>3?_>>3:x,p+=x,w-=x,_-=x<<3,s.bitb=f,s.bitk=_,o.avail_in=p,o.total_in+=w-o.next_in_index,o.next_in_index=w,s.write=h,X);if(l+=c[S+2],l+=f&J[u],S=3*(d+l),0===(u=c[S])){f>>=c[S+1],_-=c[S+1],s.win[h++]=c[S+2],b--;break}}else f>>=c[S+1],_-=c[S+1],s.win[h++]=c[S+2],b--}while(b>=258&&p>=10);return x=o.avail_in-p,x=x>_>>3?_>>3:x,p+=x,w-=x,_-=x<<3,s.bitb=f,s.bitk=_,o.avail_in=p,o.total_in+=w-o.next_in_index,o.next_in_index=w,s.write=h,0}e.init=(e,a,s,o,l,c)=>{t=0,u=e,f=a,i=s,_=o,r=l,w=c,n=null},e.proc=(e,h,b)=>{let g,m,x,y,k,S,z,v=0,E=0,D=0;for(D=h.next_in_index,y=h.avail_in,v=e.bitb,E=e.bitk,k=e.write,S=k=258&&y>=10&&(e.bitb=v,e.bitk=E,h.avail_in=y,h.total_in+=D-h.next_in_index,h.next_in_index=D,e.write=k,b=p(u,f,i,_,r,w,e,h),D=h.next_in_index,y=h.avail_in,v=e.bitb,E=e.bitk,k=e.write,S=kE;){if(0===y)return e.bitb=v,e.bitk=E,h.avail_in=y,h.total_in+=D-h.next_in_index,h.next_in_index=D,e.write=k,e.inflate_flush(h,b);b=0,y--,v|=(255&h.read_byte(D++))<>>=n[m+1],E-=n[m+1],x=n[m],0===x){l=n[m+2],t=6;break}if(0!=(16&x)){c=15&x,a=n[m+2],t=2;break}if(0==(64&x)){o=x,s=m/3+n[m+2];break}if(0!=(32&x)){t=7;break}return t=9,h.msg="invalid literal/length code",b=X,e.bitb=v,e.bitk=E,h.avail_in=y,h.total_in+=D-h.next_in_index,h.next_in_index=D,e.write=k,e.inflate_flush(h,b);case 2:for(g=c;g>E;){if(0===y)return e.bitb=v,e.bitk=E,h.avail_in=y,h.total_in+=D-h.next_in_index,h.next_in_index=D,e.write=k,e.inflate_flush(h,b);b=0,y--,v|=(255&h.read_byte(D++))<>=g,E-=g,o=f,n=r,s=w,t=3;case 3:for(g=o;g>E;){if(0===y)return e.bitb=v,e.bitk=E,h.avail_in=y,h.total_in+=D-h.next_in_index,h.next_in_index=D,e.write=k,e.inflate_flush(h,b);b=0,y--,v|=(255&h.read_byte(D++))<>=n[m+1],E-=n[m+1],x=n[m],0!=(16&x)){c=15&x,d=n[m+2],t=4;break}if(0==(64&x)){o=x,s=m/3+n[m+2];break}return t=9,h.msg="invalid distance code",b=X,e.bitb=v,e.bitk=E,h.avail_in=y,h.total_in+=D-h.next_in_index,h.next_in_index=D,e.write=k,e.inflate_flush(h,b);case 4:for(g=c;g>E;){if(0===y)return e.bitb=v,e.bitk=E,h.avail_in=y,h.total_in+=D-h.next_in_index,h.next_in_index=D,e.write=k,e.inflate_flush(h,b);b=0,y--,v|=(255&h.read_byte(D++))<>=g,E-=g,t=5;case 5:for(z=k-d;0>z;)z+=e.end;for(;0!==a;){if(0===S&&(k==e.end&&0!==e.read&&(k=0,S=k7&&(E-=8,y++,D--),e.write=k,b=e.inflate_flush(h,b),k=e.write,S=k{}}re.inflate_trees_fixed=(e,t,n,i)=>(e[0]=9,t[0]=5,n[0]=Q,i[0]=$,0);const se=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function oe(e,t){const n=this;let i,r=0,a=0,s=0,o=0;const l=[0],c=[0],d=new ae;let u=0,f=new Int32Array(4320);const w=new re;n.bitk=0,n.bitb=0,n.win=new _(t),n.end=t,n.read=0,n.write=0,n.reset=(e,t)=>{t&&(t[0]=0),6==r&&d.free(e),r=0,n.bitk=0,n.bitb=0,n.read=n.write=0},n.reset(e,null),n.inflate_flush=(e,t)=>{let i,r,a;return r=e.next_out_index,a=n.read,i=(a>n.write?n.end:n.write)-a,i>e.avail_out&&(i=e.avail_out),0!==i&&t==j&&(t=0),e.avail_out-=i,e.total_out+=i,e.next_out.set(n.win.subarray(a,a+i),r),r+=i,a+=i,a==n.end&&(a=0,n.write==n.end&&(n.write=0),i=n.write-a,i>e.avail_out&&(i=e.avail_out),0!==i&&t==j&&(t=0),e.avail_out-=i,e.total_out+=i,e.next_out.set(n.win.subarray(a,a+i),r),r+=i,a+=i),e.next_out_index=r,n.read=a,t},n.proc=(e,t)=>{let _,p,h,b,g,m,x,y;for(b=e.next_in_index,g=e.avail_in,p=n.bitb,h=n.bitk,m=n.write,x=mh;){if(0===g)return n.bitb=p,n.bitk=h,e.avail_in=g,e.total_in+=b-e.next_in_index,e.next_in_index=b,n.write=m,n.inflate_flush(e,t);t=0,g--,p|=(255&e.read_byte(b++))<>>1){case 0:p>>>=3,h-=3,_=7&h,p>>>=_,h-=_,r=1;break;case 1:k=[],S=[],z=[[]],v=[[]],re.inflate_trees_fixed(k,S,z,v),d.init(k[0],S[0],z[0],0,v[0],0),p>>>=3,h-=3,r=6;break;case 2:p>>>=3,h-=3,r=3;break;case 3:return p>>>=3,h-=3,r=9,e.msg="invalid block type",t=X,n.bitb=p,n.bitk=h,e.avail_in=g,e.total_in+=b-e.next_in_index,e.next_in_index=b,n.write=m,n.inflate_flush(e,t)}break;case 1:for(;32>h;){if(0===g)return n.bitb=p,n.bitk=h,e.avail_in=g,e.total_in+=b-e.next_in_index,e.next_in_index=b,n.write=m,n.inflate_flush(e,t);t=0,g--,p|=(255&e.read_byte(b++))<>>16&65535)!=(65535&p))return r=9,e.msg="invalid stored block lengths",t=X,n.bitb=p,n.bitk=h,e.avail_in=g,e.total_in+=b-e.next_in_index,e.next_in_index=b,n.write=m,n.inflate_flush(e,t);a=65535&p,p=h=0,r=0!==a?2:0!==u?7:0;break;case 2:if(0===g)return n.bitb=p,n.bitk=h,e.avail_in=g,e.total_in+=b-e.next_in_index,e.next_in_index=b,n.write=m,n.inflate_flush(e,t);if(0===x&&(m==n.end&&0!==n.read&&(m=0,x=mg&&(_=g),_>x&&(_=x),n.win.set(e.read_buf(b,_),m),b+=_,g-=_,m+=_,x-=_,0!=(a-=_))break;r=0!==u?7:0;break;case 3:for(;14>h;){if(0===g)return n.bitb=p,n.bitk=h,e.avail_in=g,e.total_in+=b-e.next_in_index,e.next_in_index=b,n.write=m,n.inflate_flush(e,t);t=0,g--,p|=(255&e.read_byte(b++))<29||(_>>5&31)>29)return r=9,e.msg="too many length or distance symbols",t=X,n.bitb=p,n.bitk=h,e.avail_in=g,e.total_in+=b-e.next_in_index,e.next_in_index=b,n.write=m,n.inflate_flush(e,t);if(_=258+(31&_)+(_>>5&31),!i||i.length<_)i=[];else for(y=0;_>y;y++)i[y]=0;p>>>=14,h-=14,o=0,r=4;case 4:for(;4+(s>>>10)>o;){for(;3>h;){if(0===g)return n.bitb=p,n.bitk=h,e.avail_in=g,e.total_in+=b-e.next_in_index,e.next_in_index=b,n.write=m,n.inflate_flush(e,t);t=0,g--,p|=(255&e.read_byte(b++))<>>=3,h-=3}for(;19>o;)i[se[o++]]=0;if(l[0]=7,_=w.inflate_trees_bits(i,l,c,f,e),0!=_)return(t=_)==X&&(i=null,r=9),n.bitb=p,n.bitk=h,e.avail_in=g,e.total_in+=b-e.next_in_index,e.next_in_index=b,n.write=m,n.inflate_flush(e,t);o=0,r=5;case 5:for(;_=s,258+(31&_)+(_>>5&31)>o;){let a,d;for(_=l[0];_>h;){if(0===g)return n.bitb=p,n.bitk=h,e.avail_in=g,e.total_in+=b-e.next_in_index,e.next_in_index=b,n.write=m,n.inflate_flush(e,t);t=0,g--,p|=(255&e.read_byte(b++))<d)p>>>=_,h-=_,i[o++]=d;else{for(y=18==d?7:d-14,a=18==d?11:3;_+y>h;){if(0===g)return n.bitb=p,n.bitk=h,e.avail_in=g,e.total_in+=b-e.next_in_index,e.next_in_index=b,n.write=m,n.inflate_flush(e,t);t=0,g--,p|=(255&e.read_byte(b++))<>>=_,h-=_,a+=p&J[y],p>>>=y,h-=y,y=o,_=s,y+a>258+(31&_)+(_>>5&31)||16==d&&1>y)return i=null,r=9,e.msg="invalid bit length repeat",t=X,n.bitb=p,n.bitk=h,e.avail_in=g,e.total_in+=b-e.next_in_index,e.next_in_index=b,n.write=m,n.inflate_flush(e,t);d=16==d?i[y-1]:0;do{i[y++]=d}while(0!=--a);o=y}}if(c[0]=-1,E=[],D=[],R=[],F=[],E[0]=9,D[0]=6,_=s,_=w.inflate_trees_dynamic(257+(31&_),1+(_>>5&31),i,E,D,R,F,f,e),0!=_)return _==X&&(i=null,r=9),t=_,n.bitb=p,n.bitk=h,e.avail_in=g,e.total_in+=b-e.next_in_index,e.next_in_index=b,n.write=m,n.inflate_flush(e,t);d.init(E[0],D[0],f,R[0],f,F[0]),r=6;case 6:if(n.bitb=p,n.bitk=h,e.avail_in=g,e.total_in+=b-e.next_in_index,e.next_in_index=b,n.write=m,1!=(t=d.proc(n,e,t)))return n.inflate_flush(e,t);if(t=0,d.free(e),b=e.next_in_index,g=e.avail_in,p=n.bitb,h=n.bitk,m=n.write,x=m{n.reset(e,null),n.win=null,f=null},n.set_dictionary=(e,t,i)=>{n.win.set(e.subarray(t,t+i),0),n.read=n.write=i},n.sync_point=()=>1==r?1:0}const le=13,ce=[0,0,255,255];function de(){const e=this;function t(e){return e&&e.istate?(e.total_in=e.total_out=0,e.msg=null,e.istate.mode=7,e.istate.blocks.reset(e,null),0):G}e.mode=0,e.method=0,e.was=[0],e.need=0,e.marker=0,e.wbits=0,e.inflateEnd=t=>(e.blocks&&e.blocks.free(t),e.blocks=null,0),e.inflateInit=(n,i)=>(n.msg=null,e.blocks=null,8>i||i>15?(e.inflateEnd(n),G):(e.wbits=i,n.istate.blocks=new oe(n,1<{let n,i;if(!e||!e.istate||!e.next_in)return G;const r=e.istate;for(t=4==t?j:0,n=j;;)switch(r.mode){case 0:if(0===e.avail_in)return n;if(n=t,e.avail_in--,e.total_in++,8!=(15&(r.method=e.read_byte(e.next_in_index++)))){r.mode=le,e.msg="unknown compression method",r.marker=5;break}if(8+(r.method>>4)>r.wbits){r.mode=le,e.msg="invalid win size",r.marker=5;break}r.mode=1;case 1:if(0===e.avail_in)return n;if(n=t,e.avail_in--,e.total_in++,i=255&e.read_byte(e.next_in_index++),((r.method<<8)+i)%31!=0){r.mode=le,e.msg="incorrect header check",r.marker=5;break}if(0==(32&i)){r.mode=7;break}r.mode=2;case 2:if(0===e.avail_in)return n;n=t,e.avail_in--,e.total_in++,r.need=(255&e.read_byte(e.next_in_index++))<<24&4278190080,r.mode=3;case 3:if(0===e.avail_in)return n;n=t,e.avail_in--,e.total_in++,r.need+=(255&e.read_byte(e.next_in_index++))<<16&16711680,r.mode=4;case 4:if(0===e.avail_in)return n;n=t,e.avail_in--,e.total_in++,r.need+=(255&e.read_byte(e.next_in_index++))<<8&65280,r.mode=5;case 5:return 0===e.avail_in?n:(n=t,e.avail_in--,e.total_in++,r.need+=255&e.read_byte(e.next_in_index++),r.mode=6,2);case 6:return r.mode=le,e.msg="need dictionary",r.marker=0,G;case 7:if(n=r.blocks.proc(e,n),n==X){r.mode=le,r.marker=0;break}if(0==n&&(n=t),1!=n)return n;n=t,r.blocks.reset(e,r.was),r.mode=12;case 12:return e.avail_in=0,1;case le:return X;default:return G}},e.inflateSetDictionary=(e,t,n)=>{let i=0,r=n;if(!e||!e.istate||6!=e.istate.mode)return G;const a=e.istate;return r<1<{let n,i,r,a,s;if(!e||!e.istate)return G;const o=e.istate;if(o.mode!=le&&(o.mode=le,o.marker=0),0===(n=e.avail_in))return j;for(i=e.next_in_index,r=o.marker;0!==n&&4>r;)e.read_byte(i)==ce[r]?r++:r=0!==e.read_byte(i)?0:4-r,i++,n--;return e.total_in+=i-e.next_in_index,e.next_in_index=i,e.avail_in=n,o.marker=r,4!=r?X:(a=e.total_in,s=e.total_out,t(e),e.total_in=a,e.total_out=s,o.mode=7,0)},e.inflateSyncPoint=e=>e&&e.istate&&e.istate.blocks?e.istate.blocks.sync_point():G}function ue(){}ue.prototype={inflateInit(e){const t=this;return t.istate=new de,e||(e=15),t.istate.inflateInit(t,e)},inflate(e){const t=this;return t.istate?t.istate.inflate(t,e):G},inflateEnd(){const e=this;if(!e.istate)return G;const t=e.istate.inflateEnd(e);return e.istate=null,t},inflateSync(){const e=this;return e.istate?e.istate.inflateSync(e):G},inflateSetDictionary(e,t){const n=this;return n.istate?n.istate.inflateSetDictionary(n,e,t):G},read_byte(e){return this.next_in[e]},read_buf(e,t){return this.next_in.subarray(e,e+t)}};const fe=4294967295,_e=65535,we=67324752,pe=134695760,he=33639248,be=101075792,ge=117853008,me=22,xe=21589,ye=2048,ke="/",Se=new o(2107,11,31),ze=new o(1980,0,1),ve=void 0,Ee="undefined",De="function";class Re{constructor(e){return class extends z{constructor(t,n){const i=new e(n);super({transform(e,t){t.enqueue(i.append(e))},flush(e){const t=i.flush();t&&e.enqueue(t)}})}}}}let Fe=2;try{typeof F!=Ee&&F.hardwareConcurrency&&(Fe=F.hardwareConcurrency)}catch(e){}const Te={chunkSize:524288,maxWorkers:Fe,terminateWorkerTimeout:5e3,useWebWorkers:!0,useCompressionStream:!0,workerScripts:ve,CompressionStreamNative:typeof D!=Ee&&D,DecompressionStreamNative:typeof R!=Ee&&R},Ae=n.assign({},Te);function Ce(){return Ae}function We(e){return s.max(e.chunkSize,64)}function Ne(e){const{baseURL:n,chunkSize:i,maxWorkers:r,terminateWorkerTimeout:a,useCompressionStream:s,useWebWorkers:o,Deflate:l,Inflate:c,CompressionStream:d,DecompressionStream:u,workerScripts:_}=e;if(Ue("baseURL",n),Ue("chunkSize",i),Ue("maxWorkers",r),Ue("terminateWorkerTimeout",a),Ue("useCompressionStream",s),Ue("useWebWorkers",o),l&&(Ae.CompressionStream=new Re(l)),c&&(Ae.DecompressionStream=new Re(c)),Ue("CompressionStream",d),Ue("DecompressionStream",u),_!==ve){const{deflate:e,inflate:n}=_;if((e||n)&&(Ae.workerScripts||(Ae.workerScripts={})),e){if(!t.isArray(e))throw new f("workerScripts.deflate must be an array");Ae.workerScripts.deflate=e}if(n){if(!t.isArray(n))throw new f("workerScripts.inflate must be an array");Ae.workerScripts.inflate=n}}}function Ue(e,t){t!==ve&&(Ae[e]=t)}const Ie=[];for(let e=0;256>e;e++){let t=e;for(let e=0;8>e;e++)1&t?t=t>>>1^3988292384:t>>>=1;Ie[e]=t}class Oe{constructor(e){this.crc=e||-1}append(e){let t=0|this.crc;for(let n=0,i=0|e.length;i>n;n++)t=t>>>8^Ie[255&(t^e[n])];this.crc=t}get(){return~this.crc}}class Le extends z{constructor(){let e;const t=new Oe;super({transform(e,n){t.append(e),n.enqueue(e)},flush(){const n=new _(4);new h(n.buffer).setUint32(0,t.get()),e.value=n}}),e=this}}function Me(e){if(typeof m==Ee){const t=new _((e=unescape(encodeURIComponent(e))).length);for(let n=0;n0&&t&&(e[n-1]=Pe.partial(t,e[n-1]&2147483648>>t-1,1)),e},partial:(e,t,n)=>32===e?t:(n?0|t:t<<32-e)+1099511627776*e,getPartial:e=>s.round(e/1099511627776)||32,_shiftRight(e,t,n,i){for(void 0===i&&(i=[]);t>=32;t-=32)i.push(n),n=0;if(0===t)return i.concat(e);for(let r=0;r>>t),n=e[r]<<32-t;const r=e.length?e[e.length-1]:0,a=Pe.getPartial(r);return i.push(Pe.partial(t+a&31,t+a>32?n:i.pop(),1)),i}},He={bytes:{fromBits(e){const t=Pe.bitLength(e)/8,n=new _(t);let i;for(let r=0;t>r;r++)0==(3&r)&&(i=e[r/4]),n[r]=i>>>24,i<<=8;return n},toBits(e){const t=[];let n,i=0;for(n=0;n9007199254740991)throw new f("Cannot hash more than 2^53 - 1 bits");const a=new p(n);let s=0;for(let e=t.blockSize+i-(t.blockSize+i&t.blockSize-1);r>=e;e+=t.blockSize)t._block(a.subarray(16*s,16*(s+1))),s+=1;return n.splice(0,16*s),t}finalize(){const e=this;let t=e._buffer;const n=e._h;t=Pe.concat(t,[Pe.partial(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(s.floor(e._length/4294967296)),t.push(0|e._length);t.length;)e._block(t.splice(0,16));return e.reset(),n}_f(e,t,n,i){return e>19?e>39?e>59?e>79?void 0:t^n^i:t&n|t&i|n&i:t^n^i:t&n|~t&i}_S(e,t){return t<>>32-e}_block(e){const n=this,i=n._h,r=t(80);for(let t=0;16>t;t++)r[t]=e[t];let a=i[0],o=i[1],l=i[2],c=i[3],d=i[4];for(let e=0;79>=e;e++){16>e||(r[e]=n._S(1,r[e-3]^r[e-8]^r[e-14]^r[e-16]));const t=n._S(5,a)+n._f(e,o,l,c)+d+r[e]+n._key[s.floor(e/20)]|0;d=c,c=l,l=n._S(30,o),o=a,a=t}i[0]=i[0]+a|0,i[1]=i[1]+o|0,i[2]=i[2]+l|0,i[3]=i[3]+c|0,i[4]=i[4]+d|0}},qe={getRandomValues(e){const t=new p(e.buffer),n=e=>{let t=987654321;const n=4294967295;return()=>(t=36969*(65535&t)+(t>>16)&n,(((t<<16)+(e=18e3*(65535&e)+(e>>16)&n)&n)/4294967296+.5)*(s.random()>.5?1:-1))};for(let i,r=0;rnew Ve.hmacSha1(He.bytes.toBits(e)),pbkdf2(e,t,n,i){if(n=n||1e4,0>i||0>n)throw new f("invalid params to pbkdf2");const r=1+(i>>5)<<2;let a,s,o,l,c;const d=new ArrayBuffer(r),u=new h(d);let _=0;const w=Pe;for(t=He.bytes.toBits(t),c=1;(r||1)>_;c++){for(a=s=e.encrypt(w.concat(t,[c])),o=1;n>o;o++)for(s=e.encrypt(s),l=0;l_&&or&&(e=(new n).update(e).finalize());for(let t=0;r>t;t++)i[0][t]=909522486^e[t],i[1][t]=1549556828^e[t];t._baseHash[0].update(i[0]),t._baseHash[1].update(i[1]),t._resultHash=new n(t._baseHash[0])}reset(){const e=this;e._resultHash=new e._hash(e._baseHash[0]),e._updated=!1}update(e){this._updated=!0,this._resultHash.update(e)}digest(){const e=this,t=e._resultHash.finalize(),n=new e._hash(e._baseHash[1]).update(t).finalize();return e.reset(),n}encrypt(e){if(this._updated)throw new f("encrypt on already updated hmac called!");return this.update(e),this.digest(e)}}},Ze=typeof k!=Ee&&typeof k.getRandomValues==De,Ke="Invalid password",Ye="Invalid signature",Ge="zipjs-abort-check-password";function Xe(e){return Ze?k.getRandomValues(e):qe.getRandomValues(e)}const je=16,Je={name:"PBKDF2"},Qe=n.assign({hash:{name:"HMAC"}},Je),$e=n.assign({iterations:1e3,hash:{name:"SHA-1"}},Je),et=["deriveBits"],tt=[8,12,16],nt=[16,24,32],it=10,rt=[0,0,0,0],at=typeof k!=Ee,st=at&&k.subtle,ot=at&&typeof st!=Ee,lt=He.bytes,ct=class{constructor(e){const t=this;t._tables=[[[],[],[],[],[]],[[],[],[],[],[]]],t._tables[0][0][0]||t._precompute();const n=t._tables[0][4],i=t._tables[1],r=e.length;let a,s,o,l=1;if(4!==r&&6!==r&&8!==r)throw new f("invalid aes key size");for(t._key=[s=e.slice(0),o=[]],a=r;4*r+28>a;a++){let e=s[a-1];(a%r==0||8===r&&a%r==4)&&(e=n[e>>>24]<<24^n[e>>16&255]<<16^n[e>>8&255]<<8^n[255&e],a%r==0&&(e=e<<8^e>>>24^l<<24,l=l<<1^283*(l>>7))),s[a]=s[a-r]^e}for(let e=0;a;e++,a--){const t=s[3&e?a:a-4];o[e]=4>=a||4>e?t:i[0][n[t>>>24]]^i[1][n[t>>16&255]]^i[2][n[t>>8&255]]^i[3][n[255&t]]}}encrypt(e){return this._crypt(e,0)}decrypt(e){return this._crypt(e,1)}_precompute(){const e=this._tables[0],t=this._tables[1],n=e[4],i=t[4],r=[],a=[];let s,o,l,c;for(let e=0;256>e;e++)a[(r[e]=e<<1^283*(e>>7))^e]=e;for(let d=s=0;!n[d];d^=o||1,s=a[s]||1){let a=s^s<<1^s<<2^s<<3^s<<4;a=a>>8^255&a^99,n[d]=a,i[a]=d,c=r[l=r[o=r[d]]];let u=16843009*c^65537*l^257*o^16843008*d,f=257*r[a]^16843008*a;for(let n=0;4>n;n++)e[n][d]=f=f<<24^f>>>8,t[n][a]=u=u<<24^u>>>8}for(let n=0;5>n;n++)e[n]=e[n].slice(0),t[n]=t[n].slice(0)}_crypt(e,t){if(4!==e.length)throw new f("invalid aes block size");const n=this._key[t],i=n.length/4-2,r=[0,0,0,0],a=this._tables[t],s=a[0],o=a[1],l=a[2],c=a[3],d=a[4];let u,_,w,p=e[0]^n[0],h=e[t?3:1]^n[1],b=e[2]^n[2],g=e[t?1:3]^n[3],m=4;for(let e=0;i>e;e++)u=s[p>>>24]^o[h>>16&255]^l[b>>8&255]^c[255&g]^n[m],_=s[h>>>24]^o[b>>16&255]^l[g>>8&255]^c[255&p]^n[m+1],w=s[b>>>24]^o[g>>16&255]^l[p>>8&255]^c[255&h]^n[m+2],g=s[g>>>24]^o[p>>16&255]^l[h>>8&255]^c[255&b]^n[m+3],m+=4,p=u,h=_,b=w;for(let e=0;4>e;e++)r[t?3&-e:e]=d[p>>>24]<<24^d[h>>16&255]<<16^d[b>>8&255]<<8^d[255&g]^n[m++],u=p,p=h,h=b,b=g,g=u;return r}},dt=class{constructor(e,t){this._prf=e,this._initIv=t,this._iv=t}reset(){this._iv=this._initIv}update(e){return this.calculate(this._prf,e,this._iv)}incWord(e){if(255==(e>>24&255)){let t=e>>16&255,n=e>>8&255,i=255&e;255===t?(t=0,255===n?(n=0,255===i?i=0:++i):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=i}else e+=1<<24;return e}incCounter(e){0===(e[0]=this.incWord(e[0]))&&(e[1]=this.incWord(e[1]))}calculate(e,t,n){let i;if(!(i=t.length))return[];const r=Pe.bitLength(t);for(let r=0;i>r;r+=4){this.incCounter(n);const i=e.encrypt(n);t[r]^=i[0],t[r+1]^=i[1],t[r+2]^=i[2],t[r+3]^=i[3]}return Pe.clamp(t,r)}},ut=Ve.hmacSha1;let ft=at&&ot&&typeof st.importKey==De,_t=at&&ot&&typeof st.deriveBits==De;class wt extends z{constructor({password:e,rawPassword:t,signed:i,encryptionStrength:r,checkPasswordOnly:a}){super({start(){n.assign(this,{ready:new g((e=>this.resolveReady=e)),password:gt(e,t),signed:i,strength:r-1,pending:new _})},async transform(e,t){const n=this,{password:i,strength:r,resolveReady:s,ready:o}=n;i?(await(async(e,t,n,i)=>{const r=await bt(e,t,n,xt(i,0,tt[t])),a=xt(i,tt[t]);if(r[0]!=a[0]||r[1]!=a[1])throw new f(Ke)})(n,r,i,xt(e,0,tt[r]+2)),e=xt(e,tt[r]+2),a?t.error(new f(Ge)):s()):await o;const l=new _(e.length-it-(e.length-it)%je);t.enqueue(ht(n,e,l,0,it,!0))},async flush(e){const{signed:t,ctr:n,hmac:i,pending:r,ready:a}=this;if(i&&n){await a;const s=xt(r,0,r.length-it),o=xt(r,r.length-it);let l=new _;if(s.length){const e=kt(lt,s);i.update(e);const t=n.update(e);l=yt(lt,t)}if(t){const e=xt(yt(lt,i.digest()),0,it);for(let t=0;it>t;t++)if(e[t]!=o[t])throw new f(Ye)}e.enqueue(l)}}})}}class pt extends z{constructor({password:e,rawPassword:t,encryptionStrength:i}){let r;super({start(){n.assign(this,{ready:new g((e=>this.resolveReady=e)),password:gt(e,t),strength:i-1,pending:new _})},async transform(e,t){const n=this,{password:i,strength:r,resolveReady:a,ready:s}=n;let o=new _;i?(o=await(async(e,t,n)=>{const i=Xe(new _(tt[t]));return mt(i,await bt(e,t,n,i))})(n,r,i),a()):await s;const l=new _(o.length+e.length-e.length%je);l.set(o,0),t.enqueue(ht(n,e,l,o.length,0))},async flush(e){const{ctr:t,hmac:n,pending:i,ready:a}=this;if(n&&t){await a;let s=new _;if(i.length){const e=t.update(kt(lt,i));n.update(e),s=yt(lt,e)}r.signature=yt(lt,n.digest()).slice(0,it),e.enqueue(mt(s,r.signature))}}}),r=this}}function ht(e,t,n,i,r,a){const{ctr:s,hmac:o,pending:l}=e,c=t.length-r;let d;for(l.length&&(t=mt(l,t),n=((e,t)=>{if(t&&t>e.length){const n=e;(e=new _(t)).set(n,0)}return e})(n,c-c%je)),d=0;c-je>=d;d+=je){const e=kt(lt,xt(t,d,d+je));a&&o.update(e);const r=s.update(e);a||o.update(r),n.set(yt(lt,r),d+i)}return e.pending=xt(t,d),n}async function bt(e,i,r,a){e.password=null;const s=await(async(e,t,n,i,r)=>{if(!ft)return Ve.importKey(t);try{return await st.importKey("raw",t,n,!1,r)}catch(e){return ft=!1,Ve.importKey(t)}})(0,r,Qe,0,et),o=await(async(e,t,n)=>{if(!_t)return Ve.pbkdf2(t,e.salt,$e.iterations,n);try{return await st.deriveBits(e,t,n)}catch(i){return _t=!1,Ve.pbkdf2(t,e.salt,$e.iterations,n)}})(n.assign({salt:a},$e),s,8*(2*nt[i]+2)),l=new _(o),c=kt(lt,xt(l,0,nt[i])),d=kt(lt,xt(l,nt[i],2*nt[i])),u=xt(l,2*nt[i]);return n.assign(e,{keys:{key:c,authentication:d,passwordVerification:u},ctr:new dt(new ct(c),t.from(rt)),hmac:new ut(d)}),u}function gt(e,t){return t===ve?Me(e):t}function mt(e,t){let n=e;return e.length+t.length&&(n=new _(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function xt(e,t,n){return e.subarray(t,n)}function yt(e,t){return e.fromBits(t)}function kt(e,t){return e.toBits(t)}class St extends z{constructor({password:e,passwordVerification:t,checkPasswordOnly:i}){super({start(){n.assign(this,{password:e,passwordVerification:t}),Dt(this,e)},transform(e,t){const n=this;if(n.password){const t=vt(n,e.subarray(0,12));if(n.password=null,t[11]!=n.passwordVerification)throw new f(Ke);e=e.subarray(12)}i?t.error(new f(Ge)):t.enqueue(vt(n,e))}})}}class zt extends z{constructor({password:e,passwordVerification:t}){super({start(){n.assign(this,{password:e,passwordVerification:t}),Dt(this,e)},transform(e,t){const n=this;let i,r;if(n.password){n.password=null;const t=Xe(new _(12));t[11]=n.passwordVerification,i=new _(e.length+t.length),i.set(Et(n,t),0),r=12}else i=new _(e.length),r=0;i.set(Et(n,e),r),t.enqueue(i)}})}}function vt(e,t){const n=new _(t.length);for(let i=0;i>>24]),r=~e.crcKey2.get(),e.keys=[n,i,r]}function Ft(e){const t=2|e.keys[2];return Tt(s.imul(t,1^t)>>>8)}function Tt(e){return 255&e}function At(e){return 4294967295&e}const Ct="deflate-raw";class Wt extends z{constructor(e,{chunkSize:t,CompressionStream:n,CompressionStreamNative:i}){super({});const{compressed:r,encrypted:a,useCompressionStream:s,zipCrypto:o,signed:l,level:c}=e,d=this;let u,f,_=Ut(super.readable);a&&!o||!l||(u=new Le,_=Lt(_,u)),r&&(_=Ot(_,s,{level:c,chunkSize:t},i,n)),a&&(o?_=Lt(_,new zt(e)):(f=new pt(e),_=Lt(_,f))),It(d,_,(()=>{let e;a&&!o&&(e=f.signature),a&&!o||!l||(e=new h(u.value.buffer).getUint32(0)),d.signature=e}))}}class Nt extends z{constructor(e,{chunkSize:t,DecompressionStream:n,DecompressionStreamNative:i}){super({});const{zipCrypto:r,encrypted:a,signed:s,signature:o,compressed:l,useCompressionStream:c}=e;let d,u,_=Ut(super.readable);a&&(r?_=Lt(_,new St(e)):(u=new wt(e),_=Lt(_,u))),l&&(_=Ot(_,c,{chunkSize:t},i,n)),a&&!r||!s||(d=new Le,_=Lt(_,d)),It(this,_,(()=>{if((!a||r)&&s){const e=new h(d.value.buffer);if(o!=e.getUint32(0,!1))throw new f(Ye)}}))}}function Ut(e){return Lt(e,new z({transform(e,t){e&&e.length&&t.enqueue(e)}}))}function It(e,t,i){t=Lt(t,new z({flush:i})),n.defineProperty(e,"readable",{get:()=>t})}function Ot(e,t,n,i,r){try{e=Lt(e,new(t&&i?i:r)(Ct,n))}catch(i){if(!t)return e;try{e=Lt(e,new r(Ct,n))}catch(t){return e}}return e}function Lt(e,t){return e.pipeThrough(t)}const Mt="data",Pt="close",Ht="deflate",Bt="inflate";class qt extends z{constructor(e,t){super({});const i=this,{codecType:r}=e;let a;r.startsWith(Ht)?a=Wt:r.startsWith(Bt)&&(a=Nt);let s=0,o=0;const l=new a(e,t),c=super.readable,d=new z({transform(e,t){e&&e.length&&(o+=e.length,t.enqueue(e))},flush(){n.assign(i,{inputSize:o})}}),u=new z({transform(e,t){e&&e.length&&(s+=e.length,t.enqueue(e))},flush(){const{signature:e}=l;n.assign(i,{signature:e,outputSize:s,inputSize:o})}});n.defineProperty(i,"readable",{get:()=>c.pipeThrough(d).pipeThrough(l).pipeThrough(u)})}}class Vt extends z{constructor(e){let t;super({transform:function n(i,r){if(t){const e=new _(t.length+i.length);e.set(t),e.set(i,t.length),i=e,t=null}i.length>e?(r.enqueue(i.slice(0,e)),n(i.slice(e),r)):t=i},flush(e){t&&t.length&&e.enqueue(t)}})}}let Zt=typeof T!=Ee;class Kt{constructor(e,{readable:t,writable:i},{options:r,config:a,streamOptions:s,useWebWorkers:o,transferStreams:l,scripts:c},d){const{signal:u}=s;return n.assign(e,{busy:!0,readable:t.pipeThrough(new Vt(a.chunkSize)).pipeThrough(new Yt(t,s),{signal:u}),writable:i,options:n.assign({},r),scripts:c,transferStreams:l,terminate:()=>new g((t=>{const{worker:n,busy:i}=e;n?(i?e.resolveTerminated=t:(n.terminate(),t()),e.interface=null):t()})),onTaskFinished(){const{resolveTerminated:t}=e;t&&(e.resolveTerminated=null,e.terminated=!0,e.worker.terminate(),t()),e.busy=!1,d(e)}}),(o&&Zt?jt:Xt)(e,a)}}class Yt extends z{constructor(e,{onstart:t,onprogress:n,size:i,onend:r}){let a=0;super({async start(){t&&await Gt(t,i)},async transform(e,t){a+=e.length,n&&await Gt(n,a,i),t.enqueue(e)},async flush(){e.size=a,r&&await Gt(r,a)}})}}async function Gt(e,...t){try{await e(...t)}catch(e){}}function Xt(e,t){return{run:()=>(async({options:e,readable:t,writable:n,onTaskFinished:i},r)=>{try{const a=new qt(e,r);await t.pipeThrough(a).pipeTo(n,{preventClose:!0,preventAbort:!0});const{signature:s,inputSize:o,outputSize:l}=a;return{signature:s,inputSize:o,outputSize:l}}finally{i()}})(e,t)}}function jt(e,t){const{baseURL:i,chunkSize:r}=t;if(!e.interface){let a;try{a=((e,t,i)=>{const r={type:"module"};let a,s;typeof e==De&&(e=e());try{a=new u(e,t)}catch(t){a=e}if(Jt)try{s=new T(a)}catch(e){Jt=!1,s=new T(a,r)}else s=new T(a,r);return s.addEventListener("message",(e=>(async({data:e},t)=>{const{type:i,value:r,messageId:a,result:s,error:o}=e,{reader:l,writer:c,resolveResult:d,rejectResult:u,onTaskFinished:w}=t;try{if(o){const{message:e,stack:t,code:i,name:r}=o,a=new f(e);n.assign(a,{stack:t,code:i,name:r}),p(a)}else{if("pull"==i){const{value:e,done:n}=await l.read();$t({type:Mt,value:e,done:n,messageId:a},t)}i==Mt&&(await c.ready,await c.write(new _(r)),$t({type:"ack",messageId:a},t)),i==Pt&&p(null,s)}}catch(o){$t({type:Pt,messageId:a},t),p(o)}function p(e,t){e?u(e):d(t),c&&c.releaseLock(),w()}})(e,i))),s})(e.scripts[0],i,e)}catch(n){return Zt=!1,Xt(e,t)}n.assign(e,{worker:a,interface:{run:()=>(async(e,t)=>{let i,r;const a=new g(((e,t)=>{i=e,r=t}));n.assign(e,{reader:null,writer:null,resolveResult:i,rejectResult:r,result:a});const{readable:s,options:o,scripts:l}=e,{writable:c,closed:d}=(e=>{let t;const n=new g((e=>t=e));return{writable:new E({async write(t){const n=e.getWriter();await n.ready,await n.write(t),n.releaseLock()},close(){t()},abort:t=>e.getWriter().abort(t)}),closed:n}})(e.writable),u=$t({type:"start",scripts:l.slice(1),options:o,config:t,readable:s,writable:c},e);u||n.assign(e,{reader:s.getReader(),writer:c.getWriter()});const f=await a;return u||await c.getWriter().close(),await d,f})(e,{chunkSize:r})}})}return e.interface}let Jt=!0,Qt=!0;function $t(e,{worker:t,writer:n,onTaskFinished:i,transferStreams:r}){try{let{value:n,readable:i,writable:a}=e;const s=[];if(n&&(n.byteLength{const n=en.find((e=>!e.busy));if(n)return an(n),new Kt(n,e,t,p);if(en.length<_){const n={indexWorker:nn};return nn++,en.push(n),new Kt(n,e,t,p)}return new g((n=>tn.push({resolve:n,stream:e,workerOptions:t})))})()).run();function p(e){if(tn.length){const[{resolve:t,stream:n,workerOptions:i}]=tn.splice(0,1);t(new Kt(e,n,i,p))}else e.worker?(an(e),((e,t)=>{const{config:n}=t,{terminateWorkerTimeout:i}=n;r.isFinite(i)&&i>=0&&(e.terminated?e.terminated=!1:e.terminateTimeout=setTimeout((async()=>{en=en.filter((t=>t!=e));try{await e.terminate()}catch(e){}}),i))})(e,t)):en=en.filter((t=>t!=e))}}function an(e){const{terminateTimeout:t}=e;t&&(clearTimeout(t),e.terminateTimeout=null)}const sn="HTTP error ",on="HTTP Range not supported",ln="Writer iterator completed too soon",cn="GET",dn="bytes",un=65536,fn="writable";class _n{constructor(){this.size=0}init(){this.initialized=!0}}class wn extends _n{get readable(){const e=this,{chunkSize:t=un}=e,n=new v({start(){this.chunkOffset=0},async pull(i){const{offset:r=0,size:a,diskNumberStart:o}=n,{chunkOffset:l}=this;i.enqueue(await On(e,r+l,s.min(t,a-l),o)),l+t>a?i.close():this.chunkOffset+=t}});return n}}class pn extends _n{constructor(){super();const e=this,t=new E({write:t=>e.writeUint8Array(t)});n.defineProperty(e,fn,{get:()=>t})}writeUint8Array(){}}class hn extends wn{constructor(e){super(),n.assign(this,{blob:e,size:e.size})}async readUint8Array(e,t){const n=this,i=e+t,r=e||it&&(a=a.slice(e,i)),new _(a)}}class bn extends _n{constructor(e){super();const t=new z,i=[];e&&i.push(["Content-Type",e]),n.defineProperty(this,fn,{get:()=>t.writable}),this.blob=new d(t.readable,{headers:i}).blob()}getData(){return this.blob}}class gn extends wn{constructor(e,t){super(),xn(this,e,t)}async init(){await yn(this,Fn,vn),super.init()}readUint8Array(e,t){return kn(this,e,t,Fn,vn)}}class mn extends wn{constructor(e,t){super(),xn(this,e,t)}async init(){await yn(this,Tn,En),super.init()}readUint8Array(e,t){return kn(this,e,t,Tn,En)}}function xn(e,t,i){const{preventHeadRequest:r,useRangeHeader:a,forceRangeRequests:s}=i;delete(i=n.assign({},i)).preventHeadRequest,delete i.useRangeHeader,delete i.forceRangeRequests,delete i.useXHR,n.assign(e,{url:t,options:i,preventHeadRequest:r,useRangeHeader:a,forceRangeRequests:s})}async function yn(e,t,n){const{url:i,useRangeHeader:a,forceRangeRequests:s}=e;if((e=>{const{baseURL:t}=Ce(),{protocol:n}=new u(e,t);return"http:"==n||"https:"==n})(i)&&(a||s)){const{headers:i}=await t(cn,e,Sn(e));if(!s&&i.get("Accept-Ranges")!=dn)throw new f(on);{let a;const s=i.get("Content-Range");if(s){const e=s.trim().split(/\s*\/\s*/);if(e.length){const t=e[1];t&&"*"!=t&&(a=r(t))}}a===ve?await Rn(e,t,n):e.size=a}}else await Rn(e,t,n)}async function kn(e,t,n,i,r){const{useRangeHeader:a,forceRangeRequests:s,options:o}=e;if(a||s){const r=await i(cn,e,Sn(e,t,n));if(206!=r.status)throw new f(on);return new _(await r.arrayBuffer())}{const{data:i}=e;return i||await r(e,o),new _(e.data.subarray(t,t+n))}}function Sn(e,t=0,i=1){return n.assign({},zn(e),{Range:dn+"="+t+"-"+(t+i-1)})}function zn({options:e}){const{headers:t}=e;if(t)return Symbol.iterator in t?n.fromEntries(t):t}async function vn(e){await Dn(e,Fn)}async function En(e){await Dn(e,Tn)}async function Dn(e,t){const n=await t(cn,e,zn(e));e.data=new _(await n.arrayBuffer()),e.size||(e.size=e.data.length)}async function Rn(e,t,n){if(e.preventHeadRequest)await n(e,e.options);else{const i=(await t("HEAD",e,zn(e))).headers.get("Content-Length");i?e.size=r(i):await n(e,e.options)}}async function Fn(e,{options:t,url:i},r){const a=await fetch(i,n.assign({},t,{method:e,headers:r}));if(400>a.status)return a;throw 416==a.status?new f(on):new f(sn+(a.statusText||a.status))}function Tn(e,{url:t},i){return new g(((r,a)=>{const s=new XMLHttpRequest;if(s.addEventListener("load",(()=>{if(400>s.status){const e=[];s.getAllResponseHeaders().trim().split(/[\r\n]+/).forEach((t=>{const n=t.trim().split(/\s*:\s*/);n[0]=n[0].trim().replace(/^[a-z]|-[a-z]/g,(e=>e.toUpperCase())),e.push(n)})),r({status:s.status,arrayBuffer:()=>s.response,headers:new l(e)})}else a(416==s.status?new f(on):new f(sn+(s.statusText||s.status)))}),!1),s.addEventListener("error",(e=>a(e.detail?e.detail.error:new f("Network error"))),!1),s.open(e,t),i)for(const e of n.entries(i))s.setRequestHeader(e[0],e[1]);s.responseType="arraybuffer",s.send()}))}class An extends wn{constructor(e,t={}){super(),n.assign(this,{url:e,reader:t.useXHR?new mn(e,t):new gn(e,t)})}set size(e){}get size(){return this.reader.size}async init(){await this.reader.init(),super.init()}readUint8Array(e,t){return this.reader.readUint8Array(e,t)}}class Cn extends wn{constructor(e){super(),this.readers=e}async init(){const e=this,{readers:t}=e;e.lastDiskNumber=0,e.lastDiskOffset=0,await g.all(t.map((async(n,i)=>{await n.init(),i!=t.length-1&&(e.lastDiskOffset+=n.size),e.size+=n.size}))),super.init()}async readUint8Array(e,t,n=0){const i=this,{readers:r}=this;let a,o=n;-1==o&&(o=r.length-1);let l=e;for(;l>=r[o].size;)l-=r[o].size,o++;const c=r[o],d=c.size;if(l+t>d){const r=d-l;a=new _(t),a.set(await On(c,l,r)),a.set(await i.readUint8Array(e+r,t-r,n),r)}else a=await On(c,l,t);return i.lastDiskNumber=s.max(o,i.lastDiskNumber),a}}class Wn extends _n{constructor(e,t=4294967295){super();const i=this;let r,a,s;n.assign(i,{diskNumber:0,diskOffset:0,size:0,maxSize:t,availableSize:t});const o=new E({async write(t){const{availableSize:n}=i;if(s)t.lengtho})}}async function Nn(e,t){if(!e.init||e.initialized)return g.resolve();await e.init(t)}function Un(e){return t.isArray(e)&&(e=new Cn(e)),e instanceof v&&(e={readable:e}),e}function In(e){e.writable===ve&&typeof e.next==De&&(e=new Wn(e)),e instanceof E&&(e={writable:e});const{writable:t}=e;return t.size===ve&&(t.size=0),e instanceof Wn||n.assign(e,{diskNumber:0,diskOffset:0,availableSize:1/0,maxSize:1/0}),e}function On(e,t,n,i){return e.readUint8Array(t,n,i)}const Ln=Cn,Mn=Wn,Pn="\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ ".split("");function Hn(e,t){return t&&"cp437"==t.trim().toLowerCase()?(e=>{{let t="";for(let n=0;nthis[t]=e[t]))}}const si="File format is not recognized",oi="End of central directory not found",li="End of Zip64 central directory not found",ci="End of Zip64 central directory locator not found",di="Central directory header not found",ui="Local file header not found",fi="Zip64 extra field not found",_i="File contains encrypted entry",wi="Encryption method not supported",pi="Compression method not supported",hi="Split zip file",bi="utf-8",gi="cp437",mi=[[Kn,fe],[Yn,fe],[Gn,fe],[Xn,_e]],xi={[_e]:{getValue:Ai,bytes:4},[fe]:{getValue:Ci,bytes:8}};class yi{constructor(e,t={}){n.assign(this,{reader:Un(e),options:t,config:Ce()})}async*getEntriesGenerator(e={}){const t=this;let{reader:i}=t;const{config:r}=t;if(await Nn(i),i.size!==ve&&i.readUint8Array||(i=new hn(await new d(i.readable).blob()),await Nn(i)),i.size{const i=new _(4);return Wi(i).setUint32(0,101010256,!0),await r(22)||await r(s.min(1048582,n));async function r(t){const r=n-t,a=await On(e,r,t);for(let e=a.length-22;e>=0;e--)if(a[e]==i[0]&&a[e+1]==i[1]&&a[e+2]==i[2]&&a[e+3]==i[3])return{offset:r+e,buffer:a.slice(e,e+22).buffer}}})(i,0,i.size);if(!a)throw Ai(Wi(await On(i,0,4)))==pe?new f(hi):new f(oi);const o=Wi(a);let l=Ai(o,12),c=Ai(o,16);const u=a.offset,w=Ti(o,20),p=u+me+w;let h=Ti(o,4);const b=i.lastDiskNumber||0;let m=Ti(o,6),x=Ti(o,8),y=0,k=0;if(c==fe||l==fe||x==_e||m==_e){const e=Wi(await On(i,a.offset-20,20));if(Ai(e,0)!=ge)throw new f(li);c=Ci(e,8);let t=await On(i,c,56,-1),n=Wi(t);const r=a.offset-20-56;if(Ai(n,0)!=be&&c!=r){const e=c;c=r,y=c-e,t=await On(i,c,56,-1),n=Wi(t)}if(Ai(n,0)!=be)throw new f(ci);h==_e&&(h=Ai(n,16)),m==_e&&(m=Ai(n,20)),x==_e&&(x=Ci(n,32)),l==fe&&(l=Ci(n,40)),c-=l}if(cc)throw new f(si);let S=0,z=await On(i,c,l,m),v=Wi(z);if(l){const e=a.offset-l;if(Ai(v,S)!=he&&c!=e){const t=c;c=e,y+=c-t,z=await On(i,c,l,m),v=Wi(z)}}const E=a.offset-c-(i.lastDiskOffset||0);if(l==E||0>E||(l=E,z=await On(i,c,l,m),v=Wi(z)),0>c||c>=i.size)throw new f(si);const D=Ei(t,e,"filenameEncoding"),R=Ei(t,e,"commentEncoding");for(let a=0;x>a;a++){const o=new ki(i,r,t.options);if(Ai(v,S)!=he)throw new f(di);Si(o,v,S+6);const l=!!o.bitFlag.languageEncodingFlag,c=S+46,d=c+o.filenameLength,u=d+o.extraFieldLength,_=Ti(v,S+4),w=0==(0&_),p=z.subarray(c,d),h=Ti(v,S+32),b=u+h,m=z.subarray(u,b),E=l,F=l,T=w&&16==(16&Fi(v,S+38)),A=Ai(v,S+42)+y;n.assign(o,{versionMadeBy:_,msDosCompatible:w,compressedSize:0,uncompressedSize:0,commentLength:h,directory:T,offset:A,diskNumberStart:Ti(v,S+34),internalFileAttribute:Ti(v,S+36),externalFileAttribute:Ai(v,S+38),rawFilename:p,filenameUTF8:E,commentUTF8:F,rawExtraField:z.subarray(d,u)});const[C,W]=await g.all([Hn(p,E?bi:D||gi),Hn(m,F?bi:R||gi)]);n.assign(o,{rawComment:m,filename:C,comment:W,directory:T||C.endsWith(ke)}),k=s.max(A,k),await zi(o,o,v,S+6);const N=new ai(o);N.getData=(e,t)=>o.getData(e,N,t),S=b;const{onprogress:U}=e;if(U)try{await U(a+1,x,new ai(o))}catch(e){}yield N}const F=Ei(t,e,"extractPrependedData"),T=Ei(t,e,"extractAppendedData");return F&&(t.prependedData=k>0?await On(i,0,k):new _),t.comment=w?await On(i,u+me,w):new _,T&&(t.appendedData=p>>8&255:w>>>24&255),signature:w,compressed:0!=c,encrypted:k,useWebWorkers:Ei(r,i,"useWebWorkers"),useCompressionStream:Ei(r,i,"useCompressionStream"),transferStreams:Ei(r,i,"transferStreams"),checkPasswordOnly:F},config:d,streamOptions:{signal:R,size:v,onstart:A,onprogress:C,onend:W}};let U=0;try{({outputSize:U}=await rn({readable:D,writable:T},N))}catch(e){if(!F||e.message!=Ge)throw e}finally{const e=Ei(r,i,"preventClose");T.size+=U,e||T.locked||await T.getWriter().close()}return F?ve:e.getData?e.getData():T}}function Si(e,t,i){const r=e.rawBitFlag=Ti(t,i+2),a=1==(1&r),s=Ai(t,i+6);n.assign(e,{encrypted:a,version:Ti(t,i),bitFlag:{level:(6&r)>>1,dataDescriptor:8==(8&r),languageEncodingFlag:(r&ye)==ye},rawLastModDate:s,lastModDate:Di(s),filenameLength:Ti(t,i+22),extraFieldLength:Ti(t,i+24)})}async function zi(e,t,i,r,a){const{rawExtraField:s}=t,c=t.extraField=new l,d=Wi(new _(s));let u=0;try{for(;u{t.zip64=!0;const n=Wi(e.data),i=mi.filter((([e,n])=>t[e]==n));for(let r=0,a=0;r{const r=Wi(e.data),a=Fi(r,4);n.assign(e,{vendorVersion:Fi(r,0),vendorId:Fi(r,2),strength:a,originalCompressionMethod:i,compressionMethod:Ti(r,5)}),t.compressionMethod=e.compressionMethod})(g,t,w),t.extraFieldAES=g):t.compressionMethod=w;const m=c.get(10);m&&(((e,t)=>{const i=Wi(e.data);let r,a=4;try{for(;a{const i=Wi(e.data),r=Fi(i,0),a=[],s=[];n?(1==(1&r)&&(a.push(jn),s.push(Jn)),2==(2&r)&&(a.push(Qn),s.push("rawLastAccessDate")),4==(4&r)&&(a.push($n),s.push("rawCreationDate"))):5>e.data.length||(a.push(jn),s.push(Jn));let l=1;a.forEach(((n,r)=>{if(e.data.length>=l+4){const a=Ai(i,l);t[n]=e[n]=new o(1e3*a);const c=s[r];e[c]=a}l+=4}))})(x,t,a),t.extraFieldExtendedTimestamp=x);const y=c.get(6534);y&&(t.extraFieldUSDZ=y)}async function vi(e,t,i,r,a){const s=Wi(e.data),o=new Oe;o.append(a[i]);const l=Wi(new _(4));l.setUint32(0,o.get(),!0);const c=Ai(s,1);n.assign(e,{version:Fi(s,0),[t]:Hn(e.data.subarray(5)),valid:!a.bitFlag.languageEncodingFlag&&c==Ai(l,0)}),e.valid&&(r[t]=e[t],r[t+"UTF8"]=!0)}function Ei(e,t,n){return t[n]===ve?e.options[n]:t[n]}function Di(e){const t=(4294901760&e)>>16,n=65535&e;try{return new o(1980+((65024&t)>>9),((480&t)>>5)-1,31&t,(63488&n)>>11,(2016&n)>>5,2*(31&n),0)}catch(e){}}function Ri(e){return new o(r(e/a(1e4)-a(116444736e5)))}function Fi(e,t){return e.getUint8(t)}function Ti(e,t){return e.getUint16(t,!0)}function Ai(e,t){return e.getUint32(t,!0)}function Ci(e,t){return r(e.getBigUint64(t,!0))}function Wi(e){return new h(e.buffer)}const Ni="File already exists",Ui="Zip file comment exceeds 64KB",Ii="File entry comment exceeds 64KB",Oi="File entry name exceeds 64KB",Li="Version exceeds 65535",Mi="The strength must equal 1, 2, or 3",Pi="Extra field type exceeds 65535",Hi="Extra field data exceeds 64KB",Bi="Zip64 is not supported (make sure 'keepOrder' is set to 'true')",qi=new _([7,0,2,0,65,69,3,0,0]);let Vi=0;const Zi=[];class Ki{constructor(e,t={}){const i=(e=In(e)).availableSize!==ve&&e.availableSize>0&&e.availableSize!==1/0&&e.maxSize!==ve&&e.maxSize>0&&e.maxSize!==1/0;n.assign(this,{writer:e,addSplitZipSignature:i,options:t,config:Ce(),files:new l,filenames:new c,offset:e.writable.size,pendingEntriesSize:0,pendingAddFileCalls:new c,bufferedWrites:0})}async add(e="",i,r={}){const l=this,{pendingAddFileCalls:c,config:u}=l;let b;ViZi.push(e)));try{if(e=e.trim(),l.filenames.has(e))throw new f(Ni);return l.filenames.add(e),b=(async(e,i,r,l)=>{i=i.trim(),l.directory&&!i.endsWith(ke)?i+=ke:l.directory=i.endsWith(ke);const c=Me(i);if(nr(c)>_e)throw new f(Oi);const u=l.comment||"",b=Me(u);if(nr(b)>_e)throw new f(Ii);const m=Xi(e,l,"version",20);if(m>_e)throw new f(Li);const x=Xi(e,l,"versionMadeBy",20);if(x>_e)throw new f(Li);const y=Xi(e,l,jn,new o),k=Xi(e,l,Qn),S=Xi(e,l,$n),v=Xi(e,l,ni,!0),E=Xi(e,l,ei,0),D=Xi(e,l,ti,0),R=Xi(e,l,"password"),F=Xi(e,l,"rawPassword"),T=Xi(e,l,"encryptionStrength",3),A=Xi(e,l,"zipCrypto"),C=Xi(e,l,"extendedTimestamp",!0),W=Xi(e,l,"keepOrder",!0),N=Xi(e,l,"level"),U=Xi(e,l,"useWebWorkers"),I=Xi(e,l,"bufferedWrite"),O=Xi(e,l,"dataDescriptorSignature",!1),L=Xi(e,l,"signal"),M=Xi(e,l,"useCompressionStream");let P=Xi(e,l,"dataDescriptor",!0),H=Xi(e,l,ii);if(R!==ve&&T!==ve&&(1>T||T>3))throw new f(Mi);let B=new _;const{extraField:q}=l;if(q){let e=0,t=0;q.forEach((t=>e+=4+nr(t))),B=new _(e),q.forEach(((e,n)=>{if(n>_e)throw new f(Pi);if(nr(e)>_e)throw new f(Hi);er(B,new w([n]),t),er(B,new w([nr(e)]),t+2),er(B,e,t+4),t+=4+nr(e)}))}let V=0,Z=0,K=0;const Y=!0===H;r&&(r=Un(r),await Nn(r),r.size===ve?(P=!0,(H||H===ve)&&(H=!0,K=V=fe)):(K=r.size,V=(e=>e+5*(s.floor(e/16383)+1))(K)));const{diskOffset:G,diskNumber:X,maxSize:j}=e.writer,J=Y||K>=fe,Q=Y||V>=fe,$=Y||e.offset+e.pendingEntriesSize-G>=fe,ee=Xi(e,l,"supportZip64SplitFile",!0)&&Y||X+s.ceil(e.pendingEntriesSize/j)>=_e;if($||J||Q||ee){if(!1===H||!W)throw new f(Bi);H=!0}H=H||!1;const te=(e=>{const{rawFilename:t,lastModDate:n,lastAccessDate:i,creationDate:r,rawPassword:a,password:o,level:l,zip64:c,zipCrypto:d,dataDescriptor:u,directory:f,rawExtraField:w,encryptionStrength:h,extendedTimestamp:b}=e,g=0!==l&&!f,m=!!(o&&nr(o)||a&&nr(a));let x,y,k,S,z=e.version;if(m&&!d){x=new _(nr(qi)+2);const e=tr(x);Ji(e,0,39169),er(x,qi,2),ji(e,8,h)}else x=new _;if(b){k=new _(9+(i?4:0)+(r?4:0));const e=tr(k);Ji(e,0,xe),Ji(e,2,nr(k)-4),S=1+(i?2:0)+(r?4:0),ji(e,4,S);let t=5;Qi(e,t,s.floor(n.getTime()/1e3)),t+=4,i&&(Qi(e,t,s.floor(i.getTime()/1e3)),t+=4),r&&Qi(e,t,s.floor(r.getTime()/1e3));try{y=new _(36);const e=tr(y),t=Gi(n);Ji(e,0,10),Ji(e,2,32),Ji(e,8,1),Ji(e,10,24),$i(e,12,t),$i(e,20,Gi(i)||t),$i(e,28,Gi(r)||t)}catch(e){y=new _}}else y=k=new _;let v=ye;u&&(v|=8);let E=0;g&&(E=8),c&&(z=z>45?z:45),m&&(v|=1,d||(z=z>51?z:51,E=99,g&&(x[9]=8)));const D=new _(26),R=tr(D);Ji(R,0,z),Ji(R,2,v),Ji(R,4,E);const F=new p(1),T=tr(F);let A;A=ze>n?ze:n>Se?Se:n,Ji(T,0,(A.getHours()<<6|A.getMinutes())<<5|A.getSeconds()/2),Ji(T,2,(A.getFullYear()-1980<<4|A.getMonth()+1)<<5|A.getDate());const C=F[0];Qi(R,6,C),Ji(R,22,nr(t));const W=nr(x,k,y,w);Ji(R,24,W);const N=new _(30+nr(t)+W);return Qi(tr(N),0,we),er(N,D,4),er(N,t,30),er(N,x,30+nr(t)),er(N,k,30+nr(t,x)),er(N,y,30+nr(t,x,k)),er(N,w,30+nr(t,x,k,y)),{localHeaderArray:N,headerArray:D,headerView:R,lastModDate:n,rawLastModDate:C,encrypted:m,compressed:g,version:z,compressionMethod:E,extraFieldExtendedTimestampFlag:S,rawExtraFieldExtendedTimestamp:k,rawExtraFieldNTFS:y,rawExtraFieldAES:x,extraFieldLength:W}})(l=n.assign({},l,{rawFilename:c,rawComment:b,version:m,versionMadeBy:x,lastModDate:y,lastAccessDate:k,creationDate:S,rawExtraField:B,zip64:H,zip64UncompressedSize:J,zip64CompressedSize:Q,zip64Offset:$,zip64DiskNumberStart:ee,password:R,rawPassword:F,level:N,useWebWorkers:U,encryptionStrength:T,extendedTimestamp:C,zipCrypto:A,bufferedWrite:I,keepOrder:W,dataDescriptor:P,dataDescriptorSignature:O,signal:L,msDosCompatible:v,internalFileAttribute:E,externalFileAttribute:D,useCompressionStream:M})),ne=(e=>{const{zip64:t,dataDescriptor:n,dataDescriptorSignature:i}=e;let r,a=new _,s=0;return n&&(a=new _(t?i?24:20:i?16:12),r=tr(a),i&&(s=4,Qi(r,0,134695760))),{dataDescriptorArray:a,dataDescriptorView:r,dataDescriptorOffset:s}})(l),ie=nr(te.localHeaderArray,ne.dataDescriptorArray);let re;Z=ie+V,e.options.usdz&&(Z+=Z+64),e.pendingEntriesSize+=Z;try{re=await(async(e,i,r,s,o)=>{const{files:l,writer:c}=e,{keepOrder:u,dataDescriptor:w,signal:p}=o,{headerInfo:b}=s,{usdz:m}=e.options,x=t.from(l.values()).pop();let y,k,S,v,E,D,R,F={};l.set(i,F);try{let t;u&&(t=x&&x.lock,F.lock=new g((e=>S=e))),!(o.bufferedWrite||e.writerLocked||e.bufferedWrites&&u)&&w||m?(D=c,await T()):(D=new z,R=new d(D.readable).blob(),D.writable.size=0,y=!0,e.bufferedWrites++,await Nn(c)),await Nn(D);const{writable:b}=c;let{diskOffset:C}=c;if(e.addSplitZipSignature){delete e.addSplitZipSignature;const t=new _(4);Qi(tr(t),0,pe),await Yi(b,t),e.offset+=4}m&&((e,t)=>{const{headerInfo:n}=e;let{localHeaderArray:i,extraFieldLength:r}=n,a=tr(i),s=64-(t+nr(i))%64;4>s&&(s+=64);const o=new _(s),l=tr(o);Ji(l,0,6534),Ji(l,2,s-2);const c=i;n.localHeaderArray=i=new _(nr(c)+s),er(i,c),er(i,o,nr(c)),a=tr(i),Ji(a,28,r+s),e.metadataSize+=s})(s,e.offset-C),y||(await t,await A(b));const{diskNumber:W}=c;if(E=!0,F.diskNumberStart=W,F=await(async(e,t,{diskNumberStart:i,lock:r},s,o,l)=>{const{headerInfo:c,dataDescriptorInfo:d,metadataSize:u}=s,{localHeaderArray:f,headerArray:w,lastModDate:p,rawLastModDate:h,encrypted:b,compressed:g,version:m,compressionMethod:x,rawExtraFieldExtendedTimestamp:y,extraFieldExtendedTimestampFlag:k,rawExtraFieldNTFS:S,rawExtraFieldAES:z}=c,{dataDescriptorArray:v}=d,{rawFilename:E,lastAccessDate:D,creationDate:R,password:F,rawPassword:T,level:A,zip64:C,zip64UncompressedSize:W,zip64CompressedSize:N,zip64Offset:U,zip64DiskNumberStart:I,zipCrypto:O,dataDescriptor:L,directory:M,versionMadeBy:P,rawComment:H,rawExtraField:B,useWebWorkers:q,onstart:V,onprogress:Z,onend:K,signal:Y,encryptionStrength:G,extendedTimestamp:X,msDosCompatible:j,internalFileAttribute:J,externalFileAttribute:Q,useCompressionStream:$}=l,ee={lock:r,versionMadeBy:P,zip64:C,directory:!!M,filenameUTF8:!0,rawFilename:E,commentUTF8:!0,rawComment:H,rawExtraFieldExtendedTimestamp:y,rawExtraFieldNTFS:S,rawExtraFieldAES:z,rawExtraField:B,extendedTimestamp:X,msDosCompatible:j,internalFileAttribute:J,externalFileAttribute:Q,diskNumberStart:i};let te,ne=0,ie=0;const{writable:re}=t;if(e){e.chunkSize=We(o),await Yi(re,f);const t=e.readable,n=t.size=e.size,i={options:{codecType:Ht,level:A,rawPassword:T,password:F,encryptionStrength:G,zipCrypto:b&&O,passwordVerification:b&&O&&h>>8&255,signed:!0,compressed:g,encrypted:b,useWebWorkers:q,useCompressionStream:$,transferStreams:!1},config:o,streamOptions:{signal:Y,size:n,onstart:V,onprogress:Z,onend:K}},r=await rn({readable:t,writable:re},i);ie=r.inputSize,ne=r.outputSize,te=r.signature,re.size+=ie}else await Yi(re,f);let ae;if(C){let e=4;W&&(e+=8),N&&(e+=8),U&&(e+=8),I&&(e+=4),ae=new _(e)}else ae=new _;return((e,t)=>{const{signature:n,rawExtraFieldZip64:i,compressedSize:r,uncompressedSize:s,headerInfo:o,dataDescriptorInfo:l}=e,{headerView:c,encrypted:d}=o,{dataDescriptorView:u,dataDescriptorOffset:f}=l,{zip64:_,zip64UncompressedSize:w,zip64CompressedSize:p,zipCrypto:h,dataDescriptor:b}=t;if(d&&!h||n===ve||(Qi(c,10,n),b&&Qi(u,f,n)),_){const e=tr(i);Ji(e,0,1),Ji(e,2,nr(i)-4);let t=4;w&&(Qi(c,18,fe),$i(e,t,a(s)),t+=8),p&&(Qi(c,14,fe),$i(e,t,a(r))),b&&($i(u,f+4,a(r)),$i(u,f+12,a(s)))}else Qi(c,14,r),Qi(c,18,s),b&&(Qi(u,f+4,r),Qi(u,f+8,s))})({signature:te,rawExtraFieldZip64:ae,compressedSize:ne,uncompressedSize:ie,headerInfo:c,dataDescriptorInfo:d},l),L&&await Yi(re,v),n.assign(ee,{uncompressedSize:ie,compressedSize:ne,lastModDate:p,rawLastModDate:h,creationDate:R,lastAccessDate:D,encrypted:b,size:u+ne,compressionMethod:x,version:m,headerArray:w,signature:te,rawExtraFieldZip64:ae,extraFieldExtendedTimestampFlag:k,zip64UncompressedSize:W,zip64CompressedSize:N,zip64Offset:U,zip64DiskNumberStart:I}),ee})(r,D,F,s,e.config,o),E=!1,l.set(i,F),F.filename=i,y){await D.writable.getWriter().close();let e=await R;await t,await T(),v=!0,w||(e=await(async(e,t,n,{zipCrypto:i})=>{let r;r=await t.slice(0,26).arrayBuffer(),26!=r.byteLength&&(r=r.slice(0,26));const a=new h(r);return e.encrypted&&!i||Qi(a,14,e.signature),e.zip64?(Qi(a,18,fe),Qi(a,22,fe)):(Qi(a,18,e.compressedSize),Qi(a,22,e.uncompressedSize)),await Yi(n,new _(r)),t.slice(r.byteLength)})(F,e,b,o)),await A(b),F.diskNumberStart=c.diskNumber,C=c.diskOffset,await e.stream().pipeTo(b,{preventClose:!0,preventAbort:!0,signal:p}),b.size+=e.size,v=!1}if(F.offset=e.offset-C,F.zip64)((e,t)=>{const{rawExtraFieldZip64:n,offset:i,diskNumberStart:r}=e,{zip64UncompressedSize:s,zip64CompressedSize:o,zip64Offset:l,zip64DiskNumberStart:c}=t,d=tr(n);let u=4;s&&(u+=8),o&&(u+=8),l&&($i(d,u,a(i)),u+=8),c&&Qi(d,u,r)})(F,o);else if(F.offset>=fe)throw new f(Bi);return e.offset+=F.size,F}catch(t){if(y&&v||!y&&E){if(e.hasCorruptedEntries=!0,t)try{t.corruptedEntry=!0}catch(e){}y?e.offset+=D.writable.size:e.offset=D.writable.size}throw l.delete(i),t}finally{y&&e.bufferedWrites--,S&&S(),k&&k()}async function T(){e.writerLocked=!0;const{lockWriter:t}=e;e.lockWriter=new g((t=>k=()=>{e.writerLocked=!1,t()})),await t}async function A(e){nr(b.localHeaderArray)>c.availableSize&&(c.availableSize=0,await Yi(e,new _))}})(e,i,r,{headerInfo:te,dataDescriptorInfo:ne,metadataSize:ie},l)}finally{e.pendingEntriesSize-=Z}return n.assign(re,{name:i,comment:u,extraField:q}),new ai(re)})(l,e,i,r),c.add(b),await b}catch(t){throw l.filenames.delete(e),t}finally{c.delete(b);const e=Zi.shift();e?e():Vi--}}async close(e=new _,n={}){const{pendingAddFileCalls:i,writer:r}=this,{writable:o}=r;for(;i.size;)await g.allSettled(t.from(i));return await(async(e,n,i)=>{const{files:r,writer:o}=e,{diskOffset:l,writable:c}=o;let{diskNumber:d}=o,u=0,w=0,p=e.offset-l,h=r.size;for(const[,e]of r){const{rawFilename:t,rawExtraFieldZip64:n,rawExtraFieldAES:i,rawComment:r,rawExtraFieldNTFS:a,rawExtraField:o,extendedTimestamp:l,extraFieldExtendedTimestampFlag:c,lastModDate:d}=e;let u;if(l){u=new _(9);const e=tr(u);Ji(e,0,xe),Ji(e,2,5),ji(e,4,c),Qi(e,5,s.floor(d.getTime()/1e3))}else u=new _;e.rawExtraFieldCDExtendedTimestamp=u,w+=46+nr(t,r,n,i,a,u,o)}const b=new _(w),g=tr(b);await Nn(o);let m=0;for(const[e,n]of t.from(r.values()).entries()){const{offset:t,rawFilename:a,rawExtraFieldZip64:s,rawExtraFieldAES:l,rawExtraFieldCDExtendedTimestamp:d,rawExtraFieldNTFS:f,rawExtraField:_,rawComment:w,versionMadeBy:p,headerArray:h,directory:x,zip64:y,zip64UncompressedSize:k,zip64CompressedSize:S,zip64DiskNumberStart:z,zip64Offset:v,msDosCompatible:E,internalFileAttribute:D,externalFileAttribute:R,diskNumberStart:F,uncompressedSize:T,compressedSize:A}=n,C=nr(s,l,d,f,_);Qi(g,u,he),Ji(g,u+4,p);const W=tr(h);k||Qi(W,18,T),S||Qi(W,14,A),er(b,h,u+6),Ji(g,u+30,C),Ji(g,u+32,nr(w)),Ji(g,u+34,y&&z?_e:F),Ji(g,u+36,D),R?Qi(g,u+38,R):x&&E&&ji(g,u+38,16),Qi(g,u+42,y&&v?fe:t),er(b,a,u+46),er(b,s,u+46+nr(a)),er(b,l,u+46+nr(a,s)),er(b,d,u+46+nr(a,s,l)),er(b,f,u+46+nr(a,s,l,d)),er(b,_,u+46+nr(a,s,l,d,f)),er(b,w,u+46+nr(a)+C);const N=46+nr(a,w)+C;if(u-m>o.availableSize&&(o.availableSize=0,await Yi(c,b.slice(m,u)),m=u),u+=N,i.onprogress)try{await i.onprogress(e+1,r.size,new ai(n))}catch(e){}}await Yi(c,m?b.slice(m):b);let x=o.diskNumber;const{availableSize:y}=o;me>y&&x++;let k=Xi(e,i,"zip64");if(!(fe>p&&fe>w&&_e>h&&_e>x)){if(!1===k)throw new f(Bi);k=!0}const S=new _(k?98:me),z=tr(S);u=0,k&&(Qi(z,0,be),$i(z,4,a(44)),Ji(z,12,45),Ji(z,14,45),Qi(z,16,x),Qi(z,20,d),$i(z,24,a(h)),$i(z,32,a(h)),$i(z,40,a(w)),$i(z,48,a(p)),Qi(z,56,ge),$i(z,64,a(p)+a(w)),Qi(z,72,x+1),Xi(e,i,"supportZip64SplitFile",!0)&&(x=_e,d=_e),h=_e,p=fe,w=fe,u+=76),Qi(z,u,101010256),Ji(z,u+4,x),Ji(z,u+6,d),Ji(z,u+8,h),Ji(z,u+10,h),Qi(z,u+12,w),Qi(z,u+16,p);const v=nr(n);if(v){if(v>_e)throw new f(Ui);Ji(z,u+20,v)}await Yi(c,S),v&&await Yi(c,n)})(this,e,n),Xi(this,n,"preventClose")||await o.getWriter().close(),r.getData?r.getData():o}}async function Yi(e,t){const n=e.getWriter();try{await n.ready,e.size+=nr(t),await n.write(t)}finally{n.releaseLock()}}function Gi(e){if(e)return(a(e.getTime())+a(116444736e5))*a(1e4)}function Xi(e,t,n,i){const r=t[n]===ve?e.options[n]:t[n];return r===ve?i:r}function ji(e,t,n){e.setUint8(t,n)}function Ji(e,t,n){e.setUint16(t,n,!0)}function Qi(e,t,n){e.setUint32(t,n,!0)}function $i(e,t,n){e.setBigUint64(t,n,!0)}function er(e,t,n){e.set(t,n)}function tr(e){return new h(e.buffer)}function nr(...e){let t=0;return e.forEach((e=>e&&(t+=e.length))),t}Ne({Deflate:function(e){const t=new Y,n=(i=e&&e.chunkSize?e.chunkSize:65536)+5*(s.floor(i/16383)+1);var i;const r=new _(n);let a=e?e.level:-1;void 0===a&&(a=-1),t.deflateInit(a),t.next_out=r,this.append=(e,i)=>{let a,s,o=0,l=0,c=0;const d=[];if(e.length){t.next_in_index=0,t.next_in=e,t.avail_in=e.length;do{if(t.next_out_index=0,t.avail_out=n,a=t.deflate(0),0!=a)throw new f("deflating: "+t.msg);t.next_out_index&&(t.next_out_index==n?d.push(new _(r)):d.push(r.subarray(0,t.next_out_index))),c+=t.next_out_index,i&&t.next_in_index>0&&t.next_in_index!=o&&(i(t.next_in_index),o=t.next_in_index)}while(t.avail_in>0||0===t.avail_out);return d.length>1?(s=new _(c),d.forEach((e=>{s.set(e,l),l+=e.length}))):s=d[0]?new _(d[0]):new _,s}},this.flush=()=>{let e,i,a=0,s=0;const o=[];do{if(t.next_out_index=0,t.avail_out=n,e=t.deflate(4),1!=e&&0!=e)throw new f("deflating: "+t.msg);n-t.avail_out>0&&o.push(r.slice(0,t.next_out_index)),s+=t.next_out_index}while(t.avail_in>0||0===t.avail_out);return t.deflateEnd(),i=new _(s),o.forEach((e=>{i.set(e,a),a+=e.length})),i}},Inflate:function(e){const t=new ue,n=e&&e.chunkSize?s.floor(2*e.chunkSize):131072,i=new _(n);let r=!1;t.inflateInit(),t.next_out=i,this.append=(e,a)=>{const s=[];let o,l,c=0,d=0,u=0;if(0!==e.length){t.next_in_index=0,t.next_in=e,t.avail_in=e.length;do{if(t.next_out_index=0,t.avail_out=n,0!==t.avail_in||r||(t.next_in_index=0,r=!0),o=t.inflate(0),r&&o===j){if(0!==t.avail_in)throw new f("inflating: bad input")}else if(0!==o&&1!==o)throw new f("inflating: "+t.msg);if((r||1===o)&&t.avail_in===e.length)throw new f("inflating: bad input");t.next_out_index&&(t.next_out_index===n?s.push(new _(i)):s.push(i.subarray(0,t.next_out_index))),u+=t.next_out_index,a&&t.next_in_index>0&&t.next_in_index!=c&&(a(t.next_in_index),c=t.next_in_index)}while(t.avail_in>0||0===t.avail_out);return s.length>1?(l=new _(u),s.forEach((e=>{l.set(e,d),d+=e.length}))):l=s[0]?new _(s[0]):new _,l}},this.flush=()=>{t.inflateEnd()}}}),e.BlobReader=hn,e.BlobWriter=bn,e.Data64URIReader=class extends wn{constructor(e){super();let t=e.length;for(;"="==e.charAt(t-1);)t--;const i=e.indexOf(",")+1;n.assign(this,{dataURI:e,dataStart:i,size:s.floor(.75*(t-i))})}readUint8Array(e,t){const{dataStart:n,dataURI:i}=this,r=new _(t),a=4*s.floor(e/3),o=atob(i.substring(a+n,4*s.ceil((e+t)/3)+n)),l=e-3*s.floor(a/4);for(let e=l;l+t>e;e++)r[e-l]=o.charCodeAt(e);return r}},e.Data64URIWriter=class extends pn{constructor(e){super(),n.assign(this,{data:"data:"+(e||"")+";base64,",pending:[]})}writeUint8Array(e){const t=this;let n=0,r=t.pending;const a=t.pending.length;for(t.pending="",n=0;n<3*s.floor((a+e.length)/3)-a;n++)r+=i.fromCharCode(e[n]);for(;n2?t.data+=S(r):t.pending=r}getData(){return this.data+S(this.pending)}},e.ERR_BAD_FORMAT=si,e.ERR_CENTRAL_DIRECTORY_NOT_FOUND=di,e.ERR_DUPLICATED_NAME=Ni,e.ERR_ENCRYPTED=_i,e.ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND=ci,e.ERR_EOCDR_NOT_FOUND=oi,e.ERR_EOCDR_ZIP64_NOT_FOUND=li,e.ERR_EXTRAFIELD_ZIP64_NOT_FOUND=fi,e.ERR_HTTP_RANGE=on,e.ERR_INVALID_COMMENT=Ui,e.ERR_INVALID_ENCRYPTION_STRENGTH=Mi,e.ERR_INVALID_ENTRY_COMMENT=Ii,e.ERR_INVALID_ENTRY_NAME=Oi,e.ERR_INVALID_EXTRAFIELD_DATA=Hi,e.ERR_INVALID_EXTRAFIELD_TYPE=Pi,e.ERR_INVALID_PASSWORD=Ke,e.ERR_INVALID_SIGNATURE=Ye,e.ERR_INVALID_VERSION=Li,e.ERR_ITERATOR_COMPLETED_TOO_SOON=ln,e.ERR_LOCAL_FILE_HEADER_NOT_FOUND=ui,e.ERR_SPLIT_ZIP_FILE=hi,e.ERR_UNSUPPORTED_COMPRESSION=pi,e.ERR_UNSUPPORTED_ENCRYPTION=wi,e.ERR_UNSUPPORTED_FORMAT=Bi,e.HttpRangeReader=class extends An{constructor(e,t={}){t.useRangeHeader=!0,super(e,t)}},e.HttpReader=An,e.Reader=wn,e.SplitDataReader=Cn,e.SplitDataWriter=Wn,e.SplitZipReader=Ln,e.SplitZipWriter=Mn,e.TextReader=class extends hn{constructor(e){super(new b([e],{type:"text/plain"}))}},e.TextWriter=class extends bn{constructor(e){super(e),n.assign(this,{encoding:e,utf8:!e||"utf-8"==e.toLowerCase()})}async getData(){const{encoding:e,utf8:t}=this,i=await super.getData();if(i.text&&t)return i.text();{const t=new FileReader;return new g(((r,a)=>{n.assign(t,{onload:({target:e})=>r(e.result),onerror:()=>a(t.error)}),t.readAsText(i,e)}))}}},e.Uint8ArrayReader=class extends wn{constructor(e){super(),n.assign(this,{array:e,size:e.length})}readUint8Array(e,t){return this.array.slice(e,e+t)}},e.Uint8ArrayWriter=class extends pn{init(e=0){n.assign(this,{offset:0,array:new _(e)}),super.init()}writeUint8Array(e){const t=this;if(t.offset+e.length>t.array.length){const n=t.array;t.array=new _(n.length+e.length),t.array.set(n)}t.array.set(e,t.offset),t.offset+=e.length}getData(){return this.array}},e.Writer=pn,e.ZipReader=yi,e.ZipReaderStream=class{constructor(e={}){const{readable:t,writable:n}=new z,i=new yi(t,e).getEntriesGenerator();this.readable=new v({async pull(e){const{done:t,value:n}=await i.next();if(t)return e.close();const r={...n,readable:(()=>{const{readable:e,writable:t}=new z;if(n.getData)return n.getData(t),e})()};delete r.getData,e.enqueue(r)}}),this.writable=n}},e.ZipWriter=Ki,e.ZipWriterStream=class{constructor(e={}){const{readable:t,writable:n}=new z;this.readable=t,this.zipWriter=new Ki(n,e)}transform(e){const{readable:t,writable:n}=new z({flush:()=>{this.zipWriter.close()}});return this.zipWriter.add(e,t),{readable:this.readable,writable:n}}writable(e){const{readable:t,writable:n}=new z;return this.zipWriter.add(e,t),n}close(e,t={}){return this.zipWriter.close(e,t)}},e.configure=Ne,e.getMimeType=()=>"application/octet-stream",e.initReader=Un,e.initStream=Nn,e.initWriter=In,e.readUint8Array=On,e.terminateWorkers=async()=>{await g.allSettled(en.map((e=>(an(e),e.terminate()))))},n.defineProperty(e,"__esModule",{value:!0})})); +((e,t)=>{"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).zip={})})(this,(function(e){"use strict";const{Array:t,Object:n,String:i,Number:r,BigInt:a,Math:s,Date:o,Map:l,Set:c,Response:d,URL:u,Error:f,Uint8Array:_,Uint16Array:w,Uint32Array:p,DataView:h,Blob:b,Promise:g,TextEncoder:m,TextDecoder:x,document:y,crypto:k,btoa:S,TransformStream:z,ReadableStream:v,WritableStream:E,CompressionStream:D,DecompressionStream:R,navigator:F,Worker:T}="undefined"!=typeof globalThis?globalThis:this||self,A=-2;function C(e){return W(e.map((([e,n])=>new t(e).fill(n,0,e))))}function W(e){return e.reduce(((e,n)=>e.concat(t.isArray(n)?W(n):n)),[])}const N=[0,1,2,3].concat(...C([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function U(){const e=this;function t(e,t){let n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1}e.build_tree=n=>{const i=e.dyn_tree,r=e.stat_desc.static_tree,a=e.stat_desc.elems;let o,l,c,d=-1;for(n.heap_len=0,n.heap_max=573,o=0;a>o;o++)0!==i[2*o]?(n.heap[++n.heap_len]=d=o,n.depth[o]=0):i[2*o+1]=0;for(;2>n.heap_len;)c=n.heap[++n.heap_len]=2>d?++d:0,i[2*c]=1,n.depth[c]=0,n.opt_len--,r&&(n.static_len-=r[2*c+1]);for(e.max_code=d,o=s.floor(n.heap_len/2);o>=1;o--)n.pqdownheap(i,o);c=a;do{o=n.heap[1],n.heap[1]=n.heap[n.heap_len--],n.pqdownheap(i,1),l=n.heap[1],n.heap[--n.heap_max]=o,n.heap[--n.heap_max]=l,i[2*c]=i[2*o]+i[2*l],n.depth[c]=s.max(n.depth[o],n.depth[l])+1,i[2*o+1]=i[2*l+1]=c,n.heap[1]=c++,n.pqdownheap(i,1)}while(n.heap_len>=2);n.heap[--n.heap_max]=n.heap[1],(t=>{const n=e.dyn_tree,i=e.stat_desc.static_tree,r=e.stat_desc.extra_bits,a=e.stat_desc.extra_base,s=e.stat_desc.max_length;let o,l,c,d,u,f,_=0;for(d=0;15>=d;d++)t.bl_count[d]=0;for(n[2*t.heap[t.heap_max]+1]=0,o=t.heap_max+1;573>o;o++)l=t.heap[o],d=n[2*n[2*l+1]+1]+1,d>s&&(d=s,_++),n[2*l+1]=d,l>e.max_code||(t.bl_count[d]++,u=0,a>l||(u=r[l-a]),f=n[2*l],t.opt_len+=f*(d+u),i&&(t.static_len+=f*(i[2*l+1]+u)));if(0!==_){do{for(d=s-1;0===t.bl_count[d];)d--;t.bl_count[d]--,t.bl_count[d+1]+=2,t.bl_count[s]--,_-=2}while(_>0);for(d=s;0!==d;d--)for(l=t.bl_count[d];0!==l;)c=t.heap[--o],c>e.max_code||(n[2*c+1]!=d&&(t.opt_len+=(d-n[2*c+1])*n[2*c],n[2*c+1]=d),l--)}})(n),((e,n,i)=>{const r=[];let a,s,o,l=0;for(a=1;15>=a;a++)r[a]=l=l+i[a-1]<<1;for(s=0;n>=s;s++)o=e[2*s+1],0!==o&&(e[2*s]=t(r[o]++,o))})(i,e.max_code,n.bl_count)}}function I(e,t,n,i,r){const a=this;a.static_tree=e,a.extra_bits=t,a.extra_base=n,a.elems=i,a.max_length=r}U._length_code=[0,1,2,3,4,5,6,7].concat(...C([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]])),U.base_length=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0],U.base_dist=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576],U.d_code=e=>256>e?N[e]:N[256+(e>>>7)],U.extra_lbits=[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],U.extra_dbits=[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],U.extra_blbits=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],U.bl_order=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];const O=C([[144,8],[112,9],[24,7],[8,8]]);I.static_ltree=W([12,140,76,204,44,172,108,236,28,156,92,220,60,188,124,252,2,130,66,194,34,162,98,226,18,146,82,210,50,178,114,242,10,138,74,202,42,170,106,234,26,154,90,218,58,186,122,250,6,134,70,198,38,166,102,230,22,150,86,214,54,182,118,246,14,142,78,206,46,174,110,238,30,158,94,222,62,190,126,254,1,129,65,193,33,161,97,225,17,145,81,209,49,177,113,241,9,137,73,201,41,169,105,233,25,153,89,217,57,185,121,249,5,133,69,197,37,165,101,229,21,149,85,213,53,181,117,245,13,141,77,205,45,173,109,237,29,157,93,221,61,189,125,253,19,275,147,403,83,339,211,467,51,307,179,435,115,371,243,499,11,267,139,395,75,331,203,459,43,299,171,427,107,363,235,491,27,283,155,411,91,347,219,475,59,315,187,443,123,379,251,507,7,263,135,391,71,327,199,455,39,295,167,423,103,359,231,487,23,279,151,407,87,343,215,471,55,311,183,439,119,375,247,503,15,271,143,399,79,335,207,463,47,303,175,431,111,367,239,495,31,287,159,415,95,351,223,479,63,319,191,447,127,383,255,511,0,64,32,96,16,80,48,112,8,72,40,104,24,88,56,120,4,68,36,100,20,84,52,116,3,131,67,195,35,163,99,227].map(((e,t)=>[e,O[t]])));const L=C([[30,5]]);function M(e,t,n,i,r){const a=this;a.good_length=e,a.max_lazy=t,a.nice_length=n,a.max_chain=i,a.func=r}I.static_dtree=W([0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30,1,17,9,25,5,21,13,29,3,19,11,27,7,23].map(((e,t)=>[e,L[t]]))),I.static_l_desc=new I(I.static_ltree,U.extra_lbits,257,286,15),I.static_d_desc=new I(I.static_dtree,U.extra_dbits,0,30,15),I.static_bl_desc=new I(null,U.extra_blbits,0,19,7);const P=[new M(0,0,0,0,0),new M(4,4,8,4,1),new M(4,5,16,8,1),new M(4,6,32,32,1),new M(4,4,16,16,2),new M(8,16,32,32,2),new M(8,16,128,128,2),new M(8,32,128,256,2),new M(32,128,258,1024,2),new M(32,258,258,4096,2)],H=["need dictionary","stream end","","","stream error","data error","","buffer error","",""],B=113,q=666,V=262;function Z(e,t,n,i){const r=e[2*t],a=e[2*n];return a>r||r==a&&i[t]<=i[n]}function K(){const e=this;let t,n,i,r,a,o,l,c,d,u,f,p,h,b,g,m,x,y,k,S,z,v,E,D,R,F,T,C,W,N,O,L,M;const K=new U,Y=new U,G=new U;let X,j,J,Q,$,ee;function te(){let t;for(t=0;286>t;t++)O[2*t]=0;for(t=0;30>t;t++)L[2*t]=0;for(t=0;19>t;t++)M[2*t]=0;O[512]=1,e.opt_len=e.static_len=0,j=J=0}function ne(e,t){let n,i=-1,r=e[1],a=0,s=7,o=4;0===r&&(s=138,o=3),e[2*(t+1)+1]=65535;for(let l=0;t>=l;l++)n=r,r=e[2*(l+1)+1],++aa?M[2*n]+=a:0!==n?(n!=i&&M[2*n]++,M[32]++):a>10?M[36]++:M[34]++,a=0,i=n,0===r?(s=138,o=3):n==r?(s=6,o=3):(s=7,o=4))}function ie(t){e.pending_buf[e.pending++]=t}function re(e){ie(255&e),ie(e>>>8&255)}function ae(e,t){let n;const i=t;ee>16-i?(n=e,$|=n<>>16-ee,ee+=i-16):($|=e<=n;n++)if(i=a,a=e[2*(n+1)+1],++s>=o||i!=a){if(l>s)do{se(i,M)}while(0!=--s);else 0!==i?(i!=r&&(se(i,M),s--),se(16,M),ae(s-3,2)):s>10?(se(18,M),ae(s-11,7)):(se(17,M),ae(s-3,3));s=0,r=i,0===a?(o=138,l=3):i==a?(o=6,l=3):(o=7,l=4)}}function le(){16==ee?(re($),$=0,ee=0):8>ee||(ie(255&$),$>>>=8,ee-=8)}function ce(t,n){let i,r,a;if(e.dist_buf[j]=t,e.lc_buf[j]=255&n,j++,0===t?O[2*n]++:(J++,t--,O[2*(U._length_code[n]+256+1)]++,L[2*U.d_code(t)]++),0==(8191&j)&&T>2){for(i=8*j,r=z-x,a=0;30>a;a++)i+=L[2*a]*(5+U.extra_dbits[a]);if(i>>>=3,Jo);se(256,t),Q=t[513]}function ue(){ee>8?re($):ee>0&&ie(255&$),$=0,ee=0}function fe(t,n,i){ae(0+(i?1:0),3),((t,n)=>{ue(),Q=8,re(n),re(~n),e.pending_buf.set(c.subarray(t,t+n),e.pending),e.pending+=n})(t,n)}function _e(n){((t,n,i)=>{let r,a,s=0;T>0?(K.build_tree(e),Y.build_tree(e),s=(()=>{let t;for(ne(O,K.max_code),ne(L,Y.max_code),G.build_tree(e),t=18;t>=3&&0===M[2*U.bl_order[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t})(),r=e.opt_len+3+7>>>3,a=e.static_len+3+7>>>3,a>r||(r=a)):r=a=n+5,n+4>r||-1==t?a==r?(ae(2+(i?1:0),3),de(I.static_ltree,I.static_dtree)):(ae(4+(i?1:0),3),((e,t,n)=>{let i;for(ae(e-257,5),ae(t-1,5),ae(n-4,4),i=0;n>i;i++)ae(M[2*U.bl_order[i]+1],3);oe(O,e-1),oe(L,t-1)})(K.max_code+1,Y.max_code+1,s+1),de(O,L)):fe(t,n,i),te(),i&&ue()})(0>x?-1:x,z-x,n),x=z,t.flush_pending()}function we(){let e,n,i,r;do{if(r=d-E-z,0===r&&0===z&&0===E)r=a;else if(-1==r)r--;else if(z>=a+a-V){c.set(c.subarray(a,a+a),0),v-=a,z-=a,x-=a,e=h,i=e;do{n=65535&f[--i],f[i]=a>n?0:n-a}while(0!=--e);e=a,i=e;do{n=65535&u[--i],u[i]=a>n?0:n-a}while(0!=--e);r+=a}if(0===t.avail_in)return;e=t.read_buf(c,z+E,r),E+=e,3>E||(p=255&c[z],p=(p<E&&0!==t.avail_in)}function pe(e){let t,n,i=R,r=z,s=D;const o=z>a-V?z-(a-V):0;let d=N;const f=l,_=z+258;let w=c[r+s-1],p=c[r+s];W>D||(i>>=2),d>E&&(d=E);do{if(t=e,c[t+s]==p&&c[t+s-1]==w&&c[t]==c[r]&&c[++t]==c[r+1]){r+=2,t++;do{}while(c[++r]==c[++t]&&c[++r]==c[++t]&&c[++r]==c[++t]&&c[++r]==c[++t]&&c[++r]==c[++t]&&c[++r]==c[++t]&&c[++r]==c[++t]&&c[++r]==c[++t]&&_>r);if(n=258-(_-r),r=_-258,n>s){if(v=e,s=n,n>=d)break;w=c[r+s-1],p=c[r+s]}}}while((e=65535&u[e&f])>o&&0!=--i);return s>E?E:s}e.depth=[],e.bl_count=[],e.heap=[],O=[],L=[],M=[],e.pqdownheap=(t,n)=>{const i=e.heap,r=i[n];let a=n<<1;for(;a<=e.heap_len&&(a(U||(U=8),H||(H=8),q||(q=0),t.msg=null,-1==k&&(k=6),1>H||H>9||8!=U||9>v||v>15||0>k||k>9||0>q||q>2?A:(t.dstate=e,o=v,a=1<(t.total_in=t.total_out=0,t.msg=null,e.pending=0,e.pending_out=0,n=B,r=0,K.dyn_tree=O,K.stat_desc=I.static_l_desc,Y.dyn_tree=L,Y.stat_desc=I.static_d_desc,G.dyn_tree=M,G.stat_desc=I.static_bl_desc,$=0,ee=0,Q=8,te(),(()=>{d=2*a,f[h-1]=0;for(let e=0;h-1>e;e++)f[e]=0;F=P[T].max_lazy,W=P[T].good_length,N=P[T].nice_length,R=P[T].max_chain,z=0,x=0,E=0,y=D=2,S=0,p=0})(),0))(t))),e.deflateEnd=()=>42!=n&&n!=B&&n!=q?A:(e.lc_buf=null,e.dist_buf=null,e.pending_buf=null,f=null,u=null,c=null,e.dstate=null,n==B?-3:0),e.deflateParams=(e,t,n)=>{let i=0;return-1==t&&(t=6),0>t||t>9||0>n||n>2?A:(P[T].func!=P[t].func&&0!==e.total_in&&(i=e.deflate(1)),T!=t&&(T=t,F=P[T].max_lazy,W=P[T].good_length,N=P[T].nice_length,R=P[T].max_chain),C=n,i)},e.deflateSetDictionary=(e,t,i)=>{let r,s=i,o=0;if(!t||42!=n)return A;if(3>s)return 0;for(s>a-V&&(s=a-V,o=i-s),c.set(t.subarray(o,o+s),0),z=s,x=s,p=255&c[0],p=(p<=r;r++)p=(p<{let _,w,b,R,W;if(d>4||0>d)return A;if(!s.next_out||!s.next_in&&0!==s.avail_in||n==q&&4!=d)return s.msg=H[4],A;if(0===s.avail_out)return s.msg=H[7],-5;var N;if(t=s,R=r,r=d,42==n&&(w=8+(o-8<<4)<<8,b=(T-1&255)>>1,b>3&&(b=3),w|=b<<6,0!==z&&(w|=32),w+=31-w%31,n=B,ie((N=w)>>8&255),ie(255&N)),0!==e.pending){if(t.flush_pending(),0===t.avail_out)return r=-1,0}else if(0===t.avail_in&&R>=d&&4!=d)return t.msg=H[7],-5;if(n==q&&0!==t.avail_in)return s.msg=H[7],-5;if(0!==t.avail_in||0!==E||0!=d&&n!=q){switch(W=-1,P[T].func){case 0:W=(e=>{let n,r=65535;for(r>i-5&&(r=i-5);;){if(1>=E){if(we(),0===E&&0==e)return 0;if(0===E)break}if(z+=E,E=0,n=x+r,(0===z||z>=n)&&(E=z-n,z=n,_e(!1),0===t.avail_out))return 0;if(z-x>=a-V&&(_e(!1),0===t.avail_out))return 0}return _e(4==e),0===t.avail_out?4==e?2:0:4==e?3:1})(d);break;case 1:W=(e=>{let n,i=0;for(;;){if(V>E){if(we(),V>E&&0==e)return 0;if(0===E)break}if(3>E||(p=(p<a-V||2!=C&&(y=pe(i)),3>y)n=ce(0,255&c[z]),E--,z++;else if(n=ce(z-v,y-3),E-=y,y>F||3>E)z+=y,y=0,p=255&c[z],p=(p<{let n,i,r=0;for(;;){if(V>E){if(we(),V>E&&0==e)return 0;if(0===E)break}if(3>E||(p=(p<D&&a-V>=(z-r&65535)&&(2!=C&&(y=pe(r)),5>=y&&(1==C||3==y&&z-v>4096)&&(y=2)),3>D||y>D)if(0!==S){if(n=ce(0,255&c[z-1]),n&&_e(!1),z++,E--,0===t.avail_out)return 0}else S=1,z++,E--;else{i=z+E-3,n=ce(z-1-k,D-3),E-=D-1,D-=2;do{++z>i||(p=(p<1+Q+10-ee&&(ae(2,3),se(256,I.static_ltree),le()),Q=7;else if(fe(0,0,!1),3==d)for(_=0;h>_;_++)f[_]=0;if(t.flush_pending(),0===t.avail_out)return r=-1,0}}return 4!=d?0:1}}function Y(){const e=this;e.next_in_index=0,e.next_out_index=0,e.avail_in=0,e.total_in=0,e.avail_out=0,e.total_out=0}Y.prototype={deflateInit(e,t){const n=this;return n.dstate=new K,t||(t=15),n.dstate.deflateInit(n,e,t)},deflate(e){const t=this;return t.dstate?t.dstate.deflate(t,e):A},deflateEnd(){const e=this;if(!e.dstate)return A;const t=e.dstate.deflateEnd();return e.dstate=null,t},deflateParams(e,t){const n=this;return n.dstate?n.dstate.deflateParams(n,e,t):A},deflateSetDictionary(e,t){const n=this;return n.dstate?n.dstate.deflateSetDictionary(n,e,t):A},read_buf(e,t,n){const i=this;let r=i.avail_in;return r>n&&(r=n),0===r?0:(i.avail_in-=r,e.set(i.next_in.subarray(i.next_in_index,i.next_in_index+r),t),i.next_in_index+=r,i.total_in+=r,r)},flush_pending(){const e=this;let t=e.dstate.pending;t>e.avail_out&&(t=e.avail_out),0!==t&&(e.next_out.set(e.dstate.pending_buf.subarray(e.dstate.pending_out,e.dstate.pending_out+t),e.next_out_index),e.next_out_index+=t,e.dstate.pending_out+=t,e.total_out+=t,e.avail_out-=t,e.dstate.pending-=t,0===e.dstate.pending&&(e.dstate.pending_out=0))}};const G=-2,X=-3,j=-5,J=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],Q=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],$=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],ee=[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,0,0],te=[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,112,112],ne=[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],ie=[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];function re(){let e,t,n,i,r,a;function s(e,t,s,o,l,c,d,u,f,_,w){let p,h,b,g,m,x,y,k,S,z,v,E,D,R,F;z=0,m=s;do{n[e[t+z]]++,z++,m--}while(0!==m);if(n[0]==s)return d[0]=-1,u[0]=0,0;for(k=u[0],x=1;15>=x&&0===n[x];x++);for(y=x,x>k&&(k=x),m=15;0!==m&&0===n[m];m--);for(b=m,k>m&&(k=m),u[0]=k,R=1<x;x++,R<<=1)if(0>(R-=n[x]))return X;if(0>(R-=n[m]))return X;for(n[m]+=R,a[1]=x=0,z=1,D=2;0!=--m;)a[D]=x+=n[z],D++,z++;m=0,z=0;do{0!==(x=e[t+z])&&(w[a[x]++]=m),z++}while(++m=y;y++)for(p=n[y];0!=p--;){for(;y>E+k;){if(g++,E+=k,F=b-E,F=F>k?k:F,(h=1<<(x=y-E))>p+1&&(h-=p+1,D=y,F>x))for(;++xn[++D];)h-=n[D];if(F=1<1440)return X;r[g]=v=_[0],_[0]+=F,0!==g?(a[g]=m,i[0]=x,i[1]=k,x=m>>>E-k,i[2]=v-r[g-1]-x,f.set(i,3*(r[g-1]+x))):d[0]=v}for(i[1]=y-E,s>z?w[z]w[z]?0:96,i[2]=w[z++]):(i[0]=c[w[z]-o]+16+64,i[2]=l[w[z++]-o]):i[0]=192,h=1<>>E;F>x;x+=h)f.set(i,3*(v+x));for(x=1<>>=1)m^=x;for(m^=x,S=(1<o;o++)t[o]=0;for(o=0;16>o;o++)n[o]=0;for(o=0;3>o;o++)i[o]=0;r.set(n.subarray(0,15),0),a.set(n.subarray(0,16),0)}this.inflate_trees_bits=(n,i,r,a,l)=>{let c;return o(19),e[0]=0,c=s(n,0,19,19,null,null,r,i,a,e,t),c==X?l.msg="oversubscribed dynamic bit lengths tree":c!=j&&0!==i[0]||(l.msg="incomplete dynamic bit lengths tree",c=X),c},this.inflate_trees_dynamic=(n,i,r,a,l,c,d,u,f)=>{let _;return o(288),e[0]=0,_=s(r,0,n,257,ee,te,c,a,u,e,t),0!=_||0===a[0]?(_==X?f.msg="oversubscribed literal/length tree":-4!=_&&(f.msg="incomplete literal/length tree",_=X),_):(o(288),_=s(r,n,i,0,ne,ie,d,l,u,e,t),0!=_||0===l[0]&&n>257?(_==X?f.msg="oversubscribed distance tree":_==j?(f.msg="incomplete distance tree",_=X):-4!=_&&(f.msg="empty distance tree with lengths",_=X),_):0)}}function ae(){const e=this;let t,n,i,r,a=0,s=0,o=0,l=0,c=0,d=0,u=0,f=0,_=0,w=0;function p(e,t,n,i,r,a,s,o){let l,c,d,u,f,_,w,p,h,b,g,m,x,y,k,S;w=o.next_in_index,p=o.avail_in,f=s.bitb,_=s.bitk,h=s.write,b=h_;)p--,f|=(255&o.read_byte(w++))<<_,_+=8;if(l=f&g,c=n,d=i,S=3*(d+l),0!==(u=c[S]))for(;;){if(f>>=c[S+1],_-=c[S+1],0!=(16&u)){for(u&=15,x=c[S+2]+(f&J[u]),f>>=u,_-=u;15>_;)p--,f|=(255&o.read_byte(w++))<<_,_+=8;for(l=f&m,c=r,d=a,S=3*(d+l),u=c[S];;){if(f>>=c[S+1],_-=c[S+1],0!=(16&u)){for(u&=15;u>_;)p--,f|=(255&o.read_byte(w++))<<_,_+=8;if(y=c[S+2]+(f&J[u]),f>>=u,_-=u,b-=x,y>h){k=h-y;do{k+=s.end}while(0>k);if(u=s.end-k,x>u){if(x-=u,h-k>0&&u>h-k)do{s.win[h++]=s.win[k++]}while(0!=--u);else s.win.set(s.win.subarray(k,k+u),h),h+=u,k+=u,u=0;k=0}}else k=h-y,h-k>0&&2>h-k?(s.win[h++]=s.win[k++],s.win[h++]=s.win[k++],x-=2):(s.win.set(s.win.subarray(k,k+2),h),h+=2,k+=2,x-=2);if(h-k>0&&x>h-k)do{s.win[h++]=s.win[k++]}while(0!=--x);else s.win.set(s.win.subarray(k,k+x),h),h+=x,k+=x,x=0;break}if(0!=(64&u))return o.msg="invalid distance code",x=o.avail_in-p,x=x>_>>3?_>>3:x,p+=x,w-=x,_-=x<<3,s.bitb=f,s.bitk=_,o.avail_in=p,o.total_in+=w-o.next_in_index,o.next_in_index=w,s.write=h,X;l+=c[S+2],l+=f&J[u],S=3*(d+l),u=c[S]}break}if(0!=(64&u))return 0!=(32&u)?(x=o.avail_in-p,x=x>_>>3?_>>3:x,p+=x,w-=x,_-=x<<3,s.bitb=f,s.bitk=_,o.avail_in=p,o.total_in+=w-o.next_in_index,o.next_in_index=w,s.write=h,1):(o.msg="invalid literal/length code",x=o.avail_in-p,x=x>_>>3?_>>3:x,p+=x,w-=x,_-=x<<3,s.bitb=f,s.bitk=_,o.avail_in=p,o.total_in+=w-o.next_in_index,o.next_in_index=w,s.write=h,X);if(l+=c[S+2],l+=f&J[u],S=3*(d+l),0===(u=c[S])){f>>=c[S+1],_-=c[S+1],s.win[h++]=c[S+2],b--;break}}else f>>=c[S+1],_-=c[S+1],s.win[h++]=c[S+2],b--}while(b>=258&&p>=10);return x=o.avail_in-p,x=x>_>>3?_>>3:x,p+=x,w-=x,_-=x<<3,s.bitb=f,s.bitk=_,o.avail_in=p,o.total_in+=w-o.next_in_index,o.next_in_index=w,s.write=h,0}e.init=(e,a,s,o,l,c)=>{t=0,u=e,f=a,i=s,_=o,r=l,w=c,n=null},e.proc=(e,h,b)=>{let g,m,x,y,k,S,z,v=0,E=0,D=0;for(D=h.next_in_index,y=h.avail_in,v=e.bitb,E=e.bitk,k=e.write,S=k=258&&y>=10&&(e.bitb=v,e.bitk=E,h.avail_in=y,h.total_in+=D-h.next_in_index,h.next_in_index=D,e.write=k,b=p(u,f,i,_,r,w,e,h),D=h.next_in_index,y=h.avail_in,v=e.bitb,E=e.bitk,k=e.write,S=kE;){if(0===y)return e.bitb=v,e.bitk=E,h.avail_in=y,h.total_in+=D-h.next_in_index,h.next_in_index=D,e.write=k,e.inflate_flush(h,b);b=0,y--,v|=(255&h.read_byte(D++))<>>=n[m+1],E-=n[m+1],x=n[m],0===x){l=n[m+2],t=6;break}if(0!=(16&x)){c=15&x,a=n[m+2],t=2;break}if(0==(64&x)){o=x,s=m/3+n[m+2];break}if(0!=(32&x)){t=7;break}return t=9,h.msg="invalid literal/length code",b=X,e.bitb=v,e.bitk=E,h.avail_in=y,h.total_in+=D-h.next_in_index,h.next_in_index=D,e.write=k,e.inflate_flush(h,b);case 2:for(g=c;g>E;){if(0===y)return e.bitb=v,e.bitk=E,h.avail_in=y,h.total_in+=D-h.next_in_index,h.next_in_index=D,e.write=k,e.inflate_flush(h,b);b=0,y--,v|=(255&h.read_byte(D++))<>=g,E-=g,o=f,n=r,s=w,t=3;case 3:for(g=o;g>E;){if(0===y)return e.bitb=v,e.bitk=E,h.avail_in=y,h.total_in+=D-h.next_in_index,h.next_in_index=D,e.write=k,e.inflate_flush(h,b);b=0,y--,v|=(255&h.read_byte(D++))<>=n[m+1],E-=n[m+1],x=n[m],0!=(16&x)){c=15&x,d=n[m+2],t=4;break}if(0==(64&x)){o=x,s=m/3+n[m+2];break}return t=9,h.msg="invalid distance code",b=X,e.bitb=v,e.bitk=E,h.avail_in=y,h.total_in+=D-h.next_in_index,h.next_in_index=D,e.write=k,e.inflate_flush(h,b);case 4:for(g=c;g>E;){if(0===y)return e.bitb=v,e.bitk=E,h.avail_in=y,h.total_in+=D-h.next_in_index,h.next_in_index=D,e.write=k,e.inflate_flush(h,b);b=0,y--,v|=(255&h.read_byte(D++))<>=g,E-=g,t=5;case 5:for(z=k-d;0>z;)z+=e.end;for(;0!==a;){if(0===S&&(k==e.end&&0!==e.read&&(k=0,S=k7&&(E-=8,y++,D--),e.write=k,b=e.inflate_flush(h,b),k=e.write,S=k{}}re.inflate_trees_fixed=(e,t,n,i)=>(e[0]=9,t[0]=5,n[0]=Q,i[0]=$,0);const se=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function oe(e,t){const n=this;let i,r=0,a=0,s=0,o=0;const l=[0],c=[0],d=new ae;let u=0,f=new Int32Array(4320);const w=new re;n.bitk=0,n.bitb=0,n.win=new _(t),n.end=t,n.read=0,n.write=0,n.reset=(e,t)=>{t&&(t[0]=0),6==r&&d.free(e),r=0,n.bitk=0,n.bitb=0,n.read=n.write=0},n.reset(e,null),n.inflate_flush=(e,t)=>{let i,r,a;return r=e.next_out_index,a=n.read,i=(a>n.write?n.end:n.write)-a,i>e.avail_out&&(i=e.avail_out),0!==i&&t==j&&(t=0),e.avail_out-=i,e.total_out+=i,e.next_out.set(n.win.subarray(a,a+i),r),r+=i,a+=i,a==n.end&&(a=0,n.write==n.end&&(n.write=0),i=n.write-a,i>e.avail_out&&(i=e.avail_out),0!==i&&t==j&&(t=0),e.avail_out-=i,e.total_out+=i,e.next_out.set(n.win.subarray(a,a+i),r),r+=i,a+=i),e.next_out_index=r,n.read=a,t},n.proc=(e,t)=>{let _,p,h,b,g,m,x,y;for(b=e.next_in_index,g=e.avail_in,p=n.bitb,h=n.bitk,m=n.write,x=mh;){if(0===g)return n.bitb=p,n.bitk=h,e.avail_in=g,e.total_in+=b-e.next_in_index,e.next_in_index=b,n.write=m,n.inflate_flush(e,t);t=0,g--,p|=(255&e.read_byte(b++))<>>1){case 0:p>>>=3,h-=3,_=7&h,p>>>=_,h-=_,r=1;break;case 1:k=[],S=[],z=[[]],v=[[]],re.inflate_trees_fixed(k,S,z,v),d.init(k[0],S[0],z[0],0,v[0],0),p>>>=3,h-=3,r=6;break;case 2:p>>>=3,h-=3,r=3;break;case 3:return p>>>=3,h-=3,r=9,e.msg="invalid block type",t=X,n.bitb=p,n.bitk=h,e.avail_in=g,e.total_in+=b-e.next_in_index,e.next_in_index=b,n.write=m,n.inflate_flush(e,t)}break;case 1:for(;32>h;){if(0===g)return n.bitb=p,n.bitk=h,e.avail_in=g,e.total_in+=b-e.next_in_index,e.next_in_index=b,n.write=m,n.inflate_flush(e,t);t=0,g--,p|=(255&e.read_byte(b++))<>>16&65535)!=(65535&p))return r=9,e.msg="invalid stored block lengths",t=X,n.bitb=p,n.bitk=h,e.avail_in=g,e.total_in+=b-e.next_in_index,e.next_in_index=b,n.write=m,n.inflate_flush(e,t);a=65535&p,p=h=0,r=0!==a?2:0!==u?7:0;break;case 2:if(0===g)return n.bitb=p,n.bitk=h,e.avail_in=g,e.total_in+=b-e.next_in_index,e.next_in_index=b,n.write=m,n.inflate_flush(e,t);if(0===x&&(m==n.end&&0!==n.read&&(m=0,x=mg&&(_=g),_>x&&(_=x),n.win.set(e.read_buf(b,_),m),b+=_,g-=_,m+=_,x-=_,0!=(a-=_))break;r=0!==u?7:0;break;case 3:for(;14>h;){if(0===g)return n.bitb=p,n.bitk=h,e.avail_in=g,e.total_in+=b-e.next_in_index,e.next_in_index=b,n.write=m,n.inflate_flush(e,t);t=0,g--,p|=(255&e.read_byte(b++))<29||(_>>5&31)>29)return r=9,e.msg="too many length or distance symbols",t=X,n.bitb=p,n.bitk=h,e.avail_in=g,e.total_in+=b-e.next_in_index,e.next_in_index=b,n.write=m,n.inflate_flush(e,t);if(_=258+(31&_)+(_>>5&31),!i||i.length<_)i=[];else for(y=0;_>y;y++)i[y]=0;p>>>=14,h-=14,o=0,r=4;case 4:for(;4+(s>>>10)>o;){for(;3>h;){if(0===g)return n.bitb=p,n.bitk=h,e.avail_in=g,e.total_in+=b-e.next_in_index,e.next_in_index=b,n.write=m,n.inflate_flush(e,t);t=0,g--,p|=(255&e.read_byte(b++))<>>=3,h-=3}for(;19>o;)i[se[o++]]=0;if(l[0]=7,_=w.inflate_trees_bits(i,l,c,f,e),0!=_)return(t=_)==X&&(i=null,r=9),n.bitb=p,n.bitk=h,e.avail_in=g,e.total_in+=b-e.next_in_index,e.next_in_index=b,n.write=m,n.inflate_flush(e,t);o=0,r=5;case 5:for(;_=s,258+(31&_)+(_>>5&31)>o;){let a,d;for(_=l[0];_>h;){if(0===g)return n.bitb=p,n.bitk=h,e.avail_in=g,e.total_in+=b-e.next_in_index,e.next_in_index=b,n.write=m,n.inflate_flush(e,t);t=0,g--,p|=(255&e.read_byte(b++))<d)p>>>=_,h-=_,i[o++]=d;else{for(y=18==d?7:d-14,a=18==d?11:3;_+y>h;){if(0===g)return n.bitb=p,n.bitk=h,e.avail_in=g,e.total_in+=b-e.next_in_index,e.next_in_index=b,n.write=m,n.inflate_flush(e,t);t=0,g--,p|=(255&e.read_byte(b++))<>>=_,h-=_,a+=p&J[y],p>>>=y,h-=y,y=o,_=s,y+a>258+(31&_)+(_>>5&31)||16==d&&1>y)return i=null,r=9,e.msg="invalid bit length repeat",t=X,n.bitb=p,n.bitk=h,e.avail_in=g,e.total_in+=b-e.next_in_index,e.next_in_index=b,n.write=m,n.inflate_flush(e,t);d=16==d?i[y-1]:0;do{i[y++]=d}while(0!=--a);o=y}}if(c[0]=-1,E=[],D=[],R=[],F=[],E[0]=9,D[0]=6,_=s,_=w.inflate_trees_dynamic(257+(31&_),1+(_>>5&31),i,E,D,R,F,f,e),0!=_)return _==X&&(i=null,r=9),t=_,n.bitb=p,n.bitk=h,e.avail_in=g,e.total_in+=b-e.next_in_index,e.next_in_index=b,n.write=m,n.inflate_flush(e,t);d.init(E[0],D[0],f,R[0],f,F[0]),r=6;case 6:if(n.bitb=p,n.bitk=h,e.avail_in=g,e.total_in+=b-e.next_in_index,e.next_in_index=b,n.write=m,1!=(t=d.proc(n,e,t)))return n.inflate_flush(e,t);if(t=0,d.free(e),b=e.next_in_index,g=e.avail_in,p=n.bitb,h=n.bitk,m=n.write,x=m{n.reset(e,null),n.win=null,f=null},n.set_dictionary=(e,t,i)=>{n.win.set(e.subarray(t,t+i),0),n.read=n.write=i},n.sync_point=()=>1==r?1:0}const le=13,ce=[0,0,255,255];function de(){const e=this;function t(e){return e&&e.istate?(e.total_in=e.total_out=0,e.msg=null,e.istate.mode=7,e.istate.blocks.reset(e,null),0):G}e.mode=0,e.method=0,e.was=[0],e.need=0,e.marker=0,e.wbits=0,e.inflateEnd=t=>(e.blocks&&e.blocks.free(t),e.blocks=null,0),e.inflateInit=(n,i)=>(n.msg=null,e.blocks=null,8>i||i>15?(e.inflateEnd(n),G):(e.wbits=i,n.istate.blocks=new oe(n,1<{let n,i;if(!e||!e.istate||!e.next_in)return G;const r=e.istate;for(t=4==t?j:0,n=j;;)switch(r.mode){case 0:if(0===e.avail_in)return n;if(n=t,e.avail_in--,e.total_in++,8!=(15&(r.method=e.read_byte(e.next_in_index++)))){r.mode=le,e.msg="unknown compression method",r.marker=5;break}if(8+(r.method>>4)>r.wbits){r.mode=le,e.msg="invalid win size",r.marker=5;break}r.mode=1;case 1:if(0===e.avail_in)return n;if(n=t,e.avail_in--,e.total_in++,i=255&e.read_byte(e.next_in_index++),((r.method<<8)+i)%31!=0){r.mode=le,e.msg="incorrect header check",r.marker=5;break}if(0==(32&i)){r.mode=7;break}r.mode=2;case 2:if(0===e.avail_in)return n;n=t,e.avail_in--,e.total_in++,r.need=(255&e.read_byte(e.next_in_index++))<<24&4278190080,r.mode=3;case 3:if(0===e.avail_in)return n;n=t,e.avail_in--,e.total_in++,r.need+=(255&e.read_byte(e.next_in_index++))<<16&16711680,r.mode=4;case 4:if(0===e.avail_in)return n;n=t,e.avail_in--,e.total_in++,r.need+=(255&e.read_byte(e.next_in_index++))<<8&65280,r.mode=5;case 5:return 0===e.avail_in?n:(n=t,e.avail_in--,e.total_in++,r.need+=255&e.read_byte(e.next_in_index++),r.mode=6,2);case 6:return r.mode=le,e.msg="need dictionary",r.marker=0,G;case 7:if(n=r.blocks.proc(e,n),n==X){r.mode=le,r.marker=0;break}if(0==n&&(n=t),1!=n)return n;n=t,r.blocks.reset(e,r.was),r.mode=12;case 12:return e.avail_in=0,1;case le:return X;default:return G}},e.inflateSetDictionary=(e,t,n)=>{let i=0,r=n;if(!e||!e.istate||6!=e.istate.mode)return G;const a=e.istate;return r<1<{let n,i,r,a,s;if(!e||!e.istate)return G;const o=e.istate;if(o.mode!=le&&(o.mode=le,o.marker=0),0===(n=e.avail_in))return j;for(i=e.next_in_index,r=o.marker;0!==n&&4>r;)e.read_byte(i)==ce[r]?r++:r=0!==e.read_byte(i)?0:4-r,i++,n--;return e.total_in+=i-e.next_in_index,e.next_in_index=i,e.avail_in=n,o.marker=r,4!=r?X:(a=e.total_in,s=e.total_out,t(e),e.total_in=a,e.total_out=s,o.mode=7,0)},e.inflateSyncPoint=e=>e&&e.istate&&e.istate.blocks?e.istate.blocks.sync_point():G}function ue(){}ue.prototype={inflateInit(e){const t=this;return t.istate=new de,e||(e=15),t.istate.inflateInit(t,e)},inflate(e){const t=this;return t.istate?t.istate.inflate(t,e):G},inflateEnd(){const e=this;if(!e.istate)return G;const t=e.istate.inflateEnd(e);return e.istate=null,t},inflateSync(){const e=this;return e.istate?e.istate.inflateSync(e):G},inflateSetDictionary(e,t){const n=this;return n.istate?n.istate.inflateSetDictionary(n,e,t):G},read_byte(e){return this.next_in[e]},read_buf(e,t){return this.next_in.subarray(e,e+t)}};const fe=4294967295,_e=65535,we=67324752,pe=134695760,he=33639248,be=101075792,ge=117853008,me=22,xe=21589,ye=2048,ke="/",Se=new o(2107,11,31),ze=new o(1980,0,1),ve=void 0,Ee="undefined",De="function";class Re{constructor(e){return class extends z{constructor(t,n){const i=new e(n);super({transform(e,t){t.enqueue(i.append(e))},flush(e){const t=i.flush();t&&e.enqueue(t)}})}}}}let Fe=2;try{typeof F!=Ee&&F.hardwareConcurrency&&(Fe=F.hardwareConcurrency)}catch(e){}const Te={chunkSize:524288,maxWorkers:Fe,terminateWorkerTimeout:5e3,useWebWorkers:!0,useCompressionStream:!0,workerScripts:ve,CompressionStreamNative:typeof D!=Ee&&D,DecompressionStreamNative:typeof R!=Ee&&R},Ae=n.assign({},Te);function Ce(){return Ae}function We(e){return s.max(e.chunkSize,64)}function Ne(e){const{baseURL:n,chunkSize:i,maxWorkers:r,terminateWorkerTimeout:a,useCompressionStream:s,useWebWorkers:o,Deflate:l,Inflate:c,CompressionStream:d,DecompressionStream:u,workerScripts:_}=e;if(Ue("baseURL",n),Ue("chunkSize",i),Ue("maxWorkers",r),Ue("terminateWorkerTimeout",a),Ue("useCompressionStream",s),Ue("useWebWorkers",o),l&&(Ae.CompressionStream=new Re(l)),c&&(Ae.DecompressionStream=new Re(c)),Ue("CompressionStream",d),Ue("DecompressionStream",u),_!==ve){const{deflate:e,inflate:n}=_;if((e||n)&&(Ae.workerScripts||(Ae.workerScripts={})),e){if(!t.isArray(e))throw new f("workerScripts.deflate must be an array");Ae.workerScripts.deflate=e}if(n){if(!t.isArray(n))throw new f("workerScripts.inflate must be an array");Ae.workerScripts.inflate=n}}}function Ue(e,t){t!==ve&&(Ae[e]=t)}const Ie=[];for(let e=0;256>e;e++){let t=e;for(let e=0;8>e;e++)1&t?t=t>>>1^3988292384:t>>>=1;Ie[e]=t}class Oe{constructor(e){this.crc=e||-1}append(e){let t=0|this.crc;for(let n=0,i=0|e.length;i>n;n++)t=t>>>8^Ie[255&(t^e[n])];this.crc=t}get(){return~this.crc}}class Le extends z{constructor(){let e;const t=new Oe;super({transform(e,n){t.append(e),n.enqueue(e)},flush(){const n=new _(4);new h(n.buffer).setUint32(0,t.get()),e.value=n}}),e=this}}function Me(e){if(typeof m==Ee){const t=new _((e=unescape(encodeURIComponent(e))).length);for(let n=0;n0&&t&&(e[n-1]=Pe.partial(t,e[n-1]&2147483648>>t-1,1)),e},partial:(e,t,n)=>32===e?t:(n?0|t:t<<32-e)+1099511627776*e,getPartial:e=>s.round(e/1099511627776)||32,_shiftRight(e,t,n,i){for(void 0===i&&(i=[]);t>=32;t-=32)i.push(n),n=0;if(0===t)return i.concat(e);for(let r=0;r>>t),n=e[r]<<32-t;const r=e.length?e[e.length-1]:0,a=Pe.getPartial(r);return i.push(Pe.partial(t+a&31,t+a>32?n:i.pop(),1)),i}},He={bytes:{fromBits(e){const t=Pe.bitLength(e)/8,n=new _(t);let i;for(let r=0;t>r;r++)0==(3&r)&&(i=e[r/4]),n[r]=i>>>24,i<<=8;return n},toBits(e){const t=[];let n,i=0;for(n=0;n9007199254740991)throw new f("Cannot hash more than 2^53 - 1 bits");const a=new p(n);let s=0;for(let e=t.blockSize+i-(t.blockSize+i&t.blockSize-1);r>=e;e+=t.blockSize)t._block(a.subarray(16*s,16*(s+1))),s+=1;return n.splice(0,16*s),t}finalize(){const e=this;let t=e._buffer;const n=e._h;t=Pe.concat(t,[Pe.partial(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(s.floor(e._length/4294967296)),t.push(0|e._length);t.length;)e._block(t.splice(0,16));return e.reset(),n}_f(e,t,n,i){return e>19?e>39?e>59?e>79?void 0:t^n^i:t&n|t&i|n&i:t^n^i:t&n|~t&i}_S(e,t){return t<>>32-e}_block(e){const n=this,i=n._h,r=t(80);for(let t=0;16>t;t++)r[t]=e[t];let a=i[0],o=i[1],l=i[2],c=i[3],d=i[4];for(let e=0;79>=e;e++){16>e||(r[e]=n._S(1,r[e-3]^r[e-8]^r[e-14]^r[e-16]));const t=n._S(5,a)+n._f(e,o,l,c)+d+r[e]+n._key[s.floor(e/20)]|0;d=c,c=l,l=n._S(30,o),o=a,a=t}i[0]=i[0]+a|0,i[1]=i[1]+o|0,i[2]=i[2]+l|0,i[3]=i[3]+c|0,i[4]=i[4]+d|0}},qe={getRandomValues(e){const t=new p(e.buffer),n=e=>{let t=987654321;const n=4294967295;return()=>(t=36969*(65535&t)+(t>>16)&n,(((t<<16)+(e=18e3*(65535&e)+(e>>16)&n)&n)/4294967296+.5)*(s.random()>.5?1:-1))};for(let i,r=0;rnew Ve.hmacSha1(He.bytes.toBits(e)),pbkdf2(e,t,n,i){if(n=n||1e4,0>i||0>n)throw new f("invalid params to pbkdf2");const r=1+(i>>5)<<2;let a,s,o,l,c;const d=new ArrayBuffer(r),u=new h(d);let _=0;const w=Pe;for(t=He.bytes.toBits(t),c=1;(r||1)>_;c++){for(a=s=e.encrypt(w.concat(t,[c])),o=1;n>o;o++)for(s=e.encrypt(s),l=0;l_&&or&&(e=(new n).update(e).finalize());for(let t=0;r>t;t++)i[0][t]=909522486^e[t],i[1][t]=1549556828^e[t];t._baseHash[0].update(i[0]),t._baseHash[1].update(i[1]),t._resultHash=new n(t._baseHash[0])}reset(){const e=this;e._resultHash=new e._hash(e._baseHash[0]),e._updated=!1}update(e){this._updated=!0,this._resultHash.update(e)}digest(){const e=this,t=e._resultHash.finalize(),n=new e._hash(e._baseHash[1]).update(t).finalize();return e.reset(),n}encrypt(e){if(this._updated)throw new f("encrypt on already updated hmac called!");return this.update(e),this.digest(e)}}},Ze=typeof k!=Ee&&typeof k.getRandomValues==De,Ke="Invalid password",Ye="Invalid signature",Ge="zipjs-abort-check-password";function Xe(e){return Ze?k.getRandomValues(e):qe.getRandomValues(e)}const je=16,Je={name:"PBKDF2"},Qe=n.assign({hash:{name:"HMAC"}},Je),$e=n.assign({iterations:1e3,hash:{name:"SHA-1"}},Je),et=["deriveBits"],tt=[8,12,16],nt=[16,24,32],it=10,rt=[0,0,0,0],at=typeof k!=Ee,st=at&&k.subtle,ot=at&&typeof st!=Ee,lt=He.bytes,ct=class{constructor(e){const t=this;t._tables=[[[],[],[],[],[]],[[],[],[],[],[]]],t._tables[0][0][0]||t._precompute();const n=t._tables[0][4],i=t._tables[1],r=e.length;let a,s,o,l=1;if(4!==r&&6!==r&&8!==r)throw new f("invalid aes key size");for(t._key=[s=e.slice(0),o=[]],a=r;4*r+28>a;a++){let e=s[a-1];(a%r==0||8===r&&a%r==4)&&(e=n[e>>>24]<<24^n[e>>16&255]<<16^n[e>>8&255]<<8^n[255&e],a%r==0&&(e=e<<8^e>>>24^l<<24,l=l<<1^283*(l>>7))),s[a]=s[a-r]^e}for(let e=0;a;e++,a--){const t=s[3&e?a:a-4];o[e]=4>=a||4>e?t:i[0][n[t>>>24]]^i[1][n[t>>16&255]]^i[2][n[t>>8&255]]^i[3][n[255&t]]}}encrypt(e){return this._crypt(e,0)}decrypt(e){return this._crypt(e,1)}_precompute(){const e=this._tables[0],t=this._tables[1],n=e[4],i=t[4],r=[],a=[];let s,o,l,c;for(let e=0;256>e;e++)a[(r[e]=e<<1^283*(e>>7))^e]=e;for(let d=s=0;!n[d];d^=o||1,s=a[s]||1){let a=s^s<<1^s<<2^s<<3^s<<4;a=a>>8^255&a^99,n[d]=a,i[a]=d,c=r[l=r[o=r[d]]];let u=16843009*c^65537*l^257*o^16843008*d,f=257*r[a]^16843008*a;for(let n=0;4>n;n++)e[n][d]=f=f<<24^f>>>8,t[n][a]=u=u<<24^u>>>8}for(let n=0;5>n;n++)e[n]=e[n].slice(0),t[n]=t[n].slice(0)}_crypt(e,t){if(4!==e.length)throw new f("invalid aes block size");const n=this._key[t],i=n.length/4-2,r=[0,0,0,0],a=this._tables[t],s=a[0],o=a[1],l=a[2],c=a[3],d=a[4];let u,_,w,p=e[0]^n[0],h=e[t?3:1]^n[1],b=e[2]^n[2],g=e[t?1:3]^n[3],m=4;for(let e=0;i>e;e++)u=s[p>>>24]^o[h>>16&255]^l[b>>8&255]^c[255&g]^n[m],_=s[h>>>24]^o[b>>16&255]^l[g>>8&255]^c[255&p]^n[m+1],w=s[b>>>24]^o[g>>16&255]^l[p>>8&255]^c[255&h]^n[m+2],g=s[g>>>24]^o[p>>16&255]^l[h>>8&255]^c[255&b]^n[m+3],m+=4,p=u,h=_,b=w;for(let e=0;4>e;e++)r[t?3&-e:e]=d[p>>>24]<<24^d[h>>16&255]<<16^d[b>>8&255]<<8^d[255&g]^n[m++],u=p,p=h,h=b,b=g,g=u;return r}},dt=class{constructor(e,t){this._prf=e,this._initIv=t,this._iv=t}reset(){this._iv=this._initIv}update(e){return this.calculate(this._prf,e,this._iv)}incWord(e){if(255==(e>>24&255)){let t=e>>16&255,n=e>>8&255,i=255&e;255===t?(t=0,255===n?(n=0,255===i?i=0:++i):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=i}else e+=1<<24;return e}incCounter(e){0===(e[0]=this.incWord(e[0]))&&(e[1]=this.incWord(e[1]))}calculate(e,t,n){let i;if(!(i=t.length))return[];const r=Pe.bitLength(t);for(let r=0;i>r;r+=4){this.incCounter(n);const i=e.encrypt(n);t[r]^=i[0],t[r+1]^=i[1],t[r+2]^=i[2],t[r+3]^=i[3]}return Pe.clamp(t,r)}},ut=Ve.hmacSha1;let ft=at&&ot&&typeof st.importKey==De,_t=at&&ot&&typeof st.deriveBits==De;class wt extends z{constructor({password:e,rawPassword:t,signed:i,encryptionStrength:r,checkPasswordOnly:a}){super({start(){n.assign(this,{ready:new g((e=>this.resolveReady=e)),password:gt(e,t),signed:i,strength:r-1,pending:new _})},async transform(e,t){const n=this,{password:i,strength:r,resolveReady:s,ready:o}=n;i?(await(async(e,t,n,i)=>{const r=await bt(e,t,n,xt(i,0,tt[t])),a=xt(i,tt[t]);if(r[0]!=a[0]||r[1]!=a[1])throw new f(Ke)})(n,r,i,xt(e,0,tt[r]+2)),e=xt(e,tt[r]+2),a?t.error(new f(Ge)):s()):await o;const l=new _(e.length-it-(e.length-it)%je);t.enqueue(ht(n,e,l,0,it,!0))},async flush(e){const{signed:t,ctr:n,hmac:i,pending:r,ready:a}=this;if(i&&n){await a;const s=xt(r,0,r.length-it),o=xt(r,r.length-it);let l=new _;if(s.length){const e=kt(lt,s);i.update(e);const t=n.update(e);l=yt(lt,t)}if(t){const e=xt(yt(lt,i.digest()),0,it);for(let t=0;it>t;t++)if(e[t]!=o[t])throw new f(Ye)}e.enqueue(l)}}})}}class pt extends z{constructor({password:e,rawPassword:t,encryptionStrength:i}){let r;super({start(){n.assign(this,{ready:new g((e=>this.resolveReady=e)),password:gt(e,t),strength:i-1,pending:new _})},async transform(e,t){const n=this,{password:i,strength:r,resolveReady:a,ready:s}=n;let o=new _;i?(o=await(async(e,t,n)=>{const i=Xe(new _(tt[t]));return mt(i,await bt(e,t,n,i))})(n,r,i),a()):await s;const l=new _(o.length+e.length-e.length%je);l.set(o,0),t.enqueue(ht(n,e,l,o.length,0))},async flush(e){const{ctr:t,hmac:n,pending:i,ready:a}=this;if(n&&t){await a;let s=new _;if(i.length){const e=t.update(kt(lt,i));n.update(e),s=yt(lt,e)}r.signature=yt(lt,n.digest()).slice(0,it),e.enqueue(mt(s,r.signature))}}}),r=this}}function ht(e,t,n,i,r,a){const{ctr:s,hmac:o,pending:l}=e,c=t.length-r;let d;for(l.length&&(t=mt(l,t),n=((e,t)=>{if(t&&t>e.length){const n=e;(e=new _(t)).set(n,0)}return e})(n,c-c%je)),d=0;c-je>=d;d+=je){const e=kt(lt,xt(t,d,d+je));a&&o.update(e);const r=s.update(e);a||o.update(r),n.set(yt(lt,r),d+i)}return e.pending=xt(t,d),n}async function bt(e,i,r,a){e.password=null;const s=await(async(e,t,n,i,r)=>{if(!ft)return Ve.importKey(t);try{return await st.importKey("raw",t,n,!1,r)}catch(e){return ft=!1,Ve.importKey(t)}})(0,r,Qe,0,et),o=await(async(e,t,n)=>{if(!_t)return Ve.pbkdf2(t,e.salt,$e.iterations,n);try{return await st.deriveBits(e,t,n)}catch(i){return _t=!1,Ve.pbkdf2(t,e.salt,$e.iterations,n)}})(n.assign({salt:a},$e),s,8*(2*nt[i]+2)),l=new _(o),c=kt(lt,xt(l,0,nt[i])),d=kt(lt,xt(l,nt[i],2*nt[i])),u=xt(l,2*nt[i]);return n.assign(e,{keys:{key:c,authentication:d,passwordVerification:u},ctr:new dt(new ct(c),t.from(rt)),hmac:new ut(d)}),u}function gt(e,t){return t===ve?Me(e):t}function mt(e,t){let n=e;return e.length+t.length&&(n=new _(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function xt(e,t,n){return e.subarray(t,n)}function yt(e,t){return e.fromBits(t)}function kt(e,t){return e.toBits(t)}class St extends z{constructor({password:e,passwordVerification:t,checkPasswordOnly:i}){super({start(){n.assign(this,{password:e,passwordVerification:t}),Dt(this,e)},transform(e,t){const n=this;if(n.password){const t=vt(n,e.subarray(0,12));if(n.password=null,t[11]!=n.passwordVerification)throw new f(Ke);e=e.subarray(12)}i?t.error(new f(Ge)):t.enqueue(vt(n,e))}})}}class zt extends z{constructor({password:e,passwordVerification:t}){super({start(){n.assign(this,{password:e,passwordVerification:t}),Dt(this,e)},transform(e,t){const n=this;let i,r;if(n.password){n.password=null;const t=Xe(new _(12));t[11]=n.passwordVerification,i=new _(e.length+t.length),i.set(Et(n,t),0),r=12}else i=new _(e.length),r=0;i.set(Et(n,e),r),t.enqueue(i)}})}}function vt(e,t){const n=new _(t.length);for(let i=0;i>>24]),r=~e.crcKey2.get(),e.keys=[n,i,r]}function Ft(e){const t=2|e.keys[2];return Tt(s.imul(t,1^t)>>>8)}function Tt(e){return 255&e}function At(e){return 4294967295&e}const Ct="deflate-raw";class Wt extends z{constructor(e,{chunkSize:t,CompressionStream:n,CompressionStreamNative:i}){super({});const{compressed:r,encrypted:a,useCompressionStream:s,zipCrypto:o,signed:l,level:c}=e,d=this;let u,f,_=Ut(super.readable);a&&!o||!l||(u=new Le,_=Lt(_,u)),r&&(_=Ot(_,s,{level:c,chunkSize:t},i,n)),a&&(o?_=Lt(_,new zt(e)):(f=new pt(e),_=Lt(_,f))),It(d,_,(()=>{let e;a&&!o&&(e=f.signature),a&&!o||!l||(e=new h(u.value.buffer).getUint32(0)),d.signature=e}))}}class Nt extends z{constructor(e,{chunkSize:t,DecompressionStream:n,DecompressionStreamNative:i}){super({});const{zipCrypto:r,encrypted:a,signed:s,signature:o,compressed:l,useCompressionStream:c}=e;let d,u,_=Ut(super.readable);a&&(r?_=Lt(_,new St(e)):(u=new wt(e),_=Lt(_,u))),l&&(_=Ot(_,c,{chunkSize:t},i,n)),a&&!r||!s||(d=new Le,_=Lt(_,d)),It(this,_,(()=>{if((!a||r)&&s){const e=new h(d.value.buffer);if(o!=e.getUint32(0,!1))throw new f(Ye)}}))}}function Ut(e){return Lt(e,new z({transform(e,t){e&&e.length&&t.enqueue(e)}}))}function It(e,t,i){t=Lt(t,new z({flush:i})),n.defineProperty(e,"readable",{get:()=>t})}function Ot(e,t,n,i,r){try{e=Lt(e,new(t&&i?i:r)(Ct,n))}catch(i){if(!t)return e;try{e=Lt(e,new r(Ct,n))}catch(t){return e}}return e}function Lt(e,t){return e.pipeThrough(t)}const Mt="data",Pt="close",Ht="deflate",Bt="inflate";class qt extends z{constructor(e,t){super({});const i=this,{codecType:r}=e;let a;r.startsWith(Ht)?a=Wt:r.startsWith(Bt)&&(a=Nt);let s=0,o=0;const l=new a(e,t),c=super.readable,d=new z({transform(e,t){e&&e.length&&(o+=e.length,t.enqueue(e))},flush(){n.assign(i,{inputSize:o})}}),u=new z({transform(e,t){e&&e.length&&(s+=e.length,t.enqueue(e))},flush(){const{signature:e}=l;n.assign(i,{signature:e,outputSize:s,inputSize:o})}});n.defineProperty(i,"readable",{get:()=>c.pipeThrough(d).pipeThrough(l).pipeThrough(u)})}}class Vt extends z{constructor(e){let t;super({transform:function n(i,r){if(t){const e=new _(t.length+i.length);e.set(t),e.set(i,t.length),i=e,t=null}i.length>e?(r.enqueue(i.slice(0,e)),n(i.slice(e),r)):t=i},flush(e){t&&t.length&&e.enqueue(t)}})}}let Zt=typeof T!=Ee;class Kt{constructor(e,{readable:t,writable:i},{options:r,config:a,streamOptions:s,useWebWorkers:o,transferStreams:l,scripts:c},d){const{signal:u}=s;return n.assign(e,{busy:!0,readable:t.pipeThrough(new Vt(a.chunkSize)).pipeThrough(new Yt(t,s),{signal:u}),writable:i,options:n.assign({},r),scripts:c,transferStreams:l,terminate:()=>new g((t=>{const{worker:n,busy:i}=e;n?(i?e.resolveTerminated=t:(n.terminate(),t()),e.interface=null):t()})),onTaskFinished(){const{resolveTerminated:t}=e;t&&(e.resolveTerminated=null,e.terminated=!0,e.worker.terminate(),t()),e.busy=!1,d(e)}}),(o&&Zt?jt:Xt)(e,a)}}class Yt extends z{constructor(e,{onstart:t,onprogress:n,size:i,onend:r}){let a=0;super({async start(){t&&await Gt(t,i)},async transform(e,t){a+=e.length,n&&await Gt(n,a,i),t.enqueue(e)},async flush(){e.size=a,r&&await Gt(r,a)}})}}async function Gt(e,...t){try{await e(...t)}catch(e){}}function Xt(e,t){return{run:()=>(async({options:e,readable:t,writable:n,onTaskFinished:i},r)=>{try{const a=new qt(e,r);await t.pipeThrough(a).pipeTo(n,{preventClose:!0,preventAbort:!0});const{signature:s,inputSize:o,outputSize:l}=a;return{signature:s,inputSize:o,outputSize:l}}finally{i()}})(e,t)}}function jt(e,t){const{baseURL:i,chunkSize:r}=t;if(!e.interface){let a;try{a=((e,t,i)=>{const r={type:"module"};let a,s;typeof e==De&&(e=e());try{a=new u(e,t)}catch(t){a=e}if(Jt)try{s=new T(a)}catch(e){Jt=!1,s=new T(a,r)}else s=new T(a,r);return s.addEventListener("message",(e=>(async({data:e},t)=>{const{type:i,value:r,messageId:a,result:s,error:o}=e,{reader:l,writer:c,resolveResult:d,rejectResult:u,onTaskFinished:w}=t;try{if(o){const{message:e,stack:t,code:i,name:r}=o,a=new f(e);n.assign(a,{stack:t,code:i,name:r}),p(a)}else{if("pull"==i){const{value:e,done:n}=await l.read();$t({type:Mt,value:e,done:n,messageId:a},t)}i==Mt&&(await c.ready,await c.write(new _(r)),$t({type:"ack",messageId:a},t)),i==Pt&&p(null,s)}}catch(o){$t({type:Pt,messageId:a},t),p(o)}function p(e,t){e?u(e):d(t),c&&c.releaseLock(),w()}})(e,i))),s})(e.scripts[0],i,e)}catch(n){return Zt=!1,Xt(e,t)}n.assign(e,{worker:a,interface:{run:()=>(async(e,t)=>{let i,r;const a=new g(((e,t)=>{i=e,r=t}));n.assign(e,{reader:null,writer:null,resolveResult:i,rejectResult:r,result:a});const{readable:s,options:o,scripts:l}=e,{writable:c,closed:d}=(e=>{let t;const n=new g((e=>t=e));return{writable:new E({async write(t){const n=e.getWriter();await n.ready,await n.write(t),n.releaseLock()},close(){t()},abort:t=>e.getWriter().abort(t)}),closed:n}})(e.writable),u=$t({type:"start",scripts:l.slice(1),options:o,config:t,readable:s,writable:c},e);u||n.assign(e,{reader:s.getReader(),writer:c.getWriter()});const f=await a;return u||await c.getWriter().close(),await d,f})(e,{chunkSize:r})}})}return e.interface}let Jt=!0,Qt=!0;function $t(e,{worker:t,writer:n,onTaskFinished:i,transferStreams:r}){try{let{value:n,readable:i,writable:a}=e;const s=[];if(n&&(n.byteLength{const n=en.find((e=>!e.busy));if(n)return an(n),new Kt(n,e,t,p);if(en.length<_){const n={indexWorker:nn};return nn++,en.push(n),new Kt(n,e,t,p)}return new g((n=>tn.push({resolve:n,stream:e,workerOptions:t})))})()).run();function p(e){if(tn.length){const[{resolve:t,stream:n,workerOptions:i}]=tn.splice(0,1);t(new Kt(e,n,i,p))}else e.worker?(an(e),((e,t)=>{const{config:n}=t,{terminateWorkerTimeout:i}=n;r.isFinite(i)&&i>=0&&(e.terminated?e.terminated=!1:e.terminateTimeout=setTimeout((async()=>{en=en.filter((t=>t!=e));try{await e.terminate()}catch(e){}}),i))})(e,t)):en=en.filter((t=>t!=e))}}function an(e){const{terminateTimeout:t}=e;t&&(clearTimeout(t),e.terminateTimeout=null)}const sn="HTTP error ",on="HTTP Range not supported",ln="Writer iterator completed too soon",cn="GET",dn="bytes",un=65536,fn="writable";class _n{constructor(){this.size=0}init(){this.initialized=!0}}class wn extends _n{get readable(){const e=this,{chunkSize:t=un}=e,n=new v({start(){this.chunkOffset=0},async pull(i){const{offset:r=0,size:a,diskNumberStart:o}=n,{chunkOffset:l}=this;i.enqueue(await On(e,r+l,s.min(t,a-l),o)),l+t>a?i.close():this.chunkOffset+=t}});return n}}class pn extends _n{constructor(){super();const e=this,t=new E({write:t=>e.writeUint8Array(t)});n.defineProperty(e,fn,{get:()=>t})}writeUint8Array(){}}class hn extends wn{constructor(e){super(),n.assign(this,{blob:e,size:e.size})}async readUint8Array(e,t){const n=this,i=e+t,r=e||it&&(a=a.slice(e,i)),new _(a)}}class bn extends _n{constructor(e){super();const t=new z,i=[];e&&i.push(["Content-Type",e]),n.defineProperty(this,fn,{get:()=>t.writable}),this.blob=new d(t.readable,{headers:i}).blob()}getData(){return this.blob}}class gn extends wn{constructor(e,t){super(),xn(this,e,t)}async init(){await yn(this,Fn,vn),super.init()}readUint8Array(e,t){return kn(this,e,t,Fn,vn)}}class mn extends wn{constructor(e,t){super(),xn(this,e,t)}async init(){await yn(this,Tn,En),super.init()}readUint8Array(e,t){return kn(this,e,t,Tn,En)}}function xn(e,t,i){const{preventHeadRequest:r,useRangeHeader:a,forceRangeRequests:s,combineSizeEocd:o}=i;delete(i=n.assign({},i)).preventHeadRequest,delete i.useRangeHeader,delete i.forceRangeRequests,delete i.combineSizeEocd,delete i.useXHR,n.assign(e,{url:t,options:i,preventHeadRequest:r,useRangeHeader:a,forceRangeRequests:s,combineSizeEocd:o})}async function yn(e,t,n){const{url:i,preventHeadRequest:a,useRangeHeader:s,forceRangeRequests:o,combineSizeEocd:l}=e;if((e=>{const{baseURL:t}=Ce(),{protocol:n}=new u(e,t);return"http:"==n||"https:"==n})(i)&&(s||o)&&(void 0===a||a)){const i=await t(cn,e,Sn(e,l?-22:void 0));if(!o&&i.headers.get("Accept-Ranges")!=dn)throw new f(on);{let a;l&&(e.eocdCache=new _(await i.arrayBuffer()));const s=i.headers.get("Content-Range");if(s){const e=s.trim().split(/\s*\/\s*/);if(e.length){const t=e[1];t&&"*"!=t&&(a=r(t))}}a===ve?await Rn(e,t,n):e.size=a}}else await Rn(e,t,n)}async function kn(e,t,n,i,r){const{useRangeHeader:a,forceRangeRequests:s,eocdCache:o,size:l,options:c}=e;if(a||s){if(o&&t==l-me&&n==me)return o;const r=await i(cn,e,Sn(e,t,n));if(206!=r.status)throw new f(on);return new _(await r.arrayBuffer())}{const{data:i}=e;return i||await r(e,c),new _(e.data.subarray(t,t+n))}}function Sn(e,t=0,i=1){return n.assign({},zn(e),{Range:dn+"="+(0>t?t:t+"-"+(t+i-1))})}function zn({options:e}){const{headers:t}=e;if(t)return Symbol.iterator in t?n.fromEntries(t):t}async function vn(e){await Dn(e,Fn)}async function En(e){await Dn(e,Tn)}async function Dn(e,t){const n=await t(cn,e,zn(e));e.data=new _(await n.arrayBuffer()),e.size||(e.size=e.data.length)}async function Rn(e,t,n){if(e.preventHeadRequest)await n(e,e.options);else{const i=(await t("HEAD",e,zn(e))).headers.get("Content-Length");i?e.size=r(i):await n(e,e.options)}}async function Fn(e,{options:t,url:i},r){const a=await fetch(i,n.assign({},t,{method:e,headers:r}));if(400>a.status)return a;throw 416==a.status?new f(on):new f(sn+(a.statusText||a.status))}function Tn(e,{url:t},i){return new g(((r,a)=>{const s=new XMLHttpRequest;if(s.addEventListener("load",(()=>{if(400>s.status){const e=[];s.getAllResponseHeaders().trim().split(/[\r\n]+/).forEach((t=>{const n=t.trim().split(/\s*:\s*/);n[0]=n[0].trim().replace(/^[a-z]|-[a-z]/g,(e=>e.toUpperCase())),e.push(n)})),r({status:s.status,arrayBuffer:()=>s.response,headers:new l(e)})}else a(416==s.status?new f(on):new f(sn+(s.statusText||s.status)))}),!1),s.addEventListener("error",(e=>a(e.detail?e.detail.error:new f("Network error"))),!1),s.open(e,t),i)for(const e of n.entries(i))s.setRequestHeader(e[0],e[1]);s.responseType="arraybuffer",s.send()}))}class An extends wn{constructor(e,t={}){super(),n.assign(this,{url:e,reader:t.useXHR?new mn(e,t):new gn(e,t)})}set size(e){}get size(){return this.reader.size}async init(){await this.reader.init(),super.init()}readUint8Array(e,t){return this.reader.readUint8Array(e,t)}}class Cn extends wn{constructor(e){super(),this.readers=e}async init(){const e=this,{readers:t}=e;e.lastDiskNumber=0,e.lastDiskOffset=0,await g.all(t.map((async(n,i)=>{await n.init(),i!=t.length-1&&(e.lastDiskOffset+=n.size),e.size+=n.size}))),super.init()}async readUint8Array(e,t,n=0){const i=this,{readers:r}=this;let a,o=n;-1==o&&(o=r.length-1);let l=e;for(;l>=r[o].size;)l-=r[o].size,o++;const c=r[o],d=c.size;if(l+t>d){const r=d-l;a=new _(t),a.set(await On(c,l,r)),a.set(await i.readUint8Array(e+r,t-r,n),r)}else a=await On(c,l,t);return i.lastDiskNumber=s.max(o,i.lastDiskNumber),a}}class Wn extends _n{constructor(e,t=4294967295){super();const i=this;let r,a,s;n.assign(i,{diskNumber:0,diskOffset:0,size:0,maxSize:t,availableSize:t});const o=new E({async write(t){const{availableSize:n}=i;if(s)t.lengtho})}}async function Nn(e,t){if(!e.init||e.initialized)return g.resolve();await e.init(t)}function Un(e){return t.isArray(e)&&(e=new Cn(e)),e instanceof v&&(e={readable:e}),e}function In(e){e.writable===ve&&typeof e.next==De&&(e=new Wn(e)),e instanceof E&&(e={writable:e});const{writable:t}=e;return t.size===ve&&(t.size=0),e instanceof Wn||n.assign(e,{diskNumber:0,diskOffset:0,availableSize:1/0,maxSize:1/0}),e}function On(e,t,n,i){return e.readUint8Array(t,n,i)}const Ln=Cn,Mn=Wn,Pn="\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ ".split("");function Hn(e,t){return t&&"cp437"==t.trim().toLowerCase()?(e=>{{let t="";for(let n=0;nthis[t]=e[t]))}}const si="File format is not recognized",oi="End of central directory not found",li="End of Zip64 central directory not found",ci="End of Zip64 central directory locator not found",di="Central directory header not found",ui="Local file header not found",fi="Zip64 extra field not found",_i="File contains encrypted entry",wi="Encryption method not supported",pi="Compression method not supported",hi="Split zip file",bi="utf-8",gi="cp437",mi=[[Kn,fe],[Yn,fe],[Gn,fe],[Xn,_e]],xi={[_e]:{getValue:Ai,bytes:4},[fe]:{getValue:Ci,bytes:8}};class yi{constructor(e,t={}){n.assign(this,{reader:Un(e),options:t,config:Ce()})}async*getEntriesGenerator(e={}){const t=this;let{reader:i}=t;const{config:r}=t;if(await Nn(i),i.size!==ve&&i.readUint8Array||(i=new hn(await new d(i.readable).blob()),await Nn(i)),i.size{const i=new _(4);return Wi(i).setUint32(0,101010256,!0),await r(22)||await r(s.min(1048582,n));async function r(t){const r=n-t,a=await On(e,r,t);for(let e=a.length-22;e>=0;e--)if(a[e]==i[0]&&a[e+1]==i[1]&&a[e+2]==i[2]&&a[e+3]==i[3])return{offset:r+e,buffer:a.slice(e,e+22).buffer}}})(i,0,i.size);if(!a)throw Ai(Wi(await On(i,0,4)))==pe?new f(hi):new f(oi);const o=Wi(a);let l=Ai(o,12),c=Ai(o,16);const u=a.offset,w=Ti(o,20),p=u+me+w;let h=Ti(o,4);const b=i.lastDiskNumber||0;let m=Ti(o,6),x=Ti(o,8),y=0,k=0;if(c==fe||l==fe||x==_e||m==_e){const e=Wi(await On(i,a.offset-20,20));if(Ai(e,0)!=ge)throw new f(li);c=Ci(e,8);let t=await On(i,c,56,-1),n=Wi(t);const r=a.offset-20-56;if(Ai(n,0)!=be&&c!=r){const e=c;c=r,y=c-e,t=await On(i,c,56,-1),n=Wi(t)}if(Ai(n,0)!=be)throw new f(ci);h==_e&&(h=Ai(n,16)),m==_e&&(m=Ai(n,20)),x==_e&&(x=Ci(n,32)),l==fe&&(l=Ci(n,40)),c-=l}if(cc)throw new f(si);let S=0,z=await On(i,c,l,m),v=Wi(z);if(l){const e=a.offset-l;if(Ai(v,S)!=he&&c!=e){const t=c;c=e,y+=c-t,z=await On(i,c,l,m),v=Wi(z)}}const E=a.offset-c-(i.lastDiskOffset||0);if(l==E||0>E||(l=E,z=await On(i,c,l,m),v=Wi(z)),0>c||c>=i.size)throw new f(si);const D=Ei(t,e,"filenameEncoding"),R=Ei(t,e,"commentEncoding");for(let a=0;x>a;a++){const o=new ki(i,r,t.options);if(Ai(v,S)!=he)throw new f(di);Si(o,v,S+6);const l=!!o.bitFlag.languageEncodingFlag,c=S+46,d=c+o.filenameLength,u=d+o.extraFieldLength,_=Ti(v,S+4),w=0==(0&_),p=z.subarray(c,d),h=Ti(v,S+32),b=u+h,m=z.subarray(u,b),E=l,F=l,T=w&&16==(16&Fi(v,S+38)),A=Ai(v,S+42)+y;n.assign(o,{versionMadeBy:_,msDosCompatible:w,compressedSize:0,uncompressedSize:0,commentLength:h,directory:T,offset:A,diskNumberStart:Ti(v,S+34),internalFileAttribute:Ti(v,S+36),externalFileAttribute:Ai(v,S+38),rawFilename:p,filenameUTF8:E,commentUTF8:F,rawExtraField:z.subarray(d,u)});const C=Ei(t,e,"decodeText")||Hn,[W,N]=await g.all([C(p,E?bi:D||gi),C(m,F?bi:R||gi)]);n.assign(o,{rawComment:m,filename:W,comment:N,directory:T||W.endsWith(ke)}),k=s.max(A,k),await zi(o,o,v,S+6);const U=new ai(o);U.getData=(e,t)=>o.getData(e,U,t),S=b;const{onprogress:I}=e;if(I)try{await I(a+1,x,new ai(o))}catch(e){}yield U}const F=Ei(t,e,"extractPrependedData"),T=Ei(t,e,"extractAppendedData");return F&&(t.prependedData=k>0?await On(i,0,k):new _),t.comment=w?await On(i,u+me,w):new _,T&&(t.appendedData=p>>8&255:w>>>24&255),signature:w,compressed:0!=c,encrypted:k,useWebWorkers:Ei(r,i,"useWebWorkers"),useCompressionStream:Ei(r,i,"useCompressionStream"),transferStreams:Ei(r,i,"transferStreams"),checkPasswordOnly:F},config:d,streamOptions:{signal:R,size:v,onstart:A,onprogress:C,onend:W}};let U=0;try{({outputSize:U}=await rn({readable:D,writable:T},N))}catch(e){if(!F||e.message!=Ge)throw e}finally{const e=Ei(r,i,"preventClose");T.size+=U,e||T.locked||await T.getWriter().close()}return F?ve:e.getData?e.getData():T}}function Si(e,t,i){const r=e.rawBitFlag=Ti(t,i+2),a=1==(1&r),s=Ai(t,i+6);n.assign(e,{encrypted:a,version:Ti(t,i),bitFlag:{level:(6&r)>>1,dataDescriptor:8==(8&r),languageEncodingFlag:(r&ye)==ye},rawLastModDate:s,lastModDate:Di(s),filenameLength:Ti(t,i+22),extraFieldLength:Ti(t,i+24)})}async function zi(e,t,i,r,a){const{rawExtraField:s}=t,c=t.extraField=new l,d=Wi(new _(s));let u=0;try{for(;u{t.zip64=!0;const n=Wi(e.data),i=mi.filter((([e,n])=>t[e]==n));for(let r=0,a=0;r{const r=Wi(e.data),a=Fi(r,4);n.assign(e,{vendorVersion:Fi(r,0),vendorId:Fi(r,2),strength:a,originalCompressionMethod:i,compressionMethod:Ti(r,5)}),t.compressionMethod=e.compressionMethod})(g,t,w),t.extraFieldAES=g):t.compressionMethod=w;const m=c.get(10);m&&(((e,t)=>{const i=Wi(e.data);let r,a=4;try{for(;a{const i=Wi(e.data),r=Fi(i,0),a=[],s=[];n?(1==(1&r)&&(a.push(jn),s.push(Jn)),2==(2&r)&&(a.push(Qn),s.push("rawLastAccessDate")),4==(4&r)&&(a.push($n),s.push("rawCreationDate"))):5>e.data.length||(a.push(jn),s.push(Jn));let l=1;a.forEach(((n,r)=>{if(e.data.length>=l+4){const a=Ai(i,l);t[n]=e[n]=new o(1e3*a);const c=s[r];e[c]=a}l+=4}))})(x,t,a),t.extraFieldExtendedTimestamp=x);const y=c.get(6534);y&&(t.extraFieldUSDZ=y)}async function vi(e,t,i,r,a){const s=Wi(e.data),o=new Oe;o.append(a[i]);const l=Wi(new _(4));l.setUint32(0,o.get(),!0);const c=Ai(s,1);n.assign(e,{version:Fi(s,0),[t]:Hn(e.data.subarray(5)),valid:!a.bitFlag.languageEncodingFlag&&c==Ai(l,0)}),e.valid&&(r[t]=e[t],r[t+"UTF8"]=!0)}function Ei(e,t,n){return t[n]===ve?e.options[n]:t[n]}function Di(e){const t=(4294901760&e)>>16,n=65535&e;try{return new o(1980+((65024&t)>>9),((480&t)>>5)-1,31&t,(63488&n)>>11,(2016&n)>>5,2*(31&n),0)}catch(e){}}function Ri(e){return new o(r(e/a(1e4)-a(116444736e5)))}function Fi(e,t){return e.getUint8(t)}function Ti(e,t){return e.getUint16(t,!0)}function Ai(e,t){return e.getUint32(t,!0)}function Ci(e,t){return r(e.getBigUint64(t,!0))}function Wi(e){return new h(e.buffer)}const Ni="File already exists",Ui="Zip file comment exceeds 64KB",Ii="File entry comment exceeds 64KB",Oi="File entry name exceeds 64KB",Li="Version exceeds 65535",Mi="The strength must equal 1, 2, or 3",Pi="Extra field type exceeds 65535",Hi="Extra field data exceeds 64KB",Bi="Zip64 is not supported (make sure 'keepOrder' is set to 'true')",qi=new _([7,0,2,0,65,69,3,0,0]);let Vi=0;const Zi=[];class Ki{constructor(e,t={}){const i=(e=In(e)).availableSize!==ve&&e.availableSize>0&&e.availableSize!==1/0&&e.maxSize!==ve&&e.maxSize>0&&e.maxSize!==1/0;n.assign(this,{writer:e,addSplitZipSignature:i,options:t,config:Ce(),files:new l,filenames:new c,offset:e.writable.size,pendingEntriesSize:0,pendingAddFileCalls:new c,bufferedWrites:0})}async add(e="",i,r={}){const l=this,{pendingAddFileCalls:c,config:u}=l;let b;ViZi.push(e)));try{if(e=e.trim(),l.filenames.has(e))throw new f(Ni);return l.filenames.add(e),b=(async(e,i,r,l)=>{i=i.trim(),l.directory&&!i.endsWith(ke)?i+=ke:l.directory=i.endsWith(ke);const c=Xi(e,l,"encodeText",Me),u=c(i);if(nr(u)>_e)throw new f(Oi);const b=l.comment||"",m=c(b);if(nr(m)>_e)throw new f(Ii);const x=Xi(e,l,"version",20);if(x>_e)throw new f(Li);const y=Xi(e,l,"versionMadeBy",20);if(y>_e)throw new f(Li);const k=Xi(e,l,jn,new o),S=Xi(e,l,Qn),v=Xi(e,l,$n),E=Xi(e,l,ni,!0),D=Xi(e,l,ei,0),R=Xi(e,l,ti,0),F=Xi(e,l,"password"),T=Xi(e,l,"rawPassword"),A=Xi(e,l,"encryptionStrength",3),C=Xi(e,l,"zipCrypto"),W=Xi(e,l,"extendedTimestamp",!0),N=Xi(e,l,"keepOrder",!0),U=Xi(e,l,"level"),I=Xi(e,l,"useWebWorkers"),O=Xi(e,l,"bufferedWrite"),L=Xi(e,l,"dataDescriptorSignature",!1),M=Xi(e,l,"signal"),P=Xi(e,l,"useCompressionStream");let H=Xi(e,l,"dataDescriptor",!0),B=Xi(e,l,ii);if(F!==ve&&A!==ve&&(1>A||A>3))throw new f(Mi);let q=new _;const{extraField:V}=l;if(V){let e=0,t=0;V.forEach((t=>e+=4+nr(t))),q=new _(e),V.forEach(((e,n)=>{if(n>_e)throw new f(Pi);if(nr(e)>_e)throw new f(Hi);er(q,new w([n]),t),er(q,new w([nr(e)]),t+2),er(q,e,t+4),t+=4+nr(e)}))}let Z=0,K=0,Y=0;const G=!0===B;r&&(r=Un(r),await Nn(r),r.size===ve?(H=!0,(B||B===ve)&&(B=!0,Y=Z=fe)):(Y=r.size,Z=(e=>e+5*(s.floor(e/16383)+1))(Y)));const{diskOffset:X,diskNumber:j,maxSize:J}=e.writer,Q=G||Y>=fe,$=G||Z>=fe,ee=G||e.offset+e.pendingEntriesSize-X>=fe,te=Xi(e,l,"supportZip64SplitFile",!0)&&G||j+s.ceil(e.pendingEntriesSize/J)>=_e;if(ee||Q||$||te){if(!1===B||!N)throw new f(Bi);B=!0}B=B||!1;const ne=(e=>{const{rawFilename:t,lastModDate:n,lastAccessDate:i,creationDate:r,rawPassword:a,password:o,level:l,zip64:c,zipCrypto:d,dataDescriptor:u,directory:f,rawExtraField:w,encryptionStrength:h,extendedTimestamp:b}=e,g=0!==l&&!f,m=!!(o&&nr(o)||a&&nr(a));let x,y,k,S,z=e.version;if(m&&!d){x=new _(nr(qi)+2);const e=tr(x);Ji(e,0,39169),er(x,qi,2),ji(e,8,h)}else x=new _;if(b){k=new _(9+(i?4:0)+(r?4:0));const e=tr(k);Ji(e,0,xe),Ji(e,2,nr(k)-4),S=1+(i?2:0)+(r?4:0),ji(e,4,S);let t=5;Qi(e,t,s.floor(n.getTime()/1e3)),t+=4,i&&(Qi(e,t,s.floor(i.getTime()/1e3)),t+=4),r&&Qi(e,t,s.floor(r.getTime()/1e3));try{y=new _(36);const e=tr(y),t=Gi(n);Ji(e,0,10),Ji(e,2,32),Ji(e,8,1),Ji(e,10,24),$i(e,12,t),$i(e,20,Gi(i)||t),$i(e,28,Gi(r)||t)}catch(e){y=new _}}else y=k=new _;let v=ye;u&&(v|=8);let E=0;g&&(E=8),c&&(z=z>45?z:45),m&&(v|=1,d||(z=z>51?z:51,E=99,g&&(x[9]=8)));const D=new _(26),R=tr(D);Ji(R,0,z),Ji(R,2,v),Ji(R,4,E);const F=new p(1),T=tr(F);let A;A=ze>n?ze:n>Se?Se:n,Ji(T,0,(A.getHours()<<6|A.getMinutes())<<5|A.getSeconds()/2),Ji(T,2,(A.getFullYear()-1980<<4|A.getMonth()+1)<<5|A.getDate());const C=F[0];Qi(R,6,C),Ji(R,22,nr(t));const W=nr(x,k,y,w);Ji(R,24,W);const N=new _(30+nr(t)+W);return Qi(tr(N),0,we),er(N,D,4),er(N,t,30),er(N,x,30+nr(t)),er(N,k,30+nr(t,x)),er(N,y,30+nr(t,x,k)),er(N,w,30+nr(t,x,k,y)),{localHeaderArray:N,headerArray:D,headerView:R,lastModDate:n,rawLastModDate:C,encrypted:m,compressed:g,version:z,compressionMethod:E,extraFieldExtendedTimestampFlag:S,rawExtraFieldExtendedTimestamp:k,rawExtraFieldNTFS:y,rawExtraFieldAES:x,extraFieldLength:W}})(l=n.assign({},l,{rawFilename:u,rawComment:m,version:x,versionMadeBy:y,lastModDate:k,lastAccessDate:S,creationDate:v,rawExtraField:q,zip64:B,zip64UncompressedSize:Q,zip64CompressedSize:$,zip64Offset:ee,zip64DiskNumberStart:te,password:F,rawPassword:T,level:P||e.config.CompressionStream!==ve?U:0,useWebWorkers:I,encryptionStrength:A,extendedTimestamp:W,zipCrypto:C,bufferedWrite:O,keepOrder:N,dataDescriptor:H,dataDescriptorSignature:L,signal:M,msDosCompatible:E,internalFileAttribute:D,externalFileAttribute:R,useCompressionStream:P})),ie=(e=>{const{zip64:t,dataDescriptor:n,dataDescriptorSignature:i}=e;let r,a=new _,s=0;return n&&(a=new _(t?i?24:20:i?16:12),r=tr(a),i&&(s=4,Qi(r,0,134695760))),{dataDescriptorArray:a,dataDescriptorView:r,dataDescriptorOffset:s}})(l),re=nr(ne.localHeaderArray,ie.dataDescriptorArray);let ae;K=re+Z,e.options.usdz&&(K+=K+64),e.pendingEntriesSize+=K;try{ae=await(async(e,i,r,s,o)=>{const{files:l,writer:c}=e,{keepOrder:u,dataDescriptor:w,signal:p}=o,{headerInfo:b}=s,{usdz:m}=e.options,x=t.from(l.values()).pop();let y,k,S,v,E,D,R,F={};l.set(i,F);try{let t;u&&(t=x&&x.lock,F.lock=new g((e=>S=e))),!(o.bufferedWrite||e.writerLocked||e.bufferedWrites&&u)&&w||m?(D=c,await T()):(D=new z,R=new d(D.readable).blob(),D.writable.size=0,y=!0,e.bufferedWrites++,await Nn(c)),await Nn(D);const{writable:b}=c;let{diskOffset:C}=c;if(e.addSplitZipSignature){delete e.addSplitZipSignature;const t=new _(4);Qi(tr(t),0,pe),await Yi(b,t),e.offset+=4}m&&((e,t)=>{const{headerInfo:n}=e;let{localHeaderArray:i,extraFieldLength:r}=n,a=tr(i),s=64-(t+nr(i))%64;4>s&&(s+=64);const o=new _(s),l=tr(o);Ji(l,0,6534),Ji(l,2,s-2);const c=i;n.localHeaderArray=i=new _(nr(c)+s),er(i,c),er(i,o,nr(c)),a=tr(i),Ji(a,28,r+s),e.metadataSize+=s})(s,e.offset-C),y||(await t,await A(b));const{diskNumber:W}=c;if(E=!0,F.diskNumberStart=W,F=await(async(e,t,{diskNumberStart:i,lock:r},s,o,l)=>{const{headerInfo:c,dataDescriptorInfo:d,metadataSize:u}=s,{localHeaderArray:f,headerArray:w,lastModDate:p,rawLastModDate:h,encrypted:b,compressed:g,version:m,compressionMethod:x,rawExtraFieldExtendedTimestamp:y,extraFieldExtendedTimestampFlag:k,rawExtraFieldNTFS:S,rawExtraFieldAES:z}=c,{dataDescriptorArray:v}=d,{rawFilename:E,lastAccessDate:D,creationDate:R,password:F,rawPassword:T,level:A,zip64:C,zip64UncompressedSize:W,zip64CompressedSize:N,zip64Offset:U,zip64DiskNumberStart:I,zipCrypto:O,dataDescriptor:L,directory:M,versionMadeBy:P,rawComment:H,rawExtraField:B,useWebWorkers:q,onstart:V,onprogress:Z,onend:K,signal:Y,encryptionStrength:G,extendedTimestamp:X,msDosCompatible:j,internalFileAttribute:J,externalFileAttribute:Q,useCompressionStream:$}=l,ee={lock:r,versionMadeBy:P,zip64:C,directory:!!M,filenameUTF8:!0,rawFilename:E,commentUTF8:!0,rawComment:H,rawExtraFieldExtendedTimestamp:y,rawExtraFieldNTFS:S,rawExtraFieldAES:z,rawExtraField:B,extendedTimestamp:X,msDosCompatible:j,internalFileAttribute:J,externalFileAttribute:Q,diskNumberStart:i};let te,ne=0,ie=0;const{writable:re}=t;if(e){e.chunkSize=We(o),await Yi(re,f);const t=e.readable,n=t.size=e.size,i={options:{codecType:Ht,level:A,rawPassword:T,password:F,encryptionStrength:G,zipCrypto:b&&O,passwordVerification:b&&O&&h>>8&255,signed:!0,compressed:g,encrypted:b,useWebWorkers:q,useCompressionStream:$,transferStreams:!1},config:o,streamOptions:{signal:Y,size:n,onstart:V,onprogress:Z,onend:K}},r=await rn({readable:t,writable:re},i);ie=r.inputSize,ne=r.outputSize,te=r.signature,re.size+=ie}else await Yi(re,f);let ae;if(C){let e=4;W&&(e+=8),N&&(e+=8),U&&(e+=8),I&&(e+=4),ae=new _(e)}else ae=new _;return((e,t)=>{const{signature:n,rawExtraFieldZip64:i,compressedSize:r,uncompressedSize:s,headerInfo:o,dataDescriptorInfo:l}=e,{headerView:c,encrypted:d}=o,{dataDescriptorView:u,dataDescriptorOffset:f}=l,{zip64:_,zip64UncompressedSize:w,zip64CompressedSize:p,zipCrypto:h,dataDescriptor:b}=t;if(d&&!h||n===ve||(Qi(c,10,n),b&&Qi(u,f,n)),_){const e=tr(i);Ji(e,0,1),Ji(e,2,nr(i)-4);let t=4;w&&(Qi(c,18,fe),$i(e,t,a(s)),t+=8),p&&(Qi(c,14,fe),$i(e,t,a(r))),b&&($i(u,f+4,a(r)),$i(u,f+12,a(s)))}else Qi(c,14,r),Qi(c,18,s),b&&(Qi(u,f+4,r),Qi(u,f+8,s))})({signature:te,rawExtraFieldZip64:ae,compressedSize:ne,uncompressedSize:ie,headerInfo:c,dataDescriptorInfo:d},l),L&&await Yi(re,v),n.assign(ee,{uncompressedSize:ie,compressedSize:ne,lastModDate:p,rawLastModDate:h,creationDate:R,lastAccessDate:D,encrypted:b,size:u+ne,compressionMethod:x,version:m,headerArray:w,signature:te,rawExtraFieldZip64:ae,extraFieldExtendedTimestampFlag:k,zip64UncompressedSize:W,zip64CompressedSize:N,zip64Offset:U,zip64DiskNumberStart:I}),ee})(r,D,F,s,e.config,o),E=!1,l.set(i,F),F.filename=i,y){await D.writable.getWriter().close();let e=await R;await t,await T(),v=!0,w||(e=await(async(e,t,n,{zipCrypto:i})=>{let r;r=await t.slice(0,26).arrayBuffer(),26!=r.byteLength&&(r=r.slice(0,26));const a=new h(r);return e.encrypted&&!i||Qi(a,14,e.signature),e.zip64?(Qi(a,18,fe),Qi(a,22,fe)):(Qi(a,18,e.compressedSize),Qi(a,22,e.uncompressedSize)),await Yi(n,new _(r)),t.slice(r.byteLength)})(F,e,b,o)),await A(b),F.diskNumberStart=c.diskNumber,C=c.diskOffset,await e.stream().pipeTo(b,{preventClose:!0,preventAbort:!0,signal:p}),b.size+=e.size,v=!1}if(F.offset=e.offset-C,F.zip64)((e,t)=>{const{rawExtraFieldZip64:n,offset:i,diskNumberStart:r}=e,{zip64UncompressedSize:s,zip64CompressedSize:o,zip64Offset:l,zip64DiskNumberStart:c}=t,d=tr(n);let u=4;s&&(u+=8),o&&(u+=8),l&&($i(d,u,a(i)),u+=8),c&&Qi(d,u,r)})(F,o);else if(F.offset>=fe)throw new f(Bi);return e.offset+=F.size,F}catch(t){if(y&&v||!y&&E){if(e.hasCorruptedEntries=!0,t)try{t.corruptedEntry=!0}catch(e){}y?e.offset+=D.writable.size:e.offset=D.writable.size}throw l.delete(i),t}finally{y&&e.bufferedWrites--,S&&S(),k&&k()}async function T(){e.writerLocked=!0;const{lockWriter:t}=e;e.lockWriter=new g((t=>k=()=>{e.writerLocked=!1,t()})),await t}async function A(e){nr(b.localHeaderArray)>c.availableSize&&(c.availableSize=0,await Yi(e,new _))}})(e,i,r,{headerInfo:ne,dataDescriptorInfo:ie,metadataSize:re},l)}finally{e.pendingEntriesSize-=K}return n.assign(ae,{name:i,comment:b,extraField:V}),new ai(ae)})(l,e,i,r),c.add(b),await b}catch(t){throw l.filenames.delete(e),t}finally{c.delete(b);const e=Zi.shift();e?e():Vi--}}async close(e=new _,n={}){const{pendingAddFileCalls:i,writer:r}=this,{writable:o}=r;for(;i.size;)await g.allSettled(t.from(i));return await(async(e,n,i)=>{const{files:r,writer:o}=e,{diskOffset:l,writable:c}=o;let{diskNumber:d}=o,u=0,w=0,p=e.offset-l,h=r.size;for(const[,e]of r){const{rawFilename:t,rawExtraFieldZip64:n,rawExtraFieldAES:i,rawComment:r,rawExtraFieldNTFS:a,rawExtraField:o,extendedTimestamp:l,extraFieldExtendedTimestampFlag:c,lastModDate:d}=e;let u;if(l){u=new _(9);const e=tr(u);Ji(e,0,xe),Ji(e,2,5),ji(e,4,c),Qi(e,5,s.floor(d.getTime()/1e3))}else u=new _;e.rawExtraFieldCDExtendedTimestamp=u,w+=46+nr(t,r,n,i,a,u,o)}const b=new _(w),g=tr(b);await Nn(o);let m=0;for(const[e,n]of t.from(r.values()).entries()){const{offset:t,rawFilename:a,rawExtraFieldZip64:s,rawExtraFieldAES:l,rawExtraFieldCDExtendedTimestamp:d,rawExtraFieldNTFS:f,rawExtraField:_,rawComment:w,versionMadeBy:p,headerArray:h,directory:x,zip64:y,zip64UncompressedSize:k,zip64CompressedSize:S,zip64DiskNumberStart:z,zip64Offset:v,msDosCompatible:E,internalFileAttribute:D,externalFileAttribute:R,diskNumberStart:F,uncompressedSize:T,compressedSize:A}=n,C=nr(s,l,d,f,_);Qi(g,u,he),Ji(g,u+4,p);const W=tr(h);k||Qi(W,18,T),S||Qi(W,14,A),er(b,h,u+6),Ji(g,u+30,C),Ji(g,u+32,nr(w)),Ji(g,u+34,y&&z?_e:F),Ji(g,u+36,D),R?Qi(g,u+38,R):x&&E&&ji(g,u+38,16),Qi(g,u+42,y&&v?fe:t),er(b,a,u+46),er(b,s,u+46+nr(a)),er(b,l,u+46+nr(a,s)),er(b,d,u+46+nr(a,s,l)),er(b,f,u+46+nr(a,s,l,d)),er(b,_,u+46+nr(a,s,l,d,f)),er(b,w,u+46+nr(a)+C);const N=46+nr(a,w)+C;if(u-m>o.availableSize&&(o.availableSize=0,await Yi(c,b.slice(m,u)),m=u),u+=N,i.onprogress)try{await i.onprogress(e+1,r.size,new ai(n))}catch(e){}}await Yi(c,m?b.slice(m):b);let x=o.diskNumber;const{availableSize:y}=o;me>y&&x++;let k=Xi(e,i,"zip64");if(!(fe>p&&fe>w&&_e>h&&_e>x)){if(!1===k)throw new f(Bi);k=!0}const S=new _(k?98:me),z=tr(S);u=0,k&&(Qi(z,0,be),$i(z,4,a(44)),Ji(z,12,45),Ji(z,14,45),Qi(z,16,x),Qi(z,20,d),$i(z,24,a(h)),$i(z,32,a(h)),$i(z,40,a(w)),$i(z,48,a(p)),Qi(z,56,ge),$i(z,64,a(p)+a(w)),Qi(z,72,x+1),Xi(e,i,"supportZip64SplitFile",!0)&&(x=_e,d=_e),h=_e,p=fe,w=fe,u+=76),Qi(z,u,101010256),Ji(z,u+4,x),Ji(z,u+6,d),Ji(z,u+8,h),Ji(z,u+10,h),Qi(z,u+12,w),Qi(z,u+16,p);const v=nr(n);if(v){if(v>_e)throw new f(Ui);Ji(z,u+20,v)}await Yi(c,S),v&&await Yi(c,n)})(this,e,n),Xi(this,n,"preventClose")||await o.getWriter().close(),r.getData?r.getData():o}}async function Yi(e,t){const n=e.getWriter();try{await n.ready,e.size+=nr(t),await n.write(t)}finally{n.releaseLock()}}function Gi(e){if(e)return(a(e.getTime())+a(116444736e5))*a(1e4)}function Xi(e,t,n,i){const r=t[n]===ve?e.options[n]:t[n];return r===ve?i:r}function ji(e,t,n){e.setUint8(t,n)}function Ji(e,t,n){e.setUint16(t,n,!0)}function Qi(e,t,n){e.setUint32(t,n,!0)}function $i(e,t,n){e.setBigUint64(t,n,!0)}function er(e,t,n){e.set(t,n)}function tr(e){return new h(e.buffer)}function nr(...e){let t=0;return e.forEach((e=>e&&(t+=e.length))),t}Ne({Deflate:function(e){const t=new Y,n=(i=e&&e.chunkSize?e.chunkSize:65536)+5*(s.floor(i/16383)+1);var i;const r=new _(n);let a=e?e.level:-1;void 0===a&&(a=-1),t.deflateInit(a),t.next_out=r,this.append=(e,i)=>{let a,s,o=0,l=0,c=0;const d=[];if(e.length){t.next_in_index=0,t.next_in=e,t.avail_in=e.length;do{if(t.next_out_index=0,t.avail_out=n,a=t.deflate(0),0!=a)throw new f("deflating: "+t.msg);t.next_out_index&&(t.next_out_index==n?d.push(new _(r)):d.push(r.subarray(0,t.next_out_index))),c+=t.next_out_index,i&&t.next_in_index>0&&t.next_in_index!=o&&(i(t.next_in_index),o=t.next_in_index)}while(t.avail_in>0||0===t.avail_out);return d.length>1?(s=new _(c),d.forEach((e=>{s.set(e,l),l+=e.length}))):s=d[0]?new _(d[0]):new _,s}},this.flush=()=>{let e,i,a=0,s=0;const o=[];do{if(t.next_out_index=0,t.avail_out=n,e=t.deflate(4),1!=e&&0!=e)throw new f("deflating: "+t.msg);n-t.avail_out>0&&o.push(r.slice(0,t.next_out_index)),s+=t.next_out_index}while(t.avail_in>0||0===t.avail_out);return t.deflateEnd(),i=new _(s),o.forEach((e=>{i.set(e,a),a+=e.length})),i}},Inflate:function(e){const t=new ue,n=e&&e.chunkSize?s.floor(2*e.chunkSize):131072,i=new _(n);let r=!1;t.inflateInit(),t.next_out=i,this.append=(e,a)=>{const s=[];let o,l,c=0,d=0,u=0;if(0!==e.length){t.next_in_index=0,t.next_in=e,t.avail_in=e.length;do{if(t.next_out_index=0,t.avail_out=n,0!==t.avail_in||r||(t.next_in_index=0,r=!0),o=t.inflate(0),r&&o===j){if(0!==t.avail_in)throw new f("inflating: bad input")}else if(0!==o&&1!==o)throw new f("inflating: "+t.msg);if((r||1===o)&&t.avail_in===e.length)throw new f("inflating: bad input");t.next_out_index&&(t.next_out_index===n?s.push(new _(i)):s.push(i.subarray(0,t.next_out_index))),u+=t.next_out_index,a&&t.next_in_index>0&&t.next_in_index!=c&&(a(t.next_in_index),c=t.next_in_index)}while(t.avail_in>0||0===t.avail_out);return s.length>1?(l=new _(u),s.forEach((e=>{l.set(e,d),d+=e.length}))):l=s[0]?new _(s[0]):new _,l}},this.flush=()=>{t.inflateEnd()}}}),e.BlobReader=hn,e.BlobWriter=bn,e.Data64URIReader=class extends wn{constructor(e){super();let t=e.length;for(;"="==e.charAt(t-1);)t--;const i=e.indexOf(",")+1;n.assign(this,{dataURI:e,dataStart:i,size:s.floor(.75*(t-i))})}readUint8Array(e,t){const{dataStart:n,dataURI:i}=this,r=new _(t),a=4*s.floor(e/3),o=atob(i.substring(a+n,4*s.ceil((e+t)/3)+n)),l=e-3*s.floor(a/4);for(let e=l;l+t>e;e++)r[e-l]=o.charCodeAt(e);return r}},e.Data64URIWriter=class extends pn{constructor(e){super(),n.assign(this,{data:"data:"+(e||"")+";base64,",pending:[]})}writeUint8Array(e){const t=this;let n=0,r=t.pending;const a=t.pending.length;for(t.pending="",n=0;n<3*s.floor((a+e.length)/3)-a;n++)r+=i.fromCharCode(e[n]);for(;n2?t.data+=S(r):t.pending=r}getData(){return this.data+S(this.pending)}},e.ERR_BAD_FORMAT=si,e.ERR_CENTRAL_DIRECTORY_NOT_FOUND=di,e.ERR_DUPLICATED_NAME=Ni,e.ERR_ENCRYPTED=_i,e.ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND=ci,e.ERR_EOCDR_NOT_FOUND=oi,e.ERR_EOCDR_ZIP64_NOT_FOUND=li,e.ERR_EXTRAFIELD_ZIP64_NOT_FOUND=fi,e.ERR_HTTP_RANGE=on,e.ERR_INVALID_COMMENT=Ui,e.ERR_INVALID_ENCRYPTION_STRENGTH=Mi,e.ERR_INVALID_ENTRY_COMMENT=Ii,e.ERR_INVALID_ENTRY_NAME=Oi,e.ERR_INVALID_EXTRAFIELD_DATA=Hi,e.ERR_INVALID_EXTRAFIELD_TYPE=Pi,e.ERR_INVALID_PASSWORD=Ke,e.ERR_INVALID_SIGNATURE=Ye,e.ERR_INVALID_VERSION=Li,e.ERR_ITERATOR_COMPLETED_TOO_SOON=ln,e.ERR_LOCAL_FILE_HEADER_NOT_FOUND=ui,e.ERR_SPLIT_ZIP_FILE=hi,e.ERR_UNSUPPORTED_COMPRESSION=pi,e.ERR_UNSUPPORTED_ENCRYPTION=wi,e.ERR_UNSUPPORTED_FORMAT=Bi,e.HttpRangeReader=class extends An{constructor(e,t={}){t.useRangeHeader=!0,super(e,t)}},e.HttpReader=An,e.Reader=wn,e.SplitDataReader=Cn,e.SplitDataWriter=Wn,e.SplitZipReader=Ln,e.SplitZipWriter=Mn,e.TextReader=class extends hn{constructor(e){super(new b([e],{type:"text/plain"}))}},e.TextWriter=class extends bn{constructor(e){super(e),n.assign(this,{encoding:e,utf8:!e||"utf-8"==e.toLowerCase()})}async getData(){const{encoding:e,utf8:t}=this,i=await super.getData();if(i.text&&t)return i.text();{const t=new FileReader;return new g(((r,a)=>{n.assign(t,{onload:({target:e})=>r(e.result),onerror:()=>a(t.error)}),t.readAsText(i,e)}))}}},e.Uint8ArrayReader=class extends wn{constructor(e){super(),n.assign(this,{array:e,size:e.length})}readUint8Array(e,t){return this.array.slice(e,e+t)}},e.Uint8ArrayWriter=class extends pn{init(e=0){n.assign(this,{offset:0,array:new _(e)}),super.init()}writeUint8Array(e){const t=this;if(t.offset+e.length>t.array.length){const n=t.array;t.array=new _(n.length+e.length),t.array.set(n)}t.array.set(e,t.offset),t.offset+=e.length}getData(){return this.array}},e.Writer=pn,e.ZipReader=yi,e.ZipReaderStream=class{constructor(e={}){const{readable:t,writable:n}=new z,i=new yi(t,e).getEntriesGenerator();this.readable=new v({async pull(e){const{done:t,value:n}=await i.next();if(t)return e.close();const r={...n,readable:(()=>{const{readable:e,writable:t}=new z;if(n.getData)return n.getData(t),e})()};delete r.getData,e.enqueue(r)}}),this.writable=n}},e.ZipWriter=Ki,e.ZipWriterStream=class{constructor(e={}){const{readable:t,writable:n}=new z;this.readable=t,this.zipWriter=new Ki(n,e)}transform(e){const{readable:t,writable:n}=new z({flush:()=>{this.zipWriter.close()}});return this.zipWriter.add(e,t),{readable:this.readable,writable:n}}writable(e){const{readable:t,writable:n}=new z;return this.zipWriter.add(e,t),n}close(e,t={}){return this.zipWriter.close(e,t)}},e.configure=Ne,e.getMimeType=()=>"application/octet-stream",e.initReader=Un,e.initStream=Nn,e.initWriter=In,e.readUint8Array=On,e.terminateWorkers=async()=>{await g.allSettled(en.map((e=>(an(e),e.terminate()))))},n.defineProperty(e,"__esModule",{value:!0})})); diff --git a/demos/lib/zip.js b/demos/lib/zip.js index ced2db13..32dd9fc2 100644 --- a/demos/lib/zip.js +++ b/demos/lib/zip.js @@ -2779,35 +2779,43 @@ const { preventHeadRequest, useRangeHeader, - forceRangeRequests + forceRangeRequests, + combineSizeEocd } = options; options = Object.assign({}, options); delete options.preventHeadRequest; delete options.useRangeHeader; delete options.forceRangeRequests; + delete options.combineSizeEocd; delete options.useXHR; Object.assign(httpReader, { url, options, preventHeadRequest, useRangeHeader, - forceRangeRequests + forceRangeRequests, + combineSizeEocd }); } async function initHttpReader(httpReader, sendRequest, getRequestData) { const { url, + preventHeadRequest, useRangeHeader, - forceRangeRequests + forceRangeRequests, + combineSizeEocd } = httpReader; - if (isHttpFamily(url) && (useRangeHeader || forceRangeRequests)) { - const { headers } = await sendRequest(HTTP_METHOD_GET, httpReader, getRangeHeaders(httpReader)); - if (!forceRangeRequests && headers.get(HTTP_HEADER_ACCEPT_RANGES) != HTTP_RANGE_UNIT) { + if (isHttpFamily(url) && (useRangeHeader || forceRangeRequests) && (typeof preventHeadRequest == "undefined" || preventHeadRequest)) { + const response = await sendRequest(HTTP_METHOD_GET, httpReader, getRangeHeaders(httpReader, combineSizeEocd ? -END_OF_CENTRAL_DIR_LENGTH : undefined)); + if (!forceRangeRequests && response.headers.get(HTTP_HEADER_ACCEPT_RANGES) != HTTP_RANGE_UNIT) { throw new Error(ERR_HTTP_RANGE); } else { + if (combineSizeEocd) { + httpReader.eocdCache = new Uint8Array(await response.arrayBuffer()); + } let contentSize; - const contentRangeHeader = headers.get(HTTP_HEADER_CONTENT_RANGE); + const contentRangeHeader = response.headers.get(HTTP_HEADER_CONTENT_RANGE); if (contentRangeHeader) { const splitHeader = contentRangeHeader.trim().split(/\s*\/\s*/); if (splitHeader.length) { @@ -2832,9 +2840,14 @@ const { useRangeHeader, forceRangeRequests, + eocdCache, + size, options } = httpReader; if (useRangeHeader || forceRangeRequests) { + if (eocdCache && index == size - END_OF_CENTRAL_DIR_LENGTH && length == END_OF_CENTRAL_DIR_LENGTH) { + return eocdCache; + } const response = await sendRequest(HTTP_METHOD_GET, httpReader, getRangeHeaders(httpReader, index, length)); if (response.status != 206) { throw new Error(ERR_HTTP_RANGE); @@ -2850,7 +2863,7 @@ } function getRangeHeaders(httpReader, index = 0, length = 1) { - return Object.assign({}, getHeaders(httpReader), { [HTTP_HEADER_RANGE]: HTTP_RANGE_UNIT + "=" + index + "-" + (index + length - 1) }); + return Object.assign({}, getHeaders(httpReader), { [HTTP_HEADER_RANGE]: HTTP_RANGE_UNIT + "=" + (index < 0 ? index : index + "-" + (index + length - 1)) }); } function getHeaders({ options }) { @@ -3545,9 +3558,10 @@ commentUTF8, rawExtraField: directoryArray.subarray(extraFieldOffset, commentOffset) }); + const decode = getOptionValue$1(zipReader, options, "decodeText") || decodeText; const [filename, comment] = await Promise.all([ - decodeText(rawFilename, filenameUTF8 ? CHARSET_UTF8 : filenameEncoding || CHARSET_CP437), - decodeText(rawComment, commentUTF8 ? CHARSET_UTF8 : commentEncoding || CHARSET_CP437) + decode(rawFilename, filenameUTF8 ? CHARSET_UTF8 : filenameEncoding || CHARSET_CP437), + decode(rawComment, commentUTF8 ? CHARSET_UTF8 : commentEncoding || CHARSET_CP437) ]); Object.assign(fileEntry, { rawComment, @@ -4151,12 +4165,13 @@ } else { options.directory = name.endsWith(DIRECTORY_SIGNATURE); } - const rawFilename = encodeText(name); + const encode = getOptionValue(zipWriter, options, "encodeText", encodeText); + const rawFilename = encode(name); if (getLength(rawFilename) > MAX_16_BITS) { throw new Error(ERR_INVALID_ENTRY_NAME); } const comment = options.comment || ""; - const rawComment = encodeText(comment); + const rawComment = encode(comment); if (getLength(rawComment) > MAX_16_BITS) { throw new Error(ERR_INVALID_ENTRY_COMMENT); } @@ -4259,7 +4274,7 @@ zip64DiskNumberStart, password, rawPassword, - level, + level: !useCompressionStream && zipWriter.config.CompressionStream === UNDEFINED_VALUE ? 0 : level, useWebWorkers, encryptionStrength, extendedTimestamp, diff --git a/demos/lib/zip.min.js b/demos/lib/zip.min.js index 78a5ddd6..e55cee06 100644 --- a/demos/lib/zip.min.js +++ b/demos/lib/zip.min.js @@ -1 +1 @@ -((e,t)=>{"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).zip={})})(this,(function(e){"use strict";const{Array:t,Object:n,String:r,Number:s,BigInt:i,Math:a,Date:o,Map:c,Set:l,Response:u,URL:f,Error:d,Uint8Array:w,Uint16Array:p,Uint32Array:h,DataView:g,Blob:m,Promise:y,TextEncoder:b,TextDecoder:S,document:k,crypto:z,btoa:v,TransformStream:x,ReadableStream:A,WritableStream:_,CompressionStream:C,DecompressionStream:D,navigator:W,Worker:R}="undefined"!=typeof globalThis?globalThis:this||self,F=4294967295,E=65535,T=67324752,L=134695760,U=33639248,I=101075792,N=117853008,q=22,O=21589,P=2048,H="/",M=new o(2107,11,31),B=new o(1980,0,1),V=void 0,Z="undefined",K="function";class G{constructor(e){return class extends x{constructor(t,n){const r=new e(n);super({transform(e,t){t.enqueue(r.append(e))},flush(e){const t=r.flush();t&&e.enqueue(t)}})}}}}let X=2;try{typeof W!=Z&&W.hardwareConcurrency&&(X=W.hardwareConcurrency)}catch(e){}const Y={chunkSize:524288,maxWorkers:X,terminateWorkerTimeout:5e3,useWebWorkers:!0,useCompressionStream:!0,workerScripts:V,CompressionStreamNative:typeof C!=Z&&C,DecompressionStreamNative:typeof D!=Z&&D},j=n.assign({},Y);function J(){return j}function Q(e){return a.max(e.chunkSize,64)}function $(e){const{baseURL:n,chunkSize:r,maxWorkers:s,terminateWorkerTimeout:i,useCompressionStream:a,useWebWorkers:o,Deflate:c,Inflate:l,CompressionStream:u,DecompressionStream:f,workerScripts:w}=e;if(ee("baseURL",n),ee("chunkSize",r),ee("maxWorkers",s),ee("terminateWorkerTimeout",i),ee("useCompressionStream",a),ee("useWebWorkers",o),c&&(j.CompressionStream=new G(c)),l&&(j.DecompressionStream=new G(l)),ee("CompressionStream",u),ee("DecompressionStream",f),w!==V){const{deflate:e,inflate:n}=w;if((e||n)&&(j.workerScripts||(j.workerScripts={})),e){if(!t.isArray(e))throw new d("workerScripts.deflate must be an array");j.workerScripts.deflate=e}if(n){if(!t.isArray(n))throw new d("workerScripts.inflate must be an array");j.workerScripts.inflate=n}}}function ee(e,t){t!==V&&(j[e]=t)}function te(e,t,r){return class{constructor(s){const i=this;var a,o;a=s,o="level",(typeof n.hasOwn===K?n.hasOwn(a,o):a.hasOwnProperty(o))&&s.level===V&&delete s.level,i.codec=new e(n.assign({},t,s)),r(i.codec,(e=>{if(i.pendingData){const t=i.pendingData;i.pendingData=new w(t.length+e.length);const{pendingData:n}=i;n.set(t,0),n.set(e,t.length)}else i.pendingData=new w(e)}))}append(e){return this.codec.push(e),s(this)}flush(){return this.codec.push(new w,!0),s(this)}};function s(e){if(e.pendingData){const t=e.pendingData;return e.pendingData=null,t}return new w}}const ne=[];for(let e=0;256>e;e++){let t=e;for(let e=0;8>e;e++)1&t?t=t>>>1^3988292384:t>>>=1;ne[e]=t}class re{constructor(e){this.crc=e||-1}append(e){let t=0|this.crc;for(let n=0,r=0|e.length;r>n;n++)t=t>>>8^ne[255&(t^e[n])];this.crc=t}get(){return~this.crc}}class se extends x{constructor(){let e;const t=new re;super({transform(e,n){t.append(e),n.enqueue(e)},flush(){const n=new w(4);new g(n.buffer).setUint32(0,t.get()),e.value=n}}),e=this}}function ie(e){if(typeof b==Z){const t=new w((e=unescape(encodeURIComponent(e))).length);for(let n=0;n0&&t&&(e[n-1]=ae.partial(t,e[n-1]&2147483648>>t-1,1)),e},partial:(e,t,n)=>32===e?t:(n?0|t:t<<32-e)+1099511627776*e,getPartial:e=>a.round(e/1099511627776)||32,_shiftRight(e,t,n,r){for(void 0===r&&(r=[]);t>=32;t-=32)r.push(n),n=0;if(0===t)return r.concat(e);for(let s=0;s>>t),n=e[s]<<32-t;const s=e.length?e[e.length-1]:0,i=ae.getPartial(s);return r.push(ae.partial(t+i&31,t+i>32?n:r.pop(),1)),r}},oe={bytes:{fromBits(e){const t=ae.bitLength(e)/8,n=new w(t);let r;for(let s=0;t>s;s++)0==(3&s)&&(r=e[s/4]),n[s]=r>>>24,r<<=8;return n},toBits(e){const t=[];let n,r=0;for(n=0;n9007199254740991)throw new d("Cannot hash more than 2^53 - 1 bits");const i=new h(n);let a=0;for(let e=t.blockSize+r-(t.blockSize+r&t.blockSize-1);s>=e;e+=t.blockSize)t._block(i.subarray(16*a,16*(a+1))),a+=1;return n.splice(0,16*a),t}finalize(){const e=this;let t=e._buffer;const n=e._h;t=ae.concat(t,[ae.partial(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(a.floor(e._length/4294967296)),t.push(0|e._length);t.length;)e._block(t.splice(0,16));return e.reset(),n}_f(e,t,n,r){return e>19?e>39?e>59?e>79?void 0:t^n^r:t&n|t&r|n&r:t^n^r:t&n|~t&r}_S(e,t){return t<>>32-e}_block(e){const n=this,r=n._h,s=t(80);for(let t=0;16>t;t++)s[t]=e[t];let i=r[0],o=r[1],c=r[2],l=r[3],u=r[4];for(let e=0;79>=e;e++){16>e||(s[e]=n._S(1,s[e-3]^s[e-8]^s[e-14]^s[e-16]));const t=n._S(5,i)+n._f(e,o,c,l)+u+s[e]+n._key[a.floor(e/20)]|0;u=l,l=c,c=n._S(30,o),o=i,i=t}r[0]=r[0]+i|0,r[1]=r[1]+o|0,r[2]=r[2]+c|0,r[3]=r[3]+l|0,r[4]=r[4]+u|0}},le={getRandomValues(e){const t=new h(e.buffer),n=e=>{let t=987654321;const n=4294967295;return()=>(t=36969*(65535&t)+(t>>16)&n,(((t<<16)+(e=18e3*(65535&e)+(e>>16)&n)&n)/4294967296+.5)*(a.random()>.5?1:-1))};for(let r,s=0;snew ue.hmacSha1(oe.bytes.toBits(e)),pbkdf2(e,t,n,r){if(n=n||1e4,0>r||0>n)throw new d("invalid params to pbkdf2");const s=1+(r>>5)<<2;let i,a,o,c,l;const u=new ArrayBuffer(s),f=new g(u);let w=0;const p=ae;for(t=oe.bytes.toBits(t),l=1;(s||1)>w;l++){for(i=a=e.encrypt(p.concat(t,[l])),o=1;n>o;o++)for(a=e.encrypt(a),c=0;cw&&os&&(e=(new n).update(e).finalize());for(let t=0;s>t;t++)r[0][t]=909522486^e[t],r[1][t]=1549556828^e[t];t._baseHash[0].update(r[0]),t._baseHash[1].update(r[1]),t._resultHash=new n(t._baseHash[0])}reset(){const e=this;e._resultHash=new e._hash(e._baseHash[0]),e._updated=!1}update(e){this._updated=!0,this._resultHash.update(e)}digest(){const e=this,t=e._resultHash.finalize(),n=new e._hash(e._baseHash[1]).update(t).finalize();return e.reset(),n}encrypt(e){if(this._updated)throw new d("encrypt on already updated hmac called!");return this.update(e),this.digest(e)}}},fe=typeof z!=Z&&typeof z.getRandomValues==K,de="Invalid password",we="Invalid signature",pe="zipjs-abort-check-password";function he(e){return fe?z.getRandomValues(e):le.getRandomValues(e)}const ge=16,me={name:"PBKDF2"},ye=n.assign({hash:{name:"HMAC"}},me),be=n.assign({iterations:1e3,hash:{name:"SHA-1"}},me),Se=["deriveBits"],ke=[8,12,16],ze=[16,24,32],ve=10,xe=[0,0,0,0],Ae=typeof z!=Z,_e=Ae&&z.subtle,Ce=Ae&&typeof _e!=Z,De=oe.bytes,We=class{constructor(e){const t=this;t._tables=[[[],[],[],[],[]],[[],[],[],[],[]]],t._tables[0][0][0]||t._precompute();const n=t._tables[0][4],r=t._tables[1],s=e.length;let i,a,o,c=1;if(4!==s&&6!==s&&8!==s)throw new d("invalid aes key size");for(t._key=[a=e.slice(0),o=[]],i=s;4*s+28>i;i++){let e=a[i-1];(i%s==0||8===s&&i%s==4)&&(e=n[e>>>24]<<24^n[e>>16&255]<<16^n[e>>8&255]<<8^n[255&e],i%s==0&&(e=e<<8^e>>>24^c<<24,c=c<<1^283*(c>>7))),a[i]=a[i-s]^e}for(let e=0;i;e++,i--){const t=a[3&e?i:i-4];o[e]=4>=i||4>e?t:r[0][n[t>>>24]]^r[1][n[t>>16&255]]^r[2][n[t>>8&255]]^r[3][n[255&t]]}}encrypt(e){return this._crypt(e,0)}decrypt(e){return this._crypt(e,1)}_precompute(){const e=this._tables[0],t=this._tables[1],n=e[4],r=t[4],s=[],i=[];let a,o,c,l;for(let e=0;256>e;e++)i[(s[e]=e<<1^283*(e>>7))^e]=e;for(let u=a=0;!n[u];u^=o||1,a=i[a]||1){let i=a^a<<1^a<<2^a<<3^a<<4;i=i>>8^255&i^99,n[u]=i,r[i]=u,l=s[c=s[o=s[u]]];let f=16843009*l^65537*c^257*o^16843008*u,d=257*s[i]^16843008*i;for(let n=0;4>n;n++)e[n][u]=d=d<<24^d>>>8,t[n][i]=f=f<<24^f>>>8}for(let n=0;5>n;n++)e[n]=e[n].slice(0),t[n]=t[n].slice(0)}_crypt(e,t){if(4!==e.length)throw new d("invalid aes block size");const n=this._key[t],r=n.length/4-2,s=[0,0,0,0],i=this._tables[t],a=i[0],o=i[1],c=i[2],l=i[3],u=i[4];let f,w,p,h=e[0]^n[0],g=e[t?3:1]^n[1],m=e[2]^n[2],y=e[t?1:3]^n[3],b=4;for(let e=0;r>e;e++)f=a[h>>>24]^o[g>>16&255]^c[m>>8&255]^l[255&y]^n[b],w=a[g>>>24]^o[m>>16&255]^c[y>>8&255]^l[255&h]^n[b+1],p=a[m>>>24]^o[y>>16&255]^c[h>>8&255]^l[255&g]^n[b+2],y=a[y>>>24]^o[h>>16&255]^c[g>>8&255]^l[255&m]^n[b+3],b+=4,h=f,g=w,m=p;for(let e=0;4>e;e++)s[t?3&-e:e]=u[h>>>24]<<24^u[g>>16&255]<<16^u[m>>8&255]<<8^u[255&y]^n[b++],f=h,h=g,g=m,m=y,y=f;return s}},Re=class{constructor(e,t){this._prf=e,this._initIv=t,this._iv=t}reset(){this._iv=this._initIv}update(e){return this.calculate(this._prf,e,this._iv)}incWord(e){if(255==(e>>24&255)){let t=e>>16&255,n=e>>8&255,r=255&e;255===t?(t=0,255===n?(n=0,255===r?r=0:++r):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=r}else e+=1<<24;return e}incCounter(e){0===(e[0]=this.incWord(e[0]))&&(e[1]=this.incWord(e[1]))}calculate(e,t,n){let r;if(!(r=t.length))return[];const s=ae.bitLength(t);for(let s=0;r>s;s+=4){this.incCounter(n);const r=e.encrypt(n);t[s]^=r[0],t[s+1]^=r[1],t[s+2]^=r[2],t[s+3]^=r[3]}return ae.clamp(t,s)}},Fe=ue.hmacSha1;let Ee=Ae&&Ce&&typeof _e.importKey==K,Te=Ae&&Ce&&typeof _e.deriveBits==K;class Le extends x{constructor({password:e,rawPassword:t,signed:r,encryptionStrength:s,checkPasswordOnly:i}){super({start(){n.assign(this,{ready:new y((e=>this.resolveReady=e)),password:qe(e,t),signed:r,strength:s-1,pending:new w})},async transform(e,t){const n=this,{password:r,strength:s,resolveReady:a,ready:o}=n;r?(await(async(e,t,n,r)=>{const s=await Ne(e,t,n,Pe(r,0,ke[t])),i=Pe(r,ke[t]);if(s[0]!=i[0]||s[1]!=i[1])throw new d(de)})(n,s,r,Pe(e,0,ke[s]+2)),e=Pe(e,ke[s]+2),i?t.error(new d(pe)):a()):await o;const c=new w(e.length-ve-(e.length-ve)%ge);t.enqueue(Ie(n,e,c,0,ve,!0))},async flush(e){const{signed:t,ctr:n,hmac:r,pending:s,ready:i}=this;if(r&&n){await i;const a=Pe(s,0,s.length-ve),o=Pe(s,s.length-ve);let c=new w;if(a.length){const e=Me(De,a);r.update(e);const t=n.update(e);c=He(De,t)}if(t){const e=Pe(He(De,r.digest()),0,ve);for(let t=0;ve>t;t++)if(e[t]!=o[t])throw new d(we)}e.enqueue(c)}}})}}class Ue extends x{constructor({password:e,rawPassword:t,encryptionStrength:r}){let s;super({start(){n.assign(this,{ready:new y((e=>this.resolveReady=e)),password:qe(e,t),strength:r-1,pending:new w})},async transform(e,t){const n=this,{password:r,strength:s,resolveReady:i,ready:a}=n;let o=new w;r?(o=await(async(e,t,n)=>{const r=he(new w(ke[t]));return Oe(r,await Ne(e,t,n,r))})(n,s,r),i()):await a;const c=new w(o.length+e.length-e.length%ge);c.set(o,0),t.enqueue(Ie(n,e,c,o.length,0))},async flush(e){const{ctr:t,hmac:n,pending:r,ready:i}=this;if(n&&t){await i;let a=new w;if(r.length){const e=t.update(Me(De,r));n.update(e),a=He(De,e)}s.signature=He(De,n.digest()).slice(0,ve),e.enqueue(Oe(a,s.signature))}}}),s=this}}function Ie(e,t,n,r,s,i){const{ctr:a,hmac:o,pending:c}=e,l=t.length-s;let u;for(c.length&&(t=Oe(c,t),n=((e,t)=>{if(t&&t>e.length){const n=e;(e=new w(t)).set(n,0)}return e})(n,l-l%ge)),u=0;l-ge>=u;u+=ge){const e=Me(De,Pe(t,u,u+ge));i&&o.update(e);const s=a.update(e);i||o.update(s),n.set(He(De,s),u+r)}return e.pending=Pe(t,u),n}async function Ne(e,r,s,i){e.password=null;const a=await(async(e,t,n,r,s)=>{if(!Ee)return ue.importKey(t);try{return await _e.importKey("raw",t,n,!1,s)}catch(e){return Ee=!1,ue.importKey(t)}})(0,s,ye,0,Se),o=await(async(e,t,n)=>{if(!Te)return ue.pbkdf2(t,e.salt,be.iterations,n);try{return await _e.deriveBits(e,t,n)}catch(r){return Te=!1,ue.pbkdf2(t,e.salt,be.iterations,n)}})(n.assign({salt:i},be),a,8*(2*ze[r]+2)),c=new w(o),l=Me(De,Pe(c,0,ze[r])),u=Me(De,Pe(c,ze[r],2*ze[r])),f=Pe(c,2*ze[r]);return n.assign(e,{keys:{key:l,authentication:u,passwordVerification:f},ctr:new Re(new We(l),t.from(xe)),hmac:new Fe(u)}),f}function qe(e,t){return t===V?ie(e):t}function Oe(e,t){let n=e;return e.length+t.length&&(n=new w(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function Pe(e,t,n){return e.subarray(t,n)}function He(e,t){return e.fromBits(t)}function Me(e,t){return e.toBits(t)}class Be extends x{constructor({password:e,passwordVerification:t,checkPasswordOnly:r}){super({start(){n.assign(this,{password:e,passwordVerification:t}),Ge(this,e)},transform(e,t){const n=this;if(n.password){const t=Ze(n,e.subarray(0,12));if(n.password=null,t[11]!=n.passwordVerification)throw new d(de);e=e.subarray(12)}r?t.error(new d(pe)):t.enqueue(Ze(n,e))}})}}class Ve extends x{constructor({password:e,passwordVerification:t}){super({start(){n.assign(this,{password:e,passwordVerification:t}),Ge(this,e)},transform(e,t){const n=this;let r,s;if(n.password){n.password=null;const t=he(new w(12));t[11]=n.passwordVerification,r=new w(e.length+t.length),r.set(Ke(n,t),0),s=12}else r=new w(e.length),s=0;r.set(Ke(n,e),s),t.enqueue(r)}})}}function Ze(e,t){const n=new w(t.length);for(let r=0;r>>24]),s=~e.crcKey2.get(),e.keys=[n,r,s]}function Ye(e){const t=2|e.keys[2];return je(a.imul(t,1^t)>>>8)}function je(e){return 255&e}function Je(e){return 4294967295&e}const Qe="deflate-raw";class $e extends x{constructor(e,{chunkSize:t,CompressionStream:n,CompressionStreamNative:r}){super({});const{compressed:s,encrypted:i,useCompressionStream:a,zipCrypto:o,signed:c,level:l}=e,u=this;let f,d,w=tt(super.readable);i&&!o||!c||(f=new se,w=st(w,f)),s&&(w=rt(w,a,{level:l,chunkSize:t},r,n)),i&&(o?w=st(w,new Ve(e)):(d=new Ue(e),w=st(w,d))),nt(u,w,(()=>{let e;i&&!o&&(e=d.signature),i&&!o||!c||(e=new g(f.value.buffer).getUint32(0)),u.signature=e}))}}class et extends x{constructor(e,{chunkSize:t,DecompressionStream:n,DecompressionStreamNative:r}){super({});const{zipCrypto:s,encrypted:i,signed:a,signature:o,compressed:c,useCompressionStream:l}=e;let u,f,w=tt(super.readable);i&&(s?w=st(w,new Be(e)):(f=new Le(e),w=st(w,f))),c&&(w=rt(w,l,{chunkSize:t},r,n)),i&&!s||!a||(u=new se,w=st(w,u)),nt(this,w,(()=>{if((!i||s)&&a){const e=new g(u.value.buffer);if(o!=e.getUint32(0,!1))throw new d(we)}}))}}function tt(e){return st(e,new x({transform(e,t){e&&e.length&&t.enqueue(e)}}))}function nt(e,t,r){t=st(t,new x({flush:r})),n.defineProperty(e,"readable",{get:()=>t})}function rt(e,t,n,r,s){try{e=st(e,new(t&&r?r:s)(Qe,n))}catch(r){if(!t)return e;try{e=st(e,new s(Qe,n))}catch(t){return e}}return e}function st(e,t){return e.pipeThrough(t)}const it="data",at="close",ot="deflate",ct="inflate";class lt extends x{constructor(e,t){super({});const r=this,{codecType:s}=e;let i;s.startsWith(ot)?i=$e:s.startsWith(ct)&&(i=et);let a=0,o=0;const c=new i(e,t),l=super.readable,u=new x({transform(e,t){e&&e.length&&(o+=e.length,t.enqueue(e))},flush(){n.assign(r,{inputSize:o})}}),f=new x({transform(e,t){e&&e.length&&(a+=e.length,t.enqueue(e))},flush(){const{signature:e}=c;n.assign(r,{signature:e,outputSize:a,inputSize:o})}});n.defineProperty(r,"readable",{get:()=>l.pipeThrough(u).pipeThrough(c).pipeThrough(f)})}}class ut extends x{constructor(e){let t;super({transform:function n(r,s){if(t){const e=new w(t.length+r.length);e.set(t),e.set(r,t.length),r=e,t=null}r.length>e?(s.enqueue(r.slice(0,e)),n(r.slice(e),s)):t=r},flush(e){t&&t.length&&e.enqueue(t)}})}}let ft=typeof R!=Z;class dt{constructor(e,{readable:t,writable:r},{options:s,config:i,streamOptions:a,useWebWorkers:o,transferStreams:c,scripts:l},u){const{signal:f}=a;return n.assign(e,{busy:!0,readable:t.pipeThrough(new ut(i.chunkSize)).pipeThrough(new wt(t,a),{signal:f}),writable:r,options:n.assign({},s),scripts:l,transferStreams:c,terminate:()=>new y((t=>{const{worker:n,busy:r}=e;n?(r?e.resolveTerminated=t:(n.terminate(),t()),e.interface=null):t()})),onTaskFinished(){const{resolveTerminated:t}=e;t&&(e.resolveTerminated=null,e.terminated=!0,e.worker.terminate(),t()),e.busy=!1,u(e)}}),(o&&ft?gt:ht)(e,i)}}class wt extends x{constructor(e,{onstart:t,onprogress:n,size:r,onend:s}){let i=0;super({async start(){t&&await pt(t,r)},async transform(e,t){i+=e.length,n&&await pt(n,i,r),t.enqueue(e)},async flush(){e.size=i,s&&await pt(s,i)}})}}async function pt(e,...t){try{await e(...t)}catch(e){}}function ht(e,t){return{run:()=>(async({options:e,readable:t,writable:n,onTaskFinished:r},s)=>{try{const i=new lt(e,s);await t.pipeThrough(i).pipeTo(n,{preventClose:!0,preventAbort:!0});const{signature:a,inputSize:o,outputSize:c}=i;return{signature:a,inputSize:o,outputSize:c}}finally{r()}})(e,t)}}function gt(e,t){const{baseURL:r,chunkSize:s}=t;if(!e.interface){let i;try{i=((e,t,r)=>{const s={type:"module"};let i,a;typeof e==K&&(e=e());try{i=new f(e,t)}catch(t){i=e}if(mt)try{a=new R(i)}catch(e){mt=!1,a=new R(i,s)}else a=new R(i,s);return a.addEventListener("message",(e=>(async({data:e},t)=>{const{type:r,value:s,messageId:i,result:a,error:o}=e,{reader:c,writer:l,resolveResult:u,rejectResult:f,onTaskFinished:p}=t;try{if(o){const{message:e,stack:t,code:r,name:s}=o,i=new d(e);n.assign(i,{stack:t,code:r,name:s}),h(i)}else{if("pull"==r){const{value:e,done:n}=await c.read();bt({type:it,value:e,done:n,messageId:i},t)}r==it&&(await l.ready,await l.write(new w(s)),bt({type:"ack",messageId:i},t)),r==at&&h(null,a)}}catch(o){bt({type:at,messageId:i},t),h(o)}function h(e,t){e?f(e):u(t),l&&l.releaseLock(),p()}})(e,r))),a})(e.scripts[0],r,e)}catch(n){return ft=!1,ht(e,t)}n.assign(e,{worker:i,interface:{run:()=>(async(e,t)=>{let r,s;const i=new y(((e,t)=>{r=e,s=t}));n.assign(e,{reader:null,writer:null,resolveResult:r,rejectResult:s,result:i});const{readable:a,options:o,scripts:c}=e,{writable:l,closed:u}=(e=>{let t;const n=new y((e=>t=e));return{writable:new _({async write(t){const n=e.getWriter();await n.ready,await n.write(t),n.releaseLock()},close(){t()},abort:t=>e.getWriter().abort(t)}),closed:n}})(e.writable),f=bt({type:"start",scripts:c.slice(1),options:o,config:t,readable:a,writable:l},e);f||n.assign(e,{reader:a.getReader(),writer:l.getWriter()});const d=await i;return f||await l.getWriter().close(),await u,d})(e,{chunkSize:s})}})}return e.interface}let mt=!0,yt=!0;function bt(e,{worker:t,writer:n,onTaskFinished:r,transferStreams:s}){try{let{value:n,readable:r,writable:i}=e;const a=[];if(n&&(n.byteLength{const n=St.find((e=>!e.busy));if(n)return xt(n),new dt(n,e,t,h);if(St.lengthkt.push({resolve:n,stream:e,workerOptions:t})))})()).run();function h(e){if(kt.length){const[{resolve:t,stream:n,workerOptions:r}]=kt.splice(0,1);t(new dt(e,n,r,h))}else e.worker?(xt(e),((e,t)=>{const{config:n}=t,{terminateWorkerTimeout:r}=n;s.isFinite(r)&&r>=0&&(e.terminated?e.terminated=!1:e.terminateTimeout=setTimeout((async()=>{St=St.filter((t=>t!=e));try{await e.terminate()}catch(e){}}),r))})(e,t)):St=St.filter((t=>t!=e))}}function xt(e){const{terminateTimeout:t}=e;t&&(clearTimeout(t),e.terminateTimeout=null)}const At="HTTP error ",_t="HTTP Range not supported",Ct="Writer iterator completed too soon",Dt="GET",Wt="bytes",Rt=65536,Ft="writable";class Et{constructor(){this.size=0}init(){this.initialized=!0}}class Tt extends Et{get readable(){const e=this,{chunkSize:t=Rt}=e,n=new A({start(){this.chunkOffset=0},async pull(r){const{offset:s=0,size:i,diskNumberStart:o}=n,{chunkOffset:c}=this;r.enqueue(await nn(e,s+c,a.min(t,i-c),o)),c+t>i?r.close():this.chunkOffset+=t}});return n}}class Lt extends Et{constructor(){super();const e=this,t=new _({write:t=>e.writeUint8Array(t)});n.defineProperty(e,Ft,{get:()=>t})}writeUint8Array(){}}class Ut extends Tt{constructor(e){super(),n.assign(this,{blob:e,size:e.size})}async readUint8Array(e,t){const n=this,r=e+t,s=e||rt&&(i=i.slice(e,r)),new w(i)}}class It extends Et{constructor(e){super();const t=new x,r=[];e&&r.push(["Content-Type",e]),n.defineProperty(this,Ft,{get:()=>t.writable}),this.blob=new u(t.readable,{headers:r}).blob()}getData(){return this.blob}}class Nt extends Tt{constructor(e,t){super(),Ot(this,e,t)}async init(){await Pt(this,Xt,Vt),super.init()}readUint8Array(e,t){return Ht(this,e,t,Xt,Vt)}}class qt extends Tt{constructor(e,t){super(),Ot(this,e,t)}async init(){await Pt(this,Yt,Zt),super.init()}readUint8Array(e,t){return Ht(this,e,t,Yt,Zt)}}function Ot(e,t,r){const{preventHeadRequest:s,useRangeHeader:i,forceRangeRequests:a}=r;delete(r=n.assign({},r)).preventHeadRequest,delete r.useRangeHeader,delete r.forceRangeRequests,delete r.useXHR,n.assign(e,{url:t,options:r,preventHeadRequest:s,useRangeHeader:i,forceRangeRequests:a})}async function Pt(e,t,n){const{url:r,useRangeHeader:i,forceRangeRequests:a}=e;if((e=>{const{baseURL:t}=J(),{protocol:n}=new f(e,t);return"http:"==n||"https:"==n})(r)&&(i||a)){const{headers:r}=await t(Dt,e,Mt(e));if(!a&&r.get("Accept-Ranges")!=Wt)throw new d(_t);{let i;const a=r.get("Content-Range");if(a){const e=a.trim().split(/\s*\/\s*/);if(e.length){const t=e[1];t&&"*"!=t&&(i=s(t))}}i===V?await Gt(e,t,n):e.size=i}}else await Gt(e,t,n)}async function Ht(e,t,n,r,s){const{useRangeHeader:i,forceRangeRequests:a,options:o}=e;if(i||a){const s=await r(Dt,e,Mt(e,t,n));if(206!=s.status)throw new d(_t);return new w(await s.arrayBuffer())}{const{data:r}=e;return r||await s(e,o),new w(e.data.subarray(t,t+n))}}function Mt(e,t=0,r=1){return n.assign({},Bt(e),{Range:Wt+"="+t+"-"+(t+r-1)})}function Bt({options:e}){const{headers:t}=e;if(t)return Symbol.iterator in t?n.fromEntries(t):t}async function Vt(e){await Kt(e,Xt)}async function Zt(e){await Kt(e,Yt)}async function Kt(e,t){const n=await t(Dt,e,Bt(e));e.data=new w(await n.arrayBuffer()),e.size||(e.size=e.data.length)}async function Gt(e,t,n){if(e.preventHeadRequest)await n(e,e.options);else{const r=(await t("HEAD",e,Bt(e))).headers.get("Content-Length");r?e.size=s(r):await n(e,e.options)}}async function Xt(e,{options:t,url:r},s){const i=await fetch(r,n.assign({},t,{method:e,headers:s}));if(400>i.status)return i;throw 416==i.status?new d(_t):new d(At+(i.statusText||i.status))}function Yt(e,{url:t},r){return new y(((s,i)=>{const a=new XMLHttpRequest;if(a.addEventListener("load",(()=>{if(400>a.status){const e=[];a.getAllResponseHeaders().trim().split(/[\r\n]+/).forEach((t=>{const n=t.trim().split(/\s*:\s*/);n[0]=n[0].trim().replace(/^[a-z]|-[a-z]/g,(e=>e.toUpperCase())),e.push(n)})),s({status:a.status,arrayBuffer:()=>a.response,headers:new c(e)})}else i(416==a.status?new d(_t):new d(At+(a.statusText||a.status)))}),!1),a.addEventListener("error",(e=>i(e.detail?e.detail.error:new d("Network error"))),!1),a.open(e,t),r)for(const e of n.entries(r))a.setRequestHeader(e[0],e[1]);a.responseType="arraybuffer",a.send()}))}class jt extends Tt{constructor(e,t={}){super(),n.assign(this,{url:e,reader:t.useXHR?new qt(e,t):new Nt(e,t)})}set size(e){}get size(){return this.reader.size}async init(){await this.reader.init(),super.init()}readUint8Array(e,t){return this.reader.readUint8Array(e,t)}}class Jt extends Tt{constructor(e){super(),this.readers=e}async init(){const e=this,{readers:t}=e;e.lastDiskNumber=0,e.lastDiskOffset=0,await y.all(t.map((async(n,r)=>{await n.init(),r!=t.length-1&&(e.lastDiskOffset+=n.size),e.size+=n.size}))),super.init()}async readUint8Array(e,t,n=0){const r=this,{readers:s}=this;let i,o=n;-1==o&&(o=s.length-1);let c=e;for(;c>=s[o].size;)c-=s[o].size,o++;const l=s[o],u=l.size;if(c+t>u){const s=u-c;i=new w(t),i.set(await nn(l,c,s)),i.set(await r.readUint8Array(e+s,t-s,n),s)}else i=await nn(l,c,t);return r.lastDiskNumber=a.max(o,r.lastDiskNumber),i}}class Qt extends Et{constructor(e,t=4294967295){super();const r=this;let s,i,a;n.assign(r,{diskNumber:0,diskOffset:0,size:0,maxSize:t,availableSize:t});const o=new _({async write(t){const{availableSize:n}=r;if(a)t.lengtho})}}async function $t(e,t){if(!e.init||e.initialized)return y.resolve();await e.init(t)}function en(e){return t.isArray(e)&&(e=new Jt(e)),e instanceof A&&(e={readable:e}),e}function tn(e){e.writable===V&&typeof e.next==K&&(e=new Qt(e)),e instanceof _&&(e={writable:e});const{writable:t}=e;return t.size===V&&(t.size=0),e instanceof Qt||n.assign(e,{diskNumber:0,diskOffset:0,availableSize:1/0,maxSize:1/0}),e}function nn(e,t,n,r){return e.readUint8Array(t,n,r)}const rn=Jt,sn=Qt,an="\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ ".split("");function on(e,t){return t&&"cp437"==t.trim().toLowerCase()?(e=>{{let t="";for(let n=0;nthis[t]=e[t]))}}const _n="File format is not recognized",Cn="End of central directory not found",Dn="End of Zip64 central directory not found",Wn="End of Zip64 central directory locator not found",Rn="Central directory header not found",Fn="Local file header not found",En="Zip64 extra field not found",Tn="File contains encrypted entry",Ln="Encryption method not supported",Un="Compression method not supported",In="Split zip file",Nn="utf-8",qn="cp437",On=[[dn,F],[wn,F],[pn,F],[hn,E]],Pn={[E]:{getValue:Jn,bytes:4},[F]:{getValue:Qn,bytes:8}};class Hn{constructor(e,t={}){n.assign(this,{reader:en(e),options:t,config:J()})}async*getEntriesGenerator(e={}){const t=this;let{reader:r}=t;const{config:s}=t;if(await $t(r),r.size!==V&&r.readUint8Array||(r=new Ut(await new u(r.readable).blob()),await $t(r)),r.size{const r=new w(4);return $n(r).setUint32(0,101010256,!0),await s(22)||await s(a.min(1048582,n));async function s(t){const s=n-t,i=await nn(e,s,t);for(let e=i.length-22;e>=0;e--)if(i[e]==r[0]&&i[e+1]==r[1]&&i[e+2]==r[2]&&i[e+3]==r[3])return{offset:s+e,buffer:i.slice(e,e+22).buffer}}})(r,0,r.size);if(!i)throw Jn($n(await nn(r,0,4)))==L?new d(In):new d(Cn);const o=$n(i);let c=Jn(o,12),l=Jn(o,16);const f=i.offset,p=jn(o,20),h=f+q+p;let g=jn(o,4);const m=r.lastDiskNumber||0;let b=jn(o,6),S=jn(o,8),k=0,z=0;if(l==F||c==F||S==E||b==E){const e=$n(await nn(r,i.offset-20,20));if(Jn(e,0)!=N)throw new d(Dn);l=Qn(e,8);let t=await nn(r,l,56,-1),n=$n(t);const s=i.offset-20-56;if(Jn(n,0)!=I&&l!=s){const e=l;l=s,k=l-e,t=await nn(r,l,56,-1),n=$n(t)}if(Jn(n,0)!=I)throw new d(Wn);g==E&&(g=Jn(n,16)),b==E&&(b=Jn(n,20)),S==E&&(S=Qn(n,32)),c==F&&(c=Qn(n,40)),l-=c}if(ll)throw new d(_n);let v=0,x=await nn(r,l,c,b),A=$n(x);if(c){const e=i.offset-c;if(Jn(A,v)!=U&&l!=e){const t=l;l=e,k+=l-t,x=await nn(r,l,c,b),A=$n(x)}}const _=i.offset-l-(r.lastDiskOffset||0);if(c==_||0>_||(c=_,x=await nn(r,l,c,b),A=$n(x)),0>l||l>=r.size)throw new d(_n);const C=Kn(t,e,"filenameEncoding"),D=Kn(t,e,"commentEncoding");for(let i=0;S>i;i++){const o=new Mn(r,s,t.options);if(Jn(A,v)!=U)throw new d(Rn);Bn(o,A,v+6);const c=!!o.bitFlag.languageEncodingFlag,l=v+46,u=l+o.filenameLength,f=u+o.extraFieldLength,w=jn(A,v+4),p=0==(0&w),h=x.subarray(l,u),g=jn(A,v+32),m=f+g,b=x.subarray(f,m),_=c,W=c,R=p&&16==(16&Yn(A,v+38)),F=Jn(A,v+42)+k;n.assign(o,{versionMadeBy:w,msDosCompatible:p,compressedSize:0,uncompressedSize:0,commentLength:g,directory:R,offset:F,diskNumberStart:jn(A,v+34),internalFileAttribute:jn(A,v+36),externalFileAttribute:Jn(A,v+38),rawFilename:h,filenameUTF8:_,commentUTF8:W,rawExtraField:x.subarray(u,f)});const[E,T]=await y.all([on(h,_?Nn:C||qn),on(b,W?Nn:D||qn)]);n.assign(o,{rawComment:b,filename:E,comment:T,directory:R||E.endsWith(H)}),z=a.max(F,z),await Vn(o,o,A,v+6);const L=new An(o);L.getData=(e,t)=>o.getData(e,L,t),v=m;const{onprogress:I}=e;if(I)try{await I(i+1,S,new An(o))}catch(e){}yield L}const W=Kn(t,e,"extractPrependedData"),R=Kn(t,e,"extractAppendedData");return W&&(t.prependedData=z>0?await nn(r,0,z):new w),t.comment=p?await nn(r,f+q,p):new w,R&&(t.appendedData=h>>8&255:p>>>24&255),signature:p,compressed:0!=l,encrypted:z,useWebWorkers:Kn(s,r,"useWebWorkers"),useCompressionStream:Kn(s,r,"useCompressionStream"),transferStreams:Kn(s,r,"transferStreams"),checkPasswordOnly:W},config:u,streamOptions:{signal:D,size:A,onstart:F,onprogress:E,onend:L}};let I=0;try{({outputSize:I}=await vt({readable:C,writable:R},U))}catch(e){if(!W||e.message!=pe)throw e}finally{const e=Kn(s,r,"preventClose");R.size+=I,e||R.locked||await R.getWriter().close()}return W?V:e.getData?e.getData():R}}function Bn(e,t,r){const s=e.rawBitFlag=jn(t,r+2),i=1==(1&s),a=Jn(t,r+6);n.assign(e,{encrypted:i,version:jn(t,r),bitFlag:{level:(6&s)>>1,dataDescriptor:8==(8&s),languageEncodingFlag:(s&P)==P},rawLastModDate:a,lastModDate:Gn(a),filenameLength:jn(t,r+22),extraFieldLength:jn(t,r+24)})}async function Vn(e,t,r,s,i){const{rawExtraField:a}=t,l=t.extraField=new c,u=$n(new w(a));let f=0;try{for(;f{t.zip64=!0;const n=$n(e.data),r=On.filter((([e,n])=>t[e]==n));for(let s=0,i=0;s{const s=$n(e.data),i=Yn(s,4);n.assign(e,{vendorVersion:Yn(s,0),vendorId:Yn(s,2),strength:i,originalCompressionMethod:r,compressionMethod:jn(s,5)}),t.compressionMethod=e.compressionMethod})(y,t,p),t.extraFieldAES=y):t.compressionMethod=p;const b=l.get(10);b&&(((e,t)=>{const r=$n(e.data);let s,i=4;try{for(;i{const r=$n(e.data),s=Yn(r,0),i=[],a=[];n?(1==(1&s)&&(i.push(gn),a.push(mn)),2==(2&s)&&(i.push(yn),a.push("rawLastAccessDate")),4==(4&s)&&(i.push(bn),a.push("rawCreationDate"))):5>e.data.length||(i.push(gn),a.push(mn));let c=1;i.forEach(((n,s)=>{if(e.data.length>=c+4){const i=Jn(r,c);t[n]=e[n]=new o(1e3*i);const l=a[s];e[l]=i}c+=4}))})(S,t,i),t.extraFieldExtendedTimestamp=S);const k=l.get(6534);k&&(t.extraFieldUSDZ=k)}async function Zn(e,t,r,s,i){const a=$n(e.data),o=new re;o.append(i[r]);const c=$n(new w(4));c.setUint32(0,o.get(),!0);const l=Jn(a,1);n.assign(e,{version:Yn(a,0),[t]:on(e.data.subarray(5)),valid:!i.bitFlag.languageEncodingFlag&&l==Jn(c,0)}),e.valid&&(s[t]=e[t],s[t+"UTF8"]=!0)}function Kn(e,t,n){return t[n]===V?e.options[n]:t[n]}function Gn(e){const t=(4294901760&e)>>16,n=65535&e;try{return new o(1980+((65024&t)>>9),((480&t)>>5)-1,31&t,(63488&n)>>11,(2016&n)>>5,2*(31&n),0)}catch(e){}}function Xn(e){return new o(s(e/i(1e4)-i(116444736e5)))}function Yn(e,t){return e.getUint8(t)}function jn(e,t){return e.getUint16(t,!0)}function Jn(e,t){return e.getUint32(t,!0)}function Qn(e,t){return s(e.getBigUint64(t,!0))}function $n(e){return new g(e.buffer)}const er="File already exists",tr="Zip file comment exceeds 64KB",nr="File entry comment exceeds 64KB",rr="File entry name exceeds 64KB",sr="Version exceeds 65535",ir="The strength must equal 1, 2, or 3",ar="Extra field type exceeds 65535",or="Extra field data exceeds 64KB",cr="Zip64 is not supported (make sure 'keepOrder' is set to 'true')",lr=new w([7,0,2,0,65,69,3,0,0]);let ur=0;const fr=[];class dr{constructor(e,t={}){const r=(e=tn(e)).availableSize!==V&&e.availableSize>0&&e.availableSize!==1/0&&e.maxSize!==V&&e.maxSize>0&&e.maxSize!==1/0;n.assign(this,{writer:e,addSplitZipSignature:r,options:t,config:J(),files:new c,filenames:new l,offset:e.writable.size,pendingEntriesSize:0,pendingAddFileCalls:new l,bufferedWrites:0})}async add(e="",r,s={}){const c=this,{pendingAddFileCalls:l,config:f}=c;let m;urfr.push(e)));try{if(e=e.trim(),c.filenames.has(e))throw new d(er);return c.filenames.add(e),m=(async(e,r,s,c)=>{r=r.trim(),c.directory&&!r.endsWith(H)?r+=H:c.directory=r.endsWith(H);const l=ie(r);if(zr(l)>E)throw new d(rr);const f=c.comment||"",m=ie(f);if(zr(m)>E)throw new d(nr);const b=hr(e,c,"version",20);if(b>E)throw new d(sr);const S=hr(e,c,"versionMadeBy",20);if(S>E)throw new d(sr);const k=hr(e,c,gn,new o),z=hr(e,c,yn),v=hr(e,c,bn),A=hr(e,c,zn,!0),_=hr(e,c,Sn,0),C=hr(e,c,kn,0),D=hr(e,c,"password"),W=hr(e,c,"rawPassword"),R=hr(e,c,"encryptionStrength",3),U=hr(e,c,"zipCrypto"),I=hr(e,c,"extendedTimestamp",!0),N=hr(e,c,"keepOrder",!0),q=hr(e,c,"level"),Z=hr(e,c,"useWebWorkers"),K=hr(e,c,"bufferedWrite"),G=hr(e,c,"dataDescriptorSignature",!1),X=hr(e,c,"signal"),Y=hr(e,c,"useCompressionStream");let j=hr(e,c,"dataDescriptor",!0),J=hr(e,c,vn);if(D!==V&&R!==V&&(1>R||R>3))throw new d(ir);let $=new w;const{extraField:ee}=c;if(ee){let e=0,t=0;ee.forEach((t=>e+=4+zr(t))),$=new w(e),ee.forEach(((e,n)=>{if(n>E)throw new d(ar);if(zr(e)>E)throw new d(or);Sr($,new p([n]),t),Sr($,new p([zr(e)]),t+2),Sr($,e,t+4),t+=4+zr(e)}))}let te=0,ne=0,re=0;const se=!0===J;s&&(s=en(s),await $t(s),s.size===V?(j=!0,(J||J===V)&&(J=!0,re=te=F)):(re=s.size,te=(e=>e+5*(a.floor(e/16383)+1))(re)));const{diskOffset:ae,diskNumber:oe,maxSize:ce}=e.writer,le=se||re>=F,ue=se||te>=F,fe=se||e.offset+e.pendingEntriesSize-ae>=F,de=hr(e,c,"supportZip64SplitFile",!0)&&se||oe+a.ceil(e.pendingEntriesSize/ce)>=E;if(fe||le||ue||de){if(!1===J||!N)throw new d(cr);J=!0}J=J||!1;const we=(e=>{const{rawFilename:t,lastModDate:n,lastAccessDate:r,creationDate:s,rawPassword:i,password:o,level:c,zip64:l,zipCrypto:u,dataDescriptor:f,directory:d,rawExtraField:p,encryptionStrength:g,extendedTimestamp:m}=e,y=0!==c&&!d,b=!!(o&&zr(o)||i&&zr(i));let S,k,z,v,x=e.version;if(b&&!u){S=new w(zr(lr)+2);const e=kr(S);mr(e,0,39169),Sr(S,lr,2),gr(e,8,g)}else S=new w;if(m){z=new w(9+(r?4:0)+(s?4:0));const e=kr(z);mr(e,0,O),mr(e,2,zr(z)-4),v=1+(r?2:0)+(s?4:0),gr(e,4,v);let t=5;yr(e,t,a.floor(n.getTime()/1e3)),t+=4,r&&(yr(e,t,a.floor(r.getTime()/1e3)),t+=4),s&&yr(e,t,a.floor(s.getTime()/1e3));try{k=new w(36);const e=kr(k),t=pr(n);mr(e,0,10),mr(e,2,32),mr(e,8,1),mr(e,10,24),br(e,12,t),br(e,20,pr(r)||t),br(e,28,pr(s)||t)}catch(e){k=new w}}else k=z=new w;let A=P;f&&(A|=8);let _=0;y&&(_=8),l&&(x=x>45?x:45),b&&(A|=1,u||(x=x>51?x:51,_=99,y&&(S[9]=8)));const C=new w(26),D=kr(C);mr(D,0,x),mr(D,2,A),mr(D,4,_);const W=new h(1),R=kr(W);let F;F=B>n?B:n>M?M:n,mr(R,0,(F.getHours()<<6|F.getMinutes())<<5|F.getSeconds()/2),mr(R,2,(F.getFullYear()-1980<<4|F.getMonth()+1)<<5|F.getDate());const E=W[0];yr(D,6,E),mr(D,22,zr(t));const L=zr(S,z,k,p);mr(D,24,L);const U=new w(30+zr(t)+L);return yr(kr(U),0,T),Sr(U,C,4),Sr(U,t,30),Sr(U,S,30+zr(t)),Sr(U,z,30+zr(t,S)),Sr(U,k,30+zr(t,S,z)),Sr(U,p,30+zr(t,S,z,k)),{localHeaderArray:U,headerArray:C,headerView:D,lastModDate:n,rawLastModDate:E,encrypted:b,compressed:y,version:x,compressionMethod:_,extraFieldExtendedTimestampFlag:v,rawExtraFieldExtendedTimestamp:z,rawExtraFieldNTFS:k,rawExtraFieldAES:S,extraFieldLength:L}})(c=n.assign({},c,{rawFilename:l,rawComment:m,version:b,versionMadeBy:S,lastModDate:k,lastAccessDate:z,creationDate:v,rawExtraField:$,zip64:J,zip64UncompressedSize:le,zip64CompressedSize:ue,zip64Offset:fe,zip64DiskNumberStart:de,password:D,rawPassword:W,level:q,useWebWorkers:Z,encryptionStrength:R,extendedTimestamp:I,zipCrypto:U,bufferedWrite:K,keepOrder:N,dataDescriptor:j,dataDescriptorSignature:G,signal:X,msDosCompatible:A,internalFileAttribute:_,externalFileAttribute:C,useCompressionStream:Y})),pe=(e=>{const{zip64:t,dataDescriptor:n,dataDescriptorSignature:r}=e;let s,i=new w,a=0;return n&&(i=new w(t?r?24:20:r?16:12),s=kr(i),r&&(a=4,yr(s,0,134695760))),{dataDescriptorArray:i,dataDescriptorView:s,dataDescriptorOffset:a}})(c),he=zr(we.localHeaderArray,pe.dataDescriptorArray);let ge;ne=he+te,e.options.usdz&&(ne+=ne+64),e.pendingEntriesSize+=ne;try{ge=await(async(e,r,s,a,o)=>{const{files:c,writer:l}=e,{keepOrder:f,dataDescriptor:p,signal:h}=o,{headerInfo:m}=a,{usdz:b}=e.options,S=t.from(c.values()).pop();let k,z,v,A,_,C,D,W={};c.set(r,W);try{let t;f&&(t=S&&S.lock,W.lock=new y((e=>v=e))),!(o.bufferedWrite||e.writerLocked||e.bufferedWrites&&f)&&p||b?(C=l,await R()):(C=new x,D=new u(C.readable).blob(),C.writable.size=0,k=!0,e.bufferedWrites++,await $t(l)),await $t(C);const{writable:m}=l;let{diskOffset:T}=l;if(e.addSplitZipSignature){delete e.addSplitZipSignature;const t=new w(4);yr(kr(t),0,L),await wr(m,t),e.offset+=4}b&&((e,t)=>{const{headerInfo:n}=e;let{localHeaderArray:r,extraFieldLength:s}=n,i=kr(r),a=64-(t+zr(r))%64;4>a&&(a+=64);const o=new w(a),c=kr(o);mr(c,0,6534),mr(c,2,a-2);const l=r;n.localHeaderArray=r=new w(zr(l)+a),Sr(r,l),Sr(r,o,zr(l)),i=kr(r),mr(i,28,s+a),e.metadataSize+=a})(a,e.offset-T),k||(await t,await E(m));const{diskNumber:U}=l;if(_=!0,W.diskNumberStart=U,W=await(async(e,t,{diskNumberStart:r,lock:s},a,o,c)=>{const{headerInfo:l,dataDescriptorInfo:u,metadataSize:f}=a,{localHeaderArray:d,headerArray:p,lastModDate:h,rawLastModDate:g,encrypted:m,compressed:y,version:b,compressionMethod:S,rawExtraFieldExtendedTimestamp:k,extraFieldExtendedTimestampFlag:z,rawExtraFieldNTFS:v,rawExtraFieldAES:x}=l,{dataDescriptorArray:A}=u,{rawFilename:_,lastAccessDate:C,creationDate:D,password:W,rawPassword:R,level:E,zip64:T,zip64UncompressedSize:L,zip64CompressedSize:U,zip64Offset:I,zip64DiskNumberStart:N,zipCrypto:q,dataDescriptor:O,directory:P,versionMadeBy:H,rawComment:M,rawExtraField:B,useWebWorkers:Z,onstart:K,onprogress:G,onend:X,signal:Y,encryptionStrength:j,extendedTimestamp:J,msDosCompatible:$,internalFileAttribute:ee,externalFileAttribute:te,useCompressionStream:ne}=c,re={lock:s,versionMadeBy:H,zip64:T,directory:!!P,filenameUTF8:!0,rawFilename:_,commentUTF8:!0,rawComment:M,rawExtraFieldExtendedTimestamp:k,rawExtraFieldNTFS:v,rawExtraFieldAES:x,rawExtraField:B,extendedTimestamp:J,msDosCompatible:$,internalFileAttribute:ee,externalFileAttribute:te,diskNumberStart:r};let se,ie=0,ae=0;const{writable:oe}=t;if(e){e.chunkSize=Q(o),await wr(oe,d);const t=e.readable,n=t.size=e.size,r={options:{codecType:ot,level:E,rawPassword:R,password:W,encryptionStrength:j,zipCrypto:m&&q,passwordVerification:m&&q&&g>>8&255,signed:!0,compressed:y,encrypted:m,useWebWorkers:Z,useCompressionStream:ne,transferStreams:!1},config:o,streamOptions:{signal:Y,size:n,onstart:K,onprogress:G,onend:X}},s=await vt({readable:t,writable:oe},r);ae=s.inputSize,ie=s.outputSize,se=s.signature,oe.size+=ae}else await wr(oe,d);let ce;if(T){let e=4;L&&(e+=8),U&&(e+=8),I&&(e+=8),N&&(e+=4),ce=new w(e)}else ce=new w;return((e,t)=>{const{signature:n,rawExtraFieldZip64:r,compressedSize:s,uncompressedSize:a,headerInfo:o,dataDescriptorInfo:c}=e,{headerView:l,encrypted:u}=o,{dataDescriptorView:f,dataDescriptorOffset:d}=c,{zip64:w,zip64UncompressedSize:p,zip64CompressedSize:h,zipCrypto:g,dataDescriptor:m}=t;if(u&&!g||n===V||(yr(l,10,n),m&&yr(f,d,n)),w){const e=kr(r);mr(e,0,1),mr(e,2,zr(r)-4);let t=4;p&&(yr(l,18,F),br(e,t,i(a)),t+=8),h&&(yr(l,14,F),br(e,t,i(s))),m&&(br(f,d+4,i(s)),br(f,d+12,i(a)))}else yr(l,14,s),yr(l,18,a),m&&(yr(f,d+4,s),yr(f,d+8,a))})({signature:se,rawExtraFieldZip64:ce,compressedSize:ie,uncompressedSize:ae,headerInfo:l,dataDescriptorInfo:u},c),O&&await wr(oe,A),n.assign(re,{uncompressedSize:ae,compressedSize:ie,lastModDate:h,rawLastModDate:g,creationDate:D,lastAccessDate:C,encrypted:m,size:f+ie,compressionMethod:S,version:b,headerArray:p,signature:se,rawExtraFieldZip64:ce,extraFieldExtendedTimestampFlag:z,zip64UncompressedSize:L,zip64CompressedSize:U,zip64Offset:I,zip64DiskNumberStart:N}),re})(s,C,W,a,e.config,o),_=!1,c.set(r,W),W.filename=r,k){await C.writable.getWriter().close();let e=await D;await t,await R(),A=!0,p||(e=await(async(e,t,n,{zipCrypto:r})=>{let s;s=await t.slice(0,26).arrayBuffer(),26!=s.byteLength&&(s=s.slice(0,26));const i=new g(s);return e.encrypted&&!r||yr(i,14,e.signature),e.zip64?(yr(i,18,F),yr(i,22,F)):(yr(i,18,e.compressedSize),yr(i,22,e.uncompressedSize)),await wr(n,new w(s)),t.slice(s.byteLength)})(W,e,m,o)),await E(m),W.diskNumberStart=l.diskNumber,T=l.diskOffset,await e.stream().pipeTo(m,{preventClose:!0,preventAbort:!0,signal:h}),m.size+=e.size,A=!1}if(W.offset=e.offset-T,W.zip64)((e,t)=>{const{rawExtraFieldZip64:n,offset:r,diskNumberStart:s}=e,{zip64UncompressedSize:a,zip64CompressedSize:o,zip64Offset:c,zip64DiskNumberStart:l}=t,u=kr(n);let f=4;a&&(f+=8),o&&(f+=8),c&&(br(u,f,i(r)),f+=8),l&&yr(u,f,s)})(W,o);else if(W.offset>=F)throw new d(cr);return e.offset+=W.size,W}catch(t){if(k&&A||!k&&_){if(e.hasCorruptedEntries=!0,t)try{t.corruptedEntry=!0}catch(e){}k?e.offset+=C.writable.size:e.offset=C.writable.size}throw c.delete(r),t}finally{k&&e.bufferedWrites--,v&&v(),z&&z()}async function R(){e.writerLocked=!0;const{lockWriter:t}=e;e.lockWriter=new y((t=>z=()=>{e.writerLocked=!1,t()})),await t}async function E(e){zr(m.localHeaderArray)>l.availableSize&&(l.availableSize=0,await wr(e,new w))}})(e,r,s,{headerInfo:we,dataDescriptorInfo:pe,metadataSize:he},c)}finally{e.pendingEntriesSize-=ne}return n.assign(ge,{name:r,comment:f,extraField:ee}),new An(ge)})(c,e,r,s),l.add(m),await m}catch(t){throw c.filenames.delete(e),t}finally{l.delete(m);const e=fr.shift();e?e():ur--}}async close(e=new w,n={}){const{pendingAddFileCalls:r,writer:s}=this,{writable:o}=s;for(;r.size;)await y.allSettled(t.from(r));return await(async(e,n,r)=>{const{files:s,writer:o}=e,{diskOffset:c,writable:l}=o;let{diskNumber:u}=o,f=0,p=0,h=e.offset-c,g=s.size;for(const[,e]of s){const{rawFilename:t,rawExtraFieldZip64:n,rawExtraFieldAES:r,rawComment:s,rawExtraFieldNTFS:i,rawExtraField:o,extendedTimestamp:c,extraFieldExtendedTimestampFlag:l,lastModDate:u}=e;let f;if(c){f=new w(9);const e=kr(f);mr(e,0,O),mr(e,2,5),gr(e,4,l),yr(e,5,a.floor(u.getTime()/1e3))}else f=new w;e.rawExtraFieldCDExtendedTimestamp=f,p+=46+zr(t,s,n,r,i,f,o)}const m=new w(p),y=kr(m);await $t(o);let b=0;for(const[e,n]of t.from(s.values()).entries()){const{offset:t,rawFilename:i,rawExtraFieldZip64:a,rawExtraFieldAES:c,rawExtraFieldCDExtendedTimestamp:u,rawExtraFieldNTFS:d,rawExtraField:w,rawComment:p,versionMadeBy:h,headerArray:g,directory:S,zip64:k,zip64UncompressedSize:z,zip64CompressedSize:v,zip64DiskNumberStart:x,zip64Offset:A,msDosCompatible:_,internalFileAttribute:C,externalFileAttribute:D,diskNumberStart:W,uncompressedSize:R,compressedSize:T}=n,L=zr(a,c,u,d,w);yr(y,f,U),mr(y,f+4,h);const I=kr(g);z||yr(I,18,R),v||yr(I,14,T),Sr(m,g,f+6),mr(y,f+30,L),mr(y,f+32,zr(p)),mr(y,f+34,k&&x?E:W),mr(y,f+36,C),D?yr(y,f+38,D):S&&_&&gr(y,f+38,16),yr(y,f+42,k&&A?F:t),Sr(m,i,f+46),Sr(m,a,f+46+zr(i)),Sr(m,c,f+46+zr(i,a)),Sr(m,u,f+46+zr(i,a,c)),Sr(m,d,f+46+zr(i,a,c,u)),Sr(m,w,f+46+zr(i,a,c,u,d)),Sr(m,p,f+46+zr(i)+L);const N=46+zr(i,p)+L;if(f-b>o.availableSize&&(o.availableSize=0,await wr(l,m.slice(b,f)),b=f),f+=N,r.onprogress)try{await r.onprogress(e+1,s.size,new An(n))}catch(e){}}await wr(l,b?m.slice(b):m);let S=o.diskNumber;const{availableSize:k}=o;q>k&&S++;let z=hr(e,r,"zip64");if(!(F>h&&F>p&&E>g&&E>S)){if(!1===z)throw new d(cr);z=!0}const v=new w(z?98:q),x=kr(v);f=0,z&&(yr(x,0,I),br(x,4,i(44)),mr(x,12,45),mr(x,14,45),yr(x,16,S),yr(x,20,u),br(x,24,i(g)),br(x,32,i(g)),br(x,40,i(p)),br(x,48,i(h)),yr(x,56,N),br(x,64,i(h)+i(p)),yr(x,72,S+1),hr(e,r,"supportZip64SplitFile",!0)&&(S=E,u=E),g=E,h=F,p=F,f+=76),yr(x,f,101010256),mr(x,f+4,S),mr(x,f+6,u),mr(x,f+8,g),mr(x,f+10,g),yr(x,f+12,p),yr(x,f+16,h);const A=zr(n);if(A){if(A>E)throw new d(tr);mr(x,f+20,A)}await wr(l,v),A&&await wr(l,n)})(this,e,n),hr(this,n,"preventClose")||await o.getWriter().close(),s.getData?s.getData():o}}async function wr(e,t){const n=e.getWriter();try{await n.ready,e.size+=zr(t),await n.write(t)}finally{n.releaseLock()}}function pr(e){if(e)return(i(e.getTime())+i(116444736e5))*i(1e4)}function hr(e,t,n,r){const s=t[n]===V?e.options[n]:t[n];return s===V?r:s}function gr(e,t,n){e.setUint8(t,n)}function mr(e,t,n){e.setUint16(t,n,!0)}function yr(e,t,n){e.setUint32(t,n,!0)}function br(e,t,n){e.setBigUint64(t,n,!0)}function Sr(e,t,n){e.set(t,n)}function kr(e){return new g(e.buffer)}function zr(...e){let t=0;return e.forEach((e=>e&&(t+=e.length))),t}let vr;try{vr=void 0===k&&"undefined"==typeof location?new(require("url").URL)("file:"+__filename).href:void 0===k?location.href:k.currentScript&&k.currentScript.src||new f("zip.min.js",k.baseURI).href}catch(e){}$({baseURL:vr}),(e=>{const t=()=>f.createObjectURL(new m(['const{Array:e,Object:t,Number:n,Math:r,Error:s,Uint8Array:i,Uint16Array:o,Uint32Array:c,Int32Array:f,Map:a,DataView:l,Promise:u,TextEncoder:w,crypto:h,postMessage:d,TransformStream:p,ReadableStream:y,WritableStream:m,CompressionStream:b,DecompressionStream:g}=self,k=void 0,v="undefined",S="function";class z{constructor(e){return class extends p{constructor(t,n){const r=new e(n);super({transform(e,t){t.enqueue(r.append(e))},flush(e){const t=r.flush();t&&e.enqueue(t)}})}}}}const C=[];for(let e=0;256>e;e++){let t=e;for(let e=0;8>e;e++)1&t?t=t>>>1^3988292384:t>>>=1;C[e]=t}class x{constructor(e){this.t=e||-1}append(e){let t=0|this.t;for(let n=0,r=0|e.length;r>n;n++)t=t>>>8^C[255&(t^e[n])];this.t=t}get(){return~this.t}}class A extends p{constructor(){let e;const t=new x;super({transform(e,n){t.append(e),n.enqueue(e)},flush(){const n=new i(4);new l(n.buffer).setUint32(0,t.get()),e.value=n}}),e=this}}const _={concat(e,t){if(0===e.length||0===t.length)return e.concat(t);const n=e[e.length-1],r=_.i(n);return 32===r?e.concat(t):_.o(t,r,0|n,e.slice(0,e.length-1))},l(e){const t=e.length;if(0===t)return 0;const n=e[t-1];return 32*(t-1)+_.i(n)},u(e,t){if(32*e.length0&&t&&(e[n-1]=_.h(t,e[n-1]&2147483648>>t-1,1)),e},h:(e,t,n)=>32===e?t:(n?0|t:t<<32-e)+1099511627776*e,i:e=>r.round(e/1099511627776)||32,o(e,t,n,r){for(void 0===r&&(r=[]);t>=32;t-=32)r.push(n),n=0;if(0===t)return r.concat(e);for(let s=0;s>>t),n=e[s]<<32-t;const s=e.length?e[e.length-1]:0,i=_.i(s);return r.push(_.h(t+i&31,t+i>32?n:r.pop(),1)),r}},I={p:{m(e){const t=_.l(e)/8,n=new i(t);let r;for(let s=0;t>s;s++)0==(3&s)&&(r=e[s/4]),n[s]=r>>>24,r<<=8;return n},g(e){const t=[];let n,r=0;for(n=0;n9007199254740991)throw new s("Cannot hash more than 2^53 - 1 bits");const o=new c(n);let f=0;for(let e=t.blockSize+r-(t.blockSize+r&t.blockSize-1);i>=e;e+=t.blockSize)t.I(o.subarray(16*f,16*(f+1))),f+=1;return n.splice(0,16*f),t}P(){const e=this;let t=e.C;const n=e.S;t=_.concat(t,[_.h(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(r.floor(e.A/4294967296)),t.push(0|e.A);t.length;)e.I(t.splice(0,16));return e.reset(),n}D(e,t,n,r){return e>19?e>39?e>59?e>79?void 0:t^n^r:t&n|t&r|n&r:t^n^r:t&n|~t&r}V(e,t){return t<>>32-e}I(t){const n=this,s=n.S,i=e(80);for(let e=0;16>e;e++)i[e]=t[e];let o=s[0],c=s[1],f=s[2],a=s[3],l=s[4];for(let e=0;79>=e;e++){16>e||(i[e]=n.V(1,i[e-3]^i[e-8]^i[e-14]^i[e-16]));const t=n.V(5,o)+n.D(e,c,f,a)+l+i[e]+n.v[r.floor(e/20)]|0;l=a,a=f,f=n.V(30,c),c=o,o=t}s[0]=s[0]+o|0,s[1]=s[1]+c|0,s[2]=s[2]+f|0,s[3]=s[3]+a|0,s[4]=s[4]+l|0}},D={getRandomValues(e){const t=new c(e.buffer),n=e=>{let t=987654321;const n=4294967295;return()=>(t=36969*(65535&t)+(t>>16)&n,(((t<<16)+(e=18e3*(65535&e)+(e>>16)&n)&n)/4294967296+.5)*(r.random()>.5?1:-1))};for(let s,i=0;inew V.R(I.p.g(e)),B(e,t,n,r){if(n=n||1e4,0>r||0>n)throw new s("invalid params to pbkdf2");const i=1+(r>>5)<<2;let o,c,f,a,u;const w=new ArrayBuffer(i),h=new l(w);let d=0;const p=_;for(t=I.p.g(t),u=1;(i||1)>d;u++){for(o=c=e.encrypt(p.concat(t,[u])),f=1;n>f;f++)for(c=e.encrypt(c),a=0;ad&&fs&&(e=(new n).update(e).P());for(let t=0;s>t;t++)r[0][t]=909522486^e[t],r[1][t]=1549556828^e[t];t.U[0].update(r[0]),t.U[1].update(r[1]),t.K=new n(t.U[0])}reset(){const e=this;e.K=new e.M(e.U[0]),e.N=!1}update(e){this.N=!0,this.K.update(e)}digest(){const e=this,t=e.K.P(),n=new e.M(e.U[1]).update(t).P();return e.reset(),n}encrypt(e){if(this.N)throw new s("encrypt on already updated hmac called!");return this.update(e),this.digest(e)}}},R=typeof h!=v&&typeof h.getRandomValues==S,B="Invalid password",E="Invalid signature",M="zipjs-abort-check-password";function U(e){return R?h.getRandomValues(e):D.getRandomValues(e)}const K=16,N={name:"PBKDF2"},O=t.assign({hash:{name:"HMAC"}},N),T=t.assign({iterations:1e3,hash:{name:"SHA-1"}},N),W=["deriveBits"],j=[8,12,16],H=[16,24,32],L=10,F=[0,0,0,0],q=typeof h!=v,G=q&&h.subtle,J=q&&typeof G!=v,Q=I.p,X=class{constructor(e){const t=this;t.O=[[[],[],[],[],[]],[[],[],[],[],[]]],t.O[0][0][0]||t.T();const n=t.O[0][4],r=t.O[1],i=e.length;let o,c,f,a=1;if(4!==i&&6!==i&&8!==i)throw new s("invalid aes key size");for(t.v=[c=e.slice(0),f=[]],o=i;4*i+28>o;o++){let e=c[o-1];(o%i==0||8===i&&o%i==4)&&(e=n[e>>>24]<<24^n[e>>16&255]<<16^n[e>>8&255]<<8^n[255&e],o%i==0&&(e=e<<8^e>>>24^a<<24,a=a<<1^283*(a>>7))),c[o]=c[o-i]^e}for(let e=0;o;e++,o--){const t=c[3&e?o:o-4];f[e]=4>=o||4>e?t:r[0][n[t>>>24]]^r[1][n[t>>16&255]]^r[2][n[t>>8&255]]^r[3][n[255&t]]}}encrypt(e){return this.W(e,0)}decrypt(e){return this.W(e,1)}T(){const e=this.O[0],t=this.O[1],n=e[4],r=t[4],s=[],i=[];let o,c,f,a;for(let e=0;256>e;e++)i[(s[e]=e<<1^283*(e>>7))^e]=e;for(let l=o=0;!n[l];l^=c||1,o=i[o]||1){let i=o^o<<1^o<<2^o<<3^o<<4;i=i>>8^255&i^99,n[l]=i,r[i]=l,a=s[f=s[c=s[l]]];let u=16843009*a^65537*f^257*c^16843008*l,w=257*s[i]^16843008*i;for(let n=0;4>n;n++)e[n][l]=w=w<<24^w>>>8,t[n][i]=u=u<<24^u>>>8}for(let n=0;5>n;n++)e[n]=e[n].slice(0),t[n]=t[n].slice(0)}W(e,t){if(4!==e.length)throw new s("invalid aes block size");const n=this.v[t],r=n.length/4-2,i=[0,0,0,0],o=this.O[t],c=o[0],f=o[1],a=o[2],l=o[3],u=o[4];let w,h,d,p=e[0]^n[0],y=e[t?3:1]^n[1],m=e[2]^n[2],b=e[t?1:3]^n[3],g=4;for(let e=0;r>e;e++)w=c[p>>>24]^f[y>>16&255]^a[m>>8&255]^l[255&b]^n[g],h=c[y>>>24]^f[m>>16&255]^a[b>>8&255]^l[255&p]^n[g+1],d=c[m>>>24]^f[b>>16&255]^a[p>>8&255]^l[255&y]^n[g+2],b=c[b>>>24]^f[p>>16&255]^a[y>>8&255]^l[255&m]^n[g+3],g+=4,p=w,y=h,m=d;for(let e=0;4>e;e++)i[t?3&-e:e]=u[p>>>24]<<24^u[y>>16&255]<<16^u[m>>8&255]<<8^u[255&b]^n[g++],w=p,p=y,y=m,m=b,b=w;return i}},Y=class{constructor(e,t){this.j=e,this.H=t,this.L=t}reset(){this.L=this.H}update(e){return this.F(this.j,e,this.L)}q(e){if(255==(e>>24&255)){let t=e>>16&255,n=e>>8&255,r=255&e;255===t?(t=0,255===n?(n=0,255===r?r=0:++r):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=r}else e+=1<<24;return e}G(e){0===(e[0]=this.q(e[0]))&&(e[1]=this.q(e[1]))}F(e,t,n){let r;if(!(r=t.length))return[];const s=_.l(t);for(let s=0;r>s;s+=4){this.G(n);const r=e.encrypt(n);t[s]^=r[0],t[s+1]^=r[1],t[s+2]^=r[2],t[s+3]^=r[3]}return _.u(t,s)}},Z=V.R;let $=q&&J&&typeof G.importKey==S,ee=q&&J&&typeof G.deriveBits==S;class te extends p{constructor({password:e,rawPassword:n,signed:r,encryptionStrength:o,checkPasswordOnly:c}){super({start(){t.assign(this,{ready:new u((e=>this.J=e)),password:ie(e,n),signed:r,X:o-1,pending:new i})},async transform(e,t){const n=this,{password:r,X:o,J:f,ready:a}=n;r?(await(async(e,t,n,r)=>{const i=await se(e,t,n,ce(r,0,j[t])),o=ce(r,j[t]);if(i[0]!=o[0]||i[1]!=o[1])throw new s(B)})(n,o,r,ce(e,0,j[o]+2)),e=ce(e,j[o]+2),c?t.error(new s(M)):f()):await a;const l=new i(e.length-L-(e.length-L)%K);t.enqueue(re(n,e,l,0,L,!0))},async flush(e){const{signed:t,Y:n,Z:r,pending:o,ready:c}=this;if(r&&n){await c;const f=ce(o,0,o.length-L),a=ce(o,o.length-L);let l=new i;if(f.length){const e=ae(Q,f);r.update(e);const t=n.update(e);l=fe(Q,t)}if(t){const e=ce(fe(Q,r.digest()),0,L);for(let t=0;L>t;t++)if(e[t]!=a[t])throw new s(E)}e.enqueue(l)}}})}}class ne extends p{constructor({password:e,rawPassword:n,encryptionStrength:r}){let s;super({start(){t.assign(this,{ready:new u((e=>this.J=e)),password:ie(e,n),X:r-1,pending:new i})},async transform(e,t){const n=this,{password:r,X:s,J:o,ready:c}=n;let f=new i;r?(f=await(async(e,t,n)=>{const r=U(new i(j[t]));return oe(r,await se(e,t,n,r))})(n,s,r),o()):await c;const a=new i(f.length+e.length-e.length%K);a.set(f,0),t.enqueue(re(n,e,a,f.length,0))},async flush(e){const{Y:t,Z:n,pending:r,ready:o}=this;if(n&&t){await o;let c=new i;if(r.length){const e=t.update(ae(Q,r));n.update(e),c=fe(Q,e)}s.signature=fe(Q,n.digest()).slice(0,L),e.enqueue(oe(c,s.signature))}}}),s=this}}function re(e,t,n,r,s,o){const{Y:c,Z:f,pending:a}=e,l=t.length-s;let u;for(a.length&&(t=oe(a,t),n=((e,t)=>{if(t&&t>e.length){const n=e;(e=new i(t)).set(n,0)}return e})(n,l-l%K)),u=0;l-K>=u;u+=K){const e=ae(Q,ce(t,u,u+K));o&&f.update(e);const s=c.update(e);o||f.update(s),n.set(fe(Q,s),u+r)}return e.pending=ce(t,u),n}async function se(n,r,s,o){n.password=null;const c=await(async(e,t,n,r,s)=>{if(!$)return V.importKey(t);try{return await G.importKey("raw",t,n,!1,s)}catch(e){return $=!1,V.importKey(t)}})(0,s,O,0,W),f=await(async(e,t,n)=>{if(!ee)return V.B(t,e.salt,T.iterations,n);try{return await G.deriveBits(e,t,n)}catch(r){return ee=!1,V.B(t,e.salt,T.iterations,n)}})(t.assign({salt:o},T),c,8*(2*H[r]+2)),a=new i(f),l=ae(Q,ce(a,0,H[r])),u=ae(Q,ce(a,H[r],2*H[r])),w=ce(a,2*H[r]);return t.assign(n,{keys:{key:l,$:u,passwordVerification:w},Y:new Y(new X(l),e.from(F)),Z:new Z(u)}),w}function ie(e,t){return t===k?(e=>{if(typeof w==v){const t=new i((e=unescape(encodeURIComponent(e))).length);for(let n=0;n>>24]),i=~e.te.get(),e.keys=[n,s,i]}function ye(e){const t=2|e.keys[2];return me(r.imul(t,1^t)>>>8)}function me(e){return 255&e}function be(e){return 4294967295&e}const ge="deflate-raw";class ke extends p{constructor(e,{chunkSize:t,CompressionStream:n,CompressionStreamNative:r}){super({});const{compressed:s,encrypted:i,useCompressionStream:o,zipCrypto:c,signed:f,level:a}=e,u=this;let w,h,d=Se(super.readable);i&&!c||!f||(w=new A,d=xe(d,w)),s&&(d=Ce(d,o,{level:a,chunkSize:t},r,n)),i&&(c?d=xe(d,new ue(e)):(h=new ne(e),d=xe(d,h))),ze(u,d,(()=>{let e;i&&!c&&(e=h.signature),i&&!c||!f||(e=new l(w.value.buffer).getUint32(0)),u.signature=e}))}}class ve extends p{constructor(e,{chunkSize:t,DecompressionStream:n,DecompressionStreamNative:r}){super({});const{zipCrypto:i,encrypted:o,signed:c,signature:f,compressed:a,useCompressionStream:u}=e;let w,h,d=Se(super.readable);o&&(i?d=xe(d,new le(e)):(h=new te(e),d=xe(d,h))),a&&(d=Ce(d,u,{chunkSize:t},r,n)),o&&!i||!c||(w=new A,d=xe(d,w)),ze(this,d,(()=>{if((!o||i)&&c){const e=new l(w.value.buffer);if(f!=e.getUint32(0,!1))throw new s(E)}}))}}function Se(e){return xe(e,new p({transform(e,t){e&&e.length&&t.enqueue(e)}}))}function ze(e,n,r){n=xe(n,new p({flush:r})),t.defineProperty(e,"readable",{get:()=>n})}function Ce(e,t,n,r,s){try{e=xe(e,new(t&&r?r:s)(ge,n))}catch(r){if(!t)return e;try{e=xe(e,new s(ge,n))}catch(t){return e}}return e}function xe(e,t){return e.pipeThrough(t)}const Ae="data",_e="close";class Ie extends p{constructor(e,n){super({});const r=this,{codecType:s}=e;let i;s.startsWith("deflate")?i=ke:s.startsWith("inflate")&&(i=ve);let o=0,c=0;const f=new i(e,n),a=super.readable,l=new p({transform(e,t){e&&e.length&&(c+=e.length,t.enqueue(e))},flush(){t.assign(r,{inputSize:c})}}),u=new p({transform(e,t){e&&e.length&&(o+=e.length,t.enqueue(e))},flush(){const{signature:e}=f;t.assign(r,{signature:e,outputSize:o,inputSize:c})}});t.defineProperty(r,"readable",{get:()=>a.pipeThrough(l).pipeThrough(f).pipeThrough(u)})}}class Pe extends p{constructor(e){let t;super({transform:function n(r,s){if(t){const e=new i(t.length+r.length);e.set(t),e.set(r,t.length),r=e,t=null}r.length>e?(s.enqueue(r.slice(0,e)),n(r.slice(e),s)):t=r},flush(e){t&&t.length&&e.enqueue(t)}})}}const De=new a,Ve=new a;let Re,Be=0,Ee=!0;async function Me(e){try{const{options:t,scripts:r,config:s}=e;if(r&&r.length)try{Ee?importScripts.apply(k,r):await Ue(r)}catch(e){Ee=!1,await Ue(r)}self.initCodec&&self.initCodec(),s.CompressionStreamNative=self.CompressionStream,s.DecompressionStreamNative=self.DecompressionStream,self.Deflate&&(s.CompressionStream=new z(self.Deflate)),self.Inflate&&(s.DecompressionStream=new z(self.Inflate));const i={highWaterMark:1},o=e.readable||new y({async pull(e){const t=new u((e=>De.set(Be,e)));Ke({type:"pull",messageId:Be}),Be=(Be+1)%n.MAX_SAFE_INTEGER;const{value:r,done:s}=await t;e.enqueue(r),s&&e.close()}},i),c=e.writable||new m({async write(e){let t;const r=new u((e=>t=e));Ve.set(Be,t),Ke({type:Ae,value:e,messageId:Be}),Be=(Be+1)%n.MAX_SAFE_INTEGER,await r}},i),f=new Ie(t,s);Re=new AbortController;const{signal:a}=Re;await o.pipeThrough(f).pipeThrough(new Pe(s.chunkSize)).pipeTo(c,{signal:a,preventClose:!0,preventAbort:!0}),await c.getWriter().close();const{signature:l,inputSize:w,outputSize:h}=f;Ke({type:_e,result:{signature:l,inputSize:w,outputSize:h}})}catch(e){Ne(e)}}async function Ue(e){for(const t of e)await import(t)}function Ke(e){let{value:t}=e;if(t)if(t.length)try{t=new i(t),e.value=t.buffer,d(e,[e.value])}catch(t){d(e)}else d(e);else d(e)}function Ne(e=new s("Unknown error")){const{message:t,stack:n,code:r,name:i}=e;d({error:{message:t,stack:n,code:r,name:i}})}addEventListener("message",(({data:e})=>{const{type:t,messageId:n,value:r,done:s}=e;try{if("start"==t&&Me(e),t==Ae){const e=De.get(n);De.delete(n),e({value:new i(r),done:s})}if("ack"==t){const e=Ve.get(n);Ve.delete(n),e()}t==_e&&Re.abort()}catch(e){Ne(e)}}));const Oe=-2;function Te(t){return We(t.map((([t,n])=>new e(t).fill(n,0,t))))}function We(t){return t.reduce(((t,n)=>t.concat(e.isArray(n)?We(n):n)),[])}const je=[0,1,2,3].concat(...Te([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function He(){const e=this;function t(e,t){let n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1}e.ne=n=>{const s=e.re,i=e.ie.se,o=e.ie.oe;let c,f,a,l=-1;for(n.ce=0,n.fe=573,c=0;o>c;c++)0!==s[2*c]?(n.ae[++n.ce]=l=c,n.le[c]=0):s[2*c+1]=0;for(;2>n.ce;)a=n.ae[++n.ce]=2>l?++l:0,s[2*a]=1,n.le[a]=0,n.ue--,i&&(n.we-=i[2*a+1]);for(e.he=l,c=r.floor(n.ce/2);c>=1;c--)n.de(s,c);a=o;do{c=n.ae[1],n.ae[1]=n.ae[n.ce--],n.de(s,1),f=n.ae[1],n.ae[--n.fe]=c,n.ae[--n.fe]=f,s[2*a]=s[2*c]+s[2*f],n.le[a]=r.max(n.le[c],n.le[f])+1,s[2*c+1]=s[2*f+1]=a,n.ae[1]=a++,n.de(s,1)}while(n.ce>=2);n.ae[--n.fe]=n.ae[1],(t=>{const n=e.re,r=e.ie.se,s=e.ie.pe,i=e.ie.ye,o=e.ie.me;let c,f,a,l,u,w,h=0;for(l=0;15>=l;l++)t.be[l]=0;for(n[2*t.ae[t.fe]+1]=0,c=t.fe+1;573>c;c++)f=t.ae[c],l=n[2*n[2*f+1]+1]+1,l>o&&(l=o,h++),n[2*f+1]=l,f>e.he||(t.be[l]++,u=0,i>f||(u=s[f-i]),w=n[2*f],t.ue+=w*(l+u),r&&(t.we+=w*(r[2*f+1]+u)));if(0!==h){do{for(l=o-1;0===t.be[l];)l--;t.be[l]--,t.be[l+1]+=2,t.be[o]--,h-=2}while(h>0);for(l=o;0!==l;l--)for(f=t.be[l];0!==f;)a=t.ae[--c],a>e.he||(n[2*a+1]!=l&&(t.ue+=(l-n[2*a+1])*n[2*a],n[2*a+1]=l),f--)}})(n),((e,n,r)=>{const s=[];let i,o,c,f=0;for(i=1;15>=i;i++)s[i]=f=f+r[i-1]<<1;for(o=0;n>=o;o++)c=e[2*o+1],0!==c&&(e[2*o]=t(s[c]++,c))})(s,e.he,n.be)}}function Le(e,t,n,r,s){const i=this;i.se=e,i.pe=t,i.ye=n,i.oe=r,i.me=s}He.ge=[0,1,2,3,4,5,6,7].concat(...Te([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]])),He.ke=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0],He.ve=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576],He.Se=e=>256>e?je[e]:je[256+(e>>>7)],He.ze=[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],He.Ce=[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],He.xe=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],He.Ae=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];const Fe=Te([[144,8],[112,9],[24,7],[8,8]]);Le._e=We([12,140,76,204,44,172,108,236,28,156,92,220,60,188,124,252,2,130,66,194,34,162,98,226,18,146,82,210,50,178,114,242,10,138,74,202,42,170,106,234,26,154,90,218,58,186,122,250,6,134,70,198,38,166,102,230,22,150,86,214,54,182,118,246,14,142,78,206,46,174,110,238,30,158,94,222,62,190,126,254,1,129,65,193,33,161,97,225,17,145,81,209,49,177,113,241,9,137,73,201,41,169,105,233,25,153,89,217,57,185,121,249,5,133,69,197,37,165,101,229,21,149,85,213,53,181,117,245,13,141,77,205,45,173,109,237,29,157,93,221,61,189,125,253,19,275,147,403,83,339,211,467,51,307,179,435,115,371,243,499,11,267,139,395,75,331,203,459,43,299,171,427,107,363,235,491,27,283,155,411,91,347,219,475,59,315,187,443,123,379,251,507,7,263,135,391,71,327,199,455,39,295,167,423,103,359,231,487,23,279,151,407,87,343,215,471,55,311,183,439,119,375,247,503,15,271,143,399,79,335,207,463,47,303,175,431,111,367,239,495,31,287,159,415,95,351,223,479,63,319,191,447,127,383,255,511,0,64,32,96,16,80,48,112,8,72,40,104,24,88,56,120,4,68,36,100,20,84,52,116,3,131,67,195,35,163,99,227].map(((e,t)=>[e,Fe[t]])));const qe=Te([[30,5]]);function Ge(e,t,n,r,s){const i=this;i.Ie=e,i.Pe=t,i.De=n,i.Ve=r,i.Re=s}Le.Be=We([0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30,1,17,9,25,5,21,13,29,3,19,11,27,7,23].map(((e,t)=>[e,qe[t]]))),Le.Ee=new Le(Le._e,He.ze,257,286,15),Le.Me=new Le(Le.Be,He.Ce,0,30,15),Le.Ue=new Le(null,He.xe,0,19,7);const Je=[new Ge(0,0,0,0,0),new Ge(4,4,8,4,1),new Ge(4,5,16,8,1),new Ge(4,6,32,32,1),new Ge(4,4,16,16,2),new Ge(8,16,32,32,2),new Ge(8,16,128,128,2),new Ge(8,32,128,256,2),new Ge(32,128,258,1024,2),new Ge(32,258,258,4096,2)],Qe=["need dictionary","stream end","","","stream error","data error","","buffer error","",""],Xe=113,Ye=666,Ze=262;function $e(e,t,n,r){const s=e[2*t],i=e[2*n];return i>s||s==i&&r[t]<=r[n]}function et(){const e=this;let t,n,s,c,f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z,C,x,A,_,I,P,D,V,R,B,E,M,U;const K=new He,N=new He,O=new He;let T,W,j,H,L,F;function q(){let t;for(t=0;286>t;t++)E[2*t]=0;for(t=0;30>t;t++)M[2*t]=0;for(t=0;19>t;t++)U[2*t]=0;E[512]=1,e.ue=e.we=0,W=j=0}function G(e,t){let n,r=-1,s=e[1],i=0,o=7,c=4;0===s&&(o=138,c=3),e[2*(t+1)+1]=65535;for(let f=0;t>=f;f++)n=s,s=e[2*(f+1)+1],++ii?U[2*n]+=i:0!==n?(n!=r&&U[2*n]++,U[32]++):i>10?U[36]++:U[34]++,i=0,r=n,0===s?(o=138,c=3):n==s?(o=6,c=3):(o=7,c=4))}function J(t){e.Ke[e.pending++]=t}function Q(e){J(255&e),J(e>>>8&255)}function X(e,t){let n;const r=t;F>16-r?(n=e,L|=n<>>16-F,F+=r-16):(L|=e<=n;n++)if(r=i,i=e[2*(n+1)+1],++o>=c||r!=i){if(f>o)do{Y(r,U)}while(0!=--o);else 0!==r?(r!=s&&(Y(r,U),o--),Y(16,U),X(o-3,2)):o>10?(Y(18,U),X(o-11,7)):(Y(17,U),X(o-3,3));o=0,s=r,0===i?(c=138,f=3):r==i?(c=6,f=3):(c=7,f=4)}}function $(){16==F?(Q(L),L=0,F=0):8>F||(J(255&L),L>>>=8,F-=8)}function ee(t,n){let s,i,o;if(e.Ne[W]=t,e.Oe[W]=255&n,W++,0===t?E[2*n]++:(j++,t--,E[2*(He.ge[n]+256+1)]++,M[2*He.Se(t)]++),0==(8191&W)&&D>2){for(s=8*W,i=C-k,o=0;30>o;o++)s+=M[2*o]*(5+He.Ce[o]);if(s>>>=3,jc);Y(256,t),H=t[513]}function ne(){F>8?Q(L):F>0&&J(255&L),L=0,F=0}function re(t,n,r){X(0+(r?1:0),3),((t,n)=>{ne(),H=8,Q(n),Q(~n),e.Ke.set(u.subarray(t,t+n),e.pending),e.pending+=n})(t,n)}function se(n){((t,n,r)=>{let s,i,o=0;D>0?(K.ne(e),N.ne(e),o=(()=>{let t;for(G(E,K.he),G(M,N.he),O.ne(e),t=18;t>=3&&0===U[2*He.Ae[t]+1];t--);return e.ue+=14+3*(t+1),t})(),s=e.ue+3+7>>>3,i=e.we+3+7>>>3,i>s||(s=i)):s=i=n+5,n+4>s||-1==t?i==s?(X(2+(r?1:0),3),te(Le._e,Le.Be)):(X(4+(r?1:0),3),((e,t,n)=>{let r;for(X(e-257,5),X(t-1,5),X(n-4,4),r=0;n>r;r++)X(U[2*He.Ae[r]+1],3);Z(E,e-1),Z(M,t-1)})(K.he+1,N.he+1,o+1),te(E,M)):re(t,n,r),q(),r&&ne()})(0>k?-1:k,C-k,n),k=C,t.Te()}function ie(){let e,n,r,s;do{if(s=w-A-C,0===s&&0===C&&0===A)s=f;else if(-1==s)s--;else if(C>=f+f-Ze){u.set(u.subarray(f,f+f),0),x-=f,C-=f,k-=f,e=y,r=e;do{n=65535&d[--r],d[r]=f>n?0:n-f}while(0!=--e);e=f,r=e;do{n=65535&h[--r],h[r]=f>n?0:n-f}while(0!=--e);s+=f}if(0===t.We)return;e=t.je(u,C+A,s),A+=e,3>A||(p=255&u[C],p=(p<A&&0!==t.We)}function oe(e){let t,n,r=I,s=C,i=_;const o=C>f-Ze?C-(f-Ze):0;let c=B;const a=l,w=C+258;let d=u[s+i-1],p=u[s+i];R>_||(r>>=2),c>A&&(c=A);do{if(t=e,u[t+i]==p&&u[t+i-1]==d&&u[t]==u[s]&&u[++t]==u[s+1]){s+=2,t++;do{}while(u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&w>s);if(n=258-(w-s),s=w-258,n>i){if(x=e,i=n,n>=c)break;d=u[s+i-1],p=u[s+i]}}}while((e=65535&h[e&a])>o&&0!=--r);return i>A?A:i}e.le=[],e.be=[],e.ae=[],E=[],M=[],U=[],e.de=(t,n)=>{const r=e.ae,s=r[n];let i=n<<1;for(;i<=e.ce&&(i(W||(W=8),j||(j=8),G||(G=0),t.Le=null,-1==S&&(S=6),1>j||j>9||8!=W||9>x||x>15||0>S||S>9||0>G||G>2?Oe:(t.Fe=e,a=x,f=1<(t.qe=t.Ge=0,t.Le=null,e.pending=0,e.Je=0,n=Xe,c=0,K.re=E,K.ie=Le.Ee,N.re=M,N.ie=Le.Me,O.re=U,O.ie=Le.Ue,L=0,F=0,H=8,q(),(()=>{w=2*f,d[y-1]=0;for(let e=0;y-1>e;e++)d[e]=0;P=Je[D].Pe,R=Je[D].Ie,B=Je[D].De,I=Je[D].Ve,C=0,k=0,A=0,v=_=2,z=0,p=0})(),0))(t))),e.Qe=()=>42!=n&&n!=Xe&&n!=Ye?Oe:(e.Oe=null,e.Ne=null,e.Ke=null,d=null,h=null,u=null,e.Fe=null,n==Xe?-3:0),e.Xe=(e,t,n)=>{let r=0;return-1==t&&(t=6),0>t||t>9||0>n||n>2?Oe:(Je[D].Re!=Je[t].Re&&0!==e.qe&&(r=e.Ye(1)),D!=t&&(D=t,P=Je[D].Pe,R=Je[D].Ie,B=Je[D].De,I=Je[D].Ve),V=n,r)},e.Ze=(e,t,r)=>{let s,i=r,o=0;if(!t||42!=n)return Oe;if(3>i)return 0;for(i>f-Ze&&(i=f-Ze,o=r-i),u.set(t.subarray(o,o+i),0),C=i,k=i,p=255&u[0],p=(p<=s;s++)p=(p<{let o,w,m,I,R;if(i>4||0>i)return Oe;if(!r.$e||!r.et&&0!==r.We||n==Ye&&4!=i)return r.Le=Qe[4],Oe;if(0===r.tt)return r.Le=Qe[7],-5;var B;if(t=r,I=c,c=i,42==n&&(w=8+(a-8<<4)<<8,m=(D-1&255)>>1,m>3&&(m=3),w|=m<<6,0!==C&&(w|=32),w+=31-w%31,n=Xe,J((B=w)>>8&255),J(255&B)),0!==e.pending){if(t.Te(),0===t.tt)return c=-1,0}else if(0===t.We&&I>=i&&4!=i)return t.Le=Qe[7],-5;if(n==Ye&&0!==t.We)return r.Le=Qe[7],-5;if(0!==t.We||0!==A||0!=i&&n!=Ye){switch(R=-1,Je[D].Re){case 0:R=(e=>{let n,r=65535;for(r>s-5&&(r=s-5);;){if(1>=A){if(ie(),0===A&&0==e)return 0;if(0===A)break}if(C+=A,A=0,n=k+r,(0===C||C>=n)&&(A=C-n,C=n,se(!1),0===t.tt))return 0;if(C-k>=f-Ze&&(se(!1),0===t.tt))return 0}return se(4==e),0===t.tt?4==e?2:0:4==e?3:1})(i);break;case 1:R=(e=>{let n,r=0;for(;;){if(Ze>A){if(ie(),Ze>A&&0==e)return 0;if(0===A)break}if(3>A||(p=(p<f-Ze||2!=V&&(v=oe(r)),3>v)n=ee(0,255&u[C]),A--,C++;else if(n=ee(C-x,v-3),A-=v,v>P||3>A)C+=v,v=0,p=255&u[C],p=(p<{let n,r,s=0;for(;;){if(Ze>A){if(ie(),Ze>A&&0==e)return 0;if(0===A)break}if(3>A||(p=(p<_&&f-Ze>=(C-s&65535)&&(2!=V&&(v=oe(s)),5>=v&&(1==V||3==v&&C-x>4096)&&(v=2)),3>_||v>_)if(0!==z){if(n=ee(0,255&u[C-1]),n&&se(!1),C++,A--,0===t.tt)return 0}else z=1,C++,A--;else{r=C+A-3,n=ee(C-1-S,_-3),A-=_-1,_-=2;do{++C>r||(p=(p<1+H+10-F&&(X(2,3),Y(256,Le._e),$()),H=7;else if(re(0,0,!1),3==i)for(o=0;y>o;o++)d[o]=0;if(t.Te(),0===t.tt)return c=-1,0}}return 4!=i?0:1}}function tt(){const e=this;e.nt=0,e.rt=0,e.We=0,e.qe=0,e.tt=0,e.Ge=0}function nt(e){const t=new tt,n=(o=e&&e.chunkSize?e.chunkSize:65536)+5*(r.floor(o/16383)+1);var o;const c=new i(n);let f=e?e.level:-1;void 0===f&&(f=-1),t.He(f),t.$e=c,this.append=(e,r)=>{let o,f,a=0,l=0,u=0;const w=[];if(e.length){t.nt=0,t.et=e,t.We=e.length;do{if(t.rt=0,t.tt=n,o=t.Ye(0),0!=o)throw new s("deflating: "+t.Le);t.rt&&(t.rt==n?w.push(new i(c)):w.push(c.subarray(0,t.rt))),u+=t.rt,r&&t.nt>0&&t.nt!=a&&(r(t.nt),a=t.nt)}while(t.We>0||0===t.tt);return w.length>1?(f=new i(u),w.forEach((e=>{f.set(e,l),l+=e.length}))):f=w[0]?new i(w[0]):new i,f}},this.flush=()=>{let e,r,o=0,f=0;const a=[];do{if(t.rt=0,t.tt=n,e=t.Ye(4),1!=e&&0!=e)throw new s("deflating: "+t.Le);n-t.tt>0&&a.push(c.slice(0,t.rt)),f+=t.rt}while(t.We>0||0===t.tt);return t.Qe(),r=new i(f),a.forEach((e=>{r.set(e,o),o+=e.length})),r}}tt.prototype={He(e,t){const n=this;return n.Fe=new et,t||(t=15),n.Fe.He(n,e,t)},Ye(e){const t=this;return t.Fe?t.Fe.Ye(t,e):Oe},Qe(){const e=this;if(!e.Fe)return Oe;const t=e.Fe.Qe();return e.Fe=null,t},Xe(e,t){const n=this;return n.Fe?n.Fe.Xe(n,e,t):Oe},Ze(e,t){const n=this;return n.Fe?n.Fe.Ze(n,e,t):Oe},je(e,t,n){const r=this;let s=r.We;return s>n&&(s=n),0===s?0:(r.We-=s,e.set(r.et.subarray(r.nt,r.nt+s),t),r.nt+=s,r.qe+=s,s)},Te(){const e=this;let t=e.Fe.pending;t>e.tt&&(t=e.tt),0!==t&&(e.$e.set(e.Fe.Ke.subarray(e.Fe.Je,e.Fe.Je+t),e.rt),e.rt+=t,e.Fe.Je+=t,e.Ge+=t,e.tt-=t,e.Fe.pending-=t,0===e.Fe.pending&&(e.Fe.Je=0))}};const rt=-2,st=-3,it=-5,ot=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],ct=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],ft=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],at=[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,0,0],lt=[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,112,112],ut=[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],wt=[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];function ht(){let e,t,n,r,s,i;function o(e,t,o,c,f,a,l,u,w,h,d){let p,y,m,b,g,k,v,S,z,C,x,A,_,I,P;C=0,g=o;do{n[e[t+C]]++,C++,g--}while(0!==g);if(n[0]==o)return l[0]=-1,u[0]=0,0;for(S=u[0],k=1;15>=k&&0===n[k];k++);for(v=k,k>S&&(S=k),g=15;0!==g&&0===n[g];g--);for(m=g,S>g&&(S=g),u[0]=S,I=1<k;k++,I<<=1)if(0>(I-=n[k]))return st;if(0>(I-=n[g]))return st;for(n[g]+=I,i[1]=k=0,C=1,_=2;0!=--g;)i[_]=k+=n[C],_++,C++;g=0,C=0;do{0!==(k=e[t+C])&&(d[i[k]++]=g),C++}while(++g=v;v++)for(p=n[v];0!=p--;){for(;v>A+S;){if(b++,A+=S,P=m-A,P=P>S?S:P,(y=1<<(k=v-A))>p+1&&(y-=p+1,_=v,P>k))for(;++kn[++_];)y-=n[_];if(P=1<1440)return st;s[b]=x=h[0],h[0]+=P,0!==b?(i[b]=g,r[0]=k,r[1]=S,k=g>>>A-S,r[2]=x-s[b-1]-k,w.set(r,3*(s[b-1]+k))):l[0]=x}for(r[1]=v-A,o>C?d[C]d[C]?0:96,r[2]=d[C++]):(r[0]=a[d[C]-c]+16+64,r[2]=f[d[C++]-c]):r[0]=192,y=1<>>A;P>k;k+=y)w.set(r,3*(x+k));for(k=1<>>=1)g^=k;for(g^=k,z=(1<c;c++)t[c]=0;for(c=0;16>c;c++)n[c]=0;for(c=0;3>c;c++)r[c]=0;s.set(n.subarray(0,15),0),i.set(n.subarray(0,16),0)}this.st=(n,r,s,i,f)=>{let a;return c(19),e[0]=0,a=o(n,0,19,19,null,null,s,r,i,e,t),a==st?f.Le="oversubscribed dynamic bit lengths tree":a!=it&&0!==r[0]||(f.Le="incomplete dynamic bit lengths tree",a=st),a},this.it=(n,r,s,i,f,a,l,u,w)=>{let h;return c(288),e[0]=0,h=o(s,0,n,257,at,lt,a,i,u,e,t),0!=h||0===i[0]?(h==st?w.Le="oversubscribed literal/length tree":-4!=h&&(w.Le="incomplete literal/length tree",h=st),h):(c(288),h=o(s,n,r,0,ut,wt,l,f,u,e,t),0!=h||0===f[0]&&n>257?(h==st?w.Le="oversubscribed distance tree":h==it?(w.Le="incomplete distance tree",h=st):-4!=h&&(w.Le="empty distance tree with lengths",h=st),h):0)}}function dt(){const e=this;let t,n,r,s,i=0,o=0,c=0,f=0,a=0,l=0,u=0,w=0,h=0,d=0;function p(e,t,n,r,s,i,o,c){let f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z;d=c.nt,p=c.We,w=o.ot,h=o.ct,y=o.write,m=yh;)p--,w|=(255&c.ft(d++))<>=a[z+1],h-=a[z+1],0!=(16&u)){for(u&=15,k=a[z+2]+(w&ot[u]),w>>=u,h-=u;15>h;)p--,w|=(255&c.ft(d++))<>=a[z+1],h-=a[z+1],0!=(16&u)){for(u&=15;u>h;)p--,w|=(255&c.ft(d++))<>=u,h-=u,m-=k,v>y){S=y-v;do{S+=o.end}while(0>S);if(u=o.end-S,k>u){if(k-=u,y-S>0&&u>y-S)do{o.lt[y++]=o.lt[S++]}while(0!=--u);else o.lt.set(o.lt.subarray(S,S+u),y),y+=u,S+=u,u=0;S=0}}else S=y-v,y-S>0&&2>y-S?(o.lt[y++]=o.lt[S++],o.lt[y++]=o.lt[S++],k-=2):(o.lt.set(o.lt.subarray(S,S+2),y),y+=2,S+=2,k-=2);if(y-S>0&&k>y-S)do{o.lt[y++]=o.lt[S++]}while(0!=--k);else o.lt.set(o.lt.subarray(S,S+k),y),y+=k,S+=k,k=0;break}if(0!=(64&u))return c.Le="invalid distance code",k=c.We-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ot=w,o.ct=h,c.We=p,c.qe+=d-c.nt,c.nt=d,o.write=y,st;f+=a[z+2],f+=w&ot[u],z=3*(l+f),u=a[z]}break}if(0!=(64&u))return 0!=(32&u)?(k=c.We-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ot=w,o.ct=h,c.We=p,c.qe+=d-c.nt,c.nt=d,o.write=y,1):(c.Le="invalid literal/length code",k=c.We-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ot=w,o.ct=h,c.We=p,c.qe+=d-c.nt,c.nt=d,o.write=y,st);if(f+=a[z+2],f+=w&ot[u],z=3*(l+f),0===(u=a[z])){w>>=a[z+1],h-=a[z+1],o.lt[y++]=a[z+2],m--;break}}else w>>=a[z+1],h-=a[z+1],o.lt[y++]=a[z+2],m--}while(m>=258&&p>=10);return k=c.We-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ot=w,o.ct=h,c.We=p,c.qe+=d-c.nt,c.nt=d,o.write=y,0}e.init=(e,i,o,c,f,a)=>{t=0,u=e,w=i,r=o,h=c,s=f,d=a,n=null},e.ut=(e,y,m)=>{let b,g,k,v,S,z,C,x=0,A=0,_=0;for(_=y.nt,v=y.We,x=e.ot,A=e.ct,S=e.write,z=S=258&&v>=10&&(e.ot=x,e.ct=A,y.We=v,y.qe+=_-y.nt,y.nt=_,e.write=S,m=p(u,w,r,h,s,d,e,y),_=y.nt,v=y.We,x=e.ot,A=e.ct,S=e.write,z=SA;){if(0===v)return e.ot=x,e.ct=A,y.We=v,y.qe+=_-y.nt,y.nt=_,e.write=S,e.wt(y,m);m=0,v--,x|=(255&y.ft(_++))<>>=n[g+1],A-=n[g+1],k=n[g],0===k){f=n[g+2],t=6;break}if(0!=(16&k)){a=15&k,i=n[g+2],t=2;break}if(0==(64&k)){c=k,o=g/3+n[g+2];break}if(0!=(32&k)){t=7;break}return t=9,y.Le="invalid literal/length code",m=st,e.ot=x,e.ct=A,y.We=v,y.qe+=_-y.nt,y.nt=_,e.write=S,e.wt(y,m);case 2:for(b=a;b>A;){if(0===v)return e.ot=x,e.ct=A,y.We=v,y.qe+=_-y.nt,y.nt=_,e.write=S,e.wt(y,m);m=0,v--,x|=(255&y.ft(_++))<>=b,A-=b,c=w,n=s,o=d,t=3;case 3:for(b=c;b>A;){if(0===v)return e.ot=x,e.ct=A,y.We=v,y.qe+=_-y.nt,y.nt=_,e.write=S,e.wt(y,m);m=0,v--,x|=(255&y.ft(_++))<>=n[g+1],A-=n[g+1],k=n[g],0!=(16&k)){a=15&k,l=n[g+2],t=4;break}if(0==(64&k)){c=k,o=g/3+n[g+2];break}return t=9,y.Le="invalid distance code",m=st,e.ot=x,e.ct=A,y.We=v,y.qe+=_-y.nt,y.nt=_,e.write=S,e.wt(y,m);case 4:for(b=a;b>A;){if(0===v)return e.ot=x,e.ct=A,y.We=v,y.qe+=_-y.nt,y.nt=_,e.write=S,e.wt(y,m);m=0,v--,x|=(255&y.ft(_++))<>=b,A-=b,t=5;case 5:for(C=S-l;0>C;)C+=e.end;for(;0!==i;){if(0===z&&(S==e.end&&0!==e.read&&(S=0,z=S7&&(A-=8,v++,_--),e.write=S,m=e.wt(y,m),S=e.write,z=S{}}ht.dt=(e,t,n,r)=>(e[0]=9,t[0]=5,n[0]=ct,r[0]=ft,0);const pt=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function yt(e,t){const n=this;let r,s=0,o=0,c=0,a=0;const l=[0],u=[0],w=new dt;let h=0,d=new f(4320);const p=new ht;n.ct=0,n.ot=0,n.lt=new i(t),n.end=t,n.read=0,n.write=0,n.reset=(e,t)=>{t&&(t[0]=0),6==s&&w.ht(e),s=0,n.ct=0,n.ot=0,n.read=n.write=0},n.reset(e,null),n.wt=(e,t)=>{let r,s,i;return s=e.rt,i=n.read,r=(i>n.write?n.end:n.write)-i,r>e.tt&&(r=e.tt),0!==r&&t==it&&(t=0),e.tt-=r,e.Ge+=r,e.$e.set(n.lt.subarray(i,i+r),s),s+=r,i+=r,i==n.end&&(i=0,n.write==n.end&&(n.write=0),r=n.write-i,r>e.tt&&(r=e.tt),0!==r&&t==it&&(t=0),e.tt-=r,e.Ge+=r,e.$e.set(n.lt.subarray(i,i+r),s),s+=r,i+=r),e.rt=s,n.read=i,t},n.ut=(e,t)=>{let i,f,y,m,b,g,k,v;for(m=e.nt,b=e.We,f=n.ot,y=n.ct,g=n.write,k=gy;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<>>1){case 0:f>>>=3,y-=3,i=7&y,f>>>=i,y-=i,s=1;break;case 1:S=[],z=[],C=[[]],x=[[]],ht.dt(S,z,C,x),w.init(S[0],z[0],C[0],0,x[0],0),f>>>=3,y-=3,s=6;break;case 2:f>>>=3,y-=3,s=3;break;case 3:return f>>>=3,y-=3,s=9,e.Le="invalid block type",t=st,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t)}break;case 1:for(;32>y;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<>>16&65535)!=(65535&f))return s=9,e.Le="invalid stored block lengths",t=st,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);o=65535&f,f=y=0,s=0!==o?2:0!==h?7:0;break;case 2:if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);if(0===k&&(g==n.end&&0!==n.read&&(g=0,k=gb&&(i=b),i>k&&(i=k),n.lt.set(e.je(m,i),g),m+=i,b-=i,g+=i,k-=i,0!=(o-=i))break;s=0!==h?7:0;break;case 3:for(;14>y;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<29||(i>>5&31)>29)return s=9,e.Le="too many length or distance symbols",t=st,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);if(i=258+(31&i)+(i>>5&31),!r||r.lengthv;v++)r[v]=0;f>>>=14,y-=14,a=0,s=4;case 4:for(;4+(c>>>10)>a;){for(;3>y;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<>>=3,y-=3}for(;19>a;)r[pt[a++]]=0;if(l[0]=7,i=p.st(r,l,u,d,e),0!=i)return(t=i)==st&&(r=null,s=9),n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);a=0,s=5;case 5:for(;i=c,258+(31&i)+(i>>5&31)>a;){let o,w;for(i=l[0];i>y;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<w)f>>>=i,y-=i,r[a++]=w;else{for(v=18==w?7:w-14,o=18==w?11:3;i+v>y;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<>>=i,y-=i,o+=f&ot[v],f>>>=v,y-=v,v=a,i=c,v+o>258+(31&i)+(i>>5&31)||16==w&&1>v)return r=null,s=9,e.Le="invalid bit length repeat",t=st,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);w=16==w?r[v-1]:0;do{r[v++]=w}while(0!=--o);a=v}}if(u[0]=-1,A=[],_=[],I=[],P=[],A[0]=9,_[0]=6,i=c,i=p.it(257+(31&i),1+(i>>5&31),r,A,_,I,P,d,e),0!=i)return i==st&&(r=null,s=9),t=i,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);w.init(A[0],_[0],d,I[0],d,P[0]),s=6;case 6:if(n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,1!=(t=w.ut(n,e,t)))return n.wt(e,t);if(t=0,w.ht(e),m=e.nt,b=e.We,f=n.ot,y=n.ct,g=n.write,k=g{n.reset(e,null),n.lt=null,d=null},n.yt=(e,t,r)=>{n.lt.set(e.subarray(t,t+r),0),n.read=n.write=r},n.bt=()=>1==s?1:0}const mt=13,bt=[0,0,255,255];function gt(){const e=this;function t(e){return e&&e.gt?(e.qe=e.Ge=0,e.Le=null,e.gt.mode=7,e.gt.kt.reset(e,null),0):rt}e.mode=0,e.method=0,e.vt=[0],e.St=0,e.marker=0,e.zt=0,e.Ct=t=>(e.kt&&e.kt.ht(t),e.kt=null,0),e.xt=(n,r)=>(n.Le=null,e.kt=null,8>r||r>15?(e.Ct(n),rt):(e.zt=r,n.gt.kt=new yt(n,1<{let n,r;if(!e||!e.gt||!e.et)return rt;const s=e.gt;for(t=4==t?it:0,n=it;;)switch(s.mode){case 0:if(0===e.We)return n;if(n=t,e.We--,e.qe++,8!=(15&(s.method=e.ft(e.nt++)))){s.mode=mt,e.Le="unknown compression method",s.marker=5;break}if(8+(s.method>>4)>s.zt){s.mode=mt,e.Le="invalid win size",s.marker=5;break}s.mode=1;case 1:if(0===e.We)return n;if(n=t,e.We--,e.qe++,r=255&e.ft(e.nt++),((s.method<<8)+r)%31!=0){s.mode=mt,e.Le="incorrect header check",s.marker=5;break}if(0==(32&r)){s.mode=7;break}s.mode=2;case 2:if(0===e.We)return n;n=t,e.We--,e.qe++,s.St=(255&e.ft(e.nt++))<<24&4278190080,s.mode=3;case 3:if(0===e.We)return n;n=t,e.We--,e.qe++,s.St+=(255&e.ft(e.nt++))<<16&16711680,s.mode=4;case 4:if(0===e.We)return n;n=t,e.We--,e.qe++,s.St+=(255&e.ft(e.nt++))<<8&65280,s.mode=5;case 5:return 0===e.We?n:(n=t,e.We--,e.qe++,s.St+=255&e.ft(e.nt++),s.mode=6,2);case 6:return s.mode=mt,e.Le="need dictionary",s.marker=0,rt;case 7:if(n=s.kt.ut(e,n),n==st){s.mode=mt,s.marker=0;break}if(0==n&&(n=t),1!=n)return n;n=t,s.kt.reset(e,s.vt),s.mode=12;case 12:return e.We=0,1;case mt:return st;default:return rt}},e._t=(e,t,n)=>{let r=0,s=n;if(!e||!e.gt||6!=e.gt.mode)return rt;const i=e.gt;return s<1<{let n,r,s,i,o;if(!e||!e.gt)return rt;const c=e.gt;if(c.mode!=mt&&(c.mode=mt,c.marker=0),0===(n=e.We))return it;for(r=e.nt,s=c.marker;0!==n&&4>s;)e.ft(r)==bt[s]?s++:s=0!==e.ft(r)?0:4-s,r++,n--;return e.qe+=r-e.nt,e.nt=r,e.We=n,c.marker=s,4!=s?st:(i=e.qe,o=e.Ge,t(e),e.qe=i,e.Ge=o,c.mode=7,0)},e.Pt=e=>e&&e.gt&&e.gt.kt?e.gt.kt.bt():rt}function kt(){}function vt(e){const t=new kt,n=e&&e.chunkSize?r.floor(2*e.chunkSize):131072,o=new i(n);let c=!1;t.xt(),t.$e=o,this.append=(e,r)=>{const f=[];let a,l,u=0,w=0,h=0;if(0!==e.length){t.nt=0,t.et=e,t.We=e.length;do{if(t.rt=0,t.tt=n,0!==t.We||c||(t.nt=0,c=!0),a=t.At(0),c&&a===it){if(0!==t.We)throw new s("inflating: bad input")}else if(0!==a&&1!==a)throw new s("inflating: "+t.Le);if((c||1===a)&&t.We===e.length)throw new s("inflating: bad input");t.rt&&(t.rt===n?f.push(new i(o)):f.push(o.subarray(0,t.rt))),h+=t.rt,r&&t.nt>0&&t.nt!=u&&(r(t.nt),u=t.nt)}while(t.We>0||0===t.tt);return f.length>1?(l=new i(h),f.forEach((e=>{l.set(e,w),w+=e.length}))):l=f[0]?new i(f[0]):new i,l}},this.flush=()=>{t.Ct()}}kt.prototype={xt(e){const t=this;return t.gt=new gt,e||(e=15),t.gt.xt(t,e)},At(e){const t=this;return t.gt?t.gt.At(t,e):rt},Ct(){const e=this;if(!e.gt)return rt;const t=e.gt.Ct(e);return e.gt=null,t},It(){const e=this;return e.gt?e.gt.It(e):rt},_t(e,t){const n=this;return n.gt?n.gt._t(n,e,t):rt},ft(e){return this.et[e]},je(e,t){return this.et.subarray(e,e+t)}},self.initCodec=()=>{self.Deflate=nt,self.Inflate=vt};\n'],{type:"text/javascript"}));e({workerScripts:{inflate:[t],deflate:[t]}})})($),e.BlobReader=Ut,e.BlobWriter=It,e.Data64URIReader=class extends Tt{constructor(e){super();let t=e.length;for(;"="==e.charAt(t-1);)t--;const r=e.indexOf(",")+1;n.assign(this,{dataURI:e,dataStart:r,size:a.floor(.75*(t-r))})}readUint8Array(e,t){const{dataStart:n,dataURI:r}=this,s=new w(t),i=4*a.floor(e/3),o=atob(r.substring(i+n,4*a.ceil((e+t)/3)+n)),c=e-3*a.floor(i/4);for(let e=c;c+t>e;e++)s[e-c]=o.charCodeAt(e);return s}},e.Data64URIWriter=class extends Lt{constructor(e){super(),n.assign(this,{data:"data:"+(e||"")+";base64,",pending:[]})}writeUint8Array(e){const t=this;let n=0,s=t.pending;const i=t.pending.length;for(t.pending="",n=0;n<3*a.floor((i+e.length)/3)-i;n++)s+=r.fromCharCode(e[n]);for(;n2?t.data+=v(s):t.pending=s}getData(){return this.data+v(this.pending)}},e.ERR_BAD_FORMAT=_n,e.ERR_CENTRAL_DIRECTORY_NOT_FOUND=Rn,e.ERR_DUPLICATED_NAME=er,e.ERR_ENCRYPTED=Tn,e.ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND=Wn,e.ERR_EOCDR_NOT_FOUND=Cn,e.ERR_EOCDR_ZIP64_NOT_FOUND=Dn,e.ERR_EXTRAFIELD_ZIP64_NOT_FOUND=En,e.ERR_HTTP_RANGE=_t,e.ERR_INVALID_COMMENT=tr,e.ERR_INVALID_ENCRYPTION_STRENGTH=ir,e.ERR_INVALID_ENTRY_COMMENT=nr,e.ERR_INVALID_ENTRY_NAME=rr,e.ERR_INVALID_EXTRAFIELD_DATA=or,e.ERR_INVALID_EXTRAFIELD_TYPE=ar,e.ERR_INVALID_PASSWORD=de,e.ERR_INVALID_SIGNATURE=we,e.ERR_INVALID_VERSION=sr,e.ERR_ITERATOR_COMPLETED_TOO_SOON=Ct,e.ERR_LOCAL_FILE_HEADER_NOT_FOUND=Fn,e.ERR_SPLIT_ZIP_FILE=In,e.ERR_UNSUPPORTED_COMPRESSION=Un,e.ERR_UNSUPPORTED_ENCRYPTION=Ln,e.ERR_UNSUPPORTED_FORMAT=cr,e.HttpRangeReader=class extends jt{constructor(e,t={}){t.useRangeHeader=!0,super(e,t)}},e.HttpReader=jt,e.Reader=Tt,e.SplitDataReader=Jt,e.SplitDataWriter=Qt,e.SplitZipReader=rn,e.SplitZipWriter=sn,e.TextReader=class extends Ut{constructor(e){super(new m([e],{type:"text/plain"}))}},e.TextWriter=class extends It{constructor(e){super(e),n.assign(this,{encoding:e,utf8:!e||"utf-8"==e.toLowerCase()})}async getData(){const{encoding:e,utf8:t}=this,r=await super.getData();if(r.text&&t)return r.text();{const t=new FileReader;return new y(((s,i)=>{n.assign(t,{onload:({target:e})=>s(e.result),onerror:()=>i(t.error)}),t.readAsText(r,e)}))}}},e.Uint8ArrayReader=class extends Tt{constructor(e){super(),n.assign(this,{array:e,size:e.length})}readUint8Array(e,t){return this.array.slice(e,e+t)}},e.Uint8ArrayWriter=class extends Lt{init(e=0){n.assign(this,{offset:0,array:new w(e)}),super.init()}writeUint8Array(e){const t=this;if(t.offset+e.length>t.array.length){const n=t.array;t.array=new w(n.length+e.length),t.array.set(n)}t.array.set(e,t.offset),t.offset+=e.length}getData(){return this.array}},e.Writer=Lt,e.ZipReader=Hn,e.ZipReaderStream=class{constructor(e={}){const{readable:t,writable:n}=new x,r=new Hn(t,e).getEntriesGenerator();this.readable=new A({async pull(e){const{done:t,value:n}=await r.next();if(t)return e.close();const s={...n,readable:(()=>{const{readable:e,writable:t}=new x;if(n.getData)return n.getData(t),e})()};delete s.getData,e.enqueue(s)}}),this.writable=n}},e.ZipWriter=dr,e.ZipWriterStream=class{constructor(e={}){const{readable:t,writable:n}=new x;this.readable=t,this.zipWriter=new dr(n,e)}transform(e){const{readable:t,writable:n}=new x({flush:()=>{this.zipWriter.close()}});return this.zipWriter.add(e,t),{readable:this.readable,writable:n}}writable(e){const{readable:t,writable:n}=new x;return this.zipWriter.add(e,t),n}close(e,t={}){return this.zipWriter.close(e,t)}},e.configure=$,e.getMimeType=()=>"application/octet-stream",e.initReader=en,e.initShimAsyncCodec=(e,t={},n)=>({Deflate:te(e.Deflate,t.deflate,n),Inflate:te(e.Inflate,t.inflate,n)}),e.initStream=$t,e.initWriter=tn,e.readUint8Array=nn,e.terminateWorkers=async()=>{await y.allSettled(St.map((e=>(xt(e),e.terminate()))))},n.defineProperty(e,"__esModule",{value:!0})})); +((e,t)=>{"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).zip={})})(this,(function(e){"use strict";const{Array:t,Object:n,String:r,Number:s,BigInt:i,Math:a,Date:o,Map:c,Set:l,Response:u,URL:f,Error:d,Uint8Array:w,Uint16Array:p,Uint32Array:h,DataView:g,Blob:m,Promise:y,TextEncoder:b,TextDecoder:S,document:k,crypto:z,btoa:v,TransformStream:x,ReadableStream:A,WritableStream:_,CompressionStream:C,DecompressionStream:D,navigator:W,Worker:R}="undefined"!=typeof globalThis?globalThis:this||self,F=4294967295,E=65535,T=67324752,L=134695760,U=33639248,I=101075792,q=117853008,N=22,O=21589,P=2048,H="/",M=new o(2107,11,31),B=new o(1980,0,1),V=void 0,Z="undefined",K="function";class G{constructor(e){return class extends x{constructor(t,n){const r=new e(n);super({transform(e,t){t.enqueue(r.append(e))},flush(e){const t=r.flush();t&&e.enqueue(t)}})}}}}let X=2;try{typeof W!=Z&&W.hardwareConcurrency&&(X=W.hardwareConcurrency)}catch(e){}const Y={chunkSize:524288,maxWorkers:X,terminateWorkerTimeout:5e3,useWebWorkers:!0,useCompressionStream:!0,workerScripts:V,CompressionStreamNative:typeof C!=Z&&C,DecompressionStreamNative:typeof D!=Z&&D},j=n.assign({},Y);function J(){return j}function Q(e){return a.max(e.chunkSize,64)}function $(e){const{baseURL:n,chunkSize:r,maxWorkers:s,terminateWorkerTimeout:i,useCompressionStream:a,useWebWorkers:o,Deflate:c,Inflate:l,CompressionStream:u,DecompressionStream:f,workerScripts:w}=e;if(ee("baseURL",n),ee("chunkSize",r),ee("maxWorkers",s),ee("terminateWorkerTimeout",i),ee("useCompressionStream",a),ee("useWebWorkers",o),c&&(j.CompressionStream=new G(c)),l&&(j.DecompressionStream=new G(l)),ee("CompressionStream",u),ee("DecompressionStream",f),w!==V){const{deflate:e,inflate:n}=w;if((e||n)&&(j.workerScripts||(j.workerScripts={})),e){if(!t.isArray(e))throw new d("workerScripts.deflate must be an array");j.workerScripts.deflate=e}if(n){if(!t.isArray(n))throw new d("workerScripts.inflate must be an array");j.workerScripts.inflate=n}}}function ee(e,t){t!==V&&(j[e]=t)}function te(e,t,r){return class{constructor(s){const i=this;var a,o;a=s,o="level",(typeof n.hasOwn===K?n.hasOwn(a,o):a.hasOwnProperty(o))&&s.level===V&&delete s.level,i.codec=new e(n.assign({},t,s)),r(i.codec,(e=>{if(i.pendingData){const t=i.pendingData;i.pendingData=new w(t.length+e.length);const{pendingData:n}=i;n.set(t,0),n.set(e,t.length)}else i.pendingData=new w(e)}))}append(e){return this.codec.push(e),s(this)}flush(){return this.codec.push(new w,!0),s(this)}};function s(e){if(e.pendingData){const t=e.pendingData;return e.pendingData=null,t}return new w}}const ne=[];for(let e=0;256>e;e++){let t=e;for(let e=0;8>e;e++)1&t?t=t>>>1^3988292384:t>>>=1;ne[e]=t}class re{constructor(e){this.crc=e||-1}append(e){let t=0|this.crc;for(let n=0,r=0|e.length;r>n;n++)t=t>>>8^ne[255&(t^e[n])];this.crc=t}get(){return~this.crc}}class se extends x{constructor(){let e;const t=new re;super({transform(e,n){t.append(e),n.enqueue(e)},flush(){const n=new w(4);new g(n.buffer).setUint32(0,t.get()),e.value=n}}),e=this}}function ie(e){if(typeof b==Z){const t=new w((e=unescape(encodeURIComponent(e))).length);for(let n=0;n0&&t&&(e[n-1]=ae.partial(t,e[n-1]&2147483648>>t-1,1)),e},partial:(e,t,n)=>32===e?t:(n?0|t:t<<32-e)+1099511627776*e,getPartial:e=>a.round(e/1099511627776)||32,_shiftRight(e,t,n,r){for(void 0===r&&(r=[]);t>=32;t-=32)r.push(n),n=0;if(0===t)return r.concat(e);for(let s=0;s>>t),n=e[s]<<32-t;const s=e.length?e[e.length-1]:0,i=ae.getPartial(s);return r.push(ae.partial(t+i&31,t+i>32?n:r.pop(),1)),r}},oe={bytes:{fromBits(e){const t=ae.bitLength(e)/8,n=new w(t);let r;for(let s=0;t>s;s++)0==(3&s)&&(r=e[s/4]),n[s]=r>>>24,r<<=8;return n},toBits(e){const t=[];let n,r=0;for(n=0;n9007199254740991)throw new d("Cannot hash more than 2^53 - 1 bits");const i=new h(n);let a=0;for(let e=t.blockSize+r-(t.blockSize+r&t.blockSize-1);s>=e;e+=t.blockSize)t._block(i.subarray(16*a,16*(a+1))),a+=1;return n.splice(0,16*a),t}finalize(){const e=this;let t=e._buffer;const n=e._h;t=ae.concat(t,[ae.partial(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(a.floor(e._length/4294967296)),t.push(0|e._length);t.length;)e._block(t.splice(0,16));return e.reset(),n}_f(e,t,n,r){return e>19?e>39?e>59?e>79?void 0:t^n^r:t&n|t&r|n&r:t^n^r:t&n|~t&r}_S(e,t){return t<>>32-e}_block(e){const n=this,r=n._h,s=t(80);for(let t=0;16>t;t++)s[t]=e[t];let i=r[0],o=r[1],c=r[2],l=r[3],u=r[4];for(let e=0;79>=e;e++){16>e||(s[e]=n._S(1,s[e-3]^s[e-8]^s[e-14]^s[e-16]));const t=n._S(5,i)+n._f(e,o,c,l)+u+s[e]+n._key[a.floor(e/20)]|0;u=l,l=c,c=n._S(30,o),o=i,i=t}r[0]=r[0]+i|0,r[1]=r[1]+o|0,r[2]=r[2]+c|0,r[3]=r[3]+l|0,r[4]=r[4]+u|0}},le={getRandomValues(e){const t=new h(e.buffer),n=e=>{let t=987654321;const n=4294967295;return()=>(t=36969*(65535&t)+(t>>16)&n,(((t<<16)+(e=18e3*(65535&e)+(e>>16)&n)&n)/4294967296+.5)*(a.random()>.5?1:-1))};for(let r,s=0;snew ue.hmacSha1(oe.bytes.toBits(e)),pbkdf2(e,t,n,r){if(n=n||1e4,0>r||0>n)throw new d("invalid params to pbkdf2");const s=1+(r>>5)<<2;let i,a,o,c,l;const u=new ArrayBuffer(s),f=new g(u);let w=0;const p=ae;for(t=oe.bytes.toBits(t),l=1;(s||1)>w;l++){for(i=a=e.encrypt(p.concat(t,[l])),o=1;n>o;o++)for(a=e.encrypt(a),c=0;cw&&os&&(e=(new n).update(e).finalize());for(let t=0;s>t;t++)r[0][t]=909522486^e[t],r[1][t]=1549556828^e[t];t._baseHash[0].update(r[0]),t._baseHash[1].update(r[1]),t._resultHash=new n(t._baseHash[0])}reset(){const e=this;e._resultHash=new e._hash(e._baseHash[0]),e._updated=!1}update(e){this._updated=!0,this._resultHash.update(e)}digest(){const e=this,t=e._resultHash.finalize(),n=new e._hash(e._baseHash[1]).update(t).finalize();return e.reset(),n}encrypt(e){if(this._updated)throw new d("encrypt on already updated hmac called!");return this.update(e),this.digest(e)}}},fe=typeof z!=Z&&typeof z.getRandomValues==K,de="Invalid password",we="Invalid signature",pe="zipjs-abort-check-password";function he(e){return fe?z.getRandomValues(e):le.getRandomValues(e)}const ge=16,me={name:"PBKDF2"},ye=n.assign({hash:{name:"HMAC"}},me),be=n.assign({iterations:1e3,hash:{name:"SHA-1"}},me),Se=["deriveBits"],ke=[8,12,16],ze=[16,24,32],ve=10,xe=[0,0,0,0],Ae=typeof z!=Z,_e=Ae&&z.subtle,Ce=Ae&&typeof _e!=Z,De=oe.bytes,We=class{constructor(e){const t=this;t._tables=[[[],[],[],[],[]],[[],[],[],[],[]]],t._tables[0][0][0]||t._precompute();const n=t._tables[0][4],r=t._tables[1],s=e.length;let i,a,o,c=1;if(4!==s&&6!==s&&8!==s)throw new d("invalid aes key size");for(t._key=[a=e.slice(0),o=[]],i=s;4*s+28>i;i++){let e=a[i-1];(i%s==0||8===s&&i%s==4)&&(e=n[e>>>24]<<24^n[e>>16&255]<<16^n[e>>8&255]<<8^n[255&e],i%s==0&&(e=e<<8^e>>>24^c<<24,c=c<<1^283*(c>>7))),a[i]=a[i-s]^e}for(let e=0;i;e++,i--){const t=a[3&e?i:i-4];o[e]=4>=i||4>e?t:r[0][n[t>>>24]]^r[1][n[t>>16&255]]^r[2][n[t>>8&255]]^r[3][n[255&t]]}}encrypt(e){return this._crypt(e,0)}decrypt(e){return this._crypt(e,1)}_precompute(){const e=this._tables[0],t=this._tables[1],n=e[4],r=t[4],s=[],i=[];let a,o,c,l;for(let e=0;256>e;e++)i[(s[e]=e<<1^283*(e>>7))^e]=e;for(let u=a=0;!n[u];u^=o||1,a=i[a]||1){let i=a^a<<1^a<<2^a<<3^a<<4;i=i>>8^255&i^99,n[u]=i,r[i]=u,l=s[c=s[o=s[u]]];let f=16843009*l^65537*c^257*o^16843008*u,d=257*s[i]^16843008*i;for(let n=0;4>n;n++)e[n][u]=d=d<<24^d>>>8,t[n][i]=f=f<<24^f>>>8}for(let n=0;5>n;n++)e[n]=e[n].slice(0),t[n]=t[n].slice(0)}_crypt(e,t){if(4!==e.length)throw new d("invalid aes block size");const n=this._key[t],r=n.length/4-2,s=[0,0,0,0],i=this._tables[t],a=i[0],o=i[1],c=i[2],l=i[3],u=i[4];let f,w,p,h=e[0]^n[0],g=e[t?3:1]^n[1],m=e[2]^n[2],y=e[t?1:3]^n[3],b=4;for(let e=0;r>e;e++)f=a[h>>>24]^o[g>>16&255]^c[m>>8&255]^l[255&y]^n[b],w=a[g>>>24]^o[m>>16&255]^c[y>>8&255]^l[255&h]^n[b+1],p=a[m>>>24]^o[y>>16&255]^c[h>>8&255]^l[255&g]^n[b+2],y=a[y>>>24]^o[h>>16&255]^c[g>>8&255]^l[255&m]^n[b+3],b+=4,h=f,g=w,m=p;for(let e=0;4>e;e++)s[t?3&-e:e]=u[h>>>24]<<24^u[g>>16&255]<<16^u[m>>8&255]<<8^u[255&y]^n[b++],f=h,h=g,g=m,m=y,y=f;return s}},Re=class{constructor(e,t){this._prf=e,this._initIv=t,this._iv=t}reset(){this._iv=this._initIv}update(e){return this.calculate(this._prf,e,this._iv)}incWord(e){if(255==(e>>24&255)){let t=e>>16&255,n=e>>8&255,r=255&e;255===t?(t=0,255===n?(n=0,255===r?r=0:++r):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=r}else e+=1<<24;return e}incCounter(e){0===(e[0]=this.incWord(e[0]))&&(e[1]=this.incWord(e[1]))}calculate(e,t,n){let r;if(!(r=t.length))return[];const s=ae.bitLength(t);for(let s=0;r>s;s+=4){this.incCounter(n);const r=e.encrypt(n);t[s]^=r[0],t[s+1]^=r[1],t[s+2]^=r[2],t[s+3]^=r[3]}return ae.clamp(t,s)}},Fe=ue.hmacSha1;let Ee=Ae&&Ce&&typeof _e.importKey==K,Te=Ae&&Ce&&typeof _e.deriveBits==K;class Le extends x{constructor({password:e,rawPassword:t,signed:r,encryptionStrength:s,checkPasswordOnly:i}){super({start(){n.assign(this,{ready:new y((e=>this.resolveReady=e)),password:Ne(e,t),signed:r,strength:s-1,pending:new w})},async transform(e,t){const n=this,{password:r,strength:s,resolveReady:a,ready:o}=n;r?(await(async(e,t,n,r)=>{const s=await qe(e,t,n,Pe(r,0,ke[t])),i=Pe(r,ke[t]);if(s[0]!=i[0]||s[1]!=i[1])throw new d(de)})(n,s,r,Pe(e,0,ke[s]+2)),e=Pe(e,ke[s]+2),i?t.error(new d(pe)):a()):await o;const c=new w(e.length-ve-(e.length-ve)%ge);t.enqueue(Ie(n,e,c,0,ve,!0))},async flush(e){const{signed:t,ctr:n,hmac:r,pending:s,ready:i}=this;if(r&&n){await i;const a=Pe(s,0,s.length-ve),o=Pe(s,s.length-ve);let c=new w;if(a.length){const e=Me(De,a);r.update(e);const t=n.update(e);c=He(De,t)}if(t){const e=Pe(He(De,r.digest()),0,ve);for(let t=0;ve>t;t++)if(e[t]!=o[t])throw new d(we)}e.enqueue(c)}}})}}class Ue extends x{constructor({password:e,rawPassword:t,encryptionStrength:r}){let s;super({start(){n.assign(this,{ready:new y((e=>this.resolveReady=e)),password:Ne(e,t),strength:r-1,pending:new w})},async transform(e,t){const n=this,{password:r,strength:s,resolveReady:i,ready:a}=n;let o=new w;r?(o=await(async(e,t,n)=>{const r=he(new w(ke[t]));return Oe(r,await qe(e,t,n,r))})(n,s,r),i()):await a;const c=new w(o.length+e.length-e.length%ge);c.set(o,0),t.enqueue(Ie(n,e,c,o.length,0))},async flush(e){const{ctr:t,hmac:n,pending:r,ready:i}=this;if(n&&t){await i;let a=new w;if(r.length){const e=t.update(Me(De,r));n.update(e),a=He(De,e)}s.signature=He(De,n.digest()).slice(0,ve),e.enqueue(Oe(a,s.signature))}}}),s=this}}function Ie(e,t,n,r,s,i){const{ctr:a,hmac:o,pending:c}=e,l=t.length-s;let u;for(c.length&&(t=Oe(c,t),n=((e,t)=>{if(t&&t>e.length){const n=e;(e=new w(t)).set(n,0)}return e})(n,l-l%ge)),u=0;l-ge>=u;u+=ge){const e=Me(De,Pe(t,u,u+ge));i&&o.update(e);const s=a.update(e);i||o.update(s),n.set(He(De,s),u+r)}return e.pending=Pe(t,u),n}async function qe(e,r,s,i){e.password=null;const a=await(async(e,t,n,r,s)=>{if(!Ee)return ue.importKey(t);try{return await _e.importKey("raw",t,n,!1,s)}catch(e){return Ee=!1,ue.importKey(t)}})(0,s,ye,0,Se),o=await(async(e,t,n)=>{if(!Te)return ue.pbkdf2(t,e.salt,be.iterations,n);try{return await _e.deriveBits(e,t,n)}catch(r){return Te=!1,ue.pbkdf2(t,e.salt,be.iterations,n)}})(n.assign({salt:i},be),a,8*(2*ze[r]+2)),c=new w(o),l=Me(De,Pe(c,0,ze[r])),u=Me(De,Pe(c,ze[r],2*ze[r])),f=Pe(c,2*ze[r]);return n.assign(e,{keys:{key:l,authentication:u,passwordVerification:f},ctr:new Re(new We(l),t.from(xe)),hmac:new Fe(u)}),f}function Ne(e,t){return t===V?ie(e):t}function Oe(e,t){let n=e;return e.length+t.length&&(n=new w(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function Pe(e,t,n){return e.subarray(t,n)}function He(e,t){return e.fromBits(t)}function Me(e,t){return e.toBits(t)}class Be extends x{constructor({password:e,passwordVerification:t,checkPasswordOnly:r}){super({start(){n.assign(this,{password:e,passwordVerification:t}),Ge(this,e)},transform(e,t){const n=this;if(n.password){const t=Ze(n,e.subarray(0,12));if(n.password=null,t[11]!=n.passwordVerification)throw new d(de);e=e.subarray(12)}r?t.error(new d(pe)):t.enqueue(Ze(n,e))}})}}class Ve extends x{constructor({password:e,passwordVerification:t}){super({start(){n.assign(this,{password:e,passwordVerification:t}),Ge(this,e)},transform(e,t){const n=this;let r,s;if(n.password){n.password=null;const t=he(new w(12));t[11]=n.passwordVerification,r=new w(e.length+t.length),r.set(Ke(n,t),0),s=12}else r=new w(e.length),s=0;r.set(Ke(n,e),s),t.enqueue(r)}})}}function Ze(e,t){const n=new w(t.length);for(let r=0;r>>24]),s=~e.crcKey2.get(),e.keys=[n,r,s]}function Ye(e){const t=2|e.keys[2];return je(a.imul(t,1^t)>>>8)}function je(e){return 255&e}function Je(e){return 4294967295&e}const Qe="deflate-raw";class $e extends x{constructor(e,{chunkSize:t,CompressionStream:n,CompressionStreamNative:r}){super({});const{compressed:s,encrypted:i,useCompressionStream:a,zipCrypto:o,signed:c,level:l}=e,u=this;let f,d,w=tt(super.readable);i&&!o||!c||(f=new se,w=st(w,f)),s&&(w=rt(w,a,{level:l,chunkSize:t},r,n)),i&&(o?w=st(w,new Ve(e)):(d=new Ue(e),w=st(w,d))),nt(u,w,(()=>{let e;i&&!o&&(e=d.signature),i&&!o||!c||(e=new g(f.value.buffer).getUint32(0)),u.signature=e}))}}class et extends x{constructor(e,{chunkSize:t,DecompressionStream:n,DecompressionStreamNative:r}){super({});const{zipCrypto:s,encrypted:i,signed:a,signature:o,compressed:c,useCompressionStream:l}=e;let u,f,w=tt(super.readable);i&&(s?w=st(w,new Be(e)):(f=new Le(e),w=st(w,f))),c&&(w=rt(w,l,{chunkSize:t},r,n)),i&&!s||!a||(u=new se,w=st(w,u)),nt(this,w,(()=>{if((!i||s)&&a){const e=new g(u.value.buffer);if(o!=e.getUint32(0,!1))throw new d(we)}}))}}function tt(e){return st(e,new x({transform(e,t){e&&e.length&&t.enqueue(e)}}))}function nt(e,t,r){t=st(t,new x({flush:r})),n.defineProperty(e,"readable",{get:()=>t})}function rt(e,t,n,r,s){try{e=st(e,new(t&&r?r:s)(Qe,n))}catch(r){if(!t)return e;try{e=st(e,new s(Qe,n))}catch(t){return e}}return e}function st(e,t){return e.pipeThrough(t)}const it="data",at="close",ot="deflate",ct="inflate";class lt extends x{constructor(e,t){super({});const r=this,{codecType:s}=e;let i;s.startsWith(ot)?i=$e:s.startsWith(ct)&&(i=et);let a=0,o=0;const c=new i(e,t),l=super.readable,u=new x({transform(e,t){e&&e.length&&(o+=e.length,t.enqueue(e))},flush(){n.assign(r,{inputSize:o})}}),f=new x({transform(e,t){e&&e.length&&(a+=e.length,t.enqueue(e))},flush(){const{signature:e}=c;n.assign(r,{signature:e,outputSize:a,inputSize:o})}});n.defineProperty(r,"readable",{get:()=>l.pipeThrough(u).pipeThrough(c).pipeThrough(f)})}}class ut extends x{constructor(e){let t;super({transform:function n(r,s){if(t){const e=new w(t.length+r.length);e.set(t),e.set(r,t.length),r=e,t=null}r.length>e?(s.enqueue(r.slice(0,e)),n(r.slice(e),s)):t=r},flush(e){t&&t.length&&e.enqueue(t)}})}}let ft=typeof R!=Z;class dt{constructor(e,{readable:t,writable:r},{options:s,config:i,streamOptions:a,useWebWorkers:o,transferStreams:c,scripts:l},u){const{signal:f}=a;return n.assign(e,{busy:!0,readable:t.pipeThrough(new ut(i.chunkSize)).pipeThrough(new wt(t,a),{signal:f}),writable:r,options:n.assign({},s),scripts:l,transferStreams:c,terminate:()=>new y((t=>{const{worker:n,busy:r}=e;n?(r?e.resolveTerminated=t:(n.terminate(),t()),e.interface=null):t()})),onTaskFinished(){const{resolveTerminated:t}=e;t&&(e.resolveTerminated=null,e.terminated=!0,e.worker.terminate(),t()),e.busy=!1,u(e)}}),(o&&ft?gt:ht)(e,i)}}class wt extends x{constructor(e,{onstart:t,onprogress:n,size:r,onend:s}){let i=0;super({async start(){t&&await pt(t,r)},async transform(e,t){i+=e.length,n&&await pt(n,i,r),t.enqueue(e)},async flush(){e.size=i,s&&await pt(s,i)}})}}async function pt(e,...t){try{await e(...t)}catch(e){}}function ht(e,t){return{run:()=>(async({options:e,readable:t,writable:n,onTaskFinished:r},s)=>{try{const i=new lt(e,s);await t.pipeThrough(i).pipeTo(n,{preventClose:!0,preventAbort:!0});const{signature:a,inputSize:o,outputSize:c}=i;return{signature:a,inputSize:o,outputSize:c}}finally{r()}})(e,t)}}function gt(e,t){const{baseURL:r,chunkSize:s}=t;if(!e.interface){let i;try{i=((e,t,r)=>{const s={type:"module"};let i,a;typeof e==K&&(e=e());try{i=new f(e,t)}catch(t){i=e}if(mt)try{a=new R(i)}catch(e){mt=!1,a=new R(i,s)}else a=new R(i,s);return a.addEventListener("message",(e=>(async({data:e},t)=>{const{type:r,value:s,messageId:i,result:a,error:o}=e,{reader:c,writer:l,resolveResult:u,rejectResult:f,onTaskFinished:p}=t;try{if(o){const{message:e,stack:t,code:r,name:s}=o,i=new d(e);n.assign(i,{stack:t,code:r,name:s}),h(i)}else{if("pull"==r){const{value:e,done:n}=await c.read();bt({type:it,value:e,done:n,messageId:i},t)}r==it&&(await l.ready,await l.write(new w(s)),bt({type:"ack",messageId:i},t)),r==at&&h(null,a)}}catch(o){bt({type:at,messageId:i},t),h(o)}function h(e,t){e?f(e):u(t),l&&l.releaseLock(),p()}})(e,r))),a})(e.scripts[0],r,e)}catch(n){return ft=!1,ht(e,t)}n.assign(e,{worker:i,interface:{run:()=>(async(e,t)=>{let r,s;const i=new y(((e,t)=>{r=e,s=t}));n.assign(e,{reader:null,writer:null,resolveResult:r,rejectResult:s,result:i});const{readable:a,options:o,scripts:c}=e,{writable:l,closed:u}=(e=>{let t;const n=new y((e=>t=e));return{writable:new _({async write(t){const n=e.getWriter();await n.ready,await n.write(t),n.releaseLock()},close(){t()},abort:t=>e.getWriter().abort(t)}),closed:n}})(e.writable),f=bt({type:"start",scripts:c.slice(1),options:o,config:t,readable:a,writable:l},e);f||n.assign(e,{reader:a.getReader(),writer:l.getWriter()});const d=await i;return f||await l.getWriter().close(),await u,d})(e,{chunkSize:s})}})}return e.interface}let mt=!0,yt=!0;function bt(e,{worker:t,writer:n,onTaskFinished:r,transferStreams:s}){try{let{value:n,readable:r,writable:i}=e;const a=[];if(n&&(n.byteLength{const n=St.find((e=>!e.busy));if(n)return xt(n),new dt(n,e,t,h);if(St.lengthkt.push({resolve:n,stream:e,workerOptions:t})))})()).run();function h(e){if(kt.length){const[{resolve:t,stream:n,workerOptions:r}]=kt.splice(0,1);t(new dt(e,n,r,h))}else e.worker?(xt(e),((e,t)=>{const{config:n}=t,{terminateWorkerTimeout:r}=n;s.isFinite(r)&&r>=0&&(e.terminated?e.terminated=!1:e.terminateTimeout=setTimeout((async()=>{St=St.filter((t=>t!=e));try{await e.terminate()}catch(e){}}),r))})(e,t)):St=St.filter((t=>t!=e))}}function xt(e){const{terminateTimeout:t}=e;t&&(clearTimeout(t),e.terminateTimeout=null)}const At="HTTP error ",_t="HTTP Range not supported",Ct="Writer iterator completed too soon",Dt="GET",Wt="bytes",Rt=65536,Ft="writable";class Et{constructor(){this.size=0}init(){this.initialized=!0}}class Tt extends Et{get readable(){const e=this,{chunkSize:t=Rt}=e,n=new A({start(){this.chunkOffset=0},async pull(r){const{offset:s=0,size:i,diskNumberStart:o}=n,{chunkOffset:c}=this;r.enqueue(await nn(e,s+c,a.min(t,i-c),o)),c+t>i?r.close():this.chunkOffset+=t}});return n}}class Lt extends Et{constructor(){super();const e=this,t=new _({write:t=>e.writeUint8Array(t)});n.defineProperty(e,Ft,{get:()=>t})}writeUint8Array(){}}class Ut extends Tt{constructor(e){super(),n.assign(this,{blob:e,size:e.size})}async readUint8Array(e,t){const n=this,r=e+t,s=e||rt&&(i=i.slice(e,r)),new w(i)}}class It extends Et{constructor(e){super();const t=new x,r=[];e&&r.push(["Content-Type",e]),n.defineProperty(this,Ft,{get:()=>t.writable}),this.blob=new u(t.readable,{headers:r}).blob()}getData(){return this.blob}}class qt extends Tt{constructor(e,t){super(),Ot(this,e,t)}async init(){await Pt(this,Xt,Vt),super.init()}readUint8Array(e,t){return Ht(this,e,t,Xt,Vt)}}class Nt extends Tt{constructor(e,t){super(),Ot(this,e,t)}async init(){await Pt(this,Yt,Zt),super.init()}readUint8Array(e,t){return Ht(this,e,t,Yt,Zt)}}function Ot(e,t,r){const{preventHeadRequest:s,useRangeHeader:i,forceRangeRequests:a,combineSizeEocd:o}=r;delete(r=n.assign({},r)).preventHeadRequest,delete r.useRangeHeader,delete r.forceRangeRequests,delete r.combineSizeEocd,delete r.useXHR,n.assign(e,{url:t,options:r,preventHeadRequest:s,useRangeHeader:i,forceRangeRequests:a,combineSizeEocd:o})}async function Pt(e,t,n){const{url:r,preventHeadRequest:i,useRangeHeader:a,forceRangeRequests:o,combineSizeEocd:c}=e;if((e=>{const{baseURL:t}=J(),{protocol:n}=new f(e,t);return"http:"==n||"https:"==n})(r)&&(a||o)&&(void 0===i||i)){const r=await t(Dt,e,Mt(e,c?-22:void 0));if(!o&&r.headers.get("Accept-Ranges")!=Wt)throw new d(_t);{let i;c&&(e.eocdCache=new w(await r.arrayBuffer()));const a=r.headers.get("Content-Range");if(a){const e=a.trim().split(/\s*\/\s*/);if(e.length){const t=e[1];t&&"*"!=t&&(i=s(t))}}i===V?await Gt(e,t,n):e.size=i}}else await Gt(e,t,n)}async function Ht(e,t,n,r,s){const{useRangeHeader:i,forceRangeRequests:a,eocdCache:o,size:c,options:l}=e;if(i||a){if(o&&t==c-N&&n==N)return o;const s=await r(Dt,e,Mt(e,t,n));if(206!=s.status)throw new d(_t);return new w(await s.arrayBuffer())}{const{data:r}=e;return r||await s(e,l),new w(e.data.subarray(t,t+n))}}function Mt(e,t=0,r=1){return n.assign({},Bt(e),{Range:Wt+"="+(0>t?t:t+"-"+(t+r-1))})}function Bt({options:e}){const{headers:t}=e;if(t)return Symbol.iterator in t?n.fromEntries(t):t}async function Vt(e){await Kt(e,Xt)}async function Zt(e){await Kt(e,Yt)}async function Kt(e,t){const n=await t(Dt,e,Bt(e));e.data=new w(await n.arrayBuffer()),e.size||(e.size=e.data.length)}async function Gt(e,t,n){if(e.preventHeadRequest)await n(e,e.options);else{const r=(await t("HEAD",e,Bt(e))).headers.get("Content-Length");r?e.size=s(r):await n(e,e.options)}}async function Xt(e,{options:t,url:r},s){const i=await fetch(r,n.assign({},t,{method:e,headers:s}));if(400>i.status)return i;throw 416==i.status?new d(_t):new d(At+(i.statusText||i.status))}function Yt(e,{url:t},r){return new y(((s,i)=>{const a=new XMLHttpRequest;if(a.addEventListener("load",(()=>{if(400>a.status){const e=[];a.getAllResponseHeaders().trim().split(/[\r\n]+/).forEach((t=>{const n=t.trim().split(/\s*:\s*/);n[0]=n[0].trim().replace(/^[a-z]|-[a-z]/g,(e=>e.toUpperCase())),e.push(n)})),s({status:a.status,arrayBuffer:()=>a.response,headers:new c(e)})}else i(416==a.status?new d(_t):new d(At+(a.statusText||a.status)))}),!1),a.addEventListener("error",(e=>i(e.detail?e.detail.error:new d("Network error"))),!1),a.open(e,t),r)for(const e of n.entries(r))a.setRequestHeader(e[0],e[1]);a.responseType="arraybuffer",a.send()}))}class jt extends Tt{constructor(e,t={}){super(),n.assign(this,{url:e,reader:t.useXHR?new Nt(e,t):new qt(e,t)})}set size(e){}get size(){return this.reader.size}async init(){await this.reader.init(),super.init()}readUint8Array(e,t){return this.reader.readUint8Array(e,t)}}class Jt extends Tt{constructor(e){super(),this.readers=e}async init(){const e=this,{readers:t}=e;e.lastDiskNumber=0,e.lastDiskOffset=0,await y.all(t.map((async(n,r)=>{await n.init(),r!=t.length-1&&(e.lastDiskOffset+=n.size),e.size+=n.size}))),super.init()}async readUint8Array(e,t,n=0){const r=this,{readers:s}=this;let i,o=n;-1==o&&(o=s.length-1);let c=e;for(;c>=s[o].size;)c-=s[o].size,o++;const l=s[o],u=l.size;if(c+t>u){const s=u-c;i=new w(t),i.set(await nn(l,c,s)),i.set(await r.readUint8Array(e+s,t-s,n),s)}else i=await nn(l,c,t);return r.lastDiskNumber=a.max(o,r.lastDiskNumber),i}}class Qt extends Et{constructor(e,t=4294967295){super();const r=this;let s,i,a;n.assign(r,{diskNumber:0,diskOffset:0,size:0,maxSize:t,availableSize:t});const o=new _({async write(t){const{availableSize:n}=r;if(a)t.lengtho})}}async function $t(e,t){if(!e.init||e.initialized)return y.resolve();await e.init(t)}function en(e){return t.isArray(e)&&(e=new Jt(e)),e instanceof A&&(e={readable:e}),e}function tn(e){e.writable===V&&typeof e.next==K&&(e=new Qt(e)),e instanceof _&&(e={writable:e});const{writable:t}=e;return t.size===V&&(t.size=0),e instanceof Qt||n.assign(e,{diskNumber:0,diskOffset:0,availableSize:1/0,maxSize:1/0}),e}function nn(e,t,n,r){return e.readUint8Array(t,n,r)}const rn=Jt,sn=Qt,an="\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ ".split("");function on(e,t){return t&&"cp437"==t.trim().toLowerCase()?(e=>{{let t="";for(let n=0;nthis[t]=e[t]))}}const _n="File format is not recognized",Cn="End of central directory not found",Dn="End of Zip64 central directory not found",Wn="End of Zip64 central directory locator not found",Rn="Central directory header not found",Fn="Local file header not found",En="Zip64 extra field not found",Tn="File contains encrypted entry",Ln="Encryption method not supported",Un="Compression method not supported",In="Split zip file",qn="utf-8",Nn="cp437",On=[[dn,F],[wn,F],[pn,F],[hn,E]],Pn={[E]:{getValue:Jn,bytes:4},[F]:{getValue:Qn,bytes:8}};class Hn{constructor(e,t={}){n.assign(this,{reader:en(e),options:t,config:J()})}async*getEntriesGenerator(e={}){const t=this;let{reader:r}=t;const{config:s}=t;if(await $t(r),r.size!==V&&r.readUint8Array||(r=new Ut(await new u(r.readable).blob()),await $t(r)),r.size{const r=new w(4);return $n(r).setUint32(0,101010256,!0),await s(22)||await s(a.min(1048582,n));async function s(t){const s=n-t,i=await nn(e,s,t);for(let e=i.length-22;e>=0;e--)if(i[e]==r[0]&&i[e+1]==r[1]&&i[e+2]==r[2]&&i[e+3]==r[3])return{offset:s+e,buffer:i.slice(e,e+22).buffer}}})(r,0,r.size);if(!i)throw Jn($n(await nn(r,0,4)))==L?new d(In):new d(Cn);const o=$n(i);let c=Jn(o,12),l=Jn(o,16);const f=i.offset,p=jn(o,20),h=f+N+p;let g=jn(o,4);const m=r.lastDiskNumber||0;let b=jn(o,6),S=jn(o,8),k=0,z=0;if(l==F||c==F||S==E||b==E){const e=$n(await nn(r,i.offset-20,20));if(Jn(e,0)!=q)throw new d(Dn);l=Qn(e,8);let t=await nn(r,l,56,-1),n=$n(t);const s=i.offset-20-56;if(Jn(n,0)!=I&&l!=s){const e=l;l=s,k=l-e,t=await nn(r,l,56,-1),n=$n(t)}if(Jn(n,0)!=I)throw new d(Wn);g==E&&(g=Jn(n,16)),b==E&&(b=Jn(n,20)),S==E&&(S=Qn(n,32)),c==F&&(c=Qn(n,40)),l-=c}if(ll)throw new d(_n);let v=0,x=await nn(r,l,c,b),A=$n(x);if(c){const e=i.offset-c;if(Jn(A,v)!=U&&l!=e){const t=l;l=e,k+=l-t,x=await nn(r,l,c,b),A=$n(x)}}const _=i.offset-l-(r.lastDiskOffset||0);if(c==_||0>_||(c=_,x=await nn(r,l,c,b),A=$n(x)),0>l||l>=r.size)throw new d(_n);const C=Kn(t,e,"filenameEncoding"),D=Kn(t,e,"commentEncoding");for(let i=0;S>i;i++){const o=new Mn(r,s,t.options);if(Jn(A,v)!=U)throw new d(Rn);Bn(o,A,v+6);const c=!!o.bitFlag.languageEncodingFlag,l=v+46,u=l+o.filenameLength,f=u+o.extraFieldLength,w=jn(A,v+4),p=0==(0&w),h=x.subarray(l,u),g=jn(A,v+32),m=f+g,b=x.subarray(f,m),_=c,W=c,R=p&&16==(16&Yn(A,v+38)),F=Jn(A,v+42)+k;n.assign(o,{versionMadeBy:w,msDosCompatible:p,compressedSize:0,uncompressedSize:0,commentLength:g,directory:R,offset:F,diskNumberStart:jn(A,v+34),internalFileAttribute:jn(A,v+36),externalFileAttribute:Jn(A,v+38),rawFilename:h,filenameUTF8:_,commentUTF8:W,rawExtraField:x.subarray(u,f)});const E=Kn(t,e,"decodeText")||on,[T,L]=await y.all([E(h,_?qn:C||Nn),E(b,W?qn:D||Nn)]);n.assign(o,{rawComment:b,filename:T,comment:L,directory:R||T.endsWith(H)}),z=a.max(F,z),await Vn(o,o,A,v+6);const I=new An(o);I.getData=(e,t)=>o.getData(e,I,t),v=m;const{onprogress:q}=e;if(q)try{await q(i+1,S,new An(o))}catch(e){}yield I}const W=Kn(t,e,"extractPrependedData"),R=Kn(t,e,"extractAppendedData");return W&&(t.prependedData=z>0?await nn(r,0,z):new w),t.comment=p?await nn(r,f+N,p):new w,R&&(t.appendedData=h>>8&255:p>>>24&255),signature:p,compressed:0!=l,encrypted:z,useWebWorkers:Kn(s,r,"useWebWorkers"),useCompressionStream:Kn(s,r,"useCompressionStream"),transferStreams:Kn(s,r,"transferStreams"),checkPasswordOnly:W},config:u,streamOptions:{signal:D,size:A,onstart:F,onprogress:E,onend:L}};let I=0;try{({outputSize:I}=await vt({readable:C,writable:R},U))}catch(e){if(!W||e.message!=pe)throw e}finally{const e=Kn(s,r,"preventClose");R.size+=I,e||R.locked||await R.getWriter().close()}return W?V:e.getData?e.getData():R}}function Bn(e,t,r){const s=e.rawBitFlag=jn(t,r+2),i=1==(1&s),a=Jn(t,r+6);n.assign(e,{encrypted:i,version:jn(t,r),bitFlag:{level:(6&s)>>1,dataDescriptor:8==(8&s),languageEncodingFlag:(s&P)==P},rawLastModDate:a,lastModDate:Gn(a),filenameLength:jn(t,r+22),extraFieldLength:jn(t,r+24)})}async function Vn(e,t,r,s,i){const{rawExtraField:a}=t,l=t.extraField=new c,u=$n(new w(a));let f=0;try{for(;f{t.zip64=!0;const n=$n(e.data),r=On.filter((([e,n])=>t[e]==n));for(let s=0,i=0;s{const s=$n(e.data),i=Yn(s,4);n.assign(e,{vendorVersion:Yn(s,0),vendorId:Yn(s,2),strength:i,originalCompressionMethod:r,compressionMethod:jn(s,5)}),t.compressionMethod=e.compressionMethod})(y,t,p),t.extraFieldAES=y):t.compressionMethod=p;const b=l.get(10);b&&(((e,t)=>{const r=$n(e.data);let s,i=4;try{for(;i{const r=$n(e.data),s=Yn(r,0),i=[],a=[];n?(1==(1&s)&&(i.push(gn),a.push(mn)),2==(2&s)&&(i.push(yn),a.push("rawLastAccessDate")),4==(4&s)&&(i.push(bn),a.push("rawCreationDate"))):5>e.data.length||(i.push(gn),a.push(mn));let c=1;i.forEach(((n,s)=>{if(e.data.length>=c+4){const i=Jn(r,c);t[n]=e[n]=new o(1e3*i);const l=a[s];e[l]=i}c+=4}))})(S,t,i),t.extraFieldExtendedTimestamp=S);const k=l.get(6534);k&&(t.extraFieldUSDZ=k)}async function Zn(e,t,r,s,i){const a=$n(e.data),o=new re;o.append(i[r]);const c=$n(new w(4));c.setUint32(0,o.get(),!0);const l=Jn(a,1);n.assign(e,{version:Yn(a,0),[t]:on(e.data.subarray(5)),valid:!i.bitFlag.languageEncodingFlag&&l==Jn(c,0)}),e.valid&&(s[t]=e[t],s[t+"UTF8"]=!0)}function Kn(e,t,n){return t[n]===V?e.options[n]:t[n]}function Gn(e){const t=(4294901760&e)>>16,n=65535&e;try{return new o(1980+((65024&t)>>9),((480&t)>>5)-1,31&t,(63488&n)>>11,(2016&n)>>5,2*(31&n),0)}catch(e){}}function Xn(e){return new o(s(e/i(1e4)-i(116444736e5)))}function Yn(e,t){return e.getUint8(t)}function jn(e,t){return e.getUint16(t,!0)}function Jn(e,t){return e.getUint32(t,!0)}function Qn(e,t){return s(e.getBigUint64(t,!0))}function $n(e){return new g(e.buffer)}const er="File already exists",tr="Zip file comment exceeds 64KB",nr="File entry comment exceeds 64KB",rr="File entry name exceeds 64KB",sr="Version exceeds 65535",ir="The strength must equal 1, 2, or 3",ar="Extra field type exceeds 65535",or="Extra field data exceeds 64KB",cr="Zip64 is not supported (make sure 'keepOrder' is set to 'true')",lr=new w([7,0,2,0,65,69,3,0,0]);let ur=0;const fr=[];class dr{constructor(e,t={}){const r=(e=tn(e)).availableSize!==V&&e.availableSize>0&&e.availableSize!==1/0&&e.maxSize!==V&&e.maxSize>0&&e.maxSize!==1/0;n.assign(this,{writer:e,addSplitZipSignature:r,options:t,config:J(),files:new c,filenames:new l,offset:e.writable.size,pendingEntriesSize:0,pendingAddFileCalls:new l,bufferedWrites:0})}async add(e="",r,s={}){const c=this,{pendingAddFileCalls:l,config:f}=c;let m;urfr.push(e)));try{if(e=e.trim(),c.filenames.has(e))throw new d(er);return c.filenames.add(e),m=(async(e,r,s,c)=>{r=r.trim(),c.directory&&!r.endsWith(H)?r+=H:c.directory=r.endsWith(H);const l=hr(e,c,"encodeText",ie),f=l(r);if(zr(f)>E)throw new d(rr);const m=c.comment||"",b=l(m);if(zr(b)>E)throw new d(nr);const S=hr(e,c,"version",20);if(S>E)throw new d(sr);const k=hr(e,c,"versionMadeBy",20);if(k>E)throw new d(sr);const z=hr(e,c,gn,new o),v=hr(e,c,yn),A=hr(e,c,bn),_=hr(e,c,zn,!0),C=hr(e,c,Sn,0),D=hr(e,c,kn,0),W=hr(e,c,"password"),R=hr(e,c,"rawPassword"),U=hr(e,c,"encryptionStrength",3),I=hr(e,c,"zipCrypto"),q=hr(e,c,"extendedTimestamp",!0),N=hr(e,c,"keepOrder",!0),Z=hr(e,c,"level"),K=hr(e,c,"useWebWorkers"),G=hr(e,c,"bufferedWrite"),X=hr(e,c,"dataDescriptorSignature",!1),Y=hr(e,c,"signal"),j=hr(e,c,"useCompressionStream");let J=hr(e,c,"dataDescriptor",!0),$=hr(e,c,vn);if(W!==V&&U!==V&&(1>U||U>3))throw new d(ir);let ee=new w;const{extraField:te}=c;if(te){let e=0,t=0;te.forEach((t=>e+=4+zr(t))),ee=new w(e),te.forEach(((e,n)=>{if(n>E)throw new d(ar);if(zr(e)>E)throw new d(or);Sr(ee,new p([n]),t),Sr(ee,new p([zr(e)]),t+2),Sr(ee,e,t+4),t+=4+zr(e)}))}let ne=0,re=0,se=0;const ae=!0===$;s&&(s=en(s),await $t(s),s.size===V?(J=!0,($||$===V)&&($=!0,se=ne=F)):(se=s.size,ne=(e=>e+5*(a.floor(e/16383)+1))(se)));const{diskOffset:oe,diskNumber:ce,maxSize:le}=e.writer,ue=ae||se>=F,fe=ae||ne>=F,de=ae||e.offset+e.pendingEntriesSize-oe>=F,we=hr(e,c,"supportZip64SplitFile",!0)&&ae||ce+a.ceil(e.pendingEntriesSize/le)>=E;if(de||ue||fe||we){if(!1===$||!N)throw new d(cr);$=!0}$=$||!1;const pe=(e=>{const{rawFilename:t,lastModDate:n,lastAccessDate:r,creationDate:s,rawPassword:i,password:o,level:c,zip64:l,zipCrypto:u,dataDescriptor:f,directory:d,rawExtraField:p,encryptionStrength:g,extendedTimestamp:m}=e,y=0!==c&&!d,b=!!(o&&zr(o)||i&&zr(i));let S,k,z,v,x=e.version;if(b&&!u){S=new w(zr(lr)+2);const e=kr(S);mr(e,0,39169),Sr(S,lr,2),gr(e,8,g)}else S=new w;if(m){z=new w(9+(r?4:0)+(s?4:0));const e=kr(z);mr(e,0,O),mr(e,2,zr(z)-4),v=1+(r?2:0)+(s?4:0),gr(e,4,v);let t=5;yr(e,t,a.floor(n.getTime()/1e3)),t+=4,r&&(yr(e,t,a.floor(r.getTime()/1e3)),t+=4),s&&yr(e,t,a.floor(s.getTime()/1e3));try{k=new w(36);const e=kr(k),t=pr(n);mr(e,0,10),mr(e,2,32),mr(e,8,1),mr(e,10,24),br(e,12,t),br(e,20,pr(r)||t),br(e,28,pr(s)||t)}catch(e){k=new w}}else k=z=new w;let A=P;f&&(A|=8);let _=0;y&&(_=8),l&&(x=x>45?x:45),b&&(A|=1,u||(x=x>51?x:51,_=99,y&&(S[9]=8)));const C=new w(26),D=kr(C);mr(D,0,x),mr(D,2,A),mr(D,4,_);const W=new h(1),R=kr(W);let F;F=B>n?B:n>M?M:n,mr(R,0,(F.getHours()<<6|F.getMinutes())<<5|F.getSeconds()/2),mr(R,2,(F.getFullYear()-1980<<4|F.getMonth()+1)<<5|F.getDate());const E=W[0];yr(D,6,E),mr(D,22,zr(t));const L=zr(S,z,k,p);mr(D,24,L);const U=new w(30+zr(t)+L);return yr(kr(U),0,T),Sr(U,C,4),Sr(U,t,30),Sr(U,S,30+zr(t)),Sr(U,z,30+zr(t,S)),Sr(U,k,30+zr(t,S,z)),Sr(U,p,30+zr(t,S,z,k)),{localHeaderArray:U,headerArray:C,headerView:D,lastModDate:n,rawLastModDate:E,encrypted:b,compressed:y,version:x,compressionMethod:_,extraFieldExtendedTimestampFlag:v,rawExtraFieldExtendedTimestamp:z,rawExtraFieldNTFS:k,rawExtraFieldAES:S,extraFieldLength:L}})(c=n.assign({},c,{rawFilename:f,rawComment:b,version:S,versionMadeBy:k,lastModDate:z,lastAccessDate:v,creationDate:A,rawExtraField:ee,zip64:$,zip64UncompressedSize:ue,zip64CompressedSize:fe,zip64Offset:de,zip64DiskNumberStart:we,password:W,rawPassword:R,level:j||e.config.CompressionStream!==V?Z:0,useWebWorkers:K,encryptionStrength:U,extendedTimestamp:q,zipCrypto:I,bufferedWrite:G,keepOrder:N,dataDescriptor:J,dataDescriptorSignature:X,signal:Y,msDosCompatible:_,internalFileAttribute:C,externalFileAttribute:D,useCompressionStream:j})),he=(e=>{const{zip64:t,dataDescriptor:n,dataDescriptorSignature:r}=e;let s,i=new w,a=0;return n&&(i=new w(t?r?24:20:r?16:12),s=kr(i),r&&(a=4,yr(s,0,134695760))),{dataDescriptorArray:i,dataDescriptorView:s,dataDescriptorOffset:a}})(c),ge=zr(pe.localHeaderArray,he.dataDescriptorArray);let me;re=ge+ne,e.options.usdz&&(re+=re+64),e.pendingEntriesSize+=re;try{me=await(async(e,r,s,a,o)=>{const{files:c,writer:l}=e,{keepOrder:f,dataDescriptor:p,signal:h}=o,{headerInfo:m}=a,{usdz:b}=e.options,S=t.from(c.values()).pop();let k,z,v,A,_,C,D,W={};c.set(r,W);try{let t;f&&(t=S&&S.lock,W.lock=new y((e=>v=e))),!(o.bufferedWrite||e.writerLocked||e.bufferedWrites&&f)&&p||b?(C=l,await R()):(C=new x,D=new u(C.readable).blob(),C.writable.size=0,k=!0,e.bufferedWrites++,await $t(l)),await $t(C);const{writable:m}=l;let{diskOffset:T}=l;if(e.addSplitZipSignature){delete e.addSplitZipSignature;const t=new w(4);yr(kr(t),0,L),await wr(m,t),e.offset+=4}b&&((e,t)=>{const{headerInfo:n}=e;let{localHeaderArray:r,extraFieldLength:s}=n,i=kr(r),a=64-(t+zr(r))%64;4>a&&(a+=64);const o=new w(a),c=kr(o);mr(c,0,6534),mr(c,2,a-2);const l=r;n.localHeaderArray=r=new w(zr(l)+a),Sr(r,l),Sr(r,o,zr(l)),i=kr(r),mr(i,28,s+a),e.metadataSize+=a})(a,e.offset-T),k||(await t,await E(m));const{diskNumber:U}=l;if(_=!0,W.diskNumberStart=U,W=await(async(e,t,{diskNumberStart:r,lock:s},a,o,c)=>{const{headerInfo:l,dataDescriptorInfo:u,metadataSize:f}=a,{localHeaderArray:d,headerArray:p,lastModDate:h,rawLastModDate:g,encrypted:m,compressed:y,version:b,compressionMethod:S,rawExtraFieldExtendedTimestamp:k,extraFieldExtendedTimestampFlag:z,rawExtraFieldNTFS:v,rawExtraFieldAES:x}=l,{dataDescriptorArray:A}=u,{rawFilename:_,lastAccessDate:C,creationDate:D,password:W,rawPassword:R,level:E,zip64:T,zip64UncompressedSize:L,zip64CompressedSize:U,zip64Offset:I,zip64DiskNumberStart:q,zipCrypto:N,dataDescriptor:O,directory:P,versionMadeBy:H,rawComment:M,rawExtraField:B,useWebWorkers:Z,onstart:K,onprogress:G,onend:X,signal:Y,encryptionStrength:j,extendedTimestamp:J,msDosCompatible:$,internalFileAttribute:ee,externalFileAttribute:te,useCompressionStream:ne}=c,re={lock:s,versionMadeBy:H,zip64:T,directory:!!P,filenameUTF8:!0,rawFilename:_,commentUTF8:!0,rawComment:M,rawExtraFieldExtendedTimestamp:k,rawExtraFieldNTFS:v,rawExtraFieldAES:x,rawExtraField:B,extendedTimestamp:J,msDosCompatible:$,internalFileAttribute:ee,externalFileAttribute:te,diskNumberStart:r};let se,ie=0,ae=0;const{writable:oe}=t;if(e){e.chunkSize=Q(o),await wr(oe,d);const t=e.readable,n=t.size=e.size,r={options:{codecType:ot,level:E,rawPassword:R,password:W,encryptionStrength:j,zipCrypto:m&&N,passwordVerification:m&&N&&g>>8&255,signed:!0,compressed:y,encrypted:m,useWebWorkers:Z,useCompressionStream:ne,transferStreams:!1},config:o,streamOptions:{signal:Y,size:n,onstart:K,onprogress:G,onend:X}},s=await vt({readable:t,writable:oe},r);ae=s.inputSize,ie=s.outputSize,se=s.signature,oe.size+=ae}else await wr(oe,d);let ce;if(T){let e=4;L&&(e+=8),U&&(e+=8),I&&(e+=8),q&&(e+=4),ce=new w(e)}else ce=new w;return((e,t)=>{const{signature:n,rawExtraFieldZip64:r,compressedSize:s,uncompressedSize:a,headerInfo:o,dataDescriptorInfo:c}=e,{headerView:l,encrypted:u}=o,{dataDescriptorView:f,dataDescriptorOffset:d}=c,{zip64:w,zip64UncompressedSize:p,zip64CompressedSize:h,zipCrypto:g,dataDescriptor:m}=t;if(u&&!g||n===V||(yr(l,10,n),m&&yr(f,d,n)),w){const e=kr(r);mr(e,0,1),mr(e,2,zr(r)-4);let t=4;p&&(yr(l,18,F),br(e,t,i(a)),t+=8),h&&(yr(l,14,F),br(e,t,i(s))),m&&(br(f,d+4,i(s)),br(f,d+12,i(a)))}else yr(l,14,s),yr(l,18,a),m&&(yr(f,d+4,s),yr(f,d+8,a))})({signature:se,rawExtraFieldZip64:ce,compressedSize:ie,uncompressedSize:ae,headerInfo:l,dataDescriptorInfo:u},c),O&&await wr(oe,A),n.assign(re,{uncompressedSize:ae,compressedSize:ie,lastModDate:h,rawLastModDate:g,creationDate:D,lastAccessDate:C,encrypted:m,size:f+ie,compressionMethod:S,version:b,headerArray:p,signature:se,rawExtraFieldZip64:ce,extraFieldExtendedTimestampFlag:z,zip64UncompressedSize:L,zip64CompressedSize:U,zip64Offset:I,zip64DiskNumberStart:q}),re})(s,C,W,a,e.config,o),_=!1,c.set(r,W),W.filename=r,k){await C.writable.getWriter().close();let e=await D;await t,await R(),A=!0,p||(e=await(async(e,t,n,{zipCrypto:r})=>{let s;s=await t.slice(0,26).arrayBuffer(),26!=s.byteLength&&(s=s.slice(0,26));const i=new g(s);return e.encrypted&&!r||yr(i,14,e.signature),e.zip64?(yr(i,18,F),yr(i,22,F)):(yr(i,18,e.compressedSize),yr(i,22,e.uncompressedSize)),await wr(n,new w(s)),t.slice(s.byteLength)})(W,e,m,o)),await E(m),W.diskNumberStart=l.diskNumber,T=l.diskOffset,await e.stream().pipeTo(m,{preventClose:!0,preventAbort:!0,signal:h}),m.size+=e.size,A=!1}if(W.offset=e.offset-T,W.zip64)((e,t)=>{const{rawExtraFieldZip64:n,offset:r,diskNumberStart:s}=e,{zip64UncompressedSize:a,zip64CompressedSize:o,zip64Offset:c,zip64DiskNumberStart:l}=t,u=kr(n);let f=4;a&&(f+=8),o&&(f+=8),c&&(br(u,f,i(r)),f+=8),l&&yr(u,f,s)})(W,o);else if(W.offset>=F)throw new d(cr);return e.offset+=W.size,W}catch(t){if(k&&A||!k&&_){if(e.hasCorruptedEntries=!0,t)try{t.corruptedEntry=!0}catch(e){}k?e.offset+=C.writable.size:e.offset=C.writable.size}throw c.delete(r),t}finally{k&&e.bufferedWrites--,v&&v(),z&&z()}async function R(){e.writerLocked=!0;const{lockWriter:t}=e;e.lockWriter=new y((t=>z=()=>{e.writerLocked=!1,t()})),await t}async function E(e){zr(m.localHeaderArray)>l.availableSize&&(l.availableSize=0,await wr(e,new w))}})(e,r,s,{headerInfo:pe,dataDescriptorInfo:he,metadataSize:ge},c)}finally{e.pendingEntriesSize-=re}return n.assign(me,{name:r,comment:m,extraField:te}),new An(me)})(c,e,r,s),l.add(m),await m}catch(t){throw c.filenames.delete(e),t}finally{l.delete(m);const e=fr.shift();e?e():ur--}}async close(e=new w,n={}){const{pendingAddFileCalls:r,writer:s}=this,{writable:o}=s;for(;r.size;)await y.allSettled(t.from(r));return await(async(e,n,r)=>{const{files:s,writer:o}=e,{diskOffset:c,writable:l}=o;let{diskNumber:u}=o,f=0,p=0,h=e.offset-c,g=s.size;for(const[,e]of s){const{rawFilename:t,rawExtraFieldZip64:n,rawExtraFieldAES:r,rawComment:s,rawExtraFieldNTFS:i,rawExtraField:o,extendedTimestamp:c,extraFieldExtendedTimestampFlag:l,lastModDate:u}=e;let f;if(c){f=new w(9);const e=kr(f);mr(e,0,O),mr(e,2,5),gr(e,4,l),yr(e,5,a.floor(u.getTime()/1e3))}else f=new w;e.rawExtraFieldCDExtendedTimestamp=f,p+=46+zr(t,s,n,r,i,f,o)}const m=new w(p),y=kr(m);await $t(o);let b=0;for(const[e,n]of t.from(s.values()).entries()){const{offset:t,rawFilename:i,rawExtraFieldZip64:a,rawExtraFieldAES:c,rawExtraFieldCDExtendedTimestamp:u,rawExtraFieldNTFS:d,rawExtraField:w,rawComment:p,versionMadeBy:h,headerArray:g,directory:S,zip64:k,zip64UncompressedSize:z,zip64CompressedSize:v,zip64DiskNumberStart:x,zip64Offset:A,msDosCompatible:_,internalFileAttribute:C,externalFileAttribute:D,diskNumberStart:W,uncompressedSize:R,compressedSize:T}=n,L=zr(a,c,u,d,w);yr(y,f,U),mr(y,f+4,h);const I=kr(g);z||yr(I,18,R),v||yr(I,14,T),Sr(m,g,f+6),mr(y,f+30,L),mr(y,f+32,zr(p)),mr(y,f+34,k&&x?E:W),mr(y,f+36,C),D?yr(y,f+38,D):S&&_&&gr(y,f+38,16),yr(y,f+42,k&&A?F:t),Sr(m,i,f+46),Sr(m,a,f+46+zr(i)),Sr(m,c,f+46+zr(i,a)),Sr(m,u,f+46+zr(i,a,c)),Sr(m,d,f+46+zr(i,a,c,u)),Sr(m,w,f+46+zr(i,a,c,u,d)),Sr(m,p,f+46+zr(i)+L);const q=46+zr(i,p)+L;if(f-b>o.availableSize&&(o.availableSize=0,await wr(l,m.slice(b,f)),b=f),f+=q,r.onprogress)try{await r.onprogress(e+1,s.size,new An(n))}catch(e){}}await wr(l,b?m.slice(b):m);let S=o.diskNumber;const{availableSize:k}=o;N>k&&S++;let z=hr(e,r,"zip64");if(!(F>h&&F>p&&E>g&&E>S)){if(!1===z)throw new d(cr);z=!0}const v=new w(z?98:N),x=kr(v);f=0,z&&(yr(x,0,I),br(x,4,i(44)),mr(x,12,45),mr(x,14,45),yr(x,16,S),yr(x,20,u),br(x,24,i(g)),br(x,32,i(g)),br(x,40,i(p)),br(x,48,i(h)),yr(x,56,q),br(x,64,i(h)+i(p)),yr(x,72,S+1),hr(e,r,"supportZip64SplitFile",!0)&&(S=E,u=E),g=E,h=F,p=F,f+=76),yr(x,f,101010256),mr(x,f+4,S),mr(x,f+6,u),mr(x,f+8,g),mr(x,f+10,g),yr(x,f+12,p),yr(x,f+16,h);const A=zr(n);if(A){if(A>E)throw new d(tr);mr(x,f+20,A)}await wr(l,v),A&&await wr(l,n)})(this,e,n),hr(this,n,"preventClose")||await o.getWriter().close(),s.getData?s.getData():o}}async function wr(e,t){const n=e.getWriter();try{await n.ready,e.size+=zr(t),await n.write(t)}finally{n.releaseLock()}}function pr(e){if(e)return(i(e.getTime())+i(116444736e5))*i(1e4)}function hr(e,t,n,r){const s=t[n]===V?e.options[n]:t[n];return s===V?r:s}function gr(e,t,n){e.setUint8(t,n)}function mr(e,t,n){e.setUint16(t,n,!0)}function yr(e,t,n){e.setUint32(t,n,!0)}function br(e,t,n){e.setBigUint64(t,n,!0)}function Sr(e,t,n){e.set(t,n)}function kr(e){return new g(e.buffer)}function zr(...e){let t=0;return e.forEach((e=>e&&(t+=e.length))),t}let vr;try{vr=void 0===k&&"undefined"==typeof location?new(require("url").URL)("file:"+__filename).href:void 0===k?location.href:k.currentScript&&k.currentScript.src||new f("zip.min.js",k.baseURI).href}catch(e){}$({baseURL:vr}),(e=>{const t=()=>f.createObjectURL(new m(['const{Array:e,Object:t,Number:n,Math:r,Error:s,Uint8Array:i,Uint16Array:o,Uint32Array:c,Int32Array:f,Map:a,DataView:l,Promise:u,TextEncoder:w,crypto:h,postMessage:d,TransformStream:p,ReadableStream:y,WritableStream:m,CompressionStream:b,DecompressionStream:g}=self,k=void 0,v="undefined",S="function";class z{constructor(e){return class extends p{constructor(t,n){const r=new e(n);super({transform(e,t){t.enqueue(r.append(e))},flush(e){const t=r.flush();t&&e.enqueue(t)}})}}}}const C=[];for(let e=0;256>e;e++){let t=e;for(let e=0;8>e;e++)1&t?t=t>>>1^3988292384:t>>>=1;C[e]=t}class x{constructor(e){this.t=e||-1}append(e){let t=0|this.t;for(let n=0,r=0|e.length;r>n;n++)t=t>>>8^C[255&(t^e[n])];this.t=t}get(){return~this.t}}class A extends p{constructor(){let e;const t=new x;super({transform(e,n){t.append(e),n.enqueue(e)},flush(){const n=new i(4);new l(n.buffer).setUint32(0,t.get()),e.value=n}}),e=this}}const _={concat(e,t){if(0===e.length||0===t.length)return e.concat(t);const n=e[e.length-1],r=_.i(n);return 32===r?e.concat(t):_.o(t,r,0|n,e.slice(0,e.length-1))},l(e){const t=e.length;if(0===t)return 0;const n=e[t-1];return 32*(t-1)+_.i(n)},u(e,t){if(32*e.length0&&t&&(e[n-1]=_.h(t,e[n-1]&2147483648>>t-1,1)),e},h:(e,t,n)=>32===e?t:(n?0|t:t<<32-e)+1099511627776*e,i:e=>r.round(e/1099511627776)||32,o(e,t,n,r){for(void 0===r&&(r=[]);t>=32;t-=32)r.push(n),n=0;if(0===t)return r.concat(e);for(let s=0;s>>t),n=e[s]<<32-t;const s=e.length?e[e.length-1]:0,i=_.i(s);return r.push(_.h(t+i&31,t+i>32?n:r.pop(),1)),r}},I={p:{m(e){const t=_.l(e)/8,n=new i(t);let r;for(let s=0;t>s;s++)0==(3&s)&&(r=e[s/4]),n[s]=r>>>24,r<<=8;return n},g(e){const t=[];let n,r=0;for(n=0;n9007199254740991)throw new s("Cannot hash more than 2^53 - 1 bits");const o=new c(n);let f=0;for(let e=t.blockSize+r-(t.blockSize+r&t.blockSize-1);i>=e;e+=t.blockSize)t.I(o.subarray(16*f,16*(f+1))),f+=1;return n.splice(0,16*f),t}P(){const e=this;let t=e.C;const n=e.S;t=_.concat(t,[_.h(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(r.floor(e.A/4294967296)),t.push(0|e.A);t.length;)e.I(t.splice(0,16));return e.reset(),n}D(e,t,n,r){return e>19?e>39?e>59?e>79?void 0:t^n^r:t&n|t&r|n&r:t^n^r:t&n|~t&r}V(e,t){return t<>>32-e}I(t){const n=this,s=n.S,i=e(80);for(let e=0;16>e;e++)i[e]=t[e];let o=s[0],c=s[1],f=s[2],a=s[3],l=s[4];for(let e=0;79>=e;e++){16>e||(i[e]=n.V(1,i[e-3]^i[e-8]^i[e-14]^i[e-16]));const t=n.V(5,o)+n.D(e,c,f,a)+l+i[e]+n.v[r.floor(e/20)]|0;l=a,a=f,f=n.V(30,c),c=o,o=t}s[0]=s[0]+o|0,s[1]=s[1]+c|0,s[2]=s[2]+f|0,s[3]=s[3]+a|0,s[4]=s[4]+l|0}},D={getRandomValues(e){const t=new c(e.buffer),n=e=>{let t=987654321;const n=4294967295;return()=>(t=36969*(65535&t)+(t>>16)&n,(((t<<16)+(e=18e3*(65535&e)+(e>>16)&n)&n)/4294967296+.5)*(r.random()>.5?1:-1))};for(let s,i=0;inew V.R(I.p.g(e)),B(e,t,n,r){if(n=n||1e4,0>r||0>n)throw new s("invalid params to pbkdf2");const i=1+(r>>5)<<2;let o,c,f,a,u;const w=new ArrayBuffer(i),h=new l(w);let d=0;const p=_;for(t=I.p.g(t),u=1;(i||1)>d;u++){for(o=c=e.encrypt(p.concat(t,[u])),f=1;n>f;f++)for(c=e.encrypt(c),a=0;ad&&fs&&(e=(new n).update(e).P());for(let t=0;s>t;t++)r[0][t]=909522486^e[t],r[1][t]=1549556828^e[t];t.U[0].update(r[0]),t.U[1].update(r[1]),t.K=new n(t.U[0])}reset(){const e=this;e.K=new e.M(e.U[0]),e.N=!1}update(e){this.N=!0,this.K.update(e)}digest(){const e=this,t=e.K.P(),n=new e.M(e.U[1]).update(t).P();return e.reset(),n}encrypt(e){if(this.N)throw new s("encrypt on already updated hmac called!");return this.update(e),this.digest(e)}}},R=typeof h!=v&&typeof h.getRandomValues==S,B="Invalid password",E="Invalid signature",M="zipjs-abort-check-password";function U(e){return R?h.getRandomValues(e):D.getRandomValues(e)}const K=16,N={name:"PBKDF2"},O=t.assign({hash:{name:"HMAC"}},N),T=t.assign({iterations:1e3,hash:{name:"SHA-1"}},N),W=["deriveBits"],j=[8,12,16],H=[16,24,32],L=10,F=[0,0,0,0],q=typeof h!=v,G=q&&h.subtle,J=q&&typeof G!=v,Q=I.p,X=class{constructor(e){const t=this;t.O=[[[],[],[],[],[]],[[],[],[],[],[]]],t.O[0][0][0]||t.T();const n=t.O[0][4],r=t.O[1],i=e.length;let o,c,f,a=1;if(4!==i&&6!==i&&8!==i)throw new s("invalid aes key size");for(t.v=[c=e.slice(0),f=[]],o=i;4*i+28>o;o++){let e=c[o-1];(o%i==0||8===i&&o%i==4)&&(e=n[e>>>24]<<24^n[e>>16&255]<<16^n[e>>8&255]<<8^n[255&e],o%i==0&&(e=e<<8^e>>>24^a<<24,a=a<<1^283*(a>>7))),c[o]=c[o-i]^e}for(let e=0;o;e++,o--){const t=c[3&e?o:o-4];f[e]=4>=o||4>e?t:r[0][n[t>>>24]]^r[1][n[t>>16&255]]^r[2][n[t>>8&255]]^r[3][n[255&t]]}}encrypt(e){return this.W(e,0)}decrypt(e){return this.W(e,1)}T(){const e=this.O[0],t=this.O[1],n=e[4],r=t[4],s=[],i=[];let o,c,f,a;for(let e=0;256>e;e++)i[(s[e]=e<<1^283*(e>>7))^e]=e;for(let l=o=0;!n[l];l^=c||1,o=i[o]||1){let i=o^o<<1^o<<2^o<<3^o<<4;i=i>>8^255&i^99,n[l]=i,r[i]=l,a=s[f=s[c=s[l]]];let u=16843009*a^65537*f^257*c^16843008*l,w=257*s[i]^16843008*i;for(let n=0;4>n;n++)e[n][l]=w=w<<24^w>>>8,t[n][i]=u=u<<24^u>>>8}for(let n=0;5>n;n++)e[n]=e[n].slice(0),t[n]=t[n].slice(0)}W(e,t){if(4!==e.length)throw new s("invalid aes block size");const n=this.v[t],r=n.length/4-2,i=[0,0,0,0],o=this.O[t],c=o[0],f=o[1],a=o[2],l=o[3],u=o[4];let w,h,d,p=e[0]^n[0],y=e[t?3:1]^n[1],m=e[2]^n[2],b=e[t?1:3]^n[3],g=4;for(let e=0;r>e;e++)w=c[p>>>24]^f[y>>16&255]^a[m>>8&255]^l[255&b]^n[g],h=c[y>>>24]^f[m>>16&255]^a[b>>8&255]^l[255&p]^n[g+1],d=c[m>>>24]^f[b>>16&255]^a[p>>8&255]^l[255&y]^n[g+2],b=c[b>>>24]^f[p>>16&255]^a[y>>8&255]^l[255&m]^n[g+3],g+=4,p=w,y=h,m=d;for(let e=0;4>e;e++)i[t?3&-e:e]=u[p>>>24]<<24^u[y>>16&255]<<16^u[m>>8&255]<<8^u[255&b]^n[g++],w=p,p=y,y=m,m=b,b=w;return i}},Y=class{constructor(e,t){this.j=e,this.H=t,this.L=t}reset(){this.L=this.H}update(e){return this.F(this.j,e,this.L)}q(e){if(255==(e>>24&255)){let t=e>>16&255,n=e>>8&255,r=255&e;255===t?(t=0,255===n?(n=0,255===r?r=0:++r):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=r}else e+=1<<24;return e}G(e){0===(e[0]=this.q(e[0]))&&(e[1]=this.q(e[1]))}F(e,t,n){let r;if(!(r=t.length))return[];const s=_.l(t);for(let s=0;r>s;s+=4){this.G(n);const r=e.encrypt(n);t[s]^=r[0],t[s+1]^=r[1],t[s+2]^=r[2],t[s+3]^=r[3]}return _.u(t,s)}},Z=V.R;let $=q&&J&&typeof G.importKey==S,ee=q&&J&&typeof G.deriveBits==S;class te extends p{constructor({password:e,rawPassword:n,signed:r,encryptionStrength:o,checkPasswordOnly:c}){super({start(){t.assign(this,{ready:new u((e=>this.J=e)),password:ie(e,n),signed:r,X:o-1,pending:new i})},async transform(e,t){const n=this,{password:r,X:o,J:f,ready:a}=n;r?(await(async(e,t,n,r)=>{const i=await se(e,t,n,ce(r,0,j[t])),o=ce(r,j[t]);if(i[0]!=o[0]||i[1]!=o[1])throw new s(B)})(n,o,r,ce(e,0,j[o]+2)),e=ce(e,j[o]+2),c?t.error(new s(M)):f()):await a;const l=new i(e.length-L-(e.length-L)%K);t.enqueue(re(n,e,l,0,L,!0))},async flush(e){const{signed:t,Y:n,Z:r,pending:o,ready:c}=this;if(r&&n){await c;const f=ce(o,0,o.length-L),a=ce(o,o.length-L);let l=new i;if(f.length){const e=ae(Q,f);r.update(e);const t=n.update(e);l=fe(Q,t)}if(t){const e=ce(fe(Q,r.digest()),0,L);for(let t=0;L>t;t++)if(e[t]!=a[t])throw new s(E)}e.enqueue(l)}}})}}class ne extends p{constructor({password:e,rawPassword:n,encryptionStrength:r}){let s;super({start(){t.assign(this,{ready:new u((e=>this.J=e)),password:ie(e,n),X:r-1,pending:new i})},async transform(e,t){const n=this,{password:r,X:s,J:o,ready:c}=n;let f=new i;r?(f=await(async(e,t,n)=>{const r=U(new i(j[t]));return oe(r,await se(e,t,n,r))})(n,s,r),o()):await c;const a=new i(f.length+e.length-e.length%K);a.set(f,0),t.enqueue(re(n,e,a,f.length,0))},async flush(e){const{Y:t,Z:n,pending:r,ready:o}=this;if(n&&t){await o;let c=new i;if(r.length){const e=t.update(ae(Q,r));n.update(e),c=fe(Q,e)}s.signature=fe(Q,n.digest()).slice(0,L),e.enqueue(oe(c,s.signature))}}}),s=this}}function re(e,t,n,r,s,o){const{Y:c,Z:f,pending:a}=e,l=t.length-s;let u;for(a.length&&(t=oe(a,t),n=((e,t)=>{if(t&&t>e.length){const n=e;(e=new i(t)).set(n,0)}return e})(n,l-l%K)),u=0;l-K>=u;u+=K){const e=ae(Q,ce(t,u,u+K));o&&f.update(e);const s=c.update(e);o||f.update(s),n.set(fe(Q,s),u+r)}return e.pending=ce(t,u),n}async function se(n,r,s,o){n.password=null;const c=await(async(e,t,n,r,s)=>{if(!$)return V.importKey(t);try{return await G.importKey("raw",t,n,!1,s)}catch(e){return $=!1,V.importKey(t)}})(0,s,O,0,W),f=await(async(e,t,n)=>{if(!ee)return V.B(t,e.salt,T.iterations,n);try{return await G.deriveBits(e,t,n)}catch(r){return ee=!1,V.B(t,e.salt,T.iterations,n)}})(t.assign({salt:o},T),c,8*(2*H[r]+2)),a=new i(f),l=ae(Q,ce(a,0,H[r])),u=ae(Q,ce(a,H[r],2*H[r])),w=ce(a,2*H[r]);return t.assign(n,{keys:{key:l,$:u,passwordVerification:w},Y:new Y(new X(l),e.from(F)),Z:new Z(u)}),w}function ie(e,t){return t===k?(e=>{if(typeof w==v){const t=new i((e=unescape(encodeURIComponent(e))).length);for(let n=0;n>>24]),i=~e.te.get(),e.keys=[n,s,i]}function ye(e){const t=2|e.keys[2];return me(r.imul(t,1^t)>>>8)}function me(e){return 255&e}function be(e){return 4294967295&e}const ge="deflate-raw";class ke extends p{constructor(e,{chunkSize:t,CompressionStream:n,CompressionStreamNative:r}){super({});const{compressed:s,encrypted:i,useCompressionStream:o,zipCrypto:c,signed:f,level:a}=e,u=this;let w,h,d=Se(super.readable);i&&!c||!f||(w=new A,d=xe(d,w)),s&&(d=Ce(d,o,{level:a,chunkSize:t},r,n)),i&&(c?d=xe(d,new ue(e)):(h=new ne(e),d=xe(d,h))),ze(u,d,(()=>{let e;i&&!c&&(e=h.signature),i&&!c||!f||(e=new l(w.value.buffer).getUint32(0)),u.signature=e}))}}class ve extends p{constructor(e,{chunkSize:t,DecompressionStream:n,DecompressionStreamNative:r}){super({});const{zipCrypto:i,encrypted:o,signed:c,signature:f,compressed:a,useCompressionStream:u}=e;let w,h,d=Se(super.readable);o&&(i?d=xe(d,new le(e)):(h=new te(e),d=xe(d,h))),a&&(d=Ce(d,u,{chunkSize:t},r,n)),o&&!i||!c||(w=new A,d=xe(d,w)),ze(this,d,(()=>{if((!o||i)&&c){const e=new l(w.value.buffer);if(f!=e.getUint32(0,!1))throw new s(E)}}))}}function Se(e){return xe(e,new p({transform(e,t){e&&e.length&&t.enqueue(e)}}))}function ze(e,n,r){n=xe(n,new p({flush:r})),t.defineProperty(e,"readable",{get:()=>n})}function Ce(e,t,n,r,s){try{e=xe(e,new(t&&r?r:s)(ge,n))}catch(r){if(!t)return e;try{e=xe(e,new s(ge,n))}catch(t){return e}}return e}function xe(e,t){return e.pipeThrough(t)}const Ae="data",_e="close";class Ie extends p{constructor(e,n){super({});const r=this,{codecType:s}=e;let i;s.startsWith("deflate")?i=ke:s.startsWith("inflate")&&(i=ve);let o=0,c=0;const f=new i(e,n),a=super.readable,l=new p({transform(e,t){e&&e.length&&(c+=e.length,t.enqueue(e))},flush(){t.assign(r,{inputSize:c})}}),u=new p({transform(e,t){e&&e.length&&(o+=e.length,t.enqueue(e))},flush(){const{signature:e}=f;t.assign(r,{signature:e,outputSize:o,inputSize:c})}});t.defineProperty(r,"readable",{get:()=>a.pipeThrough(l).pipeThrough(f).pipeThrough(u)})}}class Pe extends p{constructor(e){let t;super({transform:function n(r,s){if(t){const e=new i(t.length+r.length);e.set(t),e.set(r,t.length),r=e,t=null}r.length>e?(s.enqueue(r.slice(0,e)),n(r.slice(e),s)):t=r},flush(e){t&&t.length&&e.enqueue(t)}})}}const De=new a,Ve=new a;let Re,Be=0,Ee=!0;async function Me(e){try{const{options:t,scripts:r,config:s}=e;if(r&&r.length)try{Ee?importScripts.apply(k,r):await Ue(r)}catch(e){Ee=!1,await Ue(r)}self.initCodec&&self.initCodec(),s.CompressionStreamNative=self.CompressionStream,s.DecompressionStreamNative=self.DecompressionStream,self.Deflate&&(s.CompressionStream=new z(self.Deflate)),self.Inflate&&(s.DecompressionStream=new z(self.Inflate));const i={highWaterMark:1},o=e.readable||new y({async pull(e){const t=new u((e=>De.set(Be,e)));Ke({type:"pull",messageId:Be}),Be=(Be+1)%n.MAX_SAFE_INTEGER;const{value:r,done:s}=await t;e.enqueue(r),s&&e.close()}},i),c=e.writable||new m({async write(e){let t;const r=new u((e=>t=e));Ve.set(Be,t),Ke({type:Ae,value:e,messageId:Be}),Be=(Be+1)%n.MAX_SAFE_INTEGER,await r}},i),f=new Ie(t,s);Re=new AbortController;const{signal:a}=Re;await o.pipeThrough(f).pipeThrough(new Pe(s.chunkSize)).pipeTo(c,{signal:a,preventClose:!0,preventAbort:!0}),await c.getWriter().close();const{signature:l,inputSize:w,outputSize:h}=f;Ke({type:_e,result:{signature:l,inputSize:w,outputSize:h}})}catch(e){Ne(e)}}async function Ue(e){for(const t of e)await import(t)}function Ke(e){let{value:t}=e;if(t)if(t.length)try{t=new i(t),e.value=t.buffer,d(e,[e.value])}catch(t){d(e)}else d(e);else d(e)}function Ne(e=new s("Unknown error")){const{message:t,stack:n,code:r,name:i}=e;d({error:{message:t,stack:n,code:r,name:i}})}addEventListener("message",(({data:e})=>{const{type:t,messageId:n,value:r,done:s}=e;try{if("start"==t&&Me(e),t==Ae){const e=De.get(n);De.delete(n),e({value:new i(r),done:s})}if("ack"==t){const e=Ve.get(n);Ve.delete(n),e()}t==_e&&Re.abort()}catch(e){Ne(e)}}));const Oe=-2;function Te(t){return We(t.map((([t,n])=>new e(t).fill(n,0,t))))}function We(t){return t.reduce(((t,n)=>t.concat(e.isArray(n)?We(n):n)),[])}const je=[0,1,2,3].concat(...Te([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function He(){const e=this;function t(e,t){let n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1}e.ne=n=>{const s=e.re,i=e.ie.se,o=e.ie.oe;let c,f,a,l=-1;for(n.ce=0,n.fe=573,c=0;o>c;c++)0!==s[2*c]?(n.ae[++n.ce]=l=c,n.le[c]=0):s[2*c+1]=0;for(;2>n.ce;)a=n.ae[++n.ce]=2>l?++l:0,s[2*a]=1,n.le[a]=0,n.ue--,i&&(n.we-=i[2*a+1]);for(e.he=l,c=r.floor(n.ce/2);c>=1;c--)n.de(s,c);a=o;do{c=n.ae[1],n.ae[1]=n.ae[n.ce--],n.de(s,1),f=n.ae[1],n.ae[--n.fe]=c,n.ae[--n.fe]=f,s[2*a]=s[2*c]+s[2*f],n.le[a]=r.max(n.le[c],n.le[f])+1,s[2*c+1]=s[2*f+1]=a,n.ae[1]=a++,n.de(s,1)}while(n.ce>=2);n.ae[--n.fe]=n.ae[1],(t=>{const n=e.re,r=e.ie.se,s=e.ie.pe,i=e.ie.ye,o=e.ie.me;let c,f,a,l,u,w,h=0;for(l=0;15>=l;l++)t.be[l]=0;for(n[2*t.ae[t.fe]+1]=0,c=t.fe+1;573>c;c++)f=t.ae[c],l=n[2*n[2*f+1]+1]+1,l>o&&(l=o,h++),n[2*f+1]=l,f>e.he||(t.be[l]++,u=0,i>f||(u=s[f-i]),w=n[2*f],t.ue+=w*(l+u),r&&(t.we+=w*(r[2*f+1]+u)));if(0!==h){do{for(l=o-1;0===t.be[l];)l--;t.be[l]--,t.be[l+1]+=2,t.be[o]--,h-=2}while(h>0);for(l=o;0!==l;l--)for(f=t.be[l];0!==f;)a=t.ae[--c],a>e.he||(n[2*a+1]!=l&&(t.ue+=(l-n[2*a+1])*n[2*a],n[2*a+1]=l),f--)}})(n),((e,n,r)=>{const s=[];let i,o,c,f=0;for(i=1;15>=i;i++)s[i]=f=f+r[i-1]<<1;for(o=0;n>=o;o++)c=e[2*o+1],0!==c&&(e[2*o]=t(s[c]++,c))})(s,e.he,n.be)}}function Le(e,t,n,r,s){const i=this;i.se=e,i.pe=t,i.ye=n,i.oe=r,i.me=s}He.ge=[0,1,2,3,4,5,6,7].concat(...Te([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]])),He.ke=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0],He.ve=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576],He.Se=e=>256>e?je[e]:je[256+(e>>>7)],He.ze=[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],He.Ce=[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],He.xe=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],He.Ae=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];const Fe=Te([[144,8],[112,9],[24,7],[8,8]]);Le._e=We([12,140,76,204,44,172,108,236,28,156,92,220,60,188,124,252,2,130,66,194,34,162,98,226,18,146,82,210,50,178,114,242,10,138,74,202,42,170,106,234,26,154,90,218,58,186,122,250,6,134,70,198,38,166,102,230,22,150,86,214,54,182,118,246,14,142,78,206,46,174,110,238,30,158,94,222,62,190,126,254,1,129,65,193,33,161,97,225,17,145,81,209,49,177,113,241,9,137,73,201,41,169,105,233,25,153,89,217,57,185,121,249,5,133,69,197,37,165,101,229,21,149,85,213,53,181,117,245,13,141,77,205,45,173,109,237,29,157,93,221,61,189,125,253,19,275,147,403,83,339,211,467,51,307,179,435,115,371,243,499,11,267,139,395,75,331,203,459,43,299,171,427,107,363,235,491,27,283,155,411,91,347,219,475,59,315,187,443,123,379,251,507,7,263,135,391,71,327,199,455,39,295,167,423,103,359,231,487,23,279,151,407,87,343,215,471,55,311,183,439,119,375,247,503,15,271,143,399,79,335,207,463,47,303,175,431,111,367,239,495,31,287,159,415,95,351,223,479,63,319,191,447,127,383,255,511,0,64,32,96,16,80,48,112,8,72,40,104,24,88,56,120,4,68,36,100,20,84,52,116,3,131,67,195,35,163,99,227].map(((e,t)=>[e,Fe[t]])));const qe=Te([[30,5]]);function Ge(e,t,n,r,s){const i=this;i.Ie=e,i.Pe=t,i.De=n,i.Ve=r,i.Re=s}Le.Be=We([0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30,1,17,9,25,5,21,13,29,3,19,11,27,7,23].map(((e,t)=>[e,qe[t]]))),Le.Ee=new Le(Le._e,He.ze,257,286,15),Le.Me=new Le(Le.Be,He.Ce,0,30,15),Le.Ue=new Le(null,He.xe,0,19,7);const Je=[new Ge(0,0,0,0,0),new Ge(4,4,8,4,1),new Ge(4,5,16,8,1),new Ge(4,6,32,32,1),new Ge(4,4,16,16,2),new Ge(8,16,32,32,2),new Ge(8,16,128,128,2),new Ge(8,32,128,256,2),new Ge(32,128,258,1024,2),new Ge(32,258,258,4096,2)],Qe=["need dictionary","stream end","","","stream error","data error","","buffer error","",""],Xe=113,Ye=666,Ze=262;function $e(e,t,n,r){const s=e[2*t],i=e[2*n];return i>s||s==i&&r[t]<=r[n]}function et(){const e=this;let t,n,s,c,f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z,C,x,A,_,I,P,D,V,R,B,E,M,U;const K=new He,N=new He,O=new He;let T,W,j,H,L,F;function q(){let t;for(t=0;286>t;t++)E[2*t]=0;for(t=0;30>t;t++)M[2*t]=0;for(t=0;19>t;t++)U[2*t]=0;E[512]=1,e.ue=e.we=0,W=j=0}function G(e,t){let n,r=-1,s=e[1],i=0,o=7,c=4;0===s&&(o=138,c=3),e[2*(t+1)+1]=65535;for(let f=0;t>=f;f++)n=s,s=e[2*(f+1)+1],++ii?U[2*n]+=i:0!==n?(n!=r&&U[2*n]++,U[32]++):i>10?U[36]++:U[34]++,i=0,r=n,0===s?(o=138,c=3):n==s?(o=6,c=3):(o=7,c=4))}function J(t){e.Ke[e.pending++]=t}function Q(e){J(255&e),J(e>>>8&255)}function X(e,t){let n;const r=t;F>16-r?(n=e,L|=n<>>16-F,F+=r-16):(L|=e<=n;n++)if(r=i,i=e[2*(n+1)+1],++o>=c||r!=i){if(f>o)do{Y(r,U)}while(0!=--o);else 0!==r?(r!=s&&(Y(r,U),o--),Y(16,U),X(o-3,2)):o>10?(Y(18,U),X(o-11,7)):(Y(17,U),X(o-3,3));o=0,s=r,0===i?(c=138,f=3):r==i?(c=6,f=3):(c=7,f=4)}}function $(){16==F?(Q(L),L=0,F=0):8>F||(J(255&L),L>>>=8,F-=8)}function ee(t,n){let s,i,o;if(e.Ne[W]=t,e.Oe[W]=255&n,W++,0===t?E[2*n]++:(j++,t--,E[2*(He.ge[n]+256+1)]++,M[2*He.Se(t)]++),0==(8191&W)&&D>2){for(s=8*W,i=C-k,o=0;30>o;o++)s+=M[2*o]*(5+He.Ce[o]);if(s>>>=3,jc);Y(256,t),H=t[513]}function ne(){F>8?Q(L):F>0&&J(255&L),L=0,F=0}function re(t,n,r){X(0+(r?1:0),3),((t,n)=>{ne(),H=8,Q(n),Q(~n),e.Ke.set(u.subarray(t,t+n),e.pending),e.pending+=n})(t,n)}function se(n){((t,n,r)=>{let s,i,o=0;D>0?(K.ne(e),N.ne(e),o=(()=>{let t;for(G(E,K.he),G(M,N.he),O.ne(e),t=18;t>=3&&0===U[2*He.Ae[t]+1];t--);return e.ue+=14+3*(t+1),t})(),s=e.ue+3+7>>>3,i=e.we+3+7>>>3,i>s||(s=i)):s=i=n+5,n+4>s||-1==t?i==s?(X(2+(r?1:0),3),te(Le._e,Le.Be)):(X(4+(r?1:0),3),((e,t,n)=>{let r;for(X(e-257,5),X(t-1,5),X(n-4,4),r=0;n>r;r++)X(U[2*He.Ae[r]+1],3);Z(E,e-1),Z(M,t-1)})(K.he+1,N.he+1,o+1),te(E,M)):re(t,n,r),q(),r&&ne()})(0>k?-1:k,C-k,n),k=C,t.Te()}function ie(){let e,n,r,s;do{if(s=w-A-C,0===s&&0===C&&0===A)s=f;else if(-1==s)s--;else if(C>=f+f-Ze){u.set(u.subarray(f,f+f),0),x-=f,C-=f,k-=f,e=y,r=e;do{n=65535&d[--r],d[r]=f>n?0:n-f}while(0!=--e);e=f,r=e;do{n=65535&h[--r],h[r]=f>n?0:n-f}while(0!=--e);s+=f}if(0===t.We)return;e=t.je(u,C+A,s),A+=e,3>A||(p=255&u[C],p=(p<A&&0!==t.We)}function oe(e){let t,n,r=I,s=C,i=_;const o=C>f-Ze?C-(f-Ze):0;let c=B;const a=l,w=C+258;let d=u[s+i-1],p=u[s+i];R>_||(r>>=2),c>A&&(c=A);do{if(t=e,u[t+i]==p&&u[t+i-1]==d&&u[t]==u[s]&&u[++t]==u[s+1]){s+=2,t++;do{}while(u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&w>s);if(n=258-(w-s),s=w-258,n>i){if(x=e,i=n,n>=c)break;d=u[s+i-1],p=u[s+i]}}}while((e=65535&h[e&a])>o&&0!=--r);return i>A?A:i}e.le=[],e.be=[],e.ae=[],E=[],M=[],U=[],e.de=(t,n)=>{const r=e.ae,s=r[n];let i=n<<1;for(;i<=e.ce&&(i(W||(W=8),j||(j=8),G||(G=0),t.Le=null,-1==S&&(S=6),1>j||j>9||8!=W||9>x||x>15||0>S||S>9||0>G||G>2?Oe:(t.Fe=e,a=x,f=1<(t.qe=t.Ge=0,t.Le=null,e.pending=0,e.Je=0,n=Xe,c=0,K.re=E,K.ie=Le.Ee,N.re=M,N.ie=Le.Me,O.re=U,O.ie=Le.Ue,L=0,F=0,H=8,q(),(()=>{w=2*f,d[y-1]=0;for(let e=0;y-1>e;e++)d[e]=0;P=Je[D].Pe,R=Je[D].Ie,B=Je[D].De,I=Je[D].Ve,C=0,k=0,A=0,v=_=2,z=0,p=0})(),0))(t))),e.Qe=()=>42!=n&&n!=Xe&&n!=Ye?Oe:(e.Oe=null,e.Ne=null,e.Ke=null,d=null,h=null,u=null,e.Fe=null,n==Xe?-3:0),e.Xe=(e,t,n)=>{let r=0;return-1==t&&(t=6),0>t||t>9||0>n||n>2?Oe:(Je[D].Re!=Je[t].Re&&0!==e.qe&&(r=e.Ye(1)),D!=t&&(D=t,P=Je[D].Pe,R=Je[D].Ie,B=Je[D].De,I=Je[D].Ve),V=n,r)},e.Ze=(e,t,r)=>{let s,i=r,o=0;if(!t||42!=n)return Oe;if(3>i)return 0;for(i>f-Ze&&(i=f-Ze,o=r-i),u.set(t.subarray(o,o+i),0),C=i,k=i,p=255&u[0],p=(p<=s;s++)p=(p<{let o,w,m,I,R;if(i>4||0>i)return Oe;if(!r.$e||!r.et&&0!==r.We||n==Ye&&4!=i)return r.Le=Qe[4],Oe;if(0===r.tt)return r.Le=Qe[7],-5;var B;if(t=r,I=c,c=i,42==n&&(w=8+(a-8<<4)<<8,m=(D-1&255)>>1,m>3&&(m=3),w|=m<<6,0!==C&&(w|=32),w+=31-w%31,n=Xe,J((B=w)>>8&255),J(255&B)),0!==e.pending){if(t.Te(),0===t.tt)return c=-1,0}else if(0===t.We&&I>=i&&4!=i)return t.Le=Qe[7],-5;if(n==Ye&&0!==t.We)return r.Le=Qe[7],-5;if(0!==t.We||0!==A||0!=i&&n!=Ye){switch(R=-1,Je[D].Re){case 0:R=(e=>{let n,r=65535;for(r>s-5&&(r=s-5);;){if(1>=A){if(ie(),0===A&&0==e)return 0;if(0===A)break}if(C+=A,A=0,n=k+r,(0===C||C>=n)&&(A=C-n,C=n,se(!1),0===t.tt))return 0;if(C-k>=f-Ze&&(se(!1),0===t.tt))return 0}return se(4==e),0===t.tt?4==e?2:0:4==e?3:1})(i);break;case 1:R=(e=>{let n,r=0;for(;;){if(Ze>A){if(ie(),Ze>A&&0==e)return 0;if(0===A)break}if(3>A||(p=(p<f-Ze||2!=V&&(v=oe(r)),3>v)n=ee(0,255&u[C]),A--,C++;else if(n=ee(C-x,v-3),A-=v,v>P||3>A)C+=v,v=0,p=255&u[C],p=(p<{let n,r,s=0;for(;;){if(Ze>A){if(ie(),Ze>A&&0==e)return 0;if(0===A)break}if(3>A||(p=(p<_&&f-Ze>=(C-s&65535)&&(2!=V&&(v=oe(s)),5>=v&&(1==V||3==v&&C-x>4096)&&(v=2)),3>_||v>_)if(0!==z){if(n=ee(0,255&u[C-1]),n&&se(!1),C++,A--,0===t.tt)return 0}else z=1,C++,A--;else{r=C+A-3,n=ee(C-1-S,_-3),A-=_-1,_-=2;do{++C>r||(p=(p<1+H+10-F&&(X(2,3),Y(256,Le._e),$()),H=7;else if(re(0,0,!1),3==i)for(o=0;y>o;o++)d[o]=0;if(t.Te(),0===t.tt)return c=-1,0}}return 4!=i?0:1}}function tt(){const e=this;e.nt=0,e.rt=0,e.We=0,e.qe=0,e.tt=0,e.Ge=0}function nt(e){const t=new tt,n=(o=e&&e.chunkSize?e.chunkSize:65536)+5*(r.floor(o/16383)+1);var o;const c=new i(n);let f=e?e.level:-1;void 0===f&&(f=-1),t.He(f),t.$e=c,this.append=(e,r)=>{let o,f,a=0,l=0,u=0;const w=[];if(e.length){t.nt=0,t.et=e,t.We=e.length;do{if(t.rt=0,t.tt=n,o=t.Ye(0),0!=o)throw new s("deflating: "+t.Le);t.rt&&(t.rt==n?w.push(new i(c)):w.push(c.subarray(0,t.rt))),u+=t.rt,r&&t.nt>0&&t.nt!=a&&(r(t.nt),a=t.nt)}while(t.We>0||0===t.tt);return w.length>1?(f=new i(u),w.forEach((e=>{f.set(e,l),l+=e.length}))):f=w[0]?new i(w[0]):new i,f}},this.flush=()=>{let e,r,o=0,f=0;const a=[];do{if(t.rt=0,t.tt=n,e=t.Ye(4),1!=e&&0!=e)throw new s("deflating: "+t.Le);n-t.tt>0&&a.push(c.slice(0,t.rt)),f+=t.rt}while(t.We>0||0===t.tt);return t.Qe(),r=new i(f),a.forEach((e=>{r.set(e,o),o+=e.length})),r}}tt.prototype={He(e,t){const n=this;return n.Fe=new et,t||(t=15),n.Fe.He(n,e,t)},Ye(e){const t=this;return t.Fe?t.Fe.Ye(t,e):Oe},Qe(){const e=this;if(!e.Fe)return Oe;const t=e.Fe.Qe();return e.Fe=null,t},Xe(e,t){const n=this;return n.Fe?n.Fe.Xe(n,e,t):Oe},Ze(e,t){const n=this;return n.Fe?n.Fe.Ze(n,e,t):Oe},je(e,t,n){const r=this;let s=r.We;return s>n&&(s=n),0===s?0:(r.We-=s,e.set(r.et.subarray(r.nt,r.nt+s),t),r.nt+=s,r.qe+=s,s)},Te(){const e=this;let t=e.Fe.pending;t>e.tt&&(t=e.tt),0!==t&&(e.$e.set(e.Fe.Ke.subarray(e.Fe.Je,e.Fe.Je+t),e.rt),e.rt+=t,e.Fe.Je+=t,e.Ge+=t,e.tt-=t,e.Fe.pending-=t,0===e.Fe.pending&&(e.Fe.Je=0))}};const rt=-2,st=-3,it=-5,ot=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],ct=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],ft=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],at=[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,0,0],lt=[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,112,112],ut=[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],wt=[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];function ht(){let e,t,n,r,s,i;function o(e,t,o,c,f,a,l,u,w,h,d){let p,y,m,b,g,k,v,S,z,C,x,A,_,I,P;C=0,g=o;do{n[e[t+C]]++,C++,g--}while(0!==g);if(n[0]==o)return l[0]=-1,u[0]=0,0;for(S=u[0],k=1;15>=k&&0===n[k];k++);for(v=k,k>S&&(S=k),g=15;0!==g&&0===n[g];g--);for(m=g,S>g&&(S=g),u[0]=S,I=1<k;k++,I<<=1)if(0>(I-=n[k]))return st;if(0>(I-=n[g]))return st;for(n[g]+=I,i[1]=k=0,C=1,_=2;0!=--g;)i[_]=k+=n[C],_++,C++;g=0,C=0;do{0!==(k=e[t+C])&&(d[i[k]++]=g),C++}while(++g=v;v++)for(p=n[v];0!=p--;){for(;v>A+S;){if(b++,A+=S,P=m-A,P=P>S?S:P,(y=1<<(k=v-A))>p+1&&(y-=p+1,_=v,P>k))for(;++kn[++_];)y-=n[_];if(P=1<1440)return st;s[b]=x=h[0],h[0]+=P,0!==b?(i[b]=g,r[0]=k,r[1]=S,k=g>>>A-S,r[2]=x-s[b-1]-k,w.set(r,3*(s[b-1]+k))):l[0]=x}for(r[1]=v-A,o>C?d[C]d[C]?0:96,r[2]=d[C++]):(r[0]=a[d[C]-c]+16+64,r[2]=f[d[C++]-c]):r[0]=192,y=1<>>A;P>k;k+=y)w.set(r,3*(x+k));for(k=1<>>=1)g^=k;for(g^=k,z=(1<c;c++)t[c]=0;for(c=0;16>c;c++)n[c]=0;for(c=0;3>c;c++)r[c]=0;s.set(n.subarray(0,15),0),i.set(n.subarray(0,16),0)}this.st=(n,r,s,i,f)=>{let a;return c(19),e[0]=0,a=o(n,0,19,19,null,null,s,r,i,e,t),a==st?f.Le="oversubscribed dynamic bit lengths tree":a!=it&&0!==r[0]||(f.Le="incomplete dynamic bit lengths tree",a=st),a},this.it=(n,r,s,i,f,a,l,u,w)=>{let h;return c(288),e[0]=0,h=o(s,0,n,257,at,lt,a,i,u,e,t),0!=h||0===i[0]?(h==st?w.Le="oversubscribed literal/length tree":-4!=h&&(w.Le="incomplete literal/length tree",h=st),h):(c(288),h=o(s,n,r,0,ut,wt,l,f,u,e,t),0!=h||0===f[0]&&n>257?(h==st?w.Le="oversubscribed distance tree":h==it?(w.Le="incomplete distance tree",h=st):-4!=h&&(w.Le="empty distance tree with lengths",h=st),h):0)}}function dt(){const e=this;let t,n,r,s,i=0,o=0,c=0,f=0,a=0,l=0,u=0,w=0,h=0,d=0;function p(e,t,n,r,s,i,o,c){let f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z;d=c.nt,p=c.We,w=o.ot,h=o.ct,y=o.write,m=yh;)p--,w|=(255&c.ft(d++))<>=a[z+1],h-=a[z+1],0!=(16&u)){for(u&=15,k=a[z+2]+(w&ot[u]),w>>=u,h-=u;15>h;)p--,w|=(255&c.ft(d++))<>=a[z+1],h-=a[z+1],0!=(16&u)){for(u&=15;u>h;)p--,w|=(255&c.ft(d++))<>=u,h-=u,m-=k,v>y){S=y-v;do{S+=o.end}while(0>S);if(u=o.end-S,k>u){if(k-=u,y-S>0&&u>y-S)do{o.lt[y++]=o.lt[S++]}while(0!=--u);else o.lt.set(o.lt.subarray(S,S+u),y),y+=u,S+=u,u=0;S=0}}else S=y-v,y-S>0&&2>y-S?(o.lt[y++]=o.lt[S++],o.lt[y++]=o.lt[S++],k-=2):(o.lt.set(o.lt.subarray(S,S+2),y),y+=2,S+=2,k-=2);if(y-S>0&&k>y-S)do{o.lt[y++]=o.lt[S++]}while(0!=--k);else o.lt.set(o.lt.subarray(S,S+k),y),y+=k,S+=k,k=0;break}if(0!=(64&u))return c.Le="invalid distance code",k=c.We-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ot=w,o.ct=h,c.We=p,c.qe+=d-c.nt,c.nt=d,o.write=y,st;f+=a[z+2],f+=w&ot[u],z=3*(l+f),u=a[z]}break}if(0!=(64&u))return 0!=(32&u)?(k=c.We-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ot=w,o.ct=h,c.We=p,c.qe+=d-c.nt,c.nt=d,o.write=y,1):(c.Le="invalid literal/length code",k=c.We-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ot=w,o.ct=h,c.We=p,c.qe+=d-c.nt,c.nt=d,o.write=y,st);if(f+=a[z+2],f+=w&ot[u],z=3*(l+f),0===(u=a[z])){w>>=a[z+1],h-=a[z+1],o.lt[y++]=a[z+2],m--;break}}else w>>=a[z+1],h-=a[z+1],o.lt[y++]=a[z+2],m--}while(m>=258&&p>=10);return k=c.We-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ot=w,o.ct=h,c.We=p,c.qe+=d-c.nt,c.nt=d,o.write=y,0}e.init=(e,i,o,c,f,a)=>{t=0,u=e,w=i,r=o,h=c,s=f,d=a,n=null},e.ut=(e,y,m)=>{let b,g,k,v,S,z,C,x=0,A=0,_=0;for(_=y.nt,v=y.We,x=e.ot,A=e.ct,S=e.write,z=S=258&&v>=10&&(e.ot=x,e.ct=A,y.We=v,y.qe+=_-y.nt,y.nt=_,e.write=S,m=p(u,w,r,h,s,d,e,y),_=y.nt,v=y.We,x=e.ot,A=e.ct,S=e.write,z=SA;){if(0===v)return e.ot=x,e.ct=A,y.We=v,y.qe+=_-y.nt,y.nt=_,e.write=S,e.wt(y,m);m=0,v--,x|=(255&y.ft(_++))<>>=n[g+1],A-=n[g+1],k=n[g],0===k){f=n[g+2],t=6;break}if(0!=(16&k)){a=15&k,i=n[g+2],t=2;break}if(0==(64&k)){c=k,o=g/3+n[g+2];break}if(0!=(32&k)){t=7;break}return t=9,y.Le="invalid literal/length code",m=st,e.ot=x,e.ct=A,y.We=v,y.qe+=_-y.nt,y.nt=_,e.write=S,e.wt(y,m);case 2:for(b=a;b>A;){if(0===v)return e.ot=x,e.ct=A,y.We=v,y.qe+=_-y.nt,y.nt=_,e.write=S,e.wt(y,m);m=0,v--,x|=(255&y.ft(_++))<>=b,A-=b,c=w,n=s,o=d,t=3;case 3:for(b=c;b>A;){if(0===v)return e.ot=x,e.ct=A,y.We=v,y.qe+=_-y.nt,y.nt=_,e.write=S,e.wt(y,m);m=0,v--,x|=(255&y.ft(_++))<>=n[g+1],A-=n[g+1],k=n[g],0!=(16&k)){a=15&k,l=n[g+2],t=4;break}if(0==(64&k)){c=k,o=g/3+n[g+2];break}return t=9,y.Le="invalid distance code",m=st,e.ot=x,e.ct=A,y.We=v,y.qe+=_-y.nt,y.nt=_,e.write=S,e.wt(y,m);case 4:for(b=a;b>A;){if(0===v)return e.ot=x,e.ct=A,y.We=v,y.qe+=_-y.nt,y.nt=_,e.write=S,e.wt(y,m);m=0,v--,x|=(255&y.ft(_++))<>=b,A-=b,t=5;case 5:for(C=S-l;0>C;)C+=e.end;for(;0!==i;){if(0===z&&(S==e.end&&0!==e.read&&(S=0,z=S7&&(A-=8,v++,_--),e.write=S,m=e.wt(y,m),S=e.write,z=S{}}ht.dt=(e,t,n,r)=>(e[0]=9,t[0]=5,n[0]=ct,r[0]=ft,0);const pt=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function yt(e,t){const n=this;let r,s=0,o=0,c=0,a=0;const l=[0],u=[0],w=new dt;let h=0,d=new f(4320);const p=new ht;n.ct=0,n.ot=0,n.lt=new i(t),n.end=t,n.read=0,n.write=0,n.reset=(e,t)=>{t&&(t[0]=0),6==s&&w.ht(e),s=0,n.ct=0,n.ot=0,n.read=n.write=0},n.reset(e,null),n.wt=(e,t)=>{let r,s,i;return s=e.rt,i=n.read,r=(i>n.write?n.end:n.write)-i,r>e.tt&&(r=e.tt),0!==r&&t==it&&(t=0),e.tt-=r,e.Ge+=r,e.$e.set(n.lt.subarray(i,i+r),s),s+=r,i+=r,i==n.end&&(i=0,n.write==n.end&&(n.write=0),r=n.write-i,r>e.tt&&(r=e.tt),0!==r&&t==it&&(t=0),e.tt-=r,e.Ge+=r,e.$e.set(n.lt.subarray(i,i+r),s),s+=r,i+=r),e.rt=s,n.read=i,t},n.ut=(e,t)=>{let i,f,y,m,b,g,k,v;for(m=e.nt,b=e.We,f=n.ot,y=n.ct,g=n.write,k=gy;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<>>1){case 0:f>>>=3,y-=3,i=7&y,f>>>=i,y-=i,s=1;break;case 1:S=[],z=[],C=[[]],x=[[]],ht.dt(S,z,C,x),w.init(S[0],z[0],C[0],0,x[0],0),f>>>=3,y-=3,s=6;break;case 2:f>>>=3,y-=3,s=3;break;case 3:return f>>>=3,y-=3,s=9,e.Le="invalid block type",t=st,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t)}break;case 1:for(;32>y;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<>>16&65535)!=(65535&f))return s=9,e.Le="invalid stored block lengths",t=st,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);o=65535&f,f=y=0,s=0!==o?2:0!==h?7:0;break;case 2:if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);if(0===k&&(g==n.end&&0!==n.read&&(g=0,k=gb&&(i=b),i>k&&(i=k),n.lt.set(e.je(m,i),g),m+=i,b-=i,g+=i,k-=i,0!=(o-=i))break;s=0!==h?7:0;break;case 3:for(;14>y;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<29||(i>>5&31)>29)return s=9,e.Le="too many length or distance symbols",t=st,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);if(i=258+(31&i)+(i>>5&31),!r||r.lengthv;v++)r[v]=0;f>>>=14,y-=14,a=0,s=4;case 4:for(;4+(c>>>10)>a;){for(;3>y;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<>>=3,y-=3}for(;19>a;)r[pt[a++]]=0;if(l[0]=7,i=p.st(r,l,u,d,e),0!=i)return(t=i)==st&&(r=null,s=9),n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);a=0,s=5;case 5:for(;i=c,258+(31&i)+(i>>5&31)>a;){let o,w;for(i=l[0];i>y;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<w)f>>>=i,y-=i,r[a++]=w;else{for(v=18==w?7:w-14,o=18==w?11:3;i+v>y;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<>>=i,y-=i,o+=f&ot[v],f>>>=v,y-=v,v=a,i=c,v+o>258+(31&i)+(i>>5&31)||16==w&&1>v)return r=null,s=9,e.Le="invalid bit length repeat",t=st,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);w=16==w?r[v-1]:0;do{r[v++]=w}while(0!=--o);a=v}}if(u[0]=-1,A=[],_=[],I=[],P=[],A[0]=9,_[0]=6,i=c,i=p.it(257+(31&i),1+(i>>5&31),r,A,_,I,P,d,e),0!=i)return i==st&&(r=null,s=9),t=i,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);w.init(A[0],_[0],d,I[0],d,P[0]),s=6;case 6:if(n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,1!=(t=w.ut(n,e,t)))return n.wt(e,t);if(t=0,w.ht(e),m=e.nt,b=e.We,f=n.ot,y=n.ct,g=n.write,k=g{n.reset(e,null),n.lt=null,d=null},n.yt=(e,t,r)=>{n.lt.set(e.subarray(t,t+r),0),n.read=n.write=r},n.bt=()=>1==s?1:0}const mt=13,bt=[0,0,255,255];function gt(){const e=this;function t(e){return e&&e.gt?(e.qe=e.Ge=0,e.Le=null,e.gt.mode=7,e.gt.kt.reset(e,null),0):rt}e.mode=0,e.method=0,e.vt=[0],e.St=0,e.marker=0,e.zt=0,e.Ct=t=>(e.kt&&e.kt.ht(t),e.kt=null,0),e.xt=(n,r)=>(n.Le=null,e.kt=null,8>r||r>15?(e.Ct(n),rt):(e.zt=r,n.gt.kt=new yt(n,1<{let n,r;if(!e||!e.gt||!e.et)return rt;const s=e.gt;for(t=4==t?it:0,n=it;;)switch(s.mode){case 0:if(0===e.We)return n;if(n=t,e.We--,e.qe++,8!=(15&(s.method=e.ft(e.nt++)))){s.mode=mt,e.Le="unknown compression method",s.marker=5;break}if(8+(s.method>>4)>s.zt){s.mode=mt,e.Le="invalid win size",s.marker=5;break}s.mode=1;case 1:if(0===e.We)return n;if(n=t,e.We--,e.qe++,r=255&e.ft(e.nt++),((s.method<<8)+r)%31!=0){s.mode=mt,e.Le="incorrect header check",s.marker=5;break}if(0==(32&r)){s.mode=7;break}s.mode=2;case 2:if(0===e.We)return n;n=t,e.We--,e.qe++,s.St=(255&e.ft(e.nt++))<<24&4278190080,s.mode=3;case 3:if(0===e.We)return n;n=t,e.We--,e.qe++,s.St+=(255&e.ft(e.nt++))<<16&16711680,s.mode=4;case 4:if(0===e.We)return n;n=t,e.We--,e.qe++,s.St+=(255&e.ft(e.nt++))<<8&65280,s.mode=5;case 5:return 0===e.We?n:(n=t,e.We--,e.qe++,s.St+=255&e.ft(e.nt++),s.mode=6,2);case 6:return s.mode=mt,e.Le="need dictionary",s.marker=0,rt;case 7:if(n=s.kt.ut(e,n),n==st){s.mode=mt,s.marker=0;break}if(0==n&&(n=t),1!=n)return n;n=t,s.kt.reset(e,s.vt),s.mode=12;case 12:return e.We=0,1;case mt:return st;default:return rt}},e._t=(e,t,n)=>{let r=0,s=n;if(!e||!e.gt||6!=e.gt.mode)return rt;const i=e.gt;return s<1<{let n,r,s,i,o;if(!e||!e.gt)return rt;const c=e.gt;if(c.mode!=mt&&(c.mode=mt,c.marker=0),0===(n=e.We))return it;for(r=e.nt,s=c.marker;0!==n&&4>s;)e.ft(r)==bt[s]?s++:s=0!==e.ft(r)?0:4-s,r++,n--;return e.qe+=r-e.nt,e.nt=r,e.We=n,c.marker=s,4!=s?st:(i=e.qe,o=e.Ge,t(e),e.qe=i,e.Ge=o,c.mode=7,0)},e.Pt=e=>e&&e.gt&&e.gt.kt?e.gt.kt.bt():rt}function kt(){}function vt(e){const t=new kt,n=e&&e.chunkSize?r.floor(2*e.chunkSize):131072,o=new i(n);let c=!1;t.xt(),t.$e=o,this.append=(e,r)=>{const f=[];let a,l,u=0,w=0,h=0;if(0!==e.length){t.nt=0,t.et=e,t.We=e.length;do{if(t.rt=0,t.tt=n,0!==t.We||c||(t.nt=0,c=!0),a=t.At(0),c&&a===it){if(0!==t.We)throw new s("inflating: bad input")}else if(0!==a&&1!==a)throw new s("inflating: "+t.Le);if((c||1===a)&&t.We===e.length)throw new s("inflating: bad input");t.rt&&(t.rt===n?f.push(new i(o)):f.push(o.subarray(0,t.rt))),h+=t.rt,r&&t.nt>0&&t.nt!=u&&(r(t.nt),u=t.nt)}while(t.We>0||0===t.tt);return f.length>1?(l=new i(h),f.forEach((e=>{l.set(e,w),w+=e.length}))):l=f[0]?new i(f[0]):new i,l}},this.flush=()=>{t.Ct()}}kt.prototype={xt(e){const t=this;return t.gt=new gt,e||(e=15),t.gt.xt(t,e)},At(e){const t=this;return t.gt?t.gt.At(t,e):rt},Ct(){const e=this;if(!e.gt)return rt;const t=e.gt.Ct(e);return e.gt=null,t},It(){const e=this;return e.gt?e.gt.It(e):rt},_t(e,t){const n=this;return n.gt?n.gt._t(n,e,t):rt},ft(e){return this.et[e]},je(e,t){return this.et.subarray(e,e+t)}},self.initCodec=()=>{self.Deflate=nt,self.Inflate=vt};\n'],{type:"text/javascript"}));e({workerScripts:{inflate:[t],deflate:[t]}})})($),e.BlobReader=Ut,e.BlobWriter=It,e.Data64URIReader=class extends Tt{constructor(e){super();let t=e.length;for(;"="==e.charAt(t-1);)t--;const r=e.indexOf(",")+1;n.assign(this,{dataURI:e,dataStart:r,size:a.floor(.75*(t-r))})}readUint8Array(e,t){const{dataStart:n,dataURI:r}=this,s=new w(t),i=4*a.floor(e/3),o=atob(r.substring(i+n,4*a.ceil((e+t)/3)+n)),c=e-3*a.floor(i/4);for(let e=c;c+t>e;e++)s[e-c]=o.charCodeAt(e);return s}},e.Data64URIWriter=class extends Lt{constructor(e){super(),n.assign(this,{data:"data:"+(e||"")+";base64,",pending:[]})}writeUint8Array(e){const t=this;let n=0,s=t.pending;const i=t.pending.length;for(t.pending="",n=0;n<3*a.floor((i+e.length)/3)-i;n++)s+=r.fromCharCode(e[n]);for(;n2?t.data+=v(s):t.pending=s}getData(){return this.data+v(this.pending)}},e.ERR_BAD_FORMAT=_n,e.ERR_CENTRAL_DIRECTORY_NOT_FOUND=Rn,e.ERR_DUPLICATED_NAME=er,e.ERR_ENCRYPTED=Tn,e.ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND=Wn,e.ERR_EOCDR_NOT_FOUND=Cn,e.ERR_EOCDR_ZIP64_NOT_FOUND=Dn,e.ERR_EXTRAFIELD_ZIP64_NOT_FOUND=En,e.ERR_HTTP_RANGE=_t,e.ERR_INVALID_COMMENT=tr,e.ERR_INVALID_ENCRYPTION_STRENGTH=ir,e.ERR_INVALID_ENTRY_COMMENT=nr,e.ERR_INVALID_ENTRY_NAME=rr,e.ERR_INVALID_EXTRAFIELD_DATA=or,e.ERR_INVALID_EXTRAFIELD_TYPE=ar,e.ERR_INVALID_PASSWORD=de,e.ERR_INVALID_SIGNATURE=we,e.ERR_INVALID_VERSION=sr,e.ERR_ITERATOR_COMPLETED_TOO_SOON=Ct,e.ERR_LOCAL_FILE_HEADER_NOT_FOUND=Fn,e.ERR_SPLIT_ZIP_FILE=In,e.ERR_UNSUPPORTED_COMPRESSION=Un,e.ERR_UNSUPPORTED_ENCRYPTION=Ln,e.ERR_UNSUPPORTED_FORMAT=cr,e.HttpRangeReader=class extends jt{constructor(e,t={}){t.useRangeHeader=!0,super(e,t)}},e.HttpReader=jt,e.Reader=Tt,e.SplitDataReader=Jt,e.SplitDataWriter=Qt,e.SplitZipReader=rn,e.SplitZipWriter=sn,e.TextReader=class extends Ut{constructor(e){super(new m([e],{type:"text/plain"}))}},e.TextWriter=class extends It{constructor(e){super(e),n.assign(this,{encoding:e,utf8:!e||"utf-8"==e.toLowerCase()})}async getData(){const{encoding:e,utf8:t}=this,r=await super.getData();if(r.text&&t)return r.text();{const t=new FileReader;return new y(((s,i)=>{n.assign(t,{onload:({target:e})=>s(e.result),onerror:()=>i(t.error)}),t.readAsText(r,e)}))}}},e.Uint8ArrayReader=class extends Tt{constructor(e){super(),n.assign(this,{array:e,size:e.length})}readUint8Array(e,t){return this.array.slice(e,e+t)}},e.Uint8ArrayWriter=class extends Lt{init(e=0){n.assign(this,{offset:0,array:new w(e)}),super.init()}writeUint8Array(e){const t=this;if(t.offset+e.length>t.array.length){const n=t.array;t.array=new w(n.length+e.length),t.array.set(n)}t.array.set(e,t.offset),t.offset+=e.length}getData(){return this.array}},e.Writer=Lt,e.ZipReader=Hn,e.ZipReaderStream=class{constructor(e={}){const{readable:t,writable:n}=new x,r=new Hn(t,e).getEntriesGenerator();this.readable=new A({async pull(e){const{done:t,value:n}=await r.next();if(t)return e.close();const s={...n,readable:(()=>{const{readable:e,writable:t}=new x;if(n.getData)return n.getData(t),e})()};delete s.getData,e.enqueue(s)}}),this.writable=n}},e.ZipWriter=dr,e.ZipWriterStream=class{constructor(e={}){const{readable:t,writable:n}=new x;this.readable=t,this.zipWriter=new dr(n,e)}transform(e){const{readable:t,writable:n}=new x({flush:()=>{this.zipWriter.close()}});return this.zipWriter.add(e,t),{readable:this.readable,writable:n}}writable(e){const{readable:t,writable:n}=new x;return this.zipWriter.add(e,t),n}close(e,t={}){return this.zipWriter.close(e,t)}},e.configure=$,e.getMimeType=()=>"application/octet-stream",e.initReader=en,e.initShimAsyncCodec=(e,t={},n)=>({Deflate:te(e.Deflate,t.deflate,n),Inflate:te(e.Inflate,t.inflate,n)}),e.initStream=$t,e.initWriter=tn,e.readUint8Array=nn,e.terminateWorkers=async()=>{await y.allSettled(St.map((e=>(xt(e),e.terminate()))))},n.defineProperty(e,"__esModule",{value:!0})}));