@zip.js/zip.js 2.8.58 → 2.8.59

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.
@@ -1 +1 @@
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,h=56,p=39169,m=21589,y=6534,b=30837,E=30805,S=2048,g=61440,x=16384,A=2048,z=1024,R="/",D=30,F=new Date(2107,11,31,23,59,58),O=new Date(1980,0,1),U=void 0,k=1/0,T="undefined",v="function",I="object",M="string",C=new Uint8Array,N="password",j="rawPassword",B="passThrough",P="signal",_="useWebWorkers",W="useCompressionStream",L="transferStreams",V="preventClose",Z="dataDescriptor",H="offset",q="usdz",K="signCentralDirectory",Y="filename",G="comment",X="strict",J="balanced",Q="tolerant",$="Invalid option (must be a function)",tt="Invalid signal (must be an AbortSignal instance)",et="Invalid password (password must be a string, rawPassword must be a Uint8Array)";function rt(t){if(t&&typeof t!=v)throw new Error($);return t}function nt(t){if(t&&(typeof t.addEventListener!=v||"boolean"!=typeof t.aborted))throw new Error(tt);return t||U}function ot(t,e){if(t&&typeof t!=M||e&&!(e instanceof Uint8Array))throw new Error(et)}function at(t,e,r){if(!Number.isInteger(t)||t<0||t>e)throw new Error(r)}function it(t,e,r){t!==U&&at(t,e,r)}function st(t){return typeof t==M&&t.trim()?Number(t):t}const ct="Invalid maxWorkers (must be an integer greater than 0)";let ut=2;try{typeof navigator!=T&&navigator.hardwareConcurrency&&(ut=navigator.hardwareConcurrency)}catch{}const lt={workerURI:"./core/web-worker-wasm.js",wasmURI:"./core/streams/zlib-wasm/zlib-streams.wasm",chunkSize:65536,maxWorkers:ut,terminateWorkerTimeout:5e3,workerStarvationTimeout:5e3,workerStartupTimeout:5e3,useWebWorkers:!0,useCompressionStream:!0,transferStreams:!0,CompressionStream:typeof CompressionStream!=T&&CompressionStream,DecompressionStream:typeof DecompressionStream!=T&&DecompressionStream},ft="maxWorkers",dt=["chunkSize",ft,"terminateWorkerTimeout","workerStarvationTimeout","workerStartupTimeout"],wt=["createWorker","CompressionStream","DecompressionStream","CompressionStreamFallback","DecompressionStreamFallback"],ht=["baseURI","wasmURI","workerURI","useCompressionStream","useWebWorkers","transferStreams",...dt,...wt],pt={...lt};function mt(){return pt}function yt(t){return bt(t.chunkSize)}function bt(t){return t=st(t),Number.isInteger(t)&&t>=1?Math.max(t,64):65536}function Et(t){Object.assign(pt,St(xt(t)))}function St(t){const e={};for(const r of ht){const n=t[r];n!==U&&(e[r]=gt(r,n))}return e}function gt(t,e){if(dt.includes(t)){if(e=st(e),t==ft&&(!Number.isInteger(e)||e<1))throw new Error(ct)}else wt.includes(t)&&rt(e);return e}function xt(t){t=t||{};const{CompressionStreamZlib:e,DecompressionStreamZlib:r}=t;if(e===U&&r===U)return t;const n=Object.assign({},t);return n.CompressionStreamFallback===U&&(n.CompressionStreamFallback=e),n.DecompressionStreamFallback===U&&(n.DecompressionStreamFallback=r),n}function At(t){const e=St(xt(t));Object.assign(lt,e),Object.assign(pt,e)}function zt(){for(const t of ht)delete pt[t];Object.assign(pt,lt)}function Rt(t,e){const r=new Uint8Array(t.length+e.length);return r.set(t),r.set(e,t.length),r}function Dt(t){return t.byteOffset||t.byteLength!=t.buffer.byteLength?new Uint8Array(t):t}function Ft(t){return new DataView(t.buffer,t.byteOffset,t.byteLength)}const Ot=[[],[],[],[],[],[],[],[]];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;Ot[0][t]=e}for(let t=0;t<256;t++)for(let e=1;e<8;e++){const r=Ot[e-1][t];Ot[e][t]=r>>>8^Ot[0][255&r]}const[Ut,kt,Tt,vt,It,Mt,Ct,Nt]=Ot;class jt{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=Nt[255&t]^Ct[t>>>8&255]^Mt[t>>>16&255]^It[t>>>24&255]^vt[255&r]^Tt[r>>>8&255]^kt[r>>>16&255]^Ut[r>>>24&255]}}for(;n<r;n++)e=e>>>8^Ut[255&(e^t[n])];this.o=e}get(){return~this.o}}class Bt extends TransformStream{constructor(){let t;const e=new jt;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 Pt(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 _t={concat(t,e){if(0===t.length||0===e.length)return t.concat(e);const r=t[t.length-1],n=_t.l(r);return 32===n?t.concat(e):_t.h(e,n,0|r,t.slice(0,t.length-1))},bitLength(t){const e=t.length;if(0===e)return 0;const r=t[e-1];return 32*(e-1)+_t.l(r)},m(t,e){if(32*t.length<e)return t;const r=(t=t.slice(0,Math.ceil(e/32))).length;return e&=31,r>0&&e&&(t[r-1]=_t.S(e,t[r-1]&2147483648>>e-1,1)),t},S:(t,e,r)=>32===t?e:(r?0|e:e<<32-t)+1099511627776*t,l:t=>Math.round(t/1099511627776)||32,h(t,e,r,n){for(void 0===n&&(n=[]);e>=32;e-=32)n.push(r),r=0;if(0===e)return n.concat(t);for(let o=0;o<t.length;o++)n.push(r|t[o]>>>e),r=t[o]<<32-e;const o=t.length?t[t.length-1]:0,a=_t.l(o);return n.push(_t.S(e+a&31,e+a>32?r:n.pop(),1)),n}},Wt={bytes:{A(t){const e=_t.bitLength(t)/8,r=new Uint8Array(e);let n;for(let o=0;o<e;o++)3&o||(n=t[o/4]),r[o]=n>>>24,n<<=8;return r},R(t){const e=[];let r,n=0;for(r=0;r<t.length;r++)n=n<<8|t[r],3&~r||(e.push(n),n=0);return 3&r&&e.push(_t.S(8*(3&r),n)),e}}},Lt=class{constructor(t){const e=this;e.blockSize=512,e.D=[1732584193,4023233417,2562383102,271733878,3285377520],e.F=[1518500249,1859775393,2400959708,3395469782],t?(e.O=t.O.slice(0),e.U=t.U.slice(0),e.T=t.T):e.reset()}reset(){const t=this;return t.O=t.D.slice(0),t.U=[],t.T=0,t}update(t){const e=this;"string"==typeof t&&(t=Wt.v.R(t));const r=e.U=_t.concat(e.U,t),n=e.T,o=e.T=n+_t.bitLength(t);if(o>9007199254740991)throw new Error("Cannot hash more than 2^53 - 1 bits");const a=new Uint32Array(r);let i=0;for(let t=e.blockSize+n-(e.blockSize+n&e.blockSize-1);t<=o;t+=e.blockSize)e.I(a.subarray(16*i,16*(i+1))),i+=1;return r.splice(0,16*i),e}M(){const t=this;let e=t.U;const r=t.O;e=_t.concat(e,[_t.S(1,1)]);for(let t=e.length+2;15&t;t++)e.push(0);for(e.push(Math.floor(t.T/4294967296)),e.push(0|t.T);e.length;)t.I(e.splice(0,16));return t.reset(),r}C(t,e,r,n){return t<=19?e&r|~e&n:t<=39?e^r^n:t<=59?e&r|e&n|r&n:t<=79?e^r^n:void 0}N(t,e){return e<<t|e>>>32-t}I(t){const e=this,r=e.O,n=Array(80);for(let e=0;e<16;e++)n[e]=t[e];let o=r[0],a=r[1],i=r[2],s=r[3],c=r[4];for(let t=0;t<=79;t++){t>=16&&(n[t]=e.N(1,n[t-3]^n[t-8]^n[t-14]^n[t-16]));const r=e.N(5,o)+e.C(t,a,i,s)+c+n[t]+e.F[Math.floor(t/20)]|0;c=s,s=i,i=e.N(30,a),a=o,o=r}r[0]=r[0]+o|0,r[1]=r[1]+a|0,r[2]=r[2]+i|0,r[3]=r[3]+s|0,r[4]=r[4]+c|0}},Vt={importKey:t=>new Vt.j(Wt.bytes.R(t)),B(t,e,r,n){if(r=r||1e4,n<0||r<0)throw new Error("invalid params to pbkdf2");const o=1+(n>>5)<<2;let a,i,s,c,u;const l=new ArrayBuffer(o),f=new DataView(l);let d=0;const w=_t;for(e=Wt.bytes.R(e),u=1;d<(o||1);u++){for(a=i=t.encrypt(w.concat(e,[u])),s=1;s<r;s++)for(i=t.encrypt(i),c=0;c<i.length;c++)a[c]^=i[c];for(s=0;d<(o||1)&&s<a.length;s++)f.setInt32(d,a[s]),d+=4}return l.slice(0,n/8)},j:class{constructor(t){const e=this,r=e.P=Lt,n=[[],[]];e._=[new r,new r];const o=e._[0].blockSize/32;t.length>o&&(t=(new r).update(t).M());for(let e=0;e<o;e++)n[0][e]=909522486^t[e],n[1][e]=1549556828^t[e];e._[0].update(n[0]),e._[1].update(n[1]),e.W=new r(e._[0])}reset(){const t=this;t.W=new t.P(t._[0]),t.L=!1}update(t){this.L=!0,this.W.update(t)}digest(){const t=this,e=t.W.M(),r=new t.P(t._[1]).update(e).M();return t.reset(),r}encrypt(t){if(this.L)throw new Error("encrypt on already updated hmac called!");return this.update(t),this.digest(t)}}},Zt=typeof crypto!=T&&typeof crypto.getRandomValues==v,Ht="Invalid password",qt="Invalid signature",Kt=qt,Yt="zipjs-abort-check-password",Gt="Crypto API not supported";function Xt(t){if(Zt)return crypto.getRandomValues(t);throw new Error(Gt)}const Jt=16,Qt={name:"PBKDF2"},$t=Object.assign({hash:{name:"HMAC"}},Qt),te=Object.assign({iterations:1e3,hash:{name:"SHA-1"}},Qt),ee=["deriveBits"],re=[8,12,16],ne=[16,24,32],oe=10,ae=[0,0,0,0],ie=typeof crypto!=T,se=ie&&crypto.subtle,ce=ie&&typeof se!=T,ue=Wt.bytes,le=class{constructor(t){const e=this;e.V=[[[],[],[],[],[]],[[],[],[],[],[]]],e.V[0][0][0]||e.Z();const r=e.V[0][4],n=e.V[1],o=t.length;let a,i,s,c=1;if(4!==o&&6!==o&&8!==o)throw new Error("invalid aes key size");for(e.F=[i=t.slice(0),s=[]],a=o;a<4*o+28;a++){let t=i[a-1];(a%o===0||8===o&&a%o===4)&&(t=r[t>>>24]<<24^r[t>>16&255]<<16^r[t>>8&255]<<8^r[255&t],a%o===0&&(t=t<<8^t>>>24^c<<24,c=c<<1^283*(c>>7))),i[a]=i[a-o]^t}for(let t=0;a;t++,a--){const e=i[3&t?a:a-4];s[t]=a<=4||t<4?e:n[0][r[e>>>24]]^n[1][r[e>>16&255]]^n[2][r[e>>8&255]]^n[3][r[255&e]]}}encrypt(t){return this.H(t,0)}decrypt(t){return this.H(t,1)}Z(){const t=this.V[0],e=this.V[1],r=t[4],n=e[4],o=[],a=[];let i,s,c,u;for(let t=0;t<256;t++)a[(o[t]=t<<1^283*(t>>7))^t]=t;for(let l=i=0;!r[l];l^=s||1,i=a[i]||1){let a=i^i<<1^i<<2^i<<3^i<<4;a=a>>8^255&a^99,r[l]=a,n[a]=l,u=o[c=o[s=o[l]]];let f=16843009*u^65537*c^257*s^16843008*l,d=257*o[a]^16843008*a;for(let r=0;r<4;r++)t[r][l]=d=d<<24^d>>>8,e[r][a]=f=f<<24^f>>>8}for(let r=0;r<5;r++)t[r]=t[r].slice(0),e[r]=e[r].slice(0)}H(t,e){if(4!==t.length)throw new Error("invalid aes block size");const r=this.F[e],n=r.length/4-2,o=[0,0,0,0],a=this.V[e],i=a[0],s=a[1],c=a[2],u=a[3],l=a[4];let f,d,w,h=t[0]^r[0],p=t[e?3:1]^r[1],m=t[2]^r[2],y=t[e?1:3]^r[3],b=4;for(let t=0;t<n;t++)f=i[h>>>24]^s[p>>16&255]^c[m>>8&255]^u[255&y]^r[b],d=i[p>>>24]^s[m>>16&255]^c[y>>8&255]^u[255&h]^r[b+1],w=i[m>>>24]^s[y>>16&255]^c[h>>8&255]^u[255&p]^r[b+2],y=i[y>>>24]^s[h>>16&255]^c[p>>8&255]^u[255&m]^r[b+3],b+=4,h=f,p=d,m=w;for(let t=0;t<4;t++)o[e?3&-t:t]=l[h>>>24]<<24^l[p>>16&255]<<16^l[m>>8&255]<<8^l[255&y]^r[b++],f=h,h=p,p=m,m=y,y=f;return o}},fe=class{constructor(t,e){this.K=t,this.Y=e,this.G=e}reset(){this.G=this.Y}update(t){return this.X(this.K,t,this.G)}J(t){if(255&~(t>>24))t+=1<<24;else{let e=t>>16&255,r=t>>8&255,n=255&t;255===e?(e=0,255===r?(r=0,255===n?n=0:++n):++r):++e,t=0,t+=e<<16,t+=r<<8,t+=n}return t}$(t){0===(t[0]=this.J(t[0]))&&(t[1]=this.J(t[1]))}X(t,e,r){let n;if(!(n=e.length))return[];const o=_t.bitLength(e);for(let o=0;o<n;o+=4){this.$(r);const n=t.encrypt(r);e[o]^=n[0],e[o+1]^=n[1],e[o+2]^=n[2],e[o+3]^=n[3]}return _t.m(e,o)}},de=Vt.j;let we=ie&&ce&&typeof se.importKey==v,he=ie&&ce&&typeof se.deriveBits==v;class pe extends TransformStream{constructor({password:t,rawPassword:e,encryptionStrength:r,checkPasswordOnly:n,checkAuthenticationCode:o=!0}){super({start(){ye(this,t,e,r)},async transform(t,e){const r=this,{password:o,strength:a,et:i,ready:s}=r;o?(await async function(t,e,r,n){const o=await Ee(t,e,r,ge(n,0,re[e])),a=ge(n,re[e]);if(o[0]!=a[0]||o[1]!=a[1])throw new Error(Ht)}(r,a,o,ge(t,0,re[a]+2)),t=ge(t,re[a]+2),n?e.error(new Error(Yt)):i()):await s;const c=new Uint8Array(t.length-oe-(t.length-oe)%Jt);e.enqueue(be(r,t,c,0,oe,!0))},async flush(t){const{nt:e,ot:r,it:n,ready:a}=this;if(r&&e){await a;const i=ge(n,0,n.length-oe),s=ge(n,n.length-oe);let c=C;if(i.length){const t=Ae(ue,i);r.update(t);const n=e.update(t);c=xe(ue,n)}const u=ge(xe(ue,r.digest()),0,oe);let l=n.length<oe?1:0;for(let t=0;t<oe;t++)l|=u[t]^s[t];if(l&&o)throw new Error(Kt);t.enqueue(c)}}})}}class me extends TransformStream{constructor({password:t,rawPassword:e,encryptionStrength:r}){super({start(){ye(this,t,e,r)},async transform(t,e){const r=this,{password:n,strength:o,et:a,ready:i}=r;let s=C;n?(s=await async function(t,e,r){const n=Xt(new Uint8Array(re[e]));return Rt(n,await Ee(t,e,r,n))}(r,o,n),a()):await i;const c=new Uint8Array(s.length+t.length-t.length%Jt);c.set(s,0),e.enqueue(be(r,t,c,s.length,0))},async flush(t){const{nt:e,ot:r,it:n,ready:o}=this;if(r&&e){await o;let a=C;if(n.length){const t=e.update(Ae(ue,n));r.update(t),a=xe(ue,t)}const i=xe(ue,r.digest()).slice(0,oe);t.enqueue(Rt(a,i))}}})}}function ye(t,e,r,n){Object.assign(t,{ready:new Promise(e=>t.et=e),password:Se(e,r),strength:n-1,it:C})}function be(t,e,r,n,o,a){const{nt:i,ot:s,it:c}=t;c.length&&(e=Rt(c,e));const u=e.length-o;let l;for(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%Jt)),l=0;l<=u-Jt;l+=Jt){const t=Ae(ue,ge(e,l,l+Jt));a&&s.update(t);const o=i.update(t);a||s.update(o),r.set(xe(ue,o),l+n)}return t.it=ge(e,l),r}async function Ee(t,e,r,n){t.password=null;const o=await async function(t,e,r,n,o){if(!we)return Vt.importKey(e);try{return await se.importKey("raw",e,r,!1,o)}catch{return we=!1,Vt.importKey(e)}}(0,r,$t,0,ee),a=await async function(t,e,r){if(!he)return Vt.B(e,t.salt,te.iterations,r);try{return await se.deriveBits(t,e,r)}catch{return he=!1,Vt.B(e,t.salt,te.iterations,r)}}(Object.assign({salt:n},te),o,8*(2*ne[e]+2)),i=new Uint8Array(a),s=Ae(ue,ge(i,0,ne[e])),c=Ae(ue,ge(i,ne[e],2*ne[e])),u=ge(i,2*ne[e]);return Object.assign(t,{keys:{key:s,st:c,passwordVerification:u},nt:new fe(new le(s),Array.from(ae)),ot:new de(c)}),u}function Se(t,e){return e===U?Pt(t):e}function ge(t,e,r){return t.subarray(e,r)}function xe(t,e){return t.A(e)}function Ae(t,e){return t.R(e)}class ze extends TransformStream{constructor({password:t,rawPassword:e,passwordVerification:r,checkPasswordOnly:n}){super({start(){De(this,t,e,r)},transform(t,e){const r=this;if(r.password||r.rawPassword){const e=Fe(r,t.subarray(0,12));if(r.password=r.rawPassword=null,0!=(e[11]^r.passwordVerification))throw new Error(Ht);t=t.subarray(12)}n?e.error(new Error(Yt)):e.enqueue(Fe(r,t))}})}}class Re extends TransformStream{constructor({password:t,rawPassword:e,passwordVerification:r}){super({start(){De(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=Xt(new Uint8Array(12));e[11]=r.passwordVerification,n=new Uint8Array(t.length+e.length),n.set(Oe(r,e),0),o=12}else n=new Uint8Array(t.length),o=0;n.set(Oe(r,t),o),e.enqueue(n)}})}}function De(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,ct:new jt(n[0]),ut:new jt(n[2])}),r)for(let e=0;e<r.length;e++)Ue(t,r[e]);else for(let r=0;r<e.length;r++)Ue(t,e.charCodeAt(r))}(t,e,r)}function Fe(t,e){const r=new Uint8Array(e.length);for(let n=0;n<e.length;n++)r[n]=ke(t)^e[n],Ue(t,r[n]);return r}function Oe(t,e){const r=new Uint8Array(e.length);for(let n=0;n<e.length;n++)r[n]=ke(t)^e[n],Ue(t,e[n]);return r}function Ue(t,e){let[,r]=t.keys;t.ct.append([e]);const n=~t.ct.get();r=ve(Math.imul(ve(r+Te(n)),134775813)+1),t.ut.append([r>>>24]);const o=~t.ut.get();t.keys=[n,r,o]}function ke(t){const e=2|t.keys[2];return Te(Math.imul(e,1^e)>>>8)}function Te(t){return 255&t}function ve(t){return 4294967295&t}function Ie(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 Me(t,e){t=Ie(t);const r=e?{type:e}:{};if(typeof Blob.prototype.stream!=v||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 Ce(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 Ne="Invalid codec definition",je="Reserved compression method",Be="Invalid codec module",Pe=[0,8,9,99],_e=new Map,We=new Map;function Le(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!=M||!n.length)throw new Error(Ne);if(Pe.includes(r))throw new Error(je);const c=typeof a==v||typeof i==v;if(!(c||typeof o==M&&o.length))throw new Error(Ne);_e.set(r,{compressionMethod:r,format:n,codecURI:o,versionNeeded:s}),c&&qe(n,{CompressionStream:a,DecompressionStream:i})}function Ve(t){const e=_e.get(t);if(e){let r;_e.delete(t),_e.forEach(t=>r=r||t.format==e.format),r||We.delete(e.format)}}function Ze(t){return _e.get(t)}function He(t){return We.get(t)}function qe(t,e){const{CompressionStream:r,DecompressionStream:n}=e;if(typeof r!=v&&typeof n!=v)throw new Error(Be);We.set(t,{CompressionStream:r,DecompressionStream:n})}const Ke="Invalid uncompressed size",Ye="Invalid compressed data",Ge=qt,Xe="deflate-raw",Je="gzip",Qe=[31,139,8];class $e 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}=t,w=this;let h,p,m,y=super.readable;const b=f&&He(f),E=c&&o&&!l&&!b&&(!a||s)&&Boolean(i&&n);if(a&&!s||!c||E||(h=new Bt,y=cr(y,h)),o)if(b)y=ur(y,ir(b.CompressionStream,f,{level:u,chunkSize:e,compressionMethod:d}));else if(E)m=new tr,y=ur(y,new n(Je)),y=cr(y,m);else try{y=sr(y,i,{level:u,chunkSize:e},n,r)}catch(t){let e;try{e=new n(Je)}catch{throw t}y=ur(y,e),y=cr(y,new tr)}a&&(s?y=cr(y,new Re(t)):(p=new me(t),y=cr(y,p))),ar(w,y,()=>{a&&!s||!c||(w.crc32=E?m.crc32:new DataView(h.value.buffer).getUint32(0))})}}class tr 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=Rt(r,t));const a=o-8,i=Math.min(a,r.length);n.enqueue(Rt(r.subarray(0,i),t.subarray(0,a-i))),r=Rt(r.subarray(i),t.subarray(a-i))},flush(){const e=Ft(r);t.crc32=e.getUint32(0,!0),t.uncompressedSize=e.getUint32(4,!0)}}),t=this}}class er 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:h}=t;let p,m,y=super.readable;if(a&&(o?y=cr(y,new ze(t)):(m=new pe(t),y=cr(y,m))),c){const t=f&&He(f);if(t)y=ur(y,ir(t.DecompressionStream,f,{chunkSize:e,compressionMethod:d,rawBitFlag:w,uncompressedSize:h}));else try{y=sr(y,u,{chunkSize:e,deflate64:l},n,r)}catch(t){if(l||h===U)throw t;let e;try{e=new n(Je)}catch{throw t}y=function(t,e,r){const n=new jt;let o,a,i,s=0,c=!1;const u=new Promise((t,e)=>{a=t,i=e});u.catch(()=>{}),r||a();const l=new TransformStream({start(t){const e=new Uint8Array(10);e.set(Qe),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=Ft(e);o.setUint32(0,n.get(),!0),o.setUint32(4,r,!0),t.enqueue(e)},cancel(t){i(t)}}),f=new TransformStream({transform(t,e){n.append(t),s+=t.length,s>=r?a():c&&d(),e.enqueue(t)},cancel(t){i(t)}});return t=cr(t,l),cr(t=ur(t,e),f);function d(){w(),o=setTimeout(()=>i(new Error(Ke)),5e3)}function w(){clearTimeout(o)}}(y,e,h)}y=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(Ye);throw e.cause=t,e}const{value:n,done:o}=r;o?t.close():t.enqueue(n)},cancel:t=>e.cancel(t)})}(y)}i&&(p=new Bt,y=cr(y,p)),ar(this,y,()=>{if(i){const t=new DataView(p.value.buffer);if(s!=t.getUint32(0,!1))throw new Error(Ge)}})}}const rr=new Map;function nr(t,e){if(!t)return!1;let r=rr.get(t);r||(r=new Map,rr.set(t,r));let n=r.get(e);if(n===U){try{new t(e),n=!0}catch{n=!1}r.set(e,n)}return n}function or(t){return nr(t,Xe)}function ar(t,e,r){e=cr(e,new TransformStream({flush:r})),Object.defineProperty(t,"readable",{get:()=>e})}function ir(t,e,r){if(!t)throw new Error("Compression method not supported");return new t(e,r)}function sr(t,e,r,n,o){const a=e&&n?n:o||n,i=r.deflate64?"deflate64-raw":Xe;let s;try{s=new a(i,r)}catch(t){if(!e||!o||a==o)throw t;s=new o(i,r)}return ur(t,s)}function cr(t,e){return Ie(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 lr="data",fr="deflate",dr="inflate";class wr extends TransformStream{constructor(t,e){super({});const r=this,{codecType:n}=t;let o;n.startsWith(fr)?o=$e:n.startsWith(dr)&&(o=er),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!==U&&r.outputSize>t.outputSize))throw new Error(Ke)},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 hr extends TransformStream{constructor(t){const e=[];let r=0;function n(){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(o,a){for(e.push(o),r+=o.length;r>t;)a.enqueue(n())},flush(t){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))}})}}const pr="Worker startup timeout";let mr,yr,br,Er=()=>{};async function Sr(t){const{CompressionStream:e,CompressionStreamFallback:r}=t;if(r&&!r.lt)return!0;if(or(e)||nr(e,Je))return!0;if(r)try{return await Er(t),!0}catch{return!1}return!1}function gr(t){t.createWorker?yr=!0:mr=!1}class xr{constructor(t,{readable:e,writable:r},{options:n,config:o,ft:a,useWebWorkers:i,transferStreams:s,workerURI:c,createWorker:u},l){const{signal:f}=a;return yr&&(u=U),Object.assign(t,{wt:!0,ht:(t.ht||0)+1,readable:e.pipeThrough(new hr(yt(o))).pipeThrough(new Ar(a),{signal:f}),writable:r,options:Object.assign({},n),workerURI:c,createWorker:u,transferStreams:s,terminate:()=>new Promise(e=>{const{yt:r,wt:n}=t;r?(n?t.bt=e:(r.terminate(),e()),t.Et=null):e()}),St(){if(t.wt){const{bt:e}=t;e&&(t.bt=null,t.gt=!0,t.yt.terminate(),e()),t.wt=!1,l(t)}}}),mr===U&&(mr=typeof Worker!=T),(i&&br&&(mr&&c||u)?br:Rr)(t,o)}}class Ar extends TransformStream{constructor({onstart:t,onprogress:e,size:r,onend:n}){let o=0;super({async start(){t&&await zr(t,r)},async transform(t,n){o+=t.length,e&&await zr(e,o,r),n.enqueue(t)},async flush(){n&&await zr(n,o)}})}}async function zr(t,...e){try{await t(...e)}catch{}}function Rr(t,e){return{run:()=>Dr(t,e)}}async function Dr({options:t,readable:e,writable:r,St:n},o){let a;try{if(t.compressed&&!t.format){const e=t.codecType.startsWith(fr),r=e?o.CompressionStreamFallback:o.DecompressionStreamFallback,n=e?o.CompressionStream:o.DecompressionStream;if(t.useCompressionStream){if(r&&r.lt&&!or(n))try{await Er(o)}catch{}}else try{await Er(o)}catch{r&&!r.lt||(t.useCompressionStream=!0)}}a=new wr(t,o),await e.pipeThrough(a).pipeThrough(new hr(yt(o))).pipeTo(r,{preventClose:!0,preventAbort:!0});const{crc32:n,inputSize:i,outputSize:s}=a;return{crc32:n,inputSize:i,outputSize:s}}catch(t){throw a&&(t.outputSize=a.outputSize),t}finally{n()}}const Fr={type:"module"},Or="error";let Ur,kr,Tr,vr=!0;try{vr=typeof structuredClone==v&&structuredClone(new DOMException("","AbortError")).code!==U}catch{}var Ir;function Mr(t){const{reader:e}=t;e&&e.releaseLock(),t.reader=null,t.writer=null}function Cr(t){const{yt:e}=t;if(e)try{e.terminate()}catch{}t.Et=null}function Nr(t,e,r,n,o=!0){const{createWorker:a}=r;let i,s,c;if(a)i=a();else if(kr===U||Ur!==t){const a=typeof t==v;s=a?t(o):t;const u=s.startsWith("data:"),l=s.startsWith("blob:");if(u||l){n===U&&(n=!1),n&&(c=Fr);try{i=new Worker(s,c)}catch(o){if(l)try{URL.revokeObjectURL(s)}catch{}if(a&&l)return Nr(t,e,r,n,!1);if(n)throw o;return Nr(t,e,r,!0,!1)}}else{n===U&&(n=!0),n&&(c=Fr);try{s=new URL(s,e)}catch{}try{i=new Worker(s,c)}catch(a){if(n)return Nr(t,e,r,!1,o);throw a}}Ur=t,kr=s,Tr=c}else i=new Worker(kr,Tr);return i.addEventListener("message",t=>{r.xt=!0,jr(r),async function({data:t},e){const{type:r,value:n,messageId:o,result:a,error:i}=t,{reader:s,writer:c,At:u,zt:l,St:f,ht:d}=e,w=()=>e.ht!=d;try{if(i){const{message:t,stack:e,code:r,name:n,outputSize:o,cause:a,codecImportFailed:s}=i,c=new Error(t);Object.assign(c,{stack:e,code:r,name:n,outputSize:o}),a&&(c.cause=Object.assign(new Error(a.message),{name:a.name})),s&&(c.codecImportFailed=!0),h(c)}else{if("pull"==r){const{value:t,done:r}=await s.read();w()||Pr({type:lr,value:t,done:r,messageId:o},e)}r==lr&&(await c.ready,await c.write(new Uint8Array(n)),w()||Pr({type:"ack",messageId:o},e)),"close"==r&&h(null,a)}}catch(i){w()||(Cr(e),h(i))}function h(t,e){w()||(t?l(t):u(e),c&&c.releaseLock(),t&&t.codecImportFailed||f())}}(t,r)}),i.addEventListener(Or,t=>Br(t,r)),i.addEventListener("messageerror",t=>Br(t,r)),i}function jr(t){const{Rt:e}=t;e&&(clearTimeout(e),t.Rt=null)}function Br(t,e){t.preventDefault&&t.preventDefault(),jr(e);const{xt:r,zt:n,writer:o,St:a}=e;Cr(e),r||(e.yt=null);let i=t.error||new Error(t.message||Or);r||(i=Object.assign(new Error(i.message||Or),{Dt:!0}),e.Ft=i),n&&(n(i),o&&o.releaseLock(),r&&a())}function Pr(t,{yt:e,writer:r,transferStreams:n,xt:o}){try{const{value:r,readable:a,writable:i}=t,s=[];if(r&&(t.value=Dt(r),s.push(t.value.buffer)),n&&vr&&o?(a&&s.push(a),i&&s.push(i)):t.readable=t.writable=null,s.length)try{return e.postMessage(t,s),!0}catch{vr=!1,t.readable=t.writable=null,e.postMessage(t)}else e.postMessage(t)}catch(t){throw r&&r.releaseLock(),t}}Ir=function(t,e){const{baseURI:r,chunkSize:n,workerStartupTimeout:o}=e;let{wasmURI:a}=e;if(!t.Et){let i;typeof a==v&&(a=a());try{i=Nr(t.workerURI,r,t)}catch{return gr(t),Rr(t,e)}Object.assign(t,{yt:i,xt:!1,gt:!1,Ft:null,Et:{run:async()=>{try{return await async function(t,e){if(!t.yt){const{Ft:e}=t;t.Ft=null;const r=e||new Error(pr);throw r.Dt=!0,r}let r,n;const o=new Promise((t,e)=>{r=t,n=e});Object.assign(t,{reader:null,writer:null,At:r,zt:n,result:o});const{readable:a,options:i}=t,{writable:s,closed:c,Ot:u}=function(t){const e=new AbortController,{writable:r,readable:n}=new TransformStream,o=n.pipeTo(t,{preventClose:!0,preventAbort:!0,signal:e.signal});return o.catch(()=>{}),{writable:r,closed:o,Ot:()=>e.abort()}}(t.writable);let l;try{l=Pr({type:"start",options:i,config:e,readable:a,writable:s},t)}catch(e){u();try{await c}catch{}throw t.St(),e}l||Object.assign(t,{reader:a.getReader(),writer:s.getWriter()});const{workerStartupTimeout:f}=e;!t.xt&&Number.isFinite(f)&&f>=0&&(t.Rt=setTimeout(()=>function(t){if(t.Rt=null,t.xt)return;const{zt:e,writer:r}=t;if(Cr(t),t.yt=null,e){const t=new Error(pr);t.Dt=!0,e(t),r&&r.releaseLock()}}(t),f));try{const t=await o;return await d(),await c,t}catch(t){await d(),u();try{await c}catch{}throw t}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.Dt)return gr(t),Mr(t),Dr(t,e);if(r&&r.codecImportFailed){if(t.reader)return Mr(t),Dr(t,e);t.St()}throw r}}}})}return t.Et},br=Ir;let _r=[];const Wr=[];let Lr,Vr,Zr=0;async function Hr(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:h,maxWorkers:p}=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){!We.has(t)&&e&&qe(t,await(import(/* webpackIgnore: true */ /* @vite-ignore */e)))}(f,r.codecURI)),e.transferStreams=!f&&(o||o===U&&n.transferStreams);const m=!(s||c||u||l),y=f===U||Boolean(r.codecURI);return e.useWebWorkers=!m&&y&&(a||a===U&&n.useWebWorkers),e.workerURI=e.useWebWorkers&&w?w:U,e.createWorker=e.useWebWorkers&&h?h:U,r.useCompressionStream=i||i===U&&n.useCompressionStream,(await async function(){const r=_r.find(t=>!t.wt);if(r)return Xr(r),new xr(r,t,e,b);if(_r.length<p){const r={Ut:Zr};return Zr++,_r.push(r),new xr(r,t,e,b)}return new Promise(r=>{Wr.push({resolve:r,stream:t,kt:e}),Vr=n.workerStarvationTimeout,qr()})}()).run();function b(t){if(Kr(),Wr.length){const[{resolve:e,stream:r,kt:n}]=Wr.splice(0,1);e(new xr(t,r,n,b)),qr()}else t.yt?(Xr(t),function(t,e){const{config:r}=e,{terminateWorkerTimeout:n}=r;Number.isFinite(n)&&n>=0&&(t.gt?t.gt=!1:t.Tt=setTimeout(async()=>{_r=_r.filter(e=>e!=t);try{await t.terminate()}catch{}},n))}(t,e)):_r=_r.filter(e=>e!=t)}}function qr(){!Lr&&Wr.length&&Number.isFinite(Vr)&&Vr>=0&&(Lr=setTimeout(Yr,Vr))}function Kr(){Lr&&(clearTimeout(Lr),Lr=null)}function Yr(){if(Lr=null,Wr.length){const[{resolve:t,stream:e,kt:r}]=Wr.splice(0,1),n=Object.assign({},r,{useWebWorkers:!1,workerURI:U,createWorker:U});t(new xr({},e,n,Gr)),qr()}}function Gr(){Kr(),qr()}function Xr(t){const{Tt:e}=t;e&&(clearTimeout(e),t.Tt=null)}const Jr="\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ ".split(""),Qr=256==Jr.length;function $r(t,e){return tn(t,e,!0)}function tn(t,e,r){return e&&"cp437"==e.trim().toLowerCase()?function(t){if(Qr){let e="";for(let r=0;r<t.length;r++)e+=Jr[t[r]];return e}return(new TextDecoder).decode(t)}(t):new TextDecoder(e,{ignoreBOM:r}).decode(t)}const en="HTTP error ",rn="HTTP Range not supported",nn="HTTP resource changed",on="Writer iterator completed too soon",an="Writer not initialized",sn="Content-Range",cn="Range",un="GET",ln="bytes",fn=16777216,dn="writable",wn=Symbol();class hn{constructor(){this.size=0}init(){this.initialized=!0}}class pn extends hn{get readable(){return this.createReadable()}createReadable({offset:t=0,size:e,chunkSize:r=yt(mt())}={}){const n=this;let o=0;return r=bt(r),new ReadableStream({async pull(a){const i=e===U?r:Math.min(r,e-o),s=await to(n,t+o,i);s.length&&a.enqueue(s),o+r>=e||!s.length&&i?a.close():o+=r}})}}class mn extends hn{constructor(){super();const t=this,e=new WritableStream({write(e){if(!t.initialized)throw new Error(an);return t.writeUint8Array(Dt(e))}});Object.defineProperty(t,dn,{get:()=>e})}writeUint8Array(){}}class yn extends pn{constructor(t){super();let e=t.length;for(;"="==t.charAt(e-1);)e--;const r=t.indexOf(",")+1;Object.assign(this,{vt:t,It:r,size:Math.floor(.75*(e-r))})}readUint8Array(t,e){const{It:r,vt: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 bn extends mn{constructor(t){super(),Object.assign(this,{contentType:t,data:"data:"+(t||"")+";base64,",Mt:""})}writeUint8Array(t){const e=this;let r,n=e.Mt;const o=e.Mt.length;for(e.Mt="",r=0;r<3*Math.floor((o+t.length)/3)-o;r++)n+=String.fromCharCode(t[r]);for(;r<t.length;r++)e.Mt+=String.fromCharCode(t[r]);n.length>2?e.data+=btoa(n):e.Mt=n+e.Mt}getData(){return this.data+btoa(this.Mt)}}let En,Sn;class gn extends pn{constructor(t){super(),Object.assign(this,{Ct:t,size:t.size}),Sn||(Sn=(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();En=1==e}catch{En=!1}})())}createReadable(t){const{Ct:e,size:r}=this,{offset:n=0,size:o=r-n}=t||{};return!n&&o>=r?Ie(e.stream()):En?Ie(e.slice(n,n+o).stream()):super.createReadable(t)}async readUint8Array(t,e){const r=this,n=t+e,o=!t&&n>=r.size?r.Ct:r.Ct.slice(t,n);let a=await o.arrayBuffer();return a.byteLength>e&&(a=a.slice(t,n)),new Uint8Array(a)}}class xn extends hn{constructor(t){super();const e=this,r=new TransformStream;Object.defineProperty(e,dn,{get:()=>r.writable}),e.contentType=t,e.Nt=Me(r.readable,t),e.Nt.catch(()=>{})}getData(){return this.Nt}}class An extends gn{constructor(t){super(new Blob([t],{type:"text/plain"}))}}function zn(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 Rn extends xn{constructor(t){super(),Object.assign(this,{encoding:t,jt:!t||"utf-8"==t.toLowerCase()})}async getData(){const{encoding:t,jt:e}=this,r=await super.getData();return r.text&&e?r.text():function(t,e){return tn(t,e,!1)}(new Uint8Array(await r.arrayBuffer()),t)}}class Dn extends pn{constructor(t,e){super(),On(this,t,e)}async init(){await Un(this,Wn,jn),super.init()}createReadable(t){const e=this,{useRangeHeader:r,forceRangeRequests:n,size:o}=e;if((r||n)&&o!==U){const{offset:r=0,size:n=o-r}=t||{};if(n>0&&r<o)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(rn);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=U,await t.cancel()}(),i||t.close())},cancel:t=>n&&n.cancel(t)});async function s(){const e=Math.min(t.maximumRangeSize,i),r=await Wn(un,t,Cn(t,o,e));if(206!=r.status)throw new Error(rn);const s=r.headers.get(sn);if(s){const t=Number(s.trim().split(/[\s-]+/)[1]);if(!Number.isNaN(t)&&t!=o)throw new Error(rn)}Mn(t,r),In(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 kn(this,t,e,Wn,jn)}}class Fn extends pn{constructor(t,e){super(),On(this,t,e)}async init(){await Un(this,Ln,Bn),super.init()}readUint8Array(t,e){return kn(this,t,e,Ln,Bn)}}function On(t,e,r){const{preventHeadRequest:n,useRangeHeader:o,forceRangeRequests:a,combineSizeEocd:i,checkResourceChanges:s=!0,maximumRangeSize:c=fn,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 Un(t,e,r){const{url:n,preventHeadRequest:o,useRangeHeader:a,forceRangeRequests:i,combineSizeEocd:s}=t;if(function(t){const{baseURI:e}=mt(),{protocol:r}=new URL(t,e);return"http:"==r||"https:"==r}(n)&&(a||i)&&(typeof o==T||o)){const n=await e(un,t,Cn(t,s?-22:void 0)),o=n.headers.get("Accept-Ranges");if(!(i||o&&o.toLowerCase()==ln))throw new Error(rn);{if(s){const e=new Uint8Array(await n.arrayBuffer());206==n.status&&e.length==d&&(t.Bt=e)}In(t,n);const o=Tn(n);o===U?await _n(t,e,r):t.size=o}}else await _n(t,e,r)}async function kn(t,e,r,n,o){const{useRangeHeader:a,forceRangeRequests:i,Bt:s,size:c,options:u}=t;if(a||i){if(s&&e==c-d&&r==d)return s;if(e>=c||0===r)return C;{e+r>c&&(r=c-e);const o=await n(un,t,Cn(t,e,r));if(206!=o.status)throw new Error(rn);const a=o.headers.get(sn);if(a){const t=Number(a.trim().split(/[\s-]+/)[1]);if(!Number.isNaN(t)&&t!=e)throw new Error(rn)}Mn(t,o),In(t,o);const i=new Uint8Array(await o.arrayBuffer());if(i.length!=r)throw new Error(rn);return i}}{const{data:n}=t;return n||await o(t,u),t.data.subarray(e,e+r)}}function Tn(t){const e=t.headers.get(sn);if(e){const t=e.trim().split(/\s*\/\s*/)[1];if(t&&"*"!=t){const e=Number(t);if(!Number.isNaN(e))return e}}}function vn({headers:t}){return{Pt:t.get("Etag")||U,lastModified:t.get("Last-Modified")||U}}function In(t,e){const{checkResourceChanges:r,_t:n}=t;r&&!n&&206==e.status&&(t._t=vn(e))}function Mn(t,e){const{checkResourceChanges:r,_t:n,size:o}=t;if(r){const t=Tn(e);if(t!==U&&o!==U&&t!=o)throw new Error(nn);if(n){const t=vn(e);if(Object.entries(n).some(([e,r])=>r!==U&&t[e]!==U&&r!=t[e]))throw new Error(nn)}}}function Cn(t,e=0,r=1){return Object.assign({},Nn(t),{[cn]:ln+"="+(e<0?e:e+"-"+(e+r-1))})}function Nn({options:t}){const{headers:e}=t;if(e)return Symbol.iterator in e?Object.fromEntries(e):e}async function jn(t){await Pn(t,Wn)}async function Bn(t){await Pn(t,Ln)}async function Pn(t,e){const r=await e(un,t,Nn(t));t.data=new Uint8Array(await r.arrayBuffer()),t.size=t.data.length}async function _n(t,e,r){if(t.preventHeadRequest)await r(t,t.options);else{const n=await e("HEAD",t,Nn(t)),o=n.headers.get("Content-Length");o&&!n.headers.get("Content-Encoding")?t.size=Number(o):await r(t,t.options)}}async function Wn(t,{fetch:e=fetch,options:r,url:n},o){const a=await e(n,Object.assign({},r,{method:t,headers:o}));if(a.status<400)return a;throw 416==a.status?new Error(rn):new Error(en+(a.statusText||a.status))}function Ln(t,{url:e},r){return new Promise((n,o)=>{const a=new XMLHttpRequest;if(a.addEventListener("load",()=>{if(a.status<400){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(rn):new Error(en+(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 Vn extends pn{constructor(t,e={}){super(),Object.assign(this,{url:t,reader:e.useXHR&&!e.fetch?new Fn(t,e):new Dn(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 Zn extends Vn{constructor(t,e={}){super(t,Object.assign({},e,{useRangeHeader:!0}))}}class Hn extends pn{constructor(t){super(),t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength),Object.assign(this,{Wt:t,size:t.length})}readUint8Array(t,e){return this.Wt.slice(t,t+e)}}class qn extends mn{constructor(t){super(),this.Lt=t||262144}init(t=0){Object.assign(this,{offset:0,Wt:new Uint8Array(t>0?t:this.Lt)}),super.init()}writeUint8Array(t){const e=this,r=e.offset+t.length;if(r>e.Wt.length){let t=e.Wt.length?2*e.Wt.length:e.Lt;for(;t<r;)t*=2;const n=e.Wt;e.Wt=new Uint8Array(t),e.Wt.set(n)}e.Wt.set(t,e.offset),e.offset+=t.length}getData(){return this.offset===this.Wt.length?this.Wt:this.Wt.slice(0,this.offset)}}class Kn extends pn{constructor(t){super(),this.Vt=t}async init(){const t=this;t.Zt=0;const e=t.Vt=await Promise.all(t.Vt.map($n));t.Ht=e.map(e=>{const r=t.size;return t.size+=e.size,r}),super.init()}qt(t){const{Ht:e,size:r}=this,n=e[t];return n===U?r:n}async readUint8Array(t,e){const r=this,{Vt: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 to(s,i,e);else{const a=n-i;o=Rt(await to(s,i,a),await r.readUint8Array(t+a,e-a))}}else o=C;return r.Zt=Math.max(a,r.Zt),o}}class Yn extends hn{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===wn)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(on);n=i,n.size=0,n.maxSize&&(r.maxSize=n.maxSize),r.availableSize=r.maxSize,await Qn(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,dn,{get:()=>i})}async closeDisk(){const t=this.writable.getWriter();try{await t.ready,await t.write(wn)}finally{t.releaseLock()}}}class Gn{constructor(t){return Array.isArray(t)&&(t=new Kn(t)),(t instanceof ReadableStream||typeof t.getReader==v)&&(t={readable:Ie(t)}),t}}class Xn{constructor(t){return t.writable===U&&typeof t.next==v&&(t=new Yn(t)),(t instanceof WritableStream||typeof t.getWriter==v)&&(t={writable:Ce(t)}),t.size===U&&(t.size=0),t}}function Jn(t){return Boolean(t&&t.getData)}async function Qn(t,e){if(!t.init||t.initialized)return Promise.resolve();await t.init(e)}async function $n(t){return t=new Gn(t),await Qn(t),t.size!==U&&t.readUint8Array||(t=new gn(await Me(t.readable)),await Qn(t)),t}function to(t,e,r){return t.readUint8Array(e,r)}function eo(t,e){return t.createReadable?t.createReadable(e):t.readUint8Array?pn.prototype.createReadable.call(t,e):t.readable}const ro="filename",no="rawFilename",oo="comment",ao="rawComment",io="uncompressedSize",so="compressedSize",co="offset",uo="diskNumberStart",lo="lastModDate",fo="rawLastModDate",wo="lastAccessDate",ho="rawLastAccessDate",po="creationDate",mo="rawCreationDate",yo="internalFileAttributes",bo="externalFileAttributes",Eo="internalFileAttribute",So="externalFileAttribute",go="msdosAttributesRaw",xo="msdosAttributes",Ao="msDosCompatible",zo="zip64",Ro="encrypted",Do="version",Fo="versionMadeBy",Oo="zipCrypto",Uo="directory",ko="executable",To="compressionMethod",vo="signature",Io="extraField",Mo="unixMode",Co="setuid",No="setgid",jo="sticky",Bo=[ro,no,io,so,lo,fo,oo,ao,wo,ho,po,mo,co,uo,yo,bo,Eo,So,go,xo,Ao,zo,Ro,Do,Fo,Oo,Uo,ko,"symlink",To,vo,"crc32",Io,"extraFieldUnix","extraFieldInfoZip","extraFieldUnixType1","extraFieldPkwareUnix","uid","gid",Mo,"unixExternalUpper",Co,No,jo,"bitFlag","rawBitFlag","filenameLength","extraFieldLength","filenameUTF8","commentUTF8","rawExtraField","extraFieldZip64","extraFieldUnicodePath","extraFieldUnicodeComment","extraFieldAES","extraFieldNTFS","extraFieldExtendedTimestamp","extraFieldUSDZ"];class Po{constructor(t){Bo.forEach(e=>this[e]=t[e])}}const _o="File format is not recognized",Wo="End of central directory not found",Lo="End of Zip64 central directory locator not found",Vo="Central directory header not found",Zo="Local file header not found",Ho="Zip64 extra field not found",qo="File contains encrypted entry",Ko="Encryption method not supported",Yo="Compression method not supported",Go="Split zip file",Xo="Overlapping entry found",Jo="Entry data out of bounds",Qo="Ambiguous archive",$o="Encrypted central directory is not supported",ta="Unsafe filename",ea="Invalid strictness (must be 'strict', 'balanced' or 'tolerant')",ra="Invalid filenameValidation (must be 'strict', 'balanced' or 'tolerant')",na="Invalid maxAppendedDataSize (must be a number greater than or equal to 0)",oa="64-bit value exceeds Number.MAX_SAFE_INTEGER",aa=/^[a-zA-Z]:/,ia="utf-8",sa="cp437",ca=[[io,t],[so,t],[co,t],[uo,e]],ua={[e]:{Kt:Wa,bytes:4},[t]:{Kt:La,bytes:8}},la=BigInt(Number.MAX_SAFE_INTEGER);class fa{constructor(t,e={}){Object.assign(this,{reader:new Gn(t),options:e,Yt:new Map})}async*getEntriesGenerator(n={}){const a=this;let{reader:i}=a;if(await Qn(i),i.size!==U&&i.readUint8Array||(i=new gn(await Me(i.readable)),await Qn(i)),i.size<d)throw new Error(_o);const c=Fa(n,a.options),p=c==X,m=c!=Q,y=function(t,r){if(t!==U){const e=st(t);if("number"!=typeof e||Number.isNaN(e)||e<0)throw new Error(na);return e}return r==X?0:r==Q?1/0:e}(Ca(a,n,"maxAppendedDataSize"),c),b=function(t,e){if(t===U)return e;if(!Da(t))throw new Error(ra);return t}(Ca(a,n,"filenameValidation"),c),E=Ca(a,n,"normalizeFilename"),{Gt:S,Xt:D}=await async function(t,e,r){const{size:n}=t,o=Math.min(n,65557),a={count:64};let i,s,c=0;for await(const[r,u,l,f,w]of ka(t,o)){const o=_a(r,f+20);if(w+d+o==n){const o=await va(t,r,u,f,w,n,a);if(2==o){if(i||(i=Ta(l,f,w)),c++,!e||c>1)break}else 1!=o||s||(s=Ta(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 ka(t,o)){const o=Ta(c,u,l);a||(a=o);const f=await va(t,e,s,u,l,n,r);if(2==f)return o;1!=f||i||(i=o)}return i||a}(t,r,a)),{Gt:i,Xt:c}}(i,m,y);if(!S)throw await async function(t){return await Ra(t)==o}(i)?new Error(Go):new Error(Wo);m&&D>1&&Ma("multiple end of central directory records");const F=Ft(S);let O=Wa(F,12),k=Wa(F,16);const T=S.offset,v=_a(F,20),I=T+d+v;i.size-I>y&&Ma("appended data");let M=_a(F,4);const N=i.Zt||0;let j,B,P,_,W=_a(F,6),L=_a(F,10),V=0,Z=h;const H=k==t||O==t||L==e||W==e;if(k!=t&&W!=e&&(k+=za(i,W)),H){const r=S.offset>=w?await to(i,S.offset-w,w):C,n=Ft(r);if(r.length==w&&Wa(n,0)==l){k=za(i,Wa(n,4))+La(n,8);let r=await to(i,k,h),o=Ft(r);const a=S.offset-w-h;if((r.length<h||Wa(o,0)!=u)&&k!=a&&a>=0){const t=k;k=a,k>t&&(V=k-t),r=await to(i,k,h),o=Ft(r)}if(r.length<h||Wa(o,0)!=u)throw new Error(Lo);if(B=!0,P=La(o,4)>44,P){const t=Math.min(La(o,4)-44,i.size-k-h);t>0&&(Z+=t,_=function(t){const e={rawExtensibleData:t};if(t.length>=28){const r=Ft(t),n=_a(r,26);Object.assign(e,{compressionMethod:_a(r,0),compressedSize:La(r,2),uncompressedSize:La(r,10),encryptionAlgorithm:_a(r,18),bitLength:_a(r,20),flags:_a(r,22),hashAlgorithm:_a(r,24),hashData:t.subarray(28,28+n)})}return e}(await to(i,k+h,t)))}M==e?M=Wa(o,16):p&&M!=Wa(o,16)&&Ma("mismatched zip64 end of central directory record"),W==e?W=Wa(o,20):p&&W!=Wa(o,20)&&Ma("mismatched zip64 end of central directory record"),L==e?L=La(o,32):p&&L!=La(o,32)&&Ma("mismatched zip64 end of central directory record"),O==t?O=La(o,40):p&&O!=La(o,40)&&Ma("mismatched zip64 end of central directory record"),k=za(i,W)+La(o,48)+V}}let q=O;const K=S.offset-(B?Z+w:0);if(k>=i.size&&(V=i.size-k-O-d,k=i.size-O-d),N!=M)throw new Error(Go);if(k<0)throw new Error(_o);let J=0,$=await to(i,k,O),tt=Ft($);if(O){if($.length<4)throw new Error(_o);const t=K-O;if(k!=t&&W==M){let e=!(Wa(tt,J)==s||Boolean(_&&_.compressedSize)||ha(tt));if(!e&&t>=0&&t+4<=i.size&&(e=Wa(Ft(await to(i,t,4)),0)==s),e){const e=k;k=t,k>e&&(V+=k-e),$=await to(i,k,O),tt=Ft($)}}}const et=K-k;if(O!=et&&et>=0&&W==M&&(O=et,$=await to(i,k,O),tt=Ft($)),k<0||k>=i.size)throw new Error(_o);a.directoryOffset=k,a.directoryLength=q;const rt=Na(a,n,"decryptCentralDirectory");let nt,ot;if(rt&&L&&$.length>=4&&Wa(tt,0)!=s&&(P||ha(tt))){const t=function(t,e,r){const n=t&&t.compressedSize?t.compressedSize:e;return n>0&&n<=r?n:r}(_,q,$.length);ot=$.subarray(t),$=await rt($.subarray(0,t),_),tt=Ft($),q=$.length,nt=!0}j=k;const at=Ca(a,n,"filenameEncoding"),it=Ca(a,n,"commentEncoding"),ct=p?new Set:U;let ut;const lt=!p&&!B;!L&&lt&&(L=pa(tt,$,J));for(let t=0;t<L;t++){const o=new wa(i,a.options);if(J+f>$.length||Wa(tt,J)!=s){if(0==t&&!nt&&(P||ha(tt)))throw new Error($o);throw new Error(Vo)}ya(o,tt,J+6);const c=Boolean(o.bitFlag.languageEncodingFlag),u=J+f,l=u+o.filenameLength,d=l+o.extraFieldLength,w=_a(tt,J+4),h=!(w>>8),m=w>>8==3,y=$.subarray(u,l),S=_a(tt,J+32),D=d+S,F=$.subarray(d,D),O=c,k=c,T=Wa(tt,J+38),v=T&r,I={readOnly:Boolean(1&v),hidden:Boolean(2&v),system:Boolean(4&v),directory:Boolean(16&v),archive:Boolean(32&v)},M=Wa(tt,J+42),C=Na(a,n,"decodeText")||$r,N=O?ia:at||sa,B=k?ia:it||sa;let _=C(y,N,Y);if(_===U&&(_=$r(y,N)),E){const t=E(_);t!==U&&(_=t)}if(Ua(_,b)){const t=new Error(ta);throw t.filename=_,t}let W=C(F,B,G);W===U&&(W=$r(F,B)),Object.assign(o,{index:t,Jt:nt,versionMadeBy:w,msDosCompatible:h,zip64:!1,compressedSize:0,uncompressedSize:0,Qt:S,offset:M,diskNumberStart:_a(tt,J+34),internalFileAttributes:_a(tt,J+36),externalFileAttributes:T,msdosAttributesRaw:v,msdosAttributes:I,rawFilename:y,filenameUTF8:O,commentUTF8:k,rawExtraField:$.subarray(l,d),rawComment:F,filename:_,comment:W}),ba(o,o,tt,J+6),o.offset+=V,j=Math.min(za(i,o.diskNumberStart)+o.offset,j),p&&(ct.has(o.filename)&&(ut=!0),ct.add(o.filename));const Z=o.externalFileAttributes>>16&e;o.unixMode===U&&16877&Z&&(o.unixMode=Z);const H=Boolean(o.unixMode&A),q=Boolean(o.unixMode&z),K=Boolean(512&o.unixMode),X=40960==((o.unixMode===U?Z:o.unixMode)&g),Q=!X&&(o.unixMode!==U?!!(73&o.unixMode):m&&!!(73&Z)),et=o.unixMode!==U&&(o.unixMode&g)==x,rt=(Z&g)==x;Object.assign(o,{setuid:H,setgid:q,sticky:K,symlink:X,unixExternalUpper:Z,internalFileAttribute:o.internalFileAttributes,externalFileAttribute:o.externalFileAttributes,executable:Q,directory:et||rt||h&&I.directory||o.filename.endsWith(R),zipCrypto:o.encrypted&&!o.extraFieldAES});const ot=new Po(o);ot.getData=(t,e)=>o.getData(t,ot,a.Yt,e),ot.arrayBuffer=async t=>{const e=new TransformStream,r=Me(e.readable).then(t=>t.arrayBuffer());return r.catch(()=>{}),await o.getData(e,ot,a.Yt,t),r},J=D,t==L-1&&lt&&(L+=pa(tt,$,J));const{onprogress:st}=n;if(st)try{await st(t+1,L,new Po(o))}catch{}yield ot}let ft=J,dt=ma($.subarray(J))||(nt?ma(ot):U);if(!dt&&!nt){const t=k+J,e=Math.min(K-t,65541);e>=6&&(dt=ma(await to(i,t,e)))}dt&&(a.digitalSignature=dt,ft=J+6+dt.length),p&&J!=q&&ft!=q&&Ma("trailing central directory data"),ut&&Ma("duplicate filename");const wt=Ca(a,n,"extractPrependedData"),ht=Ca(a,n,"extractAppendedData"),pt=(p||wt)&&L&&4==j&&await async function(t){const e=await Ra(t);return e==o||808471376==e}(i)?4:0;return p&&(V||L&&j>pt)&&Ma("prepended data"),wt&&(a.prependedData=j>pt?await to(i,pt,j-pt):C),a.comment=v?await to(i,T+d,v):C,ht&&(a.appendedData=I<i.size?await to(i,I,i.size-I):C),!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()}}class da{constructor(t={}){const{readable:e,writable:r}=new TransformStream,n=new fa(e,t).getEntriesGenerator();this.readable=new ReadableStream({async pull(t){const{done:e,value:r}=await n.next();if(e)return t.close();const o={...r,readable:function(){const{readable:t,writable:e}=new TransformStream;if(r.getData)return async function(){try{await r.getData(e)}catch(t){try{await e.abort(t)}catch{}}}(),t}()};delete o.getData,t.enqueue(o)}}),this.writable=r}}let wa=class{constructor(t,e){Object.assign(this,{reader:t,options:e})}async getData(t,e,o,i={}){const s=this,c=mt(),{reader:u,index:l,offset:f,diskNumberStart:d,extraFieldAES:w,extraFieldZip64:h,compressionMethod:p,bitFlag:m,rawBitFlag:y,crc32:b,rawLastModDate:E,uncompressedSize:S,compressedSize:g}=s,{dataDescriptor:x}=m,A=e.localDirectory={},z=za(u,d)+f,R=await to(u,z,D),F=Ft(R);let O=Ca(s,i,N),k=Ca(s,i,j);const T=Ca(s,i,B);if(ot(O,k),O=O&&O.length&&O,k=k&&k.length&&k,w&&99!=w.originalCompressionMethod)throw new Error(Yo);if(R.length<D||Wa(F,0)!=n)throw new Error(Zo);ya(A,F,4);const{extraFieldLength:v,filenameLength:I}=A,M=A.dataOffset=z+D+I+v,Z=Ca(s,i,"checkLocalDirectory"),H=Fa(i,s.options),q=function(t,e){return t===U?e!=Q:Boolean(t)}(Z,H),K=function(t,e){return t===U?e==X:Boolean(t)}(Z,H);let Y=C;if(K&&(I||v)){const t=await to(u,z+D,I+v);Y=t.subarray(0,I),A.rawExtraField=t.subarray(I)}else A.rawExtraField=v?await to(u,z+D+I,v):C;K&&(A.rawFilename=Y),ba(s,A,F,4,!0),q&&function(t,e,r,n){const{rawFilename:o}=t,a=t.Jt&&!(8192&~e.rawBitFlag);!n||a||r.length==o.length&&!r.some((t,e)=>t!=o[e])||Ma("mismatched local file header (filename)"),(2057&e.rawBitFlag)!=(2057&t.rawBitFlag)&&Ma("mismatched local file header (general purpose bit flag)"),e.compressionMethod!=t.compressionMethod&&Ma("mismatched local file header (compression method)"),e.bitFlag.dataDescriptor||a||!(e.crc32||e.compressedSize||e.uncompressedSize)||e.crc32==t.crc32&&e.compressedSize==t.compressedSize&&e.uncompressedSize==t.uncompressedSize||Ma("mismatched local file header (crc32 or sizes)")}(s,A,Y,K);const{lastAccessDate:G,creationDate:J,uid:$,gid:tt}=A;G&&(e.lastAccessDate=G),J&&(e.creationDate=J),$!==U&&e.uid===U&&(e.uid=$),tt!==U&&e.gid===U&&(e.gid=tt);const et=s.encrypted&&A.encrypted&&!T,rt=et&&!w;if(T||(e.zipCrypto=rt),et&&!(64&~A.rawBitFlag))throw new Error(Ko);const at=T?U:Ze(p);if(0!=p&&8!=p&&9!=p&&!at&&!T)throw new Error(Yo);if(et){if(!rt&&(w.strength<1||w.strength>3))throw new Error(Ko);if(!O&&!k)throw new Error(qo)}if(M+g>u.size)throw new Error(Jo);const it=g,st=Ie(u.createReadable({offset:M,size:it})),ct=nt(Ca(s,i,P)),ut=Ca(s,i,"checkPasswordOnly");let lt=Ca(s,i,"checkOverlappingEntry");const ft=Ca(s,i,"checkOverlappingEntryOnly");ft&&(lt=!0);const{onstart:dt,onprogress:wt,onend:ht}=i,pt=0!=p&&!T,yt=T?g:S,bt=9==p;let Et=Ca(s,i,W);bt&&(Et=!1);const St=Ca(s,i,"checkCrc32"),gt=(St===U?Ca(s,i,"checkSignature"):St)&&!T&&(!et||rt||w&&1==w.vendorVersion),xt={options:{codecType:dr,password:O,rawPassword:k,zipCrypto:rt,encryptionStrength:w&&w.strength,checkCrc32:gt,checkAuthenticationCode:Ca(s,i,"checkAuthenticationCode"),passwordVerification:rt&&(x?E>>>8&r:b>>>24&r),outputSize:yt,crc32:b,compressed:pt,encrypted:et,useWebWorkers:Ca(s,i,_),useCompressionStream:Et,transferStreams:Ca(s,i,L),deflate64:bt,format:at?at.format:U,codecURI:at?at.codecURI:U,compressionMethod:p,rawBitFlag:y,checkPasswordOnly:ut},config:c,ft:{signal:ct,size:it,onstart:dt,onprogress:wt,onend:ht}};let At,zt;lt&&await async function({reader:t,$t:e,index:r,offset:n,crc32:o,compressedSize:i,uncompressedSize:s,dataOffset:c,dataDescriptor:u,extraFieldZip64:l,Yt:f}){let d=0;if(u&&(d=l?20:12),d){const r=await to(t,c+i,d+4),n=Ft(r);let u=r.length==d+4&&Wa(n,0)==a;if(u){const t=Aa(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=Aa(n,u?4:0,l);t.signature=u,e.localDirectory.dataDescriptor=t}}const w={start:n,end:c+i+d,$t:e};for(const[t,e]of f)if(t!=r&&w.start<e.end&&e.start<w.end){const t=new Error(Xo);throw t.overlappingEntry=e.$t,t}f.set(r,w)}({reader:u,$t:e,index:l,offset:z,crc32:b,compressedSize:g,uncompressedSize:S,dataOffset:M,dataDescriptor:x||A.bitFlag.dataDescriptor,extraFieldZip64:h||A.extraFieldZip64,Yt:o});try{if(!ft){ut&&(t=new WritableStream),t=new Xn(t),await Qn(t,function(t,e,r){return Math.min(t,r?1032*e:e)}(yt,g,pt)),({writable:At}=t);const{outputSize:e}=await Hr({readable:st,writable:At},xt);if(t.size+=e,e!=yt)throw new Error(Ke)}}catch(e){if(e.outputSize!==U&&(t.size+=e.outputSize),!ut||e.message!=Yt)throw zt=e,e}finally{if((Jn(t)||!Ca(s,i,V))&&At&&!At.locked){const t=At.getWriter();if(zt)try{await t.abort(zt)}catch{}else await t.close()}}return ut||ft?U:t.getData?t.getData():At}};function ha(t){const e=Math.min(t.byteLength,1024)-3;for(let r=0;r<e;r++)if(134630224==Wa(t,r))return!0;return!1}function pa(t,e,r){let n=0;for(;r+f<=e.length&&Wa(t,r)==s;)r+=f+_a(t,r+28)+_a(t,r+30)+_a(t,r+32),n++;return n%65536?0:n}function ma(t){if(t.length>=6){const e=Ft(t);if(Wa(e,0)==i){const r=_a(e,4);if(6+r<=t.length)return t.subarray(6,6+r)}}}function ya(t,e,r){const n=t.rawBitFlag=_a(e,r+2),o=!(1&~n),a=Wa(e,r+6);Object.assign(t,{encrypted:o,version:_a(e,r),bitFlag:{level:(6&n)>>1,dataDescriptor:!(8&~n),languageEncodingFlag:(n&S)==S},rawLastModDate:a,lastModDate:ja(a),filenameLength:_a(e,r+22),extraFieldLength:_a(e,r+24)})}function ba(t,e,r,n,o){const{rawExtraField:a}=e,i=e.extraField=new Map,s=Ft(a);let c=0;try{for(;c<a.length;){const t=_a(s,c),e=_a(s,c+2);i.set(t,{type:t,data:a.slice(c+4,c+4+e)}),c+=4+e}}catch{}const u=_a(r,n+4);Object.assign(e,{signature:Wa(r,n+10),crc32:Wa(r,n+10),compressedSize:Wa(r,n+14),uncompressedSize:Wa(r,n+18)});const l=i.get(1);l&&(function(t,e){e.zip64=!0;const r=Ft(t.data),n=ca.filter(([t,r])=>e[t]==r),o=n.reduce((t,[,e])=>t+ua[e].bytes,0);if(t.data.length<o)throw new Error(Ho);for(let o=0,a=0;o<n.length;o++){const[i,s]=n[o],c=ua[s];e[i]=t[i]=c.Kt(r,a),a+=c.bytes}}(l,e),e.extraFieldZip64=l);const f=i.get(28789);f&&(Ea(f,ro,no,e,t),e.extraFieldUnicodePath=f);const d=i.get(25461);d&&(Ea(d,oo,ao,e,t),e.extraFieldUnicodeComment=d);const w=i.get(p);w&&w.data.length>=7?(function(t,e,r){const n=Ft(t.data),o=Pa(n,4);Object.assign(t,{vendorVersion:Pa(n,0),vendorId:Pa(n,2),strength:o,originalCompressionMethod:r,compressionMethod:_a(n,5)}),e.compressionMethod=t.compressionMethod,1!=t.vendorVersion&&(e.crc32=U)}(w,e,u),e.extraFieldAES=w):e.compressionMethod=u;const h=i.get(13);h&&(Sa(h,e),e.extraFieldPkwareUnix=h);const S=i.get(22613);S&&(Sa(S,e),e.extraFieldUnixType1=S);const g=i.get(10);g&&(function(t,e){const r=Ft(t.data);let n,o=4;try{for(;o<t.data.length&&!n;){const e=_a(r,o),a=_a(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=Ft(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:Ba(o),lastAccessDate:Ba(a),creationDate:Ba(i)};Object.assign(t,s),Object.assign(e,s,{rawLastAccessDate:a,rawCreationDate:i})}}(g,e),e.extraFieldNTFS=g);const x=i.get(E);let A;if(x&&(A=ga(x,e,!1),e.extraFieldUnix=x),!A){const t=i.get(b);t&&(ga(t,e,!0),e.extraFieldInfoZip=t)}const z=i.get(m);z&&(function(t,e,r){if(!t.data.length)return;const n=Ft(t.data),o=Pa(n,0),a=[],i=[];r?(1&~o||(a.push(lo),i.push(fo)),2&~o||(a.push(wo),i.push(ho)),4&~o||(a.push(po),i.push(mo))):t.data.length>=5&&(a.push(lo),i.push(fo));let s=1;a.forEach((r,o)=>{if(t.data.length>=s+4){const a=Wa(n,s);e[r]=t[r]=new Date(1e3*(0|a));const c=i[o];t[c]=a}s+=4})}(z,e,o),e.extraFieldExtendedTimestamp=z);const R=i.get(y);R&&(e.extraFieldUSDZ=R)}function Ea(t,e,r,n,o){if(t.data.length<5)return void(t.valid=!1);const a=Ft(t.data),i=new jt;i.append(o[r]);const s=Ft(new Uint8Array(4));s.setUint32(0,i.get(),!0);const c=Wa(a,1),u=Pa(a,0);Object.assign(t,{version:u,[e]:$r(t.data.subarray(5)),valid:1==u&&!o.bitFlag.languageEncodingFlag&&c==Wa(s,0)}),t.valid&&(n[e]=t[e],n[e+"UTF8"]=!0)}function Sa(t,e){if(t.data.length<8)return;const r=Ft(t.data),n={lastAccessDate:new Date(1e3*(0|Wa(r,0))),lastModDate:new Date(1e3*(0|Wa(r,4)))};t.data.length>=12&&(n.uid=_a(r,8),n.gid=_a(r,10)),Object.assign(t,n),Object.assign(e,n)}function ga(t,e,r){try{const n=Ft(t.data);let o,a;if(r){let e=0;const r=Pa(n,e++),i=Pa(n,e++);o=xa(t.data.subarray(e,e+i)),e+=i;const s=Pa(n,e++);a=xa(t.data.subarray(e,e+s)),Object.assign(t,{version:r,uid:o,gid:a})}else t.data.length>=4&&(o=_a(n,0),a=_a(n,2),Object.assign(t,{uid:o,gid:a}));return o!==U&&(e.uid=o),a!==U&&(e.gid=a),o!==U||a!==U}catch{}}function xa(t){const e=new Uint8Array(4);return e.set(t,0),new DataView(e.buffer,e.byteOffset,4).getUint32(0,!0)}function Aa(t,e,r){const n=Wa(t,e);let o,a;return r?(o=La(t,e+4),a=La(t,e+12)):(o=Wa(t,e+4),a=Wa(t,e+8)),{crc32:n,compressedSize:o,uncompressedSize:a}}function za(t,e){return t.qt?t.qt(e):0}async function Ra(t){return Wa(Ft(await to(t,0,4)))}function Da(t){return t===X||t===J||t===Q}function Fa(t,e){return Oa(t,Oa(e,J))}function Oa(t,e){const r=t.strictness;if(r!==U){if(!Da(r))throw new Error(ea);return r}const n=t.checkAmbiguity;return n===U?e:n?X:e==Q?Q:J}function Ua(t,e){if(e==Q)return!1;const r=t.split("/");return r.length>1&&""===r[r.length-1]&&r.pop(),!!(r.includes("..")||t.startsWith("/")||t.startsWith("\\\\")||aa.test(t))||e==X&&(r.includes(".")||r.includes(""))}async function*ka(t,e){const r=t.size-e,n=await to(t,r,e),o=Ft(n);for(let t=n.length-d;t>=0;t--)Wa(o,t)==c&&(yield[o,r,n,t,r+t])}function Ta(t,e,r){return{offset:r,buffer:t.slice(e,e+d).buffer}}async function va(r,n,o,a,i,c,u){const f=_a(n,a+10),d=Wa(n,a+12),h=Wa(n,a+16);if(f==e||d==t||h==t)return await Ia(r,n,o,i-w,c,u)==l?2:0;if(!f&&!d)return 1;const p=_a(n,a+6);for(const t of[i-d,za(r,p)+h])if(await Ia(r,n,o,t,c,u)==s)return 2;return 0}async function Ia(t,e,r,n,o,a){return n<0||n+4>o?U:n>=r?Wa(e,n-r):a.count>0?(a.count--,Wa(Ft(await to(t,n,4)),0)):U}function Ma(t){const e=new Error(Qo);throw e.reason=t,e}function Ca(t,e,r){return e[r]===U?t.options[r]:e[r]}function Na(t,e,r){return rt(Ca(t,e,r))}function ja(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 Ba(t){return new Date(Number(t/BigInt(1e4)-BigInt(116444736e5)))}function Pa(t,e){return t.getUint8(e)}function _a(t,e){return t.getUint16(e,!0)}function Wa(t,e){return t.getUint32(e,!0)}function La(t,e){const r=t.getBigUint64(e,!0);if(r>la)throw new Error(oa);return Number(r)}var Va=Object.freeze({__proto__:null,ERR_AMBIGUOUS_ARCHIVE:Qo,ERR_BAD_FORMAT:_o,ERR_CENTRAL_DIRECTORY_NOT_FOUND:Vo,ERR_ENCRYPTED:qo,ERR_ENCRYPTED_CENTRAL_DIRECTORY:$o,ERR_ENTRY_DATA_OUT_OF_BOUNDS:Jo,ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND:Lo,ERR_EOCDR_NOT_FOUND:Wo,ERR_EXTRAFIELD_ZIP64_NOT_FOUND:Ho,ERR_INVALID_AUTHENTICATION_CODE:Kt,ERR_INVALID_COMPRESSED_DATA:Ye,ERR_INVALID_CRC32:Ge,ERR_INVALID_FILENAME_VALIDATION:ra,ERR_INVALID_MAX_APPENDED_DATA_SIZE:na,ERR_INVALID_PASSWORD:Ht,ERR_INVALID_SIGNATURE:qt,ERR_INVALID_STRICTNESS:ea,ERR_INVALID_UNCOMPRESSED_SIZE:Ke,ERR_LOCAL_FILE_HEADER_NOT_FOUND:Zo,ERR_OVERLAPPING_ENTRY:Xo,ERR_SPLIT_ZIP_FILE:Go,ERR_UNSAFE_FILENAME:ta,ERR_UNSUPPORTED_COMPRESSION:Yo,ERR_UNSUPPORTED_ENCRYPTION:Ko,ERR_UNSUPPORTED_UINT64:oa,ERR_WORKER_STARTUP_TIMEOUT:pr,ZipReader:fa,ZipReaderStream:da});const Za="File already exists",Ha="Zip file comment exceeds 64KB",qa="Invalid zip file comment (must be a Uint8Array)",Ka="File entry comment exceeds 64KB",Ya="Invalid file entry comment (must be a string)",Ga="Invalid date (must be a valid Date instance)",Xa="File entry name exceeds 64KB",Ja="Version exceeds 65535",Qa="The strength must equal 1, 2, or 3",$a="Encryption is not supported in USDZ files",ti="Encryption is not supported when the 'passThrough' option is set",ei="Invalid extra field (must be a Map)",ri="Invalid extra field type (must be integer 0..65535)",ni="Invalid extra field data (must be a Uint8Array)",oi="Extra field data exceeds 64KB",ai=-2147483648,ii=2147483647,si=BigInt(0),ci=BigInt("0x7fffffffffffffff"),ui="Zip64 is not supported (set the 'zip64' option to 'true')",li="Undefined uncompressed size",fi="Undefined compression method",di="Undetermined size",wi="Undefined reader",hi="Zip file not empty",pi="Invalid uid (must be integer 0..2^32-1)",mi="Invalid gid (must be integer 0..2^32-1)",yi="Invalid UNIX mode (must be integer 0..65535)",bi="Invalid unixExtraFieldType (must be 'infozip' or 'unix')",Ei="uid/gid must be 0..65535 for unixExtraFieldType 'unix' (use 'infozip' for larger ids)",Si="Invalid msdosAttributesRaw (must be integer 0..255)",gi="Invalid msdosAttributes (must be an object with boolean flags)",xi="Invalid level (must be integer 0..9)",Ai="Signature data exceeds 64KB",zi=new Uint8Array([7,0,2,0,65,69,3,0,0]),Ri="infozip",Di="unix";let Fi=0;const Oi=[];class Ui{constructor(t,e={}){t=new Xn(t);const{availableSize:r=k,maxSize:n=k}=t,o=r>0&&r!==k&&n>0&&n!==k;Object.assign(this,{writer:t,te:o,options:e,ee:new Map,re:new Set,offset:e[H]===U?t.size||t.writable.size||0:e[H],ne:e[H]===U?0:e[H]-(t.size||t.writable.size||0),oe:new Set,ae:[],ie:0,se:U})}prependZip(t){return vi(this,async function(t,e){if(t.re.size)throw new Error(hi);await t.ce(e)}(this,t))}appendZip(t){return vi(this,this.ce(t))}async ce(t){const e=this,{oe:r,re:n,ee: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 Gn(t),await Qn(t),t.size!==U&&t.readUint8Array||(t=new gn(await Me(t.readable)),await Qn(t));const{ZipReader:r}=await Promise.resolve().then(function(){return Va}),i=new r(t),s=await i.getEntries();await i.close(),await Qn(e.writer);const{directoryOffset:l}=i;s.forEach(({filename:t})=>{if(n.has(t))throw new Error(Za);n.add(t),c.push(t)}),e.ue=!0;const{le:f}=e;e.le=new Promise(t=>u=()=>{e.ue=!1,t()}),await f,e.te&&(delete e.te,await async function(t){return Ft(await to(t,0,4)).getUint32(0,!0)==o}(t)||(await es(e.writer,$i()),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)=>Qi(e,t)-Qi(e,r));let s=0;for(const r of i){const n=Qi(e,r);await Xi(t,e,s,n-s),Ki(o,await Ji(e,n))&&await o.closeDisk(),a.set(r,{offset:Yi(t,o),diskNumberStart:Hi(o)}),s=n}await Xi(t,e,s,n-s)}else{const o=t.offset;await Xi(t,e,0,n),r.forEach(t=>a.set(t,{offset:o+Qi(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:h,dataDescriptor:p}=o;f=Gi(f||C),t.extraFieldAES&&(l=99);const m=Ss(f),y=Boolean(u)&&u.uncompressedSize!==U,b=Boolean(u)&&u.compressedSize!==U,E=-7&xs(w,h,p,i,l)|w<<1,{fe:S,de:g}=gs({version:e,bitFlag:E,compressionMethod:l,uncompressedSize:s,compressedSize:c,rawLastModDate:r,rawFilename:n,we:b,he:y,extraFieldLength:m}),{crc32:x}=t;x!==U&&ys(g,10,x);const{offset:A,diskNumberStart:z}=d.get(t);Object.assign(t,{he:y,we:b,offset:A,diskNumberStart:z,pe:!1,me:C,ye:C,be:C,Ee:C,Se:C,rawExtraField:f,extendedTimestamp:!1,fe:S,de: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,{oe:i}=a,s=async function(e,n,o,a){if(a=Object.assign({},a),n=n.trim(),ss(e,a,Uo)&&!n.endsWith(R)&&(n+=R),e.re.has(n))throw new Error(Za);e.re.add(n),Fi<mt().maxWorkers?Fi++:await new Promise(t=>Oi.push(t));try{return await async function(e,n,o,a){const i=Ci(e,n,a);({name:n}=i);const s=Ni(e,n,a),{comment:c}=s,u=a[Io];let l;e.ee.set(n,U);try{const{ge:c}=s;0==c.level||c.compressionMethod!==U||c.passThrough||await Sr(mt())||(c.level=0);const u=await async function(t,e,{ge:r},n){if(r.passThrough&&!e&&!ss(t,n,Uo))throw new Error(wi);let o;return e&&(e=new Gn(e),await Qn(e),({size:o}=e)),Object.assign({reader:e},Bi(t,Boolean(e),o,r,n))}(e,o,s,a);({reader:o}=u);const f=qi(e.writer),d=Hi(e.writer),w=Pi(a=Object.assign({},a,i.ge,s.ge,u.ge,{signature:a[vo],crc32:a.crc32===U?a[vo]:a.crc32,offset:e.offset-f,diskNumberStart:d,[q]:e.options[q]})),h=Li(a),p=Ss(w.xe,h.Ae);l=await async function(e,n,o,a,i){const{ee:s,writer:c}=e,{keepOrder:u,dataDescriptor:l,ze:f,signal:d}=i,{Re:w}=a,h=e.options[q],p=e.se;let m,y,b,E,S,g,x,A={},z=0;s.set(n,A),e.se=A;try{let y;u&&(y=p&&p.De,A.De=new Promise(t=>b=t)),i.bufferedWrite||!u||e.ue||e.ie||!l&&!f?(m=!0,e.ie++,x=i.createTempStream?await i.createTempStream():new TransformStream(U,U,{highWaterMark:k}),x.size=0,await Qn(c)):(x=c,await R()),await Qn(x);const O=qi(c);e.te&&!m&&await ts(e,c),h&&!m&&_i(a,e.offset-O);const{xe:T}=w;m||(await y,await F());const v=Hi(c),I=Yi(e,c);if(A.diskNumberStart=v,m||(S=!0,g=c.size,await es(x,T)),A=await async function(e,n,{diskNumberStart:o,De:a},i,s,c){const{Re:u,Fe:l,Oe:f}=i,{fe:d,de:w,lastModDate:h,rawLastModDate:p,encrypted:m,compressed:y,version:b,compressionMethod:E,me:S,Ue:g,be:x,ke:A,Ee:z,Se:R,ye:D}=u,{Ae:F}=l,{rawFilename:O,lastAccessDate:k,creationDate:T,password:v,rawPassword:I,level:M,zip64:C,he:N,we:j,zipCrypto:B,dataDescriptor:P,directory:_,executable:W,versionMadeBy:L,rawComment:V,rawExtraField:Z,useWebWorkers:H,transferStreams:q,onstart:K,onprogress:Y,onend:G,signal:X,encryptionStrength:J,extendedTimestamp:Q,msDosCompatible:$,internalFileAttributes:tt,externalFileAttributes:et,uid:rt,gid:nt,unixMode:ot,symlink:at,setuid:it,setgid:st,sticky:ct,unixExternalUpper:ut,msdosAttributesRaw:lt,msdosAttributes:ft,useCompressionStream:dt,passThrough:wt,format:ht,codecURI:pt}=c,mt={De:a,versionMadeBy:L,zip64:C,directory:Boolean(_),executable:Boolean(W),filenameUTF8:!0,rawFilename:O,commentUTF8:!0,rawComment:V,me:S,Ue:g,be:x,Ee:z,Se:R,ye:D,rawExtraField:Z,extendedTimestamp:Q,msDosCompatible:$,internalFileAttributes:tt,externalFileAttributes:et,diskNumberStart:o,uid:rt,gid:nt,unixMode:ot,symlink:Boolean(at),setuid:it,setgid:st,sticky:ct,unixExternalUpper:ut,msdosAttributesRaw:lt,msdosAttributes:ft};let{crc32:yt,uncompressedSize:bt}=c,Et=0;wt||(bt=0);const{writable:St}=n;if(e){const o=Ie(eo(e)),a=e.size,i={options:{codecType:fr,level:M,rawPassword:I,password:v,encryptionStrength:J,zipCrypto:m&&B,passwordVerification:m&&B&&p>>8&r,computeCrc32:!wt,compressed:y&&!wt,encrypted:m&&!wt,useWebWorkers:H,useCompressionStream:dt,transferStreams:q,format:ht,codecURI:pt,compressionMethod:E},config:s,ft:{signal:X,size:a,onstart:K,onprogress:Y,onend:G}};try{const e=await Hr({readable:o,writable:St},i);if(Et=e.outputSize,n.size+=Et,wt||(bt=e.inputSize,m&&!B||(yt=e.crc32)),!j&&Et>=t||!N&&bt>=t)throw new Error(ui)}catch(t){throw t.outputSize!==U&&(n.size+=t.outputSize),t}}return function({crc32:t,compressedSize:e,uncompressedSize:r,Re:n,Fe:o},{zip64:a,zipCrypto:i,passThrough:s,dataDescriptor:c}){const{de:u,encrypted:l}=n,{Te:f,ve:d}=o;l&&!i&&!s||t===U||(ys(u,10,t),c&&ys(f,d,t)),a?c&&(bs(f,d+4,BigInt(e)),bs(f,d+12,BigInt(r))):(ys(u,14,e),ys(u,18,r),c&&(ys(f,d+4,e),ys(f,d+8,r)))}({crc32:yt,compressedSize:Et,uncompressedSize:bt,Re:u,Fe:l},c),P&&await es(n,F),Object.assign(mt,{uncompressedSize:bt,compressedSize:Et,lastModDate:h,rawLastModDate:p,creationDate:T,lastAccessDate:k,encrypted:Boolean(m),zipCrypto:Boolean(B),size:f+Et,compressionMethod:E,version:b,fe:d,de:w,signature:yt,crc32:!m||B||wt?yt:U,ke:A,he:N,we:j}),mt}(o,x,A,a,mt(),i),m||(S=!1),s.set(n,A),A.filename=n,m){if(await Promise.all([x.writable.getWriter().close(),y]),await R(),e.te&&await ts(e,c),E=!0,g=c.size,await F(),A.diskNumberStart=Hi(c),A.offset=Yi(e,c),h){const t=a.Oe;_i(a,e.offset-qi(c)),A.size+=a.Oe-t}!function({rawFilename:t,encrypted:e,zip64:r,Ue:n,crc32:o,compressedSize:a,uncompressedSize:i,he:s,we:c},u,{dataDescriptor:l,passThrough:f}){if(l||((!e||f&&o!==U)&&ys(u,14,o),c||ys(u,18,a),s||ys(u,22,i)),r&&n){const e=D+Ss(t)+4;bs(u,e,BigInt(i)),bs(u,e+8,BigInt(a))}}(A,w.Ie,i),await es(c,w.xe),await rs(x.readable,c,d,t=>z+=t),c.size+=x.size,E=!1}else A.diskNumberStart=v,A.offset=I;return e.offset+=A.size,A}catch(t){if(E||S){if(e.hasCorruptedEntries=!0,t)try{t.corruptedEntry=!0}catch{}e.offset+=c.size-g,m&&(e.offset+=z)}throw s.delete(n),t}finally{if(m&&e.ie--,b&&b(),y&&y(),m&&x&&x.dispose)try{await x.dispose()}catch{}}async function R(){e.ue=!0;const{le:t}=e;e.le=new Promise(t=>y=()=>{e.ue=!1,t()}),await t}async function F(){Ki(c,Ss(w.xe))&&await c.closeDisk()}}(e,n,o,{Re:w,Fe:h,Oe:p},a)}catch(t){throw e.ee.delete(n),t}return Object.assign(l,{name:n,comment:c,extraField:u,[Eo]:l.internalFileAttributes,[So]:l.externalFileAttributes}),new Po(l)}(e,n,o,a)}catch(t){throw e.re.delete(n),t}finally{const t=Oi.shift();t?t():Fi--}}(a,e,n,o);i.add(s);const c=()=>i.delete(s);return Promise.prototype.then.call(s,c,c),vi(a,s)}remove(t){const{re:e,ee:r}=this;if(typeof t==M&&(t=r.get(t)),t&&t.filename!==U){const{filename:n}=t;if(e.has(n)&&r.has(n))return e.delete(n),r.delete(n),!0}return!1}async close(r=C,n={}){const o=this,{oe:a,writer:w}=this,{writable:h}=w;if(!(r instanceof Uint8Array))throw new Error(qa);if(Ss(r)>e)throw new Error(Ha);for(;a.size;)await Promise.allSettled(Array.from(a));await Promise.allSettled(o.ae.map(t=>t.Me));const p=o.ae.filter(t=>t.error&&!t.Ce);if(p.length){const t=p.map(t=>t.error);p.forEach(t=>t.Ce=!0);const[e]=t;try{e.entryErrors=t}catch{}throw e}return await async function(r,n,o){const a=Vi(r.ee),{Ne:w,je:h,Be:p}=await async function(r,n,o){const{ee:a,writer:i}=r,c=new Uint8Array(n);await Qn(i);let u=0,l=0,d=Hi(i),w=qi(i),h=0;for(const[r,n]of Array.from(a.values()).entries()){const{offset:p,rawFilename:m,me:y,ye:b,be:E,Ee:S,Se:g,rawExtraField:x,rawComment:A,versionMadeBy:z,fe:R,de:D,he:F,we:O,pe:U,Pe:k,internalFileAttributes:T,externalFileAttributes:v,diskNumberStart:I,uncompressedSize:M,compressedSize:C}=n,N=Ss(y,b,E,S,g,x),j=f+Ss(m,A)+N;Ki(i,u+j-l)&&(await es(i,c.slice(l,u)),l=u,h=0,await i.closeDisk()),0==r&&(d=Hi(i),w=qi(i)),F||ys(D,18,M),O||ys(D,14,C),(k||U)&&n.version<45&&ms(D,0,45);const B=Zi(j);if(B._e(s),B.We(z),B.Le(R.subarray(0,24)),B.We(N),B.We(Ss(A)),B.We(U?e:I),B.We(T),B._e(v),B._e(k?t:p),B.Le(m),B.Le(y),B.Le(b),B.Le(E),B.Le(S),B.Le(g),B.Le(x),B.Le(A),Es(c,B.Wt,u),u+=j,h++,o.onprogress)try{await o.onprogress(r+1,a.size,new Po(n))}catch{}}return await es(i,l?c.slice(l):c),{Ne:{diskNumber:d,diskOffset:w},je:{diskNumber:Hi(i),Ve:h},Be:c}}(r,a,o),m=await async function(t,r,n){const o=us(t,n,K);if(o){const n=await o(r),a=Ss(n);if(a>e)throw new Error(Ai);const s=Zi(6+a);s._e(i),s.We(a),s.Le(n);const{writer:c}=t;return Ki(c,Ss(s.Wt))&&await c.closeDisk(),await es(c,s.Wt),6+a}return 0}(r,p,o);await async function(r,n,o,a){const{writer:i}=r,{Ne:s,je:f,Ze:w}=a;let{He:h}=a,p=r.ee.size,m=s.diskNumber,y=Yi(r,s);const b=Ss(n);if(b>e)throw new Error(Ha);let E=ss(r,o,zo),S=Hi(i);if(Ki(i,(E?98:d)+b)&&S++,y>=t||h>=t||p>=e||S>=e){if(!1===E)throw new Error(ui);E=!0}const g=Zi(E?98:d);Ki(i,Ss(g.Wt)+b)&&await i.closeDisk(),S=Hi(i);let x=S==f.diskNumber?f.Ve:0;E&&(g._e(u),g.qe(44),g.We(45),g.We(45),g._e(S),g._e(m),g.qe(x),g.qe(p),g.qe(h),g.qe(y),g._e(l),g._e(S),g.qe(BigInt(Yi(r,i))+BigInt(h)+BigInt(w)),g._e(S+1),ss(r,o,"supportZip64SplitFile",!0)&&(S=e,m=e),x=e,p=e,y=t,h=t),g._e(c),g.We(S),g.We(m),g.We(x),g.We(p),g._e(h),g._e(y),g.We(b),await es(i,g.Wt),b&&await es(i,n)}(r,n,o,{Ne:w,je:h,He:a,Ze:m})}(o,r,n),!Jn(w)&&ss(o,n,V)||await h.getWriter().close(),w.getData?w.getData():h}}class ki{constructor(t={}){const{readable:e,writable:r}=new TransformStream;this.readable=e,this.zipWriter=new Ui(r,t),this.oe=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 Ii(e,t)}}()}});return Mi(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 Mi(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.oe))).filter(t=>"rejected"==t.status).map(t=>t.reason);if(n.length){const[t]=n;try{t.entryErrors=n}catch{}throw await Ii(r,t),t}try{return await r.close(t,e)}catch(t){throw await Ii(r,t),t}}}class Ti extends Promise{then(t,e){const{Ke:r}=this;return r&&(r.Ce=!0),super.then(t,e)}}function vi(t,e){const r=new Ti((t,r)=>Promise.prototype.then.call(e,t,r)),n={};return r.Ke=n,n.Me=Promise.prototype.then.call(r,U,t=>n.error=t),t.ae.push(n),r}async function Ii(t,e){try{await t.writer.writable.abort(e)}catch{}}function Mi(t,e,r){t.oe.add(e),e.catch(t=>{try{r(t)}catch{}})}function Ci(n,o,a){o=o.trim();let i=ss(n,a,Ao),s=ss(n,a,Fo,i?20:768);const c=ss(n,a,ko),u=ds(n,a,"uid"),l=ds(n,a,"gid");let f=ds(n,a,Mo),d=ss(n,a,"unixExtraFieldType"),w=ss(n,a,Co),h=ss(n,a,No),p=ss(n,a,jo);if(it(u,t,pi),it(l,t,mi),it(f,e,yi),d!==U&&d!==Ri&&d!==Di)throw new Error(bi);if(d===Di&&(u!==U&&u>e||l!==U&&l>e))throw new Error(Ei);d!==U||u===U&&l===U||(d=Ri);let m=ds(n,a,go),y=ss(n,a,xo);const b=m!==U||y!==U;if(u!==U||l!==U||f!==U||d||c?(i=!1,s=s&r|768):b&&(i=!0,s&=r),it(m,r,Si),y&&(typeof y!==I||Array.isArray(y)))throw new Error(gi);if(s>e)throw new Error(Ja);let E=ls(n,a,bo,So);const S=E!==U;S||(E=0),!a[Uo]&&o.endsWith(R)&&(a[Uo]=!0);const D=ss(n,a,Uo);if(D?(o.endsWith(R)||(o+=R),S||(E=16,i||(E|=16877<<16))):i||S||(E=c?493<<16:27525120),!i){const t=f!==U||Boolean(w||h||p);f=f===U?E>>16&e:f&e,w?f|=A:w=Boolean(f&A),h?f|=z:h=Boolean(f&z),p?f|=512:p=Boolean(512&f),S&&!t||(D?f=-61441&f|x:f&g||(f|=32768),E=(f&e)<<16|E&e)}({msdosAttributesRaw:m,msdosAttributes:y}=function(t,e){if(t!==U)t&=r;else if(e!==U){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===U&&(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!==U&&40960==(f&g);return{name:o,ge:{versionMadeBy:s,msDosCompatible:Boolean(i),externalFileAttributes:E,unixExternalUpper:F,uid:u,gid:l,unixMode:f,unixExtraFieldType:d,symlink:O,setuid:w,setgid:h,sticky:p,msdosAttributesRaw:m,msdosAttributes:y}}}function Ni(t,r,n){const o=us(t,n,"encodeText")||Pt;let a=o(r,Y);if(a===U&&(a=Pt(r)),Ss(a)>e)throw new Error(Xa);const i=n[oo]||"";if(typeof i!=M)throw new Error(Ya);let s=o(i,G);if(s===U&&(s=Pt(i)),Ss(s)>e)throw new Error(Ka);const c=ss(t,n,Do);if(c!==U&&c>e)throw new Error(Ja);const u=cs(t,n,lo,new Date),l=ss(t,n,fo),f=cs(t,n,wo),d=cs(t,n,po),w=ls(t,n,yo,Eo,0),h=ss(t,n,B),p=ss(t,n,N),m=ss(t,n,j);ot(p,m);const y=ds(t,n,"encryptionStrength",3),b=ss(t,n,Oo),E=ss(t,n,"extendedTimestamp",!0),S=ss(t,n,"ntfsTimestamp"),g=ss(t,n,"keepOrder",!0),x=ss(t,n,_),A=ss(t,n,L),z=ss(t,n,"bufferedWrite"),R=us(t,n,"createTempStream"),D=ss(t,n,"dataDescriptorSignature",!0),F=nt(ss(t,n,P)),O=ss(t,n,"useUnicodeFileNames",!0),k=ss(t,n,To),T=h||k===U?U:Ze(k);if(!h&&k!==U&&0!==k&&8!==k&&!T)throw new Error("Compression method not supported");let v=ds(t,n,"level");if(it(v,9,xi),t.options[q]){if(p!==U||m!==U)throw new Error($a);v===U&&k===U&&(v=0)}h&&(v=U);let I=ss(t,n,W),C=ss(t,n,Z);z&&C===U&&(C=!1),(C===U||b&&!h)&&(C=!0),v!==U&&6!=v&&(I=!1);const V=ss(t,n,zo);if(!(b||p===U&&m===U||Number.isInteger(y)&&y>=1&&y<=3))throw new Error(Qa);const H=ji(n[Io]),K=ji(n.localExtraField);return{comment:i,ge:{rawFilename:a,rawComment:s,version:c,lastModDate:u,rawLastModDate:l,lastAccessDate:f,creationDate:d,internalFileAttributes:w,passThrough:h,password:p,rawPassword:m,encryptionStrength:y,zipCrypto:b,extendedTimestamp:E,ntfsTimestamp:S,keepOrder:g,useWebWorkers:x,transferStreams:A,bufferedWrite:z,createTempStream:R,dataDescriptorSignature:D,signal:F,useUnicodeFileNames:O,compressionMethod:k,format:T?T.format:U,codecURI:T?T.codecURI:U,Ye:T?T.versionNeeded:U,level:v,useCompressionStream:I,dataDescriptor:C,zip64:V,rawExtraField:H,Ge:K}}}function ji(t){if(!t)return C;if(!(t instanceof Map))throw new Error(ei);let r=0,n=0;t.forEach((t,n)=>{if(at(n,e,ri),!(t instanceof Uint8Array))throw new Error(ni);if(Ss(t)>e)throw new Error(oi);r+=4+Ss(t)});const o=new Uint8Array(r),a=Ft(o);return t.forEach((t,e)=>{ms(a,n,e),ms(a,n+2,Ss(t)),Es(o,t,n+4),n+=4+Ss(t)}),o}function Bi(e,r,n,o,a){const{passThrough:i,zipCrypto:s,password:c,rawPassword:u,encryptionStrength:l}=o;let{dataDescriptor:f,zip64:d,level:w,compressionMethod:h}=o,p=0,m=0;if(i&&r){if(m=a[io],m===U)throw new Error(li);if(h===U)throw new Error(fi)}const y=!0===d,b=ss(e,a,Ro);if(r&&i&&!b&&Ss(c,u))throw new Error(ti);const E=r&&(Boolean(c&&Ss(c)||u&&Ss(u))||i&&b);r||(w=0,h=0);const S=E?s?12:16+4*l:0;r&&(i?(a.uncompressedSize=m,p=n===U?ws(m)+S:n):n===U?(f=!0,(d||d===U)&&(d=!0,m=p=4294967296)):(a.uncompressedSize=m=n,p=(hs(h,w)?ws(m):m)+S));const g=!(E||r&&(0!==n||i)||hs(h,w));g&&!s&&ss(e,a,Z)===U&&(f=!1);const x=y||m>=t,A=y||p>=t;if(x||A){if(!1===d)throw new Error(ui);d=!0}return d=d||!1,{Xe:p,ge:{dataDescriptor:f,ze:g,zip64:d,he:x,we:A,uncompressedSize:m,level:w,compressionMethod:h,encrypted:E}}}function Pi(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:h,Ge:y,encryptionStrength:S,extendedTimestamp:g,ntfsTimestamp:x,passThrough:A,encrypted:z,he:R,we:k,uncompressedSize:T,crc32:v}=t;let{version:I,compressionMethod:M}=t;const N=!w&&hs(M,c);let j;const B=A||!N,P=u&&(t.bufferedWrite||!d||!R&&!k||B),_=P||u&&d&&(R||k);if(u&&(R||k)){const t=20,e=Zi(t);if(e.We(1),e.We(t-4),j=e.Wt,P&&(e.qe(T),B)){const t=z?l?12:16+4*S:0;e.qe(A?0:T+t)}}else j=C;let W,L,V,Z,H;if(z&&!l){const t=Zi(Ss(zi)+2);t.We(p),t.Le(zi),W=t.Wt,W[8]=S}else W=C;if(g){const t=os(o),e=as(t);if(e){const e=9+(i?4:0)+(s?4:0),r=Zi(e);Z=1+(i?2:0)+(s?4:0),r.We(m),r.We(e-4),r.Je(Z),r._e(t),i&&r._e(is(os(i))),s&&r._e(is(os(s))),V=r.Wt}else V=C;if(x===U?!e||Boolean(i||s):x)try{const t=ns(o),e=Zi(36);e.We(10),e.We(32),e.Qe(4),e.We(1),e.We(24),e.qe(t),e.qe(i?ns(i):t),e.qe(s?ns(s):t),L=e.Wt}catch{L=C}else L=C}else L=V=C;try{const{uid:r,gid:n,unixExtraFieldType:o}=t;if(o!=Ri||r===U&&n===U)if(o!=Di||r===U&&n===U)H=C;else{const t=Zi(8);t.We(E),t.We(4),t.We((r===U?0:r)&e),t.We((n===U?0:n)&e),H=t.Wt}else{const t=Wi(r===U?0:r),e=Wi(n===U?0:n),o=3+t.length+e.length,a=Zi(4+o);a.We(b),a.We(o),a.Je(1),a.Je(t.length),a.Le(t),a.Je(e.length),a.Le(e),H=a.Wt}}catch{H=C}M===U&&(M=N?8:0),I===U&&(I=0!=M||w||z?20:10);const{Ye:K}=t;N&&K!==U&&(I=I>K?I:K),u&&(I=I>45?I:45),z&&!l&&(I=I>51?I:51,A&&v!==U&&(W[4]=1),ms(Ft(W),9,M),M=99);const Y=_?Ss(j):0,G=Y+Ss(W,V,L,H,h,y);if(G+(t[q]?67:0)>e)throw new Error(oi);const X=new Date(2e3*Math.ceil(Math.floor(o.getTime()/1e3)/2)),{fe:J,de:Q,rawLastModDate:$}=gs({version:I,bitFlag:xs(c,f,d,z,M),compressionMethod:M,uncompressedSize:T,lastModDate:X<O?O:X>F?F:X,rawLastModDate:a,rawFilename:r,we:k,he:R,extraFieldLength:G}),tt=Zi(D+Ss(r)+G),et=tt.Wt,rt=Ft(et);return tt._e(n),tt.Le(J),tt.Le(r),_&&tt.Le(j),tt.Le(W),tt.Le(V),tt.Le(L),tt.Le(H),tt.Le(h),tt.Le(y),d&&(k||ys(rt,18,0),R||ys(rt,22,0)),{xe:et,Ie:rt,fe:J,de:Q,lastModDate:o,rawLastModDate:$,encrypted:z,compressed:N,version:I,compressionMethod:M,ke:Z,me:C,Ue:Y,be:V,Ee:L,Se:H,ye:W,extraFieldLength:G}}function _i(t,e){const{Re:r}=t;let{xe:n,extraFieldLength:o}=r,a=64-(e+Ss(n))%64;a<4&&(a+=64);const i=new Uint8Array(a),s=Ft(i);ms(s,0,y),ms(s,2,a-4);const c=n;r.xe=n=new Uint8Array(Ss(c)+a),Es(n,c),Es(n,i,Ss(c));const u=Ft(n);ms(u,28,o+a),r.Ie=u,t.Oe+=a}function Wi(t){const e=new Uint8Array(4);Ft(e).setUint32(0,t,!0);let r=4;for(;r>1&&0===e[r-1];)r--;return e.subarray(0,r)}function Li({zip64:t,dataDescriptor:e,dataDescriptorSignature:r}){let n,o=C,i=0,s=t?20:12;return r&&(s+=4),e&&(o=new Uint8Array(s),n=Ft(o),r&&(i=4,ys(n,0,a))),{Ae:o,Te:n,ve:i}}function Vi(r){let n=0;for(const[,o]of r){const{rawFilename:r,ye:a,rawComment:i,Ee:s,Se:c,rawExtraField:u,extendedTimestamp:l,ke:d,lastModDate:w,he:h,we:p,uncompressedSize:y,compressedSize:b}=o,E=o.offset>=t,S=o.diskNumberStart>=e;let g,x;if(E||S||h||p){const t=4+(h?8:0)+(p?8:0)+(E?8:0)+(S?4:0),e=Zi(t);e.We(1),e.We(t-4),h&&e.qe(y),p&&e.qe(b),E&&e.qe(o.offset),S&&e._e(o.diskNumberStart),g=e.Wt}else g=C;o.me=g,o.Pe=E,o.pe=S;const A=os(w);if(l&&as(A)){const t=Zi(9);t.We(m),t.We(5),t.Je(d),t._e(A),x=t.Wt}else x=C;o.be=x;const z=Ss(g,a,s,c,x,u);if(z>e)throw new Error(oi);n+=f+Ss(r,i)+z}return n}function Zi(t){const e=new Uint8Array(t),r=Ft(e);let n=0;return{Wt:e,Je:t=>{!function(t,e,r){t.setUint8(e,r)}(r,n,t),n+=1},We:t=>{ms(r,n,t),n+=2},_e:t=>{ys(r,n,t),n+=4},qe:t=>{bs(r,n,BigInt(t)),n+=8},Le:t=>{Es(e,t,n),n+=Ss(t)},Qe:t=>n+=t}}function Hi(t){const{diskNumber:e=0}=t;return e}function qi(t){const{diskOffset:e=0}=t;return e}function Ki(t,e){const{availableSize:r=k}=t;return e>r}function Yi(t,{diskNumber:e=0,diskOffset:r=0}){return t.offset-r-(e?t.ne:0)}function Gi(t){const e=Ft(t);let r=0;for(;r+4<=Ss(t);){const n=4+ps(e,r+2);if(1==ps(e,r))return Gi(Rt(t.subarray(0,r),t.subarray(Math.min(r+n,Ss(t)))));r+=n}return t}async function Xi(t,e,r,n){if(n>0){const{writer:o}=t;let a=0;try{await rs(eo(e,{offset:r,size:n}),o,U,t=>a+=t)}catch(e){t.hasCorruptedEntries=!0;try{e.corruptedEntry=!0}catch{}throw e}finally{o.size+=a,t.offset+=a}}}async function Ji(t,e){const r=await to(t,e,D);if(Ss(r)<D)return D;const n=Ft(r);return D+ps(n,26)+ps(n,28)}function Qi(t,{offset:e,diskNumberStart:r}){return e+(t.qt?t.qt(r):0)}function $i(){const t=new Uint8Array(4);return ys(Ft(t),0,o),t}async function ts(t,e){delete t.te,await es(e,$i()),t.offset+=4}async function es(t,e){const{writable:r}=t,n=r.getWriter();try{await n.ready,t.size+=Ss(e),await n.write(e)}finally{n.releaseLock()}}async function rs(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(Ss(t))}}),{preventClose:!0,preventAbort:!0,signal:r})}finally{o.releaseLock()}}function ns(t){if(t){const e=(BigInt(t.getTime())+BigInt(116444736e5))*BigInt(1e4);return e<si?si:e>ci?ci:e}}function os(t){return Math.floor(t.getTime()/1e3)}function as(t){return t>=ai&&t<=ii}function is(t){return Math.min(ii,Math.max(ai,t))}function ss(t,e,r,n){const o=e[r]===U?t.options[r]:e[r];return o===U?n:o}function cs(t,e,r,n){const o=ss(t,e,r,n);if(null===o)return n;if(o!==U&&(typeof o.getTime!=v||Number.isNaN(o.getTime())))throw new Error(Ga);return o}function us(t,e,r){return rt(ss(t,e,r))}function ls(t,e,r,n,o){const a=fs(e,r,n),i=a===U?fs(t.options,r,n):a;return i===U?o:i}function fs(t,e,r){return t[e]===U?t[r]:t[e]}function ds(t,e,r,n){return st(ss(t,e,r,n))}function ws(t){return t+5*(Math.floor(t/16383)+1)}function hs(t,e){return t===U?e===U||e>0:0!==t}function ps(t,e){return t.getUint16(e,!0)}function ms(t,e,r){t.setUint16(e,r,!0)}function ys(t,e,r){t.setUint32(e,r,!0)}function bs(t,e,r){t.setBigUint64(e,r,!0)}function Es(t,e,r){t.set(e,r)}function Ss(...t){let e=0;return t.forEach(t=>t&&(e+=t.length)),e}function gs({version:e,bitFlag:r,compressionMethod:n,uncompressedSize:o,compressedSize:a,lastModDate:i,rawLastModDate:s,rawFilename:c,we:u,he:l,extraFieldLength:f}){const d=Zi(26),w=d.Wt,h=Ft(w);if(d.We(e),d.We(r),d.We(n),s===U){const t=new Uint32Array(1),e=Ft(t);ms(e,0,(i.getHours()<<6|i.getMinutes())<<5|i.getSeconds()/2),ms(e,2,(i.getFullYear()-1980<<4|i.getMonth()+1)<<5|i.getDate()),s=t[0]}return d._e(s),d.Qe(4),u||a!==U?d._e(u?t:a):d.Qe(4),l||o!==U?d._e(l?t:o):d.Qe(4),d.We(Ss(c)),d.We(f),{fe:w,de:h,rawLastModDate:s}}function xs(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 As(){return"application/octet-stream"}const zs=1048576,Rs=".zip.js-temp";function Ds(t={}){const{thresholdBytes:e=zs,directoryName:r=Rs,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 Fs=1048576;function Os(t={}){const{thresholdBytes:e=Fs}=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=Me(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 Us=1048576,ks=".zip.js-temp",Ts="createSyncAccessHandle is only available in dedicated workers";function vs(t={}){const{thresholdBytes:e=Us,directoryName:r=ks,getDirectory:n}=t;if(!(n||"undefined"!=typeof FileSystemFileHandle&&FileSystemFileHandle.prototype.createSyncAccessHandle))throw new Error(Ts);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;return{writable:u,readable: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}),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{At({baseURI:import.meta.url})}catch{}let Is,Ms,Cs,Ns,js;function Bs(t,e,r={}){if(!Is){const t=new Error("WASM module not loaded");throw t.cause=js,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;return new TransformStream({start(){try{let r;if(this.$e=Ms(o),this.in=Ms(a),this.inBufferSize=a,!this.$e||!this.in)throw new Error("allocation failed");if(this.er=new Uint8Array(o),t?(this.rr=Is.deflate_process,this.nr=Is.deflate_last_consumed,this.ar=Is.deflate_end,this.ir=Is.deflate_new(),r="gzip"===e?Is.deflate_init_gzip(this.ir,n):"deflate-raw"===e?Is.deflate_init_raw(this.ir,n):Is.deflate_init(this.ir,n)):"deflate64-raw"===e?(this.rr=Is.inflate9_process,this.nr=Is.inflate9_last_consumed,this.ar=Is.inflate9_end,this.ir=Is.inflate9_new(),r=Is.inflate9_init_raw(this.ir)):(this.rr=Is.inflate_process,this.nr=Is.inflate_last_consumed,this.ar=Is.inflate_end,this.ir=Is.inflate_new(),r="deflate-raw"===e?Is.inflate_init_raw(this.ir):"gzip"===e?Is.inflate_init_gzip(this.ir):Is.inflate_init(this.ir)),0!==r)throw new Error("init failed:"+r)}catch(t){throw i(this),t}},transform(e,r){try{const n=e,a=new Uint8Array(Ns.buffer),i=this.rr,s=this.nr,c=this.$e,u=this.er;let l=0;for(;l<n.length;){const e=Math.min(n.length-l,32768);if((!this.in||this.inBufferSize<e)&&(this.in&&Cs&&(Cs(this.in),this.in=0),this.in=Ms(e),this.inBufferSize=e,!this.in))throw new Error("allocation failed");a.set(n.subarray(l,l+e),this.in);const f=i(this.ir,this.in,e,c,o,0),d=16777215&f;if(d&&(u.set(a.subarray(c,c+d),0),r.enqueue(u.slice(0,d))),!t){const t=f>>24&255,e=128&t?t-256:t;if(e<0)throw new Error("process error:"+e)}const w=s(this.ir);if(0===w)break;l+=w}}catch(t){i(this),r.error(t)}},flush(e){try{const r=new Uint8Array(Ns.buffer),n=this.rr,a=this.$e,i=this.er;for(;;){const s=n(this.ir,0,0,a,o,4),c=16777215&s,u=s>>24&255;if(!t){const t=128&u?u-256:u;if(t<0)throw new Error("process error:"+t)}if(c&&(i.set(r.subarray(a,a+c),0),e.enqueue(i.slice(0,c))),1===u||0===c)break}}catch(t){e.error(t)}finally{const t=i(this);0!==t&&e.error(new Error("end error:"+t))}},cancel(){i(this)}});function i(t){let e=0;return t.ir&&t.ar&&(e=t.ar(t.ir)),t.ir=0,t.in&&Cs&&Cs(t.in),t.in=0,t.$e&&Cs&&Cs(t.$e),t.$e=0,e}}class Ps{constructor(t="deflate",e){return Bs(!0,t,e)}}class _s{constructor(t="deflate",e){return Bs(!1,t,e)}}Ps.lt=!0,_s.lt=!0;let Ws,Ls=!1;function Vs(){Ws=null,async function(){await Promise.allSettled(_r.map(t=>(Xr(t),t.terminate()))),mr=U,yr=!1}(),Ls=!1,Is=Ms=Cs=Ns=js=null}!function({sr:t}){Er=t}({sr:t=>{if(!Ws){let{wasmURI:e}=t;typeof e==v&&(e=e()),Ws=async function(t,{baseURI:e}){if(!Ls)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)}!function(t){if(Is=t,({malloc:Ms,free:Cs,memory:Ns}=Is),"function"!=typeof Ms||"function"!=typeof Cs||!Ns)throw Is=Ms=Cs=Ns=null,new Error("Invalid WASM module")}((await WebAssembly.instantiate(r)).instance.exports)}(t,e),Ls=!0}catch(t){throw function(t){js=t}(t),t}}(e,t).catch(t=>{throw Ws=null,t})}return Ws}}),At({CompressionStreamFallback:Ps,DecompressionStreamFallback:_s}),At({workerURI:new URL("./zip-web-worker.js",import.meta.url).href,wasmURI:new URL("./zip-module.wasm",import.meta.url).href});const Zs="Entry filename already exists",Hs="Readable stream already consumed",qs="Invalid passThrough option (use readerOptions.passThrough or set uncompressedSize for each entry)",Ks="Invalid readerOptions (must be an object)",Ys="The last modification date of an entry encrypted with ZipCrypto cannot be changed when passThrough is set",Gs="zipjs-abort-export",Xs="The operation was aborted",Js=new Set([1,p,10,m,28789,25461,y,b,E,22613,13]);class Qs{constructor(t,e,r,n){const o=this;if(t.root&&n&&n.getChildByName(e))throw new Error(Zs);r||(r={}),Object.assign(o,{fs:t,name:e,data:r.data,options:r.options&&Object.assign({},r.options),id:t.cr++,parent:n,children:[],uncompressedSize:r.uncompressedSize||0,ur:r.ur||r.uncompressedSize===U,passThrough:r.passThrough,lr:r.lr||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.parent;if(e&&e.getChildByName(t))throw new Error(Zs);this.name=t}setOptions(t){const e=Object.assign({},this.options,t);this.options=Object.fromEntries(Object.entries(e).filter(([,t])=>t!==U))}}class $s extends Qs{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 $s(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===U||(t.constructor==xn?e.type==r:t.constructor!=bn||e.startsWith("data:"+(r||"")+";base64,"))}(t,r.data))return r.data;{const n=r.reader=cc(r.Reader,r.data,e),o=r.uncompressedSize||n.size;await Promise.all([Qn(n),Qn(t,o)]);const a=nt(e.signal),i=function(t,e,r,n){const{onstart:o,onprogress:a,onend:i}=r,{readable:s}=e;return t.data instanceof Po||!o&&!a&&!i?s:Ie(s).pipeThrough(new Ar({onstart:o,onprogress:a,onend:i,size:e.size}),{signal:n})}(r,n,e,a),s=!Jn(t)&&Boolean(e.preventClose);return r.uncompressedSize=n.size,await Ie(i).pipeTo(Ce(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(t.message==Ht)return!1;throw t}}getText(t,e){return this.getData(new Rn(t),e)}getBlob(t,e){return this.getData(new xn(t),e)}getData64URI(t,e){return this.getData(new bn(t),e)}getUint8Array(t){return this.getData(new qn,t)}getWritable(t=new WritableStream,e){return this.getData({writable:t},e)}async getArrayBuffer(t){return Dt(await this.getUint8Array(t)).buffer}replaceBlob(t){Object.assign(this,{data:t,Reader:gn,Writer:xn,reader:null})}replaceText(t){Object.assign(this,{data:t,Reader:An,Writer:Rn,reader:null})}replaceData64URI(t){Object.assign(this,{data:t,Reader:yn,Writer:bn,reader:null})}replaceUint8Array(t){Object.assign(this,{data:t,Reader:Hn,Writer:qn,reader:null})}replaceReadable(t){Object.assign(this,{data:null,Reader:ic(t),Writer:null,reader:null})}}class tc extends Qs{constructor(t,e,r,n){super(t,e,r,n),this.directory=!0}clone(t){const e=this,r=new tc(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 Sc(this,t,{options:e},!0)}addText(t,e,r={}){return Sc(this,t,{data:e,Reader:An,Writer:Rn,options:r,uncompressedSize:zn(e)})}addBlob(t,e,r={}){return Sc(this,t,{data:e,Reader:gn,Writer:xn,options:r,uncompressedSize:e.size})}addData64URI(t,e,r={}){let n=e.length;for(;"="==e.charAt(n-1);)n--;const o=e.indexOf(",")+1;return Sc(this,t,{data:e,Reader:yn,Writer:bn,options:r,uncompressedSize:Math.floor(.75*(n-o))})}addUint8Array(t,e,r={}){return Sc(this,t,{data:e,Reader:Hn,Writer:qn,options:r,uncompressedSize:e.length})}addHttpContent(t,e,r={}){return Sc(this,t,{data:e,Reader:class extends Vn{constructor(t){super(t,r)}},options:r})}addReadable(t,e,r={}){return Sc(this,t,{Reader:ic(e),options:r})}addFileSystemEntry(t,e={}){return yc(this,t,e)}addFileSystemHandle(t,e={}){return yc(this,t,e)}addFile(t,e={}){return(e=Object.assign({},e)).lastModDate||(e.lastModDate=new Date(t.lastModified)),Sc(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 gn(t),e)}importData64URI(t,e){return this.importZip(new yn(t),e)}importUint8Array(t,e){return this.importZip(new Hn(t),e)}importHttpContent(t,e){return this.importZip(new Vn(t,e),e)}importReadable(t,e){return this.importZip({readable:t},e)}exportBlob(t={}){return this.exportZip(new xn(t.mimeType||"application/zip"),t)}exportData64URI(t={}){return this.exportZip(new bn(t.mimeType||"application/zip"),t)}exportUint8Array(t={}){return this.exportZip(new qn,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,i=hc(r.readerOptions),s=new AbortController,{signal:c}=s,u=function(t,e){if(!nt(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:U,onprogress:U,onend:U,preventClose:!1}),f=nc([t],t=>ac(t,l.passThrough)),d=[];let w=!1,h=0;try{n&&await zr(n,f),await m(t,e),a&&await zr(a,h)}catch(t){try{t.exportedEntryNames=d}catch{}throw t}finally{u()}return e;function p(t){const e=t.getWriter();return new WritableStream({async write(t){await e.write(t),h+=t.length,o&&await zr(o,h,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=>!fc(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||fc(c.reason))return;throw c.reason===U?new DOMException(Xs,"AbortError"):c.reason}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:p(o)},l)}catch(t){throw w?new Error(Gs):t}d.push(e.getRelativeName(t))}}catch(r){w=!0,s.abort(new Error(Gs));try{r.entryName===U&&(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==v?(r=t,e=Object.assign({},r.options,e)):(await Qn(t),r=new fa(t,e));const n=[],o=await r.getEntries(e);for(const t of o){let r=this;try{const o=t.filename.split("/").filter(t=>""!=t&&"."!=t),a=o.pop();if(o.forEach(t=>{const e=r;if(r=r.getChildByName(t),r){if(!r.directory)throw new Error(Zs)}else r=new tc(this.fs,t,{data:null},e),n.push(r)}),t.directory){let e=r;if(a)if(e=r.getChildByName(a),e){if(!e.directory)throw new Error(Zs)}else e=new tc(this.fs,a,{data:null},r),n.push(e);e==this||e.data||(e.data=t)}else n.push(Sc(r,a,{data:t,Reader:sc(Object.assign({},e)),uncompressedSize:e.passThrough?t.compressedSize:t.uncompressedSize,passThrough:e.passThrough}))}catch(e){try{e.cause={entry:t}}catch{}throw e}}return n}async exportZip(t,e={}){const r=this;(e=Object.assign({},e)).bufferedWrite===U&&(e.bufferedWrite=!0);const[n]=await Promise.all([uc(r,hc(e.readerOptions)),Qn(t)]),o=new Ui(t,e);return await async function(t,e,r,n,o){const{onstart:a,onprogress:i,onend:s,onentryprogress:c}=n,u=e,l=nc(e.children,t=>mc(t)?0:1);let f=0,d=0;if(a&&await zr(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(mc(e))return;const{name:a,dr:s}=dc(e,u,n);let w=0;const h=await t.add(a,o.get(e),Object.assign(s,{onstart:U,onend:U,onprogress:async t=>{f+=t-w,w=t,i&&await zr(i,f,r)}}));d++,c&&await zr(c,d,l,h)}s&&await zr(s,f)}(o,r,nc([r],oc),e,n),await o.close(e.globalComment),t.getData?t.getData():t.writable}getExportedSize(r={}){const n=this;hc((r=Object.assign({},r)).readerOptions),r.bufferedWrite===U&&(r.bufferedWrite=!0);const o=!r.bufferedWrite||!1!==r.keepOrder&&n.children.every(t=>!t.children.length);return async function(r,n,o,a){const i={options:r};if(rt(r[K]))throw new Error(di);if(a!==U&&!(a instanceof Uint8Array))throw new Error(qa);const s=Ss(a);if(s>e)throw new Error(Ha);const c=r[q],u=new Map;let l=Boolean(c);const f=r[H]===U?0:r[H];let w=f,h=k;for(const t of n){let{name:e}=t;const{size:r}=t,n=Object.assign({},t.options);e=e.trim(),ss(i,n,Uo)&&!e.endsWith(R)&&(e+=R);const o=Ci(i,e,n);({name:e}=o);const{ge:a}=Ni(i,e,n);0==a.level||a.compressionMethod!==U||a.passThrough||await Sr(mt())||(a.level=0);const s=!ss(i,n,Uo);if(s&&r===U)throw new Error(di);const{Xe:l,ge:f}=Bi(i,s,r,a,n);if(s&&!a.passThrough&&hs(f.compressionMethod,f.level))throw new Error(di);const d=Object.assign({},n,o.ge,a,f,{[q]:c}),p=Pi(d),m=Li(d),y={Re:p,Oe:Ss(p.xe,m.Ae)};c&&_i(y,w);const b=s?l:0;u.set(e,Object.assign({},d,p,{offset:w,diskNumberStart:0,compressedSize:b}));const E=y.Oe+b;h=Math.min(h,E),w+=E}if(u.size&&w-h>=t&&(l=!0),l&&!o)throw new Error(di);const p=Vi(u);let m=ss(i,r,zo);if(w>=t||p>=t||u.size>=e){if(!1===m)throw new Error(ui);m=!0}return w-f+p+s+(m?98:d)}(r,n.getChildren({recursive:!0}).filter(t=>!mc(t)).map(t=>{const{name:e,dr:o}=dc(t,n,r);return{name:e,size:t.directory?0:wc(t,pc(t,r)),options:o}}),o,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 ec{constructor(){Ec(this)}get children(){return this.root.children}remove(t){lc(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=U}move(t,e){if(t==this.root)throw new Error("Root directory cannot be moved");if(!e.directory)throw new Error("Target entry is not a directory");if(e.isDescendantOf(t))throw new Error("Entry is a ancestor of target entry");if(t!=e){const r=e.getChildByName(t.name);if(r){if(r!=t)throw new Error(Zs)}else lc(t),t.parent=e,e.children.push(t),function(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)}}(this,t)}}find(t){const e=t.split("/");let r=this.root;for(let t=0;r&&t<e.length;t++)r=r.getChildByName(e[t]);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 Ec(this),this.root.importBlob(t,e)}importData64URI(t,e){return Ec(this),this.root.importData64URI(t,e)}importUint8Array(t,e){return Ec(this),this.root.importUint8Array(t,e)}importHttpContent(t,e){return Ec(this),this.root.importHttpContent(t,e)}importReadable(t,e){return Ec(this),this.root.importReadable(t,e)}importZip(t,e){return Ec(this),this.root.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 rc={FS:ec,ZipDirectoryEntry:tc,ZipFileEntry:$s};function nc(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 oc(t){return t.uncompressedSize}function ac(t,e){const{data:r}=t;return e&&r instanceof Po?r.compressedSize:t.uncompressedSize}function ic(t){let e;return function(){if(e)throw new Error(Hs);return e=!0,{readable:t}}}function sc(t){return class extends pn{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,a=await e.entry.getData(new xn,Object.assign(r,{checkPasswordOnly:!1,checkOverlappingEntry:o||n,checkOverlappingEntryOnly:!1,preventClose:!1}));e.data=a,e.wr=new gn(a),e.size=a.size,super.init()}readUint8Array(t,e){return this.wr.readUint8Array(t,e)}}}function cc(t,e,r){return t.prototype?new t(e,r):t(e,r)}async function uc(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=cc(t.Reader,t.data,e);o.set(t,r);try{await Qn(r)}catch(e){try{e.entryId=t.id,e.cause={entry:t}}catch{}throw e}r.size!==U&&(t.uncompressedSize=r.size,t.ur=!1)})),o}function lc(t){if(t.parent){const e=t.parent.children;e.forEach((r,n)=>{r.id==t.id&&e.splice(n,1)})}}function fc(t){return Boolean(t)&&t.message==Gs}function dc(t,e,n){const o=n.relativePath?t.getRelativeName(e):t.getFullname(),a=t.options||{};let i={},s={};if(t.data instanceof Po){const{externalFileAttributes:e,versionMadeBy:o,comment:c,lastModDate:u,rawLastModDate:l,creationDate:f,lastAccessDate:d,uncompressedSize:w,encrypted:h,zipCrypto:p,crc32:m,compressionMethod:y,extraFieldAES:b,internalFileAttributes:E,extraField:S,bitFlag:g,uid:x,gid:A}=t.data;i={externalFileAttributes:e,versionMadeBy:o,comment:c,lastModDate:u,creationDate:f,lastAccessDate:d,internalFileAttributes:E};const z=function(t){if(t){const e=new Map;if(t.forEach((t,r)=>{Js.has(r)||e.set(r,t.data)}),e.size)return e}}(S);if(z&&(i.extraField=z),x===U&&A===U||Object.assign(i,{uid:x,gid:A,unixExtraFieldType:"infozip"}),pc(t,n)){let t;b&&(t=b.strength),s={passThrough:!0,encrypted:h,zipCrypto:p,crc32:m,uncompressedSize:w,encryptionStrength:t,compressionMethod:y},g&&(s.dataDescriptor=g.dataDescriptor);const e=a.lastModDate===U?n.lastModDate:a.lastModDate;if(e===U)s.rawLastModDate=l;else if(p&&(!g||g.dataDescriptor)&&e 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}(e)!=(l>>>8&r))throw new Error(Ys)}}const c=Object.assign({lastModDate:t.lr},i,n,a,s,{directory:t.directory});if(!t.directory&&c.passThrough&&c.uncompressedSize===U)throw new Error(qs);return{name:o,dr:c}}function wc(t,e){const{reader:r}=t;return r&&r.size!==U?r.size:t.ur?U:ac(t,e)}function hc(t){if(t&&(typeof t!=I||Array.isArray(t)))throw new Error(Ks);return t}function pc(t,e){const{readerOptions:r}=e;return Boolean(!t.directory&&(t.passThrough||r&&r.passThrough))}function mc(t){return t.directory&&null===t.data}function yc(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 bc(n)),"file"==n.kind){const t=await n.getFile();o.push(Sc(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===U&&(t.entryName=i)}catch{}throw t}}return o}(t,e,[])}async function bc(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 bc(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 Ec(t){t.entries=[],t.cr=0,t.root=new tc(t)}function Sc(t,e,r,n){if(t.directory)return n?new tc(t.fs,e,r,t):new $s(t.fs,e,r,t);throw new Error("Parent entry is not a directory")}export{gn as BlobReader,xn as BlobWriter,yn as Data64URIReader,bn as Data64URIWriter,Xs as ERR_ABORTED,Qo as ERR_AMBIGUOUS_ARCHIVE,_o as ERR_BAD_FORMAT,Vo as ERR_CENTRAL_DIRECTORY_NOT_FOUND,Za as ERR_DUPLICATED_NAME,qo as ERR_ENCRYPTED,$o as ERR_ENCRYPTED_CENTRAL_DIRECTORY,Jo as ERR_ENTRY_DATA_OUT_OF_BOUNDS,Zs as ERR_ENTRY_EXISTS,Lo as ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND,Wo as ERR_EOCDR_NOT_FOUND,Ho as ERR_EXTRAFIELD_ZIP64_NOT_FOUND,rn as ERR_HTTP_RANGE,nn as ERR_HTTP_RESOURCE_CHANGED,Kt as ERR_INVALID_AUTHENTICATION_CODE,Ne as ERR_INVALID_CODEC_DEFINITION,Be as ERR_INVALID_CODEC_MODULE,Ha as ERR_INVALID_COMMENT,qa as ERR_INVALID_COMMENT_TYPE,Ye as ERR_INVALID_COMPRESSED_DATA,Ge as ERR_INVALID_CRC32,Ga as ERR_INVALID_DATE,Qa as ERR_INVALID_ENCRYPTION_STRENGTH,Ka as ERR_INVALID_ENTRY_COMMENT,Ya as ERR_INVALID_ENTRY_COMMENT_TYPE,Xa as ERR_INVALID_ENTRY_NAME,ei as ERR_INVALID_EXTRAFIELD,oi as ERR_INVALID_EXTRAFIELD_DATA,ni as ERR_INVALID_EXTRAFIELD_DATA_TYPE,ri as ERR_INVALID_EXTRAFIELD_TYPE,ra as ERR_INVALID_FILENAME_VALIDATION,$ as ERR_INVALID_FUNCTION_OPTION,mi as ERR_INVALID_GID,xi as ERR_INVALID_LEVEL,na as ERR_INVALID_MAX_APPENDED_DATA_SIZE,ct as ERR_INVALID_MAX_WORKERS,Si as ERR_INVALID_MSDOS_ATTRIBUTES,gi as ERR_INVALID_MSDOS_DATA,Ht as ERR_INVALID_PASSWORD,et as ERR_INVALID_PASSWORD_TYPE,qs as ERR_INVALID_PASS_THROUGH,Ks as ERR_INVALID_READER_OPTIONS,tt as ERR_INVALID_SIGNAL,qt as ERR_INVALID_SIGNATURE,Ai as ERR_INVALID_SIGNATURE_DATA,ea as ERR_INVALID_STRICTNESS,pi as ERR_INVALID_UID,Ke as ERR_INVALID_UNCOMPRESSED_SIZE,bi as ERR_INVALID_UNIX_EXTRA_FIELD_TYPE,Ei as ERR_INVALID_UNIX_ID_SIZE,yi as ERR_INVALID_UNIX_MODE,Ja as ERR_INVALID_VERSION,on as ERR_ITERATOR_COMPLETED_TOO_SOON,Zo as ERR_LOCAL_FILE_HEADER_NOT_FOUND,Xo as ERR_OVERLAPPING_ENTRY,Hs as ERR_READABLE_CONSUMED,je as ERR_RESERVED_COMPRESSION_METHOD,Go as ERR_SPLIT_ZIP_FILE,fi as ERR_UNDEFINED_COMPRESSION_METHOD,wi as ERR_UNDEFINED_READER,li as ERR_UNDEFINED_UNCOMPRESSED_SIZE,di as ERR_UNDETERMINED_SIZE,ta as ERR_UNSAFE_FILENAME,Yo as ERR_UNSUPPORTED_COMPRESSION,Ts as ERR_UNSUPPORTED_CONTEXT,Gt as ERR_UNSUPPORTED_CRYPTO_API,Ko as ERR_UNSUPPORTED_ENCRYPTION,ti as ERR_UNSUPPORTED_ENCRYPTION_PASS_THROUGH,$a as ERR_UNSUPPORTED_ENCRYPTION_USDZ,ui as ERR_UNSUPPORTED_FORMAT,oa as ERR_UNSUPPORTED_UINT64,pr as ERR_WORKER_STARTUP_TIMEOUT,an as ERR_WRITER_NOT_INITIALIZED,Ys as ERR_ZIP_CRYPTO_LAST_MOD_DATE,hi as ERR_ZIP_NOT_EMPTY,Zn as HttpRangeReader,Vn as HttpReader,pn as Reader,Kn as SplitDataReader,Yn as SplitDataWriter,An as TextReader,Rn as TextWriter,Hn as Uint8ArrayReader,qn as Uint8ArrayWriter,mn as Writer,tc as ZipDirectoryEntry,Qs as ZipEntry,ec as ZipFS,$s as ZipFileEntry,fa as ZipReader,da as ZipReaderStream,Ui as ZipWriter,ki as ZipWriterStream,Et as configure,Os as createBlobTempStream,Ds as createOPFSTempStream,vs as createSyncAccessHandleTempStream,rc as fs,As as getMimeType,Le as registerCodec,zt as resetConfiguration,Vs as terminateWorkers,Ve 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,h=56,p=39169,m=21589,y=6534,b=30837,E=30805,S=2048,g=61440,A=16384,R=2048,x=1024,D="/",z=30,F=new Date(2107,11,31,23,59,58),O=new Date(1980,0,1),U=void 0,T=1/0,I="undefined",k="function",C="object",M="string",v=new Uint8Array,N="password",_="rawPassword",B="passThrough",j="signal",P="useWebWorkers",W="useCompressionStream",L="transferStreams",Z="preventClose",V="dataDescriptor",H="offset",G="usdz",K="maxAppendedDataSize",q="signCentralDirectory",Y="filename",X="comment",J="strict",Q="balanced",$="tolerant",tt="Invalid option (must be a function)",et="Invalid signal (must be an AbortSignal instance)",rt="Invalid password (password must be a string, rawPassword must be a Uint8Array)";function nt(t){if(t&&typeof t!=k)throw new Error(tt);return t}function ot(t){if(t&&(typeof t.addEventListener!=k||"boolean"!=typeof t.aborted))throw new Error(et);return t||U}function at(t,e){if(t&&typeof t!=M||e&&!(e instanceof Uint8Array))throw new Error(rt)}function it(t,e,r){if(!Number.isInteger(t)||t<0||t>e)throw new Error(r)}function st(t,e,r){t!==U&&it(t,e,r)}function ct(t){return typeof t==M&&t.trim()?Number(t):t}const ut="Invalid maxWorkers (must be an integer greater than 0)";let lt=2;try{typeof navigator!=I&&navigator.hardwareConcurrency&&(lt=navigator.hardwareConcurrency)}catch{}const ft={workerURI:"./core/web-worker-wasm.js",wasmURI:"./core/streams/zlib-wasm/zlib-streams.wasm",chunkSize:65536,maxWorkers:lt,terminateWorkerTimeout:5e3,workerStarvationTimeout:5e3,workerStartupTimeout:5e3,useWebWorkers:!0,useCompressionStream:!0,transferStreams:!0,CompressionStream:typeof CompressionStream!=I&&CompressionStream,DecompressionStream:typeof DecompressionStream!=I&&DecompressionStream},dt="maxWorkers",wt=["chunkSize",dt,"terminateWorkerTimeout","workerStarvationTimeout","workerStartupTimeout"],ht=["createWorker","CompressionStream","DecompressionStream","CompressionStreamFallback","DecompressionStreamFallback"],pt=["baseURI","wasmURI","workerURI","useCompressionStream","useWebWorkers","transferStreams",...wt,...ht],mt={...ft};function yt(){return mt}function bt(t){return Et(t.chunkSize)}function Et(t){return t=ct(t),Number.isInteger(t)&&t>=1?Math.max(t,64):65536}function St(t){Object.assign(mt,gt(Rt(t)))}function gt(t){const e={};for(const r of pt){const n=t[r];n!==U&&(e[r]=At(r,n))}return e}function At(t,e){if(wt.includes(t)){if(e=ct(e),t==dt&&(!Number.isInteger(e)||e<1))throw new Error(ut)}else ht.includes(t)&&nt(e);return e}function Rt(t){t=t||{};const{CompressionStreamZlib:e,DecompressionStreamZlib:r}=t;if(e===U&&r===U)return t;const n=Object.assign({},t);return n.CompressionStreamFallback===U&&(n.CompressionStreamFallback=e),n.DecompressionStreamFallback===U&&(n.DecompressionStreamFallback=r),n}function xt(t){const e=gt(Rt(t));Object.assign(ft,e),Object.assign(mt,e)}function Dt(){for(const t of pt)delete mt[t];Object.assign(mt,ft)}function zt(t,e){const r=new Uint8Array(t.length+e.length);return r.set(t),r.set(e,t.length),r}function Ft(t){return t.byteOffset||t.byteLength!=t.buffer.byteLength?new Uint8Array(t):t}function Ot(t){return new DataView(t.buffer,t.byteOffset,t.byteLength)}const Ut=[[],[],[],[],[],[],[],[]];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;Ut[0][t]=e}for(let t=0;t<256;t++)for(let e=1;e<8;e++){const r=Ut[e-1][t];Ut[e][t]=r>>>8^Ut[0][255&r]}const[Tt,It,kt,Ct,Mt,vt,Nt,_t]=Ut;class Bt{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=_t[255&t]^Nt[t>>>8&255]^vt[t>>>16&255]^Mt[t>>>24&255]^Ct[255&r]^kt[r>>>8&255]^It[r>>>16&255]^Tt[r>>>24&255]}}for(;n<r;n++)e=e>>>8^Tt[255&(e^t[n])];this.o=e}get(){return~this.o}}class jt extends TransformStream{constructor(){let t;const e=new Bt;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 Pt(t){if(typeof TextEncoder==I){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 Wt={concat(t,e){if(0===t.length||0===e.length)return t.concat(e);const r=t[t.length-1],n=Wt.l(r);return 32===n?t.concat(e):Wt.h(e,n,0|r,t.slice(0,t.length-1))},bitLength(t){const e=t.length;if(0===e)return 0;const r=t[e-1];return 32*(e-1)+Wt.l(r)},m(t,e){if(32*t.length<e)return t;const r=(t=t.slice(0,Math.ceil(e/32))).length;return e&=31,r>0&&e&&(t[r-1]=Wt.S(e,t[r-1]&2147483648>>e-1,1)),t},S:(t,e,r)=>32===t?e:(r?0|e:e<<32-t)+1099511627776*t,l:t=>Math.round(t/1099511627776)||32,h(t,e,r,n){for(void 0===n&&(n=[]);e>=32;e-=32)n.push(r),r=0;if(0===e)return n.concat(t);for(let o=0;o<t.length;o++)n.push(r|t[o]>>>e),r=t[o]<<32-e;const o=t.length?t[t.length-1]:0,a=Wt.l(o);return n.push(Wt.S(e+a&31,e+a>32?r:n.pop(),1)),n}},Lt={bytes:{A(t){const e=Wt.bitLength(t)/8,r=new Uint8Array(e);let n;for(let o=0;o<e;o++)3&o||(n=t[o/4]),r[o]=n>>>24,n<<=8;return r},R(t){const e=[];let r,n=0;for(r=0;r<t.length;r++)n=n<<8|t[r],3&~r||(e.push(n),n=0);return 3&r&&e.push(Wt.S(8*(3&r),n)),e}}},Zt=class{constructor(t){const e=this;e.blockSize=512,e.D=[1732584193,4023233417,2562383102,271733878,3285377520],e.F=[1518500249,1859775393,2400959708,3395469782],t?(e.O=t.O.slice(0),e.U=t.U.slice(0),e.T=t.T):e.reset()}reset(){const t=this;return t.O=t.D.slice(0),t.U=[],t.T=0,t}update(t){const e=this;"string"==typeof t&&(t=Lt.I.R(t));const r=e.U=Wt.concat(e.U,t),n=e.T,o=e.T=n+Wt.bitLength(t);if(o>9007199254740991)throw new Error("Cannot hash more than 2^53 - 1 bits");const a=new Uint32Array(r);let i=0;for(let t=e.blockSize+n-(e.blockSize+n&e.blockSize-1);t<=o;t+=e.blockSize)e.C(a.subarray(16*i,16*(i+1))),i+=1;return r.splice(0,16*i),e}M(){const t=this;let e=t.U;const r=t.O;e=Wt.concat(e,[Wt.S(1,1)]);for(let t=e.length+2;15&t;t++)e.push(0);for(e.push(Math.floor(t.T/4294967296)),e.push(0|t.T);e.length;)t.C(e.splice(0,16));return t.reset(),r}v(t,e,r,n){return t<=19?e&r|~e&n:t<=39?e^r^n:t<=59?e&r|e&n|r&n:t<=79?e^r^n:void 0}N(t,e){return e<<t|e>>>32-t}C(t){const e=this,r=e.O,n=Array(80);for(let e=0;e<16;e++)n[e]=t[e];let o=r[0],a=r[1],i=r[2],s=r[3],c=r[4];for(let t=0;t<=79;t++){t>=16&&(n[t]=e.N(1,n[t-3]^n[t-8]^n[t-14]^n[t-16]));const r=e.N(5,o)+e.v(t,a,i,s)+c+n[t]+e.F[Math.floor(t/20)]|0;c=s,s=i,i=e.N(30,a),a=o,o=r}r[0]=r[0]+o|0,r[1]=r[1]+a|0,r[2]=r[2]+i|0,r[3]=r[3]+s|0,r[4]=r[4]+c|0}},Vt={importKey:t=>new Vt._(Lt.bytes.R(t)),B(t,e,r,n){if(r=r||1e4,n<0||r<0)throw new Error("invalid params to pbkdf2");const o=1+(n>>5)<<2;let a,i,s,c,u;const l=new ArrayBuffer(o),f=new DataView(l);let d=0;const w=Wt;for(e=Lt.bytes.R(e),u=1;d<(o||1);u++){for(a=i=t.encrypt(w.concat(e,[u])),s=1;s<r;s++)for(i=t.encrypt(i),c=0;c<i.length;c++)a[c]^=i[c];for(s=0;d<(o||1)&&s<a.length;s++)f.setInt32(d,a[s]),d+=4}return l.slice(0,n/8)},_:class{constructor(t){const e=this,r=e.j=Zt,n=[[],[]];e.P=[new r,new r];const o=e.P[0].blockSize/32;t.length>o&&(t=(new r).update(t).M());for(let e=0;e<o;e++)n[0][e]=909522486^t[e],n[1][e]=1549556828^t[e];e.P[0].update(n[0]),e.P[1].update(n[1]),e.W=new r(e.P[0])}reset(){const t=this;t.W=new t.j(t.P[0]),t.L=!1}update(t){this.L=!0,this.W.update(t)}digest(){const t=this,e=t.W.M(),r=new t.j(t.P[1]).update(e).M();return t.reset(),r}encrypt(t){if(this.L)throw new Error("encrypt on already updated hmac called!");return this.update(t),this.digest(t)}}},Ht=typeof crypto!=I&&typeof crypto.getRandomValues==k,Gt="Invalid password",Kt="Invalid signature",qt=Kt,Yt="zipjs-abort-check-password",Xt="Crypto API not supported";function Jt(t){if(Ht)return crypto.getRandomValues(t);throw new Error(Xt)}const Qt=16,$t={name:"PBKDF2"},te=Object.assign({hash:{name:"HMAC"}},$t),ee=Object.assign({iterations:1e3,hash:{name:"SHA-1"}},$t),re=["deriveBits"],ne=[8,12,16],oe=[16,24,32],ae=10,ie=[0,0,0,0],se=typeof crypto!=I,ce=se&&crypto.subtle,ue=se&&typeof ce!=I,le=Lt.bytes,fe=class{constructor(t){const e=this;e.Z=[[[],[],[],[],[]],[[],[],[],[],[]]],e.Z[0][0][0]||e.V();const r=e.Z[0][4],n=e.Z[1],o=t.length;let a,i,s,c=1;if(4!==o&&6!==o&&8!==o)throw new Error("invalid aes key size");for(e.F=[i=t.slice(0),s=[]],a=o;a<4*o+28;a++){let t=i[a-1];(a%o===0||8===o&&a%o===4)&&(t=r[t>>>24]<<24^r[t>>16&255]<<16^r[t>>8&255]<<8^r[255&t],a%o===0&&(t=t<<8^t>>>24^c<<24,c=c<<1^283*(c>>7))),i[a]=i[a-o]^t}for(let t=0;a;t++,a--){const e=i[3&t?a:a-4];s[t]=a<=4||t<4?e:n[0][r[e>>>24]]^n[1][r[e>>16&255]]^n[2][r[e>>8&255]]^n[3][r[255&e]]}}encrypt(t){return this.H(t,0)}decrypt(t){return this.H(t,1)}V(){const t=this.Z[0],e=this.Z[1],r=t[4],n=e[4],o=[],a=[];let i,s,c,u;for(let t=0;t<256;t++)a[(o[t]=t<<1^283*(t>>7))^t]=t;for(let l=i=0;!r[l];l^=s||1,i=a[i]||1){let a=i^i<<1^i<<2^i<<3^i<<4;a=a>>8^255&a^99,r[l]=a,n[a]=l,u=o[c=o[s=o[l]]];let f=16843009*u^65537*c^257*s^16843008*l,d=257*o[a]^16843008*a;for(let r=0;r<4;r++)t[r][l]=d=d<<24^d>>>8,e[r][a]=f=f<<24^f>>>8}for(let r=0;r<5;r++)t[r]=t[r].slice(0),e[r]=e[r].slice(0)}H(t,e){if(4!==t.length)throw new Error("invalid aes block size");const r=this.F[e],n=r.length/4-2,o=[0,0,0,0],a=this.Z[e],i=a[0],s=a[1],c=a[2],u=a[3],l=a[4];let f,d,w,h=t[0]^r[0],p=t[e?3:1]^r[1],m=t[2]^r[2],y=t[e?1:3]^r[3],b=4;for(let t=0;t<n;t++)f=i[h>>>24]^s[p>>16&255]^c[m>>8&255]^u[255&y]^r[b],d=i[p>>>24]^s[m>>16&255]^c[y>>8&255]^u[255&h]^r[b+1],w=i[m>>>24]^s[y>>16&255]^c[h>>8&255]^u[255&p]^r[b+2],y=i[y>>>24]^s[h>>16&255]^c[p>>8&255]^u[255&m]^r[b+3],b+=4,h=f,p=d,m=w;for(let t=0;t<4;t++)o[e?3&-t:t]=l[h>>>24]<<24^l[p>>16&255]<<16^l[m>>8&255]<<8^l[255&y]^r[b++],f=h,h=p,p=m,m=y,y=f;return o}},de=class{constructor(t,e){this.G=t,this.K=e,this.Y=e}reset(){this.Y=this.K}update(t){return this.X(this.G,t,this.Y)}J(t){if(255&~(t>>24))t+=1<<24;else{let e=t>>16&255,r=t>>8&255,n=255&t;255===e?(e=0,255===r?(r=0,255===n?n=0:++n):++r):++e,t=0,t+=e<<16,t+=r<<8,t+=n}return t}$(t){0===(t[0]=this.J(t[0]))&&(t[1]=this.J(t[1]))}X(t,e,r){let n;if(!(n=e.length))return[];const o=Wt.bitLength(e);for(let o=0;o<n;o+=4){this.$(r);const n=t.encrypt(r);e[o]^=n[0],e[o+1]^=n[1],e[o+2]^=n[2],e[o+3]^=n[3]}return Wt.m(e,o)}},we=Vt._;let he=se&&ue&&typeof ce.importKey==k,pe=se&&ue&&typeof ce.deriveBits==k;class me extends TransformStream{constructor({password:t,rawPassword:e,encryptionStrength:r,checkPasswordOnly:n,checkAuthenticationCode:o=!0}){super({start(){be(this,t,e,r)},async transform(t,e){const r=this,{password:o,strength:a,et:i,ready:s}=r;o?(await async function(t,e,r,n){const o=await Se(t,e,r,Ae(n,0,ne[e])),a=Ae(n,ne[e]);if(o[0]!=a[0]||o[1]!=a[1])throw new Error(Gt)}(r,a,o,Ae(t,0,ne[a]+2)),t=Ae(t,ne[a]+2),n?e.error(new Error(Yt)):i()):await s;const c=new Uint8Array(t.length-ae-(t.length-ae)%Qt);e.enqueue(Ee(r,t,c,0,ae,!0))},async flush(t){const{nt:e,ot:r,it:n,ready:a}=this;if(r&&e){await a;const i=Ae(n,0,n.length-ae),s=Ae(n,n.length-ae);let c=v;if(i.length){const t=xe(le,i);r.update(t);const n=e.update(t);c=Re(le,n)}const u=Ae(Re(le,r.digest()),0,ae);let l=n.length<ae?1:0;for(let t=0;t<ae;t++)l|=u[t]^s[t];if(l&&o)throw new Error(qt);t.enqueue(c)}}})}}class ye extends TransformStream{constructor({password:t,rawPassword:e,encryptionStrength:r}){super({start(){be(this,t,e,r)},async transform(t,e){const r=this,{password:n,strength:o,et:a,ready:i}=r;let s=v;n?(s=await async function(t,e,r){const n=Jt(new Uint8Array(ne[e]));return zt(n,await Se(t,e,r,n))}(r,o,n),a()):await i;const c=new Uint8Array(s.length+t.length-t.length%Qt);c.set(s,0),e.enqueue(Ee(r,t,c,s.length,0))},async flush(t){const{nt:e,ot:r,it:n,ready:o}=this;if(r&&e){await o;let a=v;if(n.length){const t=e.update(xe(le,n));r.update(t),a=Re(le,t)}const i=Re(le,r.digest()).slice(0,ae);t.enqueue(zt(a,i))}}})}}function be(t,e,r,n){Object.assign(t,{ready:new Promise(e=>t.et=e),password:ge(e,r),strength:n-1,it:v})}function Ee(t,e,r,n,o,a){const{nt:i,ot:s,it:c}=t;c.length&&(e=zt(c,e));const u=e.length-o;let l;for(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%Qt)),l=0;l<=u-Qt;l+=Qt){const t=xe(le,Ae(e,l,l+Qt));a&&s.update(t);const o=i.update(t);a||s.update(o),r.set(Re(le,o),l+n)}return t.it=Ae(e,l),r}async function Se(t,e,r,n){t.password=null;const o=await async function(t,e,r,n,o){if(!he)return Vt.importKey(e);try{return await ce.importKey("raw",e,r,!1,o)}catch{return he=!1,Vt.importKey(e)}}(0,r,te,0,re),a=await async function(t,e,r){if(!pe)return Vt.B(e,t.salt,ee.iterations,r);try{return await ce.deriveBits(t,e,r)}catch{return pe=!1,Vt.B(e,t.salt,ee.iterations,r)}}(Object.assign({salt:n},ee),o,8*(2*oe[e]+2)),i=new Uint8Array(a),s=xe(le,Ae(i,0,oe[e])),c=xe(le,Ae(i,oe[e],2*oe[e])),u=Ae(i,2*oe[e]);return Object.assign(t,{keys:{key:s,st:c,passwordVerification:u},nt:new de(new fe(s),Array.from(ie)),ot:new we(c)}),u}function ge(t,e){return e===U?Pt(t):e}function Ae(t,e,r){return t.subarray(e,r)}function Re(t,e){return t.A(e)}function xe(t,e){return t.R(e)}class De extends TransformStream{constructor({password:t,rawPassword:e,passwordVerification:r,checkPasswordOnly:n}){super({start(){Fe(this,t,e,r)},transform(t,e){const r=this;if(r.password||r.rawPassword){const e=Oe(r,t.subarray(0,12));if(r.password=r.rawPassword=null,0!=(e[11]^r.passwordVerification))throw new Error(Gt);t=t.subarray(12)}n?e.error(new Error(Yt)):e.enqueue(Oe(r,t))}})}}class ze extends TransformStream{constructor({password:t,rawPassword:e,passwordVerification:r}){super({start(){Fe(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=Jt(new Uint8Array(12));e[11]=r.passwordVerification,n=new Uint8Array(t.length+e.length),n.set(Ue(r,e),0),o=12}else n=new Uint8Array(t.length),o=0;n.set(Ue(r,t),o),e.enqueue(n)}})}}function Fe(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,ct:new Bt(n[0]),ut:new Bt(n[2])}),r)for(let e=0;e<r.length;e++)Te(t,r[e]);else for(let r=0;r<e.length;r++)Te(t,e.charCodeAt(r))}(t,e,r)}function Oe(t,e){const r=new Uint8Array(e.length);for(let n=0;n<e.length;n++)r[n]=Ie(t)^e[n],Te(t,r[n]);return r}function Ue(t,e){const r=new Uint8Array(e.length);for(let n=0;n<e.length;n++)r[n]=Ie(t)^e[n],Te(t,e[n]);return r}function Te(t,e){let[,r]=t.keys;t.ct.append([e]);const n=~t.ct.get();r=Ce(Math.imul(Ce(r+ke(n)),134775813)+1),t.ut.append([r>>>24]);const o=~t.ut.get();t.keys=[n,r,o]}function Ie(t){const e=2|t.keys[2];return ke(Math.imul(e,1^e)>>>8)}function ke(t){return 255&t}function Ce(t){return 4294967295&t}function Me(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 ve(t,e){t=Me(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 Ne(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 _e="Invalid codec definition",Be="Reserved compression method",je="Invalid codec module",Pe=[0,8,9,99],We=new Map,Le=new Map;function Ze(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!=M||!n.length)throw new Error(_e);if(Pe.includes(r))throw new Error(Be);const c=typeof a==k||typeof i==k;if(!(c||typeof o==M&&o.length))throw new Error(_e);We.set(r,{compressionMethod:r,format:n,codecURI:o,versionNeeded:s}),c&&Ke(n,{CompressionStream:a,DecompressionStream:i})}function Ve(t){const e=We.get(t);if(e){let r;We.delete(t),We.forEach(t=>r=r||t.format==e.format),r||Le.delete(e.format)}}function He(t){return We.get(t)}function Ge(t){return Le.get(t)}function Ke(t,e){const{CompressionStream:r,DecompressionStream:n}=e;if(typeof r!=k&&typeof n!=k)throw new Error(je);Le.set(t,{CompressionStream:r,DecompressionStream:n})}const qe="Invalid uncompressed size",Ye="Invalid compressed data",Xe=Kt,Je="deflate-raw",Qe="gzip",$e=[31,139,8];class tr 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}=t,w=this;let h,p,m,y=super.readable;const b=f&&Ge(f),E=c&&o&&!l&&!b&&(!a||s)&&Boolean(i&&n);if(a&&!s||!c||E||(h=new jt,y=ur(y,h)),o)if(b)y=lr(y,sr(b.CompressionStream,f,{level:u,chunkSize:e,compressionMethod:d}));else if(E)m=new er,y=lr(y,new n(Qe)),y=ur(y,m);else try{y=cr(y,i,{level:u,chunkSize:e},n,r)}catch(t){let e;try{e=new n(Qe)}catch{throw t}y=lr(y,e),y=ur(y,new er)}a&&(s?y=ur(y,new ze(t)):(p=new ye(t),y=ur(y,p))),ir(w,y,()=>{a&&!s||!c||(w.crc32=E?m.crc32:new DataView(h.value.buffer).getUint32(0))})}}class er 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=zt(r,t));const a=o-8,i=Math.min(a,r.length);n.enqueue(zt(r.subarray(0,i),t.subarray(0,a-i))),r=zt(r.subarray(i),t.subarray(a-i))},flush(){const e=Ot(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:a,checkCrc32:i,crc32:s,compressed:c,useCompressionStream:u,deflate64:l,format:f,compressionMethod:d,rawBitFlag:w,outputSize:h}=t;let p,m,y=super.readable;if(a&&(o?y=ur(y,new De(t)):(m=new me(t),y=ur(y,m))),c){const t=f&&Ge(f);if(t)y=lr(y,sr(t.DecompressionStream,f,{chunkSize:e,compressionMethod:d,rawBitFlag:w,uncompressedSize:h}));else try{y=cr(y,u,{chunkSize:e,deflate64:l},n,r)}catch(t){if(l||h===U)throw t;let e;try{e=new n(Qe)}catch{throw t}y=function(t,e,r){const n=new Bt;let o,a,i,s=0,c=!1;const u=new Promise((t,e)=>{a=t,i=e});u.catch(()=>{}),r||a();const l=new TransformStream({start(t){const e=new Uint8Array(10);e.set($e),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=Ot(e);o.setUint32(0,n.get(),!0),o.setUint32(4,r,!0),t.enqueue(e)},cancel(t){i(t)}}),f=new TransformStream({transform(t,e){n.append(t),s+=t.length,s>=r?a():c&&d(),e.enqueue(t)},cancel(t){i(t)}});return t=ur(t,l),ur(t=lr(t,e),f);function d(){w(),o=setTimeout(()=>i(new Error(qe)),5e3)}function w(){clearTimeout(o)}}(y,e,h)}y=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(Ye);throw e.cause=t,e}const{value:n,done:o}=r;o?t.close():t.enqueue(n)},cancel:t=>e.cancel(t)})}(y)}i&&(p=new jt,y=ur(y,p)),ir(this,y,()=>{if(i){const t=new DataView(p.value.buffer);if(s!=t.getUint32(0,!1))throw new Error(Xe)}})}}const nr=new Map;function or(t,e){if(!t)return!1;let r=nr.get(t);r||(r=new Map,nr.set(t,r));let n=r.get(e);if(n===U){try{new t(e),n=!0}catch{n=!1}r.set(e,n)}return n}function ar(t){return or(t,Je)}function ir(t,e,r){e=ur(e,new TransformStream({flush:r})),Object.defineProperty(t,"readable",{get:()=>e})}function sr(t,e,r){if(!t)throw new Error("Compression method not supported");return new t(e,r)}function cr(t,e,r,n,o){const a=e&&n?n:o||n,i=r.deflate64?"deflate64-raw":Je;let s;try{s=new a(i,r)}catch(t){if(!e||!o||a==o)throw t;s=new o(i,r)}return lr(t,s)}function ur(t,e){return Me(t).pipeThrough(e)}function lr(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 fr="data",dr="deflate",wr="inflate";class hr extends TransformStream{constructor(t,e){super({});const r=this,{codecType:n}=t;let o;n.startsWith(dr)?o=tr:n.startsWith(wr)&&(o=rr),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!==U&&r.outputSize>t.outputSize))throw new Error(qe)},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 pr extends TransformStream{constructor(t){const e=[];let r=0;function n(){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(o,a){for(e.push(o),r+=o.length;r>t;)a.enqueue(n())},flush(t){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))}})}}const mr="Worker startup timeout";let yr,br,Er,Sr=()=>{};async function gr(t){const{CompressionStream:e,CompressionStreamFallback:r}=t;if(r&&!r.lt)return!0;if(ar(e)||or(e,Qe))return!0;if(r)try{return await Sr(t),!0}catch{return!1}return!1}function Ar(t){t.createWorker?br=!0:yr=!1}class Rr{constructor(t,{readable:e,writable:r},{options:n,config:o,ft:a,useWebWorkers:i,transferStreams:s,workerURI:c,createWorker:u},l){const{signal:f}=a;return br&&(u=U),Object.assign(t,{wt:!0,ht:(t.ht||0)+1,readable:e.pipeThrough(new pr(bt(o))).pipeThrough(new xr(a),{signal:f}),writable:r,options:Object.assign({},n),workerURI:c,createWorker:u,transferStreams:s,terminate:()=>new Promise(e=>{const{yt:r,wt:n}=t;r?(n?t.bt=e:(r.terminate(),e()),t.Et=null):e()}),St(){if(t.wt){const{bt:e}=t;e&&(t.bt=null,t.gt=!0,t.yt.terminate(),e()),t.wt=!1,l(t)}}}),yr===U&&(yr=typeof Worker!=I),(i&&Er&&(yr&&c||u)?Er:zr)(t,o)}}class xr extends TransformStream{constructor({onstart:t,onprogress:e,size:r,onend:n}){let o=0;super({async start(){t&&await Dr(t,r)},async transform(t,n){o+=t.length,e&&await Dr(e,o,r),n.enqueue(t)},async flush(){n&&await Dr(n,o)}})}}async function Dr(t,...e){try{await t(...e)}catch{}}function zr(t,e){return{run:()=>Fr(t,e)}}async function Fr({options:t,readable:e,writable:r,St:n},o){let a;try{if(t.compressed&&!t.format){const e=t.codecType.startsWith(dr),r=e?o.CompressionStreamFallback:o.DecompressionStreamFallback,n=e?o.CompressionStream:o.DecompressionStream;if(t.useCompressionStream){if(r&&r.lt&&!ar(n))try{await Sr(o)}catch{}}else try{await Sr(o)}catch{r&&!r.lt||(t.useCompressionStream=!0)}}a=new hr(t,o),await e.pipeThrough(a).pipeThrough(new pr(bt(o))).pipeTo(r,{preventClose:!0,preventAbort:!0});const{crc32:n,inputSize:i,outputSize:s}=a;return{crc32:n,inputSize:i,outputSize:s}}catch(t){throw a&&(t.outputSize=a.outputSize),t}finally{n()}}const Or={type:"module"},Ur="error";let Tr,Ir,kr,Cr=!0;try{Cr=typeof structuredClone==k&&structuredClone(new DOMException("","AbortError")).code!==U}catch{}var Mr;function vr(t){const{reader:e}=t;e&&e.releaseLock(),t.reader=null,t.writer=null}function Nr(t){const{yt:e}=t;if(e)try{e.terminate()}catch{}t.Et=null}function _r(t,e,r,n,o=!0){const{createWorker:a}=r;let i,s,c;if(a)i=a();else if(Ir===U||Tr!==t){const a=typeof t==k;s=a?t(o):t;const u=s.startsWith("data:"),l=s.startsWith("blob:");if(u||l){n===U&&(n=!1),n&&(c=Or);try{i=new Worker(s,c)}catch(o){if(l)try{URL.revokeObjectURL(s)}catch{}if(a&&l)return _r(t,e,r,n,!1);if(n)throw o;return _r(t,e,r,!0,!1)}}else{n===U&&(n=!0),n&&(c=Or);try{s=new URL(s,e)}catch{}try{i=new Worker(s,c)}catch(a){if(n)return _r(t,e,r,!1,o);throw a}}Tr=t,Ir=s,kr=c}else i=new Worker(Ir,kr);return i.addEventListener("message",t=>{r.At=!0,Br(r),async function({data:t},e){const{type:r,value:n,messageId:o,result:a,error:i}=t,{reader:s,writer:c,Rt:u,xt:l,St:f,ht:d}=e,w=()=>e.ht!=d;try{if(i){const{message:t,stack:e,code:r,name:n,outputSize:o,cause:a,codecImportFailed:s}=i,c=new Error(t);Object.assign(c,{stack:e,code:r,name:n,outputSize:o}),a&&(c.cause=Object.assign(new Error(a.message),{name:a.name})),s&&(c.codecImportFailed=!0),h(c)}else{if("pull"==r){const{value:t,done:r}=await s.read();w()||Pr({type:fr,value:t,done:r,messageId:o},e)}r==fr&&(await c.ready,await c.write(new Uint8Array(n)),w()||Pr({type:"ack",messageId:o},e)),"close"==r&&h(null,a)}}catch(i){w()||(Nr(e),h(i))}function h(t,e){w()||(t?l(t):u(e),c&&c.releaseLock(),t&&t.codecImportFailed||f())}}(t,r)}),i.addEventListener(Ur,t=>jr(t,r)),i.addEventListener("messageerror",t=>jr(t,r)),i}function Br(t){const{Dt:e}=t;e&&(clearTimeout(e),t.Dt=null)}function jr(t,e){t.preventDefault&&t.preventDefault(),Br(e);const{At:r,xt:n,writer:o,St:a}=e;Nr(e),r||(e.yt=null);let i=t.error||new Error(t.message||Ur);r||(i=Object.assign(new Error(i.message||Ur),{zt:!0}),e.Ft=i),n&&(n(i),o&&o.releaseLock(),r&&a())}function Pr(t,{yt:e,writer:r,transferStreams:n,At:o}){try{const{value:r,readable:a,writable:i}=t,s=[];if(r&&(t.value=Ft(r),s.push(t.value.buffer)),n&&Cr&&o?(a&&s.push(a),i&&s.push(i)):t.readable=t.writable=null,s.length)try{return e.postMessage(t,s),!0}catch{Cr=!1,t.readable=t.writable=null,e.postMessage(t)}else e.postMessage(t)}catch(t){throw r&&r.releaseLock(),t}}Mr=function(t,e){const{baseURI:r,chunkSize:n,workerStartupTimeout:o}=e;let{wasmURI:a}=e;if(!t.Et){let i;typeof a==k&&(a=a());try{i=_r(t.workerURI,r,t)}catch{return Ar(t),zr(t,e)}Object.assign(t,{yt:i,At:!1,gt:!1,Ft:null,Et:{run:async()=>{try{return await async function(t,e){if(!t.yt){const{Ft:e}=t;t.Ft=null;const r=e||new Error(mr);throw r.zt=!0,r}let r,n;const o=new Promise((t,e)=>{r=t,n=e});Object.assign(t,{reader:null,writer:null,Rt:r,xt:n,result:o});const{readable:a,options:i}=t,{writable:s,closed:c,Ot:u}=function(t){const e=new AbortController,{writable:r,readable:n}=new TransformStream,o=n.pipeTo(t,{preventClose:!0,preventAbort:!0,signal:e.signal});return o.catch(()=>{}),{writable:r,closed:o,Ot:()=>e.abort()}}(t.writable);let l;try{l=Pr({type:"start",options:i,config:e,readable:a,writable:s},t)}catch(e){u();try{await c}catch{}throw t.St(),e}l||Object.assign(t,{reader:a.getReader(),writer:s.getWriter()});const{workerStartupTimeout:f}=e;!t.At&&Number.isFinite(f)&&f>=0&&(t.Dt=setTimeout(()=>function(t){if(t.Dt=null,t.At)return;const{xt:e,writer:r}=t;if(Nr(t),t.yt=null,e){const t=new Error(mr);t.zt=!0,e(t),r&&r.releaseLock()}}(t),f));try{const t=await o;return await d(),await c,t}catch(t){await d(),u();try{await c}catch{}throw t}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.zt)return Ar(t),vr(t),Fr(t,e);if(r&&r.codecImportFailed){if(t.reader)return vr(t),Fr(t,e);t.St()}throw r}}}})}return t.Et},Er=Mr;let Wr=[];const Lr=[];let Zr,Vr,Hr=0;async function Gr(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:h,maxWorkers:p}=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){!Le.has(t)&&e&&Ke(t,await(import(/* webpackIgnore: true */ /* @vite-ignore */e)))}(f,r.codecURI)),e.transferStreams=!f&&(o||o===U&&n.transferStreams);const m=!(s||c||u||l),y=f===U||Boolean(r.codecURI);return e.useWebWorkers=!m&&y&&(a||a===U&&n.useWebWorkers),e.workerURI=e.useWebWorkers&&w?w:U,e.createWorker=e.useWebWorkers&&h?h:U,r.useCompressionStream=i||i===U&&n.useCompressionStream,(await async function(){const r=Wr.find(t=>!t.wt);if(r)return Jr(r),new Rr(r,t,e,b);if(Wr.length<p){const r={Ut:Hr};return Hr++,Wr.push(r),new Rr(r,t,e,b)}return new Promise(r=>{Lr.push({resolve:r,stream:t,Tt:e}),Vr=n.workerStarvationTimeout,Kr()})}()).run();function b(t){if(qr(),Lr.length){const[{resolve:e,stream:r,Tt:n}]=Lr.splice(0,1);e(new Rr(t,r,n,b)),Kr()}else t.yt?(Jr(t),function(t,e){const{config:r}=e,{terminateWorkerTimeout:n}=r;Number.isFinite(n)&&n>=0&&(t.gt?t.gt=!1:t.It=setTimeout(async()=>{Wr=Wr.filter(e=>e!=t);try{await t.terminate()}catch{}},n))}(t,e)):Wr=Wr.filter(e=>e!=t)}}function Kr(){!Zr&&Lr.length&&Number.isFinite(Vr)&&Vr>=0&&(Zr=setTimeout(Yr,Vr))}function qr(){Zr&&(clearTimeout(Zr),Zr=null)}function Yr(){if(Zr=null,Lr.length){const[{resolve:t,stream:e,Tt:r}]=Lr.splice(0,1),n=Object.assign({},r,{useWebWorkers:!1,workerURI:U,createWorker:U});t(new Rr({},e,n,Xr)),Kr()}}function Xr(){qr(),Kr()}function Jr(t){const{It:e}=t;e&&(clearTimeout(e),t.It=null)}const Qr="\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ ".split(""),$r=256==Qr.length;function tn(t,e){return en(t,e,!0)}function en(t,e,r){return e&&"cp437"==e.trim().toLowerCase()?function(t){if($r){let e="";for(let r=0;r<t.length;r++)e+=Qr[t[r]];return e}return(new TextDecoder).decode(t)}(t):new TextDecoder(e,{ignoreBOM:r}).decode(t)}const rn="HTTP error ",nn="HTTP Range not supported",on="HTTP resource changed",an="Writer iterator completed too soon",sn="Writer not initialized",cn="Content-Range",un="Range",ln="GET",fn="bytes",dn=16777216,wn="writable",hn=Symbol();class pn{constructor(){this.size=0}init(){this.initialized=!0}}class mn extends pn{get readable(){return this.createReadable()}createReadable({offset:t=0,size:e,chunkSize:r=bt(yt())}={}){const n=this;let o=0;return r=Et(r),new ReadableStream({async pull(a){const i=e===U?r:Math.min(r,e-o),s=await eo(n,t+o,i);s.length&&a.enqueue(s),o+r>=e||!s.length&&i?a.close():o+=r}})}}class yn extends pn{constructor(){super();const t=this,e=new WritableStream({write(e){if(!t.initialized)throw new Error(sn);return t.writeUint8Array(Ft(e))}});Object.defineProperty(t,wn,{get:()=>e})}writeUint8Array(){}}class bn extends mn{constructor(t){super();let e=t.length;for(;"="==t.charAt(e-1);)e--;const r=t.indexOf(",")+1;Object.assign(this,{kt:t,Ct:r,size:Math.floor(.75*(e-r))})}readUint8Array(t,e){const{Ct:r,kt: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 En extends yn{constructor(t){super(),Object.assign(this,{contentType:t,data:"data:"+(t||"")+";base64,",Mt:""})}writeUint8Array(t){const e=this;let r,n=e.Mt;const o=e.Mt.length;for(e.Mt="",r=0;r<3*Math.floor((o+t.length)/3)-o;r++)n+=String.fromCharCode(t[r]);for(;r<t.length;r++)e.Mt+=String.fromCharCode(t[r]);n.length>2?e.data+=btoa(n):e.Mt=n+e.Mt}getData(){return this.data+btoa(this.Mt)}}let Sn,gn;class An extends mn{constructor(t){super(),Object.assign(this,{vt: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();Sn=1==e}catch{Sn=!1}})())}createReadable(t){const{vt:e,size:r}=this,{offset:n=0,size:o=r-n}=t||{};return!n&&o>=r?Me(e.stream()):Sn?Me(e.slice(n,n+o).stream()):super.createReadable(t)}async readUint8Array(t,e){const r=this,n=t+e,o=!t&&n>=r.size?r.vt:r.vt.slice(t,n);let a=await o.arrayBuffer();return a.byteLength>e&&(a=a.slice(t,n)),new Uint8Array(a)}}class Rn extends pn{constructor(t){super();const e=this,r=new TransformStream;Object.defineProperty(e,wn,{get:()=>r.writable}),e.contentType=t,e.Nt=ve(r.readable,t),e.Nt.catch(()=>{})}getData(){return this.Nt}}class xn extends An{constructor(t){super(new Blob([t],{type:"text/plain"}))}}function Dn(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 zn extends Rn{constructor(t){super(),Object.assign(this,{encoding:t,_t:!t||"utf-8"==t.toLowerCase()})}async getData(){const{encoding:t,_t:e}=this,r=await super.getData();return r.text&&e?r.text():function(t,e){return en(t,e,!1)}(new Uint8Array(await r.arrayBuffer()),t)}}class Fn extends mn{constructor(t,e){super(),Un(this,t,e)}async init(){await Tn(this,Ln,Bn),super.init()}createReadable(t){const e=this,{useRangeHeader:r,forceRangeRequests:n,size:o}=e;if((r||n)&&o!==U){const{offset:r=0,size:n=o-r}=t||{};if(n>0&&r<o)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(nn);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=U,await t.cancel()}(),i||t.close())},cancel:t=>n&&n.cancel(t)});async function s(){const e=Math.min(t.maximumRangeSize,i),r=await Ln(ln,t,Nn(t,o,e));if(206!=r.status)throw new Error(nn);const s=r.headers.get(cn);if(s){const t=Number(s.trim().split(/[\s-]+/)[1]);if(!Number.isNaN(t)&&t!=o)throw new Error(nn)}vn(t,r),Mn(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 In(this,t,e,Ln,Bn)}}class On extends mn{constructor(t,e){super(),Un(this,t,e)}async init(){await Tn(this,Zn,jn),super.init()}readUint8Array(t,e){return In(this,t,e,Zn,jn)}}function Un(t,e,r){const{preventHeadRequest:n,useRangeHeader:o,forceRangeRequests:a,combineSizeEocd:i,checkResourceChanges:s=!0,maximumRangeSize:c=dn,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 Tn(t,e,r){const{url:n,preventHeadRequest:o,useRangeHeader:a,forceRangeRequests:i,combineSizeEocd:s}=t;if(function(t){const{baseURI:e}=yt(),{protocol:r}=new URL(t,e);return"http:"==r||"https:"==r}(n)&&(a||i)&&(typeof o==I||o)){const n=await e(ln,t,Nn(t,s?-22:void 0)),o=n.headers.get("Accept-Ranges");if(!(i||o&&o.toLowerCase()==fn))throw new Error(nn);{if(s){const e=new Uint8Array(await n.arrayBuffer());206==n.status&&e.length==d&&(t.Bt=e)}Mn(t,n);const o=kn(n);o===U?await Wn(t,e,r):t.size=o}}else await Wn(t,e,r)}async function In(t,e,r,n,o){const{useRangeHeader:a,forceRangeRequests:i,Bt:s,size:c,options:u}=t;if(a||i){if(s&&e==c-d&&r==d)return s;if(e>=c||0===r)return v;{e+r>c&&(r=c-e);const o=await n(ln,t,Nn(t,e,r));if(206!=o.status)throw new Error(nn);const a=o.headers.get(cn);if(a){const t=Number(a.trim().split(/[\s-]+/)[1]);if(!Number.isNaN(t)&&t!=e)throw new Error(nn)}vn(t,o),Mn(t,o);const i=new Uint8Array(await o.arrayBuffer());if(i.length!=r)throw new Error(nn);return i}}{const{data:n}=t;return n||await o(t,u),t.data.subarray(e,e+r)}}function kn(t){const e=t.headers.get(cn);if(e){const t=e.trim().split(/\s*\/\s*/)[1];if(t&&"*"!=t){const e=Number(t);if(!Number.isNaN(e))return e}}}function Cn({headers:t}){return{jt:t.get("Etag")||U,lastModified:t.get("Last-Modified")||U}}function Mn(t,e){const{checkResourceChanges:r,Pt:n}=t;r&&!n&&206==e.status&&(t.Pt=Cn(e))}function vn(t,e){const{checkResourceChanges:r,Pt:n,size:o}=t;if(r){const t=kn(e);if(t!==U&&o!==U&&t!=o)throw new Error(on);if(n){const t=Cn(e);if(Object.entries(n).some(([e,r])=>r!==U&&t[e]!==U&&r!=t[e]))throw new Error(on)}}}function Nn(t,e=0,r=1){return Object.assign({},_n(t),{[un]:fn+"="+(e<0?e:e+"-"+(e+r-1))})}function _n({options:t}){const{headers:e}=t;if(e)return Symbol.iterator in e?Object.fromEntries(e):e}async function Bn(t){await Pn(t,Ln)}async function jn(t){await Pn(t,Zn)}async function Pn(t,e){const r=await e(ln,t,_n(t));t.data=new Uint8Array(await r.arrayBuffer()),t.size=t.data.length}async function Wn(t,e,r){if(t.preventHeadRequest)await r(t,t.options);else{const n=await e("HEAD",t,_n(t)),o=n.headers.get("Content-Length");o&&!n.headers.get("Content-Encoding")?t.size=Number(o):await r(t,t.options)}}async function Ln(t,{fetch:e=fetch,options:r,url:n},o){const a=await e(n,Object.assign({},r,{method:t,headers:o}));if(a.status<400)return a;throw 416==a.status?new Error(nn):new Error(rn+(a.statusText||a.status))}function Zn(t,{url:e},r){return new Promise((n,o)=>{const a=new XMLHttpRequest;if(a.addEventListener("load",()=>{if(a.status<400){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(nn):new Error(rn+(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 Vn extends mn{constructor(t,e={}){super(),Object.assign(this,{url:t,reader:e.useXHR&&!e.fetch?new On(t,e):new Fn(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 Hn extends Vn{constructor(t,e={}){super(t,Object.assign({},e,{useRangeHeader:!0}))}}class Gn extends mn{constructor(t){super(),t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength),Object.assign(this,{Wt:t,size:t.length})}readUint8Array(t,e){return this.Wt.slice(t,t+e)}}class Kn extends yn{constructor(t){super(),this.Lt=t||262144}init(t=0){Object.assign(this,{offset:0,Wt:new Uint8Array(t>0?t:this.Lt)}),super.init()}writeUint8Array(t){const e=this,r=e.offset+t.length;if(r>e.Wt.length){let t=e.Wt.length?2*e.Wt.length:e.Lt;for(;t<r;)t*=2;const n=e.Wt;e.Wt=new Uint8Array(t),e.Wt.set(n)}e.Wt.set(t,e.offset),e.offset+=t.length}getData(){return this.offset===this.Wt.length?this.Wt:this.Wt.slice(0,this.offset)}}class qn extends mn{constructor(t){super(),this.Zt=t}async init(){const t=this;t.Vt=0;const e=t.Zt=await Promise.all(t.Zt.map(to));t.Ht=e.map(e=>{const r=t.size;return t.size+=e.size,r}),super.init()}Gt(t){const{Ht:e,size:r}=this,n=e[t];return n===U?r:n}async readUint8Array(t,e){const r=this,{Zt: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 eo(s,i,e);else{const a=n-i;o=zt(await eo(s,i,a),await r.readUint8Array(t+a,e-a))}}else o=v;return r.Vt=Math.max(a,r.Vt),o}}class Yn extends pn{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===hn)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(an);n=i,n.size=0,n.maxSize&&(r.maxSize=n.maxSize),r.availableSize=r.maxSize,await $n(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(hn)}finally{t.releaseLock()}}}class Xn{constructor(t){return Array.isArray(t)&&(t=new qn(t)),(t instanceof ReadableStream||typeof t.getReader==k)&&(t={readable:Me(t)}),t}}class Jn{constructor(t){return t.writable===U&&typeof t.next==k&&(t=new Yn(t)),(t instanceof WritableStream||typeof t.getWriter==k)&&(t={writable:Ne(t)}),t.size===U&&(t.size=0),t}}function Qn(t){return Boolean(t&&t.getData)}async function $n(t,e){if(!t.init||t.initialized)return Promise.resolve();await t.init(e)}async function to(t){return t=new Xn(t),await $n(t),t.size!==U&&t.readUint8Array||(t=new An(await ve(t.readable)),await $n(t)),t}function eo(t,e,r){return t.readUint8Array(e,r)}function ro(t,e){return t.createReadable?t.createReadable(e):t.readUint8Array?mn.prototype.createReadable.call(t,e):t.readable}const no="filename",oo="rawFilename",ao="comment",io="rawComment",so="uncompressedSize",co="compressedSize",uo="offset",lo="diskNumberStart",fo="lastModDate",wo="rawLastModDate",ho="lastAccessDate",po="rawLastAccessDate",mo="creationDate",yo="rawCreationDate",bo="internalFileAttributes",Eo="externalFileAttributes",So="internalFileAttribute",go="externalFileAttribute",Ao="msdosAttributesRaw",Ro="msdosAttributes",xo="msDosCompatible",Do="zip64",zo="encrypted",Fo="version",Oo="versionMadeBy",Uo="zipCrypto",To="directory",Io="executable",ko="compressionMethod",Co="signature",Mo="extraField",vo="unixMode",No="setuid",_o="setgid",Bo="sticky",jo=[no,oo,so,co,fo,wo,ao,io,ho,po,mo,yo,uo,lo,bo,Eo,So,go,Ao,Ro,xo,Do,zo,Fo,Oo,Uo,To,Io,"symlink",ko,Co,"crc32",Mo,"extraFieldUnix","extraFieldInfoZip","extraFieldUnixType1","extraFieldPkwareUnix","uid","gid",vo,"unixExternalUpper",No,_o,Bo,"bitFlag","rawBitFlag","filenameLength","extraFieldLength","filenameUTF8","commentUTF8","rawExtraField","extraFieldZip64","extraFieldUnicodePath","extraFieldUnicodeComment","extraFieldAES","extraFieldNTFS","extraFieldExtendedTimestamp","extraFieldUSDZ"];class Po{constructor(t){jo.forEach(e=>this[e]=t[e])}}const Wo="File format is not recognized",Lo="End of central directory not found",Zo="End of Zip64 central directory locator not found",Vo="Central directory header not found",Ho="Local file header not found",Go="Zip64 extra field not found",Ko="File contains encrypted entry",qo="Encryption method not supported",Yo="Compression method not supported",Xo="Split zip file",Jo="Overlapping entry found",Qo="Entry data out of bounds",$o="Ambiguous archive",ta="Encrypted central directory is not supported",ea="Unsafe filename",ra="Invalid strictness (must be 'strict', 'balanced' or 'tolerant')",na="Invalid filenameValidation (must be 'strict', 'balanced' or 'tolerant')",oa="Invalid maxAppendedDataSize (must be a number greater than or equal to 0)",aa="64-bit value exceeds Number.MAX_SAFE_INTEGER",ia="unsorted central directory",sa="unknown version needed to extract",ca="compressed patched data",ua="malformed extra field",la="unknown zip64 extensible data",fa="wrapped entries count",da="appended data",wa="prepended data",ha="trailing central directory data",pa="duplicate filename",ma="mismatched zip64 end of central directory record",ya="mismatched local file header (general purpose bit flag)",ba="mismatched local file header (compression method)",Ea="mismatched local file header (crc32 or sizes)",Sa=/^[a-zA-Z]:/,ga="utf-8",Aa="cp437",Ra=[[so,t],[co,t],[uo,t],[lo,e]],xa={[e]:{Kt:si,bytes:4},[t]:{Kt:ci,bytes:8}},Da=BigInt(Number.MAX_SAFE_INTEGER);class za{constructor(t,e={}){Object.assign(this,{reader:new Xn(t),options:e,qt:new Map})}async*getEntriesGenerator(n={}){const a=this;let{reader:i}=a;if(await $n(i),i.size!==U&&i.readUint8Array||(i=new An(await ve(i.readable)),await $n(i)),i.size<d)throw new Error(Wo);const c=a.warnings=[],p=Za(n,a.options),m=p==J,y=p!=$,b=Ga(ei(a,n,K),p),E=function(t,e){if(t===U)return e;if(!La(t))throw new Error(na);return t}(ei(a,n,"filenameValidation"),p),S=ei(a,n,"normalizeFilename"),{Yt:z,Xt:F}=await Ka(i,y,b);if(!z)throw await async function(t){return await Wa(t)==o}(i)?new Error(Xo):new Error(Lo);y&&F>1&&ti("multiple end of central directory records");const O=Ot(z);let T=si(O,12),I=si(O,16);const k=z.offset,C=ii(O,20),M=k+d+C,N=i.size-M;N>b&&ti(da),N>0&&$a(c,da);let _=ii(O,4);const B=i.Vt||0;let j,P,W,L,Z=ii(O,6),V=ii(O,10),H=0,G=h;const q=I==t||T==t||V==e||Z==e;if(I!=t&&Z!=e&&(I+=Pa(i,Z)),q){const r=z.offset>=w?await eo(i,z.offset-w,w):v,n=Ot(r);if(r.length==w&&si(n,0)==l){I=Pa(i,si(n,4))+ci(n,8);let r=await eo(i,I,h),o=Ot(r);const a=z.offset-w-h;if((r.length<h||si(o,0)!=u)&&I!=a&&a>=0){const t=I;I=a,I>t&&(H=I-t),r=await eo(i,I,h),o=Ot(r)}if(r.length<h||si(o,0)!=u)throw new Error(Zo);if(P=!0,W=ci(o,4)>44,W){const t=Math.min(ci(o,4)-44,i.size-I-h);t>0&&(G+=t,L=function(t){const e={rawExtensibleData:t};if(t.length>=28){const r=Ot(t),n=ii(r,26);Object.assign(e,{compressionMethod:ii(r,0),compressedSize:ci(r,2),uncompressedSize:ci(r,10),encryptionAlgorithm:ii(r,18),bitLength:ii(r,20),flags:ii(r,22),hashAlgorithm:ii(r,24),hashData:t.subarray(28,28+n)})}return e}(await eo(i,I+h,t)))}_==e?_=si(o,16):_!=si(o,16)&&Qa(m,c,ma),Z==e?Z=si(o,20):Z!=si(o,20)&&Qa(m,c,ma),V==e?V=ci(o,32):V!=ci(o,32)&&Qa(m,c,ma),T==t?T=ci(o,40):T!=ci(o,40)&&Qa(m,c,ma),I=Pa(i,Z)+ci(o,48)+H}}let Q=T;const tt=z.offset-(P?G+w:0);if(I>=i.size&&(H=i.size-I-T-d,I=i.size-T-d),B!=_)throw new Error(Xo);if(I<0)throw new Error(Wo);let et=0,rt=await eo(i,I,T),nt=Ot(rt);if(T){if(rt.length<4)throw new Error(Wo);const t=tt-T;if(I!=t&&Z==_){let e=!(si(nt,et)==s||Boolean(L&&L.compressedSize)||Ta(nt));if(!e&&t>=0&&t+4<=i.size&&(e=si(Ot(await eo(i,t,4)),0)==s),e){const e=I;I=t,I>e&&(H+=I-e),rt=await eo(i,I,T),nt=Ot(rt)}}}const ot=tt-I;if(T!=ot&&ot>=0&&Z==_&&(T=ot,rt=await eo(i,I,T),nt=Ot(rt)),I<0||I>=i.size)throw new Error(Wo);a.directoryOffset=I,a.directoryLength=Q;const at=ri(a,n,"decryptCentralDirectory");let it,st;if(at&&V&&rt.length>=4&&si(nt,0)!=s&&(W||Ta(nt))){const t=function(t,e,r){const n=t&&t.compressedSize?t.compressedSize:e;return n>0&&n<=r?n:r}(L,Q,rt.length);st=rt.subarray(t),rt=await at(rt.subarray(0,t),L),nt=Ot(rt),Q=rt.length,it=!0}L&&!it&&(rt.length<4||si(nt,0)==s)&&$a(c,la),j=I;const ct=ei(a,n,"filenameEncoding"),ut=ei(a,n,"commentEncoding"),lt=new Set;let ft,dt=-1;const wt=!m&&!P;!V&&wt&&(V=Ia(nt,rt,et),V&&$a(c,fa));for(let t=0;t<V;t++){const o=new Ua(i,a.options);if(et+f>rt.length||si(nt,et)!=s){if(0==t&&!it&&(W||Ta(nt)))throw new Error(ta);throw new Error(Vo)}Ca(o,nt,et+6);const u=Boolean(o.bitFlag.languageEncodingFlag),l=et+f,d=l+o.filenameLength,w=d+o.extraFieldLength,h=ii(nt,et+4),p=!(h>>8),m=h>>8==3,y=rt.subarray(l,d),b=ii(nt,et+32),z=w+b,F=rt.subarray(w,z),O=u,T=u,I=si(nt,et+38),k=I&r,C={readOnly:Boolean(1&k),hidden:Boolean(2&k),system:Boolean(4&k),directory:Boolean(16&k),archive:Boolean(32&k)},M=si(nt,et+42),v=ri(a,n,"decodeText")||tn,N=O?ga:ct||Aa,_=T?ga:ut||Aa;let B=v(y,N,Y);if(B===U&&(B=tn(y,N)),S){const t=S(B);t!==U&&(B=t)}if(Ha(B,E)){const t=new Error(ea);throw t.filename=B,t}let P=v(F,_,X);P===U&&(P=tn(F,_)),Object.assign(o,{index:t,Jt:it,versionMadeBy:h,msDosCompatible:p,zip64:!1,compressedSize:0,uncompressedSize:0,Qt:b,offset:M,diskNumberStart:ii(nt,et+34),internalFileAttributes:ii(nt,et+36),externalFileAttributes:I,msdosAttributesRaw:k,msdosAttributes:C,rawFilename:y,filenameUTF8:O,commentUTF8:T,rawExtraField:rt.subarray(d,w),rawComment:F,filename:B,comment:P}),Ma(o,o,nt,et+6)&&$a(c,ua,B),o.offset+=H;const L=Pa(i,o.diskNumberStart)+o.offset;j=Math.min(L,j),L<dt&&$a(c,ia,B),dt=L,(o.version&r)>63&&$a(c,sa,B),32&~o.rawBitFlag||$a(c,ca,B),lt.has(o.filename)&&(ft=!0),lt.add(o.filename);const Z=o.externalFileAttributes>>16&e;o.unixMode===U&&16877&Z&&(o.unixMode=Z);const G=Boolean(o.unixMode&R),K=Boolean(o.unixMode&x),q=Boolean(512&o.unixMode),J=40960==((o.unixMode===U?Z:o.unixMode)&g),Q=!J&&(o.unixMode!==U?!!(73&o.unixMode):m&&!!(73&Z)),$=o.unixMode!==U&&(o.unixMode&g)==A,tt=(Z&g)==A;Object.assign(o,{setuid:G,setgid:K,sticky:q,symlink:J,unixExternalUpper:Z,internalFileAttribute:o.internalFileAttributes,externalFileAttribute:o.externalFileAttributes,executable:Q,directory:$||tt||p&&C.directory||o.filename.endsWith(D),zipCrypto:o.encrypted&&!o.extraFieldAES});const ot=new Po(o);if(ot.getData=(t,e)=>o.getData(t,ot,a.qt,e),ot.arrayBuffer=async t=>{const e=new TransformStream,r=ve(e.readable).then(t=>t.arrayBuffer());return r.catch(()=>{}),await o.getData(e,ot,a.qt,t),r},et=z,t==V-1&&wt){const t=Ia(nt,rt,et);t&&(V+=t,$a(c,fa))}const{onprogress:at}=n;if(at)try{await at(t+1,V,new Po(o))}catch{}yield ot}let ht=et,pt=ka(rt.subarray(et))||(it?ka(st):U);if(!pt&&!it){const t=I+et,e=Math.min(tt-t,65541);e>=6&&(pt=ka(await eo(i,t,e)))}pt&&(a.digitalSignature=pt,ht=et+6+pt.length),(et!=Q&&ht!=Q||!it&&et!=T&&ht!=T)&&Qa(m,c,ha),ft&&Qa(m,c,pa);const mt=ei(a,n,"extractPrependedData"),yt=ei(a,n,"extractAppendedData"),bt=(m||mt)&&V&&4==j&&await async function(t){const e=await Wa(t);return e==o||808471376==e}(i)?4:0;return m&&(H||V&&j>bt)&&ti(wa),(H||V&&j>4)&&$a(c,wa),mt&&(a.prependedData=j>bt?await eo(i,bt,j-bt):v),a.comment=C?await eo(i,k+d,C):v,yt&&(a.appendedData=M<i.size?await eo(i,M,i.size-M):v),!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()}}class Fa{constructor(t={}){const{readable:e,writable:r}=new TransformStream,n=new za(e,t).getEntriesGenerator();this.readable=new ReadableStream({async pull(t){const{done:e,value:r}=await n.next();if(e)return t.close();const o={...r,readable:function(){const{readable:t,writable:e}=new TransformStream;if(r.getData)return async function(){try{await r.getData(e)}catch(t){try{await e.abort(t)}catch{}}}(),t}()};delete o.getData,t.enqueue(o)}}),this.writable=r}}async function Oa(t,e={}){if(t=new Xn(t),await $n(t),t.size!==U&&t.readUint8Array||(t=new An(await ve(t.readable)),await $n(t)),t.size<d)return!1;const r=Za(e,{}),n=r!=$,o=Ga(e[K],r),{Yt:a,Xt:i}=await Ka(t,n,o);if(!a||r==J&&i>1)return!1;const s=ii(Ot(a),20),c=a.offset+d+s;return t.size-c<=o}let Ua=class{constructor(t,e){Object.assign(this,{reader:t,options:e})}async getData(t,e,o,i={}){const s=this,c=yt(),{reader:u,index:l,offset:f,diskNumberStart:d,extraFieldAES:w,extraFieldZip64:h,compressionMethod:p,bitFlag:m,rawBitFlag:y,crc32:b,rawLastModDate:E,uncompressedSize:S,compressedSize:g}=s,{dataDescriptor:A}=m,R=e.localDirectory={},x=e.warnings=[],D=Pa(u,d)+f,F=await eo(u,D,z),O=Ot(F);let T=ei(s,i,N),I=ei(s,i,_);const k=ei(s,i,B);if(at(T,I),T=T&&T.length&&T,I=I&&I.length&&I,w&&99!=w.originalCompressionMethod)throw new Error(Yo);if(F.length<z||si(O,0)!=n)throw new Error(Ho);Ca(R,O,4);const{extraFieldLength:C,filenameLength:M}=R,V=R.dataOffset=D+z+M+C,H=ei(s,i,"checkLocalDirectory"),G=Za(i,s.options),K=function(t,e){return t===U?e!=$:Boolean(t)}(H,G),q=function(t,e){return t===U?e==J:Boolean(t)}(H,G);let Y=v;if(q&&(M||C)){const t=await eo(u,D+z,M+C);Y=t.subarray(0,M),R.rawExtraField=t.subarray(M)}else R.rawExtraField=C?await eo(u,D+z+M,C):v;q&&(R.rawFilename=Y),Ma(s,R,O,4,!0)&&$a(x,ua),function(t,e,r,n,o){const{rawFilename:a}=t,i=!o,s=t.Jt&&!(8192&~e.rawBitFlag);!n||s||r.length==a.length&&!r.some((t,e)=>t!=a[e])||Qa(i,o,"mismatched local file header (filename)"),(2057&e.rawBitFlag)!=(2057&t.rawBitFlag)&&Qa(i,o,ya),e.compressionMethod!=t.compressionMethod&&Qa(i,o,ba),e.bitFlag.dataDescriptor||s||!(e.crc32||e.compressedSize||e.uncompressedSize)||e.crc32==t.crc32&&e.compressedSize==t.compressedSize&&e.uncompressedSize==t.uncompressedSize||Qa(i,o,Ea)}(s,R,Y,q,K?U:x);const{lastAccessDate:X,creationDate:Q,uid:tt,gid:et}=R;X&&(e.lastAccessDate=X),Q&&(e.creationDate=Q),tt!==U&&e.uid===U&&(e.uid=tt),et!==U&&e.gid===U&&(e.gid=et);const rt=s.encrypted&&R.encrypted&&!k,nt=rt&&!w;if(k||(e.zipCrypto=nt),rt&&!(64&~R.rawBitFlag))throw new Error(qo);const it=k?U:He(p);if(0!=p&&8!=p&&9!=p&&!it&&!k)throw new Error(Yo);if(rt){if(!nt&&(w.strength<1||w.strength>3))throw new Error(qo);if(!T&&!I)throw new Error(Ko)}if(V+g>u.size)throw new Error(Qo);const st=g,ct=Me(u.createReadable({offset:V,size:st})),ut=ot(ei(s,i,j)),lt=ei(s,i,"checkPasswordOnly");let ft=ei(s,i,"checkOverlappingEntry");const dt=ei(s,i,"checkOverlappingEntryOnly");dt&&(ft=!0);const{onstart:wt,onprogress:ht,onend:pt}=i,mt=0!=p&&!k,bt=k?g:S,Et=9==p;let St=ei(s,i,W);Et&&(St=!1);const gt=ei(s,i,"checkCrc32"),At=(gt===U?ei(s,i,"checkSignature"):gt)&&!k&&(!rt||nt||w&&1==w.vendorVersion),Rt={options:{codecType:wr,password:T,rawPassword:I,zipCrypto:nt,encryptionStrength:w&&w.strength,checkCrc32:At,checkAuthenticationCode:ei(s,i,"checkAuthenticationCode"),passwordVerification:nt&&(A?E>>>8&r:b>>>24&r),outputSize:bt,crc32:b,compressed:mt,encrypted:rt,useWebWorkers:ei(s,i,P),useCompressionStream:St,transferStreams:ei(s,i,L),deflate64:Et,format:it?it.format:U,codecURI:it?it.codecURI:U,compressionMethod:p,rawBitFlag:y,checkPasswordOnly:lt},config:c,ft:{signal:ut,size:st,onstart:wt,onprogress:ht,onend:pt}};let xt,Dt;ft&&await async function({reader:t,$t:e,index:r,offset:n,crc32:o,compressedSize:i,uncompressedSize:s,dataOffset:c,dataDescriptor:u,extraFieldZip64:l,qt:f}){let d=0;if(u&&(d=l?20:12),d){const r=await eo(t,c+i,d+4),n=Ot(r);let u=r.length==d+4&&si(n,0)==a;if(u){const t=ja(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=ja(n,u?4:0,l);t.signature=u,e.localDirectory.dataDescriptor=t}}const w={start:n,end:c+i+d,$t:e};for(const[t,e]of f)if(t!=r&&w.start<e.end&&e.start<w.end){const t=new Error(Jo);throw t.overlappingEntry=e.$t,t}f.set(r,w)}({reader:u,$t:e,index:l,offset:D,crc32:b,compressedSize:g,uncompressedSize:S,dataOffset:V,dataDescriptor:A||R.bitFlag.dataDescriptor,extraFieldZip64:h||R.extraFieldZip64,qt:o});try{if(!dt){lt&&(t=new WritableStream),t=new Jn(t),await $n(t,function(t,e,r){return Math.min(t,r?1032*e:e)}(bt,g,mt)),({writable:xt}=t);const{outputSize:e}=await Gr({readable:ct,writable:xt},Rt);if(t.size+=e,e!=bt)throw new Error(qe)}}catch(e){if(e.outputSize!==U&&(t.size+=e.outputSize),!lt||e.message!=Yt)throw Dt=e,e}finally{if((Qn(t)||!ei(s,i,Z))&&xt&&!xt.locked){const t=xt.getWriter();if(Dt)try{await t.abort(Dt)}catch{}else await t.close()}}return lt||dt?U:t.getData?t.getData():xt}};function Ta(t){const e=Math.min(t.byteLength,1024)-3;for(let r=0;r<e;r++)if(134630224==si(t,r))return!0;return!1}function Ia(t,e,r){let n=0;for(;r+f<=e.length&&si(t,r)==s;)r+=f+ii(t,r+28)+ii(t,r+30)+ii(t,r+32),n++;return n%65536?0:n}function ka(t){if(t.length>=6){const e=Ot(t);if(si(e,0)==i){const r=ii(e,4);if(6+r<=t.length)return t.subarray(6,6+r)}}}function Ca(t,e,r){const n=t.rawBitFlag=ii(e,r+2),o=!(1&~n),a=si(e,r+6);Object.assign(t,{encrypted:o,version:ii(e,r),bitFlag:{level:(6&n)>>1,dataDescriptor:!(8&~n),languageEncodingFlag:(n&S)==S},rawLastModDate:a,lastModDate:ni(a),filenameLength:ii(e,r+22),extraFieldLength:ii(e,r+24)})}function Ma(t,e,r,n,o){const{rawExtraField:a}=e,i=e.extraField=new Map,s=Ot(a);let c=0,u=!1;try{for(;c<a.length;){const t=ii(s,c),e=ii(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=ii(r,n+4);Object.assign(e,{signature:si(r,n+10),crc32:si(r,n+10),compressedSize:si(r,n+14),uncompressedSize:si(r,n+18)});const f=i.get(1);f&&(function(t,e){e.zip64=!0;const r=Ot(t.data),n=Ra.filter(([t,r])=>e[t]==r),o=n.reduce((t,[,e])=>t+xa[e].bytes,0);if(t.data.length<o)throw new Error(Go);for(let o=0,a=0;o<n.length;o++){const[i,s]=n[o],c=xa[s];e[i]=t[i]=c.Kt(r,a),a+=c.bytes}}(f,e),e.extraFieldZip64=f);const d=i.get(28789);d&&(va(d,no,oo,e,t),e.extraFieldUnicodePath=d);const w=i.get(25461);w&&(va(w,ao,io,e,t),e.extraFieldUnicodeComment=w);const h=i.get(p);h&&h.data.length>=7?(function(t,e,r){const n=Ot(t.data),o=ai(n,4);Object.assign(t,{vendorVersion:ai(n,0),vendorId:ai(n,2),strength:o,originalCompressionMethod:r,compressionMethod:ii(n,5)}),e.compressionMethod=t.compressionMethod,1!=t.vendorVersion&&(e.crc32=U)}(h,e,l),e.extraFieldAES=h):e.compressionMethod=l;const S=i.get(13);S&&(Na(S,e),e.extraFieldPkwareUnix=S);const g=i.get(22613);g&&(Na(g,e),e.extraFieldUnixType1=g);const A=i.get(10);A&&(function(t,e){const r=Ot(t.data);let n,o=4;try{for(;o<t.data.length&&!n;){const e=ii(r,o),a=ii(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=Ot(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:oi(o),lastAccessDate:oi(a),creationDate:oi(i)};Object.assign(t,s),Object.assign(e,s,{rawLastAccessDate:a,rawCreationDate:i})}}(A,e),e.extraFieldNTFS=A);const R=i.get(E);let x;if(R&&(x=_a(R,e,!1),e.extraFieldUnix=R),!x){const t=i.get(b);t&&(_a(t,e,!0),e.extraFieldInfoZip=t)}const D=i.get(m);D&&(function(t,e,r){if(!t.data.length)return;const n=Ot(t.data),o=ai(n,0),a=[],i=[];r?(1&~o||(a.push(fo),i.push(wo)),2&~o||(a.push(ho),i.push(po)),4&~o||(a.push(mo),i.push(yo))):t.data.length>=5&&(a.push(fo),i.push(wo));let s=1;a.forEach((r,o)=>{if(t.data.length>=s+4){const a=si(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 z=i.get(y);return z&&(e.extraFieldUSDZ=z),u}function va(t,e,r,n,o){if(t.data.length<5)return void(t.valid=!1);const a=Ot(t.data),i=new Bt;i.append(o[r]);const s=Ot(new Uint8Array(4));s.setUint32(0,i.get(),!0);const c=si(a,1),u=ai(a,0);Object.assign(t,{version:u,[e]:tn(t.data.subarray(5)),valid:1==u&&!o.bitFlag.languageEncodingFlag&&c==si(s,0)}),t.valid&&(n[e]=t[e],n[e+"UTF8"]=!0)}function Na(t,e){if(t.data.length<8)return;const r=Ot(t.data),n={lastAccessDate:new Date(1e3*(0|si(r,0))),lastModDate:new Date(1e3*(0|si(r,4)))};t.data.length>=12&&(n.uid=ii(r,8),n.gid=ii(r,10)),Object.assign(t,n),Object.assign(e,n)}function _a(t,e,r){try{const n=Ot(t.data);let o,a;if(r){let e=0;const r=ai(n,e++),i=ai(n,e++);o=Ba(t.data.subarray(e,e+i)),e+=i;const s=ai(n,e++);a=Ba(t.data.subarray(e,e+s)),Object.assign(t,{version:r,uid:o,gid:a})}else t.data.length>=4&&(o=ii(n,0),a=ii(n,2),Object.assign(t,{uid:o,gid:a}));return o!==U&&(e.uid=o),a!==U&&(e.gid=a),o!==U||a!==U}catch{}}function Ba(t){const e=new Uint8Array(4);return e.set(t,0),new DataView(e.buffer,e.byteOffset,4).getUint32(0,!0)}function ja(t,e,r){const n=si(t,e);let o,a;return r?(o=ci(t,e+4),a=ci(t,e+12)):(o=si(t,e+4),a=si(t,e+8)),{crc32:n,compressedSize:o,uncompressedSize:a}}function Pa(t,e){return t.Gt?t.Gt(e):0}async function Wa(t){return si(Ot(await eo(t,0,4)))}function La(t){return t===J||t===Q||t===$}function Za(t,e){return Va(t,Va(e,Q))}function Va(t,e){const r=t.strictness;if(r!==U){if(!La(r))throw new Error(ra);return r}const n=t.checkAmbiguity;return n===U?e:n?J:e==$?$:Q}function Ha(t,e){if(e==$)return!1;const r=t.split("/");return r.length>1&&""===r[r.length-1]&&r.pop(),!!(r.includes("..")||t.startsWith("/")||t.startsWith("\\\\")||Sa.test(t))||e==J&&(r.includes(".")||r.includes(""))}function Ga(t,r){if(t!==U){const e=ct(t);if("number"!=typeof e||Number.isNaN(e)||e<0)throw new Error(oa);return e}return r==J?0:r==$?1/0:e}async function Ka(t,e,r){const{size:n}=t,o=Math.min(n,65557),a={count:64};let i,s,c=0;for await(const[r,u,l,f,w]of qa(t,o)){const o=ii(r,f+20);if(w+d+o==n){const o=await Xa(t,r,u,f,w,n,a);if(2==o){if(i||(i=Ya(l,f,w)),c++,!e||c>1)break}else 1!=o||s||(s=Ya(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 qa(t,o)){const o=Ya(c,u,l);a||(a=o);const f=await Xa(t,e,s,u,l,n,r);if(2==f)return o;1!=f||i||(i=o)}return i||a}(t,r,a)),{Yt:i,Xt:c}}async function*qa(t,e){const r=t.size-e,n=await eo(t,r,e),o=Ot(n);for(let t=n.length-d;t>=0;t--)si(o,t)==c&&(yield[o,r,n,t,r+t])}function Ya(t,e,r){return{offset:r,buffer:t.slice(e,e+d).buffer}}async function Xa(r,n,o,a,i,c,u){const f=ii(n,a+10),d=si(n,a+12),h=si(n,a+16);if(f==e||d==t||h==t)return await Ja(r,n,o,i-w,c,u)==l?2:0;if(!f&&!d)return 1;const p=ii(n,a+6);for(const t of[i-d,Pa(r,p)+h])if(await Ja(r,n,o,t,c,u)==s)return 2;return 0}async function Ja(t,e,r,n,o,a){return n<0||n+4>o?U:n>=r?si(e,n-r):a.count>0?(a.count--,si(Ot(await eo(t,n,4)),0)):U}function Qa(t,e,r){t?ti(r):$a(e,r)}function $a(t,e,r){if(!t.some(t=>t.reason==e)){const n={reason:e};r!==U&&(n.filename=r),t.push(n)}}function ti(t){const e=new Error($o);throw e.reason=t,e}function ei(t,e,r){return e[r]===U?t.options[r]:e[r]}function ri(t,e,r){return nt(ei(t,e,r))}function ni(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 oi(t){return new Date(Number(t/BigInt(1e4)-BigInt(116444736e5)))}function ai(t,e){return t.getUint8(e)}function ii(t,e){return t.getUint16(e,!0)}function si(t,e){return t.getUint32(e,!0)}function ci(t,e){const r=t.getBigUint64(e,!0);if(r>Da)throw new Error(aa);return Number(r)}var ui=Object.freeze({__proto__:null,ERR_AMBIGUOUS_ARCHIVE:$o,ERR_BAD_FORMAT:Wo,ERR_CENTRAL_DIRECTORY_NOT_FOUND:Vo,ERR_ENCRYPTED:Ko,ERR_ENCRYPTED_CENTRAL_DIRECTORY:ta,ERR_ENTRY_DATA_OUT_OF_BOUNDS:Qo,ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND:Zo,ERR_EOCDR_NOT_FOUND:Lo,ERR_EXTRAFIELD_ZIP64_NOT_FOUND:Go,ERR_INVALID_AUTHENTICATION_CODE:qt,ERR_INVALID_COMPRESSED_DATA:Ye,ERR_INVALID_CRC32:Xe,ERR_INVALID_FILENAME_VALIDATION:na,ERR_INVALID_MAX_APPENDED_DATA_SIZE:oa,ERR_INVALID_PASSWORD:Gt,ERR_INVALID_SIGNATURE:Kt,ERR_INVALID_STRICTNESS:ra,ERR_INVALID_UNCOMPRESSED_SIZE:qe,ERR_LOCAL_FILE_HEADER_NOT_FOUND:Ho,ERR_OVERLAPPING_ENTRY:Jo,ERR_SPLIT_ZIP_FILE:Xo,ERR_UNSAFE_FILENAME:ea,ERR_UNSUPPORTED_COMPRESSION:Yo,ERR_UNSUPPORTED_ENCRYPTION:qo,ERR_UNSUPPORTED_UINT64:aa,ERR_WORKER_STARTUP_TIMEOUT:mr,WARNING_APPENDED_DATA:da,WARNING_COMPRESSED_PATCHED_DATA:ca,WARNING_DUPLICATE_FILENAME:pa,WARNING_MALFORMED_EXTRA_FIELD:ua,WARNING_MISMATCHED_LOCAL_FILE_HEADER_BIT_FLAG:ya,WARNING_MISMATCHED_LOCAL_FILE_HEADER_COMPRESSION_METHOD:ba,WARNING_MISMATCHED_LOCAL_FILE_HEADER_CRC32_OR_SIZES:Ea,WARNING_MISMATCHED_ZIP64_END_OF_CENTRAL_DIRECTORY:ma,WARNING_PREPENDED_DATA:wa,WARNING_TRAILING_CENTRAL_DIRECTORY_DATA:ha,WARNING_UNKNOWN_VERSION:sa,WARNING_UNKNOWN_ZIP64_EXTENSIBLE_DATA:la,WARNING_UNSORTED_CENTRAL_DIRECTORY:ia,WARNING_WRAPPED_ENTRIES_COUNT:fa,ZipReader:za,ZipReaderStream:Fa,isZipFile:Oa});const li="File already exists",fi="Zip file comment exceeds 64KB",di="Invalid zip file comment (must be a Uint8Array)",wi="File entry comment exceeds 64KB",hi="Invalid file entry comment (must be a string)",pi="Invalid date (must be a valid Date instance)",mi="File entry name exceeds 64KB",yi="Version exceeds 65535",bi="The strength must equal 1, 2, or 3",Ei="Encryption is not supported in USDZ files",Si="Encryption is not supported when the 'passThrough' option is set",gi="Invalid extra field (must be a Map)",Ai="Invalid extra field type (must be integer 0..65535)",Ri="Invalid extra field data (must be a Uint8Array)",xi="Extra field data exceeds 64KB",Di=-2147483648,zi=2147483647,Fi=BigInt(0),Oi=BigInt("0x7fffffffffffffff"),Ui="Zip64 is not supported (set the 'zip64' option to 'true')",Ti="Undefined uncompressed size",Ii="Undefined compression method",ki="Undetermined size",Ci="Undefined reader",Mi="Zip file not empty",vi="Invalid uid (must be integer 0..2^32-1)",Ni="Invalid gid (must be integer 0..2^32-1)",_i="Invalid UNIX mode (must be integer 0..65535)",Bi="Invalid unixExtraFieldType (must be 'infozip' or 'unix')",ji="uid/gid must be 0..65535 for unixExtraFieldType 'unix' (use 'infozip' for larger ids)",Pi="Invalid msdosAttributesRaw (must be integer 0..255)",Wi="Invalid msdosAttributes (must be an object with boolean flags)",Li="Invalid level (must be integer 0..9)",Zi="Signature data exceeds 64KB",Vi=new Uint8Array([7,0,2,0,65,69,3,0,0]),Hi="infozip",Gi="unix";let Ki=0;const qi=[];class Yi{constructor(t,e={}){t=new Jn(t);const{availableSize:r=T,maxSize:n=T}=t,o=r>0&&r!==T&&n>0&&n!==T;Object.assign(this,{writer:t,te:o,options:e,ee:new Map,re:new Set,offset:e[H]===U?t.size||t.writable.size||0:e[H],ne:e[H]===U?0:e[H]-(t.size||t.writable.size||0),oe:new Set,ae:[],ie:0,se:U})}prependZip(t){return Qi(this,async function(t,e){if(t.re.size)throw new Error(Mi);await t.ce(e)}(this,t))}appendZip(t){return Qi(this,this.ce(t))}async ce(t){const e=this,{oe:r,re:n,ee: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 Xn(t),await $n(t),t.size!==U&&t.readUint8Array||(t=new An(await ve(t.readable)),await $n(t));const{ZipReader:r}=await Promise.resolve().then(function(){return ui}),i=new r(t),s=await i.getEntries();await i.close(),await $n(e.writer);const{directoryOffset:l}=i;s.forEach(({filename:t})=>{if(n.has(t))throw new Error(li);n.add(t),c.push(t)}),e.ue=!0;const{le:f}=e;e.le=new Promise(t=>u=()=>{e.ue=!1,t()}),await f,e.te&&(delete e.te,await async function(t){return Ot(await eo(t,0,4)).getUint32(0,!0)==o}(t)||(await gs(e.writer,Es()),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)=>bs(e,t)-bs(e,r));let s=0;for(const r of i){const n=bs(e,r);await ms(t,e,s,n-s),ws(o,await ys(e,n))&&await o.closeDisk(),a.set(r,{offset:hs(t,o),diskNumberStart:fs(o)}),s=n}await ms(t,e,s,n-s)}else{const o=t.offset;await ms(t,e,0,n),r.forEach(t=>a.set(t,{offset:o+bs(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:h,dataDescriptor:p}=o;f=ps(f||v),t.extraFieldAES&&(l=99);const m=Ps(f),y=Boolean(u)&&u.uncompressedSize!==U,b=Boolean(u)&&u.compressedSize!==U,E=-7&Ls(w,h,p,i,l)|w<<1,{fe:S,de:g}=Ws({version:e,bitFlag:E,compressionMethod:l,uncompressedSize:s,compressedSize:c,rawLastModDate:r,rawFilename:n,we:b,he:y,extraFieldLength:m}),{crc32:A}=t;A!==U&&_s(g,10,A);const{offset:R,diskNumberStart:x}=d.get(t);Object.assign(t,{he:y,we:b,offset:R,diskNumberStart:x,pe:!1,me:v,ye:v,be:v,Ee:v,Se:v,rawExtraField:f,ge:v,extendedTimestamp:!1,fe:S,de: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,{oe:i}=a,s=async function(e,n,o,a){if(Fs(e,a=Object.assign({},a),To)&&!n.endsWith(D)&&(n+=D),e.re.has(n))throw new Error(li);e.re.add(n),Ki<yt().maxWorkers?Ki++:await new Promise(t=>qi.push(t));try{return await async function(e,n,o,a){const i=es(e,n,a);({name:n}=i);const s=rs(e,n,a),{comment:c}=s,u=a[Mo];let l;e.ee.set(n,U);try{const{Ae:c}=s;0==c.level||c.compressionMethod!==U||c.passThrough||await gr(yt())||(c.level=0);const u=await async function(t,e,{Ae:r},n){if(r.passThrough&&!e&&!Fs(t,n,To))throw new Error(Ci);let o;return e&&(e=new Xn(e),await $n(e),({size:o}=e)),Object.assign({reader:e},os(t,Boolean(e),o,r,n))}(e,o,s,a);({reader:o}=u);const f=ds(e.writer),d=fs(e.writer),w=as(a=Object.assign({},a,i.Ae,s.Ae,u.Ae,{signature:a[Co],crc32:a.crc32===U?a[Co]:a.crc32,offset:e.offset-f,diskNumberStart:d,[G]:e.options[G]})),h=cs(a),p=Ps(w.Re,h.xe);l=await async function(e,n,o,a,i){const{ee:s,writer:c}=e,{keepOrder:u,dataDescriptor:l,De:f,signal:d}=i,{ze:w}=a,h=e.options[G],p=e.se;let m,y,b,E,S,g,A,R={},x=0;s.set(n,R),e.se=R;try{let y;u&&(y=p&&p.Fe,R.Fe=new Promise(t=>b=t)),i.bufferedWrite||!u||e.ue||e.ie||!l&&!f?(m=!0,e.ie++,A=i.createTempStream?await i.createTempStream():new TransformStream(U,U,{highWaterMark:T}),A.size=0,await $n(c)):(A=c,await D()),await $n(A);const O=ds(c);e.te&&!m&&await Ss(e,c),h&&!m&&is(a,e.offset-O);const{Re:I}=w;m||(await y,await F());const k=fs(c),C=hs(e,c);if(R.diskNumberStart=k,m||(S=!0,g=c.size,await gs(A,I)),R=await async function(e,n,{diskNumberStart:o,Fe:a},i,s,c){const{ze:u,Oe:l,Ue:f}=i,{fe:d,de:w,lastModDate:h,rawLastModDate:p,encrypted:m,compressed:y,version:b,compressionMethod:E,me:S,Te:g,be:A,Ie:R,Ee:x,Se:D,ye:z}=u,{xe:F}=l,{rawFilename:O,lastAccessDate:T,creationDate:I,password:k,rawPassword:C,level:M,zip64:v,he:N,we:_,zipCrypto:B,dataDescriptor:j,directory:P,executable:W,versionMadeBy:L,rawComment:Z,rawExtraField:V,ge:H,useWebWorkers:G,transferStreams:K,onstart:q,onprogress:Y,onend:X,signal:J,encryptionStrength:Q,extendedTimestamp:$,msDosCompatible:tt,internalFileAttributes:et,externalFileAttributes:rt,uid:nt,gid:ot,unixMode:at,symlink:it,setuid:st,setgid:ct,sticky:ut,unixExternalUpper:lt,msdosAttributesRaw:ft,msdosAttributes:dt,useCompressionStream:wt,passThrough:ht,format:pt,codecURI:mt}=c,yt={Fe:a,versionMadeBy:L,zip64:v,directory:Boolean(P),executable:Boolean(W),filenameUTF8:!0,rawFilename:O,commentUTF8:!0,rawComment:Z,me:S,Te:g,be:A,Ee:x,Se:D,ye:z,rawExtraField:V,ge:H,extendedTimestamp:$,msDosCompatible:tt,internalFileAttributes:et,externalFileAttributes:rt,diskNumberStart:o,uid:nt,gid:ot,unixMode:at,symlink:Boolean(it),setuid:st,setgid:ct,sticky:ut,unixExternalUpper:lt,msdosAttributesRaw:ft,msdosAttributes:dt};let{crc32:bt,uncompressedSize:Et}=c,St=0;ht||(Et=0);const{writable:gt}=n;if(e){const o=Me(ro(e)),a=e.size,i={options:{codecType:dr,level:M,rawPassword:C,password:k,encryptionStrength:Q,zipCrypto:m&&B,passwordVerification:m&&B&&p>>8&r,computeCrc32:!ht,compressed:y&&!ht,encrypted:m&&!ht,useWebWorkers:G,useCompressionStream:wt,transferStreams:K,format:pt,codecURI:mt,compressionMethod:E},config:s,ft:{signal:J,size:a,onstart:q,onprogress:Y,onend:X}};try{const e=await Gr({readable:o,writable:gt},i);if(St=e.outputSize,n.size+=St,ht||(Et=e.inputSize,m&&!B||(bt=e.crc32)),!_&&St>=t||!N&&Et>=t)throw new Error(Ui)}catch(t){throw t.outputSize!==U&&(n.size+=t.outputSize),t}}return function({crc32:t,compressedSize:e,uncompressedSize:r,ze:n,Oe:o},{zip64:a,zipCrypto:i,passThrough:s,dataDescriptor:c}){const{de:u,encrypted:l}=n,{ke:f,Ce:d}=o;l&&!i&&!s||t===U||(_s(u,10,t),c&&_s(f,d,t)),a?c&&(Bs(f,d+4,BigInt(e)),Bs(f,d+12,BigInt(r))):(_s(u,14,e),_s(u,18,r),c&&(_s(f,d+4,e),_s(f,d+8,r)))}({crc32:bt,compressedSize:St,uncompressedSize:Et,ze:u,Oe:l},c),j&&await gs(n,F),Object.assign(yt,{uncompressedSize:Et,compressedSize:St,lastModDate:h,rawLastModDate:p,creationDate:I,lastAccessDate:T,encrypted:Boolean(m),zipCrypto:Boolean(B),size:f+St,compressionMethod:E,version:b,fe:d,de:w,signature:bt,crc32:!m||B||ht?bt:U,Ie:R,he:N,we:_}),yt}(o,A,R,a,yt(),i),m||(S=!1),s.set(n,R),R.filename=n,m){if(await Promise.all([A.writable.getWriter().close(),y]),await D(),e.te&&await Ss(e,c),E=!0,g=c.size,await F(),R.diskNumberStart=fs(c),R.offset=hs(e,c),h){const t=a.Ue;is(a,e.offset-ds(c)),R.size+=a.Ue-t}!function({rawFilename:t,encrypted:e,zip64:r,Te:n,crc32:o,compressedSize:a,uncompressedSize:i,he:s,we:c},u,{dataDescriptor:l,passThrough:f}){if(l||((!e||f&&o!==U)&&_s(u,14,o),c||_s(u,18,a),s||_s(u,22,i)),r&&n){const e=z+Ps(t)+4;Bs(u,e,BigInt(i)),Bs(u,e+8,BigInt(a))}}(R,w.Me,i),await gs(c,w.Re),await As(A.readable,c,d,t=>x+=t),c.size+=A.size,E=!1}else R.diskNumberStart=k,R.offset=C;return e.offset+=R.size,R}catch(t){if(E||S){if(e.hasCorruptedEntries=!0,t)try{t.corruptedEntry=!0}catch{}e.offset+=c.size-g,m&&(e.offset+=x)}throw s.delete(n),t}finally{if(m&&e.ie--,b&&b(),y&&y(),m&&A&&A.dispose)try{await A.dispose()}catch{}}async function D(){e.ue=!0;const{le:t}=e;e.le=new Promise(t=>y=()=>{e.ue=!1,t()}),await t}async function F(){ws(c,Ps(w.Re))&&await c.closeDisk()}}(e,n,o,{ze:w,Oe:h,Ue:p},a)}catch(t){throw e.ee.delete(n),t}return Object.assign(l,{name:n,comment:c,extraField:u,[So]:l.internalFileAttributes,[go]:l.externalFileAttributes}),new Po(l)}(e,n,o,a)}catch(t){throw e.re.delete(n),t}finally{const t=qi.shift();t?t():Ki--}}(a,e,n,o);i.add(s);const c=()=>i.delete(s);return Promise.prototype.then.call(s,c,c),Qi(a,s)}remove(t){const{re:e,ee:r}=this;if(typeof t==M&&(t=r.get(t)),t&&t.filename!==U){const{filename:n}=t;if(e.has(n)&&r.has(n))return e.delete(n),r.delete(n),!0}return!1}async close(r=v,n={}){const o=this,{oe:a,writer:w}=this,{writable:h}=w;if(!(r instanceof Uint8Array))throw new Error(di);if(Ps(r)>e)throw new Error(fi);for(;a.size;)await Promise.allSettled(Array.from(a));await Promise.allSettled(o.ae.map(t=>t.ve));const p=o.ae.filter(t=>t.error&&!t.Ne);if(p.length){const t=p.map(t=>t.error);p.forEach(t=>t.Ne=!0);const[e]=t;try{e.entryErrors=t}catch{}throw e}return await async function(r,n,o){const a=us(r.ee),{_e:w,Be:h,je:p}=await async function(r,n,o){const{ee:a,writer:i}=r,c=new Uint8Array(n);await $n(i);let u=0,l=0,d=fs(i),w=ds(i),h=0;for(const[r,n]of Array.from(a.values()).entries()){const{offset:p,rawFilename:m,me:y,ye:b,be:E,Ee:S,Se:g,rawExtraField:A,ge:R,rawComment:x,versionMadeBy:D,fe:z,de:F,he:O,we:U,pe:T,Pe:I,internalFileAttributes:k,externalFileAttributes:C,diskNumberStart:M,uncompressedSize:v,compressedSize:N}=n,_=Ps(y,b,E,S,g,A,R),B=f+Ps(m,x)+_;ws(i,u+B-l)&&(await gs(i,c.slice(l,u)),l=u,h=0,await i.closeDisk()),0==r&&(d=fs(i),w=ds(i)),O||_s(F,18,v),U||_s(F,14,N),(I||T)&&n.version<45&&Ns(F,0,45);const j=ls(B);if(j.We(s),j.Le(D),j.Ze(z.subarray(0,24)),j.Le(_),j.Le(Ps(x)),j.Le(T?e:M),j.Le(k),j.We(C),j.We(I?t:p),j.Ze(m),j.Ze(y),j.Ze(b),j.Ze(E),j.Ze(S),j.Ze(g),j.Ze(A),j.Ze(R),j.Ze(x),js(c,j.Wt,u),u+=B,h++,o.onprogress)try{await o.onprogress(r+1,a.size,new Po(n))}catch{}}return await gs(i,l?c.slice(l):c),{_e:{diskNumber:d,diskOffset:w},Be:{diskNumber:fs(i),Ve:h},je:c}}(r,a,o),m=await async function(t,r,n){const o=Us(t,n,q);if(o){const n=await o(r),a=Ps(n);if(a>e)throw new Error(Zi);const s=ls(6+a);s.We(i),s.Le(a),s.Ze(n);const{writer:c}=t;return ws(c,Ps(s.Wt))&&await c.closeDisk(),await gs(c,s.Wt),6+a}return 0}(r,p,o);await async function(r,n,o,a){const{writer:i}=r,{_e:s,Be:f,He:w}=a;let{Ge:h}=a,p=r.ee.size,m=s.diskNumber,y=hs(r,s);const b=Ps(n);if(b>e)throw new Error(fi);let E=Fs(r,o,Do),S=fs(i);if(ws(i,(E?98:d)+b)&&S++,y>=t||h>=t||p>=e||S>=e){if(!1===E)throw new Error(Ui);E=!0}const g=ls(E?98:d);ws(i,Ps(g.Wt)+b)&&await i.closeDisk(),S=fs(i);let A=S==f.diskNumber?f.Ve:0;E&&(g.We(u),g.Ke(44),g.Le(45),g.Le(45),g.We(S),g.We(m),g.Ke(A),g.Ke(p),g.Ke(h),g.Ke(y),g.We(l),g.We(S),g.Ke(BigInt(hs(r,i))+BigInt(h)+BigInt(w)),g.We(S+1),Fs(r,o,"supportZip64SplitFile",!0)&&(S=e,m=e),A=e,p=e,y=t,h=t),g.We(c),g.Le(S),g.Le(m),g.Le(A),g.Le(p),g.We(h),g.We(y),g.Le(b),await gs(i,g.Wt),b&&await gs(i,n)}(r,n,o,{_e:w,Be:h,Ge:a,He:m})}(o,r,n),!Qn(w)&&Fs(o,n,Z)||await h.getWriter().close(),w.getData?w.getData():h}}class Xi{constructor(t={}){const{readable:e,writable:r}=new TransformStream;this.readable=e,this.zipWriter=new Yi(r,t),this.oe=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 $i(e,t)}}()}});return ts(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 ts(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.oe))).filter(t=>"rejected"==t.status).map(t=>t.reason);if(n.length){const[t]=n;try{t.entryErrors=n}catch{}throw await $i(r,t),t}try{return await r.close(t,e)}catch(t){throw await $i(r,t),t}}}class Ji extends Promise{then(t,e){const{qe:r}=this;return r&&(r.Ne=!0),super.then(t,e)}}function Qi(t,e){const r=new Ji((t,r)=>Promise.prototype.then.call(e,t,r)),n={};return r.qe=n,n.ve=Promise.prototype.then.call(r,U,t=>n.error=t),t.ae.push(n),r}async function $i(t,e){try{await t.writer.writable.abort(e)}catch{}}function ts(t,e,r){t.oe.add(e),e.catch(t=>{try{r(t)}catch{}})}function es(n,o,a){let i=Fs(n,a,xo),s=Fs(n,a,Oo,i?20:768);const c=Fs(n,a,Io),u=ks(n,a,"uid"),l=ks(n,a,"gid");let f=ks(n,a,vo),d=Fs(n,a,"unixExtraFieldType"),w=Fs(n,a,No),h=Fs(n,a,_o),p=Fs(n,a,Bo);if(st(u,t,vi),st(l,t,Ni),st(f,e,_i),d!==U&&d!==Hi&&d!==Gi)throw new Error(Bi);if(d===Gi&&(u!==U&&u>e||l!==U&&l>e))throw new Error(ji);d!==U||u===U&&l===U||(d=Hi);let m=ks(n,a,Ao),y=Fs(n,a,Ro);const b=m!==U||y!==U;if(u!==U||l!==U||f!==U||d||c?(i=!1,s=s&r|768):b&&(i=!0,s&=r),st(m,r,Pi),y&&(typeof y!==C||Array.isArray(y)))throw new Error(Wi);if(s>e)throw new Error(yi);let E=Ts(n,a,Eo,go);const S=E!==U;S||(E=0),!a[To]&&o.endsWith(D)&&(a[To]=!0);const z=Fs(n,a,To);if(z?(o.endsWith(D)||(o+=D),S||(E=16,i||(E|=16877<<16))):i||S||(E=c?493<<16:27525120),!i){const t=f!==U||Boolean(w||h||p);f=f===U?E>>16&e:f&e,w?f|=R:w=Boolean(f&R),h?f|=x:h=Boolean(f&x),p?f|=512:p=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!==U)t&=r;else if(e!==U){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===U&&(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!==U&&40960==(f&g);return{name:o,Ae:{versionMadeBy:s,msDosCompatible:Boolean(i),externalFileAttributes:E,unixExternalUpper:F,uid:u,gid:l,unixMode:f,unixExtraFieldType:d,symlink:O,setuid:w,setgid:h,sticky:p,msdosAttributesRaw:m,msdosAttributes:y}}}function rs(t,r,n){const o=Us(t,n,"encodeText")||Pt;let a=o(r,Y);if(a===U&&(a=Pt(r)),Ps(a)>e)throw new Error(mi);const i=n[ao]||"";if(typeof i!=M)throw new Error(hi);let s=o(i,X);if(s===U&&(s=Pt(i)),Ps(s)>e)throw new Error(wi);const c=Fs(t,n,Fo);if(c!==U&&c>e)throw new Error(yi);const u=Os(t,n,fo,new Date),l=Fs(t,n,wo),f=Os(t,n,ho),d=Os(t,n,mo),w=Ts(t,n,bo,So,0),h=Fs(t,n,B),p=Fs(t,n,N),m=Fs(t,n,_);at(p,m);const y=ks(t,n,"encryptionStrength",3),b=Fs(t,n,Uo),E=Fs(t,n,"extendedTimestamp",!0),S=Fs(t,n,"ntfsTimestamp"),g=Fs(t,n,"keepOrder",!0),A=Fs(t,n,P),R=Fs(t,n,L),x=Fs(t,n,"bufferedWrite"),D=Us(t,n,"createTempStream"),z=Fs(t,n,"dataDescriptorSignature",!0),F=ot(Fs(t,n,j)),O=Fs(t,n,"useUnicodeFileNames",!0),T=Fs(t,n,ko),I=h||T===U?U:He(T);if(!h&&T!==U&&0!==T&&8!==T&&!I)throw new Error("Compression method not supported");let k=ks(t,n,"level");if(st(k,9,Li),t.options[G]){if(p!==U||m!==U)throw new Error(Ei);k===U&&T===U&&(k=0)}h&&(k=U);let C=Fs(t,n,W),v=Fs(t,n,V);x&&v===U&&(v=!1),(v===U||b&&!h)&&(v=!0),k!==U&&6!=k&&(C=!1);const Z=Fs(t,n,Do);if(!(b||p===U&&m===U||Number.isInteger(y)&&y>=1&&y<=3))throw new Error(bi);const H=ns(n[Mo]),K=ns(n.localExtraField),q=ns(n.centralExtraField);return{comment:i,Ae:{rawFilename:a,rawComment:s,version:c,lastModDate:u,rawLastModDate:l,lastAccessDate:f,creationDate:d,internalFileAttributes:w,passThrough:h,password:p,rawPassword:m,encryptionStrength:y,zipCrypto:b,extendedTimestamp:E,ntfsTimestamp:S,keepOrder:g,useWebWorkers:A,transferStreams:R,bufferedWrite:x,createTempStream:D,dataDescriptorSignature:z,signal:F,useUnicodeFileNames:O,compressionMethod:T,format:I?I.format:U,codecURI:I?I.codecURI:U,Ye:I?I.versionNeeded:U,level:k,useCompressionStream:C,dataDescriptor:v,zip64:Z,rawExtraField:H,Xe:K,ge:q}}}function ns(t){if(!t)return v;if(!(t instanceof Map))throw new Error(gi);let r=0,n=0;t.forEach((t,n)=>{if(it(n,e,Ai),!(t instanceof Uint8Array))throw new Error(Ri);if(Ps(t)>e)throw new Error(xi);r+=4+Ps(t)});const o=new Uint8Array(r),a=Ot(o);return t.forEach((t,e)=>{Ns(a,n,e),Ns(a,n+2,Ps(t)),js(o,t,n+4),n+=4+Ps(t)}),o}function os(e,r,n,o,a){const{passThrough:i,zipCrypto:s,password:c,rawPassword:u,encryptionStrength:l}=o;let{dataDescriptor:f,zip64:d,level:w,compressionMethod:h}=o,p=0,m=0;if(i&&r){if(m=a[so],m===U)throw new Error(Ti);if(h===U)throw new Error(Ii)}const y=!0===d,b=Fs(e,a,zo);if(r&&i&&!b&&Ps(c,u))throw new Error(Si);const E=r&&(Boolean(c&&Ps(c)||u&&Ps(u))||i&&b);r||(w=0,h=0);const S=E?s?12:16+4*l:0;r&&(i?(a.uncompressedSize=m,p=n===U?Cs(m)+S:n):n===U?(f=!0,(d||d===U)&&(d=!0,m=p=4294967296)):(a.uncompressedSize=m=n,p=(Ms(h,w)?Cs(m):m)+S));const g=!(E||r&&(0!==n||i)||Ms(h,w));g&&!s&&Fs(e,a,V)===U&&(f=!1);const A=y||m>=t,R=y||p>=t;if(A||R){if(!1===d)throw new Error(Ui);d=!0}return d=d||!1,{Je:p,Ae:{dataDescriptor:f,De:g,zip64:d,he:A,we:R,uncompressedSize:m,level:w,compressionMethod:h,encrypted:E}}}function as(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:h,Xe:y,encryptionStrength:S,extendedTimestamp:g,ntfsTimestamp:A,passThrough:R,encrypted:x,he:D,we:T,uncompressedSize:I,crc32:k}=t;let{version:C,compressionMethod:M}=t;const N=!w&&Ms(M,c);let _;const B=R||!N,j=u&&(t.bufferedWrite||!d||!D&&!T||B),P=j||u&&d&&(D||T);if(u&&(D||T)){const t=20,e=ls(t);if(e.Le(1),e.Le(t-4),_=e.Wt,j&&(e.Ke(I),B)){const t=x?l?12:16+4*S:0;e.Ke(R?0:I+t)}}else _=v;let W,L,Z,V,H;if(x&&!l){const t=ls(Ps(Vi)+2);t.Le(p),t.Ze(Vi),W=t.Wt,W[8]=S}else W=v;if(g){const t=xs(o),e=Ds(t);if(e){const e=9+(i?4:0)+(s?4:0),r=ls(e);V=1+(i?2:0)+(s?4:0),r.Le(m),r.Le(e-4),r.Qe(V),r.We(t),i&&r.We(zs(xs(i))),s&&r.We(zs(xs(s))),Z=r.Wt}else Z=v;if(A===U?!e||Boolean(i||s):A)try{const t=Rs(o),e=ls(36);e.Le(10),e.Le(32),e.$e(4),e.Le(1),e.Le(24),e.Ke(t),e.Ke(i?Rs(i):t),e.Ke(s?Rs(s):t),L=e.Wt}catch{L=v}else L=v}else L=Z=v;try{const{uid:r,gid:n,unixExtraFieldType:o}=t;if(o!=Hi||r===U&&n===U)if(o!=Gi||r===U&&n===U)H=v;else{const t=ls(8);t.Le(E),t.Le(4),t.Le((r===U?0:r)&e),t.Le((n===U?0:n)&e),H=t.Wt}else{const t=ss(r===U?0:r),e=ss(n===U?0:n),o=3+t.length+e.length,a=ls(4+o);a.Le(b),a.Le(o),a.Qe(1),a.Qe(t.length),a.Ze(t),a.Qe(e.length),a.Ze(e),H=a.Wt}}catch{H=v}M===U&&(M=N?8:0),C===U&&(C=0!=M||w||x?20:10);const{Ye:K}=t;N&&K!==U&&(C=C>K?C:K),u&&(C=C>45?C:45),x&&!l&&(C=C>51?C:51,R&&k!==U&&(W[4]=1),Ns(Ot(W),9,M),M=99);const q=P?Ps(_):0,Y=q+Ps(W,Z,L,H,h,y);if(Y+(t[G]?67:0)>e)throw new Error(xi);const X=new Date(2e3*Math.ceil(Math.floor(o.getTime()/1e3)/2)),{fe:J,de:Q,rawLastModDate:$}=Ws({version:C,bitFlag:Ls(c,f,d,x,M),compressionMethod:M,uncompressedSize:I,lastModDate:X<O?O:X>F?F:X,rawLastModDate:a,rawFilename:r,we:T,he:D,extraFieldLength:Y}),tt=ls(z+Ps(r)+Y),et=tt.Wt,rt=Ot(et);return tt.We(n),tt.Ze(J),tt.Ze(r),P&&tt.Ze(_),tt.Ze(W),tt.Ze(Z),tt.Ze(L),tt.Ze(H),tt.Ze(h),tt.Ze(y),d&&(T||_s(rt,18,0),D||_s(rt,22,0)),{Re:et,Me:rt,fe:J,de:Q,lastModDate:o,rawLastModDate:$,encrypted:x,compressed:N,version:C,compressionMethod:M,Ie:V,me:v,Te:q,be:Z,Ee:L,Se:H,ye:W,extraFieldLength:Y}}function is(t,e){const{ze:r}=t;let{Re:n,extraFieldLength:o}=r,a=64-(e+Ps(n))%64;a<4&&(a+=64);const i=new Uint8Array(a),s=Ot(i);Ns(s,0,y),Ns(s,2,a-4);const c=n;r.Re=n=new Uint8Array(Ps(c)+a),js(n,c),js(n,i,Ps(c));const u=Ot(n);Ns(u,28,o+a),r.Me=u,t.Ue+=a}function ss(t){const e=new Uint8Array(4);Ot(e).setUint32(0,t,!0);let r=4;for(;r>1&&0===e[r-1];)r--;return e.subarray(0,r)}function cs({zip64:t,dataDescriptor:e,dataDescriptorSignature:r}){let n,o=v,i=0,s=t?20:12;return r&&(s+=4),e&&(o=new Uint8Array(s),n=Ot(o),r&&(i=4,_s(n,0,a))),{xe:o,ke:n,Ce:i}}function us(r){let n=0;for(const[,o]of r){const{rawFilename:r,ye:a,rawComment:i,Ee:s,Se:c,rawExtraField:u,ge:l,extendedTimestamp:d,Ie:w,lastModDate:h,he:p,we:y,uncompressedSize:b,compressedSize:E}=o,S=o.offset>=t,g=o.diskNumberStart>=e;let A,R;if(S||g||p||y){const t=4+(p?8:0)+(y?8:0)+(S?8:0)+(g?4:0),e=ls(t);e.Le(1),e.Le(t-4),p&&e.Ke(b),y&&e.Ke(E),S&&e.Ke(o.offset),g&&e.We(o.diskNumberStart),A=e.Wt}else A=v;o.me=A,o.Pe=S,o.pe=g;const x=xs(h);if(d&&Ds(x)){const t=ls(9);t.Le(m),t.Le(5),t.Qe(w),t.We(x),R=t.Wt}else R=v;o.be=R;const D=Ps(A,a,s,c,R,u,l);if(D>e)throw new Error(xi);n+=f+Ps(r,i)+D}return n}function ls(t){const e=new Uint8Array(t),r=Ot(e);let n=0;return{Wt:e,Qe:t=>{!function(t,e,r){t.setUint8(e,r)}(r,n,t),n+=1},Le:t=>{Ns(r,n,t),n+=2},We:t=>{_s(r,n,t),n+=4},Ke:t=>{Bs(r,n,BigInt(t)),n+=8},Ze:t=>{js(e,t,n),n+=Ps(t)},$e:t=>n+=t}}function fs(t){const{diskNumber:e=0}=t;return e}function ds(t){const{diskOffset:e=0}=t;return e}function ws(t,e){const{availableSize:r=T}=t;return e>r}function hs(t,{diskNumber:e=0,diskOffset:r=0}){return t.offset-r-(e?t.ne:0)}function ps(t){const e=Ot(t);let r=0;for(;r+4<=Ps(t);){const n=4+vs(e,r+2);if(1==vs(e,r))return ps(zt(t.subarray(0,r),t.subarray(Math.min(r+n,Ps(t)))));r+=n}return t}async function ms(t,e,r,n){if(n>0){const{writer:o}=t;let a=0;try{await As(ro(e,{offset:r,size:n}),o,U,t=>a+=t)}catch(e){t.hasCorruptedEntries=!0;try{e.corruptedEntry=!0}catch{}throw e}finally{o.size+=a,t.offset+=a}}}async function ys(t,e){const r=await eo(t,e,z);if(Ps(r)<z)return z;const n=Ot(r);return z+vs(n,26)+vs(n,28)}function bs(t,{offset:e,diskNumberStart:r}){return e+(t.Gt?t.Gt(r):0)}function Es(){const t=new Uint8Array(4);return _s(Ot(t),0,o),t}async function Ss(t,e){delete t.te,await gs(e,Es()),t.offset+=4}async function gs(t,e){const{writable:r}=t,n=r.getWriter();try{await n.ready,t.size+=Ps(e),await n.write(e)}finally{n.releaseLock()}}async function As(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(Ps(t))}}),{preventClose:!0,preventAbort:!0,signal:r})}finally{o.releaseLock()}}function Rs(t){if(t){const e=(BigInt(t.getTime())+BigInt(116444736e5))*BigInt(1e4);return e<Fi?Fi:e>Oi?Oi:e}}function xs(t){return Math.floor(t.getTime()/1e3)}function Ds(t){return t>=Di&&t<=zi}function zs(t){return Math.min(zi,Math.max(Di,t))}function Fs(t,e,r,n){const o=e[r]===U?t.options[r]:e[r];return o===U?n:o}function Os(t,e,r,n){const o=Fs(t,e,r,n);if(null===o)return n;if(o!==U&&(typeof o.getTime!=k||Number.isNaN(o.getTime())))throw new Error(pi);return o}function Us(t,e,r){return nt(Fs(t,e,r))}function Ts(t,e,r,n,o){const a=Is(e,r,n),i=a===U?Is(t.options,r,n):a;return i===U?o:i}function Is(t,e,r){return t[e]===U?t[r]:t[e]}function ks(t,e,r,n){return ct(Fs(t,e,r,n))}function Cs(t){return t+5*(Math.floor(t/16383)+1)}function Ms(t,e){return t===U?e===U||e>0:0!==t}function vs(t,e){return t.getUint16(e,!0)}function Ns(t,e,r){t.setUint16(e,r,!0)}function _s(t,e,r){t.setUint32(e,r,!0)}function Bs(t,e,r){t.setBigUint64(e,r,!0)}function js(t,e,r){t.set(e,r)}function Ps(...t){let e=0;return t.forEach(t=>t&&(e+=t.length)),e}function Ws({version:e,bitFlag:r,compressionMethod:n,uncompressedSize:o,compressedSize:a,lastModDate:i,rawLastModDate:s,rawFilename:c,we:u,he:l,extraFieldLength:f}){const d=ls(26),w=d.Wt,h=Ot(w);if(d.Le(e),d.Le(r),d.Le(n),s===U){const t=new Uint32Array(1),e=Ot(t);Ns(e,0,(i.getHours()<<6|i.getMinutes())<<5|i.getSeconds()/2),Ns(e,2,(i.getFullYear()-1980<<4|i.getMonth()+1)<<5|i.getDate()),s=t[0]}return d.We(s),d.$e(4),u||a!==U?d.We(u?t:a):d.$e(4),l||o!==U?d.We(l?t:o):d.$e(4),d.Le(Ps(c)),d.Le(f),{fe:w,de:h,rawLastModDate:s}}function Ls(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 Zs(){return"application/octet-stream"}const Vs=1048576,Hs=".zip.js-temp";function Gs(t={}){const{thresholdBytes:e=Vs,directoryName:r=Hs,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 Ks=1048576;function qs(t={}){const{thresholdBytes:e=Ks}=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=ve(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 Ys=1048576,Xs=".zip.js-temp",Js="createSyncAccessHandle is only available in dedicated workers";function Qs(t={}){const{thresholdBytes:e=Ys,directoryName:r=Xs,getDirectory:n}=t;if(!(n||"undefined"!=typeof FileSystemFileHandle&&FileSystemFileHandle.prototype.createSyncAccessHandle))throw new Error(Js);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;return{writable:u,readable: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}),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{xt({baseURI:import.meta.url})}catch{}let $s,tc,ec,rc,nc;function oc(t,e,r={}){if(!$s){const t=new Error("WASM module not loaded");throw t.cause=nc,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;return new TransformStream({start(){try{let r;if(this.er=tc(o),this.in=tc(a),this.inBufferSize=a,!this.er||!this.in)throw new Error("allocation failed");if(this.rr=new Uint8Array(o),t?(this.nr=$s.deflate_process,this.ar=$s.deflate_last_consumed,this.ir=$s.deflate_end,this.sr=$s.deflate_new(),r="gzip"===e?$s.deflate_init_gzip(this.sr,n):"deflate-raw"===e?$s.deflate_init_raw(this.sr,n):$s.deflate_init(this.sr,n)):"deflate64-raw"===e?(this.nr=$s.inflate9_process,this.ar=$s.inflate9_last_consumed,this.ir=$s.inflate9_end,this.sr=$s.inflate9_new(),r=$s.inflate9_init_raw(this.sr)):(this.nr=$s.inflate_process,this.ar=$s.inflate_last_consumed,this.ir=$s.inflate_end,this.sr=$s.inflate_new(),r="deflate-raw"===e?$s.inflate_init_raw(this.sr):"gzip"===e?$s.inflate_init_gzip(this.sr):$s.inflate_init(this.sr)),0!==r)throw new Error("init failed:"+r)}catch(t){throw i(this),t}},transform(e,r){try{const n=e,a=new Uint8Array(rc.buffer),i=this.nr,s=this.ar,c=this.er,u=this.rr;let l=0;for(;l<n.length;){const e=Math.min(n.length-l,32768);if((!this.in||this.inBufferSize<e)&&(this.in&&ec&&(ec(this.in),this.in=0),this.in=tc(e),this.inBufferSize=e,!this.in))throw new Error("allocation failed");a.set(n.subarray(l,l+e),this.in);const f=i(this.sr,this.in,e,c,o,0),d=16777215&f;if(d&&(u.set(a.subarray(c,c+d),0),r.enqueue(u.slice(0,d))),!t){const t=f>>24&255,e=128&t?t-256:t;if(e<0)throw new Error("process error:"+e)}const w=s(this.sr);if(0===w)break;l+=w}}catch(t){i(this),r.error(t)}},flush(e){try{const r=new Uint8Array(rc.buffer),n=this.nr,a=this.er,i=this.rr;for(;;){const s=n(this.sr,0,0,a,o,4),c=16777215&s,u=s>>24&255;if(!t){const t=128&u?u-256:u;if(t<0)throw new Error("process error:"+t)}if(c&&(i.set(r.subarray(a,a+c),0),e.enqueue(i.slice(0,c))),1===u||0===c)break}}catch(t){e.error(t)}finally{const t=i(this);0!==t&&e.error(new Error("end error:"+t))}},cancel(){i(this)}});function i(t){let e=0;return t.sr&&t.ir&&(e=t.ir(t.sr)),t.sr=0,t.in&&ec&&ec(t.in),t.in=0,t.er&&ec&&ec(t.er),t.er=0,e}}class ac{constructor(t="deflate",e){return oc(!0,t,e)}}class ic{constructor(t="deflate",e){return oc(!1,t,e)}}ac.lt=!0,ic.lt=!0;let sc,cc=!1;function uc(){sc=null,async function(){await Promise.allSettled(Wr.map(t=>(Jr(t),t.terminate()))),yr=U,br=!1}(),cc=!1,$s=tc=ec=rc=nc=null}!function({cr:t}){Sr=t}({cr:t=>{if(!sc){let{wasmURI:e}=t;typeof e==k&&(e=e()),sc=async function(t,{baseURI:e}){if(!cc)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)}!function(t){if($s=t,({malloc:tc,free:ec,memory:rc}=$s),"function"!=typeof tc||"function"!=typeof ec||!rc)throw $s=tc=ec=rc=null,new Error("Invalid WASM module")}((await WebAssembly.instantiate(r)).instance.exports)}(t,e),cc=!0}catch(t){throw function(t){nc=t}(t),t}}(e,t).catch(t=>{throw sc=null,t})}return sc}}),xt({CompressionStreamFallback:ac,DecompressionStreamFallback:ic}),xt({workerURI:new URL("./zip-web-worker.js",import.meta.url).href,wasmURI:new URL("./zip-module.wasm",import.meta.url).href});const lc="Entry filename already exists",fc="Readable stream already consumed",dc="Invalid passThrough option (use readerOptions.passThrough or set uncompressedSize for each entry)",wc="Invalid readerOptions (must be an object)",hc="The last modification date of an entry encrypted with ZipCrypto cannot be changed when passThrough is set",pc="zipjs-abort-export",mc="The operation was aborted",yc=new Set([1,p,10,m,28789,25461,y,b,E,22613,13]);class bc{constructor(t,e,r,n){const o=this;if(t.root&&n&&n.getChildByName(e))throw new Error(lc);r||(r={}),Object.assign(o,{fs:t,name:e,data:r.data,options:r.options&&Object.assign({},r.options),id:t.ur++,parent:n,children:[],uncompressedSize:r.uncompressedSize||0,lr:r.lr||r.uncompressedSize===U,passThrough:r.passThrough,dr:r.dr||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.parent;if(e&&e.getChildByName(t))throw new Error(lc);this.name=t}setOptions(t){const e=Object.assign({},this.options,t);this.options=Object.fromEntries(Object.entries(e).filter(([,t])=>t!==U))}}class Ec extends bc{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 Ec(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===U||(t.constructor==Rn?e.type==r:t.constructor!=En||e.startsWith("data:"+(r||"")+";base64,"))}(t,r.data))return r.data;{const n=r.reader=Oc(r.Reader,r.data,e),o=r.uncompressedSize||n.size;await Promise.all([$n(n),$n(t,o)]);const a=ot(e.signal),i=function(t,e,r,n){const{onstart:o,onprogress:a,onend:i}=r,{readable:s}=e;return t.data instanceof Po||!o&&!a&&!i?s:Me(s).pipeThrough(new xr({onstart:o,onprogress:a,onend:i,size:e.size}),{signal:n})}(r,n,e,a),s=!Qn(t)&&Boolean(e.preventClose);return r.uncompressedSize=n.size,await Me(i).pipeTo(Ne(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(t.message==Gt)return!1;throw t}}getText(t,e){return this.getData(new zn(t),e)}getBlob(t,e){return this.getData(new Rn(t),e)}getData64URI(t,e){return this.getData(new En(t),e)}getUint8Array(t){return this.getData(new Kn,t)}getWritable(t=new WritableStream,e){return this.getData({writable:t},e)}async getArrayBuffer(t){return Ft(await this.getUint8Array(t)).buffer}replaceBlob(t){Object.assign(this,{data:t,Reader:An,Writer:Rn,reader:null})}replaceText(t){Object.assign(this,{data:t,Reader:xn,Writer:zn,reader:null})}replaceData64URI(t){Object.assign(this,{data:t,Reader:bn,Writer:En,reader:null})}replaceUint8Array(t){Object.assign(this,{data:t,Reader:Gn,Writer:Kn,reader:null})}replaceReadable(t){Object.assign(this,{data:null,Reader:zc(t),Writer:null,reader:null})}}class Sc extends bc{constructor(t,e,r,n){super(t,e,r,n),this.directory=!0}clone(t){const e=this,r=new Sc(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 Pc(this,t,{options:e},!0)}addText(t,e,r={}){return Pc(this,t,{data:e,Reader:xn,Writer:zn,options:r,uncompressedSize:Dn(e)})}addBlob(t,e,r={}){return Pc(this,t,{data:e,Reader:An,Writer:Rn,options:r,uncompressedSize:e.size})}addData64URI(t,e,r={}){let n=e.length;for(;"="==e.charAt(n-1);)n--;const o=e.indexOf(",")+1;return Pc(this,t,{data:e,Reader:bn,Writer:En,options:r,uncompressedSize:Math.floor(.75*(n-o))})}addUint8Array(t,e,r={}){return Pc(this,t,{data:e,Reader:Gn,Writer:Kn,options:r,uncompressedSize:e.length})}addHttpContent(t,e,r={}){return Pc(this,t,{data:e,Reader:class extends Vn{constructor(t){super(t,r)}},options:r})}addReadable(t,e,r={}){return Pc(this,t,{Reader:zc(e),options:r})}addFileSystemEntry(t,e={}){return _c(this,t,e)}addFileSystemHandle(t,e={}){return _c(this,t,e)}addFile(t,e={}){return(e=Object.assign({},e)).lastModDate||(e.lastModDate=new Date(t.lastModified)),Pc(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 An(t),e)}importData64URI(t,e){return this.importZip(new bn(t),e)}importUint8Array(t,e){return this.importZip(new Gn(t),e)}importHttpContent(t,e){return this.importZip(new Vn(t,e),e)}importReadable(t,e){return this.importZip({readable:t},e)}exportBlob(t={}){return this.exportZip(new Rn(t.mimeType||"application/zip"),t)}exportData64URI(t={}){return this.exportZip(new En(t.mimeType||"application/zip"),t)}exportUint8Array(t={}){return this.exportZip(new Kn,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,i=Mc(r.readerOptions),s=new AbortController,{signal:c}=s,u=function(t,e){if(!ot(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:U,onprogress:U,onend:U,preventClose:!1}),f=Rc([t],t=>Dc(t,l.passThrough)),d=[];let w=!1,h=0;try{n&&await Dr(n,f),await m(t,e),a&&await Dr(a,h)}catch(t){try{t.exportedEntryNames=d}catch{}throw t}finally{u()}return e;function p(t){const e=t.getWriter();return new WritableStream({async write(t){await e.write(t),h+=t.length,o&&await Dr(o,h,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=>!Ic(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||Ic(c.reason))return;throw c.reason===U?new DOMException(mc,"AbortError"):c.reason}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:p(o)},l)}catch(t){throw w?new Error(pc):t}d.push(e.getRelativeName(t))}}catch(r){w=!0,s.abort(new Error(pc));try{r.entryName===U&&(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 $n(t),r=new za(t,e));const n=[],o=await r.getEntries(e);for(const t of o){let r=this;try{const o=t.filename.split("/").filter(t=>""!=t&&"."!=t),a=o.pop();if(o.forEach(t=>{const e=r;if(r=r.getChildByName(t),r){if(!r.directory)throw new Error(lc)}else r=new Sc(this.fs,t,{data:null},e),n.push(r)}),t.directory){let e=r;if(a)if(e=r.getChildByName(a),e){if(!e.directory)throw new Error(lc)}else e=new Sc(this.fs,a,{data:null},r),n.push(e);e==this||e.data||(e.data=t)}else n.push(Pc(r,a,{data:t,Reader:Fc(Object.assign({},e)),uncompressedSize:e.passThrough?t.compressedSize:t.uncompressedSize,passThrough:e.passThrough}))}catch(e){try{e.cause={entry:t}}catch{}throw e}}return n}async exportZip(t,e={}){const r=this;(e=Object.assign({},e)).bufferedWrite===U&&(e.bufferedWrite=!0);const[n]=await Promise.all([Uc(r,Mc(e.readerOptions)),$n(t)]),o=new Yi(t,e);return await async function(t,e,r,n,o){const{onstart:a,onprogress:i,onend:s,onentryprogress:c}=n,u=e,l=Rc(e.children,t=>Nc(t)?0:1);let f=0,d=0;if(a&&await Dr(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(Nc(e))return;const{name:a,wr:s}=kc(e,u,n);let w=0;const h=await t.add(a,o.get(e),Object.assign(s,{onstart:U,onend:U,onprogress:async t=>{f+=t-w,w=t,i&&await Dr(i,f,r)}}));d++,c&&await Dr(c,d,l,h)}s&&await Dr(s,f)}(o,r,Rc([r],xc),e,n),await o.close(e.globalComment),t.getData?t.getData():t.writable}getExportedSize(r={}){const n=this;Mc((r=Object.assign({},r)).readerOptions),r.bufferedWrite===U&&(r.bufferedWrite=!0);const o=!r.bufferedWrite||!1!==r.keepOrder&&n.children.every(t=>!t.children.length);return async function(r,n,o,a){const i={options:r};if(nt(r[q]))throw new Error(ki);if(a!==U&&!(a instanceof Uint8Array))throw new Error(di);const s=Ps(a);if(s>e)throw new Error(fi);const c=r[G],u=new Map;let l=Boolean(c);const f=r[H]===U?0:r[H];let w=f,h=T;for(const t of n){let{name:e}=t;const{size:r}=t,n=Object.assign({},t.options);Fs(i,n,To)&&!e.endsWith(D)&&(e+=D);const o=es(i,e,n);({name:e}=o);const{Ae:a}=rs(i,e,n);0==a.level||a.compressionMethod!==U||a.passThrough||await gr(yt())||(a.level=0);const s=!Fs(i,n,To);if(s&&r===U)throw new Error(ki);const{Je:l,Ae:f}=os(i,s,r,a,n);if(s&&!a.passThrough&&Ms(f.compressionMethod,f.level))throw new Error(ki);const d=Object.assign({},n,o.Ae,a,f,{[G]:c}),p=as(d),m=cs(d),y={ze:p,Ue:Ps(p.Re,m.xe)};c&&is(y,w);const b=s?l:0;u.set(e,Object.assign({},d,p,{offset:w,diskNumberStart:0,compressedSize:b}));const E=y.Ue+b;h=Math.min(h,E),w+=E}if(u.size&&w-h>=t&&(l=!0),l&&!o)throw new Error(ki);const p=us(u);let m=Fs(i,r,Do);if(w>=t||p>=t||u.size>=e){if(!1===m)throw new Error(Ui);m=!0}return w-f+p+s+(m?98:d)}(r,n.getChildren({recursive:!0}).filter(t=>!Nc(t)).map(t=>{const{name:e,wr:o}=kc(t,n,r);return{name:e,size:t.directory?0:Cc(t,vc(t,r)),options:o}}),o,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 gc{constructor(){jc(this)}get children(){return this.root.children}remove(t){Tc(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=U}move(t,e){if(t==this.root)throw new Error("Root directory cannot be moved");if(!e.directory)throw new Error("Target entry is not a directory");if(e.isDescendantOf(t))throw new Error("Entry is a ancestor of target entry");if(t!=e){const r=e.getChildByName(t.name);if(r){if(r!=t)throw new Error(lc)}else Tc(t),t.parent=e,e.children.push(t),function(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)}}(this,t)}}find(t){const e=t.split("/");let r=this.root;for(let t=0;r&&t<e.length;t++)r=r.getChildByName(e[t]);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 jc(this),this.root.importBlob(t,e)}importData64URI(t,e){return jc(this),this.root.importData64URI(t,e)}importUint8Array(t,e){return jc(this),this.root.importUint8Array(t,e)}importHttpContent(t,e){return jc(this),this.root.importHttpContent(t,e)}importReadable(t,e){return jc(this),this.root.importReadable(t,e)}importZip(t,e){return jc(this),this.root.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 Ac={FS:gc,ZipDirectoryEntry:Sc,ZipFileEntry:Ec};function Rc(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 xc(t){return t.uncompressedSize}function Dc(t,e){const{data:r}=t;return e&&r instanceof Po?r.compressedSize:t.uncompressedSize}function zc(t){let e;return function(){if(e)throw new Error(fc);return e=!0,{readable:t}}}function Fc(t){return class extends mn{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,a=await e.entry.getData(new Rn,Object.assign(r,{checkPasswordOnly:!1,checkOverlappingEntry:o||n,checkOverlappingEntryOnly:!1,preventClose:!1}));e.data=a,e.pr=new An(a),e.size=a.size,super.init()}readUint8Array(t,e){return this.pr.readUint8Array(t,e)}}}function Oc(t,e,r){return t.prototype?new t(e,r):t(e,r)}async function Uc(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=Oc(t.Reader,t.data,e);o.set(t,r);try{await $n(r)}catch(e){try{e.entryId=t.id,e.cause={entry:t}}catch{}throw e}r.size!==U&&(t.uncompressedSize=r.size,t.lr=!1)})),o}function Tc(t){if(t.parent){const e=t.parent.children;e.forEach((r,n)=>{r.id==t.id&&e.splice(n,1)})}}function Ic(t){return Boolean(t)&&t.message==pc}function kc(t,e,n){const o=n.relativePath?t.getRelativeName(e):t.getFullname(),a=t.options||{};let i={},s={};if(t.data instanceof Po){const{externalFileAttributes:e,versionMadeBy:o,comment:c,lastModDate:u,rawLastModDate:l,creationDate:f,lastAccessDate:d,uncompressedSize:w,encrypted:h,zipCrypto:p,crc32:m,compressionMethod:y,extraFieldAES:b,internalFileAttributes:E,extraField:S,bitFlag:g,uid:A,gid:R}=t.data;i={externalFileAttributes:e,versionMadeBy:o,comment:c,lastModDate:u,creationDate:f,lastAccessDate:d,internalFileAttributes:E};const x=function(t){if(t){const e=new Map;if(t.forEach((t,r)=>{yc.has(r)||e.set(r,t.data)}),e.size)return e}}(S);if(x&&(i.extraField=x),A===U&&R===U||Object.assign(i,{uid:A,gid:R,unixExtraFieldType:"infozip"}),vc(t,n)){let t;b&&(t=b.strength),s={passThrough:!0,encrypted:h,zipCrypto:p,crc32:m,uncompressedSize:w,encryptionStrength:t,compressionMethod:y},g&&(s.dataDescriptor=g.dataDescriptor);const e=a.lastModDate===U?n.lastModDate:a.lastModDate;if(e===U)s.rawLastModDate=l;else if(p&&(!g||g.dataDescriptor)&&e 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}(e)!=(l>>>8&r))throw new Error(hc)}}const c=Object.assign({lastModDate:t.dr},i,n,a,s,{directory:t.directory});if(!t.directory&&c.passThrough&&c.uncompressedSize===U)throw new Error(dc);return{name:o,wr:c}}function Cc(t,e){const{reader:r}=t;return r&&r.size!==U?r.size:t.lr?U:Dc(t,e)}function Mc(t){if(t&&(typeof t!=C||Array.isArray(t)))throw new Error(wc);return t}function vc(t,e){const{readerOptions:r}=e;return Boolean(!t.directory&&(t.passThrough||r&&r.passThrough))}function Nc(t){return t.directory&&null===t.data}function _c(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 Bc(n)),"file"==n.kind){const t=await n.getFile();o.push(Pc(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===U&&(t.entryName=i)}catch{}throw t}}return o}(t,e,[])}async function Bc(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 Bc(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 jc(t){t.entries=[],t.ur=0,t.root=new Sc(t)}function Pc(t,e,r,n){if(t.directory)return n?new Sc(t.fs,e,r,t):new Ec(t.fs,e,r,t);throw new Error("Parent entry is not a directory")}export{An as BlobReader,Rn as BlobWriter,bn as Data64URIReader,En as Data64URIWriter,mc as ERR_ABORTED,$o as ERR_AMBIGUOUS_ARCHIVE,Wo as ERR_BAD_FORMAT,Vo as ERR_CENTRAL_DIRECTORY_NOT_FOUND,li as ERR_DUPLICATED_NAME,Ko as ERR_ENCRYPTED,ta as ERR_ENCRYPTED_CENTRAL_DIRECTORY,Qo as ERR_ENTRY_DATA_OUT_OF_BOUNDS,lc as ERR_ENTRY_EXISTS,Zo as ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND,Lo as ERR_EOCDR_NOT_FOUND,Go as ERR_EXTRAFIELD_ZIP64_NOT_FOUND,nn as ERR_HTTP_RANGE,on as ERR_HTTP_RESOURCE_CHANGED,qt as ERR_INVALID_AUTHENTICATION_CODE,_e as ERR_INVALID_CODEC_DEFINITION,je as ERR_INVALID_CODEC_MODULE,fi as ERR_INVALID_COMMENT,di as ERR_INVALID_COMMENT_TYPE,Ye as ERR_INVALID_COMPRESSED_DATA,Xe as ERR_INVALID_CRC32,pi as ERR_INVALID_DATE,bi as ERR_INVALID_ENCRYPTION_STRENGTH,wi as ERR_INVALID_ENTRY_COMMENT,hi as ERR_INVALID_ENTRY_COMMENT_TYPE,mi as ERR_INVALID_ENTRY_NAME,gi as ERR_INVALID_EXTRAFIELD,xi as ERR_INVALID_EXTRAFIELD_DATA,Ri as ERR_INVALID_EXTRAFIELD_DATA_TYPE,Ai as ERR_INVALID_EXTRAFIELD_TYPE,na as ERR_INVALID_FILENAME_VALIDATION,tt as ERR_INVALID_FUNCTION_OPTION,Ni as ERR_INVALID_GID,Li as ERR_INVALID_LEVEL,oa as ERR_INVALID_MAX_APPENDED_DATA_SIZE,ut as ERR_INVALID_MAX_WORKERS,Pi as ERR_INVALID_MSDOS_ATTRIBUTES,Wi as ERR_INVALID_MSDOS_DATA,Gt as ERR_INVALID_PASSWORD,rt as ERR_INVALID_PASSWORD_TYPE,dc as ERR_INVALID_PASS_THROUGH,wc as ERR_INVALID_READER_OPTIONS,et as ERR_INVALID_SIGNAL,Kt as ERR_INVALID_SIGNATURE,Zi as ERR_INVALID_SIGNATURE_DATA,ra as ERR_INVALID_STRICTNESS,vi as ERR_INVALID_UID,qe as ERR_INVALID_UNCOMPRESSED_SIZE,Bi as ERR_INVALID_UNIX_EXTRA_FIELD_TYPE,ji as ERR_INVALID_UNIX_ID_SIZE,_i as ERR_INVALID_UNIX_MODE,yi as ERR_INVALID_VERSION,an as ERR_ITERATOR_COMPLETED_TOO_SOON,Ho as ERR_LOCAL_FILE_HEADER_NOT_FOUND,Jo as ERR_OVERLAPPING_ENTRY,fc as ERR_READABLE_CONSUMED,Be as ERR_RESERVED_COMPRESSION_METHOD,Xo as ERR_SPLIT_ZIP_FILE,Ii as ERR_UNDEFINED_COMPRESSION_METHOD,Ci as ERR_UNDEFINED_READER,Ti as ERR_UNDEFINED_UNCOMPRESSED_SIZE,ki as ERR_UNDETERMINED_SIZE,ea as ERR_UNSAFE_FILENAME,Yo as ERR_UNSUPPORTED_COMPRESSION,Js as ERR_UNSUPPORTED_CONTEXT,Xt as ERR_UNSUPPORTED_CRYPTO_API,qo as ERR_UNSUPPORTED_ENCRYPTION,Si as ERR_UNSUPPORTED_ENCRYPTION_PASS_THROUGH,Ei as ERR_UNSUPPORTED_ENCRYPTION_USDZ,Ui as ERR_UNSUPPORTED_FORMAT,aa as ERR_UNSUPPORTED_UINT64,mr as ERR_WORKER_STARTUP_TIMEOUT,sn as ERR_WRITER_NOT_INITIALIZED,hc as ERR_ZIP_CRYPTO_LAST_MOD_DATE,Mi as ERR_ZIP_NOT_EMPTY,Hn as HttpRangeReader,Vn as HttpReader,mn as Reader,qn as SplitDataReader,Yn as SplitDataWriter,xn as TextReader,zn as TextWriter,Gn as Uint8ArrayReader,Kn as Uint8ArrayWriter,da as WARNING_APPENDED_DATA,ca as WARNING_COMPRESSED_PATCHED_DATA,pa as WARNING_DUPLICATE_FILENAME,ua as WARNING_MALFORMED_EXTRA_FIELD,ya as WARNING_MISMATCHED_LOCAL_FILE_HEADER_BIT_FLAG,ba as WARNING_MISMATCHED_LOCAL_FILE_HEADER_COMPRESSION_METHOD,Ea as WARNING_MISMATCHED_LOCAL_FILE_HEADER_CRC32_OR_SIZES,ma as WARNING_MISMATCHED_ZIP64_END_OF_CENTRAL_DIRECTORY,wa as WARNING_PREPENDED_DATA,ha as WARNING_TRAILING_CENTRAL_DIRECTORY_DATA,sa as WARNING_UNKNOWN_VERSION,la as WARNING_UNKNOWN_ZIP64_EXTENSIBLE_DATA,ia as WARNING_UNSORTED_CENTRAL_DIRECTORY,fa as WARNING_WRAPPED_ENTRIES_COUNT,yn as Writer,Sc as ZipDirectoryEntry,bc as ZipEntry,gc as ZipFS,Ec as ZipFileEntry,za as ZipReader,Fa as ZipReaderStream,Yi as ZipWriter,Xi as ZipWriterStream,St as configure,qs as createBlobTempStream,Gs as createOPFSTempStream,Qs as createSyncAccessHandleTempStream,Ac as fs,Zs as getMimeType,Oa as isZipFile,Ze as registerCodec,Dt as resetConfiguration,uc as terminateWorkers,Ve as unregisterCodec};