@zip.js/zip.js 2.15.0 → 2.16.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/BENCHMARKS.md +4 -2
- package/deno.json +1 -1
- package/dist/zip-core-external.js +410 -227
- package/dist/zip-core-external.min.js +1 -1
- package/dist/zip-core.js +234 -109
- package/dist/zip-core.min.js +1 -1
- package/dist/zip-fs-core-external.js +552 -237
- package/dist/zip-fs-core-external.min.js +1 -1
- package/dist/zip-fs-core.js +377 -118
- package/dist/zip-fs-core.min.js +1 -1
- package/dist/zip-fs-external.js +552 -237
- package/dist/zip-fs-external.min.js +1 -1
- package/dist/zip-fs-native.js +379 -120
- package/dist/zip-fs-native.min.js +1 -1
- package/dist/zip-fs.js +554 -237
- package/dist/zip-fs.min.js +1 -1
- package/dist/zip-legacy.js +236 -111
- package/dist/zip-legacy.min.js +1 -1
- package/dist/zip-native.js +236 -111
- package/dist/zip-native.min.js +1 -1
- package/dist/zip-web-worker-native.js +1 -1
- package/dist/zip-web-worker.js +1 -1
- package/dist/zip.js +411 -228
- package/dist/zip.min.js +1 -1
- package/eslint.config.mjs +1 -1
- package/index-native.cjs +379 -120
- package/index-native.min.js +1 -1
- package/index.cjs +554 -237
- package/index.d.cts +143 -16
- package/index.d.ts +143 -16
- package/index.min.js +1 -1
- package/lib/core/io.js +3 -2
- package/lib/core/streams/aes-crypto-stream.js +60 -17
- package/lib/core/streams/zip-crypto-stream.js +7 -7
- package/lib/core/streams/zip-entry-stream.js +146 -73
- package/lib/core/streams/zlib-wasm/zlib-streams.js +176 -118
- package/lib/core/util/compatible-streams.js +10 -5
- package/lib/core/version.js +1 -1
- package/lib/core/web-worker-inline-native.js +1 -1
- package/lib/core/web-worker-inline-wasm.js +1 -1
- package/lib/core/zip-fs.js +144 -10
- package/lib/core/zip-reader.js +5 -5
- package/lib/core/zip-writer.js +4 -2
- package/package.json +3 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
const t=4294967295,e=65535,r=255,n=67324752,o=134695760,i=o,a=84233040,s=33639248,c=101010256,u=101075792,l=117853008,f=46,d=22,w=20,p=56,h=39169,m=21589,y=6534,b=30837,E=30805,S=2048,g=61440,A=16384,R=2048,D=1024,x="/",z=30,F=new Date(2107,11,31,23,59,58),O=new Date(1980,0,1),I=void 0,T=1/0,U="undefined",C="function",k="object",v="string",M="boolean",N=new Uint8Array,_=Symbol.asyncDispose||Symbol(),j="password",B="rawPassword",P="passThrough",L="signal",W="useWebWorkers",Z="useCompressionStream",V="transferStreams",H="preventClose",G="level",Y="useUnicodeFileNames",q="dataDescriptor",K="offset",X="usdz",$="maxAppendedDataSize",J="signCentralDirectory",Q="entry",tt="filename",et="comment",rt="strict",nt="balanced",ot="tolerant",it="compressed",at="Invalid option (must be a function)",st="Invalid signal (must be an AbortSignal instance)",ct="Invalid password (password must be a string, rawPassword must be a Uint8Array)",ut="Invalid passThrough option (must be a boolean or 'compressed')",lt="The operation was aborted";function ft(t){if(t&&typeof t!=C)throw new Error(at);return t}function dt(t){if(t&&(typeof t.addEventListener!=C||typeof t.aborted!=M))throw new Error(st);return t||I}function wt(t){if(t&&t.aborted)throw t.reason===I?new DOMException(lt,"AbortError"):t.reason}function pt(t,e){if(t&&typeof t!=v||e&&!(e instanceof Uint8Array))throw new Error(ct)}function ht(t){if(t!==I&&typeof t!=M&&t!==it)throw new Error(ut);return t}function mt(t,e,r){if(!Number.isInteger(t)||t<0||t>e)throw new Error(r)}function yt(t,e,r){t!==I&&mt(t,e,r)}function bt(t){return typeof t==v&&t.trim()?Number(t):t}const Et="Invalid maxWorkers (must be an integer greater than 0)",St="Invalid baseURI (must be a string)",gt="Invalid URI (must be a string or a function returning a string)";let At=2;try{typeof navigator!=U&&navigator.hardwareConcurrency&&(At=navigator.hardwareConcurrency)}catch{}const Rt={workerURI:"./core/web-worker-wasm.js",wasmURI:"./core/streams/zlib-wasm/zlib-streams.wasm",chunkSize:65536,maxWorkers:At,terminateWorkerTimeout:5e3,workerStarvationTimeout:5e3,workerStartupTimeout:5e3,useWebWorkers:!0,useCompressionStream:!0,transferStreams:!0,CompressionStream:typeof CompressionStream!=U&&CompressionStream,DecompressionStream:typeof DecompressionStream!=U&&DecompressionStream},Dt="maxWorkers",xt="baseURI",zt=["wasmURI","workerURI"],Ft=["chunkSize",Dt,"terminateWorkerTimeout","workerStarvationTimeout","workerStartupTimeout"],Ot=["createWorker","CompressionStream","DecompressionStream","CompressionStreamFallback","DecompressionStreamFallback"],It=[xt,...zt,"useCompressionStream","useWebWorkers","transferStreams",...Ft,...Ot],Tt={...Rt};function Ut(){return Tt}function Ct(t){return kt(t.chunkSize)}function kt(t){return t=bt(t),Number.isInteger(t)&&t>=1?Math.max(t,64):65536}function vt(t){Object.assign(Tt,Mt(_t(t)))}function Mt(t){const e={};for(const r of It){const n=t[r];n!==I&&(e[r]=Nt(r,n))}return e}function Nt(t,e){if(Ft.includes(t)){if(e=bt(e),t==Dt&&(!Number.isInteger(e)||e<1))throw new Error(Et)}else if(Ot.includes(t))ft(e);else if(t==xt){if(e&&typeof e!=v)throw new Error(St)}else if(zt.includes(t)&&e&&typeof e!=v&&typeof e!=C)throw new Error(gt);return e}function _t(t){t=t||{};const{CompressionStreamZlib:e,DecompressionStreamZlib:r}=t;if(e===I&&r===I)return t;const n=Object.assign({},t);return n.CompressionStreamFallback===I&&(n.CompressionStreamFallback=e),n.DecompressionStreamFallback===I&&(n.DecompressionStreamFallback=r),n}function jt(t){const e=Mt(_t(t));Object.assign(Rt,e),Object.assign(Tt,e)}function Bt(){for(const t of It)delete Tt[t];Object.assign(Tt,Rt)}function Pt(t,e){const r=new Uint8Array(t.length+e.length);return r.set(t),r.set(e,t.length),r}function Lt(t){return t.byteOffset||t.byteLength!=t.buffer.byteLength?new Uint8Array(t):t}function Wt(t){return new DataView(t.buffer,t.byteOffset,t.byteLength)}function Zt(t){return Boolean(t)&&"object"==typeof t}const Vt=[[],[],[],[],[],[],[],[]];for(let t=0;t<256;t++){let e=t;for(let t=0;t<8;t++)e=1&e?e>>>1^3988292384:e>>>1;Vt[0][t]=e}for(let t=0;t<256;t++)for(let e=1;e<8;e++){const r=Vt[e-1][t];Vt[e][t]=r>>>8^Vt[0][255&r]}const[Ht,Gt,Yt,qt,Kt,Xt,$t,Jt]=Vt;class Qt{constructor(t){this.o=t||-1}append(t){let e=0|this.o;const r=0|t.length;let n=0;if(r>=8&&t.buffer){const o=new DataView(t.buffer,t.byteOffset,r),i=r-8;for(;n<=i;n+=8){const t=e^o.getInt32(n,!0),r=o.getInt32(n+4,!0);e=Jt[255&t]^$t[t>>>8&255]^Xt[t>>>16&255]^Kt[t>>>24&255]^qt[255&r]^Yt[r>>>8&255]^Gt[r>>>16&255]^Ht[r>>>24&255]}}for(;n<r;n++)e=e>>>8^Ht[255&(e^t[n])];this.o=e}get(){return~this.o}}class te extends TransformStream{constructor(){let t;const e=new Qt;super({transform(t,r){e.append(t),r.enqueue(t)},flush(){const r=new Uint8Array(4);new DataView(r.buffer).setUint32(0,e.get()),t.value=r}}),t=this}}function ee(t){if(typeof TextEncoder==U){t=unescape(encodeURIComponent(t));const e=new Uint8Array(t.length);for(let r=0;r<e.length;r++)e[r]=t.charCodeAt(r);return e}return(new TextEncoder).encode(t)}const re=64,ne=20,oe=new Uint8Array([128]),ie=new Uint8Array(1),ae=new Int32Array([1732584193,4023233417,2562383102,271733878,3285377520]),se=new Uint8Array(256),ce=new Int32Array(256),ue=new Int32Array(256),le=new Int32Array(256),fe=new Int32Array(256);let de=!1;function we(t,e){!function(){if(!de){let t=1,e=1;do{t=255&(t^t<<1^(128&t?27:0)),e=255&(e^e<<1),e=255&(e^e<<2),e=255&(e^e<<4),128&e&&(e^=9),se[t]=255&(e^(e<<1|e>>7)^(e<<2|e>>6)^(e<<3|e>>5)^(e<<4|e>>4)^99)}while(1!=t);se[0]=99;for(let t=0;t<256;t++){const e=se[t],r=ye(e),n=r<<24|e<<16|e<<8|r^e;ce[t]=n,ue[t]=n>>>8|n<<24,le[t]=n>>>16|n<<16,fe[t]=n>>>24|n<<8}de=!0}}();const r=new Int32Array(60),n=function(t,e){const r=t.length>>2,n=r+6,o=4*(n+1);let i=1;for(let n=0;n<r;n++)e[n]=t[4*n]<<24|t[4*n+1]<<16|t[4*n+2]<<8|t[4*n+3];for(let t=r;t<o;t++){let n=e[t-1];t%r==0?(n=he(n<<8|n>>>24)^i<<24,i=ye(i)):r>6&&t%r==4&&(n=he(n)),e[t]=e[t-r]^n}return n}(t,r),o=new Int32Array(4),i=pe(e);let a=0,s=0,c=0,u=0;return{process(t,e){e&&i.update(t,0,t.length),function(t){const e=new DataView(t.buffer,t.byteOffset,t.byteLength),r=t.length;let n=0;for(;n+16<=r;n+=16)l(),e.setInt32(n,e.getInt32(n)^o[0]),e.setInt32(n+4,e.getInt32(n+4)^o[1]),e.setInt32(n+8,e.getInt32(n+8)^o[2]),e.setInt32(n+12,e.getInt32(n+12)^o[3]);if(n<r){l();for(let e=0;n<r;n++,e++)t[n]^=o[e>>2]>>>24-8*(3&e)}}(t),e||i.update(t,0,t.length)},digest:()=>i.digest()};function l(){a=a+1|0,a||(s=s+1|0,s||(c=c+1|0,c||(u=u+1|0)));let t=me(a)^r[0],e=me(s)^r[1],i=me(c)^r[2],l=me(u)^r[3],f=ce[t>>>24]^ue[e>>>16&255]^le[i>>>8&255]^fe[255&l]^r[4],d=ce[e>>>24]^ue[i>>>16&255]^le[l>>>8&255]^fe[255&t]^r[5],w=ce[i>>>24]^ue[l>>>16&255]^le[t>>>8&255]^fe[255&e]^r[6],p=ce[l>>>24]^ue[t>>>16&255]^le[e>>>8&255]^fe[255&i]^r[7];t=ce[f>>>24]^ue[d>>>16&255]^le[w>>>8&255]^fe[255&p]^r[8],e=ce[d>>>24]^ue[w>>>16&255]^le[p>>>8&255]^fe[255&f]^r[9],i=ce[w>>>24]^ue[p>>>16&255]^le[f>>>8&255]^fe[255&d]^r[10],l=ce[p>>>24]^ue[f>>>16&255]^le[d>>>8&255]^fe[255&w]^r[11],f=ce[t>>>24]^ue[e>>>16&255]^le[i>>>8&255]^fe[255&l]^r[12],d=ce[e>>>24]^ue[i>>>16&255]^le[l>>>8&255]^fe[255&t]^r[13],w=ce[i>>>24]^ue[l>>>16&255]^le[t>>>8&255]^fe[255&e]^r[14],p=ce[l>>>24]^ue[t>>>16&255]^le[e>>>8&255]^fe[255&i]^r[15],t=ce[f>>>24]^ue[d>>>16&255]^le[w>>>8&255]^fe[255&p]^r[16],e=ce[d>>>24]^ue[w>>>16&255]^le[p>>>8&255]^fe[255&f]^r[17],i=ce[w>>>24]^ue[p>>>16&255]^le[f>>>8&255]^fe[255&d]^r[18],l=ce[p>>>24]^ue[f>>>16&255]^le[d>>>8&255]^fe[255&w]^r[19],f=ce[t>>>24]^ue[e>>>16&255]^le[i>>>8&255]^fe[255&l]^r[20],d=ce[e>>>24]^ue[i>>>16&255]^le[l>>>8&255]^fe[255&t]^r[21],w=ce[i>>>24]^ue[l>>>16&255]^le[t>>>8&255]^fe[255&e]^r[22],p=ce[l>>>24]^ue[t>>>16&255]^le[e>>>8&255]^fe[255&i]^r[23],t=ce[f>>>24]^ue[d>>>16&255]^le[w>>>8&255]^fe[255&p]^r[24],e=ce[d>>>24]^ue[w>>>16&255]^le[p>>>8&255]^fe[255&f]^r[25],i=ce[w>>>24]^ue[p>>>16&255]^le[f>>>8&255]^fe[255&d]^r[26],l=ce[p>>>24]^ue[f>>>16&255]^le[d>>>8&255]^fe[255&w]^r[27],f=ce[t>>>24]^ue[e>>>16&255]^le[i>>>8&255]^fe[255&l]^r[28],d=ce[e>>>24]^ue[i>>>16&255]^le[l>>>8&255]^fe[255&t]^r[29],w=ce[i>>>24]^ue[l>>>16&255]^le[t>>>8&255]^fe[255&e]^r[30],p=ce[l>>>24]^ue[t>>>16&255]^le[e>>>8&255]^fe[255&i]^r[31],t=ce[f>>>24]^ue[d>>>16&255]^le[w>>>8&255]^fe[255&p]^r[32],e=ce[d>>>24]^ue[w>>>16&255]^le[p>>>8&255]^fe[255&f]^r[33],i=ce[w>>>24]^ue[p>>>16&255]^le[f>>>8&255]^fe[255&d]^r[34],l=ce[p>>>24]^ue[f>>>16&255]^le[d>>>8&255]^fe[255&w]^r[35],f=ce[t>>>24]^ue[e>>>16&255]^le[i>>>8&255]^fe[255&l]^r[36],d=ce[e>>>24]^ue[i>>>16&255]^le[l>>>8&255]^fe[255&t]^r[37],w=ce[i>>>24]^ue[l>>>16&255]^le[t>>>8&255]^fe[255&e]^r[38],p=ce[l>>>24]^ue[t>>>16&255]^le[e>>>8&255]^fe[255&i]^r[39];let h=40;n>10&&(t=ce[f>>>24]^ue[d>>>16&255]^le[w>>>8&255]^fe[255&p]^r[40],e=ce[d>>>24]^ue[w>>>16&255]^le[p>>>8&255]^fe[255&f]^r[41],i=ce[w>>>24]^ue[p>>>16&255]^le[f>>>8&255]^fe[255&d]^r[42],l=ce[p>>>24]^ue[f>>>16&255]^le[d>>>8&255]^fe[255&w]^r[43],f=ce[t>>>24]^ue[e>>>16&255]^le[i>>>8&255]^fe[255&l]^r[44],d=ce[e>>>24]^ue[i>>>16&255]^le[l>>>8&255]^fe[255&t]^r[45],w=ce[i>>>24]^ue[l>>>16&255]^le[t>>>8&255]^fe[255&e]^r[46],p=ce[l>>>24]^ue[t>>>16&255]^le[e>>>8&255]^fe[255&i]^r[47],h=48),n>12&&(t=ce[f>>>24]^ue[d>>>16&255]^le[w>>>8&255]^fe[255&p]^r[48],e=ce[d>>>24]^ue[w>>>16&255]^le[p>>>8&255]^fe[255&f]^r[49],i=ce[w>>>24]^ue[p>>>16&255]^le[f>>>8&255]^fe[255&d]^r[50],l=ce[p>>>24]^ue[f>>>16&255]^le[d>>>8&255]^fe[255&w]^r[51],f=ce[t>>>24]^ue[e>>>16&255]^le[i>>>8&255]^fe[255&l]^r[52],d=ce[e>>>24]^ue[i>>>16&255]^le[l>>>8&255]^fe[255&t]^r[53],w=ce[i>>>24]^ue[l>>>16&255]^le[t>>>8&255]^fe[255&e]^r[54],p=ce[l>>>24]^ue[t>>>16&255]^le[e>>>8&255]^fe[255&i]^r[55],h=56),o[0]=(se[f>>>24]<<24|se[d>>>16&255]<<16|se[w>>>8&255]<<8|se[255&p])^r[h],o[1]=(se[d>>>24]<<24|se[w>>>16&255]<<16|se[p>>>8&255]<<8|se[255&f])^r[h+1],o[2]=(se[w>>>24]<<24|se[p>>>16&255]<<16|se[f>>>8&255]<<8|se[255&d])^r[h+2],o[3]=(se[p>>>24]<<24|se[f>>>16&255]<<16|se[d>>>8&255]<<8|se[255&w])^r[h+3]}}function pe(t){const e=function(){const t=new Int32Array(ae),e=new Int32Array(16),r=new Uint8Array(re),n=new DataView(r.buffer),o=new Uint8Array(8);let i=0,a=0;return{update:s,digest:function(){const e=8*a,r=Math.floor(e/4294967296),n=e>>>0;for(s(oe,0,1);56!=i;)s(ie,0,1);o[0]=r>>>24,o[1]=r>>>16,o[2]=r>>>8,o[3]=r,o[4]=n>>>24,o[5]=n>>>16,o[6]=n>>>8,o[7]=n,s(o,0,8);const c=new Uint8Array(ne),u=new DataView(c.buffer);for(let e=0;e<t.length;e++)u.setInt32(4*e,t[e]);return t.set(ae),i=0,a=0,c}};function s(t,e,o){const s=e+o;if(a+=o,i){for(;e<s&&i<re;)r[i++]=t[e++];i==re&&(c(n,0),i=0)}if(e+re<=s){const r=new DataView(t.buffer,t.byteOffset,t.byteLength);for(;e+re<=s;e+=re)c(r,e)}for(;e<s;)r[i++]=t[e++]}function c(r,n){for(let t=0;t<16;t++)e[t]=r.getInt32(n+4*t);let o,i=t[0],a=t[1],s=t[2],c=t[3],u=t[4];for(let t=0;t<15;t+=5)u=(i<<5|i>>>27)+((s^c)&a^c)+u+1518500249+e[t]|0,a=a<<30|a>>>2,c=(u<<5|u>>>27)+((a^s)&i^s)+c+1518500249+e[t+1]|0,i=i<<30|i>>>2,s=(c<<5|c>>>27)+((i^a)&u^a)+s+1518500249+e[t+2]|0,u=u<<30|u>>>2,a=(s<<5|s>>>27)+((u^i)&c^i)+a+1518500249+e[t+3]|0,c=c<<30|c>>>2,i=(a<<5|a>>>27)+((c^u)&s^u)+i+1518500249+e[t+4]|0,s=s<<30|s>>>2;u=(i<<5|i>>>27)+((s^c)&a^c)+u+1518500249+e[15]|0,a=a<<30|a>>>2,o=e[13]^e[8]^e[2]^e[0],o=o<<1|o>>>31,e[0]=o,c=(u<<5|u>>>27)+((a^s)&i^s)+c+1518500249+o|0,i=i<<30|i>>>2,o=e[14]^e[9]^e[3]^e[1],o=o<<1|o>>>31,e[1]=o,s=(c<<5|c>>>27)+((i^a)&u^a)+s+1518500249+o|0,u=u<<30|u>>>2,o=e[15]^e[10]^e[4]^e[2],o=o<<1|o>>>31,e[2]=o,a=(s<<5|s>>>27)+((u^i)&c^i)+a+1518500249+o|0,c=c<<30|c>>>2,o=e[0]^e[11]^e[5]^e[3],o=o<<1|o>>>31,e[3]=o,i=(a<<5|a>>>27)+((c^u)&s^u)+i+1518500249+o|0,s=s<<30|s>>>2;for(let t=20;t<40;t+=5)o=e[t-3&15]^e[t-8&15]^e[t-14&15]^e[15&t],o=o<<1|o>>>31,e[15&t]=o,u=(i<<5|i>>>27)+(a^s^c)+u+1859775393+o|0,a=a<<30|a>>>2,o=e[t-2&15]^e[t-7&15]^e[t-13&15]^e[t+1&15],o=o<<1|o>>>31,e[t+1&15]=o,c=(u<<5|u>>>27)+(i^a^s)+c+1859775393+o|0,i=i<<30|i>>>2,o=e[t-1&15]^e[t-6&15]^e[t-12&15]^e[t+2&15],o=o<<1|o>>>31,e[t+2&15]=o,s=(c<<5|c>>>27)+(u^i^a)+s+1859775393+o|0,u=u<<30|u>>>2,o=e[15&t]^e[t-5&15]^e[t-11&15]^e[t+3&15],o=o<<1|o>>>31,e[t+3&15]=o,a=(s<<5|s>>>27)+(c^u^i)+a+1859775393+o|0,c=c<<30|c>>>2,o=e[t+1&15]^e[t-4&15]^e[t-10&15]^e[t+4&15],o=o<<1|o>>>31,e[t+4&15]=o,i=(a<<5|a>>>27)+(s^c^u)+i+1859775393+o|0,s=s<<30|s>>>2;for(let t=40;t<60;t+=5)o=e[t-3&15]^e[t-8&15]^e[t-14&15]^e[15&t],o=o<<1|o>>>31,e[15&t]=o,u=(i<<5|i>>>27)+(a&s|(a|s)&c)+u+2400959708+o|0,a=a<<30|a>>>2,o=e[t-2&15]^e[t-7&15]^e[t-13&15]^e[t+1&15],o=o<<1|o>>>31,e[t+1&15]=o,c=(u<<5|u>>>27)+(i&a|(i|a)&s)+c+2400959708+o|0,i=i<<30|i>>>2,o=e[t-1&15]^e[t-6&15]^e[t-12&15]^e[t+2&15],o=o<<1|o>>>31,e[t+2&15]=o,s=(c<<5|c>>>27)+(u&i|(u|i)&a)+s+2400959708+o|0,u=u<<30|u>>>2,o=e[15&t]^e[t-5&15]^e[t-11&15]^e[t+3&15],o=o<<1|o>>>31,e[t+3&15]=o,a=(s<<5|s>>>27)+(c&u|(c|u)&i)+a+2400959708+o|0,c=c<<30|c>>>2,o=e[t+1&15]^e[t-4&15]^e[t-10&15]^e[t+4&15],o=o<<1|o>>>31,e[t+4&15]=o,i=(a<<5|a>>>27)+(s&c|(s|c)&u)+i+2400959708+o|0,s=s<<30|s>>>2;for(let t=60;t<80;t+=5)o=e[t-3&15]^e[t-8&15]^e[t-14&15]^e[15&t],o=o<<1|o>>>31,e[15&t]=o,u=(i<<5|i>>>27)+(a^s^c)+u+3395469782+o|0,a=a<<30|a>>>2,o=e[t-2&15]^e[t-7&15]^e[t-13&15]^e[t+1&15],o=o<<1|o>>>31,e[t+1&15]=o,c=(u<<5|u>>>27)+(i^a^s)+c+3395469782+o|0,i=i<<30|i>>>2,o=e[t-1&15]^e[t-6&15]^e[t-12&15]^e[t+2&15],o=o<<1|o>>>31,e[t+2&15]=o,s=(c<<5|c>>>27)+(u^i^a)+s+3395469782+o|0,u=u<<30|u>>>2,o=e[15&t]^e[t-5&15]^e[t-11&15]^e[t+3&15],o=o<<1|o>>>31,e[t+3&15]=o,a=(s<<5|s>>>27)+(c^u^i)+a+3395469782+o|0,c=c<<30|c>>>2,o=e[t+1&15]^e[t-4&15]^e[t-10&15]^e[t+4&15],o=o<<1|o>>>31,e[t+4&15]=o,i=(a<<5|a>>>27)+(s^c^u)+i+3395469782+o|0,s=s<<30|s>>>2;t[0]=t[0]+i|0,t[1]=t[1]+a|0,t[2]=t[2]+s|0,t[3]=t[3]+c|0,t[4]=t[4]+u|0}}(),r=new Uint8Array(re),n=new Uint8Array(re);t.length>re&&(e.update(t,0,t.length),t=e.digest());for(let e=0;e<re;e++){const o=e<t.length?t[e]:0;r[e]=54^o,n[e]=92^o}return e.update(r,0,re),{update(t,r,n){e.update(t,r,n)},digest(){const t=e.digest();e.update(n,0,re),e.update(t,0,ne);const o=e.digest();return e.update(r,0,re),o}}}function he(t){return se[t>>>24]<<24|se[t>>>16&255]<<16|se[t>>>8&255]<<8|se[255&t]}function me(t){return t<<24|(65280&t)<<8|t>>>8&65280|t>>>24}function ye(t){return 255&(t<<1^27*(t>>7))}const be=typeof crypto!=U&&typeof crypto.getRandomValues==C,Ee="Invalid password",Se="Invalid authentication code",ge="zipjs-abort-check-password",Ae="Crypto API not supported";function Re(t){if(be)return crypto.getRandomValues(t);throw new Error(Ae)}const De={name:"PBKDF2"},xe=Object.assign({hash:{name:"HMAC"}},De),ze=Object.assign({iterations:1e3,hash:{name:"SHA-1"}},De),Fe=["deriveBits"],Oe=[8,12,16],Ie=[16,24,32],Te=10,Ue=typeof crypto!=U,Ce=Ue&&crypto.subtle;let ke=Ue&&typeof Ce!=U&&typeof Ce.importKey==C&&typeof Ce.deriveBits==C,ve=we;class Me extends TransformStream{constructor({password:t,rawPassword:e,encryptionStrength:r,checkPasswordOnly:n,checkAuthenticationCode:o=!0}){super({start(){_e(this,t,e,r)},async transform(t,e){const r=this,{password:o,strength:i,l:a,ready:s}=r;o?(await async function(t,e,r,n){const o=await Pe(t,e,r,We(n,0,Oe[e])),i=We(n,Oe[e]);if(o[0]!=i[0]||o[1]!=i[1])throw Be(t),new Error(Ee)}(r,i,o,We(t,0,Oe[i]+2)),t=We(t,Oe[i]+2),n?(Be(r),e.error(new Error(ge))):a()):await s;const c=new Uint8Array(t.length-Te-(t.length-Te)%16);e.enqueue(je(r,t,c,0,Te,!0))},async flush(t){const{h:e,m:r,ready:n}=this;if(e){await n;const i=We(r,r.length-Te),a=new Uint8Array(We(r,0,r.length-Te));e.process(a,!0);const s=e.digest();let c=r.length<Te?1:0;for(let t=0;t<Te;t++)c|=s[t]^i[t];if(c&&o)throw new Error(Se);t.enqueue(a)}},cancel(){Be(this)}})}}class Ne extends TransformStream{constructor({password:t,rawPassword:e,encryptionStrength:r}){super({start(){_e(this,t,e,r)},async transform(t,e){const r=this,{password:n,strength:o,l:i,ready:a}=r;let s=N;n?(s=await async function(t,e,r){const n=Re(new Uint8Array(Oe[e]));return Pt(n,await Pe(t,e,r,n))}(r,o,n),i()):await a;const c=new Uint8Array(s.length+t.length-t.length%16);c.set(s,0),e.enqueue(je(r,t,c,s.length,0,!1))},async flush(t){const{h:e,m:r,ready:n}=this;if(e){await n;const o=new Uint8Array(r);e.process(o,!1);const i=We(e.digest(),0,Te);t.enqueue(Pt(o,i))}},cancel(){Be(this)}})}}function _e(t,e,r,n){Object.assign(t,{ready:new Promise(e=>t.l=e),password:Le(e,r),strength:n-1,m:N})}function je(t,e,r,n,o,i){const{h:a,m:s}=t;s.length&&(e=Pt(s,e));const c=e.length-o,u=c-c%16;if(r=function(t,e){if(e&&e>t.length){const r=t;(t=new Uint8Array(e)).set(r,0)}return t}(r,n+u),u){const t=We(r,n,n+u);t.set(We(e,0,u)),a.process(t,i)}return t.m=We(e,u),r}function Be({h:t}){t&&t.dispose&&t.dispose()}async function Pe(t,e,r,n){t.password=null;const o=Ie[e],i=await async function(t,e,r){if(ke)try{const n=await Ce.importKey("raw",t,xe,!1,Fe);return new Uint8Array(await Ce.deriveBits(Object.assign({salt:e},ze),n,8*r))}catch{ke=!1}return function(t,e,r,n){const o=pe(t),i=new Uint8Array(n),a=new Uint8Array(e.length+4),s=new DataView(a.buffer);a.set(e);for(let t=1,r=0;r<n;t++,r+=ne){s.setUint32(e.length,t),o.update(a,0,a.length);let c=o.digest();const u=c.slice();for(let t=1;t<1e3;t++){o.update(c,0,ne),c=o.digest();for(let t=0;t<ne;t++)u[t]^=c[t]}i.set(u.subarray(0,Math.min(ne,n-r)),r)}return i}(t,e,0,r)}(r,n,2*o+2);return t.h=ve(We(i,0,o),We(i,o,2*o)),We(i,2*o)}function Le(t,e){return e===I?ee(t):e}function We(t,e,r){return t.subarray(e,r)}class Ze extends TransformStream{constructor({password:t,rawPassword:e,passwordVerification:r,checkPasswordOnly:n}){super({start(){He(this,t,e,r)},transform(t,e){const r=this;if(r.password||r.rawPassword){const e=Ge(r,t.subarray(0,12));if(r.password=r.rawPassword=null,0!=(e[11]^r.passwordVerification))throw new Error(Ee);t=t.subarray(12)}n?e.error(new Error(ge)):e.enqueue(Ge(r,t))}})}}class Ve extends TransformStream{constructor({password:t,rawPassword:e,passwordVerification:r}){super({start(){He(this,t,e,r)},transform(t,e){const r=this;let n,o;if(r.password||r.rawPassword){r.password=r.rawPassword=null;const e=Re(new Uint8Array(12));e[11]=r.passwordVerification,n=new Uint8Array(t.length+e.length),n.set(Ye(r,e),0),o=12}else n=new Uint8Array(t.length),o=0;n.set(Ye(r,t),o),e.enqueue(n)}})}}function He(t,e,r,n){Object.assign(t,{password:e,rawPassword:r,passwordVerification:n}),function(t,e,r){const n=[305419896,591751049,878082192];if(Object.assign(t,{keys:n,S:new Qt(n[0]),A:new Qt(n[2])}),r)for(let e=0;e<r.length;e++)qe(t,r[e]);else for(let r=0;r<e.length;r++)qe(t,e.charCodeAt(r))}(t,e,r)}function Ge(t,e){const r=new Uint8Array(e.length);for(let n=0;n<e.length;n++)r[n]=Ke(t)^e[n],qe(t,r[n]);return r}function Ye(t,e){const r=new Uint8Array(e.length);for(let n=0;n<e.length;n++)r[n]=Ke(t)^e[n],qe(t,e[n]);return r}function qe(t,e){let[,r]=t.keys;t.S.append([e]);const n=~t.S.get();r=$e(Math.imul($e(r+Xe(n)),134775813)+1),t.A.append([r>>>24]);const o=~t.A.get();t.keys=[n,r,o]}function Ke(t){const e=2|t.keys[2];return Xe(Math.imul(e,1^e)>>>8)}function Xe(t){return 255&t}function $e(t){return 4294967295&t}function Je(t){if(t instanceof ReadableStream)return t;const e=t.getReader();return new ReadableStream({async pull(t){const{value:r,done:n}=await e.read();n?t.close():t.enqueue(r)},cancel:t=>e.cancel(t)})}function Qe(t,e){t=Je(t);const r=e?{type:e}:{};if(typeof Blob.prototype.stream!=C||new Blob([]).stream()instanceof ReadableStream)return new Response(t).blob().then(t=>e?new Blob([t],r):t);const n=[];return t.pipeTo(new WritableStream({write(t){n.push(t)}})).then(()=>new Blob(n,r))}function tr(t){if(t instanceof WritableStream)return t;const e=t.getWriter();return new WritableStream({write:t=>e.write(t),close:()=>e.close(),abort:t=>e.abort(t)})}const er="Invalid codec definition",rr="Reserved compression method",nr="Invalid codec module",or="Compression method not supported",ir=[0,8,9,99],ar=new Map,sr=new Map;function cr(t={}){const{compressionMethod:r,format:n,codecURI:o,CompressionStream:i,DecompressionStream:a,versionNeeded:s}=t;if(!Number.isInteger(r)||r<0||r>e||typeof n!=v||!n.length)throw new Error(er);if(ir.includes(r))throw new Error(rr);const c=typeof i==C||typeof a==C;if(!(c||typeof o==v&&o.length))throw new Error(er);ar.set(r,{compressionMethod:r,format:n,codecURI:o,versionNeeded:s}),c&&wr(n,{CompressionStream:i,DecompressionStream:a})}function ur(t){const e=ar.get(t);if(e){let r;ar.delete(t),ar.forEach(t=>r=r||t.format==e.format),r||sr.delete(e.format)}}function lr(t){return ar.get(t)}function fr(){return Array.from(ar.values(),t=>Object.assign({},t,sr.get(t.format)))}function dr(t){return sr.get(t)}function wr(t,e){const{CompressionStream:r,DecompressionStream:n}=e;if(typeof r!=C&&typeof n!=C)throw new Error(nr);sr.set(t,{CompressionStream:r,DecompressionStream:n})}const pr="Invalid uncompressed size",hr="Invalid compressed data",mr="Invalid CRC32",yr="deflate-raw",br="deflate64-raw",Er="gzip",Sr=[31,139,8];class gr extends TransformStream{constructor(t,{chunkSize:e,CompressionStreamFallback:r,CompressionStream:n}){super({});const{compressed:o,encrypted:i,useCompressionStream:a,zipCrypto:s,computeCrc32:c,level:u,deflate64:l,format:f,compressionMethod:d,inputSize:w}=t,p=this;let h,m,y,b=super.readable;const E=f&&dr(f),S=function(t,e,r){return t&&e?e:r&&r.R?r:void 0}(a,n,r),g=c&&o&&!l&&!E&&(!i||s)&&Boolean(S);if(i&&!s||!c||g||(h=new te,b=Tr(b,h)),o)if(E)b=Ur(b,Or(E.CompressionStream,f,{level:u,chunkSize:e,compressionMethod:d,uncompressedSize:w}));else if(g)y=new Ar,b=Ur(b,new S(Er,{level:u,chunkSize:e})),b=Tr(b,y);else try{b=Ir(b,a,{level:u,chunkSize:e},n,r)}catch(t){let e;try{e=new n(Er)}catch{throw t}b=Ur(b,e),b=Tr(b,new Ar)}i&&(s?b=Tr(b,new Ve(t)):(m=new Ne(t),b=Tr(b,m))),Fr(p,b,()=>{i&&!s||!c||(p.crc32=g?y.crc32:new DataView(h.value.buffer).getUint32(0))})}}class Ar extends TransformStream{constructor(){let t,e=10,r=new Uint8Array(0);super({transform(t,n){if(e){const r=Math.min(e,t.length);if(e-=r,!(t=t.subarray(r)).length)return}const o=r.length+t.length;if(o<=8)return void(r=Pt(r,t));const i=o-8,a=Math.min(i,r.length);n.enqueue(Pt(r.subarray(0,a),t.subarray(0,i-a))),r=Pt(r.subarray(a),t.subarray(i-a))},flush(){const e=Wt(r);t.crc32=e.getUint32(0,!0),t.uncompressedSize=e.getUint32(4,!0)}}),t=this}}class Rr extends TransformStream{constructor(t,{chunkSize:e,DecompressionStreamFallback:r,DecompressionStream:n}){super({});const{zipCrypto:o,encrypted:i,checkCrc32:a,crc32:s,compressed:c,useCompressionStream:u,deflate64:l,format:f,compressionMethod:d,rawBitFlag:w,outputSize:p}=t;let h,m,y,b=super.readable;if(i&&(o?b=Tr(b,new Ze(t)):(m=new Me(t),b=Tr(b,m))),c){const t=f&&dr(f);if(t)b=Ur(b,Or(t.DecompressionStream,f,{chunkSize:e,compressionMethod:d,rawBitFlag:w,uncompressedSize:p}));else try{b=Ir(b,u,{chunkSize:e,deflate64:l},n,r)}catch(t){if(l||p===I)throw t;let e;try{e=new n(Er)}catch{throw t}y=new Qt,b=function(t,e,r,n){let o,i,a,s=0,c=!1;const u=new Promise((t,e)=>{i=t,a=e});u.catch(()=>{}),r||i();const l=new TransformStream({start(t){const e=new Uint8Array(10);e.set(Sr),t.enqueue(e)},transform(t,e){e.enqueue(t)},async flush(t){c=!0,d();try{await u}finally{w()}const e=new Uint8Array(8),o=Wt(e);o.setUint32(0,n.get(),!0),o.setUint32(4,r,!0),t.enqueue(e)},cancel(t){a(t)}}),f=new TransformStream({transform(t,e){n.append(t),s+=t.length,s>=r?i():c&&d(),e.enqueue(t)},cancel(t){a(t)}});return t=Tr(t,l),Tr(t=Ur(t,e),f);function d(){w(),o=setTimeout(()=>a(new Error(pr)),5e3)}function w(){clearTimeout(o)}}(b,e,p,y)}b=function(t){const e=t.getReader();return new ReadableStream({async pull(t){let r;try{r=await e.read()}catch(t){if(t&&t.message)throw t;const e=new Error(hr);throw e.cause=t,e}const{value:n,done:o}=r;o?t.close():t.enqueue(n)},cancel:t=>e.cancel(t)})}(b)}a&&!y&&(h=new te,b=Tr(b,h)),Fr(this,b,()=>{if(a){const t=y?y.get()>>>0:new DataView(h.value.buffer).getUint32(0,!1);if(s!=t)throw new Error(mr)}})}}const Dr=new Map;function xr(t,e){if(!t)return!1;let r=Dr.get(t);r||(r=new Map,Dr.set(t,r));let n=r.get(e);if(n===I){try{new t(e),n=!0}catch{n=!1}r.set(e,n)}return n}function zr(t){return xr(t,yr)}function Fr(t,e,r){e=Tr(e,new TransformStream({flush:r})),Object.defineProperty(t,"readable",{get:()=>e})}function Or(t,e,r){if(!t)throw new Error(or);return new t(e,r)}function Ir(t,e,r,n,o){const i=e&&n?n:o||n,a=r.deflate64?br:yr;let s;try{s=new i(a,r)}catch(t){if(!e||!o||i==o)throw t;s=new o(a,r)}return Ur(t,s)}function Tr(t,e){return Je(t).pipeThrough(e)}function Ur(t,e){const r=e.writable.getWriter(),n=t.getReader();return async function(){try{for(;;){await r.ready;const t=await n.read();if(t.done){await r.close();break}await r.write(t.value)}}catch(t){await async function(t,e){try{await t.abort(e)}catch{}}(r,t),await async function(t,e){try{await t.cancel(e)}catch{}}(n,t)}}(),e.readable}const Cr="data",kr="deflate",vr="inflate";class Mr extends TransformStream{constructor(t,e){super({});const r=this,{codecType:n}=t;let o;n.startsWith(kr)?o=gr:n.startsWith(vr)&&(o=Rr),r.outputSize=0;let i=0;const a=new o(t,e),s=super.readable,c=new TransformStream({transform(t,e){t&&t.length&&(i+=t.length,e.enqueue(t))},flush(){Object.assign(r,{inputSize:i})}}),u=new TransformStream({transform(e,n){if(e&&e.length&&(n.enqueue(e),r.outputSize+=e.length,t.outputSize!==I&&r.outputSize>t.outputSize))throw new Error(pr)},flush(){const{crc32:t}=a;Object.assign(r,{crc32:t,inputSize:i})}});Object.defineProperty(r,"readable",{get:()=>s.pipeThrough(c).pipeThrough(a).pipeThrough(u)})}}class Nr extends TransformStream{constructor(t){const e=[];let r=0,n=0;function o(){const n=new Uint8Array(t);let o=0;for(;o<t;){const r=e[0],i=t-o;r.length<=i?(n.set(r,o),o+=r.length,e.shift()):(n.set(r.subarray(0,i),o),e[0]=r.subarray(i),o+=i)}return r-=t,n}(!Number.isFinite(t)||t<1)&&(t=65536),super({transform(i,a){for(e.push(i),r+=i.length;r>t;)n+=t,a.enqueue(o())},flush(t){r&&(n+=r,t.enqueue(function(t,e){const r=new Uint8Array(e);let n=0;for(const e of t)r.set(e,n),n+=e.length;return r}(e,r)))}}),Object.defineProperty(this,"outputSize",{get:()=>n})}}const _r="Worker startup timeout";let jr,Br,Pr,Lr=()=>{};async function Wr(t){const{CompressionStream:e,CompressionStreamFallback:r}=t;return!(!r||r.R)||!(!zr(e)&&(n=e,!xr(n,Er)))||!!r&&await Zr(t);var n}async function Zr(t){if(Lr)try{return await Lr(t),!0}catch{}return!1}function Vr(t){t.createWorker?Br=!0:jr=!1}class Hr{constructor(t,{readable:e,writable:r},n,o){const{options:i,config:a,D:s,useWebWorkers:c,transferStreams:u,workerURI:l}=n;let{createWorker:f}=n;const{signal:d}=s;return Br&&(f=I),Object.assign(t,{F:!0,O:(t.O||0)+1,readable:e.pipeThrough(new Nr(Ct(a))).pipeThrough(new Gr(s),{signal:d}),writable:r,options:Object.assign({},i),I:n,workerURI:l,createWorker:f,transferStreams:u,terminate:()=>new Promise(e=>{const{T:r,F:n}=t;n?(t.U=t.U||[],t.U.push(e)):(r&&(r.terminate(),t.T=null),e()),t.C=null}),v(){if(t.F){const{U:e,T:r}=t;e&&(t.U=null,r&&(t.M=!0,r.terminate())),t.F=!1;const n=o(t);e&&e.forEach(t=>t(n))}}}),jr===I&&(jr=typeof Worker!=U),(c&&Pr&&(jr&&l||f)?Pr:qr)(t,a)}}class Gr extends TransformStream{constructor({onstart:t,onprogress:e,size:r,onend:n}){let o=0;super({async start(){t&&await Yr(t,r)},async transform(t,n){o+=t.length,e&&await Yr(e,o,r),n.enqueue(t)},async flush(){n&&await Yr(n,o)}})}}async function Yr(t,...e){try{await t(...e)}catch{}}function qr(t,e){return{run:()=>Kr(t,e)}}async function Kr({options:t,readable:e,writable:r,v:n,I:o},i){let a,s,c;try{if(t.compressed&&!t.format){const e=t.codecType.startsWith(kr),r=e?i.CompressionStreamFallback:i.DecompressionStreamFallback,n=e?i.CompressionStream:i.DecompressionStream;t.useCompressionStream?r&&r.R&&!zr(n)&&await u():await u()||r&&!r.R||(t.useCompressionStream=!0)}t.encrypted&&!t.zipCrypto&&await u(),a=new Mr(t,i),s=new Nr(Ct(i)),await e.pipeThrough(a).pipeThrough(s).pipeTo(r,{preventClose:!0,preventAbort:!0});const{crc32:n,inputSize:o,outputSize:c}=a;return{crc32:n,inputSize:o,outputSize:c}}catch(t){if(a){const e=s?s.outputSize:0;if(o.outputSize=e,Zt(t))try{t.outputSize=e}catch{}}throw t}finally{n()}function u(){return c||(c=Zr(i)),c}}const Xr={type:"module"},$r="error";let Jr,Qr,tn,en=!0;try{en=typeof structuredClone==C&&structuredClone(new DOMException("","AbortError")).code!==I}catch{}var rn;function nn(t){const{reader:e}=t;e&&e.releaseLock(),t.reader=null,t.writer=null}function on(t){const{T:e}=t;if(e)try{e.terminate()}catch{}t.C=null}function an(t,e,r,n,o=!0){const{createWorker:i}=r;let a,s,c;if(i)a=i();else if(Qr===I||Jr!==t){const i=typeof t==C;s=i?t(o):t;const u=s.startsWith("data:"),l=s.startsWith("blob:");if(u||l){n===I&&(n=!1),n&&(c=Xr);try{a=new Worker(s,c)}catch(o){if(l)try{URL.revokeObjectURL(s)}catch{}if(i&&l)return an(t,e,r,n,!1);if(n)throw o;return an(t,e,r,!0,!1)}}else{n===I&&(n=!0),n&&(c=Xr);try{s=new URL(s,e)}catch{}try{a=new Worker(s,c)}catch(i){if(n)return an(t,e,r,!1,o);throw i}}Jr=t,Qr=s,tn=c}else a=new Worker(Qr,tn);return a.addEventListener("message",t=>{r.N=!0,sn(r),async function({data:t},e){const{type:r,value:n,messageId:o,result:i,error:a,errorValue:s}=t,{reader:c,writer:u,_:l,j:f,v:d,O:w}=e,p=()=>e.O!=w;try{if(a)h(function(t,e){const{message:r,stack:n,code:o,name:i,outputSize:a,cause:s,codecImportFailed:c}=t;let u;if(e?u=e.value:(u=Object.assign(new Error(r),{stack:n,code:o,name:i}),s&&(u.cause=Object.assign(new Error(s.message),{name:s.name}))),Zt(u))try{a!==I&&(u.outputSize=a),c&&(u.codecImportFailed=!0),e&&(u.name!==i&&(u.name=i),u.code!==o&&(u.code=o))}catch{}return u}(a,s));else{if("pull"==r){const{value:t,done:r}=await c.read();p()||un({type:Cr,value:t,done:r,messageId:o},e)}if(r==Cr){const t=new Uint8Array(n);await u.ready,await u.write(t),p()||un({type:"ack",messageId:o},e)}"close"==r&&function(t){p()||(l(t),m(),d())}(i)}}catch(a){p()||(on(e),h(a))}function h(t){p()||(f(t),m(),Zt(t)&&t.codecImportFailed||d())}function m(){u&&u.releaseLock()}}(t,r)}),a.addEventListener($r,t=>cn(t,r)),a.addEventListener("messageerror",t=>cn(t,r)),a}function sn(t){const{B:e}=t;e&&(clearTimeout(e),t.B=null)}function cn(t,e){t.preventDefault&&t.preventDefault(),sn(e);const{N:r,j:n,writer:o,v:i}=e;on(e),r||(e.T=null);let a=t.error||new Error(t.message||$r);r||(a=Object.assign(new Error(a.message||$r),{P:!0}),e.L=a),n&&(n(a),o&&o.releaseLock(),r&&i())}function un(t,{T:e,writer:r,transferStreams:n,N:o}){try{const{value:r,readable:i,writable:a}=t,s=[];if(r&&(t.value=Lt(r),s.push(t.value.buffer)),n&&en&&o?(i&&s.push(i),a&&s.push(a)):t.readable=t.writable=null,s.length)try{return e.postMessage(t,s),!0}catch{en=!1,t.readable=t.writable=null,e.postMessage(t)}else e.postMessage(t)}catch(t){throw r&&r.releaseLock(),t}}rn=function(t,e){const{baseURI:r,chunkSize:n,workerStartupTimeout:o}=e;let{wasmURI:i}=e;if(!t.C){let a;typeof i==C&&(i=i());try{a=an(t.workerURI,r,t)}catch{return Vr(t),qr(t,e)}Object.assign(t,{T:a,N:!1,M:!1,L:null,C:{run:async()=>{try{return await async function(t,e){if(!t.T){const{L:e}=t;t.L=null;const r=e||new Error(_r);throw r.P=!0,r}let r,n;const o=new Promise((e,o)=>{r=e,n=e=>{const{outputSize:r,I:n}=t;if(n.outputSize=r,Zt(e))try{e.outputSize=r}catch{}o(e)}});Object.assign(t,{reader:null,writer:null,outputSize:0,W:!1,Z:null,_:r,j:n,result:o});const{readable:i,options:a}=t,{writable:s,closed:c,V:u}=function(t,e){const r=new AbortController;let n;const{writable:o,readable:i}=new TransformStream({transform(t,r){e.outputSize+=t.length,r.enqueue(t)}}),a=i.pipeTo(t,{preventClose:!0,preventAbort:!0,signal:r.signal});return a.catch(t=>{n||Object.assign(e,{W:!0,Z:t})}),{writable:o,closed:a,V:()=>{n=!0,r.abort()}}}(t.writable,t);let l;try{l=un({type:"start",options:a,config:e,readable:i,writable:s},t)}catch(e){u();try{await c}catch{}throw t.v(),e}l||Object.assign(t,{reader:i.getReader(),writer:s.getWriter()});const{workerStartupTimeout:f}=e;!t.N&&Number.isFinite(f)&&f>=0&&(t.B=setTimeout(()=>function(t){if(t.B=null,t.N)return;const{j:e,writer:r}=t;if(on(t),t.T=null,e){const t=new Error(_r);t.P=!0,e(t),r&&r.releaseLock()}}(t),f));try{const t=await o;return await d(),await c,t}catch(e){await d(),u();try{await c}catch{}const{outputSize:r,I:n,W:o,Z:i}=t;n.outputSize=r;const a=Zt(e)&&(e.codecImportFailed||e.P),s=o&&!a?i:e;if(Zt(s))try{s.outputSize=r}catch{}throw s}async function d(){if(!l&&!s.locked)try{await s.getWriter().close()}catch{}}}(t,{chunkSize:n,wasmURI:i,baseURI:r,workerStartupTimeout:o})}catch(r){if(r&&r.P)return Vr(t),nn(t),Kr(t,e);if(r&&r.codecImportFailed){if(t.reader)return nn(t),Kr(t,e);t.v()}throw r}}}})}return t.C},Pr=rn;let ln=[];const fn=[];let dn,wn,pn=0;async function hn(t,e){const{options:r,config:n}=e,{transferStreams:o,useWebWorkers:i,useCompressionStream:a,compressed:s,checkCrc32:c,computeCrc32:u,encrypted:l,format:f,codecURI:d}=r,{workerURI:w,createWorker:p,maxWorkers:h}=n;f&&(d&&(r.codecURI=function(t,e){try{return new URL(t,e).toString()}catch{return t}}(d,n.baseURI)),await async function(t,e){!sr.has(t)&&e&&wr(t,await(import(/* webpackIgnore: true */ /* @vite-ignore */e)))}(f,r.codecURI)),e.transferStreams=!f&&(o||o===I&&n.transferStreams);const m=!(s||c||u||l),y=f===I||Boolean(r.codecURI);return e.useWebWorkers=!m&&y&&(i||i===I&&n.useWebWorkers),e.workerURI=e.useWebWorkers&&w?w:I,e.createWorker=e.useWebWorkers&&p?p:I,r.useCompressionStream=a||a===I&&n.useCompressionStream,(await async function(){const r=ln.find(t=>!t.F);if(r)return An(r),new Hr(r,t,e,b);if(ln.length<h){const r={H:pn};return pn++,ln.push(r),new Hr(r,t,e,b)}return new Promise(r=>{fn.push({resolve:r,stream:t,I:e}),wn=n.workerStarvationTimeout,mn()})}()).run();function b(t){if(yn(),t.M)return t.M=!1,En();if(fn.length){const[{resolve:e,stream:r,I:n}]=fn.splice(0,1);e(new Hr(t,r,n,b)),mn()}else t.T?(An(t),function(t,e){const{config:r}=e,{terminateWorkerTimeout:n}=r;Number.isFinite(n)&&n>=0&&(t.G=setTimeout(async()=>{ln=ln.filter(e=>e!=t);try{await t.terminate()}catch{}},n))}(t,e)):ln=ln.filter(e=>e!=t)}}function mn(){!dn&&fn.length&&Number.isFinite(wn)&&wn>=0&&(dn=setTimeout(bn,wn))}function yn(){dn&&(clearTimeout(dn),dn=null)}function bn(){if(dn=null,fn.length){const[{resolve:t,stream:e,I:r}]=fn.splice(0,1);t(new Hr({},e,Sn(r),gn)),mn()}}function En(){const t=fn.splice(0).map(({resolve:t,stream:e,I:r})=>new Promise(n=>{t(new Hr({},e,Sn(r),()=>{gn(),n()}))}));return yn(),Promise.all(t)}function Sn(t){return Object.assign({},t,{useWebWorkers:!1,workerURI:I,createWorker:I})}function gn(){yn(),mn()}function An(t){const{G:e}=t;e&&(clearTimeout(e),t.G=null)}const Rn="\0\u263a\u263b\u2665\u2666\u2663\u2660\u2022\u25d8\u25cb\u25d9\u2642\u2640\u266a\u266b\u263c\u25ba\u25c4\u2195\u203c\xb6\xa7\u25ac\u21a8\u2191\u2193\u2192\u2190\u221f\u2194\u25b2\u25bc !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\u2302\xc7\xfc\xe9\xe2\xe4\xe0\xe5\xe7\xea\xeb\xe8\xef\xee\xec\xc4\xc5\xc9\xe6\xc6\xf4\xf6\xf2\xfb\xf9\xff\xd6\xdc\xa2\xa3\xa5\u20a7\u0192\xe1\xed\xf3\xfa\xf1\xd1\xaa\xba\xbf\u2310\xac\xbd\xbc\xa1\xab\xbb\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255d\u255c\u255b\u2510\u2514\u2534\u252c\u251c\u2500\u253c\u255e\u255f\u255a\u2554\u2569\u2566\u2560\u2550\u256c\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256b\u256a\u2518\u250c\u2588\u2584\u258c\u2590\u2580\u03b1\xdf\u0393\u03c0\u03a3\u03c3\xb5\u03c4\u03a6\u0398\u03a9\u03b4\u221e\u03c6\u03b5\u2229\u2261\xb1\u2265\u2264\u2320\u2321\xf7\u2248\xb0\u2219\xb7\u221a\u207f\xb2\u25a0\xa0".split("");function Dn(t,e){return zn(t,e,!0)}function xn(t){if(!t.some(t=>t>127))return!1;try{return new TextDecoder("utf-8",{fatal:!0}).decode(t),!0}catch{return!1}}function zn(t,e,r){return e&&"cp437"==e.trim().toLowerCase()?function(t){let e="";for(let r=0;r<t.length;r++)e+=Rn[t[r]];return e}(t):new TextDecoder(e,{ignoreBOM:r}).decode(t)}const Fn="HTTP error ",On="HTTP Range not supported",In="HTTP resource changed",Tn="Writer iterator completed too soon",Un="Writer not initialized",Cn="Invalid writer (size must be writable)",kn="Content-Range",vn="Range",Mn="GET",Nn="bytes",_n=16777216,jn="writable",Bn=Symbol();class Pn{constructor(){this.size=0}init(){this.initialized=!0}}class Ln extends Pn{get readable(){return this.createReadable()}createReadable({offset:t=0,size:e,chunkSize:r=Ct(Ut())}={}){const n=this;let o=0;return r=kt(r),new ReadableStream({async pull(i){const a=e===I?r:Math.min(r,e-o),s=await Oo(n,t+o,a);s.length&&(i.enqueue(s),o+=s.length),(e!==I&&o>=e||!s.length&&a)&&i.close()}})}}class Wn extends Pn{constructor(){super();const t=this,e=new WritableStream({write(e){if(!t.initialized)throw new Error(Un);return t.writeUint8Array(Lt(e))}});Object.defineProperty(t,jn,{get:()=>e})}writeUint8Array(){}}class Zn extends Ln{constructor(t){super();let e=t.length;for(;"="==t.charAt(e-1);)e--;const r=t.indexOf(",")+1;Object.assign(this,{Y:t,K:r,size:Math.floor(.75*(e-r))})}readUint8Array(t,e){const{K:r,Y:n}=this,o=new Uint8Array(e),i=4*Math.floor(t/3),a=atob(n.substring(i+r,4*Math.ceil((t+e)/3)+r)),s=t-3*Math.floor(i/4);let c=0;for(let t=s;t<s+e&&t<a.length;t++)o[t-s]=a.charCodeAt(t),c++;return c<o.length?o.subarray(0,c):o}}class Vn extends Wn{constructor(t){super(),Object.assign(this,{contentType:t,data:"data:"+(t||"")+";base64,",X:""})}writeUint8Array(t){const e=this;let r,n=e.X;const o=e.X.length;for(e.X="",r=0;r<3*Math.floor((o+t.length)/3)-o;r++)n+=String.fromCharCode(t[r]);for(;r<t.length;r++)e.X+=String.fromCharCode(t[r]);n.length>2?e.data+=btoa(n):e.X=n+e.X}getData(){return this.data+btoa(this.X)}}let Hn,Gn;class Yn extends Ln{constructor(t){super(),Object.assign(this,{$:t,size:t.size}),Gn||(Gn=(async()=>{try{const t=new Blob([new Uint8Array(3)]).slice(1,2).stream().getReader();let e=0,r=await t.read();for(;!r.done;)e+=r.value.length,r=await t.read();Hn=1==e}catch{Hn=!1}})())}createReadable(t){const{$:e,size:r}=this,{offset:n=0,size:o=r-n}=t||{};if(typeof e.stream==C){if(!n&&o>=r)return Je(e.stream());if(Hn)return Je(e.slice(n,n+o).stream())}return super.createReadable(t)}async readUint8Array(t,e){const r=this,n=t+e,o=!t&&n>=r.size?r.$:r.$.slice(t,n);let i=await o.arrayBuffer();return i.byteLength>e&&(i=i.slice(t,n)),new Uint8Array(i)}}class qn extends Pn{constructor(t){super();const e=this,r=new TransformStream;Object.defineProperty(e,jn,{get:()=>r.writable}),e.contentType=t,e.J=Qe(r.readable,t),e.J.catch(()=>{})}getData(){return this.J}}class Kn extends Yn{constructor(t){super(new Blob([t],{type:"text/plain"}))}}function Xn(t){let e=0;for(let r=0;r<t.length;r++){const n=t.charCodeAt(r);n<128?e+=1:n<2048?e+=2:n<55296||n>=57344?e+=3:n<56320&&56320==(64512&t.charCodeAt(r+1))?(e+=4,r++):e+=3}return e}class $n extends qn{constructor(t){super(),Object.assign(this,{encoding:t,et:!t||"utf-8"==t.toLowerCase()})}async getData(){const{encoding:t,et:e}=this,r=await super.getData();return r.text&&e?r.text():function(t,e){return zn(t,e,!1)}(new Uint8Array(await r.arrayBuffer()),t)}}class Jn extends Ln{constructor(t,e){super(),to(this,t,e)}async init(){await eo(this,ho,lo),super.init()}createReadable(t){const e=this,{useRangeHeader:r,forceRangeRequests:n,size:o}=e;if((r||n)&&o!==I){const{offset:r=0,size:n=o-r}=t||{};if(n>0&&r<o)return function(t,e,r){let n,o=e,i=0,a=r;return new ReadableStream({start:()=>s(),async pull(t){n||await s();const{value:e,done:r}=await n.read();if(r)throw new Error(On);const o=e.length>i?e.subarray(0,i):e;i-=o.length,a-=o.length,o.length&&t.enqueue(o),i||(await async function(){const t=n;n=I,await t.cancel()}(),a||t.close())},cancel:t=>n&&n.cancel(t)});async function s(){const e=Math.min(t.maximumRangeSize,a),r=await ho(Mn,t,co(t,o,e));if(206!=r.status)throw new Error(On);const s=no(r);if(s!==I&&s!=o)throw new Error(On);so(t,r),ao(t,r),o+=e,i=e,n=r.body.getReader()}}(e,r,Math.min(n,o-r))}return super.createReadable(t)}readUint8Array(t,e){return ro(this,t,e,ho,lo)}}class Qn extends Ln{constructor(t,e){super(),to(this,t,e)}async init(){await eo(this,mo,fo),super.init()}readUint8Array(t,e){return ro(this,t,e,mo,fo)}}function to(t,e,r){const{preventHeadRequest:n,useRangeHeader:o,forceRangeRequests:i,combineSizeEocd:a,checkResourceChanges:s=!0,maximumRangeSize:c=_n,fetch:u}=r;delete(r=Object.assign({},r)).preventHeadRequest,delete r.useRangeHeader,delete r.forceRangeRequests,delete r.combineSizeEocd,delete r.checkResourceChanges,delete r.maximumRangeSize,delete r.useXHR,delete r.fetch,Object.assign(t,{url:e,options:r,preventHeadRequest:n,useRangeHeader:o,forceRangeRequests:i,combineSizeEocd:a,checkResourceChanges:s,maximumRangeSize:c,fetch:u})}async function eo(t,e,r){const{url:n,preventHeadRequest:o,useRangeHeader:i,forceRangeRequests:a,combineSizeEocd:s}=t;if(function(t){const{baseURI:e}=Ut(),{protocol:r}=new URL(t,e);return"http:"==r||"https:"==r}(n)&&(i||a)&&(typeof o==U||o)){const n=await e(Mn,t,co(t,s?-65557:void 0)),o=n.headers.get("Accept-Ranges");if(!(a||o&&o.toLowerCase()==Nn))throw new Error(On);{let o;s&&206==n.status&&(o=new Uint8Array(await n.arrayBuffer())),ao(t,n);const i=oo(n);i===I?await po(t,e,r):t.size=i,o&&o.length&&no(n)===t.size-o.length&&(t.nt=o)}}else await po(t,e,r)}async function ro(t,e,r,n,o){const{useRangeHeader:i,forceRangeRequests:a,nt:s,size:c,options:u}=t;if(i||a){if(e>=c||0===r)return N;{if(e+r>c&&(r=c-e),s&&e>=c-s.length){const t=e-(c-s.length);return s.slice(t,t+r)}const o=await n(Mn,t,co(t,e,r));if(206!=o.status)throw new Error(On);const i=no(o);if(i!==I&&i!=e)throw new Error(On);so(t,o),ao(t,o);const a=new Uint8Array(await o.arrayBuffer());if(a.length!=r)throw new Error(On);return a}}{const{data:n}=t;return n||await o(t,u),t.data.subarray(e,e+r)}}function no(t){const e=t.headers.get(kn);if(e){const t=Number(e.trim().split(/[\s-]+/)[1]);if(!Number.isNaN(t))return t}}function oo(t){const e=t.headers.get(kn);if(e){const t=e.trim().split(/\s*\/\s*/)[1];if(t&&"*"!=t){const e=Number(t);if(!Number.isNaN(e))return e}}}function io({headers:t}){return{ot:t.get("Etag")||I,lastModified:t.get("Last-Modified")||I}}function ao(t,e){const{checkResourceChanges:r,it:n}=t;r&&!n&&206==e.status&&(t.it=io(e))}function so(t,e){const{checkResourceChanges:r,it:n,size:o}=t;if(r){const t=oo(e);if(t!==I&&o!==I&&t!=o)throw new Error(In);if(n){const t=io(e);if(Object.entries(n).some(([e,r])=>r!==I&&t[e]!==I&&r!=t[e]))throw new Error(In)}}}function co(t,e=0,r=1){return Object.assign({},uo(t),{[vn]:Nn+"="+(e<0?e:e+"-"+(e+r-1))})}function uo({options:t}){const{headers:e}=t;if(e)return Symbol.iterator in e?Object.fromEntries(e):e}async function lo(t){await wo(t,ho)}async function fo(t){await wo(t,mo)}async function wo(t,e){const r=await e(Mn,t,uo(t));t.data=new Uint8Array(await r.arrayBuffer()),t.size=t.data.length}async function po(t,e,r){if(t.preventHeadRequest)await r(t,t.options);else{const n=await e("HEAD",t,uo(t)),o=n.headers.get("Content-Length");o&&!n.headers.get("Content-Encoding")?t.size=Number(o):await r(t,t.options)}}async function ho(t,{fetch:e=fetch,options:r,url:n},o){const i=await e(n,Object.assign({},r,{method:t,headers:o}));if(i.status>=200&&i.status<=299)return i;throw 416==i.status?new Error(On):new Error(Fn+(i.statusText||i.status))}function mo(t,{url:e},r){return new Promise((n,o)=>{const i=new XMLHttpRequest;if(i.addEventListener("load",()=>{if(i.status>=200&&i.status<=299){const t=[];i.getAllResponseHeaders().trim().split(/[\r\n]+/).forEach(e=>{const r=e.trim().split(/\s*:\s*/);r[0]=r[0].trim().replace(/^[a-z]|-[a-z]/g,t=>t.toUpperCase()),t.push(r)}),n({status:i.status,arrayBuffer:()=>i.response,headers:new Map(t)})}else o(416==i.status?new Error(On):new Error(Fn+(i.statusText||i.status)))},!1),i.addEventListener("error",t=>o(t.detail?t.detail.error:new Error("Network error")),!1),i.open(t,e),r)for(const t of Object.entries(r))i.setRequestHeader(t[0],t[1]);i.responseType="arraybuffer",i.send()})}class yo extends Ln{constructor(t,e={}){super(),Object.assign(this,{url:t,reader:e.useXHR&&!e.fetch?new Qn(t,e):new Jn(t,e)})}set size(t){}get size(){return this.reader.size}async init(){await this.reader.init(),super.init()}createReadable(t){return this.reader.createReadable(t)}readUint8Array(t,e){return this.reader.readUint8Array(t,e)}}class bo extends yo{constructor(t,e={}){super(t,Object.assign({},e,{useRangeHeader:!0}))}}class Eo extends Ln{constructor(t){super(),t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength),Object.assign(this,{st:t,size:t.length})}readUint8Array(t,e){return this.st.slice(t,t+e)}}class So extends Wn{constructor(t){super(),this.ct=t||262144}init(t=0){Object.assign(this,{offset:0,st:new Uint8Array(t>0?t:this.ct)}),super.init()}writeUint8Array(t){const e=this,r=e.offset+t.length;if(r>e.st.length){let t=e.st.length?2*e.st.length:e.ct;for(;t<r;)t*=2;const n=e.st;e.st=new Uint8Array(t),e.st.set(n)}e.st.set(t,e.offset),e.offset+=t.length}getData(){return this.offset===this.st.length?this.st:this.st.slice(0,this.offset)}}class go extends Ln{constructor(t){super(),this.ut=t}async init(){const t=this;t.lt=0;const e=t.ut=await Promise.all(t.ut.map(Fo));t.ft=e.map(e=>{const r=t.size;return t.size+=e.size,r}),super.init()}wt(t){const{ft:e,size:r}=this,n=e[t];return n===I?r:n}async readUint8Array(t,e){const r=this,{ut:n}=this;let o,i=0,a=t;for(;n[i]&&a>=n[i].size;)a-=n[i].size,i++;const s=n[i];if(s){const n=s.size;if(a+e<=n)o=await Oo(s,a,e);else{const i=n-a;o=Pt(await Oo(s,a,i),await r.readUint8Array(t+i,e-i))}}else o=N;return r.lt=Math.max(i,r.lt),o}}class Ao extends Pn{constructor(t,e=4294967295){super();const r=this;let n,o,i;Object.assign(r,{diskNumber:0,diskOffset:0,size:0,maxSize:e,availableSize:e});const a=new WritableStream({async write(e){if(e===Bn)return void(i&&await c());const{availableSize:a}=r;if(i)e.length>=a?(await s(e.subarray(0,a)),await c(),e.length>a&&await this.write(e.subarray(a))):await s(e);else{const{value:a,done:s}=await t.next();if(s&&!a)throw new Error(Tn);n=a,n.size=0,n.maxSize&&(r.maxSize=n.maxSize),r.availableSize=r.maxSize,await zo(n),o=a.writable,i=o.getWriter(),await this.write(e)}},async close(){i&&(await i.ready,await u())},async abort(t){i&&await i.abort(t)}});async function s(t){const e=t.length;e&&(await i.ready,await i.write(t),n.size+=e,r.availableSize-=e)}async function c(){await u(),r.diskOffset+=n.size,r.diskNumber++,i=null,r.availableSize=r.maxSize}async function u(){await i.close()}Object.defineProperty(r,jn,{get:()=>a})}async closeDisk(){const t=this.writable.getWriter();try{await t.ready,await t.write(Bn)}finally{t.releaseLock()}}}class Ro{constructor(t){return Array.isArray(t)&&(t=new go(t)),(t instanceof ReadableStream||typeof t.getReader==C)&&(t={readable:Je(t)}),t}}class Do{constructor(t){t.writable===I&&typeof t.next==C&&(t=new Ao(t)),(t instanceof WritableStream||typeof t.getWriter==C)&&(t={writable:tr(t)});try{t.size=t.size===I?0:t.size}catch{throw new Error(Cn)}return t}}function xo(t){return Boolean(t&&t.getData)}async function zo(t,e){if(!t.init||t.initialized)return Promise.resolve();await t.init(e)}async function Fo(t){return t=new Ro(t),await zo(t),t.size!==I&&t.readUint8Array||(t=new Yn(await Qe(t.readable)),await zo(t)),t}function Oo(t,e,r){return t.readUint8Array(e,r)}function Io(t,e){return t.createReadable?t.createReadable(e):t.readUint8Array?Ln.prototype.createReadable.call(t,e):t.readable}function To(t,e,r){if(!t.some(t=>t.reason==e)){const n={reason:e};r!==I&&(n.filename=r),t.push(n)}}const Uo="filename",Co="rawFilename",ko="comment",vo="rawComment",Mo="uncompressedSize",No="compressedSize",_o="offset",jo="diskNumberStart",Bo="lastModDate",Po="rawLastModDate",Lo="lastAccessDate",Wo="rawLastAccessDate",Zo="creationDate",Vo="rawCreationDate",Ho="internalFileAttributes",Go="externalFileAttributes",Yo="msdosAttributesRaw",qo="msdosAttributes",Ko="msDosCompatible",Xo="zip64",$o="encrypted",Jo="version",Qo="versionMadeBy",ti="zipCrypto",ei="directory",ri="executable",ni="compressionMethod",oi="signature",ii="extraField",ai="unixMode",si="setuid",ci="setgid",ui="sticky",li=[Uo,Co,Mo,No,Bo,Po,ko,vo,Lo,Wo,Zo,Vo,_o,jo,Ho,Go,Yo,qo,Ko,Xo,$o,Jo,Qo,ti,ei,ri,"symlink",ni,oi,"crc32",ii,"extraFieldUnix","extraFieldInfoZip","extraFieldUnixType1","extraFieldPkwareUnix","uid","gid",ai,"unixExternalUpper",si,ci,ui,"bitFlag","rawBitFlag","filenameLength","extraFieldLength","filenameUTF8","commentUTF8","rawExtraField","extraFieldZip64","extraFieldUnicodePath","extraFieldUnicodeComment","extraFieldAES","extraFieldNTFS","extraFieldExtendedTimestamp","extraFieldUSDZ"];class fi{constructor(t){li.forEach(e=>this[e]=t[e])}}const di=new Set([1,h,10,m,28789,25461,y,b,E,22613,13]);function wi(t,e,r){return t?e?12:16+4*r:0}const pi="File format is not recognized",hi="End of central directory not found",mi="End of Zip64 central directory locator not found",yi="Central directory header not found",bi="Local file header not found",Ei="Zip64 extra field not found",Si="File contains encrypted entry",gi="Encryption method not supported",Ai="Split zip file",Ri="Overlapping entry found",Di="Entry data out of bounds",xi="Ambiguous archive",zi="Encrypted central directory is not supported",Fi="Unsafe filename",Oi="Invalid strictness (must be 'strict', 'balanced' or 'tolerant')",Ii="Invalid filenameValidation (must be 'strict', 'balanced' or 'tolerant')",Ti="Invalid maxAppendedDataSize (must be a number greater than or equal to 0)",Ui="64-bit value exceeds Number.MAX_SAFE_INTEGER",Ci="unsorted central directory",ki="unknown version needed to extract",vi="compressed patched data",Mi="malformed extra field",Ni="unknown zip64 extensible data",_i="wrapped entries count",ji="appended data",Bi="prepended data",Pi="prepended central directory",Li="trailing central directory data",Wi="duplicate filename",Zi="mismatched zip64 end of central directory record",Vi="multiple end of central directory records",Hi="mismatched local file header (filename)",Gi="mismatched local file header (general purpose bit flag)",Yi="mismatched local file header (compression method)",qi="mismatched local file header (crc32 or sizes)",Ki=/^[a-zA-Z]:/,Xi=/(^|[\\/])\.\.([\\/]|$)/,$i="utf-8",Ji="cp437",Qi=[[Mo,t],[No,t],[_o,t],[jo,e]],ta={[e]:{ht:_a,bytes:4},[t]:{ht:ja,bytes:8}},ea=BigInt(Number.MAX_SAFE_INTEGER);class ra{constructor(t,e={}){Object.assign(this,{reader:new Ro(t),options:e,yt:{bt:new Set,Et:[],St:[]}})}async*getEntriesGenerator(n={}){const i=this;let{reader:a}=i;if(await zo(a),a.size!==I&&a.readUint8Array||(a=new Yn(await Qe(a.readable)),await zo(a)),a.size<d)throw new Error(pi);const c=i.warnings=[],h=Sa(n,i.options),m=h==rt,y=h!=ot,b=Ra(Ua(i,n,$),h),E=function(t,e){if(t===I)return e;if(!Ea(t))throw new Error(Ii);return t}(Ua(i,n,"filenameValidation"),h),S=Ua(i,n,"normalizeFilename"),{gt:z,At:F}=await Da(a,y,b);if(!z)throw await async function(t){return await ba(t)==o}(a)?new Error(Ai):new Error(hi);y&&F>1&&Ta(Vi);const O=Wt(z);let T=_a(O,12),U=_a(O,16);const C=z.offset,k=Na(O,20),v=C+d+k,M=a.size-v;M>b&&Ta(ji),M>0&&To(c,ji);let _=Na(O,4);const j=a.lt||0;let B,P,L,W,Z,V=Na(O,6),H=Na(O,10),G=0,Y=p;const q=U==t||T==t||H==e||V==e;if(U!=t&&V!=e&&(U+=ya(a,V)),q){const r=z.offset>=w?await Oo(a,z.offset-w,w):N,n=Wt(r);if(r.length==w&&_a(n,0)==l){U=ya(a,_a(n,4))+ja(n,8);let r=await Oo(a,U,p),o=Wt(r);const i=z.offset-w-p;if((r.length<p||_a(o,0)!=u)&&U!=i&&i>=0){const t=U;U=i,U>t&&(G=U-t),r=await Oo(a,U,p),o=Wt(r)}if(r.length<p||_a(o,0)!=u)throw new Error(mi);if(L=!0,W=ja(o,4)>44,W){const t=Math.min(ja(o,4)-44,a.size-U-p);t>0&&(Y+=t,Z=function(t){const e={rawExtensibleData:t};if(t.length>=28){const r=Wt(t),n=Na(r,26);Object.assign(e,{compressionMethod:Na(r,0),compressedSize:ja(r,2),uncompressedSize:ja(r,10),encryptionAlgorithm:Na(r,18),bitLength:Na(r,20),flags:Na(r,22),hashAlgorithm:Na(r,24),hashData:t.subarray(28,28+n)})}return e}(await Oo(a,U+p,t)))}_==e?_=_a(o,16):_!=_a(o,16)&&Ia(m,c,Zi),V==e?V=_a(o,20):V!=_a(o,20)&&Ia(m,c,Zi),H==e?H=ja(o,32):H!=ja(o,32)&&Ia(m,c,Zi),T==t?T=ja(o,40):T!=ja(o,40)&&Ia(m,c,Zi),U=ya(a,V)+ja(o,48)+G}}let K=T;const X=z.offset-(L?Y+w:0);if(U>=a.size&&(G=a.size-U-T-d,U=a.size-T-d),j!=_)throw new Error(Ai);if(U<0)throw new Error(pi);let J=0,Q=await Oo(a,U,T),nt=Wt(Q);if(T){if(Q.length<4)throw new Error(pi);const t=X-T;if(U!=t&&V==_){const e=_a(nt,J)==s||Boolean(Z&&Z.compressedSize)||aa(nt);let r=!e;if(!r&&t>=0&&t+4<=a.size&&(r=_a(Wt(await Oo(a,t,4)),0)==s),r){const r=U;U=t,U>r&&(G+=U-r,B=e),Q=await Oo(a,U,T),nt=Wt(Q)}}}const it=X-U;if(T!=it&&it>=0&&V==_&&(T=it,Q=await Oo(a,U,T),nt=Wt(Q)),U<0||U>=a.size)throw new Error(pi);i.directoryOffset=U,i.directoryLength=K;const at=Ca(i,n,"decryptCentralDirectory");let st,ct;if(at&&H&&Q.length>=4&&_a(nt,0)!=s&&(W||aa(nt))){const t=function(t,e,r){const n=t&&t.compressedSize?t.compressedSize:e;return n>0&&n<=r?n:r}(Z,K,Q.length);ct=Q.subarray(t),Q=await at(Q.subarray(0,t),Z),nt=Wt(Q),K=Q.length,st=!0}Z&&!st&&(Q.length<4||_a(nt,0)==s)&&To(c,Ni),P=U;const ut=Ua(i,n,"filenameEncoding"),lt=Ua(i,n,"commentEncoding"),ft=new Set;let dt,wt=-1;const pt=!m&&!L;!H&&pt&&(H=sa(nt,Q,J),H&&To(c,_i));for(let t=0;t<H;t++){const o=new ia(a,i.options);if(J+f>Q.length||_a(nt,J)!=s){if(0==t&&!st&&(W||aa(nt)))throw new Error(zi);throw new Error(yi)}ua(o,nt,J+6);const u=Boolean(o.bitFlag.languageEncodingFlag),l=J+f,d=l+o.filenameLength+o.extraFieldLength,w=Na(nt,J+4),p=!(w>>8),h=w>>8==3,m=Na(nt,J+32),y=d+m,b=new Uint8Array(Q.subarray(l,y)),z=b.subarray(0,o.filenameLength),F=b.subarray(o.filenameLength+o.extraFieldLength),O=u||!ut&&xn(z),T=u||!lt&&xn(F),U=_a(nt,J+38),C=U&r,k={readOnly:Boolean(1&C),hidden:Boolean(2&C),system:Boolean(4&C),directory:Boolean(16&C),archive:Boolean(32&C)},v=_a(nt,J+42),M=Ca(i,n,"decodeText")||Dn,N=O?$i:ut||Ji,_=T?$i:lt||Ji;let j=M(z,N,tt);if(j===I&&(j=Dn(z,N)),S){const t=S(j);t!==I&&(j=t)}if(Aa(j,E)){const t=new Error(Fi);throw t.filename=j,t}let B=M(F,_,et);B===I&&(B=Dn(F,_)),Object.assign(o,{index:t,Rt:st,versionMadeBy:w,msDosCompatible:p,zip64:!1,compressedSize:0,uncompressedSize:0,Dt:m,offset:v,diskNumberStart:Na(nt,J+34),internalFileAttributes:Na(nt,J+36),externalFileAttributes:U,msdosAttributesRaw:C,msdosAttributes:k,rawFilename:z,filenameUTF8:O,commentUTF8:T,rawExtraField:b.subarray(o.filenameLength,o.filenameLength+o.extraFieldLength),rawComment:F,filename:j,comment:B}),la(o,o,nt,J+6)&&To(c,Mi,j),o.offset+=G;const L=ya(a,o.diskNumberStart)+o.offset;P=Math.min(L,P),L<wt&&To(c,Ci,j),wt=L,(o.version&r)>63&&To(c,ki,j),32&~o.rawBitFlag||To(c,vi,j),ft.has(o.filename)&&(dt=!0),ft.add(o.filename);const Z=o.externalFileAttributes>>16&e;o.unixMode===I&&16877&Z&&(o.unixMode=Z);const V=Boolean(o.unixMode&R),Y=Boolean(o.unixMode&D),q=Boolean(512&o.unixMode),K=40960==((o.unixMode===I?Z:o.unixMode)&g),X=!K&&(o.unixMode!==I?!!(73&o.unixMode):h&&!!(73&Z)),$=o.unixMode!==I&&(o.unixMode&g)==A,rt=(Z&g)==A;Object.assign(o,{setuid:V,setgid:Y,sticky:q,symlink:K,unixExternalUpper:Z,executable:X,directory:$||rt||p&&k.directory||o.filename.endsWith(x),zipCrypto:o.encrypted&&!o.extraFieldAES});const ot=new fi(o);if(ot.getData=(t,e)=>o.getData(t,ot,i.yt,e),ot.arrayBuffer=async t=>{const e=new TransformStream,r=Qe(e.readable).then(t=>t.arrayBuffer());return r.catch(()=>{}),await o.getData(e,ot,i.yt,Object.assign({},t,{preventClose:!1})),r},J=y,t==H-1&&pt){const t=sa(nt,Q,J);t&&(H+=t,To(c,_i))}const{onprogress:it}=n;if(it)try{await it(t+1,H,new fi(o))}catch{}yield ot}let ht=J,mt=ca(Q.subarray(J))||(st?ca(ct):I);if(!mt&&!st){const t=U+J,e=Math.min(X-t,65541);e>=6&&(mt=ca(await Oo(a,t,e)))}mt&&(i.digitalSignature=mt,ht=J+6+mt.length),(J!=K&&ht!=K||!st&&J!=T&&ht!=T)&&Ia(m,c,Li),dt&&Ia(m,c,Wi);const yt=Ua(i,n,"extractPrependedData"),bt=Ua(i,n,"extractAppendedData"),Et=(m||yt)&&H&&4==P&&await async function(t){const e=await ba(t);return e==o||808471376==e}(a)?4:0;return m&&(G||H&&P>Et)&&Ta(Bi),(G||H&&P>4)&&To(c,Bi),B&&To(c,Pi),yt&&(i.prependedData=P>Et?await Oo(a,Et,P-Et):N),i.comment=k?await Oo(a,C+d,k):N,bt&&(i.appendedData=v<a.size?await Oo(a,v,a.size-v):N),!0}async getEntries(t={}){const e=[];for await(const r of this.getEntriesGenerator(t))e.push(r);return e}async close(){const{reader:t}=this;t.readUint8Array||!t.readable||t.readable.locked||await t.readable.cancel()}[_](){return this.close()}}class na{constructor(t={}){let e;const{readable:r,writable:n}=new TransformStream({start(t){e=t}}),o=new ra(r,t),i=o.getEntriesGenerator(),a=new Set;this.readable=new ReadableStream({async pull(t){const{done:e,value:r}=await i.next();if(e)return t.close();const n=function(t,e){const{readable:r,writable:n}=new TransformStream;let o;const i={cancel:async t=>{e.delete(i),await(o?o.cancel(t):r.cancel(t))}};return i.readable=new ReadableStream({async pull(a){o||(o=r.getReader(),e.add(i),async function(){try{await t.getData(n,{preventClose:!1})}catch(t){try{await n.abort(t)}catch{}}finally{e.delete(i)}}());const{done:s,value:c}=await o.read();s?a.close():a.enqueue(c)},cancel:t=>i.cancel(t)},{highWaterMark:0}),i}(r,a),o={...r,readable:n.readable};delete o.getData,Object.defineProperties(o,{localDirectory:{get:()=>r.localDirectory,enumerable:!0},warnings:{get:()=>r.warnings,enumerable:!0}}),t.enqueue(o)},async cancel(t){const r=Array.from(a);a.clear(),e.error(t),await Promise.allSettled(r.map(e=>e.cancel(t))),await Promise.allSettled([i.return(),o.close()])}}),this.writable=n}}async function oa(t,e={}){if(t=new Ro(t),await zo(t),t.size!==I&&t.readUint8Array||(t=new Yn(await Qe(t.readable)),await zo(t)),t.size<d)return!1;const r=Sa(e,{}),n=r!=ot,o=Ra(e[$],r),{gt:i,At:a}=await Da(t,n,o);if(!i||r==rt&&a>1)return!1;const s=Na(Wt(i),20),c=i.offset+d+s;return t.size-c<=o}let ia=class{constructor(t,e){Object.assign(this,{reader:t,options:e})}async getData(t,e,o,a={}){const s=this,c=Ut(),{reader:u,index:l,offset:f,diskNumberStart:d,extraFieldAES:w,extraFieldZip64:p,compressionMethod:h,bitFlag:m,rawBitFlag:y,crc32:b,rawLastModDate:E,uncompressedSize:S,compressedSize:g}=s,{dataDescriptor:A}=m,R=e.localDirectory={},D=e.warnings=[],x=ya(u,d)+f,F=await Oo(u,x,z),O=Wt(F);let T=Ua(s,a,j),U=Ua(s,a,B);const C=ht(Ua(s,a,P)),k=Boolean(C),v=!0===C;if(pt(T,U),T=T&&T.length&&T,U=U&&U.length&&U,w&&99!=w.originalCompressionMethod)throw new Error(or);if(F.length<z||_a(O,0)!=n)throw new Error(bi);ua(R,O,4);const{extraFieldLength:M,filenameLength:_}=R,G=R.dataOffset=x+z+_+M,Y=Ua(s,a,"checkLocalDirectory"),q=Sa(a,s.options),K=function(t,e){return t===I?e!=ot:Boolean(t)}(Y,q),X=Ua(s,a,"checkLocalFilename"),$=function(t,e){return t===I?e==rt:Boolean(t)}(X===I?Y:X,q);let J=N;if($&&(_||M)){const t=await Oo(u,x+z,_+M);J=t.subarray(0,_),R.rawExtraField=t.subarray(_)}else R.rawExtraField=M?await Oo(u,x+z+_,M):N;$&&(R.rawFilename=J),la(s,R,O,4,!0)&&To(D,Mi),function(t,e,r,n,o){const{rawFilename:i}=t,a=!o,s=t.Rt&&!(8192&~e.rawBitFlag);!n||s||r.length==i.length&&!r.some((t,e)=>t!=i[e])||Ia(a,o,Hi),(2057&e.rawBitFlag)!=(2057&t.rawBitFlag)&&Ia(a,o,Gi),e.compressionMethod!=t.compressionMethod&&Ia(a,o,Yi),e.bitFlag.dataDescriptor||s||!(e.crc32||e.compressedSize||e.uncompressedSize)||e.crc32==t.crc32&&e.compressedSize==t.compressedSize&&e.uncompressedSize==t.uncompressedSize||Ia(a,o,qi)}(s,R,J,$,K?I:D);const{lastAccessDate:Q,creationDate:tt,uid:et,gid:nt}=R;Q&&(e.lastAccessDate=Q),tt&&(e.creationDate=tt),et!==I&&e.uid===I&&(e.uid=et),nt!==I&&e.gid===I&&(e.gid=nt);const it=Ua(s,a,"checkPasswordOnly"),at=s.encrypted&&R.encrypted&&(!v||it),st=at&&!w;if(v||(e.zipCrypto=st),at&&!(64&~R.rawBitFlag))throw new Error(gi);const ct=k?I:lr(h);if(0!=h&&8!=h&&9!=h&&!ct&&!k)throw new Error(or);if(at){if(!st&&(w.strength<1||w.strength>3))throw new Error(gi);if(!T&&!U)throw new Error(Si)}if(G+g>u.size)throw new Error(Di);const ut=g,lt=dt(Ua(s,a,L));wt(lt);let ft=Ua(s,a,"checkOverlappingEntry");const mt=Ua(s,a,"checkOverlappingEntryOnly");mt&&(ft=!0);const{onstart:yt,onprogress:bt,onend:Et}=a,St=0!=h&&!k,gt=k?g-wi(at,st,w&&w.strength):S,At=9==h;let Rt=Ua(s,a,Z);At&&(Rt=!1);const Dt=Ua(s,a,"checkCrc32"),xt=(Dt===I?Ua(s,a,"checkSignature"):Dt)&&!k&&(!at||st||w&&1==w.vendorVersion),zt={options:{codecType:vr,password:T,rawPassword:U,zipCrypto:st,encryptionStrength:w&&w.strength,checkCrc32:xt,checkAuthenticationCode:Ua(s,a,"checkAuthenticationCode"),passwordVerification:st&&(A?E>>>8&r:b>>>24&r),outputSize:gt,crc32:b,compressed:St,encrypted:at,useWebWorkers:Ua(s,a,W),useCompressionStream:Rt,transferStreams:Ua(s,a,V),deflate64:At,format:ct?ct.format:I,codecURI:ct?ct.codecURI:I,compressionMethod:h,rawBitFlag:y,checkPasswordOnly:it},config:c,D:{signal:lt,size:ut,onstart:yt,onprogress:bt,onend:Et}};let Ft,Ot,It;ft&&await async function({reader:t,xt:e,index:r,offset:n,crc32:o,compressedSize:a,uncompressedSize:s,dataOffset:c,dataDescriptor:u,extraFieldZip64:l,yt:f}){let d=0;if(u&&(d=l?20:12),d){const r=await Oo(t,c+a,d+4),n=Wt(r);let u=r.length==d+4&&_a(n,0)==i;if(u){const t=ma(n,4,l);(e.encrypted&&!e.zipCrypto||t.crc32==o)&&t.compressedSize==a&&t.uncompressedSize==s?d+=4:u=!1}if(r.length>=d){const t=ma(n,u?4:0,l);t.signature=u,e.localDirectory.dataDescriptor=t}}const w={start:n,end:c+a+d,xt:e},{bt:p,Et:h,St:m}=f;if(!p.has(r)){const t=function(t,e){let r=0,n=t.length;for(;r<n;){const o=r+n>>>1;t[o].start<e.start?r=o+1:n=o}const o=t[r-1],i=t[r];return o&&ha(e,o)?o:i&&ha(e,i)?i:void 0}(h,w)||m.find(t=>ha(w,t));if(t){const e=new Error(Ri);throw e.overlappingEntry=t.xt,e}p.add(r),m.push(w),m.length*m.length>h.length&&(m.sort((t,e)=>t.start-e.start),f.Et=function(t,e){const r=[];let n=0,o=0;for(;n<t.length||o<e.length;)o==e.length||n<t.length&&t[n].start<e[o].start?r.push(t[n++]):r.push(e[o++]);return r}(h,m),m.length=0)}}({reader:u,xt:e,index:l,offset:x,crc32:b,compressedSize:g,uncompressedSize:S,dataOffset:G,dataDescriptor:A||R.bitFlag.dataDescriptor,extraFieldZip64:p||R.extraFieldZip64,yt:o});try{if(!mt){it&&(t=new WritableStream),t=new Do(t),await zo(t,function(t,e,r){return Math.min(t,r?1032*e:e)}(gt,g,St)),({writable:Ft}=t);const e=Je(u.createReadable({offset:G,size:ut})),{outputSize:r}=await hn({readable:e,writable:Ft},zt);if(r!=gt)throw Object.assign(new Error(pr),{outputSize:r});t.size+=r}}catch(e){const{outputSize:r}=zt;if(r!==I?t.size+=r:Zt(e)&&e.outputSize!==I&&(t.size+=e.outputSize),!it||!Zt(e)||e.message!=ge)throw Ot=e,It=!0,e}finally{if((xo(t)||!Ua(s,a,H))&&Ft&&!Ft.locked){const t=Ft.getWriter();if(It)try{await t.abort(Ot)}catch{}else await t.close()}}return it||mt?I:t.getData?t.getData():Ft}};function aa(t){const e=Math.min(t.byteLength,1024)-3;for(let r=0;r<e;r++)if(134630224==_a(t,r))return!0;return!1}function sa(t,e,r){let n=0;for(;r+f<=e.length&&_a(t,r)==s;)r+=f+Na(t,r+28)+Na(t,r+30)+Na(t,r+32),n++;return n%65536?0:n}function ca(t){if(t.length>=6){const e=Wt(t);if(_a(e,0)==a){const r=Na(e,4);if(6+r<=t.length)return new Uint8Array(t.subarray(6,6+r))}}}function ua(t,e,r){const n=t.rawBitFlag=Na(e,r+2),o=!(1&~n),i=_a(e,r+6);Object.assign(t,{encrypted:o,version:Na(e,r),bitFlag:{level:(6&n)>>1,dataDescriptor:!(8&~n),languageEncodingFlag:(n&S)==S},rawLastModDate:i,lastModDate:ka(i),filenameLength:Na(e,r+22),extraFieldLength:Na(e,r+24)})}function la(t,e,r,n,o){const{rawExtraField:i}=e,a=e.extraField=new Map,s=Wt(i);let c=0,u=!1;try{for(;c<i.length;){const t=Na(s,c),e=Na(s,c+2);a.set(t,{type:t,data:i.slice(c+4,c+4+e)}),c+=4+e}}catch{u=!0}c>i.length&&(u=!0);const l=Na(r,n+4);Object.assign(e,{signature:_a(r,n+10),crc32:_a(r,n+10),compressedSize:_a(r,n+14),uncompressedSize:_a(r,n+18)});const f=a.get(1);f&&(function(t,e){e.zip64=!0;const r=Wt(t.data),n=Qi.filter(([t,r])=>e[t]==r),o=n.reduce((t,[,e])=>t+ta[e].bytes,0);if(t.data.length<o)throw new Error(Ei);for(let o=0,i=0;o<n.length;o++){const[a,s]=n[o],c=ta[s];e[a]=t[a]=c.ht(r,i),i+=c.bytes}}(f,e),e.extraFieldZip64=f);const d=a.get(28789);d&&(fa(d,Uo,Co,e,t),e.extraFieldUnicodePath=d);const w=a.get(25461);w&&(fa(w,ko,vo,e,t),e.extraFieldUnicodeComment=w);const p=a.get(h);p&&p.data.length>=7?(function(t,e,r){const n=Wt(t.data),o=Ma(n,4);Object.assign(t,{vendorVersion:Ma(n,0),vendorId:Ma(n,2),strength:o,originalCompressionMethod:r,compressionMethod:Na(n,5)}),e.compressionMethod=t.compressionMethod,1!=t.vendorVersion&&(e.crc32=I)}(p,e,l),e.extraFieldAES=p):e.compressionMethod=l;const S=a.get(13);S&&(da(S,e),e.extraFieldPkwareUnix=S);const g=a.get(22613);g&&(da(g,e),e.extraFieldUnixType1=g);const A=a.get(10);A&&(function(t,e){const r=Wt(t.data);let n,o=4;try{for(;o<t.data.length&&!n;){const e=Na(r,o),i=Na(r,o+2);1==e&&(n=t.data.slice(o+4,o+4+i)),o+=4+i}}catch{}if(n&&24==n.length){const r=Wt(n),o=r.getBigUint64(0,!0),i=r.getBigUint64(8,!0),a=r.getBigUint64(16,!0);Object.assign(t,{rawLastModDate:o,rawLastAccessDate:i,rawCreationDate:a});const s={lastModDate:va(o),lastAccessDate:va(i),creationDate:va(a)};Object.assign(t,s),Object.assign(e,s,{rawLastAccessDate:i,rawCreationDate:a})}}(A,e),e.extraFieldNTFS=A);const R=a.get(E);let D;if(R&&(D=wa(R,e,!1),e.extraFieldUnix=R),!D){const t=a.get(b);t&&(wa(t,e,!0),e.extraFieldInfoZip=t)}const x=a.get(m);x&&(function(t,e,r){if(!t.data.length)return;const n=Wt(t.data),o=Ma(n,0),i=[],a=[];r?(1&~o||(i.push(Bo),a.push(Po)),2&~o||(i.push(Lo),a.push(Wo)),4&~o||(i.push(Zo),a.push(Vo))):t.data.length>=5&&(i.push(Bo),a.push(Po));let s=1;i.forEach((r,o)=>{if(t.data.length>=s+4){const i=_a(n,s);e[r]=t[r]=new Date(1e3*(0|i));const c=a[o];t[c]=i}s+=4})}(x,e,o),e.extraFieldExtendedTimestamp=x);const z=a.get(y);return z&&(e.extraFieldUSDZ=z),u}function fa(t,e,r,n,o){if(t.data.length<5)return void(t.valid=!1);const i=Wt(t.data),a=new Qt;a.append(o[r]);const s=Wt(new Uint8Array(4));s.setUint32(0,a.get(),!0);const c=_a(i,1),u=Ma(i,0);Object.assign(t,{version:u,[e]:Dn(t.data.subarray(5)),valid:1==u&&!o.bitFlag.languageEncodingFlag&&c==_a(s,0)}),t.valid&&(n[e]=t[e],n[e+"UTF8"]=!0)}function da(t,e){if(t.data.length<8)return;const r=Wt(t.data),n={lastAccessDate:new Date(1e3*(0|_a(r,0))),lastModDate:new Date(1e3*(0|_a(r,4)))};t.data.length>=12&&(n.uid=Na(r,8),n.gid=Na(r,10)),Object.assign(t,n),Object.assign(e,n)}function wa(t,e,r){try{const n=Wt(t.data);let o,i;if(r){let e=0;const r=Ma(n,e++),a=Ma(n,e++);o=pa(t.data.subarray(e,e+a)),e+=a;const s=Ma(n,e++);i=pa(t.data.subarray(e,e+s)),Object.assign(t,{version:r,uid:o,gid:i})}else t.data.length>=4&&(o=Na(n,0),i=Na(n,2),Object.assign(t,{uid:o,gid:i}));return o!==I&&(e.uid=o),i!==I&&(e.gid=i),o!==I||i!==I}catch{}}function pa(t){const e=new Uint8Array(4);return e.set(t,0),new DataView(e.buffer,e.byteOffset,4).getUint32(0,!0)}function ha(t,e){return t.start<e.end&&e.start<t.end}function ma(t,e,r){const n=_a(t,e);let o,i;return r?(o=ja(t,e+4),i=ja(t,e+12)):(o=_a(t,e+4),i=_a(t,e+8)),{crc32:n,compressedSize:o,uncompressedSize:i}}function ya(t,e){return t.wt?t.wt(e):0}async function ba(t){return _a(Wt(await Oo(t,0,4)))}function Ea(t){return t===rt||t===nt||t===ot}function Sa(t,e){return ga(t,ga(e,nt))}function ga(t,e){const r=t.strictness;if(r!==I){if(!Ea(r))throw new Error(Oi);return r}const n=t.checkAmbiguity;return n===I?e:n?rt:e==ot?ot:nt}function Aa(t,e){if(e==ot)return!1;const r=t.split("/");return r.length>1&&""===r[r.length-1]&&r.pop(),!!(Xi.test(t)||t.startsWith("/")||t.startsWith("\\")||Ki.test(t))||e==rt&&(r.includes(".")||r.includes("")||t.includes("\0"))}function Ra(t,r){if(t!==I){const e=bt(t);if("number"!=typeof e||Number.isNaN(e)||e<0)throw new Error(Ti);return e}return r==rt?0:r==ot?1/0:e}async function Da(t,e,r){const{size:n}=t,o=Math.min(n,65557),i={count:64};let a,s,c=0;for await(const[r,u,l,f,w]of xa(t,o)){const o=Na(r,f+20);if(w+d+o==n){const o=await Fa(t,r,u,f,w,n,i);if(2==o){if(a||(a=za(l,f,w)),c++,!e||c>1)break}else 1!=o||s||(s=za(l,f,w))}}return a||(a=s),a||(a=await async function(t,e,r){const{size:n}=t,o=Math.min(n,e==1/0?n:65557+e);let i,a;for await(const[e,s,c,u,l]of xa(t,o)){const o=za(c,u,l);i||(i=o);const f=await Fa(t,e,s,u,l,n,r);if(2==f)return o;1!=f||a||(a=o)}return a||i}(t,r,i)),{gt:a,At:c}}async function*xa(t,e){const r=t.size-e,n=await Oo(t,r,e),o=Wt(n);for(let t=n.length-d;t>=0;t--)_a(o,t)==c&&(yield[o,r,n,t,r+t])}function za(t,e,r){return{offset:r,buffer:new Uint8Array(t.subarray(e,e+d)).buffer}}async function Fa(r,n,o,i,a,c,u){const f=Na(n,i+10),d=_a(n,i+12),p=_a(n,i+16);if(f==e||d==t||p==t)return await Oa(r,n,o,a-w,c,u)==l?2:0;if(!f&&!d)return 1;const h=Na(n,i+6);for(const t of[a-d,ya(r,h)+p])if(await Oa(r,n,o,t,c,u)==s)return 2;return 0}async function Oa(t,e,r,n,o,i){return n<0||n+4>o?I:n>=r?_a(e,n-r):i.count>0?(i.count--,_a(Wt(await Oo(t,n,4)),0)):I}function Ia(t,e,r){t?Ta(r):To(e,r)}function Ta(t){const e=new Error(xi);throw e.reason=t,e}function Ua(t,e,r){return e[r]===I?t.options[r]:e[r]}function Ca(t,e,r){return ft(Ua(t,e,r))}function ka(t){const r=(4294901760&t)>>16,n=t&e,o=new Date(1980+((65024&r)>>9),((480&r)>>5)-1,31&r,(63488&n)>>11,(2016&n)>>5,2*(31&n),0);return o<O?O:o}function va(t){return new Date(Number(t/BigInt(1e4)-BigInt(116444736e5)))}function Ma(t,e){return t.getUint8(e)}function Na(t,e){return t.getUint16(e,!0)}function _a(t,e){return t.getUint32(e,!0)}function ja(t,e){const r=t.getBigUint64(e,!0);if(r>ea)throw new Error(Ui);return Number(r)}var Ba=Object.freeze({__proto__:null,ERR_AMBIGUOUS_ARCHIVE:xi,ERR_BAD_FORMAT:pi,ERR_CENTRAL_DIRECTORY_NOT_FOUND:yi,ERR_ENCRYPTED:Si,ERR_ENCRYPTED_CENTRAL_DIRECTORY:zi,ERR_ENTRY_DATA_OUT_OF_BOUNDS:Di,ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND:mi,ERR_EOCDR_NOT_FOUND:hi,ERR_EXTRAFIELD_ZIP64_NOT_FOUND:Ei,ERR_INVALID_AUTHENTICATION_CODE:Se,ERR_INVALID_COMPRESSED_DATA:hr,ERR_INVALID_CRC32:mr,ERR_INVALID_FILENAME_VALIDATION:Ii,ERR_INVALID_MAX_APPENDED_DATA_SIZE:Ti,ERR_INVALID_PASSWORD:Ee,ERR_INVALID_STRICTNESS:Oi,ERR_INVALID_UNCOMPRESSED_SIZE:pr,ERR_LOCAL_FILE_HEADER_NOT_FOUND:bi,ERR_OVERLAPPING_ENTRY:Ri,ERR_SPLIT_ZIP_FILE:Ai,ERR_UNSAFE_FILENAME:Fi,ERR_UNSUPPORTED_COMPRESSION:or,ERR_UNSUPPORTED_ENCRYPTION:gi,ERR_UNSUPPORTED_UINT64:Ui,ERR_WORKER_STARTUP_TIMEOUT:_r,WARNING_APPENDED_DATA:ji,WARNING_COMPRESSED_PATCHED_DATA:vi,WARNING_DUPLICATE_FILENAME:Wi,WARNING_MALFORMED_EXTRA_FIELD:Mi,WARNING_MISMATCHED_LOCAL_FILE_HEADER_BIT_FLAG:Gi,WARNING_MISMATCHED_LOCAL_FILE_HEADER_COMPRESSION_METHOD:Yi,WARNING_MISMATCHED_LOCAL_FILE_HEADER_CRC32_OR_SIZES:qi,WARNING_MISMATCHED_LOCAL_FILE_HEADER_FILENAME:Hi,WARNING_MISMATCHED_ZIP64_END_OF_CENTRAL_DIRECTORY:Zi,WARNING_MULTIPLE_END_OF_CENTRAL_DIRECTORY:Vi,WARNING_PREPENDED_CENTRAL_DIRECTORY:Pi,WARNING_PREPENDED_DATA:Bi,WARNING_TRAILING_CENTRAL_DIRECTORY_DATA:Li,WARNING_UNKNOWN_VERSION:ki,WARNING_UNKNOWN_ZIP64_EXTENSIBLE_DATA:Ni,WARNING_UNSORTED_CENTRAL_DIRECTORY:Ci,WARNING_WRAPPED_ENTRIES_COUNT:_i,ZipReader:ra,ZipReaderStream:na,isZipFile:oa});const Pa="File already exists",La="Zip file comment exceeds 64KB",Wa="Invalid zip file comment (must be a Uint8Array)",Za="File entry comment exceeds 64KB",Va="Invalid file entry comment (must be a string)",Ha="Invalid date (must be a valid Date instance)",Ga="File entry name exceeds 64KB",Ya="Version exceeds 65535",qa="The strength must equal 1, 2, or 3",Ka="Encryption is not supported in USDZ files",Xa="Split zip files are not supported in USDZ files",$a="Encryption is not supported when the 'passThrough' option is set to true (use 'compressed' instead)",Ja="Invalid extra field (must be a Map)",Qa="Invalid extra field type (must be integer 0..65535)",ts="Invalid extra field data (must be a Uint8Array)",es="Extra field data exceeds 64KB",rs=-2147483648,ns=2147483647,os=BigInt(0),is=BigInt("0x7fffffffffffffff"),as="Zip64 is not supported (set the 'zip64' option to 'true')",ss="Undefined uncompressed size",cs="Undefined compression method",us="Undefined CRC32",ls="Undetermined size",fs="Undefined reader",ds="Invalid reader (must be a Reader instance, a ReadableStream instance, or an object with a 'readable' property)",ws="Zip file not empty",ps="Invalid uid (must be integer 0..2^32-1)",hs="Invalid gid (must be integer 0..2^32-1)",ms="Invalid UNIX mode (must be integer 0..65535)",ys="Invalid unixExtraFieldType (must be 'infozip' or 'unix')",bs="uid/gid must be 0..65535 for unixExtraFieldType 'unix' (use 'infozip' for larger ids)",Es="Invalid msdosAttributesRaw (must be integer 0..255)",Ss="Invalid msdosAttributes (must be an object with boolean flags)",gs="Invalid level (must be integer 0..9)",As="Signature data exceeds 64KB",Rs="Invalid entry option (must be an entry returned by ZipReader#getEntries())",Ds="The last modification date of an entry encrypted with ZipCrypto cannot be changed when passThrough is set",xs="compression unavailable",zs="clamped last modification date",Fs=new Uint8Array([7,0,2,0,65,69,3,0,0]),Os="infozip",Is="unix",Ts=[8,9,5,3];let Us=0;const Cs=[];class ks{constructor(t,e={}){t=new Do(t);const{availableSize:r=T,maxSize:n=T}=t,o=r>0&&r!==T&&n>0&&n!==T;if(o&&e[X])throw new Error(Xa);Object.assign(this,{writer:t,zt:o,options:e,Ft:new Map,Ot:new Set,offset:e[K]===I?t.size||t.writable.size||0:e[K],It:e[K]===I?0:e[K]-(t.size||t.writable.size||0),Tt:new Set,Ut:[],warnings:[],Ct:0,kt:0,vt:I,Mt:!1})}prependZip(t){return _s(this,async function(t,e){if(t.Ot.size)throw new Error(ws);await t.Nt(e)}(this,t))}appendZip(t){return _s(this,this.Nt(t))}async Nt(t){const e=this,{Tt:r,Ot:n,Ft:i}=e;for(;r.size;)await Promise.allSettled(Array.from(r));let a;const s=new Promise(t=>a=t);r.add(s);const c=[];let u;try{t=new Ro(t),await zo(t),t.size!==I&&t.readUint8Array||(t=new Yn(await Qe(t.readable)),await zo(t));const{ZipReader:r}=await Promise.resolve().then(function(){return Ba}),a=new r(t),s=await a.getEntries();await a.close(),await zo(e.writer);const{directoryOffset:l}=a;s.forEach(({filename:t})=>{if(n.has(t))throw new Error(Pa);n.add(t),c.push(t)}),e._t=!0;const{jt:f}=e;e.jt=new Promise(t=>u=()=>{e._t=!1,t()}),await f,e.zt&&(delete e.zt,await async function(t){return Wt(await Oo(t,0,4)).getUint32(0,!0)==o}(t)||(await cc(e.writer,ac()),e.offset+=4));const d=await async function(t,e,r,n){const{writer:o}=t,i=new Map;if(o.closeDisk){const a=Array.from(r).sort((t,r)=>ic(e,t)-ic(e,r));let s=0;for(const r of a){const n=ic(e,r);await nc(t,e,s,n-s),tc(o,await oc(e,n))&&await o.closeDisk(),i.set(r,{offset:ec(t,o),diskNumberStart:Js(o)}),s=n}await nc(t,e,s,n-s)}else{const o=t.offset;await nc(t,e,0,n),r.forEach(t=>i.set(t,{offset:o+ic(e,t),diskNumberStart:0}))}return i}(e,t,s,l);s.forEach(t=>{const{version:e,rawLastModDate:r,rawFilename:n,bitFlag:o,encrypted:a,uncompressedSize:s,compressedSize:c,extraFieldZip64:u}=t;let{compressionMethod:l,rawExtraField:f}=t;const{level:w,languageEncodingFlag:p,dataDescriptor:h}=o;f=rc(f||N),t.extraFieldAES&&(l=99);const m=Dc(f),y=Boolean(u)&&u.uncompressedSize!==I,b=Boolean(u)&&u.compressedSize!==I,E=-7&Fc(w,p,h,a,l)|w<<1,{Bt:S,Pt:g}=xc({version:e,bitFlag:E,compressionMethod:l,uncompressedSize:s,compressedSize:c,rawLastModDate:r,rawFilename:n,Lt:b,Wt:y,extraFieldLength:m}),{crc32:A}=t;A!==I&&gc(g,10,A);const{offset:R,diskNumberStart:D}=d.get(t);Object.assign(t,{Zt:!0,Wt:y,Lt:b,offset:R,diskNumberStart:D,Vt:!1,Ht:N,Gt:N,Yt:N,qt:N,Kt:N,rawExtraField:f,Xt:N,Bt:S,Pt:g}),i.set(t.filename,t)})}catch(t){throw c.forEach(t=>n.delete(t)),t}finally{a(),r.delete(s),u&&u()}}add(e="",n,o={}){const i=this,{Tt:a}=i,s=async function(e,n,o,i){const a=(i=Object.assign({},i))[Q];if(a!==I){const{$t:t,Jt:r}=Ps(a,ht(wc(e,i,P)),wc(e,i,Bo));delete i[Q],i=Object.assign(t,r,i)}if(wc(e,i,ei)&&!n.endsWith(x)&&(n+=x),e.Ot.has(n))throw new Error(Pa);e.Ot.add(n),Us<Ut().maxWorkers?Us++:await new Promise(t=>Cs.push(t));try{return await async function(e,n,o,i){const a=Ls(e,n,i);({name:n}=a);const s=Ws(e,n,i),{comment:c}=s,u=i[ii];e.Ft.set(n,I);const l=e.vt,f={};let d,w;s.Qt.keepOrder&&(f.te=new Promise(t=>d=t)),e.vt=f;try{const{Qt:c}=s;0==c.level||c.compressionMethod!==I||c.ee||await Wr(Ut())||(c.level=0,To(e.warnings,xs,n));const u=await async function(t,e,{Qt:r},n){if(r.ee&&!e&&!wc(t,n,ei))throw new Error(fs);let o;if(e){if(e=new Ro(e),await zo(e),!e.readable&&!e.readUint8Array)throw new Error(ds);({size:o}=e)}return Object.assign({reader:e},Vs(t,Boolean(e),o,r,n))}(e,o,s,i);({reader:o}=u);const p=Qs(e.writer),h=Js(e.writer);let m=i.crc32===I?i[oi]:i.crc32;const y=u.Qt.encrypted&&!c.zipCrypto;if(c.ee&&!c.re&&y&&(m=I),c.ee&&o&&!y&&m===I)throw new Error(us);const b=Gs(i=Object.assign({},i,a.Qt,s.Qt,u.Qt,{signature:i[oi],crc32:m,offset:e.offset-p,diskNumberStart:h,[X]:e.options[X]}));b.ne&&To(e.warnings,zs,n);const E=Ks(i),S=Dc(b.oe,E.ie);w=await async function(e,n,o,i,a){const{Ft:s,writer:c}=e,{keepOrder:u,dataDescriptor:l,ae:f,signal:d}=a,{se:w,xt:p,ce:h,ue:m}=i,y=e.options[X];let b,E,S,g,A,R,D,x=p,F=0;const O=u&&h?h.te:I;s.set(n,x);try{a.bufferedWrite||!u||e._t||e.Ct||e.kt||!l&&!f?(b=!0,e.Ct++,D=a.createTempStream?await a.createTempStream():new TransformStream(I,I,{highWaterMark:T}),D.size=0,await zo(c)):(E=!0,e.kt++,D=c,await O,await U()),await zo(D);const p=Qs(c);e.zt&&!b&&await sc(e,c),y&&!b&&Ys(i,e.offset-p);const{oe:h}=w;b||await C();const m=Js(c),S=ec(e,c);if(x.diskNumberStart=m,b||(A=!0,R=c.size,await cc(D,h)),x=await async function(e,n,{diskNumberStart:o,te:i},a,s,c){const{se:u,le:l,fe:f}=a,{Bt:d,Pt:w,lastModDate:p,rawLastModDate:h,encrypted:m,compressed:y,version:b,compressionMethod:E,Ht:S,de:g,Yt:A,we:R,pe:D,qt:x,Kt:z,Gt:F}=u,{ie:O}=l,{rawFilename:T,lastAccessDate:U,creationDate:C,password:k,rawPassword:v,level:M,useUnicodeFileNames:N,zip64:_,Zt:j,Wt:B,Lt:P,zipCrypto:L,dataDescriptor:W,directory:Z,executable:V,versionMadeBy:H,rawComment:G,rawExtraField:Y,Xt:q,useWebWorkers:K,transferStreams:X,onstart:$,onprogress:J,onend:Q,signal:tt,encryptionStrength:et,extendedTimestamp:rt,msDosCompatible:nt,internalFileAttributes:ot,externalFileAttributes:it,uid:at,gid:st,unixMode:ct,symlink:ut,setuid:lt,setgid:ft,sticky:dt,unixExternalUpper:wt,msdosAttributesRaw:pt,msdosAttributes:ht,useCompressionStream:mt,ee:yt,re:bt,format:Et,codecURI:St}=c,gt={te:i,versionMadeBy:H,zip64:_,Zt:j,directory:Boolean(Z),executable:Boolean(V),filenameUTF8:Boolean(N),rawFilename:T,commentUTF8:Boolean(N),rawComment:G,Ht:S,de:g,Yt:A,qt:x,Kt:z,Gt:F,rawExtraField:Y,Xt:q,extendedTimestamp:rt,msDosCompatible:nt,internalFileAttributes:ot,externalFileAttributes:it,diskNumberStart:o,uid:at,gid:st,unixMode:ct,symlink:Boolean(ut),setuid:lt,setgid:ft,sticky:dt,unixExternalUpper:wt,msdosAttributesRaw:pt,msdosAttributes:ht};let{crc32:At,uncompressedSize:Rt}=c,Dt=0;yt||(Rt=0);const{writable:xt}=n;if(e){const o=e.size,i=Je(Io(e,{size:o})),a={options:{codecType:kr,inputSize:o,level:M,rawPassword:v,password:k,encryptionStrength:et,zipCrypto:m&&L,passwordVerification:m&&L&&h>>8&r,computeCrc32:!yt,compressed:y&&!yt,encrypted:m&&!bt,useWebWorkers:K,useCompressionStream:mt,transferStreams:X,format:Et,codecURI:St,compressionMethod:E},config:s,D:{signal:tt,size:o,onstart:$,onprogress:J,onend:Q}};try{const e=await hn({readable:i,writable:xt},a);if(Dt=e.outputSize,n.size+=Dt,yt||(Rt=e.inputSize,m&&!L||(At=e.crc32)),!P&&Dt>=t||!B&&Rt>=t)throw new Error(as)}catch(t){const{outputSize:e}=a;throw e!==I?n.size+=e:Zt(t)&&t.outputSize!==I&&(n.size+=t.outputSize),t}}return function({crc32:t,compressedSize:e,uncompressedSize:r,se:n,le:o},{zip64:i,zipCrypto:a,ee:s,dataDescriptor:c}){const{Pt:u,encrypted:l}=n,{he:f,me:d}=o;l&&!a&&!s||t===I||(gc(u,10,t),c&&gc(f,d,t)),i?c&&(Ac(f,d+4,BigInt(e)),Ac(f,d+12,BigInt(r))):(gc(u,14,e),gc(u,18,r),c&&(gc(f,d+4,e),gc(f,d+8,r)))}({crc32:At,compressedSize:Dt,uncompressedSize:Rt,se:u,le:l},c),W&&await cc(n,O),Object.assign(gt,{uncompressedSize:Rt,compressedSize:Dt,lastModDate:p,rawLastModDate:h,creationDate:C,lastAccessDate:U,encrypted:Boolean(m),zipCrypto:Boolean(L),size:f+Dt,compressionMethod:E,version:b,Bt:d,Pt:w,signature:At,crc32:!m||L||yt?At:I,we:R,pe:D,Wt:B,Lt:P}),gt}(o,D,x,i,Ut(),a),b||(A=!1),s.set(n,x),x.filename=n,b){if(await Promise.all([D.writable.getWriter().close(),O]),await U(),e.zt&&await sc(e,c),g=!0,R=c.size,await C(),x.diskNumberStart=Js(c),x.offset=ec(e,c),y){const t=i.fe;Ys(i,e.offset-Qs(c)),x.size+=i.fe-t}!function({rawFilename:t,encrypted:e,zip64:r,de:n,crc32:o,compressedSize:i,uncompressedSize:a,Wt:s,Lt:c},u,{dataDescriptor:l,ee:f}){if(l||((!e||f&&o!==I)&&gc(u,14,o),c||gc(u,18,i),s||gc(u,22,a)),r&&n){const e=z+Dc(t)+4;Ac(u,e,BigInt(a)),Ac(u,e+8,BigInt(i))}}(x,w.ye,a),await cc(c,w.oe),await uc(D.readable,c,d,t=>F+=t),c.size+=D.size,g=!1}else x.diskNumberStart=m,x.offset=S;return e.offset+=x.size,x}catch(t){if(g||A){if(e.hasCorruptedEntries=!0,t)try{t.corruptedEntry=!0}catch{}e.offset+=c.size-R,b&&(e.offset+=F)}throw s.delete(n),t}finally{if(b&&e.Ct--,E&&e.kt--,m&&m(O),S&&S(),b&&D&&D.dispose)try{await D.dispose()}catch{}}async function U(){e._t=!0;const{jt:t}=e;e.jt=new Promise(t=>S=()=>{e._t=!1,t()}),await t}async function C(){tc(c,Dc(w.oe))&&await c.closeDisk()}}(e,n,o,{se:b,le:E,fe:S,xt:f,ce:l,ue:d},i)}catch(t){throw e.Ft.delete(n),t}finally{d&&d(l&&l.te)}return Object.assign(w,{name:n,comment:c,extraField:u}),new fi(w)}(e,n,o,i)}catch(t){throw e.Ot.delete(n),t}finally{const t=Cs.shift();t?t():Us--}}(i,e,n,o);a.add(s);const c=()=>a.delete(s);return Promise.prototype.then.call(s,c,c),_s(i,s)}remove(t){const{Ot:e,Ft:r}=this;if(typeof t==v&&(t=r.get(t)),t&&t.filename!==I){const{filename:n}=t;if(e.has(n)&&r.has(n))return e.delete(n),r.delete(n),!0}return!1}async close(r=N,n={}){const o=this,{Tt:i,writer:w}=this,{writable:p}=w;if(o.Mt)return Ns(w);if(!(r instanceof Uint8Array))throw new Error(Wa);if(Dc(r)>e)throw new Error(La);for(;i.size;)await Promise.allSettled(Array.from(i));await Promise.allSettled(o.Ut.map(t=>t.be));const h=o.Ut.filter(t=>t.Ee&&!t.Se);if(h.length){const t=h.map(t=>t.error);h.forEach(t=>t.Se=!0);const[e]=t;try{e.entryErrors=t}catch{}throw e}return await async function(r,n,o){const{ge:i,Ae:w}=Xs(r.Ft),{Re:p,De:h,xe:m}=await async function(r,n,o){const{Ft:i,writer:a}=r,c=new Uint8Array(n);await zo(a);let u=0,l=0,d=Js(a),w=Qs(a),p=0;for(const[r,n]of Array.from(i.values()).entries()){const{offset:h,rawFilename:m,Ht:y,Gt:b,Yt:E,qt:S,Kt:g,rawExtraField:A,Xt:R,rawComment:D,versionMadeBy:x,Bt:z,Pt:F,Wt:O,Lt:I,Vt:T,ze:U,internalFileAttributes:C,externalFileAttributes:k,diskNumberStart:v,uncompressedSize:M,compressedSize:N}=n,_=Dc(y,b,E,S,g,A,R),j=f+Dc(m,D)+_;tc(a,u+j-l)&&(await cc(a,c.slice(l,u)),l=u,p=0,await a.closeDisk()),0==r&&(d=Js(a),w=Qs(a)),O||gc(F,18,M),I||gc(F,14,N),(U||T)&&n.version<45&&Sc(F,0,45);const B=$s(j);if(B.Fe(s),B.Oe(x),B.Ie(z.subarray(0,24)),B.Oe(_),B.Oe(Dc(D)),B.Oe(T?e:v),B.Oe(C),B.Fe(k),B.Fe(U?t:h),B.Ie(m),B.Ie(y),B.Ie(b),B.Ie(E),B.Ie(S),B.Ie(g),B.Ie(A),B.Ie(R),B.Ie(D),Rc(c,B.st,u),u+=j,p++,o.onprogress)try{await o.onprogress(r+1,i.size,new fi(n))}catch{}}return await cc(a,l?c.slice(l):c),{Re:{diskNumber:d,diskOffset:w},De:{diskNumber:Js(a),Te:p},xe:c}}(r,i,o),y=await async function(t,r,n){const o=hc(t,n,J);if(o){const n=await o(r),i=Dc(n);if(i>e)throw new Error(As);const s=$s(6+i);s.Fe(a),s.Oe(i),s.Ie(n);const{writer:c}=t;return tc(c,Dc(s.st))&&await c.closeDisk(),await cc(c,s.st),6+i}return 0}(r,m,o);await async function(r,n,o,i){const{writer:a}=r,{Re:s,De:f,Ue:w,Ae:p}=i;let{ge:h}=i,m=r.Ft.size,y=s.diskNumber,b=ec(r,s);const E=Dc(n);if(E>e)throw new Error(La);let S=wc(r,o,Xo),g=Js(a);if(tc(a,(S?98:d)+E)&&g++,b>=t||h>=t||m>=e||g>=e){if(!1===S)throw new Error(as);S=!0}else S===I&&p&&(S=!0);const A=$s(S?98:d);tc(a,Dc(A.st)+E)&&await a.closeDisk(),g=Js(a);let R=g==f.diskNumber?f.Te:0;S&&(A.Fe(u),A.Ce(44),A.Oe(45),A.Oe(45),A.Fe(g),A.Fe(y),A.Ce(R),A.Ce(m),A.Ce(h),A.Ce(b),A.Fe(l),A.Fe(g),A.Ce(BigInt(ec(r,a))+BigInt(h)+BigInt(w)),A.Fe(g+1),wc(r,o,"supportZip64SplitFile",!0)&&(g=e,y=e),R=e,m=e,b=t,h=t),A.Fe(c),A.Oe(g),A.Oe(y),A.Oe(R),A.Oe(m),A.Fe(h),A.Fe(b),A.Oe(E),await cc(a,A.st),E&&await cc(a,n)}(r,n,o,{Re:p,De:h,ge:i,Ue:y,Ae:w})}(o,r,n),o.Mt=!0,!xo(w)&&wc(o,n,H)||await p.getWriter().close(),Ns(w)}[_](){return this.close()}}class vs{constructor(t={}){const{readable:e,writable:r}=new TransformStream;this.readable=e,this.zipWriter=new ks(r,t),this.Tt=new Set}transform(t){const e=this.zipWriter;let r;const{readable:n,writable:o}=new TransformStream({start(t){r=t},flush:()=>{!async function(){try{await e.close()}catch(t){await js(e,t)}}()}});return Bs(this,this.zipWriter.add(t,n),t=>r.error(t)),{readable:this.readable,writable:o}}writable(t){let e;const{readable:r,writable:n}=new TransformStream({start(t){e=t}});return Bs(this,this.zipWriter.add(t,r),t=>e.error(t)),n}async close(t,e={}){const{zipWriter:r}=this,n=(await Promise.allSettled(Array.from(this.Tt))).filter(t=>"rejected"==t.status).map(t=>t.reason);if(n.length){const[t]=n;try{t.entryErrors=n}catch{}throw await js(r,t),t}try{return await r.close(t,e)}catch(t){throw await js(r,t),t}}}class Ms extends Promise{then(t,e){const{ke:r}=this;return r&&(r.Se=!0),super.then(t,e)}}function Ns(t){return t.getData?t.getData():t.writable}function _s(t,e){const r=new Ms((t,r)=>Promise.prototype.then.call(e,t,r)),n={};return r.ke=n,n.be=Promise.prototype.then.call(r,I,t=>Object.assign(n,{Ee:!0,error:t})),t.Ut.push(n),r}async function js(t,e){try{await t.writer.writable.abort(e)}catch{}}function Bs(t,e,r){t.Tt.add(e),e.catch(t=>{try{r(t)}catch{}})}function Ps(t,e,n){if(null===t||typeof t!=k||Array.isArray(t))throw new Error(Rs);const{externalFileAttributes:o,versionMadeBy:i,comment:a,lastModDate:s,rawLastModDate:c,creationDate:u,lastAccessDate:l,uncompressedSize:f,encrypted:d,zipCrypto:w,crc32:p,compressionMethod:h,extraFieldAES:m,extraFieldUnix:y,internalFileAttributes:b,extraField:E,bitFlag:S,directory:g,uid:A,gid:R}=t,D={externalFileAttributes:o,versionMadeBy:i,comment:a,lastModDate:s,creationDate:u,lastAccessDate:l,internalFileAttributes:b,directory:g};S&&S.languageEncodingFlag&&(D[Y]=!0);const x=function(t){if(t){const e=new Map;if(t.forEach((t,r)=>{di.has(r)||e.set(r,t.data)}),e.size)return e}}(E);x&&(D[ii]=x),A===I&&R===I||Object.assign(D,{uid:A,gid:R,unixExtraFieldType:y?Is:Os});const z={};if(e&&!g)if(Object.assign(z,{uncompressedSize:f,crc32:p,compressionMethod:h}),e!==it&&Object.assign(z,{encrypted:d,zipCrypto:w,encryptionStrength:m?m.strength:I}),S&&(z.dataDescriptor=S.dataDescriptor,z[G]=Ts[S.level]),n===I)z.rawLastModDate=c;else if(e!==it&&w&&(!S||S.dataDescriptor)&&n instanceof Date&&function(t){let e=new Date(2e3*Math.ceil(Math.floor(t.getTime()/1e3)/2));return e<O?e=O:e>F&&(e=F),(e.getHours()<<3|e.getMinutes()>>3)&r}(n)!=(c>>>8&r))throw new Error(Ds);return{$t:D,Jt:z}}function Ls(n,o,i){let a=wc(n,i,Ko),s=wc(n,i,Qo,a?20:768);const c=wc(n,i,ri),u=mc(n,i,"uid"),l=mc(n,i,"gid");let f=mc(n,i,ai),d=wc(n,i,"unixExtraFieldType"),w=wc(n,i,si),p=wc(n,i,ci),h=wc(n,i,ui);if(yt(u,t,ps),yt(l,t,hs),yt(f,e,ms),d!==I&&d!==Os&&d!==Is)throw new Error(ys);if(d===Is&&(u!==I&&u>e||l!==I&&l>e))throw new Error(bs);d!==I||u===I&&l===I||(d=Os);let m=mc(n,i,Yo),y=wc(n,i,qo);const b=m!==I||y!==I;if(u!==I||l!==I||f!==I||d||c?(a=!1,s=s&r|768):b&&(a=!0,s&=r),yt(m,r,Es),y&&(typeof y!==k||Array.isArray(y)))throw new Error(Ss);if(s>e)throw new Error(Ya);let E=wc(n,i,Go);const S=E!==I;S||(E=0),!i[ei]&&o.endsWith(x)&&(i[ei]=!0);const z=wc(n,i,ei);if(z?(o.endsWith(x)||(o+=x),S||(E=16,a||(E|=16877<<16))):a||S||(E=c?493<<16:27525120),!a){const t=f!==I||Boolean(w||p||h);f=f===I?E>>16&e:f&e,w?f|=R:w=Boolean(f&R),p?f|=D:p=Boolean(f&D),h?f|=512:h=Boolean(512&f),S&&!t||(z?f=-61441&f|A:f&g||(f|=32768),E=(f&e)<<16|E&e)}({msdosAttributesRaw:m,msdosAttributes:y}=function(t,e){if(t!==I)t&=r;else if(e!==I){const{readOnly:n,hidden:o,system:i,directory:a,archive:s}=e;let c=0;n&&(c|=1),o&&(c|=2),i&&(c|=4),a&&(c|=16),s&&(c|=32),t=c&r}return e===I&&(e={readOnly:Boolean(1&t),hidden:Boolean(2&t),system:Boolean(4&t),directory:Boolean(16&t),archive:Boolean(32&t)}),{msdosAttributesRaw:t,msdosAttributes:e}}(m,y)),b&&(E=E&t|m&r);const F=E>>16&e,O=f!==I&&40960==(f&g);return{name:o,Qt:{versionMadeBy:s,msDosCompatible:Boolean(a),externalFileAttributes:E,unixExternalUpper:F,uid:u,gid:l,unixMode:f,unixExtraFieldType:d,symlink:O,setuid:w,setgid:p,sticky:h,msdosAttributesRaw:m,msdosAttributes:y}}}function Ws(t,r,n){const o=hc(t,n,"encodeText")||ee;let i=o(r,tt);if(i===I&&(i=ee(r)),Dc(i)>e)throw new Error(Ga);const a=n[ko]||"";if(typeof a!=v)throw new Error(Va);let s=o(a,et);if(s===I&&(s=ee(a)),Dc(s)>e)throw new Error(Za);const c=wc(t,n,Jo);if(c!==I&&c>e)throw new Error(Ya);const u=pc(t,n,Bo,new Date),l=wc(t,n,Po),f=pc(t,n,Lo),d=pc(t,n,Zo),w=wc(t,n,Ho,0),p=ht(wc(t,n,P)),h=Boolean(p),m=!0===p,y=wc(t,n,j),b=wc(t,n,B);pt(y,b);const E=mc(t,n,"encryptionStrength",3),S=wc(t,n,ti),g=wc(t,n,"extendedTimestamp",!0),A=wc(t,n,"ntfsTimestamp"),R=wc(t,n,"keepOrder",!0),D=wc(t,n,W),x=wc(t,n,V),z=wc(t,n,"bufferedWrite"),F=hc(t,n,"createTempStream"),O=wc(t,n,"dataDescriptorSignature",!0),T=dt(wc(t,n,L));wt(T);const U=wc(t,n,Y,!zc(i)||!zc(s)),C=wc(t,n,ni),k=h||C===I?I:lr(C);if(!h&&C!==I&&0!==C&&8!==C&&!k)throw new Error(or);let M=mc(t,n,G);if(yt(M,9,gs),t.options[X]){if(y!==I||b!==I)throw new Error(Ka);M===I&&C===I&&(M=0)}h&&(M=bt(n[G]));let N=wc(t,n,Z),_=wc(t,n,q);z&&_===I&&(_=!1),(_===I||S&&!m)&&(_=!0),M!==I&&6!=M&&(N=!1);const H=wc(t,n,Xo);if(!(S||y===I&&b===I||Number.isInteger(E)&&E>=1&&E<=3))throw new Error(qa);const K=Zs(n[ii]),$=Zs(n.localExtraField),J=Zs(n.centralExtraField);return{comment:a,Qt:{rawFilename:i,rawComment:s,version:c,lastModDate:u,rawLastModDate:l,lastAccessDate:f,creationDate:d,internalFileAttributes:w,ee:h,re:m,password:y,rawPassword:b,encryptionStrength:E,zipCrypto:S,extendedTimestamp:g,ntfsTimestamp:A,keepOrder:R,useWebWorkers:D,transferStreams:x,bufferedWrite:z,createTempStream:F,dataDescriptorSignature:O,signal:T,useUnicodeFileNames:U,compressionMethod:C,format:k?k.format:I,codecURI:k?k.codecURI:I,ve:k?k.versionNeeded:I,level:M,useCompressionStream:N,dataDescriptor:_,zip64:H,rawExtraField:K,Me:$,Xt:J}}}function Zs(t){if(!t)return N;if(!(t instanceof Map))throw new Error(Ja);let r=0,n=0;t.forEach((t,n)=>{if(mt(n,e,Qa),!(t instanceof Uint8Array))throw new Error(ts);if(Dc(t)>e)throw new Error(es);r+=4+Dc(t)});const o=new Uint8Array(r),i=Wt(o);return t.forEach((t,e)=>{Sc(i,n,e),Sc(i,n+2,Dc(t)),Rc(o,t,n+4),n+=4+Dc(t)}),o}function Vs(e,r,n,o,i){const{ee:a,re:s,zipCrypto:c,password:u,rawPassword:l,encryptionStrength:f}=o;let{dataDescriptor:d,zip64:w,level:p,compressionMethod:h}=o,m=0,y=0,b=!1;if(a&&r){if(y=i[Mo],y===I)throw new Error(ss);if(h===I)throw new Error(cs)}const E=!0===w,S=wc(e,i,$o);if(r&&s&&!S&&Dc(u,l))throw new Error($a);const g=r&&(Boolean(u&&Dc(u)||l&&Dc(l))||s&&S);r||(p=0,h=0);const A=wi(g,c,f);r&&(a?(i.uncompressedSize=y,m=n===I?yc(y)+A:n+(s?0:A)):n===I?(d=!0,(w||w===I)&&(w=b=!0,m=4294967296)):(i.uncompressedSize=y=n,m=(bc(h,p)?yc(y):y)+A));const R=!(g||r&&(0!==n||a)||bc(h,p));R&&wc(e,i,q)===I&&(d=!1);const D=E||b||y>=t,x=E||m>=t;if(D||x){if(!1===w)throw new Error(as);w=!0}return w=w||!1,{Ne:m,Qt:{dataDescriptor:d,ae:R,zip64:w,Zt:E,_e:b,Wt:D,Lt:x,uncompressedSize:y,level:p,compressionMethod:h,encrypted:g}}}function Hs(e,r,n){const o=e.slice().sort((t,e)=>n?e-t:t-e);let i=r,a=0;for(const e of o){if(i>=t)break;i+=e,a++}return a}function Gs(t){const{rawFilename:r,lastModDate:o,rawLastModDate:i,lastAccessDate:a,creationDate:s,level:c,zip64:u,zipCrypto:l,useUnicodeFileNames:f,dataDescriptor:d,directory:w,rawExtraField:p,Me:y,encryptionStrength:S,extendedTimestamp:g,ntfsTimestamp:A,ee:R,encrypted:D,Wt:x,Lt:T,uncompressedSize:U,_e:C,crc32:k}=t;let{version:v,compressionMethod:M}=t;const _=!w&&bc(M,c);let j;const B=R||!_,P=u&&(t.bufferedWrite||!d||!x&&!T||B&&!C),L=P||u&&d&&(x||T);if(u&&(x||T)){const t=20,e=$s(t);if(e.Oe(1),e.Oe(t-4),j=e.st,P&&(e.Ce(U),B)){const t=wi(D,l,S);e.Ce(R?0:U+t)}}else j=N;let W,Z,V,H,G;if(D&&!l){const t=$s(Dc(Fs)+2);t.Oe(h),t.Ie(Fs),W=t.st,W[8]=S}else W=N;if(g){const t=fc(o),e=(Y=t)>=rs&&Y<=ns;if(e){const e=9+(a?4:0)+(s?4:0),r=$s(e);H=1+(a?2:0)+(s?4:0),G=t,r.Oe(m),r.Oe(e-4),r.je(H),r.Fe(t),a&&r.Fe(dc(fc(a))),s&&r.Fe(dc(fc(s))),V=r.st}else V=N;if(A===I?!e||Boolean(a||s):A)try{const t=lc(o),e=$s(36);e.Oe(10),e.Oe(32),e.Be(4),e.Oe(1),e.Oe(24),e.Ce(t),e.Ce(a?lc(a):t),e.Ce(s?lc(s):t),Z=e.st}catch{Z=N}else Z=N}else Z=V=N;var Y;let q;try{const{uid:r,gid:n,unixExtraFieldType:o}=t;if(o!=Os||r===I&&n===I)if(o!=Is||r===I&&n===I)q=N;else{const t=$s(8);t.Oe(E),t.Oe(4),t.Oe((r===I?0:r)&e),t.Oe((n===I?0:n)&e),q=t.st}else{const t=qs(r===I?0:r),e=qs(n===I?0:n),o=3+t.length+e.length,i=$s(4+o);i.Oe(b),i.Oe(o),i.je(1),i.je(t.length),i.Ie(t),i.je(e.length),i.Ie(e),q=i.st}}catch{q=N}M===I&&(M=_?8:0),v===I&&(v=0!=M||w||D?20:10);const{ve:K}=t;_&&K!==I&&(v=v>K?v:K),u&&(v=v>45?v:45),D&&!l&&(v=v>51?v:51,R&&k!==I&&(W[4]=1),Sc(Wt(W),9,M),M=99);const $=L?Dc(j):0,J=$+Dc(W,V,Z,q,p,y);if(J+(t[X]?67:0)>e)throw new Error(es);const Q=new Date(2e3*Math.ceil(Math.floor(o.getTime()/1e3)/2)),tt=Q<O?O:Q>F?F:Q,et=Dc(V)?new Date(1e3*fc(o)):Dc(Z)?o:tt,{Bt:rt,Pt:nt,rawLastModDate:ot}=xc({version:v,bitFlag:Fc(c,f,d,D,M),compressionMethod:M,uncompressedSize:U,lastModDate:tt,rawLastModDate:i,rawFilename:r,Lt:T,Wt:x,extraFieldLength:J}),it=$s(z+Dc(r)+J),at=it.st,st=Wt(at);return it.Fe(n),it.Ie(rt),it.Ie(r),L&&it.Ie(j),it.Ie(W),it.Ie(V),it.Ie(Z),it.Ie(q),it.Ie(p),it.Ie(y),d&&(T||gc(st,18,0),x||gc(st,22,0)),{oe:at,ye:st,Bt:rt,Pt:nt,lastModDate:et,ne:et===tt&&Q.getTime()!=tt.getTime(),rawLastModDate:ot,encrypted:D,compressed:_,version:v,compressionMethod:M,we:H,pe:G,Ht:N,de:$,Yt:V,qt:Z,Kt:q,Gt:W,extraFieldLength:J}}function Ys(t,e){const{se:r}=t;let{oe:n,extraFieldLength:o}=r,i=64-(e+Dc(n))%64;i<4&&(i+=64);const a=new Uint8Array(i),s=Wt(a);Sc(s,0,y),Sc(s,2,i-4);const c=n;r.oe=n=new Uint8Array(Dc(c)+i),Rc(n,c),Rc(n,a,Dc(c));const u=Wt(n);Sc(u,28,o+i),r.ye=u,t.fe+=i}function qs(t){const e=new Uint8Array(4);Wt(e).setUint32(0,t,!0);let r=4;for(;r>1&&0===e[r-1];)r--;return e.subarray(0,r)}function Ks({zip64:t,dataDescriptor:e,dataDescriptorSignature:r}){let n,o=N,a=0,s=t?20:12;return r&&(s+=4),e&&(o=new Uint8Array(s),n=Wt(o),r&&(a=4,gc(n,0,i))),{ie:o,he:n,me:a}}function Xs(r){let n=0,o=!1;for(const[,i]of r){const{rawFilename:r,Gt:a,rawComment:s,qt:c,Kt:u,rawExtraField:l,Xt:d,we:w,pe:p,Zt:h,uncompressedSize:y,compressedSize:b}=i;let{Wt:E,Lt:S}=i;h||(E&&y<t&&(E=i.Wt=!1),S&&b<t&&(S=i.Lt=!1)),o=o||E||S;const g=i.offset>=t,A=i.diskNumberStart>=e;let R,D;if(g||A||E||S){const t=4+(E?8:0)+(S?8:0)+(g?8:0)+(A?4:0),e=$s(t);e.Oe(1),e.Oe(t-4),E&&e.Ce(y),S&&e.Ce(b),g&&e.Ce(i.offset),A&&e.Fe(i.diskNumberStart),R=e.st}else R=N;if(i.Ht=R,i.ze=g,i.Vt=A,p===I)D=N;else{const t=$s(9);t.Oe(m),t.Oe(5),t.je(w),t.Fe(p),D=t.st}i.Yt=D;const x=Dc(R,a,c,u,D,l,d);if(x>e)throw new Error(es);n+=f+Dc(r,s)+x}return{ge:n,Ae:o}}function $s(t){const e=new Uint8Array(t),r=Wt(e);let n=0;return{st:e,je:t=>{!function(t,e,r){t.setUint8(e,r)}(r,n,t),n+=1},Oe:t=>{Sc(r,n,t),n+=2},Fe:t=>{gc(r,n,t),n+=4},Ce:t=>{Ac(r,n,BigInt(t)),n+=8},Ie:t=>{Rc(e,t,n),n+=Dc(t)},Be:t=>n+=t}}function Js(t){const{diskNumber:e=0}=t;return e}function Qs(t){const{diskOffset:e=0}=t;return e}function tc(t,e){const{availableSize:r=T}=t;return e>r}function ec(t,{diskNumber:e=0,diskOffset:r=0}){return t.offset-r-(e?t.It:0)}function rc(t){const e=Wt(t);let r=0;for(;r+4<=Dc(t);){const n=4+Ec(e,r+2);if(1==Ec(e,r))return rc(Pt(t.subarray(0,r),t.subarray(Math.min(r+n,Dc(t)))));r+=n}return t}async function nc(t,e,r,n){if(n>0){const{writer:o}=t;let i=0;try{await uc(Io(e,{offset:r,size:n}),o,I,t=>i+=t)}catch(e){t.hasCorruptedEntries=!0;try{e.corruptedEntry=!0}catch{}throw e}finally{o.size+=i,t.offset+=i}}}async function oc(t,e){const r=await Oo(t,e,z);if(Dc(r)<z)return z;const n=Wt(r);return z+Ec(n,26)+Ec(n,28)}function ic(t,{offset:e,diskNumberStart:r}){return e+(t.wt?t.wt(r):0)}function ac(){const t=new Uint8Array(4);return gc(Wt(t),0,o),t}async function sc(t,e){delete t.zt,await cc(e,ac()),t.offset+=4}async function cc(t,e){const{writable:r}=t,n=r.getWriter();try{await n.ready,t.size+=Dc(e),await n.write(e)}finally{n.releaseLock()}}async function uc(t,e,r,n){const o=e.writable.getWriter();try{await t.pipeTo(new WritableStream({async write(t){await o.ready,await o.write(t),n(Dc(t))}}),{preventClose:!0,preventAbort:!0,signal:r})}finally{o.releaseLock()}}function lc(t){if(t){const e=(BigInt(t.getTime())+BigInt(116444736e5))*BigInt(1e4);return e<os?os:e>is?is:e}}function fc(t){return Math.floor(t.getTime()/1e3)}function dc(t){return Math.min(ns,Math.max(rs,t))}function wc(t,e,r,n){const o=e[r]===I?t.options[r]:e[r];return o===I?n:o}function pc(t,e,r,n){const o=wc(t,e,r,n);if(null===o)return n;if(o!==I&&(typeof o.getTime!=C||Number.isNaN(o.getTime())))throw new Error(Ha);return o}function hc(t,e,r){return ft(wc(t,e,r))}function mc(t,e,r,n){return bt(wc(t,e,r,n))}function yc(t){return t+5*(Math.floor(t/16383)+1)}function bc(t,e){return t===I?e===I||e>0:0!==t}function Ec(t,e){return t.getUint16(e,!0)}function Sc(t,e,r){t.setUint16(e,r,!0)}function gc(t,e,r){t.setUint32(e,r,!0)}function Ac(t,e,r){t.setBigUint64(e,r,!0)}function Rc(t,e,r){t.set(e,r)}function Dc(...t){let e=0;return t.forEach(t=>t&&(e+=t.length)),e}function xc({version:e,bitFlag:r,compressionMethod:n,uncompressedSize:o,compressedSize:i,lastModDate:a,rawLastModDate:s,rawFilename:c,Lt:u,Wt:l,extraFieldLength:f}){const d=$s(26),w=d.st,p=Wt(w);if(d.Oe(e),d.Oe(r),d.Oe(n),s===I){const t=new Uint32Array(1),e=Wt(t);Sc(e,0,(a.getHours()<<6|a.getMinutes())<<5|a.getSeconds()/2),Sc(e,2,(a.getFullYear()-1980<<4|a.getMonth()+1)<<5|a.getDate()),s=t[0]}return d.Fe(s),d.Be(4),u||i!==I?d.Fe(u?t:i):d.Be(4),l||o!==I?d.Fe(l?t:o):d.Be(4),d.Oe(Dc(c)),d.Oe(f),{Bt:w,Pt:p,rawLastModDate:s}}function zc(t){return t.every(t=>t>=32&&t<=126)}function Fc(t,e,r,n,o){let i=0;return e&&(i|=S),r&&(i|=8),8!=o&&9!=o||(t>=0&&t<=3&&(i|=6),t>3&&t<=5&&(i|=4),9==t&&(i|=2)),n&&(i|=1),i}function Oc(){return"application/octet-stream"}function Ic(){const{CompressionStream:t,DecompressionStream:e,CompressionStreamFallback:r,DecompressionStreamFallback:n}=Ut(),o=[{compressionMethod:0,compression:!0,decompression:!0,registered:!1},{compressionMethod:8,compression:Tc(r,yr)||Tc(t,yr)||Tc(t,Er),decompression:Tc(n,yr)||Tc(e,yr)||Tc(e,Er),registered:!1},{compressionMethod:9,compression:!1,decompression:Tc(n,br)||Tc(e,br),registered:!1}];for(const t of fr()){const e=dr(t.format);o.push({compressionMethod:t.compressionMethod,compression:e?typeof e.CompressionStream==C:I,decompression:e?typeof e.DecompressionStream==C:I,registered:!0})}return o}function Tc(t,e){if(!t)return!1;const{Pe:r}=t;return r?r.includes(e):xr(t,e)}const Uc="2.15.0",Cc=1048576,kc=".zip.js-temp";function vc(t={}){const{thresholdBytes:e=Cc,directoryName:r=kc,getDirectory:n=()=>navigator.storage.getDirectory()}=t;let o;function i(){return o||(o=Promise.resolve(n()).then(t=>t.getDirectoryHandle(r,{create:!0}))),o}return function(){const t=[];let r,n,o,a,s=0,c=!1;const u=new WritableStream({async write(a){c?await o.write(a):(t.push(a),s+=a.length,s>e&&await async function(){const e=await i();r=crypto.randomUUID?crypto.randomUUID():Array.from(crypto.getRandomValues(new Uint8Array(16)),t=>t.toString(16).padStart(2,"0")).join(""),n=await e.getFileHandle(r,{create:!0}),o=(await n.createWritable()).getWriter(),c=!0;for(const e of t)await o.write(e);t.length=0}())},async close(){o&&(await o.close(),o=null)}});let l=0;return{writable:u,readable:new ReadableStream({async pull(e){if(c){if(!a){const t=await n.getFile();a=t.stream().getReader()}const{value:t,done:r}=await a.read();r?e.close():e.enqueue(t)}else l<t.length?e.enqueue(t[l++]):e.close()},async cancel(t){a&&await a.cancel(t)}},{highWaterMark:0}),dispose:async function(){if(o){try{await o.close()}catch{}o=null}if(r){try{const t=await i();await t.removeEntry(r)}catch{}n=r=null}t.length=0}}}}const Mc=1048576;function Nc(t={}){const{thresholdBytes:e=Mc}=t;return function(){const t=[];let r,n,o,i=0,a=!1;const s=new WritableStream({async write(o){a?await r.write(o):(t.push(o),i+=o.length,i>e&&await async function(){const e=new TransformStream;n=Qe(e.readable),r=e.writable.getWriter(),a=!0;for(const e of t)await r.write(e);t.length=0}())},async close(){r&&(await r.close(),r=null)}});let c=0;return{writable:s,readable:new ReadableStream({async pull(e){if(a){if(!o){const t=await n;o=t.stream().getReader()}const{value:t,done:r}=await o.read();r?e.close():e.enqueue(t)}else c<t.length?e.enqueue(t[c++]):e.close()},async cancel(t){o&&await o.cancel(t)}},{highWaterMark:0}),dispose:async function(){if(r){try{await r.abort()}catch{}r=null}n&&(n.catch(()=>{}),n=null),t.length=0}}}}const _c=1048576,jc=".zip.js-temp",Bc="createSyncAccessHandle is only available in dedicated workers";function Pc(t={}){const{thresholdBytes:e=_c,directoryName:r=jc,getDirectory:n}=t;if(!(n||"undefined"!=typeof FileSystemFileHandle&&FileSystemFileHandle.prototype.createSyncAccessHandle))throw new Error(Bc);const o=n||(()=>navigator.storage.getDirectory());let i;function a(){return i||(i=Promise.resolve(o()).then(t=>t.getDirectoryHandle(r,{create:!0}))),i}return function(){const t=[];let r,n,o=0,i=!1,s=0,c=0;const u=new WritableStream({async write(c){i?(n.write(c,{at:s}),s+=c.length):(t.push(c),o+=c.length,o>e&&await async function(){const e=await a();r=crypto.randomUUID?crypto.randomUUID():Array.from(crypto.getRandomValues(new Uint8Array(16)),t=>t.toString(16).padStart(2,"0")).join("");const o=await e.getFileHandle(r,{create:!0});n=await o.createSyncAccessHandle(),i=!0;for(const e of t)n.write(e,{at:s}),s+=e.length;t.length=0}())},close(){n&&n.flush()}});let l=0;const f=new ReadableStream({pull(e){if(i){const t=s-c;if(t<=0)return void e.close();const r=new Uint8Array(Math.min(524288,t)),o=n.read(r,{at:c});o?(c+=o,e.enqueue(r.subarray(0,o))):e.close()}else l<t.length?e.enqueue(t[l++]):e.close()}},{highWaterMark:0});return{writable:u,readable:f,dispose:async function(){if(n){try{n.close()}catch{}n=null}if(r){try{const t=await a();await t.removeEntry(r)}catch{}r=null}t.length=0}}}}try{jt({baseURI:import.meta.url})}catch{}const Lc="deflate",Wc="deflate-raw",Zc="deflate64-raw",Vc="gzip";let Hc,Gc,Yc,qc,Kc;function Xc(t,e,r={}){if(!Hc){const t=new Error("WASM module not loaded");throw t.cause=Kc,t}const n="number"==typeof r.level?r.level:-1,o="number"==typeof r.outBuffer?r.outBuffer:65536,i="number"==typeof r.inBufferSize?r.inBufferSize:65536;return new TransformStream({start(){try{let r;if(this.Le=Gc(o),this.in=Gc(i),this.inBufferSize=i,!this.Le||!this.in)throw new Error("allocation failed");if(t?(this.We=Hc.deflate_process,this.Ze=Hc.deflate_last_consumed,this.Ve=Hc.deflate_end,this.He=Hc.deflate_new(),r=e===Vc?Hc.deflate_init_gzip(this.He,n):e===Wc?Hc.deflate_init_raw(this.He,n):Hc.deflate_init(this.He,n)):e===Zc?(this.We=Hc.inflate9_process,this.Ze=Hc.inflate9_last_consumed,this.Ve=Hc.inflate9_end,this.He=Hc.inflate9_new(),r=Hc.inflate9_init_raw(this.He)):(this.We=Hc.inflate_process,this.Ze=Hc.inflate_last_consumed,this.Ve=Hc.inflate_end,this.He=Hc.inflate_new(),r=e===Wc?Hc.inflate_init_raw(this.He):e===Vc?Hc.inflate_init_gzip(this.He):Hc.inflate_init(this.He)),0!==r)throw new Error("init failed:"+r)}catch(t){throw a(this),t}},transform(t,e){try{const r=t,n=new Uint8Array(qc.buffer),i=this.We,a=this.Ze,s=this.Le;let c=0;for(;c<r.length;){const t=Math.min(r.length-c,32768);if((!this.in||this.inBufferSize<t)&&(this.in&&Yc&&(Yc(this.in),this.in=0),this.in=Gc(t),this.inBufferSize=t,!this.in))throw new Error("allocation failed");n.set(r.subarray(c,c+t),this.in);const u=i(this.He,this.in,t,s,o,0),l=u>>24&255,f=128&l?l-256:l;if(f<0)throw new Error("process error:"+f);const d=16777215&u;d&&e.enqueue(n.slice(s,s+d));const w=a(this.He);if(0===w&&0===d)break;c+=w}}catch(t){a(this),e.error(t)}},flush(t){try{const e=new Uint8Array(qc.buffer),r=this.We,n=this.Le;for(;;){const i=r(this.He,0,0,n,o,4),a=i>>24&255,s=128&a?a-256:a;if(s<0)throw new Error("process error:"+s);const c=16777215&i;if(c&&t.enqueue(e.slice(n,n+c)),1===a||0===c)break}}catch(e){t.error(e)}finally{const e=a(this);0!==e&&t.error(new Error("end error:"+e))}},cancel(){a(this)}});function a(t){let e=0;return t.He&&t.Ve&&(e=t.Ve(t.He)),t.He=0,t.in&&Yc&&Yc(t.in),t.in=0,t.Le&&Yc&&Yc(t.Le),t.Le=0,e}}class $c{constructor(t=Lc,e){return Xc(!0,t,e)}}class Jc{constructor(t=Lc,e){return Xc(!1,t,e)}}$c.R=!0,Jc.R=!0,$c.Pe=[Lc,Wc,Vc],Jc.Pe=[Lc,Wc,Vc,Zc];const Qc=65536;let tu,eu;function ru(t){return new Uint8Array(t.memory.buffer)}let nu,ou=!1;var iu;async function au(){await async function(){await Promise.allSettled([En(),...ln.map(t=>(An(t),t.terminate()))]),jr=I,Br=!1}(),nu=null,ou=!1,Hc=Gc=Yc=qc=Kc=null,tu=null,eu=0}iu=function(t,e){const r=tu;let n=r?function(t,e,r){eu||(eu=t.malloc(Qc));const n=eu?t.aes_hmac_new():0;if(n){const o=ru(t);if(o.set(e,eu),o.set(r,eu+e.length),t.aes_hmac_init(n,eu,e.length,eu+e.length,r.length))return t.aes_hmac_end(n,0),0}return n}(r,t,e):0;if(!n)return we(t,e);const o=eu;return{process(t,e){for(let i=0;i<t.length;i+=Qc){const a=t.subarray(i,i+Qc),s=ru(r);s.set(a,o),r.aes_hmac_process(n,o,a.length,e?1:0),a.set(s.subarray(o,o+a.length))}},digest:()=>(r.aes_hmac_end(n,o),n=0,ru(r).slice(o,o+20)),dispose(){n&&(r.aes_hmac_end(n,0),n=0)}}},ve=iu||we,function({Ge:t}){Lr=t}({Ge:t=>{if(!nu){let{wasmURI:e}=t;typeof e==C&&(e=e()),nu=async function(t,{baseURI:e}){if(!ou)try{await async function(t,e){let r,n;try{try{n=new URL(t,e)}catch{}const o=await fetch(n);r=await o.arrayBuffer()}catch(e){if(!t.startsWith("data:application/wasm;base64,"))throw e;r=function(t){const e=t.split(",")[1],r=atob(e),n=r.length,o=new Uint8Array(n);for(let t=0;t<n;++t)o[t]=r.charCodeAt(t);return o.buffer}(t)}const o=await WebAssembly.instantiate(r);var i;(function(t){if(Hc=t,({malloc:Gc,free:Yc,memory:qc}=Hc),"function"!=typeof Gc||"function"!=typeof Yc||!qc)throw Hc=Gc=Yc=qc=null,new Error("Invalid WASM module")})(o.instance.exports),typeof(i=o.instance.exports).aes_hmac_new==C&&(tu=i,eu=0)}(t,e),ou=!0}catch(t){throw function(t){Kc=t}(t),t}}(e,t).catch(t=>{throw nu=null,t})}return nu}}),jt({CompressionStreamFallback:$c,DecompressionStreamFallback:Jc}),jt({workerURI:new URL("./zip-web-worker.js",import.meta.url).href,wasmURI:new URL("./zip-module.wasm",import.meta.url).href});const su="Entry filename already exists",cu="Duplicate entry filename in the imported zip file",uu='Invalid duplicates option (must be "throw", "keep-first" or "keep-last")',lu="Entry is an ancestor of target entry",fu="Root directory cannot be moved",du="Target entry is not a directory",wu="Parent entry is not a directory",pu="Readable stream already consumed",hu="throw",mu="keep-first",yu="keep-last",bu=new Set([hu,mu,yu]),Eu="Invalid passThrough option (use readerOptions.passThrough or set uncompressedSize for each entry)",Su="Invalid readerOptions (must be an object)",gu="The 'compressed' passThrough option is only supported by Entry#getData() and ZipWriter#add()",Au="zipjs-abort-export";class Ru{constructor(t,e,r,n){const o=this;if(t.root&&n&&n.getChildByName(e))throw new Error(su);r||(r={}),Object.assign(o,{fs:t,name:e,data:r.data,options:r.options&&Object.assign({},r.options),id:t.Ye++,parent:n,children:[],uncompressedSize:r.uncompressedSize||0,qe:r.qe||r.uncompressedSize===I,passThrough:r.passThrough,Ke:r.Ke||new Date}),!n&&t.root||(t.entries[o.id]=o),n&&o.parent.children.push(o)}getFullname(){return this.getRelativeName()}getRelativeName(t=this.fs.root){let e=this.name,r=this.parent;for(;r&&r!=t;)e=(r.name?r.name+"/":"")+e,r=r.parent;return e}isDescendantOf(t){let e=this.parent;for(;e&&e.id!=t.id;)e=e.parent;return Boolean(e)}rename(t){const e=this;let r=e.parent;if(r){const n=$u(t);n&&(t=n.pop(),r=Ju(r,n,e));const o=r.getChildByName(t);if(o&&o!=e)throw new Error(su);r!=e.parent&&(Mu(e),e.parent=r,r.children.push(e),Ku(e.fs,e))}e.name=t}setOptions(t){const e=Object.assign({},this.options,t);this.options=Object.fromEntries(Object.entries(e).filter(([,t])=>t!==I))}}class Du extends Ru{constructor(t,e,r,n){super(t,e,r,n);const o=this;o.Reader=r.Reader,o.Writer=r.Writer,r.getData&&(o.getData=r.getData)}clone(){return new Du(this.fs,this.name,this)}async getData(t,e={}){const r=this;if(!t||t.constructor==r.Writer&&r.data&&function(t,e){const{contentType:r}=t;return r===I||(t.constructor==qn?e.type==r:t.constructor!=Vn||e.startsWith("data:"+(r||"")+";base64,"))}(t,r.data))return r.data;{const n=r.reader=ku(r.Reader,r.data,e),o=r.uncompressedSize||n.size;await Promise.all([zo(n),zo(t,o)]);const i=dt(e.signal),a=function(t,e,r,n){const{onstart:o,onprogress:i,onend:a}=r,{readable:s}=e;return t.data instanceof fi||!o&&!i&&!a?s:Je(s).pipeThrough(new Gr({onstart:o,onprogress:i,onend:a,size:e.size}),{signal:n})}(r,n,e,i),s=!xo(t)&&Boolean(e.preventClose);return r.uncompressedSize=n.size,await Je(a).pipeTo(tr(t.writable),{signal:i,preventClose:s,preventAbort:s}),t.getData?t.getData():t.writable}}isPasswordProtected(){return Boolean(this.data&&this.data.encrypted)}async checkPassword(t,e={}){const r=this;if(!r.isPasswordProtected())return!0;try{return await r.data.getData(null,Object.assign({},e,{password:t,checkPasswordOnly:!0})),!0}catch(t){if(Zt(t)&&t.message==Ee)return!1;throw t}}getText(t,e){return this.getData(new $n(t),e)}getBlob(t,e){return this.getData(new qn(t),e)}getData64URI(t,e){return this.getData(new Vn(t),e)}getUint8Array(t){return this.getData(new So,t)}getWritable(t=new WritableStream,e){return this.getData({writable:t},e)}async getArrayBuffer(t){return Lt(await this.getUint8Array(t)).buffer}replaceBlob(t){Lu(this,{data:t,Reader:Yn,Writer:qn,uncompressedSize:t.size})}replaceText(t){Lu(this,{data:t,Reader:Kn,Writer:$n,uncompressedSize:Xn(t)})}replaceData64URI(t){Lu(this,{data:t,Reader:Zn,Writer:Vn,uncompressedSize:Wu(t)})}replaceUint8Array(t){Lu(this,{data:t,Reader:Eo,Writer:So,uncompressedSize:t.length})}replaceReadable(t){Lu(this,{data:null,Reader:Uu(t),Writer:null,uncompressedSize:I})}}class xu extends Ru{constructor(t,e,r,n){super(t,e,r,n),this.directory=!0}clone(t){const e=this,r=new xu(e.fs,e.name,e);return t&&(r.children=e.children.map(e=>{const n=e.clone(t);return n.parent=r,n})),r}addDirectory(t,e){return Xu(this,t,{options:e},!0)}addText(t,e,r={}){return Xu(this,t,{data:e,Reader:Kn,Writer:$n,options:r,uncompressedSize:Xn(e)})}addBlob(t,e,r={}){return Xu(this,t,{data:e,Reader:Yn,Writer:qn,options:r,uncompressedSize:e.size})}addData64URI(t,e,r={}){return Xu(this,t,{data:e,Reader:Zn,Writer:Vn,options:r,uncompressedSize:Wu(e)})}addUint8Array(t,e,r={}){return Xu(this,t,{data:e,Reader:Eo,Writer:So,options:r,uncompressedSize:e.length})}addHttpContent(t,e,r={}){return Xu(this,t,{data:e,Reader:class extends yo{constructor(t){super(t,r)}},options:r})}addReadable(t,e,r={}){return Xu(this,t,{Reader:Uu(e),options:r})}addFileSystemEntry(t,e={}){return Hu(this,t,e)}addFileSystemHandle(t,e={}){return Hu(this,t,e)}addFile(t,e={}){return(e=Object.assign({},e)).lastModDate||(e.lastModDate=new Date(t.lastModified)),Xu(this,t.name,{data:t,Reader:function(){return{readable:t.stream(),size:t.size}},options:e,uncompressedSize:t.size})}importBlob(t,e){return this.importZip(new Yn(t),e)}importData64URI(t,e){return this.importZip(new Zn(t),e)}importUint8Array(t,e){return this.importZip(new Eo(t),e)}importHttpContent(t,e){return this.importZip(new yo(t,e),e)}importReadable(t,e){return this.importZip({readable:t},e)}exportBlob(t={}){return this.exportZip(new qn(t.mimeType||"application/zip"),t)}exportData64URI(t={}){return this.exportZip(new Vn(t.mimeType||"application/zip"),t)}exportUint8Array(t={}){return this.exportZip(new So,t)}async exportWritable(t=new WritableStream,e={}){return await this.exportZip({writable:t},e),t}exportFileSystemHandle(t,e={}){return async function(t,e,r){const{onstart:n,onprogress:o,onend:i}=r;Pu(r.passThrough);const a=Bu(r.readerOptions),s=new AbortController,{signal:c}=s,u=function(t,e){if(!dt(t))return()=>{};if(t.aborted)return e.abort(t.reason),()=>{};const r=()=>e.abort(t.reason);return t.addEventListener("abort",r,{once:!0}),()=>t.removeEventListener("abort",r)}(r.signal,s),l=Object.assign({},r,a,{signal:c,onstart:I,onprogress:I,onend:I,preventClose:!1}),f=Ou([t],t=>Tu(t,l.passThrough)),d=[];let w=!1,p=0;try{n&&await Yr(n,f),await m(t,e),i&&await Yr(i,p)}catch(t){try{t.exportedEntryNames=d}catch{}throw t}finally{u()}return e;function h(t){const e=t.getWriter();return new WritableStream({async write(t){await e.write(t),p+=t.length,o&&await Yr(o,p,f)},close:()=>e.close(),abort:t=>e.abort(t)})}async function m(t,e){if(r.concurrent){const r=(await Promise.allSettled(t.children.map(t=>y(t,e)))).filter(t=>"rejected"==t.status);if(r.length){const t=r.filter(t=>!Nu(t.reason));throw function(t){const[e]=t,r=t.slice(1).flatMap(t=>[t,...t&&t.entryErrors||[]]).filter(t=>t!==e);if(r.length)try{e.entryErrors=[...e.entryErrors||[],...r]}catch{}return e}((t.length?t:r).map(t=>t.reason))}}else for(const r of t.children)await y(r,e)}async function y(e,r){if(c.aborted){if(w||Nu(c.reason))return;wt(c)}try{if(e.directory){const t=await r.getDirectoryHandle(e.name,{create:!0});await m(e,t)}else{const n=await r.getFileHandle(e.name,{create:!0}),o=await n.createWritable();try{await e.getData({writable:h(o)},l)}catch(t){throw w?new Error(Au):t}d.push(e.getRelativeName(t))}}catch(r){w=!0,s.abort(new Error(Au));try{r.entryName===I&&(r.entryName=e.getRelativeName(t),r.entryId=e.id)}catch{}throw r}}}(this,t,e)}async importZip(t,e={}){let r;t&&typeof t.getEntries==C?(r=t,e=Object.assign({},r.options,e)):(await zo(t),r=new ra(t,e)),Pu(e.passThrough);const n=function(t){if(t===I)return hu;if(bu.has(t))return t;throw new Error(uu)}(e.duplicates),o=[],i=await r.getEntries(e);for(const t of i){let r=this;try{const i=t.filename.split("/").filter(t=>""!=t&&"."!=t),a=i.pop();let s=!1;for(const t of i){const e=r;if(r=r.getChildByName(t),r){if(!r.directory){if(n==mu){s=!0;break}if(n!=yu)throw new Error(cu);this.fs.remove(r),r=new xu(this.fs,t,{data:null},e),o.push(r)}}else r=new xu(this.fs,t,{data:null},e),o.push(r)}if(s)continue;if(t.directory){let e=r;if(a){if(e=r.getChildByName(a),e&&(!e.directory||e.data)){if(n==mu)continue;if(n!=yu)throw new Error(cu);e.directory?e.data=t:(this.fs.remove(e),e=I)}e||(e=new xu(this.fs,a,{data:null},r),o.push(e))}e==this||e.data||(e.data=t)}else{const i=r.getChildByName(a);if(i){if(n==mu)continue;if(n!=yu)throw new Error(cu);this.fs.remove(i)}o.push(Xu(r,a,{data:t,Reader:Cu(Object.assign({},e)),uncompressedSize:e.passThrough?t.compressedSize:t.uncompressedSize,passThrough:e.passThrough}))}}catch(e){o.reverse().forEach(t=>this.fs.remove(t));try{e.cause={entry:t}}catch{}throw e}}return o}async exportZip(t,e={}){const r=this,n=Boolean(t)&&typeof t.add==C;e=Object.assign({},e),n||e.bufferedWrite!==I||(e.bufferedWrite=!0);const[o]=await Promise.all([vu(r,Bu(e.readerOptions)),n?I:zo(t)]),i=n?t:new ks(t,e);return await async function(t,e,r,n,o){const{onstart:i,onprogress:a,onend:s,onentryprogress:c}=n,u=e,l=Ou(e.children,t=>Vu(t)?0:1);let f=0,d=0;if(i&&await Yr(i,r),n.bufferedWrite)await async function t(e){const r=(await Promise.allSettled(e.children.map(async e=>{await w(e),await t(e)}))).find(t=>"rejected"==t.status);if(r)throw r.reason}(e);else for(const t of e.getChildren({recursive:!0}))await w(t);async function w(e){if(Vu(e))return;const{name:i,$t:s}=_u(e,u,n);let w=0;const p=await t.add(i,o.get(e),Object.assign(s,{onstart:I,onend:I,onprogress:async t=>{f+=t-w,w=t,a&&await Yr(a,f,r)}}));d++,c&&await Yr(c,d,l,p)}s&&await Yr(s,f)}(i,r,Ou([r],Iu),e,o),n?i:(await i.close(e.globalComment),t.getData?t.getData():t.writable)}async getExportedSize(r={}){const n=this;Bu((r=Object.assign({},r)).readerOptions),r.bufferedWrite===I&&(r.bufferedWrite=!0);const o=n.getChildren({recursive:!0}),i=o.filter(t=>!Vu(t)).map(t=>{const{name:e,$t:o}=_u(t,n,r);return{name:e,size:t.directory?0:ju(t,Zu(t,r)),options:o}}),a=!r.bufferedWrite||i.every(t=>!1!==t.options.keepOrder)&&o.every(t=>Vu(t)||!t.children.length);return await async function(r,n,o,i){const a={options:r};if(ft(r[J]))throw new Error(ls);if(i!==I&&!(i instanceof Uint8Array))throw new Error(Wa);const s=Dc(i);if(s>e)throw new Error(La);const c=r[X],u=new Map,l=r[K]===I?0:r[K];let f=l,w=T;const p=[],h=new Set;for(const e of n){let{name:r}=e;const{size:n}=e,o=Object.assign({},e.options);wc(a,o,ei)&&!r.endsWith(x)&&(r+=x);const i=Ls(a,r,o);({name:r}=i);const{Qt:s}=Ws(a,r,o);0==s.level||s.compressionMethod!==I||s.ee||await Wr(Ut())||(s.level=0);const l=!wc(a,o,ei);if(l&&n===I)throw new Error(ls);const{Ne:d,Qt:m}=Vs(a,l,n,s,o);if(l&&!s.ee&&bc(m.compressionMethod,m.level))throw new Error(ls);const y=Object.assign({},o,i.Qt,s,m,{[X]:c}),b=Gs(y),E=Ks(y),S={se:b,fe:Dc(b.oe,E.ie)};c&&Ys(S,f);const g=l?d:0;u.set(r,Object.assign({},y,b,{offset:f,diskNumberStart:0,compressedSize:g}));const A=S.fe+g;p.push(A),h.add(Boolean(y.Zt||y.uncompressedSize>=t||g>=t)),w=Math.min(w,A),f+=A}if(u.size>1&&(c||f-w>=t&&(h.size>1||Hs(p,l,!0)!=Hs(p,l,!1)))&&!o)throw new Error(ls);const{ge:m,Ae:y}=Xs(u);let b=wc(a,r,Xo);if(f>=t||m>=t||u.size>=e){if(!1===b)throw new Error(as);b=!0}else b===I&&y&&(b=!0);return f-l+m+s+(b?98:d)}(r,i,a,r.globalComment)}getChildByName(t){const e=this.children;for(let r=0;r<e.length;r++){const n=e[r];if(n.name==t)return n}}getChildren(t={}){return function(t,e){const r=[],n=[t];let o=0;for(;o<n.length;)for(const t of n[o++].children)r.push(t),e&&n.push(t);return r}(this,t.recursive)}isPasswordProtected(){const t=this.children;for(let e=0;e<t.length;e++)if(t[e].isPasswordProtected())return!0;return!1}async checkPassword(t,e={}){const r=this.children;return!(await Promise.all(r.map(r=>r.checkPassword(t,e)))).includes(!1)}}class zu{constructor(){Yu(this)}get children(){return this.root.children}remove(t){Mu(t);const e=[t];for(;e.length;){const t=e.pop();this.entries[t.id]=null;for(const r of t.children)e.push(r)}t.parent=I}move(t,e){if(t==this.root)throw new Error(fu);if(!e.directory)throw new Error(du);if(e.isDescendantOf(t))throw new Error(lu);if(t!=e){const r=e.getChildByName(t.name);if(r){if(r!=t)throw new Error(su)}else Mu(t),t.parent=e,e.children.push(t),Ku(this,t)}}find(t){const e=t.split("/");let r=this.root;for(let t=0;r&&t<e.length;t++)r=r.directory?r.getChildByName(e[t]):I;return r||(r=this.entries.find(e=>e&&(e==this.root||e.isDescendantOf(this.root))&&e.getRelativeName()==t)),r}getById(t){return this.entries[t]}getChildByName(t){return this.root.getChildByName(t)}getChildren(t){return this.root.getChildren(t)}addDirectory(t,e){return this.root.addDirectory(t,e)}addText(t,e,r){return this.root.addText(t,e,r)}addBlob(t,e,r){return this.root.addBlob(t,e,r)}addData64URI(t,e,r){return this.root.addData64URI(t,e,r)}addUint8Array(t,e,r){return this.root.addUint8Array(t,e,r)}addHttpContent(t,e,r){return this.root.addHttpContent(t,e,r)}addReadable(t,e,r){return this.root.addReadable(t,e,r)}addFileSystemEntry(t,e){return this.root.addFileSystemEntry(t,e)}addFileSystemHandle(t,e){return this.root.addFileSystemHandle(t,e)}addFile(t,e){return this.root.addFile(t,e)}importBlob(t,e){return qu(this,r=>r.importBlob(t,e))}importData64URI(t,e){return qu(this,r=>r.importData64URI(t,e))}importUint8Array(t,e){return qu(this,r=>r.importUint8Array(t,e))}importHttpContent(t,e){return qu(this,r=>r.importHttpContent(t,e))}importReadable(t,e){return qu(this,r=>r.importReadable(t,e))}importZip(t,e){return qu(this,r=>r.importZip(t,e))}exportBlob(t){return this.root.exportBlob(t)}exportData64URI(t){return this.root.exportData64URI(t)}exportUint8Array(t){return this.root.exportUint8Array(t)}exportWritable(t,e){return this.root.exportWritable(t,e)}exportFileSystemHandle(t,e){return this.root.exportFileSystemHandle(t,e)}exportZip(t,e){return this.root.exportZip(t,e)}getExportedSize(t){return this.root.getExportedSize(t)}isPasswordProtected(){return this.root.isPasswordProtected()}checkPassword(t,e){return this.root.checkPassword(t,e)}}const Fu={FS:zu,ZipDirectoryEntry:xu,ZipFileEntry:Du};function Ou(t,e){let r=0;const n=Array.from(t);for(;n.length;){const t=n.pop();r+=e(t)||0;for(const e of t.children)n.push(e)}return r}function Iu(t){return t.uncompressedSize}function Tu(t,e){const{data:r}=t;return e&&r instanceof fi?r.compressedSize:t.uncompressedSize}function Uu(t){let e;return function(){if(e)throw new Error(pu);return e=!0,{readable:t}}}function Cu(t){return class extends Ln{constructor(t,e={}){super(),this.entry=t,this.options=e}async init(){const e=this,r=Object.assign({},t,e.options),{checkOverlappingEntry:n,checkOverlappingEntryOnly:o}=r,i=await e.entry.getData(new qn,Object.assign(r,{checkPasswordOnly:!1,checkOverlappingEntry:o||n,checkOverlappingEntryOnly:!1,preventClose:!1}));e.data=i,e.Xe=new Yn(i),e.size=i.size,super.init()}readUint8Array(t,e){return this.Xe.readUint8Array(t,e)}}}function ku(t,e,r){return t.prototype?new t(e,r):t(e,r)}async function vu(t,e){const r=[],n=[t],o=new Map;for(;n.length;){const t=n.pop();for(const e of t.children)e.directory?n.push(e):r.push(e)}return await Promise.all(r.map(async t=>{const r=t.reader=ku(t.Reader,t.data,e);o.set(t,r);try{await zo(r)}catch(e){try{e.entryId=t.id,e.cause={entry:t}}catch{}throw e}r.size!==I&&(t.uncompressedSize=r.size,t.qe=!1)})),o}function Mu(t){if(t.parent){const e=t.parent.children;e.forEach((r,n)=>{r.id==t.id&&e.splice(n,1)})}}function Nu(t){return Boolean(t)&&t.message==Au}function _u(t,e,r){const n=r.relativePath?t.getRelativeName(e):t.getFullname(),o=t.options||{};let i={},a={};if(t.data instanceof fi){const e=Zu(t,r),n=o.lastModDate===I?r.lastModDate:o.lastModDate;({$t:i,Jt:a}=Ps(t.data,e,n)),e&&(a.passThrough=!0)}const s=Object.assign({lastModDate:t.Ke},i,r,o,a,{directory:t.directory});if(!t.directory&&s.passThrough&&s.uncompressedSize===I)throw new Error(Eu);return{name:n,$t:s}}function ju(t,e){const{reader:r}=t;return r&&r.size!==I?r.size:t.qe?I:Tu(t,e)}function Bu(t){if(t&&(typeof t!=k||Array.isArray(t)))throw new Error(Su);return t&&Pu(t.passThrough),t}function Pu(t){if(ht(t)===it)throw new Error(gu)}function Lu(t,e){const{uncompressedSize:r}=e;Object.assign(t,e,{reader:null,passThrough:I,uncompressedSize:r===I?0:r,qe:r===I})}function Wu(t){let e=t.length;for(;"="==t.charAt(e-1);)e--;const r=t.indexOf(",")+1;return Math.floor(.75*(e-r))}function Zu(t,e){const{readerOptions:r}=e;return Boolean(!t.directory&&(t.passThrough||r&&r.passThrough))}function Vu(t){return t.directory&&null===t.data}function Hu(t,e,r){return async function t(e,n,o,i=""){if(n){const a=i?i+"/"+n.name:n.name;try{if((n.isFile||n.isDirectory)&&(n=await Gu(n)),"file"==n.kind){const t=await n.getFile();o.push(Xu(e,t.name,{Reader:function(){return{readable:t.stream(),size:t.size}},options:Object.assign({},{lastModDate:new Date(t.lastModified)},r),uncompressedSize:t.size}))}else if("directory"==n.kind){const i=e.addDirectory(n.name,r);o.push(i);for await(const e of n.values())await t(i,e,o,a)}}catch(t){try{t.entryName===I&&(t.entryName=a)}catch{}throw t}}return o}(t,e,[])}async function Gu(t){const e={name:t.name};if(t.isFile&&(e.kind="file",e.getFile=()=>new Promise((e,r)=>t.file(e,r))),t.isDirectory){e.kind="directory";const r=await async function(t){const e=[];function r(t,n,o){t.readEntries(async i=>{if(i.length){for(const t of i)e.push(await Gu(t));r(t,n,o)}else n(e)},o)}return await new Promise((e,n)=>r(t.createReader(),e,n)),{[Symbol.iterator](){let t=0;return{next(){const r={value:e[t],done:t==e.length};return t++,r}}}}}(t);e.values=()=>r}return e}function Yu(t){t.entries=[],t.Ye=0,t.root=new xu(t)}function qu(t,e){const{entries:r,Ye:n,root:o}=t;return Yu(t),e(t.root).catch(e=>{throw Object.assign(t,{entries:r,Ye:n,root:o}),e})}function Ku(t,e){const r=[e];for(;r.length;){const e=r.pop();t.entries[e.id]=e;for(const t of e.children)r.push(t)}}function Xu(t,e,r,n){if(t.directory){const o=$u(e);return o&&(e=o.pop(),t=Ju(t,o)),n?new xu(t.fs,e,r,t):new Du(t.fs,e,r,t)}throw new Error(wu)}function $u(t){if(t.includes("/")){const e=t.split("/").filter(t=>""!=t&&"."!=t);if(e.length)return e}}function Ju(t,e,r){return e.forEach(e=>{const n=t;if(t=t.getChildByName(e)){if(!t.directory)throw new Error(su);if(r&&(t==r||t.isDescendantOf(r)))throw new Error(lu)}else t=new xu(n.fs,e,{data:null},n)}),t}export{Yn as BlobReader,qn as BlobWriter,Zn as Data64URIReader,Vn as Data64URIWriter,lt as ERR_ABORTED,xi as ERR_AMBIGUOUS_ARCHIVE,lu as ERR_ANCESTOR_ENTRY,pi as ERR_BAD_FORMAT,yi as ERR_CENTRAL_DIRECTORY_NOT_FOUND,Pa as ERR_DUPLICATED_NAME,cu as ERR_DUPLICATE_IMPORTED_ENTRY,Si as ERR_ENCRYPTED,zi as ERR_ENCRYPTED_CENTRAL_DIRECTORY,Di as ERR_ENTRY_DATA_OUT_OF_BOUNDS,su as ERR_ENTRY_EXISTS,mi as ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND,hi as ERR_EOCDR_NOT_FOUND,Ei as ERR_EXTRAFIELD_ZIP64_NOT_FOUND,On as ERR_HTTP_RANGE,In as ERR_HTTP_RESOURCE_CHANGED,Fn as ERR_HTTP_STATUS,Se as ERR_INVALID_AUTHENTICATION_CODE,St as ERR_INVALID_BASE_URI,er as ERR_INVALID_CODEC_DEFINITION,nr as ERR_INVALID_CODEC_MODULE,La as ERR_INVALID_COMMENT,Wa as ERR_INVALID_COMMENT_TYPE,hr as ERR_INVALID_COMPRESSED_DATA,mr as ERR_INVALID_CRC32,Ha as ERR_INVALID_DATE,uu as ERR_INVALID_DUPLICATES,qa as ERR_INVALID_ENCRYPTION_STRENGTH,Rs as ERR_INVALID_ENTRY,Za as ERR_INVALID_ENTRY_COMMENT,Va as ERR_INVALID_ENTRY_COMMENT_TYPE,Ga as ERR_INVALID_ENTRY_NAME,Ja as ERR_INVALID_EXTRAFIELD,es as ERR_INVALID_EXTRAFIELD_DATA,ts as ERR_INVALID_EXTRAFIELD_DATA_TYPE,Qa as ERR_INVALID_EXTRAFIELD_TYPE,Ii as ERR_INVALID_FILENAME_VALIDATION,at as ERR_INVALID_FUNCTION_OPTION,hs as ERR_INVALID_GID,gs as ERR_INVALID_LEVEL,Ti as ERR_INVALID_MAX_APPENDED_DATA_SIZE,Et as ERR_INVALID_MAX_WORKERS,Es as ERR_INVALID_MSDOS_ATTRIBUTES,Ss as ERR_INVALID_MSDOS_DATA,Ee as ERR_INVALID_PASSWORD,ct as ERR_INVALID_PASSWORD_TYPE,Eu as ERR_INVALID_PASS_THROUGH,ut as ERR_INVALID_PASS_THROUGH_VALUE,ds as ERR_INVALID_READER,Su as ERR_INVALID_READER_OPTIONS,st as ERR_INVALID_SIGNAL,As as ERR_INVALID_SIGNATURE_DATA,Oi as ERR_INVALID_STRICTNESS,ps as ERR_INVALID_UID,pr as ERR_INVALID_UNCOMPRESSED_SIZE,ys as ERR_INVALID_UNIX_EXTRA_FIELD_TYPE,bs as ERR_INVALID_UNIX_ID_SIZE,ms as ERR_INVALID_UNIX_MODE,gt as ERR_INVALID_URI,Ya as ERR_INVALID_VERSION,Tn as ERR_ITERATOR_COMPLETED_TOO_SOON,bi as ERR_LOCAL_FILE_HEADER_NOT_FOUND,Ri as ERR_OVERLAPPING_ENTRY,wu as ERR_PARENT_NOT_DIRECTORY,pu as ERR_READABLE_CONSUMED,rr as ERR_RESERVED_COMPRESSION_METHOD,fu as ERR_ROOT_DIRECTORY_NOT_MOVABLE,Ai as ERR_SPLIT_ZIP_FILE,du as ERR_TARGET_NOT_DIRECTORY,cs as ERR_UNDEFINED_COMPRESSION_METHOD,us as ERR_UNDEFINED_CRC32,fs as ERR_UNDEFINED_READER,ss as ERR_UNDEFINED_UNCOMPRESSED_SIZE,ls as ERR_UNDETERMINED_SIZE,Fi as ERR_UNSAFE_FILENAME,or as ERR_UNSUPPORTED_COMPRESSION,Bc as ERR_UNSUPPORTED_CONTEXT,Ae as ERR_UNSUPPORTED_CRYPTO_API,gi as ERR_UNSUPPORTED_ENCRYPTION,$a as ERR_UNSUPPORTED_ENCRYPTION_PASS_THROUGH,Ka as ERR_UNSUPPORTED_ENCRYPTION_USDZ,as as ERR_UNSUPPORTED_FORMAT,gu as ERR_UNSUPPORTED_PASS_THROUGH_VALUE,Xa as ERR_UNSUPPORTED_SPLIT_USDZ,Ui as ERR_UNSUPPORTED_UINT64,_r as ERR_WORKER_STARTUP_TIMEOUT,Un as ERR_WRITER_NOT_INITIALIZED,Cn as ERR_WRITER_SIZE_NOT_WRITABLE,Ds as ERR_ZIP_CRYPTO_LAST_MOD_DATE,ws as ERR_ZIP_NOT_EMPTY,bo as HttpRangeReader,yo as HttpReader,Ln as Reader,go as SplitDataReader,Ao as SplitDataWriter,Kn as TextReader,$n as TextWriter,Eo as Uint8ArrayReader,So as Uint8ArrayWriter,Uc as VERSION,ji as WARNING_APPENDED_DATA,zs as WARNING_CLAMPED_LAST_MODIFICATION_DATE,vi as WARNING_COMPRESSED_PATCHED_DATA,xs as WARNING_COMPRESSION_UNAVAILABLE,Wi as WARNING_DUPLICATE_FILENAME,Mi as WARNING_MALFORMED_EXTRA_FIELD,Gi as WARNING_MISMATCHED_LOCAL_FILE_HEADER_BIT_FLAG,Yi as WARNING_MISMATCHED_LOCAL_FILE_HEADER_COMPRESSION_METHOD,qi as WARNING_MISMATCHED_LOCAL_FILE_HEADER_CRC32_OR_SIZES,Hi as WARNING_MISMATCHED_LOCAL_FILE_HEADER_FILENAME,Zi as WARNING_MISMATCHED_ZIP64_END_OF_CENTRAL_DIRECTORY,Vi as WARNING_MULTIPLE_END_OF_CENTRAL_DIRECTORY,Pi as WARNING_PREPENDED_CENTRAL_DIRECTORY,Bi as WARNING_PREPENDED_DATA,Li as WARNING_TRAILING_CENTRAL_DIRECTORY_DATA,ki as WARNING_UNKNOWN_VERSION,Ni as WARNING_UNKNOWN_ZIP64_EXTENSIBLE_DATA,Ci as WARNING_UNSORTED_CENTRAL_DIRECTORY,_i as WARNING_WRAPPED_ENTRIES_COUNT,Wn as Writer,xu as ZipDirectoryEntry,Ru as ZipEntry,zu as ZipFS,Du as ZipFileEntry,ra as ZipReader,na as ZipReaderStream,ks as ZipWriter,vs as ZipWriterStream,vt as configure,Nc as createBlobTempStream,vc as createOPFSTempStream,Pc as createSyncAccessHandleTempStream,Fu as fs,Oc as getMimeType,fr as getRegisteredCodecs,Ic as getSupportedCompressionMethods,oa as isZipFile,cr as registerCodec,Bt as resetConfiguration,au as terminateWorkers,ur as unregisterCodec};
|
|
1
|
+
const t=4294967295,e=65535,r=255,n=67324752,o=134695760,a=o,i=84233040,s=33639248,c=101010256,u=101075792,l=117853008,f=46,d=22,w=20,p=56,m=39169,h=21589,y=6534,b=30837,E=30805,S=2048,g=61440,A=16384,R=2048,z=1024,D="/",x=30,F=new Date(2107,11,31,23,59,58),O=new Date(1980,0,1),I=void 0,U=1/0,T="undefined",k="function",C="object",v="string",M="boolean",N=new Uint8Array,_=Symbol.asyncDispose||Symbol(),P="password",j="rawPassword",B="passThrough",L="signal",W="useWebWorkers",Z="useCompressionStream",V="transferStreams",H="preventClose",G="level",q="useUnicodeFileNames",K="dataDescriptor",Y="offset",X="usdz",$="maxAppendedDataSize",J="signCentralDirectory",Q="entry",tt="filename",et="comment",rt="strict",nt="balanced",ot="tolerant",at="compressed",it="Invalid option (must be a function)",st="Invalid signal (must be an AbortSignal instance)",ct="Invalid password (password must be a string, rawPassword must be a Uint8Array)",ut="Invalid passThrough option (must be a boolean or 'compressed')",lt="The operation was aborted";function ft(t){if(t&&typeof t!=k)throw new Error(it);return t}function dt(t){if(t&&(typeof t.addEventListener!=k||typeof t.aborted!=M))throw new Error(st);return t||I}function wt(t){if(t&&t.aborted)throw t.reason===I?new DOMException(lt,"AbortError"):t.reason}function pt(t,e){if(t&&typeof t!=v||e&&!(e instanceof Uint8Array))throw new Error(ct)}function mt(t){if(t!==I&&typeof t!=M&&t!==at)throw new Error(ut);return t}function ht(t,e,r){if(!Number.isInteger(t)||t<0||t>e)throw new Error(r)}function yt(t,e,r){t!==I&&ht(t,e,r)}function bt(t){return typeof t==v&&t.trim()?Number(t):t}const Et="Invalid maxWorkers (must be an integer greater than 0)",St="Invalid baseURI (must be a string)",gt="Invalid URI (must be a string or a function returning a string)";let At=2;try{typeof navigator!=T&&navigator.hardwareConcurrency&&(At=navigator.hardwareConcurrency)}catch{}const Rt={workerURI:"./core/web-worker-wasm.js",wasmURI:"./core/streams/zlib-wasm/zlib-streams.wasm",chunkSize:65536,maxWorkers:At,terminateWorkerTimeout:5e3,workerStarvationTimeout:5e3,workerStartupTimeout:5e3,useWebWorkers:!0,useCompressionStream:!0,transferStreams:!0,CompressionStream:typeof CompressionStream!=T&&CompressionStream,DecompressionStream:typeof DecompressionStream!=T&&DecompressionStream},zt="maxWorkers",Dt="baseURI",xt=["wasmURI","workerURI"],Ft=["chunkSize",zt,"terminateWorkerTimeout","workerStarvationTimeout","workerStartupTimeout"],Ot=["createWorker","CompressionStream","DecompressionStream","CompressionStreamFallback","DecompressionStreamFallback"],It=[Dt,...xt,"useCompressionStream","useWebWorkers","transferStreams",...Ft,...Ot],Ut={...Rt};function Tt(){return Ut}function kt(t){return Ct(t.chunkSize)}function Ct(t){return t=bt(t),Number.isInteger(t)&&t>=1?Math.max(t,64):65536}function vt(t){Object.assign(Ut,Mt(_t(t)))}function Mt(t){const e={};for(const r of It){const n=t[r];n!==I&&(e[r]=Nt(r,n))}return e}function Nt(t,e){if(Ft.includes(t)){if(e=bt(e),t==zt&&(!Number.isInteger(e)||e<1))throw new Error(Et)}else if(Ot.includes(t))ft(e);else if(t==Dt){if(e&&typeof e!=v)throw new Error(St)}else if(xt.includes(t)&&e&&typeof e!=v&&typeof e!=k)throw new Error(gt);return e}function _t(t){t=t||{};const{CompressionStreamZlib:e,DecompressionStreamZlib:r}=t;if(e===I&&r===I)return t;const n=Object.assign({},t);return n.CompressionStreamFallback===I&&(n.CompressionStreamFallback=e),n.DecompressionStreamFallback===I&&(n.DecompressionStreamFallback=r),n}function Pt(t){const e=Mt(_t(t));Object.assign(Rt,e),Object.assign(Ut,e)}function jt(){for(const t of It)delete Ut[t];Object.assign(Ut,Rt)}function Bt(t,e){const r=new Uint8Array(t.length+e.length);return r.set(t),r.set(e,t.length),r}function Lt(t){return t.byteOffset||t.byteLength!=t.buffer.byteLength?new Uint8Array(t):t}function Wt(t){return new DataView(t.buffer,t.byteOffset,t.byteLength)}function Zt(t){return Boolean(t)&&"object"==typeof t}const Vt=[[],[],[],[],[],[],[],[]];for(let t=0;t<256;t++){let e=t;for(let t=0;t<8;t++)e=1&e?e>>>1^3988292384:e>>>1;Vt[0][t]=e}for(let t=0;t<256;t++)for(let e=1;e<8;e++){const r=Vt[e-1][t];Vt[e][t]=r>>>8^Vt[0][255&r]}const[Ht,Gt,qt,Kt,Yt,Xt,$t,Jt]=Vt;class Qt{constructor(t){this.o=t||-1}append(t){let e=0|this.o;const r=0|t.length;let n=0;if(r>=8&&t.buffer){const o=new DataView(t.buffer,t.byteOffset,r),a=r-8;for(;n<=a;n+=8){const t=e^o.getInt32(n,!0),r=o.getInt32(n+4,!0);e=Jt[255&t]^$t[t>>>8&255]^Xt[t>>>16&255]^Yt[t>>>24&255]^Kt[255&r]^qt[r>>>8&255]^Gt[r>>>16&255]^Ht[r>>>24&255]}}for(;n<r;n++)e=e>>>8^Ht[255&(e^t[n])];this.o=e}get(){return~this.o}}class te extends TransformStream{constructor(){let t;const e=new Qt;super({transform(t,r){e.append(t),r.enqueue(t)},flush(){const r=new Uint8Array(4);new DataView(r.buffer).setUint32(0,e.get()),t.value=r}}),t=this}}function ee(t){if(typeof TextEncoder==T){t=unescape(encodeURIComponent(t));const e=new Uint8Array(t.length);for(let r=0;r<e.length;r++)e[r]=t.charCodeAt(r);return e}return(new TextEncoder).encode(t)}const re=64,ne=20,oe=new Uint8Array([128]),ae=new Uint8Array(1),ie=new Int32Array([1732584193,4023233417,2562383102,271733878,3285377520]),se=new Uint8Array(256),ce=new Int32Array(256),ue=new Int32Array(256),le=new Int32Array(256),fe=new Int32Array(256);let de=!1;function we(t,e){!function(){if(!de){let t=1,e=1;do{t=255&(t^t<<1^(128&t?27:0)),e=255&(e^e<<1),e=255&(e^e<<2),e=255&(e^e<<4),128&e&&(e^=9),se[t]=255&(e^(e<<1|e>>7)^(e<<2|e>>6)^(e<<3|e>>5)^(e<<4|e>>4)^99)}while(1!=t);se[0]=99;for(let t=0;t<256;t++){const e=se[t],r=ye(e),n=r<<24|e<<16|e<<8|r^e;ce[t]=n,ue[t]=n>>>8|n<<24,le[t]=n>>>16|n<<16,fe[t]=n>>>24|n<<8}de=!0}}();const r=new Int32Array(60),n=function(t,e){const r=t.length>>2,n=r+6,o=4*(n+1);let a=1;for(let n=0;n<r;n++)e[n]=t[4*n]<<24|t[4*n+1]<<16|t[4*n+2]<<8|t[4*n+3];for(let t=r;t<o;t++){let n=e[t-1];t%r==0?(n=me(n<<8|n>>>24)^a<<24,a=ye(a)):r>6&&t%r==4&&(n=me(n)),e[t]=e[t-r]^n}return n}(t,r),o=new Int32Array(4),a=pe(e);let i=0,s=0,c=0,u=0;return{process(t,e){e&&a.update(t,0,t.length),function(t){const e=new DataView(t.buffer,t.byteOffset,t.byteLength),r=t.length;let n=0;for(;n+16<=r;n+=16)l(),e.setInt32(n,e.getInt32(n)^o[0]),e.setInt32(n+4,e.getInt32(n+4)^o[1]),e.setInt32(n+8,e.getInt32(n+8)^o[2]),e.setInt32(n+12,e.getInt32(n+12)^o[3]);if(n<r){l();for(let e=0;n<r;n++,e++)t[n]^=o[e>>2]>>>24-8*(3&e)}}(t),e||a.update(t,0,t.length)},digest:()=>a.digest()};function l(){i=i+1|0,i||(s=s+1|0,s||(c=c+1|0,c||(u=u+1|0)));let t=he(i)^r[0],e=he(s)^r[1],a=he(c)^r[2],l=he(u)^r[3],f=ce[t>>>24]^ue[e>>>16&255]^le[a>>>8&255]^fe[255&l]^r[4],d=ce[e>>>24]^ue[a>>>16&255]^le[l>>>8&255]^fe[255&t]^r[5],w=ce[a>>>24]^ue[l>>>16&255]^le[t>>>8&255]^fe[255&e]^r[6],p=ce[l>>>24]^ue[t>>>16&255]^le[e>>>8&255]^fe[255&a]^r[7];t=ce[f>>>24]^ue[d>>>16&255]^le[w>>>8&255]^fe[255&p]^r[8],e=ce[d>>>24]^ue[w>>>16&255]^le[p>>>8&255]^fe[255&f]^r[9],a=ce[w>>>24]^ue[p>>>16&255]^le[f>>>8&255]^fe[255&d]^r[10],l=ce[p>>>24]^ue[f>>>16&255]^le[d>>>8&255]^fe[255&w]^r[11],f=ce[t>>>24]^ue[e>>>16&255]^le[a>>>8&255]^fe[255&l]^r[12],d=ce[e>>>24]^ue[a>>>16&255]^le[l>>>8&255]^fe[255&t]^r[13],w=ce[a>>>24]^ue[l>>>16&255]^le[t>>>8&255]^fe[255&e]^r[14],p=ce[l>>>24]^ue[t>>>16&255]^le[e>>>8&255]^fe[255&a]^r[15],t=ce[f>>>24]^ue[d>>>16&255]^le[w>>>8&255]^fe[255&p]^r[16],e=ce[d>>>24]^ue[w>>>16&255]^le[p>>>8&255]^fe[255&f]^r[17],a=ce[w>>>24]^ue[p>>>16&255]^le[f>>>8&255]^fe[255&d]^r[18],l=ce[p>>>24]^ue[f>>>16&255]^le[d>>>8&255]^fe[255&w]^r[19],f=ce[t>>>24]^ue[e>>>16&255]^le[a>>>8&255]^fe[255&l]^r[20],d=ce[e>>>24]^ue[a>>>16&255]^le[l>>>8&255]^fe[255&t]^r[21],w=ce[a>>>24]^ue[l>>>16&255]^le[t>>>8&255]^fe[255&e]^r[22],p=ce[l>>>24]^ue[t>>>16&255]^le[e>>>8&255]^fe[255&a]^r[23],t=ce[f>>>24]^ue[d>>>16&255]^le[w>>>8&255]^fe[255&p]^r[24],e=ce[d>>>24]^ue[w>>>16&255]^le[p>>>8&255]^fe[255&f]^r[25],a=ce[w>>>24]^ue[p>>>16&255]^le[f>>>8&255]^fe[255&d]^r[26],l=ce[p>>>24]^ue[f>>>16&255]^le[d>>>8&255]^fe[255&w]^r[27],f=ce[t>>>24]^ue[e>>>16&255]^le[a>>>8&255]^fe[255&l]^r[28],d=ce[e>>>24]^ue[a>>>16&255]^le[l>>>8&255]^fe[255&t]^r[29],w=ce[a>>>24]^ue[l>>>16&255]^le[t>>>8&255]^fe[255&e]^r[30],p=ce[l>>>24]^ue[t>>>16&255]^le[e>>>8&255]^fe[255&a]^r[31],t=ce[f>>>24]^ue[d>>>16&255]^le[w>>>8&255]^fe[255&p]^r[32],e=ce[d>>>24]^ue[w>>>16&255]^le[p>>>8&255]^fe[255&f]^r[33],a=ce[w>>>24]^ue[p>>>16&255]^le[f>>>8&255]^fe[255&d]^r[34],l=ce[p>>>24]^ue[f>>>16&255]^le[d>>>8&255]^fe[255&w]^r[35],f=ce[t>>>24]^ue[e>>>16&255]^le[a>>>8&255]^fe[255&l]^r[36],d=ce[e>>>24]^ue[a>>>16&255]^le[l>>>8&255]^fe[255&t]^r[37],w=ce[a>>>24]^ue[l>>>16&255]^le[t>>>8&255]^fe[255&e]^r[38],p=ce[l>>>24]^ue[t>>>16&255]^le[e>>>8&255]^fe[255&a]^r[39];let m=40;n>10&&(t=ce[f>>>24]^ue[d>>>16&255]^le[w>>>8&255]^fe[255&p]^r[40],e=ce[d>>>24]^ue[w>>>16&255]^le[p>>>8&255]^fe[255&f]^r[41],a=ce[w>>>24]^ue[p>>>16&255]^le[f>>>8&255]^fe[255&d]^r[42],l=ce[p>>>24]^ue[f>>>16&255]^le[d>>>8&255]^fe[255&w]^r[43],f=ce[t>>>24]^ue[e>>>16&255]^le[a>>>8&255]^fe[255&l]^r[44],d=ce[e>>>24]^ue[a>>>16&255]^le[l>>>8&255]^fe[255&t]^r[45],w=ce[a>>>24]^ue[l>>>16&255]^le[t>>>8&255]^fe[255&e]^r[46],p=ce[l>>>24]^ue[t>>>16&255]^le[e>>>8&255]^fe[255&a]^r[47],m=48),n>12&&(t=ce[f>>>24]^ue[d>>>16&255]^le[w>>>8&255]^fe[255&p]^r[48],e=ce[d>>>24]^ue[w>>>16&255]^le[p>>>8&255]^fe[255&f]^r[49],a=ce[w>>>24]^ue[p>>>16&255]^le[f>>>8&255]^fe[255&d]^r[50],l=ce[p>>>24]^ue[f>>>16&255]^le[d>>>8&255]^fe[255&w]^r[51],f=ce[t>>>24]^ue[e>>>16&255]^le[a>>>8&255]^fe[255&l]^r[52],d=ce[e>>>24]^ue[a>>>16&255]^le[l>>>8&255]^fe[255&t]^r[53],w=ce[a>>>24]^ue[l>>>16&255]^le[t>>>8&255]^fe[255&e]^r[54],p=ce[l>>>24]^ue[t>>>16&255]^le[e>>>8&255]^fe[255&a]^r[55],m=56),o[0]=(se[f>>>24]<<24|se[d>>>16&255]<<16|se[w>>>8&255]<<8|se[255&p])^r[m],o[1]=(se[d>>>24]<<24|se[w>>>16&255]<<16|se[p>>>8&255]<<8|se[255&f])^r[m+1],o[2]=(se[w>>>24]<<24|se[p>>>16&255]<<16|se[f>>>8&255]<<8|se[255&d])^r[m+2],o[3]=(se[p>>>24]<<24|se[f>>>16&255]<<16|se[d>>>8&255]<<8|se[255&w])^r[m+3]}}function pe(t){const e=function(){const t=new Int32Array(ie),e=new Int32Array(16),r=new Uint8Array(re),n=new DataView(r.buffer),o=new Uint8Array(8);let a=0,i=0;return{update:s,digest:function(){const e=8*i,r=Math.floor(e/4294967296),n=e>>>0;for(s(oe,0,1);56!=a;)s(ae,0,1);o[0]=r>>>24,o[1]=r>>>16,o[2]=r>>>8,o[3]=r,o[4]=n>>>24,o[5]=n>>>16,o[6]=n>>>8,o[7]=n,s(o,0,8);const c=new Uint8Array(ne),u=new DataView(c.buffer);for(let e=0;e<t.length;e++)u.setInt32(4*e,t[e]);return t.set(ie),a=0,i=0,c}};function s(t,e,o){const s=e+o;if(i+=o,a){for(;e<s&&a<re;)r[a++]=t[e++];a==re&&(c(n,0),a=0)}if(e+re<=s){const r=new DataView(t.buffer,t.byteOffset,t.byteLength);for(;e+re<=s;e+=re)c(r,e)}for(;e<s;)r[a++]=t[e++]}function c(r,n){for(let t=0;t<16;t++)e[t]=r.getInt32(n+4*t);let o,a=t[0],i=t[1],s=t[2],c=t[3],u=t[4];for(let t=0;t<15;t+=5)u=(a<<5|a>>>27)+((s^c)&i^c)+u+1518500249+e[t]|0,i=i<<30|i>>>2,c=(u<<5|u>>>27)+((i^s)&a^s)+c+1518500249+e[t+1]|0,a=a<<30|a>>>2,s=(c<<5|c>>>27)+((a^i)&u^i)+s+1518500249+e[t+2]|0,u=u<<30|u>>>2,i=(s<<5|s>>>27)+((u^a)&c^a)+i+1518500249+e[t+3]|0,c=c<<30|c>>>2,a=(i<<5|i>>>27)+((c^u)&s^u)+a+1518500249+e[t+4]|0,s=s<<30|s>>>2;u=(a<<5|a>>>27)+((s^c)&i^c)+u+1518500249+e[15]|0,i=i<<30|i>>>2,o=e[13]^e[8]^e[2]^e[0],o=o<<1|o>>>31,e[0]=o,c=(u<<5|u>>>27)+((i^s)&a^s)+c+1518500249+o|0,a=a<<30|a>>>2,o=e[14]^e[9]^e[3]^e[1],o=o<<1|o>>>31,e[1]=o,s=(c<<5|c>>>27)+((a^i)&u^i)+s+1518500249+o|0,u=u<<30|u>>>2,o=e[15]^e[10]^e[4]^e[2],o=o<<1|o>>>31,e[2]=o,i=(s<<5|s>>>27)+((u^a)&c^a)+i+1518500249+o|0,c=c<<30|c>>>2,o=e[0]^e[11]^e[5]^e[3],o=o<<1|o>>>31,e[3]=o,a=(i<<5|i>>>27)+((c^u)&s^u)+a+1518500249+o|0,s=s<<30|s>>>2;for(let t=20;t<40;t+=5)o=e[t-3&15]^e[t-8&15]^e[t-14&15]^e[15&t],o=o<<1|o>>>31,e[15&t]=o,u=(a<<5|a>>>27)+(i^s^c)+u+1859775393+o|0,i=i<<30|i>>>2,o=e[t-2&15]^e[t-7&15]^e[t-13&15]^e[t+1&15],o=o<<1|o>>>31,e[t+1&15]=o,c=(u<<5|u>>>27)+(a^i^s)+c+1859775393+o|0,a=a<<30|a>>>2,o=e[t-1&15]^e[t-6&15]^e[t-12&15]^e[t+2&15],o=o<<1|o>>>31,e[t+2&15]=o,s=(c<<5|c>>>27)+(u^a^i)+s+1859775393+o|0,u=u<<30|u>>>2,o=e[15&t]^e[t-5&15]^e[t-11&15]^e[t+3&15],o=o<<1|o>>>31,e[t+3&15]=o,i=(s<<5|s>>>27)+(c^u^a)+i+1859775393+o|0,c=c<<30|c>>>2,o=e[t+1&15]^e[t-4&15]^e[t-10&15]^e[t+4&15],o=o<<1|o>>>31,e[t+4&15]=o,a=(i<<5|i>>>27)+(s^c^u)+a+1859775393+o|0,s=s<<30|s>>>2;for(let t=40;t<60;t+=5)o=e[t-3&15]^e[t-8&15]^e[t-14&15]^e[15&t],o=o<<1|o>>>31,e[15&t]=o,u=(a<<5|a>>>27)+(i&s|(i|s)&c)+u+2400959708+o|0,i=i<<30|i>>>2,o=e[t-2&15]^e[t-7&15]^e[t-13&15]^e[t+1&15],o=o<<1|o>>>31,e[t+1&15]=o,c=(u<<5|u>>>27)+(a&i|(a|i)&s)+c+2400959708+o|0,a=a<<30|a>>>2,o=e[t-1&15]^e[t-6&15]^e[t-12&15]^e[t+2&15],o=o<<1|o>>>31,e[t+2&15]=o,s=(c<<5|c>>>27)+(u&a|(u|a)&i)+s+2400959708+o|0,u=u<<30|u>>>2,o=e[15&t]^e[t-5&15]^e[t-11&15]^e[t+3&15],o=o<<1|o>>>31,e[t+3&15]=o,i=(s<<5|s>>>27)+(c&u|(c|u)&a)+i+2400959708+o|0,c=c<<30|c>>>2,o=e[t+1&15]^e[t-4&15]^e[t-10&15]^e[t+4&15],o=o<<1|o>>>31,e[t+4&15]=o,a=(i<<5|i>>>27)+(s&c|(s|c)&u)+a+2400959708+o|0,s=s<<30|s>>>2;for(let t=60;t<80;t+=5)o=e[t-3&15]^e[t-8&15]^e[t-14&15]^e[15&t],o=o<<1|o>>>31,e[15&t]=o,u=(a<<5|a>>>27)+(i^s^c)+u+3395469782+o|0,i=i<<30|i>>>2,o=e[t-2&15]^e[t-7&15]^e[t-13&15]^e[t+1&15],o=o<<1|o>>>31,e[t+1&15]=o,c=(u<<5|u>>>27)+(a^i^s)+c+3395469782+o|0,a=a<<30|a>>>2,o=e[t-1&15]^e[t-6&15]^e[t-12&15]^e[t+2&15],o=o<<1|o>>>31,e[t+2&15]=o,s=(c<<5|c>>>27)+(u^a^i)+s+3395469782+o|0,u=u<<30|u>>>2,o=e[15&t]^e[t-5&15]^e[t-11&15]^e[t+3&15],o=o<<1|o>>>31,e[t+3&15]=o,i=(s<<5|s>>>27)+(c^u^a)+i+3395469782+o|0,c=c<<30|c>>>2,o=e[t+1&15]^e[t-4&15]^e[t-10&15]^e[t+4&15],o=o<<1|o>>>31,e[t+4&15]=o,a=(i<<5|i>>>27)+(s^c^u)+a+3395469782+o|0,s=s<<30|s>>>2;t[0]=t[0]+a|0,t[1]=t[1]+i|0,t[2]=t[2]+s|0,t[3]=t[3]+c|0,t[4]=t[4]+u|0}}(),r=new Uint8Array(re),n=new Uint8Array(re);t.length>re&&(e.update(t,0,t.length),t=e.digest());for(let e=0;e<re;e++){const o=e<t.length?t[e]:0;r[e]=54^o,n[e]=92^o}return e.update(r,0,re),{update(t,r,n){e.update(t,r,n)},digest(){const t=e.digest();e.update(n,0,re),e.update(t,0,ne);const o=e.digest();return e.update(r,0,re),o}}}function me(t){return se[t>>>24]<<24|se[t>>>16&255]<<16|se[t>>>8&255]<<8|se[255&t]}function he(t){return t<<24|(65280&t)<<8|t>>>8&65280|t>>>24}function ye(t){return 255&(t<<1^27*(t>>7))}const be=typeof crypto!=T&&typeof crypto.getRandomValues==k,Ee="Invalid password",Se="Invalid authentication code",ge="zipjs-abort-check-password",Ae="Crypto API not supported";function Re(t){if(be)return crypto.getRandomValues(t);throw new Error(Ae)}const ze={name:"PBKDF2"},De=Object.assign({hash:{name:"HMAC"}},ze),xe=Object.assign({iterations:1e3,hash:{name:"SHA-1"}},ze),Fe=["deriveBits"],Oe=[8,12,16],Ie=[16,24,32],Ue=10,Te=typeof crypto!=T,ke=Te&&crypto.subtle;let Ce=Te&&typeof ke!=T&&typeof ke.importKey==k&&typeof ke.deriveBits==k,ve=we;class Me extends TransformStream{constructor({password:t,rawPassword:e,encryptionStrength:r,checkPasswordOnly:n,checkAuthenticationCode:o=!0}){const a={};super({start(){_e(a,t,e,r)},async transform(t,e){const{password:r,strength:o,l:i,ready:s}=a;if(r?(await async function(t,e,r,n){const o=await Le(t,e,r,Ze(n,0,Oe[e])),a=Ze(n,Oe[e]);if(o[0]!=a[0]||o[1]!=a[1])throw Be(t),new Error(Ee)}(a,o,r,Ze(t,0,Oe[o]+2)),t=Ze(t,Oe[o]+2),n?(Be(a),e.error(new Error(ge))):i()):await s,a.m)return;const c=new Uint8Array(t.length-Ue-(t.length-Ue)%16);e.enqueue(je(a,t,c,0,Ue,!0))},async flush(t){const{h:e,S:r,ready:n}=a;if(e){if(await n,a.m)return;const i=Ze(r,r.length-Ue),s=new Uint8Array(Ze(r,0,r.length-Ue));e.process(s,!0);const c=e.digest();let u=r.length<Ue?1:0;for(let t=0;t<Ue;t++)u|=c[t]^i[t];if(u&&o)return void t.error(new Error(Se));t.enqueue(s)}}}),Pe(this,a)}}class Ne extends TransformStream{constructor({password:t,rawPassword:e,encryptionStrength:r}){const n={};super({start(){_e(n,t,e,r)},async transform(t,e){const{password:r,strength:o,l:a,ready:i}=n;let s=N;if(r?(s=await async function(t,e,r){const n=Re(new Uint8Array(Oe[e]));return Bt(n,await Le(t,e,r,n))}(n,o,r),a()):await i,n.m)return;const c=new Uint8Array(s.length+t.length-t.length%16);c.set(s,0),e.enqueue(je(n,t,c,s.length,0,!1))},async flush(t){const{h:e,S:r,ready:o}=n;if(e){if(await o,n.m)return;const a=new Uint8Array(r);e.process(a,!1);const i=Ze(e.digest(),0,Ue);t.enqueue(Bt(a,i))}}}),Pe(this,n)}}function _e(t,e,r,n){Object.assign(t,{ready:new Promise(e=>t.l=e),password:We(e,r),strength:n-1,S:N,m:!1})}function Pe(t,e){const r=t.readable.getReader(),n=new ReadableStream({async pull(t){try{const{value:e,done:n}=await r.read();n?t.close():t.enqueue(e)}catch(t){throw Be(e),r.cancel(t).catch(()=>{}),t}},cancel:t=>(Be(e),r.cancel(t))});Object.defineProperty(t,"readable",{get:()=>n})}function je(t,e,r,n,o,a){const{h:i,S:s}=t;s.length&&(e=Bt(s,e));const c=e.length-o,u=c-c%16;if(r=function(t,e){if(e&&e>t.length){const r=t;(t=new Uint8Array(e)).set(r,0)}return t}(r,n+u),u){const t=Ze(r,n,n+u);t.set(Ze(e,0,u)),i.process(t,a)}return t.S=Ze(e,u),r}function Be(t){const{h:e}=t;t.m=!0,e&&e.dispose&&e.dispose()}async function Le(t,e,r,n){t.password=null;const o=Ie[e],a=await async function(t,e,r){if(Ce)try{const n=await ke.importKey("raw",t,De,!1,Fe);return new Uint8Array(await ke.deriveBits(Object.assign({salt:e},xe),n,8*r))}catch{Ce=!1}return function(t,e,r,n){const o=pe(t),a=new Uint8Array(n),i=new Uint8Array(e.length+4),s=new DataView(i.buffer);i.set(e);for(let t=1,r=0;r<n;t++,r+=ne){s.setUint32(e.length,t),o.update(i,0,i.length);let c=o.digest();const u=c.slice();for(let t=1;t<1e3;t++){o.update(c,0,ne),c=o.digest();for(let t=0;t<ne;t++)u[t]^=c[t]}a.set(u.subarray(0,Math.min(ne,n-r)),r)}return a}(t,e,0,r)}(r,n,2*o+2);return t.h=ve(Ze(a,0,o),Ze(a,o,2*o)),t.m&&Be(t),Ze(a,2*o)}function We(t,e){return e===I?ee(t):e}function Ze(t,e,r){return t.subarray(e,r)}class Ve extends TransformStream{constructor({password:t,rawPassword:e,passwordVerification:r,checkPasswordOnly:n}){super({start(){Ge(this,t,e,r)},transform(t,e){const r=this;if(r.password||r.rawPassword){const e=qe(r,t.subarray(0,12));if(r.password=r.rawPassword=null,0!=(e[11]^r.passwordVerification))throw new Error(Ee);t=t.subarray(12)}n?e.error(new Error(ge)):e.enqueue(qe(r,t))}})}}class He extends TransformStream{constructor({password:t,rawPassword:e,passwordVerification:r}){super({start(){Ge(this,t,e,r)},transform(t,e){const r=this;let n,o;if(r.password||r.rawPassword){r.password=r.rawPassword=null;const e=Re(new Uint8Array(12));e[11]=r.passwordVerification,n=new Uint8Array(t.length+e.length),n.set(Ke(r,e),0),o=12}else n=new Uint8Array(t.length),o=0;n.set(Ke(r,t),o),e.enqueue(n)}})}}function Ge(t,e,r,n){Object.assign(t,{password:e,rawPassword:r,passwordVerification:n}),function(t,e,r){const n=[305419896,591751049,878082192];if(Object.assign(t,{A:n,R:new Qt(n[0]),D:new Qt(n[2])}),r)for(let e=0;e<r.length;e++)Ye(t,r[e]);else for(let r=0;r<e.length;r++)Ye(t,e.charCodeAt(r))}(t,e,r)}function qe(t,e){const r=new Uint8Array(e.length);for(let n=0;n<e.length;n++)r[n]=Xe(t)^e[n],Ye(t,r[n]);return r}function Ke(t,e){const r=new Uint8Array(e.length);for(let n=0;n<e.length;n++)r[n]=Xe(t)^e[n],Ye(t,e[n]);return r}function Ye(t,e){let[,r]=t.A;t.R.append([e]);const n=~t.R.get();r=Je(Math.imul(Je(r+$e(n)),134775813)+1),t.D.append([r>>>24]);const o=~t.D.get();t.A=[n,r,o]}function Xe(t){const e=2|t.A[2];return $e(Math.imul(e,1^e)>>>8)}function $e(t){return 255&t}function Je(t){return 4294967295&t}function Qe(t){if(t instanceof ReadableStream)return t;const e=t.getReader();return new ReadableStream({async pull(t){try{const{value:r,done:n}=await e.read();n?t.close():t.enqueue(r)}catch(t){throw e.cancel(t).catch(()=>{}),t}},cancel:t=>e.cancel(t)})}function tr(t,e){t=Qe(t);const r=e?{type:e}:{};if(typeof Blob.prototype.stream!=k||new Blob([]).stream()instanceof ReadableStream)return new Response(t).blob().then(t=>e?new Blob([t],r):t);const n=[];return t.pipeTo(new WritableStream({write(t){n.push(t)}})).then(()=>new Blob(n,r))}function er(t){if(t instanceof WritableStream)return t;const e=t.getWriter();return new WritableStream({write:t=>e.write(t),close:()=>e.close(),abort:t=>e.abort(t)})}const rr="Invalid codec definition",nr="Reserved compression method",or="Invalid codec module",ar="Compression method not supported",ir=[0,8,9,99],sr=new Map,cr=new Map;function ur(t={}){const{compressionMethod:r,format:n,codecURI:o,CompressionStream:a,DecompressionStream:i,versionNeeded:s}=t;if(!Number.isInteger(r)||r<0||r>e||typeof n!=v||!n.length)throw new Error(rr);if(ir.includes(r))throw new Error(nr);const c=typeof a==k||typeof i==k;if(!(c||typeof o==v&&o.length))throw new Error(rr);sr.set(r,{compressionMethod:r,format:n,codecURI:o,versionNeeded:s}),c&&pr(n,{CompressionStream:a,DecompressionStream:i})}function lr(t){const e=sr.get(t);if(e){let r;sr.delete(t),sr.forEach(t=>r=r||t.format==e.format),r||cr.delete(e.format)}}function fr(t){return sr.get(t)}function dr(){return Array.from(sr.values(),t=>Object.assign({},t,cr.get(t.format)))}function wr(t){return cr.get(t)}function pr(t,e){const{CompressionStream:r,DecompressionStream:n}=e;if(typeof r!=k&&typeof n!=k)throw new Error(or);cr.set(t,{CompressionStream:r,DecompressionStream:n})}const mr="Invalid uncompressed size",hr="Invalid compressed data",yr="Invalid CRC32",br="deflate-raw",Er="deflate64-raw",Sr="gzip",gr=[31,139,8];class Ar extends TransformStream{constructor(t,{chunkSize:e,CompressionStreamFallback:r,CompressionStream:n}){super({});const{compressed:o,encrypted:a,useCompressionStream:i,zipCrypto:s,computeCrc32:c,level:u,deflate64:l,format:f,compressionMethod:d,inputSize:w}=t,p=this;let m,h,y,b=super.readable;const E=f&&wr(f),S=Ur(i,n,r),g=c&&o&&!l&&!E&&(!a||s)&&Boolean(S);if(a&&!s||!c||g||(m=new te,b=kr(b,m)),o)if(E)b=Cr(b,Ir(E.CompressionStream,f,{level:u,chunkSize:e,compressionMethod:d,uncompressedSize:w}));else if(g)y=new Rr,b=Cr(b,new S(Sr,{level:u,chunkSize:e})),b=kr(b,y);else try{b=Tr(b,i,{level:u,chunkSize:e},n,r)}catch(t){if(!i&&r)throw t;let e;try{e=new n(Sr)}catch{throw t}b=Cr(b,e),b=kr(b,new Rr)}a&&(s?b=kr(b,new He(t)):(h=new Ne(t),b=kr(b,h))),Or(p,b,()=>{a&&!s||!c||(p.crc32=g?y.crc32:new DataView(m.value.buffer).getUint32(0))})}}class Rr extends TransformStream{constructor(){let t,e=10,r=new Uint8Array(0);super({transform(t,n){if(e){const r=Math.min(e,t.length);if(e-=r,!(t=t.subarray(r)).length)return}const o=r.length+t.length;if(o<=8)return void(r=Bt(r,t));const a=o-8,i=Math.min(a,r.length);n.enqueue(Bt(r.subarray(0,i),t.subarray(0,a-i))),r=Bt(r.subarray(i),t.subarray(a-i))},flush(){const e=Wt(r);t.crc32=e.getUint32(0,!0),t.uncompressedSize=e.getUint32(4,!0)}}),t=this}}class zr extends TransformStream{constructor(t,{chunkSize:e,DecompressionStreamFallback:r,DecompressionStream:n}){super({});const{zipCrypto:o,encrypted:a,checkCrc32:i,crc32:s,compressed:c,useCompressionStream:u,deflate64:l,format:f,compressionMethod:d,rawBitFlag:w,outputSize:p}=t;let m,h,y,b=super.readable;if(a&&(o?b=kr(b,new Ve(t)):(h=new Me(t),b=kr(b,h))),c){const t=f&&wr(f);if(t)b=Cr(b,Ir(t.DecompressionStream,f,{chunkSize:e,compressionMethod:d,rawBitFlag:w,uncompressedSize:p}));else{let t;const o=Ur(u,n,r);if(i&&!l&&s!==I&&p!==I&&o)try{t=new o(Sr,{chunkSize:e})}catch{t=I}if(!t)try{b=Tr(b,u,{chunkSize:e,deflate64:l},n,r)}catch(e){if(l||p===I||!u&&r)throw e;try{t=new n(Sr)}catch{throw e}}t&&(y=!0,b=function(t,e,r,n){const o=e.writable.getWriter(),a=e.readable.getReader(),i=n===I?new Qt:I;let s,c,u=0,l=!1,f=!1,d=!1,w=0,p=!1;const m=new Promise((t,e)=>{s=t,c=e});return m.catch(()=>{}),async function(){const e=t.getReader();try{const t=new Uint8Array(10);for(t.set(gr),await o.write(t);;){await o.ready;const{value:t,done:r}=await e.read();if(r)break;await o.write(t)}l=!0,i&&(p&&y(),await m);const a=new Uint8Array(8),s=Wt(a);s.setUint32(0,i?i.get():n,!0),s.setUint32(4,r,!0),f=!0,await o.write(a),await o.close()}catch(t){await vr(o,t),await Mr(e,t)}}(),new ReadableStream({async pull(t){try{const{value:e,done:n}=await function(){w++,p=!0;const t=a.read();return t.then(h,h),l&&i&&y(),t}();if(n)t.close();else{if(u+=e.length,u>r)throw new Error(mr);i&&i.append(e),t.enqueue(e)}}catch(t){throw c(t),await Mr(a,t),f?function(t){const e=new Error(u==r?yr:mr);return e.cause=t,e}(t):t}},cancel:t=>(c(t),a.cancel(t))});function h(){p=!1}async function y(){if(!d){d=!0;const t=w;await new Promise(t=>{const{port1:e,port2:r}=new MessageChannel;r.onmessage=()=>{e.close(),r.close(),t()},e.postMessage(I)}),d=!1,p&&(w==t?s():y())}}}(b,t,p,s))}b=function(t){const e=t.getReader();return new ReadableStream({async pull(t){try{const{value:r,done:n}=await e.read();n?t.close():t.enqueue(r)}catch(t){if(await Mr(e,t),t&&t.message)throw t;const r=new Error(hr);throw r.cause=t,r}},cancel:t=>e.cancel(t)})}(b)}i&&!y&&(m=new te,b=kr(b,m)),Or(this,b,()=>{if(m){const t=new DataView(m.value.buffer).getUint32(0,!1);if(s!=t)throw new Error(yr)}})}}const Dr=new Map;function xr(t,e){if(!t)return!1;let r=Dr.get(t);r||(r=new Map,Dr.set(t,r));let n=r.get(e);if(n===I){try{new t(e),n=!0}catch{n=!1}r.set(e,n)}return n}function Fr(t){return xr(t,br)}function Or(t,e,r){e=kr(e,new TransformStream({flush:r})),Object.defineProperty(t,"readable",{get:()=>e})}function Ir(t,e,r){if(!t)throw new Error(ar);return new t(e,r)}function Ur(t,e,r){return t&&e?e:r&&r.requiresModule?r:void 0}function Tr(t,e,r,n,o){const a=e&&n?n:o||n,i=r.deflate64?Er:br;let s;try{s=new a(i,r)}catch(t){if(!e||!o||a==o)throw t;s=new o(i,r)}return Cr(t,s)}function kr(t,e){return Qe(t).pipeThrough(e)}function Cr(t,e){const r=e.writable.getWriter(),n=t.getReader();return async function(){try{for(;;){await r.ready;const t=await n.read();if(t.done){await r.close();break}await r.write(t.value)}}catch(t){await vr(r,t),await Mr(n,t)}}(),e.readable}async function vr(t,e){try{await t.abort(e)}catch{}}async function Mr(t,e){try{await t.cancel(e)}catch{}}const Nr="data",_r="deflate",Pr="inflate";class jr extends TransformStream{constructor(t,e){super({});const r=this,{codecType:n}=t;let o;n.startsWith(_r)?o=Ar:n.startsWith(Pr)&&(o=zr),r.outputSize=0;let a=0;const i=new o(t,e),s=super.readable,c=new TransformStream({transform(t,e){t&&t.length&&(a+=t.length,e.enqueue(t))},flush(){Object.assign(r,{inputSize:a})}}),u=new TransformStream({transform(e,n){if(e&&e.length&&(n.enqueue(e),r.outputSize+=e.length,t.outputSize!==I&&r.outputSize>t.outputSize))throw new Error(mr)},flush(){const{crc32:t}=i;Object.assign(r,{crc32:t,inputSize:a})}});Object.defineProperty(r,"readable",{get:()=>s.pipeThrough(c).pipeThrough(i).pipeThrough(u)})}}class Br extends TransformStream{constructor(t){const e=[];let r=0,n=0;function o(){const n=new Uint8Array(t);let o=0;for(;o<t;){const r=e[0],a=t-o;r.length<=a?(n.set(r,o),o+=r.length,e.shift()):(n.set(r.subarray(0,a),o),e[0]=r.subarray(a),o+=a)}return r-=t,n}(!Number.isFinite(t)||t<1)&&(t=65536),super({transform(a,i){for(e.push(a),r+=a.length;r>t;)n+=t,i.enqueue(o())},flush(t){r&&(n+=r,t.enqueue(function(t,e){const r=new Uint8Array(e);let n=0;for(const e of t)r.set(e,n),n+=e.length;return r}(e,r)))}}),Object.defineProperty(this,"outputSize",{get:()=>n})}}const Lr="Worker startup timeout";let Wr,Zr,Vr,Hr=()=>{};async function Gr(t){const{CompressionStream:e,CompressionStreamFallback:r}=t;return!(!r||r.requiresModule)||!(!Fr(e)&&(n=e,!xr(n,Sr)))||!!r&&await qr(t);var n}async function qr(t){if(Hr)try{return await Hr(t),!0}catch{}return!1}function Kr(t){t.createWorker?Zr=!0:Wr=!1}class Yr{constructor(t,{readable:e,writable:r},n,o){const{options:a,config:i,F:s,useWebWorkers:c,transferStreams:u,workerURI:l}=n;let{createWorker:f}=n;const{signal:d}=s;return Zr&&(f=I),Object.assign(t,{O:!0,I:(t.I||0)+1,readable:e.pipeThrough(new Br(kt(i))).pipeThrough(new Xr(s),{signal:d}),writable:r,options:Object.assign({},a),U:n,workerURI:l,createWorker:f,transferStreams:u,terminate:()=>new Promise(e=>{const{T:r,O:n}=t;n?(t.C=t.C||[],t.C.push(e)):(r&&(r.terminate(),t.T=null),e()),t.v=null}),M(){if(t.O){const{C:e,T:r}=t;e&&(t.C=null,r&&(t.N=!0,r.terminate())),t.O=!1;const n=o(t);e&&e.forEach(t=>t(n))}}}),Wr===I&&(Wr=typeof Worker!=T),(c&&Vr&&(Wr&&l||f)?Vr:Jr)(t,i)}}class Xr extends TransformStream{constructor({onstart:t,onprogress:e,size:r,onend:n}){let o=0;super({async start(){t&&await $r(t,r)},async transform(t,n){o+=t.length,e&&await $r(e,o,r),n.enqueue(t)},async flush(){n&&await $r(n,o)}})}}async function $r(t,...e){try{await t(...e)}catch{}}function Jr(t,e){return{run:()=>Qr(t,e)}}async function Qr({options:t,readable:e,writable:r,M:n,U:o},a){let i,s,c;try{if(t.compressed&&!t.format){const e=t.codecType.startsWith(_r),r=e?a.CompressionStreamFallback:a.DecompressionStreamFallback,n=e?a.CompressionStream:a.DecompressionStream;t.useCompressionStream?r&&r.requiresModule&&!Fr(n)&&await u():await u()||r&&!r.requiresModule||(t.useCompressionStream=!0)}t.encrypted&&!t.zipCrypto&&await u(),i=new jr(t,a),s=new Br(kt(a)),await e.pipeThrough(i).pipeThrough(s).pipeTo(r,{preventClose:!0,preventAbort:!0});const{crc32:n,inputSize:o,outputSize:c}=i;return{crc32:n,inputSize:o,outputSize:c}}catch(t){if(i){const e=s?s.outputSize:0;if(o.outputSize=e,Zt(t))try{t.outputSize=e}catch{}}throw t}finally{n()}function u(){return c||(c=qr(a)),c}}const tn={type:"module"},en="error";let rn,nn,on,an=!0;try{an=typeof structuredClone==k&&structuredClone(new DOMException("","AbortError")).code!==I}catch{}var sn;function cn(t){const{reader:e}=t;e&&e.releaseLock(),t.reader=null,t.writer=null}function un(t){const{T:e}=t;if(e)try{e.terminate()}catch{}t.v=null}function ln(t,e,r,n,o=!0){const{createWorker:a}=r;let i,s,c;if(a)i=a();else if(nn===I||rn!==t){const a=typeof t==k;s=a?t(o):t;const u=s.startsWith("data:"),l=s.startsWith("blob:");if(u||l){n===I&&(n=!1),n&&(c=tn);try{i=new Worker(s,c)}catch(o){if(l)try{URL.revokeObjectURL(s)}catch{}if(a&&l)return ln(t,e,r,n,!1);if(n)throw o;return ln(t,e,r,!0,!1)}}else{n===I&&(n=!0),n&&(c=tn);try{s=new URL(s,e)}catch{}try{i=new Worker(s,c)}catch(a){if(n)return ln(t,e,r,!1,o);throw a}}rn=t,nn=s,on=c}else i=new Worker(nn,on);return i.addEventListener("message",t=>{r._=!0,fn(r),async function({data:t},e){const{type:r,value:n,messageId:o,result:a,error:i,errorValue:s}=t,{reader:c,writer:u,P:l,j:f,M:d,I:w}=e,p=()=>e.I!=w;try{if(i)m(function(t,e){const{message:r,stack:n,code:o,name:a,outputSize:i,cause:s,codecImportFailed:c}=t;let u;if(e?u=e.value:(u=Object.assign(new Error(r),{stack:n,code:o,name:a}),s&&(u.cause=Object.assign(new Error(s.message),{name:s.name}))),Zt(u))try{i!==I&&(u.outputSize=i),c&&(u.codecImportFailed=!0),e&&(u.name!==a&&(u.name=a),u.code!==o&&(u.code=o))}catch{}return u}(i,s));else{if("pull"==r){const{value:t,done:r}=await c.read();p()||wn({type:Nr,value:t,done:r,messageId:o},e)}if(r==Nr){const t=new Uint8Array(n);await u.ready,await u.write(t),p()||wn({type:"ack",messageId:o},e)}"close"==r&&function(t){p()||(l(t),h(),d())}(a)}}catch(i){p()||(un(e),m(i))}function m(t){p()||(f(t),h(),Zt(t)&&t.codecImportFailed||d())}function h(){u&&u.releaseLock()}}(t,r)}),i.addEventListener(en,t=>dn(t,r)),i.addEventListener("messageerror",t=>dn(t,r)),i}function fn(t){const{B:e}=t;e&&(clearTimeout(e),t.B=null)}function dn(t,e){t.preventDefault&&t.preventDefault(),fn(e);const{_:r,j:n,writer:o,M:a}=e;un(e),r||(e.T=null);let i=t.error||new Error(t.message||en);r||(i=Object.assign(new Error(i.message||en),{L:!0}),e.W=i),n&&(n(i),o&&o.releaseLock(),r&&a())}function wn(t,{T:e,writer:r,transferStreams:n,_:o}){try{const{value:r,readable:a,writable:i}=t,s=[];if(r&&(t.value=Lt(r),s.push(t.value.buffer)),n&&an&&o?(a&&s.push(a),i&&s.push(i)):t.readable=t.writable=null,s.length)try{return e.postMessage(t,s),!0}catch{an=!1,t.readable=t.writable=null,e.postMessage(t)}else e.postMessage(t)}catch(t){throw r&&r.releaseLock(),t}}sn=function(t,e){const{baseURI:r,chunkSize:n,workerStartupTimeout:o}=e;let{wasmURI:a}=e;if(!t.v){let i;typeof a==k&&(a=a());try{i=ln(t.workerURI,r,t)}catch{return Kr(t),Jr(t,e)}Object.assign(t,{T:i,_:!1,N:!1,W:null,v:{run:async()=>{try{return await async function(t,e){if(!t.T){const{W:e}=t;t.W=null;const r=e||new Error(Lr);throw r.L=!0,r}let r,n;const o=new Promise((e,o)=>{r=e,n=e=>{const{outputSize:r,U:n}=t;if(n.outputSize=r,Zt(e))try{e.outputSize=r}catch{}o(e)}});Object.assign(t,{reader:null,writer:null,outputSize:0,Z:!1,V:null,P:r,j:n,result:o});const{readable:a,options:i}=t,{writable:s,closed:c,H:u}=function(t,e){const r=new AbortController;let n;const{writable:o,readable:a}=new TransformStream({transform(t,r){e.outputSize+=t.length,r.enqueue(t)}}),i=a.pipeTo(t,{preventClose:!0,preventAbort:!0,signal:r.signal});return i.catch(t=>{n||Object.assign(e,{Z:!0,V:t})}),{writable:o,closed:i,H:()=>{n=!0,r.abort()}}}(t.writable,t);let l;try{l=wn({type:"start",options:i,config:e,readable:a,writable:s},t)}catch(e){u();try{await c}catch{}throw t.M(),e}l||Object.assign(t,{reader:a.getReader(),writer:s.getWriter()});const{workerStartupTimeout:f}=e;!t._&&Number.isFinite(f)&&f>=0&&(t.B=setTimeout(()=>function(t){if(t.B=null,t._)return;const{j:e,writer:r}=t;if(un(t),t.T=null,e){const t=new Error(Lr);t.L=!0,e(t),r&&r.releaseLock()}}(t),f));try{const t=await o;return await d(),await c,t}catch(e){await d(),u();try{await c}catch{}const{outputSize:r,U:n,Z:o,V:a}=t;n.outputSize=r;const i=Zt(e)&&(e.codecImportFailed||e.L),s=o&&!i?a:e;if(Zt(s))try{s.outputSize=r}catch{}throw s}async function d(){if(!l&&!s.locked)try{await s.getWriter().close()}catch{}}}(t,{chunkSize:n,wasmURI:a,baseURI:r,workerStartupTimeout:o})}catch(r){if(r&&r.L)return Kr(t),cn(t),Qr(t,e);if(r&&r.codecImportFailed){if(t.reader)return cn(t),Qr(t,e);t.M()}throw r}}}})}return t.v},Vr=sn;let pn=[];const mn=[];let hn,yn,bn=0;async function En(t,e){const{options:r,config:n}=e,{transferStreams:o,useWebWorkers:a,useCompressionStream:i,compressed:s,checkCrc32:c,computeCrc32:u,encrypted:l,format:f,codecURI:d}=r,{workerURI:w,createWorker:p,maxWorkers:m}=n;f&&(d&&(r.codecURI=function(t,e){try{return new URL(t,e).toString()}catch{return t}}(d,n.baseURI)),await async function(t,e){!cr.has(t)&&e&&pr(t,await(import(/* webpackIgnore: true */ /* @vite-ignore */e)))}(f,r.codecURI)),e.transferStreams=!f&&(o||o===I&&n.transferStreams);const h=!(s||c||u||l),y=f===I||Boolean(r.codecURI);return e.useWebWorkers=!h&&y&&(a||a===I&&n.useWebWorkers),e.workerURI=e.useWebWorkers&&w?w:I,e.createWorker=e.useWebWorkers&&p?p:I,r.useCompressionStream=i||i===I&&n.useCompressionStream,(await async function(){const r=pn.find(t=>!t.O);if(r)return xn(r),new Yr(r,t,e,b);if(pn.length<m){const r={G:bn};return bn++,pn.push(r),new Yr(r,t,e,b)}return new Promise(r=>{mn.push({resolve:r,stream:t,U:e}),yn=n.workerStarvationTimeout,Sn()})}()).run();function b(t){if(gn(),t.N)return t.N=!1,Rn();if(mn.length){const[{resolve:e,stream:r,U:n}]=mn.splice(0,1);e(new Yr(t,r,n,b)),Sn()}else t.T?(xn(t),function(t,e){const{config:r}=e,{terminateWorkerTimeout:n}=r;Number.isFinite(n)&&n>=0&&(t.K=setTimeout(async()=>{pn=pn.filter(e=>e!=t);try{await t.terminate()}catch{}},n))}(t,e)):pn=pn.filter(e=>e!=t)}}function Sn(){!hn&&mn.length&&Number.isFinite(yn)&&yn>=0&&(hn=setTimeout(An,yn))}function gn(){hn&&(clearTimeout(hn),hn=null)}function An(){if(hn=null,mn.length){const[{resolve:t,stream:e,U:r}]=mn.splice(0,1);t(new Yr({},e,zn(r),Dn)),Sn()}}function Rn(){const t=mn.splice(0).map(({resolve:t,stream:e,U:r})=>new Promise(n=>{t(new Yr({},e,zn(r),()=>{Dn(),n()}))}));return gn(),Promise.all(t)}function zn(t){return Object.assign({},t,{useWebWorkers:!1,workerURI:I,createWorker:I})}function Dn(){gn(),Sn()}function xn(t){const{K:e}=t;e&&(clearTimeout(e),t.K=null)}const Fn="\0\u263a\u263b\u2665\u2666\u2663\u2660\u2022\u25d8\u25cb\u25d9\u2642\u2640\u266a\u266b\u263c\u25ba\u25c4\u2195\u203c\xb6\xa7\u25ac\u21a8\u2191\u2193\u2192\u2190\u221f\u2194\u25b2\u25bc !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\u2302\xc7\xfc\xe9\xe2\xe4\xe0\xe5\xe7\xea\xeb\xe8\xef\xee\xec\xc4\xc5\xc9\xe6\xc6\xf4\xf6\xf2\xfb\xf9\xff\xd6\xdc\xa2\xa3\xa5\u20a7\u0192\xe1\xed\xf3\xfa\xf1\xd1\xaa\xba\xbf\u2310\xac\xbd\xbc\xa1\xab\xbb\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255d\u255c\u255b\u2510\u2514\u2534\u252c\u251c\u2500\u253c\u255e\u255f\u255a\u2554\u2569\u2566\u2560\u2550\u256c\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256b\u256a\u2518\u250c\u2588\u2584\u258c\u2590\u2580\u03b1\xdf\u0393\u03c0\u03a3\u03c3\xb5\u03c4\u03a6\u0398\u03a9\u03b4\u221e\u03c6\u03b5\u2229\u2261\xb1\u2265\u2264\u2320\u2321\xf7\u2248\xb0\u2219\xb7\u221a\u207f\xb2\u25a0\xa0".split("");function On(t,e){return Un(t,e,!0)}function In(t){if(!t.some(t=>t>127))return!1;try{return new TextDecoder("utf-8",{fatal:!0}).decode(t),!0}catch{return!1}}function Un(t,e,r){return e&&"cp437"==e.trim().toLowerCase()?function(t){let e="";for(let r=0;r<t.length;r++)e+=Fn[t[r]];return e}(t):new TextDecoder(e,{ignoreBOM:r}).decode(t)}const Tn="HTTP error ",kn="HTTP Range not supported",Cn="HTTP resource changed",vn="Writer iterator completed too soon",Mn="Writer not initialized",Nn="Invalid writer (size must be writable)",_n="Content-Range",Pn="Range",jn="GET",Bn="bytes",Ln=16777216,Wn="writable",Zn=Symbol();class Vn{constructor(){this.size=0}init(){this.initialized=!0}}class Hn extends Vn{get readable(){return this.createReadable()}createReadable({offset:t=0,size:e,chunkSize:r=kt(Tt())}={}){const n=this;let o=0;return r=Ct(r),new ReadableStream({async pull(a){const i=e===I?r:Math.min(r,e-o),s=await ko(n,t+o,i);s.length&&(a.enqueue(s),o+=s.length),(e!==I&&o>=e||!s.length&&i)&&a.close()}})}}class Gn extends Vn{constructor(){super();const t=this,e=new WritableStream({write(e){if(!t.initialized)throw new Error(Mn);return t.writeUint8Array(Lt(e))}});Object.defineProperty(t,Wn,{get:()=>e})}writeUint8Array(){}}class qn extends Hn{constructor(t){super();let e=t.length;for(;"="==t.charAt(e-1);)e--;const r=t.indexOf(",")+1;Object.assign(this,{Y:t,X:r,size:Math.floor(.75*(e-r))})}readUint8Array(t,e){const{X:r,Y:n}=this,o=new Uint8Array(e),a=4*Math.floor(t/3),i=atob(n.substring(a+r,4*Math.ceil((t+e)/3)+r)),s=t-3*Math.floor(a/4);let c=0;for(let t=s;t<s+e&&t<i.length;t++)o[t-s]=i.charCodeAt(t),c++;return c<o.length?o.subarray(0,c):o}}class Kn extends Gn{constructor(t){super(),Object.assign(this,{contentType:t,data:"data:"+(t||"")+";base64,",$:""})}writeUint8Array(t){const e=this;let r,n=e.$;const o=e.$.length;for(e.$="",r=0;r<3*Math.floor((o+t.length)/3)-o;r++)n+=String.fromCharCode(t[r]);for(;r<t.length;r++)e.$+=String.fromCharCode(t[r]);n.length>2?e.data+=btoa(n):e.$=n+e.$}getData(){return this.data+btoa(this.$)}}let Yn,Xn;class $n extends Hn{constructor(t){super(),Object.assign(this,{J:t,size:t.size}),Xn||(Xn=(async()=>{try{const t=new Blob([new Uint8Array(3)]).slice(1,2).stream().getReader();let e=0,r=await t.read();for(;!r.done;)e+=r.value.length,r=await t.read();Yn=1==e}catch{Yn=!1}})())}createReadable(t){const{J:e,size:r}=this,{offset:n=0,size:o=r-n}=t||{};if(typeof e.stream==k){if(!n&&o>=r)return Qe(e.stream());if(Yn)return Qe(e.slice(n,n+o).stream())}return super.createReadable(t)}async readUint8Array(t,e){const r=this,n=t+e,o=!t&&n>=r.size?r.J:r.J.slice(t,n);let a=await o.arrayBuffer();return a.byteLength>e&&(a=a.slice(t,n)),new Uint8Array(a)}}class Jn extends Vn{constructor(t){super();const e=this,r=new TransformStream;Object.defineProperty(e,Wn,{get:()=>r.writable}),e.contentType=t,e.et=tr(r.readable,t),e.et.catch(()=>{})}getData(){return this.et}}class Qn extends $n{constructor(t){super(new Blob([t],{type:"text/plain"}))}}function to(t){let e=0;for(let r=0;r<t.length;r++){const n=t.charCodeAt(r);n<128?e+=1:n<2048?e+=2:n<55296||n>=57344?e+=3:n<56320&&56320==(64512&t.charCodeAt(r+1))?(e+=4,r++):e+=3}return e}class eo extends Jn{constructor(t){super(),Object.assign(this,{encoding:t,nt:!t||"utf-8"==t.toLowerCase()})}async getData(){const{encoding:t,nt:e}=this,r=await super.getData();return r.text&&e?r.text():function(t,e){return Un(t,e,!1)}(new Uint8Array(await r.arrayBuffer()),t)}}class ro extends Hn{constructor(t,e){super(),oo(this,t,e)}async init(){await ao(this,Eo,mo),super.init()}createReadable(t){const e=this,{useRangeHeader:r,forceRangeRequests:n,size:o,ot:a}=e;if((r||n)&&o!==I){const{offset:r=0,size:n=o-r}=t||{},i=a&&r>=o-a.length;if(n>0&&r<o&&!i)return function(t,e,r){let n,o=e,a=0,i=r;return new ReadableStream({start:()=>s(),async pull(t){n||await s();const{value:e,done:r}=await n.read();if(r)throw new Error(kn);const o=e.length>a?e.subarray(0,a):e;a-=o.length,i-=o.length,o.length&&t.enqueue(o),a||(await async function(){const t=n;n=I,await t.cancel()}(),i||t.close())},cancel:t=>n&&n.cancel(t)});async function s(){const e=Math.min(t.maximumRangeSize,i),r=await Eo(jn,t,wo(t,o,e));if(206!=r.status)throw new Error(kn);const s=so(r);if(s!==I&&s!=o)throw new Error(kn);fo(t,r),lo(t,r),o+=e,a=e,n=r.body.getReader()}}(e,r,Math.min(n,o-r))}return super.createReadable(t)}readUint8Array(t,e){return io(this,t,e,Eo,mo)}}class no extends Hn{constructor(t,e){super(),oo(this,t,e)}async init(){await ao(this,So,ho),super.init()}readUint8Array(t,e){return io(this,t,e,So,ho)}}function oo(t,e,r){const{preventHeadRequest:n,useRangeHeader:o,forceRangeRequests:a,combineSizeEocd:i,checkResourceChanges:s=!0,maximumRangeSize:c=Ln,fetch:u}=r;delete(r=Object.assign({},r)).preventHeadRequest,delete r.useRangeHeader,delete r.forceRangeRequests,delete r.combineSizeEocd,delete r.checkResourceChanges,delete r.maximumRangeSize,delete r.useXHR,delete r.fetch,Object.assign(t,{url:e,options:r,preventHeadRequest:n,useRangeHeader:o,forceRangeRequests:a,combineSizeEocd:i,checkResourceChanges:s,maximumRangeSize:c,fetch:u})}async function ao(t,e,r){const{url:n,preventHeadRequest:o,useRangeHeader:a,forceRangeRequests:i,combineSizeEocd:s}=t;if(function(t){const{baseURI:e}=Tt(),{protocol:r}=new URL(t,e);return"http:"==r||"https:"==r}(n)&&(a||i)&&(typeof o==T||o)){const n=await e(jn,t,wo(t,s?-65557:void 0)),o=n.headers.get("Accept-Ranges");if(!(i||o&&o.toLowerCase()==Bn))throw new Error(kn);{let o;s&&206==n.status&&(o=new Uint8Array(await n.arrayBuffer())),lo(t,n);const a=co(n);a===I?await bo(t,e,r):t.size=a,o&&o.length&&so(n)===t.size-o.length&&(t.ot=o)}}else await bo(t,e,r)}async function io(t,e,r,n,o){const{useRangeHeader:a,forceRangeRequests:i,ot:s,size:c,options:u}=t;if(a||i){if(e>=c||0===r)return N;{if(e+r>c&&(r=c-e),s&&e>=c-s.length){const t=e-(c-s.length);return s.slice(t,t+r)}const o=await n(jn,t,wo(t,e,r));if(206!=o.status)throw new Error(kn);const a=so(o);if(a!==I&&a!=e)throw new Error(kn);fo(t,o),lo(t,o);const i=new Uint8Array(await o.arrayBuffer());if(i.length!=r)throw new Error(kn);return i}}{const{data:n}=t;return n||await o(t,u),t.data.subarray(e,e+r)}}function so(t){const e=t.headers.get(_n);if(e){const t=Number(e.trim().split(/[\s-]+/)[1]);if(!Number.isNaN(t))return t}}function co(t){const e=t.headers.get(_n);if(e){const t=e.trim().split(/\s*\/\s*/)[1];if(t&&"*"!=t){const e=Number(t);if(!Number.isNaN(e))return e}}}function uo({headers:t}){return{it:t.get("Etag")||I,lastModified:t.get("Last-Modified")||I}}function lo(t,e){const{checkResourceChanges:r,st:n}=t;r&&!n&&206==e.status&&(t.st=uo(e))}function fo(t,e){const{checkResourceChanges:r,st:n,size:o}=t;if(r){const t=co(e);if(t!==I&&o!==I&&t!=o)throw new Error(Cn);if(n){const t=uo(e);if(Object.entries(n).some(([e,r])=>r!==I&&t[e]!==I&&r!=t[e]))throw new Error(Cn)}}}function wo(t,e=0,r=1){return Object.assign({},po(t),{[Pn]:Bn+"="+(e<0?e:e+"-"+(e+r-1))})}function po({options:t}){const{headers:e}=t;if(e)return Symbol.iterator in e?Object.fromEntries(e):e}async function mo(t){await yo(t,Eo)}async function ho(t){await yo(t,So)}async function yo(t,e){const r=await e(jn,t,po(t));t.data=new Uint8Array(await r.arrayBuffer()),t.size=t.data.length}async function bo(t,e,r){if(t.preventHeadRequest)await r(t,t.options);else{const n=await e("HEAD",t,po(t)),o=n.headers.get("Content-Length");o&&!n.headers.get("Content-Encoding")?t.size=Number(o):await r(t,t.options)}}async function Eo(t,{fetch:e=fetch,options:r,url:n},o){const a=await e(n,Object.assign({},r,{method:t,headers:o}));if(a.status>=200&&a.status<=299)return a;throw 416==a.status?new Error(kn):new Error(Tn+(a.statusText||a.status))}function So(t,{url:e},r){return new Promise((n,o)=>{const a=new XMLHttpRequest;if(a.addEventListener("load",()=>{if(a.status>=200&&a.status<=299){const t=[];a.getAllResponseHeaders().trim().split(/[\r\n]+/).forEach(e=>{const r=e.trim().split(/\s*:\s*/);r[0]=r[0].trim().replace(/^[a-z]|-[a-z]/g,t=>t.toUpperCase()),t.push(r)}),n({status:a.status,arrayBuffer:()=>a.response,headers:new Map(t)})}else o(416==a.status?new Error(kn):new Error(Tn+(a.statusText||a.status)))},!1),a.addEventListener("error",t=>o(t.detail?t.detail.error:new Error("Network error")),!1),a.open(t,e),r)for(const t of Object.entries(r))a.setRequestHeader(t[0],t[1]);a.responseType="arraybuffer",a.send()})}class go extends Hn{constructor(t,e={}){super(),Object.assign(this,{url:t,reader:e.useXHR&&!e.fetch?new no(t,e):new ro(t,e)})}set size(t){}get size(){return this.reader.size}async init(){await this.reader.init(),super.init()}createReadable(t){return this.reader.createReadable(t)}readUint8Array(t,e){return this.reader.readUint8Array(t,e)}}class Ao extends go{constructor(t,e={}){super(t,Object.assign({},e,{useRangeHeader:!0}))}}class Ro extends Hn{constructor(t){super(),t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength),Object.assign(this,{ct:t,size:t.length})}readUint8Array(t,e){return this.ct.slice(t,t+e)}}class zo extends Gn{constructor(t){super(),this.ut=t||262144}init(t=0){Object.assign(this,{offset:0,ct:new Uint8Array(t>0?t:this.ut)}),super.init()}writeUint8Array(t){const e=this,r=e.offset+t.length;if(r>e.ct.length){let t=e.ct.length?2*e.ct.length:e.ut;for(;t<r;)t*=2;const n=e.ct;e.ct=new Uint8Array(t),e.ct.set(n)}e.ct.set(t,e.offset),e.offset+=t.length}getData(){return this.offset===this.ct.length?this.ct:this.ct.slice(0,this.offset)}}class Do extends Hn{constructor(t){super(),this.lt=t}async init(){const t=this;t.ft=0;const e=t.lt=await Promise.all(t.lt.map(To));t.wt=e.map(e=>{const r=t.size;return t.size+=e.size,r}),super.init()}ht(t){const{wt:e,size:r}=this,n=e[t];return n===I?r:n}async readUint8Array(t,e){const r=this,{lt:n}=this;let o,a=0,i=t;for(;n[a]&&i>=n[a].size;)i-=n[a].size,a++;const s=n[a];if(s){const n=s.size;if(i+e<=n)o=await ko(s,i,e);else{const a=n-i;o=Bt(await ko(s,i,a),await r.readUint8Array(t+a,e-a))}}else o=N;return r.ft=Math.max(a,r.ft),o}}class xo extends Vn{constructor(t,e=4294967295){super();const r=this;let n,o,a;Object.assign(r,{diskNumber:0,diskOffset:0,size:0,maxSize:e,availableSize:e});const i=new WritableStream({async write(e){if(e===Zn)return void(a&&await c());const{availableSize:i}=r;if(a)e.length>=i?(await s(e.subarray(0,i)),await c(),e.length>i&&await this.write(e.subarray(i))):await s(e);else{const{value:i,done:s}=await t.next();if(s&&!i)throw new Error(vn);n=i,n.size=0,n.maxSize&&(r.maxSize=n.maxSize),r.availableSize=r.maxSize,await Uo(n),o=i.writable,a=o.getWriter(),await this.write(e)}},async close(){a&&(await a.ready,await u())},async abort(t){a&&await a.abort(t)}});async function s(t){const e=t.length;e&&(await a.ready,await a.write(t),n.size+=e,r.availableSize-=e)}async function c(){await u(),r.diskOffset+=n.size,r.diskNumber++,a=null,r.availableSize=r.maxSize}async function u(){await a.close()}Object.defineProperty(r,Wn,{get:()=>i})}async closeDisk(){const t=this.writable.getWriter();try{await t.ready,await t.write(Zn)}finally{t.releaseLock()}}}class Fo{constructor(t){return Array.isArray(t)&&(t=new Do(t)),(t instanceof ReadableStream||typeof t.getReader==k)&&(t={readable:Qe(t)}),t}}class Oo{constructor(t){t.writable===I&&typeof t.next==k&&(t=new xo(t)),(t instanceof WritableStream||typeof t.getWriter==k)&&(t={writable:er(t)});try{t.size=t.size===I?0:t.size}catch{throw new Error(Nn)}return t}}function Io(t){return Boolean(t&&t.getData)}async function Uo(t,e){if(!t.init||t.initialized)return Promise.resolve();await t.init(e)}async function To(t){return t=new Fo(t),await Uo(t),t.size!==I&&t.readUint8Array||(t=new $n(await tr(t.readable)),await Uo(t)),t}function ko(t,e,r){return t.readUint8Array(e,r)}function Co(t,e){return t.createReadable?t.createReadable(e):t.readUint8Array?Hn.prototype.createReadable.call(t,e):t.readable}function vo(t,e,r){if(!t.some(t=>t.reason==e)){const n={reason:e};r!==I&&(n.filename=r),t.push(n)}}const Mo="filename",No="rawFilename",_o="comment",Po="rawComment",jo="uncompressedSize",Bo="compressedSize",Lo="offset",Wo="diskNumberStart",Zo="lastModDate",Vo="rawLastModDate",Ho="lastAccessDate",Go="rawLastAccessDate",qo="creationDate",Ko="rawCreationDate",Yo="internalFileAttributes",Xo="externalFileAttributes",$o="msdosAttributesRaw",Jo="msdosAttributes",Qo="msDosCompatible",ta="zip64",ea="encrypted",ra="version",na="versionMadeBy",oa="zipCrypto",aa="directory",ia="executable",sa="compressionMethod",ca="signature",ua="extraField",la="unixMode",fa="setuid",da="setgid",wa="sticky",pa=[Mo,No,jo,Bo,Zo,Vo,_o,Po,Ho,Go,qo,Ko,Lo,Wo,Yo,Xo,$o,Jo,Qo,ta,ea,ra,na,oa,aa,ia,"symlink",sa,ca,"crc32",ua,"extraFieldUnix","extraFieldInfoZip","extraFieldUnixType1","extraFieldPkwareUnix","uid","gid",la,"unixExternalUpper",fa,da,wa,"bitFlag","rawBitFlag","filenameLength","extraFieldLength","filenameUTF8","commentUTF8","rawExtraField","extraFieldZip64","extraFieldUnicodePath","extraFieldUnicodeComment","extraFieldAES","extraFieldNTFS","extraFieldExtendedTimestamp","extraFieldUSDZ"];class ma{constructor(t){pa.forEach(e=>this[e]=t[e])}}const ha=new Set([1,m,10,h,28789,25461,y,b,E,22613,13]);function ya(t,e,r){return t?e?12:16+4*r:0}const ba="File format is not recognized",Ea="End of central directory not found",Sa="End of Zip64 central directory locator not found",ga="Central directory header not found",Aa="Local file header not found",Ra="Zip64 extra field not found",za="File contains encrypted entry",Da="Encryption method not supported",xa="Split zip file",Fa="Overlapping entry found",Oa="Entry data out of bounds",Ia="Ambiguous archive",Ua="Encrypted central directory is not supported",Ta="Unsafe filename",ka="Invalid strictness (must be 'strict', 'balanced' or 'tolerant')",Ca="Invalid filenameValidation (must be 'strict', 'balanced' or 'tolerant')",va="Invalid maxAppendedDataSize (must be a number greater than or equal to 0)",Ma="64-bit value exceeds Number.MAX_SAFE_INTEGER",Na="unsorted central directory",_a="unknown version needed to extract",Pa="compressed patched data",ja="malformed extra field",Ba="unknown zip64 extensible data",La="wrapped entries count",Wa="appended data",Za="prepended data",Va="prepended central directory",Ha="trailing central directory data",Ga="duplicate filename",qa="mismatched zip64 end of central directory record",Ka="multiple end of central directory records",Ya="mismatched local file header (filename)",Xa="mismatched local file header (general purpose bit flag)",$a="mismatched local file header (compression method)",Ja="mismatched local file header (crc32 or sizes)",Qa=/^[a-zA-Z]:/,ti=/(^|[\\/])\.\.([\\/]|$)/,ei="utf-8",ri="cp437",ni=[[jo,t],[Bo,t],[Lo,t],[Wo,e]],oi={[e]:{yt:Li,bytes:4},[t]:{yt:Wi,bytes:8}},ai=BigInt(Number.MAX_SAFE_INTEGER);class ii{constructor(t,e={}){Object.assign(this,{reader:new Fo(t),options:e,bt:{Et:new Set,St:[],gt:[]}})}async*getEntriesGenerator(n={}){const a=this;let{reader:i}=a;if(await Uo(i),i.size!==I&&i.readUint8Array||(i=new $n(await tr(i.readable)),await Uo(i)),i.size<d)throw new Error(ba);const c=a.warnings=[],m=zi(n,a.options),h=m==rt,y=m!=ot,b=Fi(Mi(a,n,$),m),E=function(t,e){if(t===I)return e;if(!Ri(t))throw new Error(Ca);return t}(Mi(a,n,"filenameValidation"),m),S=Mi(a,n,"normalizeFilename"),{At:x,Rt:F}=await Oi(i,y,b);if(!x)throw await async function(t){return await Ai(t)==o}(i)?new Error(xa):new Error(Ea);y&&F>1&&vi(Ka);const O=Wt(x);let U=Li(O,12),T=Li(O,16);const k=x.offset,C=Bi(O,20),v=k+d+C,M=i.size-v;M>b&&vi(Wa),M>0&&vo(c,Wa);let _=Bi(O,4);const P=i.ft||0;let j,B,L,W,Z,V=Bi(O,6),H=Bi(O,10),G=0,q=p;const K=T==t||U==t||H==e||V==e;if(T!=t&&V!=e&&(T+=gi(i,V)),K){const r=x.offset>=w?await ko(i,x.offset-w,w):N,n=Wt(r);if(r.length==w&&Li(n,0)==l){T=gi(i,Li(n,4))+Wi(n,8);let r=await ko(i,T,p),o=Wt(r);const a=x.offset-w-p;if((r.length<p||Li(o,0)!=u)&&T!=a&&a>=0){const t=T;T=a,T>t&&(G=T-t),r=await ko(i,T,p),o=Wt(r)}if(r.length<p||Li(o,0)!=u)throw new Error(Sa);if(L=!0,W=Wi(o,4)>44,W){const t=Math.min(Wi(o,4)-44,i.size-T-p);t>0&&(q+=t,Z=function(t){const e={rawExtensibleData:t};if(t.length>=28){const r=Wt(t),n=Bi(r,26);Object.assign(e,{compressionMethod:Bi(r,0),compressedSize:Wi(r,2),uncompressedSize:Wi(r,10),encryptionAlgorithm:Bi(r,18),bitLength:Bi(r,20),flags:Bi(r,22),hashAlgorithm:Bi(r,24),hashData:t.subarray(28,28+n)})}return e}(await ko(i,T+p,t)))}_==e?_=Li(o,16):_!=Li(o,16)&&Ci(h,c,qa),V==e?V=Li(o,20):V!=Li(o,20)&&Ci(h,c,qa),H==e?H=Wi(o,32):H!=Wi(o,32)&&Ci(h,c,qa),U==t?U=Wi(o,40):U!=Wi(o,40)&&Ci(h,c,qa),T=gi(i,V)+Wi(o,48)+G}}let Y=U;const X=x.offset-(L?q+w:0);if(T>=i.size&&(G=i.size-T-U-d,T=i.size-U-d),P!=_)throw new Error(xa);if(T<0)throw new Error(ba);let J=0,Q=await ko(i,T,U),nt=Wt(Q);if(U){if(Q.length<4)throw new Error(ba);const t=X-U;if(T!=t&&V==_){const e=Li(nt,J)==s||Boolean(Z&&Z.compressedSize)||li(nt);let r=!e;if(!r&&t>=0&&t+4<=i.size&&(r=Li(Wt(await ko(i,t,4)),0)==s),r){const r=T;T=t,T>r&&(G+=T-r,j=e),Q=await ko(i,T,U),nt=Wt(Q)}}}const at=X-T;if(U!=at&&at>=0&&V==_&&(U=at,Q=await ko(i,T,U),nt=Wt(Q)),T<0||T>=i.size)throw new Error(ba);a.directoryOffset=T,a.directoryLength=Y;const it=Ni(a,n,"decryptCentralDirectory");let st,ct;if(it&&H&&Q.length>=4&&Li(nt,0)!=s&&(W||li(nt))){const t=function(t,e,r){const n=t&&t.compressedSize?t.compressedSize:e;return n>0&&n<=r?n:r}(Z,Y,Q.length);ct=Q.subarray(t),Q=await it(Q.subarray(0,t),Z),nt=Wt(Q),Y=Q.length,st=!0}Z&&!st&&(Q.length<4||Li(nt,0)==s)&&vo(c,Ba),B=T;const ut=Mi(a,n,"filenameEncoding"),lt=Mi(a,n,"commentEncoding"),ft=new Set;let dt,wt=-1;const pt=!h&&!L;!H&&pt&&(H=fi(nt,Q,J),H&&vo(c,La));for(let t=0;t<H;t++){const o=new ui(i,a.options);if(J+f>Q.length||Li(nt,J)!=s){if(0==t&&!st&&(W||li(nt)))throw new Error(Ua);throw new Error(ga)}wi(o,nt,J+6);const u=Boolean(o.bitFlag.languageEncodingFlag),l=J+f,d=l+o.filenameLength+o.extraFieldLength,w=Bi(nt,J+4),p=!(w>>8),m=w>>8==3,h=Bi(nt,J+32),y=d+h,b=new Uint8Array(Q.subarray(l,y)),x=b.subarray(0,o.filenameLength),F=b.subarray(o.filenameLength+o.extraFieldLength),O=u||!ut&&In(x),U=u||!lt&&In(F),T=Li(nt,J+38),k=T&r,C={readOnly:Boolean(1&k),hidden:Boolean(2&k),system:Boolean(4&k),directory:Boolean(16&k),archive:Boolean(32&k)},v=Li(nt,J+42),M=Ni(a,n,"decodeText")||On,N=O?ei:ut||ri,_=U?ei:lt||ri;let P=M(x,N,tt);if(P===I&&(P=On(x,N)),S){const t=S(P);t!==I&&(P=t)}if(xi(P,E)){const t=new Error(Ta);throw t.filename=P,t}let j=M(F,_,et);j===I&&(j=On(F,_)),Object.assign(o,{index:t,zt:st,versionMadeBy:w,msDosCompatible:p,zip64:!1,compressedSize:0,uncompressedSize:0,Dt:h,offset:v,diskNumberStart:Bi(nt,J+34),internalFileAttributes:Bi(nt,J+36),externalFileAttributes:T,msdosAttributesRaw:k,msdosAttributes:C,rawFilename:x,filenameUTF8:O,commentUTF8:U,rawExtraField:b.subarray(o.filenameLength,o.filenameLength+o.extraFieldLength),rawComment:F,filename:P,comment:j}),pi(o,o,nt,J+6)&&vo(c,ja,P),o.offset+=G;const L=gi(i,o.diskNumberStart)+o.offset;B=Math.min(L,B),L<wt&&vo(c,Na,P),wt=L,(o.version&r)>63&&vo(c,_a,P),32&~o.rawBitFlag||vo(c,Pa,P),ft.has(o.filename)&&(dt=!0),ft.add(o.filename);const Z=o.externalFileAttributes>>16&e;o.unixMode===I&&16877&Z&&(o.unixMode=Z);const V=Boolean(o.unixMode&R),q=Boolean(o.unixMode&z),K=Boolean(512&o.unixMode),Y=40960==((o.unixMode===I?Z:o.unixMode)&g),X=!Y&&(o.unixMode!==I?!!(73&o.unixMode):m&&!!(73&Z)),$=o.unixMode!==I&&(o.unixMode&g)==A,rt=(Z&g)==A;Object.assign(o,{setuid:V,setgid:q,sticky:K,symlink:Y,unixExternalUpper:Z,executable:X,directory:$||rt||p&&C.directory||o.filename.endsWith(D),zipCrypto:o.encrypted&&!o.extraFieldAES});const ot=new ma(o);if(ot.getData=(t,e)=>o.getData(t,ot,a.bt,e),ot.arrayBuffer=async t=>{const e=new TransformStream,r=tr(e.readable).then(t=>t.arrayBuffer());return r.catch(()=>{}),await o.getData(e,ot,a.bt,Object.assign({},t,{preventClose:!1})),r},J=y,t==H-1&&pt){const t=fi(nt,Q,J);t&&(H+=t,vo(c,La))}const{onprogress:at}=n;if(at)try{await at(t+1,H,new ma(o))}catch{}yield ot}let mt=J,ht=di(Q.subarray(J))||(st?di(ct):I);if(!ht&&!st){const t=T+J,e=Math.min(X-t,65541);e>=6&&(ht=di(await ko(i,t,e)))}ht&&(a.digitalSignature=ht,mt=J+6+ht.length),(J!=Y&&mt!=Y||!st&&J!=U&&mt!=U)&&Ci(h,c,Ha),dt&&Ci(h,c,Ga);const yt=Mi(a,n,"extractPrependedData"),bt=Mi(a,n,"extractAppendedData"),Et=(h||yt)&&H&&4==B&&await async function(t){const e=await Ai(t);return e==o||808471376==e}(i)?4:0;return h&&(G||H&&B>Et)&&vi(Za),(G||H&&B>4)&&vo(c,Za),j&&vo(c,Va),yt&&(a.prependedData=B>Et?await ko(i,Et,B-Et):N),a.comment=C?await ko(i,k+d,C):N,bt&&(a.appendedData=v<i.size?await ko(i,v,i.size-v):N),!0}async getEntries(t={}){const e=[];for await(const r of this.getEntriesGenerator(t))e.push(r);return e}async close(){const{reader:t}=this;t.readUint8Array||!t.readable||t.readable.locked||await t.readable.cancel()}[_](){return this.close()}}class si{constructor(t={}){let e;const{readable:r,writable:n}=new TransformStream({start(t){e=t}}),o=new ii(r,t),a=o.getEntriesGenerator(),i=new Set;this.readable=new ReadableStream({async pull(t){const{done:e,value:r}=await a.next();if(e)return t.close();const n=function(t,e){const{readable:r,writable:n}=new TransformStream;let o;const a={cancel:async t=>{e.delete(a),await(o?o.cancel(t):r.cancel(t))}};return a.readable=new ReadableStream({async pull(i){o||(o=r.getReader(),e.add(a),async function(){try{await t.getData(n,{preventClose:!1})}catch(t){try{await n.abort(t)}catch{}}finally{e.delete(a)}}());const{done:s,value:c}=await o.read();s?i.close():i.enqueue(c)},cancel:t=>a.cancel(t)},{highWaterMark:0}),a}(r,i),o={...r,readable:n.readable};delete o.getData,Object.defineProperties(o,{localDirectory:{get:()=>r.localDirectory,enumerable:!0},warnings:{get:()=>r.warnings,enumerable:!0}}),t.enqueue(o)},async cancel(t){const r=Array.from(i);i.clear(),e.error(t),await Promise.allSettled(r.map(e=>e.cancel(t))),await Promise.allSettled([a.return(),o.close()])}}),this.writable=n}}async function ci(t,e={}){if(t=new Fo(t),await Uo(t),t.size!==I&&t.readUint8Array||(t=new $n(await tr(t.readable)),await Uo(t)),t.size<d)return!1;const r=zi(e,{}),n=r!=ot,o=Fi(e[$],r),{At:a,Rt:i}=await Oi(t,n,o);if(!a||r==rt&&i>1)return!1;const s=Bi(Wt(a),20),c=a.offset+d+s;return t.size-c<=o}let ui=class{constructor(t,e){Object.assign(this,{reader:t,options:e})}async getData(t,e,o,i={}){const s=this,c=Tt(),{reader:u,index:l,offset:f,diskNumberStart:d,extraFieldAES:w,extraFieldZip64:p,compressionMethod:m,bitFlag:h,rawBitFlag:y,crc32:b,rawLastModDate:E,uncompressedSize:S,compressedSize:g}=s,{dataDescriptor:A}=h,R=e.localDirectory={},z=e.warnings=[],D=gi(u,d)+f,F=await ko(u,D,x),O=Wt(F);let U=Mi(s,i,P),T=Mi(s,i,j);const k=mt(Mi(s,i,B)),C=Boolean(k),v=!0===k;if(pt(U,T),U=U&&U.length?U:I,T=T&&T.length?T:I,w&&99!=w.originalCompressionMethod)throw new Error(ar);if(F.length<x||Li(O,0)!=n)throw new Error(Aa);wi(R,O,4);const{extraFieldLength:M,filenameLength:_}=R,G=R.dataOffset=D+x+_+M,q=Mi(s,i,"checkLocalDirectory"),K=zi(i,s.options),Y=function(t,e){return t===I?e!=ot:Boolean(t)}(q,K),X=Mi(s,i,"checkLocalFilename"),$=function(t,e){return t===I?e==rt:Boolean(t)}(X===I?q:X,K);let J=N;if($&&(_||M)){const t=await ko(u,D+x,_+M);J=t.subarray(0,_),R.rawExtraField=t.subarray(_)}else R.rawExtraField=M?await ko(u,D+x+_,M):N;$&&(R.rawFilename=J),pi(s,R,O,4,!0)&&vo(z,ja),function(t,e,r,n,o){const{rawFilename:a}=t,i=!o,s=t.zt&&!(8192&~e.rawBitFlag);!n||s||r.length==a.length&&!r.some((t,e)=>t!=a[e])||Ci(i,o,Ya),(2057&e.rawBitFlag)!=(2057&t.rawBitFlag)&&Ci(i,o,Xa),e.compressionMethod!=t.compressionMethod&&Ci(i,o,$a),e.bitFlag.dataDescriptor||s||!(e.crc32||e.compressedSize||e.uncompressedSize)||e.crc32==t.crc32&&e.compressedSize==t.compressedSize&&e.uncompressedSize==t.uncompressedSize||Ci(i,o,Ja)}(s,R,J,$,Y?I:z);const{lastAccessDate:Q,creationDate:tt,uid:et,gid:nt}=R;Q&&(e.lastAccessDate=Q),tt&&(e.creationDate=tt),et!==I&&e.uid===I&&(e.uid=et),nt!==I&&e.gid===I&&(e.gid=nt);const at=Mi(s,i,"checkPasswordOnly"),it=s.encrypted&&R.encrypted&&(!v||at),st=it&&!w;if(v||(e.zipCrypto=st),it&&!(64&~R.rawBitFlag))throw new Error(Da);const ct=C?I:fr(m);if(0!=m&&8!=m&&9!=m&&!ct&&!C)throw new Error(ar);if(it){if(!st&&(w.strength<1||w.strength>3))throw new Error(Da);if(!U&&!T)throw new Error(za)}if(G+g>u.size)throw new Error(Oa);const ut=g,lt=dt(Mi(s,i,L));wt(lt);let ft=Mi(s,i,"checkOverlappingEntry");const ht=Mi(s,i,"checkOverlappingEntryOnly");ht&&(ft=!0);const{onstart:yt,onprogress:bt,onend:Et}=i,St=0!=m&&!C,gt=C?g-ya(it,st,w&&w.strength):S,At=9==m;let Rt=Mi(s,i,Z);At&&(Rt=!1);const zt=Mi(s,i,"checkCrc32"),Dt=(zt===I?Mi(s,i,"checkSignature"):zt)&&!C&&(!it||st||w&&1==w.vendorVersion),xt={options:{codecType:Pr,password:U,rawPassword:T,zipCrypto:st,encryptionStrength:w&&w.strength,checkCrc32:Dt,checkAuthenticationCode:Mi(s,i,"checkAuthenticationCode"),passwordVerification:st&&(A?E>>>8&r:b>>>24&r),outputSize:gt,crc32:b,compressed:St,encrypted:it,useWebWorkers:Mi(s,i,W),useCompressionStream:Rt,transferStreams:Mi(s,i,V),deflate64:At,format:ct?ct.format:I,codecURI:ct?ct.codecURI:I,compressionMethod:m,rawBitFlag:y,checkPasswordOnly:at},config:c,F:{signal:lt,size:ut,onstart:yt,onprogress:bt,onend:Et}};let Ft,Ot,It;ft&&await async function({reader:t,xt:e,index:r,offset:n,crc32:o,compressedSize:i,uncompressedSize:s,dataOffset:c,dataDescriptor:u,extraFieldZip64:l,bt:f}){let d=0;if(u&&(d=l?20:12),d){const r=await ko(t,c+i,d+4),n=Wt(r);let u=r.length==d+4&&Li(n,0)==a;if(u){const t=Si(n,4,l);(e.encrypted&&!e.zipCrypto||t.crc32==o)&&t.compressedSize==i&&t.uncompressedSize==s?d+=4:u=!1}if(r.length>=d){const t=Si(n,u?4:0,l);t.signature=u,e.localDirectory.dataDescriptor=t}}const w={start:n,end:c+i+d,xt:e},{Et:p,St:m,gt:h}=f;if(!p.has(r)){const t=function(t,e){let r=0,n=t.length;for(;r<n;){const o=r+n>>>1;t[o].start<e.start?r=o+1:n=o}const o=t[r-1],a=t[r];return o&&Ei(e,o)?o:a&&Ei(e,a)?a:void 0}(m,w)||h.find(t=>Ei(w,t));if(t){const e=new Error(Fa);throw e.overlappingEntry=t.xt,e}p.add(r),h.push(w),h.length*h.length>m.length&&(h.sort((t,e)=>t.start-e.start),f.St=function(t,e){const r=[];let n=0,o=0;for(;n<t.length||o<e.length;)o==e.length||n<t.length&&t[n].start<e[o].start?r.push(t[n++]):r.push(e[o++]);return r}(m,h),h.length=0)}}({reader:u,xt:e,index:l,offset:D,crc32:b,compressedSize:g,uncompressedSize:S,dataOffset:G,dataDescriptor:A||R.bitFlag.dataDescriptor,extraFieldZip64:p||R.extraFieldZip64,bt:o});try{if(!ht){at&&(t=new WritableStream),t=new Oo(t),await Uo(t,function(t,e,r){return Math.min(t,r?1032*e:e)}(gt,g,St)),({writable:Ft}=t);const e=Qe(u.createReadable({offset:G,size:ut})),{outputSize:r}=await En({readable:e,writable:Ft},xt);if(r!=gt)throw Object.assign(new Error(mr),{outputSize:r});t.size+=r}}catch(e){const{outputSize:r}=xt;if(r!==I?t.size+=r:Zt(e)&&e.outputSize!==I&&(t.size+=e.outputSize),!at||!Zt(e)||e.message!=ge)throw Ot=e,It=!0,e}finally{if((Io(t)||!Mi(s,i,H))&&Ft&&!Ft.locked){const t=Ft.getWriter();if(It)try{await t.abort(Ot)}catch{}else await t.close()}}return at||ht?I:t.getData?t.getData():Ft}};function li(t){const e=Math.min(t.byteLength,1024)-3;for(let r=0;r<e;r++)if(134630224==Li(t,r))return!0;return!1}function fi(t,e,r){let n=0;for(;r+f<=e.length&&Li(t,r)==s;)r+=f+Bi(t,r+28)+Bi(t,r+30)+Bi(t,r+32),n++;return n%65536?0:n}function di(t){if(t.length>=6){const e=Wt(t);if(Li(e,0)==i){const r=Bi(e,4);if(6+r<=t.length)return new Uint8Array(t.subarray(6,6+r))}}}function wi(t,e,r){const n=t.rawBitFlag=Bi(e,r+2),o=!(1&~n),a=Li(e,r+6);Object.assign(t,{encrypted:o,version:Bi(e,r),bitFlag:{level:(6&n)>>1,dataDescriptor:!(8&~n),languageEncodingFlag:(n&S)==S},rawLastModDate:a,lastModDate:_i(a),filenameLength:Bi(e,r+22),extraFieldLength:Bi(e,r+24)})}function pi(t,e,r,n,o){const{rawExtraField:a}=e,i=e.extraField=new Map,s=Wt(a);let c=0,u=!1;try{for(;c<a.length;){const t=Bi(s,c),e=Bi(s,c+2);i.set(t,{type:t,data:a.slice(c+4,c+4+e)}),c+=4+e}}catch{u=!0}c>a.length&&(u=!0);const l=Bi(r,n+4);Object.assign(e,{signature:Li(r,n+10),crc32:Li(r,n+10),compressedSize:Li(r,n+14),uncompressedSize:Li(r,n+18)});const f=i.get(1);f&&(function(t,e){e.zip64=!0;const r=Wt(t.data),n=ni.filter(([t,r])=>e[t]==r),o=n.reduce((t,[,e])=>t+oi[e].bytes,0);if(t.data.length<o)throw new Error(Ra);for(let o=0,a=0;o<n.length;o++){const[i,s]=n[o],c=oi[s];e[i]=t[i]=c.yt(r,a),a+=c.bytes}}(f,e),e.extraFieldZip64=f);const d=i.get(28789);d&&(mi(d,Mo,No,e,t),e.extraFieldUnicodePath=d);const w=i.get(25461);w&&(mi(w,_o,Po,e,t),e.extraFieldUnicodeComment=w);const p=i.get(m);p&&p.data.length>=7?(function(t,e,r){const n=Wt(t.data),o=ji(n,4);Object.assign(t,{vendorVersion:ji(n,0),vendorId:ji(n,2),strength:o,originalCompressionMethod:r,compressionMethod:Bi(n,5)}),e.compressionMethod=t.compressionMethod,1!=t.vendorVersion&&(e.crc32=I)}(p,e,l),e.extraFieldAES=p):e.compressionMethod=l;const S=i.get(13);S&&(hi(S,e),e.extraFieldPkwareUnix=S);const g=i.get(22613);g&&(hi(g,e),e.extraFieldUnixType1=g);const A=i.get(10);A&&(function(t,e){const r=Wt(t.data);let n,o=4;try{for(;o<t.data.length&&!n;){const e=Bi(r,o),a=Bi(r,o+2);1==e&&(n=t.data.slice(o+4,o+4+a)),o+=4+a}}catch{}if(n&&24==n.length){const r=Wt(n),o=r.getBigUint64(0,!0),a=r.getBigUint64(8,!0),i=r.getBigUint64(16,!0);Object.assign(t,{rawLastModDate:o,rawLastAccessDate:a,rawCreationDate:i});const s={lastModDate:Pi(o),lastAccessDate:Pi(a),creationDate:Pi(i)};Object.assign(t,s),Object.assign(e,s,{rawLastAccessDate:a,rawCreationDate:i})}}(A,e),e.extraFieldNTFS=A);const R=i.get(E);let z;if(R&&(z=yi(R,e,!1),e.extraFieldUnix=R),!z){const t=i.get(b);t&&(yi(t,e,!0),e.extraFieldInfoZip=t)}const D=i.get(h);D&&(function(t,e,r){if(!t.data.length)return;const n=Wt(t.data),o=ji(n,0),a=[],i=[];r?(1&~o||(a.push(Zo),i.push(Vo)),2&~o||(a.push(Ho),i.push(Go)),4&~o||(a.push(qo),i.push(Ko))):t.data.length>=5&&(a.push(Zo),i.push(Vo));let s=1;a.forEach((r,o)=>{if(t.data.length>=s+4){const a=Li(n,s);e[r]=t[r]=new Date(1e3*(0|a));const c=i[o];t[c]=a}s+=4})}(D,e,o),e.extraFieldExtendedTimestamp=D);const x=i.get(y);return x&&(e.extraFieldUSDZ=x),u}function mi(t,e,r,n,o){if(t.data.length<5)return void(t.valid=!1);const a=Wt(t.data),i=new Qt;i.append(o[r]);const s=Wt(new Uint8Array(4));s.setUint32(0,i.get(),!0);const c=Li(a,1),u=ji(a,0);Object.assign(t,{version:u,[e]:On(t.data.subarray(5)),valid:1==u&&!o.bitFlag.languageEncodingFlag&&c==Li(s,0)}),t.valid&&(n[e]=t[e],n[e+"UTF8"]=!0)}function hi(t,e){if(t.data.length<8)return;const r=Wt(t.data),n={lastAccessDate:new Date(1e3*(0|Li(r,0))),lastModDate:new Date(1e3*(0|Li(r,4)))};t.data.length>=12&&(n.uid=Bi(r,8),n.gid=Bi(r,10)),Object.assign(t,n),Object.assign(e,n)}function yi(t,e,r){try{const n=Wt(t.data);let o,a;if(r){let e=0;const r=ji(n,e++),i=ji(n,e++);o=bi(t.data.subarray(e,e+i)),e+=i;const s=ji(n,e++);a=bi(t.data.subarray(e,e+s)),Object.assign(t,{version:r,uid:o,gid:a})}else t.data.length>=4&&(o=Bi(n,0),a=Bi(n,2),Object.assign(t,{uid:o,gid:a}));return o!==I&&(e.uid=o),a!==I&&(e.gid=a),o!==I||a!==I}catch{}}function bi(t){const e=new Uint8Array(4);return e.set(t,0),new DataView(e.buffer,e.byteOffset,4).getUint32(0,!0)}function Ei(t,e){return t.start<e.end&&e.start<t.end}function Si(t,e,r){const n=Li(t,e);let o,a;return r?(o=Wi(t,e+4),a=Wi(t,e+12)):(o=Li(t,e+4),a=Li(t,e+8)),{crc32:n,compressedSize:o,uncompressedSize:a}}function gi(t,e){return t.ht?t.ht(e):0}async function Ai(t){return Li(Wt(await ko(t,0,4)))}function Ri(t){return t===rt||t===nt||t===ot}function zi(t,e){return Di(t,Di(e,nt))}function Di(t,e){const r=t.strictness;if(r!==I){if(!Ri(r))throw new Error(ka);return r}const n=t.checkAmbiguity;return n===I?e:n?rt:e==ot?ot:nt}function xi(t,e){if(e==ot)return!1;const r=t.split("/");return r.length>1&&""===r[r.length-1]&&r.pop(),!!(ti.test(t)||t.startsWith("/")||t.startsWith("\\")||Qa.test(t))||e==rt&&(r.includes(".")||r.includes("")||t.includes("\0"))}function Fi(t,r){if(t!==I){const e=bt(t);if("number"!=typeof e||Number.isNaN(e)||e<0)throw new Error(va);return e}return r==rt?0:r==ot?1/0:e}async function Oi(t,e,r){const{size:n}=t,o=Math.min(n,65557),a={Ft:64};let i,s,c=0;for await(const[r,u,l,f,w]of Ii(t,o)){const o=Bi(r,f+20);if(w+d+o==n){const o=await Ti(t,r,u,f,w,n,a);if(2==o){if(i||(i=Ui(l,f,w)),c++,!e||c>1)break}else 1!=o||s||(s=Ui(l,f,w))}}return i||(i=s),i||(i=await async function(t,e,r){const{size:n}=t,o=Math.min(n,e==1/0?n:65557+e);let a,i;for await(const[e,s,c,u,l]of Ii(t,o)){const o=Ui(c,u,l);a||(a=o);const f=await Ti(t,e,s,u,l,n,r);if(2==f)return o;1!=f||i||(i=o)}return i||a}(t,r,a)),{At:i,Rt:c}}async function*Ii(t,e){const r=t.size-e,n=await ko(t,r,e),o=Wt(n);for(let t=n.length-d;t>=0;t--)Li(o,t)==c&&(yield[o,r,n,t,r+t])}function Ui(t,e,r){return{offset:r,buffer:new Uint8Array(t.subarray(e,e+d)).buffer}}async function Ti(r,n,o,a,i,c,u){const f=Bi(n,a+10),d=Li(n,a+12),p=Li(n,a+16);if(f==e||d==t||p==t)return await ki(r,n,o,i-w,c,u)==l?2:0;if(!f&&!d)return 1;const m=Bi(n,a+6);for(const t of[i-d,gi(r,m)+p])if(await ki(r,n,o,t,c,u)==s)return 2;return 0}async function ki(t,e,r,n,o,a){return n<0||n+4>o?I:n>=r?Li(e,n-r):a.Ft>0?(a.Ft--,Li(Wt(await ko(t,n,4)),0)):I}function Ci(t,e,r){t?vi(r):vo(e,r)}function vi(t){const e=new Error(Ia);throw e.reason=t,e}function Mi(t,e,r){return e[r]===I?t.options[r]:e[r]}function Ni(t,e,r){return ft(Mi(t,e,r))}function _i(t){const r=(4294901760&t)>>16,n=t&e,o=new Date(1980+((65024&r)>>9),((480&r)>>5)-1,31&r,(63488&n)>>11,(2016&n)>>5,2*(31&n),0);return o<O?O:o}function Pi(t){return new Date(Number(t/BigInt(1e4)-BigInt(116444736e5)))}function ji(t,e){return t.getUint8(e)}function Bi(t,e){return t.getUint16(e,!0)}function Li(t,e){return t.getUint32(e,!0)}function Wi(t,e){const r=t.getBigUint64(e,!0);if(r>ai)throw new Error(Ma);return Number(r)}var Zi=Object.freeze({__proto__:null,ERR_AMBIGUOUS_ARCHIVE:Ia,ERR_BAD_FORMAT:ba,ERR_CENTRAL_DIRECTORY_NOT_FOUND:ga,ERR_ENCRYPTED:za,ERR_ENCRYPTED_CENTRAL_DIRECTORY:Ua,ERR_ENTRY_DATA_OUT_OF_BOUNDS:Oa,ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND:Sa,ERR_EOCDR_NOT_FOUND:Ea,ERR_EXTRAFIELD_ZIP64_NOT_FOUND:Ra,ERR_INVALID_AUTHENTICATION_CODE:Se,ERR_INVALID_COMPRESSED_DATA:hr,ERR_INVALID_CRC32:yr,ERR_INVALID_FILENAME_VALIDATION:Ca,ERR_INVALID_MAX_APPENDED_DATA_SIZE:va,ERR_INVALID_PASSWORD:Ee,ERR_INVALID_STRICTNESS:ka,ERR_INVALID_UNCOMPRESSED_SIZE:mr,ERR_LOCAL_FILE_HEADER_NOT_FOUND:Aa,ERR_OVERLAPPING_ENTRY:Fa,ERR_SPLIT_ZIP_FILE:xa,ERR_UNSAFE_FILENAME:Ta,ERR_UNSUPPORTED_COMPRESSION:ar,ERR_UNSUPPORTED_ENCRYPTION:Da,ERR_UNSUPPORTED_UINT64:Ma,ERR_WORKER_STARTUP_TIMEOUT:Lr,WARNING_APPENDED_DATA:Wa,WARNING_COMPRESSED_PATCHED_DATA:Pa,WARNING_DUPLICATE_FILENAME:Ga,WARNING_MALFORMED_EXTRA_FIELD:ja,WARNING_MISMATCHED_LOCAL_FILE_HEADER_BIT_FLAG:Xa,WARNING_MISMATCHED_LOCAL_FILE_HEADER_COMPRESSION_METHOD:$a,WARNING_MISMATCHED_LOCAL_FILE_HEADER_CRC32_OR_SIZES:Ja,WARNING_MISMATCHED_LOCAL_FILE_HEADER_FILENAME:Ya,WARNING_MISMATCHED_ZIP64_END_OF_CENTRAL_DIRECTORY:qa,WARNING_MULTIPLE_END_OF_CENTRAL_DIRECTORY:Ka,WARNING_PREPENDED_CENTRAL_DIRECTORY:Va,WARNING_PREPENDED_DATA:Za,WARNING_TRAILING_CENTRAL_DIRECTORY_DATA:Ha,WARNING_UNKNOWN_VERSION:_a,WARNING_UNKNOWN_ZIP64_EXTENSIBLE_DATA:Ba,WARNING_UNSORTED_CENTRAL_DIRECTORY:Na,WARNING_WRAPPED_ENTRIES_COUNT:La,ZipReader:ii,ZipReaderStream:si,isZipFile:ci});const Vi="File already exists",Hi="Zip file comment exceeds 64KB",Gi="Invalid zip file comment (must be a Uint8Array)",qi="File entry comment exceeds 64KB",Ki="Invalid file entry comment (must be a string)",Yi="Invalid date (must be a valid Date instance)",Xi="File entry name exceeds 64KB",$i="Version exceeds 65535",Ji="The strength must equal 1, 2, or 3",Qi="Encryption is not supported in USDZ files",ts="Split zip files are not supported in USDZ files",es="Encryption is not supported when the 'passThrough' option is set to true (use 'compressed' instead)",rs="Invalid extra field (must be a Map)",ns="Invalid extra field type (must be integer 0..65535)",os="Invalid extra field data (must be a Uint8Array)",as="Extra field data exceeds 64KB",is=-2147483648,ss=2147483647,cs=BigInt(0),us=BigInt("0x7fffffffffffffff"),ls="Zip64 is not supported (set the 'zip64' option to 'true')",fs="Undefined uncompressed size",ds="Undefined compression method",ws="Undefined CRC32",ps="Undetermined size",ms="Undefined reader",hs="Invalid reader (must be a Reader instance, a ReadableStream instance, or an object with a 'readable' property)",ys="Zip file not empty",bs="Invalid uid (must be integer 0..2^32-1)",Es="Invalid gid (must be integer 0..2^32-1)",Ss="Invalid UNIX mode (must be integer 0..65535)",gs="Invalid unixExtraFieldType (must be 'infozip' or 'unix')",As="uid/gid must be 0..65535 for unixExtraFieldType 'unix' (use 'infozip' for larger ids)",Rs="Invalid msdosAttributesRaw (must be integer 0..255)",zs="Invalid msdosAttributes (must be an object with boolean flags)",Ds="Invalid level (must be integer 0..9)",xs="Signature data exceeds 64KB",Fs="Invalid entry option (must be an entry returned by ZipReader#getEntries())",Os="The last modification date of an entry encrypted with ZipCrypto cannot be changed when passThrough is set",Is="compression unavailable",Us="clamped last modification date",Ts=new Uint8Array([7,0,2,0,65,69,3,0,0]),ks="infozip",Cs="unix",vs=[8,9,5,3];let Ms=0;const Ns=[];class _s{constructor(t,e={}){t=new Oo(t);const{availableSize:r=U,maxSize:n=U}=t,o=r>0&&r!==U&&n>0&&n!==U;if(o&&e[X])throw new Error(ts);Object.assign(this,{writer:t,Ot:o,options:e,It:new Map,Ut:new Set,offset:e[Y]===I?t.size||t.writable.size||0:e[Y],Tt:e[Y]===I?0:e[Y]-(t.size||t.writable.size||0),kt:new Set,Ct:[],warnings:[],vt:0,Mt:0,Nt:I,_t:!1})}prependZip(t){return Ls(this,async function(t,e){if(t.Ut.size)throw new Error(ys);await t.Pt(e)}(this,t))}appendZip(t){return Ls(this,this.Pt(t))}async Pt(t){const e=this,{kt:r,Ut:n,It:a}=e;for(;r.size;)await Promise.allSettled(Array.from(r));let i;const s=new Promise(t=>i=t);r.add(s);const c=[];let u;try{t=new Fo(t),await Uo(t),t.size!==I&&t.readUint8Array||(t=new $n(await tr(t.readable)),await Uo(t));const{ZipReader:r}=await Promise.resolve().then(function(){return Zi}),i=new r(t),s=await i.getEntries();await i.close(),await Uo(e.writer);const{directoryOffset:l}=i;s.forEach(({filename:t})=>{if(n.has(t))throw new Error(Vi);n.add(t),c.push(t)}),e.jt=!0;const{Bt:f}=e;e.Bt=new Promise(t=>u=()=>{e.jt=!1,t()}),await f,e.Ot&&(delete e.Ot,await async function(t){return Wt(await ko(t,0,4)).getUint32(0,!0)==o}(t)||(await dc(e.writer,lc()),e.offset+=4));const d=await async function(t,e,r,n){const{writer:o}=t,a=new Map;if(o.closeDisk){const i=Array.from(r).sort((t,r)=>uc(e,t)-uc(e,r));let s=0;for(const r of i){const n=uc(e,r);await sc(t,e,s,n-s),oc(o,await cc(e,n))&&await o.closeDisk(),a.set(r,{offset:ac(t,o),diskNumberStart:rc(o)}),s=n}await sc(t,e,s,n-s)}else{const o=t.offset;await sc(t,e,0,n),r.forEach(t=>a.set(t,{offset:o+uc(e,t),diskNumberStart:0}))}return a}(e,t,s,l);s.forEach(t=>{const{version:e,rawLastModDate:r,rawFilename:n,bitFlag:o,encrypted:i,uncompressedSize:s,compressedSize:c,extraFieldZip64:u}=t;let{compressionMethod:l,rawExtraField:f}=t;const{level:w,languageEncodingFlag:p,dataDescriptor:m}=o;f=ic(f||N),t.extraFieldAES&&(l=99);const h=Oc(f),y=Boolean(u)&&u.uncompressedSize!==I,b=Boolean(u)&&u.compressedSize!==I,E=-7&Tc(w,p,m,i,l)|w<<1,{Lt:S,Wt:g}=Ic({version:e,bitFlag:E,compressionMethod:l,uncompressedSize:s,compressedSize:c,rawLastModDate:r,rawFilename:n,Zt:b,Vt:y,extraFieldLength:h}),{crc32:A}=t;A!==I&&Dc(g,10,A);const{offset:R,diskNumberStart:z}=d.get(t);Object.assign(t,{Ht:!0,Vt:y,Zt:b,offset:R,diskNumberStart:z,Gt:!1,qt:N,Kt:N,Yt:N,Xt:N,$t:N,rawExtraField:f,Jt:N,Lt:S,Wt:g}),a.set(t.filename,t)})}catch(t){throw c.forEach(t=>n.delete(t)),t}finally{i(),r.delete(s),u&&u()}}add(e="",n,o={}){const a=this,{kt:i}=a,s=async function(e,n,o,a){const i=(a=Object.assign({},a))[Q];if(i!==I){const{Qt:t,te:r}=Vs(i,mt(yc(e,a,B)),yc(e,a,Zo));delete a[Q],a=Object.assign(t,r,a)}if(yc(e,a,aa)&&!n.endsWith(D)&&(n+=D),e.Ut.has(n))throw new Error(Vi);e.Ut.add(n),Ms<Tt().maxWorkers?Ms++:await new Promise(t=>Ns.push(t));try{return await async function(e,n,o,a){const i=Hs(e,n,a);({name:n}=i);const s=Gs(e,n,a),{comment:c}=s,u=a[ua];e.It.set(n,I);const l=e.Nt,f={};let d,w;s.ee.keepOrder&&(f.re=new Promise(t=>d=t)),e.Nt=f;try{const{ee:c}=s;0==c.level||c.compressionMethod!==I||c.ne||await Gr(Tt())||(c.level=0,vo(e.warnings,Is,n));const u=await async function(t,e,{ee:r},n){if(r.ne&&!e&&!yc(t,n,aa))throw new Error(ms);let o;if(e){if(e=new Fo(e),await Uo(e),!e.readable&&!e.readUint8Array)throw new Error(hs);({size:o}=e)}return Object.assign({reader:e},Ks(t,Boolean(e),o,r,n))}(e,o,s,a);({reader:o}=u);const p=nc(e.writer),m=rc(e.writer);let h=a.crc32===I?a[ca]:a.crc32;const y=u.ee.encrypted&&!c.zipCrypto;if(c.ne&&!c.oe&&y&&(h=I),c.ne&&o&&!y&&h===I)throw new Error(ws);const b=Xs(a=Object.assign({},a,i.ee,s.ee,u.ee,{signature:a[ca],crc32:h,offset:e.offset-p,diskNumberStart:m,[X]:e.options[X]}));b.ae&&vo(e.warnings,Us,n);const E=Qs(a),S=Oc(b.ie,E.se);w=await async function(e,n,o,a,i){const{It:s,writer:c}=e,{keepOrder:u,dataDescriptor:l,ce:f,signal:d}=i,{ue:w,xt:p,le:m,fe:h}=a,y=e.options[X];let b,E,S,g,A,R,z,D=p,F=0;const O=u&&m?m.re:I;s.set(n,D);try{i.bufferedWrite||!u||e.jt||e.vt||e.Mt||!l&&!f?(b=!0,e.vt++,z=i.createTempStream?await i.createTempStream():new TransformStream(I,I,{highWaterMark:U}),z.size=0,await Uo(c)):(E=!0,e.Mt++,z=c,await O,await T()),await Uo(z);const p=nc(c);e.Ot&&!b&&await fc(e,c),y&&!b&&$s(a,e.offset-p);const{ie:m}=w;b||await k();const h=rc(c),S=ac(e,c);if(D.diskNumberStart=h,b||(A=!0,R=c.size,await dc(z,m)),D=await async function(e,n,{diskNumberStart:o,re:a},i,s,c){const{ue:u,de:l,we:f}=i,{Lt:d,Wt:w,lastModDate:p,rawLastModDate:m,encrypted:h,compressed:y,version:b,compressionMethod:E,qt:S,pe:g,Yt:A,me:R,he:z,Xt:D,$t:x,Kt:F}=u,{se:O}=l,{rawFilename:U,lastAccessDate:T,creationDate:k,password:C,rawPassword:v,level:M,useUnicodeFileNames:N,zip64:_,Ht:P,Vt:j,Zt:B,zipCrypto:L,dataDescriptor:W,directory:Z,executable:V,versionMadeBy:H,rawComment:G,rawExtraField:q,Jt:K,useWebWorkers:Y,transferStreams:X,onstart:$,onprogress:J,onend:Q,signal:tt,encryptionStrength:et,extendedTimestamp:rt,msDosCompatible:nt,internalFileAttributes:ot,externalFileAttributes:at,uid:it,gid:st,unixMode:ct,symlink:ut,setuid:lt,setgid:ft,sticky:dt,unixExternalUpper:wt,msdosAttributesRaw:pt,msdosAttributes:mt,useCompressionStream:ht,ne:yt,oe:bt,format:Et,codecURI:St}=c,gt={re:a,versionMadeBy:H,zip64:_,Ht:P,directory:Boolean(Z),executable:Boolean(V),filenameUTF8:Boolean(N),rawFilename:U,commentUTF8:Boolean(N),rawComment:G,qt:S,pe:g,Yt:A,Xt:D,$t:x,Kt:F,rawExtraField:q,Jt:K,extendedTimestamp:rt,msDosCompatible:nt,internalFileAttributes:ot,externalFileAttributes:at,diskNumberStart:o,uid:it,gid:st,unixMode:ct,symlink:Boolean(ut),setuid:lt,setgid:ft,sticky:dt,unixExternalUpper:wt,msdosAttributesRaw:pt,msdosAttributes:mt};let{crc32:At,uncompressedSize:Rt}=c,zt=0;yt||(Rt=0);const{writable:Dt}=n;if(e){const o=e.size,a=Qe(Co(e,{size:o})),i={options:{codecType:_r,inputSize:o,level:M,rawPassword:v,password:C,encryptionStrength:et,zipCrypto:h&&L,passwordVerification:h&&L&&m>>8&r,computeCrc32:!yt,compressed:y&&!yt,encrypted:h&&!bt,useWebWorkers:Y,useCompressionStream:ht,transferStreams:X,format:Et,codecURI:St,compressionMethod:E},config:s,F:{signal:tt,size:o,onstart:$,onprogress:J,onend:Q}};try{const e=await En({readable:a,writable:Dt},i);if(zt=e.outputSize,n.size+=zt,yt||(Rt=e.inputSize,h&&!L||(At=e.crc32)),!B&&zt>=t||!j&&Rt>=t)throw new Error(ls)}catch(t){const{outputSize:e}=i;throw e!==I?n.size+=e:Zt(t)&&t.outputSize!==I&&(n.size+=t.outputSize),t}}return function({crc32:t,compressedSize:e,uncompressedSize:r,ue:n,de:o},{zip64:a,zipCrypto:i,ne:s,dataDescriptor:c}){const{Wt:u,encrypted:l}=n,{ye:f,be:d}=o;l&&!i&&!s||t===I||(Dc(u,10,t),c&&Dc(f,d,t)),a?c&&(xc(f,d+4,BigInt(e)),xc(f,d+12,BigInt(r))):(Dc(u,14,e),Dc(u,18,r),c&&(Dc(f,d+4,e),Dc(f,d+8,r)))}({crc32:At,compressedSize:zt,uncompressedSize:Rt,ue:u,de:l},c),W&&await dc(n,O),Object.assign(gt,{uncompressedSize:Rt,compressedSize:zt,lastModDate:p,rawLastModDate:m,creationDate:k,lastAccessDate:T,encrypted:Boolean(h),zipCrypto:Boolean(L),size:f+zt,compressionMethod:E,version:b,Lt:d,Wt:w,signature:At,crc32:!h||L||yt?At:I,me:R,he:z,Vt:j,Zt:B}),gt}(o,z,D,a,Tt(),i),b||(A=!1),s.set(n,D),D.filename=n,b){if(await Promise.all([z.writable.getWriter().close(),O]),await T(),e.Ot&&await fc(e,c),g=!0,R=c.size,await k(),D.diskNumberStart=rc(c),D.offset=ac(e,c),y){const t=a.we;$s(a,e.offset-nc(c)),D.size+=a.we-t}!function({rawFilename:t,encrypted:e,zip64:r,pe:n,crc32:o,compressedSize:a,uncompressedSize:i,Vt:s,Zt:c},u,{dataDescriptor:l,ne:f}){if(l||((!e||f&&o!==I)&&Dc(u,14,o),c||Dc(u,18,a),s||Dc(u,22,i)),r&&n){const e=x+Oc(t)+4;xc(u,e,BigInt(i)),xc(u,e+8,BigInt(a))}}(D,w.Ee,i),await dc(c,w.ie),await wc(z.readable,c,d,t=>F+=t),c.size+=z.size,g=!1}else D.diskNumberStart=h,D.offset=S;return e.offset+=D.size,D}catch(t){if(g||A){if(e.hasCorruptedEntries=!0,t)try{t.corruptedEntry=!0}catch{}e.offset+=c.size-R,b&&(e.offset+=F)}throw s.delete(n),t}finally{if(b&&e.vt--,E&&e.Mt--,h&&h(O),S&&S(),b&&z&&z.dispose)try{await z.dispose()}catch{}}async function T(){e.jt=!0;const{Bt:t}=e;e.Bt=new Promise(t=>S=()=>{e.jt=!1,t()}),await t}async function k(){oc(c,Oc(w.ie))&&await c.closeDisk()}}(e,n,o,{ue:b,de:E,we:S,xt:f,le:l,fe:d},a)}catch(t){throw e.It.delete(n),t}finally{d&&d(l&&l.re)}return Object.assign(w,{name:n,comment:c,extraField:u}),new ma(w)}(e,n,o,a)}catch(t){throw e.Ut.delete(n),t}finally{const t=Ns.shift();t?t():Ms--}}(a,e,n,o);i.add(s);const c=()=>i.delete(s);return Promise.prototype.then.call(s,c,c),Ls(a,s)}remove(t){const{Ut:e,It:r}=this;if(typeof t==v&&(t=r.get(t)),t&&t.filename!==I){const{filename:n}=t;if(e.has(n)&&r.has(n))return e.delete(n),r.delete(n),!0}return!1}async close(r=N,n={}){const o=this,{kt:a,writer:w}=this,{writable:p}=w;if(o._t)return Bs(w);if(!(r instanceof Uint8Array))throw new Error(Gi);if(Oc(r)>e)throw new Error(Hi);for(;a.size;)await Promise.allSettled(Array.from(a));await Promise.allSettled(o.Ct.map(t=>t.Se));const m=o.Ct.filter(t=>t.ge&&!t.Ae);if(m.length){const t=m.map(t=>t.error);m.forEach(t=>t.Ae=!0);const[e]=t;try{e.entryErrors=t}catch{}throw e}return await async function(r,n,o){const{Re:a,ze:w}=tc(r.It),{De:p,xe:m,Fe:h}=await async function(r,n,o){const{It:a,writer:i}=r,c=new Uint8Array(n);await Uo(i);let u=0,l=0,d=rc(i),w=nc(i),p=0;for(const[r,n]of Array.from(a.values()).entries()){const{offset:m,rawFilename:h,qt:y,Kt:b,Yt:E,Xt:S,$t:g,rawExtraField:A,Jt:R,rawComment:z,versionMadeBy:D,Lt:x,Wt:F,Vt:O,Zt:I,Gt:U,Oe:T,internalFileAttributes:k,externalFileAttributes:C,diskNumberStart:v,uncompressedSize:M,compressedSize:N}=n,_=Oc(y,b,E,S,g,A,R),P=f+Oc(h,z)+_;oc(i,u+P-l)&&(await dc(i,c.slice(l,u)),l=u,p=0,await i.closeDisk()),0==r&&(d=rc(i),w=nc(i)),O||Dc(F,18,M),I||Dc(F,14,N),(T||U)&&n.version<45&&zc(F,0,45);const j=ec(P);if(j.Ie(s),j.Ue(D),j.Te(x.subarray(0,24)),j.Ue(_),j.Ue(Oc(z)),j.Ue(U?e:v),j.Ue(k),j.Ie(C),j.Ie(T?t:m),j.Te(h),j.Te(y),j.Te(b),j.Te(E),j.Te(S),j.Te(g),j.Te(A),j.Te(R),j.Te(z),Fc(c,j.ct,u),u+=P,p++,o.onprogress)try{await o.onprogress(r+1,a.size,new ma(n))}catch{}}return await dc(i,l?c.slice(l):c),{De:{diskNumber:d,diskOffset:w},xe:{diskNumber:rc(i),ke:p},Fe:c}}(r,a,o),y=await async function(t,r,n){const o=Ec(t,n,J);if(o){const n=await o(r),a=Oc(n);if(a>e)throw new Error(xs);const s=ec(6+a);s.Ie(i),s.Ue(a),s.Te(n);const{writer:c}=t;return oc(c,Oc(s.ct))&&await c.closeDisk(),await dc(c,s.ct),6+a}return 0}(r,h,o);await async function(r,n,o,a){const{writer:i}=r,{De:s,xe:f,Ce:w,ze:p}=a;let{Re:m}=a,h=r.It.size,y=s.diskNumber,b=ac(r,s);const E=Oc(n);if(E>e)throw new Error(Hi);let S=yc(r,o,ta),g=rc(i);if(oc(i,(S?98:d)+E)&&g++,b>=t||m>=t||h>=e||g>=e){if(!1===S)throw new Error(ls);S=!0}else S===I&&p&&(S=!0);const A=ec(S?98:d);oc(i,Oc(A.ct)+E)&&await i.closeDisk(),g=rc(i);let R=g==f.diskNumber?f.ke:0;S&&(A.Ie(u),A.ve(44),A.Ue(45),A.Ue(45),A.Ie(g),A.Ie(y),A.ve(R),A.ve(h),A.ve(m),A.ve(b),A.Ie(l),A.Ie(g),A.ve(BigInt(ac(r,i))+BigInt(m)+BigInt(w)),A.Ie(g+1),yc(r,o,"supportZip64SplitFile",!0)&&(g=e,y=e),R=e,h=e,b=t,m=t),A.Ie(c),A.Ue(g),A.Ue(y),A.Ue(R),A.Ue(h),A.Ie(m),A.Ie(b),A.Ue(E),await dc(i,A.ct),E&&await dc(i,n)}(r,n,o,{De:p,xe:m,Re:a,Ce:y,ze:w})}(o,r,n),o._t=!0,!Io(w)&&yc(o,n,H)||await p.getWriter().close(),Bs(w)}[_](){return this.close()}}class Ps{constructor(t={}){const{readable:e,writable:r}=new TransformStream;this.readable=e,this.zipWriter=new _s(r,t),this.kt=new Set}transform(t){const e=this.zipWriter;let r;const{readable:n,writable:o}=new TransformStream({start(t){r=t},flush:()=>{!async function(){try{await e.close()}catch(t){await Ws(e,t)}}()}});return Zs(this,this.zipWriter.add(t,n),t=>r.error(t)),{readable:this.readable,writable:o}}writable(t){let e;const{readable:r,writable:n}=new TransformStream({start(t){e=t}});return Zs(this,this.zipWriter.add(t,r),t=>e.error(t)),n}async close(t,e={}){const{zipWriter:r}=this,n=(await Promise.allSettled(Array.from(this.kt))).filter(t=>"rejected"==t.status).map(t=>t.reason);if(n.length){const[t]=n;try{t.entryErrors=n}catch{}throw await Ws(r,t),t}try{return await r.close(t,e)}catch(t){throw await Ws(r,t),t}}}class js extends Promise{then(t,e){const{Me:r}=this;return r&&(r.Ae=!0),super.then(t,e)}}function Bs(t){return t.getData?t.getData():t.writable}function Ls(t,e){const r=new js((t,r)=>Promise.prototype.then.call(e,t,r)),n={};return r.Me=n,n.Se=Promise.prototype.then.call(r,I,t=>Object.assign(n,{ge:!0,error:t})),t.Ct.push(n),r}async function Ws(t,e){try{await t.writer.writable.abort(e)}catch{}}function Zs(t,e,r){t.kt.add(e),e.catch(t=>{try{r(t)}catch{}})}function Vs(t,e,n){if(null===t||typeof t!=C||Array.isArray(t))throw new Error(Fs);const{externalFileAttributes:o,versionMadeBy:a,comment:i,lastModDate:s,rawLastModDate:c,creationDate:u,lastAccessDate:l,uncompressedSize:f,encrypted:d,zipCrypto:w,crc32:p,compressionMethod:m,extraFieldAES:h,extraFieldUnix:y,internalFileAttributes:b,extraField:E,bitFlag:S,directory:g,uid:A,gid:R}=t,z={externalFileAttributes:o,versionMadeBy:a,comment:i,lastModDate:s,creationDate:u,lastAccessDate:l,internalFileAttributes:b,directory:g};S&&S.languageEncodingFlag&&(z[q]=!0);const D=function(t){if(t){const e=new Map;if(t.forEach((t,r)=>{ha.has(r)||e.set(r,t.data)}),e.size)return e}}(E);D&&(z[ua]=D),A===I&&R===I||Object.assign(z,{uid:A,gid:R,unixExtraFieldType:y?Cs:ks});const x={};if(e&&!g)if(Object.assign(x,{uncompressedSize:f,crc32:p,compressionMethod:m}),e!==at&&Object.assign(x,{encrypted:d,zipCrypto:w,encryptionStrength:h?h.strength:I}),S&&(x.dataDescriptor=S.dataDescriptor,x[G]=vs[S.level]),n===I)x.rawLastModDate=c;else if(e!==at&&w&&(!S||S.dataDescriptor)&&n instanceof Date&&function(t){let e=new Date(2e3*Math.ceil(Math.floor(t.getTime()/1e3)/2));return e<O?e=O:e>F&&(e=F),(e.getHours()<<3|e.getMinutes()>>3)&r}(n)!=(c>>>8&r))throw new Error(Os);return{Qt:z,te:x}}function Hs(n,o,a){let i=yc(n,a,Qo),s=yc(n,a,na,i?20:768);const c=yc(n,a,ia),u=Sc(n,a,"uid"),l=Sc(n,a,"gid");let f=Sc(n,a,la),d=yc(n,a,"unixExtraFieldType"),w=yc(n,a,fa),p=yc(n,a,da),m=yc(n,a,wa);if(yt(u,t,bs),yt(l,t,Es),yt(f,e,Ss),d!==I&&d!==ks&&d!==Cs)throw new Error(gs);if(d===Cs&&(u!==I&&u>e||l!==I&&l>e))throw new Error(As);d!==I||u===I&&l===I||(d=ks);let h=Sc(n,a,$o),y=yc(n,a,Jo);const b=h!==I||y!==I;if(u!==I||l!==I||f!==I||d||c?(i=!1,s=s&r|768):b&&(i=!0,s&=r),yt(h,r,Rs),y&&(typeof y!==C||Array.isArray(y)))throw new Error(zs);if(s>e)throw new Error($i);let E=yc(n,a,Xo);const S=E!==I;S||(E=0),!a[aa]&&o.endsWith(D)&&(a[aa]=!0);const x=yc(n,a,aa);if(x?(o.endsWith(D)||(o+=D),S||(E=16,i||(E|=16877<<16))):i||S||(E=c?493<<16:27525120),!i){const t=f!==I||Boolean(w||p||m);f=f===I?E>>16&e:f&e,w?f|=R:w=Boolean(f&R),p?f|=z:p=Boolean(f&z),m?f|=512:m=Boolean(512&f),S&&!t||(x?f=-61441&f|A:f&g||(f|=32768),E=(f&e)<<16|E&e)}({msdosAttributesRaw:h,msdosAttributes:y}=function(t,e){if(t!==I)t&=r;else if(e!==I){const{readOnly:n,hidden:o,system:a,directory:i,archive:s}=e;let c=0;n&&(c|=1),o&&(c|=2),a&&(c|=4),i&&(c|=16),s&&(c|=32),t=c&r}return e===I&&(e={readOnly:Boolean(1&t),hidden:Boolean(2&t),system:Boolean(4&t),directory:Boolean(16&t),archive:Boolean(32&t)}),{msdosAttributesRaw:t,msdosAttributes:e}}(h,y)),b&&(E=E&t|h&r);const F=E>>16&e,O=f!==I&&40960==(f&g);return{name:o,ee:{versionMadeBy:s,msDosCompatible:Boolean(i),externalFileAttributes:E,unixExternalUpper:F,uid:u,gid:l,unixMode:f,unixExtraFieldType:d,symlink:O,setuid:w,setgid:p,sticky:m,msdosAttributesRaw:h,msdosAttributes:y}}}function Gs(t,r,n){const o=Ec(t,n,"encodeText")||ee;let a=o(r,tt);if(a===I&&(a=ee(r)),Oc(a)>e)throw new Error(Xi);const i=n[_o]||"";if(typeof i!=v)throw new Error(Ki);let s=o(i,et);if(s===I&&(s=ee(i)),Oc(s)>e)throw new Error(qi);const c=yc(t,n,ra);if(c!==I&&c>e)throw new Error($i);const u=bc(t,n,Zo,new Date),l=yc(t,n,Vo),f=bc(t,n,Ho),d=bc(t,n,qo),w=yc(t,n,Yo,0),p=mt(yc(t,n,B)),m=Boolean(p),h=!0===p;let y=yc(t,n,P),b=yc(t,n,j);pt(y,b),y=y&&y.length?y:I,b=b&&b.length?b:I;const E=Sc(t,n,"encryptionStrength",3),S=yc(t,n,oa),g=yc(t,n,"extendedTimestamp",!0),A=yc(t,n,"ntfsTimestamp"),R=yc(t,n,"keepOrder",!0),z=yc(t,n,W),D=yc(t,n,V),x=yc(t,n,"bufferedWrite"),F=Ec(t,n,"createTempStream"),O=yc(t,n,"dataDescriptorSignature",!0),U=dt(yc(t,n,L));wt(U);const T=yc(t,n,q,!Uc(a)||!Uc(s)),k=yc(t,n,sa),C=m||k===I?I:fr(k);if(!m&&k!==I&&0!==k&&8!==k&&!C)throw new Error(ar);let M=Sc(t,n,G);if(yt(M,9,Ds),t.options[X]){if(y!==I||b!==I)throw new Error(Qi);M===I&&k===I&&(M=0)}m&&(M=bt(n[G]));let N=yc(t,n,Z),_=yc(t,n,K);x&&_===I&&(_=!1),(_===I||S&&!h)&&(_=!0),M!==I&&6!=M&&(N=!1);const H=yc(t,n,ta);if(!(S||y===I&&b===I||Number.isInteger(E)&&E>=1&&E<=3))throw new Error(Ji);const Y=qs(n[ua]),$=qs(n.localExtraField),J=qs(n.centralExtraField);return{comment:i,ee:{rawFilename:a,rawComment:s,version:c,lastModDate:u,rawLastModDate:l,lastAccessDate:f,creationDate:d,internalFileAttributes:w,ne:m,oe:h,password:y,rawPassword:b,encryptionStrength:E,zipCrypto:S,extendedTimestamp:g,ntfsTimestamp:A,keepOrder:R,useWebWorkers:z,transferStreams:D,bufferedWrite:x,createTempStream:F,dataDescriptorSignature:O,signal:U,useUnicodeFileNames:T,compressionMethod:k,format:C?C.format:I,codecURI:C?C.codecURI:I,Ne:C?C.versionNeeded:I,level:M,useCompressionStream:N,dataDescriptor:_,zip64:H,rawExtraField:Y,_e:$,Jt:J}}}function qs(t){if(!t)return N;if(!(t instanceof Map))throw new Error(rs);let r=0,n=0;t.forEach((t,n)=>{if(ht(n,e,ns),!(t instanceof Uint8Array))throw new Error(os);if(Oc(t)>e)throw new Error(as);r+=4+Oc(t)});const o=new Uint8Array(r),a=Wt(o);return t.forEach((t,e)=>{zc(a,n,e),zc(a,n+2,Oc(t)),Fc(o,t,n+4),n+=4+Oc(t)}),o}function Ks(e,r,n,o,a){const{ne:i,oe:s,zipCrypto:c,password:u,rawPassword:l,encryptionStrength:f}=o;let{dataDescriptor:d,zip64:w,level:p,compressionMethod:m}=o,h=0,y=0,b=!1;if(i&&r){if(y=a[jo],y===I)throw new Error(fs);if(m===I)throw new Error(ds)}const E=!0===w,S=yc(e,a,ea);if(r&&s&&!S&&Oc(u,l))throw new Error(es);const g=r&&(Boolean(u&&Oc(u)||l&&Oc(l))||s&&S);r||(p=0,m=0);const A=ya(g,c,f);r&&(i?(a.uncompressedSize=y,h=n===I?gc(y)+A:n+(s?0:A)):n===I?(d=!0,(w||w===I)&&(w=b=!0,h=4294967296)):(a.uncompressedSize=y=n,h=(Ac(m,p)?gc(y):y)+A));const R=!(g||r&&(0!==n||i)||Ac(m,p));R&&yc(e,a,K)===I&&(d=!1);const z=E||b||y>=t,D=E||h>=t;if(z||D){if(!1===w)throw new Error(ls);w=!0}return w=w||!1,{Pe:h,ee:{dataDescriptor:d,ce:R,zip64:w,Ht:E,je:b,Vt:z,Zt:D,uncompressedSize:y,level:p,compressionMethod:m,encrypted:g}}}function Ys(e,r,n){const o=e.slice().sort((t,e)=>n?e-t:t-e);let a=r,i=0;for(const e of o){if(a>=t)break;a+=e,i++}return i}function Xs(t){const{rawFilename:r,lastModDate:o,rawLastModDate:a,lastAccessDate:i,creationDate:s,level:c,zip64:u,zipCrypto:l,useUnicodeFileNames:f,dataDescriptor:d,directory:w,rawExtraField:p,_e:y,encryptionStrength:S,extendedTimestamp:g,ntfsTimestamp:A,ne:R,encrypted:z,Vt:D,Zt:U,uncompressedSize:T,je:k,crc32:C}=t;let{version:v,compressionMethod:M}=t;const _=!w&&Ac(M,c);let P;const j=R||!_,B=u&&(t.bufferedWrite||!d||!D&&!U||j&&!k),L=B||u&&d&&(D||U);if(u&&(D||U)){const t=20,e=ec(t);if(e.Ue(1),e.Ue(t-4),P=e.ct,B&&(e.ve(T),j)){const t=ya(z,l,S);e.ve(R?0:T+t)}}else P=N;let W,Z,V,H,G;if(z&&!l){const t=ec(Oc(Ts)+2);t.Ue(m),t.Te(Ts),W=t.ct,W[8]=S}else W=N;if(g){const t=mc(o),e=(q=t)>=is&&q<=ss;if(e){const e=9+(i?4:0)+(s?4:0),r=ec(e);H=1+(i?2:0)+(s?4:0),G=t,r.Ue(h),r.Ue(e-4),r.Be(H),r.Ie(t),i&&r.Ie(hc(mc(i))),s&&r.Ie(hc(mc(s))),V=r.ct}else V=N;if(A===I?!e||Boolean(i||s):A)try{const t=pc(o),e=ec(36);e.Ue(10),e.Ue(32),e.Le(4),e.Ue(1),e.Ue(24),e.ve(t),e.ve(i?pc(i):t),e.ve(s?pc(s):t),Z=e.ct}catch{Z=N}else Z=N}else Z=V=N;var q;let K;try{const{uid:r,gid:n,unixExtraFieldType:o}=t;if(o!=ks||r===I&&n===I)if(o!=Cs||r===I&&n===I)K=N;else{const t=ec(8);t.Ue(E),t.Ue(4),t.Ue((r===I?0:r)&e),t.Ue((n===I?0:n)&e),K=t.ct}else{const t=Js(r===I?0:r),e=Js(n===I?0:n),o=3+t.length+e.length,a=ec(4+o);a.Ue(b),a.Ue(o),a.Be(1),a.Be(t.length),a.Te(t),a.Be(e.length),a.Te(e),K=a.ct}}catch{K=N}M===I&&(M=_?8:0),v===I&&(v=0!=M||w||z?20:10);const{Ne:Y}=t;_&&Y!==I&&(v=v>Y?v:Y),u&&(v=v>45?v:45),z&&!l&&(v=v>51?v:51,R&&C!==I&&(W[4]=1),zc(Wt(W),9,M),M=99);const $=L?Oc(P):0,J=$+Oc(W,V,Z,K,p,y);if(J+(t[X]?67:0)>e)throw new Error(as);const Q=new Date(2e3*Math.ceil(Math.floor(o.getTime()/1e3)/2)),tt=Q<O?O:Q>F?F:Q,et=Oc(V)?new Date(1e3*mc(o)):Oc(Z)?o:tt,{Lt:rt,Wt:nt,rawLastModDate:ot}=Ic({version:v,bitFlag:Tc(c,f,d,z,M),compressionMethod:M,uncompressedSize:T,lastModDate:tt,rawLastModDate:a,rawFilename:r,Zt:U,Vt:D,extraFieldLength:J}),at=ec(x+Oc(r)+J),it=at.ct,st=Wt(it);return at.Ie(n),at.Te(rt),at.Te(r),L&&at.Te(P),at.Te(W),at.Te(V),at.Te(Z),at.Te(K),at.Te(p),at.Te(y),d&&(U||Dc(st,18,0),D||Dc(st,22,0)),{ie:it,Ee:st,Lt:rt,Wt:nt,lastModDate:et,ae:et===tt&&Q.getTime()!=tt.getTime(),rawLastModDate:ot,encrypted:z,compressed:_,version:v,compressionMethod:M,me:H,he:G,qt:N,pe:$,Yt:V,Xt:Z,$t:K,Kt:W,extraFieldLength:J}}function $s(t,e){const{ue:r}=t;let{ie:n,extraFieldLength:o}=r,a=64-(e+Oc(n))%64;a<4&&(a+=64);const i=new Uint8Array(a),s=Wt(i);zc(s,0,y),zc(s,2,a-4);const c=n;r.ie=n=new Uint8Array(Oc(c)+a),Fc(n,c),Fc(n,i,Oc(c));const u=Wt(n);zc(u,28,o+a),r.Ee=u,t.we+=a}function Js(t){const e=new Uint8Array(4);Wt(e).setUint32(0,t,!0);let r=4;for(;r>1&&0===e[r-1];)r--;return e.subarray(0,r)}function Qs({zip64:t,dataDescriptor:e,dataDescriptorSignature:r}){let n,o=N,i=0,s=t?20:12;return r&&(s+=4),e&&(o=new Uint8Array(s),n=Wt(o),r&&(i=4,Dc(n,0,a))),{se:o,ye:n,be:i}}function tc(r){let n=0,o=!1;for(const[,a]of r){const{rawFilename:r,Kt:i,rawComment:s,Xt:c,$t:u,rawExtraField:l,Jt:d,me:w,he:p,Ht:m,uncompressedSize:y,compressedSize:b}=a;let{Vt:E,Zt:S}=a;m||(E&&y<t&&(E=a.Vt=!1),S&&b<t&&(S=a.Zt=!1)),o=o||E||S;const g=a.offset>=t,A=a.diskNumberStart>=e;let R,z;if(g||A||E||S){const t=4+(E?8:0)+(S?8:0)+(g?8:0)+(A?4:0),e=ec(t);e.Ue(1),e.Ue(t-4),E&&e.ve(y),S&&e.ve(b),g&&e.ve(a.offset),A&&e.Ie(a.diskNumberStart),R=e.ct}else R=N;if(a.qt=R,a.Oe=g,a.Gt=A,p===I)z=N;else{const t=ec(9);t.Ue(h),t.Ue(5),t.Be(w),t.Ie(p),z=t.ct}a.Yt=z;const D=Oc(R,i,c,u,z,l,d);if(D>e)throw new Error(as);n+=f+Oc(r,s)+D}return{Re:n,ze:o}}function ec(t){const e=new Uint8Array(t),r=Wt(e);let n=0;return{ct:e,Be:t=>{!function(t,e,r){t.setUint8(e,r)}(r,n,t),n+=1},Ue:t=>{zc(r,n,t),n+=2},Ie:t=>{Dc(r,n,t),n+=4},ve:t=>{xc(r,n,BigInt(t)),n+=8},Te:t=>{Fc(e,t,n),n+=Oc(t)},Le:t=>n+=t}}function rc(t){const{diskNumber:e=0}=t;return e}function nc(t){const{diskOffset:e=0}=t;return e}function oc(t,e){const{availableSize:r=U}=t;return e>r}function ac(t,{diskNumber:e=0,diskOffset:r=0}){return t.offset-r-(e?t.Tt:0)}function ic(t){const e=Wt(t);let r=0;for(;r+4<=Oc(t);){const n=4+Rc(e,r+2);if(1==Rc(e,r))return ic(Bt(t.subarray(0,r),t.subarray(Math.min(r+n,Oc(t)))));r+=n}return t}async function sc(t,e,r,n){if(n>0){const{writer:o}=t;let a=0;try{await wc(Co(e,{offset:r,size:n}),o,I,t=>a+=t)}catch(e){t.hasCorruptedEntries=!0;try{e.corruptedEntry=!0}catch{}throw e}finally{o.size+=a,t.offset+=a}}}async function cc(t,e){const r=await ko(t,e,x);if(Oc(r)<x)return x;const n=Wt(r);return x+Rc(n,26)+Rc(n,28)}function uc(t,{offset:e,diskNumberStart:r}){return e+(t.ht?t.ht(r):0)}function lc(){const t=new Uint8Array(4);return Dc(Wt(t),0,o),t}async function fc(t,e){delete t.Ot,await dc(e,lc()),t.offset+=4}async function dc(t,e){const{writable:r}=t,n=r.getWriter();try{await n.ready,t.size+=Oc(e),await n.write(e)}finally{n.releaseLock()}}async function wc(t,e,r,n){const o=e.writable.getWriter();try{await t.pipeTo(new WritableStream({async write(t){await o.ready,await o.write(t),n(Oc(t))}}),{preventClose:!0,preventAbort:!0,signal:r})}finally{o.releaseLock()}}function pc(t){if(t){const e=(BigInt(t.getTime())+BigInt(116444736e5))*BigInt(1e4);return e<cs?cs:e>us?us:e}}function mc(t){return Math.floor(t.getTime()/1e3)}function hc(t){return Math.min(ss,Math.max(is,t))}function yc(t,e,r,n){const o=e[r]===I?t.options[r]:e[r];return o===I?n:o}function bc(t,e,r,n){const o=yc(t,e,r,n);if(null===o)return n;if(o!==I&&(typeof o.getTime!=k||Number.isNaN(o.getTime())))throw new Error(Yi);return o}function Ec(t,e,r){return ft(yc(t,e,r))}function Sc(t,e,r,n){return bt(yc(t,e,r,n))}function gc(t){return t+5*(Math.floor(t/16383)+1)}function Ac(t,e){return t===I?e===I||e>0:0!==t}function Rc(t,e){return t.getUint16(e,!0)}function zc(t,e,r){t.setUint16(e,r,!0)}function Dc(t,e,r){t.setUint32(e,r,!0)}function xc(t,e,r){t.setBigUint64(e,r,!0)}function Fc(t,e,r){t.set(e,r)}function Oc(...t){let e=0;return t.forEach(t=>t&&(e+=t.length)),e}function Ic({version:e,bitFlag:r,compressionMethod:n,uncompressedSize:o,compressedSize:a,lastModDate:i,rawLastModDate:s,rawFilename:c,Zt:u,Vt:l,extraFieldLength:f}){const d=ec(26),w=d.ct,p=Wt(w);if(d.Ue(e),d.Ue(r),d.Ue(n),s===I){const t=new Uint32Array(1),e=Wt(t);zc(e,0,(i.getHours()<<6|i.getMinutes())<<5|i.getSeconds()/2),zc(e,2,(i.getFullYear()-1980<<4|i.getMonth()+1)<<5|i.getDate()),s=t[0]}return d.Ie(s),d.Le(4),u||a!==I?d.Ie(u?t:a):d.Le(4),l||o!==I?d.Ie(l?t:o):d.Le(4),d.Ue(Oc(c)),d.Ue(f),{Lt:w,Wt:p,rawLastModDate:s}}function Uc(t){return t.every(t=>t>=32&&t<=126)}function Tc(t,e,r,n,o){let a=0;return e&&(a|=S),r&&(a|=8),8!=o&&9!=o||(t>=0&&t<=3&&(a|=6),t>3&&t<=5&&(a|=4),9==t&&(a|=2)),n&&(a|=1),a}function kc(){return"application/octet-stream"}function Cc(){const{CompressionStream:t,DecompressionStream:e,CompressionStreamFallback:r,DecompressionStreamFallback:n}=Tt(),o=[{compressionMethod:0,compression:!0,decompression:!0,registered:!1},{compressionMethod:8,compression:vc(r,br)||vc(t,br)||vc(t,Sr),decompression:vc(n,br)||vc(e,br)||vc(e,Sr),registered:!1},{compressionMethod:9,compression:!1,decompression:vc(n,Er)||vc(e,Er),registered:!1}];for(const t of dr()){const e=wr(t.format);o.push({compressionMethod:t.compressionMethod,compression:e?typeof e.CompressionStream==k:I,decompression:e?typeof e.DecompressionStream==k:I,registered:!0})}return o}function vc(t,e){if(!t)return!1;const{supportedFormats:r}=t;return r?r.includes(e):xr(t,e)}const Mc="2.16.1",Nc=1048576,_c=".zip.js-temp";function Pc(t={}){const{thresholdBytes:e=Nc,directoryName:r=_c,getDirectory:n=()=>navigator.storage.getDirectory()}=t;let o;function a(){return o||(o=Promise.resolve(n()).then(t=>t.getDirectoryHandle(r,{create:!0}))),o}return function(){const t=[];let r,n,o,i,s=0,c=!1;const u=new WritableStream({async write(i){c?await o.write(i):(t.push(i),s+=i.length,s>e&&await async function(){const e=await a();r=crypto.randomUUID?crypto.randomUUID():Array.from(crypto.getRandomValues(new Uint8Array(16)),t=>t.toString(16).padStart(2,"0")).join(""),n=await e.getFileHandle(r,{create:!0}),o=(await n.createWritable()).getWriter(),c=!0;for(const e of t)await o.write(e);t.length=0}())},async close(){o&&(await o.close(),o=null)}});let l=0;return{writable:u,readable:new ReadableStream({async pull(e){if(c){if(!i){const t=await n.getFile();i=t.stream().getReader()}const{value:t,done:r}=await i.read();r?e.close():e.enqueue(t)}else l<t.length?e.enqueue(t[l++]):e.close()},async cancel(t){i&&await i.cancel(t)}},{highWaterMark:0}),dispose:async function(){if(o){try{await o.close()}catch{}o=null}if(r){try{const t=await a();await t.removeEntry(r)}catch{}n=r=null}t.length=0}}}}const jc=1048576;function Bc(t={}){const{thresholdBytes:e=jc}=t;return function(){const t=[];let r,n,o,a=0,i=!1;const s=new WritableStream({async write(o){i?await r.write(o):(t.push(o),a+=o.length,a>e&&await async function(){const e=new TransformStream;n=tr(e.readable),r=e.writable.getWriter(),i=!0;for(const e of t)await r.write(e);t.length=0}())},async close(){r&&(await r.close(),r=null)}});let c=0;return{writable:s,readable:new ReadableStream({async pull(e){if(i){if(!o){const t=await n;o=t.stream().getReader()}const{value:t,done:r}=await o.read();r?e.close():e.enqueue(t)}else c<t.length?e.enqueue(t[c++]):e.close()},async cancel(t){o&&await o.cancel(t)}},{highWaterMark:0}),dispose:async function(){if(r){try{await r.abort()}catch{}r=null}n&&(n.catch(()=>{}),n=null),t.length=0}}}}const Lc=1048576,Wc=".zip.js-temp",Zc="createSyncAccessHandle is only available in dedicated workers";function Vc(t={}){const{thresholdBytes:e=Lc,directoryName:r=Wc,getDirectory:n}=t;if(!(n||"undefined"!=typeof FileSystemFileHandle&&FileSystemFileHandle.prototype.createSyncAccessHandle))throw new Error(Zc);const o=n||(()=>navigator.storage.getDirectory());let a;function i(){return a||(a=Promise.resolve(o()).then(t=>t.getDirectoryHandle(r,{create:!0}))),a}return function(){const t=[];let r,n,o=0,a=!1,s=0,c=0;const u=new WritableStream({async write(c){a?(n.write(c,{at:s}),s+=c.length):(t.push(c),o+=c.length,o>e&&await async function(){const e=await i();r=crypto.randomUUID?crypto.randomUUID():Array.from(crypto.getRandomValues(new Uint8Array(16)),t=>t.toString(16).padStart(2,"0")).join("");const o=await e.getFileHandle(r,{create:!0});n=await o.createSyncAccessHandle(),a=!0;for(const e of t)n.write(e,{at:s}),s+=e.length;t.length=0}())},close(){n&&n.flush()}});let l=0;const f=new ReadableStream({pull(e){if(a){const t=s-c;if(t<=0)return void e.close();const r=new Uint8Array(Math.min(524288,t)),o=n.read(r,{at:c});o?(c+=o,e.enqueue(r.subarray(0,o))):e.close()}else l<t.length?e.enqueue(t[l++]):e.close()}},{highWaterMark:0});return{writable:u,readable:f,dispose:async function(){if(n){try{n.close()}catch{}n=null}if(r){try{const t=await i();await t.removeEntry(r)}catch{}r=null}t.length=0}}}}try{Pt({baseURI:import.meta.url})}catch{}const Hc="deflate",Gc="deflate-raw",qc="deflate64-raw",Kc="gzip";let Yc,Xc,$c,Jc,Qc;function tu(t,e,r={}){if(!Yc){const t=new Error("WASM module not loaded");throw t.cause=Qc,t}const n="number"==typeof r.level?r.level:-1,o="number"==typeof r.outBuffer?r.outBuffer:65536,a="number"==typeof r.inBufferSize?r.inBufferSize:65536,i={We:0,in:0,inBufferSize:0,Ze:0};let s,c,u,l,f=!0,d=!1;return function(){try{let r;if(i.We=Xc(o),i.in=Xc(a),i.inBufferSize=a,!i.We||!i.in)throw new Error("allocation failed");if(t?(i.Ve=Yc.deflate_process,i.He=Yc.deflate_last_consumed,i.Ge=Yc.deflate_end,i.Ze=Yc.deflate_new(),r=e===Kc?Yc.deflate_init_gzip(i.Ze,n):e===Gc?Yc.deflate_init_raw(i.Ze,n):Yc.deflate_init(i.Ze,n)):e===qc?(i.Ve=Yc.inflate9_process,i.He=Yc.inflate9_last_consumed,i.Ge=Yc.inflate9_end,i.Ze=Yc.inflate9_new(),r=Yc.inflate9_init_raw(i.Ze)):(i.Ve=Yc.inflate_process,i.He=Yc.inflate_last_consumed,i.Ge=Yc.inflate_end,i.Ze=Yc.inflate_new(),r=e===Gc?Yc.inflate_init_raw(i.Ze):e===Kc?Yc.inflate_init_gzip(i.Ze):Yc.inflate_init(i.Ze)),0!==r)throw new Error("init failed:"+r)}catch(t){throw m(i),t}}(),{readable:new ReadableStream({start(t){s=t},pull(){f=!1,p()},cancel(t){d=!0,l=t,m(i),c.error(t),p()}},{highWaterMark:0}),writable:new WritableStream({start(t){c=t},async write(t){if(f&&await new Promise(t=>u=t),d)throw l;try{!function(t){const e=new Uint8Array(Jc.buffer),r=i.Ve,n=i.He,a=i.We;let s=0;for(;s<t.length;){const c=Math.min(t.length-s,32768);if((!i.in||i.inBufferSize<c)&&(i.in&&$c&&($c(i.in),i.in=0),i.in=Xc(c),i.inBufferSize=c,!i.in))throw new Error("allocation failed");e.set(t.subarray(s,s+c),i.in);const u=r(i.Ze,i.in,c,a,o,0),l=u>>24&255,f=128&l?l-256:l;if(f<0)throw new Error("process error:"+f);const d=16777215&u;d&&w(e.slice(a,a+d));const p=n(i.Ze);if(0===p&&0===d)break;s+=p}}(t)}catch(t){throw m(i),s.error(t),t}},close(){if(d)return;try{!function(){const t=new Uint8Array(Jc.buffer),e=i.Ve,r=i.We;for(;;){const n=e(i.Ze,0,0,r,o,4),a=n>>24&255,s=128&a?a-256:a;if(s<0)throw new Error("process error:"+s);const c=16777215&n;if(c&&w(t.slice(r,r+c)),1===a||0===c)break}}()}catch(t){throw m(i),s.error(t),t}const t=m(i);if(0!==t){const e=new Error("end error:"+t);throw s.error(e),e}s.close()},abort(t){m(i),s.error(t)}},{highWaterMark:1})};function w(t){f=!0,s.enqueue(t)}function p(){if(u){const t=u;u=null,t()}}function m(t){let e=0;return t.Ze&&t.Ge&&(e=t.Ge(t.Ze)),t.Ze=0,t.in&&$c&&$c(t.in),t.in=0,t.We&&$c&&$c(t.We),t.We=0,e}}class eu{constructor(t=Hc,e){return tu(!0,t,e)}}class ru{constructor(t=Hc,e){return tu(!1,t,e)}}eu.requiresModule=!0,ru.requiresModule=!0,eu.supportedFormats=[Hc,Gc,Kc],ru.supportedFormats=[Hc,Gc,Kc,qc];const nu=65536;let ou,au;function iu(t){return new Uint8Array(t.memory.buffer)}let su,cu=!1;var uu;async function lu(){await async function(){await Promise.allSettled([Rn(),...pn.map(t=>(xn(t),t.terminate()))]),Wr=I,Zr=!1}(),su=null,cu=!1,Yc=Xc=$c=Jc=Qc=null,ou=null,au=0}uu=function(t,e){const r=ou;let n=r?function(t,e,r){au||(au=t.malloc(nu));const n=au?t.aes_hmac_new():0;if(n){const o=iu(t);if(o.set(e,au),o.set(r,au+e.length),t.aes_hmac_init(n,au,e.length,au+e.length,r.length))return t.aes_hmac_end(n,0),0}return n}(r,t,e):0;if(!n)return we(t,e);const o=au;return{process(t,e){for(let a=0;a<t.length;a+=nu){const i=t.subarray(a,a+nu),s=iu(r);s.set(i,o),r.aes_hmac_process(n,o,i.length,e?1:0),i.set(s.subarray(o,o+i.length))}},digest:()=>(r.aes_hmac_end(n,o),n=0,iu(r).slice(o,o+20)),dispose(){n&&(r.aes_hmac_end(n,0),n=0)}}},ve=uu||we,function({qe:t}){Hr=t}({qe:t=>{if(!su){let{wasmURI:e}=t;typeof e==k&&(e=e()),su=async function(t,{baseURI:e}){if(!cu)try{await async function(t,e){let r,n;try{try{n=new URL(t,e)}catch{}const o=await fetch(n);r=await o.arrayBuffer()}catch(e){if(!t.startsWith("data:application/wasm;base64,"))throw e;r=function(t){const e=t.split(",")[1],r=atob(e),n=r.length,o=new Uint8Array(n);for(let t=0;t<n;++t)o[t]=r.charCodeAt(t);return o.buffer}(t)}const o=await WebAssembly.instantiate(r);var a;(function(t){if(Yc=t,({malloc:Xc,free:$c,memory:Jc}=Yc),"function"!=typeof Xc||"function"!=typeof $c||!Jc)throw Yc=Xc=$c=Jc=null,new Error("Invalid WASM module")})(o.instance.exports),typeof(a=o.instance.exports).aes_hmac_new==k&&(ou=a,au=0)}(t,e),cu=!0}catch(t){throw function(t){Qc=t}(t),t}}(e,t).catch(t=>{throw su=null,t})}return su}}),Pt({CompressionStreamFallback:eu,DecompressionStreamFallback:ru}),Pt({workerURI:new URL("./zip-web-worker.js",import.meta.url).href,wasmURI:new URL("./zip-module.wasm",import.meta.url).href});const fu="Entry filename already exists",du="Duplicate entry filename in the imported zip file",wu='Invalid duplicates option (must be "throw", "keep-first" or "keep-last")',pu="Entry is an ancestor of target entry",mu="Root directory cannot be moved",hu="Target entry is not a directory",yu="Parent entry is not a directory",bu="Readable stream already consumed",Eu="throw",Su="keep-first",gu="keep-last",Au=new Set([Eu,Su,gu]),Ru="Invalid passThrough option (use readerOptions.passThrough or set uncompressedSize for each entry)",zu="Invalid readerOptions (must be an object)",Du="The 'compressed' passThrough option is only supported by Entry#getData() and ZipWriter#add()",xu="Invalid passwords option (must be an array of strings)",Fu="Invalid requestPassword option (must be a function returning a string or undefined)",Ou="zipjs-abort-export",Iu=new Uint8Array(0);class Uu{constructor(t,e,r,n){const o=this;if(t.root&&n&&n.getChildByName(e))throw new Error(fu);r||(r={}),Object.assign(o,{fs:t,name:e,data:r.data,options:r.options&&Object.assign({},r.options),id:t.Ke++,parent:n,children:[],uncompressedSize:r.uncompressedSize||0,Ye:r.Ye||r.uncompressedSize===I,passThrough:r.passThrough,Xe:r.Xe||new Date}),!n&&t.root||(t.entries[o.id]=o),n&&o.parent.children.push(o)}getFullname(){return this.getRelativeName()}getRelativeName(t=this.fs.root){let e=this.name,r=this.parent;for(;r&&r!=t;)e=(r.name?r.name+"/":"")+e,r=r.parent;return e}isDescendantOf(t){let e=this.parent;for(;e&&e.id!=t.id;)e=e.parent;return Boolean(e)}rename(t){const e=this;let r=e.parent;if(r){const n=cl(t);n&&(t=n.pop(),r=ul(r,n,e));const o=r.getChildByName(t);if(o&&o!=e)throw new Error(fu);r!=e.parent&&(Wu(e),e.parent=r,r.children.push(e),il(e.fs,e))}e.name=t}setOptions(t){const e=Object.assign({},this.options,t);this.options=Object.fromEntries(Object.entries(e).filter(([,t])=>t!==I))}}class Tu extends Uu{constructor(t,e,r,n){super(t,e,r,n);const o=this;o.Reader=r.Reader,o.Writer=r.Writer,r.getData&&(o.getData=r.getData)}clone(){return new Tu(this.fs,this.name,this)}async getData(t,e={}){const r=this;if(!t||t.constructor==r.Writer&&r.data&&function(t,e){const{contentType:r}=t;return r===I||(t.constructor==Jn?e.type==r:t.constructor!=Kn||e.startsWith("data:"+(r||"")+";base64,"))}(t,r.data))return r.data;{const n=r.reader=Bu(r.Reader,r.data,e),o=r.uncompressedSize||n.size;await Promise.all([Uo(n),Uo(t,o)]);const a=dt(e.signal),i=function(t,e,r,n){const{onstart:o,onprogress:a,onend:i}=r,{readable:s}=e;return t.data instanceof ma||!o&&!a&&!i?s:Qe(s).pipeThrough(new Xr({onstart:o,onprogress:a,onend:i,size:e.size}),{signal:n})}(r,n,e,a),s=!Io(t)&&Boolean(e.preventClose);return r.uncompressedSize=n.size,await Qe(i).pipeTo(er(t.writable),{signal:a,preventClose:s,preventAbort:s}),t.getData?t.getData():t.writable}}isPasswordProtected(){return Boolean(this.data&&this.data.encrypted)}async checkPassword(t,e={}){const r=this;if(!r.isPasswordProtected())return!0;try{return await r.data.getData(null,Object.assign({},e,{password:t,checkPasswordOnly:!0})),!0}catch(t){if(Zt(t)&&t.message==Ee)return!1;throw t}}getText(t,e){return this.getData(new eo(t),e)}getBlob(t,e){return this.getData(new Jn(t),e)}getData64URI(t,e){return this.getData(new Kn(t),e)}getUint8Array(t){return this.getData(new zo,t)}getWritable(t=new WritableStream,e){return this.getData({writable:t},e)}async getArrayBuffer(t){return Lt(await this.getUint8Array(t)).buffer}replaceBlob(t){Ju(this,{data:t,Reader:$n,Writer:Jn,uncompressedSize:t.size})}replaceText(t){Ju(this,{data:t,Reader:Qn,Writer:eo,uncompressedSize:to(t)})}replaceData64URI(t){Ju(this,{data:t,Reader:qn,Writer:Kn,uncompressedSize:Qu(t)})}replaceUint8Array(t){Ju(this,{data:t,Reader:Ro,Writer:zo,uncompressedSize:t.length})}replaceReadable(t){Ju(this,{data:null,Reader:Pu(t),Writer:null,uncompressedSize:I})}}class ku extends Uu{constructor(t,e,r,n){super(t,e,r,n),this.directory=!0}clone(t){const e=this,r=new ku(e.fs,e.name,e);return t&&(r.children=e.children.map(e=>{const n=e.clone(t);return n.parent=r,n})),r}addDirectory(t,e){return sl(this,t,{options:e},!0)}addText(t,e,r={}){return sl(this,t,{data:e,Reader:Qn,Writer:eo,options:r,uncompressedSize:to(e)})}addBlob(t,e,r={}){return sl(this,t,{data:e,Reader:$n,Writer:Jn,options:r,uncompressedSize:e.size})}addData64URI(t,e,r={}){return sl(this,t,{data:e,Reader:qn,Writer:Kn,options:r,uncompressedSize:Qu(e)})}addUint8Array(t,e,r={}){return sl(this,t,{data:e,Reader:Ro,Writer:zo,options:r,uncompressedSize:e.length})}addHttpContent(t,e,r={}){return sl(this,t,{data:e,Reader:class extends go{constructor(t){super(t,r)}},options:r})}addReadable(t,e,r={}){return sl(this,t,{Reader:Pu(e),options:r})}addFileSystemEntry(t,e={}){return rl(this,t,e)}addFileSystemHandle(t,e={}){return rl(this,t,e)}addFile(t,e={}){return(e=Object.assign({},e)).lastModDate||(e.lastModDate=new Date(t.lastModified)),sl(this,t.name,{data:t,Reader:function(){return{readable:t.stream(),size:t.size}},options:e,uncompressedSize:t.size})}importBlob(t,e){return this.importZip(new $n(t),e)}importData64URI(t,e){return this.importZip(new qn(t),e)}importUint8Array(t,e){return this.importZip(new Ro(t),e)}importHttpContent(t,e){return this.importZip(new go(t,e),e)}importReadable(t,e){return this.importZip({readable:t},e)}exportBlob(t={}){return this.exportZip(new Jn(t.mimeType||"application/zip"),t)}exportData64URI(t={}){return this.exportZip(new Kn(t.mimeType||"application/zip"),t)}exportUint8Array(t={}){return this.exportZip(new zo,t)}async exportWritable(t=new WritableStream,e={}){return await this.exportZip({writable:t},e),t}exportFileSystemHandle(t,e={}){return async function(t,e,r){const{onstart:n,onprogress:o,onend:a}=r;$u(r.passThrough),qu(r);const i=Gu(r.readerOptions),s=new AbortController,{signal:c}=s,u=function(t,e){if(!dt(t))return()=>{};if(t.aborted)return e.abort(t.reason),()=>{};const r=()=>e.abort(t.reason);return t.addEventListener("abort",r,{once:!0}),()=>t.removeEventListener("abort",r)}(r.signal,s),l=Object.assign({},r,i,{signal:c,onstart:I,onprogress:I,onend:I,preventClose:!1}),f=Mu([t],t=>_u(t,l.passThrough)),d=[];let w=!1,p=0;try{n&&await $r(n,f),await h(t,e),a&&await $r(a,p)}catch(t){try{t.exportedEntryNames=d}catch{}throw t}finally{u()}return e;function m(t){const e=t.getWriter();return new WritableStream({async write(t){await e.write(t),p+=t.length,o&&await $r(o,p,f)},close:()=>e.close(),abort:t=>e.abort(t)})}async function h(t,e){if(r.concurrent){const r=(await Promise.allSettled(t.children.map(t=>y(t,e)))).filter(t=>"rejected"==t.status);if(r.length){const t=r.filter(t=>!Zu(t.reason));throw function(t){const[e]=t,r=t.slice(1).flatMap(t=>[t,...t&&t.entryErrors||[]]).filter(t=>t!==e);if(r.length)try{e.entryErrors=[...e.entryErrors||[],...r]}catch{}return e}((t.length?t:r).map(t=>t.reason))}}else for(const r of t.children)await y(r,e)}async function y(e,r){if(c.aborted){if(w||Zu(c.reason))return;wt(c)}try{if(e.directory){const t=await r.getDirectoryHandle(e.name,{create:!0});await h(e,t)}else{const n=await r.getFileHandle(e.name,{create:!0}),o=await n.createWritable();try{await e.getData({writable:m(o)},l)}catch(t){throw w?new Error(Ou):t}d.push(e.getRelativeName(t))}}catch(r){w=!0,s.abort(new Error(Ou));try{r.entryName===I&&(r.entryName=e.getRelativeName(t),r.entryId=e.id)}catch{}throw r}}}(this,t,e)}async importZip(t,e={}){let r;t&&typeof t.getEntries==k?(r=t,e=Object.assign({},r.options,e)):(await Uo(t),r=new ii(t,e)),$u(e.passThrough),qu(e);const n=function(t){if(t===I)return Eu;if(Au.has(t))return t;throw new Error(wu)}(e.duplicates),o=[],a={$e:[]},i=await r.getEntries(e);for(const t of i){let r=this;try{const i=t.filename.split("/").filter(t=>""!=t&&"."!=t),s=i.pop();let c=!1;for(const t of i){const e=r;if(r=r.getChildByName(t),r){if(!r.directory){if(n==Su){c=!0;break}if(n!=gu)throw new Error(du);this.fs.remove(r),r=new ku(this.fs,t,{data:null},e),o.push(r)}}else r=new ku(this.fs,t,{data:null},e),o.push(r)}if(c)continue;if(t.directory){let e=r;if(s){if(e=r.getChildByName(s),e&&(!e.directory||e.data)){if(n==Su)continue;if(n!=gu)throw new Error(du);e.directory?e.data=t:(this.fs.remove(e),e=I)}e||(e=new ku(this.fs,s,{data:null},r),o.push(e))}e==this||e.data||(e.data=t)}else{const i=r.getChildByName(s);if(i){if(n==Su)continue;if(n!=gu)throw new Error(du);this.fs.remove(i)}o.push(sl(r,s,{data:t,Reader:ju(Object.assign({},e),a),uncompressedSize:e.passThrough?t.compressedSize:t.uncompressedSize,passThrough:e.passThrough}))}}catch(e){o.reverse().forEach(t=>this.fs.remove(t));try{e.cause={entry:t}}catch{}throw e}}return o}async exportZip(t,e={}){const r=this,n=Boolean(t)&&typeof t.add==k;e=Object.assign({},e),n||e.bufferedWrite!==I||(e.bufferedWrite=!0);const[o]=await Promise.all([Lu(r,Gu(e.readerOptions)),n?I:Uo(t)]),a=n?t:new _s(t,e);return await async function(t,e,r,n,o){const{onstart:a,onprogress:i,onend:s,onentryprogress:c}=n,u=e,l=Mu(e.children,t=>el(t)?0:1);let f=0,d=0;if(a&&await $r(a,r),n.bufferedWrite)await async function t(e){const r=(await Promise.allSettled(e.children.map(async e=>{await w(e),await t(e)}))).find(t=>"rejected"==t.status);if(r)throw r.reason}(e);else for(const t of e.getChildren({recursive:!0}))await w(t);async function w(e){if(el(e))return;const{name:a,Qt:s}=Vu(e,u,n);let w=0;const p=await t.add(a,o.get(e),Object.assign(s,{onstart:I,onend:I,onprogress:async t=>{f+=t-w,w=t,i&&await $r(i,f,r)}}));d++,c&&await $r(c,d,l,p)}s&&await $r(s,f)}(a,r,Mu([r],Nu),e,o),n?a:(await a.close(e.globalComment),t.getData?t.getData():t.writable)}async getExportedSize(r={}){const n=this;Gu((r=Object.assign({},r)).readerOptions),r.bufferedWrite===I&&(r.bufferedWrite=!0);const o=n.getChildren({recursive:!0}),a=o.filter(t=>!el(t)).map(t=>{const{name:e,Qt:o}=Vu(t,n,r);return{name:e,size:t.directory?0:Hu(t,tl(t,r)),options:o}}),i=!r.bufferedWrite||a.every(t=>!1!==t.options.keepOrder)&&o.every(t=>el(t)||!t.children.length);return await async function(r,n,o,a){const i={options:r};if(ft(r[J]))throw new Error(ps);if(a!==I&&!(a instanceof Uint8Array))throw new Error(Gi);const s=Oc(a);if(s>e)throw new Error(Hi);const c=r[X],u=new Map,l=r[Y]===I?0:r[Y];let f=l,w=U;const p=[],m=new Set;for(const e of n){let{name:r}=e;const{size:n}=e,o=Object.assign({},e.options);yc(i,o,aa)&&!r.endsWith(D)&&(r+=D);const a=Hs(i,r,o);({name:r}=a);const{ee:s}=Gs(i,r,o);0==s.level||s.compressionMethod!==I||s.ne||await Gr(Tt())||(s.level=0);const l=!yc(i,o,aa);if(l&&n===I)throw new Error(ps);const{Pe:d,ee:h}=Ks(i,l,n,s,o);if(l&&!s.ne&&Ac(h.compressionMethod,h.level))throw new Error(ps);const y=Object.assign({},o,a.ee,s,h,{[X]:c}),b=Xs(y),E=Qs(y),S={ue:b,we:Oc(b.ie,E.se)};c&&$s(S,f);const g=l?d:0;u.set(r,Object.assign({},y,b,{offset:f,diskNumberStart:0,compressedSize:g}));const A=S.we+g;p.push(A),m.add(Boolean(y.Ht||y.uncompressedSize>=t||g>=t)),w=Math.min(w,A),f+=A}if(u.size>1&&(c||f-w>=t&&(m.size>1||Ys(p,l,!0)!=Ys(p,l,!1)))&&!o)throw new Error(ps);const{Re:h,ze:y}=tc(u);let b=yc(i,r,ta);if(f>=t||h>=t||u.size>=e){if(!1===b)throw new Error(ls);b=!0}else b===I&&y&&(b=!0);return f-l+h+s+(b?98:d)}(r,a,i,r.globalComment)}getChildByName(t){const e=this.children;for(let r=0;r<e.length;r++){const n=e[r];if(n.name==t)return n}}getChildren(t={}){return function(t,e){const r=[],n=[t];let o=0;for(;o<n.length;)for(const t of n[o++].children)r.push(t),e&&n.push(t);return r}(this,t.recursive)}isPasswordProtected(){const t=this.children;for(let e=0;e<t.length;e++)if(t[e].isPasswordProtected())return!0;return!1}async checkPassword(t,e={}){const r=this.children;return!(await Promise.all(r.map(r=>r.checkPassword(t,e)))).includes(!1)}}class Cu{constructor(){ol(this)}get children(){return this.root.children}remove(t){Wu(t);const e=[t];for(;e.length;){const t=e.pop();this.entries[t.id]=null;for(const r of t.children)e.push(r)}t.parent=I}move(t,e){if(t==this.root)throw new Error(mu);if(!e.directory)throw new Error(hu);if(e.isDescendantOf(t))throw new Error(pu);if(t!=e){const r=e.getChildByName(t.name);if(r){if(r!=t)throw new Error(fu)}else Wu(t),t.parent=e,e.children.push(t),il(this,t)}}find(t){const e=t.split("/");let r=this.root;for(let t=0;r&&t<e.length;t++)r=r.directory?r.getChildByName(e[t]):I;return r||(r=this.entries.find(e=>e&&(e==this.root||e.isDescendantOf(this.root))&&e.getRelativeName()==t)),r}getById(t){return this.entries[t]}getChildByName(t){return this.root.getChildByName(t)}getChildren(t){return this.root.getChildren(t)}addDirectory(t,e){return this.root.addDirectory(t,e)}addText(t,e,r){return this.root.addText(t,e,r)}addBlob(t,e,r){return this.root.addBlob(t,e,r)}addData64URI(t,e,r){return this.root.addData64URI(t,e,r)}addUint8Array(t,e,r){return this.root.addUint8Array(t,e,r)}addHttpContent(t,e,r){return this.root.addHttpContent(t,e,r)}addReadable(t,e,r){return this.root.addReadable(t,e,r)}addFileSystemEntry(t,e){return this.root.addFileSystemEntry(t,e)}addFileSystemHandle(t,e){return this.root.addFileSystemHandle(t,e)}addFile(t,e){return this.root.addFile(t,e)}importBlob(t,e){return al(this,r=>r.importBlob(t,e))}importData64URI(t,e){return al(this,r=>r.importData64URI(t,e))}importUint8Array(t,e){return al(this,r=>r.importUint8Array(t,e))}importHttpContent(t,e){return al(this,r=>r.importHttpContent(t,e))}importReadable(t,e){return al(this,r=>r.importReadable(t,e))}importZip(t,e){return al(this,r=>r.importZip(t,e))}exportBlob(t){return this.root.exportBlob(t)}exportData64URI(t){return this.root.exportData64URI(t)}exportUint8Array(t){return this.root.exportUint8Array(t)}exportWritable(t,e){return this.root.exportWritable(t,e)}exportFileSystemHandle(t,e){return this.root.exportFileSystemHandle(t,e)}exportZip(t,e){return this.root.exportZip(t,e)}getExportedSize(t){return this.root.getExportedSize(t)}isPasswordProtected(){return this.root.isPasswordProtected()}checkPassword(t,e){return this.root.checkPassword(t,e)}}const vu={FS:Cu,ZipDirectoryEntry:ku,ZipFileEntry:Tu};function Mu(t,e){let r=0;const n=Array.from(t);for(;n.length;){const t=n.pop();r+=e(t)||0;for(const e of t.children)n.push(e)}return r}function Nu(t){return t.uncompressedSize}function _u(t,e){const{data:r}=t;return e&&r instanceof ma?r.compressedSize:t.uncompressedSize}function Pu(t){let e;return function(){if(e)throw new Error(bu);return e=!0,{readable:t}}}function ju(t,e){return class extends Hn{constructor(t,e={}){super(),this.entry=t,this.options=e}async init(){const r=this,n=Object.assign({},t,r.options),{checkOverlappingEntry:o,checkOverlappingEntryOnly:a}=n,i=await async function(t,e,r){qu(e);const{passwords:n,requestPassword:o,signal:a}=e;if(delete(e=Object.assign({},e)).passwords,delete e.requestPassword,!t.encrypted||e.passThrough||!n&&!o)return t.getData(new Jn,e);const i=new Set;let s;for(;;){for(const t of Yu(e,r,n))if(!i.has(t.key)){const e=await c(t);if(e.done)return e.data;s=e.error}if(!o)break;if(r.Je){await r.Je;continue}let a;r.Je=new Promise(t=>a=t);try{const e=await o(t,s);if(e===I||null===e)break;if(typeof e!=v)throw new Error(Fu);const r=await c(Xu(e));if(r.done)return r.data;s=r.error}finally{r.Je=I,a()}}throw new Error(i.size?Ee:za);async function c(n){i.add(n.key);const o=Object.assign({},e,n.options);if(t.zipCrypto){o.checkCrc32=!0;try{await t.getData(null,Object.assign({},o,{checkPasswordOnly:!0}))}catch(t){if(Ku(t))return{done:!1,error:t};throw t}}try{const e=await t.getData(new Jn,o);return function(t,e){const{$e:r}=t,n=r.findIndex(t=>t.key===e.key);-1!=n&&r.splice(n,1),r.unshift(e)}(r,n),{done:!0,data:e}}catch(e){if(function(t,e){return Boolean(e&&e.aborted)||Zt(t)&&"AbortError"==t.name}(e,a)||!t.zipCrypto&&!Ku(e))throw e;return{done:!1,error:e}}}}(r.entry,Object.assign(n,{checkPasswordOnly:!1,checkOverlappingEntry:a||o,checkOverlappingEntryOnly:!1,preventClose:!1}),e);r.data=i,r.Qe=new $n(i),r.size=i.size,super.init()}readUint8Array(t,e){return this.Qe.readUint8Array(t,e)}}}function Bu(t,e,r){return t.prototype?new t(e,r):t(e,r)}async function Lu(t,e){const r=[],n=[t],o=new Map;for(;n.length;){const t=n.pop();for(const e of t.children)e.directory?n.push(e):r.push(e)}return await Promise.all(r.map(async r=>{const n=r.reader=Bu(r.Reader,r.data,e);o.set(r,n);try{await Uo(n)}catch(e){try{e.entry=r,e.entryId=r.id,e.entryName=r.getRelativeName(t)}catch{}throw e}n.size!==I&&(r.uncompressedSize=n.size,r.Ye=!1)})),o}function Wu(t){if(t.parent){const e=t.parent.children;e.forEach((r,n)=>{r.id==t.id&&e.splice(n,1)})}}function Zu(t){return Boolean(t)&&t.message==Ou}function Vu(t,e,r){const n=r.relativePath?t.getRelativeName(e):t.getFullname(),o=t.options||{};let a={},i={};if(t.data instanceof ma){const e=tl(t,r),n=o.lastModDate===I?r.lastModDate:o.lastModDate;({Qt:a,te:i}=Vs(t.data,e,n)),e&&(i.passThrough=!0)}const s=Object.assign({lastModDate:t.Xe},a,r,o,i,{directory:t.directory});if(!t.directory&&s.passThrough&&s.uncompressedSize===I)throw new Error(Ru);return{name:n,Qt:s}}function Hu(t,e){const{reader:r}=t;return r&&r.size!==I?r.size:t.Ye?I:_u(t,e)}function Gu(t){if(t&&(typeof t!=C||Array.isArray(t)))throw new Error(zu);return t&&($u(t.passThrough),qu(t)),t}function qu(t){const{passwords:e,requestPassword:r}=t;if(e&&(!Array.isArray(e)||e.some(t=>typeof t!=v)))throw new Error(xu);if(r&&typeof r!=k)throw new Error(Fu)}function Ku(t){return Zt(t)&&t.message==Ee}function Yu(t,e,r){const n=[],{password:o,rawPassword:a}=t;return a&&a.length&&n.push({key:a,options:{password:"",rawPassword:a}}),o&&n.push(Xu(o)),n.push(...e.$e),r&&n.push(...r.filter(t=>t).map(Xu)),n}function Xu(t){return{key:t,options:{password:t,rawPassword:Iu}}}function $u(t){if(mt(t)===at)throw new Error(Du)}function Ju(t,e){const{uncompressedSize:r}=e;Object.assign(t,e,{reader:null,passThrough:I,uncompressedSize:r===I?0:r,Ye:r===I})}function Qu(t){let e=t.length;for(;"="==t.charAt(e-1);)e--;const r=t.indexOf(",")+1;return Math.floor(.75*(e-r))}function tl(t,e){const{readerOptions:r}=e;return Boolean(!t.directory&&(t.passThrough||r&&r.passThrough))}function el(t){return t.directory&&null===t.data}function rl(t,e,r){return async function t(e,n,o,a=""){if(n){const i=a?a+"/"+n.name:n.name;try{if((n.isFile||n.isDirectory)&&(n=await nl(n)),"file"==n.kind){const t=await n.getFile();o.push(sl(e,t.name,{Reader:function(){return{readable:t.stream(),size:t.size}},options:Object.assign({},{lastModDate:new Date(t.lastModified)},r),uncompressedSize:t.size}))}else if("directory"==n.kind){const a=e.addDirectory(n.name,r);o.push(a);for await(const e of n.values())await t(a,e,o,i)}}catch(t){try{t.entryName===I&&(t.entryName=i)}catch{}throw t}}return o}(t,e,[])}async function nl(t){const e={name:t.name};if(t.isFile&&(e.kind="file",e.getFile=()=>new Promise((e,r)=>t.file(e,r))),t.isDirectory){e.kind="directory";const r=await async function(t){const e=[];function r(t,n,o){t.readEntries(async a=>{if(a.length){for(const t of a)e.push(await nl(t));r(t,n,o)}else n(e)},o)}return await new Promise((e,n)=>r(t.createReader(),e,n)),{[Symbol.iterator](){let t=0;return{next(){const r={value:e[t],done:t==e.length};return t++,r}}}}}(t);e.values=()=>r}return e}function ol(t){t.entries=[],t.Ke=0,t.root=new ku(t)}function al(t,e){const{entries:r,Ke:n,root:o}=t;return ol(t),e(t.root).catch(e=>{throw Object.assign(t,{entries:r,Ke:n,root:o}),e})}function il(t,e){const r=[e];for(;r.length;){const e=r.pop();t.entries[e.id]=e;for(const t of e.children)r.push(t)}}function sl(t,e,r,n){if(t.directory){const o=cl(e);return o&&(e=o.pop(),t=ul(t,o)),n?new ku(t.fs,e,r,t):new Tu(t.fs,e,r,t)}throw new Error(yu)}function cl(t){if(t.includes("/")){const e=t.split("/").filter(t=>""!=t&&"."!=t);if(e.length)return e}}function ul(t,e,r){return e.forEach(e=>{const n=t;if(t=t.getChildByName(e)){if(!t.directory)throw new Error(fu);if(r&&(t==r||t.isDescendantOf(r)))throw new Error(pu)}else t=new ku(n.fs,e,{data:null},n)}),t}export{$n as BlobReader,Jn as BlobWriter,qn as Data64URIReader,Kn as Data64URIWriter,lt as ERR_ABORTED,Ia as ERR_AMBIGUOUS_ARCHIVE,pu as ERR_ANCESTOR_ENTRY,ba as ERR_BAD_FORMAT,ga as ERR_CENTRAL_DIRECTORY_NOT_FOUND,Vi as ERR_DUPLICATED_NAME,du as ERR_DUPLICATE_IMPORTED_ENTRY,za as ERR_ENCRYPTED,Ua as ERR_ENCRYPTED_CENTRAL_DIRECTORY,Oa as ERR_ENTRY_DATA_OUT_OF_BOUNDS,fu as ERR_ENTRY_EXISTS,Sa as ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND,Ea as ERR_EOCDR_NOT_FOUND,Ra as ERR_EXTRAFIELD_ZIP64_NOT_FOUND,kn as ERR_HTTP_RANGE,Cn as ERR_HTTP_RESOURCE_CHANGED,Tn as ERR_HTTP_STATUS,Se as ERR_INVALID_AUTHENTICATION_CODE,St as ERR_INVALID_BASE_URI,rr as ERR_INVALID_CODEC_DEFINITION,or as ERR_INVALID_CODEC_MODULE,Hi as ERR_INVALID_COMMENT,Gi as ERR_INVALID_COMMENT_TYPE,hr as ERR_INVALID_COMPRESSED_DATA,yr as ERR_INVALID_CRC32,Yi as ERR_INVALID_DATE,wu as ERR_INVALID_DUPLICATES,Ji as ERR_INVALID_ENCRYPTION_STRENGTH,Fs as ERR_INVALID_ENTRY,qi as ERR_INVALID_ENTRY_COMMENT,Ki as ERR_INVALID_ENTRY_COMMENT_TYPE,Xi as ERR_INVALID_ENTRY_NAME,rs as ERR_INVALID_EXTRAFIELD,as as ERR_INVALID_EXTRAFIELD_DATA,os as ERR_INVALID_EXTRAFIELD_DATA_TYPE,ns as ERR_INVALID_EXTRAFIELD_TYPE,Ca as ERR_INVALID_FILENAME_VALIDATION,it as ERR_INVALID_FUNCTION_OPTION,Es as ERR_INVALID_GID,Ds as ERR_INVALID_LEVEL,va as ERR_INVALID_MAX_APPENDED_DATA_SIZE,Et as ERR_INVALID_MAX_WORKERS,Rs as ERR_INVALID_MSDOS_ATTRIBUTES,zs as ERR_INVALID_MSDOS_DATA,Ee as ERR_INVALID_PASSWORD,xu as ERR_INVALID_PASSWORDS,ct as ERR_INVALID_PASSWORD_TYPE,Ru as ERR_INVALID_PASS_THROUGH,ut as ERR_INVALID_PASS_THROUGH_VALUE,hs as ERR_INVALID_READER,zu as ERR_INVALID_READER_OPTIONS,Fu as ERR_INVALID_REQUEST_PASSWORD,st as ERR_INVALID_SIGNAL,xs as ERR_INVALID_SIGNATURE_DATA,ka as ERR_INVALID_STRICTNESS,bs as ERR_INVALID_UID,mr as ERR_INVALID_UNCOMPRESSED_SIZE,gs as ERR_INVALID_UNIX_EXTRA_FIELD_TYPE,As as ERR_INVALID_UNIX_ID_SIZE,Ss as ERR_INVALID_UNIX_MODE,gt as ERR_INVALID_URI,$i as ERR_INVALID_VERSION,vn as ERR_ITERATOR_COMPLETED_TOO_SOON,Aa as ERR_LOCAL_FILE_HEADER_NOT_FOUND,Fa as ERR_OVERLAPPING_ENTRY,yu as ERR_PARENT_NOT_DIRECTORY,bu as ERR_READABLE_CONSUMED,nr as ERR_RESERVED_COMPRESSION_METHOD,mu as ERR_ROOT_DIRECTORY_NOT_MOVABLE,xa as ERR_SPLIT_ZIP_FILE,hu as ERR_TARGET_NOT_DIRECTORY,ds as ERR_UNDEFINED_COMPRESSION_METHOD,ws as ERR_UNDEFINED_CRC32,ms as ERR_UNDEFINED_READER,fs as ERR_UNDEFINED_UNCOMPRESSED_SIZE,ps as ERR_UNDETERMINED_SIZE,Ta as ERR_UNSAFE_FILENAME,ar as ERR_UNSUPPORTED_COMPRESSION,Zc as ERR_UNSUPPORTED_CONTEXT,Ae as ERR_UNSUPPORTED_CRYPTO_API,Da as ERR_UNSUPPORTED_ENCRYPTION,es as ERR_UNSUPPORTED_ENCRYPTION_PASS_THROUGH,Qi as ERR_UNSUPPORTED_ENCRYPTION_USDZ,ls as ERR_UNSUPPORTED_FORMAT,Du as ERR_UNSUPPORTED_PASS_THROUGH_VALUE,ts as ERR_UNSUPPORTED_SPLIT_USDZ,Ma as ERR_UNSUPPORTED_UINT64,Lr as ERR_WORKER_STARTUP_TIMEOUT,Mn as ERR_WRITER_NOT_INITIALIZED,Nn as ERR_WRITER_SIZE_NOT_WRITABLE,Os as ERR_ZIP_CRYPTO_LAST_MOD_DATE,ys as ERR_ZIP_NOT_EMPTY,Ao as HttpRangeReader,go as HttpReader,Hn as Reader,Do as SplitDataReader,xo as SplitDataWriter,Qn as TextReader,eo as TextWriter,Ro as Uint8ArrayReader,zo as Uint8ArrayWriter,Mc as VERSION,Wa as WARNING_APPENDED_DATA,Us as WARNING_CLAMPED_LAST_MODIFICATION_DATE,Pa as WARNING_COMPRESSED_PATCHED_DATA,Is as WARNING_COMPRESSION_UNAVAILABLE,Ga as WARNING_DUPLICATE_FILENAME,ja as WARNING_MALFORMED_EXTRA_FIELD,Xa as WARNING_MISMATCHED_LOCAL_FILE_HEADER_BIT_FLAG,$a as WARNING_MISMATCHED_LOCAL_FILE_HEADER_COMPRESSION_METHOD,Ja as WARNING_MISMATCHED_LOCAL_FILE_HEADER_CRC32_OR_SIZES,Ya as WARNING_MISMATCHED_LOCAL_FILE_HEADER_FILENAME,qa as WARNING_MISMATCHED_ZIP64_END_OF_CENTRAL_DIRECTORY,Ka as WARNING_MULTIPLE_END_OF_CENTRAL_DIRECTORY,Va as WARNING_PREPENDED_CENTRAL_DIRECTORY,Za as WARNING_PREPENDED_DATA,Ha as WARNING_TRAILING_CENTRAL_DIRECTORY_DATA,_a as WARNING_UNKNOWN_VERSION,Ba as WARNING_UNKNOWN_ZIP64_EXTENSIBLE_DATA,Na as WARNING_UNSORTED_CENTRAL_DIRECTORY,La as WARNING_WRAPPED_ENTRIES_COUNT,Gn as Writer,ku as ZipDirectoryEntry,Uu as ZipEntry,Cu as ZipFS,Tu as ZipFileEntry,ii as ZipReader,si as ZipReaderStream,_s as ZipWriter,Ps as ZipWriterStream,vt as configure,Bc as createBlobTempStream,Pc as createOPFSTempStream,Vc as createSyncAccessHandleTempStream,vu as fs,kc as getMimeType,dr as getRegisteredCodecs,Cc as getSupportedCompressionMethods,ci as isZipFile,ur as registerCodec,jt as resetConfiguration,lu as terminateWorkers,lr as unregisterCodec};
|