@zip.js/zip.js 2.20.0 → 2.22.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).zip={})}(this,function(t){"use strict";const{Array:e,Object:n,String:r,Number:o,BigInt:i,Math:a,Date:s,Map:c,Set:u,Response:l,URL:f,Error:d,Uint8Array:w,Uint16Array:p,Uint32Array:h,DataView:m,Blob:y,Promise:g,TextEncoder:E,TextDecoder:S,document:b,crypto:R,btoa:x,TransformStream:z,ReadableStream:F,WritableStream:D,CompressionStream:A,DecompressionStream:I,navigator:C,Worker:T,Symbol:k,setTimeout:v,clearTimeout:_,structuredClone:N}="undefined"!=typeof globalThis?globalThis:self;var U=void 0!==b?b.currentScript:null;const O=4294967295,M=65535,L=255,B=67324752,W=134695760,P=W,Z=84233040,H=33639248,V=101010256,G=101075792,j=117853008,q=46,Y=22,K=20,X=56,$=39169,J=21589,Q=6534,tt=30837,et=30805,nt=2048,rt=61440,ot=16384,it=2048,at=1024,st="/",ct=30,ut=new s(2107,11,31,23,59,58),lt=new s(1980,0,1),ft=void 0,dt=1/0,wt="undefined",pt="function",ht="object",mt="string",yt="boolean",gt=new w,Et=k.asyncDispose||k(),St="password",bt="rawPassword",Rt="passThrough",xt="signal",zt="useWebWorkers",Ft="useCompressionStream",Dt="preventClose",At="level",It="useUnicodeFileNames",Ct="dataDescriptor",Tt="offset",kt="usdz",vt="maxAppendedDataSize",_t="signCentralDirectory",Nt="entry",Ut="filename",Ot="comment",Mt="strict",Lt="balanced",Bt="tolerant",Wt="compressed",Pt="Invalid option (must be a function)",Zt="Invalid signal (must be an AbortSignal instance)",Ht="Invalid password (password must be a string, rawPassword must be a Uint8Array)",Vt="Invalid passThrough option (must be a boolean or 'compressed')",Gt="The operation was aborted";function jt(t){if(t&&typeof t!=pt)throw new d(Pt);return t}function qt(t){if(t&&(typeof t.addEventListener!=pt||typeof t.aborted!=yt))throw new d(Zt);return t||ft}function Yt(t){if(t&&t.aborted)throw t.reason===ft?new DOMException(Gt,"AbortError"):t.reason}function Kt(t,e){if(t&&typeof t!=mt||e&&!(e instanceof w))throw new d(Ht)}function Xt(t){if(t!==ft&&typeof t!=yt&&t!==Wt)throw new d(Vt);return t}function $t(t,e,n){if(!o.isInteger(t)||t<0||t>e)throw new d(n)}function Jt(t,e,n){t!==ft&&$t(t,e,n)}function Qt(t){return typeof t==mt&&t.trim()?o(t):t}const te=262144,ee="Invalid maxWorkers (must be an integer greater than 0)",ne="Invalid baseURI (must be a string)",re="Invalid URI (must be a string or a function returning a string)";let oe=2;try{typeof C!=wt&&C.hardwareConcurrency&&(oe=C.hardwareConcurrency)}catch{}const ie={workerURI:"./core/web-worker-wasm.js",wasmURI:"./core/streams/zlib-wasm/zlib-streams.wasm",chunkSize:te,maxWorkers:oe,terminateWorkerTimeout:5e3,workerStarvationTimeout:5e3,workerStartupTimeout:5e3,useWebWorkers:!0,useCompressionStream:!0,transferStreams:!0,CompressionStream:typeof A!=wt&&A,DecompressionStream:typeof I!=wt&&I},ae="maxWorkers",se="baseURI",ce=["wasmURI","workerURI"],ue=["chunkSize",ae,"terminateWorkerTimeout","workerStarvationTimeout","workerStartupTimeout"],le=["createWorker","CompressionStream","DecompressionStream","CompressionStreamFallback","DecompressionStreamFallback"],fe=[se,...ce,"useCompressionStream","useWebWorkers","transferStreams",...ue,...le],de={...ie};function we(){return de}function pe(t){return he(t.chunkSize)}function he(t){return t=Qt(t),o.isInteger(t)&&t>=1?a.max(t,64):te}function me(t){const e={};for(const n of fe){const r=t[n];r!==ft&&(e[n]=ye(n,r))}return e}function ye(t,e){if(ue.includes(t)){if(e=Qt(e),t==ae&&(!o.isInteger(e)||e<1))throw new d(ee)}else if(le.includes(t))jt(e);else if(t==se){if(e&&typeof e!=mt)throw new d(ne)}else if(ce.includes(t)&&e&&typeof e!=mt&&typeof e!=pt)throw new d(re);return e}function ge(t){t=t||{};const{CompressionStreamZlib:e,DecompressionStreamZlib:r}=t;if(e===ft&&r===ft)return t;const o=n.assign({},t);return o.CompressionStreamFallback===ft&&(o.CompressionStreamFallback=e),o.DecompressionStreamFallback===ft&&(o.DecompressionStreamFallback=r),o}function Ee(t,e){const n=new w(t.length+e.length);return n.set(t),n.set(e,t.length),n}function Se(t){return t.byteOffset||t.byteLength!=t.buffer.byteLength?new w(t):t}function be(t){return new m(t.buffer,t.byteOffset,t.byteLength)}function Re(t){return Boolean(t)&&"object"==typeof t}const xe=[[],[],[],[],[],[],[],[]];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;xe[0][t]=e}for(let t=0;t<256;t++)for(let e=1;e<8;e++){const n=xe[e-1][t];xe[e][t]=n>>>8^xe[0][255&n]}const[ze,Fe,De,Ae,Ie,Ce,Te,ke]=xe;class ve{constructor(t){this.o=t||-1}append(t){let e=0|this.o;const n=0|t.length;let r=0;if(n>=8&&t.buffer){const o=new m(t.buffer,t.byteOffset,n),i=n-8;for(;r<=i;r+=8){const t=e^o.getInt32(r,!0),n=o.getInt32(r+4,!0);e=ke[255&t]^Te[t>>>8&255]^Ce[t>>>16&255]^Ie[t>>>24&255]^Ae[255&n]^De[n>>>8&255]^Fe[n>>>16&255]^ze[n>>>24&255]}}for(;r<n;r++)e=e>>>8^ze[255&(e^t[r])];this.o=e}get(){return~this.o}}class _e extends z{constructor(){let t;const e=new ve;super({transform(t,n){e.append(t),n.enqueue(t)},flush(){const n=new w(4);new m(n.buffer).setUint32(0,e.get()),t.value=n}}),t=this}}function Ne(t){if(typeof E==wt){t=unescape(encodeURIComponent(t));const e=new w(t.length);for(let n=0;n<e.length;n++)e[n]=t.charCodeAt(n);return e}return(new E).encode(t)}const Ue=64,Oe=20,Me=new w([128]),Le=new w(1),Be=new Int32Array([1732584193,4023233417,2562383102,271733878,3285377520]),We=new w(256),Pe=new Int32Array(256),Ze=new Int32Array(256),He=new Int32Array(256),Ve=new Int32Array(256);let Ge=!1;function je(t){const e=function(){const t=new Int32Array(Be),e=new Int32Array(16),n=new w(Ue),r=new m(n.buffer),o=new w(8);let i=0,s=0;return{update:c,digest:function(){const e=8*s,n=a.floor(e/4294967296),r=e>>>0;for(c(Me,0,1);56!=i;)c(Le,0,1);o[0]=n>>>24,o[1]=n>>>16,o[2]=n>>>8,o[3]=n,o[4]=r>>>24,o[5]=r>>>16,o[6]=r>>>8,o[7]=r,c(o,0,8);const u=new w(Oe),l=new m(u.buffer);for(let e=0;e<t.length;e++)l.setInt32(4*e,t[e]);return t.set(Be),i=0,s=0,u}};function c(t,e,o){const a=e+o;if(s+=o,i){for(;e<a&&i<Ue;)n[i++]=t[e++];i==Ue&&(u(r,0),i=0)}if(e+Ue<=a){const n=new m(t.buffer,t.byteOffset,t.byteLength);for(;e+Ue<=a;e+=Ue)u(n,e)}for(;e<a;)n[i++]=t[e++]}function u(n,r){for(let t=0;t<16;t++)e[t]=n.getInt32(r+4*t);let o,i=t[0],a=t[1],s=t[2],c=t[3],u=t[4];for(let t=0;t<15;t+=5)u=(i<<5|i>>>27)+((s^c)&a^c)+u+1518500249+e[t]|0,a=a<<30|a>>>2,c=(u<<5|u>>>27)+((a^s)&i^s)+c+1518500249+e[t+1]|0,i=i<<30|i>>>2,s=(c<<5|c>>>27)+((i^a)&u^a)+s+1518500249+e[t+2]|0,u=u<<30|u>>>2,a=(s<<5|s>>>27)+((u^i)&c^i)+a+1518500249+e[t+3]|0,c=c<<30|c>>>2,i=(a<<5|a>>>27)+((c^u)&s^u)+i+1518500249+e[t+4]|0,s=s<<30|s>>>2;u=(i<<5|i>>>27)+((s^c)&a^c)+u+1518500249+e[15]|0,a=a<<30|a>>>2,o=e[13]^e[8]^e[2]^e[0],o=o<<1|o>>>31,e[0]=o,c=(u<<5|u>>>27)+((a^s)&i^s)+c+1518500249+o|0,i=i<<30|i>>>2,o=e[14]^e[9]^e[3]^e[1],o=o<<1|o>>>31,e[1]=o,s=(c<<5|c>>>27)+((i^a)&u^a)+s+1518500249+o|0,u=u<<30|u>>>2,o=e[15]^e[10]^e[4]^e[2],o=o<<1|o>>>31,e[2]=o,a=(s<<5|s>>>27)+((u^i)&c^i)+a+1518500249+o|0,c=c<<30|c>>>2,o=e[0]^e[11]^e[5]^e[3],o=o<<1|o>>>31,e[3]=o,i=(a<<5|a>>>27)+((c^u)&s^u)+i+1518500249+o|0,s=s<<30|s>>>2;for(let t=20;t<40;t+=5)o=e[t-3&15]^e[t-8&15]^e[t-14&15]^e[15&t],o=o<<1|o>>>31,e[15&t]=o,u=(i<<5|i>>>27)+(a^s^c)+u+1859775393+o|0,a=a<<30|a>>>2,o=e[t-2&15]^e[t-7&15]^e[t-13&15]^e[t+1&15],o=o<<1|o>>>31,e[t+1&15]=o,c=(u<<5|u>>>27)+(i^a^s)+c+1859775393+o|0,i=i<<30|i>>>2,o=e[t-1&15]^e[t-6&15]^e[t-12&15]^e[t+2&15],o=o<<1|o>>>31,e[t+2&15]=o,s=(c<<5|c>>>27)+(u^i^a)+s+1859775393+o|0,u=u<<30|u>>>2,o=e[15&t]^e[t-5&15]^e[t-11&15]^e[t+3&15],o=o<<1|o>>>31,e[t+3&15]=o,a=(s<<5|s>>>27)+(c^u^i)+a+1859775393+o|0,c=c<<30|c>>>2,o=e[t+1&15]^e[t-4&15]^e[t-10&15]^e[t+4&15],o=o<<1|o>>>31,e[t+4&15]=o,i=(a<<5|a>>>27)+(s^c^u)+i+1859775393+o|0,s=s<<30|s>>>2;for(let t=40;t<60;t+=5)o=e[t-3&15]^e[t-8&15]^e[t-14&15]^e[15&t],o=o<<1|o>>>31,e[15&t]=o,u=(i<<5|i>>>27)+(a&s|(a|s)&c)+u+2400959708+o|0,a=a<<30|a>>>2,o=e[t-2&15]^e[t-7&15]^e[t-13&15]^e[t+1&15],o=o<<1|o>>>31,e[t+1&15]=o,c=(u<<5|u>>>27)+(i&a|(i|a)&s)+c+2400959708+o|0,i=i<<30|i>>>2,o=e[t-1&15]^e[t-6&15]^e[t-12&15]^e[t+2&15],o=o<<1|o>>>31,e[t+2&15]=o,s=(c<<5|c>>>27)+(u&i|(u|i)&a)+s+2400959708+o|0,u=u<<30|u>>>2,o=e[15&t]^e[t-5&15]^e[t-11&15]^e[t+3&15],o=o<<1|o>>>31,e[t+3&15]=o,a=(s<<5|s>>>27)+(c&u|(c|u)&i)+a+2400959708+o|0,c=c<<30|c>>>2,o=e[t+1&15]^e[t-4&15]^e[t-10&15]^e[t+4&15],o=o<<1|o>>>31,e[t+4&15]=o,i=(a<<5|a>>>27)+(s&c|(s|c)&u)+i+2400959708+o|0,s=s<<30|s>>>2;for(let t=60;t<80;t+=5)o=e[t-3&15]^e[t-8&15]^e[t-14&15]^e[15&t],o=o<<1|o>>>31,e[15&t]=o,u=(i<<5|i>>>27)+(a^s^c)+u+3395469782+o|0,a=a<<30|a>>>2,o=e[t-2&15]^e[t-7&15]^e[t-13&15]^e[t+1&15],o=o<<1|o>>>31,e[t+1&15]=o,c=(u<<5|u>>>27)+(i^a^s)+c+3395469782+o|0,i=i<<30|i>>>2,o=e[t-1&15]^e[t-6&15]^e[t-12&15]^e[t+2&15],o=o<<1|o>>>31,e[t+2&15]=o,s=(c<<5|c>>>27)+(u^i^a)+s+3395469782+o|0,u=u<<30|u>>>2,o=e[15&t]^e[t-5&15]^e[t-11&15]^e[t+3&15],o=o<<1|o>>>31,e[t+3&15]=o,a=(s<<5|s>>>27)+(c^u^i)+a+3395469782+o|0,c=c<<30|c>>>2,o=e[t+1&15]^e[t-4&15]^e[t-10&15]^e[t+4&15],o=o<<1|o>>>31,e[t+4&15]=o,i=(a<<5|a>>>27)+(s^c^u)+i+3395469782+o|0,s=s<<30|s>>>2;t[0]=t[0]+i|0,t[1]=t[1]+a|0,t[2]=t[2]+s|0,t[3]=t[3]+c|0,t[4]=t[4]+u|0}}(),n=new w(Ue),r=new w(Ue);t.length>Ue&&(e.update(t,0,t.length),t=e.digest());for(let e=0;e<Ue;e++){const o=e<t.length?t[e]:0;n[e]=54^o,r[e]=92^o}return e.update(n,0,Ue),{update(t,n,r){e.update(t,n,r)},digest(){const t=e.digest();e.update(r,0,Ue),e.update(t,0,Oe);const o=e.digest();return e.update(n,0,Ue),o}}}function qe(t){return We[t>>>24]<<24|We[t>>>16&255]<<16|We[t>>>8&255]<<8|We[255&t]}function Ye(t){return t<<24|(65280&t)<<8|t>>>8&65280|t>>>24}function Ke(t){return 255&(t<<1^27*(t>>7))}const Xe=typeof R!=wt&&typeof R.getRandomValues==pt,$e="Invalid password",Je="Invalid authentication code",Qe="zipjs-abort-check-password",tn="Crypto API not supported";function en(t){if(Xe)return R.getRandomValues(t);throw new d(tn)}const nn={name:"PBKDF2"},rn=n.assign({hash:{name:"HMAC"}},nn),on=n.assign({iterations:1e3,hash:{name:"SHA-1"}},nn),an=["deriveBits"],sn=[8,12,16],cn=[16,24,32],un=10,ln=typeof R!=wt,fn=ln&&R.subtle;let dn=ln&&typeof fn!=wt&&typeof fn.importKey==pt&&typeof fn.deriveBits==pt;class wn extends z{constructor({password:t,rawPassword:e,encryptionStrength:n,checkPasswordOnly:r,checkAuthenticationCode:o=!0}){const i={};super({start(){hn(i,t,e,n)},async transform(t,e){const{password:n,strength:o,l:a,ready:s}=i;if(n?(await async function(t,e,n,r){const o=await En(t,e,n,bn(r,0,sn[e])),i=bn(r,sn[e]);if(o[0]!=i[0]||o[1]!=i[1])throw gn(t),new d($e)}(i,o,n,bn(t,0,sn[o]+2)),t=bn(t,sn[o]+2),r?(gn(i),e.error(new d(Qe))):a()):await s,i.h)return;const c=new w(t.length-un-(t.length-un)%16);e.enqueue(yn(i,t,c,0,un,!0))},async flush(t){const{m:e,S:n,ready:r}=i;if(e){if(await r,i.h)return;const a=bn(n,n.length-un),s=new w(bn(n,0,n.length-un));e.process(s,!0);const c=e.digest();let u=n.length<un?1:0;for(let t=0;t<un;t++)u|=c[t]^a[t];if(u&&o)return void t.error(new d(Je));t.enqueue(s)}}}),mn(this,i)}}class pn extends z{constructor({password:t,rawPassword:e,encryptionStrength:n}){const r={};super({start(){hn(r,t,e,n)},async transform(t,e){const{password:n,strength:o,l:i,ready:a}=r;let s=gt;if(n?(s=await async function(t,e,n){const r=en(new w(sn[e]));return Ee(r,await En(t,e,n,r))}(r,o,n),i()):await a,r.h)return;const c=new w(s.length+t.length-t.length%16);c.set(s,0),e.enqueue(yn(r,t,c,s.length,0,!1))},async flush(t){const{m:e,S:n,ready:o}=r;if(e){if(await o,r.h)return;const i=new w(n);e.process(i,!1);const a=bn(e.digest(),0,un);t.enqueue(Ee(i,a))}}}),mn(this,r)}}function hn(t,e,r,o){n.assign(t,{ready:new g(e=>t.l=e),password:Sn(e,r),strength:o-1,S:gt,h:!1})}function mn(t,e){const r=t.readable.getReader(),o=new F({async pull(t){try{const{value:e,done:n}=await r.read();n?t.close():t.enqueue(e)}catch(t){throw gn(e),r.cancel(t).catch(()=>{}),t}},cancel:t=>(gn(e),r.cancel(t))});n.defineProperty(t,"readable",{get:()=>o})}function yn(t,e,n,r,o,i){const{m:a,S:s}=t;s.length&&(e=Ee(s,e));const c=e.length-o,u=c-c%16;if(n=function(t,e){if(e&&e>t.length){const n=t;(t=new w(e)).set(n,0)}return t}(n,r+u),u){const t=bn(n,r,r+u);t.set(bn(e,0,u)),a.process(t,i)}return t.S=bn(e,u),n}function gn(t){const{m:e}=t;t.h=!0,e&&e.dispose&&e.dispose()}async function En(t,e,r,o){t.password=null;const i=cn[e],s=await async function(t,e,r){if(dn)try{const o=await fn.importKey("raw",t,rn,!1,an);return new w(await fn.deriveBits(n.assign({salt:e},on),o,8*r))}catch{dn=!1}return function(t,e,n,r){const o=je(t),i=new w(r),s=new w(e.length+4),c=new m(s.buffer);s.set(e);for(let t=1,n=0;n<r;t++,n+=Oe){c.setUint32(e.length,t),o.update(s,0,s.length);let u=o.digest();const l=u.slice();for(let t=1;t<1e3;t++){o.update(u,0,Oe),u=o.digest();for(let t=0;t<Oe;t++)l[t]^=u[t]}i.set(l.subarray(0,a.min(Oe,r-n)),n)}return i}(t,e,0,r)}(r,o,2*i+2);return t.m=function(t,e){!function(){if(!Ge){let t=1,e=1;do{t=255&(t^t<<1^(128&t?27:0)),e=255&(e^e<<1),e=255&(e^e<<2),e=255&(e^e<<4),128&e&&(e^=9),We[t]=255&(e^(e<<1|e>>7)^(e<<2|e>>6)^(e<<3|e>>5)^(e<<4|e>>4)^99)}while(1!=t);We[0]=99;for(let t=0;t<256;t++){const e=We[t],n=Ke(e),r=n<<24|e<<16|e<<8|n^e;Pe[t]=r,Ze[t]=r>>>8|r<<24,He[t]=r>>>16|r<<16,Ve[t]=r>>>24|r<<8}Ge=!0}}();const n=new Int32Array(60),r=function(t,e){const n=t.length>>2,r=n+6,o=4*(r+1);let i=1;for(let r=0;r<n;r++)e[r]=t[4*r]<<24|t[4*r+1]<<16|t[4*r+2]<<8|t[4*r+3];for(let t=n;t<o;t++){let r=e[t-1];t%n==0?(r=qe(r<<8|r>>>24)^i<<24,i=Ke(i)):n>6&&t%n==4&&(r=qe(r)),e[t]=e[t-n]^r}return r}(t,n),o=new Int32Array(4),i=je(e);let a=0,s=0,c=0,u=0;return{process(t,e){e&&i.update(t,0,t.length),function(t){const e=new m(t.buffer,t.byteOffset,t.byteLength),n=t.length;let r=0;for(;r+16<=n;r+=16)l(),e.setInt32(r,e.getInt32(r)^o[0]),e.setInt32(r+4,e.getInt32(r+4)^o[1]),e.setInt32(r+8,e.getInt32(r+8)^o[2]),e.setInt32(r+12,e.getInt32(r+12)^o[3]);if(r<n){l();for(let e=0;r<n;r++,e++)t[r]^=o[e>>2]>>>24-8*(3&e)}}(t),e||i.update(t,0,t.length)},digest:()=>i.digest()};function l(){a=a+1|0,a||(s=s+1|0,s||(c=c+1|0,c||(u=u+1|0)));let t=Ye(a)^n[0],e=Ye(s)^n[1],i=Ye(c)^n[2],l=Ye(u)^n[3],f=Pe[t>>>24]^Ze[e>>>16&255]^He[i>>>8&255]^Ve[255&l]^n[4],d=Pe[e>>>24]^Ze[i>>>16&255]^He[l>>>8&255]^Ve[255&t]^n[5],w=Pe[i>>>24]^Ze[l>>>16&255]^He[t>>>8&255]^Ve[255&e]^n[6],p=Pe[l>>>24]^Ze[t>>>16&255]^He[e>>>8&255]^Ve[255&i]^n[7];t=Pe[f>>>24]^Ze[d>>>16&255]^He[w>>>8&255]^Ve[255&p]^n[8],e=Pe[d>>>24]^Ze[w>>>16&255]^He[p>>>8&255]^Ve[255&f]^n[9],i=Pe[w>>>24]^Ze[p>>>16&255]^He[f>>>8&255]^Ve[255&d]^n[10],l=Pe[p>>>24]^Ze[f>>>16&255]^He[d>>>8&255]^Ve[255&w]^n[11],f=Pe[t>>>24]^Ze[e>>>16&255]^He[i>>>8&255]^Ve[255&l]^n[12],d=Pe[e>>>24]^Ze[i>>>16&255]^He[l>>>8&255]^Ve[255&t]^n[13],w=Pe[i>>>24]^Ze[l>>>16&255]^He[t>>>8&255]^Ve[255&e]^n[14],p=Pe[l>>>24]^Ze[t>>>16&255]^He[e>>>8&255]^Ve[255&i]^n[15],t=Pe[f>>>24]^Ze[d>>>16&255]^He[w>>>8&255]^Ve[255&p]^n[16],e=Pe[d>>>24]^Ze[w>>>16&255]^He[p>>>8&255]^Ve[255&f]^n[17],i=Pe[w>>>24]^Ze[p>>>16&255]^He[f>>>8&255]^Ve[255&d]^n[18],l=Pe[p>>>24]^Ze[f>>>16&255]^He[d>>>8&255]^Ve[255&w]^n[19],f=Pe[t>>>24]^Ze[e>>>16&255]^He[i>>>8&255]^Ve[255&l]^n[20],d=Pe[e>>>24]^Ze[i>>>16&255]^He[l>>>8&255]^Ve[255&t]^n[21],w=Pe[i>>>24]^Ze[l>>>16&255]^He[t>>>8&255]^Ve[255&e]^n[22],p=Pe[l>>>24]^Ze[t>>>16&255]^He[e>>>8&255]^Ve[255&i]^n[23],t=Pe[f>>>24]^Ze[d>>>16&255]^He[w>>>8&255]^Ve[255&p]^n[24],e=Pe[d>>>24]^Ze[w>>>16&255]^He[p>>>8&255]^Ve[255&f]^n[25],i=Pe[w>>>24]^Ze[p>>>16&255]^He[f>>>8&255]^Ve[255&d]^n[26],l=Pe[p>>>24]^Ze[f>>>16&255]^He[d>>>8&255]^Ve[255&w]^n[27],f=Pe[t>>>24]^Ze[e>>>16&255]^He[i>>>8&255]^Ve[255&l]^n[28],d=Pe[e>>>24]^Ze[i>>>16&255]^He[l>>>8&255]^Ve[255&t]^n[29],w=Pe[i>>>24]^Ze[l>>>16&255]^He[t>>>8&255]^Ve[255&e]^n[30],p=Pe[l>>>24]^Ze[t>>>16&255]^He[e>>>8&255]^Ve[255&i]^n[31],t=Pe[f>>>24]^Ze[d>>>16&255]^He[w>>>8&255]^Ve[255&p]^n[32],e=Pe[d>>>24]^Ze[w>>>16&255]^He[p>>>8&255]^Ve[255&f]^n[33],i=Pe[w>>>24]^Ze[p>>>16&255]^He[f>>>8&255]^Ve[255&d]^n[34],l=Pe[p>>>24]^Ze[f>>>16&255]^He[d>>>8&255]^Ve[255&w]^n[35],f=Pe[t>>>24]^Ze[e>>>16&255]^He[i>>>8&255]^Ve[255&l]^n[36],d=Pe[e>>>24]^Ze[i>>>16&255]^He[l>>>8&255]^Ve[255&t]^n[37],w=Pe[i>>>24]^Ze[l>>>16&255]^He[t>>>8&255]^Ve[255&e]^n[38],p=Pe[l>>>24]^Ze[t>>>16&255]^He[e>>>8&255]^Ve[255&i]^n[39];let h=40;r>10&&(t=Pe[f>>>24]^Ze[d>>>16&255]^He[w>>>8&255]^Ve[255&p]^n[40],e=Pe[d>>>24]^Ze[w>>>16&255]^He[p>>>8&255]^Ve[255&f]^n[41],i=Pe[w>>>24]^Ze[p>>>16&255]^He[f>>>8&255]^Ve[255&d]^n[42],l=Pe[p>>>24]^Ze[f>>>16&255]^He[d>>>8&255]^Ve[255&w]^n[43],f=Pe[t>>>24]^Ze[e>>>16&255]^He[i>>>8&255]^Ve[255&l]^n[44],d=Pe[e>>>24]^Ze[i>>>16&255]^He[l>>>8&255]^Ve[255&t]^n[45],w=Pe[i>>>24]^Ze[l>>>16&255]^He[t>>>8&255]^Ve[255&e]^n[46],p=Pe[l>>>24]^Ze[t>>>16&255]^He[e>>>8&255]^Ve[255&i]^n[47],h=48),r>12&&(t=Pe[f>>>24]^Ze[d>>>16&255]^He[w>>>8&255]^Ve[255&p]^n[48],e=Pe[d>>>24]^Ze[w>>>16&255]^He[p>>>8&255]^Ve[255&f]^n[49],i=Pe[w>>>24]^Ze[p>>>16&255]^He[f>>>8&255]^Ve[255&d]^n[50],l=Pe[p>>>24]^Ze[f>>>16&255]^He[d>>>8&255]^Ve[255&w]^n[51],f=Pe[t>>>24]^Ze[e>>>16&255]^He[i>>>8&255]^Ve[255&l]^n[52],d=Pe[e>>>24]^Ze[i>>>16&255]^He[l>>>8&255]^Ve[255&t]^n[53],w=Pe[i>>>24]^Ze[l>>>16&255]^He[t>>>8&255]^Ve[255&e]^n[54],p=Pe[l>>>24]^Ze[t>>>16&255]^He[e>>>8&255]^Ve[255&i]^n[55],h=56),o[0]=(We[f>>>24]<<24|We[d>>>16&255]<<16|We[w>>>8&255]<<8|We[255&p])^n[h],o[1]=(We[d>>>24]<<24|We[w>>>16&255]<<16|We[p>>>8&255]<<8|We[255&f])^n[h+1],o[2]=(We[w>>>24]<<24|We[p>>>16&255]<<16|We[f>>>8&255]<<8|We[255&d])^n[h+2],o[3]=(We[p>>>24]<<24|We[f>>>16&255]<<16|We[d>>>8&255]<<8|We[255&w])^n[h+3]}}(bn(s,0,i),bn(s,i,2*i)),t.h&&gn(t),bn(s,2*i)}function Sn(t,e){return e===ft?Ne(t):e}function bn(t,e,n){return t.subarray(e,n)}class Rn extends z{constructor({password:t,rawPassword:e,passwordVerification:n,checkPasswordOnly:r}){super({start(){zn(this,t,e,n)},transform(t,e){const n=this;if(n.password||n.rawPassword){const e=Fn(n,t.subarray(0,12));if(n.password=n.rawPassword=null,0!=(e[11]^n.passwordVerification))throw new d($e);t=t.subarray(12)}r?e.error(new d(Qe)):e.enqueue(Fn(n,t))}})}}class xn extends z{constructor({password:t,rawPassword:e,passwordVerification:n}){super({start(){zn(this,t,e,n)},transform(t,e){const n=this;let r,o;if(n.password||n.rawPassword){n.password=n.rawPassword=null;const e=en(new w(12));e[11]=n.passwordVerification,r=new w(t.length+e.length),r.set(Dn(n,e),0),o=12}else r=new w(t.length),o=0;r.set(Dn(n,t),o),e.enqueue(r)}})}}function zn(t,e,r,o){n.assign(t,{password:e,rawPassword:r,passwordVerification:o}),function(t,e,r){const o=[305419896,591751049,878082192];if(n.assign(t,{R:o,F:new ve(o[0]),D:new ve(o[2])}),r)for(let e=0;e<r.length;e++)An(t,r[e]);else for(let n=0;n<e.length;n++)An(t,e.charCodeAt(n))}(t,e,r)}function Fn(t,e){const n=new w(e.length);for(let r=0;r<e.length;r++)n[r]=In(t)^e[r],An(t,n[r]);return n}function Dn(t,e){const n=new w(e.length);for(let r=0;r<e.length;r++)n[r]=In(t)^e[r],An(t,e[r]);return n}function An(t,e){let[,n]=t.R;t.F.append([e]);const r=~t.F.get();n=Tn(a.imul(Tn(n+Cn(r)),134775813)+1),t.D.append([n>>>24]);const o=~t.D.get();t.R=[r,n,o]}function In(t){const e=2|t.R[2];return Cn(a.imul(e,1^e)>>>8)}function Cn(t){return 255&t}function Tn(t){return 4294967295&t}function kn(t){if(t instanceof F)return t;const e=t.getReader();return new F({async pull(t){try{const{value:n,done:r}=await e.read();r?t.close():t.enqueue(n)}catch(t){throw e.cancel(t).catch(()=>{}),t}},cancel:t=>e.cancel(t)})}function vn(t,e){t=kn(t);const n=e?{type:e}:{};if(typeof y.prototype.stream!=pt||new y([]).stream()instanceof F)return new l(t).blob().then(t=>e?new y([t],n):t);const r=[];return t.pipeTo(new D({write(t){r.push(t)}})).then(()=>new y(r,n))}function _n(t){if(t instanceof D)return t;const e=t.getWriter();return new D({write:t=>e.write(t),close:()=>e.close(),abort:t=>e.abort(t)})}const Nn="Invalid codec definition",Un="Reserved compression method",On="Invalid codec module",Mn="Compression method not supported",Ln=[0,8,9,99],Bn=new c,Wn=new c;function Pn(t){return Bn.get(t)}function Zn(){return e.from(Bn.values(),t=>n.assign({},t,Wn.get(t.format)))}function Hn(t){return Wn.get(t)}function Vn(t,e){const{CompressionStream:n,DecompressionStream:r}=e;if(typeof n!=pt&&typeof r!=pt)throw new d(On);Wn.set(t,{CompressionStream:n,DecompressionStream:r})}const Gn="Invalid uncompressed size",jn="Invalid compressed data",qn="Codec out of memory",Yn="Invalid CRC32",Kn="deflate-raw",Xn="deflate64-raw",$n="gzip",Jn=[31,139,8];class Qn extends z{constructor(t,{chunkSize:e,CompressionStreamFallback:n,CompressionStream:r}){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,y,g,E=super.readable;const S=f&&Hn(f),b=sr(a,r,n),R=c&&o&&!l&&!S&&(!i||s)&&Boolean(b);if(i&&!s||!c||R||(h=new _e,E=ur(E,h)),o)if(S)E=lr(E,ar(S.CompressionStream,f,{level:u,chunkSize:e,compressionMethod:d,uncompressedSize:w}));else if(R)g=new tr,E=lr(E,new b($n,{level:u,chunkSize:e})),E=ur(E,g);else try{E=cr(E,a,{level:u,chunkSize:e},r,n)}catch(t){if(!a&&n)throw hr(t);let e;try{e=new r($n)}catch{throw hr(t)}E=lr(E,e),E=ur(E,new tr)}i&&(s?E=ur(E,new xn(t)):(y=new pn(t),E=ur(E,y))),ir(p,E,()=>{i&&!s||!c||(p.crc32=R?g.crc32:new m(h.value.buffer).getUint32(0))})}}class tr extends z{constructor(){let t,e=10,n=new w(0);super({transform(t,r){if(e){const n=a.min(e,t.length);if(e-=n,!(t=t.subarray(n)).length)return}const o=n.length+t.length;if(o<=8)return void(n=Ee(n,t));const i=o-8,s=a.min(i,n.length);r.enqueue(Ee(n.subarray(0,s),t.subarray(0,i-s))),n=Ee(n.subarray(s),t.subarray(i-s))},flush(){const e=be(n);t.crc32=e.getUint32(0,!0),t.uncompressedSize=e.getUint32(4,!0)}}),t=this}}class er extends z{constructor(t,{chunkSize:e,DecompressionStreamFallback:n,DecompressionStream:r}){super({});const{zipCrypto:o,encrypted:i,checkCrc32:a,crc32:s,compressed:c,useCompressionStream:l,deflate64:f,format:p,compressionMethod:h,rawBitFlag:y,outputSize:E}=t;let S,b,R,x=super.readable;if(i&&(o?x=ur(x,new Rn(t)):(b=new wn(t),x=ur(x,b))),c){const t=new u,o=p&&Hn(p);let i;if(o)x=lr(x,ar(o.DecompressionStream,p,{chunkSize:e,compressionMethod:h,rawBitFlag:y,uncompressedSize:E}),t);else{const o=sr(l,r,n);if(a&&!f&&s!==ft&&E!==ft&&o)try{i=new o($n,{chunkSize:e})}catch{i=ft}if(!i)try{x=cr(x,l,{chunkSize:e,deflate64:f},r,n,t)}catch(t){if(f||E===ft||!l&&n)throw hr(t);try{i=new r($n)}catch{throw hr(t)}}}i?(R=!0,x=function(t,e,n,r,o){const i=e.writable.getWriter(),a=e.readable.getReader(),s=r===ft?new ve:ft;let c,u,l=0,f=!1,p=!1;const h=new F({start(t){u=t},pull(){E()},cancel:t=>(p=!0,E(),a.cancel(t))});return async function(){const e=t.getReader();try{const t=new w(10);for(t.set(Jn),await i.write(t);;){await y(),await i.ready;const{value:t,done:n}=await wr(e,o);if(n)break;await i.write(t)}s&&await i.write(new w(0));const a=new w(8),c=be(a);c.setUint32(0,s?s.get():r,!0),c.setUint32(4,n,!0),f=!0,await i.write(a),await i.close()}catch(t){await fr(i,t),await dr(e,t)}}(),async function(){try{for(;;){const{value:t,done:e}=await m();if(e)break;if(l+=t.length,l>n)throw new d(Gn);s&&s.append(t),u.enqueue(t)}p||(p=!0,u.close())}catch(t){!function(t){p||(p=!0,u.error(t),E())}(t),await dr(a,t)}}(),h;function m(){return a.read().catch(t=>{if(f){if(!s)throw yr(t,Yn);if(l!=n)throw yr(t,Gn);return{done:!0}}throw pr(t,o)})}function y(){if(!p&&u.desiredSize<=0)return new g(t=>c=t)}function E(){if(c){const t=c;c=ft,t()}}}(x,i,E,s,t)):x=function(t,e){const n=t.getReader();return new F({async pull(t){try{const{value:e,done:r}=await n.read();r?t.close():t.enqueue(e)}catch(t){throw await dr(n,t),pr(t,e)}},cancel:t=>n.cancel(t)})}(x,t)}a&&!R&&(S=new _e,x=ur(x,S)),ir(this,x,()=>{if(S){const t=new m(S.value.buffer).getUint32(0,!1);if(s!=t)throw new d(Yn)}})}}const nr=new c;function rr(t,e){if(!t)return!1;let n=nr.get(t);n||(n=new c,nr.set(t,n));let r=n.get(e);if(r===ft){try{new t(e),r=!0}catch{r=!1}n.set(e,r)}return r}function or(t){return rr(t,Kn)}function ir(t,e,r){e=ur(e,new z({flush:r})),n.defineProperty(t,"readable",{get:()=>e})}function ar(t,e,n){if(!t)throw new d(Mn);return new t(e,n)}function sr(t,e,n){return t&&e?e:n&&n.requiresModule?n:void 0}function cr(t,e,n,r,o,i){const a=e&&r?r:o||r,s=n.deflate64?Xn:Kn;let c;try{c=new a(s,n)}catch(t){if(!e||!o||a==o)throw t;c=new o(s,n)}return lr(t,c,i)}function ur(t,e){return kn(t).pipeThrough(e)}function lr(t,e,n){const r=e.writable.getWriter(),o=t.getReader();return async function(){try{for(;;){await r.ready;const t=await wr(o,n);if(t.done){await r.close();break}await r.write(t.value)}}catch(t){await fr(r,t),await dr(o,t)}}(),e.readable}async function fr(t,e){try{await t.abort(e)}catch{}}async function dr(t,e){try{await t.cancel(e)}catch{}}function wr(t,e){const n=t.read();return e?n.catch(t=>{throw e.add(t),t}):n}function pr(t,e){return e.has(t)?t:yr(t,mr(t)?qn:jn)}function hr(t){return mr(t)?yr(t,qn):t}function mr(t){return Re(t)&&"Z_MEM_ERROR"==t.code}function yr(t,e){const n=new d(e);return n.cause=t,n}const gr="data",Er="deflate",Sr="inflate";class br extends z{constructor(t,e){super({});const r=this,{codecType:o}=t;let i;o.startsWith(Er)?i=Qn:o.startsWith(Sr)&&(i=er),r.outputSize=0;let a=0;const s=new i(t,e),c=super.readable,u=new z({transform(t,e){t&&t.length&&(a+=t.length,e.enqueue(t))},flush(){n.assign(r,{inputSize:a})}}),l=new z({transform(e,n){if(e&&e.length&&(n.enqueue(e),r.outputSize+=e.length,t.outputSize!==ft&&r.outputSize>t.outputSize))throw new d(Gn)},flush(){const{crc32:t}=s;n.assign(r,{crc32:t,inputSize:a})}});n.defineProperty(r,"readable",{get:()=>c.pipeThrough(u).pipeThrough(s).pipeThrough(l)})}}class Rr extends z{constructor(t){const e=[];let r=0,i=0;function a(){const n=new w(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}(!o.isFinite(t)||t<1)&&(t=262144),super({transform(n,o){for(e.push(n),r+=n.length;r>t;)i+=t,o.enqueue(a())},flush(t){r&&(i+=r,t.enqueue(function(t,e){const n=new w(e);let r=0;for(const e of t)n.set(e,r),r+=e.length;return n}(e,r)))}}),n.defineProperty(this,"outputSize",{get:()=>i})}}const xr="Worker startup timeout";let zr,Fr,Dr,Ar=()=>{};async function Ir(t){const{CompressionStream:e,CompressionStreamFallback:n}=t;return!(!n||n.requiresModule)||!(!or(e)&&(r=e,!rr(r,$n)))||!!n&&await Cr();var r}async function Cr(){if(Ar)try{return await void 0,!0}catch{}return!1}function Tr(t){t.createWorker?Fr=!0:zr=!1}class kr{constructor(t,{readable:e,writable:r},o,i){const{options:a,config:s,A:c,useWebWorkers:u,workerURI:l}=o;let{createWorker:f}=o;const{signal:d}=c;return Fr&&(f=ft),n.assign(t,{I:!0,C:(t.C||0)+1,readable:e.pipeThrough(new Rr(pe(s))).pipeThrough(new vr(c),{signal:d}),writable:r,options:n.assign({},a),T:o,workerURI:l,createWorker:f,terminate:()=>new g(e=>{const{v:n,I:r}=t;r?(t._=t._||[],t._.push(e)):(n&&(n.terminate(),t.v=null),e()),t.N=null}),U(){if(t.I){const{_:e,v:n}=t;e&&(t._=null,n&&(t.O=!0,n.terminate())),t.I=!1;const r=i(t);e&&e.forEach(t=>t(r))}}}),zr===ft&&(zr=typeof T!=wt),(u&&Dr&&(zr&&l||f)?Dr:Nr)(t,s)}}class vr extends z{constructor({onstart:t,onprogress:e,size:n,onend:r}){let o=0;super({async start(){t&&await _r(t,n)},async transform(t,r){o+=t.length,e&&await _r(e,o,n),r.enqueue(t)},async flush(){r&&await _r(r,o)}})}}async function _r(t,...e){try{await t(...e)}catch{}}function Nr(t,e){return{run:()=>Ur(t,e)}}async function Ur({options:t,readable:e,writable:n,U:r,T:o},i){let a,s,c;try{if(t.compressed&&!t.format){const e=t.codecType.startsWith(Er),n=e?i.CompressionStreamFallback:i.DecompressionStreamFallback,r=e?i.CompressionStream:i.DecompressionStream;t.useCompressionStream?n&&n.requiresModule&&!or(r)&&await u():await u()||n&&!n.requiresModule||(t.useCompressionStream=!0)}t.encrypted&&!t.zipCrypto&&await u(),a=new br(t,i),s=new Rr(pe(i));const{signal:r}=o.A;await e.pipeThrough(a).pipeThrough(s).pipeTo(n,{preventClose:!0,preventAbort:!0,signal:r});const{crc32:c,inputSize:l,outputSize:f}=a;return{crc32:c,inputSize:l,outputSize:f}}catch(t){if(a){const e=s?s.outputSize:0;if(o.outputSize=e,Re(t))try{t.outputSize=e}catch{}}throw t}finally{r()}function u(){return c||(c=Cr()),c}}const Or={type:"module"},Mr="error",Lr="abort";let Br,Wr,Pr;var Zr;function Hr(t){const{reader:e}=t;e&&e.releaseLock(),t.reader=null,t.writer=null}function Vr(t){const{v:e}=t;if(e)try{e.terminate()}catch{}t.N=null}function Gr(t,e,r,o,i=!0){const{createWorker:a}=r;let s,c,u;if(a)s=a();else if(Wr===ft||Br!==t){const n=typeof t==pt;c=n?t(i):t;const a=c.startsWith("data:"),l=c.startsWith("blob:");if(a||l){o===ft&&(o=!1),o&&(u=Or);try{s=new T(c,u)}catch(i){if(l)try{f.revokeObjectURL(c)}catch{}if(n&&l)return Gr(t,e,r,o,!1);if(o)throw i;return Gr(t,e,r,!0,!1)}}else{o===ft&&(o=!0),o&&(u=Or);try{c=new f(c,e)}catch{}try{s=new T(c,u)}catch(n){if(o)return Gr(t,e,r,!1,i);throw n}}Br=t,Wr=c,Pr=u}else s=new T(Wr,Pr);return s.addEventListener("message",t=>{r.M=!0,jr(r),async function({data:t},e){const{type:r,value:o,messageId:i,result:a,error:s,errorValue:c}=t,{reader:u,writer:l,L:f,B:p,U:h,C:m}=e,y=()=>e.C!=m;try{if(s)g(function(t,e){const{message:r,stack:o,code:i,name:a,outputSize:s,cause:c,codecImportFailed:u}=t;let l;if(l=e?e.value:n.assign(new d(r),{stack:o,code:i,name:a}),Re(l))try{s!==ft&&(l.outputSize=s),u&&(l.codecImportFailed=!0),c&&(Re(l.cause)||(l.cause=n.assign(new d(c.message),{name:c.name})),c.code!==ft&&l.cause.code!==c.code&&(l.cause.code=c.code)),e&&(l.name!==a&&(l.name=a),l.code!==i&&(l.code=i))}catch{}return l}(s,c));else{if("pull"==r){const{value:t,done:n}=await u.read();y()||Yr({type:gr,value:t,done:n,messageId:i},e)}if(r==gr){const t=new w(o);await l.ready,await l.write(t),y()||Yr({type:"ack",messageId:i},e)}"close"==r&&function(t){y()||(f(t),E(),h())}(a)}}catch(s){y()||(Vr(e),g(s))}function g(t){y()||(p(t),E(),Re(t)&&t.codecImportFailed||h())}function E(){l&&l.releaseLock()}}(t,r)}),s.addEventListener(Mr,t=>qr(t,r)),s.addEventListener("messageerror",t=>qr(t,r)),s}function jr(t){const{W:e}=t;e&&(_(e),t.W=null)}function qr(t,e){t.preventDefault&&t.preventDefault(),jr(e);const{M:r,B:o,writer:i,U:a}=e;Vr(e),r||(e.v=null);let s=t.error||new d(t.message||Mr);r||(s=n.assign(new d(s.message||Mr),{P:!0}),e.Z=s),o&&(o(s),i&&i.releaseLock(),r&&a())}function Yr(t,{v:e,writer:n}){try{const{value:n}=t;if(n){t.value=Se(n);try{e.postMessage(t,[t.value.buffer])}catch{e.postMessage(t)}}else e.postMessage(t)}catch(t){throw n&&n.releaseLock(),t}}Zr=function(t,e){const{baseURI:r,chunkSize:i,workerStartupTimeout:a}=e;let{wasmURI:s}=e;if(!t.N){let c;typeof s==pt&&(s=s());try{c=Gr(t.workerURI,r,t)}catch{return Tr(t),Nr(t,e)}n.assign(t,{v:c,M:!1,O:!1,Z:null,N:{run:async()=>{try{return await async function(t,e){if(!t.v){const{Z:e}=t;t.Z=null;const n=e||new d(xr);throw n.P=!0,n}let r,i;const a=new g((e,n)=>{r=e,i=e=>{const{outputSize:r,T:o}=t;if(o.outputSize=r,Re(e))try{e.outputSize=r}catch{}n(e)}});n.assign(t,{reader:null,writer:null,outputSize:0,H:!1,V:null,L:r,B:i,result:a});const{readable:s,options:c}=t,{writable:u,closed:l,G:f}=function(t,e){const r=new AbortController;let o;const{writable:i,readable:a}=new z({transform(t,n){e.outputSize+=t.length,n.enqueue(t)}}),s=a.pipeTo(t,{preventClose:!0,preventAbort:!0,signal:r.signal});s.catch(t=>{o||n.assign(e,{H:!0,V:t})});const{signal:c}=e.T.A;if(c){const t=()=>r.abort(c.reason),e=()=>c.removeEventListener(Lr,t);c.addEventListener(Lr,t),s.then(e,e)}return{writable:i,closed:s,G:()=>{o=!0,r.abort()}}}(t.writable,t);try{Yr({type:"start",options:c,config:e},t)}catch(e){f();try{await l}catch{}throw t.U(),e}n.assign(t,{reader:s.getReader(),writer:u.getWriter()});const{workerStartupTimeout:w}=e;!t.M&&o.isFinite(w)&&w>=0&&(t.W=v(()=>function(t){if(t.W=null,t.M)return;const{B:e,writer:n}=t;if(Vr(t),t.v=null,e){const t=new d(xr);t.P=!0,e(t),n&&n.releaseLock()}}(t),w));try{const t=await a;return await p(),await l,t}catch(e){await p(),f();try{await l}catch{}const{outputSize:n,T:r,H:o,V:i}=t;r.outputSize=n;const a=Re(e)&&(e.codecImportFailed||e.P),s=o&&!a?i:e;if(Re(s))try{s.outputSize=n}catch{}throw s}async function p(){if(!u.locked)try{await u.getWriter().close()}catch{}}}(t,{chunkSize:i,wasmURI:s,baseURI:r,workerStartupTimeout:a})}catch(n){if(n&&n.P)return Tr(t),Hr(t),Ur(t,e);if(n&&n.codecImportFailed){if(t.reader)return Hr(t),Ur(t,e);t.U()}throw n}}}})}return t.N},Dr=Zr;let Kr=[];const Xr=[];let $r,Jr,Qr=0;async function to(t,e){const{options:n,config:r}=e,{useWebWorkers:i,useCompressionStream:a,compressed:s,checkCrc32:c,computeCrc32:u,encrypted:l,format:d,codecURI:w}=n,{workerURI:p,createWorker:h,maxWorkers:m}=r;d&&(w&&(n.codecURI=function(t,e){try{return new f(t,e).toString()}catch{return t}}(w,r.baseURI)),await async function(t,e){!Wn.has(t)&&e&&Vn(t,await(import(/* webpackIgnore: true */ /* @vite-ignore */e)))}(d,n.codecURI));const y=!(s||c||u||l),E=d===ft||Boolean(n.codecURI);return e.useWebWorkers=!y&&E&&(i||i===ft&&r.useWebWorkers),e.workerURI=e.useWebWorkers&&p?p:ft,e.createWorker=e.useWebWorkers&&h?h:ft,n.useCompressionStream=a||a===ft&&r.useCompressionStream,(await async function(){const n=Kr.find(t=>!t.I);if(n)return so(n),new kr(n,t,e,S);if(Kr.length<m){const n={j:Qr};return Qr++,Kr.push(n),new kr(n,t,e,S)}return new g(n=>{Xr.push({resolve:n,stream:t,T:e}),Jr=r.workerStarvationTimeout,eo()})}()).run();function S(t){if(no(),t.O)return t.O=!1,oo();if(Xr.length){const[{resolve:e,stream:n,T:r}]=Xr.splice(0,1);e(new kr(t,n,r,S)),eo()}else t.v?(so(t),function(t,e){const{config:n}=e,{terminateWorkerTimeout:r}=n;o.isFinite(r)&&r>=0&&(t.Y=v(async()=>{Kr=Kr.filter(e=>e!=t);try{await t.terminate()}catch{}},r))}(t,e)):Kr=Kr.filter(e=>e!=t)}}function eo(){!$r&&Xr.length&&o.isFinite(Jr)&&Jr>=0&&($r=v(ro,Jr))}function no(){$r&&(_($r),$r=null)}function ro(){if($r=null,Xr.length){const[{resolve:t,stream:e,T:n}]=Xr.splice(0,1);t(new kr({},e,io(n),ao)),eo()}}function oo(){const t=Xr.splice(0).map(({resolve:t,stream:e,T:n})=>new g(r=>{t(new kr({},e,io(n),()=>{ao(),r()}))}));return no(),g.all(t)}function io(t){return n.assign({},t,{useWebWorkers:!1,workerURI:ft,createWorker:ft})}function ao(){no(),eo()}function so(t){const{Y:e}=t;e&&(_(e),t.Y=null)}const co="\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 uo(t,e){return fo(t,e,!0)}function lo(t){if(!t.some(t=>t>127))return!1;try{return new S("utf-8",{fatal:!0}).decode(t),!0}catch{return!1}}function fo(t,e,n){return e&&"cp437"==e.trim().toLowerCase()?function(t){let e="";for(let n=0;n<t.length;n++)e+=co[t[n]];return e}(t):new S(e,{ignoreBOM:n}).decode(t)}const wo="HTTP error ",po="HTTP Range not supported",ho="HTTP resource changed",mo="Writer iterator completed too soon",yo="Writer not initialized",go="Invalid writer (size must be writable)",Eo="Content-Range",So="Range",bo="GET",Ro="bytes",xo=16777216,zo="writable",Fo=k();class Do{constructor(){this.size=0}init(){this.initialized=!0}}class Ao extends Do{get readable(){return this.createReadable()}createReadable({offset:t=0,size:e,chunkSize:n=pe(we())}={}){const r=this;let o=0;return n=he(n),new F({async pull(i){const s=e===ft?n:a.min(n,e-o),c=await di(r,t+o,s);c.length&&(i.enqueue(c),o+=c.length),(e!==ft&&o>=e||!c.length&&s)&&i.close()}})}}class Io extends Do{constructor(){super();const t=this,e=new D({write(e){if(!t.initialized)throw new d(yo);return t.writeUint8Array(Se(e))}});n.defineProperty(t,zo,{get:()=>e})}writeUint8Array(){}}class Co extends Ao{constructor(t){super();let e=t.length;for(;"="==t.charAt(e-1);)e--;const r=t.indexOf(",")+1;n.assign(this,{K:t,X:r,size:a.floor(.75*(e-r))})}readUint8Array(t,e){const{X:n,K:r}=this,o=new w(e),i=4*a.floor(t/3),s=atob(r.substring(i+n,4*a.ceil((t+e)/3)+n)),c=t-3*a.floor(i/4);let u=0;for(let t=c;t<c+e&&t<s.length;t++)o[t-c]=s.charCodeAt(t),u++;return u<o.length?o.subarray(0,u):o}}class To extends Io{constructor(t){super(),n.assign(this,{contentType:t,data:"data:"+(t||"")+";base64,",$:""})}writeUint8Array(t){const e=this;let n,o=e.$;const i=e.$.length;for(e.$="",n=0;n<3*a.floor((i+t.length)/3)-i;n++)o+=r.fromCharCode(t[n]);for(;n<t.length;n++)e.$+=r.fromCharCode(t[n]);o.length>2?e.data+=x(o):e.$=o+e.$}getData(){return this.data+x(this.$)}}let ko,vo;class _o extends Ao{constructor(t){super(),n.assign(this,{J:t,size:t.size}),vo||(vo=(async()=>{try{const t=new y([new w(3)]).slice(1,2).stream().getReader();let e=0,n=await t.read();for(;!n.done;)e+=n.value.length,n=await t.read();ko=1==e}catch{ko=!1}})())}createReadable(t){const{J:e,size:n}=this,{offset:r=0,size:o=n-r}=t||{};if(typeof e.stream==pt){if(!r&&o>=n)return kn(e.stream());if(ko)return kn(e.slice(r,r+o).stream())}return super.createReadable(t)}async readUint8Array(t,e){const n=this,r=t+e,o=!t&&r>=n.size?n.J:n.J.slice(t,r);let i=await o.arrayBuffer();return i.byteLength>e&&(i=i.slice(t,r)),new w(i)}}class No extends Do{constructor(t){super();const e=this,r=new z;n.defineProperty(e,zo,{get:()=>r.writable}),e.contentType=t,e.et=vn(r.readable,t),e.et.catch(()=>{})}getData(){return this.et}}class Uo extends _o{constructor(t){super(new y([t],{type:"text/plain"}))}}function Oo(t){let e=0;for(let n=0;n<t.length;n++){const r=t.charCodeAt(n);r<128?e+=1:r<2048?e+=2:r<55296||r>=57344?e+=3:r<56320&&56320==(64512&t.charCodeAt(n+1))?(e+=4,n++):e+=3}return e}class Mo extends No{constructor(t){super(),n.assign(this,{encoding:t,nt:!t||"utf-8"==t.toLowerCase()})}async getData(){const{encoding:t,nt:e}=this,n=await super.getData();return n.text&&e?n.text():function(t,e){return fo(t,e,!1)}(new w(await n.arrayBuffer()),t)}}class Lo extends Ao{constructor(t,e){super(),Wo(this,t,e)}async init(){await Po(this,ti,Xo),super.init()}createReadable(t){const e=this,{useRangeHeader:n,forceRangeRequests:r,size:o,ot:i}=e;if((n||r)&&o!==ft){const{offset:n=0,size:r=o-n}=t||{},s=i&&n>=o-i.length;if(r>0&&n<o&&!s)return function(t,e,n){let r,o=e,i=0,s=n;return new F({start:()=>c(),async pull(t){r||await c();const{value:e,done:n}=await r.read();if(n)throw new d(po);const o=e.length>i?e.subarray(0,i):e;i-=o.length,s-=o.length,o.length&&t.enqueue(o),i||(await async function(){const t=r;r=ft,await t.cancel()}(),s||t.close())},cancel:t=>r&&r.cancel(t)});async function c(){const e=a.min(t.maximumRangeSize,s),n=await ti(bo,t,Yo(t,o,e));if(206!=n.status)throw new d(po);const c=Ho(n);if(c!==ft&&c!=o)throw new d(po);qo(t,n),jo(t,n),o+=e,i=e,r=n.body.getReader()}}(e,n,a.min(r,o-n))}return super.createReadable(t)}readUint8Array(t,e){return Zo(this,t,e,ti,Xo)}}class Bo extends Ao{constructor(t,e){super(),Wo(this,t,e)}async init(){await Po(this,ei,$o),super.init()}readUint8Array(t,e){return Zo(this,t,e,ei,$o)}}function Wo(t,e,r){const{preventHeadRequest:o,useRangeHeader:i,forceRangeRequests:a,combineSizeEocd:s,checkResourceChanges:c=!0,maximumRangeSize:u=xo,fetch:l}=r;delete(r=n.assign({},r)).preventHeadRequest,delete r.useRangeHeader,delete r.forceRangeRequests,delete r.combineSizeEocd,delete r.checkResourceChanges,delete r.maximumRangeSize,delete r.useXHR,delete r.fetch,n.assign(t,{url:e,options:r,preventHeadRequest:o,useRangeHeader:i,forceRangeRequests:a,combineSizeEocd:s,checkResourceChanges:c,maximumRangeSize:u,fetch:l})}async function Po(t,e,n){const{url:r,preventHeadRequest:o,useRangeHeader:i,forceRangeRequests:a,combineSizeEocd:s}=t;if(function(t){const{baseURI:e}=we(),{protocol:n}=new f(t,e);return"http:"==n||"https:"==n}(r)&&(i||a)&&(typeof o==wt||o)){const r=await e(bo,t,Yo(t,s?-65557:void 0)),o=r.headers.get("Accept-Ranges");if(!(a||o&&o.toLowerCase()==Ro))throw new d(po);{let o;s&&206==r.status&&(o=new w(await r.arrayBuffer())),jo(t,r);const i=Vo(r);i===ft?await Qo(t,e,n):t.size=i,o&&o.length&&Ho(r)===t.size-o.length&&(t.ot=o)}}else await Qo(t,e,n)}async function Zo(t,e,n,r,o){const{useRangeHeader:i,forceRangeRequests:a,ot:s,size:c,options:u}=t;if(i||a){if(e>=c||0===n)return gt;{if(e+n>c&&(n=c-e),s&&e>=c-s.length){const t=e-(c-s.length);return s.slice(t,t+n)}const o=await r(bo,t,Yo(t,e,n));if(206!=o.status)throw new d(po);const i=Ho(o);if(i!==ft&&i!=e)throw new d(po);qo(t,o),jo(t,o);const a=new w(await o.arrayBuffer());if(a.length!=n)throw new d(po);return a}}{const{data:r}=t;return r||await o(t,u),t.data.subarray(e,e+n)}}function Ho(t){const e=t.headers.get(Eo);if(e){const t=o(e.trim().split(/[\s-]+/)[1]);if(!o.isNaN(t))return t}}function Vo(t){const e=t.headers.get(Eo);if(e){const t=e.trim().split(/\s*\/\s*/)[1];if(t&&"*"!=t){const e=o(t);if(!o.isNaN(e))return e}}}function Go({headers:t}){return{it:t.get("Etag")||ft,lastModified:t.get("Last-Modified")||ft}}function jo(t,e){const{checkResourceChanges:n,st:r}=t;n&&!r&&206==e.status&&(t.st=Go(e))}function qo(t,e){const{checkResourceChanges:r,st:o,size:i}=t;if(r){const t=Vo(e);if(t!==ft&&i!==ft&&t!=i)throw new d(ho);if(o){const t=Go(e);if(n.entries(o).some(([e,n])=>n!==ft&&t[e]!==ft&&n!=t[e]))throw new d(ho)}}}function Yo(t,e=0,r=1){return n.assign({},Ko(t),{[So]:Ro+"="+(e<0?e:e+"-"+(e+r-1))})}function Ko({options:t}){const{headers:e}=t;if(e)return k.iterator in e?n.fromEntries(e):e}async function Xo(t){await Jo(t,ti)}async function $o(t){await Jo(t,ei)}async function Jo(t,e){const n=await e(bo,t,Ko(t));t.data=new w(await n.arrayBuffer()),t.size=t.data.length}async function Qo(t,e,n){if(t.preventHeadRequest)await n(t,t.options);else{const r=await e("HEAD",t,Ko(t)),i=r.headers.get("Content-Length");i&&!r.headers.get("Content-Encoding")?t.size=o(i):await n(t,t.options)}}async function ti(t,{fetch:e=fetch,options:r,url:o},i){const a=await e(o,n.assign({},r,{method:t,headers:i}));if(a.status>=200&&a.status<=299)return a;throw 416==a.status?new d(po):new d(wo+(a.statusText||a.status))}function ei(t,{url:e},r){return new g((o,i)=>{const a=new XMLHttpRequest;if(a.addEventListener("load",()=>{if(a.status>=200&&a.status<=299){const t=[];a.getAllResponseHeaders().trim().split(/[\r\n]+/).forEach(e=>{const n=e.trim().split(/\s*:\s*/);n[0]=n[0].trim().replace(/^[a-z]|-[a-z]/g,t=>t.toUpperCase()),t.push(n)}),o({status:a.status,arrayBuffer:()=>a.response,headers:new c(t)})}else i(416==a.status?new d(po):new d(wo+(a.statusText||a.status)))},!1),a.addEventListener("error",t=>i(t.detail?t.detail.error:new d("Network error")),!1),a.open(t,e),r)for(const t of n.entries(r))a.setRequestHeader(t[0],t[1]);a.responseType="arraybuffer",a.send()})}class ni extends Ao{constructor(t,e={}){super(),n.assign(this,{url:t,reader:e.useXHR&&!e.fetch?new Bo(t,e):new Lo(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 ri extends Ao{constructor(t){super(),t=new w(t.buffer,t.byteOffset,t.byteLength),n.assign(this,{ct:t,size:t.length})}readUint8Array(t,e){return this.ct.slice(t,t+e)}}class oi extends Io{constructor(t){super(),this.ut=t||262144}init(t=0){n.assign(this,{offset:0,ct:new w(t>0?t:this.ut)}),super.init()}writeUint8Array(t){const e=this,n=e.offset+t.length;if(n>e.ct.length){let t=e.ct.length?2*e.ct.length:e.ut;for(;t<n;)t*=2;const r=e.ct;e.ct=new w(t),e.ct.set(r)}e.ct.set(t,e.offset),e.offset+=t.length}getData(){return this.offset===this.ct.length?this.ct:this.ct.slice(0,this.offset)}}class ii extends Ao{constructor(t){super(),this.lt=t}async init(){const t=this;t.ft=0;const e=t.lt=await g.all(t.lt.map(fi));t.wt=e.map(e=>{const n=t.size;return t.size+=e.size,n}),super.init()}ht(t){const{wt:e,size:n}=this,r=e[t];return r===ft?n:r}async readUint8Array(t,e){const n=this,{lt:r}=this;let o,i=0,s=t;for(;r[i]&&s>=r[i].size;)s-=r[i].size,i++;const c=r[i];if(c){const r=c.size;if(s+e<=r)o=await di(c,s,e);else{const i=r-s;o=Ee(await di(c,s,i),await n.readUint8Array(t+i,e-i))}}else o=gt;return n.ft=a.max(i,n.ft),o}}class ai extends Do{constructor(t,e=4294967295){super();const r=this;let o,i,a;n.assign(r,{diskNumber:0,diskOffset:0,size:0,maxSize:e,availableSize:e});const s=new D({async write(e){if(e===Fo)return void(a&&await u());const{availableSize:n}=r;if(a)e.length>=n?(await c(e.subarray(0,n)),await u(),e.length>n&&await this.write(e.subarray(n))):await c(e);else{const{value:n,done:s}=await t.next();if(s&&!n)throw new d(mo);o=n,o.size=0,o.maxSize&&(r.maxSize=o.maxSize),r.availableSize=r.maxSize,await li(o),i=n.writable,a=i.getWriter(),await this.write(e)}},async close(){a&&(await a.ready,await l())},async abort(t){a&&await a.abort(t)}});async function c(t){const e=t.length;e&&(await a.ready,await a.write(t),o.size+=e,r.availableSize-=e)}async function u(){await l(),r.diskOffset+=o.size,r.diskNumber++,a=null,r.availableSize=r.maxSize}async function l(){await a.close()}n.defineProperty(r,zo,{get:()=>s})}async closeDisk(){const t=this.writable.getWriter();try{await t.ready,await t.write(Fo)}finally{t.releaseLock()}}}class si{constructor(t){return e.isArray(t)&&(t=new ii(t)),(t instanceof F||typeof t.getReader==pt)&&(t={readable:kn(t)}),t}}class ci{constructor(t){t.writable===ft&&typeof t.next==pt&&(t=new ai(t)),(t instanceof D||typeof t.getWriter==pt)&&(t={writable:_n(t)});try{t.size=t.size===ft?0:t.size}catch{throw new d(go)}return t}}function ui(t){return Boolean(t&&t.getData)}async function li(t,e){if(!t.init||t.initialized)return g.resolve();await t.init(e)}async function fi(t){return t=new si(t),await li(t),t.size!==ft&&t.readUint8Array||(t=new _o(await vn(t.readable)),await li(t)),t}function di(t,e,n){return t.readUint8Array(e,n)}function wi(t,e){return t.createReadable?t.createReadable(e):t.readUint8Array?Ao.prototype.createReadable.call(t,e):t.readable}function pi(t,e,n){if(!t.some(t=>t.reason==e)){const r={reason:e};n!==ft&&(r.filename=n),t.push(r)}}const hi="filename",mi="rawFilename",yi="comment",gi="rawComment",Ei="uncompressedSize",Si="compressedSize",bi="offset",Ri="diskNumberStart",xi="lastModDate",zi="rawLastModDate",Fi="lastAccessDate",Di="rawLastAccessDate",Ai="creationDate",Ii="rawCreationDate",Ci="internalFileAttributes",Ti="externalFileAttributes",ki="msdosAttributesRaw",vi="msdosAttributes",_i="msDosCompatible",Ni="zip64",Ui="encrypted",Oi="version",Mi="versionMadeBy",Li="zipCrypto",Bi="directory",Wi="executable",Pi="compressionMethod",Zi="signature",Hi="extraField",Vi="unixMode",Gi="setuid",ji="setgid",qi="sticky",Yi=[hi,mi,Ei,Si,xi,zi,yi,gi,Fi,Di,Ai,Ii,bi,Ri,Ci,Ti,ki,vi,_i,Ni,Ui,Oi,Mi,Li,Bi,Wi,"symlink",Pi,Zi,"crc32",Hi,"extraFieldUnix","extraFieldInfoZip","extraFieldUnixType1","extraFieldPkwareUnix","uid","gid",Vi,"unixExternalUpper",Gi,ji,qi,"bitFlag","rawBitFlag","filenameLength","extraFieldLength","filenameUTF8","commentUTF8","rawExtraField","extraFieldZip64","extraFieldUnicodePath","extraFieldUnicodeComment","extraFieldAES","extraFieldNTFS","extraFieldExtendedTimestamp","extraFieldUSDZ"];class Ki{constructor(t){Yi.forEach(e=>this[e]=t[e])}}const Xi=new u([1,$,10,J,28789,25461,Q,tt,et,22613,13]);function $i(t,e,n){return t?e?12:16+4*n:0}const Ji="File format is not recognized",Qi="End of central directory not found",ta="End of Zip64 central directory locator not found",ea="Central directory header not found",na="Local file header not found",ra="Zip64 extra field not found",oa="File contains encrypted entry",ia="Encryption method not supported",aa="Split zip file",sa="Overlapping entry found",ca="Entry data out of bounds",ua="Ambiguous archive",la="Encrypted central directory is not supported",fa="Unsafe filename",da="Invalid strictness (must be 'strict', 'balanced' or 'tolerant')",wa="Invalid filenameValidation (must be 'strict', 'balanced' or 'tolerant')",pa="Invalid maxAppendedDataSize (must be a number greater than or equal to 0)",ha="64-bit value exceeds Number.MAX_SAFE_INTEGER",ma="unsorted central directory",ya="unknown version needed to extract",ga="compressed patched data",Ea="malformed extra field",Sa="unknown zip64 extensible data",ba="wrapped entries count",Ra="appended data",xa="prepended data",za="prepended central directory",Fa="trailing central directory data",Da="mismatched central directory offset",Aa="missing zip64 extra field",Ia="duplicate filename",Ca="mismatched zip64 end of central directory record",Ta="multiple end of central directory records",ka="mismatched local file header (filename)",va="mismatched local file header (general purpose bit flag)",_a="mismatched local file header (compression method)",Na="mismatched local file header (crc32 or sizes)",Ua=/^[a-zA-Z]:/,Oa=/(^|[\\/])\.\.([\\/]|$)/,Ma="utf-8",La="cp437",Ba=[[Ei,O],[Si,O],[bi,O],[Ri,M]],Wa={[M]:{yt:Ds,bytes:4},[O]:{yt:As,bytes:8}},Pa=i(o.MAX_SAFE_INTEGER);class Za{constructor(t,e={}){n.assign(this,{reader:new si(t),options:e,gt:{Et:new u,St:[],bt:[]}})}async*getEntriesGenerator(t={}){const e=this;let{reader:r}=e;if(await li(r),r.size!==ft&&r.readUint8Array||(r=new _o(await vn(r.readable)),await li(r)),r.size<Y)throw new d(Ji);const o=e.warnings=[],i=us(t,e.options),s=i==Mt,c=i!=Bt,l=ds(Ss(e,t,vt),i),f=function(t,e){if(t===ft)return e;if(!cs(t))throw new d(wa);return t}(Ss(e,t,"filenameValidation"),i),p=Ss(e,t,"normalizeFilename"),{Rt:h,xt:m}=await ws(r,c,l);if(!h)throw await async function(t){return await ss(t)==W}(r)?new d(aa):new d(Qi);c&&m>1&&Es(Ta);const y=be(h);let g=Ds(y,12),E=Ds(y,16);const S=h.offset,b=Fs(y,20),R=S+Y+b,x=r.size-R;x>l&&Es(Ra),x>0&&pi(o,Ra);let F=Fs(y,4);const D=r.ft||0;let A,I,C,T,k,v=Fs(y,6),_=Fs(y,10),N=0,U=X;const P=E==O||g==O||_==M||v==M;if(E!=O&&v!=M&&(E+=as(r,v)),P){const t=h.offset>=K?await di(r,h.offset-K,K):gt,e=be(t);if(t.length==K&&Ds(e,0)==j){E=as(r,Ds(e,4))+As(e,8);let t=await di(r,E,X),i=be(t);const c=h.offset-K-X;if((t.length<X||Ds(i,0)!=G)&&E!=c&&c>=0){const e=E;E=c,E>e&&(N=E-e),t=await di(r,E,X),i=be(t)}if(t.length<X||Ds(i,0)!=G)throw new d(ta);if(C=!0,T=As(i,4)>44,T){const t=a.min(As(i,4)-44,r.size-E-X);t>0&&(U+=t,k=function(t){const e={rawExtensibleData:t};if(t.length>=28){const r=be(t),o=Fs(r,26);n.assign(e,{compressionMethod:Fs(r,0),compressedSize:As(r,2),uncompressedSize:As(r,10),encryptionAlgorithm:Fs(r,18),bitLength:Fs(r,20),flags:Fs(r,22),hashAlgorithm:Fs(r,24),hashData:t.subarray(28,28+o)})}return e}(await di(r,E+X,t)))}F==M?F=Ds(i,16):F!=Ds(i,16)&&gs(s,o,Ca),v==M?v=Ds(i,20):v!=Ds(i,20)&&gs(s,o,Ca),_==M?_=As(i,32):_!=As(i,32)&&gs(s,o,Ca),g==O?g=As(i,40):g!=As(i,40)&&gs(s,o,Ca),E=as(r,v)+As(i,48)+N}else if(E==O||g==O||v==M)throw new d(ta)}let V=g;const $=h.offset-(C?U+K:0);if(E>=r.size&&(N=r.size-E-g-Y,E=r.size-g-Y),D!=F)throw new d(aa);if(E<0)throw new d(Ji);let J=0,Q=await di(r,E,g),tt=be(Q);if(g){if(Q.length<4)throw new d(Ji);let t=$-g;if(E!=t&&v==F){const e=Ds(tt,J)==H||Boolean(k&&k.compressedSize)||ja(tt);let n=!e;if(t>=0&&t+4<=r.size){const o=await Ya(r,t);if(e)n=o;else if(!o){const e=await async function(t,e){const n=a.max(0,e-65541),r=await di(t,n,e-n),o=be(r);for(let t=r.length-6;t>=0;t--)if(Ds(o,t)==Z&&t+6+Fs(o,t+4)==r.length)return n+t}(r,$),n=e-g;e!==ft&&n>=0&&await Ya(r,n)&&(t=n)}}if(n){const n=E;if(E=t,Q=await di(r,E,g),tt=be(Q),E>n)N+=E-n,A=e;else{gs(s,o,Da);const t=E-n;if(Q.length>=q){const e=Ds(tt,42);!await Ka(r,e,B)&&await Ka(r,e+t,B)&&(N+=t)}}}}}const et=$-E;if(g!=et&&et>=0&&v==F&&(g=et,Q=await di(r,E,g),tt=be(Q)),E<0||E>=r.size)throw new d(Ji);e.directoryOffset=E,e.directoryLength=V;const nt=bs(e,t,"decryptCentralDirectory");let ct,ut;if(nt&&_&&Q.length>=4&&Ds(tt,0)!=H&&(T||ja(tt))){const t=function(t,e,n){const r=t&&t.compressedSize?t.compressedSize:e;return r>0&&r<=n?r:n}(k,V,Q.length);ut=Q.subarray(t),Q=await nt(Q.subarray(0,t),k),tt=be(Q),V=Q.length,ct=!0}k&&!ct&&(Q.length<4||Ds(tt,0)==H)&&pi(o,Sa),I=E;const lt=Ss(e,t,"filenameEncoding"),dt=Ss(e,t,"commentEncoding"),wt=new u;let pt,ht=-1;const mt=!s&&!C;!_&&mt&&(_=qa(tt,Q,J),_&&pi(o,ba));for(let i=0;i<_;i++){const c=new Ga(r,e.options);if(J+q>Q.length||Ds(tt,J)!=H){if(0==i&&!ct&&(T||ja(tt)))throw new d(la);throw new d(ea)}$a(c,tt,J+6);const u=Boolean(c.bitFlag.languageEncodingFlag),l=J+q,h=l+c.filenameLength+c.extraFieldLength,m=Fs(tt,J+4),y=!(m>>8),g=m>>8==3,E=Fs(tt,J+32),S=h+E,b=new w(Q.subarray(l,S)),R=b.subarray(0,c.filenameLength),x=b.subarray(c.filenameLength+c.extraFieldLength),F=u||!lt&&lo(R),D=u||!dt&&lo(x),A=Ds(tt,J+38),C=A&L,k={readOnly:Boolean(1&C),hidden:Boolean(2&C),system:Boolean(4&C),directory:Boolean(16&C),archive:Boolean(32&C)},v=Ds(tt,J+42),U=bs(e,t,"decodeText")||uo,O=F?Ma:lt||La,B=D?Ma:dt||La;let W=U(R,O,Ut);W===ft&&(W=uo(R,O));let P,Z=U(x,B,Ot);Z===ft&&(Z=uo(x,B)),n.assign(c,{index:i,zt:ct,versionMadeBy:m,msDosCompatible:y,zip64:!1,compressedSize:0,uncompressedSize:0,Ft:E,offset:v,diskNumberStart:Fs(tt,J+34),internalFileAttributes:Fs(tt,J+36),externalFileAttributes:A,msdosAttributesRaw:C,msdosAttributes:k,rawFilename:R,filenameUTF8:F,commentUTF8:D,rawExtraField:b.subarray(c.filenameLength,c.filenameLength+c.extraFieldLength),rawComment:x,filename:W,comment:Z});try{P=Ja(c,c,tt,J+6)}catch(t){if(s||t.message!=ra)throw t;c.Dt=!0,pi(o,Aa,c.filename)}if(W=c.filename,p){const t=p(W);t!==ft&&(W=c.filename=t)}if(fs(W,f)){const t=new d(fa);throw t.filename=W,t}P&&pi(o,Ea,W),c.offset+=N;const V=as(r,c.diskNumberStart)+c.offset;I=a.min(V,I),V<ht&&pi(o,ma,W),ht=V,(c.version&L)>63&&pi(o,ya,W),32&~c.rawBitFlag||pi(o,ga,W),wt.has(c.filename)&&(pt=!0),wt.add(c.filename);const G=c.externalFileAttributes>>16&M;c.unixMode===ft&&16877&G&&(c.unixMode=G);const j=Boolean(c.unixMode&it),Y=Boolean(c.unixMode&at),K=Boolean(512&c.unixMode),X=40960==((c.unixMode===ft?G:c.unixMode)&rt),$=c.unixMode!==ft&&(c.unixMode&rt)==ot||(G&rt)==ot||y&&k.directory||c.filename.endsWith(st),et=!X&&!$&&(c.unixMode!==ft?!!(73&c.unixMode):g&&!!(73&G));n.assign(c,{setuid:j,setgid:Y,sticky:K,symlink:X,unixExternalUpper:G,executable:et,directory:$,zipCrypto:c.encrypted&&!c.extraFieldAES});const nt=new Ki(c);if(nt.getData=(t,n)=>c.getData(t,nt,e.gt,n),nt.arrayBuffer=async t=>{const r=new z,o=vn(r.readable).then(t=>t.arrayBuffer());return o.catch(()=>{}),await c.getData(r,nt,e.gt,n.assign({},t,{preventClose:!1})),o},J=S,i==_-1&&mt){const t=qa(tt,Q,J);t&&(_+=t,pi(o,ba))}const{onprogress:ut}=t;if(ut)try{await ut(i+1,_,new Ki(c))}catch{}yield nt}let yt=J,Et=Xa(Q.subarray(J))||(ct?Xa(ut):ft);if(!Et&&!ct){const t=E+J,e=a.min($-t,65541);e>=6&&(Et=Xa(await di(r,t,e)))}Et&&(e.digitalSignature=Et,yt=J+6+Et.length),(J!=V&&yt!=V||!ct&&J!=g&&yt!=g)&&gs(s,o,Fa),pt&&gs(s,o,Ia);const St=Ss(e,t,"extractPrependedData"),bt=Ss(e,t,"extractAppendedData"),Rt=(s||St)&&_&&4==I&&await async function(t){const e=await ss(t);return e==W||808471376==e}(r)?4:0;return s&&(N>0||_&&I>Rt)&&Es(xa),(N>0||_&&I>4)&&pi(o,xa),A&&pi(o,za),St&&(e.prependedData=I>Rt?await di(r,Rt,I-Rt):gt),e.comment=b?await di(r,S+Y,b):gt,bt&&(e.appendedData=R<r.size?await di(r,R,r.size-R):gt),!0}async getEntries(t={}){const e=[];for await(const n of this.getEntriesGenerator(t))e.push(n);return e}async close(){const{reader:t}=this;t.readUint8Array||!t.readable||t.readable.locked||await t.readable.cancel()}[Et](){return this.close()}}class Ha{constructor(t={}){let r;const{readable:o,writable:i}=new z({start(t){r=t}}),a=new Za(o,t),s=a.getEntriesGenerator(),c=new u;this.readable=new F({async pull(t){const{done:e,value:r}=await s.next();if(e)return t.close();const o=function(t,e){const{readable:n,writable:r}=new z;let o;const i={cancel:async t=>{e.delete(i),await(o?o.cancel(t):n.cancel(t))}};return i.readable=new F({async pull(a){o||(o=n.getReader(),e.add(i),async function(){try{await t.getData(r,{preventClose:!1})}catch(t){try{await r.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,c),i={...r,readable:o.readable};delete i.getData,n.defineProperties(i,{localDirectory:{get:()=>r.localDirectory,enumerable:!0},warnings:{get:()=>r.warnings,enumerable:!0}}),t.enqueue(i)},async cancel(t){const n=e.from(c);c.clear(),r.error(t),await g.allSettled(n.map(e=>e.cancel(t))),await g.allSettled([s.return(),a.close()])}}),this.writable=i}}async function Va(t,e={}){if(t=new si(t),await li(t),t.size!==ft&&t.readUint8Array||(t=new _o(await vn(t.readable)),await li(t)),t.size<Y)return!1;const n=us(e,{}),r=n!=Bt,o=ds(e[vt],n),{Rt:i,xt:a}=await ws(t,r,o);if(!i||n==Mt&&a>1)return!1;const s=Fs(be(i),20),c=i.offset+Y+s;return t.size-c<=o}let Ga=class{constructor(t,e){n.assign(this,{reader:t,options:e})}async getData(t,e,r,o={}){const i=this;if(i.Dt)throw new d(ra);const s=we(),{reader:c,index:u,offset:l,diskNumberStart:f,extraFieldAES:w,extraFieldZip64:p,compressionMethod:h,bitFlag:m,rawBitFlag:y,crc32:g,rawLastModDate:E,uncompressedSize:S,compressedSize:b}=i,{dataDescriptor:R}=m,x=e.localDirectory={},z=e.warnings=[],F=as(c,f)+l,A=await di(c,F,ct),I=be(A);let C=Ss(i,o,St),T=Ss(i,o,bt);const k=Xt(Ss(i,o,Rt)),v=Boolean(k),_=!0===k;if(Kt(C,T),C=C&&C.length?C:ft,T=T&&T.length?T:ft,w&&99!=w.originalCompressionMethod)throw new d(Mn);if(A.length<ct||Ds(I,0)!=B)throw new d(na);$a(x,I,4);const{extraFieldLength:N,filenameLength:U}=x,O=x.dataOffset=F+ct+U+N,M=Ss(i,o,"checkLocalDirectory"),W=us(o,i.options),P=function(t,e){return t===ft?e!=Bt:Boolean(t)}(M,W),Z=Ss(i,o,"checkLocalFilename"),H=function(t,e){return t===ft?e==Mt:Boolean(t)}(Z===ft?M:Z,W);let V=gt;if(H&&(U||N)){const t=await di(c,F+ct,U+N);V=t.subarray(0,U),x.rawExtraField=t.subarray(U)}else x.rawExtraField=N?await di(c,F+ct+U,N):gt;H&&(x.rawFilename=V),Ja(i,x,I,4,!0)&&pi(z,Ea),function(t,e,n,r,o){const{rawFilename:i}=t,a=!o,s=t.zt&&!(8192&~e.rawBitFlag);!r||s||n.length==i.length&&!n.some((t,e)=>t!=i[e])||gs(a,o,ka),(2121&e.rawBitFlag)!=(2121&t.rawBitFlag)&&gs(a,o,va),e.compressionMethod!=t.compressionMethod&&gs(a,o,_a),e.bitFlag.dataDescriptor||s||!(e.crc32||e.compressedSize||e.uncompressedSize)||e.crc32==t.crc32&&e.compressedSize==t.compressedSize&&e.uncompressedSize==t.uncompressedSize||gs(a,o,Na)}(i,x,V,H,P?ft:z);const{lastAccessDate:G,creationDate:j,uid:q,gid:Y}=x;G&&(e.lastAccessDate=G),j&&(e.creationDate=j),q!==ft&&e.uid===ft&&(e.uid=q),Y!==ft&&e.gid===ft&&(e.gid=Y);const K=Ss(i,o,"checkPasswordOnly"),X=i.encrypted&&(!_||K),$=X&&!w;if(_||(e.zipCrypto=$),X&&!(64&~i.rawBitFlag))throw new d(ia);const J=v?ft:Pn(h);if(0!=h&&8!=h&&9!=h&&!J&&!v)throw new d(Mn);if(X){if(!$&&(w.strength<1||w.strength>3))throw new d(ia);if(!C&&!T)throw new d(oa)}if(O+b>c.size)throw new d(ca);const Q=b,tt=qt(Ss(i,o,xt));Yt(tt);let et=Ss(i,o,"checkOverlappingEntry");const nt=Ss(i,o,"checkOverlappingEntryOnly");nt&&(et=!0);const{onstart:rt,onprogress:ot,onend:it}=o,at=0!=h&&!v,st=v?b-$i(X,$,w&&w.strength):S,ut=9==h;let lt=Ss(i,o,Ft);ut&&(lt=!1);const dt=Ss(i,o,"checkCrc32"),wt=(dt===ft?Ss(i,o,"checkSignature"):dt)&&!v&&(!X||$||w&&1==w.vendorVersion),pt={options:{codecType:Sr,password:C,rawPassword:T,zipCrypto:$,encryptionStrength:w&&w.strength,checkCrc32:wt,checkAuthenticationCode:Ss(i,o,"checkAuthenticationCode"),passwordVerification:$&&(R?E>>>8&L:g>>>24&L),outputSize:st,crc32:g,compressed:at,encrypted:X,useWebWorkers:Ss(i,o,zt),useCompressionStream:lt,deflate64:ut,format:J?J.format:ft,codecURI:J?J.codecURI:ft,compressionMethod:h,rawBitFlag:y,checkPasswordOnly:K},config:s,A:{signal:tt,size:Q,onstart:rt,onprogress:ot,onend:it}};let ht,mt,yt;et&&await async function({reader:t,At:e,index:n,offset:r,crc32:o,compressedSize:i,uncompressedSize:a,dataOffset:s,dataDescriptor:c,extraFieldZip64:u,gt:l}){let f=0;if(c){const n=Boolean(u),r=be(await di(t,s+i,24)),c=[[n,!0],[n,!1],[!n,!0],[!n,!1]].map(([t,e])=>os(r,t,e)).filter(t=>t&&t.compressedSize==i&&t.uncompressedSize==a),l=c.find(t=>t.crc32==o)||c[0]||os(r,n,!0)||os(r,n,!1);l?(e.localDirectory.dataDescriptor=l,f=is(l.zip64,l.signature)):f=is(n,!1)}const w={start:r,end:s+i+f,At:e},{Et:p,St:h,bt:m}=l;if(!p.has(n)){const t=function(t,e){let n=0,r=t.length;for(;n<r;){const o=n+r>>>1;t[o].start<e.start?n=o+1:r=o}const o=t[n-1],i=t[n];return o&&rs(e,o)?o:i&&rs(e,i)?i:void 0}(h,w)||m.find(t=>rs(w,t));if(t){const e=new d(sa);throw e.overlappingEntry=t.At,e}p.add(n),m.push(w),m.length*m.length>h.length&&(m.sort((t,e)=>t.start-e.start),l.St=function(t,e){const n=[];let r=0,o=0;for(;r<t.length||o<e.length;)o==e.length||r<t.length&&t[r].start<e[o].start?n.push(t[r++]):n.push(e[o++]);return n}(h,m),m.length=0)}}({reader:c,At:e,index:u,offset:F,crc32:g,compressedSize:b,uncompressedSize:S,dataOffset:O,dataDescriptor:R||x.bitFlag.dataDescriptor,extraFieldZip64:p||x.extraFieldZip64,gt:r});try{if(!nt){K&&(t=new D),t=new ci(t),await li(t,function(t,e,n){return a.min(t,n?1032*e:e)}(st,b,at)),({writable:ht}=t);const e=kn(c.createReadable({offset:O,size:Q})),{outputSize:r}=await to({readable:e,writable:ht},pt);if(Yt(tt),r!=st)throw n.assign(new d(Gn),{outputSize:r});t.size+=r}}catch(e){const{outputSize:n}=pt;if(n!==ft?t.size+=n:Re(e)&&e.outputSize!==ft&&(t.size+=e.outputSize),!K||!Re(e)||e.message!=Qe)throw mt=e,yt=!0,e}finally{if((ui(t)||!Ss(i,o,Dt))&&ht&&!ht.locked){const t=ht.getWriter();if(yt)try{await t.abort(mt)}catch{}else await t.close()}}return K||nt?ft:t.getData?t.getData():ht}};function ja(t){const e=a.min(t.byteLength,1024)-3;for(let n=0;n<e;n++)if(134630224==Ds(t,n))return!0;return!1}function qa(t,e,n){let r=0;for(;n+q<=e.length&&Ds(t,n)==H;)n+=q+Fs(t,n+28)+Fs(t,n+30)+Fs(t,n+32),r++;return r%65536?0:r}function Ya(t,e){return Ka(t,e,H)}async function Ka(t,e,n){return!(e<0||e+4>t.size)&&Ds(be(await di(t,e,4)),0)==n}function Xa(t){if(t.length>=6){const e=be(t);if(Ds(e,0)==Z){const n=Fs(e,4);if(6+n<=t.length)return new w(t.subarray(6,6+n))}}}function $a(t,e,r){const o=t.rawBitFlag=Fs(e,r+2),i=!(1&~o),a=Ds(e,r+6);n.assign(t,{encrypted:i,version:Fs(e,r),bitFlag:{level:(6&o)>>1,dataDescriptor:!(8&~o),languageEncodingFlag:(o&nt)==nt},rawLastModDate:a,lastModDate:Rs(a),filenameLength:Fs(e,r+22),extraFieldLength:Fs(e,r+24)})}function Ja(t,e,r,o,i){const{rawExtraField:a}=e,u=e.extraField=new c,l=be(a);let f=0,w=!1;try{for(;f<a.length;){const t=Fs(l,f),e=Fs(l,f+2);u.set(t,{type:t,data:a.slice(f+4,f+4+e)}),f+=4+e}}catch{w=!0}f>a.length&&(w=!0);const p=Fs(r,o+4);n.assign(e,{signature:Ds(r,o+10),crc32:Ds(r,o+10),compressedSize:Ds(r,o+14),uncompressedSize:Ds(r,o+18)});const h=u.get(1);if(h)(function(t,e,n){e.zip64=!0;const r=be(t.data),o=Ba.filter(([t,n])=>e[t]==n),i=o.reduce((t,[,e])=>t+Wa[e].bytes,0);if(t.data.length<i){if(n)return!1;throw new d(ra)}const a=[];try{for(let t=0,e=0;t<o.length;t++){const[,n]=o[t],i=Wa[n];a.push(i.yt(r,e)),e+=i.bytes}}catch(t){if(n)return!1;throw t}return o.forEach(([n],r)=>{e[n]=t[n]=a[r]}),!0})(h,e,i)||(w=!0),e.extraFieldZip64=h;else if(Ba.some(([t,n])=>e[t]==n)){if(!i)throw new d(ra);w=!0}const m=u.get(28789);m&&(Qa(m,hi,mi,e,t),e.extraFieldUnicodePath=m);const y=u.get(25461);y&&(Qa(y,yi,gi,e,t),e.extraFieldUnicodeComment=y);const g=u.get($);g&&(99==p||e.encrypted)&&g.data.length>=7?(function(t,e,r){const o=be(t.data),i=zs(o,4);n.assign(t,{vendorVersion:zs(o,0),vendorId:zs(o,2),strength:i,originalCompressionMethod:r,compressionMethod:Fs(o,5)}),e.compressionMethod=t.compressionMethod,1!=t.vendorVersion&&(e.crc32=ft)}(g,e,p),e.extraFieldAES=g):(g&&(w=!0),e.compressionMethod=p);const E=u.get(13);E&&(ts(E,e),e.extraFieldPkwareUnix=E);const S=u.get(22613);S&&(ts(S,e),e.extraFieldUnixType1=S);const b=u.get(J);b&&(function(t,e,n){if(!t.data.length)return;const r=be(t.data),o=zs(r,0),i=[],a=[];n?(1&~o||(i.push(xi),a.push(zi)),2&~o||(i.push(Fi),a.push(Di)),4&~o||(i.push(Ai),a.push(Ii))):t.data.length>=5&&(i.push(xi),a.push(zi));let c=1;i.forEach((n,o)=>{if(t.data.length>=c+4){const i=Ds(r,c);e[n]=t[n]=new s(1e3*(0|i));const u=a[o];t[u]=i}c+=4})}(b,e,i),e.extraFieldExtendedTimestamp=b);const R=u.get(10);R&&(function(t,e){const r=be(t.data);let o,i=4;try{for(;i<t.data.length&&!o;){const e=Fs(r,i),n=Fs(r,i+2);1==e&&(o=t.data.slice(i+4,i+4+n)),i+=4+n}}catch{}if(o&&24==o.length){const r=be(o),i=r.getBigUint64(0,!0),a=r.getBigUint64(8,!0),s=r.getBigUint64(16,!0);n.assign(t,{rawLastModDate:i,rawLastAccessDate:a,rawCreationDate:s});const c={lastModDate:xs(i),lastAccessDate:xs(a),creationDate:xs(s)};n.assign(t,c),n.assign(e,c,{rawLastAccessDate:a,rawCreationDate:s})}}(R,e),e.extraFieldNTFS=R);const x=u.get(tt);let z;x&&(z=es(x,e,!0),e.extraFieldInfoZip=x);const F=u.get(et);F&&(es(F,z?{}:e,!1),e.extraFieldUnix=F);const D=u.get(Q);return D&&(e.extraFieldUSDZ=D),w}function Qa(t,e,r,o,i){if(t.data.length<5)return void(t.valid=!1);const a=be(t.data),s=new ve;s.append(i[r]);const c=be(new w(4));c.setUint32(0,s.get(),!0);const u=Ds(a,1),l=zs(a,0);n.assign(t,{version:l,[e]:uo(t.data.subarray(5)),valid:1==l&&!i.bitFlag.languageEncodingFlag&&u==Ds(c,0)}),t.valid&&(o[e]=t[e],o[e+"UTF8"]=!0)}function ts(t,e){if(t.data.length<8)return;const r=be(t.data),o={lastAccessDate:new s(1e3*(0|Ds(r,0))),lastModDate:new s(1e3*(0|Ds(r,4)))};t.data.length>=12&&(o.uid=Fs(r,8),o.gid=Fs(r,10)),n.assign(t,o),n.assign(e,o)}function es(t,e,r){try{const o=be(t.data);let i,a;if(r){let e=0;const r=zs(o,e++),s=zs(o,e++);i=ns(t.data.subarray(e,e+s)),e+=s;const c=zs(o,e++);a=ns(t.data.subarray(e,e+c)),n.assign(t,{version:r,uid:i,gid:a})}else t.data.length>=4&&(i=Fs(o,0),a=Fs(o,2),n.assign(t,{uid:i,gid:a}));return i!==ft&&(e.uid=i),a!==ft&&(e.gid=a),i!==ft||a!==ft}catch{}}function ns(t){const e=new w(4);return e.set(t,0),new m(e.buffer,e.byteOffset,4).getUint32(0,!0)}function rs(t,e){return t.start<e.end&&e.start<t.end}function os(t,e,n){const r=n?4:0;if(t.byteLength<is(e,n)||n&&Ds(t,0)!=P)return ft;const o=Ds(t,r);let i,a;try{e?(i=As(t,r+4),a=As(t,r+12)):(i=Ds(t,r+4),a=Ds(t,r+8))}catch{return ft}return{signature:n,zip64:e,crc32:o,compressedSize:i,uncompressedSize:a}}function is(t,e){return(t?20:12)+(e?4:0)}function as(t,e){return t.ht?t.ht(e):0}async function ss(t){return Ds(be(await di(t,0,4)))}function cs(t){return t===Mt||t===Lt||t===Bt}function us(t,e){return ls(t,ls(e,Lt))}function ls(t,e){const n=t.strictness;if(n!==ft){if(!cs(n))throw new d(da);return n}const r=t.checkAmbiguity;return r===ft?e:r?Mt:e==Bt?Bt:Lt}function fs(t,e){if(e==Bt)return!1;const n=t.split("/");return n.length>1&&""===n[n.length-1]&&n.pop(),!!(Oa.test(t)||t.startsWith("/")||t.startsWith("\\")||Ua.test(t))||e==Mt&&(n.includes(".")||n.includes("")||t.includes("\0"))}function ds(t,e){if(t!==ft){const e=Qt(t);if("number"!=typeof e||o.isNaN(e)||e<0)throw new d(pa);return e}return e==Mt?0:e==Bt?1/0:M}async function ws(t,e,n){const{size:r}=t,o=a.min(r,65557),i={It:64};let s,c,u=0;for await(const[n,a,l,f,d]of ps(t,o)){const o=Fs(n,f+20);if(d+Y+o==r){const o=await ms(t,n,a,f,d,r,i);if(2==o){if(s||(s=hs(l,f,d)),u++,!e||u>1)break}else 1!=o||c||(c=hs(l,f,d))}}return s||(s=c),s||(s=await async function(t,e,n){const{size:r}=t,o=a.min(r,e==1/0?r:65557+e);let i,s;for await(const[e,a,c,u,l]of ps(t,o)){const o=hs(c,u,l);i||(i=o);const f=await ms(t,e,a,u,l,r,n);if(2==f)return o;1!=f||s||(s=o)}return s||i}(t,n,i)),{Rt:s,xt:u}}async function*ps(t,e){const n=t.size-e,r=await di(t,n,e),o=be(r);for(let t=r.length-Y;t>=0;t--)Ds(o,t)==V&&(yield[o,n,r,t,n+t])}function hs(t,e,n){return{offset:n,buffer:new w(t.subarray(e,e+Y)).buffer}}async function ms(t,e,n,r,o,i,a){const s=Fs(e,r+10),c=Ds(e,r+12),u=Ds(e,r+16);if(s==M||c==O||u==O)return await ys(t,e,n,o-K,i,a)==j?2:0;if(!s&&!c)return 1;const l=Fs(e,r+6);for(const r of[o-c,as(t,l)+u])if(await ys(t,e,n,r,i,a)==H)return 2;return 0}async function ys(t,e,n,r,o,i){return r<0||r+4>o?ft:r>=n?Ds(e,r-n):i.It>0?(i.It--,Ds(be(await di(t,r,4)),0)):ft}function gs(t,e,n){t?Es(n):pi(e,n)}function Es(t){const e=new d(ua);throw e.reason=t,e}function Ss(t,e,n){return e[n]===ft?t.options[n]:e[n]}function bs(t,e,n){return jt(Ss(t,e,n))}function Rs(t){const e=(4294901760&t)>>16,n=t&M,r=new s(1980+((65024&e)>>9),((480&e)>>5)-1,31&e,(63488&n)>>11,(2016&n)>>5,2*(31&n),0);return r<lt?lt:r}function xs(t){return new s(o(t/i(1e4)-i(116444736e5)))}function zs(t,e){return t.getUint8(e)}function Fs(t,e){return t.getUint16(e,!0)}function Ds(t,e){return t.getUint32(e,!0)}function As(t,e){const n=t.getBigUint64(e,!0);if(n>Pa)throw new d(ha);return o(n)}var Is=n.freeze({__proto__:null,ERR_AMBIGUOUS_ARCHIVE:ua,ERR_BAD_FORMAT:Ji,ERR_CENTRAL_DIRECTORY_NOT_FOUND:ea,ERR_CODEC_OUT_OF_MEMORY:qn,ERR_ENCRYPTED:oa,ERR_ENCRYPTED_CENTRAL_DIRECTORY:la,ERR_ENTRY_DATA_OUT_OF_BOUNDS:ca,ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND:ta,ERR_EOCDR_NOT_FOUND:Qi,ERR_EXTRAFIELD_ZIP64_NOT_FOUND:ra,ERR_INVALID_AUTHENTICATION_CODE:Je,ERR_INVALID_COMPRESSED_DATA:jn,ERR_INVALID_CRC32:Yn,ERR_INVALID_FILENAME_VALIDATION:wa,ERR_INVALID_MAX_APPENDED_DATA_SIZE:pa,ERR_INVALID_PASSWORD:$e,ERR_INVALID_STRICTNESS:da,ERR_INVALID_UNCOMPRESSED_SIZE:Gn,ERR_LOCAL_FILE_HEADER_NOT_FOUND:na,ERR_OVERLAPPING_ENTRY:sa,ERR_SPLIT_ZIP_FILE:aa,ERR_UNSAFE_FILENAME:fa,ERR_UNSUPPORTED_COMPRESSION:Mn,ERR_UNSUPPORTED_ENCRYPTION:ia,ERR_UNSUPPORTED_UINT64:ha,ERR_WORKER_STARTUP_TIMEOUT:xr,WARNING_APPENDED_DATA:Ra,WARNING_COMPRESSED_PATCHED_DATA:ga,WARNING_DUPLICATE_FILENAME:Ia,WARNING_MALFORMED_EXTRA_FIELD:Ea,WARNING_MISMATCHED_CENTRAL_DIRECTORY_OFFSET:Da,WARNING_MISMATCHED_LOCAL_FILE_HEADER_BIT_FLAG:va,WARNING_MISMATCHED_LOCAL_FILE_HEADER_COMPRESSION_METHOD:_a,WARNING_MISMATCHED_LOCAL_FILE_HEADER_CRC32_OR_SIZES:Na,WARNING_MISMATCHED_LOCAL_FILE_HEADER_FILENAME:ka,WARNING_MISMATCHED_ZIP64_END_OF_CENTRAL_DIRECTORY:Ca,WARNING_MISSING_ZIP64_EXTRA_FIELD:Aa,WARNING_MULTIPLE_END_OF_CENTRAL_DIRECTORY:Ta,WARNING_PREPENDED_CENTRAL_DIRECTORY:za,WARNING_PREPENDED_DATA:xa,WARNING_TRAILING_CENTRAL_DIRECTORY_DATA:Fa,WARNING_UNKNOWN_VERSION:ya,WARNING_UNKNOWN_ZIP64_EXTENSIBLE_DATA:Sa,WARNING_UNSORTED_CENTRAL_DIRECTORY:ma,WARNING_WRAPPED_ENTRIES_COUNT:ba,ZipReader:Za,ZipReaderStream:Ha,isZipFile:Va});const Cs="File already exists",Ts="Zip file comment exceeds 64KB",ks="Invalid zip file comment (must be a Uint8Array)",vs="File entry comment exceeds 64KB",_s="Invalid file entry comment (must be a string)",Ns="Invalid date (must be a valid Date instance)",Us="File entry name exceeds 64KB",Os="Version exceeds 65535",Ms="The strength must equal 1, 2, or 3",Ls="Encryption is not supported in USDZ files",Bs="Split zip files are not supported in USDZ files",Ws="Encryption is not supported when the 'passThrough' option is set to true (use 'compressed' instead)",Ps="Invalid extra field (must be a Map)",Zs="Invalid extra field type (must be integer 0..65535)",Hs="Invalid extra field data (must be a Uint8Array)",Vs="Extra field data exceeds 64KB",Gs=-2147483648,js=2147483647,qs=i(0),Ys=i("0x7fffffffffffffff"),Ks="Zip64 is not supported (set the 'zip64' option to 'true')",Xs="Undefined uncompressed size",$s="Undefined compression method",Js="Undefined CRC32",Qs="Undetermined size",tc="Undefined reader",ec="Invalid reader (must be a Reader instance, a ReadableStream instance, or an object with a 'readable' property)",nc="Zip file not empty",rc="Invalid uid (must be integer 0..2^32-1)",oc="Invalid gid (must be integer 0..2^32-1)",ic="Invalid UNIX mode (must be integer 0..65535)",ac="Invalid unixExtraFieldType (must be 'infozip' or 'unix')",sc="uid/gid must be 0..65535 for unixExtraFieldType 'unix' (use 'infozip' for larger ids)",cc="Invalid msdosAttributesRaw (must be integer 0..255)",uc="Invalid msdosAttributes (must be an object with boolean flags)",lc="Invalid level (must be integer 0..9)",fc="Signature data exceeds 64KB",dc="Invalid entry option (must be an entry returned by ZipReader#getEntries())",wc="The last modification date of an entry encrypted with ZipCrypto cannot be changed when passThrough is set",pc="compression unavailable",hc="clamped last modification date",mc=new w([7,0,2,0,65,69,3,0,0]),yc="infozip",gc="unix",Ec=[8,9,5,3];let Sc=0;const bc=[];class Rc{constructor(t,e={}){t=new ci(t);const{availableSize:r=dt,maxSize:o=dt}=t,i=r>0&&r!==dt&&o>0&&o!==dt;if(i&&e[kt])throw new d(Bs);n.assign(this,{writer:t,Ct:i,options:e,Tt:new c,kt:new u,offset:e[Tt]===ft?t.size||t.writable.size||0:e[Tt],vt:e[Tt]===ft?0:e[Tt]-(t.size||t.writable.size||0),_t:new u,Nt:[],warnings:[],Ut:0,Ot:0,Mt:ft,Lt:!1})}prependZip(t){return Fc(this,async function(t,e){if(t.kt.size)throw new d(nc);await t.Bt(e)}(this,t))}appendZip(t,e={}){return Fc(this,this.Bt(t,e))}async Bt(t,r={}){const o=this,{_t:i,kt:a,Tt:s}=o,l=jt(r.filter);for(;i.size;)await g.allSettled(e.from(i));let f;const w=new g(t=>f=t);i.add(w);const p=[];let h;try{t=new si(t),await li(t),t.size!==ft&&t.readUint8Array||(t=new _o(await vn(t.readable)),await li(t));const{ZipReader:r}=await g.resolve().then(function(){return Is}),i=new r(t),f=await i.getEntries(),w=[];for(const t of f)l&&!await l(t)||w.push(t);await i.close(),await li(o.writer);const{directoryOffset:m}=i;w.forEach(({filename:t})=>{if(a.has(t))throw new d(Cs);a.add(t),p.push(t)}),o.Wt=!0;const{Pt:y}=o;o.Pt=new g(t=>h=()=>{o.Wt=!1,t()}),await y,o.Ct&&(delete o.Ct,await async function(t){return be(await di(t,0,4)).getUint32(0,!0)==W}(t)||(await Xc(o.writer,Yc()),o.offset+=4));const E=await async function(t,n,r,o,i,a){const{writer:s}=t,l=new c;if(s.closeDisk||a){const c=e.from(r).sort((t,e)=>qc(n,t)-qc(n,e)),f=function(t,n,r){const o=new e(n.length);let i=r;for(let e=n.length-1;e>=0;e--){const r=qc(t,n[e]),a=n[e+1];a&&qc(t,a)>r&&(i=qc(t,a)),o[e]=i}return o}(n,c,i),d=new u(o);let w,p=0;for(let e=0;e<c.length;e++){const r=c[e];if(d.has(r)){const o=qc(n,r);o<p?l.set(r,w):(a||await Gc(t,n,p,o-p),s.closeDisk&&Zc(s,await jc(n,o))&&await s.closeDisk(),w={offset:Hc(t,s),diskNumberStart:Wc(s)},l.set(r,w),await Gc(t,n,o,f[e]-o),p=f[e])}}a||await Gc(t,n,p,i-p)}else{const e=t.offset;await Gc(t,n,0,i),r.forEach(t=>l.set(t,{offset:e+qc(n,t),diskNumberStart:0}))}return l}(o,t,f,w,m,Boolean(l));w.forEach(t=>{const{version:e,rawLastModDate:r,rawFilename:o,bitFlag:i,encrypted:a,uncompressedSize:c,compressedSize:u,extraFieldZip64:l}=t;let{compressionMethod:f,rawExtraField:d}=t;const{level:w,languageEncodingFlag:p,dataDescriptor:h}=i;d=Vc(d||gt),t.extraFieldAES&&(f=99);const m=du(d),y=Boolean(l)&&l.uncompressedSize!==ft,g=Boolean(l)&&l.compressedSize!==ft,S=-7&hu(w,p,h,a,f)|w<<1,{Zt:b,Ht:R}=wu({version:e,bitFlag:S,compressionMethod:f,uncompressedSize:c,compressedSize:u,rawLastModDate:r,rawFilename:o,Vt:g,Gt:y,extraFieldLength:m}),{crc32:x}=t;x!==ft&&uu(R,10,x);const{offset:z,diskNumberStart:F}=E.get(t);n.assign(t,{jt:!0,Gt:y,Vt:g,offset:z,diskNumberStart:F,qt:!1,Yt:gt,Kt:gt,Xt:gt,$t:gt,Jt:gt,Qt:gt,rawExtraField:d,te:gt,Zt:b,Ht:R}),s.set(t.filename,t)})}catch(t){throw p.forEach(t=>a.delete(t)),t}finally{f(),i.delete(w),h&&h()}}add(t="",e,r={}){const o=this,{_t:a}=o,s=async function(t,e,r,o){const a=(o=n.assign({},o))[Nt];if(a!==ft){const{ee:e,ne:r}=Ic(a,Xt(eu(t,o,Rt)),eu(t,o,xi));delete o[Nt],o=n.assign(e,r,o)}if(eu(t,o,Bi)&&!e.endsWith(st)&&(e+=st),t.kt.has(e))throw new d(Cs);t.kt.add(e),Sc<we().maxWorkers?Sc++:await new g(t=>bc.push(t));try{return await async function(t,e,r,o){const a=Cc(t,e,o);({name:e}=a);const s=Tc(t,e,o),{comment:c}=s,u=o[Hi];t.Tt.set(e,ft);const l=t.Mt,f={};let w,p;s.re.keepOrder&&(f.oe=new g(t=>w=t)),t.Mt=f;try{const{re:c}=s;0==c.level||c.compressionMethod!==ft||c.ie||await Ir(we())||(c.level=0,pi(t.warnings,pc,e));const u=await async function(t,e,{re:r},o){if(r.ie&&!e&&!eu(t,o,Bi))throw new d(tc);let i;if(e){if(e=new si(e),await li(e),!e.readUint8Array&&!e.readable)throw new d(ec);({size:i}=e)}return n.assign({reader:e},vc(t,Boolean(e),i,r,o))}(t,r,s,o);({reader:r}=u);const h=Pc(t.writer),m=Wc(t.writer);let y=o.crc32===ft?o[Zi]:o.crc32;const E=u.re.encrypted&&!c.zipCrypto;if(c.ie&&!c.ae&&E&&(y=ft),c.ie&&r&&!E&&y===ft)throw new d(Js);const S=Nc(o=n.assign({},o,a.re,s.re,u.re,{signature:o[Zi],crc32:y,offset:t.offset-h,diskNumberStart:m,[kt]:t.options[kt]}));S.se&&pi(t.warnings,hc,e);const b=Mc(o),R=du(S.ce,b.ue);p=await async function(t,e,r,o,a){const{Tt:s,writer:c}=t,{keepOrder:u,dataDescriptor:l,le:f,signal:w}=a,{fe:p,At:h,de:m,we:y}=o,E=t.options[kt];let S,b,R,x,F,D,A,I=h,C=0;const T=u&&m?m.oe:ft;s.set(e,I);try{a.bufferedWrite||!u||t.Wt||t.Ut||t.Ot||!l&&!f?(S=!0,t.Ut++,A=a.createTempStream?await a.createTempStream():new z(ft,ft,{highWaterMark:dt}),A.size=0,await li(c)):(b=!0,t.Ot++,A=c,await T,await k()),await li(A);const h=Pc(c);t.Ct&&!S&&await Kc(t,c),E&&!S&&Uc(o,t.offset-h);const{ce:m}=p;S||await v();const y=Wc(c),R=Hc(t,c);if(I.diskNumberStart=y,S||(F=!0,D=c.size,await Xc(A,m)),I=await async function(t,e,{diskNumberStart:r,oe:o},a,s,c){const{fe:u,pe:l,he:f}=a,{Zt:w,Ht:p,lastModDate:h,rawLastModDate:m,encrypted:y,compressed:g,version:E,compressionMethod:S,Yt:b,me:R,Xt:x,ye:z,ge:F,$t:D,Jt:A,Qt:I,Kt:C}=u,{ue:T}=l,{rawFilename:k,lastAccessDate:v,creationDate:_,password:N,rawPassword:U,level:M,useUnicodeFileNames:B,zip64:W,jt:P,Gt:Z,Vt:H,zipCrypto:V,dataDescriptor:G,directory:j,executable:q,versionMadeBy:Y,rawComment:K,rawExtraField:X,te:$,useWebWorkers:J,onstart:Q,onprogress:tt,onend:et,signal:nt,encryptionStrength:rt,extendedTimestamp:ot,msDosCompatible:it,internalFileAttributes:at,externalFileAttributes:st,uid:ct,gid:ut,unixMode:lt,symlink:dt,setuid:wt,setgid:pt,sticky:ht,unixExternalUpper:mt,msdosAttributesRaw:yt,msdosAttributes:gt,useCompressionStream:Et,ie:St,ae:bt,format:Rt,codecURI:xt}=c,zt={oe:o,versionMadeBy:Y,zip64:W,jt:P,directory:Boolean(j),executable:Boolean(q),filenameUTF8:Boolean(B),rawFilename:k,commentUTF8:Boolean(B),rawComment:K,Yt:b,me:R,Xt:x,$t:D,Jt:A,Qt:I,Kt:C,rawExtraField:X,te:$,extendedTimestamp:ot,msDosCompatible:it,internalFileAttributes:at,externalFileAttributes:st,diskNumberStart:r,uid:ct,gid:ut,unixMode:lt,symlink:Boolean(dt),setuid:wt,setgid:pt,sticky:ht,unixExternalUpper:mt,msdosAttributesRaw:yt,msdosAttributes:gt};let{crc32:Ft,uncompressedSize:Dt}=c,At=0;St||(Dt=0);const{writable:It}=e;if(t){const n=t.size,r=kn(wi(t,{size:n})),o={options:{codecType:Er,inputSize:n,level:M,rawPassword:U,password:N,encryptionStrength:rt,zipCrypto:y&&V,passwordVerification:y&&V&&m>>8&L,computeCrc32:!St,compressed:g&&!St,encrypted:y&&!bt,useWebWorkers:J,useCompressionStream:Et,format:Rt,codecURI:xt,compressionMethod:S},config:s,A:{signal:nt,size:n,onstart:Q,onprogress:tt,onend:et}};try{const t=await to({readable:r,writable:It},o);if(At=t.outputSize,e.size+=At,Yt(nt),St||(Dt=t.inputSize,y&&!V||(Ft=t.crc32)),!H&&At>=O||!Z&&Dt>=O)throw new d(Ks)}catch(t){const{outputSize:n}=o;throw n!==ft?e.size+=n:Re(t)&&t.outputSize!==ft&&(e.size+=t.outputSize),t}}return function({crc32:t,compressedSize:e,uncompressedSize:n,fe:r,pe:o},{zip64:a,zipCrypto:s,ie:c,dataDescriptor:u}){const{Ht:l,encrypted:f}=r,{Ee:d,Se:w}=o;f&&!s&&!c||t===ft||(uu(l,10,t),u&&uu(d,w,t)),a?u&&(lu(d,w+4,i(e)),lu(d,w+12,i(n))):(uu(l,14,e),uu(l,18,n),u&&(uu(d,w+4,e),uu(d,w+8,n)))}({crc32:Ft,compressedSize:At,uncompressedSize:Dt,fe:u,pe:l},c),G&&await Xc(e,T),n.assign(zt,{uncompressedSize:Dt,compressedSize:At,lastModDate:h,rawLastModDate:m,creationDate:_,lastAccessDate:v,encrypted:Boolean(y),zipCrypto:Boolean(V),size:f+At,compressionMethod:S,version:E,Zt:w,Ht:p,signature:Ft,crc32:!y||V||St?Ft:ft,ye:z,ge:F,Gt:Z,Vt:H}),zt}(r,A,I,o,we(),a),S||(F=!1),s.set(e,I),I.filename=e,S){if(await g.all([A.writable.getWriter().close(),T]),await k(),t.Ct&&await Kc(t,c),x=!0,D=c.size,await v(),I.diskNumberStart=Wc(c),I.offset=Hc(t,c),E){const e=o.he;Uc(o,t.offset-Pc(c)),I.size+=o.he-e}!function({rawFilename:t,encrypted:e,zip64:n,me:r,crc32:o,compressedSize:a,uncompressedSize:s,Gt:c,Vt:u},l,{dataDescriptor:f,ie:d}){if(f||((!e||d&&o!==ft)&&uu(l,14,o),u||uu(l,18,a),c||uu(l,22,s)),n&&r){const e=ct+du(t)+4;lu(l,e,i(s)),lu(l,e+8,i(a))}}(I,p.be,a),await Xc(c,p.ce),await $c(A.readable,c,w,t=>C+=t),c.size+=A.size,x=!1}else I.diskNumberStart=y,I.offset=R;return t.offset+=I.size,I}catch(n){if(x||F){if(t.hasCorruptedEntries=!0,n)try{n.corruptedEntry=!0}catch{}t.offset+=c.size-D,S&&(t.offset+=C)}throw s.delete(e),n}finally{if(S&&t.Ut--,b&&t.Ot--,y&&y(T),R&&R(),S&&A&&A.dispose)try{await A.dispose()}catch{}}async function k(){t.Wt=!0;const{Pt:e}=t;t.Pt=new g(e=>R=()=>{t.Wt=!1,e()}),await e}async function v(){Zc(c,du(p.ce))&&await c.closeDisk()}}(t,e,r,{fe:S,pe:b,he:R,At:f,de:l,we:w},o)}catch(n){throw t.Tt.delete(e),n}finally{w&&w(l&&l.oe)}return n.assign(p,{name:e,comment:c,extraField:u}),new Ki(p)}(t,e,r,o)}catch(n){throw t.kt.delete(e),n}finally{const t=bc.shift();t?t():Sc--}}(o,t,e,r);a.add(s);const c=()=>a.delete(s);return g.prototype.then.call(s,c,c),Fc(o,s)}remove(t){const{kt:e,Tt:n}=this;if(typeof t==mt&&(t=n.get(t)),t&&t.filename!==ft){const{filename:r}=t;if(e.has(r)&&n.has(r))return e.delete(r),n.delete(r),!0}return!1}async close(t=gt,n={}){const r=this,{_t:o,writer:a}=this,{writable:s}=a;if(r.Lt)return zc(a);if(!(t instanceof w))throw new d(ks);if(du(t)>M)throw new d(Ts);for(;o.size;)await g.allSettled(e.from(o));await g.allSettled(r.Nt.map(t=>t.Re));const c=r.Nt.filter(t=>t.xe&&!t.ze);if(c.length){const t=c.map(t=>t.error);c.forEach(t=>t.ze=!0);const[e]=t;try{e.entryErrors=t}catch{}throw e}return await async function(t,n,r){const{Fe:o,De:a}=Lc(t.Tt),{Ae:s,Ie:c,Ce:u}=await async function(t,n,r){const{Tt:o,writer:i}=t,a=new w(n);await li(i);let s=0,c=0,u=Wc(i),l=Pc(i),f=0;for(const[t,n]of e.from(o.values()).entries()){const{offset:e,rawFilename:d,Yt:w,Kt:p,Xt:h,$t:m,Qt:y,rawExtraField:g,te:E,rawComment:S,versionMadeBy:b,Zt:R,Ht:x,Gt:z,Vt:F,qt:D,Te:A,internalFileAttributes:I,externalFileAttributes:C,diskNumberStart:T,uncompressedSize:k,compressedSize:v}=n,_=du(w,p,h,m,y,g,E),N=q+du(d,S)+_;Zc(i,s+N-c)&&(await Xc(i,a.slice(c,s)),c=s,f=0,await i.closeDisk()),0==t&&(u=Wc(i),l=Pc(i)),z||uu(x,18,k),F||uu(x,14,v),(A||D)&&n.version<45&&cu(x,0,45);const U=Bc(N);if(U.ke(H),U.ve(b),U._e(R.subarray(0,24)),U.ve(_),U.ve(du(S)),U.ve(D?M:T),U.ve(I),U.ke(C),U.ke(A?O:e),U._e(d),U._e(w),U._e(p),U._e(h),U._e(m),U._e(y),U._e(g),U._e(E),U._e(S),fu(a,U.ct,s),s+=N,f++,r.onprogress)try{await r.onprogress(t+1,o.size,new Ki(n))}catch{}}return await Xc(i,c?a.slice(c):a),{Ae:{diskNumber:u,diskOffset:l},Ie:{diskNumber:Wc(i),Ne:f},Ce:a}}(t,o,r),l=await async function(t,e,n){const r=ru(t,n,_t);if(r){const n=await r(e),o=du(n);if(o>M)throw new d(fc);const i=Bc(6+o);i.ke(Z),i.ve(o),i._e(n);const{writer:a}=t;return Zc(a,du(i.ct))&&await a.closeDisk(),await Xc(a,i.ct),6+o}return 0}(t,u,r);await async function(t,e,n,r){const{writer:o}=t,{Ae:a,Ie:s,Ue:c,De:u}=r;let{Fe:l}=r,f=t.Tt.size,w=a.diskNumber,p=Hc(t,a);const h=du(e);if(h>M)throw new d(Ts);let m=eu(t,n,Ni),y=Wc(o);if(Zc(o,(m?98:Y)+h)&&y++,p>=O||l>=O||f>=M||y>=M){if(!1===m)throw new d(Ks);m=!0}else m===ft&&u&&(m=!0);const g=Bc(m?98:Y);Zc(o,du(g.ct)+h)&&await o.closeDisk(),y=Wc(o);let E=y==s.diskNumber?s.Ne:0;m&&(g.ke(G),g.Oe(44),g.ve(45),g.ve(45),g.ke(y),g.ke(w),g.Oe(E),g.Oe(f),g.Oe(l),g.Oe(p),g.ke(j),g.ke(y),g.Oe(i(Hc(t,o))+i(l)+i(c)),g.ke(y+1),eu(t,n,"supportZip64SplitFile",!0)&&(y=M,w=M),E=M,f=M,p=O,l=O),g.ke(V),g.ve(y),g.ve(w),g.ve(E),g.ve(f),g.ke(l),g.ke(p),g.ve(h),await Xc(o,g.ct),h&&await Xc(o,e)}(t,n,r,{Ae:s,Ie:c,Fe:o,Ue:l,De:a})}(r,t,n),r.Lt=!0,!ui(a)&&eu(r,n,Dt)||await s.getWriter().close(),zc(a)}[Et](){return this.close()}}class xc extends g{then(t,e){const{Me:n}=this;return n&&(n.ze=!0),super.then(t,e)}}function zc(t){return t.getData?t.getData():t.writable}function Fc(t,e){const r=new xc((t,n)=>g.prototype.then.call(e,t,n)),o={};return r.Me=o,o.Re=g.prototype.then.call(r,ft,t=>n.assign(o,{xe:!0,error:t})),t.Nt.push(o),r}async function Dc(t,e){try{await t.writer.writable.abort(e)}catch{}}function Ac(t,e,n){t._t.add(e),e.catch(t=>{try{n(t)}catch{}})}function Ic(t,r,o){if(null===t||typeof t!=ht||e.isArray(t))throw new d(dc);const{externalFileAttributes:i,versionMadeBy:u,comment:l,lastModDate:f,rawLastModDate:w,creationDate:p,lastAccessDate:h,uncompressedSize:m,encrypted:y,zipCrypto:g,crc32:E,compressionMethod:S,extraFieldAES:b,extraFieldUnix:R,internalFileAttributes:x,extraField:z,bitFlag:F,directory:D,uid:A,gid:I}=t,C={externalFileAttributes:i,versionMadeBy:u,comment:l,lastModDate:f,creationDate:p,lastAccessDate:h,internalFileAttributes:x,directory:D};F&&F.languageEncodingFlag&&(C[It]=!0);const T=function(t){if(t){const e=new c;if(t.forEach((t,n)=>{Xi.has(n)||e.set(n,t.data)}),e.size)return e}}(z);T&&(C[Hi]=T),A===ft&&I===ft||n.assign(C,{uid:A,gid:I,unixExtraFieldType:R?gc:yc});const k={};if(r&&!D)if(n.assign(k,{uncompressedSize:m,crc32:E,compressionMethod:S}),r!==Wt&&n.assign(k,{encrypted:y,zipCrypto:g,encryptionStrength:b?b.strength:ft}),F&&(k.dataDescriptor=F.dataDescriptor,k[At]=Ec[F.level]),o===ft)k.rawLastModDate=w;else if(r!==Wt&&g&&(!F||F.dataDescriptor)&&o instanceof s&&function(t){let e=new s(2e3*a.ceil(a.floor(t.getTime()/1e3)/2));return e<lt?e=lt:e>ut&&(e=ut),(e.getHours()<<3|e.getMinutes()>>3)&L}(o)!=(w>>>8&L))throw new d(wc);return{ee:C,ne:k}}function Cc(t,n,r){let o=eu(t,r,_i),i=eu(t,r,Mi,o?20:768);const a=eu(t,r,Wi),s=ou(t,r,"uid"),c=ou(t,r,"gid");let u=ou(t,r,Vi),l=eu(t,r,"unixExtraFieldType"),f=eu(t,r,Gi),w=eu(t,r,ji),p=eu(t,r,qi);if(Jt(s,O,rc),Jt(c,O,oc),Jt(u,M,ic),l!==ft&&l!==yc&&l!==gc)throw new d(ac);if(l===gc&&(s!==ft&&s>M||c!==ft&&c>M))throw new d(sc);l!==ft||s===ft&&c===ft||(l=yc);let h=ou(t,r,ki),m=eu(t,r,vi);const y=h!==ft||m!==ft;if(s!==ft||c!==ft||u!==ft||l||a?(o=!1,i=i&L|768):y&&(o=!0,i&=L),Jt(h,L,cc),m&&(typeof m!==ht||e.isArray(m)))throw new d(uc);if(i>M)throw new d(Os);let g=eu(t,r,Ti);const E=g!==ft;E||(g=0),!r[Bi]&&n.endsWith(st)&&(r[Bi]=!0);const S=eu(t,r,Bi);if(S?(n.endsWith(st)||(n+=st),E||(g=16,o||(g|=16877<<16))):o||E||(g=a?493<<16:27525120),!o){const t=u!==ft||Boolean(f||w||p);u=u===ft?g>>16&M:u&M,f?u|=it:f=Boolean(u&it),w?u|=at:w=Boolean(u&at),p?u|=512:p=Boolean(512&u),E&&!t||(S?u=-61441&u|ot:u&rt||(u|=32768),g=(u&M)<<16|g&M)}({msdosAttributesRaw:h,msdosAttributes:m}=function(t,e){if(t!==ft)t&=L;else if(e!==ft){const{readOnly:n,hidden:r,system:o,directory:i,archive:a}=e;let s=0;n&&(s|=1),r&&(s|=2),o&&(s|=4),i&&(s|=16),a&&(s|=32),t=s&L}return e===ft&&(e={readOnly:Boolean(1&t),hidden:Boolean(2&t),system:Boolean(4&t),directory:Boolean(16&t),archive:Boolean(32&t)}),{msdosAttributesRaw:t,msdosAttributes:e}}(h,m)),y&&(g=g&O|h&L);const b=g>>16&M,R=u!==ft&&40960==(u&rt);return{name:n,re:{versionMadeBy:i,msDosCompatible:Boolean(o),externalFileAttributes:g,unixExternalUpper:b,uid:s,gid:c,unixMode:u,unixExtraFieldType:l,symlink:R,setuid:f,setgid:w,sticky:p,msdosAttributesRaw:h,msdosAttributes:m}}}function Tc(t,e,n){const r=ru(t,n,"encodeText")||Ne;let i=r(e,Ut);if(i===ft&&(i=Ne(e)),du(i)>M)throw new d(Us);const a=n[yi]||"";if(typeof a!=mt)throw new d(_s);let c=r(a,Ot);if(c===ft&&(c=Ne(a)),du(c)>M)throw new d(vs);const u=eu(t,n,Oi);if(u!==ft&&u>M)throw new d(Os);const l=nu(t,n,xi,new s),f=eu(t,n,zi),w=nu(t,n,Fi),p=nu(t,n,Ai),h=eu(t,n,Ci,0),m=Xt(eu(t,n,Rt)),y=Boolean(m),g=!0===m;let E=eu(t,n,St),S=eu(t,n,bt);Kt(E,S),E=E&&E.length?E:ft,S=S&&S.length?S:ft;const b=ou(t,n,"encryptionStrength",3),R=eu(t,n,Li),x=eu(t,n,"extendedTimestamp",!0),z=eu(t,n,"ntfsTimestamp"),F=eu(t,n,"keepOrder",!0),D=eu(t,n,zt),A=eu(t,n,"bufferedWrite"),I=ru(t,n,"createTempStream"),C=eu(t,n,"dataDescriptorSignature",!0),T=qt(eu(t,n,xt));Yt(T);const k=eu(t,n,It,!pu(i)||!pu(c)),v=eu(t,n,Pi),_=y||v===ft?ft:Pn(v);if(!y&&v!==ft&&0!==v&&8!==v&&!_)throw new d(Mn);let N=ou(t,n,At);if(Jt(N,9,lc),t.options[kt]){if(E!==ft||S!==ft)throw new d(Ls);N===ft&&v===ft&&(N=0)}y&&(N=Qt(n[At]));let U=eu(t,n,Ft),O=eu(t,n,Ct);A&&O===ft&&(O=!1),(O===ft||R&&!g)&&(O=!0),N!==ft&&6!=N&&(U=!1);const L=eu(t,n,Ni);if(!(R||E===ft&&S===ft||o.isInteger(b)&&b>=1&&b<=3))throw new d(Ms);const B=kc(n[Hi]),W=kc(n.localExtraField),P=kc(n.centralExtraField);return{comment:a,re:{rawFilename:i,rawComment:c,version:u,lastModDate:l,rawLastModDate:f,lastAccessDate:w,creationDate:p,internalFileAttributes:h,ie:y,ae:g,password:E,rawPassword:S,encryptionStrength:b,zipCrypto:R,extendedTimestamp:x,ntfsTimestamp:z,keepOrder:F,useWebWorkers:D,bufferedWrite:A,createTempStream:I,dataDescriptorSignature:C,signal:T,useUnicodeFileNames:k,compressionMethod:v,format:_?_.format:ft,codecURI:_?_.codecURI:ft,Le:_?_.versionNeeded:ft,level:N,useCompressionStream:U,dataDescriptor:O,zip64:L,rawExtraField:B,Be:W,te:P}}}function kc(t){if(!t)return gt;if(!(t instanceof c))throw new d(Ps);let e=0,n=0;t.forEach((t,n)=>{if($t(n,M,Zs),!(t instanceof w))throw new d(Hs);if(du(t)>M)throw new d(Vs);e+=4+du(t)});const r=new w(e),o=be(r);return t.forEach((t,e)=>{cu(o,n,e),cu(o,n+2,du(t)),fu(r,t,n+4),n+=4+du(t)}),r}function vc(t,e,n,r,o){const{ie:i,ae:a,zipCrypto:s,password:c,rawPassword:u,encryptionStrength:l}=r;let{dataDescriptor:f,zip64:w,level:p,compressionMethod:h}=r,m=0,y=0,g=!1;if(i&&e){if(y=o[Ei],y===ft)throw new d(Xs);if(h===ft)throw new d($s)}const E=!0===w,S=eu(t,o,Ui);if(e&&a&&!S&&du(c,u))throw new d(Ws);const b=e&&(Boolean(c&&du(c)||u&&du(u))||a&&S);e||(p=0,h=0);const R=$i(b,s,l);e&&(i?(o.uncompressedSize=y,m=n===ft?iu(y)+R:n+(a?0:R)):n===ft?(f=!0,(w||w===ft)&&(w=g=!0,m=4294967296)):(o.uncompressedSize=y=n,m=(au(h,p)?iu(y):y)+R));const x=!(b||e&&(0!==n||i)||au(h,p));x&&eu(t,o,Ct)===ft&&(f=!1);const z=E||g||y>=O,F=E||m>=O;if(z||F){if(!1===w)throw new d(Ks);w=!0}return w=w||!1,{We:m,re:{dataDescriptor:f,le:x,zip64:w,jt:E,Pe:g,Gt:z,Vt:F,uncompressedSize:y,level:p,compressionMethod:h,encrypted:b}}}function _c(t,e,n){const r=t.slice().sort((t,e)=>n?e-t:t-e);let o=e,i=0;for(const t of r){if(o>=O)break;o+=t,i++}return i}function Nc(t){const{rawFilename:e,lastModDate:n,rawLastModDate:r,lastAccessDate:o,creationDate:i,level:c,zip64:u,zipCrypto:l,useUnicodeFileNames:f,dataDescriptor:w,directory:p,rawExtraField:h,Be:m,encryptionStrength:y,extendedTimestamp:g,ntfsTimestamp:E,ie:S,encrypted:b,Gt:R,Vt:x,uncompressedSize:z,Pe:F,crc32:D}=t;let{version:A,compressionMethod:I}=t;const C=!p&&au(I,c);let T;const k=S||!C,v=u&&(t.bufferedWrite||!w||!R&&!x||k&&!F),_=v||u&&w&&(R||x);if(u&&(R||x)){const t=20,e=Bc(t);if(e.ve(1),e.ve(t-4),T=e.ct,v&&(e.Oe(z),k)){const t=$i(b,l,y);e.Oe(S?0:z+t)}}else T=gt;let N,U,O,L,W;if(b&&!l){const t=Bc(du(mc)+2);t.ve($),t._e(mc),N=t.ct,N[8]=y}else N=gt;if(g){const t=Qc(n),e=(P=t)>=Gs&&P<=js;if(e){const e=9+(o?4:0)+(i?4:0),n=Bc(e);L=1+(o?2:0)+(i?4:0),W=t,n.ve(J),n.ve(e-4),n.Ze(L),n.ke(t),o&&n.ke(tu(Qc(o))),i&&n.ke(tu(Qc(i))),O=n.ct}else O=gt;if(E===ft?!e||Boolean(o||i):E)try{const t=Jc(n),e=Bc(36);e.ve(10),e.ve(32),e.He(4),e.ve(1),e.ve(24),e.Oe(t),e.Oe(o?Jc(o):t),e.Oe(i?Jc(i):t),U=e.ct}catch{U=gt}else U=gt}else U=O=gt;var P;let Z,H;try{const{uid:e,gid:n,unixExtraFieldType:r}=t;if(r!=yc||e===ft&&n===ft)if(r!=gc||e===ft&&n===ft)Z=H=gt;else{const t=Bc(8);t.ve(et),t.ve(4),t.ve((e===ft?0:e)&M),t.ve((n===ft?0:n)&M),Z=t.ct;const r=Bc(4);r.ve(et),r.ve(0),H=r.ct}else{const t=Oc(e===ft?0:e),r=Oc(n===ft?0:n),o=3+t.length+r.length,i=Bc(4+o);i.ve(tt),i.ve(o),i.Ze(1),i.Ze(t.length),i._e(t),i.Ze(r.length),i._e(r),Z=H=i.ct}}catch{Z=H=gt}I===ft&&(I=C?8:0),A===ft&&(A=0!=I||p||b?20:10);const{Le:V}=t;C&&V!==ft&&(A=A>V?A:V),u&&(A=A>45?A:45),b&&!l&&(A=A>51?A:51,S&&D!==ft&&(N[4]=1),cu(be(N),9,I),I=99);const G=_?du(T):0,j=G+du(N,O,U,Z,h,m);if(j+(t[kt]?67:0)>M)throw new d(Vs);const q=new s(2e3*a.ceil(a.floor(n.getTime()/1e3)/2)),Y=q<lt?lt:q>ut?ut:q,K=du(O)?new s(1e3*Qc(n)):du(U)?n:Y,{Zt:X,Ht:Q,rawLastModDate:nt}=wu({version:A,bitFlag:hu(c,f,w,b,I),compressionMethod:I,uncompressedSize:z,lastModDate:Y,rawLastModDate:r,rawFilename:e,Vt:x,Gt:R,extraFieldLength:j}),rt=Bc(ct+du(e)+j),ot=rt.ct,it=be(ot);return rt.ke(B),rt._e(X),rt._e(e),_&&rt._e(T),rt._e(N),rt._e(O),rt._e(U),rt._e(Z),rt._e(h),rt._e(m),w&&(x||uu(it,18,0),R||uu(it,22,0)),{ce:ot,be:it,Zt:X,Ht:Q,lastModDate:K,se:K===Y&&q.getTime()!=Y.getTime(),rawLastModDate:nt,encrypted:b,compressed:C,version:A,compressionMethod:I,ye:L,ge:W,Yt:gt,me:G,Xt:O,$t:U,Jt:Z,Qt:H,Kt:N,extraFieldLength:j}}function Uc(t,e){const{fe:n}=t;let{ce:r,extraFieldLength:o}=n,i=64-(e+du(r))%64;i<4&&(i+=64);const a=new w(i),s=be(a);cu(s,0,Q),cu(s,2,i-4);const c=r;n.ce=r=new w(du(c)+i),fu(r,c),fu(r,a,du(c));const u=be(r);cu(u,28,o+i),n.be=u,t.he+=i}function Oc(t){const e=new w(4);be(e).setUint32(0,t,!0);let n=4;for(;n>1&&0===e[n-1];)n--;return e.subarray(0,n)}function Mc({zip64:t,dataDescriptor:e,dataDescriptorSignature:n}){let r,o=gt,i=0,a=t?20:12;return n&&(a+=4),e&&(o=new w(a),r=be(o),n&&(i=4,uu(r,0,P))),{ue:o,Ee:r,Se:i}}function Lc(t){let e=0,n=!1;for(const[,r]of t){const{rawFilename:t,Kt:o,rawComment:i,$t:a,Qt:s,rawExtraField:c,te:u,ye:l,ge:f,jt:w,uncompressedSize:p,compressedSize:h}=r;let{Gt:m,Vt:y}=r;w||(m&&p<O&&(m=r.Gt=!1),y&&h<O&&(y=r.Vt=!1)),n=n||m||y;const g=r.offset>=O,E=r.diskNumberStart>=M;let S,b;if(g||E||m||y){const t=4+(m?8:0)+(y?8:0)+(g?8:0)+(E?4:0),e=Bc(t);e.ve(1),e.ve(t-4),m&&e.Oe(p),y&&e.Oe(h),g&&e.Oe(r.offset),E&&e.ke(r.diskNumberStart),S=e.ct}else S=gt;if(r.Yt=S,r.Te=g,r.qt=E,f===ft)b=gt;else{const t=Bc(9);t.ve(J),t.ve(5),t.Ze(l),t.ke(f),b=t.ct}r.Xt=b;const R=du(S,o,a,s,b,c,u);if(R>M)throw new d(Vs);e+=q+du(t,i)+R}return{Fe:e,De:n}}function Bc(t){const e=new w(t),n=be(e);let r=0;return{ct:e,Ze:t=>{!function(t,e,n){t.setUint8(e,n)}(n,r,t),r+=1},ve:t=>{cu(n,r,t),r+=2},ke:t=>{uu(n,r,t),r+=4},Oe:t=>{lu(n,r,i(t)),r+=8},_e:t=>{fu(e,t,r),r+=du(t)},He:t=>r+=t}}function Wc(t){const{diskNumber:e=0}=t;return e}function Pc(t){const{diskOffset:e=0}=t;return e}function Zc(t,e){const{availableSize:n=dt}=t;return e>n}function Hc(t,{diskNumber:e=0,diskOffset:n=0}){return t.offset-n-(e?t.vt:0)}function Vc(t){const e=be(t);let n=0;for(;n+4<=du(t);){const r=4+su(e,n+2);if(1==su(e,n))return Vc(Ee(t.subarray(0,n),t.subarray(a.min(n+r,du(t)))));n+=r}return t}async function Gc(t,e,n,r){if(r>0){const{writer:o}=t;let i=0;try{await $c(wi(e,{offset:n,size:r}),o,ft,t=>i+=t)}catch(e){t.hasCorruptedEntries=!0;try{e.corruptedEntry=!0}catch{}throw e}finally{o.size+=i,t.offset+=i}}}async function jc(t,e){const n=await di(t,e,ct);if(du(n)<ct)return ct;const r=be(n);return ct+su(r,26)+su(r,28)}function qc(t,{offset:e,diskNumberStart:n}){return e+(t.ht?t.ht(n):0)}function Yc(){const t=new w(4);return uu(be(t),0,W),t}async function Kc(t,e){delete t.Ct,await Xc(e,Yc()),t.offset+=4}async function Xc(t,e){const{writable:n}=t,r=n.getWriter();try{await r.ready,t.size+=du(e),await r.write(e)}finally{r.releaseLock()}}async function $c(t,e,n,r){const o=e.writable.getWriter();try{await t.pipeTo(new D({async write(t){await o.ready,await o.write(t),r(du(t))}}),{preventClose:!0,preventAbort:!0,signal:n})}finally{o.releaseLock()}}function Jc(t){if(t){const e=(i(t.getTime())+i(116444736e5))*i(1e4);return e<qs?qs:e>Ys?Ys:e}}function Qc(t){return a.floor(t.getTime()/1e3)}function tu(t){return a.min(js,a.max(Gs,t))}function eu(t,e,n,r){const o=e[n]===ft?t.options[n]:e[n];return o===ft?r:o}function nu(t,e,n,r){const i=eu(t,e,n,r);if(null===i)return r;if(i!==ft&&(typeof i.getTime!=pt||o.isNaN(i.getTime())))throw new d(Ns);return i}function ru(t,e,n){return jt(eu(t,e,n))}function ou(t,e,n,r){return Qt(eu(t,e,n,r))}function iu(t){return t+5*(a.floor(t/16383)+1)}function au(t,e){return t===ft?e===ft||e>0:0!==t}function su(t,e){return t.getUint16(e,!0)}function cu(t,e,n){t.setUint16(e,n,!0)}function uu(t,e,n){t.setUint32(e,n,!0)}function lu(t,e,n){t.setBigUint64(e,n,!0)}function fu(t,e,n){t.set(e,n)}function du(...t){let e=0;return t.forEach(t=>t&&(e+=t.length)),e}function wu({version:t,bitFlag:e,compressionMethod:n,uncompressedSize:r,compressedSize:o,lastModDate:i,rawLastModDate:a,rawFilename:s,Vt:c,Gt:u,extraFieldLength:l}){const f=Bc(26),d=f.ct,w=be(d);if(f.ve(t),f.ve(e),f.ve(n),a===ft){const t=new h(1),e=be(t);cu(e,0,(i.getHours()<<6|i.getMinutes())<<5|i.getSeconds()/2),cu(e,2,(i.getFullYear()-1980<<4|i.getMonth()+1)<<5|i.getDate()),a=t[0]}return f.ke(a),f.He(4),c||o!==ft?f.ke(c?O:o):f.He(4),u||r!==ft?f.ke(u?O:r):f.He(4),f.ve(du(s)),f.ve(l),{Zt:d,Ht:w,rawLastModDate:a}}function pu(t){return t.every(t=>t>=32&&t<=126)}function hu(t,e,n,r,o){let i=0;return e&&(i|=nt),n&&(i|=8),8!=o&&9!=o||(t>=0&&t<=3&&(i|=6),t>3&&t<=5&&(i|=4),9==t&&(i|=2)),r&&(i|=1),i}function mu(t,e){if(!t)return!1;const{supportedFormats:n}=t;return n?n.includes(e):rr(t,e)}const yu=1048576,gu=".zip.js-temp",Eu=1048576,Su=1048576,bu=".zip.js-temp",Ru="createSyncAccessHandle is only available in dedicated workers";try{!function(t){const e=me(ge(t));n.assign(ie,e),n.assign(de,e)}({baseURI:void 0===b&&"undefined"==typeof location?require("url").pathToFileURL(__filename).href:void 0===b?location.href:U&&"SCRIPT"===U.tagName.toUpperCase()&&U.src||new f("zip-fs-core.min.js",b.baseURI).href})}catch{}const xu="Entry filename already exists",zu="Duplicate entry filename in the imported zip file",Fu='Invalid duplicates option (must be "throw", "keep-first" or "keep-last")',Du="Entry is an ancestor of target entry",Au="Root directory cannot be moved",Iu="Target entry is not a directory",Cu="Parent entry is not a directory",Tu="Readable stream already consumed",ku="throw",vu="keep-first",_u="keep-last",Nu=new u([ku,vu,_u]),Uu="Invalid passThrough option (use readerOptions.passThrough or set uncompressedSize for each entry)",Ou="Invalid readerOptions (must be an object)",Mu="The 'compressed' passThrough option is only supported by Entry#getData() and ZipWriter#add()",Lu="Invalid passwords option (must be an array of strings)",Bu="Invalid requestPassword option (must be a function returning a string or undefined)",Wu="zipjs-abort-export",Pu=new w(0),Zu=new u([Yn,Gn,jn]);class Hu{constructor(t,e,r,o){const i=this;if(t.root&&o&&o.getChildByName(e))throw new d(xu);r||(r={}),n.assign(i,{fs:t,name:e,data:r.data,options:r.options&&n.assign({},r.options),id:t.Ve++,parent:o,children:[],uncompressedSize:r.uncompressedSize||0,Ge:r.Ge||r.uncompressedSize===ft,passThrough:r.passThrough,je:r.je||new s}),!o&&t.root||(t.entries[i.id]=i),o&&i.parent.children.push(i)}getFullname(){return this.getRelativeName()}getRelativeName(t=this.fs.root){let e=this.name,n=this.parent;for(;n&&n!=t;)e=(n.name?n.name+"/":"")+e,n=n.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 n=e.parent;if(n){const r=bl(t);r&&(t=r.pop(),n=Rl(n,r,e));const o=n.getChildByName(t);if(o&&o!=e)throw new d(xu);n!=e.parent&&(el(e),e.parent=n,n.children.push(e),El(e.fs,e))}e.name=t}setOptions(t){const e=n.assign({},this.options,t);this.options=n.fromEntries(n.entries(e).filter(([,t])=>t!==ft))}}class Vu extends Hu{constructor(t,e,n,r){super(t,e,n,r);const o=this;o.Reader=n.Reader,o.Writer=n.Writer,n.getData&&(o.getData=n.getData)}clone(){return new Vu(this.fs,this.name,this)}async getData(t,e={}){const n=this;if(!t||t.constructor==n.Writer&&n.data&&function(t,e){const{contentType:n}=t;return n===ft||(t.constructor==No?e.type==n:t.constructor!=To||e.startsWith("data:"+(n||"")+";base64,"))}(t,n.data))return n.data;{const r=n.reader=Qu(n.Reader,n.data,e),o=n.uncompressedSize||r.size;await g.all([li(r),li(t,o)]);const i=qt(e.signal),a=function(t,e,n,r){const{onstart:o,onprogress:i,onend:a}=n,{readable:s}=e;return t.data instanceof Ki||!o&&!i&&!a?s:kn(s).pipeThrough(new vr({onstart:o,onprogress:i,onend:a,size:e.size}),{signal:r})}(n,r,e,i),s=!ui(t)&&Boolean(e.preventClose);return n.uncompressedSize=r.size,await kn(a).pipeTo(_n(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,n.assign({},e,{password:t,checkPasswordOnly:!0})),!0}catch(t){if(Re(t)&&t.message==$e)return!1;throw t}}getText(t,e){return this.getData(new Mo(t),e)}getBlob(t,e){return this.getData(new No(t),e)}getData64URI(t,e){return this.getData(new To(t),e)}getUint8Array(t){return this.getData(new oi,t)}getWritable(t=new D,e){return this.getData({writable:t},e)}async getArrayBuffer(t){return Se(await this.getUint8Array(t)).buffer}replaceBlob(t){fl(this,{data:t,Reader:_o,Writer:No,uncompressedSize:t.size})}replaceText(t){fl(this,{data:t,Reader:Uo,Writer:Mo,uncompressedSize:Oo(t)})}replaceData64URI(t){fl(this,{data:t,Reader:Co,Writer:To,uncompressedSize:dl(t)})}replaceUint8Array(t){fl(this,{data:t,Reader:ri,Writer:oi,uncompressedSize:t.length})}replaceReadable(t){fl(this,{data:null,Reader:$u(t),Writer:null,uncompressedSize:ft})}}class Gu extends Hu{constructor(t,e,n,r){super(t,e,n,r),this.directory=!0}clone(t){const e=this,n=new Gu(e.fs,e.name,e);return t&&(n.children=e.children.map(e=>{const r=e.clone(t);return r.parent=n,r})),n}addDirectory(t,e){return Sl(this,t,{options:e},!0)}addText(t,e,n={}){return Sl(this,t,{data:e,Reader:Uo,Writer:Mo,options:n,uncompressedSize:Oo(e)})}addBlob(t,e,n={}){return Sl(this,t,{data:e,Reader:_o,Writer:No,options:n,uncompressedSize:e.size})}addData64URI(t,e,n={}){return Sl(this,t,{data:e,Reader:Co,Writer:To,options:n,uncompressedSize:dl(e)})}addUint8Array(t,e,n={}){return Sl(this,t,{data:e,Reader:ri,Writer:oi,options:n,uncompressedSize:e.length})}addHttpContent(t,e,n={}){return Sl(this,t,{data:e,Reader:class extends ni{constructor(t){super(t,n)}},options:n})}addReadable(t,e,n={}){return Sl(this,t,{Reader:$u(e),options:n})}addFileSystemEntry(t,e={}){return hl(this,t,e)}addFileSystemHandle(t,e={}){return hl(this,t,e)}addFile(t,e={}){return(e=n.assign({},e)).lastModDate||(e.lastModDate=new s(t.lastModified)),Sl(this,t.name,{data:t,Reader:function(){return{readable:t.stream(),size:t.size}},options:e,uncompressedSize:t.size})}importBlob(t,e){return this.importZip(new _o(t),e)}importData64URI(t,e){return this.importZip(new Co(t),e)}importUint8Array(t,e){return this.importZip(new ri(t),e)}importHttpContent(t,e){return this.importZip(new ni(t,e),e)}importReadable(t,e){return this.importZip({readable:t},e)}exportBlob(t={}){return this.exportZip(new No(t.mimeType||"application/zip"),t)}exportData64URI(t={}){return this.exportZip(new To(t.mimeType||"application/zip"),t)}exportUint8Array(t={}){return this.exportZip(new oi,t)}async exportWritable(t=new D,e={}){return await this.exportZip({writable:t},e),t}exportFileSystemHandle(t,e={}){return async function(t,e,r){const{onstart:o,onprogress:i,onend:a}=r;ll(r.passThrough),al(r);const s=il(r.readerOptions),c=new AbortController,{signal:u}=c,l=function(t,e){if(!qt(t))return()=>{};if(t.aborted)return e.abort(t.reason),()=>{};const n=()=>e.abort(t.reason);return t.addEventListener("abort",n,{once:!0}),()=>t.removeEventListener("abort",n)}(r.signal,c),f=n.assign({},r,s,{signal:u,onstart:ft,onprogress:ft,onend:ft,preventClose:!1}),w=Yu([t],t=>Xu(t,f.passThrough)),p=[];let h=!1,m=0;try{o&&await _r(o,w),await E(t,e),a&&await _r(a,m)}catch(t){try{t.exportedEntryNames=p}catch{}throw t}finally{l()}return e;function y(t){const e=t.getWriter();return new D({async write(t){await e.write(t),m+=t.length,i&&await _r(i,m,w)},close:()=>e.close(),abort:t=>e.abort(t)})}async function E(t,e){if(r.concurrent){const n=(await g.allSettled(t.children.map(t=>S(t,e)))).filter(t=>"rejected"==t.status);if(n.length){const t=n.filter(t=>!nl(t.reason));throw function(t){const[e]=t,n=t.slice(1).flatMap(t=>[t,...t&&t.entryErrors||[]]).filter(t=>t!==e);if(n.length)try{e.entryErrors=[...e.entryErrors||[],...n]}catch{}return e}((t.length?t:n).map(t=>t.reason))}}else for(const n of t.children)await S(n,e)}async function S(e,n){if(u.aborted){if(h||nl(u.reason))return;Yt(u)}try{if(e.directory){const t=await n.getDirectoryHandle(e.name,{create:!0});await E(e,t)}else{const r=await n.getFileHandle(e.name,{create:!0}),o=await r.createWritable();try{await e.getData({writable:y(o)},f)}catch(t){throw h?new d(Wu):t}p.push(e.getRelativeName(t))}}catch(n){h=!0,c.abort(new d(Wu));try{n.entryName===ft&&(n.entryName=e.getRelativeName(t),n.entryId=e.id)}catch{}throw n}}}(this,t,e)}async importZip(t,e={}){let r;t&&typeof t.getEntries==pt?(r=t,e=n.assign({},r.options,e)):(await li(t),r=new Za(t,e)),ll(e.passThrough),al(e);const o=function(t){if(t===ft)return ku;if(Nu.has(t))return t;throw new d(Fu)}(e.duplicates),i=[],a={qe:[]},s=await r.getEntries(e);for(const t of s){let r=this;try{const s=t.filename.split("/").filter(t=>""!=t&&"."!=t),c=s.pop();let u=!1;for(const t of s){const e=r;if(r=r.getChildByName(t),r){if(!r.directory){if(o==vu){u=!0;break}if(o!=_u)throw new d(zu);this.fs.remove(r),r=new Gu(this.fs,t,{data:null},e),i.push(r)}}else r=new Gu(this.fs,t,{data:null},e),i.push(r)}if(u)continue;if(t.directory){let e=r;if(c){if(e=r.getChildByName(c),e&&(!e.directory||e.data)){if(o==vu)continue;if(o!=_u)throw new d(zu);e.directory?e.data=t:(this.fs.remove(e),e=ft)}e||(e=new Gu(this.fs,c,{data:null},r),i.push(e))}e==this||e.data||(e.data=t)}else{const s=r.getChildByName(c);if(s){if(o==vu)continue;if(o!=_u)throw new d(zu);this.fs.remove(s)}i.push(Sl(r,c,{data:t,Reader:Ju(n.assign({},e),a),uncompressedSize:e.passThrough?t.compressedSize:t.uncompressedSize,passThrough:e.passThrough}))}}catch(e){i.reverse().forEach(t=>this.fs.remove(t));try{e.cause={entry:t}}catch{}throw e}}return i}async exportZip(t,e={}){const r=this,o=Boolean(t)&&typeof t.add==pt;e=n.assign({},e),o||e.bufferedWrite!==ft||(e.bufferedWrite=!0);const[i]=await g.all([tl(r,il(e.readerOptions)),o?ft:li(t)]),a=o?t:new Rc(t,e);return await async function(t,e,r,o,i){const{onstart:a,onprogress:s,onend:c,onentryprogress:u}=o,l=e,f=Yu(e.children,t=>pl(t)?0:1);let d=0,w=0;if(a&&await _r(a,r),o.bufferedWrite)await async function t(e){const n=(await g.allSettled(e.children.map(async e=>{await p(e),await t(e)}))).find(t=>"rejected"==t.status);if(n)throw n.reason}(e);else for(const t of e.getChildren({recursive:!0}))await p(t);async function p(e){if(pl(e))return;const{name:a,ee:c}=rl(e,l,o);let p=0;const h=await t.add(a,i.get(e),n.assign(c,{onstart:ft,onend:ft,onprogress:async t=>{d+=t-p,p=t,s&&await _r(s,d,r)}}));w++,u&&await _r(u,w,f,h)}c&&await _r(c,d)}(a,r,Yu([r],Ku),e,i),o?a:(await a.close(e.globalComment),t.getData?t.getData():t.writable)}async getExportedSize(t={}){const e=this;il((t=n.assign({},t)).readerOptions),t.bufferedWrite===ft&&(t.bufferedWrite=!0);const r=e.getChildren({recursive:!0}),o=r.filter(t=>!pl(t)).map(n=>{const{name:r,ee:o}=rl(n,e,t);return{name:r,size:n.directory?0:ol(n,wl(n,t)),options:o}}),i=!t.bufferedWrite||o.every(t=>!1!==t.options.keepOrder)&&r.every(t=>pl(t)||!t.children.length);return await async function(t,e,r,o){const i={options:t};if(jt(t[_t]))throw new d(Qs);if(o!==ft&&!(o instanceof w))throw new d(ks);const s=du(o);if(s>M)throw new d(Ts);const l=t[kt],f=new c,p=t[Tt]===ft?0:t[Tt];let h=p,m=dt;const y=[],g=new u;for(const t of e){let{name:e}=t;const{size:r}=t,o=n.assign({},t.options);eu(i,o,Bi)&&!e.endsWith(st)&&(e+=st);const s=Cc(i,e,o);({name:e}=s);const{re:c}=Tc(i,e,o);0==c.level||c.compressionMethod!==ft||c.ie||await Ir(we())||(c.level=0);const u=!eu(i,o,Bi);if(u&&r===ft)throw new d(Qs);const{We:w,re:p}=vc(i,u,r,c,o);if(u&&!c.ie&&au(p.compressionMethod,p.level))throw new d(Qs);const E=n.assign({},o,s.re,c,p,{[kt]:l}),S=Nc(E),b=Mc(E),R={fe:S,he:du(S.ce,b.ue)};l&&Uc(R,h);const x=u?w:0;f.set(e,n.assign({},E,S,{offset:h,diskNumberStart:0,compressedSize:x}));const z=R.he+x;y.push(z),g.add(Boolean(E.jt||E.uncompressedSize>=O||x>=O)),m=a.min(m,z),h+=z}if(f.size>1&&(l||h-m>=O&&(g.size>1||_c(y,p,!0)!=_c(y,p,!1)))&&!r)throw new d(Qs);const{Fe:E,De:S}=Lc(f);let b=eu(i,t,Ni);if(h>=O||E>=O||f.size>=M){if(!1===b)throw new d(Ks);b=!0}else b===ft&&S&&(b=!0);return h-p+E+s+(b?98:Y)}(t,o,i,t.globalComment)}getChildByName(t){const e=this.children;for(let n=0;n<e.length;n++){const r=e[n];if(r.name==t)return r}}getChildren(t={}){return function(t,e){const n=[],r=[t];let o=0;for(;o<r.length;)for(const t of r[o++].children)n.push(t),e&&r.push(t);return n}(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 n=this.children;return!(await g.all(n.map(n=>n.checkPassword(t,e)))).includes(!1)}}class ju{constructor(){yl(this)}get children(){return this.root.children}remove(t){el(t);const e=[t];for(;e.length;){const t=e.pop();this.entries[t.id]=null;for(const n of t.children)e.push(n)}t.parent=ft}move(t,e){if(t==this.root)throw new d(Au);if(!e.directory)throw new d(Iu);if(e.isDescendantOf(t))throw new d(Du);if(t!=e){const n=e.getChildByName(t.name);if(n){if(n!=t)throw new d(xu)}else el(t),t.parent=e,e.children.push(t),El(this,t)}}find(t){const e=t.split("/");let n=this.root;for(let t=0;n&&t<e.length;t++)n=n.directory?n.getChildByName(e[t]):ft;return n||(n=this.entries.find(e=>e&&(e==this.root||e.isDescendantOf(this.root))&&e.getRelativeName()==t)),n}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,n){return this.root.addText(t,e,n)}addBlob(t,e,n){return this.root.addBlob(t,e,n)}addData64URI(t,e,n){return this.root.addData64URI(t,e,n)}addUint8Array(t,e,n){return this.root.addUint8Array(t,e,n)}addHttpContent(t,e,n){return this.root.addHttpContent(t,e,n)}addReadable(t,e,n){return this.root.addReadable(t,e,n)}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 gl(this,n=>n.importBlob(t,e))}importData64URI(t,e){return gl(this,n=>n.importData64URI(t,e))}importUint8Array(t,e){return gl(this,n=>n.importUint8Array(t,e))}importHttpContent(t,e){return gl(this,n=>n.importHttpContent(t,e))}importReadable(t,e){return gl(this,n=>n.importReadable(t,e))}importZip(t,e){return gl(this,n=>n.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 qu={FS:ju,ZipDirectoryEntry:Gu,ZipFileEntry:Vu};function Yu(t,n){let r=0;const o=e.from(t);for(;o.length;){const t=o.pop();r+=n(t)||0;for(const e of t.children)o.push(e)}return r}function Ku(t){return t.uncompressedSize}function Xu(t,e){const{data:n}=t;return e&&n instanceof Ki?n.compressedSize:t.uncompressedSize}function $u(t){let e;return function(){if(e)throw new d(Tu);return e=!0,{readable:t}}}function Ju(t,e){return class extends Ao{constructor(t,e={}){super(),this.entry=t,this.options=e}async init(){const r=this,o=n.assign({},t,r.options),{checkOverlappingEntry:i,checkOverlappingEntryOnly:a}=o,s=await async function(t,e,r){al(e);const{passwords:o,requestPassword:i,signal:a}=e;if(delete(e=n.assign({},e)).passwords,delete e.requestPassword,!t.encrypted||e.passThrough||!o&&!i)return t.getData(new No,e);const s=new u;let c;for(;;){for(const t of cl(e,r,o))if(!s.has(t.key)){const e=await f(t);if(e.done)return e.data;c=e.error}if(!i)break;if(r.Ye){await r.Ye;continue}let n;r.Ye=new g(t=>n=t);try{const e=await i(t,c);if(e===ft||null===e)break;if(typeof e!=mt)throw new d(Bu);const n=await f(ul(e));if(n.done)return n.data;c=n.error}finally{r.Ye=ft,n()}}if(!s.size)throw new d(oa);const l=new d($e);throw l.cause=c,l;async function f(o){s.add(o.key);const i=n.assign({},e,o.options);if(t.zipCrypto){i.checkCrc32=!0;try{await t.getData(null,n.assign({},i,{checkPasswordOnly:!0}))}catch(t){if(sl(t))return{done:!1,error:t};throw t}}try{const e=await t.getData(new No,i);return function(t,e){const{qe:n}=t,r=n.findIndex(t=>t.key===e.key);-1!=r&&n.splice(r,1),n.unshift(e)}(r,o),{done:!0,data:e}}catch(e){if(function(t,e){return Boolean(e&&e.aborted)||Re(t)&&"AbortError"==t.name}(e,a)||!function(t,e){return sl(t)||e.zipCrypto&&Re(t)&&Zu.has(t.message)}(e,t))throw e;return{done:!1,error:e}}}}(r.entry,n.assign(o,{checkPasswordOnly:!1,checkOverlappingEntry:a||i,checkOverlappingEntryOnly:!1,preventClose:!1}),e);r.data=s,r.Ke=new _o(s),r.size=s.size,super.init()}readUint8Array(t,e){return this.Ke.readUint8Array(t,e)}}}function Qu(t,e,n){return t.prototype?new t(e,n):t(e,n)}async function tl(t,e){const n=[],r=[t],o=new c;for(;r.length;){const t=r.pop();for(const e of t.children)e.directory?r.push(e):n.push(e)}return await g.all(n.map(async n=>{const r=n.reader=Qu(n.Reader,n.data,e);o.set(n,r);try{await li(r)}catch(e){try{e.entry=n,e.entryId=n.id,e.entryName=n.getRelativeName(t)}catch{}throw e}r.size!==ft&&(n.uncompressedSize=r.size,n.Ge=!1)})),o}function el(t){if(t.parent){const e=t.parent.children;e.forEach((n,r)=>{n.id==t.id&&e.splice(r,1)})}}function nl(t){return Boolean(t)&&t.message==Wu}function rl(t,e,r){const o=r.relativePath?t.getRelativeName(e):t.getFullname(),i=t.options||{};let a={},s={};if(t.data instanceof Ki){const e=wl(t,r),n=i.lastModDate===ft?r.lastModDate:i.lastModDate;({ee:a,ne:s}=Ic(t.data,e,n)),e&&(s.passThrough=!0)}const c=n.assign({lastModDate:t.je},a,r,i,s,{directory:t.directory});if(!t.directory&&c.passThrough&&c.uncompressedSize===ft)throw new d(Uu);return{name:o,ee:c}}function ol(t,e){const{reader:n}=t;return n&&n.size!==ft?n.size:t.Ge?ft:Xu(t,e)}function il(t){if(t&&(typeof t!=ht||e.isArray(t)))throw new d(Ou);return t&&(ll(t.passThrough),al(t)),t}function al(t){const{passwords:n,requestPassword:r}=t;if(n&&(!e.isArray(n)||n.some(t=>typeof t!=mt)))throw new d(Lu);if(r&&typeof r!=pt)throw new d(Bu)}function sl(t){return Re(t)&&t.message==$e}function cl(t,e,n){const r=[],{password:o,rawPassword:i}=t;return i&&i.length&&r.push({key:i,options:{password:"",rawPassword:i}}),o&&r.push(ul(o)),r.push(...e.qe),n&&r.push(...n.filter(t=>t).map(ul)),r}function ul(t){return{key:t,options:{password:t,rawPassword:Pu}}}function ll(t){if(Xt(t)===Wt)throw new d(Mu)}function fl(t,e){const{uncompressedSize:r}=e;n.assign(t,e,{reader:null,passThrough:ft,uncompressedSize:r===ft?0:r,Ge:r===ft})}function dl(t){let e=t.length;for(;"="==t.charAt(e-1);)e--;const n=t.indexOf(",")+1;return a.floor(.75*(e-n))}function wl(t,e){const{readerOptions:n}=e;return Boolean(!t.directory&&(t.passThrough||n&&n.passThrough))}function pl(t){return t.directory&&null===t.data}function hl(t,e,r){return async function t(e,o,i,a=""){if(o){const c=a?a+"/"+o.name:o.name;try{if((o.isFile||o.isDirectory)&&(o=await ml(o)),"file"==o.kind){const t=await o.getFile();i.push(Sl(e,t.name,{Reader:function(){return{readable:t.stream(),size:t.size}},options:n.assign({},{lastModDate:new s(t.lastModified)},r),uncompressedSize:t.size}))}else if("directory"==o.kind){const n=e.addDirectory(o.name,r);i.push(n);for await(const e of o.values())await t(n,e,i,c)}}catch(t){try{t.entryName===ft&&(t.entryName=c)}catch{}throw t}}return i}(t,e,[])}async function ml(t){const e={name:t.name};if(t.isFile&&(e.kind="file",e.getFile=()=>new g((e,n)=>t.file(e,n))),t.isDirectory){e.kind="directory";const n=await async function(t){const e=[];function n(t,r,o){t.readEntries(async i=>{if(i.length){for(const t of i)e.push(await ml(t));n(t,r,o)}else r(e)},o)}return await new g((e,r)=>n(t.createReader(),e,r)),{[k.iterator](){let t=0;return{next(){const n={value:e[t],done:t==e.length};return t++,n}}}}}(t);e.values=()=>n}return e}function yl(t){t.entries=[],t.Ve=0,t.root=new Gu(t)}function gl(t,e){const{entries:r,Ve:o,root:i}=t;return yl(t),e(t.root).catch(e=>{throw n.assign(t,{entries:r,Ve:o,root:i}),e})}function El(t,e){const n=[e];for(;n.length;){const e=n.pop();t.entries[e.id]=e;for(const t of e.children)n.push(t)}}function Sl(t,e,n,r){if(t.directory){const o=bl(e);return o&&(e=o.pop(),t=Rl(t,o)),r?new Gu(t.fs,e,n,t):new Vu(t.fs,e,n,t)}throw new d(Cu)}function bl(t){if(t.includes("/")){const e=t.split("/").filter(t=>""!=t&&"."!=t);if(e.length)return e}}function Rl(t,e,n){return e.forEach(e=>{const r=t;if(t=t.getChildByName(e)){if(!t.directory)throw new d(xu);if(n&&(t==n||t.isDescendantOf(n)))throw new d(Du)}else t=new Gu(r.fs,e,{data:null},r)}),t}t.BlobReader=_o,t.BlobWriter=No,t.Data64URIReader=Co,t.Data64URIWriter=To,t.ERR_ABORTED=Gt,t.ERR_AMBIGUOUS_ARCHIVE=ua,t.ERR_ANCESTOR_ENTRY=Du,t.ERR_BAD_FORMAT=Ji,t.ERR_CENTRAL_DIRECTORY_NOT_FOUND=ea,t.ERR_CODEC_OUT_OF_MEMORY=qn,t.ERR_DUPLICATED_NAME=Cs,t.ERR_DUPLICATE_IMPORTED_ENTRY=zu,t.ERR_ENCRYPTED=oa,t.ERR_ENCRYPTED_CENTRAL_DIRECTORY=la,t.ERR_ENTRY_DATA_OUT_OF_BOUNDS=ca,t.ERR_ENTRY_EXISTS=xu,t.ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND=ta,t.ERR_EOCDR_NOT_FOUND=Qi,t.ERR_EXTRAFIELD_ZIP64_NOT_FOUND=ra,t.ERR_HTTP_RANGE=po,t.ERR_HTTP_RESOURCE_CHANGED=ho,t.ERR_HTTP_STATUS=wo,t.ERR_INVALID_AUTHENTICATION_CODE=Je,t.ERR_INVALID_BASE_URI=ne,t.ERR_INVALID_CODEC_DEFINITION=Nn,t.ERR_INVALID_CODEC_MODULE=On,t.ERR_INVALID_COMMENT=Ts,t.ERR_INVALID_COMMENT_TYPE=ks,t.ERR_INVALID_COMPRESSED_DATA=jn,t.ERR_INVALID_CRC32=Yn,t.ERR_INVALID_DATE=Ns,t.ERR_INVALID_DUPLICATES=Fu,t.ERR_INVALID_ENCRYPTION_STRENGTH=Ms,t.ERR_INVALID_ENTRY=dc,t.ERR_INVALID_ENTRY_COMMENT=vs,t.ERR_INVALID_ENTRY_COMMENT_TYPE=_s,t.ERR_INVALID_ENTRY_NAME=Us,t.ERR_INVALID_EXTRAFIELD=Ps,t.ERR_INVALID_EXTRAFIELD_DATA=Vs,t.ERR_INVALID_EXTRAFIELD_DATA_TYPE=Hs,t.ERR_INVALID_EXTRAFIELD_TYPE=Zs,t.ERR_INVALID_FILENAME_VALIDATION=wa,t.ERR_INVALID_FUNCTION_OPTION=Pt,t.ERR_INVALID_GID=oc,t.ERR_INVALID_LEVEL=lc,t.ERR_INVALID_MAX_APPENDED_DATA_SIZE=pa,t.ERR_INVALID_MAX_WORKERS=ee,t.ERR_INVALID_MSDOS_ATTRIBUTES=cc,t.ERR_INVALID_MSDOS_DATA=uc,t.ERR_INVALID_PASSWORD=$e,t.ERR_INVALID_PASSWORDS=Lu,t.ERR_INVALID_PASSWORD_TYPE=Ht,t.ERR_INVALID_PASS_THROUGH=Uu,t.ERR_INVALID_PASS_THROUGH_VALUE=Vt,t.ERR_INVALID_READER=ec,t.ERR_INVALID_READER_OPTIONS=Ou,t.ERR_INVALID_REQUEST_PASSWORD=Bu,t.ERR_INVALID_SIGNAL=Zt,t.ERR_INVALID_SIGNATURE_DATA=fc,t.ERR_INVALID_STRICTNESS=da,t.ERR_INVALID_UID=rc,t.ERR_INVALID_UNCOMPRESSED_SIZE=Gn,t.ERR_INVALID_UNIX_EXTRA_FIELD_TYPE=ac,t.ERR_INVALID_UNIX_ID_SIZE=sc,t.ERR_INVALID_UNIX_MODE=ic,t.ERR_INVALID_URI=re,t.ERR_INVALID_VERSION=Os,t.ERR_ITERATOR_COMPLETED_TOO_SOON=mo,t.ERR_LOCAL_FILE_HEADER_NOT_FOUND=na,t.ERR_OVERLAPPING_ENTRY=sa,t.ERR_PARENT_NOT_DIRECTORY=Cu,t.ERR_READABLE_CONSUMED=Tu,t.ERR_RESERVED_COMPRESSION_METHOD=Un,t.ERR_ROOT_DIRECTORY_NOT_MOVABLE=Au,t.ERR_SPLIT_ZIP_FILE=aa,t.ERR_TARGET_NOT_DIRECTORY=Iu,t.ERR_UNDEFINED_COMPRESSION_METHOD=$s,t.ERR_UNDEFINED_CRC32=Js,t.ERR_UNDEFINED_READER=tc,t.ERR_UNDEFINED_UNCOMPRESSED_SIZE=Xs,t.ERR_UNDETERMINED_SIZE=Qs,t.ERR_UNSAFE_FILENAME=fa,t.ERR_UNSUPPORTED_COMPRESSION=Mn,t.ERR_UNSUPPORTED_CONTEXT=Ru,t.ERR_UNSUPPORTED_CRYPTO_API=tn,t.ERR_UNSUPPORTED_ENCRYPTION=ia,t.ERR_UNSUPPORTED_ENCRYPTION_PASS_THROUGH=Ws,t.ERR_UNSUPPORTED_ENCRYPTION_USDZ=Ls,t.ERR_UNSUPPORTED_FORMAT=Ks,t.ERR_UNSUPPORTED_PASS_THROUGH_VALUE=Mu,t.ERR_UNSUPPORTED_SPLIT_USDZ=Bs,t.ERR_UNSUPPORTED_UINT64=ha,t.ERR_WORKER_STARTUP_TIMEOUT=xr,t.ERR_WRITER_NOT_INITIALIZED=yo,t.ERR_WRITER_SIZE_NOT_WRITABLE=go,t.ERR_ZIP_CRYPTO_LAST_MOD_DATE=wc,t.ERR_ZIP_NOT_EMPTY=nc,t.HttpRangeReader=class extends ni{constructor(t,e={}){super(t,n.assign({},e,{useRangeHeader:!0}))}},t.HttpReader=ni,t.Reader=Ao,t.SplitDataReader=ii,t.SplitDataWriter=ai,t.TextReader=Uo,t.TextWriter=Mo,t.Uint8ArrayReader=ri,t.Uint8ArrayWriter=oi,t.VERSION="2.20.0",t.WARNING_APPENDED_DATA=Ra,t.WARNING_CLAMPED_LAST_MODIFICATION_DATE=hc,t.WARNING_COMPRESSED_PATCHED_DATA=ga,t.WARNING_COMPRESSION_UNAVAILABLE=pc,t.WARNING_DUPLICATE_FILENAME=Ia,t.WARNING_MALFORMED_EXTRA_FIELD=Ea,t.WARNING_MISMATCHED_CENTRAL_DIRECTORY_OFFSET=Da,t.WARNING_MISMATCHED_LOCAL_FILE_HEADER_BIT_FLAG=va,t.WARNING_MISMATCHED_LOCAL_FILE_HEADER_COMPRESSION_METHOD=_a,t.WARNING_MISMATCHED_LOCAL_FILE_HEADER_CRC32_OR_SIZES=Na,t.WARNING_MISMATCHED_LOCAL_FILE_HEADER_FILENAME=ka,t.WARNING_MISMATCHED_ZIP64_END_OF_CENTRAL_DIRECTORY=Ca,t.WARNING_MISSING_ZIP64_EXTRA_FIELD=Aa,t.WARNING_MULTIPLE_END_OF_CENTRAL_DIRECTORY=Ta,t.WARNING_PREPENDED_CENTRAL_DIRECTORY=za,t.WARNING_PREPENDED_DATA=xa,t.WARNING_TRAILING_CENTRAL_DIRECTORY_DATA=Fa,t.WARNING_UNKNOWN_VERSION=ya,t.WARNING_UNKNOWN_ZIP64_EXTENSIBLE_DATA=Sa,t.WARNING_UNSORTED_CENTRAL_DIRECTORY=ma,t.WARNING_WRAPPED_ENTRIES_COUNT=ba,t.Writer=Io,t.ZipDirectoryEntry=Gu,t.ZipEntry=Hu,t.ZipFS=ju,t.ZipFileEntry=Vu,t.ZipReader=Za,t.ZipReaderStream=Ha,t.ZipWriter=Rc,t.ZipWriterStream=class{constructor(t={}){const{readable:e,writable:n}=new z;this.readable=e,this.zipWriter=new Rc(n,t),this._t=new u}transform(t){const e=this.zipWriter;let n;const{readable:r,writable:o}=new z({start(t){n=t},flush:()=>{!async function(){try{await e.close()}catch(t){await Dc(e,t)}}()}});return Ac(this,this.zipWriter.add(t,r),t=>n.error(t)),{readable:this.readable,writable:o}}writable(t){let e;const{readable:n,writable:r}=new z({start(t){e=t}});return Ac(this,this.zipWriter.add(t,n),t=>e.error(t)),r}async close(t,n={}){const{zipWriter:r}=this,o=(await g.allSettled(e.from(this._t))).filter(t=>"rejected"==t.status).map(t=>t.reason);if(o.length){const[t]=o;try{t.entryErrors=o}catch{}throw await Dc(r,t),t}try{return await r.close(t,n)}catch(t){throw await Dc(r,t),t}}},t.configure=function(t){n.assign(de,me(ge(t)))},t.createBlobTempStream=function(t={}){const{thresholdBytes:e=Eu}=t;return function(){const t=[];let n,r,o,i=0,a=!1;const s=new D({async write(o){a?await n.write(o):(t.push(o),i+=o.length,i>e&&await async function(){const e=new z;r=vn(e.readable),n=e.writable.getWriter(),a=!0;for(const e of t)await n.write(e);t.length=0}())},async close(){n&&(await n.close(),n=null)}});let c=0;return{writable:s,readable:new F({async pull(e){if(a){if(!o){const t=await r;o=t.stream().getReader()}const{value:t,done:n}=await o.read();n?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(n){try{await n.abort()}catch{}n=null}r&&(r.catch(()=>{}),r=null),t.length=0}}}},t.createOPFSTempStream=function(t={}){const{thresholdBytes:n=yu,directoryName:r=gu,getDirectory:o=()=>C.storage.getDirectory()}=t;let i;function a(){return i||(i=g.resolve(o()).then(t=>t.getDirectoryHandle(r,{create:!0}))),i}return function(){const t=[];let r,o,i,s,c=0,u=!1;const l=new D({async write(s){u?await i.write(s):(t.push(s),c+=s.length,c>n&&await async function(){const n=await a();r=R.randomUUID?R.randomUUID():e.from(R.getRandomValues(new w(16)),t=>t.toString(16).padStart(2,"0")).join(""),o=await n.getFileHandle(r,{create:!0}),i=(await o.createWritable()).getWriter(),u=!0;for(const e of t)await i.write(e);t.length=0}())},async close(){i&&(await i.close(),i=null)}});let f=0;return{writable:l,readable:new F({async pull(e){if(u){if(!s){const t=await o.getFile();s=t.stream().getReader()}const{value:t,done:n}=await s.read();n?e.close():e.enqueue(t)}else f<t.length?e.enqueue(t[f++]):e.close()},async cancel(t){s&&await s.cancel(t)}},{highWaterMark:0}),dispose:async function(){if(i){try{await i.close()}catch{}i=null}if(r){try{const t=await a();await t.removeEntry(r)}catch{}o=r=null}t.length=0}}}},t.createSyncAccessHandleTempStream=function(t={}){const{thresholdBytes:n=Su,directoryName:r=bu,getDirectory:o}=t;if(!(o||"undefined"!=typeof FileSystemFileHandle&&FileSystemFileHandle.prototype.createSyncAccessHandle))throw new d(Ru);const i=o||(()=>C.storage.getDirectory());let s;function c(){return s||(s=g.resolve(i()).then(t=>t.getDirectoryHandle(r,{create:!0}))),s}return function(){const t=[];let r,o,i=0,s=!1,u=0,l=0;const f=new D({async write(a){s?(o.write(a,{at:u}),u+=a.length):(t.push(a),i+=a.length,i>n&&await async function(){const n=await c();r=R.randomUUID?R.randomUUID():e.from(R.getRandomValues(new w(16)),t=>t.toString(16).padStart(2,"0")).join("");const i=await n.getFileHandle(r,{create:!0});o=await i.createSyncAccessHandle(),s=!0;for(const e of t)o.write(e,{at:u}),u+=e.length;t.length=0}())},close(){o&&o.flush()}});let d=0;return{writable:f,readable:new F({pull(e){if(s){const t=u-l;if(t<=0)return void e.close();const n=new w(a.min(524288,t)),r=o.read(n,{at:l});r?(l+=r,e.enqueue(n.subarray(0,r))):e.close()}else d<t.length?e.enqueue(t[d++]):e.close()}},{highWaterMark:0}),dispose:async function(){if(o){try{o.close()}catch{}o=null}if(r){try{const t=await c();await t.removeEntry(r)}catch{}r=null}t.length=0}}}},t.fs=qu,t.getMimeType=function(){return"application/octet-stream"},t.getRegisteredCodecs=Zn,t.getSupportedCompressionMethods=function(){const{CompressionStream:t,DecompressionStream:e,CompressionStreamFallback:n,DecompressionStreamFallback:r}=we(),o=[{compressionMethod:0,compression:!0,decompression:!0,registered:!1},{compressionMethod:8,compression:mu(n,Kn)||mu(t,Kn)||mu(t,$n),decompression:mu(r,Kn)||mu(e,Kn)||mu(e,$n),registered:!1},{compressionMethod:9,compression:!1,decompression:mu(r,Xn)||mu(e,Xn),registered:!1}];for(const t of Zn()){const e=Hn(t.format);o.push({compressionMethod:t.compressionMethod,compression:e?typeof e.CompressionStream==pt:ft,decompression:e?typeof e.DecompressionStream==pt:ft,registered:!0})}return o},t.isZipFile=Va,t.registerCodec=function(t={}){const{compressionMethod:e,format:n,codecURI:r,CompressionStream:i,DecompressionStream:a,versionNeeded:s}=t;if(!o.isInteger(e)||e<0||e>M||typeof n!=mt||!n.length)throw new d(Nn);if(Ln.includes(e))throw new d(Un);const c=typeof i==pt||typeof a==pt;if(!(c||typeof r==mt&&r.length))throw new d(Nn);Bn.set(e,{compressionMethod:e,format:n,codecURI:r,versionNeeded:s}),c&&Vn(n,{CompressionStream:i,DecompressionStream:a})},t.resetConfiguration=function(){for(const t of fe)delete de[t];n.assign(de,ie)},t.terminateWorkers=async function(){await g.allSettled([oo(),...Kr.map(t=>(so(t),t.terminate()))]),zr=ft,Fr=!1},t.unregisterCodec=function(t){const e=Bn.get(t);if(e){let n;Bn.delete(t),Bn.forEach(t=>n=n||t.format==e.format),n||Wn.delete(e.format)}}});
1
+ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).zip={})}(this,function(t){"use strict";const{Array:e,Object:n,String:r,Number:o,BigInt:i,Math:a,Date:s,Map:c,Set:u,Response:l,URL:f,Error:d,Uint8Array:w,Uint16Array:p,Uint32Array:h,DataView:m,Blob:y,Promise:g,TextEncoder:E,TextDecoder:S,document:b,crypto:R,btoa:x,TransformStream:z,ReadableStream:F,WritableStream:D,CompressionStream:A,DecompressionStream:I,navigator:C,Worker:T,Symbol:k,setTimeout:v,clearTimeout:_,structuredClone:N}="undefined"!=typeof globalThis?globalThis:self;var U=void 0!==b?b.currentScript:null;const O=4294967295,M=65535,L=255,B=67324752,W=134695760,P=W,Z=84233040,H=33639248,V=101010256,G=101075792,j=117853008,q=46,Y=22,K=20,X=56,$=39169,J=21589,Q=6534,tt=30837,et=30805,nt=2048,rt=8192,ot=61440,it=16384,at=2048,st=1024,ct="/",ut=30,lt=new s(2107,11,31,23,59,58),ft=new s(1980,0,1),dt=void 0,wt=1/0,pt="Local file header not found",ht="Overlapping entry found",mt="Zip64 extra field not found",yt="undefined",gt="function",Et="object",St="string",bt="boolean",Rt=new w,xt=k.asyncDispose||k(),zt="password",Ft="rawPassword",Dt="passThrough",At="signal",It="checkAmbiguity",Ct="useWebWorkers",Tt="useCompressionStream",kt="preventClose",vt="level",_t="useUnicodeFileNames",Nt="dataDescriptor",Ut="offset",Ot="usdz",Mt="strictness",Lt="maxAppendedDataSize",Bt="signCentralDirectory",Wt="entry",Pt="filename",Zt="comment",Ht="strict",Vt="balanced",Gt="tolerant",jt="compressed",qt="Invalid option (must be a function)",Yt="Invalid signal (must be an AbortSignal instance)",Kt="Invalid password (password must be a string, rawPassword must be a Uint8Array)",Xt="Invalid passThrough option (must be a boolean or 'compressed')",$t="Invalid readerOptions (must be an object)",Jt="The operation was aborted";function Qt(t){if(t&&typeof t!=gt)throw new d(qt);return t}function te(t){if(t&&(typeof t!=Et||e.isArray(t)))throw new d($t);return t}function ee(t){if(t&&(typeof t.addEventListener!=gt||typeof t.aborted!=bt))throw new d(Yt);return t||dt}function ne(t){if(t&&t.aborted)throw t.reason===dt?new DOMException(Jt,"AbortError"):t.reason}function re(t,e){if(t&&typeof t!=St||e&&!(e instanceof w))throw new d(Kt)}function oe(t){if(t!==dt&&typeof t!=bt&&t!==jt)throw new d(Xt);return t}function ie(t,e,n){if(!o.isInteger(t)||t<0||t>e)throw new d(n)}function ae(t,e,n){t!==dt&&ie(t,e,n)}function se(t){return typeof t==St&&t.trim()?o(t):t}const ce=262144,ue="Invalid maxWorkers (must be an integer greater than 0)",le="Invalid baseURI (must be a string)",fe="Invalid URI (must be a string or a function returning a string)";let de=2;try{typeof C!=yt&&C.hardwareConcurrency&&(de=C.hardwareConcurrency)}catch{}const we={workerURI:"./core/web-worker-wasm.js",wasmURI:"./core/streams/zlib-wasm/zlib-streams.wasm",chunkSize:ce,maxWorkers:de,terminateWorkerTimeout:5e3,workerStarvationTimeout:5e3,workerStartupTimeout:5e3,useWebWorkers:!0,useCompressionStream:!0,CompressionStream:typeof A!=yt&&A,DecompressionStream:typeof I!=yt&&I},pe="maxWorkers",he="baseURI",me=["wasmURI","workerURI"],ye=["chunkSize",pe,"terminateWorkerTimeout","workerStarvationTimeout","workerStartupTimeout"],ge=["createWorker","CompressionStream","DecompressionStream","CompressionStreamFallback","DecompressionStreamFallback"],Ee=[he,...me,"useCompressionStream","useWebWorkers",...ye,...ge],Se={...we};function be(){return Se}function Re(t){return xe(t.chunkSize)}function xe(t){return t=se(t),o.isInteger(t)&&t>=1?a.max(t,64):ce}function ze(t){const e={};for(const n of Ee){const r=t[n];r!==dt&&(e[n]=Fe(n,r))}return e}function Fe(t,e){if(ye.includes(t)){if(e=se(e),t==pe&&(!o.isInteger(e)||e<1))throw new d(ue)}else if(ge.includes(t))Qt(e);else if(t==he){if(e&&typeof e!=St)throw new d(le)}else if(me.includes(t)&&e&&typeof e!=St&&typeof e!=gt)throw new d(fe);return e}function De(t){t=t||{};const{CompressionStreamZlib:e,DecompressionStreamZlib:r}=t;if(e===dt&&r===dt)return t;const o=n.assign({},t);return o.CompressionStreamFallback===dt&&(o.CompressionStreamFallback=e),o.DecompressionStreamFallback===dt&&(o.DecompressionStreamFallback=r),o}function Ae(t,e){const n=new w(t.length+e.length);return n.set(t),n.set(e,t.length),n}function Ie(t){return t.byteOffset||t.byteLength!=t.buffer.byteLength?new w(t):t}function Ce(t){return new m(t.buffer,t.byteOffset,t.byteLength)}function Te(t){return Boolean(t)&&"object"==typeof t}const ke=[[],[],[],[],[],[],[],[]];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;ke[0][t]=e}for(let t=0;t<256;t++)for(let e=1;e<8;e++){const n=ke[e-1][t];ke[e][t]=n>>>8^ke[0][255&n]}const[ve,_e,Ne,Ue,Oe,Me,Le,Be]=ke;class We{constructor(t){this.o=t||-1}append(t){let e=0|this.o;const n=0|t.length;let r=0;if(n>=8&&t.buffer){const o=new m(t.buffer,t.byteOffset,n),i=n-8;for(;r<=i;r+=8){const t=e^o.getInt32(r,!0),n=o.getInt32(r+4,!0);e=Be[255&t]^Le[t>>>8&255]^Me[t>>>16&255]^Oe[t>>>24&255]^Ue[255&n]^Ne[n>>>8&255]^_e[n>>>16&255]^ve[n>>>24&255]}}for(;r<n;r++)e=e>>>8^ve[255&(e^t[r])];this.o=e}get(){return~this.o}}class Pe extends z{constructor(){let t;const e=new We;super({transform(t,n){e.append(t),n.enqueue(t)},flush(){const n=new w(4);new m(n.buffer).setUint32(0,e.get()),t.value=n}}),t=this}}function Ze(t){if(typeof E==yt){t=unescape(encodeURIComponent(t));const e=new w(t.length);for(let n=0;n<e.length;n++)e[n]=t.charCodeAt(n);return e}return(new E).encode(t)}const He=64,Ve=20,Ge=new w([128]),je=new w(1),qe=new Int32Array([1732584193,4023233417,2562383102,271733878,3285377520]),Ye=new w(256),Ke=new Int32Array(256),Xe=new Int32Array(256),$e=new Int32Array(256),Je=new Int32Array(256);let Qe=!1;function tn(t){const e=function(){const t=new Int32Array(qe),e=new Int32Array(16),n=new w(He),r=new m(n.buffer),o=new w(8);let i=0,s=0;return{update:c,digest:function(){const e=8*s,n=a.floor(e/4294967296),r=e>>>0;for(c(Ge,0,1);56!=i;)c(je,0,1);o[0]=n>>>24,o[1]=n>>>16,o[2]=n>>>8,o[3]=n,o[4]=r>>>24,o[5]=r>>>16,o[6]=r>>>8,o[7]=r,c(o,0,8);const u=new w(Ve),l=new m(u.buffer);for(let e=0;e<t.length;e++)l.setInt32(4*e,t[e]);return t.set(qe),i=0,s=0,u}};function c(t,e,o){const a=e+o;if(s+=o,i){for(;e<a&&i<He;)n[i++]=t[e++];i==He&&(u(r,0),i=0)}if(e+He<=a){const n=new m(t.buffer,t.byteOffset,t.byteLength);for(;e+He<=a;e+=He)u(n,e)}for(;e<a;)n[i++]=t[e++]}function u(n,r){for(let t=0;t<16;t++)e[t]=n.getInt32(r+4*t);let o,i=t[0],a=t[1],s=t[2],c=t[3],u=t[4];for(let t=0;t<15;t+=5)u=(i<<5|i>>>27)+((s^c)&a^c)+u+1518500249+e[t]|0,a=a<<30|a>>>2,c=(u<<5|u>>>27)+((a^s)&i^s)+c+1518500249+e[t+1]|0,i=i<<30|i>>>2,s=(c<<5|c>>>27)+((i^a)&u^a)+s+1518500249+e[t+2]|0,u=u<<30|u>>>2,a=(s<<5|s>>>27)+((u^i)&c^i)+a+1518500249+e[t+3]|0,c=c<<30|c>>>2,i=(a<<5|a>>>27)+((c^u)&s^u)+i+1518500249+e[t+4]|0,s=s<<30|s>>>2;u=(i<<5|i>>>27)+((s^c)&a^c)+u+1518500249+e[15]|0,a=a<<30|a>>>2,o=e[13]^e[8]^e[2]^e[0],o=o<<1|o>>>31,e[0]=o,c=(u<<5|u>>>27)+((a^s)&i^s)+c+1518500249+o|0,i=i<<30|i>>>2,o=e[14]^e[9]^e[3]^e[1],o=o<<1|o>>>31,e[1]=o,s=(c<<5|c>>>27)+((i^a)&u^a)+s+1518500249+o|0,u=u<<30|u>>>2,o=e[15]^e[10]^e[4]^e[2],o=o<<1|o>>>31,e[2]=o,a=(s<<5|s>>>27)+((u^i)&c^i)+a+1518500249+o|0,c=c<<30|c>>>2,o=e[0]^e[11]^e[5]^e[3],o=o<<1|o>>>31,e[3]=o,i=(a<<5|a>>>27)+((c^u)&s^u)+i+1518500249+o|0,s=s<<30|s>>>2;for(let t=20;t<40;t+=5)o=e[t-3&15]^e[t-8&15]^e[t-14&15]^e[15&t],o=o<<1|o>>>31,e[15&t]=o,u=(i<<5|i>>>27)+(a^s^c)+u+1859775393+o|0,a=a<<30|a>>>2,o=e[t-2&15]^e[t-7&15]^e[t-13&15]^e[t+1&15],o=o<<1|o>>>31,e[t+1&15]=o,c=(u<<5|u>>>27)+(i^a^s)+c+1859775393+o|0,i=i<<30|i>>>2,o=e[t-1&15]^e[t-6&15]^e[t-12&15]^e[t+2&15],o=o<<1|o>>>31,e[t+2&15]=o,s=(c<<5|c>>>27)+(u^i^a)+s+1859775393+o|0,u=u<<30|u>>>2,o=e[15&t]^e[t-5&15]^e[t-11&15]^e[t+3&15],o=o<<1|o>>>31,e[t+3&15]=o,a=(s<<5|s>>>27)+(c^u^i)+a+1859775393+o|0,c=c<<30|c>>>2,o=e[t+1&15]^e[t-4&15]^e[t-10&15]^e[t+4&15],o=o<<1|o>>>31,e[t+4&15]=o,i=(a<<5|a>>>27)+(s^c^u)+i+1859775393+o|0,s=s<<30|s>>>2;for(let t=40;t<60;t+=5)o=e[t-3&15]^e[t-8&15]^e[t-14&15]^e[15&t],o=o<<1|o>>>31,e[15&t]=o,u=(i<<5|i>>>27)+(a&s|(a|s)&c)+u+2400959708+o|0,a=a<<30|a>>>2,o=e[t-2&15]^e[t-7&15]^e[t-13&15]^e[t+1&15],o=o<<1|o>>>31,e[t+1&15]=o,c=(u<<5|u>>>27)+(i&a|(i|a)&s)+c+2400959708+o|0,i=i<<30|i>>>2,o=e[t-1&15]^e[t-6&15]^e[t-12&15]^e[t+2&15],o=o<<1|o>>>31,e[t+2&15]=o,s=(c<<5|c>>>27)+(u&i|(u|i)&a)+s+2400959708+o|0,u=u<<30|u>>>2,o=e[15&t]^e[t-5&15]^e[t-11&15]^e[t+3&15],o=o<<1|o>>>31,e[t+3&15]=o,a=(s<<5|s>>>27)+(c&u|(c|u)&i)+a+2400959708+o|0,c=c<<30|c>>>2,o=e[t+1&15]^e[t-4&15]^e[t-10&15]^e[t+4&15],o=o<<1|o>>>31,e[t+4&15]=o,i=(a<<5|a>>>27)+(s&c|(s|c)&u)+i+2400959708+o|0,s=s<<30|s>>>2;for(let t=60;t<80;t+=5)o=e[t-3&15]^e[t-8&15]^e[t-14&15]^e[15&t],o=o<<1|o>>>31,e[15&t]=o,u=(i<<5|i>>>27)+(a^s^c)+u+3395469782+o|0,a=a<<30|a>>>2,o=e[t-2&15]^e[t-7&15]^e[t-13&15]^e[t+1&15],o=o<<1|o>>>31,e[t+1&15]=o,c=(u<<5|u>>>27)+(i^a^s)+c+3395469782+o|0,i=i<<30|i>>>2,o=e[t-1&15]^e[t-6&15]^e[t-12&15]^e[t+2&15],o=o<<1|o>>>31,e[t+2&15]=o,s=(c<<5|c>>>27)+(u^i^a)+s+3395469782+o|0,u=u<<30|u>>>2,o=e[15&t]^e[t-5&15]^e[t-11&15]^e[t+3&15],o=o<<1|o>>>31,e[t+3&15]=o,a=(s<<5|s>>>27)+(c^u^i)+a+3395469782+o|0,c=c<<30|c>>>2,o=e[t+1&15]^e[t-4&15]^e[t-10&15]^e[t+4&15],o=o<<1|o>>>31,e[t+4&15]=o,i=(a<<5|a>>>27)+(s^c^u)+i+3395469782+o|0,s=s<<30|s>>>2;t[0]=t[0]+i|0,t[1]=t[1]+a|0,t[2]=t[2]+s|0,t[3]=t[3]+c|0,t[4]=t[4]+u|0}}(),n=new w(He),r=new w(He);t.length>He&&(e.update(t,0,t.length),t=e.digest());for(let e=0;e<He;e++){const o=e<t.length?t[e]:0;n[e]=54^o,r[e]=92^o}return e.update(n,0,He),{update(t,n,r){e.update(t,n,r)},digest(){const t=e.digest();e.update(r,0,He),e.update(t,0,Ve);const o=e.digest();return e.update(n,0,He),o}}}function en(t){return Ye[t>>>24]<<24|Ye[t>>>16&255]<<16|Ye[t>>>8&255]<<8|Ye[255&t]}function nn(t){return t<<24|(65280&t)<<8|t>>>8&65280|t>>>24}function rn(t){return 255&(t<<1^27*(t>>7))}const on=typeof R!=yt&&typeof R.getRandomValues==gt,an="Invalid password",sn="Invalid authentication code",cn="zipjs-abort-check-password",un="Crypto API not supported";function ln(t){if(on)return R.getRandomValues(t);throw new d(un)}const fn={name:"PBKDF2"},dn=n.assign({hash:{name:"HMAC"}},fn),wn=n.assign({iterations:1e3,hash:{name:"SHA-1"}},fn),pn=["deriveBits"],hn=[8,12,16],mn=[16,24,32],yn=10,gn=typeof R!=yt,En=gn&&R.subtle;let Sn=gn&&typeof En!=yt&&typeof En.importKey==gt&&typeof En.deriveBits==gt;class bn extends z{constructor({password:t,rawPassword:e,encryptionStrength:n,checkPasswordOnly:r,checkAuthenticationCode:o=!0}){const i={};super({start(){xn(i,t,e,n)},async transform(t,e){const{password:n,strength:o,l:a,ready:s}=i;if(n?(await async function(t,e,n,r){const o=await An(t,e,n,Cn(r,0,hn[e])),i=Cn(r,hn[e]);if(o[0]!=i[0]||o[1]!=i[1])throw Dn(t),new d(an)}(i,o,n,Cn(t,0,hn[o]+2)),t=Cn(t,hn[o]+2),r?(Dn(i),e.error(new d(cn))):a()):await s,i.h)return;const c=new w(t.length-yn-(t.length-yn)%16);e.enqueue(Fn(i,t,c,0,yn,!0))},async flush(t){const{m:e,S:n,ready:r}=i;if(e){if(await r,i.h)return;const a=Cn(n,n.length-yn),s=new w(Cn(n,0,n.length-yn));e.process(s,!0);const c=e.digest();let u=n.length<yn?1:0;for(let t=0;t<yn;t++)u|=c[t]^a[t];if(u&&o)return void t.error(new d(sn));t.enqueue(s)}}}),zn(this,i)}}class Rn extends z{constructor({password:t,rawPassword:e,encryptionStrength:n}){const r={};super({start(){xn(r,t,e,n)},async transform(t,e){const{password:n,strength:o,l:i,ready:a}=r;let s=Rt;if(n?(s=await async function(t,e,n){const r=ln(new w(hn[e]));return Ae(r,await An(t,e,n,r))}(r,o,n),i()):await a,r.h)return;const c=new w(s.length+t.length-t.length%16);c.set(s,0),e.enqueue(Fn(r,t,c,s.length,0,!1))},async flush(t){const{m:e,S:n,ready:o}=r;if(e){if(await o,r.h)return;const i=new w(n);e.process(i,!1);const a=Cn(e.digest(),0,yn);t.enqueue(Ae(i,a))}}}),zn(this,r)}}function xn(t,e,r,o){n.assign(t,{ready:new g(e=>t.l=e),password:In(e,r),strength:o-1,S:Rt,h:!1})}function zn(t,e){const r=t.readable.getReader(),o=new F({async pull(t){try{const{value:e,done:n}=await r.read();n?t.close():t.enqueue(e)}catch(t){throw Dn(e),r.cancel(t).catch(()=>{}),t}},cancel:t=>(Dn(e),r.cancel(t))});n.defineProperty(t,"readable",{get:()=>o})}function Fn(t,e,n,r,o,i){const{m:a,S:s}=t;s.length&&(e=Ae(s,e));const c=e.length-o,u=c-c%16;if(n=function(t,e){if(e&&e>t.length){const n=t;(t=new w(e)).set(n,0)}return t}(n,r+u),u){const t=Cn(n,r,r+u);t.set(Cn(e,0,u)),a.process(t,i)}return t.S=Cn(e,u),n}function Dn(t){const{m:e}=t;t.h=!0,e&&e.dispose&&e.dispose()}async function An(t,e,r,o){t.password=null;const i=mn[e],s=await async function(t,e,r){if(Sn)try{const o=await En.importKey("raw",t,dn,!1,pn);return new w(await En.deriveBits(n.assign({salt:e},wn),o,8*r))}catch{Sn=!1}return function(t,e,n,r){const o=tn(t),i=new w(r),s=new w(e.length+4),c=new m(s.buffer);s.set(e);for(let t=1,n=0;n<r;t++,n+=Ve){c.setUint32(e.length,t),o.update(s,0,s.length);let u=o.digest();const l=u.slice();for(let t=1;t<1e3;t++){o.update(u,0,Ve),u=o.digest();for(let t=0;t<Ve;t++)l[t]^=u[t]}i.set(l.subarray(0,a.min(Ve,r-n)),n)}return i}(t,e,0,r)}(r,o,2*i+2);return t.m=function(t,e){!function(){if(!Qe){let t=1,e=1;do{t=255&(t^t<<1^(128&t?27:0)),e=255&(e^e<<1),e=255&(e^e<<2),e=255&(e^e<<4),128&e&&(e^=9),Ye[t]=255&(e^(e<<1|e>>7)^(e<<2|e>>6)^(e<<3|e>>5)^(e<<4|e>>4)^99)}while(1!=t);Ye[0]=99;for(let t=0;t<256;t++){const e=Ye[t],n=rn(e),r=n<<24|e<<16|e<<8|n^e;Ke[t]=r,Xe[t]=r>>>8|r<<24,$e[t]=r>>>16|r<<16,Je[t]=r>>>24|r<<8}Qe=!0}}();const n=new Int32Array(60),r=function(t,e){const n=t.length>>2,r=n+6,o=4*(r+1);let i=1;for(let r=0;r<n;r++)e[r]=t[4*r]<<24|t[4*r+1]<<16|t[4*r+2]<<8|t[4*r+3];for(let t=n;t<o;t++){let r=e[t-1];t%n==0?(r=en(r<<8|r>>>24)^i<<24,i=rn(i)):n>6&&t%n==4&&(r=en(r)),e[t]=e[t-n]^r}return r}(t,n),o=new Int32Array(4),i=tn(e);let a=0,s=0,c=0,u=0;return{process(t,e){e&&i.update(t,0,t.length),function(t){const e=new m(t.buffer,t.byteOffset,t.byteLength),n=t.length;let r=0;for(;r+16<=n;r+=16)l(),e.setInt32(r,e.getInt32(r)^o[0]),e.setInt32(r+4,e.getInt32(r+4)^o[1]),e.setInt32(r+8,e.getInt32(r+8)^o[2]),e.setInt32(r+12,e.getInt32(r+12)^o[3]);if(r<n){l();for(let e=0;r<n;r++,e++)t[r]^=o[e>>2]>>>24-8*(3&e)}}(t),e||i.update(t,0,t.length)},digest:()=>i.digest()};function l(){a=a+1|0,a||(s=s+1|0,s||(c=c+1|0,c||(u=u+1|0)));let t=nn(a)^n[0],e=nn(s)^n[1],i=nn(c)^n[2],l=nn(u)^n[3],f=Ke[t>>>24]^Xe[e>>>16&255]^$e[i>>>8&255]^Je[255&l]^n[4],d=Ke[e>>>24]^Xe[i>>>16&255]^$e[l>>>8&255]^Je[255&t]^n[5],w=Ke[i>>>24]^Xe[l>>>16&255]^$e[t>>>8&255]^Je[255&e]^n[6],p=Ke[l>>>24]^Xe[t>>>16&255]^$e[e>>>8&255]^Je[255&i]^n[7];t=Ke[f>>>24]^Xe[d>>>16&255]^$e[w>>>8&255]^Je[255&p]^n[8],e=Ke[d>>>24]^Xe[w>>>16&255]^$e[p>>>8&255]^Je[255&f]^n[9],i=Ke[w>>>24]^Xe[p>>>16&255]^$e[f>>>8&255]^Je[255&d]^n[10],l=Ke[p>>>24]^Xe[f>>>16&255]^$e[d>>>8&255]^Je[255&w]^n[11],f=Ke[t>>>24]^Xe[e>>>16&255]^$e[i>>>8&255]^Je[255&l]^n[12],d=Ke[e>>>24]^Xe[i>>>16&255]^$e[l>>>8&255]^Je[255&t]^n[13],w=Ke[i>>>24]^Xe[l>>>16&255]^$e[t>>>8&255]^Je[255&e]^n[14],p=Ke[l>>>24]^Xe[t>>>16&255]^$e[e>>>8&255]^Je[255&i]^n[15],t=Ke[f>>>24]^Xe[d>>>16&255]^$e[w>>>8&255]^Je[255&p]^n[16],e=Ke[d>>>24]^Xe[w>>>16&255]^$e[p>>>8&255]^Je[255&f]^n[17],i=Ke[w>>>24]^Xe[p>>>16&255]^$e[f>>>8&255]^Je[255&d]^n[18],l=Ke[p>>>24]^Xe[f>>>16&255]^$e[d>>>8&255]^Je[255&w]^n[19],f=Ke[t>>>24]^Xe[e>>>16&255]^$e[i>>>8&255]^Je[255&l]^n[20],d=Ke[e>>>24]^Xe[i>>>16&255]^$e[l>>>8&255]^Je[255&t]^n[21],w=Ke[i>>>24]^Xe[l>>>16&255]^$e[t>>>8&255]^Je[255&e]^n[22],p=Ke[l>>>24]^Xe[t>>>16&255]^$e[e>>>8&255]^Je[255&i]^n[23],t=Ke[f>>>24]^Xe[d>>>16&255]^$e[w>>>8&255]^Je[255&p]^n[24],e=Ke[d>>>24]^Xe[w>>>16&255]^$e[p>>>8&255]^Je[255&f]^n[25],i=Ke[w>>>24]^Xe[p>>>16&255]^$e[f>>>8&255]^Je[255&d]^n[26],l=Ke[p>>>24]^Xe[f>>>16&255]^$e[d>>>8&255]^Je[255&w]^n[27],f=Ke[t>>>24]^Xe[e>>>16&255]^$e[i>>>8&255]^Je[255&l]^n[28],d=Ke[e>>>24]^Xe[i>>>16&255]^$e[l>>>8&255]^Je[255&t]^n[29],w=Ke[i>>>24]^Xe[l>>>16&255]^$e[t>>>8&255]^Je[255&e]^n[30],p=Ke[l>>>24]^Xe[t>>>16&255]^$e[e>>>8&255]^Je[255&i]^n[31],t=Ke[f>>>24]^Xe[d>>>16&255]^$e[w>>>8&255]^Je[255&p]^n[32],e=Ke[d>>>24]^Xe[w>>>16&255]^$e[p>>>8&255]^Je[255&f]^n[33],i=Ke[w>>>24]^Xe[p>>>16&255]^$e[f>>>8&255]^Je[255&d]^n[34],l=Ke[p>>>24]^Xe[f>>>16&255]^$e[d>>>8&255]^Je[255&w]^n[35],f=Ke[t>>>24]^Xe[e>>>16&255]^$e[i>>>8&255]^Je[255&l]^n[36],d=Ke[e>>>24]^Xe[i>>>16&255]^$e[l>>>8&255]^Je[255&t]^n[37],w=Ke[i>>>24]^Xe[l>>>16&255]^$e[t>>>8&255]^Je[255&e]^n[38],p=Ke[l>>>24]^Xe[t>>>16&255]^$e[e>>>8&255]^Je[255&i]^n[39];let h=40;r>10&&(t=Ke[f>>>24]^Xe[d>>>16&255]^$e[w>>>8&255]^Je[255&p]^n[40],e=Ke[d>>>24]^Xe[w>>>16&255]^$e[p>>>8&255]^Je[255&f]^n[41],i=Ke[w>>>24]^Xe[p>>>16&255]^$e[f>>>8&255]^Je[255&d]^n[42],l=Ke[p>>>24]^Xe[f>>>16&255]^$e[d>>>8&255]^Je[255&w]^n[43],f=Ke[t>>>24]^Xe[e>>>16&255]^$e[i>>>8&255]^Je[255&l]^n[44],d=Ke[e>>>24]^Xe[i>>>16&255]^$e[l>>>8&255]^Je[255&t]^n[45],w=Ke[i>>>24]^Xe[l>>>16&255]^$e[t>>>8&255]^Je[255&e]^n[46],p=Ke[l>>>24]^Xe[t>>>16&255]^$e[e>>>8&255]^Je[255&i]^n[47],h=48),r>12&&(t=Ke[f>>>24]^Xe[d>>>16&255]^$e[w>>>8&255]^Je[255&p]^n[48],e=Ke[d>>>24]^Xe[w>>>16&255]^$e[p>>>8&255]^Je[255&f]^n[49],i=Ke[w>>>24]^Xe[p>>>16&255]^$e[f>>>8&255]^Je[255&d]^n[50],l=Ke[p>>>24]^Xe[f>>>16&255]^$e[d>>>8&255]^Je[255&w]^n[51],f=Ke[t>>>24]^Xe[e>>>16&255]^$e[i>>>8&255]^Je[255&l]^n[52],d=Ke[e>>>24]^Xe[i>>>16&255]^$e[l>>>8&255]^Je[255&t]^n[53],w=Ke[i>>>24]^Xe[l>>>16&255]^$e[t>>>8&255]^Je[255&e]^n[54],p=Ke[l>>>24]^Xe[t>>>16&255]^$e[e>>>8&255]^Je[255&i]^n[55],h=56),o[0]=(Ye[f>>>24]<<24|Ye[d>>>16&255]<<16|Ye[w>>>8&255]<<8|Ye[255&p])^n[h],o[1]=(Ye[d>>>24]<<24|Ye[w>>>16&255]<<16|Ye[p>>>8&255]<<8|Ye[255&f])^n[h+1],o[2]=(Ye[w>>>24]<<24|Ye[p>>>16&255]<<16|Ye[f>>>8&255]<<8|Ye[255&d])^n[h+2],o[3]=(Ye[p>>>24]<<24|Ye[f>>>16&255]<<16|Ye[d>>>8&255]<<8|Ye[255&w])^n[h+3]}}(Cn(s,0,i),Cn(s,i,2*i)),t.h&&Dn(t),Cn(s,2*i)}function In(t,e){return e===dt?Ze(t):e}function Cn(t,e,n){return t.subarray(e,n)}class Tn extends z{constructor({password:t,rawPassword:e,passwordVerification:n,checkPasswordOnly:r}){super({start(){vn(this,t,e,n)},transform(t,e){const n=this;if(n.password||n.rawPassword){const e=_n(n,t.subarray(0,12));if(n.password=n.rawPassword=null,0!=(e[11]^n.passwordVerification))throw new d(an);t=t.subarray(12)}r?e.error(new d(cn)):e.enqueue(_n(n,t))}})}}class kn extends z{constructor({password:t,rawPassword:e,passwordVerification:n}){super({start(){vn(this,t,e,n)},transform(t,e){const n=this;let r,o;if(n.password||n.rawPassword){n.password=n.rawPassword=null;const e=ln(new w(12));e[11]=n.passwordVerification,r=new w(t.length+e.length),r.set(Nn(n,e),0),o=12}else r=new w(t.length),o=0;r.set(Nn(n,t),o),e.enqueue(r)}})}}function vn(t,e,r,o){n.assign(t,{password:e,rawPassword:r,passwordVerification:o}),function(t,e,r){const o=[305419896,591751049,878082192];if(n.assign(t,{R:o,F:new We(o[0]),D:new We(o[2])}),r)for(let e=0;e<r.length;e++)Un(t,r[e]);else for(let n=0;n<e.length;n++)Un(t,e.charCodeAt(n))}(t,e,r)}function _n(t,e){const n=new w(e.length);for(let r=0;r<e.length;r++)n[r]=On(t)^e[r],Un(t,n[r]);return n}function Nn(t,e){const n=new w(e.length);for(let r=0;r<e.length;r++)n[r]=On(t)^e[r],Un(t,e[r]);return n}function Un(t,e){let[,n]=t.R;t.F.append([e]);const r=~t.F.get();n=Ln(a.imul(Ln(n+Mn(r)),134775813)+1),t.D.append([n>>>24]);const o=~t.D.get();t.R=[r,n,o]}function On(t){const e=2|t.R[2];return Mn(a.imul(e,1^e)>>>8)}function Mn(t){return 255&t}function Ln(t){return 4294967295&t}function Bn(t){if(t instanceof F)return t;const e=t.getReader();return new F({async pull(t){try{const{value:n,done:r}=await e.read();r?t.close():t.enqueue(n)}catch(t){throw e.cancel(t).catch(()=>{}),t}},cancel:t=>e.cancel(t)})}function Wn(t,e){t=Bn(t);const n=e?{type:e}:{};if(typeof y.prototype.stream!=gt||new y([]).stream()instanceof F)return new l(t).blob().then(t=>e?new y([t],n):t);const r=[];return t.pipeTo(new D({write(t){r.push(t)}})).then(()=>new y(r,n))}function Pn(t){if(t instanceof D)return t;const e=t.getWriter();return new D({write:t=>e.write(t),close:()=>e.close(),abort:t=>e.abort(t)})}const Zn="Invalid codec definition",Hn="Reserved compression method",Vn="Invalid codec module",Gn="Compression method not supported",jn=[0,8,9,99],qn=new c,Yn=new c;function Kn(t){return qn.get(t)}function Xn(){return e.from(qn.values(),t=>n.assign({},t,Yn.get(t.format)))}function $n(t){return Yn.get(t)}function Jn(t,e){const{CompressionStream:n,DecompressionStream:r}=e;if(typeof n!=gt&&typeof r!=gt)throw new d(Vn);Yn.set(t,{CompressionStream:n,DecompressionStream:r})}const Qn="Invalid uncompressed size",tr="Invalid compressed data",er="Codec out of memory",nr="Invalid CRC32",rr="deflate-raw",or="deflate64-raw",ir="gzip",ar=[31,139,8];class sr extends z{constructor(t,{chunkSize:e,CompressionStreamFallback:n,CompressionStream:r}){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,y,g,E=super.readable;const S=f&&$n(f),b=hr(a,r,n),R=c&&o&&!l&&!S&&(!i||s)&&Boolean(b);if(i&&!s||!c||R||(h=new Pe,E=yr(E,h)),o)if(S)E=gr(E,pr(S.CompressionStream,f,{level:u,chunkSize:e,compressionMethod:d,uncompressedSize:w}));else if(R)g=new cr,E=gr(E,new b(ir,{level:u,chunkSize:e})),E=yr(E,g);else try{E=mr(E,a,{level:u,chunkSize:e},r,n)}catch(t){if(!a&&n)throw xr(t);let e;try{e=new r(ir)}catch{throw xr(t)}E=gr(E,e),E=yr(E,new cr)}i&&(s?E=yr(E,new kn(t)):(y=new Rn(t),E=yr(E,y))),wr(p,E,()=>{i&&!s||!c||(p.crc32=R?g.crc32:new m(h.value.buffer).getUint32(0))})}}class cr extends z{constructor(){let t,e=10,n=new w(0);super({transform(t,r){if(e){const n=a.min(e,t.length);if(e-=n,!(t=t.subarray(n)).length)return}const o=n.length+t.length;if(o<=8)return void(n=Ae(n,t));const i=o-8,s=a.min(i,n.length);r.enqueue(Ae(n.subarray(0,s),t.subarray(0,i-s))),n=Ae(n.subarray(s),t.subarray(i-s))},flush(){const e=Ce(n);t.crc32=e.getUint32(0,!0),t.uncompressedSize=e.getUint32(4,!0)}}),t=this}}class ur extends z{constructor(t,{chunkSize:e,DecompressionStreamFallback:n,DecompressionStream:r}){super({});const{zipCrypto:o,encrypted:i,checkCrc32:a,crc32:s,compressed:c,useCompressionStream:l,deflate64:f,format:p,compressionMethod:h,rawBitFlag:y,outputSize:E}=t;let S,b,R,x=super.readable;if(i&&(o?x=yr(x,new Tn(t)):(b=new bn(t),x=yr(x,b))),c){const t=new u,o=p&&$n(p);let i;if(o)x=gr(x,pr(o.DecompressionStream,p,{chunkSize:e,compressionMethod:h,rawBitFlag:y,uncompressedSize:E}),t);else{const o=hr(l,r,n);if(a&&!f&&s!==dt&&E!==dt&&o)try{i=new o(ir,{chunkSize:e})}catch{i=dt}if(!i)try{x=mr(x,l,{chunkSize:e,deflate64:f},r,n,t)}catch(t){if(f||E===dt||!l&&n)throw xr(t);try{i=new r(ir)}catch{throw xr(t)}}}i?(R=!0,x=function(t,e,n,r,o){const i=e.writable.getWriter(),a=e.readable.getReader(),s=r===dt?new We:dt;let c,u,l=0,f=!1,p=!1;const h=new F({start(t){u=t},pull(){E()},cancel:t=>(p=!0,E(),a.cancel(t))});return async function(){const e=t.getReader();try{const t=new w(10);for(t.set(ar),await i.write(t);;){await y(),await i.ready;const{value:t,done:n}=await br(e,o);if(n)break;await i.write(t)}s&&await i.write(new w(0));const a=new w(8),c=Ce(a);c.setUint32(0,s?s.get():r,!0),c.setUint32(4,n,!0),f=!0,await i.write(a),await i.close()}catch(t){await Er(i,t),await Sr(e,t)}}(),async function(){try{for(;;){const{value:t,done:e}=await m();if(e)break;if(l+=t.length,l>n)throw new d(Qn);s&&s.append(t),u.enqueue(t)}p||(p=!0,u.close())}catch(t){!function(t){p||(p=!0,u.error(t),E())}(t),await Sr(a,t)}}(),h;function m(){return a.read().catch(t=>{if(f){if(!s)throw Fr(t,nr);if(l!=n)throw Fr(t,Qn);return{done:!0}}throw Rr(t,o)})}function y(){if(!p&&u.desiredSize<=0)return new g(t=>c=t)}function E(){if(c){const t=c;c=dt,t()}}}(x,i,E,s,t)):x=function(t,e){const n=t.getReader();return new F({async pull(t){try{const{value:e,done:r}=await n.read();r?t.close():t.enqueue(e)}catch(t){throw await Sr(n,t),Rr(t,e)}},cancel:t=>n.cancel(t)})}(x,t)}a&&!R&&(S=new Pe,x=yr(x,S)),wr(this,x,()=>{if(S){const t=new m(S.value.buffer).getUint32(0,!1);if(s!=t)throw new d(nr)}})}}const lr=new c;function fr(t,e){if(!t)return!1;let n=lr.get(t);n||(n=new c,lr.set(t,n));let r=n.get(e);if(r===dt){try{new t(e),r=!0}catch{r=!1}n.set(e,r)}return r}function dr(t){return fr(t,rr)}function wr(t,e,r){e=yr(e,new z({flush:r})),n.defineProperty(t,"readable",{get:()=>e})}function pr(t,e,n){if(!t)throw new d(Gn);return new t(e,n)}function hr(t,e,n){return t&&e?e:n&&n.requiresModule?n:void 0}function mr(t,e,n,r,o,i){const a=e&&r?r:o||r,s=n.deflate64?or:rr;let c;try{c=new a(s,n)}catch(t){if(!e||!o||a==o)throw t;c=new o(s,n)}return gr(t,c,i)}function yr(t,e){return Bn(t).pipeThrough(e)}function gr(t,e,n){const r=e.writable.getWriter(),o=t.getReader();return async function(){try{for(;;){await r.ready;const t=await br(o,n);if(t.done){await r.close();break}await r.write(t.value)}}catch(t){await Er(r,t),await Sr(o,t)}}(),e.readable}async function Er(t,e){try{await t.abort(e)}catch{}}async function Sr(t,e){try{await t.cancel(e)}catch{}}function br(t,e){const n=t.read();return e?n.catch(t=>{throw e.add(t),t}):n}function Rr(t,e){return e.has(t)?t:Fr(t,zr(t)?er:tr)}function xr(t){return zr(t)?Fr(t,er):t}function zr(t){return Te(t)&&"Z_MEM_ERROR"==t.code}function Fr(t,e){const n=new d(e);return n.cause=t,n}const Dr="data",Ar="deflate",Ir="inflate";class Cr extends z{constructor(t,e){super({});const r=this,{codecType:o}=t;let i;o.startsWith(Ar)?i=sr:o.startsWith(Ir)&&(i=ur),r.outputSize=0;let a=0;const s=new i(t,e),c=super.readable,u=new z({transform(t,e){t&&t.length&&(a+=t.length,e.enqueue(t))},flush(){n.assign(r,{inputSize:a})}}),l=new z({transform(e,n){if(e&&e.length&&(n.enqueue(e),r.outputSize+=e.length,t.outputSize!==dt&&r.outputSize>t.outputSize))throw new d(Qn)},flush(){const{crc32:t}=s;n.assign(r,{crc32:t,inputSize:a})}});n.defineProperty(r,"readable",{get:()=>c.pipeThrough(u).pipeThrough(s).pipeThrough(l)})}}class Tr extends z{constructor(t){const e=[];let r=0,i=0;function a(){const n=new w(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}(!o.isFinite(t)||t<1)&&(t=262144),super({transform(n,o){for(e.push(n),r+=n.length;r>t;)i+=t,o.enqueue(a())},flush(t){r&&(i+=r,t.enqueue(function(t,e){const n=new w(e);let r=0;for(const e of t)n.set(e,r),r+=e.length;return n}(e,r)))}}),n.defineProperty(this,"outputSize",{get:()=>i})}}const kr="Worker startup timeout";let vr,_r,Nr,Ur=()=>{};async function Or(t){const{CompressionStream:e,CompressionStreamFallback:n}=t;return!(!n||n.requiresModule)||!(!dr(e)&&(r=e,!fr(r,ir)))||!!n&&await Mr();var r}async function Mr(){if(Ur)try{return await void 0,!0}catch{}return!1}function Lr(t){t.createWorker?_r=!0:vr=!1}class Br{constructor(t,{readable:e,writable:r},o,i){const{options:a,config:s,A:c,useWebWorkers:u,workerURI:l}=o;let{createWorker:f}=o;const{signal:d}=c;return _r&&(f=dt),n.assign(t,{I:!0,C:(t.C||0)+1,readable:e.pipeThrough(new Tr(Re(s))).pipeThrough(new Wr(c),{signal:d}),writable:r,options:n.assign({},a),T:o,workerURI:l,createWorker:f,terminate:()=>new g(e=>{const{v:n,I:r}=t;r?(t._=t._||[],t._.push(e)):(n&&(n.terminate(),t.v=null),e()),t.N=null}),U(){if(t.I){const{_:e,v:n}=t;e&&(t._=null,n&&(t.O=!0,n.terminate())),t.I=!1;const r=i(t);e&&e.forEach(t=>t(r))}}}),vr===dt&&(vr=typeof T!=yt),(u&&Nr&&(vr&&l||f)?Nr:Zr)(t,s)}}class Wr extends z{constructor({onstart:t,onprogress:e,size:n,onend:r}){let o=0;super({async start(){t&&await Pr(t,n)},async transform(t,r){o+=t.length,e&&await Pr(e,o,n),r.enqueue(t)},async flush(){r&&await Pr(r,o)}})}}async function Pr(t,...e){try{await t(...e)}catch{}}function Zr(t,e){return{run:()=>Hr(t,e)}}async function Hr({options:t,readable:e,writable:n,U:r,T:o},i){let a,s,c;try{if(t.compressed&&!t.format){const e=t.codecType.startsWith(Ar),n=e?i.CompressionStreamFallback:i.DecompressionStreamFallback,r=e?i.CompressionStream:i.DecompressionStream;t.useCompressionStream?n&&n.requiresModule&&!dr(r)&&await u():await u()||n&&!n.requiresModule||(t.useCompressionStream=!0)}t.encrypted&&!t.zipCrypto&&await u(),a=new Cr(t,i),s=new Tr(Re(i));const{signal:r}=o.A;await e.pipeThrough(a).pipeThrough(s).pipeTo(n,{preventClose:!0,preventAbort:!0,signal:r});const{crc32:c,inputSize:l,outputSize:f}=a;return{crc32:c,inputSize:l,outputSize:f}}catch(t){if(a){const e=s?s.outputSize:0;if(o.outputSize=e,Te(t))try{t.outputSize=e}catch{}}throw t}finally{r()}function u(){return c||(c=Mr()),c}}const Vr={type:"module"},Gr="error",jr="abort";let qr,Yr,Kr;var Xr;function $r(t){const{reader:e}=t;e&&e.releaseLock(),t.reader=null,t.writer=null}function Jr(t){const{v:e}=t;if(e)try{e.terminate()}catch{}t.N=null}function Qr(t,e,r,o,i=!0){const{createWorker:a}=r;let s,c,u;if(a)s=a();else if(Yr===dt||qr!==t){const n=typeof t==gt;c=n?t(i):t;const a=c.startsWith("data:"),l=c.startsWith("blob:");if(a||l){o===dt&&(o=!1),o&&(u=Vr);try{s=new T(c,u)}catch(i){if(l)try{f.revokeObjectURL(c)}catch{}if(n&&l)return Qr(t,e,r,o,!1);if(o)throw i;return Qr(t,e,r,!0,!1)}}else{o===dt&&(o=!0),o&&(u=Vr);try{c=new f(c,e)}catch{}try{s=new T(c,u)}catch(n){if(o)return Qr(t,e,r,!1,i);throw n}}qr=t,Yr=c,Kr=u}else s=new T(Yr,Kr);return s.addEventListener("message",t=>{r.M=!0,to(r),async function({data:t},e){const{type:r,value:o,messageId:i,result:a,error:s,errorValue:c}=t,{reader:u,writer:l,L:f,B:p,U:h,C:m}=e,y=()=>e.C!=m;try{if(s)g(function(t,e){const{message:r,stack:o,code:i,name:a,outputSize:s,cause:c,codecImportFailed:u}=t;let l;if(l=e?e.value:n.assign(new d(r),{stack:o,code:i,name:a}),Te(l))try{s!==dt&&(l.outputSize=s),u&&(l.codecImportFailed=!0),c&&(Te(l.cause)||(l.cause=n.assign(new d(c.message),{name:c.name})),c.code!==dt&&l.cause.code!==c.code&&(l.cause.code=c.code)),e&&(l.name!==a&&(l.name=a),l.code!==i&&(l.code=i))}catch{}return l}(s,c));else{if("pull"==r){const{value:t,done:n}=await u.read();y()||no({type:Dr,value:t,done:n,messageId:i},e)}if(r==Dr){const t=new w(o);await l.ready,await l.write(t),y()||no({type:"ack",messageId:i},e)}"close"==r&&function(t){y()||(f(t),E(),h())}(a)}}catch(s){y()||(Jr(e),g(s))}function g(t){y()||(p(t),E(),Te(t)&&t.codecImportFailed||h())}function E(){l&&l.releaseLock()}}(t,r)}),s.addEventListener(Gr,t=>eo(t,r)),s.addEventListener("messageerror",t=>eo(t,r)),s}function to(t){const{W:e}=t;e&&(_(e),t.W=null)}function eo(t,e){t.preventDefault&&t.preventDefault(),to(e);const{M:r,B:o,writer:i,U:a}=e;Jr(e),r||(e.v=null);let s=t.error||new d(t.message||Gr);r||(s=n.assign(new d(s.message||Gr),{P:!0}),e.Z=s),o&&(o(s),i&&i.releaseLock(),r&&a())}function no(t,{v:e,writer:n}){try{const{value:n}=t;if(n){t.value=Ie(n);try{e.postMessage(t,[t.value.buffer])}catch{e.postMessage(t)}}else e.postMessage(t)}catch(t){throw n&&n.releaseLock(),t}}Xr=function(t,e){const{baseURI:r,chunkSize:i,workerStartupTimeout:a}=e;let{wasmURI:s}=e;if(!t.N){let c;typeof s==gt&&(s=s());try{c=Qr(t.workerURI,r,t)}catch{return Lr(t),Zr(t,e)}n.assign(t,{v:c,M:!1,O:!1,Z:null,N:{run:async()=>{try{return await async function(t,e){if(!t.v){const{Z:e}=t;t.Z=null;const n=e||new d(kr);throw n.P=!0,n}let r,i;const a=new g((e,n)=>{r=e,i=e=>{const{outputSize:r,T:o}=t;if(o.outputSize=r,Te(e))try{e.outputSize=r}catch{}n(e)}});n.assign(t,{reader:null,writer:null,outputSize:0,H:!1,V:null,L:r,B:i,result:a});const{readable:s,options:c}=t,{writable:u,closed:l,G:f}=function(t,e){const r=new AbortController;let o;const{writable:i,readable:a}=new z({transform(t,n){e.outputSize+=t.length,n.enqueue(t)}}),s=a.pipeTo(t,{preventClose:!0,preventAbort:!0,signal:r.signal});s.catch(t=>{o||n.assign(e,{H:!0,V:t})});const{signal:c}=e.T.A;if(c){const t=()=>r.abort(c.reason),e=()=>c.removeEventListener(jr,t);c.addEventListener(jr,t),s.then(e,e)}return{writable:i,closed:s,G:()=>{o=!0,r.abort()}}}(t.writable,t);try{no({type:"start",options:c,config:e},t)}catch(e){f();try{await l}catch{}throw t.U(),e}n.assign(t,{reader:s.getReader(),writer:u.getWriter()});const{workerStartupTimeout:w}=e;!t.M&&o.isFinite(w)&&w>=0&&(t.W=v(()=>function(t){if(t.W=null,t.M)return;const{B:e,writer:n}=t;if(Jr(t),t.v=null,e){const t=new d(kr);t.P=!0,e(t),n&&n.releaseLock()}}(t),w));try{const t=await a;return await p(),await l,t}catch(e){await p(),f();try{await l}catch{}const{outputSize:n,T:r,H:o,V:i}=t;r.outputSize=n;const a=Te(e)&&(e.codecImportFailed||e.P),s=o&&!a?i:e;if(Te(s))try{s.outputSize=n}catch{}throw s}async function p(){if(!u.locked)try{await u.getWriter().close()}catch{}}}(t,{chunkSize:i,wasmURI:s,baseURI:r,workerStartupTimeout:a})}catch(n){if(n&&n.P)return Lr(t),$r(t),Hr(t,e);if(n&&n.codecImportFailed){if(t.reader)return $r(t),Hr(t,e);t.U()}throw n}}}})}return t.N},Nr=Xr;let ro=[];const oo=[];let io,ao,so=0;async function co(t,e){const{options:n,config:r}=e,{useWebWorkers:i,useCompressionStream:a,compressed:s,checkCrc32:c,computeCrc32:u,encrypted:l,format:d,codecURI:w}=n,{workerURI:p,createWorker:h,maxWorkers:m}=r;d&&(w&&(n.codecURI=function(t,e){try{return new f(t,e).toString()}catch{return t}}(w,r.baseURI)),await async function(t,e){!Yn.has(t)&&e&&Jn(t,await(import(/* webpackIgnore: true */ /* @vite-ignore */e)))}(d,n.codecURI));const y=!(s||c||u||l),E=d===dt||Boolean(n.codecURI);return e.useWebWorkers=!y&&E&&(i||i===dt&&r.useWebWorkers),e.workerURI=e.useWebWorkers&&p?p:dt,e.createWorker=e.useWebWorkers&&h?h:dt,n.useCompressionStream=a||a===dt&&r.useCompressionStream,(await async function(){const n=ro.find(t=>!t.I);if(n)return mo(n),new Br(n,t,e,S);if(ro.length<m){const n={j:so};return so++,ro.push(n),new Br(n,t,e,S)}return new g(n=>{oo.push({resolve:n,stream:t,T:e}),ao=r.workerStarvationTimeout,uo()})}()).run();function S(t){if(lo(),t.O)return t.O=!1,wo();if(oo.length){const[{resolve:e,stream:n,T:r}]=oo.splice(0,1);e(new Br(t,n,r,S)),uo()}else t.v?(mo(t),function(t,e){const{config:n}=e,{terminateWorkerTimeout:r}=n;o.isFinite(r)&&r>=0&&(t.Y=v(async()=>{ro=ro.filter(e=>e!=t);try{await t.terminate()}catch{}},r))}(t,e)):ro=ro.filter(e=>e!=t)}}function uo(){!io&&oo.length&&o.isFinite(ao)&&ao>=0&&(io=v(fo,ao))}function lo(){io&&(_(io),io=null)}function fo(){if(io=null,oo.length){const[{resolve:t,stream:e,T:n}]=oo.splice(0,1);t(new Br({},e,po(n),ho)),uo()}}function wo(){const t=oo.splice(0).map(({resolve:t,stream:e,T:n})=>new g(r=>{t(new Br({},e,po(n),()=>{ho(),r()}))}));return lo(),g.all(t)}function po(t){return n.assign({},t,{useWebWorkers:!1,workerURI:dt,createWorker:dt})}function ho(){lo(),uo()}function mo(t){const{Y:e}=t;e&&(_(e),t.Y=null)}const yo="\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 go(t,e){return So(t,e,!0)}function Eo(t){if(!t.some(t=>t>127))return!1;try{return new S("utf-8",{fatal:!0}).decode(t),!0}catch{return!1}}function So(t,e,n){return e&&"cp437"==e.trim().toLowerCase()?function(t){let e="";for(let n=0;n<t.length;n++)e+=yo[t[n]];return e}(t):new S(e,{ignoreBOM:n}).decode(t)}const bo="HTTP error ",Ro="HTTP Range not supported",xo="HTTP resource changed",zo="Writer iterator completed too soon",Fo="Writer not initialized",Do="Invalid writer (size must be writable)",Ao="Content-Range",Io="Range",Co="GET",To="bytes",ko=16777216,vo="writable",_o=k();class No{constructor(){this.size=0}init(){this.initialized=!0}}class Uo extends No{get readable(){return this.createReadable()}createReadable({offset:t=0,size:e,chunkSize:n=Re(be())}={}){const r=this;let o=0;return n=xe(n),new F({async pull(i){const s=e===dt?n:a.min(n,e-o),c=await Si(r,t+o,s);c.length&&(i.enqueue(c),o+=c.length),(e!==dt&&o>=e||!c.length&&s)&&i.close()}})}}class Oo extends No{constructor(){super();const t=this,e=new D({write(e){if(!t.initialized)throw new d(Fo);return t.writeUint8Array(Ie(e))}});n.defineProperty(t,vo,{get:()=>e})}writeUint8Array(){}}class Mo extends Uo{constructor(t){super();let e=t.length;for(;"="==t.charAt(e-1);)e--;const r=t.indexOf(",")+1;n.assign(this,{K:t,X:r,size:a.floor(.75*(e-r))})}readUint8Array(t,e){const{X:n,K:r}=this,o=new w(e),i=4*a.floor(t/3),s=atob(r.substring(i+n,4*a.ceil((t+e)/3)+n)),c=t-3*a.floor(i/4);let u=0;for(let t=c;t<c+e&&t<s.length;t++)o[t-c]=s.charCodeAt(t),u++;return u<o.length?o.subarray(0,u):o}}class Lo extends Oo{constructor(t){super(),n.assign(this,{contentType:t,data:"data:"+(t||"")+";base64,",$:""})}writeUint8Array(t){const e=this;let n,o=e.$;const i=e.$.length;for(e.$="",n=0;n<3*a.floor((i+t.length)/3)-i;n++)o+=r.fromCharCode(t[n]);for(;n<t.length;n++)e.$+=r.fromCharCode(t[n]);o.length>2?e.data+=x(o):e.$=o+e.$}getData(){return this.data+x(this.$)}}let Bo,Wo;class Po extends Uo{constructor(t){super(),n.assign(this,{J:t,size:t.size}),Wo||(Wo=(async()=>{try{const t=new y([new w(3)]).slice(1,2).stream().getReader();let e=0,n=await t.read();for(;!n.done;)e+=n.value.length,n=await t.read();Bo=1==e}catch{Bo=!1}})())}createReadable(t){const{J:e,size:n}=this,{offset:r=0,size:o=n-r}=t||{};if(typeof e.stream==gt){if(!r&&o>=n)return Bn(e.stream());if(Bo)return Bn(e.slice(r,r+o).stream())}return super.createReadable(t)}async readUint8Array(t,e){const n=this,r=t+e,o=!t&&r>=n.size?n.J:n.J.slice(t,r);let i=await o.arrayBuffer();return i.byteLength>e&&(i=i.slice(t,r)),new w(i)}}class Zo extends No{constructor(t){super();const e=this,r=new z;n.defineProperty(e,vo,{get:()=>r.writable}),e.contentType=t,e.et=Wn(r.readable,t),e.et.catch(()=>{})}getData(){return this.et}}class Ho extends Po{constructor(t){super(new y([t],{type:"text/plain"}))}}function Vo(t){let e=0;for(let n=0;n<t.length;n++){const r=t.charCodeAt(n);r<128?e+=1:r<2048?e+=2:r<55296||r>=57344?e+=3:r<56320&&56320==(64512&t.charCodeAt(n+1))?(e+=4,n++):e+=3}return e}class Go extends Zo{constructor(t){super(),n.assign(this,{encoding:t,nt:!t||"utf-8"==t.toLowerCase()})}async getData(){const{encoding:t,nt:e}=this,n=await super.getData();return n.text&&e?n.text():function(t,e){return So(t,e,!1)}(new w(await n.arrayBuffer()),t)}}class jo extends Uo{constructor(t,e){super(),Yo(this,t,e)}async init(){await Ko(this,ci,oi),super.init()}createReadable(t){const e=this,{useRangeHeader:n,forceRangeRequests:r,size:o,ot:i}=e;if((n||r)&&o!==dt){const{offset:n=0,size:r=o-n}=t||{},s=i&&n>=o-i.length;if(r>0&&n<o&&!s)return function(t,e,n){let r,o=e,i=0,s=n;return new F({start:()=>c(),async pull(t){r||await c();const{value:e,done:n}=await r.read();if(n)throw new d(Ro);const o=e.length>i?e.subarray(0,i):e;i-=o.length,s-=o.length,o.length&&t.enqueue(o),i||(await async function(){const t=r;r=dt,await t.cancel()}(),s||t.close())},cancel:t=>r&&r.cancel(t)});async function c(){const e=a.min(t.maximumRangeSize,s),n=await ci(Co,t,ni(t,o,e));if(206!=n.status)throw new d(Ro);const c=$o(n);if(c!==dt&&c!=o)throw new d(Ro);ei(t,n),ti(t,n),o+=e,i=e,r=n.body.getReader()}}(e,n,a.min(r,o-n))}return super.createReadable(t)}readUint8Array(t,e){return Xo(this,t,e,ci,oi)}}class qo extends Uo{constructor(t,e){super(),Yo(this,t,e)}async init(){await Ko(this,ui,ii),super.init()}readUint8Array(t,e){return Xo(this,t,e,ui,ii)}}function Yo(t,e,r){const{preventHeadRequest:o,useRangeHeader:i,forceRangeRequests:a,combineSizeEocd:s,checkResourceChanges:c=!0,maximumRangeSize:u=ko,fetch:l}=r;delete(r=n.assign({},r)).preventHeadRequest,delete r.useRangeHeader,delete r.forceRangeRequests,delete r.combineSizeEocd,delete r.checkResourceChanges,delete r.maximumRangeSize,delete r.useXHR,delete r.fetch,n.assign(t,{url:e,options:r,preventHeadRequest:o,useRangeHeader:i,forceRangeRequests:a,combineSizeEocd:s,checkResourceChanges:c,maximumRangeSize:u,fetch:l})}async function Ko(t,e,n){const{url:r,preventHeadRequest:o,useRangeHeader:i,forceRangeRequests:a,combineSizeEocd:s}=t;if(function(t){const{baseURI:e}=be(),{protocol:n}=new f(t,e);return"http:"==n||"https:"==n}(r)&&(i||a)&&(typeof o==yt||o)){const r=await e(Co,t,ni(t,s?-65557:void 0)),o=r.headers.get("Accept-Ranges");if(!(a||o&&o.toLowerCase()==To))throw new d(Ro);{let o;s&&206==r.status&&(o=new w(await r.arrayBuffer())),ti(t,r);const i=Jo(r);i===dt?await si(t,e,n):t.size=i,o&&o.length&&$o(r)===t.size-o.length&&(t.ot=o)}}else await si(t,e,n)}async function Xo(t,e,n,r,o){const{useRangeHeader:i,forceRangeRequests:a,ot:s,size:c,options:u}=t;if(i||a){if(e>=c||0===n)return Rt;{if(e+n>c&&(n=c-e),s&&e>=c-s.length){const t=e-(c-s.length);return s.slice(t,t+n)}const o=await r(Co,t,ni(t,e,n));if(206!=o.status)throw new d(Ro);const i=$o(o);if(i!==dt&&i!=e)throw new d(Ro);ei(t,o),ti(t,o);const a=new w(await o.arrayBuffer());if(a.length!=n)throw new d(Ro);return a}}{const{data:r}=t;return r||await o(t,u),t.data.subarray(e,e+n)}}function $o(t){const e=t.headers.get(Ao);if(e){const t=o(e.trim().split(/[\s-]+/)[1]);if(!o.isNaN(t))return t}}function Jo(t){const e=t.headers.get(Ao);if(e){const t=e.trim().split(/\s*\/\s*/)[1];if(t&&"*"!=t){const e=o(t);if(!o.isNaN(e))return e}}}function Qo({headers:t}){return{it:t.get("Etag")||dt,lastModified:t.get("Last-Modified")||dt}}function ti(t,e){const{checkResourceChanges:n,st:r}=t;n&&!r&&206==e.status&&(t.st=Qo(e))}function ei(t,e){const{checkResourceChanges:r,st:o,size:i}=t;if(r){const t=Jo(e);if(t!==dt&&i!==dt&&t!=i)throw new d(xo);if(o){const t=Qo(e);if(n.entries(o).some(([e,n])=>n!==dt&&t[e]!==dt&&n!=t[e]))throw new d(xo)}}}function ni(t,e=0,r=1){return n.assign({},ri(t),{[Io]:To+"="+(e<0?e:e+"-"+(e+r-1))})}function ri({options:t}){const{headers:e}=t;if(e)return k.iterator in e?n.fromEntries(e):e}async function oi(t){await ai(t,ci)}async function ii(t){await ai(t,ui)}async function ai(t,e){const n=await e(Co,t,ri(t));t.data=new w(await n.arrayBuffer()),t.size=t.data.length}async function si(t,e,n){if(t.preventHeadRequest)await n(t,t.options);else{const r=await e("HEAD",t,ri(t)),i=r.headers.get("Content-Length");i&&!r.headers.get("Content-Encoding")?t.size=o(i):await n(t,t.options)}}async function ci(t,{fetch:e=fetch,options:r,url:o},i){const a=await e(o,n.assign({},r,{method:t,headers:i}));if(a.status>=200&&a.status<=299)return a;throw 416==a.status?new d(Ro):new d(bo+(a.statusText||a.status))}function ui(t,{url:e},r){return new g((o,i)=>{const a=new XMLHttpRequest;if(a.addEventListener("load",()=>{if(a.status>=200&&a.status<=299){const t=[];a.getAllResponseHeaders().trim().split(/[\r\n]+/).forEach(e=>{const n=e.trim().split(/\s*:\s*/);n[0]=n[0].trim().replace(/^[a-z]|-[a-z]/g,t=>t.toUpperCase()),t.push(n)}),o({status:a.status,arrayBuffer:()=>a.response,headers:new c(t)})}else i(416==a.status?new d(Ro):new d(bo+(a.statusText||a.status)))},!1),a.addEventListener("error",t=>i(t.detail?t.detail.error:new d("Network error")),!1),a.open(t,e),r)for(const t of n.entries(r))a.setRequestHeader(t[0],t[1]);a.responseType="arraybuffer",a.send()})}class li extends Uo{constructor(t,e={}){super(),n.assign(this,{url:t,reader:e.useXHR&&!e.fetch?new qo(t,e):new jo(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 fi extends Uo{constructor(t){super(),t=new w(t.buffer,t.byteOffset,t.byteLength),n.assign(this,{ct:t,size:t.length})}readUint8Array(t,e){return this.ct.slice(t,t+e)}}class di extends Oo{constructor(t){super(),this.ut=t||262144}init(t=0){n.assign(this,{offset:0,ct:new w(t>0?t:this.ut)}),super.init()}writeUint8Array(t){const e=this,n=e.offset+t.length;if(n>e.ct.length){let t=e.ct.length?2*e.ct.length:e.ut;for(;t<n;)t*=2;const r=e.ct;e.ct=new w(t),e.ct.set(r)}e.ct.set(t,e.offset),e.offset+=t.length}getData(){return this.offset===this.ct.length?this.ct:this.ct.slice(0,this.offset)}}class wi extends Uo{constructor(t){super(),this.lt=t}async init(){const t=this;t.ft=0;const e=t.lt=await g.all(t.lt.map(Ei));t.wt=e.map(e=>{const n=t.size;return t.size+=e.size,n}),super.init()}ht(t){const{wt:e,size:n}=this,r=e[t];return r===dt?n:r}async readUint8Array(t,e){const n=this,{lt:r}=this;let o,i=0,s=t;for(;r[i]&&s>=r[i].size;)s-=r[i].size,i++;const c=r[i];if(c){const r=c.size;if(s+e<=r)o=await Si(c,s,e);else{const i=r-s;o=Ae(await Si(c,s,i),await n.readUint8Array(t+i,e-i))}}else o=Rt;return n.ft=a.max(i,n.ft),o}}class pi extends No{constructor(t,e=4294967295){super();const r=this;let o,i,a;n.assign(r,{diskNumber:0,diskOffset:0,size:0,maxSize:e,availableSize:e});const s=new D({async write(e){if(e===_o)return void(a&&await u());const{availableSize:n}=r;if(a)e.length>=n?(await c(e.subarray(0,n)),await u(),e.length>n&&await this.write(e.subarray(n))):await c(e);else{const{value:n,done:s}=await t.next();if(s&&!n)throw new d(zo);o=n,o.size=0,o.maxSize&&(r.maxSize=o.maxSize),r.availableSize=r.maxSize,await gi(o),i=n.writable,a=i.getWriter(),await this.write(e)}},async close(){a&&(await a.ready,await l())},async abort(t){a&&await a.abort(t)}});async function c(t){const e=t.length;e&&(await a.ready,await a.write(t),o.size+=e,r.availableSize-=e)}async function u(){await l(),r.diskOffset+=o.size,r.diskNumber++,a=null,r.availableSize=r.maxSize}async function l(){await a.close()}n.defineProperty(r,vo,{get:()=>s})}async closeDisk(){const t=this.writable.getWriter();try{await t.ready,await t.write(_o)}finally{t.releaseLock()}}}class hi{constructor(t){return e.isArray(t)&&(t=new wi(t)),(t instanceof F||typeof t.getReader==gt)&&(t={readable:Bn(t)}),t}}class mi{constructor(t){t.writable===dt&&typeof t.next==gt&&(t=new pi(t)),(t instanceof D||typeof t.getWriter==gt)&&(t={writable:Pn(t)});try{t.size=t.size===dt?0:t.size}catch{throw new d(Do)}return t}}function yi(t){return Boolean(t&&t.getData)}async function gi(t,e){if(!t.init||t.initialized)return g.resolve();await t.init(e)}async function Ei(t){return t=new hi(t),await gi(t),t.size!==dt&&t.readUint8Array||(t=new Po(await Wn(t.readable)),await gi(t)),t}function Si(t,e,n){return t.readUint8Array(e,n)}function bi(t,e){return t.createReadable?t.createReadable(e):t.readUint8Array?Uo.prototype.createReadable.call(t,e):t.readable}function Ri(t,e,n){if(!t.some(t=>t.reason==e)){const r={reason:e};n!==dt&&(r.filename=n),t.push(r)}}const xi="filename",zi="rawFilename",Fi="comment",Di="rawComment",Ai="uncompressedSize",Ii="compressedSize",Ci="offset",Ti="diskNumberStart",ki="lastModDate",vi="rawLastModDate",_i="lastAccessDate",Ni="rawLastAccessDate",Ui="creationDate",Oi="rawCreationDate",Mi="internalFileAttributes",Li="externalFileAttributes",Bi="msdosAttributesRaw",Wi="msdosAttributes",Pi="msDosCompatible",Zi="zip64",Hi="encrypted",Vi="version",Gi="versionMadeBy",ji="zipCrypto",qi="directory",Yi="executable",Ki="compressionMethod",Xi="signature",$i="extraField",Ji="unixMode",Qi="setuid",ta="setgid",ea="sticky",na=[xi,zi,Ai,Ii,ki,vi,Fi,Di,_i,Ni,Ui,Oi,Ci,Ti,Mi,Li,Bi,Wi,Pi,Zi,Hi,Vi,Gi,ji,qi,Yi,"symlink",Ki,Xi,"crc32",$i,"extraFieldUnix","extraFieldInfoZip","extraFieldUnixType1","extraFieldPkwareUnix","uid","gid",Ji,"unixExternalUpper",Qi,ta,ea,"bitFlag","rawBitFlag","filenameLength","extraFieldLength","filenameUTF8","commentUTF8","rawExtraField","extraFieldZip64","extraFieldUnicodePath","extraFieldUnicodeComment","extraFieldAES","extraFieldNTFS","extraFieldExtendedTimestamp","extraFieldUSDZ"];class ra{constructor(t){na.forEach(e=>this[e]=t[e])}}const oa=new u([1,$,10,J,28789,25461,Q,tt,et,22613,13]);function ia(t,e,n){return t?e?12:16+4*n:0}const aa="File format is not recognized",sa="End of central directory not found",ca="End of Zip64 central directory locator not found",ua="Central directory header not found",la="File contains encrypted entry",fa="Encryption method not supported",da="Split zip file",wa="Entry data out of bounds",pa="Ambiguous archive",ha="Encrypted central directory is not supported",ma="Unsafe filename",ya="Invalid strictness (must be 'strict', 'balanced' or 'tolerant')",ga="Invalid filenameValidation (must be 'strict', 'balanced' or 'tolerant')",Ea="Invalid maxAppendedDataSize (must be a number greater than or equal to 0)",Sa="64-bit value exceeds Number.MAX_SAFE_INTEGER",ba="unsorted central directory",Ra="unknown version needed to extract",xa="compressed patched data",za="malformed extra field",Fa="unknown zip64 extensible data",Da="wrapped entries count",Aa="appended data",Ia="prepended data",Ca="prepended central directory",Ta="trailing central directory data",ka="mismatched central directory offset",va="missing zip64 extra field",_a="duplicate filename",Na="mismatched zip64 end of central directory record",Ua="multiple end of central directory records",Oa="mismatched local file header (filename)",Ma="mismatched local file header (general purpose bit flag)",La="mismatched local file header (compression method)",Ba="mismatched local file header (crc32 or sizes)",Wa=/^[a-zA-Z]:/,Pa=/(^|[\\/])\.\.([\\/]|$)/,Za="utf-8",Ha="cp437",Va=[[Ai,O],[Ii,O],[Ci,O],[Ti,M]],Ga={[M]:{yt:vs,bytes:4},[O]:{yt:_s,bytes:8}},ja=i(o.MAX_SAFE_INTEGER);class qa{constructor(t,e={}){n.assign(this,{reader:new hi(t),options:e||{},gt:{Et:new u,St:[],bt:[]},Rt:new WeakSet})}async*getEntriesGenerator(t={}){const e=this;let{reader:r}=e;if(await gi(r),r.size!==dt&&r.readUint8Array||(r=new Po(await Wn(r.readable)),await gi(r)),r.size<Y)throw new d(aa);const i=e.warnings=[],s=hs(t,e.options),c=s==Ht,l=s!=Gt,f=gs(Ds(e,t,Lt),s),p=function(t,e){if(t===dt)return e;if(!ps(t))throw new d(ga);return t}(Ds(e,t,"filenameValidation"),s),h=Ds(e,t,"normalizeFilename"),{xt:m,zt:y}=await Es(r,l,f);if(!m)throw await async function(t){return await ws(t)==W}(r)?new d(da):new d(sa);l&&y>1&&Fs(Ua);const g=Ce(m);let E=vs(g,12),S=vs(g,16);const b=m.offset,R=ks(g,20),x=b+Y+R,F=r.size-x;F>f&&Fs(Aa),F>0&&Ri(i,Aa);let D=ks(g,4);const A=r.ft||0;let I,C,T,k,v,_=ks(g,6),N=ks(g,10),U=0,P=X;const V=S==O||E==O||N==M||_==M;if(S!=O&&_!=M&&(S+=ds(r,_)),V){const t=m.offset>=K?await Si(r,m.offset-K,K):Rt,e=Ce(t);if(t.length==K&&vs(e,0)==j){S=ds(r,vs(e,4))+_s(e,8);let t=await Si(r,S,X),s=Ce(t);if(t.length<X||vs(s,0)!=G){const e=m.offset-K;let n=e-X;if(await ts(r,n,G)||(n=await async function(t,e){const n=a.max(0,e-65591),r=await Si(t,n,e-n),i=Ce(r);for(let t=r.length-X;t>=0;t--)if(vs(i,t)==G&&t+12+o(i.getBigUint64(t+4,!0))==r.length)return n+t}(r,e)),n!==dt&&n>=0&&S!=n){const e=S;S=n,S>e&&(U=S-e),t=await Si(r,S,X),s=Ce(t)}}if(t.length<X||vs(s,0)!=G)throw new d(ca);if(T=!0,k=_s(s,4)>44,k){const t=a.min(_s(s,4)-44,r.size-S-X);t>0&&(P+=t,v=function(t){const e={rawExtensibleData:t};if(t.length>=28){const r=Ce(t),o=ks(r,26);n.assign(e,{compressionMethod:ks(r,0),compressedSize:_s(r,2),uncompressedSize:_s(r,10),encryptionAlgorithm:ks(r,18),bitLength:ks(r,20),flags:ks(r,22),hashAlgorithm:ks(r,24),hashData:t.subarray(28,28+o)})}return e}(await Si(r,S+X,t)))}D==M?D=vs(s,16):D!=vs(s,16)&&zs(c,i,Na),_==M?_=vs(s,20):_!=vs(s,20)&&zs(c,i,Na),N==M?N=_s(s,32):N!=_s(s,32)&&zs(c,i,Na),E==O?E=_s(s,40):E!=_s(s,40)&&zs(c,i,Na),S=ds(r,_)+_s(s,48)+U}else if(S==O||E==O||_==M)throw new d(ca)}let $=E;const J=m.offset-(T?P+K:0);if(A!=D)throw new d(da);if(S<0)throw new d(aa);let Q=0,tt=S<r.size?await Si(r,S,E):Rt,et=Ce(tt);if(E){let t=J-E;if(S!=t&&_==D){const e=tt.length>=4&&(vs(et,Q)==H||Boolean(v&&v.compressedSize)||$a(et));if(!e&&t<0)throw new d(aa);let n=!e;if(t>=0&&t+4<=r.size){let o=await Qa(r,t);if(!o){const e=await async function(t,e){const n=a.max(0,e-65541),r=await Si(t,n,e-n),o=Ce(r);for(let t=r.length-6;t>=0;t--)if(vs(o,t)==Z&&t+6+ks(o,t+4)==r.length)return n+t}(r,J),n=e-E;e!==dt&&n>=0&&await Qa(r,n)&&(t=n,o=!0)}e&&(n=o)}if(n&&t!=S){const n=S;S=t,tt=await Si(r,S,E),et=Ce(tt);const o=S-n,s=function(t,e){if(t.length<q)return dt;const n=vs(e,42);if(n!=O)return n;let r=q+ks(e,28);const o=a.min(r+ks(e,30),t.length);for(;r+4<=o;){const t=ks(e,r),n=ks(e,r+2);if(1==t){let t=r+4;return vs(e,24)==O&&(t+=8),vs(e,20)==O&&(t+=8),t+8<=o?_s(e,t):dt}r+=4+n}return dt}(tt,et),u=s!==dt&&await ts(r,s,B),l=s!==dt&&await ts(r,s+o,B);o>0&&(!u||l)?(U+=o,I=e):(zs(c,i,ka),o<0&&!u&&l&&(U+=o))}}if(tt.length<4)throw new d(aa)}else!N&&S<J&&_==D&&(U+=J-S,S=J);const nt=J-S;if(E!=nt&&nt>=0&&_==D&&(E=nt,tt=await Si(r,S,E),et=Ce(tt)),S<0||S>=r.size)throw new d(aa);e.directoryOffset=S,e.directoryLength=$;const rt=As(e,t,"decryptCentralDirectory");let ut,lt;if(rt&&N&&tt.length>=4&&vs(et,0)!=H&&(k||$a(et))){const t=function(t,e,n){const r=t&&t.compressedSize?t.compressedSize:e;return r>0&&r<=n?r:n}(v,$,tt.length);lt=tt.subarray(t),tt=await rt(tt.subarray(0,t),v),et=Ce(tt),$=tt.length,ut=!0}v&&!ut&&(tt.length<4||vs(et,0)==H)&&Ri(i,Fa),C=S;const ft=Ds(e,t,"filenameEncoding"),wt=Ds(e,t,"commentEncoding"),pt=new u;let ht,yt=-1;const gt=!c&&!T;!N&&gt&&(N=Ja(et,tt,Q),N&&Ri(i,Da));const Et=n.assign({},e.options,t,{[Mt]:s});delete Et[It];for(let o=0;o<N;o++){const s=new Xa(r,Et);if(Q+q>tt.length||vs(et,Q)!=H){if(0==o&&!ut&&(k||$a(et)))throw new d(ha);throw new d(ua)}ns(s,et,Q+6);const u=Boolean(s.bitFlag.languageEncodingFlag),l=Q+q,f=l+s.filenameLength+s.extraFieldLength,m=ks(et,Q+4),y=!(m>>8),g=m>>8==3,E=ks(et,Q+32),S=f+E,b=new w(tt.subarray(l,S)),R=b.subarray(0,s.filenameLength),x=b.subarray(s.filenameLength+s.extraFieldLength),F=u||!ft&&Eo(R),D=u||!wt&&Eo(x),A=vs(et,Q+38),I=A&L,T={readOnly:Boolean(1&I),hidden:Boolean(2&I),system:Boolean(4&I),directory:Boolean(16&I),archive:Boolean(32&I)},v=vs(et,Q+42),_=As(e,t,"decodeText")||go,B=F?Za:ft||Ha,W=D?Za:wt||Ha;let P=_(R,B,Pt);P===dt&&(P=go(R,B));let Z,V=_(x,W,Zt);V===dt&&(V=go(x,W)),n.assign(s,{index:o,Ft:ut,versionMadeBy:m,msDosCompatible:y,zip64:!1,compressedSize:0,uncompressedSize:0,Dt:E,offset:v,diskNumberStart:ks(et,Q+34),internalFileAttributes:ks(et,Q+36),externalFileAttributes:A,msdosAttributesRaw:I,msdosAttributes:T,rawFilename:R,filenameUTF8:F,commentUTF8:D,rawExtraField:b.subarray(s.filenameLength,s.filenameLength+s.extraFieldLength),rawComment:x,filename:P,comment:V});try{Z=rs(s,s,et,Q+6)}catch(t){if(c||t.message!=mt)throw t;s.At=!0,Ri(i,va,s.filename)}if(P=s.filename,h){const t=h(P);t!==dt&&(P=s.filename=t)}if(ys(P,p)){const t=new d(ma);throw t.filename=P,t}if(Z&&Ri(i,za,P),s.At&&s.offset==O)C=0;else{s.offset+=U;const t=ds(r,s.diskNumberStart)+s.offset;C=a.min(t,C),t<yt&&Ri(i,ba,P),yt=t}(s.version&L)>63&&Ri(i,Ra,P),32&~s.rawBitFlag||Ri(i,xa,P),pt.has(s.filename)&&(ht=!0),pt.add(s.filename);const G=s.externalFileAttributes>>16&M;s.unixMode===dt&&16877&G&&(s.unixMode=G);const j=Boolean(s.unixMode&at),Y=Boolean(s.unixMode&st),K=Boolean(512&s.unixMode),X=40960==((s.unixMode===dt?G:s.unixMode)&ot),$=s.unixMode!==dt&&(s.unixMode&ot)==it||(G&ot)==it||y&&T.directory||s.filename.endsWith(ct),J=!X&&!$&&(s.unixMode!==dt?!!(73&s.unixMode):g&&!!(73&G));n.assign(s,{setuid:j,setgid:Y,sticky:K,symlink:X,unixExternalUpper:G,executable:J,directory:$,zipCrypto:s.encrypted&&!s.extraFieldAES});const nt=new ra(s);if(s.At&&e.Rt.add(nt),nt.getData=(t,n)=>s.getData(t,nt,e,n),nt.arrayBuffer=async t=>{const r=new z,o=Wn(r.readable).then(t=>t.arrayBuffer());return o.catch(()=>{}),await s.getData(r,nt,e,n.assign({},t,{preventClose:!1})),o},Q=S,o==N-1&&gt){const t=Ja(et,tt,Q);t&&(N+=t,Ri(i,Da))}const{onprogress:rt}=t;if(rt)try{await rt(o+1,N,new ra(s))}catch{}yield nt}let St=Q,bt=es(tt.subarray(Q))||(ut?es(lt):dt);if(!bt&&!ut){const t=S+Q,e=a.min(J-t,65541);e>=6&&(bt=es(await Si(r,t,e)))}bt&&(e.digitalSignature=bt,St=Q+6+bt.length),(Q!=$&&St!=$||!ut&&Q!=E&&St!=E)&&zs(c,i,Ta),ht&&zs(c,i,_a);const xt=Ds(e,t,"extractPrependedData"),zt=Ds(e,t,"extractAppendedData"),Ft=(c||xt)&&N&&4==C&&await async function(t){const e=await ws(t);return e==W||808471376==e}(r)?4:0;return c&&(U>0||N&&C>Ft)&&Fs(Ia),(U>0||N&&C>4)&&Ri(i,Ia),I&&Ri(i,Ca),xt&&(e.prependedData=C>Ft?await Si(r,Ft,C-Ft):Rt),e.comment=R?await Si(r,b+Y,R):Rt,zt&&(e.appendedData=x<r.size?await Si(r,x,r.size-x):Rt),!0}async getEntries(t={}){const e=[];for await(const n of this.getEntriesGenerator(t))e.push(n);return e}async close(){const{reader:t}=this;t.readUint8Array||!t.readable||t.readable.locked||await t.readable.cancel()}[xt](){return this.close()}}class Ya{constructor(t={}){let r;const{readable:o,writable:i}=new z({start(t){r=t}}),a=new qa(o,t),s=a.getEntriesGenerator(),c=new u;this.readable=new F({async pull(t){const{done:e,value:r}=await s.next();if(e)return t.close();const o=function(t,e){const{readable:n,writable:r}=new z;let o;const i={cancel:async t=>{e.delete(i),await(o?o.cancel(t):n.cancel(t))}};return i.readable=new F({async pull(a){o||(o=n.getReader(),e.add(i),async function(){try{await t.getData(r,{preventClose:!1})}catch(t){try{await r.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,c),i={...r,readable:o.readable};delete i.getData,n.defineProperties(i,{localDirectory:{get:()=>r.localDirectory,enumerable:!0},warnings:{get:()=>r.warnings,enumerable:!0}}),t.enqueue(i)},async cancel(t){const n=e.from(c);c.clear(),r.error(t),await g.allSettled(n.map(e=>e.cancel(t))),await g.allSettled([s.return(),a.close()])}}),this.writable=i}}async function Ka(t,e={}){if(t=new hi(t),await gi(t),t.size!==dt&&t.readUint8Array||(t=new Po(await Wn(t.readable)),await gi(t)),t.size<Y)return!1;const n=hs(e,{}),r=n!=Gt,o=gs(e[Lt],n),{xt:i,zt:a}=await Es(t,r,o);if(!i||n==Ht&&a>1)return!1;const s=ks(Ce(i),20),c=i.offset+Y+s;return t.size-c<=o}let Xa=class{constructor(t,e){n.assign(this,{reader:t,options:e})}async getData(t,e,r,o={}){const i=this,{gt:s,directoryOffset:c}=r;if(i.At)throw new d(mt);const u=be(),{reader:l,index:f,offset:w,diskNumberStart:p,extraFieldAES:h,extraFieldZip64:m,compressionMethod:y,bitFlag:g,rawBitFlag:E,crc32:S,rawLastModDate:b,uncompressedSize:R,compressedSize:x}=i,{dataDescriptor:z}=g,F=e.localDirectory={},A=e.warnings=[],I=ds(l,p)+w,C=await Si(l,I,ut),T=Ce(C);let k=Ds(i,o,zt),v=Ds(i,o,Ft);const _=oe(Ds(i,o,Dt)),N=Boolean(_),U=!0===_;if(re(k,v),k=k&&k.length?k:dt,v=v&&v.length?v:dt,h&&99!=h.originalCompressionMethod)throw new d(Gn);if(C.length<ut||vs(T,0)!=B)throw new d(pt);ns(F,T,4);const{extraFieldLength:O,filenameLength:M}=F,W=F.dataOffset=I+ut+M+O,P=Ds(i,o,"checkLocalDirectory"),Z=hs(o,i.options),H=function(t,e){return t===dt?e!=Gt:Boolean(t)}(P,Z),V=Ds(i,o,"checkLocalFilename"),G=function(t,e){return t===dt?e==Ht:Boolean(t)}(V===dt?P:V,Z);let j=Rt;if(G&&(M||O)){const t=await Si(l,I+ut,M+O);j=t.subarray(0,M),F.rawExtraField=t.subarray(M)}else F.rawExtraField=O?await Si(l,I+ut+M,O):Rt;G&&(F.rawFilename=j),rs(i,F,T,4,!0)&&Ri(A,za),function(t,e,n,r,o){const{rawFilename:i}=t,a=!o,s=t.Ft&&(e.rawBitFlag&rt)==rt;!r||s||n.length==i.length&&!n.some((t,e)=>t!=i[e])||zs(a,o,Oa),(2121&e.rawBitFlag)!=(2121&t.rawBitFlag)&&zs(a,o,Ma),e.compressionMethod!=t.compressionMethod&&zs(a,o,La),e.bitFlag.dataDescriptor||s||!(e.crc32||e.compressedSize||e.uncompressedSize)||e.crc32==t.crc32&&e.compressedSize==t.compressedSize&&e.uncompressedSize==t.uncompressedSize||zs(a,o,Ba)}(i,F,j,G,H?dt:A);const{lastAccessDate:q,creationDate:Y,uid:K,gid:X}=F;q&&e.lastAccessDate===dt&&(e.lastAccessDate=q),Y&&e.creationDate===dt&&(e.creationDate=Y),K!==dt&&e.uid===dt&&(e.uid=K),X!==dt&&e.gid===dt&&(e.gid=X);const $=Ds(i,o,"checkPasswordOnly"),J=i.encrypted&&(!U||$),Q=J&&!h;if(U||(e.zipCrypto=Q),J&&!(64&~i.rawBitFlag))throw new d(fa);const tt=N?dt:Kn(y);if(0!=y&&8!=y&&9!=y&&!tt&&!N)throw new d(Gn);if(J){if(!Q&&(h.strength<1||h.strength>3))throw new d(fa);if(!k&&!v)throw new d(la)}if(W+x>a.min(l.size,c))throw new d(wa);const et=x,nt=ee(Ds(i,o,At));ne(nt);let ot=Ds(i,o,"checkOverlappingEntry");const it=Ds(i,o,"checkOverlappingEntryOnly");it&&(ot=!0);const{onstart:at,onprogress:st,onend:ct}=o,lt=0!=y&&!N,ft=N?x-ia(J,Q,h&&h.strength):R,wt=9==y;let yt=Ds(i,o,Tt);wt&&(yt=!1);const gt=Ds(i,o,"checkCrc32"),Et=(gt===dt?Ds(i,o,"checkSignature"):gt)&&!N&&(!J||Q||h&&1==h.vendorVersion),St={options:{codecType:Ir,password:k,rawPassword:v,zipCrypto:Q,encryptionStrength:h&&h.strength,checkCrc32:Et,checkAuthenticationCode:Ds(i,o,"checkAuthenticationCode"),passwordVerification:Q&&(z?b>>>8&L:S>>>24&L),outputSize:ft,crc32:S,compressed:lt,encrypted:J,useWebWorkers:Ds(i,o,Ct),useCompressionStream:yt,deflate64:wt,format:tt?tt.format:dt,codecURI:tt?tt.codecURI:dt,compressionMethod:y,rawBitFlag:E,checkPasswordOnly:$},config:u,A:{signal:nt,size:et,onstart:at,onprogress:st,onend:ct}};let bt,xt,It;ot&&(await async function({reader:t,It:e,index:n,offset:r,crc32:o,compressedSize:i,uncompressedSize:a,dataOffset:s,dataDescriptor:c,extraFieldZip64:u,gt:l}){let f=0;if(c){const n=Boolean(u),r=await us(t,s+i,{crc32:o,compressedSize:i,uncompressedSize:a,zip64:n});r?(e.localDirectory.dataDescriptor=r,f=fs(r.zip64,r.signature)):f=fs(n,!1)}const w={start:r,end:s+i+f,It:e},{Et:p,St:h,bt:m}=l;if(!p.has(n)){const t=function(t,e){let n=0,r=t.length;for(;n<r;){const o=n+r>>>1;t[o].start<e.start?n=o+1:r=o}const o=t[n-1],i=t[n];return o&&cs(e,o)?o:i&&cs(e,i)?i:void 0}(h,w)||m.find(t=>cs(w,t));if(t){const e=new d(ht);throw e.overlappingEntry=t.It,e}p.add(n),m.push(w),m.length*m.length>h.length&&(m.sort((t,e)=>t.start-e.start),l.St=function(t,e){const n=[];let r=0,o=0;for(;r<t.length||o<e.length;)o==e.length||r<t.length&&t[r].start<e[o].start?n.push(t[r++]):n.push(e[o++]);return n}(h,m),m.length=0)}}({reader:l,It:e,index:f,offset:I,crc32:S,compressedSize:x,uncompressedSize:R,dataOffset:W,dataDescriptor:z||F.bitFlag.dataDescriptor,extraFieldZip64:m||F.extraFieldZip64,gt:s}),function(t,e,n){const{dataDescriptor:r}=e,o=t.Ft&&(e.rawBitFlag&rt)==rt;r&&!o&&(t.crc32!==dt&&r.crc32!=t.crc32||r.compressedSize!=t.compressedSize||r.uncompressedSize!=t.uncompressedSize)&&zs(!n,n,Ba)}(i,F,H?dt:A));try{if(!it){$&&(t=new D),t=new mi(t),await gi(t,function(t,e,n){return a.min(t,n?1032*e:e)}(ft,x,lt)),({writable:bt}=t);const e=Bn(l.createReadable({offset:W,size:et})),{outputSize:r}=await co({readable:e,writable:bt},St);if(ne(nt),r!=ft)throw n.assign(new d(Qn),{outputSize:r});t.size+=r}}catch(e){if(Te(e)&&e.outputSize!==dt&&(t.size+=e.outputSize),!$||!Te(e)||e.message!=cn)throw xt=e,It=!0,e}finally{if((yi(t)||!Ds(i,o,kt))&&bt&&!bt.locked){const t=bt.getWriter();if(It)try{await t.abort(xt)}catch{}else await t.close()}}return $||it?dt:t.getData?t.getData():bt}};function $a(t){return t.byteLength>=4&&134630224==vs(t,0)}function Ja(t,e,n){let r=0;for(;n+q<=e.length&&vs(t,n)==H;)n+=q+ks(t,n+28)+ks(t,n+30)+ks(t,n+32),r++;return r%65536?0:r}function Qa(t,e){return ts(t,e,H)}async function ts(t,e,n){return!(e<0||e+4>t.size)&&vs(Ce(await Si(t,e,4)),0)==n}function es(t){if(t.length>=6){const e=Ce(t);if(vs(e,0)==Z){const n=ks(e,4);if(6+n<=t.length)return new w(t.subarray(6,6+n))}}}function ns(t,e,r){const o=t.rawBitFlag=ks(e,r+2),i=!(1&~o),a=vs(e,r+6);n.assign(t,{encrypted:i,version:ks(e,r),bitFlag:{level:(6&o)>>1,dataDescriptor:!(8&~o),languageEncodingFlag:(o&nt)==nt},rawLastModDate:a,lastModDate:Is(a),filenameLength:ks(e,r+22),extraFieldLength:ks(e,r+24)})}function rs(t,e,r,o,i){const{rawExtraField:a}=e,u=e.extraField=new c,l=Ce(a);let f=0,w=!1;try{for(;f<a.length;){const t=ks(l,f),e=ks(l,f+2);u.set(t,{type:t,data:a.slice(f+4,f+4+e)}),f+=4+e}}catch{w=!0}f>a.length&&(w=!0);const p=ks(r,o+4);n.assign(e,{signature:vs(r,o+10),crc32:vs(r,o+10),compressedSize:vs(r,o+14),uncompressedSize:vs(r,o+18)});const h=u.get(1);let m;h?(function(t,e,n){e.zip64=!0;const r=Ce(t.data),o=Va.filter(([t,n])=>e[t]==n),i=o.reduce((t,[,e])=>t+Ga[e].bytes,0);if(t.data.length<i){if(n)return!1;throw new d(mt)}const a=[];try{for(let t=0,e=0;t<o.length;t++){const[,n]=o[t],i=Ga[n];a.push(i.yt(r,e)),e+=i.bytes}}catch(t){if(n)return!1;throw t}return o.forEach(([n],r)=>{e[n]=t[n]=a[r]}),!0}(h,e,i)||(w=!0),e.extraFieldZip64=h):Va.some(([t,n])=>e[t]==n)&&(i?w=!0:m=!0);const y=u.get(28789);y&&(os(y,xi,zi,e,t),e.extraFieldUnicodePath=y);const g=u.get(25461);g&&(os(g,Fi,Di,e,t),e.extraFieldUnicodeComment=g);const E=u.get($);E&&(99==p||e.encrypted)&&E.data.length>=7?(function(t,e,r){const o=Ce(t.data),i=Ts(o,4);n.assign(t,{vendorVersion:Ts(o,0),vendorId:Ts(o,2),strength:i,originalCompressionMethod:r,compressionMethod:ks(o,5)}),e.compressionMethod=t.compressionMethod,1!=t.vendorVersion&&(e.crc32=dt)}(E,e,p),e.extraFieldAES=E):(E&&(w=!0),e.compressionMethod=p);const S=u.get(13);S&&(is(S,e),e.extraFieldPkwareUnix=S);const b=u.get(22613);b&&(is(b,e),e.extraFieldUnixType1=b);const R=u.get(J);R&&(function(t,e,n){if(!t.data.length)return;const r=Ce(t.data),o=Ts(r,0),i=[],a=[];n?(1&~o||(i.push(ki),a.push(vi)),2&~o||(i.push(_i),a.push(Ni)),4&~o||(i.push(Ui),a.push(Oi))):t.data.length>=5&&(i.push(ki),a.push(vi));let c=1;i.forEach((n,o)=>{if(t.data.length>=c+4){const i=vs(r,c);e[n]=t[n]=new s(1e3*(0|i));const u=a[o];t[u]=i}c+=4})}(R,e,i),e.extraFieldExtendedTimestamp=R);const x=u.get(10);x&&(function(t,e){const r=Ce(t.data);let o,i=4;try{for(;i<t.data.length&&!o;){const e=ks(r,i),n=ks(r,i+2);1==e&&(o=t.data.slice(i+4,i+4+n)),i+=4+n}}catch{}if(o&&24==o.length){const r=Ce(o),i=r.getBigUint64(0,!0),a=r.getBigUint64(8,!0),s=r.getBigUint64(16,!0);n.assign(t,{rawLastModDate:i,rawLastAccessDate:a,rawCreationDate:s});const c={lastModDate:Cs(i),lastAccessDate:Cs(a),creationDate:Cs(s)};n.assign(t,c),n.assign(e,c,{rawLastAccessDate:a,rawCreationDate:s})}}(x,e),e.extraFieldNTFS=x);const z=u.get(tt);let F;z&&(F=as(z,e,!0),e.extraFieldInfoZip=z);const D=u.get(et);D&&(as(D,F?{}:e,!1),e.extraFieldUnix=D);const A=u.get(Q);if(A&&(e.extraFieldUSDZ=A),m)throw new d(mt);return w}function os(t,e,r,o,i){if(t.data.length<5)return void(t.valid=!1);const a=Ce(t.data),s=new We;s.append(i[r]);const c=Ce(new w(4));c.setUint32(0,s.get(),!0);const u=vs(a,1),l=Ts(a,0);n.assign(t,{version:l,[e]:go(t.data.subarray(5)),valid:1==l&&!i.bitFlag.languageEncodingFlag&&u==vs(c,0)}),t.valid&&(o[e]=t[e],o[e+"UTF8"]=!0)}function is(t,e){if(t.data.length<8)return;const r=Ce(t.data),o={lastAccessDate:new s(1e3*(0|vs(r,0))),lastModDate:new s(1e3*(0|vs(r,4)))};t.data.length>=12&&(o.uid=ks(r,8),o.gid=ks(r,10)),n.assign(t,o),n.assign(e,o)}function as(t,e,r){try{const o=Ce(t.data);let i,a;if(r){let e=0;const r=Ts(o,e++),s=Ts(o,e++);i=ss(t.data.subarray(e,e+s)),e+=s;const c=Ts(o,e++);a=ss(t.data.subarray(e,e+c)),n.assign(t,{version:r,uid:i,gid:a})}else t.data.length>=4&&(i=ks(o,0),a=ks(o,2),n.assign(t,{uid:i,gid:a}));return i!==dt&&(e.uid=i),a!==dt&&(e.gid=a),i!==dt||a!==dt}catch{}}function ss(t){const e=new w(4);return e.set(t,0),new m(e.buffer,e.byteOffset,4).getUint32(0,!0)}function cs(t,e){return t.start<e.end&&e.start<t.end}async function us(t,e,{crc32:n,compressedSize:r,uncompressedSize:o,zip64:i}){const s=a.min(24,a.max(0,t.size-e)),c=Ce(s?await Si(t,e,s):Rt),u=[[i,!0],[i,!1],[!i,!0],[!i,!1]].map(([t,e])=>ls(c,t,e)).filter(t=>t&&t.compressedSize==r&&t.uncompressedSize==o);return u.find(t=>t.crc32==n)||u[0]||ls(c,i,!0)||ls(c,i,!1)}function ls(t,e,n){const r=n?4:0;if(t.byteLength<fs(e,n)||n&&vs(t,0)!=P)return dt;const o=vs(t,r);let i,a;try{e?(i=_s(t,r+4),a=_s(t,r+12)):(i=vs(t,r+4),a=vs(t,r+8))}catch{return dt}return{signature:n,zip64:e,crc32:o,compressedSize:i,uncompressedSize:a}}function fs(t,e){return(t?20:12)+(e?4:0)}function ds(t,e){return t.ht?t.ht(e):0}async function ws(t){return vs(Ce(await Si(t,0,4)))}function ps(t){return t===Ht||t===Vt||t===Gt}function hs(t,e){return ms(t,ms(e,Vt))}function ms(t,e){const n=t[Mt];if(n!==dt){if(!ps(n))throw new d(ya);return n}const r=t[It];return r===dt?e:r?Ht:e==Gt?Gt:Vt}function ys(t,e){if(e==Gt)return!1;const n=t.split("/");return n.length>1&&""===n[n.length-1]&&n.pop(),!!(Pa.test(t)||t.startsWith("/")||t.startsWith("\\")||Wa.test(t))||e==Ht&&(n.includes(".")||n.includes("")||t.includes("\0"))}function gs(t,e){if(t!==dt){const e=se(t);if("number"!=typeof e||o.isNaN(e)||e<0)throw new d(Ea);return e}return e==Ht?0:e==Gt?1/0:M}async function Es(t,e,n){const{size:r}=t,o=a.min(r,65557),i={Ct:64};let s,c,u=0;for await(const[n,a,l,f,d]of Ss(t,o)){const o=ks(n,f+20);if(d+Y+o==r){const o=await Rs(t,n,a,f,d,r,i);if(2==o){if(s||(s=bs(l,f,d)),u++,!e||u>1)break}else 1!=o||c||(c=bs(l,f,d))}}return s||(s=c),s||(s=await async function(t,e,n){const{size:r}=t,o=a.min(r,e==1/0?r:65557+e);let i,s;for await(const[e,a,c,u,l]of Ss(t,o)){const o=bs(c,u,l);i||(i=o);const f=await Rs(t,e,a,u,l,r,n);if(2==f)return o;1!=f||s||(s=o)}return s||i}(t,n,i)),{xt:s,zt:u}}async function*Ss(t,e){const n=t.size-e,r=await Si(t,n,e),o=Ce(r);for(let t=r.length-Y;t>=0;t--)vs(o,t)==V&&(yield[o,n,r,t,n+t])}function bs(t,e,n){return{offset:n,buffer:new w(t.subarray(e,e+Y)).buffer}}async function Rs(t,e,n,r,o,i,a){const s=ks(e,r+10),c=vs(e,r+12),u=vs(e,r+16);if(s==M||c==O||u==O)return await xs(t,e,n,o-K,i,a)==j?2:0;if(!s&&!c)return 1;const l=ks(e,r+6);for(const r of[o-c,ds(t,l)+u])if(await xs(t,e,n,r,i,a)==H)return 2;return 0}async function xs(t,e,n,r,o,i){return r<0||r+4>o?dt:r>=n?vs(e,r-n):i.Ct>0?(i.Ct--,vs(Ce(await Si(t,r,4)),0)):dt}function zs(t,e,n){t?Fs(n):Ri(e,n)}function Fs(t){const e=new d(pa);throw e.reason=t,e}function Ds(t,e,n){return e[n]===dt?t.options[n]:e[n]}function As(t,e,n){return Qt(Ds(t,e,n))}function Is(t){const e=(4294901760&t)>>16,n=t&M,r=new s(1980+((65024&e)>>9),((480&e)>>5)-1,31&e,(63488&n)>>11,(2016&n)>>5,2*(31&n),0);return r<ft?ft:r}function Cs(t){return new s(o(t/i(1e4)-i(116444736e5)))}function Ts(t,e){return t.getUint8(e)}function ks(t,e){return t.getUint16(e,!0)}function vs(t,e){return t.getUint32(e,!0)}function _s(t,e){const n=t.getBigUint64(e,!0);if(n>ja)throw new d(Sa);return o(n)}var Ns=n.freeze({__proto__:null,ERR_AMBIGUOUS_ARCHIVE:pa,ERR_BAD_FORMAT:aa,ERR_CENTRAL_DIRECTORY_NOT_FOUND:ua,ERR_CODEC_OUT_OF_MEMORY:er,ERR_ENCRYPTED:la,ERR_ENCRYPTED_CENTRAL_DIRECTORY:ha,ERR_ENTRY_DATA_OUT_OF_BOUNDS:wa,ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND:ca,ERR_EOCDR_NOT_FOUND:sa,ERR_EXTRAFIELD_ZIP64_NOT_FOUND:mt,ERR_INVALID_AUTHENTICATION_CODE:sn,ERR_INVALID_COMPRESSED_DATA:tr,ERR_INVALID_CRC32:nr,ERR_INVALID_FILENAME_VALIDATION:ga,ERR_INVALID_MAX_APPENDED_DATA_SIZE:Ea,ERR_INVALID_PASSWORD:an,ERR_INVALID_STRICTNESS:ya,ERR_INVALID_UNCOMPRESSED_SIZE:Qn,ERR_LOCAL_FILE_HEADER_NOT_FOUND:pt,ERR_OVERLAPPING_ENTRY:ht,ERR_SPLIT_ZIP_FILE:da,ERR_UNSAFE_FILENAME:ma,ERR_UNSUPPORTED_COMPRESSION:Gn,ERR_UNSUPPORTED_ENCRYPTION:fa,ERR_UNSUPPORTED_UINT64:Sa,ERR_WORKER_STARTUP_TIMEOUT:kr,WARNING_APPENDED_DATA:Aa,WARNING_COMPRESSED_PATCHED_DATA:xa,WARNING_DUPLICATE_FILENAME:_a,WARNING_MALFORMED_EXTRA_FIELD:za,WARNING_MISMATCHED_CENTRAL_DIRECTORY_OFFSET:ka,WARNING_MISMATCHED_LOCAL_FILE_HEADER_BIT_FLAG:Ma,WARNING_MISMATCHED_LOCAL_FILE_HEADER_COMPRESSION_METHOD:La,WARNING_MISMATCHED_LOCAL_FILE_HEADER_CRC32_OR_SIZES:Ba,WARNING_MISMATCHED_LOCAL_FILE_HEADER_FILENAME:Oa,WARNING_MISMATCHED_ZIP64_END_OF_CENTRAL_DIRECTORY:Na,WARNING_MISSING_ZIP64_EXTRA_FIELD:va,WARNING_MULTIPLE_END_OF_CENTRAL_DIRECTORY:Ua,WARNING_PREPENDED_CENTRAL_DIRECTORY:Ca,WARNING_PREPENDED_DATA:Ia,WARNING_TRAILING_CENTRAL_DIRECTORY_DATA:Ta,WARNING_UNKNOWN_VERSION:Ra,WARNING_UNKNOWN_ZIP64_EXTENSIBLE_DATA:Fa,WARNING_UNSORTED_CENTRAL_DIRECTORY:ba,WARNING_WRAPPED_ENTRIES_COUNT:Da,ZipReader:qa,ZipReaderStream:Ya,Tt:async function(t,e,{crc32:n,compressedSize:r,uncompressedSize:o,extraFieldZip64:i}){const a=await us(t,e,{crc32:n,compressedSize:r,uncompressedSize:o,zip64:Boolean(i)});if(a&&a.compressedSize==r&&a.uncompressedSize==o)return fs(a.zip64,a.signature)},isZipFile:Ka});const Us="File already exists",Os="Zip file comment exceeds 64KB",Ms="Invalid zip file comment (must be a Uint8Array)",Ls="File entry comment exceeds 64KB",Bs="Invalid file entry comment (must be a string)",Ws="Invalid date (must be a valid Date instance)",Ps="File entry name exceeds 64KB",Zs="Version exceeds 65535",Hs="The strength must equal 1, 2, or 3",Vs="Encryption is not supported in USDZ files",Gs="Split zip files are not supported in USDZ files",js="Encryption is not supported when the 'passThrough' option is set to true (use 'compressed' instead)",qs="Invalid extra field (must be a Map)",Ys="Invalid extra field type (must be integer 0..65535)",Ks="Invalid extra field data (must be a Uint8Array)",Xs="Extra field data exceeds 64KB",$s=-2147483648,Js=2147483647,Qs=i(0),tc=i("0x7fffffffffffffff"),ec="Zip64 is not supported (set the 'zip64' option to 'true')",nc="Undefined uncompressed size",rc="Undefined compression method",oc="Undefined CRC32",ic="Undetermined size",ac="Undefined reader",sc="Invalid reader (must be a Reader instance, a ReadableStream instance, or an object with a 'readable' property)",cc="Zip file not empty",uc="Invalid uid (must be integer 0..2^32-1)",lc="Invalid gid (must be integer 0..2^32-1)",fc="Invalid UNIX mode (must be integer 0..65535)",dc="Invalid unixExtraFieldType (must be 'infozip' or 'unix')",wc="uid/gid must be 0..65535 for unixExtraFieldType 'unix' (use 'infozip' for larger ids)",pc="Invalid msdosAttributesRaw (must be integer 0..255)",hc="Invalid msdosAttributes (must be an object with boolean flags)",mc="Invalid level (must be integer 0..9)",yc="Signature data exceeds 64KB",gc="Invalid entry option (must be an entry returned by ZipReader#getEntries())",Ec="The last modification date of an entry encrypted with ZipCrypto cannot be changed when passThrough is set",Sc="compression unavailable",bc="clamped last modification date",Rc=new w([7,0,2,0,65,69,3,0,0]),xc="infozip",zc="unix",Fc=[8,9,5,3];let Dc=0;const Ac=[];class Ic{constructor(t,e={}){t=new mi(t);const{availableSize:r=wt,maxSize:o=wt}=t,i=r>0&&r!==wt&&o>0&&o!==wt;if(i&&e[Ot])throw new d(Gs);n.assign(this,{writer:t,kt:i,options:e,vt:new c,_t:new u,offset:e[Ut]===dt?t.size||t.writable.size||0:e[Ut],Nt:e[Ut]===dt?0:e[Ut]-(t.size||t.writable.size||0),Ut:new u,Ot:[],warnings:[],Mt:0,Lt:0,Bt:dt,Wt:!1})}prependZip(t){return kc(this,async function(t,e){if(t._t.size)throw new d(cc);await vc(t,e)}(this,t))}appendZip(t,e={}){return kc(this,vc(this,t,e))}add(t="",e,r={}){const o=this,{Ut:a}=o,s=async function(t,e,r,o){const a=(o=n.assign({},o))[Wt];if(a!==dt){const{Pt:e,Zt:r}=Oc(a,oe(uu(t,o,Dt)),uu(t,o,ki));delete o[Wt],o=n.assign(e,r,o)}if(uu(t,o,qi)&&!e.endsWith(ct)&&(e+=ct),t._t.has(e))throw new d(Us);t._t.add(e),Dc<be().maxWorkers?Dc++:await new g(t=>Ac.push(t));try{return await async function(t,e,r,o){const a=Mc(t,e,o);({name:e}=a);const s=Lc(t,e,o),{comment:c}=s,u=o[$i];t.vt.set(e,dt);const l=t.Bt,f={};let w,p;s.Ht.keepOrder&&(f.Vt=new g(t=>w=t)),t.Bt=f;try{const{Ht:c}=s;0==c.level||c.compressionMethod!==dt||c.Gt||await Or(be())||(c.level=0,Ri(t.warnings,Sc,e));const u=await async function(t,e,{Ht:r},o){if(r.Gt&&!e&&!uu(t,o,qi))throw new d(ac);let i;if(e){if(e=new hi(e),await gi(e),!e.readUint8Array&&!e.readable)throw new d(sc);({size:i}=e)}return n.assign({reader:e},Wc(t,Boolean(e),i,r,o))}(t,r,s,o);({reader:r}=u);const h=Kc(t.writer),m=Yc(t.writer);let y=o.crc32===dt?o[Xi]:o.crc32;const E=u.Ht.encrypted&&!c.zipCrypto;if(c.Gt&&!c.jt&&E&&(y=dt),c.Gt&&r&&!E&&y===dt)throw new d(oc);const S=Zc(o=n.assign({},o,a.Ht,s.Ht,u.Ht,{signature:o[Xi],crc32:y,offset:t.offset-h,diskNumberStart:m,[Ot]:t.options[Ot]}));S.qt&&Ri(t.warnings,bc,e);const b=Gc(o),R=bu(S.Yt,b.Kt);p=await async function(t,e,r,o,a){const{vt:s,writer:c}=t,{keepOrder:u,dataDescriptor:l,Xt:f,signal:w}=a,{$t:p,It:h,Jt:m,Qt:y}=o,E=t.options[Ot];let S,b,R,x,F,D,A,I=h,C=0;const T=u&&m?m.Vt:dt;s.set(e,I);try{a.bufferedWrite||!u||t.te||t.Mt||t.Lt||!l&&!f?(S=!0,t.Mt++,A=a.createTempStream?await a.createTempStream():new z(dt,dt,{highWaterMark:wt}),A.size=0,await gi(c)):(b=!0,t.Lt++,A=c,await T,await k()),await gi(A);const h=Kc(c);t.kt&&!S&&await ru(t,c),E&&!S&&Hc(o,t.offset-h);const{Yt:m}=p;S||await v();const y=Yc(c),R=$c(t,c);if(I.diskNumberStart=y,S||(F=!0,D=c.size,await ou(A,m)),I=await async function(t,e,{diskNumberStart:r,Vt:o},a,s,c){const{$t:u,ee:l,ne:f}=a,{re:w,oe:p,lastModDate:h,rawLastModDate:m,encrypted:y,compressed:g,version:E,compressionMethod:S,ie:b,ae:R,se:x,ce:z,ue:F,le:D,fe:A,de:I,we:C}=u,{Kt:T}=l,{rawFilename:k,lastAccessDate:v,creationDate:_,password:N,rawPassword:U,level:M,useUnicodeFileNames:B,zip64:W,pe:P,he:Z,me:H,zipCrypto:V,dataDescriptor:G,directory:j,executable:q,versionMadeBy:Y,rawComment:K,rawExtraField:X,ye:$,useWebWorkers:J,onstart:Q,onprogress:tt,onend:et,signal:nt,encryptionStrength:rt,extendedTimestamp:ot,msDosCompatible:it,internalFileAttributes:at,externalFileAttributes:st,uid:ct,gid:ut,unixMode:lt,symlink:ft,setuid:wt,setgid:pt,sticky:ht,unixExternalUpper:mt,msdosAttributesRaw:yt,msdosAttributes:gt,useCompressionStream:Et,Gt:St,jt:bt,format:Rt,codecURI:xt}=c,zt={Vt:o,versionMadeBy:Y,zip64:W,pe:P,directory:Boolean(j),executable:Boolean(q),filenameUTF8:Boolean(B),rawFilename:k,commentUTF8:Boolean(B),rawComment:K,ie:b,ae:R,se:x,le:D,fe:A,de:I,we:C,rawExtraField:X,ye:$,extendedTimestamp:ot,msDosCompatible:it,internalFileAttributes:at,externalFileAttributes:st,diskNumberStart:r,uid:ct,gid:ut,unixMode:lt,symlink:Boolean(ft),setuid:wt,setgid:pt,sticky:ht,unixExternalUpper:mt,msdosAttributesRaw:yt,msdosAttributes:gt};let{crc32:Ft,uncompressedSize:Dt}=c,At=0;St||(Dt=0);const{writable:It}=e;if(t){const n=t.size,r=Bn(bi(t,{size:n})),o={options:{codecType:Ar,inputSize:n,level:M,rawPassword:U,password:N,encryptionStrength:rt,zipCrypto:y&&V,passwordVerification:y&&V&&m>>8&L,computeCrc32:!St,compressed:g&&!St,encrypted:y&&!bt,useWebWorkers:J,useCompressionStream:Et,format:Rt,codecURI:xt,compressionMethod:S},config:s,A:{signal:nt,size:n,onstart:Q,onprogress:tt,onend:et}};try{const t=await co({readable:r,writable:It},o);if(At=t.outputSize,e.size+=At,ne(nt),St||(Dt=t.inputSize,y&&!V||(Ft=t.crc32)),!H&&At>=O||!Z&&Dt>=O)throw new d(ec)}catch(t){const{outputSize:n}=o;throw n!==dt?e.size+=n:Te(t)&&t.outputSize!==dt&&(e.size+=t.outputSize),t}}return function({crc32:t,compressedSize:e,uncompressedSize:n,$t:r,ee:o},{zip64:a,zipCrypto:s,Gt:c,dataDescriptor:u}){const{oe:l,encrypted:f}=r,{ge:d,Ee:w}=o;f&&!s&&!c||t===dt||(gu(l,10,t),u&&gu(d,w,t)),a?u&&(Eu(d,w+4,i(e)),Eu(d,w+12,i(n))):(gu(l,14,e),gu(l,18,n),u&&(gu(d,w+4,e),gu(d,w+8,n)))}({crc32:Ft,compressedSize:At,uncompressedSize:Dt,$t:u,ee:l},c),G&&await ou(e,T),n.assign(zt,{uncompressedSize:Dt,compressedSize:At,lastModDate:h,rawLastModDate:m,creationDate:_,lastAccessDate:v,encrypted:Boolean(y),zipCrypto:Boolean(V),size:f+At,compressionMethod:S,version:E,re:w,oe:p,signature:Ft,crc32:!y||V||St?Ft:dt,ce:z,ue:F,he:Z,me:H}),zt}(r,A,I,o,be(),a),S||(F=!1),s.set(e,I),I.filename=e,S){if(await g.all([A.writable.getWriter().close(),T]),await k(),t.kt&&await ru(t,c),x=!0,D=c.size,await v(),I.diskNumberStart=Yc(c),I.offset=$c(t,c),E){const e=o.ne;Hc(o,t.offset-Kc(c)),I.size+=o.ne-e}!function({rawFilename:t,encrypted:e,zip64:n,ae:r,crc32:o,compressedSize:a,uncompressedSize:s,he:c,me:u},l,{dataDescriptor:f,Gt:d}){if(f||((!e||d&&o!==dt)&&gu(l,14,o),u||gu(l,18,a),c||gu(l,22,s)),n&&r){const e=ut+bu(t)+4;Eu(l,e,i(s)),Eu(l,e+8,i(a))}}(I,p.Se,a),await ou(c,p.Yt),await iu(A.readable,c,w,t=>C+=t),c.size+=A.size,x=!1}else I.diskNumberStart=y,I.offset=R;return t.offset+=I.size,I}catch(n){if(x||F){if(t.hasCorruptedEntries=!0,n)try{n.corruptedEntry=!0}catch{}t.offset+=c.size-D,S&&(t.offset+=C)}throw s.delete(e),n}finally{if(S&&t.Mt--,b&&t.Lt--,y&&y(T),R&&R(),S&&A&&A.dispose)try{await A.dispose()}catch{}}async function k(){t.te=!0;const{be:e}=t;t.be=new g(e=>R=()=>{t.te=!1,e()}),await e}async function v(){Xc(c,bu(p.Yt))&&await c.closeDisk()}}(t,e,r,{$t:S,ee:b,ne:R,It:f,Jt:l,Qt:w},o)}catch(n){throw t.vt.delete(e),n}finally{w&&w(l&&l.Vt)}return n.assign(p,{name:e,comment:c,extraField:u}),new ra(p)}(t,e,r,o)}catch(n){throw t._t.delete(e),n}finally{const t=Ac.shift();t?t():Dc--}}(o,t,e,r);a.add(s);const c=()=>a.delete(s);return g.prototype.then.call(s,c,c),kc(o,s)}remove(t){const{_t:e,vt:n}=this;if(typeof t==St&&(t=n.get(t)),t&&t.filename!==dt){const{filename:r}=t;if(e.has(r)&&n.has(r))return e.delete(r),n.delete(r),!0}return!1}async close(t=Rt,n={}){const r=this,{Ut:o,writer:a}=this,{writable:s}=a;if(r.Wt)return Tc(a);if(!(t instanceof w))throw new d(Ms);if(bu(t)>M)throw new d(Os);for(;o.size;)await g.allSettled(e.from(o));await g.allSettled(r.Ot.map(t=>t.Re));const c=r.Ot.filter(t=>t.xe&&!t.ze);if(c.length){const t=c.map(t=>t.error);c.forEach(t=>t.ze=!0);const[e]=t;try{e.entryErrors=t}catch{}throw e}return await async function(t,n,r){const{Fe:o,De:a}=jc(t.vt),{Ae:s,Ie:c,Ce:u}=await async function(t,n,r){const{vt:o,writer:i}=t,a=new w(n);await gi(i);let s=0,c=0,u=Yc(i),l=Kc(i),f=0;for(const[t,n]of e.from(o.values()).entries()){const{offset:e,rawFilename:d,ie:w,we:p,se:h,le:m,de:y,rawExtraField:g,ye:E,rawComment:S,versionMadeBy:b,re:R,oe:x,he:z,me:F,Te:D,ke:A,internalFileAttributes:I,externalFileAttributes:C,diskNumberStart:T,uncompressedSize:k,compressedSize:v}=n,_=bu(w,p,h,m,y,g,E),N=q+bu(d,S)+_;Xc(i,s+N-c)&&(await ou(i,a.slice(c,s)),c=s,f=0,await i.closeDisk()),0==t&&(u=Yc(i),l=Kc(i)),z||gu(x,18,k),F||gu(x,14,v),(A||D)&&n.version<45&&yu(x,0,45);const U=qc(N);if(U.ve(H),U._e(b),U.Ne(R.subarray(0,24)),U._e(_),U._e(bu(S)),U._e(D?M:T),U._e(I),U.ve(C),U.ve(A?O:e),U.Ne(d),U.Ne(w),U.Ne(p),U.Ne(h),U.Ne(m),U.Ne(y),U.Ne(g),U.Ne(E),U.Ne(S),Su(a,U.ct,s),s+=N,f++,r.onprogress)try{await r.onprogress(t+1,o.size,new ra(n))}catch{}}return await ou(i,c?a.slice(c):a),{Ae:{diskNumber:u,diskOffset:l},Ie:{diskNumber:Yc(i),Ue:f},Ce:a}}(t,o,r),l=await async function(t,e,n){const r=fu(t,n,Bt);if(r){const n=await r(e),o=bu(n);if(o>M)throw new d(yc);const i=qc(6+o);i.ve(Z),i._e(o),i.Ne(n);const{writer:a}=t;return Xc(a,bu(i.ct))&&await a.closeDisk(),await ou(a,i.ct),6+o}return 0}(t,u,r);await async function(t,e,n,r){const{writer:o}=t,{Ae:a,Ie:s,Oe:c,De:u}=r;let{Fe:l}=r,f=t.vt.size,w=a.diskNumber,p=$c(t,a);const h=bu(e);if(h>M)throw new d(Os);let m=uu(t,n,Zi),y=Yc(o);if(Xc(o,(m?98:Y)+h)&&y++,p>=O||l>=O||f>=M||y>=M){if(!1===m)throw new d(ec);m=!0}else m===dt&&u&&(m=!0);const g=qc(m?98:Y);Xc(o,bu(g.ct)+h)&&await o.closeDisk(),y=Yc(o);let E=y==s.diskNumber?s.Ue:0;m&&(g.ve(G),g.Me(44),g._e(45),g._e(45),g.ve(y),g.ve(w),g.Me(E),g.Me(f),g.Me(l),g.Me(p),g.ve(j),g.ve(y),g.Me(i($c(t,o))+i(l)+i(c)),g.ve(y+1),uu(t,n,"supportZip64SplitFile",!0)&&(y=M,w=M),E=M,f=M,p=O,l=O),g.ve(V),g._e(y),g._e(w),g._e(E),g._e(f),g.ve(l),g.ve(p),g._e(h),await ou(o,g.ct),h&&await ou(o,e)}(t,n,r,{Ae:s,Ie:c,Fe:o,Oe:l,De:a})}(r,t,n),r.Wt=!0,!yi(a)&&uu(r,n,kt)||await s.getWriter().close(),Tc(a)}[xt](){return this.close()}}class Cc extends g{then(t,e){const{Le:n}=this;return n&&(n.ze=!0),super.then(t,e)}}function Tc(t){return t.getData?t.getData():t.writable}function kc(t,e){const r=new Cc((t,n)=>g.prototype.then.call(e,t,n)),o={};return r.Le=o,o.Re=g.prototype.then.call(r,dt,t=>n.assign(o,{xe:!0,error:t})),t.Ot.push(o),r}async function vc(t,r,o={}){const{Ut:i,_t:s,vt:l}=t,f=Qt(o.filter),w=te(o.readerOptions);for(;i.size;)await g.allSettled(e.from(i));let p;const h=new g(t=>p=t);i.add(h);const m=[];let y;try{r=new hi(r),await gi(r),r.size!==dt&&r.readUint8Array||(r=new Po(await Wn(r.readable)),await gi(r));const{ZipReader:o,Tt:i}=await g.resolve().then(function(){return Ns}),p=new o(r,w),h=[];let E;try{E=await p.getEntries();for(const t of E)f&&!await f(t,_c(l,t.filename))||h.push(t)}finally{await p.close()}await gi(t.writer);const{directoryOffset:S,Rt:b}=p;h.forEach(t=>{const{filename:e}=t;if(b.has(t))throw new d(mt);if(s.has(e))throw new d(Us);s.add(e),m.push(e)}),t.te=!0;const{be:R}=t;t.be=new g(e=>y=()=>{t.te=!1,e()}),await R,t.kt&&(delete t.kt,!f&&await async function(t){return mu(Ce(await Si(t,0,4)),0)==W}(r)||(await ou(t.writer,nu()),t.offset+=4));const x=await async function(t,n,r,o,i,s,l){const{writer:f}=t,w=new c;if(f.closeDisk||s){const p=e.from(r).sort((t,e)=>eu(n,t)-eu(n,e)),h=function(t,n,r){const o=new e(n.length);let i=r;for(let e=n.length-1;e>=0;e--){const s=eu(t,n[e]),c=n[e+1];c&&eu(t,c)>s&&(i=a.min(eu(t,c),r)),o[e]=i}return o}(n,p,i),m=new u(o),y=new c;for(let t=0;t<p.length;t++){const e=p[t];if(m.has(e)){const r=eu(n,e),o=await tu(n,r);if(o===dt)throw new d(pt);let i=r+o+e.compressedSize;if(e.bitFlag.dataDescriptor){const r=await l(n,i,e);i=r===dt?a.max(i,h[t]):i+r}if(i>h[t])throw new d(ht);h[t]=i,y.set(e,o)}}let g,E=0;for(let e=0;e<p.length;e++){const r=p[e];if(m.has(r)){const o=eu(n,r);o<E?w.set(r,g):(s||await Qc(t,n,E,o-E),f.closeDisk&&Xc(f,y.get(r))&&await f.closeDisk(),g={offset:$c(t,f),diskNumberStart:Yc(f)},w.set(r,g),await Qc(t,n,o,h[e]-o),E=h[e])}}s||await Qc(t,n,E,i-E)}else{const e=t.offset;await Qc(t,n,0,i),r.forEach(t=>w.set(t,{offset:e+eu(n,t),diskNumberStart:0}))}return w}(t,r,E,h,S,Boolean(f),i);h.forEach(t=>{const{version:e,rawLastModDate:r,rawFilename:o,rawBitFlag:i,uncompressedSize:a,compressedSize:s,extraFieldZip64:c}=t;let{compressionMethod:u,rawExtraField:f}=t;f=Jc(f||Rt),t.extraFieldAES&&(u=99);const d=bu(f),w=Boolean(c)&&c.uncompressedSize!==dt,p=Boolean(c)&&c.compressedSize!==dt,{re:h,oe:m}=Ru({version:e,bitFlag:i,compressionMethod:u,uncompressedSize:a,compressedSize:s,rawLastModDate:r,rawFilename:o,me:p,he:w,extraFieldLength:d}),{crc32:y}=t;y!==dt&&gu(m,10,y);const{offset:g,diskNumberStart:E}=x.get(t);l.set(t.filename,n.assign({},t,{pe:!0,he:w,me:p,offset:g,diskNumberStart:E,Te:!1,ie:Rt,we:Rt,se:Rt,le:Rt,fe:Rt,de:Rt,rawExtraField:f,ye:Rt,re:h,oe:m}))})}catch(t){throw m.forEach(t=>s.delete(t)),t}finally{p(),i.delete(h),y&&y()}}function _c(t,e){const n=t.get(e);return n?new ra(n):dt}async function Nc(t,e){try{await t.writer.writable.abort(e)}catch{}}function Uc(t,e,n){t.Ut.add(e),e.catch(t=>{try{n(t)}catch{}})}function Oc(t,r,o){if(null===t||typeof t!=Et||e.isArray(t))throw new d(gc);const{externalFileAttributes:i,versionMadeBy:u,comment:l,lastModDate:f,rawLastModDate:w,creationDate:p,lastAccessDate:h,uncompressedSize:m,encrypted:y,zipCrypto:g,crc32:E,compressionMethod:S,extraFieldAES:b,extraFieldUnix:R,internalFileAttributes:x,extraField:z,bitFlag:F,directory:D,uid:A,gid:I}=t,C={externalFileAttributes:i,versionMadeBy:u,comment:l,lastModDate:f,creationDate:p,lastAccessDate:h,internalFileAttributes:x,directory:D};F&&F.languageEncodingFlag&&(C[_t]=!0);const T=function(t){if(t){const e=new c;if(t.forEach((t,n)=>{oa.has(n)||e.set(n,t.data)}),e.size)return e}}(z);T&&(C[$i]=T),A===dt&&I===dt||n.assign(C,{uid:A,gid:I,unixExtraFieldType:R?zc:xc});const k={};if(r&&!D)if(n.assign(k,{uncompressedSize:m,crc32:E,compressionMethod:S}),r!==jt&&n.assign(k,{encrypted:y,zipCrypto:g,encryptionStrength:b?b.strength:dt}),F&&(k.dataDescriptor=F.dataDescriptor,k[vt]=Fc[F.level]),o===dt)k.rawLastModDate=w;else if(r!==jt&&g&&(!F||F.dataDescriptor)&&o instanceof s&&function(t){let e=new s(2e3*a.ceil(a.floor(t.getTime()/1e3)/2));return e<ft?e=ft:e>lt&&(e=lt),(e.getHours()<<3|e.getMinutes()>>3)&L}(o)!=(w>>>8&L))throw new d(Ec);return{Pt:C,Zt:k}}function Mc(t,n,r){let o=uu(t,r,Pi),i=uu(t,r,Gi,o?20:768);const a=uu(t,r,Yi),s=du(t,r,"uid"),c=du(t,r,"gid");let u=du(t,r,Ji),l=uu(t,r,"unixExtraFieldType"),f=uu(t,r,Qi),w=uu(t,r,ta),p=uu(t,r,ea);if(ae(s,O,uc),ae(c,O,lc),ae(u,M,fc),l!==dt&&l!==xc&&l!==zc)throw new d(dc);if(l===zc&&(s!==dt&&s>M||c!==dt&&c>M))throw new d(wc);l!==dt||s===dt&&c===dt||(l=xc);let h=du(t,r,Bi),m=uu(t,r,Wi);const y=h!==dt||m!==dt;if(s!==dt||c!==dt||u!==dt||l||a?(o=!1,i=i&L|768):y&&(o=!0,i&=L),ae(h,L,pc),m&&(typeof m!==Et||e.isArray(m)))throw new d(hc);if(i>M)throw new d(Zs);let g=uu(t,r,Li);const E=g!==dt;E||(g=0),!r[qi]&&n.endsWith(ct)&&(r[qi]=!0);const S=uu(t,r,qi);if(S?(n.endsWith(ct)||(n+=ct),E||(g=16,o||(g|=16877<<16))):o||E||(g=a?493<<16:27525120),!o){const t=u!==dt||Boolean(f||w||p);u=u===dt?g>>16&M:u&M,f?u|=at:f=Boolean(u&at),w?u|=st:w=Boolean(u&st),p?u|=512:p=Boolean(512&u),E&&!t||(S?u=-61441&u|it:u&ot||(u|=32768),g=(u&M)<<16|g&M)}({msdosAttributesRaw:h,msdosAttributes:m}=function(t,e){if(t!==dt)t&=L;else if(e!==dt){const{readOnly:n,hidden:r,system:o,directory:i,archive:a}=e;let s=0;n&&(s|=1),r&&(s|=2),o&&(s|=4),i&&(s|=16),a&&(s|=32),t=s&L}return e===dt&&(e={readOnly:Boolean(1&t),hidden:Boolean(2&t),system:Boolean(4&t),directory:Boolean(16&t),archive:Boolean(32&t)}),{msdosAttributesRaw:t,msdosAttributes:e}}(h,m)),y&&(g=g&O|h&L);const b=g>>16&M,R=u!==dt&&40960==(u&ot);return{name:n,Ht:{versionMadeBy:i,msDosCompatible:Boolean(o),externalFileAttributes:g,unixExternalUpper:b,uid:s,gid:c,unixMode:u,unixExtraFieldType:l,symlink:R,setuid:f,setgid:w,sticky:p,msdosAttributesRaw:h,msdosAttributes:m}}}function Lc(t,e,n){const r=fu(t,n,"encodeText")||Ze;let i=r(e,Pt);if(i===dt&&(i=Ze(e)),bu(i)>M)throw new d(Ps);const a=n[Fi]||"";if(typeof a!=St)throw new d(Bs);let c=r(a,Zt);if(c===dt&&(c=Ze(a)),bu(c)>M)throw new d(Ls);const u=uu(t,n,Vi);if(u!==dt&&u>M)throw new d(Zs);const l=lu(t,n,ki,new s),f=uu(t,n,vi),w=lu(t,n,_i),p=lu(t,n,Ui),h=uu(t,n,Mi,0),m=oe(uu(t,n,Dt)),y=Boolean(m),g=!0===m;let E=uu(t,n,zt),S=uu(t,n,Ft);re(E,S),E=E&&E.length?E:dt,S=S&&S.length?S:dt;const b=du(t,n,"encryptionStrength",3),R=uu(t,n,ji),x=uu(t,n,"extendedTimestamp",!0),z=uu(t,n,"ntfsTimestamp"),F=uu(t,n,"keepOrder",!0),D=uu(t,n,Ct),A=uu(t,n,"bufferedWrite"),I=fu(t,n,"createTempStream"),C=uu(t,n,"dataDescriptorSignature",!0),T=ee(uu(t,n,At));ne(T);const k=uu(t,n,_t,!xu(i)||!xu(c)),v=uu(t,n,Ki),_=y||v===dt?dt:Kn(v);if(!y&&v!==dt&&0!==v&&8!==v&&!_)throw new d(Gn);let N=du(t,n,vt);if(ae(N,9,mc),t.options[Ot]){if(E!==dt||S!==dt)throw new d(Vs);N===dt&&v===dt&&(N=0)}y&&(N=se(n[vt]));let U=uu(t,n,Tt),O=uu(t,n,Nt);A&&O===dt&&(O=!1),(O===dt||R&&!g)&&(O=!0),N!==dt&&6!=N&&(U=!1);const L=uu(t,n,Zi);if(!(R||E===dt&&S===dt||o.isInteger(b)&&b>=1&&b<=3))throw new d(Hs);const B=Bc(n[$i]),W=Bc(n.localExtraField),P=Bc(n.centralExtraField);return{comment:a,Ht:{rawFilename:i,rawComment:c,version:u,lastModDate:l,rawLastModDate:f,lastAccessDate:w,creationDate:p,internalFileAttributes:h,Gt:y,jt:g,password:E,rawPassword:S,encryptionStrength:b,zipCrypto:R,extendedTimestamp:x,ntfsTimestamp:z,keepOrder:F,useWebWorkers:D,bufferedWrite:A,createTempStream:I,dataDescriptorSignature:C,signal:T,useUnicodeFileNames:k,compressionMethod:v,format:_?_.format:dt,codecURI:_?_.codecURI:dt,Be:_?_.versionNeeded:dt,level:N,useCompressionStream:U,dataDescriptor:O,zip64:L,rawExtraField:B,We:W,ye:P}}}function Bc(t){if(!t)return Rt;if(!(t instanceof c))throw new d(qs);let e=0,n=0;t.forEach((t,n)=>{if(ie(n,M,Ys),!(t instanceof w))throw new d(Ks);if(bu(t)>M)throw new d(Xs);e+=4+bu(t)});const r=new w(e),o=Ce(r);return t.forEach((t,e)=>{yu(o,n,e),yu(o,n+2,bu(t)),Su(r,t,n+4),n+=4+bu(t)}),r}function Wc(t,e,n,r,o){const{Gt:i,jt:a,zipCrypto:s,password:c,rawPassword:u,encryptionStrength:l}=r;let{dataDescriptor:f,zip64:w,level:p,compressionMethod:h}=r,m=0,y=0,g=!1;if(i&&e){if(y=o[Ai],y===dt)throw new d(nc);if(h===dt)throw new d(rc)}const E=!0===w,S=uu(t,o,Hi);if(e&&a&&!S&&bu(c,u))throw new d(js);const b=e&&(Boolean(c&&bu(c)||u&&bu(u))||a&&S);e||(p=0,h=0);const R=ia(b,s,l);e&&(i?(o.uncompressedSize=y,m=n===dt?wu(y)+R:n+(a?0:R)):n===dt?(f=!0,(w||w===dt)&&(w=g=!0,m=4294967296)):(o.uncompressedSize=y=n,m=(pu(h,p)?wu(y):y)+R));const x=!(b||e&&(0!==n||i)||pu(h,p));x&&uu(t,o,Nt)===dt&&(f=!1);const z=E||g||y>=O,F=E||m>=O;if(z||F){if(!1===w)throw new d(ec);w=!0}return w=w||!1,{Pe:m,Ht:{dataDescriptor:f,Xt:x,zip64:w,pe:E,Ze:g,he:z,me:F,uncompressedSize:y,level:p,compressionMethod:h,encrypted:b}}}function Pc(t,e,n){const r=t.slice().sort((t,e)=>n?e-t:t-e);let o=e,i=0;for(const t of r){if(o>=O)break;o+=t,i++}return i}function Zc(t){const{rawFilename:e,lastModDate:n,rawLastModDate:r,lastAccessDate:o,creationDate:i,level:c,zip64:u,zipCrypto:l,useUnicodeFileNames:f,dataDescriptor:w,directory:p,rawExtraField:h,We:m,encryptionStrength:y,extendedTimestamp:g,ntfsTimestamp:E,Gt:S,encrypted:b,he:R,me:x,uncompressedSize:z,Ze:F,crc32:D}=t;let{version:A,compressionMethod:I}=t;const C=!p&&pu(I,c);let T;const k=S||!C,v=u&&(t.bufferedWrite||!w||!R&&!x||k&&!F),_=v||u&&w&&(R||x);if(u&&(R||x)){const t=20,e=qc(t);if(e._e(1),e._e(t-4),T=e.ct,v&&(e.Me(z),k)){const t=ia(b,l,y);e.Me(S?0:z+t)}}else T=Rt;let N,U,O,L,W;if(b&&!l){const t=qc(bu(Rc)+2);t._e($),t.Ne(Rc),N=t.ct,N[8]=y}else N=Rt;if(g){const t=su(n),e=(P=t)>=$s&&P<=Js;if(e){const e=9+(o?4:0)+(i?4:0),n=qc(e);L=1+(o?2:0)+(i?4:0),W=t,n._e(J),n._e(e-4),n.He(L),n.ve(t),o&&n.ve(cu(su(o))),i&&n.ve(cu(su(i))),O=n.ct}else O=Rt;if(E===dt?!e||Boolean(o||i):E)try{const t=au(n),e=qc(36);e._e(10),e._e(32),e.Ve(4),e._e(1),e._e(24),e.Me(t),e.Me(o?au(o):t),e.Me(i?au(i):t),U=e.ct}catch{U=Rt}else U=Rt}else U=O=Rt;var P;let Z,H;try{const{uid:e,gid:n,unixExtraFieldType:r}=t;if(r!=xc||e===dt&&n===dt)if(r!=zc||e===dt&&n===dt)Z=H=Rt;else{const t=qc(8);t._e(et),t._e(4),t._e((e===dt?0:e)&M),t._e((n===dt?0:n)&M),Z=t.ct;const r=qc(4);r._e(et),r._e(0),H=r.ct}else{const t=Vc(e===dt?0:e),r=Vc(n===dt?0:n),o=3+t.length+r.length,i=qc(4+o);i._e(tt),i._e(o),i.He(1),i.He(t.length),i.Ne(t),i.He(r.length),i.Ne(r),Z=H=i.ct}}catch{Z=H=Rt}I===dt&&(I=C?8:0),A===dt&&(A=0!=I||p||b?20:10);const{Be:V}=t;C&&V!==dt&&(A=A>V?A:V),u&&(A=A>45?A:45),b&&!l&&(A=A>51?A:51,S&&D!==dt&&(N[4]=1),yu(Ce(N),9,I),I=99);const G=_?bu(T):0,j=G+bu(N,O,U,Z,h,m);if(j+(t[Ot]?67:0)>M)throw new d(Xs);const q=new s(2e3*a.ceil(a.floor(n.getTime()/1e3)/2)),Y=q<ft?ft:q>lt?lt:q,K=bu(O)?new s(1e3*su(n)):bu(U)?n:Y,{re:X,oe:Q,rawLastModDate:nt}=Ru({version:A,bitFlag:zu(c,f,w,b,I),compressionMethod:I,uncompressedSize:z,lastModDate:Y,rawLastModDate:r,rawFilename:e,me:x,he:R,extraFieldLength:j}),rt=qc(ut+bu(e)+j),ot=rt.ct,it=Ce(ot);return rt.ve(B),rt.Ne(X),rt.Ne(e),_&&rt.Ne(T),rt.Ne(N),rt.Ne(O),rt.Ne(U),rt.Ne(Z),rt.Ne(h),rt.Ne(m),w&&(x||gu(it,18,0),R||gu(it,22,0)),{Yt:ot,Se:it,re:X,oe:Q,lastModDate:K,qt:K===Y&&q.getTime()!=Y.getTime(),rawLastModDate:nt,encrypted:b,compressed:C,version:A,compressionMethod:I,ce:L,ue:W,ie:Rt,ae:G,se:O,le:U,fe:Z,de:H,we:N,extraFieldLength:j}}function Hc(t,e){const{$t:n}=t;let{Yt:r,extraFieldLength:o}=n,i=64-(e+bu(r))%64;i<4&&(i+=64);const a=new w(i),s=Ce(a);yu(s,0,Q),yu(s,2,i-4);const c=r;n.Yt=r=new w(bu(c)+i),Su(r,c),Su(r,a,bu(c));const u=Ce(r);yu(u,28,o+i),n.Se=u,t.ne+=i}function Vc(t){const e=new w(4);Ce(e).setUint32(0,t,!0);let n=4;for(;n>1&&0===e[n-1];)n--;return e.subarray(0,n)}function Gc({zip64:t,dataDescriptor:e,dataDescriptorSignature:n}){let r,o=Rt,i=0,a=t?20:12;return n&&(a+=4),e&&(o=new w(a),r=Ce(o),n&&(i=4,gu(r,0,P))),{Kt:o,ge:r,Ee:i}}function jc(t){let e=0,n=!1;for(const[,r]of t){const{rawFilename:t,we:o,rawComment:i,le:a,de:s,rawExtraField:c,ye:u,ce:l,ue:f,pe:w,uncompressedSize:p,compressedSize:h}=r;let{he:m,me:y}=r;w||(m&&p<O&&(m=r.he=!1),y&&h<O&&(y=r.me=!1)),n=n||m||y;const g=r.offset>=O,E=r.diskNumberStart>=M;let S,b;if(g||E||m||y){const t=4+(m?8:0)+(y?8:0)+(g?8:0)+(E?4:0),e=qc(t);e._e(1),e._e(t-4),m&&e.Me(p),y&&e.Me(h),g&&e.Me(r.offset),E&&e.ve(r.diskNumberStart),S=e.ct}else S=Rt;if(r.ie=S,r.ke=g,r.Te=E,f===dt)b=Rt;else{const t=qc(9);t._e(J),t._e(5),t.He(l),t.ve(f),b=t.ct}r.se=b;const R=bu(S,o,a,s,b,c,u);if(R>M)throw new d(Xs);e+=q+bu(t,i)+R}return{Fe:e,De:n}}function qc(t){const e=new w(t),n=Ce(e);let r=0;return{ct:e,He:t=>{!function(t,e,n){t.setUint8(e,n)}(n,r,t),r+=1},_e:t=>{yu(n,r,t),r+=2},ve:t=>{gu(n,r,t),r+=4},Me:t=>{Eu(n,r,i(t)),r+=8},Ne:t=>{Su(e,t,r),r+=bu(t)},Ve:t=>r+=t}}function Yc(t){const{diskNumber:e=0}=t;return e}function Kc(t){const{diskOffset:e=0}=t;return e}function Xc(t,e){const{availableSize:n=wt}=t;return e>n}function $c(t,{diskNumber:e=0,diskOffset:n=0}){return t.offset-n-(e?t.Nt:0)}function Jc(t){const e=Ce(t);let n=0;for(;n+4<=bu(t);){const r=4+hu(e,n+2);if(1==hu(e,n))return Jc(Ae(t.subarray(0,n),t.subarray(a.min(n+r,bu(t)))));n+=r}return t}async function Qc(t,e,n,r){if(r>0){const{writer:o}=t;let i=0;try{await iu(bi(e,{offset:n,size:r}),o,dt,t=>i+=t)}catch(e){if(i){t.hasCorruptedEntries=!0;try{e.corruptedEntry=!0}catch{}}throw e}finally{o.size+=i,t.offset+=i}}}async function tu(t,e){const n=e>=0&&e+ut<=t.size?await Si(t,e,ut):Rt;if(bu(n)<ut)return dt;const r=Ce(n);return mu(r,0)!=B?dt:ut+hu(r,26)+hu(r,28)}function eu(t,{offset:e,diskNumberStart:n}){return e+(t.ht?t.ht(n):0)}function nu(){const t=new w(4);return gu(Ce(t),0,W),t}async function ru(t,e){delete t.kt,await ou(e,nu()),t.offset+=4}async function ou(t,e){const{writable:n}=t,r=n.getWriter();try{await r.ready,t.size+=bu(e),await r.write(e)}finally{r.releaseLock()}}async function iu(t,e,n,r){const o=e.writable.getWriter();try{await t.pipeTo(new D({async write(t){await o.ready,await o.write(t),r(bu(t))}}),{preventClose:!0,preventAbort:!0,signal:n})}finally{o.releaseLock()}}function au(t){if(t){const e=(i(t.getTime())+i(116444736e5))*i(1e4);return e<Qs?Qs:e>tc?tc:e}}function su(t){return a.floor(t.getTime()/1e3)}function cu(t){return a.min(Js,a.max($s,t))}function uu(t,e,n,r){const o=e[n]===dt?t.options[n]:e[n];return o===dt?r:o}function lu(t,e,n,r){const i=uu(t,e,n,r);if(null===i)return r;if(i!==dt&&(typeof i.getTime!=gt||o.isNaN(i.getTime())))throw new d(Ws);return i}function fu(t,e,n){return Qt(uu(t,e,n))}function du(t,e,n,r){return se(uu(t,e,n,r))}function wu(t){return t+5*(a.floor(t/16383)+1)}function pu(t,e){return t===dt?e===dt||e>0:0!==t}function hu(t,e){return t.getUint16(e,!0)}function mu(t,e){return t.getUint32(e,!0)}function yu(t,e,n){t.setUint16(e,n,!0)}function gu(t,e,n){t.setUint32(e,n,!0)}function Eu(t,e,n){t.setBigUint64(e,n,!0)}function Su(t,e,n){t.set(e,n)}function bu(...t){let e=0;return t.forEach(t=>t&&(e+=t.length)),e}function Ru({version:t,bitFlag:e,compressionMethod:n,uncompressedSize:r,compressedSize:o,lastModDate:i,rawLastModDate:a,rawFilename:s,me:c,he:u,extraFieldLength:l}){const f=qc(26),d=f.ct,w=Ce(d);if(f._e(t),f._e(e),f._e(n),a===dt){const t=new h(1),e=Ce(t);yu(e,0,(i.getHours()<<6|i.getMinutes())<<5|i.getSeconds()/2),yu(e,2,(i.getFullYear()-1980<<4|i.getMonth()+1)<<5|i.getDate()),a=t[0]}return f.ve(a),f.Ve(4),c||o!==dt?f.ve(c?O:o):f.Ve(4),u||r!==dt?f.ve(u?O:r):f.Ve(4),f._e(bu(s)),f._e(l),{re:d,oe:w,rawLastModDate:a}}function xu(t){return t.every(t=>t>=32&&t<=126)}function zu(t,e,n,r,o){let i=0;return e&&(i|=nt),n&&(i|=8),8!=o&&9!=o||(t>=0&&t<=3&&(i|=6),t>3&&t<=5&&(i|=4),9==t&&(i|=2)),r&&(i|=1),i}function Fu(t,e){if(!t)return!1;const{supportedFormats:n}=t;return n?n.includes(e):fr(t,e)}const Du=1048576,Au=".zip.js-temp",Iu=1048576,Cu=1048576,Tu=".zip.js-temp",ku="createSyncAccessHandle is only available in dedicated workers";try{!function(t){const e=ze(De(t));n.assign(we,e),n.assign(Se,e)}({baseURI:void 0===b&&"undefined"==typeof location?require("url").pathToFileURL(__filename).href:void 0===b?location.href:U&&"SCRIPT"===U.tagName.toUpperCase()&&U.src||new f("zip-fs-core.min.js",b.baseURI).href})}catch{}const vu="Entry filename already exists",_u="Duplicate entry filename in the imported zip file",Nu='Invalid duplicates option (must be "throw", "keep-first" or "keep-last")',Uu="Entry is an ancestor of target entry",Ou="Root directory cannot be moved",Mu="Target entry is not a directory",Lu="Parent entry is not a directory",Bu="Readable stream already consumed",Wu="throw",Pu="keep-first",Zu="keep-last",Hu=new u([Wu,Pu,Zu]),Vu="Invalid passThrough option (use readerOptions.passThrough or set uncompressedSize for each entry)",Gu="The 'compressed' passThrough option is only supported by Entry#getData() and ZipWriter#add()",ju="Invalid passwords option (must be an array of strings)",qu="Invalid requestPassword option (must be a function returning a string or undefined)",Yu="zipjs-abort-export",Ku=new w(0),Xu=new u([nr,Qn,tr]);class $u{constructor(t,e,r,o){const i=this;if(t.root&&o&&o.getChildByName(e))throw new d(vu);r||(r={}),n.assign(i,{fs:t,name:e,data:r.data,options:r.options&&n.assign({},r.options),id:t.Ge++,parent:o,children:[],uncompressedSize:r.uncompressedSize||0,je:r.je||r.uncompressedSize===dt,passThrough:r.passThrough,qe:r.qe||new s}),!o&&t.root||(t.entries[i.id]=i),o&&i.parent.children.push(i)}getFullname(){return this.getRelativeName()}getRelativeName(t=this.fs.root){let e=this.name,n=this.parent;for(;n&&n!=t;)e=(n.name?n.name+"/":"")+e,n=n.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 n=e.parent;if(n){const r=Cl(t);r&&(t=r.pop(),n=Tl(n,r,e));const o=n.getChildByName(t);if(o&&o!=e)throw new d(vu);n!=e.parent&&(ul(e),e.parent=n,n.children.push(e),Al(e.fs,e))}e.name=t}setOptions(t){const e=n.assign({},this.options,t);this.options=n.fromEntries(n.entries(e).filter(([,t])=>t!==dt))}}class Ju extends $u{constructor(t,e,n,r){super(t,e,n,r);const o=this;o.Reader=n.Reader,o.Writer=n.Writer,n.getData&&(o.getData=n.getData)}clone(){return new Ju(this.fs,this.name,this)}async getData(t,e={}){const n=this;if(!t||t.constructor==n.Writer&&n.data&&function(t,e){const{contentType:n}=t;return n===dt||(t.constructor==Zo?e.type==n:t.constructor!=Lo||e.startsWith("data:"+(n||"")+";base64,"))}(t,n.data))return n.data;{const r=n.reader=sl(n.Reader,n.data,e),o=n.uncompressedSize||r.size;await g.all([gi(r),gi(t,o)]);const i=ee(e.signal),a=function(t,e,n,r){const{onstart:o,onprogress:i,onend:a}=n,{readable:s}=e;return t.data instanceof ra||!o&&!i&&!a?s:Bn(s).pipeThrough(new Wr({onstart:o,onprogress:i,onend:a,size:e.size}),{signal:r})}(n,r,e,i),s=!yi(t)&&Boolean(e.preventClose);return n.uncompressedSize=r.size,await Bn(a).pipeTo(Pn(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,n.assign({},e,{password:t,checkPasswordOnly:!0})),!0}catch(t){if(Te(t)&&t.message==an)return!1;throw t}}getText(t,e){return this.getData(new Go(t),e)}getBlob(t,e){return this.getData(new Zo(t),e)}getData64URI(t,e){return this.getData(new Lo(t),e)}getUint8Array(t){return this.getData(new di,t)}getWritable(t=new D,e){return this.getData({writable:t},e)}async getArrayBuffer(t){return Ie(await this.getUint8Array(t)).buffer}replaceBlob(t){El(this,{data:t,Reader:Po,Writer:Zo,uncompressedSize:t.size})}replaceText(t){El(this,{data:t,Reader:Ho,Writer:Go,uncompressedSize:Vo(t)})}replaceData64URI(t){El(this,{data:t,Reader:Mo,Writer:Lo,uncompressedSize:Sl(t)})}replaceUint8Array(t){El(this,{data:t,Reader:fi,Writer:di,uncompressedSize:t.length})}replaceReadable(t){El(this,{data:null,Reader:il(t),Writer:null,uncompressedSize:dt})}}class Qu extends $u{constructor(t,e,n,r){super(t,e,n,r),this.directory=!0}clone(t){const e=this,n=new Qu(e.fs,e.name,e);return t&&(n.children=e.children.map(e=>{const r=e.clone(t);return r.parent=n,r})),n}addDirectory(t,e){return Il(this,t,{options:e},!0)}addText(t,e,n={}){return Il(this,t,{data:e,Reader:Ho,Writer:Go,options:n,uncompressedSize:Vo(e)})}addBlob(t,e,n={}){return Il(this,t,{data:e,Reader:Po,Writer:Zo,options:n,uncompressedSize:e.size})}addData64URI(t,e,n={}){return Il(this,t,{data:e,Reader:Mo,Writer:Lo,options:n,uncompressedSize:Sl(e)})}addUint8Array(t,e,n={}){return Il(this,t,{data:e,Reader:fi,Writer:di,options:n,uncompressedSize:e.length})}addHttpContent(t,e,n={}){return Il(this,t,{data:e,Reader:class extends li{constructor(t){super(t,n)}},options:n})}addReadable(t,e,n={}){return Il(this,t,{Reader:il(e),options:n})}addFileSystemEntry(t,e={}){return xl(this,t,e)}addFileSystemHandle(t,e={}){return xl(this,t,e)}addFile(t,e={}){return(e=n.assign({},e)).lastModDate||(e.lastModDate=new s(t.lastModified)),Il(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 Po(t),e)}importData64URI(t,e){return this.importZip(new Mo(t),e)}importUint8Array(t,e){return this.importZip(new fi(t),e)}importHttpContent(t,e){return this.importZip(new li(t,e),e)}importReadable(t,e){return this.importZip({readable:t},e)}exportBlob(t={}){return this.exportZip(new Zo(t.mimeType||"application/zip"),t)}exportData64URI(t={}){return this.exportZip(new Lo(t.mimeType||"application/zip"),t)}exportUint8Array(t={}){return this.exportZip(new di,t)}async exportWritable(t=new D,e={}){return await this.exportZip({writable:t},e),t}exportFileSystemHandle(t,e={}){return async function(t,e,r){const{onstart:o,onprogress:i,onend:a}=r;gl(r.passThrough),pl(r);const s=wl(r.readerOptions),c=new AbortController,{signal:u}=c,l=function(t,e){if(!ee(t))return()=>{};if(t.aborted)return e.abort(t.reason),()=>{};const n=()=>e.abort(t.reason);return t.addEventListener("abort",n,{once:!0}),()=>t.removeEventListener("abort",n)}(r.signal,c),f=n.assign({},r,s,{signal:u,onstart:dt,onprogress:dt,onend:dt,preventClose:!1}),w=nl([t],t=>ol(t,f.passThrough)),p=[];let h=!1,m=0;try{o&&await Pr(o,w),await E(t,e),a&&await Pr(a,m)}catch(t){try{t.exportedEntryNames=p}catch{}throw t}finally{l()}return e;function y(t){const e=t.getWriter();return new D({async write(t){await e.write(t),m+=t.length,i&&await Pr(i,m,w)},close:()=>e.close(),abort:t=>e.abort(t)})}async function E(t,e){if(r.concurrent){const n=(await g.allSettled(t.children.map(t=>S(t,e)))).filter(t=>"rejected"==t.status);if(n.length){const t=n.filter(t=>!ll(t.reason));throw function(t){const[e]=t,n=t.slice(1).flatMap(t=>[t,...t&&t.entryErrors||[]]).filter(t=>t!==e);if(n.length)try{e.entryErrors=[...e.entryErrors||[],...n]}catch{}return e}((t.length?t:n).map(t=>t.reason))}}else for(const n of t.children)await S(n,e)}async function S(e,n){if(u.aborted){if(h||ll(u.reason))return;ne(u)}try{if(e.directory){const t=await n.getDirectoryHandle(e.name,{create:!0});await E(e,t)}else{const r=await n.getFileHandle(e.name,{create:!0}),o=await r.createWritable();try{await e.getData({writable:y(o)},f)}catch(t){throw h?new d(Yu):t}p.push(e.getRelativeName(t))}}catch(n){h=!0,c.abort(new d(Yu));try{n.entryName===dt&&(n.entryName=e.getRelativeName(t),n.entryId=e.id)}catch{}throw n}}}(this,t,e)}async importZip(t,e={}){let r;t&&typeof t.getEntries==gt?(r=t,e=n.assign({},r.options,e)):(await gi(t),r=new qa(t,e)),gl(e.passThrough),pl(e);const o=function(t){if(t===dt)return Wu;if(Hu.has(t))return t;throw new d(Nu)}(e.duplicates),i=[],a={Ye:[]},s=await r.getEntries(e);for(const t of s){let r=this;try{const s=t.filename.split("/").filter(t=>""!=t&&"."!=t),c=s.pop();let u=!1;for(const t of s){const e=r;if(r=r.getChildByName(t),r){if(!r.directory){if(o==Pu){u=!0;break}if(o!=Zu)throw new d(_u);this.fs.remove(r),r=new Qu(this.fs,t,{data:null},e),i.push(r)}}else r=new Qu(this.fs,t,{data:null},e),i.push(r)}if(u)continue;if(t.directory){let e=r;if(c){if(e=r.getChildByName(c),e&&(!e.directory||e.data)){if(o==Pu)continue;if(o!=Zu)throw new d(_u);e.directory?e.data=t:(this.fs.remove(e),e=dt)}e||(e=new Qu(this.fs,c,{data:null},r),i.push(e))}e==this||e.data||(e.data=t)}else{const s=r.getChildByName(c);if(s){if(o==Pu)continue;if(o!=Zu)throw new d(_u);this.fs.remove(s)}i.push(Il(r,c,{data:t,Reader:al(n.assign({},e),a),uncompressedSize:e.passThrough?t.compressedSize:t.uncompressedSize,passThrough:e.passThrough}))}}catch(e){i.reverse().forEach(t=>this.fs.remove(t));try{e.cause={entry:t}}catch{}throw e}}return i}async exportZip(t,e={}){const r=this,o=Boolean(t)&&typeof t.add==gt;e=n.assign({},e),o||e.bufferedWrite!==dt||(e.bufferedWrite=!0);const[i]=await g.all([cl(r,wl(e.readerOptions)),o?dt:gi(t)]),a=o?t:new Ic(t,e);return await async function(t,e,r,o,i){const{onstart:a,onprogress:s,onend:c,onentryprogress:u}=o,l=e,f=nl(e.children,t=>Rl(t)?0:1);let d=0,w=0;if(a&&await Pr(a,r),o.bufferedWrite)await async function t(e){const n=(await g.allSettled(e.children.map(async e=>{await p(e),await t(e)}))).find(t=>"rejected"==t.status);if(n)throw n.reason}(e);else for(const t of e.getChildren({recursive:!0}))await p(t);async function p(e){if(Rl(e))return;const{name:a,Pt:c}=fl(e,l,o);let p=0;const h=await t.add(a,i.get(e),n.assign(c,{onstart:dt,onend:dt,onprogress:async t=>{d+=t-p,p=t,s&&await Pr(s,d,r)}}));w++,u&&await Pr(u,w,f,h)}c&&await Pr(c,d)}(a,r,nl([r],rl),e,i),o?a:(await a.close(e.globalComment),t.getData?t.getData():t.writable)}async getExportedSize(t={}){const e=this;wl((t=n.assign({},t)).readerOptions),t.bufferedWrite===dt&&(t.bufferedWrite=!0);const r=e.getChildren({recursive:!0}),o=r.filter(t=>!Rl(t)).map(n=>{const{name:r,Pt:o}=fl(n,e,t);return{name:r,size:n.directory?0:dl(n,bl(n,t)),options:o}}),i=!t.bufferedWrite||o.every(t=>!1!==t.options.keepOrder)&&r.every(t=>Rl(t)||!t.children.length);return await async function(t,e,r,o){const i={options:t};if(Qt(t[Bt]))throw new d(ic);if(o!==dt&&!(o instanceof w))throw new d(Ms);const s=bu(o);if(s>M)throw new d(Os);const l=t[Ot],f=new c,p=t[Ut]===dt?0:t[Ut];let h=p,m=wt;const y=[],g=new u;for(const t of e){let{name:e}=t;const{size:r}=t,o=n.assign({},t.options);uu(i,o,qi)&&!e.endsWith(ct)&&(e+=ct);const s=Mc(i,e,o);({name:e}=s);const{Ht:c}=Lc(i,e,o);0==c.level||c.compressionMethod!==dt||c.Gt||await Or(be())||(c.level=0);const u=!uu(i,o,qi);if(u&&r===dt)throw new d(ic);const{Pe:w,Ht:p}=Wc(i,u,r,c,o);if(u&&!c.Gt&&pu(p.compressionMethod,p.level))throw new d(ic);const E=n.assign({},o,s.Ht,c,p,{[Ot]:l}),S=Zc(E),b=Gc(E),R={$t:S,ne:bu(S.Yt,b.Kt)};l&&Hc(R,h);const x=u?w:0;f.set(e,n.assign({},E,S,{offset:h,diskNumberStart:0,compressedSize:x}));const z=R.ne+x;y.push(z),g.add(Boolean(E.pe||E.uncompressedSize>=O||x>=O)),m=a.min(m,z),h+=z}if(f.size>1&&(l||h-m>=O&&(g.size>1||Pc(y,p,!0)!=Pc(y,p,!1)))&&!r)throw new d(ic);const{Fe:E,De:S}=jc(f);let b=uu(i,t,Zi);if(h>=O||E>=O||f.size>=M){if(!1===b)throw new d(ec);b=!0}else b===dt&&S&&(b=!0);return h-p+E+s+(b?98:Y)}(t,o,i,t.globalComment)}getChildByName(t){const e=this.children;for(let n=0;n<e.length;n++){const r=e[n];if(r.name==t)return r}}getChildren(t={}){return function(t,e){const n=[],r=[t];let o=0;for(;o<r.length;)for(const t of r[o++].children)n.push(t),e&&r.push(t);return n}(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 n=this.children;return!(await g.all(n.map(n=>n.checkPassword(t,e)))).includes(!1)}}class tl{constructor(){Fl(this)}get children(){return this.root.children}remove(t){ul(t);const e=[t];for(;e.length;){const t=e.pop();this.entries[t.id]=null;for(const n of t.children)e.push(n)}t.parent=dt}move(t,e){if(t==this.root)throw new d(Ou);if(!e.directory)throw new d(Mu);if(e.isDescendantOf(t))throw new d(Uu);if(t!=e){const n=e.getChildByName(t.name);if(n){if(n!=t)throw new d(vu)}else ul(t),t.parent=e,e.children.push(t),Al(this,t)}}find(t){const e=t.split("/");let n=this.root;for(let t=0;n&&t<e.length;t++)n=n.directory?n.getChildByName(e[t]):dt;return n||(n=this.entries.find(e=>e&&(e==this.root||e.isDescendantOf(this.root))&&e.getRelativeName()==t)),n}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,n){return this.root.addText(t,e,n)}addBlob(t,e,n){return this.root.addBlob(t,e,n)}addData64URI(t,e,n){return this.root.addData64URI(t,e,n)}addUint8Array(t,e,n){return this.root.addUint8Array(t,e,n)}addHttpContent(t,e,n){return this.root.addHttpContent(t,e,n)}addReadable(t,e,n){return this.root.addReadable(t,e,n)}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 Dl(this,n=>n.importBlob(t,e))}importData64URI(t,e){return Dl(this,n=>n.importData64URI(t,e))}importUint8Array(t,e){return Dl(this,n=>n.importUint8Array(t,e))}importHttpContent(t,e){return Dl(this,n=>n.importHttpContent(t,e))}importReadable(t,e){return Dl(this,n=>n.importReadable(t,e))}importZip(t,e){return Dl(this,n=>n.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 el={FS:tl,ZipDirectoryEntry:Qu,ZipFileEntry:Ju};function nl(t,n){let r=0;const o=e.from(t);for(;o.length;){const t=o.pop();r+=n(t)||0;for(const e of t.children)o.push(e)}return r}function rl(t){return t.uncompressedSize}function ol(t,e){const{data:n}=t;return e&&n instanceof ra?n.compressedSize:t.uncompressedSize}function il(t){let e;return function(){if(e)throw new d(Bu);return e=!0,{readable:t}}}function al(t,e){return class extends Uo{constructor(t,e={}){super(),this.entry=t,this.options=e}async init(){const r=this,o=n.assign({},t,r.options),{checkOverlappingEntry:i,checkOverlappingEntryOnly:a}=o,s=await async function(t,e,r){pl(e);const{passwords:o,requestPassword:i,signal:a}=e;if(delete(e=n.assign({},e)).passwords,delete e.requestPassword,!t.encrypted||e.passThrough||!o&&!i)return t.getData(new Zo,e);const s=new u;let c;for(;;){for(const t of ml(e,r,o))if(!s.has(t.key)){const e=await f(t);if(e.done)return e.data;c=e.error}if(!i)break;if(r.Ke){await r.Ke;continue}let n;r.Ke=new g(t=>n=t);try{const e=await i(t,c);if(e===dt||null===e)break;if(typeof e!=St)throw new d(qu);const n=await f(yl(e));if(n.done)return n.data;c=n.error}finally{r.Ke=dt,n()}}if(!s.size)throw new d(la);const l=new d(an);throw l.cause=c,l;async function f(o){s.add(o.key);const i=n.assign({},e,o.options);if(t.zipCrypto){i.checkCrc32=!0;try{await t.getData(null,n.assign({},i,{checkPasswordOnly:!0}))}catch(t){if(hl(t))return{done:!1,error:t};throw t}}try{const e=await t.getData(new Zo,i);return function(t,e){const{Ye:n}=t,r=n.findIndex(t=>t.key===e.key);-1!=r&&n.splice(r,1),n.unshift(e)}(r,o),{done:!0,data:e}}catch(e){if(function(t,e){return Boolean(e&&e.aborted)||Te(t)&&"AbortError"==t.name}(e,a)||!function(t,e){return hl(t)||e.zipCrypto&&Te(t)&&Xu.has(t.message)}(e,t))throw e;return{done:!1,error:e}}}}(r.entry,n.assign(o,{checkPasswordOnly:!1,checkOverlappingEntry:a||i,checkOverlappingEntryOnly:!1,preventClose:!1}),e);r.data=s,r.Xe=new Po(s),r.size=s.size,super.init()}readUint8Array(t,e){return this.Xe.readUint8Array(t,e)}}}function sl(t,e,n){return t.prototype?new t(e,n):t(e,n)}async function cl(t,e){const n=[],r=[t],o=new c;for(;r.length;){const t=r.pop();for(const e of t.children)e.directory?r.push(e):n.push(e)}return await g.all(n.map(async n=>{const r=n.reader=sl(n.Reader,n.data,e);o.set(n,r);try{await gi(r)}catch(e){try{e.entry=n,e.entryId=n.id,e.entryName=n.getRelativeName(t)}catch{}throw e}r.size!==dt&&(n.uncompressedSize=r.size,n.je=!1)})),o}function ul(t){if(t.parent){const e=t.parent.children;e.forEach((n,r)=>{n.id==t.id&&e.splice(r,1)})}}function ll(t){return Boolean(t)&&t.message==Yu}function fl(t,e,r){const o=r.relativePath?t.getRelativeName(e):t.getFullname(),i=t.options||{};let a={},s={};if(t.data instanceof ra){const e=bl(t,r),n=i.lastModDate===dt?r.lastModDate:i.lastModDate;({Pt:a,Zt:s}=Oc(t.data,e,n)),e&&(s.passThrough=!0)}const c=n.assign({lastModDate:t.qe},a,r,i,s,{directory:t.directory});if(!t.directory&&c.passThrough&&c.uncompressedSize===dt)throw new d(Vu);return{name:o,Pt:c}}function dl(t,e){const{reader:n}=t;return n&&n.size!==dt?n.size:t.je?dt:ol(t,e)}function wl(t){return te(t),t&&(gl(t.passThrough),pl(t)),t}function pl(t){const{passwords:n,requestPassword:r}=t;if(n&&(!e.isArray(n)||n.some(t=>typeof t!=St)))throw new d(ju);if(r&&typeof r!=gt)throw new d(qu)}function hl(t){return Te(t)&&t.message==an}function ml(t,e,n){const r=[],{password:o,rawPassword:i}=t;return i&&i.length&&r.push({key:i,options:{password:"",rawPassword:i}}),o&&r.push(yl(o)),r.push(...e.Ye),n&&r.push(...n.filter(t=>t).map(yl)),r}function yl(t){return{key:t,options:{password:t,rawPassword:Ku}}}function gl(t){if(oe(t)===jt)throw new d(Gu)}function El(t,e){const{uncompressedSize:r}=e;n.assign(t,e,{reader:null,passThrough:dt,uncompressedSize:r===dt?0:r,je:r===dt})}function Sl(t){let e=t.length;for(;"="==t.charAt(e-1);)e--;const n=t.indexOf(",")+1;return a.floor(.75*(e-n))}function bl(t,e){const{readerOptions:n}=e;return Boolean(!t.directory&&(t.passThrough||n&&n.passThrough))}function Rl(t){return t.directory&&null===t.data}function xl(t,e,r){return async function t(e,o,i,a=""){if(o){const c=a?a+"/"+o.name:o.name;try{if((o.isFile||o.isDirectory)&&(o=await zl(o)),"file"==o.kind){const t=await o.getFile();i.push(Il(e,t.name,{Reader:function(){return{readable:t.stream(),size:t.size}},options:n.assign({},{lastModDate:new s(t.lastModified)},r),uncompressedSize:t.size}))}else if("directory"==o.kind){const n=e.addDirectory(o.name,r);i.push(n);for await(const e of o.values())await t(n,e,i,c)}}catch(t){try{t.entryName===dt&&(t.entryName=c)}catch{}throw t}}return i}(t,e,[])}async function zl(t){const e={name:t.name};if(t.isFile&&(e.kind="file",e.getFile=()=>new g((e,n)=>t.file(e,n))),t.isDirectory){e.kind="directory";const n=await async function(t){const e=[];function n(t,r,o){t.readEntries(async i=>{if(i.length){for(const t of i)e.push(await zl(t));n(t,r,o)}else r(e)},o)}return await new g((e,r)=>n(t.createReader(),e,r)),{[k.iterator](){let t=0;return{next(){const n={value:e[t],done:t==e.length};return t++,n}}}}}(t);e.values=()=>n}return e}function Fl(t){t.entries=[],t.Ge=0,t.root=new Qu(t)}function Dl(t,e){const{entries:r,Ge:o,root:i}=t;return Fl(t),e(t.root).catch(e=>{throw n.assign(t,{entries:r,Ge:o,root:i}),e})}function Al(t,e){const n=[e];for(;n.length;){const e=n.pop();t.entries[e.id]=e;for(const t of e.children)n.push(t)}}function Il(t,e,n,r){if(t.directory){const o=Cl(e);return o&&(e=o.pop(),t=Tl(t,o)),r?new Qu(t.fs,e,n,t):new Ju(t.fs,e,n,t)}throw new d(Lu)}function Cl(t){if(t.includes("/")){const e=t.split("/").filter(t=>""!=t&&"."!=t);if(e.length)return e}}function Tl(t,e,n){return e.forEach(e=>{const r=t;if(t=t.getChildByName(e)){if(!t.directory)throw new d(vu);if(n&&(t==n||t.isDescendantOf(n)))throw new d(Uu)}else t=new Qu(r.fs,e,{data:null},r)}),t}t.BlobReader=Po,t.BlobWriter=Zo,t.Data64URIReader=Mo,t.Data64URIWriter=Lo,t.ERR_ABORTED=Jt,t.ERR_AMBIGUOUS_ARCHIVE=pa,t.ERR_ANCESTOR_ENTRY=Uu,t.ERR_BAD_FORMAT=aa,t.ERR_CENTRAL_DIRECTORY_NOT_FOUND=ua,t.ERR_CODEC_OUT_OF_MEMORY=er,t.ERR_DUPLICATED_NAME=Us,t.ERR_DUPLICATE_IMPORTED_ENTRY=_u,t.ERR_ENCRYPTED=la,t.ERR_ENCRYPTED_CENTRAL_DIRECTORY=ha,t.ERR_ENTRY_DATA_OUT_OF_BOUNDS=wa,t.ERR_ENTRY_EXISTS=vu,t.ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND=ca,t.ERR_EOCDR_NOT_FOUND=sa,t.ERR_EXTRAFIELD_ZIP64_NOT_FOUND=mt,t.ERR_HTTP_RANGE=Ro,t.ERR_HTTP_RESOURCE_CHANGED=xo,t.ERR_HTTP_STATUS=bo,t.ERR_INVALID_AUTHENTICATION_CODE=sn,t.ERR_INVALID_BASE_URI=le,t.ERR_INVALID_CODEC_DEFINITION=Zn,t.ERR_INVALID_CODEC_MODULE=Vn,t.ERR_INVALID_COMMENT=Os,t.ERR_INVALID_COMMENT_TYPE=Ms,t.ERR_INVALID_COMPRESSED_DATA=tr,t.ERR_INVALID_CRC32=nr,t.ERR_INVALID_DATE=Ws,t.ERR_INVALID_DUPLICATES=Nu,t.ERR_INVALID_ENCRYPTION_STRENGTH=Hs,t.ERR_INVALID_ENTRY=gc,t.ERR_INVALID_ENTRY_COMMENT=Ls,t.ERR_INVALID_ENTRY_COMMENT_TYPE=Bs,t.ERR_INVALID_ENTRY_NAME=Ps,t.ERR_INVALID_EXTRAFIELD=qs,t.ERR_INVALID_EXTRAFIELD_DATA=Xs,t.ERR_INVALID_EXTRAFIELD_DATA_TYPE=Ks,t.ERR_INVALID_EXTRAFIELD_TYPE=Ys,t.ERR_INVALID_FILENAME_VALIDATION=ga,t.ERR_INVALID_FUNCTION_OPTION=qt,t.ERR_INVALID_GID=lc,t.ERR_INVALID_LEVEL=mc,t.ERR_INVALID_MAX_APPENDED_DATA_SIZE=Ea,t.ERR_INVALID_MAX_WORKERS=ue,t.ERR_INVALID_MSDOS_ATTRIBUTES=pc,t.ERR_INVALID_MSDOS_DATA=hc,t.ERR_INVALID_PASSWORD=an,t.ERR_INVALID_PASSWORDS=ju,t.ERR_INVALID_PASSWORD_TYPE=Kt,t.ERR_INVALID_PASS_THROUGH=Vu,t.ERR_INVALID_PASS_THROUGH_VALUE=Xt,t.ERR_INVALID_READER=sc,t.ERR_INVALID_READER_OPTIONS=$t,t.ERR_INVALID_REQUEST_PASSWORD=qu,t.ERR_INVALID_SIGNAL=Yt,t.ERR_INVALID_SIGNATURE_DATA=yc,t.ERR_INVALID_STRICTNESS=ya,t.ERR_INVALID_UID=uc,t.ERR_INVALID_UNCOMPRESSED_SIZE=Qn,t.ERR_INVALID_UNIX_EXTRA_FIELD_TYPE=dc,t.ERR_INVALID_UNIX_ID_SIZE=wc,t.ERR_INVALID_UNIX_MODE=fc,t.ERR_INVALID_URI=fe,t.ERR_INVALID_VERSION=Zs,t.ERR_ITERATOR_COMPLETED_TOO_SOON=zo,t.ERR_LOCAL_FILE_HEADER_NOT_FOUND=pt,t.ERR_OVERLAPPING_ENTRY=ht,t.ERR_PARENT_NOT_DIRECTORY=Lu,t.ERR_READABLE_CONSUMED=Bu,t.ERR_RESERVED_COMPRESSION_METHOD=Hn,t.ERR_ROOT_DIRECTORY_NOT_MOVABLE=Ou,t.ERR_SPLIT_ZIP_FILE=da,t.ERR_TARGET_NOT_DIRECTORY=Mu,t.ERR_UNDEFINED_COMPRESSION_METHOD=rc,t.ERR_UNDEFINED_CRC32=oc,t.ERR_UNDEFINED_READER=ac,t.ERR_UNDEFINED_UNCOMPRESSED_SIZE=nc,t.ERR_UNDETERMINED_SIZE=ic,t.ERR_UNSAFE_FILENAME=ma,t.ERR_UNSUPPORTED_COMPRESSION=Gn,t.ERR_UNSUPPORTED_CONTEXT=ku,t.ERR_UNSUPPORTED_CRYPTO_API=un,t.ERR_UNSUPPORTED_ENCRYPTION=fa,t.ERR_UNSUPPORTED_ENCRYPTION_PASS_THROUGH=js,t.ERR_UNSUPPORTED_ENCRYPTION_USDZ=Vs,t.ERR_UNSUPPORTED_FORMAT=ec,t.ERR_UNSUPPORTED_PASS_THROUGH_VALUE=Gu,t.ERR_UNSUPPORTED_SPLIT_USDZ=Gs,t.ERR_UNSUPPORTED_UINT64=Sa,t.ERR_WORKER_STARTUP_TIMEOUT=kr,t.ERR_WRITER_NOT_INITIALIZED=Fo,t.ERR_WRITER_SIZE_NOT_WRITABLE=Do,t.ERR_ZIP_CRYPTO_LAST_MOD_DATE=Ec,t.ERR_ZIP_NOT_EMPTY=cc,t.HttpRangeReader=class extends li{constructor(t,e={}){super(t,n.assign({},e,{useRangeHeader:!0}))}},t.HttpReader=li,t.Reader=Uo,t.SplitDataReader=wi,t.SplitDataWriter=pi,t.TextReader=Ho,t.TextWriter=Go,t.Uint8ArrayReader=fi,t.Uint8ArrayWriter=di,t.VERSION="2.22.0",t.WARNING_APPENDED_DATA=Aa,t.WARNING_CLAMPED_LAST_MODIFICATION_DATE=bc,t.WARNING_COMPRESSED_PATCHED_DATA=xa,t.WARNING_COMPRESSION_UNAVAILABLE=Sc,t.WARNING_DUPLICATE_FILENAME=_a,t.WARNING_MALFORMED_EXTRA_FIELD=za,t.WARNING_MISMATCHED_CENTRAL_DIRECTORY_OFFSET=ka,t.WARNING_MISMATCHED_LOCAL_FILE_HEADER_BIT_FLAG=Ma,t.WARNING_MISMATCHED_LOCAL_FILE_HEADER_COMPRESSION_METHOD=La,t.WARNING_MISMATCHED_LOCAL_FILE_HEADER_CRC32_OR_SIZES=Ba,t.WARNING_MISMATCHED_LOCAL_FILE_HEADER_FILENAME=Oa,t.WARNING_MISMATCHED_ZIP64_END_OF_CENTRAL_DIRECTORY=Na,t.WARNING_MISSING_ZIP64_EXTRA_FIELD=va,t.WARNING_MULTIPLE_END_OF_CENTRAL_DIRECTORY=Ua,t.WARNING_PREPENDED_CENTRAL_DIRECTORY=Ca,t.WARNING_PREPENDED_DATA=Ia,t.WARNING_TRAILING_CENTRAL_DIRECTORY_DATA=Ta,t.WARNING_UNKNOWN_VERSION=Ra,t.WARNING_UNKNOWN_ZIP64_EXTENSIBLE_DATA=Fa,t.WARNING_UNSORTED_CENTRAL_DIRECTORY=ba,t.WARNING_WRAPPED_ENTRIES_COUNT=Da,t.Writer=Oo,t.ZipDirectoryEntry=Qu,t.ZipEntry=$u,t.ZipFS=tl,t.ZipFileEntry=Ju,t.ZipReader=qa,t.ZipReaderStream=Ya,t.ZipWriter=Ic,t.ZipWriterStream=class{constructor(t={}){const{readable:e,writable:n}=new z;this.readable=e,this.zipWriter=new Ic(n,t),this.Ut=new u}transform(t){const e=this.zipWriter;let n;const{readable:r,writable:o}=new z({start(t){n=t},flush:()=>{!async function(){try{await e.close()}catch(t){await Nc(e,t)}}()}});return Uc(this,this.zipWriter.add(t,r),t=>n.error(t)),{readable:this.readable,writable:o}}writable(t){let e;const{readable:n,writable:r}=new z({start(t){e=t}});return Uc(this,this.zipWriter.add(t,n),t=>e.error(t)),r}async close(t,n={}){const{zipWriter:r}=this,o=(await g.allSettled(e.from(this.Ut))).filter(t=>"rejected"==t.status).map(t=>t.reason);if(o.length){const[t]=o;try{t.entryErrors=o}catch{}throw await Nc(r,t),t}try{return await r.close(t,n)}catch(t){throw await Nc(r,t),t}}},t.configure=function(t){n.assign(Se,ze(De(t)))},t.createBlobTempStream=function(t={}){const{thresholdBytes:e=Iu}=t;return function(){const t=[];let n,r,o,i=0,a=!1;const s=new D({async write(o){a?await n.write(o):(t.push(o),i+=o.length,i>e&&await async function(){const e=new z;r=Wn(e.readable),n=e.writable.getWriter(),a=!0;for(const e of t)await n.write(e);t.length=0}())},async close(){n&&(await n.close(),n=null)}});let c=0;return{writable:s,readable:new F({async pull(e){if(a){if(!o){const t=await r;o=t.stream().getReader()}const{value:t,done:n}=await o.read();n?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(n){try{await n.abort()}catch{}n=null}r&&(r.catch(()=>{}),r=null),t.length=0}}}},t.createOPFSTempStream=function(t={}){const{thresholdBytes:n=Du,directoryName:r=Au,getDirectory:o=()=>C.storage.getDirectory()}=t;let i;function a(){return i||(i=g.resolve(o()).then(t=>t.getDirectoryHandle(r,{create:!0}))),i}return function(){const t=[];let r,o,i,s,c=0,u=!1;const l=new D({async write(s){u?await i.write(s):(t.push(s),c+=s.length,c>n&&await async function(){const n=await a();r=R.randomUUID?R.randomUUID():e.from(R.getRandomValues(new w(16)),t=>t.toString(16).padStart(2,"0")).join(""),o=await n.getFileHandle(r,{create:!0}),i=(await o.createWritable()).getWriter(),u=!0;for(const e of t)await i.write(e);t.length=0}())},async close(){i&&(await i.close(),i=null)}});let f=0;return{writable:l,readable:new F({async pull(e){if(u){if(!s){const t=await o.getFile();s=t.stream().getReader()}const{value:t,done:n}=await s.read();n?e.close():e.enqueue(t)}else f<t.length?e.enqueue(t[f++]):e.close()},async cancel(t){s&&await s.cancel(t)}},{highWaterMark:0}),dispose:async function(){if(i){try{await i.close()}catch{}i=null}if(r){try{const t=await a();await t.removeEntry(r)}catch{}o=r=null}t.length=0}}}},t.createSyncAccessHandleTempStream=function(t={}){const{thresholdBytes:n=Cu,directoryName:r=Tu,getDirectory:o}=t;if(!(o||"undefined"!=typeof FileSystemFileHandle&&FileSystemFileHandle.prototype.createSyncAccessHandle))throw new d(ku);const i=o||(()=>C.storage.getDirectory());let s;function c(){return s||(s=g.resolve(i()).then(t=>t.getDirectoryHandle(r,{create:!0}))),s}return function(){const t=[];let r,o,i=0,s=!1,u=0,l=0;const f=new D({async write(a){s?(o.write(a,{at:u}),u+=a.length):(t.push(a),i+=a.length,i>n&&await async function(){const n=await c();r=R.randomUUID?R.randomUUID():e.from(R.getRandomValues(new w(16)),t=>t.toString(16).padStart(2,"0")).join("");const i=await n.getFileHandle(r,{create:!0});o=await i.createSyncAccessHandle(),s=!0;for(const e of t)o.write(e,{at:u}),u+=e.length;t.length=0}())},close(){o&&o.flush()}});let d=0;return{writable:f,readable:new F({pull(e){if(s){const t=u-l;if(t<=0)return void e.close();const n=new w(a.min(524288,t)),r=o.read(n,{at:l});r?(l+=r,e.enqueue(n.subarray(0,r))):e.close()}else d<t.length?e.enqueue(t[d++]):e.close()}},{highWaterMark:0}),dispose:async function(){if(o){try{o.close()}catch{}o=null}if(r){try{const t=await c();await t.removeEntry(r)}catch{}r=null}t.length=0}}}},t.fs=el,t.getMimeType=function(){return"application/octet-stream"},t.getRegisteredCodecs=Xn,t.getSupportedCompressionMethods=function(){const{CompressionStream:t,DecompressionStream:e,CompressionStreamFallback:n,DecompressionStreamFallback:r}=be(),o=[{compressionMethod:0,compression:!0,decompression:!0,registered:!1},{compressionMethod:8,compression:Fu(n,rr)||Fu(t,rr)||Fu(t,ir),decompression:Fu(r,rr)||Fu(e,rr)||Fu(e,ir),registered:!1},{compressionMethod:9,compression:!1,decompression:Fu(r,or)||Fu(e,or),registered:!1}];for(const t of Xn()){const e=$n(t.format);o.push({compressionMethod:t.compressionMethod,compression:e?typeof e.CompressionStream==gt:dt,decompression:e?typeof e.DecompressionStream==gt:dt,registered:!0})}return o},t.isZipFile=Ka,t.registerCodec=function(t={}){const{compressionMethod:e,format:n,codecURI:r,CompressionStream:i,DecompressionStream:a,versionNeeded:s}=t;if(!o.isInteger(e)||e<0||e>M||typeof n!=St||!n.length)throw new d(Zn);if(jn.includes(e))throw new d(Hn);const c=typeof i==gt||typeof a==gt;if(!(c||typeof r==St&&r.length))throw new d(Zn);qn.set(e,{compressionMethod:e,format:n,codecURI:r,versionNeeded:s}),c&&Jn(n,{CompressionStream:i,DecompressionStream:a})},t.resetConfiguration=function(){for(const t of Ee)delete Se[t];n.assign(Se,we)},t.terminateWorkers=async function(){await g.allSettled([wo(),...ro.map(t=>(mo(t),t.terminate()))]),vr=dt,_r=!1},t.unregisterCodec=function(t){const e=qn.get(t);if(e){let n;qn.delete(t),qn.forEach(t=>n=n||t.format==e.format),n||Yn.delete(e.format)}}});