Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@zip.js/zip.js

Package Overview
Dependencies
Maintainers
1
Versions
275
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@zip.js/zip.js - npm Package Compare versions

Comparing version 2.2.0 to 2.2.1

dist/z-worker.js

11

dist/README.md

@@ -1,4 +0,2 @@

# Build scripts of zip.js
## Main script
# Built scripts of zip.js

@@ -23,6 +21,3 @@ - for production (minified):

## Web worker script
| | `zip` API | `zip.fs` API | deflate | inflate | usage |
|---------------------|-----------|--------------|---------|---------|-----------------------------------------------------|
| z-worker-pako.js | | | | | compression/decompression with web workers and pako |
- z-worker.js can be used as a web worker script if the CSP don't allow to load it with a Blob URI
- z-worker-pako.js is the web worker script for using pako

@@ -1,1 +0,1 @@

!function(){"use strict";class t{constructor(){this.crc=-1,this.table=(()=>{const t=[];for(let e=0;e<256;e++){let n=e;for(let t=0;t<8;t++)1&n?n=n>>>1^3988292384:n>>>=1;t[e]=n}return t})()}append(t){const e=this.table;let n=0|this.crc;for(let s=0,i=0|t.length;s<i;s++)n=n>>>8^e[255&(n^t[s])];this.crc=n}get(){return~this.crc}}const e="Invalid pasword",n=16,s="raw",i={name:"PBKDF2"},a={name:"HMAC"},r="SHA-1",c={name:"AES-CTR"},h=Object.assign({hash:a},i),o=Object.assign({iterations:1e3,hash:{name:r}},i),p=Object.assign({hash:r},a),u=Object.assign({length:n},c),d=["deriveBits"],l=["sign"],y=10,g=[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],w=crypto.subtle;class f{constructor(t,e){this.password=t,this.signed=e,this.input=e&&new Uint8Array(0),this.pendingInput=new Uint8Array(0)}async append(t){const s=async(e=0)=>{if(e+n<=a.length-y){const t=a.subarray(e,e+n),r=await w.decrypt(Object.assign({counter:this.counter},u),this.keys.key,t);return U(this.counter),i.set(new Uint8Array(r),e),s(e+n)}return this.pendingInput=a.subarray(e),this.signed&&(this.input=m(this.input,t)),i};if(this.password){const n=t.subarray(0,18);await async function(t,n,s){await A(t,s,n.subarray(0,16),["decrypt"]);const i=n.subarray(16),a=t.keys.passwordVerification;if(a[0]!=i[0]||a[1]!=i[1])throw new Error(e)}(this,n,this.password),this.password=null,t=t.subarray(18)}let i=new Uint8Array(t.length-y-(t.length-y)%n),a=t;return this.pendingInput.length&&(a=m(this.pendingInput,t),i=k(i,a.length-y-(a.length-y)%n)),s()}async flush(){const t=this.pendingInput,e=this.keys,n=t.subarray(0,t.length-y),s=t.subarray(t.length-y);let i=new Uint8Array(0);if(n.length){const t=await w.decrypt(Object.assign({counter:this.counter},u),e.key,n);i=new Uint8Array(t)}let r=!0;if(this.signed){const t=await w.sign(a,e.authentication,this.input.subarray(0,this.input.length-y)),n=new Uint8Array(t);this.input=null;for(let t=0;t<y;t++)n[t]!=s[t]&&(r=!1)}return{valid:r,data:i}}}class b{constructor(t){this.password=t,this.output=new Uint8Array(0),this.pendingInput=new Uint8Array(0)}async append(t){const e=async(a=0)=>{if(a+n<=t.length){const r=t.subarray(a,a+n),c=await w.encrypt(Object.assign({counter:this.counter},u),this.keys.key,r);return U(this.counter),i.set(new Uint8Array(c),a+s.length),e(a+n)}return this.pendingInput=t.subarray(a),this.output=m(this.output,i),i};let s=new Uint8Array(0);this.password&&(s=await async function(t,e){const n=crypto.getRandomValues(new Uint8Array(16));return await A(t,e,n,["encrypt"]),m(n,t.keys.passwordVerification)}(this,this.password),this.password=null);let i=new Uint8Array(s.length+t.length-t.length%n);return i.set(s,0),this.pendingInput.length&&(t=m(this.pendingInput,t),i=k(i,t.length-t.length%n)),e()}async flush(){let t=new Uint8Array(0);if(this.pendingInput.length){const e=await w.encrypt(Object.assign({counter:this.counter},u),this.keys.key,this.pendingInput);t=new Uint8Array(e),this.output=m(this.output,t)}const e=await w.sign(a,this.keys.authentication,this.output.subarray(18));this.output=null;const n=new Uint8Array(e).subarray(0,y);return{data:m(t,n),signature:n}}}async function A(t,e,n,i){t.counter=new Uint8Array(g);const a=(new TextEncoder).encode(e),r=await w.importKey(s,a,h,!1,d),u=await w.deriveBits(Object.assign({salt:n},o),r,528),y=new Uint8Array(u);t.keys={key:await w.importKey(s,y.subarray(0,32),c,!0,i),authentication:await w.importKey(s,y.subarray(32,64),p,!1,l),passwordVerification:y.subarray(64)}}function U(t){for(let e=0;e<16;e++){if(255!=t[e]){t[e]++;break}t[e]=0}}function m(t,e){let n=t;return t.length+e.length&&(n=new Uint8Array(t.length+e.length),n.set(t,0),n.set(e,t.length)),n}function k(t,e){if(e&&e>t.length){const n=t;(t=new Uint8Array(e)).set(n,0)}return t}const D="deflate",I="inflate",C="Invalid signature";class v{constructor(e){this.signature=e.inputSignature,this.encrypted=Boolean(e.inputPassword),this.signed=e.inputSigned,this.compressed=e.inputCompressed,this.inflate=this.compressed&&new e.codecConstructor,this.crc32=this.signed&&this.signed&&new t,this.decrypt=this.encrypted&&new f(e.inputPassword)}async append(t){return this.encrypted&&(t=await this.decrypt.append(t)),this.compressed&&t.length&&(t=await this.inflate.append(t)),!this.encrypted&&this.signed&&this.crc32.append(t),t}async flush(){let t,e=new Uint8Array(0);if(this.encrypted){const t=await this.decrypt.flush();if(!t.valid)throw new Error(C);e=t.data}else if(this.signed){const e=new DataView(new Uint8Array(4).buffer);if(t=this.crc32.get(),e.setUint32(0,t),this.signature!=e.getUint32(0,!1))throw new Error(C)}return this.compressed&&(e=await this.inflate.append(e)||new Uint8Array(0),await this.inflate.flush()),{data:e,signature:t}}}class j{constructor(e){this.encrypted=e.outputEncrypted,this.signed=e.outputSigned,this.compressed=e.outputCompressed,this.deflate=this.compressed&&new e.codecConstructor({level:e.level||5}),this.crc32=this.signed&&new t,this.encrypt=this.encrypted&&new b(e.outputPassword)}async append(t){let e=t;return this.compressed&&t.length&&(e=await this.deflate.append(t)),this.encrypted?e=await this.encrypt.append(e):this.signed&&this.crc32.append(t),e}async flush(){let t,e=new Uint8Array(0);if(this.compressed&&(e=await this.deflate.flush()||new Uint8Array(0)),this.encrypted){e=await this.encrypt.append(e);const n=await this.encrypt.flush();t=n.signature;const s=new Uint8Array(e.length+n.data.length);s.set(e,0),s.set(n.data,e.length),e=s}else this.signed&&(t=this.crc32.get());return{data:e,signature:t}}}const O={init(t){t.scripts&&t.scripts.length&&importScripts.apply(void 0,t.scripts);const e=t.options;self.initCodec&&self.initCodec(),e.codecType.startsWith(D)?e.codecConstructor=self.Deflate:e.codecType.startsWith(I)&&(e.codecConstructor=self.Inflate),E=function(t){return t.codecType.startsWith(D)?new j(t):t.codecType.startsWith(I)?new v(t):void 0}(e)},append:async t=>({data:await E.append(t.data)}),flush:()=>E.flush()};let E;addEventListener("message",(async t=>{const e=t.data,n=e.type,s=O[n];if(s)try{const t=await s(e)||{};if(t.type=n,t.data)try{postMessage(t,[t.data.buffer])}catch(e){postMessage(t)}else postMessage(t)}catch(t){postMessage({type:n,error:{message:t.message,stack:t.stack}})}}));const S="function";function T(t,e){return class{constructor(n){const s=t=>{if(this.pendingData){const e=this.pendingData;this.pendingData=new Uint8Array(e.length+t.length),this.pendingData.set(e,0),this.pendingData.set(t,e.length)}else this.pendingData=new Uint8Array(t)};if(this.codec=new t(Object.assign({},e,n)),typeof this.codec.onData==S)this.codec.onData=s;else{if(typeof this.codec.on!=S)throw new Error("Cannot register the callback function");this.codec.on("data",s)}}async append(t){return this.codec.push(t),n(this)}async flush(){return this.codec.push(new Uint8Array(0),!0),n(this)}};function n(t){if(t.pendingData){const e=t.pendingData;return t.pendingData=null,e}return new Uint8Array(0)}}self.initCodec=()=>{const{Deflate:t,Inflate:e}=((t,e={})=>({Deflate:T(t.Deflate,e.deflate),Inflate:T(t.Inflate,e.inflate)}))(pako,{deflate:{raw:!0},inflate:{raw:!0}});self.Deflate=t,self.Inflate=e}}();
!function(){"use strict";class t{constructor(){this.crc=-1,this.table=(()=>{const t=[];for(let e=0;e<256;e++){let n=e;for(let t=0;t<8;t++)1&n?n=n>>>1^3988292384:n>>>=1;t[e]=n}return t})()}append(t){const e=this.table;let n=0|this.crc;for(let s=0,i=0|t.length;s<i;s++)n=n>>>8^e[255&(n^t[s])];this.crc=n}get(){return~this.crc}}const e="Invalid pasword",n=16,s="raw",i={name:"PBKDF2"},a={name:"HMAC"},r="SHA-1",c={name:"AES-CTR"},h=Object.assign({hash:a},i),o=Object.assign({iterations:1e3,hash:{name:r}},i),p=Object.assign({hash:r},a),u=Object.assign({length:n},c),d=["deriveBits"],l=["sign"],g=[8,12,16],y=[16,24,32],w=10,f=[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],b=crypto.subtle;class A{constructor(t,e,n){this.password=t,this.signed=e,this.strength=n-1,this.input=e&&new Uint8Array(0),this.pendingInput=new Uint8Array(0)}async append(t){const s=async(e=0)=>{if(e+n<=a.length-w){const t=a.subarray(e,e+n),r=await b.decrypt(Object.assign({counter:this.counter},u),this.keys.key,t);return k(this.counter),i.set(new Uint8Array(r),e),s(e+n)}return this.pendingInput=a.subarray(e),this.signed&&(this.input=D(this.input,t)),i};if(this.password){const n=t.subarray(0,g[this.strength]+2);await async function(t,n,s){await m(t,s,n.subarray(0,g[t.strength]),["decrypt"]);const i=n.subarray(g[t.strength]),a=t.keys.passwordVerification;if(a[0]!=i[0]||a[1]!=i[1])throw new Error(e)}(this,n,this.password),this.password=null,t=t.subarray(g[this.strength]+2)}let i=new Uint8Array(t.length-w-(t.length-w)%n),a=t;return this.pendingInput.length&&(a=D(this.pendingInput,t),i=I(i,a.length-w-(a.length-w)%n)),s()}async flush(){const t=this.pendingInput,e=this.keys,n=t.subarray(0,t.length-w),s=t.subarray(t.length-w);let i=new Uint8Array(0);if(n.length){const t=await b.decrypt(Object.assign({counter:this.counter},u),e.key,n);i=new Uint8Array(t)}let r=!0;if(this.signed){const t=await b.sign(a,e.authentication,this.input.subarray(0,this.input.length-w)),n=new Uint8Array(t);this.input=null;for(let t=0;t<w;t++)n[t]!=s[t]&&(r=!1)}return{valid:r,data:i}}}class U{constructor(t,e){this.password=t,this.strength=e-1,this.output=new Uint8Array(0),this.pendingInput=new Uint8Array(0)}async append(t){const e=async(a=0)=>{if(a+n<=t.length){const r=t.subarray(a,a+n),c=await b.encrypt(Object.assign({counter:this.counter},u),this.keys.key,r);return k(this.counter),i.set(new Uint8Array(c),a+s.length),e(a+n)}return this.pendingInput=t.subarray(a),this.output=D(this.output,i),i};let s=new Uint8Array(0);this.password&&(s=await async function(t,e){const n=crypto.getRandomValues(new Uint8Array(g[t.strength]));return await m(t,e,n,["encrypt"]),D(n,t.keys.passwordVerification)}(this,this.password),this.password=null);let i=new Uint8Array(s.length+t.length-t.length%n);return i.set(s,0),this.pendingInput.length&&(t=D(this.pendingInput,t),i=I(i,t.length-t.length%n)),e()}async flush(){let t=new Uint8Array(0);if(this.pendingInput.length){const e=await b.encrypt(Object.assign({counter:this.counter},u),this.keys.key,this.pendingInput);t=new Uint8Array(e),this.output=D(this.output,t)}const e=await b.sign(a,this.keys.authentication,this.output.subarray(g[this.strength]+2));this.output=null;const n=new Uint8Array(e).subarray(0,w);return{data:D(t,n),signature:n}}}async function m(t,e,n,i){t.counter=new Uint8Array(f);const a=(new TextEncoder).encode(e),r=await b.importKey(s,a,h,!1,d),u=await b.deriveBits(Object.assign({salt:n},o),r,8*(2*y[t.strength]+2)),g=new Uint8Array(u);t.keys={key:await b.importKey(s,g.subarray(0,y[t.strength]),c,!0,i),authentication:await b.importKey(s,g.subarray(y[t.strength],2*y[t.strength]),p,!1,l),passwordVerification:g.subarray(2*y[t.strength])}}function k(t){for(let e=0;e<16;e++){if(255!=t[e]){t[e]++;break}t[e]=0}}function D(t,e){let n=t;return t.length+e.length&&(n=new Uint8Array(t.length+e.length),n.set(t,0),n.set(e,t.length)),n}function I(t,e){if(e&&e>t.length){const n=t;(t=new Uint8Array(e)).set(n,0)}return t}const C="deflate",v="inflate",S="Invalid signature";class j{constructor(e){this.signature=e.inputSignature,this.encrypted=Boolean(e.inputPassword),this.signed=e.inputSigned,this.compressed=e.inputCompressed,this.inflate=e.inputCompressed&&new e.codecConstructor,this.crc32=e.inputSigned&&new t,this.decrypt=this.encrypted&&new A(e.inputPassword,e.inputSigned,e.inputEncryptionStrength)}async append(t){return this.encrypted&&(t=await this.decrypt.append(t)),this.compressed&&t.length&&(t=await this.inflate.append(t)),!this.encrypted&&this.signed&&this.crc32.append(t),t}async flush(){let t,e=new Uint8Array(0);if(this.encrypted){const t=await this.decrypt.flush();if(!t.valid)throw new Error(S);e=t.data}else if(this.signed){const e=new DataView(new Uint8Array(4).buffer);if(t=this.crc32.get(),e.setUint32(0,t),this.signature!=e.getUint32(0,!1))throw new Error(S)}return this.compressed&&(e=await this.inflate.append(e)||new Uint8Array(0),await this.inflate.flush()),{data:e,signature:t}}}class E{constructor(e){this.encrypted=e.outputEncrypted,this.signed=e.outputSigned,this.compressed=e.outputCompressed,this.deflate=e.outputCompressed&&new e.codecConstructor({level:e.level||5}),this.crc32=e.outputSigned&&new t,this.encrypt=this.encrypted&&new U(e.outputPassword,e.outputEncryptionStrength)}async append(t){let e=t;return this.compressed&&t.length&&(e=await this.deflate.append(t)),this.encrypted?e=await this.encrypt.append(e):this.signed&&this.crc32.append(t),e}async flush(){let t,e=new Uint8Array(0);if(this.compressed&&(e=await this.deflate.flush()||new Uint8Array(0)),this.encrypted){e=await this.encrypt.append(e);const n=await this.encrypt.flush();t=n.signature;const s=new Uint8Array(e.length+n.data.length);s.set(e,0),s.set(n.data,e.length),e=s}else this.signed&&(t=this.crc32.get());return{data:e,signature:t}}}const O={init(t){t.scripts&&t.scripts.length&&importScripts.apply(void 0,t.scripts);const e=t.options;self.initCodec&&self.initCodec(),e.codecType.startsWith(C)?e.codecConstructor=self.Deflate:e.codecType.startsWith(v)&&(e.codecConstructor=self.Inflate),T=function(t){return t.codecType.startsWith(C)?new E(t):t.codecType.startsWith(v)?new j(t):void 0}(e)},append:async t=>({data:await T.append(t.data)}),flush:()=>T.flush()};let T;addEventListener("message",(async t=>{const e=t.data,n=e.type,s=O[n];if(s)try{const t=await s(e)||{};if(t.type=n,t.data)try{postMessage(t,[t.data.buffer])}catch(e){postMessage(t)}else postMessage(t)}catch(t){postMessage({type:n,error:{message:t.message,stack:t.stack}})}}));const M="function";function V(t,e){return class{constructor(n){const s=t=>{if(this.pendingData){const e=this.pendingData;this.pendingData=new Uint8Array(e.length+t.length),this.pendingData.set(e,0),this.pendingData.set(t,e.length)}else this.pendingData=new Uint8Array(t)};if(this.codec=new t(Object.assign({},e,n)),typeof this.codec.onData==M)this.codec.onData=s;else{if(typeof this.codec.on!=M)throw new Error("Cannot register the callback function");this.codec.on("data",s)}}async append(t){return this.codec.push(t),n(this)}async flush(){return this.codec.push(new Uint8Array(0),!0),n(this)}};function n(t){if(t.pendingData){const e=t.pendingData;return t.pendingData=null,e}return new Uint8Array(0)}}self.initCodec=()=>{const{Deflate:t,Inflate:e}=((t,e={})=>({Deflate:V(t.Deflate,e.deflate),Inflate:V(t.Inflate,e.inflate)}))(pako,{deflate:{raw:!0},inflate:{raw:!0}});self.Deflate=t,self.Inflate=e}}();

@@ -22,3 +22,3 @@ declare module "zip.js" {

export class Reader extends Stream {
public readUint8Array(index: number, length: number): Uint8Array;
public readUint8Array(index: number, length: number): Promise<Uint8Array>;
}

@@ -51,3 +51,3 @@

export class Writer extends Stream {
public writeUint8Array(array: Uint8Array): void;
public writeUint8Array(array: Uint8Array): Promise<void>;
}

@@ -57,3 +57,3 @@

constructor(encoding?: string);
public getData(): Promise<string>;
public getData(): string;
}

@@ -63,3 +63,3 @@

constructor(mimeString?: string);
public getData(): Promise<Blob>;
public getData(): Blob;
}

@@ -69,3 +69,3 @@

constructor(mimeString?: string);
public getData(): Promise<string>;
public getData(): string;
}

@@ -75,3 +75,3 @@

constructor();
public getData(): Promise<Uint8Array>;
public getData(): Uint8Array;
}

@@ -134,2 +134,3 @@

password?: string;
encryptionStrength?: number;
useWebWorkers?: boolean;

@@ -215,3 +216,2 @@ }

