@zip.js/zip.js 2.6.25 → 2.6.26

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.
Files changed (49) hide show
  1. package/README.md +16 -17
  2. package/dist/z-worker-fflate.js +1 -1
  3. package/dist/z-worker-pako.js +1 -1
  4. package/dist/z-worker.js +1 -1
  5. package/dist/zip-fs-full.js +3649 -3663
  6. package/dist/zip-fs-full.min.js +1 -1
  7. package/dist/zip-fs.js +42 -45
  8. package/dist/zip-fs.min.js +1 -1
  9. package/dist/zip-full.js +3626 -3640
  10. package/dist/zip-full.min.js +1 -1
  11. package/dist/zip-no-worker-deflate.min.js +1 -1
  12. package/dist/zip-no-worker-inflate.min.js +1 -1
  13. package/dist/zip-no-worker.min.js +1 -1
  14. package/dist/zip.js +42 -45
  15. package/dist/zip.min.js +1 -1
  16. package/index.d.ts +4 -4
  17. package/index.js +2 -2
  18. package/lib/core/streams/aes-crypto-stream.js +1 -1
  19. package/lib/core/streams/codec-stream.js +3 -1
  20. package/lib/core/streams/codecs/crc32.js +3 -1
  21. package/lib/core/streams/codecs/deflate.js +1792 -1796
  22. package/lib/core/streams/codecs/inflate.js +1828 -1831
  23. package/lib/core/streams/crc32-stream.js +7 -7
  24. package/lib/core/streams/zip-crypto-stream.js +1 -1
  25. package/lib/core/streams/zip-entry-stream.js +2 -2
  26. package/lib/core/util/cp437-decode.js +6 -2
  27. package/lib/core/util/decode-text.js +4 -2
  28. package/lib/core/util/encode-text.js +3 -1
  29. package/lib/core/util/stream-codec-shim.js +6 -2
  30. package/lib/core/zip-entry.js +6 -2
  31. package/lib/core/zip-reader.js +14 -4
  32. package/lib/core/zip-writer.js +25 -8
  33. package/lib/z-worker-bootstrap-fflate.js +1 -1
  34. package/lib/z-worker-bootstrap-pako.js +1 -1
  35. package/lib/z-worker-inline-template.js +9 -7
  36. package/lib/z-worker-inline.js +1 -1
  37. package/lib/z-worker.js +2 -2
  38. package/lib/zip-fflate-shim.js +1 -1
  39. package/lib/zip-fs.js +2 -2
  40. package/lib/zip-full-fflate.js +2 -2
  41. package/lib/zip-full.js +4 -4
  42. package/lib/zip-no-worker-deflate.js +1 -1
  43. package/lib/zip-no-worker-inflate.js +1 -1
  44. package/lib/zip-no-worker.js +2 -2
  45. package/lib/zip.js +2 -2
  46. package/package.json +1 -1
  47. package/tests/all/test-streams.js +29 -0
  48. package/tests/tests-data.js +1 -0
  49. package/lib/z-worker-inline-template-base64.js +0 -36
