zip.min.js 86 KB

1
  1. ((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,BigInt:i,Math:s,Date:a,Map:o,URL:c,Error:l,Uint8Array:f,Uint16Array:d,Uint32Array:u,DataView:h,Blob:p,Promise:w,TextEncoder:g,TextDecoder:y,FileReader:m,document:b,crypto:k,btoa:v}=globalThis,S={chunkSize:524288,maxWorkers:"undefined"!=typeof navigator&&navigator.hardwareConcurrency||2,terminateWorkerTimeout:5e3,useWebWorkers:!0,workerScripts:void 0},_=n.assign({},S);function A(){return _}function z(t){if(void 0!==t.baseURL&&(_.baseURL=t.baseURL),void 0!==t.chunkSize&&(_.chunkSize=t.chunkSize),void 0!==t.maxWorkers&&(_.maxWorkers=t.maxWorkers),void 0!==t.terminateWorkerTimeout&&(_.terminateWorkerTimeout=t.terminateWorkerTimeout),void 0!==t.useWebWorkers&&(_.useWebWorkers=t.useWebWorkers),void 0!==t.Deflate&&(_.Deflate=t.Deflate),void 0!==t.Inflate&&(_.Inflate=t.Inflate),void 0!==t.workerScripts){if(t.workerScripts.deflate){if(!e.isArray(t.workerScripts.deflate))throw new l("workerScripts.deflate must be an array");_.workerScripts||(_.workerScripts={}),_.workerScripts.deflate=t.workerScripts.deflate}if(t.workerScripts.inflate){if(!e.isArray(t.workerScripts.inflate))throw new l("workerScripts.inflate must be an array");_.workerScripts||(_.workerScripts={}),_.workerScripts.inflate=t.workerScripts.inflate}}}function R(t,e,r){return class{constructor(i){const s=this;s.codec=new t(n.assign({},e,i)),r(s.codec,(t=>{if(s.pendingData){const e=s.pendingData;s.pendingData=new f(e.length+t.length),s.pendingData.set(e,0),s.pendingData.set(t,e.length)}else s.pendingData=new f(t)}))}append(t){return this.codec.push(t),i(this)}flush(){return this.codec.push(new f(0),!0),i(this)}};function i(t){if(t.pendingData){const e=t.pendingData;return t.pendingData=null,e}return new f(0)}}const C=[];for(let t=0;256>t;t++){let e=t;for(let t=0;8>t;t++)1&e?e=e>>>1^3988292384:e>>>=1;C[t]=e}class E{constructor(t){this.crc=t||-1}append(t){let e=0|this.crc;for(let n=0,r=0|t.length;r>n;n++)e=e>>>8^C[255&(e^t[n])];this.crc=e}get(){return~this.crc}}function D(t){if(void 0===g){const e=new f((t=unescape(encodeURIComponent(t))).length);for(let n=0;n<e.length;n++)e[n]=t.charCodeAt(n);return e}return(new g).encode(t)}const F={concat(t,e){if(0===t.length||0===e.length)return t.concat(e);const n=t[t.length-1],r=F.getPartial(n);return 32===r?t.concat(e):F._shiftRight(e,r,0|n,t.slice(0,t.length-1))},bitLength(t){const e=t.length;if(0===e)return 0;const n=t[e-1];return 32*(e-1)+F.getPartial(n)},clamp(t,e){if(32*t.length<e)return t;const n=(t=t.slice(0,s.ceil(e/32))).length;return e&=31,n>0&&e&&(t[n-1]=F.partial(e,t[n-1]&2147483648>>e-1,1)),t},partial:(t,e,n)=>32===t?e:(n?0|e:e<<32-t)+1099511627776*t,getPartial:t=>s.round(t/1099511627776)||32,_shiftRight(t,e,n,r){for(void 0===r&&(r=[]);e>=32;e-=32)r.push(n),n=0;if(0===e)return r.concat(t);for(let i=0;i<t.length;i++)r.push(n|t[i]>>>e),n=t[i]<<32-e;const i=t.length?t[t.length-1]:0,s=F.getPartial(i);return r.push(F.partial(e+s&31,e+s>32?n:r.pop(),1)),r}},x={bytes:{fromBits(t){const e=F.bitLength(t)/8,n=new f(e);let r;for(let i=0;e>i;i++)0==(3&i)&&(r=t[i/4]),n[i]=r>>>24,r<<=8;return n},toBits(t){const e=[];let n,r=0;for(n=0;n<t.length;n++)r=r<<8|t[n],3==(3&n)&&(e.push(r),r=0);return 3&n&&e.push(F.partial(8*(3&n),r)),e}}},T={sha1:function(t){t?(this._h=t._h.slice(0),this._buffer=t._buffer.slice(0),this._length=t._length):this.reset()}};T.sha1.prototype={blockSize:512,reset:function(){const t=this;return t._h=this._init.slice(0),t._buffer=[],t._length=0,t},update:function(t){const e=this;"string"==typeof t&&(t=x.utf8String.toBits(t));const n=e._buffer=F.concat(e._buffer,t),r=e._length,i=e._length=r+F.bitLength(t);if(i>9007199254740991)throw new l("Cannot hash more than 2^53 - 1 bits");const s=new u(n);let a=0;for(let t=e.blockSize+r-(e.blockSize+r&e.blockSize-1);i>=t;t+=e.blockSize)e._block(s.subarray(16*a,16*(a+1))),a+=1;return n.splice(0,16*a),e},finalize:function(){const t=this;let e=t._buffer;const n=t._h;e=F.concat(e,[F.partial(1,1)]);for(let t=e.length+2;15&t;t++)e.push(0);for(e.push(s.floor(t._length/4294967296)),e.push(0|t._length);e.length;)t._block(e.splice(0,16));return t.reset(),n},_init:[1732584193,4023233417,2562383102,271733878,3285377520],_key:[1518500249,1859775393,2400959708,3395469782],_f:(t,e,n,r)=>t>19?t>39?t>59?t>79?void 0:e^n^r:e&n|e&r|n&r:e^n^r:e&n|~e&r,_S:(t,e)=>e<<t|e>>>32-t,_block:function(t){const n=this,r=n._h,i=e(80);for(let e=0;16>e;e++)i[e]=t[e];let a=r[0],o=r[1],c=r[2],l=r[3],f=r[4];for(let t=0;79>=t;t++){16>t||(i[t]=n._S(1,i[t-3]^i[t-8]^i[t-14]^i[t-16]));const e=n._S(5,a)+n._f(t,o,c,l)+f+i[t]+n._key[s.floor(t/20)]|0;f=l,l=c,c=n._S(30,o),o=a,a=e}r[0]=r[0]+a|0,r[1]=r[1]+o|0,r[2]=r[2]+c|0,r[3]=r[3]+l|0,r[4]=r[4]+f|0}};const I={getRandomValues(t){const e=new u(t.buffer),n=t=>{let e=987654321;const n=4294967295;return()=>(e=36969*(65535&e)+(e>>16)&n,(((e<<16)+(t=18e3*(65535&t)+(t>>16)&n)&n)/4294967296+.5)*(s.random()>.5?1:-1))};for(let r,i=0;i<t.length;i+=4){const t=n(4294967296*(r||s.random()));r=987654071*t(),e[i/4]=4294967296*t()|0}return t}},U={importKey:t=>new U.hmacSha1(x.bytes.toBits(t)),pbkdf2(t,e,n,r){if(n=n||1e4,0>r||0>n)throw new l("invalid params to pbkdf2");const i=1+(r>>5)<<2;let s,a,o,c,f;const d=new ArrayBuffer(i),u=new h(d);let p=0;const w=F;for(e=x.bytes.toBits(e),f=1;(i||1)>p;f++){for(s=a=t.encrypt(w.concat(e,[f])),o=1;n>o;o++)for(a=t.encrypt(a),c=0;c<a.length;c++)s[c]^=a[c];for(o=0;(i||1)>p&&o<s.length;o++)u.setInt32(p,s[o]),p+=4}return d.slice(0,r/8)},hmacSha1:class{constructor(t){const e=this,n=e._hash=T.sha1,r=[[],[]],i=n.prototype.blockSize/32;e._baseHash=[new n,new n],t.length>i&&(t=n.hash(t));for(let e=0;i>e;e++)r[0][e]=909522486^t[e],r[1][e]=1549556828^t[e];e._baseHash[0].update(r[0]),e._baseHash[1].update(r[1]),e._resultHash=new n(e._baseHash[0])}reset(){const t=this;t._resultHash=new t._hash(t._baseHash[0]),t._updated=!1}update(t){this._updated=!0,this._resultHash.update(t)}digest(){const t=this,e=t._resultHash.finalize(),n=new t._hash(t._baseHash[1]).update(e).finalize();return t.reset(),n}encrypt(t){if(this._updated)throw new l("encrypt on already updated hmac called!");return this.update(t),this.digest(t)}}},B="Invalid pasword",W=16,V={name:"PBKDF2"},Q=n.assign({hash:{name:"HMAC"}},V),L=n.assign({iterations:1e3,hash:{name:"SHA-1"}},V),M=["deriveBits"],H=[8,12,16],N=[16,24,32],Z=10,O=[0,0,0,0],K=void 0!==k,P=K&&void 0!==k.subtle,q=x.bytes,X=class{constructor(t){const e=this;e._tables=[[[],[],[],[],[]],[[],[],[],[],[]]],e._tables[0][0][0]||e._precompute();const n=e._tables[0][4],r=e._tables[1],i=t.length;let s,a,o,c=1;if(4!==i&&6!==i&&8!==i)throw new l("invalid aes key size");for(e._key=[a=t.slice(0),o=[]],s=i;4*i+28>s;s++){let t=a[s-1];(s%i==0||8===i&&s%i==4)&&(t=n[t>>>24]<<24^n[t>>16&255]<<16^n[t>>8&255]<<8^n[255&t],s%i==0&&(t=t<<8^t>>>24^c<<24,c=c<<1^283*(c>>7))),a[s]=a[s-i]^t}for(let t=0;s;t++,s--){const e=a[3&t?s:s-4];o[t]=4>=s||4>t?e:r[0][n[e>>>24]]^r[1][n[e>>16&255]]^r[2][n[e>>8&255]]^r[3][n[255&e]]}}encrypt(t){return this._crypt(t,0)}decrypt(t){return this._crypt(t,1)}_precompute(){const t=this._tables[0],e=this._tables[1],n=t[4],r=e[4],i=[],s=[];let a,o,c,l;for(let t=0;256>t;t++)s[(i[t]=t<<1^283*(t>>7))^t]=t;for(let f=a=0;!n[f];f^=o||1,a=s[a]||1){let s=a^a<<1^a<<2^a<<3^a<<4;s=s>>8^255&s^99,n[f]=s,r[s]=f,l=i[c=i[o=i[f]]];let d=16843009*l^65537*c^257*o^16843008*f,u=257*i[s]^16843008*s;for(let n=0;4>n;n++)t[n][f]=u=u<<24^u>>>8,e[n][s]=d=d<<24^d>>>8}for(let n=0;5>n;n++)t[n]=t[n].slice(0),e[n]=e[n].slice(0)}_crypt(t,e){if(4!==t.length)throw new l("invalid aes block size");const n=this._key[e],r=n.length/4-2,i=[0,0,0,0],s=this._tables[e],a=s[0],o=s[1],c=s[2],f=s[3],d=s[4];let u,h,p,w=t[0]^n[0],g=t[e?3:1]^n[1],y=t[2]^n[2],m=t[e?1:3]^n[3],b=4;for(let t=0;r>t;t++)u=a[w>>>24]^o[g>>16&255]^c[y>>8&255]^f[255&m]^n[b],h=a[g>>>24]^o[y>>16&255]^c[m>>8&255]^f[255&w]^n[b+1],p=a[y>>>24]^o[m>>16&255]^c[w>>8&255]^f[255&g]^n[b+2],m=a[m>>>24]^o[w>>16&255]^c[g>>8&255]^f[255&y]^n[b+3],b+=4,w=u,g=h,y=p;for(let t=0;4>t;t++)i[e?3&-t:t]=d[w>>>24]<<24^d[g>>16&255]<<16^d[y>>8&255]<<8^d[255&m]^n[b++],u=w,w=g,g=y,y=m,m=u;return i}},Y=class{constructor(t,e){this._prf=t,this._initIv=e,this._iv=e}reset(){this._iv=this._initIv}update(t){return this.calculate(this._prf,t,this._iv)}incWord(t){if(255==(t>>24&255)){let e=t>>16&255,n=t>>8&255,r=255&t;255===e?(e=0,255===n?(n=0,255===r?r=0:++r):++n):++e,t=0,t+=e<<16,t+=n<<8,t+=r}else t+=1<<24;return t}incCounter(t){0===(t[0]=this.incWord(t[0]))&&(t[1]=this.incWord(t[1]))}calculate(t,e,n){let r;if(!(r=e.length))return[];const i=F.bitLength(e);for(let i=0;r>i;i+=4){this.incCounter(n);const r=t.encrypt(n);e[i]^=r[0],e[i+1]^=r[1],e[i+2]^=r[2],e[i+3]^=r[3]}return F.clamp(e,i)}},$=U.hmacSha1;class j{constructor(t,e,r){n.assign(this,{password:t,signed:e,strength:r-1,pendingInput:new f(0)})}async append(t){const n=this;if(n.password){const r=nt(t,0,H[n.strength]+2);await(async(t,e,n)=>{await tt(t,n,nt(e,0,H[t.strength]));const r=nt(e,H[t.strength]),i=t.keys.passwordVerification;if(i[0]!=r[0]||i[1]!=r[1])throw new l(B)})(n,r,n.password),n.password=null,n.aesCtrGladman=new Y(new X(n.keys.key),e.from(O)),n.hmac=new $(n.keys.authentication),t=nt(t,H[n.strength]+2)}return J(n,t,new f(t.length-Z-(t.length-Z)%W),0,Z,!0)}flush(){const t=this,e=t.pendingInput,n=nt(e,0,e.length-Z),r=nt(e,e.length-Z);let i=new f(0);if(n.length){const e=q.toBits(n);t.hmac.update(e);const r=t.aesCtrGladman.update(e);i=q.fromBits(r)}let s=!0;if(t.signed){const e=nt(q.fromBits(t.hmac.digest()),0,Z);for(let t=0;Z>t;t++)e[t]!=r[t]&&(s=!1)}return{valid:s,data:i}}}class G{constructor(t,e){n.assign(this,{password:t,strength:e-1,pendingInput:new f(0)})}async append(t){const n=this;let r=new f(0);n.password&&(r=await(async(t,e)=>{const n=(r=new f(H[t.strength]),K&&"function"==typeof k.getRandomValues?k.getRandomValues(r):I.getRandomValues(r));var r;return await tt(t,e,n),et(n,t.keys.passwordVerification)})(n,n.password),n.password=null,n.aesCtrGladman=new Y(new X(n.keys.key),e.from(O)),n.hmac=new $(n.keys.authentication));const i=new f(r.length+t.length-t.length%W);return i.set(r,0),J(n,t,i,r.length,0)}flush(){const t=this;let e=new f(0);if(t.pendingInput.length){const n=t.aesCtrGladman.update(q.toBits(t.pendingInput));t.hmac.update(n),e=q.fromBits(n)}const n=nt(q.fromBits(t.hmac.digest()),0,Z);return{data:et(e,n),signature:n}}}function J(t,e,n,r,i,s){const a=e.length-i;let o;for(t.pendingInput.length&&(e=et(t.pendingInput,e),n=((t,e)=>{if(e&&e>t.length){const n=t;(t=new f(e)).set(n,0)}return t})(n,a-a%W)),o=0;a-W>=o;o+=W){const i=q.toBits(nt(e,o,o+W));s&&t.hmac.update(i);const a=t.aesCtrGladman.update(i);s||t.hmac.update(a),n.set(q.fromBits(a),o+r)}return t.pendingInput=nt(e,o),n}async function tt(t,e,r){const i=D(e),s=await((t,e,n,r,i)=>K&&P&&"function"==typeof k.subtle.importKey?k.subtle.importKey("raw",e,n,!1,i):U.importKey(e))(0,i,Q,0,M),a=await(async(t,e,n)=>K&&P&&"function"==typeof k.subtle.deriveBits?await k.subtle.deriveBits(t,e,n):U.pbkdf2(e,t.salt,L.iterations,n))(n.assign({salt:r},L),s,8*(2*N[t.strength]+2)),o=new f(a);t.keys={key:q.toBits(nt(o,0,N[t.strength])),authentication:q.toBits(nt(o,N[t.strength],2*N[t.strength])),passwordVerification:nt(o,2*N[t.strength])}}function et(t,e){let n=t;return t.length+e.length&&(n=new f(t.length+e.length),n.set(t,0),n.set(e,t.length)),n}function nt(t,e,n){return t.subarray(e,n)}class rt{constructor(t,e){n.assign(this,{password:t,passwordVerification:e}),ot(this,t)}append(t){const e=this;if(e.password){const n=st(e,t.subarray(0,12));if(e.password=null,n[11]!=e.passwordVerification)throw new l(B);t=t.subarray(12)}return st(e,t)}flush(){return{valid:!0,data:new f(0)}}}class it{constructor(t,e){n.assign(this,{password:t,passwordVerification:e}),ot(this,t)}append(t){const e=this;let n,r;if(e.password){e.password=null;const i=k.getRandomValues(new f(12));i[11]=e.passwordVerification,n=new f(t.length+i.length),n.set(at(e,i),0),r=12}else n=new f(t.length),r=0;return n.set(at(e,t),r),n}flush(){return{data:new f(0)}}}function st(t,e){const n=new f(e.length);for(let r=0;r<e.length;r++)n[r]=lt(t)^e[r],ct(t,n[r]);return n}function at(t,e){const n=new f(e.length);for(let r=0;r<e.length;r++)n[r]=lt(t)^e[r],ct(t,e[r]);return n}function ot(t,e){t.keys=[305419896,591751049,878082192],t.crcKey0=new E(t.keys[0]),t.crcKey2=new E(t.keys[2]);for(let n=0;n<e.length;n++)ct(t,e.charCodeAt(n))}function ct(t,e){t.crcKey0.append([e]),t.keys[0]=~t.crcKey0.get(),t.keys[1]=dt(t.keys[1]+ft(t.keys[0])),t.keys[1]=dt(s.imul(t.keys[1],134775813)+1),t.crcKey2.append([t.keys[1]>>>24]),t.keys[2]=~t.crcKey2.get()}function lt(t){const e=2|t.keys[2];return ft(s.imul(e,1^e)>>>8)}function ft(t){return 255&t}function dt(t){return 4294967295&t}const ut="deflate",ht="inflate",pt="Invalid signature";class wt{constructor(t,{signature:e,password:r,signed:i,compressed:s,zipCrypto:a,passwordVerification:o,encryptionStrength:c},{chunkSize:l}){const f=!!r;n.assign(this,{signature:e,encrypted:f,signed:i,compressed:s,inflate:s&&new t({chunkSize:l}),crc32:i&&new E,zipCrypto:a,decrypt:f&&a?new rt(r,o):new j(r,i,c)})}async append(t){const e=this;return e.encrypted&&t.length&&(t=await e.decrypt.append(t)),e.compressed&&t.length&&(t=await e.inflate.append(t)),(!e.encrypted||e.zipCrypto)&&e.signed&&t.length&&e.crc32.append(t),t}async flush(){const t=this;let e,n=new f(0);if(t.encrypted){const e=t.decrypt.flush();if(!e.valid)throw new l(pt);n=e.data}if((!t.encrypted||t.zipCrypto)&&t.signed){const n=new h(new f(4).buffer);if(e=t.crc32.get(),n.setUint32(0,e),t.signature!=n.getUint32(0,!1))throw new l(pt)}return t.compressed&&(n=await t.inflate.append(n)||new f(0),await t.inflate.flush()),{data:n,signature:e}}}class gt{constructor(t,{encrypted:e,signed:r,compressed:i,level:s,zipCrypto:a,password:o,passwordVerification:c,encryptionStrength:l},{chunkSize:f}){n.assign(this,{encrypted:e,signed:r,compressed:i,deflate:i&&new t({level:s||5,chunkSize:f}),crc32:r&&new E,zipCrypto:a,encrypt:e&&a?new it(o,c):new G(o,l)})}async append(t){const e=this;let n=t;return e.compressed&&t.length&&(n=await e.deflate.append(t)),e.encrypted&&n.length&&(n=await e.encrypt.append(n)),(!e.encrypted||e.zipCrypto)&&e.signed&&t.length&&e.crc32.append(t),n}async flush(){const t=this;let e,n=new f(0);if(t.compressed&&(n=await t.deflate.flush()||new f(0)),t.encrypted){n=await t.encrypt.append(n);const r=t.encrypt.flush();e=r.signature;const i=new f(n.length+r.data.length);i.set(n,0),i.set(r.data,n.length),n=i}return t.encrypted&&!t.zipCrypto||!t.signed||(e=t.crc32.get()),{data:n,signature:e}}}const yt="init",mt="append",bt="flush";let kt=!0;var vt=(t,e,r,i,s,a,o)=>(n.assign(t,{busy:!0,codecConstructor:e,options:n.assign({},r),scripts:o,terminate(){t.worker&&!t.busy&&(t.worker.terminate(),t.interface=null)},onTaskFinished(){t.busy=!1,s(t)}}),a?((t,e)=>{let n;const r={type:"module"};if(!t.interface){if(kt)try{t.worker=i({},e.baseURL)}catch(n){kt=!1,t.worker=i(r,e.baseURL)}else t.worker=i(r,e.baseURL);t.worker.addEventListener("message",(e=>{const r=e.data;if(n){const e=r.error,i=r.type;if(e){const r=new l(e.message);r.stack=e.stack,n.reject(r),n=null,t.onTaskFinished()}else if(i==yt||i==bt||i==mt){const e=r.data;i==bt?(n.resolve({data:new f(e),signature:r.signature}),n=null,t.onTaskFinished()):n.resolve(e&&new f(e))}}}),!1),t.interface={append:t=>s({type:mt,data:t}),flush:()=>s({type:bt}),abort(){t.onTaskFinished()}}}return t.interface;function i(e,n){let r,i;r=t.scripts[0],"function"==typeof r&&(r=r());try{i=new c(r,n)}catch(t){i=r}return new Worker(i,e)}async function s(r){if(!n){const n=t.options,r=t.scripts.slice(1);await a({scripts:r,type:yt,options:n,config:{chunkSize:e.chunkSize}})}return a(r)}function a(e){const r=t.worker,i=new w(((t,e)=>n={resolve:t,reject:e}));try{if(e.data)try{e.data=e.data.buffer,r.postMessage(e,[e.data])}catch(t){r.postMessage(e)}else r.postMessage(e)}catch(e){n.reject(e),n=null,t.onTaskFinished()}return i}})(t,i):((t,e)=>{const n=((t,e,n)=>e.codecType.startsWith(ut)?new gt(t,e,n):e.codecType.startsWith(ht)?new wt(t,e,n):void 0)(t.codecConstructor,t.options,e);return{async append(e){try{return await n.append(e)}catch(e){throw t.onTaskFinished(),e}},async flush(){try{return await n.flush()}finally{t.onTaskFinished()}},abort(){t.onTaskFinished()}}})(t,i));let St=[];const _t=[];function At(t,e,n){const r=!(!e.compressed&&!e.signed&&!e.encrypted)&&(e.useWebWorkers||void 0===e.useWebWorkers&&n.useWebWorkers),i=r&&n.workerScripts?n.workerScripts[e.codecType]:[];if(St.length<n.maxWorkers){const a={};return St.push(a),vt(a,t,e,n,s,r,i)}{const a=St.find((t=>!t.busy));return a?(zt(a),vt(a,t,e,n,s,r,i)):new w((n=>_t.push({resolve:n,codecConstructor:t,options:e,webWorker:r,scripts:i})))}function s(t){if(_t.length){const[{resolve:e,codecConstructor:r,options:i,webWorker:a,scripts:o}]=_t.splice(0,1);e(vt(t,r,i,n,s,a,o))}else t.worker?(zt(t),Number.isFinite(n.terminateWorkerTimeout)&&n.terminateWorkerTimeout>=0&&(t.terminateTimeout=setTimeout((()=>{St=St.filter((e=>e!=t)),t.terminate()}),n.terminateWorkerTimeout))):St=St.filter((e=>e!=t))}}function zt(t){t.terminateTimeout&&(clearTimeout(t.terminateTimeout),t.terminateTimeout=null)}const Rt="Abort error";async function Ct(t,e,n,r,i,a,o){const c=s.max(a.chunkSize,64);return async function a(l=0,f=0){const d=o.signal,u=i();if(u>l){Et(d,t);const i=await e.readUint8Array(l+r,s.min(c,u-l)),h=i.length;Et(d,t);const p=await t.append(i);if(Et(d,t),f+=await Dt(n,p),o.onprogress)try{o.onprogress(l+h,u)}catch(t){}return a(l+c,f)}{const e=await t.flush();return f+=await Dt(n,e.data),{signature:e.signature,length:f}}}()}function Et(t,e){if(t&&t.aborted)throw e.abort(),new l(Rt)}async function Dt(t,e){return e.length&&await t.writeUint8Array(e),e.length}const Ft="HTTP error ",xt="HTTP Range not supported",Tt="Reader is not seekable",It="text/plain",Ut="GET";class Bt{constructor(){this.size=0}init(){this.initialized=!0}}class Wt extends Bt{}class Vt extends Bt{writeUint8Array(t){this.size+=t.length}}class Qt extends Wt{constructor(t){super(),this.blob=t,this.size=t.size}async readUint8Array(t,e){if(this.blob.arrayBuffer)return new f(await this.blob.slice(t,t+e).arrayBuffer());{const n=new m;return new w(((r,i)=>{n.onload=t=>r(new f(t.target.result)),n.onerror=()=>i(n.error),n.readAsArrayBuffer(this.blob.slice(t,t+e))}))}}}class Lt extends Vt{constructor(t){super(),this.contentType=t,this.arrayBuffersMaxlength=8,Mt(this)}writeUint8Array(t){super.writeUint8Array(t),this.arrayBuffers.length==this.arrayBuffersMaxlength&&Ht(this),this.arrayBuffers.push(t.buffer)}getData(){return this.blob||(this.arrayBuffers.length&&Ht(this),this.blob=this.pendingBlob,Mt(this)),this.blob}}function Mt(t){t.pendingBlob=new p([],{type:t.contentType}),t.arrayBuffers=[]}function Ht(t){t.pendingBlob=new p([t.pendingBlob,...t.arrayBuffers],{type:t.contentType}),t.arrayBuffers=[]}class Nt extends Wt{constructor(t,e){super(),this.url=t,this.preventHeadRequest=e.preventHeadRequest,this.useRangeHeader=e.useRangeHeader,this.forceRangeRequests=e.forceRangeRequests,this.options=n.assign({},e),delete this.options.preventHeadRequest,delete this.options.useRangeHeader,delete this.options.forceRangeRequests,delete this.options.useXHR}async init(){super.init(),await Ot(this,Gt,Xt)}readUint8Array(t,e){return Kt(this,t,e,Gt,Xt)}}class Zt extends Wt{constructor(t,e){super(),this.url=t,this.preventHeadRequest=e.preventHeadRequest,this.useRangeHeader=e.useRangeHeader,this.forceRangeRequests=e.forceRangeRequests,this.options=e}async init(){super.init(),await Ot(this,Jt,Yt)}readUint8Array(t,e){return Kt(this,t,e,Jt,Yt)}}async function Ot(t,e,n){if((t=>{if(void 0!==b){const e=b.createElement("a");return e.href=t,"http:"==e.protocol||"https:"==e.protocol}return/^https?:\/\//i.test(t)})(t.url)&&(t.useRangeHeader||t.forceRangeRequests)){const r=await e(Ut,t,Pt(t));if(!t.forceRangeRequests&&"bytes"!=r.headers.get("Accept-Ranges"))throw new l(xt);{let i;const s=r.headers.get("Content-Range");if(s){const t=s.trim().split(/\s*\/\s*/);if(t.length){const e=t[1];e&&"*"!=e&&(i=Number(e))}}void 0===i?await jt(t,e,n):t.size=i}}else await jt(t,e,n)}async function Kt(t,e,n,r,i){if(t.useRangeHeader||t.forceRangeRequests){const i=await r(Ut,t,Pt(t,e,n));if(206!=i.status)throw new l(xt);return new f(await i.arrayBuffer())}return t.data||await i(t,t.options),new f(t.data.subarray(e,e+n))}function Pt(t,e=0,r=1){return n.assign({},qt(t),{Range:"bytes="+e+"-"+(e+r-1)})}function qt(t){const e=t.options.headers;if(e)return Symbol.iterator in e?n.fromEntries(e):e}async function Xt(t){await $t(t,Gt)}async function Yt(t){await $t(t,Jt)}async function $t(t,e){const n=await e(Ut,t,qt(t));t.data=new f(await n.arrayBuffer()),t.size||(t.size=t.data.length)}async function jt(t,e,n){if(t.preventHeadRequest)await n(t,t.options);else{const r=(await e("HEAD",t,qt(t))).headers.get("Content-Length");r?t.size=Number(r):await n(t,t.options)}}async function Gt(t,{options:e,url:r},i){const s=await fetch(r,n.assign({},e,{method:t,headers:i}));if(400>s.status)return s;throw new l(Ft+(s.statusText||s.status))}function Jt(t,{url:e},r){return new w(((i,s)=>{const a=new XMLHttpRequest;if(a.addEventListener("load",(()=>{if(400>a.status){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)})),i({status:a.status,arrayBuffer:()=>a.response,headers:new o(t)})}else s(new l(Ft+(a.statusText||a.status)))}),!1),a.addEventListener("error",(t=>s(t.detail.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 te extends Wt{constructor(t,e={}){super(),this.url=t,e.useXHR?this.reader=new Zt(t,e):this.reader=new Nt(t,e)}set size(t){}get size(){return this.reader.size}async init(){super.init(),await this.reader.init()}readUint8Array(t,e){return this.reader.readUint8Array(t,e)}}const ee=4294967295,ne=65535,re=67324752,ie=33639248,se=101075792,ae=117853008,oe=21589,ce=2048,le="/",fe=new a(2107,11,31),de=new a(1980,0,1),ue="\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ ".split("");function he(t,e){if(e&&"cp437"==e.trim().toLowerCase())return(t=>{let e="";for(let n=0;n<t.length;n++)e+=ue[t[n]];return e})(t);if(void 0===y){const e=new m;return new w(((n,r)=>{e.onload=t=>n(t.target.result),e.onerror=()=>r(e.error),e.readAsText(new p([t]))}))}return new y(e).decode(t)}const pe=["filename","rawFilename","directory","encrypted","compressedSize","uncompressedSize","lastModDate","rawLastModDate","comment","rawComment","signature","extraField","rawExtraField","bitFlag","extraFieldZip64","extraFieldUnicodePath","extraFieldUnicodeComment","extraFieldAES","filenameUTF8","commentUTF8","offset","zip64","compressionMethod","extraFieldNTFS","lastAccessDate","creationDate","extraFieldExtendedTimestamp","version","versionMadeBy","msDosCompatible","internalFileAttribute","externalFileAttribute"];class we{constructor(t){pe.forEach((e=>this[e]=t[e]))}}const ge="File format is not recognized",ye="End of central directory not found",me="End of Zip64 central directory not found",be="End of Zip64 central directory locator not found",ke="Central directory header not found",ve="Local file header not found",Se="Zip64 extra field not found",_e="File contains encrypted entry",Ae="Encryption method not supported",ze="Compression method not supported",Re="utf-8",Ce="cp437",Ee=["uncompressedSize","compressedSize","offset"];class De{constructor(t,e,r){n.assign(this,{reader:t,config:e,options:r})}async getData(t,e,n={}){const r=this,{reader:i,offset:s,extraFieldAES:a,compressionMethod:o,config:c,bitFlag:f,signature:d,rawLastModDate:u,compressedSize:h}=r,p=r.localDirectory={};i.initialized||await i.init();let w=await He(i,s,30);const g=Me(w);let y=Ie(r,n,"password");if(y=y&&y.length&&y,a&&99!=a.originalCompressionMethod)throw new l(ze);if(0!=o&&8!=o)throw new l(ze);if(Qe(g,0)!=re)throw new l(ve);Fe(p,g,4),w=await He(i,s,30+p.filenameLength+p.extraFieldLength),p.rawExtraField=w.subarray(30+p.filenameLength),await xe(r,p,g,4),e.lastAccessDate=p.lastAccessDate,e.creationDate=p.creationDate;const m=r.encrypted&&p.encrypted,b=m&&!a;if(m){if(!b&&void 0===a.strength)throw new l(Ae);if(!y)throw new l(_e)}const k=await At(c.Inflate,{codecType:ht,password:y,zipCrypto:b,encryptionStrength:a&&a.strength,signed:Ie(r,n,"checkSignature"),passwordVerification:b&&(f.dataDescriptor?u>>>8&255:d>>>24&255),signature:d,compressed:0!=o,encrypted:m,useWebWorkers:Ie(r,n,"useWebWorkers")},c);t.initialized||await t.init();const v=Ie(r,n,"signal"),S=s+30+p.filenameLength+p.extraFieldLength;return await Ct(k,i,t,S,(()=>h),c,{onprogress:n.onprogress,signal:v}),t.getData()}}function Fe(t,e,r){const i=t.rawBitFlag=Ve(e,r+2),s=1==(1&i),a=Qe(e,r+6);n.assign(t,{encrypted:s,version:Ve(e,r),bitFlag:{level:(6&i)>>1,dataDescriptor:8==(8&i),languageEncodingFlag:(i&ce)==ce},rawLastModDate:a,lastModDate:Ue(a),filenameLength:Ve(e,r+22),extraFieldLength:Ve(e,r+24)})}async function xe(t,e,r,i){const c=e.rawExtraField,d=e.extraField=new o,u=Me(new f(c));let h=0;try{for(;h<c.length;){const t=Ve(u,h),e=Ve(u,h+2);d.set(t,{type:t,data:c.slice(h+4,h+4+e)}),h+=4+e}}catch(t){}const p=Ve(r,i+4);e.signature=Qe(r,i+10),e.uncompressedSize=Qe(r,i+18),e.compressedSize=Qe(r,i+14);const w=d.get(1);w&&(((t,e)=>{e.zip64=!0;const n=Me(t.data);t.values=[];for(let e=0;e<s.floor(t.data.length/8);e++)t.values.push(Le(n,0+8*e));const r=Ee.filter((t=>e[t]==ee));for(let e=0;e<r.length;e++)t[r[e]]=t.values[e];Ee.forEach((n=>{if(e[n]==ee){if(void 0===t[n])throw new l(Se);e[n]=t[n]}}))})(w,e),e.extraFieldZip64=w);const g=d.get(28789);g&&(await Te(g,"filename","rawFilename",e,t),e.extraFieldUnicodePath=g);const y=d.get(25461);y&&(await Te(y,"comment","rawComment",e,t),e.extraFieldUnicodeComment=y);const m=d.get(39169);m?(((t,e,n)=>{const r=Me(t.data);t.vendorVersion=We(r,0),t.vendorId=We(r,2);const i=We(r,4);t.strength=i,t.originalCompressionMethod=n,e.compressionMethod=t.compressionMethod=Ve(r,5)})(m,e,p),e.extraFieldAES=m):e.compressionMethod=p;const b=d.get(10);b&&(((t,e)=>{const r=Me(t.data);let i,s=4;try{for(;s<t.data.length&&!i;){const e=Ve(r,s),n=Ve(r,s+2);1==e&&(i=t.data.slice(s+4,s+4+n)),s+=4+n}}catch(t){}try{if(i&&24==i.length){const r=Me(i),s=r.getBigUint64(0,!0),a=r.getBigUint64(8,!0),o=r.getBigUint64(16,!0);n.assign(t,{rawLastModDate:s,rawLastAccessDate:a,rawCreationDate:o});const c={lastModDate:Be(s),lastAccessDate:Be(a),creationDate:Be(o)};n.assign(t,c),n.assign(e,c)}}catch(t){}})(b,e),e.extraFieldNTFS=b);const k=d.get(oe);k&&(((t,e)=>{const n=Me(t.data),r=We(n,0),i=[],s=[];1==(1&r)&&(i.push("lastModDate"),s.push("rawLastModDate")),2==(2&r)&&(i.push("lastAccessDate"),s.push("rawLastAccessDate")),4==(4&r)&&(i.push("creationDate"),s.push("rawCreationDate"));let o=1;i.forEach(((r,i)=>{if(t.data.length>=o+4){const c=Qe(n,o);e[r]=t[r]=new a(1e3*c);const l=s[i];t[l]=c}o+=4}))})(k,e),e.extraFieldExtendedTimestamp=k)}async function Te(t,e,n,r,i){const s=Me(t.data);t.version=We(s,0),t.signature=Qe(s,1);const a=new E;a.append(i[n]);const o=Me(new f(4));o.setUint32(0,a.get(),!0),t[e]=await he(t.data.subarray(5)),t.valid=!i.bitFlag.languageEncodingFlag&&t.signature==Qe(o,0),t.valid&&(r[e]=t[e],r[e+"UTF8"]=!0)}function Ie(t,e,n){return void 0===e[n]?t.options[n]:e[n]}function Ue(t){const e=(4294901760&t)>>16,n=65535&t;try{return new a(1980+((65024&e)>>9),((480&e)>>5)-1,31&e,(63488&n)>>11,(2016&n)>>5,2*(31&n),0)}catch(t){}}function Be(t){return new a(Number(t/i(1e4)-i(116444736e5)))}function We(t,e){return t.getUint8(e)}function Ve(t,e){return t.getUint16(e,!0)}function Qe(t,e){return t.getUint32(e,!0)}function Le(t,e){return Number(t.getBigUint64(e,!0))}function Me(t){return new h(t.buffer)}function He(t,e,n){return t.readUint8Array(e,n)}const Ne="File already exists",Ze="Zip file comment exceeds 64KB",Oe="File entry comment exceeds 64KB",Ke="File entry name exceeds 64KB",Pe="Version exceeds 65535",qe="The strength must equal 1, 2, or 3",Xe="Extra field type exceeds 65535",Ye="Extra field data exceeds 64KB",$e="Zip64 is not supported",je=new f([7,0,2,0,65,69,3,0,0]);let Ge,Je=0;function tn(t,e,n){if(t.arrayBuffer)return e||n?t.slice(e,n).arrayBuffer():t.arrayBuffer();{const r=new m;return new w(((i,s)=>{r.onload=t=>i(t.target.result),r.onerror=()=>s(r.error),r.readAsArrayBuffer(e||n?t.slice(e,n):t)}))}}function en(t){if(t)return(i(t.getTime())+i(116444736e5))*i(1e4)}function nn(t,e,n){return void 0===e[n]?t.options[n]:e[n]}function rn(t,e,n){t.setUint8(e,n)}function sn(t,e,n){t.setUint16(e,n,!0)}function an(t,e,n){t.setUint32(e,n,!0)}function on(t,e,n){t.setBigUint64(e,n,!0)}function cn(t,e,n){t.set(e,n)}function ln(t){return new h(t.buffer)}try{Ge=void 0===b&&"undefined"==typeof location?new(require("url").URL)("file:"+__filename).href:void 0===b?location.href:b.currentScript&&b.currentScript.src||new c("zip.min.js",b.baseURI).href}catch(t){}z({baseURL:Ge}),(t=>{if("function"==typeof c.createObjectURL){const e=()=>c.createObjectURL(new p(['const{Array:t,Object:e,Math:n,Error:r,Uint8Array:i,Uint16Array:o,Uint32Array:s,Int32Array:f,DataView:c,TextEncoder:l,crypto:u,postMessage:a}=globalThis,w=[];for(let t=0;256>t;t++){let e=t;for(let t=0;8>t;t++)1&e?e=e>>>1^3988292384:e>>>=1;w[t]=e}class h{constructor(t){this.t=t||-1}append(t){let e=0|this.t;for(let n=0,r=0|t.length;r>n;n++)e=e>>>8^w[255&(e^t[n])];this.t=e}get(){return~this.t}}const d={concat(t,e){if(0===t.length||0===e.length)return t.concat(e);const n=t[t.length-1],r=d.i(n);return 32===r?t.concat(e):d.o(e,r,0|n,t.slice(0,t.length-1))},l(t){const e=t.length;if(0===e)return 0;const n=t[e-1];return 32*(e-1)+d.i(n)},u(t,e){if(32*t.length<e)return t;const r=(t=t.slice(0,n.ceil(e/32))).length;return e&=31,r>0&&e&&(t[r-1]=d.h(e,t[r-1]&2147483648>>e-1,1)),t},h:(t,e,n)=>32===t?e:(n?0|e:e<<32-t)+1099511627776*t,i:t=>n.round(t/1099511627776)||32,o(t,e,n,r){for(void 0===r&&(r=[]);e>=32;e-=32)r.push(n),n=0;if(0===e)return r.concat(t);for(let i=0;i<t.length;i++)r.push(n|t[i]>>>e),n=t[i]<<32-e;const i=t.length?t[t.length-1]:0,o=d.i(i);return r.push(d.h(e+o&31,e+o>32?n:r.pop(),1)),r}},p={p:{k(t){const e=d.l(t)/8,n=new i(e);let r;for(let i=0;e>i;i++)0==(3&i)&&(r=t[i/4]),n[i]=r>>>24,r<<=8;return n},g(t){const e=[];let n,r=0;for(n=0;n<t.length;n++)r=r<<8|t[n],3==(3&n)&&(e.push(r),r=0);return 3&n&&e.push(d.h(8*(3&n),r)),e}}},y={v:function(t){t?(this.m=t.m.slice(0),this.S=t.S.slice(0),this._=t._):this.reset()}};y.v.prototype={blockSize:512,reset:function(){const t=this;return t.m=this.I.slice(0),t.S=[],t._=0,t},update:function(t){const e=this;"string"==typeof t&&(t=p.A.g(t));const n=e.S=d.concat(e.S,t),i=e._,o=e._=i+d.l(t);if(o>9007199254740991)throw new r("Cannot hash more than 2^53 - 1 bits");const f=new s(n);let c=0;for(let t=e.blockSize+i-(e.blockSize+i&e.blockSize-1);o>=t;t+=e.blockSize)e.C(f.subarray(16*c,16*(c+1))),c+=1;return n.splice(0,16*c),e},V:function(){const t=this;let e=t.S;const r=t.m;e=d.concat(e,[d.h(1,1)]);for(let t=e.length+2;15&t;t++)e.push(0);for(e.push(n.floor(t._/4294967296)),e.push(0|t._);e.length;)t.C(e.splice(0,16));return t.reset(),r},I:[1732584193,4023233417,2562383102,271733878,3285377520],B:[1518500249,1859775393,2400959708,3395469782],D:(t,e,n,r)=>t>19?t>39?t>59?t>79?void 0:e^n^r:e&n|e&r|n&r:e^n^r:e&n|~e&r,U:(t,e)=>e<<t|e>>>32-t,C:function(e){const r=this,i=r.m,o=t(80);for(let t=0;16>t;t++)o[t]=e[t];let s=i[0],f=i[1],c=i[2],l=i[3],u=i[4];for(let t=0;79>=t;t++){16>t||(o[t]=r.U(1,o[t-3]^o[t-8]^o[t-14]^o[t-16]));const e=r.U(5,s)+r.D(t,f,c,l)+u+o[t]+r.B[n.floor(t/20)]|0;u=l,l=c,c=r.U(30,f),f=s,s=e}i[0]=i[0]+s|0,i[1]=i[1]+f|0,i[2]=i[2]+c|0,i[3]=i[3]+l|0,i[4]=i[4]+u|0}};const b={getRandomValues(t){const e=new s(t.buffer),r=t=>{let e=987654321;const r=4294967295;return()=>(e=36969*(65535&e)+(e>>16)&r,(((e<<16)+(t=18e3*(65535&t)+(t>>16)&r)&r)/4294967296+.5)*(n.random()>.5?1:-1))};for(let i,o=0;o<t.length;o+=4){const t=r(4294967296*(i||n.random()));i=987654071*t(),e[o/4]=4294967296*t()|0}return t}},k={importKey:t=>new k.M(p.p.g(t)),P(t,e,n,i){if(n=n||1e4,0>i||0>n)throw new r("invalid params to pbkdf2");const o=1+(i>>5)<<2;let s,f,l,u,a;const w=new ArrayBuffer(o),h=new c(w);let y=0;const b=d;for(e=p.p.g(e),a=1;(o||1)>y;a++){for(s=f=t.encrypt(b.concat(e,[a])),l=1;n>l;l++)for(f=t.encrypt(f),u=0;u<f.length;u++)s[u]^=f[u];for(l=0;(o||1)>y&&l<s.length;l++)h.setInt32(y,s[l]),y+=4}return w.slice(0,i/8)},M:class{constructor(t){const e=this,n=e.R=y.v,r=[[],[]],i=n.prototype.blockSize/32;e.H=[new n,new n],t.length>i&&(t=n.hash(t));for(let e=0;i>e;e++)r[0][e]=909522486^t[e],r[1][e]=1549556828^t[e];e.H[0].update(r[0]),e.H[1].update(r[1]),e.K=new n(e.H[0])}reset(){const t=this;t.K=new t.R(t.H[0]),t.L=!1}update(t){this.L=!0,this.K.update(t)}digest(){const t=this,e=t.K.V(),n=new t.R(t.H[1]).update(e).V();return t.reset(),n}encrypt(t){if(this.L)throw new r("encrypt on already updated hmac called!");return this.update(t),this.digest(t)}}},g={name:"PBKDF2"},v=e.assign({hash:{name:"HMAC"}},g),m=e.assign({iterations:1e3,hash:{name:"SHA-1"}},g),S=["deriveBits"],z=[8,12,16],_=[16,24,32],I=[0,0,0,0],A=void 0!==u,C=A&&void 0!==u.subtle,V=p.p,B=class{constructor(t){const e=this;e.T=[[[],[],[],[],[]],[[],[],[],[],[]]],e.T[0][0][0]||e.j();const n=e.T[0][4],i=e.T[1],o=t.length;let s,f,c,l=1;if(4!==o&&6!==o&&8!==o)throw new r("invalid aes key size");for(e.B=[f=t.slice(0),c=[]],s=o;4*o+28>s;s++){let t=f[s-1];(s%o==0||8===o&&s%o==4)&&(t=n[t>>>24]<<24^n[t>>16&255]<<16^n[t>>8&255]<<8^n[255&t],s%o==0&&(t=t<<8^t>>>24^l<<24,l=l<<1^283*(l>>7))),f[s]=f[s-o]^t}for(let t=0;s;t++,s--){const e=f[3&t?s:s-4];c[t]=4>=s||4>t?e:i[0][n[e>>>24]]^i[1][n[e>>16&255]]^i[2][n[e>>8&255]]^i[3][n[255&e]]}}encrypt(t){return this.F(t,0)}decrypt(t){return this.F(t,1)}j(){const t=this.T[0],e=this.T[1],n=t[4],r=e[4],i=[],o=[];let s,f,c,l;for(let t=0;256>t;t++)o[(i[t]=t<<1^283*(t>>7))^t]=t;for(let u=s=0;!n[u];u^=f||1,s=o[s]||1){let o=s^s<<1^s<<2^s<<3^s<<4;o=o>>8^255&o^99,n[u]=o,r[o]=u,l=i[c=i[f=i[u]]];let a=16843009*l^65537*c^257*f^16843008*u,w=257*i[o]^16843008*o;for(let n=0;4>n;n++)t[n][u]=w=w<<24^w>>>8,e[n][o]=a=a<<24^a>>>8}for(let n=0;5>n;n++)t[n]=t[n].slice(0),e[n]=e[n].slice(0)}F(t,e){if(4!==t.length)throw new r("invalid aes block size");const n=this.B[e],i=n.length/4-2,o=[0,0,0,0],s=this.T[e],f=s[0],c=s[1],l=s[2],u=s[3],a=s[4];let w,h,d,p=t[0]^n[0],y=t[e?3:1]^n[1],b=t[2]^n[2],k=t[e?1:3]^n[3],g=4;for(let t=0;i>t;t++)w=f[p>>>24]^c[y>>16&255]^l[b>>8&255]^u[255&k]^n[g],h=f[y>>>24]^c[b>>16&255]^l[k>>8&255]^u[255&p]^n[g+1],d=f[b>>>24]^c[k>>16&255]^l[p>>8&255]^u[255&y]^n[g+2],k=f[k>>>24]^c[p>>16&255]^l[y>>8&255]^u[255&b]^n[g+3],g+=4,p=w,y=h,b=d;for(let t=0;4>t;t++)o[e?3&-t:t]=a[p>>>24]<<24^a[y>>16&255]<<16^a[b>>8&255]<<8^a[255&k]^n[g++],w=p,p=y,y=b,b=k,k=w;return o}},E=class{constructor(t,e){this.O=t,this.W=e,this.q=e}reset(){this.q=this.W}update(t){return this.G(this.O,t,this.q)}J(t){if(255==(t>>24&255)){let e=t>>16&255,n=t>>8&255,r=255&t;255===e?(e=0,255===n?(n=0,255===r?r=0:++r):++n):++e,t=0,t+=e<<16,t+=n<<8,t+=r}else t+=1<<24;return t}N(t){0===(t[0]=this.J(t[0]))&&(t[1]=this.J(t[1]))}G(t,e,n){let r;if(!(r=e.length))return[];const i=d.l(e);for(let i=0;r>i;i+=4){this.N(n);const r=t.encrypt(n);e[i]^=r[0],e[i+1]^=r[1],e[i+2]^=r[2],e[i+3]^=r[3]}return d.u(e,i)}},D=k.M;class U{constructor(t,n,r){e.assign(this,{password:t,signed:n,X:r-1,Y:new i(0)})}async append(e){const n=this;if(n.password){const i=K(e,0,z[n.X]+2);await(async(t,e,n)=>{await R(t,n,K(e,0,z[t.X]));const i=K(e,z[t.X]),o=t.keys.passwordVerification;if(o[0]!=i[0]||o[1]!=i[1])throw new r("Invalid pasword")})(n,i,n.password),n.password=null,n.Z=new E(new B(n.keys.key),t.from(I)),n.$=new D(n.keys.tt),e=K(e,z[n.X]+2)}return P(n,e,new i(e.length-10-(e.length-10)%16),0,10,!0)}flush(){const t=this,e=t.Y,n=K(e,0,e.length-10),r=K(e,e.length-10);let o=new i(0);if(n.length){const e=V.g(n);t.$.update(e);const r=t.Z.update(e);o=V.k(r)}let s=!0;if(t.signed){const e=K(V.k(t.$.digest()),0,10);for(let t=0;10>t;t++)e[t]!=r[t]&&(s=!1)}return{valid:s,data:o}}}class M{constructor(t,n){e.assign(this,{password:t,X:n-1,Y:new i(0)})}async append(e){const n=this;let r=new i(0);n.password&&(r=await(async(t,e)=>{const n=(r=new i(z[t.X]),A&&"function"==typeof u.getRandomValues?u.getRandomValues(r):b.getRandomValues(r));var r;return await R(t,e,n),H(n,t.keys.passwordVerification)})(n,n.password),n.password=null,n.Z=new E(new B(n.keys.key),t.from(I)),n.$=new D(n.keys.tt));const o=new i(r.length+e.length-e.length%16);return o.set(r,0),P(n,e,o,r.length,0)}flush(){const t=this;let e=new i(0);if(t.Y.length){const n=t.Z.update(V.g(t.Y));t.$.update(n),e=V.k(n)}const n=K(V.k(t.$.digest()),0,10);return{data:H(e,n),signature:n}}}function P(t,e,n,r,o,s){const f=e.length-o;let c;for(t.Y.length&&(e=H(t.Y,e),n=((t,e)=>{if(e&&e>t.length){const n=t;(t=new i(e)).set(n,0)}return t})(n,f-f%16)),c=0;f-16>=c;c+=16){const i=V.g(K(e,c,c+16));s&&t.$.update(i);const o=t.Z.update(i);s||t.$.update(o),n.set(V.k(o),c+r)}return t.Y=K(e,c),n}async function R(t,n,r){const o=(t=>{if(void 0===l){const e=new i((t=unescape(encodeURIComponent(t))).length);for(let n=0;n<e.length;n++)e[n]=t.charCodeAt(n);return e}return(new l).encode(t)})(n),s=await((t,e,n,r,i)=>A&&C&&"function"==typeof u.subtle.importKey?u.subtle.importKey("raw",e,n,!1,i):k.importKey(e))(0,o,v,0,S),f=await(async(t,e,n)=>A&&C&&"function"==typeof u.subtle.deriveBits?await u.subtle.deriveBits(t,e,n):k.P(e,t.salt,m.iterations,n))(e.assign({salt:r},m),s,8*(2*_[t.X]+2)),c=new i(f);t.keys={key:V.g(K(c,0,_[t.X])),tt:V.g(K(c,_[t.X],2*_[t.X])),passwordVerification:K(c,2*_[t.X])}}function H(t,e){let n=t;return t.length+e.length&&(n=new i(t.length+e.length),n.set(t,0),n.set(e,t.length)),n}function K(t,e,n){return t.subarray(e,n)}class L{constructor(t,n){e.assign(this,{password:t,passwordVerification:n}),F(this,t)}append(t){const e=this;if(e.password){const n=j(e,t.subarray(0,12));if(e.password=null,n[11]!=e.passwordVerification)throw new r("Invalid pasword");t=t.subarray(12)}return j(e,t)}flush(){return{valid:!0,data:new i(0)}}}class T{constructor(t,n){e.assign(this,{password:t,passwordVerification:n}),F(this,t)}append(t){const e=this;let n,r;if(e.password){e.password=null;const o=u.getRandomValues(new i(12));o[11]=e.passwordVerification,n=new i(t.length+o.length),n.set(x(e,o),0),r=12}else n=new i(t.length),r=0;return n.set(x(e,t),r),n}flush(){return{data:new i(0)}}}function j(t,e){const n=new i(e.length);for(let r=0;r<e.length;r++)n[r]=W(t)^e[r],O(t,n[r]);return n}function x(t,e){const n=new i(e.length);for(let r=0;r<e.length;r++)n[r]=W(t)^e[r],O(t,e[r]);return n}function F(t,e){t.keys=[305419896,591751049,878082192],t.et=new h(t.keys[0]),t.nt=new h(t.keys[2]);for(let n=0;n<e.length;n++)O(t,e.charCodeAt(n))}function O(t,e){t.et.append([e]),t.keys[0]=~t.et.get(),t.keys[1]=G(t.keys[1]+q(t.keys[0])),t.keys[1]=G(n.imul(t.keys[1],134775813)+1),t.nt.append([t.keys[1]>>>24]),t.keys[2]=~t.nt.get()}function W(t){const e=2|t.keys[2];return q(n.imul(e,1^e)>>>8)}function q(t){return 255&t}function G(t){return 4294967295&t}class J{constructor(t,{signature:n,password:r,signed:i,compressed:o,zipCrypto:s,passwordVerification:f,encryptionStrength:c},{rt:l}){const u=!!r;e.assign(this,{signature:n,encrypted:u,signed:i,compressed:o,it:o&&new t({rt:l}),ot:i&&new h,zipCrypto:s,decrypt:u&&s?new L(r,f):new U(r,i,c)})}async append(t){const e=this;return e.encrypted&&t.length&&(t=await e.decrypt.append(t)),e.compressed&&t.length&&(t=await e.it.append(t)),(!e.encrypted||e.zipCrypto)&&e.signed&&t.length&&e.ot.append(t),t}async flush(){const t=this;let e,n=new i(0);if(t.encrypted){const e=t.decrypt.flush();if(!e.valid)throw new r("Invalid signature");n=e.data}if((!t.encrypted||t.zipCrypto)&&t.signed){const n=new c(new i(4).buffer);if(e=t.ot.get(),n.setUint32(0,e),t.signature!=n.getUint32(0,!1))throw new r("Invalid signature")}return t.compressed&&(n=await t.it.append(n)||new i(0),await t.it.flush()),{data:n,signature:e}}}class N{constructor(t,{encrypted:n,signed:r,compressed:i,level:o,zipCrypto:s,password:f,passwordVerification:c,encryptionStrength:l},{rt:u}){e.assign(this,{encrypted:n,signed:r,compressed:i,st:i&&new t({level:o||5,rt:u}),ot:r&&new h,zipCrypto:s,encrypt:n&&s?new T(f,c):new M(f,l)})}async append(t){const e=this;let n=t;return e.compressed&&t.length&&(n=await e.st.append(t)),e.encrypted&&n.length&&(n=await e.encrypt.append(n)),(!e.encrypted||e.zipCrypto)&&e.signed&&t.length&&e.ot.append(t),n}async flush(){const t=this;let e,n=new i(0);if(t.compressed&&(n=await t.st.flush()||new i(0)),t.encrypted){n=await t.encrypt.append(n);const r=t.encrypt.flush();e=r.signature;const o=new i(n.length+r.data.length);o.set(n,0),o.set(r.data,n.length),n=o}return t.encrypted&&!t.zipCrypto||!t.signed||(e=t.ot.get()),{data:n,signature:e}}}const Q={init(t){t.scripts&&t.scripts.length&&importScripts.apply(void 0,t.scripts);const e=t.options;let n;self.initCodec&&self.initCodec(),e.codecType.startsWith("deflate")?n=self.Deflate:e.codecType.startsWith("inflate")&&(n=self.Inflate),X=((t,e,n)=>e.codecType.startsWith("deflate")?new N(t,e,n):e.codecType.startsWith("inflate")?new J(t,e,n):void 0)(n,e,t.config)},append:async t=>({data:await X.append(t.data)}),flush:()=>X.flush()};let X;function Y(e){return Z(e.map((([e,n])=>new t(e).fill(n,0,e))))}function Z(e){return e.reduce(((e,n)=>e.concat(t.isArray(n)?Z(n):n)),[])}addEventListener("message",(async t=>{const e=t.data,n=e.type,r=Q[n];if(r)try{e.data&&(e.data=new i(e.data));const t=await r(e)||{};if(t.type=n,t.data)try{t.data=t.data.buffer,a(t,[t.data])}catch(e){a(t)}else a(t)}catch(t){a({type:n,error:{message:t.message,stack:t.stack}})}}));const $=[0,1,2,3].concat(...Y([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function tt(){const t=this;function e(t,e){let n=0;do{n|=1&t,t>>>=1,n<<=1}while(--e>0);return n>>>1}t.ft=r=>{const i=t.ct,o=t.ut.lt,s=t.ut.wt;let f,c,l,u=-1;for(r.ht=0,r.dt=573,f=0;s>f;f++)0!==i[2*f]?(r.yt[++r.ht]=u=f,r.bt[f]=0):i[2*f+1]=0;for(;2>r.ht;)l=r.yt[++r.ht]=2>u?++u:0,i[2*l]=1,r.bt[l]=0,r.kt--,o&&(r.gt-=o[2*l+1]);for(t.vt=u,f=n.floor(r.ht/2);f>=1;f--)r.St(i,f);l=s;do{f=r.yt[1],r.yt[1]=r.yt[r.ht--],r.St(i,1),c=r.yt[1],r.yt[--r.dt]=f,r.yt[--r.dt]=c,i[2*l]=i[2*f]+i[2*c],r.bt[l]=n.max(r.bt[f],r.bt[c])+1,i[2*f+1]=i[2*c+1]=l,r.yt[1]=l++,r.St(i,1)}while(r.ht>=2);r.yt[--r.dt]=r.yt[1],(e=>{const n=t.ct,r=t.ut.lt,i=t.ut.zt,o=t.ut._t,s=t.ut.It;let f,c,l,u,a,w,h=0;for(u=0;15>=u;u++)e.At[u]=0;for(n[2*e.yt[e.dt]+1]=0,f=e.dt+1;573>f;f++)c=e.yt[f],u=n[2*n[2*c+1]+1]+1,u>s&&(u=s,h++),n[2*c+1]=u,c>t.vt||(e.At[u]++,a=0,o>c||(a=i[c-o]),w=n[2*c],e.kt+=w*(u+a),r&&(e.gt+=w*(r[2*c+1]+a)));if(0!==h){do{for(u=s-1;0===e.At[u];)u--;e.At[u]--,e.At[u+1]+=2,e.At[s]--,h-=2}while(h>0);for(u=s;0!==u;u--)for(c=e.At[u];0!==c;)l=e.yt[--f],l>t.vt||(n[2*l+1]!=u&&(e.kt+=(u-n[2*l+1])*n[2*l],n[2*l+1]=u),c--)}})(r),((t,n,r)=>{const i=[];let o,s,f,c=0;for(o=1;15>=o;o++)i[o]=c=c+r[o-1]<<1;for(s=0;n>=s;s++)f=t[2*s+1],0!==f&&(t[2*s]=e(i[f]++,f))})(i,t.vt,r.At)}}function et(t,e,n,r,i){const o=this;o.lt=t,o.zt=e,o._t=n,o.wt=r,o.It=i}tt.Ct=[0,1,2,3,4,5,6,7].concat(...Y([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]])),tt.Vt=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0],tt.Bt=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576],tt.Et=t=>256>t?$[t]:$[256+(t>>>7)],tt.Dt=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],tt.Ut=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],tt.Mt=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],tt.Pt=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];const nt=Y([[144,8],[112,9],[24,7],[8,8]]);et.Rt=Z([12,140,76,204,44,172,108,236,28,156,92,220,60,188,124,252,2,130,66,194,34,162,98,226,18,146,82,210,50,178,114,242,10,138,74,202,42,170,106,234,26,154,90,218,58,186,122,250,6,134,70,198,38,166,102,230,22,150,86,214,54,182,118,246,14,142,78,206,46,174,110,238,30,158,94,222,62,190,126,254,1,129,65,193,33,161,97,225,17,145,81,209,49,177,113,241,9,137,73,201,41,169,105,233,25,153,89,217,57,185,121,249,5,133,69,197,37,165,101,229,21,149,85,213,53,181,117,245,13,141,77,205,45,173,109,237,29,157,93,221,61,189,125,253,19,275,147,403,83,339,211,467,51,307,179,435,115,371,243,499,11,267,139,395,75,331,203,459,43,299,171,427,107,363,235,491,27,283,155,411,91,347,219,475,59,315,187,443,123,379,251,507,7,263,135,391,71,327,199,455,39,295,167,423,103,359,231,487,23,279,151,407,87,343,215,471,55,311,183,439,119,375,247,503,15,271,143,399,79,335,207,463,47,303,175,431,111,367,239,495,31,287,159,415,95,351,223,479,63,319,191,447,127,383,255,511,0,64,32,96,16,80,48,112,8,72,40,104,24,88,56,120,4,68,36,100,20,84,52,116,3,131,67,195,35,163,99,227].map(((t,e)=>[t,nt[e]])));const rt=Y([[30,5]]);function it(t,e,n,r,i){const o=this;o.Ht=t,o.Kt=e,o.Lt=n,o.Tt=r,o.jt=i}et.xt=Z([0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30,1,17,9,25,5,21,13,29,3,19,11,27,7,23].map(((t,e)=>[t,rt[e]]))),et.Ft=new et(et.Rt,tt.Dt,257,286,15),et.Ot=new et(et.xt,tt.Ut,0,30,15),et.Wt=new et(null,tt.Mt,0,19,7);const ot=[new it(0,0,0,0,0),new it(4,4,8,4,1),new it(4,5,16,8,1),new it(4,6,32,32,1),new it(4,4,16,16,2),new it(8,16,32,32,2),new it(8,16,128,128,2),new it(8,32,128,256,2),new it(32,128,258,1024,2),new it(32,258,258,4096,2)],st=["need dictionary","stream end","","","stream error","data error","","buffer error","",""];function ft(t,e,n,r){const i=t[2*e],o=t[2*n];return o>i||i==o&&r[e]<=r[n]}function ct(){const t=this;let e,r,s,f,c,l,u,a,w,h,d,p,y,b,k,g,v,m,S,z,_,I,A,C,V,B,E,D,U,M,P,R,H;const K=new tt,L=new tt,T=new tt;let j,x,F,O,W,q;function G(){let e;for(e=0;286>e;e++)P[2*e]=0;for(e=0;30>e;e++)R[2*e]=0;for(e=0;19>e;e++)H[2*e]=0;P[512]=1,t.kt=t.gt=0,x=F=0}function J(t,e){let n,r=-1,i=t[1],o=0,s=7,f=4;0===i&&(s=138,f=3),t[2*(e+1)+1]=65535;for(let c=0;e>=c;c++)n=i,i=t[2*(c+1)+1],++o<s&&n==i||(f>o?H[2*n]+=o:0!==n?(n!=r&&H[2*n]++,H[32]++):o>10?H[36]++:H[34]++,o=0,r=n,0===i?(s=138,f=3):n==i?(s=6,f=3):(s=7,f=4))}function N(e){t.qt[t.pending++]=e}function Q(t){N(255&t),N(t>>>8&255)}function X(t,e){let n;const r=e;q>16-r?(n=t,W|=n<<q&65535,Q(W),W=n>>>16-q,q+=r-16):(W|=t<<q&65535,q+=r)}function Y(t,e){const n=2*t;X(65535&e[n],65535&e[n+1])}function Z(t,e){let n,r,i=-1,o=t[1],s=0,f=7,c=4;for(0===o&&(f=138,c=3),n=0;e>=n;n++)if(r=o,o=t[2*(n+1)+1],++s>=f||r!=o){if(c>s)do{Y(r,H)}while(0!=--s);else 0!==r?(r!=i&&(Y(r,H),s--),Y(16,H),X(s-3,2)):s>10?(Y(18,H),X(s-11,7)):(Y(17,H),X(s-3,3));s=0,i=r,0===o?(f=138,c=3):r==o?(f=6,c=3):(f=7,c=4)}}function $(){16==q?(Q(W),W=0,q=0):8>q||(N(255&W),W>>>=8,q-=8)}function nt(e,r){let i,o,s;if(t.Gt[x]=e,t.Jt[x]=255&r,x++,0===e?P[2*r]++:(F++,e--,P[2*(tt.Ct[r]+256+1)]++,R[2*tt.Et(e)]++),0==(8191&x)&&E>2){for(i=8*x,o=_-v,s=0;30>s;s++)i+=R[2*s]*(5+tt.Ut[s]);if(i>>>=3,F<n.floor(x/2)&&i<n.floor(o/2))return!0}return x==j-1}function rt(e,n){let r,i,o,s,f=0;if(0!==x)do{r=t.Gt[f],i=t.Jt[f],f++,0===r?Y(i,e):(o=tt.Ct[i],Y(o+256+1,e),s=tt.Dt[o],0!==s&&(i-=tt.Vt[o],X(i,s)),r--,o=tt.Et(r),Y(o,n),s=tt.Ut[o],0!==s&&(r-=tt.Bt[o],X(r,s)))}while(x>f);Y(256,e),O=e[513]}function it(){q>8?Q(W):q>0&&N(255&W),W=0,q=0}function ct(e,n,r){X(0+(r?1:0),3),((e,n)=>{it(),O=8,Q(n),Q(~n),t.qt.set(a.subarray(e,e+n),t.pending),t.pending+=n})(e,n)}function lt(n){((e,n,r)=>{let i,o,s=0;E>0?(K.ft(t),L.ft(t),s=(()=>{let e;for(J(P,K.vt),J(R,L.vt),T.ft(t),e=18;e>=3&&0===H[2*tt.Pt[e]+1];e--);return t.kt+=14+3*(e+1),e})(),i=t.kt+3+7>>>3,o=t.gt+3+7>>>3,o>i||(i=o)):i=o=n+5,n+4>i||-1==e?o==i?(X(2+(r?1:0),3),rt(et.Rt,et.xt)):(X(4+(r?1:0),3),((t,e,n)=>{let r;for(X(t-257,5),X(e-1,5),X(n-4,4),r=0;n>r;r++)X(H[2*tt.Pt[r]+1],3);Z(P,t-1),Z(R,e-1)})(K.vt+1,L.vt+1,s+1),rt(P,R)):ct(e,n,r),G(),r&&it()})(0>v?-1:v,_-v,n),v=_,e.Nt()}function ut(){let t,n,r,i;do{if(i=w-A-_,0===i&&0===_&&0===A)i=c;else if(-1==i)i--;else if(_>=c+c-262){a.set(a.subarray(c,c+c),0),I-=c,_-=c,v-=c,t=y,r=t;do{n=65535&d[--r],d[r]=c>n?0:n-c}while(0!=--t);t=c,r=t;do{n=65535&h[--r],h[r]=c>n?0:n-c}while(0!=--t);i+=c}if(0===e.Qt)return;t=e.Xt(a,_+A,i),A+=t,3>A||(p=255&a[_],p=(p<<g^255&a[_+1])&k)}while(262>A&&0!==e.Qt)}function at(t){let e,n,r=V,i=_,o=C;const s=_>c-262?_-(c-262):0;let f=M;const l=u,w=_+258;let d=a[i+o-1],p=a[i+o];U>C||(r>>=2),f>A&&(f=A);do{if(e=t,a[e+o]==p&&a[e+o-1]==d&&a[e]==a[i]&&a[++e]==a[i+1]){i+=2,e++;do{}while(a[++i]==a[++e]&&a[++i]==a[++e]&&a[++i]==a[++e]&&a[++i]==a[++e]&&a[++i]==a[++e]&&a[++i]==a[++e]&&a[++i]==a[++e]&&a[++i]==a[++e]&&w>i);if(n=258-(w-i),i=w-258,n>o){if(I=t,o=n,n>=f)break;d=a[i+o-1],p=a[i+o]}}}while((t=65535&h[t&l])>s&&0!=--r);return o>A?A:o}t.bt=[],t.At=[],t.yt=[],P=[],R=[],H=[],t.St=(e,n)=>{const r=t.yt,i=r[n];let o=n<<1;for(;o<=t.ht&&(o<t.ht&&ft(e,r[o+1],r[o],t.bt)&&o++,!ft(e,i,r[o],t.bt));)r[n]=r[o],n=o,o<<=1;r[n]=i},t.Yt=(e,S,I,x,F,J)=>(x||(x=8),F||(F=8),J||(J=0),e.Zt=null,-1==S&&(S=6),1>F||F>9||8!=x||9>I||I>15||0>S||S>9||0>J||J>2?-2:(e.$t=t,l=I,c=1<<l,u=c-1,b=F+7,y=1<<b,k=y-1,g=n.floor((b+3-1)/3),a=new i(2*c),h=[],d=[],j=1<<F+6,t.qt=new i(4*j),s=4*j,t.Gt=new o(j),t.Jt=new i(j),E=S,D=J,(e=>(e.te=e.ee=0,e.Zt=null,t.pending=0,t.ne=0,r=113,f=0,K.ct=P,K.ut=et.Ft,L.ct=R,L.ut=et.Ot,T.ct=H,T.ut=et.Wt,W=0,q=0,O=8,G(),(()=>{w=2*c,d[y-1]=0;for(let t=0;y-1>t;t++)d[t]=0;B=ot[E].Kt,U=ot[E].Ht,M=ot[E].Lt,V=ot[E].Tt,_=0,v=0,A=0,m=C=2,z=0,p=0})(),0))(e))),t.re=()=>42!=r&&113!=r&&666!=r?-2:(t.Jt=null,t.Gt=null,t.qt=null,d=null,h=null,a=null,t.$t=null,113==r?-3:0),t.ie=(t,e,n)=>{let r=0;return-1==e&&(e=6),0>e||e>9||0>n||n>2?-2:(ot[E].jt!=ot[e].jt&&0!==t.te&&(r=t.st(1)),E!=e&&(E=e,B=ot[E].Kt,U=ot[E].Ht,M=ot[E].Lt,V=ot[E].Tt),D=n,r)},t.oe=(t,e,n)=>{let i,o=n,s=0;if(!e||42!=r)return-2;if(3>o)return 0;for(o>c-262&&(o=c-262,s=n-o),a.set(e.subarray(s,s+o),0),_=o,v=o,p=255&a[0],p=(p<<g^255&a[1])&k,i=0;o-3>=i;i++)p=(p<<g^255&a[i+2])&k,h[i&u]=d[p],d[p]=i;return 0},t.st=(n,i)=>{let o,w,b,V,U;if(i>4||0>i)return-2;if(!n.se||!n.fe&&0!==n.Qt||666==r&&4!=i)return n.Zt=st[4],-2;if(0===n.ce)return n.Zt=st[7],-5;var M;if(e=n,V=f,f=i,42==r&&(w=8+(l-8<<4)<<8,b=(E-1&255)>>1,b>3&&(b=3),w|=b<<6,0!==_&&(w|=32),w+=31-w%31,r=113,N((M=w)>>8&255),N(255&M)),0!==t.pending){if(e.Nt(),0===e.ce)return f=-1,0}else if(0===e.Qt&&V>=i&&4!=i)return e.Zt=st[7],-5;if(666==r&&0!==e.Qt)return n.Zt=st[7],-5;if(0!==e.Qt||0!==A||0!=i&&666!=r){switch(U=-1,ot[E].jt){case 0:U=(t=>{let n,r=65535;for(r>s-5&&(r=s-5);;){if(1>=A){if(ut(),0===A&&0==t)return 0;if(0===A)break}if(_+=A,A=0,n=v+r,(0===_||_>=n)&&(A=_-n,_=n,lt(!1),0===e.ce))return 0;if(_-v>=c-262&&(lt(!1),0===e.ce))return 0}return lt(4==t),0===e.ce?4==t?2:0:4==t?3:1})(i);break;case 1:U=(t=>{let n,r=0;for(;;){if(262>A){if(ut(),262>A&&0==t)return 0;if(0===A)break}if(3>A||(p=(p<<g^255&a[_+2])&k,r=65535&d[p],h[_&u]=d[p],d[p]=_),0===r||(_-r&65535)>c-262||2!=D&&(m=at(r)),3>m)n=nt(0,255&a[_]),A--,_++;else if(n=nt(_-I,m-3),A-=m,m>B||3>A)_+=m,m=0,p=255&a[_],p=(p<<g^255&a[_+1])&k;else{m--;do{_++,p=(p<<g^255&a[_+2])&k,r=65535&d[p],h[_&u]=d[p],d[p]=_}while(0!=--m);_++}if(n&&(lt(!1),0===e.ce))return 0}return lt(4==t),0===e.ce?4==t?2:0:4==t?3:1})(i);break;case 2:U=(t=>{let n,r,i=0;for(;;){if(262>A){if(ut(),262>A&&0==t)return 0;if(0===A)break}if(3>A||(p=(p<<g^255&a[_+2])&k,i=65535&d[p],h[_&u]=d[p],d[p]=_),C=m,S=I,m=2,0!==i&&B>C&&c-262>=(_-i&65535)&&(2!=D&&(m=at(i)),5>=m&&(1==D||3==m&&_-I>4096)&&(m=2)),3>C||m>C)if(0!==z){if(n=nt(0,255&a[_-1]),n&&lt(!1),_++,A--,0===e.ce)return 0}else z=1,_++,A--;else{r=_+A-3,n=nt(_-1-S,C-3),A-=C-1,C-=2;do{++_>r||(p=(p<<g^255&a[_+2])&k,i=65535&d[p],h[_&u]=d[p],d[p]=_)}while(0!=--C);if(z=0,m=2,_++,n&&(lt(!1),0===e.ce))return 0}}return 0!==z&&(n=nt(0,255&a[_-1]),z=0),lt(4==t),0===e.ce?4==t?2:0:4==t?3:1})(i)}if(2!=U&&3!=U||(r=666),0==U||2==U)return 0===e.ce&&(f=-1),0;if(1==U){if(1==i)X(2,3),Y(256,et.Rt),$(),9>1+O+10-q&&(X(2,3),Y(256,et.Rt),$()),O=7;else if(ct(0,0,!1),3==i)for(o=0;y>o;o++)d[o]=0;if(e.Nt(),0===e.ce)return f=-1,0}}return 4!=i?0:1}}function lt(){const t=this;t.le=0,t.ue=0,t.Qt=0,t.te=0,t.ce=0,t.ee=0}function ut(t){const e=new lt,o=(s=t&&t.rt?t.rt:65536)+5*(n.floor(s/16383)+1);var s;const f=new i(o);let c=t?t.level:-1;void 0===c&&(c=-1),e.Yt(c),e.se=f,this.append=(t,n)=>{let s,c,l=0,u=0,a=0;const w=[];if(t.length){e.le=0,e.fe=t,e.Qt=t.length;do{if(e.ue=0,e.ce=o,s=e.st(0),0!=s)throw new r("deflating: "+e.Zt);e.ue&&(e.ue==o?w.push(new i(f)):w.push(f.slice(0,e.ue))),a+=e.ue,n&&e.le>0&&e.le!=l&&(n(e.le),l=e.le)}while(e.Qt>0||0===e.ce);return w.length>1?(c=new i(a),w.forEach((t=>{c.set(t,u),u+=t.length}))):c=w[0]||new i(0),c}},this.flush=()=>{let t,n,s=0,c=0;const l=[];do{if(e.ue=0,e.ce=o,t=e.st(4),1!=t&&0!=t)throw new r("deflating: "+e.Zt);o-e.ce>0&&l.push(f.slice(0,e.ue)),c+=e.ue}while(e.Qt>0||0===e.ce);return e.re(),n=new i(c),l.forEach((t=>{n.set(t,s),s+=t.length})),n}}lt.prototype={Yt:function(t,e){const n=this;return n.$t=new ct,e||(e=15),n.$t.Yt(n,t,e)},st:function(t){const e=this;return e.$t?e.$t.st(e,t):-2},re:function(){const t=this;if(!t.$t)return-2;const e=t.$t.re();return t.$t=null,e},ie:function(t,e){const n=this;return n.$t?n.$t.ie(n,t,e):-2},oe:function(t,e){const n=this;return n.$t?n.$t.oe(n,t,e):-2},Xt:function(t,e,n){const r=this;let i=r.Qt;return i>n&&(i=n),0===i?0:(r.Qt-=i,t.set(r.fe.subarray(r.le,r.le+i),e),r.le+=i,r.te+=i,i)},Nt:function(){const t=this;let e=t.$t.pending;e>t.ce&&(e=t.ce),0!==e&&(t.se.set(t.$t.qt.subarray(t.$t.ne,t.$t.ne+e),t.ue),t.ue+=e,t.$t.ne+=e,t.ee+=e,t.ce-=e,t.$t.pending-=e,0===t.$t.pending&&(t.$t.ne=0))}};const at=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],wt=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],ht=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],dt=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],pt=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,112,112],yt=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],bt=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];function kt(){let t,e,n,r,i,o;function s(t,e,s,f,c,l,u,a,w,h,d){let p,y,b,k,g,v,m,S,z,_,I,A,C,V,B;_=0,g=s;do{n[t[e+_]]++,_++,g--}while(0!==g);if(n[0]==s)return u[0]=-1,a[0]=0,0;for(S=a[0],v=1;15>=v&&0===n[v];v++);for(m=v,v>S&&(S=v),g=15;0!==g&&0===n[g];g--);for(b=g,S>g&&(S=g),a[0]=S,V=1<<v;g>v;v++,V<<=1)if(0>(V-=n[v]))return-3;if(0>(V-=n[g]))return-3;for(n[g]+=V,o[1]=v=0,_=1,C=2;0!=--g;)o[C]=v+=n[_],C++,_++;g=0,_=0;do{0!==(v=t[e+_])&&(d[o[v]++]=g),_++}while(++g<s);for(s=o[b],o[0]=g=0,_=0,k=-1,A=-S,i[0]=0,I=0,B=0;b>=m;m++)for(p=n[m];0!=p--;){for(;m>A+S;){if(k++,A+=S,B=b-A,B=B>S?S:B,(y=1<<(v=m-A))>p+1&&(y-=p+1,C=m,B>v))for(;++v<B&&(y<<=1)>n[++C];)y-=n[C];if(B=1<<v,h[0]+B>1440)return-3;i[k]=I=h[0],h[0]+=B,0!==k?(o[k]=g,r[0]=v,r[1]=S,v=g>>>A-S,r[2]=I-i[k-1]-v,w.set(r,3*(i[k-1]+v))):u[0]=I}for(r[1]=m-A,s>_?d[_]<f?(r[0]=256>d[_]?0:96,r[2]=d[_++]):(r[0]=l[d[_]-f]+16+64,r[2]=c[d[_++]-f]):r[0]=192,y=1<<m-A,v=g>>>A;B>v;v+=y)w.set(r,3*(I+v));for(v=1<<m-1;0!=(g&v);v>>>=1)g^=v;for(g^=v,z=(1<<A)-1;(g&z)!=o[k];)k--,A-=S,z=(1<<A)-1}return 0!==V&&1!=b?-5:0}function c(s){let c;for(t||(t=[],e=[],n=new f(16),r=[],i=new f(15),o=new f(16)),e.length<s&&(e=[]),c=0;s>c;c++)e[c]=0;for(c=0;16>c;c++)n[c]=0;for(c=0;3>c;c++)r[c]=0;i.set(n.subarray(0,15),0),o.set(n.subarray(0,16),0)}this.ae=(n,r,i,o,f)=>{let l;return c(19),t[0]=0,l=s(n,0,19,19,null,null,i,r,o,t,e),-3==l?f.Zt="oversubscribed dynamic bit lengths tree":-5!=l&&0!==r[0]||(f.Zt="incomplete dynamic bit lengths tree",l=-3),l},this.we=(n,r,i,o,f,l,u,a,w)=>{let h;return c(288),t[0]=0,h=s(i,0,n,257,dt,pt,l,o,a,t,e),0!=h||0===o[0]?(-3==h?w.Zt="oversubscribed literal/length tree":-4!=h&&(w.Zt="incomplete literal/length tree",h=-3),h):(c(288),h=s(i,n,r,0,yt,bt,u,f,a,t,e),0!=h||0===f[0]&&n>257?(-3==h?w.Zt="oversubscribed distance tree":-5==h?(w.Zt="incomplete distance tree",h=-3):-4!=h&&(w.Zt="empty distance tree with lengths",h=-3),h):0)}}function gt(){const t=this;let e,n,r,i,o=0,s=0,f=0,c=0,l=0,u=0,a=0,w=0,h=0,d=0;function p(t,e,n,r,i,o,s,f){let c,l,u,a,w,h,d,p,y,b,k,g,v,m,S,z;d=f.le,p=f.Qt,w=s.he,h=s.de,y=s.write,b=y<s.read?s.read-y-1:s.end-y,k=at[t],g=at[e];do{for(;20>h;)p--,w|=(255&f.pe(d++))<<h,h+=8;if(c=w&k,l=n,u=r,z=3*(u+c),0!==(a=l[z]))for(;;){if(w>>=l[z+1],h-=l[z+1],0!=(16&a)){for(a&=15,v=l[z+2]+(w&at[a]),w>>=a,h-=a;15>h;)p--,w|=(255&f.pe(d++))<<h,h+=8;for(c=w&g,l=i,u=o,z=3*(u+c),a=l[z];;){if(w>>=l[z+1],h-=l[z+1],0!=(16&a)){for(a&=15;a>h;)p--,w|=(255&f.pe(d++))<<h,h+=8;if(m=l[z+2]+(w&at[a]),w>>=a,h-=a,b-=v,m>y){S=y-m;do{S+=s.end}while(0>S);if(a=s.end-S,v>a){if(v-=a,y-S>0&&a>y-S)do{s.ye[y++]=s.ye[S++]}while(0!=--a);else s.ye.set(s.ye.subarray(S,S+a),y),y+=a,S+=a,a=0;S=0}}else S=y-m,y-S>0&&2>y-S?(s.ye[y++]=s.ye[S++],s.ye[y++]=s.ye[S++],v-=2):(s.ye.set(s.ye.subarray(S,S+2),y),y+=2,S+=2,v-=2);if(y-S>0&&v>y-S)do{s.ye[y++]=s.ye[S++]}while(0!=--v);else s.ye.set(s.ye.subarray(S,S+v),y),y+=v,S+=v,v=0;break}if(0!=(64&a))return f.Zt="invalid distance code",v=f.Qt-p,v=v>h>>3?h>>3:v,p+=v,d-=v,h-=v<<3,s.he=w,s.de=h,f.Qt=p,f.te+=d-f.le,f.le=d,s.write=y,-3;c+=l[z+2],c+=w&at[a],z=3*(u+c),a=l[z]}break}if(0!=(64&a))return 0!=(32&a)?(v=f.Qt-p,v=v>h>>3?h>>3:v,p+=v,d-=v,h-=v<<3,s.he=w,s.de=h,f.Qt=p,f.te+=d-f.le,f.le=d,s.write=y,1):(f.Zt="invalid literal/length code",v=f.Qt-p,v=v>h>>3?h>>3:v,p+=v,d-=v,h-=v<<3,s.he=w,s.de=h,f.Qt=p,f.te+=d-f.le,f.le=d,s.write=y,-3);if(c+=l[z+2],c+=w&at[a],z=3*(u+c),0===(a=l[z])){w>>=l[z+1],h-=l[z+1],s.ye[y++]=l[z+2],b--;break}}else w>>=l[z+1],h-=l[z+1],s.ye[y++]=l[z+2],b--}while(b>=258&&p>=10);return v=f.Qt-p,v=v>h>>3?h>>3:v,p+=v,d-=v,h-=v<<3,s.he=w,s.de=h,f.Qt=p,f.te+=d-f.le,f.le=d,s.write=y,0}t.init=(t,o,s,f,c,l)=>{e=0,a=t,w=o,r=s,h=f,i=c,d=l,n=null},t.be=(t,y,b)=>{let k,g,v,m,S,z,_,I=0,A=0,C=0;for(C=y.le,m=y.Qt,I=t.he,A=t.de,S=t.write,z=S<t.read?t.read-S-1:t.end-S;;)switch(e){case 0:if(z>=258&&m>=10&&(t.he=I,t.de=A,y.Qt=m,y.te+=C-y.le,y.le=C,t.write=S,b=p(a,w,r,h,i,d,t,y),C=y.le,m=y.Qt,I=t.he,A=t.de,S=t.write,z=S<t.read?t.read-S-1:t.end-S,0!=b)){e=1==b?7:9;break}f=a,n=r,s=h,e=1;case 1:for(k=f;k>A;){if(0===m)return t.he=I,t.de=A,y.Qt=m,y.te+=C-y.le,y.le=C,t.write=S,t.ke(y,b);b=0,m--,I|=(255&y.pe(C++))<<A,A+=8}if(g=3*(s+(I&at[k])),I>>>=n[g+1],A-=n[g+1],v=n[g],0===v){c=n[g+2],e=6;break}if(0!=(16&v)){l=15&v,o=n[g+2],e=2;break}if(0==(64&v)){f=v,s=g/3+n[g+2];break}if(0!=(32&v)){e=7;break}return e=9,y.Zt="invalid literal/length code",b=-3,t.he=I,t.de=A,y.Qt=m,y.te+=C-y.le,y.le=C,t.write=S,t.ke(y,b);case 2:for(k=l;k>A;){if(0===m)return t.he=I,t.de=A,y.Qt=m,y.te+=C-y.le,y.le=C,t.write=S,t.ke(y,b);b=0,m--,I|=(255&y.pe(C++))<<A,A+=8}o+=I&at[k],I>>=k,A-=k,f=w,n=i,s=d,e=3;case 3:for(k=f;k>A;){if(0===m)return t.he=I,t.de=A,y.Qt=m,y.te+=C-y.le,y.le=C,t.write=S,t.ke(y,b);b=0,m--,I|=(255&y.pe(C++))<<A,A+=8}if(g=3*(s+(I&at[k])),I>>=n[g+1],A-=n[g+1],v=n[g],0!=(16&v)){l=15&v,u=n[g+2],e=4;break}if(0==(64&v)){f=v,s=g/3+n[g+2];break}return e=9,y.Zt="invalid distance code",b=-3,t.he=I,t.de=A,y.Qt=m,y.te+=C-y.le,y.le=C,t.write=S,t.ke(y,b);case 4:for(k=l;k>A;){if(0===m)return t.he=I,t.de=A,y.Qt=m,y.te+=C-y.le,y.le=C,t.write=S,t.ke(y,b);b=0,m--,I|=(255&y.pe(C++))<<A,A+=8}u+=I&at[k],I>>=k,A-=k,e=5;case 5:for(_=S-u;0>_;)_+=t.end;for(;0!==o;){if(0===z&&(S==t.end&&0!==t.read&&(S=0,z=S<t.read?t.read-S-1:t.end-S),0===z&&(t.write=S,b=t.ke(y,b),S=t.write,z=S<t.read?t.read-S-1:t.end-S,S==t.end&&0!==t.read&&(S=0,z=S<t.read?t.read-S-1:t.end-S),0===z)))return t.he=I,t.de=A,y.Qt=m,y.te+=C-y.le,y.le=C,t.write=S,t.ke(y,b);t.ye[S++]=t.ye[_++],z--,_==t.end&&(_=0),o--}e=0;break;case 6:if(0===z&&(S==t.end&&0!==t.read&&(S=0,z=S<t.read?t.read-S-1:t.end-S),0===z&&(t.write=S,b=t.ke(y,b),S=t.write,z=S<t.read?t.read-S-1:t.end-S,S==t.end&&0!==t.read&&(S=0,z=S<t.read?t.read-S-1:t.end-S),0===z)))return t.he=I,t.de=A,y.Qt=m,y.te+=C-y.le,y.le=C,t.write=S,t.ke(y,b);b=0,t.ye[S++]=c,z--,e=0;break;case 7:if(A>7&&(A-=8,m++,C--),t.write=S,b=t.ke(y,b),S=t.write,z=S<t.read?t.read-S-1:t.end-S,t.read!=t.write)return t.he=I,t.de=A,y.Qt=m,y.te+=C-y.le,y.le=C,t.write=S,t.ke(y,b);e=8;case 8:return b=1,t.he=I,t.de=A,y.Qt=m,y.te+=C-y.le,y.le=C,t.write=S,t.ke(y,b);case 9:return b=-3,t.he=I,t.de=A,y.Qt=m,y.te+=C-y.le,y.le=C,t.write=S,t.ke(y,b);default:return b=-2,t.he=I,t.de=A,y.Qt=m,y.te+=C-y.le,y.le=C,t.write=S,t.ke(y,b)}},t.ge=()=>{}}kt.ve=(t,e,n,r)=>(t[0]=9,e[0]=5,n[0]=wt,r[0]=ht,0);const vt=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function mt(t,e){const n=this;let r,o=0,s=0,c=0,l=0;const u=[0],a=[0],w=new gt;let h=0,d=new f(4320);const p=new kt;n.de=0,n.he=0,n.ye=new i(e),n.end=e,n.read=0,n.write=0,n.reset=(t,e)=>{e&&(e[0]=0),6==o&&w.ge(t),o=0,n.de=0,n.he=0,n.read=n.write=0},n.reset(t,null),n.ke=(t,e)=>{let r,i,o;return i=t.ue,o=n.read,r=(o>n.write?n.end:n.write)-o,r>t.ce&&(r=t.ce),0!==r&&-5==e&&(e=0),t.ce-=r,t.ee+=r,t.se.set(n.ye.subarray(o,o+r),i),i+=r,o+=r,o==n.end&&(o=0,n.write==n.end&&(n.write=0),r=n.write-o,r>t.ce&&(r=t.ce),0!==r&&-5==e&&(e=0),t.ce-=r,t.ee+=r,t.se.set(n.ye.subarray(o,o+r),i),i+=r,o+=r),t.ue=i,n.read=o,e},n.be=(t,e)=>{let i,f,y,b,k,g,v,m;for(b=t.le,k=t.Qt,f=n.he,y=n.de,g=n.write,v=g<n.read?n.read-g-1:n.end-g;;){let S,z,_,I,A,C,V,B;switch(o){case 0:for(;3>y;){if(0===k)return n.he=f,n.de=y,t.Qt=k,t.te+=b-t.le,t.le=b,n.write=g,n.ke(t,e);e=0,k--,f|=(255&t.pe(b++))<<y,y+=8}switch(i=7&f,h=1&i,i>>>1){case 0:f>>>=3,y-=3,i=7&y,f>>>=i,y-=i,o=1;break;case 1:S=[],z=[],_=[[]],I=[[]],kt.ve(S,z,_,I),w.init(S[0],z[0],_[0],0,I[0],0),f>>>=3,y-=3,o=6;break;case 2:f>>>=3,y-=3,o=3;break;case 3:return f>>>=3,y-=3,o=9,t.Zt="invalid block type",e=-3,n.he=f,n.de=y,t.Qt=k,t.te+=b-t.le,t.le=b,n.write=g,n.ke(t,e)}break;case 1:for(;32>y;){if(0===k)return n.he=f,n.de=y,t.Qt=k,t.te+=b-t.le,t.le=b,n.write=g,n.ke(t,e);e=0,k--,f|=(255&t.pe(b++))<<y,y+=8}if((~f>>>16&65535)!=(65535&f))return o=9,t.Zt="invalid stored block lengths",e=-3,n.he=f,n.de=y,t.Qt=k,t.te+=b-t.le,t.le=b,n.write=g,n.ke(t,e);s=65535&f,f=y=0,o=0!==s?2:0!==h?7:0;break;case 2:if(0===k)return n.he=f,n.de=y,t.Qt=k,t.te+=b-t.le,t.le=b,n.write=g,n.ke(t,e);if(0===v&&(g==n.end&&0!==n.read&&(g=0,v=g<n.read?n.read-g-1:n.end-g),0===v&&(n.write=g,e=n.ke(t,e),g=n.write,v=g<n.read?n.read-g-1:n.end-g,g==n.end&&0!==n.read&&(g=0,v=g<n.read?n.read-g-1:n.end-g),0===v)))return n.he=f,n.de=y,t.Qt=k,t.te+=b-t.le,t.le=b,n.write=g,n.ke(t,e);if(e=0,i=s,i>k&&(i=k),i>v&&(i=v),n.ye.set(t.Xt(b,i),g),b+=i,k-=i,g+=i,v-=i,0!=(s-=i))break;o=0!==h?7:0;break;case 3:for(;14>y;){if(0===k)return n.he=f,n.de=y,t.Qt=k,t.te+=b-t.le,t.le=b,n.write=g,n.ke(t,e);e=0,k--,f|=(255&t.pe(b++))<<y,y+=8}if(c=i=16383&f,(31&i)>29||(i>>5&31)>29)return o=9,t.Zt="too many length or distance symbols",e=-3,n.he=f,n.de=y,t.Qt=k,t.te+=b-t.le,t.le=b,n.write=g,n.ke(t,e);if(i=258+(31&i)+(i>>5&31),!r||r.length<i)r=[];else for(m=0;i>m;m++)r[m]=0;f>>>=14,y-=14,l=0,o=4;case 4:for(;4+(c>>>10)>l;){for(;3>y;){if(0===k)return n.he=f,n.de=y,t.Qt=k,t.te+=b-t.le,t.le=b,n.write=g,n.ke(t,e);e=0,k--,f|=(255&t.pe(b++))<<y,y+=8}r[vt[l++]]=7&f,f>>>=3,y-=3}for(;19>l;)r[vt[l++]]=0;if(u[0]=7,i=p.ae(r,u,a,d,t),0!=i)return-3==(e=i)&&(r=null,o=9),n.he=f,n.de=y,t.Qt=k,t.te+=b-t.le,t.le=b,n.write=g,n.ke(t,e);l=0,o=5;case 5:for(;i=c,258+(31&i)+(i>>5&31)>l;){let s,w;for(i=u[0];i>y;){if(0===k)return n.he=f,n.de=y,t.Qt=k,t.te+=b-t.le,t.le=b,n.write=g,n.ke(t,e);e=0,k--,f|=(255&t.pe(b++))<<y,y+=8}if(i=d[3*(a[0]+(f&at[i]))+1],w=d[3*(a[0]+(f&at[i]))+2],16>w)f>>>=i,y-=i,r[l++]=w;else{for(m=18==w?7:w-14,s=18==w?11:3;i+m>y;){if(0===k)return n.he=f,n.de=y,t.Qt=k,t.te+=b-t.le,t.le=b,n.write=g,n.ke(t,e);e=0,k--,f|=(255&t.pe(b++))<<y,y+=8}if(f>>>=i,y-=i,s+=f&at[m],f>>>=m,y-=m,m=l,i=c,m+s>258+(31&i)+(i>>5&31)||16==w&&1>m)return r=null,o=9,t.Zt="invalid bit length repeat",e=-3,n.he=f,n.de=y,t.Qt=k,t.te+=b-t.le,t.le=b,n.write=g,n.ke(t,e);w=16==w?r[m-1]:0;do{r[m++]=w}while(0!=--s);l=m}}if(a[0]=-1,A=[],C=[],V=[],B=[],A[0]=9,C[0]=6,i=c,i=p.we(257+(31&i),1+(i>>5&31),r,A,C,V,B,d,t),0!=i)return-3==i&&(r=null,o=9),e=i,n.he=f,n.de=y,t.Qt=k,t.te+=b-t.le,t.le=b,n.write=g,n.ke(t,e);w.init(A[0],C[0],d,V[0],d,B[0]),o=6;case 6:if(n.he=f,n.de=y,t.Qt=k,t.te+=b-t.le,t.le=b,n.write=g,1!=(e=w.be(n,t,e)))return n.ke(t,e);if(e=0,w.ge(t),b=t.le,k=t.Qt,f=n.he,y=n.de,g=n.write,v=g<n.read?n.read-g-1:n.end-g,0===h){o=0;break}o=7;case 7:if(n.write=g,e=n.ke(t,e),g=n.write,v=g<n.read?n.read-g-1:n.end-g,n.read!=n.write)return n.he=f,n.de=y,t.Qt=k,t.te+=b-t.le,t.le=b,n.write=g,n.ke(t,e);o=8;case 8:return e=1,n.he=f,n.de=y,t.Qt=k,t.te+=b-t.le,t.le=b,n.write=g,n.ke(t,e);case 9:return e=-3,n.he=f,n.de=y,t.Qt=k,t.te+=b-t.le,t.le=b,n.write=g,n.ke(t,e);default:return e=-2,n.he=f,n.de=y,t.Qt=k,t.te+=b-t.le,t.le=b,n.write=g,n.ke(t,e)}}},n.ge=t=>{n.reset(t,null),n.ye=null,d=null},n.me=(t,e,r)=>{n.ye.set(t.subarray(e,e+r),0),n.read=n.write=r},n.Se=()=>1==o?1:0}const St=[0,0,255,255];function zt(){const t=this;function e(t){return t&&t.ze?(t.te=t.ee=0,t.Zt=null,t.ze.mode=7,t.ze._e.reset(t,null),0):-2}t.mode=0,t.method=0,t.Ie=[0],t.Ae=0,t.marker=0,t.Ce=0,t.Ve=e=>(t._e&&t._e.ge(e),t._e=null,0),t.Be=(n,r)=>(n.Zt=null,t._e=null,8>r||r>15?(t.Ve(n),-2):(t.Ce=r,n.ze._e=new mt(n,1<<r),e(n),0)),t.it=(t,e)=>{let n,r;if(!t||!t.ze||!t.fe)return-2;const i=t.ze;for(e=4==e?-5:0,n=-5;;)switch(i.mode){case 0:if(0===t.Qt)return n;if(n=e,t.Qt--,t.te++,8!=(15&(i.method=t.pe(t.le++)))){i.mode=13,t.Zt="unknown compression method",i.marker=5;break}if(8+(i.method>>4)>i.Ce){i.mode=13,t.Zt="invalid win size",i.marker=5;break}i.mode=1;case 1:if(0===t.Qt)return n;if(n=e,t.Qt--,t.te++,r=255&t.pe(t.le++),((i.method<<8)+r)%31!=0){i.mode=13,t.Zt="incorrect header check",i.marker=5;break}if(0==(32&r)){i.mode=7;break}i.mode=2;case 2:if(0===t.Qt)return n;n=e,t.Qt--,t.te++,i.Ae=(255&t.pe(t.le++))<<24&4278190080,i.mode=3;case 3:if(0===t.Qt)return n;n=e,t.Qt--,t.te++,i.Ae+=(255&t.pe(t.le++))<<16&16711680,i.mode=4;case 4:if(0===t.Qt)return n;n=e,t.Qt--,t.te++,i.Ae+=(255&t.pe(t.le++))<<8&65280,i.mode=5;case 5:return 0===t.Qt?n:(n=e,t.Qt--,t.te++,i.Ae+=255&t.pe(t.le++),i.mode=6,2);case 6:return i.mode=13,t.Zt="need dictionary",i.marker=0,-2;case 7:if(n=i._e.be(t,n),-3==n){i.mode=13,i.marker=0;break}if(0==n&&(n=e),1!=n)return n;n=e,i._e.reset(t,i.Ie),i.mode=12;case 12:return t.Qt=0,1;case 13:return-3;default:return-2}},t.Ee=(t,e,n)=>{let r=0,i=n;if(!t||!t.ze||6!=t.ze.mode)return-2;const o=t.ze;return i<1<<o.Ce||(i=(1<<o.Ce)-1,r=n-i),o._e.me(e,r,i),o.mode=7,0},t.De=t=>{let n,r,i,o,s;if(!t||!t.ze)return-2;const f=t.ze;if(13!=f.mode&&(f.mode=13,f.marker=0),0===(n=t.Qt))return-5;for(r=t.le,i=f.marker;0!==n&&4>i;)t.pe(r)==St[i]?i++:i=0!==t.pe(r)?0:4-i,r++,n--;return t.te+=r-t.le,t.le=r,t.Qt=n,f.marker=i,4!=i?-3:(o=t.te,s=t.ee,e(t),t.te=o,t.ee=s,f.mode=7,0)},t.Ue=t=>t&&t.ze&&t.ze._e?t.ze._e.Se():-2}function _t(){}function It(t){const e=new _t,o=t&&t.rt?n.floor(2*t.rt):131072,s=new i(o);let f=!1;e.Be(),e.se=s,this.append=(t,n)=>{const c=[];let l,u,a=0,w=0,h=0;if(0!==t.length){e.le=0,e.fe=t,e.Qt=t.length;do{if(e.ue=0,e.ce=o,0!==e.Qt||f||(e.le=0,f=!0),l=e.it(0),f&&-5===l){if(0!==e.Qt)throw new r("inflating: bad input")}else if(0!==l&&1!==l)throw new r("inflating: "+e.Zt);if((f||1===l)&&e.Qt===t.length)throw new r("inflating: bad input");e.ue&&(e.ue===o?c.push(new i(s)):c.push(s.slice(0,e.ue))),h+=e.ue,n&&e.le>0&&e.le!=a&&(n(e.le),a=e.le)}while(e.Qt>0||0===e.ce);return c.length>1?(u=new i(h),c.forEach((t=>{u.set(t,w),w+=t.length}))):u=c[0]||new i(0),u}},this.flush=()=>{e.Ve()}}_t.prototype={Be:function(t){const e=this;return e.ze=new zt,t||(t=15),e.ze.Be(e,t)},it:function(t){const e=this;return e.ze?e.ze.it(e,t):-2},Ve:function(){const t=this;if(!t.ze)return-2;const e=t.ze.Ve(t);return t.ze=null,e},De:function(){const t=this;return t.ze?t.ze.De(t):-2},Ee:function(t,e){const n=this;return n.ze?n.ze.Ee(n,t,e):-2},pe:function(t){return this.fe[t]},Xt:function(t,e){return this.fe.subarray(t,t+e)}},self.initCodec=()=>{self.Deflate=ut,self.Inflate=It};\n'],{type:"text/javascript"}));t({workerScripts:{inflate:[e],deflate:[e]}})}})(z),t.BlobReader=Qt,t.BlobWriter=Lt,t.Data64URIReader=class extends Wt{constructor(t){super(),this.dataURI=t;let e=t.length;for(;"="==t.charAt(e-1);)e--;this.dataStart=t.indexOf(",")+1,this.size=s.floor(.75*(e-this.dataStart))}readUint8Array(t,e){const n=new f(e),r=4*s.floor(t/3),i=atob(this.dataURI.substring(r+this.dataStart,4*s.ceil((t+e)/3)+this.dataStart)),a=t-3*s.floor(r/4);for(let t=a;a+e>t;t++)n[t-a]=i.charCodeAt(t);return n}},t.Data64URIWriter=class extends Vt{constructor(t){super(),this.data="data:"+(t||"")+";base64,",this.pending=[]}writeUint8Array(t){super.writeUint8Array(t);let e=0,n=this.pending;const i=this.pending.length;for(this.pending="",e=0;e<3*s.floor((i+t.length)/3)-i;e++)n+=r.fromCharCode(t[e]);for(;e<t.length;e++)this.pending+=r.fromCharCode(t[e]);n.length>2?this.data+=v(n):this.pending=n}getData(){return this.data+v(this.pending)}},t.ERR_ABORT=Rt,t.ERR_BAD_FORMAT=ge,t.ERR_CENTRAL_DIRECTORY_NOT_FOUND=ke,t.ERR_DUPLICATED_NAME=Ne,t.ERR_ENCRYPTED=_e,t.ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND=be,t.ERR_EOCDR_NOT_FOUND=ye,t.ERR_EOCDR_ZIP64_NOT_FOUND=me,t.ERR_EXTRAFIELD_ZIP64_NOT_FOUND=Se,t.ERR_HTTP_RANGE=xt,t.ERR_INVALID_COMMENT=Ze,t.ERR_INVALID_ENCRYPTION_STRENGTH=qe,t.ERR_INVALID_ENTRY_COMMENT=Oe,t.ERR_INVALID_ENTRY_NAME=Ke,t.ERR_INVALID_EXTRAFIELD_DATA=Ye,t.ERR_INVALID_EXTRAFIELD_TYPE=Xe,t.ERR_INVALID_PASSWORD=B,t.ERR_INVALID_SIGNATURE=pt,t.ERR_INVALID_VERSION=Pe,t.ERR_LOCAL_FILE_HEADER_NOT_FOUND=ve,t.ERR_NOT_SEEKABLE_READER=Tt,t.ERR_UNSUPPORTED_COMPRESSION=ze,t.ERR_UNSUPPORTED_ENCRYPTION=Ae,t.ERR_UNSUPPORTED_FORMAT=$e,t.HttpRangeReader=class extends te{constructor(t,e={}){e.useRangeHeader=!0,super(t,e)}},t.HttpReader=te,t.ReadableStreamReader=class{constructor(t){this.readableStream=t,this.reader=t.getReader(),this.size=1/0,this.index=0,this.currentSize=0,this.pendingValue=new f}init(){this.initialized=!0}async readUint8Array(t,e){if(this.index!=t)throw new l(Tt);let n,r=new f(e),i=0;do{const t=await this.reader.read();let{value:s}=t;if(n=t.done,s?this.currentSize+=s.length:(s=this.pendingValue,this.pendingValue=new f),this.pendingValue.length){const t=new f(this.pendingValue.length+s.length);t.set(this.pendingValue),t.set(s,this.pendingValue.length),this.pendingValue=new f,s=t}i+s.length>e?(r.set(s.subarray(0,e),i),this.pendingValue=s.subarray(e),i+=e):(r.set(s,i),i+=s.length)}while(e>i&&!n);return n&&this.size==1/0&&(this.size=this.currentSize),this.size<e&&(r=r.slice(0,this.size),e=this.size),this.index+=e,r}},t.Reader=Wt,t.TextReader=class extends Wt{constructor(t){super(),this.blobReader=new Qt(new p([t],{type:It}))}init(){super.init(),this.blobReader.init(),this.size=this.blobReader.size}readUint8Array(t,e){return this.blobReader.readUint8Array(t,e)}},t.TextWriter=class extends Vt{constructor(t){super(),this.encoding=t,this.blob=new p([],{type:It})}writeUint8Array(t){super.writeUint8Array(t),this.blob=new p([this.blob,t.buffer],{type:It})}getData(){if(this.blob.text)return this.blob.text();{const t=new m;return new w(((e,n)=>{t.onload=t=>e(t.target.result),t.onerror=()=>n(t.error),t.readAsText(this.blob,this.encoding)}))}}},t.Uint8ArrayReader=class extends Wt{constructor(t){super(),this.array=t,this.size=t.length}readUint8Array(t,e){return this.array.slice(t,t+e)}},t.Uint8ArrayWriter=class extends Vt{constructor(){super(),this.array=new f(0)}writeUint8Array(t){super.writeUint8Array(t);const e=this.array;this.array=new f(e.length+t.length),this.array.set(e),this.array.set(t,e.length)}getData(){return this.array}},t.WritableStreamWriter=class extends Vt{constructor(t){super(),this.writableStream=t,this.writer=t.getWriter()}async writeUint8Array(t){return await this.writer.ready,this.writer.write(t)}async getData(){return await this.writer.ready,await this.writer.close(),this.writableStream}},t.Writer=Vt,t.ZipReader=class{constructor(t,e={}){n.assign(this,{reader:t,options:e,config:A()})}async*getEntriesGenerator(t={}){const e=this,r=e.reader;if(r.initialized||await r.init(),22>r.size)throw new l(ge);const i=await(async(t,e,n)=>{const r=new f(4);return Me(r).setUint32(0,101010256,!0),await i(22)||await i(s.min(1048582,n));async function i(e){const i=n-e,s=await He(t,i,e);for(let t=s.length-22;t>=0;t--)if(s[t]==r[0]&&s[t+1]==r[1]&&s[t+2]==r[2]&&s[t+3]==r[3])return{offset:i+t,buffer:s.slice(t,t+22).buffer}}})(r,0,r.size);if(!i)throw new l(ye);const a=Me(i);let o=Qe(a,12),c=Qe(a,16),d=Ve(a,8),u=0;if(c==ee||o==ee||d==ne){const t=Me(await He(r,i.offset-20,20));if(Qe(t,0)!=ae)throw new l(me);c=Le(t,8);let e=await He(r,c,56),n=Me(e);const s=i.offset-20-56;if(Qe(n,0)!=se&&c!=s){const t=c;c=s,u=c-t,e=await He(r,c,56),n=Me(e)}if(Qe(n,0)!=se)throw new l(be);d=Le(n,32),o=Le(n,40),c-=o}if(0>c||c>=r.size)throw new l(ge);let h=0,p=await He(r,c,o),g=Me(p);if(o){const t=i.offset-o;if(Qe(g,h)!=ie&&c!=t){const e=c;c=t,u=c-e,p=await He(r,c,o),g=Me(p)}}if(0>c||c>=r.size)throw new l(ge);for(let i=0;d>i;i++){const s=new De(r,e.config,e.options);if(Qe(g,h)!=ie)throw new l(ke);Fe(s,g,h+6);const a=!!s.bitFlag.languageEncodingFlag,o=h+46,c=o+s.filenameLength,f=c+s.extraFieldLength,y=Ve(g,h+4),m=0==(0&y);n.assign(s,{versionMadeBy:y,msDosCompatible:m,compressedSize:0,uncompressedSize:0,commentLength:Ve(g,h+32),directory:m&&16==(16&We(g,h+38)),offset:Qe(g,h+42)+u,internalFileAttribute:Qe(g,h+34),externalFileAttribute:Qe(g,h+38),rawFilename:p.subarray(o,c),filenameUTF8:a,commentUTF8:a,rawExtraField:p.subarray(c,f)});const b=f+s.commentLength;s.rawComment=p.subarray(f,b);const k=Ie(e,t,"filenameEncoding"),v=Ie(e,t,"commentEncoding"),[S,_]=await w.all([he(s.rawFilename,s.filenameUTF8?Re:k||Ce),he(s.rawComment,s.commentUTF8?Re:v||Ce)]);s.filename=S,s.comment=_,!s.directory&&s.filename.endsWith(le)&&(s.directory=!0),await xe(s,s,g,h+6);const A=new we(s);if(A.getData=(t,e)=>s.getData(t,A,e),h=b,t.onprogress)try{t.onprogress(i+1,d,new we(s))}catch(t){}yield A}return!0}async getEntries(t={}){const e=[],n=this.getEntriesGenerator(t);let r=n.next();for(;!(await r).done;)e.push((await r).value),r=n.next();return e}async close(){}},t.ZipWriter=class{constructor(t,e={}){n.assign(this,{writer:t,options:e,config:A(),files:new o,offset:t.size,pendingCompressedSize:0,pendingEntries:[],pendingAddFileCalls:new Set})}async add(t="",r,o={}){const c=this;if(Je>=c.config.maxWorkers)return new w(((e,n)=>c.pendingEntries.push({name:t,reader:r,options:o,resolve:e,reject:n})));{let p;Je++;try{return p=(async(t,r,o,c)=>{if(r=r.trim(),c.directory&&!r.endsWith(le)?r+=le:c.directory=r.endsWith(le),t.files.has(r))throw new l(Ne);const p=D(r);if(p.length>ne)throw new l(Ke);const g=c.comment||"",y=D(g);if(y.length>ne)throw new l(Oe);const m=t.options.version||c.version||0;if(m>ne)throw new l(Pe);const b=t.options.versionMadeBy||c.versionMadeBy||20;if(b>ne)throw new l(Pe);const k=nn(t,c,"lastModDate")||new a,v=nn(t,c,"lastAccessDate"),S=nn(t,c,"creationDate"),_=nn(t,c,"password"),A=nn(t,c,"encryptionStrength")||3,z=nn(t,c,"zipCrypto");if(void 0!==_&&void 0!==A&&(1>A||A>3))throw new l(qe);let R=new f(0);const C=c.extraField;if(C){let t=0,e=0;C.forEach((e=>t+=4+e.length)),R=new f(t),C.forEach(((t,n)=>{if(n>ne)throw new l(Xe);if(t.length>ne)throw new l(Ye);cn(R,new d([n]),e),cn(R,new d([t.length]),e+2),cn(R,t,e+4),e+=4+t.length}))}let E=nn(t,c,"extendedTimestamp");void 0===E&&(E=!0);let F=0,x=nn(t,c,"keepOrder");void 0===x&&(x=!0);let T=0,I=nn(t,c,"msDosCompatible");void 0===I&&(I=!0);const U=nn(t,c,"internalFileAttribute")||0,B=nn(t,c,"externalFileAttribute")||0;o&&(o.initialized||await o.init(),T=o.size,F=(t=>t+5*(s.floor(t/16383)+1))(T));let W=c.zip64||t.options.zip64||!1;if(t.offset+t.pendingCompressedSize>=ee||T>=ee||F>=ee){if(!1===c.zip64||!1===t.options.zip64||!x)throw new l($e);W=!0}t.pendingCompressedSize+=F,await w.resolve();const V=nn(t,c,"level"),Q=nn(t,c,"useWebWorkers"),L=nn(t,c,"bufferedWrite");let M=nn(t,c,"dataDescriptor"),H=nn(t,c,"dataDescriptorSignature");const N=nn(t,c,"signal");void 0===M&&(M=!0),M&&void 0===H&&(H=!1);const Z=await(async(t,r,a,o)=>{const c=t.files,d=t.writer,p=e.from(c.values()).pop();let g,y,m,b={};c.set(r,b);try{let k,v,S;if(o.keepOrder&&(k=p&&p.lock),b.lock=S=new w((t=>m=t)),o.bufferedWrite||t.lockWrite||!o.dataDescriptor?(v=new Lt,v.init(),g=!0):(t.lockWrite=new w((t=>y=t)),d.initialized||await d.init(),v=d),b=await(async(t,e,r,a)=>{const{rawFilename:o,lastAccessDate:c,creationDate:l,password:d,level:h,zip64:p,zipCrypto:w,dataDescriptor:g,dataDescriptorSignature:y,directory:m,version:b,versionMadeBy:k,rawComment:v,rawExtraField:S,useWebWorkers:_,onprogress:A,signal:z,encryptionStrength:R,extendedTimestamp:C,msDosCompatible:E,internalFileAttribute:D,externalFileAttribute:F}=a,x=!(!d||!d.length),T=0!==h&&!m;let I,U,B;if(x&&!w){I=new f(je.length+2);const t=ln(I);sn(t,0,39169),cn(I,je,2),rn(t,8,R)}else I=new f(0);if(C){B=new f(9+(c?4:0)+(l?4:0));const t=ln(B);sn(t,0,oe),sn(t,2,B.length-4),rn(t,4,1+(c?2:0)+(l?4:0)),an(t,5,s.floor(a.lastModDate.getTime()/1e3)),c&&an(t,9,s.floor(c.getTime()/1e3)),l&&an(t,13,s.floor(l.getTime()/1e3));try{U=new f(36);const t=ln(U),e=en(a.lastModDate);sn(t,0,10),sn(t,2,32),sn(t,8,1),sn(t,10,24),on(t,12,e),on(t,20,en(c)||e),on(t,28,en(l)||e)}catch(t){U=new f(0)}}else U=B=new f(0);const W={version:b||20,versionMadeBy:k,zip64:p,directory:!!m,filenameUTF8:!0,rawFilename:o,commentUTF8:!0,rawComment:v,rawExtraFieldZip64:new f(p?28:0),rawExtraFieldExtendedTimestamp:B,rawExtraFieldNTFS:U,rawExtraFieldAES:I,rawExtraField:S,extendedTimestamp:C,msDosCompatible:E,internalFileAttribute:D,externalFileAttribute:F};let V=W.uncompressedSize=0,Q=ce;g&&(Q|=8);let L=0;T&&(L=8),p&&(W.version=W.version>45?W.version:45),x&&(Q|=1,w||(W.version=W.version>51?W.version:51,L=99,T&&(W.rawExtraFieldAES[9]=8))),W.compressionMethod=L;const M=W.headerArray=new f(26),H=ln(M);sn(H,0,W.version),sn(H,2,Q),sn(H,4,L);const N=new u(1),Z=ln(N);let O;O=a.lastModDate<de?de:a.lastModDate>fe?fe:a.lastModDate,sn(Z,0,(O.getHours()<<6|O.getMinutes())<<5|O.getSeconds()/2),sn(Z,2,(O.getFullYear()-1980<<4|O.getMonth()+1)<<5|O.getDate());const K=N[0];an(H,6,K),sn(H,22,o.length);const P=I.length+B.length+U.length+W.rawExtraField.length;sn(H,24,P);const q=new f(30+o.length+P);let X;an(ln(q),0,re),cn(q,M,4),cn(q,o,30),cn(q,I,30+o.length),cn(q,B,30+o.length+I.length),cn(q,U,30+o.length+I.length+B.length),cn(q,W.rawExtraField,30+o.length+I.length+B.length+U.length);let Y=0;if(t){const n=await At(r.Deflate,{codecType:ut,level:h,password:d,encryptionStrength:R,zipCrypto:x&&w,passwordVerification:x&&w&&K>>8&255,signed:!0,compressed:T,encrypted:x,useWebWorkers:_},r);await e.writeUint8Array(q),W.dataWritten=!0,X=await Ct(n,t,e,0,(()=>t.size),r,{onprogress:A,signal:z}),V=W.uncompressedSize=t.size,Y=X.length}else await e.writeUint8Array(q),W.dataWritten=!0;let $,j=new f(0),G=0;if(g&&(j=new f(p?y?24:20:y?16:12),$=ln(j),y&&(G=4,an($,0,134695760))),t){const t=X.signature;if(x&&!w||void 0===t||(an(H,10,t),W.signature=t,g&&an($,G,t)),p){const t=ln(W.rawExtraFieldZip64);sn(t,0,1),sn(t,2,24),an(H,14,ee),on(t,12,i(Y)),an(H,18,ee),on(t,4,i(V)),g&&(on($,G+4,i(Y)),on($,G+12,i(V)))}else an(H,14,Y),an(H,18,V),g&&(an($,G+4,Y),an($,G+8,V))}g&&await e.writeUint8Array(j);const J=q.length+Y+j.length;return n.assign(W,{compressedSize:Y,lastModDate:O,rawLastModDate:K,creationDate:l,lastAccessDate:c,encrypted:x,length:J}),W})(a,v,t.config,o),b.lock=S,c.set(r,b),b.filename=r,g){let n=0;const r=v.getData();let i;await w.all([t.lockWrite,k]);do{i=e.from(c.values()).find((t=>t.writingBufferedData)),i&&await i.lock}while(i&&i.lock);if(b.writingBufferedData=!0,!o.dataDescriptor){const t=26,e=await tn(r,0,t),i=new h(e);b.encrypted&&!o.zipCrypto||an(i,14,b.signature),b.zip64?(an(i,18,ee),an(i,22,ee)):(an(i,18,b.compressedSize),an(i,22,b.uncompressedSize)),await d.writeUint8Array(new f(e)),n=t}await(async(t,e,n=0)=>{const r=536870912;await async function i(){if(n<e.size){const s=await tn(e,n,n+r);await t.writeUint8Array(new f(s)),n+=r,await i()}}()})(d,r,n),delete b.writingBufferedData}if(b.offset=t.offset,b.zip64)on(ln(b.rawExtraFieldZip64),20,i(b.offset));else if(b.offset>=ee)throw new l($e);return t.offset+=b.length,b}catch(e){throw(g&&b.writingBufferedData||!g&&b.dataWritten)&&(e.corruptedEntry=t.hasCorruptedEntries=!0,b.uncompressedSize&&(t.offset+=b.uncompressedSize)),c.delete(r),e}finally{m(),y&&y()}})(t,r,o,n.assign({},c,{rawFilename:p,rawComment:y,version:m,versionMadeBy:b,lastModDate:k,lastAccessDate:v,creationDate:S,rawExtraField:R,zip64:W,password:_,level:V,useWebWorkers:Q,encryptionStrength:A,extendedTimestamp:E,zipCrypto:z,bufferedWrite:L,keepOrder:x,dataDescriptor:M,dataDescriptorSignature:H,signal:N,msDosCompatible:I,internalFileAttribute:U,externalFileAttribute:B}));return F&&(t.pendingCompressedSize-=F),n.assign(Z,{name:r,comment:g,extraField:C}),new we(Z)})(c,t,r,o),this.pendingAddFileCalls.add(p),await p}finally{this.pendingAddFileCalls.delete(p),Je--;const t=c.pendingEntries.shift();t&&c.add(t.name,t.reader,t.options).then(t.resolve).catch(t.reject)}}}async close(t=new f(0),n={}){for(;this.pendingAddFileCalls.size;)await w.all(e.from(this.pendingAddFileCalls));return await(async(t,n,r)=>{const a=t.writer,o=t.files;let c=0,d=0,u=t.offset,h=o.size;for(const[,t]of o)d+=46+t.rawFilename.length+t.rawComment.length+t.rawExtraFieldZip64.length+t.rawExtraFieldAES.length+t.rawExtraFieldExtendedTimestamp.length+t.rawExtraFieldNTFS.length+t.rawExtraField.length;let p=r.zip64||t.options.zip64||!1;if(u>=ee||d>=ee||h>=ne){if(!1===r.zip64||!1===t.options.zip64)throw new l($e);p=!0}const w=new f(d+(p?98:22)),g=ln(w);if(n&&n.length){if(n.length>ne)throw new l(Ze);sn(g,c+20,n.length)}for(const[t,n]of e.from(o.values()).entries()){const{rawFilename:e,rawExtraFieldZip64:i,rawExtraFieldAES:a,rawExtraField:l,rawComment:d,versionMadeBy:u,headerArray:h,directory:p,zip64:y,msDosCompatible:m,internalFileAttribute:b,externalFileAttribute:k}=n;let v,S;if(n.extendedTimestamp){S=n.rawExtraFieldNTFS,v=new f(9);const t=ln(v);sn(t,0,oe),sn(t,2,v.length-4),rn(t,4,1),an(t,5,s.floor(n.lastModDate.getTime()/1e3))}else S=v=new f(0);const _=i.length+a.length+v.length+S.length+l.length;if(an(g,c,ie),sn(g,c+4,u),cn(w,h,c+6),sn(g,c+30,_),sn(g,c+32,d.length),an(g,c+34,b),k?an(g,c+38,k):p&&m&&rn(g,c+38,16),an(g,c+42,y?ee:n.offset),cn(w,e,c+46),cn(w,i,c+46+e.length),cn(w,a,c+46+e.length+i.length),cn(w,v,c+46+e.length+i.length+a.length),cn(w,S,c+46+e.length+i.length+a.length+v.length),cn(w,l,c+46+e.length+i.length+a.length+v.length+S.length),cn(w,d,c+46+e.length+_),c+=46+e.length+_+d.length,r.onprogress)try{r.onprogress(t+1,o.size,new we(n))}catch(t){}}p&&(an(g,c,se),on(g,c+4,i(44)),sn(g,c+12,45),sn(g,c+14,45),on(g,c+24,i(h)),on(g,c+32,i(h)),on(g,c+40,i(d)),on(g,c+48,i(u)),an(g,c+56,ae),on(g,c+64,i(u)+i(d)),an(g,c+72,1),h=ne,u=ee,d=ee,c+=76),an(g,c,101010256),sn(g,c+8,h),sn(g,c+10,h),an(g,c+12,d),an(g,c+16,u),await a.writeUint8Array(w),n&&n.length&&await a.writeUint8Array(n)})(this,t,n),this.writer.getData()}},t.configure=z,t.getMimeType=()=>"application/octet-stream",t.initShimAsyncCodec=(t,e={},n)=>({Deflate:R(t.Deflate,e.deflate,n),Inflate:R(t.Inflate,e.inflate,n)}),t.terminateWorkers=()=>{St.forEach((t=>{zt(t),t.terminate()}))},n.defineProperty(t,"__esModule",{value:!0})}));