export const ERR_ENCRYPTED: string;
export const ERR_UNSUPPORTED_ENCRYPTION: string;
export const ERR_UNSUPPORTED_COMPRESSION: string;

@@ -228,3 +228,4 @@ export const ERR_INVALID_SIGNATURE: string;

export const ERR_INVALID_EXTRAFIELD_DATA: string;
export const ERR_INVALID_ENCRYPTION_STRENGTH: string;
}

@@ -65,3 +65,2 @@ /*

ERR_ENCRYPTED,
ERR_UNSUPPORTED_ENCRYPTION,
ERR_UNSUPPORTED_COMPRESSION,

@@ -77,4 +76,5 @@ ERR_INVALID_SIGNATURE,

ERR_INVALID_EXTRAFIELD_TYPE,
ERR_INVALID_EXTRAFIELD_DATA
ERR_INVALID_EXTRAFIELD_DATA,
ERR_INVALID_ENCRYPTION_STRENGTH
} from "./lib/zip-fs.js";
export { getMimeType };

@@ -112,5 +112,3 @@ /*

if (!workerData.interface) {
if (workerData.scripts) {
workerData.worker = new Worker(new URL(workerData.scripts[0], import.meta.url));
}
workerData.worker = new Worker(new URL(workerData.scripts[0], import.meta.url));
workerData.worker.addEventListener(MESSAGE_EVENT_TYPE, onMessage, false);

@@ -137,2 +135,3 @@ workerData.interface = {

inputPassword: options.inputPassword,
inputEncryptionStrength: options.inputEncryptionStrength,
inputSigned: options.inputSigned,

@@ -144,2 +143,3 @@ inputSignature: options.signature,

outputPassword: options.outputPassword,
outputEncryptionStrength: options.outputEncryptionStrength,
outputSigned: options.outputSigned,

@@ -146,0 +146,0 @@ outputCompressed: options.outputCompressed,

@@ -45,5 +45,5 @@ /*

this.compressed = options.inputCompressed;
this.inflate = this.compressed && new options.codecConstructor();
this.crc32 = this.signed && this.signed && new Crc32();
this.decrypt = this.encrypted && new Decrypt(options.inputPassword);
this.inflate = options.inputCompressed && new options.codecConstructor();
this.crc32 = options.inputSigned && new Crc32();
this.decrypt = this.encrypted && new Decrypt(options.inputPassword, options.inputSigned, options.inputEncryptionStrength);
}

@@ -94,5 +94,5 @@

this.compressed = options.outputCompressed;
this.deflate = this.compressed && new options.codecConstructor({ level: options.level || 5 });
this.crc32 = this.signed && new Crc32();
this.encrypt = this.encrypted && new Encrypt(options.outputPassword);
this.deflate = options.outputCompressed && new options.codecConstructor({ level: options.level || 5 });
this.crc32 = options.outputSigned && new Crc32();
this.encrypt = this.encrypted && new Encrypt(options.outputPassword, options.outputEncryptionStrength);
}

@@ -99,0 +99,0 @@

@@ -46,4 +46,4 @@ /*

const SIGN_USAGE = ["sign"];
const DERIVED_BITS_LENGTH = 528;
const PREAMBULE_LENGTH = 18;
const SALT_LENGTH = [8, 12, 16];
const KEY_LENGTH = [16, 24, 32];
const SIGNATURE_LENGTH = 10;

@@ -55,5 +55,6 @@ const COUNTER_DEFAULT_VALUE = [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];

constructor(password, signed) {
constructor(password, signed, strength) {
this.password = password;
this.signed = signed;
this.strength = strength - 1;
this.input = signed && new Uint8Array(0);

@@ -65,4 +66,4 @@ this.pendingInput = new Uint8Array(0);

const decrypt = async (offset = 0) => {
if (offset + BLOCK_LENGTH <= buferredInput.length - SIGNATURE_LENGTH) {
const chunkToDecrypt = buferredInput.subarray(offset, offset + BLOCK_LENGTH);
if (offset + BLOCK_LENGTH <= bufferedInput.length - SIGNATURE_LENGTH) {
const chunkToDecrypt = bufferedInput.subarray(offset, offset + BLOCK_LENGTH);
const outputChunk = await subtle.decrypt(Object.assign({ counter: this.counter }, CRYPTO_ALGORITHM), this.keys.key, chunkToDecrypt);

@@ -73,3 +74,3 @@ incrementCounter(this.counter);

} else {
this.pendingInput = buferredInput.subarray(offset);
this.pendingInput = bufferedInput.subarray(offset);
if (this.signed) {

@@ -83,12 +84,12 @@ this.input = concat(this.input, input);

if (this.password) {
const preambule = input.subarray(0, PREAMBULE_LENGTH);
const preambule = input.subarray(0, SALT_LENGTH[this.strength] + 2);
await createDecryptionKeys(this, preambule, this.password);
this.password = null;
input = input.subarray(PREAMBULE_LENGTH);
input = input.subarray(SALT_LENGTH[this.strength] + 2);
}
let output = new Uint8Array(input.length - SIGNATURE_LENGTH - ((input.length - SIGNATURE_LENGTH) % BLOCK_LENGTH));
let buferredInput = input;
let bufferedInput = input;
if (this.pendingInput.length) {
buferredInput = concat(this.pendingInput, input);
output = expand(output, buferredInput.length - SIGNATURE_LENGTH - ((buferredInput.length - SIGNATURE_LENGTH) % BLOCK_LENGTH));
bufferedInput = concat(this.pendingInput, input);
output = expand(output, bufferedInput.length - SIGNATURE_LENGTH - ((bufferedInput.length - SIGNATURE_LENGTH) % BLOCK_LENGTH));
}

@@ -129,4 +130,5 @@ return decrypt();

constructor(password) {
constructor(password, strength) {
this.password = password;
this.strength = strength - 1;
this.output = new Uint8Array(0);

@@ -172,3 +174,3 @@ this.pendingInput = new Uint8Array(0);

}
const signature = await subtle.sign(SIGNATURE_ALGORITHM, this.keys.authentication, this.output.subarray(PREAMBULE_LENGTH));
const signature = await subtle.sign(SIGNATURE_ALGORITHM, this.keys.authentication, this.output.subarray(SALT_LENGTH[this.strength] + 2));
this.output = null;

@@ -190,4 +192,4 @@ const signatureArray = new Uint8Array(signature).subarray(0, SIGNATURE_LENGTH);

async function createDecryptionKeys(decrypt, preambuleArray, password) {
await createKeys(decrypt, password, preambuleArray.subarray(0, 16), ["decrypt"]);
const passwordVerification = preambuleArray.subarray(16);
await createKeys(decrypt, password, preambuleArray.subarray(0, SALT_LENGTH[decrypt.strength]), ["decrypt"]);
const passwordVerification = preambuleArray.subarray(SALT_LENGTH[decrypt.strength]);
const passwordVerificationKey = decrypt.keys.passwordVerification;

@@ -200,3 +202,3 @@ if (passwordVerificationKey[0] != passwordVerification[0] || passwordVerificationKey[1] != passwordVerification[1]) {

async function createEncryptionKeys(encrypt, password) {
const salt = crypto.getRandomValues(new Uint8Array(16));
const salt = crypto.getRandomValues(new Uint8Array(SALT_LENGTH[encrypt.strength]));
await createKeys(encrypt, password, salt, ["encrypt"]);

@@ -210,8 +212,8 @@ return concat(salt, encrypt.keys.passwordVerification);

const basekey = await subtle.importKey(RAW_FORMAT, encodedPassword, BASE_KEY_ALGORITHM, false, DERIVED_BITS_USAGE);
const derivedBits = await subtle.deriveBits(Object.assign({ salt }, DERIVED_BITS_ALGORITHM), basekey, DERIVED_BITS_LENGTH);
const derivedBits = await subtle.deriveBits(Object.assign({ salt }, DERIVED_BITS_ALGORITHM), basekey, 8 * ((KEY_LENGTH[target.strength] * 2) + 2));
const compositeKey = new Uint8Array(derivedBits);
target.keys = {
key: await subtle.importKey(RAW_FORMAT, compositeKey.subarray(0, 32), CRYPTO_KEY_ALGORITHM, true, keyUsage),
authentication: await subtle.importKey(RAW_FORMAT, compositeKey.subarray(32, 64), AUTHENTICATION_ALGORITHM, false, SIGN_USAGE),
passwordVerification: compositeKey.subarray(64)
key: await subtle.importKey(RAW_FORMAT, compositeKey.subarray(0, KEY_LENGTH[target.strength]), CRYPTO_KEY_ALGORITHM, true, keyUsage),
authentication: await subtle.importKey(RAW_FORMAT, compositeKey.subarray(KEY_LENGTH[target.strength], KEY_LENGTH[target.strength] * 2), AUTHENTICATION_ALGORITHM, false, SIGN_USAGE),
passwordVerification: compositeKey.subarray(KEY_LENGTH[target.strength] * 2)
};

@@ -218,0 +220,0 @@ }

@@ -43,3 +43,3 @@ /*

init() {
async init() {
this.initialized = true;

@@ -53,3 +53,3 @@ }

writeUint8Array(array) {
async writeUint8Array(array) {
this.size += array.length;

@@ -66,4 +66,4 @@ }

init() {
super.init();
async init() {
await super.init();
this.blobReader.init();

@@ -73,3 +73,3 @@ this.size = this.blobReader.size;

readUint8Array(offset, length) {
async readUint8Array(offset, length) {
return this.blobReader.readUint8Array(offset, length);

@@ -87,4 +87,4 @@ }

writeUint8Array(array) {
super.writeUint8Array(array);
async writeUint8Array(array) {
await super.writeUint8Array(array);
this.blob = new Blob([this.blob, array.buffer], { type: TEXT_PLAIN });

@@ -116,3 +116,3 @@ }

readUint8Array(offset, length) {
async readUint8Array(offset, length) {
const dataArray = new Uint8Array(length);

@@ -137,4 +137,4 @@ const start = Math.floor(offset / 3) * 4;

writeUint8Array(array) {
super.writeUint8Array(array);
async writeUint8Array(array) {
await super.writeUint8Array(array);
let indexArray = 0, dataString = this.pending;

@@ -169,3 +169,3 @@ const delta = this.pending.length;

readUint8Array(offset, length) {
async readUint8Array(offset, length) {
const reader = new FileReader();

@@ -189,4 +189,4 @@ return new Promise((resolve, reject) => {

writeUint8Array(array) {
super.writeUint8Array(array);
async writeUint8Array(array) {
await super.writeUint8Array(array);
this.blob = new Blob([this.blob, array.buffer], { type: this.contentType });

@@ -209,3 +209,3 @@ this.offset = this.blob.size;

async init() {
super.init();
await super.init();
if (isHttpFamily(this.url)) {

@@ -250,4 +250,4 @@ return new Promise((resolve, reject) => {

init() {
super.init();
async init() {
await super.init();
return new Promise((resolve, reject) => {

@@ -273,3 +273,3 @@ const request = new XMLHttpRequest();

readUint8Array(index, length) {
async readUint8Array(index, length) {
return new Promise((resolve, reject) => {

@@ -301,3 +301,3 @@ const request = new XMLHttpRequest();

readUint8Array(index, length) {
async readUint8Array(index, length) {
return this.array.slice(index, index + length);

@@ -314,4 +314,4 @@ }

writeUint8Array(array) {
super.writeUint8Array(array);
async writeUint8Array(array) {
await super.writeUint8Array(array);
const previousArray = this.array;

@@ -318,0 +318,0 @@ this.array = new Uint8Array(previousArray.length + array.length);

@@ -70,3 +70,2 @@ /*

ERR_ENCRYPTED,
ERR_UNSUPPORTED_ENCRYPTION,
ERR_UNSUPPORTED_COMPRESSION,

@@ -84,3 +83,4 @@ ERR_INVALID_SIGNATURE,

ERR_INVALID_EXTRAFIELD_TYPE,
ERR_INVALID_EXTRAFIELD_DATA
ERR_INVALID_EXTRAFIELD_DATA,
ERR_INVALID_ENCRYPTION_STRENGTH
} from "./zip-writer.js";

@@ -87,0 +87,0 @@ export {

@@ -345,6 +345,4 @@ /*

} else {
let index = 0;
for (const child of entry.children) {
await processChild(child, index);
index++;
await processChild(child);
}

@@ -351,0 +349,0 @@ }

@@ -73,3 +73,2 @@ /*

const ERR_ENCRYPTED = "File contains encrypted entry";
const ERR_UNSUPPORTED_ENCRYPTION = "Encryption not supported";
const ERR_UNSUPPORTED_COMPRESSION = "Compression method not supported";

@@ -171,3 +170,2 @@ const CHARSET_UTF8 = "utf-8";

ERR_ENCRYPTED,
ERR_UNSUPPORTED_ENCRYPTION,
ERR_UNSUPPORTED_COMPRESSION,

@@ -194,3 +192,3 @@ ERR_INVALID_SIGNATURE,

const password = options.password === undefined ? this.options.password : options.password;
let inputPassword = password && password.length && password;
const inputPassword = password && password.length && password;
if (this.extraFieldAES) {

@@ -200,5 +198,2 @@ if (this.extraFieldAES.originalCompressionMethod != COMPRESSION_METHOD_AES) {

}
if (this.extraFieldAES.strength != 3) {
throw new Error(ERR_UNSUPPORTED_ENCRYPTION);
}
}

@@ -224,2 +219,3 @@ if (this.compressionMethod != COMPRESSION_METHOD_STORE && this.compressionMethod != COMPRESSION_METHOD_DEFLATE) {

inputPassword,
inputEncryptionStrength: this.extraFieldAES && this.extraFieldAES.strength,
inputSigned: options.checkSignature === undefined ? this.options.checkSignature : options.checkSignature,

@@ -226,0 +222,0 @@ inputSignature: this.signature,

@@ -70,2 +70,3 @@ /*

const ERR_INVALID_DATE = "The minimum year for the date is 1980";
const ERR_INVALID_ENCRYPTION_STRENGTH = "The strength must equal 1, 2, or 3";
const ERR_INVALID_EXTRAFIELD_TYPE = "Extra field type exceeds 65535";

@@ -112,2 +113,7 @@ const ERR_INVALID_EXTRAFIELD_DATA = "Extra field data exceeds 64KB";

}
const password = options.password === undefined ? this.options.password : options.password;
const encryptionStrength = (options.encryptionStrength === undefined ? this.options.encryptionStrength : options.encryptionStrength) || 3;
if (password !== undefined && encryptionStrength !== undefined && (encryptionStrength < 1 || encryptionStrength > 3)) {
throw new Error(ERR_INVALID_ENCRYPTION_STRENGTH);
}
if (reader && !reader.initialized) {

@@ -136,6 +142,6 @@ await reader.init();

const zip64 = options.zip64 || this.options.zip64 || this.offset >= MAX_32_BITS || (reader && (reader.size >= MAX_32_BITS || this.offset + reader.size >= MAX_32_BITS));
const password = options.password === undefined ? this.options.password : options.password;
const level = options.level === undefined ? this.options.level : options.level;
const useWebWorkers = options.useWebWorkers === undefined ? this.options.useWebWorkers : options.useWebWorkers;
const fileEntry = await addFile(this, name, reader, Object.assign({}, options, { rawFilename, rawComment, version, lastModDate, rawExtraField, zip64, password, level, useWebWorkers }));
const fileEntry = await addFile(this, name, reader, Object.assign({}, options,
{ rawFilename, rawComment, version, lastModDate, rawExtraField, zip64, password, level, useWebWorkers, encryptionStrength }));
fileEntry.filename = name;

@@ -151,2 +157,8 @@ fileEntry.comment = comment;

let offset = 0, directoryDataLength = 0, directoryOffset = this.offset, filesLength = files.size;
for (const [, fileEntry] of files) {
directoryDataLength += 46 + fileEntry.rawFilename.length + fileEntry.rawComment.length + fileEntry.rawExtraFieldZip64.length + fileEntry.rawExtraFieldAES.length + fileEntry.rawExtraField.length;
}
const zip64 = this.options.zip64 || directoryOffset + directoryDataLength >= MAX_32_BITS || filesLength >= MAX_16_BITS;
const directoryArray = new Uint8Array(directoryDataLength + (zip64 ? ZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH : END_OF_CENTRAL_DIR_LENGTH));
const directoryView = new DataView(directoryArray.buffer);
if (comment.length) {

@@ -160,8 +172,2 @@ if (comment.length <= MAX_16_BITS) {

for (const [, fileEntry] of files) {
directoryDataLength += 46 + fileEntry.rawFilename.length + fileEntry.rawComment.length + fileEntry.rawExtraFieldZip64.length + fileEntry.rawExtraFieldAES.length + fileEntry.rawExtraField.length;
}
const zip64 = this.options.zip64 || directoryOffset + directoryDataLength >= MAX_32_BITS || filesLength >= MAX_16_BITS;
const directoryArray = new Uint8Array(directoryDataLength + (zip64 ? ZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH : END_OF_CENTRAL_DIR_LENGTH));
const directoryView = new DataView(directoryArray.buffer);
for (const [, fileEntry] of files) {
const rawFilename = fileEntry.rawFilename;

@@ -227,3 +233,4 @@ const rawExtraFieldZip64 = fileEntry.rawExtraFieldZip64;

ERR_INVALID_EXTRAFIELD_TYPE,
ERR_INVALID_EXTRAFIELD_DATA
ERR_INVALID_EXTRAFIELD_DATA,
ERR_INVALID_ENCRYPTION_STRENGTH
};

@@ -240,3 +247,3 @@

fileWriter = new Uint8ArrayWriter();
fileWriter.init();
await fileWriter.init();
} else {

@@ -284,3 +291,3 @@ zipWriter.lockWrite = new Promise(resolve => resolveLockWrite = resolve);

const zip64 = options.zip64;
let rawExtraFieldAES;
let rawExtraFieldAES, outputEncryptionStrength;
if (outputEncrypted) {

@@ -291,2 +298,4 @@ rawExtraFieldAES = new Uint8Array(EXTRAFIELD_DATA_AES.length + 2);

rawExtraFieldAES.set(EXTRAFIELD_DATA_AES, 2);
outputEncryptionStrength = options.encryptionStrength;
setUint8(extraFieldAESView, 8, outputEncryptionStrength);
} else {

@@ -346,2 +355,3 @@ rawExtraFieldAES = new Uint8Array(0);

outputPassword,
outputEncryptionStrength,
outputSigned: true,

@@ -348,0 +358,0 @@ outputCompressed,

@@ -1,1 +0,1 @@

import{configure as t}from"./core/zip-core.js";function e(){const e=URL.createObjectURL(new Blob(['\n\nclass t{constructor(){this.crc=-1,this.table=(()=>{const t=[];for(let e=0;e<256;e++){let n=e;for(let t=0;t<8;t++)1&n?n=n>>>1^3988292384:n>>>=1;t[e]=n;}return t})();}append(t){const e=this.table;let n=0|this.crc;for(let i=0,a=0|t.length;i<a;i++)n=n>>>8^e[255&(n^t[i])];this.crc=n;}get(){return ~this.crc}}const e={name:"PBKDF2"},n={name:"HMAC"},i={name:"AES-CTR"},a=Object.assign({hash:n},e),r=Object.assign({iterations:1e3,hash:{name:"SHA-1"}},e),s=Object.assign({hash:"SHA-1"},n),l=Object.assign({length:16},i),o=["deriveBits"],_=["sign"],d=[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],u=crypto.subtle;class f{constructor(t,e){this.password=t,this.signed=e,this.input=e&&new Uint8Array(0),this.pendingInput=new Uint8Array(0);}async append(t){const e=async(a=0)=>{if(a+16<=i.length-10){const t=i.subarray(a,a+16),r=await u.decrypt(Object.assign({counter:this.counter},l),this.keys.key,t);return b(this.counter),n.set(new Uint8Array(r),a),e(a+16)}return this.pendingInput=i.subarray(a),this.signed&&(this.input=w(this.input,t)),n};if(this.password){const e=t.subarray(0,18);await async function(t,e,n){await h(t,n,e.subarray(0,16),["decrypt"]);const i=e.subarray(16),a=t.keys.passwordVerification;if(a[0]!=i[0]||a[1]!=i[1])throw new Error("Invalid pasword")}(this,e,this.password),this.password=null,t=t.subarray(18);}let n=new Uint8Array(t.length-10-(t.length-10)%16),i=t;return this.pendingInput.length&&(i=w(this.pendingInput,t),n=x(n,i.length-10-(i.length-10)%16)),e()}async flush(){const t=this.pendingInput,e=this.keys,i=t.subarray(0,t.length-10),a=t.subarray(t.length-10);let r=new Uint8Array(0);if(i.length){const t=await u.decrypt(Object.assign({counter:this.counter},l),e.key,i);r=new Uint8Array(t);}let s=!0;if(this.signed){const t=await u.sign(n,e.authentication,this.input.subarray(0,this.input.length-10)),i=new Uint8Array(t);this.input=null;for(let t=0;t<10;t++)i[t]!=a[t]&&(s=!1);}return {valid:s,data:r}}}class c{constructor(t){this.password=t,this.output=new Uint8Array(0),this.pendingInput=new Uint8Array(0);}async append(t){const e=async(a=0)=>{if(a+16<=t.length){const r=t.subarray(a,a+16),s=await u.encrypt(Object.assign({counter:this.counter},l),this.keys.key,r);return b(this.counter),i.set(new Uint8Array(s),a+n.length),e(a+16)}return this.pendingInput=t.subarray(a),this.output=w(this.output,i),i};let n=new Uint8Array(0);this.password&&(n=await async function(t,e){const n=crypto.getRandomValues(new Uint8Array(16));return await h(t,e,n,["encrypt"]),w(n,t.keys.passwordVerification)}(this,this.password),this.password=null);let i=new Uint8Array(n.length+t.length-t.length%16);return i.set(n,0),this.pendingInput.length&&(t=w(this.pendingInput,t),i=x(i,t.length-t.length%16)),e()}async flush(){let t=new Uint8Array(0);if(this.pendingInput.length){const e=await u.encrypt(Object.assign({counter:this.counter},l),this.keys.key,this.pendingInput);t=new Uint8Array(e),this.output=w(this.output,t);}const e=await u.sign(n,this.keys.authentication,this.output.subarray(18));this.output=null;const i=new Uint8Array(e).subarray(0,10);return {data:w(t,i),signature:i}}}async function h(t,e,n,l){t.counter=new Uint8Array(d);const f=(new TextEncoder).encode(e),c=await u.importKey("raw",f,a,!1,o),h=await u.deriveBits(Object.assign({salt:n},r),c,528),b=new Uint8Array(h);t.keys={key:await u.importKey("raw",b.subarray(0,32),i,!0,l),authentication:await u.importKey("raw",b.subarray(32,64),s,!1,_),passwordVerification:b.subarray(64)};}function b(t){for(let e=0;e<16;e++){if(255!=t[e]){t[e]++;break}t[e]=0;}}function w(t,e){let n=t;return t.length+e.length&&(n=new Uint8Array(t.length+e.length),n.set(t,0),n.set(e,t.length)),n}function x(t,e){if(e&&e>t.length){const n=t;(t=new Uint8Array(e)).set(n,0);}return t}class p{constructor(e){this.signature=e.inputSignature,this.encrypted=Boolean(e.inputPassword),this.signed=e.inputSigned,this.compressed=e.inputCompressed,this.inflate=this.compressed&&new e.codecConstructor,this.crc32=this.signed&&this.signed&&new t,this.decrypt=this.encrypted&&new f(e.inputPassword);}async append(t){return this.encrypted&&(t=await this.decrypt.append(t)),this.compressed&&t.length&&(t=await this.inflate.append(t)),!this.encrypted&&this.signed&&this.crc32.append(t),t}async flush(){let t,e=new Uint8Array(0);if(this.encrypted){const t=await this.decrypt.flush();if(!t.valid)throw new Error("Invalid signature");e=t.data;}else if(this.signed){const e=new DataView(new Uint8Array(4).buffer);if(t=this.crc32.get(),e.setUint32(0,t),this.signature!=e.getUint32(0,!1))throw new Error("Invalid signature")}return this.compressed&&(e=await this.inflate.append(e)||new Uint8Array(0),await this.inflate.flush()),{data:e,signature:t}}}class y{constructor(e){this.encrypted=e.outputEncrypted,this.signed=e.outputSigned,this.compressed=e.outputCompressed,this.deflate=this.compressed&&new e.codecConstructor({level:e.level||5}),this.crc32=this.signed&&new t,this.encrypt=this.encrypted&&new c(e.outputPassword);}async append(t){let e=t;return this.compressed&&t.length&&(e=await this.deflate.append(t)),this.encrypted?e=await this.encrypt.append(e):this.signed&&this.crc32.append(t),e}async flush(){let t,e=new Uint8Array(0);if(this.compressed&&(e=await this.deflate.flush()||new Uint8Array(0)),this.encrypted){e=await this.encrypt.append(e);const n=await this.encrypt.flush();t=n.signature;const i=new Uint8Array(e.length+n.data.length);i.set(e,0),i.set(n.data,e.length),e=i;}else this.signed&&(t=this.crc32.get());return {data:e,signature:t}}}const g={init(t){t.scripts&&t.scripts.length&&importScripts.apply(void 0,t.scripts);const e=t.options;self.initCodec&&self.initCodec(),e.codecType.startsWith("deflate")?e.codecConstructor=self.Deflate:e.codecType.startsWith("inflate")&&(e.codecConstructor=self.Inflate),v=function(t){return t.codecType.startsWith("deflate")?new y(t):t.codecType.startsWith("inflate")?new p(t):void 0}(e);},append:async t=>({data:await v.append(t.data)}),flush:()=>v.flush()};let v;addEventListener("message",(async t=>{const e=t.data,n=e.type,i=g[n];if(i)try{const t=await i(e)||{};if(t.type=n,t.data)try{postMessage(t,[t.data.buffer]);}catch(e){postMessage(t);}else postMessage(t);}catch(t){postMessage({type:n,error:{message:t.message,stack:t.stack}});}}));const m=[0,1,2,3,4,4,5,5,6,6,6,6,7,7,7,7,8,8,8,8,8,8,8,8,9,9,9,9,9,9,9,9,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,0,0,16,17,18,18,19,19,20,20,20,20,21,21,21,21,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29];function k(){const t=this;function e(t,e){let n=0;do{n|=1&t,t>>>=1,n<<=1;}while(--e>0);return n>>>1}t.build_tree=function(n){const i=t.dyn_tree,a=t.stat_desc.static_tree,r=t.stat_desc.elems;let s,l,o,_=-1;for(n.heap_len=0,n.heap_max=573,s=0;s<r;s++)0!==i[2*s]?(n.heap[++n.heap_len]=_=s,n.depth[s]=0):i[2*s+1]=0;for(;n.heap_len<2;)o=n.heap[++n.heap_len]=_<2?++_:0,i[2*o]=1,n.depth[o]=0,n.opt_len--,a&&(n.static_len-=a[2*o+1]);for(t.max_code=_,s=Math.floor(n.heap_len/2);s>=1;s--)n.pqdownheap(i,s);o=r;do{s=n.heap[1],n.heap[1]=n.heap[n.heap_len--],n.pqdownheap(i,1),l=n.heap[1],n.heap[--n.heap_max]=s,n.heap[--n.heap_max]=l,i[2*o]=i[2*s]+i[2*l],n.depth[o]=Math.max(n.depth[s],n.depth[l])+1,i[2*s+1]=i[2*l+1]=o,n.heap[1]=o++,n.pqdownheap(i,1);}while(n.heap_len>=2);n.heap[--n.heap_max]=n.heap[1],function(e){const n=t.dyn_tree,i=t.stat_desc.static_tree,a=t.stat_desc.extra_bits,r=t.stat_desc.extra_base,s=t.stat_desc.max_length;let l,o,_,d,u,f,c=0;for(d=0;d<=15;d++)e.bl_count[d]=0;for(n[2*e.heap[e.heap_max]+1]=0,l=e.heap_max+1;l<573;l++)o=e.heap[l],d=n[2*n[2*o+1]+1]+1,d>s&&(d=s,c++),n[2*o+1]=d,o>t.max_code||(e.bl_count[d]++,u=0,o>=r&&(u=a[o-r]),f=n[2*o],e.opt_len+=f*(d+u),i&&(e.static_len+=f*(i[2*o+1]+u)));if(0!==c){do{for(d=s-1;0===e.bl_count[d];)d--;e.bl_count[d]--,e.bl_count[d+1]+=2,e.bl_count[s]--,c-=2;}while(c>0);for(d=s;0!==d;d--)for(o=e.bl_count[d];0!==o;)_=e.heap[--l],_>t.max_code||(n[2*_+1]!=d&&(e.opt_len+=(d-n[2*_+1])*n[2*_],n[2*_+1]=d),o--);}}(n),function(t,n,i){const a=[];let r,s,l,o=0;for(r=1;r<=15;r++)a[r]=o=o+i[r-1]<<1;for(s=0;s<=n;s++)l=t[2*s+1],0!==l&&(t[2*s]=e(a[l]++,l));}(i,t.max_code,n.bl_count);};}function A(t,e,n,i,a){const r=this;r.static_tree=t,r.extra_bits=e,r.extra_base=n,r.elems=i,r.max_length=a;}k._length_code=[0,1,2,3,4,5,6,7,8,8,9,9,10,10,11,11,12,12,12,12,13,13,13,13,14,14,14,14,15,15,15,15,16,16,16,16,16,16,16,16,17,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,28],k.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],k.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],k.d_code=function(t){return t<256?m[t]:m[256+(t>>>7)]},k.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],k.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],k.extra_blbits=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],k.bl_order=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],A.static_ltree=[12,8,140,8,76,8,204,8,44,8,172,8,108,8,236,8,28,8,156,8,92,8,220,8,60,8,188,8,124,8,252,8,2,8,130,8,66,8,194,8,34,8,162,8,98,8,226,8,18,8,146,8,82,8,210,8,50,8,178,8,114,8,242,8,10,8,138,8,74,8,202,8,42,8,170,8,106,8,234,8,26,8,154,8,90,8,218,8,58,8,186,8,122,8,250,8,6,8,134,8,70,8,198,8,38,8,166,8,102,8,230,8,22,8,150,8,86,8,214,8,54,8,182,8,118,8,246,8,14,8,142,8,78,8,206,8,46,8,174,8,110,8,238,8,30,8,158,8,94,8,222,8,62,8,190,8,126,8,254,8,1,8,129,8,65,8,193,8,33,8,161,8,97,8,225,8,17,8,145,8,81,8,209,8,49,8,177,8,113,8,241,8,9,8,137,8,73,8,201,8,41,8,169,8,105,8,233,8,25,8,153,8,89,8,217,8,57,8,185,8,121,8,249,8,5,8,133,8,69,8,197,8,37,8,165,8,101,8,229,8,21,8,149,8,85,8,213,8,53,8,181,8,117,8,245,8,13,8,141,8,77,8,205,8,45,8,173,8,109,8,237,8,29,8,157,8,93,8,221,8,61,8,189,8,125,8,253,8,19,9,275,9,147,9,403,9,83,9,339,9,211,9,467,9,51,9,307,9,179,9,435,9,115,9,371,9,243,9,499,9,11,9,267,9,139,9,395,9,75,9,331,9,203,9,459,9,43,9,299,9,171,9,427,9,107,9,363,9,235,9,491,9,27,9,283,9,155,9,411,9,91,9,347,9,219,9,475,9,59,9,315,9,187,9,443,9,123,9,379,9,251,9,507,9,7,9,263,9,135,9,391,9,71,9,327,9,199,9,455,9,39,9,295,9,167,9,423,9,103,9,359,9,231,9,487,9,23,9,279,9,151,9,407,9,87,9,343,9,215,9,471,9,55,9,311,9,183,9,439,9,119,9,375,9,247,9,503,9,15,9,271,9,143,9,399,9,79,9,335,9,207,9,463,9,47,9,303,9,175,9,431,9,111,9,367,9,239,9,495,9,31,9,287,9,159,9,415,9,95,9,351,9,223,9,479,9,63,9,319,9,191,9,447,9,127,9,383,9,255,9,511,9,0,7,64,7,32,7,96,7,16,7,80,7,48,7,112,7,8,7,72,7,40,7,104,7,24,7,88,7,56,7,120,7,4,7,68,7,36,7,100,7,20,7,84,7,52,7,116,7,3,8,131,8,67,8,195,8,35,8,163,8,99,8,227,8],A.static_dtree=[0,5,16,5,8,5,24,5,4,5,20,5,12,5,28,5,2,5,18,5,10,5,26,5,6,5,22,5,14,5,30,5,1,5,17,5,9,5,25,5,5,5,21,5,13,5,29,5,3,5,19,5,11,5,27,5,7,5,23,5],A.static_l_desc=new A(A.static_ltree,k.extra_lbits,257,286,15),A.static_d_desc=new A(A.static_dtree,k.extra_dbits,0,30,15),A.static_bl_desc=new A(null,k.extra_blbits,0,19,7);function U(t,e,n,i,a){const r=this;r.good_length=t,r.max_lazy=e,r.nice_length=n,r.max_chain=i,r.func=a;}const I=[new U(0,0,0,0,0),new U(4,4,8,4,1),new U(4,5,16,8,1),new U(4,6,32,32,1),new U(4,4,16,16,2),new U(8,16,32,32,2),new U(8,16,128,128,2),new U(8,32,128,256,2),new U(32,128,258,1024,2),new U(32,258,258,4096,2)],E=["need dictionary","stream end","","","stream error","data error","","buffer error","",""];function S(t,e,n,i){const a=t[2*e],r=t[2*n];return a<r||a==r&&i[e]<=i[n]}function C(){const t=this;let e,n,i,a,r,s,l,o,_,d,u,f,c,h,b,w,x,p,y,g,v,m,U,C,M,D,j,O,P,T,V,q,z;const B=new k,K=new k,W=new k;let H,R,F,L,G,J,N,Q;function X(){let e;for(e=0;e<286;e++)V[2*e]=0;for(e=0;e<30;e++)q[2*e]=0;for(e=0;e<19;e++)z[2*e]=0;V[512]=1,t.opt_len=t.static_len=0,F=G=0;}function Y(t,e){let n,i=-1,a=t[1],r=0,s=7,l=4;0===a&&(s=138,l=3),t[2*(e+1)+1]=65535;for(let o=0;o<=e;o++)n=a,a=t[2*(o+1)+1],++r<s&&n==a||(r<l?z[2*n]+=r:0!==n?(n!=i&&z[2*n]++,z[32]++):r<=10?z[34]++:z[36]++,r=0,i=n,0===a?(s=138,l=3):n==a?(s=6,l=3):(s=7,l=4));}function Z(e){t.pending_buf[t.pending++]=e;}function $(t){Z(255&t),Z(t>>>8&255);}function tt(t,e){let n;const i=e;Q>16-i?(n=t,N|=n<<Q&65535,$(N),N=n>>>16-Q,Q+=i-16):(N|=t<<Q&65535,Q+=i);}function et(t,e){const n=2*t;tt(65535&e[n],65535&e[n+1]);}function nt(t,e){let n,i,a=-1,r=t[1],s=0,l=7,o=4;for(0===r&&(l=138,o=3),n=0;n<=e;n++)if(i=r,r=t[2*(n+1)+1],!(++s<l&&i==r)){if(s<o)do{et(i,z);}while(0!=--s);else 0!==i?(i!=a&&(et(i,z),s--),et(16,z),tt(s-3,2)):s<=10?(et(17,z),tt(s-3,3)):(et(18,z),tt(s-11,7));s=0,a=i,0===r?(l=138,o=3):i==r?(l=6,o=3):(l=7,o=4);}}function it(){16==Q?($(N),N=0,Q=0):Q>=8&&(Z(255&N),N>>>=8,Q-=8);}function at(e,n){let i,a,r;if(t.pending_buf[L+2*F]=e>>>8&255,t.pending_buf[L+2*F+1]=255&e,t.pending_buf[H+F]=255&n,F++,0===e?V[2*n]++:(G++,e--,V[2*(k._length_code[n]+256+1)]++,q[2*k.d_code(e)]++),0==(8191&F)&&j>2){for(i=8*F,a=v-x,r=0;r<30;r++)i+=q[2*r]*(5+k.extra_dbits[r]);if(i>>>=3,G<Math.floor(F/2)&&i<Math.floor(a/2))return !0}return F==R-1}function rt(e,n){let i,a,r,s,l=0;if(0!==F)do{i=t.pending_buf[L+2*l]<<8&65280|255&t.pending_buf[L+2*l+1],a=255&t.pending_buf[H+l],l++,0===i?et(a,e):(r=k._length_code[a],et(r+256+1,e),s=k.extra_lbits[r],0!==s&&(a-=k.base_length[r],tt(a,s)),i--,r=k.d_code(i),et(r,n),s=k.extra_dbits[r],0!==s&&(i-=k.base_dist[r],tt(i,s)));}while(l<F);et(256,e),J=e[513];}function st(){Q>8?$(N):Q>0&&Z(255&N),N=0,Q=0;}function lt(e,n,i){tt(0+(i?1:0),3),function(e,n,i){st(),J=8,i&&($(n),$(~n)),t.pending_buf.set(o.subarray(e,e+n),t.pending),t.pending+=n;}(e,n,!0);}function ot(e,n,i){let a,r,s=0;j>0?(B.build_tree(t),K.build_tree(t),s=function(){let e;for(Y(V,B.max_code),Y(q,K.max_code),W.build_tree(t),e=18;e>=3&&0===z[2*k.bl_order[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(),a=t.opt_len+3+7>>>3,r=t.static_len+3+7>>>3,r<=a&&(a=r)):a=r=n+5,n+4<=a&&-1!=e?lt(e,n,i):r==a?(tt(2+(i?1:0),3),rt(A.static_ltree,A.static_dtree)):(tt(4+(i?1:0),3),function(t,e,n){let i;for(tt(t-257,5),tt(e-1,5),tt(n-4,4),i=0;i<n;i++)tt(z[2*k.bl_order[i]+1],3);nt(V,t-1),nt(q,e-1);}(B.max_code+1,K.max_code+1,s+1),rt(V,q)),X(),i&&st();}function _t(t){ot(x>=0?x:-1,v-x,t),x=v,e.flush_pending();}function dt(){let t,n,i,a;do{if(a=_-U-v,0===a&&0===v&&0===U)a=r;else if(-1==a)a--;else if(v>=r+r-262){o.set(o.subarray(r,r+r),0),m-=r,v-=r,x-=r,t=c,i=t;do{n=65535&u[--i],u[i]=n>=r?n-r:0;}while(0!=--t);t=r,i=t;do{n=65535&d[--i],d[i]=n>=r?n-r:0;}while(0!=--t);a+=r;}if(0===e.avail_in)return;t=e.read_buf(o,v+U,a),U+=t,U>=3&&(f=255&o[v],f=(f<<w^255&o[v+1])&b);}while(U<262&&0!==e.avail_in)}function ut(t){let e,n,i=M,a=v,s=C;const _=v>r-262?v-(r-262):0;let u=T;const f=l,c=v+258;let h=o[a+s-1],b=o[a+s];C>=P&&(i>>=2),u>U&&(u=U);do{if(e=t,o[e+s]==b&&o[e+s-1]==h&&o[e]==o[a]&&o[++e]==o[a+1]){a+=2,e++;do{}while(o[++a]==o[++e]&&o[++a]==o[++e]&&o[++a]==o[++e]&&o[++a]==o[++e]&&o[++a]==o[++e]&&o[++a]==o[++e]&&o[++a]==o[++e]&&o[++a]==o[++e]&&a<c);if(n=258-(c-a),a=c-258,n>s){if(m=t,s=n,n>=u)break;h=o[a+s-1],b=o[a+s];}}}while((t=65535&d[t&f])>_&&0!=--i);return s<=U?s:U}function ft(e){return e.total_in=e.total_out=0,e.msg=null,t.pending=0,t.pending_out=0,n=113,a=0,B.dyn_tree=V,B.stat_desc=A.static_l_desc,K.dyn_tree=q,K.stat_desc=A.static_d_desc,W.dyn_tree=z,W.stat_desc=A.static_bl_desc,N=0,Q=0,J=8,X(),function(){_=2*r,u[c-1]=0;for(let t=0;t<c-1;t++)u[t]=0;D=I[j].max_lazy,P=I[j].good_length,T=I[j].nice_length,M=I[j].max_chain,v=0,x=0,U=0,p=C=2,g=0,f=0;}(),0}t.depth=[],t.bl_count=[],t.heap=[],V=[],q=[],z=[],t.pqdownheap=function(e,n){const i=t.heap,a=i[n];let r=n<<1;for(;r<=t.heap_len&&(r<t.heap_len&&S(e,i[r+1],i[r],t.depth)&&r++,!S(e,a,i[r],t.depth));)i[n]=i[r],n=r,r<<=1;i[n]=a;},t.deflateInit=function(e,n,a,_,f,x){return _||(_=8),f||(f=8),x||(x=0),e.msg=null,-1==n&&(n=6),f<1||f>9||8!=_||a<9||a>15||n<0||n>9||x<0||x>2?-2:(e.dstate=t,s=a,r=1<<s,l=r-1,h=f+7,c=1<<h,b=c-1,w=Math.floor((h+3-1)/3),o=new Uint8Array(2*r),d=[],u=[],R=1<<f+6,t.pending_buf=new Uint8Array(4*R),i=4*R,L=Math.floor(R/2),H=3*R,j=n,O=x,ft(e))},t.deflateEnd=function(){return 42!=n&&113!=n&&666!=n?-2:(t.pending_buf=null,u=null,d=null,o=null,t.dstate=null,113==n?-3:0)},t.deflateParams=function(t,e,n){let i=0;return -1==e&&(e=6),e<0||e>9||n<0||n>2?-2:(I[j].func!=I[e].func&&0!==t.total_in&&(i=t.deflate(1)),j!=e&&(j=e,D=I[j].max_lazy,P=I[j].good_length,T=I[j].nice_length,M=I[j].max_chain),O=n,i)},t.deflateSetDictionary=function(t,e,i){let a,s=i,_=0;if(!e||42!=n)return -2;if(s<3)return 0;for(s>r-262&&(s=r-262,_=i-s),o.set(e.subarray(_,_+s),0),v=s,x=s,f=255&o[0],f=(f<<w^255&o[1])&b,a=0;a<=s-3;a++)f=(f<<w^255&o[a+2])&b,d[a&l]=u[f],u[f]=a;return 0},t.deflate=function(_,h){let k,S,M,P,T;if(h>4||h<0)return -2;if(!_.next_out||!_.next_in&&0!==_.avail_in||666==n&&4!=h)return _.msg=E[4],-2;if(0===_.avail_out)return _.msg=E[7],-5;var V;if(e=_,P=a,a=h,42==n&&(S=8+(s-8<<4)<<8,M=(j-1&255)>>1,M>3&&(M=3),S|=M<<6,0!==v&&(S|=32),S+=31-S%31,n=113,Z((V=S)>>8&255),Z(255&V)),0!==t.pending){if(e.flush_pending(),0===e.avail_out)return a=-1,0}else if(0===e.avail_in&&h<=P&&4!=h)return e.msg=E[7],-5;if(666==n&&0!==e.avail_in)return _.msg=E[7],-5;if(0!==e.avail_in||0!==U||0!=h&&666!=n){switch(T=-1,I[j].func){case 0:T=function(t){let n,a=65535;for(a>i-5&&(a=i-5);;){if(U<=1){if(dt(),0===U&&0==t)return 0;if(0===U)break}if(v+=U,U=0,n=x+a,(0===v||v>=n)&&(U=v-n,v=n,_t(!1),0===e.avail_out))return 0;if(v-x>=r-262&&(_t(!1),0===e.avail_out))return 0}return _t(4==t),0===e.avail_out?4==t?2:0:4==t?3:1}(h);break;case 1:T=function(t){let n,i=0;for(;;){if(U<262){if(dt(),U<262&&0==t)return 0;if(0===U)break}if(U>=3&&(f=(f<<w^255&o[v+2])&b,i=65535&u[f],d[v&l]=u[f],u[f]=v),0!==i&&(v-i&65535)<=r-262&&2!=O&&(p=ut(i)),p>=3)if(n=at(v-m,p-3),U-=p,p<=D&&U>=3){p--;do{v++,f=(f<<w^255&o[v+2])&b,i=65535&u[f],d[v&l]=u[f],u[f]=v;}while(0!=--p);v++;}else v+=p,p=0,f=255&o[v],f=(f<<w^255&o[v+1])&b;else n=at(0,255&o[v]),U--,v++;if(n&&(_t(!1),0===e.avail_out))return 0}return _t(4==t),0===e.avail_out?4==t?2:0:4==t?3:1}(h);break;case 2:T=function(t){let n,i,a=0;for(;;){if(U<262){if(dt(),U<262&&0==t)return 0;if(0===U)break}if(U>=3&&(f=(f<<w^255&o[v+2])&b,a=65535&u[f],d[v&l]=u[f],u[f]=v),C=p,y=m,p=2,0!==a&&C<D&&(v-a&65535)<=r-262&&(2!=O&&(p=ut(a)),p<=5&&(1==O||3==p&&v-m>4096)&&(p=2)),C>=3&&p<=C){i=v+U-3,n=at(v-1-y,C-3),U-=C-1,C-=2;do{++v<=i&&(f=(f<<w^255&o[v+2])&b,a=65535&u[f],d[v&l]=u[f],u[f]=v);}while(0!=--C);if(g=0,p=2,v++,n&&(_t(!1),0===e.avail_out))return 0}else if(0!==g){if(n=at(0,255&o[v-1]),n&&_t(!1),v++,U--,0===e.avail_out)return 0}else g=1,v++,U--;}return 0!==g&&(n=at(0,255&o[v-1]),g=0),_t(4==t),0===e.avail_out?4==t?2:0:4==t?3:1}(h);}if(2!=T&&3!=T||(n=666),0==T||2==T)return 0===e.avail_out&&(a=-1),0;if(1==T){if(1==h)tt(2,3),et(256,A.static_ltree),it(),1+J+10-Q<9&&(tt(2,3),et(256,A.static_ltree),it()),J=7;else if(lt(0,0,!1),3==h)for(k=0;k<c;k++)u[k]=0;if(e.flush_pending(),0===e.avail_out)return a=-1,0}}return 4!=h?0:1};}function M(){const t=this;t.next_in_index=0,t.next_out_index=0,t.avail_in=0,t.total_in=0,t.avail_out=0,t.total_out=0;}function D(t){const e=new M,n=512,i=new Uint8Array(n);let a=t?t.level:-1;void 0===a&&(a=-1),e.deflateInit(a),e.next_out=i,this.append=function(t,a){let r,s,l=0,o=0,_=0;const d=[];if(t.length){e.next_in_index=0,e.next_in=t,e.avail_in=t.length;do{if(e.next_out_index=0,e.avail_out=n,r=e.deflate(0),0!=r)throw new Error("deflating: "+e.msg);e.next_out_index&&(e.next_out_index==n?d.push(new Uint8Array(i)):d.push(new Uint8Array(i.subarray(0,e.next_out_index)))),_+=e.next_out_index,a&&e.next_in_index>0&&e.next_in_index!=l&&(a(e.next_in_index),l=e.next_in_index);}while(e.avail_in>0||0===e.avail_out);return s=new Uint8Array(_),d.forEach((function(t){s.set(t,o),o+=t.length;})),s}},this.flush=function(){let t,a,r=0,s=0;const l=[];do{if(e.next_out_index=0,e.avail_out=n,t=e.deflate(4),1!=t&&0!=t)throw new Error("deflating: "+e.msg);n-e.avail_out>0&&l.push(new Uint8Array(i.subarray(0,e.next_out_index))),s+=e.next_out_index;}while(e.avail_in>0||0===e.avail_out);return e.deflateEnd(),a=new Uint8Array(s),l.forEach((function(t){a.set(t,r),r+=t.length;})),a};}M.prototype={deflateInit:function(t,e){const n=this;return n.dstate=new C,e||(e=15),n.dstate.deflateInit(n,t,e)},deflate:function(t){const e=this;return e.dstate?e.dstate.deflate(e,t):-2},deflateEnd:function(){const t=this;if(!t.dstate)return -2;const e=t.dstate.deflateEnd();return t.dstate=null,e},deflateParams:function(t,e){const n=this;return n.dstate?n.dstate.deflateParams(n,t,e):-2},deflateSetDictionary:function(t,e){const n=this;return n.dstate?n.dstate.deflateSetDictionary(n,t,e):-2},read_buf:function(t,e,n){const i=this;let a=i.avail_in;return a>n&&(a=n),0===a?0:(i.avail_in-=a,t.set(i.next_in.subarray(i.next_in_index,i.next_in_index+a),e),i.next_in_index+=a,i.total_in+=a,a)},flush_pending:function(){const t=this;let e=t.dstate.pending;e>t.avail_out&&(e=t.avail_out),0!==e&&(t.next_out.set(t.dstate.pending_buf.subarray(t.dstate.pending_out,t.dstate.pending_out+e),t.next_out_index),t.next_out_index+=e,t.dstate.pending_out+=e,t.total_out+=e,t.avail_out-=e,t.dstate.pending-=e,0===t.dstate.pending&&(t.dstate.pending_out=0));}};const j=[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],P=[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],T=[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],V=[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],q=[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],z=[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 B(){let t,e,n,i,a,r;function s(t,e,s,l,o,_,d,u,f,c,h){let b,w,x,p,y,g,v,m,k,A,U,I,E,S,C;A=0,y=s;do{n[t[e+A]]++,A++,y--;}while(0!==y);if(n[0]==s)return d[0]=-1,u[0]=0,0;for(m=u[0],g=1;g<=15&&0===n[g];g++);for(v=g,m<g&&(m=g),y=15;0!==y&&0===n[y];y--);for(x=y,m>y&&(m=y),u[0]=m,S=1<<g;g<y;g++,S<<=1)if((S-=n[g])<0)return -3;if((S-=n[y])<0)return -3;for(n[y]+=S,r[1]=g=0,A=1,E=2;0!=--y;)r[E]=g+=n[A],E++,A++;y=0,A=0;do{0!==(g=t[e+A])&&(h[r[g]++]=y),A++;}while(++y<s);for(s=r[x],r[0]=y=0,A=0,p=-1,I=-m,a[0]=0,U=0,C=0;v<=x;v++)for(b=n[v];0!=b--;){for(;v>I+m;){if(p++,I+=m,C=x-I,C=C>m?m:C,(w=1<<(g=v-I))>b+1&&(w-=b+1,E=v,g<C))for(;++g<C&&!((w<<=1)<=n[++E]);)w-=n[E];if(C=1<<g,c[0]+C>1440)return -3;a[p]=U=c[0],c[0]+=C,0!==p?(r[p]=y,i[0]=g,i[1]=m,g=y>>>I-m,i[2]=U-a[p-1]-g,f.set(i,3*(a[p-1]+g))):d[0]=U;}for(i[1]=v-I,A>=s?i[0]=192:h[A]<l?(i[0]=h[A]<256?0:96,i[2]=h[A++]):(i[0]=_[h[A]-l]+16+64,i[2]=o[h[A++]-l]),w=1<<v-I,g=y>>>I;g<C;g+=w)f.set(i,3*(U+g));for(g=1<<v-1;0!=(y&g);g>>>=1)y^=g;for(y^=g,k=(1<<I)-1;(y&k)!=r[p];)p--,I-=m,k=(1<<I)-1;}return 0!==S&&1!=x?-5:0}function l(s){let l;for(t||(t=[],e=[],n=new Int32Array(16),i=[],a=new Int32Array(15),r=new Int32Array(16)),e.length<s&&(e=[]),l=0;l<s;l++)e[l]=0;for(l=0;l<16;l++)n[l]=0;for(l=0;l<3;l++)i[l]=0;a.set(n.subarray(0,15),0),r.set(n.subarray(0,16),0);}this.inflate_trees_bits=function(n,i,a,r,o){let _;return l(19),t[0]=0,_=s(n,0,19,19,null,null,a,i,r,t,e),-3==_?o.msg="oversubscribed dynamic bit lengths tree":-5!=_&&0!==i[0]||(o.msg="incomplete dynamic bit lengths tree",_=-3),_},this.inflate_trees_dynamic=function(n,i,a,r,o,_,d,u,f){let c;return l(288),t[0]=0,c=s(a,0,n,257,T,V,_,r,u,t,e),0!=c||0===r[0]?(-3==c?f.msg="oversubscribed literal/length tree":-4!=c&&(f.msg="incomplete literal/length tree",c=-3),c):(l(288),c=s(a,n,i,0,q,z,d,o,u,t,e),0!=c||0===o[0]&&n>257?(-3==c?f.msg="oversubscribed distance tree":-5==c?(f.msg="incomplete distance tree",c=-3):-4!=c&&(f.msg="empty distance tree with lengths",c=-3),c):0)};}B.inflate_trees_fixed=function(t,e,n,i){return t[0]=9,e[0]=5,n[0]=O,i[0]=P,0};function K(){const t=this;let e,n,i,a,r=0,s=0,l=0,o=0,_=0,d=0,u=0,f=0,c=0,h=0;function b(t,e,n,i,a,r,s,l){let o,_,d,u,f,c,h,b,w,x,p,y,g,v,m,k;h=l.next_in_index,b=l.avail_in,f=s.bitb,c=s.bitk,w=s.write,x=w<s.read?s.read-w-1:s.end-w,p=j[t],y=j[e];do{for(;c<20;)b--,f|=(255&l.read_byte(h++))<<c,c+=8;if(o=f&p,_=n,d=i,k=3*(d+o),0!==(u=_[k]))for(;;){if(f>>=_[k+1],c-=_[k+1],0!=(16&u)){for(u&=15,g=_[k+2]+(f&j[u]),f>>=u,c-=u;c<15;)b--,f|=(255&l.read_byte(h++))<<c,c+=8;for(o=f&y,_=a,d=r,k=3*(d+o),u=_[k];;){if(f>>=_[k+1],c-=_[k+1],0!=(16&u)){for(u&=15;c<u;)b--,f|=(255&l.read_byte(h++))<<c,c+=8;if(v=_[k+2]+(f&j[u]),f>>=u,c-=u,x-=g,w>=v)m=w-v,w-m>0&&2>w-m?(s.window[w++]=s.window[m++],s.window[w++]=s.window[m++],g-=2):(s.window.set(s.window.subarray(m,m+2),w),w+=2,m+=2,g-=2);else {m=w-v;do{m+=s.end;}while(m<0);if(u=s.end-m,g>u){if(g-=u,w-m>0&&u>w-m)do{s.window[w++]=s.window[m++];}while(0!=--u);else s.window.set(s.window.subarray(m,m+u),w),w+=u,m+=u,u=0;m=0;}}if(w-m>0&&g>w-m)do{s.window[w++]=s.window[m++];}while(0!=--g);else s.window.set(s.window.subarray(m,m+g),w),w+=g,m+=g,g=0;break}if(0!=(64&u))return l.msg="invalid distance code",g=l.avail_in-b,g=c>>3<g?c>>3:g,b+=g,h-=g,c-=g<<3,s.bitb=f,s.bitk=c,l.avail_in=b,l.total_in+=h-l.next_in_index,l.next_in_index=h,s.write=w,-3;o+=_[k+2],o+=f&j[u],k=3*(d+o),u=_[k];}break}if(0!=(64&u))return 0!=(32&u)?(g=l.avail_in-b,g=c>>3<g?c>>3:g,b+=g,h-=g,c-=g<<3,s.bitb=f,s.bitk=c,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",g=l.avail_in-b,g=c>>3<g?c>>3:g,b+=g,h-=g,c-=g<<3,s.bitb=f,s.bitk=c,l.avail_in=b,l.total_in+=h-l.next_in_index,l.next_in_index=h,s.write=w,-3);if(o+=_[k+2],o+=f&j[u],k=3*(d+o),0===(u=_[k])){f>>=_[k+1],c-=_[k+1],s.window[w++]=_[k+2],x--;break}}else f>>=_[k+1],c-=_[k+1],s.window[w++]=_[k+2],x--;}while(x>=258&&b>=10);return g=l.avail_in-b,g=c>>3<g?c>>3:g,b+=g,h-=g,c-=g<<3,s.bitb=f,s.bitk=c,l.avail_in=b,l.total_in+=h-l.next_in_index,l.next_in_index=h,s.write=w,0}t.init=function(t,r,s,l,o,_){e=0,u=t,f=r,i=s,c=l,a=o,h=_,n=null;},t.proc=function(t,w,x){let p,y,g,v,m,k,A,U=0,I=0,E=0;for(E=w.next_in_index,v=w.avail_in,U=t.bitb,I=t.bitk,m=t.write,k=m<t.read?t.read-m-1:t.end-m;;)switch(e){case 0:if(k>=258&&v>=10&&(t.bitb=U,t.bitk=I,w.avail_in=v,w.total_in+=E-w.next_in_index,w.next_in_index=E,t.write=m,x=b(u,f,i,c,a,h,t,w),E=w.next_in_index,v=w.avail_in,U=t.bitb,I=t.bitk,m=t.write,k=m<t.read?t.read-m-1:t.end-m,0!=x)){e=1==x?7:9;break}l=u,n=i,s=c,e=1;case 1:for(p=l;I<p;){if(0===v)return t.bitb=U,t.bitk=I,w.avail_in=v,w.total_in+=E-w.next_in_index,w.next_in_index=E,t.write=m,t.inflate_flush(w,x);x=0,v--,U|=(255&w.read_byte(E++))<<I,I+=8;}if(y=3*(s+(U&j[p])),U>>>=n[y+1],I-=n[y+1],g=n[y],0===g){o=n[y+2],e=6;break}if(0!=(16&g)){_=15&g,r=n[y+2],e=2;break}if(0==(64&g)){l=g,s=y/3+n[y+2];break}if(0!=(32&g)){e=7;break}return e=9,w.msg="invalid literal/length code",x=-3,t.bitb=U,t.bitk=I,w.avail_in=v,w.total_in+=E-w.next_in_index,w.next_in_index=E,t.write=m,t.inflate_flush(w,x);case 2:for(p=_;I<p;){if(0===v)return t.bitb=U,t.bitk=I,w.avail_in=v,w.total_in+=E-w.next_in_index,w.next_in_index=E,t.write=m,t.inflate_flush(w,x);x=0,v--,U|=(255&w.read_byte(E++))<<I,I+=8;}r+=U&j[p],U>>=p,I-=p,l=f,n=a,s=h,e=3;case 3:for(p=l;I<p;){if(0===v)return t.bitb=U,t.bitk=I,w.avail_in=v,w.total_in+=E-w.next_in_index,w.next_in_index=E,t.write=m,t.inflate_flush(w,x);x=0,v--,U|=(255&w.read_byte(E++))<<I,I+=8;}if(y=3*(s+(U&j[p])),U>>=n[y+1],I-=n[y+1],g=n[y],0!=(16&g)){_=15&g,d=n[y+2],e=4;break}if(0==(64&g)){l=g,s=y/3+n[y+2];break}return e=9,w.msg="invalid distance code",x=-3,t.bitb=U,t.bitk=I,w.avail_in=v,w.total_in+=E-w.next_in_index,w.next_in_index=E,t.write=m,t.inflate_flush(w,x);case 4:for(p=_;I<p;){if(0===v)return t.bitb=U,t.bitk=I,w.avail_in=v,w.total_in+=E-w.next_in_index,w.next_in_index=E,t.write=m,t.inflate_flush(w,x);x=0,v--,U|=(255&w.read_byte(E++))<<I,I+=8;}d+=U&j[p],U>>=p,I-=p,e=5;case 5:for(A=m-d;A<0;)A+=t.end;for(;0!==r;){if(0===k&&(m==t.end&&0!==t.read&&(m=0,k=m<t.read?t.read-m-1:t.end-m),0===k&&(t.write=m,x=t.inflate_flush(w,x),m=t.write,k=m<t.read?t.read-m-1:t.end-m,m==t.end&&0!==t.read&&(m=0,k=m<t.read?t.read-m-1:t.end-m),0===k)))return t.bitb=U,t.bitk=I,w.avail_in=v,w.total_in+=E-w.next_in_index,w.next_in_index=E,t.write=m,t.inflate_flush(w,x);t.window[m++]=t.window[A++],k--,A==t.end&&(A=0),r--;}e=0;break;case 6:if(0===k&&(m==t.end&&0!==t.read&&(m=0,k=m<t.read?t.read-m-1:t.end-m),0===k&&(t.write=m,x=t.inflate_flush(w,x),m=t.write,k=m<t.read?t.read-m-1:t.end-m,m==t.end&&0!==t.read&&(m=0,k=m<t.read?t.read-m-1:t.end-m),0===k)))return t.bitb=U,t.bitk=I,w.avail_in=v,w.total_in+=E-w.next_in_index,w.next_in_index=E,t.write=m,t.inflate_flush(w,x);x=0,t.window[m++]=o,k--,e=0;break;case 7:if(I>7&&(I-=8,v++,E--),t.write=m,x=t.inflate_flush(w,x),m=t.write,k=m<t.read?t.read-m-1:t.end-m,t.read!=t.write)return t.bitb=U,t.bitk=I,w.avail_in=v,w.total_in+=E-w.next_in_index,w.next_in_index=E,t.write=m,t.inflate_flush(w,x);e=8;case 8:return x=1,t.bitb=U,t.bitk=I,w.avail_in=v,w.total_in+=E-w.next_in_index,w.next_in_index=E,t.write=m,t.inflate_flush(w,x);case 9:return x=-3,t.bitb=U,t.bitk=I,w.avail_in=v,w.total_in+=E-w.next_in_index,w.next_in_index=E,t.write=m,t.inflate_flush(w,x);default:return x=-2,t.bitb=U,t.bitk=I,w.avail_in=v,w.total_in+=E-w.next_in_index,w.next_in_index=E,t.write=m,t.inflate_flush(w,x)}},t.free=function(){};}const W=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function H(t,e){const n=this;let i,a=0,r=0,s=0,l=0;const o=[0],_=[0],d=new K;let u=0,f=new Int32Array(4320);const c=new B;n.bitk=0,n.bitb=0,n.window=new Uint8Array(e),n.end=e,n.read=0,n.write=0,n.reset=function(t,e){e&&(e[0]=0),6==a&&d.free(t),a=0,n.bitk=0,n.bitb=0,n.read=n.write=0;},n.reset(t,null),n.inflate_flush=function(t,e){let i,a,r;return a=t.next_out_index,r=n.read,i=(r<=n.write?n.write:n.end)-r,i>t.avail_out&&(i=t.avail_out),0!==i&&-5==e&&(e=0),t.avail_out-=i,t.total_out+=i,t.next_out.set(n.window.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>t.avail_out&&(i=t.avail_out),0!==i&&-5==e&&(e=0),t.avail_out-=i,t.total_out+=i,t.next_out.set(n.window.subarray(r,r+i),a),a+=i,r+=i),t.next_out_index=a,n.read=r,e},n.proc=function(t,e){let h,b,w,x,p,y,g,v;for(x=t.next_in_index,p=t.avail_in,b=n.bitb,w=n.bitk,y=n.write,g=y<n.read?n.read-y-1:n.end-y;;){let m,k,A,U,I,E,S,C;switch(a){case 0:for(;w<3;){if(0===p)return n.bitb=b,n.bitk=w,t.avail_in=p,t.total_in+=x-t.next_in_index,t.next_in_index=x,n.write=y,n.inflate_flush(t,e);e=0,p--,b|=(255&t.read_byte(x++))<<w,w+=8;}switch(h=7&b,u=1&h,h>>>1){case 0:b>>>=3,w-=3,h=7&w,b>>>=h,w-=h,a=1;break;case 1:m=[],k=[],A=[[]],U=[[]],B.inflate_trees_fixed(m,k,A,U),d.init(m[0],k[0],A[0],0,U[0],0),b>>>=3,w-=3,a=6;break;case 2:b>>>=3,w-=3,a=3;break;case 3:return b>>>=3,w-=3,a=9,t.msg="invalid block type",e=-3,n.bitb=b,n.bitk=w,t.avail_in=p,t.total_in+=x-t.next_in_index,t.next_in_index=x,n.write=y,n.inflate_flush(t,e)}break;case 1:for(;w<32;){if(0===p)return n.bitb=b,n.bitk=w,t.avail_in=p,t.total_in+=x-t.next_in_index,t.next_in_index=x,n.write=y,n.inflate_flush(t,e);e=0,p--,b|=(255&t.read_byte(x++))<<w,w+=8;}if((~b>>>16&65535)!=(65535&b))return a=9,t.msg="invalid stored block lengths",e=-3,n.bitb=b,n.bitk=w,t.avail_in=p,t.total_in+=x-t.next_in_index,t.next_in_index=x,n.write=y,n.inflate_flush(t,e);r=65535&b,b=w=0,a=0!==r?2:0!==u?7:0;break;case 2:if(0===p)return n.bitb=b,n.bitk=w,t.avail_in=p,t.total_in+=x-t.next_in_index,t.next_in_index=x,n.write=y,n.inflate_flush(t,e);if(0===g&&(y==n.end&&0!==n.read&&(y=0,g=y<n.read?n.read-y-1:n.end-y),0===g&&(n.write=y,e=n.inflate_flush(t,e),y=n.write,g=y<n.read?n.read-y-1:n.end-y,y==n.end&&0!==n.read&&(y=0,g=y<n.read?n.read-y-1:n.end-y),0===g)))return n.bitb=b,n.bitk=w,t.avail_in=p,t.total_in+=x-t.next_in_index,t.next_in_index=x,n.write=y,n.inflate_flush(t,e);if(e=0,h=r,h>p&&(h=p),h>g&&(h=g),n.window.set(t.read_buf(x,h),y),x+=h,p-=h,y+=h,g-=h,0!=(r-=h))break;a=0!==u?7:0;break;case 3:for(;w<14;){if(0===p)return n.bitb=b,n.bitk=w,t.avail_in=p,t.total_in+=x-t.next_in_index,t.next_in_index=x,n.write=y,n.inflate_flush(t,e);e=0,p--,b|=(255&t.read_byte(x++))<<w,w+=8;}if(s=h=16383&b,(31&h)>29||(h>>5&31)>29)return a=9,t.msg="too many length or distance symbols",e=-3,n.bitb=b,n.bitk=w,t.avail_in=p,t.total_in+=x-t.next_in_index,t.next_in_index=x,n.write=y,n.inflate_flush(t,e);if(h=258+(31&h)+(h>>5&31),!i||i.length<h)i=[];else for(v=0;v<h;v++)i[v]=0;b>>>=14,w-=14,l=0,a=4;case 4:for(;l<4+(s>>>10);){for(;w<3;){if(0===p)return n.bitb=b,n.bitk=w,t.avail_in=p,t.total_in+=x-t.next_in_index,t.next_in_index=x,n.write=y,n.inflate_flush(t,e);e=0,p--,b|=(255&t.read_byte(x++))<<w,w+=8;}i[W[l++]]=7&b,b>>>=3,w-=3;}for(;l<19;)i[W[l++]]=0;if(o[0]=7,h=c.inflate_trees_bits(i,o,_,f,t),0!=h)return -3==(e=h)&&(i=null,a=9),n.bitb=b,n.bitk=w,t.avail_in=p,t.total_in+=x-t.next_in_index,t.next_in_index=x,n.write=y,n.inflate_flush(t,e);l=0,a=5;case 5:for(;h=s,!(l>=258+(31&h)+(h>>5&31));){let r,d;for(h=o[0];w<h;){if(0===p)return n.bitb=b,n.bitk=w,t.avail_in=p,t.total_in+=x-t.next_in_index,t.next_in_index=x,n.write=y,n.inflate_flush(t,e);e=0,p--,b|=(255&t.read_byte(x++))<<w,w+=8;}if(h=f[3*(_[0]+(b&j[h]))+1],d=f[3*(_[0]+(b&j[h]))+2],d<16)b>>>=h,w-=h,i[l++]=d;else {for(v=18==d?7:d-14,r=18==d?11:3;w<h+v;){if(0===p)return n.bitb=b,n.bitk=w,t.avail_in=p,t.total_in+=x-t.next_in_index,t.next_in_index=x,n.write=y,n.inflate_flush(t,e);e=0,p--,b|=(255&t.read_byte(x++))<<w,w+=8;}if(b>>>=h,w-=h,r+=b&j[v],b>>>=v,w-=v,v=l,h=s,v+r>258+(31&h)+(h>>5&31)||16==d&&v<1)return i=null,a=9,t.msg="invalid bit length repeat",e=-3,n.bitb=b,n.bitk=w,t.avail_in=p,t.total_in+=x-t.next_in_index,t.next_in_index=x,n.write=y,n.inflate_flush(t,e);d=16==d?i[v-1]:0;do{i[v++]=d;}while(0!=--r);l=v;}}if(_[0]=-1,I=[],E=[],S=[],C=[],I[0]=9,E[0]=6,h=s,h=c.inflate_trees_dynamic(257+(31&h),1+(h>>5&31),i,I,E,S,C,f,t),0!=h)return -3==h&&(i=null,a=9),e=h,n.bitb=b,n.bitk=w,t.avail_in=p,t.total_in+=x-t.next_in_index,t.next_in_index=x,n.write=y,n.inflate_flush(t,e);d.init(I[0],E[0],f,S[0],f,C[0]),a=6;case 6:if(n.bitb=b,n.bitk=w,t.avail_in=p,t.total_in+=x-t.next_in_index,t.next_in_index=x,n.write=y,1!=(e=d.proc(n,t,e)))return n.inflate_flush(t,e);if(e=0,d.free(t),x=t.next_in_index,p=t.avail_in,b=n.bitb,w=n.bitk,y=n.write,g=y<n.read?n.read-y-1:n.end-y,0===u){a=0;break}a=7;case 7:if(n.write=y,e=n.inflate_flush(t,e),y=n.write,g=y<n.read?n.read-y-1:n.end-y,n.read!=n.write)return n.bitb=b,n.bitk=w,t.avail_in=p,t.total_in+=x-t.next_in_index,t.next_in_index=x,n.write=y,n.inflate_flush(t,e);a=8;case 8:return e=1,n.bitb=b,n.bitk=w,t.avail_in=p,t.total_in+=x-t.next_in_index,t.next_in_index=x,n.write=y,n.inflate_flush(t,e);case 9:return e=-3,n.bitb=b,n.bitk=w,t.avail_in=p,t.total_in+=x-t.next_in_index,t.next_in_index=x,n.write=y,n.inflate_flush(t,e);default:return e=-2,n.bitb=b,n.bitk=w,t.avail_in=p,t.total_in+=x-t.next_in_index,t.next_in_index=x,n.write=y,n.inflate_flush(t,e)}}},n.free=function(t){n.reset(t,null),n.window=null,f=null;},n.set_dictionary=function(t,e,i){n.window.set(t.subarray(e,e+i),0),n.read=n.write=i;},n.sync_point=function(){return 1==a?1:0};}const R=[0,0,255,255];function F(){const t=this;function e(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):-2}t.mode=0,t.method=0,t.was=[0],t.need=0,t.marker=0,t.wbits=0,t.inflateEnd=function(e){return t.blocks&&t.blocks.free(e),t.blocks=null,0},t.inflateInit=function(n,i){return n.msg=null,t.blocks=null,i<8||i>15?(t.inflateEnd(n),-2):(t.wbits=i,n.istate.blocks=new H(n,1<<i),e(n),0)},t.inflate=function(t,e){let n,i;if(!t||!t.istate||!t.next_in)return -2;const a=t.istate;for(e=4==e?-5:0,n=-5;;)switch(a.mode){case 0:if(0===t.avail_in)return n;if(n=e,t.avail_in--,t.total_in++,8!=(15&(a.method=t.read_byte(t.next_in_index++)))){a.mode=13,t.msg="unknown compression method",a.marker=5;break}if(8+(a.method>>4)>a.wbits){a.mode=13,t.msg="invalid window size",a.marker=5;break}a.mode=1;case 1:if(0===t.avail_in)return n;if(n=e,t.avail_in--,t.total_in++,i=255&t.read_byte(t.next_in_index++),((a.method<<8)+i)%31!=0){a.mode=13,t.msg="incorrect header check",a.marker=5;break}if(0==(32&i)){a.mode=7;break}a.mode=2;case 2:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,a.need=(255&t.read_byte(t.next_in_index++))<<24&4278190080,a.mode=3;case 3:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,a.need+=(255&t.read_byte(t.next_in_index++))<<16&16711680,a.mode=4;case 4:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,a.need+=(255&t.read_byte(t.next_in_index++))<<8&65280,a.mode=5;case 5:return 0===t.avail_in?n:(n=e,t.avail_in--,t.total_in++,a.need+=255&t.read_byte(t.next_in_index++),a.mode=6,2);case 6:return a.mode=13,t.msg="need dictionary",a.marker=0,-2;case 7:if(n=a.blocks.proc(t,n),-3==n){a.mode=13,a.marker=0;break}if(0==n&&(n=e),1!=n)return n;n=e,a.blocks.reset(t,a.was),a.mode=12;case 12:return 1;case 13:return -3;default:return -2}},t.inflateSetDictionary=function(t,e,n){let i=0,a=n;if(!t||!t.istate||6!=t.istate.mode)return -2;const r=t.istate;return a>=1<<r.wbits&&(a=(1<<r.wbits)-1,i=n-a),r.blocks.set_dictionary(e,i,a),r.mode=7,0},t.inflateSync=function(t){let n,i,a,r,s;if(!t||!t.istate)return -2;const l=t.istate;if(13!=l.mode&&(l.mode=13,l.marker=0),0===(n=t.avail_in))return -5;for(i=t.next_in_index,a=l.marker;0!==n&&a<4;)t.read_byte(i)==R[a]?a++:a=0!==t.read_byte(i)?0:4-a,i++,n--;return t.total_in+=i-t.next_in_index,t.next_in_index=i,t.avail_in=n,l.marker=a,4!=a?-3:(r=t.total_in,s=t.total_out,e(t),t.total_in=r,t.total_out=s,l.mode=7,0)},t.inflateSyncPoint=function(t){return t&&t.istate&&t.istate.blocks?t.istate.blocks.sync_point():-2};}function L(){}function G(){const t=new L,e=new Uint8Array(512);let n=!1;t.inflateInit(),t.next_out=e,this.append=function(i,a){const r=[];let s,l,o=0,_=0,d=0;if(0!==i.length){t.next_in_index=0,t.next_in=i,t.avail_in=i.length;do{if(t.next_out_index=0,t.avail_out=512,0!==t.avail_in||n||(t.next_in_index=0,n=!0),s=t.inflate(0),n&&-5===s){if(0!==t.avail_in)throw new Error("inflating: bad input")}else if(0!==s&&1!==s)throw new Error("inflating: "+t.msg);if((n||1===s)&&t.avail_in===i.length)throw new Error("inflating: bad input");t.next_out_index&&(512===t.next_out_index?r.push(new Uint8Array(e)):r.push(new Uint8Array(e.subarray(0,t.next_out_index)))),d+=t.next_out_index,a&&t.next_in_index>0&&t.next_in_index!=o&&(a(t.next_in_index),o=t.next_in_index);}while(t.avail_in>0||0===t.avail_out);return l=new Uint8Array(d),r.forEach((function(t){l.set(t,_),_+=t.length;})),l}},this.flush=function(){t.inflateEnd();};}L.prototype={inflateInit:function(t){const e=this;return e.istate=new F,t||(t=15),e.istate.inflateInit(e,t)},inflate:function(t){const e=this;return e.istate?e.istate.inflate(e,t):-2},inflateEnd:function(){const t=this;if(!t.istate)return -2;const e=t.istate.inflateEnd(t);return t.istate=null,e},inflateSync:function(){const t=this;return t.istate?t.istate.inflateSync(t):-2},inflateSetDictionary:function(t,e){const n=this;return n.istate?n.istate.inflateSetDictionary(n,t,e):-2},read_byte:function(t){return this.next_in.subarray(t,t+1)[0]},read_buf:function(t,e){return this.next_in.subarray(t,t+e)}},self.initCodec=()=>{self.Deflate=D,self.Inflate=G;};\n\n']));t({workerScripts:{inflate:[e],deflate:[e]}})}export default e;
import{configure as t}from"./core/zip-core.js";export default()=>{const e=URL.createObjectURL(new Blob(["("+(()=>{class t{constructor(){this.crc=-1,this.table=(()=>{const t=[];for(let e=0;e<256;e++){let n=e;for(let t=0;t<8;t++)1&n?n=n>>>1^3988292384:n>>>=1;t[e]=n}return t})()}append(t){const e=this.table;let n=0|this.crc;for(let i=0,a=0|t.length;i<a;i++)n=n>>>8^e[255&(n^t[i])];this.crc=n}get(){return~this.crc}}const e={name:"PBKDF2"},n={name:"HMAC"},i={name:"AES-CTR"},a=Object.assign({hash:n},e),r=Object.assign({iterations:1e3,hash:{name:"SHA-1"}},e),s=Object.assign({hash:"SHA-1"},n),l=Object.assign({length:16},i),o=["deriveBits"],_=["sign"],d=[8,12,16],u=[16,24,32],f=[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],c=crypto.subtle;class h{constructor(t,e,n){this.password=t,this.signed=e,this.strength=n-1,this.input=e&&new Uint8Array(0),this.pendingInput=new Uint8Array(0)}async append(t){const e=async(a=0)=>{if(a+16<=i.length-10){const t=i.subarray(a,a+16),r=await c.decrypt(Object.assign({counter:this.counter},l),this.keys.key,t);return x(this.counter),n.set(new Uint8Array(r),a),e(a+16)}return this.pendingInput=i.subarray(a),this.signed&&(this.input=p(this.input,t)),n};if(this.password){const e=t.subarray(0,d[this.strength]+2);await async function(t,e,n){await w(t,n,e.subarray(0,d[t.strength]),["decrypt"]);const i=e.subarray(d[t.strength]),a=t.keys.passwordVerification;if(a[0]!=i[0]||a[1]!=i[1])throw new Error("Invalid pasword")}(this,e,this.password),this.password=null,t=t.subarray(d[this.strength]+2)}let n=new Uint8Array(t.length-10-(t.length-10)%16),i=t;return this.pendingInput.length&&(i=p(this.pendingInput,t),n=g(n,i.length-10-(i.length-10)%16)),e()}async flush(){const t=this.pendingInput,e=this.keys,i=t.subarray(0,t.length-10),a=t.subarray(t.length-10);let r=new Uint8Array(0);if(i.length){const t=await c.decrypt(Object.assign({counter:this.counter},l),e.key,i);r=new Uint8Array(t)}let s=!0;if(this.signed){const t=await c.sign(n,e.authentication,this.input.subarray(0,this.input.length-10)),i=new Uint8Array(t);this.input=null;for(let t=0;t<10;t++)i[t]!=a[t]&&(s=!1)}return{valid:s,data:r}}}class b{constructor(t,e){this.password=t,this.strength=e-1,this.output=new Uint8Array(0),this.pendingInput=new Uint8Array(0)}async append(t){const e=async(a=0)=>{if(a+16<=t.length){const r=t.subarray(a,a+16),s=await c.encrypt(Object.assign({counter:this.counter},l),this.keys.key,r);return x(this.counter),i.set(new Uint8Array(s),a+n.length),e(a+16)}return this.pendingInput=t.subarray(a),this.output=p(this.output,i),i};let n=new Uint8Array(0);this.password&&(n=await async function(t,e){const n=crypto.getRandomValues(new Uint8Array(d[t.strength]));return await w(t,e,n,["encrypt"]),p(n,t.keys.passwordVerification)}(this,this.password),this.password=null);let i=new Uint8Array(n.length+t.length-t.length%16);return i.set(n,0),this.pendingInput.length&&(t=p(this.pendingInput,t),i=g(i,t.length-t.length%16)),e()}async flush(){let t=new Uint8Array(0);if(this.pendingInput.length){const e=await c.encrypt(Object.assign({counter:this.counter},l),this.keys.key,this.pendingInput);t=new Uint8Array(e),this.output=p(this.output,t)}const e=await c.sign(n,this.keys.authentication,this.output.subarray(d[this.strength]+2));this.output=null;const i=new Uint8Array(e).subarray(0,10);return{data:p(t,i),signature:i}}}async function w(t,e,n,l){t.counter=new Uint8Array(f);const d=(new TextEncoder).encode(e),h=await c.importKey("raw",d,a,!1,o),b=await c.deriveBits(Object.assign({salt:n},r),h,8*(2*u[t.strength]+2)),w=new Uint8Array(b);t.keys={key:await c.importKey("raw",w.subarray(0,u[t.strength]),i,!0,l),authentication:await c.importKey("raw",w.subarray(u[t.strength],2*u[t.strength]),s,!1,_),passwordVerification:w.subarray(2*u[t.strength])}}function x(t){for(let e=0;e<16;e++){if(255!=t[e]){t[e]++;break}t[e]=0}}function p(t,e){let n=t;return t.length+e.length&&(n=new Uint8Array(t.length+e.length),n.set(t,0),n.set(e,t.length)),n}function g(t,e){if(e&&e>t.length){const n=t;(t=new Uint8Array(e)).set(n,0)}return t}class y{constructor(e){this.signature=e.inputSignature,this.encrypted=Boolean(e.inputPassword),this.signed=e.inputSigned,this.compressed=e.inputCompressed,this.inflate=e.inputCompressed&&new e.codecConstructor,this.crc32=e.inputSigned&&new t,this.decrypt=this.encrypted&&new h(e.inputPassword,e.inputSigned,e.inputEncryptionStrength)}async append(t){return this.encrypted&&(t=await this.decrypt.append(t)),this.compressed&&t.length&&(t=await this.inflate.append(t)),!this.encrypted&&this.signed&&this.crc32.append(t),t}async flush(){let t,e=new Uint8Array(0);if(this.encrypted){const t=await this.decrypt.flush();if(!t.valid)throw new Error("Invalid signature");e=t.data}else if(this.signed){const e=new DataView(new Uint8Array(4).buffer);if(t=this.crc32.get(),e.setUint32(0,t),this.signature!=e.getUint32(0,!1))throw new Error("Invalid signature")}return this.compressed&&(e=await this.inflate.append(e)||new Uint8Array(0),await this.inflate.flush()),{data:e,signature:t}}}class v{constructor(e){this.encrypted=e.outputEncrypted,this.signed=e.outputSigned,this.compressed=e.outputCompressed,this.deflate=e.outputCompressed&&new e.codecConstructor({level:e.level||5}),this.crc32=e.outputSigned&&new t,this.encrypt=this.encrypted&&new b(e.outputPassword,e.outputEncryptionStrength)}async append(t){let e=t;return this.compressed&&t.length&&(e=await this.deflate.append(t)),this.encrypted?e=await this.encrypt.append(e):this.signed&&this.crc32.append(t),e}async flush(){let t,e=new Uint8Array(0);if(this.compressed&&(e=await this.deflate.flush()||new Uint8Array(0)),this.encrypted){e=await this.encrypt.append(e);const n=await this.encrypt.flush();t=n.signature;const i=new Uint8Array(e.length+n.data.length);i.set(e,0),i.set(n.data,e.length),e=i}else this.signed&&(t=this.crc32.get());return{data:e,signature:t}}}const m={init(t){t.scripts&&t.scripts.length&&importScripts.apply(void 0,t.scripts);const e=t.options;self.initCodec&&self.initCodec(),e.codecType.startsWith("deflate")?e.codecConstructor=self.Deflate:e.codecType.startsWith("inflate")&&(e.codecConstructor=self.Inflate),k=function(t){return t.codecType.startsWith("deflate")?new v(t):t.codecType.startsWith("inflate")?new y(t):void 0}(e)},append:async t=>({data:await k.append(t.data)}),flush:()=>k.flush()};let k;addEventListener("message",(async t=>{const e=t.data,n=e.type,i=m[n];if(i)try{const t=await i(e)||{};if(t.type=n,t.data)try{postMessage(t,[t.data.buffer])}catch(e){postMessage(t)}else postMessage(t)}catch(t){postMessage({type:n,error:{message:t.message,stack:t.stack}})}}));const A=[0,1,2,3,4,4,5,5,6,6,6,6,7,7,7,7,8,8,8,8,8,8,8,8,9,9,9,9,9,9,9,9,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,0,0,16,17,18,18,19,19,20,20,20,20,21,21,21,21,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29];function U(){const t=this;function e(t,e){let n=0;do{n|=1&t,t>>>=1,n<<=1}while(--e>0);return n>>>1}t.build_tree=function(n){const i=t.dyn_tree,a=t.stat_desc.static_tree,r=t.stat_desc.elems;let s,l,o,_=-1;for(n.heap_len=0,n.heap_max=573,s=0;s<r;s++)0!==i[2*s]?(n.heap[++n.heap_len]=_=s,n.depth[s]=0):i[2*s+1]=0;for(;n.heap_len<2;)o=n.heap[++n.heap_len]=_<2?++_:0,i[2*o]=1,n.depth[o]=0,n.opt_len--,a&&(n.static_len-=a[2*o+1]);for(t.max_code=_,s=Math.floor(n.heap_len/2);s>=1;s--)n.pqdownheap(i,s);o=r;do{s=n.heap[1],n.heap[1]=n.heap[n.heap_len--],n.pqdownheap(i,1),l=n.heap[1],n.heap[--n.heap_max]=s,n.heap[--n.heap_max]=l,i[2*o]=i[2*s]+i[2*l],n.depth[o]=Math.max(n.depth[s],n.depth[l])+1,i[2*s+1]=i[2*l+1]=o,n.heap[1]=o++,n.pqdownheap(i,1)}while(n.heap_len>=2);n.heap[--n.heap_max]=n.heap[1],function(e){const n=t.dyn_tree,i=t.stat_desc.static_tree,a=t.stat_desc.extra_bits,r=t.stat_desc.extra_base,s=t.stat_desc.max_length;let l,o,_,d,u,f,c=0;for(d=0;d<=15;d++)e.bl_count[d]=0;for(n[2*e.heap[e.heap_max]+1]=0,l=e.heap_max+1;l<573;l++)o=e.heap[l],d=n[2*n[2*o+1]+1]+1,d>s&&(d=s,c++),n[2*o+1]=d,o>t.max_code||(e.bl_count[d]++,u=0,o>=r&&(u=a[o-r]),f=n[2*o],e.opt_len+=f*(d+u),i&&(e.static_len+=f*(i[2*o+1]+u)));if(0!==c){do{for(d=s-1;0===e.bl_count[d];)d--;e.bl_count[d]--,e.bl_count[d+1]+=2,e.bl_count[s]--,c-=2}while(c>0);for(d=s;0!==d;d--)for(o=e.bl_count[d];0!==o;)_=e.heap[--l],_>t.max_code||(n[2*_+1]!=d&&(e.opt_len+=(d-n[2*_+1])*n[2*_],n[2*_+1]=d),o--)}}(n),function(t,n,i){const a=[];let r,s,l,o=0;for(r=1;r<=15;r++)a[r]=o=o+i[r-1]<<1;for(s=0;s<=n;s++)l=t[2*s+1],0!==l&&(t[2*s]=e(a[l]++,l))}(i,t.max_code,n.bl_count)}}function I(t,e,n,i,a){const r=this;r.static_tree=t,r.extra_bits=e,r.extra_base=n,r.elems=i,r.max_length=a}function E(t,e,n,i,a){const r=this;r.good_length=t,r.max_lazy=e,r.nice_length=n,r.max_chain=i,r.func=a}U._length_code=[0,1,2,3,4,5,6,7,8,8,9,9,10,10,11,11,12,12,12,12,13,13,13,13,14,14,14,14,15,15,15,15,16,16,16,16,16,16,16,16,17,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,28],U.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],U.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],U.d_code=function(t){return t<256?A[t]:A[256+(t>>>7)]},U.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],U.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],U.extra_blbits=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],U.bl_order=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],I.static_ltree=[12,8,140,8,76,8,204,8,44,8,172,8,108,8,236,8,28,8,156,8,92,8,220,8,60,8,188,8,124,8,252,8,2,8,130,8,66,8,194,8,34,8,162,8,98,8,226,8,18,8,146,8,82,8,210,8,50,8,178,8,114,8,242,8,10,8,138,8,74,8,202,8,42,8,170,8,106,8,234,8,26,8,154,8,90,8,218,8,58,8,186,8,122,8,250,8,6,8,134,8,70,8,198,8,38,8,166,8,102,8,230,8,22,8,150,8,86,8,214,8,54,8,182,8,118,8,246,8,14,8,142,8,78,8,206,8,46,8,174,8,110,8,238,8,30,8,158,8,94,8,222,8,62,8,190,8,126,8,254,8,1,8,129,8,65,8,193,8,33,8,161,8,97,8,225,8,17,8,145,8,81,8,209,8,49,8,177,8,113,8,241,8,9,8,137,8,73,8,201,8,41,8,169,8,105,8,233,8,25,8,153,8,89,8,217,8,57,8,185,8,121,8,249,8,5,8,133,8,69,8,197,8,37,8,165,8,101,8,229,8,21,8,149,8,85,8,213,8,53,8,181,8,117,8,245,8,13,8,141,8,77,8,205,8,45,8,173,8,109,8,237,8,29,8,157,8,93,8,221,8,61,8,189,8,125,8,253,8,19,9,275,9,147,9,403,9,83,9,339,9,211,9,467,9,51,9,307,9,179,9,435,9,115,9,371,9,243,9,499,9,11,9,267,9,139,9,395,9,75,9,331,9,203,9,459,9,43,9,299,9,171,9,427,9,107,9,363,9,235,9,491,9,27,9,283,9,155,9,411,9,91,9,347,9,219,9,475,9,59,9,315,9,187,9,443,9,123,9,379,9,251,9,507,9,7,9,263,9,135,9,391,9,71,9,327,9,199,9,455,9,39,9,295,9,167,9,423,9,103,9,359,9,231,9,487,9,23,9,279,9,151,9,407,9,87,9,343,9,215,9,471,9,55,9,311,9,183,9,439,9,119,9,375,9,247,9,503,9,15,9,271,9,143,9,399,9,79,9,335,9,207,9,463,9,47,9,303,9,175,9,431,9,111,9,367,9,239,9,495,9,31,9,287,9,159,9,415,9,95,9,351,9,223,9,479,9,63,9,319,9,191,9,447,9,127,9,383,9,255,9,511,9,0,7,64,7,32,7,96,7,16,7,80,7,48,7,112,7,8,7,72,7,40,7,104,7,24,7,88,7,56,7,120,7,4,7,68,7,36,7,100,7,20,7,84,7,52,7,116,7,3,8,131,8,67,8,195,8,35,8,163,8,99,8,227,8],I.static_dtree=[0,5,16,5,8,5,24,5,4,5,20,5,12,5,28,5,2,5,18,5,10,5,26,5,6,5,22,5,14,5,30,5,1,5,17,5,9,5,25,5,5,5,21,5,13,5,29,5,3,5,19,5,11,5,27,5,7,5,23,5],I.static_l_desc=new I(I.static_ltree,U.extra_lbits,257,286,15),I.static_d_desc=new I(I.static_dtree,U.extra_dbits,0,30,15),I.static_bl_desc=new I(null,U.extra_blbits,0,19,7);const S=[new E(0,0,0,0,0),new E(4,4,8,4,1),new E(4,5,16,8,1),new E(4,6,32,32,1),new E(4,4,16,16,2),new E(8,16,32,32,2),new E(8,16,128,128,2),new E(8,32,128,256,2),new E(32,128,258,1024,2),new E(32,258,258,4096,2)],C=["need dictionary","stream end","","","stream error","data error","","buffer error","",""];function j(t,e,n,i){const a=t[2*e],r=t[2*n];return a<r||a==r&&i[e]<=i[n]}function M(){const t=this;let e,n,i,a,r,s,l,o,_,d,u,f,c,h,b,w,x,p,g,y,v,m,k,A,E,M,D,O,P,T,z,B,V;const q=new U,K=new U,R=new U;let W,H,L,F,G,J,N,Q;function X(){let e;for(e=0;e<286;e++)z[2*e]=0;for(e=0;e<30;e++)B[2*e]=0;for(e=0;e<19;e++)V[2*e]=0;z[512]=1,t.opt_len=t.static_len=0,L=G=0}function Y(t,e){let n,i=-1,a=t[1],r=0,s=7,l=4;0===a&&(s=138,l=3),t[2*(e+1)+1]=65535;for(let o=0;o<=e;o++)n=a,a=t[2*(o+1)+1],++r<s&&n==a||(r<l?V[2*n]+=r:0!==n?(n!=i&&V[2*n]++,V[32]++):r<=10?V[34]++:V[36]++,r=0,i=n,0===a?(s=138,l=3):n==a?(s=6,l=3):(s=7,l=4))}function Z(e){t.pending_buf[t.pending++]=e}function $(t){Z(255&t),Z(t>>>8&255)}function tt(t,e){let n;const i=e;Q>16-i?(n=t,N|=n<<Q&65535,$(N),N=n>>>16-Q,Q+=i-16):(N|=t<<Q&65535,Q+=i)}function et(t,e){const n=2*t;tt(65535&e[n],65535&e[n+1])}function nt(t,e){let n,i,a=-1,r=t[1],s=0,l=7,o=4;for(0===r&&(l=138,o=3),n=0;n<=e;n++)if(i=r,r=t[2*(n+1)+1],!(++s<l&&i==r)){if(s<o)do{et(i,V)}while(0!=--s);else 0!==i?(i!=a&&(et(i,V),s--),et(16,V),tt(s-3,2)):s<=10?(et(17,V),tt(s-3,3)):(et(18,V),tt(s-11,7));s=0,a=i,0===r?(l=138,o=3):i==r?(l=6,o=3):(l=7,o=4)}}function it(){16==Q?($(N),N=0,Q=0):Q>=8&&(Z(255&N),N>>>=8,Q-=8)}function at(e,n){let i,a,r;if(t.pending_buf[F+2*L]=e>>>8&255,t.pending_buf[F+2*L+1]=255&e,t.pending_buf[W+L]=255&n,L++,0===e?z[2*n]++:(G++,e--,z[2*(U._length_code[n]+256+1)]++,B[2*U.d_code(e)]++),0==(8191&L)&&D>2){for(i=8*L,a=v-x,r=0;r<30;r++)i+=B[2*r]*(5+U.extra_dbits[r]);if(i>>>=3,G<Math.floor(L/2)&&i<Math.floor(a/2))return!0}return L==H-1}function rt(e,n){let i,a,r,s,l=0;if(0!==L)do{i=t.pending_buf[F+2*l]<<8&65280|255&t.pending_buf[F+2*l+1],a=255&t.pending_buf[W+l],l++,0===i?et(a,e):(r=U._length_code[a],et(r+256+1,e),s=U.extra_lbits[r],0!==s&&(a-=U.base_length[r],tt(a,s)),i--,r=U.d_code(i),et(r,n),s=U.extra_dbits[r],0!==s&&(i-=U.base_dist[r],tt(i,s)))}while(l<L);et(256,e),J=e[513]}function st(){Q>8?$(N):Q>0&&Z(255&N),N=0,Q=0}function lt(e,n,i){tt(0+(i?1:0),3),function(e,n,i){st(),J=8,$(n),$(~n),t.pending_buf.set(o.subarray(e,e+n),t.pending),t.pending+=n}(e,n)}function ot(e,n,i){let a,r,s=0;D>0?(q.build_tree(t),K.build_tree(t),s=function(){let e;for(Y(z,q.max_code),Y(B,K.max_code),R.build_tree(t),e=18;e>=3&&0===V[2*U.bl_order[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(),a=t.opt_len+3+7>>>3,r=t.static_len+3+7>>>3,r<=a&&(a=r)):a=r=n+5,n+4<=a&&-1!=e?lt(e,n,i):r==a?(tt(2+(i?1:0),3),rt(I.static_ltree,I.static_dtree)):(tt(4+(i?1:0),3),function(t,e,n){let i;for(tt(t-257,5),tt(e-1,5),tt(n-4,4),i=0;i<n;i++)tt(V[2*U.bl_order[i]+1],3);nt(z,t-1),nt(B,e-1)}(q.max_code+1,K.max_code+1,s+1),rt(z,B)),X(),i&&st()}function _t(t){ot(x>=0?x:-1,v-x,t),x=v,e.flush_pending()}function dt(){let t,n,i,a;do{if(a=_-k-v,0===a&&0===v&&0===k)a=r;else if(-1==a)a--;else if(v>=r+r-262){o.set(o.subarray(r,r+r),0),m-=r,v-=r,x-=r,t=c,i=t;do{n=65535&u[--i],u[i]=n>=r?n-r:0}while(0!=--t);t=r,i=t;do{n=65535&d[--i],d[i]=n>=r?n-r:0}while(0!=--t);a+=r}if(0===e.avail_in)return;t=e.read_buf(o,v+k,a),k+=t,k>=3&&(f=255&o[v],f=(f<<w^255&o[v+1])&b)}while(k<262&&0!==e.avail_in)}function ut(t){let e,n,i=E,a=v,s=A;const _=v>r-262?v-(r-262):0;let u=T;const f=l,c=v+258;let h=o[a+s-1],b=o[a+s];A>=P&&(i>>=2),u>k&&(u=k);do{if(e=t,o[e+s]==b&&o[e+s-1]==h&&o[e]==o[a]&&o[++e]==o[a+1]){a+=2,e++;do{}while(o[++a]==o[++e]&&o[++a]==o[++e]&&o[++a]==o[++e]&&o[++a]==o[++e]&&o[++a]==o[++e]&&o[++a]==o[++e]&&o[++a]==o[++e]&&o[++a]==o[++e]&&a<c);if(n=258-(c-a),a=c-258,n>s){if(m=t,s=n,n>=u)break;h=o[a+s-1],b=o[a+s]}}}while((t=65535&d[t&f])>_&&0!=--i);return s<=k?s:k}function ft(e){return e.total_in=e.total_out=0,e.msg=null,t.pending=0,t.pending_out=0,n=113,a=0,q.dyn_tree=z,q.stat_desc=I.static_l_desc,K.dyn_tree=B,K.stat_desc=I.static_d_desc,R.dyn_tree=V,R.stat_desc=I.static_bl_desc,N=0,Q=0,J=8,X(),function(){_=2*r,u[c-1]=0;for(let t=0;t<c-1;t++)u[t]=0;M=S[D].max_lazy,P=S[D].good_length,T=S[D].nice_length,E=S[D].max_chain,v=0,x=0,k=0,p=A=2,y=0,f=0}(),0}t.depth=[],t.bl_count=[],t.heap=[],z=[],B=[],V=[],t.pqdownheap=function(e,n){const i=t.heap,a=i[n];let r=n<<1;for(;r<=t.heap_len&&(r<t.heap_len&&j(e,i[r+1],i[r],t.depth)&&r++,!j(e,a,i[r],t.depth));)i[n]=i[r],n=r,r<<=1;i[n]=a},t.deflateInit=function(e,n,a,_,f,x){return _||(_=8),f||(f=8),x||(x=0),e.msg=null,-1==n&&(n=6),f<1||f>9||8!=_||a<9||a>15||n<0||n>9||x<0||x>2?-2:(e.dstate=t,s=a,r=1<<s,l=r-1,h=f+7,c=1<<h,b=c-1,w=Math.floor((h+3-1)/3),o=new Uint8Array(2*r),d=[],u=[],H=1<<f+6,t.pending_buf=new Uint8Array(4*H),i=4*H,F=Math.floor(H/2),W=3*H,D=n,O=x,ft(e))},t.deflateEnd=function(){return 42!=n&&113!=n&&666!=n?-2:(t.pending_buf=null,u=null,d=null,o=null,t.dstate=null,113==n?-3:0)},t.deflateParams=function(t,e,n){let i=0;return-1==e&&(e=6),e<0||e>9||n<0||n>2?-2:(S[D].func!=S[e].func&&0!==t.total_in&&(i=t.deflate(1)),D!=e&&(D=e,M=S[D].max_lazy,P=S[D].good_length,T=S[D].nice_length,E=S[D].max_chain),O=n,i)},t.deflateSetDictionary=function(t,e,i){let a,s=i,_=0;if(!e||42!=n)return-2;if(s<3)return 0;for(s>r-262&&(s=r-262,_=i-s),o.set(e.subarray(_,_+s),0),v=s,x=s,f=255&o[0],f=(f<<w^255&o[1])&b,a=0;a<=s-3;a++)f=(f<<w^255&o[a+2])&b,d[a&l]=u[f],u[f]=a;return 0},t.deflate=function(_,h){let U,E,j,P,T;if(h>4||h<0)return-2;if(!_.next_out||!_.next_in&&0!==_.avail_in||666==n&&4!=h)return _.msg=C[4],-2;if(0===_.avail_out)return _.msg=C[7],-5;var z;if(e=_,P=a,a=h,42==n&&(E=8+(s-8<<4)<<8,j=(D-1&255)>>1,j>3&&(j=3),E|=j<<6,0!==v&&(E|=32),E+=31-E%31,n=113,Z((z=E)>>8&255),Z(255&z)),0!==t.pending){if(e.flush_pending(),0===e.avail_out)return a=-1,0}else if(0===e.avail_in&&h<=P&&4!=h)return e.msg=C[7],-5;if(666==n&&0!==e.avail_in)return _.msg=C[7],-5;if(0!==e.avail_in||0!==k||0!=h&&666!=n){switch(T=-1,S[D].func){case 0:T=function(t){let n,a=65535;for(a>i-5&&(a=i-5);;){if(k<=1){if(dt(),0===k&&0==t)return 0;if(0===k)break}if(v+=k,k=0,n=x+a,(0===v||v>=n)&&(k=v-n,v=n,_t(!1),0===e.avail_out))return 0;if(v-x>=r-262&&(_t(!1),0===e.avail_out))return 0}return _t(4==t),0===e.avail_out?4==t?2:0:4==t?3:1}(h);break;case 1:T=function(t){let n,i=0;for(;;){if(k<262){if(dt(),k<262&&0==t)return 0;if(0===k)break}if(k>=3&&(f=(f<<w^255&o[v+2])&b,i=65535&u[f],d[v&l]=u[f],u[f]=v),0!==i&&(v-i&65535)<=r-262&&2!=O&&(p=ut(i)),p>=3)if(n=at(v-m,p-3),k-=p,p<=M&&k>=3){p--;do{v++,f=(f<<w^255&o[v+2])&b,i=65535&u[f],d[v&l]=u[f],u[f]=v}while(0!=--p);v++}else v+=p,p=0,f=255&o[v],f=(f<<w^255&o[v+1])&b;else n=at(0,255&o[v]),k--,v++;if(n&&(_t(!1),0===e.avail_out))return 0}return _t(4==t),0===e.avail_out?4==t?2:0:4==t?3:1}(h);break;case 2:T=function(t){let n,i,a=0;for(;;){if(k<262){if(dt(),k<262&&0==t)return 0;if(0===k)break}if(k>=3&&(f=(f<<w^255&o[v+2])&b,a=65535&u[f],d[v&l]=u[f],u[f]=v),A=p,g=m,p=2,0!==a&&A<M&&(v-a&65535)<=r-262&&(2!=O&&(p=ut(a)),p<=5&&(1==O||3==p&&v-m>4096)&&(p=2)),A>=3&&p<=A){i=v+k-3,n=at(v-1-g,A-3),k-=A-1,A-=2;do{++v<=i&&(f=(f<<w^255&o[v+2])&b,a=65535&u[f],d[v&l]=u[f],u[f]=v)}while(0!=--A);if(y=0,p=2,v++,n&&(_t(!1),0===e.avail_out))return 0}else if(0!==y){if(n=at(0,255&o[v-1]),n&&_t(!1),v++,k--,0===e.avail_out)return 0}else y=1,v++,k--}return 0!==y&&(n=at(0,255&o[v-1]),y=0),_t(4==t),0===e.avail_out?4==t?2:0:4==t?3:1}(h)}if(2!=T&&3!=T||(n=666),0==T||2==T)return 0===e.avail_out&&(a=-1),0;if(1==T){if(1==h)tt(2,3),et(256,I.static_ltree),it(),1+J+10-Q<9&&(tt(2,3),et(256,I.static_ltree),it()),J=7;else if(lt(0,0,!1),3==h)for(U=0;U<c;U++)u[U]=0;if(e.flush_pending(),0===e.avail_out)return a=-1,0}}return 4!=h?0:1}}function D(){const t=this;t.next_in_index=0,t.next_out_index=0,t.avail_in=0,t.total_in=0,t.avail_out=0,t.total_out=0}function O(t){const e=new D,n=512,i=new Uint8Array(n);let a=t?t.level:-1;void 0===a&&(a=-1),e.deflateInit(a),e.next_out=i,this.append=function(t,a){let r,s,l=0,o=0,_=0;const d=[];if(t.length){e.next_in_index=0,e.next_in=t,e.avail_in=t.length;do{if(e.next_out_index=0,e.avail_out=n,r=e.deflate(0),0!=r)throw new Error("deflating: "+e.msg);e.next_out_index&&(e.next_out_index==n?d.push(new Uint8Array(i)):d.push(new Uint8Array(i.subarray(0,e.next_out_index)))),_+=e.next_out_index,a&&e.next_in_index>0&&e.next_in_index!=l&&(a(e.next_in_index),l=e.next_in_index)}while(e.avail_in>0||0===e.avail_out);return s=new Uint8Array(_),d.forEach((function(t){s.set(t,o),o+=t.length})),s}},this.flush=function(){let t,a,r=0,s=0;const l=[];do{if(e.next_out_index=0,e.avail_out=n,t=e.deflate(4),1!=t&&0!=t)throw new Error("deflating: "+e.msg);n-e.avail_out>0&&l.push(new Uint8Array(i.subarray(0,e.next_out_index))),s+=e.next_out_index}while(e.avail_in>0||0===e.avail_out);return e.deflateEnd(),a=new Uint8Array(s),l.forEach((function(t){a.set(t,r),r+=t.length})),a}}D.prototype={deflateInit:function(t,e){const n=this;return n.dstate=new M,e||(e=15),n.dstate.deflateInit(n,t,e)},deflate:function(t){const e=this;return e.dstate?e.dstate.deflate(e,t):-2},deflateEnd:function(){const t=this;if(!t.dstate)return-2;const e=t.dstate.deflateEnd();return t.dstate=null,e},deflateParams:function(t,e){const n=this;return n.dstate?n.dstate.deflateParams(n,t,e):-2},deflateSetDictionary:function(t,e){const n=this;return n.dstate?n.dstate.deflateSetDictionary(n,t,e):-2},read_buf:function(t,e,n){const i=this;let a=i.avail_in;return a>n&&(a=n),0===a?0:(i.avail_in-=a,t.set(i.next_in.subarray(i.next_in_index,i.next_in_index+a),e),i.next_in_index+=a,i.total_in+=a,a)},flush_pending:function(){const t=this;let e=t.dstate.pending;e>t.avail_out&&(e=t.avail_out),0!==e&&(t.next_out.set(t.dstate.pending_buf.subarray(t.dstate.pending_out,t.dstate.pending_out+e),t.next_out_index),t.next_out_index+=e,t.dstate.pending_out+=e,t.total_out+=e,t.avail_out-=e,t.dstate.pending-=e,0===t.dstate.pending&&(t.dstate.pending_out=0))}};const P=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],T=[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],z=[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],B=[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],V=[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],q=[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],K=[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 R(){let t,e,n,i,a,r;function s(t,e,s,l,o,_,d,u,f,c,h){let b,w,x,p,g,y,v,m,k,A,U,I,E,S,C;A=0,g=s;do{n[t[e+A]]++,A++,g--}while(0!==g);if(n[0]==s)return d[0]=-1,u[0]=0,0;for(m=u[0],y=1;y<=15&&0===n[y];y++);for(v=y,m<y&&(m=y),g=15;0!==g&&0===n[g];g--);for(x=g,m>g&&(m=g),u[0]=m,S=1<<y;y<g;y++,S<<=1)if((S-=n[y])<0)return-3;if((S-=n[g])<0)return-3;for(n[g]+=S,r[1]=y=0,A=1,E=2;0!=--g;)r[E]=y+=n[A],E++,A++;g=0,A=0;do{0!==(y=t[e+A])&&(h[r[y]++]=g),A++}while(++g<s);for(s=r[x],r[0]=g=0,A=0,p=-1,I=-m,a[0]=0,U=0,C=0;v<=x;v++)for(b=n[v];0!=b--;){for(;v>I+m;){if(p++,I+=m,C=x-I,C=C>m?m:C,(w=1<<(y=v-I))>b+1&&(w-=b+1,E=v,y<C))for(;++y<C&&!((w<<=1)<=n[++E]);)w-=n[E];if(C=1<<y,c[0]+C>1440)return-3;a[p]=U=c[0],c[0]+=C,0!==p?(r[p]=g,i[0]=y,i[1]=m,y=g>>>I-m,i[2]=U-a[p-1]-y,f.set(i,3*(a[p-1]+y))):d[0]=U}for(i[1]=v-I,A>=s?i[0]=192:h[A]<l?(i[0]=h[A]<256?0:96,i[2]=h[A++]):(i[0]=_[h[A]-l]+16+64,i[2]=o[h[A++]-l]),w=1<<v-I,y=g>>>I;y<C;y+=w)f.set(i,3*(U+y));for(y=1<<v-1;0!=(g&y);y>>>=1)g^=y;for(g^=y,k=(1<<I)-1;(g&k)!=r[p];)p--,I-=m,k=(1<<I)-1}return 0!==S&&1!=x?-5:0}function l(s){let l;for(t||(t=[],e=[],n=new Int32Array(16),i=[],a=new Int32Array(15),r=new Int32Array(16)),e.length<s&&(e=[]),l=0;l<s;l++)e[l]=0;for(l=0;l<16;l++)n[l]=0;for(l=0;l<3;l++)i[l]=0;a.set(n.subarray(0,15),0),r.set(n.subarray(0,16),0)}this.inflate_trees_bits=function(n,i,a,r,o){let _;return l(19),t[0]=0,_=s(n,0,19,19,null,null,a,i,r,t,e),-3==_?o.msg="oversubscribed dynamic bit lengths tree":-5!=_&&0!==i[0]||(o.msg="incomplete dynamic bit lengths tree",_=-3),_},this.inflate_trees_dynamic=function(n,i,a,r,o,_,d,u,f){let c;return l(288),t[0]=0,c=s(a,0,n,257,B,V,_,r,u,t,e),0!=c||0===r[0]?(-3==c?f.msg="oversubscribed literal/length tree":-4!=c&&(f.msg="incomplete literal/length tree",c=-3),c):(l(288),c=s(a,n,i,0,q,K,d,o,u,t,e),0!=c||0===o[0]&&n>257?(-3==c?f.msg="oversubscribed distance tree":-5==c?(f.msg="incomplete distance tree",c=-3):-4!=c&&(f.msg="empty distance tree with lengths",c=-3),c):0)}}function W(){const t=this;let e,n,i,a,r=0,s=0,l=0,o=0,_=0,d=0,u=0,f=0,c=0,h=0;function b(t,e,n,i,a,r,s,l){let o,_,d,u,f,c,h,b,w,x,p,g,y,v,m,k;h=l.next_in_index,b=l.avail_in,f=s.bitb,c=s.bitk,w=s.write,x=w<s.read?s.read-w-1:s.end-w,p=P[t],g=P[e];do{for(;c<20;)b--,f|=(255&l.read_byte(h++))<<c,c+=8;if(o=f&p,_=n,d=i,k=3*(d+o),0!==(u=_[k]))for(;;){if(f>>=_[k+1],c-=_[k+1],0!=(16&u)){for(u&=15,y=_[k+2]+(f&P[u]),f>>=u,c-=u;c<15;)b--,f|=(255&l.read_byte(h++))<<c,c+=8;for(o=f&g,_=a,d=r,k=3*(d+o),u=_[k];;){if(f>>=_[k+1],c-=_[k+1],0!=(16&u)){for(u&=15;c<u;)b--,f|=(255&l.read_byte(h++))<<c,c+=8;if(v=_[k+2]+(f&P[u]),f>>=u,c-=u,x-=y,w>=v)m=w-v,w-m>0&&2>w-m?(s.window[w++]=s.window[m++],s.window[w++]=s.window[m++],y-=2):(s.window.set(s.window.subarray(m,m+2),w),w+=2,m+=2,y-=2);else{m=w-v;do{m+=s.end}while(m<0);if(u=s.end-m,y>u){if(y-=u,w-m>0&&u>w-m)do{s.window[w++]=s.window[m++]}while(0!=--u);else s.window.set(s.window.subarray(m,m+u),w),w+=u,m+=u,u=0;m=0}}if(w-m>0&&y>w-m)do{s.window[w++]=s.window[m++]}while(0!=--y);else s.window.set(s.window.subarray(m,m+y),w),w+=y,m+=y,y=0;break}if(0!=(64&u))return l.msg="invalid distance code",y=l.avail_in-b,y=c>>3<y?c>>3:y,b+=y,h-=y,c-=y<<3,s.bitb=f,s.bitk=c,l.avail_in=b,l.total_in+=h-l.next_in_index,l.next_in_index=h,s.write=w,-3;o+=_[k+2],o+=f&P[u],k=3*(d+o),u=_[k]}break}if(0!=(64&u))return 0!=(32&u)?(y=l.avail_in-b,y=c>>3<y?c>>3:y,b+=y,h-=y,c-=y<<3,s.bitb=f,s.bitk=c,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=c>>3<y?c>>3:y,b+=y,h-=y,c-=y<<3,s.bitb=f,s.bitk=c,l.avail_in=b,l.total_in+=h-l.next_in_index,l.next_in_index=h,s.write=w,-3);if(o+=_[k+2],o+=f&P[u],k=3*(d+o),0===(u=_[k])){f>>=_[k+1],c-=_[k+1],s.window[w++]=_[k+2],x--;break}}else f>>=_[k+1],c-=_[k+1],s.window[w++]=_[k+2],x--}while(x>=258&&b>=10);return y=l.avail_in-b,y=c>>3<y?c>>3:y,b+=y,h-=y,c-=y<<3,s.bitb=f,s.bitk=c,l.avail_in=b,l.total_in+=h-l.next_in_index,l.next_in_index=h,s.write=w,0}t.init=function(t,r,s,l,o,_){e=0,u=t,f=r,i=s,c=l,a=o,h=_,n=null},t.proc=function(t,w,x){let p,g,y,v,m,k,A,U=0,I=0,E=0;for(E=w.next_in_index,v=w.avail_in,U=t.bitb,I=t.bitk,m=t.write,k=m<t.read?t.read-m-1:t.end-m;;)switch(e){case 0:if(k>=258&&v>=10&&(t.bitb=U,t.bitk=I,w.avail_in=v,w.total_in+=E-w.next_in_index,w.next_in_index=E,t.write=m,x=b(u,f,i,c,a,h,t,w),E=w.next_in_index,v=w.avail_in,U=t.bitb,I=t.bitk,m=t.write,k=m<t.read?t.read-m-1:t.end-m,0!=x)){e=1==x?7:9;break}l=u,n=i,s=c,e=1;case 1:for(p=l;I<p;){if(0===v)return t.bitb=U,t.bitk=I,w.avail_in=v,w.total_in+=E-w.next_in_index,w.next_in_index=E,t.write=m,t.inflate_flush(w,x);x=0,v--,U|=(255&w.read_byte(E++))<<I,I+=8}if(g=3*(s+(U&P[p])),U>>>=n[g+1],I-=n[g+1],y=n[g],0===y){o=n[g+2],e=6;break}if(0!=(16&y)){_=15&y,r=n[g+2],e=2;break}if(0==(64&y)){l=y,s=g/3+n[g+2];break}if(0!=(32&y)){e=7;break}return e=9,w.msg="invalid literal/length code",x=-3,t.bitb=U,t.bitk=I,w.avail_in=v,w.total_in+=E-w.next_in_index,w.next_in_index=E,t.write=m,t.inflate_flush(w,x);case 2:for(p=_;I<p;){if(0===v)return t.bitb=U,t.bitk=I,w.avail_in=v,w.total_in+=E-w.next_in_index,w.next_in_index=E,t.write=m,t.inflate_flush(w,x);x=0,v--,U|=(255&w.read_byte(E++))<<I,I+=8}r+=U&P[p],U>>=p,I-=p,l=f,n=a,s=h,e=3;case 3:for(p=l;I<p;){if(0===v)return t.bitb=U,t.bitk=I,w.avail_in=v,w.total_in+=E-w.next_in_index,w.next_in_index=E,t.write=m,t.inflate_flush(w,x);x=0,v--,U|=(255&w.read_byte(E++))<<I,I+=8}if(g=3*(s+(U&P[p])),U>>=n[g+1],I-=n[g+1],y=n[g],0!=(16&y)){_=15&y,d=n[g+2],e=4;break}if(0==(64&y)){l=y,s=g/3+n[g+2];break}return e=9,w.msg="invalid distance code",x=-3,t.bitb=U,t.bitk=I,w.avail_in=v,w.total_in+=E-w.next_in_index,w.next_in_index=E,t.write=m,t.inflate_flush(w,x);case 4:for(p=_;I<p;){if(0===v)return t.bitb=U,t.bitk=I,w.avail_in=v,w.total_in+=E-w.next_in_index,w.next_in_index=E,t.write=m,t.inflate_flush(w,x);x=0,v--,U|=(255&w.read_byte(E++))<<I,I+=8}d+=U&P[p],U>>=p,I-=p,e=5;case 5:for(A=m-d;A<0;)A+=t.end;for(;0!==r;){if(0===k&&(m==t.end&&0!==t.read&&(m=0,k=m<t.read?t.read-m-1:t.end-m),0===k&&(t.write=m,x=t.inflate_flush(w,x),m=t.write,k=m<t.read?t.read-m-1:t.end-m,m==t.end&&0!==t.read&&(m=0,k=m<t.read?t.read-m-1:t.end-m),0===k)))return t.bitb=U,t.bitk=I,w.avail_in=v,w.total_in+=E-w.next_in_index,w.next_in_index=E,t.write=m,t.inflate_flush(w,x);t.window[m++]=t.window[A++],k--,A==t.end&&(A=0),r--}e=0;break;case 6:if(0===k&&(m==t.end&&0!==t.read&&(m=0,k=m<t.read?t.read-m-1:t.end-m),0===k&&(t.write=m,x=t.inflate_flush(w,x),m=t.write,k=m<t.read?t.read-m-1:t.end-m,m==t.end&&0!==t.read&&(m=0,k=m<t.read?t.read-m-1:t.end-m),0===k)))return t.bitb=U,t.bitk=I,w.avail_in=v,w.total_in+=E-w.next_in_index,w.next_in_index=E,t.write=m,t.inflate_flush(w,x);x=0,t.window[m++]=o,k--,e=0;break;case 7:if(I>7&&(I-=8,v++,E--),t.write=m,x=t.inflate_flush(w,x),m=t.write,k=m<t.read?t.read-m-1:t.end-m,t.read!=t.write)return t.bitb=U,t.bitk=I,w.avail_in=v,w.total_in+=E-w.next_in_index,w.next_in_index=E,t.write=m,t.inflate_flush(w,x);e=8;case 8:return x=1,t.bitb=U,t.bitk=I,w.avail_in=v,w.total_in+=E-w.next_in_index,w.next_in_index=E,t.write=m,t.inflate_flush(w,x);case 9:return x=-3,t.bitb=U,t.bitk=I,w.avail_in=v,w.total_in+=E-w.next_in_index,w.next_in_index=E,t.write=m,t.inflate_flush(w,x);default:return x=-2,t.bitb=U,t.bitk=I,w.avail_in=v,w.total_in+=E-w.next_in_index,w.next_in_index=E,t.write=m,t.inflate_flush(w,x)}},t.free=function(){}}R.inflate_trees_fixed=function(t,e,n,i){return t[0]=9,e[0]=5,n[0]=T,i[0]=z,0};const H=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function L(t,e){const n=this;let i,a=0,r=0,s=0,l=0;const o=[0],_=[0],d=new W;let u=0,f=new Int32Array(4320);const c=new R;n.bitk=0,n.bitb=0,n.window=new Uint8Array(e),n.end=e,n.read=0,n.write=0,n.reset=function(t,e){e&&(e[0]=0),6==a&&d.free(t),a=0,n.bitk=0,n.bitb=0,n.read=n.write=0},n.reset(t,null),n.inflate_flush=function(t,e){let i,a,r;return a=t.next_out_index,r=n.read,i=(r<=n.write?n.write:n.end)-r,i>t.avail_out&&(i=t.avail_out),0!==i&&-5==e&&(e=0),t.avail_out-=i,t.total_out+=i,t.next_out.set(n.window.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>t.avail_out&&(i=t.avail_out),0!==i&&-5==e&&(e=0),t.avail_out-=i,t.total_out+=i,t.next_out.set(n.window.subarray(r,r+i),a),a+=i,r+=i),t.next_out_index=a,n.read=r,e},n.proc=function(t,e){let h,b,w,x,p,g,y,v;for(x=t.next_in_index,p=t.avail_in,b=n.bitb,w=n.bitk,g=n.write,y=g<n.read?n.read-g-1:n.end-g;;){let m,k,A,U,I,E,S,C;switch(a){case 0:for(;w<3;){if(0===p)return n.bitb=b,n.bitk=w,t.avail_in=p,t.total_in+=x-t.next_in_index,t.next_in_index=x,n.write=g,n.inflate_flush(t,e);e=0,p--,b|=(255&t.read_byte(x++))<<w,w+=8}switch(h=7&b,u=1&h,h>>>1){case 0:b>>>=3,w-=3,h=7&w,b>>>=h,w-=h,a=1;break;case 1:m=[],k=[],A=[[]],U=[[]],R.inflate_trees_fixed(m,k,A,U),d.init(m[0],k[0],A[0],0,U[0],0),b>>>=3,w-=3,a=6;break;case 2:b>>>=3,w-=3,a=3;break;case 3:return b>>>=3,w-=3,a=9,t.msg="invalid block type",e=-3,n.bitb=b,n.bitk=w,t.avail_in=p,t.total_in+=x-t.next_in_index,t.next_in_index=x,n.write=g,n.inflate_flush(t,e)}break;case 1:for(;w<32;){if(0===p)return n.bitb=b,n.bitk=w,t.avail_in=p,t.total_in+=x-t.next_in_index,t.next_in_index=x,n.write=g,n.inflate_flush(t,e);e=0,p--,b|=(255&t.read_byte(x++))<<w,w+=8}if((~b>>>16&65535)!=(65535&b))return a=9,t.msg="invalid stored block lengths",e=-3,n.bitb=b,n.bitk=w,t.avail_in=p,t.total_in+=x-t.next_in_index,t.next_in_index=x,n.write=g,n.inflate_flush(t,e);r=65535&b,b=w=0,a=0!==r?2:0!==u?7:0;break;case 2:if(0===p)return n.bitb=b,n.bitk=w,t.avail_in=p,t.total_in+=x-t.next_in_index,t.next_in_index=x,n.write=g,n.inflate_flush(t,e);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,e=n.inflate_flush(t,e),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=b,n.bitk=w,t.avail_in=p,t.total_in+=x-t.next_in_index,t.next_in_index=x,n.write=g,n.inflate_flush(t,e);if(e=0,h=r,h>p&&(h=p),h>y&&(h=y),n.window.set(t.read_buf(x,h),g),x+=h,p-=h,g+=h,y-=h,0!=(r-=h))break;a=0!==u?7:0;break;case 3:for(;w<14;){if(0===p)return n.bitb=b,n.bitk=w,t.avail_in=p,t.total_in+=x-t.next_in_index,t.next_in_index=x,n.write=g,n.inflate_flush(t,e);e=0,p--,b|=(255&t.read_byte(x++))<<w,w+=8}if(s=h=16383&b,(31&h)>29||(h>>5&31)>29)return a=9,t.msg="too many length or distance symbols",e=-3,n.bitb=b,n.bitk=w,t.avail_in=p,t.total_in+=x-t.next_in_index,t.next_in_index=x,n.write=g,n.inflate_flush(t,e);if(h=258+(31&h)+(h>>5&31),!i||i.length<h)i=[];else for(v=0;v<h;v++)i[v]=0;b>>>=14,w-=14,l=0,a=4;case 4:for(;l<4+(s>>>10);){for(;w<3;){if(0===p)return n.bitb=b,n.bitk=w,t.avail_in=p,t.total_in+=x-t.next_in_index,t.next_in_index=x,n.write=g,n.inflate_flush(t,e);e=0,p--,b|=(255&t.read_byte(x++))<<w,w+=8}i[H[l++]]=7&b,b>>>=3,w-=3}for(;l<19;)i[H[l++]]=0;if(o[0]=7,h=c.inflate_trees_bits(i,o,_,f,t),0!=h)return-3==(e=h)&&(i=null,a=9),n.bitb=b,n.bitk=w,t.avail_in=p,t.total_in+=x-t.next_in_index,t.next_in_index=x,n.write=g,n.inflate_flush(t,e);l=0,a=5;case 5:for(;h=s,!(l>=258+(31&h)+(h>>5&31));){let r,d;for(h=o[0];w<h;){if(0===p)return n.bitb=b,n.bitk=w,t.avail_in=p,t.total_in+=x-t.next_in_index,t.next_in_index=x,n.write=g,n.inflate_flush(t,e);e=0,p--,b|=(255&t.read_byte(x++))<<w,w+=8}if(h=f[3*(_[0]+(b&P[h]))+1],d=f[3*(_[0]+(b&P[h]))+2],d<16)b>>>=h,w-=h,i[l++]=d;else{for(v=18==d?7:d-14,r=18==d?11:3;w<h+v;){if(0===p)return n.bitb=b,n.bitk=w,t.avail_in=p,t.total_in+=x-t.next_in_index,t.next_in_index=x,n.write=g,n.inflate_flush(t,e);e=0,p--,b|=(255&t.read_byte(x++))<<w,w+=8}if(b>>>=h,w-=h,r+=b&P[v],b>>>=v,w-=v,v=l,h=s,v+r>258+(31&h)+(h>>5&31)||16==d&&v<1)return i=null,a=9,t.msg="invalid bit length repeat",e=-3,n.bitb=b,n.bitk=w,t.avail_in=p,t.total_in+=x-t.next_in_index,t.next_in_index=x,n.write=g,n.inflate_flush(t,e);d=16==d?i[v-1]:0;do{i[v++]=d}while(0!=--r);l=v}}if(_[0]=-1,I=[],E=[],S=[],C=[],I[0]=9,E[0]=6,h=s,h=c.inflate_trees_dynamic(257+(31&h),1+(h>>5&31),i,I,E,S,C,f,t),0!=h)return-3==h&&(i=null,a=9),e=h,n.bitb=b,n.bitk=w,t.avail_in=p,t.total_in+=x-t.next_in_index,t.next_in_index=x,n.write=g,n.inflate_flush(t,e);d.init(I[0],E[0],f,S[0],f,C[0]),a=6;case 6:if(n.bitb=b,n.bitk=w,t.avail_in=p,t.total_in+=x-t.next_in_index,t.next_in_index=x,n.write=g,1!=(e=d.proc(n,t,e)))return n.inflate_flush(t,e);if(e=0,d.free(t),x=t.next_in_index,p=t.avail_in,b=n.bitb,w=n.bitk,g=n.write,y=g<n.read?n.read-g-1:n.end-g,0===u){a=0;break}a=7;case 7:if(n.write=g,e=n.inflate_flush(t,e),g=n.write,y=g<n.read?n.read-g-1:n.end-g,n.read!=n.write)return n.bitb=b,n.bitk=w,t.avail_in=p,t.total_in+=x-t.next_in_index,t.next_in_index=x,n.write=g,n.inflate_flush(t,e);a=8;case 8:return e=1,n.bitb=b,n.bitk=w,t.avail_in=p,t.total_in+=x-t.next_in_index,t.next_in_index=x,n.write=g,n.inflate_flush(t,e);case 9:return e=-3,n.bitb=b,n.bitk=w,t.avail_in=p,t.total_in+=x-t.next_in_index,t.next_in_index=x,n.write=g,n.inflate_flush(t,e);default:return e=-2,n.bitb=b,n.bitk=w,t.avail_in=p,t.total_in+=x-t.next_in_index,t.next_in_index=x,n.write=g,n.inflate_flush(t,e)}}},n.free=function(t){n.reset(t,null),n.window=null,f=null},n.set_dictionary=function(t,e,i){n.window.set(t.subarray(e,e+i),0),n.read=n.write=i},n.sync_point=function(){return 1==a?1:0}}const F=[0,0,255,255];function G(){const t=this;function e(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):-2}t.mode=0,t.method=0,t.was=[0],t.need=0,t.marker=0,t.wbits=0,t.inflateEnd=function(e){return t.blocks&&t.blocks.free(e),t.blocks=null,0},t.inflateInit=function(n,i){return n.msg=null,t.blocks=null,i<8||i>15?(t.inflateEnd(n),-2):(t.wbits=i,n.istate.blocks=new L(n,1<<i),e(n),0)},t.inflate=function(t,e){let n,i;if(!t||!t.istate||!t.next_in)return-2;const a=t.istate;for(e=4==e?-5:0,n=-5;;)switch(a.mode){case 0:if(0===t.avail_in)return n;if(n=e,t.avail_in--,t.total_in++,8!=(15&(a.method=t.read_byte(t.next_in_index++)))){a.mode=13,t.msg="unknown compression method",a.marker=5;break}if(8+(a.method>>4)>a.wbits){a.mode=13,t.msg="invalid window size",a.marker=5;break}a.mode=1;case 1:if(0===t.avail_in)return n;if(n=e,t.avail_in--,t.total_in++,i=255&t.read_byte(t.next_in_index++),((a.method<<8)+i)%31!=0){a.mode=13,t.msg="incorrect header check",a.marker=5;break}if(0==(32&i)){a.mode=7;break}a.mode=2;case 2:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,a.need=(255&t.read_byte(t.next_in_index++))<<24&4278190080,a.mode=3;case 3:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,a.need+=(255&t.read_byte(t.next_in_index++))<<16&16711680,a.mode=4;case 4:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,a.need+=(255&t.read_byte(t.next_in_index++))<<8&65280,a.mode=5;case 5:return 0===t.avail_in?n:(n=e,t.avail_in--,t.total_in++,a.need+=255&t.read_byte(t.next_in_index++),a.mode=6,2);case 6:return a.mode=13,t.msg="need dictionary",a.marker=0,-2;case 7:if(n=a.blocks.proc(t,n),-3==n){a.mode=13,a.marker=0;break}if(0==n&&(n=e),1!=n)return n;n=e,a.blocks.reset(t,a.was),a.mode=12;case 12:return 1;case 13:return-3;default:return-2}},t.inflateSetDictionary=function(t,e,n){let i=0,a=n;if(!t||!t.istate||6!=t.istate.mode)return-2;const r=t.istate;return a>=1<<r.wbits&&(a=(1<<r.wbits)-1,i=n-a),r.blocks.set_dictionary(e,i,a),r.mode=7,0},t.inflateSync=function(t){let n,i,a,r,s;if(!t||!t.istate)return-2;const l=t.istate;if(13!=l.mode&&(l.mode=13,l.marker=0),0===(n=t.avail_in))return-5;for(i=t.next_in_index,a=l.marker;0!==n&&a<4;)t.read_byte(i)==F[a]?a++:a=0!==t.read_byte(i)?0:4-a,i++,n--;return t.total_in+=i-t.next_in_index,t.next_in_index=i,t.avail_in=n,l.marker=a,4!=a?-3:(r=t.total_in,s=t.total_out,e(t),t.total_in=r,t.total_out=s,l.mode=7,0)},t.inflateSyncPoint=function(t){return t&&t.istate&&t.istate.blocks?t.istate.blocks.sync_point():-2}}function J(){}function N(){const t=new J,e=new Uint8Array(512);let n=!1;t.inflateInit(),t.next_out=e,this.append=function(i,a){const r=[];let s,l,o=0,_=0,d=0;if(0!==i.length){t.next_in_index=0,t.next_in=i,t.avail_in=i.length;do{if(t.next_out_index=0,t.avail_out=512,0!==t.avail_in||n||(t.next_in_index=0,n=!0),s=t.inflate(0),n&&-5===s){if(0!==t.avail_in)throw new Error("inflating: bad input")}else if(0!==s&&1!==s)throw new Error("inflating: "+t.msg);if((n||1===s)&&t.avail_in===i.length)throw new Error("inflating: bad input");t.next_out_index&&(512===t.next_out_index?r.push(new Uint8Array(e)):r.push(new Uint8Array(e.subarray(0,t.next_out_index)))),d+=t.next_out_index,a&&t.next_in_index>0&&t.next_in_index!=o&&(a(t.next_in_index),o=t.next_in_index)}while(t.avail_in>0||0===t.avail_out);return l=new Uint8Array(d),r.forEach((function(t){l.set(t,_),_+=t.length})),l}},this.flush=function(){t.inflateEnd()}}J.prototype={inflateInit:function(t){const e=this;return e.istate=new G,t||(t=15),e.istate.inflateInit(e,t)},inflate:function(t){const e=this;return e.istate?e.istate.inflate(e,t):-2},inflateEnd:function(){const t=this;if(!t.istate)return-2;const e=t.istate.inflateEnd(t);return t.istate=null,e},inflateSync:function(){const t=this;return t.istate?t.istate.inflateSync(t):-2},inflateSetDictionary:function(t,e){const n=this;return n.istate?n.istate.inflateSetDictionary(n,t,e):-2},read_byte:function(t){return this.next_in.subarray(t,t+1)[0]},read_buf:function(t,e){return this.next_in.subarray(t,t+e)}},self.initCodec=()=>{self.Deflate=O,self.Inflate=N}}).toString()+")()"]));t({workerScripts:{inflate:[e],deflate:[e]}})};

@@ -6,3 +6,3 @@ {

"license": "BSD-3-Clause",
"version": "2.2.0",
"version": "2.2.1",
"keywords": [

@@ -9,0 +9,0 @@ "zip",

@@ -24,4 +24,4 @@ import { terser } from "rollup-plugin-terser";

name: "worker",
intro: "import { configure } from \"./core/zip-core.js\"; function configureWebWorker() { const uri = URL.createObjectURL(new Blob([`",
outro: "`])); configure({ workerScripts: { inflate: [uri], deflate: [uri] } }); } export default configureWebWorker;",
intro: "import { configure } from './core/zip-core.js'; export default () => { const uri = URL.createObjectURL(new Blob(['(' + (() => {",
outro: "}).toString() + ')()'])); configure({ workerScripts: { inflate: [uri], deflate: [uri] } }); };",
plugins: [

@@ -28,0 +28,0 @@ terser()

@@ -92,3 +92,14 @@ import { terser } from "rollup-plugin-terser";

]
}, {
input: "lib/z-worker.js",
output: [
{
file: "dist/z-worker.js",
format: "iife",
plugins: [
terser()
]
}
]
}
];

@@ -16,3 +16,3 @@ /* eslint-disable no-console */

const blobWriter = new zip.BlobWriter("application/zip");
const zipWriter = new zip.ZipWriter(blobWriter, { password: "password" });
const zipWriter = new zip.ZipWriter(blobWriter, { password: "password", encryptionStrength: 3 });
await zipWriter.add(FILENAME, new zip.BlobReader(BLOB));

@@ -19,0 +19,0 @@ await zipWriter.close();

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc