@zip.js/zip.js 2.13.0 → 2.13.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/deno.json +1 -1
- package/dist/zip-core-external.js +36 -12
- package/dist/zip-core-external.min.js +1 -1
- package/dist/zip-core.js +36 -12
- package/dist/zip-core.min.js +1 -1
- package/dist/zip-fs-core-external.js +36 -12
- package/dist/zip-fs-core-external.min.js +1 -1
- package/dist/zip-fs-core.js +36 -12
- package/dist/zip-fs-core.min.js +1 -1
- package/dist/zip-fs-external.js +36 -12
- package/dist/zip-fs-external.min.js +1 -1
- package/dist/zip-fs-native.js +36 -12
- package/dist/zip-fs-native.min.js +1 -1
- package/dist/zip-fs.js +36 -12
- package/dist/zip-fs.min.js +1 -1
- package/dist/zip-legacy.js +36 -12
- package/dist/zip-legacy.min.js +1 -1
- package/dist/zip-native.js +36 -12
- package/dist/zip-native.min.js +1 -1
- package/dist/zip.js +36 -12
- package/dist/zip.min.js +1 -1
- package/index-native.cjs +36 -12
- package/index-native.min.js +1 -1
- package/index.cjs +36 -12
- package/index.d.cts +6 -0
- package/index.d.ts +6 -0
- package/index.min.js +1 -1
- package/lib/core/codec-worker-web.js +35 -11
- package/lib/core/version.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
const t=4294967295,e=65535,r=255,n=67324752,o=134695760,i=o,a=84233040,s=33639248,c=101010256,u=101075792,l=117853008,f=46,d=22,w=20,p=56,h=39169,m=21589,y=6534,b=30837,E=30805,S=2048,g=61440,A=16384,R=2048,z=1024,x="/",D=30,F=new Date(2107,11,31,23,59,58),O=new Date(1980,0,1),T=void 0,I=1/0,U="undefined",k="function",C="object",v="string",M="boolean",N=new Uint8Array,_=Symbol.asyncDispose||Symbol(),j="password",B="rawPassword",P="passThrough",L="signal",W="useWebWorkers",Z="useCompressionStream",V="transferStreams",H="preventClose",G="level",K="useUnicodeFileNames",Y="dataDescriptor",q="offset",X="usdz",J="maxAppendedDataSize",Q="signCentralDirectory",$="entry",tt="filename",et="comment",rt="strict",nt="balanced",ot="tolerant",it="compressed",at="Invalid option (must be a function)",st="Invalid signal (must be an AbortSignal instance)",ct="Invalid password (password must be a string, rawPassword must be a Uint8Array)",ut="Invalid passThrough option (must be a boolean or 'compressed')",lt="The operation was aborted";function ft(t){if(t&&typeof t!=k)throw new Error(at);return t}function dt(t){if(t&&(typeof t.addEventListener!=k||typeof t.aborted!=M))throw new Error(st);return t||T}function wt(t){if(t&&t.aborted)throw t.reason===T?new DOMException(lt,"AbortError"):t.reason}function pt(t,e){if(t&&typeof t!=v||e&&!(e instanceof Uint8Array))throw new Error(ct)}function ht(t){if(t!==T&&typeof t!=M&&t!==it)throw new Error(ut);return t}function mt(t,e,r){if(!Number.isInteger(t)||t<0||t>e)throw new Error(r)}function yt(t,e,r){t!==T&&mt(t,e,r)}function bt(t){return typeof t==v&&t.trim()?Number(t):t}const Et="Invalid maxWorkers (must be an integer greater than 0)",St="Invalid baseURI (must be a string)",gt="Invalid URI (must be a string or a function returning a string)";let At=2;try{typeof navigator!=U&&navigator.hardwareConcurrency&&(At=navigator.hardwareConcurrency)}catch{}const Rt={workerURI:"./core/web-worker-wasm.js",wasmURI:"./core/streams/zlib-wasm/zlib-streams.wasm",chunkSize:65536,maxWorkers:At,terminateWorkerTimeout:5e3,workerStarvationTimeout:5e3,workerStartupTimeout:5e3,useWebWorkers:!0,useCompressionStream:!0,transferStreams:!0,CompressionStream:typeof CompressionStream!=U&&CompressionStream,DecompressionStream:typeof DecompressionStream!=U&&DecompressionStream},zt="maxWorkers",xt="baseURI",Dt=["wasmURI","workerURI"],Ft=["chunkSize",zt,"terminateWorkerTimeout","workerStarvationTimeout","workerStartupTimeout"],Ot=["createWorker","CompressionStream","DecompressionStream","CompressionStreamFallback","DecompressionStreamFallback"],Tt=[xt,...Dt,"useCompressionStream","useWebWorkers","transferStreams",...Ft,...Ot],It={...Rt};function Ut(){return It}function kt(t){return Ct(t.chunkSize)}function Ct(t){return t=bt(t),Number.isInteger(t)&&t>=1?Math.max(t,64):65536}function vt(t){Object.assign(It,Mt(_t(t)))}function Mt(t){const e={};for(const r of Tt){const n=t[r];n!==T&&(e[r]=Nt(r,n))}return e}function Nt(t,e){if(Ft.includes(t)){if(e=bt(e),t==zt&&(!Number.isInteger(e)||e<1))throw new Error(Et)}else if(Ot.includes(t))ft(e);else if(t==xt){if(e&&typeof e!=v)throw new Error(St)}else if(Dt.includes(t)&&e&&typeof e!=v&&typeof e!=k)throw new Error(gt);return e}function _t(t){t=t||{};const{CompressionStreamZlib:e,DecompressionStreamZlib:r}=t;if(e===T&&r===T)return t;const n=Object.assign({},t);return n.CompressionStreamFallback===T&&(n.CompressionStreamFallback=e),n.DecompressionStreamFallback===T&&(n.DecompressionStreamFallback=r),n}function jt(t){const e=Mt(_t(t));Object.assign(Rt,e),Object.assign(It,e)}function Bt(){for(const t of Tt)delete It[t];Object.assign(It,Rt)}function Pt(t,e){const r=new Uint8Array(t.length+e.length);return r.set(t),r.set(e,t.length),r}function Lt(t){return t.byteOffset||t.byteLength!=t.buffer.byteLength?new Uint8Array(t):t}function Wt(t){return new DataView(t.buffer,t.byteOffset,t.byteLength)}function Zt(t){return Boolean(t)&&"object"==typeof t}const Vt=[[],[],[],[],[],[],[],[]];for(let t=0;t<256;t++){let e=t;for(let t=0;t<8;t++)e=1&e?e>>>1^3988292384:e>>>1;Vt[0][t]=e}for(let t=0;t<256;t++)for(let e=1;e<8;e++){const r=Vt[e-1][t];Vt[e][t]=r>>>8^Vt[0][255&r]}const[Ht,Gt,Kt,Yt,qt,Xt,Jt,Qt]=Vt;class $t{constructor(t){this.o=t||-1}append(t){let e=0|this.o;const r=0|t.length;let n=0;if(r>=8&&t.buffer){const o=new DataView(t.buffer,t.byteOffset,r),i=r-8;for(;n<=i;n+=8){const t=e^o.getInt32(n,!0),r=o.getInt32(n+4,!0);e=Qt[255&t]^Jt[t>>>8&255]^Xt[t>>>16&255]^qt[t>>>24&255]^Yt[255&r]^Kt[r>>>8&255]^Gt[r>>>16&255]^Ht[r>>>24&255]}}for(;n<r;n++)e=e>>>8^Ht[255&(e^t[n])];this.o=e}get(){return~this.o}}class te extends TransformStream{constructor(){let t;const e=new $t;super({transform(t,r){e.append(t),r.enqueue(t)},flush(){const r=new Uint8Array(4);new DataView(r.buffer).setUint32(0,e.get()),t.value=r}}),t=this}}function ee(t){if(typeof TextEncoder==U){t=unescape(encodeURIComponent(t));const e=new Uint8Array(t.length);for(let r=0;r<e.length;r++)e[r]=t.charCodeAt(r);return e}return(new TextEncoder).encode(t)}const re={concat(t,e){if(0===t.length||0===e.length)return t.concat(e);const r=t[t.length-1],n=re.l(r);return 32===n?t.concat(e):re.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)+re.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]=re.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,i=re.l(o);return n.push(re.S(e+i&31,e+i>32?r:n.pop(),1)),n}},ne={bytes:{A(t){const e=re.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(re.S(8*(3&r),n)),e}}},oe=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.T=t.T.slice(0),e.I=t.I):e.reset()}reset(){const t=this;return t.O=t.D.slice(0),t.T=[],t.I=0,t}update(t){const e=this;"string"==typeof t&&(t=ne.U.R(t));const r=e.T=re.concat(e.T,t),n=e.I,o=e.I=n+re.bitLength(t);if(o>9007199254740991)throw new Error("Cannot hash more than 2^53 - 1 bits");const i=new Uint32Array(r);let a=0;for(let t=e.blockSize+n-(e.blockSize+n&e.blockSize-1);t<=o;t+=e.blockSize)e.C(i.subarray(16*a,16*(a+1))),a+=1;return r.splice(0,16*a),e}v(){const t=this;let e=t.T;const r=t.O;e=re.concat(e,[re.S(1,1)]);for(let t=e.length+2;15&t;t++)e.push(0);for(e.push(Math.floor(t.I/4294967296)),e.push(0|t.I);e.length;)t.C(e.splice(0,16));return t.reset(),r}M(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],i=r[1],a=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.M(t,i,a,s)+c+n[t]+e.F[Math.floor(t/20)]|0;c=s,s=a,a=e.N(30,i),i=o,o=r}r[0]=r[0]+o|0,r[1]=r[1]+i|0,r[2]=r[2]+a|0,r[3]=r[3]+s|0,r[4]=r[4]+c|0}},ie={importKey:t=>new ie._(ne.bytes.R(t)),j(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 i,a,s,c,u;const l=new ArrayBuffer(o),f=new DataView(l);let d=0;const w=re;for(e=ne.bytes.R(e),u=1;d<(o||1);u++){for(i=a=t.encrypt(w.concat(e,[u])),s=1;s<r;s++)for(a=t.encrypt(a),c=0;c<a.length;c++)i[c]^=a[c];for(s=0;d<(o||1)&&s<i.length;s++)f.setInt32(d,i[s]),d+=4}return l.slice(0,n/8)},_:class{constructor(t){const e=this,r=e.B=oe,n=[[],[]];e.P=[new r,new r];const o=e.P[0].blockSize/32;t.length>o&&(t=(new r).update(t).v());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.L=new r(e.P[0])}reset(){const t=this;t.L=new t.B(t.P[0]),t.W=!1}update(t){this.W=!0,this.L.update(t)}digest(){const t=this,e=t.L.v(),r=new t.B(t.P[1]).update(e).v();return t.reset(),r}encrypt(t){if(this.W)throw new Error("encrypt on already updated hmac called!");return this.update(t),this.digest(t)}}},ae=typeof crypto!=U&&typeof crypto.getRandomValues==k,se="Invalid password",ce="Invalid authentication code",ue="zipjs-abort-check-password",le="Crypto API not supported";function fe(t){if(ae)return crypto.getRandomValues(t);throw new Error(le)}const de=16,we={name:"PBKDF2"},pe=Object.assign({hash:{name:"HMAC"}},we),he=Object.assign({iterations:1e3,hash:{name:"SHA-1"}},we),me=["deriveBits"],ye=[8,12,16],be=[16,24,32],Ee=10,Se=[0,0,0,0],ge=typeof crypto!=U,Ae=ge&&crypto.subtle,Re=ge&&typeof Ae!=U,ze=ne.bytes,xe=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 i,a,s,c=1;if(4!==o&&6!==o&&8!==o)throw new Error("invalid aes key size");for(e.F=[a=t.slice(0),s=[]],i=o;i<4*o+28;i++){let t=a[i-1];(i%o===0||8===o&&i%o===4)&&(t=r[t>>>24]<<24^r[t>>16&255]<<16^r[t>>8&255]<<8^r[255&t],i%o===0&&(t=t<<8^t>>>24^c<<24,c=c<<1^283*(c>>7))),a[i]=a[i-o]^t}for(let t=0;i;t++,i--){const e=a[3&t?i:i-4];s[t]=i<=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=[],i=[];let a,s,c,u;for(let t=0;t<256;t++)i[(o[t]=t<<1^283*(t>>7))^t]=t;for(let l=a=0;!r[l];l^=s||1,a=i[a]||1){let i=a^a<<1^a<<2^a<<3^a<<4;i=i>>8^255&i^99,r[l]=i,n[i]=l,u=o[c=o[s=o[l]]];let f=16843009*u^65537*c^257*s^16843008*l,d=257*o[i]^16843008*i;for(let r=0;r<4;r++)t[r][l]=d=d<<24^d>>>8,e[r][i]=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],i=this.Z[e],a=i[0],s=i[1],c=i[2],u=i[3],l=i[4];let f,d,w,p=t[0]^r[0],h=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=a[p>>>24]^s[h>>16&255]^c[m>>8&255]^u[255&y]^r[b],d=a[h>>>24]^s[m>>16&255]^c[y>>8&255]^u[255&p]^r[b+1],w=a[m>>>24]^s[y>>16&255]^c[p>>8&255]^u[255&h]^r[b+2],y=a[y>>>24]^s[p>>16&255]^c[h>>8&255]^u[255&m]^r[b+3],b+=4,p=f,h=d,m=w;for(let t=0;t<4;t++)o[e?3&-t:t]=l[p>>>24]<<24^l[h>>16&255]<<16^l[m>>8&255]<<8^l[255&y]^r[b++],f=p,p=h,h=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=re.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 re.m(e,o)}},Fe=ie._;let Oe=ge&&Re&&typeof Ae.importKey==k,Te=ge&&Re&&typeof Ae.deriveBits==k;class Ie extends TransformStream{constructor({password:t,rawPassword:e,encryptionStrength:r,checkPasswordOnly:n,checkAuthenticationCode:o=!0}){super({start(){ke(this,t,e,r)},async transform(t,e){const r=this,{password:o,strength:i,et:a,ready:s}=r;o?(await async function(t,e,r,n){const o=await ve(t,e,r,Ne(n,0,ye[e])),i=Ne(n,ye[e]);if(o[0]!=i[0]||o[1]!=i[1])throw new Error(se)}(r,i,o,Ne(t,0,ye[i]+2)),t=Ne(t,ye[i]+2),n?e.error(new Error(ue)):a()):await s;const c=new Uint8Array(t.length-Ee-(t.length-Ee)%de);e.enqueue(Ce(r,t,c,0,Ee,!0))},async flush(t){const{nt:e,ot:r,it:n,ready:i}=this;if(r&&e){await i;const a=Ne(n,0,n.length-Ee),s=Ne(n,n.length-Ee);let c=N;if(a.length){const t=je(ze,a);r.update(t);const n=e.update(t);c=_e(ze,n)}const u=Ne(_e(ze,r.digest()),0,Ee);let l=n.length<Ee?1:0;for(let t=0;t<Ee;t++)l|=u[t]^s[t];if(l&&o)throw new Error(ce);t.enqueue(c)}}})}}class Ue extends TransformStream{constructor({password:t,rawPassword:e,encryptionStrength:r}){super({start(){ke(this,t,e,r)},async transform(t,e){const r=this,{password:n,strength:o,et:i,ready:a}=r;let s=N;n?(s=await async function(t,e,r){const n=fe(new Uint8Array(ye[e]));return Pt(n,await ve(t,e,r,n))}(r,o,n),i()):await a;const c=new Uint8Array(s.length+t.length-t.length%de);c.set(s,0),e.enqueue(Ce(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 i=N;if(n.length){const t=e.update(je(ze,n));r.update(t),i=_e(ze,t)}const a=_e(ze,r.digest()).slice(0,Ee);t.enqueue(Pt(i,a))}}})}}function ke(t,e,r,n){Object.assign(t,{ready:new Promise(e=>t.et=e),password:Me(e,r),strength:n-1,it:N})}function Ce(t,e,r,n,o,i){const{nt:a,ot:s,it:c}=t;c.length&&(e=Pt(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%de)),l=0;l<=u-de;l+=de){const t=je(ze,Ne(e,l,l+de));i&&s.update(t);const o=a.update(t);i||s.update(o),r.set(_e(ze,o),l+n)}return t.it=Ne(e,l),r}async function ve(t,e,r,n){t.password=null;const o=await async function(t,e,r,n,o){if(!Oe)return ie.importKey(e);try{return await Ae.importKey("raw",e,r,!1,o)}catch{return Oe=!1,ie.importKey(e)}}(0,r,pe,0,me),i=await async function(t,e,r){if(!Te)return ie.j(e,t.salt,he.iterations,r);try{return await Ae.deriveBits(t,e,r)}catch{return Te=!1,ie.j(e,t.salt,he.iterations,r)}}(Object.assign({salt:n},he),o,8*(2*be[e]+2)),a=new Uint8Array(i),s=je(ze,Ne(a,0,be[e])),c=je(ze,Ne(a,be[e],2*be[e])),u=Ne(a,2*be[e]);return Object.assign(t,{keys:{key:s,st:c,passwordVerification:u},nt:new De(new xe(s),Array.from(Se)),ot:new Fe(c)}),u}function Me(t,e){return e===T?ee(t):e}function Ne(t,e,r){return t.subarray(e,r)}function _e(t,e){return t.A(e)}function je(t,e){return t.R(e)}class Be extends TransformStream{constructor({password:t,rawPassword:e,passwordVerification:r,checkPasswordOnly:n}){super({start(){Le(this,t,e,r)},transform(t,e){const r=this;if(r.password||r.rawPassword){const e=We(r,t.subarray(0,12));if(r.password=r.rawPassword=null,0!=(e[11]^r.passwordVerification))throw new Error(se);t=t.subarray(12)}n?e.error(new Error(ue)):e.enqueue(We(r,t))}})}}class Pe extends TransformStream{constructor({password:t,rawPassword:e,passwordVerification:r}){super({start(){Le(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=fe(new Uint8Array(12));e[11]=r.passwordVerification,n=new Uint8Array(t.length+e.length),n.set(Ze(r,e),0),o=12}else n=new Uint8Array(t.length),o=0;n.set(Ze(r,t),o),e.enqueue(n)}})}}function Le(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 $t(n[0]),ut:new $t(n[2])}),r)for(let e=0;e<r.length;e++)Ve(t,r[e]);else for(let r=0;r<e.length;r++)Ve(t,e.charCodeAt(r))}(t,e,r)}function We(t,e){const r=new Uint8Array(e.length);for(let n=0;n<e.length;n++)r[n]=He(t)^e[n],Ve(t,r[n]);return r}function Ze(t,e){const r=new Uint8Array(e.length);for(let n=0;n<e.length;n++)r[n]=He(t)^e[n],Ve(t,e[n]);return r}function Ve(t,e){let[,r]=t.keys;t.ct.append([e]);const n=~t.ct.get();r=Ke(Math.imul(Ke(r+Ge(n)),134775813)+1),t.ut.append([r>>>24]);const o=~t.ut.get();t.keys=[n,r,o]}function He(t){const e=2|t.keys[2];return Ge(Math.imul(e,1^e)>>>8)}function Ge(t){return 255&t}function Ke(t){return 4294967295&t}function Ye(t){if(t instanceof ReadableStream)return t;const e=t.getReader();return new ReadableStream({async pull(t){const{value:r,done:n}=await e.read();n?t.close():t.enqueue(r)},cancel:t=>e.cancel(t)})}function qe(t,e){t=Ye(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 Xe(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 Je="Invalid codec definition",Qe="Reserved compression method",$e="Invalid codec module",tr="Compression method not supported",er=[0,8,9,99],rr=new Map,nr=new Map;function or(t={}){const{compressionMethod:r,format:n,codecURI:o,CompressionStream:i,DecompressionStream:a,versionNeeded:s}=t;if(!Number.isInteger(r)||r<0||r>e||typeof n!=v||!n.length)throw new Error(Je);if(er.includes(r))throw new Error(Qe);const c=typeof i==k||typeof a==k;if(!(c||typeof o==v&&o.length))throw new Error(Je);rr.set(r,{compressionMethod:r,format:n,codecURI:o,versionNeeded:s}),c&&ur(n,{CompressionStream:i,DecompressionStream:a})}function ir(t){const e=rr.get(t);if(e){let r;rr.delete(t),rr.forEach(t=>r=r||t.format==e.format),r||nr.delete(e.format)}}function ar(t){return rr.get(t)}function sr(){return Array.from(rr.values(),t=>Object.assign({},t,nr.get(t.format)))}function cr(t){return nr.get(t)}function ur(t,e){const{CompressionStream:r,DecompressionStream:n}=e;if(typeof r!=k&&typeof n!=k)throw new Error($e);nr.set(t,{CompressionStream:r,DecompressionStream:n})}const lr="Invalid uncompressed size",fr="Invalid compressed data",dr="Invalid CRC32",wr="deflate-raw",pr="deflate64-raw",hr="gzip",mr=[31,139,8];class yr extends TransformStream{constructor(t,{chunkSize:e,CompressionStreamFallback:r,CompressionStream:n}){super({});const{compressed:o,encrypted:i,useCompressionStream:a,zipCrypto:s,computeCrc32:c,level:u,deflate64:l,format:f,compressionMethod:d,inputSize:w}=t,p=this;let h,m,y,b=super.readable;const E=f&&cr(f),S=c&&o&&!l&&!E&&(!i||s)&&Boolean(a&&n);if(i&&!s||!c||S||(h=new te,b=Dr(b,h)),o)if(E)b=Fr(b,zr(E.CompressionStream,f,{level:u,chunkSize:e,compressionMethod:d,uncompressedSize:w}));else if(S)y=new br,b=Fr(b,new n(hr)),b=Dr(b,y);else try{b=xr(b,a,{level:u,chunkSize:e},n,r)}catch(t){let e;try{e=new n(hr)}catch{throw t}b=Fr(b,e),b=Dr(b,new br)}i&&(s?b=Dr(b,new Pe(t)):(m=new Ue(t),b=Dr(b,m))),Rr(p,b,()=>{i&&!s||!c||(p.crc32=S?y.crc32:new DataView(h.value.buffer).getUint32(0))})}}class br extends TransformStream{constructor(){let t,e=10,r=new Uint8Array(0);super({transform(t,n){if(e){const r=Math.min(e,t.length);if(e-=r,!(t=t.subarray(r)).length)return}const o=r.length+t.length;if(o<=8)return void(r=Pt(r,t));const i=o-8,a=Math.min(i,r.length);n.enqueue(Pt(r.subarray(0,a),t.subarray(0,i-a))),r=Pt(r.subarray(a),t.subarray(i-a))},flush(){const e=Wt(r);t.crc32=e.getUint32(0,!0),t.uncompressedSize=e.getUint32(4,!0)}}),t=this}}class Er extends TransformStream{constructor(t,{chunkSize:e,DecompressionStreamFallback:r,DecompressionStream:n}){super({});const{zipCrypto:o,encrypted:i,checkCrc32:a,crc32:s,compressed:c,useCompressionStream:u,deflate64:l,format:f,compressionMethod:d,rawBitFlag:w,outputSize:p}=t;let h,m,y=super.readable;if(i&&(o?y=Dr(y,new Be(t)):(m=new Ie(t),y=Dr(y,m))),c){const t=f&&cr(f);if(t)y=Fr(y,zr(t.DecompressionStream,f,{chunkSize:e,compressionMethod:d,rawBitFlag:w,uncompressedSize:p}));else try{y=xr(y,u,{chunkSize:e,deflate64:l},n,r)}catch(t){if(l||p===T)throw t;let e;try{e=new n(hr)}catch{throw t}y=function(t,e,r){const n=new $t;let o,i,a,s=0,c=!1;const u=new Promise((t,e)=>{i=t,a=e});u.catch(()=>{}),r||i();const l=new TransformStream({start(t){const e=new Uint8Array(10);e.set(mr),t.enqueue(e)},transform(t,e){e.enqueue(t)},async flush(t){c=!0,d();try{await u}finally{w()}const e=new Uint8Array(8),o=Wt(e);o.setUint32(0,n.get(),!0),o.setUint32(4,r,!0),t.enqueue(e)},cancel(t){a(t)}}),f=new TransformStream({transform(t,e){n.append(t),s+=t.length,s>=r?i():c&&d(),e.enqueue(t)},cancel(t){a(t)}});return t=Dr(t,l),Dr(t=Fr(t,e),f);function d(){w(),o=setTimeout(()=>a(new Error(lr)),5e3)}function w(){clearTimeout(o)}}(y,e,p)}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(fr);throw e.cause=t,e}const{value:n,done:o}=r;o?t.close():t.enqueue(n)},cancel:t=>e.cancel(t)})}(y)}a&&(h=new te,y=Dr(y,h)),Rr(this,y,()=>{if(a){const t=new DataView(h.value.buffer);if(s!=t.getUint32(0,!1))throw new Error(dr)}})}}const Sr=new Map;function gr(t,e){if(!t)return!1;let r=Sr.get(t);r||(r=new Map,Sr.set(t,r));let n=r.get(e);if(n===T){try{new t(e),n=!0}catch{n=!1}r.set(e,n)}return n}function Ar(t){return gr(t,wr)}function Rr(t,e,r){e=Dr(e,new TransformStream({flush:r})),Object.defineProperty(t,"readable",{get:()=>e})}function zr(t,e,r){if(!t)throw new Error(tr);return new t(e,r)}function xr(t,e,r,n,o){const i=e&&n?n:o||n,a=r.deflate64?pr:wr;let s;try{s=new i(a,r)}catch(t){if(!e||!o||i==o)throw t;s=new o(a,r)}return Fr(t,s)}function Dr(t,e){return Ye(t).pipeThrough(e)}function Fr(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 Or="data",Tr="deflate",Ir="inflate";class Ur extends TransformStream{constructor(t,e){super({});const r=this,{codecType:n}=t;let o;n.startsWith(Tr)?o=yr:n.startsWith(Ir)&&(o=Er),r.outputSize=0;let i=0;const a=new o(t,e),s=super.readable,c=new TransformStream({transform(t,e){t&&t.length&&(i+=t.length,e.enqueue(t))},flush(){Object.assign(r,{inputSize:i})}}),u=new TransformStream({transform(e,n){if(e&&e.length&&(n.enqueue(e),r.outputSize+=e.length,t.outputSize!==T&&r.outputSize>t.outputSize))throw new Error(lr)},flush(){const{crc32:t}=a;Object.assign(r,{crc32:t,inputSize:i})}});Object.defineProperty(r,"readable",{get:()=>s.pipeThrough(c).pipeThrough(a).pipeThrough(u)})}}class kr extends TransformStream{constructor(t){const e=[];let r=0,n=0;function o(){const n=new Uint8Array(t);let o=0;for(;o<t;){const r=e[0],i=t-o;r.length<=i?(n.set(r,o),o+=r.length,e.shift()):(n.set(r.subarray(0,i),o),e[0]=r.subarray(i),o+=i)}return r-=t,n}(!Number.isFinite(t)||t<1)&&(t=65536),super({transform(i,a){for(e.push(i),r+=i.length;r>t;)n+=t,a.enqueue(o())},flush(t){r&&(n+=r,t.enqueue(function(t,e){const r=new Uint8Array(e);let n=0;for(const e of t)r.set(e,n),n+=e.length;return r}(e,r)))}}),Object.defineProperty(this,"outputSize",{get:()=>n})}}const Cr="Worker startup timeout";let vr,Mr,Nr,_r=()=>{};async function jr(t){const{CompressionStream:e,CompressionStreamFallback:r}=t;if(r&&!r.lt)return!0;if(Ar(e)||gr(e,hr))return!0;if(r)try{return await _r(t),!0}catch{return!1}return!1}function Br(t){t.createWorker?Mr=!0:vr=!1}class Pr{constructor(t,{readable:e,writable:r},n,o){const{options:i,config:a,ft:s,useWebWorkers:c,transferStreams:u,workerURI:l}=n;let{createWorker:f}=n;const{signal:d}=s;return Mr&&(f=T),Object.assign(t,{wt:!0,ht:(t.ht||0)+1,readable:e.pipeThrough(new kr(kt(a))).pipeThrough(new Lr(s),{signal:d}),writable:r,options:Object.assign({},i),yt:n,workerURI:l,createWorker:f,transferStreams:u,terminate:()=>new Promise(e=>{const{bt:r,wt:n}=t;r?(n?t.Et=e:(r.terminate(),e()),t.St=null):e()}),gt(){if(t.wt){const{Et:e}=t;e&&(t.Et=null,t.At=!0,t.bt.terminate(),e()),t.wt=!1,o(t)}}}),vr===T&&(vr=typeof Worker!=U),(c&&Nr&&(vr&&l||f)?Nr:Zr)(t,a)}}class Lr extends TransformStream{constructor({onstart:t,onprogress:e,size:r,onend:n}){let o=0;super({async start(){t&&await Wr(t,r)},async transform(t,n){o+=t.length,e&&await Wr(e,o,r),n.enqueue(t)},async flush(){n&&await Wr(n,o)}})}}async function Wr(t,...e){try{await t(...e)}catch{}}function Zr(t,e){return{run:()=>Vr(t,e)}}async function Vr({options:t,readable:e,writable:r,gt:n,yt:o},i){let a,s;try{if(t.compressed&&!t.format){const e=t.codecType.startsWith(Tr),r=e?i.CompressionStreamFallback:i.DecompressionStreamFallback,n=e?i.CompressionStream:i.DecompressionStream;if(t.useCompressionStream){if(r&&r.lt&&!Ar(n))try{await _r(i)}catch{}}else try{await _r(i)}catch{r&&!r.lt||(t.useCompressionStream=!0)}}a=new Ur(t,i),s=new kr(kt(i)),await e.pipeThrough(a).pipeThrough(s).pipeTo(r,{preventClose:!0,preventAbort:!0});const{crc32:n,inputSize:o,outputSize:c}=a;return{crc32:n,inputSize:o,outputSize:c}}catch(t){if(a){const e=s?s.outputSize:0;if(o.outputSize=e,Zt(t))try{t.outputSize=e}catch{}}throw t}finally{n()}}const Hr={type:"module"},Gr="error";let Kr,Yr,qr,Xr=!0;try{Xr=typeof structuredClone==k&&structuredClone(new DOMException("","AbortError")).code!==T}catch{}var Jr;function Qr(t){const{reader:e}=t;e&&e.releaseLock(),t.reader=null,t.writer=null}function $r(t){const{bt:e}=t;if(e)try{e.terminate()}catch{}t.St=null}function tn(t,e,r,n,o=!0){const{createWorker:i}=r;let a,s,c;if(i)a=i();else if(Yr===T||Kr!==t){const i=typeof t==k;s=i?t(o):t;const u=s.startsWith("data:"),l=s.startsWith("blob:");if(u||l){n===T&&(n=!1),n&&(c=Hr);try{a=new Worker(s,c)}catch(o){if(l)try{URL.revokeObjectURL(s)}catch{}if(i&&l)return tn(t,e,r,n,!1);if(n)throw o;return tn(t,e,r,!0,!1)}}else{n===T&&(n=!0),n&&(c=Hr);try{s=new URL(s,e)}catch{}try{a=new Worker(s,c)}catch(i){if(n)return tn(t,e,r,!1,o);throw i}}Kr=t,Yr=s,qr=c}else a=new Worker(Yr,qr);return a.addEventListener("message",t=>{r.Rt=!0,en(r),async function({data:t},e){const{type:r,value:n,messageId:o,result:i,error:a,errorValue:s}=t,{reader:c,writer:u,zt:l,xt:f,gt:d,ht:w}=e,p=()=>e.ht!=w;try{if(a)a.outputSize!==T&&(e.outputSize=a.outputSize),h(function(t,e){const{message:r,stack:n,code:o,name:i,outputSize:a,cause:s,codecImportFailed:c}=t;let u;if(e?u=e.value:(u=Object.assign(new Error(r),{stack:n,code:o,name:i}),s&&(u.cause=Object.assign(new Error(s.message),{name:s.name}))),Zt(u))try{a!==T&&(u.outputSize=a),c&&(u.codecImportFailed=!0),e&&(u.name!==i&&(u.name=i),u.code!==o&&(u.code=o))}catch{}return u}(a,s));else{if("pull"==r){const{value:t,done:r}=await c.read();p()||nn({type:Or,value:t,done:r,messageId:o},e)}if(r==Or){const t=new Uint8Array(n);await u.ready,await u.write(t),e.outputSize+=t.length,p()||nn({type:"ack",messageId:o},e)}"close"==r&&function(t){p()||(l(t),m(),d())}(i)}}catch(a){p()||($r(e),h(a))}function h(t){p()||(f(t),m(),Zt(t)&&t.codecImportFailed||d())}function m(){u&&u.releaseLock()}}(t,r)}),a.addEventListener(Gr,t=>rn(t,r)),a.addEventListener("messageerror",t=>rn(t,r)),a}function en(t){const{Dt:e}=t;e&&(clearTimeout(e),t.Dt=null)}function rn(t,e){t.preventDefault&&t.preventDefault(),en(e);const{Rt:r,xt:n,writer:o,gt:i}=e;$r(e),r||(e.bt=null);let a=t.error||new Error(t.message||Gr);r||(a=Object.assign(new Error(a.message||Gr),{Ft:!0}),e.Ot=a),n&&(n(a),o&&o.releaseLock(),r&&i())}function nn(t,{bt:e,writer:r,transferStreams:n,Rt:o}){try{const{value:r,readable:i,writable:a}=t,s=[];if(r&&(t.value=Lt(r),s.push(t.value.buffer)),n&&Xr&&o?(i&&s.push(i),a&&s.push(a)):t.readable=t.writable=null,s.length)try{return e.postMessage(t,s),!0}catch{Xr=!1,t.readable=t.writable=null,e.postMessage(t)}else e.postMessage(t)}catch(t){throw r&&r.releaseLock(),t}}Jr=function(t,e){const{baseURI:r,chunkSize:n,workerStartupTimeout:o}=e;let{wasmURI:i}=e;if(!t.St){let a;typeof i==k&&(i=i());try{a=tn(t.workerURI,r,t)}catch{return Br(t),Zr(t,e)}Object.assign(t,{bt:a,Rt:!1,At:!1,Ot:null,St:{run:async()=>{try{return await async function(t,e){if(!t.bt){const{Ot:e}=t;t.Ot=null;const r=e||new Error(Cr);throw r.Ft=!0,r}let r,n;const o=new Promise((e,o)=>{r=e,n=e=>{const{outputSize:r,yt:n}=t;if(n.outputSize=r,Zt(e)&&e.outputSize===T)try{e.outputSize=r}catch{}o(e)}});Object.assign(t,{reader:null,writer:null,outputSize:0,zt:r,xt:n,result:o});const{readable:i,options:a}=t,{writable:s,closed:c,Tt: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,Tt:()=>e.abort()}}(t.writable);let l;try{l=nn({type:"start",options:a,config:e,readable:i,writable:s},t)}catch(e){u();try{await c}catch{}throw t.gt(),e}l||Object.assign(t,{reader:i.getReader(),writer:s.getWriter()});const{workerStartupTimeout:f}=e;!t.Rt&&Number.isFinite(f)&&f>=0&&(t.Dt=setTimeout(()=>function(t){if(t.Dt=null,t.Rt)return;const{xt:e,writer:r}=t;if($r(t),t.bt=null,e){const t=new Error(Cr);t.Ft=!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:i,baseURI:r,workerStartupTimeout:o})}catch(r){if(r&&r.Ft)return Br(t),Qr(t),Vr(t,e);if(r&&r.codecImportFailed){if(t.reader)return Qr(t),Vr(t,e);t.gt()}throw r}}}})}return t.St},Nr=Jr;let on=[];const an=[];let sn,cn,un=0;async function ln(t,e){const{options:r,config:n}=e,{transferStreams:o,useWebWorkers:i,useCompressionStream:a,compressed:s,checkCrc32:c,computeCrc32:u,encrypted:l,format:f,codecURI:d}=r,{workerURI:w,createWorker:p,maxWorkers:h}=n;f&&(d&&(r.codecURI=function(t,e){try{return new URL(t,e).toString()}catch{return t}}(d,n.baseURI)),await async function(t,e){!nr.has(t)&&e&&ur(t,await(import(/* webpackIgnore: true */ /* @vite-ignore */e)))}(f,r.codecURI)),e.transferStreams=!f&&(o||o===T&&n.transferStreams);const m=!(s||c||u||l),y=f===T||Boolean(r.codecURI);return e.useWebWorkers=!m&&y&&(i||i===T&&n.useWebWorkers),e.workerURI=e.useWebWorkers&&w?w:T,e.createWorker=e.useWebWorkers&&p?p:T,r.useCompressionStream=a||a===T&&n.useCompressionStream,(await async function(){const r=on.find(t=>!t.wt);if(r)return hn(r),new Pr(r,t,e,b);if(on.length<h){const r={It:un};return un++,on.push(r),new Pr(r,t,e,b)}return new Promise(r=>{an.push({resolve:r,stream:t,yt:e}),cn=n.workerStarvationTimeout,fn()})}()).run();function b(t){if(dn(),an.length){const[{resolve:e,stream:r,yt:n}]=an.splice(0,1);e(new Pr(t,r,n,b)),fn()}else t.bt?(hn(t),function(t,e){const{config:r}=e,{terminateWorkerTimeout:n}=r;Number.isFinite(n)&&n>=0&&(t.At?t.At=!1:t.Ut=setTimeout(async()=>{on=on.filter(e=>e!=t);try{await t.terminate()}catch{}},n))}(t,e)):on=on.filter(e=>e!=t)}}function fn(){!sn&&an.length&&Number.isFinite(cn)&&cn>=0&&(sn=setTimeout(wn,cn))}function dn(){sn&&(clearTimeout(sn),sn=null)}function wn(){if(sn=null,an.length){const[{resolve:t,stream:e,yt:r}]=an.splice(0,1),n=Object.assign({},r,{useWebWorkers:!1,workerURI:T,createWorker:T});t(new Pr({},e,n,pn)),fn()}}function pn(){dn(),fn()}function hn(t){const{Ut:e}=t;e&&(clearTimeout(e),t.Ut=null)}const mn="\0\u263a\u263b\u2665\u2666\u2663\u2660\u2022\u25d8\u25cb\u25d9\u2642\u2640\u266a\u266b\u263c\u25ba\u25c4\u2195\u203c\xb6\xa7\u25ac\u21a8\u2191\u2193\u2192\u2190\u221f\u2194\u25b2\u25bc !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\u2302\xc7\xfc\xe9\xe2\xe4\xe0\xe5\xe7\xea\xeb\xe8\xef\xee\xec\xc4\xc5\xc9\xe6\xc6\xf4\xf6\xf2\xfb\xf9\xff\xd6\xdc\xa2\xa3\xa5\u20a7\u0192\xe1\xed\xf3\xfa\xf1\xd1\xaa\xba\xbf\u2310\xac\xbd\xbc\xa1\xab\xbb\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255d\u255c\u255b\u2510\u2514\u2534\u252c\u251c\u2500\u253c\u255e\u255f\u255a\u2554\u2569\u2566\u2560\u2550\u256c\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256b\u256a\u2518\u250c\u2588\u2584\u258c\u2590\u2580\u03b1\xdf\u0393\u03c0\u03a3\u03c3\xb5\u03c4\u03a6\u0398\u03a9\u03b4\u221e\u03c6\u03b5\u2229\u2261\xb1\u2265\u2264\u2320\u2321\xf7\u2248\xb0\u2219\xb7\u221a\u207f\xb2\u25a0\xa0".split("");function yn(t,e){return bn(t,e,!0)}function bn(t,e,r){return e&&"cp437"==e.trim().toLowerCase()?function(t){let e="";for(let r=0;r<t.length;r++)e+=mn[t[r]];return e}(t):new TextDecoder(e,{ignoreBOM:r}).decode(t)}const En="HTTP error ",Sn="HTTP Range not supported",gn="HTTP resource changed",An="Writer iterator completed too soon",Rn="Writer not initialized",zn="Invalid writer (size must be writable)",xn="Content-Range",Dn="Range",Fn="GET",On="bytes",Tn=16777216,In="writable",Un=Symbol();class kn{constructor(){this.size=0}init(){this.initialized=!0}}class Cn extends kn{get readable(){return this.createReadable()}createReadable({offset:t=0,size:e,chunkSize:r=kt(Ut())}={}){const n=this;let o=0;return r=Ct(r),new ReadableStream({async pull(i){const a=e===T?r:Math.min(r,e-o),s=await Eo(n,t+o,a);s.length&&(i.enqueue(s),o+=s.length),(e!==T&&o>=e||!s.length&&a)&&i.close()}})}}class vn extends kn{constructor(){super();const t=this,e=new WritableStream({write(e){if(!t.initialized)throw new Error(Rn);return t.writeUint8Array(Lt(e))}});Object.defineProperty(t,In,{get:()=>e})}writeUint8Array(){}}class Mn extends Cn{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),i=4*Math.floor(t/3),a=atob(n.substring(i+r,4*Math.ceil((t+e)/3)+r)),s=t-3*Math.floor(i/4);let c=0;for(let t=s;t<s+e&&t<a.length;t++)o[t-s]=a.charCodeAt(t),c++;return c<o.length?o.subarray(0,c):o}}class Nn extends vn{constructor(t){super(),Object.assign(this,{contentType:t,data:"data:"+(t||"")+";base64,",vt:""})}writeUint8Array(t){const e=this;let r,n=e.vt;const o=e.vt.length;for(e.vt="",r=0;r<3*Math.floor((o+t.length)/3)-o;r++)n+=String.fromCharCode(t[r]);for(;r<t.length;r++)e.vt+=String.fromCharCode(t[r]);n.length>2?e.data+=btoa(n):e.vt=n+e.vt}getData(){return this.data+btoa(this.vt)}}let _n,jn;class Bn extends Cn{constructor(t){super(),Object.assign(this,{Mt:t,size:t.size}),jn||(jn=(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();_n=1==e}catch{_n=!1}})())}createReadable(t){const{Mt:e,size:r}=this,{offset:n=0,size:o=r-n}=t||{};if(typeof e.stream==k){if(!n&&o>=r)return Ye(e.stream());if(_n)return Ye(e.slice(n,n+o).stream())}return super.createReadable(t)}async readUint8Array(t,e){const r=this,n=t+e,o=!t&&n>=r.size?r.Mt:r.Mt.slice(t,n);let i=await o.arrayBuffer();return i.byteLength>e&&(i=i.slice(t,n)),new Uint8Array(i)}}class Pn extends kn{constructor(t){super();const e=this,r=new TransformStream;Object.defineProperty(e,In,{get:()=>r.writable}),e.contentType=t,e.Nt=qe(r.readable,t),e.Nt.catch(()=>{})}getData(){return this.Nt}}class Ln extends Bn{constructor(t){super(new Blob([t],{type:"text/plain"}))}}function Wn(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 Pn{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 bn(t,e,!1)}(new Uint8Array(await r.arrayBuffer()),t)}}class Vn extends Cn{constructor(t,e){super(),Gn(this,t,e)}async init(){await Kn(this,io,eo),super.init()}createReadable(t){const e=this,{useRangeHeader:r,forceRangeRequests:n,size:o}=e;if((r||n)&&o!==T){const{offset:r=0,size:n=o-r}=t||{};if(n>0&&r<o)return function(t,e,r){let n,o=e,i=0,a=r;return new ReadableStream({start:()=>s(),async pull(t){n||await s();const{value:e,done:r}=await n.read();if(r)throw new Error(Sn);const o=e.length>i?e.subarray(0,i):e;i-=o.length,a-=o.length,o.length&&t.enqueue(o),i||(await async function(){const t=n;n=T,await t.cancel()}(),a||t.close())},cancel:t=>n&&n.cancel(t)});async function s(){const e=Math.min(t.maximumRangeSize,a),r=await io(Fn,t,$n(t,o,e));if(206!=r.status)throw new Error(Sn);const s=r.headers.get(xn);if(s){const t=Number(s.trim().split(/[\s-]+/)[1]);if(!Number.isNaN(t)&&t!=o)throw new Error(Sn)}Qn(t,r),Jn(t,r),o+=e,i=e,n=r.body.getReader()}}(e,r,Math.min(n,o-r))}return super.createReadable(t)}readUint8Array(t,e){return Yn(this,t,e,io,eo)}}class Hn extends Cn{constructor(t,e){super(),Gn(this,t,e)}async init(){await Kn(this,ao,ro),super.init()}readUint8Array(t,e){return Yn(this,t,e,ao,ro)}}function Gn(t,e,r){const{preventHeadRequest:n,useRangeHeader:o,forceRangeRequests:i,combineSizeEocd:a,checkResourceChanges:s=!0,maximumRangeSize:c=Tn,fetch:u}=r;delete(r=Object.assign({},r)).preventHeadRequest,delete r.useRangeHeader,delete r.forceRangeRequests,delete r.combineSizeEocd,delete r.checkResourceChanges,delete r.maximumRangeSize,delete r.useXHR,delete r.fetch,Object.assign(t,{url:e,options:r,preventHeadRequest:n,useRangeHeader:o,forceRangeRequests:i,combineSizeEocd:a,checkResourceChanges:s,maximumRangeSize:c,fetch:u})}async function Kn(t,e,r){const{url:n,preventHeadRequest:o,useRangeHeader:i,forceRangeRequests:a,combineSizeEocd:s}=t;if(function(t){const{baseURI:e}=Ut(),{protocol:r}=new URL(t,e);return"http:"==r||"https:"==r}(n)&&(i||a)&&(typeof o==U||o)){const n=await e(Fn,t,$n(t,s?-22:void 0)),o=n.headers.get("Accept-Ranges");if(!(a||o&&o.toLowerCase()==On))throw new Error(Sn);{if(s){const e=new Uint8Array(await n.arrayBuffer());206==n.status&&e.length==d&&(t.jt=e)}Jn(t,n);const o=qn(n);o===T?await oo(t,e,r):t.size=o}}else await oo(t,e,r)}async function Yn(t,e,r,n,o){const{useRangeHeader:i,forceRangeRequests:a,jt:s,size:c,options:u}=t;if(i||a){if(s&&e==c-d&&r==d)return s;if(e>=c||0===r)return N;{e+r>c&&(r=c-e);const o=await n(Fn,t,$n(t,e,r));if(206!=o.status)throw new Error(Sn);const i=o.headers.get(xn);if(i){const t=Number(i.trim().split(/[\s-]+/)[1]);if(!Number.isNaN(t)&&t!=e)throw new Error(Sn)}Qn(t,o),Jn(t,o);const a=new Uint8Array(await o.arrayBuffer());if(a.length!=r)throw new Error(Sn);return a}}{const{data:n}=t;return n||await o(t,u),t.data.subarray(e,e+r)}}function qn(t){const e=t.headers.get(xn);if(e){const t=e.trim().split(/\s*\/\s*/)[1];if(t&&"*"!=t){const e=Number(t);if(!Number.isNaN(e))return e}}}function Xn({headers:t}){return{Bt:t.get("Etag")||T,lastModified:t.get("Last-Modified")||T}}function Jn(t,e){const{checkResourceChanges:r,Pt:n}=t;r&&!n&&206==e.status&&(t.Pt=Xn(e))}function Qn(t,e){const{checkResourceChanges:r,Pt:n,size:o}=t;if(r){const t=qn(e);if(t!==T&&o!==T&&t!=o)throw new Error(gn);if(n){const t=Xn(e);if(Object.entries(n).some(([e,r])=>r!==T&&t[e]!==T&&r!=t[e]))throw new Error(gn)}}}function $n(t,e=0,r=1){return Object.assign({},to(t),{[Dn]:On+"="+(e<0?e:e+"-"+(e+r-1))})}function to({options:t}){const{headers:e}=t;if(e)return Symbol.iterator in e?Object.fromEntries(e):e}async function eo(t){await no(t,io)}async function ro(t){await no(t,ao)}async function no(t,e){const r=await e(Fn,t,to(t));t.data=new Uint8Array(await r.arrayBuffer()),t.size=t.data.length}async function oo(t,e,r){if(t.preventHeadRequest)await r(t,t.options);else{const n=await e("HEAD",t,to(t)),o=n.headers.get("Content-Length");o&&!n.headers.get("Content-Encoding")?t.size=Number(o):await r(t,t.options)}}async function io(t,{fetch:e=fetch,options:r,url:n},o){const i=await e(n,Object.assign({},r,{method:t,headers:o}));if(i.status>=200&&i.status<=299)return i;throw 416==i.status?new Error(Sn):new Error(En+(i.statusText||i.status))}function ao(t,{url:e},r){return new Promise((n,o)=>{const i=new XMLHttpRequest;if(i.addEventListener("load",()=>{if(i.status>=200&&i.status<=299){const t=[];i.getAllResponseHeaders().trim().split(/[\r\n]+/).forEach(e=>{const r=e.trim().split(/\s*:\s*/);r[0]=r[0].trim().replace(/^[a-z]|-[a-z]/g,t=>t.toUpperCase()),t.push(r)}),n({status:i.status,arrayBuffer:()=>i.response,headers:new Map(t)})}else o(416==i.status?new Error(Sn):new Error(En+(i.statusText||i.status)))},!1),i.addEventListener("error",t=>o(t.detail?t.detail.error:new Error("Network error")),!1),i.open(t,e),r)for(const t of Object.entries(r))i.setRequestHeader(t[0],t[1]);i.responseType="arraybuffer",i.send()})}class so extends Cn{constructor(t,e={}){super(),Object.assign(this,{url:t,reader:e.useXHR&&!e.fetch?new Hn(t,e):new Vn(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 co extends so{constructor(t,e={}){super(t,Object.assign({},e,{useRangeHeader:!0}))}}class uo extends Cn{constructor(t){super(),t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength),Object.assign(this,{Lt:t,size:t.length})}readUint8Array(t,e){return this.Lt.slice(t,t+e)}}class lo extends vn{constructor(t){super(),this.Wt=t||262144}init(t=0){Object.assign(this,{offset:0,Lt:new Uint8Array(t>0?t:this.Wt)}),super.init()}writeUint8Array(t){const e=this,r=e.offset+t.length;if(r>e.Lt.length){let t=e.Lt.length?2*e.Lt.length:e.Wt;for(;t<r;)t*=2;const n=e.Lt;e.Lt=new Uint8Array(t),e.Lt.set(n)}e.Lt.set(t,e.offset),e.offset+=t.length}getData(){return this.offset===this.Lt.length?this.Lt:this.Lt.slice(0,this.offset)}}class fo extends Cn{constructor(t){super(),this.Zt=t}async init(){const t=this;t.Vt=0;const e=t.Zt=await Promise.all(t.Zt.map(bo));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===T?r:n}async readUint8Array(t,e){const r=this,{Zt:n}=this;let o,i=0,a=t;for(;n[i]&&a>=n[i].size;)a-=n[i].size,i++;const s=n[i];if(s){const n=s.size;if(a+e<=n)o=await Eo(s,a,e);else{const i=n-a;o=Pt(await Eo(s,a,i),await r.readUint8Array(t+i,e-i))}}else o=N;return r.Vt=Math.max(i,r.Vt),o}}class wo extends kn{constructor(t,e=4294967295){super();const r=this;let n,o,i;Object.assign(r,{diskNumber:0,diskOffset:0,size:0,maxSize:e,availableSize:e});const a=new WritableStream({async write(e){if(e===Un)return void(i&&await c());const{availableSize:a}=r;if(i)e.length>=a?(await s(e.subarray(0,a)),await c(),e.length>a&&await this.write(e.subarray(a))):await s(e);else{const{value:a,done:s}=await t.next();if(s&&!a)throw new Error(An);n=a,n.size=0,n.maxSize&&(r.maxSize=n.maxSize),r.availableSize=r.maxSize,await yo(n),o=a.writable,i=o.getWriter(),await this.write(e)}},async close(){i&&(await i.ready,await u())},async abort(t){i&&await i.abort(t)}});async function s(t){const e=t.length;e&&(await i.ready,await i.write(t),n.size+=e,r.availableSize-=e)}async function c(){await u(),r.diskOffset+=n.size,r.diskNumber++,i=null,r.availableSize=r.maxSize}async function u(){await i.close()}Object.defineProperty(r,In,{get:()=>a})}async closeDisk(){const t=this.writable.getWriter();try{await t.ready,await t.write(Un)}finally{t.releaseLock()}}}class po{constructor(t){return Array.isArray(t)&&(t=new fo(t)),(t instanceof ReadableStream||typeof t.getReader==k)&&(t={readable:Ye(t)}),t}}class ho{constructor(t){t.writable===T&&typeof t.next==k&&(t=new wo(t)),(t instanceof WritableStream||typeof t.getWriter==k)&&(t={writable:Xe(t)});try{t.size=t.size===T?0:t.size}catch{throw new Error(zn)}return t}}function mo(t){return Boolean(t&&t.getData)}async function yo(t,e){if(!t.init||t.initialized)return Promise.resolve();await t.init(e)}async function bo(t){return t=new po(t),await yo(t),t.size!==T&&t.readUint8Array||(t=new Bn(await qe(t.readable)),await yo(t)),t}function Eo(t,e,r){return t.readUint8Array(e,r)}function So(t,e){return t.createReadable?t.createReadable(e):t.readUint8Array?Cn.prototype.createReadable.call(t,e):t.readable}function go(t,e,r){if(!t.some(t=>t.reason==e)){const n={reason:e};r!==T&&(n.filename=r),t.push(n)}}const Ao="filename",Ro="rawFilename",zo="comment",xo="rawComment",Do="uncompressedSize",Fo="compressedSize",Oo="offset",To="diskNumberStart",Io="lastModDate",Uo="rawLastModDate",ko="lastAccessDate",Co="rawLastAccessDate",vo="creationDate",Mo="rawCreationDate",No="internalFileAttributes",_o="externalFileAttributes",jo="msdosAttributesRaw",Bo="msdosAttributes",Po="msDosCompatible",Lo="zip64",Wo="encrypted",Zo="version",Vo="versionMadeBy",Ho="zipCrypto",Go="directory",Ko="executable",Yo="compressionMethod",qo="signature",Xo="extraField",Jo="unixMode",Qo="setuid",$o="setgid",ti="sticky",ei=[Ao,Ro,Do,Fo,Io,Uo,zo,xo,ko,Co,vo,Mo,Oo,To,No,_o,jo,Bo,Po,Lo,Wo,Zo,Vo,Ho,Go,Ko,"symlink",Yo,qo,"crc32",Xo,"extraFieldUnix","extraFieldInfoZip","extraFieldUnixType1","extraFieldPkwareUnix","uid","gid",Jo,"unixExternalUpper",Qo,$o,ti,"bitFlag","rawBitFlag","filenameLength","extraFieldLength","filenameUTF8","commentUTF8","rawExtraField","extraFieldZip64","extraFieldUnicodePath","extraFieldUnicodeComment","extraFieldAES","extraFieldNTFS","extraFieldExtendedTimestamp","extraFieldUSDZ"];class ri{constructor(t){ei.forEach(e=>this[e]=t[e])}}const ni=new Set([1,h,10,m,28789,25461,y,b,E,22613,13]);function oi(t,e,r){return t?e?12:16+4*r:0}const ii="File format is not recognized",ai="End of central directory not found",si="End of Zip64 central directory locator not found",ci="Central directory header not found",ui="Local file header not found",li="Zip64 extra field not found",fi="File contains encrypted entry",di="Encryption method not supported",wi="Split zip file",pi="Overlapping entry found",hi="Entry data out of bounds",mi="Ambiguous archive",yi="Encrypted central directory is not supported",bi="Unsafe filename",Ei="Invalid strictness (must be 'strict', 'balanced' or 'tolerant')",Si="Invalid filenameValidation (must be 'strict', 'balanced' or 'tolerant')",gi="Invalid maxAppendedDataSize (must be a number greater than or equal to 0)",Ai="64-bit value exceeds Number.MAX_SAFE_INTEGER",Ri="unsorted central directory",zi="unknown version needed to extract",xi="compressed patched data",Di="malformed extra field",Fi="unknown zip64 extensible data",Oi="wrapped entries count",Ti="appended data",Ii="prepended data",Ui="prepended central directory",ki="trailing central directory data",Ci="duplicate filename",vi="mismatched zip64 end of central directory record",Mi="multiple end of central directory records",Ni="mismatched local file header (filename)",_i="mismatched local file header (general purpose bit flag)",ji="mismatched local file header (compression method)",Bi="mismatched local file header (crc32 or sizes)",Pi=/^[a-zA-Z]:/,Li="utf-8",Wi="cp437",Zi=[[Do,t],[Fo,t],[Oo,t],[To,e]],Vi={[e]:{Kt:Da,bytes:4},[t]:{Kt:Fa,bytes:8}},Hi=BigInt(Number.MAX_SAFE_INTEGER);class Gi{constructor(t,e={}){Object.assign(this,{reader:new po(t),options:e,Yt:new Map})}async*getEntriesGenerator(n={}){const i=this;let{reader:a}=i;if(await yo(a),a.size!==T&&a.readUint8Array||(a=new Bn(await qe(a.readable)),await yo(a)),a.size<d)throw new Error(ii);const c=i.warnings=[],h=ua(n,i.options),m=h==rt,y=h!=ot,b=da(Sa(i,n,J),h),E=function(t,e){if(t===T)return e;if(!ca(t))throw new Error(Si);return t}(Sa(i,n,"filenameValidation"),h),S=Sa(i,n,"normalizeFilename"),{qt:D,Xt:F}=await wa(a,y,b);if(!D)throw await async function(t){return await sa(t)==o}(a)?new Error(wi):new Error(ai);y&&F>1&&Ea(Mi);const O=Wt(D);let I=Da(O,12),U=Da(O,16);const k=D.offset,C=xa(O,20),v=k+d+C,M=a.size-v;M>b&&Ea(Ti),M>0&&go(c,Ti);let _=xa(O,4);const j=a.Vt||0;let B,P,L,W,Z,V=xa(O,6),H=xa(O,10),G=0,K=p;const Y=U==t||I==t||H==e||V==e;if(U!=t&&V!=e&&(U+=aa(a,V)),Y){const r=D.offset>=w?await Eo(a,D.offset-w,w):N,n=Wt(r);if(r.length==w&&Da(n,0)==l){U=aa(a,Da(n,4))+Fa(n,8);let r=await Eo(a,U,p),o=Wt(r);const i=D.offset-w-p;if((r.length<p||Da(o,0)!=u)&&U!=i&&i>=0){const t=U;U=i,U>t&&(G=U-t),r=await Eo(a,U,p),o=Wt(r)}if(r.length<p||Da(o,0)!=u)throw new Error(si);if(L=!0,W=Fa(o,4)>44,W){const t=Math.min(Fa(o,4)-44,a.size-U-p);t>0&&(K+=t,Z=function(t){const e={rawExtensibleData:t};if(t.length>=28){const r=Wt(t),n=xa(r,26);Object.assign(e,{compressionMethod:xa(r,0),compressedSize:Fa(r,2),uncompressedSize:Fa(r,10),encryptionAlgorithm:xa(r,18),bitLength:xa(r,20),flags:xa(r,22),hashAlgorithm:xa(r,24),hashData:t.subarray(28,28+n)})}return e}(await Eo(a,U+p,t)))}_==e?_=Da(o,16):_!=Da(o,16)&&ba(m,c,vi),V==e?V=Da(o,20):V!=Da(o,20)&&ba(m,c,vi),H==e?H=Fa(o,32):H!=Fa(o,32)&&ba(m,c,vi),I==t?I=Fa(o,40):I!=Fa(o,40)&&ba(m,c,vi),U=aa(a,V)+Fa(o,48)+G}}let q=I;const X=D.offset-(L?K+w:0);if(U>=a.size&&(G=a.size-U-I-d,U=a.size-I-d),j!=_)throw new Error(wi);if(U<0)throw new Error(ii);let Q=0,$=await Eo(a,U,I),nt=Wt($);if(I){if($.length<4)throw new Error(ii);const t=X-I;if(U!=t&&V==_){const e=Da(nt,Q)==s||Boolean(Z&&Z.compressedSize)||Xi(nt);let r=!e;if(!r&&t>=0&&t+4<=a.size&&(r=Da(Wt(await Eo(a,t,4)),0)==s),r){const r=U;U=t,U>r&&(G+=U-r,B=e),$=await Eo(a,U,I),nt=Wt($)}}}const it=X-U;if(I!=it&&it>=0&&V==_&&(I=it,$=await Eo(a,U,I),nt=Wt($)),U<0||U>=a.size)throw new Error(ii);i.directoryOffset=U,i.directoryLength=q;const at=ga(i,n,"decryptCentralDirectory");let st,ct;if(at&&H&&$.length>=4&&Da(nt,0)!=s&&(W||Xi(nt))){const t=function(t,e,r){const n=t&&t.compressedSize?t.compressedSize:e;return n>0&&n<=r?n:r}(Z,q,$.length);ct=$.subarray(t),$=await at($.subarray(0,t),Z),nt=Wt($),q=$.length,st=!0}Z&&!st&&($.length<4||Da(nt,0)==s)&&go(c,Fi),P=U;const ut=Sa(i,n,"filenameEncoding"),lt=Sa(i,n,"commentEncoding"),ft=new Set;let dt,wt=-1;const pt=!m&&!L;!H&&pt&&(H=Ji(nt,$,Q),H&&go(c,Oi));for(let t=0;t<H;t++){const o=new qi(a,i.options);if(Q+f>$.length||Da(nt,Q)!=s){if(0==t&&!st&&(W||Xi(nt)))throw new Error(yi);throw new Error(ci)}$i(o,nt,Q+6);const u=Boolean(o.bitFlag.languageEncodingFlag),l=Q+f,d=l+o.filenameLength,w=d+o.extraFieldLength,p=xa(nt,Q+4),h=!(p>>8),m=p>>8==3,y=$.subarray(l,d),b=xa(nt,Q+32),D=w+b,F=$.subarray(w,D),O=u,I=u,U=Da(nt,Q+38),k=U&r,C={readOnly:Boolean(1&k),hidden:Boolean(2&k),system:Boolean(4&k),directory:Boolean(16&k),archive:Boolean(32&k)},v=Da(nt,Q+42),M=ga(i,n,"decodeText")||yn,N=O?Li:ut||Wi,_=I?Li:lt||Wi;let j=M(y,N,tt);if(j===T&&(j=yn(y,N)),S){const t=S(j);t!==T&&(j=t)}if(fa(j,E)){const t=new Error(bi);throw t.filename=j,t}let B=M(F,_,et);B===T&&(B=yn(F,_)),Object.assign(o,{index:t,Jt:st,versionMadeBy:p,msDosCompatible:h,zip64:!1,compressedSize:0,uncompressedSize:0,Qt:b,offset:v,diskNumberStart:xa(nt,Q+34),internalFileAttributes:xa(nt,Q+36),externalFileAttributes:U,msdosAttributesRaw:k,msdosAttributes:C,rawFilename:y,filenameUTF8:O,commentUTF8:I,rawExtraField:$.subarray(d,w),rawComment:F,filename:j,comment:B}),ta(o,o,nt,Q+6)&&go(c,Di,j),o.offset+=G;const L=aa(a,o.diskNumberStart)+o.offset;P=Math.min(L,P),L<wt&&go(c,Ri,j),wt=L,(o.version&r)>63&&go(c,zi,j),32&~o.rawBitFlag||go(c,xi,j),ft.has(o.filename)&&(dt=!0),ft.add(o.filename);const Z=o.externalFileAttributes>>16&e;o.unixMode===T&&16877&Z&&(o.unixMode=Z);const V=Boolean(o.unixMode&R),K=Boolean(o.unixMode&z),Y=Boolean(512&o.unixMode),q=40960==((o.unixMode===T?Z:o.unixMode)&g),X=!q&&(o.unixMode!==T?!!(73&o.unixMode):m&&!!(73&Z)),J=o.unixMode!==T&&(o.unixMode&g)==A,rt=(Z&g)==A;Object.assign(o,{setuid:V,setgid:K,sticky:Y,symlink:q,unixExternalUpper:Z,executable:X,directory:J||rt||h&&C.directory||o.filename.endsWith(x),zipCrypto:o.encrypted&&!o.extraFieldAES});const ot=new ri(o);if(ot.getData=(t,e)=>o.getData(t,ot,i.Yt,e),ot.arrayBuffer=async t=>{const e=new TransformStream,r=qe(e.readable).then(t=>t.arrayBuffer());return r.catch(()=>{}),await o.getData(e,ot,i.Yt,Object.assign({},t,{preventClose:!1})),r},Q=D,t==H-1&&pt){const t=Ji(nt,$,Q);t&&(H+=t,go(c,Oi))}const{onprogress:it}=n;if(it)try{await it(t+1,H,new ri(o))}catch{}yield ot}let ht=Q,mt=Qi($.subarray(Q))||(st?Qi(ct):T);if(!mt&&!st){const t=U+Q,e=Math.min(X-t,65541);e>=6&&(mt=Qi(await Eo(a,t,e)))}mt&&(i.digitalSignature=mt,ht=Q+6+mt.length),(Q!=q&&ht!=q||!st&&Q!=I&&ht!=I)&&ba(m,c,ki),dt&&ba(m,c,Ci);const yt=Sa(i,n,"extractPrependedData"),bt=Sa(i,n,"extractAppendedData"),Et=(m||yt)&&H&&4==P&&await async function(t){const e=await sa(t);return e==o||808471376==e}(a)?4:0;return m&&(G||H&&P>Et)&&Ea(Ii),(G||H&&P>4)&&go(c,Ii),B&&go(c,Ui),yt&&(i.prependedData=P>Et?await Eo(a,Et,P-Et):N),i.comment=C?await Eo(a,k+d,C):N,bt&&(i.appendedData=v<a.size?await Eo(a,v,a.size-v):N),!0}async getEntries(t={}){const e=[];for await(const r of this.getEntriesGenerator(t))e.push(r);return e}async close(){const{reader:t}=this;t.readUint8Array||!t.readable||t.readable.locked||await t.readable.cancel()}[_](){return this.close()}}class Ki{constructor(t={}){let e;const{readable:r,writable:n}=new TransformStream({start(t){e=t}}),o=new Gi(r,t),i=o.getEntriesGenerator(),a=new Set;this.readable=new ReadableStream({async pull(t){const{done:e,value:r}=await i.next();if(e)return t.close();const n=function(t,e){const{readable:r,writable:n}=new TransformStream;let o;const i={cancel:async t=>{e.delete(i),await(o?o.cancel(t):r.cancel(t))}};return i.readable=new ReadableStream({async pull(a){o||(o=r.getReader(),e.add(i),async function(){try{await t.getData(n,{preventClose:!1})}catch(t){try{await n.abort(t)}catch{}}finally{e.delete(i)}}());const{done:s,value:c}=await o.read();s?a.close():a.enqueue(c)},cancel:t=>i.cancel(t)},{highWaterMark:0}),i}(r,a),o={...r,readable:n.readable};delete o.getData,Object.defineProperties(o,{localDirectory:{get:()=>r.localDirectory,enumerable:!0},warnings:{get:()=>r.warnings,enumerable:!0}}),t.enqueue(o)},async cancel(t){const r=Array.from(a);a.clear(),e.error(t),await Promise.allSettled(r.map(e=>e.cancel(t))),await Promise.allSettled([i.return(),o.close()])}}),this.writable=n}}async function Yi(t,e={}){if(t=new po(t),await yo(t),t.size!==T&&t.readUint8Array||(t=new Bn(await qe(t.readable)),await yo(t)),t.size<d)return!1;const r=ua(e,{}),n=r!=ot,o=da(e[J],r),{qt:i,Xt:a}=await wa(t,n,o);if(!i||r==rt&&a>1)return!1;const s=xa(Wt(i),20),c=i.offset+d+s;return t.size-c<=o}let qi=class{constructor(t,e){Object.assign(this,{reader:t,options:e})}async getData(t,e,o,a={}){const s=this,c=Ut(),{reader:u,index:l,offset:f,diskNumberStart:d,extraFieldAES:w,extraFieldZip64:p,compressionMethod:h,bitFlag:m,rawBitFlag:y,crc32:b,rawLastModDate:E,uncompressedSize:S,compressedSize:g}=s,{dataDescriptor:A}=m,R=e.localDirectory={},z=e.warnings=[],x=aa(u,d)+f,F=await Eo(u,x,D),O=Wt(F);let I=Sa(s,a,j),U=Sa(s,a,B);const k=ht(Sa(s,a,P)),C=Boolean(k),v=!0===k;if(pt(I,U),I=I&&I.length&&I,U=U&&U.length&&U,w&&99!=w.originalCompressionMethod)throw new Error(tr);if(F.length<D||Da(O,0)!=n)throw new Error(ui);$i(R,O,4);const{extraFieldLength:M,filenameLength:_}=R,G=R.dataOffset=x+D+_+M,K=Sa(s,a,"checkLocalDirectory"),Y=ua(a,s.options),q=function(t,e){return t===T?e!=ot:Boolean(t)}(K,Y),X=Sa(s,a,"checkLocalFilename"),J=function(t,e){return t===T?e==rt:Boolean(t)}(X===T?K:X,Y);let Q=N;if(J&&(_||M)){const t=await Eo(u,x+D,_+M);Q=t.subarray(0,_),R.rawExtraField=t.subarray(_)}else R.rawExtraField=M?await Eo(u,x+D+_,M):N;J&&(R.rawFilename=Q),ta(s,R,O,4,!0)&&go(z,Di),function(t,e,r,n,o){const{rawFilename:i}=t,a=!o,s=t.Jt&&!(8192&~e.rawBitFlag);!n||s||r.length==i.length&&!r.some((t,e)=>t!=i[e])||ba(a,o,Ni),(2057&e.rawBitFlag)!=(2057&t.rawBitFlag)&&ba(a,o,_i),e.compressionMethod!=t.compressionMethod&&ba(a,o,ji),e.bitFlag.dataDescriptor||s||!(e.crc32||e.compressedSize||e.uncompressedSize)||e.crc32==t.crc32&&e.compressedSize==t.compressedSize&&e.uncompressedSize==t.uncompressedSize||ba(a,o,Bi)}(s,R,Q,J,q?T:z);const{lastAccessDate:$,creationDate:tt,uid:et,gid:nt}=R;$&&(e.lastAccessDate=$),tt&&(e.creationDate=tt),et!==T&&e.uid===T&&(e.uid=et),nt!==T&&e.gid===T&&(e.gid=nt);const it=Sa(s,a,"checkPasswordOnly"),at=s.encrypted&&R.encrypted&&(!v||it),st=at&&!w;if(v||(e.zipCrypto=st),at&&!(64&~R.rawBitFlag))throw new Error(di);const ct=C?T:ar(h);if(0!=h&&8!=h&&9!=h&&!ct&&!C)throw new Error(tr);if(at){if(!st&&(w.strength<1||w.strength>3))throw new Error(di);if(!I&&!U)throw new Error(fi)}if(G+g>u.size)throw new Error(hi);const ut=g,lt=Ye(u.createReadable({offset:G,size:ut})),ft=dt(Sa(s,a,L));wt(ft);let mt=Sa(s,a,"checkOverlappingEntry");const yt=Sa(s,a,"checkOverlappingEntryOnly");yt&&(mt=!0);const{onstart:bt,onprogress:Et,onend:St}=a,gt=0!=h&&!C,At=C?g-oi(at,st,w&&w.strength):S,Rt=9==h;let zt=Sa(s,a,Z);Rt&&(zt=!1);const xt=Sa(s,a,"checkCrc32"),Dt=(xt===T?Sa(s,a,"checkSignature"):xt)&&!C&&(!at||st||w&&1==w.vendorVersion),Ft={options:{codecType:Ir,password:I,rawPassword:U,zipCrypto:st,encryptionStrength:w&&w.strength,checkCrc32:Dt,checkAuthenticationCode:Sa(s,a,"checkAuthenticationCode"),passwordVerification:st&&(A?E>>>8&r:b>>>24&r),outputSize:At,crc32:b,compressed:gt,encrypted:at,useWebWorkers:Sa(s,a,W),useCompressionStream:zt,transferStreams:Sa(s,a,V),deflate64:Rt,format:ct?ct.format:T,codecURI:ct?ct.codecURI:T,compressionMethod:h,rawBitFlag:y,checkPasswordOnly:it},config:c,ft:{signal:ft,size:ut,onstart:bt,onprogress:Et,onend:St}};let Ot,Tt,It;mt&&await async function({reader:t,$t:e,index:r,offset:n,crc32:o,compressedSize:a,uncompressedSize:s,dataOffset:c,dataDescriptor:u,extraFieldZip64:l,Yt:f}){let d=0;if(u&&(d=l?20:12),d){const r=await Eo(t,c+a,d+4),n=Wt(r);let u=r.length==d+4&&Da(n,0)==i;if(u){const t=ia(n,4,l);(e.encrypted&&!e.zipCrypto||t.crc32==o)&&t.compressedSize==a&&t.uncompressedSize==s?d+=4:u=!1}if(r.length>=d){const t=ia(n,u?4:0,l);t.signature=u,e.localDirectory.dataDescriptor=t}}const w={start:n,end:c+a+d,$t:e};for(const[t,e]of f)if(t!=r&&w.start<e.end&&e.start<w.end){const t=new Error(pi);throw t.overlappingEntry=e.$t,t}f.set(r,w)}({reader:u,$t:e,index:l,offset:x,crc32:b,compressedSize:g,uncompressedSize:S,dataOffset:G,dataDescriptor:A||R.bitFlag.dataDescriptor,extraFieldZip64:p||R.extraFieldZip64,Yt:o});try{if(!yt){it&&(t=new WritableStream),t=new ho(t),await yo(t,function(t,e,r){return Math.min(t,r?1032*e:e)}(At,g,gt)),({writable:Ot}=t);const{outputSize:e}=await ln({readable:lt,writable:Ot},Ft);if(e!=At)throw Object.assign(new Error(lr),{outputSize:e});t.size+=e}}catch(e){const{outputSize:r}=Ft;if(r!==T?t.size+=r:Zt(e)&&e.outputSize!==T&&(t.size+=e.outputSize),!it||!Zt(e)||e.message!=ue)throw Tt=e,It=!0,e}finally{if((mo(t)||!Sa(s,a,H))&&Ot&&!Ot.locked){const t=Ot.getWriter();if(It)try{await t.abort(Tt)}catch{}else await t.close()}}return it||yt?T:t.getData?t.getData():Ot}};function Xi(t){const e=Math.min(t.byteLength,1024)-3;for(let r=0;r<e;r++)if(134630224==Da(t,r))return!0;return!1}function Ji(t,e,r){let n=0;for(;r+f<=e.length&&Da(t,r)==s;)r+=f+xa(t,r+28)+xa(t,r+30)+xa(t,r+32),n++;return n%65536?0:n}function Qi(t){if(t.length>=6){const e=Wt(t);if(Da(e,0)==a){const r=xa(e,4);if(6+r<=t.length)return t.subarray(6,6+r)}}}function $i(t,e,r){const n=t.rawBitFlag=xa(e,r+2),o=!(1&~n),i=Da(e,r+6);Object.assign(t,{encrypted:o,version:xa(e,r),bitFlag:{level:(6&n)>>1,dataDescriptor:!(8&~n),languageEncodingFlag:(n&S)==S},rawLastModDate:i,lastModDate:Aa(i),filenameLength:xa(e,r+22),extraFieldLength:xa(e,r+24)})}function ta(t,e,r,n,o){const{rawExtraField:i}=e,a=e.extraField=new Map,s=Wt(i);let c=0,u=!1;try{for(;c<i.length;){const t=xa(s,c),e=xa(s,c+2);a.set(t,{type:t,data:i.slice(c+4,c+4+e)}),c+=4+e}}catch{u=!0}c>i.length&&(u=!0);const l=xa(r,n+4);Object.assign(e,{signature:Da(r,n+10),crc32:Da(r,n+10),compressedSize:Da(r,n+14),uncompressedSize:Da(r,n+18)});const f=a.get(1);f&&(function(t,e){e.zip64=!0;const r=Wt(t.data),n=Zi.filter(([t,r])=>e[t]==r),o=n.reduce((t,[,e])=>t+Vi[e].bytes,0);if(t.data.length<o)throw new Error(li);for(let o=0,i=0;o<n.length;o++){const[a,s]=n[o],c=Vi[s];e[a]=t[a]=c.Kt(r,i),i+=c.bytes}}(f,e),e.extraFieldZip64=f);const d=a.get(28789);d&&(ea(d,Ao,Ro,e,t),e.extraFieldUnicodePath=d);const w=a.get(25461);w&&(ea(w,zo,xo,e,t),e.extraFieldUnicodeComment=w);const p=a.get(h);p&&p.data.length>=7?(function(t,e,r){const n=Wt(t.data),o=za(n,4);Object.assign(t,{vendorVersion:za(n,0),vendorId:za(n,2),strength:o,originalCompressionMethod:r,compressionMethod:xa(n,5)}),e.compressionMethod=t.compressionMethod,1!=t.vendorVersion&&(e.crc32=T)}(p,e,l),e.extraFieldAES=p):e.compressionMethod=l;const S=a.get(13);S&&(ra(S,e),e.extraFieldPkwareUnix=S);const g=a.get(22613);g&&(ra(g,e),e.extraFieldUnixType1=g);const A=a.get(10);A&&(function(t,e){const r=Wt(t.data);let n,o=4;try{for(;o<t.data.length&&!n;){const e=xa(r,o),i=xa(r,o+2);1==e&&(n=t.data.slice(o+4,o+4+i)),o+=4+i}}catch{}if(n&&24==n.length){const r=Wt(n),o=r.getBigUint64(0,!0),i=r.getBigUint64(8,!0),a=r.getBigUint64(16,!0);Object.assign(t,{rawLastModDate:o,rawLastAccessDate:i,rawCreationDate:a});const s={lastModDate:Ra(o),lastAccessDate:Ra(i),creationDate:Ra(a)};Object.assign(t,s),Object.assign(e,s,{rawLastAccessDate:i,rawCreationDate:a})}}(A,e),e.extraFieldNTFS=A);const R=a.get(E);let z;if(R&&(z=na(R,e,!1),e.extraFieldUnix=R),!z){const t=a.get(b);t&&(na(t,e,!0),e.extraFieldInfoZip=t)}const x=a.get(m);x&&(function(t,e,r){if(!t.data.length)return;const n=Wt(t.data),o=za(n,0),i=[],a=[];r?(1&~o||(i.push(Io),a.push(Uo)),2&~o||(i.push(ko),a.push(Co)),4&~o||(i.push(vo),a.push(Mo))):t.data.length>=5&&(i.push(Io),a.push(Uo));let s=1;i.forEach((r,o)=>{if(t.data.length>=s+4){const i=Da(n,s);e[r]=t[r]=new Date(1e3*(0|i));const c=a[o];t[c]=i}s+=4})}(x,e,o),e.extraFieldExtendedTimestamp=x);const D=a.get(y);return D&&(e.extraFieldUSDZ=D),u}function ea(t,e,r,n,o){if(t.data.length<5)return void(t.valid=!1);const i=Wt(t.data),a=new $t;a.append(o[r]);const s=Wt(new Uint8Array(4));s.setUint32(0,a.get(),!0);const c=Da(i,1),u=za(i,0);Object.assign(t,{version:u,[e]:yn(t.data.subarray(5)),valid:1==u&&!o.bitFlag.languageEncodingFlag&&c==Da(s,0)}),t.valid&&(n[e]=t[e],n[e+"UTF8"]=!0)}function ra(t,e){if(t.data.length<8)return;const r=Wt(t.data),n={lastAccessDate:new Date(1e3*(0|Da(r,0))),lastModDate:new Date(1e3*(0|Da(r,4)))};t.data.length>=12&&(n.uid=xa(r,8),n.gid=xa(r,10)),Object.assign(t,n),Object.assign(e,n)}function na(t,e,r){try{const n=Wt(t.data);let o,i;if(r){let e=0;const r=za(n,e++),a=za(n,e++);o=oa(t.data.subarray(e,e+a)),e+=a;const s=za(n,e++);i=oa(t.data.subarray(e,e+s)),Object.assign(t,{version:r,uid:o,gid:i})}else t.data.length>=4&&(o=xa(n,0),i=xa(n,2),Object.assign(t,{uid:o,gid:i}));return o!==T&&(e.uid=o),i!==T&&(e.gid=i),o!==T||i!==T}catch{}}function oa(t){const e=new Uint8Array(4);return e.set(t,0),new DataView(e.buffer,e.byteOffset,4).getUint32(0,!0)}function ia(t,e,r){const n=Da(t,e);let o,i;return r?(o=Fa(t,e+4),i=Fa(t,e+12)):(o=Da(t,e+4),i=Da(t,e+8)),{crc32:n,compressedSize:o,uncompressedSize:i}}function aa(t,e){return t.Gt?t.Gt(e):0}async function sa(t){return Da(Wt(await Eo(t,0,4)))}function ca(t){return t===rt||t===nt||t===ot}function ua(t,e){return la(t,la(e,nt))}function la(t,e){const r=t.strictness;if(r!==T){if(!ca(r))throw new Error(Ei);return r}const n=t.checkAmbiguity;return n===T?e:n?rt:e==ot?ot:nt}function fa(t,e){if(e==ot)return!1;const r=t.split("/");return r.length>1&&""===r[r.length-1]&&r.pop(),!!(r.includes("..")||t.startsWith("/")||t.startsWith("\\\\")||Pi.test(t))||e==rt&&(r.includes(".")||r.includes(""))}function da(t,r){if(t!==T){const e=bt(t);if("number"!=typeof e||Number.isNaN(e)||e<0)throw new Error(gi);return e}return r==rt?0:r==ot?1/0:e}async function wa(t,e,r){const{size:n}=t,o=Math.min(n,65557),i={count:64};let a,s,c=0;for await(const[r,u,l,f,w]of pa(t,o)){const o=xa(r,f+20);if(w+d+o==n){const o=await ma(t,r,u,f,w,n,i);if(2==o){if(a||(a=ha(l,f,w)),c++,!e||c>1)break}else 1!=o||s||(s=ha(l,f,w))}}return a||(a=s),a||(a=await async function(t,e,r){const{size:n}=t,o=Math.min(n,e==1/0?n:65557+e);let i,a;for await(const[e,s,c,u,l]of pa(t,o)){const o=ha(c,u,l);i||(i=o);const f=await ma(t,e,s,u,l,n,r);if(2==f)return o;1!=f||a||(a=o)}return a||i}(t,r,i)),{qt:a,Xt:c}}async function*pa(t,e){const r=t.size-e,n=await Eo(t,r,e),o=Wt(n);for(let t=n.length-d;t>=0;t--)Da(o,t)==c&&(yield[o,r,n,t,r+t])}function ha(t,e,r){return{offset:r,buffer:t.slice(e,e+d).buffer}}async function ma(r,n,o,i,a,c,u){const f=xa(n,i+10),d=Da(n,i+12),p=Da(n,i+16);if(f==e||d==t||p==t)return await ya(r,n,o,a-w,c,u)==l?2:0;if(!f&&!d)return 1;const h=xa(n,i+6);for(const t of[a-d,aa(r,h)+p])if(await ya(r,n,o,t,c,u)==s)return 2;return 0}async function ya(t,e,r,n,o,i){return n<0||n+4>o?T:n>=r?Da(e,n-r):i.count>0?(i.count--,Da(Wt(await Eo(t,n,4)),0)):T}function ba(t,e,r){t?Ea(r):go(e,r)}function Ea(t){const e=new Error(mi);throw e.reason=t,e}function Sa(t,e,r){return e[r]===T?t.options[r]:e[r]}function ga(t,e,r){return ft(Sa(t,e,r))}function Aa(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 Ra(t){return new Date(Number(t/BigInt(1e4)-BigInt(116444736e5)))}function za(t,e){return t.getUint8(e)}function xa(t,e){return t.getUint16(e,!0)}function Da(t,e){return t.getUint32(e,!0)}function Fa(t,e){const r=t.getBigUint64(e,!0);if(r>Hi)throw new Error(Ai);return Number(r)}var Oa=Object.freeze({__proto__:null,ERR_AMBIGUOUS_ARCHIVE:mi,ERR_BAD_FORMAT:ii,ERR_CENTRAL_DIRECTORY_NOT_FOUND:ci,ERR_ENCRYPTED:fi,ERR_ENCRYPTED_CENTRAL_DIRECTORY:yi,ERR_ENTRY_DATA_OUT_OF_BOUNDS:hi,ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND:si,ERR_EOCDR_NOT_FOUND:ai,ERR_EXTRAFIELD_ZIP64_NOT_FOUND:li,ERR_INVALID_AUTHENTICATION_CODE:ce,ERR_INVALID_COMPRESSED_DATA:fr,ERR_INVALID_CRC32:dr,ERR_INVALID_FILENAME_VALIDATION:Si,ERR_INVALID_MAX_APPENDED_DATA_SIZE:gi,ERR_INVALID_PASSWORD:se,ERR_INVALID_STRICTNESS:Ei,ERR_INVALID_UNCOMPRESSED_SIZE:lr,ERR_LOCAL_FILE_HEADER_NOT_FOUND:ui,ERR_OVERLAPPING_ENTRY:pi,ERR_SPLIT_ZIP_FILE:wi,ERR_UNSAFE_FILENAME:bi,ERR_UNSUPPORTED_COMPRESSION:tr,ERR_UNSUPPORTED_ENCRYPTION:di,ERR_UNSUPPORTED_UINT64:Ai,ERR_WORKER_STARTUP_TIMEOUT:Cr,WARNING_APPENDED_DATA:Ti,WARNING_COMPRESSED_PATCHED_DATA:xi,WARNING_DUPLICATE_FILENAME:Ci,WARNING_MALFORMED_EXTRA_FIELD:Di,WARNING_MISMATCHED_LOCAL_FILE_HEADER_BIT_FLAG:_i,WARNING_MISMATCHED_LOCAL_FILE_HEADER_COMPRESSION_METHOD:ji,WARNING_MISMATCHED_LOCAL_FILE_HEADER_CRC32_OR_SIZES:Bi,WARNING_MISMATCHED_LOCAL_FILE_HEADER_FILENAME:Ni,WARNING_MISMATCHED_ZIP64_END_OF_CENTRAL_DIRECTORY:vi,WARNING_MULTIPLE_END_OF_CENTRAL_DIRECTORY:Mi,WARNING_PREPENDED_CENTRAL_DIRECTORY:Ui,WARNING_PREPENDED_DATA:Ii,WARNING_TRAILING_CENTRAL_DIRECTORY_DATA:ki,WARNING_UNKNOWN_VERSION:zi,WARNING_UNKNOWN_ZIP64_EXTENSIBLE_DATA:Fi,WARNING_UNSORTED_CENTRAL_DIRECTORY:Ri,WARNING_WRAPPED_ENTRIES_COUNT:Oi,ZipReader:Gi,ZipReaderStream:Ki,isZipFile:Yi});const Ta="File already exists",Ia="Zip file comment exceeds 64KB",Ua="Invalid zip file comment (must be a Uint8Array)",ka="File entry comment exceeds 64KB",Ca="Invalid file entry comment (must be a string)",va="Invalid date (must be a valid Date instance)",Ma="File entry name exceeds 64KB",Na="Version exceeds 65535",_a="The strength must equal 1, 2, or 3",ja="Encryption is not supported in USDZ files",Ba="Split zip files are not supported in USDZ files",Pa="Encryption is not supported when the 'passThrough' option is set to true (use 'compressed' instead)",La="Invalid extra field (must be a Map)",Wa="Invalid extra field type (must be integer 0..65535)",Za="Invalid extra field data (must be a Uint8Array)",Va="Extra field data exceeds 64KB",Ha=-2147483648,Ga=2147483647,Ka=BigInt(0),Ya=BigInt("0x7fffffffffffffff"),qa="Zip64 is not supported (set the 'zip64' option to 'true')",Xa="Undefined uncompressed size",Ja="Undefined compression method",Qa="Undefined CRC32",$a="Undetermined size",ts="Undefined reader",es="Invalid reader (must be a Reader instance, a ReadableStream instance, or an object with a 'readable' property)",rs="Zip file not empty",ns="Invalid uid (must be integer 0..2^32-1)",os="Invalid gid (must be integer 0..2^32-1)",is="Invalid UNIX mode (must be integer 0..65535)",as="Invalid unixExtraFieldType (must be 'infozip' or 'unix')",ss="uid/gid must be 0..65535 for unixExtraFieldType 'unix' (use 'infozip' for larger ids)",cs="Invalid msdosAttributesRaw (must be integer 0..255)",us="Invalid msdosAttributes (must be an object with boolean flags)",ls="Invalid level (must be integer 0..9)",fs="Signature data exceeds 64KB",ds="Invalid entry option (must be an entry returned by ZipReader#getEntries())",ws="The last modification date of an entry encrypted with ZipCrypto cannot be changed when passThrough is set",ps="compression unavailable",hs="clamped last modification date",ms=new Uint8Array([7,0,2,0,65,69,3,0,0]),ys="infozip",bs="unix",Es=[8,9,5,3];let Ss=0;const gs=[];class As{constructor(t,e={}){t=new ho(t);const{availableSize:r=I,maxSize:n=I}=t,o=r>0&&r!==I&&n>0&&n!==I;if(o&&e[X])throw new Error(Ba);Object.assign(this,{writer:t,te:o,options:e,ee:new Map,re:new Set,offset:e[q]===T?t.size||t.writable.size||0:e[q],ne:e[q]===T?0:e[q]-(t.size||t.writable.size||0),oe:new Set,ie:[],warnings:[],ae:0,se:0,ce:T,ue:!1})}prependZip(t){return Ds(this,async function(t,e){if(t.re.size)throw new Error(rs);await t.le(e)}(this,t))}appendZip(t){return Ds(this,this.le(t))}async le(t){const e=this,{oe:r,re:n,ee:i}=e;for(;r.size;)await Promise.allSettled(Array.from(r));let a;const s=new Promise(t=>a=t);r.add(s);const c=[];let u;try{t=new po(t),await yo(t),t.size!==T&&t.readUint8Array||(t=new Bn(await qe(t.readable)),await yo(t));const{ZipReader:r}=await Promise.resolve().then(function(){return Oa}),a=new r(t),s=await a.getEntries();await a.close(),await yo(e.writer);const{directoryOffset:l}=a;s.forEach(({filename:t})=>{if(n.has(t))throw new Error(Ta);n.add(t),c.push(t)}),e.fe=!0;const{de:f}=e;e.de=new Promise(t=>u=()=>{e.fe=!1,t()}),await f,e.te&&(delete e.te,await async function(t){return Wt(await Eo(t,0,4)).getUint32(0,!0)==o}(t)||(await Js(e.writer,qs()),e.offset+=4));const d=await async function(t,e,r,n){const{writer:o}=t,i=new Map;if(o.closeDisk){const a=Array.from(r).sort((t,r)=>Ys(e,t)-Ys(e,r));let s=0;for(const r of a){const n=Ys(e,r);await Gs(t,e,s,n-s),Zs(o,await Ks(e,n))&&await o.closeDisk(),i.set(r,{offset:Vs(t,o),diskNumberStart:Ls(o)}),s=n}await Gs(t,e,s,n-s)}else{const o=t.offset;await Gs(t,e,0,n),r.forEach(t=>i.set(t,{offset:o+Ys(e,t),diskNumberStart:0}))}return i}(e,t,s,l);s.forEach(t=>{const{version:e,rawLastModDate:r,rawFilename:n,bitFlag:o,encrypted:a,uncompressedSize:s,compressedSize:c,extraFieldZip64:u}=t;let{compressionMethod:l,rawExtraField:f}=t;const{level:w,languageEncodingFlag:p,dataDescriptor:h}=o;f=Hs(f||N),t.extraFieldAES&&(l=99);const m=wc(f),y=Boolean(u)&&u.uncompressedSize!==T,b=Boolean(u)&&u.compressedSize!==T,E=-7&mc(w,p,h,a,l)|w<<1,{we:S,pe:g}=pc({version:e,bitFlag:E,compressionMethod:l,uncompressedSize:s,compressedSize:c,rawLastModDate:r,rawFilename:n,he:b,me:y,extraFieldLength:m}),{crc32:A}=t;A!==T&&lc(g,10,A);const{offset:R,diskNumberStart:z}=d.get(t);Object.assign(t,{ye:!0,me:y,he:b,offset:R,diskNumberStart:z,be:!1,Ee:N,Se:N,ge:N,Ae:N,Re:N,rawExtraField:f,ze:N,extendedTimestamp:!1,we:S,pe:g}),i.set(t.filename,t)})}catch(t){throw c.forEach(t=>n.delete(t)),t}finally{a(),r.delete(s),u&&u()}}add(e="",n,o={}){const i=this,{oe:a}=i,s=async function(e,n,o,i){const a=(i=Object.assign({},i))[$];if(a!==T){const{xe:t,De:r}=Ts(a,ht(rc(e,i,P)),rc(e,i,Io));delete i[$],i=Object.assign(t,r,i)}if(rc(e,i,Go)&&!n.endsWith(x)&&(n+=x),e.re.has(n))throw new Error(Ta);e.re.add(n),Ss<Ut().maxWorkers?Ss++:await new Promise(t=>gs.push(t));try{return await async function(e,n,o,i){const a=Is(e,n,i);({name:n}=a);const s=Us(e,n,i),{comment:c}=s,u=i[Xo];e.ee.set(n,T);const l=e.ce,f={};let d,w;s.Fe.keepOrder&&(f.Oe=new Promise(t=>d=t)),e.ce=f;try{const{Fe:c}=s;0==c.level||c.compressionMethod!==T||c.Te||await jr(Ut())||(c.level=0,go(e.warnings,ps,n));const u=await async function(t,e,{Fe:r},n){if(r.Te&&!e&&!rc(t,n,Go))throw new Error(ts);let o;if(e){if(e=new po(e),await yo(e),!e.readable&&!e.readUint8Array)throw new Error(es);({size:o}=e)}return Object.assign({reader:e},Cs(t,Boolean(e),o,r,n))}(e,o,s,i);({reader:o}=u);const p=Ws(e.writer),h=Ls(e.writer);let m=i.crc32===T?i[qo]:i.crc32;const y=u.Fe.encrypted&&!c.zipCrypto;if(c.Te&&!c.Ie&&y&&(m=T),c.Te&&o&&!y&&m===T)throw new Error(Qa);const b=Ms(i=Object.assign({},i,a.Fe,s.Fe,u.Fe,{signature:i[qo],crc32:m,offset:e.offset-p,diskNumberStart:h,[X]:e.options[X]}));b.Ue&&go(e.warnings,hs,n);const E=js(i),S=wc(b.ke,E.Ce);w=await async function(e,n,o,i,a){const{ee:s,writer:c}=e,{keepOrder:u,dataDescriptor:l,ve:f,signal:d}=a,{Me:w,$t:p,Ne:h,_e:m}=i,y=e.options[X];let b,E,S,g,A,R,z,x=p,F=0;const O=u&&h?h.Oe:T;s.set(n,x);try{a.bufferedWrite||!u||e.fe||e.ae||e.se||!l&&!f?(b=!0,e.ae++,z=a.createTempStream?await a.createTempStream():new TransformStream(T,T,{highWaterMark:I}),z.size=0,await yo(c)):(E=!0,e.se++,z=c,await O,await U()),await yo(z);const p=Ws(c);e.te&&!b&&await Xs(e,c),y&&!b&&Ns(i,e.offset-p);const{ke:h}=w;b||await k();const m=Ls(c),S=Vs(e,c);if(x.diskNumberStart=m,b||(A=!0,R=c.size,await Js(z,h)),x=await async function(e,n,{diskNumberStart:o,Oe:i},a,s,c){const{Me:u,je:l,Be:f}=a,{we:d,pe:w,lastModDate:p,rawLastModDate:h,encrypted:m,compressed:y,version:b,compressionMethod:E,Ee:S,Pe:g,ge:A,Le:R,We:z,Ae:x,Re:D,Se:F}=u,{Ce:O}=l,{rawFilename:I,lastAccessDate:U,creationDate:k,password:C,rawPassword:v,level:M,useUnicodeFileNames:N,zip64:_,ye:j,me:B,he:P,zipCrypto:L,dataDescriptor:W,directory:Z,executable:V,versionMadeBy:H,rawComment:G,rawExtraField:K,ze:Y,useWebWorkers:q,transferStreams:X,onstart:J,onprogress:Q,onend:$,signal:tt,encryptionStrength:et,extendedTimestamp:rt,msDosCompatible:nt,internalFileAttributes:ot,externalFileAttributes:it,uid:at,gid:st,unixMode:ct,symlink:ut,setuid:lt,setgid:ft,sticky:dt,unixExternalUpper:wt,msdosAttributesRaw:pt,msdosAttributes:ht,useCompressionStream:mt,Te:yt,Ie:bt,format:Et,codecURI:St}=c,gt={Oe:i,versionMadeBy:H,zip64:_,ye:j,directory:Boolean(Z),executable:Boolean(V),filenameUTF8:Boolean(N),rawFilename:I,commentUTF8:Boolean(N),rawComment:G,Ee:S,Pe:g,ge:A,Ae:x,Re:D,Se:F,rawExtraField:K,ze:Y,extendedTimestamp:rt,msDosCompatible:nt,internalFileAttributes:ot,externalFileAttributes:it,diskNumberStart:o,uid:at,gid:st,unixMode:ct,symlink:Boolean(ut),setuid:lt,setgid:ft,sticky:dt,unixExternalUpper:wt,msdosAttributesRaw:pt,msdosAttributes:ht};let{crc32:At,uncompressedSize:Rt}=c,zt=0;yt||(Rt=0);const{writable:xt}=n;if(e){const o=e.size,i=Ye(So(e,{size:o})),a={options:{codecType:Tr,inputSize:o,level:M,rawPassword:v,password:C,encryptionStrength:et,zipCrypto:m&&L,passwordVerification:m&&L&&h>>8&r,computeCrc32:!yt,compressed:y&&!yt,encrypted:m&&!bt,useWebWorkers:q,useCompressionStream:mt,transferStreams:X,format:Et,codecURI:St,compressionMethod:E},config:s,ft:{signal:tt,size:o,onstart:J,onprogress:Q,onend:$}};try{const e=await ln({readable:i,writable:xt},a);if(zt=e.outputSize,n.size+=zt,yt||(Rt=e.inputSize,m&&!L||(At=e.crc32)),!P&&zt>=t||!B&&Rt>=t)throw new Error(qa)}catch(t){const{outputSize:e}=a;throw e!==T?n.size+=e:Zt(t)&&t.outputSize!==T&&(n.size+=t.outputSize),t}}return function({crc32:t,compressedSize:e,uncompressedSize:r,Me:n,je:o},{zip64:i,zipCrypto:a,Te:s,dataDescriptor:c}){const{pe:u,encrypted:l}=n,{Ze:f,Ve:d}=o;l&&!a&&!s||t===T||(lc(u,10,t),c&&lc(f,d,t)),i?c&&(fc(f,d+4,BigInt(e)),fc(f,d+12,BigInt(r))):(lc(u,14,e),lc(u,18,r),c&&(lc(f,d+4,e),lc(f,d+8,r)))}({crc32:At,compressedSize:zt,uncompressedSize:Rt,Me:u,je:l},c),W&&await Js(n,O),Object.assign(gt,{uncompressedSize:Rt,compressedSize:zt,lastModDate:p,rawLastModDate:h,creationDate:k,lastAccessDate:U,encrypted:Boolean(m),zipCrypto:Boolean(L),size:f+zt,compressionMethod:E,version:b,we:d,pe:w,signature:At,crc32:!m||L||yt?At:T,Le:R,We:z,me:B,he:P}),gt}(o,z,x,i,Ut(),a),b||(A=!1),s.set(n,x),x.filename=n,b){if(await Promise.all([z.writable.getWriter().close(),O]),await U(),e.te&&await Xs(e,c),g=!0,R=c.size,await k(),x.diskNumberStart=Ls(c),x.offset=Vs(e,c),y){const t=i.Be;Ns(i,e.offset-Ws(c)),x.size+=i.Be-t}!function({rawFilename:t,encrypted:e,zip64:r,Pe:n,crc32:o,compressedSize:i,uncompressedSize:a,me:s,he:c},u,{dataDescriptor:l,Te:f}){if(l||((!e||f&&o!==T)&&lc(u,14,o),c||lc(u,18,i),s||lc(u,22,a)),r&&n){const e=D+wc(t)+4;fc(u,e,BigInt(a)),fc(u,e+8,BigInt(i))}}(x,w.He,a),await Js(c,w.ke),await Qs(z.readable,c,d,t=>F+=t),c.size+=z.size,g=!1}else x.diskNumberStart=m,x.offset=S;return e.offset+=x.size,x}catch(t){if(g||A){if(e.hasCorruptedEntries=!0,t)try{t.corruptedEntry=!0}catch{}e.offset+=c.size-R,b&&(e.offset+=F)}throw s.delete(n),t}finally{if(b&&e.ae--,E&&e.se--,m&&m(O),S&&S(),b&&z&&z.dispose)try{await z.dispose()}catch{}}async function U(){e.fe=!0;const{de:t}=e;e.de=new Promise(t=>S=()=>{e.fe=!1,t()}),await t}async function k(){Zs(c,wc(w.ke))&&await c.closeDisk()}}(e,n,o,{Me:b,je:E,Be:S,$t:f,Ne:l,_e:d},i)}catch(t){throw e.ee.delete(n),t}finally{d&&d(l&&l.Oe)}return Object.assign(w,{name:n,comment:c,extraField:u}),new ri(w)}(e,n,o,i)}catch(t){throw e.re.delete(n),t}finally{const t=gs.shift();t?t():Ss--}}(i,e,n,o);a.add(s);const c=()=>a.delete(s);return Promise.prototype.then.call(s,c,c),Ds(i,s)}remove(t){const{re:e,ee:r}=this;if(typeof t==v&&(t=r.get(t)),t&&t.filename!==T){const{filename:n}=t;if(e.has(n)&&r.has(n))return e.delete(n),r.delete(n),!0}return!1}async close(r=N,n={}){const o=this,{oe:i,writer:w}=this,{writable:p}=w;if(o.ue)return xs(w);if(!(r instanceof Uint8Array))throw new Error(Ua);if(wc(r)>e)throw new Error(Ia);for(;i.size;)await Promise.allSettled(Array.from(i));await Promise.allSettled(o.ie.map(t=>t.Ge));const h=o.ie.filter(t=>t.Ke&&!t.Ye);if(h.length){const t=h.map(t=>t.error);h.forEach(t=>t.Ye=!0);const[e]=t;try{e.entryErrors=t}catch{}throw e}return await async function(r,n,o){const{qe:i,Xe:w}=Bs(r.ee),{Je:p,Qe:h,$e:m}=await async function(r,n,o){const{ee:i,writer:a}=r,c=new Uint8Array(n);await yo(a);let u=0,l=0,d=Ls(a),w=Ws(a),p=0;for(const[r,n]of Array.from(i.values()).entries()){const{offset:h,rawFilename:m,Ee:y,Se:b,ge:E,Ae:S,Re:g,rawExtraField:A,ze:R,rawComment:z,versionMadeBy:x,we:D,pe:F,me:O,he:T,be:I,er:U,internalFileAttributes:k,externalFileAttributes:C,diskNumberStart:v,uncompressedSize:M,compressedSize:N}=n,_=wc(y,b,E,S,g,A,R),j=f+wc(m,z)+_;Zs(a,u+j-l)&&(await Js(a,c.slice(l,u)),l=u,p=0,await a.closeDisk()),0==r&&(d=Ls(a),w=Ws(a)),O||lc(F,18,M),T||lc(F,14,N),(U||I)&&n.version<45&&uc(F,0,45);const B=Ps(j);if(B.rr(s),B.nr(x),B.ir(D.subarray(0,24)),B.nr(_),B.nr(wc(z)),B.nr(I?e:v),B.nr(k),B.rr(C),B.rr(U?t:h),B.ir(m),B.ir(y),B.ir(b),B.ir(E),B.ir(S),B.ir(g),B.ir(A),B.ir(R),B.ir(z),dc(c,B.Lt,u),u+=j,p++,o.onprogress)try{await o.onprogress(r+1,i.size,new ri(n))}catch{}}return await Js(a,l?c.slice(l):c),{Je:{diskNumber:d,diskOffset:w},Qe:{diskNumber:Ls(a),ar:p},$e:c}}(r,i,o),y=await async function(t,r,n){const o=oc(t,n,Q);if(o){const n=await o(r),i=wc(n);if(i>e)throw new Error(fs);const s=Ps(6+i);s.rr(a),s.nr(i),s.ir(n);const{writer:c}=t;return Zs(c,wc(s.Lt))&&await c.closeDisk(),await Js(c,s.Lt),6+i}return 0}(r,m,o);await async function(r,n,o,i){const{writer:a}=r,{Je:s,Qe:f,sr:w,Xe:p}=i;let{qe:h}=i,m=r.ee.size,y=s.diskNumber,b=Vs(r,s);const E=wc(n);if(E>e)throw new Error(Ia);let S=rc(r,o,Lo),g=Ls(a);if(Zs(a,(S?98:d)+E)&&g++,b>=t||h>=t||m>=e||g>=e){if(!1===S)throw new Error(qa);S=!0}else S===T&&p&&(S=!0);const A=Ps(S?98:d);Zs(a,wc(A.Lt)+E)&&await a.closeDisk(),g=Ls(a);let R=g==f.diskNumber?f.ar:0;S&&(A.rr(u),A.cr(44),A.nr(45),A.nr(45),A.rr(g),A.rr(y),A.cr(R),A.cr(m),A.cr(h),A.cr(b),A.rr(l),A.rr(g),A.cr(BigInt(Vs(r,a))+BigInt(h)+BigInt(w)),A.rr(g+1),rc(r,o,"supportZip64SplitFile",!0)&&(g=e,y=e),R=e,m=e,b=t,h=t),A.rr(c),A.nr(g),A.nr(y),A.nr(R),A.nr(m),A.rr(h),A.rr(b),A.nr(E),await Js(a,A.Lt),E&&await Js(a,n)}(r,n,o,{Je:p,Qe:h,qe:i,sr:y,Xe:w})}(o,r,n),o.ue=!0,!mo(w)&&rc(o,n,H)||await p.getWriter().close(),xs(w)}[_](){return this.close()}}class Rs{constructor(t={}){const{readable:e,writable:r}=new TransformStream;this.readable=e,this.zipWriter=new As(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 Fs(e,t)}}()}});return Os(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 Os(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 Fs(r,t),t}try{return await r.close(t,e)}catch(t){throw await Fs(r,t),t}}}class zs extends Promise{then(t,e){const{ur:r}=this;return r&&(r.Ye=!0),super.then(t,e)}}function xs(t){return t.getData?t.getData():t.writable}function Ds(t,e){const r=new zs((t,r)=>Promise.prototype.then.call(e,t,r)),n={};return r.ur=n,n.Ge=Promise.prototype.then.call(r,T,t=>Object.assign(n,{Ke:!0,error:t})),t.ie.push(n),r}async function Fs(t,e){try{await t.writer.writable.abort(e)}catch{}}function Os(t,e,r){t.oe.add(e),e.catch(t=>{try{r(t)}catch{}})}function Ts(t,e,n){if(null===t||typeof t!=C||Array.isArray(t))throw new Error(ds);const{externalFileAttributes:o,versionMadeBy:i,comment:a,lastModDate:s,rawLastModDate:c,creationDate:u,lastAccessDate:l,uncompressedSize:f,encrypted:d,zipCrypto:w,crc32:p,compressionMethod:h,extraFieldAES:m,extraFieldUnix:y,internalFileAttributes:b,extraField:E,bitFlag:S,directory:g,uid:A,gid:R}=t,z={externalFileAttributes:o,versionMadeBy:i,comment:a,lastModDate:s,creationDate:u,lastAccessDate:l,internalFileAttributes:b,directory:g};S&&S.languageEncodingFlag&&(z[K]=!0);const x=function(t){if(t){const e=new Map;if(t.forEach((t,r)=>{ni.has(r)||e.set(r,t.data)}),e.size)return e}}(E);x&&(z[Xo]=x),A===T&&R===T||Object.assign(z,{uid:A,gid:R,unixExtraFieldType:y?bs:ys});const D={};if(e&&!g)if(Object.assign(D,{uncompressedSize:f,crc32:p,compressionMethod:h}),e!==it&&Object.assign(D,{encrypted:d,zipCrypto:w,encryptionStrength:m?m.strength:T}),S&&(D.dataDescriptor=S.dataDescriptor,D[G]=Es[S.level]),n===T)D.rawLastModDate=c;else if(e!==it&&w&&(!S||S.dataDescriptor)&&n instanceof Date&&function(t){let e=new Date(2e3*Math.ceil(Math.floor(t.getTime()/1e3)/2));return e<O?e=O:e>F&&(e=F),(e.getHours()<<3|e.getMinutes()>>3)&r}(n)!=(c>>>8&r))throw new Error(ws);return{xe:z,De:D}}function Is(n,o,i){let a=rc(n,i,Po),s=rc(n,i,Vo,a?20:768);const c=rc(n,i,Ko),u=ic(n,i,"uid"),l=ic(n,i,"gid");let f=ic(n,i,Jo),d=rc(n,i,"unixExtraFieldType"),w=rc(n,i,Qo),p=rc(n,i,$o),h=rc(n,i,ti);if(yt(u,t,ns),yt(l,t,os),yt(f,e,is),d!==T&&d!==ys&&d!==bs)throw new Error(as);if(d===bs&&(u!==T&&u>e||l!==T&&l>e))throw new Error(ss);d!==T||u===T&&l===T||(d=ys);let m=ic(n,i,jo),y=rc(n,i,Bo);const b=m!==T||y!==T;if(u!==T||l!==T||f!==T||d||c?(a=!1,s=s&r|768):b&&(a=!0,s&=r),yt(m,r,cs),y&&(typeof y!==C||Array.isArray(y)))throw new Error(us);if(s>e)throw new Error(Na);let E=rc(n,i,_o);const S=E!==T;S||(E=0),!i[Go]&&o.endsWith(x)&&(i[Go]=!0);const D=rc(n,i,Go);if(D?(o.endsWith(x)||(o+=x),S||(E=16,a||(E|=16877<<16))):a||S||(E=c?493<<16:27525120),!a){const t=f!==T||Boolean(w||p||h);f=f===T?E>>16&e:f&e,w?f|=R:w=Boolean(f&R),p?f|=z:p=Boolean(f&z),h?f|=512:h=Boolean(512&f),S&&!t||(D?f=-61441&f|A:f&g||(f|=32768),E=(f&e)<<16|E&e)}({msdosAttributesRaw:m,msdosAttributes:y}=function(t,e){if(t!==T)t&=r;else if(e!==T){const{readOnly:n,hidden:o,system:i,directory:a,archive:s}=e;let c=0;n&&(c|=1),o&&(c|=2),i&&(c|=4),a&&(c|=16),s&&(c|=32),t=c&r}return e===T&&(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!==T&&40960==(f&g);return{name:o,Fe:{versionMadeBy:s,msDosCompatible:Boolean(a),externalFileAttributes:E,unixExternalUpper:F,uid:u,gid:l,unixMode:f,unixExtraFieldType:d,symlink:O,setuid:w,setgid:p,sticky:h,msdosAttributesRaw:m,msdosAttributes:y}}}function Us(t,r,n){const o=oc(t,n,"encodeText")||ee;let i=o(r,tt);if(i===T&&(i=ee(r)),wc(i)>e)throw new Error(Ma);const a=n[zo]||"";if(typeof a!=v)throw new Error(Ca);let s=o(a,et);if(s===T&&(s=ee(a)),wc(s)>e)throw new Error(ka);const c=rc(t,n,Zo);if(c!==T&&c>e)throw new Error(Na);const u=nc(t,n,Io,new Date),l=rc(t,n,Uo),f=nc(t,n,ko),d=nc(t,n,vo),w=rc(t,n,No,0),p=ht(rc(t,n,P)),h=Boolean(p),m=!0===p,y=rc(t,n,j),b=rc(t,n,B);pt(y,b);const E=ic(t,n,"encryptionStrength",3),S=rc(t,n,Ho),g=rc(t,n,"extendedTimestamp",!0),A=rc(t,n,"ntfsTimestamp"),R=rc(t,n,"keepOrder",!0),z=rc(t,n,W),x=rc(t,n,V),D=rc(t,n,"bufferedWrite"),F=oc(t,n,"createTempStream"),O=rc(t,n,"dataDescriptorSignature",!0),I=dt(rc(t,n,L));wt(I);const U=rc(t,n,K,!hc(i)||!hc(s)),k=rc(t,n,Yo),C=h||k===T?T:ar(k);if(!h&&k!==T&&0!==k&&8!==k&&!C)throw new Error(tr);let M=ic(t,n,G);if(yt(M,9,ls),t.options[X]){if(y!==T||b!==T)throw new Error(ja);M===T&&k===T&&(M=0)}h&&(M=bt(n[G]));let N=rc(t,n,Z),_=rc(t,n,Y);D&&_===T&&(_=!1),(_===T||S&&!m)&&(_=!0),M!==T&&6!=M&&(N=!1);const H=rc(t,n,Lo);if(!(S||y===T&&b===T||Number.isInteger(E)&&E>=1&&E<=3))throw new Error(_a);const q=ks(n[Xo]),J=ks(n.localExtraField),Q=ks(n.centralExtraField);return{comment:a,Fe:{rawFilename:i,rawComment:s,version:c,lastModDate:u,rawLastModDate:l,lastAccessDate:f,creationDate:d,internalFileAttributes:w,Te:h,Ie:m,password:y,rawPassword:b,encryptionStrength:E,zipCrypto:S,extendedTimestamp:g,ntfsTimestamp:A,keepOrder:R,useWebWorkers:z,transferStreams:x,bufferedWrite:D,createTempStream:F,dataDescriptorSignature:O,signal:I,useUnicodeFileNames:U,compressionMethod:k,format:C?C.format:T,codecURI:C?C.codecURI:T,lr:C?C.versionNeeded:T,level:M,useCompressionStream:N,dataDescriptor:_,zip64:H,rawExtraField:q,dr:J,ze:Q}}}function ks(t){if(!t)return N;if(!(t instanceof Map))throw new Error(La);let r=0,n=0;t.forEach((t,n)=>{if(mt(n,e,Wa),!(t instanceof Uint8Array))throw new Error(Za);if(wc(t)>e)throw new Error(Va);r+=4+wc(t)});const o=new Uint8Array(r),i=Wt(o);return t.forEach((t,e)=>{uc(i,n,e),uc(i,n+2,wc(t)),dc(o,t,n+4),n+=4+wc(t)}),o}function Cs(e,r,n,o,i){const{Te:a,Ie:s,zipCrypto:c,password:u,rawPassword:l,encryptionStrength:f}=o;let{dataDescriptor:d,zip64:w,level:p,compressionMethod:h}=o,m=0,y=0,b=!1;if(a&&r){if(y=i[Do],y===T)throw new Error(Xa);if(h===T)throw new Error(Ja)}const E=!0===w,S=rc(e,i,Wo);if(r&&s&&!S&&wc(u,l))throw new Error(Pa);const g=r&&(Boolean(u&&wc(u)||l&&wc(l))||s&&S);r||(p=0,h=0);const A=oi(g,c,f);r&&(a?(i.uncompressedSize=y,m=n===T?ac(y)+A:n+(s?0:A)):n===T?(d=!0,(w||w===T)&&(w=b=!0,m=4294967296)):(i.uncompressedSize=y=n,m=(sc(h,p)?ac(y):y)+A));const R=!(g||r&&(0!==n||a)||sc(h,p));R&&!c&&rc(e,i,Y)===T&&(d=!1);const z=E||b||y>=t,x=E||m>=t;if(z||x){if(!1===w)throw new Error(qa);w=!0}return w=w||!1,{wr:m,Fe:{dataDescriptor:d,ve:R,zip64:w,ye:E,pr:b,me:z,he:x,uncompressedSize:y,level:p,compressionMethod:h,encrypted:g}}}function vs(e,r,n){const o=e.slice().sort((t,e)=>n?e-t:t-e);let i=r,a=0;for(const e of o){if(i>=t)break;i+=e,a++}return a}function Ms(t){const{rawFilename:r,lastModDate:o,rawLastModDate:i,lastAccessDate:a,creationDate:s,level:c,zip64:u,zipCrypto:l,useUnicodeFileNames:f,dataDescriptor:d,directory:w,rawExtraField:p,dr:y,encryptionStrength:S,extendedTimestamp:g,ntfsTimestamp:A,Te:R,encrypted:z,me:x,he:I,uncompressedSize:U,pr:k,crc32:C}=t;let{version:v,compressionMethod:M}=t;const _=!w&&sc(M,c);let j;const B=R||!_,P=u&&(t.bufferedWrite||!d||!x&&!I||B&&!k),L=P||u&&d&&(x||I);if(u&&(x||I)){const t=20,e=Ps(t);if(e.nr(1),e.nr(t-4),j=e.Lt,P&&(e.cr(U),B)){const t=oi(z,l,S);e.cr(R?0:U+t)}}else j=N;let W,Z,V,H,G;if(z&&!l){const t=Ps(wc(ms)+2);t.nr(h),t.ir(ms),W=t.Lt,W[8]=S}else W=N;if(g){const t=tc(o),e=(K=t)>=Ha&&K<=Ga;if(e){const e=9+(a?4:0)+(s?4:0),r=Ps(e);H=1+(a?2:0)+(s?4:0),G=t,r.nr(m),r.nr(e-4),r.mr(H),r.rr(t),a&&r.rr(ec(tc(a))),s&&r.rr(ec(tc(s))),V=r.Lt}else V=N;if(A===T?!e||Boolean(a||s):A)try{const t=$s(o),e=Ps(36);e.nr(10),e.nr(32),e.yr(4),e.nr(1),e.nr(24),e.cr(t),e.cr(a?$s(a):t),e.cr(s?$s(s):t),Z=e.Lt}catch{Z=N}else Z=N}else Z=V=N;var K;let Y;try{const{uid:r,gid:n,unixExtraFieldType:o}=t;if(o!=ys||r===T&&n===T)if(o!=bs||r===T&&n===T)Y=N;else{const t=Ps(8);t.nr(E),t.nr(4),t.nr((r===T?0:r)&e),t.nr((n===T?0:n)&e),Y=t.Lt}else{const t=_s(r===T?0:r),e=_s(n===T?0:n),o=3+t.length+e.length,i=Ps(4+o);i.nr(b),i.nr(o),i.mr(1),i.mr(t.length),i.ir(t),i.mr(e.length),i.ir(e),Y=i.Lt}}catch{Y=N}M===T&&(M=_?8:0),v===T&&(v=0!=M||w||z?20:10);const{lr:q}=t;_&&q!==T&&(v=v>q?v:q),u&&(v=v>45?v:45),z&&!l&&(v=v>51?v:51,R&&C!==T&&(W[4]=1),uc(Wt(W),9,M),M=99);const J=L?wc(j):0,Q=J+wc(W,V,Z,Y,p,y);if(Q+(t[X]?67:0)>e)throw new Error(Va);const $=new Date(2e3*Math.ceil(Math.floor(o.getTime()/1e3)/2)),tt=$<O?O:$>F?F:$,et=wc(V)?new Date(1e3*tc(o)):wc(Z)?o:tt,{we:rt,pe:nt,rawLastModDate:ot}=pc({version:v,bitFlag:mc(c,f,d,z,M),compressionMethod:M,uncompressedSize:U,lastModDate:tt,rawLastModDate:i,rawFilename:r,he:I,me:x,extraFieldLength:Q}),it=Ps(D+wc(r)+Q),at=it.Lt,st=Wt(at);return it.rr(n),it.ir(rt),it.ir(r),L&&it.ir(j),it.ir(W),it.ir(V),it.ir(Z),it.ir(Y),it.ir(p),it.ir(y),d&&(I||lc(st,18,0),x||lc(st,22,0)),{ke:at,He:st,we:rt,pe:nt,lastModDate:et,Ue:et===tt&&$.getTime()!=tt.getTime(),rawLastModDate:ot,encrypted:z,compressed:_,version:v,compressionMethod:M,Le:H,We:G,Ee:N,Pe:J,ge:V,Ae:Z,Re:Y,Se:W,extraFieldLength:Q}}function Ns(t,e){const{Me:r}=t;let{ke:n,extraFieldLength:o}=r,i=64-(e+wc(n))%64;i<4&&(i+=64);const a=new Uint8Array(i),s=Wt(a);uc(s,0,y),uc(s,2,i-4);const c=n;r.ke=n=new Uint8Array(wc(c)+i),dc(n,c),dc(n,a,wc(c));const u=Wt(n);uc(u,28,o+i),r.He=u,t.Be+=i}function _s(t){const e=new Uint8Array(4);Wt(e).setUint32(0,t,!0);let r=4;for(;r>1&&0===e[r-1];)r--;return e.subarray(0,r)}function js({zip64:t,dataDescriptor:e,dataDescriptorSignature:r}){let n,o=N,a=0,s=t?20:12;return r&&(s+=4),e&&(o=new Uint8Array(s),n=Wt(o),r&&(a=4,lc(n,0,i))),{Ce:o,Ze:n,Ve:a}}function Bs(r){let n=0,o=!1;for(const[,i]of r){const{rawFilename:r,Se:a,rawComment:s,Ae:c,Re:u,rawExtraField:l,ze:d,Le:w,We:p,ye:h,uncompressedSize:y,compressedSize:b}=i;let{me:E,he:S}=i;h||(E&&y<t&&(E=i.me=!1),S&&b<t&&(S=i.he=!1)),o=o||E||S;const g=i.offset>=t,A=i.diskNumberStart>=e;let R,z;if(g||A||E||S){const t=4+(E?8:0)+(S?8:0)+(g?8:0)+(A?4:0),e=Ps(t);e.nr(1),e.nr(t-4),E&&e.cr(y),S&&e.cr(b),g&&e.cr(i.offset),A&&e.rr(i.diskNumberStart),R=e.Lt}else R=N;if(i.Ee=R,i.er=g,i.be=A,p===T)z=N;else{const t=Ps(9);t.nr(m),t.nr(5),t.mr(w),t.rr(p),z=t.Lt}i.ge=z;const x=wc(R,a,c,u,z,l,d);if(x>e)throw new Error(Va);n+=f+wc(r,s)+x}return{qe:n,Xe:o}}function Ps(t){const e=new Uint8Array(t),r=Wt(e);let n=0;return{Lt:e,mr:t=>{!function(t,e,r){t.setUint8(e,r)}(r,n,t),n+=1},nr:t=>{uc(r,n,t),n+=2},rr:t=>{lc(r,n,t),n+=4},cr:t=>{fc(r,n,BigInt(t)),n+=8},ir:t=>{dc(e,t,n),n+=wc(t)},yr:t=>n+=t}}function Ls(t){const{diskNumber:e=0}=t;return e}function Ws(t){const{diskOffset:e=0}=t;return e}function Zs(t,e){const{availableSize:r=I}=t;return e>r}function Vs(t,{diskNumber:e=0,diskOffset:r=0}){return t.offset-r-(e?t.ne:0)}function Hs(t){const e=Wt(t);let r=0;for(;r+4<=wc(t);){const n=4+cc(e,r+2);if(1==cc(e,r))return Hs(Pt(t.subarray(0,r),t.subarray(Math.min(r+n,wc(t)))));r+=n}return t}async function Gs(t,e,r,n){if(n>0){const{writer:o}=t;let i=0;try{await Qs(So(e,{offset:r,size:n}),o,T,t=>i+=t)}catch(e){t.hasCorruptedEntries=!0;try{e.corruptedEntry=!0}catch{}throw e}finally{o.size+=i,t.offset+=i}}}async function Ks(t,e){const r=await Eo(t,e,D);if(wc(r)<D)return D;const n=Wt(r);return D+cc(n,26)+cc(n,28)}function Ys(t,{offset:e,diskNumberStart:r}){return e+(t.Gt?t.Gt(r):0)}function qs(){const t=new Uint8Array(4);return lc(Wt(t),0,o),t}async function Xs(t,e){delete t.te,await Js(e,qs()),t.offset+=4}async function Js(t,e){const{writable:r}=t,n=r.getWriter();try{await n.ready,t.size+=wc(e),await n.write(e)}finally{n.releaseLock()}}async function Qs(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(wc(t))}}),{preventClose:!0,preventAbort:!0,signal:r})}finally{o.releaseLock()}}function $s(t){if(t){const e=(BigInt(t.getTime())+BigInt(116444736e5))*BigInt(1e4);return e<Ka?Ka:e>Ya?Ya:e}}function tc(t){return Math.floor(t.getTime()/1e3)}function ec(t){return Math.min(Ga,Math.max(Ha,t))}function rc(t,e,r,n){const o=e[r]===T?t.options[r]:e[r];return o===T?n:o}function nc(t,e,r,n){const o=rc(t,e,r,n);if(null===o)return n;if(o!==T&&(typeof o.getTime!=k||Number.isNaN(o.getTime())))throw new Error(va);return o}function oc(t,e,r){return ft(rc(t,e,r))}function ic(t,e,r,n){return bt(rc(t,e,r,n))}function ac(t){return t+5*(Math.floor(t/16383)+1)}function sc(t,e){return t===T?e===T||e>0:0!==t}function cc(t,e){return t.getUint16(e,!0)}function uc(t,e,r){t.setUint16(e,r,!0)}function lc(t,e,r){t.setUint32(e,r,!0)}function fc(t,e,r){t.setBigUint64(e,r,!0)}function dc(t,e,r){t.set(e,r)}function wc(...t){let e=0;return t.forEach(t=>t&&(e+=t.length)),e}function pc({version:e,bitFlag:r,compressionMethod:n,uncompressedSize:o,compressedSize:i,lastModDate:a,rawLastModDate:s,rawFilename:c,he:u,me:l,extraFieldLength:f}){const d=Ps(26),w=d.Lt,p=Wt(w);if(d.nr(e),d.nr(r),d.nr(n),s===T){const t=new Uint32Array(1),e=Wt(t);uc(e,0,(a.getHours()<<6|a.getMinutes())<<5|a.getSeconds()/2),uc(e,2,(a.getFullYear()-1980<<4|a.getMonth()+1)<<5|a.getDate()),s=t[0]}return d.rr(s),d.yr(4),u||i!==T?d.rr(u?t:i):d.yr(4),l||o!==T?d.rr(l?t:o):d.yr(4),d.nr(wc(c)),d.nr(f),{we:w,pe:p,rawLastModDate:s}}function hc(t){return t.every(t=>t>=32&&t<=126)}function mc(t,e,r,n,o){let i=0;return e&&(i|=S),r&&(i|=8),8!=o&&9!=o||(t>=0&&t<=3&&(i|=6),t>3&&t<=5&&(i|=4),9==t&&(i|=2)),n&&(i|=1),i}function yc(){return"application/octet-stream"}function bc(){const{CompressionStream:t,DecompressionStream:e,CompressionStreamFallback:r,DecompressionStreamFallback:n}=Ut(),o=[{compressionMethod:0,compression:!0,decompression:!0,registered:!1},{compressionMethod:8,compression:Ec(r,wr)||Ec(t,wr)||Ec(t,hr),decompression:Ec(n,wr)||Ec(e,wr)||Ec(e,hr),registered:!1},{compressionMethod:9,compression:!1,decompression:Ec(n,pr)||Ec(e,pr),registered:!1}];for(const t of sr()){const e=cr(t.format);o.push({compressionMethod:t.compressionMethod,compression:e?typeof e.CompressionStream==k:T,decompression:e?typeof e.DecompressionStream==k:T,registered:!0})}return o}function Ec(t,e){if(!t)return!1;const{Er:r}=t;return r?r.includes(e):gr(t,e)}const Sc="2.13.0",gc=1048576,Ac=".zip.js-temp";function Rc(t={}){const{thresholdBytes:e=gc,directoryName:r=Ac,getDirectory:n=()=>navigator.storage.getDirectory()}=t;let o;function i(){return o||(o=Promise.resolve(n()).then(t=>t.getDirectoryHandle(r,{create:!0}))),o}return function(){const t=[];let r,n,o,a,s=0,c=!1;const u=new WritableStream({async write(a){c?await o.write(a):(t.push(a),s+=a.length,s>e&&await async function(){const e=await i();r=crypto.randomUUID?crypto.randomUUID():Array.from(crypto.getRandomValues(new Uint8Array(16)),t=>t.toString(16).padStart(2,"0")).join(""),n=await e.getFileHandle(r,{create:!0}),o=(await n.createWritable()).getWriter(),c=!0;for(const e of t)await o.write(e);t.length=0}())},async close(){o&&(await o.close(),o=null)}});let l=0;return{writable:u,readable:new ReadableStream({async pull(e){if(c){if(!a){const t=await n.getFile();a=t.stream().getReader()}const{value:t,done:r}=await a.read();r?e.close():e.enqueue(t)}else l<t.length?e.enqueue(t[l++]):e.close()},async cancel(t){a&&await a.cancel(t)}},{highWaterMark:0}),dispose:async function(){if(o){try{await o.close()}catch{}o=null}if(r){try{const t=await i();await t.removeEntry(r)}catch{}n=r=null}t.length=0}}}}const zc=1048576;function xc(t={}){const{thresholdBytes:e=zc}=t;return function(){const t=[];let r,n,o,i=0,a=!1;const s=new WritableStream({async write(o){a?await r.write(o):(t.push(o),i+=o.length,i>e&&await async function(){const e=new TransformStream;n=qe(e.readable),r=e.writable.getWriter(),a=!0;for(const e of t)await r.write(e);t.length=0}())},async close(){r&&(await r.close(),r=null)}});let c=0;return{writable:s,readable:new ReadableStream({async pull(e){if(a){if(!o){const t=await n;o=t.stream().getReader()}const{value:t,done:r}=await o.read();r?e.close():e.enqueue(t)}else c<t.length?e.enqueue(t[c++]):e.close()},async cancel(t){o&&await o.cancel(t)}},{highWaterMark:0}),dispose:async function(){if(r){try{await r.abort()}catch{}r=null}n&&(n.catch(()=>{}),n=null),t.length=0}}}}const Dc=1048576,Fc=".zip.js-temp",Oc="createSyncAccessHandle is only available in dedicated workers";function Tc(t={}){const{thresholdBytes:e=Dc,directoryName:r=Fc,getDirectory:n}=t;if(!(n||"undefined"!=typeof FileSystemFileHandle&&FileSystemFileHandle.prototype.createSyncAccessHandle))throw new Error(Oc);const o=n||(()=>navigator.storage.getDirectory());let i;function a(){return i||(i=Promise.resolve(o()).then(t=>t.getDirectoryHandle(r,{create:!0}))),i}return function(){const t=[];let r,n,o=0,i=!1,s=0,c=0;const u=new WritableStream({async write(c){i?(n.write(c,{at:s}),s+=c.length):(t.push(c),o+=c.length,o>e&&await async function(){const e=await a();r=crypto.randomUUID?crypto.randomUUID():Array.from(crypto.getRandomValues(new Uint8Array(16)),t=>t.toString(16).padStart(2,"0")).join("");const o=await e.getFileHandle(r,{create:!0});n=await o.createSyncAccessHandle(),i=!0;for(const e of t)n.write(e,{at:s}),s+=e.length;t.length=0}())},close(){n&&n.flush()}});let l=0;return{writable:u,readable:new ReadableStream({pull(e){if(i){const t=s-c;if(t<=0)return void e.close();const r=new Uint8Array(Math.min(524288,t)),o=n.read(r,{at:c});o?(c+=o,e.enqueue(r.subarray(0,o))):e.close()}else l<t.length?e.enqueue(t[l++]):e.close()}},{highWaterMark:0}),dispose:async function(){if(n){try{n.close()}catch{}n=null}if(r){try{const t=await a();await t.removeEntry(r)}catch{}r=null}t.length=0}}}}try{jt({baseURI:import.meta.url})}catch{}const Ic="deflate",Uc="deflate-raw",kc="deflate64-raw",Cc="gzip";let vc,Mc,Nc,_c,jc;function Bc(t,e,r={}){if(!vc){const t=new Error("WASM module not loaded");throw t.cause=jc,t}const n="number"==typeof r.level?r.level:-1,o="number"==typeof r.outBuffer?r.outBuffer:65536,i="number"==typeof r.inBufferSize?r.inBufferSize:65536;return new TransformStream({start(){try{let r;if(this.Sr=Mc(o),this.in=Mc(i),this.inBufferSize=i,!this.Sr||!this.in)throw new Error("allocation failed");if(this.gr=new Uint8Array(o),t?(this.Ar=vc.deflate_process,this.Rr=vc.deflate_last_consumed,this.zr=vc.deflate_end,this.Dr=vc.deflate_new(),r=e===Cc?vc.deflate_init_gzip(this.Dr,n):e===Uc?vc.deflate_init_raw(this.Dr,n):vc.deflate_init(this.Dr,n)):e===kc?(this.Ar=vc.inflate9_process,this.Rr=vc.inflate9_last_consumed,this.zr=vc.inflate9_end,this.Dr=vc.inflate9_new(),r=vc.inflate9_init_raw(this.Dr)):(this.Ar=vc.inflate_process,this.Rr=vc.inflate_last_consumed,this.zr=vc.inflate_end,this.Dr=vc.inflate_new(),r=e===Uc?vc.inflate_init_raw(this.Dr):e===Cc?vc.inflate_init_gzip(this.Dr):vc.inflate_init(this.Dr)),0!==r)throw new Error("init failed:"+r)}catch(t){throw a(this),t}},transform(t,e){try{const r=t,n=new Uint8Array(_c.buffer),i=this.Ar,a=this.Rr,s=this.Sr,c=this.gr;let u=0;for(;u<r.length;){const t=Math.min(r.length-u,32768);if((!this.in||this.inBufferSize<t)&&(this.in&&Nc&&(Nc(this.in),this.in=0),this.in=Mc(t),this.inBufferSize=t,!this.in))throw new Error("allocation failed");n.set(r.subarray(u,u+t),this.in);const l=i(this.Dr,this.in,t,s,o,0),f=l>>24&255,d=128&f?f-256:f;if(d<0)throw new Error("process error:"+d);const w=16777215&l;w&&(c.set(n.subarray(s,s+w),0),e.enqueue(c.slice(0,w)));const p=a(this.Dr);if(0===p&&0===w)break;u+=p}}catch(t){a(this),e.error(t)}},flush(t){try{const e=new Uint8Array(_c.buffer),r=this.Ar,n=this.Sr,i=this.gr;for(;;){const a=r(this.Dr,0,0,n,o,4),s=a>>24&255,c=128&s?s-256:s;if(c<0)throw new Error("process error:"+c);const u=16777215&a;if(u&&(i.set(e.subarray(n,n+u),0),t.enqueue(i.slice(0,u))),1===s||0===u)break}}catch(e){t.error(e)}finally{const e=a(this);0!==e&&t.error(new Error("end error:"+e))}},cancel(){a(this)}});function a(t){let e=0;return t.Dr&&t.zr&&(e=t.zr(t.Dr)),t.Dr=0,t.in&&Nc&&Nc(t.in),t.in=0,t.Sr&&Nc&&Nc(t.Sr),t.Sr=0,e}}class Pc{constructor(t=Ic,e){return Bc(!0,t,e)}}class Lc{constructor(t=Ic,e){return Bc(!1,t,e)}}Pc.lt=!0,Lc.lt=!0,Pc.Er=[Ic,Uc,Cc],Lc.Er=[Ic,Uc,Cc,kc];let Wc,Zc=!1;async function Vc(){await async function(){await Promise.allSettled(on.map(t=>(hn(t),t.terminate()))),vr=T,Mr=!1}(),Wc=null,Zc=!1,vc=Mc=Nc=_c=jc=null}!function({Fr:t}){_r=t}({Fr:t=>{if(!Wc){let{wasmURI:e}=t;typeof e==k&&(e=e()),Wc=async function(t,{baseURI:e}){if(!Zc)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(vc=t,({malloc:Mc,free:Nc,memory:_c}=vc),"function"!=typeof Mc||"function"!=typeof Nc||!_c)throw vc=Mc=Nc=_c=null,new Error("Invalid WASM module")}((await WebAssembly.instantiate(r)).instance.exports)}(t,e),Zc=!0}catch(t){throw function(t){jc=t}(t),t}}(e,t).catch(t=>{throw Wc=null,t})}return Wc}}),jt({CompressionStreamFallback:Pc,DecompressionStreamFallback:Lc}),jt({workerURI:new URL("./zip-web-worker.js",import.meta.url).href,wasmURI:new URL("./zip-module.wasm",import.meta.url).href});const Hc="Entry filename already exists",Gc="Duplicate entry filename in the imported zip file",Kc='Invalid duplicates option (must be "throw", "keep-first" or "keep-last")',Yc="Entry is an ancestor of target entry",qc="Root directory cannot be moved",Xc="Target entry is not a directory",Jc="Parent entry is not a directory",Qc="Readable stream already consumed",$c="throw",tu="keep-first",eu="keep-last",ru=new Set([$c,tu,eu]),nu="Invalid passThrough option (use readerOptions.passThrough or set uncompressedSize for each entry)",ou="Invalid readerOptions (must be an object)",iu="The 'compressed' passThrough option is only supported by Entry#getData() and ZipWriter#add()",au="zipjs-abort-export";class su{constructor(t,e,r,n){const o=this;if(t.root&&n&&n.getChildByName(e))throw new Error(Hc);r||(r={}),Object.assign(o,{fs:t,name:e,data:r.data,options:r.options&&Object.assign({},r.options),id:t.Or++,parent:n,children:[],uncompressedSize:r.uncompressedSize||0,Tr:r.Tr||r.uncompressedSize===T,passThrough:r.passThrough,Ir:r.Ir||new Date}),!n&&t.root||(t.entries[o.id]=o),n&&o.parent.children.push(o)}getFullname(){return this.getRelativeName()}getRelativeName(t=this.fs.root){let e=this.name,r=this.parent;for(;r&&r!=t;)e=(r.name?r.name+"/":"")+e,r=r.parent;return e}isDescendantOf(t){let e=this.parent;for(;e&&e.id!=t.id;)e=e.parent;return Boolean(e)}rename(t){const e=this;let r=e.parent;if(r){const n=Mu(t);n&&(t=n.pop(),r=Nu(r,n,e));const o=r.getChildByName(t);if(o&&o!=e)throw new Error(Hc);r!=e.parent&&(Eu(e),e.parent=r,r.children.push(e),Cu(e.fs,e))}e.name=t}setOptions(t){const e=Object.assign({},this.options,t);this.options=Object.fromEntries(Object.entries(e).filter(([,t])=>t!==T))}}class cu extends su{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 cu(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===T||(t.constructor==Pn?e.type==r:t.constructor!=Nn||e.startsWith("data:"+(r||"")+";base64,"))}(t,r.data))return r.data;{const n=r.reader=yu(r.Reader,r.data,e),o=r.uncompressedSize||n.size;await Promise.all([yo(n),yo(t,o)]);const i=dt(e.signal),a=function(t,e,r,n){const{onstart:o,onprogress:i,onend:a}=r,{readable:s}=e;return t.data instanceof ri||!o&&!i&&!a?s:Ye(s).pipeThrough(new Lr({onstart:o,onprogress:i,onend:a,size:e.size}),{signal:n})}(r,n,e,i),s=!mo(t)&&Boolean(e.preventClose);return r.uncompressedSize=n.size,await Ye(a).pipeTo(Xe(t.writable),{signal:i,preventClose:s,preventAbort:s}),t.getData?t.getData():t.writable}}isPasswordProtected(){return Boolean(this.data&&this.data.encrypted)}async checkPassword(t,e={}){const r=this;if(!r.isPasswordProtected())return!0;try{return await r.data.getData(null,Object.assign({},e,{password:t,checkPasswordOnly:!0})),!0}catch(t){if(Zt(t)&&t.message==se)return!1;throw t}}getText(t,e){return this.getData(new Zn(t),e)}getBlob(t,e){return this.getData(new Pn(t),e)}getData64URI(t,e){return this.getData(new Nn(t),e)}getUint8Array(t){return this.getData(new lo,t)}getWritable(t=new WritableStream,e){return this.getData({writable:t},e)}async getArrayBuffer(t){return Lt(await this.getUint8Array(t)).buffer}replaceBlob(t){xu(this,{data:t,Reader:Bn,Writer:Pn,uncompressedSize:t.size})}replaceText(t){xu(this,{data:t,Reader:Ln,Writer:Zn,uncompressedSize:Wn(t)})}replaceData64URI(t){xu(this,{data:t,Reader:Mn,Writer:Nn,uncompressedSize:Du(t)})}replaceUint8Array(t){xu(this,{data:t,Reader:uo,Writer:lo,uncompressedSize:t.length})}replaceReadable(t){xu(this,{data:null,Reader:hu(t),Writer:null,uncompressedSize:T})}}class uu extends su{constructor(t,e,r,n){super(t,e,r,n),this.directory=!0}clone(t){const e=this,r=new uu(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 vu(this,t,{options:e},!0)}addText(t,e,r={}){return vu(this,t,{data:e,Reader:Ln,Writer:Zn,options:r,uncompressedSize:Wn(e)})}addBlob(t,e,r={}){return vu(this,t,{data:e,Reader:Bn,Writer:Pn,options:r,uncompressedSize:e.size})}addData64URI(t,e,r={}){return vu(this,t,{data:e,Reader:Mn,Writer:Nn,options:r,uncompressedSize:Du(e)})}addUint8Array(t,e,r={}){return vu(this,t,{data:e,Reader:uo,Writer:lo,options:r,uncompressedSize:e.length})}addHttpContent(t,e,r={}){return vu(this,t,{data:e,Reader:class extends so{constructor(t){super(t,r)}},options:r})}addReadable(t,e,r={}){return vu(this,t,{Reader:hu(e),options:r})}addFileSystemEntry(t,e={}){return Tu(this,t,e)}addFileSystemHandle(t,e={}){return Tu(this,t,e)}addFile(t,e={}){return(e=Object.assign({},e)).lastModDate||(e.lastModDate=new Date(t.lastModified)),vu(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 Bn(t),e)}importData64URI(t,e){return this.importZip(new Mn(t),e)}importUint8Array(t,e){return this.importZip(new uo(t),e)}importHttpContent(t,e){return this.importZip(new so(t,e),e)}importReadable(t,e){return this.importZip({readable:t},e)}exportBlob(t={}){return this.exportZip(new Pn(t.mimeType||"application/zip"),t)}exportData64URI(t={}){return this.exportZip(new Nn(t.mimeType||"application/zip"),t)}exportUint8Array(t={}){return this.exportZip(new lo,t)}async exportWritable(t=new WritableStream,e={}){return await this.exportZip({writable:t},e),t}exportFileSystemHandle(t,e={}){return async function(t,e,r){const{onstart:n,onprogress:o,onend:i}=r;zu(r.passThrough);const a=Ru(r.readerOptions),s=new AbortController,{signal:c}=s,u=function(t,e){if(!dt(t))return()=>{};if(t.aborted)return e.abort(t.reason),()=>{};const r=()=>e.abort(t.reason);return t.addEventListener("abort",r,{once:!0}),()=>t.removeEventListener("abort",r)}(r.signal,s),l=Object.assign({},r,a,{signal:c,onstart:T,onprogress:T,onend:T,preventClose:!1}),f=du([t],t=>pu(t,l.passThrough)),d=[];let w=!1,p=0;try{n&&await Wr(n,f),await m(t,e),i&&await Wr(i,p)}catch(t){try{t.exportedEntryNames=d}catch{}throw t}finally{u()}return e;function h(t){const e=t.getWriter();return new WritableStream({async write(t){await e.write(t),p+=t.length,o&&await Wr(o,p,f)},close:()=>e.close(),abort:t=>e.abort(t)})}async function m(t,e){if(r.concurrent){const r=(await Promise.allSettled(t.children.map(t=>y(t,e)))).filter(t=>"rejected"==t.status);if(r.length){const t=r.filter(t=>!Su(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||Su(c.reason))return;wt(c)}try{if(e.directory){const t=await r.getDirectoryHandle(e.name,{create:!0});await m(e,t)}else{const n=await r.getFileHandle(e.name,{create:!0}),o=await n.createWritable();try{await e.getData({writable:h(o)},l)}catch(t){throw w?new Error(au):t}d.push(e.getRelativeName(t))}}catch(r){w=!0,s.abort(new Error(au));try{r.entryName===T&&(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 yo(t),r=new Gi(t,e)),zu(e.passThrough);const n=function(t){if(t===T)return $c;if(ru.has(t))return t;throw new Error(Kc)}(e.duplicates),o=[],i=await r.getEntries(e);for(const t of i){let r=this;try{const i=t.filename.split("/").filter(t=>""!=t&&"."!=t),a=i.pop();let s=!1;for(const t of i){const e=r;if(r=r.getChildByName(t),r){if(!r.directory){if(n==tu){s=!0;break}if(n!=eu)throw new Error(Gc);this.fs.remove(r),r=new uu(this.fs,t,{data:null},e),o.push(r)}}else r=new uu(this.fs,t,{data:null},e),o.push(r)}if(s)continue;if(t.directory){let e=r;if(a){if(e=r.getChildByName(a),e&&!e.directory){if(n==tu)continue;if(n!=eu)throw new Error(Gc);this.fs.remove(e),e=T}e||(e=new uu(this.fs,a,{data:null},r),o.push(e))}e==this||e.data||(e.data=t)}else{const i=r.getChildByName(a);if(i){if(n==tu)continue;if(n!=eu)throw new Error(Gc);this.fs.remove(i)}o.push(vu(r,a,{data:t,Reader:mu(Object.assign({},e)),uncompressedSize:e.passThrough?t.compressedSize:t.uncompressedSize,passThrough:e.passThrough}))}}catch(e){o.reverse().forEach(t=>this.fs.remove(t));try{e.cause={entry:t}}catch{}throw e}}return o}async exportZip(t,e={}){const r=this,n=Boolean(t)&&typeof t.add==k;e=Object.assign({},e),n||e.bufferedWrite!==T||(e.bufferedWrite=!0);const[o]=await Promise.all([bu(r,Ru(e.readerOptions)),n?T:yo(t)]),i=n?t:new As(t,e);return await async function(t,e,r,n,o){const{onstart:i,onprogress:a,onend:s,onentryprogress:c}=n,u=e,l=du(e.children,t=>Ou(t)?0:1);let f=0,d=0;if(i&&await Wr(i,r),n.bufferedWrite)await async function t(e){const r=(await Promise.allSettled(e.children.map(async e=>{await w(e),await t(e)}))).find(t=>"rejected"==t.status);if(r)throw r.reason}(e);else for(const t of e.getChildren({recursive:!0}))await w(t);async function w(e){if(Ou(e))return;const{name:i,xe:s}=gu(e,u,n);let w=0;const p=await t.add(i,o.get(e),Object.assign(s,{onstart:T,onend:T,onprogress:async t=>{f+=t-w,w=t,a&&await Wr(a,f,r)}}));d++,c&&await Wr(c,d,l,p)}s&&await Wr(s,f)}(i,r,du([r],wu),e,o),n?i:(await i.close(e.globalComment),t.getData?t.getData():t.writable)}async getExportedSize(r={}){const n=this;Ru((r=Object.assign({},r)).readerOptions),r.bufferedWrite===T&&(r.bufferedWrite=!0);const o=n.getChildren({recursive:!0}),i=o.filter(t=>!Ou(t)).map(t=>{const{name:e,xe:o}=gu(t,n,r);return{name:e,size:t.directory?0:Au(t,Fu(t,r)),options:o}}),a=!r.bufferedWrite||i.every(t=>!1!==t.options.keepOrder)&&o.every(t=>Ou(t)||!t.children.length);return await async function(r,n,o,i){const a={options:r};if(ft(r[Q]))throw new Error($a);if(i!==T&&!(i instanceof Uint8Array))throw new Error(Ua);const s=wc(i);if(s>e)throw new Error(Ia);const c=r[X],u=new Map,l=r[q]===T?0:r[q];let f=l,w=I;const p=[],h=new Set;for(const e of n){let{name:r}=e;const{size:n}=e,o=Object.assign({},e.options);rc(a,o,Go)&&!r.endsWith(x)&&(r+=x);const i=Is(a,r,o);({name:r}=i);const{Fe:s}=Us(a,r,o);0==s.level||s.compressionMethod!==T||s.Te||await jr(Ut())||(s.level=0);const l=!rc(a,o,Go);if(l&&n===T)throw new Error($a);const{wr:d,Fe:m}=Cs(a,l,n,s,o);if(l&&!s.Te&&sc(m.compressionMethod,m.level))throw new Error($a);const y=Object.assign({},o,i.Fe,s,m,{[X]:c}),b=Ms(y),E=js(y),S={Me:b,Be:wc(b.ke,E.Ce)};c&&Ns(S,f);const g=l?d:0;u.set(r,Object.assign({},y,b,{offset:f,diskNumberStart:0,compressedSize:g}));const A=S.Be+g;p.push(A),h.add(Boolean(y.ye||y.uncompressedSize>=t||g>=t)),w=Math.min(w,A),f+=A}if(u.size>1&&(c||f-w>=t&&(h.size>1||vs(p,l,!0)!=vs(p,l,!1)))&&!o)throw new Error($a);const{qe:m,Xe:y}=Bs(u);let b=rc(a,r,Lo);if(f>=t||m>=t||u.size>=e){if(!1===b)throw new Error(qa);b=!0}else b===T&&y&&(b=!0);return f-l+m+s+(b?98:d)}(r,i,a,r.globalComment)}getChildByName(t){const e=this.children;for(let r=0;r<e.length;r++){const n=e[r];if(n.name==t)return n}}getChildren(t={}){return function(t,e){const r=[],n=[t];let o=0;for(;o<n.length;)for(const t of n[o++].children)r.push(t),e&&n.push(t);return r}(this,t.recursive)}isPasswordProtected(){const t=this.children;for(let e=0;e<t.length;e++)if(t[e].isPasswordProtected())return!0;return!1}async checkPassword(t,e={}){const r=this.children;return!(await Promise.all(r.map(r=>r.checkPassword(t,e)))).includes(!1)}}class lu{constructor(){Uu(this)}get children(){return this.root.children}remove(t){Eu(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=T}move(t,e){if(t==this.root)throw new Error(qc);if(!e.directory)throw new Error(Xc);if(e.isDescendantOf(t))throw new Error(Yc);if(t!=e){const r=e.getChildByName(t.name);if(r){if(r!=t)throw new Error(Hc)}else Eu(t),t.parent=e,e.children.push(t),Cu(this,t)}}find(t){const e=t.split("/");let r=this.root;for(let t=0;r&&t<e.length;t++)r=r.directory?r.getChildByName(e[t]):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 ku(this,r=>r.importBlob(t,e))}importData64URI(t,e){return ku(this,r=>r.importData64URI(t,e))}importUint8Array(t,e){return ku(this,r=>r.importUint8Array(t,e))}importHttpContent(t,e){return ku(this,r=>r.importHttpContent(t,e))}importReadable(t,e){return ku(this,r=>r.importReadable(t,e))}importZip(t,e){return ku(this,r=>r.importZip(t,e))}exportBlob(t){return this.root.exportBlob(t)}exportData64URI(t){return this.root.exportData64URI(t)}exportUint8Array(t){return this.root.exportUint8Array(t)}exportWritable(t,e){return this.root.exportWritable(t,e)}exportFileSystemHandle(t,e){return this.root.exportFileSystemHandle(t,e)}exportZip(t,e){return this.root.exportZip(t,e)}getExportedSize(t){return this.root.getExportedSize(t)}isPasswordProtected(){return this.root.isPasswordProtected()}checkPassword(t,e){return this.root.checkPassword(t,e)}}const fu={FS:lu,ZipDirectoryEntry:uu,ZipFileEntry:cu};function du(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 wu(t){return t.uncompressedSize}function pu(t,e){const{data:r}=t;return e&&r instanceof ri?r.compressedSize:t.uncompressedSize}function hu(t){let e;return function(){if(e)throw new Error(Qc);return e=!0,{readable:t}}}function mu(t){return class extends Cn{constructor(t,e={}){super(),this.entry=t,this.options=e}async init(){const e=this,r=Object.assign({},t,e.options),{checkOverlappingEntry:n,checkOverlappingEntryOnly:o}=r,i=await e.entry.getData(new Pn,Object.assign(r,{checkPasswordOnly:!1,checkOverlappingEntry:o||n,checkOverlappingEntryOnly:!1,preventClose:!1}));e.data=i,e.Ur=new Bn(i),e.size=i.size,super.init()}readUint8Array(t,e){return this.Ur.readUint8Array(t,e)}}}function yu(t,e,r){return t.prototype?new t(e,r):t(e,r)}async function bu(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=yu(t.Reader,t.data,e);o.set(t,r);try{await yo(r)}catch(e){try{e.entryId=t.id,e.cause={entry:t}}catch{}throw e}r.size!==T&&(t.uncompressedSize=r.size,t.Tr=!1)})),o}function Eu(t){if(t.parent){const e=t.parent.children;e.forEach((r,n)=>{r.id==t.id&&e.splice(n,1)})}}function Su(t){return Boolean(t)&&t.message==au}function gu(t,e,r){const n=r.relativePath?t.getRelativeName(e):t.getFullname(),o=t.options||{};let i={},a={};if(t.data instanceof ri){const e=Fu(t,r),n=o.lastModDate===T?r.lastModDate:o.lastModDate;({xe:i,De:a}=Ts(t.data,e,n)),e&&(a.passThrough=!0)}const s=Object.assign({lastModDate:t.Ir},i,r,o,a,{directory:t.directory});if(!t.directory&&s.passThrough&&s.uncompressedSize===T)throw new Error(nu);return{name:n,xe:s}}function Au(t,e){const{reader:r}=t;return r&&r.size!==T?r.size:t.Tr?T:pu(t,e)}function Ru(t){if(t&&(typeof t!=C||Array.isArray(t)))throw new Error(ou);return t&&zu(t.passThrough),t}function zu(t){if(ht(t)===it)throw new Error(iu)}function xu(t,e){const{uncompressedSize:r}=e;Object.assign(t,e,{reader:null,passThrough:T,uncompressedSize:r===T?0:r,Tr:r===T})}function Du(t){let e=t.length;for(;"="==t.charAt(e-1);)e--;const r=t.indexOf(",")+1;return Math.floor(.75*(e-r))}function Fu(t,e){const{readerOptions:r}=e;return Boolean(!t.directory&&(t.passThrough||r&&r.passThrough))}function Ou(t){return t.directory&&null===t.data}function Tu(t,e,r){return async function t(e,n,o,i=""){if(n){const a=i?i+"/"+n.name:n.name;try{if((n.isFile||n.isDirectory)&&(n=await Iu(n)),"file"==n.kind){const t=await n.getFile();o.push(vu(e,t.name,{Reader:function(){return{readable:t.stream(),size:t.size}},options:Object.assign({},{lastModDate:new Date(t.lastModified)},r),uncompressedSize:t.size}))}else if("directory"==n.kind){const i=e.addDirectory(n.name,r);o.push(i);for await(const e of n.values())await t(i,e,o,a)}}catch(t){try{t.entryName===T&&(t.entryName=a)}catch{}throw t}}return o}(t,e,[])}async function Iu(t){const e={name:t.name};if(t.isFile&&(e.kind="file",e.getFile=()=>new Promise((e,r)=>t.file(e,r))),t.isDirectory){e.kind="directory";const r=await async function(t){const e=[];function r(t,n,o){t.readEntries(async i=>{if(i.length){for(const t of i)e.push(await Iu(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 Uu(t){t.entries=[],t.Or=0,t.root=new uu(t)}function ku(t,e){const{entries:r,Or:n,root:o}=t;return Uu(t),e(t.root).catch(e=>{throw Object.assign(t,{entries:r,Or:n,root:o}),e})}function Cu(t,e){const r=[e];for(;r.length;){const e=r.pop();t.entries[e.id]=e;for(const t of e.children)r.push(t)}}function vu(t,e,r,n){if(t.directory){const o=Mu(e);return o&&(e=o.pop(),t=Nu(t,o)),n?new uu(t.fs,e,r,t):new cu(t.fs,e,r,t)}throw new Error(Jc)}function Mu(t){if(t.includes("/")){const e=t.split("/").filter(t=>""!=t&&"."!=t);if(e.length)return e}}function Nu(t,e,r){return e.forEach(e=>{const n=t;if(t=t.getChildByName(e)){if(!t.directory)throw new Error(Hc);if(r&&(t==r||t.isDescendantOf(r)))throw new Error(Yc)}else t=new uu(n.fs,e,{data:null},n)}),t}export{Bn as BlobReader,Pn as BlobWriter,Mn as Data64URIReader,Nn as Data64URIWriter,lt as ERR_ABORTED,mi as ERR_AMBIGUOUS_ARCHIVE,Yc as ERR_ANCESTOR_ENTRY,ii as ERR_BAD_FORMAT,ci as ERR_CENTRAL_DIRECTORY_NOT_FOUND,Ta as ERR_DUPLICATED_NAME,Gc as ERR_DUPLICATE_IMPORTED_ENTRY,fi as ERR_ENCRYPTED,yi as ERR_ENCRYPTED_CENTRAL_DIRECTORY,hi as ERR_ENTRY_DATA_OUT_OF_BOUNDS,Hc as ERR_ENTRY_EXISTS,si as ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND,ai as ERR_EOCDR_NOT_FOUND,li as ERR_EXTRAFIELD_ZIP64_NOT_FOUND,Sn as ERR_HTTP_RANGE,gn as ERR_HTTP_RESOURCE_CHANGED,En as ERR_HTTP_STATUS,ce as ERR_INVALID_AUTHENTICATION_CODE,St as ERR_INVALID_BASE_URI,Je as ERR_INVALID_CODEC_DEFINITION,$e as ERR_INVALID_CODEC_MODULE,Ia as ERR_INVALID_COMMENT,Ua as ERR_INVALID_COMMENT_TYPE,fr as ERR_INVALID_COMPRESSED_DATA,dr as ERR_INVALID_CRC32,va as ERR_INVALID_DATE,Kc as ERR_INVALID_DUPLICATES,_a as ERR_INVALID_ENCRYPTION_STRENGTH,ds as ERR_INVALID_ENTRY,ka as ERR_INVALID_ENTRY_COMMENT,Ca as ERR_INVALID_ENTRY_COMMENT_TYPE,Ma as ERR_INVALID_ENTRY_NAME,La as ERR_INVALID_EXTRAFIELD,Va as ERR_INVALID_EXTRAFIELD_DATA,Za as ERR_INVALID_EXTRAFIELD_DATA_TYPE,Wa as ERR_INVALID_EXTRAFIELD_TYPE,Si as ERR_INVALID_FILENAME_VALIDATION,at as ERR_INVALID_FUNCTION_OPTION,os as ERR_INVALID_GID,ls as ERR_INVALID_LEVEL,gi as ERR_INVALID_MAX_APPENDED_DATA_SIZE,Et as ERR_INVALID_MAX_WORKERS,cs as ERR_INVALID_MSDOS_ATTRIBUTES,us as ERR_INVALID_MSDOS_DATA,se as ERR_INVALID_PASSWORD,ct as ERR_INVALID_PASSWORD_TYPE,nu as ERR_INVALID_PASS_THROUGH,ut as ERR_INVALID_PASS_THROUGH_VALUE,es as ERR_INVALID_READER,ou as ERR_INVALID_READER_OPTIONS,st as ERR_INVALID_SIGNAL,fs as ERR_INVALID_SIGNATURE_DATA,Ei as ERR_INVALID_STRICTNESS,ns as ERR_INVALID_UID,lr as ERR_INVALID_UNCOMPRESSED_SIZE,as as ERR_INVALID_UNIX_EXTRA_FIELD_TYPE,ss as ERR_INVALID_UNIX_ID_SIZE,is as ERR_INVALID_UNIX_MODE,gt as ERR_INVALID_URI,Na as ERR_INVALID_VERSION,An as ERR_ITERATOR_COMPLETED_TOO_SOON,ui as ERR_LOCAL_FILE_HEADER_NOT_FOUND,pi as ERR_OVERLAPPING_ENTRY,Jc as ERR_PARENT_NOT_DIRECTORY,Qc as ERR_READABLE_CONSUMED,Qe as ERR_RESERVED_COMPRESSION_METHOD,qc as ERR_ROOT_DIRECTORY_NOT_MOVABLE,wi as ERR_SPLIT_ZIP_FILE,Xc as ERR_TARGET_NOT_DIRECTORY,Ja as ERR_UNDEFINED_COMPRESSION_METHOD,Qa as ERR_UNDEFINED_CRC32,ts as ERR_UNDEFINED_READER,Xa as ERR_UNDEFINED_UNCOMPRESSED_SIZE,$a as ERR_UNDETERMINED_SIZE,bi as ERR_UNSAFE_FILENAME,tr as ERR_UNSUPPORTED_COMPRESSION,Oc as ERR_UNSUPPORTED_CONTEXT,le as ERR_UNSUPPORTED_CRYPTO_API,di as ERR_UNSUPPORTED_ENCRYPTION,Pa as ERR_UNSUPPORTED_ENCRYPTION_PASS_THROUGH,ja as ERR_UNSUPPORTED_ENCRYPTION_USDZ,qa as ERR_UNSUPPORTED_FORMAT,iu as ERR_UNSUPPORTED_PASS_THROUGH_VALUE,Ba as ERR_UNSUPPORTED_SPLIT_USDZ,Ai as ERR_UNSUPPORTED_UINT64,Cr as ERR_WORKER_STARTUP_TIMEOUT,Rn as ERR_WRITER_NOT_INITIALIZED,zn as ERR_WRITER_SIZE_NOT_WRITABLE,ws as ERR_ZIP_CRYPTO_LAST_MOD_DATE,rs as ERR_ZIP_NOT_EMPTY,co as HttpRangeReader,so as HttpReader,Cn as Reader,fo as SplitDataReader,wo as SplitDataWriter,Ln as TextReader,Zn as TextWriter,uo as Uint8ArrayReader,lo as Uint8ArrayWriter,Sc as VERSION,Ti as WARNING_APPENDED_DATA,hs as WARNING_CLAMPED_LAST_MODIFICATION_DATE,xi as WARNING_COMPRESSED_PATCHED_DATA,ps as WARNING_COMPRESSION_UNAVAILABLE,Ci as WARNING_DUPLICATE_FILENAME,Di as WARNING_MALFORMED_EXTRA_FIELD,_i as WARNING_MISMATCHED_LOCAL_FILE_HEADER_BIT_FLAG,ji as WARNING_MISMATCHED_LOCAL_FILE_HEADER_COMPRESSION_METHOD,Bi as WARNING_MISMATCHED_LOCAL_FILE_HEADER_CRC32_OR_SIZES,Ni as WARNING_MISMATCHED_LOCAL_FILE_HEADER_FILENAME,vi as WARNING_MISMATCHED_ZIP64_END_OF_CENTRAL_DIRECTORY,Mi as WARNING_MULTIPLE_END_OF_CENTRAL_DIRECTORY,Ui as WARNING_PREPENDED_CENTRAL_DIRECTORY,Ii as WARNING_PREPENDED_DATA,ki as WARNING_TRAILING_CENTRAL_DIRECTORY_DATA,zi as WARNING_UNKNOWN_VERSION,Fi as WARNING_UNKNOWN_ZIP64_EXTENSIBLE_DATA,Ri as WARNING_UNSORTED_CENTRAL_DIRECTORY,Oi as WARNING_WRAPPED_ENTRIES_COUNT,vn as Writer,uu as ZipDirectoryEntry,su as ZipEntry,lu as ZipFS,cu as ZipFileEntry,Gi as ZipReader,Ki as ZipReaderStream,As as ZipWriter,Rs as ZipWriterStream,vt as configure,xc as createBlobTempStream,Rc as createOPFSTempStream,Tc as createSyncAccessHandleTempStream,fu as fs,yc as getMimeType,sr as getRegisteredCodecs,bc as getSupportedCompressionMethods,Yi as isZipFile,or as registerCodec,Bt as resetConfiguration,Vc as terminateWorkers,ir as unregisterCodec};
|
|
1
|
+
const t=4294967295,e=65535,r=255,n=67324752,o=134695760,i=o,a=84233040,s=33639248,c=101010256,u=101075792,l=117853008,f=46,d=22,w=20,p=56,h=39169,m=21589,y=6534,b=30837,E=30805,S=2048,g=61440,A=16384,R=2048,z=1024,x="/",D=30,F=new Date(2107,11,31,23,59,58),O=new Date(1980,0,1),T=void 0,I=1/0,U="undefined",k="function",C="object",v="string",M="boolean",N=new Uint8Array,_=Symbol.asyncDispose||Symbol(),j="password",B="rawPassword",P="passThrough",L="signal",W="useWebWorkers",Z="useCompressionStream",V="transferStreams",H="preventClose",G="level",K="useUnicodeFileNames",Y="dataDescriptor",q="offset",X="usdz",J="maxAppendedDataSize",Q="signCentralDirectory",$="entry",tt="filename",et="comment",rt="strict",nt="balanced",ot="tolerant",it="compressed",at="Invalid option (must be a function)",st="Invalid signal (must be an AbortSignal instance)",ct="Invalid password (password must be a string, rawPassword must be a Uint8Array)",ut="Invalid passThrough option (must be a boolean or 'compressed')",lt="The operation was aborted";function ft(t){if(t&&typeof t!=k)throw new Error(at);return t}function dt(t){if(t&&(typeof t.addEventListener!=k||typeof t.aborted!=M))throw new Error(st);return t||T}function wt(t){if(t&&t.aborted)throw t.reason===T?new DOMException(lt,"AbortError"):t.reason}function pt(t,e){if(t&&typeof t!=v||e&&!(e instanceof Uint8Array))throw new Error(ct)}function ht(t){if(t!==T&&typeof t!=M&&t!==it)throw new Error(ut);return t}function mt(t,e,r){if(!Number.isInteger(t)||t<0||t>e)throw new Error(r)}function yt(t,e,r){t!==T&&mt(t,e,r)}function bt(t){return typeof t==v&&t.trim()?Number(t):t}const Et="Invalid maxWorkers (must be an integer greater than 0)",St="Invalid baseURI (must be a string)",gt="Invalid URI (must be a string or a function returning a string)";let At=2;try{typeof navigator!=U&&navigator.hardwareConcurrency&&(At=navigator.hardwareConcurrency)}catch{}const Rt={workerURI:"./core/web-worker-wasm.js",wasmURI:"./core/streams/zlib-wasm/zlib-streams.wasm",chunkSize:65536,maxWorkers:At,terminateWorkerTimeout:5e3,workerStarvationTimeout:5e3,workerStartupTimeout:5e3,useWebWorkers:!0,useCompressionStream:!0,transferStreams:!0,CompressionStream:typeof CompressionStream!=U&&CompressionStream,DecompressionStream:typeof DecompressionStream!=U&&DecompressionStream},zt="maxWorkers",xt="baseURI",Dt=["wasmURI","workerURI"],Ft=["chunkSize",zt,"terminateWorkerTimeout","workerStarvationTimeout","workerStartupTimeout"],Ot=["createWorker","CompressionStream","DecompressionStream","CompressionStreamFallback","DecompressionStreamFallback"],Tt=[xt,...Dt,"useCompressionStream","useWebWorkers","transferStreams",...Ft,...Ot],It={...Rt};function Ut(){return It}function kt(t){return Ct(t.chunkSize)}function Ct(t){return t=bt(t),Number.isInteger(t)&&t>=1?Math.max(t,64):65536}function vt(t){Object.assign(It,Mt(_t(t)))}function Mt(t){const e={};for(const r of Tt){const n=t[r];n!==T&&(e[r]=Nt(r,n))}return e}function Nt(t,e){if(Ft.includes(t)){if(e=bt(e),t==zt&&(!Number.isInteger(e)||e<1))throw new Error(Et)}else if(Ot.includes(t))ft(e);else if(t==xt){if(e&&typeof e!=v)throw new Error(St)}else if(Dt.includes(t)&&e&&typeof e!=v&&typeof e!=k)throw new Error(gt);return e}function _t(t){t=t||{};const{CompressionStreamZlib:e,DecompressionStreamZlib:r}=t;if(e===T&&r===T)return t;const n=Object.assign({},t);return n.CompressionStreamFallback===T&&(n.CompressionStreamFallback=e),n.DecompressionStreamFallback===T&&(n.DecompressionStreamFallback=r),n}function jt(t){const e=Mt(_t(t));Object.assign(Rt,e),Object.assign(It,e)}function Bt(){for(const t of Tt)delete It[t];Object.assign(It,Rt)}function Pt(t,e){const r=new Uint8Array(t.length+e.length);return r.set(t),r.set(e,t.length),r}function Lt(t){return t.byteOffset||t.byteLength!=t.buffer.byteLength?new Uint8Array(t):t}function Wt(t){return new DataView(t.buffer,t.byteOffset,t.byteLength)}function Zt(t){return Boolean(t)&&"object"==typeof t}const Vt=[[],[],[],[],[],[],[],[]];for(let t=0;t<256;t++){let e=t;for(let t=0;t<8;t++)e=1&e?e>>>1^3988292384:e>>>1;Vt[0][t]=e}for(let t=0;t<256;t++)for(let e=1;e<8;e++){const r=Vt[e-1][t];Vt[e][t]=r>>>8^Vt[0][255&r]}const[Ht,Gt,Kt,Yt,qt,Xt,Jt,Qt]=Vt;class $t{constructor(t){this.o=t||-1}append(t){let e=0|this.o;const r=0|t.length;let n=0;if(r>=8&&t.buffer){const o=new DataView(t.buffer,t.byteOffset,r),i=r-8;for(;n<=i;n+=8){const t=e^o.getInt32(n,!0),r=o.getInt32(n+4,!0);e=Qt[255&t]^Jt[t>>>8&255]^Xt[t>>>16&255]^qt[t>>>24&255]^Yt[255&r]^Kt[r>>>8&255]^Gt[r>>>16&255]^Ht[r>>>24&255]}}for(;n<r;n++)e=e>>>8^Ht[255&(e^t[n])];this.o=e}get(){return~this.o}}class te extends TransformStream{constructor(){let t;const e=new $t;super({transform(t,r){e.append(t),r.enqueue(t)},flush(){const r=new Uint8Array(4);new DataView(r.buffer).setUint32(0,e.get()),t.value=r}}),t=this}}function ee(t){if(typeof TextEncoder==U){t=unescape(encodeURIComponent(t));const e=new Uint8Array(t.length);for(let r=0;r<e.length;r++)e[r]=t.charCodeAt(r);return e}return(new TextEncoder).encode(t)}const re={concat(t,e){if(0===t.length||0===e.length)return t.concat(e);const r=t[t.length-1],n=re.l(r);return 32===n?t.concat(e):re.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)+re.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]=re.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,i=re.l(o);return n.push(re.S(e+i&31,e+i>32?r:n.pop(),1)),n}},ne={bytes:{A(t){const e=re.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(re.S(8*(3&r),n)),e}}},oe=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.T=t.T.slice(0),e.I=t.I):e.reset()}reset(){const t=this;return t.O=t.D.slice(0),t.T=[],t.I=0,t}update(t){const e=this;"string"==typeof t&&(t=ne.U.R(t));const r=e.T=re.concat(e.T,t),n=e.I,o=e.I=n+re.bitLength(t);if(o>9007199254740991)throw new Error("Cannot hash more than 2^53 - 1 bits");const i=new Uint32Array(r);let a=0;for(let t=e.blockSize+n-(e.blockSize+n&e.blockSize-1);t<=o;t+=e.blockSize)e.C(i.subarray(16*a,16*(a+1))),a+=1;return r.splice(0,16*a),e}v(){const t=this;let e=t.T;const r=t.O;e=re.concat(e,[re.S(1,1)]);for(let t=e.length+2;15&t;t++)e.push(0);for(e.push(Math.floor(t.I/4294967296)),e.push(0|t.I);e.length;)t.C(e.splice(0,16));return t.reset(),r}M(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],i=r[1],a=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.M(t,i,a,s)+c+n[t]+e.F[Math.floor(t/20)]|0;c=s,s=a,a=e.N(30,i),i=o,o=r}r[0]=r[0]+o|0,r[1]=r[1]+i|0,r[2]=r[2]+a|0,r[3]=r[3]+s|0,r[4]=r[4]+c|0}},ie={importKey:t=>new ie._(ne.bytes.R(t)),j(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 i,a,s,c,u;const l=new ArrayBuffer(o),f=new DataView(l);let d=0;const w=re;for(e=ne.bytes.R(e),u=1;d<(o||1);u++){for(i=a=t.encrypt(w.concat(e,[u])),s=1;s<r;s++)for(a=t.encrypt(a),c=0;c<a.length;c++)i[c]^=a[c];for(s=0;d<(o||1)&&s<i.length;s++)f.setInt32(d,i[s]),d+=4}return l.slice(0,n/8)},_:class{constructor(t){const e=this,r=e.B=oe,n=[[],[]];e.P=[new r,new r];const o=e.P[0].blockSize/32;t.length>o&&(t=(new r).update(t).v());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.L=new r(e.P[0])}reset(){const t=this;t.L=new t.B(t.P[0]),t.W=!1}update(t){this.W=!0,this.L.update(t)}digest(){const t=this,e=t.L.v(),r=new t.B(t.P[1]).update(e).v();return t.reset(),r}encrypt(t){if(this.W)throw new Error("encrypt on already updated hmac called!");return this.update(t),this.digest(t)}}},ae=typeof crypto!=U&&typeof crypto.getRandomValues==k,se="Invalid password",ce="Invalid authentication code",ue="zipjs-abort-check-password",le="Crypto API not supported";function fe(t){if(ae)return crypto.getRandomValues(t);throw new Error(le)}const de=16,we={name:"PBKDF2"},pe=Object.assign({hash:{name:"HMAC"}},we),he=Object.assign({iterations:1e3,hash:{name:"SHA-1"}},we),me=["deriveBits"],ye=[8,12,16],be=[16,24,32],Ee=10,Se=[0,0,0,0],ge=typeof crypto!=U,Ae=ge&&crypto.subtle,Re=ge&&typeof Ae!=U,ze=ne.bytes,xe=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 i,a,s,c=1;if(4!==o&&6!==o&&8!==o)throw new Error("invalid aes key size");for(e.F=[a=t.slice(0),s=[]],i=o;i<4*o+28;i++){let t=a[i-1];(i%o===0||8===o&&i%o===4)&&(t=r[t>>>24]<<24^r[t>>16&255]<<16^r[t>>8&255]<<8^r[255&t],i%o===0&&(t=t<<8^t>>>24^c<<24,c=c<<1^283*(c>>7))),a[i]=a[i-o]^t}for(let t=0;i;t++,i--){const e=a[3&t?i:i-4];s[t]=i<=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=[],i=[];let a,s,c,u;for(let t=0;t<256;t++)i[(o[t]=t<<1^283*(t>>7))^t]=t;for(let l=a=0;!r[l];l^=s||1,a=i[a]||1){let i=a^a<<1^a<<2^a<<3^a<<4;i=i>>8^255&i^99,r[l]=i,n[i]=l,u=o[c=o[s=o[l]]];let f=16843009*u^65537*c^257*s^16843008*l,d=257*o[i]^16843008*i;for(let r=0;r<4;r++)t[r][l]=d=d<<24^d>>>8,e[r][i]=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],i=this.Z[e],a=i[0],s=i[1],c=i[2],u=i[3],l=i[4];let f,d,w,p=t[0]^r[0],h=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=a[p>>>24]^s[h>>16&255]^c[m>>8&255]^u[255&y]^r[b],d=a[h>>>24]^s[m>>16&255]^c[y>>8&255]^u[255&p]^r[b+1],w=a[m>>>24]^s[y>>16&255]^c[p>>8&255]^u[255&h]^r[b+2],y=a[y>>>24]^s[p>>16&255]^c[h>>8&255]^u[255&m]^r[b+3],b+=4,p=f,h=d,m=w;for(let t=0;t<4;t++)o[e?3&-t:t]=l[p>>>24]<<24^l[h>>16&255]<<16^l[m>>8&255]<<8^l[255&y]^r[b++],f=p,p=h,h=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=re.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 re.m(e,o)}},Fe=ie._;let Oe=ge&&Re&&typeof Ae.importKey==k,Te=ge&&Re&&typeof Ae.deriveBits==k;class Ie extends TransformStream{constructor({password:t,rawPassword:e,encryptionStrength:r,checkPasswordOnly:n,checkAuthenticationCode:o=!0}){super({start(){ke(this,t,e,r)},async transform(t,e){const r=this,{password:o,strength:i,et:a,ready:s}=r;o?(await async function(t,e,r,n){const o=await ve(t,e,r,Ne(n,0,ye[e])),i=Ne(n,ye[e]);if(o[0]!=i[0]||o[1]!=i[1])throw new Error(se)}(r,i,o,Ne(t,0,ye[i]+2)),t=Ne(t,ye[i]+2),n?e.error(new Error(ue)):a()):await s;const c=new Uint8Array(t.length-Ee-(t.length-Ee)%de);e.enqueue(Ce(r,t,c,0,Ee,!0))},async flush(t){const{nt:e,ot:r,it:n,ready:i}=this;if(r&&e){await i;const a=Ne(n,0,n.length-Ee),s=Ne(n,n.length-Ee);let c=N;if(a.length){const t=je(ze,a);r.update(t);const n=e.update(t);c=_e(ze,n)}const u=Ne(_e(ze,r.digest()),0,Ee);let l=n.length<Ee?1:0;for(let t=0;t<Ee;t++)l|=u[t]^s[t];if(l&&o)throw new Error(ce);t.enqueue(c)}}})}}class Ue extends TransformStream{constructor({password:t,rawPassword:e,encryptionStrength:r}){super({start(){ke(this,t,e,r)},async transform(t,e){const r=this,{password:n,strength:o,et:i,ready:a}=r;let s=N;n?(s=await async function(t,e,r){const n=fe(new Uint8Array(ye[e]));return Pt(n,await ve(t,e,r,n))}(r,o,n),i()):await a;const c=new Uint8Array(s.length+t.length-t.length%de);c.set(s,0),e.enqueue(Ce(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 i=N;if(n.length){const t=e.update(je(ze,n));r.update(t),i=_e(ze,t)}const a=_e(ze,r.digest()).slice(0,Ee);t.enqueue(Pt(i,a))}}})}}function ke(t,e,r,n){Object.assign(t,{ready:new Promise(e=>t.et=e),password:Me(e,r),strength:n-1,it:N})}function Ce(t,e,r,n,o,i){const{nt:a,ot:s,it:c}=t;c.length&&(e=Pt(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%de)),l=0;l<=u-de;l+=de){const t=je(ze,Ne(e,l,l+de));i&&s.update(t);const o=a.update(t);i||s.update(o),r.set(_e(ze,o),l+n)}return t.it=Ne(e,l),r}async function ve(t,e,r,n){t.password=null;const o=await async function(t,e,r,n,o){if(!Oe)return ie.importKey(e);try{return await Ae.importKey("raw",e,r,!1,o)}catch{return Oe=!1,ie.importKey(e)}}(0,r,pe,0,me),i=await async function(t,e,r){if(!Te)return ie.j(e,t.salt,he.iterations,r);try{return await Ae.deriveBits(t,e,r)}catch{return Te=!1,ie.j(e,t.salt,he.iterations,r)}}(Object.assign({salt:n},he),o,8*(2*be[e]+2)),a=new Uint8Array(i),s=je(ze,Ne(a,0,be[e])),c=je(ze,Ne(a,be[e],2*be[e])),u=Ne(a,2*be[e]);return Object.assign(t,{keys:{key:s,st:c,passwordVerification:u},nt:new De(new xe(s),Array.from(Se)),ot:new Fe(c)}),u}function Me(t,e){return e===T?ee(t):e}function Ne(t,e,r){return t.subarray(e,r)}function _e(t,e){return t.A(e)}function je(t,e){return t.R(e)}class Be extends TransformStream{constructor({password:t,rawPassword:e,passwordVerification:r,checkPasswordOnly:n}){super({start(){Le(this,t,e,r)},transform(t,e){const r=this;if(r.password||r.rawPassword){const e=We(r,t.subarray(0,12));if(r.password=r.rawPassword=null,0!=(e[11]^r.passwordVerification))throw new Error(se);t=t.subarray(12)}n?e.error(new Error(ue)):e.enqueue(We(r,t))}})}}class Pe extends TransformStream{constructor({password:t,rawPassword:e,passwordVerification:r}){super({start(){Le(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=fe(new Uint8Array(12));e[11]=r.passwordVerification,n=new Uint8Array(t.length+e.length),n.set(Ze(r,e),0),o=12}else n=new Uint8Array(t.length),o=0;n.set(Ze(r,t),o),e.enqueue(n)}})}}function Le(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 $t(n[0]),ut:new $t(n[2])}),r)for(let e=0;e<r.length;e++)Ve(t,r[e]);else for(let r=0;r<e.length;r++)Ve(t,e.charCodeAt(r))}(t,e,r)}function We(t,e){const r=new Uint8Array(e.length);for(let n=0;n<e.length;n++)r[n]=He(t)^e[n],Ve(t,r[n]);return r}function Ze(t,e){const r=new Uint8Array(e.length);for(let n=0;n<e.length;n++)r[n]=He(t)^e[n],Ve(t,e[n]);return r}function Ve(t,e){let[,r]=t.keys;t.ct.append([e]);const n=~t.ct.get();r=Ke(Math.imul(Ke(r+Ge(n)),134775813)+1),t.ut.append([r>>>24]);const o=~t.ut.get();t.keys=[n,r,o]}function He(t){const e=2|t.keys[2];return Ge(Math.imul(e,1^e)>>>8)}function Ge(t){return 255&t}function Ke(t){return 4294967295&t}function Ye(t){if(t instanceof ReadableStream)return t;const e=t.getReader();return new ReadableStream({async pull(t){const{value:r,done:n}=await e.read();n?t.close():t.enqueue(r)},cancel:t=>e.cancel(t)})}function qe(t,e){t=Ye(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 Xe(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 Je="Invalid codec definition",Qe="Reserved compression method",$e="Invalid codec module",tr="Compression method not supported",er=[0,8,9,99],rr=new Map,nr=new Map;function or(t={}){const{compressionMethod:r,format:n,codecURI:o,CompressionStream:i,DecompressionStream:a,versionNeeded:s}=t;if(!Number.isInteger(r)||r<0||r>e||typeof n!=v||!n.length)throw new Error(Je);if(er.includes(r))throw new Error(Qe);const c=typeof i==k||typeof a==k;if(!(c||typeof o==v&&o.length))throw new Error(Je);rr.set(r,{compressionMethod:r,format:n,codecURI:o,versionNeeded:s}),c&&ur(n,{CompressionStream:i,DecompressionStream:a})}function ir(t){const e=rr.get(t);if(e){let r;rr.delete(t),rr.forEach(t=>r=r||t.format==e.format),r||nr.delete(e.format)}}function ar(t){return rr.get(t)}function sr(){return Array.from(rr.values(),t=>Object.assign({},t,nr.get(t.format)))}function cr(t){return nr.get(t)}function ur(t,e){const{CompressionStream:r,DecompressionStream:n}=e;if(typeof r!=k&&typeof n!=k)throw new Error($e);nr.set(t,{CompressionStream:r,DecompressionStream:n})}const lr="Invalid uncompressed size",fr="Invalid compressed data",dr="Invalid CRC32",wr="deflate-raw",pr="deflate64-raw",hr="gzip",mr=[31,139,8];class yr extends TransformStream{constructor(t,{chunkSize:e,CompressionStreamFallback:r,CompressionStream:n}){super({});const{compressed:o,encrypted:i,useCompressionStream:a,zipCrypto:s,computeCrc32:c,level:u,deflate64:l,format:f,compressionMethod:d,inputSize:w}=t,p=this;let h,m,y,b=super.readable;const E=f&&cr(f),S=c&&o&&!l&&!E&&(!i||s)&&Boolean(a&&n);if(i&&!s||!c||S||(h=new te,b=Dr(b,h)),o)if(E)b=Fr(b,zr(E.CompressionStream,f,{level:u,chunkSize:e,compressionMethod:d,uncompressedSize:w}));else if(S)y=new br,b=Fr(b,new n(hr)),b=Dr(b,y);else try{b=xr(b,a,{level:u,chunkSize:e},n,r)}catch(t){let e;try{e=new n(hr)}catch{throw t}b=Fr(b,e),b=Dr(b,new br)}i&&(s?b=Dr(b,new Pe(t)):(m=new Ue(t),b=Dr(b,m))),Rr(p,b,()=>{i&&!s||!c||(p.crc32=S?y.crc32:new DataView(h.value.buffer).getUint32(0))})}}class br extends TransformStream{constructor(){let t,e=10,r=new Uint8Array(0);super({transform(t,n){if(e){const r=Math.min(e,t.length);if(e-=r,!(t=t.subarray(r)).length)return}const o=r.length+t.length;if(o<=8)return void(r=Pt(r,t));const i=o-8,a=Math.min(i,r.length);n.enqueue(Pt(r.subarray(0,a),t.subarray(0,i-a))),r=Pt(r.subarray(a),t.subarray(i-a))},flush(){const e=Wt(r);t.crc32=e.getUint32(0,!0),t.uncompressedSize=e.getUint32(4,!0)}}),t=this}}class Er extends TransformStream{constructor(t,{chunkSize:e,DecompressionStreamFallback:r,DecompressionStream:n}){super({});const{zipCrypto:o,encrypted:i,checkCrc32:a,crc32:s,compressed:c,useCompressionStream:u,deflate64:l,format:f,compressionMethod:d,rawBitFlag:w,outputSize:p}=t;let h,m,y=super.readable;if(i&&(o?y=Dr(y,new Be(t)):(m=new Ie(t),y=Dr(y,m))),c){const t=f&&cr(f);if(t)y=Fr(y,zr(t.DecompressionStream,f,{chunkSize:e,compressionMethod:d,rawBitFlag:w,uncompressedSize:p}));else try{y=xr(y,u,{chunkSize:e,deflate64:l},n,r)}catch(t){if(l||p===T)throw t;let e;try{e=new n(hr)}catch{throw t}y=function(t,e,r){const n=new $t;let o,i,a,s=0,c=!1;const u=new Promise((t,e)=>{i=t,a=e});u.catch(()=>{}),r||i();const l=new TransformStream({start(t){const e=new Uint8Array(10);e.set(mr),t.enqueue(e)},transform(t,e){e.enqueue(t)},async flush(t){c=!0,d();try{await u}finally{w()}const e=new Uint8Array(8),o=Wt(e);o.setUint32(0,n.get(),!0),o.setUint32(4,r,!0),t.enqueue(e)},cancel(t){a(t)}}),f=new TransformStream({transform(t,e){n.append(t),s+=t.length,s>=r?i():c&&d(),e.enqueue(t)},cancel(t){a(t)}});return t=Dr(t,l),Dr(t=Fr(t,e),f);function d(){w(),o=setTimeout(()=>a(new Error(lr)),5e3)}function w(){clearTimeout(o)}}(y,e,p)}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(fr);throw e.cause=t,e}const{value:n,done:o}=r;o?t.close():t.enqueue(n)},cancel:t=>e.cancel(t)})}(y)}a&&(h=new te,y=Dr(y,h)),Rr(this,y,()=>{if(a){const t=new DataView(h.value.buffer);if(s!=t.getUint32(0,!1))throw new Error(dr)}})}}const Sr=new Map;function gr(t,e){if(!t)return!1;let r=Sr.get(t);r||(r=new Map,Sr.set(t,r));let n=r.get(e);if(n===T){try{new t(e),n=!0}catch{n=!1}r.set(e,n)}return n}function Ar(t){return gr(t,wr)}function Rr(t,e,r){e=Dr(e,new TransformStream({flush:r})),Object.defineProperty(t,"readable",{get:()=>e})}function zr(t,e,r){if(!t)throw new Error(tr);return new t(e,r)}function xr(t,e,r,n,o){const i=e&&n?n:o||n,a=r.deflate64?pr:wr;let s;try{s=new i(a,r)}catch(t){if(!e||!o||i==o)throw t;s=new o(a,r)}return Fr(t,s)}function Dr(t,e){return Ye(t).pipeThrough(e)}function Fr(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 Or="data",Tr="deflate",Ir="inflate";class Ur extends TransformStream{constructor(t,e){super({});const r=this,{codecType:n}=t;let o;n.startsWith(Tr)?o=yr:n.startsWith(Ir)&&(o=Er),r.outputSize=0;let i=0;const a=new o(t,e),s=super.readable,c=new TransformStream({transform(t,e){t&&t.length&&(i+=t.length,e.enqueue(t))},flush(){Object.assign(r,{inputSize:i})}}),u=new TransformStream({transform(e,n){if(e&&e.length&&(n.enqueue(e),r.outputSize+=e.length,t.outputSize!==T&&r.outputSize>t.outputSize))throw new Error(lr)},flush(){const{crc32:t}=a;Object.assign(r,{crc32:t,inputSize:i})}});Object.defineProperty(r,"readable",{get:()=>s.pipeThrough(c).pipeThrough(a).pipeThrough(u)})}}class kr extends TransformStream{constructor(t){const e=[];let r=0,n=0;function o(){const n=new Uint8Array(t);let o=0;for(;o<t;){const r=e[0],i=t-o;r.length<=i?(n.set(r,o),o+=r.length,e.shift()):(n.set(r.subarray(0,i),o),e[0]=r.subarray(i),o+=i)}return r-=t,n}(!Number.isFinite(t)||t<1)&&(t=65536),super({transform(i,a){for(e.push(i),r+=i.length;r>t;)n+=t,a.enqueue(o())},flush(t){r&&(n+=r,t.enqueue(function(t,e){const r=new Uint8Array(e);let n=0;for(const e of t)r.set(e,n),n+=e.length;return r}(e,r)))}}),Object.defineProperty(this,"outputSize",{get:()=>n})}}const Cr="Worker startup timeout";let vr,Mr,Nr,_r=()=>{};async function jr(t){const{CompressionStream:e,CompressionStreamFallback:r}=t;if(r&&!r.lt)return!0;if(Ar(e)||gr(e,hr))return!0;if(r)try{return await _r(t),!0}catch{return!1}return!1}function Br(t){t.createWorker?Mr=!0:vr=!1}class Pr{constructor(t,{readable:e,writable:r},n,o){const{options:i,config:a,ft:s,useWebWorkers:c,transferStreams:u,workerURI:l}=n;let{createWorker:f}=n;const{signal:d}=s;return Mr&&(f=T),Object.assign(t,{wt:!0,ht:(t.ht||0)+1,readable:e.pipeThrough(new kr(kt(a))).pipeThrough(new Lr(s),{signal:d}),writable:r,options:Object.assign({},i),yt:n,workerURI:l,createWorker:f,transferStreams:u,terminate:()=>new Promise(e=>{const{bt:r,wt:n}=t;r?(n?t.Et=e:(r.terminate(),e()),t.St=null):e()}),gt(){if(t.wt){const{Et:e}=t;e&&(t.Et=null,t.At=!0,t.bt.terminate(),e()),t.wt=!1,o(t)}}}),vr===T&&(vr=typeof Worker!=U),(c&&Nr&&(vr&&l||f)?Nr:Zr)(t,a)}}class Lr extends TransformStream{constructor({onstart:t,onprogress:e,size:r,onend:n}){let o=0;super({async start(){t&&await Wr(t,r)},async transform(t,n){o+=t.length,e&&await Wr(e,o,r),n.enqueue(t)},async flush(){n&&await Wr(n,o)}})}}async function Wr(t,...e){try{await t(...e)}catch{}}function Zr(t,e){return{run:()=>Vr(t,e)}}async function Vr({options:t,readable:e,writable:r,gt:n,yt:o},i){let a,s;try{if(t.compressed&&!t.format){const e=t.codecType.startsWith(Tr),r=e?i.CompressionStreamFallback:i.DecompressionStreamFallback,n=e?i.CompressionStream:i.DecompressionStream;if(t.useCompressionStream){if(r&&r.lt&&!Ar(n))try{await _r(i)}catch{}}else try{await _r(i)}catch{r&&!r.lt||(t.useCompressionStream=!0)}}a=new Ur(t,i),s=new kr(kt(i)),await e.pipeThrough(a).pipeThrough(s).pipeTo(r,{preventClose:!0,preventAbort:!0});const{crc32:n,inputSize:o,outputSize:c}=a;return{crc32:n,inputSize:o,outputSize:c}}catch(t){if(a){const e=s?s.outputSize:0;if(o.outputSize=e,Zt(t))try{t.outputSize=e}catch{}}throw t}finally{n()}}const Hr={type:"module"},Gr="error";let Kr,Yr,qr,Xr=!0;try{Xr=typeof structuredClone==k&&structuredClone(new DOMException("","AbortError")).code!==T}catch{}var Jr;function Qr(t){const{reader:e}=t;e&&e.releaseLock(),t.reader=null,t.writer=null}function $r(t){const{bt:e}=t;if(e)try{e.terminate()}catch{}t.St=null}function tn(t,e,r,n,o=!0){const{createWorker:i}=r;let a,s,c;if(i)a=i();else if(Yr===T||Kr!==t){const i=typeof t==k;s=i?t(o):t;const u=s.startsWith("data:"),l=s.startsWith("blob:");if(u||l){n===T&&(n=!1),n&&(c=Hr);try{a=new Worker(s,c)}catch(o){if(l)try{URL.revokeObjectURL(s)}catch{}if(i&&l)return tn(t,e,r,n,!1);if(n)throw o;return tn(t,e,r,!0,!1)}}else{n===T&&(n=!0),n&&(c=Hr);try{s=new URL(s,e)}catch{}try{a=new Worker(s,c)}catch(i){if(n)return tn(t,e,r,!1,o);throw i}}Kr=t,Yr=s,qr=c}else a=new Worker(Yr,qr);return a.addEventListener("message",t=>{r.Rt=!0,en(r),async function({data:t},e){const{type:r,value:n,messageId:o,result:i,error:a,errorValue:s}=t,{reader:c,writer:u,zt:l,xt:f,gt:d,ht:w}=e,p=()=>e.ht!=w;try{if(a)h(function(t,e){const{message:r,stack:n,code:o,name:i,outputSize:a,cause:s,codecImportFailed:c}=t;let u;if(e?u=e.value:(u=Object.assign(new Error(r),{stack:n,code:o,name:i}),s&&(u.cause=Object.assign(new Error(s.message),{name:s.name}))),Zt(u))try{a!==T&&(u.outputSize=a),c&&(u.codecImportFailed=!0),e&&(u.name!==i&&(u.name=i),u.code!==o&&(u.code=o))}catch{}return u}(a,s));else{if("pull"==r){const{value:t,done:r}=await c.read();p()||nn({type:Or,value:t,done:r,messageId:o},e)}if(r==Or){const t=new Uint8Array(n);await u.ready,await u.write(t),p()||nn({type:"ack",messageId:o},e)}"close"==r&&function(t){p()||(l(t),m(),d())}(i)}}catch(a){p()||($r(e),h(a))}function h(t){p()||(f(t),m(),Zt(t)&&t.codecImportFailed||d())}function m(){u&&u.releaseLock()}}(t,r)}),a.addEventListener(Gr,t=>rn(t,r)),a.addEventListener("messageerror",t=>rn(t,r)),a}function en(t){const{Dt:e}=t;e&&(clearTimeout(e),t.Dt=null)}function rn(t,e){t.preventDefault&&t.preventDefault(),en(e);const{Rt:r,xt:n,writer:o,gt:i}=e;$r(e),r||(e.bt=null);let a=t.error||new Error(t.message||Gr);r||(a=Object.assign(new Error(a.message||Gr),{Ft:!0}),e.Ot=a),n&&(n(a),o&&o.releaseLock(),r&&i())}function nn(t,{bt:e,writer:r,transferStreams:n,Rt:o}){try{const{value:r,readable:i,writable:a}=t,s=[];if(r&&(t.value=Lt(r),s.push(t.value.buffer)),n&&Xr&&o?(i&&s.push(i),a&&s.push(a)):t.readable=t.writable=null,s.length)try{return e.postMessage(t,s),!0}catch{Xr=!1,t.readable=t.writable=null,e.postMessage(t)}else e.postMessage(t)}catch(t){throw r&&r.releaseLock(),t}}Jr=function(t,e){const{baseURI:r,chunkSize:n,workerStartupTimeout:o}=e;let{wasmURI:i}=e;if(!t.St){let a;typeof i==k&&(i=i());try{a=tn(t.workerURI,r,t)}catch{return Br(t),Zr(t,e)}Object.assign(t,{bt:a,Rt:!1,At:!1,Ot:null,St:{run:async()=>{try{return await async function(t,e){if(!t.bt){const{Ot:e}=t;t.Ot=null;const r=e||new Error(Cr);throw r.Ft=!0,r}let r,n;const o=new Promise((e,o)=>{r=e,n=e=>{const{outputSize:r,yt:n}=t;if(n.outputSize=r,Zt(e))try{e.outputSize=r}catch{}o(e)}});Object.assign(t,{reader:null,writer:null,outputSize:0,Tt:!1,It:null,zt:r,xt:n,result:o});const{readable:i,options:a}=t,{writable:s,closed:c,Ut:u}=function(t,e){const r=new AbortController;let n;const{writable:o,readable:i}=new TransformStream({transform(t,r){e.outputSize+=t.length,r.enqueue(t)}}),a=i.pipeTo(t,{preventClose:!0,preventAbort:!0,signal:r.signal});return a.catch(t=>{n||Object.assign(e,{Tt:!0,It:t})}),{writable:o,closed:a,Ut:()=>{n=!0,r.abort()}}}(t.writable,t);let l;try{l=nn({type:"start",options:a,config:e,readable:i,writable:s},t)}catch(e){u();try{await c}catch{}throw t.gt(),e}l||Object.assign(t,{reader:i.getReader(),writer:s.getWriter()});const{workerStartupTimeout:f}=e;!t.Rt&&Number.isFinite(f)&&f>=0&&(t.Dt=setTimeout(()=>function(t){if(t.Dt=null,t.Rt)return;const{xt:e,writer:r}=t;if($r(t),t.bt=null,e){const t=new Error(Cr);t.Ft=!0,e(t),r&&r.releaseLock()}}(t),f));try{const t=await o;return await d(),await c,t}catch(e){await d(),u();try{await c}catch{}const{outputSize:r,yt:n,Tt:o,It:i}=t;n.outputSize=r;const a=Zt(e)&&(e.codecImportFailed||e.Ft),s=o&&!a?i:e;if(Zt(s))try{s.outputSize=r}catch{}throw s}async function d(){if(!l&&!s.locked)try{await s.getWriter().close()}catch{}}}(t,{chunkSize:n,wasmURI:i,baseURI:r,workerStartupTimeout:o})}catch(r){if(r&&r.Ft)return Br(t),Qr(t),Vr(t,e);if(r&&r.codecImportFailed){if(t.reader)return Qr(t),Vr(t,e);t.gt()}throw r}}}})}return t.St},Nr=Jr;let on=[];const an=[];let sn,cn,un=0;async function ln(t,e){const{options:r,config:n}=e,{transferStreams:o,useWebWorkers:i,useCompressionStream:a,compressed:s,checkCrc32:c,computeCrc32:u,encrypted:l,format:f,codecURI:d}=r,{workerURI:w,createWorker:p,maxWorkers:h}=n;f&&(d&&(r.codecURI=function(t,e){try{return new URL(t,e).toString()}catch{return t}}(d,n.baseURI)),await async function(t,e){!nr.has(t)&&e&&ur(t,await(import(/* webpackIgnore: true */ /* @vite-ignore */e)))}(f,r.codecURI)),e.transferStreams=!f&&(o||o===T&&n.transferStreams);const m=!(s||c||u||l),y=f===T||Boolean(r.codecURI);return e.useWebWorkers=!m&&y&&(i||i===T&&n.useWebWorkers),e.workerURI=e.useWebWorkers&&w?w:T,e.createWorker=e.useWebWorkers&&p?p:T,r.useCompressionStream=a||a===T&&n.useCompressionStream,(await async function(){const r=on.find(t=>!t.wt);if(r)return hn(r),new Pr(r,t,e,b);if(on.length<h){const r={kt:un};return un++,on.push(r),new Pr(r,t,e,b)}return new Promise(r=>{an.push({resolve:r,stream:t,yt:e}),cn=n.workerStarvationTimeout,fn()})}()).run();function b(t){if(dn(),an.length){const[{resolve:e,stream:r,yt:n}]=an.splice(0,1);e(new Pr(t,r,n,b)),fn()}else t.bt?(hn(t),function(t,e){const{config:r}=e,{terminateWorkerTimeout:n}=r;Number.isFinite(n)&&n>=0&&(t.At?t.At=!1:t.Ct=setTimeout(async()=>{on=on.filter(e=>e!=t);try{await t.terminate()}catch{}},n))}(t,e)):on=on.filter(e=>e!=t)}}function fn(){!sn&&an.length&&Number.isFinite(cn)&&cn>=0&&(sn=setTimeout(wn,cn))}function dn(){sn&&(clearTimeout(sn),sn=null)}function wn(){if(sn=null,an.length){const[{resolve:t,stream:e,yt:r}]=an.splice(0,1),n=Object.assign({},r,{useWebWorkers:!1,workerURI:T,createWorker:T});t(new Pr({},e,n,pn)),fn()}}function pn(){dn(),fn()}function hn(t){const{Ct:e}=t;e&&(clearTimeout(e),t.Ct=null)}const mn="\0\u263a\u263b\u2665\u2666\u2663\u2660\u2022\u25d8\u25cb\u25d9\u2642\u2640\u266a\u266b\u263c\u25ba\u25c4\u2195\u203c\xb6\xa7\u25ac\u21a8\u2191\u2193\u2192\u2190\u221f\u2194\u25b2\u25bc !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\u2302\xc7\xfc\xe9\xe2\xe4\xe0\xe5\xe7\xea\xeb\xe8\xef\xee\xec\xc4\xc5\xc9\xe6\xc6\xf4\xf6\xf2\xfb\xf9\xff\xd6\xdc\xa2\xa3\xa5\u20a7\u0192\xe1\xed\xf3\xfa\xf1\xd1\xaa\xba\xbf\u2310\xac\xbd\xbc\xa1\xab\xbb\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255d\u255c\u255b\u2510\u2514\u2534\u252c\u251c\u2500\u253c\u255e\u255f\u255a\u2554\u2569\u2566\u2560\u2550\u256c\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256b\u256a\u2518\u250c\u2588\u2584\u258c\u2590\u2580\u03b1\xdf\u0393\u03c0\u03a3\u03c3\xb5\u03c4\u03a6\u0398\u03a9\u03b4\u221e\u03c6\u03b5\u2229\u2261\xb1\u2265\u2264\u2320\u2321\xf7\u2248\xb0\u2219\xb7\u221a\u207f\xb2\u25a0\xa0".split("");function yn(t,e){return bn(t,e,!0)}function bn(t,e,r){return e&&"cp437"==e.trim().toLowerCase()?function(t){let e="";for(let r=0;r<t.length;r++)e+=mn[t[r]];return e}(t):new TextDecoder(e,{ignoreBOM:r}).decode(t)}const En="HTTP error ",Sn="HTTP Range not supported",gn="HTTP resource changed",An="Writer iterator completed too soon",Rn="Writer not initialized",zn="Invalid writer (size must be writable)",xn="Content-Range",Dn="Range",Fn="GET",On="bytes",Tn=16777216,In="writable",Un=Symbol();class kn{constructor(){this.size=0}init(){this.initialized=!0}}class Cn extends kn{get readable(){return this.createReadable()}createReadable({offset:t=0,size:e,chunkSize:r=kt(Ut())}={}){const n=this;let o=0;return r=Ct(r),new ReadableStream({async pull(i){const a=e===T?r:Math.min(r,e-o),s=await Eo(n,t+o,a);s.length&&(i.enqueue(s),o+=s.length),(e!==T&&o>=e||!s.length&&a)&&i.close()}})}}class vn extends kn{constructor(){super();const t=this,e=new WritableStream({write(e){if(!t.initialized)throw new Error(Rn);return t.writeUint8Array(Lt(e))}});Object.defineProperty(t,In,{get:()=>e})}writeUint8Array(){}}class Mn extends Cn{constructor(t){super();let e=t.length;for(;"="==t.charAt(e-1);)e--;const r=t.indexOf(",")+1;Object.assign(this,{vt:t,Mt:r,size:Math.floor(.75*(e-r))})}readUint8Array(t,e){const{Mt:r,vt:n}=this,o=new Uint8Array(e),i=4*Math.floor(t/3),a=atob(n.substring(i+r,4*Math.ceil((t+e)/3)+r)),s=t-3*Math.floor(i/4);let c=0;for(let t=s;t<s+e&&t<a.length;t++)o[t-s]=a.charCodeAt(t),c++;return c<o.length?o.subarray(0,c):o}}class Nn extends vn{constructor(t){super(),Object.assign(this,{contentType:t,data:"data:"+(t||"")+";base64,",Nt:""})}writeUint8Array(t){const e=this;let r,n=e.Nt;const o=e.Nt.length;for(e.Nt="",r=0;r<3*Math.floor((o+t.length)/3)-o;r++)n+=String.fromCharCode(t[r]);for(;r<t.length;r++)e.Nt+=String.fromCharCode(t[r]);n.length>2?e.data+=btoa(n):e.Nt=n+e.Nt}getData(){return this.data+btoa(this.Nt)}}let _n,jn;class Bn extends Cn{constructor(t){super(),Object.assign(this,{_t:t,size:t.size}),jn||(jn=(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();_n=1==e}catch{_n=!1}})())}createReadable(t){const{_t:e,size:r}=this,{offset:n=0,size:o=r-n}=t||{};if(typeof e.stream==k){if(!n&&o>=r)return Ye(e.stream());if(_n)return Ye(e.slice(n,n+o).stream())}return super.createReadable(t)}async readUint8Array(t,e){const r=this,n=t+e,o=!t&&n>=r.size?r._t:r._t.slice(t,n);let i=await o.arrayBuffer();return i.byteLength>e&&(i=i.slice(t,n)),new Uint8Array(i)}}class Pn extends kn{constructor(t){super();const e=this,r=new TransformStream;Object.defineProperty(e,In,{get:()=>r.writable}),e.contentType=t,e.jt=qe(r.readable,t),e.jt.catch(()=>{})}getData(){return this.jt}}class Ln extends Bn{constructor(t){super(new Blob([t],{type:"text/plain"}))}}function Wn(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 Pn{constructor(t){super(),Object.assign(this,{encoding:t,Bt:!t||"utf-8"==t.toLowerCase()})}async getData(){const{encoding:t,Bt:e}=this,r=await super.getData();return r.text&&e?r.text():function(t,e){return bn(t,e,!1)}(new Uint8Array(await r.arrayBuffer()),t)}}class Vn extends Cn{constructor(t,e){super(),Gn(this,t,e)}async init(){await Kn(this,io,eo),super.init()}createReadable(t){const e=this,{useRangeHeader:r,forceRangeRequests:n,size:o}=e;if((r||n)&&o!==T){const{offset:r=0,size:n=o-r}=t||{};if(n>0&&r<o)return function(t,e,r){let n,o=e,i=0,a=r;return new ReadableStream({start:()=>s(),async pull(t){n||await s();const{value:e,done:r}=await n.read();if(r)throw new Error(Sn);const o=e.length>i?e.subarray(0,i):e;i-=o.length,a-=o.length,o.length&&t.enqueue(o),i||(await async function(){const t=n;n=T,await t.cancel()}(),a||t.close())},cancel:t=>n&&n.cancel(t)});async function s(){const e=Math.min(t.maximumRangeSize,a),r=await io(Fn,t,$n(t,o,e));if(206!=r.status)throw new Error(Sn);const s=r.headers.get(xn);if(s){const t=Number(s.trim().split(/[\s-]+/)[1]);if(!Number.isNaN(t)&&t!=o)throw new Error(Sn)}Qn(t,r),Jn(t,r),o+=e,i=e,n=r.body.getReader()}}(e,r,Math.min(n,o-r))}return super.createReadable(t)}readUint8Array(t,e){return Yn(this,t,e,io,eo)}}class Hn extends Cn{constructor(t,e){super(),Gn(this,t,e)}async init(){await Kn(this,ao,ro),super.init()}readUint8Array(t,e){return Yn(this,t,e,ao,ro)}}function Gn(t,e,r){const{preventHeadRequest:n,useRangeHeader:o,forceRangeRequests:i,combineSizeEocd:a,checkResourceChanges:s=!0,maximumRangeSize:c=Tn,fetch:u}=r;delete(r=Object.assign({},r)).preventHeadRequest,delete r.useRangeHeader,delete r.forceRangeRequests,delete r.combineSizeEocd,delete r.checkResourceChanges,delete r.maximumRangeSize,delete r.useXHR,delete r.fetch,Object.assign(t,{url:e,options:r,preventHeadRequest:n,useRangeHeader:o,forceRangeRequests:i,combineSizeEocd:a,checkResourceChanges:s,maximumRangeSize:c,fetch:u})}async function Kn(t,e,r){const{url:n,preventHeadRequest:o,useRangeHeader:i,forceRangeRequests:a,combineSizeEocd:s}=t;if(function(t){const{baseURI:e}=Ut(),{protocol:r}=new URL(t,e);return"http:"==r||"https:"==r}(n)&&(i||a)&&(typeof o==U||o)){const n=await e(Fn,t,$n(t,s?-22:void 0)),o=n.headers.get("Accept-Ranges");if(!(a||o&&o.toLowerCase()==On))throw new Error(Sn);{if(s){const e=new Uint8Array(await n.arrayBuffer());206==n.status&&e.length==d&&(t.Pt=e)}Jn(t,n);const o=qn(n);o===T?await oo(t,e,r):t.size=o}}else await oo(t,e,r)}async function Yn(t,e,r,n,o){const{useRangeHeader:i,forceRangeRequests:a,Pt:s,size:c,options:u}=t;if(i||a){if(s&&e==c-d&&r==d)return s;if(e>=c||0===r)return N;{e+r>c&&(r=c-e);const o=await n(Fn,t,$n(t,e,r));if(206!=o.status)throw new Error(Sn);const i=o.headers.get(xn);if(i){const t=Number(i.trim().split(/[\s-]+/)[1]);if(!Number.isNaN(t)&&t!=e)throw new Error(Sn)}Qn(t,o),Jn(t,o);const a=new Uint8Array(await o.arrayBuffer());if(a.length!=r)throw new Error(Sn);return a}}{const{data:n}=t;return n||await o(t,u),t.data.subarray(e,e+r)}}function qn(t){const e=t.headers.get(xn);if(e){const t=e.trim().split(/\s*\/\s*/)[1];if(t&&"*"!=t){const e=Number(t);if(!Number.isNaN(e))return e}}}function Xn({headers:t}){return{Lt:t.get("Etag")||T,lastModified:t.get("Last-Modified")||T}}function Jn(t,e){const{checkResourceChanges:r,Wt:n}=t;r&&!n&&206==e.status&&(t.Wt=Xn(e))}function Qn(t,e){const{checkResourceChanges:r,Wt:n,size:o}=t;if(r){const t=qn(e);if(t!==T&&o!==T&&t!=o)throw new Error(gn);if(n){const t=Xn(e);if(Object.entries(n).some(([e,r])=>r!==T&&t[e]!==T&&r!=t[e]))throw new Error(gn)}}}function $n(t,e=0,r=1){return Object.assign({},to(t),{[Dn]:On+"="+(e<0?e:e+"-"+(e+r-1))})}function to({options:t}){const{headers:e}=t;if(e)return Symbol.iterator in e?Object.fromEntries(e):e}async function eo(t){await no(t,io)}async function ro(t){await no(t,ao)}async function no(t,e){const r=await e(Fn,t,to(t));t.data=new Uint8Array(await r.arrayBuffer()),t.size=t.data.length}async function oo(t,e,r){if(t.preventHeadRequest)await r(t,t.options);else{const n=await e("HEAD",t,to(t)),o=n.headers.get("Content-Length");o&&!n.headers.get("Content-Encoding")?t.size=Number(o):await r(t,t.options)}}async function io(t,{fetch:e=fetch,options:r,url:n},o){const i=await e(n,Object.assign({},r,{method:t,headers:o}));if(i.status>=200&&i.status<=299)return i;throw 416==i.status?new Error(Sn):new Error(En+(i.statusText||i.status))}function ao(t,{url:e},r){return new Promise((n,o)=>{const i=new XMLHttpRequest;if(i.addEventListener("load",()=>{if(i.status>=200&&i.status<=299){const t=[];i.getAllResponseHeaders().trim().split(/[\r\n]+/).forEach(e=>{const r=e.trim().split(/\s*:\s*/);r[0]=r[0].trim().replace(/^[a-z]|-[a-z]/g,t=>t.toUpperCase()),t.push(r)}),n({status:i.status,arrayBuffer:()=>i.response,headers:new Map(t)})}else o(416==i.status?new Error(Sn):new Error(En+(i.statusText||i.status)))},!1),i.addEventListener("error",t=>o(t.detail?t.detail.error:new Error("Network error")),!1),i.open(t,e),r)for(const t of Object.entries(r))i.setRequestHeader(t[0],t[1]);i.responseType="arraybuffer",i.send()})}class so extends Cn{constructor(t,e={}){super(),Object.assign(this,{url:t,reader:e.useXHR&&!e.fetch?new Hn(t,e):new Vn(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 co extends so{constructor(t,e={}){super(t,Object.assign({},e,{useRangeHeader:!0}))}}class uo extends Cn{constructor(t){super(),t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength),Object.assign(this,{Zt:t,size:t.length})}readUint8Array(t,e){return this.Zt.slice(t,t+e)}}class lo extends vn{constructor(t){super(),this.Vt=t||262144}init(t=0){Object.assign(this,{offset:0,Zt:new Uint8Array(t>0?t:this.Vt)}),super.init()}writeUint8Array(t){const e=this,r=e.offset+t.length;if(r>e.Zt.length){let t=e.Zt.length?2*e.Zt.length:e.Vt;for(;t<r;)t*=2;const n=e.Zt;e.Zt=new Uint8Array(t),e.Zt.set(n)}e.Zt.set(t,e.offset),e.offset+=t.length}getData(){return this.offset===this.Zt.length?this.Zt:this.Zt.slice(0,this.offset)}}class fo extends Cn{constructor(t){super(),this.Ht=t}async init(){const t=this;t.Gt=0;const e=t.Ht=await Promise.all(t.Ht.map(bo));t.Kt=e.map(e=>{const r=t.size;return t.size+=e.size,r}),super.init()}Yt(t){const{Kt:e,size:r}=this,n=e[t];return n===T?r:n}async readUint8Array(t,e){const r=this,{Ht:n}=this;let o,i=0,a=t;for(;n[i]&&a>=n[i].size;)a-=n[i].size,i++;const s=n[i];if(s){const n=s.size;if(a+e<=n)o=await Eo(s,a,e);else{const i=n-a;o=Pt(await Eo(s,a,i),await r.readUint8Array(t+i,e-i))}}else o=N;return r.Gt=Math.max(i,r.Gt),o}}class wo extends kn{constructor(t,e=4294967295){super();const r=this;let n,o,i;Object.assign(r,{diskNumber:0,diskOffset:0,size:0,maxSize:e,availableSize:e});const a=new WritableStream({async write(e){if(e===Un)return void(i&&await c());const{availableSize:a}=r;if(i)e.length>=a?(await s(e.subarray(0,a)),await c(),e.length>a&&await this.write(e.subarray(a))):await s(e);else{const{value:a,done:s}=await t.next();if(s&&!a)throw new Error(An);n=a,n.size=0,n.maxSize&&(r.maxSize=n.maxSize),r.availableSize=r.maxSize,await yo(n),o=a.writable,i=o.getWriter(),await this.write(e)}},async close(){i&&(await i.ready,await u())},async abort(t){i&&await i.abort(t)}});async function s(t){const e=t.length;e&&(await i.ready,await i.write(t),n.size+=e,r.availableSize-=e)}async function c(){await u(),r.diskOffset+=n.size,r.diskNumber++,i=null,r.availableSize=r.maxSize}async function u(){await i.close()}Object.defineProperty(r,In,{get:()=>a})}async closeDisk(){const t=this.writable.getWriter();try{await t.ready,await t.write(Un)}finally{t.releaseLock()}}}class po{constructor(t){return Array.isArray(t)&&(t=new fo(t)),(t instanceof ReadableStream||typeof t.getReader==k)&&(t={readable:Ye(t)}),t}}class ho{constructor(t){t.writable===T&&typeof t.next==k&&(t=new wo(t)),(t instanceof WritableStream||typeof t.getWriter==k)&&(t={writable:Xe(t)});try{t.size=t.size===T?0:t.size}catch{throw new Error(zn)}return t}}function mo(t){return Boolean(t&&t.getData)}async function yo(t,e){if(!t.init||t.initialized)return Promise.resolve();await t.init(e)}async function bo(t){return t=new po(t),await yo(t),t.size!==T&&t.readUint8Array||(t=new Bn(await qe(t.readable)),await yo(t)),t}function Eo(t,e,r){return t.readUint8Array(e,r)}function So(t,e){return t.createReadable?t.createReadable(e):t.readUint8Array?Cn.prototype.createReadable.call(t,e):t.readable}function go(t,e,r){if(!t.some(t=>t.reason==e)){const n={reason:e};r!==T&&(n.filename=r),t.push(n)}}const Ao="filename",Ro="rawFilename",zo="comment",xo="rawComment",Do="uncompressedSize",Fo="compressedSize",Oo="offset",To="diskNumberStart",Io="lastModDate",Uo="rawLastModDate",ko="lastAccessDate",Co="rawLastAccessDate",vo="creationDate",Mo="rawCreationDate",No="internalFileAttributes",_o="externalFileAttributes",jo="msdosAttributesRaw",Bo="msdosAttributes",Po="msDosCompatible",Lo="zip64",Wo="encrypted",Zo="version",Vo="versionMadeBy",Ho="zipCrypto",Go="directory",Ko="executable",Yo="compressionMethod",qo="signature",Xo="extraField",Jo="unixMode",Qo="setuid",$o="setgid",ti="sticky",ei=[Ao,Ro,Do,Fo,Io,Uo,zo,xo,ko,Co,vo,Mo,Oo,To,No,_o,jo,Bo,Po,Lo,Wo,Zo,Vo,Ho,Go,Ko,"symlink",Yo,qo,"crc32",Xo,"extraFieldUnix","extraFieldInfoZip","extraFieldUnixType1","extraFieldPkwareUnix","uid","gid",Jo,"unixExternalUpper",Qo,$o,ti,"bitFlag","rawBitFlag","filenameLength","extraFieldLength","filenameUTF8","commentUTF8","rawExtraField","extraFieldZip64","extraFieldUnicodePath","extraFieldUnicodeComment","extraFieldAES","extraFieldNTFS","extraFieldExtendedTimestamp","extraFieldUSDZ"];class ri{constructor(t){ei.forEach(e=>this[e]=t[e])}}const ni=new Set([1,h,10,m,28789,25461,y,b,E,22613,13]);function oi(t,e,r){return t?e?12:16+4*r:0}const ii="File format is not recognized",ai="End of central directory not found",si="End of Zip64 central directory locator not found",ci="Central directory header not found",ui="Local file header not found",li="Zip64 extra field not found",fi="File contains encrypted entry",di="Encryption method not supported",wi="Split zip file",pi="Overlapping entry found",hi="Entry data out of bounds",mi="Ambiguous archive",yi="Encrypted central directory is not supported",bi="Unsafe filename",Ei="Invalid strictness (must be 'strict', 'balanced' or 'tolerant')",Si="Invalid filenameValidation (must be 'strict', 'balanced' or 'tolerant')",gi="Invalid maxAppendedDataSize (must be a number greater than or equal to 0)",Ai="64-bit value exceeds Number.MAX_SAFE_INTEGER",Ri="unsorted central directory",zi="unknown version needed to extract",xi="compressed patched data",Di="malformed extra field",Fi="unknown zip64 extensible data",Oi="wrapped entries count",Ti="appended data",Ii="prepended data",Ui="prepended central directory",ki="trailing central directory data",Ci="duplicate filename",vi="mismatched zip64 end of central directory record",Mi="multiple end of central directory records",Ni="mismatched local file header (filename)",_i="mismatched local file header (general purpose bit flag)",ji="mismatched local file header (compression method)",Bi="mismatched local file header (crc32 or sizes)",Pi=/^[a-zA-Z]:/,Li="utf-8",Wi="cp437",Zi=[[Do,t],[Fo,t],[Oo,t],[To,e]],Vi={[e]:{qt:Da,bytes:4},[t]:{qt:Fa,bytes:8}},Hi=BigInt(Number.MAX_SAFE_INTEGER);class Gi{constructor(t,e={}){Object.assign(this,{reader:new po(t),options:e,Xt:new Map})}async*getEntriesGenerator(n={}){const i=this;let{reader:a}=i;if(await yo(a),a.size!==T&&a.readUint8Array||(a=new Bn(await qe(a.readable)),await yo(a)),a.size<d)throw new Error(ii);const c=i.warnings=[],h=ua(n,i.options),m=h==rt,y=h!=ot,b=da(Sa(i,n,J),h),E=function(t,e){if(t===T)return e;if(!ca(t))throw new Error(Si);return t}(Sa(i,n,"filenameValidation"),h),S=Sa(i,n,"normalizeFilename"),{Jt:D,Qt:F}=await wa(a,y,b);if(!D)throw await async function(t){return await sa(t)==o}(a)?new Error(wi):new Error(ai);y&&F>1&&Ea(Mi);const O=Wt(D);let I=Da(O,12),U=Da(O,16);const k=D.offset,C=xa(O,20),v=k+d+C,M=a.size-v;M>b&&Ea(Ti),M>0&&go(c,Ti);let _=xa(O,4);const j=a.Gt||0;let B,P,L,W,Z,V=xa(O,6),H=xa(O,10),G=0,K=p;const Y=U==t||I==t||H==e||V==e;if(U!=t&&V!=e&&(U+=aa(a,V)),Y){const r=D.offset>=w?await Eo(a,D.offset-w,w):N,n=Wt(r);if(r.length==w&&Da(n,0)==l){U=aa(a,Da(n,4))+Fa(n,8);let r=await Eo(a,U,p),o=Wt(r);const i=D.offset-w-p;if((r.length<p||Da(o,0)!=u)&&U!=i&&i>=0){const t=U;U=i,U>t&&(G=U-t),r=await Eo(a,U,p),o=Wt(r)}if(r.length<p||Da(o,0)!=u)throw new Error(si);if(L=!0,W=Fa(o,4)>44,W){const t=Math.min(Fa(o,4)-44,a.size-U-p);t>0&&(K+=t,Z=function(t){const e={rawExtensibleData:t};if(t.length>=28){const r=Wt(t),n=xa(r,26);Object.assign(e,{compressionMethod:xa(r,0),compressedSize:Fa(r,2),uncompressedSize:Fa(r,10),encryptionAlgorithm:xa(r,18),bitLength:xa(r,20),flags:xa(r,22),hashAlgorithm:xa(r,24),hashData:t.subarray(28,28+n)})}return e}(await Eo(a,U+p,t)))}_==e?_=Da(o,16):_!=Da(o,16)&&ba(m,c,vi),V==e?V=Da(o,20):V!=Da(o,20)&&ba(m,c,vi),H==e?H=Fa(o,32):H!=Fa(o,32)&&ba(m,c,vi),I==t?I=Fa(o,40):I!=Fa(o,40)&&ba(m,c,vi),U=aa(a,V)+Fa(o,48)+G}}let q=I;const X=D.offset-(L?K+w:0);if(U>=a.size&&(G=a.size-U-I-d,U=a.size-I-d),j!=_)throw new Error(wi);if(U<0)throw new Error(ii);let Q=0,$=await Eo(a,U,I),nt=Wt($);if(I){if($.length<4)throw new Error(ii);const t=X-I;if(U!=t&&V==_){const e=Da(nt,Q)==s||Boolean(Z&&Z.compressedSize)||Xi(nt);let r=!e;if(!r&&t>=0&&t+4<=a.size&&(r=Da(Wt(await Eo(a,t,4)),0)==s),r){const r=U;U=t,U>r&&(G+=U-r,B=e),$=await Eo(a,U,I),nt=Wt($)}}}const it=X-U;if(I!=it&&it>=0&&V==_&&(I=it,$=await Eo(a,U,I),nt=Wt($)),U<0||U>=a.size)throw new Error(ii);i.directoryOffset=U,i.directoryLength=q;const at=ga(i,n,"decryptCentralDirectory");let st,ct;if(at&&H&&$.length>=4&&Da(nt,0)!=s&&(W||Xi(nt))){const t=function(t,e,r){const n=t&&t.compressedSize?t.compressedSize:e;return n>0&&n<=r?n:r}(Z,q,$.length);ct=$.subarray(t),$=await at($.subarray(0,t),Z),nt=Wt($),q=$.length,st=!0}Z&&!st&&($.length<4||Da(nt,0)==s)&&go(c,Fi),P=U;const ut=Sa(i,n,"filenameEncoding"),lt=Sa(i,n,"commentEncoding"),ft=new Set;let dt,wt=-1;const pt=!m&&!L;!H&&pt&&(H=Ji(nt,$,Q),H&&go(c,Oi));for(let t=0;t<H;t++){const o=new qi(a,i.options);if(Q+f>$.length||Da(nt,Q)!=s){if(0==t&&!st&&(W||Xi(nt)))throw new Error(yi);throw new Error(ci)}$i(o,nt,Q+6);const u=Boolean(o.bitFlag.languageEncodingFlag),l=Q+f,d=l+o.filenameLength,w=d+o.extraFieldLength,p=xa(nt,Q+4),h=!(p>>8),m=p>>8==3,y=$.subarray(l,d),b=xa(nt,Q+32),D=w+b,F=$.subarray(w,D),O=u,I=u,U=Da(nt,Q+38),k=U&r,C={readOnly:Boolean(1&k),hidden:Boolean(2&k),system:Boolean(4&k),directory:Boolean(16&k),archive:Boolean(32&k)},v=Da(nt,Q+42),M=ga(i,n,"decodeText")||yn,N=O?Li:ut||Wi,_=I?Li:lt||Wi;let j=M(y,N,tt);if(j===T&&(j=yn(y,N)),S){const t=S(j);t!==T&&(j=t)}if(fa(j,E)){const t=new Error(bi);throw t.filename=j,t}let B=M(F,_,et);B===T&&(B=yn(F,_)),Object.assign(o,{index:t,$t:st,versionMadeBy:p,msDosCompatible:h,zip64:!1,compressedSize:0,uncompressedSize:0,te:b,offset:v,diskNumberStart:xa(nt,Q+34),internalFileAttributes:xa(nt,Q+36),externalFileAttributes:U,msdosAttributesRaw:k,msdosAttributes:C,rawFilename:y,filenameUTF8:O,commentUTF8:I,rawExtraField:$.subarray(d,w),rawComment:F,filename:j,comment:B}),ta(o,o,nt,Q+6)&&go(c,Di,j),o.offset+=G;const L=aa(a,o.diskNumberStart)+o.offset;P=Math.min(L,P),L<wt&&go(c,Ri,j),wt=L,(o.version&r)>63&&go(c,zi,j),32&~o.rawBitFlag||go(c,xi,j),ft.has(o.filename)&&(dt=!0),ft.add(o.filename);const Z=o.externalFileAttributes>>16&e;o.unixMode===T&&16877&Z&&(o.unixMode=Z);const V=Boolean(o.unixMode&R),K=Boolean(o.unixMode&z),Y=Boolean(512&o.unixMode),q=40960==((o.unixMode===T?Z:o.unixMode)&g),X=!q&&(o.unixMode!==T?!!(73&o.unixMode):m&&!!(73&Z)),J=o.unixMode!==T&&(o.unixMode&g)==A,rt=(Z&g)==A;Object.assign(o,{setuid:V,setgid:K,sticky:Y,symlink:q,unixExternalUpper:Z,executable:X,directory:J||rt||h&&C.directory||o.filename.endsWith(x),zipCrypto:o.encrypted&&!o.extraFieldAES});const ot=new ri(o);if(ot.getData=(t,e)=>o.getData(t,ot,i.Xt,e),ot.arrayBuffer=async t=>{const e=new TransformStream,r=qe(e.readable).then(t=>t.arrayBuffer());return r.catch(()=>{}),await o.getData(e,ot,i.Xt,Object.assign({},t,{preventClose:!1})),r},Q=D,t==H-1&&pt){const t=Ji(nt,$,Q);t&&(H+=t,go(c,Oi))}const{onprogress:it}=n;if(it)try{await it(t+1,H,new ri(o))}catch{}yield ot}let ht=Q,mt=Qi($.subarray(Q))||(st?Qi(ct):T);if(!mt&&!st){const t=U+Q,e=Math.min(X-t,65541);e>=6&&(mt=Qi(await Eo(a,t,e)))}mt&&(i.digitalSignature=mt,ht=Q+6+mt.length),(Q!=q&&ht!=q||!st&&Q!=I&&ht!=I)&&ba(m,c,ki),dt&&ba(m,c,Ci);const yt=Sa(i,n,"extractPrependedData"),bt=Sa(i,n,"extractAppendedData"),Et=(m||yt)&&H&&4==P&&await async function(t){const e=await sa(t);return e==o||808471376==e}(a)?4:0;return m&&(G||H&&P>Et)&&Ea(Ii),(G||H&&P>4)&&go(c,Ii),B&&go(c,Ui),yt&&(i.prependedData=P>Et?await Eo(a,Et,P-Et):N),i.comment=C?await Eo(a,k+d,C):N,bt&&(i.appendedData=v<a.size?await Eo(a,v,a.size-v):N),!0}async getEntries(t={}){const e=[];for await(const r of this.getEntriesGenerator(t))e.push(r);return e}async close(){const{reader:t}=this;t.readUint8Array||!t.readable||t.readable.locked||await t.readable.cancel()}[_](){return this.close()}}class Ki{constructor(t={}){let e;const{readable:r,writable:n}=new TransformStream({start(t){e=t}}),o=new Gi(r,t),i=o.getEntriesGenerator(),a=new Set;this.readable=new ReadableStream({async pull(t){const{done:e,value:r}=await i.next();if(e)return t.close();const n=function(t,e){const{readable:r,writable:n}=new TransformStream;let o;const i={cancel:async t=>{e.delete(i),await(o?o.cancel(t):r.cancel(t))}};return i.readable=new ReadableStream({async pull(a){o||(o=r.getReader(),e.add(i),async function(){try{await t.getData(n,{preventClose:!1})}catch(t){try{await n.abort(t)}catch{}}finally{e.delete(i)}}());const{done:s,value:c}=await o.read();s?a.close():a.enqueue(c)},cancel:t=>i.cancel(t)},{highWaterMark:0}),i}(r,a),o={...r,readable:n.readable};delete o.getData,Object.defineProperties(o,{localDirectory:{get:()=>r.localDirectory,enumerable:!0},warnings:{get:()=>r.warnings,enumerable:!0}}),t.enqueue(o)},async cancel(t){const r=Array.from(a);a.clear(),e.error(t),await Promise.allSettled(r.map(e=>e.cancel(t))),await Promise.allSettled([i.return(),o.close()])}}),this.writable=n}}async function Yi(t,e={}){if(t=new po(t),await yo(t),t.size!==T&&t.readUint8Array||(t=new Bn(await qe(t.readable)),await yo(t)),t.size<d)return!1;const r=ua(e,{}),n=r!=ot,o=da(e[J],r),{Jt:i,Qt:a}=await wa(t,n,o);if(!i||r==rt&&a>1)return!1;const s=xa(Wt(i),20),c=i.offset+d+s;return t.size-c<=o}let qi=class{constructor(t,e){Object.assign(this,{reader:t,options:e})}async getData(t,e,o,a={}){const s=this,c=Ut(),{reader:u,index:l,offset:f,diskNumberStart:d,extraFieldAES:w,extraFieldZip64:p,compressionMethod:h,bitFlag:m,rawBitFlag:y,crc32:b,rawLastModDate:E,uncompressedSize:S,compressedSize:g}=s,{dataDescriptor:A}=m,R=e.localDirectory={},z=e.warnings=[],x=aa(u,d)+f,F=await Eo(u,x,D),O=Wt(F);let I=Sa(s,a,j),U=Sa(s,a,B);const k=ht(Sa(s,a,P)),C=Boolean(k),v=!0===k;if(pt(I,U),I=I&&I.length&&I,U=U&&U.length&&U,w&&99!=w.originalCompressionMethod)throw new Error(tr);if(F.length<D||Da(O,0)!=n)throw new Error(ui);$i(R,O,4);const{extraFieldLength:M,filenameLength:_}=R,G=R.dataOffset=x+D+_+M,K=Sa(s,a,"checkLocalDirectory"),Y=ua(a,s.options),q=function(t,e){return t===T?e!=ot:Boolean(t)}(K,Y),X=Sa(s,a,"checkLocalFilename"),J=function(t,e){return t===T?e==rt:Boolean(t)}(X===T?K:X,Y);let Q=N;if(J&&(_||M)){const t=await Eo(u,x+D,_+M);Q=t.subarray(0,_),R.rawExtraField=t.subarray(_)}else R.rawExtraField=M?await Eo(u,x+D+_,M):N;J&&(R.rawFilename=Q),ta(s,R,O,4,!0)&&go(z,Di),function(t,e,r,n,o){const{rawFilename:i}=t,a=!o,s=t.$t&&!(8192&~e.rawBitFlag);!n||s||r.length==i.length&&!r.some((t,e)=>t!=i[e])||ba(a,o,Ni),(2057&e.rawBitFlag)!=(2057&t.rawBitFlag)&&ba(a,o,_i),e.compressionMethod!=t.compressionMethod&&ba(a,o,ji),e.bitFlag.dataDescriptor||s||!(e.crc32||e.compressedSize||e.uncompressedSize)||e.crc32==t.crc32&&e.compressedSize==t.compressedSize&&e.uncompressedSize==t.uncompressedSize||ba(a,o,Bi)}(s,R,Q,J,q?T:z);const{lastAccessDate:$,creationDate:tt,uid:et,gid:nt}=R;$&&(e.lastAccessDate=$),tt&&(e.creationDate=tt),et!==T&&e.uid===T&&(e.uid=et),nt!==T&&e.gid===T&&(e.gid=nt);const it=Sa(s,a,"checkPasswordOnly"),at=s.encrypted&&R.encrypted&&(!v||it),st=at&&!w;if(v||(e.zipCrypto=st),at&&!(64&~R.rawBitFlag))throw new Error(di);const ct=C?T:ar(h);if(0!=h&&8!=h&&9!=h&&!ct&&!C)throw new Error(tr);if(at){if(!st&&(w.strength<1||w.strength>3))throw new Error(di);if(!I&&!U)throw new Error(fi)}if(G+g>u.size)throw new Error(hi);const ut=g,lt=Ye(u.createReadable({offset:G,size:ut})),ft=dt(Sa(s,a,L));wt(ft);let mt=Sa(s,a,"checkOverlappingEntry");const yt=Sa(s,a,"checkOverlappingEntryOnly");yt&&(mt=!0);const{onstart:bt,onprogress:Et,onend:St}=a,gt=0!=h&&!C,At=C?g-oi(at,st,w&&w.strength):S,Rt=9==h;let zt=Sa(s,a,Z);Rt&&(zt=!1);const xt=Sa(s,a,"checkCrc32"),Dt=(xt===T?Sa(s,a,"checkSignature"):xt)&&!C&&(!at||st||w&&1==w.vendorVersion),Ft={options:{codecType:Ir,password:I,rawPassword:U,zipCrypto:st,encryptionStrength:w&&w.strength,checkCrc32:Dt,checkAuthenticationCode:Sa(s,a,"checkAuthenticationCode"),passwordVerification:st&&(A?E>>>8&r:b>>>24&r),outputSize:At,crc32:b,compressed:gt,encrypted:at,useWebWorkers:Sa(s,a,W),useCompressionStream:zt,transferStreams:Sa(s,a,V),deflate64:Rt,format:ct?ct.format:T,codecURI:ct?ct.codecURI:T,compressionMethod:h,rawBitFlag:y,checkPasswordOnly:it},config:c,ft:{signal:ft,size:ut,onstart:bt,onprogress:Et,onend:St}};let Ot,Tt,It;mt&&await async function({reader:t,ee:e,index:r,offset:n,crc32:o,compressedSize:a,uncompressedSize:s,dataOffset:c,dataDescriptor:u,extraFieldZip64:l,Xt:f}){let d=0;if(u&&(d=l?20:12),d){const r=await Eo(t,c+a,d+4),n=Wt(r);let u=r.length==d+4&&Da(n,0)==i;if(u){const t=ia(n,4,l);(e.encrypted&&!e.zipCrypto||t.crc32==o)&&t.compressedSize==a&&t.uncompressedSize==s?d+=4:u=!1}if(r.length>=d){const t=ia(n,u?4:0,l);t.signature=u,e.localDirectory.dataDescriptor=t}}const w={start:n,end:c+a+d,ee:e};for(const[t,e]of f)if(t!=r&&w.start<e.end&&e.start<w.end){const t=new Error(pi);throw t.overlappingEntry=e.ee,t}f.set(r,w)}({reader:u,ee:e,index:l,offset:x,crc32:b,compressedSize:g,uncompressedSize:S,dataOffset:G,dataDescriptor:A||R.bitFlag.dataDescriptor,extraFieldZip64:p||R.extraFieldZip64,Xt:o});try{if(!yt){it&&(t=new WritableStream),t=new ho(t),await yo(t,function(t,e,r){return Math.min(t,r?1032*e:e)}(At,g,gt)),({writable:Ot}=t);const{outputSize:e}=await ln({readable:lt,writable:Ot},Ft);if(e!=At)throw Object.assign(new Error(lr),{outputSize:e});t.size+=e}}catch(e){const{outputSize:r}=Ft;if(r!==T?t.size+=r:Zt(e)&&e.outputSize!==T&&(t.size+=e.outputSize),!it||!Zt(e)||e.message!=ue)throw Tt=e,It=!0,e}finally{if((mo(t)||!Sa(s,a,H))&&Ot&&!Ot.locked){const t=Ot.getWriter();if(It)try{await t.abort(Tt)}catch{}else await t.close()}}return it||yt?T:t.getData?t.getData():Ot}};function Xi(t){const e=Math.min(t.byteLength,1024)-3;for(let r=0;r<e;r++)if(134630224==Da(t,r))return!0;return!1}function Ji(t,e,r){let n=0;for(;r+f<=e.length&&Da(t,r)==s;)r+=f+xa(t,r+28)+xa(t,r+30)+xa(t,r+32),n++;return n%65536?0:n}function Qi(t){if(t.length>=6){const e=Wt(t);if(Da(e,0)==a){const r=xa(e,4);if(6+r<=t.length)return t.subarray(6,6+r)}}}function $i(t,e,r){const n=t.rawBitFlag=xa(e,r+2),o=!(1&~n),i=Da(e,r+6);Object.assign(t,{encrypted:o,version:xa(e,r),bitFlag:{level:(6&n)>>1,dataDescriptor:!(8&~n),languageEncodingFlag:(n&S)==S},rawLastModDate:i,lastModDate:Aa(i),filenameLength:xa(e,r+22),extraFieldLength:xa(e,r+24)})}function ta(t,e,r,n,o){const{rawExtraField:i}=e,a=e.extraField=new Map,s=Wt(i);let c=0,u=!1;try{for(;c<i.length;){const t=xa(s,c),e=xa(s,c+2);a.set(t,{type:t,data:i.slice(c+4,c+4+e)}),c+=4+e}}catch{u=!0}c>i.length&&(u=!0);const l=xa(r,n+4);Object.assign(e,{signature:Da(r,n+10),crc32:Da(r,n+10),compressedSize:Da(r,n+14),uncompressedSize:Da(r,n+18)});const f=a.get(1);f&&(function(t,e){e.zip64=!0;const r=Wt(t.data),n=Zi.filter(([t,r])=>e[t]==r),o=n.reduce((t,[,e])=>t+Vi[e].bytes,0);if(t.data.length<o)throw new Error(li);for(let o=0,i=0;o<n.length;o++){const[a,s]=n[o],c=Vi[s];e[a]=t[a]=c.qt(r,i),i+=c.bytes}}(f,e),e.extraFieldZip64=f);const d=a.get(28789);d&&(ea(d,Ao,Ro,e,t),e.extraFieldUnicodePath=d);const w=a.get(25461);w&&(ea(w,zo,xo,e,t),e.extraFieldUnicodeComment=w);const p=a.get(h);p&&p.data.length>=7?(function(t,e,r){const n=Wt(t.data),o=za(n,4);Object.assign(t,{vendorVersion:za(n,0),vendorId:za(n,2),strength:o,originalCompressionMethod:r,compressionMethod:xa(n,5)}),e.compressionMethod=t.compressionMethod,1!=t.vendorVersion&&(e.crc32=T)}(p,e,l),e.extraFieldAES=p):e.compressionMethod=l;const S=a.get(13);S&&(ra(S,e),e.extraFieldPkwareUnix=S);const g=a.get(22613);g&&(ra(g,e),e.extraFieldUnixType1=g);const A=a.get(10);A&&(function(t,e){const r=Wt(t.data);let n,o=4;try{for(;o<t.data.length&&!n;){const e=xa(r,o),i=xa(r,o+2);1==e&&(n=t.data.slice(o+4,o+4+i)),o+=4+i}}catch{}if(n&&24==n.length){const r=Wt(n),o=r.getBigUint64(0,!0),i=r.getBigUint64(8,!0),a=r.getBigUint64(16,!0);Object.assign(t,{rawLastModDate:o,rawLastAccessDate:i,rawCreationDate:a});const s={lastModDate:Ra(o),lastAccessDate:Ra(i),creationDate:Ra(a)};Object.assign(t,s),Object.assign(e,s,{rawLastAccessDate:i,rawCreationDate:a})}}(A,e),e.extraFieldNTFS=A);const R=a.get(E);let z;if(R&&(z=na(R,e,!1),e.extraFieldUnix=R),!z){const t=a.get(b);t&&(na(t,e,!0),e.extraFieldInfoZip=t)}const x=a.get(m);x&&(function(t,e,r){if(!t.data.length)return;const n=Wt(t.data),o=za(n,0),i=[],a=[];r?(1&~o||(i.push(Io),a.push(Uo)),2&~o||(i.push(ko),a.push(Co)),4&~o||(i.push(vo),a.push(Mo))):t.data.length>=5&&(i.push(Io),a.push(Uo));let s=1;i.forEach((r,o)=>{if(t.data.length>=s+4){const i=Da(n,s);e[r]=t[r]=new Date(1e3*(0|i));const c=a[o];t[c]=i}s+=4})}(x,e,o),e.extraFieldExtendedTimestamp=x);const D=a.get(y);return D&&(e.extraFieldUSDZ=D),u}function ea(t,e,r,n,o){if(t.data.length<5)return void(t.valid=!1);const i=Wt(t.data),a=new $t;a.append(o[r]);const s=Wt(new Uint8Array(4));s.setUint32(0,a.get(),!0);const c=Da(i,1),u=za(i,0);Object.assign(t,{version:u,[e]:yn(t.data.subarray(5)),valid:1==u&&!o.bitFlag.languageEncodingFlag&&c==Da(s,0)}),t.valid&&(n[e]=t[e],n[e+"UTF8"]=!0)}function ra(t,e){if(t.data.length<8)return;const r=Wt(t.data),n={lastAccessDate:new Date(1e3*(0|Da(r,0))),lastModDate:new Date(1e3*(0|Da(r,4)))};t.data.length>=12&&(n.uid=xa(r,8),n.gid=xa(r,10)),Object.assign(t,n),Object.assign(e,n)}function na(t,e,r){try{const n=Wt(t.data);let o,i;if(r){let e=0;const r=za(n,e++),a=za(n,e++);o=oa(t.data.subarray(e,e+a)),e+=a;const s=za(n,e++);i=oa(t.data.subarray(e,e+s)),Object.assign(t,{version:r,uid:o,gid:i})}else t.data.length>=4&&(o=xa(n,0),i=xa(n,2),Object.assign(t,{uid:o,gid:i}));return o!==T&&(e.uid=o),i!==T&&(e.gid=i),o!==T||i!==T}catch{}}function oa(t){const e=new Uint8Array(4);return e.set(t,0),new DataView(e.buffer,e.byteOffset,4).getUint32(0,!0)}function ia(t,e,r){const n=Da(t,e);let o,i;return r?(o=Fa(t,e+4),i=Fa(t,e+12)):(o=Da(t,e+4),i=Da(t,e+8)),{crc32:n,compressedSize:o,uncompressedSize:i}}function aa(t,e){return t.Yt?t.Yt(e):0}async function sa(t){return Da(Wt(await Eo(t,0,4)))}function ca(t){return t===rt||t===nt||t===ot}function ua(t,e){return la(t,la(e,nt))}function la(t,e){const r=t.strictness;if(r!==T){if(!ca(r))throw new Error(Ei);return r}const n=t.checkAmbiguity;return n===T?e:n?rt:e==ot?ot:nt}function fa(t,e){if(e==ot)return!1;const r=t.split("/");return r.length>1&&""===r[r.length-1]&&r.pop(),!!(r.includes("..")||t.startsWith("/")||t.startsWith("\\\\")||Pi.test(t))||e==rt&&(r.includes(".")||r.includes(""))}function da(t,r){if(t!==T){const e=bt(t);if("number"!=typeof e||Number.isNaN(e)||e<0)throw new Error(gi);return e}return r==rt?0:r==ot?1/0:e}async function wa(t,e,r){const{size:n}=t,o=Math.min(n,65557),i={count:64};let a,s,c=0;for await(const[r,u,l,f,w]of pa(t,o)){const o=xa(r,f+20);if(w+d+o==n){const o=await ma(t,r,u,f,w,n,i);if(2==o){if(a||(a=ha(l,f,w)),c++,!e||c>1)break}else 1!=o||s||(s=ha(l,f,w))}}return a||(a=s),a||(a=await async function(t,e,r){const{size:n}=t,o=Math.min(n,e==1/0?n:65557+e);let i,a;for await(const[e,s,c,u,l]of pa(t,o)){const o=ha(c,u,l);i||(i=o);const f=await ma(t,e,s,u,l,n,r);if(2==f)return o;1!=f||a||(a=o)}return a||i}(t,r,i)),{Jt:a,Qt:c}}async function*pa(t,e){const r=t.size-e,n=await Eo(t,r,e),o=Wt(n);for(let t=n.length-d;t>=0;t--)Da(o,t)==c&&(yield[o,r,n,t,r+t])}function ha(t,e,r){return{offset:r,buffer:t.slice(e,e+d).buffer}}async function ma(r,n,o,i,a,c,u){const f=xa(n,i+10),d=Da(n,i+12),p=Da(n,i+16);if(f==e||d==t||p==t)return await ya(r,n,o,a-w,c,u)==l?2:0;if(!f&&!d)return 1;const h=xa(n,i+6);for(const t of[a-d,aa(r,h)+p])if(await ya(r,n,o,t,c,u)==s)return 2;return 0}async function ya(t,e,r,n,o,i){return n<0||n+4>o?T:n>=r?Da(e,n-r):i.count>0?(i.count--,Da(Wt(await Eo(t,n,4)),0)):T}function ba(t,e,r){t?Ea(r):go(e,r)}function Ea(t){const e=new Error(mi);throw e.reason=t,e}function Sa(t,e,r){return e[r]===T?t.options[r]:e[r]}function ga(t,e,r){return ft(Sa(t,e,r))}function Aa(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 Ra(t){return new Date(Number(t/BigInt(1e4)-BigInt(116444736e5)))}function za(t,e){return t.getUint8(e)}function xa(t,e){return t.getUint16(e,!0)}function Da(t,e){return t.getUint32(e,!0)}function Fa(t,e){const r=t.getBigUint64(e,!0);if(r>Hi)throw new Error(Ai);return Number(r)}var Oa=Object.freeze({__proto__:null,ERR_AMBIGUOUS_ARCHIVE:mi,ERR_BAD_FORMAT:ii,ERR_CENTRAL_DIRECTORY_NOT_FOUND:ci,ERR_ENCRYPTED:fi,ERR_ENCRYPTED_CENTRAL_DIRECTORY:yi,ERR_ENTRY_DATA_OUT_OF_BOUNDS:hi,ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND:si,ERR_EOCDR_NOT_FOUND:ai,ERR_EXTRAFIELD_ZIP64_NOT_FOUND:li,ERR_INVALID_AUTHENTICATION_CODE:ce,ERR_INVALID_COMPRESSED_DATA:fr,ERR_INVALID_CRC32:dr,ERR_INVALID_FILENAME_VALIDATION:Si,ERR_INVALID_MAX_APPENDED_DATA_SIZE:gi,ERR_INVALID_PASSWORD:se,ERR_INVALID_STRICTNESS:Ei,ERR_INVALID_UNCOMPRESSED_SIZE:lr,ERR_LOCAL_FILE_HEADER_NOT_FOUND:ui,ERR_OVERLAPPING_ENTRY:pi,ERR_SPLIT_ZIP_FILE:wi,ERR_UNSAFE_FILENAME:bi,ERR_UNSUPPORTED_COMPRESSION:tr,ERR_UNSUPPORTED_ENCRYPTION:di,ERR_UNSUPPORTED_UINT64:Ai,ERR_WORKER_STARTUP_TIMEOUT:Cr,WARNING_APPENDED_DATA:Ti,WARNING_COMPRESSED_PATCHED_DATA:xi,WARNING_DUPLICATE_FILENAME:Ci,WARNING_MALFORMED_EXTRA_FIELD:Di,WARNING_MISMATCHED_LOCAL_FILE_HEADER_BIT_FLAG:_i,WARNING_MISMATCHED_LOCAL_FILE_HEADER_COMPRESSION_METHOD:ji,WARNING_MISMATCHED_LOCAL_FILE_HEADER_CRC32_OR_SIZES:Bi,WARNING_MISMATCHED_LOCAL_FILE_HEADER_FILENAME:Ni,WARNING_MISMATCHED_ZIP64_END_OF_CENTRAL_DIRECTORY:vi,WARNING_MULTIPLE_END_OF_CENTRAL_DIRECTORY:Mi,WARNING_PREPENDED_CENTRAL_DIRECTORY:Ui,WARNING_PREPENDED_DATA:Ii,WARNING_TRAILING_CENTRAL_DIRECTORY_DATA:ki,WARNING_UNKNOWN_VERSION:zi,WARNING_UNKNOWN_ZIP64_EXTENSIBLE_DATA:Fi,WARNING_UNSORTED_CENTRAL_DIRECTORY:Ri,WARNING_WRAPPED_ENTRIES_COUNT:Oi,ZipReader:Gi,ZipReaderStream:Ki,isZipFile:Yi});const Ta="File already exists",Ia="Zip file comment exceeds 64KB",Ua="Invalid zip file comment (must be a Uint8Array)",ka="File entry comment exceeds 64KB",Ca="Invalid file entry comment (must be a string)",va="Invalid date (must be a valid Date instance)",Ma="File entry name exceeds 64KB",Na="Version exceeds 65535",_a="The strength must equal 1, 2, or 3",ja="Encryption is not supported in USDZ files",Ba="Split zip files are not supported in USDZ files",Pa="Encryption is not supported when the 'passThrough' option is set to true (use 'compressed' instead)",La="Invalid extra field (must be a Map)",Wa="Invalid extra field type (must be integer 0..65535)",Za="Invalid extra field data (must be a Uint8Array)",Va="Extra field data exceeds 64KB",Ha=-2147483648,Ga=2147483647,Ka=BigInt(0),Ya=BigInt("0x7fffffffffffffff"),qa="Zip64 is not supported (set the 'zip64' option to 'true')",Xa="Undefined uncompressed size",Ja="Undefined compression method",Qa="Undefined CRC32",$a="Undetermined size",ts="Undefined reader",es="Invalid reader (must be a Reader instance, a ReadableStream instance, or an object with a 'readable' property)",rs="Zip file not empty",ns="Invalid uid (must be integer 0..2^32-1)",os="Invalid gid (must be integer 0..2^32-1)",is="Invalid UNIX mode (must be integer 0..65535)",as="Invalid unixExtraFieldType (must be 'infozip' or 'unix')",ss="uid/gid must be 0..65535 for unixExtraFieldType 'unix' (use 'infozip' for larger ids)",cs="Invalid msdosAttributesRaw (must be integer 0..255)",us="Invalid msdosAttributes (must be an object with boolean flags)",ls="Invalid level (must be integer 0..9)",fs="Signature data exceeds 64KB",ds="Invalid entry option (must be an entry returned by ZipReader#getEntries())",ws="The last modification date of an entry encrypted with ZipCrypto cannot be changed when passThrough is set",ps="compression unavailable",hs="clamped last modification date",ms=new Uint8Array([7,0,2,0,65,69,3,0,0]),ys="infozip",bs="unix",Es=[8,9,5,3];let Ss=0;const gs=[];class As{constructor(t,e={}){t=new ho(t);const{availableSize:r=I,maxSize:n=I}=t,o=r>0&&r!==I&&n>0&&n!==I;if(o&&e[X])throw new Error(Ba);Object.assign(this,{writer:t,re:o,options:e,ne:new Map,oe:new Set,offset:e[q]===T?t.size||t.writable.size||0:e[q],ie:e[q]===T?0:e[q]-(t.size||t.writable.size||0),ae:new Set,se:[],warnings:[],ce:0,ue:0,le:T,fe:!1})}prependZip(t){return Ds(this,async function(t,e){if(t.oe.size)throw new Error(rs);await t.de(e)}(this,t))}appendZip(t){return Ds(this,this.de(t))}async de(t){const e=this,{ae:r,oe:n,ne:i}=e;for(;r.size;)await Promise.allSettled(Array.from(r));let a;const s=new Promise(t=>a=t);r.add(s);const c=[];let u;try{t=new po(t),await yo(t),t.size!==T&&t.readUint8Array||(t=new Bn(await qe(t.readable)),await yo(t));const{ZipReader:r}=await Promise.resolve().then(function(){return Oa}),a=new r(t),s=await a.getEntries();await a.close(),await yo(e.writer);const{directoryOffset:l}=a;s.forEach(({filename:t})=>{if(n.has(t))throw new Error(Ta);n.add(t),c.push(t)}),e.we=!0;const{pe:f}=e;e.pe=new Promise(t=>u=()=>{e.we=!1,t()}),await f,e.re&&(delete e.re,await async function(t){return Wt(await Eo(t,0,4)).getUint32(0,!0)==o}(t)||(await Js(e.writer,qs()),e.offset+=4));const d=await async function(t,e,r,n){const{writer:o}=t,i=new Map;if(o.closeDisk){const a=Array.from(r).sort((t,r)=>Ys(e,t)-Ys(e,r));let s=0;for(const r of a){const n=Ys(e,r);await Gs(t,e,s,n-s),Zs(o,await Ks(e,n))&&await o.closeDisk(),i.set(r,{offset:Vs(t,o),diskNumberStart:Ls(o)}),s=n}await Gs(t,e,s,n-s)}else{const o=t.offset;await Gs(t,e,0,n),r.forEach(t=>i.set(t,{offset:o+Ys(e,t),diskNumberStart:0}))}return i}(e,t,s,l);s.forEach(t=>{const{version:e,rawLastModDate:r,rawFilename:n,bitFlag:o,encrypted:a,uncompressedSize:s,compressedSize:c,extraFieldZip64:u}=t;let{compressionMethod:l,rawExtraField:f}=t;const{level:w,languageEncodingFlag:p,dataDescriptor:h}=o;f=Hs(f||N),t.extraFieldAES&&(l=99);const m=wc(f),y=Boolean(u)&&u.uncompressedSize!==T,b=Boolean(u)&&u.compressedSize!==T,E=-7&mc(w,p,h,a,l)|w<<1,{he:S,me:g}=pc({version:e,bitFlag:E,compressionMethod:l,uncompressedSize:s,compressedSize:c,rawLastModDate:r,rawFilename:n,ye:b,be:y,extraFieldLength:m}),{crc32:A}=t;A!==T&&lc(g,10,A);const{offset:R,diskNumberStart:z}=d.get(t);Object.assign(t,{Ee:!0,be:y,ye:b,offset:R,diskNumberStart:z,Se:!1,ge:N,Ae:N,Re:N,ze:N,xe:N,rawExtraField:f,De:N,extendedTimestamp:!1,he:S,me:g}),i.set(t.filename,t)})}catch(t){throw c.forEach(t=>n.delete(t)),t}finally{a(),r.delete(s),u&&u()}}add(e="",n,o={}){const i=this,{ae:a}=i,s=async function(e,n,o,i){const a=(i=Object.assign({},i))[$];if(a!==T){const{Fe:t,Oe:r}=Ts(a,ht(rc(e,i,P)),rc(e,i,Io));delete i[$],i=Object.assign(t,r,i)}if(rc(e,i,Go)&&!n.endsWith(x)&&(n+=x),e.oe.has(n))throw new Error(Ta);e.oe.add(n),Ss<Ut().maxWorkers?Ss++:await new Promise(t=>gs.push(t));try{return await async function(e,n,o,i){const a=Is(e,n,i);({name:n}=a);const s=Us(e,n,i),{comment:c}=s,u=i[Xo];e.ne.set(n,T);const l=e.le,f={};let d,w;s.Te.keepOrder&&(f.Ie=new Promise(t=>d=t)),e.le=f;try{const{Te:c}=s;0==c.level||c.compressionMethod!==T||c.Ue||await jr(Ut())||(c.level=0,go(e.warnings,ps,n));const u=await async function(t,e,{Te:r},n){if(r.Ue&&!e&&!rc(t,n,Go))throw new Error(ts);let o;if(e){if(e=new po(e),await yo(e),!e.readable&&!e.readUint8Array)throw new Error(es);({size:o}=e)}return Object.assign({reader:e},Cs(t,Boolean(e),o,r,n))}(e,o,s,i);({reader:o}=u);const p=Ws(e.writer),h=Ls(e.writer);let m=i.crc32===T?i[qo]:i.crc32;const y=u.Te.encrypted&&!c.zipCrypto;if(c.Ue&&!c.ke&&y&&(m=T),c.Ue&&o&&!y&&m===T)throw new Error(Qa);const b=Ms(i=Object.assign({},i,a.Te,s.Te,u.Te,{signature:i[qo],crc32:m,offset:e.offset-p,diskNumberStart:h,[X]:e.options[X]}));b.Ce&&go(e.warnings,hs,n);const E=js(i),S=wc(b.ve,E.Me);w=await async function(e,n,o,i,a){const{ne:s,writer:c}=e,{keepOrder:u,dataDescriptor:l,Ne:f,signal:d}=a,{_e:w,ee:p,je:h,Be:m}=i,y=e.options[X];let b,E,S,g,A,R,z,x=p,F=0;const O=u&&h?h.Ie:T;s.set(n,x);try{a.bufferedWrite||!u||e.we||e.ce||e.ue||!l&&!f?(b=!0,e.ce++,z=a.createTempStream?await a.createTempStream():new TransformStream(T,T,{highWaterMark:I}),z.size=0,await yo(c)):(E=!0,e.ue++,z=c,await O,await U()),await yo(z);const p=Ws(c);e.re&&!b&&await Xs(e,c),y&&!b&&Ns(i,e.offset-p);const{ve:h}=w;b||await k();const m=Ls(c),S=Vs(e,c);if(x.diskNumberStart=m,b||(A=!0,R=c.size,await Js(z,h)),x=await async function(e,n,{diskNumberStart:o,Ie:i},a,s,c){const{_e:u,Pe:l,Le:f}=a,{he:d,me:w,lastModDate:p,rawLastModDate:h,encrypted:m,compressed:y,version:b,compressionMethod:E,ge:S,We:g,Re:A,Ze:R,Ve:z,ze:x,xe:D,Ae:F}=u,{Me:O}=l,{rawFilename:I,lastAccessDate:U,creationDate:k,password:C,rawPassword:v,level:M,useUnicodeFileNames:N,zip64:_,Ee:j,be:B,ye:P,zipCrypto:L,dataDescriptor:W,directory:Z,executable:V,versionMadeBy:H,rawComment:G,rawExtraField:K,De:Y,useWebWorkers:q,transferStreams:X,onstart:J,onprogress:Q,onend:$,signal:tt,encryptionStrength:et,extendedTimestamp:rt,msDosCompatible:nt,internalFileAttributes:ot,externalFileAttributes:it,uid:at,gid:st,unixMode:ct,symlink:ut,setuid:lt,setgid:ft,sticky:dt,unixExternalUpper:wt,msdosAttributesRaw:pt,msdosAttributes:ht,useCompressionStream:mt,Ue:yt,ke:bt,format:Et,codecURI:St}=c,gt={Ie:i,versionMadeBy:H,zip64:_,Ee:j,directory:Boolean(Z),executable:Boolean(V),filenameUTF8:Boolean(N),rawFilename:I,commentUTF8:Boolean(N),rawComment:G,ge:S,We:g,Re:A,ze:x,xe:D,Ae:F,rawExtraField:K,De:Y,extendedTimestamp:rt,msDosCompatible:nt,internalFileAttributes:ot,externalFileAttributes:it,diskNumberStart:o,uid:at,gid:st,unixMode:ct,symlink:Boolean(ut),setuid:lt,setgid:ft,sticky:dt,unixExternalUpper:wt,msdosAttributesRaw:pt,msdosAttributes:ht};let{crc32:At,uncompressedSize:Rt}=c,zt=0;yt||(Rt=0);const{writable:xt}=n;if(e){const o=e.size,i=Ye(So(e,{size:o})),a={options:{codecType:Tr,inputSize:o,level:M,rawPassword:v,password:C,encryptionStrength:et,zipCrypto:m&&L,passwordVerification:m&&L&&h>>8&r,computeCrc32:!yt,compressed:y&&!yt,encrypted:m&&!bt,useWebWorkers:q,useCompressionStream:mt,transferStreams:X,format:Et,codecURI:St,compressionMethod:E},config:s,ft:{signal:tt,size:o,onstart:J,onprogress:Q,onend:$}};try{const e=await ln({readable:i,writable:xt},a);if(zt=e.outputSize,n.size+=zt,yt||(Rt=e.inputSize,m&&!L||(At=e.crc32)),!P&&zt>=t||!B&&Rt>=t)throw new Error(qa)}catch(t){const{outputSize:e}=a;throw e!==T?n.size+=e:Zt(t)&&t.outputSize!==T&&(n.size+=t.outputSize),t}}return function({crc32:t,compressedSize:e,uncompressedSize:r,_e:n,Pe:o},{zip64:i,zipCrypto:a,Ue:s,dataDescriptor:c}){const{me:u,encrypted:l}=n,{He:f,Ge:d}=o;l&&!a&&!s||t===T||(lc(u,10,t),c&&lc(f,d,t)),i?c&&(fc(f,d+4,BigInt(e)),fc(f,d+12,BigInt(r))):(lc(u,14,e),lc(u,18,r),c&&(lc(f,d+4,e),lc(f,d+8,r)))}({crc32:At,compressedSize:zt,uncompressedSize:Rt,_e:u,Pe:l},c),W&&await Js(n,O),Object.assign(gt,{uncompressedSize:Rt,compressedSize:zt,lastModDate:p,rawLastModDate:h,creationDate:k,lastAccessDate:U,encrypted:Boolean(m),zipCrypto:Boolean(L),size:f+zt,compressionMethod:E,version:b,he:d,me:w,signature:At,crc32:!m||L||yt?At:T,Ze:R,Ve:z,be:B,ye:P}),gt}(o,z,x,i,Ut(),a),b||(A=!1),s.set(n,x),x.filename=n,b){if(await Promise.all([z.writable.getWriter().close(),O]),await U(),e.re&&await Xs(e,c),g=!0,R=c.size,await k(),x.diskNumberStart=Ls(c),x.offset=Vs(e,c),y){const t=i.Le;Ns(i,e.offset-Ws(c)),x.size+=i.Le-t}!function({rawFilename:t,encrypted:e,zip64:r,We:n,crc32:o,compressedSize:i,uncompressedSize:a,be:s,ye:c},u,{dataDescriptor:l,Ue:f}){if(l||((!e||f&&o!==T)&&lc(u,14,o),c||lc(u,18,i),s||lc(u,22,a)),r&&n){const e=D+wc(t)+4;fc(u,e,BigInt(a)),fc(u,e+8,BigInt(i))}}(x,w.Ke,a),await Js(c,w.ve),await Qs(z.readable,c,d,t=>F+=t),c.size+=z.size,g=!1}else x.diskNumberStart=m,x.offset=S;return e.offset+=x.size,x}catch(t){if(g||A){if(e.hasCorruptedEntries=!0,t)try{t.corruptedEntry=!0}catch{}e.offset+=c.size-R,b&&(e.offset+=F)}throw s.delete(n),t}finally{if(b&&e.ce--,E&&e.ue--,m&&m(O),S&&S(),b&&z&&z.dispose)try{await z.dispose()}catch{}}async function U(){e.we=!0;const{pe:t}=e;e.pe=new Promise(t=>S=()=>{e.we=!1,t()}),await t}async function k(){Zs(c,wc(w.ve))&&await c.closeDisk()}}(e,n,o,{_e:b,Pe:E,Le:S,ee:f,je:l,Be:d},i)}catch(t){throw e.ne.delete(n),t}finally{d&&d(l&&l.Ie)}return Object.assign(w,{name:n,comment:c,extraField:u}),new ri(w)}(e,n,o,i)}catch(t){throw e.oe.delete(n),t}finally{const t=gs.shift();t?t():Ss--}}(i,e,n,o);a.add(s);const c=()=>a.delete(s);return Promise.prototype.then.call(s,c,c),Ds(i,s)}remove(t){const{oe:e,ne:r}=this;if(typeof t==v&&(t=r.get(t)),t&&t.filename!==T){const{filename:n}=t;if(e.has(n)&&r.has(n))return e.delete(n),r.delete(n),!0}return!1}async close(r=N,n={}){const o=this,{ae:i,writer:w}=this,{writable:p}=w;if(o.fe)return xs(w);if(!(r instanceof Uint8Array))throw new Error(Ua);if(wc(r)>e)throw new Error(Ia);for(;i.size;)await Promise.allSettled(Array.from(i));await Promise.allSettled(o.se.map(t=>t.Ye));const h=o.se.filter(t=>t.qe&&!t.Xe);if(h.length){const t=h.map(t=>t.error);h.forEach(t=>t.Xe=!0);const[e]=t;try{e.entryErrors=t}catch{}throw e}return await async function(r,n,o){const{Je:i,Qe:w}=Bs(r.ne),{$e:p,er:h,rr:m}=await async function(r,n,o){const{ne:i,writer:a}=r,c=new Uint8Array(n);await yo(a);let u=0,l=0,d=Ls(a),w=Ws(a),p=0;for(const[r,n]of Array.from(i.values()).entries()){const{offset:h,rawFilename:m,ge:y,Ae:b,Re:E,ze:S,xe:g,rawExtraField:A,De:R,rawComment:z,versionMadeBy:x,he:D,me:F,be:O,ye:T,Se:I,nr:U,internalFileAttributes:k,externalFileAttributes:C,diskNumberStart:v,uncompressedSize:M,compressedSize:N}=n,_=wc(y,b,E,S,g,A,R),j=f+wc(m,z)+_;Zs(a,u+j-l)&&(await Js(a,c.slice(l,u)),l=u,p=0,await a.closeDisk()),0==r&&(d=Ls(a),w=Ws(a)),O||lc(F,18,M),T||lc(F,14,N),(U||I)&&n.version<45&&uc(F,0,45);const B=Ps(j);if(B.ir(s),B.ar(x),B.sr(D.subarray(0,24)),B.ar(_),B.ar(wc(z)),B.ar(I?e:v),B.ar(k),B.ir(C),B.ir(U?t:h),B.sr(m),B.sr(y),B.sr(b),B.sr(E),B.sr(S),B.sr(g),B.sr(A),B.sr(R),B.sr(z),dc(c,B.Zt,u),u+=j,p++,o.onprogress)try{await o.onprogress(r+1,i.size,new ri(n))}catch{}}return await Js(a,l?c.slice(l):c),{$e:{diskNumber:d,diskOffset:w},er:{diskNumber:Ls(a),cr:p},rr:c}}(r,i,o),y=await async function(t,r,n){const o=oc(t,n,Q);if(o){const n=await o(r),i=wc(n);if(i>e)throw new Error(fs);const s=Ps(6+i);s.ir(a),s.ar(i),s.sr(n);const{writer:c}=t;return Zs(c,wc(s.Zt))&&await c.closeDisk(),await Js(c,s.Zt),6+i}return 0}(r,m,o);await async function(r,n,o,i){const{writer:a}=r,{$e:s,er:f,ur:w,Qe:p}=i;let{Je:h}=i,m=r.ne.size,y=s.diskNumber,b=Vs(r,s);const E=wc(n);if(E>e)throw new Error(Ia);let S=rc(r,o,Lo),g=Ls(a);if(Zs(a,(S?98:d)+E)&&g++,b>=t||h>=t||m>=e||g>=e){if(!1===S)throw new Error(qa);S=!0}else S===T&&p&&(S=!0);const A=Ps(S?98:d);Zs(a,wc(A.Zt)+E)&&await a.closeDisk(),g=Ls(a);let R=g==f.diskNumber?f.cr:0;S&&(A.ir(u),A.lr(44),A.ar(45),A.ar(45),A.ir(g),A.ir(y),A.lr(R),A.lr(m),A.lr(h),A.lr(b),A.ir(l),A.ir(g),A.lr(BigInt(Vs(r,a))+BigInt(h)+BigInt(w)),A.ir(g+1),rc(r,o,"supportZip64SplitFile",!0)&&(g=e,y=e),R=e,m=e,b=t,h=t),A.ir(c),A.ar(g),A.ar(y),A.ar(R),A.ar(m),A.ir(h),A.ir(b),A.ar(E),await Js(a,A.Zt),E&&await Js(a,n)}(r,n,o,{$e:p,er:h,Je:i,ur:y,Qe:w})}(o,r,n),o.fe=!0,!mo(w)&&rc(o,n,H)||await p.getWriter().close(),xs(w)}[_](){return this.close()}}class Rs{constructor(t={}){const{readable:e,writable:r}=new TransformStream;this.readable=e,this.zipWriter=new As(r,t),this.ae=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 Fs(e,t)}}()}});return Os(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 Os(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.ae))).filter(t=>"rejected"==t.status).map(t=>t.reason);if(n.length){const[t]=n;try{t.entryErrors=n}catch{}throw await Fs(r,t),t}try{return await r.close(t,e)}catch(t){throw await Fs(r,t),t}}}class zs extends Promise{then(t,e){const{dr:r}=this;return r&&(r.Xe=!0),super.then(t,e)}}function xs(t){return t.getData?t.getData():t.writable}function Ds(t,e){const r=new zs((t,r)=>Promise.prototype.then.call(e,t,r)),n={};return r.dr=n,n.Ye=Promise.prototype.then.call(r,T,t=>Object.assign(n,{qe:!0,error:t})),t.se.push(n),r}async function Fs(t,e){try{await t.writer.writable.abort(e)}catch{}}function Os(t,e,r){t.ae.add(e),e.catch(t=>{try{r(t)}catch{}})}function Ts(t,e,n){if(null===t||typeof t!=C||Array.isArray(t))throw new Error(ds);const{externalFileAttributes:o,versionMadeBy:i,comment:a,lastModDate:s,rawLastModDate:c,creationDate:u,lastAccessDate:l,uncompressedSize:f,encrypted:d,zipCrypto:w,crc32:p,compressionMethod:h,extraFieldAES:m,extraFieldUnix:y,internalFileAttributes:b,extraField:E,bitFlag:S,directory:g,uid:A,gid:R}=t,z={externalFileAttributes:o,versionMadeBy:i,comment:a,lastModDate:s,creationDate:u,lastAccessDate:l,internalFileAttributes:b,directory:g};S&&S.languageEncodingFlag&&(z[K]=!0);const x=function(t){if(t){const e=new Map;if(t.forEach((t,r)=>{ni.has(r)||e.set(r,t.data)}),e.size)return e}}(E);x&&(z[Xo]=x),A===T&&R===T||Object.assign(z,{uid:A,gid:R,unixExtraFieldType:y?bs:ys});const D={};if(e&&!g)if(Object.assign(D,{uncompressedSize:f,crc32:p,compressionMethod:h}),e!==it&&Object.assign(D,{encrypted:d,zipCrypto:w,encryptionStrength:m?m.strength:T}),S&&(D.dataDescriptor=S.dataDescriptor,D[G]=Es[S.level]),n===T)D.rawLastModDate=c;else if(e!==it&&w&&(!S||S.dataDescriptor)&&n instanceof Date&&function(t){let e=new Date(2e3*Math.ceil(Math.floor(t.getTime()/1e3)/2));return e<O?e=O:e>F&&(e=F),(e.getHours()<<3|e.getMinutes()>>3)&r}(n)!=(c>>>8&r))throw new Error(ws);return{Fe:z,Oe:D}}function Is(n,o,i){let a=rc(n,i,Po),s=rc(n,i,Vo,a?20:768);const c=rc(n,i,Ko),u=ic(n,i,"uid"),l=ic(n,i,"gid");let f=ic(n,i,Jo),d=rc(n,i,"unixExtraFieldType"),w=rc(n,i,Qo),p=rc(n,i,$o),h=rc(n,i,ti);if(yt(u,t,ns),yt(l,t,os),yt(f,e,is),d!==T&&d!==ys&&d!==bs)throw new Error(as);if(d===bs&&(u!==T&&u>e||l!==T&&l>e))throw new Error(ss);d!==T||u===T&&l===T||(d=ys);let m=ic(n,i,jo),y=rc(n,i,Bo);const b=m!==T||y!==T;if(u!==T||l!==T||f!==T||d||c?(a=!1,s=s&r|768):b&&(a=!0,s&=r),yt(m,r,cs),y&&(typeof y!==C||Array.isArray(y)))throw new Error(us);if(s>e)throw new Error(Na);let E=rc(n,i,_o);const S=E!==T;S||(E=0),!i[Go]&&o.endsWith(x)&&(i[Go]=!0);const D=rc(n,i,Go);if(D?(o.endsWith(x)||(o+=x),S||(E=16,a||(E|=16877<<16))):a||S||(E=c?493<<16:27525120),!a){const t=f!==T||Boolean(w||p||h);f=f===T?E>>16&e:f&e,w?f|=R:w=Boolean(f&R),p?f|=z:p=Boolean(f&z),h?f|=512:h=Boolean(512&f),S&&!t||(D?f=-61441&f|A:f&g||(f|=32768),E=(f&e)<<16|E&e)}({msdosAttributesRaw:m,msdosAttributes:y}=function(t,e){if(t!==T)t&=r;else if(e!==T){const{readOnly:n,hidden:o,system:i,directory:a,archive:s}=e;let c=0;n&&(c|=1),o&&(c|=2),i&&(c|=4),a&&(c|=16),s&&(c|=32),t=c&r}return e===T&&(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!==T&&40960==(f&g);return{name:o,Te:{versionMadeBy:s,msDosCompatible:Boolean(a),externalFileAttributes:E,unixExternalUpper:F,uid:u,gid:l,unixMode:f,unixExtraFieldType:d,symlink:O,setuid:w,setgid:p,sticky:h,msdosAttributesRaw:m,msdosAttributes:y}}}function Us(t,r,n){const o=oc(t,n,"encodeText")||ee;let i=o(r,tt);if(i===T&&(i=ee(r)),wc(i)>e)throw new Error(Ma);const a=n[zo]||"";if(typeof a!=v)throw new Error(Ca);let s=o(a,et);if(s===T&&(s=ee(a)),wc(s)>e)throw new Error(ka);const c=rc(t,n,Zo);if(c!==T&&c>e)throw new Error(Na);const u=nc(t,n,Io,new Date),l=rc(t,n,Uo),f=nc(t,n,ko),d=nc(t,n,vo),w=rc(t,n,No,0),p=ht(rc(t,n,P)),h=Boolean(p),m=!0===p,y=rc(t,n,j),b=rc(t,n,B);pt(y,b);const E=ic(t,n,"encryptionStrength",3),S=rc(t,n,Ho),g=rc(t,n,"extendedTimestamp",!0),A=rc(t,n,"ntfsTimestamp"),R=rc(t,n,"keepOrder",!0),z=rc(t,n,W),x=rc(t,n,V),D=rc(t,n,"bufferedWrite"),F=oc(t,n,"createTempStream"),O=rc(t,n,"dataDescriptorSignature",!0),I=dt(rc(t,n,L));wt(I);const U=rc(t,n,K,!hc(i)||!hc(s)),k=rc(t,n,Yo),C=h||k===T?T:ar(k);if(!h&&k!==T&&0!==k&&8!==k&&!C)throw new Error(tr);let M=ic(t,n,G);if(yt(M,9,ls),t.options[X]){if(y!==T||b!==T)throw new Error(ja);M===T&&k===T&&(M=0)}h&&(M=bt(n[G]));let N=rc(t,n,Z),_=rc(t,n,Y);D&&_===T&&(_=!1),(_===T||S&&!m)&&(_=!0),M!==T&&6!=M&&(N=!1);const H=rc(t,n,Lo);if(!(S||y===T&&b===T||Number.isInteger(E)&&E>=1&&E<=3))throw new Error(_a);const q=ks(n[Xo]),J=ks(n.localExtraField),Q=ks(n.centralExtraField);return{comment:a,Te:{rawFilename:i,rawComment:s,version:c,lastModDate:u,rawLastModDate:l,lastAccessDate:f,creationDate:d,internalFileAttributes:w,Ue:h,ke:m,password:y,rawPassword:b,encryptionStrength:E,zipCrypto:S,extendedTimestamp:g,ntfsTimestamp:A,keepOrder:R,useWebWorkers:z,transferStreams:x,bufferedWrite:D,createTempStream:F,dataDescriptorSignature:O,signal:I,useUnicodeFileNames:U,compressionMethod:k,format:C?C.format:T,codecURI:C?C.codecURI:T,wr:C?C.versionNeeded:T,level:M,useCompressionStream:N,dataDescriptor:_,zip64:H,rawExtraField:q,pr:J,De:Q}}}function ks(t){if(!t)return N;if(!(t instanceof Map))throw new Error(La);let r=0,n=0;t.forEach((t,n)=>{if(mt(n,e,Wa),!(t instanceof Uint8Array))throw new Error(Za);if(wc(t)>e)throw new Error(Va);r+=4+wc(t)});const o=new Uint8Array(r),i=Wt(o);return t.forEach((t,e)=>{uc(i,n,e),uc(i,n+2,wc(t)),dc(o,t,n+4),n+=4+wc(t)}),o}function Cs(e,r,n,o,i){const{Ue:a,ke:s,zipCrypto:c,password:u,rawPassword:l,encryptionStrength:f}=o;let{dataDescriptor:d,zip64:w,level:p,compressionMethod:h}=o,m=0,y=0,b=!1;if(a&&r){if(y=i[Do],y===T)throw new Error(Xa);if(h===T)throw new Error(Ja)}const E=!0===w,S=rc(e,i,Wo);if(r&&s&&!S&&wc(u,l))throw new Error(Pa);const g=r&&(Boolean(u&&wc(u)||l&&wc(l))||s&&S);r||(p=0,h=0);const A=oi(g,c,f);r&&(a?(i.uncompressedSize=y,m=n===T?ac(y)+A:n+(s?0:A)):n===T?(d=!0,(w||w===T)&&(w=b=!0,m=4294967296)):(i.uncompressedSize=y=n,m=(sc(h,p)?ac(y):y)+A));const R=!(g||r&&(0!==n||a)||sc(h,p));R&&!c&&rc(e,i,Y)===T&&(d=!1);const z=E||b||y>=t,x=E||m>=t;if(z||x){if(!1===w)throw new Error(qa);w=!0}return w=w||!1,{mr:m,Te:{dataDescriptor:d,Ne:R,zip64:w,Ee:E,yr:b,be:z,ye:x,uncompressedSize:y,level:p,compressionMethod:h,encrypted:g}}}function vs(e,r,n){const o=e.slice().sort((t,e)=>n?e-t:t-e);let i=r,a=0;for(const e of o){if(i>=t)break;i+=e,a++}return a}function Ms(t){const{rawFilename:r,lastModDate:o,rawLastModDate:i,lastAccessDate:a,creationDate:s,level:c,zip64:u,zipCrypto:l,useUnicodeFileNames:f,dataDescriptor:d,directory:w,rawExtraField:p,pr:y,encryptionStrength:S,extendedTimestamp:g,ntfsTimestamp:A,Ue:R,encrypted:z,be:x,ye:I,uncompressedSize:U,yr:k,crc32:C}=t;let{version:v,compressionMethod:M}=t;const _=!w&&sc(M,c);let j;const B=R||!_,P=u&&(t.bufferedWrite||!d||!x&&!I||B&&!k),L=P||u&&d&&(x||I);if(u&&(x||I)){const t=20,e=Ps(t);if(e.ar(1),e.ar(t-4),j=e.Zt,P&&(e.lr(U),B)){const t=oi(z,l,S);e.lr(R?0:U+t)}}else j=N;let W,Z,V,H,G;if(z&&!l){const t=Ps(wc(ms)+2);t.ar(h),t.sr(ms),W=t.Zt,W[8]=S}else W=N;if(g){const t=tc(o),e=(K=t)>=Ha&&K<=Ga;if(e){const e=9+(a?4:0)+(s?4:0),r=Ps(e);H=1+(a?2:0)+(s?4:0),G=t,r.ar(m),r.ar(e-4),r.Er(H),r.ir(t),a&&r.ir(ec(tc(a))),s&&r.ir(ec(tc(s))),V=r.Zt}else V=N;if(A===T?!e||Boolean(a||s):A)try{const t=$s(o),e=Ps(36);e.ar(10),e.ar(32),e.Sr(4),e.ar(1),e.ar(24),e.lr(t),e.lr(a?$s(a):t),e.lr(s?$s(s):t),Z=e.Zt}catch{Z=N}else Z=N}else Z=V=N;var K;let Y;try{const{uid:r,gid:n,unixExtraFieldType:o}=t;if(o!=ys||r===T&&n===T)if(o!=bs||r===T&&n===T)Y=N;else{const t=Ps(8);t.ar(E),t.ar(4),t.ar((r===T?0:r)&e),t.ar((n===T?0:n)&e),Y=t.Zt}else{const t=_s(r===T?0:r),e=_s(n===T?0:n),o=3+t.length+e.length,i=Ps(4+o);i.ar(b),i.ar(o),i.Er(1),i.Er(t.length),i.sr(t),i.Er(e.length),i.sr(e),Y=i.Zt}}catch{Y=N}M===T&&(M=_?8:0),v===T&&(v=0!=M||w||z?20:10);const{wr:q}=t;_&&q!==T&&(v=v>q?v:q),u&&(v=v>45?v:45),z&&!l&&(v=v>51?v:51,R&&C!==T&&(W[4]=1),uc(Wt(W),9,M),M=99);const J=L?wc(j):0,Q=J+wc(W,V,Z,Y,p,y);if(Q+(t[X]?67:0)>e)throw new Error(Va);const $=new Date(2e3*Math.ceil(Math.floor(o.getTime()/1e3)/2)),tt=$<O?O:$>F?F:$,et=wc(V)?new Date(1e3*tc(o)):wc(Z)?o:tt,{he:rt,me:nt,rawLastModDate:ot}=pc({version:v,bitFlag:mc(c,f,d,z,M),compressionMethod:M,uncompressedSize:U,lastModDate:tt,rawLastModDate:i,rawFilename:r,ye:I,be:x,extraFieldLength:Q}),it=Ps(D+wc(r)+Q),at=it.Zt,st=Wt(at);return it.ir(n),it.sr(rt),it.sr(r),L&&it.sr(j),it.sr(W),it.sr(V),it.sr(Z),it.sr(Y),it.sr(p),it.sr(y),d&&(I||lc(st,18,0),x||lc(st,22,0)),{ve:at,Ke:st,he:rt,me:nt,lastModDate:et,Ce:et===tt&&$.getTime()!=tt.getTime(),rawLastModDate:ot,encrypted:z,compressed:_,version:v,compressionMethod:M,Ze:H,Ve:G,ge:N,We:J,Re:V,ze:Z,xe:Y,Ae:W,extraFieldLength:Q}}function Ns(t,e){const{_e:r}=t;let{ve:n,extraFieldLength:o}=r,i=64-(e+wc(n))%64;i<4&&(i+=64);const a=new Uint8Array(i),s=Wt(a);uc(s,0,y),uc(s,2,i-4);const c=n;r.ve=n=new Uint8Array(wc(c)+i),dc(n,c),dc(n,a,wc(c));const u=Wt(n);uc(u,28,o+i),r.Ke=u,t.Le+=i}function _s(t){const e=new Uint8Array(4);Wt(e).setUint32(0,t,!0);let r=4;for(;r>1&&0===e[r-1];)r--;return e.subarray(0,r)}function js({zip64:t,dataDescriptor:e,dataDescriptorSignature:r}){let n,o=N,a=0,s=t?20:12;return r&&(s+=4),e&&(o=new Uint8Array(s),n=Wt(o),r&&(a=4,lc(n,0,i))),{Me:o,He:n,Ge:a}}function Bs(r){let n=0,o=!1;for(const[,i]of r){const{rawFilename:r,Ae:a,rawComment:s,ze:c,xe:u,rawExtraField:l,De:d,Ze:w,Ve:p,Ee:h,uncompressedSize:y,compressedSize:b}=i;let{be:E,ye:S}=i;h||(E&&y<t&&(E=i.be=!1),S&&b<t&&(S=i.ye=!1)),o=o||E||S;const g=i.offset>=t,A=i.diskNumberStart>=e;let R,z;if(g||A||E||S){const t=4+(E?8:0)+(S?8:0)+(g?8:0)+(A?4:0),e=Ps(t);e.ar(1),e.ar(t-4),E&&e.lr(y),S&&e.lr(b),g&&e.lr(i.offset),A&&e.ir(i.diskNumberStart),R=e.Zt}else R=N;if(i.ge=R,i.nr=g,i.Se=A,p===T)z=N;else{const t=Ps(9);t.ar(m),t.ar(5),t.Er(w),t.ir(p),z=t.Zt}i.Re=z;const x=wc(R,a,c,u,z,l,d);if(x>e)throw new Error(Va);n+=f+wc(r,s)+x}return{Je:n,Qe:o}}function Ps(t){const e=new Uint8Array(t),r=Wt(e);let n=0;return{Zt:e,Er:t=>{!function(t,e,r){t.setUint8(e,r)}(r,n,t),n+=1},ar:t=>{uc(r,n,t),n+=2},ir:t=>{lc(r,n,t),n+=4},lr:t=>{fc(r,n,BigInt(t)),n+=8},sr:t=>{dc(e,t,n),n+=wc(t)},Sr:t=>n+=t}}function Ls(t){const{diskNumber:e=0}=t;return e}function Ws(t){const{diskOffset:e=0}=t;return e}function Zs(t,e){const{availableSize:r=I}=t;return e>r}function Vs(t,{diskNumber:e=0,diskOffset:r=0}){return t.offset-r-(e?t.ie:0)}function Hs(t){const e=Wt(t);let r=0;for(;r+4<=wc(t);){const n=4+cc(e,r+2);if(1==cc(e,r))return Hs(Pt(t.subarray(0,r),t.subarray(Math.min(r+n,wc(t)))));r+=n}return t}async function Gs(t,e,r,n){if(n>0){const{writer:o}=t;let i=0;try{await Qs(So(e,{offset:r,size:n}),o,T,t=>i+=t)}catch(e){t.hasCorruptedEntries=!0;try{e.corruptedEntry=!0}catch{}throw e}finally{o.size+=i,t.offset+=i}}}async function Ks(t,e){const r=await Eo(t,e,D);if(wc(r)<D)return D;const n=Wt(r);return D+cc(n,26)+cc(n,28)}function Ys(t,{offset:e,diskNumberStart:r}){return e+(t.Yt?t.Yt(r):0)}function qs(){const t=new Uint8Array(4);return lc(Wt(t),0,o),t}async function Xs(t,e){delete t.re,await Js(e,qs()),t.offset+=4}async function Js(t,e){const{writable:r}=t,n=r.getWriter();try{await n.ready,t.size+=wc(e),await n.write(e)}finally{n.releaseLock()}}async function Qs(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(wc(t))}}),{preventClose:!0,preventAbort:!0,signal:r})}finally{o.releaseLock()}}function $s(t){if(t){const e=(BigInt(t.getTime())+BigInt(116444736e5))*BigInt(1e4);return e<Ka?Ka:e>Ya?Ya:e}}function tc(t){return Math.floor(t.getTime()/1e3)}function ec(t){return Math.min(Ga,Math.max(Ha,t))}function rc(t,e,r,n){const o=e[r]===T?t.options[r]:e[r];return o===T?n:o}function nc(t,e,r,n){const o=rc(t,e,r,n);if(null===o)return n;if(o!==T&&(typeof o.getTime!=k||Number.isNaN(o.getTime())))throw new Error(va);return o}function oc(t,e,r){return ft(rc(t,e,r))}function ic(t,e,r,n){return bt(rc(t,e,r,n))}function ac(t){return t+5*(Math.floor(t/16383)+1)}function sc(t,e){return t===T?e===T||e>0:0!==t}function cc(t,e){return t.getUint16(e,!0)}function uc(t,e,r){t.setUint16(e,r,!0)}function lc(t,e,r){t.setUint32(e,r,!0)}function fc(t,e,r){t.setBigUint64(e,r,!0)}function dc(t,e,r){t.set(e,r)}function wc(...t){let e=0;return t.forEach(t=>t&&(e+=t.length)),e}function pc({version:e,bitFlag:r,compressionMethod:n,uncompressedSize:o,compressedSize:i,lastModDate:a,rawLastModDate:s,rawFilename:c,ye:u,be:l,extraFieldLength:f}){const d=Ps(26),w=d.Zt,p=Wt(w);if(d.ar(e),d.ar(r),d.ar(n),s===T){const t=new Uint32Array(1),e=Wt(t);uc(e,0,(a.getHours()<<6|a.getMinutes())<<5|a.getSeconds()/2),uc(e,2,(a.getFullYear()-1980<<4|a.getMonth()+1)<<5|a.getDate()),s=t[0]}return d.ir(s),d.Sr(4),u||i!==T?d.ir(u?t:i):d.Sr(4),l||o!==T?d.ir(l?t:o):d.Sr(4),d.ar(wc(c)),d.ar(f),{he:w,me:p,rawLastModDate:s}}function hc(t){return t.every(t=>t>=32&&t<=126)}function mc(t,e,r,n,o){let i=0;return e&&(i|=S),r&&(i|=8),8!=o&&9!=o||(t>=0&&t<=3&&(i|=6),t>3&&t<=5&&(i|=4),9==t&&(i|=2)),n&&(i|=1),i}function yc(){return"application/octet-stream"}function bc(){const{CompressionStream:t,DecompressionStream:e,CompressionStreamFallback:r,DecompressionStreamFallback:n}=Ut(),o=[{compressionMethod:0,compression:!0,decompression:!0,registered:!1},{compressionMethod:8,compression:Ec(r,wr)||Ec(t,wr)||Ec(t,hr),decompression:Ec(n,wr)||Ec(e,wr)||Ec(e,hr),registered:!1},{compressionMethod:9,compression:!1,decompression:Ec(n,pr)||Ec(e,pr),registered:!1}];for(const t of sr()){const e=cr(t.format);o.push({compressionMethod:t.compressionMethod,compression:e?typeof e.CompressionStream==k:T,decompression:e?typeof e.DecompressionStream==k:T,registered:!0})}return o}function Ec(t,e){if(!t)return!1;const{gr:r}=t;return r?r.includes(e):gr(t,e)}const Sc="2.13.1",gc=1048576,Ac=".zip.js-temp";function Rc(t={}){const{thresholdBytes:e=gc,directoryName:r=Ac,getDirectory:n=()=>navigator.storage.getDirectory()}=t;let o;function i(){return o||(o=Promise.resolve(n()).then(t=>t.getDirectoryHandle(r,{create:!0}))),o}return function(){const t=[];let r,n,o,a,s=0,c=!1;const u=new WritableStream({async write(a){c?await o.write(a):(t.push(a),s+=a.length,s>e&&await async function(){const e=await i();r=crypto.randomUUID?crypto.randomUUID():Array.from(crypto.getRandomValues(new Uint8Array(16)),t=>t.toString(16).padStart(2,"0")).join(""),n=await e.getFileHandle(r,{create:!0}),o=(await n.createWritable()).getWriter(),c=!0;for(const e of t)await o.write(e);t.length=0}())},async close(){o&&(await o.close(),o=null)}});let l=0;return{writable:u,readable:new ReadableStream({async pull(e){if(c){if(!a){const t=await n.getFile();a=t.stream().getReader()}const{value:t,done:r}=await a.read();r?e.close():e.enqueue(t)}else l<t.length?e.enqueue(t[l++]):e.close()},async cancel(t){a&&await a.cancel(t)}},{highWaterMark:0}),dispose:async function(){if(o){try{await o.close()}catch{}o=null}if(r){try{const t=await i();await t.removeEntry(r)}catch{}n=r=null}t.length=0}}}}const zc=1048576;function xc(t={}){const{thresholdBytes:e=zc}=t;return function(){const t=[];let r,n,o,i=0,a=!1;const s=new WritableStream({async write(o){a?await r.write(o):(t.push(o),i+=o.length,i>e&&await async function(){const e=new TransformStream;n=qe(e.readable),r=e.writable.getWriter(),a=!0;for(const e of t)await r.write(e);t.length=0}())},async close(){r&&(await r.close(),r=null)}});let c=0;return{writable:s,readable:new ReadableStream({async pull(e){if(a){if(!o){const t=await n;o=t.stream().getReader()}const{value:t,done:r}=await o.read();r?e.close():e.enqueue(t)}else c<t.length?e.enqueue(t[c++]):e.close()},async cancel(t){o&&await o.cancel(t)}},{highWaterMark:0}),dispose:async function(){if(r){try{await r.abort()}catch{}r=null}n&&(n.catch(()=>{}),n=null),t.length=0}}}}const Dc=1048576,Fc=".zip.js-temp",Oc="createSyncAccessHandle is only available in dedicated workers";function Tc(t={}){const{thresholdBytes:e=Dc,directoryName:r=Fc,getDirectory:n}=t;if(!(n||"undefined"!=typeof FileSystemFileHandle&&FileSystemFileHandle.prototype.createSyncAccessHandle))throw new Error(Oc);const o=n||(()=>navigator.storage.getDirectory());let i;function a(){return i||(i=Promise.resolve(o()).then(t=>t.getDirectoryHandle(r,{create:!0}))),i}return function(){const t=[];let r,n,o=0,i=!1,s=0,c=0;const u=new WritableStream({async write(c){i?(n.write(c,{at:s}),s+=c.length):(t.push(c),o+=c.length,o>e&&await async function(){const e=await a();r=crypto.randomUUID?crypto.randomUUID():Array.from(crypto.getRandomValues(new Uint8Array(16)),t=>t.toString(16).padStart(2,"0")).join("");const o=await e.getFileHandle(r,{create:!0});n=await o.createSyncAccessHandle(),i=!0;for(const e of t)n.write(e,{at:s}),s+=e.length;t.length=0}())},close(){n&&n.flush()}});let l=0;return{writable:u,readable:new ReadableStream({pull(e){if(i){const t=s-c;if(t<=0)return void e.close();const r=new Uint8Array(Math.min(524288,t)),o=n.read(r,{at:c});o?(c+=o,e.enqueue(r.subarray(0,o))):e.close()}else l<t.length?e.enqueue(t[l++]):e.close()}},{highWaterMark:0}),dispose:async function(){if(n){try{n.close()}catch{}n=null}if(r){try{const t=await a();await t.removeEntry(r)}catch{}r=null}t.length=0}}}}try{jt({baseURI:import.meta.url})}catch{}const Ic="deflate",Uc="deflate-raw",kc="deflate64-raw",Cc="gzip";let vc,Mc,Nc,_c,jc;function Bc(t,e,r={}){if(!vc){const t=new Error("WASM module not loaded");throw t.cause=jc,t}const n="number"==typeof r.level?r.level:-1,o="number"==typeof r.outBuffer?r.outBuffer:65536,i="number"==typeof r.inBufferSize?r.inBufferSize:65536;return new TransformStream({start(){try{let r;if(this.Ar=Mc(o),this.in=Mc(i),this.inBufferSize=i,!this.Ar||!this.in)throw new Error("allocation failed");if(this.Rr=new Uint8Array(o),t?(this.zr=vc.deflate_process,this.Dr=vc.deflate_last_consumed,this.Fr=vc.deflate_end,this.Or=vc.deflate_new(),r=e===Cc?vc.deflate_init_gzip(this.Or,n):e===Uc?vc.deflate_init_raw(this.Or,n):vc.deflate_init(this.Or,n)):e===kc?(this.zr=vc.inflate9_process,this.Dr=vc.inflate9_last_consumed,this.Fr=vc.inflate9_end,this.Or=vc.inflate9_new(),r=vc.inflate9_init_raw(this.Or)):(this.zr=vc.inflate_process,this.Dr=vc.inflate_last_consumed,this.Fr=vc.inflate_end,this.Or=vc.inflate_new(),r=e===Uc?vc.inflate_init_raw(this.Or):e===Cc?vc.inflate_init_gzip(this.Or):vc.inflate_init(this.Or)),0!==r)throw new Error("init failed:"+r)}catch(t){throw a(this),t}},transform(t,e){try{const r=t,n=new Uint8Array(_c.buffer),i=this.zr,a=this.Dr,s=this.Ar,c=this.Rr;let u=0;for(;u<r.length;){const t=Math.min(r.length-u,32768);if((!this.in||this.inBufferSize<t)&&(this.in&&Nc&&(Nc(this.in),this.in=0),this.in=Mc(t),this.inBufferSize=t,!this.in))throw new Error("allocation failed");n.set(r.subarray(u,u+t),this.in);const l=i(this.Or,this.in,t,s,o,0),f=l>>24&255,d=128&f?f-256:f;if(d<0)throw new Error("process error:"+d);const w=16777215&l;w&&(c.set(n.subarray(s,s+w),0),e.enqueue(c.slice(0,w)));const p=a(this.Or);if(0===p&&0===w)break;u+=p}}catch(t){a(this),e.error(t)}},flush(t){try{const e=new Uint8Array(_c.buffer),r=this.zr,n=this.Ar,i=this.Rr;for(;;){const a=r(this.Or,0,0,n,o,4),s=a>>24&255,c=128&s?s-256:s;if(c<0)throw new Error("process error:"+c);const u=16777215&a;if(u&&(i.set(e.subarray(n,n+u),0),t.enqueue(i.slice(0,u))),1===s||0===u)break}}catch(e){t.error(e)}finally{const e=a(this);0!==e&&t.error(new Error("end error:"+e))}},cancel(){a(this)}});function a(t){let e=0;return t.Or&&t.Fr&&(e=t.Fr(t.Or)),t.Or=0,t.in&&Nc&&Nc(t.in),t.in=0,t.Ar&&Nc&&Nc(t.Ar),t.Ar=0,e}}class Pc{constructor(t=Ic,e){return Bc(!0,t,e)}}class Lc{constructor(t=Ic,e){return Bc(!1,t,e)}}Pc.lt=!0,Lc.lt=!0,Pc.gr=[Ic,Uc,Cc],Lc.gr=[Ic,Uc,Cc,kc];let Wc,Zc=!1;async function Vc(){await async function(){await Promise.allSettled(on.map(t=>(hn(t),t.terminate()))),vr=T,Mr=!1}(),Wc=null,Zc=!1,vc=Mc=Nc=_c=jc=null}!function({Tr:t}){_r=t}({Tr:t=>{if(!Wc){let{wasmURI:e}=t;typeof e==k&&(e=e()),Wc=async function(t,{baseURI:e}){if(!Zc)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(vc=t,({malloc:Mc,free:Nc,memory:_c}=vc),"function"!=typeof Mc||"function"!=typeof Nc||!_c)throw vc=Mc=Nc=_c=null,new Error("Invalid WASM module")}((await WebAssembly.instantiate(r)).instance.exports)}(t,e),Zc=!0}catch(t){throw function(t){jc=t}(t),t}}(e,t).catch(t=>{throw Wc=null,t})}return Wc}}),jt({CompressionStreamFallback:Pc,DecompressionStreamFallback:Lc}),jt({workerURI:new URL("./zip-web-worker.js",import.meta.url).href,wasmURI:new URL("./zip-module.wasm",import.meta.url).href});const Hc="Entry filename already exists",Gc="Duplicate entry filename in the imported zip file",Kc='Invalid duplicates option (must be "throw", "keep-first" or "keep-last")',Yc="Entry is an ancestor of target entry",qc="Root directory cannot be moved",Xc="Target entry is not a directory",Jc="Parent entry is not a directory",Qc="Readable stream already consumed",$c="throw",tu="keep-first",eu="keep-last",ru=new Set([$c,tu,eu]),nu="Invalid passThrough option (use readerOptions.passThrough or set uncompressedSize for each entry)",ou="Invalid readerOptions (must be an object)",iu="The 'compressed' passThrough option is only supported by Entry#getData() and ZipWriter#add()",au="zipjs-abort-export";class su{constructor(t,e,r,n){const o=this;if(t.root&&n&&n.getChildByName(e))throw new Error(Hc);r||(r={}),Object.assign(o,{fs:t,name:e,data:r.data,options:r.options&&Object.assign({},r.options),id:t.Ir++,parent:n,children:[],uncompressedSize:r.uncompressedSize||0,Ur:r.Ur||r.uncompressedSize===T,passThrough:r.passThrough,kr:r.kr||new Date}),!n&&t.root||(t.entries[o.id]=o),n&&o.parent.children.push(o)}getFullname(){return this.getRelativeName()}getRelativeName(t=this.fs.root){let e=this.name,r=this.parent;for(;r&&r!=t;)e=(r.name?r.name+"/":"")+e,r=r.parent;return e}isDescendantOf(t){let e=this.parent;for(;e&&e.id!=t.id;)e=e.parent;return Boolean(e)}rename(t){const e=this;let r=e.parent;if(r){const n=Mu(t);n&&(t=n.pop(),r=Nu(r,n,e));const o=r.getChildByName(t);if(o&&o!=e)throw new Error(Hc);r!=e.parent&&(Eu(e),e.parent=r,r.children.push(e),Cu(e.fs,e))}e.name=t}setOptions(t){const e=Object.assign({},this.options,t);this.options=Object.fromEntries(Object.entries(e).filter(([,t])=>t!==T))}}class cu extends su{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 cu(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===T||(t.constructor==Pn?e.type==r:t.constructor!=Nn||e.startsWith("data:"+(r||"")+";base64,"))}(t,r.data))return r.data;{const n=r.reader=yu(r.Reader,r.data,e),o=r.uncompressedSize||n.size;await Promise.all([yo(n),yo(t,o)]);const i=dt(e.signal),a=function(t,e,r,n){const{onstart:o,onprogress:i,onend:a}=r,{readable:s}=e;return t.data instanceof ri||!o&&!i&&!a?s:Ye(s).pipeThrough(new Lr({onstart:o,onprogress:i,onend:a,size:e.size}),{signal:n})}(r,n,e,i),s=!mo(t)&&Boolean(e.preventClose);return r.uncompressedSize=n.size,await Ye(a).pipeTo(Xe(t.writable),{signal:i,preventClose:s,preventAbort:s}),t.getData?t.getData():t.writable}}isPasswordProtected(){return Boolean(this.data&&this.data.encrypted)}async checkPassword(t,e={}){const r=this;if(!r.isPasswordProtected())return!0;try{return await r.data.getData(null,Object.assign({},e,{password:t,checkPasswordOnly:!0})),!0}catch(t){if(Zt(t)&&t.message==se)return!1;throw t}}getText(t,e){return this.getData(new Zn(t),e)}getBlob(t,e){return this.getData(new Pn(t),e)}getData64URI(t,e){return this.getData(new Nn(t),e)}getUint8Array(t){return this.getData(new lo,t)}getWritable(t=new WritableStream,e){return this.getData({writable:t},e)}async getArrayBuffer(t){return Lt(await this.getUint8Array(t)).buffer}replaceBlob(t){xu(this,{data:t,Reader:Bn,Writer:Pn,uncompressedSize:t.size})}replaceText(t){xu(this,{data:t,Reader:Ln,Writer:Zn,uncompressedSize:Wn(t)})}replaceData64URI(t){xu(this,{data:t,Reader:Mn,Writer:Nn,uncompressedSize:Du(t)})}replaceUint8Array(t){xu(this,{data:t,Reader:uo,Writer:lo,uncompressedSize:t.length})}replaceReadable(t){xu(this,{data:null,Reader:hu(t),Writer:null,uncompressedSize:T})}}class uu extends su{constructor(t,e,r,n){super(t,e,r,n),this.directory=!0}clone(t){const e=this,r=new uu(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 vu(this,t,{options:e},!0)}addText(t,e,r={}){return vu(this,t,{data:e,Reader:Ln,Writer:Zn,options:r,uncompressedSize:Wn(e)})}addBlob(t,e,r={}){return vu(this,t,{data:e,Reader:Bn,Writer:Pn,options:r,uncompressedSize:e.size})}addData64URI(t,e,r={}){return vu(this,t,{data:e,Reader:Mn,Writer:Nn,options:r,uncompressedSize:Du(e)})}addUint8Array(t,e,r={}){return vu(this,t,{data:e,Reader:uo,Writer:lo,options:r,uncompressedSize:e.length})}addHttpContent(t,e,r={}){return vu(this,t,{data:e,Reader:class extends so{constructor(t){super(t,r)}},options:r})}addReadable(t,e,r={}){return vu(this,t,{Reader:hu(e),options:r})}addFileSystemEntry(t,e={}){return Tu(this,t,e)}addFileSystemHandle(t,e={}){return Tu(this,t,e)}addFile(t,e={}){return(e=Object.assign({},e)).lastModDate||(e.lastModDate=new Date(t.lastModified)),vu(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 Bn(t),e)}importData64URI(t,e){return this.importZip(new Mn(t),e)}importUint8Array(t,e){return this.importZip(new uo(t),e)}importHttpContent(t,e){return this.importZip(new so(t,e),e)}importReadable(t,e){return this.importZip({readable:t},e)}exportBlob(t={}){return this.exportZip(new Pn(t.mimeType||"application/zip"),t)}exportData64URI(t={}){return this.exportZip(new Nn(t.mimeType||"application/zip"),t)}exportUint8Array(t={}){return this.exportZip(new lo,t)}async exportWritable(t=new WritableStream,e={}){return await this.exportZip({writable:t},e),t}exportFileSystemHandle(t,e={}){return async function(t,e,r){const{onstart:n,onprogress:o,onend:i}=r;zu(r.passThrough);const a=Ru(r.readerOptions),s=new AbortController,{signal:c}=s,u=function(t,e){if(!dt(t))return()=>{};if(t.aborted)return e.abort(t.reason),()=>{};const r=()=>e.abort(t.reason);return t.addEventListener("abort",r,{once:!0}),()=>t.removeEventListener("abort",r)}(r.signal,s),l=Object.assign({},r,a,{signal:c,onstart:T,onprogress:T,onend:T,preventClose:!1}),f=du([t],t=>pu(t,l.passThrough)),d=[];let w=!1,p=0;try{n&&await Wr(n,f),await m(t,e),i&&await Wr(i,p)}catch(t){try{t.exportedEntryNames=d}catch{}throw t}finally{u()}return e;function h(t){const e=t.getWriter();return new WritableStream({async write(t){await e.write(t),p+=t.length,o&&await Wr(o,p,f)},close:()=>e.close(),abort:t=>e.abort(t)})}async function m(t,e){if(r.concurrent){const r=(await Promise.allSettled(t.children.map(t=>y(t,e)))).filter(t=>"rejected"==t.status);if(r.length){const t=r.filter(t=>!Su(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||Su(c.reason))return;wt(c)}try{if(e.directory){const t=await r.getDirectoryHandle(e.name,{create:!0});await m(e,t)}else{const n=await r.getFileHandle(e.name,{create:!0}),o=await n.createWritable();try{await e.getData({writable:h(o)},l)}catch(t){throw w?new Error(au):t}d.push(e.getRelativeName(t))}}catch(r){w=!0,s.abort(new Error(au));try{r.entryName===T&&(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 yo(t),r=new Gi(t,e)),zu(e.passThrough);const n=function(t){if(t===T)return $c;if(ru.has(t))return t;throw new Error(Kc)}(e.duplicates),o=[],i=await r.getEntries(e);for(const t of i){let r=this;try{const i=t.filename.split("/").filter(t=>""!=t&&"."!=t),a=i.pop();let s=!1;for(const t of i){const e=r;if(r=r.getChildByName(t),r){if(!r.directory){if(n==tu){s=!0;break}if(n!=eu)throw new Error(Gc);this.fs.remove(r),r=new uu(this.fs,t,{data:null},e),o.push(r)}}else r=new uu(this.fs,t,{data:null},e),o.push(r)}if(s)continue;if(t.directory){let e=r;if(a){if(e=r.getChildByName(a),e&&!e.directory){if(n==tu)continue;if(n!=eu)throw new Error(Gc);this.fs.remove(e),e=T}e||(e=new uu(this.fs,a,{data:null},r),o.push(e))}e==this||e.data||(e.data=t)}else{const i=r.getChildByName(a);if(i){if(n==tu)continue;if(n!=eu)throw new Error(Gc);this.fs.remove(i)}o.push(vu(r,a,{data:t,Reader:mu(Object.assign({},e)),uncompressedSize:e.passThrough?t.compressedSize:t.uncompressedSize,passThrough:e.passThrough}))}}catch(e){o.reverse().forEach(t=>this.fs.remove(t));try{e.cause={entry:t}}catch{}throw e}}return o}async exportZip(t,e={}){const r=this,n=Boolean(t)&&typeof t.add==k;e=Object.assign({},e),n||e.bufferedWrite!==T||(e.bufferedWrite=!0);const[o]=await Promise.all([bu(r,Ru(e.readerOptions)),n?T:yo(t)]),i=n?t:new As(t,e);return await async function(t,e,r,n,o){const{onstart:i,onprogress:a,onend:s,onentryprogress:c}=n,u=e,l=du(e.children,t=>Ou(t)?0:1);let f=0,d=0;if(i&&await Wr(i,r),n.bufferedWrite)await async function t(e){const r=(await Promise.allSettled(e.children.map(async e=>{await w(e),await t(e)}))).find(t=>"rejected"==t.status);if(r)throw r.reason}(e);else for(const t of e.getChildren({recursive:!0}))await w(t);async function w(e){if(Ou(e))return;const{name:i,Fe:s}=gu(e,u,n);let w=0;const p=await t.add(i,o.get(e),Object.assign(s,{onstart:T,onend:T,onprogress:async t=>{f+=t-w,w=t,a&&await Wr(a,f,r)}}));d++,c&&await Wr(c,d,l,p)}s&&await Wr(s,f)}(i,r,du([r],wu),e,o),n?i:(await i.close(e.globalComment),t.getData?t.getData():t.writable)}async getExportedSize(r={}){const n=this;Ru((r=Object.assign({},r)).readerOptions),r.bufferedWrite===T&&(r.bufferedWrite=!0);const o=n.getChildren({recursive:!0}),i=o.filter(t=>!Ou(t)).map(t=>{const{name:e,Fe:o}=gu(t,n,r);return{name:e,size:t.directory?0:Au(t,Fu(t,r)),options:o}}),a=!r.bufferedWrite||i.every(t=>!1!==t.options.keepOrder)&&o.every(t=>Ou(t)||!t.children.length);return await async function(r,n,o,i){const a={options:r};if(ft(r[Q]))throw new Error($a);if(i!==T&&!(i instanceof Uint8Array))throw new Error(Ua);const s=wc(i);if(s>e)throw new Error(Ia);const c=r[X],u=new Map,l=r[q]===T?0:r[q];let f=l,w=I;const p=[],h=new Set;for(const e of n){let{name:r}=e;const{size:n}=e,o=Object.assign({},e.options);rc(a,o,Go)&&!r.endsWith(x)&&(r+=x);const i=Is(a,r,o);({name:r}=i);const{Te:s}=Us(a,r,o);0==s.level||s.compressionMethod!==T||s.Ue||await jr(Ut())||(s.level=0);const l=!rc(a,o,Go);if(l&&n===T)throw new Error($a);const{mr:d,Te:m}=Cs(a,l,n,s,o);if(l&&!s.Ue&&sc(m.compressionMethod,m.level))throw new Error($a);const y=Object.assign({},o,i.Te,s,m,{[X]:c}),b=Ms(y),E=js(y),S={_e:b,Le:wc(b.ve,E.Me)};c&&Ns(S,f);const g=l?d:0;u.set(r,Object.assign({},y,b,{offset:f,diskNumberStart:0,compressedSize:g}));const A=S.Le+g;p.push(A),h.add(Boolean(y.Ee||y.uncompressedSize>=t||g>=t)),w=Math.min(w,A),f+=A}if(u.size>1&&(c||f-w>=t&&(h.size>1||vs(p,l,!0)!=vs(p,l,!1)))&&!o)throw new Error($a);const{Je:m,Qe:y}=Bs(u);let b=rc(a,r,Lo);if(f>=t||m>=t||u.size>=e){if(!1===b)throw new Error(qa);b=!0}else b===T&&y&&(b=!0);return f-l+m+s+(b?98:d)}(r,i,a,r.globalComment)}getChildByName(t){const e=this.children;for(let r=0;r<e.length;r++){const n=e[r];if(n.name==t)return n}}getChildren(t={}){return function(t,e){const r=[],n=[t];let o=0;for(;o<n.length;)for(const t of n[o++].children)r.push(t),e&&n.push(t);return r}(this,t.recursive)}isPasswordProtected(){const t=this.children;for(let e=0;e<t.length;e++)if(t[e].isPasswordProtected())return!0;return!1}async checkPassword(t,e={}){const r=this.children;return!(await Promise.all(r.map(r=>r.checkPassword(t,e)))).includes(!1)}}class lu{constructor(){Uu(this)}get children(){return this.root.children}remove(t){Eu(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=T}move(t,e){if(t==this.root)throw new Error(qc);if(!e.directory)throw new Error(Xc);if(e.isDescendantOf(t))throw new Error(Yc);if(t!=e){const r=e.getChildByName(t.name);if(r){if(r!=t)throw new Error(Hc)}else Eu(t),t.parent=e,e.children.push(t),Cu(this,t)}}find(t){const e=t.split("/");let r=this.root;for(let t=0;r&&t<e.length;t++)r=r.directory?r.getChildByName(e[t]):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 ku(this,r=>r.importBlob(t,e))}importData64URI(t,e){return ku(this,r=>r.importData64URI(t,e))}importUint8Array(t,e){return ku(this,r=>r.importUint8Array(t,e))}importHttpContent(t,e){return ku(this,r=>r.importHttpContent(t,e))}importReadable(t,e){return ku(this,r=>r.importReadable(t,e))}importZip(t,e){return ku(this,r=>r.importZip(t,e))}exportBlob(t){return this.root.exportBlob(t)}exportData64URI(t){return this.root.exportData64URI(t)}exportUint8Array(t){return this.root.exportUint8Array(t)}exportWritable(t,e){return this.root.exportWritable(t,e)}exportFileSystemHandle(t,e){return this.root.exportFileSystemHandle(t,e)}exportZip(t,e){return this.root.exportZip(t,e)}getExportedSize(t){return this.root.getExportedSize(t)}isPasswordProtected(){return this.root.isPasswordProtected()}checkPassword(t,e){return this.root.checkPassword(t,e)}}const fu={FS:lu,ZipDirectoryEntry:uu,ZipFileEntry:cu};function du(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 wu(t){return t.uncompressedSize}function pu(t,e){const{data:r}=t;return e&&r instanceof ri?r.compressedSize:t.uncompressedSize}function hu(t){let e;return function(){if(e)throw new Error(Qc);return e=!0,{readable:t}}}function mu(t){return class extends Cn{constructor(t,e={}){super(),this.entry=t,this.options=e}async init(){const e=this,r=Object.assign({},t,e.options),{checkOverlappingEntry:n,checkOverlappingEntryOnly:o}=r,i=await e.entry.getData(new Pn,Object.assign(r,{checkPasswordOnly:!1,checkOverlappingEntry:o||n,checkOverlappingEntryOnly:!1,preventClose:!1}));e.data=i,e.Cr=new Bn(i),e.size=i.size,super.init()}readUint8Array(t,e){return this.Cr.readUint8Array(t,e)}}}function yu(t,e,r){return t.prototype?new t(e,r):t(e,r)}async function bu(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=yu(t.Reader,t.data,e);o.set(t,r);try{await yo(r)}catch(e){try{e.entryId=t.id,e.cause={entry:t}}catch{}throw e}r.size!==T&&(t.uncompressedSize=r.size,t.Ur=!1)})),o}function Eu(t){if(t.parent){const e=t.parent.children;e.forEach((r,n)=>{r.id==t.id&&e.splice(n,1)})}}function Su(t){return Boolean(t)&&t.message==au}function gu(t,e,r){const n=r.relativePath?t.getRelativeName(e):t.getFullname(),o=t.options||{};let i={},a={};if(t.data instanceof ri){const e=Fu(t,r),n=o.lastModDate===T?r.lastModDate:o.lastModDate;({Fe:i,Oe:a}=Ts(t.data,e,n)),e&&(a.passThrough=!0)}const s=Object.assign({lastModDate:t.kr},i,r,o,a,{directory:t.directory});if(!t.directory&&s.passThrough&&s.uncompressedSize===T)throw new Error(nu);return{name:n,Fe:s}}function Au(t,e){const{reader:r}=t;return r&&r.size!==T?r.size:t.Ur?T:pu(t,e)}function Ru(t){if(t&&(typeof t!=C||Array.isArray(t)))throw new Error(ou);return t&&zu(t.passThrough),t}function zu(t){if(ht(t)===it)throw new Error(iu)}function xu(t,e){const{uncompressedSize:r}=e;Object.assign(t,e,{reader:null,passThrough:T,uncompressedSize:r===T?0:r,Ur:r===T})}function Du(t){let e=t.length;for(;"="==t.charAt(e-1);)e--;const r=t.indexOf(",")+1;return Math.floor(.75*(e-r))}function Fu(t,e){const{readerOptions:r}=e;return Boolean(!t.directory&&(t.passThrough||r&&r.passThrough))}function Ou(t){return t.directory&&null===t.data}function Tu(t,e,r){return async function t(e,n,o,i=""){if(n){const a=i?i+"/"+n.name:n.name;try{if((n.isFile||n.isDirectory)&&(n=await Iu(n)),"file"==n.kind){const t=await n.getFile();o.push(vu(e,t.name,{Reader:function(){return{readable:t.stream(),size:t.size}},options:Object.assign({},{lastModDate:new Date(t.lastModified)},r),uncompressedSize:t.size}))}else if("directory"==n.kind){const i=e.addDirectory(n.name,r);o.push(i);for await(const e of n.values())await t(i,e,o,a)}}catch(t){try{t.entryName===T&&(t.entryName=a)}catch{}throw t}}return o}(t,e,[])}async function Iu(t){const e={name:t.name};if(t.isFile&&(e.kind="file",e.getFile=()=>new Promise((e,r)=>t.file(e,r))),t.isDirectory){e.kind="directory";const r=await async function(t){const e=[];function r(t,n,o){t.readEntries(async i=>{if(i.length){for(const t of i)e.push(await Iu(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 Uu(t){t.entries=[],t.Ir=0,t.root=new uu(t)}function ku(t,e){const{entries:r,Ir:n,root:o}=t;return Uu(t),e(t.root).catch(e=>{throw Object.assign(t,{entries:r,Ir:n,root:o}),e})}function Cu(t,e){const r=[e];for(;r.length;){const e=r.pop();t.entries[e.id]=e;for(const t of e.children)r.push(t)}}function vu(t,e,r,n){if(t.directory){const o=Mu(e);return o&&(e=o.pop(),t=Nu(t,o)),n?new uu(t.fs,e,r,t):new cu(t.fs,e,r,t)}throw new Error(Jc)}function Mu(t){if(t.includes("/")){const e=t.split("/").filter(t=>""!=t&&"."!=t);if(e.length)return e}}function Nu(t,e,r){return e.forEach(e=>{const n=t;if(t=t.getChildByName(e)){if(!t.directory)throw new Error(Hc);if(r&&(t==r||t.isDescendantOf(r)))throw new Error(Yc)}else t=new uu(n.fs,e,{data:null},n)}),t}export{Bn as BlobReader,Pn as BlobWriter,Mn as Data64URIReader,Nn as Data64URIWriter,lt as ERR_ABORTED,mi as ERR_AMBIGUOUS_ARCHIVE,Yc as ERR_ANCESTOR_ENTRY,ii as ERR_BAD_FORMAT,ci as ERR_CENTRAL_DIRECTORY_NOT_FOUND,Ta as ERR_DUPLICATED_NAME,Gc as ERR_DUPLICATE_IMPORTED_ENTRY,fi as ERR_ENCRYPTED,yi as ERR_ENCRYPTED_CENTRAL_DIRECTORY,hi as ERR_ENTRY_DATA_OUT_OF_BOUNDS,Hc as ERR_ENTRY_EXISTS,si as ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND,ai as ERR_EOCDR_NOT_FOUND,li as ERR_EXTRAFIELD_ZIP64_NOT_FOUND,Sn as ERR_HTTP_RANGE,gn as ERR_HTTP_RESOURCE_CHANGED,En as ERR_HTTP_STATUS,ce as ERR_INVALID_AUTHENTICATION_CODE,St as ERR_INVALID_BASE_URI,Je as ERR_INVALID_CODEC_DEFINITION,$e as ERR_INVALID_CODEC_MODULE,Ia as ERR_INVALID_COMMENT,Ua as ERR_INVALID_COMMENT_TYPE,fr as ERR_INVALID_COMPRESSED_DATA,dr as ERR_INVALID_CRC32,va as ERR_INVALID_DATE,Kc as ERR_INVALID_DUPLICATES,_a as ERR_INVALID_ENCRYPTION_STRENGTH,ds as ERR_INVALID_ENTRY,ka as ERR_INVALID_ENTRY_COMMENT,Ca as ERR_INVALID_ENTRY_COMMENT_TYPE,Ma as ERR_INVALID_ENTRY_NAME,La as ERR_INVALID_EXTRAFIELD,Va as ERR_INVALID_EXTRAFIELD_DATA,Za as ERR_INVALID_EXTRAFIELD_DATA_TYPE,Wa as ERR_INVALID_EXTRAFIELD_TYPE,Si as ERR_INVALID_FILENAME_VALIDATION,at as ERR_INVALID_FUNCTION_OPTION,os as ERR_INVALID_GID,ls as ERR_INVALID_LEVEL,gi as ERR_INVALID_MAX_APPENDED_DATA_SIZE,Et as ERR_INVALID_MAX_WORKERS,cs as ERR_INVALID_MSDOS_ATTRIBUTES,us as ERR_INVALID_MSDOS_DATA,se as ERR_INVALID_PASSWORD,ct as ERR_INVALID_PASSWORD_TYPE,nu as ERR_INVALID_PASS_THROUGH,ut as ERR_INVALID_PASS_THROUGH_VALUE,es as ERR_INVALID_READER,ou as ERR_INVALID_READER_OPTIONS,st as ERR_INVALID_SIGNAL,fs as ERR_INVALID_SIGNATURE_DATA,Ei as ERR_INVALID_STRICTNESS,ns as ERR_INVALID_UID,lr as ERR_INVALID_UNCOMPRESSED_SIZE,as as ERR_INVALID_UNIX_EXTRA_FIELD_TYPE,ss as ERR_INVALID_UNIX_ID_SIZE,is as ERR_INVALID_UNIX_MODE,gt as ERR_INVALID_URI,Na as ERR_INVALID_VERSION,An as ERR_ITERATOR_COMPLETED_TOO_SOON,ui as ERR_LOCAL_FILE_HEADER_NOT_FOUND,pi as ERR_OVERLAPPING_ENTRY,Jc as ERR_PARENT_NOT_DIRECTORY,Qc as ERR_READABLE_CONSUMED,Qe as ERR_RESERVED_COMPRESSION_METHOD,qc as ERR_ROOT_DIRECTORY_NOT_MOVABLE,wi as ERR_SPLIT_ZIP_FILE,Xc as ERR_TARGET_NOT_DIRECTORY,Ja as ERR_UNDEFINED_COMPRESSION_METHOD,Qa as ERR_UNDEFINED_CRC32,ts as ERR_UNDEFINED_READER,Xa as ERR_UNDEFINED_UNCOMPRESSED_SIZE,$a as ERR_UNDETERMINED_SIZE,bi as ERR_UNSAFE_FILENAME,tr as ERR_UNSUPPORTED_COMPRESSION,Oc as ERR_UNSUPPORTED_CONTEXT,le as ERR_UNSUPPORTED_CRYPTO_API,di as ERR_UNSUPPORTED_ENCRYPTION,Pa as ERR_UNSUPPORTED_ENCRYPTION_PASS_THROUGH,ja as ERR_UNSUPPORTED_ENCRYPTION_USDZ,qa as ERR_UNSUPPORTED_FORMAT,iu as ERR_UNSUPPORTED_PASS_THROUGH_VALUE,Ba as ERR_UNSUPPORTED_SPLIT_USDZ,Ai as ERR_UNSUPPORTED_UINT64,Cr as ERR_WORKER_STARTUP_TIMEOUT,Rn as ERR_WRITER_NOT_INITIALIZED,zn as ERR_WRITER_SIZE_NOT_WRITABLE,ws as ERR_ZIP_CRYPTO_LAST_MOD_DATE,rs as ERR_ZIP_NOT_EMPTY,co as HttpRangeReader,so as HttpReader,Cn as Reader,fo as SplitDataReader,wo as SplitDataWriter,Ln as TextReader,Zn as TextWriter,uo as Uint8ArrayReader,lo as Uint8ArrayWriter,Sc as VERSION,Ti as WARNING_APPENDED_DATA,hs as WARNING_CLAMPED_LAST_MODIFICATION_DATE,xi as WARNING_COMPRESSED_PATCHED_DATA,ps as WARNING_COMPRESSION_UNAVAILABLE,Ci as WARNING_DUPLICATE_FILENAME,Di as WARNING_MALFORMED_EXTRA_FIELD,_i as WARNING_MISMATCHED_LOCAL_FILE_HEADER_BIT_FLAG,ji as WARNING_MISMATCHED_LOCAL_FILE_HEADER_COMPRESSION_METHOD,Bi as WARNING_MISMATCHED_LOCAL_FILE_HEADER_CRC32_OR_SIZES,Ni as WARNING_MISMATCHED_LOCAL_FILE_HEADER_FILENAME,vi as WARNING_MISMATCHED_ZIP64_END_OF_CENTRAL_DIRECTORY,Mi as WARNING_MULTIPLE_END_OF_CENTRAL_DIRECTORY,Ui as WARNING_PREPENDED_CENTRAL_DIRECTORY,Ii as WARNING_PREPENDED_DATA,ki as WARNING_TRAILING_CENTRAL_DIRECTORY_DATA,zi as WARNING_UNKNOWN_VERSION,Fi as WARNING_UNKNOWN_ZIP64_EXTENSIBLE_DATA,Ri as WARNING_UNSORTED_CENTRAL_DIRECTORY,Oi as WARNING_WRAPPED_ENTRIES_COUNT,vn as Writer,uu as ZipDirectoryEntry,su as ZipEntry,lu as ZipFS,cu as ZipFileEntry,Gi as ZipReader,Ki as ZipReaderStream,As as ZipWriter,Rs as ZipWriterStream,vt as configure,xc as createBlobTempStream,Rc as createOPFSTempStream,Tc as createSyncAccessHandleTempStream,fu as fs,yc as getMimeType,sr as getRegisteredCodecs,bc as getSupportedCompressionMethods,Yi as isZipFile,or as registerCodec,Bt as resetConfiguration,Vc as terminateWorkers,ir as unregisterCodec};
|