package/README.md CHANGED
@@ -83,20 +83,19 @@ import {
83
83
 
84
84
  // Creates a TransformStream object, the zip content will be written in the
85
85
  // `writable` property.
86
- const zipFileWriter = new TransformStream();
86
+ const zipFileStream = new TransformStream();
87
87
  // Creates a Promise object resolved to the zip content returned as a Blob
88
- // object via the `readable` property of `zipFileWriter`.
89
- const zipFileBlobPromise = new Response(zipFileWriter.readable).blob();
90
- // Creates a Reader object containing a `readable` property. This property is
91
- // set to a ReadableStream object storing the text of the entry to add in the
88
+ // object retrieved from `zipFileStream.readable`.
89
+ const zipFileBlobPromise = new Response(zipFileStream.readable).blob();
90
+ // Creates a ReadableStream object storing the text of the entry to add in the
92
91
  // zip (i.e. "Hello world!").
93
- const helloWorldReader = { readable: new Blob(["Hello world!"]).stream() };
92
+ const helloWorldReadable = new Blob(["Hello world!"]).stream();
94
93
 
95
- // Creates a ZipWriter object writing data via `zipFileWriter`, adds the entry
96
- // "hello.txt" containing the text "Hello world!" via `helloWorldReader`, and
97
- // closes the writer.
98
- const zipWriter = new ZipWriter(zipFileWriter);
99
- await zipWriter.add("hello.txt", helloWorldReader);
94
+ // Creates a ZipWriter object writing data into `zipFileStream.writable`, adds
95
+ // the entry "hello.txt" containing the text "Hello world!" retrieved from
96
+ // `helloWorldReadable`, and closes the writer.
97
+ const zipWriter = new ZipWriter(zipFileStream.writable);
98
+ await zipWriter.add("hello.txt", helloWorldReadable);
100
99
  await zipWriter.close();
101
100
 
102
101
  // Retrieves the Blob object containing the zip content into `zipFileBlob`.
@@ -110,17 +109,17 @@ const zipFileBlob = await zipFileBlobPromise;
110
109
  const zipFileReader = new BlobReader(zipFileBlob);
111
110
  // Creates a TransformStream object, the content of the first entry in the zip
112
111
  // will be written in the `writable` property.
113
- const helloWorldWriter = new TransformStream();
112
+ const helloWorldStream = new TransformStream();
114
113
  // Creates a Promise object resolved to the content of the first entry returned
115
- // as text via the `readable` property of `helloWorldWriter`.
116
- const helloWorldTextPromise = new Response(helloWorldWriter.readable).text();
114
+ // as text from `helloWorldStream.readable`.
115
+ const helloWorldTextPromise = new Response(helloWorldStream.readable).text();
117
116
 
118
117
  // Creates a ZipReader object reading the zip content via `zipFileReader`,
119
118
  // retrieves metadata (name, dates, etc.) of the first entry, retrieves its
120
- // content via `helloWorldWriter`, and closes the reader.
119
+ // content into `helloWorldStream.writable`, and closes the reader.
121
120
  const zipReader = new ZipReader(zipFileReader);
122
121
  const firstEntry = (await zipReader.getEntries()).shift();
123
- await firstEntry.getData(helloWorldWriter);
122
+ await firstEntry.getData(helloWorldStream.writable);
124
123
  await zipReader.close();
125
124
 
126
125
  // Displays "Hello world!".
@@ -128,7 +127,7 @@ const helloWorldText = await helloWorldTextPromise;
128
127
  console.log(helloWorldText);
129
128
  ```
130
129
 
131
- Run the code on JSFiddle: https://jsfiddle.net/m8q1u0ox/
130
+ Run the code on JSFiddle: https://jsfiddle.net/p6jb437z/
132
131
 
133
132
  ## Adding concurrently multiple entries in a zip file
134
133
 
@@ -1 +1 @@
1
- !function(){"use strict";const{Array:e,Object:t,Math:n,Error:s,Uint8Array:r,Uint16Array:a,Uint32Array:i,Int32Array:o,DataView:c,Promise:l,TextEncoder:h,crypto:u,postMessage:p,TransformStream:f,ReadableStream:d,WritableStream:g,CompressionStream:w,DecompressionStream:y}=globalThis,m=[];for(let e=0;256>e;e++){let t=e;for(let e=0;8>e;e++)1&t?t=t>>>1^3988292384:t>>>=1;m[e]=t}class _{constructor(e){this.crc=e||-1}append(e){let t=0|this.crc;for(let n=0,s=0|e.length;s>n;n++)t=t>>>8^m[255&(t^e[n])];this.crc=t}get(){return~this.crc}}class b extends f{constructor(){super({start(){this.crc32=new _},transform(e){this.crc32.append(e)},flush(e){const t=new r(4);new c(t.buffer).setUint32(0,this.crc32.get()),e.enqueue(t)}})}}const k={concat(e,t){if(0===e.length||0===t.length)return e.concat(t);const n=e[e.length-1],s=k.getPartial(n);return 32===s?e.concat(t):k._shiftRight(t,s,0|n,e.slice(0,e.length-1))},bitLength(e){const t=e.length;if(0===t)return 0;const n=e[t-1];return 32*(t-1)+k.getPartial(n)},clamp(e,t){if(32*e.length<t)return e;const s=(e=e.slice(0,n.ceil(t/32))).length;return t&=31,s>0&&t&&(e[s-1]=k.partial(t,e[s-1]&2147483648>>t-1,1)),e},partial:(e,t,n)=>32===e?t:(n?0|t:t<<32-e)+1099511627776*e,getPartial:e=>n.round(e/1099511627776)||32,_shiftRight(e,t,n,s){for(void 0===s&&(s=[]);t>=32;t-=32)s.push(n),n=0;if(0===t)return s.concat(e);for(let r=0;r<e.length;r++)s.push(n|e[r]>>>t),n=e[r]<<32-t;const r=e.length?e[e.length-1]:0,a=k.getPartial(r);return s.push(k.partial(t+a&31,t+a>32?n:s.pop(),1)),s}},v={bytes:{fromBits(e){const t=k.bitLength(e)/8,n=new r(t);let s;for(let r=0;t>r;r++)0==(3&r)&&(s=e[r/4]),n[r]=s>>>24,s<<=8;return n},toBits(e){const t=[];let n,s=0;for(n=0;n<e.length;n++)s=s<<8|e[n],3==(3&n)&&(t.push(s),s=0);return 3&n&&t.push(k.partial(8*(3&n),s)),t}}},S={sha1:function(e){e?(this._h=e._h.slice(0),this._buffer=e._buffer.slice(0),this._length=e._length):this.reset()}};S.sha1.prototype={blockSize:512,reset(){const e=this;return e._h=this._init.slice(0),e._buffer=[],e._length=0,e},update(e){const t=this;"string"==typeof e&&(e=v.utf8String.toBits(e));const n=t._buffer=k.concat(t._buffer,e),r=t._length,a=t._length=r+k.bitLength(e);if(a>9007199254740991)throw new s("Cannot hash more than 2^53 - 1 bits");const o=new i(n);let c=0;for(let e=t.blockSize+r-(t.blockSize+r&t.blockSize-1);a>=e;e+=t.blockSize)t._block(o.subarray(16*c,16*(c+1))),c+=1;return n.splice(0,16*c),t},finalize(){const e=this;let t=e._buffer;const s=e._h;t=k.concat(t,[k.partial(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(n.floor(e._length/4294967296)),t.push(0|e._length);t.length;)e._block(t.splice(0,16));return e.reset(),s},_init:[1732584193,4023233417,2562383102,271733878,3285377520],_key:[1518500249,1859775393,2400959708,3395469782],_f:(e,t,n,s)=>e>19?e>39?e>59?e>79?void 0:t^n^s:t&n|t&s|n&s:t^n^s:t&n|~t&s,_S:(e,t)=>t<<e|t>>>32-e,_block(t){const s=this,r=s._h,a=e(80);for(let e=0;16>e;e++)a[e]=t[e];let i=r[0],o=r[1],c=r[2],l=r[3],h=r[4];for(let e=0;79>=e;e++){16>e||(a[e]=s._S(1,a[e-3]^a[e-8]^a[e-14]^a[e-16]));const t=s._S(5,i)+s._f(e,o,c,l)+h+a[e]+s._key[n.floor(e/20)]|0;h=l,l=c,c=s._S(30,o),o=i,i=t}r[0]=r[0]+i|0,r[1]=r[1]+o|0,r[2]=r[2]+c|0,r[3]=r[3]+l|0,r[4]=r[4]+h|0}};const C={getRandomValues(e){const t=new i(e.buffer),s=e=>{let t=987654321;const s=4294967295;return()=>(t=36969*(65535&t)+(t>>16)&s,(((t<<16)+(e=18e3*(65535&e)+(e>>16)&s)&s)/4294967296+.5)*(n.random()>.5?1:-1))};for(let r,a=0;a<e.length;a+=4){const e=s(4294967296*(r||n.random()));r=987654071*e(),t[a/4]=4294967296*e()|0}return e}},z={importKey:e=>new z.hmacSha1(v.bytes.toBits(e)),pbkdf2(e,t,n,r){if(n=n||1e4,0>r||0>n)throw new s("invalid params to pbkdf2");const a=1+(r>>5)<<2;let i,o,l,h,u;const p=new ArrayBuffer(a),f=new c(p);let d=0;const g=k;for(t=v.bytes.toBits(t),u=1;(a||1)>d;u++){for(i=o=e.encrypt(g.concat(t,[u])),l=1;n>l;l++)for(o=e.encrypt(o),h=0;h<o.length;h++)i[h]^=o[h];for(l=0;(a||1)>d&&l<i.length;l++)f.setInt32(d,i[l]),d+=4}return p.slice(0,r/8)},hmacSha1:class{constructor(e){const t=this,n=t._hash=S.sha1,s=[[],[]],r=n.prototype.blockSize/32;t._baseHash=[new n,new n],e.length>r&&(e=n.hash(e));for(let t=0;r>t;t++)s[0][t]=909522486^e[t],s[1][t]=1549556828^e[t];t._baseHash[0].update(s[0]),t._baseHash[1].update(s[1]),t._resultHash=new n(t._baseHash[0])}reset(){const e=this;e._resultHash=new e._hash(e._baseHash[0]),e._updated=!1}update(e){this._updated=!0,this._resultHash.update(e)}digest(){const e=this,t=e._resultHash.finalize(),n=new e._hash(e._baseHash[1]).update(t).finalize();return e.reset(),n}encrypt(e){if(this._updated)throw new s("encrypt on already updated hmac called!");return this.update(e),this.digest(e)}}},T=void 0!==u&&"function"==typeof u.getRandomValues,I="Invalid password";function R(e){return T?u.getRandomValues(e):C.getRandomValues(e)}const A=16,D={name:"PBKDF2"},V=t.assign({hash:{name:"HMAC"}},D),q=t.assign({iterations:1e3,hash:{name:"SHA-1"}},D),B=["deriveBits"],H=[8,12,16],K=[16,24,32],x=10,E=[0,0,0,0],W="undefined",M="function",P=typeof u!=W,U=P&&typeof u.subtle!=W,L=P&&U&&typeof u.subtle.importKey==M,N=P&&U&&typeof u.subtle.deriveBits==M,F=v.bytes,G=class{constructor(e){const t=this;t._tables=[[[],[],[],[],[]],[[],[],[],[],[]]],t._tables[0][0][0]||t._precompute();const n=t._tables[0][4],r=t._tables[1],a=e.length;let i,o,c,l=1;if(4!==a&&6!==a&&8!==a)throw new s("invalid aes key size");for(t._key=[o=e.slice(0),c=[]],i=a;4*a+28>i;i++){let e=o[i-1];(i%a==0||8===a&&i%a==4)&&(e=n[e>>>24]<<24^n[e>>16&255]<<16^n[e>>8&255]<<8^n[255&e],i%a==0&&(e=e<<8^e>>>24^l<<24,l=l<<1^283*(l>>7))),o[i]=o[i-a]^e}for(let e=0;i;e++,i--){const t=o[3&e?i:i-4];c[e]=4>=i||4>e?t:r[0][n[t>>>24]]^r[1][n[t>>16&255]]^r[2][n[t>>8&255]]^r[3][n[255&t]]}}encrypt(e){return this._crypt(e,0)}decrypt(e){return this._crypt(e,1)}_precompute(){const e=this._tables[0],t=this._tables[1],n=e[4],s=t[4],r=[],a=[];let i,o,c,l;for(let e=0;256>e;e++)a[(r[e]=e<<1^283*(e>>7))^e]=e;for(let h=i=0;!n[h];h^=o||1,i=a[i]||1){let a=i^i<<1^i<<2^i<<3^i<<4;a=a>>8^255&a^99,n[h]=a,s[a]=h,l=r[c=r[o=r[h]]];let u=16843009*l^65537*c^257*o^16843008*h,p=257*r[a]^16843008*a;for(let n=0;4>n;n++)e[n][h]=p=p<<24^p>>>8,t[n][a]=u=u<<24^u>>>8}for(let n=0;5>n;n++)e[n]=e[n].slice(0),t[n]=t[n].slice(0)}_crypt(e,t){if(4!==e.length)throw new s("invalid aes block size");const n=this._key[t],r=n.length/4-2,a=[0,0,0,0],i=this._tables[t],o=i[0],c=i[1],l=i[2],h=i[3],u=i[4];let p,f,d,g=e[0]^n[0],w=e[t?3:1]^n[1],y=e[2]^n[2],m=e[t?1:3]^n[3],_=4;for(let e=0;r>e;e++)p=o[g>>>24]^c[w>>16&255]^l[y>>8&255]^h[255&m]^n[_],f=o[w>>>24]^c[y>>16&255]^l[m>>8&255]^h[255&g]^n[_+1],d=o[y>>>24]^c[m>>16&255]^l[g>>8&255]^h[255&w]^n[_+2],m=o[m>>>24]^c[g>>16&255]^l[w>>8&255]^h[255&y]^n[_+3],_+=4,g=p,w=f,y=d;for(let e=0;4>e;e++)a[t?3&-e:e]=u[g>>>24]<<24^u[w>>16&255]<<16^u[y>>8&255]<<8^u[255&m]^n[_++],p=g,g=w,w=y,y=m,m=p;return a}},O=class{constructor(e,t){this._prf=e,this._initIv=t,this._iv=t}reset(){this._iv=this._initIv}update(e){return this.calculate(this._prf,e,this._iv)}incWord(e){if(255==(e>>24&255)){let t=e>>16&255,n=e>>8&255,s=255&e;255===t?(t=0,255===n?(n=0,255===s?s=0:++s):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=s}else e+=1<<24;return e}incCounter(e){0===(e[0]=this.incWord(e[0]))&&(e[1]=this.incWord(e[1]))}calculate(e,t,n){let s;if(!(s=t.length))return[];const r=k.bitLength(t);for(let r=0;s>r;r+=4){this.incCounter(n);const s=e.encrypt(n);t[r]^=s[0],t[r+1]^=s[1],t[r+2]^=s[2],t[r+3]^=s[3]}return k.clamp(t,r)}},X=z.hmacSha1;class j extends f{constructor(n,a,i){let o;super({start(){t.assign(this,{ready:new l((e=>this.resolveReady=e)),password:n,signed:a,strength:i-1,pending:new r})},async transform(t,n){const a=this;if(a.password){const n=a.password;a.password=null;const r=$(t,0,H[a.strength]+2);await(async(e,t,n)=>{await Y(e,n,$(t,0,H[e.strength]));const r=$(t,H[e.strength]),a=e.keys.passwordVerification;if(a[0]!=r[0]||a[1]!=r[1])throw new s(I)})(a,r,n),a.ctr=new O(new G(a.keys.key),e.from(E)),a.hmac=new X(a.keys.authentication),t=$(t,H[a.strength]+2),a.resolveReady()}else await a.ready;const i=new r(t.length-x-(t.length-x)%A);n.enqueue(Q(a,t,i,0,x,!0))},async flush(e){const t=this;await t.ready;const n=t.pending,s=$(n,0,n.length-x),a=$(n,n.length-x);let i=new r;if(s.length){const e=te(F,s);t.hmac.update(e);const n=t.ctr.update(e);i=ee(F,n)}if(o.valid=!0,t.signed){const e=$(ee(F,t.hmac.digest()),0,x);for(let t=0;x>t;t++)e[t]!=a[t]&&(o.valid=!1)}e.enqueue(i)}}),o=this}}class J extends f{constructor(n,s){let a;super({start(){t.assign(this,{ready:new l((e=>this.resolveReady=e)),password:n,strength:s-1,pending:new r})},async transform(t,n){const s=this;let a=new r;if(s.password){const t=s.password;s.password=null,a=await(async(e,t)=>{const n=R(new r(H[e.strength]));return await Y(e,t,n),Z(n,e.keys.passwordVerification)})(s,t),s.ctr=new O(new G(s.keys.key),e.from(E)),s.hmac=new X(s.keys.authentication),s.resolveReady()}else await s.ready;const i=new r(a.length+t.length-t.length%A);i.set(a,0),n.enqueue(Q(s,t,i,a.length,0))},async flush(e){const t=this;await t.ready;let n=new r;if(t.pending.length){const e=t.ctr.update(te(F,t.pending));t.hmac.update(e),n=ee(F,e)}a.signature=ee(F,t.hmac.digest()).slice(0,x),e.enqueue(Z(n,a.signature))}}),a=this}}function Q(e,t,n,s,a,i){const o=t.length-a;let c;for(e.pending.length&&(t=Z(e.pending,t),n=((e,t)=>{if(t&&t>e.length){const n=e;(e=new r(t)).set(n,0)}return e})(n,o-o%A)),c=0;o-A>=c;c+=A){const r=te(F,$(t,c,c+A));i&&e.hmac.update(r);const a=e.ctr.update(r);i||e.hmac.update(a),n.set(ee(F,a),c+s)}return e.pending=$(t,c),n}async function Y(e,n,s){const a=(e=>{if(void 0===h){const t=new r((e=unescape(encodeURIComponent(e))).length);for(let n=0;n<t.length;n++)t[n]=e.charCodeAt(n);return t}return(new h).encode(e)})(n),i=await((e,t,n,s,r)=>L?u.subtle.importKey("raw",t,n,!1,r):z.importKey(t))(0,a,V,0,B),o=await(async(e,t,n)=>N?await u.subtle.deriveBits(e,t,n):z.pbkdf2(t,e.salt,q.iterations,n))(t.assign({salt:s},q),i,8*(2*K[e.strength]+2)),c=new r(o);e.keys={key:te(F,$(c,0,K[e.strength])),authentication:te(F,$(c,K[e.strength],2*K[e.strength])),passwordVerification:$(c,2*K[e.strength])}}function Z(e,t){let n=e;return e.length+t.length&&(n=new r(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function $(e,t,n){return e.subarray(t,n)}function ee(e,t){return e.fromBits(t)}function te(e,t){return e.toBits(t)}class ne extends f{constructor(e,n){let r;super({start(){t.assign(this,{password:e,passwordVerification:n}),ie(this,e)},transform(e,t){const n=this;if(n.password){const t=re(n,e.subarray(0,12));if(n.password=null,t[11]!=n.passwordVerification)throw new s(I);e=e.subarray(12)}t.enqueue(re(n,e))},flush(){r.valid=!0}}),r=this}}class se extends f{constructor(e,n){super({start(){t.assign(this,{password:e,passwordVerification:n}),ie(this,e)},transform(e,t){const n=this;let s,a;if(n.password){n.password=null;const t=R(new r(12));t[11]=n.passwordVerification,s=new r(e.length+t.length),s.set(ae(n,t),0),a=12}else s=new r(e.length),a=0;s.set(ae(n,e),a),t.enqueue(s)},flush(){}})}}function re(e,t){const n=new r(t.length);for(let s=0;s<t.length;s++)n[s]=ce(e)^t[s],oe(e,n[s]);return n}function ae(e,t){const n=new r(t.length);for(let s=0;s<t.length;s++)n[s]=ce(e)^t[s],oe(e,t[s]);return n}function ie(e,t){e.keys=[305419896,591751049,878082192],e.crcKey0=new _(e.keys[0]),e.crcKey2=new _(e.keys[2]);for(let n=0;n<t.length;n++)oe(e,t.charCodeAt(n))}function oe(e,t){e.crcKey0.append([t]),e.keys[0]=~e.crcKey0.get(),e.keys[1]=he(e.keys[1]+le(e.keys[0])),e.keys[1]=he(n.imul(e.keys[1],134775813)+1),e.crcKey2.append([e.keys[1]>>>24]),e.keys[2]=~e.crcKey2.get()}function ce(e){const t=2|e.keys[2];return le(n.imul(t,1^t)>>>8)}function le(e){return 255&e}function he(e){return 4294967295&e}class ue extends f{constructor(e,t){let n;super({start(){n=new e(t)},transform(e,t){e=n.append(e),t.enqueue(e)},flush(e){const t=n.flush();t&&e.enqueue(t)}})}}const pe="Invalid signature",fe="deflate-raw",de="undefined",ge=typeof w==de,we=typeof y==de;let ye=!0,me=!0;class _e extends f{constructor(e,t,{chunkSize:n},...s){super({},...s);const{compressed:r,encrypted:a,useCompressionStream:i,password:o,passwordVerification:l,encryptionStrength:h,zipCrypto:u,signed:p,level:f}=t,d=this;let g,y,m=ve(super.readable);if(a&&!u||!p||([m,g]=m.tee(),g=g.pipeThrough(new b)),r)if(void 0!==i&&!i||ge&&!me)m=ke(e,m,{chunkSize:n,level:f});else try{m=m.pipeThrough(new w(fe))}catch(t){me=!1,m=ke(e,m,{chunkSize:n,level:f})}a&&(u?m=m.pipeThrough(new se(o,l)):(y=new J(o,h),m=m.pipeThrough(y))),Se(d,m,(async()=>{let e;a&&!u&&(e=y.signature),a&&!u||!p||(e=await g.getReader().read(),e=new c(e.value.buffer).getUint32(0)),d.signature=e}))}}class be extends f{constructor(e,t,{chunkSize:n},...r){super({},...r);const{zipCrypto:a,encrypted:i,password:o,passwordVerification:l,signed:h,encryptionStrength:u,compressed:p,useCompressionStream:f}=t;let d,g,w=ve(super.readable);if(i&&(a?w=w.pipeThrough(new ne(o,l)):(g=new j(o,h,u),w=w.pipeThrough(g))),p)if(void 0!==f&&!f||we&&!ye)w=ke(e,w,{chunkSize:n});else try{w=w.pipeThrough(new y(fe))}catch(t){ye=!1,w=ke(e,w,{chunkSize:n})}i&&!a||!h||([w,d]=w.tee(),d=d.pipeThrough(new b)),Se(this,w,(async()=>{if(i&&!a&&!g.valid)throw new s(pe);if((!i||a)&&h){const e=await d.getReader().read(),n=new c(e.value.buffer);if(t.signature!=n.getUint32(0,!1))throw new s(pe)}}))}}function ke(e,t,n){return t.pipeThrough(new ue(e,n))}function ve(e){return e.pipeThrough(new f({transform(e,t){e&&e.length&&t.enqueue(e)}}))}function Se(e,n,s){n=n.pipeThrough(new f({flush:s})),t.defineProperty(e,"readable",{get:()=>n})}const Ce="deflate",ze="inflate",Te="data";class Ie{constructor(e,n,s,r,a){const{codecType:i}=r;let o;i.startsWith(Ce)?o=_e:i.startsWith(ze)&&(o=be),t.assign(this,{StreamConstructor:o,CodecConstructor:e,readable:n,writable:s,options:r,config:a})}async run(){const{StreamConstructor:e,CodecConstructor:t,readable:n,writable:s,options:r,config:a}=this,i=new e(t,r,a);let o=0;await n.pipeThrough(i).pipeThrough(new f({transform(e,t){e&&e.length&&(o+=e.length,t.enqueue(e))}})).pipeTo(s,{preventClose:!0,preventAbort:!0});const{signature:c}=i;return{size:o,signature:c}}}const Re=new Map,Ae=new Map;let De,Ve=0;async function qe(e){try{const{options:t,scripts:n,config:s}=e,{codecType:r}=t;let a;n&&n.length&&importScripts.apply(void 0,n),self.initCodec&&self.initCodec(),r.startsWith(Ce)?a=self.Deflate:r.startsWith(ze)&&(a=self.Inflate);const i={highWaterMark:1,size:()=>s.chunkSize},o=e.readable||new d({async pull(e){let t=new l((e=>Re.set(Ve,e)));Be({type:"pull",messageId:Ve}),Ve=(Ve+1)%Number.MAX_SAFE_INTEGER;const{value:n,done:s}=await t;e.enqueue(n),s&&e.close()}},i),c=e.writable||new g({async write(e){let t;const n=new l((e=>t=e));Ae.set(Ve,t),Be({type:Te,data:e,messageId:Ve}),Ve=(Ve+1)%Number.MAX_SAFE_INTEGER,await n}},i);De=new Ie(a,o,c,t,s);const h=await De.run();e.writable&&!t.preventClose&&await e.writable.close(),Be({type:"close",result:h})}catch(e){He(e)}}function Be(e){if(e.data){let{data:t}=e;if(t&&t.length)try{t=new r(t),e.data=t.buffer,p(e,[e.data])}catch(t){p(e)}else p(e)}else p(e)}function He(e){const{message:t,stack:n,code:s,name:r}=e;p({error:{message:t,stack:n,code:s,name:r}})}function Ke(e,n,s){return class{constructor(a){const i=this;t.hasOwn(a,"level")&&void 0===a.level&&delete a.level,i.codec=new e(t.assign({},n,a)),s(i.codec,(e=>{if(i.pendingData){const{pendingData:t}=i;i.pendingData=new r(t.length+e.length),t.set(t,0),t.set(e,t.length)}else i.pendingData=new r(e)}))}append(e){return this.codec.push(e),a(this)}flush(){return this.codec.push(new r,!0),a(this)}};function a(e){if(e.pendingData){const t=e.pendingData;return e.pendingData=null,t}return new r}}addEventListener("message",(async e=>{const t=e.data,{type:n,messageId:s,data:a,done:i}=t;try{if("start"==n&&qe(t),n==Te){const e=Re.get(s);Re.delete(s),e({value:new r(a),done:i})}if("ack"==n){const e=Ae.get(s);Ae.delete(s),e()}}catch(e){He(e)}})),self.initCodec=()=>{const{Deflate:e,Inflate:t}=((e,t={},n)=>({Deflate:Ke(e.Deflate,t.deflate,n),Inflate:Ke(e.Inflate,t.inflate,n)}))(fflate,void 0,((e,t)=>e.ondata=t));self.Deflate=e,self.Inflate=t}}();
1
+ !function(){"use strict";const{Array:e,Object:t,Math:n,Error:s,Uint8Array:r,Uint16Array:a,Uint32Array:i,Int32Array:o,DataView:c,Promise:l,TextEncoder:h,crypto:u,postMessage:p,TransformStream:f,ReadableStream:d,WritableStream:g,CompressionStream:w,DecompressionStream:y}=globalThis,m=[];for(let e=0;256>e;e++){let t=e;for(let e=0;8>e;e++)1&t?t=t>>>1^3988292384:t>>>=1;m[e]=t}class _{constructor(e){this.crc=e||-1}append(e){let t=0|this.crc;for(let n=0,s=0|e.length;s>n;n++)t=t>>>8^m[255&(t^e[n])];this.crc=t}get(){return~this.crc}}class b extends f{constructor(){const e=new _;super({transform(t){e.append(t)},flush(t){const n=new r(4);new c(n.buffer).setUint32(0,e.get()),t.enqueue(n)}})}}const k={concat(e,t){if(0===e.length||0===t.length)return e.concat(t);const n=e[e.length-1],s=k.getPartial(n);return 32===s?e.concat(t):k._shiftRight(t,s,0|n,e.slice(0,e.length-1))},bitLength(e){const t=e.length;if(0===t)return 0;const n=e[t-1];return 32*(t-1)+k.getPartial(n)},clamp(e,t){if(32*e.length<t)return e;const s=(e=e.slice(0,n.ceil(t/32))).length;return t&=31,s>0&&t&&(e[s-1]=k.partial(t,e[s-1]&2147483648>>t-1,1)),e},partial:(e,t,n)=>32===e?t:(n?0|t:t<<32-e)+1099511627776*e,getPartial:e=>n.round(e/1099511627776)||32,_shiftRight(e,t,n,s){for(void 0===s&&(s=[]);t>=32;t-=32)s.push(n),n=0;if(0===t)return s.concat(e);for(let r=0;r<e.length;r++)s.push(n|e[r]>>>t),n=e[r]<<32-t;const r=e.length?e[e.length-1]:0,a=k.getPartial(r);return s.push(k.partial(t+a&31,t+a>32?n:s.pop(),1)),s}},v={bytes:{fromBits(e){const t=k.bitLength(e)/8,n=new r(t);let s;for(let r=0;t>r;r++)0==(3&r)&&(s=e[r/4]),n[r]=s>>>24,s<<=8;return n},toBits(e){const t=[];let n,s=0;for(n=0;n<e.length;n++)s=s<<8|e[n],3==(3&n)&&(t.push(s),s=0);return 3&n&&t.push(k.partial(8*(3&n),s)),t}}},S={sha1:function(e){e?(this._h=e._h.slice(0),this._buffer=e._buffer.slice(0),this._length=e._length):this.reset()}};S.sha1.prototype={blockSize:512,reset(){const e=this;return e._h=this._init.slice(0),e._buffer=[],e._length=0,e},update(e){const t=this;"string"==typeof e&&(e=v.utf8String.toBits(e));const n=t._buffer=k.concat(t._buffer,e),r=t._length,a=t._length=r+k.bitLength(e);if(a>9007199254740991)throw new s("Cannot hash more than 2^53 - 1 bits");const o=new i(n);let c=0;for(let e=t.blockSize+r-(t.blockSize+r&t.blockSize-1);a>=e;e+=t.blockSize)t._block(o.subarray(16*c,16*(c+1))),c+=1;return n.splice(0,16*c),t},finalize(){const e=this;let t=e._buffer;const s=e._h;t=k.concat(t,[k.partial(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(n.floor(e._length/4294967296)),t.push(0|e._length);t.length;)e._block(t.splice(0,16));return e.reset(),s},_init:[1732584193,4023233417,2562383102,271733878,3285377520],_key:[1518500249,1859775393,2400959708,3395469782],_f:(e,t,n,s)=>e>19?e>39?e>59?e>79?void 0:t^n^s:t&n|t&s|n&s:t^n^s:t&n|~t&s,_S:(e,t)=>t<<e|t>>>32-e,_block(t){const s=this,r=s._h,a=e(80);for(let e=0;16>e;e++)a[e]=t[e];let i=r[0],o=r[1],c=r[2],l=r[3],h=r[4];for(let e=0;79>=e;e++){16>e||(a[e]=s._S(1,a[e-3]^a[e-8]^a[e-14]^a[e-16]));const t=s._S(5,i)+s._f(e,o,c,l)+h+a[e]+s._key[n.floor(e/20)]|0;h=l,l=c,c=s._S(30,o),o=i,i=t}r[0]=r[0]+i|0,r[1]=r[1]+o|0,r[2]=r[2]+c|0,r[3]=r[3]+l|0,r[4]=r[4]+h|0}};const C={getRandomValues(e){const t=new i(e.buffer),s=e=>{let t=987654321;const s=4294967295;return()=>(t=36969*(65535&t)+(t>>16)&s,(((t<<16)+(e=18e3*(65535&e)+(e>>16)&s)&s)/4294967296+.5)*(n.random()>.5?1:-1))};for(let r,a=0;a<e.length;a+=4){const e=s(4294967296*(r||n.random()));r=987654071*e(),t[a/4]=4294967296*e()|0}return e}},z={importKey:e=>new z.hmacSha1(v.bytes.toBits(e)),pbkdf2(e,t,n,r){if(n=n||1e4,0>r||0>n)throw new s("invalid params to pbkdf2");const a=1+(r>>5)<<2;let i,o,l,h,u;const p=new ArrayBuffer(a),f=new c(p);let d=0;const g=k;for(t=v.bytes.toBits(t),u=1;(a||1)>d;u++){for(i=o=e.encrypt(g.concat(t,[u])),l=1;n>l;l++)for(o=e.encrypt(o),h=0;h<o.length;h++)i[h]^=o[h];for(l=0;(a||1)>d&&l<i.length;l++)f.setInt32(d,i[l]),d+=4}return p.slice(0,r/8)},hmacSha1:class{constructor(e){const t=this,n=t._hash=S.sha1,s=[[],[]],r=n.prototype.blockSize/32;t._baseHash=[new n,new n],e.length>r&&(e=n.hash(e));for(let t=0;r>t;t++)s[0][t]=909522486^e[t],s[1][t]=1549556828^e[t];t._baseHash[0].update(s[0]),t._baseHash[1].update(s[1]),t._resultHash=new n(t._baseHash[0])}reset(){const e=this;e._resultHash=new e._hash(e._baseHash[0]),e._updated=!1}update(e){this._updated=!0,this._resultHash.update(e)}digest(){const e=this,t=e._resultHash.finalize(),n=new e._hash(e._baseHash[1]).update(t).finalize();return e.reset(),n}encrypt(e){if(this._updated)throw new s("encrypt on already updated hmac called!");return this.update(e),this.digest(e)}}},T=void 0!==u&&"function"==typeof u.getRandomValues,I="Invalid password";function R(e){return T?u.getRandomValues(e):C.getRandomValues(e)}const A=16,D={name:"PBKDF2"},V=t.assign({hash:{name:"HMAC"}},D),q=t.assign({iterations:1e3,hash:{name:"SHA-1"}},D),B=["deriveBits"],H=[8,12,16],K=[16,24,32],x=10,E=[0,0,0,0],W="undefined",M="function",P=typeof u!=W,U=P&&typeof u.subtle!=W,L=P&&U&&typeof u.subtle.importKey==M,N=P&&U&&typeof u.subtle.deriveBits==M,F=v.bytes,G=class{constructor(e){const t=this;t._tables=[[[],[],[],[],[]],[[],[],[],[],[]]],t._tables[0][0][0]||t._precompute();const n=t._tables[0][4],r=t._tables[1],a=e.length;let i,o,c,l=1;if(4!==a&&6!==a&&8!==a)throw new s("invalid aes key size");for(t._key=[o=e.slice(0),c=[]],i=a;4*a+28>i;i++){let e=o[i-1];(i%a==0||8===a&&i%a==4)&&(e=n[e>>>24]<<24^n[e>>16&255]<<16^n[e>>8&255]<<8^n[255&e],i%a==0&&(e=e<<8^e>>>24^l<<24,l=l<<1^283*(l>>7))),o[i]=o[i-a]^e}for(let e=0;i;e++,i--){const t=o[3&e?i:i-4];c[e]=4>=i||4>e?t:r[0][n[t>>>24]]^r[1][n[t>>16&255]]^r[2][n[t>>8&255]]^r[3][n[255&t]]}}encrypt(e){return this._crypt(e,0)}decrypt(e){return this._crypt(e,1)}_precompute(){const e=this._tables[0],t=this._tables[1],n=e[4],s=t[4],r=[],a=[];let i,o,c,l;for(let e=0;256>e;e++)a[(r[e]=e<<1^283*(e>>7))^e]=e;for(let h=i=0;!n[h];h^=o||1,i=a[i]||1){let a=i^i<<1^i<<2^i<<3^i<<4;a=a>>8^255&a^99,n[h]=a,s[a]=h,l=r[c=r[o=r[h]]];let u=16843009*l^65537*c^257*o^16843008*h,p=257*r[a]^16843008*a;for(let n=0;4>n;n++)e[n][h]=p=p<<24^p>>>8,t[n][a]=u=u<<24^u>>>8}for(let n=0;5>n;n++)e[n]=e[n].slice(0),t[n]=t[n].slice(0)}_crypt(e,t){if(4!==e.length)throw new s("invalid aes block size");const n=this._key[t],r=n.length/4-2,a=[0,0,0,0],i=this._tables[t],o=i[0],c=i[1],l=i[2],h=i[3],u=i[4];let p,f,d,g=e[0]^n[0],w=e[t?3:1]^n[1],y=e[2]^n[2],m=e[t?1:3]^n[3],_=4;for(let e=0;r>e;e++)p=o[g>>>24]^c[w>>16&255]^l[y>>8&255]^h[255&m]^n[_],f=o[w>>>24]^c[y>>16&255]^l[m>>8&255]^h[255&g]^n[_+1],d=o[y>>>24]^c[m>>16&255]^l[g>>8&255]^h[255&w]^n[_+2],m=o[m>>>24]^c[g>>16&255]^l[w>>8&255]^h[255&y]^n[_+3],_+=4,g=p,w=f,y=d;for(let e=0;4>e;e++)a[t?3&-e:e]=u[g>>>24]<<24^u[w>>16&255]<<16^u[y>>8&255]<<8^u[255&m]^n[_++],p=g,g=w,w=y,y=m,m=p;return a}},O=class{constructor(e,t){this._prf=e,this._initIv=t,this._iv=t}reset(){this._iv=this._initIv}update(e){return this.calculate(this._prf,e,this._iv)}incWord(e){if(255==(e>>24&255)){let t=e>>16&255,n=e>>8&255,s=255&e;255===t?(t=0,255===n?(n=0,255===s?s=0:++s):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=s}else e+=1<<24;return e}incCounter(e){0===(e[0]=this.incWord(e[0]))&&(e[1]=this.incWord(e[1]))}calculate(e,t,n){let s;if(!(s=t.length))return[];const r=k.bitLength(t);for(let r=0;s>r;r+=4){this.incCounter(n);const s=e.encrypt(n);t[r]^=s[0],t[r+1]^=s[1],t[r+2]^=s[2],t[r+3]^=s[3]}return k.clamp(t,r)}},X=z.hmacSha1;class j extends f{constructor(n,a,i){let o;super({start(){t.assign(this,{ready:new l((e=>this.resolveReady=e)),password:n,signed:a,strength:i-1,pending:new r})},async transform(t,n){const a=this;if(a.password){const n=a.password;a.password=null;const r=$(t,0,H[a.strength]+2);await(async(e,t,n)=>{await Y(e,n,$(t,0,H[e.strength]));const r=$(t,H[e.strength]),a=e.keys.passwordVerification;if(a[0]!=r[0]||a[1]!=r[1])throw new s(I)})(a,r,n),a.ctr=new O(new G(a.keys.key),e.from(E)),a.hmac=new X(a.keys.authentication),t=$(t,H[a.strength]+2),a.resolveReady()}else await a.ready;const i=new r(t.length-x-(t.length-x)%A);n.enqueue(Q(a,t,i,0,x,!0))},async flush(e){const t=this;await t.ready;const n=t.pending,s=$(n,0,n.length-x),a=$(n,n.length-x);let i=new r;if(s.length){const e=te(F,s);t.hmac.update(e);const n=t.ctr.update(e);i=ee(F,n)}if(o.valid=!0,t.signed){const e=$(ee(F,t.hmac.digest()),0,x);for(let t=0;x>t;t++)e[t]!=a[t]&&(o.valid=!1)}e.enqueue(i)}}),o=this}}class J extends f{constructor(n,s){let a;super({start(){t.assign(this,{ready:new l((e=>this.resolveReady=e)),password:n,strength:s-1,pending:new r})},async transform(t,n){const s=this;let a=new r;if(s.password){const t=s.password;s.password=null,a=await(async(e,t)=>{const n=R(new r(H[e.strength]));return await Y(e,t,n),Z(n,e.keys.passwordVerification)})(s,t),s.ctr=new O(new G(s.keys.key),e.from(E)),s.hmac=new X(s.keys.authentication),s.resolveReady()}else await s.ready;const i=new r(a.length+t.length-t.length%A);i.set(a,0),n.enqueue(Q(s,t,i,a.length,0))},async flush(e){const t=this;await t.ready;let n=new r;if(t.pending.length){const e=t.ctr.update(te(F,t.pending));t.hmac.update(e),n=ee(F,e)}a.signature=ee(F,t.hmac.digest()).slice(0,x),e.enqueue(Z(n,a.signature))}}),a=this}}function Q(e,t,n,s,a,i){const o=t.length-a;let c;for(e.pending.length&&(t=Z(e.pending,t),n=((e,t)=>{if(t&&t>e.length){const n=e;(e=new r(t)).set(n,0)}return e})(n,o-o%A)),c=0;o-A>=c;c+=A){const r=te(F,$(t,c,c+A));i&&e.hmac.update(r);const a=e.ctr.update(r);i||e.hmac.update(a),n.set(ee(F,a),c+s)}return e.pending=$(t,c),n}async function Y(e,n,s){const a=(e=>{if(void 0===h){const t=new r((e=unescape(encodeURIComponent(e))).length);for(let n=0;n<t.length;n++)t[n]=e.charCodeAt(n);return t}return(new h).encode(e)})(n),i=await((e,t,n,s,r)=>L?u.subtle.importKey("raw",t,n,!1,r):z.importKey(t))(0,a,V,0,B),o=await(async(e,t,n)=>N?await u.subtle.deriveBits(e,t,n):z.pbkdf2(t,e.salt,q.iterations,n))(t.assign({salt:s},q),i,8*(2*K[e.strength]+2)),c=new r(o);e.keys={key:te(F,$(c,0,K[e.strength])),authentication:te(F,$(c,K[e.strength],2*K[e.strength])),passwordVerification:$(c,2*K[e.strength])}}function Z(e,t){let n=e;return e.length+t.length&&(n=new r(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function $(e,t,n){return e.subarray(t,n)}function ee(e,t){return e.fromBits(t)}function te(e,t){return e.toBits(t)}class ne extends f{constructor(e,n){let r;super({start(){t.assign(this,{password:e,passwordVerification:n}),ie(this,e)},transform(e,t){const n=this;if(n.password){const t=re(n,e.subarray(0,12));if(n.password=null,t[11]!=n.passwordVerification)throw new s(I);e=e.subarray(12)}t.enqueue(re(n,e))},flush(){r.valid=!0}}),r=this}}class se extends f{constructor(e,n){super({start(){t.assign(this,{password:e,passwordVerification:n}),ie(this,e)},transform(e,t){const n=this;let s,a;if(n.password){n.password=null;const t=R(new r(12));t[11]=n.passwordVerification,s=new r(e.length+t.length),s.set(ae(n,t),0),a=12}else s=new r(e.length),a=0;s.set(ae(n,e),a),t.enqueue(s)},flush(){}})}}function re(e,t){const n=new r(t.length);for(let s=0;s<t.length;s++)n[s]=ce(e)^t[s],oe(e,n[s]);return n}function ae(e,t){const n=new r(t.length);for(let s=0;s<t.length;s++)n[s]=ce(e)^t[s],oe(e,t[s]);return n}function ie(e,t){e.keys=[305419896,591751049,878082192],e.crcKey0=new _(e.keys[0]),e.crcKey2=new _(e.keys[2]);for(let n=0;n<t.length;n++)oe(e,t.charCodeAt(n))}function oe(e,t){e.crcKey0.append([t]),e.keys[0]=~e.crcKey0.get(),e.keys[1]=he(e.keys[1]+le(e.keys[0])),e.keys[1]=he(n.imul(e.keys[1],134775813)+1),e.crcKey2.append([e.keys[1]>>>24]),e.keys[2]=~e.crcKey2.get()}function ce(e){const t=2|e.keys[2];return le(n.imul(t,1^t)>>>8)}function le(e){return 255&e}function he(e){return 4294967295&e}class ue extends f{constructor(e,t){let n;super({start(){n=new e(t)},transform(e,t){e=n.append(e),t.enqueue(e)},flush(e){const t=n.flush();t&&e.enqueue(t)}})}}const pe="Invalid signature",fe="deflate-raw",de="undefined",ge=typeof w==de,we=typeof y==de;let ye=!0,me=!0;class _e extends f{constructor(e,t,{chunkSize:n},...s){super({},...s);const{compressed:r,encrypted:a,useCompressionStream:i,password:o,passwordVerification:l,encryptionStrength:h,zipCrypto:u,signed:p,level:f}=t,d=this;let g,y,m=ve(super.readable);if(a&&!u||!p||([m,g]=m.tee(),g=g.pipeThrough(new b)),r)if(void 0!==i&&!i||ge&&!me)m=ke(e,m,{chunkSize:n,level:f});else try{m=m.pipeThrough(new w(fe))}catch(t){me=!1,m=ke(e,m,{chunkSize:n,level:f})}a&&(u?m=m.pipeThrough(new se(o,l)):(y=new J(o,h),m=m.pipeThrough(y))),Se(d,m,(async()=>{let e;a&&!u&&(e=y.signature),a&&!u||!p||(e=await g.getReader().read(),e=new c(e.value.buffer).getUint32(0)),d.signature=e}))}}class be extends f{constructor(e,t,{chunkSize:n},...r){super({},...r);const{zipCrypto:a,encrypted:i,password:o,passwordVerification:l,signed:h,encryptionStrength:u,compressed:p,useCompressionStream:f}=t;let d,g,w=ve(super.readable);if(i&&(a?w=w.pipeThrough(new ne(o,l)):(g=new j(o,h,u),w=w.pipeThrough(g))),p)if(void 0!==f&&!f||we&&!ye)w=ke(e,w,{chunkSize:n});else try{w=w.pipeThrough(new y(fe))}catch(t){ye=!1,w=ke(e,w,{chunkSize:n})}i&&!a||!h||([w,d]=w.tee(),d=d.pipeThrough(new b)),Se(this,w,(async()=>{if(i&&!a&&!g.valid)throw new s(pe);if((!i||a)&&h){const e=await d.getReader().read(),n=new c(e.value.buffer);if(t.signature!=n.getUint32(0,!1))throw new s(pe)}}))}}function ke(e,t,n){return t.pipeThrough(new ue(e,n))}function ve(e){return e.pipeThrough(new f({transform(e,t){e&&e.length&&t.enqueue(e)}}))}function Se(e,n,s){n=n.pipeThrough(new f({flush:s})),t.defineProperty(e,"readable",{get:()=>n})}const Ce="deflate",ze="inflate",Te="data";class Ie{constructor(e,n,s,r,a){const{codecType:i}=r;let o;i.startsWith(Ce)?o=_e:i.startsWith(ze)&&(o=be),t.assign(this,{StreamConstructor:o,CodecConstructor:e,readable:n,writable:s,options:r,config:a})}async run(){const{StreamConstructor:e,CodecConstructor:t,readable:n,writable:s,options:r,config:a}=this,i=new e(t,r,a);let o=0;await n.pipeThrough(i).pipeThrough(new f({transform(e,t){e&&e.length&&(o+=e.length,t.enqueue(e))}})).pipeTo(s,{preventClose:!0,preventAbort:!0});const{signature:c}=i;return{size:o,signature:c}}}const Re=new Map,Ae=new Map;let De,Ve=0;async function qe(e){try{const{options:t,scripts:n,config:s}=e,{codecType:r}=t;let a;n&&n.length&&importScripts.apply(void 0,n),self.initCodec&&self.initCodec(),r.startsWith(Ce)?a=self.Deflate:r.startsWith(ze)&&(a=self.Inflate);const i={highWaterMark:1,size:()=>s.chunkSize},o=e.readable||new d({async pull(e){let t=new l((e=>Re.set(Ve,e)));Be({type:"pull",messageId:Ve}),Ve=(Ve+1)%Number.MAX_SAFE_INTEGER;const{value:n,done:s}=await t;e.enqueue(n),s&&e.close()}},i),c=e.writable||new g({async write(e){let t;const n=new l((e=>t=e));Ae.set(Ve,t),Be({type:Te,data:e,messageId:Ve}),Ve=(Ve+1)%Number.MAX_SAFE_INTEGER,await n}},i);De=new Ie(a,o,c,t,s);const h=await De.run();e.writable&&!t.preventClose&&await e.writable.close(),Be({type:"close",result:h})}catch(e){He(e)}}function Be(e){if(e.data){let{data:t}=e;if(t&&t.length)try{t=new r(t),e.data=t.buffer,p(e,[e.data])}catch(t){p(e)}else p(e)}else p(e)}function He(e){const{message:t,stack:n,code:s,name:r}=e;p({error:{message:t,stack:n,code:s,name:r}})}function Ke(e,n,s){return class{constructor(a){const i=this;t.hasOwn(a,"level")&&void 0===a.level&&delete a.level,i.codec=new e(t.assign({},n,a)),s(i.codec,(e=>{if(i.pendingData){const{pendingData:t}=i;i.pendingData=new r(t.length+e.length),t.set(t,0),t.set(e,t.length)}else i.pendingData=new r(e)}))}append(e){return this.codec.push(e),a(this)}flush(){return this.codec.push(new r,!0),a(this)}};function a(e){if(e.pendingData){const t=e.pendingData;return e.pendingData=null,t}return new r}}addEventListener("message",(async e=>{const t=e.data,{type:n,messageId:s,data:a,done:i}=t;try{if("start"==n&&qe(t),n==Te){const e=Re.get(s);Re.delete(s),e({value:new r(a),done:i})}if("ack"==n){const e=Ae.get(s);Ae.delete(s),e()}}catch(e){He(e)}})),self.initCodec=()=>{const{Deflate:e,Inflate:t}=((e,t={},n)=>({Deflate:Ke(e.Deflate,t.deflate,n),Inflate:Ke(e.Inflate,t.inflate,n)}))(fflate,void 0,((e,t)=>e.ondata=t));self.Deflate=e,self.Inflate=t}}();
@@ -1 +1 @@
1
- !function(){"use strict";const{Array:e,Object:t,Math:n,Error:s,Uint8Array:r,Uint16Array:a,Uint32Array:i,Int32Array:o,DataView:c,Promise:l,TextEncoder:h,crypto:u,postMessage:p,TransformStream:f,ReadableStream:d,WritableStream:g,CompressionStream:w,DecompressionStream:y}=globalThis,m=[];for(let e=0;256>e;e++){let t=e;for(let e=0;8>e;e++)1&t?t=t>>>1^3988292384:t>>>=1;m[e]=t}class _{constructor(e){this.crc=e||-1}append(e){let t=0|this.crc;for(let n=0,s=0|e.length;s>n;n++)t=t>>>8^m[255&(t^e[n])];this.crc=t}get(){return~this.crc}}class b extends f{constructor(){super({start(){this.crc32=new _},transform(e){this.crc32.append(e)},flush(e){const t=new r(4);new c(t.buffer).setUint32(0,this.crc32.get()),e.enqueue(t)}})}}const k={concat(e,t){if(0===e.length||0===t.length)return e.concat(t);const n=e[e.length-1],s=k.getPartial(n);return 32===s?e.concat(t):k._shiftRight(t,s,0|n,e.slice(0,e.length-1))},bitLength(e){const t=e.length;if(0===t)return 0;const n=e[t-1];return 32*(t-1)+k.getPartial(n)},clamp(e,t){if(32*e.length<t)return e;const s=(e=e.slice(0,n.ceil(t/32))).length;return t&=31,s>0&&t&&(e[s-1]=k.partial(t,e[s-1]&2147483648>>t-1,1)),e},partial:(e,t,n)=>32===e?t:(n?0|t:t<<32-e)+1099511627776*e,getPartial:e=>n.round(e/1099511627776)||32,_shiftRight(e,t,n,s){for(void 0===s&&(s=[]);t>=32;t-=32)s.push(n),n=0;if(0===t)return s.concat(e);for(let r=0;r<e.length;r++)s.push(n|e[r]>>>t),n=e[r]<<32-t;const r=e.length?e[e.length-1]:0,a=k.getPartial(r);return s.push(k.partial(t+a&31,t+a>32?n:s.pop(),1)),s}},v={bytes:{fromBits(e){const t=k.bitLength(e)/8,n=new r(t);let s;for(let r=0;t>r;r++)0==(3&r)&&(s=e[r/4]),n[r]=s>>>24,s<<=8;return n},toBits(e){const t=[];let n,s=0;for(n=0;n<e.length;n++)s=s<<8|e[n],3==(3&n)&&(t.push(s),s=0);return 3&n&&t.push(k.partial(8*(3&n),s)),t}}},S={sha1:function(e){e?(this._h=e._h.slice(0),this._buffer=e._buffer.slice(0),this._length=e._length):this.reset()}};S.sha1.prototype={blockSize:512,reset(){const e=this;return e._h=this._init.slice(0),e._buffer=[],e._length=0,e},update(e){const t=this;"string"==typeof e&&(e=v.utf8String.toBits(e));const n=t._buffer=k.concat(t._buffer,e),r=t._length,a=t._length=r+k.bitLength(e);if(a>9007199254740991)throw new s("Cannot hash more than 2^53 - 1 bits");const o=new i(n);let c=0;for(let e=t.blockSize+r-(t.blockSize+r&t.blockSize-1);a>=e;e+=t.blockSize)t._block(o.subarray(16*c,16*(c+1))),c+=1;return n.splice(0,16*c),t},finalize(){const e=this;let t=e._buffer;const s=e._h;t=k.concat(t,[k.partial(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(n.floor(e._length/4294967296)),t.push(0|e._length);t.length;)e._block(t.splice(0,16));return e.reset(),s},_init:[1732584193,4023233417,2562383102,271733878,3285377520],_key:[1518500249,1859775393,2400959708,3395469782],_f:(e,t,n,s)=>e>19?e>39?e>59?e>79?void 0:t^n^s:t&n|t&s|n&s:t^n^s:t&n|~t&s,_S:(e,t)=>t<<e|t>>>32-e,_block(t){const s=this,r=s._h,a=e(80);for(let e=0;16>e;e++)a[e]=t[e];let i=r[0],o=r[1],c=r[2],l=r[3],h=r[4];for(let e=0;79>=e;e++){16>e||(a[e]=s._S(1,a[e-3]^a[e-8]^a[e-14]^a[e-16]));const t=s._S(5,i)+s._f(e,o,c,l)+h+a[e]+s._key[n.floor(e/20)]|0;h=l,l=c,c=s._S(30,o),o=i,i=t}r[0]=r[0]+i|0,r[1]=r[1]+o|0,r[2]=r[2]+c|0,r[3]=r[3]+l|0,r[4]=r[4]+h|0}};const C={getRandomValues(e){const t=new i(e.buffer),s=e=>{let t=987654321;const s=4294967295;return()=>(t=36969*(65535&t)+(t>>16)&s,(((t<<16)+(e=18e3*(65535&e)+(e>>16)&s)&s)/4294967296+.5)*(n.random()>.5?1:-1))};for(let r,a=0;a<e.length;a+=4){const e=s(4294967296*(r||n.random()));r=987654071*e(),t[a/4]=4294967296*e()|0}return e}},z={importKey:e=>new z.hmacSha1(v.bytes.toBits(e)),pbkdf2(e,t,n,r){if(n=n||1e4,0>r||0>n)throw new s("invalid params to pbkdf2");const a=1+(r>>5)<<2;let i,o,l,h,u;const p=new ArrayBuffer(a),f=new c(p);let d=0;const g=k;for(t=v.bytes.toBits(t),u=1;(a||1)>d;u++){for(i=o=e.encrypt(g.concat(t,[u])),l=1;n>l;l++)for(o=e.encrypt(o),h=0;h<o.length;h++)i[h]^=o[h];for(l=0;(a||1)>d&&l<i.length;l++)f.setInt32(d,i[l]),d+=4}return p.slice(0,r/8)},hmacSha1:class{constructor(e){const t=this,n=t._hash=S.sha1,s=[[],[]],r=n.prototype.blockSize/32;t._baseHash=[new n,new n],e.length>r&&(e=n.hash(e));for(let t=0;r>t;t++)s[0][t]=909522486^e[t],s[1][t]=1549556828^e[t];t._baseHash[0].update(s[0]),t._baseHash[1].update(s[1]),t._resultHash=new n(t._baseHash[0])}reset(){const e=this;e._resultHash=new e._hash(e._baseHash[0]),e._updated=!1}update(e){this._updated=!0,this._resultHash.update(e)}digest(){const e=this,t=e._resultHash.finalize(),n=new e._hash(e._baseHash[1]).update(t).finalize();return e.reset(),n}encrypt(e){if(this._updated)throw new s("encrypt on already updated hmac called!");return this.update(e),this.digest(e)}}},T=void 0!==u&&"function"==typeof u.getRandomValues,I="Invalid password";function D(e){return T?u.getRandomValues(e):C.getRandomValues(e)}const R=16,A={name:"PBKDF2"},V=t.assign({hash:{name:"HMAC"}},A),q=t.assign({iterations:1e3,hash:{name:"SHA-1"}},A),B=["deriveBits"],H=[8,12,16],K=[16,24,32],x=10,E=[0,0,0,0],W="undefined",M="function",P=typeof u!=W,U=P&&typeof u.subtle!=W,L=P&&U&&typeof u.subtle.importKey==M,N=P&&U&&typeof u.subtle.deriveBits==M,F=v.bytes,G=class{constructor(e){const t=this;t._tables=[[[],[],[],[],[]],[[],[],[],[],[]]],t._tables[0][0][0]||t._precompute();const n=t._tables[0][4],r=t._tables[1],a=e.length;let i,o,c,l=1;if(4!==a&&6!==a&&8!==a)throw new s("invalid aes key size");for(t._key=[o=e.slice(0),c=[]],i=a;4*a+28>i;i++){let e=o[i-1];(i%a==0||8===a&&i%a==4)&&(e=n[e>>>24]<<24^n[e>>16&255]<<16^n[e>>8&255]<<8^n[255&e],i%a==0&&(e=e<<8^e>>>24^l<<24,l=l<<1^283*(l>>7))),o[i]=o[i-a]^e}for(let e=0;i;e++,i--){const t=o[3&e?i:i-4];c[e]=4>=i||4>e?t:r[0][n[t>>>24]]^r[1][n[t>>16&255]]^r[2][n[t>>8&255]]^r[3][n[255&t]]}}encrypt(e){return this._crypt(e,0)}decrypt(e){return this._crypt(e,1)}_precompute(){const e=this._tables[0],t=this._tables[1],n=e[4],s=t[4],r=[],a=[];let i,o,c,l;for(let e=0;256>e;e++)a[(r[e]=e<<1^283*(e>>7))^e]=e;for(let h=i=0;!n[h];h^=o||1,i=a[i]||1){let a=i^i<<1^i<<2^i<<3^i<<4;a=a>>8^255&a^99,n[h]=a,s[a]=h,l=r[c=r[o=r[h]]];let u=16843009*l^65537*c^257*o^16843008*h,p=257*r[a]^16843008*a;for(let n=0;4>n;n++)e[n][h]=p=p<<24^p>>>8,t[n][a]=u=u<<24^u>>>8}for(let n=0;5>n;n++)e[n]=e[n].slice(0),t[n]=t[n].slice(0)}_crypt(e,t){if(4!==e.length)throw new s("invalid aes block size");const n=this._key[t],r=n.length/4-2,a=[0,0,0,0],i=this._tables[t],o=i[0],c=i[1],l=i[2],h=i[3],u=i[4];let p,f,d,g=e[0]^n[0],w=e[t?3:1]^n[1],y=e[2]^n[2],m=e[t?1:3]^n[3],_=4;for(let e=0;r>e;e++)p=o[g>>>24]^c[w>>16&255]^l[y>>8&255]^h[255&m]^n[_],f=o[w>>>24]^c[y>>16&255]^l[m>>8&255]^h[255&g]^n[_+1],d=o[y>>>24]^c[m>>16&255]^l[g>>8&255]^h[255&w]^n[_+2],m=o[m>>>24]^c[g>>16&255]^l[w>>8&255]^h[255&y]^n[_+3],_+=4,g=p,w=f,y=d;for(let e=0;4>e;e++)a[t?3&-e:e]=u[g>>>24]<<24^u[w>>16&255]<<16^u[y>>8&255]<<8^u[255&m]^n[_++],p=g,g=w,w=y,y=m,m=p;return a}},O=class{constructor(e,t){this._prf=e,this._initIv=t,this._iv=t}reset(){this._iv=this._initIv}update(e){return this.calculate(this._prf,e,this._iv)}incWord(e){if(255==(e>>24&255)){let t=e>>16&255,n=e>>8&255,s=255&e;255===t?(t=0,255===n?(n=0,255===s?s=0:++s):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=s}else e+=1<<24;return e}incCounter(e){0===(e[0]=this.incWord(e[0]))&&(e[1]=this.incWord(e[1]))}calculate(e,t,n){let s;if(!(s=t.length))return[];const r=k.bitLength(t);for(let r=0;s>r;r+=4){this.incCounter(n);const s=e.encrypt(n);t[r]^=s[0],t[r+1]^=s[1],t[r+2]^=s[2],t[r+3]^=s[3]}return k.clamp(t,r)}},X=z.hmacSha1;class j extends f{constructor(n,a,i){let o;super({start(){t.assign(this,{ready:new l((e=>this.resolveReady=e)),password:n,signed:a,strength:i-1,pending:new r})},async transform(t,n){const a=this;if(a.password){const n=a.password;a.password=null;const r=$(t,0,H[a.strength]+2);await(async(e,t,n)=>{await Y(e,n,$(t,0,H[e.strength]));const r=$(t,H[e.strength]),a=e.keys.passwordVerification;if(a[0]!=r[0]||a[1]!=r[1])throw new s(I)})(a,r,n),a.ctr=new O(new G(a.keys.key),e.from(E)),a.hmac=new X(a.keys.authentication),t=$(t,H[a.strength]+2),a.resolveReady()}else await a.ready;const i=new r(t.length-x-(t.length-x)%R);n.enqueue(Q(a,t,i,0,x,!0))},async flush(e){const t=this;await t.ready;const n=t.pending,s=$(n,0,n.length-x),a=$(n,n.length-x);let i=new r;if(s.length){const e=te(F,s);t.hmac.update(e);const n=t.ctr.update(e);i=ee(F,n)}if(o.valid=!0,t.signed){const e=$(ee(F,t.hmac.digest()),0,x);for(let t=0;x>t;t++)e[t]!=a[t]&&(o.valid=!1)}e.enqueue(i)}}),o=this}}class J extends f{constructor(n,s){let a;super({start(){t.assign(this,{ready:new l((e=>this.resolveReady=e)),password:n,strength:s-1,pending:new r})},async transform(t,n){const s=this;let a=new r;if(s.password){const t=s.password;s.password=null,a=await(async(e,t)=>{const n=D(new r(H[e.strength]));return await Y(e,t,n),Z(n,e.keys.passwordVerification)})(s,t),s.ctr=new O(new G(s.keys.key),e.from(E)),s.hmac=new X(s.keys.authentication),s.resolveReady()}else await s.ready;const i=new r(a.length+t.length-t.length%R);i.set(a,0),n.enqueue(Q(s,t,i,a.length,0))},async flush(e){const t=this;await t.ready;let n=new r;if(t.pending.length){const e=t.ctr.update(te(F,t.pending));t.hmac.update(e),n=ee(F,e)}a.signature=ee(F,t.hmac.digest()).slice(0,x),e.enqueue(Z(n,a.signature))}}),a=this}}function Q(e,t,n,s,a,i){const o=t.length-a;let c;for(e.pending.length&&(t=Z(e.pending,t),n=((e,t)=>{if(t&&t>e.length){const n=e;(e=new r(t)).set(n,0)}return e})(n,o-o%R)),c=0;o-R>=c;c+=R){const r=te(F,$(t,c,c+R));i&&e.hmac.update(r);const a=e.ctr.update(r);i||e.hmac.update(a),n.set(ee(F,a),c+s)}return e.pending=$(t,c),n}async function Y(e,n,s){const a=(e=>{if(void 0===h){const t=new r((e=unescape(encodeURIComponent(e))).length);for(let n=0;n<t.length;n++)t[n]=e.charCodeAt(n);return t}return(new h).encode(e)})(n),i=await((e,t,n,s,r)=>L?u.subtle.importKey("raw",t,n,!1,r):z.importKey(t))(0,a,V,0,B),o=await(async(e,t,n)=>N?await u.subtle.deriveBits(e,t,n):z.pbkdf2(t,e.salt,q.iterations,n))(t.assign({salt:s},q),i,8*(2*K[e.strength]+2)),c=new r(o);e.keys={key:te(F,$(c,0,K[e.strength])),authentication:te(F,$(c,K[e.strength],2*K[e.strength])),passwordVerification:$(c,2*K[e.strength])}}function Z(e,t){let n=e;return e.length+t.length&&(n=new r(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function $(e,t,n){return e.subarray(t,n)}function ee(e,t){return e.fromBits(t)}function te(e,t){return e.toBits(t)}class ne extends f{constructor(e,n){let r;super({start(){t.assign(this,{password:e,passwordVerification:n}),ie(this,e)},transform(e,t){const n=this;if(n.password){const t=re(n,e.subarray(0,12));if(n.password=null,t[11]!=n.passwordVerification)throw new s(I);e=e.subarray(12)}t.enqueue(re(n,e))},flush(){r.valid=!0}}),r=this}}class se extends f{constructor(e,n){super({start(){t.assign(this,{password:e,passwordVerification:n}),ie(this,e)},transform(e,t){const n=this;let s,a;if(n.password){n.password=null;const t=D(new r(12));t[11]=n.passwordVerification,s=new r(e.length+t.length),s.set(ae(n,t),0),a=12}else s=new r(e.length),a=0;s.set(ae(n,e),a),t.enqueue(s)},flush(){}})}}function re(e,t){const n=new r(t.length);for(let s=0;s<t.length;s++)n[s]=ce(e)^t[s],oe(e,n[s]);return n}function ae(e,t){const n=new r(t.length);for(let s=0;s<t.length;s++)n[s]=ce(e)^t[s],oe(e,t[s]);return n}function ie(e,t){e.keys=[305419896,591751049,878082192],e.crcKey0=new _(e.keys[0]),e.crcKey2=new _(e.keys[2]);for(let n=0;n<t.length;n++)oe(e,t.charCodeAt(n))}function oe(e,t){e.crcKey0.append([t]),e.keys[0]=~e.crcKey0.get(),e.keys[1]=he(e.keys[1]+le(e.keys[0])),e.keys[1]=he(n.imul(e.keys[1],134775813)+1),e.crcKey2.append([e.keys[1]>>>24]),e.keys[2]=~e.crcKey2.get()}function ce(e){const t=2|e.keys[2];return le(n.imul(t,1^t)>>>8)}function le(e){return 255&e}function he(e){return 4294967295&e}class ue extends f{constructor(e,t){let n;super({start(){n=new e(t)},transform(e,t){e=n.append(e),t.enqueue(e)},flush(e){const t=n.flush();t&&e.enqueue(t)}})}}const pe="Invalid signature",fe="deflate-raw",de="undefined",ge=typeof w==de,we=typeof y==de;let ye=!0,me=!0;class _e extends f{constructor(e,t,{chunkSize:n},...s){super({},...s);const{compressed:r,encrypted:a,useCompressionStream:i,password:o,passwordVerification:l,encryptionStrength:h,zipCrypto:u,signed:p,level:f}=t,d=this;let g,y,m=ve(super.readable);if(a&&!u||!p||([m,g]=m.tee(),g=g.pipeThrough(new b)),r)if(void 0!==i&&!i||ge&&!me)m=ke(e,m,{chunkSize:n,level:f});else try{m=m.pipeThrough(new w(fe))}catch(t){me=!1,m=ke(e,m,{chunkSize:n,level:f})}a&&(u?m=m.pipeThrough(new se(o,l)):(y=new J(o,h),m=m.pipeThrough(y))),Se(d,m,(async()=>{let e;a&&!u&&(e=y.signature),a&&!u||!p||(e=await g.getReader().read(),e=new c(e.value.buffer).getUint32(0)),d.signature=e}))}}class be extends f{constructor(e,t,{chunkSize:n},...r){super({},...r);const{zipCrypto:a,encrypted:i,password:o,passwordVerification:l,signed:h,encryptionStrength:u,compressed:p,useCompressionStream:f}=t;let d,g,w=ve(super.readable);if(i&&(a?w=w.pipeThrough(new ne(o,l)):(g=new j(o,h,u),w=w.pipeThrough(g))),p)if(void 0!==f&&!f||we&&!ye)w=ke(e,w,{chunkSize:n});else try{w=w.pipeThrough(new y(fe))}catch(t){ye=!1,w=ke(e,w,{chunkSize:n})}i&&!a||!h||([w,d]=w.tee(),d=d.pipeThrough(new b)),Se(this,w,(async()=>{if(i&&!a&&!g.valid)throw new s(pe);if((!i||a)&&h){const e=await d.getReader().read(),n=new c(e.value.buffer);if(t.signature!=n.getUint32(0,!1))throw new s(pe)}}))}}function ke(e,t,n){return t.pipeThrough(new ue(e,n))}function ve(e){return e.pipeThrough(new f({transform(e,t){e&&e.length&&t.enqueue(e)}}))}function Se(e,n,s){n=n.pipeThrough(new f({flush:s})),t.defineProperty(e,"readable",{get:()=>n})}const Ce="deflate",ze="inflate",Te="data";class Ie{constructor(e,n,s,r,a){const{codecType:i}=r;let o;i.startsWith(Ce)?o=_e:i.startsWith(ze)&&(o=be),t.assign(this,{StreamConstructor:o,CodecConstructor:e,readable:n,writable:s,options:r,config:a})}async run(){const{StreamConstructor:e,CodecConstructor:t,readable:n,writable:s,options:r,config:a}=this,i=new e(t,r,a);let o=0;await n.pipeThrough(i).pipeThrough(new f({transform(e,t){e&&e.length&&(o+=e.length,t.enqueue(e))}})).pipeTo(s,{preventClose:!0,preventAbort:!0});const{signature:c}=i;return{size:o,signature:c}}}const De=new Map,Re=new Map;let Ae,Ve=0;async function qe(e){try{const{options:t,scripts:n,config:s}=e,{codecType:r}=t;let a;n&&n.length&&importScripts.apply(void 0,n),self.initCodec&&self.initCodec(),r.startsWith(Ce)?a=self.Deflate:r.startsWith(ze)&&(a=self.Inflate);const i={highWaterMark:1,size:()=>s.chunkSize},o=e.readable||new d({async pull(e){let t=new l((e=>De.set(Ve,e)));Be({type:"pull",messageId:Ve}),Ve=(Ve+1)%Number.MAX_SAFE_INTEGER;const{value:n,done:s}=await t;e.enqueue(n),s&&e.close()}},i),c=e.writable||new g({async write(e){let t;const n=new l((e=>t=e));Re.set(Ve,t),Be({type:Te,data:e,messageId:Ve}),Ve=(Ve+1)%Number.MAX_SAFE_INTEGER,await n}},i);Ae=new Ie(a,o,c,t,s);const h=await Ae.run();e.writable&&!t.preventClose&&await e.writable.close(),Be({type:"close",result:h})}catch(e){He(e)}}function Be(e){if(e.data){let{data:t}=e;if(t&&t.length)try{t=new r(t),e.data=t.buffer,p(e,[e.data])}catch(t){p(e)}else p(e)}else p(e)}function He(e){const{message:t,stack:n,code:s,name:r}=e;p({error:{message:t,stack:n,code:s,name:r}})}function Ke(e,n,s){return class{constructor(a){const i=this;t.hasOwn(a,"level")&&void 0===a.level&&delete a.level,i.codec=new e(t.assign({},n,a)),s(i.codec,(e=>{if(i.pendingData){const{pendingData:t}=i;i.pendingData=new r(t.length+e.length),t.set(t,0),t.set(e,t.length)}else i.pendingData=new r(e)}))}append(e){return this.codec.push(e),a(this)}flush(){return this.codec.push(new r,!0),a(this)}};function a(e){if(e.pendingData){const t=e.pendingData;return e.pendingData=null,t}return new r}}addEventListener("message",(async e=>{const t=e.data,{type:n,messageId:s,data:a,done:i}=t;try{if("start"==n&&qe(t),n==Te){const e=De.get(s);De.delete(s),e({value:new r(a),done:i})}if("ack"==n){const e=Re.get(s);Re.delete(s),e()}}catch(e){He(e)}})),self.initCodec=()=>{const{Deflate:e,Inflate:t}=((e,t={},n)=>({Deflate:Ke(e.Deflate,t.deflate,n),Inflate:Ke(e.Inflate,t.inflate,n)}))(pako,{deflate:{raw:!0},inflate:{raw:!0}},((e,t)=>e.onData=t));self.Deflate=e,self.Inflate=t}}();
1
+ !function(){"use strict";const{Array:e,Object:t,Math:n,Error:s,Uint8Array:r,Uint16Array:a,Uint32Array:i,Int32Array:o,DataView:c,Promise:l,TextEncoder:h,crypto:u,postMessage:p,TransformStream:f,ReadableStream:d,WritableStream:g,CompressionStream:w,DecompressionStream:y}=globalThis,m=[];for(let e=0;256>e;e++){let t=e;for(let e=0;8>e;e++)1&t?t=t>>>1^3988292384:t>>>=1;m[e]=t}class _{constructor(e){this.crc=e||-1}append(e){let t=0|this.crc;for(let n=0,s=0|e.length;s>n;n++)t=t>>>8^m[255&(t^e[n])];this.crc=t}get(){return~this.crc}}class b extends f{constructor(){const e=new _;super({transform(t){e.append(t)},flush(t){const n=new r(4);new c(n.buffer).setUint32(0,e.get()),t.enqueue(n)}})}}const k={concat(e,t){if(0===e.length||0===t.length)return e.concat(t);const n=e[e.length-1],s=k.getPartial(n);return 32===s?e.concat(t):k._shiftRight(t,s,0|n,e.slice(0,e.length-1))},bitLength(e){const t=e.length;if(0===t)return 0;const n=e[t-1];return 32*(t-1)+k.getPartial(n)},clamp(e,t){if(32*e.length<t)return e;const s=(e=e.slice(0,n.ceil(t/32))).length;return t&=31,s>0&&t&&(e[s-1]=k.partial(t,e[s-1]&2147483648>>t-1,1)),e},partial:(e,t,n)=>32===e?t:(n?0|t:t<<32-e)+1099511627776*e,getPartial:e=>n.round(e/1099511627776)||32,_shiftRight(e,t,n,s){for(void 0===s&&(s=[]);t>=32;t-=32)s.push(n),n=0;if(0===t)return s.concat(e);for(let r=0;r<e.length;r++)s.push(n|e[r]>>>t),n=e[r]<<32-t;const r=e.length?e[e.length-1]:0,a=k.getPartial(r);return s.push(k.partial(t+a&31,t+a>32?n:s.pop(),1)),s}},v={bytes:{fromBits(e){const t=k.bitLength(e)/8,n=new r(t);let s;for(let r=0;t>r;r++)0==(3&r)&&(s=e[r/4]),n[r]=s>>>24,s<<=8;return n},toBits(e){const t=[];let n,s=0;for(n=0;n<e.length;n++)s=s<<8|e[n],3==(3&n)&&(t.push(s),s=0);return 3&n&&t.push(k.partial(8*(3&n),s)),t}}},S={sha1:function(e){e?(this._h=e._h.slice(0),this._buffer=e._buffer.slice(0),this._length=e._length):this.reset()}};S.sha1.prototype={blockSize:512,reset(){const e=this;return e._h=this._init.slice(0),e._buffer=[],e._length=0,e},update(e){const t=this;"string"==typeof e&&(e=v.utf8String.toBits(e));const n=t._buffer=k.concat(t._buffer,e),r=t._length,a=t._length=r+k.bitLength(e);if(a>9007199254740991)throw new s("Cannot hash more than 2^53 - 1 bits");const o=new i(n);let c=0;for(let e=t.blockSize+r-(t.blockSize+r&t.blockSize-1);a>=e;e+=t.blockSize)t._block(o.subarray(16*c,16*(c+1))),c+=1;return n.splice(0,16*c),t},finalize(){const e=this;let t=e._buffer;const s=e._h;t=k.concat(t,[k.partial(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(n.floor(e._length/4294967296)),t.push(0|e._length);t.length;)e._block(t.splice(0,16));return e.reset(),s},_init:[1732584193,4023233417,2562383102,271733878,3285377520],_key:[1518500249,1859775393,2400959708,3395469782],_f:(e,t,n,s)=>e>19?e>39?e>59?e>79?void 0:t^n^s:t&n|t&s|n&s:t^n^s:t&n|~t&s,_S:(e,t)=>t<<e|t>>>32-e,_block(t){const s=this,r=s._h,a=e(80);for(let e=0;16>e;e++)a[e]=t[e];let i=r[0],o=r[1],c=r[2],l=r[3],h=r[4];for(let e=0;79>=e;e++){16>e||(a[e]=s._S(1,a[e-3]^a[e-8]^a[e-14]^a[e-16]));const t=s._S(5,i)+s._f(e,o,c,l)+h+a[e]+s._key[n.floor(e/20)]|0;h=l,l=c,c=s._S(30,o),o=i,i=t}r[0]=r[0]+i|0,r[1]=r[1]+o|0,r[2]=r[2]+c|0,r[3]=r[3]+l|0,r[4]=r[4]+h|0}};const C={getRandomValues(e){const t=new i(e.buffer),s=e=>{let t=987654321;const s=4294967295;return()=>(t=36969*(65535&t)+(t>>16)&s,(((t<<16)+(e=18e3*(65535&e)+(e>>16)&s)&s)/4294967296+.5)*(n.random()>.5?1:-1))};for(let r,a=0;a<e.length;a+=4){const e=s(4294967296*(r||n.random()));r=987654071*e(),t[a/4]=4294967296*e()|0}return e}},z={importKey:e=>new z.hmacSha1(v.bytes.toBits(e)),pbkdf2(e,t,n,r){if(n=n||1e4,0>r||0>n)throw new s("invalid params to pbkdf2");const a=1+(r>>5)<<2;let i,o,l,h,u;const p=new ArrayBuffer(a),f=new c(p);let d=0;const g=k;for(t=v.bytes.toBits(t),u=1;(a||1)>d;u++){for(i=o=e.encrypt(g.concat(t,[u])),l=1;n>l;l++)for(o=e.encrypt(o),h=0;h<o.length;h++)i[h]^=o[h];for(l=0;(a||1)>d&&l<i.length;l++)f.setInt32(d,i[l]),d+=4}return p.slice(0,r/8)},hmacSha1:class{constructor(e){const t=this,n=t._hash=S.sha1,s=[[],[]],r=n.prototype.blockSize/32;t._baseHash=[new n,new n],e.length>r&&(e=n.hash(e));for(let t=0;r>t;t++)s[0][t]=909522486^e[t],s[1][t]=1549556828^e[t];t._baseHash[0].update(s[0]),t._baseHash[1].update(s[1]),t._resultHash=new n(t._baseHash[0])}reset(){const e=this;e._resultHash=new e._hash(e._baseHash[0]),e._updated=!1}update(e){this._updated=!0,this._resultHash.update(e)}digest(){const e=this,t=e._resultHash.finalize(),n=new e._hash(e._baseHash[1]).update(t).finalize();return e.reset(),n}encrypt(e){if(this._updated)throw new s("encrypt on already updated hmac called!");return this.update(e),this.digest(e)}}},T=void 0!==u&&"function"==typeof u.getRandomValues,I="Invalid password";function D(e){return T?u.getRandomValues(e):C.getRandomValues(e)}const R=16,A={name:"PBKDF2"},V=t.assign({hash:{name:"HMAC"}},A),q=t.assign({iterations:1e3,hash:{name:"SHA-1"}},A),B=["deriveBits"],H=[8,12,16],K=[16,24,32],x=10,E=[0,0,0,0],W="undefined",M="function",P=typeof u!=W,U=P&&typeof u.subtle!=W,L=P&&U&&typeof u.subtle.importKey==M,N=P&&U&&typeof u.subtle.deriveBits==M,F=v.bytes,G=class{constructor(e){const t=this;t._tables=[[[],[],[],[],[]],[[],[],[],[],[]]],t._tables[0][0][0]||t._precompute();const n=t._tables[0][4],r=t._tables[1],a=e.length;let i,o,c,l=1;if(4!==a&&6!==a&&8!==a)throw new s("invalid aes key size");for(t._key=[o=e.slice(0),c=[]],i=a;4*a+28>i;i++){let e=o[i-1];(i%a==0||8===a&&i%a==4)&&(e=n[e>>>24]<<24^n[e>>16&255]<<16^n[e>>8&255]<<8^n[255&e],i%a==0&&(e=e<<8^e>>>24^l<<24,l=l<<1^283*(l>>7))),o[i]=o[i-a]^e}for(let e=0;i;e++,i--){const t=o[3&e?i:i-4];c[e]=4>=i||4>e?t:r[0][n[t>>>24]]^r[1][n[t>>16&255]]^r[2][n[t>>8&255]]^r[3][n[255&t]]}}encrypt(e){return this._crypt(e,0)}decrypt(e){return this._crypt(e,1)}_precompute(){const e=this._tables[0],t=this._tables[1],n=e[4],s=t[4],r=[],a=[];let i,o,c,l;for(let e=0;256>e;e++)a[(r[e]=e<<1^283*(e>>7))^e]=e;for(let h=i=0;!n[h];h^=o||1,i=a[i]||1){let a=i^i<<1^i<<2^i<<3^i<<4;a=a>>8^255&a^99,n[h]=a,s[a]=h,l=r[c=r[o=r[h]]];let u=16843009*l^65537*c^257*o^16843008*h,p=257*r[a]^16843008*a;for(let n=0;4>n;n++)e[n][h]=p=p<<24^p>>>8,t[n][a]=u=u<<24^u>>>8}for(let n=0;5>n;n++)e[n]=e[n].slice(0),t[n]=t[n].slice(0)}_crypt(e,t){if(4!==e.length)throw new s("invalid aes block size");const n=this._key[t],r=n.length/4-2,a=[0,0,0,0],i=this._tables[t],o=i[0],c=i[1],l=i[2],h=i[3],u=i[4];let p,f,d,g=e[0]^n[0],w=e[t?3:1]^n[1],y=e[2]^n[2],m=e[t?1:3]^n[3],_=4;for(let e=0;r>e;e++)p=o[g>>>24]^c[w>>16&255]^l[y>>8&255]^h[255&m]^n[_],f=o[w>>>24]^c[y>>16&255]^l[m>>8&255]^h[255&g]^n[_+1],d=o[y>>>24]^c[m>>16&255]^l[g>>8&255]^h[255&w]^n[_+2],m=o[m>>>24]^c[g>>16&255]^l[w>>8&255]^h[255&y]^n[_+3],_+=4,g=p,w=f,y=d;for(let e=0;4>e;e++)a[t?3&-e:e]=u[g>>>24]<<24^u[w>>16&255]<<16^u[y>>8&255]<<8^u[255&m]^n[_++],p=g,g=w,w=y,y=m,m=p;return a}},O=class{constructor(e,t){this._prf=e,this._initIv=t,this._iv=t}reset(){this._iv=this._initIv}update(e){return this.calculate(this._prf,e,this._iv)}incWord(e){if(255==(e>>24&255)){let t=e>>16&255,n=e>>8&255,s=255&e;255===t?(t=0,255===n?(n=0,255===s?s=0:++s):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=s}else e+=1<<24;return e}incCounter(e){0===(e[0]=this.incWord(e[0]))&&(e[1]=this.incWord(e[1]))}calculate(e,t,n){let s;if(!(s=t.length))return[];const r=k.bitLength(t);for(let r=0;s>r;r+=4){this.incCounter(n);const s=e.encrypt(n);t[r]^=s[0],t[r+1]^=s[1],t[r+2]^=s[2],t[r+3]^=s[3]}return k.clamp(t,r)}},X=z.hmacSha1;class j extends f{constructor(n,a,i){let o;super({start(){t.assign(this,{ready:new l((e=>this.resolveReady=e)),password:n,signed:a,strength:i-1,pending:new r})},async transform(t,n){const a=this;if(a.password){const n=a.password;a.password=null;const r=$(t,0,H[a.strength]+2);await(async(e,t,n)=>{await Y(e,n,$(t,0,H[e.strength]));const r=$(t,H[e.strength]),a=e.keys.passwordVerification;if(a[0]!=r[0]||a[1]!=r[1])throw new s(I)})(a,r,n),a.ctr=new O(new G(a.keys.key),e.from(E)),a.hmac=new X(a.keys.authentication),t=$(t,H[a.strength]+2),a.resolveReady()}else await a.ready;const i=new r(t.length-x-(t.length-x)%R);n.enqueue(Q(a,t,i,0,x,!0))},async flush(e){const t=this;await t.ready;const n=t.pending,s=$(n,0,n.length-x),a=$(n,n.length-x);let i=new r;if(s.length){const e=te(F,s);t.hmac.update(e);const n=t.ctr.update(e);i=ee(F,n)}if(o.valid=!0,t.signed){const e=$(ee(F,t.hmac.digest()),0,x);for(let t=0;x>t;t++)e[t]!=a[t]&&(o.valid=!1)}e.enqueue(i)}}),o=this}}class J extends f{constructor(n,s){let a;super({start(){t.assign(this,{ready:new l((e=>this.resolveReady=e)),password:n,strength:s-1,pending:new r})},async transform(t,n){const s=this;let a=new r;if(s.password){const t=s.password;s.password=null,a=await(async(e,t)=>{const n=D(new r(H[e.strength]));return await Y(e,t,n),Z(n,e.keys.passwordVerification)})(s,t),s.ctr=new O(new G(s.keys.key),e.from(E)),s.hmac=new X(s.keys.authentication),s.resolveReady()}else await s.ready;const i=new r(a.length+t.length-t.length%R);i.set(a,0),n.enqueue(Q(s,t,i,a.length,0))},async flush(e){const t=this;await t.ready;let n=new r;if(t.pending.length){const e=t.ctr.update(te(F,t.pending));t.hmac.update(e),n=ee(F,e)}a.signature=ee(F,t.hmac.digest()).slice(0,x),e.enqueue(Z(n,a.signature))}}),a=this}}function Q(e,t,n,s,a,i){const o=t.length-a;let c;for(e.pending.length&&(t=Z(e.pending,t),n=((e,t)=>{if(t&&t>e.length){const n=e;(e=new r(t)).set(n,0)}return e})(n,o-o%R)),c=0;o-R>=c;c+=R){const r=te(F,$(t,c,c+R));i&&e.hmac.update(r);const a=e.ctr.update(r);i||e.hmac.update(a),n.set(ee(F,a),c+s)}return e.pending=$(t,c),n}async function Y(e,n,s){const a=(e=>{if(void 0===h){const t=new r((e=unescape(encodeURIComponent(e))).length);for(let n=0;n<t.length;n++)t[n]=e.charCodeAt(n);return t}return(new h).encode(e)})(n),i=await((e,t,n,s,r)=>L?u.subtle.importKey("raw",t,n,!1,r):z.importKey(t))(0,a,V,0,B),o=await(async(e,t,n)=>N?await u.subtle.deriveBits(e,t,n):z.pbkdf2(t,e.salt,q.iterations,n))(t.assign({salt:s},q),i,8*(2*K[e.strength]+2)),c=new r(o);e.keys={key:te(F,$(c,0,K[e.strength])),authentication:te(F,$(c,K[e.strength],2*K[e.strength])),passwordVerification:$(c,2*K[e.strength])}}function Z(e,t){let n=e;return e.length+t.length&&(n=new r(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function $(e,t,n){return e.subarray(t,n)}function ee(e,t){return e.fromBits(t)}function te(e,t){return e.toBits(t)}class ne extends f{constructor(e,n){let r;super({start(){t.assign(this,{password:e,passwordVerification:n}),ie(this,e)},transform(e,t){const n=this;if(n.password){const t=re(n,e.subarray(0,12));if(n.password=null,t[11]!=n.passwordVerification)throw new s(I);e=e.subarray(12)}t.enqueue(re(n,e))},flush(){r.valid=!0}}),r=this}}class se extends f{constructor(e,n){super({start(){t.assign(this,{password:e,passwordVerification:n}),ie(this,e)},transform(e,t){const n=this;let s,a;if(n.password){n.password=null;const t=D(new r(12));t[11]=n.passwordVerification,s=new r(e.length+t.length),s.set(ae(n,t),0),a=12}else s=new r(e.length),a=0;s.set(ae(n,e),a),t.enqueue(s)},flush(){}})}}function re(e,t){const n=new r(t.length);for(let s=0;s<t.length;s++)n[s]=ce(e)^t[s],oe(e,n[s]);return n}function ae(e,t){const n=new r(t.length);for(let s=0;s<t.length;s++)n[s]=ce(e)^t[s],oe(e,t[s]);return n}function ie(e,t){e.keys=[305419896,591751049,878082192],e.crcKey0=new _(e.keys[0]),e.crcKey2=new _(e.keys[2]);for(let n=0;n<t.length;n++)oe(e,t.charCodeAt(n))}function oe(e,t){e.crcKey0.append([t]),e.keys[0]=~e.crcKey0.get(),e.keys[1]=he(e.keys[1]+le(e.keys[0])),e.keys[1]=he(n.imul(e.keys[1],134775813)+1),e.crcKey2.append([e.keys[1]>>>24]),e.keys[2]=~e.crcKey2.get()}function ce(e){const t=2|e.keys[2];return le(n.imul(t,1^t)>>>8)}function le(e){return 255&e}function he(e){return 4294967295&e}class ue extends f{constructor(e,t){let n;super({start(){n=new e(t)},transform(e,t){e=n.append(e),t.enqueue(e)},flush(e){const t=n.flush();t&&e.enqueue(t)}})}}const pe="Invalid signature",fe="deflate-raw",de="undefined",ge=typeof w==de,we=typeof y==de;let ye=!0,me=!0;class _e extends f{constructor(e,t,{chunkSize:n},...s){super({},...s);const{compressed:r,encrypted:a,useCompressionStream:i,password:o,passwordVerification:l,encryptionStrength:h,zipCrypto:u,signed:p,level:f}=t,d=this;let g,y,m=ve(super.readable);if(a&&!u||!p||([m,g]=m.tee(),g=g.pipeThrough(new b)),r)if(void 0!==i&&!i||ge&&!me)m=ke(e,m,{chunkSize:n,level:f});else try{m=m.pipeThrough(new w(fe))}catch(t){me=!1,m=ke(e,m,{chunkSize:n,level:f})}a&&(u?m=m.pipeThrough(new se(o,l)):(y=new J(o,h),m=m.pipeThrough(y))),Se(d,m,(async()=>{let e;a&&!u&&(e=y.signature),a&&!u||!p||(e=await g.getReader().read(),e=new c(e.value.buffer).getUint32(0)),d.signature=e}))}}class be extends f{constructor(e,t,{chunkSize:n},...r){super({},...r);const{zipCrypto:a,encrypted:i,password:o,passwordVerification:l,signed:h,encryptionStrength:u,compressed:p,useCompressionStream:f}=t;let d,g,w=ve(super.readable);if(i&&(a?w=w.pipeThrough(new ne(o,l)):(g=new j(o,h,u),w=w.pipeThrough(g))),p)if(void 0!==f&&!f||we&&!ye)w=ke(e,w,{chunkSize:n});else try{w=w.pipeThrough(new y(fe))}catch(t){ye=!1,w=ke(e,w,{chunkSize:n})}i&&!a||!h||([w,d]=w.tee(),d=d.pipeThrough(new b)),Se(this,w,(async()=>{if(i&&!a&&!g.valid)throw new s(pe);if((!i||a)&&h){const e=await d.getReader().read(),n=new c(e.value.buffer);if(t.signature!=n.getUint32(0,!1))throw new s(pe)}}))}}function ke(e,t,n){return t.pipeThrough(new ue(e,n))}function ve(e){return e.pipeThrough(new f({transform(e,t){e&&e.length&&t.enqueue(e)}}))}function Se(e,n,s){n=n.pipeThrough(new f({flush:s})),t.defineProperty(e,"readable",{get:()=>n})}const Ce="deflate",ze="inflate",Te="data";class Ie{constructor(e,n,s,r,a){const{codecType:i}=r;let o;i.startsWith(Ce)?o=_e:i.startsWith(ze)&&(o=be),t.assign(this,{StreamConstructor:o,CodecConstructor:e,readable:n,writable:s,options:r,config:a})}async run(){const{StreamConstructor:e,CodecConstructor:t,readable:n,writable:s,options:r,config:a}=this,i=new e(t,r,a);let o=0;await n.pipeThrough(i).pipeThrough(new f({transform(e,t){e&&e.length&&(o+=e.length,t.enqueue(e))}})).pipeTo(s,{preventClose:!0,preventAbort:!0});const{signature:c}=i;return{size:o,signature:c}}}const De=new Map,Re=new Map;let Ae,Ve=0;async function qe(e){try{const{options:t,scripts:n,config:s}=e,{codecType:r}=t;let a;n&&n.length&&importScripts.apply(void 0,n),self.initCodec&&self.initCodec(),r.startsWith(Ce)?a=self.Deflate:r.startsWith(ze)&&(a=self.Inflate);const i={highWaterMark:1,size:()=>s.chunkSize},o=e.readable||new d({async pull(e){let t=new l((e=>De.set(Ve,e)));Be({type:"pull",messageId:Ve}),Ve=(Ve+1)%Number.MAX_SAFE_INTEGER;const{value:n,done:s}=await t;e.enqueue(n),s&&e.close()}},i),c=e.writable||new g({async write(e){let t;const n=new l((e=>t=e));Re.set(Ve,t),Be({type:Te,data:e,messageId:Ve}),Ve=(Ve+1)%Number.MAX_SAFE_INTEGER,await n}},i);Ae=new Ie(a,o,c,t,s);const h=await Ae.run();e.writable&&!t.preventClose&&await e.writable.close(),Be({type:"close",result:h})}catch(e){He(e)}}function Be(e){if(e.data){let{data:t}=e;if(t&&t.length)try{t=new r(t),e.data=t.buffer,p(e,[e.data])}catch(t){p(e)}else p(e)}else p(e)}function He(e){const{message:t,stack:n,code:s,name:r}=e;p({error:{message:t,stack:n,code:s,name:r}})}function Ke(e,n,s){return class{constructor(a){const i=this;t.hasOwn(a,"level")&&void 0===a.level&&delete a.level,i.codec=new e(t.assign({},n,a)),s(i.codec,(e=>{if(i.pendingData){const{pendingData:t}=i;i.pendingData=new r(t.length+e.length),t.set(t,0),t.set(e,t.length)}else i.pendingData=new r(e)}))}append(e){return this.codec.push(e),a(this)}flush(){return this.codec.push(new r,!0),a(this)}};function a(e){if(e.pendingData){const t=e.pendingData;return e.pendingData=null,t}return new r}}addEventListener("message",(async e=>{const t=e.data,{type:n,messageId:s,data:a,done:i}=t;try{if("start"==n&&qe(t),n==Te){const e=De.get(s);De.delete(s),e({value:new r(a),done:i})}if("ack"==n){const e=Re.get(s);Re.delete(s),e()}}catch(e){He(e)}})),self.initCodec=()=>{const{Deflate:e,Inflate:t}=((e,t={},n)=>({Deflate:Ke(e.Deflate,t.deflate,n),Inflate:Ke(e.Inflate,t.inflate,n)}))(pako,{deflate:{raw:!0},inflate:{raw:!0}},((e,t)=>e.onData=t));self.Deflate=e,self.Inflate=t}}();
package/dist/z-worker.js CHANGED
@@ -1 +1 @@
1
- !function(){"use strict";const{Array:e,Object:t,Math:n,Error:i,Uint8Array:a,Uint16Array:r,Uint32Array:s,Int32Array:l,DataView:o,Promise:_,TextEncoder:d,crypto:c,postMessage:u,TransformStream:f,ReadableStream:h,WritableStream:b,CompressionStream:w,DecompressionStream:p}=globalThis,x=[];for(let e=0;256>e;e++){let t=e;for(let e=0;8>e;e++)1&t?t=t>>>1^3988292384:t>>>=1;x[e]=t}class g{constructor(e){this.crc=e||-1}append(e){let t=0|this.crc;for(let n=0,i=0|e.length;i>n;n++)t=t>>>8^x[255&(t^e[n])];this.crc=t}get(){return~this.crc}}class y extends f{constructor(){super({start(){this.crc32=new g},transform(e){this.crc32.append(e)},flush(e){const t=new a(4);new o(t.buffer).setUint32(0,this.crc32.get()),e.enqueue(t)}})}}const m={concat(e,t){if(0===e.length||0===t.length)return e.concat(t);const n=e[e.length-1],i=m.getPartial(n);return 32===i?e.concat(t):m._shiftRight(t,i,0|n,e.slice(0,e.length-1))},bitLength(e){const t=e.length;if(0===t)return 0;const n=e[t-1];return 32*(t-1)+m.getPartial(n)},clamp(e,t){if(32*e.length<t)return e;const i=(e=e.slice(0,n.ceil(t/32))).length;return t&=31,i>0&&t&&(e[i-1]=m.partial(t,e[i-1]&2147483648>>t-1,1)),e},partial:(e,t,n)=>32===e?t:(n?0|t:t<<32-e)+1099511627776*e,getPartial:e=>n.round(e/1099511627776)||32,_shiftRight(e,t,n,i){for(void 0===i&&(i=[]);t>=32;t-=32)i.push(n),n=0;if(0===t)return i.concat(e);for(let a=0;a<e.length;a++)i.push(n|e[a]>>>t),n=e[a]<<32-t;const a=e.length?e[e.length-1]:0,r=m.getPartial(a);return i.push(m.partial(t+r&31,t+r>32?n:i.pop(),1)),i}},v={bytes:{fromBits(e){const t=m.bitLength(e)/8,n=new a(t);let i;for(let a=0;t>a;a++)0==(3&a)&&(i=e[a/4]),n[a]=i>>>24,i<<=8;return n},toBits(e){const t=[];let n,i=0;for(n=0;n<e.length;n++)i=i<<8|e[n],3==(3&n)&&(t.push(i),i=0);return 3&n&&t.push(m.partial(8*(3&n),i)),t}}},k={sha1:function(e){e?(this._h=e._h.slice(0),this._buffer=e._buffer.slice(0),this._length=e._length):this.reset()}};k.sha1.prototype={blockSize:512,reset(){const e=this;return e._h=this._init.slice(0),e._buffer=[],e._length=0,e},update(e){const t=this;"string"==typeof e&&(e=v.utf8String.toBits(e));const n=t._buffer=m.concat(t._buffer,e),a=t._length,r=t._length=a+m.bitLength(e);if(r>9007199254740991)throw new i("Cannot hash more than 2^53 - 1 bits");const l=new s(n);let o=0;for(let e=t.blockSize+a-(t.blockSize+a&t.blockSize-1);r>=e;e+=t.blockSize)t._block(l.subarray(16*o,16*(o+1))),o+=1;return n.splice(0,16*o),t},finalize(){const e=this;let t=e._buffer;const i=e._h;t=m.concat(t,[m.partial(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(n.floor(e._length/4294967296)),t.push(0|e._length);t.length;)e._block(t.splice(0,16));return e.reset(),i},_init:[1732584193,4023233417,2562383102,271733878,3285377520],_key:[1518500249,1859775393,2400959708,3395469782],_f:(e,t,n,i)=>e>19?e>39?e>59?e>79?void 0:t^n^i:t&n|t&i|n&i:t^n^i:t&n|~t&i,_S:(e,t)=>t<<e|t>>>32-e,_block(t){const i=this,a=i._h,r=e(80);for(let e=0;16>e;e++)r[e]=t[e];let s=a[0],l=a[1],o=a[2],_=a[3],d=a[4];for(let e=0;79>=e;e++){16>e||(r[e]=i._S(1,r[e-3]^r[e-8]^r[e-14]^r[e-16]));const t=i._S(5,s)+i._f(e,l,o,_)+d+r[e]+i._key[n.floor(e/20)]|0;d=_,_=o,o=i._S(30,l),l=s,s=t}a[0]=a[0]+s|0,a[1]=a[1]+l|0,a[2]=a[2]+o|0,a[3]=a[3]+_|0,a[4]=a[4]+d|0}};const S={getRandomValues(e){const t=new s(e.buffer),i=e=>{let t=987654321;const i=4294967295;return()=>(t=36969*(65535&t)+(t>>16)&i,(((t<<16)+(e=18e3*(65535&e)+(e>>16)&i)&i)/4294967296+.5)*(n.random()>.5?1:-1))};for(let a,r=0;r<e.length;r+=4){const e=i(4294967296*(a||n.random()));a=987654071*e(),t[r/4]=4294967296*e()|0}return e}},z={importKey:e=>new z.hmacSha1(v.bytes.toBits(e)),pbkdf2(e,t,n,a){if(n=n||1e4,0>a||0>n)throw new i("invalid params to pbkdf2");const r=1+(a>>5)<<2;let s,l,_,d,c;const u=new ArrayBuffer(r),f=new o(u);let h=0;const b=m;for(t=v.bytes.toBits(t),c=1;(r||1)>h;c++){for(s=l=e.encrypt(b.concat(t,[c])),_=1;n>_;_++)for(l=e.encrypt(l),d=0;d<l.length;d++)s[d]^=l[d];for(_=0;(r||1)>h&&_<s.length;_++)f.setInt32(h,s[_]),h+=4}return u.slice(0,a/8)},hmacSha1:class{constructor(e){const t=this,n=t._hash=k.sha1,i=[[],[]],a=n.prototype.blockSize/32;t._baseHash=[new n,new n],e.length>a&&(e=n.hash(e));for(let t=0;a>t;t++)i[0][t]=909522486^e[t],i[1][t]=1549556828^e[t];t._baseHash[0].update(i[0]),t._baseHash[1].update(i[1]),t._resultHash=new n(t._baseHash[0])}reset(){const e=this;e._resultHash=new e._hash(e._baseHash[0]),e._updated=!1}update(e){this._updated=!0,this._resultHash.update(e)}digest(){const e=this,t=e._resultHash.finalize(),n=new e._hash(e._baseHash[1]).update(t).finalize();return e.reset(),n}encrypt(e){if(this._updated)throw new i("encrypt on already updated hmac called!");return this.update(e),this.digest(e)}}},C=void 0!==c&&"function"==typeof c.getRandomValues,I="Invalid password";function E(e){return C?c.getRandomValues(e):S.getRandomValues(e)}const T=16,q={name:"PBKDF2"},A=t.assign({hash:{name:"HMAC"}},q),R=t.assign({iterations:1e3,hash:{name:"SHA-1"}},q),V=["deriveBits"],B=[8,12,16],H=[16,24,32],D=10,K=[0,0,0,0],P="undefined",W="function",M=typeof c!=P,U=M&&typeof c.subtle!=P,L=M&&U&&typeof c.subtle.importKey==W,N=M&&U&&typeof c.subtle.deriveBits==W,F=v.bytes,G=class{constructor(e){const t=this;t._tables=[[[],[],[],[],[]],[[],[],[],[],[]]],t._tables[0][0][0]||t._precompute();const n=t._tables[0][4],a=t._tables[1],r=e.length;let s,l,o,_=1;if(4!==r&&6!==r&&8!==r)throw new i("invalid aes key size");for(t._key=[l=e.slice(0),o=[]],s=r;4*r+28>s;s++){let e=l[s-1];(s%r==0||8===r&&s%r==4)&&(e=n[e>>>24]<<24^n[e>>16&255]<<16^n[e>>8&255]<<8^n[255&e],s%r==0&&(e=e<<8^e>>>24^_<<24,_=_<<1^283*(_>>7))),l[s]=l[s-r]^e}for(let e=0;s;e++,s--){const t=l[3&e?s:s-4];o[e]=4>=s||4>e?t:a[0][n[t>>>24]]^a[1][n[t>>16&255]]^a[2][n[t>>8&255]]^a[3][n[255&t]]}}encrypt(e){return this._crypt(e,0)}decrypt(e){return this._crypt(e,1)}_precompute(){const e=this._tables[0],t=this._tables[1],n=e[4],i=t[4],a=[],r=[];let s,l,o,_;for(let e=0;256>e;e++)r[(a[e]=e<<1^283*(e>>7))^e]=e;for(let d=s=0;!n[d];d^=l||1,s=r[s]||1){let r=s^s<<1^s<<2^s<<3^s<<4;r=r>>8^255&r^99,n[d]=r,i[r]=d,_=a[o=a[l=a[d]]];let c=16843009*_^65537*o^257*l^16843008*d,u=257*a[r]^16843008*r;for(let n=0;4>n;n++)e[n][d]=u=u<<24^u>>>8,t[n][r]=c=c<<24^c>>>8}for(let n=0;5>n;n++)e[n]=e[n].slice(0),t[n]=t[n].slice(0)}_crypt(e,t){if(4!==e.length)throw new i("invalid aes block size");const n=this._key[t],a=n.length/4-2,r=[0,0,0,0],s=this._tables[t],l=s[0],o=s[1],_=s[2],d=s[3],c=s[4];let u,f,h,b=e[0]^n[0],w=e[t?3:1]^n[1],p=e[2]^n[2],x=e[t?1:3]^n[3],g=4;for(let e=0;a>e;e++)u=l[b>>>24]^o[w>>16&255]^_[p>>8&255]^d[255&x]^n[g],f=l[w>>>24]^o[p>>16&255]^_[x>>8&255]^d[255&b]^n[g+1],h=l[p>>>24]^o[x>>16&255]^_[b>>8&255]^d[255&w]^n[g+2],x=l[x>>>24]^o[b>>16&255]^_[w>>8&255]^d[255&p]^n[g+3],g+=4,b=u,w=f,p=h;for(let e=0;4>e;e++)r[t?3&-e:e]=c[b>>>24]<<24^c[w>>16&255]<<16^c[p>>8&255]<<8^c[255&x]^n[g++],u=b,b=w,w=p,p=x,x=u;return r}},X=class{constructor(e,t){this._prf=e,this._initIv=t,this._iv=t}reset(){this._iv=this._initIv}update(e){return this.calculate(this._prf,e,this._iv)}incWord(e){if(255==(e>>24&255)){let t=e>>16&255,n=e>>8&255,i=255&e;255===t?(t=0,255===n?(n=0,255===i?i=0:++i):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=i}else e+=1<<24;return e}incCounter(e){0===(e[0]=this.incWord(e[0]))&&(e[1]=this.incWord(e[1]))}calculate(e,t,n){let i;if(!(i=t.length))return[];const a=m.bitLength(t);for(let a=0;i>a;a+=4){this.incCounter(n);const i=e.encrypt(n);t[a]^=i[0],t[a+1]^=i[1],t[a+2]^=i[2],t[a+3]^=i[3]}return m.clamp(t,a)}},j=z.hmacSha1;class O extends f{constructor(n,r,s){let l;super({start(){t.assign(this,{ready:new _((e=>this.resolveReady=e)),password:n,signed:r,strength:s-1,pending:new a})},async transform(t,n){const r=this;if(r.password){const n=r.password;r.password=null;const a=$(t,0,B[r.strength]+2);await(async(e,t,n)=>{await Y(e,n,$(t,0,B[e.strength]));const a=$(t,B[e.strength]),r=e.keys.passwordVerification;if(r[0]!=a[0]||r[1]!=a[1])throw new i(I)})(r,a,n),r.ctr=new X(new G(r.keys.key),e.from(K)),r.hmac=new j(r.keys.authentication),t=$(t,B[r.strength]+2),r.resolveReady()}else await r.ready;const s=new a(t.length-D-(t.length-D)%T);n.enqueue(Q(r,t,s,0,D,!0))},async flush(e){const t=this;await t.ready;const n=t.pending,i=$(n,0,n.length-D),r=$(n,n.length-D);let s=new a;if(i.length){const e=te(F,i);t.hmac.update(e);const n=t.ctr.update(e);s=ee(F,n)}if(l.valid=!0,t.signed){const e=$(ee(F,t.hmac.digest()),0,D);for(let t=0;D>t;t++)e[t]!=r[t]&&(l.valid=!1)}e.enqueue(s)}}),l=this}}class J extends f{constructor(n,i){let r;super({start(){t.assign(this,{ready:new _((e=>this.resolveReady=e)),password:n,strength:i-1,pending:new a})},async transform(t,n){const i=this;let r=new a;if(i.password){const t=i.password;i.password=null,r=await(async(e,t)=>{const n=E(new a(B[e.strength]));return await Y(e,t,n),Z(n,e.keys.passwordVerification)})(i,t),i.ctr=new X(new G(i.keys.key),e.from(K)),i.hmac=new j(i.keys.authentication),i.resolveReady()}else await i.ready;const s=new a(r.length+t.length-t.length%T);s.set(r,0),n.enqueue(Q(i,t,s,r.length,0))},async flush(e){const t=this;await t.ready;let n=new a;if(t.pending.length){const e=t.ctr.update(te(F,t.pending));t.hmac.update(e),n=ee(F,e)}r.signature=ee(F,t.hmac.digest()).slice(0,D),e.enqueue(Z(n,r.signature))}}),r=this}}function Q(e,t,n,i,r,s){const l=t.length-r;let o;for(e.pending.length&&(t=Z(e.pending,t),n=((e,t)=>{if(t&&t>e.length){const n=e;(e=new a(t)).set(n,0)}return e})(n,l-l%T)),o=0;l-T>=o;o+=T){const a=te(F,$(t,o,o+T));s&&e.hmac.update(a);const r=e.ctr.update(a);s||e.hmac.update(r),n.set(ee(F,r),o+i)}return e.pending=$(t,o),n}async function Y(e,n,i){const r=(e=>{if(void 0===d){const t=new a((e=unescape(encodeURIComponent(e))).length);for(let n=0;n<t.length;n++)t[n]=e.charCodeAt(n);return t}return(new d).encode(e)})(n),s=await((e,t,n,i,a)=>L?c.subtle.importKey("raw",t,n,!1,a):z.importKey(t))(0,r,A,0,V),l=await(async(e,t,n)=>N?await c.subtle.deriveBits(e,t,n):z.pbkdf2(t,e.salt,R.iterations,n))(t.assign({salt:i},R),s,8*(2*H[e.strength]+2)),o=new a(l);e.keys={key:te(F,$(o,0,H[e.strength])),authentication:te(F,$(o,H[e.strength],2*H[e.strength])),passwordVerification:$(o,2*H[e.strength])}}function Z(e,t){let n=e;return e.length+t.length&&(n=new a(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function $(e,t,n){return e.subarray(t,n)}function ee(e,t){return e.fromBits(t)}function te(e,t){return e.toBits(t)}class ne extends f{constructor(e,n){let a;super({start(){t.assign(this,{password:e,passwordVerification:n}),se(this,e)},transform(e,t){const n=this;if(n.password){const t=ae(n,e.subarray(0,12));if(n.password=null,t[11]!=n.passwordVerification)throw new i(I);e=e.subarray(12)}t.enqueue(ae(n,e))},flush(){a.valid=!0}}),a=this}}class ie extends f{constructor(e,n){super({start(){t.assign(this,{password:e,passwordVerification:n}),se(this,e)},transform(e,t){const n=this;let i,r;if(n.password){n.password=null;const t=E(new a(12));t[11]=n.passwordVerification,i=new a(e.length+t.length),i.set(re(n,t),0),r=12}else i=new a(e.length),r=0;i.set(re(n,e),r),t.enqueue(i)},flush(){}})}}function ae(e,t){const n=new a(t.length);for(let i=0;i<t.length;i++)n[i]=oe(e)^t[i],le(e,n[i]);return n}function re(e,t){const n=new a(t.length);for(let i=0;i<t.length;i++)n[i]=oe(e)^t[i],le(e,t[i]);return n}function se(e,t){e.keys=[305419896,591751049,878082192],e.crcKey0=new g(e.keys[0]),e.crcKey2=new g(e.keys[2]);for(let n=0;n<t.length;n++)le(e,t.charCodeAt(n))}function le(e,t){e.crcKey0.append([t]),e.keys[0]=~e.crcKey0.get(),e.keys[1]=de(e.keys[1]+_e(e.keys[0])),e.keys[1]=de(n.imul(e.keys[1],134775813)+1),e.crcKey2.append([e.keys[1]>>>24]),e.keys[2]=~e.crcKey2.get()}function oe(e){const t=2|e.keys[2];return _e(n.imul(t,1^t)>>>8)}function _e(e){return 255&e}function de(e){return 4294967295&e}class ce extends f{constructor(e,t){let n;super({start(){n=new e(t)},transform(e,t){e=n.append(e),t.enqueue(e)},flush(e){const t=n.flush();t&&e.enqueue(t)}})}}const ue="Invalid signature",fe="deflate-raw",he="undefined",be=typeof w==he,we=typeof p==he;let pe=!0,xe=!0;class ge extends f{constructor(e,t,{chunkSize:n},...i){super({},...i);const{compressed:a,encrypted:r,useCompressionStream:s,password:l,passwordVerification:_,encryptionStrength:d,zipCrypto:c,signed:u,level:f}=t,h=this;let b,p,x=ve(super.readable);if(r&&!c||!u||([x,b]=x.tee(),b=b.pipeThrough(new y)),a)if(void 0!==s&&!s||be&&!xe)x=me(e,x,{chunkSize:n,level:f});else try{x=x.pipeThrough(new w(fe))}catch(t){xe=!1,x=me(e,x,{chunkSize:n,level:f})}r&&(c?x=x.pipeThrough(new ie(l,_)):(p=new J(l,d),x=x.pipeThrough(p))),ke(h,x,(async()=>{let e;r&&!c&&(e=p.signature),r&&!c||!u||(e=await b.getReader().read(),e=new o(e.value.buffer).getUint32(0)),h.signature=e}))}}class ye extends f{constructor(e,t,{chunkSize:n},...a){super({},...a);const{zipCrypto:r,encrypted:s,password:l,passwordVerification:_,signed:d,encryptionStrength:c,compressed:u,useCompressionStream:f}=t;let h,b,w=ve(super.readable);if(s&&(r?w=w.pipeThrough(new ne(l,_)):(b=new O(l,d,c),w=w.pipeThrough(b))),u)if(void 0!==f&&!f||we&&!pe)w=me(e,w,{chunkSize:n});else try{w=w.pipeThrough(new p(fe))}catch(t){pe=!1,w=me(e,w,{chunkSize:n})}s&&!r||!d||([w,h]=w.tee(),h=h.pipeThrough(new y)),ke(this,w,(async()=>{if(s&&!r&&!b.valid)throw new i(ue);if((!s||r)&&d){const e=await h.getReader().read(),n=new o(e.value.buffer);if(t.signature!=n.getUint32(0,!1))throw new i(ue)}}))}}function me(e,t,n){return t.pipeThrough(new ce(e,n))}function ve(e){return e.pipeThrough(new f({transform(e,t){e&&e.length&&t.enqueue(e)}}))}function ke(e,n,i){n=n.pipeThrough(new f({flush:i})),t.defineProperty(e,"readable",{get:()=>n})}const Se="deflate",ze="inflate",Ce="data";class Ie{constructor(e,n,i,a,r){const{codecType:s}=a;let l;s.startsWith(Se)?l=ge:s.startsWith(ze)&&(l=ye),t.assign(this,{StreamConstructor:l,CodecConstructor:e,readable:n,writable:i,options:a,config:r})}async run(){const{StreamConstructor:e,CodecConstructor:t,readable:n,writable:i,options:a,config:r}=this,s=new e(t,a,r);let l=0;await n.pipeThrough(s).pipeThrough(new f({transform(e,t){e&&e.length&&(l+=e.length,t.enqueue(e))}})).pipeTo(i,{preventClose:!0,preventAbort:!0});const{signature:o}=s;return{size:l,signature:o}}}const Ee=new Map,Te=new Map;let qe,Ae=0;async function Re(e){try{const{options:t,scripts:n,config:i}=e,{codecType:a}=t;let r;n&&n.length&&importScripts.apply(void 0,n),self.initCodec&&self.initCodec(),a.startsWith(Se)?r=self.Deflate:a.startsWith(ze)&&(r=self.Inflate);const s={highWaterMark:1,size:()=>i.chunkSize},l=e.readable||new h({async pull(e){let t=new _((e=>Ee.set(Ae,e)));Ve({type:"pull",messageId:Ae}),Ae=(Ae+1)%Number.MAX_SAFE_INTEGER;const{value:n,done:i}=await t;e.enqueue(n),i&&e.close()}},s),o=e.writable||new b({async write(e){let t;const n=new _((e=>t=e));Te.set(Ae,t),Ve({type:Ce,data:e,messageId:Ae}),Ae=(Ae+1)%Number.MAX_SAFE_INTEGER,await n}},s);qe=new Ie(r,l,o,t,i);const d=await qe.run();e.writable&&!t.preventClose&&await e.writable.close(),Ve({type:"close",result:d})}catch(e){Be(e)}}function Ve(e){if(e.data){let{data:t}=e;if(t&&t.length)try{t=new a(t),e.data=t.buffer,u(e,[e.data])}catch(t){u(e)}else u(e)}else u(e)}function Be(e){const{message:t,stack:n,code:i,name:a}=e;u({error:{message:t,stack:n,code:i,name:a}})}addEventListener("message",(async e=>{const t=e.data,{type:n,messageId:i,data:r,done:s}=t;try{if("start"==n&&Re(t),n==Ce){const e=Ee.get(i);Ee.delete(i),e({value:new a(r),done:s})}if("ack"==n){const e=Te.get(i);Te.delete(i),e()}}catch(e){Be(e)}}));const He=(()=>{const t=-2;function s(t){return l(t.map((([t,n])=>new e(t).fill(n,0,t))))}function l(t){return t.reduce(((t,n)=>t.concat(e.isArray(n)?l(n):n)),[])}const o=[0,1,2,3].concat(...s([[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 _(){const e=this;function t(e,t){let n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1}e.build_tree=i=>{const a=e.dyn_tree,r=e.stat_desc.static_tree,s=e.stat_desc.elems;let l,o,_,d=-1;for(i.heap_len=0,i.heap_max=573,l=0;s>l;l++)0!==a[2*l]?(i.heap[++i.heap_len]=d=l,i.depth[l]=0):a[2*l+1]=0;for(;2>i.heap_len;)_=i.heap[++i.heap_len]=2>d?++d:0,a[2*_]=1,i.depth[_]=0,i.opt_len--,r&&(i.static_len-=r[2*_+1]);for(e.max_code=d,l=n.floor(i.heap_len/2);l>=1;l--)i.pqdownheap(a,l);_=s;do{l=i.heap[1],i.heap[1]=i.heap[i.heap_len--],i.pqdownheap(a,1),o=i.heap[1],i.heap[--i.heap_max]=l,i.heap[--i.heap_max]=o,a[2*_]=a[2*l]+a[2*o],i.depth[_]=n.max(i.depth[l],i.depth[o])+1,a[2*l+1]=a[2*o+1]=_,i.heap[1]=_++,i.pqdownheap(a,1)}while(i.heap_len>=2);i.heap[--i.heap_max]=i.heap[1],(t=>{const n=e.dyn_tree,i=e.stat_desc.static_tree,a=e.stat_desc.extra_bits,r=e.stat_desc.extra_base,s=e.stat_desc.max_length;let l,o,_,d,c,u,f=0;for(d=0;15>=d;d++)t.bl_count[d]=0;for(n[2*t.heap[t.heap_max]+1]=0,l=t.heap_max+1;573>l;l++)o=t.heap[l],d=n[2*n[2*o+1]+1]+1,d>s&&(d=s,f++),n[2*o+1]=d,o>e.max_code||(t.bl_count[d]++,c=0,r>o||(c=a[o-r]),u=n[2*o],t.opt_len+=u*(d+c),i&&(t.static_len+=u*(i[2*o+1]+c)));if(0!==f){do{for(d=s-1;0===t.bl_count[d];)d--;t.bl_count[d]--,t.bl_count[d+1]+=2,t.bl_count[s]--,f-=2}while(f>0);for(d=s;0!==d;d--)for(o=t.bl_count[d];0!==o;)_=t.heap[--l],_>e.max_code||(n[2*_+1]!=d&&(t.opt_len+=(d-n[2*_+1])*n[2*_],n[2*_+1]=d),o--)}})(i),((e,n,i)=>{const a=[];let r,s,l,o=0;for(r=1;15>=r;r++)a[r]=o=o+i[r-1]<<1;for(s=0;n>=s;s++)l=e[2*s+1],0!==l&&(e[2*s]=t(a[l]++,l))})(a,e.max_code,i.bl_count)}}function d(e,t,n,i,a){const r=this;r.static_tree=e,r.extra_bits=t,r.extra_base=n,r.elems=i,r.max_length=a}_._length_code=[0,1,2,3,4,5,6,7].concat(...s([[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]])),_.base_length=[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],_.base_dist=[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],_.d_code=e=>256>e?o[e]:o[256+(e>>>7)],_.extra_lbits=[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],_.extra_dbits=[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],_.extra_blbits=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],_.bl_order=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];const c=s([[144,8],[112,9],[24,7],[8,8]]);d.static_ltree=l([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(((e,t)=>[e,c[t]])));const u=s([[30,5]]);function f(e,t,n,i,a){const r=this;r.good_length=e,r.max_lazy=t,r.nice_length=n,r.max_chain=i,r.func=a}d.static_dtree=l([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(((e,t)=>[e,u[t]]))),d.static_l_desc=new d(d.static_ltree,_.extra_lbits,257,286,15),d.static_d_desc=new d(d.static_dtree,_.extra_dbits,0,30,15),d.static_bl_desc=new d(null,_.extra_blbits,0,19,7);const h=[new f(0,0,0,0,0),new f(4,4,8,4,1),new f(4,5,16,8,1),new f(4,6,32,32,1),new f(4,4,16,16,2),new f(8,16,32,32,2),new f(8,16,128,128,2),new f(8,32,128,256,2),new f(32,128,258,1024,2),new f(32,258,258,4096,2)],b=["need dictionary","stream end","","","stream error","data error","","buffer error","",""],w=113,p=666,x=262;function g(e,t,n,i){const a=e[2*t],r=e[2*n];return r>a||a==r&&i[t]<=i[n]}function y(){const e=this;let i,s,l,o,c,u,f,y,m,v,k,S,z,C,I,E,T,q,A,R,V,B,H,D,K,P,W,M,U,L,N,F,G;const X=new _,j=new _,O=new _;let J,Q,Y,Z,$,ee;function te(){let t;for(t=0;286>t;t++)N[2*t]=0;for(t=0;30>t;t++)F[2*t]=0;for(t=0;19>t;t++)G[2*t]=0;N[512]=1,e.opt_len=e.static_len=0,Q=Y=0}function ne(e,t){let n,i=-1,a=e[1],r=0,s=7,l=4;0===a&&(s=138,l=3),e[2*(t+1)+1]=65535;for(let o=0;t>=o;o++)n=a,a=e[2*(o+1)+1],++r<s&&n==a||(l>r?G[2*n]+=r:0!==n?(n!=i&&G[2*n]++,G[32]++):r>10?G[36]++:G[34]++,r=0,i=n,0===a?(s=138,l=3):n==a?(s=6,l=3):(s=7,l=4))}function ie(t){e.pending_buf[e.pending++]=t}function ae(e){ie(255&e),ie(e>>>8&255)}function re(e,t){let n;const i=t;ee>16-i?(n=e,$|=n<<ee&65535,ae($),$=n>>>16-ee,ee+=i-16):($|=e<<ee&65535,ee+=i)}function se(e,t){const n=2*e;re(65535&t[n],65535&t[n+1])}function le(e,t){let n,i,a=-1,r=e[1],s=0,l=7,o=4;for(0===r&&(l=138,o=3),n=0;t>=n;n++)if(i=r,r=e[2*(n+1)+1],++s>=l||i!=r){if(o>s)do{se(i,G)}while(0!=--s);else 0!==i?(i!=a&&(se(i,G),s--),se(16,G),re(s-3,2)):s>10?(se(18,G),re(s-11,7)):(se(17,G),re(s-3,3));s=0,a=i,0===r?(l=138,o=3):i==r?(l=6,o=3):(l=7,o=4)}}function oe(){16==ee?(ae($),$=0,ee=0):8>ee||(ie(255&$),$>>>=8,ee-=8)}function _e(t,i){let a,r,s;if(e.dist_buf[Q]=t,e.lc_buf[Q]=255&i,Q++,0===t?N[2*i]++:(Y++,t--,N[2*(_._length_code[i]+256+1)]++,F[2*_.d_code(t)]++),0==(8191&Q)&&W>2){for(a=8*Q,r=V-T,s=0;30>s;s++)a+=F[2*s]*(5+_.extra_dbits[s]);if(a>>>=3,Y<n.floor(Q/2)&&a<n.floor(r/2))return!0}return Q==J-1}function de(t,n){let i,a,r,s,l=0;if(0!==Q)do{i=e.dist_buf[l],a=e.lc_buf[l],l++,0===i?se(a,t):(r=_._length_code[a],se(r+256+1,t),s=_.extra_lbits[r],0!==s&&(a-=_.base_length[r],re(a,s)),i--,r=_.d_code(i),se(r,n),s=_.extra_dbits[r],0!==s&&(i-=_.base_dist[r],re(i,s)))}while(Q>l);se(256,t),Z=t[513]}function ce(){ee>8?ae($):ee>0&&ie(255&$),$=0,ee=0}function ue(t,n,i){re(0+(i?1:0),3),((t,n)=>{ce(),Z=8,ae(n),ae(~n),e.pending_buf.set(y.subarray(t,t+n),e.pending),e.pending+=n})(t,n)}function fe(t){((t,n,i)=>{let a,r,s=0;W>0?(X.build_tree(e),j.build_tree(e),s=(()=>{let t;for(ne(N,X.max_code),ne(F,j.max_code),O.build_tree(e),t=18;t>=3&&0===G[2*_.bl_order[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t})(),a=e.opt_len+3+7>>>3,r=e.static_len+3+7>>>3,r>a||(a=r)):a=r=n+5,n+4>a||-1==t?r==a?(re(2+(i?1:0),3),de(d.static_ltree,d.static_dtree)):(re(4+(i?1:0),3),((e,t,n)=>{let i;for(re(e-257,5),re(t-1,5),re(n-4,4),i=0;n>i;i++)re(G[2*_.bl_order[i]+1],3);le(N,e-1),le(F,t-1)})(X.max_code+1,j.max_code+1,s+1),de(N,F)):ue(t,n,i),te(),i&&ce()})(0>T?-1:T,V-T,t),T=V,i.flush_pending()}function he(){let e,t,n,a;do{if(a=m-H-V,0===a&&0===V&&0===H)a=c;else if(-1==a)a--;else if(V>=c+c-x){y.set(y.subarray(c,c+c),0),B-=c,V-=c,T-=c,e=z,n=e;do{t=65535&k[--n],k[n]=c>t?0:t-c}while(0!=--e);e=c,n=e;do{t=65535&v[--n],v[n]=c>t?0:t-c}while(0!=--e);a+=c}if(0===i.avail_in)return;e=i.read_buf(y,V+H,a),H+=e,3>H||(S=255&y[V],S=(S<<E^255&y[V+1])&I)}while(x>H&&0!==i.avail_in)}function be(e){let t,n,i=K,a=V,r=D;const s=V>c-x?V-(c-x):0;let l=L;const o=f,_=V+258;let d=y[a+r-1],u=y[a+r];U>D||(i>>=2),l>H&&(l=H);do{if(t=e,y[t+r]==u&&y[t+r-1]==d&&y[t]==y[a]&&y[++t]==y[a+1]){a+=2,t++;do{}while(y[++a]==y[++t]&&y[++a]==y[++t]&&y[++a]==y[++t]&&y[++a]==y[++t]&&y[++a]==y[++t]&&y[++a]==y[++t]&&y[++a]==y[++t]&&y[++a]==y[++t]&&_>a);if(n=258-(_-a),a=_-258,n>r){if(B=e,r=n,n>=l)break;d=y[a+r-1],u=y[a+r]}}}while((e=65535&v[e&o])>s&&0!=--i);return r>H?H:r}e.depth=[],e.bl_count=[],e.heap=[],N=[],F=[],G=[],e.pqdownheap=(t,n)=>{const i=e.heap,a=i[n];let r=n<<1;for(;r<=e.heap_len&&(r<e.heap_len&&g(t,i[r+1],i[r],e.depth)&&r++,!g(t,a,i[r],e.depth));)i[n]=i[r],n=r,r<<=1;i[n]=a},e.deflateInit=(i,_,b,p,x,g)=>(p||(p=8),x||(x=8),g||(g=0),i.msg=null,-1==_&&(_=6),1>x||x>9||8!=p||9>b||b>15||0>_||_>9||0>g||g>2?t:(i.dstate=e,u=b,c=1<<u,f=c-1,C=x+7,z=1<<C,I=z-1,E=n.floor((C+3-1)/3),y=new a(2*c),v=[],k=[],J=1<<x+6,e.pending_buf=new a(4*J),l=4*J,e.dist_buf=new r(J),e.lc_buf=new a(J),W=_,M=g,(t=>(t.total_in=t.total_out=0,t.msg=null,e.pending=0,e.pending_out=0,s=w,o=0,X.dyn_tree=N,X.stat_desc=d.static_l_desc,j.dyn_tree=F,j.stat_desc=d.static_d_desc,O.dyn_tree=G,O.stat_desc=d.static_bl_desc,$=0,ee=0,Z=8,te(),(()=>{m=2*c,k[z-1]=0;for(let e=0;z-1>e;e++)k[e]=0;P=h[W].max_lazy,U=h[W].good_length,L=h[W].nice_length,K=h[W].max_chain,V=0,T=0,H=0,q=D=2,R=0,S=0})(),0))(i))),e.deflateEnd=()=>42!=s&&s!=w&&s!=p?t:(e.lc_buf=null,e.dist_buf=null,e.pending_buf=null,k=null,v=null,y=null,e.dstate=null,s==w?-3:0),e.deflateParams=(e,n,i)=>{let a=0;return-1==n&&(n=6),0>n||n>9||0>i||i>2?t:(h[W].func!=h[n].func&&0!==e.total_in&&(a=e.deflate(1)),W!=n&&(W=n,P=h[W].max_lazy,U=h[W].good_length,L=h[W].nice_length,K=h[W].max_chain),M=i,a)},e.deflateSetDictionary=(e,n,i)=>{let a,r=i,l=0;if(!n||42!=s)return t;if(3>r)return 0;for(r>c-x&&(r=c-x,l=i-r),y.set(n.subarray(l,l+r),0),V=r,T=r,S=255&y[0],S=(S<<E^255&y[1])&I,a=0;r-3>=a;a++)S=(S<<E^255&y[a+2])&I,v[a&f]=k[S],k[S]=a;return 0},e.deflate=(n,a)=>{let r,_,g,m,C;if(a>4||0>a)return t;if(!n.next_out||!n.next_in&&0!==n.avail_in||s==p&&4!=a)return n.msg=b[4],t;if(0===n.avail_out)return n.msg=b[7],-5;var K;if(i=n,m=o,o=a,42==s&&(_=8+(u-8<<4)<<8,g=(W-1&255)>>1,g>3&&(g=3),_|=g<<6,0!==V&&(_|=32),_+=31-_%31,s=w,ie((K=_)>>8&255),ie(255&K)),0!==e.pending){if(i.flush_pending(),0===i.avail_out)return o=-1,0}else if(0===i.avail_in&&m>=a&&4!=a)return i.msg=b[7],-5;if(s==p&&0!==i.avail_in)return n.msg=b[7],-5;if(0!==i.avail_in||0!==H||0!=a&&s!=p){switch(C=-1,h[W].func){case 0:C=(e=>{let t,n=65535;for(n>l-5&&(n=l-5);;){if(1>=H){if(he(),0===H&&0==e)return 0;if(0===H)break}if(V+=H,H=0,t=T+n,(0===V||V>=t)&&(H=V-t,V=t,fe(!1),0===i.avail_out))return 0;if(V-T>=c-x&&(fe(!1),0===i.avail_out))return 0}return fe(4==e),0===i.avail_out?4==e?2:0:4==e?3:1})(a);break;case 1:C=(e=>{let t,n=0;for(;;){if(x>H){if(he(),x>H&&0==e)return 0;if(0===H)break}if(3>H||(S=(S<<E^255&y[V+2])&I,n=65535&k[S],v[V&f]=k[S],k[S]=V),0===n||(V-n&65535)>c-x||2!=M&&(q=be(n)),3>q)t=_e(0,255&y[V]),H--,V++;else if(t=_e(V-B,q-3),H-=q,q>P||3>H)V+=q,q=0,S=255&y[V],S=(S<<E^255&y[V+1])&I;else{q--;do{V++,S=(S<<E^255&y[V+2])&I,n=65535&k[S],v[V&f]=k[S],k[S]=V}while(0!=--q);V++}if(t&&(fe(!1),0===i.avail_out))return 0}return fe(4==e),0===i.avail_out?4==e?2:0:4==e?3:1})(a);break;case 2:C=(e=>{let t,n,a=0;for(;;){if(x>H){if(he(),x>H&&0==e)return 0;if(0===H)break}if(3>H||(S=(S<<E^255&y[V+2])&I,a=65535&k[S],v[V&f]=k[S],k[S]=V),D=q,A=B,q=2,0!==a&&P>D&&c-x>=(V-a&65535)&&(2!=M&&(q=be(a)),5>=q&&(1==M||3==q&&V-B>4096)&&(q=2)),3>D||q>D)if(0!==R){if(t=_e(0,255&y[V-1]),t&&fe(!1),V++,H--,0===i.avail_out)return 0}else R=1,V++,H--;else{n=V+H-3,t=_e(V-1-A,D-3),H-=D-1,D-=2;do{++V>n||(S=(S<<E^255&y[V+2])&I,a=65535&k[S],v[V&f]=k[S],k[S]=V)}while(0!=--D);if(R=0,q=2,V++,t&&(fe(!1),0===i.avail_out))return 0}}return 0!==R&&(t=_e(0,255&y[V-1]),R=0),fe(4==e),0===i.avail_out?4==e?2:0:4==e?3:1})(a)}if(2!=C&&3!=C||(s=p),0==C||2==C)return 0===i.avail_out&&(o=-1),0;if(1==C){if(1==a)re(2,3),se(256,d.static_ltree),oe(),9>1+Z+10-ee&&(re(2,3),se(256,d.static_ltree),oe()),Z=7;else if(ue(0,0,!1),3==a)for(r=0;z>r;r++)k[r]=0;if(i.flush_pending(),0===i.avail_out)return o=-1,0}}return 4!=a?0:1}}function m(){const e=this;e.next_in_index=0,e.next_out_index=0,e.avail_in=0,e.total_in=0,e.avail_out=0,e.total_out=0}return m.prototype={deflateInit(e,t){const n=this;return n.dstate=new y,t||(t=15),n.dstate.deflateInit(n,e,t)},deflate(e){const n=this;return n.dstate?n.dstate.deflate(n,e):t},deflateEnd(){const e=this;if(!e.dstate)return t;const n=e.dstate.deflateEnd();return e.dstate=null,n},deflateParams(e,n){const i=this;return i.dstate?i.dstate.deflateParams(i,e,n):t},deflateSetDictionary(e,n){const i=this;return i.dstate?i.dstate.deflateSetDictionary(i,e,n):t},read_buf(e,t,n){const i=this;let a=i.avail_in;return a>n&&(a=n),0===a?0:(i.avail_in-=a,e.set(i.next_in.subarray(i.next_in_index,i.next_in_index+a),t),i.next_in_index+=a,i.total_in+=a,a)},flush_pending(){const e=this;let t=e.dstate.pending;t>e.avail_out&&(t=e.avail_out),0!==t&&(e.next_out.set(e.dstate.pending_buf.subarray(e.dstate.pending_out,e.dstate.pending_out+t),e.next_out_index),e.next_out_index+=t,e.dstate.pending_out+=t,e.total_out+=t,e.avail_out-=t,e.dstate.pending-=t,0===e.dstate.pending&&(e.dstate.pending_out=0))}},function(e){const t=new m,r=(s=e&&e.chunkSize?e.chunkSize:65536)+5*(n.floor(s/16383)+1);var s;const l=new a(r);let o=e?e.level:-1;void 0===o&&(o=-1),t.deflateInit(o),t.next_out=l,this.append=(e,n)=>{let s,o,_=0,d=0,c=0;const u=[];if(e.length){t.next_in_index=0,t.next_in=e,t.avail_in=e.length;do{if(t.next_out_index=0,t.avail_out=r,s=t.deflate(0),0!=s)throw new i("deflating: "+t.msg);t.next_out_index&&(t.next_out_index==r?u.push(new a(l)):u.push(l.slice(0,t.next_out_index))),c+=t.next_out_index,n&&t.next_in_index>0&&t.next_in_index!=_&&(n(t.next_in_index),_=t.next_in_index)}while(t.avail_in>0||0===t.avail_out);return u.length>1?(o=new a(c),u.forEach((e=>{o.set(e,d),d+=e.length}))):o=u[0]||new a,o}},this.flush=()=>{let e,n,s=0,o=0;const _=[];do{if(t.next_out_index=0,t.avail_out=r,e=t.deflate(4),1!=e&&0!=e)throw new i("deflating: "+t.msg);r-t.avail_out>0&&_.push(l.slice(0,t.next_out_index)),o+=t.next_out_index}while(t.avail_in>0||0===t.avail_out);return t.deflateEnd(),n=new a(o),_.forEach((e=>{n.set(e,s),s+=e.length})),n}}})(),De=(()=>{const e=-2,t=-3,r=-5,s=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],o=[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],_=[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],d=[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],c=[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],u=[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],f=[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 h(){let e,n,i,a,s,o;function _(e,n,l,_,d,c,u,f,h,b,w){let p,x,g,y,m,v,k,S,z,C,I,E,T,q,A;C=0,m=l;do{i[e[n+C]]++,C++,m--}while(0!==m);if(i[0]==l)return u[0]=-1,f[0]=0,0;for(S=f[0],v=1;15>=v&&0===i[v];v++);for(k=v,v>S&&(S=v),m=15;0!==m&&0===i[m];m--);for(g=m,S>m&&(S=m),f[0]=S,q=1<<v;m>v;v++,q<<=1)if(0>(q-=i[v]))return t;if(0>(q-=i[m]))return t;for(i[m]+=q,o[1]=v=0,C=1,T=2;0!=--m;)o[T]=v+=i[C],T++,C++;m=0,C=0;do{0!==(v=e[n+C])&&(w[o[v]++]=m),C++}while(++m<l);for(l=o[g],o[0]=m=0,C=0,y=-1,E=-S,s[0]=0,I=0,A=0;g>=k;k++)for(p=i[k];0!=p--;){for(;k>E+S;){if(y++,E+=S,A=g-E,A=A>S?S:A,(x=1<<(v=k-E))>p+1&&(x-=p+1,T=k,A>v))for(;++v<A&&(x<<=1)>i[++T];)x-=i[T];if(A=1<<v,b[0]+A>1440)return t;s[y]=I=b[0],b[0]+=A,0!==y?(o[y]=m,a[0]=v,a[1]=S,v=m>>>E-S,a[2]=I-s[y-1]-v,h.set(a,3*(s[y-1]+v))):u[0]=I}for(a[1]=k-E,l>C?w[C]<_?(a[0]=256>w[C]?0:96,a[2]=w[C++]):(a[0]=c[w[C]-_]+16+64,a[2]=d[w[C++]-_]):a[0]=192,x=1<<k-E,v=m>>>E;A>v;v+=x)h.set(a,3*(I+v));for(v=1<<k-1;0!=(m&v);v>>>=1)m^=v;for(m^=v,z=(1<<E)-1;(m&z)!=o[y];)y--,E-=S,z=(1<<E)-1}return 0!==q&&1!=g?r:0}function h(t){let r;for(e||(e=[],n=[],i=new l(16),a=[],s=new l(15),o=new l(16)),n.length<t&&(n=[]),r=0;t>r;r++)n[r]=0;for(r=0;16>r;r++)i[r]=0;for(r=0;3>r;r++)a[r]=0;s.set(i.subarray(0,15),0),o.set(i.subarray(0,16),0)}this.inflate_trees_bits=(i,a,s,l,o)=>{let d;return h(19),e[0]=0,d=_(i,0,19,19,null,null,s,a,l,e,n),d==t?o.msg="oversubscribed dynamic bit lengths tree":d!=r&&0!==a[0]||(o.msg="incomplete dynamic bit lengths tree",d=t),d},this.inflate_trees_dynamic=(i,a,s,l,o,b,w,p,x)=>{let g;return h(288),e[0]=0,g=_(s,0,i,257,d,c,b,l,p,e,n),0!=g||0===l[0]?(g==t?x.msg="oversubscribed literal/length tree":-4!=g&&(x.msg="incomplete literal/length tree",g=t),g):(h(288),g=_(s,i,a,0,u,f,w,o,p,e,n),0!=g||0===o[0]&&i>257?(g==t?x.msg="oversubscribed distance tree":g==r?(x.msg="incomplete distance tree",g=t):-4!=g&&(x.msg="empty distance tree with lengths",g=t),g):0)}}function b(){const n=this;let i,a,r,l,o=0,_=0,d=0,c=0,u=0,f=0,h=0,b=0,w=0,p=0;function x(e,n,i,a,r,l,o,_){let d,c,u,f,h,b,w,p,x,g,y,m,v,k,S,z;w=_.next_in_index,p=_.avail_in,h=o.bitb,b=o.bitk,x=o.write,g=x<o.read?o.read-x-1:o.end-x,y=s[e],m=s[n];do{for(;20>b;)p--,h|=(255&_.read_byte(w++))<<b,b+=8;if(d=h&y,c=i,u=a,z=3*(u+d),0!==(f=c[z]))for(;;){if(h>>=c[z+1],b-=c[z+1],0!=(16&f)){for(f&=15,v=c[z+2]+(h&s[f]),h>>=f,b-=f;15>b;)p--,h|=(255&_.read_byte(w++))<<b,b+=8;for(d=h&m,c=r,u=l,z=3*(u+d),f=c[z];;){if(h>>=c[z+1],b-=c[z+1],0!=(16&f)){for(f&=15;f>b;)p--,h|=(255&_.read_byte(w++))<<b,b+=8;if(k=c[z+2]+(h&s[f]),h>>=f,b-=f,g-=v,k>x){S=x-k;do{S+=o.end}while(0>S);if(f=o.end-S,v>f){if(v-=f,x-S>0&&f>x-S)do{o.win[x++]=o.win[S++]}while(0!=--f);else o.win.set(o.win.subarray(S,S+f),x),x+=f,S+=f,f=0;S=0}}else S=x-k,x-S>0&&2>x-S?(o.win[x++]=o.win[S++],o.win[x++]=o.win[S++],v-=2):(o.win.set(o.win.subarray(S,S+2),x),x+=2,S+=2,v-=2);if(x-S>0&&v>x-S)do{o.win[x++]=o.win[S++]}while(0!=--v);else o.win.set(o.win.subarray(S,S+v),x),x+=v,S+=v,v=0;break}if(0!=(64&f))return _.msg="invalid distance code",v=_.avail_in-p,v=v>b>>3?b>>3:v,p+=v,w-=v,b-=v<<3,o.bitb=h,o.bitk=b,_.avail_in=p,_.total_in+=w-_.next_in_index,_.next_in_index=w,o.write=x,t;d+=c[z+2],d+=h&s[f],z=3*(u+d),f=c[z]}break}if(0!=(64&f))return 0!=(32&f)?(v=_.avail_in-p,v=v>b>>3?b>>3:v,p+=v,w-=v,b-=v<<3,o.bitb=h,o.bitk=b,_.avail_in=p,_.total_in+=w-_.next_in_index,_.next_in_index=w,o.write=x,1):(_.msg="invalid literal/length code",v=_.avail_in-p,v=v>b>>3?b>>3:v,p+=v,w-=v,b-=v<<3,o.bitb=h,o.bitk=b,_.avail_in=p,_.total_in+=w-_.next_in_index,_.next_in_index=w,o.write=x,t);if(d+=c[z+2],d+=h&s[f],z=3*(u+d),0===(f=c[z])){h>>=c[z+1],b-=c[z+1],o.win[x++]=c[z+2],g--;break}}else h>>=c[z+1],b-=c[z+1],o.win[x++]=c[z+2],g--}while(g>=258&&p>=10);return v=_.avail_in-p,v=v>b>>3?b>>3:v,p+=v,w-=v,b-=v<<3,o.bitb=h,o.bitk=b,_.avail_in=p,_.total_in+=w-_.next_in_index,_.next_in_index=w,o.write=x,0}n.init=(e,t,n,s,o,_)=>{i=0,h=e,b=t,r=n,w=s,l=o,p=_,a=null},n.proc=(n,g,y)=>{let m,v,k,S,z,C,I,E=0,T=0,q=0;for(q=g.next_in_index,S=g.avail_in,E=n.bitb,T=n.bitk,z=n.write,C=z<n.read?n.read-z-1:n.end-z;;)switch(i){case 0:if(C>=258&&S>=10&&(n.bitb=E,n.bitk=T,g.avail_in=S,g.total_in+=q-g.next_in_index,g.next_in_index=q,n.write=z,y=x(h,b,r,w,l,p,n,g),q=g.next_in_index,S=g.avail_in,E=n.bitb,T=n.bitk,z=n.write,C=z<n.read?n.read-z-1:n.end-z,0!=y)){i=1==y?7:9;break}d=h,a=r,_=w,i=1;case 1:for(m=d;m>T;){if(0===S)return n.bitb=E,n.bitk=T,g.avail_in=S,g.total_in+=q-g.next_in_index,g.next_in_index=q,n.write=z,n.inflate_flush(g,y);y=0,S--,E|=(255&g.read_byte(q++))<<T,T+=8}if(v=3*(_+(E&s[m])),E>>>=a[v+1],T-=a[v+1],k=a[v],0===k){c=a[v+2],i=6;break}if(0!=(16&k)){u=15&k,o=a[v+2],i=2;break}if(0==(64&k)){d=k,_=v/3+a[v+2];break}if(0!=(32&k)){i=7;break}return i=9,g.msg="invalid literal/length code",y=t,n.bitb=E,n.bitk=T,g.avail_in=S,g.total_in+=q-g.next_in_index,g.next_in_index=q,n.write=z,n.inflate_flush(g,y);case 2:for(m=u;m>T;){if(0===S)return n.bitb=E,n.bitk=T,g.avail_in=S,g.total_in+=q-g.next_in_index,g.next_in_index=q,n.write=z,n.inflate_flush(g,y);y=0,S--,E|=(255&g.read_byte(q++))<<T,T+=8}o+=E&s[m],E>>=m,T-=m,d=b,a=l,_=p,i=3;case 3:for(m=d;m>T;){if(0===S)return n.bitb=E,n.bitk=T,g.avail_in=S,g.total_in+=q-g.next_in_index,g.next_in_index=q,n.write=z,n.inflate_flush(g,y);y=0,S--,E|=(255&g.read_byte(q++))<<T,T+=8}if(v=3*(_+(E&s[m])),E>>=a[v+1],T-=a[v+1],k=a[v],0!=(16&k)){u=15&k,f=a[v+2],i=4;break}if(0==(64&k)){d=k,_=v/3+a[v+2];break}return i=9,g.msg="invalid distance code",y=t,n.bitb=E,n.bitk=T,g.avail_in=S,g.total_in+=q-g.next_in_index,g.next_in_index=q,n.write=z,n.inflate_flush(g,y);case 4:for(m=u;m>T;){if(0===S)return n.bitb=E,n.bitk=T,g.avail_in=S,g.total_in+=q-g.next_in_index,g.next_in_index=q,n.write=z,n.inflate_flush(g,y);y=0,S--,E|=(255&g.read_byte(q++))<<T,T+=8}f+=E&s[m],E>>=m,T-=m,i=5;case 5:for(I=z-f;0>I;)I+=n.end;for(;0!==o;){if(0===C&&(z==n.end&&0!==n.read&&(z=0,C=z<n.read?n.read-z-1:n.end-z),0===C&&(n.write=z,y=n.inflate_flush(g,y),z=n.write,C=z<n.read?n.read-z-1:n.end-z,z==n.end&&0!==n.read&&(z=0,C=z<n.read?n.read-z-1:n.end-z),0===C)))return n.bitb=E,n.bitk=T,g.avail_in=S,g.total_in+=q-g.next_in_index,g.next_in_index=q,n.write=z,n.inflate_flush(g,y);n.win[z++]=n.win[I++],C--,I==n.end&&(I=0),o--}i=0;break;case 6:if(0===C&&(z==n.end&&0!==n.read&&(z=0,C=z<n.read?n.read-z-1:n.end-z),0===C&&(n.write=z,y=n.inflate_flush(g,y),z=n.write,C=z<n.read?n.read-z-1:n.end-z,z==n.end&&0!==n.read&&(z=0,C=z<n.read?n.read-z-1:n.end-z),0===C)))return n.bitb=E,n.bitk=T,g.avail_in=S,g.total_in+=q-g.next_in_index,g.next_in_index=q,n.write=z,n.inflate_flush(g,y);y=0,n.win[z++]=c,C--,i=0;break;case 7:if(T>7&&(T-=8,S++,q--),n.write=z,y=n.inflate_flush(g,y),z=n.write,C=z<n.read?n.read-z-1:n.end-z,n.read!=n.write)return n.bitb=E,n.bitk=T,g.avail_in=S,g.total_in+=q-g.next_in_index,g.next_in_index=q,n.write=z,n.inflate_flush(g,y);i=8;case 8:return y=1,n.bitb=E,n.bitk=T,g.avail_in=S,g.total_in+=q-g.next_in_index,g.next_in_index=q,n.write=z,n.inflate_flush(g,y);case 9:return y=t,n.bitb=E,n.bitk=T,g.avail_in=S,g.total_in+=q-g.next_in_index,g.next_in_index=q,n.write=z,n.inflate_flush(g,y);default:return y=e,n.bitb=E,n.bitk=T,g.avail_in=S,g.total_in+=q-g.next_in_index,g.next_in_index=q,n.write=z,n.inflate_flush(g,y)}},n.free=()=>{}}h.inflate_trees_fixed=(e,t,n,i)=>(e[0]=9,t[0]=5,n[0]=o,i[0]=_,0);const w=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function p(n,i){const o=this;let _,d=0,c=0,u=0,f=0;const p=[0],x=[0],g=new b;let y=0,m=new l(4320);const v=new h;o.bitk=0,o.bitb=0,o.win=new a(i),o.end=i,o.read=0,o.write=0,o.reset=(e,t)=>{t&&(t[0]=0),6==d&&g.free(e),d=0,o.bitk=0,o.bitb=0,o.read=o.write=0},o.reset(n,null),o.inflate_flush=(e,t)=>{let n,i,a;return i=e.next_out_index,a=o.read,n=(a>o.write?o.end:o.write)-a,n>e.avail_out&&(n=e.avail_out),0!==n&&t==r&&(t=0),e.avail_out-=n,e.total_out+=n,e.next_out.set(o.win.subarray(a,a+n),i),i+=n,a+=n,a==o.end&&(a=0,o.write==o.end&&(o.write=0),n=o.write-a,n>e.avail_out&&(n=e.avail_out),0!==n&&t==r&&(t=0),e.avail_out-=n,e.total_out+=n,e.next_out.set(o.win.subarray(a,a+n),i),i+=n,a+=n),e.next_out_index=i,o.read=a,t},o.proc=(n,i)=>{let a,r,l,b,k,S,z,C;for(b=n.next_in_index,k=n.avail_in,r=o.bitb,l=o.bitk,S=o.write,z=S<o.read?o.read-S-1:o.end-S;;){let I,E,T,q,A,R,V,B;switch(d){case 0:for(;3>l;){if(0===k)return o.bitb=r,o.bitk=l,n.avail_in=k,n.total_in+=b-n.next_in_index,n.next_in_index=b,o.write=S,o.inflate_flush(n,i);i=0,k--,r|=(255&n.read_byte(b++))<<l,l+=8}switch(a=7&r,y=1&a,a>>>1){case 0:r>>>=3,l-=3,a=7&l,r>>>=a,l-=a,d=1;break;case 1:I=[],E=[],T=[[]],q=[[]],h.inflate_trees_fixed(I,E,T,q),g.init(I[0],E[0],T[0],0,q[0],0),r>>>=3,l-=3,d=6;break;case 2:r>>>=3,l-=3,d=3;break;case 3:return r>>>=3,l-=3,d=9,n.msg="invalid block type",i=t,o.bitb=r,o.bitk=l,n.avail_in=k,n.total_in+=b-n.next_in_index,n.next_in_index=b,o.write=S,o.inflate_flush(n,i)}break;case 1:for(;32>l;){if(0===k)return o.bitb=r,o.bitk=l,n.avail_in=k,n.total_in+=b-n.next_in_index,n.next_in_index=b,o.write=S,o.inflate_flush(n,i);i=0,k--,r|=(255&n.read_byte(b++))<<l,l+=8}if((~r>>>16&65535)!=(65535&r))return d=9,n.msg="invalid stored block lengths",i=t,o.bitb=r,o.bitk=l,n.avail_in=k,n.total_in+=b-n.next_in_index,n.next_in_index=b,o.write=S,o.inflate_flush(n,i);c=65535&r,r=l=0,d=0!==c?2:0!==y?7:0;break;case 2:if(0===k)return o.bitb=r,o.bitk=l,n.avail_in=k,n.total_in+=b-n.next_in_index,n.next_in_index=b,o.write=S,o.inflate_flush(n,i);if(0===z&&(S==o.end&&0!==o.read&&(S=0,z=S<o.read?o.read-S-1:o.end-S),0===z&&(o.write=S,i=o.inflate_flush(n,i),S=o.write,z=S<o.read?o.read-S-1:o.end-S,S==o.end&&0!==o.read&&(S=0,z=S<o.read?o.read-S-1:o.end-S),0===z)))return o.bitb=r,o.bitk=l,n.avail_in=k,n.total_in+=b-n.next_in_index,n.next_in_index=b,o.write=S,o.inflate_flush(n,i);if(i=0,a=c,a>k&&(a=k),a>z&&(a=z),o.win.set(n.read_buf(b,a),S),b+=a,k-=a,S+=a,z-=a,0!=(c-=a))break;d=0!==y?7:0;break;case 3:for(;14>l;){if(0===k)return o.bitb=r,o.bitk=l,n.avail_in=k,n.total_in+=b-n.next_in_index,n.next_in_index=b,o.write=S,o.inflate_flush(n,i);i=0,k--,r|=(255&n.read_byte(b++))<<l,l+=8}if(u=a=16383&r,(31&a)>29||(a>>5&31)>29)return d=9,n.msg="too many length or distance symbols",i=t,o.bitb=r,o.bitk=l,n.avail_in=k,n.total_in+=b-n.next_in_index,n.next_in_index=b,o.write=S,o.inflate_flush(n,i);if(a=258+(31&a)+(a>>5&31),!_||_.length<a)_=[];else for(C=0;a>C;C++)_[C]=0;r>>>=14,l-=14,f=0,d=4;case 4:for(;4+(u>>>10)>f;){for(;3>l;){if(0===k)return o.bitb=r,o.bitk=l,n.avail_in=k,n.total_in+=b-n.next_in_index,n.next_in_index=b,o.write=S,o.inflate_flush(n,i);i=0,k--,r|=(255&n.read_byte(b++))<<l,l+=8}_[w[f++]]=7&r,r>>>=3,l-=3}for(;19>f;)_[w[f++]]=0;if(p[0]=7,a=v.inflate_trees_bits(_,p,x,m,n),0!=a)return(i=a)==t&&(_=null,d=9),o.bitb=r,o.bitk=l,n.avail_in=k,n.total_in+=b-n.next_in_index,n.next_in_index=b,o.write=S,o.inflate_flush(n,i);f=0,d=5;case 5:for(;a=u,258+(31&a)+(a>>5&31)>f;){let e,c;for(a=p[0];a>l;){if(0===k)return o.bitb=r,o.bitk=l,n.avail_in=k,n.total_in+=b-n.next_in_index,n.next_in_index=b,o.write=S,o.inflate_flush(n,i);i=0,k--,r|=(255&n.read_byte(b++))<<l,l+=8}if(a=m[3*(x[0]+(r&s[a]))+1],c=m[3*(x[0]+(r&s[a]))+2],16>c)r>>>=a,l-=a,_[f++]=c;else{for(C=18==c?7:c-14,e=18==c?11:3;a+C>l;){if(0===k)return o.bitb=r,o.bitk=l,n.avail_in=k,n.total_in+=b-n.next_in_index,n.next_in_index=b,o.write=S,o.inflate_flush(n,i);i=0,k--,r|=(255&n.read_byte(b++))<<l,l+=8}if(r>>>=a,l-=a,e+=r&s[C],r>>>=C,l-=C,C=f,a=u,C+e>258+(31&a)+(a>>5&31)||16==c&&1>C)return _=null,d=9,n.msg="invalid bit length repeat",i=t,o.bitb=r,o.bitk=l,n.avail_in=k,n.total_in+=b-n.next_in_index,n.next_in_index=b,o.write=S,o.inflate_flush(n,i);c=16==c?_[C-1]:0;do{_[C++]=c}while(0!=--e);f=C}}if(x[0]=-1,A=[],R=[],V=[],B=[],A[0]=9,R[0]=6,a=u,a=v.inflate_trees_dynamic(257+(31&a),1+(a>>5&31),_,A,R,V,B,m,n),0!=a)return a==t&&(_=null,d=9),i=a,o.bitb=r,o.bitk=l,n.avail_in=k,n.total_in+=b-n.next_in_index,n.next_in_index=b,o.write=S,o.inflate_flush(n,i);g.init(A[0],R[0],m,V[0],m,B[0]),d=6;case 6:if(o.bitb=r,o.bitk=l,n.avail_in=k,n.total_in+=b-n.next_in_index,n.next_in_index=b,o.write=S,1!=(i=g.proc(o,n,i)))return o.inflate_flush(n,i);if(i=0,g.free(n),b=n.next_in_index,k=n.avail_in,r=o.bitb,l=o.bitk,S=o.write,z=S<o.read?o.read-S-1:o.end-S,0===y){d=0;break}d=7;case 7:if(o.write=S,i=o.inflate_flush(n,i),S=o.write,z=S<o.read?o.read-S-1:o.end-S,o.read!=o.write)return o.bitb=r,o.bitk=l,n.avail_in=k,n.total_in+=b-n.next_in_index,n.next_in_index=b,o.write=S,o.inflate_flush(n,i);d=8;case 8:return i=1,o.bitb=r,o.bitk=l,n.avail_in=k,n.total_in+=b-n.next_in_index,n.next_in_index=b,o.write=S,o.inflate_flush(n,i);case 9:return i=t,o.bitb=r,o.bitk=l,n.avail_in=k,n.total_in+=b-n.next_in_index,n.next_in_index=b,o.write=S,o.inflate_flush(n,i);default:return i=e,o.bitb=r,o.bitk=l,n.avail_in=k,n.total_in+=b-n.next_in_index,n.next_in_index=b,o.write=S,o.inflate_flush(n,i)}}},o.free=e=>{o.reset(e,null),o.win=null,m=null},o.set_dictionary=(e,t,n)=>{o.win.set(e.subarray(t,t+n),0),o.read=o.write=n},o.sync_point=()=>1==d?1:0}const x=13,g=[0,0,255,255];function y(){const n=this;function i(t){return t&&t.istate?(t.total_in=t.total_out=0,t.msg=null,t.istate.mode=7,t.istate.blocks.reset(t,null),0):e}n.mode=0,n.method=0,n.was=[0],n.need=0,n.marker=0,n.wbits=0,n.inflateEnd=e=>(n.blocks&&n.blocks.free(e),n.blocks=null,0),n.inflateInit=(t,a)=>(t.msg=null,n.blocks=null,8>a||a>15?(n.inflateEnd(t),e):(n.wbits=a,t.istate.blocks=new p(t,1<<a),i(t),0)),n.inflate=(n,i)=>{let a,s;if(!n||!n.istate||!n.next_in)return e;const l=n.istate;for(i=4==i?r:0,a=r;;)switch(l.mode){case 0:if(0===n.avail_in)return a;if(a=i,n.avail_in--,n.total_in++,8!=(15&(l.method=n.read_byte(n.next_in_index++)))){l.mode=x,n.msg="unknown compression method",l.marker=5;break}if(8+(l.method>>4)>l.wbits){l.mode=x,n.msg="invalid win size",l.marker=5;break}l.mode=1;case 1:if(0===n.avail_in)return a;if(a=i,n.avail_in--,n.total_in++,s=255&n.read_byte(n.next_in_index++),((l.method<<8)+s)%31!=0){l.mode=x,n.msg="incorrect header check",l.marker=5;break}if(0==(32&s)){l.mode=7;break}l.mode=2;case 2:if(0===n.avail_in)return a;a=i,n.avail_in--,n.total_in++,l.need=(255&n.read_byte(n.next_in_index++))<<24&4278190080,l.mode=3;case 3:if(0===n.avail_in)return a;a=i,n.avail_in--,n.total_in++,l.need+=(255&n.read_byte(n.next_in_index++))<<16&16711680,l.mode=4;case 4:if(0===n.avail_in)return a;a=i,n.avail_in--,n.total_in++,l.need+=(255&n.read_byte(n.next_in_index++))<<8&65280,l.mode=5;case 5:return 0===n.avail_in?a:(a=i,n.avail_in--,n.total_in++,l.need+=255&n.read_byte(n.next_in_index++),l.mode=6,2);case 6:return l.mode=x,n.msg="need dictionary",l.marker=0,e;case 7:if(a=l.blocks.proc(n,a),a==t){l.mode=x,l.marker=0;break}if(0==a&&(a=i),1!=a)return a;a=i,l.blocks.reset(n,l.was),l.mode=12;case 12:return n.avail_in=0,1;case x:return t;default:return e}},n.inflateSetDictionary=(t,n,i)=>{let a=0,r=i;if(!t||!t.istate||6!=t.istate.mode)return e;const s=t.istate;return r<1<<s.wbits||(r=(1<<s.wbits)-1,a=i-r),s.blocks.set_dictionary(n,a,r),s.mode=7,0},n.inflateSync=n=>{let a,s,l,o,_;if(!n||!n.istate)return e;const d=n.istate;if(d.mode!=x&&(d.mode=x,d.marker=0),0===(a=n.avail_in))return r;for(s=n.next_in_index,l=d.marker;0!==a&&4>l;)n.read_byte(s)==g[l]?l++:l=0!==n.read_byte(s)?0:4-l,s++,a--;return n.total_in+=s-n.next_in_index,n.next_in_index=s,n.avail_in=a,d.marker=l,4!=l?t:(o=n.total_in,_=n.total_out,i(n),n.total_in=o,n.total_out=_,d.mode=7,0)},n.inflateSyncPoint=t=>t&&t.istate&&t.istate.blocks?t.istate.blocks.sync_point():e}function m(){}return m.prototype={inflateInit(e){const t=this;return t.istate=new y,e||(e=15),t.istate.inflateInit(t,e)},inflate(t){const n=this;return n.istate?n.istate.inflate(n,t):e},inflateEnd(){const t=this;if(!t.istate)return e;const n=t.istate.inflateEnd(t);return t.istate=null,n},inflateSync(){const t=this;return t.istate?t.istate.inflateSync(t):e},inflateSetDictionary(t,n){const i=this;return i.istate?i.istate.inflateSetDictionary(i,t,n):e},read_byte(e){return this.next_in[e]},read_buf(e,t){return this.next_in.subarray(e,e+t)}},function(e){const t=new m,s=e&&e.chunkSize?n.floor(2*e.chunkSize):131072,l=new a(s);let o=!1;t.inflateInit(),t.next_out=l,this.append=(e,n)=>{const _=[];let d,c,u=0,f=0,h=0;if(0!==e.length){t.next_in_index=0,t.next_in=e,t.avail_in=e.length;do{if(t.next_out_index=0,t.avail_out=s,0!==t.avail_in||o||(t.next_in_index=0,o=!0),d=t.inflate(0),o&&d===r){if(0!==t.avail_in)throw new i("inflating: bad input")}else if(0!==d&&1!==d)throw new i("inflating: "+t.msg);if((o||1===d)&&t.avail_in===e.length)throw new i("inflating: bad input");t.next_out_index&&(t.next_out_index===s?_.push(new a(l)):_.push(l.slice(0,t.next_out_index))),h+=t.next_out_index,n&&t.next_in_index>0&&t.next_in_index!=u&&(n(t.next_in_index),u=t.next_in_index)}while(t.avail_in>0||0===t.avail_out);return _.length>1?(c=new a(h),_.forEach((e=>{c.set(e,f),f+=e.length}))):c=_[0]||new a,c}},this.flush=()=>{t.inflateEnd()}}})();self.initCodec=()=>{self.Deflate=He,self.Inflate=De}}();
1
+ !function(){"use strict";const{Array:e,Object:t,Math:n,Error:i,Uint8Array:a,Uint16Array:r,Uint32Array:s,Int32Array:l,DataView:o,Promise:_,TextEncoder:d,crypto:c,postMessage:u,TransformStream:f,ReadableStream:h,WritableStream:b,CompressionStream:w,DecompressionStream:p}=globalThis,x=[];for(let e=0;256>e;e++){let t=e;for(let e=0;8>e;e++)1&t?t=t>>>1^3988292384:t>>>=1;x[e]=t}class g{constructor(e){this.crc=e||-1}append(e){let t=0|this.crc;for(let n=0,i=0|e.length;i>n;n++)t=t>>>8^x[255&(t^e[n])];this.crc=t}get(){return~this.crc}}class y extends f{constructor(){const e=new g;super({transform(t){e.append(t)},flush(t){const n=new a(4);new o(n.buffer).setUint32(0,e.get()),t.enqueue(n)}})}}const m={concat(e,t){if(0===e.length||0===t.length)return e.concat(t);const n=e[e.length-1],i=m.getPartial(n);return 32===i?e.concat(t):m._shiftRight(t,i,0|n,e.slice(0,e.length-1))},bitLength(e){const t=e.length;if(0===t)return 0;const n=e[t-1];return 32*(t-1)+m.getPartial(n)},clamp(e,t){if(32*e.length<t)return e;const i=(e=e.slice(0,n.ceil(t/32))).length;return t&=31,i>0&&t&&(e[i-1]=m.partial(t,e[i-1]&2147483648>>t-1,1)),e},partial:(e,t,n)=>32===e?t:(n?0|t:t<<32-e)+1099511627776*e,getPartial:e=>n.round(e/1099511627776)||32,_shiftRight(e,t,n,i){for(void 0===i&&(i=[]);t>=32;t-=32)i.push(n),n=0;if(0===t)return i.concat(e);for(let a=0;a<e.length;a++)i.push(n|e[a]>>>t),n=e[a]<<32-t;const a=e.length?e[e.length-1]:0,r=m.getPartial(a);return i.push(m.partial(t+r&31,t+r>32?n:i.pop(),1)),i}},v={bytes:{fromBits(e){const t=m.bitLength(e)/8,n=new a(t);let i;for(let a=0;t>a;a++)0==(3&a)&&(i=e[a/4]),n[a]=i>>>24,i<<=8;return n},toBits(e){const t=[];let n,i=0;for(n=0;n<e.length;n++)i=i<<8|e[n],3==(3&n)&&(t.push(i),i=0);return 3&n&&t.push(m.partial(8*(3&n),i)),t}}},k={sha1:function(e){e?(this._h=e._h.slice(0),this._buffer=e._buffer.slice(0),this._length=e._length):this.reset()}};k.sha1.prototype={blockSize:512,reset(){const e=this;return e._h=this._init.slice(0),e._buffer=[],e._length=0,e},update(e){const t=this;"string"==typeof e&&(e=v.utf8String.toBits(e));const n=t._buffer=m.concat(t._buffer,e),a=t._length,r=t._length=a+m.bitLength(e);if(r>9007199254740991)throw new i("Cannot hash more than 2^53 - 1 bits");const l=new s(n);let o=0;for(let e=t.blockSize+a-(t.blockSize+a&t.blockSize-1);r>=e;e+=t.blockSize)t._block(l.subarray(16*o,16*(o+1))),o+=1;return n.splice(0,16*o),t},finalize(){const e=this;let t=e._buffer;const i=e._h;t=m.concat(t,[m.partial(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(n.floor(e._length/4294967296)),t.push(0|e._length);t.length;)e._block(t.splice(0,16));return e.reset(),i},_init:[1732584193,4023233417,2562383102,271733878,3285377520],_key:[1518500249,1859775393,2400959708,3395469782],_f:(e,t,n,i)=>e>19?e>39?e>59?e>79?void 0:t^n^i:t&n|t&i|n&i:t^n^i:t&n|~t&i,_S:(e,t)=>t<<e|t>>>32-e,_block(t){const i=this,a=i._h,r=e(80);for(let e=0;16>e;e++)r[e]=t[e];let s=a[0],l=a[1],o=a[2],_=a[3],d=a[4];for(let e=0;79>=e;e++){16>e||(r[e]=i._S(1,r[e-3]^r[e-8]^r[e-14]^r[e-16]));const t=i._S(5,s)+i._f(e,l,o,_)+d+r[e]+i._key[n.floor(e/20)]|0;d=_,_=o,o=i._S(30,l),l=s,s=t}a[0]=a[0]+s|0,a[1]=a[1]+l|0,a[2]=a[2]+o|0,a[3]=a[3]+_|0,a[4]=a[4]+d|0}};const S={getRandomValues(e){const t=new s(e.buffer),i=e=>{let t=987654321;const i=4294967295;return()=>(t=36969*(65535&t)+(t>>16)&i,(((t<<16)+(e=18e3*(65535&e)+(e>>16)&i)&i)/4294967296+.5)*(n.random()>.5?1:-1))};for(let a,r=0;r<e.length;r+=4){const e=i(4294967296*(a||n.random()));a=987654071*e(),t[r/4]=4294967296*e()|0}return e}},z={importKey:e=>new z.hmacSha1(v.bytes.toBits(e)),pbkdf2(e,t,n,a){if(n=n||1e4,0>a||0>n)throw new i("invalid params to pbkdf2");const r=1+(a>>5)<<2;let s,l,_,d,c;const u=new ArrayBuffer(r),f=new o(u);let h=0;const b=m;for(t=v.bytes.toBits(t),c=1;(r||1)>h;c++){for(s=l=e.encrypt(b.concat(t,[c])),_=1;n>_;_++)for(l=e.encrypt(l),d=0;d<l.length;d++)s[d]^=l[d];for(_=0;(r||1)>h&&_<s.length;_++)f.setInt32(h,s[_]),h+=4}return u.slice(0,a/8)},hmacSha1:class{constructor(e){const t=this,n=t._hash=k.sha1,i=[[],[]],a=n.prototype.blockSize/32;t._baseHash=[new n,new n],e.length>a&&(e=n.hash(e));for(let t=0;a>t;t++)i[0][t]=909522486^e[t],i[1][t]=1549556828^e[t];t._baseHash[0].update(i[0]),t._baseHash[1].update(i[1]),t._resultHash=new n(t._baseHash[0])}reset(){const e=this;e._resultHash=new e._hash(e._baseHash[0]),e._updated=!1}update(e){this._updated=!0,this._resultHash.update(e)}digest(){const e=this,t=e._resultHash.finalize(),n=new e._hash(e._baseHash[1]).update(t).finalize();return e.reset(),n}encrypt(e){if(this._updated)throw new i("encrypt on already updated hmac called!");return this.update(e),this.digest(e)}}},C=void 0!==c&&"function"==typeof c.getRandomValues,I="Invalid password";function E(e){return C?c.getRandomValues(e):S.getRandomValues(e)}const T=16,q={name:"PBKDF2"},A=t.assign({hash:{name:"HMAC"}},q),R=t.assign({iterations:1e3,hash:{name:"SHA-1"}},q),V=["deriveBits"],B=[8,12,16],H=[16,24,32],D=10,K=[0,0,0,0],P="undefined",W="function",M=typeof c!=P,U=M&&typeof c.subtle!=P,L=M&&U&&typeof c.subtle.importKey==W,N=M&&U&&typeof c.subtle.deriveBits==W,F=v.bytes,G=class{constructor(e){const t=this;t._tables=[[[],[],[],[],[]],[[],[],[],[],[]]],t._tables[0][0][0]||t._precompute();const n=t._tables[0][4],a=t._tables[1],r=e.length;let s,l,o,_=1;if(4!==r&&6!==r&&8!==r)throw new i("invalid aes key size");for(t._key=[l=e.slice(0),o=[]],s=r;4*r+28>s;s++){let e=l[s-1];(s%r==0||8===r&&s%r==4)&&(e=n[e>>>24]<<24^n[e>>16&255]<<16^n[e>>8&255]<<8^n[255&e],s%r==0&&(e=e<<8^e>>>24^_<<24,_=_<<1^283*(_>>7))),l[s]=l[s-r]^e}for(let e=0;s;e++,s--){const t=l[3&e?s:s-4];o[e]=4>=s||4>e?t:a[0][n[t>>>24]]^a[1][n[t>>16&255]]^a[2][n[t>>8&255]]^a[3][n[255&t]]}}encrypt(e){return this._crypt(e,0)}decrypt(e){return this._crypt(e,1)}_precompute(){const e=this._tables[0],t=this._tables[1],n=e[4],i=t[4],a=[],r=[];let s,l,o,_;for(let e=0;256>e;e++)r[(a[e]=e<<1^283*(e>>7))^e]=e;for(let d=s=0;!n[d];d^=l||1,s=r[s]||1){let r=s^s<<1^s<<2^s<<3^s<<4;r=r>>8^255&r^99,n[d]=r,i[r]=d,_=a[o=a[l=a[d]]];let c=16843009*_^65537*o^257*l^16843008*d,u=257*a[r]^16843008*r;for(let n=0;4>n;n++)e[n][d]=u=u<<24^u>>>8,t[n][r]=c=c<<24^c>>>8}for(let n=0;5>n;n++)e[n]=e[n].slice(0),t[n]=t[n].slice(0)}_crypt(e,t){if(4!==e.length)throw new i("invalid aes block size");const n=this._key[t],a=n.length/4-2,r=[0,0,0,0],s=this._tables[t],l=s[0],o=s[1],_=s[2],d=s[3],c=s[4];let u,f,h,b=e[0]^n[0],w=e[t?3:1]^n[1],p=e[2]^n[2],x=e[t?1:3]^n[3],g=4;for(let e=0;a>e;e++)u=l[b>>>24]^o[w>>16&255]^_[p>>8&255]^d[255&x]^n[g],f=l[w>>>24]^o[p>>16&255]^_[x>>8&255]^d[255&b]^n[g+1],h=l[p>>>24]^o[x>>16&255]^_[b>>8&255]^d[255&w]^n[g+2],x=l[x>>>24]^o[b>>16&255]^_[w>>8&255]^d[255&p]^n[g+3],g+=4,b=u,w=f,p=h;for(let e=0;4>e;e++)r[t?3&-e:e]=c[b>>>24]<<24^c[w>>16&255]<<16^c[p>>8&255]<<8^c[255&x]^n[g++],u=b,b=w,w=p,p=x,x=u;return r}},X=class{constructor(e,t){this._prf=e,this._initIv=t,this._iv=t}reset(){this._iv=this._initIv}update(e){return this.calculate(this._prf,e,this._iv)}incWord(e){if(255==(e>>24&255)){let t=e>>16&255,n=e>>8&255,i=255&e;255===t?(t=0,255===n?(n=0,255===i?i=0:++i):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=i}else e+=1<<24;return e}incCounter(e){0===(e[0]=this.incWord(e[0]))&&(e[1]=this.incWord(e[1]))}calculate(e,t,n){let i;if(!(i=t.length))return[];const a=m.bitLength(t);for(let a=0;i>a;a+=4){this.incCounter(n);const i=e.encrypt(n);t[a]^=i[0],t[a+1]^=i[1],t[a+2]^=i[2],t[a+3]^=i[3]}return m.clamp(t,a)}},j=z.hmacSha1;class O extends f{constructor(n,r,s){let l;super({start(){t.assign(this,{ready:new _((e=>this.resolveReady=e)),password:n,signed:r,strength:s-1,pending:new a})},async transform(t,n){const r=this;if(r.password){const n=r.password;r.password=null;const a=$(t,0,B[r.strength]+2);await(async(e,t,n)=>{await Y(e,n,$(t,0,B[e.strength]));const a=$(t,B[e.strength]),r=e.keys.passwordVerification;if(r[0]!=a[0]||r[1]!=a[1])throw new i(I)})(r,a,n),r.ctr=new X(new G(r.keys.key),e.from(K)),r.hmac=new j(r.keys.authentication),t=$(t,B[r.strength]+2),r.resolveReady()}else await r.ready;const s=new a(t.length-D-(t.length-D)%T);n.enqueue(Q(r,t,s,0,D,!0))},async flush(e){const t=this;await t.ready;const n=t.pending,i=$(n,0,n.length-D),r=$(n,n.length-D);let s=new a;if(i.length){const e=te(F,i);t.hmac.update(e);const n=t.ctr.update(e);s=ee(F,n)}if(l.valid=!0,t.signed){const e=$(ee(F,t.hmac.digest()),0,D);for(let t=0;D>t;t++)e[t]!=r[t]&&(l.valid=!1)}e.enqueue(s)}}),l=this}}class J extends f{constructor(n,i){let r;super({start(){t.assign(this,{ready:new _((e=>this.resolveReady=e)),password:n,strength:i-1,pending:new a})},async transform(t,n){const i=this;let r=new a;if(i.password){const t=i.password;i.password=null,r=await(async(e,t)=>{const n=E(new a(B[e.strength]));return await Y(e,t,n),Z(n,e.keys.passwordVerification)})(i,t),i.ctr=new X(new G(i.keys.key),e.from(K)),i.hmac=new j(i.keys.authentication),i.resolveReady()}else await i.ready;const s=new a(r.length+t.length-t.length%T);s.set(r,0),n.enqueue(Q(i,t,s,r.length,0))},async flush(e){const t=this;await t.ready;let n=new a;if(t.pending.length){const e=t.ctr.update(te(F,t.pending));t.hmac.update(e),n=ee(F,e)}r.signature=ee(F,t.hmac.digest()).slice(0,D),e.enqueue(Z(n,r.signature))}}),r=this}}function Q(e,t,n,i,r,s){const l=t.length-r;let o;for(e.pending.length&&(t=Z(e.pending,t),n=((e,t)=>{if(t&&t>e.length){const n=e;(e=new a(t)).set(n,0)}return e})(n,l-l%T)),o=0;l-T>=o;o+=T){const a=te(F,$(t,o,o+T));s&&e.hmac.update(a);const r=e.ctr.update(a);s||e.hmac.update(r),n.set(ee(F,r),o+i)}return e.pending=$(t,o),n}async function Y(e,n,i){const r=(e=>{if(void 0===d){const t=new a((e=unescape(encodeURIComponent(e))).length);for(let n=0;n<t.length;n++)t[n]=e.charCodeAt(n);return t}return(new d).encode(e)})(n),s=await((e,t,n,i,a)=>L?c.subtle.importKey("raw",t,n,!1,a):z.importKey(t))(0,r,A,0,V),l=await(async(e,t,n)=>N?await c.subtle.deriveBits(e,t,n):z.pbkdf2(t,e.salt,R.iterations,n))(t.assign({salt:i},R),s,8*(2*H[e.strength]+2)),o=new a(l);e.keys={key:te(F,$(o,0,H[e.strength])),authentication:te(F,$(o,H[e.strength],2*H[e.strength])),passwordVerification:$(o,2*H[e.strength])}}function Z(e,t){let n=e;return e.length+t.length&&(n=new a(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function $(e,t,n){return e.subarray(t,n)}function ee(e,t){return e.fromBits(t)}function te(e,t){return e.toBits(t)}class ne extends f{constructor(e,n){let a;super({start(){t.assign(this,{password:e,passwordVerification:n}),se(this,e)},transform(e,t){const n=this;if(n.password){const t=ae(n,e.subarray(0,12));if(n.password=null,t[11]!=n.passwordVerification)throw new i(I);e=e.subarray(12)}t.enqueue(ae(n,e))},flush(){a.valid=!0}}),a=this}}class ie extends f{constructor(e,n){super({start(){t.assign(this,{password:e,passwordVerification:n}),se(this,e)},transform(e,t){const n=this;let i,r;if(n.password){n.password=null;const t=E(new a(12));t[11]=n.passwordVerification,i=new a(e.length+t.length),i.set(re(n,t),0),r=12}else i=new a(e.length),r=0;i.set(re(n,e),r),t.enqueue(i)},flush(){}})}}function ae(e,t){const n=new a(t.length);for(let i=0;i<t.length;i++)n[i]=oe(e)^t[i],le(e,n[i]);return n}function re(e,t){const n=new a(t.length);for(let i=0;i<t.length;i++)n[i]=oe(e)^t[i],le(e,t[i]);return n}function se(e,t){e.keys=[305419896,591751049,878082192],e.crcKey0=new g(e.keys[0]),e.crcKey2=new g(e.keys[2]);for(let n=0;n<t.length;n++)le(e,t.charCodeAt(n))}function le(e,t){e.crcKey0.append([t]),e.keys[0]=~e.crcKey0.get(),e.keys[1]=de(e.keys[1]+_e(e.keys[0])),e.keys[1]=de(n.imul(e.keys[1],134775813)+1),e.crcKey2.append([e.keys[1]>>>24]),e.keys[2]=~e.crcKey2.get()}function oe(e){const t=2|e.keys[2];return _e(n.imul(t,1^t)>>>8)}function _e(e){return 255&e}function de(e){return 4294967295&e}class ce extends f{constructor(e,t){let n;super({start(){n=new e(t)},transform(e,t){e=n.append(e),t.enqueue(e)},flush(e){const t=n.flush();t&&e.enqueue(t)}})}}const ue="Invalid signature",fe="deflate-raw",he="undefined",be=typeof w==he,we=typeof p==he;let pe=!0,xe=!0;class ge extends f{constructor(e,t,{chunkSize:n},...i){super({},...i);const{compressed:a,encrypted:r,useCompressionStream:s,password:l,passwordVerification:_,encryptionStrength:d,zipCrypto:c,signed:u,level:f}=t,h=this;let b,p,x=ve(super.readable);if(r&&!c||!u||([x,b]=x.tee(),b=b.pipeThrough(new y)),a)if(void 0!==s&&!s||be&&!xe)x=me(e,x,{chunkSize:n,level:f});else try{x=x.pipeThrough(new w(fe))}catch(t){xe=!1,x=me(e,x,{chunkSize:n,level:f})}r&&(c?x=x.pipeThrough(new ie(l,_)):(p=new J(l,d),x=x.pipeThrough(p))),ke(h,x,(async()=>{let e;r&&!c&&(e=p.signature),r&&!c||!u||(e=await b.getReader().read(),e=new o(e.value.buffer).getUint32(0)),h.signature=e}))}}class ye extends f{constructor(e,t,{chunkSize:n},...a){super({},...a);const{zipCrypto:r,encrypted:s,password:l,passwordVerification:_,signed:d,encryptionStrength:c,compressed:u,useCompressionStream:f}=t;let h,b,w=ve(super.readable);if(s&&(r?w=w.pipeThrough(new ne(l,_)):(b=new O(l,d,c),w=w.pipeThrough(b))),u)if(void 0!==f&&!f||we&&!pe)w=me(e,w,{chunkSize:n});else try{w=w.pipeThrough(new p(fe))}catch(t){pe=!1,w=me(e,w,{chunkSize:n})}s&&!r||!d||([w,h]=w.tee(),h=h.pipeThrough(new y)),ke(this,w,(async()=>{if(s&&!r&&!b.valid)throw new i(ue);if((!s||r)&&d){const e=await h.getReader().read(),n=new o(e.value.buffer);if(t.signature!=n.getUint32(0,!1))throw new i(ue)}}))}}function me(e,t,n){return t.pipeThrough(new ce(e,n))}function ve(e){return e.pipeThrough(new f({transform(e,t){e&&e.length&&t.enqueue(e)}}))}function ke(e,n,i){n=n.pipeThrough(new f({flush:i})),t.defineProperty(e,"readable",{get:()=>n})}const Se="deflate",ze="inflate",Ce="data";class Ie{constructor(e,n,i,a,r){const{codecType:s}=a;let l;s.startsWith(Se)?l=ge:s.startsWith(ze)&&(l=ye),t.assign(this,{StreamConstructor:l,CodecConstructor:e,readable:n,writable:i,options:a,config:r})}async run(){const{StreamConstructor:e,CodecConstructor:t,readable:n,writable:i,options:a,config:r}=this,s=new e(t,a,r);let l=0;await n.pipeThrough(s).pipeThrough(new f({transform(e,t){e&&e.length&&(l+=e.length,t.enqueue(e))}})).pipeTo(i,{preventClose:!0,preventAbort:!0});const{signature:o}=s;return{size:l,signature:o}}}const Ee=new Map,Te=new Map;let qe,Ae=0;async function Re(e){try{const{options:t,scripts:n,config:i}=e,{codecType:a}=t;let r;n&&n.length&&importScripts.apply(void 0,n),self.initCodec&&self.initCodec(),a.startsWith(Se)?r=self.Deflate:a.startsWith(ze)&&(r=self.Inflate);const s={highWaterMark:1,size:()=>i.chunkSize},l=e.readable||new h({async pull(e){let t=new _((e=>Ee.set(Ae,e)));Ve({type:"pull",messageId:Ae}),Ae=(Ae+1)%Number.MAX_SAFE_INTEGER;const{value:n,done:i}=await t;e.enqueue(n),i&&e.close()}},s),o=e.writable||new b({async write(e){let t;const n=new _((e=>t=e));Te.set(Ae,t),Ve({type:Ce,data:e,messageId:Ae}),Ae=(Ae+1)%Number.MAX_SAFE_INTEGER,await n}},s);qe=new Ie(r,l,o,t,i);const d=await qe.run();e.writable&&!t.preventClose&&await e.writable.close(),Ve({type:"close",result:d})}catch(e){Be(e)}}function Ve(e){if(e.data){let{data:t}=e;if(t&&t.length)try{t=new a(t),e.data=t.buffer,u(e,[e.data])}catch(t){u(e)}else u(e)}else u(e)}function Be(e){const{message:t,stack:n,code:i,name:a}=e;u({error:{message:t,stack:n,code:i,name:a}})}addEventListener("message",(async e=>{const t=e.data,{type:n,messageId:i,data:r,done:s}=t;try{if("start"==n&&Re(t),n==Ce){const e=Ee.get(i);Ee.delete(i),e({value:new a(r),done:s})}if("ack"==n){const e=Te.get(i);Te.delete(i),e()}}catch(e){Be(e)}}));const He=-2;function De(t){return Ke(t.map((([t,n])=>new e(t).fill(n,0,t))))}function Ke(t){return t.reduce(((t,n)=>t.concat(e.isArray(n)?Ke(n):n)),[])}const Pe=[0,1,2,3].concat(...De([[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 We(){const e=this;function t(e,t){let n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1}e.build_tree=i=>{const a=e.dyn_tree,r=e.stat_desc.static_tree,s=e.stat_desc.elems;let l,o,_,d=-1;for(i.heap_len=0,i.heap_max=573,l=0;s>l;l++)0!==a[2*l]?(i.heap[++i.heap_len]=d=l,i.depth[l]=0):a[2*l+1]=0;for(;2>i.heap_len;)_=i.heap[++i.heap_len]=2>d?++d:0,a[2*_]=1,i.depth[_]=0,i.opt_len--,r&&(i.static_len-=r[2*_+1]);for(e.max_code=d,l=n.floor(i.heap_len/2);l>=1;l--)i.pqdownheap(a,l);_=s;do{l=i.heap[1],i.heap[1]=i.heap[i.heap_len--],i.pqdownheap(a,1),o=i.heap[1],i.heap[--i.heap_max]=l,i.heap[--i.heap_max]=o,a[2*_]=a[2*l]+a[2*o],i.depth[_]=n.max(i.depth[l],i.depth[o])+1,a[2*l+1]=a[2*o+1]=_,i.heap[1]=_++,i.pqdownheap(a,1)}while(i.heap_len>=2);i.heap[--i.heap_max]=i.heap[1],(t=>{const n=e.dyn_tree,i=e.stat_desc.static_tree,a=e.stat_desc.extra_bits,r=e.stat_desc.extra_base,s=e.stat_desc.max_length;let l,o,_,d,c,u,f=0;for(d=0;15>=d;d++)t.bl_count[d]=0;for(n[2*t.heap[t.heap_max]+1]=0,l=t.heap_max+1;573>l;l++)o=t.heap[l],d=n[2*n[2*o+1]+1]+1,d>s&&(d=s,f++),n[2*o+1]=d,o>e.max_code||(t.bl_count[d]++,c=0,r>o||(c=a[o-r]),u=n[2*o],t.opt_len+=u*(d+c),i&&(t.static_len+=u*(i[2*o+1]+c)));if(0!==f){do{for(d=s-1;0===t.bl_count[d];)d--;t.bl_count[d]--,t.bl_count[d+1]+=2,t.bl_count[s]--,f-=2}while(f>0);for(d=s;0!==d;d--)for(o=t.bl_count[d];0!==o;)_=t.heap[--l],_>e.max_code||(n[2*_+1]!=d&&(t.opt_len+=(d-n[2*_+1])*n[2*_],n[2*_+1]=d),o--)}})(i),((e,n,i)=>{const a=[];let r,s,l,o=0;for(r=1;15>=r;r++)a[r]=o=o+i[r-1]<<1;for(s=0;n>=s;s++)l=e[2*s+1],0!==l&&(e[2*s]=t(a[l]++,l))})(a,e.max_code,i.bl_count)}}function Me(e,t,n,i,a){const r=this;r.static_tree=e,r.extra_bits=t,r.extra_base=n,r.elems=i,r.max_length=a}We._length_code=[0,1,2,3,4,5,6,7].concat(...De([[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]])),We.base_length=[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],We.base_dist=[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],We.d_code=e=>256>e?Pe[e]:Pe[256+(e>>>7)],We.extra_lbits=[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],We.extra_dbits=[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],We.extra_blbits=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],We.bl_order=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];const Ue=De([[144,8],[112,9],[24,7],[8,8]]);Me.static_ltree=Ke([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(((e,t)=>[e,Ue[t]])));const Le=De([[30,5]]);function Ne(e,t,n,i,a){const r=this;r.good_length=e,r.max_lazy=t,r.nice_length=n,r.max_chain=i,r.func=a}Me.static_dtree=Ke([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(((e,t)=>[e,Le[t]]))),Me.static_l_desc=new Me(Me.static_ltree,We.extra_lbits,257,286,15),Me.static_d_desc=new Me(Me.static_dtree,We.extra_dbits,0,30,15),Me.static_bl_desc=new Me(null,We.extra_blbits,0,19,7);const Fe=[new Ne(0,0,0,0,0),new Ne(4,4,8,4,1),new Ne(4,5,16,8,1),new Ne(4,6,32,32,1),new Ne(4,4,16,16,2),new Ne(8,16,32,32,2),new Ne(8,16,128,128,2),new Ne(8,32,128,256,2),new Ne(32,128,258,1024,2),new Ne(32,258,258,4096,2)],Ge=["need dictionary","stream end","","","stream error","data error","","buffer error","",""],Xe=113,je=666,Oe=262;function Je(e,t,n,i){const a=e[2*t],r=e[2*n];return r>a||a==r&&i[t]<=i[n]}function Qe(){const e=this;let t,i,s,l,o,_,d,c,u,f,h,b,w,p,x,g,y,m,v,k,S,z,C,I,E,T,q,A,R,V,B,H,D;const K=new We,P=new We,W=new We;let M,U,L,N,F,G;function X(){let t;for(t=0;286>t;t++)B[2*t]=0;for(t=0;30>t;t++)H[2*t]=0;for(t=0;19>t;t++)D[2*t]=0;B[512]=1,e.opt_len=e.static_len=0,U=L=0}function j(e,t){let n,i=-1,a=e[1],r=0,s=7,l=4;0===a&&(s=138,l=3),e[2*(t+1)+1]=65535;for(let o=0;t>=o;o++)n=a,a=e[2*(o+1)+1],++r<s&&n==a||(l>r?D[2*n]+=r:0!==n?(n!=i&&D[2*n]++,D[32]++):r>10?D[36]++:D[34]++,r=0,i=n,0===a?(s=138,l=3):n==a?(s=6,l=3):(s=7,l=4))}function O(t){e.pending_buf[e.pending++]=t}function J(e){O(255&e),O(e>>>8&255)}function Q(e,t){let n;const i=t;G>16-i?(n=e,F|=n<<G&65535,J(F),F=n>>>16-G,G+=i-16):(F|=e<<G&65535,G+=i)}function Y(e,t){const n=2*e;Q(65535&t[n],65535&t[n+1])}function Z(e,t){let n,i,a=-1,r=e[1],s=0,l=7,o=4;for(0===r&&(l=138,o=3),n=0;t>=n;n++)if(i=r,r=e[2*(n+1)+1],++s>=l||i!=r){if(o>s)do{Y(i,D)}while(0!=--s);else 0!==i?(i!=a&&(Y(i,D),s--),Y(16,D),Q(s-3,2)):s>10?(Y(18,D),Q(s-11,7)):(Y(17,D),Q(s-3,3));s=0,a=i,0===r?(l=138,o=3):i==r?(l=6,o=3):(l=7,o=4)}}function $(){16==G?(J(F),F=0,G=0):8>G||(O(255&F),F>>>=8,G-=8)}function ee(t,i){let a,r,s;if(e.dist_buf[U]=t,e.lc_buf[U]=255&i,U++,0===t?B[2*i]++:(L++,t--,B[2*(We._length_code[i]+256+1)]++,H[2*We.d_code(t)]++),0==(8191&U)&&q>2){for(a=8*U,r=S-y,s=0;30>s;s++)a+=H[2*s]*(5+We.extra_dbits[s]);if(a>>>=3,L<n.floor(U/2)&&a<n.floor(r/2))return!0}return U==M-1}function te(t,n){let i,a,r,s,l=0;if(0!==U)do{i=e.dist_buf[l],a=e.lc_buf[l],l++,0===i?Y(a,t):(r=We._length_code[a],Y(r+256+1,t),s=We.extra_lbits[r],0!==s&&(a-=We.base_length[r],Q(a,s)),i--,r=We.d_code(i),Y(r,n),s=We.extra_dbits[r],0!==s&&(i-=We.base_dist[r],Q(i,s)))}while(U>l);Y(256,t),N=t[513]}function ne(){G>8?J(F):G>0&&O(255&F),F=0,G=0}function ie(t,n,i){Q(0+(i?1:0),3),((t,n)=>{ne(),N=8,J(n),J(~n),e.pending_buf.set(c.subarray(t,t+n),e.pending),e.pending+=n})(t,n)}function ae(n){((t,n,i)=>{let a,r,s=0;q>0?(K.build_tree(e),P.build_tree(e),s=(()=>{let t;for(j(B,K.max_code),j(H,P.max_code),W.build_tree(e),t=18;t>=3&&0===D[2*We.bl_order[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t})(),a=e.opt_len+3+7>>>3,r=e.static_len+3+7>>>3,r>a||(a=r)):a=r=n+5,n+4>a||-1==t?r==a?(Q(2+(i?1:0),3),te(Me.static_ltree,Me.static_dtree)):(Q(4+(i?1:0),3),((e,t,n)=>{let i;for(Q(e-257,5),Q(t-1,5),Q(n-4,4),i=0;n>i;i++)Q(D[2*We.bl_order[i]+1],3);Z(B,e-1),Z(H,t-1)})(K.max_code+1,P.max_code+1,s+1),te(B,H)):ie(t,n,i),X(),i&&ne()})(0>y?-1:y,S-y,n),y=S,t.flush_pending()}function re(){let e,n,i,a;do{if(a=u-C-S,0===a&&0===S&&0===C)a=o;else if(-1==a)a--;else if(S>=o+o-Oe){c.set(c.subarray(o,o+o),0),z-=o,S-=o,y-=o,e=w,i=e;do{n=65535&h[--i],h[i]=o>n?0:n-o}while(0!=--e);e=o,i=e;do{n=65535&f[--i],f[i]=o>n?0:n-o}while(0!=--e);a+=o}if(0===t.avail_in)return;e=t.read_buf(c,S+C,a),C+=e,3>C||(b=255&c[S],b=(b<<g^255&c[S+1])&x)}while(Oe>C&&0!==t.avail_in)}function se(e){let t,n,i=E,a=S,r=I;const s=S>o-Oe?S-(o-Oe):0;let l=V;const _=d,u=S+258;let h=c[a+r-1],b=c[a+r];R>I||(i>>=2),l>C&&(l=C);do{if(t=e,c[t+r]==b&&c[t+r-1]==h&&c[t]==c[a]&&c[++t]==c[a+1]){a+=2,t++;do{}while(c[++a]==c[++t]&&c[++a]==c[++t]&&c[++a]==c[++t]&&c[++a]==c[++t]&&c[++a]==c[++t]&&c[++a]==c[++t]&&c[++a]==c[++t]&&c[++a]==c[++t]&&u>a);if(n=258-(u-a),a=u-258,n>r){if(z=e,r=n,n>=l)break;h=c[a+r-1],b=c[a+r]}}}while((e=65535&f[e&_])>s&&0!=--i);return r>C?C:r}e.depth=[],e.bl_count=[],e.heap=[],B=[],H=[],D=[],e.pqdownheap=(t,n)=>{const i=e.heap,a=i[n];let r=n<<1;for(;r<=e.heap_len&&(r<e.heap_len&&Je(t,i[r+1],i[r],e.depth)&&r++,!Je(t,a,i[r],e.depth));)i[n]=i[r],n=r,r<<=1;i[n]=a},e.deflateInit=(t,v,z,U,L,j)=>(U||(U=8),L||(L=8),j||(j=0),t.msg=null,-1==v&&(v=6),1>L||L>9||8!=U||9>z||z>15||0>v||v>9||0>j||j>2?He:(t.dstate=e,_=z,o=1<<_,d=o-1,p=L+7,w=1<<p,x=w-1,g=n.floor((p+3-1)/3),c=new a(2*o),f=[],h=[],M=1<<L+6,e.pending_buf=new a(4*M),s=4*M,e.dist_buf=new r(M),e.lc_buf=new a(M),q=v,A=j,(t=>(t.total_in=t.total_out=0,t.msg=null,e.pending=0,e.pending_out=0,i=Xe,l=0,K.dyn_tree=B,K.stat_desc=Me.static_l_desc,P.dyn_tree=H,P.stat_desc=Me.static_d_desc,W.dyn_tree=D,W.stat_desc=Me.static_bl_desc,F=0,G=0,N=8,X(),(()=>{u=2*o,h[w-1]=0;for(let e=0;w-1>e;e++)h[e]=0;T=Fe[q].max_lazy,R=Fe[q].good_length,V=Fe[q].nice_length,E=Fe[q].max_chain,S=0,y=0,C=0,m=I=2,k=0,b=0})(),0))(t))),e.deflateEnd=()=>42!=i&&i!=Xe&&i!=je?He:(e.lc_buf=null,e.dist_buf=null,e.pending_buf=null,h=null,f=null,c=null,e.dstate=null,i==Xe?-3:0),e.deflateParams=(e,t,n)=>{let i=0;return-1==t&&(t=6),0>t||t>9||0>n||n>2?He:(Fe[q].func!=Fe[t].func&&0!==e.total_in&&(i=e.deflate(1)),q!=t&&(q=t,T=Fe[q].max_lazy,R=Fe[q].good_length,V=Fe[q].nice_length,E=Fe[q].max_chain),A=n,i)},e.deflateSetDictionary=(e,t,n)=>{let a,r=n,s=0;if(!t||42!=i)return He;if(3>r)return 0;for(r>o-Oe&&(r=o-Oe,s=n-r),c.set(t.subarray(s,s+r),0),S=r,y=r,b=255&c[0],b=(b<<g^255&c[1])&x,a=0;r-3>=a;a++)b=(b<<g^255&c[a+2])&x,f[a&d]=h[b],h[b]=a;return 0},e.deflate=(n,a)=>{let r,u,p,E,R;if(a>4||0>a)return He;if(!n.next_out||!n.next_in&&0!==n.avail_in||i==je&&4!=a)return n.msg=Ge[4],He;if(0===n.avail_out)return n.msg=Ge[7],-5;var V;if(t=n,E=l,l=a,42==i&&(u=8+(_-8<<4)<<8,p=(q-1&255)>>1,p>3&&(p=3),u|=p<<6,0!==S&&(u|=32),u+=31-u%31,i=Xe,O((V=u)>>8&255),O(255&V)),0!==e.pending){if(t.flush_pending(),0===t.avail_out)return l=-1,0}else if(0===t.avail_in&&E>=a&&4!=a)return t.msg=Ge[7],-5;if(i==je&&0!==t.avail_in)return n.msg=Ge[7],-5;if(0!==t.avail_in||0!==C||0!=a&&i!=je){switch(R=-1,Fe[q].func){case 0:R=(e=>{let n,i=65535;for(i>s-5&&(i=s-5);;){if(1>=C){if(re(),0===C&&0==e)return 0;if(0===C)break}if(S+=C,C=0,n=y+i,(0===S||S>=n)&&(C=S-n,S=n,ae(!1),0===t.avail_out))return 0;if(S-y>=o-Oe&&(ae(!1),0===t.avail_out))return 0}return ae(4==e),0===t.avail_out?4==e?2:0:4==e?3:1})(a);break;case 1:R=(e=>{let n,i=0;for(;;){if(Oe>C){if(re(),Oe>C&&0==e)return 0;if(0===C)break}if(3>C||(b=(b<<g^255&c[S+2])&x,i=65535&h[b],f[S&d]=h[b],h[b]=S),0===i||(S-i&65535)>o-Oe||2!=A&&(m=se(i)),3>m)n=ee(0,255&c[S]),C--,S++;else if(n=ee(S-z,m-3),C-=m,m>T||3>C)S+=m,m=0,b=255&c[S],b=(b<<g^255&c[S+1])&x;else{m--;do{S++,b=(b<<g^255&c[S+2])&x,i=65535&h[b],f[S&d]=h[b],h[b]=S}while(0!=--m);S++}if(n&&(ae(!1),0===t.avail_out))return 0}return ae(4==e),0===t.avail_out?4==e?2:0:4==e?3:1})(a);break;case 2:R=(e=>{let n,i,a=0;for(;;){if(Oe>C){if(re(),Oe>C&&0==e)return 0;if(0===C)break}if(3>C||(b=(b<<g^255&c[S+2])&x,a=65535&h[b],f[S&d]=h[b],h[b]=S),I=m,v=z,m=2,0!==a&&T>I&&o-Oe>=(S-a&65535)&&(2!=A&&(m=se(a)),5>=m&&(1==A||3==m&&S-z>4096)&&(m=2)),3>I||m>I)if(0!==k){if(n=ee(0,255&c[S-1]),n&&ae(!1),S++,C--,0===t.avail_out)return 0}else k=1,S++,C--;else{i=S+C-3,n=ee(S-1-v,I-3),C-=I-1,I-=2;do{++S>i||(b=(b<<g^255&c[S+2])&x,a=65535&h[b],f[S&d]=h[b],h[b]=S)}while(0!=--I);if(k=0,m=2,S++,n&&(ae(!1),0===t.avail_out))return 0}}return 0!==k&&(n=ee(0,255&c[S-1]),k=0),ae(4==e),0===t.avail_out?4==e?2:0:4==e?3:1})(a)}if(2!=R&&3!=R||(i=je),0==R||2==R)return 0===t.avail_out&&(l=-1),0;if(1==R){if(1==a)Q(2,3),Y(256,Me.static_ltree),$(),9>1+N+10-G&&(Q(2,3),Y(256,Me.static_ltree),$()),N=7;else if(ie(0,0,!1),3==a)for(r=0;w>r;r++)h[r]=0;if(t.flush_pending(),0===t.avail_out)return l=-1,0}}return 4!=a?0:1}}function Ye(){const e=this;e.next_in_index=0,e.next_out_index=0,e.avail_in=0,e.total_in=0,e.avail_out=0,e.total_out=0}function Ze(e){const t=new Ye,r=(s=e&&e.chunkSize?e.chunkSize:65536)+5*(n.floor(s/16383)+1);var s;const l=new a(r);let o=e?e.level:-1;void 0===o&&(o=-1),t.deflateInit(o),t.next_out=l,this.append=(e,n)=>{let s,o,_=0,d=0,c=0;const u=[];if(e.length){t.next_in_index=0,t.next_in=e,t.avail_in=e.length;do{if(t.next_out_index=0,t.avail_out=r,s=t.deflate(0),0!=s)throw new i("deflating: "+t.msg);t.next_out_index&&(t.next_out_index==r?u.push(new a(l)):u.push(l.slice(0,t.next_out_index))),c+=t.next_out_index,n&&t.next_in_index>0&&t.next_in_index!=_&&(n(t.next_in_index),_=t.next_in_index)}while(t.avail_in>0||0===t.avail_out);return u.length>1?(o=new a(c),u.forEach((e=>{o.set(e,d),d+=e.length}))):o=u[0]||new a,o}},this.flush=()=>{let e,n,s=0,o=0;const _=[];do{if(t.next_out_index=0,t.avail_out=r,e=t.deflate(4),1!=e&&0!=e)throw new i("deflating: "+t.msg);r-t.avail_out>0&&_.push(l.slice(0,t.next_out_index)),o+=t.next_out_index}while(t.avail_in>0||0===t.avail_out);return t.deflateEnd(),n=new a(o),_.forEach((e=>{n.set(e,s),s+=e.length})),n}}Ye.prototype={deflateInit(e,t){const n=this;return n.dstate=new Qe,t||(t=15),n.dstate.deflateInit(n,e,t)},deflate(e){const t=this;return t.dstate?t.dstate.deflate(t,e):He},deflateEnd(){const e=this;if(!e.dstate)return He;const t=e.dstate.deflateEnd();return e.dstate=null,t},deflateParams(e,t){const n=this;return n.dstate?n.dstate.deflateParams(n,e,t):He},deflateSetDictionary(e,t){const n=this;return n.dstate?n.dstate.deflateSetDictionary(n,e,t):He},read_buf(e,t,n){const i=this;let a=i.avail_in;return a>n&&(a=n),0===a?0:(i.avail_in-=a,e.set(i.next_in.subarray(i.next_in_index,i.next_in_index+a),t),i.next_in_index+=a,i.total_in+=a,a)},flush_pending(){const e=this;let t=e.dstate.pending;t>e.avail_out&&(t=e.avail_out),0!==t&&(e.next_out.set(e.dstate.pending_buf.subarray(e.dstate.pending_out,e.dstate.pending_out+t),e.next_out_index),e.next_out_index+=t,e.dstate.pending_out+=t,e.total_out+=t,e.avail_out-=t,e.dstate.pending-=t,0===e.dstate.pending&&(e.dstate.pending_out=0))}};const $e=-2,et=-3,tt=-5,nt=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],it=[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],at=[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],rt=[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],st=[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],lt=[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],ot=[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 _t(){let e,t,n,i,a,r;function s(e,t,s,l,o,_,d,c,u,f,h){let b,w,p,x,g,y,m,v,k,S,z,C,I,E,T;S=0,g=s;do{n[e[t+S]]++,S++,g--}while(0!==g);if(n[0]==s)return d[0]=-1,c[0]=0,0;for(v=c[0],y=1;15>=y&&0===n[y];y++);for(m=y,y>v&&(v=y),g=15;0!==g&&0===n[g];g--);for(p=g,v>g&&(v=g),c[0]=v,E=1<<y;g>y;y++,E<<=1)if(0>(E-=n[y]))return et;if(0>(E-=n[g]))return et;for(n[g]+=E,r[1]=y=0,S=1,I=2;0!=--g;)r[I]=y+=n[S],I++,S++;g=0,S=0;do{0!==(y=e[t+S])&&(h[r[y]++]=g),S++}while(++g<s);for(s=r[p],r[0]=g=0,S=0,x=-1,C=-v,a[0]=0,z=0,T=0;p>=m;m++)for(b=n[m];0!=b--;){for(;m>C+v;){if(x++,C+=v,T=p-C,T=T>v?v:T,(w=1<<(y=m-C))>b+1&&(w-=b+1,I=m,T>y))for(;++y<T&&(w<<=1)>n[++I];)w-=n[I];if(T=1<<y,f[0]+T>1440)return et;a[x]=z=f[0],f[0]+=T,0!==x?(r[x]=g,i[0]=y,i[1]=v,y=g>>>C-v,i[2]=z-a[x-1]-y,u.set(i,3*(a[x-1]+y))):d[0]=z}for(i[1]=m-C,s>S?h[S]<l?(i[0]=256>h[S]?0:96,i[2]=h[S++]):(i[0]=_[h[S]-l]+16+64,i[2]=o[h[S++]-l]):i[0]=192,w=1<<m-C,y=g>>>C;T>y;y+=w)u.set(i,3*(z+y));for(y=1<<m-1;0!=(g&y);y>>>=1)g^=y;for(g^=y,k=(1<<C)-1;(g&k)!=r[x];)x--,C-=v,k=(1<<C)-1}return 0!==E&&1!=p?tt:0}function o(s){let o;for(e||(e=[],t=[],n=new l(16),i=[],a=new l(15),r=new l(16)),t.length<s&&(t=[]),o=0;s>o;o++)t[o]=0;for(o=0;16>o;o++)n[o]=0;for(o=0;3>o;o++)i[o]=0;a.set(n.subarray(0,15),0),r.set(n.subarray(0,16),0)}this.inflate_trees_bits=(n,i,a,r,l)=>{let _;return o(19),e[0]=0,_=s(n,0,19,19,null,null,a,i,r,e,t),_==et?l.msg="oversubscribed dynamic bit lengths tree":_!=tt&&0!==i[0]||(l.msg="incomplete dynamic bit lengths tree",_=et),_},this.inflate_trees_dynamic=(n,i,a,r,l,_,d,c,u)=>{let f;return o(288),e[0]=0,f=s(a,0,n,257,rt,st,_,r,c,e,t),0!=f||0===r[0]?(f==et?u.msg="oversubscribed literal/length tree":-4!=f&&(u.msg="incomplete literal/length tree",f=et),f):(o(288),f=s(a,n,i,0,lt,ot,d,l,c,e,t),0!=f||0===l[0]&&n>257?(f==et?u.msg="oversubscribed distance tree":f==tt?(u.msg="incomplete distance tree",f=et):-4!=f&&(u.msg="empty distance tree with lengths",f=et),f):0)}}function dt(){const e=this;let t,n,i,a,r=0,s=0,l=0,o=0,_=0,d=0,c=0,u=0,f=0,h=0;function b(e,t,n,i,a,r,s,l){let o,_,d,c,u,f,h,b,w,p,x,g,y,m,v,k;h=l.next_in_index,b=l.avail_in,u=s.bitb,f=s.bitk,w=s.write,p=w<s.read?s.read-w-1:s.end-w,x=nt[e],g=nt[t];do{for(;20>f;)b--,u|=(255&l.read_byte(h++))<<f,f+=8;if(o=u&x,_=n,d=i,k=3*(d+o),0!==(c=_[k]))for(;;){if(u>>=_[k+1],f-=_[k+1],0!=(16&c)){for(c&=15,y=_[k+2]+(u&nt[c]),u>>=c,f-=c;15>f;)b--,u|=(255&l.read_byte(h++))<<f,f+=8;for(o=u&g,_=a,d=r,k=3*(d+o),c=_[k];;){if(u>>=_[k+1],f-=_[k+1],0!=(16&c)){for(c&=15;c>f;)b--,u|=(255&l.read_byte(h++))<<f,f+=8;if(m=_[k+2]+(u&nt[c]),u>>=c,f-=c,p-=y,m>w){v=w-m;do{v+=s.end}while(0>v);if(c=s.end-v,y>c){if(y-=c,w-v>0&&c>w-v)do{s.win[w++]=s.win[v++]}while(0!=--c);else s.win.set(s.win.subarray(v,v+c),w),w+=c,v+=c,c=0;v=0}}else v=w-m,w-v>0&&2>w-v?(s.win[w++]=s.win[v++],s.win[w++]=s.win[v++],y-=2):(s.win.set(s.win.subarray(v,v+2),w),w+=2,v+=2,y-=2);if(w-v>0&&y>w-v)do{s.win[w++]=s.win[v++]}while(0!=--y);else s.win.set(s.win.subarray(v,v+y),w),w+=y,v+=y,y=0;break}if(0!=(64&c))return l.msg="invalid distance code",y=l.avail_in-b,y=y>f>>3?f>>3:y,b+=y,h-=y,f-=y<<3,s.bitb=u,s.bitk=f,l.avail_in=b,l.total_in+=h-l.next_in_index,l.next_in_index=h,s.write=w,et;o+=_[k+2],o+=u&nt[c],k=3*(d+o),c=_[k]}break}if(0!=(64&c))return 0!=(32&c)?(y=l.avail_in-b,y=y>f>>3?f>>3:y,b+=y,h-=y,f-=y<<3,s.bitb=u,s.bitk=f,l.avail_in=b,l.total_in+=h-l.next_in_index,l.next_in_index=h,s.write=w,1):(l.msg="invalid literal/length code",y=l.avail_in-b,y=y>f>>3?f>>3:y,b+=y,h-=y,f-=y<<3,s.bitb=u,s.bitk=f,l.avail_in=b,l.total_in+=h-l.next_in_index,l.next_in_index=h,s.write=w,et);if(o+=_[k+2],o+=u&nt[c],k=3*(d+o),0===(c=_[k])){u>>=_[k+1],f-=_[k+1],s.win[w++]=_[k+2],p--;break}}else u>>=_[k+1],f-=_[k+1],s.win[w++]=_[k+2],p--}while(p>=258&&b>=10);return y=l.avail_in-b,y=y>f>>3?f>>3:y,b+=y,h-=y,f-=y<<3,s.bitb=u,s.bitk=f,l.avail_in=b,l.total_in+=h-l.next_in_index,l.next_in_index=h,s.write=w,0}e.init=(e,r,s,l,o,_)=>{t=0,c=e,u=r,i=s,f=l,a=o,h=_,n=null},e.proc=(e,w,p)=>{let x,g,y,m,v,k,S,z=0,C=0,I=0;for(I=w.next_in_index,m=w.avail_in,z=e.bitb,C=e.bitk,v=e.write,k=v<e.read?e.read-v-1:e.end-v;;)switch(t){case 0:if(k>=258&&m>=10&&(e.bitb=z,e.bitk=C,w.avail_in=m,w.total_in+=I-w.next_in_index,w.next_in_index=I,e.write=v,p=b(c,u,i,f,a,h,e,w),I=w.next_in_index,m=w.avail_in,z=e.bitb,C=e.bitk,v=e.write,k=v<e.read?e.read-v-1:e.end-v,0!=p)){t=1==p?7:9;break}l=c,n=i,s=f,t=1;case 1:for(x=l;x>C;){if(0===m)return e.bitb=z,e.bitk=C,w.avail_in=m,w.total_in+=I-w.next_in_index,w.next_in_index=I,e.write=v,e.inflate_flush(w,p);p=0,m--,z|=(255&w.read_byte(I++))<<C,C+=8}if(g=3*(s+(z&nt[x])),z>>>=n[g+1],C-=n[g+1],y=n[g],0===y){o=n[g+2],t=6;break}if(0!=(16&y)){_=15&y,r=n[g+2],t=2;break}if(0==(64&y)){l=y,s=g/3+n[g+2];break}if(0!=(32&y)){t=7;break}return t=9,w.msg="invalid literal/length code",p=et,e.bitb=z,e.bitk=C,w.avail_in=m,w.total_in+=I-w.next_in_index,w.next_in_index=I,e.write=v,e.inflate_flush(w,p);case 2:for(x=_;x>C;){if(0===m)return e.bitb=z,e.bitk=C,w.avail_in=m,w.total_in+=I-w.next_in_index,w.next_in_index=I,e.write=v,e.inflate_flush(w,p);p=0,m--,z|=(255&w.read_byte(I++))<<C,C+=8}r+=z&nt[x],z>>=x,C-=x,l=u,n=a,s=h,t=3;case 3:for(x=l;x>C;){if(0===m)return e.bitb=z,e.bitk=C,w.avail_in=m,w.total_in+=I-w.next_in_index,w.next_in_index=I,e.write=v,e.inflate_flush(w,p);p=0,m--,z|=(255&w.read_byte(I++))<<C,C+=8}if(g=3*(s+(z&nt[x])),z>>=n[g+1],C-=n[g+1],y=n[g],0!=(16&y)){_=15&y,d=n[g+2],t=4;break}if(0==(64&y)){l=y,s=g/3+n[g+2];break}return t=9,w.msg="invalid distance code",p=et,e.bitb=z,e.bitk=C,w.avail_in=m,w.total_in+=I-w.next_in_index,w.next_in_index=I,e.write=v,e.inflate_flush(w,p);case 4:for(x=_;x>C;){if(0===m)return e.bitb=z,e.bitk=C,w.avail_in=m,w.total_in+=I-w.next_in_index,w.next_in_index=I,e.write=v,e.inflate_flush(w,p);p=0,m--,z|=(255&w.read_byte(I++))<<C,C+=8}d+=z&nt[x],z>>=x,C-=x,t=5;case 5:for(S=v-d;0>S;)S+=e.end;for(;0!==r;){if(0===k&&(v==e.end&&0!==e.read&&(v=0,k=v<e.read?e.read-v-1:e.end-v),0===k&&(e.write=v,p=e.inflate_flush(w,p),v=e.write,k=v<e.read?e.read-v-1:e.end-v,v==e.end&&0!==e.read&&(v=0,k=v<e.read?e.read-v-1:e.end-v),0===k)))return e.bitb=z,e.bitk=C,w.avail_in=m,w.total_in+=I-w.next_in_index,w.next_in_index=I,e.write=v,e.inflate_flush(w,p);e.win[v++]=e.win[S++],k--,S==e.end&&(S=0),r--}t=0;break;case 6:if(0===k&&(v==e.end&&0!==e.read&&(v=0,k=v<e.read?e.read-v-1:e.end-v),0===k&&(e.write=v,p=e.inflate_flush(w,p),v=e.write,k=v<e.read?e.read-v-1:e.end-v,v==e.end&&0!==e.read&&(v=0,k=v<e.read?e.read-v-1:e.end-v),0===k)))return e.bitb=z,e.bitk=C,w.avail_in=m,w.total_in+=I-w.next_in_index,w.next_in_index=I,e.write=v,e.inflate_flush(w,p);p=0,e.win[v++]=o,k--,t=0;break;case 7:if(C>7&&(C-=8,m++,I--),e.write=v,p=e.inflate_flush(w,p),v=e.write,k=v<e.read?e.read-v-1:e.end-v,e.read!=e.write)return e.bitb=z,e.bitk=C,w.avail_in=m,w.total_in+=I-w.next_in_index,w.next_in_index=I,e.write=v,e.inflate_flush(w,p);t=8;case 8:return p=1,e.bitb=z,e.bitk=C,w.avail_in=m,w.total_in+=I-w.next_in_index,w.next_in_index=I,e.write=v,e.inflate_flush(w,p);case 9:return p=et,e.bitb=z,e.bitk=C,w.avail_in=m,w.total_in+=I-w.next_in_index,w.next_in_index=I,e.write=v,e.inflate_flush(w,p);default:return p=$e,e.bitb=z,e.bitk=C,w.avail_in=m,w.total_in+=I-w.next_in_index,w.next_in_index=I,e.write=v,e.inflate_flush(w,p)}},e.free=()=>{}}_t.inflate_trees_fixed=(e,t,n,i)=>(e[0]=9,t[0]=5,n[0]=it,i[0]=at,0);const ct=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function ut(e,t){const n=this;let i,r=0,s=0,o=0,_=0;const d=[0],c=[0],u=new dt;let f=0,h=new l(4320);const b=new _t;n.bitk=0,n.bitb=0,n.win=new a(t),n.end=t,n.read=0,n.write=0,n.reset=(e,t)=>{t&&(t[0]=0),6==r&&u.free(e),r=0,n.bitk=0,n.bitb=0,n.read=n.write=0},n.reset(e,null),n.inflate_flush=(e,t)=>{let i,a,r;return a=e.next_out_index,r=n.read,i=(r>n.write?n.end:n.write)-r,i>e.avail_out&&(i=e.avail_out),0!==i&&t==tt&&(t=0),e.avail_out-=i,e.total_out+=i,e.next_out.set(n.win.subarray(r,r+i),a),a+=i,r+=i,r==n.end&&(r=0,n.write==n.end&&(n.write=0),i=n.write-r,i>e.avail_out&&(i=e.avail_out),0!==i&&t==tt&&(t=0),e.avail_out-=i,e.total_out+=i,e.next_out.set(n.win.subarray(r,r+i),a),a+=i,r+=i),e.next_out_index=a,n.read=r,t},n.proc=(e,t)=>{let a,l,w,p,x,g,y,m;for(p=e.next_in_index,x=e.avail_in,l=n.bitb,w=n.bitk,g=n.write,y=g<n.read?n.read-g-1:n.end-g;;){let v,k,S,z,C,I,E,T;switch(r){case 0:for(;3>w;){if(0===x)return n.bitb=l,n.bitk=w,e.avail_in=x,e.total_in+=p-e.next_in_index,e.next_in_index=p,n.write=g,n.inflate_flush(e,t);t=0,x--,l|=(255&e.read_byte(p++))<<w,w+=8}switch(a=7&l,f=1&a,a>>>1){case 0:l>>>=3,w-=3,a=7&w,l>>>=a,w-=a,r=1;break;case 1:v=[],k=[],S=[[]],z=[[]],_t.inflate_trees_fixed(v,k,S,z),u.init(v[0],k[0],S[0],0,z[0],0),l>>>=3,w-=3,r=6;break;case 2:l>>>=3,w-=3,r=3;break;case 3:return l>>>=3,w-=3,r=9,e.msg="invalid block type",t=et,n.bitb=l,n.bitk=w,e.avail_in=x,e.total_in+=p-e.next_in_index,e.next_in_index=p,n.write=g,n.inflate_flush(e,t)}break;case 1:for(;32>w;){if(0===x)return n.bitb=l,n.bitk=w,e.avail_in=x,e.total_in+=p-e.next_in_index,e.next_in_index=p,n.write=g,n.inflate_flush(e,t);t=0,x--,l|=(255&e.read_byte(p++))<<w,w+=8}if((~l>>>16&65535)!=(65535&l))return r=9,e.msg="invalid stored block lengths",t=et,n.bitb=l,n.bitk=w,e.avail_in=x,e.total_in+=p-e.next_in_index,e.next_in_index=p,n.write=g,n.inflate_flush(e,t);s=65535&l,l=w=0,r=0!==s?2:0!==f?7:0;break;case 2:if(0===x)return n.bitb=l,n.bitk=w,e.avail_in=x,e.total_in+=p-e.next_in_index,e.next_in_index=p,n.write=g,n.inflate_flush(e,t);if(0===y&&(g==n.end&&0!==n.read&&(g=0,y=g<n.read?n.read-g-1:n.end-g),0===y&&(n.write=g,t=n.inflate_flush(e,t),g=n.write,y=g<n.read?n.read-g-1:n.end-g,g==n.end&&0!==n.read&&(g=0,y=g<n.read?n.read-g-1:n.end-g),0===y)))return n.bitb=l,n.bitk=w,e.avail_in=x,e.total_in+=p-e.next_in_index,e.next_in_index=p,n.write=g,n.inflate_flush(e,t);if(t=0,a=s,a>x&&(a=x),a>y&&(a=y),n.win.set(e.read_buf(p,a),g),p+=a,x-=a,g+=a,y-=a,0!=(s-=a))break;r=0!==f?7:0;break;case 3:for(;14>w;){if(0===x)return n.bitb=l,n.bitk=w,e.avail_in=x,e.total_in+=p-e.next_in_index,e.next_in_index=p,n.write=g,n.inflate_flush(e,t);t=0,x--,l|=(255&e.read_byte(p++))<<w,w+=8}if(o=a=16383&l,(31&a)>29||(a>>5&31)>29)return r=9,e.msg="too many length or distance symbols",t=et,n.bitb=l,n.bitk=w,e.avail_in=x,e.total_in+=p-e.next_in_index,e.next_in_index=p,n.write=g,n.inflate_flush(e,t);if(a=258+(31&a)+(a>>5&31),!i||i.length<a)i=[];else for(m=0;a>m;m++)i[m]=0;l>>>=14,w-=14,_=0,r=4;case 4:for(;4+(o>>>10)>_;){for(;3>w;){if(0===x)return n.bitb=l,n.bitk=w,e.avail_in=x,e.total_in+=p-e.next_in_index,e.next_in_index=p,n.write=g,n.inflate_flush(e,t);t=0,x--,l|=(255&e.read_byte(p++))<<w,w+=8}i[ct[_++]]=7&l,l>>>=3,w-=3}for(;19>_;)i[ct[_++]]=0;if(d[0]=7,a=b.inflate_trees_bits(i,d,c,h,e),0!=a)return(t=a)==et&&(i=null,r=9),n.bitb=l,n.bitk=w,e.avail_in=x,e.total_in+=p-e.next_in_index,e.next_in_index=p,n.write=g,n.inflate_flush(e,t);_=0,r=5;case 5:for(;a=o,258+(31&a)+(a>>5&31)>_;){let s,u;for(a=d[0];a>w;){if(0===x)return n.bitb=l,n.bitk=w,e.avail_in=x,e.total_in+=p-e.next_in_index,e.next_in_index=p,n.write=g,n.inflate_flush(e,t);t=0,x--,l|=(255&e.read_byte(p++))<<w,w+=8}if(a=h[3*(c[0]+(l&nt[a]))+1],u=h[3*(c[0]+(l&nt[a]))+2],16>u)l>>>=a,w-=a,i[_++]=u;else{for(m=18==u?7:u-14,s=18==u?11:3;a+m>w;){if(0===x)return n.bitb=l,n.bitk=w,e.avail_in=x,e.total_in+=p-e.next_in_index,e.next_in_index=p,n.write=g,n.inflate_flush(e,t);t=0,x--,l|=(255&e.read_byte(p++))<<w,w+=8}if(l>>>=a,w-=a,s+=l&nt[m],l>>>=m,w-=m,m=_,a=o,m+s>258+(31&a)+(a>>5&31)||16==u&&1>m)return i=null,r=9,e.msg="invalid bit length repeat",t=et,n.bitb=l,n.bitk=w,e.avail_in=x,e.total_in+=p-e.next_in_index,e.next_in_index=p,n.write=g,n.inflate_flush(e,t);u=16==u?i[m-1]:0;do{i[m++]=u}while(0!=--s);_=m}}if(c[0]=-1,C=[],I=[],E=[],T=[],C[0]=9,I[0]=6,a=o,a=b.inflate_trees_dynamic(257+(31&a),1+(a>>5&31),i,C,I,E,T,h,e),0!=a)return a==et&&(i=null,r=9),t=a,n.bitb=l,n.bitk=w,e.avail_in=x,e.total_in+=p-e.next_in_index,e.next_in_index=p,n.write=g,n.inflate_flush(e,t);u.init(C[0],I[0],h,E[0],h,T[0]),r=6;case 6:if(n.bitb=l,n.bitk=w,e.avail_in=x,e.total_in+=p-e.next_in_index,e.next_in_index=p,n.write=g,1!=(t=u.proc(n,e,t)))return n.inflate_flush(e,t);if(t=0,u.free(e),p=e.next_in_index,x=e.avail_in,l=n.bitb,w=n.bitk,g=n.write,y=g<n.read?n.read-g-1:n.end-g,0===f){r=0;break}r=7;case 7:if(n.write=g,t=n.inflate_flush(e,t),g=n.write,y=g<n.read?n.read-g-1:n.end-g,n.read!=n.write)return n.bitb=l,n.bitk=w,e.avail_in=x,e.total_in+=p-e.next_in_index,e.next_in_index=p,n.write=g,n.inflate_flush(e,t);r=8;case 8:return t=1,n.bitb=l,n.bitk=w,e.avail_in=x,e.total_in+=p-e.next_in_index,e.next_in_index=p,n.write=g,n.inflate_flush(e,t);case 9:return t=et,n.bitb=l,n.bitk=w,e.avail_in=x,e.total_in+=p-e.next_in_index,e.next_in_index=p,n.write=g,n.inflate_flush(e,t);default:return t=$e,n.bitb=l,n.bitk=w,e.avail_in=x,e.total_in+=p-e.next_in_index,e.next_in_index=p,n.write=g,n.inflate_flush(e,t)}}},n.free=e=>{n.reset(e,null),n.win=null,h=null},n.set_dictionary=(e,t,i)=>{n.win.set(e.subarray(t,t+i),0),n.read=n.write=i},n.sync_point=()=>1==r?1:0}const ft=13,ht=[0,0,255,255];function bt(){const e=this;function t(e){return e&&e.istate?(e.total_in=e.total_out=0,e.msg=null,e.istate.mode=7,e.istate.blocks.reset(e,null),0):$e}e.mode=0,e.method=0,e.was=[0],e.need=0,e.marker=0,e.wbits=0,e.inflateEnd=t=>(e.blocks&&e.blocks.free(t),e.blocks=null,0),e.inflateInit=(n,i)=>(n.msg=null,e.blocks=null,8>i||i>15?(e.inflateEnd(n),$e):(e.wbits=i,n.istate.blocks=new ut(n,1<<i),t(n),0)),e.inflate=(e,t)=>{let n,i;if(!e||!e.istate||!e.next_in)return $e;const a=e.istate;for(t=4==t?tt:0,n=tt;;)switch(a.mode){case 0:if(0===e.avail_in)return n;if(n=t,e.avail_in--,e.total_in++,8!=(15&(a.method=e.read_byte(e.next_in_index++)))){a.mode=ft,e.msg="unknown compression method",a.marker=5;break}if(8+(a.method>>4)>a.wbits){a.mode=ft,e.msg="invalid win size",a.marker=5;break}a.mode=1;case 1:if(0===e.avail_in)return n;if(n=t,e.avail_in--,e.total_in++,i=255&e.read_byte(e.next_in_index++),((a.method<<8)+i)%31!=0){a.mode=ft,e.msg="incorrect header check",a.marker=5;break}if(0==(32&i)){a.mode=7;break}a.mode=2;case 2:if(0===e.avail_in)return n;n=t,e.avail_in--,e.total_in++,a.need=(255&e.read_byte(e.next_in_index++))<<24&4278190080,a.mode=3;case 3:if(0===e.avail_in)return n;n=t,e.avail_in--,e.total_in++,a.need+=(255&e.read_byte(e.next_in_index++))<<16&16711680,a.mode=4;case 4:if(0===e.avail_in)return n;n=t,e.avail_in--,e.total_in++,a.need+=(255&e.read_byte(e.next_in_index++))<<8&65280,a.mode=5;case 5:return 0===e.avail_in?n:(n=t,e.avail_in--,e.total_in++,a.need+=255&e.read_byte(e.next_in_index++),a.mode=6,2);case 6:return a.mode=ft,e.msg="need dictionary",a.marker=0,$e;case 7:if(n=a.blocks.proc(e,n),n==et){a.mode=ft,a.marker=0;break}if(0==n&&(n=t),1!=n)return n;n=t,a.blocks.reset(e,a.was),a.mode=12;case 12:return e.avail_in=0,1;case ft:return et;default:return $e}},e.inflateSetDictionary=(e,t,n)=>{let i=0,a=n;if(!e||!e.istate||6!=e.istate.mode)return $e;const r=e.istate;return a<1<<r.wbits||(a=(1<<r.wbits)-1,i=n-a),r.blocks.set_dictionary(t,i,a),r.mode=7,0},e.inflateSync=e=>{let n,i,a,r,s;if(!e||!e.istate)return $e;const l=e.istate;if(l.mode!=ft&&(l.mode=ft,l.marker=0),0===(n=e.avail_in))return tt;for(i=e.next_in_index,a=l.marker;0!==n&&4>a;)e.read_byte(i)==ht[a]?a++:a=0!==e.read_byte(i)?0:4-a,i++,n--;return e.total_in+=i-e.next_in_index,e.next_in_index=i,e.avail_in=n,l.marker=a,4!=a?et:(r=e.total_in,s=e.total_out,t(e),e.total_in=r,e.total_out=s,l.mode=7,0)},e.inflateSyncPoint=e=>e&&e.istate&&e.istate.blocks?e.istate.blocks.sync_point():$e}function wt(){}function pt(e){const t=new wt,r=e&&e.chunkSize?n.floor(2*e.chunkSize):131072,s=new a(r);let l=!1;t.inflateInit(),t.next_out=s,this.append=(e,n)=>{const o=[];let _,d,c=0,u=0,f=0;if(0!==e.length){t.next_in_index=0,t.next_in=e,t.avail_in=e.length;do{if(t.next_out_index=0,t.avail_out=r,0!==t.avail_in||l||(t.next_in_index=0,l=!0),_=t.inflate(0),l&&_===tt){if(0!==t.avail_in)throw new i("inflating: bad input")}else if(0!==_&&1!==_)throw new i("inflating: "+t.msg);if((l||1===_)&&t.avail_in===e.length)throw new i("inflating: bad input");t.next_out_index&&(t.next_out_index===r?o.push(new a(s)):o.push(s.slice(0,t.next_out_index))),f+=t.next_out_index,n&&t.next_in_index>0&&t.next_in_index!=c&&(n(t.next_in_index),c=t.next_in_index)}while(t.avail_in>0||0===t.avail_out);return o.length>1?(d=new a(f),o.forEach((e=>{d.set(e,u),u+=e.length}))):d=o[0]||new a,d}},this.flush=()=>{t.inflateEnd()}}wt.prototype={inflateInit(e){const t=this;return t.istate=new bt,e||(e=15),t.istate.inflateInit(t,e)},inflate(e){const t=this;return t.istate?t.istate.inflate(t,e):$e},inflateEnd(){const e=this;if(!e.istate)return $e;const t=e.istate.inflateEnd(e);return e.istate=null,t},inflateSync(){const e=this;return e.istate?e.istate.inflateSync(e):$e},inflateSetDictionary(e,t){const n=this;return n.istate?n.istate.inflateSetDictionary(n,e,t):$e},read_byte(e){return this.next_in[e]},read_buf(e,t){return this.next_in.subarray(e,e+t)}},self.initCodec=()=>{self.Deflate=Ze,self.Inflate=pt}}();