From 939621a6c4e71b3d83b99b2599deb83332cb452a Mon Sep 17 00:00:00 2001 From: Nicolas Melin Date: Tue, 14 Jan 2025 16:35:52 +0100 Subject: [PATCH 1/5] Clean listeners when USB is disconnected --- src/fastboot.ts | 65 +++++++++++++++++++++++++++++-------------------- 1 file changed, 38 insertions(+), 27 deletions(-) diff --git a/src/fastboot.ts b/src/fastboot.ts index ca221e9..013037b 100644 --- a/src/fastboot.ts +++ b/src/fastboot.ts @@ -214,6 +214,39 @@ export class FastbootDevice { }); } + handleUSBDisconnect = async (event: USBConnectionEvent) => { + if (event.device === this.device) { + common.logDebug("USB device disconnected"); + if (this._disconnectResolve !== null) { + this._disconnectResolve(undefined); + this._disconnectResolve = null; + } + await window.navigator.usb.removeEventListener( + "connect", + this.handleUSBConnect, + ); + await window.navigator.usb.removeEventListener( + "disconnect", + this.handleUSBDisconnect, + ); + } + }; + + handleUSBConnect = async (event: USBConnectionEvent) => { + common.logDebug("USB device connected"); + this.device = event.device; + + let hasPromiseReject = this._connectReject !== null; + + try { + await this._validateAndConnectDevice(); + } catch (error) { + if (!hasPromiseReject) { + throw error; + } + } + }; + /** * Request the user to select a USB device and connect to it using the * fastboot protocol. @@ -245,33 +278,11 @@ export class FastbootDevice { common.logDebug("Using USB device:", this.device); if (!this._registeredUsbListeners) { - navigator.usb.addEventListener("disconnect", (event) => { - if (event.device === this.device) { - common.logDebug("USB device disconnected"); - if (this._disconnectResolve !== null) { - this._disconnectResolve(undefined); - this._disconnectResolve = null; - } - } - }); - - navigator.usb.addEventListener("connect", async (event) => { - common.logDebug("USB device connected"); - this.device = event.device; - - // Check whether waitForConnect() is pending and save it for later - let hasPromiseReject = this._connectReject !== null; - try { - await this._validateAndConnectDevice(); - } catch (error) { - // Only rethrow errors from the event handler if waitForConnect() - // didn't already handle them - if (!hasPromiseReject) { - throw error; - } - } - }); - + navigator.usb.addEventListener( + "disconnect", + this.handleUSBDisconnect, + ); + navigator.usb.addEventListener("connect", this.handleUSBConnect); this._registeredUsbListeners = true; } -- GitLab From cc30abb3a53172ee35f59adf1aeef94d3b8d15a5 Mon Sep 17 00:00:00 2001 From: Nicolas Melin Date: Tue, 14 Jan 2025 17:08:23 +0100 Subject: [PATCH 2/5] Add a gitlab job to publish the package --- .gitlab-ci.yml | 26 ++++++++++++++++++++++++++ package.json | 6 +++--- 2 files changed, 29 insertions(+), 3 deletions(-) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..cb83543 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,26 @@ +default: + image: node:22 + +build: + stage: build + before_script: + - npm install + script: + - npm run build + artifacts: + paths: + - dist/ + rules: + - if: '$CI_COMMIT_TAG' + - if: '$CI_PIPELINE_SOURCE == "merge_request_event"' + +publish: + stage: deploy + script: + - echo "@e:registry=https://${CI_SERVER_HOST}/api/v4/projects/${CI_PROJECT_ID}/packages/npm/" > .npmrc + - echo "//${CI_SERVER_HOST}/api/v4/projects/${CI_PROJECT_ID}/packages/npm/:_authToken=${CI_JOB_TOKEN}" >> .npmrc + - npm publish + dependencies: + - build + rules: + - if: '$CI_COMMIT_TAG' diff --git a/package.json b/package.json index 0b68f2d..9334c2e 100644 --- a/package.json +++ b/package.json @@ -1,9 +1,9 @@ { - "name": "android-fastboot", + "name": "@e/fastboot", "version": "1.1.1", "description": "JavaScript implementation of fastboot, using WebUSB", "main": "dist/fastboot.cjs", - "repository": "https://github.com/kdrag0n/fastboot.js", + "repository": "https://gitlab.e.foundation/e/tools/fastboot.js", "author": "Danny Lin ", "license": "MIT", "dependencies": { @@ -23,7 +23,7 @@ "typescript": "^5.0.4" }, "scripts": { - "build": "rollup -c && cp node_modules/{@zip.js/zip.js/dist/z-worker-pako.js,pako/dist/pako_inflate.min.js} dist/vendor" + "build": "rollup -c && mkdir -p dist/vendor && cp node_modules/@zip.js/zip.js/dist/z-worker-pako.js dist/vendor/ && cp node_modules/pako/dist/pako_inflate.min.js dist/vendor/" }, "files": [ "dist/fastboot.*" -- GitLab From 68ff00cfffee48640a339376995d3c97280184e3 Mon Sep 17 00:00:00 2001 From: Nicolas Gelot Date: Thu, 16 Jan 2025 21:49:30 +0100 Subject: [PATCH 3/5] Fix max download size for radix 10 Fairphone fatsboot returns max-download-size with 10 as radix. --- src/fastboot.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/fastboot.ts b/src/fastboot.ts index 013037b..4f47083 100644 --- a/src/fastboot.ts +++ b/src/fastboot.ts @@ -397,8 +397,14 @@ export class FastbootDevice { "max-download-size" ))!.toLowerCase(); if (resp) { - // AOSP fastboot requires hex - return Math.min(parseInt(resp, 16), MAX_DOWNLOAD_SIZE); + let maxDownloadSize = parseInt(resp, 16); // AOSP fastboot requires hex + if (maxDownloadSize > MAX_DOWNLOAD_SIZE) { + maxDownloadSize = Math.min( + parseInt(resp, 10), + MAX_DOWNLOAD_SIZE + ); // Others fastboot with radix 10 + } + return maxDownloadSize; } } catch (error) { /* Failed = no value, fallthrough */ -- GitLab From d41c42cd5631351676e1329b52cd4ba223c964ac Mon Sep 17 00:00:00 2001 From: Nicolas Gelot Date: Fri, 17 Jan 2025 18:33:22 +0100 Subject: [PATCH 4/5] Remove generated code --- .gitignore | 1 + dist/fastboot.cjs | 9738 ------------------------------- dist/fastboot.cjs.map | 1 - dist/fastboot.min.cjs | 2 - dist/fastboot.min.cjs.map | 1 - dist/fastboot.min.mjs | 2 - dist/fastboot.min.mjs.map | 1 - dist/fastboot.mjs | 9730 ------------------------------ dist/fastboot.mjs.map | 1 - dist/vendor/pako_inflate.min.js | 2 - dist/vendor/z-worker-pako.js | 1 - 11 files changed, 1 insertion(+), 19479 deletions(-) delete mode 100644 dist/fastboot.cjs delete mode 100644 dist/fastboot.cjs.map delete mode 100644 dist/fastboot.min.cjs delete mode 100644 dist/fastboot.min.cjs.map delete mode 100644 dist/fastboot.min.mjs delete mode 100644 dist/fastboot.min.mjs.map delete mode 100644 dist/fastboot.mjs delete mode 100644 dist/fastboot.mjs.map delete mode 100644 dist/vendor/pako_inflate.min.js delete mode 100644 dist/vendor/z-worker-pako.js diff --git a/.gitignore b/.gitignore index c2658d7..b947077 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ node_modules/ +dist/ diff --git a/dist/fastboot.cjs b/dist/fastboot.cjs deleted file mode 100644 index 7ee5f5e..0000000 --- a/dist/fastboot.cjs +++ /dev/null @@ -1,9738 +0,0 @@ -'use strict'; - -const ZIP_ENTRY_HEADER_BEGIN_LENGTH = 30; // bytes -var DebugLevel; -(function (DebugLevel) { - DebugLevel[DebugLevel["Silent"] = 0] = "Silent"; - DebugLevel[DebugLevel["Debug"] = 1] = "Debug"; - DebugLevel[DebugLevel["Verbose"] = 2] = "Verbose"; -})(DebugLevel || (DebugLevel = {})); -let debugLevel = DebugLevel.Silent; -function logDebug(...data) { - if (debugLevel >= 1) { - console.log(...data); - } -} -function logVerbose(...data) { - if (debugLevel >= 2) { - console.log(...data); - } -} -/** - * Change the debug level for the fastboot client: - * - 0 = silent - * - 1 = debug, recommended for general use - * - 2 = verbose, for debugging only - * - * @param {number} level - Debug level to use. - */ -function setDebugLevel(level) { - debugLevel = level; -} -/** - * Reads all of the data in the given blob and returns it as an ArrayBuffer. - * - * @param {Blob} blob - Blob with the data to read. - * @returns {Promise} ArrayBuffer containing data from the blob. - * @ignore - */ -function readBlobAsBuffer(blob) { - return new Promise((resolve, reject) => { - let reader = new FileReader(); - reader.onload = () => { - resolve(reader.result); - }; - reader.onerror = () => { - reject(reader.error); - }; - reader.readAsArrayBuffer(blob); - }); -} -function waitForFrame() { - return new Promise((resolve, _reject) => { - window.requestAnimationFrame(resolve); - }); -} -async function runWithTimedProgress(onProgress, action, item, duration, workPromise) { - let startTime = new Date().getTime(); - let stop = false; - onProgress(action, item, 0.0); - let progressPromise = (async () => { - let now; - let targetTime = startTime + duration; - do { - now = new Date().getTime(); - onProgress(action, item, (now - startTime) / duration); - await waitForFrame(); - } while (!stop && now < targetTime); - })(); - await Promise.race([progressPromise, workPromise]); - stop = true; - await progressPromise; - await workPromise; - onProgress(action, item, 1.0); -} -/** Exception class for operations that exceeded their timeout duration. */ -class TimeoutError extends Error { - constructor(timeout) { - super(`Timeout of ${timeout} ms exceeded`); - this.name = "TimeoutError"; - this.timeout = timeout; - } -} -function runWithTimeout(promise, timeout) { - return new Promise((resolve, reject) => { - // Set up timeout - let timedOut = false; - let tid = setTimeout(() => { - // Set sentinel first to prevent race in promise resolving - timedOut = true; - reject(new TimeoutError(timeout)); - }, timeout); - // Passthrough - promise - .then((val) => { - if (!timedOut) { - resolve(val); - } - }) - .catch((err) => { - if (!timedOut) { - reject(err); - } - }) - .finally(() => { - if (!timedOut) { - clearTimeout(tid); - } - }); - }); -} -async function getEntryMetadata(blob, entry) { - const offset = entry.offset; - const headerBeginRaw = await blob.slice(offset, offset + ZIP_ENTRY_HEADER_BEGIN_LENGTH).arrayBuffer(); - const dataView = new DataView(headerBeginRaw); - const compressionMethod = dataView.getUint16(8, true); - const compressedSize = dataView.getUint32(18, true); - const uncompressedSize = dataView.getUint32(22, true); - const fileNameLength = dataView.getUint16(26, true); - const extraFieldLength = dataView.getUint16(28, true); - const headerSize = ZIP_ENTRY_HEADER_BEGIN_LENGTH + fileNameLength + extraFieldLength; - return { - offset, - compressionMethod, - compressedSize, - uncompressedSize, - headerSize, - }; -} -// Wrapper for Entry#getData() that unwraps ProgressEvent errors -async function zipGetData(entry, writer, options) { - try { - return await entry.getData(writer, options); - } - catch (e) { - if (e instanceof ProgressEvent && - e.type === "error" && - e.target !== null) { - throw e.target.error; - } - else { - throw e; - } - } -} - -const FILE_MAGIC = 0xed26ff3a; -const MAJOR_VERSION = 1; -const MINOR_VERSION = 0; -const FILE_HEADER_SIZE = 28; -const CHUNK_HEADER_SIZE = 12; -// AOSP libsparse uses 64 MiB chunks -const RAW_CHUNK_SIZE = 64 * 1024 * 1024; -class ImageError extends Error { - constructor(message) { - super(message); - this.name = "ImageError"; - } -} -var ChunkType; -(function (ChunkType) { - ChunkType[ChunkType["Raw"] = 51905] = "Raw"; - ChunkType[ChunkType["Fill"] = 51906] = "Fill"; - ChunkType[ChunkType["Skip"] = 51907] = "Skip"; - ChunkType[ChunkType["Crc32"] = 51908] = "Crc32"; -})(ChunkType || (ChunkType = {})); -class BlobBuilder { - constructor(type = "") { - this.type = type; - this.blob = new Blob([], { type: this.type }); - } - append(blob) { - this.blob = new Blob([this.blob, blob], { type: this.type }); - } - getBlob() { - return this.blob; - } -} -/** - * Returns a parsed version of the sparse image file header from the given buffer. - * - * @param {ArrayBuffer} buffer - Raw file header data. - * @returns {SparseHeader} Object containing the header information. - */ -function parseFileHeader(buffer) { - let view = new DataView(buffer); - let magic = view.getUint32(0, true); - if (magic !== FILE_MAGIC) { - return null; - } - // v1.0+ - let major = view.getUint16(4, true); - let minor = view.getUint16(6, true); - if (major !== MAJOR_VERSION || minor < MINOR_VERSION) { - throw new ImageError(`Unsupported sparse image version ${major}.${minor}`); - } - let fileHdrSize = view.getUint16(8, true); - let chunkHdrSize = view.getUint16(10, true); - if (fileHdrSize !== FILE_HEADER_SIZE || - chunkHdrSize !== CHUNK_HEADER_SIZE) { - throw new ImageError(`Invalid file header size ${fileHdrSize}, chunk header size ${chunkHdrSize}`); - } - let blockSize = view.getUint32(12, true); - if (blockSize % 4 !== 0) { - throw new ImageError(`Block size ${blockSize} is not a multiple of 4`); - } - return { - blockSize: blockSize, - blocks: view.getUint32(16, true), - chunks: view.getUint32(20, true), - crc32: view.getUint32(24, true), - }; -} -function parseChunkHeader(buffer) { - let view = new DataView(buffer); - // This isn't the same as what createImage takes. - // Further processing needs to be done on the chunks. - return { - type: view.getUint16(0, true), - /* 2: reserved, 16 bits */ - blocks: view.getUint32(4, true), - dataBytes: view.getUint32(8, true) - CHUNK_HEADER_SIZE, - data: null, // to be populated by consumer - }; -} -function calcChunksBlockSize(chunks) { - return chunks - .map((chunk) => chunk.blocks) - .reduce((total, c) => total + c, 0); -} -function calcChunksDataSize(chunks) { - return chunks - .map((chunk) => chunk.data.size) - .reduce((total, c) => total + c, 0); -} -function calcChunksSize(chunks) { - // 28-byte file header, 12-byte chunk headers - let overhead = FILE_HEADER_SIZE + CHUNK_HEADER_SIZE * chunks.length; - return overhead + calcChunksDataSize(chunks); -} -async function createImage(header, chunks) { - let blobBuilder = new BlobBuilder(); - let buffer = new ArrayBuffer(FILE_HEADER_SIZE); - let dataView = new DataView(buffer); - let arrayView = new Uint8Array(buffer); - dataView.setUint32(0, FILE_MAGIC, true); - // v1.0 - dataView.setUint16(4, MAJOR_VERSION, true); - dataView.setUint16(6, MINOR_VERSION, true); - dataView.setUint16(8, FILE_HEADER_SIZE, true); - dataView.setUint16(10, CHUNK_HEADER_SIZE, true); - // Match input parameters - dataView.setUint32(12, header.blockSize, true); - dataView.setUint32(16, header.blocks, true); - dataView.setUint32(20, chunks.length, true); - // We don't care about the CRC. AOSP docs specify that this should be a CRC32, - // but AOSP libsparse always sets 0 and puts the CRC in a final undocumented - // 0xCAC4 chunk instead. - dataView.setUint32(24, 0, true); - blobBuilder.append(new Blob([buffer])); - for (let chunk of chunks) { - buffer = new ArrayBuffer(CHUNK_HEADER_SIZE + chunk.data.size); - dataView = new DataView(buffer); - arrayView = new Uint8Array(buffer); - dataView.setUint16(0, chunk.type, true); - dataView.setUint16(2, 0, true); // reserved - dataView.setUint32(4, chunk.blocks, true); - dataView.setUint32(8, CHUNK_HEADER_SIZE + chunk.data.size, true); - let chunkArrayView = new Uint8Array(await readBlobAsBuffer(chunk.data)); - arrayView.set(chunkArrayView, CHUNK_HEADER_SIZE); - blobBuilder.append(new Blob([buffer])); - } - return blobBuilder.getBlob(); -} -/** - * Creates a sparse image from buffer containing raw image data. - * - * @param {Blob} blob - Blob containing the raw image data. - * @returns {Promise} Promise that resolves the blob containing the new sparse image. - */ -async function fromRaw(blob) { - let header = { - blockSize: 4096, - blocks: blob.size / 4096, - chunks: 1, - crc32: 0, - }; - let chunks = []; - while (blob.size > 0) { - let chunkSize = Math.min(blob.size, RAW_CHUNK_SIZE); - chunks.push({ - type: ChunkType.Raw, - blocks: chunkSize / header.blockSize, - data: blob.slice(0, chunkSize), - }); - blob = blob.slice(chunkSize); - } - return createImage(header, chunks); -} -/** - * Split a sparse image into smaller sparse images within the given size. - * This takes a Blob instead of an ArrayBuffer because it may process images - * larger than RAM. - * - * @param {Blob} blob - Blob containing the sparse image to split. - * @param {number} splitSize - Maximum size per split. - * @yields {Object} Data of the next split image and its output size in bytes. - */ -async function* splitBlob(blob, splitSize) { - logDebug(`Splitting ${blob.size}-byte sparse image into ${splitSize}-byte chunks`); - // Short-circuit if splitting isn't required - if (blob.size <= splitSize) { - logDebug("Blob fits in 1 payload, not splitting"); - yield { - data: await readBlobAsBuffer(blob), - bytes: blob.size, - }; - return; - } - let headerData = await readBlobAsBuffer(blob.slice(0, FILE_HEADER_SIZE)); - let header = parseFileHeader(headerData); - if (header === null) { - throw new ImageError("Blob is not a sparse image"); - } - // Remove CRC32 (if present), otherwise splitting will invalidate it - header.crc32 = 0; - blob = blob.slice(FILE_HEADER_SIZE); - let splitChunks = []; - let splitDataBytes = 0; - for (let i = 0; i < header.chunks; i++) { - let chunkHeaderData = await readBlobAsBuffer(blob.slice(0, CHUNK_HEADER_SIZE)); - let chunk = parseChunkHeader(chunkHeaderData); - chunk.data = blob.slice(CHUNK_HEADER_SIZE, CHUNK_HEADER_SIZE + chunk.dataBytes); - blob = blob.slice(CHUNK_HEADER_SIZE + chunk.dataBytes); - let bytesRemaining = splitSize - calcChunksSize(splitChunks); - logVerbose(` Chunk ${i}: type ${chunk.type}, ${chunk.dataBytes} bytes / ${chunk.blocks} blocks, ${bytesRemaining} bytes remaining`); - if (bytesRemaining >= chunk.dataBytes) { - // Read the chunk and add it - logVerbose(" Space is available, adding chunk"); - splitChunks.push(chunk); - // Track amount of data written on the output device, in bytes - splitDataBytes += chunk.blocks * header.blockSize; - } - else { - // Out of space, finish this split - // Blocks need to be calculated from chunk headers instead of going by size - // because FILL and SKIP chunks cover more blocks than the data they contain. - let splitBlocks = calcChunksBlockSize(splitChunks); - splitChunks.push({ - type: ChunkType.Skip, - blocks: header.blocks - splitBlocks, - data: new Blob([]), - dataBytes: 0, - }); - logVerbose(`Partition is ${header.blocks} blocks, used ${splitBlocks}, padded with ${header.blocks - splitBlocks}, finishing split with ${calcChunksBlockSize(splitChunks)} blocks`); - let splitImage = await createImage(header, splitChunks); - logDebug(`Finished ${splitImage.size}-byte split with ${splitChunks.length} chunks`); - yield { - data: await readBlobAsBuffer(splitImage), - bytes: splitDataBytes, - }; - // Start a new split. Every split is considered a full image by the - // bootloader, so we need to skip the *total* written blocks. - logVerbose(`Starting new split: skipping first ${splitBlocks} blocks and adding chunk`); - splitChunks = [ - { - type: ChunkType.Skip, - blocks: splitBlocks, - data: new Blob([]), - dataBytes: 0, - }, - chunk, - ]; - splitDataBytes = 0; - } - } - // Finish the final split if necessary - if (splitChunks.length > 0 && - (splitChunks.length > 1 || splitChunks[0].type !== ChunkType.Skip)) { - let splitImage = await createImage(header, splitChunks); - logDebug(`Finishing final ${splitImage.size}-byte split with ${splitChunks.length} chunks`); - yield { - data: await readBlobAsBuffer(splitImage), - bytes: splitDataBytes, - }; - } -} - -/* - Copyright (c) 2022 Gildas Lormeau. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the distribution. - - 3. The names of the authors may not be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT, - INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, - INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, - OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This program is based on JZlib 1.0.2 ymnk, JCraft,Inc. - * JZlib is based on zlib-1.1.3, so all credit should go authors - * Jean-loup Gailly(jloup@gzip.org) and Mark Adler(madler@alumni.caltech.edu) - * and contributors of zlib. - */ - -// deno-lint-ignore-file no-this-alias prefer-const - -// Global - -const MAX_BITS$1 = 15; -const D_CODES = 30; -const BL_CODES = 19; - -const LENGTH_CODES = 29; -const LITERALS = 256; -const L_CODES = (LITERALS + 1 + LENGTH_CODES); -const HEAP_SIZE = (2 * L_CODES + 1); - -const END_BLOCK = 256; - -// Bit length codes must not exceed MAX_BL_BITS bits -const MAX_BL_BITS = 7; - -// repeat previous bit length 3-6 times (2 bits of repeat count) -const REP_3_6 = 16; - -// repeat a zero length 3-10 times (3 bits of repeat count) -const REPZ_3_10 = 17; - -// repeat a zero length 11-138 times (7 bits of repeat count) -const REPZ_11_138 = 18; - -// The lengths of the bit length codes are sent in order of decreasing -// probability, to avoid transmitting the lengths for unused bit -// length codes. - -const Buf_size = 8 * 2; - -// JZlib version : "1.0.2" -const Z_DEFAULT_COMPRESSION = -1; - -// compression strategy -const Z_FILTERED = 1; -const Z_HUFFMAN_ONLY = 2; -const Z_DEFAULT_STRATEGY = 0; - -const Z_NO_FLUSH$1 = 0; -const Z_PARTIAL_FLUSH = 1; -const Z_FULL_FLUSH = 3; -const Z_FINISH$1 = 4; - -const Z_OK$1 = 0; -const Z_STREAM_END$1 = 1; -const Z_NEED_DICT$1 = 2; -const Z_STREAM_ERROR$1 = -2; -const Z_DATA_ERROR$1 = -3; -const Z_BUF_ERROR$1 = -5; - -// Tree - -function extractArray(array) { - return flatArray(array.map(([length, value]) => (new Array(length)).fill(value, 0, length))); -} - -function flatArray(array) { - return array.reduce((a, b) => a.concat(Array.isArray(b) ? flatArray(b) : b), []); -} - -// see definition of array dist_code below -const _dist_code = [0, 1, 2, 3].concat(...extractArray([ - [2, 4], [2, 5], [4, 6], [4, 7], [8, 8], [8, 9], [16, 10], [16, 11], [32, 12], [32, 13], [64, 14], [64, 15], [2, 0], [1, 16], - [1, 17], [2, 18], [2, 19], [4, 20], [4, 21], [8, 22], [8, 23], [16, 24], [16, 25], [32, 26], [32, 27], [64, 28], [64, 29] -])); - -function Tree() { - const that = this; - - // dyn_tree; // the dynamic tree - // max_code; // largest code with non zero frequency - // stat_desc; // the corresponding static tree - - // Compute the optimal bit lengths for a tree and update the total bit - // length - // for the current block. - // IN assertion: the fields freq and dad are set, heap[heap_max] and - // above are the tree nodes sorted by increasing frequency. - // OUT assertions: the field len is set to the optimal bit length, the - // array bl_count contains the frequencies for each bit length. - // The length opt_len is updated; static_len is also updated if stree is - // not null. - function gen_bitlen(s) { - const tree = that.dyn_tree; - const stree = that.stat_desc.static_tree; - const extra = that.stat_desc.extra_bits; - const base = that.stat_desc.extra_base; - const max_length = that.stat_desc.max_length; - let h; // heap index - let n, m; // iterate over the tree elements - let bits; // bit length - let xbits; // extra bits - let f; // frequency - let overflow = 0; // number of elements with bit length too large - - for (bits = 0; bits <= MAX_BITS$1; bits++) - s.bl_count[bits] = 0; - - // In a first pass, compute the optimal bit lengths (which may - // overflow in the case of the bit length tree). - tree[s.heap[s.heap_max] * 2 + 1] = 0; // root of the heap - - for (h = s.heap_max + 1; h < HEAP_SIZE; h++) { - n = s.heap[h]; - bits = tree[tree[n * 2 + 1] * 2 + 1] + 1; - if (bits > max_length) { - bits = max_length; - overflow++; - } - tree[n * 2 + 1] = bits; - // We overwrite tree[n*2+1] which is no longer needed - - if (n > that.max_code) - continue; // not a leaf node - - s.bl_count[bits]++; - xbits = 0; - if (n >= base) - xbits = extra[n - base]; - f = tree[n * 2]; - s.opt_len += f * (bits + xbits); - if (stree) - s.static_len += f * (stree[n * 2 + 1] + xbits); - } - if (overflow === 0) - return; - - // This happens for example on obj2 and pic of the Calgary corpus - // Find the first bit length which could increase: - do { - bits = max_length - 1; - while (s.bl_count[bits] === 0) - bits--; - s.bl_count[bits]--; // move one leaf down the tree - s.bl_count[bits + 1] += 2; // move one overflow item as its brother - s.bl_count[max_length]--; - // The brother of the overflow item also moves one step up, - // but this does not affect bl_count[max_length] - overflow -= 2; - } while (overflow > 0); - - for (bits = max_length; bits !== 0; bits--) { - n = s.bl_count[bits]; - while (n !== 0) { - m = s.heap[--h]; - if (m > that.max_code) - continue; - if (tree[m * 2 + 1] != bits) { - s.opt_len += (bits - tree[m * 2 + 1]) * tree[m * 2]; - tree[m * 2 + 1] = bits; - } - n--; - } - } - } - - // Reverse the first len bits of a code, using straightforward code (a - // faster - // method would use a table) - // IN assertion: 1 <= len <= 15 - function bi_reverse(code, // the value to invert - len // its bit length - ) { - let res = 0; - do { - res |= code & 1; - code >>>= 1; - res <<= 1; - } while (--len > 0); - return res >>> 1; - } - - // Generate the codes for a given tree and bit counts (which need not be - // optimal). - // IN assertion: the array bl_count contains the bit length statistics for - // the given tree and the field len is set for all tree elements. - // OUT assertion: the field code is set for all tree elements of non - // zero code length. - function gen_codes(tree, // the tree to decorate - max_code, // largest code with non zero frequency - bl_count // number of codes at each bit length - ) { - const next_code = []; // next code value for each - // bit length - let code = 0; // running code value - let bits; // bit index - let n; // code index - let len; - - // The distribution counts are first used to generate the code values - // without bit reversal. - for (bits = 1; bits <= MAX_BITS$1; bits++) { - next_code[bits] = code = ((code + bl_count[bits - 1]) << 1); - } - - // Check that the bit counts in bl_count are consistent. The last code - // must be all ones. - // Assert (code + bl_count[MAX_BITS]-1 == (1<= 1; n--) - s.pqdownheap(tree, n); - - // Construct the Huffman tree by repeatedly combining the least two - // frequent nodes. - - node = elems; // next internal node of the tree - do { - // n = node of least frequency - n = s.heap[1]; - s.heap[1] = s.heap[s.heap_len--]; - s.pqdownheap(tree, 1); - m = s.heap[1]; // m = node of next least frequency - - s.heap[--s.heap_max] = n; // keep the nodes sorted by frequency - s.heap[--s.heap_max] = m; - - // Create a new node father of n and m - tree[node * 2] = (tree[n * 2] + tree[m * 2]); - s.depth[node] = Math.max(s.depth[n], s.depth[m]) + 1; - tree[n * 2 + 1] = tree[m * 2 + 1] = node; - - // and insert the new node in the heap - s.heap[1] = node++; - s.pqdownheap(tree, 1); - } while (s.heap_len >= 2); - - s.heap[--s.heap_max] = s.heap[1]; - - // At this point, the fields freq and dad are set. We can now - // generate the bit lengths. - - gen_bitlen(s); - - // The field len is now set, we can generate the bit codes - gen_codes(tree, that.max_code, s.bl_count); - }; - -} - -Tree._length_code = [0, 1, 2, 3, 4, 5, 6, 7].concat(...extractArray([ - [2, 8], [2, 9], [2, 10], [2, 11], [4, 12], [4, 13], [4, 14], [4, 15], [8, 16], [8, 17], [8, 18], [8, 19], - [16, 20], [16, 21], [16, 22], [16, 23], [32, 24], [32, 25], [32, 26], [31, 27], [1, 28]])); - -Tree.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]; - -Tree.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]; - -// Mapping from a distance to a distance code. dist is the distance - 1 and -// must not have side effects. _dist_code[256] and _dist_code[257] are never -// used. -Tree.d_code = function (dist) { - return ((dist) < 256 ? _dist_code[dist] : _dist_code[256 + ((dist) >>> 7)]); -}; - -// extra bits for each length code -Tree.extra_lbits = [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0]; - -// extra bits for each distance code -Tree.extra_dbits = [0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13]; - -// extra bits for each bit length code -Tree.extra_blbits = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7]; - -Tree.bl_order = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]; - -// StaticTree - -function StaticTree(static_tree, extra_bits, extra_base, elems, max_length) { - const that = this; - that.static_tree = static_tree; - that.extra_bits = extra_bits; - that.extra_base = extra_base; - that.elems = elems; - that.max_length = max_length; -} - -const static_ltree2_first_part = [12, 140, 76, 204, 44, 172, 108, 236, 28, 156, 92, 220, 60, 188, 124, 252, 2, 130, 66, 194, 34, 162, 98, 226, 18, 146, 82, - 210, 50, 178, 114, 242, 10, 138, 74, 202, 42, 170, 106, 234, 26, 154, 90, 218, 58, 186, 122, 250, 6, 134, 70, 198, 38, 166, 102, 230, 22, 150, 86, - 214, 54, 182, 118, 246, 14, 142, 78, 206, 46, 174, 110, 238, 30, 158, 94, 222, 62, 190, 126, 254, 1, 129, 65, 193, 33, 161, 97, 225, 17, 145, 81, - 209, 49, 177, 113, 241, 9, 137, 73, 201, 41, 169, 105, 233, 25, 153, 89, 217, 57, 185, 121, 249, 5, 133, 69, 197, 37, 165, 101, 229, 21, 149, 85, - 213, 53, 181, 117, 245, 13, 141, 77, 205, 45, 173, 109, 237, 29, 157, 93, 221, 61, 189, 125, 253, 19, 275, 147, 403, 83, 339, 211, 467, 51, 307, - 179, 435, 115, 371, 243, 499, 11, 267, 139, 395, 75, 331, 203, 459, 43, 299, 171, 427, 107, 363, 235, 491, 27, 283, 155, 411, 91, 347, 219, 475, - 59, 315, 187, 443, 123, 379, 251, 507, 7, 263, 135, 391, 71, 327, 199, 455, 39, 295, 167, 423, 103, 359, 231, 487, 23, 279, 151, 407, 87, 343, 215, - 471, 55, 311, 183, 439, 119, 375, 247, 503, 15, 271, 143, 399, 79, 335, 207, 463, 47, 303, 175, 431, 111, 367, 239, 495, 31, 287, 159, 415, 95, - 351, 223, 479, 63, 319, 191, 447, 127, 383, 255, 511, 0, 64, 32, 96, 16, 80, 48, 112, 8, 72, 40, 104, 24, 88, 56, 120, 4, 68, 36, 100, 20, 84, 52, - 116, 3, 131, 67, 195, 35, 163, 99, 227]; -const static_ltree2_second_part = extractArray([[144, 8], [112, 9], [24, 7], [8, 8]]); -StaticTree.static_ltree = flatArray(static_ltree2_first_part.map((value, index) => [value, static_ltree2_second_part[index]])); - -const static_dtree_first_part = [0, 16, 8, 24, 4, 20, 12, 28, 2, 18, 10, 26, 6, 22, 14, 30, 1, 17, 9, 25, 5, 21, 13, 29, 3, 19, 11, 27, 7, 23]; -const static_dtree_second_part = extractArray([[30, 5]]); -StaticTree.static_dtree = flatArray(static_dtree_first_part.map((value, index) => [value, static_dtree_second_part[index]])); - -StaticTree.static_l_desc = new StaticTree(StaticTree.static_ltree, Tree.extra_lbits, LITERALS + 1, L_CODES, MAX_BITS$1); - -StaticTree.static_d_desc = new StaticTree(StaticTree.static_dtree, Tree.extra_dbits, 0, D_CODES, MAX_BITS$1); - -StaticTree.static_bl_desc = new StaticTree(null, Tree.extra_blbits, 0, BL_CODES, MAX_BL_BITS); - -// Deflate - -const MAX_MEM_LEVEL = 9; -const DEF_MEM_LEVEL = 8; - -function Config(good_length, max_lazy, nice_length, max_chain, func) { - const that = this; - that.good_length = good_length; - that.max_lazy = max_lazy; - that.nice_length = nice_length; - that.max_chain = max_chain; - that.func = func; -} - -const STORED$1 = 0; -const FAST = 1; -const SLOW = 2; -const config_table = [ - new Config(0, 0, 0, 0, STORED$1), - new Config(4, 4, 8, 4, FAST), - new Config(4, 5, 16, 8, FAST), - new Config(4, 6, 32, 32, FAST), - new Config(4, 4, 16, 16, SLOW), - new Config(8, 16, 32, 32, SLOW), - new Config(8, 16, 128, 128, SLOW), - new Config(8, 32, 128, 256, SLOW), - new Config(32, 128, 258, 1024, SLOW), - new Config(32, 258, 258, 4096, SLOW) -]; - -const z_errmsg = ["need dictionary", // Z_NEED_DICT - // 2 - "stream end", // Z_STREAM_END 1 - "", // Z_OK 0 - "", // Z_ERRNO (-1) - "stream error", // Z_STREAM_ERROR (-2) - "data error", // Z_DATA_ERROR (-3) - "", // Z_MEM_ERROR (-4) - "buffer error", // Z_BUF_ERROR (-5) - "",// Z_VERSION_ERROR (-6) - ""]; - -// block not completed, need more input or more output -const NeedMore = 0; - -// block flush performed -const BlockDone = 1; - -// finish started, need only more output at next deflate -const FinishStarted = 2; - -// finish done, accept no more input or output -const FinishDone = 3; - -// preset dictionary flag in zlib header -const PRESET_DICT$1 = 0x20; - -const INIT_STATE = 42; -const BUSY_STATE = 113; -const FINISH_STATE = 666; - -// The deflate compression method -const Z_DEFLATED$1 = 8; - -const STORED_BLOCK = 0; -const STATIC_TREES = 1; -const DYN_TREES = 2; - -const MIN_MATCH = 3; -const MAX_MATCH = 258; -const MIN_LOOKAHEAD = (MAX_MATCH + MIN_MATCH + 1); - -function smaller(tree, n, m, depth) { - const tn2 = tree[n * 2]; - const tm2 = tree[m * 2]; - return (tn2 < tm2 || (tn2 == tm2 && depth[n] <= depth[m])); -} - -function Deflate() { - - const that = this; - let strm; // pointer back to this zlib stream - let status; // as the name implies - // pending_buf; // output still pending - let pending_buf_size; // size of pending_buf - // pending_out; // next pending byte to output to the stream - // pending; // nb of bytes in the pending buffer - - // dist_buf; // buffer for distances - // lc_buf; // buffer for literals or lengths - // To simplify the code, dist_buf and lc_buf have the same number of elements. - // To use different lengths, an extra flag array would be necessary. - - let last_flush; // value of flush param for previous deflate call - - let w_size; // LZ77 win size (32K by default) - let w_bits; // log2(w_size) (8..16) - let w_mask; // w_size - 1 - - let win; - // Sliding win. Input bytes are read into the second half of the win, - // and move to the first half later to keep a dictionary of at least wSize - // bytes. With this organization, matches are limited to a distance of - // wSize-MAX_MATCH bytes, but this ensures that IO is always - // performed with a length multiple of the block size. Also, it limits - // the win size to 64K, which is quite useful on MSDOS. - // To do: use the user input buffer as sliding win. - - let window_size; - // Actual size of win: 2*wSize, except when the user input buffer - // is directly used as sliding win. - - let prev; - // Link to older string with same hash index. To limit the size of this - // array to 64K, this link is maintained only for the last 32K strings. - // An index in this array is thus a win index modulo 32K. - - let head; // Heads of the hash chains or NIL. - - let ins_h; // hash index of string to be inserted - let hash_size; // number of elements in hash table - let hash_bits; // log2(hash_size) - let hash_mask; // hash_size-1 - - // Number of bits by which ins_h must be shifted at each input - // step. It must be such that after MIN_MATCH steps, the oldest - // byte no longer takes part in the hash key, that is: - // hash_shift * MIN_MATCH >= hash_bits - let hash_shift; - - // Window position at the beginning of the current output block. Gets - // negative when the win is moved backwards. - - let block_start; - - let match_length; // length of best match - let prev_match; // previous match - let match_available; // set if previous match exists - let strstart; // start of string to insert - let match_start; // start of matching string - let lookahead; // number of valid bytes ahead in win - - // Length of the best match at previous step. Matches not greater than this - // are discarded. This is used in the lazy match evaluation. - let prev_length; - - // To speed up deflation, hash chains are never searched beyond this - // length. A higher limit improves compression ratio but degrades the speed. - let max_chain_length; - - // Attempt to find a better match only when the current match is strictly - // smaller than this value. This mechanism is used only for compression - // levels >= 4. - let max_lazy_match; - - // Insert new strings in the hash table only if the match length is not - // greater than this length. This saves time but degrades compression. - // max_insert_length is used only for compression levels <= 3. - - let level; // compression level (1..9) - let strategy; // favor or force Huffman coding - - // Use a faster search when the previous match is longer than this - let good_match; - - // Stop searching when current match exceeds this - let nice_match; - - let dyn_ltree; // literal and length tree - let dyn_dtree; // distance tree - let bl_tree; // Huffman tree for bit lengths - - const l_desc = new Tree(); // desc for literal tree - const d_desc = new Tree(); // desc for distance tree - const bl_desc = new Tree(); // desc for bit length tree - - // that.heap_len; // number of elements in the heap - // that.heap_max; // element of largest frequency - // The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used. - // The same heap array is used to build all trees. - - // Depth of each subtree used as tie breaker for trees of equal frequency - that.depth = []; - - // Size of match buffer for literals/lengths. There are 4 reasons for - // limiting lit_bufsize to 64K: - // - frequencies can be kept in 16 bit counters - // - if compression is not successful for the first block, all input - // data is still in the win so we can still emit a stored block even - // when input comes from standard input. (This can also be done for - // all blocks if lit_bufsize is not greater than 32K.) - // - if compression is not successful for a file smaller than 64K, we can - // even emit a stored file instead of a stored block (saving 5 bytes). - // This is applicable only for zip (not gzip or zlib). - // - creating new Huffman trees less frequently may not provide fast - // adaptation to changes in the input data statistics. (Take for - // example a binary file with poorly compressible code followed by - // a highly compressible string table.) Smaller buffer sizes give - // fast adaptation but have of course the overhead of transmitting - // trees more frequently. - // - I can't count above 4 - let lit_bufsize; - - let last_lit; // running index in dist_buf and lc_buf - - // that.opt_len; // bit length of current block with optimal trees - // that.static_len; // bit length of current block with static trees - let matches; // number of string matches in current block - let last_eob_len; // bit length of EOB code for last block - - // Output buffer. bits are inserted starting at the bottom (least - // significant bits). - let bi_buf; - - // Number of valid bits in bi_buf. All bits above the last valid bit - // are always zero. - let bi_valid; - - // number of codes at each bit length for an optimal tree - that.bl_count = []; - - // heap used to build the Huffman trees - that.heap = []; - - dyn_ltree = []; - dyn_dtree = []; - bl_tree = []; - - function lm_init() { - window_size = 2 * w_size; - - head[hash_size - 1] = 0; - for (let i = 0; i < hash_size - 1; i++) { - head[i] = 0; - } - - // Set the default configuration parameters: - max_lazy_match = config_table[level].max_lazy; - good_match = config_table[level].good_length; - nice_match = config_table[level].nice_length; - max_chain_length = config_table[level].max_chain; - - strstart = 0; - block_start = 0; - lookahead = 0; - match_length = prev_length = MIN_MATCH - 1; - match_available = 0; - ins_h = 0; - } - - function init_block() { - let i; - // Initialize the trees. - for (i = 0; i < L_CODES; i++) - dyn_ltree[i * 2] = 0; - for (i = 0; i < D_CODES; i++) - dyn_dtree[i * 2] = 0; - for (i = 0; i < BL_CODES; i++) - bl_tree[i * 2] = 0; - - dyn_ltree[END_BLOCK * 2] = 1; - that.opt_len = that.static_len = 0; - last_lit = matches = 0; - } - - // Initialize the tree data structures for a new zlib stream. - function tr_init() { - - l_desc.dyn_tree = dyn_ltree; - l_desc.stat_desc = StaticTree.static_l_desc; - - d_desc.dyn_tree = dyn_dtree; - d_desc.stat_desc = StaticTree.static_d_desc; - - bl_desc.dyn_tree = bl_tree; - bl_desc.stat_desc = StaticTree.static_bl_desc; - - bi_buf = 0; - bi_valid = 0; - last_eob_len = 8; // enough lookahead for inflate - - // Initialize the first block of the first file: - init_block(); - } - - // Restore the heap property by moving down the tree starting at node k, - // exchanging a node with the smallest of its two sons if necessary, - // stopping - // when the heap property is re-established (each father smaller than its - // two sons). - that.pqdownheap = function (tree, // the tree to restore - k // node to move down - ) { - const heap = that.heap; - const v = heap[k]; - let j = k << 1; // left son of k - while (j <= that.heap_len) { - // Set j to the smallest of the two sons: - if (j < that.heap_len && smaller(tree, heap[j + 1], heap[j], that.depth)) { - j++; - } - // Exit if v is smaller than both sons - if (smaller(tree, v, heap[j], that.depth)) - break; - - // Exchange v with the smallest son - heap[k] = heap[j]; - k = j; - // And continue down the tree, setting j to the left son of k - j <<= 1; - } - heap[k] = v; - }; - - // Scan a literal or distance tree to determine the frequencies of the codes - // in the bit length tree. - function scan_tree(tree,// the tree to be scanned - max_code // and its largest code of non zero frequency - ) { - let prevlen = -1; // last emitted length - let curlen; // length of current code - let nextlen = tree[0 * 2 + 1]; // length of next code - let count = 0; // repeat count of the current code - let max_count = 7; // max repeat count - let min_count = 4; // min repeat count - - if (nextlen === 0) { - max_count = 138; - min_count = 3; - } - tree[(max_code + 1) * 2 + 1] = 0xffff; // guard - - for (let n = 0; n <= max_code; n++) { - curlen = nextlen; - nextlen = tree[(n + 1) * 2 + 1]; - if (++count < max_count && curlen == nextlen) { - continue; - } else if (count < min_count) { - bl_tree[curlen * 2] += count; - } else if (curlen !== 0) { - if (curlen != prevlen) - bl_tree[curlen * 2]++; - bl_tree[REP_3_6 * 2]++; - } else if (count <= 10) { - bl_tree[REPZ_3_10 * 2]++; - } else { - bl_tree[REPZ_11_138 * 2]++; - } - count = 0; - prevlen = curlen; - if (nextlen === 0) { - max_count = 138; - min_count = 3; - } else if (curlen == nextlen) { - max_count = 6; - min_count = 3; - } else { - max_count = 7; - min_count = 4; - } - } - } - - // Construct the Huffman tree for the bit lengths and return the index in - // bl_order of the last bit length code to send. - function build_bl_tree() { - let max_blindex; // index of last bit length code of non zero freq - - // Determine the bit length frequencies for literal and distance trees - scan_tree(dyn_ltree, l_desc.max_code); - scan_tree(dyn_dtree, d_desc.max_code); - - // Build the bit length tree: - bl_desc.build_tree(that); - // opt_len now includes the length of the tree representations, except - // the lengths of the bit lengths codes and the 5+5+4 bits for the - // counts. - - // Determine the number of bit length codes to send. The pkzip format - // requires that at least 4 bit length codes be sent. (appnote.txt says - // 3 but the actual value used is 4.) - for (max_blindex = BL_CODES - 1; max_blindex >= 3; max_blindex--) { - if (bl_tree[Tree.bl_order[max_blindex] * 2 + 1] !== 0) - break; - } - // Update opt_len to include the bit length tree and counts - that.opt_len += 3 * (max_blindex + 1) + 5 + 5 + 4; - - return max_blindex; - } - - // Output a byte on the stream. - // IN assertion: there is enough room in pending_buf. - function put_byte(p) { - that.pending_buf[that.pending++] = p; - } - - function put_short(w) { - put_byte(w & 0xff); - put_byte((w >>> 8) & 0xff); - } - - function putShortMSB(b) { - put_byte((b >> 8) & 0xff); - put_byte((b & 0xff) & 0xff); - } - - function send_bits(value, length) { - let val; - const len = length; - if (bi_valid > Buf_size - len) { - val = value; - // bi_buf |= (val << bi_valid); - bi_buf |= ((val << bi_valid) & 0xffff); - put_short(bi_buf); - bi_buf = val >>> (Buf_size - bi_valid); - bi_valid += len - Buf_size; - } else { - // bi_buf |= (value) << bi_valid; - bi_buf |= (((value) << bi_valid) & 0xffff); - bi_valid += len; - } - } - - function send_code(c, tree) { - const c2 = c * 2; - send_bits(tree[c2] & 0xffff, tree[c2 + 1] & 0xffff); - } - - // Send a literal or distance tree in compressed form, using the codes in - // bl_tree. - function send_tree(tree,// the tree to be sent - max_code // and its largest code of non zero frequency - ) { - let n; // iterates over all tree elements - let prevlen = -1; // last emitted length - let curlen; // length of current code - let nextlen = tree[0 * 2 + 1]; // length of next code - let count = 0; // repeat count of the current code - let max_count = 7; // max repeat count - let min_count = 4; // min repeat count - - if (nextlen === 0) { - max_count = 138; - min_count = 3; - } - - for (n = 0; n <= max_code; n++) { - curlen = nextlen; - nextlen = tree[(n + 1) * 2 + 1]; - if (++count < max_count && curlen == nextlen) { - continue; - } else if (count < min_count) { - do { - send_code(curlen, bl_tree); - } while (--count !== 0); - } else if (curlen !== 0) { - if (curlen != prevlen) { - send_code(curlen, bl_tree); - count--; - } - send_code(REP_3_6, bl_tree); - send_bits(count - 3, 2); - } else if (count <= 10) { - send_code(REPZ_3_10, bl_tree); - send_bits(count - 3, 3); - } else { - send_code(REPZ_11_138, bl_tree); - send_bits(count - 11, 7); - } - count = 0; - prevlen = curlen; - if (nextlen === 0) { - max_count = 138; - min_count = 3; - } else if (curlen == nextlen) { - max_count = 6; - min_count = 3; - } else { - max_count = 7; - min_count = 4; - } - } - } - - // Send the header for a block using dynamic Huffman trees: the counts, the - // lengths of the bit length codes, the literal tree and the distance tree. - // IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4. - function send_all_trees(lcodes, dcodes, blcodes) { - let rank; // index in bl_order - - send_bits(lcodes - 257, 5); // not +255 as stated in appnote.txt - send_bits(dcodes - 1, 5); - send_bits(blcodes - 4, 4); // not -3 as stated in appnote.txt - for (rank = 0; rank < blcodes; rank++) { - send_bits(bl_tree[Tree.bl_order[rank] * 2 + 1], 3); - } - send_tree(dyn_ltree, lcodes - 1); // literal tree - send_tree(dyn_dtree, dcodes - 1); // distance tree - } - - // Flush the bit buffer, keeping at most 7 bits in it. - function bi_flush() { - if (bi_valid == 16) { - put_short(bi_buf); - bi_buf = 0; - bi_valid = 0; - } else if (bi_valid >= 8) { - put_byte(bi_buf & 0xff); - bi_buf >>>= 8; - bi_valid -= 8; - } - } - - // Send one empty static block to give enough lookahead for inflate. - // This takes 10 bits, of which 7 may remain in the bit buffer. - // The current inflate code requires 9 bits of lookahead. If the - // last two codes for the previous block (real code plus EOB) were coded - // on 5 bits or less, inflate may have only 5+3 bits of lookahead to decode - // the last real code. In this case we send two empty static blocks instead - // of one. (There are no problems if the previous block is stored or fixed.) - // To simplify the code, we assume the worst case of last real code encoded - // on one bit only. - function _tr_align() { - send_bits(STATIC_TREES << 1, 3); - send_code(END_BLOCK, StaticTree.static_ltree); - - bi_flush(); - - // Of the 10 bits for the empty block, we have already sent - // (10 - bi_valid) bits. The lookahead for the last real code (before - // the EOB of the previous block) was thus at least one plus the length - // of the EOB plus what we have just sent of the empty static block. - if (1 + last_eob_len + 10 - bi_valid < 9) { - send_bits(STATIC_TREES << 1, 3); - send_code(END_BLOCK, StaticTree.static_ltree); - bi_flush(); - } - last_eob_len = 7; - } - - // Save the match info and tally the frequency counts. Return true if - // the current block must be flushed. - function _tr_tally(dist, // distance of matched string - lc // match length-MIN_MATCH or unmatched char (if dist==0) - ) { - let out_length, in_length, dcode; - that.dist_buf[last_lit] = dist; - that.lc_buf[last_lit] = lc & 0xff; - last_lit++; - - if (dist === 0) { - // lc is the unmatched char - dyn_ltree[lc * 2]++; - } else { - matches++; - // Here, lc is the match length - MIN_MATCH - dist--; // dist = match distance - 1 - dyn_ltree[(Tree._length_code[lc] + LITERALS + 1) * 2]++; - dyn_dtree[Tree.d_code(dist) * 2]++; - } - - if ((last_lit & 0x1fff) === 0 && level > 2) { - // Compute an upper bound for the compressed length - out_length = last_lit * 8; - in_length = strstart - block_start; - for (dcode = 0; dcode < D_CODES; dcode++) { - out_length += dyn_dtree[dcode * 2] * (5 + Tree.extra_dbits[dcode]); - } - out_length >>>= 3; - if ((matches < Math.floor(last_lit / 2)) && out_length < Math.floor(in_length / 2)) - return true; - } - - return (last_lit == lit_bufsize - 1); - // We avoid equality with lit_bufsize because of wraparound at 64K - // on 16 bit machines and because stored blocks are restricted to - // 64K-1 bytes. - } - - // Send the block data compressed using the given Huffman trees - function compress_block(ltree, dtree) { - let dist; // distance of matched string - let lc; // match length or unmatched char (if dist === 0) - let lx = 0; // running index in dist_buf and lc_buf - let code; // the code to send - let extra; // number of extra bits to send - - if (last_lit !== 0) { - do { - dist = that.dist_buf[lx]; - lc = that.lc_buf[lx]; - lx++; - - if (dist === 0) { - send_code(lc, ltree); // send a literal byte - } else { - // Here, lc is the match length - MIN_MATCH - code = Tree._length_code[lc]; - - send_code(code + LITERALS + 1, ltree); // send the length - // code - extra = Tree.extra_lbits[code]; - if (extra !== 0) { - lc -= Tree.base_length[code]; - send_bits(lc, extra); // send the extra length bits - } - dist--; // dist is now the match distance - 1 - code = Tree.d_code(dist); - - send_code(code, dtree); // send the distance code - extra = Tree.extra_dbits[code]; - if (extra !== 0) { - dist -= Tree.base_dist[code]; - send_bits(dist, extra); // send the extra distance bits - } - } // literal or match pair ? - } while (lx < last_lit); - } - - send_code(END_BLOCK, ltree); - last_eob_len = ltree[END_BLOCK * 2 + 1]; - } - - // Flush the bit buffer and align the output on a byte boundary - function bi_windup() { - if (bi_valid > 8) { - put_short(bi_buf); - } else if (bi_valid > 0) { - put_byte(bi_buf & 0xff); - } - bi_buf = 0; - bi_valid = 0; - } - - // Copy a stored block, storing first the length and its - // one's complement if requested. - function copy_block(buf, // the input data - len, // its length - header // true if block header must be written - ) { - bi_windup(); // align on byte boundary - last_eob_len = 8; // enough lookahead for inflate - - if (header) { - put_short(len); - put_short(~len); - } - - that.pending_buf.set(win.subarray(buf, buf + len), that.pending); - that.pending += len; - } - - // Send a stored block - function _tr_stored_block(buf, // input block - stored_len, // length of input block - eof // true if this is the last block for a file - ) { - send_bits((STORED_BLOCK << 1) + (eof ? 1 : 0), 3); // send block type - copy_block(buf, stored_len, true); // with header - } - - // Determine the best encoding for the current block: dynamic trees, static - // trees or store, and output the encoded block to the zip file. - function _tr_flush_block(buf, // input block, or NULL if too old - stored_len, // length of input block - eof // true if this is the last block for a file - ) { - let opt_lenb, static_lenb;// opt_len and static_len in bytes - let max_blindex = 0; // index of last bit length code of non zero freq - - // Build the Huffman trees unless a stored block is forced - if (level > 0) { - // Construct the literal and distance trees - l_desc.build_tree(that); - - d_desc.build_tree(that); - - // At this point, opt_len and static_len are the total bit lengths - // of - // the compressed block data, excluding the tree representations. - - // Build the bit length tree for the above two trees, and get the - // index - // in bl_order of the last bit length code to send. - max_blindex = build_bl_tree(); - - // Determine the best encoding. Compute first the block length in - // bytes - opt_lenb = (that.opt_len + 3 + 7) >>> 3; - static_lenb = (that.static_len + 3 + 7) >>> 3; - - if (static_lenb <= opt_lenb) - opt_lenb = static_lenb; - } else { - opt_lenb = static_lenb = stored_len + 5; // force a stored block - } - - if ((stored_len + 4 <= opt_lenb) && buf != -1) { - // 4: two words for the lengths - // The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE. - // Otherwise we can't have processed more than WSIZE input bytes - // since - // the last block flush, because compression would have been - // successful. If LIT_BUFSIZE <= WSIZE, it is never too late to - // transform a block into a stored block. - _tr_stored_block(buf, stored_len, eof); - } else if (static_lenb == opt_lenb) { - send_bits((STATIC_TREES << 1) + (eof ? 1 : 0), 3); - compress_block(StaticTree.static_ltree, StaticTree.static_dtree); - } else { - send_bits((DYN_TREES << 1) + (eof ? 1 : 0), 3); - send_all_trees(l_desc.max_code + 1, d_desc.max_code + 1, max_blindex + 1); - compress_block(dyn_ltree, dyn_dtree); - } - - // The above check is made mod 2^32, for files larger than 512 MB - // and uLong implemented on 32 bits. - - init_block(); - - if (eof) { - bi_windup(); - } - } - - function flush_block_only(eof) { - _tr_flush_block(block_start >= 0 ? block_start : -1, strstart - block_start, eof); - block_start = strstart; - strm.flush_pending(); - } - - // Fill the win when the lookahead becomes insufficient. - // Updates strstart and lookahead. - // - // IN assertion: lookahead < MIN_LOOKAHEAD - // OUT assertions: strstart <= window_size-MIN_LOOKAHEAD - // At least one byte has been read, or avail_in === 0; reads are - // performed for at least two bytes (required for the zip translate_eol - // option -- not supported here). - function fill_window() { - let n, m; - let p; - let more; // Amount of free space at the end of the win. - - do { - more = (window_size - lookahead - strstart); - - // Deal with !@#$% 64K limit: - if (more === 0 && strstart === 0 && lookahead === 0) { - more = w_size; - } else if (more == -1) { - // Very unlikely, but possible on 16 bit machine if strstart == - // 0 - // and lookahead == 1 (input done one byte at time) - more--; - - // If the win is almost full and there is insufficient - // lookahead, - // move the upper half to the lower one to make room in the - // upper half. - } else if (strstart >= w_size + w_size - MIN_LOOKAHEAD) { - win.set(win.subarray(w_size, w_size + w_size), 0); - - match_start -= w_size; - strstart -= w_size; // we now have strstart >= MAX_DIST - block_start -= w_size; - - // Slide the hash table (could be avoided with 32 bit values - // at the expense of memory usage). We slide even when level == - // 0 - // to keep the hash table consistent if we switch back to level - // > 0 - // later. (Using level 0 permanently is not an optimal usage of - // zlib, so we don't care about this pathological case.) - - n = hash_size; - p = n; - do { - m = (head[--p] & 0xffff); - head[p] = (m >= w_size ? m - w_size : 0); - } while (--n !== 0); - - n = w_size; - p = n; - do { - m = (prev[--p] & 0xffff); - prev[p] = (m >= w_size ? m - w_size : 0); - // If n is not on any hash chain, prev[n] is garbage but - // its value will never be used. - } while (--n !== 0); - more += w_size; - } - - if (strm.avail_in === 0) - return; - - // If there was no sliding: - // strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 && - // more == window_size - lookahead - strstart - // => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1) - // => more >= window_size - 2*WSIZE + 2 - // In the BIG_MEM or MMAP case (not yet supported), - // window_size == input_size + MIN_LOOKAHEAD && - // strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD. - // Otherwise, window_size == 2*WSIZE so more >= 2. - // If there was sliding, more >= WSIZE. So in all cases, more >= 2. - - n = strm.read_buf(win, strstart + lookahead, more); - lookahead += n; - - // Initialize the hash value now that we have some input: - if (lookahead >= MIN_MATCH) { - ins_h = win[strstart] & 0xff; - ins_h = (((ins_h) << hash_shift) ^ (win[strstart + 1] & 0xff)) & hash_mask; - } - // If the whole input has less than MIN_MATCH bytes, ins_h is - // garbage, - // but this is not important since only literal bytes will be - // emitted. - } while (lookahead < MIN_LOOKAHEAD && strm.avail_in !== 0); - } - - // Copy without compression as much as possible from the input stream, - // return - // the current block state. - // This function does not insert new strings in the dictionary since - // uncompressible data is probably not useful. This function is used - // only for the level=0 compression option. - // NOTE: this function should be optimized to avoid extra copying from - // win to pending_buf. - function deflate_stored(flush) { - // Stored blocks are limited to 0xffff bytes, pending_buf is limited - // to pending_buf_size, and each stored block has a 5 byte header: - - let max_block_size = 0xffff; - let max_start; - - if (max_block_size > pending_buf_size - 5) { - max_block_size = pending_buf_size - 5; - } - - // Copy as much as possible from input to output: - // eslint-disable-next-line no-constant-condition - while (true) { - // Fill the win as much as possible: - if (lookahead <= 1) { - fill_window(); - if (lookahead === 0 && flush == Z_NO_FLUSH$1) - return NeedMore; - if (lookahead === 0) - break; // flush the current block - } - - strstart += lookahead; - lookahead = 0; - - // Emit a stored block if pending_buf will be full: - max_start = block_start + max_block_size; - if (strstart === 0 || strstart >= max_start) { - // strstart === 0 is possible when wraparound on 16-bit machine - lookahead = (strstart - max_start); - strstart = max_start; - - flush_block_only(false); - if (strm.avail_out === 0) - return NeedMore; - - } - - // Flush if we may have to slide, otherwise block_start may become - // negative and the data will be gone: - if (strstart - block_start >= w_size - MIN_LOOKAHEAD) { - flush_block_only(false); - if (strm.avail_out === 0) - return NeedMore; - } - } - - flush_block_only(flush == Z_FINISH$1); - if (strm.avail_out === 0) - return (flush == Z_FINISH$1) ? FinishStarted : NeedMore; - - return flush == Z_FINISH$1 ? FinishDone : BlockDone; - } - - function longest_match(cur_match) { - let chain_length = max_chain_length; // max hash chain length - let scan = strstart; // current string - let match; // matched string - let len; // length of current match - let best_len = prev_length; // best match length so far - const limit = strstart > (w_size - MIN_LOOKAHEAD) ? strstart - (w_size - MIN_LOOKAHEAD) : 0; - let _nice_match = nice_match; - - // Stop when cur_match becomes <= limit. To simplify the code, - // we prevent matches with the string of win index 0. - - const wmask = w_mask; - - const strend = strstart + MAX_MATCH; - let scan_end1 = win[scan + best_len - 1]; - let scan_end = win[scan + best_len]; - - // The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of - // 16. - // It is easy to get rid of this optimization if necessary. - - // Do not waste too much time if we already have a good match: - if (prev_length >= good_match) { - chain_length >>= 2; - } - - // Do not look for matches beyond the end of the input. This is - // necessary - // to make deflate deterministic. - if (_nice_match > lookahead) - _nice_match = lookahead; - - do { - match = cur_match; - - // Skip to next match if the match length cannot increase - // or if the match length is less than 2: - if (win[match + best_len] != scan_end || win[match + best_len - 1] != scan_end1 || win[match] != win[scan] - || win[++match] != win[scan + 1]) - continue; - - // The check at best_len-1 can be removed because it will be made - // again later. (This heuristic is not always a win.) - // It is not necessary to compare scan[2] and match[2] since they - // are always equal when the other bytes match, given that - // the hash keys are equal and that HASH_BITS >= 8. - scan += 2; - match++; - - // We check for insufficient lookahead only every 8th comparison; - // the 256th check will be made at strstart+258. - // eslint-disable-next-line no-empty - do { - // empty block - } while (win[++scan] == win[++match] && win[++scan] == win[++match] && win[++scan] == win[++match] - && win[++scan] == win[++match] && win[++scan] == win[++match] && win[++scan] == win[++match] - && win[++scan] == win[++match] && win[++scan] == win[++match] && scan < strend); - - len = MAX_MATCH - (strend - scan); - scan = strend - MAX_MATCH; - - if (len > best_len) { - match_start = cur_match; - best_len = len; - if (len >= _nice_match) - break; - scan_end1 = win[scan + best_len - 1]; - scan_end = win[scan + best_len]; - } - - } while ((cur_match = (prev[cur_match & wmask] & 0xffff)) > limit && --chain_length !== 0); - - if (best_len <= lookahead) - return best_len; - return lookahead; - } - - // Compress as much as possible from the input stream, return the current - // block state. - // This function does not perform lazy evaluation of matches and inserts - // new strings in the dictionary only for unmatched strings or for short - // matches. It is used only for the fast compression options. - function deflate_fast(flush) { - // short hash_head = 0; // head of the hash chain - let hash_head = 0; // head of the hash chain - let bflush; // set if current block must be flushed - - // eslint-disable-next-line no-constant-condition - while (true) { - // Make sure that we always have enough lookahead, except - // at the end of the input file. We need MAX_MATCH bytes - // for the next match, plus MIN_MATCH bytes to insert the - // string following the next match. - if (lookahead < MIN_LOOKAHEAD) { - fill_window(); - if (lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH$1) { - return NeedMore; - } - if (lookahead === 0) - break; // flush the current block - } - - // Insert the string win[strstart .. strstart+2] in the - // dictionary, and set hash_head to the head of the hash chain: - if (lookahead >= MIN_MATCH) { - ins_h = (((ins_h) << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask; - - // prev[strstart&w_mask]=hash_head=head[ins_h]; - hash_head = (head[ins_h] & 0xffff); - prev[strstart & w_mask] = head[ins_h]; - head[ins_h] = strstart; - } - - // Find the longest match, discarding those <= prev_length. - // At this point we have always match_length < MIN_MATCH - - if (hash_head !== 0 && ((strstart - hash_head) & 0xffff) <= w_size - MIN_LOOKAHEAD) { - // To simplify the code, we prevent matches with the string - // of win index 0 (in particular we have to avoid a match - // of the string with itself at the start of the input file). - if (strategy != Z_HUFFMAN_ONLY) { - match_length = longest_match(hash_head); - } - // longest_match() sets match_start - } - if (match_length >= MIN_MATCH) { - // check_match(strstart, match_start, match_length); - - bflush = _tr_tally(strstart - match_start, match_length - MIN_MATCH); - - lookahead -= match_length; - - // Insert new strings in the hash table only if the match length - // is not too large. This saves time but degrades compression. - if (match_length <= max_lazy_match && lookahead >= MIN_MATCH) { - match_length--; // string at strstart already in hash table - do { - strstart++; - - ins_h = ((ins_h << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask; - // prev[strstart&w_mask]=hash_head=head[ins_h]; - hash_head = (head[ins_h] & 0xffff); - prev[strstart & w_mask] = head[ins_h]; - head[ins_h] = strstart; - - // strstart never exceeds WSIZE-MAX_MATCH, so there are - // always MIN_MATCH bytes ahead. - } while (--match_length !== 0); - strstart++; - } else { - strstart += match_length; - match_length = 0; - ins_h = win[strstart] & 0xff; - - ins_h = (((ins_h) << hash_shift) ^ (win[strstart + 1] & 0xff)) & hash_mask; - // If lookahead < MIN_MATCH, ins_h is garbage, but it does - // not - // matter since it will be recomputed at next deflate call. - } - } else { - // No match, output a literal byte - - bflush = _tr_tally(0, win[strstart] & 0xff); - lookahead--; - strstart++; - } - if (bflush) { - - flush_block_only(false); - if (strm.avail_out === 0) - return NeedMore; - } - } - - flush_block_only(flush == Z_FINISH$1); - if (strm.avail_out === 0) { - if (flush == Z_FINISH$1) - return FinishStarted; - else - return NeedMore; - } - return flush == Z_FINISH$1 ? FinishDone : BlockDone; - } - - // Same as above, but achieves better compression. We use a lazy - // evaluation for matches: a match is finally adopted only if there is - // no better match at the next win position. - function deflate_slow(flush) { - // short hash_head = 0; // head of hash chain - let hash_head = 0; // head of hash chain - let bflush; // set if current block must be flushed - let max_insert; - - // Process the input block. - // eslint-disable-next-line no-constant-condition - while (true) { - // Make sure that we always have enough lookahead, except - // at the end of the input file. We need MAX_MATCH bytes - // for the next match, plus MIN_MATCH bytes to insert the - // string following the next match. - - if (lookahead < MIN_LOOKAHEAD) { - fill_window(); - if (lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH$1) { - return NeedMore; - } - if (lookahead === 0) - break; // flush the current block - } - - // Insert the string win[strstart .. strstart+2] in the - // dictionary, and set hash_head to the head of the hash chain: - - if (lookahead >= MIN_MATCH) { - ins_h = (((ins_h) << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask; - // prev[strstart&w_mask]=hash_head=head[ins_h]; - hash_head = (head[ins_h] & 0xffff); - prev[strstart & w_mask] = head[ins_h]; - head[ins_h] = strstart; - } - - // Find the longest match, discarding those <= prev_length. - prev_length = match_length; - prev_match = match_start; - match_length = MIN_MATCH - 1; - - if (hash_head !== 0 && prev_length < max_lazy_match && ((strstart - hash_head) & 0xffff) <= w_size - MIN_LOOKAHEAD) { - // To simplify the code, we prevent matches with the string - // of win index 0 (in particular we have to avoid a match - // of the string with itself at the start of the input file). - - if (strategy != Z_HUFFMAN_ONLY) { - match_length = longest_match(hash_head); - } - // longest_match() sets match_start - - if (match_length <= 5 && (strategy == Z_FILTERED || (match_length == MIN_MATCH && strstart - match_start > 4096))) { - - // If prev_match is also MIN_MATCH, match_start is garbage - // but we will ignore the current match anyway. - match_length = MIN_MATCH - 1; - } - } - - // If there was a match at the previous step and the current - // match is not better, output the previous match: - if (prev_length >= MIN_MATCH && match_length <= prev_length) { - max_insert = strstart + lookahead - MIN_MATCH; - // Do not insert strings in hash table beyond this. - - // check_match(strstart-1, prev_match, prev_length); - - bflush = _tr_tally(strstart - 1 - prev_match, prev_length - MIN_MATCH); - - // Insert in hash table all strings up to the end of the match. - // strstart-1 and strstart are already inserted. If there is not - // enough lookahead, the last two strings are not inserted in - // the hash table. - lookahead -= prev_length - 1; - prev_length -= 2; - do { - if (++strstart <= max_insert) { - ins_h = (((ins_h) << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask; - // prev[strstart&w_mask]=hash_head=head[ins_h]; - hash_head = (head[ins_h] & 0xffff); - prev[strstart & w_mask] = head[ins_h]; - head[ins_h] = strstart; - } - } while (--prev_length !== 0); - match_available = 0; - match_length = MIN_MATCH - 1; - strstart++; - - if (bflush) { - flush_block_only(false); - if (strm.avail_out === 0) - return NeedMore; - } - } else if (match_available !== 0) { - - // If there was no match at the previous position, output a - // single literal. If there was a match but the current match - // is longer, truncate the previous match to a single literal. - - bflush = _tr_tally(0, win[strstart - 1] & 0xff); - - if (bflush) { - flush_block_only(false); - } - strstart++; - lookahead--; - if (strm.avail_out === 0) - return NeedMore; - } else { - // There is no previous match to compare with, wait for - // the next step to decide. - - match_available = 1; - strstart++; - lookahead--; - } - } - - if (match_available !== 0) { - bflush = _tr_tally(0, win[strstart - 1] & 0xff); - match_available = 0; - } - flush_block_only(flush == Z_FINISH$1); - - if (strm.avail_out === 0) { - if (flush == Z_FINISH$1) - return FinishStarted; - else - return NeedMore; - } - - return flush == Z_FINISH$1 ? FinishDone : BlockDone; - } - - function deflateReset(strm) { - strm.total_in = strm.total_out = 0; - strm.msg = null; // - - that.pending = 0; - that.pending_out = 0; - - status = BUSY_STATE; - - last_flush = Z_NO_FLUSH$1; - - tr_init(); - lm_init(); - return Z_OK$1; - } - - that.deflateInit = function (strm, _level, bits, _method, memLevel, _strategy) { - if (!_method) - _method = Z_DEFLATED$1; - if (!memLevel) - memLevel = DEF_MEM_LEVEL; - if (!_strategy) - _strategy = Z_DEFAULT_STRATEGY; - - // byte[] my_version=ZLIB_VERSION; - - // - // if (!version || version[0] != my_version[0] - // || stream_size != sizeof(z_stream)) { - // return Z_VERSION_ERROR; - // } - - strm.msg = null; - - if (_level == Z_DEFAULT_COMPRESSION) - _level = 6; - - if (memLevel < 1 || memLevel > MAX_MEM_LEVEL || _method != Z_DEFLATED$1 || bits < 9 || bits > 15 || _level < 0 || _level > 9 || _strategy < 0 - || _strategy > Z_HUFFMAN_ONLY) { - return Z_STREAM_ERROR$1; - } - - strm.dstate = that; - - w_bits = bits; - w_size = 1 << w_bits; - w_mask = w_size - 1; - - hash_bits = memLevel + 7; - hash_size = 1 << hash_bits; - hash_mask = hash_size - 1; - hash_shift = Math.floor((hash_bits + MIN_MATCH - 1) / MIN_MATCH); - - win = new Uint8Array(w_size * 2); - prev = []; - head = []; - - lit_bufsize = 1 << (memLevel + 6); // 16K elements by default - - that.pending_buf = new Uint8Array(lit_bufsize * 4); - pending_buf_size = lit_bufsize * 4; - - that.dist_buf = new Uint16Array(lit_bufsize); - that.lc_buf = new Uint8Array(lit_bufsize); - - level = _level; - - strategy = _strategy; - - return deflateReset(strm); - }; - - that.deflateEnd = function () { - if (status != INIT_STATE && status != BUSY_STATE && status != FINISH_STATE) { - return Z_STREAM_ERROR$1; - } - // Deallocate in reverse order of allocations: - that.lc_buf = null; - that.dist_buf = null; - that.pending_buf = null; - head = null; - prev = null; - win = null; - // free - that.dstate = null; - return status == BUSY_STATE ? Z_DATA_ERROR$1 : Z_OK$1; - }; - - that.deflateParams = function (strm, _level, _strategy) { - let err = Z_OK$1; - - if (_level == Z_DEFAULT_COMPRESSION) { - _level = 6; - } - if (_level < 0 || _level > 9 || _strategy < 0 || _strategy > Z_HUFFMAN_ONLY) { - return Z_STREAM_ERROR$1; - } - - if (config_table[level].func != config_table[_level].func && strm.total_in !== 0) { - // Flush the last buffer: - err = strm.deflate(Z_PARTIAL_FLUSH); - } - - if (level != _level) { - level = _level; - max_lazy_match = config_table[level].max_lazy; - good_match = config_table[level].good_length; - nice_match = config_table[level].nice_length; - max_chain_length = config_table[level].max_chain; - } - strategy = _strategy; - return err; - }; - - that.deflateSetDictionary = function (_strm, dictionary, dictLength) { - let length = dictLength; - let n, index = 0; - - if (!dictionary || status != INIT_STATE) - return Z_STREAM_ERROR$1; - - if (length < MIN_MATCH) - return Z_OK$1; - if (length > w_size - MIN_LOOKAHEAD) { - length = w_size - MIN_LOOKAHEAD; - index = dictLength - length; // use the tail of the dictionary - } - win.set(dictionary.subarray(index, index + length), 0); - - strstart = length; - block_start = length; - - // Insert all strings in the hash table (except for the last two bytes). - // s->lookahead stays null, so s->ins_h will be recomputed at the next - // call of fill_window. - - ins_h = win[0] & 0xff; - ins_h = (((ins_h) << hash_shift) ^ (win[1] & 0xff)) & hash_mask; - - for (n = 0; n <= length - MIN_MATCH; n++) { - ins_h = (((ins_h) << hash_shift) ^ (win[(n) + (MIN_MATCH - 1)] & 0xff)) & hash_mask; - prev[n & w_mask] = head[ins_h]; - head[ins_h] = n; - } - return Z_OK$1; - }; - - that.deflate = function (_strm, flush) { - let i, header, level_flags, old_flush, bstate; - - if (flush > Z_FINISH$1 || flush < 0) { - return Z_STREAM_ERROR$1; - } - - if (!_strm.next_out || (!_strm.next_in && _strm.avail_in !== 0) || (status == FINISH_STATE && flush != Z_FINISH$1)) { - _strm.msg = z_errmsg[Z_NEED_DICT$1 - (Z_STREAM_ERROR$1)]; - return Z_STREAM_ERROR$1; - } - if (_strm.avail_out === 0) { - _strm.msg = z_errmsg[Z_NEED_DICT$1 - (Z_BUF_ERROR$1)]; - return Z_BUF_ERROR$1; - } - - strm = _strm; // just in case - old_flush = last_flush; - last_flush = flush; - - // Write the zlib header - if (status == INIT_STATE) { - header = (Z_DEFLATED$1 + ((w_bits - 8) << 4)) << 8; - level_flags = ((level - 1) & 0xff) >> 1; - - if (level_flags > 3) - level_flags = 3; - header |= (level_flags << 6); - if (strstart !== 0) - header |= PRESET_DICT$1; - header += 31 - (header % 31); - - status = BUSY_STATE; - putShortMSB(header); - } - - // Flush as much pending output as possible - if (that.pending !== 0) { - strm.flush_pending(); - if (strm.avail_out === 0) { - // console.log(" avail_out==0"); - // Since avail_out is 0, deflate will be called again with - // more output space, but possibly with both pending and - // avail_in equal to zero. There won't be anything to do, - // but this is not an error situation so make sure we - // return OK instead of BUF_ERROR at next call of deflate: - last_flush = -1; - return Z_OK$1; - } - - // Make sure there is something to do and avoid duplicate - // consecutive - // flushes. For repeated and useless calls with Z_FINISH, we keep - // returning Z_STREAM_END instead of Z_BUFF_ERROR. - } else if (strm.avail_in === 0 && flush <= old_flush && flush != Z_FINISH$1) { - strm.msg = z_errmsg[Z_NEED_DICT$1 - (Z_BUF_ERROR$1)]; - return Z_BUF_ERROR$1; - } - - // User must not provide more input after the first FINISH: - if (status == FINISH_STATE && strm.avail_in !== 0) { - _strm.msg = z_errmsg[Z_NEED_DICT$1 - (Z_BUF_ERROR$1)]; - return Z_BUF_ERROR$1; - } - - // Start a new block or continue the current one. - if (strm.avail_in !== 0 || lookahead !== 0 || (flush != Z_NO_FLUSH$1 && status != FINISH_STATE)) { - bstate = -1; - switch (config_table[level].func) { - case STORED$1: - bstate = deflate_stored(flush); - break; - case FAST: - bstate = deflate_fast(flush); - break; - case SLOW: - bstate = deflate_slow(flush); - break; - } - - if (bstate == FinishStarted || bstate == FinishDone) { - status = FINISH_STATE; - } - if (bstate == NeedMore || bstate == FinishStarted) { - if (strm.avail_out === 0) { - last_flush = -1; // avoid BUF_ERROR next call, see above - } - return Z_OK$1; - // If flush != Z_NO_FLUSH && avail_out === 0, the next call - // of deflate should use the same flush parameter to make sure - // that the flush is complete. So we don't have to output an - // empty block here, this will be done at next call. This also - // ensures that for a very small output buffer, we emit at most - // one empty block. - } - - if (bstate == BlockDone) { - if (flush == Z_PARTIAL_FLUSH) { - _tr_align(); - } else { // FULL_FLUSH or SYNC_FLUSH - _tr_stored_block(0, 0, false); - // For a full flush, this empty block will be recognized - // as a special marker by inflate_sync(). - if (flush == Z_FULL_FLUSH) { - // state.head[s.hash_size-1]=0; - for (i = 0; i < hash_size/*-1*/; i++) - // forget history - head[i] = 0; - } - } - strm.flush_pending(); - if (strm.avail_out === 0) { - last_flush = -1; // avoid BUF_ERROR at next call, see above - return Z_OK$1; - } - } - } - - if (flush != Z_FINISH$1) - return Z_OK$1; - return Z_STREAM_END$1; - }; -} - -// ZStream - -function ZStream$1() { - const that = this; - that.next_in_index = 0; - that.next_out_index = 0; - // that.next_in; // next input byte - that.avail_in = 0; // number of bytes available at next_in - that.total_in = 0; // total nb of input bytes read so far - // that.next_out; // next output byte should be put there - that.avail_out = 0; // remaining free space at next_out - that.total_out = 0; // total nb of bytes output so far - // that.msg; - // that.dstate; -} - -ZStream$1.prototype = { - deflateInit(level, bits) { - const that = this; - that.dstate = new Deflate(); - if (!bits) - bits = MAX_BITS$1; - return that.dstate.deflateInit(that, level, bits); - }, - - deflate(flush) { - const that = this; - if (!that.dstate) { - return Z_STREAM_ERROR$1; - } - return that.dstate.deflate(that, flush); - }, - - deflateEnd() { - const that = this; - if (!that.dstate) - return Z_STREAM_ERROR$1; - const ret = that.dstate.deflateEnd(); - that.dstate = null; - return ret; - }, - - deflateParams(level, strategy) { - const that = this; - if (!that.dstate) - return Z_STREAM_ERROR$1; - return that.dstate.deflateParams(that, level, strategy); - }, - - deflateSetDictionary(dictionary, dictLength) { - const that = this; - if (!that.dstate) - return Z_STREAM_ERROR$1; - return that.dstate.deflateSetDictionary(that, dictionary, dictLength); - }, - - // Read a new buffer from the current input stream, update the - // total number of bytes read. All deflate() input goes through - // this function so some applications may wish to modify it to avoid - // allocating a large strm->next_in buffer and copying from it. - // (See also flush_pending()). - read_buf(buf, start, size) { - const that = this; - let len = that.avail_in; - if (len > size) - len = size; - if (len === 0) - return 0; - that.avail_in -= len; - buf.set(that.next_in.subarray(that.next_in_index, that.next_in_index + len), start); - that.next_in_index += len; - that.total_in += len; - return len; - }, - - // Flush as much pending output as possible. All deflate() output goes - // through this function so some applications may wish to modify it - // to avoid allocating a large strm->next_out buffer and copying into it. - // (See also read_buf()). - flush_pending() { - const that = this; - let len = that.dstate.pending; - - if (len > that.avail_out) - len = that.avail_out; - if (len === 0) - return; - - // if (that.dstate.pending_buf.length <= that.dstate.pending_out || that.next_out.length <= that.next_out_index - // || that.dstate.pending_buf.length < (that.dstate.pending_out + len) || that.next_out.length < (that.next_out_index + - // len)) { - // console.log(that.dstate.pending_buf.length + ", " + that.dstate.pending_out + ", " + that.next_out.length + ", " + - // that.next_out_index + ", " + len); - // console.log("avail_out=" + that.avail_out); - // } - - that.next_out.set(that.dstate.pending_buf.subarray(that.dstate.pending_out, that.dstate.pending_out + len), that.next_out_index); - - that.next_out_index += len; - that.dstate.pending_out += len; - that.total_out += len; - that.avail_out -= len; - that.dstate.pending -= len; - if (that.dstate.pending === 0) { - that.dstate.pending_out = 0; - } - } -}; - -// Deflate - -function ZipDeflate(options) { - const that = this; - const z = new ZStream$1(); - const bufsize = getMaximumCompressedSize(options && options.chunkSize ? options.chunkSize : 64 * 1024); - const flush = Z_NO_FLUSH$1; - const buf = new Uint8Array(bufsize); - let level = options ? options.level : Z_DEFAULT_COMPRESSION; - if (typeof level == "undefined") - level = Z_DEFAULT_COMPRESSION; - z.deflateInit(level); - z.next_out = buf; - - that.append = function (data, onprogress) { - let err, array, lastIndex = 0, bufferIndex = 0, bufferSize = 0; - const buffers = []; - if (!data.length) - return; - z.next_in_index = 0; - z.next_in = data; - z.avail_in = data.length; - do { - z.next_out_index = 0; - z.avail_out = bufsize; - err = z.deflate(flush); - if (err != Z_OK$1) - throw new Error("deflating: " + z.msg); - if (z.next_out_index) - if (z.next_out_index == bufsize) - buffers.push(new Uint8Array(buf)); - else - buffers.push(buf.slice(0, z.next_out_index)); - bufferSize += z.next_out_index; - if (onprogress && z.next_in_index > 0 && z.next_in_index != lastIndex) { - onprogress(z.next_in_index); - lastIndex = z.next_in_index; - } - } while (z.avail_in > 0 || z.avail_out === 0); - if (buffers.length > 1) { - array = new Uint8Array(bufferSize); - buffers.forEach(function (chunk) { - array.set(chunk, bufferIndex); - bufferIndex += chunk.length; - }); - } else { - array = buffers[0] || new Uint8Array(); - } - return array; - }; - that.flush = function () { - let err, array, bufferIndex = 0, bufferSize = 0; - const buffers = []; - do { - z.next_out_index = 0; - z.avail_out = bufsize; - err = z.deflate(Z_FINISH$1); - if (err != Z_STREAM_END$1 && err != Z_OK$1) - throw new Error("deflating: " + z.msg); - if (bufsize - z.avail_out > 0) - buffers.push(buf.slice(0, z.next_out_index)); - bufferSize += z.next_out_index; - } while (z.avail_in > 0 || z.avail_out === 0); - z.deflateEnd(); - array = new Uint8Array(bufferSize); - buffers.forEach(function (chunk) { - array.set(chunk, bufferIndex); - bufferIndex += chunk.length; - }); - return array; - }; -} - -function getMaximumCompressedSize(uncompressedSize) { - return uncompressedSize + (5 * (Math.floor(uncompressedSize / 16383) + 1)); -} - -/* - Copyright (c) 2022 Gildas Lormeau. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the distribution. - - 3. The names of the authors may not be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT, - INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, - INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, - OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This program is based on JZlib 1.0.2 ymnk, JCraft,Inc. - * JZlib is based on zlib-1.1.3, so all credit should go authors - * Jean-loup Gailly(jloup@gzip.org) and Mark Adler(madler@alumni.caltech.edu) - * and contributors of zlib. - */ - -// deno-lint-ignore-file no-this-alias prefer-const - -// Global - -const MAX_BITS = 15; - -const Z_OK = 0; -const Z_STREAM_END = 1; -const Z_NEED_DICT = 2; -const Z_STREAM_ERROR = -2; -const Z_DATA_ERROR = -3; -const Z_MEM_ERROR = -4; -const Z_BUF_ERROR = -5; - -const inflate_mask = [0x00000000, 0x00000001, 0x00000003, 0x00000007, 0x0000000f, 0x0000001f, 0x0000003f, 0x0000007f, 0x000000ff, 0x000001ff, 0x000003ff, - 0x000007ff, 0x00000fff, 0x00001fff, 0x00003fff, 0x00007fff, 0x0000ffff]; - -const MANY = 1440; - -// JZlib version : "1.0.2" -const Z_NO_FLUSH = 0; -const Z_FINISH = 4; - -// InfTree -const fixed_bl = 9; -const fixed_bd = 5; - -const fixed_tl = [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]; -const fixed_td = [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]; - -// Tables for deflate from PKZIP's appnote.txt. -const cplens = [ // Copy lengths for literal codes 257..285 - 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]; - -// see note #13 above about 258 -const cplext = [ // Extra bits for literal codes 257..285 - 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 // 112==invalid -]; - -const cpdist = [ // Copy offsets for distance codes 0..29 - 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]; - -const cpdext = [ // Extra bits for distance codes - 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]; - -// If BMAX needs to be larger than 16, then h and x[] should be uLong. -const BMAX = 15; // maximum bit length of any code - -function InfTree() { - const that = this; - - let hn; // hufts used in space - let v; // work area for huft_build - let c; // bit length count table - let r; // table entry for structure assignment - let u; // table stack - let x; // bit offsets, then code stack - - function huft_build(b, // code lengths in bits (all assumed <= - // BMAX) - bindex, n, // number of codes (assumed <= 288) - s, // number of simple-valued codes (0..s-1) - d, // list of base values for non-simple codes - e, // list of extra bits for non-simple codes - t, // result: starting table - m, // maximum lookup bits, returns actual - hp,// space for trees - hn,// hufts used in space - v // working area: values in order of bit length - ) { - // Given a list of code lengths and a maximum table size, make a set of - // tables to decode that set of codes. Return Z_OK on success, - // Z_BUF_ERROR - // if the given code set is incomplete (the tables are still built in - // this - // case), Z_DATA_ERROR if the input is invalid (an over-subscribed set - // of - // lengths), or Z_MEM_ERROR if not enough memory. - - let a; // counter for codes of length k - let f; // i repeats in table every f entries - let g; // maximum code length - let h; // table level - let i; // counter, current code - let j; // counter - let k; // number of bits in current code - let l; // bits per table (returned in m) - let mask; // (1 << w) - 1, to avoid cc -O bug on HP - let p; // pointer into c[], b[], or v[] - let q; // points to current table - let w; // bits before this table == (l * h) - let xp; // pointer into x - let y; // number of dummy codes added - let z; // number of entries in current table - - // Generate counts for each bit length - - p = 0; - i = n; - do { - c[b[bindex + p]]++; - p++; - i--; // assume all entries <= BMAX - } while (i !== 0); - - if (c[0] == n) { // null input--all zero length codes - t[0] = -1; - m[0] = 0; - return Z_OK; - } - - // Find minimum and maximum length, bound *m by those - l = m[0]; - for (j = 1; j <= BMAX; j++) - if (c[j] !== 0) - break; - k = j; // minimum code length - if (l < j) { - l = j; - } - for (i = BMAX; i !== 0; i--) { - if (c[i] !== 0) - break; - } - g = i; // maximum code length - if (l > i) { - l = i; - } - m[0] = l; - - // Adjust last length count to fill out codes, if needed - for (y = 1 << j; j < i; j++, y <<= 1) { - if ((y -= c[j]) < 0) { - return Z_DATA_ERROR; - } - } - if ((y -= c[i]) < 0) { - return Z_DATA_ERROR; - } - c[i] += y; - - // Generate starting offsets into the value table for each length - x[1] = j = 0; - p = 1; - xp = 2; - while (--i !== 0) { // note that i == g from above - x[xp] = (j += c[p]); - xp++; - p++; - } - - // Make a table of values in order of bit lengths - i = 0; - p = 0; - do { - if ((j = b[bindex + p]) !== 0) { - v[x[j]++] = i; - } - p++; - } while (++i < n); - n = x[g]; // set n to length of v - - // Generate the Huffman codes and for each, make the table entries - x[0] = i = 0; // first Huffman code is zero - p = 0; // grab values in bit order - h = -1; // no tables yet--level -1 - w = -l; // bits decoded == (l * h) - u[0] = 0; // just to keep compilers happy - q = 0; // ditto - z = 0; // ditto - - // go through the bit lengths (k already is bits in shortest code) - for (; k <= g; k++) { - a = c[k]; - while (a-- !== 0) { - // here i is the Huffman code of length k bits for value *p - // make tables up to required level - while (k > w + l) { - h++; - w += l; // previous table always l bits - // compute minimum size table less than or equal to l bits - z = g - w; - z = (z > l) ? l : z; // table size upper limit - if ((f = 1 << (j = k - w)) > a + 1) { // try a k-w bit table - // too few codes for - // k-w bit table - f -= a + 1; // deduct codes from patterns left - xp = k; - if (j < z) { - while (++j < z) { // try smaller tables up to z bits - if ((f <<= 1) <= c[++xp]) - break; // enough codes to use up j bits - f -= c[xp]; // else deduct codes from patterns - } - } - } - z = 1 << j; // table entries for j-bit table - - // allocate new table - if (hn[0] + z > MANY) { // (note: doesn't matter for fixed) - return Z_DATA_ERROR; // overflow of MANY - } - u[h] = q = /* hp+ */hn[0]; // DEBUG - hn[0] += z; - - // connect to last table, if there is one - if (h !== 0) { - x[h] = i; // save pattern for backing up - r[0] = /* (byte) */j; // bits in this table - r[1] = /* (byte) */l; // bits to dump before this table - j = i >>> (w - l); - r[2] = /* (int) */(q - u[h - 1] - j); // offset to this table - hp.set(r, (u[h - 1] + j) * 3); - // to - // last - // table - } else { - t[0] = q; // first table is returned result - } - } - - // set up table entry in r - r[1] = /* (byte) */(k - w); - if (p >= n) { - r[0] = 128 + 64; // out of values--invalid code - } else if (v[p] < s) { - r[0] = /* (byte) */(v[p] < 256 ? 0 : 32 + 64); // 256 is - // end-of-block - r[2] = v[p++]; // simple code is just the value - } else { - r[0] = /* (byte) */(e[v[p] - s] + 16 + 64); // non-simple--look - // up in lists - r[2] = d[v[p++] - s]; - } - - // fill code-like entries with r - f = 1 << (k - w); - for (j = i >>> w; j < z; j += f) { - hp.set(r, (q + j) * 3); - } - - // backwards increment the k-bit code i - for (j = 1 << (k - 1); (i & j) !== 0; j >>>= 1) { - i ^= j; - } - i ^= j; - - // backup over finished tables - mask = (1 << w) - 1; // needed on HP, cc -O bug - while ((i & mask) != x[h]) { - h--; // don't need to update q - w -= l; - mask = (1 << w) - 1; - } - } - } - // Return Z_BUF_ERROR if we were given an incomplete table - return y !== 0 && g != 1 ? Z_BUF_ERROR : Z_OK; - } - - function initWorkArea(vsize) { - let i; - if (!hn) { - hn = []; // []; //new Array(1); - v = []; // new Array(vsize); - c = new Int32Array(BMAX + 1); // new Array(BMAX + 1); - r = []; // new Array(3); - u = new Int32Array(BMAX); // new Array(BMAX); - x = new Int32Array(BMAX + 1); // new Array(BMAX + 1); - } - if (v.length < vsize) { - v = []; // new Array(vsize); - } - for (i = 0; i < vsize; i++) { - v[i] = 0; - } - for (i = 0; i < BMAX + 1; i++) { - c[i] = 0; - } - for (i = 0; i < 3; i++) { - r[i] = 0; - } - // for(int i=0; i 257)) { - if (result == Z_DATA_ERROR) { - z.msg = "oversubscribed distance tree"; - } else if (result == Z_BUF_ERROR) { - z.msg = "incomplete distance tree"; - result = Z_DATA_ERROR; - } else if (result != Z_MEM_ERROR) { - z.msg = "empty distance tree with lengths"; - result = Z_DATA_ERROR; - } - return result; - } - - return Z_OK; - }; - -} - -InfTree.inflate_trees_fixed = function (bl, // literal desired/actual bit depth - bd, // distance desired/actual bit depth - tl,// literal/length tree result - td// distance tree result -) { - bl[0] = fixed_bl; - bd[0] = fixed_bd; - tl[0] = fixed_tl; - td[0] = fixed_td; - return Z_OK; -}; - -// InfCodes - -// waiting for "i:"=input, -// "o:"=output, -// "x:"=nothing -const START = 0; // x: set up for LEN -const LEN = 1; // i: get length/literal/eob next -const LENEXT = 2; // i: getting length extra (have base) -const DIST = 3; // i: get distance next -const DISTEXT = 4;// i: getting distance extra -const COPY = 5; // o: copying bytes in win, waiting -// for space -const LIT = 6; // o: got literal, waiting for output -// space -const WASH = 7; // o: got eob, possibly still output -// waiting -const END = 8; // x: got eob and all data flushed -const BADCODE = 9;// x: got error - -function InfCodes() { - const that = this; - - let mode; // current inflate_codes mode - - // mode dependent information - let len = 0; - - let tree; // pointer into tree - let tree_index = 0; - let need = 0; // bits needed - - let lit = 0; - - // if EXT or COPY, where and how much - let get = 0; // bits to get for extra - let dist = 0; // distance back to copy from - - let lbits = 0; // ltree bits decoded per branch - let dbits = 0; // dtree bits decoder per branch - let ltree; // literal/length/eob tree - let ltree_index = 0; // literal/length/eob tree - let dtree; // distance tree - let dtree_index = 0; // distance tree - - // Called with number of bytes left to write in win at least 258 - // (the maximum string length) and number of input bytes available - // at least ten. The ten bytes are six bytes for the longest length/ - // distance pair plus four bytes for overloading the bit buffer. - - function inflate_fast(bl, bd, tl, tl_index, td, td_index, s, z) { - let t; // temporary pointer - let tp; // temporary pointer - let tp_index; // temporary pointer - let e; // extra bits or operation - let b; // bit buffer - let k; // bits in bit buffer - let p; // input data pointer - let n; // bytes available there - let q; // output win write pointer - let m; // bytes to end of win or read pointer - let ml; // mask for literal/length tree - let md; // mask for distance tree - let c; // bytes to copy - let d; // distance back to copy from - let r; // copy source pointer - - let tp_index_t_3; // (tp_index+t)*3 - - // load input, output, bit values - p = z.next_in_index; - n = z.avail_in; - b = s.bitb; - k = s.bitk; - q = s.write; - m = q < s.read ? s.read - q - 1 : s.end - q; - - // initialize masks - ml = inflate_mask[bl]; - md = inflate_mask[bd]; - - // do until not enough input or output space for fast loop - do { // assume called with m >= 258 && n >= 10 - // get literal/length code - while (k < (20)) { // max bits for literal/length code - n--; - b |= (z.read_byte(p++) & 0xff) << k; - k += 8; - } - - t = b & ml; - tp = tl; - tp_index = tl_index; - tp_index_t_3 = (tp_index + t) * 3; - if ((e = tp[tp_index_t_3]) === 0) { - b >>= (tp[tp_index_t_3 + 1]); - k -= (tp[tp_index_t_3 + 1]); - - s.win[q++] = /* (byte) */tp[tp_index_t_3 + 2]; - m--; - continue; - } - do { - - b >>= (tp[tp_index_t_3 + 1]); - k -= (tp[tp_index_t_3 + 1]); - - if ((e & 16) !== 0) { - e &= 15; - c = tp[tp_index_t_3 + 2] + (/* (int) */b & inflate_mask[e]); - - b >>= e; - k -= e; - - // decode distance base of block to copy - while (k < (15)) { // max bits for distance code - n--; - b |= (z.read_byte(p++) & 0xff) << k; - k += 8; - } - - t = b & md; - tp = td; - tp_index = td_index; - tp_index_t_3 = (tp_index + t) * 3; - e = tp[tp_index_t_3]; - - do { - - b >>= (tp[tp_index_t_3 + 1]); - k -= (tp[tp_index_t_3 + 1]); - - if ((e & 16) !== 0) { - // get extra bits to add to distance base - e &= 15; - while (k < (e)) { // get extra bits (up to 13) - n--; - b |= (z.read_byte(p++) & 0xff) << k; - k += 8; - } - - d = tp[tp_index_t_3 + 2] + (b & inflate_mask[e]); - - b >>= (e); - k -= (e); - - // do the copy - m -= c; - if (q >= d) { // offset before dest - // just copy - r = q - d; - if (q - r > 0 && 2 > (q - r)) { - s.win[q++] = s.win[r++]; // minimum - // count is - // three, - s.win[q++] = s.win[r++]; // so unroll - // loop a - // little - c -= 2; - } else { - s.win.set(s.win.subarray(r, r + 2), q); - q += 2; - r += 2; - c -= 2; - } - } else { // else offset after destination - r = q - d; - do { - r += s.end; // force pointer in win - } while (r < 0); // covers invalid distances - e = s.end - r; - if (c > e) { // if source crosses, - c -= e; // wrapped copy - if (q - r > 0 && e > (q - r)) { - do { - s.win[q++] = s.win[r++]; - } while (--e !== 0); - } else { - s.win.set(s.win.subarray(r, r + e), q); - q += e; - r += e; - e = 0; - } - r = 0; // copy rest from start of win - } - - } - - // copy all or what's left - if (q - r > 0 && c > (q - r)) { - do { - s.win[q++] = s.win[r++]; - } while (--c !== 0); - } else { - s.win.set(s.win.subarray(r, r + c), q); - q += c; - r += c; - c = 0; - } - break; - } else if ((e & 64) === 0) { - t += tp[tp_index_t_3 + 2]; - t += (b & inflate_mask[e]); - tp_index_t_3 = (tp_index + t) * 3; - e = tp[tp_index_t_3]; - } else { - z.msg = "invalid distance code"; - - c = z.avail_in - n; - c = (k >> 3) < c ? k >> 3 : c; - n += c; - p -= c; - k -= c << 3; - - s.bitb = b; - s.bitk = k; - z.avail_in = n; - z.total_in += p - z.next_in_index; - z.next_in_index = p; - s.write = q; - - return Z_DATA_ERROR; - } - // eslint-disable-next-line no-constant-condition - } while (true); - break; - } - - if ((e & 64) === 0) { - t += tp[tp_index_t_3 + 2]; - t += (b & inflate_mask[e]); - tp_index_t_3 = (tp_index + t) * 3; - if ((e = tp[tp_index_t_3]) === 0) { - - b >>= (tp[tp_index_t_3 + 1]); - k -= (tp[tp_index_t_3 + 1]); - - s.win[q++] = /* (byte) */tp[tp_index_t_3 + 2]; - m--; - break; - } - } else if ((e & 32) !== 0) { - - c = z.avail_in - n; - c = (k >> 3) < c ? k >> 3 : c; - n += c; - p -= c; - k -= c << 3; - - s.bitb = b; - s.bitk = k; - z.avail_in = n; - z.total_in += p - z.next_in_index; - z.next_in_index = p; - s.write = q; - - return Z_STREAM_END; - } else { - z.msg = "invalid literal/length code"; - - c = z.avail_in - n; - c = (k >> 3) < c ? k >> 3 : c; - n += c; - p -= c; - k -= c << 3; - - s.bitb = b; - s.bitk = k; - z.avail_in = n; - z.total_in += p - z.next_in_index; - z.next_in_index = p; - s.write = q; - - return Z_DATA_ERROR; - } - // eslint-disable-next-line no-constant-condition - } while (true); - } while (m >= 258 && n >= 10); - - // not enough input or output--restore pointers and return - c = z.avail_in - n; - c = (k >> 3) < c ? k >> 3 : c; - n += c; - p -= c; - k -= c << 3; - - s.bitb = b; - s.bitk = k; - z.avail_in = n; - z.total_in += p - z.next_in_index; - z.next_in_index = p; - s.write = q; - - return Z_OK; - } - - that.init = function (bl, bd, tl, tl_index, td, td_index) { - mode = START; - lbits = /* (byte) */bl; - dbits = /* (byte) */bd; - ltree = tl; - ltree_index = tl_index; - dtree = td; - dtree_index = td_index; - tree = null; - }; - - that.proc = function (s, z, r) { - let j; // temporary storage - let tindex; // temporary pointer - let e; // extra bits or operation - let b = 0; // bit buffer - let k = 0; // bits in bit buffer - let p = 0; // input data pointer - let n; // bytes available there - let q; // output win write pointer - let m; // bytes to end of win or read pointer - let f; // pointer to copy strings from - - // copy input/output information to locals (UPDATE macro restores) - p = z.next_in_index; - n = z.avail_in; - b = s.bitb; - k = s.bitk; - q = s.write; - m = q < s.read ? s.read - q - 1 : s.end - q; - - // process input and output based on current state - // eslint-disable-next-line no-constant-condition - while (true) { - switch (mode) { - // waiting for "i:"=input, "o:"=output, "x:"=nothing - case START: // x: set up for LEN - if (m >= 258 && n >= 10) { - - s.bitb = b; - s.bitk = k; - z.avail_in = n; - z.total_in += p - z.next_in_index; - z.next_in_index = p; - s.write = q; - r = inflate_fast(lbits, dbits, ltree, ltree_index, dtree, dtree_index, s, z); - - p = z.next_in_index; - n = z.avail_in; - b = s.bitb; - k = s.bitk; - q = s.write; - m = q < s.read ? s.read - q - 1 : s.end - q; - - if (r != Z_OK) { - mode = r == Z_STREAM_END ? WASH : BADCODE; - break; - } - } - need = lbits; - tree = ltree; - tree_index = ltree_index; - - mode = LEN; - /* falls through */ - case LEN: // i: get length/literal/eob next - j = need; - - while (k < (j)) { - if (n !== 0) - r = Z_OK; - else { - - s.bitb = b; - s.bitk = k; - z.avail_in = n; - z.total_in += p - z.next_in_index; - z.next_in_index = p; - s.write = q; - return s.inflate_flush(z, r); - } - n--; - b |= (z.read_byte(p++) & 0xff) << k; - k += 8; - } - - tindex = (tree_index + (b & inflate_mask[j])) * 3; - - b >>>= (tree[tindex + 1]); - k -= (tree[tindex + 1]); - - e = tree[tindex]; - - if (e === 0) { // literal - lit = tree[tindex + 2]; - mode = LIT; - break; - } - if ((e & 16) !== 0) { // length - get = e & 15; - len = tree[tindex + 2]; - mode = LENEXT; - break; - } - if ((e & 64) === 0) { // next table - need = e; - tree_index = tindex / 3 + tree[tindex + 2]; - break; - } - if ((e & 32) !== 0) { // end of block - mode = WASH; - break; - } - mode = BADCODE; // invalid code - z.msg = "invalid literal/length code"; - r = Z_DATA_ERROR; - - s.bitb = b; - s.bitk = k; - z.avail_in = n; - z.total_in += p - z.next_in_index; - z.next_in_index = p; - s.write = q; - return s.inflate_flush(z, r); - - case LENEXT: // i: getting length extra (have base) - j = get; - - while (k < (j)) { - if (n !== 0) - r = Z_OK; - else { - - s.bitb = b; - s.bitk = k; - z.avail_in = n; - z.total_in += p - z.next_in_index; - z.next_in_index = p; - s.write = q; - return s.inflate_flush(z, r); - } - n--; - b |= (z.read_byte(p++) & 0xff) << k; - k += 8; - } - - len += (b & inflate_mask[j]); - - b >>= j; - k -= j; - - need = dbits; - tree = dtree; - tree_index = dtree_index; - mode = DIST; - /* falls through */ - case DIST: // i: get distance next - j = need; - - while (k < (j)) { - if (n !== 0) - r = Z_OK; - else { - - s.bitb = b; - s.bitk = k; - z.avail_in = n; - z.total_in += p - z.next_in_index; - z.next_in_index = p; - s.write = q; - return s.inflate_flush(z, r); - } - n--; - b |= (z.read_byte(p++) & 0xff) << k; - k += 8; - } - - tindex = (tree_index + (b & inflate_mask[j])) * 3; - - b >>= tree[tindex + 1]; - k -= tree[tindex + 1]; - - e = (tree[tindex]); - if ((e & 16) !== 0) { // distance - get = e & 15; - dist = tree[tindex + 2]; - mode = DISTEXT; - break; - } - if ((e & 64) === 0) { // next table - need = e; - tree_index = tindex / 3 + tree[tindex + 2]; - break; - } - mode = BADCODE; // invalid code - z.msg = "invalid distance code"; - r = Z_DATA_ERROR; - - s.bitb = b; - s.bitk = k; - z.avail_in = n; - z.total_in += p - z.next_in_index; - z.next_in_index = p; - s.write = q; - return s.inflate_flush(z, r); - - case DISTEXT: // i: getting distance extra - j = get; - - while (k < (j)) { - if (n !== 0) - r = Z_OK; - else { - - s.bitb = b; - s.bitk = k; - z.avail_in = n; - z.total_in += p - z.next_in_index; - z.next_in_index = p; - s.write = q; - return s.inflate_flush(z, r); - } - n--; - b |= (z.read_byte(p++) & 0xff) << k; - k += 8; - } - - dist += (b & inflate_mask[j]); - - b >>= j; - k -= j; - - mode = COPY; - /* falls through */ - case COPY: // o: copying bytes in win, waiting for space - f = q - dist; - while (f < 0) { // modulo win size-"while" instead - f += s.end; // of "if" handles invalid distances - } - while (len !== 0) { - - if (m === 0) { - if (q == s.end && s.read !== 0) { - q = 0; - m = q < s.read ? s.read - q - 1 : s.end - q; - } - if (m === 0) { - s.write = q; - r = s.inflate_flush(z, r); - q = s.write; - m = q < s.read ? s.read - q - 1 : s.end - q; - - if (q == s.end && s.read !== 0) { - q = 0; - m = q < s.read ? s.read - q - 1 : s.end - q; - } - - if (m === 0) { - s.bitb = b; - s.bitk = k; - z.avail_in = n; - z.total_in += p - z.next_in_index; - z.next_in_index = p; - s.write = q; - return s.inflate_flush(z, r); - } - } - } - - s.win[q++] = s.win[f++]; - m--; - - if (f == s.end) - f = 0; - len--; - } - mode = START; - break; - case LIT: // o: got literal, waiting for output space - if (m === 0) { - if (q == s.end && s.read !== 0) { - q = 0; - m = q < s.read ? s.read - q - 1 : s.end - q; - } - if (m === 0) { - s.write = q; - r = s.inflate_flush(z, r); - q = s.write; - m = q < s.read ? s.read - q - 1 : s.end - q; - - if (q == s.end && s.read !== 0) { - q = 0; - m = q < s.read ? s.read - q - 1 : s.end - q; - } - if (m === 0) { - s.bitb = b; - s.bitk = k; - z.avail_in = n; - z.total_in += p - z.next_in_index; - z.next_in_index = p; - s.write = q; - return s.inflate_flush(z, r); - } - } - } - r = Z_OK; - - s.win[q++] = /* (byte) */lit; - m--; - - mode = START; - break; - case WASH: // o: got eob, possibly more output - if (k > 7) { // return unused byte, if any - k -= 8; - n++; - p--; // can always return one - } - - s.write = q; - r = s.inflate_flush(z, r); - q = s.write; - m = q < s.read ? s.read - q - 1 : s.end - q; - - if (s.read != s.write) { - s.bitb = b; - s.bitk = k; - z.avail_in = n; - z.total_in += p - z.next_in_index; - z.next_in_index = p; - s.write = q; - return s.inflate_flush(z, r); - } - mode = END; - /* falls through */ - case END: - r = Z_STREAM_END; - s.bitb = b; - s.bitk = k; - z.avail_in = n; - z.total_in += p - z.next_in_index; - z.next_in_index = p; - s.write = q; - return s.inflate_flush(z, r); - - case BADCODE: // x: got error - - r = Z_DATA_ERROR; - - s.bitb = b; - s.bitk = k; - z.avail_in = n; - z.total_in += p - z.next_in_index; - z.next_in_index = p; - s.write = q; - return s.inflate_flush(z, r); - - default: - r = Z_STREAM_ERROR; - - s.bitb = b; - s.bitk = k; - z.avail_in = n; - z.total_in += p - z.next_in_index; - z.next_in_index = p; - s.write = q; - return s.inflate_flush(z, r); - } - } - }; - - that.free = function () { - // ZFREE(z, c); - }; - -} - -// InfBlocks - -// Table for deflate from PKZIP's appnote.txt. -const border = [ // Order of the bit length code lengths - 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]; - -const TYPE = 0; // get type bits (3, including end bit) -const LENS = 1; // get lengths for stored -const STORED = 2;// processing stored block -const TABLE = 3; // get table lengths -const BTREE = 4; // get bit lengths tree for a dynamic -// block -const DTREE = 5; // get length, distance trees for a -// dynamic block -const CODES = 6; // processing fixed or dynamic block -const DRY = 7; // output remaining win bytes -const DONELOCKS = 8; // finished last block, done -const BADBLOCKS = 9; // ot a data error--stuck here - -function InfBlocks(z, w) { - const that = this; - - let mode = TYPE; // current inflate_block mode - - let left = 0; // if STORED, bytes left to copy - - let table = 0; // table lengths (14 bits) - let index = 0; // index into blens (or border) - let blens; // bit lengths of codes - const bb = [0]; // bit length tree depth - const tb = [0]; // bit length decoding tree - - const codes = new InfCodes(); // if CODES, current state - - let last = 0; // true if this block is the last block - - let hufts = new Int32Array(MANY * 3); // single malloc for tree space - const check = 0; // check on output - const inftree = new InfTree(); - - that.bitk = 0; // bits in bit buffer - that.bitb = 0; // bit buffer - that.win = new Uint8Array(w); // sliding win - that.end = w; // one byte after sliding win - that.read = 0; // win read pointer - that.write = 0; // win write pointer - - that.reset = function (z, c) { - if (c) - c[0] = check; - // if (mode == BTREE || mode == DTREE) { - // } - if (mode == CODES) { - codes.free(z); - } - mode = TYPE; - that.bitk = 0; - that.bitb = 0; - that.read = that.write = 0; - }; - - that.reset(z, null); - - // copy as much as possible from the sliding win to the output area - that.inflate_flush = function (z, r) { - let n; - let p; - let q; - - // local copies of source and destination pointers - p = z.next_out_index; - q = that.read; - - // compute number of bytes to copy as far as end of win - n = /* (int) */((q <= that.write ? that.write : that.end) - q); - if (n > z.avail_out) - n = z.avail_out; - if (n !== 0 && r == Z_BUF_ERROR) - r = Z_OK; - - // update counters - z.avail_out -= n; - z.total_out += n; - - // copy as far as end of win - z.next_out.set(that.win.subarray(q, q + n), p); - p += n; - q += n; - - // see if more to copy at beginning of win - if (q == that.end) { - // wrap pointers - q = 0; - if (that.write == that.end) - that.write = 0; - - // compute bytes to copy - n = that.write - q; - if (n > z.avail_out) - n = z.avail_out; - if (n !== 0 && r == Z_BUF_ERROR) - r = Z_OK; - - // update counters - z.avail_out -= n; - z.total_out += n; - - // copy - z.next_out.set(that.win.subarray(q, q + n), p); - p += n; - q += n; - } - - // update pointers - z.next_out_index = p; - that.read = q; - - // done - return r; - }; - - that.proc = function (z, r) { - let t; // temporary storage - let b; // bit buffer - let k; // bits in bit buffer - let p; // input data pointer - let n; // bytes available there - let q; // output win write pointer - let m; // bytes to end of win or read pointer - - let i; - - // copy input/output information to locals (UPDATE macro restores) - // { - p = z.next_in_index; - n = z.avail_in; - b = that.bitb; - k = that.bitk; - // } - // { - q = that.write; - m = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q); - // } - - // process input based on current state - // DEBUG dtree - // eslint-disable-next-line no-constant-condition - while (true) { - let bl, bd, tl, td, bl_, bd_, tl_, td_; - switch (mode) { - case TYPE: - - while (k < (3)) { - if (n !== 0) { - r = Z_OK; - } else { - that.bitb = b; - that.bitk = k; - z.avail_in = n; - z.total_in += p - z.next_in_index; - z.next_in_index = p; - that.write = q; - return that.inflate_flush(z, r); - } - n--; - b |= (z.read_byte(p++) & 0xff) << k; - k += 8; - } - t = /* (int) */(b & 7); - last = t & 1; - - switch (t >>> 1) { - case 0: // stored - // { - b >>>= (3); - k -= (3); - // } - t = k & 7; // go to byte boundary - - // { - b >>>= (t); - k -= (t); - // } - mode = LENS; // get length of stored block - break; - case 1: // fixed - // { - bl = []; // new Array(1); - bd = []; // new Array(1); - tl = [[]]; // new Array(1); - td = [[]]; // new Array(1); - - InfTree.inflate_trees_fixed(bl, bd, tl, td); - codes.init(bl[0], bd[0], tl[0], 0, td[0], 0); - // } - - // { - b >>>= (3); - k -= (3); - // } - - mode = CODES; - break; - case 2: // dynamic - - // { - b >>>= (3); - k -= (3); - // } - - mode = TABLE; - break; - case 3: // illegal - - // { - b >>>= (3); - k -= (3); - // } - mode = BADBLOCKS; - z.msg = "invalid block type"; - r = Z_DATA_ERROR; - - that.bitb = b; - that.bitk = k; - z.avail_in = n; - z.total_in += p - z.next_in_index; - z.next_in_index = p; - that.write = q; - return that.inflate_flush(z, r); - } - break; - case LENS: - - while (k < (32)) { - if (n !== 0) { - r = Z_OK; - } else { - that.bitb = b; - that.bitk = k; - z.avail_in = n; - z.total_in += p - z.next_in_index; - z.next_in_index = p; - that.write = q; - return that.inflate_flush(z, r); - } - n--; - b |= (z.read_byte(p++) & 0xff) << k; - k += 8; - } - - if ((((~b) >>> 16) & 0xffff) != (b & 0xffff)) { - mode = BADBLOCKS; - z.msg = "invalid stored block lengths"; - r = Z_DATA_ERROR; - - that.bitb = b; - that.bitk = k; - z.avail_in = n; - z.total_in += p - z.next_in_index; - z.next_in_index = p; - that.write = q; - return that.inflate_flush(z, r); - } - left = (b & 0xffff); - b = k = 0; // dump bits - mode = left !== 0 ? STORED : (last !== 0 ? DRY : TYPE); - break; - case STORED: - if (n === 0) { - that.bitb = b; - that.bitk = k; - z.avail_in = n; - z.total_in += p - z.next_in_index; - z.next_in_index = p; - that.write = q; - return that.inflate_flush(z, r); - } - - if (m === 0) { - if (q == that.end && that.read !== 0) { - q = 0; - m = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q); - } - if (m === 0) { - that.write = q; - r = that.inflate_flush(z, r); - q = that.write; - m = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q); - if (q == that.end && that.read !== 0) { - q = 0; - m = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q); - } - if (m === 0) { - that.bitb = b; - that.bitk = k; - z.avail_in = n; - z.total_in += p - z.next_in_index; - z.next_in_index = p; - that.write = q; - return that.inflate_flush(z, r); - } - } - } - r = Z_OK; - - t = left; - if (t > n) - t = n; - if (t > m) - t = m; - that.win.set(z.read_buf(p, t), q); - p += t; - n -= t; - q += t; - m -= t; - if ((left -= t) !== 0) - break; - mode = last !== 0 ? DRY : TYPE; - break; - case TABLE: - - while (k < (14)) { - if (n !== 0) { - r = Z_OK; - } else { - that.bitb = b; - that.bitk = k; - z.avail_in = n; - z.total_in += p - z.next_in_index; - z.next_in_index = p; - that.write = q; - return that.inflate_flush(z, r); - } - - n--; - b |= (z.read_byte(p++) & 0xff) << k; - k += 8; - } - - table = t = (b & 0x3fff); - if ((t & 0x1f) > 29 || ((t >> 5) & 0x1f) > 29) { - mode = BADBLOCKS; - z.msg = "too many length or distance symbols"; - r = Z_DATA_ERROR; - - that.bitb = b; - that.bitk = k; - z.avail_in = n; - z.total_in += p - z.next_in_index; - z.next_in_index = p; - that.write = q; - return that.inflate_flush(z, r); - } - t = 258 + (t & 0x1f) + ((t >> 5) & 0x1f); - if (!blens || blens.length < t) { - blens = []; // new Array(t); - } else { - for (i = 0; i < t; i++) { - blens[i] = 0; - } - } - - // { - b >>>= (14); - k -= (14); - // } - - index = 0; - mode = BTREE; - /* falls through */ - case BTREE: - while (index < 4 + (table >>> 10)) { - while (k < (3)) { - if (n !== 0) { - r = Z_OK; - } else { - that.bitb = b; - that.bitk = k; - z.avail_in = n; - z.total_in += p - z.next_in_index; - z.next_in_index = p; - that.write = q; - return that.inflate_flush(z, r); - } - n--; - b |= (z.read_byte(p++) & 0xff) << k; - k += 8; - } - - blens[border[index++]] = b & 7; - - // { - b >>>= (3); - k -= (3); - // } - } - - while (index < 19) { - blens[border[index++]] = 0; - } - - bb[0] = 7; - t = inftree.inflate_trees_bits(blens, bb, tb, hufts, z); - if (t != Z_OK) { - r = t; - if (r == Z_DATA_ERROR) { - blens = null; - mode = BADBLOCKS; - } - - that.bitb = b; - that.bitk = k; - z.avail_in = n; - z.total_in += p - z.next_in_index; - z.next_in_index = p; - that.write = q; - return that.inflate_flush(z, r); - } - - index = 0; - mode = DTREE; - /* falls through */ - case DTREE: - // eslint-disable-next-line no-constant-condition - while (true) { - t = table; - if (index >= 258 + (t & 0x1f) + ((t >> 5) & 0x1f)) { - break; - } - - let j, c; - - t = bb[0]; - - while (k < (t)) { - if (n !== 0) { - r = Z_OK; - } else { - that.bitb = b; - that.bitk = k; - z.avail_in = n; - z.total_in += p - z.next_in_index; - z.next_in_index = p; - that.write = q; - return that.inflate_flush(z, r); - } - n--; - b |= (z.read_byte(p++) & 0xff) << k; - k += 8; - } - - // if (tb[0] == -1) { - // System.err.println("null..."); - // } - - t = hufts[(tb[0] + (b & inflate_mask[t])) * 3 + 1]; - c = hufts[(tb[0] + (b & inflate_mask[t])) * 3 + 2]; - - if (c < 16) { - b >>>= (t); - k -= (t); - blens[index++] = c; - } else { // c == 16..18 - i = c == 18 ? 7 : c - 14; - j = c == 18 ? 11 : 3; - - while (k < (t + i)) { - if (n !== 0) { - r = Z_OK; - } else { - that.bitb = b; - that.bitk = k; - z.avail_in = n; - z.total_in += p - z.next_in_index; - z.next_in_index = p; - that.write = q; - return that.inflate_flush(z, r); - } - n--; - b |= (z.read_byte(p++) & 0xff) << k; - k += 8; - } - - b >>>= (t); - k -= (t); - - j += (b & inflate_mask[i]); - - b >>>= (i); - k -= (i); - - i = index; - t = table; - if (i + j > 258 + (t & 0x1f) + ((t >> 5) & 0x1f) || (c == 16 && i < 1)) { - blens = null; - mode = BADBLOCKS; - z.msg = "invalid bit length repeat"; - r = Z_DATA_ERROR; - - that.bitb = b; - that.bitk = k; - z.avail_in = n; - z.total_in += p - z.next_in_index; - z.next_in_index = p; - that.write = q; - return that.inflate_flush(z, r); - } - - c = c == 16 ? blens[i - 1] : 0; - do { - blens[i++] = c; - } while (--j !== 0); - index = i; - } - } - - tb[0] = -1; - // { - bl_ = []; // new Array(1); - bd_ = []; // new Array(1); - tl_ = []; // new Array(1); - td_ = []; // new Array(1); - bl_[0] = 9; // must be <= 9 for lookahead assumptions - bd_[0] = 6; // must be <= 9 for lookahead assumptions - - t = table; - t = inftree.inflate_trees_dynamic(257 + (t & 0x1f), 1 + ((t >> 5) & 0x1f), blens, bl_, bd_, tl_, td_, hufts, z); - - if (t != Z_OK) { - if (t == Z_DATA_ERROR) { - blens = null; - mode = BADBLOCKS; - } - r = t; - - that.bitb = b; - that.bitk = k; - z.avail_in = n; - z.total_in += p - z.next_in_index; - z.next_in_index = p; - that.write = q; - return that.inflate_flush(z, r); - } - codes.init(bl_[0], bd_[0], hufts, tl_[0], hufts, td_[0]); - // } - mode = CODES; - /* falls through */ - case CODES: - that.bitb = b; - that.bitk = k; - z.avail_in = n; - z.total_in += p - z.next_in_index; - z.next_in_index = p; - that.write = q; - - if ((r = codes.proc(that, z, r)) != Z_STREAM_END) { - return that.inflate_flush(z, r); - } - r = Z_OK; - codes.free(z); - - p = z.next_in_index; - n = z.avail_in; - b = that.bitb; - k = that.bitk; - q = that.write; - m = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q); - - if (last === 0) { - mode = TYPE; - break; - } - mode = DRY; - /* falls through */ - case DRY: - that.write = q; - r = that.inflate_flush(z, r); - q = that.write; - m = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q); - if (that.read != that.write) { - that.bitb = b; - that.bitk = k; - z.avail_in = n; - z.total_in += p - z.next_in_index; - z.next_in_index = p; - that.write = q; - return that.inflate_flush(z, r); - } - mode = DONELOCKS; - /* falls through */ - case DONELOCKS: - r = Z_STREAM_END; - - that.bitb = b; - that.bitk = k; - z.avail_in = n; - z.total_in += p - z.next_in_index; - z.next_in_index = p; - that.write = q; - return that.inflate_flush(z, r); - case BADBLOCKS: - r = Z_DATA_ERROR; - - that.bitb = b; - that.bitk = k; - z.avail_in = n; - z.total_in += p - z.next_in_index; - z.next_in_index = p; - that.write = q; - return that.inflate_flush(z, r); - - default: - r = Z_STREAM_ERROR; - - that.bitb = b; - that.bitk = k; - z.avail_in = n; - z.total_in += p - z.next_in_index; - z.next_in_index = p; - that.write = q; - return that.inflate_flush(z, r); - } - } - }; - - that.free = function (z) { - that.reset(z, null); - that.win = null; - hufts = null; - // ZFREE(z, s); - }; - - that.set_dictionary = function (d, start, n) { - that.win.set(d.subarray(start, start + n), 0); - that.read = that.write = n; - }; - - // Returns true if inflate is currently at the end of a block generated - // by Z_SYNC_FLUSH or Z_FULL_FLUSH. - that.sync_point = function () { - return mode == LENS ? 1 : 0; - }; - -} - -// Inflate - -// preset dictionary flag in zlib header -const PRESET_DICT = 0x20; - -const Z_DEFLATED = 8; - -const METHOD = 0; // waiting for method byte -const FLAG = 1; // waiting for flag byte -const DICT4 = 2; // four dictionary check bytes to go -const DICT3 = 3; // three dictionary check bytes to go -const DICT2 = 4; // two dictionary check bytes to go -const DICT1 = 5; // one dictionary check byte to go -const DICT0 = 6; // waiting for inflateSetDictionary -const BLOCKS = 7; // decompressing blocks -const DONE = 12; // finished check, done -const BAD = 13; // got an error--stay here - -const mark = [0, 0, 0xff, 0xff]; - -function Inflate() { - const that = this; - - that.mode = 0; // current inflate mode - - // mode dependent information - that.method = 0; // if FLAGS, method byte - - // if CHECK, check values to compare - that.was = [0]; // new Array(1); // computed check value - that.need = 0; // stream check value - - // if BAD, inflateSync's marker bytes count - that.marker = 0; - - // mode independent information - that.wbits = 0; // log2(win size) (8..15, defaults to 15) - - // this.blocks; // current inflate_blocks state - - function inflateReset(z) { - if (!z || !z.istate) - return Z_STREAM_ERROR; - - z.total_in = z.total_out = 0; - z.msg = null; - z.istate.mode = BLOCKS; - z.istate.blocks.reset(z, null); - return Z_OK; - } - - that.inflateEnd = function (z) { - if (that.blocks) - that.blocks.free(z); - that.blocks = null; - // ZFREE(z, z->state); - return Z_OK; - }; - - that.inflateInit = function (z, w) { - z.msg = null; - that.blocks = null; - - // set win size - if (w < 8 || w > 15) { - that.inflateEnd(z); - return Z_STREAM_ERROR; - } - that.wbits = w; - - z.istate.blocks = new InfBlocks(z, 1 << w); - - // reset state - inflateReset(z); - return Z_OK; - }; - - that.inflate = function (z, f) { - let r; - let b; - - if (!z || !z.istate || !z.next_in) - return Z_STREAM_ERROR; - const istate = z.istate; - f = f == Z_FINISH ? Z_BUF_ERROR : Z_OK; - r = Z_BUF_ERROR; - // eslint-disable-next-line no-constant-condition - while (true) { - switch (istate.mode) { - case METHOD: - - if (z.avail_in === 0) - return r; - r = f; - - z.avail_in--; - z.total_in++; - if (((istate.method = z.read_byte(z.next_in_index++)) & 0xf) != Z_DEFLATED) { - istate.mode = BAD; - z.msg = "unknown compression method"; - istate.marker = 5; // can't try inflateSync - break; - } - if ((istate.method >> 4) + 8 > istate.wbits) { - istate.mode = BAD; - z.msg = "invalid win size"; - istate.marker = 5; // can't try inflateSync - break; - } - istate.mode = FLAG; - /* falls through */ - case FLAG: - - if (z.avail_in === 0) - return r; - r = f; - - z.avail_in--; - z.total_in++; - b = (z.read_byte(z.next_in_index++)) & 0xff; - - if ((((istate.method << 8) + b) % 31) !== 0) { - istate.mode = BAD; - z.msg = "incorrect header check"; - istate.marker = 5; // can't try inflateSync - break; - } - - if ((b & PRESET_DICT) === 0) { - istate.mode = BLOCKS; - break; - } - istate.mode = DICT4; - /* falls through */ - case DICT4: - - if (z.avail_in === 0) - return r; - r = f; - - z.avail_in--; - z.total_in++; - istate.need = ((z.read_byte(z.next_in_index++) & 0xff) << 24) & 0xff000000; - istate.mode = DICT3; - /* falls through */ - case DICT3: - - if (z.avail_in === 0) - return r; - r = f; - - z.avail_in--; - z.total_in++; - istate.need += ((z.read_byte(z.next_in_index++) & 0xff) << 16) & 0xff0000; - istate.mode = DICT2; - /* falls through */ - case DICT2: - - if (z.avail_in === 0) - return r; - r = f; - - z.avail_in--; - z.total_in++; - istate.need += ((z.read_byte(z.next_in_index++) & 0xff) << 8) & 0xff00; - istate.mode = DICT1; - /* falls through */ - case DICT1: - - if (z.avail_in === 0) - return r; - r = f; - - z.avail_in--; - z.total_in++; - istate.need += (z.read_byte(z.next_in_index++) & 0xff); - istate.mode = DICT0; - return Z_NEED_DICT; - case DICT0: - istate.mode = BAD; - z.msg = "need dictionary"; - istate.marker = 0; // can try inflateSync - return Z_STREAM_ERROR; - case BLOCKS: - - r = istate.blocks.proc(z, r); - if (r == Z_DATA_ERROR) { - istate.mode = BAD; - istate.marker = 0; // can try inflateSync - break; - } - if (r == Z_OK) { - r = f; - } - if (r != Z_STREAM_END) { - return r; - } - r = f; - istate.blocks.reset(z, istate.was); - istate.mode = DONE; - /* falls through */ - case DONE: - z.avail_in = 0; - return Z_STREAM_END; - case BAD: - return Z_DATA_ERROR; - default: - return Z_STREAM_ERROR; - } - } - }; - - that.inflateSetDictionary = function (z, dictionary, dictLength) { - let index = 0, length = dictLength; - if (!z || !z.istate || z.istate.mode != DICT0) - return Z_STREAM_ERROR; - const istate = z.istate; - if (length >= (1 << istate.wbits)) { - length = (1 << istate.wbits) - 1; - index = dictLength - length; - } - istate.blocks.set_dictionary(dictionary, index, length); - istate.mode = BLOCKS; - return Z_OK; - }; - - that.inflateSync = function (z) { - let n; // number of bytes to look at - let p; // pointer to bytes - let m; // number of marker bytes found in a row - let r, w; // temporaries to save total_in and total_out - - // set up - if (!z || !z.istate) - return Z_STREAM_ERROR; - const istate = z.istate; - if (istate.mode != BAD) { - istate.mode = BAD; - istate.marker = 0; - } - if ((n = z.avail_in) === 0) - return Z_BUF_ERROR; - p = z.next_in_index; - m = istate.marker; - - // search - while (n !== 0 && m < 4) { - if (z.read_byte(p) == mark[m]) { - m++; - } else if (z.read_byte(p) !== 0) { - m = 0; - } else { - m = 4 - m; - } - p++; - n--; - } - - // restore - z.total_in += p - z.next_in_index; - z.next_in_index = p; - z.avail_in = n; - istate.marker = m; - - // return no joy or set up to restart on a new block - if (m != 4) { - return Z_DATA_ERROR; - } - r = z.total_in; - w = z.total_out; - inflateReset(z); - z.total_in = r; - z.total_out = w; - istate.mode = BLOCKS; - return Z_OK; - }; - - // Returns true if inflate is currently at the end of a block generated - // by Z_SYNC_FLUSH or Z_FULL_FLUSH. This function is used by one PPP - // implementation to provide an additional safety check. PPP uses - // Z_SYNC_FLUSH - // but removes the length bytes of the resulting empty stored block. When - // decompressing, PPP checks that at the end of input packet, inflate is - // waiting for these length bytes. - that.inflateSyncPoint = function (z) { - if (!z || !z.istate || !z.istate.blocks) - return Z_STREAM_ERROR; - return z.istate.blocks.sync_point(); - }; -} - -// ZStream - -function ZStream() { -} - -ZStream.prototype = { - inflateInit(bits) { - const that = this; - that.istate = new Inflate(); - if (!bits) - bits = MAX_BITS; - return that.istate.inflateInit(that, bits); - }, - - inflate(f) { - const that = this; - if (!that.istate) - return Z_STREAM_ERROR; - return that.istate.inflate(that, f); - }, - - inflateEnd() { - const that = this; - if (!that.istate) - return Z_STREAM_ERROR; - const ret = that.istate.inflateEnd(that); - that.istate = null; - return ret; - }, - - inflateSync() { - const that = this; - if (!that.istate) - return Z_STREAM_ERROR; - return that.istate.inflateSync(that); - }, - inflateSetDictionary(dictionary, dictLength) { - const that = this; - if (!that.istate) - return Z_STREAM_ERROR; - return that.istate.inflateSetDictionary(that, dictionary, dictLength); - }, - read_byte(start) { - const that = this; - return that.next_in[start]; - }, - read_buf(start, size) { - const that = this; - return that.next_in.subarray(start, start + size); - } -}; - -// Inflater - -function ZipInflate(options) { - const that = this; - const z = new ZStream(); - const bufsize = options && options.chunkSize ? Math.floor(options.chunkSize * 2) : 128 * 1024; - const flush = Z_NO_FLUSH; - const buf = new Uint8Array(bufsize); - let nomoreinput = false; - - z.inflateInit(); - z.next_out = buf; - - that.append = function (data, onprogress) { - const buffers = []; - let err, array, lastIndex = 0, bufferIndex = 0, bufferSize = 0; - if (data.length === 0) - return; - z.next_in_index = 0; - z.next_in = data; - z.avail_in = data.length; - do { - z.next_out_index = 0; - z.avail_out = bufsize; - if ((z.avail_in === 0) && (!nomoreinput)) { // if buffer is empty and more input is available, refill it - z.next_in_index = 0; - nomoreinput = true; - } - err = z.inflate(flush); - if (nomoreinput && (err === Z_BUF_ERROR)) { - if (z.avail_in !== 0) - throw new Error("inflating: bad input"); - } else if (err !== Z_OK && err !== Z_STREAM_END) - throw new Error("inflating: " + z.msg); - if ((nomoreinput || err === Z_STREAM_END) && (z.avail_in === data.length)) - throw new Error("inflating: bad input"); - if (z.next_out_index) - if (z.next_out_index === bufsize) - buffers.push(new Uint8Array(buf)); - else - buffers.push(buf.slice(0, z.next_out_index)); - bufferSize += z.next_out_index; - if (onprogress && z.next_in_index > 0 && z.next_in_index != lastIndex) { - onprogress(z.next_in_index); - lastIndex = z.next_in_index; - } - } while (z.avail_in > 0 || z.avail_out === 0); - if (buffers.length > 1) { - array = new Uint8Array(bufferSize); - buffers.forEach(function (chunk) { - array.set(chunk, bufferIndex); - bufferIndex += chunk.length; - }); - } else { - array = buffers[0] || new Uint8Array(); - } - return array; - }; - that.flush = function () { - z.inflateEnd(); - }; -} - -/* - Copyright (c) 2022 Gildas Lormeau. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the distribution. - - 3. The names of the authors may not be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT, - INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, - INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, - OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -const MAX_32_BITS = 0xffffffff; -const MAX_16_BITS = 0xffff; -const COMPRESSION_METHOD_DEFLATE = 0x08; -const COMPRESSION_METHOD_STORE = 0x00; -const COMPRESSION_METHOD_AES = 0x63; - -const LOCAL_FILE_HEADER_SIGNATURE = 0x04034b50; -const SPLIT_ZIP_FILE_SIGNATURE = 0x08074b50; -const CENTRAL_FILE_HEADER_SIGNATURE = 0x02014b50; -const END_OF_CENTRAL_DIR_SIGNATURE = 0x06054b50; -const ZIP64_END_OF_CENTRAL_DIR_SIGNATURE = 0x06064b50; -const ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE = 0x07064b50; -const END_OF_CENTRAL_DIR_LENGTH = 22; -const ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH = 20; -const ZIP64_END_OF_CENTRAL_DIR_LENGTH = 56; - -const EXTRAFIELD_TYPE_ZIP64 = 0x0001; -const EXTRAFIELD_TYPE_AES = 0x9901; -const EXTRAFIELD_TYPE_NTFS = 0x000a; -const EXTRAFIELD_TYPE_NTFS_TAG1 = 0x0001; -const EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP = 0x5455; -const EXTRAFIELD_TYPE_UNICODE_PATH = 0x7075; -const EXTRAFIELD_TYPE_UNICODE_COMMENT = 0x6375; - -const BITFLAG_ENCRYPTED = 0x01; -const BITFLAG_LEVEL = 0x06; -const BITFLAG_DATA_DESCRIPTOR = 0x0008; -const BITFLAG_LANG_ENCODING_FLAG = 0x0800; -const FILE_ATTR_MSDOS_DIR_MASK = 0x10; - -const DIRECTORY_SIGNATURE = "/"; - -const UNDEFINED_VALUE = undefined; -const UNDEFINED_TYPE$1 = "undefined"; -const FUNCTION_TYPE$1 = "function"; - -/* - Copyright (c) 2022 Gildas Lormeau. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the distribution. - - 3. The names of the authors may not be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT, - INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, - INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, - OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -class StreamAdapter { - - constructor(Codec) { - return class extends TransformStream { - constructor(_format, options) { - const codec = new Codec(options); - super({ - transform(chunk, controller) { - controller.enqueue(codec.append(chunk)); - }, - flush(controller) { - const chunk = codec.flush(); - if (chunk) { - controller.enqueue(chunk); - } - } - }); - } - }; - } -} - -/* - Copyright (c) 2022 Gildas Lormeau. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the distribution. - - 3. The names of the authors may not be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT, - INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, - INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, - OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -const MINIMUM_CHUNK_SIZE = 64; -let maxWorkers = 2; -try { - if (typeof navigator != UNDEFINED_TYPE$1 && navigator.hardwareConcurrency) { - maxWorkers = navigator.hardwareConcurrency; - } -} catch (_error) { - // ignored -} -const DEFAULT_CONFIGURATION = { - chunkSize: 512 * 1024, - maxWorkers, - terminateWorkerTimeout: 5000, - useWebWorkers: true, - useCompressionStream: true, - workerScripts: UNDEFINED_VALUE, - CompressionStreamNative: typeof CompressionStream != UNDEFINED_TYPE$1 && CompressionStream, - DecompressionStreamNative: typeof DecompressionStream != UNDEFINED_TYPE$1 && DecompressionStream -}; - -const config = Object.assign({}, DEFAULT_CONFIGURATION); - -function getConfiguration() { - return config; -} - -function getChunkSize(config) { - return Math.max(config.chunkSize, MINIMUM_CHUNK_SIZE); -} - -function configure(configuration) { - const { - baseURL, - chunkSize, - maxWorkers, - terminateWorkerTimeout, - useCompressionStream, - useWebWorkers, - Deflate, - Inflate, - CompressionStream, - DecompressionStream, - workerScripts - } = configuration; - setIfDefined("baseURL", baseURL); - setIfDefined("chunkSize", chunkSize); - setIfDefined("maxWorkers", maxWorkers); - setIfDefined("terminateWorkerTimeout", terminateWorkerTimeout); - setIfDefined("useCompressionStream", useCompressionStream); - setIfDefined("useWebWorkers", useWebWorkers); - if (Deflate) { - config.CompressionStream = new StreamAdapter(Deflate); - } - if (Inflate) { - config.DecompressionStream = new StreamAdapter(Inflate); - } - setIfDefined("CompressionStream", CompressionStream); - setIfDefined("DecompressionStream", DecompressionStream); - if (workerScripts !== UNDEFINED_VALUE) { - const { deflate, inflate } = workerScripts; - if (deflate || inflate) { - if (!config.workerScripts) { - config.workerScripts = {}; - } - } - if (deflate) { - if (!Array.isArray(deflate)) { - throw new Error("workerScripts.deflate must be an array"); - } - config.workerScripts.deflate = deflate; - } - if (inflate) { - if (!Array.isArray(inflate)) { - throw new Error("workerScripts.inflate must be an array"); - } - config.workerScripts.inflate = inflate; - } - } -} - -function setIfDefined(propertyName, propertyValue) { - if (propertyValue !== UNDEFINED_VALUE) { - config[propertyName] = propertyValue; - } -} - -/* - Copyright (c) 2022 Gildas Lormeau. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the distribution. - - 3. The names of the authors may not be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT, - INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, - INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, - OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -const table$1 = { - "application": { - "andrew-inset": "ez", - "annodex": "anx", - "atom+xml": "atom", - "atomcat+xml": "atomcat", - "atomserv+xml": "atomsrv", - "bbolin": "lin", - "cap": ["cap", "pcap"], - "cu-seeme": "cu", - "davmount+xml": "davmount", - "dsptype": "tsp", - "ecmascript": ["es", "ecma"], - "futuresplash": "spl", - "hta": "hta", - "java-archive": "jar", - "java-serialized-object": "ser", - "java-vm": "class", - "javascript": "js", - "m3g": "m3g", - "mac-binhex40": "hqx", - "mathematica": ["nb", "ma", "mb"], - "msaccess": "mdb", - "msword": ["doc", "dot"], - "mxf": "mxf", - "oda": "oda", - "ogg": "ogx", - "pdf": "pdf", - "pgp-keys": "key", - "pgp-signature": ["asc", "sig"], - "pics-rules": "prf", - "postscript": ["ps", "ai", "eps", "epsi", "epsf", "eps2", "eps3"], - "rar": "rar", - "rdf+xml": "rdf", - "rss+xml": "rss", - "rtf": "rtf", - "smil": ["smi", "smil"], - "xhtml+xml": ["xhtml", "xht"], - "xml": ["xml", "xsl", "xsd"], - "xspf+xml": "xspf", - "zip": "zip", - "vnd.android.package-archive": "apk", - "vnd.cinderella": "cdy", - "vnd.google-earth.kml+xml": "kml", - "vnd.google-earth.kmz": "kmz", - "vnd.mozilla.xul+xml": "xul", - "vnd.ms-excel": ["xls", "xlb", "xlt", "xlm", "xla", "xlc", "xlw"], - "vnd.ms-pki.seccat": "cat", - "vnd.ms-pki.stl": "stl", - "vnd.ms-powerpoint": ["ppt", "pps", "pot"], - "vnd.oasis.opendocument.chart": "odc", - "vnd.oasis.opendocument.database": "odb", - "vnd.oasis.opendocument.formula": "odf", - "vnd.oasis.opendocument.graphics": "odg", - "vnd.oasis.opendocument.graphics-template": "otg", - "vnd.oasis.opendocument.image": "odi", - "vnd.oasis.opendocument.presentation": "odp", - "vnd.oasis.opendocument.presentation-template": "otp", - "vnd.oasis.opendocument.spreadsheet": "ods", - "vnd.oasis.opendocument.spreadsheet-template": "ots", - "vnd.oasis.opendocument.text": "odt", - "vnd.oasis.opendocument.text-master": "odm", - "vnd.oasis.opendocument.text-template": "ott", - "vnd.oasis.opendocument.text-web": "oth", - "vnd.openxmlformats-officedocument.spreadsheetml.sheet": "xlsx", - "vnd.openxmlformats-officedocument.spreadsheetml.template": "xltx", - "vnd.openxmlformats-officedocument.presentationml.presentation": "pptx", - "vnd.openxmlformats-officedocument.presentationml.slideshow": "ppsx", - "vnd.openxmlformats-officedocument.presentationml.template": "potx", - "vnd.openxmlformats-officedocument.wordprocessingml.document": "docx", - "vnd.openxmlformats-officedocument.wordprocessingml.template": "dotx", - "vnd.smaf": "mmf", - "vnd.stardivision.calc": "sdc", - "vnd.stardivision.chart": "sds", - "vnd.stardivision.draw": "sda", - "vnd.stardivision.impress": "sdd", - "vnd.stardivision.math": ["sdf", "smf"], - "vnd.stardivision.writer": ["sdw", "vor"], - "vnd.stardivision.writer-global": "sgl", - "vnd.sun.xml.calc": "sxc", - "vnd.sun.xml.calc.template": "stc", - "vnd.sun.xml.draw": "sxd", - "vnd.sun.xml.draw.template": "std", - "vnd.sun.xml.impress": "sxi", - "vnd.sun.xml.impress.template": "sti", - "vnd.sun.xml.math": "sxm", - "vnd.sun.xml.writer": "sxw", - "vnd.sun.xml.writer.global": "sxg", - "vnd.sun.xml.writer.template": "stw", - "vnd.symbian.install": ["sis", "sisx"], - "vnd.visio": ["vsd", "vst", "vss", "vsw"], - "vnd.wap.wbxml": "wbxml", - "vnd.wap.wmlc": "wmlc", - "vnd.wap.wmlscriptc": "wmlsc", - "vnd.wordperfect": "wpd", - "vnd.wordperfect5.1": "wp5", - "x-123": "wk", - "x-7z-compressed": "7z", - "x-abiword": "abw", - "x-apple-diskimage": "dmg", - "x-bcpio": "bcpio", - "x-bittorrent": "torrent", - "x-cbr": ["cbr", "cba", "cbt", "cb7"], - "x-cbz": "cbz", - "x-cdf": ["cdf", "cda"], - "x-cdlink": "vcd", - "x-chess-pgn": "pgn", - "x-cpio": "cpio", - "x-csh": "csh", - "x-debian-package": ["deb", "udeb"], - "x-director": ["dcr", "dir", "dxr", "cst", "cct", "cxt", "w3d", "fgd", "swa"], - "x-dms": "dms", - "x-doom": "wad", - "x-dvi": "dvi", - "x-httpd-eruby": "rhtml", - "x-font": "pcf.Z", - "x-freemind": "mm", - "x-gnumeric": "gnumeric", - "x-go-sgf": "sgf", - "x-graphing-calculator": "gcf", - "x-gtar": ["gtar", "taz"], - "x-hdf": "hdf", - "x-httpd-php": ["phtml", "pht", "php"], - "x-httpd-php-source": "phps", - "x-httpd-php3": "php3", - "x-httpd-php3-preprocessed": "php3p", - "x-httpd-php4": "php4", - "x-httpd-php5": "php5", - "x-ica": "ica", - "x-info": "info", - "x-internet-signup": ["ins", "isp"], - "x-iphone": "iii", - "x-iso9660-image": "iso", - "x-java-jnlp-file": "jnlp", - "x-jmol": "jmz", - "x-killustrator": "kil", - "x-koan": ["skp", "skd", "skt", "skm"], - "x-kpresenter": ["kpr", "kpt"], - "x-kword": ["kwd", "kwt"], - "x-latex": "latex", - "x-lha": "lha", - "x-lyx": "lyx", - "x-lzh": "lzh", - "x-lzx": "lzx", - "x-maker": ["frm", "maker", "frame", "fm", "fb", "book", "fbdoc"], - "x-ms-wmd": "wmd", - "x-ms-wmz": "wmz", - "x-msdos-program": ["com", "exe", "bat", "dll"], - "x-msi": "msi", - "x-netcdf": ["nc", "cdf"], - "x-ns-proxy-autoconfig": ["pac", "dat"], - "x-nwc": "nwc", - "x-object": "o", - "x-oz-application": "oza", - "x-pkcs7-certreqresp": "p7r", - "x-python-code": ["pyc", "pyo"], - "x-qgis": ["qgs", "shp", "shx"], - "x-quicktimeplayer": "qtl", - "x-redhat-package-manager": "rpm", - "x-ruby": "rb", - "x-sh": "sh", - "x-shar": "shar", - "x-shockwave-flash": ["swf", "swfl"], - "x-silverlight": "scr", - "x-stuffit": "sit", - "x-sv4cpio": "sv4cpio", - "x-sv4crc": "sv4crc", - "x-tar": "tar", - "x-tcl": "tcl", - "x-tex-gf": "gf", - "x-tex-pk": "pk", - "x-texinfo": ["texinfo", "texi"], - "x-trash": ["~", "%", "bak", "old", "sik"], - "x-troff": ["t", "tr", "roff"], - "x-troff-man": "man", - "x-troff-me": "me", - "x-troff-ms": "ms", - "x-ustar": "ustar", - "x-wais-source": "src", - "x-wingz": "wz", - "x-x509-ca-cert": ["crt", "der", "cer"], - "x-xcf": "xcf", - "x-xfig": "fig", - "x-xpinstall": "xpi", - "applixware": "aw", - "atomsvc+xml": "atomsvc", - "ccxml+xml": "ccxml", - "cdmi-capability": "cdmia", - "cdmi-container": "cdmic", - "cdmi-domain": "cdmid", - "cdmi-object": "cdmio", - "cdmi-queue": "cdmiq", - "docbook+xml": "dbk", - "dssc+der": "dssc", - "dssc+xml": "xdssc", - "emma+xml": "emma", - "epub+zip": "epub", - "exi": "exi", - "font-tdpfr": "pfr", - "gml+xml": "gml", - "gpx+xml": "gpx", - "gxf": "gxf", - "hyperstudio": "stk", - "inkml+xml": ["ink", "inkml"], - "ipfix": "ipfix", - "json": "json", - "jsonml+json": "jsonml", - "lost+xml": "lostxml", - "mads+xml": "mads", - "marc": "mrc", - "marcxml+xml": "mrcx", - "mathml+xml": "mathml", - "mbox": "mbox", - "mediaservercontrol+xml": "mscml", - "metalink+xml": "metalink", - "metalink4+xml": "meta4", - "mets+xml": "mets", - "mods+xml": "mods", - "mp21": ["m21", "mp21"], - "mp4": "mp4s", - "oebps-package+xml": "opf", - "omdoc+xml": "omdoc", - "onenote": ["onetoc", "onetoc2", "onetmp", "onepkg"], - "oxps": "oxps", - "patch-ops-error+xml": "xer", - "pgp-encrypted": "pgp", - "pkcs10": "p10", - "pkcs7-mime": ["p7m", "p7c"], - "pkcs7-signature": "p7s", - "pkcs8": "p8", - "pkix-attr-cert": "ac", - "pkix-crl": "crl", - "pkix-pkipath": "pkipath", - "pkixcmp": "pki", - "pls+xml": "pls", - "prs.cww": "cww", - "pskc+xml": "pskcxml", - "reginfo+xml": "rif", - "relax-ng-compact-syntax": "rnc", - "resource-lists+xml": "rl", - "resource-lists-diff+xml": "rld", - "rls-services+xml": "rs", - "rpki-ghostbusters": "gbr", - "rpki-manifest": "mft", - "rpki-roa": "roa", - "rsd+xml": "rsd", - "sbml+xml": "sbml", - "scvp-cv-request": "scq", - "scvp-cv-response": "scs", - "scvp-vp-request": "spq", - "scvp-vp-response": "spp", - "sdp": "sdp", - "set-payment-initiation": "setpay", - "set-registration-initiation": "setreg", - "shf+xml": "shf", - "sparql-query": "rq", - "sparql-results+xml": "srx", - "srgs": "gram", - "srgs+xml": "grxml", - "sru+xml": "sru", - "ssdl+xml": "ssdl", - "ssml+xml": "ssml", - "tei+xml": ["tei", "teicorpus"], - "thraud+xml": "tfi", - "timestamped-data": "tsd", - "vnd.3gpp.pic-bw-large": "plb", - "vnd.3gpp.pic-bw-small": "psb", - "vnd.3gpp.pic-bw-var": "pvb", - "vnd.3gpp2.tcap": "tcap", - "vnd.3m.post-it-notes": "pwn", - "vnd.accpac.simply.aso": "aso", - "vnd.accpac.simply.imp": "imp", - "vnd.acucobol": "acu", - "vnd.acucorp": ["atc", "acutc"], - "vnd.adobe.air-application-installer-package+zip": "air", - "vnd.adobe.formscentral.fcdt": "fcdt", - "vnd.adobe.fxp": ["fxp", "fxpl"], - "vnd.adobe.xdp+xml": "xdp", - "vnd.adobe.xfdf": "xfdf", - "vnd.ahead.space": "ahead", - "vnd.airzip.filesecure.azf": "azf", - "vnd.airzip.filesecure.azs": "azs", - "vnd.amazon.ebook": "azw", - "vnd.americandynamics.acc": "acc", - "vnd.amiga.ami": "ami", - "vnd.anser-web-certificate-issue-initiation": "cii", - "vnd.anser-web-funds-transfer-initiation": "fti", - "vnd.antix.game-component": "atx", - "vnd.apple.installer+xml": "mpkg", - "vnd.apple.mpegurl": "m3u8", - "vnd.aristanetworks.swi": "swi", - "vnd.astraea-software.iota": "iota", - "vnd.audiograph": "aep", - "vnd.blueice.multipass": "mpm", - "vnd.bmi": "bmi", - "vnd.businessobjects": "rep", - "vnd.chemdraw+xml": "cdxml", - "vnd.chipnuts.karaoke-mmd": "mmd", - "vnd.claymore": "cla", - "vnd.cloanto.rp9": "rp9", - "vnd.clonk.c4group": ["c4g", "c4d", "c4f", "c4p", "c4u"], - "vnd.cluetrust.cartomobile-config": "c11amc", - "vnd.cluetrust.cartomobile-config-pkg": "c11amz", - "vnd.commonspace": "csp", - "vnd.contact.cmsg": "cdbcmsg", - "vnd.cosmocaller": "cmc", - "vnd.crick.clicker": "clkx", - "vnd.crick.clicker.keyboard": "clkk", - "vnd.crick.clicker.palette": "clkp", - "vnd.crick.clicker.template": "clkt", - "vnd.crick.clicker.wordbank": "clkw", - "vnd.criticaltools.wbs+xml": "wbs", - "vnd.ctc-posml": "pml", - "vnd.cups-ppd": "ppd", - "vnd.curl.car": "car", - "vnd.curl.pcurl": "pcurl", - "vnd.dart": "dart", - "vnd.data-vision.rdz": "rdz", - "vnd.dece.data": ["uvf", "uvvf", "uvd", "uvvd"], - "vnd.dece.ttml+xml": ["uvt", "uvvt"], - "vnd.dece.unspecified": ["uvx", "uvvx"], - "vnd.dece.zip": ["uvz", "uvvz"], - "vnd.denovo.fcselayout-link": "fe_launch", - "vnd.dna": "dna", - "vnd.dolby.mlp": "mlp", - "vnd.dpgraph": "dpg", - "vnd.dreamfactory": "dfac", - "vnd.ds-keypoint": "kpxx", - "vnd.dvb.ait": "ait", - "vnd.dvb.service": "svc", - "vnd.dynageo": "geo", - "vnd.ecowin.chart": "mag", - "vnd.enliven": "nml", - "vnd.epson.esf": "esf", - "vnd.epson.msf": "msf", - "vnd.epson.quickanime": "qam", - "vnd.epson.salt": "slt", - "vnd.epson.ssf": "ssf", - "vnd.eszigno3+xml": ["es3", "et3"], - "vnd.ezpix-album": "ez2", - "vnd.ezpix-package": "ez3", - "vnd.fdf": "fdf", - "vnd.fdsn.mseed": "mseed", - "vnd.fdsn.seed": ["seed", "dataless"], - "vnd.flographit": "gph", - "vnd.fluxtime.clip": "ftc", - "vnd.framemaker": ["fm", "frame", "maker", "book"], - "vnd.frogans.fnc": "fnc", - "vnd.frogans.ltf": "ltf", - "vnd.fsc.weblaunch": "fsc", - "vnd.fujitsu.oasys": "oas", - "vnd.fujitsu.oasys2": "oa2", - "vnd.fujitsu.oasys3": "oa3", - "vnd.fujitsu.oasysgp": "fg5", - "vnd.fujitsu.oasysprs": "bh2", - "vnd.fujixerox.ddd": "ddd", - "vnd.fujixerox.docuworks": "xdw", - "vnd.fujixerox.docuworks.binder": "xbd", - "vnd.fuzzysheet": "fzs", - "vnd.genomatix.tuxedo": "txd", - "vnd.geogebra.file": "ggb", - "vnd.geogebra.tool": "ggt", - "vnd.geometry-explorer": ["gex", "gre"], - "vnd.geonext": "gxt", - "vnd.geoplan": "g2w", - "vnd.geospace": "g3w", - "vnd.gmx": "gmx", - "vnd.grafeq": ["gqf", "gqs"], - "vnd.groove-account": "gac", - "vnd.groove-help": "ghf", - "vnd.groove-identity-message": "gim", - "vnd.groove-injector": "grv", - "vnd.groove-tool-message": "gtm", - "vnd.groove-tool-template": "tpl", - "vnd.groove-vcard": "vcg", - "vnd.hal+xml": "hal", - "vnd.handheld-entertainment+xml": "zmm", - "vnd.hbci": "hbci", - "vnd.hhe.lesson-player": "les", - "vnd.hp-hpgl": "hpgl", - "vnd.hp-hpid": "hpid", - "vnd.hp-hps": "hps", - "vnd.hp-jlyt": "jlt", - "vnd.hp-pcl": "pcl", - "vnd.hp-pclxl": "pclxl", - "vnd.hydrostatix.sof-data": "sfd-hdstx", - "vnd.ibm.minipay": "mpy", - "vnd.ibm.modcap": ["afp", "listafp", "list3820"], - "vnd.ibm.rights-management": "irm", - "vnd.ibm.secure-container": "sc", - "vnd.iccprofile": ["icc", "icm"], - "vnd.igloader": "igl", - "vnd.immervision-ivp": "ivp", - "vnd.immervision-ivu": "ivu", - "vnd.insors.igm": "igm", - "vnd.intercon.formnet": ["xpw", "xpx"], - "vnd.intergeo": "i2g", - "vnd.intu.qbo": "qbo", - "vnd.intu.qfx": "qfx", - "vnd.ipunplugged.rcprofile": "rcprofile", - "vnd.irepository.package+xml": "irp", - "vnd.is-xpr": "xpr", - "vnd.isac.fcs": "fcs", - "vnd.jam": "jam", - "vnd.jcp.javame.midlet-rms": "rms", - "vnd.jisp": "jisp", - "vnd.joost.joda-archive": "joda", - "vnd.kahootz": ["ktz", "ktr"], - "vnd.kde.karbon": "karbon", - "vnd.kde.kchart": "chrt", - "vnd.kde.kformula": "kfo", - "vnd.kde.kivio": "flw", - "vnd.kde.kontour": "kon", - "vnd.kde.kpresenter": ["kpr", "kpt"], - "vnd.kde.kspread": "ksp", - "vnd.kde.kword": ["kwd", "kwt"], - "vnd.kenameaapp": "htke", - "vnd.kidspiration": "kia", - "vnd.kinar": ["kne", "knp"], - "vnd.koan": ["skp", "skd", "skt", "skm"], - "vnd.kodak-descriptor": "sse", - "vnd.las.las+xml": "lasxml", - "vnd.llamagraphics.life-balance.desktop": "lbd", - "vnd.llamagraphics.life-balance.exchange+xml": "lbe", - "vnd.lotus-1-2-3": "123", - "vnd.lotus-approach": "apr", - "vnd.lotus-freelance": "pre", - "vnd.lotus-notes": "nsf", - "vnd.lotus-organizer": "org", - "vnd.lotus-screencam": "scm", - "vnd.lotus-wordpro": "lwp", - "vnd.macports.portpkg": "portpkg", - "vnd.mcd": "mcd", - "vnd.medcalcdata": "mc1", - "vnd.mediastation.cdkey": "cdkey", - "vnd.mfer": "mwf", - "vnd.mfmp": "mfm", - "vnd.micrografx.flo": "flo", - "vnd.micrografx.igx": "igx", - "vnd.mif": "mif", - "vnd.mobius.daf": "daf", - "vnd.mobius.dis": "dis", - "vnd.mobius.mbk": "mbk", - "vnd.mobius.mqy": "mqy", - "vnd.mobius.msl": "msl", - "vnd.mobius.plc": "plc", - "vnd.mobius.txf": "txf", - "vnd.mophun.application": "mpn", - "vnd.mophun.certificate": "mpc", - "vnd.ms-artgalry": "cil", - "vnd.ms-cab-compressed": "cab", - "vnd.ms-excel.addin.macroenabled.12": "xlam", - "vnd.ms-excel.sheet.binary.macroenabled.12": "xlsb", - "vnd.ms-excel.sheet.macroenabled.12": "xlsm", - "vnd.ms-excel.template.macroenabled.12": "xltm", - "vnd.ms-fontobject": "eot", - "vnd.ms-htmlhelp": "chm", - "vnd.ms-ims": "ims", - "vnd.ms-lrm": "lrm", - "vnd.ms-officetheme": "thmx", - "vnd.ms-powerpoint.addin.macroenabled.12": "ppam", - "vnd.ms-powerpoint.presentation.macroenabled.12": "pptm", - "vnd.ms-powerpoint.slide.macroenabled.12": "sldm", - "vnd.ms-powerpoint.slideshow.macroenabled.12": "ppsm", - "vnd.ms-powerpoint.template.macroenabled.12": "potm", - "vnd.ms-project": ["mpp", "mpt"], - "vnd.ms-word.document.macroenabled.12": "docm", - "vnd.ms-word.template.macroenabled.12": "dotm", - "vnd.ms-works": ["wps", "wks", "wcm", "wdb"], - "vnd.ms-wpl": "wpl", - "vnd.ms-xpsdocument": "xps", - "vnd.mseq": "mseq", - "vnd.musician": "mus", - "vnd.muvee.style": "msty", - "vnd.mynfc": "taglet", - "vnd.neurolanguage.nlu": "nlu", - "vnd.nitf": ["ntf", "nitf"], - "vnd.noblenet-directory": "nnd", - "vnd.noblenet-sealer": "nns", - "vnd.noblenet-web": "nnw", - "vnd.nokia.n-gage.data": "ngdat", - "vnd.nokia.n-gage.symbian.install": "n-gage", - "vnd.nokia.radio-preset": "rpst", - "vnd.nokia.radio-presets": "rpss", - "vnd.novadigm.edm": "edm", - "vnd.novadigm.edx": "edx", - "vnd.novadigm.ext": "ext", - "vnd.oasis.opendocument.chart-template": "otc", - "vnd.oasis.opendocument.formula-template": "odft", - "vnd.oasis.opendocument.image-template": "oti", - "vnd.olpc-sugar": "xo", - "vnd.oma.dd2+xml": "dd2", - "vnd.openofficeorg.extension": "oxt", - "vnd.openxmlformats-officedocument.presentationml.slide": "sldx", - "vnd.osgeo.mapguide.package": "mgp", - "vnd.osgi.dp": "dp", - "vnd.osgi.subsystem": "esa", - "vnd.palm": ["pdb", "pqa", "oprc"], - "vnd.pawaafile": "paw", - "vnd.pg.format": "str", - "vnd.pg.osasli": "ei6", - "vnd.picsel": "efif", - "vnd.pmi.widget": "wg", - "vnd.pocketlearn": "plf", - "vnd.powerbuilder6": "pbd", - "vnd.previewsystems.box": "box", - "vnd.proteus.magazine": "mgz", - "vnd.publishare-delta-tree": "qps", - "vnd.pvi.ptid1": "ptid", - "vnd.quark.quarkxpress": ["qxd", "qxt", "qwd", "qwt", "qxl", "qxb"], - "vnd.realvnc.bed": "bed", - "vnd.recordare.musicxml": "mxl", - "vnd.recordare.musicxml+xml": "musicxml", - "vnd.rig.cryptonote": "cryptonote", - "vnd.rn-realmedia": "rm", - "vnd.rn-realmedia-vbr": "rmvb", - "vnd.route66.link66+xml": "link66", - "vnd.sailingtracker.track": "st", - "vnd.seemail": "see", - "vnd.sema": "sema", - "vnd.semd": "semd", - "vnd.semf": "semf", - "vnd.shana.informed.formdata": "ifm", - "vnd.shana.informed.formtemplate": "itp", - "vnd.shana.informed.interchange": "iif", - "vnd.shana.informed.package": "ipk", - "vnd.simtech-mindmapper": ["twd", "twds"], - "vnd.smart.teacher": "teacher", - "vnd.solent.sdkm+xml": ["sdkm", "sdkd"], - "vnd.spotfire.dxp": "dxp", - "vnd.spotfire.sfs": "sfs", - "vnd.stepmania.package": "smzip", - "vnd.stepmania.stepchart": "sm", - "vnd.sus-calendar": ["sus", "susp"], - "vnd.svd": "svd", - "vnd.syncml+xml": "xsm", - "vnd.syncml.dm+wbxml": "bdm", - "vnd.syncml.dm+xml": "xdm", - "vnd.tao.intent-module-archive": "tao", - "vnd.tcpdump.pcap": ["pcap", "cap", "dmp"], - "vnd.tmobile-livetv": "tmo", - "vnd.trid.tpt": "tpt", - "vnd.triscape.mxs": "mxs", - "vnd.trueapp": "tra", - "vnd.ufdl": ["ufd", "ufdl"], - "vnd.uiq.theme": "utz", - "vnd.umajin": "umj", - "vnd.unity": "unityweb", - "vnd.uoml+xml": "uoml", - "vnd.vcx": "vcx", - "vnd.visionary": "vis", - "vnd.vsf": "vsf", - "vnd.webturbo": "wtb", - "vnd.wolfram.player": "nbp", - "vnd.wqd": "wqd", - "vnd.wt.stf": "stf", - "vnd.xara": "xar", - "vnd.xfdl": "xfdl", - "vnd.yamaha.hv-dic": "hvd", - "vnd.yamaha.hv-script": "hvs", - "vnd.yamaha.hv-voice": "hvp", - "vnd.yamaha.openscoreformat": "osf", - "vnd.yamaha.openscoreformat.osfpvg+xml": "osfpvg", - "vnd.yamaha.smaf-audio": "saf", - "vnd.yamaha.smaf-phrase": "spf", - "vnd.yellowriver-custom-menu": "cmp", - "vnd.zul": ["zir", "zirz"], - "vnd.zzazz.deck+xml": "zaz", - "voicexml+xml": "vxml", - "widget": "wgt", - "winhlp": "hlp", - "wsdl+xml": "wsdl", - "wspolicy+xml": "wspolicy", - "x-ace-compressed": "ace", - "x-authorware-bin": ["aab", "x32", "u32", "vox"], - "x-authorware-map": "aam", - "x-authorware-seg": "aas", - "x-blorb": ["blb", "blorb"], - "x-bzip": "bz", - "x-bzip2": ["bz2", "boz"], - "x-cfs-compressed": "cfs", - "x-chat": "chat", - "x-conference": "nsc", - "x-dgc-compressed": "dgc", - "x-dtbncx+xml": "ncx", - "x-dtbook+xml": "dtb", - "x-dtbresource+xml": "res", - "x-eva": "eva", - "x-font-bdf": "bdf", - "x-font-ghostscript": "gsf", - "x-font-linux-psf": "psf", - "x-font-otf": "otf", - "x-font-pcf": "pcf", - "x-font-snf": "snf", - "x-font-ttf": ["ttf", "ttc"], - "x-font-type1": ["pfa", "pfb", "pfm", "afm"], - "x-font-woff": "woff", - "x-freearc": "arc", - "x-gca-compressed": "gca", - "x-glulx": "ulx", - "x-gramps-xml": "gramps", - "x-install-instructions": "install", - "x-lzh-compressed": ["lzh", "lha"], - "x-mie": "mie", - "x-mobipocket-ebook": ["prc", "mobi"], - "x-ms-application": "application", - "x-ms-shortcut": "lnk", - "x-ms-xbap": "xbap", - "x-msbinder": "obd", - "x-mscardfile": "crd", - "x-msclip": "clp", - "x-msdownload": ["exe", "dll", "com", "bat", "msi"], - "x-msmediaview": ["mvb", "m13", "m14"], - "x-msmetafile": ["wmf", "wmz", "emf", "emz"], - "x-msmoney": "mny", - "x-mspublisher": "pub", - "x-msschedule": "scd", - "x-msterminal": "trm", - "x-mswrite": "wri", - "x-nzb": "nzb", - "x-pkcs12": ["p12", "pfx"], - "x-pkcs7-certificates": ["p7b", "spc"], - "x-research-info-systems": "ris", - "x-silverlight-app": "xap", - "x-sql": "sql", - "x-stuffitx": "sitx", - "x-subrip": "srt", - "x-t3vm-image": "t3", - "x-tads": "gam", - "x-tex": "tex", - "x-tex-tfm": "tfm", - "x-tgif": "obj", - "x-xliff+xml": "xlf", - "x-xz": "xz", - "x-zmachine": ["z1", "z2", "z3", "z4", "z5", "z6", "z7", "z8"], - "xaml+xml": "xaml", - "xcap-diff+xml": "xdf", - "xenc+xml": "xenc", - "xml-dtd": "dtd", - "xop+xml": "xop", - "xproc+xml": "xpl", - "xslt+xml": "xslt", - "xv+xml": ["mxml", "xhvml", "xvml", "xvm"], - "yang": "yang", - "yin+xml": "yin", - "envoy": "evy", - "fractals": "fif", - "internet-property-stream": "acx", - "olescript": "axs", - "vnd.ms-outlook": "msg", - "vnd.ms-pkicertstore": "sst", - "x-compress": "z", - "x-compressed": "tgz", - "x-gzip": "gz", - "x-perfmon": ["pma", "pmc", "pml", "pmr", "pmw"], - "x-pkcs7-mime": ["p7c", "p7m"], - "ynd.ms-pkipko": "pko" - }, - "audio": { - "amr": "amr", - "amr-wb": "awb", - "annodex": "axa", - "basic": ["au", "snd"], - "flac": "flac", - "midi": ["mid", "midi", "kar", "rmi"], - "mpeg": ["mpga", "mpega", "mp2", "mp3", "m4a", "mp2a", "m2a", "m3a"], - "mpegurl": "m3u", - "ogg": ["oga", "ogg", "spx"], - "prs.sid": "sid", - "x-aiff": ["aif", "aiff", "aifc"], - "x-gsm": "gsm", - "x-ms-wma": "wma", - "x-ms-wax": "wax", - "x-pn-realaudio": "ram", - "x-realaudio": "ra", - "x-sd2": "sd2", - "x-wav": "wav", - "adpcm": "adp", - "mp4": "mp4a", - "s3m": "s3m", - "silk": "sil", - "vnd.dece.audio": ["uva", "uvva"], - "vnd.digital-winds": "eol", - "vnd.dra": "dra", - "vnd.dts": "dts", - "vnd.dts.hd": "dtshd", - "vnd.lucent.voice": "lvp", - "vnd.ms-playready.media.pya": "pya", - "vnd.nuera.ecelp4800": "ecelp4800", - "vnd.nuera.ecelp7470": "ecelp7470", - "vnd.nuera.ecelp9600": "ecelp9600", - "vnd.rip": "rip", - "webm": "weba", - "x-aac": "aac", - "x-caf": "caf", - "x-matroska": "mka", - "x-pn-realaudio-plugin": "rmp", - "xm": "xm", - "mid": ["mid", "rmi"] - }, - "chemical": { - "x-alchemy": "alc", - "x-cache": ["cac", "cache"], - "x-cache-csf": "csf", - "x-cactvs-binary": ["cbin", "cascii", "ctab"], - "x-cdx": "cdx", - "x-chem3d": "c3d", - "x-cif": "cif", - "x-cmdf": "cmdf", - "x-cml": "cml", - "x-compass": "cpa", - "x-crossfire": "bsd", - "x-csml": ["csml", "csm"], - "x-ctx": "ctx", - "x-cxf": ["cxf", "cef"], - "x-embl-dl-nucleotide": ["emb", "embl"], - "x-gamess-input": ["inp", "gam", "gamin"], - "x-gaussian-checkpoint": ["fch", "fchk"], - "x-gaussian-cube": "cub", - "x-gaussian-input": ["gau", "gjc", "gjf"], - "x-gaussian-log": "gal", - "x-gcg8-sequence": "gcg", - "x-genbank": "gen", - "x-hin": "hin", - "x-isostar": ["istr", "ist"], - "x-jcamp-dx": ["jdx", "dx"], - "x-kinemage": "kin", - "x-macmolecule": "mcm", - "x-macromodel-input": ["mmd", "mmod"], - "x-mdl-molfile": "mol", - "x-mdl-rdfile": "rd", - "x-mdl-rxnfile": "rxn", - "x-mdl-sdfile": ["sd", "sdf"], - "x-mdl-tgf": "tgf", - "x-mmcif": "mcif", - "x-mol2": "mol2", - "x-molconn-Z": "b", - "x-mopac-graph": "gpt", - "x-mopac-input": ["mop", "mopcrt", "mpc", "zmt"], - "x-mopac-out": "moo", - "x-ncbi-asn1": "asn", - "x-ncbi-asn1-ascii": ["prt", "ent"], - "x-ncbi-asn1-binary": ["val", "aso"], - "x-pdb": ["pdb", "ent"], - "x-rosdal": "ros", - "x-swissprot": "sw", - "x-vamas-iso14976": "vms", - "x-vmd": "vmd", - "x-xtel": "xtel", - "x-xyz": "xyz" - }, - "image": { - "gif": "gif", - "ief": "ief", - "jpeg": ["jpeg", "jpg", "jpe"], - "pcx": "pcx", - "png": "png", - "svg+xml": ["svg", "svgz"], - "tiff": ["tiff", "tif"], - "vnd.djvu": ["djvu", "djv"], - "vnd.wap.wbmp": "wbmp", - "x-canon-cr2": "cr2", - "x-canon-crw": "crw", - "x-cmu-raster": "ras", - "x-coreldraw": "cdr", - "x-coreldrawpattern": "pat", - "x-coreldrawtemplate": "cdt", - "x-corelphotopaint": "cpt", - "x-epson-erf": "erf", - "x-icon": "ico", - "x-jg": "art", - "x-jng": "jng", - "x-nikon-nef": "nef", - "x-olympus-orf": "orf", - "x-photoshop": "psd", - "x-portable-anymap": "pnm", - "x-portable-bitmap": "pbm", - "x-portable-graymap": "pgm", - "x-portable-pixmap": "ppm", - "x-rgb": "rgb", - "x-xbitmap": "xbm", - "x-xpixmap": "xpm", - "x-xwindowdump": "xwd", - "bmp": "bmp", - "cgm": "cgm", - "g3fax": "g3", - "ktx": "ktx", - "prs.btif": "btif", - "sgi": "sgi", - "vnd.dece.graphic": ["uvi", "uvvi", "uvg", "uvvg"], - "vnd.dwg": "dwg", - "vnd.dxf": "dxf", - "vnd.fastbidsheet": "fbs", - "vnd.fpx": "fpx", - "vnd.fst": "fst", - "vnd.fujixerox.edmics-mmr": "mmr", - "vnd.fujixerox.edmics-rlc": "rlc", - "vnd.ms-modi": "mdi", - "vnd.ms-photo": "wdp", - "vnd.net-fpx": "npx", - "vnd.xiff": "xif", - "webp": "webp", - "x-3ds": "3ds", - "x-cmx": "cmx", - "x-freehand": ["fh", "fhc", "fh4", "fh5", "fh7"], - "x-pict": ["pic", "pct"], - "x-tga": "tga", - "cis-cod": "cod", - "pipeg": "jfif" - }, - "message": { - "rfc822": ["eml", "mime", "mht", "mhtml", "nws"] - }, - "model": { - "iges": ["igs", "iges"], - "mesh": ["msh", "mesh", "silo"], - "vrml": ["wrl", "vrml"], - "x3d+vrml": ["x3dv", "x3dvz"], - "x3d+xml": ["x3d", "x3dz"], - "x3d+binary": ["x3db", "x3dbz"], - "vnd.collada+xml": "dae", - "vnd.dwf": "dwf", - "vnd.gdl": "gdl", - "vnd.gtw": "gtw", - "vnd.mts": "mts", - "vnd.vtu": "vtu" - }, - "text": { - "cache-manifest": ["manifest", "appcache"], - "calendar": ["ics", "icz", "ifb"], - "css": "css", - "csv": "csv", - "h323": "323", - "html": ["html", "htm", "shtml", "stm"], - "iuls": "uls", - "mathml": "mml", - "plain": ["txt", "text", "brf", "conf", "def", "list", "log", "in", "bas"], - "richtext": "rtx", - "scriptlet": ["sct", "wsc"], - "texmacs": ["tm", "ts"], - "tab-separated-values": "tsv", - "vnd.sun.j2me.app-descriptor": "jad", - "vnd.wap.wml": "wml", - "vnd.wap.wmlscript": "wmls", - "x-bibtex": "bib", - "x-boo": "boo", - "x-c++hdr": ["h++", "hpp", "hxx", "hh"], - "x-c++src": ["c++", "cpp", "cxx", "cc"], - "x-component": "htc", - "x-dsrc": "d", - "x-diff": ["diff", "patch"], - "x-haskell": "hs", - "x-java": "java", - "x-literate-haskell": "lhs", - "x-moc": "moc", - "x-pascal": ["p", "pas"], - "x-pcs-gcd": "gcd", - "x-perl": ["pl", "pm"], - "x-python": "py", - "x-scala": "scala", - "x-setext": "etx", - "x-tcl": ["tcl", "tk"], - "x-tex": ["tex", "ltx", "sty", "cls"], - "x-vcalendar": "vcs", - "x-vcard": "vcf", - "n3": "n3", - "prs.lines.tag": "dsc", - "sgml": ["sgml", "sgm"], - "troff": ["t", "tr", "roff", "man", "me", "ms"], - "turtle": "ttl", - "uri-list": ["uri", "uris", "urls"], - "vcard": "vcard", - "vnd.curl": "curl", - "vnd.curl.dcurl": "dcurl", - "vnd.curl.scurl": "scurl", - "vnd.curl.mcurl": "mcurl", - "vnd.dvb.subtitle": "sub", - "vnd.fly": "fly", - "vnd.fmi.flexstor": "flx", - "vnd.graphviz": "gv", - "vnd.in3d.3dml": "3dml", - "vnd.in3d.spot": "spot", - "x-asm": ["s", "asm"], - "x-c": ["c", "cc", "cxx", "cpp", "h", "hh", "dic"], - "x-fortran": ["f", "for", "f77", "f90"], - "x-opml": "opml", - "x-nfo": "nfo", - "x-sfv": "sfv", - "x-uuencode": "uu", - "webviewhtml": "htt" - }, - "video": { - "avif": ".avif", - "3gpp": "3gp", - "annodex": "axv", - "dl": "dl", - "dv": ["dif", "dv"], - "fli": "fli", - "gl": "gl", - "mpeg": ["mpeg", "mpg", "mpe", "m1v", "m2v", "mp2", "mpa", "mpv2"], - "mp4": ["mp4", "mp4v", "mpg4"], - "quicktime": ["qt", "mov"], - "ogg": "ogv", - "vnd.mpegurl": ["mxu", "m4u"], - "x-flv": "flv", - "x-la-asf": ["lsf", "lsx"], - "x-mng": "mng", - "x-ms-asf": ["asf", "asx", "asr"], - "x-ms-wm": "wm", - "x-ms-wmv": "wmv", - "x-ms-wmx": "wmx", - "x-ms-wvx": "wvx", - "x-msvideo": "avi", - "x-sgi-movie": "movie", - "x-matroska": ["mpv", "mkv", "mk3d", "mks"], - "3gpp2": "3g2", - "h261": "h261", - "h263": "h263", - "h264": "h264", - "jpeg": "jpgv", - "jpm": ["jpm", "jpgm"], - "mj2": ["mj2", "mjp2"], - "vnd.dece.hd": ["uvh", "uvvh"], - "vnd.dece.mobile": ["uvm", "uvvm"], - "vnd.dece.pd": ["uvp", "uvvp"], - "vnd.dece.sd": ["uvs", "uvvs"], - "vnd.dece.video": ["uvv", "uvvv"], - "vnd.dvb.file": "dvb", - "vnd.fvt": "fvt", - "vnd.ms-playready.media.pyv": "pyv", - "vnd.uvvu.mp4": ["uvu", "uvvu"], - "vnd.vivo": "viv", - "webm": "webm", - "x-f4v": "f4v", - "x-m4v": "m4v", - "x-ms-vob": "vob", - "x-smv": "smv" - }, - "x-conference": { - "x-cooltalk": "ice" - }, - "x-world": { - "x-vrml": ["vrm", "vrml", "wrl", "flr", "wrz", "xaf", "xof"] - } -}; - -(() => { - const mimeTypes = {}; - for (const type in table$1) { - // eslint-disable-next-line no-prototype-builtins - if (table$1.hasOwnProperty(type)) { - for (const subtype in table$1[type]) { - // eslint-disable-next-line no-prototype-builtins - if (table$1[type].hasOwnProperty(subtype)) { - const value = table$1[type][subtype]; - if (typeof value == "string") { - mimeTypes[value] = type + "/" + subtype; - } else { - for (let indexMimeType = 0; indexMimeType < value.length; indexMimeType++) { - mimeTypes[value[indexMimeType]] = type + "/" + subtype; - } - } - } - } - } - } - return mimeTypes; -})(); - -/* - Copyright (c) 2022 Gildas Lormeau. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the distribution. - - 3. The names of the authors may not be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT, - INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, - INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, - OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -const table = []; -for (let i = 0; i < 256; i++) { - let t = i; - for (let j = 0; j < 8; j++) { - if (t & 1) { - t = (t >>> 1) ^ 0xEDB88320; - } else { - t = t >>> 1; - } - } - table[i] = t; -} - -class Crc32 { - - constructor(crc) { - this.crc = crc || -1; - } - - append(data) { - let crc = this.crc | 0; - for (let offset = 0, length = data.length | 0; offset < length; offset++) { - crc = (crc >>> 8) ^ table[(crc ^ data[offset]) & 0xFF]; - } - this.crc = crc; - } - - get() { - return ~this.crc; - } -} - -/* - Copyright (c) 2022 Gildas Lormeau. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the distribution. - - 3. The names of the authors may not be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT, - INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, - INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, - OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -class Crc32Stream extends TransformStream { - - constructor() { - const crc32 = new Crc32(); - super({ - transform(chunk) { - crc32.append(chunk); - }, - flush(controller) { - const value = new Uint8Array(4); - const dataView = new DataView(value.buffer); - dataView.setUint32(0, crc32.get()); - controller.enqueue(value); - } - }); - } -} - -/* - Copyright (c) 2022 Gildas Lormeau. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the distribution. - - 3. The names of the authors may not be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT, - INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, - INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, - OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -function encodeText(value) { - if (typeof TextEncoder == "undefined") { - value = unescape(encodeURIComponent(value)); - const result = new Uint8Array(value.length); - for (let i = 0; i < result.length; i++) { - result[i] = value.charCodeAt(i); - } - return result; - } else { - return new TextEncoder().encode(value); - } -} - -// Derived from https://github.com/xqdoo00o/jszip/blob/master/lib/sjcl.js and https://github.com/bitwiseshiftleft/sjcl - -// deno-lint-ignore-file no-this-alias - -/* - * SJCL is open. You can use, modify and redistribute it under a BSD - * license or under the GNU GPL, version 2.0. - */ - -/** @fileOverview Javascript cryptography implementation. - * - * Crush to remove comments, shorten variable names and - * generally reduce transmission size. - * - * @author Emily Stark - * @author Mike Hamburg - * @author Dan Boneh - */ - -/*jslint indent: 2, bitwise: false, nomen: false, plusplus: false, white: false, regexp: false */ - -/** @fileOverview Arrays of bits, encoded as arrays of Numbers. - * - * @author Emily Stark - * @author Mike Hamburg - * @author Dan Boneh - */ - -/** - * Arrays of bits, encoded as arrays of Numbers. - * @namespace - * @description - *

- * These objects are the currency accepted by SJCL's crypto functions. - *

- * - *

- * Most of our crypto primitives operate on arrays of 4-byte words internally, - * but many of them can take arguments that are not a multiple of 4 bytes. - * This library encodes arrays of bits (whose size need not be a multiple of 8 - * bits) as arrays of 32-bit words. The bits are packed, big-endian, into an - * array of words, 32 bits at a time. Since the words are double-precision - * floating point numbers, they fit some extra data. We use this (in a private, - * possibly-changing manner) to encode the number of bits actually present - * in the last word of the array. - *

- * - *

- * Because bitwise ops clear this out-of-band data, these arrays can be passed - * to ciphers like AES which want arrays of words. - *

- */ -const bitArray = { - /** - * Concatenate two bit arrays. - * @param {bitArray} a1 The first array. - * @param {bitArray} a2 The second array. - * @return {bitArray} The concatenation of a1 and a2. - */ - concat(a1, a2) { - if (a1.length === 0 || a2.length === 0) { - return a1.concat(a2); - } - - const last = a1[a1.length - 1], shift = bitArray.getPartial(last); - if (shift === 32) { - return a1.concat(a2); - } else { - return bitArray._shiftRight(a2, shift, last | 0, a1.slice(0, a1.length - 1)); - } - }, - - /** - * Find the length of an array of bits. - * @param {bitArray} a The array. - * @return {Number} The length of a, in bits. - */ - bitLength(a) { - const l = a.length; - if (l === 0) { - return 0; - } - const x = a[l - 1]; - return (l - 1) * 32 + bitArray.getPartial(x); - }, - - /** - * Truncate an array. - * @param {bitArray} a The array. - * @param {Number} len The length to truncate to, in bits. - * @return {bitArray} A new array, truncated to len bits. - */ - clamp(a, len) { - if (a.length * 32 < len) { - return a; - } - a = a.slice(0, Math.ceil(len / 32)); - const l = a.length; - len = len & 31; - if (l > 0 && len) { - a[l - 1] = bitArray.partial(len, a[l - 1] & 0x80000000 >> (len - 1), 1); - } - return a; - }, - - /** - * Make a partial word for a bit array. - * @param {Number} len The number of bits in the word. - * @param {Number} x The bits. - * @param {Number} [_end=0] Pass 1 if x has already been shifted to the high side. - * @return {Number} The partial word. - */ - partial(len, x, _end) { - if (len === 32) { - return x; - } - return (_end ? x | 0 : x << (32 - len)) + len * 0x10000000000; - }, - - /** - * Get the number of bits used by a partial word. - * @param {Number} x The partial word. - * @return {Number} The number of bits used by the partial word. - */ - getPartial(x) { - return Math.round(x / 0x10000000000) || 32; - }, - - /** Shift an array right. - * @param {bitArray} a The array to shift. - * @param {Number} shift The number of bits to shift. - * @param {Number} [carry=0] A byte to carry in - * @param {bitArray} [out=[]] An array to prepend to the output. - * @private - */ - _shiftRight(a, shift, carry, out) { - if (out === undefined) { - out = []; - } - - for (; shift >= 32; shift -= 32) { - out.push(carry); - carry = 0; - } - if (shift === 0) { - return out.concat(a); - } - - for (let i = 0; i < a.length; i++) { - out.push(carry | a[i] >>> shift); - carry = a[i] << (32 - shift); - } - const last2 = a.length ? a[a.length - 1] : 0; - const shift2 = bitArray.getPartial(last2); - out.push(bitArray.partial(shift + shift2 & 31, (shift + shift2 > 32) ? carry : out.pop(), 1)); - return out; - } -}; - -/** @fileOverview Bit array codec implementations. - * - * @author Emily Stark - * @author Mike Hamburg - * @author Dan Boneh - */ - -/** - * Arrays of bytes - * @namespace - */ -const codec = { - bytes: { - /** Convert from a bitArray to an array of bytes. */ - fromBits(arr) { - const bl = bitArray.bitLength(arr); - const byteLength = bl / 8; - const out = new Uint8Array(byteLength); - let tmp; - for (let i = 0; i < byteLength; i++) { - if ((i & 3) === 0) { - tmp = arr[i / 4]; - } - out[i] = tmp >>> 24; - tmp <<= 8; - } - return out; - }, - /** Convert from an array of bytes to a bitArray. */ - toBits(bytes) { - const out = []; - let i; - let tmp = 0; - for (i = 0; i < bytes.length; i++) { - tmp = tmp << 8 | bytes[i]; - if ((i & 3) === 3) { - out.push(tmp); - tmp = 0; - } - } - if (i & 3) { - out.push(bitArray.partial(8 * (i & 3), tmp)); - } - return out; - } - } -}; - -const hash = {}; - -/** - * Context for a SHA-1 operation in progress. - * @constructor - */ -hash.sha1 = class { - constructor(hash) { - const sha1 = this; - /** - * The hash's block size, in bits. - * @constant - */ - sha1.blockSize = 512; - /** - * The SHA-1 initialization vector. - * @private - */ - sha1._init = [0x67452301, 0xEFCDAB89, 0x98BADCFE, 0x10325476, 0xC3D2E1F0]; - /** - * The SHA-1 hash key. - * @private - */ - sha1._key = [0x5A827999, 0x6ED9EBA1, 0x8F1BBCDC, 0xCA62C1D6]; - if (hash) { - sha1._h = hash._h.slice(0); - sha1._buffer = hash._buffer.slice(0); - sha1._length = hash._length; - } else { - sha1.reset(); - } - } - - /** - * Reset the hash state. - * @return this - */ - reset() { - const sha1 = this; - sha1._h = sha1._init.slice(0); - sha1._buffer = []; - sha1._length = 0; - return sha1; - } - - /** - * Input several words to the hash. - * @param {bitArray|String} data the data to hash. - * @return this - */ - update(data) { - const sha1 = this; - if (typeof data === "string") { - data = codec.utf8String.toBits(data); - } - const b = sha1._buffer = bitArray.concat(sha1._buffer, data); - const ol = sha1._length; - const nl = sha1._length = ol + bitArray.bitLength(data); - if (nl > 9007199254740991) { - throw new Error("Cannot hash more than 2^53 - 1 bits"); - } - const c = new Uint32Array(b); - let j = 0; - for (let i = sha1.blockSize + ol - ((sha1.blockSize + ol) & (sha1.blockSize - 1)); i <= nl; - i += sha1.blockSize) { - sha1._block(c.subarray(16 * j, 16 * (j + 1))); - j += 1; - } - b.splice(0, 16 * j); - return sha1; - } - - /** - * Complete hashing and output the hash value. - * @return {bitArray} The hash value, an array of 5 big-endian words. TODO - */ - finalize() { - const sha1 = this; - let b = sha1._buffer; - const h = sha1._h; - - // Round out and push the buffer - b = bitArray.concat(b, [bitArray.partial(1, 1)]); - // Round out the buffer to a multiple of 16 words, less the 2 length words. - for (let i = b.length + 2; i & 15; i++) { - b.push(0); - } - - // append the length - b.push(Math.floor(sha1._length / 0x100000000)); - b.push(sha1._length | 0); - - while (b.length) { - sha1._block(b.splice(0, 16)); - } - - sha1.reset(); - return h; - } - - /** - * The SHA-1 logical functions f(0), f(1), ..., f(79). - * @private - */ - _f(t, b, c, d) { - if (t <= 19) { - return (b & c) | (~b & d); - } else if (t <= 39) { - return b ^ c ^ d; - } else if (t <= 59) { - return (b & c) | (b & d) | (c & d); - } else if (t <= 79) { - return b ^ c ^ d; - } - } - - /** - * Circular left-shift operator. - * @private - */ - _S(n, x) { - return (x << n) | (x >>> 32 - n); - } - - /** - * Perform one cycle of SHA-1. - * @param {Uint32Array|bitArray} words one block of words. - * @private - */ - _block(words) { - const sha1 = this; - const h = sha1._h; - // When words is passed to _block, it has 16 elements. SHA1 _block - // function extends words with new elements (at the end there are 80 elements). - // The problem is that if we use Uint32Array instead of Array, - // the length of Uint32Array cannot be changed. Thus, we replace words with a - // normal Array here. - const w = Array(80); // do not use Uint32Array here as the instantiation is slower - for (let j = 0; j < 16; j++) { - w[j] = words[j]; - } - - let a = h[0]; - let b = h[1]; - let c = h[2]; - let d = h[3]; - let e = h[4]; - - for (let t = 0; t <= 79; t++) { - if (t >= 16) { - w[t] = sha1._S(1, w[t - 3] ^ w[t - 8] ^ w[t - 14] ^ w[t - 16]); - } - const tmp = (sha1._S(5, a) + sha1._f(t, b, c, d) + e + w[t] + - sha1._key[Math.floor(t / 20)]) | 0; - e = d; - d = c; - c = sha1._S(30, b); - b = a; - a = tmp; - } - - h[0] = (h[0] + a) | 0; - h[1] = (h[1] + b) | 0; - h[2] = (h[2] + c) | 0; - h[3] = (h[3] + d) | 0; - h[4] = (h[4] + e) | 0; - } -}; - -/** @fileOverview Low-level AES implementation. - * - * This file contains a low-level implementation of AES, optimized for - * size and for efficiency on several browsers. It is based on - * OpenSSL's aes_core.c, a public-domain implementation by Vincent - * Rijmen, Antoon Bosselaers and Paulo Barreto. - * - * An older version of this implementation is available in the public - * domain, but this one is (c) Emily Stark, Mike Hamburg, Dan Boneh, - * Stanford University 2008-2010 and BSD-licensed for liability - * reasons. - * - * @author Emily Stark - * @author Mike Hamburg - * @author Dan Boneh - */ - -const cipher = {}; - -/** - * Schedule out an AES key for both encryption and decryption. This - * is a low-level class. Use a cipher mode to do bulk encryption. - * - * @constructor - * @param {Array} key The key as an array of 4, 6 or 8 words. - */ -cipher.aes = class { - constructor(key) { - /** - * The expanded S-box and inverse S-box tables. These will be computed - * on the client so that we don't have to send them down the wire. - * - * There are two tables, _tables[0] is for encryption and - * _tables[1] is for decryption. - * - * The first 4 sub-tables are the expanded S-box with MixColumns. The - * last (_tables[01][4]) is the S-box itself. - * - * @private - */ - const aes = this; - aes._tables = [[[], [], [], [], []], [[], [], [], [], []]]; - - if (!aes._tables[0][0][0]) { - aes._precompute(); - } - - const sbox = aes._tables[0][4]; - const decTable = aes._tables[1]; - const keyLen = key.length; - - let i, encKey, decKey, rcon = 1; - - if (keyLen !== 4 && keyLen !== 6 && keyLen !== 8) { - throw new Error("invalid aes key size"); - } - - aes._key = [encKey = key.slice(0), decKey = []]; - - // schedule encryption keys - for (i = keyLen; i < 4 * keyLen + 28; i++) { - let tmp = encKey[i - 1]; - - // apply sbox - if (i % keyLen === 0 || (keyLen === 8 && i % keyLen === 4)) { - tmp = sbox[tmp >>> 24] << 24 ^ sbox[tmp >> 16 & 255] << 16 ^ sbox[tmp >> 8 & 255] << 8 ^ sbox[tmp & 255]; - - // shift rows and add rcon - if (i % keyLen === 0) { - tmp = tmp << 8 ^ tmp >>> 24 ^ rcon << 24; - rcon = rcon << 1 ^ (rcon >> 7) * 283; - } - } - - encKey[i] = encKey[i - keyLen] ^ tmp; - } - - // schedule decryption keys - for (let j = 0; i; j++, i--) { - const tmp = encKey[j & 3 ? i : i - 4]; - if (i <= 4 || j < 4) { - decKey[j] = tmp; - } else { - decKey[j] = decTable[0][sbox[tmp >>> 24]] ^ - decTable[1][sbox[tmp >> 16 & 255]] ^ - decTable[2][sbox[tmp >> 8 & 255]] ^ - decTable[3][sbox[tmp & 255]]; - } - } - } - // public - /* Something like this might appear here eventually - name: "AES", - blockSize: 4, - keySizes: [4,6,8], - */ - - /** - * Encrypt an array of 4 big-endian words. - * @param {Array} data The plaintext. - * @return {Array} The ciphertext. - */ - encrypt(data) { - return this._crypt(data, 0); - } - - /** - * Decrypt an array of 4 big-endian words. - * @param {Array} data The ciphertext. - * @return {Array} The plaintext. - */ - decrypt(data) { - return this._crypt(data, 1); - } - - /** - * Expand the S-box tables. - * - * @private - */ - _precompute() { - const encTable = this._tables[0]; - const decTable = this._tables[1]; - const sbox = encTable[4]; - const sboxInv = decTable[4]; - const d = []; - const th = []; - let xInv, x2, x4, x8; - - // Compute double and third tables - for (let i = 0; i < 256; i++) { - th[(d[i] = i << 1 ^ (i >> 7) * 283) ^ i] = i; - } - - for (let x = xInv = 0; !sbox[x]; x ^= x2 || 1, xInv = th[xInv] || 1) { - // Compute sbox - let s = xInv ^ xInv << 1 ^ xInv << 2 ^ xInv << 3 ^ xInv << 4; - s = s >> 8 ^ s & 255 ^ 99; - sbox[x] = s; - sboxInv[s] = x; - - // Compute MixColumns - x8 = d[x4 = d[x2 = d[x]]]; - let tDec = x8 * 0x1010101 ^ x4 * 0x10001 ^ x2 * 0x101 ^ x * 0x1010100; - let tEnc = d[s] * 0x101 ^ s * 0x1010100; - - for (let i = 0; i < 4; i++) { - encTable[i][x] = tEnc = tEnc << 24 ^ tEnc >>> 8; - decTable[i][s] = tDec = tDec << 24 ^ tDec >>> 8; - } - } - - // Compactify. Considerable speedup on Firefox. - for (let i = 0; i < 5; i++) { - encTable[i] = encTable[i].slice(0); - decTable[i] = decTable[i].slice(0); - } - } - - /** - * Encryption and decryption core. - * @param {Array} input Four words to be encrypted or decrypted. - * @param dir The direction, 0 for encrypt and 1 for decrypt. - * @return {Array} The four encrypted or decrypted words. - * @private - */ - _crypt(input, dir) { - if (input.length !== 4) { - throw new Error("invalid aes block size"); - } - - const key = this._key[dir]; - - const nInnerRounds = key.length / 4 - 2; - const out = [0, 0, 0, 0]; - const table = this._tables[dir]; - - // load up the tables - const t0 = table[0]; - const t1 = table[1]; - const t2 = table[2]; - const t3 = table[3]; - const sbox = table[4]; - - // state variables a,b,c,d are loaded with pre-whitened data - let a = input[0] ^ key[0]; - let b = input[dir ? 3 : 1] ^ key[1]; - let c = input[2] ^ key[2]; - let d = input[dir ? 1 : 3] ^ key[3]; - let kIndex = 4; - let a2, b2, c2; - - // Inner rounds. Cribbed from OpenSSL. - for (let i = 0; i < nInnerRounds; i++) { - a2 = t0[a >>> 24] ^ t1[b >> 16 & 255] ^ t2[c >> 8 & 255] ^ t3[d & 255] ^ key[kIndex]; - b2 = t0[b >>> 24] ^ t1[c >> 16 & 255] ^ t2[d >> 8 & 255] ^ t3[a & 255] ^ key[kIndex + 1]; - c2 = t0[c >>> 24] ^ t1[d >> 16 & 255] ^ t2[a >> 8 & 255] ^ t3[b & 255] ^ key[kIndex + 2]; - d = t0[d >>> 24] ^ t1[a >> 16 & 255] ^ t2[b >> 8 & 255] ^ t3[c & 255] ^ key[kIndex + 3]; - kIndex += 4; - a = a2; b = b2; c = c2; - } - - // Last round. - for (let i = 0; i < 4; i++) { - out[dir ? 3 & -i : i] = - sbox[a >>> 24] << 24 ^ - sbox[b >> 16 & 255] << 16 ^ - sbox[c >> 8 & 255] << 8 ^ - sbox[d & 255] ^ - key[kIndex++]; - a2 = a; a = b; b = c; c = d; d = a2; - } - - return out; - } -}; - -/** - * Random values - * @namespace - */ -const random = { - /** - * Generate random words with pure js, cryptographically not as strong & safe as native implementation. - * @param {TypedArray} typedArray The array to fill. - * @return {TypedArray} The random values. - */ - getRandomValues(typedArray) { - const words = new Uint32Array(typedArray.buffer); - const r = (m_w) => { - let m_z = 0x3ade68b1; - const mask = 0xffffffff; - return function () { - m_z = (0x9069 * (m_z & 0xFFFF) + (m_z >> 0x10)) & mask; - m_w = (0x4650 * (m_w & 0xFFFF) + (m_w >> 0x10)) & mask; - const result = ((((m_z << 0x10) + m_w) & mask) / 0x100000000) + .5; - return result * (Math.random() > .5 ? 1 : -1); - }; - }; - for (let i = 0, rcache; i < typedArray.length; i += 4) { - const _r = r((rcache || Math.random()) * 0x100000000); - rcache = _r() * 0x3ade67b7; - words[i / 4] = (_r() * 0x100000000) | 0; - } - return typedArray; - } -}; - -/** @fileOverview CTR mode implementation. - * - * Special thanks to Roy Nicholson for pointing out a bug in our - * implementation. - * - * @author Emily Stark - * @author Mike Hamburg - * @author Dan Boneh - */ - -/** Brian Gladman's CTR Mode. -* @constructor -* @param {Object} _prf The aes instance to generate key. -* @param {bitArray} _iv The iv for ctr mode, it must be 128 bits. -*/ - -const mode = {}; - -/** - * Brian Gladman's CTR Mode. - * @namespace - */ -mode.ctrGladman = class { - constructor(prf, iv) { - this._prf = prf; - this._initIv = iv; - this._iv = iv; - } - - reset() { - this._iv = this._initIv; - } - - /** Input some data to calculate. - * @param {bitArray} data the data to process, it must be intergral multiple of 128 bits unless it's the last. - */ - update(data) { - return this.calculate(this._prf, data, this._iv); - } - - incWord(word) { - if (((word >> 24) & 0xff) === 0xff) { //overflow - let b1 = (word >> 16) & 0xff; - let b2 = (word >> 8) & 0xff; - let b3 = word & 0xff; - - if (b1 === 0xff) { // overflow b1 - b1 = 0; - if (b2 === 0xff) { - b2 = 0; - if (b3 === 0xff) { - b3 = 0; - } else { - ++b3; - } - } else { - ++b2; - } - } else { - ++b1; - } - - word = 0; - word += (b1 << 16); - word += (b2 << 8); - word += b3; - } else { - word += (0x01 << 24); - } - return word; - } - - incCounter(counter) { - if ((counter[0] = this.incWord(counter[0])) === 0) { - // encr_data in fileenc.c from Dr Brian Gladman's counts only with DWORD j < 8 - counter[1] = this.incWord(counter[1]); - } - } - - calculate(prf, data, iv) { - let l; - if (!(l = data.length)) { - return []; - } - const bl = bitArray.bitLength(data); - for (let i = 0; i < l; i += 4) { - this.incCounter(iv); - const e = prf.encrypt(iv); - data[i] ^= e[0]; - data[i + 1] ^= e[1]; - data[i + 2] ^= e[2]; - data[i + 3] ^= e[3]; - } - return bitArray.clamp(data, bl); - } -}; - -const misc = { - importKey(password) { - return new misc.hmacSha1(codec.bytes.toBits(password)); - }, - pbkdf2(prf, salt, count, length) { - count = count || 10000; - if (length < 0 || count < 0) { - throw new Error("invalid params to pbkdf2"); - } - const byteLength = ((length >> 5) + 1) << 2; - let u, ui, i, j, k; - const arrayBuffer = new ArrayBuffer(byteLength); - const out = new DataView(arrayBuffer); - let outLength = 0; - const b = bitArray; - salt = codec.bytes.toBits(salt); - for (k = 1; outLength < (byteLength || 1); k++) { - u = ui = prf.encrypt(b.concat(salt, [k])); - for (i = 1; i < count; i++) { - ui = prf.encrypt(ui); - for (j = 0; j < ui.length; j++) { - u[j] ^= ui[j]; - } - } - for (i = 0; outLength < (byteLength || 1) && i < u.length; i++) { - out.setInt32(outLength, u[i]); - outLength += 4; - } - } - return arrayBuffer.slice(0, length / 8); - } -}; - -/** @fileOverview HMAC implementation. - * - * @author Emily Stark - * @author Mike Hamburg - * @author Dan Boneh - */ - -/** HMAC with the specified hash function. - * @constructor - * @param {bitArray} key the key for HMAC. - * @param {Object} [Hash=hash.sha1] The hash function to use. - */ -misc.hmacSha1 = class { - - constructor(key) { - const hmac = this; - const Hash = hmac._hash = hash.sha1; - const exKey = [[], []]; - hmac._baseHash = [new Hash(), new Hash()]; - const bs = hmac._baseHash[0].blockSize / 32; - - if (key.length > bs) { - key = new Hash().update(key).finalize(); - } - - for (let i = 0; i < bs; i++) { - exKey[0][i] = key[i] ^ 0x36363636; - exKey[1][i] = key[i] ^ 0x5C5C5C5C; - } - - hmac._baseHash[0].update(exKey[0]); - hmac._baseHash[1].update(exKey[1]); - hmac._resultHash = new Hash(hmac._baseHash[0]); - } - reset() { - const hmac = this; - hmac._resultHash = new hmac._hash(hmac._baseHash[0]); - hmac._updated = false; - } - - update(data) { - const hmac = this; - hmac._updated = true; - hmac._resultHash.update(data); - } - - digest() { - const hmac = this; - const w = hmac._resultHash.finalize(); - const result = new (hmac._hash)(hmac._baseHash[1]).update(w).finalize(); - - hmac.reset(); - - return result; - } - - encrypt(data) { - if (!this._updated) { - this.update(data); - return this.digest(data); - } else { - throw new Error("encrypt on already updated hmac called!"); - } - } -}; - -/* - Copyright (c) 2022 Gildas Lormeau. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the distribution. - - 3. The names of the authors may not be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT, - INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, - INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, - OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -const GET_RANDOM_VALUES_SUPPORTED = typeof crypto != "undefined" && typeof crypto.getRandomValues == "function"; - -const ERR_INVALID_PASSWORD = "Invalid password"; -const ERR_INVALID_SIGNATURE = "Invalid signature"; -const ERR_ABORT_CHECK_PASSWORD = "zipjs-abort-check-password"; - -function getRandomValues(array) { - if (GET_RANDOM_VALUES_SUPPORTED) { - return crypto.getRandomValues(array); - } else { - return random.getRandomValues(array); - } -} - -/* - Copyright (c) 2022 Gildas Lormeau. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the distribution. - - 3. The names of the authors may not be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT, - INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, - INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, - OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -const BLOCK_LENGTH = 16; -const RAW_FORMAT = "raw"; -const PBKDF2_ALGORITHM = { name: "PBKDF2" }; -const HASH_ALGORITHM = { name: "HMAC" }; -const HASH_FUNCTION = "SHA-1"; -const BASE_KEY_ALGORITHM = Object.assign({ hash: HASH_ALGORITHM }, PBKDF2_ALGORITHM); -const DERIVED_BITS_ALGORITHM = Object.assign({ iterations: 1000, hash: { name: HASH_FUNCTION } }, PBKDF2_ALGORITHM); -const DERIVED_BITS_USAGE = ["deriveBits"]; -const SALT_LENGTH = [8, 12, 16]; -const KEY_LENGTH = [16, 24, 32]; -const SIGNATURE_LENGTH = 10; -const COUNTER_DEFAULT_VALUE = [0, 0, 0, 0]; -const UNDEFINED_TYPE = "undefined"; -const FUNCTION_TYPE = "function"; -// deno-lint-ignore valid-typeof -const CRYPTO_API_SUPPORTED = typeof crypto != UNDEFINED_TYPE; -const subtle = CRYPTO_API_SUPPORTED && crypto.subtle; -const SUBTLE_API_SUPPORTED = CRYPTO_API_SUPPORTED && typeof subtle != UNDEFINED_TYPE; -const codecBytes = codec.bytes; -const Aes = cipher.aes; -const CtrGladman = mode.ctrGladman; -const HmacSha1 = misc.hmacSha1; - -let IMPORT_KEY_SUPPORTED = CRYPTO_API_SUPPORTED && SUBTLE_API_SUPPORTED && typeof subtle.importKey == FUNCTION_TYPE; -let DERIVE_BITS_SUPPORTED = CRYPTO_API_SUPPORTED && SUBTLE_API_SUPPORTED && typeof subtle.deriveBits == FUNCTION_TYPE; - -class AESDecryptionStream extends TransformStream { - - constructor({ password, signed, encryptionStrength, checkPasswordOnly }) { - super({ - start() { - Object.assign(this, { - ready: new Promise(resolve => this.resolveReady = resolve), - password, - signed, - strength: encryptionStrength - 1, - pending: new Uint8Array() - }); - }, - async transform(chunk, controller) { - const aesCrypto = this; - const { - password, - strength, - resolveReady, - ready - } = aesCrypto; - if (password) { - await createDecryptionKeys(aesCrypto, strength, password, subarray(chunk, 0, SALT_LENGTH[strength] + 2)); - chunk = subarray(chunk, SALT_LENGTH[strength] + 2); - if (checkPasswordOnly) { - controller.error(new Error(ERR_ABORT_CHECK_PASSWORD)); - } else { - resolveReady(); - } - } else { - await ready; - } - const output = new Uint8Array(chunk.length - SIGNATURE_LENGTH - ((chunk.length - SIGNATURE_LENGTH) % BLOCK_LENGTH)); - controller.enqueue(append(aesCrypto, chunk, output, 0, SIGNATURE_LENGTH, true)); - }, - async flush(controller) { - const { - signed, - ctr, - hmac, - pending, - ready - } = this; - await ready; - const chunkToDecrypt = subarray(pending, 0, pending.length - SIGNATURE_LENGTH); - const originalSignature = subarray(pending, pending.length - SIGNATURE_LENGTH); - let decryptedChunkArray = new Uint8Array(); - if (chunkToDecrypt.length) { - const encryptedChunk = toBits(codecBytes, chunkToDecrypt); - hmac.update(encryptedChunk); - const decryptedChunk = ctr.update(encryptedChunk); - decryptedChunkArray = fromBits(codecBytes, decryptedChunk); - } - if (signed) { - const signature = subarray(fromBits(codecBytes, hmac.digest()), 0, SIGNATURE_LENGTH); - for (let indexSignature = 0; indexSignature < SIGNATURE_LENGTH; indexSignature++) { - if (signature[indexSignature] != originalSignature[indexSignature]) { - throw new Error(ERR_INVALID_SIGNATURE); - } - } - } - controller.enqueue(decryptedChunkArray); - } - }); - } -} - -class AESEncryptionStream extends TransformStream { - - constructor({ password, encryptionStrength }) { - // deno-lint-ignore prefer-const - let stream; - super({ - start() { - Object.assign(this, { - ready: new Promise(resolve => this.resolveReady = resolve), - password, - strength: encryptionStrength - 1, - pending: new Uint8Array() - }); - }, - async transform(chunk, controller) { - const aesCrypto = this; - const { - password, - strength, - resolveReady, - ready - } = aesCrypto; - let preamble = new Uint8Array(); - if (password) { - preamble = await createEncryptionKeys(aesCrypto, strength, password); - resolveReady(); - } else { - await ready; - } - const output = new Uint8Array(preamble.length + chunk.length - (chunk.length % BLOCK_LENGTH)); - output.set(preamble, 0); - controller.enqueue(append(aesCrypto, chunk, output, preamble.length, 0)); - }, - async flush(controller) { - const { - ctr, - hmac, - pending, - ready - } = this; - await ready; - let encryptedChunkArray = new Uint8Array(); - if (pending.length) { - const encryptedChunk = ctr.update(toBits(codecBytes, pending)); - hmac.update(encryptedChunk); - encryptedChunkArray = fromBits(codecBytes, encryptedChunk); - } - stream.signature = fromBits(codecBytes, hmac.digest()).slice(0, SIGNATURE_LENGTH); - controller.enqueue(concat(encryptedChunkArray, stream.signature)); - } - }); - stream = this; - } -} - -function append(aesCrypto, input, output, paddingStart, paddingEnd, verifySignature) { - const { - ctr, - hmac, - pending - } = aesCrypto; - const inputLength = input.length - paddingEnd; - if (pending.length) { - input = concat(pending, input); - output = expand(output, inputLength - (inputLength % BLOCK_LENGTH)); - } - let offset; - for (offset = 0; offset <= inputLength - BLOCK_LENGTH; offset += BLOCK_LENGTH) { - const inputChunk = toBits(codecBytes, subarray(input, offset, offset + BLOCK_LENGTH)); - if (verifySignature) { - hmac.update(inputChunk); - } - const outputChunk = ctr.update(inputChunk); - if (!verifySignature) { - hmac.update(outputChunk); - } - output.set(fromBits(codecBytes, outputChunk), offset + paddingStart); - } - aesCrypto.pending = subarray(input, offset); - return output; -} - -async function createDecryptionKeys(decrypt, strength, password, preamble) { - const passwordVerificationKey = await createKeys$1(decrypt, strength, password, subarray(preamble, 0, SALT_LENGTH[strength])); - const passwordVerification = subarray(preamble, SALT_LENGTH[strength]); - if (passwordVerificationKey[0] != passwordVerification[0] || passwordVerificationKey[1] != passwordVerification[1]) { - throw new Error(ERR_INVALID_PASSWORD); - } -} - -async function createEncryptionKeys(encrypt, strength, password) { - const salt = getRandomValues(new Uint8Array(SALT_LENGTH[strength])); - const passwordVerification = await createKeys$1(encrypt, strength, password, salt); - return concat(salt, passwordVerification); -} - -async function createKeys$1(aesCrypto, strength, password, salt) { - aesCrypto.password = null; - const encodedPassword = encodeText(password); - const baseKey = await importKey(RAW_FORMAT, encodedPassword, BASE_KEY_ALGORITHM, false, DERIVED_BITS_USAGE); - const derivedBits = await deriveBits(Object.assign({ salt }, DERIVED_BITS_ALGORITHM), baseKey, 8 * ((KEY_LENGTH[strength] * 2) + 2)); - const compositeKey = new Uint8Array(derivedBits); - const key = toBits(codecBytes, subarray(compositeKey, 0, KEY_LENGTH[strength])); - const authentication = toBits(codecBytes, subarray(compositeKey, KEY_LENGTH[strength], KEY_LENGTH[strength] * 2)); - const passwordVerification = subarray(compositeKey, KEY_LENGTH[strength] * 2); - Object.assign(aesCrypto, { - keys: { - key, - authentication, - passwordVerification - }, - ctr: new CtrGladman(new Aes(key), Array.from(COUNTER_DEFAULT_VALUE)), - hmac: new HmacSha1(authentication) - }); - return passwordVerification; -} - -async function importKey(format, password, algorithm, extractable, keyUsages) { - if (IMPORT_KEY_SUPPORTED) { - try { - return await subtle.importKey(format, password, algorithm, extractable, keyUsages); - } catch (_error) { - IMPORT_KEY_SUPPORTED = false; - return misc.importKey(password); - } - } else { - return misc.importKey(password); - } -} - -async function deriveBits(algorithm, baseKey, length) { - if (DERIVE_BITS_SUPPORTED) { - try { - return await subtle.deriveBits(algorithm, baseKey, length); - } catch (_error) { - DERIVE_BITS_SUPPORTED = false; - return misc.pbkdf2(baseKey, algorithm.salt, DERIVED_BITS_ALGORITHM.iterations, length); - } - } else { - return misc.pbkdf2(baseKey, algorithm.salt, DERIVED_BITS_ALGORITHM.iterations, length); - } -} - -function concat(leftArray, rightArray) { - let array = leftArray; - if (leftArray.length + rightArray.length) { - array = new Uint8Array(leftArray.length + rightArray.length); - array.set(leftArray, 0); - array.set(rightArray, leftArray.length); - } - return array; -} - -function expand(inputArray, length) { - if (length && length > inputArray.length) { - const array = inputArray; - inputArray = new Uint8Array(length); - inputArray.set(array, 0); - } - return inputArray; -} - -function subarray(array, begin, end) { - return array.subarray(begin, end); -} - -function fromBits(codecBytes, chunk) { - return codecBytes.fromBits(chunk); -} -function toBits(codecBytes, chunk) { - return codecBytes.toBits(chunk); -} - -/* - Copyright (c) 2022 Gildas Lormeau. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the distribution. - - 3. The names of the authors may not be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT, - INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, - INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, - OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -const HEADER_LENGTH = 12; - -class ZipCryptoDecryptionStream extends TransformStream { - - constructor({ password, passwordVerification, checkPasswordOnly }) { - super({ - start() { - Object.assign(this, { - password, - passwordVerification - }); - createKeys(this, password); - }, - transform(chunk, controller) { - const zipCrypto = this; - if (zipCrypto.password) { - const decryptedHeader = decrypt(zipCrypto, chunk.subarray(0, HEADER_LENGTH)); - zipCrypto.password = null; - if (decryptedHeader[HEADER_LENGTH - 1] != zipCrypto.passwordVerification) { - throw new Error(ERR_INVALID_PASSWORD); - } - chunk = chunk.subarray(HEADER_LENGTH); - } - if (checkPasswordOnly) { - controller.error(new Error(ERR_ABORT_CHECK_PASSWORD)); - } else { - controller.enqueue(decrypt(zipCrypto, chunk)); - } - } - }); - } -} - -class ZipCryptoEncryptionStream extends TransformStream { - - constructor({ password, passwordVerification }) { - super({ - start() { - Object.assign(this, { - password, - passwordVerification - }); - createKeys(this, password); - }, - transform(chunk, controller) { - const zipCrypto = this; - let output; - let offset; - if (zipCrypto.password) { - zipCrypto.password = null; - const header = getRandomValues(new Uint8Array(HEADER_LENGTH)); - header[HEADER_LENGTH - 1] = zipCrypto.passwordVerification; - output = new Uint8Array(chunk.length + header.length); - output.set(encrypt(zipCrypto, header), 0); - offset = HEADER_LENGTH; - } else { - output = new Uint8Array(chunk.length); - offset = 0; - } - output.set(encrypt(zipCrypto, chunk), offset); - controller.enqueue(output); - } - }); - } -} - -function decrypt(target, input) { - const output = new Uint8Array(input.length); - for (let index = 0; index < input.length; index++) { - output[index] = getByte(target) ^ input[index]; - updateKeys(target, output[index]); - } - return output; -} - -function encrypt(target, input) { - const output = new Uint8Array(input.length); - for (let index = 0; index < input.length; index++) { - output[index] = getByte(target) ^ input[index]; - updateKeys(target, input[index]); - } - return output; -} - -function createKeys(target, password) { - const keys = [0x12345678, 0x23456789, 0x34567890]; - Object.assign(target, { - keys, - crcKey0: new Crc32(keys[0]), - crcKey2: new Crc32(keys[2]), - }); - for (let index = 0; index < password.length; index++) { - updateKeys(target, password.charCodeAt(index)); - } -} - -function updateKeys(target, byte) { - let [key0, key1, key2] = target.keys; - target.crcKey0.append([byte]); - key0 = ~target.crcKey0.get(); - key1 = getInt32(Math.imul(getInt32(key1 + getInt8(key0)), 134775813) + 1); - target.crcKey2.append([key1 >>> 24]); - key2 = ~target.crcKey2.get(); - target.keys = [key0, key1, key2]; -} - -function getByte(target) { - const temp = target.keys[2] | 2; - return getInt8(Math.imul(temp, (temp ^ 1)) >>> 8); -} - -function getInt8(number) { - return number & 0xFF; -} - -function getInt32(number) { - return number & 0xFFFFFFFF; -} - -/* - Copyright (c) 2022 Gildas Lormeau. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the distribution. - - 3. The names of the authors may not be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT, - INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, - INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, - OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -const COMPRESSION_FORMAT = "deflate-raw"; - -class DeflateStream extends TransformStream { - - constructor(options, { chunkSize, CompressionStream, CompressionStreamNative }) { - super({}); - const { compressed, encrypted, useCompressionStream, zipCrypto, signed, level } = options; - const stream = this; - let crc32Stream, encryptionStream; - let readable = filterEmptyChunks(super.readable); - if ((!encrypted || zipCrypto) && signed) { - [readable, crc32Stream] = readable.tee(); - crc32Stream = pipeThrough(crc32Stream, new Crc32Stream()); - } - if (compressed) { - readable = pipeThroughCommpressionStream(readable, useCompressionStream, { level, chunkSize }, CompressionStreamNative, CompressionStream); - } - if (encrypted) { - if (zipCrypto) { - readable = pipeThrough(readable, new ZipCryptoEncryptionStream(options)); - } else { - encryptionStream = new AESEncryptionStream(options); - readable = pipeThrough(readable, encryptionStream); - } - } - setReadable(stream, readable, async () => { - let signature; - if (encrypted && !zipCrypto) { - signature = encryptionStream.signature; - } - if ((!encrypted || zipCrypto) && signed) { - signature = await crc32Stream.getReader().read(); - signature = new DataView(signature.value.buffer).getUint32(0); - } - stream.signature = signature; - }); - } -} - -class InflateStream extends TransformStream { - - constructor(options, { chunkSize, DecompressionStream, DecompressionStreamNative }) { - super({}); - const { zipCrypto, encrypted, signed, signature, compressed, useCompressionStream } = options; - let crc32Stream, decryptionStream; - let readable = filterEmptyChunks(super.readable); - if (encrypted) { - if (zipCrypto) { - readable = pipeThrough(readable, new ZipCryptoDecryptionStream(options)); - } else { - decryptionStream = new AESDecryptionStream(options); - readable = pipeThrough(readable, decryptionStream); - } - } - if (compressed) { - readable = pipeThroughCommpressionStream(readable, useCompressionStream, { chunkSize }, DecompressionStreamNative, DecompressionStream); - } - if ((!encrypted || zipCrypto) && signed) { - [readable, crc32Stream] = readable.tee(); - crc32Stream = pipeThrough(crc32Stream, new Crc32Stream()); - } - setReadable(this, readable, async () => { - if ((!encrypted || zipCrypto) && signed) { - const streamSignature = await crc32Stream.getReader().read(); - const dataViewSignature = new DataView(streamSignature.value.buffer); - if (signature != dataViewSignature.getUint32(0, false)) { - throw new Error(ERR_INVALID_SIGNATURE); - } - } - }); - } -} - -function filterEmptyChunks(readable) { - return pipeThrough(readable, new TransformStream({ - transform(chunk, controller) { - if (chunk && chunk.length) { - controller.enqueue(chunk); - } - } - })); -} - -function setReadable(stream, readable, flush) { - readable = pipeThrough(readable, new TransformStream({ flush })); - Object.defineProperty(stream, "readable", { - get() { - return readable; - } - }); -} - -function pipeThroughCommpressionStream(readable, useCompressionStream, options, CodecStreamNative, CodecStream) { - try { - const CompressionStream = useCompressionStream && CodecStreamNative ? CodecStreamNative : CodecStream; - readable = pipeThrough(readable, new CompressionStream(COMPRESSION_FORMAT, options)); - } catch (error) { - if (useCompressionStream) { - readable = pipeThrough(readable, new CodecStream(COMPRESSION_FORMAT, options)); - } else { - throw error; - } - } - return readable; -} - -function pipeThrough(readable, transformStream) { - return readable.pipeThrough(transformStream); -} - -/* - Copyright (c) 2022 Gildas Lormeau. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the distribution. - - 3. The names of the authors may not be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT, - INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, - INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, - OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -const MESSAGE_EVENT_TYPE = "message"; -const MESSAGE_START = "start"; -const MESSAGE_PULL = "pull"; -const MESSAGE_DATA = "data"; -const MESSAGE_ACK_DATA = "ack"; -const MESSAGE_CLOSE = "close"; -const CODEC_DEFLATE = "deflate"; -const CODEC_INFLATE = "inflate"; - -class CodecStream extends TransformStream { - - constructor(options, config) { - super({}); - const codec = this; - const { codecType } = options; - let Stream; - if (codecType.startsWith(CODEC_DEFLATE)) { - Stream = DeflateStream; - } else if (codecType.startsWith(CODEC_INFLATE)) { - Stream = InflateStream; - } - let size = 0; - const stream = new Stream(options, config); - const readable = super.readable; - const transformStream = new TransformStream({ - transform(chunk, controller) { - if (chunk && chunk.length) { - size += chunk.length; - controller.enqueue(chunk); - } - }, - flush() { - const { signature } = stream; - Object.assign(codec, { - signature, - size - }); - } - }); - Object.defineProperty(codec, "readable", { - get() { - return readable.pipeThrough(stream).pipeThrough(transformStream); - } - }); - } -} - -/* - Copyright (c) 2022 Gildas Lormeau. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the distribution. - - 3. The names of the authors may not be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT, - INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, - INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, - OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -// deno-lint-ignore valid-typeof -const WEB_WORKERS_SUPPORTED = typeof Worker != UNDEFINED_TYPE$1; - -class CodecWorker { - - constructor(workerData, { readable, writable }, { options, config, streamOptions, useWebWorkers, transferStreams, scripts }, onTaskFinished) { - const { signal } = streamOptions; - Object.assign(workerData, { - busy: true, - readable: readable.pipeThrough(new ProgressWatcherStream(readable, streamOptions, config), { signal }), - writable, - options: Object.assign({}, options), - scripts, - transferStreams, - terminate() { - const { worker, busy } = workerData; - if (worker && !busy) { - worker.terminate(); - workerData.interface = null; - } - }, - onTaskFinished() { - workerData.busy = false; - onTaskFinished(workerData); - } - }); - return (useWebWorkers && WEB_WORKERS_SUPPORTED ? createWebWorkerInterface : createWorkerInterface)(workerData, config); - } -} - -class ProgressWatcherStream extends TransformStream { - - constructor(readableSource, { onstart, onprogress, size, onend }, { chunkSize }) { - let chunkOffset = 0; - super({ - start() { - if (onstart) { - callHandler(onstart, size); - } - }, - async transform(chunk, controller) { - chunkOffset += chunk.length; - if (onprogress) { - await callHandler(onprogress, chunkOffset, size); - } - controller.enqueue(chunk); - }, - flush() { - readableSource.size = chunkOffset; - if (onend) { - callHandler(onend, chunkOffset); - } - } - }, { highWaterMark: 1, size: () => chunkSize }); - } -} - -async function callHandler(handler, ...parameters) { - try { - await handler(...parameters); - } catch (_error) { - // ignored - } -} - -function createWorkerInterface(workerData, config) { - return { - run: () => runWorker$1(workerData, config) - }; -} - -function createWebWorkerInterface(workerData, { baseURL, chunkSize }) { - if (!workerData.interface) { - Object.assign(workerData, { - worker: getWebWorker(workerData.scripts[0], baseURL, workerData), - interface: { - run: () => runWebWorker(workerData, { chunkSize }) - } - }); - } - return workerData.interface; -} - -async function runWorker$1({ options, readable, writable, onTaskFinished }, config) { - const codecStream = new CodecStream(options, config); - try { - await readable.pipeThrough(codecStream).pipeTo(writable, { preventClose: true, preventAbort: true }); - const { - signature, - size - } = codecStream; - return { - signature, - size - }; - } finally { - onTaskFinished(); - } -} - -async function runWebWorker(workerData, config) { - let resolveResult, rejectResult; - const result = new Promise((resolve, reject) => { - resolveResult = resolve; - rejectResult = reject; - }); - Object.assign(workerData, { - reader: null, - writer: null, - resolveResult, - rejectResult, - result - }); - const { readable, options, scripts } = workerData; - const { writable, closed } = watchClosedStream(workerData.writable); - const streamsTransferred = sendMessage({ - type: MESSAGE_START, - scripts: scripts.slice(1), - options, - config, - readable, - writable - }, workerData); - if (!streamsTransferred) { - Object.assign(workerData, { - reader: readable.getReader(), - writer: writable.getWriter() - }); - } - const resultValue = await result; - try { - await writable.close(); - } catch (_error) { - // ignored - } - await closed; - return resultValue; -} - -function watchClosedStream(writableSource) { - const writer = writableSource.getWriter(); - let resolveStreamClosed; - const closed = new Promise(resolve => resolveStreamClosed = resolve); - const writable = new WritableStream({ - async write(chunk) { - await writer.ready; - await writer.write(chunk); - }, - close() { - writer.releaseLock(); - resolveStreamClosed(); - }, - abort(reason) { - return writer.abort(reason); - } - }); - return { writable, closed }; -} - -let classicWorkersSupported = true; -let transferStreamsSupported = true; - -function getWebWorker(url, baseURL, workerData) { - const workerOptions = { type: "module" }; - let scriptUrl, worker; - // deno-lint-ignore valid-typeof - if (typeof url == FUNCTION_TYPE$1) { - url = url(); - } - try { - scriptUrl = new URL(url, baseURL); - } catch (_error) { - scriptUrl = url; - } - if (classicWorkersSupported) { - try { - worker = new Worker(scriptUrl); - } catch (_error) { - classicWorkersSupported = false; - worker = new Worker(scriptUrl, workerOptions); - } - } else { - worker = new Worker(scriptUrl, workerOptions); - } - worker.addEventListener(MESSAGE_EVENT_TYPE, event => onMessage(event, workerData)); - return worker; -} - -function sendMessage(message, { worker, writer, onTaskFinished, transferStreams }) { - try { - let { value, readable, writable } = message; - const transferables = []; - if (value) { - const { buffer, length } = value; - if (length != buffer.byteLength) { - value = new Uint8Array(value); - } - message.value = value.buffer; - transferables.push(message.value); - } - if (transferStreams && transferStreamsSupported) { - if (readable) { - transferables.push(readable); - } - if (writable) { - transferables.push(writable); - } - } else { - message.readable = message.writable = null; - } - if (transferables.length) { - try { - worker.postMessage(message, transferables); - return true; - } catch (_error) { - transferStreamsSupported = false; - message.readable = message.writable = null; - worker.postMessage(message); - } - } else { - worker.postMessage(message); - } - } catch (error) { - if (writer) { - writer.releaseLock(); - } - onTaskFinished(); - throw error; - } -} - -async function onMessage({ data }, workerData) { - const { type, value, messageId, result, error } = data; - const { reader, writer, resolveResult, rejectResult, onTaskFinished } = workerData; - try { - if (error) { - const { message, stack, code, name } = error; - const responseError = new Error(message); - Object.assign(responseError, { stack, code, name }); - close(responseError); - } else { - if (type == MESSAGE_PULL) { - const { value, done } = await reader.read(); - sendMessage({ type: MESSAGE_DATA, value, done, messageId }, workerData); - } - if (type == MESSAGE_DATA) { - await writer.ready; - await writer.write(new Uint8Array(value)); - sendMessage({ type: MESSAGE_ACK_DATA, messageId }, workerData); - } - if (type == MESSAGE_CLOSE) { - close(null, result); - } - } - } catch (error) { - close(error); - } - - function close(error, result) { - if (error) { - rejectResult(error); - } else { - resolveResult(result); - } - if (writer) { - writer.releaseLock(); - } - onTaskFinished(); - } -} - -/* - Copyright (c) 2022 Gildas Lormeau. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the distribution. - - 3. The names of the authors may not be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT, - INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, - INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, - OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -let pool = []; -const pendingRequests = []; - -let indexWorker = 0; - -async function runWorker(stream, workerOptions) { - const { options, config } = workerOptions; - const { transferStreams, useWebWorkers, useCompressionStream, codecType, compressed, signed, encrypted } = options; - const { workerScripts, maxWorkers, terminateWorkerTimeout } = config; - workerOptions.transferStreams = transferStreams || transferStreams === UNDEFINED_VALUE; - const streamCopy = !compressed && !signed && !encrypted && !workerOptions.transferStreams; - workerOptions.useWebWorkers = !streamCopy && (useWebWorkers || (useWebWorkers === UNDEFINED_VALUE && config.useWebWorkers)); - workerOptions.scripts = workerOptions.useWebWorkers && workerScripts ? workerScripts[codecType] : []; - options.useCompressionStream = useCompressionStream || (useCompressionStream === UNDEFINED_VALUE && config.useCompressionStream); - let worker; - const workerData = pool.find(workerData => !workerData.busy); - if (workerData) { - clearTerminateTimeout(workerData); - worker = new CodecWorker(workerData, stream, workerOptions, onTaskFinished); - } else if (pool.length < maxWorkers) { - const workerData = { indexWorker }; - indexWorker++; - pool.push(workerData); - worker = new CodecWorker(workerData, stream, workerOptions, onTaskFinished); - } else { - worker = await new Promise(resolve => pendingRequests.push({ resolve, stream, workerOptions })); - } - return worker.run(); - - function onTaskFinished(workerData) { - if (pendingRequests.length) { - const [{ resolve, stream, workerOptions }] = pendingRequests.splice(0, 1); - resolve(new CodecWorker(workerData, stream, workerOptions, onTaskFinished)); - } else if (workerData.worker) { - clearTerminateTimeout(workerData); - if (Number.isFinite(terminateWorkerTimeout) && terminateWorkerTimeout >= 0) { - workerData.terminateTimeout = setTimeout(() => { - pool = pool.filter(data => data != workerData); - workerData.terminate(); - }, terminateWorkerTimeout); - } - } else { - pool = pool.filter(data => data != workerData); - } - } -} - -function clearTerminateTimeout(workerData) { - const { terminateTimeout } = workerData; - if (terminateTimeout) { - clearTimeout(terminateTimeout); - workerData.terminateTimeout = null; - } -} - -function e(e){const t=()=>URL.createObjectURL(new Blob(['const{Array:e,Object:t,Number:n,Math:r,Error:s,Uint8Array:i,Uint16Array:o,Uint32Array:c,Int32Array:f,Map:a,DataView:l,Promise:u,TextEncoder:w,crypto:h,postMessage:d,TransformStream:p,ReadableStream:y,WritableStream:m,CompressionStream:b,DecompressionStream:g}=self;class k{constructor(e){return class extends p{constructor(t,n){const r=new e(n);super({transform(e,t){t.enqueue(r.append(e))},flush(e){const t=r.flush();t&&e.enqueue(t)}})}}}}const v=[];for(let e=0;256>e;e++){let t=e;for(let e=0;8>e;e++)1&t?t=t>>>1^3988292384:t>>>=1;v[e]=t}class S{constructor(e){this.t=e||-1}append(e){let t=0|this.t;for(let n=0,r=0|e.length;r>n;n++)t=t>>>8^v[255&(t^e[n])];this.t=t}get(){return~this.t}}class z extends p{constructor(){const e=new S;super({transform(t){e.append(t)},flush(t){const n=new i(4);new l(n.buffer).setUint32(0,e.get()),t.enqueue(n)}})}}const C={concat(e,t){if(0===e.length||0===t.length)return e.concat(t);const n=e[e.length-1],r=C.i(n);return 32===r?e.concat(t):C.o(t,r,0|n,e.slice(0,e.length-1))},l(e){const t=e.length;if(0===t)return 0;const n=e[t-1];return 32*(t-1)+C.i(n)},u(e,t){if(32*e.length0&&t&&(e[n-1]=C.h(t,e[n-1]&2147483648>>t-1,1)),e},h:(e,t,n)=>32===e?t:(n?0|t:t<<32-e)+1099511627776*e,i:e=>r.round(e/1099511627776)||32,o(e,t,n,r){for(void 0===r&&(r=[]);t>=32;t-=32)r.push(n),n=0;if(0===t)return r.concat(e);for(let s=0;s>>t),n=e[s]<<32-t;const s=e.length?e[e.length-1]:0,i=C.i(s);return r.push(C.h(t+i&31,t+i>32?n:r.pop(),1)),r}},x={p:{m(e){const t=C.l(e)/8,n=new i(t);let r;for(let s=0;t>s;s++)0==(3&s)&&(r=e[s/4]),n[s]=r>>>24,r<<=8;return n},g(e){const t=[];let n,r=0;for(n=0;n9007199254740991)throw new s("Cannot hash more than 2^53 - 1 bits");const o=new c(n);let f=0;for(let e=t.blockSize+r-(t.blockSize+r&t.blockSize-1);i>=e;e+=t.blockSize)t.I(o.subarray(16*f,16*(f+1))),f+=1;return n.splice(0,16*f),t}D(){const e=this;let t=e.C;const n=e.S;t=C.concat(t,[C.h(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(r.floor(e._/4294967296)),t.push(0|e._);t.length;)e.I(t.splice(0,16));return e.reset(),n}V(e,t,n,r){return e>19?e>39?e>59?e>79?void 0:t^n^r:t&n|t&r|n&r:t^n^r:t&n|~t&r}P(e,t){return t<>>32-e}I(t){const n=this,s=n.S,i=e(80);for(let e=0;16>e;e++)i[e]=t[e];let o=s[0],c=s[1],f=s[2],a=s[3],l=s[4];for(let e=0;79>=e;e++){16>e||(i[e]=n.P(1,i[e-3]^i[e-8]^i[e-14]^i[e-16]));const t=n.P(5,o)+n.V(e,c,f,a)+l+i[e]+n.v[r.floor(e/20)]|0;l=a,a=f,f=n.P(30,c),c=o,o=t}s[0]=s[0]+o|0,s[1]=s[1]+c|0,s[2]=s[2]+f|0,s[3]=s[3]+a|0,s[4]=s[4]+l|0}},A={getRandomValues(e){const t=new c(e.buffer),n=e=>{let t=987654321;const n=4294967295;return()=>(t=36969*(65535&t)+(t>>16)&n,(((t<<16)+(e=18e3*(65535&e)+(e>>16)&n)&n)/4294967296+.5)*(r.random()>.5?1:-1))};for(let s,i=0;inew I.R(x.p.g(e)),B(e,t,n,r){if(n=n||1e4,0>r||0>n)throw new s("invalid params to pbkdf2");const i=1+(r>>5)<<2;let o,c,f,a,u;const w=new ArrayBuffer(i),h=new l(w);let d=0;const p=C;for(t=x.p.g(t),u=1;(i||1)>d;u++){for(o=c=e.encrypt(p.concat(t,[u])),f=1;n>f;f++)for(c=e.encrypt(c),a=0;ad&&fs&&(e=(new n).update(e).D());for(let t=0;s>t;t++)r[0][t]=909522486^e[t],r[1][t]=1549556828^e[t];t.K[0].update(r[0]),t.K[1].update(r[1]),t.U=new n(t.K[0])}reset(){const e=this;e.U=new e.M(e.K[0]),e.N=!1}update(e){this.N=!0,this.U.update(e)}digest(){const e=this,t=e.U.D(),n=new e.M(e.K[1]).update(t).D();return e.reset(),n}encrypt(e){if(this.N)throw new s("encrypt on already updated hmac called!");return this.update(e),this.digest(e)}}},D=void 0!==h&&"function"==typeof h.getRandomValues,V="Invalid password",P="Invalid signature",R="zipjs-abort-check-password";function B(e){return D?h.getRandomValues(e):A.getRandomValues(e)}const E=16,M={name:"PBKDF2"},K=t.assign({hash:{name:"HMAC"}},M),U=t.assign({iterations:1e3,hash:{name:"SHA-1"}},M),N=["deriveBits"],O=[8,12,16],T=[16,24,32],W=10,j=[0,0,0,0],H="undefined",L="function",F=typeof h!=H,q=F&&h.subtle,G=F&&typeof q!=H,J=x.p,Q=class{constructor(e){const t=this;t.O=[[[],[],[],[],[]],[[],[],[],[],[]]],t.O[0][0][0]||t.T();const n=t.O[0][4],r=t.O[1],i=e.length;let o,c,f,a=1;if(4!==i&&6!==i&&8!==i)throw new s("invalid aes key size");for(t.v=[c=e.slice(0),f=[]],o=i;4*i+28>o;o++){let e=c[o-1];(o%i==0||8===i&&o%i==4)&&(e=n[e>>>24]<<24^n[e>>16&255]<<16^n[e>>8&255]<<8^n[255&e],o%i==0&&(e=e<<8^e>>>24^a<<24,a=a<<1^283*(a>>7))),c[o]=c[o-i]^e}for(let e=0;o;e++,o--){const t=c[3&e?o:o-4];f[e]=4>=o||4>e?t:r[0][n[t>>>24]]^r[1][n[t>>16&255]]^r[2][n[t>>8&255]]^r[3][n[255&t]]}}encrypt(e){return this.W(e,0)}decrypt(e){return this.W(e,1)}T(){const e=this.O[0],t=this.O[1],n=e[4],r=t[4],s=[],i=[];let o,c,f,a;for(let e=0;256>e;e++)i[(s[e]=e<<1^283*(e>>7))^e]=e;for(let l=o=0;!n[l];l^=c||1,o=i[o]||1){let i=o^o<<1^o<<2^o<<3^o<<4;i=i>>8^255&i^99,n[l]=i,r[i]=l,a=s[f=s[c=s[l]]];let u=16843009*a^65537*f^257*c^16843008*l,w=257*s[i]^16843008*i;for(let n=0;4>n;n++)e[n][l]=w=w<<24^w>>>8,t[n][i]=u=u<<24^u>>>8}for(let n=0;5>n;n++)e[n]=e[n].slice(0),t[n]=t[n].slice(0)}W(e,t){if(4!==e.length)throw new s("invalid aes block size");const n=this.v[t],r=n.length/4-2,i=[0,0,0,0],o=this.O[t],c=o[0],f=o[1],a=o[2],l=o[3],u=o[4];let w,h,d,p=e[0]^n[0],y=e[t?3:1]^n[1],m=e[2]^n[2],b=e[t?1:3]^n[3],g=4;for(let e=0;r>e;e++)w=c[p>>>24]^f[y>>16&255]^a[m>>8&255]^l[255&b]^n[g],h=c[y>>>24]^f[m>>16&255]^a[b>>8&255]^l[255&p]^n[g+1],d=c[m>>>24]^f[b>>16&255]^a[p>>8&255]^l[255&y]^n[g+2],b=c[b>>>24]^f[p>>16&255]^a[y>>8&255]^l[255&m]^n[g+3],g+=4,p=w,y=h,m=d;for(let e=0;4>e;e++)i[t?3&-e:e]=u[p>>>24]<<24^u[y>>16&255]<<16^u[m>>8&255]<<8^u[255&b]^n[g++],w=p,p=y,y=m,m=b,b=w;return i}},X=class{constructor(e,t){this.j=e,this.H=t,this.L=t}reset(){this.L=this.H}update(e){return this.F(this.j,e,this.L)}q(e){if(255==(e>>24&255)){let t=e>>16&255,n=e>>8&255,r=255&e;255===t?(t=0,255===n?(n=0,255===r?r=0:++r):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=r}else e+=1<<24;return e}G(e){0===(e[0]=this.q(e[0]))&&(e[1]=this.q(e[1]))}F(e,t,n){let r;if(!(r=t.length))return[];const s=C.l(t);for(let s=0;r>s;s+=4){this.G(n);const r=e.encrypt(n);t[s]^=r[0],t[s+1]^=r[1],t[s+2]^=r[2],t[s+3]^=r[3]}return C.u(t,s)}},Y=I.R;let Z=F&&G&&typeof q.importKey==L,$=F&&G&&typeof q.deriveBits==L;class ee extends p{constructor({password:e,signed:n,encryptionStrength:r,checkPasswordOnly:o}){super({start(){t.assign(this,{ready:new u((e=>this.J=e)),password:e,signed:n,X:r-1,pending:new i})},async transform(e,t){const n=this,{password:r,X:c,J:f,ready:a}=n;r?(await(async(e,t,n,r)=>{const i=await re(e,t,n,ie(r,0,O[t])),o=ie(r,O[t]);if(i[0]!=o[0]||i[1]!=o[1])throw new s(V)})(n,c,r,ie(e,0,O[c]+2)),e=ie(e,O[c]+2),o?t.error(new s(R)):f()):await a;const l=new i(e.length-W-(e.length-W)%E);t.enqueue(ne(n,e,l,0,W,!0))},async flush(e){const{signed:t,Y:n,Z:r,pending:o,ready:c}=this;await c;const f=ie(o,0,o.length-W),a=ie(o,o.length-W);let l=new i;if(f.length){const e=ce(J,f);r.update(e);const t=n.update(e);l=oe(J,t)}if(t){const e=ie(oe(J,r.digest()),0,W);for(let t=0;W>t;t++)if(e[t]!=a[t])throw new s(P)}e.enqueue(l)}})}}class te extends p{constructor({password:e,encryptionStrength:n}){let r;super({start(){t.assign(this,{ready:new u((e=>this.J=e)),password:e,X:n-1,pending:new i})},async transform(e,t){const n=this,{password:r,X:s,J:o,ready:c}=n;let f=new i;r?(f=await(async(e,t,n)=>{const r=B(new i(O[t]));return se(r,await re(e,t,n,r))})(n,s,r),o()):await c;const a=new i(f.length+e.length-e.length%E);a.set(f,0),t.enqueue(ne(n,e,a,f.length,0))},async flush(e){const{Y:t,Z:n,pending:s,ready:o}=this;await o;let c=new i;if(s.length){const e=t.update(ce(J,s));n.update(e),c=oe(J,e)}r.signature=oe(J,n.digest()).slice(0,W),e.enqueue(se(c,r.signature))}}),r=this}}function ne(e,t,n,r,s,o){const{Y:c,Z:f,pending:a}=e,l=t.length-s;let u;for(a.length&&(t=se(a,t),n=((e,t)=>{if(t&&t>e.length){const n=e;(e=new i(t)).set(n,0)}return e})(n,l-l%E)),u=0;l-E>=u;u+=E){const e=ce(J,ie(t,u,u+E));o&&f.update(e);const s=c.update(e);o||f.update(s),n.set(oe(J,s),u+r)}return e.pending=ie(t,u),n}async function re(n,r,s,o){n.password=null;const c=(e=>{if(void 0===w){const t=new i((e=unescape(encodeURIComponent(e))).length);for(let n=0;n{if(!Z)return I.importKey(t);try{return await q.importKey("raw",t,n,!1,s)}catch(e){return Z=!1,I.importKey(t)}})(0,c,K,0,N),a=await(async(e,t,n)=>{if(!$)return I.B(t,e.salt,U.iterations,n);try{return await q.deriveBits(e,t,n)}catch(r){return $=!1,I.B(t,e.salt,U.iterations,n)}})(t.assign({salt:o},U),f,8*(2*T[r]+2)),l=new i(a),u=ce(J,ie(l,0,T[r])),h=ce(J,ie(l,T[r],2*T[r])),d=ie(l,2*T[r]);return t.assign(n,{keys:{key:u,$:h,passwordVerification:d},Y:new X(new Q(u),e.from(j)),Z:new Y(h)}),d}function se(e,t){let n=e;return e.length+t.length&&(n=new i(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function ie(e,t,n){return e.subarray(t,n)}function oe(e,t){return e.m(t)}function ce(e,t){return e.g(t)}class fe extends p{constructor({password:e,passwordVerification:n,checkPasswordOnly:r}){super({start(){t.assign(this,{password:e,passwordVerification:n}),we(this,e)},transform(e,t){const n=this;if(n.password){const t=le(n,e.subarray(0,12));if(n.password=null,t[11]!=n.passwordVerification)throw new s(V);e=e.subarray(12)}r?t.error(new s(R)):t.enqueue(le(n,e))}})}}class ae extends p{constructor({password:e,passwordVerification:n}){super({start(){t.assign(this,{password:e,passwordVerification:n}),we(this,e)},transform(e,t){const n=this;let r,s;if(n.password){n.password=null;const t=B(new i(12));t[11]=n.passwordVerification,r=new i(e.length+t.length),r.set(ue(n,t),0),s=12}else r=new i(e.length),s=0;r.set(ue(n,e),s),t.enqueue(r)}})}}function le(e,t){const n=new i(t.length);for(let r=0;r>>24]),i=~e.te.get(),e.keys=[n,s,i]}function de(e){const t=2|e.keys[2];return pe(r.imul(t,1^t)>>>8)}function pe(e){return 255&e}function ye(e){return 4294967295&e}const me="deflate-raw";class be extends p{constructor(e,{chunkSize:t,CompressionStream:n,CompressionStreamNative:r}){super({});const{compressed:s,encrypted:i,useCompressionStream:o,zipCrypto:c,signed:f,level:a}=e,u=this;let w,h,d=ke(super.readable);i&&!c||!f||([d,w]=d.tee(),w=ze(w,new z)),s&&(d=Se(d,o,{level:a,chunkSize:t},r,n)),i&&(c?d=ze(d,new ae(e)):(h=new te(e),d=ze(d,h))),ve(u,d,(async()=>{let e;i&&!c&&(e=h.signature),i&&!c||!f||(e=await w.getReader().read(),e=new l(e.value.buffer).getUint32(0)),u.signature=e}))}}class ge extends p{constructor(e,{chunkSize:t,DecompressionStream:n,DecompressionStreamNative:r}){super({});const{zipCrypto:i,encrypted:o,signed:c,signature:f,compressed:a,useCompressionStream:u}=e;let w,h,d=ke(super.readable);o&&(i?d=ze(d,new fe(e)):(h=new ee(e),d=ze(d,h))),a&&(d=Se(d,u,{chunkSize:t},r,n)),o&&!i||!c||([d,w]=d.tee(),w=ze(w,new z)),ve(this,d,(async()=>{if((!o||i)&&c){const e=await w.getReader().read(),t=new l(e.value.buffer);if(f!=t.getUint32(0,!1))throw new s(P)}}))}}function ke(e){return ze(e,new p({transform(e,t){e&&e.length&&t.enqueue(e)}}))}function ve(e,n,r){n=ze(n,new p({flush:r})),t.defineProperty(e,"readable",{get:()=>n})}function Se(e,t,n,r,s){try{e=ze(e,new(t&&r?r:s)(me,n))}catch(r){if(!t)throw r;e=ze(e,new s(me,n))}return e}function ze(e,t){return e.pipeThrough(t)}const Ce="data";class xe extends p{constructor(e,n){super({});const r=this,{codecType:s}=e;let i;s.startsWith("deflate")?i=be:s.startsWith("inflate")&&(i=ge);let o=0;const c=new i(e,n),f=super.readable,a=new p({transform(e,t){e&&e.length&&(o+=e.length,t.enqueue(e))},flush(){const{signature:e}=c;t.assign(r,{signature:e,size:o})}});t.defineProperty(r,"readable",{get:()=>f.pipeThrough(c).pipeThrough(a)})}}const _e=new a,Ae=new a;let Ie=0;async function De(e){try{const{options:t,scripts:r,config:s}=e;r&&r.length&&importScripts.apply(void 0,r),self.initCodec&&self.initCodec(),s.CompressionStreamNative=self.CompressionStream,s.DecompressionStreamNative=self.DecompressionStream,self.Deflate&&(s.CompressionStream=new k(self.Deflate)),self.Inflate&&(s.DecompressionStream=new k(self.Inflate));const i={highWaterMark:1,size:()=>s.chunkSize},o=e.readable||new y({async pull(e){const t=new u((e=>_e.set(Ie,e)));Ve({type:"pull",messageId:Ie}),Ie=(Ie+1)%n.MAX_SAFE_INTEGER;const{value:r,done:s}=await t;e.enqueue(r),s&&e.close()}},i),c=e.writable||new m({async write(e){let t;const r=new u((e=>t=e));Ae.set(Ie,t),Ve({type:Ce,value:e,messageId:Ie}),Ie=(Ie+1)%n.MAX_SAFE_INTEGER,await r}},i),f=new xe(t,s);await o.pipeThrough(f).pipeTo(c,{preventClose:!0,preventAbort:!0});try{await c.close()}catch(e){}const{signature:a,size:l}=f;Ve({type:"close",result:{signature:a,size:l}})}catch(e){Pe(e)}}function Ve(e){let{value:t}=e;if(t)if(t.length)try{t=new i(t),e.value=t.buffer,d(e,[e.value])}catch(t){d(e)}else d(e);else d(e)}function Pe(e){const{message:t,stack:n,code:r,name:s}=e;d({error:{message:t,stack:n,code:r,name:s}})}addEventListener("message",(({data:e})=>{const{type:t,messageId:n,value:r,done:s}=e;try{if("start"==t&&De(e),t==Ce){const e=_e.get(n);_e.delete(n),e({value:new i(r),done:s})}if("ack"==t){const e=Ae.get(n);Ae.delete(n),e()}}catch(e){Pe(e)}}));const Re=-2;function Be(t){return Ee(t.map((([t,n])=>new e(t).fill(n,0,t))))}function Ee(t){return t.reduce(((t,n)=>t.concat(e.isArray(n)?Ee(n):n)),[])}const Me=[0,1,2,3].concat(...Be([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function Ke(){const e=this;function t(e,t){let n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1}e.ne=n=>{const s=e.re,i=e.ie.se,o=e.ie.oe;let c,f,a,l=-1;for(n.ce=0,n.fe=573,c=0;o>c;c++)0!==s[2*c]?(n.ae[++n.ce]=l=c,n.le[c]=0):s[2*c+1]=0;for(;2>n.ce;)a=n.ae[++n.ce]=2>l?++l:0,s[2*a]=1,n.le[a]=0,n.ue--,i&&(n.we-=i[2*a+1]);for(e.he=l,c=r.floor(n.ce/2);c>=1;c--)n.de(s,c);a=o;do{c=n.ae[1],n.ae[1]=n.ae[n.ce--],n.de(s,1),f=n.ae[1],n.ae[--n.fe]=c,n.ae[--n.fe]=f,s[2*a]=s[2*c]+s[2*f],n.le[a]=r.max(n.le[c],n.le[f])+1,s[2*c+1]=s[2*f+1]=a,n.ae[1]=a++,n.de(s,1)}while(n.ce>=2);n.ae[--n.fe]=n.ae[1],(t=>{const n=e.re,r=e.ie.se,s=e.ie.pe,i=e.ie.ye,o=e.ie.me;let c,f,a,l,u,w,h=0;for(l=0;15>=l;l++)t.be[l]=0;for(n[2*t.ae[t.fe]+1]=0,c=t.fe+1;573>c;c++)f=t.ae[c],l=n[2*n[2*f+1]+1]+1,l>o&&(l=o,h++),n[2*f+1]=l,f>e.he||(t.be[l]++,u=0,i>f||(u=s[f-i]),w=n[2*f],t.ue+=w*(l+u),r&&(t.we+=w*(r[2*f+1]+u)));if(0!==h){do{for(l=o-1;0===t.be[l];)l--;t.be[l]--,t.be[l+1]+=2,t.be[o]--,h-=2}while(h>0);for(l=o;0!==l;l--)for(f=t.be[l];0!==f;)a=t.ae[--c],a>e.he||(n[2*a+1]!=l&&(t.ue+=(l-n[2*a+1])*n[2*a],n[2*a+1]=l),f--)}})(n),((e,n,r)=>{const s=[];let i,o,c,f=0;for(i=1;15>=i;i++)s[i]=f=f+r[i-1]<<1;for(o=0;n>=o;o++)c=e[2*o+1],0!==c&&(e[2*o]=t(s[c]++,c))})(s,e.he,n.be)}}function Ue(e,t,n,r,s){const i=this;i.se=e,i.pe=t,i.ye=n,i.oe=r,i.me=s}Ke.ge=[0,1,2,3,4,5,6,7].concat(...Be([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]])),Ke.ke=[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],Ke.ve=[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],Ke.Se=e=>256>e?Me[e]:Me[256+(e>>>7)],Ke.ze=[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],Ke.Ce=[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],Ke.xe=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],Ke._e=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];const Ne=Be([[144,8],[112,9],[24,7],[8,8]]);Ue.Ae=Ee([12,140,76,204,44,172,108,236,28,156,92,220,60,188,124,252,2,130,66,194,34,162,98,226,18,146,82,210,50,178,114,242,10,138,74,202,42,170,106,234,26,154,90,218,58,186,122,250,6,134,70,198,38,166,102,230,22,150,86,214,54,182,118,246,14,142,78,206,46,174,110,238,30,158,94,222,62,190,126,254,1,129,65,193,33,161,97,225,17,145,81,209,49,177,113,241,9,137,73,201,41,169,105,233,25,153,89,217,57,185,121,249,5,133,69,197,37,165,101,229,21,149,85,213,53,181,117,245,13,141,77,205,45,173,109,237,29,157,93,221,61,189,125,253,19,275,147,403,83,339,211,467,51,307,179,435,115,371,243,499,11,267,139,395,75,331,203,459,43,299,171,427,107,363,235,491,27,283,155,411,91,347,219,475,59,315,187,443,123,379,251,507,7,263,135,391,71,327,199,455,39,295,167,423,103,359,231,487,23,279,151,407,87,343,215,471,55,311,183,439,119,375,247,503,15,271,143,399,79,335,207,463,47,303,175,431,111,367,239,495,31,287,159,415,95,351,223,479,63,319,191,447,127,383,255,511,0,64,32,96,16,80,48,112,8,72,40,104,24,88,56,120,4,68,36,100,20,84,52,116,3,131,67,195,35,163,99,227].map(((e,t)=>[e,Ne[t]])));const Oe=Be([[30,5]]);function Te(e,t,n,r,s){const i=this;i.Ie=e,i.De=t,i.Ve=n,i.Pe=r,i.Re=s}Ue.Be=Ee([0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30,1,17,9,25,5,21,13,29,3,19,11,27,7,23].map(((e,t)=>[e,Oe[t]]))),Ue.Ee=new Ue(Ue.Ae,Ke.ze,257,286,15),Ue.Me=new Ue(Ue.Be,Ke.Ce,0,30,15),Ue.Ke=new Ue(null,Ke.xe,0,19,7);const We=[new Te(0,0,0,0,0),new Te(4,4,8,4,1),new Te(4,5,16,8,1),new Te(4,6,32,32,1),new Te(4,4,16,16,2),new Te(8,16,32,32,2),new Te(8,16,128,128,2),new Te(8,32,128,256,2),new Te(32,128,258,1024,2),new Te(32,258,258,4096,2)],je=["need dictionary","stream end","","","stream error","data error","","buffer error","",""],He=113,Le=666,Fe=262;function qe(e,t,n,r){const s=e[2*t],i=e[2*n];return i>s||s==i&&r[t]<=r[n]}function Ge(){const e=this;let t,n,s,c,f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z,C,x,_,A,I,D,V,P,R,B,E,M,K;const U=new Ke,N=new Ke,O=new Ke;let T,W,j,H,L,F;function q(){let t;for(t=0;286>t;t++)E[2*t]=0;for(t=0;30>t;t++)M[2*t]=0;for(t=0;19>t;t++)K[2*t]=0;E[512]=1,e.ue=e.we=0,W=j=0}function G(e,t){let n,r=-1,s=e[1],i=0,o=7,c=4;0===s&&(o=138,c=3),e[2*(t+1)+1]=65535;for(let f=0;t>=f;f++)n=s,s=e[2*(f+1)+1],++ii?K[2*n]+=i:0!==n?(n!=r&&K[2*n]++,K[32]++):i>10?K[36]++:K[34]++,i=0,r=n,0===s?(o=138,c=3):n==s?(o=6,c=3):(o=7,c=4))}function J(t){e.Ue[e.pending++]=t}function Q(e){J(255&e),J(e>>>8&255)}function X(e,t){let n;const r=t;F>16-r?(n=e,L|=n<>>16-F,F+=r-16):(L|=e<=n;n++)if(r=i,i=e[2*(n+1)+1],++o>=c||r!=i){if(f>o)do{Y(r,K)}while(0!=--o);else 0!==r?(r!=s&&(Y(r,K),o--),Y(16,K),X(o-3,2)):o>10?(Y(18,K),X(o-11,7)):(Y(17,K),X(o-3,3));o=0,s=r,0===i?(c=138,f=3):r==i?(c=6,f=3):(c=7,f=4)}}function $(){16==F?(Q(L),L=0,F=0):8>F||(J(255&L),L>>>=8,F-=8)}function ee(t,n){let s,i,o;if(e.Ne[W]=t,e.Oe[W]=255&n,W++,0===t?E[2*n]++:(j++,t--,E[2*(Ke.ge[n]+256+1)]++,M[2*Ke.Se(t)]++),0==(8191&W)&&V>2){for(s=8*W,i=C-k,o=0;30>o;o++)s+=M[2*o]*(5+Ke.Ce[o]);if(s>>>=3,jc);Y(256,t),H=t[513]}function ne(){F>8?Q(L):F>0&&J(255&L),L=0,F=0}function re(t,n,r){X(0+(r?1:0),3),((t,n)=>{ne(),H=8,Q(n),Q(~n),e.Ue.set(u.subarray(t,t+n),e.pending),e.pending+=n})(t,n)}function se(n){((t,n,r)=>{let s,i,o=0;V>0?(U.ne(e),N.ne(e),o=(()=>{let t;for(G(E,U.he),G(M,N.he),O.ne(e),t=18;t>=3&&0===K[2*Ke._e[t]+1];t--);return e.ue+=14+3*(t+1),t})(),s=e.ue+3+7>>>3,i=e.we+3+7>>>3,i>s||(s=i)):s=i=n+5,n+4>s||-1==t?i==s?(X(2+(r?1:0),3),te(Ue.Ae,Ue.Be)):(X(4+(r?1:0),3),((e,t,n)=>{let r;for(X(e-257,5),X(t-1,5),X(n-4,4),r=0;n>r;r++)X(K[2*Ke._e[r]+1],3);Z(E,e-1),Z(M,t-1)})(U.he+1,N.he+1,o+1),te(E,M)):re(t,n,r),q(),r&&ne()})(0>k?-1:k,C-k,n),k=C,t.Te()}function ie(){let e,n,r,s;do{if(s=w-_-C,0===s&&0===C&&0===_)s=f;else if(-1==s)s--;else if(C>=f+f-Fe){u.set(u.subarray(f,f+f),0),x-=f,C-=f,k-=f,e=y,r=e;do{n=65535&d[--r],d[r]=f>n?0:n-f}while(0!=--e);e=f,r=e;do{n=65535&h[--r],h[r]=f>n?0:n-f}while(0!=--e);s+=f}if(0===t.We)return;e=t.je(u,C+_,s),_+=e,3>_||(p=255&u[C],p=(p<_&&0!==t.We)}function oe(e){let t,n,r=I,s=C,i=A;const o=C>f-Fe?C-(f-Fe):0;let c=B;const a=l,w=C+258;let d=u[s+i-1],p=u[s+i];R>A||(r>>=2),c>_&&(c=_);do{if(t=e,u[t+i]==p&&u[t+i-1]==d&&u[t]==u[s]&&u[++t]==u[s+1]){s+=2,t++;do{}while(u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&w>s);if(n=258-(w-s),s=w-258,n>i){if(x=e,i=n,n>=c)break;d=u[s+i-1],p=u[s+i]}}}while((e=65535&h[e&a])>o&&0!=--r);return i>_?_:i}e.le=[],e.be=[],e.ae=[],E=[],M=[],K=[],e.de=(t,n)=>{const r=e.ae,s=r[n];let i=n<<1;for(;i<=e.ce&&(i(W||(W=8),j||(j=8),G||(G=0),t.Le=null,-1==S&&(S=6),1>j||j>9||8!=W||9>x||x>15||0>S||S>9||0>G||G>2?Re:(t.Fe=e,a=x,f=1<(t.qe=t.Ge=0,t.Le=null,e.pending=0,e.Je=0,n=He,c=0,U.re=E,U.ie=Ue.Ee,N.re=M,N.ie=Ue.Me,O.re=K,O.ie=Ue.Ke,L=0,F=0,H=8,q(),(()=>{w=2*f,d[y-1]=0;for(let e=0;y-1>e;e++)d[e]=0;D=We[V].De,R=We[V].Ie,B=We[V].Ve,I=We[V].Pe,C=0,k=0,_=0,v=A=2,z=0,p=0})(),0))(t))),e.Qe=()=>42!=n&&n!=He&&n!=Le?Re:(e.Oe=null,e.Ne=null,e.Ue=null,d=null,h=null,u=null,e.Fe=null,n==He?-3:0),e.Xe=(e,t,n)=>{let r=0;return-1==t&&(t=6),0>t||t>9||0>n||n>2?Re:(We[V].Re!=We[t].Re&&0!==e.qe&&(r=e.Ye(1)),V!=t&&(V=t,D=We[V].De,R=We[V].Ie,B=We[V].Ve,I=We[V].Pe),P=n,r)},e.Ze=(e,t,r)=>{let s,i=r,o=0;if(!t||42!=n)return Re;if(3>i)return 0;for(i>f-Fe&&(i=f-Fe,o=r-i),u.set(t.subarray(o,o+i),0),C=i,k=i,p=255&u[0],p=(p<=s;s++)p=(p<{let o,w,m,I,R;if(i>4||0>i)return Re;if(!r.$e||!r.et&&0!==r.We||n==Le&&4!=i)return r.Le=je[4],Re;if(0===r.tt)return r.Le=je[7],-5;var B;if(t=r,I=c,c=i,42==n&&(w=8+(a-8<<4)<<8,m=(V-1&255)>>1,m>3&&(m=3),w|=m<<6,0!==C&&(w|=32),w+=31-w%31,n=He,J((B=w)>>8&255),J(255&B)),0!==e.pending){if(t.Te(),0===t.tt)return c=-1,0}else if(0===t.We&&I>=i&&4!=i)return t.Le=je[7],-5;if(n==Le&&0!==t.We)return r.Le=je[7],-5;if(0!==t.We||0!==_||0!=i&&n!=Le){switch(R=-1,We[V].Re){case 0:R=(e=>{let n,r=65535;for(r>s-5&&(r=s-5);;){if(1>=_){if(ie(),0===_&&0==e)return 0;if(0===_)break}if(C+=_,_=0,n=k+r,(0===C||C>=n)&&(_=C-n,C=n,se(!1),0===t.tt))return 0;if(C-k>=f-Fe&&(se(!1),0===t.tt))return 0}return se(4==e),0===t.tt?4==e?2:0:4==e?3:1})(i);break;case 1:R=(e=>{let n,r=0;for(;;){if(Fe>_){if(ie(),Fe>_&&0==e)return 0;if(0===_)break}if(3>_||(p=(p<f-Fe||2!=P&&(v=oe(r)),3>v)n=ee(0,255&u[C]),_--,C++;else if(n=ee(C-x,v-3),_-=v,v>D||3>_)C+=v,v=0,p=255&u[C],p=(p<{let n,r,s=0;for(;;){if(Fe>_){if(ie(),Fe>_&&0==e)return 0;if(0===_)break}if(3>_||(p=(p<A&&f-Fe>=(C-s&65535)&&(2!=P&&(v=oe(s)),5>=v&&(1==P||3==v&&C-x>4096)&&(v=2)),3>A||v>A)if(0!==z){if(n=ee(0,255&u[C-1]),n&&se(!1),C++,_--,0===t.tt)return 0}else z=1,C++,_--;else{r=C+_-3,n=ee(C-1-S,A-3),_-=A-1,A-=2;do{++C>r||(p=(p<1+H+10-F&&(X(2,3),Y(256,Ue.Ae),$()),H=7;else if(re(0,0,!1),3==i)for(o=0;y>o;o++)d[o]=0;if(t.Te(),0===t.tt)return c=-1,0}}return 4!=i?0:1}}function Je(){const e=this;e.nt=0,e.rt=0,e.We=0,e.qe=0,e.tt=0,e.Ge=0}function Qe(e){const t=new Je,n=(o=e&&e.chunkSize?e.chunkSize:65536)+5*(r.floor(o/16383)+1);var o;const c=new i(n);let f=e?e.level:-1;void 0===f&&(f=-1),t.He(f),t.$e=c,this.append=(e,r)=>{let o,f,a=0,l=0,u=0;const w=[];if(e.length){t.nt=0,t.et=e,t.We=e.length;do{if(t.rt=0,t.tt=n,o=t.Ye(0),0!=o)throw new s("deflating: "+t.Le);t.rt&&(t.rt==n?w.push(new i(c)):w.push(c.slice(0,t.rt))),u+=t.rt,r&&t.nt>0&&t.nt!=a&&(r(t.nt),a=t.nt)}while(t.We>0||0===t.tt);return w.length>1?(f=new i(u),w.forEach((e=>{f.set(e,l),l+=e.length}))):f=w[0]||new i,f}},this.flush=()=>{let e,r,o=0,f=0;const a=[];do{if(t.rt=0,t.tt=n,e=t.Ye(4),1!=e&&0!=e)throw new s("deflating: "+t.Le);n-t.tt>0&&a.push(c.slice(0,t.rt)),f+=t.rt}while(t.We>0||0===t.tt);return t.Qe(),r=new i(f),a.forEach((e=>{r.set(e,o),o+=e.length})),r}}Je.prototype={He(e,t){const n=this;return n.Fe=new Ge,t||(t=15),n.Fe.He(n,e,t)},Ye(e){const t=this;return t.Fe?t.Fe.Ye(t,e):Re},Qe(){const e=this;if(!e.Fe)return Re;const t=e.Fe.Qe();return e.Fe=null,t},Xe(e,t){const n=this;return n.Fe?n.Fe.Xe(n,e,t):Re},Ze(e,t){const n=this;return n.Fe?n.Fe.Ze(n,e,t):Re},je(e,t,n){const r=this;let s=r.We;return s>n&&(s=n),0===s?0:(r.We-=s,e.set(r.et.subarray(r.nt,r.nt+s),t),r.nt+=s,r.qe+=s,s)},Te(){const e=this;let t=e.Fe.pending;t>e.tt&&(t=e.tt),0!==t&&(e.$e.set(e.Fe.Ue.subarray(e.Fe.Je,e.Fe.Je+t),e.rt),e.rt+=t,e.Fe.Je+=t,e.Ge+=t,e.tt-=t,e.Fe.pending-=t,0===e.Fe.pending&&(e.Fe.Je=0))}};const Xe=-2,Ye=-3,Ze=-5,$e=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],et=[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],tt=[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],nt=[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],rt=[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],st=[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],it=[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 ot(){let e,t,n,r,s,i;function o(e,t,o,c,f,a,l,u,w,h,d){let p,y,m,b,g,k,v,S,z,C,x,_,A,I,D;C=0,g=o;do{n[e[t+C]]++,C++,g--}while(0!==g);if(n[0]==o)return l[0]=-1,u[0]=0,0;for(S=u[0],k=1;15>=k&&0===n[k];k++);for(v=k,k>S&&(S=k),g=15;0!==g&&0===n[g];g--);for(m=g,S>g&&(S=g),u[0]=S,I=1<k;k++,I<<=1)if(0>(I-=n[k]))return Ye;if(0>(I-=n[g]))return Ye;for(n[g]+=I,i[1]=k=0,C=1,A=2;0!=--g;)i[A]=k+=n[C],A++,C++;g=0,C=0;do{0!==(k=e[t+C])&&(d[i[k]++]=g),C++}while(++g=v;v++)for(p=n[v];0!=p--;){for(;v>_+S;){if(b++,_+=S,D=m-_,D=D>S?S:D,(y=1<<(k=v-_))>p+1&&(y-=p+1,A=v,D>k))for(;++kn[++A];)y-=n[A];if(D=1<1440)return Ye;s[b]=x=h[0],h[0]+=D,0!==b?(i[b]=g,r[0]=k,r[1]=S,k=g>>>_-S,r[2]=x-s[b-1]-k,w.set(r,3*(s[b-1]+k))):l[0]=x}for(r[1]=v-_,o>C?d[C]d[C]?0:96,r[2]=d[C++]):(r[0]=a[d[C]-c]+16+64,r[2]=f[d[C++]-c]):r[0]=192,y=1<>>_;D>k;k+=y)w.set(r,3*(x+k));for(k=1<>>=1)g^=k;for(g^=k,z=(1<<_)-1;(g&z)!=i[b];)b--,_-=S,z=(1<<_)-1}return 0!==I&&1!=m?Ze:0}function c(o){let c;for(e||(e=[],t=[],n=new f(16),r=[],s=new f(15),i=new f(16)),t.lengthc;c++)t[c]=0;for(c=0;16>c;c++)n[c]=0;for(c=0;3>c;c++)r[c]=0;s.set(n.subarray(0,15),0),i.set(n.subarray(0,16),0)}this.st=(n,r,s,i,f)=>{let a;return c(19),e[0]=0,a=o(n,0,19,19,null,null,s,r,i,e,t),a==Ye?f.Le="oversubscribed dynamic bit lengths tree":a!=Ze&&0!==r[0]||(f.Le="incomplete dynamic bit lengths tree",a=Ye),a},this.it=(n,r,s,i,f,a,l,u,w)=>{let h;return c(288),e[0]=0,h=o(s,0,n,257,nt,rt,a,i,u,e,t),0!=h||0===i[0]?(h==Ye?w.Le="oversubscribed literal/length tree":-4!=h&&(w.Le="incomplete literal/length tree",h=Ye),h):(c(288),h=o(s,n,r,0,st,it,l,f,u,e,t),0!=h||0===f[0]&&n>257?(h==Ye?w.Le="oversubscribed distance tree":h==Ze?(w.Le="incomplete distance tree",h=Ye):-4!=h&&(w.Le="empty distance tree with lengths",h=Ye),h):0)}}function ct(){const e=this;let t,n,r,s,i=0,o=0,c=0,f=0,a=0,l=0,u=0,w=0,h=0,d=0;function p(e,t,n,r,s,i,o,c){let f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z;d=c.nt,p=c.We,w=o.ot,h=o.ct,y=o.write,m=yh;)p--,w|=(255&c.ft(d++))<>=a[z+1],h-=a[z+1],0!=(16&u)){for(u&=15,k=a[z+2]+(w&$e[u]),w>>=u,h-=u;15>h;)p--,w|=(255&c.ft(d++))<>=a[z+1],h-=a[z+1],0!=(16&u)){for(u&=15;u>h;)p--,w|=(255&c.ft(d++))<>=u,h-=u,m-=k,v>y){S=y-v;do{S+=o.end}while(0>S);if(u=o.end-S,k>u){if(k-=u,y-S>0&&u>y-S)do{o.lt[y++]=o.lt[S++]}while(0!=--u);else o.lt.set(o.lt.subarray(S,S+u),y),y+=u,S+=u,u=0;S=0}}else S=y-v,y-S>0&&2>y-S?(o.lt[y++]=o.lt[S++],o.lt[y++]=o.lt[S++],k-=2):(o.lt.set(o.lt.subarray(S,S+2),y),y+=2,S+=2,k-=2);if(y-S>0&&k>y-S)do{o.lt[y++]=o.lt[S++]}while(0!=--k);else o.lt.set(o.lt.subarray(S,S+k),y),y+=k,S+=k,k=0;break}if(0!=(64&u))return c.Le="invalid distance code",k=c.We-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ot=w,o.ct=h,c.We=p,c.qe+=d-c.nt,c.nt=d,o.write=y,Ye;f+=a[z+2],f+=w&$e[u],z=3*(l+f),u=a[z]}break}if(0!=(64&u))return 0!=(32&u)?(k=c.We-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ot=w,o.ct=h,c.We=p,c.qe+=d-c.nt,c.nt=d,o.write=y,1):(c.Le="invalid literal/length code",k=c.We-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ot=w,o.ct=h,c.We=p,c.qe+=d-c.nt,c.nt=d,o.write=y,Ye);if(f+=a[z+2],f+=w&$e[u],z=3*(l+f),0===(u=a[z])){w>>=a[z+1],h-=a[z+1],o.lt[y++]=a[z+2],m--;break}}else w>>=a[z+1],h-=a[z+1],o.lt[y++]=a[z+2],m--}while(m>=258&&p>=10);return k=c.We-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ot=w,o.ct=h,c.We=p,c.qe+=d-c.nt,c.nt=d,o.write=y,0}e.init=(e,i,o,c,f,a)=>{t=0,u=e,w=i,r=o,h=c,s=f,d=a,n=null},e.ut=(e,y,m)=>{let b,g,k,v,S,z,C,x=0,_=0,A=0;for(A=y.nt,v=y.We,x=e.ot,_=e.ct,S=e.write,z=S=258&&v>=10&&(e.ot=x,e.ct=_,y.We=v,y.qe+=A-y.nt,y.nt=A,e.write=S,m=p(u,w,r,h,s,d,e,y),A=y.nt,v=y.We,x=e.ot,_=e.ct,S=e.write,z=S_;){if(0===v)return e.ot=x,e.ct=_,y.We=v,y.qe+=A-y.nt,y.nt=A,e.write=S,e.wt(y,m);m=0,v--,x|=(255&y.ft(A++))<<_,_+=8}if(g=3*(o+(x&$e[b])),x>>>=n[g+1],_-=n[g+1],k=n[g],0===k){f=n[g+2],t=6;break}if(0!=(16&k)){a=15&k,i=n[g+2],t=2;break}if(0==(64&k)){c=k,o=g/3+n[g+2];break}if(0!=(32&k)){t=7;break}return t=9,y.Le="invalid literal/length code",m=Ye,e.ot=x,e.ct=_,y.We=v,y.qe+=A-y.nt,y.nt=A,e.write=S,e.wt(y,m);case 2:for(b=a;b>_;){if(0===v)return e.ot=x,e.ct=_,y.We=v,y.qe+=A-y.nt,y.nt=A,e.write=S,e.wt(y,m);m=0,v--,x|=(255&y.ft(A++))<<_,_+=8}i+=x&$e[b],x>>=b,_-=b,c=w,n=s,o=d,t=3;case 3:for(b=c;b>_;){if(0===v)return e.ot=x,e.ct=_,y.We=v,y.qe+=A-y.nt,y.nt=A,e.write=S,e.wt(y,m);m=0,v--,x|=(255&y.ft(A++))<<_,_+=8}if(g=3*(o+(x&$e[b])),x>>=n[g+1],_-=n[g+1],k=n[g],0!=(16&k)){a=15&k,l=n[g+2],t=4;break}if(0==(64&k)){c=k,o=g/3+n[g+2];break}return t=9,y.Le="invalid distance code",m=Ye,e.ot=x,e.ct=_,y.We=v,y.qe+=A-y.nt,y.nt=A,e.write=S,e.wt(y,m);case 4:for(b=a;b>_;){if(0===v)return e.ot=x,e.ct=_,y.We=v,y.qe+=A-y.nt,y.nt=A,e.write=S,e.wt(y,m);m=0,v--,x|=(255&y.ft(A++))<<_,_+=8}l+=x&$e[b],x>>=b,_-=b,t=5;case 5:for(C=S-l;0>C;)C+=e.end;for(;0!==i;){if(0===z&&(S==e.end&&0!==e.read&&(S=0,z=S7&&(_-=8,v++,A--),e.write=S,m=e.wt(y,m),S=e.write,z=S{}}ot.dt=(e,t,n,r)=>(e[0]=9,t[0]=5,n[0]=et,r[0]=tt,0);const ft=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function at(e,t){const n=this;let r,s=0,o=0,c=0,a=0;const l=[0],u=[0],w=new ct;let h=0,d=new f(4320);const p=new ot;n.ct=0,n.ot=0,n.lt=new i(t),n.end=t,n.read=0,n.write=0,n.reset=(e,t)=>{t&&(t[0]=0),6==s&&w.ht(e),s=0,n.ct=0,n.ot=0,n.read=n.write=0},n.reset(e,null),n.wt=(e,t)=>{let r,s,i;return s=e.rt,i=n.read,r=(i>n.write?n.end:n.write)-i,r>e.tt&&(r=e.tt),0!==r&&t==Ze&&(t=0),e.tt-=r,e.Ge+=r,e.$e.set(n.lt.subarray(i,i+r),s),s+=r,i+=r,i==n.end&&(i=0,n.write==n.end&&(n.write=0),r=n.write-i,r>e.tt&&(r=e.tt),0!==r&&t==Ze&&(t=0),e.tt-=r,e.Ge+=r,e.$e.set(n.lt.subarray(i,i+r),s),s+=r,i+=r),e.rt=s,n.read=i,t},n.ut=(e,t)=>{let i,f,y,m,b,g,k,v;for(m=e.nt,b=e.We,f=n.ot,y=n.ct,g=n.write,k=gy;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<>>1){case 0:f>>>=3,y-=3,i=7&y,f>>>=i,y-=i,s=1;break;case 1:S=[],z=[],C=[[]],x=[[]],ot.dt(S,z,C,x),w.init(S[0],z[0],C[0],0,x[0],0),f>>>=3,y-=3,s=6;break;case 2:f>>>=3,y-=3,s=3;break;case 3:return f>>>=3,y-=3,s=9,e.Le="invalid block type",t=Ye,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t)}break;case 1:for(;32>y;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<>>16&65535)!=(65535&f))return s=9,e.Le="invalid stored block lengths",t=Ye,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);o=65535&f,f=y=0,s=0!==o?2:0!==h?7:0;break;case 2:if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);if(0===k&&(g==n.end&&0!==n.read&&(g=0,k=gb&&(i=b),i>k&&(i=k),n.lt.set(e.je(m,i),g),m+=i,b-=i,g+=i,k-=i,0!=(o-=i))break;s=0!==h?7:0;break;case 3:for(;14>y;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<29||(i>>5&31)>29)return s=9,e.Le="too many length or distance symbols",t=Ye,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);if(i=258+(31&i)+(i>>5&31),!r||r.lengthv;v++)r[v]=0;f>>>=14,y-=14,a=0,s=4;case 4:for(;4+(c>>>10)>a;){for(;3>y;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<>>=3,y-=3}for(;19>a;)r[ft[a++]]=0;if(l[0]=7,i=p.st(r,l,u,d,e),0!=i)return(t=i)==Ye&&(r=null,s=9),n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);a=0,s=5;case 5:for(;i=c,258+(31&i)+(i>>5&31)>a;){let o,w;for(i=l[0];i>y;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<w)f>>>=i,y-=i,r[a++]=w;else{for(v=18==w?7:w-14,o=18==w?11:3;i+v>y;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<>>=i,y-=i,o+=f&$e[v],f>>>=v,y-=v,v=a,i=c,v+o>258+(31&i)+(i>>5&31)||16==w&&1>v)return r=null,s=9,e.Le="invalid bit length repeat",t=Ye,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);w=16==w?r[v-1]:0;do{r[v++]=w}while(0!=--o);a=v}}if(u[0]=-1,_=[],A=[],I=[],D=[],_[0]=9,A[0]=6,i=c,i=p.it(257+(31&i),1+(i>>5&31),r,_,A,I,D,d,e),0!=i)return i==Ye&&(r=null,s=9),t=i,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);w.init(_[0],A[0],d,I[0],d,D[0]),s=6;case 6:if(n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,1!=(t=w.ut(n,e,t)))return n.wt(e,t);if(t=0,w.ht(e),m=e.nt,b=e.We,f=n.ot,y=n.ct,g=n.write,k=g{n.reset(e,null),n.lt=null,d=null},n.yt=(e,t,r)=>{n.lt.set(e.subarray(t,t+r),0),n.read=n.write=r},n.bt=()=>1==s?1:0}const lt=13,ut=[0,0,255,255];function wt(){const e=this;function t(e){return e&&e.gt?(e.qe=e.Ge=0,e.Le=null,e.gt.mode=7,e.gt.kt.reset(e,null),0):Xe}e.mode=0,e.method=0,e.vt=[0],e.St=0,e.marker=0,e.zt=0,e.Ct=t=>(e.kt&&e.kt.ht(t),e.kt=null,0),e.xt=(n,r)=>(n.Le=null,e.kt=null,8>r||r>15?(e.Ct(n),Xe):(e.zt=r,n.gt.kt=new at(n,1<{let n,r;if(!e||!e.gt||!e.et)return Xe;const s=e.gt;for(t=4==t?Ze:0,n=Ze;;)switch(s.mode){case 0:if(0===e.We)return n;if(n=t,e.We--,e.qe++,8!=(15&(s.method=e.ft(e.nt++)))){s.mode=lt,e.Le="unknown compression method",s.marker=5;break}if(8+(s.method>>4)>s.zt){s.mode=lt,e.Le="invalid win size",s.marker=5;break}s.mode=1;case 1:if(0===e.We)return n;if(n=t,e.We--,e.qe++,r=255&e.ft(e.nt++),((s.method<<8)+r)%31!=0){s.mode=lt,e.Le="incorrect header check",s.marker=5;break}if(0==(32&r)){s.mode=7;break}s.mode=2;case 2:if(0===e.We)return n;n=t,e.We--,e.qe++,s.St=(255&e.ft(e.nt++))<<24&4278190080,s.mode=3;case 3:if(0===e.We)return n;n=t,e.We--,e.qe++,s.St+=(255&e.ft(e.nt++))<<16&16711680,s.mode=4;case 4:if(0===e.We)return n;n=t,e.We--,e.qe++,s.St+=(255&e.ft(e.nt++))<<8&65280,s.mode=5;case 5:return 0===e.We?n:(n=t,e.We--,e.qe++,s.St+=255&e.ft(e.nt++),s.mode=6,2);case 6:return s.mode=lt,e.Le="need dictionary",s.marker=0,Xe;case 7:if(n=s.kt.ut(e,n),n==Ye){s.mode=lt,s.marker=0;break}if(0==n&&(n=t),1!=n)return n;n=t,s.kt.reset(e,s.vt),s.mode=12;case 12:return e.We=0,1;case lt:return Ye;default:return Xe}},e.At=(e,t,n)=>{let r=0,s=n;if(!e||!e.gt||6!=e.gt.mode)return Xe;const i=e.gt;return s<1<{let n,r,s,i,o;if(!e||!e.gt)return Xe;const c=e.gt;if(c.mode!=lt&&(c.mode=lt,c.marker=0),0===(n=e.We))return Ze;for(r=e.nt,s=c.marker;0!==n&&4>s;)e.ft(r)==ut[s]?s++:s=0!==e.ft(r)?0:4-s,r++,n--;return e.qe+=r-e.nt,e.nt=r,e.We=n,c.marker=s,4!=s?Ye:(i=e.qe,o=e.Ge,t(e),e.qe=i,e.Ge=o,c.mode=7,0)},e.Dt=e=>e&&e.gt&&e.gt.kt?e.gt.kt.bt():Xe}function ht(){}function dt(e){const t=new ht,n=e&&e.chunkSize?r.floor(2*e.chunkSize):131072,o=new i(n);let c=!1;t.xt(),t.$e=o,this.append=(e,r)=>{const f=[];let a,l,u=0,w=0,h=0;if(0!==e.length){t.nt=0,t.et=e,t.We=e.length;do{if(t.rt=0,t.tt=n,0!==t.We||c||(t.nt=0,c=!0),a=t._t(0),c&&a===Ze){if(0!==t.We)throw new s("inflating: bad input")}else if(0!==a&&1!==a)throw new s("inflating: "+t.Le);if((c||1===a)&&t.We===e.length)throw new s("inflating: bad input");t.rt&&(t.rt===n?f.push(new i(o)):f.push(o.slice(0,t.rt))),h+=t.rt,r&&t.nt>0&&t.nt!=u&&(r(t.nt),u=t.nt)}while(t.We>0||0===t.tt);return f.length>1?(l=new i(h),f.forEach((e=>{l.set(e,w),w+=e.length}))):l=f[0]||new i,l}},this.flush=()=>{t.Ct()}}ht.prototype={xt(e){const t=this;return t.gt=new wt,e||(e=15),t.gt.xt(t,e)},_t(e){const t=this;return t.gt?t.gt._t(t,e):Xe},Ct(){const e=this;if(!e.gt)return Xe;const t=e.gt.Ct(e);return e.gt=null,t},It(){const e=this;return e.gt?e.gt.It(e):Xe},At(e,t){const n=this;return n.gt?n.gt.At(n,e,t):Xe},ft(e){return this.et[e]},je(e,t){return this.et.subarray(e,e+t)}},self.initCodec=()=>{self.Deflate=Qe,self.Inflate=dt};\n'],{type:"text/javascript"}));e({workerScripts:{inflate:[t],deflate:[t]}});} - -/* - Copyright (c) 2022 Gildas Lormeau. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the distribution. - - 3. The names of the authors may not be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT, - INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, - INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, - OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -const ERR_ITERATOR_COMPLETED_TOO_SOON = "Writer iterator completed too soon"; -const HTTP_HEADER_CONTENT_TYPE = "Content-Type"; -const DEFAULT_CHUNK_SIZE = 64 * 1024; - -const PROPERTY_NAME_WRITABLE = "writable"; - -class Stream { - - constructor() { - this.size = 0; - } - - init() { - this.initialized = true; - } -} - -class Reader extends Stream { - - get readable() { - const reader = this; - const { chunkSize = DEFAULT_CHUNK_SIZE } = reader; - const readable = new ReadableStream({ - start() { - this.chunkOffset = 0; - }, - async pull(controller) { - const { offset = 0, size, diskNumberStart } = readable; - const { chunkOffset } = this; - controller.enqueue(await readUint8Array(reader, offset + chunkOffset, Math.min(chunkSize, size - chunkOffset), diskNumberStart)); - if (chunkOffset + chunkSize > size) { - controller.close(); - } else { - this.chunkOffset += chunkSize; - } - } - }); - return readable; - } -} - -class BlobReader extends Reader { - - constructor(blob) { - super(); - Object.assign(this, { - blob, - size: blob.size - }); - } - - async readUint8Array(offset, length) { - const reader = this; - const offsetEnd = offset + length; - const blob = offset || offsetEnd < reader.size ? reader.blob.slice(offset, offsetEnd) : reader.blob; - return new Uint8Array(await blob.arrayBuffer()); - } -} - -class BlobWriter extends Stream { - - constructor(contentType) { - super(); - const writer = this; - const transformStream = new TransformStream(); - const headers = []; - if (contentType) { - headers.push([HTTP_HEADER_CONTENT_TYPE, contentType]); - } - Object.defineProperty(writer, PROPERTY_NAME_WRITABLE, { - get() { - return transformStream.writable; - } - }); - writer.blob = new Response(transformStream.readable, { headers }).blob(); - } - - getData() { - return this.blob; - } -} - -class TextWriter extends BlobWriter { - - constructor(encoding) { - super(encoding); - Object.assign(this, { - encoding, - utf8: !encoding || encoding.toLowerCase() == "utf-8" - }); - } - - async getData() { - const { - encoding, - utf8 - } = this; - const blob = await super.getData(); - if (blob.text && utf8) { - return blob.text(); - } else { - const reader = new FileReader(); - return new Promise((resolve, reject) => { - Object.assign(reader, { - onload: ({ target }) => resolve(target.result), - onerror: () => reject(reader.error) - }); - reader.readAsText(blob, encoding); - }); - } - } -} - -class SplitDataReader extends Reader { - - constructor(readers) { - super(); - this.readers = readers; - } - - async init() { - const reader = this; - const { readers } = reader; - reader.lastDiskNumber = 0; - await Promise.all(readers.map(async diskReader => { - await diskReader.init(); - reader.size += diskReader.size; - })); - super.init(); - } - - async readUint8Array(offset, length, diskNumber = 0) { - const reader = this; - const { readers } = this; - let result; - let currentDiskNumber = diskNumber; - if (currentDiskNumber == -1) { - currentDiskNumber = readers.length - 1; - } - let currentReaderOffset = offset; - while (currentReaderOffset >= readers[currentDiskNumber].size) { - currentReaderOffset -= readers[currentDiskNumber].size; - currentDiskNumber++; - } - const currentReader = readers[currentDiskNumber]; - const currentReaderSize = currentReader.size; - if (currentReaderOffset + length <= currentReaderSize) { - result = await readUint8Array(currentReader, currentReaderOffset, length); - } else { - const chunkLength = currentReaderSize - currentReaderOffset; - result = new Uint8Array(length); - result.set(await readUint8Array(currentReader, currentReaderOffset, chunkLength)); - result.set(await reader.readUint8Array(offset + chunkLength, length - chunkLength, diskNumber), chunkLength); - } - reader.lastDiskNumber = Math.max(currentDiskNumber, reader.lastDiskNumber); - return result; - } -} - -class SplitDataWriter extends Stream { - - constructor(writerGenerator, maxSize = 4294967295) { - super(); - const zipWriter = this; - Object.assign(zipWriter, { - diskNumber: 0, - diskOffset: 0, - size: 0, - maxSize, - availableSize: maxSize - }); - let diskSourceWriter, diskWritable, diskWriter; - const writable = new WritableStream({ - async write(chunk) { - const { availableSize } = zipWriter; - if (!diskWriter) { - const { value, done } = await writerGenerator.next(); - if (done && !value) { - throw new Error(ERR_ITERATOR_COMPLETED_TOO_SOON); - } else { - diskSourceWriter = value; - diskSourceWriter.size = 0; - if (diskSourceWriter.maxSize) { - zipWriter.maxSize = diskSourceWriter.maxSize; - } - zipWriter.availableSize = zipWriter.maxSize; - await initStream(diskSourceWriter); - diskWritable = value.writable; - diskWriter = diskWritable.getWriter(); - } - await this.write(chunk); - } else if (chunk.length >= availableSize) { - await writeChunk(chunk.slice(0, availableSize)); - await closeDisk(); - zipWriter.diskOffset += diskSourceWriter.size; - zipWriter.diskNumber++; - diskWriter = null; - await this.write(chunk.slice(availableSize)); - } else { - await writeChunk(chunk); - } - }, - async close() { - await diskWriter.ready; - await closeDisk(); - } - }); - Object.defineProperty(zipWriter, PROPERTY_NAME_WRITABLE, { - get() { - return writable; - } - }); - - async function writeChunk(chunk) { - const chunkLength = chunk.length; - if (chunkLength) { - await diskWriter.ready; - await diskWriter.write(chunk); - diskSourceWriter.size += chunkLength; - zipWriter.size += chunkLength; - zipWriter.availableSize -= chunkLength; - } - } - - async function closeDisk() { - diskWritable.size = diskSourceWriter.size; - await diskWriter.close(); - } - } -} - -async function initStream(stream, initSize) { - if (stream.init && !stream.initialized) { - await stream.init(initSize); - } -} - -function initReader(reader) { - if (Array.isArray(reader)) { - reader = new SplitDataReader(reader); - } - if (reader instanceof ReadableStream) { - reader = { - readable: reader - }; - } - return reader; -} - -function initWriter(writer) { - if (writer.writable === UNDEFINED_VALUE && typeof writer.next == FUNCTION_TYPE$1) { - writer = new SplitDataWriter(writer); - } - if (writer instanceof WritableStream) { - writer = { - writable: writer - }; - } - const { writable } = writer; - if (writable.size === UNDEFINED_VALUE) { - writable.size = 0; - } - const splitZipFile = writer instanceof SplitDataWriter; - if (!splitZipFile) { - Object.assign(writer, { - diskNumber: 0, - diskOffset: 0, - availableSize: Infinity, - maxSize: Infinity - }); - } - return writer; -} - -function readUint8Array(reader, offset, size, diskNumber) { - return reader.readUint8Array(offset, size, diskNumber); -} - -/* - Copyright (c) 2022 Gildas Lormeau. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the distribution. - - 3. The names of the authors may not be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT, - INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, - INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, - OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* global TextDecoder */ - -const CP437 = "\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ ".split(""); -const VALID_CP437 = CP437.length == 256; - -function decodeCP437(stringValue) { - if (VALID_CP437) { - let result = ""; - for (let indexCharacter = 0; indexCharacter < stringValue.length; indexCharacter++) { - result += CP437[stringValue[indexCharacter]]; - } - return result; - } else { - return new TextDecoder().decode(stringValue); - } -} - -/* - Copyright (c) 2022 Gildas Lormeau. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the distribution. - - 3. The names of the authors may not be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT, - INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, - INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, - OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -function decodeText(value, encoding) { - if (encoding && encoding.trim().toLowerCase() == "cp437") { - return decodeCP437(value); - } else { - return new TextDecoder(encoding).decode(value); - } -} - -/* - Copyright (c) 2022 Gildas Lormeau. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the distribution. - - 3. The names of the authors may not be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT, - INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, - INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, - OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -const PROPERTY_NAME_FILENAME = "filename"; -const PROPERTY_NAME_RAW_FILENAME = "rawFilename"; -const PROPERTY_NAME_COMMENT = "comment"; -const PROPERTY_NAME_RAW_COMMENT = "rawComment"; -const PROPERTY_NAME_UNCOMPPRESSED_SIZE = "uncompressedSize"; -const PROPERTY_NAME_COMPPRESSED_SIZE = "compressedSize"; -const PROPERTY_NAME_OFFSET = "offset"; -const PROPERTY_NAME_DISK_NUMBER_START = "diskNumberStart"; -const PROPERTY_NAME_LAST_MODIFICATION_DATE = "lastModDate"; -const PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE = "rawLastModDate"; -const PROPERTY_NAME_LAST_ACCESS_DATE = "lastAccessDate"; -const PROPERTY_NAME_RAW_LAST_ACCESS_DATE = "rawLastAccessDate"; -const PROPERTY_NAME_CREATION_DATE = "creationDate"; -const PROPERTY_NAME_RAW_CREATION_DATE = "rawCreationDate"; -const PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE = "internalFileAttribute"; -const PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE = "externalFileAttribute"; -const PROPERTY_NAME_MS_DOS_COMPATIBLE = "msDosCompatible"; -const PROPERTY_NAME_ZIP64 = "zip64"; - -const PROPERTY_NAMES = [ - PROPERTY_NAME_FILENAME, PROPERTY_NAME_RAW_FILENAME, PROPERTY_NAME_COMPPRESSED_SIZE, PROPERTY_NAME_UNCOMPPRESSED_SIZE, - PROPERTY_NAME_LAST_MODIFICATION_DATE, PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE, PROPERTY_NAME_COMMENT, PROPERTY_NAME_RAW_COMMENT, - PROPERTY_NAME_LAST_ACCESS_DATE, PROPERTY_NAME_CREATION_DATE, PROPERTY_NAME_OFFSET, PROPERTY_NAME_DISK_NUMBER_START, - PROPERTY_NAME_DISK_NUMBER_START, PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE, PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE, - PROPERTY_NAME_MS_DOS_COMPATIBLE, PROPERTY_NAME_ZIP64, - "directory", "bitFlag", "encrypted", "signature", "filenameUTF8", "commentUTF8", "compressionMethod", "version", "versionMadeBy", - "extraField", "rawExtraField", "extraFieldZip64", "extraFieldUnicodePath", "extraFieldUnicodeComment", "extraFieldAES", "extraFieldNTFS", - "extraFieldExtendedTimestamp"]; - -class Entry { - - constructor(data) { - PROPERTY_NAMES.forEach(name => this[name] = data[name]); - } - -} - -/* - Copyright (c) 2022 Gildas Lormeau. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the distribution. - - 3. The names of the authors may not be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT, - INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, - INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, - OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -const ERR_BAD_FORMAT = "File format is not recognized"; -const ERR_EOCDR_NOT_FOUND = "End of central directory not found"; -const ERR_EOCDR_ZIP64_NOT_FOUND = "End of Zip64 central directory not found"; -const ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND = "End of Zip64 central directory locator not found"; -const ERR_CENTRAL_DIRECTORY_NOT_FOUND = "Central directory header not found"; -const ERR_LOCAL_FILE_HEADER_NOT_FOUND = "Local file header not found"; -const ERR_EXTRAFIELD_ZIP64_NOT_FOUND = "Zip64 extra field not found"; -const ERR_ENCRYPTED = "File contains encrypted entry"; -const ERR_UNSUPPORTED_ENCRYPTION = "Encryption method not supported"; -const ERR_UNSUPPORTED_COMPRESSION = "Compression method not supported"; -const ERR_SPLIT_ZIP_FILE = "Split zip file"; -const CHARSET_UTF8 = "utf-8"; -const CHARSET_CP437 = "cp437"; -const ZIP64_PROPERTIES = [ - [PROPERTY_NAME_UNCOMPPRESSED_SIZE, MAX_32_BITS], - [PROPERTY_NAME_COMPPRESSED_SIZE, MAX_32_BITS], - [PROPERTY_NAME_OFFSET, MAX_32_BITS], - [PROPERTY_NAME_DISK_NUMBER_START, MAX_16_BITS] -]; -const ZIP64_EXTRACTION = { - [MAX_16_BITS]: { - getValue: getUint32, - bytes: 4 - }, - [MAX_32_BITS]: { - getValue: getBigUint64, - bytes: 8 - } -}; - -class ZipReader { - - constructor(reader, options = {}) { - Object.assign(this, { - reader: initReader(reader), - options, - config: getConfiguration() - }); - } - - async* getEntriesGenerator(options = {}) { - const zipReader = this; - let { reader } = zipReader; - const { config } = zipReader; - await initStream(reader); - if (reader.size === UNDEFINED_VALUE || !reader.readUint8Array) { - reader = new BlobReader(await new Response(reader.readable).blob()); - await initStream(reader); - } - if (reader.size < END_OF_CENTRAL_DIR_LENGTH) { - throw new Error(ERR_BAD_FORMAT); - } - reader.chunkSize = getChunkSize(config); - const endOfDirectoryInfo = await seekSignature(reader, END_OF_CENTRAL_DIR_SIGNATURE, reader.size, END_OF_CENTRAL_DIR_LENGTH, MAX_16_BITS * 16); - if (!endOfDirectoryInfo) { - const signatureArray = await readUint8Array(reader, 0, 4); - const signatureView = getDataView(signatureArray); - if (getUint32(signatureView) == SPLIT_ZIP_FILE_SIGNATURE) { - throw new Error(ERR_SPLIT_ZIP_FILE); - } else { - throw new Error(ERR_EOCDR_NOT_FOUND); - } - } - const endOfDirectoryView = getDataView(endOfDirectoryInfo); - let directoryDataLength = getUint32(endOfDirectoryView, 12); - let directoryDataOffset = getUint32(endOfDirectoryView, 16); - const commentOffset = endOfDirectoryInfo.offset; - const commentLength = getUint16(endOfDirectoryView, 20); - const appendedDataOffset = commentOffset + END_OF_CENTRAL_DIR_LENGTH + commentLength; - let lastDiskNumber = getUint16(endOfDirectoryView, 4); - const expectedLastDiskNumber = reader.lastDiskNumber || 0; - let diskNumber = getUint16(endOfDirectoryView, 6); - let filesLength = getUint16(endOfDirectoryView, 8); - let prependedDataLength = 0; - let startOffset = 0; - if (directoryDataOffset == MAX_32_BITS || directoryDataLength == MAX_32_BITS || filesLength == MAX_16_BITS || diskNumber == MAX_16_BITS) { - const endOfDirectoryLocatorArray = await readUint8Array(reader, endOfDirectoryInfo.offset - ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH, ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH); - const endOfDirectoryLocatorView = getDataView(endOfDirectoryLocatorArray); - if (getUint32(endOfDirectoryLocatorView, 0) != ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE) { - throw new Error(ERR_EOCDR_ZIP64_NOT_FOUND); - } - directoryDataOffset = getBigUint64(endOfDirectoryLocatorView, 8); - let endOfDirectoryArray = await readUint8Array(reader, directoryDataOffset, ZIP64_END_OF_CENTRAL_DIR_LENGTH, -1); - let endOfDirectoryView = getDataView(endOfDirectoryArray); - const expectedDirectoryDataOffset = endOfDirectoryInfo.offset - ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH - ZIP64_END_OF_CENTRAL_DIR_LENGTH; - if (getUint32(endOfDirectoryView, 0) != ZIP64_END_OF_CENTRAL_DIR_SIGNATURE && directoryDataOffset != expectedDirectoryDataOffset) { - const originalDirectoryDataOffset = directoryDataOffset; - directoryDataOffset = expectedDirectoryDataOffset; - prependedDataLength = directoryDataOffset - originalDirectoryDataOffset; - endOfDirectoryArray = await readUint8Array(reader, directoryDataOffset, ZIP64_END_OF_CENTRAL_DIR_LENGTH, -1); - endOfDirectoryView = getDataView(endOfDirectoryArray); - } - if (getUint32(endOfDirectoryView, 0) != ZIP64_END_OF_CENTRAL_DIR_SIGNATURE) { - throw new Error(ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND); - } - if (lastDiskNumber == MAX_16_BITS) { - lastDiskNumber = getUint32(endOfDirectoryView, 16); - } - if (diskNumber == MAX_16_BITS) { - diskNumber = getUint32(endOfDirectoryView, 20); - } - if (filesLength == MAX_16_BITS) { - filesLength = getBigUint64(endOfDirectoryView, 32); - } - if (directoryDataLength == MAX_32_BITS) { - directoryDataLength = getBigUint64(endOfDirectoryView, 40); - } - directoryDataOffset -= directoryDataLength; - } - if (expectedLastDiskNumber != lastDiskNumber) { - throw new Error(ERR_SPLIT_ZIP_FILE); - } - if (directoryDataOffset < 0 || directoryDataOffset >= reader.size) { - throw new Error(ERR_BAD_FORMAT); - } - let offset = 0; - let directoryArray = await readUint8Array(reader, directoryDataOffset, directoryDataLength, diskNumber); - let directoryView = getDataView(directoryArray); - if (directoryDataLength) { - const expectedDirectoryDataOffset = endOfDirectoryInfo.offset - directoryDataLength; - if (getUint32(directoryView, offset) != CENTRAL_FILE_HEADER_SIGNATURE && directoryDataOffset != expectedDirectoryDataOffset) { - const originalDirectoryDataOffset = directoryDataOffset; - directoryDataOffset = expectedDirectoryDataOffset; - prependedDataLength = directoryDataOffset - originalDirectoryDataOffset; - directoryArray = await readUint8Array(reader, directoryDataOffset, directoryDataLength, diskNumber); - directoryView = getDataView(directoryArray); - } - } - if (directoryDataOffset < 0 || directoryDataOffset >= reader.size) { - throw new Error(ERR_BAD_FORMAT); - } - const filenameEncoding = getOptionValue(zipReader, options, "filenameEncoding"); - const commentEncoding = getOptionValue(zipReader, options, "commentEncoding"); - for (let indexFile = 0; indexFile < filesLength; indexFile++) { - const fileEntry = new ZipEntry(reader, config, zipReader.options); - if (getUint32(directoryView, offset) != CENTRAL_FILE_HEADER_SIGNATURE) { - throw new Error(ERR_CENTRAL_DIRECTORY_NOT_FOUND); - } - readCommonHeader(fileEntry, directoryView, offset + 6); - const languageEncodingFlag = Boolean(fileEntry.bitFlag.languageEncodingFlag); - const filenameOffset = offset + 46; - const extraFieldOffset = filenameOffset + fileEntry.filenameLength; - const commentOffset = extraFieldOffset + fileEntry.extraFieldLength; - const versionMadeBy = getUint16(directoryView, offset + 4); - const msDosCompatible = (versionMadeBy & 0) == 0; - const rawFilename = directoryArray.subarray(filenameOffset, extraFieldOffset); - const commentLength = getUint16(directoryView, offset + 32); - const endOffset = commentOffset + commentLength; - const rawComment = directoryArray.subarray(commentOffset, endOffset); - const filenameUTF8 = languageEncodingFlag; - const commentUTF8 = languageEncodingFlag; - const directory = msDosCompatible && ((getUint8(directoryView, offset + 38) & FILE_ATTR_MSDOS_DIR_MASK) == FILE_ATTR_MSDOS_DIR_MASK); - const offsetFileEntry = getUint32(directoryView, offset + 42) + prependedDataLength; - Object.assign(fileEntry, { - versionMadeBy, - msDosCompatible, - compressedSize: 0, - uncompressedSize: 0, - commentLength, - directory, - offset: offsetFileEntry, - diskNumberStart: getUint16(directoryView, offset + 34), - internalFileAttribute: getUint16(directoryView, offset + 36), - externalFileAttribute: getUint32(directoryView, offset + 38), - rawFilename, - filenameUTF8, - commentUTF8, - rawExtraField: directoryArray.subarray(extraFieldOffset, commentOffset) - }); - const [filename, comment] = await Promise.all([ - decodeText(rawFilename, filenameUTF8 ? CHARSET_UTF8 : filenameEncoding || CHARSET_CP437), - decodeText(rawComment, commentUTF8 ? CHARSET_UTF8 : commentEncoding || CHARSET_CP437) - ]); - Object.assign(fileEntry, { - rawComment, - filename, - comment, - directory: directory || filename.endsWith(DIRECTORY_SIGNATURE) - }); - startOffset = Math.max(offsetFileEntry, startOffset); - await readCommonFooter(fileEntry, fileEntry, directoryView, offset + 6); - const entry = new Entry(fileEntry); - entry.getData = (writer, options) => fileEntry.getData(writer, entry, options); - offset = endOffset; - const { onprogress } = options; - if (onprogress) { - try { - await onprogress(indexFile + 1, filesLength, new Entry(fileEntry)); - } catch (_error) { - // ignored - } - } - yield entry; - } - const extractPrependedData = getOptionValue(zipReader, options, "extractPrependedData"); - const extractAppendedData = getOptionValue(zipReader, options, "extractAppendedData"); - if (extractPrependedData) { - zipReader.prependedData = startOffset > 0 ? await readUint8Array(reader, 0, startOffset) : new Uint8Array(); - } - zipReader.comment = commentLength ? await readUint8Array(reader, commentOffset + END_OF_CENTRAL_DIR_LENGTH, commentLength) : new Uint8Array(); - if (extractAppendedData) { - zipReader.appendedData = appendedDataOffset < reader.size ? await readUint8Array(reader, appendedDataOffset, reader.size - appendedDataOffset) : new Uint8Array(); - } - return true; - } - - async getEntries(options = {}) { - const entries = []; - for await (const entry of this.getEntriesGenerator(options)) { - entries.push(entry); - } - return entries; - } - - async close() { - } -} - -class ZipEntry { - - constructor(reader, config, options) { - Object.assign(this, { - reader, - config, - options - }); - } - - async getData(writer, fileEntry, options = {}) { - const zipEntry = this; - const { - reader, - offset, - diskNumberStart, - extraFieldAES, - compressionMethod, - config, - bitFlag, - signature, - rawLastModDate, - uncompressedSize, - compressedSize - } = zipEntry; - const localDirectory = zipEntry.localDirectory = {}; - const dataArray = await readUint8Array(reader, offset, 30, diskNumberStart); - const dataView = getDataView(dataArray); - let password = getOptionValue(zipEntry, options, "password"); - password = password && password.length && password; - if (extraFieldAES) { - if (extraFieldAES.originalCompressionMethod != COMPRESSION_METHOD_AES) { - throw new Error(ERR_UNSUPPORTED_COMPRESSION); - } - } - if (compressionMethod != COMPRESSION_METHOD_STORE && compressionMethod != COMPRESSION_METHOD_DEFLATE) { - throw new Error(ERR_UNSUPPORTED_COMPRESSION); - } - if (getUint32(dataView, 0) != LOCAL_FILE_HEADER_SIGNATURE) { - throw new Error(ERR_LOCAL_FILE_HEADER_NOT_FOUND); - } - readCommonHeader(localDirectory, dataView, 4); - localDirectory.rawExtraField = localDirectory.extraFieldLength ? - await readUint8Array(reader, offset + 30 + localDirectory.filenameLength, localDirectory.extraFieldLength, diskNumberStart) : - new Uint8Array(); - await readCommonFooter(zipEntry, localDirectory, dataView, 4); - Object.assign(fileEntry, { - lastAccessDate: localDirectory.lastAccessDate, - creationDate: localDirectory.creationDate - }); - const encrypted = zipEntry.encrypted && localDirectory.encrypted; - const zipCrypto = encrypted && !extraFieldAES; - if (encrypted) { - if (!zipCrypto && extraFieldAES.strength === UNDEFINED_VALUE) { - throw new Error(ERR_UNSUPPORTED_ENCRYPTION); - } else if (!password) { - throw new Error(ERR_ENCRYPTED); - } - } - const dataOffset = offset + 30 + localDirectory.filenameLength + localDirectory.extraFieldLength; - const readable = reader.readable; - readable.diskNumberStart = diskNumberStart; - readable.offset = dataOffset; - let size = readable.size = compressedSize; - const signal = getOptionValue(zipEntry, options, "signal"); - const checkPasswordOnly = getOptionValue(zipEntry, options, "checkPasswordOnly"); - if (checkPasswordOnly) { - writer = new WritableStream(); - } - writer = initWriter(writer); - await initStream(writer, uncompressedSize); - const { writable } = writer; - const { onstart, onprogress, onend } = options; - const workerOptions = { - options: { - codecType: CODEC_INFLATE, - password, - zipCrypto, - encryptionStrength: extraFieldAES && extraFieldAES.strength, - signed: getOptionValue(zipEntry, options, "checkSignature"), - passwordVerification: zipCrypto && (bitFlag.dataDescriptor ? ((rawLastModDate >>> 8) & 0xFF) : ((signature >>> 24) & 0xFF)), - signature, - compressed: compressionMethod != 0, - encrypted, - useWebWorkers: getOptionValue(zipEntry, options, "useWebWorkers"), - useCompressionStream: getOptionValue(zipEntry, options, "useCompressionStream"), - transferStreams: getOptionValue(zipEntry, options, "transferStreams"), - checkPasswordOnly - }, - config, - streamOptions: { signal, size, onstart, onprogress, onend } - }; - let outputSize = 0; - try { - ({ outputSize } = (await runWorker({ readable, writable }, workerOptions))); - } catch (error) { - if (!checkPasswordOnly || error.message != ERR_ABORT_CHECK_PASSWORD) { - throw error; - } - } finally { - const preventClose = getOptionValue(zipEntry, options, "preventClose"); - writable.size += outputSize; - if (!preventClose && !writable.locked) { - await writable.close(); - } - } - return checkPasswordOnly ? undefined : writer.getData ? writer.getData() : writable; - } -} - -function readCommonHeader(directory, dataView, offset) { - const rawBitFlag = directory.rawBitFlag = getUint16(dataView, offset + 2); - const encrypted = (rawBitFlag & BITFLAG_ENCRYPTED) == BITFLAG_ENCRYPTED; - const rawLastModDate = getUint32(dataView, offset + 6); - Object.assign(directory, { - encrypted, - version: getUint16(dataView, offset), - bitFlag: { - level: (rawBitFlag & BITFLAG_LEVEL) >> 1, - dataDescriptor: (rawBitFlag & BITFLAG_DATA_DESCRIPTOR) == BITFLAG_DATA_DESCRIPTOR, - languageEncodingFlag: (rawBitFlag & BITFLAG_LANG_ENCODING_FLAG) == BITFLAG_LANG_ENCODING_FLAG - }, - rawLastModDate, - lastModDate: getDate(rawLastModDate), - filenameLength: getUint16(dataView, offset + 22), - extraFieldLength: getUint16(dataView, offset + 24) - }); -} - -async function readCommonFooter(fileEntry, directory, dataView, offset) { - const { rawExtraField } = directory; - const extraField = directory.extraField = new Map(); - const rawExtraFieldView = getDataView(new Uint8Array(rawExtraField)); - let offsetExtraField = 0; - try { - while (offsetExtraField < rawExtraField.length) { - const type = getUint16(rawExtraFieldView, offsetExtraField); - const size = getUint16(rawExtraFieldView, offsetExtraField + 2); - extraField.set(type, { - type, - data: rawExtraField.slice(offsetExtraField + 4, offsetExtraField + 4 + size) - }); - offsetExtraField += 4 + size; - } - } catch (_error) { - // ignored - } - const compressionMethod = getUint16(dataView, offset + 4); - Object.assign(directory, { - signature: getUint32(dataView, offset + 10), - uncompressedSize: getUint32(dataView, offset + 18), - compressedSize: getUint32(dataView, offset + 14) - }); - const extraFieldZip64 = extraField.get(EXTRAFIELD_TYPE_ZIP64); - if (extraFieldZip64) { - readExtraFieldZip64(extraFieldZip64, directory); - directory.extraFieldZip64 = extraFieldZip64; - } - const extraFieldUnicodePath = extraField.get(EXTRAFIELD_TYPE_UNICODE_PATH); - if (extraFieldUnicodePath) { - await readExtraFieldUnicode(extraFieldUnicodePath, PROPERTY_NAME_FILENAME, PROPERTY_NAME_RAW_FILENAME, directory, fileEntry); - directory.extraFieldUnicodePath = extraFieldUnicodePath; - } - const extraFieldUnicodeComment = extraField.get(EXTRAFIELD_TYPE_UNICODE_COMMENT); - if (extraFieldUnicodeComment) { - await readExtraFieldUnicode(extraFieldUnicodeComment, PROPERTY_NAME_COMMENT, PROPERTY_NAME_RAW_COMMENT, directory, fileEntry); - directory.extraFieldUnicodeComment = extraFieldUnicodeComment; - } - const extraFieldAES = extraField.get(EXTRAFIELD_TYPE_AES); - if (extraFieldAES) { - readExtraFieldAES(extraFieldAES, directory, compressionMethod); - directory.extraFieldAES = extraFieldAES; - } else { - directory.compressionMethod = compressionMethod; - } - const extraFieldNTFS = extraField.get(EXTRAFIELD_TYPE_NTFS); - if (extraFieldNTFS) { - readExtraFieldNTFS(extraFieldNTFS, directory); - directory.extraFieldNTFS = extraFieldNTFS; - } - const extraFieldExtendedTimestamp = extraField.get(EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP); - if (extraFieldExtendedTimestamp) { - readExtraFieldExtendedTimestamp(extraFieldExtendedTimestamp, directory); - directory.extraFieldExtendedTimestamp = extraFieldExtendedTimestamp; - } -} - -function readExtraFieldZip64(extraFieldZip64, directory) { - directory.zip64 = true; - const extraFieldView = getDataView(extraFieldZip64.data); - const missingProperties = ZIP64_PROPERTIES.filter(([propertyName, max]) => directory[propertyName] == max); - for (let indexMissingProperty = 0, offset = 0; indexMissingProperty < missingProperties.length; indexMissingProperty++) { - const [propertyName, max] = missingProperties[indexMissingProperty]; - if (directory[propertyName] == max) { - const extraction = ZIP64_EXTRACTION[max]; - directory[propertyName] = extraFieldZip64[propertyName] = extraction.getValue(extraFieldView, offset); - offset += extraction.bytes; - } else if (extraFieldZip64[propertyName]) { - throw new Error(ERR_EXTRAFIELD_ZIP64_NOT_FOUND); - } - } -} - -async function readExtraFieldUnicode(extraFieldUnicode, propertyName, rawPropertyName, directory, fileEntry) { - const extraFieldView = getDataView(extraFieldUnicode.data); - const crc32 = new Crc32(); - crc32.append(fileEntry[rawPropertyName]); - const dataViewSignature = getDataView(new Uint8Array(4)); - dataViewSignature.setUint32(0, crc32.get(), true); - Object.assign(extraFieldUnicode, { - version: getUint8(extraFieldView, 0), - signature: getUint32(extraFieldView, 1), - [propertyName]: await decodeText(extraFieldUnicode.data.subarray(5)), - valid: !fileEntry.bitFlag.languageEncodingFlag && extraFieldUnicode.signature == getUint32(dataViewSignature, 0) - }); - if (extraFieldUnicode.valid) { - directory[propertyName] = extraFieldUnicode[propertyName]; - directory[propertyName + "UTF8"] = true; - } -} - -function readExtraFieldAES(extraFieldAES, directory, compressionMethod) { - const extraFieldView = getDataView(extraFieldAES.data); - const strength = getUint8(extraFieldView, 4); - Object.assign(extraFieldAES, { - vendorVersion: getUint8(extraFieldView, 0), - vendorId: getUint8(extraFieldView, 2), - strength, - originalCompressionMethod: compressionMethod, - compressionMethod: getUint16(extraFieldView, 5) - }); - directory.compressionMethod = extraFieldAES.compressionMethod; -} - -function readExtraFieldNTFS(extraFieldNTFS, directory) { - const extraFieldView = getDataView(extraFieldNTFS.data); - let offsetExtraField = 4; - let tag1Data; - try { - while (offsetExtraField < extraFieldNTFS.data.length && !tag1Data) { - const tagValue = getUint16(extraFieldView, offsetExtraField); - const attributeSize = getUint16(extraFieldView, offsetExtraField + 2); - if (tagValue == EXTRAFIELD_TYPE_NTFS_TAG1) { - tag1Data = extraFieldNTFS.data.slice(offsetExtraField + 4, offsetExtraField + 4 + attributeSize); - } - offsetExtraField += 4 + attributeSize; - } - } catch (_error) { - // ignored - } - try { - if (tag1Data && tag1Data.length == 24) { - const tag1View = getDataView(tag1Data); - const rawLastModDate = tag1View.getBigUint64(0, true); - const rawLastAccessDate = tag1View.getBigUint64(8, true); - const rawCreationDate = tag1View.getBigUint64(16, true); - Object.assign(extraFieldNTFS, { - rawLastModDate, - rawLastAccessDate, - rawCreationDate - }); - const lastModDate = getDateNTFS(rawLastModDate); - const lastAccessDate = getDateNTFS(rawLastAccessDate); - const creationDate = getDateNTFS(rawCreationDate); - const extraFieldData = { lastModDate, lastAccessDate, creationDate }; - Object.assign(extraFieldNTFS, extraFieldData); - Object.assign(directory, extraFieldData); - } - } catch (_error) { - // ignored - } -} - -function readExtraFieldExtendedTimestamp(extraFieldExtendedTimestamp, directory) { - const extraFieldView = getDataView(extraFieldExtendedTimestamp.data); - const flags = getUint8(extraFieldView, 0); - const timeProperties = []; - const timeRawProperties = []; - if ((flags & 0x1) == 0x1) { - timeProperties.push(PROPERTY_NAME_LAST_MODIFICATION_DATE); - timeRawProperties.push(PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE); - } - if ((flags & 0x2) == 0x2) { - timeProperties.push(PROPERTY_NAME_LAST_ACCESS_DATE); - timeRawProperties.push(PROPERTY_NAME_RAW_LAST_ACCESS_DATE); - } - if ((flags & 0x4) == 0x4) { - timeProperties.push(PROPERTY_NAME_CREATION_DATE); - timeRawProperties.push(PROPERTY_NAME_RAW_CREATION_DATE); - } - let offset = 1; - timeProperties.forEach((propertyName, indexProperty) => { - if (extraFieldExtendedTimestamp.data.length >= offset + 4) { - const time = getUint32(extraFieldView, offset); - directory[propertyName] = extraFieldExtendedTimestamp[propertyName] = new Date(time * 1000); - const rawPropertyName = timeRawProperties[indexProperty]; - extraFieldExtendedTimestamp[rawPropertyName] = time; - } - offset += 4; - }); -} - -async function seekSignature(reader, signature, startOffset, minimumBytes, maximumLength) { - const signatureArray = new Uint8Array(4); - const signatureView = getDataView(signatureArray); - setUint32(signatureView, 0, signature); - const maximumBytes = minimumBytes + maximumLength; - return (await seek(minimumBytes)) || await seek(Math.min(maximumBytes, startOffset)); - - async function seek(length) { - const offset = startOffset - length; - const bytes = await readUint8Array(reader, offset, length); - for (let indexByte = bytes.length - minimumBytes; indexByte >= 0; indexByte--) { - if (bytes[indexByte] == signatureArray[0] && bytes[indexByte + 1] == signatureArray[1] && - bytes[indexByte + 2] == signatureArray[2] && bytes[indexByte + 3] == signatureArray[3]) { - return { - offset: offset + indexByte, - buffer: bytes.slice(indexByte, indexByte + minimumBytes).buffer - }; - } - } - } -} - -function getOptionValue(zipReader, options, name) { - return options[name] === UNDEFINED_VALUE ? zipReader.options[name] : options[name]; -} - -function getDate(timeRaw) { - const date = (timeRaw & 0xffff0000) >> 16, time = timeRaw & 0x0000ffff; - try { - return new Date(1980 + ((date & 0xFE00) >> 9), ((date & 0x01E0) >> 5) - 1, date & 0x001F, (time & 0xF800) >> 11, (time & 0x07E0) >> 5, (time & 0x001F) * 2, 0); - } catch (_error) { - // ignored - } -} - -function getDateNTFS(timeRaw) { - return new Date((Number((timeRaw / BigInt(10000)) - BigInt(11644473600000)))); -} - -function getUint8(view, offset) { - return view.getUint8(offset); -} - -function getUint16(view, offset) { - return view.getUint16(offset, true); -} - -function getUint32(view, offset) { - return view.getUint32(offset, true); -} - -function getBigUint64(view, offset) { - return Number(view.getBigUint64(offset, true)); -} - -function setUint32(view, offset, value) { - view.setUint32(offset, value, true); -} - -function getDataView(array) { - return new DataView(array.buffer); -} - -/* - Copyright (c) 2022 Gildas Lormeau. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the distribution. - - 3. The names of the authors may not be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT, - INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, - INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, - OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -let baseURL; -try { - baseURL = (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (document.currentScript && document.currentScript.src || new URL('fastboot.cjs', document.baseURI).href)); -} catch (_error) { - // ignored -} -configure({ baseURL }); -e(configure); - -/// - -configure({ Deflate: ZipDeflate, Inflate: ZipInflate }); - -function parseIndex(index, size) { - return index < 0 ? - Math.max(index + size, 0) : - Math.min(index, size); -} -class BlobEntryReaderImpl extends Reader { - constructor(blob, entryMetadata) { - super(blob); - this.blob = blob; - this.offset = entryMetadata.offset + entryMetadata.headerSize; - this.size = entryMetadata.compressedSize; - } - async readUint8Array(index, length) { - const start = parseIndex(index, this.size) + this.offset; - const end = parseIndex(index + length, this.size) + this.offset; - const blob = this.blob.slice(start, end); - return new Uint8Array(await blob.arrayBuffer()); - } -} -/** - * Represents a {@link Reader} instance used to read data of an entry in a zip - * file provided as a {@link Blob}. It directly reads data if it is uncompressed. - */ -class BlobEntryReader extends Reader { - /** - * @param blob - The blob to read data from, usually the outer zip file. - * @param entry - The entry to read data of, usually the inner zip file. - * @param mimeString - The MIME type of the data. - * @param options - Represents options passed to {@link Entry#getData}. - */ - constructor(blob, entry, mimeString, options) { - super(); - this.blob = blob; - this.entry = entry; - this.mimeString = mimeString; - this.options = options; - } - async init() { - const entryMetadata = await getEntryMetadata(this.blob, this.entry); - if (entryMetadata.compressionMethod !== 0) { - const entryBlob = await zipGetData(this.entry, new BlobWriter(this.mimeString), this.options); - this.reader = new BlobReader(entryBlob); - } - else { - this.reader = new BlobEntryReaderImpl(this.blob, entryMetadata); - } - this.size = this.reader.size; - } - async readUint8Array(index, length) { - return this.reader.readUint8Array(index, length); - } -} - -// Images needed for fastbootd -const BOOT_CRITICAL_IMAGES = [ - "boot", - "dt", - "dtbo", - "init_boot", - "pvmfw", - "recovery", - "vbmeta_system", - "vbmeta_vendor", - "vbmeta", - "vendor_boot", - "vendor_kernel_boot", -]; -// Less critical images to flash after boot-critical ones -const SYSTEM_IMAGES = [ - "odm", - "odm_dlkm", - "product", - "system_dlkm", - "system_ext", - "system", - "vendor_dlkm", - "vendor", -]; -/** - * User-friendly action strings for factory image flashing progress. - * This can be indexed by the action argument in FactoryFlashCallback. - */ -const USER_ACTION_MAP = { - load: "Loading", - unpack: "Unpacking", - flash: "Writing", - wipe: "Wiping", - reboot: "Restarting", -}; -const BOOTLOADER_REBOOT_TIME = 4000; // ms -const FASTBOOTD_REBOOT_TIME = 16000; // ms -const USERDATA_ERASE_TIME = 1000; // ms -async function flashEntryBlob(device, entry, onProgress, partition) { - const blob = await zipGetData(entry, new BlobWriter("application/octet-stream"), { - onstart(total) { - logDebug(`Unpacking ${partition} (${total} bytes)`); - onProgress("unpack", partition, 0.0); - return; - }, - onprogress(progress, total) { - onProgress("unpack", partition, progress / total); - return; - } - }); - logDebug(`Flashing ${partition}`); - onProgress("flash", partition, 0.0); - await device.flashBlob(partition, blob, (progress) => { - onProgress("flash", partition, progress); - }); -} -async function tryFlashImages(device, entries, onProgress, imageNames) { - for (let imageName of imageNames) { - let pattern = new RegExp(`${imageName}(?:-.+)?\\.img$`); - let entry = entries.find((entry) => entry.filename.match(pattern)); - if (entry !== undefined) { - if (imageName == "bootloader") { - let current_slot = await device.getVariable("current-slot"); - if (current_slot == "a") { - await flashEntryBlob(device, entry, onProgress, (imageName + "_b")); - await device.runCommand("set_active:b"); - } - else if (current_slot == "b") { - await flashEntryBlob(device, entry, onProgress, (imageName + "_a")); - await device.runCommand("set_active:a"); - } - else { - throw new FastbootError("FAIL", `Invalid slot given by bootloader.`); - } - } - else { - await flashEntryBlob(device, entry, onProgress, imageName); - } - } - } -} -async function checkRequirements(device, androidInfo) { - // Deal with CRLF just in case - for (let line of androidInfo.replace("\r", "").split("\n")) { - let match = line.match(/^require\s+(.+?)=(.+)$/); - if (!match) { - continue; - } - let variable = match[1]; - // Historical mismatch that we still need to deal with - if (variable === "board") { - variable = "product"; - } - let expectValue = match[2]; - let expectValues = expectValue.split("|"); - // Special case: not a real variable at all - if (variable === "partition-exists") { - // Check whether the partition exists on the device: - // has-slot = undefined || FAIL => doesn't exist - // has-slot = yes || no => exists - let hasSlot = await device.getVariable(`has-slot:${expectValue}`); - if (hasSlot !== "yes" && hasSlot !== "no") { - throw new FastbootError("FAIL", `Requirement ${variable}=${expectValue} failed, device lacks partition`); - } - // Check whether we recognize the partition - if (!BOOT_CRITICAL_IMAGES.includes(expectValue) && - !SYSTEM_IMAGES.includes(expectValue)) { - throw new FastbootError("FAIL", `Requirement ${variable}=${expectValue} failed, unrecognized partition`); - } - } - else { - let realValue = await device.getVariable(variable); - if (expectValues.includes(realValue)) { - logDebug(`Requirement ${variable}=${expectValue} passed`); - } - else { - let msg = `Requirement ${variable}=${expectValue} failed, value = ${realValue}`; - logDebug(msg); - throw new FastbootError("FAIL", msg); - } - } - } -} -async function tryReboot(device, target, onReconnect) { - try { - await device.reboot(target, false); - } - catch (e) { - /* Failed = device rebooted by itself */ - } - await device.waitForConnect(onReconnect); -} -async function flashZip(device, blob, wipe, onReconnect, onProgress = (_action, _item, _progress) => { }) { - onProgress("load", "package", 0.0); - let reader = new ZipReader(new BlobReader(blob)); - let entries = await reader.getEntries(); - // Bootloader and radio packs can only be flashed in the bare-metal bootloader - if ((await device.getVariable("is-userspace")) === "yes") { - await device.reboot("bootloader", true, onReconnect); - } - // 1. Bootloader pack (repeated for slot A and B) - await tryFlashImages(device, entries, onProgress, ["bootloader"]); - await runWithTimedProgress(onProgress, "reboot", "device", BOOTLOADER_REBOOT_TIME, tryReboot(device, "bootloader", onReconnect)); - await tryFlashImages(device, entries, onProgress, ["bootloader"]); - await runWithTimedProgress(onProgress, "reboot", "device", BOOTLOADER_REBOOT_TIME, tryReboot(device, "bootloader", onReconnect)); - // 2. Radio pack - await tryFlashImages(device, entries, onProgress, ["radio"]); - await runWithTimedProgress(onProgress, "reboot", "device", BOOTLOADER_REBOOT_TIME, tryReboot(device, "bootloader", onReconnect)); - // Cancel snapshot update if in progress - let snapshotStatus = await device.getVariable("snapshot-update-status"); - if (snapshotStatus !== null && snapshotStatus !== "none") { - await device.runCommand("snapshot-update:cancel"); - } - // Load nested images for the following steps - let entry = entries.find((e) => e.filename.match(/image-.+\.zip$/)); - const imageReader = new ZipReader(new BlobEntryReader(blob, entry, "application/zip", { - onstart(total) { - logDebug(`Loading nested images from zip (${total} bytes)`); - onProgress("unpack", "images", 0.0); - return; - }, - onprogress(progress, total) { - onProgress("unpack", "images", progress / total); - return; - } - })); - const imageEntries = await imageReader.getEntries(); - // 3. Check requirements - entry = imageEntries.find((e) => e.filename === "android-info.txt"); - if (entry !== undefined) { - const reqText = await zipGetData(entry, new TextWriter()); - await checkRequirements(device, reqText); - } - // 4. Boot-critical images - await tryFlashImages(device, imageEntries, onProgress, BOOT_CRITICAL_IMAGES); - // 5. Super partition template - // This is also where we reboot to fastbootd. - entry = imageEntries.find((e) => e.filename === "super_empty.img"); - if (entry !== undefined) { - await runWithTimedProgress(onProgress, "reboot", "device", FASTBOOTD_REBOOT_TIME, device.reboot("fastboot", true, onReconnect)); - let superName = await device.getVariable("super-partition-name"); - if (!superName) { - superName = "super"; - } - let superAction = wipe ? "wipe" : "flash"; - onProgress(superAction, "super", 0.0); - const superBlob = await zipGetData(entry, new BlobWriter("application/octet-stream")); - await device.upload(superName, await readBlobAsBuffer(superBlob), (progress) => { - onProgress(superAction, "super", progress); - }); - await device.runCommand(`update-super:${superName}${wipe ? ":wipe" : ""}`); - } - // 6. Remaining system images - await tryFlashImages(device, imageEntries, onProgress, SYSTEM_IMAGES); - // We unconditionally reboot back to the bootloader here if we're in fastbootd, - // even when there's no custom AVB key, because common follow-up actions like - // locking the bootloader and wiping data need to be done in the bootloader. - if ((await device.getVariable("is-userspace")) === "yes") { - await runWithTimedProgress(onProgress, "reboot", "device", BOOTLOADER_REBOOT_TIME, device.reboot("bootloader", true, onReconnect)); - } - // 7. Custom AVB key - entry = entries.find((e) => e.filename.endsWith("avb_pkmd.bin")); - if (entry !== undefined) { - await device.runCommand("erase:avb_custom_key"); - await flashEntryBlob(device, entry, onProgress, "avb_custom_key"); - } - // 8. Wipe userdata - if (wipe) { - await runWithTimedProgress(onProgress, "wipe", "data", USERDATA_ERASE_TIME, device.runCommand("erase:userdata")); - } -} - -const FASTBOOT_USB_CLASS = 0xff; -const FASTBOOT_USB_SUBCLASS = 0x42; -const FASTBOOT_USB_PROTOCOL = 0x03; -const BULK_TRANSFER_SIZE = 16384; -const DEFAULT_DOWNLOAD_SIZE = 512 * 1024 * 1024; // 512 MiB -// To conserve RAM and work around Chromium's ~2 GiB size limit, we limit the -// max download size even if the bootloader can accept more data. -const MAX_DOWNLOAD_SIZE = 1024 * 1024 * 1024; // 1 GiB -const GETVAR_TIMEOUT = 10000; // ms -/** - * Exception class for USB errors not directly thrown by WebUSB. - */ -class UsbError extends Error { - constructor(message) { - super(message); - this.name = "UsbError"; - } -} -/** - * Exception class for errors returned by the bootloader, as well as high-level - * fastboot errors resulting from bootloader responses. - */ -class FastbootError extends Error { - constructor(status, message) { - super(`Bootloader replied with ${status}: ${message}`); - this.status = status; - this.bootloaderMessage = message; - this.name = "FastbootError"; - } -} -/** - * This class is a client for executing fastboot commands and operations on a - * device connected over USB. - */ -class FastbootDevice { - /** - * Create a new fastboot device instance. This doesn't actually connect to - * any USB devices; call {@link connect} to do so. - */ - constructor() { - this.device = null; - this.epIn = null; - this.epOut = null; - this._registeredUsbListeners = false; - this._connectResolve = null; - this._connectReject = null; - this._disconnectResolve = null; - } - /** - * Returns whether a USB device is connected and ready for use. - */ - get isConnected() { - return (this.device !== null && - this.device.opened && - this.device.configurations[0].interfaces[0].claimed); - } - /** - * Validate the current USB device's details and connect to it. - * - * @private - */ - async _validateAndConnectDevice() { - if (this.device === null) { - throw new UsbError("Attempted to connect to null device"); - } - // Validate device - let ife = this.device.configurations[0].interfaces[0].alternates[0]; - if (ife.endpoints.length !== 2) { - throw new UsbError("Interface has wrong number of endpoints"); - } - this.epIn = null; - this.epOut = null; - for (let endpoint of ife.endpoints) { - logVerbose("Checking endpoint:", endpoint); - if (endpoint.type !== "bulk") { - throw new UsbError("Interface endpoint is not bulk"); - } - if (endpoint.direction === "in") { - if (this.epIn === null) { - this.epIn = endpoint.endpointNumber; - } - else { - throw new UsbError("Interface has multiple IN endpoints"); - } - } - else if (endpoint.direction === "out") { - if (this.epOut === null) { - this.epOut = endpoint.endpointNumber; - } - else { - throw new UsbError("Interface has multiple OUT endpoints"); - } - } - } - logVerbose("Endpoints: in =", this.epIn, ", out =", this.epOut); - try { - await this.device.open(); - // Opportunistically reset to fix issues on some platforms - try { - await this.device.reset(); - } - catch (error) { - /* Failed = doesn't support reset */ - } - await this.device.selectConfiguration(1); - await this.device.claimInterface(0); // fastboot - } - catch (error) { - // Propagate exception from waitForConnect() - if (this._connectReject !== null) { - this._connectReject(error); - this._connectResolve = null; - this._connectReject = null; - } - throw error; - } - // Return from waitForConnect() - if (this._connectResolve !== null) { - this._connectResolve(undefined); - this._connectResolve = null; - this._connectReject = null; - } - } - /** - * Wait for the current USB device to disconnect, if it's still connected. - * Returns immediately if no device is connected. - */ - async waitForDisconnect() { - if (this.device === null) { - return; - } - return await new Promise((resolve, _reject) => { - this._disconnectResolve = resolve; - }); - } - /** - * Wait for the USB device to connect. Returns at the next connection, - * regardless of whether the connected USB device matches the previous one. - * - * @param {ReconnectCallback} onReconnect - Callback to request device reconnection on Android. - */ - async waitForConnect(onReconnect = () => { }) { - // On Android, we need to request the user to reconnect the device manually - // because there is no support for automatic reconnection. - if (navigator.userAgent.includes("Android")) { - await this.waitForDisconnect(); - onReconnect(); - } - return await new Promise((resolve, reject) => { - this._connectResolve = resolve; - this._connectReject = reject; - }); - } - /** - * Request the user to select a USB device and connect to it using the - * fastboot protocol. - * - * @throws {UsbError} - */ - async connect() { - let devices = await navigator.usb.getDevices(); - logDebug("Found paired USB devices:", devices); - if (devices.length === 1) { - this.device = devices[0]; - } - else { - // If multiple paired devices are connected, request the user to - // select a specific one to reduce ambiguity. This is also necessary - // if no devices are already paired, i.e. first use. - logDebug("No or multiple paired devices are connected, requesting one"); - this.device = await navigator.usb.requestDevice({ - filters: [ - { - classCode: FASTBOOT_USB_CLASS, - subclassCode: FASTBOOT_USB_SUBCLASS, - protocolCode: FASTBOOT_USB_PROTOCOL, - }, - ], - }); - } - logDebug("Using USB device:", this.device); - if (!this._registeredUsbListeners) { - navigator.usb.addEventListener("disconnect", (event) => { - if (event.device === this.device) { - logDebug("USB device disconnected"); - if (this._disconnectResolve !== null) { - this._disconnectResolve(undefined); - this._disconnectResolve = null; - } - } - }); - navigator.usb.addEventListener("connect", async (event) => { - logDebug("USB device connected"); - this.device = event.device; - // Check whether waitForConnect() is pending and save it for later - let hasPromiseReject = this._connectReject !== null; - try { - await this._validateAndConnectDevice(); - } - catch (error) { - // Only rethrow errors from the event handler if waitForConnect() - // didn't already handle them - if (!hasPromiseReject) { - throw error; - } - } - }); - this._registeredUsbListeners = true; - } - await this._validateAndConnectDevice(); - } - /** - * Read a raw command response from the bootloader. - * - * @private - * @returns {Promise} Object containing response text and data size, if any. - * @throws {FastbootError} - */ - async _readResponse() { - let respData = { - text: "", - }; - let respStatus; - do { - let respPacket = await this.device.transferIn(this.epIn, 64); - let response = new TextDecoder().decode(respPacket.data); - respStatus = response.substring(0, 4); - let respMessage = response.substring(4); - logDebug(`Response: ${respStatus} ${respMessage}`); - if (respStatus === "OKAY") { - // OKAY = end of response for this command - respData.text += respMessage; - } - else if (respStatus === "INFO") { - // INFO = additional info line - respData.text += respMessage + "\n"; - } - else if (respStatus === "DATA") { - // DATA = hex string, but it's returned separately for safety - respData.dataSize = respMessage; - } - else { - // Assume FAIL or garbage data - throw new FastbootError(respStatus, respMessage); - } - // INFO = more packets are coming - } while (respStatus === "INFO"); - return respData; - } - /** - * Send a textual command to the bootloader and read the response. - * This is in raw fastboot format, not AOSP fastboot syntax. - * - * @param {string} command - The command to send. - * @returns {Promise} Object containing response text and data size, if any. - * @throws {FastbootError} - */ - async runCommand(command) { - // Command and response length is always 64 bytes regardless of protocol - if (command.length > 64) { - throw new RangeError(); - } - // Send raw UTF-8 command - let cmdPacket = new TextEncoder().encode(command); - await this.device.transferOut(this.epOut, cmdPacket); - logDebug("Command:", command); - return this._readResponse(); - } - /** - * Read the value of a bootloader variable. Returns undefined if the variable - * does not exist. - * - * @param {string} varName - The name of the variable to get. - * @returns {Promise} Textual content of the variable. - * @throws {FastbootError} - */ - async getVariable(varName) { - let resp; - try { - resp = (await runWithTimeout(this.runCommand(`getvar:${varName}`), GETVAR_TIMEOUT)).text; - } - catch (error) { - // Some bootloaders return FAIL instead of empty responses, despite - // what the spec says. Normalize it here. - if (error instanceof FastbootError && error.status == "FAIL") { - resp = null; - } - else { - throw error; - } - } - // Some bootloaders send whitespace around some variables. - // According to the spec, non-existent variables should return empty - // responses - return resp ? resp.trim() : null; - } - /** - * Get the maximum download size for a single payload, in bytes. - * - * @private - * @returns {Promise} - * @throws {FastbootError} - */ - async _getDownloadSize() { - try { - let resp = (await this.getVariable("max-download-size")).toLowerCase(); - if (resp) { - // AOSP fastboot requires hex - return Math.min(parseInt(resp, 16), MAX_DOWNLOAD_SIZE); - } - } - catch (error) { - /* Failed = no value, fallthrough */ - } - // FAIL or empty variable means no max, set a reasonable limit to conserve memory - return DEFAULT_DOWNLOAD_SIZE; - } - /** - * Send a raw data payload to the bootloader. - * - * @private - */ - async _sendRawPayload(buffer, onProgress) { - let i = 0; - let remainingBytes = buffer.byteLength; - while (remainingBytes > 0) { - let chunk = buffer.slice(i * BULK_TRANSFER_SIZE, (i + 1) * BULK_TRANSFER_SIZE); - if (i % 1000 === 0) { - logVerbose(` Sending ${chunk.byteLength} bytes to endpoint, ${remainingBytes} remaining, i=${i}`); - } - if (i % 10 === 0) { - onProgress((buffer.byteLength - remainingBytes) / buffer.byteLength); - } - await this.device.transferOut(this.epOut, chunk); - remainingBytes -= chunk.byteLength; - i += 1; - } - onProgress(1.0); - } - /** - * Upload a payload to the bootloader for later use, e.g. flashing. - * Does not handle raw images, flashing, or splitting. - * - * @param {string} partition - Name of the partition the payload is intended for. - * @param {ArrayBuffer} buffer - Buffer containing the data to upload. - * @param {FlashProgressCallback} onProgress - Callback for upload progress updates. - * @throws {FastbootError} - */ - async upload(partition, buffer, onProgress = (_progress) => { }) { - logDebug(`Uploading single sparse to ${partition}: ${buffer.byteLength} bytes`); - // Bootloader requires an 8-digit hex number - let xferHex = buffer.byteLength.toString(16).padStart(8, "0"); - if (xferHex.length !== 8) { - throw new FastbootError("FAIL", `Transfer size overflow: ${xferHex} is more than 8 digits`); - } - // Check with the device and make sure size matches - let downloadResp = await this.runCommand(`download:${xferHex}`); - if (downloadResp.dataSize === undefined) { - throw new FastbootError("FAIL", `Unexpected response to download command: ${downloadResp.text}`); - } - let downloadSize = parseInt(downloadResp.dataSize, 16); - if (downloadSize !== buffer.byteLength) { - throw new FastbootError("FAIL", `Bootloader wants ${buffer.byteLength} bytes, requested to send ${buffer.byteLength} bytes`); - } - logDebug(`Sending payload: ${buffer.byteLength} bytes`); - await this._sendRawPayload(buffer, onProgress); - logDebug("Payload sent, waiting for response..."); - await this._readResponse(); - } - /** - * Reboot to the given target, and optionally wait for the device to - * reconnect. - * - * @param {string} target - Where to reboot to, i.e. fastboot or bootloader. - * @param {boolean} wait - Whether to wait for the device to reconnect. - * @param {ReconnectCallback} onReconnect - Callback to request device reconnection, if wait is enabled. - */ - async reboot(target = "", wait = false, onReconnect = () => { }) { - if (target.length > 0) { - await this.runCommand(`reboot-${target}`); - } - else { - await this.runCommand("reboot"); - } - if (wait) { - await this.waitForConnect(onReconnect); - } - } - /** - * Flash the given Blob to the given partition on the device. Any image - * format supported by the bootloader is allowed, e.g. sparse or raw images. - * Large raw images will be converted to sparse images automatically, and - * large sparse images will be split and flashed in multiple passes - * depending on the bootloader's payload size limit. - * - * @param {string} partition - The name of the partition to flash. - * @param {Blob} blob - The Blob to retrieve data from. - * @param {FlashProgressCallback} onProgress - Callback for flashing progress updates. - * @throws {FastbootError} - */ - async flashBlob(partition, blob, onProgress = (_progress) => { }) { - // Use current slot if partition is A/B - if ((await this.getVariable(`has-slot:${partition}`)) === "yes") { - partition += "_" + (await this.getVariable("current-slot")); - } - let maxDlSize = await this._getDownloadSize(); - let fileHeader = await readBlobAsBuffer(blob.slice(0, FILE_HEADER_SIZE)); - let totalBytes = blob.size; - let isSparse = false; - try { - let sparseHeader = parseFileHeader(fileHeader); - if (sparseHeader !== null) { - totalBytes = sparseHeader.blocks * sparseHeader.blockSize; - isSparse = true; - } - } - catch (error) { - // ImageError = invalid, so keep blob.size - } - // Logical partitions need to be resized before flashing because they're - // sized perfectly to the payload. - if ((await this.getVariable(`is-logical:${partition}`)) === "yes") { - // As per AOSP fastboot, we reset the partition to 0 bytes first - // to optimize extent allocation. - await this.runCommand(`resize-logical-partition:${partition}:0`); - // Set the actual size - await this.runCommand(`resize-logical-partition:${partition}:${totalBytes}`); - } - // Convert image to sparse (for splitting) if it exceeds the size limit - if (blob.size > maxDlSize && !isSparse) { - logDebug(`${partition} image is raw, converting to sparse`); - blob = await fromRaw(blob); - } - logDebug(`Flashing ${blob.size} bytes to ${partition}, ${maxDlSize} bytes per split`); - let splits = 0; - let sentBytes = 0; - for await (let split of splitBlob(blob, maxDlSize)) { - await this.upload(partition, split.data, (progress) => { - onProgress((sentBytes + progress * split.bytes) / totalBytes); - }); - logDebug("Flashing payload..."); - await this.runCommand(`flash:${partition}`); - splits += 1; - sentBytes += split.bytes; - } - logDebug(`Flashed ${partition} with ${splits} split(s)`); - } - /** - * Boot the given Blob on the device. - * Equivalent to `fastboot boot boot.img`. - * - * @param {Blob} blob - The Blob to retrieve data from. - * @param {FlashProgressCallback} onProgress - Callback for flashing progress updates. - * @throws {FastbootError} - */ - async bootBlob(blob, onProgress = (_progress) => { }) { - logDebug(`Booting ${blob.size} bytes image`); - let data = await readBlobAsBuffer(blob); - await this.upload("boot.img", data, onProgress); - logDebug("Booting payload..."); - await this.runCommand("boot"); - logDebug(`Booted ${blob.size} bytes image`); - } - /** - * Flash the given factory images zip onto the device, with automatic handling - * of firmware, system, and logical partitions as AOSP fastboot and - * flash-all.sh would do. - * Equivalent to `fastboot update name.zip`. - * - * @param {Blob} blob - Blob containing the zip file to flash. - * @param {boolean} wipe - Whether to wipe super and userdata. Equivalent to `fastboot -w`. - * @param {ReconnectCallback} onReconnect - Callback to request device reconnection. - * @param {FactoryProgressCallback} onProgress - Progress callback for image flashing. - */ - async flashFactoryZip(blob, wipe, onReconnect, onProgress = (_progress) => { }) { - return await flashZip(this, blob, wipe, onReconnect, onProgress); - } -} - -exports.FastbootDevice = FastbootDevice; -exports.FastbootError = FastbootError; -exports.TimeoutError = TimeoutError; -exports.USER_ACTION_MAP = USER_ACTION_MAP; -exports.UsbError = UsbError; -exports.configureZip = configure; -exports.setDebugLevel = setDebugLevel; -//# sourceMappingURL=fastboot.cjs.map diff --git a/dist/fastboot.cjs.map b/dist/fastboot.cjs.map deleted file mode 100644 index 6f6c6b2..0000000 --- a/dist/fastboot.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"fastboot.cjs","sources":["../src/common.ts","../src/sparse.ts","../node_modules/@zip.js/zip.js/lib/core/streams/codecs/deflate.js","../node_modules/@zip.js/zip.js/lib/core/streams/codecs/inflate.js","../node_modules/@zip.js/zip.js/lib/core/constants.js","../node_modules/@zip.js/zip.js/lib/core/streams/stream-adapter.js","../node_modules/@zip.js/zip.js/lib/core/configuration.js","../node_modules/@zip.js/zip.js/lib/core/util/mime-type.js","../node_modules/@zip.js/zip.js/lib/core/streams/codecs/crc32.js","../node_modules/@zip.js/zip.js/lib/core/streams/crc32-stream.js","../node_modules/@zip.js/zip.js/lib/core/util/encode-text.js","../node_modules/@zip.js/zip.js/lib/core/streams/codecs/sjcl.js","../node_modules/@zip.js/zip.js/lib/core/streams/common-crypto.js","../node_modules/@zip.js/zip.js/lib/core/streams/aes-crypto-stream.js","../node_modules/@zip.js/zip.js/lib/core/streams/zip-crypto-stream.js","../node_modules/@zip.js/zip.js/lib/core/streams/zip-entry-stream.js","../node_modules/@zip.js/zip.js/lib/core/streams/codec-stream.js","../node_modules/@zip.js/zip.js/lib/core/codec-worker.js","../node_modules/@zip.js/zip.js/lib/core/codec-pool.js","../node_modules/@zip.js/zip.js/lib/z-worker-inline.js","../node_modules/@zip.js/zip.js/lib/core/io.js","../node_modules/@zip.js/zip.js/lib/core/util/cp437-decode.js","../node_modules/@zip.js/zip.js/lib/core/util/decode-text.js","../node_modules/@zip.js/zip.js/lib/core/zip-entry.js","../node_modules/@zip.js/zip.js/lib/core/zip-reader.js","../node_modules/@zip.js/zip.js/lib/zip-fs.js","../node_modules/@zip.js/zip.js/index.js","../src/io.ts","../src/factory.ts","../src/fastboot.ts"],"sourcesContent":["import { FactoryProgressCallback } from \"./factory\";\nimport { Entry, EntryGetDataOptions, WritableWriter } from \"@zip.js/zip.js\";\n\nconst ZIP_ENTRY_HEADER_BEGIN_LENGTH = 30; // bytes\n\nexport enum DebugLevel {\n Silent = 0,\n Debug,\n Verbose,\n}\n\nexport interface EntryMetadata {\n offset: number;\n compressionMethod: number;\n compressedSize: number;\n uncompressedSize: number;\n headerSize: number;\n}\n\nlet debugLevel = DebugLevel.Silent;\n\nexport function logDebug(...data: any[]) {\n if (debugLevel >= 1) {\n console.log(...data);\n }\n}\n\nexport function logVerbose(...data: any[]) {\n if (debugLevel >= 2) {\n console.log(...data);\n }\n}\n\n/**\n * Change the debug level for the fastboot client:\n * - 0 = silent\n * - 1 = debug, recommended for general use\n * - 2 = verbose, for debugging only\n *\n * @param {number} level - Debug level to use.\n */\nexport function setDebugLevel(level: DebugLevel) {\n debugLevel = level;\n}\n\n/**\n * Reads all of the data in the given blob and returns it as an ArrayBuffer.\n *\n * @param {Blob} blob - Blob with the data to read.\n * @returns {Promise} ArrayBuffer containing data from the blob.\n * @ignore\n */\nexport function readBlobAsBuffer(blob: Blob): Promise {\n return new Promise((resolve, reject) => {\n let reader = new FileReader();\n reader.onload = () => {\n resolve(reader.result! as ArrayBuffer);\n };\n reader.onerror = () => {\n reject(reader.error);\n };\n\n reader.readAsArrayBuffer(blob);\n });\n}\n\nfunction waitForFrame() {\n return new Promise((resolve, _reject) => {\n window.requestAnimationFrame(resolve);\n });\n}\n\nexport async function runWithTimedProgress(\n onProgress: FactoryProgressCallback,\n action: string,\n item: string,\n duration: number,\n workPromise: Promise\n) {\n let startTime = new Date().getTime();\n let stop = false;\n\n onProgress(action, item, 0.0);\n let progressPromise = (async () => {\n let now;\n let targetTime = startTime + duration;\n\n do {\n now = new Date().getTime();\n onProgress(action, item, (now - startTime) / duration);\n await waitForFrame();\n } while (!stop && now < targetTime);\n })();\n\n await Promise.race([progressPromise, workPromise]);\n stop = true;\n await progressPromise;\n await workPromise;\n\n onProgress(action, item, 1.0);\n}\n\n/** Exception class for operations that exceeded their timeout duration. */\nexport class TimeoutError extends Error {\n timeout: number;\n\n constructor(timeout: number) {\n super(`Timeout of ${timeout} ms exceeded`);\n this.name = \"TimeoutError\";\n this.timeout = timeout;\n }\n}\n\nexport function runWithTimeout(\n promise: Promise,\n timeout: number\n): Promise {\n return new Promise((resolve, reject) => {\n // Set up timeout\n let timedOut = false;\n let tid = setTimeout(() => {\n // Set sentinel first to prevent race in promise resolving\n timedOut = true;\n reject(new TimeoutError(timeout));\n }, timeout);\n\n // Passthrough\n promise\n .then((val) => {\n if (!timedOut) {\n resolve(val);\n }\n })\n .catch((err) => {\n if (!timedOut) {\n reject(err);\n }\n })\n .finally(() => {\n if (!timedOut) {\n clearTimeout(tid);\n }\n });\n });\n}\n\nexport async function getEntryMetadata(\n blob: Blob,\n entry: Entry\n): Promise {\n const offset = entry.offset;\n const headerBeginRaw =\n await blob.slice(offset, offset + ZIP_ENTRY_HEADER_BEGIN_LENGTH).arrayBuffer();\n const dataView = new DataView(headerBeginRaw);\n const compressionMethod = dataView.getUint16(8, true);\n const compressedSize = dataView.getUint32(18, true);\n const uncompressedSize = dataView.getUint32(22, true);\n const fileNameLength = dataView.getUint16(26, true);\n const extraFieldLength = dataView.getUint16(28, true);\n const headerSize = ZIP_ENTRY_HEADER_BEGIN_LENGTH + fileNameLength + extraFieldLength;\n\n return {\n offset,\n compressionMethod,\n compressedSize,\n uncompressedSize,\n headerSize,\n };\n}\n\n// Wrapper for Entry#getData() that unwraps ProgressEvent errors\nexport async function zipGetData(\n entry: Entry,\n writer: WritableWriter,\n options?: EntryGetDataOptions\n): Promise {\n try {\n return await entry.getData!(writer, options);\n } catch (e) {\n if (\n e instanceof ProgressEvent &&\n e.type === \"error\" &&\n e.target !== null\n ) {\n throw (e.target as any).error;\n } else {\n throw e;\n }\n }\n}\n","import * as common from \"./common\";\n\nconst FILE_MAGIC = 0xed26ff3a;\n\nconst MAJOR_VERSION = 1;\nconst MINOR_VERSION = 0;\nexport const FILE_HEADER_SIZE = 28;\nconst CHUNK_HEADER_SIZE = 12;\n\n// AOSP libsparse uses 64 MiB chunks\nconst RAW_CHUNK_SIZE = 64 * 1024 * 1024;\n\nexport class ImageError extends Error {\n constructor(message: string) {\n super(message);\n this.name = \"ImageError\";\n }\n}\n\nexport interface SparseSplit {\n data: ArrayBuffer;\n bytes: number;\n}\n\nexport enum ChunkType {\n Raw = 0xcac1,\n Fill = 0xcac2,\n Skip = 0xcac3,\n Crc32 = 0xcac4,\n}\n\nexport interface SparseHeader {\n blockSize: number;\n blocks: number;\n chunks: number;\n crc32: number;\n}\n\nexport interface SparseChunk {\n type: ChunkType;\n /* 2: reserved, 16 bits */\n blocks: number;\n dataBytes: number;\n data: Blob | null; // to be populated by consumer\n}\n\nclass BlobBuilder {\n private blob: Blob;\n private type: string;\n\n constructor(type: string = \"\") {\n this.type = type;\n this.blob = new Blob([], { type: this.type });\n }\n\n append(blob: Blob) {\n this.blob = new Blob([this.blob, blob], { type: this.type });\n }\n\n getBlob(): Blob {\n return this.blob;\n }\n}\n\n/**\n * Returns a parsed version of the sparse image file header from the given buffer.\n *\n * @param {ArrayBuffer} buffer - Raw file header data.\n * @returns {SparseHeader} Object containing the header information.\n */\nexport function parseFileHeader(buffer: ArrayBuffer): SparseHeader | null {\n let view = new DataView(buffer);\n\n let magic = view.getUint32(0, true);\n if (magic !== FILE_MAGIC) {\n return null;\n }\n\n // v1.0+\n let major = view.getUint16(4, true);\n let minor = view.getUint16(6, true);\n if (major !== MAJOR_VERSION || minor < MINOR_VERSION) {\n throw new ImageError(\n `Unsupported sparse image version ${major}.${minor}`\n );\n }\n\n let fileHdrSize = view.getUint16(8, true);\n let chunkHdrSize = view.getUint16(10, true);\n if (\n fileHdrSize !== FILE_HEADER_SIZE ||\n chunkHdrSize !== CHUNK_HEADER_SIZE\n ) {\n throw new ImageError(\n `Invalid file header size ${fileHdrSize}, chunk header size ${chunkHdrSize}`\n );\n }\n\n let blockSize = view.getUint32(12, true);\n if (blockSize % 4 !== 0) {\n throw new ImageError(`Block size ${blockSize} is not a multiple of 4`);\n }\n\n return {\n blockSize: blockSize,\n blocks: view.getUint32(16, true),\n chunks: view.getUint32(20, true),\n crc32: view.getUint32(24, true),\n };\n}\n\nfunction parseChunkHeader(buffer: ArrayBuffer) {\n let view = new DataView(buffer);\n\n // This isn't the same as what createImage takes.\n // Further processing needs to be done on the chunks.\n return {\n type: view.getUint16(0, true),\n /* 2: reserved, 16 bits */\n blocks: view.getUint32(4, true),\n dataBytes: view.getUint32(8, true) - CHUNK_HEADER_SIZE,\n data: null, // to be populated by consumer\n } as SparseChunk;\n}\n\nfunction calcChunksBlockSize(chunks: Array) {\n return chunks\n .map((chunk) => chunk.blocks)\n .reduce((total, c) => total + c, 0);\n}\n\nfunction calcChunksDataSize(chunks: Array) {\n return chunks\n .map((chunk) => chunk.data!.size)\n .reduce((total, c) => total + c, 0);\n}\n\nfunction calcChunksSize(chunks: Array) {\n // 28-byte file header, 12-byte chunk headers\n let overhead = FILE_HEADER_SIZE + CHUNK_HEADER_SIZE * chunks.length;\n return overhead + calcChunksDataSize(chunks);\n}\n\nasync function createImage(header: SparseHeader, chunks: Array): Promise {\n let blobBuilder = new BlobBuilder();\n\n let buffer = new ArrayBuffer(FILE_HEADER_SIZE);\n let dataView = new DataView(buffer);\n let arrayView = new Uint8Array(buffer);\n\n dataView.setUint32(0, FILE_MAGIC, true);\n // v1.0\n dataView.setUint16(4, MAJOR_VERSION, true);\n dataView.setUint16(6, MINOR_VERSION, true);\n dataView.setUint16(8, FILE_HEADER_SIZE, true);\n dataView.setUint16(10, CHUNK_HEADER_SIZE, true);\n\n // Match input parameters\n dataView.setUint32(12, header.blockSize, true);\n dataView.setUint32(16, header.blocks, true);\n dataView.setUint32(20, chunks.length, true);\n\n // We don't care about the CRC. AOSP docs specify that this should be a CRC32,\n // but AOSP libsparse always sets 0 and puts the CRC in a final undocumented\n // 0xCAC4 chunk instead.\n dataView.setUint32(24, 0, true);\n\n blobBuilder.append(new Blob([buffer]));\n for (let chunk of chunks) {\n buffer = new ArrayBuffer(CHUNK_HEADER_SIZE + chunk.data!.size);\n dataView = new DataView(buffer);\n arrayView = new Uint8Array(buffer);\n\n dataView.setUint16(0, chunk.type, true);\n dataView.setUint16(2, 0, true); // reserved\n dataView.setUint32(4, chunk.blocks, true);\n dataView.setUint32(\n 8,\n CHUNK_HEADER_SIZE + chunk.data!.size,\n true\n );\n\n let chunkArrayView = new Uint8Array(await common.readBlobAsBuffer(chunk.data!));\n arrayView.set(chunkArrayView, CHUNK_HEADER_SIZE);\n blobBuilder.append(new Blob([buffer]));\n }\n\n return blobBuilder.getBlob();\n}\n\n/**\n * Creates a sparse image from buffer containing raw image data.\n *\n * @param {Blob} blob - Blob containing the raw image data.\n * @returns {Promise} Promise that resolves the blob containing the new sparse image.\n */\nexport async function fromRaw(blob: Blob): Promise {\n let header = {\n blockSize: 4096,\n blocks: blob.size / 4096,\n chunks: 1,\n crc32: 0,\n };\n\n let chunks = [];\n while (blob.size > 0) {\n let chunkSize = Math.min(blob.size, RAW_CHUNK_SIZE);\n chunks.push({\n type: ChunkType.Raw,\n blocks: chunkSize / header.blockSize,\n data: blob.slice(0, chunkSize),\n } as SparseChunk);\n blob = blob.slice(chunkSize);\n }\n\n return createImage(header, chunks);\n}\n\n/**\n * Split a sparse image into smaller sparse images within the given size.\n * This takes a Blob instead of an ArrayBuffer because it may process images\n * larger than RAM.\n *\n * @param {Blob} blob - Blob containing the sparse image to split.\n * @param {number} splitSize - Maximum size per split.\n * @yields {Object} Data of the next split image and its output size in bytes.\n */\nexport async function* splitBlob(blob: Blob, splitSize: number) {\n common.logDebug(\n `Splitting ${blob.size}-byte sparse image into ${splitSize}-byte chunks`\n );\n // Short-circuit if splitting isn't required\n if (blob.size <= splitSize) {\n common.logDebug(\"Blob fits in 1 payload, not splitting\");\n yield {\n data: await common.readBlobAsBuffer(blob),\n bytes: blob.size,\n } as SparseSplit;\n return;\n }\n\n let headerData = await common.readBlobAsBuffer(\n blob.slice(0, FILE_HEADER_SIZE)\n );\n let header = parseFileHeader(headerData);\n if (header === null) {\n throw new ImageError(\"Blob is not a sparse image\");\n }\n\n // Remove CRC32 (if present), otherwise splitting will invalidate it\n header.crc32 = 0;\n blob = blob.slice(FILE_HEADER_SIZE);\n\n let splitChunks: Array = [];\n let splitDataBytes = 0;\n for (let i = 0; i < header.chunks; i++) {\n let chunkHeaderData = await common.readBlobAsBuffer(\n blob.slice(0, CHUNK_HEADER_SIZE)\n );\n let chunk = parseChunkHeader(chunkHeaderData);\n chunk.data = blob.slice(CHUNK_HEADER_SIZE, CHUNK_HEADER_SIZE + chunk.dataBytes);\n blob = blob.slice(CHUNK_HEADER_SIZE + chunk.dataBytes);\n\n let bytesRemaining = splitSize - calcChunksSize(splitChunks);\n common.logVerbose(\n ` Chunk ${i}: type ${chunk.type}, ${chunk.dataBytes} bytes / ${chunk.blocks} blocks, ${bytesRemaining} bytes remaining`\n );\n if (bytesRemaining >= chunk.dataBytes) {\n // Read the chunk and add it\n common.logVerbose(\" Space is available, adding chunk\");\n splitChunks.push(chunk);\n // Track amount of data written on the output device, in bytes\n splitDataBytes += chunk.blocks * header.blockSize;\n } else {\n // Out of space, finish this split\n // Blocks need to be calculated from chunk headers instead of going by size\n // because FILL and SKIP chunks cover more blocks than the data they contain.\n let splitBlocks = calcChunksBlockSize(splitChunks);\n splitChunks.push({\n type: ChunkType.Skip,\n blocks: header.blocks - splitBlocks,\n data: new Blob([]),\n dataBytes: 0,\n });\n common.logVerbose(\n `Partition is ${\n header.blocks\n } blocks, used ${splitBlocks}, padded with ${\n header.blocks - splitBlocks\n }, finishing split with ${calcChunksBlockSize(\n splitChunks\n )} blocks`\n );\n let splitImage = await createImage(header, splitChunks);\n common.logDebug(\n `Finished ${splitImage.size}-byte split with ${splitChunks.length} chunks`\n );\n yield {\n data: await common.readBlobAsBuffer(splitImage),\n bytes: splitDataBytes,\n } as SparseSplit;\n\n // Start a new split. Every split is considered a full image by the\n // bootloader, so we need to skip the *total* written blocks.\n common.logVerbose(\n `Starting new split: skipping first ${splitBlocks} blocks and adding chunk`\n );\n splitChunks = [\n {\n type: ChunkType.Skip,\n blocks: splitBlocks,\n data: new Blob([]),\n dataBytes: 0,\n },\n chunk,\n ];\n splitDataBytes = 0;\n }\n }\n\n // Finish the final split if necessary\n if (\n splitChunks.length > 0 &&\n (splitChunks.length > 1 || splitChunks[0].type !== ChunkType.Skip)\n ) {\n let splitImage = await createImage(header, splitChunks);\n common.logDebug(\n `Finishing final ${splitImage.size}-byte split with ${splitChunks.length} chunks`\n );\n yield {\n data: await common.readBlobAsBuffer(splitImage),\n bytes: splitDataBytes,\n } as SparseSplit;\n }\n}\n","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/*\n * This program is based on JZlib 1.0.2 ymnk, JCraft,Inc.\n * JZlib is based on zlib-1.1.3, so all credit should go authors\n * Jean-loup Gailly(jloup@gzip.org) and Mark Adler(madler@alumni.caltech.edu)\n * and contributors of zlib.\n */\n\n// deno-lint-ignore-file no-this-alias prefer-const\n\n// Global\n\nconst MAX_BITS = 15;\nconst D_CODES = 30;\nconst BL_CODES = 19;\n\nconst LENGTH_CODES = 29;\nconst LITERALS = 256;\nconst L_CODES = (LITERALS + 1 + LENGTH_CODES);\nconst HEAP_SIZE = (2 * L_CODES + 1);\n\nconst END_BLOCK = 256;\n\n// Bit length codes must not exceed MAX_BL_BITS bits\nconst MAX_BL_BITS = 7;\n\n// repeat previous bit length 3-6 times (2 bits of repeat count)\nconst REP_3_6 = 16;\n\n// repeat a zero length 3-10 times (3 bits of repeat count)\nconst REPZ_3_10 = 17;\n\n// repeat a zero length 11-138 times (7 bits of repeat count)\nconst REPZ_11_138 = 18;\n\n// The lengths of the bit length codes are sent in order of decreasing\n// probability, to avoid transmitting the lengths for unused bit\n// length codes.\n\nconst Buf_size = 8 * 2;\n\n// JZlib version : \"1.0.2\"\nconst Z_DEFAULT_COMPRESSION = -1;\n\n// compression strategy\nconst Z_FILTERED = 1;\nconst Z_HUFFMAN_ONLY = 2;\nconst Z_DEFAULT_STRATEGY = 0;\n\nconst Z_NO_FLUSH = 0;\nconst Z_PARTIAL_FLUSH = 1;\nconst Z_FULL_FLUSH = 3;\nconst Z_FINISH = 4;\n\nconst Z_OK = 0;\nconst Z_STREAM_END = 1;\nconst Z_NEED_DICT = 2;\nconst Z_STREAM_ERROR = -2;\nconst Z_DATA_ERROR = -3;\nconst Z_BUF_ERROR = -5;\n\n// Tree\n\nfunction extractArray(array) {\n\treturn flatArray(array.map(([length, value]) => (new Array(length)).fill(value, 0, length)));\n}\n\nfunction flatArray(array) {\n\treturn array.reduce((a, b) => a.concat(Array.isArray(b) ? flatArray(b) : b), []);\n}\n\n// see definition of array dist_code below\nconst _dist_code = [0, 1, 2, 3].concat(...extractArray([\n\t[2, 4], [2, 5], [4, 6], [4, 7], [8, 8], [8, 9], [16, 10], [16, 11], [32, 12], [32, 13], [64, 14], [64, 15], [2, 0], [1, 16],\n\t[1, 17], [2, 18], [2, 19], [4, 20], [4, 21], [8, 22], [8, 23], [16, 24], [16, 25], [32, 26], [32, 27], [64, 28], [64, 29]\n]));\n\nfunction Tree() {\n\tconst that = this;\n\n\t// dyn_tree; // the dynamic tree\n\t// max_code; // largest code with non zero frequency\n\t// stat_desc; // the corresponding static tree\n\n\t// Compute the optimal bit lengths for a tree and update the total bit\n\t// length\n\t// for the current block.\n\t// IN assertion: the fields freq and dad are set, heap[heap_max] and\n\t// above are the tree nodes sorted by increasing frequency.\n\t// OUT assertions: the field len is set to the optimal bit length, the\n\t// array bl_count contains the frequencies for each bit length.\n\t// The length opt_len is updated; static_len is also updated if stree is\n\t// not null.\n\tfunction gen_bitlen(s) {\n\t\tconst tree = that.dyn_tree;\n\t\tconst stree = that.stat_desc.static_tree;\n\t\tconst extra = that.stat_desc.extra_bits;\n\t\tconst base = that.stat_desc.extra_base;\n\t\tconst max_length = that.stat_desc.max_length;\n\t\tlet h; // heap index\n\t\tlet n, m; // iterate over the tree elements\n\t\tlet bits; // bit length\n\t\tlet xbits; // extra bits\n\t\tlet f; // frequency\n\t\tlet overflow = 0; // number of elements with bit length too large\n\n\t\tfor (bits = 0; bits <= MAX_BITS; bits++)\n\t\t\ts.bl_count[bits] = 0;\n\n\t\t// In a first pass, compute the optimal bit lengths (which may\n\t\t// overflow in the case of the bit length tree).\n\t\ttree[s.heap[s.heap_max] * 2 + 1] = 0; // root of the heap\n\n\t\tfor (h = s.heap_max + 1; h < HEAP_SIZE; h++) {\n\t\t\tn = s.heap[h];\n\t\t\tbits = tree[tree[n * 2 + 1] * 2 + 1] + 1;\n\t\t\tif (bits > max_length) {\n\t\t\t\tbits = max_length;\n\t\t\t\toverflow++;\n\t\t\t}\n\t\t\ttree[n * 2 + 1] = bits;\n\t\t\t// We overwrite tree[n*2+1] which is no longer needed\n\n\t\t\tif (n > that.max_code)\n\t\t\t\tcontinue; // not a leaf node\n\n\t\t\ts.bl_count[bits]++;\n\t\t\txbits = 0;\n\t\t\tif (n >= base)\n\t\t\t\txbits = extra[n - base];\n\t\t\tf = tree[n * 2];\n\t\t\ts.opt_len += f * (bits + xbits);\n\t\t\tif (stree)\n\t\t\t\ts.static_len += f * (stree[n * 2 + 1] + xbits);\n\t\t}\n\t\tif (overflow === 0)\n\t\t\treturn;\n\n\t\t// This happens for example on obj2 and pic of the Calgary corpus\n\t\t// Find the first bit length which could increase:\n\t\tdo {\n\t\t\tbits = max_length - 1;\n\t\t\twhile (s.bl_count[bits] === 0)\n\t\t\t\tbits--;\n\t\t\ts.bl_count[bits]--; // move one leaf down the tree\n\t\t\ts.bl_count[bits + 1] += 2; // move one overflow item as its brother\n\t\t\ts.bl_count[max_length]--;\n\t\t\t// The brother of the overflow item also moves one step up,\n\t\t\t// but this does not affect bl_count[max_length]\n\t\t\toverflow -= 2;\n\t\t} while (overflow > 0);\n\n\t\tfor (bits = max_length; bits !== 0; bits--) {\n\t\t\tn = s.bl_count[bits];\n\t\t\twhile (n !== 0) {\n\t\t\t\tm = s.heap[--h];\n\t\t\t\tif (m > that.max_code)\n\t\t\t\t\tcontinue;\n\t\t\t\tif (tree[m * 2 + 1] != bits) {\n\t\t\t\t\ts.opt_len += (bits - tree[m * 2 + 1]) * tree[m * 2];\n\t\t\t\t\ttree[m * 2 + 1] = bits;\n\t\t\t\t}\n\t\t\t\tn--;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Reverse the first len bits of a code, using straightforward code (a\n\t// faster\n\t// method would use a table)\n\t// IN assertion: 1 <= len <= 15\n\tfunction bi_reverse(code, // the value to invert\n\t\tlen // its bit length\n\t) {\n\t\tlet res = 0;\n\t\tdo {\n\t\t\tres |= code & 1;\n\t\t\tcode >>>= 1;\n\t\t\tres <<= 1;\n\t\t} while (--len > 0);\n\t\treturn res >>> 1;\n\t}\n\n\t// Generate the codes for a given tree and bit counts (which need not be\n\t// optimal).\n\t// IN assertion: the array bl_count contains the bit length statistics for\n\t// the given tree and the field len is set for all tree elements.\n\t// OUT assertion: the field code is set for all tree elements of non\n\t// zero code length.\n\tfunction gen_codes(tree, // the tree to decorate\n\t\tmax_code, // largest code with non zero frequency\n\t\tbl_count // number of codes at each bit length\n\t) {\n\t\tconst next_code = []; // next code value for each\n\t\t// bit length\n\t\tlet code = 0; // running code value\n\t\tlet bits; // bit index\n\t\tlet n; // code index\n\t\tlet len;\n\n\t\t// The distribution counts are first used to generate the code values\n\t\t// without bit reversal.\n\t\tfor (bits = 1; bits <= MAX_BITS; bits++) {\n\t\t\tnext_code[bits] = code = ((code + bl_count[bits - 1]) << 1);\n\t\t}\n\n\t\t// Check that the bit counts in bl_count are consistent. The last code\n\t\t// must be all ones.\n\t\t// Assert (code + bl_count[MAX_BITS]-1 == (1<= 1; n--)\n\t\t\ts.pqdownheap(tree, n);\n\n\t\t// Construct the Huffman tree by repeatedly combining the least two\n\t\t// frequent nodes.\n\n\t\tnode = elems; // next internal node of the tree\n\t\tdo {\n\t\t\t// n = node of least frequency\n\t\t\tn = s.heap[1];\n\t\t\ts.heap[1] = s.heap[s.heap_len--];\n\t\t\ts.pqdownheap(tree, 1);\n\t\t\tm = s.heap[1]; // m = node of next least frequency\n\n\t\t\ts.heap[--s.heap_max] = n; // keep the nodes sorted by frequency\n\t\t\ts.heap[--s.heap_max] = m;\n\n\t\t\t// Create a new node father of n and m\n\t\t\ttree[node * 2] = (tree[n * 2] + tree[m * 2]);\n\t\t\ts.depth[node] = Math.max(s.depth[n], s.depth[m]) + 1;\n\t\t\ttree[n * 2 + 1] = tree[m * 2 + 1] = node;\n\n\t\t\t// and insert the new node in the heap\n\t\t\ts.heap[1] = node++;\n\t\t\ts.pqdownheap(tree, 1);\n\t\t} while (s.heap_len >= 2);\n\n\t\ts.heap[--s.heap_max] = s.heap[1];\n\n\t\t// At this point, the fields freq and dad are set. We can now\n\t\t// generate the bit lengths.\n\n\t\tgen_bitlen(s);\n\n\t\t// The field len is now set, we can generate the bit codes\n\t\tgen_codes(tree, that.max_code, s.bl_count);\n\t};\n\n}\n\nTree._length_code = [0, 1, 2, 3, 4, 5, 6, 7].concat(...extractArray([\n\t[2, 8], [2, 9], [2, 10], [2, 11], [4, 12], [4, 13], [4, 14], [4, 15], [8, 16], [8, 17], [8, 18], [8, 19],\n\t[16, 20], [16, 21], [16, 22], [16, 23], [32, 24], [32, 25], [32, 26], [31, 27], [1, 28]]));\n\nTree.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];\n\nTree.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,\n\t24576];\n\n// Mapping from a distance to a distance code. dist is the distance - 1 and\n// must not have side effects. _dist_code[256] and _dist_code[257] are never\n// used.\nTree.d_code = function (dist) {\n\treturn ((dist) < 256 ? _dist_code[dist] : _dist_code[256 + ((dist) >>> 7)]);\n};\n\n// extra bits for each length code\nTree.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];\n\n// extra bits for each distance code\nTree.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];\n\n// extra bits for each bit length code\nTree.extra_blbits = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7];\n\nTree.bl_order = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15];\n\n// StaticTree\n\nfunction StaticTree(static_tree, extra_bits, extra_base, elems, max_length) {\n\tconst that = this;\n\tthat.static_tree = static_tree;\n\tthat.extra_bits = extra_bits;\n\tthat.extra_base = extra_base;\n\tthat.elems = elems;\n\tthat.max_length = max_length;\n}\n\nconst static_ltree2_first_part = [12, 140, 76, 204, 44, 172, 108, 236, 28, 156, 92, 220, 60, 188, 124, 252, 2, 130, 66, 194, 34, 162, 98, 226, 18, 146, 82,\n\t210, 50, 178, 114, 242, 10, 138, 74, 202, 42, 170, 106, 234, 26, 154, 90, 218, 58, 186, 122, 250, 6, 134, 70, 198, 38, 166, 102, 230, 22, 150, 86,\n\t214, 54, 182, 118, 246, 14, 142, 78, 206, 46, 174, 110, 238, 30, 158, 94, 222, 62, 190, 126, 254, 1, 129, 65, 193, 33, 161, 97, 225, 17, 145, 81,\n\t209, 49, 177, 113, 241, 9, 137, 73, 201, 41, 169, 105, 233, 25, 153, 89, 217, 57, 185, 121, 249, 5, 133, 69, 197, 37, 165, 101, 229, 21, 149, 85,\n\t213, 53, 181, 117, 245, 13, 141, 77, 205, 45, 173, 109, 237, 29, 157, 93, 221, 61, 189, 125, 253, 19, 275, 147, 403, 83, 339, 211, 467, 51, 307,\n\t179, 435, 115, 371, 243, 499, 11, 267, 139, 395, 75, 331, 203, 459, 43, 299, 171, 427, 107, 363, 235, 491, 27, 283, 155, 411, 91, 347, 219, 475,\n\t59, 315, 187, 443, 123, 379, 251, 507, 7, 263, 135, 391, 71, 327, 199, 455, 39, 295, 167, 423, 103, 359, 231, 487, 23, 279, 151, 407, 87, 343, 215,\n\t471, 55, 311, 183, 439, 119, 375, 247, 503, 15, 271, 143, 399, 79, 335, 207, 463, 47, 303, 175, 431, 111, 367, 239, 495, 31, 287, 159, 415, 95,\n\t351, 223, 479, 63, 319, 191, 447, 127, 383, 255, 511, 0, 64, 32, 96, 16, 80, 48, 112, 8, 72, 40, 104, 24, 88, 56, 120, 4, 68, 36, 100, 20, 84, 52,\n\t116, 3, 131, 67, 195, 35, 163, 99, 227];\nconst static_ltree2_second_part = extractArray([[144, 8], [112, 9], [24, 7], [8, 8]]);\nStaticTree.static_ltree = flatArray(static_ltree2_first_part.map((value, index) => [value, static_ltree2_second_part[index]]));\n\nconst static_dtree_first_part = [0, 16, 8, 24, 4, 20, 12, 28, 2, 18, 10, 26, 6, 22, 14, 30, 1, 17, 9, 25, 5, 21, 13, 29, 3, 19, 11, 27, 7, 23];\nconst static_dtree_second_part = extractArray([[30, 5]]);\nStaticTree.static_dtree = flatArray(static_dtree_first_part.map((value, index) => [value, static_dtree_second_part[index]]));\n\nStaticTree.static_l_desc = new StaticTree(StaticTree.static_ltree, Tree.extra_lbits, LITERALS + 1, L_CODES, MAX_BITS);\n\nStaticTree.static_d_desc = new StaticTree(StaticTree.static_dtree, Tree.extra_dbits, 0, D_CODES, MAX_BITS);\n\nStaticTree.static_bl_desc = new StaticTree(null, Tree.extra_blbits, 0, BL_CODES, MAX_BL_BITS);\n\n// Deflate\n\nconst MAX_MEM_LEVEL = 9;\nconst DEF_MEM_LEVEL = 8;\n\nfunction Config(good_length, max_lazy, nice_length, max_chain, func) {\n\tconst that = this;\n\tthat.good_length = good_length;\n\tthat.max_lazy = max_lazy;\n\tthat.nice_length = nice_length;\n\tthat.max_chain = max_chain;\n\tthat.func = func;\n}\n\nconst STORED = 0;\nconst FAST = 1;\nconst SLOW = 2;\nconst config_table = [\n\tnew Config(0, 0, 0, 0, STORED),\n\tnew Config(4, 4, 8, 4, FAST),\n\tnew Config(4, 5, 16, 8, FAST),\n\tnew Config(4, 6, 32, 32, FAST),\n\tnew Config(4, 4, 16, 16, SLOW),\n\tnew Config(8, 16, 32, 32, SLOW),\n\tnew Config(8, 16, 128, 128, SLOW),\n\tnew Config(8, 32, 128, 256, SLOW),\n\tnew Config(32, 128, 258, 1024, SLOW),\n\tnew Config(32, 258, 258, 4096, SLOW)\n];\n\nconst z_errmsg = [\"need dictionary\", // Z_NEED_DICT\n\t// 2\n\t\"stream end\", // Z_STREAM_END 1\n\t\"\", // Z_OK 0\n\t\"\", // Z_ERRNO (-1)\n\t\"stream error\", // Z_STREAM_ERROR (-2)\n\t\"data error\", // Z_DATA_ERROR (-3)\n\t\"\", // Z_MEM_ERROR (-4)\n\t\"buffer error\", // Z_BUF_ERROR (-5)\n\t\"\",// Z_VERSION_ERROR (-6)\n\t\"\"];\n\n// block not completed, need more input or more output\nconst NeedMore = 0;\n\n// block flush performed\nconst BlockDone = 1;\n\n// finish started, need only more output at next deflate\nconst FinishStarted = 2;\n\n// finish done, accept no more input or output\nconst FinishDone = 3;\n\n// preset dictionary flag in zlib header\nconst PRESET_DICT = 0x20;\n\nconst INIT_STATE = 42;\nconst BUSY_STATE = 113;\nconst FINISH_STATE = 666;\n\n// The deflate compression method\nconst Z_DEFLATED = 8;\n\nconst STORED_BLOCK = 0;\nconst STATIC_TREES = 1;\nconst DYN_TREES = 2;\n\nconst MIN_MATCH = 3;\nconst MAX_MATCH = 258;\nconst MIN_LOOKAHEAD = (MAX_MATCH + MIN_MATCH + 1);\n\nfunction smaller(tree, n, m, depth) {\n\tconst tn2 = tree[n * 2];\n\tconst tm2 = tree[m * 2];\n\treturn (tn2 < tm2 || (tn2 == tm2 && depth[n] <= depth[m]));\n}\n\nfunction Deflate() {\n\n\tconst that = this;\n\tlet strm; // pointer back to this zlib stream\n\tlet status; // as the name implies\n\t// pending_buf; // output still pending\n\tlet pending_buf_size; // size of pending_buf\n\t// pending_out; // next pending byte to output to the stream\n\t// pending; // nb of bytes in the pending buffer\n\n\t// dist_buf; // buffer for distances\n\t// lc_buf; // buffer for literals or lengths\n\t// To simplify the code, dist_buf and lc_buf have the same number of elements.\n\t// To use different lengths, an extra flag array would be necessary.\n\n\tlet last_flush; // value of flush param for previous deflate call\n\n\tlet w_size; // LZ77 win size (32K by default)\n\tlet w_bits; // log2(w_size) (8..16)\n\tlet w_mask; // w_size - 1\n\n\tlet win;\n\t// Sliding win. Input bytes are read into the second half of the win,\n\t// and move to the first half later to keep a dictionary of at least wSize\n\t// bytes. With this organization, matches are limited to a distance of\n\t// wSize-MAX_MATCH bytes, but this ensures that IO is always\n\t// performed with a length multiple of the block size. Also, it limits\n\t// the win size to 64K, which is quite useful on MSDOS.\n\t// To do: use the user input buffer as sliding win.\n\n\tlet window_size;\n\t// Actual size of win: 2*wSize, except when the user input buffer\n\t// is directly used as sliding win.\n\n\tlet prev;\n\t// Link to older string with same hash index. To limit the size of this\n\t// array to 64K, this link is maintained only for the last 32K strings.\n\t// An index in this array is thus a win index modulo 32K.\n\n\tlet head; // Heads of the hash chains or NIL.\n\n\tlet ins_h; // hash index of string to be inserted\n\tlet hash_size; // number of elements in hash table\n\tlet hash_bits; // log2(hash_size)\n\tlet hash_mask; // hash_size-1\n\n\t// Number of bits by which ins_h must be shifted at each input\n\t// step. It must be such that after MIN_MATCH steps, the oldest\n\t// byte no longer takes part in the hash key, that is:\n\t// hash_shift * MIN_MATCH >= hash_bits\n\tlet hash_shift;\n\n\t// Window position at the beginning of the current output block. Gets\n\t// negative when the win is moved backwards.\n\n\tlet block_start;\n\n\tlet match_length; // length of best match\n\tlet prev_match; // previous match\n\tlet match_available; // set if previous match exists\n\tlet strstart; // start of string to insert\n\tlet match_start; // start of matching string\n\tlet lookahead; // number of valid bytes ahead in win\n\n\t// Length of the best match at previous step. Matches not greater than this\n\t// are discarded. This is used in the lazy match evaluation.\n\tlet prev_length;\n\n\t// To speed up deflation, hash chains are never searched beyond this\n\t// length. A higher limit improves compression ratio but degrades the speed.\n\tlet max_chain_length;\n\n\t// Attempt to find a better match only when the current match is strictly\n\t// smaller than this value. This mechanism is used only for compression\n\t// levels >= 4.\n\tlet max_lazy_match;\n\n\t// Insert new strings in the hash table only if the match length is not\n\t// greater than this length. This saves time but degrades compression.\n\t// max_insert_length is used only for compression levels <= 3.\n\n\tlet level; // compression level (1..9)\n\tlet strategy; // favor or force Huffman coding\n\n\t// Use a faster search when the previous match is longer than this\n\tlet good_match;\n\n\t// Stop searching when current match exceeds this\n\tlet nice_match;\n\n\tlet dyn_ltree; // literal and length tree\n\tlet dyn_dtree; // distance tree\n\tlet bl_tree; // Huffman tree for bit lengths\n\n\tconst l_desc = new Tree(); // desc for literal tree\n\tconst d_desc = new Tree(); // desc for distance tree\n\tconst bl_desc = new Tree(); // desc for bit length tree\n\n\t// that.heap_len; // number of elements in the heap\n\t// that.heap_max; // element of largest frequency\n\t// The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used.\n\t// The same heap array is used to build all trees.\n\n\t// Depth of each subtree used as tie breaker for trees of equal frequency\n\tthat.depth = [];\n\n\t// Size of match buffer for literals/lengths. There are 4 reasons for\n\t// limiting lit_bufsize to 64K:\n\t// - frequencies can be kept in 16 bit counters\n\t// - if compression is not successful for the first block, all input\n\t// data is still in the win so we can still emit a stored block even\n\t// when input comes from standard input. (This can also be done for\n\t// all blocks if lit_bufsize is not greater than 32K.)\n\t// - if compression is not successful for a file smaller than 64K, we can\n\t// even emit a stored file instead of a stored block (saving 5 bytes).\n\t// This is applicable only for zip (not gzip or zlib).\n\t// - creating new Huffman trees less frequently may not provide fast\n\t// adaptation to changes in the input data statistics. (Take for\n\t// example a binary file with poorly compressible code followed by\n\t// a highly compressible string table.) Smaller buffer sizes give\n\t// fast adaptation but have of course the overhead of transmitting\n\t// trees more frequently.\n\t// - I can't count above 4\n\tlet lit_bufsize;\n\n\tlet last_lit; // running index in dist_buf and lc_buf\n\n\t// that.opt_len; // bit length of current block with optimal trees\n\t// that.static_len; // bit length of current block with static trees\n\tlet matches; // number of string matches in current block\n\tlet last_eob_len; // bit length of EOB code for last block\n\n\t// Output buffer. bits are inserted starting at the bottom (least\n\t// significant bits).\n\tlet bi_buf;\n\n\t// Number of valid bits in bi_buf. All bits above the last valid bit\n\t// are always zero.\n\tlet bi_valid;\n\n\t// number of codes at each bit length for an optimal tree\n\tthat.bl_count = [];\n\n\t// heap used to build the Huffman trees\n\tthat.heap = [];\n\n\tdyn_ltree = [];\n\tdyn_dtree = [];\n\tbl_tree = [];\n\n\tfunction lm_init() {\n\t\twindow_size = 2 * w_size;\n\n\t\thead[hash_size - 1] = 0;\n\t\tfor (let i = 0; i < hash_size - 1; i++) {\n\t\t\thead[i] = 0;\n\t\t}\n\n\t\t// Set the default configuration parameters:\n\t\tmax_lazy_match = config_table[level].max_lazy;\n\t\tgood_match = config_table[level].good_length;\n\t\tnice_match = config_table[level].nice_length;\n\t\tmax_chain_length = config_table[level].max_chain;\n\n\t\tstrstart = 0;\n\t\tblock_start = 0;\n\t\tlookahead = 0;\n\t\tmatch_length = prev_length = MIN_MATCH - 1;\n\t\tmatch_available = 0;\n\t\tins_h = 0;\n\t}\n\n\tfunction init_block() {\n\t\tlet i;\n\t\t// Initialize the trees.\n\t\tfor (i = 0; i < L_CODES; i++)\n\t\t\tdyn_ltree[i * 2] = 0;\n\t\tfor (i = 0; i < D_CODES; i++)\n\t\t\tdyn_dtree[i * 2] = 0;\n\t\tfor (i = 0; i < BL_CODES; i++)\n\t\t\tbl_tree[i * 2] = 0;\n\n\t\tdyn_ltree[END_BLOCK * 2] = 1;\n\t\tthat.opt_len = that.static_len = 0;\n\t\tlast_lit = matches = 0;\n\t}\n\n\t// Initialize the tree data structures for a new zlib stream.\n\tfunction tr_init() {\n\n\t\tl_desc.dyn_tree = dyn_ltree;\n\t\tl_desc.stat_desc = StaticTree.static_l_desc;\n\n\t\td_desc.dyn_tree = dyn_dtree;\n\t\td_desc.stat_desc = StaticTree.static_d_desc;\n\n\t\tbl_desc.dyn_tree = bl_tree;\n\t\tbl_desc.stat_desc = StaticTree.static_bl_desc;\n\n\t\tbi_buf = 0;\n\t\tbi_valid = 0;\n\t\tlast_eob_len = 8; // enough lookahead for inflate\n\n\t\t// Initialize the first block of the first file:\n\t\tinit_block();\n\t}\n\n\t// Restore the heap property by moving down the tree starting at node k,\n\t// exchanging a node with the smallest of its two sons if necessary,\n\t// stopping\n\t// when the heap property is re-established (each father smaller than its\n\t// two sons).\n\tthat.pqdownheap = function (tree, // the tree to restore\n\t\tk // node to move down\n\t) {\n\t\tconst heap = that.heap;\n\t\tconst v = heap[k];\n\t\tlet j = k << 1; // left son of k\n\t\twhile (j <= that.heap_len) {\n\t\t\t// Set j to the smallest of the two sons:\n\t\t\tif (j < that.heap_len && smaller(tree, heap[j + 1], heap[j], that.depth)) {\n\t\t\t\tj++;\n\t\t\t}\n\t\t\t// Exit if v is smaller than both sons\n\t\t\tif (smaller(tree, v, heap[j], that.depth))\n\t\t\t\tbreak;\n\n\t\t\t// Exchange v with the smallest son\n\t\t\theap[k] = heap[j];\n\t\t\tk = j;\n\t\t\t// And continue down the tree, setting j to the left son of k\n\t\t\tj <<= 1;\n\t\t}\n\t\theap[k] = v;\n\t};\n\n\t// Scan a literal or distance tree to determine the frequencies of the codes\n\t// in the bit length tree.\n\tfunction scan_tree(tree,// the tree to be scanned\n\t\tmax_code // and its largest code of non zero frequency\n\t) {\n\t\tlet prevlen = -1; // last emitted length\n\t\tlet curlen; // length of current code\n\t\tlet nextlen = tree[0 * 2 + 1]; // length of next code\n\t\tlet count = 0; // repeat count of the current code\n\t\tlet max_count = 7; // max repeat count\n\t\tlet min_count = 4; // min repeat count\n\n\t\tif (nextlen === 0) {\n\t\t\tmax_count = 138;\n\t\t\tmin_count = 3;\n\t\t}\n\t\ttree[(max_code + 1) * 2 + 1] = 0xffff; // guard\n\n\t\tfor (let n = 0; n <= max_code; n++) {\n\t\t\tcurlen = nextlen;\n\t\t\tnextlen = tree[(n + 1) * 2 + 1];\n\t\t\tif (++count < max_count && curlen == nextlen) {\n\t\t\t\tcontinue;\n\t\t\t} else if (count < min_count) {\n\t\t\t\tbl_tree[curlen * 2] += count;\n\t\t\t} else if (curlen !== 0) {\n\t\t\t\tif (curlen != prevlen)\n\t\t\t\t\tbl_tree[curlen * 2]++;\n\t\t\t\tbl_tree[REP_3_6 * 2]++;\n\t\t\t} else if (count <= 10) {\n\t\t\t\tbl_tree[REPZ_3_10 * 2]++;\n\t\t\t} else {\n\t\t\t\tbl_tree[REPZ_11_138 * 2]++;\n\t\t\t}\n\t\t\tcount = 0;\n\t\t\tprevlen = curlen;\n\t\t\tif (nextlen === 0) {\n\t\t\t\tmax_count = 138;\n\t\t\t\tmin_count = 3;\n\t\t\t} else if (curlen == nextlen) {\n\t\t\t\tmax_count = 6;\n\t\t\t\tmin_count = 3;\n\t\t\t} else {\n\t\t\t\tmax_count = 7;\n\t\t\t\tmin_count = 4;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Construct the Huffman tree for the bit lengths and return the index in\n\t// bl_order of the last bit length code to send.\n\tfunction build_bl_tree() {\n\t\tlet max_blindex; // index of last bit length code of non zero freq\n\n\t\t// Determine the bit length frequencies for literal and distance trees\n\t\tscan_tree(dyn_ltree, l_desc.max_code);\n\t\tscan_tree(dyn_dtree, d_desc.max_code);\n\n\t\t// Build the bit length tree:\n\t\tbl_desc.build_tree(that);\n\t\t// opt_len now includes the length of the tree representations, except\n\t\t// the lengths of the bit lengths codes and the 5+5+4 bits for the\n\t\t// counts.\n\n\t\t// Determine the number of bit length codes to send. The pkzip format\n\t\t// requires that at least 4 bit length codes be sent. (appnote.txt says\n\t\t// 3 but the actual value used is 4.)\n\t\tfor (max_blindex = BL_CODES - 1; max_blindex >= 3; max_blindex--) {\n\t\t\tif (bl_tree[Tree.bl_order[max_blindex] * 2 + 1] !== 0)\n\t\t\t\tbreak;\n\t\t}\n\t\t// Update opt_len to include the bit length tree and counts\n\t\tthat.opt_len += 3 * (max_blindex + 1) + 5 + 5 + 4;\n\n\t\treturn max_blindex;\n\t}\n\n\t// Output a byte on the stream.\n\t// IN assertion: there is enough room in pending_buf.\n\tfunction put_byte(p) {\n\t\tthat.pending_buf[that.pending++] = p;\n\t}\n\n\tfunction put_short(w) {\n\t\tput_byte(w & 0xff);\n\t\tput_byte((w >>> 8) & 0xff);\n\t}\n\n\tfunction putShortMSB(b) {\n\t\tput_byte((b >> 8) & 0xff);\n\t\tput_byte((b & 0xff) & 0xff);\n\t}\n\n\tfunction send_bits(value, length) {\n\t\tlet val;\n\t\tconst len = length;\n\t\tif (bi_valid > Buf_size - len) {\n\t\t\tval = value;\n\t\t\t// bi_buf |= (val << bi_valid);\n\t\t\tbi_buf |= ((val << bi_valid) & 0xffff);\n\t\t\tput_short(bi_buf);\n\t\t\tbi_buf = val >>> (Buf_size - bi_valid);\n\t\t\tbi_valid += len - Buf_size;\n\t\t} else {\n\t\t\t// bi_buf |= (value) << bi_valid;\n\t\t\tbi_buf |= (((value) << bi_valid) & 0xffff);\n\t\t\tbi_valid += len;\n\t\t}\n\t}\n\n\tfunction send_code(c, tree) {\n\t\tconst c2 = c * 2;\n\t\tsend_bits(tree[c2] & 0xffff, tree[c2 + 1] & 0xffff);\n\t}\n\n\t// Send a literal or distance tree in compressed form, using the codes in\n\t// bl_tree.\n\tfunction send_tree(tree,// the tree to be sent\n\t\tmax_code // and its largest code of non zero frequency\n\t) {\n\t\tlet n; // iterates over all tree elements\n\t\tlet prevlen = -1; // last emitted length\n\t\tlet curlen; // length of current code\n\t\tlet nextlen = tree[0 * 2 + 1]; // length of next code\n\t\tlet count = 0; // repeat count of the current code\n\t\tlet max_count = 7; // max repeat count\n\t\tlet min_count = 4; // min repeat count\n\n\t\tif (nextlen === 0) {\n\t\t\tmax_count = 138;\n\t\t\tmin_count = 3;\n\t\t}\n\n\t\tfor (n = 0; n <= max_code; n++) {\n\t\t\tcurlen = nextlen;\n\t\t\tnextlen = tree[(n + 1) * 2 + 1];\n\t\t\tif (++count < max_count && curlen == nextlen) {\n\t\t\t\tcontinue;\n\t\t\t} else if (count < min_count) {\n\t\t\t\tdo {\n\t\t\t\t\tsend_code(curlen, bl_tree);\n\t\t\t\t} while (--count !== 0);\n\t\t\t} else if (curlen !== 0) {\n\t\t\t\tif (curlen != prevlen) {\n\t\t\t\t\tsend_code(curlen, bl_tree);\n\t\t\t\t\tcount--;\n\t\t\t\t}\n\t\t\t\tsend_code(REP_3_6, bl_tree);\n\t\t\t\tsend_bits(count - 3, 2);\n\t\t\t} else if (count <= 10) {\n\t\t\t\tsend_code(REPZ_3_10, bl_tree);\n\t\t\t\tsend_bits(count - 3, 3);\n\t\t\t} else {\n\t\t\t\tsend_code(REPZ_11_138, bl_tree);\n\t\t\t\tsend_bits(count - 11, 7);\n\t\t\t}\n\t\t\tcount = 0;\n\t\t\tprevlen = curlen;\n\t\t\tif (nextlen === 0) {\n\t\t\t\tmax_count = 138;\n\t\t\t\tmin_count = 3;\n\t\t\t} else if (curlen == nextlen) {\n\t\t\t\tmax_count = 6;\n\t\t\t\tmin_count = 3;\n\t\t\t} else {\n\t\t\t\tmax_count = 7;\n\t\t\t\tmin_count = 4;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Send the header for a block using dynamic Huffman trees: the counts, the\n\t// lengths of the bit length codes, the literal tree and the distance tree.\n\t// IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4.\n\tfunction send_all_trees(lcodes, dcodes, blcodes) {\n\t\tlet rank; // index in bl_order\n\n\t\tsend_bits(lcodes - 257, 5); // not +255 as stated in appnote.txt\n\t\tsend_bits(dcodes - 1, 5);\n\t\tsend_bits(blcodes - 4, 4); // not -3 as stated in appnote.txt\n\t\tfor (rank = 0; rank < blcodes; rank++) {\n\t\t\tsend_bits(bl_tree[Tree.bl_order[rank] * 2 + 1], 3);\n\t\t}\n\t\tsend_tree(dyn_ltree, lcodes - 1); // literal tree\n\t\tsend_tree(dyn_dtree, dcodes - 1); // distance tree\n\t}\n\n\t// Flush the bit buffer, keeping at most 7 bits in it.\n\tfunction bi_flush() {\n\t\tif (bi_valid == 16) {\n\t\t\tput_short(bi_buf);\n\t\t\tbi_buf = 0;\n\t\t\tbi_valid = 0;\n\t\t} else if (bi_valid >= 8) {\n\t\t\tput_byte(bi_buf & 0xff);\n\t\t\tbi_buf >>>= 8;\n\t\t\tbi_valid -= 8;\n\t\t}\n\t}\n\n\t// Send one empty static block to give enough lookahead for inflate.\n\t// This takes 10 bits, of which 7 may remain in the bit buffer.\n\t// The current inflate code requires 9 bits of lookahead. If the\n\t// last two codes for the previous block (real code plus EOB) were coded\n\t// on 5 bits or less, inflate may have only 5+3 bits of lookahead to decode\n\t// the last real code. In this case we send two empty static blocks instead\n\t// of one. (There are no problems if the previous block is stored or fixed.)\n\t// To simplify the code, we assume the worst case of last real code encoded\n\t// on one bit only.\n\tfunction _tr_align() {\n\t\tsend_bits(STATIC_TREES << 1, 3);\n\t\tsend_code(END_BLOCK, StaticTree.static_ltree);\n\n\t\tbi_flush();\n\n\t\t// Of the 10 bits for the empty block, we have already sent\n\t\t// (10 - bi_valid) bits. The lookahead for the last real code (before\n\t\t// the EOB of the previous block) was thus at least one plus the length\n\t\t// of the EOB plus what we have just sent of the empty static block.\n\t\tif (1 + last_eob_len + 10 - bi_valid < 9) {\n\t\t\tsend_bits(STATIC_TREES << 1, 3);\n\t\t\tsend_code(END_BLOCK, StaticTree.static_ltree);\n\t\t\tbi_flush();\n\t\t}\n\t\tlast_eob_len = 7;\n\t}\n\n\t// Save the match info and tally the frequency counts. Return true if\n\t// the current block must be flushed.\n\tfunction _tr_tally(dist, // distance of matched string\n\t\tlc // match length-MIN_MATCH or unmatched char (if dist==0)\n\t) {\n\t\tlet out_length, in_length, dcode;\n\t\tthat.dist_buf[last_lit] = dist;\n\t\tthat.lc_buf[last_lit] = lc & 0xff;\n\t\tlast_lit++;\n\n\t\tif (dist === 0) {\n\t\t\t// lc is the unmatched char\n\t\t\tdyn_ltree[lc * 2]++;\n\t\t} else {\n\t\t\tmatches++;\n\t\t\t// Here, lc is the match length - MIN_MATCH\n\t\t\tdist--; // dist = match distance - 1\n\t\t\tdyn_ltree[(Tree._length_code[lc] + LITERALS + 1) * 2]++;\n\t\t\tdyn_dtree[Tree.d_code(dist) * 2]++;\n\t\t}\n\n\t\tif ((last_lit & 0x1fff) === 0 && level > 2) {\n\t\t\t// Compute an upper bound for the compressed length\n\t\t\tout_length = last_lit * 8;\n\t\t\tin_length = strstart - block_start;\n\t\t\tfor (dcode = 0; dcode < D_CODES; dcode++) {\n\t\t\t\tout_length += dyn_dtree[dcode * 2] * (5 + Tree.extra_dbits[dcode]);\n\t\t\t}\n\t\t\tout_length >>>= 3;\n\t\t\tif ((matches < Math.floor(last_lit / 2)) && out_length < Math.floor(in_length / 2))\n\t\t\t\treturn true;\n\t\t}\n\n\t\treturn (last_lit == lit_bufsize - 1);\n\t\t// We avoid equality with lit_bufsize because of wraparound at 64K\n\t\t// on 16 bit machines and because stored blocks are restricted to\n\t\t// 64K-1 bytes.\n\t}\n\n\t// Send the block data compressed using the given Huffman trees\n\tfunction compress_block(ltree, dtree) {\n\t\tlet dist; // distance of matched string\n\t\tlet lc; // match length or unmatched char (if dist === 0)\n\t\tlet lx = 0; // running index in dist_buf and lc_buf\n\t\tlet code; // the code to send\n\t\tlet extra; // number of extra bits to send\n\n\t\tif (last_lit !== 0) {\n\t\t\tdo {\n\t\t\t\tdist = that.dist_buf[lx];\n\t\t\t\tlc = that.lc_buf[lx];\n\t\t\t\tlx++;\n\n\t\t\t\tif (dist === 0) {\n\t\t\t\t\tsend_code(lc, ltree); // send a literal byte\n\t\t\t\t} else {\n\t\t\t\t\t// Here, lc is the match length - MIN_MATCH\n\t\t\t\t\tcode = Tree._length_code[lc];\n\n\t\t\t\t\tsend_code(code + LITERALS + 1, ltree); // send the length\n\t\t\t\t\t// code\n\t\t\t\t\textra = Tree.extra_lbits[code];\n\t\t\t\t\tif (extra !== 0) {\n\t\t\t\t\t\tlc -= Tree.base_length[code];\n\t\t\t\t\t\tsend_bits(lc, extra); // send the extra length bits\n\t\t\t\t\t}\n\t\t\t\t\tdist--; // dist is now the match distance - 1\n\t\t\t\t\tcode = Tree.d_code(dist);\n\n\t\t\t\t\tsend_code(code, dtree); // send the distance code\n\t\t\t\t\textra = Tree.extra_dbits[code];\n\t\t\t\t\tif (extra !== 0) {\n\t\t\t\t\t\tdist -= Tree.base_dist[code];\n\t\t\t\t\t\tsend_bits(dist, extra); // send the extra distance bits\n\t\t\t\t\t}\n\t\t\t\t} // literal or match pair ?\n\t\t\t} while (lx < last_lit);\n\t\t}\n\n\t\tsend_code(END_BLOCK, ltree);\n\t\tlast_eob_len = ltree[END_BLOCK * 2 + 1];\n\t}\n\n\t// Flush the bit buffer and align the output on a byte boundary\n\tfunction bi_windup() {\n\t\tif (bi_valid > 8) {\n\t\t\tput_short(bi_buf);\n\t\t} else if (bi_valid > 0) {\n\t\t\tput_byte(bi_buf & 0xff);\n\t\t}\n\t\tbi_buf = 0;\n\t\tbi_valid = 0;\n\t}\n\n\t// Copy a stored block, storing first the length and its\n\t// one's complement if requested.\n\tfunction copy_block(buf, // the input data\n\t\tlen, // its length\n\t\theader // true if block header must be written\n\t) {\n\t\tbi_windup(); // align on byte boundary\n\t\tlast_eob_len = 8; // enough lookahead for inflate\n\n\t\tif (header) {\n\t\t\tput_short(len);\n\t\t\tput_short(~len);\n\t\t}\n\n\t\tthat.pending_buf.set(win.subarray(buf, buf + len), that.pending);\n\t\tthat.pending += len;\n\t}\n\n\t// Send a stored block\n\tfunction _tr_stored_block(buf, // input block\n\t\tstored_len, // length of input block\n\t\teof // true if this is the last block for a file\n\t) {\n\t\tsend_bits((STORED_BLOCK << 1) + (eof ? 1 : 0), 3); // send block type\n\t\tcopy_block(buf, stored_len, true); // with header\n\t}\n\n\t// Determine the best encoding for the current block: dynamic trees, static\n\t// trees or store, and output the encoded block to the zip file.\n\tfunction _tr_flush_block(buf, // input block, or NULL if too old\n\t\tstored_len, // length of input block\n\t\teof // true if this is the last block for a file\n\t) {\n\t\tlet opt_lenb, static_lenb;// opt_len and static_len in bytes\n\t\tlet max_blindex = 0; // index of last bit length code of non zero freq\n\n\t\t// Build the Huffman trees unless a stored block is forced\n\t\tif (level > 0) {\n\t\t\t// Construct the literal and distance trees\n\t\t\tl_desc.build_tree(that);\n\n\t\t\td_desc.build_tree(that);\n\n\t\t\t// At this point, opt_len and static_len are the total bit lengths\n\t\t\t// of\n\t\t\t// the compressed block data, excluding the tree representations.\n\n\t\t\t// Build the bit length tree for the above two trees, and get the\n\t\t\t// index\n\t\t\t// in bl_order of the last bit length code to send.\n\t\t\tmax_blindex = build_bl_tree();\n\n\t\t\t// Determine the best encoding. Compute first the block length in\n\t\t\t// bytes\n\t\t\topt_lenb = (that.opt_len + 3 + 7) >>> 3;\n\t\t\tstatic_lenb = (that.static_len + 3 + 7) >>> 3;\n\n\t\t\tif (static_lenb <= opt_lenb)\n\t\t\t\topt_lenb = static_lenb;\n\t\t} else {\n\t\t\topt_lenb = static_lenb = stored_len + 5; // force a stored block\n\t\t}\n\n\t\tif ((stored_len + 4 <= opt_lenb) && buf != -1) {\n\t\t\t// 4: two words for the lengths\n\t\t\t// The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE.\n\t\t\t// Otherwise we can't have processed more than WSIZE input bytes\n\t\t\t// since\n\t\t\t// the last block flush, because compression would have been\n\t\t\t// successful. If LIT_BUFSIZE <= WSIZE, it is never too late to\n\t\t\t// transform a block into a stored block.\n\t\t\t_tr_stored_block(buf, stored_len, eof);\n\t\t} else if (static_lenb == opt_lenb) {\n\t\t\tsend_bits((STATIC_TREES << 1) + (eof ? 1 : 0), 3);\n\t\t\tcompress_block(StaticTree.static_ltree, StaticTree.static_dtree);\n\t\t} else {\n\t\t\tsend_bits((DYN_TREES << 1) + (eof ? 1 : 0), 3);\n\t\t\tsend_all_trees(l_desc.max_code + 1, d_desc.max_code + 1, max_blindex + 1);\n\t\t\tcompress_block(dyn_ltree, dyn_dtree);\n\t\t}\n\n\t\t// The above check is made mod 2^32, for files larger than 512 MB\n\t\t// and uLong implemented on 32 bits.\n\n\t\tinit_block();\n\n\t\tif (eof) {\n\t\t\tbi_windup();\n\t\t}\n\t}\n\n\tfunction flush_block_only(eof) {\n\t\t_tr_flush_block(block_start >= 0 ? block_start : -1, strstart - block_start, eof);\n\t\tblock_start = strstart;\n\t\tstrm.flush_pending();\n\t}\n\n\t// Fill the win when the lookahead becomes insufficient.\n\t// Updates strstart and lookahead.\n\t//\n\t// IN assertion: lookahead < MIN_LOOKAHEAD\n\t// OUT assertions: strstart <= window_size-MIN_LOOKAHEAD\n\t// At least one byte has been read, or avail_in === 0; reads are\n\t// performed for at least two bytes (required for the zip translate_eol\n\t// option -- not supported here).\n\tfunction fill_window() {\n\t\tlet n, m;\n\t\tlet p;\n\t\tlet more; // Amount of free space at the end of the win.\n\n\t\tdo {\n\t\t\tmore = (window_size - lookahead - strstart);\n\n\t\t\t// Deal with !@#$% 64K limit:\n\t\t\tif (more === 0 && strstart === 0 && lookahead === 0) {\n\t\t\t\tmore = w_size;\n\t\t\t} else if (more == -1) {\n\t\t\t\t// Very unlikely, but possible on 16 bit machine if strstart ==\n\t\t\t\t// 0\n\t\t\t\t// and lookahead == 1 (input done one byte at time)\n\t\t\t\tmore--;\n\n\t\t\t\t// If the win is almost full and there is insufficient\n\t\t\t\t// lookahead,\n\t\t\t\t// move the upper half to the lower one to make room in the\n\t\t\t\t// upper half.\n\t\t\t} else if (strstart >= w_size + w_size - MIN_LOOKAHEAD) {\n\t\t\t\twin.set(win.subarray(w_size, w_size + w_size), 0);\n\n\t\t\t\tmatch_start -= w_size;\n\t\t\t\tstrstart -= w_size; // we now have strstart >= MAX_DIST\n\t\t\t\tblock_start -= w_size;\n\n\t\t\t\t// Slide the hash table (could be avoided with 32 bit values\n\t\t\t\t// at the expense of memory usage). We slide even when level ==\n\t\t\t\t// 0\n\t\t\t\t// to keep the hash table consistent if we switch back to level\n\t\t\t\t// > 0\n\t\t\t\t// later. (Using level 0 permanently is not an optimal usage of\n\t\t\t\t// zlib, so we don't care about this pathological case.)\n\n\t\t\t\tn = hash_size;\n\t\t\t\tp = n;\n\t\t\t\tdo {\n\t\t\t\t\tm = (head[--p] & 0xffff);\n\t\t\t\t\thead[p] = (m >= w_size ? m - w_size : 0);\n\t\t\t\t} while (--n !== 0);\n\n\t\t\t\tn = w_size;\n\t\t\t\tp = n;\n\t\t\t\tdo {\n\t\t\t\t\tm = (prev[--p] & 0xffff);\n\t\t\t\t\tprev[p] = (m >= w_size ? m - w_size : 0);\n\t\t\t\t\t// If n is not on any hash chain, prev[n] is garbage but\n\t\t\t\t\t// its value will never be used.\n\t\t\t\t} while (--n !== 0);\n\t\t\t\tmore += w_size;\n\t\t\t}\n\n\t\t\tif (strm.avail_in === 0)\n\t\t\t\treturn;\n\n\t\t\t// If there was no sliding:\n\t\t\t// strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 &&\n\t\t\t// more == window_size - lookahead - strstart\n\t\t\t// => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1)\n\t\t\t// => more >= window_size - 2*WSIZE + 2\n\t\t\t// In the BIG_MEM or MMAP case (not yet supported),\n\t\t\t// window_size == input_size + MIN_LOOKAHEAD &&\n\t\t\t// strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD.\n\t\t\t// Otherwise, window_size == 2*WSIZE so more >= 2.\n\t\t\t// If there was sliding, more >= WSIZE. So in all cases, more >= 2.\n\n\t\t\tn = strm.read_buf(win, strstart + lookahead, more);\n\t\t\tlookahead += n;\n\n\t\t\t// Initialize the hash value now that we have some input:\n\t\t\tif (lookahead >= MIN_MATCH) {\n\t\t\t\tins_h = win[strstart] & 0xff;\n\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[strstart + 1] & 0xff)) & hash_mask;\n\t\t\t}\n\t\t\t// If the whole input has less than MIN_MATCH bytes, ins_h is\n\t\t\t// garbage,\n\t\t\t// but this is not important since only literal bytes will be\n\t\t\t// emitted.\n\t\t} while (lookahead < MIN_LOOKAHEAD && strm.avail_in !== 0);\n\t}\n\n\t// Copy without compression as much as possible from the input stream,\n\t// return\n\t// the current block state.\n\t// This function does not insert new strings in the dictionary since\n\t// uncompressible data is probably not useful. This function is used\n\t// only for the level=0 compression option.\n\t// NOTE: this function should be optimized to avoid extra copying from\n\t// win to pending_buf.\n\tfunction deflate_stored(flush) {\n\t\t// Stored blocks are limited to 0xffff bytes, pending_buf is limited\n\t\t// to pending_buf_size, and each stored block has a 5 byte header:\n\n\t\tlet max_block_size = 0xffff;\n\t\tlet max_start;\n\n\t\tif (max_block_size > pending_buf_size - 5) {\n\t\t\tmax_block_size = pending_buf_size - 5;\n\t\t}\n\n\t\t// Copy as much as possible from input to output:\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\t// Fill the win as much as possible:\n\t\t\tif (lookahead <= 1) {\n\t\t\t\tfill_window();\n\t\t\t\tif (lookahead === 0 && flush == Z_NO_FLUSH)\n\t\t\t\t\treturn NeedMore;\n\t\t\t\tif (lookahead === 0)\n\t\t\t\t\tbreak; // flush the current block\n\t\t\t}\n\n\t\t\tstrstart += lookahead;\n\t\t\tlookahead = 0;\n\n\t\t\t// Emit a stored block if pending_buf will be full:\n\t\t\tmax_start = block_start + max_block_size;\n\t\t\tif (strstart === 0 || strstart >= max_start) {\n\t\t\t\t// strstart === 0 is possible when wraparound on 16-bit machine\n\t\t\t\tlookahead = (strstart - max_start);\n\t\t\t\tstrstart = max_start;\n\n\t\t\t\tflush_block_only(false);\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\n\t\t\t}\n\n\t\t\t// Flush if we may have to slide, otherwise block_start may become\n\t\t\t// negative and the data will be gone:\n\t\t\tif (strstart - block_start >= w_size - MIN_LOOKAHEAD) {\n\t\t\t\tflush_block_only(false);\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\t\t\t}\n\t\t}\n\n\t\tflush_block_only(flush == Z_FINISH);\n\t\tif (strm.avail_out === 0)\n\t\t\treturn (flush == Z_FINISH) ? FinishStarted : NeedMore;\n\n\t\treturn flush == Z_FINISH ? FinishDone : BlockDone;\n\t}\n\n\tfunction longest_match(cur_match) {\n\t\tlet chain_length = max_chain_length; // max hash chain length\n\t\tlet scan = strstart; // current string\n\t\tlet match; // matched string\n\t\tlet len; // length of current match\n\t\tlet best_len = prev_length; // best match length so far\n\t\tconst limit = strstart > (w_size - MIN_LOOKAHEAD) ? strstart - (w_size - MIN_LOOKAHEAD) : 0;\n\t\tlet _nice_match = nice_match;\n\n\t\t// Stop when cur_match becomes <= limit. To simplify the code,\n\t\t// we prevent matches with the string of win index 0.\n\n\t\tconst wmask = w_mask;\n\n\t\tconst strend = strstart + MAX_MATCH;\n\t\tlet scan_end1 = win[scan + best_len - 1];\n\t\tlet scan_end = win[scan + best_len];\n\n\t\t// The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of\n\t\t// 16.\n\t\t// It is easy to get rid of this optimization if necessary.\n\n\t\t// Do not waste too much time if we already have a good match:\n\t\tif (prev_length >= good_match) {\n\t\t\tchain_length >>= 2;\n\t\t}\n\n\t\t// Do not look for matches beyond the end of the input. This is\n\t\t// necessary\n\t\t// to make deflate deterministic.\n\t\tif (_nice_match > lookahead)\n\t\t\t_nice_match = lookahead;\n\n\t\tdo {\n\t\t\tmatch = cur_match;\n\n\t\t\t// Skip to next match if the match length cannot increase\n\t\t\t// or if the match length is less than 2:\n\t\t\tif (win[match + best_len] != scan_end || win[match + best_len - 1] != scan_end1 || win[match] != win[scan]\n\t\t\t\t|| win[++match] != win[scan + 1])\n\t\t\t\tcontinue;\n\n\t\t\t// The check at best_len-1 can be removed because it will be made\n\t\t\t// again later. (This heuristic is not always a win.)\n\t\t\t// It is not necessary to compare scan[2] and match[2] since they\n\t\t\t// are always equal when the other bytes match, given that\n\t\t\t// the hash keys are equal and that HASH_BITS >= 8.\n\t\t\tscan += 2;\n\t\t\tmatch++;\n\n\t\t\t// We check for insufficient lookahead only every 8th comparison;\n\t\t\t// the 256th check will be made at strstart+258.\n\t\t\t// eslint-disable-next-line no-empty\n\t\t\tdo {\n\t\t\t\t// empty block\n\t\t\t} while (win[++scan] == win[++match] && win[++scan] == win[++match] && win[++scan] == win[++match]\n\t\t\t&& win[++scan] == win[++match] && win[++scan] == win[++match] && win[++scan] == win[++match]\n\t\t\t&& win[++scan] == win[++match] && win[++scan] == win[++match] && scan < strend);\n\n\t\t\tlen = MAX_MATCH - (strend - scan);\n\t\t\tscan = strend - MAX_MATCH;\n\n\t\t\tif (len > best_len) {\n\t\t\t\tmatch_start = cur_match;\n\t\t\t\tbest_len = len;\n\t\t\t\tif (len >= _nice_match)\n\t\t\t\t\tbreak;\n\t\t\t\tscan_end1 = win[scan + best_len - 1];\n\t\t\t\tscan_end = win[scan + best_len];\n\t\t\t}\n\n\t\t} while ((cur_match = (prev[cur_match & wmask] & 0xffff)) > limit && --chain_length !== 0);\n\n\t\tif (best_len <= lookahead)\n\t\t\treturn best_len;\n\t\treturn lookahead;\n\t}\n\n\t// Compress as much as possible from the input stream, return the current\n\t// block state.\n\t// This function does not perform lazy evaluation of matches and inserts\n\t// new strings in the dictionary only for unmatched strings or for short\n\t// matches. It is used only for the fast compression options.\n\tfunction deflate_fast(flush) {\n\t\t// short hash_head = 0; // head of the hash chain\n\t\tlet hash_head = 0; // head of the hash chain\n\t\tlet bflush; // set if current block must be flushed\n\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\t// Make sure that we always have enough lookahead, except\n\t\t\t// at the end of the input file. We need MAX_MATCH bytes\n\t\t\t// for the next match, plus MIN_MATCH bytes to insert the\n\t\t\t// string following the next match.\n\t\t\tif (lookahead < MIN_LOOKAHEAD) {\n\t\t\t\tfill_window();\n\t\t\t\tif (lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) {\n\t\t\t\t\treturn NeedMore;\n\t\t\t\t}\n\t\t\t\tif (lookahead === 0)\n\t\t\t\t\tbreak; // flush the current block\n\t\t\t}\n\n\t\t\t// Insert the string win[strstart .. strstart+2] in the\n\t\t\t// dictionary, and set hash_head to the head of the hash chain:\n\t\t\tif (lookahead >= MIN_MATCH) {\n\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\n\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\thead[ins_h] = strstart;\n\t\t\t}\n\n\t\t\t// Find the longest match, discarding those <= prev_length.\n\t\t\t// At this point we have always match_length < MIN_MATCH\n\n\t\t\tif (hash_head !== 0 && ((strstart - hash_head) & 0xffff) <= w_size - MIN_LOOKAHEAD) {\n\t\t\t\t// To simplify the code, we prevent matches with the string\n\t\t\t\t// of win index 0 (in particular we have to avoid a match\n\t\t\t\t// of the string with itself at the start of the input file).\n\t\t\t\tif (strategy != Z_HUFFMAN_ONLY) {\n\t\t\t\t\tmatch_length = longest_match(hash_head);\n\t\t\t\t}\n\t\t\t\t// longest_match() sets match_start\n\t\t\t}\n\t\t\tif (match_length >= MIN_MATCH) {\n\t\t\t\t// check_match(strstart, match_start, match_length);\n\n\t\t\t\tbflush = _tr_tally(strstart - match_start, match_length - MIN_MATCH);\n\n\t\t\t\tlookahead -= match_length;\n\n\t\t\t\t// Insert new strings in the hash table only if the match length\n\t\t\t\t// is not too large. This saves time but degrades compression.\n\t\t\t\tif (match_length <= max_lazy_match && lookahead >= MIN_MATCH) {\n\t\t\t\t\tmatch_length--; // string at strstart already in hash table\n\t\t\t\t\tdo {\n\t\t\t\t\t\tstrstart++;\n\n\t\t\t\t\t\tins_h = ((ins_h << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\t\t\thead[ins_h] = strstart;\n\n\t\t\t\t\t\t// strstart never exceeds WSIZE-MAX_MATCH, so there are\n\t\t\t\t\t\t// always MIN_MATCH bytes ahead.\n\t\t\t\t\t} while (--match_length !== 0);\n\t\t\t\t\tstrstart++;\n\t\t\t\t} else {\n\t\t\t\t\tstrstart += match_length;\n\t\t\t\t\tmatch_length = 0;\n\t\t\t\t\tins_h = win[strstart] & 0xff;\n\n\t\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[strstart + 1] & 0xff)) & hash_mask;\n\t\t\t\t\t// If lookahead < MIN_MATCH, ins_h is garbage, but it does\n\t\t\t\t\t// not\n\t\t\t\t\t// matter since it will be recomputed at next deflate call.\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// No match, output a literal byte\n\n\t\t\t\tbflush = _tr_tally(0, win[strstart] & 0xff);\n\t\t\t\tlookahead--;\n\t\t\t\tstrstart++;\n\t\t\t}\n\t\t\tif (bflush) {\n\n\t\t\t\tflush_block_only(false);\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\t\t\t}\n\t\t}\n\n\t\tflush_block_only(flush == Z_FINISH);\n\t\tif (strm.avail_out === 0) {\n\t\t\tif (flush == Z_FINISH)\n\t\t\t\treturn FinishStarted;\n\t\t\telse\n\t\t\t\treturn NeedMore;\n\t\t}\n\t\treturn flush == Z_FINISH ? FinishDone : BlockDone;\n\t}\n\n\t// Same as above, but achieves better compression. We use a lazy\n\t// evaluation for matches: a match is finally adopted only if there is\n\t// no better match at the next win position.\n\tfunction deflate_slow(flush) {\n\t\t// short hash_head = 0; // head of hash chain\n\t\tlet hash_head = 0; // head of hash chain\n\t\tlet bflush; // set if current block must be flushed\n\t\tlet max_insert;\n\n\t\t// Process the input block.\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\t// Make sure that we always have enough lookahead, except\n\t\t\t// at the end of the input file. We need MAX_MATCH bytes\n\t\t\t// for the next match, plus MIN_MATCH bytes to insert the\n\t\t\t// string following the next match.\n\n\t\t\tif (lookahead < MIN_LOOKAHEAD) {\n\t\t\t\tfill_window();\n\t\t\t\tif (lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) {\n\t\t\t\t\treturn NeedMore;\n\t\t\t\t}\n\t\t\t\tif (lookahead === 0)\n\t\t\t\t\tbreak; // flush the current block\n\t\t\t}\n\n\t\t\t// Insert the string win[strstart .. strstart+2] in the\n\t\t\t// dictionary, and set hash_head to the head of the hash chain:\n\n\t\t\tif (lookahead >= MIN_MATCH) {\n\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\thead[ins_h] = strstart;\n\t\t\t}\n\n\t\t\t// Find the longest match, discarding those <= prev_length.\n\t\t\tprev_length = match_length;\n\t\t\tprev_match = match_start;\n\t\t\tmatch_length = MIN_MATCH - 1;\n\n\t\t\tif (hash_head !== 0 && prev_length < max_lazy_match && ((strstart - hash_head) & 0xffff) <= w_size - MIN_LOOKAHEAD) {\n\t\t\t\t// To simplify the code, we prevent matches with the string\n\t\t\t\t// of win index 0 (in particular we have to avoid a match\n\t\t\t\t// of the string with itself at the start of the input file).\n\n\t\t\t\tif (strategy != Z_HUFFMAN_ONLY) {\n\t\t\t\t\tmatch_length = longest_match(hash_head);\n\t\t\t\t}\n\t\t\t\t// longest_match() sets match_start\n\n\t\t\t\tif (match_length <= 5 && (strategy == Z_FILTERED || (match_length == MIN_MATCH && strstart - match_start > 4096))) {\n\n\t\t\t\t\t// If prev_match is also MIN_MATCH, match_start is garbage\n\t\t\t\t\t// but we will ignore the current match anyway.\n\t\t\t\t\tmatch_length = MIN_MATCH - 1;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// If there was a match at the previous step and the current\n\t\t\t// match is not better, output the previous match:\n\t\t\tif (prev_length >= MIN_MATCH && match_length <= prev_length) {\n\t\t\t\tmax_insert = strstart + lookahead - MIN_MATCH;\n\t\t\t\t// Do not insert strings in hash table beyond this.\n\n\t\t\t\t// check_match(strstart-1, prev_match, prev_length);\n\n\t\t\t\tbflush = _tr_tally(strstart - 1 - prev_match, prev_length - MIN_MATCH);\n\n\t\t\t\t// Insert in hash table all strings up to the end of the match.\n\t\t\t\t// strstart-1 and strstart are already inserted. If there is not\n\t\t\t\t// enough lookahead, the last two strings are not inserted in\n\t\t\t\t// the hash table.\n\t\t\t\tlookahead -= prev_length - 1;\n\t\t\t\tprev_length -= 2;\n\t\t\t\tdo {\n\t\t\t\t\tif (++strstart <= max_insert) {\n\t\t\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\t\t\thead[ins_h] = strstart;\n\t\t\t\t\t}\n\t\t\t\t} while (--prev_length !== 0);\n\t\t\t\tmatch_available = 0;\n\t\t\t\tmatch_length = MIN_MATCH - 1;\n\t\t\t\tstrstart++;\n\n\t\t\t\tif (bflush) {\n\t\t\t\t\tflush_block_only(false);\n\t\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\t\treturn NeedMore;\n\t\t\t\t}\n\t\t\t} else if (match_available !== 0) {\n\n\t\t\t\t// If there was no match at the previous position, output a\n\t\t\t\t// single literal. If there was a match but the current match\n\t\t\t\t// is longer, truncate the previous match to a single literal.\n\n\t\t\t\tbflush = _tr_tally(0, win[strstart - 1] & 0xff);\n\n\t\t\t\tif (bflush) {\n\t\t\t\t\tflush_block_only(false);\n\t\t\t\t}\n\t\t\t\tstrstart++;\n\t\t\t\tlookahead--;\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\t\t\t} else {\n\t\t\t\t// There is no previous match to compare with, wait for\n\t\t\t\t// the next step to decide.\n\n\t\t\t\tmatch_available = 1;\n\t\t\t\tstrstart++;\n\t\t\t\tlookahead--;\n\t\t\t}\n\t\t}\n\n\t\tif (match_available !== 0) {\n\t\t\tbflush = _tr_tally(0, win[strstart - 1] & 0xff);\n\t\t\tmatch_available = 0;\n\t\t}\n\t\tflush_block_only(flush == Z_FINISH);\n\n\t\tif (strm.avail_out === 0) {\n\t\t\tif (flush == Z_FINISH)\n\t\t\t\treturn FinishStarted;\n\t\t\telse\n\t\t\t\treturn NeedMore;\n\t\t}\n\n\t\treturn flush == Z_FINISH ? FinishDone : BlockDone;\n\t}\n\n\tfunction deflateReset(strm) {\n\t\tstrm.total_in = strm.total_out = 0;\n\t\tstrm.msg = null; //\n\n\t\tthat.pending = 0;\n\t\tthat.pending_out = 0;\n\n\t\tstatus = BUSY_STATE;\n\n\t\tlast_flush = Z_NO_FLUSH;\n\n\t\ttr_init();\n\t\tlm_init();\n\t\treturn Z_OK;\n\t}\n\n\tthat.deflateInit = function (strm, _level, bits, _method, memLevel, _strategy) {\n\t\tif (!_method)\n\t\t\t_method = Z_DEFLATED;\n\t\tif (!memLevel)\n\t\t\tmemLevel = DEF_MEM_LEVEL;\n\t\tif (!_strategy)\n\t\t\t_strategy = Z_DEFAULT_STRATEGY;\n\n\t\t// byte[] my_version=ZLIB_VERSION;\n\n\t\t//\n\t\t// if (!version || version[0] != my_version[0]\n\t\t// || stream_size != sizeof(z_stream)) {\n\t\t// return Z_VERSION_ERROR;\n\t\t// }\n\n\t\tstrm.msg = null;\n\n\t\tif (_level == Z_DEFAULT_COMPRESSION)\n\t\t\t_level = 6;\n\n\t\tif (memLevel < 1 || memLevel > MAX_MEM_LEVEL || _method != Z_DEFLATED || bits < 9 || bits > 15 || _level < 0 || _level > 9 || _strategy < 0\n\t\t\t|| _strategy > Z_HUFFMAN_ONLY) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\n\t\tstrm.dstate = that;\n\n\t\tw_bits = bits;\n\t\tw_size = 1 << w_bits;\n\t\tw_mask = w_size - 1;\n\n\t\thash_bits = memLevel + 7;\n\t\thash_size = 1 << hash_bits;\n\t\thash_mask = hash_size - 1;\n\t\thash_shift = Math.floor((hash_bits + MIN_MATCH - 1) / MIN_MATCH);\n\n\t\twin = new Uint8Array(w_size * 2);\n\t\tprev = [];\n\t\thead = [];\n\n\t\tlit_bufsize = 1 << (memLevel + 6); // 16K elements by default\n\n\t\tthat.pending_buf = new Uint8Array(lit_bufsize * 4);\n\t\tpending_buf_size = lit_bufsize * 4;\n\n\t\tthat.dist_buf = new Uint16Array(lit_bufsize);\n\t\tthat.lc_buf = new Uint8Array(lit_bufsize);\n\n\t\tlevel = _level;\n\n\t\tstrategy = _strategy;\n\n\t\treturn deflateReset(strm);\n\t};\n\n\tthat.deflateEnd = function () {\n\t\tif (status != INIT_STATE && status != BUSY_STATE && status != FINISH_STATE) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\t// Deallocate in reverse order of allocations:\n\t\tthat.lc_buf = null;\n\t\tthat.dist_buf = null;\n\t\tthat.pending_buf = null;\n\t\thead = null;\n\t\tprev = null;\n\t\twin = null;\n\t\t// free\n\t\tthat.dstate = null;\n\t\treturn status == BUSY_STATE ? Z_DATA_ERROR : Z_OK;\n\t};\n\n\tthat.deflateParams = function (strm, _level, _strategy) {\n\t\tlet err = Z_OK;\n\n\t\tif (_level == Z_DEFAULT_COMPRESSION) {\n\t\t\t_level = 6;\n\t\t}\n\t\tif (_level < 0 || _level > 9 || _strategy < 0 || _strategy > Z_HUFFMAN_ONLY) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\n\t\tif (config_table[level].func != config_table[_level].func && strm.total_in !== 0) {\n\t\t\t// Flush the last buffer:\n\t\t\terr = strm.deflate(Z_PARTIAL_FLUSH);\n\t\t}\n\n\t\tif (level != _level) {\n\t\t\tlevel = _level;\n\t\t\tmax_lazy_match = config_table[level].max_lazy;\n\t\t\tgood_match = config_table[level].good_length;\n\t\t\tnice_match = config_table[level].nice_length;\n\t\t\tmax_chain_length = config_table[level].max_chain;\n\t\t}\n\t\tstrategy = _strategy;\n\t\treturn err;\n\t};\n\n\tthat.deflateSetDictionary = function (_strm, dictionary, dictLength) {\n\t\tlet length = dictLength;\n\t\tlet n, index = 0;\n\n\t\tif (!dictionary || status != INIT_STATE)\n\t\t\treturn Z_STREAM_ERROR;\n\n\t\tif (length < MIN_MATCH)\n\t\t\treturn Z_OK;\n\t\tif (length > w_size - MIN_LOOKAHEAD) {\n\t\t\tlength = w_size - MIN_LOOKAHEAD;\n\t\t\tindex = dictLength - length; // use the tail of the dictionary\n\t\t}\n\t\twin.set(dictionary.subarray(index, index + length), 0);\n\n\t\tstrstart = length;\n\t\tblock_start = length;\n\n\t\t// Insert all strings in the hash table (except for the last two bytes).\n\t\t// s->lookahead stays null, so s->ins_h will be recomputed at the next\n\t\t// call of fill_window.\n\n\t\tins_h = win[0] & 0xff;\n\t\tins_h = (((ins_h) << hash_shift) ^ (win[1] & 0xff)) & hash_mask;\n\n\t\tfor (n = 0; n <= length - MIN_MATCH; n++) {\n\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(n) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\tprev[n & w_mask] = head[ins_h];\n\t\t\thead[ins_h] = n;\n\t\t}\n\t\treturn Z_OK;\n\t};\n\n\tthat.deflate = function (_strm, flush) {\n\t\tlet i, header, level_flags, old_flush, bstate;\n\n\t\tif (flush > Z_FINISH || flush < 0) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\n\t\tif (!_strm.next_out || (!_strm.next_in && _strm.avail_in !== 0) || (status == FINISH_STATE && flush != Z_FINISH)) {\n\t\t\t_strm.msg = z_errmsg[Z_NEED_DICT - (Z_STREAM_ERROR)];\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\tif (_strm.avail_out === 0) {\n\t\t\t_strm.msg = z_errmsg[Z_NEED_DICT - (Z_BUF_ERROR)];\n\t\t\treturn Z_BUF_ERROR;\n\t\t}\n\n\t\tstrm = _strm; // just in case\n\t\told_flush = last_flush;\n\t\tlast_flush = flush;\n\n\t\t// Write the zlib header\n\t\tif (status == INIT_STATE) {\n\t\t\theader = (Z_DEFLATED + ((w_bits - 8) << 4)) << 8;\n\t\t\tlevel_flags = ((level - 1) & 0xff) >> 1;\n\n\t\t\tif (level_flags > 3)\n\t\t\t\tlevel_flags = 3;\n\t\t\theader |= (level_flags << 6);\n\t\t\tif (strstart !== 0)\n\t\t\t\theader |= PRESET_DICT;\n\t\t\theader += 31 - (header % 31);\n\n\t\t\tstatus = BUSY_STATE;\n\t\t\tputShortMSB(header);\n\t\t}\n\n\t\t// Flush as much pending output as possible\n\t\tif (that.pending !== 0) {\n\t\t\tstrm.flush_pending();\n\t\t\tif (strm.avail_out === 0) {\n\t\t\t\t// console.log(\" avail_out==0\");\n\t\t\t\t// Since avail_out is 0, deflate will be called again with\n\t\t\t\t// more output space, but possibly with both pending and\n\t\t\t\t// avail_in equal to zero. There won't be anything to do,\n\t\t\t\t// but this is not an error situation so make sure we\n\t\t\t\t// return OK instead of BUF_ERROR at next call of deflate:\n\t\t\t\tlast_flush = -1;\n\t\t\t\treturn Z_OK;\n\t\t\t}\n\n\t\t\t// Make sure there is something to do and avoid duplicate\n\t\t\t// consecutive\n\t\t\t// flushes. For repeated and useless calls with Z_FINISH, we keep\n\t\t\t// returning Z_STREAM_END instead of Z_BUFF_ERROR.\n\t\t} else if (strm.avail_in === 0 && flush <= old_flush && flush != Z_FINISH) {\n\t\t\tstrm.msg = z_errmsg[Z_NEED_DICT - (Z_BUF_ERROR)];\n\t\t\treturn Z_BUF_ERROR;\n\t\t}\n\n\t\t// User must not provide more input after the first FINISH:\n\t\tif (status == FINISH_STATE && strm.avail_in !== 0) {\n\t\t\t_strm.msg = z_errmsg[Z_NEED_DICT - (Z_BUF_ERROR)];\n\t\t\treturn Z_BUF_ERROR;\n\t\t}\n\n\t\t// Start a new block or continue the current one.\n\t\tif (strm.avail_in !== 0 || lookahead !== 0 || (flush != Z_NO_FLUSH && status != FINISH_STATE)) {\n\t\t\tbstate = -1;\n\t\t\tswitch (config_table[level].func) {\n\t\t\t\tcase STORED:\n\t\t\t\t\tbstate = deflate_stored(flush);\n\t\t\t\t\tbreak;\n\t\t\t\tcase FAST:\n\t\t\t\t\tbstate = deflate_fast(flush);\n\t\t\t\t\tbreak;\n\t\t\t\tcase SLOW:\n\t\t\t\t\tbstate = deflate_slow(flush);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t}\n\n\t\t\tif (bstate == FinishStarted || bstate == FinishDone) {\n\t\t\t\tstatus = FINISH_STATE;\n\t\t\t}\n\t\t\tif (bstate == NeedMore || bstate == FinishStarted) {\n\t\t\t\tif (strm.avail_out === 0) {\n\t\t\t\t\tlast_flush = -1; // avoid BUF_ERROR next call, see above\n\t\t\t\t}\n\t\t\t\treturn Z_OK;\n\t\t\t\t// If flush != Z_NO_FLUSH && avail_out === 0, the next call\n\t\t\t\t// of deflate should use the same flush parameter to make sure\n\t\t\t\t// that the flush is complete. So we don't have to output an\n\t\t\t\t// empty block here, this will be done at next call. This also\n\t\t\t\t// ensures that for a very small output buffer, we emit at most\n\t\t\t\t// one empty block.\n\t\t\t}\n\n\t\t\tif (bstate == BlockDone) {\n\t\t\t\tif (flush == Z_PARTIAL_FLUSH) {\n\t\t\t\t\t_tr_align();\n\t\t\t\t} else { // FULL_FLUSH or SYNC_FLUSH\n\t\t\t\t\t_tr_stored_block(0, 0, false);\n\t\t\t\t\t// For a full flush, this empty block will be recognized\n\t\t\t\t\t// as a special marker by inflate_sync().\n\t\t\t\t\tif (flush == Z_FULL_FLUSH) {\n\t\t\t\t\t\t// state.head[s.hash_size-1]=0;\n\t\t\t\t\t\tfor (i = 0; i < hash_size/*-1*/; i++)\n\t\t\t\t\t\t\t// forget history\n\t\t\t\t\t\t\thead[i] = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tstrm.flush_pending();\n\t\t\t\tif (strm.avail_out === 0) {\n\t\t\t\t\tlast_flush = -1; // avoid BUF_ERROR at next call, see above\n\t\t\t\t\treturn Z_OK;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (flush != Z_FINISH)\n\t\t\treturn Z_OK;\n\t\treturn Z_STREAM_END;\n\t};\n}\n\n// ZStream\n\nfunction ZStream() {\n\tconst that = this;\n\tthat.next_in_index = 0;\n\tthat.next_out_index = 0;\n\t// that.next_in; // next input byte\n\tthat.avail_in = 0; // number of bytes available at next_in\n\tthat.total_in = 0; // total nb of input bytes read so far\n\t// that.next_out; // next output byte should be put there\n\tthat.avail_out = 0; // remaining free space at next_out\n\tthat.total_out = 0; // total nb of bytes output so far\n\t// that.msg;\n\t// that.dstate;\n}\n\nZStream.prototype = {\n\tdeflateInit(level, bits) {\n\t\tconst that = this;\n\t\tthat.dstate = new Deflate();\n\t\tif (!bits)\n\t\t\tbits = MAX_BITS;\n\t\treturn that.dstate.deflateInit(that, level, bits);\n\t},\n\n\tdeflate(flush) {\n\t\tconst that = this;\n\t\tif (!that.dstate) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\treturn that.dstate.deflate(that, flush);\n\t},\n\n\tdeflateEnd() {\n\t\tconst that = this;\n\t\tif (!that.dstate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst ret = that.dstate.deflateEnd();\n\t\tthat.dstate = null;\n\t\treturn ret;\n\t},\n\n\tdeflateParams(level, strategy) {\n\t\tconst that = this;\n\t\tif (!that.dstate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.dstate.deflateParams(that, level, strategy);\n\t},\n\n\tdeflateSetDictionary(dictionary, dictLength) {\n\t\tconst that = this;\n\t\tif (!that.dstate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.dstate.deflateSetDictionary(that, dictionary, dictLength);\n\t},\n\n\t// Read a new buffer from the current input stream, update the\n\t// total number of bytes read. All deflate() input goes through\n\t// this function so some applications may wish to modify it to avoid\n\t// allocating a large strm->next_in buffer and copying from it.\n\t// (See also flush_pending()).\n\tread_buf(buf, start, size) {\n\t\tconst that = this;\n\t\tlet len = that.avail_in;\n\t\tif (len > size)\n\t\t\tlen = size;\n\t\tif (len === 0)\n\t\t\treturn 0;\n\t\tthat.avail_in -= len;\n\t\tbuf.set(that.next_in.subarray(that.next_in_index, that.next_in_index + len), start);\n\t\tthat.next_in_index += len;\n\t\tthat.total_in += len;\n\t\treturn len;\n\t},\n\n\t// Flush as much pending output as possible. All deflate() output goes\n\t// through this function so some applications may wish to modify it\n\t// to avoid allocating a large strm->next_out buffer and copying into it.\n\t// (See also read_buf()).\n\tflush_pending() {\n\t\tconst that = this;\n\t\tlet len = that.dstate.pending;\n\n\t\tif (len > that.avail_out)\n\t\t\tlen = that.avail_out;\n\t\tif (len === 0)\n\t\t\treturn;\n\n\t\t// if (that.dstate.pending_buf.length <= that.dstate.pending_out || that.next_out.length <= that.next_out_index\n\t\t// || that.dstate.pending_buf.length < (that.dstate.pending_out + len) || that.next_out.length < (that.next_out_index +\n\t\t// len)) {\n\t\t// console.log(that.dstate.pending_buf.length + \", \" + that.dstate.pending_out + \", \" + that.next_out.length + \", \" +\n\t\t// that.next_out_index + \", \" + len);\n\t\t// console.log(\"avail_out=\" + that.avail_out);\n\t\t// }\n\n\t\tthat.next_out.set(that.dstate.pending_buf.subarray(that.dstate.pending_out, that.dstate.pending_out + len), that.next_out_index);\n\n\t\tthat.next_out_index += len;\n\t\tthat.dstate.pending_out += len;\n\t\tthat.total_out += len;\n\t\tthat.avail_out -= len;\n\t\tthat.dstate.pending -= len;\n\t\tif (that.dstate.pending === 0) {\n\t\t\tthat.dstate.pending_out = 0;\n\t\t}\n\t}\n};\n\n// Deflate\n\nfunction ZipDeflate(options) {\n\tconst that = this;\n\tconst z = new ZStream();\n\tconst bufsize = getMaximumCompressedSize(options && options.chunkSize ? options.chunkSize : 64 * 1024);\n\tconst flush = Z_NO_FLUSH;\n\tconst buf = new Uint8Array(bufsize);\n\tlet level = options ? options.level : Z_DEFAULT_COMPRESSION;\n\tif (typeof level == \"undefined\")\n\t\tlevel = Z_DEFAULT_COMPRESSION;\n\tz.deflateInit(level);\n\tz.next_out = buf;\n\n\tthat.append = function (data, onprogress) {\n\t\tlet err, array, lastIndex = 0, bufferIndex = 0, bufferSize = 0;\n\t\tconst buffers = [];\n\t\tif (!data.length)\n\t\t\treturn;\n\t\tz.next_in_index = 0;\n\t\tz.next_in = data;\n\t\tz.avail_in = data.length;\n\t\tdo {\n\t\t\tz.next_out_index = 0;\n\t\t\tz.avail_out = bufsize;\n\t\t\terr = z.deflate(flush);\n\t\t\tif (err != Z_OK)\n\t\t\t\tthrow new Error(\"deflating: \" + z.msg);\n\t\t\tif (z.next_out_index)\n\t\t\t\tif (z.next_out_index == bufsize)\n\t\t\t\t\tbuffers.push(new Uint8Array(buf));\n\t\t\t\telse\n\t\t\t\t\tbuffers.push(buf.slice(0, z.next_out_index));\n\t\t\tbufferSize += z.next_out_index;\n\t\t\tif (onprogress && z.next_in_index > 0 && z.next_in_index != lastIndex) {\n\t\t\t\tonprogress(z.next_in_index);\n\t\t\t\tlastIndex = z.next_in_index;\n\t\t\t}\n\t\t} while (z.avail_in > 0 || z.avail_out === 0);\n\t\tif (buffers.length > 1) {\n\t\t\tarray = new Uint8Array(bufferSize);\n\t\t\tbuffers.forEach(function (chunk) {\n\t\t\t\tarray.set(chunk, bufferIndex);\n\t\t\t\tbufferIndex += chunk.length;\n\t\t\t});\n\t\t} else {\n\t\t\tarray = buffers[0] || new Uint8Array();\n\t\t}\n\t\treturn array;\n\t};\n\tthat.flush = function () {\n\t\tlet err, array, bufferIndex = 0, bufferSize = 0;\n\t\tconst buffers = [];\n\t\tdo {\n\t\t\tz.next_out_index = 0;\n\t\t\tz.avail_out = bufsize;\n\t\t\terr = z.deflate(Z_FINISH);\n\t\t\tif (err != Z_STREAM_END && err != Z_OK)\n\t\t\t\tthrow new Error(\"deflating: \" + z.msg);\n\t\t\tif (bufsize - z.avail_out > 0)\n\t\t\t\tbuffers.push(buf.slice(0, z.next_out_index));\n\t\t\tbufferSize += z.next_out_index;\n\t\t} while (z.avail_in > 0 || z.avail_out === 0);\n\t\tz.deflateEnd();\n\t\tarray = new Uint8Array(bufferSize);\n\t\tbuffers.forEach(function (chunk) {\n\t\t\tarray.set(chunk, bufferIndex);\n\t\t\tbufferIndex += chunk.length;\n\t\t});\n\t\treturn array;\n\t};\n}\n\nfunction getMaximumCompressedSize(uncompressedSize) {\n\treturn uncompressedSize + (5 * (Math.floor(uncompressedSize / 16383) + 1));\n}\n\nexport {\n\tZipDeflate as Deflate\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/*\n * This program is based on JZlib 1.0.2 ymnk, JCraft,Inc.\n * JZlib is based on zlib-1.1.3, so all credit should go authors\n * Jean-loup Gailly(jloup@gzip.org) and Mark Adler(madler@alumni.caltech.edu)\n * and contributors of zlib.\n */\n\n// deno-lint-ignore-file no-this-alias prefer-const\n\n// Global\n\nconst MAX_BITS = 15;\n\nconst Z_OK = 0;\nconst Z_STREAM_END = 1;\nconst Z_NEED_DICT = 2;\nconst Z_STREAM_ERROR = -2;\nconst Z_DATA_ERROR = -3;\nconst Z_MEM_ERROR = -4;\nconst Z_BUF_ERROR = -5;\n\nconst inflate_mask = [0x00000000, 0x00000001, 0x00000003, 0x00000007, 0x0000000f, 0x0000001f, 0x0000003f, 0x0000007f, 0x000000ff, 0x000001ff, 0x000003ff,\n\t0x000007ff, 0x00000fff, 0x00001fff, 0x00003fff, 0x00007fff, 0x0000ffff];\n\nconst MANY = 1440;\n\n// JZlib version : \"1.0.2\"\nconst Z_NO_FLUSH = 0;\nconst Z_FINISH = 4;\n\n// InfTree\nconst fixed_bl = 9;\nconst fixed_bd = 5;\n\nconst fixed_tl = [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,\n\t0, 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,\n\t0, 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,\n\t0, 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,\n\t0, 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,\n\t35, 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,\n\t26, 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,\n\t7, 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,\n\t8, 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,\n\t8, 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,\n\t0, 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,\n\t81, 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,\n\t0, 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,\n\t84, 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,\n\t0, 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,\n\t80, 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,\n\t0, 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,\n\t0, 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,\n\t0, 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,\n\t193, 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,\n\t120, 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,\n\t227, 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,\n\t92, 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,\n\t249, 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,\n\t130, 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,\n\t181, 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,\n\t102, 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,\n\t221, 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,\n\t8, 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,\n\t147, 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,\n\t85, 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,\n\t235, 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,\n\t141, 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,\n\t167, 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,\n\t107, 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,\n\t207, 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,\n\t127, 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];\nconst fixed_td = [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,\n\t8193, 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,\n\t24577, 80, 5, 4, 88, 5, 769, 84, 5, 49, 92, 5, 12289, 82, 5, 13, 90, 5, 3073, 86, 5, 193, 192, 5, 24577];\n\n// Tables for deflate from PKZIP's appnote.txt.\nconst cplens = [ // Copy lengths for literal codes 257..285\n\t3, 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];\n\n// see note #13 above about 258\nconst cplext = [ // Extra bits for literal codes 257..285\n\t0, 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 // 112==invalid\n];\n\nconst cpdist = [ // Copy offsets for distance codes 0..29\n\t1, 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];\n\nconst cpdext = [ // Extra bits for distance codes\n\t0, 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];\n\n// If BMAX needs to be larger than 16, then h and x[] should be uLong.\nconst BMAX = 15; // maximum bit length of any code\n\nfunction InfTree() {\n\tconst that = this;\n\n\tlet hn; // hufts used in space\n\tlet v; // work area for huft_build\n\tlet c; // bit length count table\n\tlet r; // table entry for structure assignment\n\tlet u; // table stack\n\tlet x; // bit offsets, then code stack\n\n\tfunction huft_build(b, // code lengths in bits (all assumed <=\n\t\t// BMAX)\n\t\tbindex, n, // number of codes (assumed <= 288)\n\t\ts, // number of simple-valued codes (0..s-1)\n\t\td, // list of base values for non-simple codes\n\t\te, // list of extra bits for non-simple codes\n\t\tt, // result: starting table\n\t\tm, // maximum lookup bits, returns actual\n\t\thp,// space for trees\n\t\thn,// hufts used in space\n\t\tv // working area: values in order of bit length\n\t) {\n\t\t// Given a list of code lengths and a maximum table size, make a set of\n\t\t// tables to decode that set of codes. Return Z_OK on success,\n\t\t// Z_BUF_ERROR\n\t\t// if the given code set is incomplete (the tables are still built in\n\t\t// this\n\t\t// case), Z_DATA_ERROR if the input is invalid (an over-subscribed set\n\t\t// of\n\t\t// lengths), or Z_MEM_ERROR if not enough memory.\n\n\t\tlet a; // counter for codes of length k\n\t\tlet f; // i repeats in table every f entries\n\t\tlet g; // maximum code length\n\t\tlet h; // table level\n\t\tlet i; // counter, current code\n\t\tlet j; // counter\n\t\tlet k; // number of bits in current code\n\t\tlet l; // bits per table (returned in m)\n\t\tlet mask; // (1 << w) - 1, to avoid cc -O bug on HP\n\t\tlet p; // pointer into c[], b[], or v[]\n\t\tlet q; // points to current table\n\t\tlet w; // bits before this table == (l * h)\n\t\tlet xp; // pointer into x\n\t\tlet y; // number of dummy codes added\n\t\tlet z; // number of entries in current table\n\n\t\t// Generate counts for each bit length\n\n\t\tp = 0;\n\t\ti = n;\n\t\tdo {\n\t\t\tc[b[bindex + p]]++;\n\t\t\tp++;\n\t\t\ti--; // assume all entries <= BMAX\n\t\t} while (i !== 0);\n\n\t\tif (c[0] == n) { // null input--all zero length codes\n\t\t\tt[0] = -1;\n\t\t\tm[0] = 0;\n\t\t\treturn Z_OK;\n\t\t}\n\n\t\t// Find minimum and maximum length, bound *m by those\n\t\tl = m[0];\n\t\tfor (j = 1; j <= BMAX; j++)\n\t\t\tif (c[j] !== 0)\n\t\t\t\tbreak;\n\t\tk = j; // minimum code length\n\t\tif (l < j) {\n\t\t\tl = j;\n\t\t}\n\t\tfor (i = BMAX; i !== 0; i--) {\n\t\t\tif (c[i] !== 0)\n\t\t\t\tbreak;\n\t\t}\n\t\tg = i; // maximum code length\n\t\tif (l > i) {\n\t\t\tl = i;\n\t\t}\n\t\tm[0] = l;\n\n\t\t// Adjust last length count to fill out codes, if needed\n\t\tfor (y = 1 << j; j < i; j++, y <<= 1) {\n\t\t\tif ((y -= c[j]) < 0) {\n\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t}\n\t\t}\n\t\tif ((y -= c[i]) < 0) {\n\t\t\treturn Z_DATA_ERROR;\n\t\t}\n\t\tc[i] += y;\n\n\t\t// Generate starting offsets into the value table for each length\n\t\tx[1] = j = 0;\n\t\tp = 1;\n\t\txp = 2;\n\t\twhile (--i !== 0) { // note that i == g from above\n\t\t\tx[xp] = (j += c[p]);\n\t\t\txp++;\n\t\t\tp++;\n\t\t}\n\n\t\t// Make a table of values in order of bit lengths\n\t\ti = 0;\n\t\tp = 0;\n\t\tdo {\n\t\t\tif ((j = b[bindex + p]) !== 0) {\n\t\t\t\tv[x[j]++] = i;\n\t\t\t}\n\t\t\tp++;\n\t\t} while (++i < n);\n\t\tn = x[g]; // set n to length of v\n\n\t\t// Generate the Huffman codes and for each, make the table entries\n\t\tx[0] = i = 0; // first Huffman code is zero\n\t\tp = 0; // grab values in bit order\n\t\th = -1; // no tables yet--level -1\n\t\tw = -l; // bits decoded == (l * h)\n\t\tu[0] = 0; // just to keep compilers happy\n\t\tq = 0; // ditto\n\t\tz = 0; // ditto\n\n\t\t// go through the bit lengths (k already is bits in shortest code)\n\t\tfor (; k <= g; k++) {\n\t\t\ta = c[k];\n\t\t\twhile (a-- !== 0) {\n\t\t\t\t// here i is the Huffman code of length k bits for value *p\n\t\t\t\t// make tables up to required level\n\t\t\t\twhile (k > w + l) {\n\t\t\t\t\th++;\n\t\t\t\t\tw += l; // previous table always l bits\n\t\t\t\t\t// compute minimum size table less than or equal to l bits\n\t\t\t\t\tz = g - w;\n\t\t\t\t\tz = (z > l) ? l : z; // table size upper limit\n\t\t\t\t\tif ((f = 1 << (j = k - w)) > a + 1) { // try a k-w bit table\n\t\t\t\t\t\t// too few codes for\n\t\t\t\t\t\t// k-w bit table\n\t\t\t\t\t\tf -= a + 1; // deduct codes from patterns left\n\t\t\t\t\t\txp = k;\n\t\t\t\t\t\tif (j < z) {\n\t\t\t\t\t\t\twhile (++j < z) { // try smaller tables up to z bits\n\t\t\t\t\t\t\t\tif ((f <<= 1) <= c[++xp])\n\t\t\t\t\t\t\t\t\tbreak; // enough codes to use up j bits\n\t\t\t\t\t\t\t\tf -= c[xp]; // else deduct codes from patterns\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tz = 1 << j; // table entries for j-bit table\n\n\t\t\t\t\t// allocate new table\n\t\t\t\t\tif (hn[0] + z > MANY) { // (note: doesn't matter for fixed)\n\t\t\t\t\t\treturn Z_DATA_ERROR; // overflow of MANY\n\t\t\t\t\t}\n\t\t\t\t\tu[h] = q = /* hp+ */hn[0]; // DEBUG\n\t\t\t\t\thn[0] += z;\n\n\t\t\t\t\t// connect to last table, if there is one\n\t\t\t\t\tif (h !== 0) {\n\t\t\t\t\t\tx[h] = i; // save pattern for backing up\n\t\t\t\t\t\tr[0] = /* (byte) */j; // bits in this table\n\t\t\t\t\t\tr[1] = /* (byte) */l; // bits to dump before this table\n\t\t\t\t\t\tj = i >>> (w - l);\n\t\t\t\t\t\tr[2] = /* (int) */(q - u[h - 1] - j); // offset to this table\n\t\t\t\t\t\thp.set(r, (u[h - 1] + j) * 3);\n\t\t\t\t\t\t// to\n\t\t\t\t\t\t// last\n\t\t\t\t\t\t// table\n\t\t\t\t\t} else {\n\t\t\t\t\t\tt[0] = q; // first table is returned result\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// set up table entry in r\n\t\t\t\tr[1] = /* (byte) */(k - w);\n\t\t\t\tif (p >= n) {\n\t\t\t\t\tr[0] = 128 + 64; // out of values--invalid code\n\t\t\t\t} else if (v[p] < s) {\n\t\t\t\t\tr[0] = /* (byte) */(v[p] < 256 ? 0 : 32 + 64); // 256 is\n\t\t\t\t\t// end-of-block\n\t\t\t\t\tr[2] = v[p++]; // simple code is just the value\n\t\t\t\t} else {\n\t\t\t\t\tr[0] = /* (byte) */(e[v[p] - s] + 16 + 64); // non-simple--look\n\t\t\t\t\t// up in lists\n\t\t\t\t\tr[2] = d[v[p++] - s];\n\t\t\t\t}\n\n\t\t\t\t// fill code-like entries with r\n\t\t\t\tf = 1 << (k - w);\n\t\t\t\tfor (j = i >>> w; j < z; j += f) {\n\t\t\t\t\thp.set(r, (q + j) * 3);\n\t\t\t\t}\n\n\t\t\t\t// backwards increment the k-bit code i\n\t\t\t\tfor (j = 1 << (k - 1); (i & j) !== 0; j >>>= 1) {\n\t\t\t\t\ti ^= j;\n\t\t\t\t}\n\t\t\t\ti ^= j;\n\n\t\t\t\t// backup over finished tables\n\t\t\t\tmask = (1 << w) - 1; // needed on HP, cc -O bug\n\t\t\t\twhile ((i & mask) != x[h]) {\n\t\t\t\t\th--; // don't need to update q\n\t\t\t\t\tw -= l;\n\t\t\t\t\tmask = (1 << w) - 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// Return Z_BUF_ERROR if we were given an incomplete table\n\t\treturn y !== 0 && g != 1 ? Z_BUF_ERROR : Z_OK;\n\t}\n\n\tfunction initWorkArea(vsize) {\n\t\tlet i;\n\t\tif (!hn) {\n\t\t\thn = []; // []; //new Array(1);\n\t\t\tv = []; // new Array(vsize);\n\t\t\tc = new Int32Array(BMAX + 1); // new Array(BMAX + 1);\n\t\t\tr = []; // new Array(3);\n\t\t\tu = new Int32Array(BMAX); // new Array(BMAX);\n\t\t\tx = new Int32Array(BMAX + 1); // new Array(BMAX + 1);\n\t\t}\n\t\tif (v.length < vsize) {\n\t\t\tv = []; // new Array(vsize);\n\t\t}\n\t\tfor (i = 0; i < vsize; i++) {\n\t\t\tv[i] = 0;\n\t\t}\n\t\tfor (i = 0; i < BMAX + 1; i++) {\n\t\t\tc[i] = 0;\n\t\t}\n\t\tfor (i = 0; i < 3; i++) {\n\t\t\tr[i] = 0;\n\t\t}\n\t\t// for(int i=0; i 257)) {\n\t\t\tif (result == Z_DATA_ERROR) {\n\t\t\t\tz.msg = \"oversubscribed distance tree\";\n\t\t\t} else if (result == Z_BUF_ERROR) {\n\t\t\t\tz.msg = \"incomplete distance tree\";\n\t\t\t\tresult = Z_DATA_ERROR;\n\t\t\t} else if (result != Z_MEM_ERROR) {\n\t\t\t\tz.msg = \"empty distance tree with lengths\";\n\t\t\t\tresult = Z_DATA_ERROR;\n\t\t\t}\n\t\t\treturn result;\n\t\t}\n\n\t\treturn Z_OK;\n\t};\n\n}\n\nInfTree.inflate_trees_fixed = function (bl, // literal desired/actual bit depth\n\tbd, // distance desired/actual bit depth\n\ttl,// literal/length tree result\n\ttd// distance tree result\n) {\n\tbl[0] = fixed_bl;\n\tbd[0] = fixed_bd;\n\ttl[0] = fixed_tl;\n\ttd[0] = fixed_td;\n\treturn Z_OK;\n};\n\n// InfCodes\n\n// waiting for \"i:\"=input,\n// \"o:\"=output,\n// \"x:\"=nothing\nconst START = 0; // x: set up for LEN\nconst LEN = 1; // i: get length/literal/eob next\nconst LENEXT = 2; // i: getting length extra (have base)\nconst DIST = 3; // i: get distance next\nconst DISTEXT = 4;// i: getting distance extra\nconst COPY = 5; // o: copying bytes in win, waiting\n// for space\nconst LIT = 6; // o: got literal, waiting for output\n// space\nconst WASH = 7; // o: got eob, possibly still output\n// waiting\nconst END = 8; // x: got eob and all data flushed\nconst BADCODE = 9;// x: got error\n\nfunction InfCodes() {\n\tconst that = this;\n\n\tlet mode; // current inflate_codes mode\n\n\t// mode dependent information\n\tlet len = 0;\n\n\tlet tree; // pointer into tree\n\tlet tree_index = 0;\n\tlet need = 0; // bits needed\n\n\tlet lit = 0;\n\n\t// if EXT or COPY, where and how much\n\tlet get = 0; // bits to get for extra\n\tlet dist = 0; // distance back to copy from\n\n\tlet lbits = 0; // ltree bits decoded per branch\n\tlet dbits = 0; // dtree bits decoder per branch\n\tlet ltree; // literal/length/eob tree\n\tlet ltree_index = 0; // literal/length/eob tree\n\tlet dtree; // distance tree\n\tlet dtree_index = 0; // distance tree\n\n\t// Called with number of bytes left to write in win at least 258\n\t// (the maximum string length) and number of input bytes available\n\t// at least ten. The ten bytes are six bytes for the longest length/\n\t// distance pair plus four bytes for overloading the bit buffer.\n\n\tfunction inflate_fast(bl, bd, tl, tl_index, td, td_index, s, z) {\n\t\tlet t; // temporary pointer\n\t\tlet tp; // temporary pointer\n\t\tlet tp_index; // temporary pointer\n\t\tlet e; // extra bits or operation\n\t\tlet b; // bit buffer\n\t\tlet k; // bits in bit buffer\n\t\tlet p; // input data pointer\n\t\tlet n; // bytes available there\n\t\tlet q; // output win write pointer\n\t\tlet m; // bytes to end of win or read pointer\n\t\tlet ml; // mask for literal/length tree\n\t\tlet md; // mask for distance tree\n\t\tlet c; // bytes to copy\n\t\tlet d; // distance back to copy from\n\t\tlet r; // copy source pointer\n\n\t\tlet tp_index_t_3; // (tp_index+t)*3\n\n\t\t// load input, output, bit values\n\t\tp = z.next_in_index;\n\t\tn = z.avail_in;\n\t\tb = s.bitb;\n\t\tk = s.bitk;\n\t\tq = s.write;\n\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t// initialize masks\n\t\tml = inflate_mask[bl];\n\t\tmd = inflate_mask[bd];\n\n\t\t// do until not enough input or output space for fast loop\n\t\tdo { // assume called with m >= 258 && n >= 10\n\t\t\t// get literal/length code\n\t\t\twhile (k < (20)) { // max bits for literal/length code\n\t\t\t\tn--;\n\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\tk += 8;\n\t\t\t}\n\n\t\t\tt = b & ml;\n\t\t\ttp = tl;\n\t\t\ttp_index = tl_index;\n\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\tif ((e = tp[tp_index_t_3]) === 0) {\n\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\ts.win[q++] = /* (byte) */tp[tp_index_t_3 + 2];\n\t\t\t\tm--;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tdo {\n\n\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\tif ((e & 16) !== 0) {\n\t\t\t\t\te &= 15;\n\t\t\t\t\tc = tp[tp_index_t_3 + 2] + (/* (int) */b & inflate_mask[e]);\n\n\t\t\t\t\tb >>= e;\n\t\t\t\t\tk -= e;\n\n\t\t\t\t\t// decode distance base of block to copy\n\t\t\t\t\twhile (k < (15)) { // max bits for distance code\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tt = b & md;\n\t\t\t\t\ttp = td;\n\t\t\t\t\ttp_index = td_index;\n\t\t\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\t\t\te = tp[tp_index_t_3];\n\n\t\t\t\t\tdo {\n\n\t\t\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\t\t\tif ((e & 16) !== 0) {\n\t\t\t\t\t\t\t// get extra bits to add to distance base\n\t\t\t\t\t\t\te &= 15;\n\t\t\t\t\t\t\twhile (k < (e)) { // get extra bits (up to 13)\n\t\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\td = tp[tp_index_t_3 + 2] + (b & inflate_mask[e]);\n\n\t\t\t\t\t\t\tb >>= (e);\n\t\t\t\t\t\t\tk -= (e);\n\n\t\t\t\t\t\t\t// do the copy\n\t\t\t\t\t\t\tm -= c;\n\t\t\t\t\t\t\tif (q >= d) { // offset before dest\n\t\t\t\t\t\t\t\t// just copy\n\t\t\t\t\t\t\t\tr = q - d;\n\t\t\t\t\t\t\t\tif (q - r > 0 && 2 > (q - r)) {\n\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++]; // minimum\n\t\t\t\t\t\t\t\t\t// count is\n\t\t\t\t\t\t\t\t\t// three,\n\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++]; // so unroll\n\t\t\t\t\t\t\t\t\t// loop a\n\t\t\t\t\t\t\t\t\t// little\n\t\t\t\t\t\t\t\t\tc -= 2;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\ts.win.set(s.win.subarray(r, r + 2), q);\n\t\t\t\t\t\t\t\t\tq += 2;\n\t\t\t\t\t\t\t\t\tr += 2;\n\t\t\t\t\t\t\t\t\tc -= 2;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else { // else offset after destination\n\t\t\t\t\t\t\t\tr = q - d;\n\t\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t\tr += s.end; // force pointer in win\n\t\t\t\t\t\t\t\t} while (r < 0); // covers invalid distances\n\t\t\t\t\t\t\t\te = s.end - r;\n\t\t\t\t\t\t\t\tif (c > e) { // if source crosses,\n\t\t\t\t\t\t\t\t\tc -= e; // wrapped copy\n\t\t\t\t\t\t\t\t\tif (q - r > 0 && e > (q - r)) {\n\t\t\t\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++];\n\t\t\t\t\t\t\t\t\t\t} while (--e !== 0);\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\ts.win.set(s.win.subarray(r, r + e), q);\n\t\t\t\t\t\t\t\t\t\tq += e;\n\t\t\t\t\t\t\t\t\t\tr += e;\n\t\t\t\t\t\t\t\t\t\te = 0;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tr = 0; // copy rest from start of win\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// copy all or what's left\n\t\t\t\t\t\t\tif (q - r > 0 && c > (q - r)) {\n\t\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++];\n\t\t\t\t\t\t\t\t} while (--c !== 0);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts.win.set(s.win.subarray(r, r + c), q);\n\t\t\t\t\t\t\t\tq += c;\n\t\t\t\t\t\t\t\tr += c;\n\t\t\t\t\t\t\t\tc = 0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t} else if ((e & 64) === 0) {\n\t\t\t\t\t\t\tt += tp[tp_index_t_3 + 2];\n\t\t\t\t\t\t\tt += (b & inflate_mask[e]);\n\t\t\t\t\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\t\t\t\t\te = tp[tp_index_t_3];\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tz.msg = \"invalid distance code\";\n\n\t\t\t\t\t\t\tc = z.avail_in - n;\n\t\t\t\t\t\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\t\t\t\t\t\tn += c;\n\t\t\t\t\t\t\tp -= c;\n\t\t\t\t\t\t\tk -= c << 3;\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\n\t\t\t\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// eslint-disable-next-line no-constant-condition\n\t\t\t\t\t} while (true);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tif ((e & 64) === 0) {\n\t\t\t\t\tt += tp[tp_index_t_3 + 2];\n\t\t\t\t\tt += (b & inflate_mask[e]);\n\t\t\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\t\t\tif ((e = tp[tp_index_t_3]) === 0) {\n\n\t\t\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\t\t\ts.win[q++] = /* (byte) */tp[tp_index_t_3 + 2];\n\t\t\t\t\t\tm--;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t} else if ((e & 32) !== 0) {\n\n\t\t\t\t\tc = z.avail_in - n;\n\t\t\t\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\t\t\t\tn += c;\n\t\t\t\t\tp -= c;\n\t\t\t\t\tk -= c << 3;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\n\t\t\t\t\treturn Z_STREAM_END;\n\t\t\t\t} else {\n\t\t\t\t\tz.msg = \"invalid literal/length code\";\n\n\t\t\t\t\tc = z.avail_in - n;\n\t\t\t\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\t\t\t\tn += c;\n\t\t\t\t\tp -= c;\n\t\t\t\t\tk -= c << 3;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\n\t\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t\t}\n\t\t\t\t// eslint-disable-next-line no-constant-condition\n\t\t\t} while (true);\n\t\t} while (m >= 258 && n >= 10);\n\n\t\t// not enough input or output--restore pointers and return\n\t\tc = z.avail_in - n;\n\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\tn += c;\n\t\tp -= c;\n\t\tk -= c << 3;\n\n\t\ts.bitb = b;\n\t\ts.bitk = k;\n\t\tz.avail_in = n;\n\t\tz.total_in += p - z.next_in_index;\n\t\tz.next_in_index = p;\n\t\ts.write = q;\n\n\t\treturn Z_OK;\n\t}\n\n\tthat.init = function (bl, bd, tl, tl_index, td, td_index) {\n\t\tmode = START;\n\t\tlbits = /* (byte) */bl;\n\t\tdbits = /* (byte) */bd;\n\t\tltree = tl;\n\t\tltree_index = tl_index;\n\t\tdtree = td;\n\t\tdtree_index = td_index;\n\t\ttree = null;\n\t};\n\n\tthat.proc = function (s, z, r) {\n\t\tlet j; // temporary storage\n\t\tlet tindex; // temporary pointer\n\t\tlet e; // extra bits or operation\n\t\tlet b = 0; // bit buffer\n\t\tlet k = 0; // bits in bit buffer\n\t\tlet p = 0; // input data pointer\n\t\tlet n; // bytes available there\n\t\tlet q; // output win write pointer\n\t\tlet m; // bytes to end of win or read pointer\n\t\tlet f; // pointer to copy strings from\n\n\t\t// copy input/output information to locals (UPDATE macro restores)\n\t\tp = z.next_in_index;\n\t\tn = z.avail_in;\n\t\tb = s.bitb;\n\t\tk = s.bitk;\n\t\tq = s.write;\n\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t// process input and output based on current state\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\tswitch (mode) {\n\t\t\t\t// waiting for \"i:\"=input, \"o:\"=output, \"x:\"=nothing\n\t\t\t\tcase START: // x: set up for LEN\n\t\t\t\t\tif (m >= 258 && n >= 10) {\n\n\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\tr = inflate_fast(lbits, dbits, ltree, ltree_index, dtree, dtree_index, s, z);\n\n\t\t\t\t\t\tp = z.next_in_index;\n\t\t\t\t\t\tn = z.avail_in;\n\t\t\t\t\t\tb = s.bitb;\n\t\t\t\t\t\tk = s.bitk;\n\t\t\t\t\t\tq = s.write;\n\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\t\tif (r != Z_OK) {\n\t\t\t\t\t\t\tmode = r == Z_STREAM_END ? WASH : BADCODE;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tneed = lbits;\n\t\t\t\t\ttree = ltree;\n\t\t\t\t\ttree_index = ltree_index;\n\n\t\t\t\t\tmode = LEN;\n\t\t\t\t/* falls through */\n\t\t\t\tcase LEN: // i: get length/literal/eob next\n\t\t\t\t\tj = need;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\ttindex = (tree_index + (b & inflate_mask[j])) * 3;\n\n\t\t\t\t\tb >>>= (tree[tindex + 1]);\n\t\t\t\t\tk -= (tree[tindex + 1]);\n\n\t\t\t\t\te = tree[tindex];\n\n\t\t\t\t\tif (e === 0) { // literal\n\t\t\t\t\t\tlit = tree[tindex + 2];\n\t\t\t\t\t\tmode = LIT;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 16) !== 0) { // length\n\t\t\t\t\t\tget = e & 15;\n\t\t\t\t\t\tlen = tree[tindex + 2];\n\t\t\t\t\t\tmode = LENEXT;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 64) === 0) { // next table\n\t\t\t\t\t\tneed = e;\n\t\t\t\t\t\ttree_index = tindex / 3 + tree[tindex + 2];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 32) !== 0) { // end of block\n\t\t\t\t\t\tmode = WASH;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tmode = BADCODE; // invalid code\n\t\t\t\t\tz.msg = \"invalid literal/length code\";\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tcase LENEXT: // i: getting length extra (have base)\n\t\t\t\t\tj = get;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tlen += (b & inflate_mask[j]);\n\n\t\t\t\t\tb >>= j;\n\t\t\t\t\tk -= j;\n\n\t\t\t\t\tneed = dbits;\n\t\t\t\t\ttree = dtree;\n\t\t\t\t\ttree_index = dtree_index;\n\t\t\t\t\tmode = DIST;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DIST: // i: get distance next\n\t\t\t\t\tj = need;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\ttindex = (tree_index + (b & inflate_mask[j])) * 3;\n\n\t\t\t\t\tb >>= tree[tindex + 1];\n\t\t\t\t\tk -= tree[tindex + 1];\n\n\t\t\t\t\te = (tree[tindex]);\n\t\t\t\t\tif ((e & 16) !== 0) { // distance\n\t\t\t\t\t\tget = e & 15;\n\t\t\t\t\t\tdist = tree[tindex + 2];\n\t\t\t\t\t\tmode = DISTEXT;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 64) === 0) { // next table\n\t\t\t\t\t\tneed = e;\n\t\t\t\t\t\ttree_index = tindex / 3 + tree[tindex + 2];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tmode = BADCODE; // invalid code\n\t\t\t\t\tz.msg = \"invalid distance code\";\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tcase DISTEXT: // i: getting distance extra\n\t\t\t\t\tj = get;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tdist += (b & inflate_mask[j]);\n\n\t\t\t\t\tb >>= j;\n\t\t\t\t\tk -= j;\n\n\t\t\t\t\tmode = COPY;\n\t\t\t\t/* falls through */\n\t\t\t\tcase COPY: // o: copying bytes in win, waiting for space\n\t\t\t\t\tf = q - dist;\n\t\t\t\t\twhile (f < 0) { // modulo win size-\"while\" instead\n\t\t\t\t\t\tf += s.end; // of \"if\" handles invalid distances\n\t\t\t\t\t}\n\t\t\t\t\twhile (len !== 0) {\n\n\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\t\tr = s.inflate_flush(z, r);\n\t\t\t\t\t\t\t\tq = s.write;\n\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\ts.win[q++] = s.win[f++];\n\t\t\t\t\t\tm--;\n\n\t\t\t\t\t\tif (f == s.end)\n\t\t\t\t\t\t\tf = 0;\n\t\t\t\t\t\tlen--;\n\t\t\t\t\t}\n\t\t\t\t\tmode = START;\n\t\t\t\t\tbreak;\n\t\t\t\tcase LIT: // o: got literal, waiting for output space\n\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\tr = s.inflate_flush(z, r);\n\t\t\t\t\t\t\tq = s.write;\n\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tr = Z_OK;\n\n\t\t\t\t\ts.win[q++] = /* (byte) */lit;\n\t\t\t\t\tm--;\n\n\t\t\t\t\tmode = START;\n\t\t\t\t\tbreak;\n\t\t\t\tcase WASH: // o: got eob, possibly more output\n\t\t\t\t\tif (k > 7) { // return unused byte, if any\n\t\t\t\t\t\tk -= 8;\n\t\t\t\t\t\tn++;\n\t\t\t\t\t\tp--; // can always return one\n\t\t\t\t\t}\n\n\t\t\t\t\ts.write = q;\n\t\t\t\t\tr = s.inflate_flush(z, r);\n\t\t\t\t\tq = s.write;\n\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\tif (s.read != s.write) {\n\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tmode = END;\n\t\t\t\t/* falls through */\n\t\t\t\tcase END:\n\t\t\t\t\tr = Z_STREAM_END;\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tcase BADCODE: // x: got error\n\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tdefault:\n\t\t\t\t\tr = Z_STREAM_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t}\n\t\t}\n\t};\n\n\tthat.free = function () {\n\t\t// ZFREE(z, c);\n\t};\n\n}\n\n// InfBlocks\n\n// Table for deflate from PKZIP's appnote.txt.\nconst border = [ // Order of the bit length code lengths\n\t16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15];\n\nconst TYPE = 0; // get type bits (3, including end bit)\nconst LENS = 1; // get lengths for stored\nconst STORED = 2;// processing stored block\nconst TABLE = 3; // get table lengths\nconst BTREE = 4; // get bit lengths tree for a dynamic\n// block\nconst DTREE = 5; // get length, distance trees for a\n// dynamic block\nconst CODES = 6; // processing fixed or dynamic block\nconst DRY = 7; // output remaining win bytes\nconst DONELOCKS = 8; // finished last block, done\nconst BADBLOCKS = 9; // ot a data error--stuck here\n\nfunction InfBlocks(z, w) {\n\tconst that = this;\n\n\tlet mode = TYPE; // current inflate_block mode\n\n\tlet left = 0; // if STORED, bytes left to copy\n\n\tlet table = 0; // table lengths (14 bits)\n\tlet index = 0; // index into blens (or border)\n\tlet blens; // bit lengths of codes\n\tconst bb = [0]; // bit length tree depth\n\tconst tb = [0]; // bit length decoding tree\n\n\tconst codes = new InfCodes(); // if CODES, current state\n\n\tlet last = 0; // true if this block is the last block\n\n\tlet hufts = new Int32Array(MANY * 3); // single malloc for tree space\n\tconst check = 0; // check on output\n\tconst inftree = new InfTree();\n\n\tthat.bitk = 0; // bits in bit buffer\n\tthat.bitb = 0; // bit buffer\n\tthat.win = new Uint8Array(w); // sliding win\n\tthat.end = w; // one byte after sliding win\n\tthat.read = 0; // win read pointer\n\tthat.write = 0; // win write pointer\n\n\tthat.reset = function (z, c) {\n\t\tif (c)\n\t\t\tc[0] = check;\n\t\t// if (mode == BTREE || mode == DTREE) {\n\t\t// }\n\t\tif (mode == CODES) {\n\t\t\tcodes.free(z);\n\t\t}\n\t\tmode = TYPE;\n\t\tthat.bitk = 0;\n\t\tthat.bitb = 0;\n\t\tthat.read = that.write = 0;\n\t};\n\n\tthat.reset(z, null);\n\n\t// copy as much as possible from the sliding win to the output area\n\tthat.inflate_flush = function (z, r) {\n\t\tlet n;\n\t\tlet p;\n\t\tlet q;\n\n\t\t// local copies of source and destination pointers\n\t\tp = z.next_out_index;\n\t\tq = that.read;\n\n\t\t// compute number of bytes to copy as far as end of win\n\t\tn = /* (int) */((q <= that.write ? that.write : that.end) - q);\n\t\tif (n > z.avail_out)\n\t\t\tn = z.avail_out;\n\t\tif (n !== 0 && r == Z_BUF_ERROR)\n\t\t\tr = Z_OK;\n\n\t\t// update counters\n\t\tz.avail_out -= n;\n\t\tz.total_out += n;\n\n\t\t// copy as far as end of win\n\t\tz.next_out.set(that.win.subarray(q, q + n), p);\n\t\tp += n;\n\t\tq += n;\n\n\t\t// see if more to copy at beginning of win\n\t\tif (q == that.end) {\n\t\t\t// wrap pointers\n\t\t\tq = 0;\n\t\t\tif (that.write == that.end)\n\t\t\t\tthat.write = 0;\n\n\t\t\t// compute bytes to copy\n\t\t\tn = that.write - q;\n\t\t\tif (n > z.avail_out)\n\t\t\t\tn = z.avail_out;\n\t\t\tif (n !== 0 && r == Z_BUF_ERROR)\n\t\t\t\tr = Z_OK;\n\n\t\t\t// update counters\n\t\t\tz.avail_out -= n;\n\t\t\tz.total_out += n;\n\n\t\t\t// copy\n\t\t\tz.next_out.set(that.win.subarray(q, q + n), p);\n\t\t\tp += n;\n\t\t\tq += n;\n\t\t}\n\n\t\t// update pointers\n\t\tz.next_out_index = p;\n\t\tthat.read = q;\n\n\t\t// done\n\t\treturn r;\n\t};\n\n\tthat.proc = function (z, r) {\n\t\tlet t; // temporary storage\n\t\tlet b; // bit buffer\n\t\tlet k; // bits in bit buffer\n\t\tlet p; // input data pointer\n\t\tlet n; // bytes available there\n\t\tlet q; // output win write pointer\n\t\tlet m; // bytes to end of win or read pointer\n\n\t\tlet i;\n\n\t\t// copy input/output information to locals (UPDATE macro restores)\n\t\t// {\n\t\tp = z.next_in_index;\n\t\tn = z.avail_in;\n\t\tb = that.bitb;\n\t\tk = that.bitk;\n\t\t// }\n\t\t// {\n\t\tq = that.write;\n\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t// }\n\n\t\t// process input based on current state\n\t\t// DEBUG dtree\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\tlet bl, bd, tl, td, bl_, bd_, tl_, td_;\n\t\t\tswitch (mode) {\n\t\t\t\tcase TYPE:\n\n\t\t\t\t\twhile (k < (3)) {\n\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\t\t\t\t\tt = /* (int) */(b & 7);\n\t\t\t\t\tlast = t & 1;\n\n\t\t\t\t\tswitch (t >>> 1) {\n\t\t\t\t\t\tcase 0: // stored\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\t\t\t\t\t\t\tt = k & 7; // go to byte boundary\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (t);\n\t\t\t\t\t\t\tk -= (t);\n\t\t\t\t\t\t\t// }\n\t\t\t\t\t\t\tmode = LENS; // get length of stored block\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 1: // fixed\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tbl = []; // new Array(1);\n\t\t\t\t\t\t\tbd = []; // new Array(1);\n\t\t\t\t\t\t\ttl = [[]]; // new Array(1);\n\t\t\t\t\t\t\ttd = [[]]; // new Array(1);\n\n\t\t\t\t\t\t\tInfTree.inflate_trees_fixed(bl, bd, tl, td);\n\t\t\t\t\t\t\tcodes.init(bl[0], bd[0], tl[0], 0, td[0], 0);\n\t\t\t\t\t\t\t// }\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\n\t\t\t\t\t\t\tmode = CODES;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 2: // dynamic\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\n\t\t\t\t\t\t\tmode = TABLE;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 3: // illegal\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t\tz.msg = \"invalid block type\";\n\t\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase LENS:\n\n\t\t\t\t\twhile (k < (32)) {\n\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ((((~b) >>> 16) & 0xffff) != (b & 0xffff)) {\n\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\tz.msg = \"invalid stored block lengths\";\n\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tleft = (b & 0xffff);\n\t\t\t\t\tb = k = 0; // dump bits\n\t\t\t\t\tmode = left !== 0 ? STORED : (last !== 0 ? DRY : TYPE);\n\t\t\t\t\tbreak;\n\t\t\t\tcase STORED:\n\t\t\t\t\tif (n === 0) {\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\tif (q == that.end && that.read !== 0) {\n\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\tr = that.inflate_flush(z, r);\n\t\t\t\t\t\t\tq = that.write;\n\t\t\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\t\t\tif (q == that.end && that.read !== 0) {\n\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tr = Z_OK;\n\n\t\t\t\t\tt = left;\n\t\t\t\t\tif (t > n)\n\t\t\t\t\t\tt = n;\n\t\t\t\t\tif (t > m)\n\t\t\t\t\t\tt = m;\n\t\t\t\t\tthat.win.set(z.read_buf(p, t), q);\n\t\t\t\t\tp += t;\n\t\t\t\t\tn -= t;\n\t\t\t\t\tq += t;\n\t\t\t\t\tm -= t;\n\t\t\t\t\tif ((left -= t) !== 0)\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tmode = last !== 0 ? DRY : TYPE;\n\t\t\t\t\tbreak;\n\t\t\t\tcase TABLE:\n\n\t\t\t\t\twhile (k < (14)) {\n\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\ttable = t = (b & 0x3fff);\n\t\t\t\t\tif ((t & 0x1f) > 29 || ((t >> 5) & 0x1f) > 29) {\n\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\tz.msg = \"too many length or distance symbols\";\n\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tt = 258 + (t & 0x1f) + ((t >> 5) & 0x1f);\n\t\t\t\t\tif (!blens || blens.length < t) {\n\t\t\t\t\t\tblens = []; // new Array(t);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfor (i = 0; i < t; i++) {\n\t\t\t\t\t\t\tblens[i] = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// {\n\t\t\t\t\tb >>>= (14);\n\t\t\t\t\tk -= (14);\n\t\t\t\t\t// }\n\n\t\t\t\t\tindex = 0;\n\t\t\t\t\tmode = BTREE;\n\t\t\t\t/* falls through */\n\t\t\t\tcase BTREE:\n\t\t\t\t\twhile (index < 4 + (table >>> 10)) {\n\t\t\t\t\t\twhile (k < (3)) {\n\t\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tblens[border[index++]] = b & 7;\n\n\t\t\t\t\t\t// {\n\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t// }\n\t\t\t\t\t}\n\n\t\t\t\t\twhile (index < 19) {\n\t\t\t\t\t\tblens[border[index++]] = 0;\n\t\t\t\t\t}\n\n\t\t\t\t\tbb[0] = 7;\n\t\t\t\t\tt = inftree.inflate_trees_bits(blens, bb, tb, hufts, z);\n\t\t\t\t\tif (t != Z_OK) {\n\t\t\t\t\t\tr = t;\n\t\t\t\t\t\tif (r == Z_DATA_ERROR) {\n\t\t\t\t\t\t\tblens = null;\n\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\n\t\t\t\t\tindex = 0;\n\t\t\t\t\tmode = DTREE;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DTREE:\n\t\t\t\t\t// eslint-disable-next-line no-constant-condition\n\t\t\t\t\twhile (true) {\n\t\t\t\t\t\tt = table;\n\t\t\t\t\t\tif (index >= 258 + (t & 0x1f) + ((t >> 5) & 0x1f)) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tlet j, c;\n\n\t\t\t\t\t\tt = bb[0];\n\n\t\t\t\t\t\twhile (k < (t)) {\n\t\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// if (tb[0] == -1) {\n\t\t\t\t\t\t// System.err.println(\"null...\");\n\t\t\t\t\t\t// }\n\n\t\t\t\t\t\tt = hufts[(tb[0] + (b & inflate_mask[t])) * 3 + 1];\n\t\t\t\t\t\tc = hufts[(tb[0] + (b & inflate_mask[t])) * 3 + 2];\n\n\t\t\t\t\t\tif (c < 16) {\n\t\t\t\t\t\t\tb >>>= (t);\n\t\t\t\t\t\t\tk -= (t);\n\t\t\t\t\t\t\tblens[index++] = c;\n\t\t\t\t\t\t} else { // c == 16..18\n\t\t\t\t\t\t\ti = c == 18 ? 7 : c - 14;\n\t\t\t\t\t\t\tj = c == 18 ? 11 : 3;\n\n\t\t\t\t\t\t\twhile (k < (t + i)) {\n\t\t\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tb >>>= (t);\n\t\t\t\t\t\t\tk -= (t);\n\n\t\t\t\t\t\t\tj += (b & inflate_mask[i]);\n\n\t\t\t\t\t\t\tb >>>= (i);\n\t\t\t\t\t\t\tk -= (i);\n\n\t\t\t\t\t\t\ti = index;\n\t\t\t\t\t\t\tt = table;\n\t\t\t\t\t\t\tif (i + j > 258 + (t & 0x1f) + ((t >> 5) & 0x1f) || (c == 16 && i < 1)) {\n\t\t\t\t\t\t\t\tblens = null;\n\t\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t\t\tz.msg = \"invalid bit length repeat\";\n\t\t\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tc = c == 16 ? blens[i - 1] : 0;\n\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\tblens[i++] = c;\n\t\t\t\t\t\t\t} while (--j !== 0);\n\t\t\t\t\t\t\tindex = i;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\ttb[0] = -1;\n\t\t\t\t\t// {\n\t\t\t\t\tbl_ = []; // new Array(1);\n\t\t\t\t\tbd_ = []; // new Array(1);\n\t\t\t\t\ttl_ = []; // new Array(1);\n\t\t\t\t\ttd_ = []; // new Array(1);\n\t\t\t\t\tbl_[0] = 9; // must be <= 9 for lookahead assumptions\n\t\t\t\t\tbd_[0] = 6; // must be <= 9 for lookahead assumptions\n\n\t\t\t\t\tt = table;\n\t\t\t\t\tt = inftree.inflate_trees_dynamic(257 + (t & 0x1f), 1 + ((t >> 5) & 0x1f), blens, bl_, bd_, tl_, td_, hufts, z);\n\n\t\t\t\t\tif (t != Z_OK) {\n\t\t\t\t\t\tif (t == Z_DATA_ERROR) {\n\t\t\t\t\t\t\tblens = null;\n\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tr = t;\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tcodes.init(bl_[0], bd_[0], hufts, tl_[0], hufts, td_[0]);\n\t\t\t\t\t// }\n\t\t\t\t\tmode = CODES;\n\t\t\t\t/* falls through */\n\t\t\t\tcase CODES:\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\n\t\t\t\t\tif ((r = codes.proc(that, z, r)) != Z_STREAM_END) {\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tr = Z_OK;\n\t\t\t\t\tcodes.free(z);\n\n\t\t\t\t\tp = z.next_in_index;\n\t\t\t\t\tn = z.avail_in;\n\t\t\t\t\tb = that.bitb;\n\t\t\t\t\tk = that.bitk;\n\t\t\t\t\tq = that.write;\n\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\n\t\t\t\t\tif (last === 0) {\n\t\t\t\t\t\tmode = TYPE;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tmode = DRY;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DRY:\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\tr = that.inflate_flush(z, r);\n\t\t\t\t\tq = that.write;\n\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\tif (that.read != that.write) {\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tmode = DONELOCKS;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DONELOCKS:\n\t\t\t\t\tr = Z_STREAM_END;\n\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\tcase BADBLOCKS:\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\treturn that.inflate_flush(z, r);\n\n\t\t\t\tdefault:\n\t\t\t\t\tr = Z_STREAM_ERROR;\n\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t}\n\t\t}\n\t};\n\n\tthat.free = function (z) {\n\t\tthat.reset(z, null);\n\t\tthat.win = null;\n\t\thufts = null;\n\t\t// ZFREE(z, s);\n\t};\n\n\tthat.set_dictionary = function (d, start, n) {\n\t\tthat.win.set(d.subarray(start, start + n), 0);\n\t\tthat.read = that.write = n;\n\t};\n\n\t// Returns true if inflate is currently at the end of a block generated\n\t// by Z_SYNC_FLUSH or Z_FULL_FLUSH.\n\tthat.sync_point = function () {\n\t\treturn mode == LENS ? 1 : 0;\n\t};\n\n}\n\n// Inflate\n\n// preset dictionary flag in zlib header\nconst PRESET_DICT = 0x20;\n\nconst Z_DEFLATED = 8;\n\nconst METHOD = 0; // waiting for method byte\nconst FLAG = 1; // waiting for flag byte\nconst DICT4 = 2; // four dictionary check bytes to go\nconst DICT3 = 3; // three dictionary check bytes to go\nconst DICT2 = 4; // two dictionary check bytes to go\nconst DICT1 = 5; // one dictionary check byte to go\nconst DICT0 = 6; // waiting for inflateSetDictionary\nconst BLOCKS = 7; // decompressing blocks\nconst DONE = 12; // finished check, done\nconst BAD = 13; // got an error--stay here\n\nconst mark = [0, 0, 0xff, 0xff];\n\nfunction Inflate() {\n\tconst that = this;\n\n\tthat.mode = 0; // current inflate mode\n\n\t// mode dependent information\n\tthat.method = 0; // if FLAGS, method byte\n\n\t// if CHECK, check values to compare\n\tthat.was = [0]; // new Array(1); // computed check value\n\tthat.need = 0; // stream check value\n\n\t// if BAD, inflateSync's marker bytes count\n\tthat.marker = 0;\n\n\t// mode independent information\n\tthat.wbits = 0; // log2(win size) (8..15, defaults to 15)\n\n\t// this.blocks; // current inflate_blocks state\n\n\tfunction inflateReset(z) {\n\t\tif (!z || !z.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\n\t\tz.total_in = z.total_out = 0;\n\t\tz.msg = null;\n\t\tz.istate.mode = BLOCKS;\n\t\tz.istate.blocks.reset(z, null);\n\t\treturn Z_OK;\n\t}\n\n\tthat.inflateEnd = function (z) {\n\t\tif (that.blocks)\n\t\t\tthat.blocks.free(z);\n\t\tthat.blocks = null;\n\t\t// ZFREE(z, z->state);\n\t\treturn Z_OK;\n\t};\n\n\tthat.inflateInit = function (z, w) {\n\t\tz.msg = null;\n\t\tthat.blocks = null;\n\n\t\t// set win size\n\t\tif (w < 8 || w > 15) {\n\t\t\tthat.inflateEnd(z);\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\tthat.wbits = w;\n\n\t\tz.istate.blocks = new InfBlocks(z, 1 << w);\n\n\t\t// reset state\n\t\tinflateReset(z);\n\t\treturn Z_OK;\n\t};\n\n\tthat.inflate = function (z, f) {\n\t\tlet r;\n\t\tlet b;\n\n\t\tif (!z || !z.istate || !z.next_in)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst istate = z.istate;\n\t\tf = f == Z_FINISH ? Z_BUF_ERROR : Z_OK;\n\t\tr = Z_BUF_ERROR;\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\tswitch (istate.mode) {\n\t\t\t\tcase METHOD:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tif (((istate.method = z.read_byte(z.next_in_index++)) & 0xf) != Z_DEFLATED) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tz.msg = \"unknown compression method\";\n\t\t\t\t\t\tistate.marker = 5; // can't try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((istate.method >> 4) + 8 > istate.wbits) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tz.msg = \"invalid win size\";\n\t\t\t\t\t\tistate.marker = 5; // can't try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tistate.mode = FLAG;\n\t\t\t\t/* falls through */\n\t\t\t\tcase FLAG:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tb = (z.read_byte(z.next_in_index++)) & 0xff;\n\n\t\t\t\t\tif ((((istate.method << 8) + b) % 31) !== 0) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tz.msg = \"incorrect header check\";\n\t\t\t\t\t\tistate.marker = 5; // can't try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ((b & PRESET_DICT) === 0) {\n\t\t\t\t\t\tistate.mode = BLOCKS;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tistate.mode = DICT4;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT4:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need = ((z.read_byte(z.next_in_index++) & 0xff) << 24) & 0xff000000;\n\t\t\t\t\tistate.mode = DICT3;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT3:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need += ((z.read_byte(z.next_in_index++) & 0xff) << 16) & 0xff0000;\n\t\t\t\t\tistate.mode = DICT2;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT2:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need += ((z.read_byte(z.next_in_index++) & 0xff) << 8) & 0xff00;\n\t\t\t\t\tistate.mode = DICT1;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT1:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need += (z.read_byte(z.next_in_index++) & 0xff);\n\t\t\t\t\tistate.mode = DICT0;\n\t\t\t\t\treturn Z_NEED_DICT;\n\t\t\t\tcase DICT0:\n\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\tz.msg = \"need dictionary\";\n\t\t\t\t\tistate.marker = 0; // can try inflateSync\n\t\t\t\t\treturn Z_STREAM_ERROR;\n\t\t\t\tcase BLOCKS:\n\n\t\t\t\t\tr = istate.blocks.proc(z, r);\n\t\t\t\t\tif (r == Z_DATA_ERROR) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tistate.marker = 0; // can try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif (r == Z_OK) {\n\t\t\t\t\t\tr = f;\n\t\t\t\t\t}\n\t\t\t\t\tif (r != Z_STREAM_END) {\n\t\t\t\t\t\treturn r;\n\t\t\t\t\t}\n\t\t\t\t\tr = f;\n\t\t\t\t\tistate.blocks.reset(z, istate.was);\n\t\t\t\t\tistate.mode = DONE;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DONE:\n\t\t\t\t\tz.avail_in = 0;\n\t\t\t\t\treturn Z_STREAM_END;\n\t\t\t\tcase BAD:\n\t\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t\tdefault:\n\t\t\t\t\treturn Z_STREAM_ERROR;\n\t\t\t}\n\t\t}\n\t};\n\n\tthat.inflateSetDictionary = function (z, dictionary, dictLength) {\n\t\tlet index = 0, length = dictLength;\n\t\tif (!z || !z.istate || z.istate.mode != DICT0)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst istate = z.istate;\n\t\tif (length >= (1 << istate.wbits)) {\n\t\t\tlength = (1 << istate.wbits) - 1;\n\t\t\tindex = dictLength - length;\n\t\t}\n\t\tistate.blocks.set_dictionary(dictionary, index, length);\n\t\tistate.mode = BLOCKS;\n\t\treturn Z_OK;\n\t};\n\n\tthat.inflateSync = function (z) {\n\t\tlet n; // number of bytes to look at\n\t\tlet p; // pointer to bytes\n\t\tlet m; // number of marker bytes found in a row\n\t\tlet r, w; // temporaries to save total_in and total_out\n\n\t\t// set up\n\t\tif (!z || !z.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst istate = z.istate;\n\t\tif (istate.mode != BAD) {\n\t\t\tistate.mode = BAD;\n\t\t\tistate.marker = 0;\n\t\t}\n\t\tif ((n = z.avail_in) === 0)\n\t\t\treturn Z_BUF_ERROR;\n\t\tp = z.next_in_index;\n\t\tm = istate.marker;\n\n\t\t// search\n\t\twhile (n !== 0 && m < 4) {\n\t\t\tif (z.read_byte(p) == mark[m]) {\n\t\t\t\tm++;\n\t\t\t} else if (z.read_byte(p) !== 0) {\n\t\t\t\tm = 0;\n\t\t\t} else {\n\t\t\t\tm = 4 - m;\n\t\t\t}\n\t\t\tp++;\n\t\t\tn--;\n\t\t}\n\n\t\t// restore\n\t\tz.total_in += p - z.next_in_index;\n\t\tz.next_in_index = p;\n\t\tz.avail_in = n;\n\t\tistate.marker = m;\n\n\t\t// return no joy or set up to restart on a new block\n\t\tif (m != 4) {\n\t\t\treturn Z_DATA_ERROR;\n\t\t}\n\t\tr = z.total_in;\n\t\tw = z.total_out;\n\t\tinflateReset(z);\n\t\tz.total_in = r;\n\t\tz.total_out = w;\n\t\tistate.mode = BLOCKS;\n\t\treturn Z_OK;\n\t};\n\n\t// Returns true if inflate is currently at the end of a block generated\n\t// by Z_SYNC_FLUSH or Z_FULL_FLUSH. This function is used by one PPP\n\t// implementation to provide an additional safety check. PPP uses\n\t// Z_SYNC_FLUSH\n\t// but removes the length bytes of the resulting empty stored block. When\n\t// decompressing, PPP checks that at the end of input packet, inflate is\n\t// waiting for these length bytes.\n\tthat.inflateSyncPoint = function (z) {\n\t\tif (!z || !z.istate || !z.istate.blocks)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn z.istate.blocks.sync_point();\n\t};\n}\n\n// ZStream\n\nfunction ZStream() {\n}\n\nZStream.prototype = {\n\tinflateInit(bits) {\n\t\tconst that = this;\n\t\tthat.istate = new Inflate();\n\t\tif (!bits)\n\t\t\tbits = MAX_BITS;\n\t\treturn that.istate.inflateInit(that, bits);\n\t},\n\n\tinflate(f) {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.istate.inflate(that, f);\n\t},\n\n\tinflateEnd() {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst ret = that.istate.inflateEnd(that);\n\t\tthat.istate = null;\n\t\treturn ret;\n\t},\n\n\tinflateSync() {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.istate.inflateSync(that);\n\t},\n\tinflateSetDictionary(dictionary, dictLength) {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.istate.inflateSetDictionary(that, dictionary, dictLength);\n\t},\n\tread_byte(start) {\n\t\tconst that = this;\n\t\treturn that.next_in[start];\n\t},\n\tread_buf(start, size) {\n\t\tconst that = this;\n\t\treturn that.next_in.subarray(start, start + size);\n\t}\n};\n\n// Inflater\n\nfunction ZipInflate(options) {\n\tconst that = this;\n\tconst z = new ZStream();\n\tconst bufsize = options && options.chunkSize ? Math.floor(options.chunkSize * 2) : 128 * 1024;\n\tconst flush = Z_NO_FLUSH;\n\tconst buf = new Uint8Array(bufsize);\n\tlet nomoreinput = false;\n\n\tz.inflateInit();\n\tz.next_out = buf;\n\n\tthat.append = function (data, onprogress) {\n\t\tconst buffers = [];\n\t\tlet err, array, lastIndex = 0, bufferIndex = 0, bufferSize = 0;\n\t\tif (data.length === 0)\n\t\t\treturn;\n\t\tz.next_in_index = 0;\n\t\tz.next_in = data;\n\t\tz.avail_in = data.length;\n\t\tdo {\n\t\t\tz.next_out_index = 0;\n\t\t\tz.avail_out = bufsize;\n\t\t\tif ((z.avail_in === 0) && (!nomoreinput)) { // if buffer is empty and more input is available, refill it\n\t\t\t\tz.next_in_index = 0;\n\t\t\t\tnomoreinput = true;\n\t\t\t}\n\t\t\terr = z.inflate(flush);\n\t\t\tif (nomoreinput && (err === Z_BUF_ERROR)) {\n\t\t\t\tif (z.avail_in !== 0)\n\t\t\t\t\tthrow new Error(\"inflating: bad input\");\n\t\t\t} else if (err !== Z_OK && err !== Z_STREAM_END)\n\t\t\t\tthrow new Error(\"inflating: \" + z.msg);\n\t\t\tif ((nomoreinput || err === Z_STREAM_END) && (z.avail_in === data.length))\n\t\t\t\tthrow new Error(\"inflating: bad input\");\n\t\t\tif (z.next_out_index)\n\t\t\t\tif (z.next_out_index === bufsize)\n\t\t\t\t\tbuffers.push(new Uint8Array(buf));\n\t\t\t\telse\n\t\t\t\t\tbuffers.push(buf.slice(0, z.next_out_index));\n\t\t\tbufferSize += z.next_out_index;\n\t\t\tif (onprogress && z.next_in_index > 0 && z.next_in_index != lastIndex) {\n\t\t\t\tonprogress(z.next_in_index);\n\t\t\t\tlastIndex = z.next_in_index;\n\t\t\t}\n\t\t} while (z.avail_in > 0 || z.avail_out === 0);\n\t\tif (buffers.length > 1) {\n\t\t\tarray = new Uint8Array(bufferSize);\n\t\t\tbuffers.forEach(function (chunk) {\n\t\t\t\tarray.set(chunk, bufferIndex);\n\t\t\t\tbufferIndex += chunk.length;\n\t\t\t});\n\t\t} else {\n\t\t\tarray = buffers[0] || new Uint8Array();\n\t\t}\n\t\treturn array;\n\t};\n\tthat.flush = function () {\n\t\tz.inflateEnd();\n\t};\n}\n\nexport {\n\tZipInflate as Inflate\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nconst MAX_32_BITS = 0xffffffff;\nconst MAX_16_BITS = 0xffff;\nconst COMPRESSION_METHOD_DEFLATE = 0x08;\nconst COMPRESSION_METHOD_STORE = 0x00;\nconst COMPRESSION_METHOD_AES = 0x63;\n\nconst LOCAL_FILE_HEADER_SIGNATURE = 0x04034b50;\nconst SPLIT_ZIP_FILE_SIGNATURE = 0x08074b50;\nconst DATA_DESCRIPTOR_RECORD_SIGNATURE = SPLIT_ZIP_FILE_SIGNATURE;\nconst CENTRAL_FILE_HEADER_SIGNATURE = 0x02014b50;\nconst END_OF_CENTRAL_DIR_SIGNATURE = 0x06054b50;\nconst ZIP64_END_OF_CENTRAL_DIR_SIGNATURE = 0x06064b50;\nconst ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE = 0x07064b50;\nconst END_OF_CENTRAL_DIR_LENGTH = 22;\nconst ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH = 20;\nconst ZIP64_END_OF_CENTRAL_DIR_LENGTH = 56;\nconst ZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH = END_OF_CENTRAL_DIR_LENGTH + ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH + ZIP64_END_OF_CENTRAL_DIR_LENGTH;\n\nconst EXTRAFIELD_TYPE_ZIP64 = 0x0001;\nconst EXTRAFIELD_TYPE_AES = 0x9901;\nconst EXTRAFIELD_TYPE_NTFS = 0x000a;\nconst EXTRAFIELD_TYPE_NTFS_TAG1 = 0x0001;\nconst EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP = 0x5455;\nconst EXTRAFIELD_TYPE_UNICODE_PATH = 0x7075;\nconst EXTRAFIELD_TYPE_UNICODE_COMMENT = 0x6375;\n\nconst BITFLAG_ENCRYPTED = 0x01;\nconst BITFLAG_LEVEL = 0x06;\nconst BITFLAG_DATA_DESCRIPTOR = 0x0008;\nconst BITFLAG_LANG_ENCODING_FLAG = 0x0800;\nconst FILE_ATTR_MSDOS_DIR_MASK = 0x10;\n\nconst VERSION_DEFLATE = 0x14;\nconst VERSION_ZIP64 = 0x2D;\nconst VERSION_AES = 0x33;\n\nconst DIRECTORY_SIGNATURE = \"/\";\n\nconst MAX_DATE = new Date(2107, 11, 31);\nconst MIN_DATE = new Date(1980, 0, 1);\n\nconst UNDEFINED_VALUE = undefined;\nconst UNDEFINED_TYPE = \"undefined\";\nconst FUNCTION_TYPE = \"function\";\n\nexport {\n\tMAX_32_BITS,\n\tMAX_16_BITS,\n\tCOMPRESSION_METHOD_DEFLATE,\n\tCOMPRESSION_METHOD_STORE,\n\tCOMPRESSION_METHOD_AES,\n\tSPLIT_ZIP_FILE_SIGNATURE,\n\tLOCAL_FILE_HEADER_SIGNATURE,\n\tDATA_DESCRIPTOR_RECORD_SIGNATURE,\n\tCENTRAL_FILE_HEADER_SIGNATURE,\n\tEND_OF_CENTRAL_DIR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_SIGNATURE,\n\tEXTRAFIELD_TYPE_ZIP64,\n\tEXTRAFIELD_TYPE_AES,\n\tEXTRAFIELD_TYPE_NTFS,\n\tEXTRAFIELD_TYPE_NTFS_TAG1,\n\tEXTRAFIELD_TYPE_EXTENDED_TIMESTAMP,\n\tEXTRAFIELD_TYPE_UNICODE_PATH,\n\tEXTRAFIELD_TYPE_UNICODE_COMMENT,\n\tEND_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH,\n\tBITFLAG_ENCRYPTED,\n\tBITFLAG_LEVEL,\n\tBITFLAG_DATA_DESCRIPTOR,\n\tBITFLAG_LANG_ENCODING_FLAG,\n\tFILE_ATTR_MSDOS_DIR_MASK,\n\tVERSION_DEFLATE,\n\tVERSION_ZIP64,\n\tVERSION_AES,\n\tDIRECTORY_SIGNATURE,\n\tMIN_DATE,\n\tMAX_DATE,\n\tUNDEFINED_VALUE,\n\tUNDEFINED_TYPE,\n\tFUNCTION_TYPE\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n\nexport {\n\tStreamAdapter\n};\n\nclass StreamAdapter {\n\n\tconstructor(Codec) {\n\t\treturn class extends TransformStream {\n\t\t\tconstructor(_format, options) {\n\t\t\t\tconst codec = new Codec(options);\n\t\t\t\tsuper({\n\t\t\t\t\ttransform(chunk, controller) {\n\t\t\t\t\t\tcontroller.enqueue(codec.append(chunk));\n\t\t\t\t\t},\n\t\t\t\t\tflush(controller) {\n\t\t\t\t\t\tconst chunk = codec.flush();\n\t\t\t\t\t\tif (chunk) {\n\t\t\t\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t};\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global navigator, CompressionStream, DecompressionStream */\n\nimport {\n\tUNDEFINED_VALUE,\n\tUNDEFINED_TYPE\n} from \"./constants.js\";\nimport { StreamAdapter } from \"./streams/stream-adapter.js\";\n\nconst MINIMUM_CHUNK_SIZE = 64;\nlet maxWorkers = 2;\ntry {\n\tif (typeof navigator != UNDEFINED_TYPE && navigator.hardwareConcurrency) {\n\t\tmaxWorkers = navigator.hardwareConcurrency;\n\t}\n} catch (_error) {\n\t// ignored\n}\nconst DEFAULT_CONFIGURATION = {\n\tchunkSize: 512 * 1024,\n\tmaxWorkers,\n\tterminateWorkerTimeout: 5000,\n\tuseWebWorkers: true,\n\tuseCompressionStream: true,\n\tworkerScripts: UNDEFINED_VALUE,\n\tCompressionStreamNative: typeof CompressionStream != UNDEFINED_TYPE && CompressionStream,\n\tDecompressionStreamNative: typeof DecompressionStream != UNDEFINED_TYPE && DecompressionStream\n};\n\nconst config = Object.assign({}, DEFAULT_CONFIGURATION);\n\nexport {\n\tconfigure,\n\tgetConfiguration,\n\tgetChunkSize\n};\n\nfunction getConfiguration() {\n\treturn config;\n}\n\nfunction getChunkSize(config) {\n\treturn Math.max(config.chunkSize, MINIMUM_CHUNK_SIZE);\n}\n\nfunction configure(configuration) {\n\tconst {\n\t\tbaseURL,\n\t\tchunkSize,\n\t\tmaxWorkers,\n\t\tterminateWorkerTimeout,\n\t\tuseCompressionStream,\n\t\tuseWebWorkers,\n\t\tDeflate,\n\t\tInflate,\n\t\tCompressionStream,\n\t\tDecompressionStream,\n\t\tworkerScripts\n\t} = configuration;\n\tsetIfDefined(\"baseURL\", baseURL);\n\tsetIfDefined(\"chunkSize\", chunkSize);\n\tsetIfDefined(\"maxWorkers\", maxWorkers);\n\tsetIfDefined(\"terminateWorkerTimeout\", terminateWorkerTimeout);\n\tsetIfDefined(\"useCompressionStream\", useCompressionStream);\n\tsetIfDefined(\"useWebWorkers\", useWebWorkers);\n\tif (Deflate) {\n\t\tconfig.CompressionStream = new StreamAdapter(Deflate);\n\t}\n\tif (Inflate) {\n\t\tconfig.DecompressionStream = new StreamAdapter(Inflate);\n\t}\n\tsetIfDefined(\"CompressionStream\", CompressionStream);\n\tsetIfDefined(\"DecompressionStream\", DecompressionStream);\n\tif (workerScripts !== UNDEFINED_VALUE) {\n\t\tconst { deflate, inflate } = workerScripts;\n\t\tif (deflate || inflate) {\n\t\t\tif (!config.workerScripts) {\n\t\t\t\tconfig.workerScripts = {};\n\t\t\t}\n\t\t}\n\t\tif (deflate) {\n\t\t\tif (!Array.isArray(deflate)) {\n\t\t\t\tthrow new Error(\"workerScripts.deflate must be an array\");\n\t\t\t}\n\t\t\tconfig.workerScripts.deflate = deflate;\n\t\t}\n\t\tif (inflate) {\n\t\t\tif (!Array.isArray(inflate)) {\n\t\t\t\tthrow new Error(\"workerScripts.inflate must be an array\");\n\t\t\t}\n\t\t\tconfig.workerScripts.inflate = inflate;\n\t\t}\n\t}\n}\n\nfunction setIfDefined(propertyName, propertyValue) {\n\tif (propertyValue !== UNDEFINED_VALUE) {\n\t\tconfig[propertyName] = propertyValue;\n\t}\n}\n","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n// deno-lint-ignore-file no-prototype-builtins\n\nimport { getMimeType as getDefaultMimeType } from \"./default-mime-type.js\";\n\nconst table = {\n\t\"application\": {\n\t\t\"andrew-inset\": \"ez\",\n\t\t\"annodex\": \"anx\",\n\t\t\"atom+xml\": \"atom\",\n\t\t\"atomcat+xml\": \"atomcat\",\n\t\t\"atomserv+xml\": \"atomsrv\",\n\t\t\"bbolin\": \"lin\",\n\t\t\"cap\": [\"cap\", \"pcap\"],\n\t\t\"cu-seeme\": \"cu\",\n\t\t\"davmount+xml\": \"davmount\",\n\t\t\"dsptype\": \"tsp\",\n\t\t\"ecmascript\": [\"es\", \"ecma\"],\n\t\t\"futuresplash\": \"spl\",\n\t\t\"hta\": \"hta\",\n\t\t\"java-archive\": \"jar\",\n\t\t\"java-serialized-object\": \"ser\",\n\t\t\"java-vm\": \"class\",\n\t\t\"javascript\": \"js\",\n\t\t\"m3g\": \"m3g\",\n\t\t\"mac-binhex40\": \"hqx\",\n\t\t\"mathematica\": [\"nb\", \"ma\", \"mb\"],\n\t\t\"msaccess\": \"mdb\",\n\t\t\"msword\": [\"doc\", \"dot\"],\n\t\t\"mxf\": \"mxf\",\n\t\t\"oda\": \"oda\",\n\t\t\"ogg\": \"ogx\",\n\t\t\"pdf\": \"pdf\",\n\t\t\"pgp-keys\": \"key\",\n\t\t\"pgp-signature\": [\"asc\", \"sig\"],\n\t\t\"pics-rules\": \"prf\",\n\t\t\"postscript\": [\"ps\", \"ai\", \"eps\", \"epsi\", \"epsf\", \"eps2\", \"eps3\"],\n\t\t\"rar\": \"rar\",\n\t\t\"rdf+xml\": \"rdf\",\n\t\t\"rss+xml\": \"rss\",\n\t\t\"rtf\": \"rtf\",\n\t\t\"smil\": [\"smi\", \"smil\"],\n\t\t\"xhtml+xml\": [\"xhtml\", \"xht\"],\n\t\t\"xml\": [\"xml\", \"xsl\", \"xsd\"],\n\t\t\"xspf+xml\": \"xspf\",\n\t\t\"zip\": \"zip\",\n\t\t\"vnd.android.package-archive\": \"apk\",\n\t\t\"vnd.cinderella\": \"cdy\",\n\t\t\"vnd.google-earth.kml+xml\": \"kml\",\n\t\t\"vnd.google-earth.kmz\": \"kmz\",\n\t\t\"vnd.mozilla.xul+xml\": \"xul\",\n\t\t\"vnd.ms-excel\": [\"xls\", \"xlb\", \"xlt\", \"xlm\", \"xla\", \"xlc\", \"xlw\"],\n\t\t\"vnd.ms-pki.seccat\": \"cat\",\n\t\t\"vnd.ms-pki.stl\": \"stl\",\n\t\t\"vnd.ms-powerpoint\": [\"ppt\", \"pps\", \"pot\"],\n\t\t\"vnd.oasis.opendocument.chart\": \"odc\",\n\t\t\"vnd.oasis.opendocument.database\": \"odb\",\n\t\t\"vnd.oasis.opendocument.formula\": \"odf\",\n\t\t\"vnd.oasis.opendocument.graphics\": \"odg\",\n\t\t\"vnd.oasis.opendocument.graphics-template\": \"otg\",\n\t\t\"vnd.oasis.opendocument.image\": \"odi\",\n\t\t\"vnd.oasis.opendocument.presentation\": \"odp\",\n\t\t\"vnd.oasis.opendocument.presentation-template\": \"otp\",\n\t\t\"vnd.oasis.opendocument.spreadsheet\": \"ods\",\n\t\t\"vnd.oasis.opendocument.spreadsheet-template\": \"ots\",\n\t\t\"vnd.oasis.opendocument.text\": \"odt\",\n\t\t\"vnd.oasis.opendocument.text-master\": \"odm\",\n\t\t\"vnd.oasis.opendocument.text-template\": \"ott\",\n\t\t\"vnd.oasis.opendocument.text-web\": \"oth\",\n\t\t\"vnd.openxmlformats-officedocument.spreadsheetml.sheet\": \"xlsx\",\n\t\t\"vnd.openxmlformats-officedocument.spreadsheetml.template\": \"xltx\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.presentation\": \"pptx\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.slideshow\": \"ppsx\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.template\": \"potx\",\n\t\t\"vnd.openxmlformats-officedocument.wordprocessingml.document\": \"docx\",\n\t\t\"vnd.openxmlformats-officedocument.wordprocessingml.template\": \"dotx\",\n\t\t\"vnd.smaf\": \"mmf\",\n\t\t\"vnd.stardivision.calc\": \"sdc\",\n\t\t\"vnd.stardivision.chart\": \"sds\",\n\t\t\"vnd.stardivision.draw\": \"sda\",\n\t\t\"vnd.stardivision.impress\": \"sdd\",\n\t\t\"vnd.stardivision.math\": [\"sdf\", \"smf\"],\n\t\t\"vnd.stardivision.writer\": [\"sdw\", \"vor\"],\n\t\t\"vnd.stardivision.writer-global\": \"sgl\",\n\t\t\"vnd.sun.xml.calc\": \"sxc\",\n\t\t\"vnd.sun.xml.calc.template\": \"stc\",\n\t\t\"vnd.sun.xml.draw\": \"sxd\",\n\t\t\"vnd.sun.xml.draw.template\": \"std\",\n\t\t\"vnd.sun.xml.impress\": \"sxi\",\n\t\t\"vnd.sun.xml.impress.template\": \"sti\",\n\t\t\"vnd.sun.xml.math\": \"sxm\",\n\t\t\"vnd.sun.xml.writer\": \"sxw\",\n\t\t\"vnd.sun.xml.writer.global\": \"sxg\",\n\t\t\"vnd.sun.xml.writer.template\": \"stw\",\n\t\t\"vnd.symbian.install\": [\"sis\", \"sisx\"],\n\t\t\"vnd.visio\": [\"vsd\", \"vst\", \"vss\", \"vsw\"],\n\t\t\"vnd.wap.wbxml\": \"wbxml\",\n\t\t\"vnd.wap.wmlc\": \"wmlc\",\n\t\t\"vnd.wap.wmlscriptc\": \"wmlsc\",\n\t\t\"vnd.wordperfect\": \"wpd\",\n\t\t\"vnd.wordperfect5.1\": \"wp5\",\n\t\t\"x-123\": \"wk\",\n\t\t\"x-7z-compressed\": \"7z\",\n\t\t\"x-abiword\": \"abw\",\n\t\t\"x-apple-diskimage\": \"dmg\",\n\t\t\"x-bcpio\": \"bcpio\",\n\t\t\"x-bittorrent\": \"torrent\",\n\t\t\"x-cbr\": [\"cbr\", \"cba\", \"cbt\", \"cb7\"],\n\t\t\"x-cbz\": \"cbz\",\n\t\t\"x-cdf\": [\"cdf\", \"cda\"],\n\t\t\"x-cdlink\": \"vcd\",\n\t\t\"x-chess-pgn\": \"pgn\",\n\t\t\"x-cpio\": \"cpio\",\n\t\t\"x-csh\": \"csh\",\n\t\t\"x-debian-package\": [\"deb\", \"udeb\"],\n\t\t\"x-director\": [\"dcr\", \"dir\", \"dxr\", \"cst\", \"cct\", \"cxt\", \"w3d\", \"fgd\", \"swa\"],\n\t\t\"x-dms\": \"dms\",\n\t\t\"x-doom\": \"wad\",\n\t\t\"x-dvi\": \"dvi\",\n\t\t\"x-httpd-eruby\": \"rhtml\",\n\t\t\"x-font\": \"pcf.Z\",\n\t\t\"x-freemind\": \"mm\",\n\t\t\"x-gnumeric\": \"gnumeric\",\n\t\t\"x-go-sgf\": \"sgf\",\n\t\t\"x-graphing-calculator\": \"gcf\",\n\t\t\"x-gtar\": [\"gtar\", \"taz\"],\n\t\t\"x-hdf\": \"hdf\",\n\t\t\"x-httpd-php\": [\"phtml\", \"pht\", \"php\"],\n\t\t\"x-httpd-php-source\": \"phps\",\n\t\t\"x-httpd-php3\": \"php3\",\n\t\t\"x-httpd-php3-preprocessed\": \"php3p\",\n\t\t\"x-httpd-php4\": \"php4\",\n\t\t\"x-httpd-php5\": \"php5\",\n\t\t\"x-ica\": \"ica\",\n\t\t\"x-info\": \"info\",\n\t\t\"x-internet-signup\": [\"ins\", \"isp\"],\n\t\t\"x-iphone\": \"iii\",\n\t\t\"x-iso9660-image\": \"iso\",\n\t\t\"x-java-jnlp-file\": \"jnlp\",\n\t\t\"x-jmol\": \"jmz\",\n\t\t\"x-killustrator\": \"kil\",\n\t\t\"x-koan\": [\"skp\", \"skd\", \"skt\", \"skm\"],\n\t\t\"x-kpresenter\": [\"kpr\", \"kpt\"],\n\t\t\"x-kword\": [\"kwd\", \"kwt\"],\n\t\t\"x-latex\": \"latex\",\n\t\t\"x-lha\": \"lha\",\n\t\t\"x-lyx\": \"lyx\",\n\t\t\"x-lzh\": \"lzh\",\n\t\t\"x-lzx\": \"lzx\",\n\t\t\"x-maker\": [\"frm\", \"maker\", \"frame\", \"fm\", \"fb\", \"book\", \"fbdoc\"],\n\t\t\"x-ms-wmd\": \"wmd\",\n\t\t\"x-ms-wmz\": \"wmz\",\n\t\t\"x-msdos-program\": [\"com\", \"exe\", \"bat\", \"dll\"],\n\t\t\"x-msi\": \"msi\",\n\t\t\"x-netcdf\": [\"nc\", \"cdf\"],\n\t\t\"x-ns-proxy-autoconfig\": [\"pac\", \"dat\"],\n\t\t\"x-nwc\": \"nwc\",\n\t\t\"x-object\": \"o\",\n\t\t\"x-oz-application\": \"oza\",\n\t\t\"x-pkcs7-certreqresp\": \"p7r\",\n\t\t\"x-python-code\": [\"pyc\", \"pyo\"],\n\t\t\"x-qgis\": [\"qgs\", \"shp\", \"shx\"],\n\t\t\"x-quicktimeplayer\": \"qtl\",\n\t\t\"x-redhat-package-manager\": \"rpm\",\n\t\t\"x-ruby\": \"rb\",\n\t\t\"x-sh\": \"sh\",\n\t\t\"x-shar\": \"shar\",\n\t\t\"x-shockwave-flash\": [\"swf\", \"swfl\"],\n\t\t\"x-silverlight\": \"scr\",\n\t\t\"x-stuffit\": \"sit\",\n\t\t\"x-sv4cpio\": \"sv4cpio\",\n\t\t\"x-sv4crc\": \"sv4crc\",\n\t\t\"x-tar\": \"tar\",\n\t\t\"x-tcl\": \"tcl\",\n\t\t\"x-tex-gf\": \"gf\",\n\t\t\"x-tex-pk\": \"pk\",\n\t\t\"x-texinfo\": [\"texinfo\", \"texi\"],\n\t\t\"x-trash\": [\"~\", \"%\", \"bak\", \"old\", \"sik\"],\n\t\t\"x-troff\": [\"t\", \"tr\", \"roff\"],\n\t\t\"x-troff-man\": \"man\",\n\t\t\"x-troff-me\": \"me\",\n\t\t\"x-troff-ms\": \"ms\",\n\t\t\"x-ustar\": \"ustar\",\n\t\t\"x-wais-source\": \"src\",\n\t\t\"x-wingz\": \"wz\",\n\t\t\"x-x509-ca-cert\": [\"crt\", \"der\", \"cer\"],\n\t\t\"x-xcf\": \"xcf\",\n\t\t\"x-xfig\": \"fig\",\n\t\t\"x-xpinstall\": \"xpi\",\n\t\t\"applixware\": \"aw\",\n\t\t\"atomsvc+xml\": \"atomsvc\",\n\t\t\"ccxml+xml\": \"ccxml\",\n\t\t\"cdmi-capability\": \"cdmia\",\n\t\t\"cdmi-container\": \"cdmic\",\n\t\t\"cdmi-domain\": \"cdmid\",\n\t\t\"cdmi-object\": \"cdmio\",\n\t\t\"cdmi-queue\": \"cdmiq\",\n\t\t\"docbook+xml\": \"dbk\",\n\t\t\"dssc+der\": \"dssc\",\n\t\t\"dssc+xml\": \"xdssc\",\n\t\t\"emma+xml\": \"emma\",\n\t\t\"epub+zip\": \"epub\",\n\t\t\"exi\": \"exi\",\n\t\t\"font-tdpfr\": \"pfr\",\n\t\t\"gml+xml\": \"gml\",\n\t\t\"gpx+xml\": \"gpx\",\n\t\t\"gxf\": \"gxf\",\n\t\t\"hyperstudio\": \"stk\",\n\t\t\"inkml+xml\": [\"ink\", \"inkml\"],\n\t\t\"ipfix\": \"ipfix\",\n\t\t\"json\": \"json\",\n\t\t\"jsonml+json\": \"jsonml\",\n\t\t\"lost+xml\": \"lostxml\",\n\t\t\"mads+xml\": \"mads\",\n\t\t\"marc\": \"mrc\",\n\t\t\"marcxml+xml\": \"mrcx\",\n\t\t\"mathml+xml\": \"mathml\",\n\t\t\"mbox\": \"mbox\",\n\t\t\"mediaservercontrol+xml\": \"mscml\",\n\t\t\"metalink+xml\": \"metalink\",\n\t\t\"metalink4+xml\": \"meta4\",\n\t\t\"mets+xml\": \"mets\",\n\t\t\"mods+xml\": \"mods\",\n\t\t\"mp21\": [\"m21\", \"mp21\"],\n\t\t\"mp4\": \"mp4s\",\n\t\t\"oebps-package+xml\": \"opf\",\n\t\t\"omdoc+xml\": \"omdoc\",\n\t\t\"onenote\": [\"onetoc\", \"onetoc2\", \"onetmp\", \"onepkg\"],\n\t\t\"oxps\": \"oxps\",\n\t\t\"patch-ops-error+xml\": \"xer\",\n\t\t\"pgp-encrypted\": \"pgp\",\n\t\t\"pkcs10\": \"p10\",\n\t\t\"pkcs7-mime\": [\"p7m\", \"p7c\"],\n\t\t\"pkcs7-signature\": \"p7s\",\n\t\t\"pkcs8\": \"p8\",\n\t\t\"pkix-attr-cert\": \"ac\",\n\t\t\"pkix-crl\": \"crl\",\n\t\t\"pkix-pkipath\": \"pkipath\",\n\t\t\"pkixcmp\": \"pki\",\n\t\t\"pls+xml\": \"pls\",\n\t\t\"prs.cww\": \"cww\",\n\t\t\"pskc+xml\": \"pskcxml\",\n\t\t\"reginfo+xml\": \"rif\",\n\t\t\"relax-ng-compact-syntax\": \"rnc\",\n\t\t\"resource-lists+xml\": \"rl\",\n\t\t\"resource-lists-diff+xml\": \"rld\",\n\t\t\"rls-services+xml\": \"rs\",\n\t\t\"rpki-ghostbusters\": \"gbr\",\n\t\t\"rpki-manifest\": \"mft\",\n\t\t\"rpki-roa\": \"roa\",\n\t\t\"rsd+xml\": \"rsd\",\n\t\t\"sbml+xml\": \"sbml\",\n\t\t\"scvp-cv-request\": \"scq\",\n\t\t\"scvp-cv-response\": \"scs\",\n\t\t\"scvp-vp-request\": \"spq\",\n\t\t\"scvp-vp-response\": \"spp\",\n\t\t\"sdp\": \"sdp\",\n\t\t\"set-payment-initiation\": \"setpay\",\n\t\t\"set-registration-initiation\": \"setreg\",\n\t\t\"shf+xml\": \"shf\",\n\t\t\"sparql-query\": \"rq\",\n\t\t\"sparql-results+xml\": \"srx\",\n\t\t\"srgs\": \"gram\",\n\t\t\"srgs+xml\": \"grxml\",\n\t\t\"sru+xml\": \"sru\",\n\t\t\"ssdl+xml\": \"ssdl\",\n\t\t\"ssml+xml\": \"ssml\",\n\t\t\"tei+xml\": [\"tei\", \"teicorpus\"],\n\t\t\"thraud+xml\": \"tfi\",\n\t\t\"timestamped-data\": \"tsd\",\n\t\t\"vnd.3gpp.pic-bw-large\": \"plb\",\n\t\t\"vnd.3gpp.pic-bw-small\": \"psb\",\n\t\t\"vnd.3gpp.pic-bw-var\": \"pvb\",\n\t\t\"vnd.3gpp2.tcap\": \"tcap\",\n\t\t\"vnd.3m.post-it-notes\": \"pwn\",\n\t\t\"vnd.accpac.simply.aso\": \"aso\",\n\t\t\"vnd.accpac.simply.imp\": \"imp\",\n\t\t\"vnd.acucobol\": \"acu\",\n\t\t\"vnd.acucorp\": [\"atc\", \"acutc\"],\n\t\t\"vnd.adobe.air-application-installer-package+zip\": \"air\",\n\t\t\"vnd.adobe.formscentral.fcdt\": \"fcdt\",\n\t\t\"vnd.adobe.fxp\": [\"fxp\", \"fxpl\"],\n\t\t\"vnd.adobe.xdp+xml\": \"xdp\",\n\t\t\"vnd.adobe.xfdf\": \"xfdf\",\n\t\t\"vnd.ahead.space\": \"ahead\",\n\t\t\"vnd.airzip.filesecure.azf\": \"azf\",\n\t\t\"vnd.airzip.filesecure.azs\": \"azs\",\n\t\t\"vnd.amazon.ebook\": \"azw\",\n\t\t\"vnd.americandynamics.acc\": \"acc\",\n\t\t\"vnd.amiga.ami\": \"ami\",\n\t\t\"vnd.anser-web-certificate-issue-initiation\": \"cii\",\n\t\t\"vnd.anser-web-funds-transfer-initiation\": \"fti\",\n\t\t\"vnd.antix.game-component\": \"atx\",\n\t\t\"vnd.apple.installer+xml\": \"mpkg\",\n\t\t\"vnd.apple.mpegurl\": \"m3u8\",\n\t\t\"vnd.aristanetworks.swi\": \"swi\",\n\t\t\"vnd.astraea-software.iota\": \"iota\",\n\t\t\"vnd.audiograph\": \"aep\",\n\t\t\"vnd.blueice.multipass\": \"mpm\",\n\t\t\"vnd.bmi\": \"bmi\",\n\t\t\"vnd.businessobjects\": \"rep\",\n\t\t\"vnd.chemdraw+xml\": \"cdxml\",\n\t\t\"vnd.chipnuts.karaoke-mmd\": \"mmd\",\n\t\t\"vnd.claymore\": \"cla\",\n\t\t\"vnd.cloanto.rp9\": \"rp9\",\n\t\t\"vnd.clonk.c4group\": [\"c4g\", \"c4d\", \"c4f\", \"c4p\", \"c4u\"],\n\t\t\"vnd.cluetrust.cartomobile-config\": \"c11amc\",\n\t\t\"vnd.cluetrust.cartomobile-config-pkg\": \"c11amz\",\n\t\t\"vnd.commonspace\": \"csp\",\n\t\t\"vnd.contact.cmsg\": \"cdbcmsg\",\n\t\t\"vnd.cosmocaller\": \"cmc\",\n\t\t\"vnd.crick.clicker\": \"clkx\",\n\t\t\"vnd.crick.clicker.keyboard\": \"clkk\",\n\t\t\"vnd.crick.clicker.palette\": \"clkp\",\n\t\t\"vnd.crick.clicker.template\": \"clkt\",\n\t\t\"vnd.crick.clicker.wordbank\": \"clkw\",\n\t\t\"vnd.criticaltools.wbs+xml\": \"wbs\",\n\t\t\"vnd.ctc-posml\": \"pml\",\n\t\t\"vnd.cups-ppd\": \"ppd\",\n\t\t\"vnd.curl.car\": \"car\",\n\t\t\"vnd.curl.pcurl\": \"pcurl\",\n\t\t\"vnd.dart\": \"dart\",\n\t\t\"vnd.data-vision.rdz\": \"rdz\",\n\t\t\"vnd.dece.data\": [\"uvf\", \"uvvf\", \"uvd\", \"uvvd\"],\n\t\t\"vnd.dece.ttml+xml\": [\"uvt\", \"uvvt\"],\n\t\t\"vnd.dece.unspecified\": [\"uvx\", \"uvvx\"],\n\t\t\"vnd.dece.zip\": [\"uvz\", \"uvvz\"],\n\t\t\"vnd.denovo.fcselayout-link\": \"fe_launch\",\n\t\t\"vnd.dna\": \"dna\",\n\t\t\"vnd.dolby.mlp\": \"mlp\",\n\t\t\"vnd.dpgraph\": \"dpg\",\n\t\t\"vnd.dreamfactory\": \"dfac\",\n\t\t\"vnd.ds-keypoint\": \"kpxx\",\n\t\t\"vnd.dvb.ait\": \"ait\",\n\t\t\"vnd.dvb.service\": \"svc\",\n\t\t\"vnd.dynageo\": \"geo\",\n\t\t\"vnd.ecowin.chart\": \"mag\",\n\t\t\"vnd.enliven\": \"nml\",\n\t\t\"vnd.epson.esf\": \"esf\",\n\t\t\"vnd.epson.msf\": \"msf\",\n\t\t\"vnd.epson.quickanime\": \"qam\",\n\t\t\"vnd.epson.salt\": \"slt\",\n\t\t\"vnd.epson.ssf\": \"ssf\",\n\t\t\"vnd.eszigno3+xml\": [\"es3\", \"et3\"],\n\t\t\"vnd.ezpix-album\": \"ez2\",\n\t\t\"vnd.ezpix-package\": \"ez3\",\n\t\t\"vnd.fdf\": \"fdf\",\n\t\t\"vnd.fdsn.mseed\": \"mseed\",\n\t\t\"vnd.fdsn.seed\": [\"seed\", \"dataless\"],\n\t\t\"vnd.flographit\": \"gph\",\n\t\t\"vnd.fluxtime.clip\": \"ftc\",\n\t\t\"vnd.framemaker\": [\"fm\", \"frame\", \"maker\", \"book\"],\n\t\t\"vnd.frogans.fnc\": \"fnc\",\n\t\t\"vnd.frogans.ltf\": \"ltf\",\n\t\t\"vnd.fsc.weblaunch\": \"fsc\",\n\t\t\"vnd.fujitsu.oasys\": \"oas\",\n\t\t\"vnd.fujitsu.oasys2\": \"oa2\",\n\t\t\"vnd.fujitsu.oasys3\": \"oa3\",\n\t\t\"vnd.fujitsu.oasysgp\": \"fg5\",\n\t\t\"vnd.fujitsu.oasysprs\": \"bh2\",\n\t\t\"vnd.fujixerox.ddd\": \"ddd\",\n\t\t\"vnd.fujixerox.docuworks\": \"xdw\",\n\t\t\"vnd.fujixerox.docuworks.binder\": \"xbd\",\n\t\t\"vnd.fuzzysheet\": \"fzs\",\n\t\t\"vnd.genomatix.tuxedo\": \"txd\",\n\t\t\"vnd.geogebra.file\": \"ggb\",\n\t\t\"vnd.geogebra.tool\": \"ggt\",\n\t\t\"vnd.geometry-explorer\": [\"gex\", \"gre\"],\n\t\t\"vnd.geonext\": \"gxt\",\n\t\t\"vnd.geoplan\": \"g2w\",\n\t\t\"vnd.geospace\": \"g3w\",\n\t\t\"vnd.gmx\": \"gmx\",\n\t\t\"vnd.grafeq\": [\"gqf\", \"gqs\"],\n\t\t\"vnd.groove-account\": \"gac\",\n\t\t\"vnd.groove-help\": \"ghf\",\n\t\t\"vnd.groove-identity-message\": \"gim\",\n\t\t\"vnd.groove-injector\": \"grv\",\n\t\t\"vnd.groove-tool-message\": \"gtm\",\n\t\t\"vnd.groove-tool-template\": \"tpl\",\n\t\t\"vnd.groove-vcard\": \"vcg\",\n\t\t\"vnd.hal+xml\": \"hal\",\n\t\t\"vnd.handheld-entertainment+xml\": \"zmm\",\n\t\t\"vnd.hbci\": \"hbci\",\n\t\t\"vnd.hhe.lesson-player\": \"les\",\n\t\t\"vnd.hp-hpgl\": \"hpgl\",\n\t\t\"vnd.hp-hpid\": \"hpid\",\n\t\t\"vnd.hp-hps\": \"hps\",\n\t\t\"vnd.hp-jlyt\": \"jlt\",\n\t\t\"vnd.hp-pcl\": \"pcl\",\n\t\t\"vnd.hp-pclxl\": \"pclxl\",\n\t\t\"vnd.hydrostatix.sof-data\": \"sfd-hdstx\",\n\t\t\"vnd.ibm.minipay\": \"mpy\",\n\t\t\"vnd.ibm.modcap\": [\"afp\", \"listafp\", \"list3820\"],\n\t\t\"vnd.ibm.rights-management\": \"irm\",\n\t\t\"vnd.ibm.secure-container\": \"sc\",\n\t\t\"vnd.iccprofile\": [\"icc\", \"icm\"],\n\t\t\"vnd.igloader\": \"igl\",\n\t\t\"vnd.immervision-ivp\": \"ivp\",\n\t\t\"vnd.immervision-ivu\": \"ivu\",\n\t\t\"vnd.insors.igm\": \"igm\",\n\t\t\"vnd.intercon.formnet\": [\"xpw\", \"xpx\"],\n\t\t\"vnd.intergeo\": \"i2g\",\n\t\t\"vnd.intu.qbo\": \"qbo\",\n\t\t\"vnd.intu.qfx\": \"qfx\",\n\t\t\"vnd.ipunplugged.rcprofile\": \"rcprofile\",\n\t\t\"vnd.irepository.package+xml\": \"irp\",\n\t\t\"vnd.is-xpr\": \"xpr\",\n\t\t\"vnd.isac.fcs\": \"fcs\",\n\t\t\"vnd.jam\": \"jam\",\n\t\t\"vnd.jcp.javame.midlet-rms\": \"rms\",\n\t\t\"vnd.jisp\": \"jisp\",\n\t\t\"vnd.joost.joda-archive\": \"joda\",\n\t\t\"vnd.kahootz\": [\"ktz\", \"ktr\"],\n\t\t\"vnd.kde.karbon\": \"karbon\",\n\t\t\"vnd.kde.kchart\": \"chrt\",\n\t\t\"vnd.kde.kformula\": \"kfo\",\n\t\t\"vnd.kde.kivio\": \"flw\",\n\t\t\"vnd.kde.kontour\": \"kon\",\n\t\t\"vnd.kde.kpresenter\": [\"kpr\", \"kpt\"],\n\t\t\"vnd.kde.kspread\": \"ksp\",\n\t\t\"vnd.kde.kword\": [\"kwd\", \"kwt\"],\n\t\t\"vnd.kenameaapp\": \"htke\",\n\t\t\"vnd.kidspiration\": \"kia\",\n\t\t\"vnd.kinar\": [\"kne\", \"knp\"],\n\t\t\"vnd.koan\": [\"skp\", \"skd\", \"skt\", \"skm\"],\n\t\t\"vnd.kodak-descriptor\": \"sse\",\n\t\t\"vnd.las.las+xml\": \"lasxml\",\n\t\t\"vnd.llamagraphics.life-balance.desktop\": \"lbd\",\n\t\t\"vnd.llamagraphics.life-balance.exchange+xml\": \"lbe\",\n\t\t\"vnd.lotus-1-2-3\": \"123\",\n\t\t\"vnd.lotus-approach\": \"apr\",\n\t\t\"vnd.lotus-freelance\": \"pre\",\n\t\t\"vnd.lotus-notes\": \"nsf\",\n\t\t\"vnd.lotus-organizer\": \"org\",\n\t\t\"vnd.lotus-screencam\": \"scm\",\n\t\t\"vnd.lotus-wordpro\": \"lwp\",\n\t\t\"vnd.macports.portpkg\": \"portpkg\",\n\t\t\"vnd.mcd\": \"mcd\",\n\t\t\"vnd.medcalcdata\": \"mc1\",\n\t\t\"vnd.mediastation.cdkey\": \"cdkey\",\n\t\t\"vnd.mfer\": \"mwf\",\n\t\t\"vnd.mfmp\": \"mfm\",\n\t\t\"vnd.micrografx.flo\": \"flo\",\n\t\t\"vnd.micrografx.igx\": \"igx\",\n\t\t\"vnd.mif\": \"mif\",\n\t\t\"vnd.mobius.daf\": \"daf\",\n\t\t\"vnd.mobius.dis\": \"dis\",\n\t\t\"vnd.mobius.mbk\": \"mbk\",\n\t\t\"vnd.mobius.mqy\": \"mqy\",\n\t\t\"vnd.mobius.msl\": \"msl\",\n\t\t\"vnd.mobius.plc\": \"plc\",\n\t\t\"vnd.mobius.txf\": \"txf\",\n\t\t\"vnd.mophun.application\": \"mpn\",\n\t\t\"vnd.mophun.certificate\": \"mpc\",\n\t\t\"vnd.ms-artgalry\": \"cil\",\n\t\t\"vnd.ms-cab-compressed\": \"cab\",\n\t\t\"vnd.ms-excel.addin.macroenabled.12\": \"xlam\",\n\t\t\"vnd.ms-excel.sheet.binary.macroenabled.12\": \"xlsb\",\n\t\t\"vnd.ms-excel.sheet.macroenabled.12\": \"xlsm\",\n\t\t\"vnd.ms-excel.template.macroenabled.12\": \"xltm\",\n\t\t\"vnd.ms-fontobject\": \"eot\",\n\t\t\"vnd.ms-htmlhelp\": \"chm\",\n\t\t\"vnd.ms-ims\": \"ims\",\n\t\t\"vnd.ms-lrm\": \"lrm\",\n\t\t\"vnd.ms-officetheme\": \"thmx\",\n\t\t\"vnd.ms-powerpoint.addin.macroenabled.12\": \"ppam\",\n\t\t\"vnd.ms-powerpoint.presentation.macroenabled.12\": \"pptm\",\n\t\t\"vnd.ms-powerpoint.slide.macroenabled.12\": \"sldm\",\n\t\t\"vnd.ms-powerpoint.slideshow.macroenabled.12\": \"ppsm\",\n\t\t\"vnd.ms-powerpoint.template.macroenabled.12\": \"potm\",\n\t\t\"vnd.ms-project\": [\"mpp\", \"mpt\"],\n\t\t\"vnd.ms-word.document.macroenabled.12\": \"docm\",\n\t\t\"vnd.ms-word.template.macroenabled.12\": \"dotm\",\n\t\t\"vnd.ms-works\": [\"wps\", \"wks\", \"wcm\", \"wdb\"],\n\t\t\"vnd.ms-wpl\": \"wpl\",\n\t\t\"vnd.ms-xpsdocument\": \"xps\",\n\t\t\"vnd.mseq\": \"mseq\",\n\t\t\"vnd.musician\": \"mus\",\n\t\t\"vnd.muvee.style\": \"msty\",\n\t\t\"vnd.mynfc\": \"taglet\",\n\t\t\"vnd.neurolanguage.nlu\": \"nlu\",\n\t\t\"vnd.nitf\": [\"ntf\", \"nitf\"],\n\t\t\"vnd.noblenet-directory\": \"nnd\",\n\t\t\"vnd.noblenet-sealer\": \"nns\",\n\t\t\"vnd.noblenet-web\": \"nnw\",\n\t\t\"vnd.nokia.n-gage.data\": \"ngdat\",\n\t\t\"vnd.nokia.n-gage.symbian.install\": \"n-gage\",\n\t\t\"vnd.nokia.radio-preset\": \"rpst\",\n\t\t\"vnd.nokia.radio-presets\": \"rpss\",\n\t\t\"vnd.novadigm.edm\": \"edm\",\n\t\t\"vnd.novadigm.edx\": \"edx\",\n\t\t\"vnd.novadigm.ext\": \"ext\",\n\t\t\"vnd.oasis.opendocument.chart-template\": \"otc\",\n\t\t\"vnd.oasis.opendocument.formula-template\": \"odft\",\n\t\t\"vnd.oasis.opendocument.image-template\": \"oti\",\n\t\t\"vnd.olpc-sugar\": \"xo\",\n\t\t\"vnd.oma.dd2+xml\": \"dd2\",\n\t\t\"vnd.openofficeorg.extension\": \"oxt\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.slide\": \"sldx\",\n\t\t\"vnd.osgeo.mapguide.package\": \"mgp\",\n\t\t\"vnd.osgi.dp\": \"dp\",\n\t\t\"vnd.osgi.subsystem\": \"esa\",\n\t\t\"vnd.palm\": [\"pdb\", \"pqa\", \"oprc\"],\n\t\t\"vnd.pawaafile\": \"paw\",\n\t\t\"vnd.pg.format\": \"str\",\n\t\t\"vnd.pg.osasli\": \"ei6\",\n\t\t\"vnd.picsel\": \"efif\",\n\t\t\"vnd.pmi.widget\": \"wg\",\n\t\t\"vnd.pocketlearn\": \"plf\",\n\t\t\"vnd.powerbuilder6\": \"pbd\",\n\t\t\"vnd.previewsystems.box\": \"box\",\n\t\t\"vnd.proteus.magazine\": \"mgz\",\n\t\t\"vnd.publishare-delta-tree\": \"qps\",\n\t\t\"vnd.pvi.ptid1\": \"ptid\",\n\t\t\"vnd.quark.quarkxpress\": [\"qxd\", \"qxt\", \"qwd\", \"qwt\", \"qxl\", \"qxb\"],\n\t\t\"vnd.realvnc.bed\": \"bed\",\n\t\t\"vnd.recordare.musicxml\": \"mxl\",\n\t\t\"vnd.recordare.musicxml+xml\": \"musicxml\",\n\t\t\"vnd.rig.cryptonote\": \"cryptonote\",\n\t\t\"vnd.rn-realmedia\": \"rm\",\n\t\t\"vnd.rn-realmedia-vbr\": \"rmvb\",\n\t\t\"vnd.route66.link66+xml\": \"link66\",\n\t\t\"vnd.sailingtracker.track\": \"st\",\n\t\t\"vnd.seemail\": \"see\",\n\t\t\"vnd.sema\": \"sema\",\n\t\t\"vnd.semd\": \"semd\",\n\t\t\"vnd.semf\": \"semf\",\n\t\t\"vnd.shana.informed.formdata\": \"ifm\",\n\t\t\"vnd.shana.informed.formtemplate\": \"itp\",\n\t\t\"vnd.shana.informed.interchange\": \"iif\",\n\t\t\"vnd.shana.informed.package\": \"ipk\",\n\t\t\"vnd.simtech-mindmapper\": [\"twd\", \"twds\"],\n\t\t\"vnd.smart.teacher\": \"teacher\",\n\t\t\"vnd.solent.sdkm+xml\": [\"sdkm\", \"sdkd\"],\n\t\t\"vnd.spotfire.dxp\": \"dxp\",\n\t\t\"vnd.spotfire.sfs\": \"sfs\",\n\t\t\"vnd.stepmania.package\": \"smzip\",\n\t\t\"vnd.stepmania.stepchart\": \"sm\",\n\t\t\"vnd.sus-calendar\": [\"sus\", \"susp\"],\n\t\t\"vnd.svd\": \"svd\",\n\t\t\"vnd.syncml+xml\": \"xsm\",\n\t\t\"vnd.syncml.dm+wbxml\": \"bdm\",\n\t\t\"vnd.syncml.dm+xml\": \"xdm\",\n\t\t\"vnd.tao.intent-module-archive\": \"tao\",\n\t\t\"vnd.tcpdump.pcap\": [\"pcap\", \"cap\", \"dmp\"],\n\t\t\"vnd.tmobile-livetv\": \"tmo\",\n\t\t\"vnd.trid.tpt\": \"tpt\",\n\t\t\"vnd.triscape.mxs\": \"mxs\",\n\t\t\"vnd.trueapp\": \"tra\",\n\t\t\"vnd.ufdl\": [\"ufd\", \"ufdl\"],\n\t\t\"vnd.uiq.theme\": \"utz\",\n\t\t\"vnd.umajin\": \"umj\",\n\t\t\"vnd.unity\": \"unityweb\",\n\t\t\"vnd.uoml+xml\": \"uoml\",\n\t\t\"vnd.vcx\": \"vcx\",\n\t\t\"vnd.visionary\": \"vis\",\n\t\t\"vnd.vsf\": \"vsf\",\n\t\t\"vnd.webturbo\": \"wtb\",\n\t\t\"vnd.wolfram.player\": \"nbp\",\n\t\t\"vnd.wqd\": \"wqd\",\n\t\t\"vnd.wt.stf\": \"stf\",\n\t\t\"vnd.xara\": \"xar\",\n\t\t\"vnd.xfdl\": \"xfdl\",\n\t\t\"vnd.yamaha.hv-dic\": \"hvd\",\n\t\t\"vnd.yamaha.hv-script\": \"hvs\",\n\t\t\"vnd.yamaha.hv-voice\": \"hvp\",\n\t\t\"vnd.yamaha.openscoreformat\": \"osf\",\n\t\t\"vnd.yamaha.openscoreformat.osfpvg+xml\": \"osfpvg\",\n\t\t\"vnd.yamaha.smaf-audio\": \"saf\",\n\t\t\"vnd.yamaha.smaf-phrase\": \"spf\",\n\t\t\"vnd.yellowriver-custom-menu\": \"cmp\",\n\t\t\"vnd.zul\": [\"zir\", \"zirz\"],\n\t\t\"vnd.zzazz.deck+xml\": \"zaz\",\n\t\t\"voicexml+xml\": \"vxml\",\n\t\t\"widget\": \"wgt\",\n\t\t\"winhlp\": \"hlp\",\n\t\t\"wsdl+xml\": \"wsdl\",\n\t\t\"wspolicy+xml\": \"wspolicy\",\n\t\t\"x-ace-compressed\": \"ace\",\n\t\t\"x-authorware-bin\": [\"aab\", \"x32\", \"u32\", \"vox\"],\n\t\t\"x-authorware-map\": \"aam\",\n\t\t\"x-authorware-seg\": \"aas\",\n\t\t\"x-blorb\": [\"blb\", \"blorb\"],\n\t\t\"x-bzip\": \"bz\",\n\t\t\"x-bzip2\": [\"bz2\", \"boz\"],\n\t\t\"x-cfs-compressed\": \"cfs\",\n\t\t\"x-chat\": \"chat\",\n\t\t\"x-conference\": \"nsc\",\n\t\t\"x-dgc-compressed\": \"dgc\",\n\t\t\"x-dtbncx+xml\": \"ncx\",\n\t\t\"x-dtbook+xml\": \"dtb\",\n\t\t\"x-dtbresource+xml\": \"res\",\n\t\t\"x-eva\": \"eva\",\n\t\t\"x-font-bdf\": \"bdf\",\n\t\t\"x-font-ghostscript\": \"gsf\",\n\t\t\"x-font-linux-psf\": \"psf\",\n\t\t\"x-font-otf\": \"otf\",\n\t\t\"x-font-pcf\": \"pcf\",\n\t\t\"x-font-snf\": \"snf\",\n\t\t\"x-font-ttf\": [\"ttf\", \"ttc\"],\n\t\t\"x-font-type1\": [\"pfa\", \"pfb\", \"pfm\", \"afm\"],\n\t\t\"x-font-woff\": \"woff\",\n\t\t\"x-freearc\": \"arc\",\n\t\t\"x-gca-compressed\": \"gca\",\n\t\t\"x-glulx\": \"ulx\",\n\t\t\"x-gramps-xml\": \"gramps\",\n\t\t\"x-install-instructions\": \"install\",\n\t\t\"x-lzh-compressed\": [\"lzh\", \"lha\"],\n\t\t\"x-mie\": \"mie\",\n\t\t\"x-mobipocket-ebook\": [\"prc\", \"mobi\"],\n\t\t\"x-ms-application\": \"application\",\n\t\t\"x-ms-shortcut\": \"lnk\",\n\t\t\"x-ms-xbap\": \"xbap\",\n\t\t\"x-msbinder\": \"obd\",\n\t\t\"x-mscardfile\": \"crd\",\n\t\t\"x-msclip\": \"clp\",\n\t\t\"x-msdownload\": [\"exe\", \"dll\", \"com\", \"bat\", \"msi\"],\n\t\t\"x-msmediaview\": [\"mvb\", \"m13\", \"m14\"],\n\t\t\"x-msmetafile\": [\"wmf\", \"wmz\", \"emf\", \"emz\"],\n\t\t\"x-msmoney\": \"mny\",\n\t\t\"x-mspublisher\": \"pub\",\n\t\t\"x-msschedule\": \"scd\",\n\t\t\"x-msterminal\": \"trm\",\n\t\t\"x-mswrite\": \"wri\",\n\t\t\"x-nzb\": \"nzb\",\n\t\t\"x-pkcs12\": [\"p12\", \"pfx\"],\n\t\t\"x-pkcs7-certificates\": [\"p7b\", \"spc\"],\n\t\t\"x-research-info-systems\": \"ris\",\n\t\t\"x-silverlight-app\": \"xap\",\n\t\t\"x-sql\": \"sql\",\n\t\t\"x-stuffitx\": \"sitx\",\n\t\t\"x-subrip\": \"srt\",\n\t\t\"x-t3vm-image\": \"t3\",\n\t\t\"x-tads\": \"gam\",\n\t\t\"x-tex\": \"tex\",\n\t\t\"x-tex-tfm\": \"tfm\",\n\t\t\"x-tgif\": \"obj\",\n\t\t\"x-xliff+xml\": \"xlf\",\n\t\t\"x-xz\": \"xz\",\n\t\t\"x-zmachine\": [\"z1\", \"z2\", \"z3\", \"z4\", \"z5\", \"z6\", \"z7\", \"z8\"],\n\t\t\"xaml+xml\": \"xaml\",\n\t\t\"xcap-diff+xml\": \"xdf\",\n\t\t\"xenc+xml\": \"xenc\",\n\t\t\"xml-dtd\": \"dtd\",\n\t\t\"xop+xml\": \"xop\",\n\t\t\"xproc+xml\": \"xpl\",\n\t\t\"xslt+xml\": \"xslt\",\n\t\t\"xv+xml\": [\"mxml\", \"xhvml\", \"xvml\", \"xvm\"],\n\t\t\"yang\": \"yang\",\n\t\t\"yin+xml\": \"yin\",\n\t\t\"envoy\": \"evy\",\n\t\t\"fractals\": \"fif\",\n\t\t\"internet-property-stream\": \"acx\",\n\t\t\"olescript\": \"axs\",\n\t\t\"vnd.ms-outlook\": \"msg\",\n\t\t\"vnd.ms-pkicertstore\": \"sst\",\n\t\t\"x-compress\": \"z\",\n\t\t\"x-compressed\": \"tgz\",\n\t\t\"x-gzip\": \"gz\",\n\t\t\"x-perfmon\": [\"pma\", \"pmc\", \"pml\", \"pmr\", \"pmw\"],\n\t\t\"x-pkcs7-mime\": [\"p7c\", \"p7m\"],\n\t\t\"ynd.ms-pkipko\": \"pko\"\n\t},\n\t\"audio\": {\n\t\t\"amr\": \"amr\",\n\t\t\"amr-wb\": \"awb\",\n\t\t\"annodex\": \"axa\",\n\t\t\"basic\": [\"au\", \"snd\"],\n\t\t\"flac\": \"flac\",\n\t\t\"midi\": [\"mid\", \"midi\", \"kar\", \"rmi\"],\n\t\t\"mpeg\": [\"mpga\", \"mpega\", \"mp2\", \"mp3\", \"m4a\", \"mp2a\", \"m2a\", \"m3a\"],\n\t\t\"mpegurl\": \"m3u\",\n\t\t\"ogg\": [\"oga\", \"ogg\", \"spx\"],\n\t\t\"prs.sid\": \"sid\",\n\t\t\"x-aiff\": [\"aif\", \"aiff\", \"aifc\"],\n\t\t\"x-gsm\": \"gsm\",\n\t\t\"x-ms-wma\": \"wma\",\n\t\t\"x-ms-wax\": \"wax\",\n\t\t\"x-pn-realaudio\": \"ram\",\n\t\t\"x-realaudio\": \"ra\",\n\t\t\"x-sd2\": \"sd2\",\n\t\t\"x-wav\": \"wav\",\n\t\t\"adpcm\": \"adp\",\n\t\t\"mp4\": \"mp4a\",\n\t\t\"s3m\": \"s3m\",\n\t\t\"silk\": \"sil\",\n\t\t\"vnd.dece.audio\": [\"uva\", \"uvva\"],\n\t\t\"vnd.digital-winds\": \"eol\",\n\t\t\"vnd.dra\": \"dra\",\n\t\t\"vnd.dts\": \"dts\",\n\t\t\"vnd.dts.hd\": \"dtshd\",\n\t\t\"vnd.lucent.voice\": \"lvp\",\n\t\t\"vnd.ms-playready.media.pya\": \"pya\",\n\t\t\"vnd.nuera.ecelp4800\": \"ecelp4800\",\n\t\t\"vnd.nuera.ecelp7470\": \"ecelp7470\",\n\t\t\"vnd.nuera.ecelp9600\": \"ecelp9600\",\n\t\t\"vnd.rip\": \"rip\",\n\t\t\"webm\": \"weba\",\n\t\t\"x-aac\": \"aac\",\n\t\t\"x-caf\": \"caf\",\n\t\t\"x-matroska\": \"mka\",\n\t\t\"x-pn-realaudio-plugin\": \"rmp\",\n\t\t\"xm\": \"xm\",\n\t\t\"mid\": [\"mid\", \"rmi\"]\n\t},\n\t\"chemical\": {\n\t\t\"x-alchemy\": \"alc\",\n\t\t\"x-cache\": [\"cac\", \"cache\"],\n\t\t\"x-cache-csf\": \"csf\",\n\t\t\"x-cactvs-binary\": [\"cbin\", \"cascii\", \"ctab\"],\n\t\t\"x-cdx\": \"cdx\",\n\t\t\"x-chem3d\": \"c3d\",\n\t\t\"x-cif\": \"cif\",\n\t\t\"x-cmdf\": \"cmdf\",\n\t\t\"x-cml\": \"cml\",\n\t\t\"x-compass\": \"cpa\",\n\t\t\"x-crossfire\": \"bsd\",\n\t\t\"x-csml\": [\"csml\", \"csm\"],\n\t\t\"x-ctx\": \"ctx\",\n\t\t\"x-cxf\": [\"cxf\", \"cef\"],\n\t\t\"x-embl-dl-nucleotide\": [\"emb\", \"embl\"],\n\t\t\"x-gamess-input\": [\"inp\", \"gam\", \"gamin\"],\n\t\t\"x-gaussian-checkpoint\": [\"fch\", \"fchk\"],\n\t\t\"x-gaussian-cube\": \"cub\",\n\t\t\"x-gaussian-input\": [\"gau\", \"gjc\", \"gjf\"],\n\t\t\"x-gaussian-log\": \"gal\",\n\t\t\"x-gcg8-sequence\": \"gcg\",\n\t\t\"x-genbank\": \"gen\",\n\t\t\"x-hin\": \"hin\",\n\t\t\"x-isostar\": [\"istr\", \"ist\"],\n\t\t\"x-jcamp-dx\": [\"jdx\", \"dx\"],\n\t\t\"x-kinemage\": \"kin\",\n\t\t\"x-macmolecule\": \"mcm\",\n\t\t\"x-macromodel-input\": [\"mmd\", \"mmod\"],\n\t\t\"x-mdl-molfile\": \"mol\",\n\t\t\"x-mdl-rdfile\": \"rd\",\n\t\t\"x-mdl-rxnfile\": \"rxn\",\n\t\t\"x-mdl-sdfile\": [\"sd\", \"sdf\"],\n\t\t\"x-mdl-tgf\": \"tgf\",\n\t\t\"x-mmcif\": \"mcif\",\n\t\t\"x-mol2\": \"mol2\",\n\t\t\"x-molconn-Z\": \"b\",\n\t\t\"x-mopac-graph\": \"gpt\",\n\t\t\"x-mopac-input\": [\"mop\", \"mopcrt\", \"mpc\", \"zmt\"],\n\t\t\"x-mopac-out\": \"moo\",\n\t\t\"x-ncbi-asn1\": \"asn\",\n\t\t\"x-ncbi-asn1-ascii\": [\"prt\", \"ent\"],\n\t\t\"x-ncbi-asn1-binary\": [\"val\", \"aso\"],\n\t\t\"x-pdb\": [\"pdb\", \"ent\"],\n\t\t\"x-rosdal\": \"ros\",\n\t\t\"x-swissprot\": \"sw\",\n\t\t\"x-vamas-iso14976\": \"vms\",\n\t\t\"x-vmd\": \"vmd\",\n\t\t\"x-xtel\": \"xtel\",\n\t\t\"x-xyz\": \"xyz\"\n\t},\n\t\"image\": {\n\t\t\"gif\": \"gif\",\n\t\t\"ief\": \"ief\",\n\t\t\"jpeg\": [\"jpeg\", \"jpg\", \"jpe\"],\n\t\t\"pcx\": \"pcx\",\n\t\t\"png\": \"png\",\n\t\t\"svg+xml\": [\"svg\", \"svgz\"],\n\t\t\"tiff\": [\"tiff\", \"tif\"],\n\t\t\"vnd.djvu\": [\"djvu\", \"djv\"],\n\t\t\"vnd.wap.wbmp\": \"wbmp\",\n\t\t\"x-canon-cr2\": \"cr2\",\n\t\t\"x-canon-crw\": \"crw\",\n\t\t\"x-cmu-raster\": \"ras\",\n\t\t\"x-coreldraw\": \"cdr\",\n\t\t\"x-coreldrawpattern\": \"pat\",\n\t\t\"x-coreldrawtemplate\": \"cdt\",\n\t\t\"x-corelphotopaint\": \"cpt\",\n\t\t\"x-epson-erf\": \"erf\",\n\t\t\"x-icon\": \"ico\",\n\t\t\"x-jg\": \"art\",\n\t\t\"x-jng\": \"jng\",\n\t\t\"x-nikon-nef\": \"nef\",\n\t\t\"x-olympus-orf\": \"orf\",\n\t\t\"x-photoshop\": \"psd\",\n\t\t\"x-portable-anymap\": \"pnm\",\n\t\t\"x-portable-bitmap\": \"pbm\",\n\t\t\"x-portable-graymap\": \"pgm\",\n\t\t\"x-portable-pixmap\": \"ppm\",\n\t\t\"x-rgb\": \"rgb\",\n\t\t\"x-xbitmap\": \"xbm\",\n\t\t\"x-xpixmap\": \"xpm\",\n\t\t\"x-xwindowdump\": \"xwd\",\n\t\t\"bmp\": \"bmp\",\n\t\t\"cgm\": \"cgm\",\n\t\t\"g3fax\": \"g3\",\n\t\t\"ktx\": \"ktx\",\n\t\t\"prs.btif\": \"btif\",\n\t\t\"sgi\": \"sgi\",\n\t\t\"vnd.dece.graphic\": [\"uvi\", \"uvvi\", \"uvg\", \"uvvg\"],\n\t\t\"vnd.dwg\": \"dwg\",\n\t\t\"vnd.dxf\": \"dxf\",\n\t\t\"vnd.fastbidsheet\": \"fbs\",\n\t\t\"vnd.fpx\": \"fpx\",\n\t\t\"vnd.fst\": \"fst\",\n\t\t\"vnd.fujixerox.edmics-mmr\": \"mmr\",\n\t\t\"vnd.fujixerox.edmics-rlc\": \"rlc\",\n\t\t\"vnd.ms-modi\": \"mdi\",\n\t\t\"vnd.ms-photo\": \"wdp\",\n\t\t\"vnd.net-fpx\": \"npx\",\n\t\t\"vnd.xiff\": \"xif\",\n\t\t\"webp\": \"webp\",\n\t\t\"x-3ds\": \"3ds\",\n\t\t\"x-cmx\": \"cmx\",\n\t\t\"x-freehand\": [\"fh\", \"fhc\", \"fh4\", \"fh5\", \"fh7\"],\n\t\t\"x-pict\": [\"pic\", \"pct\"],\n\t\t\"x-tga\": \"tga\",\n\t\t\"cis-cod\": \"cod\",\n\t\t\"pipeg\": \"jfif\"\n\t},\n\t\"message\": {\n\t\t\"rfc822\": [\"eml\", \"mime\", \"mht\", \"mhtml\", \"nws\"]\n\t},\n\t\"model\": {\n\t\t\"iges\": [\"igs\", \"iges\"],\n\t\t\"mesh\": [\"msh\", \"mesh\", \"silo\"],\n\t\t\"vrml\": [\"wrl\", \"vrml\"],\n\t\t\"x3d+vrml\": [\"x3dv\", \"x3dvz\"],\n\t\t\"x3d+xml\": [\"x3d\", \"x3dz\"],\n\t\t\"x3d+binary\": [\"x3db\", \"x3dbz\"],\n\t\t\"vnd.collada+xml\": \"dae\",\n\t\t\"vnd.dwf\": \"dwf\",\n\t\t\"vnd.gdl\": \"gdl\",\n\t\t\"vnd.gtw\": \"gtw\",\n\t\t\"vnd.mts\": \"mts\",\n\t\t\"vnd.vtu\": \"vtu\"\n\t},\n\t\"text\": {\n\t\t\"cache-manifest\": [\"manifest\", \"appcache\"],\n\t\t\"calendar\": [\"ics\", \"icz\", \"ifb\"],\n\t\t\"css\": \"css\",\n\t\t\"csv\": \"csv\",\n\t\t\"h323\": \"323\",\n\t\t\"html\": [\"html\", \"htm\", \"shtml\", \"stm\"],\n\t\t\"iuls\": \"uls\",\n\t\t\"mathml\": \"mml\",\n\t\t\"plain\": [\"txt\", \"text\", \"brf\", \"conf\", \"def\", \"list\", \"log\", \"in\", \"bas\"],\n\t\t\"richtext\": \"rtx\",\n\t\t\"scriptlet\": [\"sct\", \"wsc\"],\n\t\t\"texmacs\": [\"tm\", \"ts\"],\n\t\t\"tab-separated-values\": \"tsv\",\n\t\t\"vnd.sun.j2me.app-descriptor\": \"jad\",\n\t\t\"vnd.wap.wml\": \"wml\",\n\t\t\"vnd.wap.wmlscript\": \"wmls\",\n\t\t\"x-bibtex\": \"bib\",\n\t\t\"x-boo\": \"boo\",\n\t\t\"x-c++hdr\": [\"h++\", \"hpp\", \"hxx\", \"hh\"],\n\t\t\"x-c++src\": [\"c++\", \"cpp\", \"cxx\", \"cc\"],\n\t\t\"x-component\": \"htc\",\n\t\t\"x-dsrc\": \"d\",\n\t\t\"x-diff\": [\"diff\", \"patch\"],\n\t\t\"x-haskell\": \"hs\",\n\t\t\"x-java\": \"java\",\n\t\t\"x-literate-haskell\": \"lhs\",\n\t\t\"x-moc\": \"moc\",\n\t\t\"x-pascal\": [\"p\", \"pas\"],\n\t\t\"x-pcs-gcd\": \"gcd\",\n\t\t\"x-perl\": [\"pl\", \"pm\"],\n\t\t\"x-python\": \"py\",\n\t\t\"x-scala\": \"scala\",\n\t\t\"x-setext\": \"etx\",\n\t\t\"x-tcl\": [\"tcl\", \"tk\"],\n\t\t\"x-tex\": [\"tex\", \"ltx\", \"sty\", \"cls\"],\n\t\t\"x-vcalendar\": \"vcs\",\n\t\t\"x-vcard\": \"vcf\",\n\t\t\"n3\": \"n3\",\n\t\t\"prs.lines.tag\": \"dsc\",\n\t\t\"sgml\": [\"sgml\", \"sgm\"],\n\t\t\"troff\": [\"t\", \"tr\", \"roff\", \"man\", \"me\", \"ms\"],\n\t\t\"turtle\": \"ttl\",\n\t\t\"uri-list\": [\"uri\", \"uris\", \"urls\"],\n\t\t\"vcard\": \"vcard\",\n\t\t\"vnd.curl\": \"curl\",\n\t\t\"vnd.curl.dcurl\": \"dcurl\",\n\t\t\"vnd.curl.scurl\": \"scurl\",\n\t\t\"vnd.curl.mcurl\": \"mcurl\",\n\t\t\"vnd.dvb.subtitle\": \"sub\",\n\t\t\"vnd.fly\": \"fly\",\n\t\t\"vnd.fmi.flexstor\": \"flx\",\n\t\t\"vnd.graphviz\": \"gv\",\n\t\t\"vnd.in3d.3dml\": \"3dml\",\n\t\t\"vnd.in3d.spot\": \"spot\",\n\t\t\"x-asm\": [\"s\", \"asm\"],\n\t\t\"x-c\": [\"c\", \"cc\", \"cxx\", \"cpp\", \"h\", \"hh\", \"dic\"],\n\t\t\"x-fortran\": [\"f\", \"for\", \"f77\", \"f90\"],\n\t\t\"x-opml\": \"opml\",\n\t\t\"x-nfo\": \"nfo\",\n\t\t\"x-sfv\": \"sfv\",\n\t\t\"x-uuencode\": \"uu\",\n\t\t\"webviewhtml\": \"htt\"\n\t},\n\t\"video\": {\n\t\t\"avif\": \".avif\",\n\t\t\"3gpp\": \"3gp\",\n\t\t\"annodex\": \"axv\",\n\t\t\"dl\": \"dl\",\n\t\t\"dv\": [\"dif\", \"dv\"],\n\t\t\"fli\": \"fli\",\n\t\t\"gl\": \"gl\",\n\t\t\"mpeg\": [\"mpeg\", \"mpg\", \"mpe\", \"m1v\", \"m2v\", \"mp2\", \"mpa\", \"mpv2\"],\n\t\t\"mp4\": [\"mp4\", \"mp4v\", \"mpg4\"],\n\t\t\"quicktime\": [\"qt\", \"mov\"],\n\t\t\"ogg\": \"ogv\",\n\t\t\"vnd.mpegurl\": [\"mxu\", \"m4u\"],\n\t\t\"x-flv\": \"flv\",\n\t\t\"x-la-asf\": [\"lsf\", \"lsx\"],\n\t\t\"x-mng\": \"mng\",\n\t\t\"x-ms-asf\": [\"asf\", \"asx\", \"asr\"],\n\t\t\"x-ms-wm\": \"wm\",\n\t\t\"x-ms-wmv\": \"wmv\",\n\t\t\"x-ms-wmx\": \"wmx\",\n\t\t\"x-ms-wvx\": \"wvx\",\n\t\t\"x-msvideo\": \"avi\",\n\t\t\"x-sgi-movie\": \"movie\",\n\t\t\"x-matroska\": [\"mpv\", \"mkv\", \"mk3d\", \"mks\"],\n\t\t\"3gpp2\": \"3g2\",\n\t\t\"h261\": \"h261\",\n\t\t\"h263\": \"h263\",\n\t\t\"h264\": \"h264\",\n\t\t\"jpeg\": \"jpgv\",\n\t\t\"jpm\": [\"jpm\", \"jpgm\"],\n\t\t\"mj2\": [\"mj2\", \"mjp2\"],\n\t\t\"vnd.dece.hd\": [\"uvh\", \"uvvh\"],\n\t\t\"vnd.dece.mobile\": [\"uvm\", \"uvvm\"],\n\t\t\"vnd.dece.pd\": [\"uvp\", \"uvvp\"],\n\t\t\"vnd.dece.sd\": [\"uvs\", \"uvvs\"],\n\t\t\"vnd.dece.video\": [\"uvv\", \"uvvv\"],\n\t\t\"vnd.dvb.file\": \"dvb\",\n\t\t\"vnd.fvt\": \"fvt\",\n\t\t\"vnd.ms-playready.media.pyv\": \"pyv\",\n\t\t\"vnd.uvvu.mp4\": [\"uvu\", \"uvvu\"],\n\t\t\"vnd.vivo\": \"viv\",\n\t\t\"webm\": \"webm\",\n\t\t\"x-f4v\": \"f4v\",\n\t\t\"x-m4v\": \"m4v\",\n\t\t\"x-ms-vob\": \"vob\",\n\t\t\"x-smv\": \"smv\"\n\t},\n\t\"x-conference\": {\n\t\t\"x-cooltalk\": \"ice\"\n\t},\n\t\"x-world\": {\n\t\t\"x-vrml\": [\"vrm\", \"vrml\", \"wrl\", \"flr\", \"wrz\", \"xaf\", \"xof\"]\n\t}\n};\n\nconst mimeTypes = (() => {\n\tconst mimeTypes = {};\n\tfor (const type in table) {\n\t\t// eslint-disable-next-line no-prototype-builtins\n\t\tif (table.hasOwnProperty(type)) {\n\t\t\tfor (const subtype in table[type]) {\n\t\t\t\t// eslint-disable-next-line no-prototype-builtins\n\t\t\t\tif (table[type].hasOwnProperty(subtype)) {\n\t\t\t\t\tconst value = table[type][subtype];\n\t\t\t\t\tif (typeof value == \"string\") {\n\t\t\t\t\t\tmimeTypes[value] = type + \"/\" + subtype;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfor (let indexMimeType = 0; indexMimeType < value.length; indexMimeType++) {\n\t\t\t\t\t\t\tmimeTypes[value[indexMimeType]] = type + \"/\" + subtype;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn mimeTypes;\n})();\n\nexport {\n\tmimeTypes,\n\tgetMimeType\n};\n\nfunction getMimeType(filename) {\n\treturn filename && mimeTypes[filename.split(\".\").pop().toLowerCase()] || getDefaultMimeType();\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nconst table = [];\nfor (let i = 0; i < 256; i++) {\n\tlet t = i;\n\tfor (let j = 0; j < 8; j++) {\n\t\tif (t & 1) {\n\t\t\tt = (t >>> 1) ^ 0xEDB88320;\n\t\t} else {\n\t\t\tt = t >>> 1;\n\t\t}\n\t}\n\ttable[i] = t;\n}\n\nclass Crc32 {\n\n\tconstructor(crc) {\n\t\tthis.crc = crc || -1;\n\t}\n\n\tappend(data) {\n\t\tlet crc = this.crc | 0;\n\t\tfor (let offset = 0, length = data.length | 0; offset < length; offset++) {\n\t\t\tcrc = (crc >>> 8) ^ table[(crc ^ data[offset]) & 0xFF];\n\t\t}\n\t\tthis.crc = crc;\n\t}\n\n\tget() {\n\t\treturn ~this.crc;\n\t}\n}\n\nexport {\n\tCrc32\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n\nimport { Crc32 } from \"./codecs/crc32.js\";\n\nclass Crc32Stream extends TransformStream {\n\n\tconstructor() {\n\t\tconst crc32 = new Crc32();\n\t\tsuper({\n\t\t\ttransform(chunk) {\n\t\t\t\tcrc32.append(chunk);\n\t\t\t},\n\t\t\tflush(controller) {\n\t\t\t\tconst value = new Uint8Array(4);\n\t\t\t\tconst dataView = new DataView(value.buffer);\n\t\t\t\tdataView.setUint32(0, crc32.get());\n\t\t\t\tcontroller.enqueue(value);\n\t\t\t}\n\t\t});\n\t}\n}\n\nexport {\n\tCrc32Stream\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TextEncoder */\n\nexport {\n\tencodeText\n};\n\nfunction encodeText(value) {\n\tif (typeof TextEncoder == \"undefined\") {\n\t\tvalue = unescape(encodeURIComponent(value));\n\t\tconst result = new Uint8Array(value.length);\n\t\tfor (let i = 0; i < result.length; i++) {\n\t\t\tresult[i] = value.charCodeAt(i);\n\t\t}\n\t\treturn result;\n\t} else {\n\t\treturn new TextEncoder().encode(value);\n\t}\n}","// Derived from https://github.com/xqdoo00o/jszip/blob/master/lib/sjcl.js and https://github.com/bitwiseshiftleft/sjcl\n\n// deno-lint-ignore-file no-this-alias\n\n/*\n * SJCL is open. You can use, modify and redistribute it under a BSD\n * license or under the GNU GPL, version 2.0.\n */\n\n/** @fileOverview Javascript cryptography implementation.\n *\n * Crush to remove comments, shorten variable names and\n * generally reduce transmission size.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/*jslint indent: 2, bitwise: false, nomen: false, plusplus: false, white: false, regexp: false */\n\n/** @fileOverview Arrays of bits, encoded as arrays of Numbers.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/**\n * Arrays of bits, encoded as arrays of Numbers.\n * @namespace\n * @description\n *

\n * These objects are the currency accepted by SJCL's crypto functions.\n *

\n *\n *

\n * Most of our crypto primitives operate on arrays of 4-byte words internally,\n * but many of them can take arguments that are not a multiple of 4 bytes.\n * This library encodes arrays of bits (whose size need not be a multiple of 8\n * bits) as arrays of 32-bit words. The bits are packed, big-endian, into an\n * array of words, 32 bits at a time. Since the words are double-precision\n * floating point numbers, they fit some extra data. We use this (in a private,\n * possibly-changing manner) to encode the number of bits actually present\n * in the last word of the array.\n *

\n *\n *

\n * Because bitwise ops clear this out-of-band data, these arrays can be passed\n * to ciphers like AES which want arrays of words.\n *

\n */\nconst bitArray = {\n\t/**\n\t * Concatenate two bit arrays.\n\t * @param {bitArray} a1 The first array.\n\t * @param {bitArray} a2 The second array.\n\t * @return {bitArray} The concatenation of a1 and a2.\n\t */\n\tconcat(a1, a2) {\n\t\tif (a1.length === 0 || a2.length === 0) {\n\t\t\treturn a1.concat(a2);\n\t\t}\n\n\t\tconst last = a1[a1.length - 1], shift = bitArray.getPartial(last);\n\t\tif (shift === 32) {\n\t\t\treturn a1.concat(a2);\n\t\t} else {\n\t\t\treturn bitArray._shiftRight(a2, shift, last | 0, a1.slice(0, a1.length - 1));\n\t\t}\n\t},\n\n\t/**\n\t * Find the length of an array of bits.\n\t * @param {bitArray} a The array.\n\t * @return {Number} The length of a, in bits.\n\t */\n\tbitLength(a) {\n\t\tconst l = a.length;\n\t\tif (l === 0) {\n\t\t\treturn 0;\n\t\t}\n\t\tconst x = a[l - 1];\n\t\treturn (l - 1) * 32 + bitArray.getPartial(x);\n\t},\n\n\t/**\n\t * Truncate an array.\n\t * @param {bitArray} a The array.\n\t * @param {Number} len The length to truncate to, in bits.\n\t * @return {bitArray} A new array, truncated to len bits.\n\t */\n\tclamp(a, len) {\n\t\tif (a.length * 32 < len) {\n\t\t\treturn a;\n\t\t}\n\t\ta = a.slice(0, Math.ceil(len / 32));\n\t\tconst l = a.length;\n\t\tlen = len & 31;\n\t\tif (l > 0 && len) {\n\t\t\ta[l - 1] = bitArray.partial(len, a[l - 1] & 0x80000000 >> (len - 1), 1);\n\t\t}\n\t\treturn a;\n\t},\n\n\t/**\n\t * Make a partial word for a bit array.\n\t * @param {Number} len The number of bits in the word.\n\t * @param {Number} x The bits.\n\t * @param {Number} [_end=0] Pass 1 if x has already been shifted to the high side.\n\t * @return {Number} The partial word.\n\t */\n\tpartial(len, x, _end) {\n\t\tif (len === 32) {\n\t\t\treturn x;\n\t\t}\n\t\treturn (_end ? x | 0 : x << (32 - len)) + len * 0x10000000000;\n\t},\n\n\t/**\n\t * Get the number of bits used by a partial word.\n\t * @param {Number} x The partial word.\n\t * @return {Number} The number of bits used by the partial word.\n\t */\n\tgetPartial(x) {\n\t\treturn Math.round(x / 0x10000000000) || 32;\n\t},\n\n\t/** Shift an array right.\n\t * @param {bitArray} a The array to shift.\n\t * @param {Number} shift The number of bits to shift.\n\t * @param {Number} [carry=0] A byte to carry in\n\t * @param {bitArray} [out=[]] An array to prepend to the output.\n\t * @private\n\t */\n\t_shiftRight(a, shift, carry, out) {\n\t\tif (out === undefined) {\n\t\t\tout = [];\n\t\t}\n\n\t\tfor (; shift >= 32; shift -= 32) {\n\t\t\tout.push(carry);\n\t\t\tcarry = 0;\n\t\t}\n\t\tif (shift === 0) {\n\t\t\treturn out.concat(a);\n\t\t}\n\n\t\tfor (let i = 0; i < a.length; i++) {\n\t\t\tout.push(carry | a[i] >>> shift);\n\t\t\tcarry = a[i] << (32 - shift);\n\t\t}\n\t\tconst last2 = a.length ? a[a.length - 1] : 0;\n\t\tconst shift2 = bitArray.getPartial(last2);\n\t\tout.push(bitArray.partial(shift + shift2 & 31, (shift + shift2 > 32) ? carry : out.pop(), 1));\n\t\treturn out;\n\t}\n};\n\n/** @fileOverview Bit array codec implementations.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/**\n * Arrays of bytes\n * @namespace\n */\nconst codec = {\n\tbytes: {\n\t\t/** Convert from a bitArray to an array of bytes. */\n\t\tfromBits(arr) {\n\t\t\tconst bl = bitArray.bitLength(arr);\n\t\t\tconst byteLength = bl / 8;\n\t\t\tconst out = new Uint8Array(byteLength);\n\t\t\tlet tmp;\n\t\t\tfor (let i = 0; i < byteLength; i++) {\n\t\t\t\tif ((i & 3) === 0) {\n\t\t\t\t\ttmp = arr[i / 4];\n\t\t\t\t}\n\t\t\t\tout[i] = tmp >>> 24;\n\t\t\t\ttmp <<= 8;\n\t\t\t}\n\t\t\treturn out;\n\t\t},\n\t\t/** Convert from an array of bytes to a bitArray. */\n\t\ttoBits(bytes) {\n\t\t\tconst out = [];\n\t\t\tlet i;\n\t\t\tlet tmp = 0;\n\t\t\tfor (i = 0; i < bytes.length; i++) {\n\t\t\t\ttmp = tmp << 8 | bytes[i];\n\t\t\t\tif ((i & 3) === 3) {\n\t\t\t\t\tout.push(tmp);\n\t\t\t\t\ttmp = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (i & 3) {\n\t\t\t\tout.push(bitArray.partial(8 * (i & 3), tmp));\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t}\n};\n\nconst hash = {};\n\n/**\n * Context for a SHA-1 operation in progress.\n * @constructor\n */\nhash.sha1 = class {\n\tconstructor(hash) {\n\t\tconst sha1 = this;\n\t\t/**\n\t\t * The hash's block size, in bits.\n\t\t * @constant\n\t\t */\n\t\tsha1.blockSize = 512;\n\t\t/**\n\t\t * The SHA-1 initialization vector.\n\t\t * @private\n\t\t */\n\t\tsha1._init = [0x67452301, 0xEFCDAB89, 0x98BADCFE, 0x10325476, 0xC3D2E1F0];\n\t\t/**\n\t\t * The SHA-1 hash key.\n\t\t * @private\n\t\t */\n\t\tsha1._key = [0x5A827999, 0x6ED9EBA1, 0x8F1BBCDC, 0xCA62C1D6];\n\t\tif (hash) {\n\t\t\tsha1._h = hash._h.slice(0);\n\t\t\tsha1._buffer = hash._buffer.slice(0);\n\t\t\tsha1._length = hash._length;\n\t\t} else {\n\t\t\tsha1.reset();\n\t\t}\n\t}\n\n\t/**\n\t * Reset the hash state.\n\t * @return this\n\t */\n\treset() {\n\t\tconst sha1 = this;\n\t\tsha1._h = sha1._init.slice(0);\n\t\tsha1._buffer = [];\n\t\tsha1._length = 0;\n\t\treturn sha1;\n\t}\n\n\t/**\n\t * Input several words to the hash.\n\t * @param {bitArray|String} data the data to hash.\n\t * @return this\n\t */\n\tupdate(data) {\n\t\tconst sha1 = this;\n\t\tif (typeof data === \"string\") {\n\t\t\tdata = codec.utf8String.toBits(data);\n\t\t}\n\t\tconst b = sha1._buffer = bitArray.concat(sha1._buffer, data);\n\t\tconst ol = sha1._length;\n\t\tconst nl = sha1._length = ol + bitArray.bitLength(data);\n\t\tif (nl > 9007199254740991) {\n\t\t\tthrow new Error(\"Cannot hash more than 2^53 - 1 bits\");\n\t\t}\n\t\tconst c = new Uint32Array(b);\n\t\tlet j = 0;\n\t\tfor (let i = sha1.blockSize + ol - ((sha1.blockSize + ol) & (sha1.blockSize - 1)); i <= nl;\n\t\t\ti += sha1.blockSize) {\n\t\t\tsha1._block(c.subarray(16 * j, 16 * (j + 1)));\n\t\t\tj += 1;\n\t\t}\n\t\tb.splice(0, 16 * j);\n\t\treturn sha1;\n\t}\n\n\t/**\n\t * Complete hashing and output the hash value.\n\t * @return {bitArray} The hash value, an array of 5 big-endian words. TODO\n\t */\n\tfinalize() {\n\t\tconst sha1 = this;\n\t\tlet b = sha1._buffer;\n\t\tconst h = sha1._h;\n\n\t\t// Round out and push the buffer\n\t\tb = bitArray.concat(b, [bitArray.partial(1, 1)]);\n\t\t// Round out the buffer to a multiple of 16 words, less the 2 length words.\n\t\tfor (let i = b.length + 2; i & 15; i++) {\n\t\t\tb.push(0);\n\t\t}\n\n\t\t// append the length\n\t\tb.push(Math.floor(sha1._length / 0x100000000));\n\t\tb.push(sha1._length | 0);\n\n\t\twhile (b.length) {\n\t\t\tsha1._block(b.splice(0, 16));\n\t\t}\n\n\t\tsha1.reset();\n\t\treturn h;\n\t}\n\n\t/**\n\t * The SHA-1 logical functions f(0), f(1), ..., f(79).\n\t * @private\n\t */\n\t_f(t, b, c, d) {\n\t\tif (t <= 19) {\n\t\t\treturn (b & c) | (~b & d);\n\t\t} else if (t <= 39) {\n\t\t\treturn b ^ c ^ d;\n\t\t} else if (t <= 59) {\n\t\t\treturn (b & c) | (b & d) | (c & d);\n\t\t} else if (t <= 79) {\n\t\t\treturn b ^ c ^ d;\n\t\t}\n\t}\n\n\t/**\n\t * Circular left-shift operator.\n\t * @private\n\t */\n\t_S(n, x) {\n\t\treturn (x << n) | (x >>> 32 - n);\n\t}\n\n\t/**\n\t * Perform one cycle of SHA-1.\n\t * @param {Uint32Array|bitArray} words one block of words.\n\t * @private\n\t */\n\t_block(words) {\n\t\tconst sha1 = this;\n\t\tconst h = sha1._h;\n\t\t// When words is passed to _block, it has 16 elements. SHA1 _block\n\t\t// function extends words with new elements (at the end there are 80 elements). \n\t\t// The problem is that if we use Uint32Array instead of Array, \n\t\t// the length of Uint32Array cannot be changed. Thus, we replace words with a \n\t\t// normal Array here.\n\t\tconst w = Array(80); // do not use Uint32Array here as the instantiation is slower\n\t\tfor (let j = 0; j < 16; j++) {\n\t\t\tw[j] = words[j];\n\t\t}\n\n\t\tlet a = h[0];\n\t\tlet b = h[1];\n\t\tlet c = h[2];\n\t\tlet d = h[3];\n\t\tlet e = h[4];\n\n\t\tfor (let t = 0; t <= 79; t++) {\n\t\t\tif (t >= 16) {\n\t\t\t\tw[t] = sha1._S(1, w[t - 3] ^ w[t - 8] ^ w[t - 14] ^ w[t - 16]);\n\t\t\t}\n\t\t\tconst tmp = (sha1._S(5, a) + sha1._f(t, b, c, d) + e + w[t] +\n\t\t\t\tsha1._key[Math.floor(t / 20)]) | 0;\n\t\t\te = d;\n\t\t\td = c;\n\t\t\tc = sha1._S(30, b);\n\t\t\tb = a;\n\t\t\ta = tmp;\n\t\t}\n\n\t\th[0] = (h[0] + a) | 0;\n\t\th[1] = (h[1] + b) | 0;\n\t\th[2] = (h[2] + c) | 0;\n\t\th[3] = (h[3] + d) | 0;\n\t\th[4] = (h[4] + e) | 0;\n\t}\n};\n\n/** @fileOverview Low-level AES implementation.\n *\n * This file contains a low-level implementation of AES, optimized for\n * size and for efficiency on several browsers. It is based on\n * OpenSSL's aes_core.c, a public-domain implementation by Vincent\n * Rijmen, Antoon Bosselaers and Paulo Barreto.\n *\n * An older version of this implementation is available in the public\n * domain, but this one is (c) Emily Stark, Mike Hamburg, Dan Boneh,\n * Stanford University 2008-2010 and BSD-licensed for liability\n * reasons.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\nconst cipher = {};\n\n/**\n * Schedule out an AES key for both encryption and decryption. This\n * is a low-level class. Use a cipher mode to do bulk encryption.\n *\n * @constructor\n * @param {Array} key The key as an array of 4, 6 or 8 words.\n */\ncipher.aes = class {\n\tconstructor(key) {\n\t\t/**\n\t\t * The expanded S-box and inverse S-box tables. These will be computed\n\t\t * on the client so that we don't have to send them down the wire.\n\t\t *\n\t\t * There are two tables, _tables[0] is for encryption and\n\t\t * _tables[1] is for decryption.\n\t\t *\n\t\t * The first 4 sub-tables are the expanded S-box with MixColumns. The\n\t\t * last (_tables[01][4]) is the S-box itself.\n\t\t *\n\t\t * @private\n\t\t */\n\t\tconst aes = this;\n\t\taes._tables = [[[], [], [], [], []], [[], [], [], [], []]];\n\n\t\tif (!aes._tables[0][0][0]) {\n\t\t\taes._precompute();\n\t\t}\n\n\t\tconst sbox = aes._tables[0][4];\n\t\tconst decTable = aes._tables[1];\n\t\tconst keyLen = key.length;\n\n\t\tlet i, encKey, decKey, rcon = 1;\n\n\t\tif (keyLen !== 4 && keyLen !== 6 && keyLen !== 8) {\n\t\t\tthrow new Error(\"invalid aes key size\");\n\t\t}\n\n\t\taes._key = [encKey = key.slice(0), decKey = []];\n\n\t\t// schedule encryption keys\n\t\tfor (i = keyLen; i < 4 * keyLen + 28; i++) {\n\t\t\tlet tmp = encKey[i - 1];\n\n\t\t\t// apply sbox\n\t\t\tif (i % keyLen === 0 || (keyLen === 8 && i % keyLen === 4)) {\n\t\t\t\ttmp = sbox[tmp >>> 24] << 24 ^ sbox[tmp >> 16 & 255] << 16 ^ sbox[tmp >> 8 & 255] << 8 ^ sbox[tmp & 255];\n\n\t\t\t\t// shift rows and add rcon\n\t\t\t\tif (i % keyLen === 0) {\n\t\t\t\t\ttmp = tmp << 8 ^ tmp >>> 24 ^ rcon << 24;\n\t\t\t\t\trcon = rcon << 1 ^ (rcon >> 7) * 283;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tencKey[i] = encKey[i - keyLen] ^ tmp;\n\t\t}\n\n\t\t// schedule decryption keys\n\t\tfor (let j = 0; i; j++, i--) {\n\t\t\tconst tmp = encKey[j & 3 ? i : i - 4];\n\t\t\tif (i <= 4 || j < 4) {\n\t\t\t\tdecKey[j] = tmp;\n\t\t\t} else {\n\t\t\t\tdecKey[j] = decTable[0][sbox[tmp >>> 24]] ^\n\t\t\t\t\tdecTable[1][sbox[tmp >> 16 & 255]] ^\n\t\t\t\t\tdecTable[2][sbox[tmp >> 8 & 255]] ^\n\t\t\t\t\tdecTable[3][sbox[tmp & 255]];\n\t\t\t}\n\t\t}\n\t}\n\t// public\n\t/* Something like this might appear here eventually\n\tname: \"AES\",\n\tblockSize: 4,\n\tkeySizes: [4,6,8],\n\t*/\n\n\t/**\n\t * Encrypt an array of 4 big-endian words.\n\t * @param {Array} data The plaintext.\n\t * @return {Array} The ciphertext.\n\t */\n\tencrypt(data) {\n\t\treturn this._crypt(data, 0);\n\t}\n\n\t/**\n\t * Decrypt an array of 4 big-endian words.\n\t * @param {Array} data The ciphertext.\n\t * @return {Array} The plaintext.\n\t */\n\tdecrypt(data) {\n\t\treturn this._crypt(data, 1);\n\t}\n\n\t/**\n\t * Expand the S-box tables.\n\t *\n\t * @private\n\t */\n\t_precompute() {\n\t\tconst encTable = this._tables[0];\n\t\tconst decTable = this._tables[1];\n\t\tconst sbox = encTable[4];\n\t\tconst sboxInv = decTable[4];\n\t\tconst d = [];\n\t\tconst th = [];\n\t\tlet xInv, x2, x4, x8;\n\n\t\t// Compute double and third tables\n\t\tfor (let i = 0; i < 256; i++) {\n\t\t\tth[(d[i] = i << 1 ^ (i >> 7) * 283) ^ i] = i;\n\t\t}\n\n\t\tfor (let x = xInv = 0; !sbox[x]; x ^= x2 || 1, xInv = th[xInv] || 1) {\n\t\t\t// Compute sbox\n\t\t\tlet s = xInv ^ xInv << 1 ^ xInv << 2 ^ xInv << 3 ^ xInv << 4;\n\t\t\ts = s >> 8 ^ s & 255 ^ 99;\n\t\t\tsbox[x] = s;\n\t\t\tsboxInv[s] = x;\n\n\t\t\t// Compute MixColumns\n\t\t\tx8 = d[x4 = d[x2 = d[x]]];\n\t\t\tlet tDec = x8 * 0x1010101 ^ x4 * 0x10001 ^ x2 * 0x101 ^ x * 0x1010100;\n\t\t\tlet tEnc = d[s] * 0x101 ^ s * 0x1010100;\n\n\t\t\tfor (let i = 0; i < 4; i++) {\n\t\t\t\tencTable[i][x] = tEnc = tEnc << 24 ^ tEnc >>> 8;\n\t\t\t\tdecTable[i][s] = tDec = tDec << 24 ^ tDec >>> 8;\n\t\t\t}\n\t\t}\n\n\t\t// Compactify. Considerable speedup on Firefox.\n\t\tfor (let i = 0; i < 5; i++) {\n\t\t\tencTable[i] = encTable[i].slice(0);\n\t\t\tdecTable[i] = decTable[i].slice(0);\n\t\t}\n\t}\n\n\t/**\n\t * Encryption and decryption core.\n\t * @param {Array} input Four words to be encrypted or decrypted.\n\t * @param dir The direction, 0 for encrypt and 1 for decrypt.\n\t * @return {Array} The four encrypted or decrypted words.\n\t * @private\n\t */\n\t_crypt(input, dir) {\n\t\tif (input.length !== 4) {\n\t\t\tthrow new Error(\"invalid aes block size\");\n\t\t}\n\n\t\tconst key = this._key[dir];\n\n\t\tconst nInnerRounds = key.length / 4 - 2;\n\t\tconst out = [0, 0, 0, 0];\n\t\tconst table = this._tables[dir];\n\n\t\t// load up the tables\n\t\tconst t0 = table[0];\n\t\tconst t1 = table[1];\n\t\tconst t2 = table[2];\n\t\tconst t3 = table[3];\n\t\tconst sbox = table[4];\n\n\t\t// state variables a,b,c,d are loaded with pre-whitened data\n\t\tlet a = input[0] ^ key[0];\n\t\tlet b = input[dir ? 3 : 1] ^ key[1];\n\t\tlet c = input[2] ^ key[2];\n\t\tlet d = input[dir ? 1 : 3] ^ key[3];\n\t\tlet kIndex = 4;\n\t\tlet a2, b2, c2;\n\n\t\t// Inner rounds. Cribbed from OpenSSL.\n\t\tfor (let i = 0; i < nInnerRounds; i++) {\n\t\t\ta2 = t0[a >>> 24] ^ t1[b >> 16 & 255] ^ t2[c >> 8 & 255] ^ t3[d & 255] ^ key[kIndex];\n\t\t\tb2 = t0[b >>> 24] ^ t1[c >> 16 & 255] ^ t2[d >> 8 & 255] ^ t3[a & 255] ^ key[kIndex + 1];\n\t\t\tc2 = t0[c >>> 24] ^ t1[d >> 16 & 255] ^ t2[a >> 8 & 255] ^ t3[b & 255] ^ key[kIndex + 2];\n\t\t\td = t0[d >>> 24] ^ t1[a >> 16 & 255] ^ t2[b >> 8 & 255] ^ t3[c & 255] ^ key[kIndex + 3];\n\t\t\tkIndex += 4;\n\t\t\ta = a2; b = b2; c = c2;\n\t\t}\n\n\t\t// Last round.\n\t\tfor (let i = 0; i < 4; i++) {\n\t\t\tout[dir ? 3 & -i : i] =\n\t\t\t\tsbox[a >>> 24] << 24 ^\n\t\t\t\tsbox[b >> 16 & 255] << 16 ^\n\t\t\t\tsbox[c >> 8 & 255] << 8 ^\n\t\t\t\tsbox[d & 255] ^\n\t\t\t\tkey[kIndex++];\n\t\t\ta2 = a; a = b; b = c; c = d; d = a2;\n\t\t}\n\n\t\treturn out;\n\t}\n};\n\n/**\n * Random values\n * @namespace\n */\nconst random = {\n\t/** \n\t * Generate random words with pure js, cryptographically not as strong & safe as native implementation.\n\t * @param {TypedArray} typedArray The array to fill.\n\t * @return {TypedArray} The random values.\n\t */\n\tgetRandomValues(typedArray) {\n\t\tconst words = new Uint32Array(typedArray.buffer);\n\t\tconst r = (m_w) => {\n\t\t\tlet m_z = 0x3ade68b1;\n\t\t\tconst mask = 0xffffffff;\n\t\t\treturn function () {\n\t\t\t\tm_z = (0x9069 * (m_z & 0xFFFF) + (m_z >> 0x10)) & mask;\n\t\t\t\tm_w = (0x4650 * (m_w & 0xFFFF) + (m_w >> 0x10)) & mask;\n\t\t\t\tconst result = ((((m_z << 0x10) + m_w) & mask) / 0x100000000) + .5;\n\t\t\t\treturn result * (Math.random() > .5 ? 1 : -1);\n\t\t\t};\n\t\t};\n\t\tfor (let i = 0, rcache; i < typedArray.length; i += 4) {\n\t\t\tconst _r = r((rcache || Math.random()) * 0x100000000);\n\t\t\trcache = _r() * 0x3ade67b7;\n\t\t\twords[i / 4] = (_r() * 0x100000000) | 0;\n\t\t}\n\t\treturn typedArray;\n\t}\n};\n\n/** @fileOverview CTR mode implementation.\n *\n * Special thanks to Roy Nicholson for pointing out a bug in our\n * implementation.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/** Brian Gladman's CTR Mode.\n* @constructor\n* @param {Object} _prf The aes instance to generate key.\n* @param {bitArray} _iv The iv for ctr mode, it must be 128 bits.\n*/\n\nconst mode = {};\n\n/**\n * Brian Gladman's CTR Mode.\n * @namespace\n */\nmode.ctrGladman = class {\n\tconstructor(prf, iv) {\n\t\tthis._prf = prf;\n\t\tthis._initIv = iv;\n\t\tthis._iv = iv;\n\t}\n\n\treset() {\n\t\tthis._iv = this._initIv;\n\t}\n\n\t/** Input some data to calculate.\n\t * @param {bitArray} data the data to process, it must be intergral multiple of 128 bits unless it's the last.\n\t */\n\tupdate(data) {\n\t\treturn this.calculate(this._prf, data, this._iv);\n\t}\n\n\tincWord(word) {\n\t\tif (((word >> 24) & 0xff) === 0xff) { //overflow\n\t\t\tlet b1 = (word >> 16) & 0xff;\n\t\t\tlet b2 = (word >> 8) & 0xff;\n\t\t\tlet b3 = word & 0xff;\n\n\t\t\tif (b1 === 0xff) { // overflow b1 \n\t\t\t\tb1 = 0;\n\t\t\t\tif (b2 === 0xff) {\n\t\t\t\t\tb2 = 0;\n\t\t\t\t\tif (b3 === 0xff) {\n\t\t\t\t\t\tb3 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t++b3;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t++b2;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t++b1;\n\t\t\t}\n\n\t\t\tword = 0;\n\t\t\tword += (b1 << 16);\n\t\t\tword += (b2 << 8);\n\t\t\tword += b3;\n\t\t} else {\n\t\t\tword += (0x01 << 24);\n\t\t}\n\t\treturn word;\n\t}\n\n\tincCounter(counter) {\n\t\tif ((counter[0] = this.incWord(counter[0])) === 0) {\n\t\t\t// encr_data in fileenc.c from Dr Brian Gladman's counts only with DWORD j < 8\n\t\t\tcounter[1] = this.incWord(counter[1]);\n\t\t}\n\t}\n\n\tcalculate(prf, data, iv) {\n\t\tlet l;\n\t\tif (!(l = data.length)) {\n\t\t\treturn [];\n\t\t}\n\t\tconst bl = bitArray.bitLength(data);\n\t\tfor (let i = 0; i < l; i += 4) {\n\t\t\tthis.incCounter(iv);\n\t\t\tconst e = prf.encrypt(iv);\n\t\t\tdata[i] ^= e[0];\n\t\t\tdata[i + 1] ^= e[1];\n\t\t\tdata[i + 2] ^= e[2];\n\t\t\tdata[i + 3] ^= e[3];\n\t\t}\n\t\treturn bitArray.clamp(data, bl);\n\t}\n};\n\nconst misc = {\n\timportKey(password) {\n\t\treturn new misc.hmacSha1(codec.bytes.toBits(password));\n\t},\n\tpbkdf2(prf, salt, count, length) {\n\t\tcount = count || 10000;\n\t\tif (length < 0 || count < 0) {\n\t\t\tthrow new Error(\"invalid params to pbkdf2\");\n\t\t}\n\t\tconst byteLength = ((length >> 5) + 1) << 2;\n\t\tlet u, ui, i, j, k;\n\t\tconst arrayBuffer = new ArrayBuffer(byteLength);\n\t\tconst out = new DataView(arrayBuffer);\n\t\tlet outLength = 0;\n\t\tconst b = bitArray;\n\t\tsalt = codec.bytes.toBits(salt);\n\t\tfor (k = 1; outLength < (byteLength || 1); k++) {\n\t\t\tu = ui = prf.encrypt(b.concat(salt, [k]));\n\t\t\tfor (i = 1; i < count; i++) {\n\t\t\t\tui = prf.encrypt(ui);\n\t\t\t\tfor (j = 0; j < ui.length; j++) {\n\t\t\t\t\tu[j] ^= ui[j];\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (i = 0; outLength < (byteLength || 1) && i < u.length; i++) {\n\t\t\t\tout.setInt32(outLength, u[i]);\n\t\t\t\toutLength += 4;\n\t\t\t}\n\t\t}\n\t\treturn arrayBuffer.slice(0, length / 8);\n\t}\n};\n\n/** @fileOverview HMAC implementation.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/** HMAC with the specified hash function.\n * @constructor\n * @param {bitArray} key the key for HMAC.\n * @param {Object} [Hash=hash.sha1] The hash function to use.\n */\nmisc.hmacSha1 = class {\n\n\tconstructor(key) {\n\t\tconst hmac = this;\n\t\tconst Hash = hmac._hash = hash.sha1;\n\t\tconst exKey = [[], []];\n\t\thmac._baseHash = [new Hash(), new Hash()];\n\t\tconst bs = hmac._baseHash[0].blockSize / 32;\n\n\t\tif (key.length > bs) {\n\t\t\tkey = new Hash().update(key).finalize();\n\t\t}\n\n\t\tfor (let i = 0; i < bs; i++) {\n\t\t\texKey[0][i] = key[i] ^ 0x36363636;\n\t\t\texKey[1][i] = key[i] ^ 0x5C5C5C5C;\n\t\t}\n\n\t\thmac._baseHash[0].update(exKey[0]);\n\t\thmac._baseHash[1].update(exKey[1]);\n\t\thmac._resultHash = new Hash(hmac._baseHash[0]);\n\t}\n\treset() {\n\t\tconst hmac = this;\n\t\thmac._resultHash = new hmac._hash(hmac._baseHash[0]);\n\t\thmac._updated = false;\n\t}\n\n\tupdate(data) {\n\t\tconst hmac = this;\n\t\thmac._updated = true;\n\t\thmac._resultHash.update(data);\n\t}\n\n\tdigest() {\n\t\tconst hmac = this;\n\t\tconst w = hmac._resultHash.finalize();\n\t\tconst result = new (hmac._hash)(hmac._baseHash[1]).update(w).finalize();\n\n\t\thmac.reset();\n\n\t\treturn result;\n\t}\n\n\tencrypt(data) {\n\t\tif (!this._updated) {\n\t\t\tthis.update(data);\n\t\t\treturn this.digest(data);\n\t\t} else {\n\t\t\tthrow new Error(\"encrypt on already updated hmac called!\");\n\t\t}\n\t}\n};\n\nexport {\n\tcipher,\n\tcodec,\n\tmisc,\n\tmode,\n\trandom\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global crypto */\n\nimport {\n\trandom\n} from \"./codecs/sjcl.js\";\n\nconst GET_RANDOM_VALUES_SUPPORTED = typeof crypto != \"undefined\" && typeof crypto.getRandomValues == \"function\";\n\nconst ERR_INVALID_PASSWORD = \"Invalid password\";\nconst ERR_INVALID_SIGNATURE = \"Invalid signature\";\nconst ERR_ABORT_CHECK_PASSWORD = \"zipjs-abort-check-password\";\n\nexport {\n\tgetRandomValues,\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE,\n\tERR_ABORT_CHECK_PASSWORD\n};\n\nfunction getRandomValues(array) {\n\tif (GET_RANDOM_VALUES_SUPPORTED) {\n\t\treturn crypto.getRandomValues(array);\n\t} else {\n\t\treturn random.getRandomValues(array);\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global crypto, TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport { encodeText } from \"./../util/encode-text.js\";\nimport {\n\tcipher,\n\tcodec,\n\tmisc,\n\tmode\n} from \"./codecs/sjcl.js\";\nimport {\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE,\n\tERR_ABORT_CHECK_PASSWORD,\n\tgetRandomValues\n} from \"./common-crypto.js\";\n\nconst BLOCK_LENGTH = 16;\nconst RAW_FORMAT = \"raw\";\nconst PBKDF2_ALGORITHM = { name: \"PBKDF2\" };\nconst HASH_ALGORITHM = { name: \"HMAC\" };\nconst HASH_FUNCTION = \"SHA-1\";\nconst BASE_KEY_ALGORITHM = Object.assign({ hash: HASH_ALGORITHM }, PBKDF2_ALGORITHM);\nconst DERIVED_BITS_ALGORITHM = Object.assign({ iterations: 1000, hash: { name: HASH_FUNCTION } }, PBKDF2_ALGORITHM);\nconst DERIVED_BITS_USAGE = [\"deriveBits\"];\nconst SALT_LENGTH = [8, 12, 16];\nconst KEY_LENGTH = [16, 24, 32];\nconst SIGNATURE_LENGTH = 10;\nconst COUNTER_DEFAULT_VALUE = [0, 0, 0, 0];\nconst UNDEFINED_TYPE = \"undefined\";\nconst FUNCTION_TYPE = \"function\";\n// deno-lint-ignore valid-typeof\nconst CRYPTO_API_SUPPORTED = typeof crypto != UNDEFINED_TYPE;\nconst subtle = CRYPTO_API_SUPPORTED && crypto.subtle;\nconst SUBTLE_API_SUPPORTED = CRYPTO_API_SUPPORTED && typeof subtle != UNDEFINED_TYPE;\nconst codecBytes = codec.bytes;\nconst Aes = cipher.aes;\nconst CtrGladman = mode.ctrGladman;\nconst HmacSha1 = misc.hmacSha1;\n\nlet IMPORT_KEY_SUPPORTED = CRYPTO_API_SUPPORTED && SUBTLE_API_SUPPORTED && typeof subtle.importKey == FUNCTION_TYPE;\nlet DERIVE_BITS_SUPPORTED = CRYPTO_API_SUPPORTED && SUBTLE_API_SUPPORTED && typeof subtle.deriveBits == FUNCTION_TYPE;\n\nclass AESDecryptionStream extends TransformStream {\n\n\tconstructor({ password, signed, encryptionStrength, checkPasswordOnly }) {\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tready: new Promise(resolve => this.resolveReady = resolve),\n\t\t\t\t\tpassword,\n\t\t\t\t\tsigned,\n\t\t\t\t\tstrength: encryptionStrength - 1,\n\t\t\t\t\tpending: new Uint8Array()\n\t\t\t\t});\n\t\t\t},\n\t\t\tasync transform(chunk, controller) {\n\t\t\t\tconst aesCrypto = this;\n\t\t\t\tconst {\n\t\t\t\t\tpassword,\n\t\t\t\t\tstrength,\n\t\t\t\t\tresolveReady,\n\t\t\t\t\tready\n\t\t\t\t} = aesCrypto;\n\t\t\t\tif (password) {\n\t\t\t\t\tawait createDecryptionKeys(aesCrypto, strength, password, subarray(chunk, 0, SALT_LENGTH[strength] + 2));\n\t\t\t\t\tchunk = subarray(chunk, SALT_LENGTH[strength] + 2);\n\t\t\t\t\tif (checkPasswordOnly) {\n\t\t\t\t\t\tcontroller.error(new Error(ERR_ABORT_CHECK_PASSWORD));\n\t\t\t\t\t} else {\n\t\t\t\t\t\tresolveReady();\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tawait ready;\n\t\t\t\t}\n\t\t\t\tconst output = new Uint8Array(chunk.length - SIGNATURE_LENGTH - ((chunk.length - SIGNATURE_LENGTH) % BLOCK_LENGTH));\n\t\t\t\tcontroller.enqueue(append(aesCrypto, chunk, output, 0, SIGNATURE_LENGTH, true));\n\t\t\t},\n\t\t\tasync flush(controller) {\n\t\t\t\tconst {\n\t\t\t\t\tsigned,\n\t\t\t\t\tctr,\n\t\t\t\t\thmac,\n\t\t\t\t\tpending,\n\t\t\t\t\tready\n\t\t\t\t} = this;\n\t\t\t\tawait ready;\n\t\t\t\tconst chunkToDecrypt = subarray(pending, 0, pending.length - SIGNATURE_LENGTH);\n\t\t\t\tconst originalSignature = subarray(pending, pending.length - SIGNATURE_LENGTH);\n\t\t\t\tlet decryptedChunkArray = new Uint8Array();\n\t\t\t\tif (chunkToDecrypt.length) {\n\t\t\t\t\tconst encryptedChunk = toBits(codecBytes, chunkToDecrypt);\n\t\t\t\t\thmac.update(encryptedChunk);\n\t\t\t\t\tconst decryptedChunk = ctr.update(encryptedChunk);\n\t\t\t\t\tdecryptedChunkArray = fromBits(codecBytes, decryptedChunk);\n\t\t\t\t}\n\t\t\t\tif (signed) {\n\t\t\t\t\tconst signature = subarray(fromBits(codecBytes, hmac.digest()), 0, SIGNATURE_LENGTH);\n\t\t\t\t\tfor (let indexSignature = 0; indexSignature < SIGNATURE_LENGTH; indexSignature++) {\n\t\t\t\t\t\tif (signature[indexSignature] != originalSignature[indexSignature]) {\n\t\t\t\t\t\t\tthrow new Error(ERR_INVALID_SIGNATURE);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcontroller.enqueue(decryptedChunkArray);\n\t\t\t}\n\t\t});\n\t}\n}\n\nclass AESEncryptionStream extends TransformStream {\n\n\tconstructor({ password, encryptionStrength }) {\n\t\t// deno-lint-ignore prefer-const\n\t\tlet stream;\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tready: new Promise(resolve => this.resolveReady = resolve),\n\t\t\t\t\tpassword,\n\t\t\t\t\tstrength: encryptionStrength - 1,\n\t\t\t\t\tpending: new Uint8Array()\n\t\t\t\t});\n\t\t\t},\n\t\t\tasync transform(chunk, controller) {\n\t\t\t\tconst aesCrypto = this;\n\t\t\t\tconst {\n\t\t\t\t\tpassword,\n\t\t\t\t\tstrength,\n\t\t\t\t\tresolveReady,\n\t\t\t\t\tready\n\t\t\t\t} = aesCrypto;\n\t\t\t\tlet preamble = new Uint8Array();\n\t\t\t\tif (password) {\n\t\t\t\t\tpreamble = await createEncryptionKeys(aesCrypto, strength, password);\n\t\t\t\t\tresolveReady();\n\t\t\t\t} else {\n\t\t\t\t\tawait ready;\n\t\t\t\t}\n\t\t\t\tconst output = new Uint8Array(preamble.length + chunk.length - (chunk.length % BLOCK_LENGTH));\n\t\t\t\toutput.set(preamble, 0);\n\t\t\t\tcontroller.enqueue(append(aesCrypto, chunk, output, preamble.length, 0));\n\t\t\t},\n\t\t\tasync flush(controller) {\n\t\t\t\tconst {\n\t\t\t\t\tctr,\n\t\t\t\t\thmac,\n\t\t\t\t\tpending,\n\t\t\t\t\tready\n\t\t\t\t} = this;\n\t\t\t\tawait ready;\n\t\t\t\tlet encryptedChunkArray = new Uint8Array();\n\t\t\t\tif (pending.length) {\n\t\t\t\t\tconst encryptedChunk = ctr.update(toBits(codecBytes, pending));\n\t\t\t\t\thmac.update(encryptedChunk);\n\t\t\t\t\tencryptedChunkArray = fromBits(codecBytes, encryptedChunk);\n\t\t\t\t}\n\t\t\t\tstream.signature = fromBits(codecBytes, hmac.digest()).slice(0, SIGNATURE_LENGTH);\n\t\t\t\tcontroller.enqueue(concat(encryptedChunkArray, stream.signature));\n\t\t\t}\n\t\t});\n\t\tstream = this;\n\t}\n}\n\nexport {\n\tAESDecryptionStream,\n\tAESEncryptionStream,\n\tERR_INVALID_PASSWORD\n};\n\nfunction append(aesCrypto, input, output, paddingStart, paddingEnd, verifySignature) {\n\tconst {\n\t\tctr,\n\t\thmac,\n\t\tpending\n\t} = aesCrypto;\n\tconst inputLength = input.length - paddingEnd;\n\tif (pending.length) {\n\t\tinput = concat(pending, input);\n\t\toutput = expand(output, inputLength - (inputLength % BLOCK_LENGTH));\n\t}\n\tlet offset;\n\tfor (offset = 0; offset <= inputLength - BLOCK_LENGTH; offset += BLOCK_LENGTH) {\n\t\tconst inputChunk = toBits(codecBytes, subarray(input, offset, offset + BLOCK_LENGTH));\n\t\tif (verifySignature) {\n\t\t\thmac.update(inputChunk);\n\t\t}\n\t\tconst outputChunk = ctr.update(inputChunk);\n\t\tif (!verifySignature) {\n\t\t\thmac.update(outputChunk);\n\t\t}\n\t\toutput.set(fromBits(codecBytes, outputChunk), offset + paddingStart);\n\t}\n\taesCrypto.pending = subarray(input, offset);\n\treturn output;\n}\n\nasync function createDecryptionKeys(decrypt, strength, password, preamble) {\n\tconst passwordVerificationKey = await createKeys(decrypt, strength, password, subarray(preamble, 0, SALT_LENGTH[strength]));\n\tconst passwordVerification = subarray(preamble, SALT_LENGTH[strength]);\n\tif (passwordVerificationKey[0] != passwordVerification[0] || passwordVerificationKey[1] != passwordVerification[1]) {\n\t\tthrow new Error(ERR_INVALID_PASSWORD);\n\t}\n}\n\nasync function createEncryptionKeys(encrypt, strength, password) {\n\tconst salt = getRandomValues(new Uint8Array(SALT_LENGTH[strength]));\n\tconst passwordVerification = await createKeys(encrypt, strength, password, salt);\n\treturn concat(salt, passwordVerification);\n}\n\nasync function createKeys(aesCrypto, strength, password, salt) {\n\taesCrypto.password = null;\n\tconst encodedPassword = encodeText(password);\n\tconst baseKey = await importKey(RAW_FORMAT, encodedPassword, BASE_KEY_ALGORITHM, false, DERIVED_BITS_USAGE);\n\tconst derivedBits = await deriveBits(Object.assign({ salt }, DERIVED_BITS_ALGORITHM), baseKey, 8 * ((KEY_LENGTH[strength] * 2) + 2));\n\tconst compositeKey = new Uint8Array(derivedBits);\n\tconst key = toBits(codecBytes, subarray(compositeKey, 0, KEY_LENGTH[strength]));\n\tconst authentication = toBits(codecBytes, subarray(compositeKey, KEY_LENGTH[strength], KEY_LENGTH[strength] * 2));\n\tconst passwordVerification = subarray(compositeKey, KEY_LENGTH[strength] * 2);\n\tObject.assign(aesCrypto, {\n\t\tkeys: {\n\t\t\tkey,\n\t\t\tauthentication,\n\t\t\tpasswordVerification\n\t\t},\n\t\tctr: new CtrGladman(new Aes(key), Array.from(COUNTER_DEFAULT_VALUE)),\n\t\thmac: new HmacSha1(authentication)\n\t});\n\treturn passwordVerification;\n}\n\nasync function importKey(format, password, algorithm, extractable, keyUsages) {\n\tif (IMPORT_KEY_SUPPORTED) {\n\t\ttry {\n\t\t\treturn await subtle.importKey(format, password, algorithm, extractable, keyUsages);\n\t\t} catch (_error) {\n\t\t\tIMPORT_KEY_SUPPORTED = false;\n\t\t\treturn misc.importKey(password);\n\t\t}\n\t} else {\n\t\treturn misc.importKey(password);\n\t}\n}\n\nasync function deriveBits(algorithm, baseKey, length) {\n\tif (DERIVE_BITS_SUPPORTED) {\n\t\ttry {\n\t\t\treturn await subtle.deriveBits(algorithm, baseKey, length);\n\t\t} catch (_error) {\n\t\t\tDERIVE_BITS_SUPPORTED = false;\n\t\t\treturn misc.pbkdf2(baseKey, algorithm.salt, DERIVED_BITS_ALGORITHM.iterations, length);\n\t\t}\n\t} else {\n\t\treturn misc.pbkdf2(baseKey, algorithm.salt, DERIVED_BITS_ALGORITHM.iterations, length);\n\t}\n}\n\nfunction concat(leftArray, rightArray) {\n\tlet array = leftArray;\n\tif (leftArray.length + rightArray.length) {\n\t\tarray = new Uint8Array(leftArray.length + rightArray.length);\n\t\tarray.set(leftArray, 0);\n\t\tarray.set(rightArray, leftArray.length);\n\t}\n\treturn array;\n}\n\nfunction expand(inputArray, length) {\n\tif (length && length > inputArray.length) {\n\t\tconst array = inputArray;\n\t\tinputArray = new Uint8Array(length);\n\t\tinputArray.set(array, 0);\n\t}\n\treturn inputArray;\n}\n\nfunction subarray(array, begin, end) {\n\treturn array.subarray(begin, end);\n}\n\nfunction fromBits(codecBytes, chunk) {\n\treturn codecBytes.fromBits(chunk);\n}\nfunction toBits(codecBytes, chunk) {\n\treturn codecBytes.toBits(chunk);\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport { Crc32 } from \"./codecs/crc32.js\";\nimport {\n\tERR_INVALID_PASSWORD,\n\tERR_ABORT_CHECK_PASSWORD,\n\tgetRandomValues\n} from \"./common-crypto.js\";\n\nconst HEADER_LENGTH = 12;\n\nclass ZipCryptoDecryptionStream extends TransformStream {\n\n\tconstructor({ password, passwordVerification, checkPasswordOnly }) {\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tpassword,\n\t\t\t\t\tpasswordVerification\n\t\t\t\t});\n\t\t\t\tcreateKeys(this, password);\n\t\t\t},\n\t\t\ttransform(chunk, controller) {\n\t\t\t\tconst zipCrypto = this;\n\t\t\t\tif (zipCrypto.password) {\n\t\t\t\t\tconst decryptedHeader = decrypt(zipCrypto, chunk.subarray(0, HEADER_LENGTH));\n\t\t\t\t\tzipCrypto.password = null;\n\t\t\t\t\tif (decryptedHeader[HEADER_LENGTH - 1] != zipCrypto.passwordVerification) {\n\t\t\t\t\t\tthrow new Error(ERR_INVALID_PASSWORD);\n\t\t\t\t\t}\n\t\t\t\t\tchunk = chunk.subarray(HEADER_LENGTH);\n\t\t\t\t}\n\t\t\t\tif (checkPasswordOnly) {\n\t\t\t\t\tcontroller.error(new Error(ERR_ABORT_CHECK_PASSWORD));\n\t\t\t\t} else {\n\t\t\t\t\tcontroller.enqueue(decrypt(zipCrypto, chunk));\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n}\n\nclass ZipCryptoEncryptionStream extends TransformStream {\n\n\tconstructor({ password, passwordVerification }) {\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tpassword,\n\t\t\t\t\tpasswordVerification\n\t\t\t\t});\n\t\t\t\tcreateKeys(this, password);\n\t\t\t},\n\t\t\ttransform(chunk, controller) {\n\t\t\t\tconst zipCrypto = this;\n\t\t\t\tlet output;\n\t\t\t\tlet offset;\n\t\t\t\tif (zipCrypto.password) {\n\t\t\t\t\tzipCrypto.password = null;\n\t\t\t\t\tconst header = getRandomValues(new Uint8Array(HEADER_LENGTH));\n\t\t\t\t\theader[HEADER_LENGTH - 1] = zipCrypto.passwordVerification;\n\t\t\t\t\toutput = new Uint8Array(chunk.length + header.length);\n\t\t\t\t\toutput.set(encrypt(zipCrypto, header), 0);\n\t\t\t\t\toffset = HEADER_LENGTH;\n\t\t\t\t} else {\n\t\t\t\t\toutput = new Uint8Array(chunk.length);\n\t\t\t\t\toffset = 0;\n\t\t\t\t}\n\t\t\t\toutput.set(encrypt(zipCrypto, chunk), offset);\n\t\t\t\tcontroller.enqueue(output);\n\t\t\t}\n\t\t});\n\t}\n}\n\nexport {\n\tZipCryptoDecryptionStream,\n\tZipCryptoEncryptionStream,\n\tERR_INVALID_PASSWORD\n};\n\nfunction decrypt(target, input) {\n\tconst output = new Uint8Array(input.length);\n\tfor (let index = 0; index < input.length; index++) {\n\t\toutput[index] = getByte(target) ^ input[index];\n\t\tupdateKeys(target, output[index]);\n\t}\n\treturn output;\n}\n\nfunction encrypt(target, input) {\n\tconst output = new Uint8Array(input.length);\n\tfor (let index = 0; index < input.length; index++) {\n\t\toutput[index] = getByte(target) ^ input[index];\n\t\tupdateKeys(target, input[index]);\n\t}\n\treturn output;\n}\n\nfunction createKeys(target, password) {\n\tconst keys = [0x12345678, 0x23456789, 0x34567890];\n\tObject.assign(target, {\n\t\tkeys,\n\t\tcrcKey0: new Crc32(keys[0]),\n\t\tcrcKey2: new Crc32(keys[2]),\n\t});\n\tfor (let index = 0; index < password.length; index++) {\n\t\tupdateKeys(target, password.charCodeAt(index));\n\t}\n}\n\nfunction updateKeys(target, byte) {\n\tlet [key0, key1, key2] = target.keys;\n\ttarget.crcKey0.append([byte]);\n\tkey0 = ~target.crcKey0.get();\n\tkey1 = getInt32(Math.imul(getInt32(key1 + getInt8(key0)), 134775813) + 1);\n\ttarget.crcKey2.append([key1 >>> 24]);\n\tkey2 = ~target.crcKey2.get();\n\ttarget.keys = [key0, key1, key2];\n}\n\nfunction getByte(target) {\n\tconst temp = target.keys[2] | 2;\n\treturn getInt8(Math.imul(temp, (temp ^ 1)) >>> 8);\n}\n\nfunction getInt8(number) {\n\treturn number & 0xFF;\n}\n\nfunction getInt32(number) {\n\treturn number & 0xFFFFFFFF;\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport { Crc32Stream } from \"./crc32-stream.js\";\nimport {\n\tAESEncryptionStream,\n\tAESDecryptionStream\n} from \"./aes-crypto-stream.js\";\nimport {\n\tZipCryptoEncryptionStream,\n\tZipCryptoDecryptionStream\n} from \"./zip-crypto-stream.js\";\nimport {\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE,\n\tERR_ABORT_CHECK_PASSWORD\n} from \"./common-crypto.js\";\n\nconst COMPRESSION_FORMAT = \"deflate-raw\";\n\nclass DeflateStream extends TransformStream {\n\n\tconstructor(options, { chunkSize, CompressionStream, CompressionStreamNative }) {\n\t\tsuper({});\n\t\tconst { compressed, encrypted, useCompressionStream, zipCrypto, signed, level } = options;\n\t\tconst stream = this;\n\t\tlet crc32Stream, encryptionStream;\n\t\tlet readable = filterEmptyChunks(super.readable);\n\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t[readable, crc32Stream] = readable.tee();\n\t\t\tcrc32Stream = pipeThrough(crc32Stream, new Crc32Stream());\n\t\t}\n\t\tif (compressed) {\n\t\t\treadable = pipeThroughCommpressionStream(readable, useCompressionStream, { level, chunkSize }, CompressionStreamNative, CompressionStream);\n\t\t}\n\t\tif (encrypted) {\n\t\t\tif (zipCrypto) {\n\t\t\t\treadable = pipeThrough(readable, new ZipCryptoEncryptionStream(options));\n\t\t\t} else {\n\t\t\t\tencryptionStream = new AESEncryptionStream(options);\n\t\t\t\treadable = pipeThrough(readable, encryptionStream);\n\t\t\t}\n\t\t}\n\t\tsetReadable(stream, readable, async () => {\n\t\t\tlet signature;\n\t\t\tif (encrypted && !zipCrypto) {\n\t\t\t\tsignature = encryptionStream.signature;\n\t\t\t}\n\t\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t\tsignature = await crc32Stream.getReader().read();\n\t\t\t\tsignature = new DataView(signature.value.buffer).getUint32(0);\n\t\t\t}\n\t\t\tstream.signature = signature;\n\t\t});\n\t}\n}\n\nclass InflateStream extends TransformStream {\n\n\tconstructor(options, { chunkSize, DecompressionStream, DecompressionStreamNative }) {\n\t\tsuper({});\n\t\tconst { zipCrypto, encrypted, signed, signature, compressed, useCompressionStream } = options;\n\t\tlet crc32Stream, decryptionStream;\n\t\tlet readable = filterEmptyChunks(super.readable);\n\t\tif (encrypted) {\n\t\t\tif (zipCrypto) {\n\t\t\t\treadable = pipeThrough(readable, new ZipCryptoDecryptionStream(options));\n\t\t\t} else {\n\t\t\t\tdecryptionStream = new AESDecryptionStream(options);\n\t\t\t\treadable = pipeThrough(readable, decryptionStream);\n\t\t\t}\n\t\t}\n\t\tif (compressed) {\n\t\t\treadable = pipeThroughCommpressionStream(readable, useCompressionStream, { chunkSize }, DecompressionStreamNative, DecompressionStream);\n\t\t}\n\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t[readable, crc32Stream] = readable.tee();\n\t\t\tcrc32Stream = pipeThrough(crc32Stream, new Crc32Stream());\n\t\t}\n\t\tsetReadable(this, readable, async () => {\n\t\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t\tconst streamSignature = await crc32Stream.getReader().read();\n\t\t\t\tconst dataViewSignature = new DataView(streamSignature.value.buffer);\n\t\t\t\tif (signature != dataViewSignature.getUint32(0, false)) {\n\t\t\t\t\tthrow new Error(ERR_INVALID_SIGNATURE);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n}\n\nexport {\n\tDeflateStream,\n\tInflateStream,\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE,\n\tERR_ABORT_CHECK_PASSWORD\n};\n\nfunction filterEmptyChunks(readable) {\n\treturn pipeThrough(readable, new TransformStream({\n\t\ttransform(chunk, controller) {\n\t\t\tif (chunk && chunk.length) {\n\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t}\n\t\t}\n\t}));\n}\n\nfunction setReadable(stream, readable, flush) {\n\treadable = pipeThrough(readable, new TransformStream({ flush }));\n\tObject.defineProperty(stream, \"readable\", {\n\t\tget() {\n\t\t\treturn readable;\n\t\t}\n\t});\n}\n\nfunction pipeThroughCommpressionStream(readable, useCompressionStream, options, CodecStreamNative, CodecStream) {\n\ttry {\n\t\tconst CompressionStream = useCompressionStream && CodecStreamNative ? CodecStreamNative : CodecStream;\n\t\treadable = pipeThrough(readable, new CompressionStream(COMPRESSION_FORMAT, options));\n\t} catch (error) {\n\t\tif (useCompressionStream) {\n\t\t\treadable = pipeThrough(readable, new CodecStream(COMPRESSION_FORMAT, options));\n\t\t} else {\n\t\t\tthrow error;\n\t\t}\n\t}\n\treturn readable;\n}\n\nfunction pipeThrough(readable, transformStream) {\n\treturn readable.pipeThrough(transformStream);\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/*\n * This program is based on JZlib 1.0.2 ymnk, JCraft,Inc.\n * JZlib is based on zlib-1.1.3, so all credit should go authors\n * Jean-loup Gailly(jloup@gzip.org) and Mark Adler(madler@alumni.caltech.edu)\n * and contributors of zlib.\n */\n\n/* global TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE,\n\tERR_ABORT_CHECK_PASSWORD,\n\tInflateStream,\n\tDeflateStream\n} from \"./zip-entry-stream.js\";\n\nconst MESSAGE_EVENT_TYPE = \"message\";\nconst MESSAGE_START = \"start\";\nconst MESSAGE_PULL = \"pull\";\nconst MESSAGE_DATA = \"data\";\nconst MESSAGE_ACK_DATA = \"ack\";\nconst MESSAGE_CLOSE = \"close\";\nconst CODEC_DEFLATE = \"deflate\";\nconst CODEC_INFLATE = \"inflate\";\n\nexport {\n\tCODEC_DEFLATE,\n\tCODEC_INFLATE,\n\tMESSAGE_EVENT_TYPE,\n\tMESSAGE_START,\n\tMESSAGE_PULL,\n\tMESSAGE_DATA,\n\tMESSAGE_ACK_DATA,\n\tMESSAGE_CLOSE,\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE,\n\tERR_ABORT_CHECK_PASSWORD,\n\tCodecStream\n};\n\nclass CodecStream extends TransformStream {\n\n\tconstructor(options, config) {\n\t\tsuper({});\n\t\tconst codec = this;\n\t\tconst { codecType } = options;\n\t\tlet Stream;\n\t\tif (codecType.startsWith(CODEC_DEFLATE)) {\n\t\t\tStream = DeflateStream;\n\t\t} else if (codecType.startsWith(CODEC_INFLATE)) {\n\t\t\tStream = InflateStream;\n\t\t}\n\t\tlet size = 0;\n\t\tconst stream = new Stream(options, config);\n\t\tconst readable = super.readable;\n\t\tconst transformStream = new TransformStream({\n\t\t\ttransform(chunk, controller) {\n\t\t\t\tif (chunk && chunk.length) {\n\t\t\t\t\tsize += chunk.length;\n\t\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t\t}\n\t\t\t},\n\t\t\tflush() {\n\t\t\t\tconst { signature } = stream;\n\t\t\t\tObject.assign(codec, {\n\t\t\t\t\tsignature,\n\t\t\t\t\tsize\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(codec, \"readable\", {\n\t\t\tget() {\n\t\t\t\treturn readable.pipeThrough(stream).pipeThrough(transformStream);\n\t\t\t}\n\t\t});\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global Worker, URL, TransformStream, WritableStream */\n\nimport {\n\tUNDEFINED_TYPE,\n\tFUNCTION_TYPE\n} from \"./constants.js\";\nimport {\n\tCodecStream,\n\tMESSAGE_EVENT_TYPE,\n\tMESSAGE_START,\n\tMESSAGE_PULL,\n\tMESSAGE_DATA,\n\tMESSAGE_ACK_DATA,\n\tMESSAGE_CLOSE\n} from \"./streams/codec-stream.js\";\n\n// deno-lint-ignore valid-typeof\nconst WEB_WORKERS_SUPPORTED = typeof Worker != UNDEFINED_TYPE;\n\nexport {\n\tCodecWorker\n};\n\nclass CodecWorker {\n\n\tconstructor(workerData, { readable, writable }, { options, config, streamOptions, useWebWorkers, transferStreams, scripts }, onTaskFinished) {\n\t\tconst { signal } = streamOptions;\n\t\tObject.assign(workerData, {\n\t\t\tbusy: true,\n\t\t\treadable: readable.pipeThrough(new ProgressWatcherStream(readable, streamOptions, config), { signal }),\n\t\t\twritable,\n\t\t\toptions: Object.assign({}, options),\n\t\t\tscripts,\n\t\t\ttransferStreams,\n\t\t\tterminate() {\n\t\t\t\tconst { worker, busy } = workerData;\n\t\t\t\tif (worker && !busy) {\n\t\t\t\t\tworker.terminate();\n\t\t\t\t\tworkerData.interface = null;\n\t\t\t\t}\n\t\t\t},\n\t\t\tonTaskFinished() {\n\t\t\t\tworkerData.busy = false;\n\t\t\t\tonTaskFinished(workerData);\n\t\t\t}\n\t\t});\n\t\treturn (useWebWorkers && WEB_WORKERS_SUPPORTED ? createWebWorkerInterface : createWorkerInterface)(workerData, config);\n\t}\n}\n\nclass ProgressWatcherStream extends TransformStream {\n\n\tconstructor(readableSource, { onstart, onprogress, size, onend }, { chunkSize }) {\n\t\tlet chunkOffset = 0;\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tif (onstart) {\n\t\t\t\t\tcallHandler(onstart, size);\n\t\t\t\t}\n\t\t\t},\n\t\t\tasync transform(chunk, controller) {\n\t\t\t\tchunkOffset += chunk.length;\n\t\t\t\tif (onprogress) {\n\t\t\t\t\tawait callHandler(onprogress, chunkOffset, size);\n\t\t\t\t}\n\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t},\n\t\t\tflush() {\n\t\t\t\treadableSource.size = chunkOffset;\n\t\t\t\tif (onend) {\n\t\t\t\t\tcallHandler(onend, chunkOffset);\n\t\t\t\t}\n\t\t\t}\n\t\t}, { highWaterMark: 1, size: () => chunkSize });\n\t}\n}\n\nasync function callHandler(handler, ...parameters) {\n\ttry {\n\t\tawait handler(...parameters);\n\t} catch (_error) {\n\t\t// ignored\n\t}\n}\n\nfunction createWorkerInterface(workerData, config) {\n\treturn {\n\t\trun: () => runWorker(workerData, config)\n\t};\n}\n\nfunction createWebWorkerInterface(workerData, { baseURL, chunkSize }) {\n\tif (!workerData.interface) {\n\t\tObject.assign(workerData, {\n\t\t\tworker: getWebWorker(workerData.scripts[0], baseURL, workerData),\n\t\t\tinterface: {\n\t\t\t\trun: () => runWebWorker(workerData, { chunkSize })\n\t\t\t}\n\t\t});\n\t}\n\treturn workerData.interface;\n}\n\nasync function runWorker({ options, readable, writable, onTaskFinished }, config) {\n\tconst codecStream = new CodecStream(options, config);\n\ttry {\n\t\tawait readable.pipeThrough(codecStream).pipeTo(writable, { preventClose: true, preventAbort: true });\n\t\tconst {\n\t\t\tsignature,\n\t\t\tsize\n\t\t} = codecStream;\n\t\treturn {\n\t\t\tsignature,\n\t\t\tsize\n\t\t};\n\t} finally {\n\t\tonTaskFinished();\n\t}\n}\n\nasync function runWebWorker(workerData, config) {\n\tlet resolveResult, rejectResult;\n\tconst result = new Promise((resolve, reject) => {\n\t\tresolveResult = resolve;\n\t\trejectResult = reject;\n\t});\n\tObject.assign(workerData, {\n\t\treader: null,\n\t\twriter: null,\n\t\tresolveResult,\n\t\trejectResult,\n\t\tresult\n\t});\n\tconst { readable, options, scripts } = workerData;\n\tconst { writable, closed } = watchClosedStream(workerData.writable);\n\tconst streamsTransferred = sendMessage({\n\t\ttype: MESSAGE_START,\n\t\tscripts: scripts.slice(1),\n\t\toptions,\n\t\tconfig,\n\t\treadable,\n\t\twritable\n\t}, workerData);\n\tif (!streamsTransferred) {\n\t\tObject.assign(workerData, {\n\t\t\treader: readable.getReader(),\n\t\t\twriter: writable.getWriter()\n\t\t});\n\t}\n\tconst resultValue = await result;\n\ttry {\n\t\tawait writable.close();\n\t} catch (_error) {\n\t\t// ignored\n\t}\n\tawait closed;\n\treturn resultValue;\n}\n\nfunction watchClosedStream(writableSource) {\n\tconst writer = writableSource.getWriter();\n\tlet resolveStreamClosed;\n\tconst closed = new Promise(resolve => resolveStreamClosed = resolve);\n\tconst writable = new WritableStream({\n\t\tasync write(chunk) {\n\t\t\tawait writer.ready;\n\t\t\tawait writer.write(chunk);\n\t\t},\n\t\tclose() {\n\t\t\twriter.releaseLock();\n\t\t\tresolveStreamClosed();\n\t\t},\n\t\tabort(reason) {\n\t\t\treturn writer.abort(reason);\n\t\t}\n\t});\n\treturn { writable, closed };\n}\n\nlet classicWorkersSupported = true;\nlet transferStreamsSupported = true;\n\nfunction getWebWorker(url, baseURL, workerData) {\n\tconst workerOptions = { type: \"module\" };\n\tlet scriptUrl, worker;\n\t// deno-lint-ignore valid-typeof\n\tif (typeof url == FUNCTION_TYPE) {\n\t\turl = url();\n\t}\n\ttry {\n\t\tscriptUrl = new URL(url, baseURL);\n\t} catch (_error) {\n\t\tscriptUrl = url;\n\t}\n\tif (classicWorkersSupported) {\n\t\ttry {\n\t\t\tworker = new Worker(scriptUrl);\n\t\t} catch (_error) {\n\t\t\tclassicWorkersSupported = false;\n\t\t\tworker = new Worker(scriptUrl, workerOptions);\n\t\t}\n\t} else {\n\t\tworker = new Worker(scriptUrl, workerOptions);\n\t}\n\tworker.addEventListener(MESSAGE_EVENT_TYPE, event => onMessage(event, workerData));\n\treturn worker;\n}\n\nfunction sendMessage(message, { worker, writer, onTaskFinished, transferStreams }) {\n\ttry {\n\t\tlet { value, readable, writable } = message;\n\t\tconst transferables = [];\n\t\tif (value) {\n\t\t\tconst { buffer, length } = value;\n\t\t\tif (length != buffer.byteLength) {\n\t\t\t\tvalue = new Uint8Array(value);\n\t\t\t}\n\t\t\tmessage.value = value.buffer;\n\t\t\ttransferables.push(message.value);\n\t\t}\n\t\tif (transferStreams && transferStreamsSupported) {\n\t\t\tif (readable) {\n\t\t\t\ttransferables.push(readable);\n\t\t\t}\n\t\t\tif (writable) {\n\t\t\t\ttransferables.push(writable);\n\t\t\t}\n\t\t} else {\n\t\t\tmessage.readable = message.writable = null;\n\t\t}\n\t\tif (transferables.length) {\n\t\t\ttry {\n\t\t\t\tworker.postMessage(message, transferables);\n\t\t\t\treturn true;\n\t\t\t} catch (_error) {\n\t\t\t\ttransferStreamsSupported = false;\n\t\t\t\tmessage.readable = message.writable = null;\n\t\t\t\tworker.postMessage(message);\n\t\t\t}\n\t\t} else {\n\t\t\tworker.postMessage(message);\n\t\t}\n\t} catch (error) {\n\t\tif (writer) {\n\t\t\twriter.releaseLock();\n\t\t}\n\t\tonTaskFinished();\n\t\tthrow error;\n\t}\n}\n\nasync function onMessage({ data }, workerData) {\n\tconst { type, value, messageId, result, error } = data;\n\tconst { reader, writer, resolveResult, rejectResult, onTaskFinished } = workerData;\n\ttry {\n\t\tif (error) {\n\t\t\tconst { message, stack, code, name } = error;\n\t\t\tconst responseError = new Error(message);\n\t\t\tObject.assign(responseError, { stack, code, name });\n\t\t\tclose(responseError);\n\t\t} else {\n\t\t\tif (type == MESSAGE_PULL) {\n\t\t\t\tconst { value, done } = await reader.read();\n\t\t\t\tsendMessage({ type: MESSAGE_DATA, value, done, messageId }, workerData);\n\t\t\t}\n\t\t\tif (type == MESSAGE_DATA) {\n\t\t\t\tawait writer.ready;\n\t\t\t\tawait writer.write(new Uint8Array(value));\n\t\t\t\tsendMessage({ type: MESSAGE_ACK_DATA, messageId }, workerData);\n\t\t\t}\n\t\t\tif (type == MESSAGE_CLOSE) {\n\t\t\t\tclose(null, result);\n\t\t\t}\n\t\t}\n\t} catch (error) {\n\t\tclose(error);\n\t}\n\n\tfunction close(error, result) {\n\t\tif (error) {\n\t\t\trejectResult(error);\n\t\t} else {\n\t\t\tresolveResult(result);\n\t\t}\n\t\tif (writer) {\n\t\t\twriter.releaseLock();\n\t\t}\n\t\tonTaskFinished();\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global setTimeout, clearTimeout */\n\nimport { UNDEFINED_VALUE } from \"./constants.js\";\nimport {\n\tCODEC_INFLATE,\n\tCODEC_DEFLATE,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD,\n\tERR_ABORT_CHECK_PASSWORD\n} from \"./streams/codec-stream.js\";\nimport { CodecWorker } from \"./codec-worker.js\";\n\nlet pool = [];\nconst pendingRequests = [];\n\nexport {\n\trunWorker,\n\tterminateWorkers,\n\tCODEC_DEFLATE,\n\tCODEC_INFLATE,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD,\n\tERR_ABORT_CHECK_PASSWORD\n};\n\nlet indexWorker = 0;\n\nasync function runWorker(stream, workerOptions) {\n\tconst { options, config } = workerOptions;\n\tconst { transferStreams, useWebWorkers, useCompressionStream, codecType, compressed, signed, encrypted } = options;\n\tconst { workerScripts, maxWorkers, terminateWorkerTimeout } = config;\n\tworkerOptions.transferStreams = transferStreams || transferStreams === UNDEFINED_VALUE;\n\tconst streamCopy = !compressed && !signed && !encrypted && !workerOptions.transferStreams;\n\tworkerOptions.useWebWorkers = !streamCopy && (useWebWorkers || (useWebWorkers === UNDEFINED_VALUE && config.useWebWorkers));\n\tworkerOptions.scripts = workerOptions.useWebWorkers && workerScripts ? workerScripts[codecType] : [];\n\toptions.useCompressionStream = useCompressionStream || (useCompressionStream === UNDEFINED_VALUE && config.useCompressionStream);\n\tlet worker;\n\tconst workerData = pool.find(workerData => !workerData.busy);\n\tif (workerData) {\n\t\tclearTerminateTimeout(workerData);\n\t\tworker = new CodecWorker(workerData, stream, workerOptions, onTaskFinished);\n\t} else if (pool.length < maxWorkers) {\n\t\tconst workerData = { indexWorker };\n\t\tindexWorker++;\n\t\tpool.push(workerData);\n\t\tworker = new CodecWorker(workerData, stream, workerOptions, onTaskFinished);\n\t} else {\n\t\tworker = await new Promise(resolve => pendingRequests.push({ resolve, stream, workerOptions }));\n\t}\n\treturn worker.run();\n\n\tfunction onTaskFinished(workerData) {\n\t\tif (pendingRequests.length) {\n\t\t\tconst [{ resolve, stream, workerOptions }] = pendingRequests.splice(0, 1);\n\t\t\tresolve(new CodecWorker(workerData, stream, workerOptions, onTaskFinished));\n\t\t} else if (workerData.worker) {\n\t\t\tclearTerminateTimeout(workerData);\n\t\t\tif (Number.isFinite(terminateWorkerTimeout) && terminateWorkerTimeout >= 0) {\n\t\t\t\tworkerData.terminateTimeout = setTimeout(() => {\n\t\t\t\t\tpool = pool.filter(data => data != workerData);\n\t\t\t\t\tworkerData.terminate();\n\t\t\t\t}, terminateWorkerTimeout);\n\t\t\t}\n\t\t} else {\n\t\t\tpool = pool.filter(data => data != workerData);\n\t\t}\n\t}\n}\n\nfunction clearTerminateTimeout(workerData) {\n\tconst { terminateTimeout } = workerData;\n\tif (terminateTimeout) {\n\t\tclearTimeout(terminateTimeout);\n\t\tworkerData.terminateTimeout = null;\n\t}\n}\n\nfunction terminateWorkers() {\n\tpool.forEach(workerData => {\n\t\tclearTerminateTimeout(workerData);\n\t\tworkerData.terminate();\n\t});\n}","function e(e){const t=()=>URL.createObjectURL(new Blob(['const{Array:e,Object:t,Number:n,Math:r,Error:s,Uint8Array:i,Uint16Array:o,Uint32Array:c,Int32Array:f,Map:a,DataView:l,Promise:u,TextEncoder:w,crypto:h,postMessage:d,TransformStream:p,ReadableStream:y,WritableStream:m,CompressionStream:b,DecompressionStream:g}=self;class k{constructor(e){return class extends p{constructor(t,n){const r=new e(n);super({transform(e,t){t.enqueue(r.append(e))},flush(e){const t=r.flush();t&&e.enqueue(t)}})}}}}const v=[];for(let e=0;256>e;e++){let t=e;for(let e=0;8>e;e++)1&t?t=t>>>1^3988292384:t>>>=1;v[e]=t}class S{constructor(e){this.t=e||-1}append(e){let t=0|this.t;for(let n=0,r=0|e.length;r>n;n++)t=t>>>8^v[255&(t^e[n])];this.t=t}get(){return~this.t}}class z extends p{constructor(){const e=new S;super({transform(t){e.append(t)},flush(t){const n=new i(4);new l(n.buffer).setUint32(0,e.get()),t.enqueue(n)}})}}const C={concat(e,t){if(0===e.length||0===t.length)return e.concat(t);const n=e[e.length-1],r=C.i(n);return 32===r?e.concat(t):C.o(t,r,0|n,e.slice(0,e.length-1))},l(e){const t=e.length;if(0===t)return 0;const n=e[t-1];return 32*(t-1)+C.i(n)},u(e,t){if(32*e.length0&&t&&(e[n-1]=C.h(t,e[n-1]&2147483648>>t-1,1)),e},h:(e,t,n)=>32===e?t:(n?0|t:t<<32-e)+1099511627776*e,i:e=>r.round(e/1099511627776)||32,o(e,t,n,r){for(void 0===r&&(r=[]);t>=32;t-=32)r.push(n),n=0;if(0===t)return r.concat(e);for(let s=0;s>>t),n=e[s]<<32-t;const s=e.length?e[e.length-1]:0,i=C.i(s);return r.push(C.h(t+i&31,t+i>32?n:r.pop(),1)),r}},x={p:{m(e){const t=C.l(e)/8,n=new i(t);let r;for(let s=0;t>s;s++)0==(3&s)&&(r=e[s/4]),n[s]=r>>>24,r<<=8;return n},g(e){const t=[];let n,r=0;for(n=0;n9007199254740991)throw new s(\"Cannot hash more than 2^53 - 1 bits\");const o=new c(n);let f=0;for(let e=t.blockSize+r-(t.blockSize+r&t.blockSize-1);i>=e;e+=t.blockSize)t.I(o.subarray(16*f,16*(f+1))),f+=1;return n.splice(0,16*f),t}D(){const e=this;let t=e.C;const n=e.S;t=C.concat(t,[C.h(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(r.floor(e._/4294967296)),t.push(0|e._);t.length;)e.I(t.splice(0,16));return e.reset(),n}V(e,t,n,r){return e>19?e>39?e>59?e>79?void 0:t^n^r:t&n|t&r|n&r:t^n^r:t&n|~t&r}P(e,t){return t<>>32-e}I(t){const n=this,s=n.S,i=e(80);for(let e=0;16>e;e++)i[e]=t[e];let o=s[0],c=s[1],f=s[2],a=s[3],l=s[4];for(let e=0;79>=e;e++){16>e||(i[e]=n.P(1,i[e-3]^i[e-8]^i[e-14]^i[e-16]));const t=n.P(5,o)+n.V(e,c,f,a)+l+i[e]+n.v[r.floor(e/20)]|0;l=a,a=f,f=n.P(30,c),c=o,o=t}s[0]=s[0]+o|0,s[1]=s[1]+c|0,s[2]=s[2]+f|0,s[3]=s[3]+a|0,s[4]=s[4]+l|0}},A={getRandomValues(e){const t=new c(e.buffer),n=e=>{let t=987654321;const n=4294967295;return()=>(t=36969*(65535&t)+(t>>16)&n,(((t<<16)+(e=18e3*(65535&e)+(e>>16)&n)&n)/4294967296+.5)*(r.random()>.5?1:-1))};for(let s,i=0;inew I.R(x.p.g(e)),B(e,t,n,r){if(n=n||1e4,0>r||0>n)throw new s(\"invalid params to pbkdf2\");const i=1+(r>>5)<<2;let o,c,f,a,u;const w=new ArrayBuffer(i),h=new l(w);let d=0;const p=C;for(t=x.p.g(t),u=1;(i||1)>d;u++){for(o=c=e.encrypt(p.concat(t,[u])),f=1;n>f;f++)for(c=e.encrypt(c),a=0;ad&&fs&&(e=(new n).update(e).D());for(let t=0;s>t;t++)r[0][t]=909522486^e[t],r[1][t]=1549556828^e[t];t.K[0].update(r[0]),t.K[1].update(r[1]),t.U=new n(t.K[0])}reset(){const e=this;e.U=new e.M(e.K[0]),e.N=!1}update(e){this.N=!0,this.U.update(e)}digest(){const e=this,t=e.U.D(),n=new e.M(e.K[1]).update(t).D();return e.reset(),n}encrypt(e){if(this.N)throw new s(\"encrypt on already updated hmac called!\");return this.update(e),this.digest(e)}}},D=void 0!==h&&\"function\"==typeof h.getRandomValues,V=\"Invalid password\",P=\"Invalid signature\",R=\"zipjs-abort-check-password\";function B(e){return D?h.getRandomValues(e):A.getRandomValues(e)}const E=16,M={name:\"PBKDF2\"},K=t.assign({hash:{name:\"HMAC\"}},M),U=t.assign({iterations:1e3,hash:{name:\"SHA-1\"}},M),N=[\"deriveBits\"],O=[8,12,16],T=[16,24,32],W=10,j=[0,0,0,0],H=\"undefined\",L=\"function\",F=typeof h!=H,q=F&&h.subtle,G=F&&typeof q!=H,J=x.p,Q=class{constructor(e){const t=this;t.O=[[[],[],[],[],[]],[[],[],[],[],[]]],t.O[0][0][0]||t.T();const n=t.O[0][4],r=t.O[1],i=e.length;let o,c,f,a=1;if(4!==i&&6!==i&&8!==i)throw new s(\"invalid aes key size\");for(t.v=[c=e.slice(0),f=[]],o=i;4*i+28>o;o++){let e=c[o-1];(o%i==0||8===i&&o%i==4)&&(e=n[e>>>24]<<24^n[e>>16&255]<<16^n[e>>8&255]<<8^n[255&e],o%i==0&&(e=e<<8^e>>>24^a<<24,a=a<<1^283*(a>>7))),c[o]=c[o-i]^e}for(let e=0;o;e++,o--){const t=c[3&e?o:o-4];f[e]=4>=o||4>e?t:r[0][n[t>>>24]]^r[1][n[t>>16&255]]^r[2][n[t>>8&255]]^r[3][n[255&t]]}}encrypt(e){return this.W(e,0)}decrypt(e){return this.W(e,1)}T(){const e=this.O[0],t=this.O[1],n=e[4],r=t[4],s=[],i=[];let o,c,f,a;for(let e=0;256>e;e++)i[(s[e]=e<<1^283*(e>>7))^e]=e;for(let l=o=0;!n[l];l^=c||1,o=i[o]||1){let i=o^o<<1^o<<2^o<<3^o<<4;i=i>>8^255&i^99,n[l]=i,r[i]=l,a=s[f=s[c=s[l]]];let u=16843009*a^65537*f^257*c^16843008*l,w=257*s[i]^16843008*i;for(let n=0;4>n;n++)e[n][l]=w=w<<24^w>>>8,t[n][i]=u=u<<24^u>>>8}for(let n=0;5>n;n++)e[n]=e[n].slice(0),t[n]=t[n].slice(0)}W(e,t){if(4!==e.length)throw new s(\"invalid aes block size\");const n=this.v[t],r=n.length/4-2,i=[0,0,0,0],o=this.O[t],c=o[0],f=o[1],a=o[2],l=o[3],u=o[4];let w,h,d,p=e[0]^n[0],y=e[t?3:1]^n[1],m=e[2]^n[2],b=e[t?1:3]^n[3],g=4;for(let e=0;r>e;e++)w=c[p>>>24]^f[y>>16&255]^a[m>>8&255]^l[255&b]^n[g],h=c[y>>>24]^f[m>>16&255]^a[b>>8&255]^l[255&p]^n[g+1],d=c[m>>>24]^f[b>>16&255]^a[p>>8&255]^l[255&y]^n[g+2],b=c[b>>>24]^f[p>>16&255]^a[y>>8&255]^l[255&m]^n[g+3],g+=4,p=w,y=h,m=d;for(let e=0;4>e;e++)i[t?3&-e:e]=u[p>>>24]<<24^u[y>>16&255]<<16^u[m>>8&255]<<8^u[255&b]^n[g++],w=p,p=y,y=m,m=b,b=w;return i}},X=class{constructor(e,t){this.j=e,this.H=t,this.L=t}reset(){this.L=this.H}update(e){return this.F(this.j,e,this.L)}q(e){if(255==(e>>24&255)){let t=e>>16&255,n=e>>8&255,r=255&e;255===t?(t=0,255===n?(n=0,255===r?r=0:++r):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=r}else e+=1<<24;return e}G(e){0===(e[0]=this.q(e[0]))&&(e[1]=this.q(e[1]))}F(e,t,n){let r;if(!(r=t.length))return[];const s=C.l(t);for(let s=0;r>s;s+=4){this.G(n);const r=e.encrypt(n);t[s]^=r[0],t[s+1]^=r[1],t[s+2]^=r[2],t[s+3]^=r[3]}return C.u(t,s)}},Y=I.R;let Z=F&&G&&typeof q.importKey==L,$=F&&G&&typeof q.deriveBits==L;class ee extends p{constructor({password:e,signed:n,encryptionStrength:r,checkPasswordOnly:o}){super({start(){t.assign(this,{ready:new u((e=>this.J=e)),password:e,signed:n,X:r-1,pending:new i})},async transform(e,t){const n=this,{password:r,X:c,J:f,ready:a}=n;r?(await(async(e,t,n,r)=>{const i=await re(e,t,n,ie(r,0,O[t])),o=ie(r,O[t]);if(i[0]!=o[0]||i[1]!=o[1])throw new s(V)})(n,c,r,ie(e,0,O[c]+2)),e=ie(e,O[c]+2),o?t.error(new s(R)):f()):await a;const l=new i(e.length-W-(e.length-W)%E);t.enqueue(ne(n,e,l,0,W,!0))},async flush(e){const{signed:t,Y:n,Z:r,pending:o,ready:c}=this;await c;const f=ie(o,0,o.length-W),a=ie(o,o.length-W);let l=new i;if(f.length){const e=ce(J,f);r.update(e);const t=n.update(e);l=oe(J,t)}if(t){const e=ie(oe(J,r.digest()),0,W);for(let t=0;W>t;t++)if(e[t]!=a[t])throw new s(P)}e.enqueue(l)}})}}class te extends p{constructor({password:e,encryptionStrength:n}){let r;super({start(){t.assign(this,{ready:new u((e=>this.J=e)),password:e,X:n-1,pending:new i})},async transform(e,t){const n=this,{password:r,X:s,J:o,ready:c}=n;let f=new i;r?(f=await(async(e,t,n)=>{const r=B(new i(O[t]));return se(r,await re(e,t,n,r))})(n,s,r),o()):await c;const a=new i(f.length+e.length-e.length%E);a.set(f,0),t.enqueue(ne(n,e,a,f.length,0))},async flush(e){const{Y:t,Z:n,pending:s,ready:o}=this;await o;let c=new i;if(s.length){const e=t.update(ce(J,s));n.update(e),c=oe(J,e)}r.signature=oe(J,n.digest()).slice(0,W),e.enqueue(se(c,r.signature))}}),r=this}}function ne(e,t,n,r,s,o){const{Y:c,Z:f,pending:a}=e,l=t.length-s;let u;for(a.length&&(t=se(a,t),n=((e,t)=>{if(t&&t>e.length){const n=e;(e=new i(t)).set(n,0)}return e})(n,l-l%E)),u=0;l-E>=u;u+=E){const e=ce(J,ie(t,u,u+E));o&&f.update(e);const s=c.update(e);o||f.update(s),n.set(oe(J,s),u+r)}return e.pending=ie(t,u),n}async function re(n,r,s,o){n.password=null;const c=(e=>{if(void 0===w){const t=new i((e=unescape(encodeURIComponent(e))).length);for(let n=0;n{if(!Z)return I.importKey(t);try{return await q.importKey(\"raw\",t,n,!1,s)}catch(e){return Z=!1,I.importKey(t)}})(0,c,K,0,N),a=await(async(e,t,n)=>{if(!$)return I.B(t,e.salt,U.iterations,n);try{return await q.deriveBits(e,t,n)}catch(r){return $=!1,I.B(t,e.salt,U.iterations,n)}})(t.assign({salt:o},U),f,8*(2*T[r]+2)),l=new i(a),u=ce(J,ie(l,0,T[r])),h=ce(J,ie(l,T[r],2*T[r])),d=ie(l,2*T[r]);return t.assign(n,{keys:{key:u,$:h,passwordVerification:d},Y:new X(new Q(u),e.from(j)),Z:new Y(h)}),d}function se(e,t){let n=e;return e.length+t.length&&(n=new i(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function ie(e,t,n){return e.subarray(t,n)}function oe(e,t){return e.m(t)}function ce(e,t){return e.g(t)}class fe extends p{constructor({password:e,passwordVerification:n,checkPasswordOnly:r}){super({start(){t.assign(this,{password:e,passwordVerification:n}),we(this,e)},transform(e,t){const n=this;if(n.password){const t=le(n,e.subarray(0,12));if(n.password=null,t[11]!=n.passwordVerification)throw new s(V);e=e.subarray(12)}r?t.error(new s(R)):t.enqueue(le(n,e))}})}}class ae extends p{constructor({password:e,passwordVerification:n}){super({start(){t.assign(this,{password:e,passwordVerification:n}),we(this,e)},transform(e,t){const n=this;let r,s;if(n.password){n.password=null;const t=B(new i(12));t[11]=n.passwordVerification,r=new i(e.length+t.length),r.set(ue(n,t),0),s=12}else r=new i(e.length),s=0;r.set(ue(n,e),s),t.enqueue(r)}})}}function le(e,t){const n=new i(t.length);for(let r=0;r>>24]),i=~e.te.get(),e.keys=[n,s,i]}function de(e){const t=2|e.keys[2];return pe(r.imul(t,1^t)>>>8)}function pe(e){return 255&e}function ye(e){return 4294967295&e}const me=\"deflate-raw\";class be extends p{constructor(e,{chunkSize:t,CompressionStream:n,CompressionStreamNative:r}){super({});const{compressed:s,encrypted:i,useCompressionStream:o,zipCrypto:c,signed:f,level:a}=e,u=this;let w,h,d=ke(super.readable);i&&!c||!f||([d,w]=d.tee(),w=ze(w,new z)),s&&(d=Se(d,o,{level:a,chunkSize:t},r,n)),i&&(c?d=ze(d,new ae(e)):(h=new te(e),d=ze(d,h))),ve(u,d,(async()=>{let e;i&&!c&&(e=h.signature),i&&!c||!f||(e=await w.getReader().read(),e=new l(e.value.buffer).getUint32(0)),u.signature=e}))}}class ge extends p{constructor(e,{chunkSize:t,DecompressionStream:n,DecompressionStreamNative:r}){super({});const{zipCrypto:i,encrypted:o,signed:c,signature:f,compressed:a,useCompressionStream:u}=e;let w,h,d=ke(super.readable);o&&(i?d=ze(d,new fe(e)):(h=new ee(e),d=ze(d,h))),a&&(d=Se(d,u,{chunkSize:t},r,n)),o&&!i||!c||([d,w]=d.tee(),w=ze(w,new z)),ve(this,d,(async()=>{if((!o||i)&&c){const e=await w.getReader().read(),t=new l(e.value.buffer);if(f!=t.getUint32(0,!1))throw new s(P)}}))}}function ke(e){return ze(e,new p({transform(e,t){e&&e.length&&t.enqueue(e)}}))}function ve(e,n,r){n=ze(n,new p({flush:r})),t.defineProperty(e,\"readable\",{get:()=>n})}function Se(e,t,n,r,s){try{e=ze(e,new(t&&r?r:s)(me,n))}catch(r){if(!t)throw r;e=ze(e,new s(me,n))}return e}function ze(e,t){return e.pipeThrough(t)}const Ce=\"data\";class xe extends p{constructor(e,n){super({});const r=this,{codecType:s}=e;let i;s.startsWith(\"deflate\")?i=be:s.startsWith(\"inflate\")&&(i=ge);let o=0;const c=new i(e,n),f=super.readable,a=new p({transform(e,t){e&&e.length&&(o+=e.length,t.enqueue(e))},flush(){const{signature:e}=c;t.assign(r,{signature:e,size:o})}});t.defineProperty(r,\"readable\",{get:()=>f.pipeThrough(c).pipeThrough(a)})}}const _e=new a,Ae=new a;let Ie=0;async function De(e){try{const{options:t,scripts:r,config:s}=e;r&&r.length&&importScripts.apply(void 0,r),self.initCodec&&self.initCodec(),s.CompressionStreamNative=self.CompressionStream,s.DecompressionStreamNative=self.DecompressionStream,self.Deflate&&(s.CompressionStream=new k(self.Deflate)),self.Inflate&&(s.DecompressionStream=new k(self.Inflate));const i={highWaterMark:1,size:()=>s.chunkSize},o=e.readable||new y({async pull(e){const t=new u((e=>_e.set(Ie,e)));Ve({type:\"pull\",messageId:Ie}),Ie=(Ie+1)%n.MAX_SAFE_INTEGER;const{value:r,done:s}=await t;e.enqueue(r),s&&e.close()}},i),c=e.writable||new m({async write(e){let t;const r=new u((e=>t=e));Ae.set(Ie,t),Ve({type:Ce,value:e,messageId:Ie}),Ie=(Ie+1)%n.MAX_SAFE_INTEGER,await r}},i),f=new xe(t,s);await o.pipeThrough(f).pipeTo(c,{preventClose:!0,preventAbort:!0});try{await c.close()}catch(e){}const{signature:a,size:l}=f;Ve({type:\"close\",result:{signature:a,size:l}})}catch(e){Pe(e)}}function Ve(e){let{value:t}=e;if(t)if(t.length)try{t=new i(t),e.value=t.buffer,d(e,[e.value])}catch(t){d(e)}else d(e);else d(e)}function Pe(e){const{message:t,stack:n,code:r,name:s}=e;d({error:{message:t,stack:n,code:r,name:s}})}addEventListener(\"message\",(({data:e})=>{const{type:t,messageId:n,value:r,done:s}=e;try{if(\"start\"==t&&De(e),t==Ce){const e=_e.get(n);_e.delete(n),e({value:new i(r),done:s})}if(\"ack\"==t){const e=Ae.get(n);Ae.delete(n),e()}}catch(e){Pe(e)}}));const Re=-2;function Be(t){return Ee(t.map((([t,n])=>new e(t).fill(n,0,t))))}function Ee(t){return t.reduce(((t,n)=>t.concat(e.isArray(n)?Ee(n):n)),[])}const Me=[0,1,2,3].concat(...Be([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function Ke(){const e=this;function t(e,t){let n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1}e.ne=n=>{const s=e.re,i=e.ie.se,o=e.ie.oe;let c,f,a,l=-1;for(n.ce=0,n.fe=573,c=0;o>c;c++)0!==s[2*c]?(n.ae[++n.ce]=l=c,n.le[c]=0):s[2*c+1]=0;for(;2>n.ce;)a=n.ae[++n.ce]=2>l?++l:0,s[2*a]=1,n.le[a]=0,n.ue--,i&&(n.we-=i[2*a+1]);for(e.he=l,c=r.floor(n.ce/2);c>=1;c--)n.de(s,c);a=o;do{c=n.ae[1],n.ae[1]=n.ae[n.ce--],n.de(s,1),f=n.ae[1],n.ae[--n.fe]=c,n.ae[--n.fe]=f,s[2*a]=s[2*c]+s[2*f],n.le[a]=r.max(n.le[c],n.le[f])+1,s[2*c+1]=s[2*f+1]=a,n.ae[1]=a++,n.de(s,1)}while(n.ce>=2);n.ae[--n.fe]=n.ae[1],(t=>{const n=e.re,r=e.ie.se,s=e.ie.pe,i=e.ie.ye,o=e.ie.me;let c,f,a,l,u,w,h=0;for(l=0;15>=l;l++)t.be[l]=0;for(n[2*t.ae[t.fe]+1]=0,c=t.fe+1;573>c;c++)f=t.ae[c],l=n[2*n[2*f+1]+1]+1,l>o&&(l=o,h++),n[2*f+1]=l,f>e.he||(t.be[l]++,u=0,i>f||(u=s[f-i]),w=n[2*f],t.ue+=w*(l+u),r&&(t.we+=w*(r[2*f+1]+u)));if(0!==h){do{for(l=o-1;0===t.be[l];)l--;t.be[l]--,t.be[l+1]+=2,t.be[o]--,h-=2}while(h>0);for(l=o;0!==l;l--)for(f=t.be[l];0!==f;)a=t.ae[--c],a>e.he||(n[2*a+1]!=l&&(t.ue+=(l-n[2*a+1])*n[2*a],n[2*a+1]=l),f--)}})(n),((e,n,r)=>{const s=[];let i,o,c,f=0;for(i=1;15>=i;i++)s[i]=f=f+r[i-1]<<1;for(o=0;n>=o;o++)c=e[2*o+1],0!==c&&(e[2*o]=t(s[c]++,c))})(s,e.he,n.be)}}function Ue(e,t,n,r,s){const i=this;i.se=e,i.pe=t,i.ye=n,i.oe=r,i.me=s}Ke.ge=[0,1,2,3,4,5,6,7].concat(...Be([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]])),Ke.ke=[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],Ke.ve=[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],Ke.Se=e=>256>e?Me[e]:Me[256+(e>>>7)],Ke.ze=[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],Ke.Ce=[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],Ke.xe=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],Ke._e=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];const Ne=Be([[144,8],[112,9],[24,7],[8,8]]);Ue.Ae=Ee([12,140,76,204,44,172,108,236,28,156,92,220,60,188,124,252,2,130,66,194,34,162,98,226,18,146,82,210,50,178,114,242,10,138,74,202,42,170,106,234,26,154,90,218,58,186,122,250,6,134,70,198,38,166,102,230,22,150,86,214,54,182,118,246,14,142,78,206,46,174,110,238,30,158,94,222,62,190,126,254,1,129,65,193,33,161,97,225,17,145,81,209,49,177,113,241,9,137,73,201,41,169,105,233,25,153,89,217,57,185,121,249,5,133,69,197,37,165,101,229,21,149,85,213,53,181,117,245,13,141,77,205,45,173,109,237,29,157,93,221,61,189,125,253,19,275,147,403,83,339,211,467,51,307,179,435,115,371,243,499,11,267,139,395,75,331,203,459,43,299,171,427,107,363,235,491,27,283,155,411,91,347,219,475,59,315,187,443,123,379,251,507,7,263,135,391,71,327,199,455,39,295,167,423,103,359,231,487,23,279,151,407,87,343,215,471,55,311,183,439,119,375,247,503,15,271,143,399,79,335,207,463,47,303,175,431,111,367,239,495,31,287,159,415,95,351,223,479,63,319,191,447,127,383,255,511,0,64,32,96,16,80,48,112,8,72,40,104,24,88,56,120,4,68,36,100,20,84,52,116,3,131,67,195,35,163,99,227].map(((e,t)=>[e,Ne[t]])));const Oe=Be([[30,5]]);function Te(e,t,n,r,s){const i=this;i.Ie=e,i.De=t,i.Ve=n,i.Pe=r,i.Re=s}Ue.Be=Ee([0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30,1,17,9,25,5,21,13,29,3,19,11,27,7,23].map(((e,t)=>[e,Oe[t]]))),Ue.Ee=new Ue(Ue.Ae,Ke.ze,257,286,15),Ue.Me=new Ue(Ue.Be,Ke.Ce,0,30,15),Ue.Ke=new Ue(null,Ke.xe,0,19,7);const We=[new Te(0,0,0,0,0),new Te(4,4,8,4,1),new Te(4,5,16,8,1),new Te(4,6,32,32,1),new Te(4,4,16,16,2),new Te(8,16,32,32,2),new Te(8,16,128,128,2),new Te(8,32,128,256,2),new Te(32,128,258,1024,2),new Te(32,258,258,4096,2)],je=[\"need dictionary\",\"stream end\",\"\",\"\",\"stream error\",\"data error\",\"\",\"buffer error\",\"\",\"\"],He=113,Le=666,Fe=262;function qe(e,t,n,r){const s=e[2*t],i=e[2*n];return i>s||s==i&&r[t]<=r[n]}function Ge(){const e=this;let t,n,s,c,f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z,C,x,_,A,I,D,V,P,R,B,E,M,K;const U=new Ke,N=new Ke,O=new Ke;let T,W,j,H,L,F;function q(){let t;for(t=0;286>t;t++)E[2*t]=0;for(t=0;30>t;t++)M[2*t]=0;for(t=0;19>t;t++)K[2*t]=0;E[512]=1,e.ue=e.we=0,W=j=0}function G(e,t){let n,r=-1,s=e[1],i=0,o=7,c=4;0===s&&(o=138,c=3),e[2*(t+1)+1]=65535;for(let f=0;t>=f;f++)n=s,s=e[2*(f+1)+1],++ii?K[2*n]+=i:0!==n?(n!=r&&K[2*n]++,K[32]++):i>10?K[36]++:K[34]++,i=0,r=n,0===s?(o=138,c=3):n==s?(o=6,c=3):(o=7,c=4))}function J(t){e.Ue[e.pending++]=t}function Q(e){J(255&e),J(e>>>8&255)}function X(e,t){let n;const r=t;F>16-r?(n=e,L|=n<>>16-F,F+=r-16):(L|=e<=n;n++)if(r=i,i=e[2*(n+1)+1],++o>=c||r!=i){if(f>o)do{Y(r,K)}while(0!=--o);else 0!==r?(r!=s&&(Y(r,K),o--),Y(16,K),X(o-3,2)):o>10?(Y(18,K),X(o-11,7)):(Y(17,K),X(o-3,3));o=0,s=r,0===i?(c=138,f=3):r==i?(c=6,f=3):(c=7,f=4)}}function $(){16==F?(Q(L),L=0,F=0):8>F||(J(255&L),L>>>=8,F-=8)}function ee(t,n){let s,i,o;if(e.Ne[W]=t,e.Oe[W]=255&n,W++,0===t?E[2*n]++:(j++,t--,E[2*(Ke.ge[n]+256+1)]++,M[2*Ke.Se(t)]++),0==(8191&W)&&V>2){for(s=8*W,i=C-k,o=0;30>o;o++)s+=M[2*o]*(5+Ke.Ce[o]);if(s>>>=3,jc);Y(256,t),H=t[513]}function ne(){F>8?Q(L):F>0&&J(255&L),L=0,F=0}function re(t,n,r){X(0+(r?1:0),3),((t,n)=>{ne(),H=8,Q(n),Q(~n),e.Ue.set(u.subarray(t,t+n),e.pending),e.pending+=n})(t,n)}function se(n){((t,n,r)=>{let s,i,o=0;V>0?(U.ne(e),N.ne(e),o=(()=>{let t;for(G(E,U.he),G(M,N.he),O.ne(e),t=18;t>=3&&0===K[2*Ke._e[t]+1];t--);return e.ue+=14+3*(t+1),t})(),s=e.ue+3+7>>>3,i=e.we+3+7>>>3,i>s||(s=i)):s=i=n+5,n+4>s||-1==t?i==s?(X(2+(r?1:0),3),te(Ue.Ae,Ue.Be)):(X(4+(r?1:0),3),((e,t,n)=>{let r;for(X(e-257,5),X(t-1,5),X(n-4,4),r=0;n>r;r++)X(K[2*Ke._e[r]+1],3);Z(E,e-1),Z(M,t-1)})(U.he+1,N.he+1,o+1),te(E,M)):re(t,n,r),q(),r&&ne()})(0>k?-1:k,C-k,n),k=C,t.Te()}function ie(){let e,n,r,s;do{if(s=w-_-C,0===s&&0===C&&0===_)s=f;else if(-1==s)s--;else if(C>=f+f-Fe){u.set(u.subarray(f,f+f),0),x-=f,C-=f,k-=f,e=y,r=e;do{n=65535&d[--r],d[r]=f>n?0:n-f}while(0!=--e);e=f,r=e;do{n=65535&h[--r],h[r]=f>n?0:n-f}while(0!=--e);s+=f}if(0===t.We)return;e=t.je(u,C+_,s),_+=e,3>_||(p=255&u[C],p=(p<_&&0!==t.We)}function oe(e){let t,n,r=I,s=C,i=A;const o=C>f-Fe?C-(f-Fe):0;let c=B;const a=l,w=C+258;let d=u[s+i-1],p=u[s+i];R>A||(r>>=2),c>_&&(c=_);do{if(t=e,u[t+i]==p&&u[t+i-1]==d&&u[t]==u[s]&&u[++t]==u[s+1]){s+=2,t++;do{}while(u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&w>s);if(n=258-(w-s),s=w-258,n>i){if(x=e,i=n,n>=c)break;d=u[s+i-1],p=u[s+i]}}}while((e=65535&h[e&a])>o&&0!=--r);return i>_?_:i}e.le=[],e.be=[],e.ae=[],E=[],M=[],K=[],e.de=(t,n)=>{const r=e.ae,s=r[n];let i=n<<1;for(;i<=e.ce&&(i(W||(W=8),j||(j=8),G||(G=0),t.Le=null,-1==S&&(S=6),1>j||j>9||8!=W||9>x||x>15||0>S||S>9||0>G||G>2?Re:(t.Fe=e,a=x,f=1<(t.qe=t.Ge=0,t.Le=null,e.pending=0,e.Je=0,n=He,c=0,U.re=E,U.ie=Ue.Ee,N.re=M,N.ie=Ue.Me,O.re=K,O.ie=Ue.Ke,L=0,F=0,H=8,q(),(()=>{w=2*f,d[y-1]=0;for(let e=0;y-1>e;e++)d[e]=0;D=We[V].De,R=We[V].Ie,B=We[V].Ve,I=We[V].Pe,C=0,k=0,_=0,v=A=2,z=0,p=0})(),0))(t))),e.Qe=()=>42!=n&&n!=He&&n!=Le?Re:(e.Oe=null,e.Ne=null,e.Ue=null,d=null,h=null,u=null,e.Fe=null,n==He?-3:0),e.Xe=(e,t,n)=>{let r=0;return-1==t&&(t=6),0>t||t>9||0>n||n>2?Re:(We[V].Re!=We[t].Re&&0!==e.qe&&(r=e.Ye(1)),V!=t&&(V=t,D=We[V].De,R=We[V].Ie,B=We[V].Ve,I=We[V].Pe),P=n,r)},e.Ze=(e,t,r)=>{let s,i=r,o=0;if(!t||42!=n)return Re;if(3>i)return 0;for(i>f-Fe&&(i=f-Fe,o=r-i),u.set(t.subarray(o,o+i),0),C=i,k=i,p=255&u[0],p=(p<=s;s++)p=(p<{let o,w,m,I,R;if(i>4||0>i)return Re;if(!r.$e||!r.et&&0!==r.We||n==Le&&4!=i)return r.Le=je[4],Re;if(0===r.tt)return r.Le=je[7],-5;var B;if(t=r,I=c,c=i,42==n&&(w=8+(a-8<<4)<<8,m=(V-1&255)>>1,m>3&&(m=3),w|=m<<6,0!==C&&(w|=32),w+=31-w%31,n=He,J((B=w)>>8&255),J(255&B)),0!==e.pending){if(t.Te(),0===t.tt)return c=-1,0}else if(0===t.We&&I>=i&&4!=i)return t.Le=je[7],-5;if(n==Le&&0!==t.We)return r.Le=je[7],-5;if(0!==t.We||0!==_||0!=i&&n!=Le){switch(R=-1,We[V].Re){case 0:R=(e=>{let n,r=65535;for(r>s-5&&(r=s-5);;){if(1>=_){if(ie(),0===_&&0==e)return 0;if(0===_)break}if(C+=_,_=0,n=k+r,(0===C||C>=n)&&(_=C-n,C=n,se(!1),0===t.tt))return 0;if(C-k>=f-Fe&&(se(!1),0===t.tt))return 0}return se(4==e),0===t.tt?4==e?2:0:4==e?3:1})(i);break;case 1:R=(e=>{let n,r=0;for(;;){if(Fe>_){if(ie(),Fe>_&&0==e)return 0;if(0===_)break}if(3>_||(p=(p<f-Fe||2!=P&&(v=oe(r)),3>v)n=ee(0,255&u[C]),_--,C++;else if(n=ee(C-x,v-3),_-=v,v>D||3>_)C+=v,v=0,p=255&u[C],p=(p<{let n,r,s=0;for(;;){if(Fe>_){if(ie(),Fe>_&&0==e)return 0;if(0===_)break}if(3>_||(p=(p<A&&f-Fe>=(C-s&65535)&&(2!=P&&(v=oe(s)),5>=v&&(1==P||3==v&&C-x>4096)&&(v=2)),3>A||v>A)if(0!==z){if(n=ee(0,255&u[C-1]),n&&se(!1),C++,_--,0===t.tt)return 0}else z=1,C++,_--;else{r=C+_-3,n=ee(C-1-S,A-3),_-=A-1,A-=2;do{++C>r||(p=(p<1+H+10-F&&(X(2,3),Y(256,Ue.Ae),$()),H=7;else if(re(0,0,!1),3==i)for(o=0;y>o;o++)d[o]=0;if(t.Te(),0===t.tt)return c=-1,0}}return 4!=i?0:1}}function Je(){const e=this;e.nt=0,e.rt=0,e.We=0,e.qe=0,e.tt=0,e.Ge=0}function Qe(e){const t=new Je,n=(o=e&&e.chunkSize?e.chunkSize:65536)+5*(r.floor(o/16383)+1);var o;const c=new i(n);let f=e?e.level:-1;void 0===f&&(f=-1),t.He(f),t.$e=c,this.append=(e,r)=>{let o,f,a=0,l=0,u=0;const w=[];if(e.length){t.nt=0,t.et=e,t.We=e.length;do{if(t.rt=0,t.tt=n,o=t.Ye(0),0!=o)throw new s(\"deflating: \"+t.Le);t.rt&&(t.rt==n?w.push(new i(c)):w.push(c.slice(0,t.rt))),u+=t.rt,r&&t.nt>0&&t.nt!=a&&(r(t.nt),a=t.nt)}while(t.We>0||0===t.tt);return w.length>1?(f=new i(u),w.forEach((e=>{f.set(e,l),l+=e.length}))):f=w[0]||new i,f}},this.flush=()=>{let e,r,o=0,f=0;const a=[];do{if(t.rt=0,t.tt=n,e=t.Ye(4),1!=e&&0!=e)throw new s(\"deflating: \"+t.Le);n-t.tt>0&&a.push(c.slice(0,t.rt)),f+=t.rt}while(t.We>0||0===t.tt);return t.Qe(),r=new i(f),a.forEach((e=>{r.set(e,o),o+=e.length})),r}}Je.prototype={He(e,t){const n=this;return n.Fe=new Ge,t||(t=15),n.Fe.He(n,e,t)},Ye(e){const t=this;return t.Fe?t.Fe.Ye(t,e):Re},Qe(){const e=this;if(!e.Fe)return Re;const t=e.Fe.Qe();return e.Fe=null,t},Xe(e,t){const n=this;return n.Fe?n.Fe.Xe(n,e,t):Re},Ze(e,t){const n=this;return n.Fe?n.Fe.Ze(n,e,t):Re},je(e,t,n){const r=this;let s=r.We;return s>n&&(s=n),0===s?0:(r.We-=s,e.set(r.et.subarray(r.nt,r.nt+s),t),r.nt+=s,r.qe+=s,s)},Te(){const e=this;let t=e.Fe.pending;t>e.tt&&(t=e.tt),0!==t&&(e.$e.set(e.Fe.Ue.subarray(e.Fe.Je,e.Fe.Je+t),e.rt),e.rt+=t,e.Fe.Je+=t,e.Ge+=t,e.tt-=t,e.Fe.pending-=t,0===e.Fe.pending&&(e.Fe.Je=0))}};const Xe=-2,Ye=-3,Ze=-5,$e=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],et=[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],tt=[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],nt=[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],rt=[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],st=[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],it=[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 ot(){let e,t,n,r,s,i;function o(e,t,o,c,f,a,l,u,w,h,d){let p,y,m,b,g,k,v,S,z,C,x,_,A,I,D;C=0,g=o;do{n[e[t+C]]++,C++,g--}while(0!==g);if(n[0]==o)return l[0]=-1,u[0]=0,0;for(S=u[0],k=1;15>=k&&0===n[k];k++);for(v=k,k>S&&(S=k),g=15;0!==g&&0===n[g];g--);for(m=g,S>g&&(S=g),u[0]=S,I=1<k;k++,I<<=1)if(0>(I-=n[k]))return Ye;if(0>(I-=n[g]))return Ye;for(n[g]+=I,i[1]=k=0,C=1,A=2;0!=--g;)i[A]=k+=n[C],A++,C++;g=0,C=0;do{0!==(k=e[t+C])&&(d[i[k]++]=g),C++}while(++g=v;v++)for(p=n[v];0!=p--;){for(;v>_+S;){if(b++,_+=S,D=m-_,D=D>S?S:D,(y=1<<(k=v-_))>p+1&&(y-=p+1,A=v,D>k))for(;++kn[++A];)y-=n[A];if(D=1<1440)return Ye;s[b]=x=h[0],h[0]+=D,0!==b?(i[b]=g,r[0]=k,r[1]=S,k=g>>>_-S,r[2]=x-s[b-1]-k,w.set(r,3*(s[b-1]+k))):l[0]=x}for(r[1]=v-_,o>C?d[C]d[C]?0:96,r[2]=d[C++]):(r[0]=a[d[C]-c]+16+64,r[2]=f[d[C++]-c]):r[0]=192,y=1<>>_;D>k;k+=y)w.set(r,3*(x+k));for(k=1<>>=1)g^=k;for(g^=k,z=(1<<_)-1;(g&z)!=i[b];)b--,_-=S,z=(1<<_)-1}return 0!==I&&1!=m?Ze:0}function c(o){let c;for(e||(e=[],t=[],n=new f(16),r=[],s=new f(15),i=new f(16)),t.lengthc;c++)t[c]=0;for(c=0;16>c;c++)n[c]=0;for(c=0;3>c;c++)r[c]=0;s.set(n.subarray(0,15),0),i.set(n.subarray(0,16),0)}this.st=(n,r,s,i,f)=>{let a;return c(19),e[0]=0,a=o(n,0,19,19,null,null,s,r,i,e,t),a==Ye?f.Le=\"oversubscribed dynamic bit lengths tree\":a!=Ze&&0!==r[0]||(f.Le=\"incomplete dynamic bit lengths tree\",a=Ye),a},this.it=(n,r,s,i,f,a,l,u,w)=>{let h;return c(288),e[0]=0,h=o(s,0,n,257,nt,rt,a,i,u,e,t),0!=h||0===i[0]?(h==Ye?w.Le=\"oversubscribed literal/length tree\":-4!=h&&(w.Le=\"incomplete literal/length tree\",h=Ye),h):(c(288),h=o(s,n,r,0,st,it,l,f,u,e,t),0!=h||0===f[0]&&n>257?(h==Ye?w.Le=\"oversubscribed distance tree\":h==Ze?(w.Le=\"incomplete distance tree\",h=Ye):-4!=h&&(w.Le=\"empty distance tree with lengths\",h=Ye),h):0)}}function ct(){const e=this;let t,n,r,s,i=0,o=0,c=0,f=0,a=0,l=0,u=0,w=0,h=0,d=0;function p(e,t,n,r,s,i,o,c){let f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z;d=c.nt,p=c.We,w=o.ot,h=o.ct,y=o.write,m=yh;)p--,w|=(255&c.ft(d++))<>=a[z+1],h-=a[z+1],0!=(16&u)){for(u&=15,k=a[z+2]+(w&$e[u]),w>>=u,h-=u;15>h;)p--,w|=(255&c.ft(d++))<>=a[z+1],h-=a[z+1],0!=(16&u)){for(u&=15;u>h;)p--,w|=(255&c.ft(d++))<>=u,h-=u,m-=k,v>y){S=y-v;do{S+=o.end}while(0>S);if(u=o.end-S,k>u){if(k-=u,y-S>0&&u>y-S)do{o.lt[y++]=o.lt[S++]}while(0!=--u);else o.lt.set(o.lt.subarray(S,S+u),y),y+=u,S+=u,u=0;S=0}}else S=y-v,y-S>0&&2>y-S?(o.lt[y++]=o.lt[S++],o.lt[y++]=o.lt[S++],k-=2):(o.lt.set(o.lt.subarray(S,S+2),y),y+=2,S+=2,k-=2);if(y-S>0&&k>y-S)do{o.lt[y++]=o.lt[S++]}while(0!=--k);else o.lt.set(o.lt.subarray(S,S+k),y),y+=k,S+=k,k=0;break}if(0!=(64&u))return c.Le=\"invalid distance code\",k=c.We-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ot=w,o.ct=h,c.We=p,c.qe+=d-c.nt,c.nt=d,o.write=y,Ye;f+=a[z+2],f+=w&$e[u],z=3*(l+f),u=a[z]}break}if(0!=(64&u))return 0!=(32&u)?(k=c.We-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ot=w,o.ct=h,c.We=p,c.qe+=d-c.nt,c.nt=d,o.write=y,1):(c.Le=\"invalid literal/length code\",k=c.We-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ot=w,o.ct=h,c.We=p,c.qe+=d-c.nt,c.nt=d,o.write=y,Ye);if(f+=a[z+2],f+=w&$e[u],z=3*(l+f),0===(u=a[z])){w>>=a[z+1],h-=a[z+1],o.lt[y++]=a[z+2],m--;break}}else w>>=a[z+1],h-=a[z+1],o.lt[y++]=a[z+2],m--}while(m>=258&&p>=10);return k=c.We-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ot=w,o.ct=h,c.We=p,c.qe+=d-c.nt,c.nt=d,o.write=y,0}e.init=(e,i,o,c,f,a)=>{t=0,u=e,w=i,r=o,h=c,s=f,d=a,n=null},e.ut=(e,y,m)=>{let b,g,k,v,S,z,C,x=0,_=0,A=0;for(A=y.nt,v=y.We,x=e.ot,_=e.ct,S=e.write,z=S=258&&v>=10&&(e.ot=x,e.ct=_,y.We=v,y.qe+=A-y.nt,y.nt=A,e.write=S,m=p(u,w,r,h,s,d,e,y),A=y.nt,v=y.We,x=e.ot,_=e.ct,S=e.write,z=S_;){if(0===v)return e.ot=x,e.ct=_,y.We=v,y.qe+=A-y.nt,y.nt=A,e.write=S,e.wt(y,m);m=0,v--,x|=(255&y.ft(A++))<<_,_+=8}if(g=3*(o+(x&$e[b])),x>>>=n[g+1],_-=n[g+1],k=n[g],0===k){f=n[g+2],t=6;break}if(0!=(16&k)){a=15&k,i=n[g+2],t=2;break}if(0==(64&k)){c=k,o=g/3+n[g+2];break}if(0!=(32&k)){t=7;break}return t=9,y.Le=\"invalid literal/length code\",m=Ye,e.ot=x,e.ct=_,y.We=v,y.qe+=A-y.nt,y.nt=A,e.write=S,e.wt(y,m);case 2:for(b=a;b>_;){if(0===v)return e.ot=x,e.ct=_,y.We=v,y.qe+=A-y.nt,y.nt=A,e.write=S,e.wt(y,m);m=0,v--,x|=(255&y.ft(A++))<<_,_+=8}i+=x&$e[b],x>>=b,_-=b,c=w,n=s,o=d,t=3;case 3:for(b=c;b>_;){if(0===v)return e.ot=x,e.ct=_,y.We=v,y.qe+=A-y.nt,y.nt=A,e.write=S,e.wt(y,m);m=0,v--,x|=(255&y.ft(A++))<<_,_+=8}if(g=3*(o+(x&$e[b])),x>>=n[g+1],_-=n[g+1],k=n[g],0!=(16&k)){a=15&k,l=n[g+2],t=4;break}if(0==(64&k)){c=k,o=g/3+n[g+2];break}return t=9,y.Le=\"invalid distance code\",m=Ye,e.ot=x,e.ct=_,y.We=v,y.qe+=A-y.nt,y.nt=A,e.write=S,e.wt(y,m);case 4:for(b=a;b>_;){if(0===v)return e.ot=x,e.ct=_,y.We=v,y.qe+=A-y.nt,y.nt=A,e.write=S,e.wt(y,m);m=0,v--,x|=(255&y.ft(A++))<<_,_+=8}l+=x&$e[b],x>>=b,_-=b,t=5;case 5:for(C=S-l;0>C;)C+=e.end;for(;0!==i;){if(0===z&&(S==e.end&&0!==e.read&&(S=0,z=S7&&(_-=8,v++,A--),e.write=S,m=e.wt(y,m),S=e.write,z=S{}}ot.dt=(e,t,n,r)=>(e[0]=9,t[0]=5,n[0]=et,r[0]=tt,0);const ft=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function at(e,t){const n=this;let r,s=0,o=0,c=0,a=0;const l=[0],u=[0],w=new ct;let h=0,d=new f(4320);const p=new ot;n.ct=0,n.ot=0,n.lt=new i(t),n.end=t,n.read=0,n.write=0,n.reset=(e,t)=>{t&&(t[0]=0),6==s&&w.ht(e),s=0,n.ct=0,n.ot=0,n.read=n.write=0},n.reset(e,null),n.wt=(e,t)=>{let r,s,i;return s=e.rt,i=n.read,r=(i>n.write?n.end:n.write)-i,r>e.tt&&(r=e.tt),0!==r&&t==Ze&&(t=0),e.tt-=r,e.Ge+=r,e.$e.set(n.lt.subarray(i,i+r),s),s+=r,i+=r,i==n.end&&(i=0,n.write==n.end&&(n.write=0),r=n.write-i,r>e.tt&&(r=e.tt),0!==r&&t==Ze&&(t=0),e.tt-=r,e.Ge+=r,e.$e.set(n.lt.subarray(i,i+r),s),s+=r,i+=r),e.rt=s,n.read=i,t},n.ut=(e,t)=>{let i,f,y,m,b,g,k,v;for(m=e.nt,b=e.We,f=n.ot,y=n.ct,g=n.write,k=gy;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<>>1){case 0:f>>>=3,y-=3,i=7&y,f>>>=i,y-=i,s=1;break;case 1:S=[],z=[],C=[[]],x=[[]],ot.dt(S,z,C,x),w.init(S[0],z[0],C[0],0,x[0],0),f>>>=3,y-=3,s=6;break;case 2:f>>>=3,y-=3,s=3;break;case 3:return f>>>=3,y-=3,s=9,e.Le=\"invalid block type\",t=Ye,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t)}break;case 1:for(;32>y;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<>>16&65535)!=(65535&f))return s=9,e.Le=\"invalid stored block lengths\",t=Ye,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);o=65535&f,f=y=0,s=0!==o?2:0!==h?7:0;break;case 2:if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);if(0===k&&(g==n.end&&0!==n.read&&(g=0,k=gb&&(i=b),i>k&&(i=k),n.lt.set(e.je(m,i),g),m+=i,b-=i,g+=i,k-=i,0!=(o-=i))break;s=0!==h?7:0;break;case 3:for(;14>y;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<29||(i>>5&31)>29)return s=9,e.Le=\"too many length or distance symbols\",t=Ye,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);if(i=258+(31&i)+(i>>5&31),!r||r.lengthv;v++)r[v]=0;f>>>=14,y-=14,a=0,s=4;case 4:for(;4+(c>>>10)>a;){for(;3>y;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<>>=3,y-=3}for(;19>a;)r[ft[a++]]=0;if(l[0]=7,i=p.st(r,l,u,d,e),0!=i)return(t=i)==Ye&&(r=null,s=9),n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);a=0,s=5;case 5:for(;i=c,258+(31&i)+(i>>5&31)>a;){let o,w;for(i=l[0];i>y;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<w)f>>>=i,y-=i,r[a++]=w;else{for(v=18==w?7:w-14,o=18==w?11:3;i+v>y;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<>>=i,y-=i,o+=f&$e[v],f>>>=v,y-=v,v=a,i=c,v+o>258+(31&i)+(i>>5&31)||16==w&&1>v)return r=null,s=9,e.Le=\"invalid bit length repeat\",t=Ye,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);w=16==w?r[v-1]:0;do{r[v++]=w}while(0!=--o);a=v}}if(u[0]=-1,_=[],A=[],I=[],D=[],_[0]=9,A[0]=6,i=c,i=p.it(257+(31&i),1+(i>>5&31),r,_,A,I,D,d,e),0!=i)return i==Ye&&(r=null,s=9),t=i,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);w.init(_[0],A[0],d,I[0],d,D[0]),s=6;case 6:if(n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,1!=(t=w.ut(n,e,t)))return n.wt(e,t);if(t=0,w.ht(e),m=e.nt,b=e.We,f=n.ot,y=n.ct,g=n.write,k=g{n.reset(e,null),n.lt=null,d=null},n.yt=(e,t,r)=>{n.lt.set(e.subarray(t,t+r),0),n.read=n.write=r},n.bt=()=>1==s?1:0}const lt=13,ut=[0,0,255,255];function wt(){const e=this;function t(e){return e&&e.gt?(e.qe=e.Ge=0,e.Le=null,e.gt.mode=7,e.gt.kt.reset(e,null),0):Xe}e.mode=0,e.method=0,e.vt=[0],e.St=0,e.marker=0,e.zt=0,e.Ct=t=>(e.kt&&e.kt.ht(t),e.kt=null,0),e.xt=(n,r)=>(n.Le=null,e.kt=null,8>r||r>15?(e.Ct(n),Xe):(e.zt=r,n.gt.kt=new at(n,1<{let n,r;if(!e||!e.gt||!e.et)return Xe;const s=e.gt;for(t=4==t?Ze:0,n=Ze;;)switch(s.mode){case 0:if(0===e.We)return n;if(n=t,e.We--,e.qe++,8!=(15&(s.method=e.ft(e.nt++)))){s.mode=lt,e.Le=\"unknown compression method\",s.marker=5;break}if(8+(s.method>>4)>s.zt){s.mode=lt,e.Le=\"invalid win size\",s.marker=5;break}s.mode=1;case 1:if(0===e.We)return n;if(n=t,e.We--,e.qe++,r=255&e.ft(e.nt++),((s.method<<8)+r)%31!=0){s.mode=lt,e.Le=\"incorrect header check\",s.marker=5;break}if(0==(32&r)){s.mode=7;break}s.mode=2;case 2:if(0===e.We)return n;n=t,e.We--,e.qe++,s.St=(255&e.ft(e.nt++))<<24&4278190080,s.mode=3;case 3:if(0===e.We)return n;n=t,e.We--,e.qe++,s.St+=(255&e.ft(e.nt++))<<16&16711680,s.mode=4;case 4:if(0===e.We)return n;n=t,e.We--,e.qe++,s.St+=(255&e.ft(e.nt++))<<8&65280,s.mode=5;case 5:return 0===e.We?n:(n=t,e.We--,e.qe++,s.St+=255&e.ft(e.nt++),s.mode=6,2);case 6:return s.mode=lt,e.Le=\"need dictionary\",s.marker=0,Xe;case 7:if(n=s.kt.ut(e,n),n==Ye){s.mode=lt,s.marker=0;break}if(0==n&&(n=t),1!=n)return n;n=t,s.kt.reset(e,s.vt),s.mode=12;case 12:return e.We=0,1;case lt:return Ye;default:return Xe}},e.At=(e,t,n)=>{let r=0,s=n;if(!e||!e.gt||6!=e.gt.mode)return Xe;const i=e.gt;return s<1<{let n,r,s,i,o;if(!e||!e.gt)return Xe;const c=e.gt;if(c.mode!=lt&&(c.mode=lt,c.marker=0),0===(n=e.We))return Ze;for(r=e.nt,s=c.marker;0!==n&&4>s;)e.ft(r)==ut[s]?s++:s=0!==e.ft(r)?0:4-s,r++,n--;return e.qe+=r-e.nt,e.nt=r,e.We=n,c.marker=s,4!=s?Ye:(i=e.qe,o=e.Ge,t(e),e.qe=i,e.Ge=o,c.mode=7,0)},e.Dt=e=>e&&e.gt&&e.gt.kt?e.gt.kt.bt():Xe}function ht(){}function dt(e){const t=new ht,n=e&&e.chunkSize?r.floor(2*e.chunkSize):131072,o=new i(n);let c=!1;t.xt(),t.$e=o,this.append=(e,r)=>{const f=[];let a,l,u=0,w=0,h=0;if(0!==e.length){t.nt=0,t.et=e,t.We=e.length;do{if(t.rt=0,t.tt=n,0!==t.We||c||(t.nt=0,c=!0),a=t._t(0),c&&a===Ze){if(0!==t.We)throw new s(\"inflating: bad input\")}else if(0!==a&&1!==a)throw new s(\"inflating: \"+t.Le);if((c||1===a)&&t.We===e.length)throw new s(\"inflating: bad input\");t.rt&&(t.rt===n?f.push(new i(o)):f.push(o.slice(0,t.rt))),h+=t.rt,r&&t.nt>0&&t.nt!=u&&(r(t.nt),u=t.nt)}while(t.We>0||0===t.tt);return f.length>1?(l=new i(h),f.forEach((e=>{l.set(e,w),w+=e.length}))):l=f[0]||new i,l}},this.flush=()=>{t.Ct()}}ht.prototype={xt(e){const t=this;return t.gt=new wt,e||(e=15),t.gt.xt(t,e)},_t(e){const t=this;return t.gt?t.gt._t(t,e):Xe},Ct(){const e=this;if(!e.gt)return Xe;const t=e.gt.Ct(e);return e.gt=null,t},It(){const e=this;return e.gt?e.gt.It(e):Xe},At(e,t){const n=this;return n.gt?n.gt.At(n,e,t):Xe},ft(e){return this.et[e]},je(e,t){return this.et.subarray(e,e+t)}},self.initCodec=()=>{self.Deflate=Qe,self.Inflate=dt};\\n'],{type:\"text/javascript\"}));e({workerScripts:{inflate:[t],deflate:[t]}})}export{e as configureWebWorker};\n","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global Blob, atob, btoa, XMLHttpRequest, URL, fetch, ReadableStream, WritableStream, FileReader, TransformStream, Response */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tUNDEFINED_VALUE,\n\tFUNCTION_TYPE\n} from \"./constants.js\";\nimport { getConfiguration } from \"./configuration.js\";\n\nconst ERR_HTTP_STATUS = \"HTTP error \";\nconst ERR_HTTP_RANGE = \"HTTP Range not supported\";\nconst ERR_ITERATOR_COMPLETED_TOO_SOON = \"Writer iterator completed too soon\";\n\nconst CONTENT_TYPE_TEXT_PLAIN = \"text/plain\";\nconst HTTP_HEADER_CONTENT_LENGTH = \"Content-Length\";\nconst HTTP_HEADER_CONTENT_RANGE = \"Content-Range\";\nconst HTTP_HEADER_ACCEPT_RANGES = \"Accept-Ranges\";\nconst HTTP_HEADER_RANGE = \"Range\";\nconst HTTP_HEADER_CONTENT_TYPE = \"Content-Type\";\nconst HTTP_METHOD_HEAD = \"HEAD\";\nconst HTTP_METHOD_GET = \"GET\";\nconst HTTP_RANGE_UNIT = \"bytes\";\nconst DEFAULT_CHUNK_SIZE = 64 * 1024;\n\nconst PROPERTY_NAME_WRITABLE = \"writable\";\n\nclass Stream {\n\n\tconstructor() {\n\t\tthis.size = 0;\n\t}\n\n\tinit() {\n\t\tthis.initialized = true;\n\t}\n}\n\nclass Reader extends Stream {\n\n\tget readable() {\n\t\tconst reader = this;\n\t\tconst { chunkSize = DEFAULT_CHUNK_SIZE } = reader;\n\t\tconst readable = new ReadableStream({\n\t\t\tstart() {\n\t\t\t\tthis.chunkOffset = 0;\n\t\t\t},\n\t\t\tasync pull(controller) {\n\t\t\t\tconst { offset = 0, size, diskNumberStart } = readable;\n\t\t\t\tconst { chunkOffset } = this;\n\t\t\t\tcontroller.enqueue(await readUint8Array(reader, offset + chunkOffset, Math.min(chunkSize, size - chunkOffset), diskNumberStart));\n\t\t\t\tif (chunkOffset + chunkSize > size) {\n\t\t\t\t\tcontroller.close();\n\t\t\t\t} else {\n\t\t\t\t\tthis.chunkOffset += chunkSize;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\treturn readable;\n\t}\n}\n\nclass Writer extends Stream {\n\n\tconstructor() {\n\t\tsuper();\n\t\tconst writer = this;\n\t\tconst writable = new WritableStream({\n\t\t\twrite(chunk) {\n\t\t\t\treturn writer.writeUint8Array(chunk);\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(writer, PROPERTY_NAME_WRITABLE, {\n\t\t\tget() {\n\t\t\t\treturn writable;\n\t\t\t}\n\t\t});\n\t}\n\n\twriteUint8Array() {\n\t\t// abstract\n\t}\n}\n\nclass Data64URIReader extends Reader {\n\n\tconstructor(dataURI) {\n\t\tsuper();\n\t\tlet dataEnd = dataURI.length;\n\t\twhile (dataURI.charAt(dataEnd - 1) == \"=\") {\n\t\t\tdataEnd--;\n\t\t}\n\t\tconst dataStart = dataURI.indexOf(\",\") + 1;\n\t\tObject.assign(this, {\n\t\t\tdataURI,\n\t\t\tdataStart,\n\t\t\tsize: Math.floor((dataEnd - dataStart) * 0.75)\n\t\t});\n\t}\n\n\treadUint8Array(offset, length) {\n\t\tconst {\n\t\t\tdataStart,\n\t\t\tdataURI\n\t\t} = this;\n\t\tconst dataArray = new Uint8Array(length);\n\t\tconst start = Math.floor(offset / 3) * 4;\n\t\tconst bytes = atob(dataURI.substring(start + dataStart, Math.ceil((offset + length) / 3) * 4 + dataStart));\n\t\tconst delta = offset - Math.floor(start / 4) * 3;\n\t\tfor (let indexByte = delta; indexByte < delta + length; indexByte++) {\n\t\t\tdataArray[indexByte - delta] = bytes.charCodeAt(indexByte);\n\t\t}\n\t\treturn dataArray;\n\t}\n}\n\nclass Data64URIWriter extends Writer {\n\n\tconstructor(contentType) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\tdata: \"data:\" + (contentType || \"\") + \";base64,\",\n\t\t\tpending: []\n\t\t});\n\t}\n\n\twriteUint8Array(array) {\n\t\tconst writer = this;\n\t\tlet indexArray = 0;\n\t\tlet dataString = writer.pending;\n\t\tconst delta = writer.pending.length;\n\t\twriter.pending = \"\";\n\t\tfor (indexArray = 0; indexArray < (Math.floor((delta + array.length) / 3) * 3) - delta; indexArray++) {\n\t\t\tdataString += String.fromCharCode(array[indexArray]);\n\t\t}\n\t\tfor (; indexArray < array.length; indexArray++) {\n\t\t\twriter.pending += String.fromCharCode(array[indexArray]);\n\t\t}\n\t\tif (dataString.length > 2) {\n\t\t\twriter.data += btoa(dataString);\n\t\t} else {\n\t\t\twriter.pending = dataString;\n\t\t}\n\t}\n\n\tgetData() {\n\t\treturn this.data + btoa(this.pending);\n\t}\n}\n\nclass BlobReader extends Reader {\n\n\tconstructor(blob) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\tblob,\n\t\t\tsize: blob.size\n\t\t});\n\t}\n\n\tasync readUint8Array(offset, length) {\n\t\tconst reader = this;\n\t\tconst offsetEnd = offset + length;\n\t\tconst blob = offset || offsetEnd < reader.size ? reader.blob.slice(offset, offsetEnd) : reader.blob;\n\t\treturn new Uint8Array(await blob.arrayBuffer());\n\t}\n}\n\nclass BlobWriter extends Stream {\n\n\tconstructor(contentType) {\n\t\tsuper();\n\t\tconst writer = this;\n\t\tconst transformStream = new TransformStream();\n\t\tconst headers = [];\n\t\tif (contentType) {\n\t\t\theaders.push([HTTP_HEADER_CONTENT_TYPE, contentType]);\n\t\t}\n\t\tObject.defineProperty(writer, PROPERTY_NAME_WRITABLE, {\n\t\t\tget() {\n\t\t\t\treturn transformStream.writable;\n\t\t\t}\n\t\t});\n\t\twriter.blob = new Response(transformStream.readable, { headers }).blob();\n\t}\n\n\tgetData() {\n\t\treturn this.blob;\n\t}\n}\n\nclass TextReader extends BlobReader {\n\n\tconstructor(text) {\n\t\tsuper(new Blob([text], { type: CONTENT_TYPE_TEXT_PLAIN }));\n\t}\n}\n\nclass TextWriter extends BlobWriter {\n\n\tconstructor(encoding) {\n\t\tsuper(encoding);\n\t\tObject.assign(this, {\n\t\t\tencoding,\n\t\t\tutf8: !encoding || encoding.toLowerCase() == \"utf-8\"\n\t\t});\n\t}\n\n\tasync getData() {\n\t\tconst {\n\t\t\tencoding,\n\t\t\tutf8\n\t\t} = this;\n\t\tconst blob = await super.getData();\n\t\tif (blob.text && utf8) {\n\t\t\treturn blob.text();\n\t\t} else {\n\t\t\tconst reader = new FileReader();\n\t\t\treturn new Promise((resolve, reject) => {\n\t\t\t\tObject.assign(reader, {\n\t\t\t\t\tonload: ({ target }) => resolve(target.result),\n\t\t\t\t\tonerror: () => reject(reader.error)\n\t\t\t\t});\n\t\t\t\treader.readAsText(blob, encoding);\n\t\t\t});\n\t\t}\n\t}\n}\n\nclass FetchReader extends Reader {\n\n\tconstructor(url, options) {\n\t\tsuper();\n\t\tcreateHtpReader(this, url, options);\n\t}\n\n\tasync init() {\n\t\tawait initHttpReader(this, sendFetchRequest, getFetchRequestData);\n\t\tsuper.init();\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn readUint8ArrayHttpReader(this, index, length, sendFetchRequest, getFetchRequestData);\n\t}\n}\n\nclass XHRReader extends Reader {\n\n\tconstructor(url, options) {\n\t\tsuper();\n\t\tcreateHtpReader(this, url, options);\n\t}\n\n\tasync init() {\n\t\tawait initHttpReader(this, sendXMLHttpRequest, getXMLHttpRequestData);\n\t\tsuper.init();\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn readUint8ArrayHttpReader(this, index, length, sendXMLHttpRequest, getXMLHttpRequestData);\n\t}\n}\n\nfunction createHtpReader(httpReader, url, options) {\n\tconst {\n\t\tpreventHeadRequest,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests\n\t} = options;\n\toptions = Object.assign({}, options);\n\tdelete options.preventHeadRequest;\n\tdelete options.useRangeHeader;\n\tdelete options.forceRangeRequests;\n\tdelete options.useXHR;\n\tObject.assign(httpReader, {\n\t\turl,\n\t\toptions,\n\t\tpreventHeadRequest,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests\n\t});\n}\n\nasync function initHttpReader(httpReader, sendRequest, getRequestData) {\n\tconst {\n\t\turl,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests\n\t} = httpReader;\n\tif (isHttpFamily(url) && (useRangeHeader || forceRangeRequests)) {\n\t\tconst { headers } = await sendRequest(HTTP_METHOD_GET, httpReader, getRangeHeaders(httpReader));\n\t\tif (!forceRangeRequests && headers.get(HTTP_HEADER_ACCEPT_RANGES) != HTTP_RANGE_UNIT) {\n\t\t\tthrow new Error(ERR_HTTP_RANGE);\n\t\t} else {\n\t\t\tlet contentSize;\n\t\t\tconst contentRangeHeader = headers.get(HTTP_HEADER_CONTENT_RANGE);\n\t\t\tif (contentRangeHeader) {\n\t\t\t\tconst splitHeader = contentRangeHeader.trim().split(/\\s*\\/\\s*/);\n\t\t\t\tif (splitHeader.length) {\n\t\t\t\t\tconst headerValue = splitHeader[1];\n\t\t\t\t\tif (headerValue && headerValue != \"*\") {\n\t\t\t\t\t\tcontentSize = Number(headerValue);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (contentSize === UNDEFINED_VALUE) {\n\t\t\t\tawait getContentLength(httpReader, sendRequest, getRequestData);\n\t\t\t} else {\n\t\t\t\thttpReader.size = contentSize;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tawait getContentLength(httpReader, sendRequest, getRequestData);\n\t}\n}\n\nasync function readUint8ArrayHttpReader(httpReader, index, length, sendRequest, getRequestData) {\n\tconst {\n\t\tuseRangeHeader,\n\t\tforceRangeRequests,\n\t\toptions\n\t} = httpReader;\n\tif (useRangeHeader || forceRangeRequests) {\n\t\tconst response = await sendRequest(HTTP_METHOD_GET, httpReader, getRangeHeaders(httpReader, index, length));\n\t\tif (response.status != 206) {\n\t\t\tthrow new Error(ERR_HTTP_RANGE);\n\t\t}\n\t\treturn new Uint8Array(await response.arrayBuffer());\n\t} else {\n\t\tconst { data } = httpReader;\n\t\tif (!data) {\n\t\t\tawait getRequestData(httpReader, options);\n\t\t}\n\t\treturn new Uint8Array(httpReader.data.subarray(index, index + length));\n\t}\n}\n\nfunction getRangeHeaders(httpReader, index = 0, length = 1) {\n\treturn Object.assign({}, getHeaders(httpReader), { [HTTP_HEADER_RANGE]: HTTP_RANGE_UNIT + \"=\" + index + \"-\" + (index + length - 1) });\n}\n\nfunction getHeaders({ options }) {\n\tconst { headers } = options;\n\tif (headers) {\n\t\tif (Symbol.iterator in headers) {\n\t\t\treturn Object.fromEntries(headers);\n\t\t} else {\n\t\t\treturn headers;\n\t\t}\n\t}\n}\n\nasync function getFetchRequestData(httpReader) {\n\tawait getRequestData(httpReader, sendFetchRequest);\n}\n\nasync function getXMLHttpRequestData(httpReader) {\n\tawait getRequestData(httpReader, sendXMLHttpRequest);\n}\n\nasync function getRequestData(httpReader, sendRequest) {\n\tconst response = await sendRequest(HTTP_METHOD_GET, httpReader, getHeaders(httpReader));\n\thttpReader.data = new Uint8Array(await response.arrayBuffer());\n\tif (!httpReader.size) {\n\t\thttpReader.size = httpReader.data.length;\n\t}\n}\n\nasync function getContentLength(httpReader, sendRequest, getRequestData) {\n\tif (httpReader.preventHeadRequest) {\n\t\tawait getRequestData(httpReader, httpReader.options);\n\t} else {\n\t\tconst response = await sendRequest(HTTP_METHOD_HEAD, httpReader, getHeaders(httpReader));\n\t\tconst contentLength = response.headers.get(HTTP_HEADER_CONTENT_LENGTH);\n\t\tif (contentLength) {\n\t\t\thttpReader.size = Number(contentLength);\n\t\t} else {\n\t\t\tawait getRequestData(httpReader, httpReader.options);\n\t\t}\n\t}\n}\n\nasync function sendFetchRequest(method, { options, url }, headers) {\n\tconst response = await fetch(url, Object.assign({}, options, { method, headers }));\n\tif (response.status < 400) {\n\t\treturn response;\n\t} else {\n\t\tthrow response.status == 416 ? new Error(ERR_HTTP_RANGE) : new Error(ERR_HTTP_STATUS + (response.statusText || response.status));\n\t}\n}\n\nfunction sendXMLHttpRequest(method, { url }, headers) {\n\treturn new Promise((resolve, reject) => {\n\t\tconst request = new XMLHttpRequest();\n\t\trequest.addEventListener(\"load\", () => {\n\t\t\tif (request.status < 400) {\n\t\t\t\tconst headers = [];\n\t\t\t\trequest.getAllResponseHeaders().trim().split(/[\\r\\n]+/).forEach(header => {\n\t\t\t\t\tconst splitHeader = header.trim().split(/\\s*:\\s*/);\n\t\t\t\t\tsplitHeader[0] = splitHeader[0].trim().replace(/^[a-z]|-[a-z]/g, value => value.toUpperCase());\n\t\t\t\t\theaders.push(splitHeader);\n\t\t\t\t});\n\t\t\t\tresolve({\n\t\t\t\t\tstatus: request.status,\n\t\t\t\t\tarrayBuffer: () => request.response,\n\t\t\t\t\theaders: new Map(headers)\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\treject(request.status == 416 ? new Error(ERR_HTTP_RANGE) : new Error(ERR_HTTP_STATUS + (request.statusText || request.status)));\n\t\t\t}\n\t\t}, false);\n\t\trequest.addEventListener(\"error\", event => reject(event.detail.error), false);\n\t\trequest.open(method, url);\n\t\tif (headers) {\n\t\t\tfor (const entry of Object.entries(headers)) {\n\t\t\t\trequest.setRequestHeader(entry[0], entry[1]);\n\t\t\t}\n\t\t}\n\t\trequest.responseType = \"arraybuffer\";\n\t\trequest.send();\n\t});\n}\n\nclass HttpReader extends Reader {\n\n\tconstructor(url, options = {}) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\turl,\n\t\t\treader: options.useXHR ? new XHRReader(url, options) : new FetchReader(url, options)\n\t\t});\n\t}\n\n\tset size(value) {\n\t\t// ignored\n\t}\n\n\tget size() {\n\t\treturn this.reader.size;\n\t}\n\n\tasync init() {\n\t\tawait this.reader.init();\n\t\tsuper.init();\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn this.reader.readUint8Array(index, length);\n\t}\n}\n\nclass HttpRangeReader extends HttpReader {\n\n\tconstructor(url, options = {}) {\n\t\toptions.useRangeHeader = true;\n\t\tsuper(url, options);\n\t}\n}\n\n\nclass Uint8ArrayReader extends Reader {\n\n\tconstructor(array) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\tarray,\n\t\t\tsize: array.length\n\t\t});\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn this.array.slice(index, index + length);\n\t}\n}\n\nclass Uint8ArrayWriter extends Writer {\n\n\tinit(initSize = 0) {\n\t\tObject.assign(this, {\n\t\t\toffset: 0,\n\t\t\tarray: new Uint8Array(initSize)\n\t\t});\n\t\tsuper.init();\n\t}\n\n\twriteUint8Array(array) {\n\t\tconst writer = this;\n\t\tif (writer.offset + array.length > writer.array.length) {\n\t\t\tconst previousArray = writer.array;\n\t\t\twriter.array = new Uint8Array(previousArray.length + array.length);\n\t\t\twriter.array.set(previousArray);\n\t\t}\n\t\twriter.array.set(array, writer.offset);\n\t\twriter.offset += array.length;\n\t}\n\n\tgetData() {\n\t\treturn this.array;\n\t}\n}\n\nclass SplitDataReader extends Reader {\n\n\tconstructor(readers) {\n\t\tsuper();\n\t\tthis.readers = readers;\n\t}\n\n\tasync init() {\n\t\tconst reader = this;\n\t\tconst { readers } = reader;\n\t\treader.lastDiskNumber = 0;\n\t\tawait Promise.all(readers.map(async diskReader => {\n\t\t\tawait diskReader.init();\n\t\t\treader.size += diskReader.size;\n\t\t}));\n\t\tsuper.init();\n\t}\n\n\tasync readUint8Array(offset, length, diskNumber = 0) {\n\t\tconst reader = this;\n\t\tconst { readers } = this;\n\t\tlet result;\n\t\tlet currentDiskNumber = diskNumber;\n\t\tif (currentDiskNumber == -1) {\n\t\t\tcurrentDiskNumber = readers.length - 1;\n\t\t}\n\t\tlet currentReaderOffset = offset;\n\t\twhile (currentReaderOffset >= readers[currentDiskNumber].size) {\n\t\t\tcurrentReaderOffset -= readers[currentDiskNumber].size;\n\t\t\tcurrentDiskNumber++;\n\t\t}\n\t\tconst currentReader = readers[currentDiskNumber];\n\t\tconst currentReaderSize = currentReader.size;\n\t\tif (currentReaderOffset + length <= currentReaderSize) {\n\t\t\tresult = await readUint8Array(currentReader, currentReaderOffset, length);\n\t\t} else {\n\t\t\tconst chunkLength = currentReaderSize - currentReaderOffset;\n\t\t\tresult = new Uint8Array(length);\n\t\t\tresult.set(await readUint8Array(currentReader, currentReaderOffset, chunkLength));\n\t\t\tresult.set(await reader.readUint8Array(offset + chunkLength, length - chunkLength, diskNumber), chunkLength);\n\t\t}\n\t\treader.lastDiskNumber = Math.max(currentDiskNumber, reader.lastDiskNumber);\n\t\treturn result;\n\t}\n}\n\nclass SplitDataWriter extends Stream {\n\n\tconstructor(writerGenerator, maxSize = 4294967295) {\n\t\tsuper();\n\t\tconst zipWriter = this;\n\t\tObject.assign(zipWriter, {\n\t\t\tdiskNumber: 0,\n\t\t\tdiskOffset: 0,\n\t\t\tsize: 0,\n\t\t\tmaxSize,\n\t\t\tavailableSize: maxSize\n\t\t});\n\t\tlet diskSourceWriter, diskWritable, diskWriter;\n\t\tconst writable = new WritableStream({\n\t\t\tasync write(chunk) {\n\t\t\t\tconst { availableSize } = zipWriter;\n\t\t\t\tif (!diskWriter) {\n\t\t\t\t\tconst { value, done } = await writerGenerator.next();\n\t\t\t\t\tif (done && !value) {\n\t\t\t\t\t\tthrow new Error(ERR_ITERATOR_COMPLETED_TOO_SOON);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdiskSourceWriter = value;\n\t\t\t\t\t\tdiskSourceWriter.size = 0;\n\t\t\t\t\t\tif (diskSourceWriter.maxSize) {\n\t\t\t\t\t\t\tzipWriter.maxSize = diskSourceWriter.maxSize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tzipWriter.availableSize = zipWriter.maxSize;\n\t\t\t\t\t\tawait initStream(diskSourceWriter);\n\t\t\t\t\t\tdiskWritable = value.writable;\n\t\t\t\t\t\tdiskWriter = diskWritable.getWriter();\n\t\t\t\t\t}\n\t\t\t\t\tawait this.write(chunk);\n\t\t\t\t} else if (chunk.length >= availableSize) {\n\t\t\t\t\tawait writeChunk(chunk.slice(0, availableSize));\n\t\t\t\t\tawait closeDisk();\n\t\t\t\t\tzipWriter.diskOffset += diskSourceWriter.size;\n\t\t\t\t\tzipWriter.diskNumber++;\n\t\t\t\t\tdiskWriter = null;\n\t\t\t\t\tawait this.write(chunk.slice(availableSize));\n\t\t\t\t} else {\n\t\t\t\t\tawait writeChunk(chunk);\n\t\t\t\t}\n\t\t\t},\n\t\t\tasync close() {\n\t\t\t\tawait diskWriter.ready;\n\t\t\t\tawait closeDisk();\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(zipWriter, PROPERTY_NAME_WRITABLE, {\n\t\t\tget() {\n\t\t\t\treturn writable;\n\t\t\t}\n\t\t});\n\n\t\tasync function writeChunk(chunk) {\n\t\t\tconst chunkLength = chunk.length;\n\t\t\tif (chunkLength) {\n\t\t\t\tawait diskWriter.ready;\n\t\t\t\tawait diskWriter.write(chunk);\n\t\t\t\tdiskSourceWriter.size += chunkLength;\n\t\t\t\tzipWriter.size += chunkLength;\n\t\t\t\tzipWriter.availableSize -= chunkLength;\n\t\t\t}\n\t\t}\n\n\t\tasync function closeDisk() {\n\t\t\tdiskWritable.size = diskSourceWriter.size;\n\t\t\tawait diskWriter.close();\n\t\t}\n\t}\n}\n\nfunction isHttpFamily(url) {\n\tconst { baseURL } = getConfiguration();\n\tconst { protocol } = new URL(url, baseURL);\n\treturn protocol == \"http:\" || protocol == \"https:\";\n}\n\nasync function initStream(stream, initSize) {\n\tif (stream.init && !stream.initialized) {\n\t\tawait stream.init(initSize);\n\t}\n}\n\nfunction initReader(reader) {\n\tif (Array.isArray(reader)) {\n\t\treader = new SplitDataReader(reader);\n\t}\n\tif (reader instanceof ReadableStream) {\n\t\treader = {\n\t\t\treadable: reader\n\t\t};\n\t}\n\treturn reader;\n}\n\nfunction initWriter(writer) {\n\tif (writer.writable === UNDEFINED_VALUE && typeof writer.next == FUNCTION_TYPE) {\n\t\twriter = new SplitDataWriter(writer);\n\t}\n\tif (writer instanceof WritableStream) {\n\t\twriter = {\n\t\t\twritable: writer\n\t\t};\n\t}\n\tconst { writable } = writer;\n\tif (writable.size === UNDEFINED_VALUE) {\n\t\twritable.size = 0;\n\t}\n\tconst splitZipFile = writer instanceof SplitDataWriter;\n\tif (!splitZipFile) {\n\t\tObject.assign(writer, {\n\t\t\tdiskNumber: 0,\n\t\t\tdiskOffset: 0,\n\t\t\tavailableSize: Infinity,\n\t\t\tmaxSize: Infinity\n\t\t});\n\t}\n\treturn writer;\n}\n\nfunction readUint8Array(reader, offset, size, diskNumber) {\n\treturn reader.readUint8Array(offset, size, diskNumber);\n}\n\nconst SplitZipReader = SplitDataReader;\nconst SplitZipWriter = SplitDataWriter;\n\nexport {\n\tinitStream,\n\tinitReader,\n\tinitWriter,\n\treadUint8Array,\n\tReader,\n\tWriter,\n\tTextReader,\n\tTextWriter,\n\tData64URIReader,\n\tData64URIWriter,\n\tBlobReader,\n\tBlobWriter,\n\tUint8ArrayReader,\n\tUint8ArrayWriter,\n\tHttpReader,\n\tHttpRangeReader,\n\tSplitZipReader,\n\tSplitZipWriter,\n\tSplitDataReader,\n\tSplitDataWriter,\n\tERR_HTTP_RANGE,\n\tERR_ITERATOR_COMPLETED_TOO_SOON\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TextDecoder */\n\nconst CP437 = \"\\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\\\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ \".split(\"\");\nconst VALID_CP437 = CP437.length == 256;\n\nexport {\n\tdecodeCP437\n};\n\nfunction decodeCP437(stringValue) {\n\tif (VALID_CP437) {\n\t\tlet result = \"\";\n\t\tfor (let indexCharacter = 0; indexCharacter < stringValue.length; indexCharacter++) {\n\t\t\tresult += CP437[stringValue[indexCharacter]];\n\t\t}\n\t\treturn result;\n\t} else {\n\t\treturn new TextDecoder().decode(stringValue);\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TextDecoder */\n\nimport { decodeCP437 } from \"./cp437-decode.js\";\n\nexport {\n\tdecodeText\n};\n\nfunction decodeText(value, encoding) {\n\tif (encoding && encoding.trim().toLowerCase() == \"cp437\") {\n\t\treturn decodeCP437(value);\n\t} else {\n\t\treturn new TextDecoder(encoding).decode(value);\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nconst PROPERTY_NAME_FILENAME = \"filename\";\nconst PROPERTY_NAME_RAW_FILENAME = \"rawFilename\";\nconst PROPERTY_NAME_COMMENT = \"comment\";\nconst PROPERTY_NAME_RAW_COMMENT = \"rawComment\";\nconst PROPERTY_NAME_UNCOMPPRESSED_SIZE = \"uncompressedSize\";\nconst PROPERTY_NAME_COMPPRESSED_SIZE = \"compressedSize\";\nconst PROPERTY_NAME_OFFSET = \"offset\";\nconst PROPERTY_NAME_DISK_NUMBER_START = \"diskNumberStart\";\nconst PROPERTY_NAME_LAST_MODIFICATION_DATE = \"lastModDate\";\nconst PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE = \"rawLastModDate\";\nconst PROPERTY_NAME_LAST_ACCESS_DATE = \"lastAccessDate\";\nconst PROPERTY_NAME_RAW_LAST_ACCESS_DATE = \"rawLastAccessDate\";\nconst PROPERTY_NAME_CREATION_DATE = \"creationDate\";\nconst PROPERTY_NAME_RAW_CREATION_DATE = \"rawCreationDate\";\nconst PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE = \"internalFileAttribute\";\nconst PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE = \"externalFileAttribute\";\nconst PROPERTY_NAME_MS_DOS_COMPATIBLE = \"msDosCompatible\";\nconst PROPERTY_NAME_ZIP64 = \"zip64\";\n\nconst PROPERTY_NAMES = [\n\tPROPERTY_NAME_FILENAME, PROPERTY_NAME_RAW_FILENAME, PROPERTY_NAME_COMPPRESSED_SIZE, PROPERTY_NAME_UNCOMPPRESSED_SIZE,\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE, PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE, PROPERTY_NAME_COMMENT, PROPERTY_NAME_RAW_COMMENT,\n\tPROPERTY_NAME_LAST_ACCESS_DATE, PROPERTY_NAME_CREATION_DATE, PROPERTY_NAME_OFFSET, PROPERTY_NAME_DISK_NUMBER_START,\n\tPROPERTY_NAME_DISK_NUMBER_START, PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE, PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_MS_DOS_COMPATIBLE, PROPERTY_NAME_ZIP64,\n\t\"directory\", \"bitFlag\", \"encrypted\", \"signature\", \"filenameUTF8\", \"commentUTF8\", \"compressionMethod\", \"version\", \"versionMadeBy\",\n\t\"extraField\", \"rawExtraField\", \"extraFieldZip64\", \"extraFieldUnicodePath\", \"extraFieldUnicodeComment\", \"extraFieldAES\", \"extraFieldNTFS\",\n\t\"extraFieldExtendedTimestamp\"];\n\nclass Entry {\n\n\tconstructor(data) {\n\t\tPROPERTY_NAMES.forEach(name => this[name] = data[name]);\n\t}\n\n}\n\nexport {\n\tPROPERTY_NAME_FILENAME,\n\tPROPERTY_NAME_RAW_FILENAME,\n\tPROPERTY_NAME_COMMENT,\n\tPROPERTY_NAME_RAW_COMMENT,\n\tPROPERTY_NAME_UNCOMPPRESSED_SIZE,\n\tPROPERTY_NAME_COMPPRESSED_SIZE,\n\tPROPERTY_NAME_OFFSET,\n\tPROPERTY_NAME_DISK_NUMBER_START,\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_RAW_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_RAW_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_CREATION_DATE,\n\tPROPERTY_NAME_RAW_CREATION_DATE,\n\tPROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_MS_DOS_COMPATIBLE,\n\tPROPERTY_NAME_ZIP64,\n\tEntry\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global BigInt, Response, WritableStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tMAX_32_BITS,\n\tMAX_16_BITS,\n\tCOMPRESSION_METHOD_DEFLATE,\n\tCOMPRESSION_METHOD_STORE,\n\tCOMPRESSION_METHOD_AES,\n\tSPLIT_ZIP_FILE_SIGNATURE,\n\tLOCAL_FILE_HEADER_SIGNATURE,\n\tCENTRAL_FILE_HEADER_SIGNATURE,\n\tEND_OF_CENTRAL_DIR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_SIGNATURE,\n\tEXTRAFIELD_TYPE_ZIP64,\n\tEXTRAFIELD_TYPE_UNICODE_PATH,\n\tEXTRAFIELD_TYPE_UNICODE_COMMENT,\n\tEXTRAFIELD_TYPE_AES,\n\tEXTRAFIELD_TYPE_NTFS,\n\tEXTRAFIELD_TYPE_NTFS_TAG1,\n\tEXTRAFIELD_TYPE_EXTENDED_TIMESTAMP,\n\tEND_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LENGTH,\n\tBITFLAG_ENCRYPTED,\n\tBITFLAG_LEVEL,\n\tBITFLAG_DATA_DESCRIPTOR,\n\tBITFLAG_LANG_ENCODING_FLAG,\n\tFILE_ATTR_MSDOS_DIR_MASK,\n\tDIRECTORY_SIGNATURE,\n\tUNDEFINED_VALUE\n} from \"./constants.js\";\nimport {\n\tgetConfiguration,\n\tgetChunkSize\n} from \"./configuration.js\";\nimport {\n\trunWorker,\n\tCODEC_INFLATE,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD,\n\tERR_ABORT_CHECK_PASSWORD\n} from \"./codec-pool.js\";\nimport {\n\tinitStream,\n\tinitReader,\n\tinitWriter,\n\treadUint8Array,\n\tBlobReader\n} from \"./io.js\";\nimport { decodeText } from \"./util/decode-text.js\";\nimport { Crc32 } from \"./streams/codecs/crc32.js\";\nimport {\n\tPROPERTY_NAME_RAW_FILENAME,\n\tPROPERTY_NAME_FILENAME,\n\tPROPERTY_NAME_RAW_COMMENT,\n\tPROPERTY_NAME_COMMENT,\n\tPROPERTY_NAME_UNCOMPPRESSED_SIZE,\n\tPROPERTY_NAME_COMPPRESSED_SIZE,\n\tPROPERTY_NAME_OFFSET,\n\tPROPERTY_NAME_DISK_NUMBER_START,\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_RAW_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_RAW_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_CREATION_DATE,\n\tPROPERTY_NAME_RAW_CREATION_DATE,\n\tEntry\n} from \"./zip-entry.js\";\n\nconst ERR_BAD_FORMAT = \"File format is not recognized\";\nconst ERR_EOCDR_NOT_FOUND = \"End of central directory not found\";\nconst ERR_EOCDR_ZIP64_NOT_FOUND = \"End of Zip64 central directory not found\";\nconst ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND = \"End of Zip64 central directory locator not found\";\nconst ERR_CENTRAL_DIRECTORY_NOT_FOUND = \"Central directory header not found\";\nconst ERR_LOCAL_FILE_HEADER_NOT_FOUND = \"Local file header not found\";\nconst ERR_EXTRAFIELD_ZIP64_NOT_FOUND = \"Zip64 extra field not found\";\nconst ERR_ENCRYPTED = \"File contains encrypted entry\";\nconst ERR_UNSUPPORTED_ENCRYPTION = \"Encryption method not supported\";\nconst ERR_UNSUPPORTED_COMPRESSION = \"Compression method not supported\";\nconst ERR_SPLIT_ZIP_FILE = \"Split zip file\";\nconst CHARSET_UTF8 = \"utf-8\";\nconst CHARSET_CP437 = \"cp437\";\nconst ZIP64_PROPERTIES = [\n\t[PROPERTY_NAME_UNCOMPPRESSED_SIZE, MAX_32_BITS],\n\t[PROPERTY_NAME_COMPPRESSED_SIZE, MAX_32_BITS],\n\t[PROPERTY_NAME_OFFSET, MAX_32_BITS],\n\t[PROPERTY_NAME_DISK_NUMBER_START, MAX_16_BITS]\n];\nconst ZIP64_EXTRACTION = {\n\t[MAX_16_BITS]: {\n\t\tgetValue: getUint32,\n\t\tbytes: 4\n\t},\n\t[MAX_32_BITS]: {\n\t\tgetValue: getBigUint64,\n\t\tbytes: 8\n\t}\n};\n\nclass ZipReader {\n\n\tconstructor(reader, options = {}) {\n\t\tObject.assign(this, {\n\t\t\treader: initReader(reader),\n\t\t\toptions,\n\t\t\tconfig: getConfiguration()\n\t\t});\n\t}\n\n\tasync* getEntriesGenerator(options = {}) {\n\t\tconst zipReader = this;\n\t\tlet { reader } = zipReader;\n\t\tconst { config } = zipReader;\n\t\tawait initStream(reader);\n\t\tif (reader.size === UNDEFINED_VALUE || !reader.readUint8Array) {\n\t\t\treader = new BlobReader(await new Response(reader.readable).blob());\n\t\t\tawait initStream(reader);\n\t\t}\n\t\tif (reader.size < END_OF_CENTRAL_DIR_LENGTH) {\n\t\t\tthrow new Error(ERR_BAD_FORMAT);\n\t\t}\n\t\treader.chunkSize = getChunkSize(config);\n\t\tconst endOfDirectoryInfo = await seekSignature(reader, END_OF_CENTRAL_DIR_SIGNATURE, reader.size, END_OF_CENTRAL_DIR_LENGTH, MAX_16_BITS * 16);\n\t\tif (!endOfDirectoryInfo) {\n\t\t\tconst signatureArray = await readUint8Array(reader, 0, 4);\n\t\t\tconst signatureView = getDataView(signatureArray);\n\t\t\tif (getUint32(signatureView) == SPLIT_ZIP_FILE_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_SPLIT_ZIP_FILE);\n\t\t\t} else {\n\t\t\t\tthrow new Error(ERR_EOCDR_NOT_FOUND);\n\t\t\t}\n\t\t}\n\t\tconst endOfDirectoryView = getDataView(endOfDirectoryInfo);\n\t\tlet directoryDataLength = getUint32(endOfDirectoryView, 12);\n\t\tlet directoryDataOffset = getUint32(endOfDirectoryView, 16);\n\t\tconst commentOffset = endOfDirectoryInfo.offset;\n\t\tconst commentLength = getUint16(endOfDirectoryView, 20);\n\t\tconst appendedDataOffset = commentOffset + END_OF_CENTRAL_DIR_LENGTH + commentLength;\n\t\tlet lastDiskNumber = getUint16(endOfDirectoryView, 4);\n\t\tconst expectedLastDiskNumber = reader.lastDiskNumber || 0;\n\t\tlet diskNumber = getUint16(endOfDirectoryView, 6);\n\t\tlet filesLength = getUint16(endOfDirectoryView, 8);\n\t\tlet prependedDataLength = 0;\n\t\tlet startOffset = 0;\n\t\tif (directoryDataOffset == MAX_32_BITS || directoryDataLength == MAX_32_BITS || filesLength == MAX_16_BITS || diskNumber == MAX_16_BITS) {\n\t\t\tconst endOfDirectoryLocatorArray = await readUint8Array(reader, endOfDirectoryInfo.offset - ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH, ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH);\n\t\t\tconst endOfDirectoryLocatorView = getDataView(endOfDirectoryLocatorArray);\n\t\t\tif (getUint32(endOfDirectoryLocatorView, 0) != ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_EOCDR_ZIP64_NOT_FOUND);\n\t\t\t}\n\t\t\tdirectoryDataOffset = getBigUint64(endOfDirectoryLocatorView, 8);\n\t\t\tlet endOfDirectoryArray = await readUint8Array(reader, directoryDataOffset, ZIP64_END_OF_CENTRAL_DIR_LENGTH, -1);\n\t\t\tlet endOfDirectoryView = getDataView(endOfDirectoryArray);\n\t\t\tconst expectedDirectoryDataOffset = endOfDirectoryInfo.offset - ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH - ZIP64_END_OF_CENTRAL_DIR_LENGTH;\n\t\t\tif (getUint32(endOfDirectoryView, 0) != ZIP64_END_OF_CENTRAL_DIR_SIGNATURE && directoryDataOffset != expectedDirectoryDataOffset) {\n\t\t\t\tconst originalDirectoryDataOffset = directoryDataOffset;\n\t\t\t\tdirectoryDataOffset = expectedDirectoryDataOffset;\n\t\t\t\tprependedDataLength = directoryDataOffset - originalDirectoryDataOffset;\n\t\t\t\tendOfDirectoryArray = await readUint8Array(reader, directoryDataOffset, ZIP64_END_OF_CENTRAL_DIR_LENGTH, -1);\n\t\t\t\tendOfDirectoryView = getDataView(endOfDirectoryArray);\n\t\t\t}\n\t\t\tif (getUint32(endOfDirectoryView, 0) != ZIP64_END_OF_CENTRAL_DIR_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND);\n\t\t\t}\n\t\t\tif (lastDiskNumber == MAX_16_BITS) {\n\t\t\t\tlastDiskNumber = getUint32(endOfDirectoryView, 16);\n\t\t\t}\n\t\t\tif (diskNumber == MAX_16_BITS) {\n\t\t\t\tdiskNumber = getUint32(endOfDirectoryView, 20);\n\t\t\t}\n\t\t\tif (filesLength == MAX_16_BITS) {\n\t\t\t\tfilesLength = getBigUint64(endOfDirectoryView, 32);\n\t\t\t}\n\t\t\tif (directoryDataLength == MAX_32_BITS) {\n\t\t\t\tdirectoryDataLength = getBigUint64(endOfDirectoryView, 40);\n\t\t\t}\n\t\t\tdirectoryDataOffset -= directoryDataLength;\n\t\t}\n\t\tif (expectedLastDiskNumber != lastDiskNumber) {\n\t\t\tthrow new Error(ERR_SPLIT_ZIP_FILE);\n\t\t}\n\t\tif (directoryDataOffset < 0 || directoryDataOffset >= reader.size) {\n\t\t\tthrow new Error(ERR_BAD_FORMAT);\n\t\t}\n\t\tlet offset = 0;\n\t\tlet directoryArray = await readUint8Array(reader, directoryDataOffset, directoryDataLength, diskNumber);\n\t\tlet directoryView = getDataView(directoryArray);\n\t\tif (directoryDataLength) {\n\t\t\tconst expectedDirectoryDataOffset = endOfDirectoryInfo.offset - directoryDataLength;\n\t\t\tif (getUint32(directoryView, offset) != CENTRAL_FILE_HEADER_SIGNATURE && directoryDataOffset != expectedDirectoryDataOffset) {\n\t\t\t\tconst originalDirectoryDataOffset = directoryDataOffset;\n\t\t\t\tdirectoryDataOffset = expectedDirectoryDataOffset;\n\t\t\t\tprependedDataLength = directoryDataOffset - originalDirectoryDataOffset;\n\t\t\t\tdirectoryArray = await readUint8Array(reader, directoryDataOffset, directoryDataLength, diskNumber);\n\t\t\t\tdirectoryView = getDataView(directoryArray);\n\t\t\t}\n\t\t}\n\t\tif (directoryDataOffset < 0 || directoryDataOffset >= reader.size) {\n\t\t\tthrow new Error(ERR_BAD_FORMAT);\n\t\t}\n\t\tconst filenameEncoding = getOptionValue(zipReader, options, \"filenameEncoding\");\n\t\tconst commentEncoding = getOptionValue(zipReader, options, \"commentEncoding\");\n\t\tfor (let indexFile = 0; indexFile < filesLength; indexFile++) {\n\t\t\tconst fileEntry = new ZipEntry(reader, config, zipReader.options);\n\t\t\tif (getUint32(directoryView, offset) != CENTRAL_FILE_HEADER_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_CENTRAL_DIRECTORY_NOT_FOUND);\n\t\t\t}\n\t\t\treadCommonHeader(fileEntry, directoryView, offset + 6);\n\t\t\tconst languageEncodingFlag = Boolean(fileEntry.bitFlag.languageEncodingFlag);\n\t\t\tconst filenameOffset = offset + 46;\n\t\t\tconst extraFieldOffset = filenameOffset + fileEntry.filenameLength;\n\t\t\tconst commentOffset = extraFieldOffset + fileEntry.extraFieldLength;\n\t\t\tconst versionMadeBy = getUint16(directoryView, offset + 4);\n\t\t\tconst msDosCompatible = (versionMadeBy & 0) == 0;\n\t\t\tconst rawFilename = directoryArray.subarray(filenameOffset, extraFieldOffset);\n\t\t\tconst commentLength = getUint16(directoryView, offset + 32);\n\t\t\tconst endOffset = commentOffset + commentLength;\n\t\t\tconst rawComment = directoryArray.subarray(commentOffset, endOffset);\n\t\t\tconst filenameUTF8 = languageEncodingFlag;\n\t\t\tconst commentUTF8 = languageEncodingFlag;\n\t\t\tconst directory = msDosCompatible && ((getUint8(directoryView, offset + 38) & FILE_ATTR_MSDOS_DIR_MASK) == FILE_ATTR_MSDOS_DIR_MASK);\n\t\t\tconst offsetFileEntry = getUint32(directoryView, offset + 42) + prependedDataLength;\n\t\t\tObject.assign(fileEntry, {\n\t\t\t\tversionMadeBy,\n\t\t\t\tmsDosCompatible,\n\t\t\t\tcompressedSize: 0,\n\t\t\t\tuncompressedSize: 0,\n\t\t\t\tcommentLength,\n\t\t\t\tdirectory,\n\t\t\t\toffset: offsetFileEntry,\n\t\t\t\tdiskNumberStart: getUint16(directoryView, offset + 34),\n\t\t\t\tinternalFileAttribute: getUint16(directoryView, offset + 36),\n\t\t\t\texternalFileAttribute: getUint32(directoryView, offset + 38),\n\t\t\t\trawFilename,\n\t\t\t\tfilenameUTF8,\n\t\t\t\tcommentUTF8,\n\t\t\t\trawExtraField: directoryArray.subarray(extraFieldOffset, commentOffset)\n\t\t\t});\n\t\t\tconst [filename, comment] = await Promise.all([\n\t\t\t\tdecodeText(rawFilename, filenameUTF8 ? CHARSET_UTF8 : filenameEncoding || CHARSET_CP437),\n\t\t\t\tdecodeText(rawComment, commentUTF8 ? CHARSET_UTF8 : commentEncoding || CHARSET_CP437)\n\t\t\t]);\n\t\t\tObject.assign(fileEntry, {\n\t\t\t\trawComment,\n\t\t\t\tfilename,\n\t\t\t\tcomment,\n\t\t\t\tdirectory: directory || filename.endsWith(DIRECTORY_SIGNATURE)\n\t\t\t});\n\t\t\tstartOffset = Math.max(offsetFileEntry, startOffset);\n\t\t\tawait readCommonFooter(fileEntry, fileEntry, directoryView, offset + 6);\n\t\t\tconst entry = new Entry(fileEntry);\n\t\t\tentry.getData = (writer, options) => fileEntry.getData(writer, entry, options);\n\t\t\toffset = endOffset;\n\t\t\tconst { onprogress } = options;\n\t\t\tif (onprogress) {\n\t\t\t\ttry {\n\t\t\t\t\tawait onprogress(indexFile + 1, filesLength, new Entry(fileEntry));\n\t\t\t\t} catch (_error) {\n\t\t\t\t\t// ignored\n\t\t\t\t}\n\t\t\t}\n\t\t\tyield entry;\n\t\t}\n\t\tconst extractPrependedData = getOptionValue(zipReader, options, \"extractPrependedData\");\n\t\tconst extractAppendedData = getOptionValue(zipReader, options, \"extractAppendedData\");\n\t\tif (extractPrependedData) {\n\t\t\tzipReader.prependedData = startOffset > 0 ? await readUint8Array(reader, 0, startOffset) : new Uint8Array();\n\t\t}\n\t\tzipReader.comment = commentLength ? await readUint8Array(reader, commentOffset + END_OF_CENTRAL_DIR_LENGTH, commentLength) : new Uint8Array();\n\t\tif (extractAppendedData) {\n\t\t\tzipReader.appendedData = appendedDataOffset < reader.size ? await readUint8Array(reader, appendedDataOffset, reader.size - appendedDataOffset) : new Uint8Array();\n\t\t}\n\t\treturn true;\n\t}\n\n\tasync getEntries(options = {}) {\n\t\tconst entries = [];\n\t\tfor await (const entry of this.getEntriesGenerator(options)) {\n\t\t\tentries.push(entry);\n\t\t}\n\t\treturn entries;\n\t}\n\n\tasync close() {\n\t}\n}\n\nexport {\n\tZipReader,\n\tERR_BAD_FORMAT,\n\tERR_EOCDR_NOT_FOUND,\n\tERR_EOCDR_ZIP64_NOT_FOUND,\n\tERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND,\n\tERR_CENTRAL_DIRECTORY_NOT_FOUND,\n\tERR_LOCAL_FILE_HEADER_NOT_FOUND,\n\tERR_EXTRAFIELD_ZIP64_NOT_FOUND,\n\tERR_ENCRYPTED,\n\tERR_UNSUPPORTED_ENCRYPTION,\n\tERR_UNSUPPORTED_COMPRESSION,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD,\n\tERR_SPLIT_ZIP_FILE\n};\n\nclass ZipEntry {\n\n\tconstructor(reader, config, options) {\n\t\tObject.assign(this, {\n\t\t\treader,\n\t\t\tconfig,\n\t\t\toptions\n\t\t});\n\t}\n\n\tasync getData(writer, fileEntry, options = {}) {\n\t\tconst zipEntry = this;\n\t\tconst {\n\t\t\treader,\n\t\t\toffset,\n\t\t\tdiskNumberStart,\n\t\t\textraFieldAES,\n\t\t\tcompressionMethod,\n\t\t\tconfig,\n\t\t\tbitFlag,\n\t\t\tsignature,\n\t\t\trawLastModDate,\n\t\t\tuncompressedSize,\n\t\t\tcompressedSize\n\t\t} = zipEntry;\n\t\tconst localDirectory = zipEntry.localDirectory = {};\n\t\tconst dataArray = await readUint8Array(reader, offset, 30, diskNumberStart);\n\t\tconst dataView = getDataView(dataArray);\n\t\tlet password = getOptionValue(zipEntry, options, \"password\");\n\t\tpassword = password && password.length && password;\n\t\tif (extraFieldAES) {\n\t\t\tif (extraFieldAES.originalCompressionMethod != COMPRESSION_METHOD_AES) {\n\t\t\t\tthrow new Error(ERR_UNSUPPORTED_COMPRESSION);\n\t\t\t}\n\t\t}\n\t\tif (compressionMethod != COMPRESSION_METHOD_STORE && compressionMethod != COMPRESSION_METHOD_DEFLATE) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_COMPRESSION);\n\t\t}\n\t\tif (getUint32(dataView, 0) != LOCAL_FILE_HEADER_SIGNATURE) {\n\t\t\tthrow new Error(ERR_LOCAL_FILE_HEADER_NOT_FOUND);\n\t\t}\n\t\treadCommonHeader(localDirectory, dataView, 4);\n\t\tlocalDirectory.rawExtraField = localDirectory.extraFieldLength ?\n\t\t\tawait readUint8Array(reader, offset + 30 + localDirectory.filenameLength, localDirectory.extraFieldLength, diskNumberStart) :\n\t\t\tnew Uint8Array();\n\t\tawait readCommonFooter(zipEntry, localDirectory, dataView, 4);\n\t\tObject.assign(fileEntry, {\n\t\t\tlastAccessDate: localDirectory.lastAccessDate,\n\t\t\tcreationDate: localDirectory.creationDate\n\t\t});\n\t\tconst encrypted = zipEntry.encrypted && localDirectory.encrypted;\n\t\tconst zipCrypto = encrypted && !extraFieldAES;\n\t\tif (encrypted) {\n\t\t\tif (!zipCrypto && extraFieldAES.strength === UNDEFINED_VALUE) {\n\t\t\t\tthrow new Error(ERR_UNSUPPORTED_ENCRYPTION);\n\t\t\t} else if (!password) {\n\t\t\t\tthrow new Error(ERR_ENCRYPTED);\n\t\t\t}\n\t\t}\n\t\tconst dataOffset = offset + 30 + localDirectory.filenameLength + localDirectory.extraFieldLength;\n\t\tconst readable = reader.readable;\n\t\treadable.diskNumberStart = diskNumberStart;\n\t\treadable.offset = dataOffset;\n\t\tlet size = readable.size = compressedSize;\n\t\tconst signal = getOptionValue(zipEntry, options, \"signal\");\n\t\tconst checkPasswordOnly = getOptionValue(zipEntry, options, \"checkPasswordOnly\");\n\t\tif (checkPasswordOnly) {\n\t\t\twriter = new WritableStream();\n\t\t}\n\t\twriter = initWriter(writer);\n\t\tawait initStream(writer, uncompressedSize);\n\t\tconst { writable } = writer;\n\t\tconst { onstart, onprogress, onend } = options;\n\t\tconst workerOptions = {\n\t\t\toptions: {\n\t\t\t\tcodecType: CODEC_INFLATE,\n\t\t\t\tpassword,\n\t\t\t\tzipCrypto,\n\t\t\t\tencryptionStrength: extraFieldAES && extraFieldAES.strength,\n\t\t\t\tsigned: getOptionValue(zipEntry, options, \"checkSignature\"),\n\t\t\t\tpasswordVerification: zipCrypto && (bitFlag.dataDescriptor ? ((rawLastModDate >>> 8) & 0xFF) : ((signature >>> 24) & 0xFF)),\n\t\t\t\tsignature,\n\t\t\t\tcompressed: compressionMethod != 0,\n\t\t\t\tencrypted,\n\t\t\t\tuseWebWorkers: getOptionValue(zipEntry, options, \"useWebWorkers\"),\n\t\t\t\tuseCompressionStream: getOptionValue(zipEntry, options, \"useCompressionStream\"),\n\t\t\t\ttransferStreams: getOptionValue(zipEntry, options, \"transferStreams\"),\n\t\t\t\tcheckPasswordOnly\n\t\t\t},\n\t\t\tconfig,\n\t\t\tstreamOptions: { signal, size, onstart, onprogress, onend }\n\t\t};\n\t\tlet outputSize = 0;\n\t\ttry {\n\t\t\t({ outputSize } = (await runWorker({ readable, writable }, workerOptions)));\n\t\t} catch (error) {\n\t\t\tif (!checkPasswordOnly || error.message != ERR_ABORT_CHECK_PASSWORD) {\n\t\t\t\tthrow error;\n\t\t\t}\n\t\t} finally {\n\t\t\tconst preventClose = getOptionValue(zipEntry, options, \"preventClose\");\n\t\t\twritable.size += outputSize;\n\t\t\tif (!preventClose && !writable.locked) {\n\t\t\t\tawait writable.close();\n\t\t\t}\n\t\t}\n\t\treturn checkPasswordOnly ? undefined : writer.getData ? writer.getData() : writable;\n\t}\n}\n\nfunction readCommonHeader(directory, dataView, offset) {\n\tconst rawBitFlag = directory.rawBitFlag = getUint16(dataView, offset + 2);\n\tconst encrypted = (rawBitFlag & BITFLAG_ENCRYPTED) == BITFLAG_ENCRYPTED;\n\tconst rawLastModDate = getUint32(dataView, offset + 6);\n\tObject.assign(directory, {\n\t\tencrypted,\n\t\tversion: getUint16(dataView, offset),\n\t\tbitFlag: {\n\t\t\tlevel: (rawBitFlag & BITFLAG_LEVEL) >> 1,\n\t\t\tdataDescriptor: (rawBitFlag & BITFLAG_DATA_DESCRIPTOR) == BITFLAG_DATA_DESCRIPTOR,\n\t\t\tlanguageEncodingFlag: (rawBitFlag & BITFLAG_LANG_ENCODING_FLAG) == BITFLAG_LANG_ENCODING_FLAG\n\t\t},\n\t\trawLastModDate,\n\t\tlastModDate: getDate(rawLastModDate),\n\t\tfilenameLength: getUint16(dataView, offset + 22),\n\t\textraFieldLength: getUint16(dataView, offset + 24)\n\t});\n}\n\nasync function readCommonFooter(fileEntry, directory, dataView, offset) {\n\tconst { rawExtraField } = directory;\n\tconst extraField = directory.extraField = new Map();\n\tconst rawExtraFieldView = getDataView(new Uint8Array(rawExtraField));\n\tlet offsetExtraField = 0;\n\ttry {\n\t\twhile (offsetExtraField < rawExtraField.length) {\n\t\t\tconst type = getUint16(rawExtraFieldView, offsetExtraField);\n\t\t\tconst size = getUint16(rawExtraFieldView, offsetExtraField + 2);\n\t\t\textraField.set(type, {\n\t\t\t\ttype,\n\t\t\t\tdata: rawExtraField.slice(offsetExtraField + 4, offsetExtraField + 4 + size)\n\t\t\t});\n\t\t\toffsetExtraField += 4 + size;\n\t\t}\n\t} catch (_error) {\n\t\t// ignored\n\t}\n\tconst compressionMethod = getUint16(dataView, offset + 4);\n\tObject.assign(directory, {\n\t\tsignature: getUint32(dataView, offset + 10),\n\t\tuncompressedSize: getUint32(dataView, offset + 18),\n\t\tcompressedSize: getUint32(dataView, offset + 14)\n\t});\n\tconst extraFieldZip64 = extraField.get(EXTRAFIELD_TYPE_ZIP64);\n\tif (extraFieldZip64) {\n\t\treadExtraFieldZip64(extraFieldZip64, directory);\n\t\tdirectory.extraFieldZip64 = extraFieldZip64;\n\t}\n\tconst extraFieldUnicodePath = extraField.get(EXTRAFIELD_TYPE_UNICODE_PATH);\n\tif (extraFieldUnicodePath) {\n\t\tawait readExtraFieldUnicode(extraFieldUnicodePath, PROPERTY_NAME_FILENAME, PROPERTY_NAME_RAW_FILENAME, directory, fileEntry);\n\t\tdirectory.extraFieldUnicodePath = extraFieldUnicodePath;\n\t}\n\tconst extraFieldUnicodeComment = extraField.get(EXTRAFIELD_TYPE_UNICODE_COMMENT);\n\tif (extraFieldUnicodeComment) {\n\t\tawait readExtraFieldUnicode(extraFieldUnicodeComment, PROPERTY_NAME_COMMENT, PROPERTY_NAME_RAW_COMMENT, directory, fileEntry);\n\t\tdirectory.extraFieldUnicodeComment = extraFieldUnicodeComment;\n\t}\n\tconst extraFieldAES = extraField.get(EXTRAFIELD_TYPE_AES);\n\tif (extraFieldAES) {\n\t\treadExtraFieldAES(extraFieldAES, directory, compressionMethod);\n\t\tdirectory.extraFieldAES = extraFieldAES;\n\t} else {\n\t\tdirectory.compressionMethod = compressionMethod;\n\t}\n\tconst extraFieldNTFS = extraField.get(EXTRAFIELD_TYPE_NTFS);\n\tif (extraFieldNTFS) {\n\t\treadExtraFieldNTFS(extraFieldNTFS, directory);\n\t\tdirectory.extraFieldNTFS = extraFieldNTFS;\n\t}\n\tconst extraFieldExtendedTimestamp = extraField.get(EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP);\n\tif (extraFieldExtendedTimestamp) {\n\t\treadExtraFieldExtendedTimestamp(extraFieldExtendedTimestamp, directory);\n\t\tdirectory.extraFieldExtendedTimestamp = extraFieldExtendedTimestamp;\n\t}\n}\n\nfunction readExtraFieldZip64(extraFieldZip64, directory) {\n\tdirectory.zip64 = true;\n\tconst extraFieldView = getDataView(extraFieldZip64.data);\n\tconst missingProperties = ZIP64_PROPERTIES.filter(([propertyName, max]) => directory[propertyName] == max);\n\tfor (let indexMissingProperty = 0, offset = 0; indexMissingProperty < missingProperties.length; indexMissingProperty++) {\n\t\tconst [propertyName, max] = missingProperties[indexMissingProperty];\n\t\tif (directory[propertyName] == max) {\n\t\t\tconst extraction = ZIP64_EXTRACTION[max];\n\t\t\tdirectory[propertyName] = extraFieldZip64[propertyName] = extraction.getValue(extraFieldView, offset);\n\t\t\toffset += extraction.bytes;\n\t\t} else if (extraFieldZip64[propertyName]) {\n\t\t\tthrow new Error(ERR_EXTRAFIELD_ZIP64_NOT_FOUND);\n\t\t}\n\t}\n}\n\nasync function readExtraFieldUnicode(extraFieldUnicode, propertyName, rawPropertyName, directory, fileEntry) {\n\tconst extraFieldView = getDataView(extraFieldUnicode.data);\n\tconst crc32 = new Crc32();\n\tcrc32.append(fileEntry[rawPropertyName]);\n\tconst dataViewSignature = getDataView(new Uint8Array(4));\n\tdataViewSignature.setUint32(0, crc32.get(), true);\n\tObject.assign(extraFieldUnicode, {\n\t\tversion: getUint8(extraFieldView, 0),\n\t\tsignature: getUint32(extraFieldView, 1),\n\t\t[propertyName]: await decodeText(extraFieldUnicode.data.subarray(5)),\n\t\tvalid: !fileEntry.bitFlag.languageEncodingFlag && extraFieldUnicode.signature == getUint32(dataViewSignature, 0)\n\t});\n\tif (extraFieldUnicode.valid) {\n\t\tdirectory[propertyName] = extraFieldUnicode[propertyName];\n\t\tdirectory[propertyName + \"UTF8\"] = true;\n\t}\n}\n\nfunction readExtraFieldAES(extraFieldAES, directory, compressionMethod) {\n\tconst extraFieldView = getDataView(extraFieldAES.data);\n\tconst strength = getUint8(extraFieldView, 4);\n\tObject.assign(extraFieldAES, {\n\t\tvendorVersion: getUint8(extraFieldView, 0),\n\t\tvendorId: getUint8(extraFieldView, 2),\n\t\tstrength,\n\t\toriginalCompressionMethod: compressionMethod,\n\t\tcompressionMethod: getUint16(extraFieldView, 5)\n\t});\n\tdirectory.compressionMethod = extraFieldAES.compressionMethod;\n}\n\nfunction readExtraFieldNTFS(extraFieldNTFS, directory) {\n\tconst extraFieldView = getDataView(extraFieldNTFS.data);\n\tlet offsetExtraField = 4;\n\tlet tag1Data;\n\ttry {\n\t\twhile (offsetExtraField < extraFieldNTFS.data.length && !tag1Data) {\n\t\t\tconst tagValue = getUint16(extraFieldView, offsetExtraField);\n\t\t\tconst attributeSize = getUint16(extraFieldView, offsetExtraField + 2);\n\t\t\tif (tagValue == EXTRAFIELD_TYPE_NTFS_TAG1) {\n\t\t\t\ttag1Data = extraFieldNTFS.data.slice(offsetExtraField + 4, offsetExtraField + 4 + attributeSize);\n\t\t\t}\n\t\t\toffsetExtraField += 4 + attributeSize;\n\t\t}\n\t} catch (_error) {\n\t\t// ignored\n\t}\n\ttry {\n\t\tif (tag1Data && tag1Data.length == 24) {\n\t\t\tconst tag1View = getDataView(tag1Data);\n\t\t\tconst rawLastModDate = tag1View.getBigUint64(0, true);\n\t\t\tconst rawLastAccessDate = tag1View.getBigUint64(8, true);\n\t\t\tconst rawCreationDate = tag1View.getBigUint64(16, true);\n\t\t\tObject.assign(extraFieldNTFS, {\n\t\t\t\trawLastModDate,\n\t\t\t\trawLastAccessDate,\n\t\t\t\trawCreationDate\n\t\t\t});\n\t\t\tconst lastModDate = getDateNTFS(rawLastModDate);\n\t\t\tconst lastAccessDate = getDateNTFS(rawLastAccessDate);\n\t\t\tconst creationDate = getDateNTFS(rawCreationDate);\n\t\t\tconst extraFieldData = { lastModDate, lastAccessDate, creationDate };\n\t\t\tObject.assign(extraFieldNTFS, extraFieldData);\n\t\t\tObject.assign(directory, extraFieldData);\n\t\t}\n\t} catch (_error) {\n\t\t// ignored\n\t}\n}\n\nfunction readExtraFieldExtendedTimestamp(extraFieldExtendedTimestamp, directory) {\n\tconst extraFieldView = getDataView(extraFieldExtendedTimestamp.data);\n\tconst flags = getUint8(extraFieldView, 0);\n\tconst timeProperties = [];\n\tconst timeRawProperties = [];\n\tif ((flags & 0x1) == 0x1) {\n\t\ttimeProperties.push(PROPERTY_NAME_LAST_MODIFICATION_DATE);\n\t\ttimeRawProperties.push(PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE);\n\t}\n\tif ((flags & 0x2) == 0x2) {\n\t\ttimeProperties.push(PROPERTY_NAME_LAST_ACCESS_DATE);\n\t\ttimeRawProperties.push(PROPERTY_NAME_RAW_LAST_ACCESS_DATE);\n\t}\n\tif ((flags & 0x4) == 0x4) {\n\t\ttimeProperties.push(PROPERTY_NAME_CREATION_DATE);\n\t\ttimeRawProperties.push(PROPERTY_NAME_RAW_CREATION_DATE);\n\t}\n\tlet offset = 1;\n\ttimeProperties.forEach((propertyName, indexProperty) => {\n\t\tif (extraFieldExtendedTimestamp.data.length >= offset + 4) {\n\t\t\tconst time = getUint32(extraFieldView, offset);\n\t\t\tdirectory[propertyName] = extraFieldExtendedTimestamp[propertyName] = new Date(time * 1000);\n\t\t\tconst rawPropertyName = timeRawProperties[indexProperty];\n\t\t\textraFieldExtendedTimestamp[rawPropertyName] = time;\n\t\t}\n\t\toffset += 4;\n\t});\n}\n\nasync function seekSignature(reader, signature, startOffset, minimumBytes, maximumLength) {\n\tconst signatureArray = new Uint8Array(4);\n\tconst signatureView = getDataView(signatureArray);\n\tsetUint32(signatureView, 0, signature);\n\tconst maximumBytes = minimumBytes + maximumLength;\n\treturn (await seek(minimumBytes)) || await seek(Math.min(maximumBytes, startOffset));\n\n\tasync function seek(length) {\n\t\tconst offset = startOffset - length;\n\t\tconst bytes = await readUint8Array(reader, offset, length);\n\t\tfor (let indexByte = bytes.length - minimumBytes; indexByte >= 0; indexByte--) {\n\t\t\tif (bytes[indexByte] == signatureArray[0] && bytes[indexByte + 1] == signatureArray[1] &&\n\t\t\t\tbytes[indexByte + 2] == signatureArray[2] && bytes[indexByte + 3] == signatureArray[3]) {\n\t\t\t\treturn {\n\t\t\t\t\toffset: offset + indexByte,\n\t\t\t\t\tbuffer: bytes.slice(indexByte, indexByte + minimumBytes).buffer\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction getOptionValue(zipReader, options, name) {\n\treturn options[name] === UNDEFINED_VALUE ? zipReader.options[name] : options[name];\n}\n\nfunction getDate(timeRaw) {\n\tconst date = (timeRaw & 0xffff0000) >> 16, time = timeRaw & 0x0000ffff;\n\ttry {\n\t\treturn new Date(1980 + ((date & 0xFE00) >> 9), ((date & 0x01E0) >> 5) - 1, date & 0x001F, (time & 0xF800) >> 11, (time & 0x07E0) >> 5, (time & 0x001F) * 2, 0);\n\t} catch (_error) {\n\t\t// ignored\n\t}\n}\n\nfunction getDateNTFS(timeRaw) {\n\treturn new Date((Number((timeRaw / BigInt(10000)) - BigInt(11644473600000))));\n}\n\nfunction getUint8(view, offset) {\n\treturn view.getUint8(offset);\n}\n\nfunction getUint16(view, offset) {\n\treturn view.getUint16(offset, true);\n}\n\nfunction getUint32(view, offset) {\n\treturn view.getUint32(offset, true);\n}\n\nfunction getBigUint64(view, offset) {\n\treturn Number(view.getBigUint64(offset, true));\n}\n\nfunction setUint32(view, offset, value) {\n\tview.setUint32(offset, value, true);\n}\n\nfunction getDataView(array) {\n\treturn new DataView(array.buffer);\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport { configure } from \"./core/configuration.js\";\nimport { configureWebWorker } from \"./z-worker-inline.js\";\nimport { getMimeType } from \"./core/util/default-mime-type.js\";\nimport { initShimAsyncCodec } from \"./core/util/stream-codec-shim.js\";\nimport { terminateWorkers } from \"./core/codec-pool.js\";\n\nlet baseURL;\ntry {\n\tbaseURL = import.meta.url;\n} catch (_error) {\n\t// ignored\n}\nconfigure({ baseURL });\nconfigureWebWorker(configure);\n\nexport * from \"./core/io.js\";\nexport * from \"./core/zip-reader.js\";\nexport * from \"./core/zip-writer.js\";\nexport * from \"./core/zip-fs-core.js\";\nexport {\n\tconfigure,\n\tgetMimeType,\n\tinitShimAsyncCodec,\n\tterminateWorkers\n};","/// \n\n/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport { Deflate } from \"./lib/core/streams/codecs/deflate.js\";\nimport { Inflate } from \"./lib/core/streams/codecs/inflate.js\";\nimport { configure } from \"./lib/core/configuration.js\";\nimport { getMimeType } from \"./lib/core/util/mime-type.js\";\nimport { terminateWorkers } from \"./lib/core/codec-pool.js\";\n\nconfigure({ Deflate, Inflate });\n\nexport {\n\tfs,\n\tconfigure,\n\tinitShimAsyncCodec,\n\tZipReader,\n\tZipWriter,\n\tReader,\n\tWriter,\n\tTextReader,\n\tTextWriter,\n\tData64URIReader,\n\tData64URIWriter,\n\tBlobReader,\n\tBlobWriter,\n\tHttpReader,\n\tHttpRangeReader,\n\tUint8ArrayWriter,\n\tUint8ArrayReader,\n\tSplitZipReader,\n\tSplitZipWriter,\n\tSplitDataReader,\n\tSplitDataWriter,\n\tERR_HTTP_RANGE,\n\tERR_BAD_FORMAT,\n\tERR_EOCDR_NOT_FOUND,\n\tERR_EOCDR_ZIP64_NOT_FOUND,\n\tERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND,\n\tERR_CENTRAL_DIRECTORY_NOT_FOUND,\n\tERR_LOCAL_FILE_HEADER_NOT_FOUND,\n\tERR_EXTRAFIELD_ZIP64_NOT_FOUND,\n\tERR_ENCRYPTED,\n\tERR_UNSUPPORTED_ENCRYPTION,\n\tERR_UNSUPPORTED_COMPRESSION,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD,\n\tERR_DUPLICATED_NAME,\n\tERR_INVALID_COMMENT,\n\tERR_INVALID_ENTRY_NAME,\n\tERR_INVALID_ENTRY_COMMENT,\n\tERR_INVALID_VERSION,\n\tERR_INVALID_EXTRAFIELD_TYPE,\n\tERR_INVALID_EXTRAFIELD_DATA,\n\tERR_INVALID_ENCRYPTION_STRENGTH,\n\tERR_UNSUPPORTED_FORMAT,\n\tERR_SPLIT_ZIP_FILE,\n\tERR_ITERATOR_COMPLETED_TOO_SOON\n} from \"./lib/zip-fs.js\";\nexport { getMimeType, terminateWorkers };","import { EntryMetadata, getEntryMetadata, zipGetData } from \"./common\";\nimport { BlobReader, BlobWriter, Entry, EntryGetDataOptions, Reader } from \"@zip.js/zip.js\";\n\nfunction parseIndex(index: number, size: number) {\n return index < 0 ?\n Math.max(index + size, 0) :\n Math.min(index, size);\n}\n\nclass BlobEntryReaderImpl extends Reader {\n private readonly blob: Blob;\n private readonly offset: number;\n\n constructor(blob: Blob, entryMetadata: EntryMetadata) {\n super(blob);\n\n this.blob = blob;\n this.offset = entryMetadata.offset + entryMetadata.headerSize;\n this.size = entryMetadata.compressedSize;\n }\n\n async readUint8Array(index: number, length: number): Promise {\n const start = parseIndex(index, this.size) + this.offset;\n const end = parseIndex(index + length, this.size) + this.offset;\n const blob = this.blob.slice(start, end);\n return new Uint8Array(await blob.arrayBuffer());\n }\n}\n\n/**\n * Represents a {@link Reader} instance used to read data of an entry in a zip\n * file provided as a {@link Blob}. It directly reads data if it is uncompressed.\n */\nexport class BlobEntryReader extends Reader {\n private readonly blob: Blob;\n private readonly entry: Entry;\n private readonly mimeString: string | undefined;\n private readonly options: EntryGetDataOptions | undefined;\n\n private reader: Reader | undefined;\n\n /**\n * @param blob - The blob to read data from, usually the outer zip file.\n * @param entry - The entry to read data of, usually the inner zip file.\n * @param mimeString - The MIME type of the data.\n * @param options - Represents options passed to {@link Entry#getData}.\n */\n constructor(\n blob: Blob,\n entry: Entry,\n mimeString?: string,\n options?: EntryGetDataOptions\n ) {\n super();\n\n this.blob = blob;\n this.entry = entry;\n this.mimeString = mimeString;\n this.options = options;\n }\n\n async init(): Promise {\n const entryMetadata = await getEntryMetadata(this.blob, this.entry);\n\n if (entryMetadata.compressionMethod !== 0) {\n const entryBlob: Blob = await zipGetData(\n this.entry,\n new BlobWriter(this.mimeString),\n this.options\n );\n this.reader = new BlobReader(entryBlob);\n } else {\n this.reader = new BlobEntryReaderImpl(this.blob, entryMetadata);\n }\n\n this.size = this.reader.size;\n }\n\n async readUint8Array(index: number, length: number): Promise {\n return this.reader!.readUint8Array(index, length);\n }\n}\n","import * as common from \"./common\";\nimport {\n ZipReader,\n BlobReader,\n BlobWriter,\n TextWriter,\n Entry,\n} from \"@zip.js/zip.js\";\nimport { FastbootDevice, FastbootError, ReconnectCallback } from \"./fastboot\";\nimport { BlobEntryReader } from \"./io\";\n\n/**\n * Callback for factory image flashing progress.\n *\n * @callback FactoryProgressCallback\n * @param {string} action - Action in the flashing process, e.g. unpack/flash.\n * @param {string} item - Item processed by the action, e.g. partition being flashed.\n * @param {number} progress - Progress within the current action between 0 and 1.\n */\nexport type FactoryProgressCallback = (\n action: string,\n item: string,\n progress: number\n) => void;\n\n// Images needed for fastbootd\nconst BOOT_CRITICAL_IMAGES = [\n \"boot\",\n \"dt\",\n \"dtbo\",\n \"init_boot\",\n \"pvmfw\",\n \"recovery\",\n \"vbmeta_system\",\n \"vbmeta_vendor\",\n \"vbmeta\",\n \"vendor_boot\",\n \"vendor_kernel_boot\",\n];\n\n// Less critical images to flash after boot-critical ones\nconst SYSTEM_IMAGES = [\n \"odm\",\n \"odm_dlkm\",\n \"product\",\n \"system_dlkm\",\n \"system_ext\",\n \"system\",\n \"vendor_dlkm\",\n \"vendor\",\n];\n\n/**\n * User-friendly action strings for factory image flashing progress.\n * This can be indexed by the action argument in FactoryFlashCallback.\n */\nexport const USER_ACTION_MAP = {\n load: \"Loading\",\n unpack: \"Unpacking\",\n flash: \"Writing\",\n wipe: \"Wiping\",\n reboot: \"Restarting\",\n};\n\nconst BOOTLOADER_REBOOT_TIME = 4000; // ms\nconst FASTBOOTD_REBOOT_TIME = 16000; // ms\nconst USERDATA_ERASE_TIME = 1000; // ms\n\nasync function flashEntryBlob(\n device: FastbootDevice,\n entry: Entry,\n onProgress: FactoryProgressCallback,\n partition: string\n) {\n const blob: Blob = await common.zipGetData(\n entry,\n new BlobWriter(\"application/octet-stream\"),\n {\n onstart(total: number): Promise | undefined {\n common.logDebug(`Unpacking ${partition} (${total} bytes)`);\n onProgress(\"unpack\", partition, 0.0);\n return;\n },\n onprogress(progress: number, total: number): Promise | undefined {\n onProgress(\"unpack\", partition, progress / total);\n return;\n }\n }\n );\n\n common.logDebug(`Flashing ${partition}`);\n onProgress(\"flash\", partition, 0.0);\n await device.flashBlob(partition, blob, (progress) => {\n onProgress(\"flash\", partition, progress);\n });\n}\n\nasync function tryFlashImages(\n device: FastbootDevice,\n entries: Array,\n onProgress: FactoryProgressCallback,\n imageNames: Array\n) {\n for (let imageName of imageNames) {\n let pattern = new RegExp(`${imageName}(?:-.+)?\\\\.img$`);\n let entry = entries.find((entry) => entry.filename.match(pattern));\n if (entry !== undefined) {\n if (imageName == \"bootloader\") {\n let current_slot = await device.getVariable(\"current-slot\");\n if (current_slot == \"a\") {\n await flashEntryBlob(device, entry, onProgress, (imageName + \"_b\"));\n await device.runCommand(\"set_active:b\");\n } else if (current_slot == \"b\") {\n await flashEntryBlob(device, entry, onProgress, (imageName + \"_a\"));\n await device.runCommand(\"set_active:a\");\n } else {\n throw new FastbootError(\n \"FAIL\",\n `Invalid slot given by bootloader.`\n );\n }\n }\n else {\n await flashEntryBlob(device, entry, onProgress, imageName);\n }\n }\n }\n}\n\nasync function checkRequirements(device: FastbootDevice, androidInfo: string) {\n // Deal with CRLF just in case\n for (let line of androidInfo.replace(\"\\r\", \"\").split(\"\\n\")) {\n let match = line.match(/^require\\s+(.+?)=(.+)$/);\n if (!match) {\n continue;\n }\n\n let variable = match[1];\n // Historical mismatch that we still need to deal with\n if (variable === \"board\") {\n variable = \"product\";\n }\n\n let expectValue = match[2];\n let expectValues: Array = expectValue.split(\"|\");\n\n // Special case: not a real variable at all\n if (variable === \"partition-exists\") {\n // Check whether the partition exists on the device:\n // has-slot = undefined || FAIL => doesn't exist\n // has-slot = yes || no => exists\n let hasSlot = await device.getVariable(`has-slot:${expectValue}`);\n if (hasSlot !== \"yes\" && hasSlot !== \"no\") {\n throw new FastbootError(\n \"FAIL\",\n `Requirement ${variable}=${expectValue} failed, device lacks partition`\n );\n }\n\n // Check whether we recognize the partition\n if (\n !BOOT_CRITICAL_IMAGES.includes(expectValue) &&\n !SYSTEM_IMAGES.includes(expectValue)\n ) {\n throw new FastbootError(\n \"FAIL\",\n `Requirement ${variable}=${expectValue} failed, unrecognized partition`\n );\n }\n } else {\n let realValue = await device.getVariable(variable);\n\n if (expectValues.includes(realValue)) {\n common.logDebug(\n `Requirement ${variable}=${expectValue} passed`\n );\n } else {\n let msg = `Requirement ${variable}=${expectValue} failed, value = ${realValue}`;\n common.logDebug(msg);\n throw new FastbootError(\"FAIL\", msg);\n }\n }\n }\n}\n\nasync function tryReboot(\n device: FastbootDevice,\n target: string,\n onReconnect: ReconnectCallback\n) {\n try {\n await device.reboot(target, false);\n } catch (e) {\n /* Failed = device rebooted by itself */\n }\n\n await device.waitForConnect(onReconnect);\n}\n\nexport async function flashZip(\n device: FastbootDevice,\n blob: Blob,\n wipe: boolean,\n onReconnect: ReconnectCallback,\n onProgress: FactoryProgressCallback = (\n _action: string,\n _item: string,\n _progress: number\n ) => {}\n) {\n onProgress(\"load\", \"package\", 0.0);\n let reader = new ZipReader(new BlobReader(blob));\n let entries = await reader.getEntries();\n\n // Bootloader and radio packs can only be flashed in the bare-metal bootloader\n if ((await device.getVariable(\"is-userspace\")) === \"yes\") {\n await device.reboot(\"bootloader\", true, onReconnect);\n }\n\n // 1. Bootloader pack (repeated for slot A and B)\n await tryFlashImages(device, entries, onProgress, [\"bootloader\"]);\n await common.runWithTimedProgress(\n onProgress,\n \"reboot\",\n \"device\",\n BOOTLOADER_REBOOT_TIME,\n tryReboot(device, \"bootloader\", onReconnect)\n );\n\n await tryFlashImages(device, entries, onProgress, [\"bootloader\"]);\n await common.runWithTimedProgress(\n onProgress,\n \"reboot\",\n \"device\",\n BOOTLOADER_REBOOT_TIME,\n tryReboot(device, \"bootloader\", onReconnect)\n );\n\n // 2. Radio pack\n await tryFlashImages(device, entries, onProgress, [\"radio\"]);\n await common.runWithTimedProgress(\n onProgress,\n \"reboot\",\n \"device\",\n BOOTLOADER_REBOOT_TIME,\n tryReboot(device, \"bootloader\", onReconnect)\n );\n\n // Cancel snapshot update if in progress\n let snapshotStatus = await device.getVariable(\"snapshot-update-status\");\n if (snapshotStatus !== null && snapshotStatus !== \"none\") {\n await device.runCommand(\"snapshot-update:cancel\");\n }\n\n // Load nested images for the following steps\n let entry = entries.find((e) => e.filename.match(/image-.+\\.zip$/));\n const imageReader = new ZipReader(new BlobEntryReader(\n blob,\n entry!,\n \"application/zip\",\n {\n onstart(total: number): Promise | undefined {\n common.logDebug(`Loading nested images from zip (${total} bytes)`);\n onProgress(\"unpack\", \"images\", 0.0);\n return;\n },\n onprogress(progress: number, total: number): Promise | undefined {\n onProgress(\"unpack\", \"images\", progress / total);\n return;\n }\n }\n ));\n const imageEntries = await imageReader.getEntries();\n\n // 3. Check requirements\n entry = imageEntries.find((e) => e.filename === \"android-info.txt\");\n if (entry !== undefined) {\n const reqText: string = await common.zipGetData(entry, new TextWriter());\n await checkRequirements(device, reqText);\n }\n\n // 4. Boot-critical images\n await tryFlashImages(\n device,\n imageEntries,\n onProgress,\n BOOT_CRITICAL_IMAGES\n );\n\n // 5. Super partition template\n // This is also where we reboot to fastbootd.\n entry = imageEntries.find((e) => e.filename === \"super_empty.img\");\n if (entry !== undefined) {\n await common.runWithTimedProgress(\n onProgress,\n \"reboot\",\n \"device\",\n FASTBOOTD_REBOOT_TIME,\n device.reboot(\"fastboot\", true, onReconnect)\n );\n\n let superName = await device.getVariable(\"super-partition-name\");\n if (!superName) {\n superName = \"super\";\n }\n\n let superAction = wipe ? \"wipe\" : \"flash\";\n onProgress(superAction, \"super\", 0.0);\n const superBlob: Blob = await common.zipGetData(\n entry,\n new BlobWriter(\"application/octet-stream\")\n );\n await device.upload(\n superName,\n await common.readBlobAsBuffer(superBlob),\n (progress) => {\n onProgress(superAction, \"super\", progress);\n }\n );\n await device.runCommand(\n `update-super:${superName}${wipe ? \":wipe\" : \"\"}`\n );\n }\n\n // 6. Remaining system images\n await tryFlashImages(device, imageEntries, onProgress, SYSTEM_IMAGES);\n\n // We unconditionally reboot back to the bootloader here if we're in fastbootd,\n // even when there's no custom AVB key, because common follow-up actions like\n // locking the bootloader and wiping data need to be done in the bootloader.\n if ((await device.getVariable(\"is-userspace\")) === \"yes\") {\n await common.runWithTimedProgress(\n onProgress,\n \"reboot\",\n \"device\",\n BOOTLOADER_REBOOT_TIME,\n device.reboot(\"bootloader\", true, onReconnect)\n );\n }\n\n // 7. Custom AVB key\n entry = entries.find((e) => e.filename.endsWith(\"avb_pkmd.bin\"));\n if (entry !== undefined) {\n await device.runCommand(\"erase:avb_custom_key\");\n await flashEntryBlob(device, entry, onProgress, \"avb_custom_key\");\n }\n\n // 8. Wipe userdata\n if (wipe) {\n await common.runWithTimedProgress(\n onProgress,\n \"wipe\",\n \"data\",\n USERDATA_ERASE_TIME,\n device.runCommand(\"erase:userdata\")\n );\n }\n}\n","import * as Sparse from \"./sparse\";\nimport * as common from \"./common\";\nimport {\n FactoryProgressCallback,\n flashZip as flashFactoryZip,\n} from \"./factory\";\n\nconst FASTBOOT_USB_CLASS = 0xff;\nconst FASTBOOT_USB_SUBCLASS = 0x42;\nconst FASTBOOT_USB_PROTOCOL = 0x03;\n\nconst BULK_TRANSFER_SIZE = 16384;\n\nconst DEFAULT_DOWNLOAD_SIZE = 512 * 1024 * 1024; // 512 MiB\n// To conserve RAM and work around Chromium's ~2 GiB size limit, we limit the\n// max download size even if the bootloader can accept more data.\nconst MAX_DOWNLOAD_SIZE = 1024 * 1024 * 1024; // 1 GiB\n\nconst GETVAR_TIMEOUT = 10000; // ms\n\n/**\n * Exception class for USB errors not directly thrown by WebUSB.\n */\nexport class UsbError extends Error {\n constructor(message: string) {\n super(message);\n this.name = \"UsbError\";\n }\n}\n\n/**\n * Exception class for errors returned by the bootloader, as well as high-level\n * fastboot errors resulting from bootloader responses.\n */\nexport class FastbootError extends Error {\n status: string;\n bootloaderMessage: string;\n\n constructor(status: string, message: string) {\n super(`Bootloader replied with ${status}: ${message}`);\n this.status = status;\n this.bootloaderMessage = message;\n this.name = \"FastbootError\";\n }\n}\n\ninterface CommandResponse {\n text: string;\n // hex string from DATA\n dataSize?: string;\n}\n\n/**\n * Callback for progress updates while flashing or uploading an image.\n *\n * @callback FlashProgressCallback\n * @param {number} progress - Progress for the current action, between 0 and 1.\n */\nexport type FlashProgressCallback = (progress: number) => void;\n\n/**\n * Callback for reconnecting to the USB device.\n * This is necessary because some platforms do not support automatic reconnection,\n * and USB connection requests can only be triggered as the result of explicit\n * user action.\n *\n * @callback ReconnectCallback\n */\nexport type ReconnectCallback = () => void;\n\n/**\n * This class is a client for executing fastboot commands and operations on a\n * device connected over USB.\n */\nexport class FastbootDevice {\n device: USBDevice | null;\n epIn: number | null;\n epOut: number | null;\n\n private _registeredUsbListeners: boolean;\n private _connectResolve: ((value: any) => void) | null;\n private _connectReject: ((err: unknown) => void) | null;\n private _disconnectResolve: ((value: any) => void) | null;\n\n /**\n * Create a new fastboot device instance. This doesn't actually connect to\n * any USB devices; call {@link connect} to do so.\n */\n constructor() {\n this.device = null;\n this.epIn = null;\n this.epOut = null;\n\n this._registeredUsbListeners = false;\n this._connectResolve = null;\n this._connectReject = null;\n this._disconnectResolve = null;\n }\n\n /**\n * Returns whether a USB device is connected and ready for use.\n */\n get isConnected() {\n return (\n this.device !== null &&\n this.device.opened &&\n this.device.configurations[0].interfaces[0].claimed\n );\n }\n\n /**\n * Validate the current USB device's details and connect to it.\n *\n * @private\n */\n private async _validateAndConnectDevice() {\n if (this.device === null) {\n throw new UsbError(\"Attempted to connect to null device\");\n }\n\n // Validate device\n let ife = this.device!.configurations[0].interfaces[0].alternates[0];\n if (ife.endpoints.length !== 2) {\n throw new UsbError(\"Interface has wrong number of endpoints\");\n }\n\n this.epIn = null;\n this.epOut = null;\n for (let endpoint of ife.endpoints) {\n common.logVerbose(\"Checking endpoint:\", endpoint);\n if (endpoint.type !== \"bulk\") {\n throw new UsbError(\"Interface endpoint is not bulk\");\n }\n\n if (endpoint.direction === \"in\") {\n if (this.epIn === null) {\n this.epIn = endpoint.endpointNumber;\n } else {\n throw new UsbError(\"Interface has multiple IN endpoints\");\n }\n } else if (endpoint.direction === \"out\") {\n if (this.epOut === null) {\n this.epOut = endpoint.endpointNumber;\n } else {\n throw new UsbError(\"Interface has multiple OUT endpoints\");\n }\n }\n }\n common.logVerbose(\"Endpoints: in =\", this.epIn, \", out =\", this.epOut);\n\n try {\n await this.device!.open();\n // Opportunistically reset to fix issues on some platforms\n try {\n await this.device!.reset();\n } catch (error) {\n /* Failed = doesn't support reset */\n }\n\n await this.device!.selectConfiguration(1);\n await this.device!.claimInterface(0); // fastboot\n } catch (error) {\n // Propagate exception from waitForConnect()\n if (this._connectReject !== null) {\n this._connectReject(error);\n this._connectResolve = null;\n this._connectReject = null;\n }\n\n throw error;\n }\n\n // Return from waitForConnect()\n if (this._connectResolve !== null) {\n this._connectResolve(undefined);\n this._connectResolve = null;\n this._connectReject = null;\n }\n }\n\n /**\n * Wait for the current USB device to disconnect, if it's still connected.\n * Returns immediately if no device is connected.\n */\n async waitForDisconnect() {\n if (this.device === null) {\n return;\n }\n\n return await new Promise((resolve, _reject) => {\n this._disconnectResolve = resolve;\n });\n }\n\n /**\n * Wait for the USB device to connect. Returns at the next connection,\n * regardless of whether the connected USB device matches the previous one.\n *\n * @param {ReconnectCallback} onReconnect - Callback to request device reconnection on Android.\n */\n async waitForConnect(onReconnect: ReconnectCallback = () => {}) {\n // On Android, we need to request the user to reconnect the device manually\n // because there is no support for automatic reconnection.\n if (navigator.userAgent.includes(\"Android\")) {\n await this.waitForDisconnect();\n onReconnect();\n }\n\n return await new Promise((resolve, reject) => {\n this._connectResolve = resolve;\n this._connectReject = reject;\n });\n }\n\n /**\n * Request the user to select a USB device and connect to it using the\n * fastboot protocol.\n *\n * @throws {UsbError}\n */\n async connect() {\n let devices = await navigator.usb.getDevices();\n common.logDebug(\"Found paired USB devices:\", devices);\n if (devices.length === 1) {\n this.device = devices[0];\n } else {\n // If multiple paired devices are connected, request the user to\n // select a specific one to reduce ambiguity. This is also necessary\n // if no devices are already paired, i.e. first use.\n common.logDebug(\n \"No or multiple paired devices are connected, requesting one\"\n );\n this.device = await navigator.usb.requestDevice({\n filters: [\n {\n classCode: FASTBOOT_USB_CLASS,\n subclassCode: FASTBOOT_USB_SUBCLASS,\n protocolCode: FASTBOOT_USB_PROTOCOL,\n },\n ],\n });\n }\n common.logDebug(\"Using USB device:\", this.device);\n\n if (!this._registeredUsbListeners) {\n navigator.usb.addEventListener(\"disconnect\", (event) => {\n if (event.device === this.device) {\n common.logDebug(\"USB device disconnected\");\n if (this._disconnectResolve !== null) {\n this._disconnectResolve(undefined);\n this._disconnectResolve = null;\n }\n }\n });\n\n navigator.usb.addEventListener(\"connect\", async (event) => {\n common.logDebug(\"USB device connected\");\n this.device = event.device;\n\n // Check whether waitForConnect() is pending and save it for later\n let hasPromiseReject = this._connectReject !== null;\n try {\n await this._validateAndConnectDevice();\n } catch (error) {\n // Only rethrow errors from the event handler if waitForConnect()\n // didn't already handle them\n if (!hasPromiseReject) {\n throw error;\n }\n }\n });\n\n this._registeredUsbListeners = true;\n }\n\n await this._validateAndConnectDevice();\n }\n\n /**\n * Read a raw command response from the bootloader.\n *\n * @private\n * @returns {Promise} Object containing response text and data size, if any.\n * @throws {FastbootError}\n */\n private async _readResponse(): Promise {\n let respData = {\n text: \"\",\n } as CommandResponse;\n let respStatus;\n\n do {\n let respPacket = await this.device!.transferIn(this.epIn!, 64);\n let response = new TextDecoder().decode(respPacket.data);\n\n respStatus = response.substring(0, 4);\n let respMessage = response.substring(4);\n common.logDebug(`Response: ${respStatus} ${respMessage}`);\n\n if (respStatus === \"OKAY\") {\n // OKAY = end of response for this command\n respData.text += respMessage;\n } else if (respStatus === \"INFO\") {\n // INFO = additional info line\n respData.text += respMessage + \"\\n\";\n } else if (respStatus === \"DATA\") {\n // DATA = hex string, but it's returned separately for safety\n respData.dataSize = respMessage;\n } else {\n // Assume FAIL or garbage data\n throw new FastbootError(respStatus, respMessage);\n }\n // INFO = more packets are coming\n } while (respStatus === \"INFO\");\n\n return respData;\n }\n\n /**\n * Send a textual command to the bootloader and read the response.\n * This is in raw fastboot format, not AOSP fastboot syntax.\n *\n * @param {string} command - The command to send.\n * @returns {Promise} Object containing response text and data size, if any.\n * @throws {FastbootError}\n */\n async runCommand(command: string): Promise {\n // Command and response length is always 64 bytes regardless of protocol\n if (command.length > 64) {\n throw new RangeError();\n }\n\n // Send raw UTF-8 command\n let cmdPacket = new TextEncoder().encode(command);\n await this.device!.transferOut(this.epOut!, cmdPacket);\n common.logDebug(\"Command:\", command);\n\n return this._readResponse();\n }\n\n /**\n * Read the value of a bootloader variable. Returns undefined if the variable\n * does not exist.\n *\n * @param {string} varName - The name of the variable to get.\n * @returns {Promise} Textual content of the variable.\n * @throws {FastbootError}\n */\n async getVariable(varName: string): Promise {\n let resp;\n try {\n resp = (\n await common.runWithTimeout(\n this.runCommand(`getvar:${varName}`),\n GETVAR_TIMEOUT\n )\n ).text;\n } catch (error) {\n // Some bootloaders return FAIL instead of empty responses, despite\n // what the spec says. Normalize it here.\n if (error instanceof FastbootError && error.status == \"FAIL\") {\n resp = null;\n } else {\n throw error;\n }\n }\n\n // Some bootloaders send whitespace around some variables.\n // According to the spec, non-existent variables should return empty\n // responses\n return resp ? resp.trim() : null;\n }\n\n /**\n * Get the maximum download size for a single payload, in bytes.\n *\n * @private\n * @returns {Promise}\n * @throws {FastbootError}\n */\n private async _getDownloadSize(): Promise {\n try {\n let resp = (await this.getVariable(\n \"max-download-size\"\n ))!.toLowerCase();\n if (resp) {\n // AOSP fastboot requires hex\n return Math.min(parseInt(resp, 16), MAX_DOWNLOAD_SIZE);\n }\n } catch (error) {\n /* Failed = no value, fallthrough */\n }\n\n // FAIL or empty variable means no max, set a reasonable limit to conserve memory\n return DEFAULT_DOWNLOAD_SIZE;\n }\n\n /**\n * Send a raw data payload to the bootloader.\n *\n * @private\n */\n private async _sendRawPayload(\n buffer: ArrayBuffer,\n onProgress: FlashProgressCallback\n ) {\n let i = 0;\n let remainingBytes = buffer.byteLength;\n while (remainingBytes > 0) {\n let chunk = buffer.slice(\n i * BULK_TRANSFER_SIZE,\n (i + 1) * BULK_TRANSFER_SIZE\n );\n if (i % 1000 === 0) {\n common.logVerbose(\n ` Sending ${chunk.byteLength} bytes to endpoint, ${remainingBytes} remaining, i=${i}`\n );\n }\n if (i % 10 === 0) {\n onProgress(\n (buffer.byteLength - remainingBytes) / buffer.byteLength\n );\n }\n\n await this.device!.transferOut(this.epOut!, chunk);\n\n remainingBytes -= chunk.byteLength;\n i += 1;\n }\n\n onProgress(1.0);\n }\n\n /**\n * Upload a payload to the bootloader for later use, e.g. flashing.\n * Does not handle raw images, flashing, or splitting.\n *\n * @param {string} partition - Name of the partition the payload is intended for.\n * @param {ArrayBuffer} buffer - Buffer containing the data to upload.\n * @param {FlashProgressCallback} onProgress - Callback for upload progress updates.\n * @throws {FastbootError}\n */\n async upload(\n partition: string,\n buffer: ArrayBuffer,\n onProgress: FlashProgressCallback = (_progress) => {}\n ) {\n common.logDebug(\n `Uploading single sparse to ${partition}: ${buffer.byteLength} bytes`\n );\n\n // Bootloader requires an 8-digit hex number\n let xferHex = buffer.byteLength.toString(16).padStart(8, \"0\");\n if (xferHex.length !== 8) {\n throw new FastbootError(\n \"FAIL\",\n `Transfer size overflow: ${xferHex} is more than 8 digits`\n );\n }\n\n // Check with the device and make sure size matches\n let downloadResp = await this.runCommand(`download:${xferHex}`);\n if (downloadResp.dataSize === undefined) {\n throw new FastbootError(\n \"FAIL\",\n `Unexpected response to download command: ${downloadResp.text}`\n );\n }\n let downloadSize = parseInt(downloadResp.dataSize!, 16);\n if (downloadSize !== buffer.byteLength) {\n throw new FastbootError(\n \"FAIL\",\n `Bootloader wants ${buffer.byteLength} bytes, requested to send ${buffer.byteLength} bytes`\n );\n }\n\n common.logDebug(`Sending payload: ${buffer.byteLength} bytes`);\n await this._sendRawPayload(buffer, onProgress);\n\n common.logDebug(\"Payload sent, waiting for response...\");\n await this._readResponse();\n }\n\n /**\n * Reboot to the given target, and optionally wait for the device to\n * reconnect.\n *\n * @param {string} target - Where to reboot to, i.e. fastboot or bootloader.\n * @param {boolean} wait - Whether to wait for the device to reconnect.\n * @param {ReconnectCallback} onReconnect - Callback to request device reconnection, if wait is enabled.\n */\n async reboot(\n target: string = \"\",\n wait: boolean = false,\n onReconnect: ReconnectCallback = () => {}\n ) {\n if (target.length > 0) {\n await this.runCommand(`reboot-${target}`);\n } else {\n await this.runCommand(\"reboot\");\n }\n\n if (wait) {\n await this.waitForConnect(onReconnect);\n }\n }\n\n /**\n * Flash the given Blob to the given partition on the device. Any image\n * format supported by the bootloader is allowed, e.g. sparse or raw images.\n * Large raw images will be converted to sparse images automatically, and\n * large sparse images will be split and flashed in multiple passes\n * depending on the bootloader's payload size limit.\n *\n * @param {string} partition - The name of the partition to flash.\n * @param {Blob} blob - The Blob to retrieve data from.\n * @param {FlashProgressCallback} onProgress - Callback for flashing progress updates.\n * @throws {FastbootError}\n */\n async flashBlob(\n partition: string,\n blob: Blob,\n onProgress: FlashProgressCallback = (_progress) => {}\n ) {\n // Use current slot if partition is A/B\n if ((await this.getVariable(`has-slot:${partition}`)) === \"yes\") {\n partition += \"_\" + (await this.getVariable(\"current-slot\"));\n }\n\n let maxDlSize = await this._getDownloadSize();\n let fileHeader = await common.readBlobAsBuffer(\n blob.slice(0, Sparse.FILE_HEADER_SIZE)\n );\n\n let totalBytes = blob.size;\n let isSparse = false;\n try {\n let sparseHeader = Sparse.parseFileHeader(fileHeader);\n if (sparseHeader !== null) {\n totalBytes = sparseHeader.blocks * sparseHeader.blockSize;\n isSparse = true;\n }\n } catch (error) {\n // ImageError = invalid, so keep blob.size\n }\n\n // Logical partitions need to be resized before flashing because they're\n // sized perfectly to the payload.\n if ((await this.getVariable(`is-logical:${partition}`)) === \"yes\") {\n // As per AOSP fastboot, we reset the partition to 0 bytes first\n // to optimize extent allocation.\n await this.runCommand(`resize-logical-partition:${partition}:0`);\n // Set the actual size\n await this.runCommand(\n `resize-logical-partition:${partition}:${totalBytes}`\n );\n }\n\n // Convert image to sparse (for splitting) if it exceeds the size limit\n if (blob.size > maxDlSize && !isSparse) {\n common.logDebug(`${partition} image is raw, converting to sparse`);\n blob = await Sparse.fromRaw(blob);\n }\n\n common.logDebug(\n `Flashing ${blob.size} bytes to ${partition}, ${maxDlSize} bytes per split`\n );\n let splits = 0;\n let sentBytes = 0;\n for await (let split of Sparse.splitBlob(blob, maxDlSize)) {\n await this.upload(partition, split.data, (progress) => {\n onProgress((sentBytes + progress * split.bytes) / totalBytes);\n });\n\n common.logDebug(\"Flashing payload...\");\n await this.runCommand(`flash:${partition}`);\n\n splits += 1;\n sentBytes += split.bytes;\n }\n\n common.logDebug(`Flashed ${partition} with ${splits} split(s)`);\n }\n\n /**\n * Boot the given Blob on the device.\n * Equivalent to `fastboot boot boot.img`.\n *\n * @param {Blob} blob - The Blob to retrieve data from.\n * @param {FlashProgressCallback} onProgress - Callback for flashing progress updates.\n * @throws {FastbootError}\n */\n async bootBlob(\n blob: Blob,\n onProgress: FlashProgressCallback = (_progress) => {}\n ) {\n\n common.logDebug(`Booting ${blob.size} bytes image`);\n\n let data = await common.readBlobAsBuffer(blob);\n await this.upload(\"boot.img\", data, onProgress);\n\n common.logDebug(\"Booting payload...\");\n await this.runCommand(\"boot\");\n\n common.logDebug(`Booted ${blob.size} bytes image`);\n }\n\n /**\n * Flash the given factory images zip onto the device, with automatic handling\n * of firmware, system, and logical partitions as AOSP fastboot and\n * flash-all.sh would do.\n * Equivalent to `fastboot update name.zip`.\n *\n * @param {Blob} blob - Blob containing the zip file to flash.\n * @param {boolean} wipe - Whether to wipe super and userdata. Equivalent to `fastboot -w`.\n * @param {ReconnectCallback} onReconnect - Callback to request device reconnection.\n * @param {FactoryProgressCallback} onProgress - Progress callback for image flashing.\n */\n async flashFactoryZip(\n blob: Blob,\n wipe: boolean,\n onReconnect: ReconnectCallback,\n onProgress: FactoryProgressCallback = (_progress) => {}\n ) {\n return await flashFactoryZip(this, blob, wipe, onReconnect, onProgress);\n }\n}\n"],"names":["common.readBlobAsBuffer","common.logDebug","common.logVerbose","MAX_BITS","Z_NO_FLUSH","Z_FINISH","Z_OK","Z_STREAM_END","Z_NEED_DICT","Z_STREAM_ERROR","Z_DATA_ERROR","Z_BUF_ERROR","STORED","PRESET_DICT","Z_DEFLATED","ZStream","UNDEFINED_TYPE","FUNCTION_TYPE","table","createKeys","runWorker","configureWebWorker","Deflate","Inflate","common.zipGetData","common.runWithTimedProgress","common.runWithTimeout","Sparse.FILE_HEADER_SIZE","Sparse.parseFileHeader","Sparse.fromRaw","Sparse.splitBlob","flashFactoryZip"],"mappings":";;AAGA,MAAM,6BAA6B,GAAG,EAAE,CAAC;AAEzC,IAAY,UAIX,CAAA;AAJD,CAAA,UAAY,UAAU,EAAA;AAClB,IAAA,UAAA,CAAA,UAAA,CAAA,QAAA,CAAA,GAAA,CAAA,CAAA,GAAA,QAAU,CAAA;AACV,IAAA,UAAA,CAAA,UAAA,CAAA,OAAA,CAAA,GAAA,CAAA,CAAA,GAAA,OAAK,CAAA;AACL,IAAA,UAAA,CAAA,UAAA,C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C,UAAU,CAAC,MAAM,CAAC,CAAC;QAE9BA,QAAe,CAAC,CAAA,OAAA,EAAU,IAAI,CAAC,IAAI,CAAc,YAAA,CAAA,CAAC,CAAC;KACtD;AAED;;;;;;;;;;AAUG;AACH,IAAA,MAAM,eAAe,CACjB,IAAU,EACV,IAAa,EACb,WAA8B,EAC9B,aAAsC,CAAC,SAAS,QAAO,EAAA;AAEvD,QAAA,OAAO,MAAM8B,QAAe,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,WAAW,EAAE,UAAU,CAAC,CAAC;KAC3E;AACJ;;;;;;;;;;","x_google_ignoreList":[2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]} \ No newline at end of file diff --git a/dist/fastboot.min.cjs b/dist/fastboot.min.cjs deleted file mode 100644 index e9cd97d..0000000 --- a/dist/fastboot.min.cjs +++ /dev/null @@ -1,2 +0,0 @@ -"use strict";var e;!function(e){e[e.Silent=0]="Silent",e[e.Debug=1]="Debug",e[e.Verbose=2]="Verbose"}(e||(e={}));let t=e.Silent;function n(...e){t>=1&&console.log(...e)}function i(...e){t>=2&&console.log(...e)}function r(e){return new Promise(((t,n)=>{let i=new FileReader;i.onload=()=>{t(i.result)},i.onerror=()=>{n(i.error)},i.readAsArrayBuffer(e)}))}async function s(e,t,n,i,r){let s=(new Date).getTime(),a=!1;e(t,n,0);let o=(async()=>{let r,o=s+i;do{r=(new Date).getTime(),e(t,n,(r-s)/i),await new Promise(((e,t)=>{window.requestAnimationFrame(e)}))}while(!a&&re.blocks)).reduce(((e,t)=>e+t),0)}async function b(e,t){let n=new h,i=new ArrayBuffer(f),s=new DataView(i),a=new Uint8Array(i);s.setUint32(0,c,!0),s.setUint16(4,l,!0),s.setUint16(6,d,!0),s.setUint16(8,f,!0),s.setUint16(10,u,!0),s.setUint32(12,e.blockSize,!0),s.setUint32(16,e.blocks,!0),s.setUint32(20,t.length,!0),s.setUint32(24,0,!0),n.append(new Blob([i]));for(let e of t){i=new ArrayBuffer(u+e.data.size),s=new DataView(i),a=new Uint8Array(i),s.setUint16(0,e.type,!0),s.setUint16(2,0,!0),s.setUint32(4,e.blocks,!0),s.setUint32(8,u+e.data.size,!0);let t=new Uint8Array(await r(e.data));a.set(t,u),n.append(new Blob([i]))}return n.getBlob()}const v=15,y=256,_=573,k=256,S=-1,z=0,C=4,A=0,U=1,W=-2,j=-5;function q(e){return F(e.map((([e,t])=>new Array(e).fill(t,0,e))))}function F(e){return e.reduce(((e,t)=>e.concat(Array.isArray(t)?F(t):t)),[])}const D=[0,1,2,3].concat(...q([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function E(){const e=this;function t(e,t){let n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1}e.build_tree=function(n){const i=e.dyn_tree,r=e.stat_desc.static_tree,s=e.stat_desc.elems;let a,o,c,l=-1;for(n.heap_len=0,n.heap_max=_,a=0;a=1;a--)n.pqdownheap(i,a);c=s;do{a=n.heap[1],n.heap[1]=n.heap[n.heap_len--],n.pqdownheap(i,1),o=n.heap[1],n.heap[--n.heap_max]=a,n.heap[--n.heap_max]=o,i[2*c]=i[2*a]+i[2*o],n.depth[c]=Math.max(n.depth[a],n.depth[o])+1,i[2*a+1]=i[2*o+1]=c,n.heap[1]=c++,n.pqdownheap(i,1)}while(n.heap_len>=2);n.heap[--n.heap_max]=n.heap[1],function(t){const n=e.dyn_tree,i=e.stat_desc.static_tree,r=e.stat_desc.extra_bits,s=e.stat_desc.extra_base,a=e.stat_desc.max_length;let o,c,l,d,f,u,m=0;for(d=0;d<=v;d++)t.bl_count[d]=0;for(n[2*t.heap[t.heap_max]+1]=0,o=t.heap_max+1;o<_;o++)c=t.heap[o],d=n[2*n[2*c+1]+1]+1,d>a&&(d=a,m++),n[2*c+1]=d,c>e.max_code||(t.bl_count[d]++,f=0,c>=s&&(f=r[c-s]),u=n[2*c],t.opt_len+=u*(d+f),i&&(t.static_len+=u*(i[2*c+1]+f)));if(0!==m){do{for(d=a-1;0===t.bl_count[d];)d--;t.bl_count[d]--,t.bl_count[d+1]+=2,t.bl_count[a]--,m-=2}while(m>0);for(d=a;0!==d;d--)for(c=t.bl_count[d];0!==c;)l=t.heap[--o],l>e.max_code||(n[2*l+1]!=d&&(t.opt_len+=(d-n[2*l+1])*n[2*l],n[2*l+1]=d),c--)}}(n),function(e,n,i){const r=[];let s,a,o,c=0;for(s=1;s<=v;s++)r[s]=c=c+i[s-1]<<1;for(a=0;a<=n;a++)o=e[2*a+1],0!==o&&(e[2*a]=t(r[o]++,o))}(i,e.max_code,n.bl_count)}}function L(e,t,n,i,r){const s=this;s.static_tree=e,s.extra_bits=t,s.extra_base=n,s.elems=i,s.max_length=r}E._length_code=[0,1,2,3,4,5,6,7].concat(...q([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]])),E.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],E.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],E.d_code=function(e){return e<256?D[e]:D[256+(e>>>7)]},E.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],E.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],E.extra_blbits=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],E.bl_order=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];const R=q([[144,8],[112,9],[24,7],[8,8]]);L.static_ltree=F([12,140,76,204,44,172,108,236,28,156,92,220,60,188,124,252,2,130,66,194,34,162,98,226,18,146,82,210,50,178,114,242,10,138,74,202,42,170,106,234,26,154,90,218,58,186,122,250,6,134,70,198,38,166,102,230,22,150,86,214,54,182,118,246,14,142,78,206,46,174,110,238,30,158,94,222,62,190,126,254,1,129,65,193,33,161,97,225,17,145,81,209,49,177,113,241,9,137,73,201,41,169,105,233,25,153,89,217,57,185,121,249,5,133,69,197,37,165,101,229,21,149,85,213,53,181,117,245,13,141,77,205,45,173,109,237,29,157,93,221,61,189,125,253,19,275,147,403,83,339,211,467,51,307,179,435,115,371,243,499,11,267,139,395,75,331,203,459,43,299,171,427,107,363,235,491,27,283,155,411,91,347,219,475,59,315,187,443,123,379,251,507,7,263,135,391,71,327,199,455,39,295,167,423,103,359,231,487,23,279,151,407,87,343,215,471,55,311,183,439,119,375,247,503,15,271,143,399,79,335,207,463,47,303,175,431,111,367,239,495,31,287,159,415,95,351,223,479,63,319,191,447,127,383,255,511,0,64,32,96,16,80,48,112,8,72,40,104,24,88,56,120,4,68,36,100,20,84,52,116,3,131,67,195,35,163,99,227].map(((e,t)=>[e,R[t]])));const I=q([[30,5]]);L.static_dtree=F([0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30,1,17,9,25,5,21,13,29,3,19,11,27,7,23].map(((e,t)=>[e,I[t]]))),L.static_l_desc=new L(L.static_ltree,E.extra_lbits,257,286,v),L.static_d_desc=new L(L.static_dtree,E.extra_dbits,0,30,v),L.static_bl_desc=new L(null,E.extra_blbits,0,19,7);function T(e,t,n,i,r){const s=this;s.good_length=e,s.max_lazy=t,s.nice_length=n,s.max_chain=i,s.func=r}const $=[new T(0,0,0,0,0),new T(4,4,8,4,1),new T(4,5,16,8,1),new T(4,6,32,32,1),new T(4,4,16,16,2),new T(8,16,32,32,2),new T(8,16,128,128,2),new T(8,32,128,256,2),new T(32,128,258,1024,2),new T(32,258,258,4096,2)],O=["need dictionary","stream end","","","stream error","data error","","buffer error","",""],B=113,V=666,M=258,K=262;function P(e,t,n,i){const r=e[2*t],s=e[2*n];return r>>8&255)}function fe(e,t){let n;const i=t;ae>16-i?(n=e,se|=n<>>16-ae,ae+=i-16):(se|=e<=8&&(le(255&se),se>>>=8,ae-=8)}function he(t,n){let i,r,s;if(e.dist_buf[ne]=t,e.lc_buf[ne]=255&n,ne++,0===t?H[2*n]++:(ie++,t--,H[2*(E._length_code[n]+y+1)]++,Z[2*E.d_code(t)]++),0==(8191&ne)&&T>2){for(i=8*ne,r=_-x,s=0;s<30;s++)i+=Z[2*s]*(5+E.extra_dbits[s]);if(i>>>=3,ie8?de(se):ae>0&&le(255&se),se=0,ae=0}function ge(t,n,i){fe(0+(i?1:0),3),function(t,n,i){xe(),re=8,i&&(de(n),de(~n)),e.pending_buf.set(c.subarray(t,t+n),e.pending),e.pending+=n}(t,n,!0)}function be(t,n,i){let r,s,a=0;T>0?(J.build_tree(e),Q.build_tree(e),a=function(){let t;for(ce(H,J.max_code),ce(Z,Q.max_code),ee.build_tree(e),t=18;t>=3&&0===G[2*E.bl_order[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(),r=e.opt_len+3+7>>>3,s=e.static_len+3+7>>>3,s<=r&&(r=s)):r=s=n+5,n+4<=r&&-1!=t?ge(t,n,i):s==r?(fe(2+(i?1:0),3),we(L.static_ltree,L.static_dtree)):(fe(4+(i?1:0),3),function(e,t,n){let i;for(fe(e-257,5),fe(t-1,5),fe(n-4,4),i=0;i=0?x:-1,_-x,e),x=_,t.flush_pending()}function ye(){let e,n,i,r;do{if(r=l-F-_,0===r&&0===_&&0===F)r=s;else if(-1==r)r--;else if(_>=s+s-K){c.set(c.subarray(s,s+s),0),q-=s,_-=s,x-=s,e=m,i=e;do{n=65535&f[--i],f[i]=n>=s?n-s:0}while(0!=--e);e=s,i=e;do{n=65535&d[--i],d[i]=n>=s?n-s:0}while(0!=--e);r+=s}if(0===t.avail_in)return;e=t.read_buf(c,_+F,r),F+=e,F>=3&&(u=255&c[_],u=(u<s-K?_-(s-K):0;let f=X;const u=o,m=_+M;let p=c[r+a-1],h=c[r+a];D>=Y&&(i>>=2),f>F&&(f=F);do{if(t=e,c[t+a]==h&&c[t+a-1]==p&&c[t]==c[r]&&c[++t]==c[r+1]){r+=2,t++;do{}while(c[++r]==c[++t]&&c[++r]==c[++t]&&c[++r]==c[++t]&&c[++r]==c[++t]&&c[++r]==c[++t]&&c[++r]==c[++t]&&c[++r]==c[++t]&&c[++r]==c[++t]&&ra){if(q=e,a=n,n>=f)break;p=c[r+a-1],h=c[r+a]}}}while((e=65535&d[e&u])>l&&0!=--i);return a<=F?a:F}function ke(t){return t.total_in=t.total_out=0,t.msg=null,e.pending=0,e.pending_out=0,n=B,r=z,J.dyn_tree=H,J.stat_desc=L.static_l_desc,Q.dyn_tree=Z,Q.stat_desc=L.static_d_desc,ee.dyn_tree=G,ee.stat_desc=L.static_bl_desc,se=0,ae=0,re=8,oe(),function(){l=2*s,f[m-1]=0;for(let e=0;e9||8!=l||r<9||r>15||n<0||n>9||x<0||x>2?W:(t.dstate=e,a=r,s=1<9||n<0||n>2?W:($[T].func!=$[t].func&&0!==e.total_in&&(i=e.deflate(1)),T!=t&&(T=t,I=$[T].max_lazy,Y=$[T].good_length,X=$[T].nice_length,R=$[T].max_chain),N=n,i)},e.deflateSetDictionary=function(e,t,i){let r,a=i,l=0;if(!t||42!=n)return W;if(a<3)return A;for(a>s-K&&(a=s-K,l=i-a),c.set(t.subarray(l,l+a),0),_=a,x=a,u=255&c[0],u=(u<C||p<0)return W;if(!l.next_out||!l.next_in&&0!==l.avail_in||n==V&&p!=C)return l.msg=O[2-W],W;if(0===l.avail_out)return l.msg=O[7],j;var P;if(t=l,R=r,r=p,42==n&&(S=8+(a-8<<4)<<8,E=(T-1&255)>>1,E>3&&(E=3),S|=E<<6,0!==_&&(S|=32),S+=31-S%31,n=B,le((P=S)>>8&255),le(255&P)),0!==e.pending){if(t.flush_pending(),0===t.avail_out)return r=-1,A}else if(0===t.avail_in&&p<=R&&p!=C)return t.msg=O[7],j;if(n==V&&0!==t.avail_in)return l.msg=O[7],j;if(0!==t.avail_in||0!==F||p!=z&&n!=V){switch(M=-1,$[T].func){case 0:M=function(e){let n,r=65535;for(r>i-5&&(r=i-5);;){if(F<=1){if(ye(),0===F&&e==z)return 0;if(0===F)break}if(_+=F,F=0,n=x+r,(0===_||_>=n)&&(F=_-n,_=n,ve(!1),0===t.avail_out))return 0;if(_-x>=s-K&&(ve(!1),0===t.avail_out))return 0}return ve(e==C),0===t.avail_out?e==C?2:0:e==C?3:1}(p);break;case 1:M=function(e){let n,i=0;for(;;){if(F=3&&(u=(u<=3)if(n=he(_-q,g-3),F-=g,g<=I&&F>=3){g--;do{_++,u=(u<=3&&(u=(u<4096)&&(g=2)),D>=3&&g<=D){i=_+F-3,n=he(_-1-b,D-3),F-=D-1,D-=2;do{++_<=i&&(u=(u<n&&(r=n),0===r?0:(i.avail_in-=r,e.set(i.next_in.subarray(i.next_in_index,i.next_in_index+r),t),i.next_in_index+=r,i.total_in+=r,r)},flush_pending(){const e=this;let t=e.dstate.pending;t>e.avail_out&&(t=e.avail_out),0!==t&&(e.next_out.set(e.dstate.pending_buf.subarray(e.dstate.pending_out,e.dstate.pending_out+t),e.next_out_index),e.next_out_index+=t,e.dstate.pending_out+=t,e.total_out+=t,e.avail_out-=t,e.dstate.pending-=t,0===e.dstate.pending&&(e.dstate.pending_out=0))}};const X=0,H=1,Z=-2,G=-3,J=-4,Q=-5,ee=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],te=1440,ne=[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],ie=[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],re=[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],se=[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],ae=[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],oe=[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],ce=15;function le(){let e,t,n,i,r,s;function a(e,t,a,o,c,l,d,f,u,m,p){let h,w,x,g,b,v,y,_,k,S,z,C,A,U,W;S=0,b=a;do{n[e[t+S]]++,S++,b--}while(0!==b);if(n[0]==a)return d[0]=-1,f[0]=0,X;for(_=f[0],v=1;v<=ce&&0===n[v];v++);for(y=v,_b&&(_=b),f[0]=_,U=1<C+_;){if(g++,C+=_,W=x-C,W=W>_?_:W,(w=1<<(v=y-C))>h+1&&(w-=h+1,A=y,vte)return G;r[g]=z=m[0],m[0]+=W,0!==g?(s[g]=b,i[0]=v,i[1]=_,v=b>>>C-_,i[2]=z-r[g-1]-v,u.set(i,3*(r[g-1]+v))):d[0]=z}for(i[1]=y-C,S>=a?i[0]=192:p[S]>>C;v>>=1)b^=v;for(b^=v,k=(1<257?(m==G?u.msg="oversubscribed distance tree":m==Q?(u.msg="incomplete distance tree",m=G):m!=J&&(u.msg="empty distance tree with lengths",m=G),m):X)}}le.inflate_trees_fixed=function(e,t,n,i){return e[0]=9,t[0]=5,n[0]=ne,i[0]=ie,X};const de=0,fe=1,ue=2,me=3,pe=4,he=5,we=6,xe=7,ge=8,be=9;function ve(){const e=this;let t,n,i,r,s=0,a=0,o=0,c=0,l=0,d=0,f=0,u=0,m=0,p=0;function h(e,t,n,i,r,s,a,o){let c,l,d,f,u,m,p,h,w,x,g,b,v,y,_,k;p=o.next_in_index,h=o.avail_in,u=a.bitb,m=a.bitk,w=a.write,x=w>=l[k+1],m-=l[k+1],0!=(16&f)){for(f&=15,v=l[k+2]+(u&ee[f]),u>>=f,m-=f;m<15;)h--,u|=(255&o.read_byte(p++))<>=l[k+1],m-=l[k+1],0!=(16&f)){for(f&=15;m>=f,m-=f,x-=v,w>=y)_=w-y,w-_>0&&2>w-_?(a.win[w++]=a.win[_++],a.win[w++]=a.win[_++],v-=2):(a.win.set(a.win.subarray(_,_+2),w),w+=2,_+=2,v-=2);else{_=w-y;do{_+=a.end}while(_<0);if(f=a.end-_,v>f){if(v-=f,w-_>0&&f>w-_)do{a.win[w++]=a.win[_++]}while(0!=--f);else a.win.set(a.win.subarray(_,_+f),w),w+=f,_+=f,f=0;_=0}}if(w-_>0&&v>w-_)do{a.win[w++]=a.win[_++]}while(0!=--v);else a.win.set(a.win.subarray(_,_+v),w),w+=v,_+=v,v=0;break}if(0!=(64&f))return o.msg="invalid distance code",v=o.avail_in-h,v=m>>3>3:v,h+=v,p-=v,m-=v<<3,a.bitb=u,a.bitk=m,o.avail_in=h,o.total_in+=p-o.next_in_index,o.next_in_index=p,a.write=w,G;c+=l[k+2],c+=u&ee[f],k=3*(d+c),f=l[k]}break}if(0!=(64&f))return 0!=(32&f)?(v=o.avail_in-h,v=m>>3>3:v,h+=v,p-=v,m-=v<<3,a.bitb=u,a.bitk=m,o.avail_in=h,o.total_in+=p-o.next_in_index,o.next_in_index=p,a.write=w,H):(o.msg="invalid literal/length code",v=o.avail_in-h,v=m>>3>3:v,h+=v,p-=v,m-=v<<3,a.bitb=u,a.bitk=m,o.avail_in=h,o.total_in+=p-o.next_in_index,o.next_in_index=p,a.write=w,G);if(c+=l[k+2],c+=u&ee[f],k=3*(d+c),0===(f=l[k])){u>>=l[k+1],m-=l[k+1],a.win[w++]=l[k+2],x--;break}}else u>>=l[k+1],m-=l[k+1],a.win[w++]=l[k+2],x--}while(x>=258&&h>=10);return v=o.avail_in-h,v=m>>3>3:v,h+=v,p-=v,m-=v<<3,a.bitb=u,a.bitk=m,o.avail_in=h,o.total_in+=p-o.next_in_index,o.next_in_index=p,a.write=w,X}e.init=function(e,s,a,o,c,l){t=de,f=e,u=s,i=a,m=o,r=c,p=l,n=null},e.proc=function(e,w,x){let g,b,v,y,_,k,S,z=0,C=0,A=0;for(A=w.next_in_index,y=w.avail_in,z=e.bitb,C=e.bitk,_=e.write,k=_=258&&y>=10&&(e.bitb=z,e.bitk=C,w.avail_in=y,w.total_in+=A-w.next_in_index,w.next_in_index=A,e.write=_,x=h(f,u,i,m,r,p,e,w),A=w.next_in_index,y=w.avail_in,z=e.bitb,C=e.bitk,_=e.write,k=_>>=n[b+1],C-=n[b+1],v=n[b],0===v){c=n[b+2],t=we;break}if(0!=(16&v)){l=15&v,s=n[b+2],t=ue;break}if(0==(64&v)){o=v,a=b/3+n[b+2];break}if(0!=(32&v)){t=xe;break}return t=be,w.msg="invalid literal/length code",x=G,e.bitb=z,e.bitk=C,w.avail_in=y,w.total_in+=A-w.next_in_index,w.next_in_index=A,e.write=_,e.inflate_flush(w,x);case ue:for(g=l;C>=g,C-=g,o=u,n=r,a=p,t=me;case me:for(g=o;C>=n[b+1],C-=n[b+1],v=n[b],0!=(16&v)){l=15&v,d=n[b+2],t=pe;break}if(0==(64&v)){o=v,a=b/3+n[b+2];break}return t=be,w.msg="invalid distance code",x=G,e.bitb=z,e.bitk=C,w.avail_in=y,w.total_in+=A-w.next_in_index,w.next_in_index=A,e.write=_,e.inflate_flush(w,x);case pe:for(g=l;C>=g,C-=g,t=he;case he:for(S=_-d;S<0;)S+=e.end;for(;0!==s;){if(0===k&&(_==e.end&&0!==e.read&&(_=0,k=_7&&(C-=8,y++,A--),e.write=_,x=e.inflate_flush(w,x),_=e.write,k=_e.avail_out&&(i=e.avail_out),0!==i&&t==Q&&(t=X),e.avail_out-=i,e.total_out+=i,e.next_out.set(n.win.subarray(s,s+i),r),r+=i,s+=i,s==n.end&&(s=0,n.write==n.end&&(n.write=0),i=n.write-s,i>e.avail_out&&(i=e.avail_out),0!==i&&t==Q&&(t=X),e.avail_out-=i,e.total_out+=i,e.next_out.set(n.win.subarray(s,s+i),r),r+=i,s+=i),e.next_out_index=r,n.read=s,t},n.proc=function(e,t){let p,h,w,x,g,b,v,y;for(x=e.next_in_index,g=e.avail_in,h=n.bitb,w=n.bitk,b=n.write,v=b>>1){case 0:h>>>=3,w-=3,p=7&w,h>>>=p,w-=p,r=ke;break;case 1:_=[],k=[],S=[[]],z=[[]],le.inflate_trees_fixed(_,k,S,z),d.init(_[0],k[0],S[0],0,z[0],0),h>>>=3,w-=3,r=Ue;break;case 2:h>>>=3,w-=3,r=ze;break;case 3:return h>>>=3,w-=3,r=qe,e.msg="invalid block type",t=G,n.bitb=h,n.bitk=w,e.avail_in=g,e.total_in+=x-e.next_in_index,e.next_in_index=x,n.write=b,n.inflate_flush(e,t)}break;case ke:for(;w<32;){if(0===g)return n.bitb=h,n.bitk=w,e.avail_in=g,e.total_in+=x-e.next_in_index,e.next_in_index=x,n.write=b,n.inflate_flush(e,t);t=X,g--,h|=(255&e.read_byte(x++))<>>16&65535)!=(65535&h))return r=qe,e.msg="invalid stored block lengths",t=G,n.bitb=h,n.bitk=w,e.avail_in=g,e.total_in+=x-e.next_in_index,e.next_in_index=x,n.write=b,n.inflate_flush(e,t);s=65535&h,h=w=0,r=0!==s?Se:0!==f?We:_e;break;case Se:if(0===g)return n.bitb=h,n.bitk=w,e.avail_in=g,e.total_in+=x-e.next_in_index,e.next_in_index=x,n.write=b,n.inflate_flush(e,t);if(0===v&&(b==n.end&&0!==n.read&&(b=0,v=bg&&(p=g),p>v&&(p=v),n.win.set(e.read_buf(x,p),b),x+=p,g-=p,b+=p,v-=p,0!=(s-=p))break;r=0!==f?We:_e;break;case ze:for(;w<14;){if(0===g)return n.bitb=h,n.bitk=w,e.avail_in=g,e.total_in+=x-e.next_in_index,e.next_in_index=x,n.write=b,n.inflate_flush(e,t);t=X,g--,h|=(255&e.read_byte(x++))<29||(p>>5&31)>29)return r=qe,e.msg="too many length or distance symbols",t=G,n.bitb=h,n.bitk=w,e.avail_in=g,e.total_in+=x-e.next_in_index,e.next_in_index=x,n.write=b,n.inflate_flush(e,t);if(p=258+(31&p)+(p>>5&31),!i||i.length>>=14,w-=14,o=0,r=Ce;case Ce:for(;o<4+(a>>>10);){for(;w<3;){if(0===g)return n.bitb=h,n.bitk=w,e.avail_in=g,e.total_in+=x-e.next_in_index,e.next_in_index=x,n.write=b,n.inflate_flush(e,t);t=X,g--,h|=(255&e.read_byte(x++))<>>=3,w-=3}for(;o<19;)i[ye[o++]]=0;if(c[0]=7,p=m.inflate_trees_bits(i,c,l,u,e),p!=X)return(t=p)==G&&(i=null,r=qe),n.bitb=h,n.bitk=w,e.avail_in=g,e.total_in+=x-e.next_in_index,e.next_in_index=x,n.write=b,n.inflate_flush(e,t);o=0,r=Ae;case Ae:for(;p=a,!(o>=258+(31&p)+(p>>5&31));){let s,d;for(p=c[0];w>>=p,w-=p,i[o++]=d;else{for(y=18==d?7:d-14,s=18==d?11:3;w>>=p,w-=p,s+=h&ee[y],h>>>=y,w-=y,y=o,p=a,y+s>258+(31&p)+(p>>5&31)||16==d&&y<1)return i=null,r=qe,e.msg="invalid bit length repeat",t=G,n.bitb=h,n.bitk=w,e.avail_in=g,e.total_in+=x-e.next_in_index,e.next_in_index=x,n.write=b,n.inflate_flush(e,t);d=16==d?i[y-1]:0;do{i[y++]=d}while(0!=--s);o=y}}if(l[0]=-1,C=[],A=[],U=[],W=[],C[0]=9,A[0]=6,p=a,p=m.inflate_trees_dynamic(257+(31&p),1+(p>>5&31),i,C,A,U,W,u,e),p!=X)return p==G&&(i=null,r=qe),t=p,n.bitb=h,n.bitk=w,e.avail_in=g,e.total_in+=x-e.next_in_index,e.next_in_index=x,n.write=b,n.inflate_flush(e,t);d.init(C[0],A[0],u,U[0],u,W[0]),r=Ue;case Ue:if(n.bitb=h,n.bitk=w,e.avail_in=g,e.total_in+=x-e.next_in_index,e.next_in_index=x,n.write=b,(t=d.proc(n,e,t))!=H)return n.inflate_flush(e,t);if(t=X,d.free(e),x=e.next_in_index,g=e.avail_in,h=n.bitb,w=n.bitk,b=n.write,v=b15?(e.inflateEnd(n),Z):(e.wbits=i,n.istate.blocks=new Fe(n,1<>4)>r.wbits){r.mode=De,e.msg="invalid win size",r.marker=5;break}r.mode=1;case 1:if(0===e.avail_in)return n;if(n=t,e.avail_in--,e.total_in++,i=255&e.read_byte(e.next_in_index++),((r.method<<8)+i)%31!=0){r.mode=De,e.msg="incorrect header check",r.marker=5;break}if(0==(32&i)){r.mode=7;break}r.mode=2;case 2:if(0===e.avail_in)return n;n=t,e.avail_in--,e.total_in++,r.need=(255&e.read_byte(e.next_in_index++))<<24&4278190080,r.mode=3;case 3:if(0===e.avail_in)return n;n=t,e.avail_in--,e.total_in++,r.need+=(255&e.read_byte(e.next_in_index++))<<16&16711680,r.mode=4;case 4:if(0===e.avail_in)return n;n=t,e.avail_in--,e.total_in++,r.need+=(255&e.read_byte(e.next_in_index++))<<8&65280,r.mode=5;case 5:return 0===e.avail_in?n:(n=t,e.avail_in--,e.total_in++,r.need+=255&e.read_byte(e.next_in_index++),r.mode=6,2);case 6:return r.mode=De,e.msg="need dictionary",r.marker=0,Z;case 7:if(n=r.blocks.proc(e,n),n==G){r.mode=De,r.marker=0;break}if(n==X&&(n=t),n!=H)return n;n=t,r.blocks.reset(e,r.was),r.mode=12;case 12:return e.avail_in=0,H;case De:return G;default:return Z}},e.inflateSetDictionary=function(e,t,n){let i=0,r=n;if(!e||!e.istate||6!=e.istate.mode)return Z;const s=e.istate;return r>=1<{const e={};for(const t in Ge)if(Ge.hasOwnProperty(t))for(const n in Ge[t])if(Ge[t].hasOwnProperty(n)){const i=Ge[t][n];if("string"==typeof i)e[i]=t+"/"+n;else for(let r=0;r>>1^3988292384:t>>>=1;Je[e]=t}class Qe{constructor(e){this.crc=e||-1}append(e){let t=0|this.crc;for(let n=0,i=0|e.length;n>>8^Je[255&(t^e[n])];this.crc=t}get(){return~this.crc}}class et extends TransformStream{constructor(){const e=new Qe;super({transform(t){e.append(t)},flush(t){const n=new Uint8Array(4);new DataView(n.buffer).setUint32(0,e.get()),t.enqueue(n)}})}}const tt={concat(e,t){if(0===e.length||0===t.length)return e.concat(t);const n=e[e.length-1],i=tt.getPartial(n);return 32===i?e.concat(t):tt._shiftRight(t,i,0|n,e.slice(0,e.length-1))},bitLength(e){const t=e.length;if(0===t)return 0;const n=e[t-1];return 32*(t-1)+tt.getPartial(n)},clamp(e,t){if(32*e.length0&&t&&(e[n-1]=tt.partial(t,e[n-1]&2147483648>>t-1,1)),e},partial:(e,t,n)=>32===e?t:(n?0|t:t<<32-e)+1099511627776*e,getPartial:e=>Math.round(e/1099511627776)||32,_shiftRight(e,t,n,i){for(void 0===i&&(i=[]);t>=32;t-=32)i.push(n),n=0;if(0===t)return i.concat(e);for(let r=0;r>>t),n=e[r]<<32-t;const r=e.length?e[e.length-1]:0,s=tt.getPartial(r);return i.push(tt.partial(t+s&31,t+s>32?n:i.pop(),1)),i}},nt={bytes:{fromBits(e){const t=tt.bitLength(e)/8,n=new Uint8Array(t);let i;for(let r=0;r>>24,i<<=8;return n},toBits(e){const t=[];let n,i=0;for(n=0;n9007199254740991)throw new Error("Cannot hash more than 2^53 - 1 bits");const s=new Uint32Array(n);let a=0;for(let e=t.blockSize+i-(t.blockSize+i&t.blockSize-1);e<=r;e+=t.blockSize)t._block(s.subarray(16*a,16*(a+1))),a+=1;return n.splice(0,16*a),t}finalize(){const e=this;let t=e._buffer;const n=e._h;t=tt.concat(t,[tt.partial(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(Math.floor(e._length/4294967296)),t.push(0|e._length);t.length;)e._block(t.splice(0,16));return e.reset(),n}_f(e,t,n,i){return e<=19?t&n|~t&i:e<=39?t^n^i:e<=59?t&n|t&i|n&i:e<=79?t^n^i:void 0}_S(e,t){return t<>>32-e}_block(e){const t=this,n=t._h,i=Array(80);for(let t=0;t<16;t++)i[t]=e[t];let r=n[0],s=n[1],a=n[2],o=n[3],c=n[4];for(let e=0;e<=79;e++){e>=16&&(i[e]=t._S(1,i[e-3]^i[e-8]^i[e-14]^i[e-16]));const n=t._S(5,r)+t._f(e,s,a,o)+c+i[e]+t._key[Math.floor(e/20)]|0;c=o,o=a,a=t._S(30,s),s=r,r=n}n[0]=n[0]+r|0,n[1]=n[1]+s|0,n[2]=n[2]+a|0,n[3]=n[3]+o|0,n[4]=n[4]+c|0}}},rt={aes:class{constructor(e){const t=this;t._tables=[[[],[],[],[],[]],[[],[],[],[],[]]],t._tables[0][0][0]||t._precompute();const n=t._tables[0][4],i=t._tables[1],r=e.length;let s,a,o,c=1;if(4!==r&&6!==r&&8!==r)throw new Error("invalid aes key size");for(t._key=[a=e.slice(0),o=[]],s=r;s<4*r+28;s++){let e=a[s-1];(s%r==0||8===r&&s%r==4)&&(e=n[e>>>24]<<24^n[e>>16&255]<<16^n[e>>8&255]<<8^n[255&e],s%r==0&&(e=e<<8^e>>>24^c<<24,c=c<<1^283*(c>>7))),a[s]=a[s-r]^e}for(let e=0;s;e++,s--){const t=a[3&e?s:s-4];o[e]=s<=4||e<4?t:i[0][n[t>>>24]]^i[1][n[t>>16&255]]^i[2][n[t>>8&255]]^i[3][n[255&t]]}}encrypt(e){return this._crypt(e,0)}decrypt(e){return this._crypt(e,1)}_precompute(){const e=this._tables[0],t=this._tables[1],n=e[4],i=t[4],r=[],s=[];let a,o,c,l;for(let e=0;e<256;e++)s[(r[e]=e<<1^283*(e>>7))^e]=e;for(let d=a=0;!n[d];d^=o||1,a=s[a]||1){let s=a^a<<1^a<<2^a<<3^a<<4;s=s>>8^255&s^99,n[d]=s,i[s]=d,l=r[c=r[o=r[d]]];let f=16843009*l^65537*c^257*o^16843008*d,u=257*r[s]^16843008*s;for(let n=0;n<4;n++)e[n][d]=u=u<<24^u>>>8,t[n][s]=f=f<<24^f>>>8}for(let n=0;n<5;n++)e[n]=e[n].slice(0),t[n]=t[n].slice(0)}_crypt(e,t){if(4!==e.length)throw new Error("invalid aes block size");const n=this._key[t],i=n.length/4-2,r=[0,0,0,0],s=this._tables[t],a=s[0],o=s[1],c=s[2],l=s[3],d=s[4];let f,u,m,p=e[0]^n[0],h=e[t?3:1]^n[1],w=e[2]^n[2],x=e[t?1:3]^n[3],g=4;for(let e=0;e>>24]^o[h>>16&255]^c[w>>8&255]^l[255&x]^n[g],u=a[h>>>24]^o[w>>16&255]^c[x>>8&255]^l[255&p]^n[g+1],m=a[w>>>24]^o[x>>16&255]^c[p>>8&255]^l[255&h]^n[g+2],x=a[x>>>24]^o[p>>16&255]^c[h>>8&255]^l[255&w]^n[g+3],g+=4,p=f,h=u,w=m;for(let e=0;e<4;e++)r[t?3&-e:e]=d[p>>>24]<<24^d[h>>16&255]<<16^d[w>>8&255]<<8^d[255&x]^n[g++],f=p,p=h,h=w,w=x,x=f;return r}}},st={getRandomValues(e){const t=new Uint32Array(e.buffer),n=e=>{let t=987654321;const n=4294967295;return function(){t=36969*(65535&t)+(t>>16)&n;return(((t<<16)+(e=18e3*(65535&e)+(e>>16)&n)&n)/4294967296+.5)*(Math.random()>.5?1:-1)}};for(let i,r=0;r>24&255)){let t=e>>16&255,n=e>>8&255,i=255&e;255===t?(t=0,255===n?(n=0,255===i?i=0:++i):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=i}else e+=1<<24;return e}incCounter(e){0===(e[0]=this.incWord(e[0]))&&(e[1]=this.incWord(e[1]))}calculate(e,t,n){let i;if(!(i=t.length))return[];const r=tt.bitLength(t);for(let r=0;rnew ot.hmacSha1(nt.bytes.toBits(e)),pbkdf2(e,t,n,i){if(n=n||1e4,i<0||n<0)throw new Error("invalid params to pbkdf2");const r=1+(i>>5)<<2;let s,a,o,c,l;const d=new ArrayBuffer(r),f=new DataView(d);let u=0;const m=tt;for(t=nt.bytes.toBits(t),l=1;u<(r||1);l++){for(s=a=e.encrypt(m.concat(t,[l])),o=1;or&&(e=(new n).update(e).finalize());for(let t=0;tthis.resolveReady=e)),password:e,signed:t,strength:n-1,pending:new Uint8Array})},async transform(e,t){const n=this,{password:r,strength:s,resolveReady:a,ready:o}=n;r?(await async function(e,t,n,i){const r=await It(e,t,n,$t(i,0,bt[t])),s=$t(i,bt[t]);if(r[0]!=s[0]||r[1]!=s[1])throw new Error(lt)}(n,s,r,$t(e,0,bt[s]+2)),e=$t(e,bt[s]+2),i?t.error(new Error(ft)):a()):await o;const c=new Uint8Array(e.length-yt-(e.length-yt)%mt);t.enqueue(Rt(n,e,c,0,yt,!0))},async flush(e){const{signed:t,ctr:n,hmac:i,pending:r,ready:s}=this;await s;const a=$t(r,0,r.length-yt),o=$t(r,r.length-yt);let c=new Uint8Array;if(a.length){const e=Bt(Ut,a);i.update(e);const t=n.update(e);c=Ot(Ut,t)}if(t){const e=$t(Ot(Ut,i.digest()),0,yt);for(let t=0;tthis.resolveReady=e)),password:e,strength:t-1,pending:new Uint8Array})},async transform(e,t){const n=this,{password:i,strength:r,resolveReady:s,ready:a}=n;let o=new Uint8Array;i?(o=await async function(e,t,n){const i=ut(new Uint8Array(bt[t])),r=await It(e,t,n,i);return Tt(i,r)}(n,r,i),s()):await a;const c=new Uint8Array(o.length+e.length-e.length%mt);c.set(o,0),t.enqueue(Rt(n,e,c,o.length,0))},async flush(e){const{ctr:t,hmac:i,pending:r,ready:s}=this;await s;let a=new Uint8Array;if(r.length){const e=t.update(Bt(Ut,r));i.update(e),a=Ot(Ut,e)}n.signature=Ot(Ut,i.digest()).slice(0,yt),e.enqueue(Tt(a,n.signature))}}),n=this}}function Rt(e,t,n,i,r,s){const{ctr:a,hmac:o,pending:c}=e,l=t.length-r;let d;for(c.length&&(t=Tt(c,t),n=function(e,t){if(t&&t>e.length){const n=e;(e=new Uint8Array(t)).set(n,0)}return e}(n,l-l%mt)),d=0;d<=l-mt;d+=mt){const e=Bt(Ut,$t(t,d,d+mt));s&&o.update(e);const r=a.update(e);s||o.update(r),n.set(Ot(Ut,r),d+i)}return e.pending=$t(t,d),n}async function It(e,t,n,i){e.password=null;const r=function(e){if("undefined"==typeof TextEncoder){e=unescape(encodeURIComponent(e));const t=new Uint8Array(e.length);for(let n=0;n>>24]),r=~e.crcKey2.get(),e.keys=[n,i,r]}function Ht(e){const t=2|e.keys[2];return Zt(Math.imul(t,1^t)>>>8)}function Zt(e){return 255&e}function Gt(e){return 4294967295&e}const Jt="deflate-raw";class Qt extends TransformStream{constructor(e,{chunkSize:t,CompressionStream:n,CompressionStreamNative:i}){super({});const{compressed:r,encrypted:s,useCompressionStream:a,zipCrypto:o,signed:c,level:l}=e,d=this;let f,u,m=tn(super.readable);s&&!o||!c||([m,f]=m.tee(),f=sn(f,new et)),r&&(m=rn(m,a,{level:l,chunkSize:t},i,n)),s&&(o?m=sn(m,new Kt(e)):(u=new Lt(e),m=sn(m,u))),nn(d,m,(async()=>{let e;s&&!o&&(e=u.signature),s&&!o||!c||(e=await f.getReader().read(),e=new DataView(e.value.buffer).getUint32(0)),d.signature=e}))}}class en extends TransformStream{constructor(e,{chunkSize:t,DecompressionStream:n,DecompressionStreamNative:i}){super({});const{zipCrypto:r,encrypted:s,signed:a,signature:o,compressed:c,useCompressionStream:l}=e;let d,f,u=tn(super.readable);s&&(r?u=sn(u,new Mt(e)):(f=new Et(e),u=sn(u,f))),c&&(u=rn(u,l,{chunkSize:t},i,n)),s&&!r||!a||([u,d]=u.tee(),d=sn(d,new et)),nn(this,u,(async()=>{if((!s||r)&&a){const e=await d.getReader().read(),t=new DataView(e.value.buffer);if(o!=t.getUint32(0,!1))throw new Error(dt)}}))}}function tn(e){return sn(e,new TransformStream({transform(e,t){e&&e.length&&t.enqueue(e)}}))}function nn(e,t,n){t=sn(t,new TransformStream({flush:n})),Object.defineProperty(e,"readable",{get:()=>t})}function rn(e,t,n,i,r){try{e=sn(e,new(t&&i?i:r)(Jt,n))}catch(i){if(!t)throw i;e=sn(e,new r(Jt,n))}return e}function sn(e,t){return e.pipeThrough(t)}const an="message",on="start",cn="pull",ln="data",dn="ack",fn="close",un="inflate";class mn extends TransformStream{constructor(e,t){super({});const n=this,{codecType:i}=e;let r;i.startsWith("deflate")?r=Qt:i.startsWith(un)&&(r=en);let s=0;const a=new r(e,t),o=super.readable,c=new TransformStream({transform(e,t){e&&e.length&&(s+=e.length,t.enqueue(e))},flush(){const{signature:e}=a;Object.assign(n,{signature:e,size:s})}});Object.defineProperty(n,"readable",{get:()=>o.pipeThrough(a).pipeThrough(c)})}}const pn=typeof Worker!=Me;class hn{constructor(e,{readable:t,writable:n},{options:i,config:r,streamOptions:s,useWebWorkers:a,transferStreams:o,scripts:c},l){const{signal:d}=s;return Object.assign(e,{busy:!0,readable:t.pipeThrough(new wn(t,s,r),{signal:d}),writable:n,options:Object.assign({},i),scripts:c,transferStreams:o,terminate(){const{worker:t,busy:n}=e;t&&!n&&(t.terminate(),e.interface=null)},onTaskFinished(){e.busy=!1,l(e)}}),(a&&pn?bn:gn)(e,r)}}class wn extends TransformStream{constructor(e,{onstart:t,onprogress:n,size:i,onend:r},{chunkSize:s}){let a=0;super({start(){t&&xn(t,i)},async transform(e,t){a+=e.length,n&&await xn(n,a,i),t.enqueue(e)},flush(){e.size=a,r&&xn(r,a)}},{highWaterMark:1,size:()=>s})}}async function xn(e,...t){try{await e(...t)}catch(e){}}function gn(e,t){return{run:()=>async function({options:e,readable:t,writable:n,onTaskFinished:i},r){const s=new mn(e,r);try{await t.pipeThrough(s).pipeTo(n,{preventClose:!0,preventAbort:!0});const{signature:e,size:i}=s;return{signature:e,size:i}}finally{i()}}(e,t)}}function bn(e,{baseURL:t,chunkSize:n}){return e.interface||Object.assign(e,{worker:_n(e.scripts[0],t,e),interface:{run:()=>async function(e,t){let n,i;const r=new Promise(((e,t)=>{n=e,i=t}));Object.assign(e,{reader:null,writer:null,resolveResult:n,rejectResult:i,result:r});const{readable:s,options:a,scripts:o}=e,{writable:c,closed:l}=function(e){const t=e.getWriter();let n;const i=new Promise((e=>n=e)),r=new WritableStream({async write(e){await t.ready,await t.write(e)},close(){t.releaseLock(),n()},abort:e=>t.abort(e)});return{writable:r,closed:i}}(e.writable),d=kn({type:on,scripts:o.slice(1),options:a,config:t,readable:s,writable:c},e);d||Object.assign(e,{reader:s.getReader(),writer:c.getWriter()});const f=await r;try{await c.close()}catch(e){}return await l,f}(e,{chunkSize:n})}}),e.interface}let vn=!0,yn=!0;function _n(e,t,n){const i={type:"module"};let r,s;typeof e==Ke&&(e=e());try{r=new URL(e,t)}catch(t){r=e}if(vn)try{s=new Worker(r)}catch(e){vn=!1,s=new Worker(r,i)}else s=new Worker(r,i);return s.addEventListener(an,(e=>async function({data:e},t){const{type:n,value:i,messageId:r,result:s,error:a}=e,{reader:o,writer:c,resolveResult:l,rejectResult:d,onTaskFinished:f}=t;try{if(a){const{message:e,stack:t,code:n,name:i}=a,r=new Error(e);Object.assign(r,{stack:t,code:n,name:i}),u(r)}else{if(n==cn){const{value:e,done:n}=await o.read();kn({type:ln,value:e,done:n,messageId:r},t)}n==ln&&(await c.ready,await c.write(new Uint8Array(i)),kn({type:dn,messageId:r},t)),n==fn&&u(null,s)}}catch(a){u(a)}function u(e,t){e?d(e):l(t),c&&c.releaseLock(),f()}}(e,n))),s}function kn(e,{worker:t,writer:n,onTaskFinished:i,transferStreams:r}){try{let{value:n,readable:i,writable:s}=e;const a=[];if(n){const{buffer:t,length:i}=n;i!=t.byteLength&&(n=new Uint8Array(n)),e.value=n.buffer,a.push(e.value)}if(r&&yn?(i&&a.push(i),s&&a.push(s)):e.readable=e.writable=null,a.length)try{return t.postMessage(e,a),!0}catch(n){yn=!1,e.readable=e.writable=null,t.postMessage(e)}else t.postMessage(e)}catch(e){throw n&&n.releaseLock(),i(),e}}let Sn=[];const zn=[];let Cn=0;function An(e){const{terminateTimeout:t}=e;t&&(clearTimeout(t),e.terminateTimeout=null)}const Un=65536,Wn="writable";class jn{constructor(){this.size=0}init(){this.initialized=!0}}class qn extends jn{get readable(){const e=this,{chunkSize:t=Un}=e,n=new ReadableStream({start(){this.chunkOffset=0},async pull(i){const{offset:r=0,size:s,diskNumberStart:a}=n,{chunkOffset:o}=this;i.enqueue(await $n(e,r+o,Math.min(t,s-o),a)),o+t>s?i.close():this.chunkOffset+=t}});return n}}class Fn extends qn{constructor(e){super(),Object.assign(this,{blob:e,size:e.size})}async readUint8Array(e,t){const n=this,i=e+t,r=e||it.writable}),this.blob=new Response(t.readable,{headers:n}).blob()}getData(){return this.blob}}class En extends Dn{constructor(e){super(e),Object.assign(this,{encoding:e,utf8:!e||"utf-8"==e.toLowerCase()})}async getData(){const{encoding:e,utf8:t}=this,n=await super.getData();if(n.text&&t)return n.text();{const t=new FileReader;return new Promise(((i,r)=>{Object.assign(t,{onload:({target:e})=>i(e.result),onerror:()=>r(t.error)}),t.readAsText(n,e)}))}}}class Ln extends qn{constructor(e){super(),this.readers=e}async init(){const e=this,{readers:t}=e;e.lastDiskNumber=0,await Promise.all(t.map((async t=>{await t.init(),e.size+=t.size}))),super.init()}async readUint8Array(e,t,n=0){const i=this,{readers:r}=this;let s,a=n;-1==a&&(a=r.length-1);let o=e;for(;o>=r[a].size;)o-=r[a].size,a++;const c=r[a],l=c.size;if(o+t<=l)s=await $n(c,o,t);else{const r=l-o;s=new Uint8Array(t),s.set(await $n(c,o,r)),s.set(await i.readUint8Array(e+r,t-r,n),r)}return i.lastDiskNumber=Math.max(a,i.lastDiskNumber),s}}class Rn extends jn{constructor(e,t=4294967295){super();const n=this;let i,r,s;Object.assign(n,{diskNumber:0,diskOffset:0,size:0,maxSize:t,availableSize:t});const a=new WritableStream({async write(t){const{availableSize:a}=n;if(s)t.length>=a?(await o(t.slice(0,a)),await c(),n.diskOffset+=i.size,n.diskNumber++,s=null,await this.write(t.slice(a))):await o(t);else{const{value:a,done:o}=await e.next();if(o&&!a)throw new Error("Writer iterator completed too soon");i=a,i.size=0,i.maxSize&&(n.maxSize=i.maxSize),n.availableSize=n.maxSize,await In(i),r=a.writable,s=r.getWriter(),await this.write(t)}},async close(){await s.ready,await c()}});async function o(e){const t=e.length;t&&(await s.ready,await s.write(e),i.size+=t,n.size+=t,n.availableSize-=t)}async function c(){r.size=i.size,await s.close()}Object.defineProperty(n,Wn,{get:()=>a})}}async function In(e,t){e.init&&!e.initialized&&await e.init(t)}function Tn(e){return Array.isArray(e)&&(e=new Ln(e)),e instanceof ReadableStream&&(e={readable:e}),e}function $n(e,t,n,i){return e.readUint8Array(t,n,i)}const On="\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ ".split(""),Bn=256==On.length;function Vn(e,t){return t&&"cp437"==t.trim().toLowerCase()?function(e){if(Bn){let t="";for(let n=0;nthis[t]=e[t]))}}const si="File format is not recognized",ai="Zip64 extra field not found",oi="Compression method not supported",ci="Split zip file",li="utf-8",di="cp437",fi=[[Yn,Ie],[Xn,Ie],[Hn,Ie],[Zn,Te]],ui={[Te]:{getValue:ki,bytes:4},[Ie]:{getValue:Si,bytes:8}};class mi{constructor(e,t={}){Object.assign(this,{reader:Tn(e),options:t,config:Xe})}async*getEntriesGenerator(e={}){const t=this;let{reader:n}=t;const{config:i}=t;if(await In(n),n.size!==Ve&&n.readUint8Array||(n=new Fn(await new Response(n.readable).blob()),await In(n)),n.size<22)throw new Error(si);n.chunkSize=function(e){return Math.max(e.chunkSize,64)}(i);const r=await async function(e,t,n,i,r){const s=new Uint8Array(4);!function(e,t,n){e.setUint32(t,n,!0)}(zi(s),0,t);const a=i+r;return await o(i)||await o(Math.min(a,n));async function o(t){const r=n-t,a=await $n(e,r,t);for(let e=a.length-i;e>=0;e--)if(a[e]==s[0]&&a[e+1]==s[1]&&a[e+2]==s[2]&&a[e+3]==s[3])return{offset:r+e,buffer:a.slice(e,e+i).buffer}}}(n,101010256,n.size,22,1048560);if(!r){throw 134695760==ki(zi(await $n(n,0,4)))?new Error(ci):new Error("End of central directory not found")}const s=zi(r);let a=ki(s,12),o=ki(s,16);const c=r.offset,l=_i(s,20),d=c+22+l;let f=_i(s,4);const u=n.lastDiskNumber||0;let m=_i(s,6),p=_i(s,8),h=0,w=0;if(o==Ie||a==Ie||p==Te||m==Te){const e=zi(await $n(n,r.offset-20,20));if(117853008!=ki(e,0))throw new Error("End of Zip64 central directory not found");o=Si(e,8);let t=await $n(n,o,56,-1),i=zi(t);const s=r.offset-20-56;if(ki(i,0)!=Oe&&o!=s){const e=o;o=s,h=o-e,t=await $n(n,o,56,-1),i=zi(t)}if(ki(i,0)!=Oe)throw new Error("End of Zip64 central directory locator not found");f==Te&&(f=ki(i,16)),m==Te&&(m=ki(i,20)),p==Te&&(p=Si(i,32)),a==Ie&&(a=Si(i,40)),o-=a}if(u!=f)throw new Error(ci);if(o<0||o>=n.size)throw new Error(si);let x=0,g=await $n(n,o,a,m),b=zi(g);if(a){const e=r.offset-a;if(ki(b,x)!=$e&&o!=e){const t=o;o=e,h=o-t,g=await $n(n,o,a,m),b=zi(g)}}if(o<0||o>=n.size)throw new Error(si);const v=gi(t,e,"filenameEncoding"),y=gi(t,e,"commentEncoding");for(let r=0;rs.getData(e,j,t),x=_;const{onprogress:q}=e;if(q)try{await q(r+1,p,new ri(s))}catch(e){}yield j}const _=gi(t,e,"extractPrependedData"),k=gi(t,e,"extractAppendedData");return _&&(t.prependedData=w>0?await $n(n,0,w):new Uint8Array),t.comment=l?await $n(n,c+22,l):new Uint8Array,k&&(t.appendedData=d>>8&255:f>>>24&255),signature:f,compressed:0!=c,encrypted:g,useWebWorkers:gi(i,n,"useWebWorkers"),useCompressionStream:gi(i,n,"useCompressionStream"),transferStreams:gi(i,n,"transferStreams"),checkPasswordOnly:S},config:l,streamOptions:{signal:k,size:_,onstart:C,onprogress:A,onend:U}};let j=0;try{({outputSize:j}=await async function(e,t){const{options:n,config:i}=t,{transferStreams:r,useWebWorkers:s,useCompressionStream:a,codecType:o,compressed:c,signed:l,encrypted:d}=n,{workerScripts:f,maxWorkers:u,terminateWorkerTimeout:m}=i;t.transferStreams=r||r===Ve;const p=!(c||l||d||t.transferStreams);let h;t.useWebWorkers=!p&&(s||s===Ve&&i.useWebWorkers),t.scripts=t.useWebWorkers&&f?f[o]:[],n.useCompressionStream=a||a===Ve&&i.useCompressionStream;const w=Sn.find((e=>!e.busy));if(w)An(w),h=new hn(w,e,t,x);else if(Sn.lengthzn.push({resolve:n,stream:e,workerOptions:t})));return h.run();function x(e){if(zn.length){const[{resolve:t,stream:n,workerOptions:i}]=zn.splice(0,1);t(new hn(e,n,i,x))}else e.worker?(An(e),Number.isFinite(m)&&m>=0&&(e.terminateTimeout=setTimeout((()=>{Sn=Sn.filter((t=>t!=e)),e.terminate()}),m))):Sn=Sn.filter((t=>t!=e))}}({readable:y,writable:z},W))}catch(e){if(!S||e.message!=ft)throw e}finally{const e=gi(i,n,"preventClose");z.size+=j,e||z.locked||await z.close()}return S?void 0:e.getData?e.getData():z}}function hi(e,t,n){const i=e.rawBitFlag=_i(t,n+2),r=1==(1&i),s=ki(t,n+6);Object.assign(e,{encrypted:r,version:_i(t,n),bitFlag:{level:(6&i)>>1,dataDescriptor:8==(8&i),languageEncodingFlag:2048==(2048&i)},rawLastModDate:s,lastModDate:bi(s),filenameLength:_i(t,n+22),extraFieldLength:_i(t,n+24)})}async function wi(e,t,n,i){const{rawExtraField:r}=t,s=t.extraField=new Map,a=zi(new Uint8Array(r));let o=0;try{for(;ot[e]==n));for(let r=0,s=0;r{if(e.data.length>=a+4){const o=ki(n,a);t[i]=e[i]=new Date(1e3*o);const c=s[r];e[c]=o}a+=4}))}(p,t),t.extraFieldExtendedTimestamp=p)}async function xi(e,t,n,i,r){const s=zi(e.data),a=new Qe;a.append(r[n]);const o=zi(new Uint8Array(4));o.setUint32(0,a.get(),!0),Object.assign(e,{version:yi(s,0),signature:ki(s,1),[t]:await Vn(e.data.subarray(5)),valid:!r.bitFlag.languageEncodingFlag&&e.signature==ki(o,0)}),e.valid&&(i[t]=e[t],i[t+"UTF8"]=!0)}function gi(e,t,n){return t[n]===Ve?e.options[n]:t[n]}function bi(e){const t=(4294901760&e)>>16,n=65535&e;try{return new Date(1980+((65024&t)>>9),((480&t)>>5)-1,31&t,(63488&n)>>11,(2016&n)>>5,2*(31&n),0)}catch(e){}}function vi(e){return new Date(Number(e/BigInt(1e4)-BigInt(116444736e5)))}function yi(e,t){return e.getUint8(t)}function _i(e,t){return e.getUint16(t,!0)}function ki(e,t){return e.getUint32(t,!0)}function Si(e,t){return Number(e.getBigUint64(t,!0))}function zi(e){return new DataView(e.buffer)}let Ci;try{Ci="undefined"==typeof document?require("url").pathToFileURL(__filename).href:document.currentScript&&document.currentScript.src||new URL("fastboot.min.cjs",document.baseURI).href}catch(e){}function Ai(e,t){return e<0?Math.max(e+t,0):Math.min(e,t)}He({baseURL:Ci}),function(e){const t=()=>URL.createObjectURL(new Blob(['const{Array:e,Object:t,Number:n,Math:r,Error:s,Uint8Array:i,Uint16Array:o,Uint32Array:c,Int32Array:f,Map:a,DataView:l,Promise:u,TextEncoder:w,crypto:h,postMessage:d,TransformStream:p,ReadableStream:y,WritableStream:m,CompressionStream:b,DecompressionStream:g}=self;class k{constructor(e){return class extends p{constructor(t,n){const r=new e(n);super({transform(e,t){t.enqueue(r.append(e))},flush(e){const t=r.flush();t&&e.enqueue(t)}})}}}}const v=[];for(let e=0;256>e;e++){let t=e;for(let e=0;8>e;e++)1&t?t=t>>>1^3988292384:t>>>=1;v[e]=t}class S{constructor(e){this.t=e||-1}append(e){let t=0|this.t;for(let n=0,r=0|e.length;r>n;n++)t=t>>>8^v[255&(t^e[n])];this.t=t}get(){return~this.t}}class z extends p{constructor(){const e=new S;super({transform(t){e.append(t)},flush(t){const n=new i(4);new l(n.buffer).setUint32(0,e.get()),t.enqueue(n)}})}}const C={concat(e,t){if(0===e.length||0===t.length)return e.concat(t);const n=e[e.length-1],r=C.i(n);return 32===r?e.concat(t):C.o(t,r,0|n,e.slice(0,e.length-1))},l(e){const t=e.length;if(0===t)return 0;const n=e[t-1];return 32*(t-1)+C.i(n)},u(e,t){if(32*e.length0&&t&&(e[n-1]=C.h(t,e[n-1]&2147483648>>t-1,1)),e},h:(e,t,n)=>32===e?t:(n?0|t:t<<32-e)+1099511627776*e,i:e=>r.round(e/1099511627776)||32,o(e,t,n,r){for(void 0===r&&(r=[]);t>=32;t-=32)r.push(n),n=0;if(0===t)return r.concat(e);for(let s=0;s>>t),n=e[s]<<32-t;const s=e.length?e[e.length-1]:0,i=C.i(s);return r.push(C.h(t+i&31,t+i>32?n:r.pop(),1)),r}},x={p:{m(e){const t=C.l(e)/8,n=new i(t);let r;for(let s=0;t>s;s++)0==(3&s)&&(r=e[s/4]),n[s]=r>>>24,r<<=8;return n},g(e){const t=[];let n,r=0;for(n=0;n9007199254740991)throw new s("Cannot hash more than 2^53 - 1 bits");const o=new c(n);let f=0;for(let e=t.blockSize+r-(t.blockSize+r&t.blockSize-1);i>=e;e+=t.blockSize)t.I(o.subarray(16*f,16*(f+1))),f+=1;return n.splice(0,16*f),t}D(){const e=this;let t=e.C;const n=e.S;t=C.concat(t,[C.h(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(r.floor(e._/4294967296)),t.push(0|e._);t.length;)e.I(t.splice(0,16));return e.reset(),n}V(e,t,n,r){return e>19?e>39?e>59?e>79?void 0:t^n^r:t&n|t&r|n&r:t^n^r:t&n|~t&r}P(e,t){return t<>>32-e}I(t){const n=this,s=n.S,i=e(80);for(let e=0;16>e;e++)i[e]=t[e];let o=s[0],c=s[1],f=s[2],a=s[3],l=s[4];for(let e=0;79>=e;e++){16>e||(i[e]=n.P(1,i[e-3]^i[e-8]^i[e-14]^i[e-16]));const t=n.P(5,o)+n.V(e,c,f,a)+l+i[e]+n.v[r.floor(e/20)]|0;l=a,a=f,f=n.P(30,c),c=o,o=t}s[0]=s[0]+o|0,s[1]=s[1]+c|0,s[2]=s[2]+f|0,s[3]=s[3]+a|0,s[4]=s[4]+l|0}},A={getRandomValues(e){const t=new c(e.buffer),n=e=>{let t=987654321;const n=4294967295;return()=>(t=36969*(65535&t)+(t>>16)&n,(((t<<16)+(e=18e3*(65535&e)+(e>>16)&n)&n)/4294967296+.5)*(r.random()>.5?1:-1))};for(let s,i=0;inew I.R(x.p.g(e)),B(e,t,n,r){if(n=n||1e4,0>r||0>n)throw new s("invalid params to pbkdf2");const i=1+(r>>5)<<2;let o,c,f,a,u;const w=new ArrayBuffer(i),h=new l(w);let d=0;const p=C;for(t=x.p.g(t),u=1;(i||1)>d;u++){for(o=c=e.encrypt(p.concat(t,[u])),f=1;n>f;f++)for(c=e.encrypt(c),a=0;ad&&fs&&(e=(new n).update(e).D());for(let t=0;s>t;t++)r[0][t]=909522486^e[t],r[1][t]=1549556828^e[t];t.K[0].update(r[0]),t.K[1].update(r[1]),t.U=new n(t.K[0])}reset(){const e=this;e.U=new e.M(e.K[0]),e.N=!1}update(e){this.N=!0,this.U.update(e)}digest(){const e=this,t=e.U.D(),n=new e.M(e.K[1]).update(t).D();return e.reset(),n}encrypt(e){if(this.N)throw new s("encrypt on already updated hmac called!");return this.update(e),this.digest(e)}}},D=void 0!==h&&"function"==typeof h.getRandomValues,V="Invalid password",P="Invalid signature",R="zipjs-abort-check-password";function B(e){return D?h.getRandomValues(e):A.getRandomValues(e)}const E=16,M={name:"PBKDF2"},K=t.assign({hash:{name:"HMAC"}},M),U=t.assign({iterations:1e3,hash:{name:"SHA-1"}},M),N=["deriveBits"],O=[8,12,16],T=[16,24,32],W=10,j=[0,0,0,0],H="undefined",L="function",F=typeof h!=H,q=F&&h.subtle,G=F&&typeof q!=H,J=x.p,Q=class{constructor(e){const t=this;t.O=[[[],[],[],[],[]],[[],[],[],[],[]]],t.O[0][0][0]||t.T();const n=t.O[0][4],r=t.O[1],i=e.length;let o,c,f,a=1;if(4!==i&&6!==i&&8!==i)throw new s("invalid aes key size");for(t.v=[c=e.slice(0),f=[]],o=i;4*i+28>o;o++){let e=c[o-1];(o%i==0||8===i&&o%i==4)&&(e=n[e>>>24]<<24^n[e>>16&255]<<16^n[e>>8&255]<<8^n[255&e],o%i==0&&(e=e<<8^e>>>24^a<<24,a=a<<1^283*(a>>7))),c[o]=c[o-i]^e}for(let e=0;o;e++,o--){const t=c[3&e?o:o-4];f[e]=4>=o||4>e?t:r[0][n[t>>>24]]^r[1][n[t>>16&255]]^r[2][n[t>>8&255]]^r[3][n[255&t]]}}encrypt(e){return this.W(e,0)}decrypt(e){return this.W(e,1)}T(){const e=this.O[0],t=this.O[1],n=e[4],r=t[4],s=[],i=[];let o,c,f,a;for(let e=0;256>e;e++)i[(s[e]=e<<1^283*(e>>7))^e]=e;for(let l=o=0;!n[l];l^=c||1,o=i[o]||1){let i=o^o<<1^o<<2^o<<3^o<<4;i=i>>8^255&i^99,n[l]=i,r[i]=l,a=s[f=s[c=s[l]]];let u=16843009*a^65537*f^257*c^16843008*l,w=257*s[i]^16843008*i;for(let n=0;4>n;n++)e[n][l]=w=w<<24^w>>>8,t[n][i]=u=u<<24^u>>>8}for(let n=0;5>n;n++)e[n]=e[n].slice(0),t[n]=t[n].slice(0)}W(e,t){if(4!==e.length)throw new s("invalid aes block size");const n=this.v[t],r=n.length/4-2,i=[0,0,0,0],o=this.O[t],c=o[0],f=o[1],a=o[2],l=o[3],u=o[4];let w,h,d,p=e[0]^n[0],y=e[t?3:1]^n[1],m=e[2]^n[2],b=e[t?1:3]^n[3],g=4;for(let e=0;r>e;e++)w=c[p>>>24]^f[y>>16&255]^a[m>>8&255]^l[255&b]^n[g],h=c[y>>>24]^f[m>>16&255]^a[b>>8&255]^l[255&p]^n[g+1],d=c[m>>>24]^f[b>>16&255]^a[p>>8&255]^l[255&y]^n[g+2],b=c[b>>>24]^f[p>>16&255]^a[y>>8&255]^l[255&m]^n[g+3],g+=4,p=w,y=h,m=d;for(let e=0;4>e;e++)i[t?3&-e:e]=u[p>>>24]<<24^u[y>>16&255]<<16^u[m>>8&255]<<8^u[255&b]^n[g++],w=p,p=y,y=m,m=b,b=w;return i}},X=class{constructor(e,t){this.j=e,this.H=t,this.L=t}reset(){this.L=this.H}update(e){return this.F(this.j,e,this.L)}q(e){if(255==(e>>24&255)){let t=e>>16&255,n=e>>8&255,r=255&e;255===t?(t=0,255===n?(n=0,255===r?r=0:++r):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=r}else e+=1<<24;return e}G(e){0===(e[0]=this.q(e[0]))&&(e[1]=this.q(e[1]))}F(e,t,n){let r;if(!(r=t.length))return[];const s=C.l(t);for(let s=0;r>s;s+=4){this.G(n);const r=e.encrypt(n);t[s]^=r[0],t[s+1]^=r[1],t[s+2]^=r[2],t[s+3]^=r[3]}return C.u(t,s)}},Y=I.R;let Z=F&&G&&typeof q.importKey==L,$=F&&G&&typeof q.deriveBits==L;class ee extends p{constructor({password:e,signed:n,encryptionStrength:r,checkPasswordOnly:o}){super({start(){t.assign(this,{ready:new u((e=>this.J=e)),password:e,signed:n,X:r-1,pending:new i})},async transform(e,t){const n=this,{password:r,X:c,J:f,ready:a}=n;r?(await(async(e,t,n,r)=>{const i=await re(e,t,n,ie(r,0,O[t])),o=ie(r,O[t]);if(i[0]!=o[0]||i[1]!=o[1])throw new s(V)})(n,c,r,ie(e,0,O[c]+2)),e=ie(e,O[c]+2),o?t.error(new s(R)):f()):await a;const l=new i(e.length-W-(e.length-W)%E);t.enqueue(ne(n,e,l,0,W,!0))},async flush(e){const{signed:t,Y:n,Z:r,pending:o,ready:c}=this;await c;const f=ie(o,0,o.length-W),a=ie(o,o.length-W);let l=new i;if(f.length){const e=ce(J,f);r.update(e);const t=n.update(e);l=oe(J,t)}if(t){const e=ie(oe(J,r.digest()),0,W);for(let t=0;W>t;t++)if(e[t]!=a[t])throw new s(P)}e.enqueue(l)}})}}class te extends p{constructor({password:e,encryptionStrength:n}){let r;super({start(){t.assign(this,{ready:new u((e=>this.J=e)),password:e,X:n-1,pending:new i})},async transform(e,t){const n=this,{password:r,X:s,J:o,ready:c}=n;let f=new i;r?(f=await(async(e,t,n)=>{const r=B(new i(O[t]));return se(r,await re(e,t,n,r))})(n,s,r),o()):await c;const a=new i(f.length+e.length-e.length%E);a.set(f,0),t.enqueue(ne(n,e,a,f.length,0))},async flush(e){const{Y:t,Z:n,pending:s,ready:o}=this;await o;let c=new i;if(s.length){const e=t.update(ce(J,s));n.update(e),c=oe(J,e)}r.signature=oe(J,n.digest()).slice(0,W),e.enqueue(se(c,r.signature))}}),r=this}}function ne(e,t,n,r,s,o){const{Y:c,Z:f,pending:a}=e,l=t.length-s;let u;for(a.length&&(t=se(a,t),n=((e,t)=>{if(t&&t>e.length){const n=e;(e=new i(t)).set(n,0)}return e})(n,l-l%E)),u=0;l-E>=u;u+=E){const e=ce(J,ie(t,u,u+E));o&&f.update(e);const s=c.update(e);o||f.update(s),n.set(oe(J,s),u+r)}return e.pending=ie(t,u),n}async function re(n,r,s,o){n.password=null;const c=(e=>{if(void 0===w){const t=new i((e=unescape(encodeURIComponent(e))).length);for(let n=0;n{if(!Z)return I.importKey(t);try{return await q.importKey("raw",t,n,!1,s)}catch(e){return Z=!1,I.importKey(t)}})(0,c,K,0,N),a=await(async(e,t,n)=>{if(!$)return I.B(t,e.salt,U.iterations,n);try{return await q.deriveBits(e,t,n)}catch(r){return $=!1,I.B(t,e.salt,U.iterations,n)}})(t.assign({salt:o},U),f,8*(2*T[r]+2)),l=new i(a),u=ce(J,ie(l,0,T[r])),h=ce(J,ie(l,T[r],2*T[r])),d=ie(l,2*T[r]);return t.assign(n,{keys:{key:u,$:h,passwordVerification:d},Y:new X(new Q(u),e.from(j)),Z:new Y(h)}),d}function se(e,t){let n=e;return e.length+t.length&&(n=new i(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function ie(e,t,n){return e.subarray(t,n)}function oe(e,t){return e.m(t)}function ce(e,t){return e.g(t)}class fe extends p{constructor({password:e,passwordVerification:n,checkPasswordOnly:r}){super({start(){t.assign(this,{password:e,passwordVerification:n}),we(this,e)},transform(e,t){const n=this;if(n.password){const t=le(n,e.subarray(0,12));if(n.password=null,t[11]!=n.passwordVerification)throw new s(V);e=e.subarray(12)}r?t.error(new s(R)):t.enqueue(le(n,e))}})}}class ae extends p{constructor({password:e,passwordVerification:n}){super({start(){t.assign(this,{password:e,passwordVerification:n}),we(this,e)},transform(e,t){const n=this;let r,s;if(n.password){n.password=null;const t=B(new i(12));t[11]=n.passwordVerification,r=new i(e.length+t.length),r.set(ue(n,t),0),s=12}else r=new i(e.length),s=0;r.set(ue(n,e),s),t.enqueue(r)}})}}function le(e,t){const n=new i(t.length);for(let r=0;r>>24]),i=~e.te.get(),e.keys=[n,s,i]}function de(e){const t=2|e.keys[2];return pe(r.imul(t,1^t)>>>8)}function pe(e){return 255&e}function ye(e){return 4294967295&e}const me="deflate-raw";class be extends p{constructor(e,{chunkSize:t,CompressionStream:n,CompressionStreamNative:r}){super({});const{compressed:s,encrypted:i,useCompressionStream:o,zipCrypto:c,signed:f,level:a}=e,u=this;let w,h,d=ke(super.readable);i&&!c||!f||([d,w]=d.tee(),w=ze(w,new z)),s&&(d=Se(d,o,{level:a,chunkSize:t},r,n)),i&&(c?d=ze(d,new ae(e)):(h=new te(e),d=ze(d,h))),ve(u,d,(async()=>{let e;i&&!c&&(e=h.signature),i&&!c||!f||(e=await w.getReader().read(),e=new l(e.value.buffer).getUint32(0)),u.signature=e}))}}class ge extends p{constructor(e,{chunkSize:t,DecompressionStream:n,DecompressionStreamNative:r}){super({});const{zipCrypto:i,encrypted:o,signed:c,signature:f,compressed:a,useCompressionStream:u}=e;let w,h,d=ke(super.readable);o&&(i?d=ze(d,new fe(e)):(h=new ee(e),d=ze(d,h))),a&&(d=Se(d,u,{chunkSize:t},r,n)),o&&!i||!c||([d,w]=d.tee(),w=ze(w,new z)),ve(this,d,(async()=>{if((!o||i)&&c){const e=await w.getReader().read(),t=new l(e.value.buffer);if(f!=t.getUint32(0,!1))throw new s(P)}}))}}function ke(e){return ze(e,new p({transform(e,t){e&&e.length&&t.enqueue(e)}}))}function ve(e,n,r){n=ze(n,new p({flush:r})),t.defineProperty(e,"readable",{get:()=>n})}function Se(e,t,n,r,s){try{e=ze(e,new(t&&r?r:s)(me,n))}catch(r){if(!t)throw r;e=ze(e,new s(me,n))}return e}function ze(e,t){return e.pipeThrough(t)}const Ce="data";class xe extends p{constructor(e,n){super({});const r=this,{codecType:s}=e;let i;s.startsWith("deflate")?i=be:s.startsWith("inflate")&&(i=ge);let o=0;const c=new i(e,n),f=super.readable,a=new p({transform(e,t){e&&e.length&&(o+=e.length,t.enqueue(e))},flush(){const{signature:e}=c;t.assign(r,{signature:e,size:o})}});t.defineProperty(r,"readable",{get:()=>f.pipeThrough(c).pipeThrough(a)})}}const _e=new a,Ae=new a;let Ie=0;async function De(e){try{const{options:t,scripts:r,config:s}=e;r&&r.length&&importScripts.apply(void 0,r),self.initCodec&&self.initCodec(),s.CompressionStreamNative=self.CompressionStream,s.DecompressionStreamNative=self.DecompressionStream,self.Deflate&&(s.CompressionStream=new k(self.Deflate)),self.Inflate&&(s.DecompressionStream=new k(self.Inflate));const i={highWaterMark:1,size:()=>s.chunkSize},o=e.readable||new y({async pull(e){const t=new u((e=>_e.set(Ie,e)));Ve({type:"pull",messageId:Ie}),Ie=(Ie+1)%n.MAX_SAFE_INTEGER;const{value:r,done:s}=await t;e.enqueue(r),s&&e.close()}},i),c=e.writable||new m({async write(e){let t;const r=new u((e=>t=e));Ae.set(Ie,t),Ve({type:Ce,value:e,messageId:Ie}),Ie=(Ie+1)%n.MAX_SAFE_INTEGER,await r}},i),f=new xe(t,s);await o.pipeThrough(f).pipeTo(c,{preventClose:!0,preventAbort:!0});try{await c.close()}catch(e){}const{signature:a,size:l}=f;Ve({type:"close",result:{signature:a,size:l}})}catch(e){Pe(e)}}function Ve(e){let{value:t}=e;if(t)if(t.length)try{t=new i(t),e.value=t.buffer,d(e,[e.value])}catch(t){d(e)}else d(e);else d(e)}function Pe(e){const{message:t,stack:n,code:r,name:s}=e;d({error:{message:t,stack:n,code:r,name:s}})}addEventListener("message",(({data:e})=>{const{type:t,messageId:n,value:r,done:s}=e;try{if("start"==t&&De(e),t==Ce){const e=_e.get(n);_e.delete(n),e({value:new i(r),done:s})}if("ack"==t){const e=Ae.get(n);Ae.delete(n),e()}}catch(e){Pe(e)}}));const Re=-2;function Be(t){return Ee(t.map((([t,n])=>new e(t).fill(n,0,t))))}function Ee(t){return t.reduce(((t,n)=>t.concat(e.isArray(n)?Ee(n):n)),[])}const Me=[0,1,2,3].concat(...Be([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function Ke(){const e=this;function t(e,t){let n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1}e.ne=n=>{const s=e.re,i=e.ie.se,o=e.ie.oe;let c,f,a,l=-1;for(n.ce=0,n.fe=573,c=0;o>c;c++)0!==s[2*c]?(n.ae[++n.ce]=l=c,n.le[c]=0):s[2*c+1]=0;for(;2>n.ce;)a=n.ae[++n.ce]=2>l?++l:0,s[2*a]=1,n.le[a]=0,n.ue--,i&&(n.we-=i[2*a+1]);for(e.he=l,c=r.floor(n.ce/2);c>=1;c--)n.de(s,c);a=o;do{c=n.ae[1],n.ae[1]=n.ae[n.ce--],n.de(s,1),f=n.ae[1],n.ae[--n.fe]=c,n.ae[--n.fe]=f,s[2*a]=s[2*c]+s[2*f],n.le[a]=r.max(n.le[c],n.le[f])+1,s[2*c+1]=s[2*f+1]=a,n.ae[1]=a++,n.de(s,1)}while(n.ce>=2);n.ae[--n.fe]=n.ae[1],(t=>{const n=e.re,r=e.ie.se,s=e.ie.pe,i=e.ie.ye,o=e.ie.me;let c,f,a,l,u,w,h=0;for(l=0;15>=l;l++)t.be[l]=0;for(n[2*t.ae[t.fe]+1]=0,c=t.fe+1;573>c;c++)f=t.ae[c],l=n[2*n[2*f+1]+1]+1,l>o&&(l=o,h++),n[2*f+1]=l,f>e.he||(t.be[l]++,u=0,i>f||(u=s[f-i]),w=n[2*f],t.ue+=w*(l+u),r&&(t.we+=w*(r[2*f+1]+u)));if(0!==h){do{for(l=o-1;0===t.be[l];)l--;t.be[l]--,t.be[l+1]+=2,t.be[o]--,h-=2}while(h>0);for(l=o;0!==l;l--)for(f=t.be[l];0!==f;)a=t.ae[--c],a>e.he||(n[2*a+1]!=l&&(t.ue+=(l-n[2*a+1])*n[2*a],n[2*a+1]=l),f--)}})(n),((e,n,r)=>{const s=[];let i,o,c,f=0;for(i=1;15>=i;i++)s[i]=f=f+r[i-1]<<1;for(o=0;n>=o;o++)c=e[2*o+1],0!==c&&(e[2*o]=t(s[c]++,c))})(s,e.he,n.be)}}function Ue(e,t,n,r,s){const i=this;i.se=e,i.pe=t,i.ye=n,i.oe=r,i.me=s}Ke.ge=[0,1,2,3,4,5,6,7].concat(...Be([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]])),Ke.ke=[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],Ke.ve=[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],Ke.Se=e=>256>e?Me[e]:Me[256+(e>>>7)],Ke.ze=[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],Ke.Ce=[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],Ke.xe=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],Ke._e=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];const Ne=Be([[144,8],[112,9],[24,7],[8,8]]);Ue.Ae=Ee([12,140,76,204,44,172,108,236,28,156,92,220,60,188,124,252,2,130,66,194,34,162,98,226,18,146,82,210,50,178,114,242,10,138,74,202,42,170,106,234,26,154,90,218,58,186,122,250,6,134,70,198,38,166,102,230,22,150,86,214,54,182,118,246,14,142,78,206,46,174,110,238,30,158,94,222,62,190,126,254,1,129,65,193,33,161,97,225,17,145,81,209,49,177,113,241,9,137,73,201,41,169,105,233,25,153,89,217,57,185,121,249,5,133,69,197,37,165,101,229,21,149,85,213,53,181,117,245,13,141,77,205,45,173,109,237,29,157,93,221,61,189,125,253,19,275,147,403,83,339,211,467,51,307,179,435,115,371,243,499,11,267,139,395,75,331,203,459,43,299,171,427,107,363,235,491,27,283,155,411,91,347,219,475,59,315,187,443,123,379,251,507,7,263,135,391,71,327,199,455,39,295,167,423,103,359,231,487,23,279,151,407,87,343,215,471,55,311,183,439,119,375,247,503,15,271,143,399,79,335,207,463,47,303,175,431,111,367,239,495,31,287,159,415,95,351,223,479,63,319,191,447,127,383,255,511,0,64,32,96,16,80,48,112,8,72,40,104,24,88,56,120,4,68,36,100,20,84,52,116,3,131,67,195,35,163,99,227].map(((e,t)=>[e,Ne[t]])));const Oe=Be([[30,5]]);function Te(e,t,n,r,s){const i=this;i.Ie=e,i.De=t,i.Ve=n,i.Pe=r,i.Re=s}Ue.Be=Ee([0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30,1,17,9,25,5,21,13,29,3,19,11,27,7,23].map(((e,t)=>[e,Oe[t]]))),Ue.Ee=new Ue(Ue.Ae,Ke.ze,257,286,15),Ue.Me=new Ue(Ue.Be,Ke.Ce,0,30,15),Ue.Ke=new Ue(null,Ke.xe,0,19,7);const We=[new Te(0,0,0,0,0),new Te(4,4,8,4,1),new Te(4,5,16,8,1),new Te(4,6,32,32,1),new Te(4,4,16,16,2),new Te(8,16,32,32,2),new Te(8,16,128,128,2),new Te(8,32,128,256,2),new Te(32,128,258,1024,2),new Te(32,258,258,4096,2)],je=["need dictionary","stream end","","","stream error","data error","","buffer error","",""],He=113,Le=666,Fe=262;function qe(e,t,n,r){const s=e[2*t],i=e[2*n];return i>s||s==i&&r[t]<=r[n]}function Ge(){const e=this;let t,n,s,c,f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z,C,x,_,A,I,D,V,P,R,B,E,M,K;const U=new Ke,N=new Ke,O=new Ke;let T,W,j,H,L,F;function q(){let t;for(t=0;286>t;t++)E[2*t]=0;for(t=0;30>t;t++)M[2*t]=0;for(t=0;19>t;t++)K[2*t]=0;E[512]=1,e.ue=e.we=0,W=j=0}function G(e,t){let n,r=-1,s=e[1],i=0,o=7,c=4;0===s&&(o=138,c=3),e[2*(t+1)+1]=65535;for(let f=0;t>=f;f++)n=s,s=e[2*(f+1)+1],++ii?K[2*n]+=i:0!==n?(n!=r&&K[2*n]++,K[32]++):i>10?K[36]++:K[34]++,i=0,r=n,0===s?(o=138,c=3):n==s?(o=6,c=3):(o=7,c=4))}function J(t){e.Ue[e.pending++]=t}function Q(e){J(255&e),J(e>>>8&255)}function X(e,t){let n;const r=t;F>16-r?(n=e,L|=n<>>16-F,F+=r-16):(L|=e<=n;n++)if(r=i,i=e[2*(n+1)+1],++o>=c||r!=i){if(f>o)do{Y(r,K)}while(0!=--o);else 0!==r?(r!=s&&(Y(r,K),o--),Y(16,K),X(o-3,2)):o>10?(Y(18,K),X(o-11,7)):(Y(17,K),X(o-3,3));o=0,s=r,0===i?(c=138,f=3):r==i?(c=6,f=3):(c=7,f=4)}}function $(){16==F?(Q(L),L=0,F=0):8>F||(J(255&L),L>>>=8,F-=8)}function ee(t,n){let s,i,o;if(e.Ne[W]=t,e.Oe[W]=255&n,W++,0===t?E[2*n]++:(j++,t--,E[2*(Ke.ge[n]+256+1)]++,M[2*Ke.Se(t)]++),0==(8191&W)&&V>2){for(s=8*W,i=C-k,o=0;30>o;o++)s+=M[2*o]*(5+Ke.Ce[o]);if(s>>>=3,jc);Y(256,t),H=t[513]}function ne(){F>8?Q(L):F>0&&J(255&L),L=0,F=0}function re(t,n,r){X(0+(r?1:0),3),((t,n)=>{ne(),H=8,Q(n),Q(~n),e.Ue.set(u.subarray(t,t+n),e.pending),e.pending+=n})(t,n)}function se(n){((t,n,r)=>{let s,i,o=0;V>0?(U.ne(e),N.ne(e),o=(()=>{let t;for(G(E,U.he),G(M,N.he),O.ne(e),t=18;t>=3&&0===K[2*Ke._e[t]+1];t--);return e.ue+=14+3*(t+1),t})(),s=e.ue+3+7>>>3,i=e.we+3+7>>>3,i>s||(s=i)):s=i=n+5,n+4>s||-1==t?i==s?(X(2+(r?1:0),3),te(Ue.Ae,Ue.Be)):(X(4+(r?1:0),3),((e,t,n)=>{let r;for(X(e-257,5),X(t-1,5),X(n-4,4),r=0;n>r;r++)X(K[2*Ke._e[r]+1],3);Z(E,e-1),Z(M,t-1)})(U.he+1,N.he+1,o+1),te(E,M)):re(t,n,r),q(),r&&ne()})(0>k?-1:k,C-k,n),k=C,t.Te()}function ie(){let e,n,r,s;do{if(s=w-_-C,0===s&&0===C&&0===_)s=f;else if(-1==s)s--;else if(C>=f+f-Fe){u.set(u.subarray(f,f+f),0),x-=f,C-=f,k-=f,e=y,r=e;do{n=65535&d[--r],d[r]=f>n?0:n-f}while(0!=--e);e=f,r=e;do{n=65535&h[--r],h[r]=f>n?0:n-f}while(0!=--e);s+=f}if(0===t.We)return;e=t.je(u,C+_,s),_+=e,3>_||(p=255&u[C],p=(p<_&&0!==t.We)}function oe(e){let t,n,r=I,s=C,i=A;const o=C>f-Fe?C-(f-Fe):0;let c=B;const a=l,w=C+258;let d=u[s+i-1],p=u[s+i];R>A||(r>>=2),c>_&&(c=_);do{if(t=e,u[t+i]==p&&u[t+i-1]==d&&u[t]==u[s]&&u[++t]==u[s+1]){s+=2,t++;do{}while(u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&w>s);if(n=258-(w-s),s=w-258,n>i){if(x=e,i=n,n>=c)break;d=u[s+i-1],p=u[s+i]}}}while((e=65535&h[e&a])>o&&0!=--r);return i>_?_:i}e.le=[],e.be=[],e.ae=[],E=[],M=[],K=[],e.de=(t,n)=>{const r=e.ae,s=r[n];let i=n<<1;for(;i<=e.ce&&(i(W||(W=8),j||(j=8),G||(G=0),t.Le=null,-1==S&&(S=6),1>j||j>9||8!=W||9>x||x>15||0>S||S>9||0>G||G>2?Re:(t.Fe=e,a=x,f=1<(t.qe=t.Ge=0,t.Le=null,e.pending=0,e.Je=0,n=He,c=0,U.re=E,U.ie=Ue.Ee,N.re=M,N.ie=Ue.Me,O.re=K,O.ie=Ue.Ke,L=0,F=0,H=8,q(),(()=>{w=2*f,d[y-1]=0;for(let e=0;y-1>e;e++)d[e]=0;D=We[V].De,R=We[V].Ie,B=We[V].Ve,I=We[V].Pe,C=0,k=0,_=0,v=A=2,z=0,p=0})(),0))(t))),e.Qe=()=>42!=n&&n!=He&&n!=Le?Re:(e.Oe=null,e.Ne=null,e.Ue=null,d=null,h=null,u=null,e.Fe=null,n==He?-3:0),e.Xe=(e,t,n)=>{let r=0;return-1==t&&(t=6),0>t||t>9||0>n||n>2?Re:(We[V].Re!=We[t].Re&&0!==e.qe&&(r=e.Ye(1)),V!=t&&(V=t,D=We[V].De,R=We[V].Ie,B=We[V].Ve,I=We[V].Pe),P=n,r)},e.Ze=(e,t,r)=>{let s,i=r,o=0;if(!t||42!=n)return Re;if(3>i)return 0;for(i>f-Fe&&(i=f-Fe,o=r-i),u.set(t.subarray(o,o+i),0),C=i,k=i,p=255&u[0],p=(p<=s;s++)p=(p<{let o,w,m,I,R;if(i>4||0>i)return Re;if(!r.$e||!r.et&&0!==r.We||n==Le&&4!=i)return r.Le=je[4],Re;if(0===r.tt)return r.Le=je[7],-5;var B;if(t=r,I=c,c=i,42==n&&(w=8+(a-8<<4)<<8,m=(V-1&255)>>1,m>3&&(m=3),w|=m<<6,0!==C&&(w|=32),w+=31-w%31,n=He,J((B=w)>>8&255),J(255&B)),0!==e.pending){if(t.Te(),0===t.tt)return c=-1,0}else if(0===t.We&&I>=i&&4!=i)return t.Le=je[7],-5;if(n==Le&&0!==t.We)return r.Le=je[7],-5;if(0!==t.We||0!==_||0!=i&&n!=Le){switch(R=-1,We[V].Re){case 0:R=(e=>{let n,r=65535;for(r>s-5&&(r=s-5);;){if(1>=_){if(ie(),0===_&&0==e)return 0;if(0===_)break}if(C+=_,_=0,n=k+r,(0===C||C>=n)&&(_=C-n,C=n,se(!1),0===t.tt))return 0;if(C-k>=f-Fe&&(se(!1),0===t.tt))return 0}return se(4==e),0===t.tt?4==e?2:0:4==e?3:1})(i);break;case 1:R=(e=>{let n,r=0;for(;;){if(Fe>_){if(ie(),Fe>_&&0==e)return 0;if(0===_)break}if(3>_||(p=(p<f-Fe||2!=P&&(v=oe(r)),3>v)n=ee(0,255&u[C]),_--,C++;else if(n=ee(C-x,v-3),_-=v,v>D||3>_)C+=v,v=0,p=255&u[C],p=(p<{let n,r,s=0;for(;;){if(Fe>_){if(ie(),Fe>_&&0==e)return 0;if(0===_)break}if(3>_||(p=(p<A&&f-Fe>=(C-s&65535)&&(2!=P&&(v=oe(s)),5>=v&&(1==P||3==v&&C-x>4096)&&(v=2)),3>A||v>A)if(0!==z){if(n=ee(0,255&u[C-1]),n&&se(!1),C++,_--,0===t.tt)return 0}else z=1,C++,_--;else{r=C+_-3,n=ee(C-1-S,A-3),_-=A-1,A-=2;do{++C>r||(p=(p<1+H+10-F&&(X(2,3),Y(256,Ue.Ae),$()),H=7;else if(re(0,0,!1),3==i)for(o=0;y>o;o++)d[o]=0;if(t.Te(),0===t.tt)return c=-1,0}}return 4!=i?0:1}}function Je(){const e=this;e.nt=0,e.rt=0,e.We=0,e.qe=0,e.tt=0,e.Ge=0}function Qe(e){const t=new Je,n=(o=e&&e.chunkSize?e.chunkSize:65536)+5*(r.floor(o/16383)+1);var o;const c=new i(n);let f=e?e.level:-1;void 0===f&&(f=-1),t.He(f),t.$e=c,this.append=(e,r)=>{let o,f,a=0,l=0,u=0;const w=[];if(e.length){t.nt=0,t.et=e,t.We=e.length;do{if(t.rt=0,t.tt=n,o=t.Ye(0),0!=o)throw new s("deflating: "+t.Le);t.rt&&(t.rt==n?w.push(new i(c)):w.push(c.slice(0,t.rt))),u+=t.rt,r&&t.nt>0&&t.nt!=a&&(r(t.nt),a=t.nt)}while(t.We>0||0===t.tt);return w.length>1?(f=new i(u),w.forEach((e=>{f.set(e,l),l+=e.length}))):f=w[0]||new i,f}},this.flush=()=>{let e,r,o=0,f=0;const a=[];do{if(t.rt=0,t.tt=n,e=t.Ye(4),1!=e&&0!=e)throw new s("deflating: "+t.Le);n-t.tt>0&&a.push(c.slice(0,t.rt)),f+=t.rt}while(t.We>0||0===t.tt);return t.Qe(),r=new i(f),a.forEach((e=>{r.set(e,o),o+=e.length})),r}}Je.prototype={He(e,t){const n=this;return n.Fe=new Ge,t||(t=15),n.Fe.He(n,e,t)},Ye(e){const t=this;return t.Fe?t.Fe.Ye(t,e):Re},Qe(){const e=this;if(!e.Fe)return Re;const t=e.Fe.Qe();return e.Fe=null,t},Xe(e,t){const n=this;return n.Fe?n.Fe.Xe(n,e,t):Re},Ze(e,t){const n=this;return n.Fe?n.Fe.Ze(n,e,t):Re},je(e,t,n){const r=this;let s=r.We;return s>n&&(s=n),0===s?0:(r.We-=s,e.set(r.et.subarray(r.nt,r.nt+s),t),r.nt+=s,r.qe+=s,s)},Te(){const e=this;let t=e.Fe.pending;t>e.tt&&(t=e.tt),0!==t&&(e.$e.set(e.Fe.Ue.subarray(e.Fe.Je,e.Fe.Je+t),e.rt),e.rt+=t,e.Fe.Je+=t,e.Ge+=t,e.tt-=t,e.Fe.pending-=t,0===e.Fe.pending&&(e.Fe.Je=0))}};const Xe=-2,Ye=-3,Ze=-5,$e=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],et=[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],tt=[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],nt=[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],rt=[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],st=[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],it=[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 ot(){let e,t,n,r,s,i;function o(e,t,o,c,f,a,l,u,w,h,d){let p,y,m,b,g,k,v,S,z,C,x,_,A,I,D;C=0,g=o;do{n[e[t+C]]++,C++,g--}while(0!==g);if(n[0]==o)return l[0]=-1,u[0]=0,0;for(S=u[0],k=1;15>=k&&0===n[k];k++);for(v=k,k>S&&(S=k),g=15;0!==g&&0===n[g];g--);for(m=g,S>g&&(S=g),u[0]=S,I=1<k;k++,I<<=1)if(0>(I-=n[k]))return Ye;if(0>(I-=n[g]))return Ye;for(n[g]+=I,i[1]=k=0,C=1,A=2;0!=--g;)i[A]=k+=n[C],A++,C++;g=0,C=0;do{0!==(k=e[t+C])&&(d[i[k]++]=g),C++}while(++g=v;v++)for(p=n[v];0!=p--;){for(;v>_+S;){if(b++,_+=S,D=m-_,D=D>S?S:D,(y=1<<(k=v-_))>p+1&&(y-=p+1,A=v,D>k))for(;++kn[++A];)y-=n[A];if(D=1<1440)return Ye;s[b]=x=h[0],h[0]+=D,0!==b?(i[b]=g,r[0]=k,r[1]=S,k=g>>>_-S,r[2]=x-s[b-1]-k,w.set(r,3*(s[b-1]+k))):l[0]=x}for(r[1]=v-_,o>C?d[C]d[C]?0:96,r[2]=d[C++]):(r[0]=a[d[C]-c]+16+64,r[2]=f[d[C++]-c]):r[0]=192,y=1<>>_;D>k;k+=y)w.set(r,3*(x+k));for(k=1<>>=1)g^=k;for(g^=k,z=(1<<_)-1;(g&z)!=i[b];)b--,_-=S,z=(1<<_)-1}return 0!==I&&1!=m?Ze:0}function c(o){let c;for(e||(e=[],t=[],n=new f(16),r=[],s=new f(15),i=new f(16)),t.lengthc;c++)t[c]=0;for(c=0;16>c;c++)n[c]=0;for(c=0;3>c;c++)r[c]=0;s.set(n.subarray(0,15),0),i.set(n.subarray(0,16),0)}this.st=(n,r,s,i,f)=>{let a;return c(19),e[0]=0,a=o(n,0,19,19,null,null,s,r,i,e,t),a==Ye?f.Le="oversubscribed dynamic bit lengths tree":a!=Ze&&0!==r[0]||(f.Le="incomplete dynamic bit lengths tree",a=Ye),a},this.it=(n,r,s,i,f,a,l,u,w)=>{let h;return c(288),e[0]=0,h=o(s,0,n,257,nt,rt,a,i,u,e,t),0!=h||0===i[0]?(h==Ye?w.Le="oversubscribed literal/length tree":-4!=h&&(w.Le="incomplete literal/length tree",h=Ye),h):(c(288),h=o(s,n,r,0,st,it,l,f,u,e,t),0!=h||0===f[0]&&n>257?(h==Ye?w.Le="oversubscribed distance tree":h==Ze?(w.Le="incomplete distance tree",h=Ye):-4!=h&&(w.Le="empty distance tree with lengths",h=Ye),h):0)}}function ct(){const e=this;let t,n,r,s,i=0,o=0,c=0,f=0,a=0,l=0,u=0,w=0,h=0,d=0;function p(e,t,n,r,s,i,o,c){let f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z;d=c.nt,p=c.We,w=o.ot,h=o.ct,y=o.write,m=yh;)p--,w|=(255&c.ft(d++))<>=a[z+1],h-=a[z+1],0!=(16&u)){for(u&=15,k=a[z+2]+(w&$e[u]),w>>=u,h-=u;15>h;)p--,w|=(255&c.ft(d++))<>=a[z+1],h-=a[z+1],0!=(16&u)){for(u&=15;u>h;)p--,w|=(255&c.ft(d++))<>=u,h-=u,m-=k,v>y){S=y-v;do{S+=o.end}while(0>S);if(u=o.end-S,k>u){if(k-=u,y-S>0&&u>y-S)do{o.lt[y++]=o.lt[S++]}while(0!=--u);else o.lt.set(o.lt.subarray(S,S+u),y),y+=u,S+=u,u=0;S=0}}else S=y-v,y-S>0&&2>y-S?(o.lt[y++]=o.lt[S++],o.lt[y++]=o.lt[S++],k-=2):(o.lt.set(o.lt.subarray(S,S+2),y),y+=2,S+=2,k-=2);if(y-S>0&&k>y-S)do{o.lt[y++]=o.lt[S++]}while(0!=--k);else o.lt.set(o.lt.subarray(S,S+k),y),y+=k,S+=k,k=0;break}if(0!=(64&u))return c.Le="invalid distance code",k=c.We-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ot=w,o.ct=h,c.We=p,c.qe+=d-c.nt,c.nt=d,o.write=y,Ye;f+=a[z+2],f+=w&$e[u],z=3*(l+f),u=a[z]}break}if(0!=(64&u))return 0!=(32&u)?(k=c.We-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ot=w,o.ct=h,c.We=p,c.qe+=d-c.nt,c.nt=d,o.write=y,1):(c.Le="invalid literal/length code",k=c.We-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ot=w,o.ct=h,c.We=p,c.qe+=d-c.nt,c.nt=d,o.write=y,Ye);if(f+=a[z+2],f+=w&$e[u],z=3*(l+f),0===(u=a[z])){w>>=a[z+1],h-=a[z+1],o.lt[y++]=a[z+2],m--;break}}else w>>=a[z+1],h-=a[z+1],o.lt[y++]=a[z+2],m--}while(m>=258&&p>=10);return k=c.We-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ot=w,o.ct=h,c.We=p,c.qe+=d-c.nt,c.nt=d,o.write=y,0}e.init=(e,i,o,c,f,a)=>{t=0,u=e,w=i,r=o,h=c,s=f,d=a,n=null},e.ut=(e,y,m)=>{let b,g,k,v,S,z,C,x=0,_=0,A=0;for(A=y.nt,v=y.We,x=e.ot,_=e.ct,S=e.write,z=S=258&&v>=10&&(e.ot=x,e.ct=_,y.We=v,y.qe+=A-y.nt,y.nt=A,e.write=S,m=p(u,w,r,h,s,d,e,y),A=y.nt,v=y.We,x=e.ot,_=e.ct,S=e.write,z=S_;){if(0===v)return e.ot=x,e.ct=_,y.We=v,y.qe+=A-y.nt,y.nt=A,e.write=S,e.wt(y,m);m=0,v--,x|=(255&y.ft(A++))<<_,_+=8}if(g=3*(o+(x&$e[b])),x>>>=n[g+1],_-=n[g+1],k=n[g],0===k){f=n[g+2],t=6;break}if(0!=(16&k)){a=15&k,i=n[g+2],t=2;break}if(0==(64&k)){c=k,o=g/3+n[g+2];break}if(0!=(32&k)){t=7;break}return t=9,y.Le="invalid literal/length code",m=Ye,e.ot=x,e.ct=_,y.We=v,y.qe+=A-y.nt,y.nt=A,e.write=S,e.wt(y,m);case 2:for(b=a;b>_;){if(0===v)return e.ot=x,e.ct=_,y.We=v,y.qe+=A-y.nt,y.nt=A,e.write=S,e.wt(y,m);m=0,v--,x|=(255&y.ft(A++))<<_,_+=8}i+=x&$e[b],x>>=b,_-=b,c=w,n=s,o=d,t=3;case 3:for(b=c;b>_;){if(0===v)return e.ot=x,e.ct=_,y.We=v,y.qe+=A-y.nt,y.nt=A,e.write=S,e.wt(y,m);m=0,v--,x|=(255&y.ft(A++))<<_,_+=8}if(g=3*(o+(x&$e[b])),x>>=n[g+1],_-=n[g+1],k=n[g],0!=(16&k)){a=15&k,l=n[g+2],t=4;break}if(0==(64&k)){c=k,o=g/3+n[g+2];break}return t=9,y.Le="invalid distance code",m=Ye,e.ot=x,e.ct=_,y.We=v,y.qe+=A-y.nt,y.nt=A,e.write=S,e.wt(y,m);case 4:for(b=a;b>_;){if(0===v)return e.ot=x,e.ct=_,y.We=v,y.qe+=A-y.nt,y.nt=A,e.write=S,e.wt(y,m);m=0,v--,x|=(255&y.ft(A++))<<_,_+=8}l+=x&$e[b],x>>=b,_-=b,t=5;case 5:for(C=S-l;0>C;)C+=e.end;for(;0!==i;){if(0===z&&(S==e.end&&0!==e.read&&(S=0,z=S7&&(_-=8,v++,A--),e.write=S,m=e.wt(y,m),S=e.write,z=S{}}ot.dt=(e,t,n,r)=>(e[0]=9,t[0]=5,n[0]=et,r[0]=tt,0);const ft=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function at(e,t){const n=this;let r,s=0,o=0,c=0,a=0;const l=[0],u=[0],w=new ct;let h=0,d=new f(4320);const p=new ot;n.ct=0,n.ot=0,n.lt=new i(t),n.end=t,n.read=0,n.write=0,n.reset=(e,t)=>{t&&(t[0]=0),6==s&&w.ht(e),s=0,n.ct=0,n.ot=0,n.read=n.write=0},n.reset(e,null),n.wt=(e,t)=>{let r,s,i;return s=e.rt,i=n.read,r=(i>n.write?n.end:n.write)-i,r>e.tt&&(r=e.tt),0!==r&&t==Ze&&(t=0),e.tt-=r,e.Ge+=r,e.$e.set(n.lt.subarray(i,i+r),s),s+=r,i+=r,i==n.end&&(i=0,n.write==n.end&&(n.write=0),r=n.write-i,r>e.tt&&(r=e.tt),0!==r&&t==Ze&&(t=0),e.tt-=r,e.Ge+=r,e.$e.set(n.lt.subarray(i,i+r),s),s+=r,i+=r),e.rt=s,n.read=i,t},n.ut=(e,t)=>{let i,f,y,m,b,g,k,v;for(m=e.nt,b=e.We,f=n.ot,y=n.ct,g=n.write,k=gy;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<>>1){case 0:f>>>=3,y-=3,i=7&y,f>>>=i,y-=i,s=1;break;case 1:S=[],z=[],C=[[]],x=[[]],ot.dt(S,z,C,x),w.init(S[0],z[0],C[0],0,x[0],0),f>>>=3,y-=3,s=6;break;case 2:f>>>=3,y-=3,s=3;break;case 3:return f>>>=3,y-=3,s=9,e.Le="invalid block type",t=Ye,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t)}break;case 1:for(;32>y;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<>>16&65535)!=(65535&f))return s=9,e.Le="invalid stored block lengths",t=Ye,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);o=65535&f,f=y=0,s=0!==o?2:0!==h?7:0;break;case 2:if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);if(0===k&&(g==n.end&&0!==n.read&&(g=0,k=gb&&(i=b),i>k&&(i=k),n.lt.set(e.je(m,i),g),m+=i,b-=i,g+=i,k-=i,0!=(o-=i))break;s=0!==h?7:0;break;case 3:for(;14>y;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<29||(i>>5&31)>29)return s=9,e.Le="too many length or distance symbols",t=Ye,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);if(i=258+(31&i)+(i>>5&31),!r||r.lengthv;v++)r[v]=0;f>>>=14,y-=14,a=0,s=4;case 4:for(;4+(c>>>10)>a;){for(;3>y;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<>>=3,y-=3}for(;19>a;)r[ft[a++]]=0;if(l[0]=7,i=p.st(r,l,u,d,e),0!=i)return(t=i)==Ye&&(r=null,s=9),n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);a=0,s=5;case 5:for(;i=c,258+(31&i)+(i>>5&31)>a;){let o,w;for(i=l[0];i>y;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<w)f>>>=i,y-=i,r[a++]=w;else{for(v=18==w?7:w-14,o=18==w?11:3;i+v>y;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<>>=i,y-=i,o+=f&$e[v],f>>>=v,y-=v,v=a,i=c,v+o>258+(31&i)+(i>>5&31)||16==w&&1>v)return r=null,s=9,e.Le="invalid bit length repeat",t=Ye,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);w=16==w?r[v-1]:0;do{r[v++]=w}while(0!=--o);a=v}}if(u[0]=-1,_=[],A=[],I=[],D=[],_[0]=9,A[0]=6,i=c,i=p.it(257+(31&i),1+(i>>5&31),r,_,A,I,D,d,e),0!=i)return i==Ye&&(r=null,s=9),t=i,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);w.init(_[0],A[0],d,I[0],d,D[0]),s=6;case 6:if(n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,1!=(t=w.ut(n,e,t)))return n.wt(e,t);if(t=0,w.ht(e),m=e.nt,b=e.We,f=n.ot,y=n.ct,g=n.write,k=g{n.reset(e,null),n.lt=null,d=null},n.yt=(e,t,r)=>{n.lt.set(e.subarray(t,t+r),0),n.read=n.write=r},n.bt=()=>1==s?1:0}const lt=13,ut=[0,0,255,255];function wt(){const e=this;function t(e){return e&&e.gt?(e.qe=e.Ge=0,e.Le=null,e.gt.mode=7,e.gt.kt.reset(e,null),0):Xe}e.mode=0,e.method=0,e.vt=[0],e.St=0,e.marker=0,e.zt=0,e.Ct=t=>(e.kt&&e.kt.ht(t),e.kt=null,0),e.xt=(n,r)=>(n.Le=null,e.kt=null,8>r||r>15?(e.Ct(n),Xe):(e.zt=r,n.gt.kt=new at(n,1<{let n,r;if(!e||!e.gt||!e.et)return Xe;const s=e.gt;for(t=4==t?Ze:0,n=Ze;;)switch(s.mode){case 0:if(0===e.We)return n;if(n=t,e.We--,e.qe++,8!=(15&(s.method=e.ft(e.nt++)))){s.mode=lt,e.Le="unknown compression method",s.marker=5;break}if(8+(s.method>>4)>s.zt){s.mode=lt,e.Le="invalid win size",s.marker=5;break}s.mode=1;case 1:if(0===e.We)return n;if(n=t,e.We--,e.qe++,r=255&e.ft(e.nt++),((s.method<<8)+r)%31!=0){s.mode=lt,e.Le="incorrect header check",s.marker=5;break}if(0==(32&r)){s.mode=7;break}s.mode=2;case 2:if(0===e.We)return n;n=t,e.We--,e.qe++,s.St=(255&e.ft(e.nt++))<<24&4278190080,s.mode=3;case 3:if(0===e.We)return n;n=t,e.We--,e.qe++,s.St+=(255&e.ft(e.nt++))<<16&16711680,s.mode=4;case 4:if(0===e.We)return n;n=t,e.We--,e.qe++,s.St+=(255&e.ft(e.nt++))<<8&65280,s.mode=5;case 5:return 0===e.We?n:(n=t,e.We--,e.qe++,s.St+=255&e.ft(e.nt++),s.mode=6,2);case 6:return s.mode=lt,e.Le="need dictionary",s.marker=0,Xe;case 7:if(n=s.kt.ut(e,n),n==Ye){s.mode=lt,s.marker=0;break}if(0==n&&(n=t),1!=n)return n;n=t,s.kt.reset(e,s.vt),s.mode=12;case 12:return e.We=0,1;case lt:return Ye;default:return Xe}},e.At=(e,t,n)=>{let r=0,s=n;if(!e||!e.gt||6!=e.gt.mode)return Xe;const i=e.gt;return s<1<{let n,r,s,i,o;if(!e||!e.gt)return Xe;const c=e.gt;if(c.mode!=lt&&(c.mode=lt,c.marker=0),0===(n=e.We))return Ze;for(r=e.nt,s=c.marker;0!==n&&4>s;)e.ft(r)==ut[s]?s++:s=0!==e.ft(r)?0:4-s,r++,n--;return e.qe+=r-e.nt,e.nt=r,e.We=n,c.marker=s,4!=s?Ye:(i=e.qe,o=e.Ge,t(e),e.qe=i,e.Ge=o,c.mode=7,0)},e.Dt=e=>e&&e.gt&&e.gt.kt?e.gt.kt.bt():Xe}function ht(){}function dt(e){const t=new ht,n=e&&e.chunkSize?r.floor(2*e.chunkSize):131072,o=new i(n);let c=!1;t.xt(),t.$e=o,this.append=(e,r)=>{const f=[];let a,l,u=0,w=0,h=0;if(0!==e.length){t.nt=0,t.et=e,t.We=e.length;do{if(t.rt=0,t.tt=n,0!==t.We||c||(t.nt=0,c=!0),a=t._t(0),c&&a===Ze){if(0!==t.We)throw new s("inflating: bad input")}else if(0!==a&&1!==a)throw new s("inflating: "+t.Le);if((c||1===a)&&t.We===e.length)throw new s("inflating: bad input");t.rt&&(t.rt===n?f.push(new i(o)):f.push(o.slice(0,t.rt))),h+=t.rt,r&&t.nt>0&&t.nt!=u&&(r(t.nt),u=t.nt)}while(t.We>0||0===t.tt);return f.length>1?(l=new i(h),f.forEach((e=>{l.set(e,w),w+=e.length}))):l=f[0]||new i,l}},this.flush=()=>{t.Ct()}}ht.prototype={xt(e){const t=this;return t.gt=new wt,e||(e=15),t.gt.xt(t,e)},_t(e){const t=this;return t.gt?t.gt._t(t,e):Xe},Ct(){const e=this;if(!e.gt)return Xe;const t=e.gt.Ct(e);return e.gt=null,t},It(){const e=this;return e.gt?e.gt.It(e):Xe},At(e,t){const n=this;return n.gt?n.gt.At(n,e,t):Xe},ft(e){return this.et[e]},je(e,t){return this.et.subarray(e,e+t)}},self.initCodec=()=>{self.Deflate=Qe,self.Inflate=dt};\n'],{type:"text/javascript"}));e({workerScripts:{inflate:[t],deflate:[t]}})}(He),He({Deflate:function(e){const t=new Y,n=(i=e&&e.chunkSize?e.chunkSize:65536)+5*(Math.floor(i/16383)+1);var i;const r=z,s=new Uint8Array(n);let a=e?e.level:S;void 0===a&&(a=S),t.deflateInit(a),t.next_out=s,this.append=function(e,i){let a,o,c=0,l=0,d=0;const f=[];if(e.length){t.next_in_index=0,t.next_in=e,t.avail_in=e.length;do{if(t.next_out_index=0,t.avail_out=n,a=t.deflate(r),a!=A)throw new Error("deflating: "+t.msg);t.next_out_index&&(t.next_out_index==n?f.push(new Uint8Array(s)):f.push(s.slice(0,t.next_out_index))),d+=t.next_out_index,i&&t.next_in_index>0&&t.next_in_index!=c&&(i(t.next_in_index),c=t.next_in_index)}while(t.avail_in>0||0===t.avail_out);return f.length>1?(o=new Uint8Array(d),f.forEach((function(e){o.set(e,l),l+=e.length}))):o=f[0]||new Uint8Array,o}},this.flush=function(){let e,i,r=0,a=0;const o=[];do{if(t.next_out_index=0,t.avail_out=n,e=t.deflate(C),e!=U&&e!=A)throw new Error("deflating: "+t.msg);n-t.avail_out>0&&o.push(s.slice(0,t.next_out_index)),a+=t.next_out_index}while(t.avail_in>0||0===t.avail_out);return t.deflateEnd(),i=new Uint8Array(a),o.forEach((function(e){i.set(e,r),r+=e.length})),i}},Inflate:function(e){const t=new Re,n=e&&e.chunkSize?Math.floor(2*e.chunkSize):131072,i=new Uint8Array(n);let r=!1;t.inflateInit(),t.next_out=i,this.append=function(e,s){const a=[];let o,c,l=0,d=0,f=0;if(0!==e.length){t.next_in_index=0,t.next_in=e,t.avail_in=e.length;do{if(t.next_out_index=0,t.avail_out=n,0!==t.avail_in||r||(t.next_in_index=0,r=!0),o=t.inflate(0),r&&o===Q){if(0!==t.avail_in)throw new Error("inflating: bad input")}else if(o!==X&&o!==H)throw new Error("inflating: "+t.msg);if((r||o===H)&&t.avail_in===e.length)throw new Error("inflating: bad input");t.next_out_index&&(t.next_out_index===n?a.push(new Uint8Array(i)):a.push(i.slice(0,t.next_out_index))),f+=t.next_out_index,s&&t.next_in_index>0&&t.next_in_index!=l&&(s(t.next_in_index),l=t.next_in_index)}while(t.avail_in>0||0===t.avail_out);return a.length>1?(c=new Uint8Array(f),a.forEach((function(e){c.set(e,d),d+=e.length}))):c=a[0]||new Uint8Array,c}},this.flush=function(){t.inflateEnd()}}});class Ui extends qn{constructor(e,t){super(e),this.blob=e,this.offset=t.offset+t.headerSize,this.size=t.compressedSize}async readUint8Array(e,t){const n=Ai(e,this.size)+this.offset,i=Ai(e+t,this.size)+this.offset,r=this.blob.slice(n,i);return new Uint8Array(await r.arrayBuffer())}}class Wi extends qn{constructor(e,t,n,i){super(),this.blob=e,this.entry=t,this.mimeString=n,this.options=i}async init(){const e=await async function(e,t){const n=t.offset,i=await e.slice(n,n+30).arrayBuffer(),r=new DataView(i);return{offset:n,compressionMethod:r.getUint16(8,!0),compressedSize:r.getUint32(18,!0),uncompressedSize:r.getUint32(22,!0),headerSize:30+r.getUint16(26,!0)+r.getUint16(28,!0)}}(this.blob,this.entry);if(0!==e.compressionMethod){const e=await o(this.entry,new Dn(this.mimeString),this.options);this.reader=new Fn(e)}else this.reader=new Ui(this.blob,e);this.size=this.reader.size}async readUint8Array(e,t){return this.reader.readUint8Array(e,t)}}const ji=["boot","dt","dtbo","init_boot","pvmfw","recovery","vbmeta_system","vbmeta_vendor","vbmeta","vendor_boot","vendor_kernel_boot"],qi=["odm","odm_dlkm","product","system_dlkm","system_ext","system","vendor_dlkm","vendor"],Fi=4e3;async function Di(e,t,i,r){const s=await o(t,new Dn("application/octet-stream"),{onstart(e){n(`Unpacking ${r} (${e} bytes)`),i("unpack",r,0)},onprogress(e,t){i("unpack",r,e/t)}});n(`Flashing ${r}`),i("flash",r,0),await e.flashBlob(r,s,(e=>{i("flash",r,e)}))}async function Ei(e,t,n,i){for(let r of i){let i=new RegExp(`${r}(?:-.+)?\\.img$`),s=t.find((e=>e.filename.match(i)));if(void 0!==s)if("bootloader"==r){let t=await e.getVariable("current-slot");if("a"==t)await Di(e,s,n,r+"_b"),await e.runCommand("set_active:b");else{if("b"!=t)throw new Ti("FAIL","Invalid slot given by bootloader.");await Di(e,s,n,r+"_a"),await e.runCommand("set_active:a")}}else await Di(e,s,n,r)}}async function Li(e,t,n){try{await e.reboot(t,!1)}catch(e){}await e.waitForConnect(n)}async function Ri(e,t,i,a,c=((e,t,n)=>{})){c("load","package",0);let l=new mi(new Fn(t)),d=await l.getEntries();"yes"===await e.getVariable("is-userspace")&&await e.reboot("bootloader",!0,a),await Ei(e,d,c,["bootloader"]),await s(c,"reboot","device",Fi,Li(e,"bootloader",a)),await Ei(e,d,c,["bootloader"]),await s(c,"reboot","device",Fi,Li(e,"bootloader",a)),await Ei(e,d,c,["radio"]),await s(c,"reboot","device",Fi,Li(e,"bootloader",a));let f=await e.getVariable("snapshot-update-status");null!==f&&"none"!==f&&await e.runCommand("snapshot-update:cancel");let u=d.find((e=>e.filename.match(/image-.+\.zip$/)));const m=new mi(new Wi(t,u,"application/zip",{onstart(e){n(`Loading nested images from zip (${e} bytes)`),c("unpack","images",0)},onprogress(e,t){c("unpack","images",e/t)}})),p=await m.getEntries();if(u=p.find((e=>"android-info.txt"===e.filename)),void 0!==u){const t=await o(u,new En);await async function(e,t){for(let i of t.replace("\r","").split("\n")){let t=i.match(/^require\s+(.+?)=(.+)$/);if(!t)continue;let r=t[1];"board"===r&&(r="product");let s=t[2],a=s.split("|");if("partition-exists"===r){let t=await e.getVariable(`has-slot:${s}`);if("yes"!==t&&"no"!==t)throw new Ti("FAIL",`Requirement ${r}=${s} failed, device lacks partition`);if(!ji.includes(s)&&!qi.includes(s))throw new Ti("FAIL",`Requirement ${r}=${s} failed, unrecognized partition`)}else{let t=await e.getVariable(r);if(!a.includes(t)){let e=`Requirement ${r}=${s} failed, value = ${t}`;throw n(e),new Ti("FAIL",e)}n(`Requirement ${r}=${s} passed`)}}}(e,t)}if(await Ei(e,p,c,ji),u=p.find((e=>"super_empty.img"===e.filename)),void 0!==u){await s(c,"reboot","device",16e3,e.reboot("fastboot",!0,a));let t=await e.getVariable("super-partition-name");t||(t="super");let n=i?"wipe":"flash";c(n,"super",0);const l=await o(u,new Dn("application/octet-stream"));await e.upload(t,await r(l),(e=>{c(n,"super",e)})),await e.runCommand(`update-super:${t}${i?":wipe":""}`)}await Ei(e,p,c,qi),"yes"===await e.getVariable("is-userspace")&&await s(c,"reboot","device",Fi,e.reboot("bootloader",!0,a)),u=d.find((e=>e.filename.endsWith("avb_pkmd.bin"))),void 0!==u&&(await e.runCommand("erase:avb_custom_key"),await Di(e,u,c,"avb_custom_key")),i&&await s(c,"wipe","data",1e3,e.runCommand("erase:userdata"))}class Ii extends Error{constructor(e){super(e),this.name="UsbError"}}class Ti extends Error{constructor(e,t){super(`Bootloader replied with ${e}: ${t}`),this.status=e,this.bootloaderMessage=t,this.name="FastbootError"}}exports.FastbootDevice=class{constructor(){this.device=null,this.epIn=null,this.epOut=null,this._registeredUsbListeners=!1,this._connectResolve=null,this._connectReject=null,this._disconnectResolve=null}get isConnected(){return null!==this.device&&this.device.opened&&this.device.configurations[0].interfaces[0].claimed}async _validateAndConnectDevice(){if(null===this.device)throw new Ii("Attempted to connect to null device");let e=this.device.configurations[0].interfaces[0].alternates[0];if(2!==e.endpoints.length)throw new Ii("Interface has wrong number of endpoints");this.epIn=null,this.epOut=null;for(let t of e.endpoints){if(i("Checking endpoint:",t),"bulk"!==t.type)throw new Ii("Interface endpoint is not bulk");if("in"===t.direction){if(null!==this.epIn)throw new Ii("Interface has multiple IN endpoints");this.epIn=t.endpointNumber}else if("out"===t.direction){if(null!==this.epOut)throw new Ii("Interface has multiple OUT endpoints");this.epOut=t.endpointNumber}}i("Endpoints: in =",this.epIn,", out =",this.epOut);try{await this.device.open();try{await this.device.reset()}catch(e){}await this.device.selectConfiguration(1),await this.device.claimInterface(0)}catch(e){throw null!==this._connectReject&&(this._connectReject(e),this._connectResolve=null,this._connectReject=null),e}null!==this._connectResolve&&(this._connectResolve(void 0),this._connectResolve=null,this._connectReject=null)}async waitForDisconnect(){if(null!==this.device)return await new Promise(((e,t)=>{this._disconnectResolve=e}))}async waitForConnect(e=(()=>{})){return navigator.userAgent.includes("Android")&&(await this.waitForDisconnect(),e()),await new Promise(((e,t)=>{this._connectResolve=e,this._connectReject=t}))}async connect(){let e=await navigator.usb.getDevices();n("Found paired USB devices:",e),1===e.length?this.device=e[0]:(n("No or multiple paired devices are connected, requesting one"),this.device=await navigator.usb.requestDevice({filters:[{classCode:255,subclassCode:66,protocolCode:3}]})),n("Using USB device:",this.device),this._registeredUsbListeners||(navigator.usb.addEventListener("disconnect",(e=>{e.device===this.device&&(n("USB device disconnected"),null!==this._disconnectResolve&&(this._disconnectResolve(void 0),this._disconnectResolve=null))})),navigator.usb.addEventListener("connect",(async e=>{n("USB device connected"),this.device=e.device;let t=null!==this._connectReject;try{await this._validateAndConnectDevice()}catch(e){if(!t)throw e}})),this._registeredUsbListeners=!0),await this._validateAndConnectDevice()}async _readResponse(){let e,t={text:""};do{let i=await this.device.transferIn(this.epIn,64),r=(new TextDecoder).decode(i.data);e=r.substring(0,4);let s=r.substring(4);if(n(`Response: ${e} ${s}`),"OKAY"===e)t.text+=s;else if("INFO"===e)t.text+=s+"\n";else{if("DATA"!==e)throw new Ti(e,s);t.dataSize=s}}while("INFO"===e);return t}async runCommand(e){if(e.length>64)throw new RangeError;let t=(new TextEncoder).encode(e);return await this.device.transferOut(this.epOut,t),n("Command:",e),this._readResponse()}async getVariable(e){let t;try{t=(await(n=this.runCommand(`getvar:${e}`),i=1e4,new Promise(((e,t)=>{let r=!1,s=setTimeout((()=>{r=!0,t(new a(i))}),i);n.then((t=>{r||e(t)})).catch((e=>{r||t(e)})).finally((()=>{r||clearTimeout(s)}))})))).text}catch(e){if(!(e instanceof Ti&&"FAIL"==e.status))throw e;t=null}var n,i;return t?t.trim():null}async _getDownloadSize(){try{let e=(await this.getVariable("max-download-size")).toLowerCase();if(e)return Math.min(parseInt(e,16),1073741824)}catch(e){}return 536870912}async _sendRawPayload(e,t){let n=0,r=e.byteLength;for(;r>0;){let s=e.slice(16384*n,16384*(n+1));n%1e3==0&&i(` Sending ${s.byteLength} bytes to endpoint, ${r} remaining, i=${n}`),n%10==0&&t((e.byteLength-r)/e.byteLength),await this.device.transferOut(this.epOut,s),r-=s.byteLength,n+=1}t(1)}async upload(e,t,i=(e=>{})){n(`Uploading single sparse to ${e}: ${t.byteLength} bytes`);let r=t.byteLength.toString(16).padStart(8,"0");if(8!==r.length)throw new Ti("FAIL",`Transfer size overflow: ${r} is more than 8 digits`);let s=await this.runCommand(`download:${r}`);if(void 0===s.dataSize)throw new Ti("FAIL",`Unexpected response to download command: ${s.text}`);if(parseInt(s.dataSize,16)!==t.byteLength)throw new Ti("FAIL",`Bootloader wants ${t.byteLength} bytes, requested to send ${t.byteLength} bytes`);n(`Sending payload: ${t.byteLength} bytes`),await this._sendRawPayload(t,i),n("Payload sent, waiting for response..."),await this._readResponse()}async reboot(e="",t=!1,n=(()=>{})){e.length>0?await this.runCommand(`reboot-${e}`):await this.runCommand("reboot"),t&&await this.waitForConnect(n)}async flashBlob(e,t,s=(e=>{})){"yes"===await this.getVariable(`has-slot:${e}`)&&(e+="_"+await this.getVariable("current-slot"));let a=await this._getDownloadSize(),o=await r(t.slice(0,f)),c=t.size,l=!1;try{let e=w(o);null!==e&&(c=e.blocks*e.blockSize,l=!0)}catch(e){}"yes"===await this.getVariable(`is-logical:${e}`)&&(await this.runCommand(`resize-logical-partition:${e}:0`),await this.runCommand(`resize-logical-partition:${e}:${c}`)),t.size>a&&!l&&(n(`${e} image is raw, converting to sparse`),t=await async function(e){let t={blockSize:4096,blocks:e.size/4096,chunks:1,crc32:0},n=[];for(;e.size>0;){let i=Math.min(e.size,67108864);n.push({type:p.Raw,blocks:i/t.blockSize,data:e.slice(0,i)}),e=e.slice(i)}return b(t,n)}(t)),n(`Flashing ${t.size} bytes to ${e}, ${a} bytes per split`);let d=0,h=0;for await(let o of async function*(e,t){if(n(`Splitting ${e.size}-byte sparse image into ${t}-byte chunks`),e.size<=t)return n("Blob fits in 1 payload, not splitting"),void(yield{data:await r(e),bytes:e.size});let s=w(await r(e.slice(0,f)));if(null===s)throw new m("Blob is not a sparse image");s.crc32=0,e=e.slice(f);let a=[],o=0;for(let l=0;le.data.size)).reduce(((e,t)=>e+t),0)}(c));if(i(` Chunk ${l}: type ${d.type}, ${d.dataBytes} bytes / ${d.blocks} blocks, ${m} bytes remaining`),m>=d.dataBytes)i(" Space is available, adding chunk"),a.push(d),o+=d.blocks*s.blockSize;else{let e=g(a);a.push({type:p.Skip,blocks:s.blocks-e,data:new Blob([]),dataBytes:0}),i(`Partition is ${s.blocks} blocks, used ${e}, padded with ${s.blocks-e}, finishing split with ${g(a)} blocks`);let t=await b(s,a);n(`Finished ${t.size}-byte split with ${a.length} chunks`),yield{data:await r(t),bytes:o},i(`Starting new split: skipping first ${e} blocks and adding chunk`),a=[{type:p.Skip,blocks:e,data:new Blob([]),dataBytes:0},d],o=0}}var c;if(a.length>0&&(a.length>1||a[0].type!==p.Skip)){let e=await b(s,a);n(`Finishing final ${e.size}-byte split with ${a.length} chunks`),yield{data:await r(e),bytes:o}}}(t,a))await this.upload(e,o.data,(e=>{s((h+e*o.bytes)/c)})),n("Flashing payload..."),await this.runCommand(`flash:${e}`),d+=1,h+=o.bytes;n(`Flashed ${e} with ${d} split(s)`)}async bootBlob(e,t=(e=>{})){n(`Booting ${e.size} bytes image`);let i=await r(e);await this.upload("boot.img",i,t),n("Booting payload..."),await this.runCommand("boot"),n(`Booted ${e.size} bytes image`)}async flashFactoryZip(e,t,n,i=(e=>{})){return await Ri(this,e,t,n,i)}},exports.FastbootError=Ti,exports.TimeoutError=a,exports.USER_ACTION_MAP={load:"Loading",unpack:"Unpacking",flash:"Writing",wipe:"Wiping",reboot:"Restarting"},exports.UsbError=Ii,exports.configureZip=He,exports.setDebugLevel=function(e){t=e}; -//# sourceMappingURL=fastboot.min.cjs.map diff --git a/dist/fastboot.min.cjs.map b/dist/fastboot.min.cjs.map deleted file mode 100644 index 32c588a..0000000 --- a/dist/fastboot.min.cjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"fastboot.min.cjs","sources":["../src/common.ts","../src/sparse.ts","../node_modules/@zip.js/zip.js/lib/core/streams/codecs/deflate.js","../node_modules/@zip.js/zip.js/lib/core/streams/codecs/inflate.js","../node_modules/@zip.js/zip.js/lib/core/constants.js","../node_modules/@zip.js/zip.js/lib/core/streams/stream-adapter.js","../node_modules/@zip.js/zip.js/lib/core/configuration.js","../node_modules/@zip.js/zip.js/lib/core/util/mime-type.js","../node_modules/@zip.js/zip.js/lib/core/streams/codecs/crc32.js","../node_modules/@zip.js/zip.js/lib/core/streams/crc32-stream.js","../node_modules/@zip.js/zip.js/lib/core/streams/codecs/sjcl.js","../node_modules/@zip.js/zip.js/lib/core/streams/common-crypto.js","../node_modules/@zip.js/zip.js/lib/core/streams/aes-crypto-stream.js","../node_modules/@zip.js/zip.js/lib/core/util/encode-text.js","../node_modules/@zip.js/zip.js/lib/core/streams/zip-crypto-stream.js","../node_modules/@zip.js/zip.js/lib/core/streams/zip-entry-stream.js","../node_modules/@zip.js/zip.js/lib/core/streams/codec-stream.js","../node_modules/@zip.js/zip.js/lib/core/codec-worker.js","../node_modules/@zip.js/zip.js/lib/core/codec-pool.js","../node_modules/@zip.js/zip.js/lib/core/io.js","../node_modules/@zip.js/zip.js/lib/core/util/cp437-decode.js","../node_modules/@zip.js/zip.js/lib/core/util/decode-text.js","../node_modules/@zip.js/zip.js/lib/core/zip-entry.js","../node_modules/@zip.js/zip.js/lib/core/zip-reader.js","../node_modules/@zip.js/zip.js/lib/zip-fs.js","../src/io.ts","../node_modules/@zip.js/zip.js/lib/z-worker-inline.js","../node_modules/@zip.js/zip.js/index.js","../src/factory.ts","../src/fastboot.ts"],"sourcesContent":["import { FactoryProgressCallback } from \"./factory\";\nimport { Entry, EntryGetDataOptions, WritableWriter } from \"@zip.js/zip.js\";\n\nconst ZIP_ENTRY_HEADER_BEGIN_LENGTH = 30; // bytes\n\nexport enum DebugLevel {\n Silent = 0,\n Debug,\n Verbose,\n}\n\nexport interface EntryMetadata {\n offset: number;\n compressionMethod: number;\n compressedSize: number;\n uncompressedSize: number;\n headerSize: number;\n}\n\nlet debugLevel = DebugLevel.Silent;\n\nexport function logDebug(...data: any[]) {\n if (debugLevel >= 1) {\n console.log(...data);\n }\n}\n\nexport function logVerbose(...data: any[]) {\n if (debugLevel >= 2) {\n console.log(...data);\n }\n}\n\n/**\n * Change the debug level for the fastboot client:\n * - 0 = silent\n * - 1 = debug, recommended for general use\n * - 2 = verbose, for debugging only\n *\n * @param {number} level - Debug level to use.\n */\nexport function setDebugLevel(level: DebugLevel) {\n debugLevel = level;\n}\n\n/**\n * Reads all of the data in the given blob and returns it as an ArrayBuffer.\n *\n * @param {Blob} blob - Blob with the data to read.\n * @returns {Promise} ArrayBuffer containing data from the blob.\n * @ignore\n */\nexport function readBlobAsBuffer(blob: Blob): Promise {\n return new Promise((resolve, reject) => {\n let reader = new FileReader();\n reader.onload = () => {\n resolve(reader.result! as ArrayBuffer);\n };\n reader.onerror = () => {\n reject(reader.error);\n };\n\n reader.readAsArrayBuffer(blob);\n });\n}\n\nfunction waitForFrame() {\n return new Promise((resolve, _reject) => {\n window.requestAnimationFrame(resolve);\n });\n}\n\nexport async function runWithTimedProgress(\n onProgress: FactoryProgressCallback,\n action: string,\n item: string,\n duration: number,\n workPromise: Promise\n) {\n let startTime = new Date().getTime();\n let stop = false;\n\n onProgress(action, item, 0.0);\n let progressPromise = (async () => {\n let now;\n let targetTime = startTime + duration;\n\n do {\n now = new Date().getTime();\n onProgress(action, item, (now - startTime) / duration);\n await waitForFrame();\n } while (!stop && now < targetTime);\n })();\n\n await Promise.race([progressPromise, workPromise]);\n stop = true;\n await progressPromise;\n await workPromise;\n\n onProgress(action, item, 1.0);\n}\n\n/** Exception class for operations that exceeded their timeout duration. */\nexport class TimeoutError extends Error {\n timeout: number;\n\n constructor(timeout: number) {\n super(`Timeout of ${timeout} ms exceeded`);\n this.name = \"TimeoutError\";\n this.timeout = timeout;\n }\n}\n\nexport function runWithTimeout(\n promise: Promise,\n timeout: number\n): Promise {\n return new Promise((resolve, reject) => {\n // Set up timeout\n let timedOut = false;\n let tid = setTimeout(() => {\n // Set sentinel first to prevent race in promise resolving\n timedOut = true;\n reject(new TimeoutError(timeout));\n }, timeout);\n\n // Passthrough\n promise\n .then((val) => {\n if (!timedOut) {\n resolve(val);\n }\n })\n .catch((err) => {\n if (!timedOut) {\n reject(err);\n }\n })\n .finally(() => {\n if (!timedOut) {\n clearTimeout(tid);\n }\n });\n });\n}\n\nexport async function getEntryMetadata(\n blob: Blob,\n entry: Entry\n): Promise {\n const offset = entry.offset;\n const headerBeginRaw =\n await blob.slice(offset, offset + ZIP_ENTRY_HEADER_BEGIN_LENGTH).arrayBuffer();\n const dataView = new DataView(headerBeginRaw);\n const compressionMethod = dataView.getUint16(8, true);\n const compressedSize = dataView.getUint32(18, true);\n const uncompressedSize = dataView.getUint32(22, true);\n const fileNameLength = dataView.getUint16(26, true);\n const extraFieldLength = dataView.getUint16(28, true);\n const headerSize = ZIP_ENTRY_HEADER_BEGIN_LENGTH + fileNameLength + extraFieldLength;\n\n return {\n offset,\n compressionMethod,\n compressedSize,\n uncompressedSize,\n headerSize,\n };\n}\n\n// Wrapper for Entry#getData() that unwraps ProgressEvent errors\nexport async function zipGetData(\n entry: Entry,\n writer: WritableWriter,\n options?: EntryGetDataOptions\n): Promise {\n try {\n return await entry.getData!(writer, options);\n } catch (e) {\n if (\n e instanceof ProgressEvent &&\n e.type === \"error\" &&\n e.target !== null\n ) {\n throw (e.target as any).error;\n } else {\n throw e;\n }\n }\n}\n","import * as common from \"./common\";\n\nconst FILE_MAGIC = 0xed26ff3a;\n\nconst MAJOR_VERSION = 1;\nconst MINOR_VERSION = 0;\nexport const FILE_HEADER_SIZE = 28;\nconst CHUNK_HEADER_SIZE = 12;\n\n// AOSP libsparse uses 64 MiB chunks\nconst RAW_CHUNK_SIZE = 64 * 1024 * 1024;\n\nexport class ImageError extends Error {\n constructor(message: string) {\n super(message);\n this.name = \"ImageError\";\n }\n}\n\nexport interface SparseSplit {\n data: ArrayBuffer;\n bytes: number;\n}\n\nexport enum ChunkType {\n Raw = 0xcac1,\n Fill = 0xcac2,\n Skip = 0xcac3,\n Crc32 = 0xcac4,\n}\n\nexport interface SparseHeader {\n blockSize: number;\n blocks: number;\n chunks: number;\n crc32: number;\n}\n\nexport interface SparseChunk {\n type: ChunkType;\n /* 2: reserved, 16 bits */\n blocks: number;\n dataBytes: number;\n data: Blob | null; // to be populated by consumer\n}\n\nclass BlobBuilder {\n private blob: Blob;\n private type: string;\n\n constructor(type: string = \"\") {\n this.type = type;\n this.blob = new Blob([], { type: this.type });\n }\n\n append(blob: Blob) {\n this.blob = new Blob([this.blob, blob], { type: this.type });\n }\n\n getBlob(): Blob {\n return this.blob;\n }\n}\n\n/**\n * Returns a parsed version of the sparse image file header from the given buffer.\n *\n * @param {ArrayBuffer} buffer - Raw file header data.\n * @returns {SparseHeader} Object containing the header information.\n */\nexport function parseFileHeader(buffer: ArrayBuffer): SparseHeader | null {\n let view = new DataView(buffer);\n\n let magic = view.getUint32(0, true);\n if (magic !== FILE_MAGIC) {\n return null;\n }\n\n // v1.0+\n let major = view.getUint16(4, true);\n let minor = view.getUint16(6, true);\n if (major !== MAJOR_VERSION || minor < MINOR_VERSION) {\n throw new ImageError(\n `Unsupported sparse image version ${major}.${minor}`\n );\n }\n\n let fileHdrSize = view.getUint16(8, true);\n let chunkHdrSize = view.getUint16(10, true);\n if (\n fileHdrSize !== FILE_HEADER_SIZE ||\n chunkHdrSize !== CHUNK_HEADER_SIZE\n ) {\n throw new ImageError(\n `Invalid file header size ${fileHdrSize}, chunk header size ${chunkHdrSize}`\n );\n }\n\n let blockSize = view.getUint32(12, true);\n if (blockSize % 4 !== 0) {\n throw new ImageError(`Block size ${blockSize} is not a multiple of 4`);\n }\n\n return {\n blockSize: blockSize,\n blocks: view.getUint32(16, true),\n chunks: view.getUint32(20, true),\n crc32: view.getUint32(24, true),\n };\n}\n\nfunction parseChunkHeader(buffer: ArrayBuffer) {\n let view = new DataView(buffer);\n\n // This isn't the same as what createImage takes.\n // Further processing needs to be done on the chunks.\n return {\n type: view.getUint16(0, true),\n /* 2: reserved, 16 bits */\n blocks: view.getUint32(4, true),\n dataBytes: view.getUint32(8, true) - CHUNK_HEADER_SIZE,\n data: null, // to be populated by consumer\n } as SparseChunk;\n}\n\nfunction calcChunksBlockSize(chunks: Array) {\n return chunks\n .map((chunk) => chunk.blocks)\n .reduce((total, c) => total + c, 0);\n}\n\nfunction calcChunksDataSize(chunks: Array) {\n return chunks\n .map((chunk) => chunk.data!.size)\n .reduce((total, c) => total + c, 0);\n}\n\nfunction calcChunksSize(chunks: Array) {\n // 28-byte file header, 12-byte chunk headers\n let overhead = FILE_HEADER_SIZE + CHUNK_HEADER_SIZE * chunks.length;\n return overhead + calcChunksDataSize(chunks);\n}\n\nasync function createImage(header: SparseHeader, chunks: Array): Promise {\n let blobBuilder = new BlobBuilder();\n\n let buffer = new ArrayBuffer(FILE_HEADER_SIZE);\n let dataView = new DataView(buffer);\n let arrayView = new Uint8Array(buffer);\n\n dataView.setUint32(0, FILE_MAGIC, true);\n // v1.0\n dataView.setUint16(4, MAJOR_VERSION, true);\n dataView.setUint16(6, MINOR_VERSION, true);\n dataView.setUint16(8, FILE_HEADER_SIZE, true);\n dataView.setUint16(10, CHUNK_HEADER_SIZE, true);\n\n // Match input parameters\n dataView.setUint32(12, header.blockSize, true);\n dataView.setUint32(16, header.blocks, true);\n dataView.setUint32(20, chunks.length, true);\n\n // We don't care about the CRC. AOSP docs specify that this should be a CRC32,\n // but AOSP libsparse always sets 0 and puts the CRC in a final undocumented\n // 0xCAC4 chunk instead.\n dataView.setUint32(24, 0, true);\n\n blobBuilder.append(new Blob([buffer]));\n for (let chunk of chunks) {\n buffer = new ArrayBuffer(CHUNK_HEADER_SIZE + chunk.data!.size);\n dataView = new DataView(buffer);\n arrayView = new Uint8Array(buffer);\n\n dataView.setUint16(0, chunk.type, true);\n dataView.setUint16(2, 0, true); // reserved\n dataView.setUint32(4, chunk.blocks, true);\n dataView.setUint32(\n 8,\n CHUNK_HEADER_SIZE + chunk.data!.size,\n true\n );\n\n let chunkArrayView = new Uint8Array(await common.readBlobAsBuffer(chunk.data!));\n arrayView.set(chunkArrayView, CHUNK_HEADER_SIZE);\n blobBuilder.append(new Blob([buffer]));\n }\n\n return blobBuilder.getBlob();\n}\n\n/**\n * Creates a sparse image from buffer containing raw image data.\n *\n * @param {Blob} blob - Blob containing the raw image data.\n * @returns {Promise} Promise that resolves the blob containing the new sparse image.\n */\nexport async function fromRaw(blob: Blob): Promise {\n let header = {\n blockSize: 4096,\n blocks: blob.size / 4096,\n chunks: 1,\n crc32: 0,\n };\n\n let chunks = [];\n while (blob.size > 0) {\n let chunkSize = Math.min(blob.size, RAW_CHUNK_SIZE);\n chunks.push({\n type: ChunkType.Raw,\n blocks: chunkSize / header.blockSize,\n data: blob.slice(0, chunkSize),\n } as SparseChunk);\n blob = blob.slice(chunkSize);\n }\n\n return createImage(header, chunks);\n}\n\n/**\n * Split a sparse image into smaller sparse images within the given size.\n * This takes a Blob instead of an ArrayBuffer because it may process images\n * larger than RAM.\n *\n * @param {Blob} blob - Blob containing the sparse image to split.\n * @param {number} splitSize - Maximum size per split.\n * @yields {Object} Data of the next split image and its output size in bytes.\n */\nexport async function* splitBlob(blob: Blob, splitSize: number) {\n common.logDebug(\n `Splitting ${blob.size}-byte sparse image into ${splitSize}-byte chunks`\n );\n // Short-circuit if splitting isn't required\n if (blob.size <= splitSize) {\n common.logDebug(\"Blob fits in 1 payload, not splitting\");\n yield {\n data: await common.readBlobAsBuffer(blob),\n bytes: blob.size,\n } as SparseSplit;\n return;\n }\n\n let headerData = await common.readBlobAsBuffer(\n blob.slice(0, FILE_HEADER_SIZE)\n );\n let header = parseFileHeader(headerData);\n if (header === null) {\n throw new ImageError(\"Blob is not a sparse image\");\n }\n\n // Remove CRC32 (if present), otherwise splitting will invalidate it\n header.crc32 = 0;\n blob = blob.slice(FILE_HEADER_SIZE);\n\n let splitChunks: Array = [];\n let splitDataBytes = 0;\n for (let i = 0; i < header.chunks; i++) {\n let chunkHeaderData = await common.readBlobAsBuffer(\n blob.slice(0, CHUNK_HEADER_SIZE)\n );\n let chunk = parseChunkHeader(chunkHeaderData);\n chunk.data = blob.slice(CHUNK_HEADER_SIZE, CHUNK_HEADER_SIZE + chunk.dataBytes);\n blob = blob.slice(CHUNK_HEADER_SIZE + chunk.dataBytes);\n\n let bytesRemaining = splitSize - calcChunksSize(splitChunks);\n common.logVerbose(\n ` Chunk ${i}: type ${chunk.type}, ${chunk.dataBytes} bytes / ${chunk.blocks} blocks, ${bytesRemaining} bytes remaining`\n );\n if (bytesRemaining >= chunk.dataBytes) {\n // Read the chunk and add it\n common.logVerbose(\" Space is available, adding chunk\");\n splitChunks.push(chunk);\n // Track amount of data written on the output device, in bytes\n splitDataBytes += chunk.blocks * header.blockSize;\n } else {\n // Out of space, finish this split\n // Blocks need to be calculated from chunk headers instead of going by size\n // because FILL and SKIP chunks cover more blocks than the data they contain.\n let splitBlocks = calcChunksBlockSize(splitChunks);\n splitChunks.push({\n type: ChunkType.Skip,\n blocks: header.blocks - splitBlocks,\n data: new Blob([]),\n dataBytes: 0,\n });\n common.logVerbose(\n `Partition is ${\n header.blocks\n } blocks, used ${splitBlocks}, padded with ${\n header.blocks - splitBlocks\n }, finishing split with ${calcChunksBlockSize(\n splitChunks\n )} blocks`\n );\n let splitImage = await createImage(header, splitChunks);\n common.logDebug(\n `Finished ${splitImage.size}-byte split with ${splitChunks.length} chunks`\n );\n yield {\n data: await common.readBlobAsBuffer(splitImage),\n bytes: splitDataBytes,\n } as SparseSplit;\n\n // Start a new split. Every split is considered a full image by the\n // bootloader, so we need to skip the *total* written blocks.\n common.logVerbose(\n `Starting new split: skipping first ${splitBlocks} blocks and adding chunk`\n );\n splitChunks = [\n {\n type: ChunkType.Skip,\n blocks: splitBlocks,\n data: new Blob([]),\n dataBytes: 0,\n },\n chunk,\n ];\n splitDataBytes = 0;\n }\n }\n\n // Finish the final split if necessary\n if (\n splitChunks.length > 0 &&\n (splitChunks.length > 1 || splitChunks[0].type !== ChunkType.Skip)\n ) {\n let splitImage = await createImage(header, splitChunks);\n common.logDebug(\n `Finishing final ${splitImage.size}-byte split with ${splitChunks.length} chunks`\n );\n yield {\n data: await common.readBlobAsBuffer(splitImage),\n bytes: splitDataBytes,\n } as SparseSplit;\n }\n}\n","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/*\n * This program is based on JZlib 1.0.2 ymnk, JCraft,Inc.\n * JZlib is based on zlib-1.1.3, so all credit should go authors\n * Jean-loup Gailly(jloup@gzip.org) and Mark Adler(madler@alumni.caltech.edu)\n * and contributors of zlib.\n */\n\n// deno-lint-ignore-file no-this-alias prefer-const\n\n// Global\n\nconst MAX_BITS = 15;\nconst D_CODES = 30;\nconst BL_CODES = 19;\n\nconst LENGTH_CODES = 29;\nconst LITERALS = 256;\nconst L_CODES = (LITERALS + 1 + LENGTH_CODES);\nconst HEAP_SIZE = (2 * L_CODES + 1);\n\nconst END_BLOCK = 256;\n\n// Bit length codes must not exceed MAX_BL_BITS bits\nconst MAX_BL_BITS = 7;\n\n// repeat previous bit length 3-6 times (2 bits of repeat count)\nconst REP_3_6 = 16;\n\n// repeat a zero length 3-10 times (3 bits of repeat count)\nconst REPZ_3_10 = 17;\n\n// repeat a zero length 11-138 times (7 bits of repeat count)\nconst REPZ_11_138 = 18;\n\n// The lengths of the bit length codes are sent in order of decreasing\n// probability, to avoid transmitting the lengths for unused bit\n// length codes.\n\nconst Buf_size = 8 * 2;\n\n// JZlib version : \"1.0.2\"\nconst Z_DEFAULT_COMPRESSION = -1;\n\n// compression strategy\nconst Z_FILTERED = 1;\nconst Z_HUFFMAN_ONLY = 2;\nconst Z_DEFAULT_STRATEGY = 0;\n\nconst Z_NO_FLUSH = 0;\nconst Z_PARTIAL_FLUSH = 1;\nconst Z_FULL_FLUSH = 3;\nconst Z_FINISH = 4;\n\nconst Z_OK = 0;\nconst Z_STREAM_END = 1;\nconst Z_NEED_DICT = 2;\nconst Z_STREAM_ERROR = -2;\nconst Z_DATA_ERROR = -3;\nconst Z_BUF_ERROR = -5;\n\n// Tree\n\nfunction extractArray(array) {\n\treturn flatArray(array.map(([length, value]) => (new Array(length)).fill(value, 0, length)));\n}\n\nfunction flatArray(array) {\n\treturn array.reduce((a, b) => a.concat(Array.isArray(b) ? flatArray(b) : b), []);\n}\n\n// see definition of array dist_code below\nconst _dist_code = [0, 1, 2, 3].concat(...extractArray([\n\t[2, 4], [2, 5], [4, 6], [4, 7], [8, 8], [8, 9], [16, 10], [16, 11], [32, 12], [32, 13], [64, 14], [64, 15], [2, 0], [1, 16],\n\t[1, 17], [2, 18], [2, 19], [4, 20], [4, 21], [8, 22], [8, 23], [16, 24], [16, 25], [32, 26], [32, 27], [64, 28], [64, 29]\n]));\n\nfunction Tree() {\n\tconst that = this;\n\n\t// dyn_tree; // the dynamic tree\n\t// max_code; // largest code with non zero frequency\n\t// stat_desc; // the corresponding static tree\n\n\t// Compute the optimal bit lengths for a tree and update the total bit\n\t// length\n\t// for the current block.\n\t// IN assertion: the fields freq and dad are set, heap[heap_max] and\n\t// above are the tree nodes sorted by increasing frequency.\n\t// OUT assertions: the field len is set to the optimal bit length, the\n\t// array bl_count contains the frequencies for each bit length.\n\t// The length opt_len is updated; static_len is also updated if stree is\n\t// not null.\n\tfunction gen_bitlen(s) {\n\t\tconst tree = that.dyn_tree;\n\t\tconst stree = that.stat_desc.static_tree;\n\t\tconst extra = that.stat_desc.extra_bits;\n\t\tconst base = that.stat_desc.extra_base;\n\t\tconst max_length = that.stat_desc.max_length;\n\t\tlet h; // heap index\n\t\tlet n, m; // iterate over the tree elements\n\t\tlet bits; // bit length\n\t\tlet xbits; // extra bits\n\t\tlet f; // frequency\n\t\tlet overflow = 0; // number of elements with bit length too large\n\n\t\tfor (bits = 0; bits <= MAX_BITS; bits++)\n\t\t\ts.bl_count[bits] = 0;\n\n\t\t// In a first pass, compute the optimal bit lengths (which may\n\t\t// overflow in the case of the bit length tree).\n\t\ttree[s.heap[s.heap_max] * 2 + 1] = 0; // root of the heap\n\n\t\tfor (h = s.heap_max + 1; h < HEAP_SIZE; h++) {\n\t\t\tn = s.heap[h];\n\t\t\tbits = tree[tree[n * 2 + 1] * 2 + 1] + 1;\n\t\t\tif (bits > max_length) {\n\t\t\t\tbits = max_length;\n\t\t\t\toverflow++;\n\t\t\t}\n\t\t\ttree[n * 2 + 1] = bits;\n\t\t\t// We overwrite tree[n*2+1] which is no longer needed\n\n\t\t\tif (n > that.max_code)\n\t\t\t\tcontinue; // not a leaf node\n\n\t\t\ts.bl_count[bits]++;\n\t\t\txbits = 0;\n\t\t\tif (n >= base)\n\t\t\t\txbits = extra[n - base];\n\t\t\tf = tree[n * 2];\n\t\t\ts.opt_len += f * (bits + xbits);\n\t\t\tif (stree)\n\t\t\t\ts.static_len += f * (stree[n * 2 + 1] + xbits);\n\t\t}\n\t\tif (overflow === 0)\n\t\t\treturn;\n\n\t\t// This happens for example on obj2 and pic of the Calgary corpus\n\t\t// Find the first bit length which could increase:\n\t\tdo {\n\t\t\tbits = max_length - 1;\n\t\t\twhile (s.bl_count[bits] === 0)\n\t\t\t\tbits--;\n\t\t\ts.bl_count[bits]--; // move one leaf down the tree\n\t\t\ts.bl_count[bits + 1] += 2; // move one overflow item as its brother\n\t\t\ts.bl_count[max_length]--;\n\t\t\t// The brother of the overflow item also moves one step up,\n\t\t\t// but this does not affect bl_count[max_length]\n\t\t\toverflow -= 2;\n\t\t} while (overflow > 0);\n\n\t\tfor (bits = max_length; bits !== 0; bits--) {\n\t\t\tn = s.bl_count[bits];\n\t\t\twhile (n !== 0) {\n\t\t\t\tm = s.heap[--h];\n\t\t\t\tif (m > that.max_code)\n\t\t\t\t\tcontinue;\n\t\t\t\tif (tree[m * 2 + 1] != bits) {\n\t\t\t\t\ts.opt_len += (bits - tree[m * 2 + 1]) * tree[m * 2];\n\t\t\t\t\ttree[m * 2 + 1] = bits;\n\t\t\t\t}\n\t\t\t\tn--;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Reverse the first len bits of a code, using straightforward code (a\n\t// faster\n\t// method would use a table)\n\t// IN assertion: 1 <= len <= 15\n\tfunction bi_reverse(code, // the value to invert\n\t\tlen // its bit length\n\t) {\n\t\tlet res = 0;\n\t\tdo {\n\t\t\tres |= code & 1;\n\t\t\tcode >>>= 1;\n\t\t\tres <<= 1;\n\t\t} while (--len > 0);\n\t\treturn res >>> 1;\n\t}\n\n\t// Generate the codes for a given tree and bit counts (which need not be\n\t// optimal).\n\t// IN assertion: the array bl_count contains the bit length statistics for\n\t// the given tree and the field len is set for all tree elements.\n\t// OUT assertion: the field code is set for all tree elements of non\n\t// zero code length.\n\tfunction gen_codes(tree, // the tree to decorate\n\t\tmax_code, // largest code with non zero frequency\n\t\tbl_count // number of codes at each bit length\n\t) {\n\t\tconst next_code = []; // next code value for each\n\t\t// bit length\n\t\tlet code = 0; // running code value\n\t\tlet bits; // bit index\n\t\tlet n; // code index\n\t\tlet len;\n\n\t\t// The distribution counts are first used to generate the code values\n\t\t// without bit reversal.\n\t\tfor (bits = 1; bits <= MAX_BITS; bits++) {\n\t\t\tnext_code[bits] = code = ((code + bl_count[bits - 1]) << 1);\n\t\t}\n\n\t\t// Check that the bit counts in bl_count are consistent. The last code\n\t\t// must be all ones.\n\t\t// Assert (code + bl_count[MAX_BITS]-1 == (1<= 1; n--)\n\t\t\ts.pqdownheap(tree, n);\n\n\t\t// Construct the Huffman tree by repeatedly combining the least two\n\t\t// frequent nodes.\n\n\t\tnode = elems; // next internal node of the tree\n\t\tdo {\n\t\t\t// n = node of least frequency\n\t\t\tn = s.heap[1];\n\t\t\ts.heap[1] = s.heap[s.heap_len--];\n\t\t\ts.pqdownheap(tree, 1);\n\t\t\tm = s.heap[1]; // m = node of next least frequency\n\n\t\t\ts.heap[--s.heap_max] = n; // keep the nodes sorted by frequency\n\t\t\ts.heap[--s.heap_max] = m;\n\n\t\t\t// Create a new node father of n and m\n\t\t\ttree[node * 2] = (tree[n * 2] + tree[m * 2]);\n\t\t\ts.depth[node] = Math.max(s.depth[n], s.depth[m]) + 1;\n\t\t\ttree[n * 2 + 1] = tree[m * 2 + 1] = node;\n\n\t\t\t// and insert the new node in the heap\n\t\t\ts.heap[1] = node++;\n\t\t\ts.pqdownheap(tree, 1);\n\t\t} while (s.heap_len >= 2);\n\n\t\ts.heap[--s.heap_max] = s.heap[1];\n\n\t\t// At this point, the fields freq and dad are set. We can now\n\t\t// generate the bit lengths.\n\n\t\tgen_bitlen(s);\n\n\t\t// The field len is now set, we can generate the bit codes\n\t\tgen_codes(tree, that.max_code, s.bl_count);\n\t};\n\n}\n\nTree._length_code = [0, 1, 2, 3, 4, 5, 6, 7].concat(...extractArray([\n\t[2, 8], [2, 9], [2, 10], [2, 11], [4, 12], [4, 13], [4, 14], [4, 15], [8, 16], [8, 17], [8, 18], [8, 19],\n\t[16, 20], [16, 21], [16, 22], [16, 23], [32, 24], [32, 25], [32, 26], [31, 27], [1, 28]]));\n\nTree.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];\n\nTree.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,\n\t24576];\n\n// Mapping from a distance to a distance code. dist is the distance - 1 and\n// must not have side effects. _dist_code[256] and _dist_code[257] are never\n// used.\nTree.d_code = function (dist) {\n\treturn ((dist) < 256 ? _dist_code[dist] : _dist_code[256 + ((dist) >>> 7)]);\n};\n\n// extra bits for each length code\nTree.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];\n\n// extra bits for each distance code\nTree.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];\n\n// extra bits for each bit length code\nTree.extra_blbits = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7];\n\nTree.bl_order = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15];\n\n// StaticTree\n\nfunction StaticTree(static_tree, extra_bits, extra_base, elems, max_length) {\n\tconst that = this;\n\tthat.static_tree = static_tree;\n\tthat.extra_bits = extra_bits;\n\tthat.extra_base = extra_base;\n\tthat.elems = elems;\n\tthat.max_length = max_length;\n}\n\nconst static_ltree2_first_part = [12, 140, 76, 204, 44, 172, 108, 236, 28, 156, 92, 220, 60, 188, 124, 252, 2, 130, 66, 194, 34, 162, 98, 226, 18, 146, 82,\n\t210, 50, 178, 114, 242, 10, 138, 74, 202, 42, 170, 106, 234, 26, 154, 90, 218, 58, 186, 122, 250, 6, 134, 70, 198, 38, 166, 102, 230, 22, 150, 86,\n\t214, 54, 182, 118, 246, 14, 142, 78, 206, 46, 174, 110, 238, 30, 158, 94, 222, 62, 190, 126, 254, 1, 129, 65, 193, 33, 161, 97, 225, 17, 145, 81,\n\t209, 49, 177, 113, 241, 9, 137, 73, 201, 41, 169, 105, 233, 25, 153, 89, 217, 57, 185, 121, 249, 5, 133, 69, 197, 37, 165, 101, 229, 21, 149, 85,\n\t213, 53, 181, 117, 245, 13, 141, 77, 205, 45, 173, 109, 237, 29, 157, 93, 221, 61, 189, 125, 253, 19, 275, 147, 403, 83, 339, 211, 467, 51, 307,\n\t179, 435, 115, 371, 243, 499, 11, 267, 139, 395, 75, 331, 203, 459, 43, 299, 171, 427, 107, 363, 235, 491, 27, 283, 155, 411, 91, 347, 219, 475,\n\t59, 315, 187, 443, 123, 379, 251, 507, 7, 263, 135, 391, 71, 327, 199, 455, 39, 295, 167, 423, 103, 359, 231, 487, 23, 279, 151, 407, 87, 343, 215,\n\t471, 55, 311, 183, 439, 119, 375, 247, 503, 15, 271, 143, 399, 79, 335, 207, 463, 47, 303, 175, 431, 111, 367, 239, 495, 31, 287, 159, 415, 95,\n\t351, 223, 479, 63, 319, 191, 447, 127, 383, 255, 511, 0, 64, 32, 96, 16, 80, 48, 112, 8, 72, 40, 104, 24, 88, 56, 120, 4, 68, 36, 100, 20, 84, 52,\n\t116, 3, 131, 67, 195, 35, 163, 99, 227];\nconst static_ltree2_second_part = extractArray([[144, 8], [112, 9], [24, 7], [8, 8]]);\nStaticTree.static_ltree = flatArray(static_ltree2_first_part.map((value, index) => [value, static_ltree2_second_part[index]]));\n\nconst static_dtree_first_part = [0, 16, 8, 24, 4, 20, 12, 28, 2, 18, 10, 26, 6, 22, 14, 30, 1, 17, 9, 25, 5, 21, 13, 29, 3, 19, 11, 27, 7, 23];\nconst static_dtree_second_part = extractArray([[30, 5]]);\nStaticTree.static_dtree = flatArray(static_dtree_first_part.map((value, index) => [value, static_dtree_second_part[index]]));\n\nStaticTree.static_l_desc = new StaticTree(StaticTree.static_ltree, Tree.extra_lbits, LITERALS + 1, L_CODES, MAX_BITS);\n\nStaticTree.static_d_desc = new StaticTree(StaticTree.static_dtree, Tree.extra_dbits, 0, D_CODES, MAX_BITS);\n\nStaticTree.static_bl_desc = new StaticTree(null, Tree.extra_blbits, 0, BL_CODES, MAX_BL_BITS);\n\n// Deflate\n\nconst MAX_MEM_LEVEL = 9;\nconst DEF_MEM_LEVEL = 8;\n\nfunction Config(good_length, max_lazy, nice_length, max_chain, func) {\n\tconst that = this;\n\tthat.good_length = good_length;\n\tthat.max_lazy = max_lazy;\n\tthat.nice_length = nice_length;\n\tthat.max_chain = max_chain;\n\tthat.func = func;\n}\n\nconst STORED = 0;\nconst FAST = 1;\nconst SLOW = 2;\nconst config_table = [\n\tnew Config(0, 0, 0, 0, STORED),\n\tnew Config(4, 4, 8, 4, FAST),\n\tnew Config(4, 5, 16, 8, FAST),\n\tnew Config(4, 6, 32, 32, FAST),\n\tnew Config(4, 4, 16, 16, SLOW),\n\tnew Config(8, 16, 32, 32, SLOW),\n\tnew Config(8, 16, 128, 128, SLOW),\n\tnew Config(8, 32, 128, 256, SLOW),\n\tnew Config(32, 128, 258, 1024, SLOW),\n\tnew Config(32, 258, 258, 4096, SLOW)\n];\n\nconst z_errmsg = [\"need dictionary\", // Z_NEED_DICT\n\t// 2\n\t\"stream end\", // Z_STREAM_END 1\n\t\"\", // Z_OK 0\n\t\"\", // Z_ERRNO (-1)\n\t\"stream error\", // Z_STREAM_ERROR (-2)\n\t\"data error\", // Z_DATA_ERROR (-3)\n\t\"\", // Z_MEM_ERROR (-4)\n\t\"buffer error\", // Z_BUF_ERROR (-5)\n\t\"\",// Z_VERSION_ERROR (-6)\n\t\"\"];\n\n// block not completed, need more input or more output\nconst NeedMore = 0;\n\n// block flush performed\nconst BlockDone = 1;\n\n// finish started, need only more output at next deflate\nconst FinishStarted = 2;\n\n// finish done, accept no more input or output\nconst FinishDone = 3;\n\n// preset dictionary flag in zlib header\nconst PRESET_DICT = 0x20;\n\nconst INIT_STATE = 42;\nconst BUSY_STATE = 113;\nconst FINISH_STATE = 666;\n\n// The deflate compression method\nconst Z_DEFLATED = 8;\n\nconst STORED_BLOCK = 0;\nconst STATIC_TREES = 1;\nconst DYN_TREES = 2;\n\nconst MIN_MATCH = 3;\nconst MAX_MATCH = 258;\nconst MIN_LOOKAHEAD = (MAX_MATCH + MIN_MATCH + 1);\n\nfunction smaller(tree, n, m, depth) {\n\tconst tn2 = tree[n * 2];\n\tconst tm2 = tree[m * 2];\n\treturn (tn2 < tm2 || (tn2 == tm2 && depth[n] <= depth[m]));\n}\n\nfunction Deflate() {\n\n\tconst that = this;\n\tlet strm; // pointer back to this zlib stream\n\tlet status; // as the name implies\n\t// pending_buf; // output still pending\n\tlet pending_buf_size; // size of pending_buf\n\t// pending_out; // next pending byte to output to the stream\n\t// pending; // nb of bytes in the pending buffer\n\n\t// dist_buf; // buffer for distances\n\t// lc_buf; // buffer for literals or lengths\n\t// To simplify the code, dist_buf and lc_buf have the same number of elements.\n\t// To use different lengths, an extra flag array would be necessary.\n\n\tlet last_flush; // value of flush param for previous deflate call\n\n\tlet w_size; // LZ77 win size (32K by default)\n\tlet w_bits; // log2(w_size) (8..16)\n\tlet w_mask; // w_size - 1\n\n\tlet win;\n\t// Sliding win. Input bytes are read into the second half of the win,\n\t// and move to the first half later to keep a dictionary of at least wSize\n\t// bytes. With this organization, matches are limited to a distance of\n\t// wSize-MAX_MATCH bytes, but this ensures that IO is always\n\t// performed with a length multiple of the block size. Also, it limits\n\t// the win size to 64K, which is quite useful on MSDOS.\n\t// To do: use the user input buffer as sliding win.\n\n\tlet window_size;\n\t// Actual size of win: 2*wSize, except when the user input buffer\n\t// is directly used as sliding win.\n\n\tlet prev;\n\t// Link to older string with same hash index. To limit the size of this\n\t// array to 64K, this link is maintained only for the last 32K strings.\n\t// An index in this array is thus a win index modulo 32K.\n\n\tlet head; // Heads of the hash chains or NIL.\n\n\tlet ins_h; // hash index of string to be inserted\n\tlet hash_size; // number of elements in hash table\n\tlet hash_bits; // log2(hash_size)\n\tlet hash_mask; // hash_size-1\n\n\t// Number of bits by which ins_h must be shifted at each input\n\t// step. It must be such that after MIN_MATCH steps, the oldest\n\t// byte no longer takes part in the hash key, that is:\n\t// hash_shift * MIN_MATCH >= hash_bits\n\tlet hash_shift;\n\n\t// Window position at the beginning of the current output block. Gets\n\t// negative when the win is moved backwards.\n\n\tlet block_start;\n\n\tlet match_length; // length of best match\n\tlet prev_match; // previous match\n\tlet match_available; // set if previous match exists\n\tlet strstart; // start of string to insert\n\tlet match_start; // start of matching string\n\tlet lookahead; // number of valid bytes ahead in win\n\n\t// Length of the best match at previous step. Matches not greater than this\n\t// are discarded. This is used in the lazy match evaluation.\n\tlet prev_length;\n\n\t// To speed up deflation, hash chains are never searched beyond this\n\t// length. A higher limit improves compression ratio but degrades the speed.\n\tlet max_chain_length;\n\n\t// Attempt to find a better match only when the current match is strictly\n\t// smaller than this value. This mechanism is used only for compression\n\t// levels >= 4.\n\tlet max_lazy_match;\n\n\t// Insert new strings in the hash table only if the match length is not\n\t// greater than this length. This saves time but degrades compression.\n\t// max_insert_length is used only for compression levels <= 3.\n\n\tlet level; // compression level (1..9)\n\tlet strategy; // favor or force Huffman coding\n\n\t// Use a faster search when the previous match is longer than this\n\tlet good_match;\n\n\t// Stop searching when current match exceeds this\n\tlet nice_match;\n\n\tlet dyn_ltree; // literal and length tree\n\tlet dyn_dtree; // distance tree\n\tlet bl_tree; // Huffman tree for bit lengths\n\n\tconst l_desc = new Tree(); // desc for literal tree\n\tconst d_desc = new Tree(); // desc for distance tree\n\tconst bl_desc = new Tree(); // desc for bit length tree\n\n\t// that.heap_len; // number of elements in the heap\n\t// that.heap_max; // element of largest frequency\n\t// The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used.\n\t// The same heap array is used to build all trees.\n\n\t// Depth of each subtree used as tie breaker for trees of equal frequency\n\tthat.depth = [];\n\n\t// Size of match buffer for literals/lengths. There are 4 reasons for\n\t// limiting lit_bufsize to 64K:\n\t// - frequencies can be kept in 16 bit counters\n\t// - if compression is not successful for the first block, all input\n\t// data is still in the win so we can still emit a stored block even\n\t// when input comes from standard input. (This can also be done for\n\t// all blocks if lit_bufsize is not greater than 32K.)\n\t// - if compression is not successful for a file smaller than 64K, we can\n\t// even emit a stored file instead of a stored block (saving 5 bytes).\n\t// This is applicable only for zip (not gzip or zlib).\n\t// - creating new Huffman trees less frequently may not provide fast\n\t// adaptation to changes in the input data statistics. (Take for\n\t// example a binary file with poorly compressible code followed by\n\t// a highly compressible string table.) Smaller buffer sizes give\n\t// fast adaptation but have of course the overhead of transmitting\n\t// trees more frequently.\n\t// - I can't count above 4\n\tlet lit_bufsize;\n\n\tlet last_lit; // running index in dist_buf and lc_buf\n\n\t// that.opt_len; // bit length of current block with optimal trees\n\t// that.static_len; // bit length of current block with static trees\n\tlet matches; // number of string matches in current block\n\tlet last_eob_len; // bit length of EOB code for last block\n\n\t// Output buffer. bits are inserted starting at the bottom (least\n\t// significant bits).\n\tlet bi_buf;\n\n\t// Number of valid bits in bi_buf. All bits above the last valid bit\n\t// are always zero.\n\tlet bi_valid;\n\n\t// number of codes at each bit length for an optimal tree\n\tthat.bl_count = [];\n\n\t// heap used to build the Huffman trees\n\tthat.heap = [];\n\n\tdyn_ltree = [];\n\tdyn_dtree = [];\n\tbl_tree = [];\n\n\tfunction lm_init() {\n\t\twindow_size = 2 * w_size;\n\n\t\thead[hash_size - 1] = 0;\n\t\tfor (let i = 0; i < hash_size - 1; i++) {\n\t\t\thead[i] = 0;\n\t\t}\n\n\t\t// Set the default configuration parameters:\n\t\tmax_lazy_match = config_table[level].max_lazy;\n\t\tgood_match = config_table[level].good_length;\n\t\tnice_match = config_table[level].nice_length;\n\t\tmax_chain_length = config_table[level].max_chain;\n\n\t\tstrstart = 0;\n\t\tblock_start = 0;\n\t\tlookahead = 0;\n\t\tmatch_length = prev_length = MIN_MATCH - 1;\n\t\tmatch_available = 0;\n\t\tins_h = 0;\n\t}\n\n\tfunction init_block() {\n\t\tlet i;\n\t\t// Initialize the trees.\n\t\tfor (i = 0; i < L_CODES; i++)\n\t\t\tdyn_ltree[i * 2] = 0;\n\t\tfor (i = 0; i < D_CODES; i++)\n\t\t\tdyn_dtree[i * 2] = 0;\n\t\tfor (i = 0; i < BL_CODES; i++)\n\t\t\tbl_tree[i * 2] = 0;\n\n\t\tdyn_ltree[END_BLOCK * 2] = 1;\n\t\tthat.opt_len = that.static_len = 0;\n\t\tlast_lit = matches = 0;\n\t}\n\n\t// Initialize the tree data structures for a new zlib stream.\n\tfunction tr_init() {\n\n\t\tl_desc.dyn_tree = dyn_ltree;\n\t\tl_desc.stat_desc = StaticTree.static_l_desc;\n\n\t\td_desc.dyn_tree = dyn_dtree;\n\t\td_desc.stat_desc = StaticTree.static_d_desc;\n\n\t\tbl_desc.dyn_tree = bl_tree;\n\t\tbl_desc.stat_desc = StaticTree.static_bl_desc;\n\n\t\tbi_buf = 0;\n\t\tbi_valid = 0;\n\t\tlast_eob_len = 8; // enough lookahead for inflate\n\n\t\t// Initialize the first block of the first file:\n\t\tinit_block();\n\t}\n\n\t// Restore the heap property by moving down the tree starting at node k,\n\t// exchanging a node with the smallest of its two sons if necessary,\n\t// stopping\n\t// when the heap property is re-established (each father smaller than its\n\t// two sons).\n\tthat.pqdownheap = function (tree, // the tree to restore\n\t\tk // node to move down\n\t) {\n\t\tconst heap = that.heap;\n\t\tconst v = heap[k];\n\t\tlet j = k << 1; // left son of k\n\t\twhile (j <= that.heap_len) {\n\t\t\t// Set j to the smallest of the two sons:\n\t\t\tif (j < that.heap_len && smaller(tree, heap[j + 1], heap[j], that.depth)) {\n\t\t\t\tj++;\n\t\t\t}\n\t\t\t// Exit if v is smaller than both sons\n\t\t\tif (smaller(tree, v, heap[j], that.depth))\n\t\t\t\tbreak;\n\n\t\t\t// Exchange v with the smallest son\n\t\t\theap[k] = heap[j];\n\t\t\tk = j;\n\t\t\t// And continue down the tree, setting j to the left son of k\n\t\t\tj <<= 1;\n\t\t}\n\t\theap[k] = v;\n\t};\n\n\t// Scan a literal or distance tree to determine the frequencies of the codes\n\t// in the bit length tree.\n\tfunction scan_tree(tree,// the tree to be scanned\n\t\tmax_code // and its largest code of non zero frequency\n\t) {\n\t\tlet prevlen = -1; // last emitted length\n\t\tlet curlen; // length of current code\n\t\tlet nextlen = tree[0 * 2 + 1]; // length of next code\n\t\tlet count = 0; // repeat count of the current code\n\t\tlet max_count = 7; // max repeat count\n\t\tlet min_count = 4; // min repeat count\n\n\t\tif (nextlen === 0) {\n\t\t\tmax_count = 138;\n\t\t\tmin_count = 3;\n\t\t}\n\t\ttree[(max_code + 1) * 2 + 1] = 0xffff; // guard\n\n\t\tfor (let n = 0; n <= max_code; n++) {\n\t\t\tcurlen = nextlen;\n\t\t\tnextlen = tree[(n + 1) * 2 + 1];\n\t\t\tif (++count < max_count && curlen == nextlen) {\n\t\t\t\tcontinue;\n\t\t\t} else if (count < min_count) {\n\t\t\t\tbl_tree[curlen * 2] += count;\n\t\t\t} else if (curlen !== 0) {\n\t\t\t\tif (curlen != prevlen)\n\t\t\t\t\tbl_tree[curlen * 2]++;\n\t\t\t\tbl_tree[REP_3_6 * 2]++;\n\t\t\t} else if (count <= 10) {\n\t\t\t\tbl_tree[REPZ_3_10 * 2]++;\n\t\t\t} else {\n\t\t\t\tbl_tree[REPZ_11_138 * 2]++;\n\t\t\t}\n\t\t\tcount = 0;\n\t\t\tprevlen = curlen;\n\t\t\tif (nextlen === 0) {\n\t\t\t\tmax_count = 138;\n\t\t\t\tmin_count = 3;\n\t\t\t} else if (curlen == nextlen) {\n\t\t\t\tmax_count = 6;\n\t\t\t\tmin_count = 3;\n\t\t\t} else {\n\t\t\t\tmax_count = 7;\n\t\t\t\tmin_count = 4;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Construct the Huffman tree for the bit lengths and return the index in\n\t// bl_order of the last bit length code to send.\n\tfunction build_bl_tree() {\n\t\tlet max_blindex; // index of last bit length code of non zero freq\n\n\t\t// Determine the bit length frequencies for literal and distance trees\n\t\tscan_tree(dyn_ltree, l_desc.max_code);\n\t\tscan_tree(dyn_dtree, d_desc.max_code);\n\n\t\t// Build the bit length tree:\n\t\tbl_desc.build_tree(that);\n\t\t// opt_len now includes the length of the tree representations, except\n\t\t// the lengths of the bit lengths codes and the 5+5+4 bits for the\n\t\t// counts.\n\n\t\t// Determine the number of bit length codes to send. The pkzip format\n\t\t// requires that at least 4 bit length codes be sent. (appnote.txt says\n\t\t// 3 but the actual value used is 4.)\n\t\tfor (max_blindex = BL_CODES - 1; max_blindex >= 3; max_blindex--) {\n\t\t\tif (bl_tree[Tree.bl_order[max_blindex] * 2 + 1] !== 0)\n\t\t\t\tbreak;\n\t\t}\n\t\t// Update opt_len to include the bit length tree and counts\n\t\tthat.opt_len += 3 * (max_blindex + 1) + 5 + 5 + 4;\n\n\t\treturn max_blindex;\n\t}\n\n\t// Output a byte on the stream.\n\t// IN assertion: there is enough room in pending_buf.\n\tfunction put_byte(p) {\n\t\tthat.pending_buf[that.pending++] = p;\n\t}\n\n\tfunction put_short(w) {\n\t\tput_byte(w & 0xff);\n\t\tput_byte((w >>> 8) & 0xff);\n\t}\n\n\tfunction putShortMSB(b) {\n\t\tput_byte((b >> 8) & 0xff);\n\t\tput_byte((b & 0xff) & 0xff);\n\t}\n\n\tfunction send_bits(value, length) {\n\t\tlet val;\n\t\tconst len = length;\n\t\tif (bi_valid > Buf_size - len) {\n\t\t\tval = value;\n\t\t\t// bi_buf |= (val << bi_valid);\n\t\t\tbi_buf |= ((val << bi_valid) & 0xffff);\n\t\t\tput_short(bi_buf);\n\t\t\tbi_buf = val >>> (Buf_size - bi_valid);\n\t\t\tbi_valid += len - Buf_size;\n\t\t} else {\n\t\t\t// bi_buf |= (value) << bi_valid;\n\t\t\tbi_buf |= (((value) << bi_valid) & 0xffff);\n\t\t\tbi_valid += len;\n\t\t}\n\t}\n\n\tfunction send_code(c, tree) {\n\t\tconst c2 = c * 2;\n\t\tsend_bits(tree[c2] & 0xffff, tree[c2 + 1] & 0xffff);\n\t}\n\n\t// Send a literal or distance tree in compressed form, using the codes in\n\t// bl_tree.\n\tfunction send_tree(tree,// the tree to be sent\n\t\tmax_code // and its largest code of non zero frequency\n\t) {\n\t\tlet n; // iterates over all tree elements\n\t\tlet prevlen = -1; // last emitted length\n\t\tlet curlen; // length of current code\n\t\tlet nextlen = tree[0 * 2 + 1]; // length of next code\n\t\tlet count = 0; // repeat count of the current code\n\t\tlet max_count = 7; // max repeat count\n\t\tlet min_count = 4; // min repeat count\n\n\t\tif (nextlen === 0) {\n\t\t\tmax_count = 138;\n\t\t\tmin_count = 3;\n\t\t}\n\n\t\tfor (n = 0; n <= max_code; n++) {\n\t\t\tcurlen = nextlen;\n\t\t\tnextlen = tree[(n + 1) * 2 + 1];\n\t\t\tif (++count < max_count && curlen == nextlen) {\n\t\t\t\tcontinue;\n\t\t\t} else if (count < min_count) {\n\t\t\t\tdo {\n\t\t\t\t\tsend_code(curlen, bl_tree);\n\t\t\t\t} while (--count !== 0);\n\t\t\t} else if (curlen !== 0) {\n\t\t\t\tif (curlen != prevlen) {\n\t\t\t\t\tsend_code(curlen, bl_tree);\n\t\t\t\t\tcount--;\n\t\t\t\t}\n\t\t\t\tsend_code(REP_3_6, bl_tree);\n\t\t\t\tsend_bits(count - 3, 2);\n\t\t\t} else if (count <= 10) {\n\t\t\t\tsend_code(REPZ_3_10, bl_tree);\n\t\t\t\tsend_bits(count - 3, 3);\n\t\t\t} else {\n\t\t\t\tsend_code(REPZ_11_138, bl_tree);\n\t\t\t\tsend_bits(count - 11, 7);\n\t\t\t}\n\t\t\tcount = 0;\n\t\t\tprevlen = curlen;\n\t\t\tif (nextlen === 0) {\n\t\t\t\tmax_count = 138;\n\t\t\t\tmin_count = 3;\n\t\t\t} else if (curlen == nextlen) {\n\t\t\t\tmax_count = 6;\n\t\t\t\tmin_count = 3;\n\t\t\t} else {\n\t\t\t\tmax_count = 7;\n\t\t\t\tmin_count = 4;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Send the header for a block using dynamic Huffman trees: the counts, the\n\t// lengths of the bit length codes, the literal tree and the distance tree.\n\t// IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4.\n\tfunction send_all_trees(lcodes, dcodes, blcodes) {\n\t\tlet rank; // index in bl_order\n\n\t\tsend_bits(lcodes - 257, 5); // not +255 as stated in appnote.txt\n\t\tsend_bits(dcodes - 1, 5);\n\t\tsend_bits(blcodes - 4, 4); // not -3 as stated in appnote.txt\n\t\tfor (rank = 0; rank < blcodes; rank++) {\n\t\t\tsend_bits(bl_tree[Tree.bl_order[rank] * 2 + 1], 3);\n\t\t}\n\t\tsend_tree(dyn_ltree, lcodes - 1); // literal tree\n\t\tsend_tree(dyn_dtree, dcodes - 1); // distance tree\n\t}\n\n\t// Flush the bit buffer, keeping at most 7 bits in it.\n\tfunction bi_flush() {\n\t\tif (bi_valid == 16) {\n\t\t\tput_short(bi_buf);\n\t\t\tbi_buf = 0;\n\t\t\tbi_valid = 0;\n\t\t} else if (bi_valid >= 8) {\n\t\t\tput_byte(bi_buf & 0xff);\n\t\t\tbi_buf >>>= 8;\n\t\t\tbi_valid -= 8;\n\t\t}\n\t}\n\n\t// Send one empty static block to give enough lookahead for inflate.\n\t// This takes 10 bits, of which 7 may remain in the bit buffer.\n\t// The current inflate code requires 9 bits of lookahead. If the\n\t// last two codes for the previous block (real code plus EOB) were coded\n\t// on 5 bits or less, inflate may have only 5+3 bits of lookahead to decode\n\t// the last real code. In this case we send two empty static blocks instead\n\t// of one. (There are no problems if the previous block is stored or fixed.)\n\t// To simplify the code, we assume the worst case of last real code encoded\n\t// on one bit only.\n\tfunction _tr_align() {\n\t\tsend_bits(STATIC_TREES << 1, 3);\n\t\tsend_code(END_BLOCK, StaticTree.static_ltree);\n\n\t\tbi_flush();\n\n\t\t// Of the 10 bits for the empty block, we have already sent\n\t\t// (10 - bi_valid) bits. The lookahead for the last real code (before\n\t\t// the EOB of the previous block) was thus at least one plus the length\n\t\t// of the EOB plus what we have just sent of the empty static block.\n\t\tif (1 + last_eob_len + 10 - bi_valid < 9) {\n\t\t\tsend_bits(STATIC_TREES << 1, 3);\n\t\t\tsend_code(END_BLOCK, StaticTree.static_ltree);\n\t\t\tbi_flush();\n\t\t}\n\t\tlast_eob_len = 7;\n\t}\n\n\t// Save the match info and tally the frequency counts. Return true if\n\t// the current block must be flushed.\n\tfunction _tr_tally(dist, // distance of matched string\n\t\tlc // match length-MIN_MATCH or unmatched char (if dist==0)\n\t) {\n\t\tlet out_length, in_length, dcode;\n\t\tthat.dist_buf[last_lit] = dist;\n\t\tthat.lc_buf[last_lit] = lc & 0xff;\n\t\tlast_lit++;\n\n\t\tif (dist === 0) {\n\t\t\t// lc is the unmatched char\n\t\t\tdyn_ltree[lc * 2]++;\n\t\t} else {\n\t\t\tmatches++;\n\t\t\t// Here, lc is the match length - MIN_MATCH\n\t\t\tdist--; // dist = match distance - 1\n\t\t\tdyn_ltree[(Tree._length_code[lc] + LITERALS + 1) * 2]++;\n\t\t\tdyn_dtree[Tree.d_code(dist) * 2]++;\n\t\t}\n\n\t\tif ((last_lit & 0x1fff) === 0 && level > 2) {\n\t\t\t// Compute an upper bound for the compressed length\n\t\t\tout_length = last_lit * 8;\n\t\t\tin_length = strstart - block_start;\n\t\t\tfor (dcode = 0; dcode < D_CODES; dcode++) {\n\t\t\t\tout_length += dyn_dtree[dcode * 2] * (5 + Tree.extra_dbits[dcode]);\n\t\t\t}\n\t\t\tout_length >>>= 3;\n\t\t\tif ((matches < Math.floor(last_lit / 2)) && out_length < Math.floor(in_length / 2))\n\t\t\t\treturn true;\n\t\t}\n\n\t\treturn (last_lit == lit_bufsize - 1);\n\t\t// We avoid equality with lit_bufsize because of wraparound at 64K\n\t\t// on 16 bit machines and because stored blocks are restricted to\n\t\t// 64K-1 bytes.\n\t}\n\n\t// Send the block data compressed using the given Huffman trees\n\tfunction compress_block(ltree, dtree) {\n\t\tlet dist; // distance of matched string\n\t\tlet lc; // match length or unmatched char (if dist === 0)\n\t\tlet lx = 0; // running index in dist_buf and lc_buf\n\t\tlet code; // the code to send\n\t\tlet extra; // number of extra bits to send\n\n\t\tif (last_lit !== 0) {\n\t\t\tdo {\n\t\t\t\tdist = that.dist_buf[lx];\n\t\t\t\tlc = that.lc_buf[lx];\n\t\t\t\tlx++;\n\n\t\t\t\tif (dist === 0) {\n\t\t\t\t\tsend_code(lc, ltree); // send a literal byte\n\t\t\t\t} else {\n\t\t\t\t\t// Here, lc is the match length - MIN_MATCH\n\t\t\t\t\tcode = Tree._length_code[lc];\n\n\t\t\t\t\tsend_code(code + LITERALS + 1, ltree); // send the length\n\t\t\t\t\t// code\n\t\t\t\t\textra = Tree.extra_lbits[code];\n\t\t\t\t\tif (extra !== 0) {\n\t\t\t\t\t\tlc -= Tree.base_length[code];\n\t\t\t\t\t\tsend_bits(lc, extra); // send the extra length bits\n\t\t\t\t\t}\n\t\t\t\t\tdist--; // dist is now the match distance - 1\n\t\t\t\t\tcode = Tree.d_code(dist);\n\n\t\t\t\t\tsend_code(code, dtree); // send the distance code\n\t\t\t\t\textra = Tree.extra_dbits[code];\n\t\t\t\t\tif (extra !== 0) {\n\t\t\t\t\t\tdist -= Tree.base_dist[code];\n\t\t\t\t\t\tsend_bits(dist, extra); // send the extra distance bits\n\t\t\t\t\t}\n\t\t\t\t} // literal or match pair ?\n\t\t\t} while (lx < last_lit);\n\t\t}\n\n\t\tsend_code(END_BLOCK, ltree);\n\t\tlast_eob_len = ltree[END_BLOCK * 2 + 1];\n\t}\n\n\t// Flush the bit buffer and align the output on a byte boundary\n\tfunction bi_windup() {\n\t\tif (bi_valid > 8) {\n\t\t\tput_short(bi_buf);\n\t\t} else if (bi_valid > 0) {\n\t\t\tput_byte(bi_buf & 0xff);\n\t\t}\n\t\tbi_buf = 0;\n\t\tbi_valid = 0;\n\t}\n\n\t// Copy a stored block, storing first the length and its\n\t// one's complement if requested.\n\tfunction copy_block(buf, // the input data\n\t\tlen, // its length\n\t\theader // true if block header must be written\n\t) {\n\t\tbi_windup(); // align on byte boundary\n\t\tlast_eob_len = 8; // enough lookahead for inflate\n\n\t\tif (header) {\n\t\t\tput_short(len);\n\t\t\tput_short(~len);\n\t\t}\n\n\t\tthat.pending_buf.set(win.subarray(buf, buf + len), that.pending);\n\t\tthat.pending += len;\n\t}\n\n\t// Send a stored block\n\tfunction _tr_stored_block(buf, // input block\n\t\tstored_len, // length of input block\n\t\teof // true if this is the last block for a file\n\t) {\n\t\tsend_bits((STORED_BLOCK << 1) + (eof ? 1 : 0), 3); // send block type\n\t\tcopy_block(buf, stored_len, true); // with header\n\t}\n\n\t// Determine the best encoding for the current block: dynamic trees, static\n\t// trees or store, and output the encoded block to the zip file.\n\tfunction _tr_flush_block(buf, // input block, or NULL if too old\n\t\tstored_len, // length of input block\n\t\teof // true if this is the last block for a file\n\t) {\n\t\tlet opt_lenb, static_lenb;// opt_len and static_len in bytes\n\t\tlet max_blindex = 0; // index of last bit length code of non zero freq\n\n\t\t// Build the Huffman trees unless a stored block is forced\n\t\tif (level > 0) {\n\t\t\t// Construct the literal and distance trees\n\t\t\tl_desc.build_tree(that);\n\n\t\t\td_desc.build_tree(that);\n\n\t\t\t// At this point, opt_len and static_len are the total bit lengths\n\t\t\t// of\n\t\t\t// the compressed block data, excluding the tree representations.\n\n\t\t\t// Build the bit length tree for the above two trees, and get the\n\t\t\t// index\n\t\t\t// in bl_order of the last bit length code to send.\n\t\t\tmax_blindex = build_bl_tree();\n\n\t\t\t// Determine the best encoding. Compute first the block length in\n\t\t\t// bytes\n\t\t\topt_lenb = (that.opt_len + 3 + 7) >>> 3;\n\t\t\tstatic_lenb = (that.static_len + 3 + 7) >>> 3;\n\n\t\t\tif (static_lenb <= opt_lenb)\n\t\t\t\topt_lenb = static_lenb;\n\t\t} else {\n\t\t\topt_lenb = static_lenb = stored_len + 5; // force a stored block\n\t\t}\n\n\t\tif ((stored_len + 4 <= opt_lenb) && buf != -1) {\n\t\t\t// 4: two words for the lengths\n\t\t\t// The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE.\n\t\t\t// Otherwise we can't have processed more than WSIZE input bytes\n\t\t\t// since\n\t\t\t// the last block flush, because compression would have been\n\t\t\t// successful. If LIT_BUFSIZE <= WSIZE, it is never too late to\n\t\t\t// transform a block into a stored block.\n\t\t\t_tr_stored_block(buf, stored_len, eof);\n\t\t} else if (static_lenb == opt_lenb) {\n\t\t\tsend_bits((STATIC_TREES << 1) + (eof ? 1 : 0), 3);\n\t\t\tcompress_block(StaticTree.static_ltree, StaticTree.static_dtree);\n\t\t} else {\n\t\t\tsend_bits((DYN_TREES << 1) + (eof ? 1 : 0), 3);\n\t\t\tsend_all_trees(l_desc.max_code + 1, d_desc.max_code + 1, max_blindex + 1);\n\t\t\tcompress_block(dyn_ltree, dyn_dtree);\n\t\t}\n\n\t\t// The above check is made mod 2^32, for files larger than 512 MB\n\t\t// and uLong implemented on 32 bits.\n\n\t\tinit_block();\n\n\t\tif (eof) {\n\t\t\tbi_windup();\n\t\t}\n\t}\n\n\tfunction flush_block_only(eof) {\n\t\t_tr_flush_block(block_start >= 0 ? block_start : -1, strstart - block_start, eof);\n\t\tblock_start = strstart;\n\t\tstrm.flush_pending();\n\t}\n\n\t// Fill the win when the lookahead becomes insufficient.\n\t// Updates strstart and lookahead.\n\t//\n\t// IN assertion: lookahead < MIN_LOOKAHEAD\n\t// OUT assertions: strstart <= window_size-MIN_LOOKAHEAD\n\t// At least one byte has been read, or avail_in === 0; reads are\n\t// performed for at least two bytes (required for the zip translate_eol\n\t// option -- not supported here).\n\tfunction fill_window() {\n\t\tlet n, m;\n\t\tlet p;\n\t\tlet more; // Amount of free space at the end of the win.\n\n\t\tdo {\n\t\t\tmore = (window_size - lookahead - strstart);\n\n\t\t\t// Deal with !@#$% 64K limit:\n\t\t\tif (more === 0 && strstart === 0 && lookahead === 0) {\n\t\t\t\tmore = w_size;\n\t\t\t} else if (more == -1) {\n\t\t\t\t// Very unlikely, but possible on 16 bit machine if strstart ==\n\t\t\t\t// 0\n\t\t\t\t// and lookahead == 1 (input done one byte at time)\n\t\t\t\tmore--;\n\n\t\t\t\t// If the win is almost full and there is insufficient\n\t\t\t\t// lookahead,\n\t\t\t\t// move the upper half to the lower one to make room in the\n\t\t\t\t// upper half.\n\t\t\t} else if (strstart >= w_size + w_size - MIN_LOOKAHEAD) {\n\t\t\t\twin.set(win.subarray(w_size, w_size + w_size), 0);\n\n\t\t\t\tmatch_start -= w_size;\n\t\t\t\tstrstart -= w_size; // we now have strstart >= MAX_DIST\n\t\t\t\tblock_start -= w_size;\n\n\t\t\t\t// Slide the hash table (could be avoided with 32 bit values\n\t\t\t\t// at the expense of memory usage). We slide even when level ==\n\t\t\t\t// 0\n\t\t\t\t// to keep the hash table consistent if we switch back to level\n\t\t\t\t// > 0\n\t\t\t\t// later. (Using level 0 permanently is not an optimal usage of\n\t\t\t\t// zlib, so we don't care about this pathological case.)\n\n\t\t\t\tn = hash_size;\n\t\t\t\tp = n;\n\t\t\t\tdo {\n\t\t\t\t\tm = (head[--p] & 0xffff);\n\t\t\t\t\thead[p] = (m >= w_size ? m - w_size : 0);\n\t\t\t\t} while (--n !== 0);\n\n\t\t\t\tn = w_size;\n\t\t\t\tp = n;\n\t\t\t\tdo {\n\t\t\t\t\tm = (prev[--p] & 0xffff);\n\t\t\t\t\tprev[p] = (m >= w_size ? m - w_size : 0);\n\t\t\t\t\t// If n is not on any hash chain, prev[n] is garbage but\n\t\t\t\t\t// its value will never be used.\n\t\t\t\t} while (--n !== 0);\n\t\t\t\tmore += w_size;\n\t\t\t}\n\n\t\t\tif (strm.avail_in === 0)\n\t\t\t\treturn;\n\n\t\t\t// If there was no sliding:\n\t\t\t// strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 &&\n\t\t\t// more == window_size - lookahead - strstart\n\t\t\t// => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1)\n\t\t\t// => more >= window_size - 2*WSIZE + 2\n\t\t\t// In the BIG_MEM or MMAP case (not yet supported),\n\t\t\t// window_size == input_size + MIN_LOOKAHEAD &&\n\t\t\t// strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD.\n\t\t\t// Otherwise, window_size == 2*WSIZE so more >= 2.\n\t\t\t// If there was sliding, more >= WSIZE. So in all cases, more >= 2.\n\n\t\t\tn = strm.read_buf(win, strstart + lookahead, more);\n\t\t\tlookahead += n;\n\n\t\t\t// Initialize the hash value now that we have some input:\n\t\t\tif (lookahead >= MIN_MATCH) {\n\t\t\t\tins_h = win[strstart] & 0xff;\n\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[strstart + 1] & 0xff)) & hash_mask;\n\t\t\t}\n\t\t\t// If the whole input has less than MIN_MATCH bytes, ins_h is\n\t\t\t// garbage,\n\t\t\t// but this is not important since only literal bytes will be\n\t\t\t// emitted.\n\t\t} while (lookahead < MIN_LOOKAHEAD && strm.avail_in !== 0);\n\t}\n\n\t// Copy without compression as much as possible from the input stream,\n\t// return\n\t// the current block state.\n\t// This function does not insert new strings in the dictionary since\n\t// uncompressible data is probably not useful. This function is used\n\t// only for the level=0 compression option.\n\t// NOTE: this function should be optimized to avoid extra copying from\n\t// win to pending_buf.\n\tfunction deflate_stored(flush) {\n\t\t// Stored blocks are limited to 0xffff bytes, pending_buf is limited\n\t\t// to pending_buf_size, and each stored block has a 5 byte header:\n\n\t\tlet max_block_size = 0xffff;\n\t\tlet max_start;\n\n\t\tif (max_block_size > pending_buf_size - 5) {\n\t\t\tmax_block_size = pending_buf_size - 5;\n\t\t}\n\n\t\t// Copy as much as possible from input to output:\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\t// Fill the win as much as possible:\n\t\t\tif (lookahead <= 1) {\n\t\t\t\tfill_window();\n\t\t\t\tif (lookahead === 0 && flush == Z_NO_FLUSH)\n\t\t\t\t\treturn NeedMore;\n\t\t\t\tif (lookahead === 0)\n\t\t\t\t\tbreak; // flush the current block\n\t\t\t}\n\n\t\t\tstrstart += lookahead;\n\t\t\tlookahead = 0;\n\n\t\t\t// Emit a stored block if pending_buf will be full:\n\t\t\tmax_start = block_start + max_block_size;\n\t\t\tif (strstart === 0 || strstart >= max_start) {\n\t\t\t\t// strstart === 0 is possible when wraparound on 16-bit machine\n\t\t\t\tlookahead = (strstart - max_start);\n\t\t\t\tstrstart = max_start;\n\n\t\t\t\tflush_block_only(false);\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\n\t\t\t}\n\n\t\t\t// Flush if we may have to slide, otherwise block_start may become\n\t\t\t// negative and the data will be gone:\n\t\t\tif (strstart - block_start >= w_size - MIN_LOOKAHEAD) {\n\t\t\t\tflush_block_only(false);\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\t\t\t}\n\t\t}\n\n\t\tflush_block_only(flush == Z_FINISH);\n\t\tif (strm.avail_out === 0)\n\t\t\treturn (flush == Z_FINISH) ? FinishStarted : NeedMore;\n\n\t\treturn flush == Z_FINISH ? FinishDone : BlockDone;\n\t}\n\n\tfunction longest_match(cur_match) {\n\t\tlet chain_length = max_chain_length; // max hash chain length\n\t\tlet scan = strstart; // current string\n\t\tlet match; // matched string\n\t\tlet len; // length of current match\n\t\tlet best_len = prev_length; // best match length so far\n\t\tconst limit = strstart > (w_size - MIN_LOOKAHEAD) ? strstart - (w_size - MIN_LOOKAHEAD) : 0;\n\t\tlet _nice_match = nice_match;\n\n\t\t// Stop when cur_match becomes <= limit. To simplify the code,\n\t\t// we prevent matches with the string of win index 0.\n\n\t\tconst wmask = w_mask;\n\n\t\tconst strend = strstart + MAX_MATCH;\n\t\tlet scan_end1 = win[scan + best_len - 1];\n\t\tlet scan_end = win[scan + best_len];\n\n\t\t// The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of\n\t\t// 16.\n\t\t// It is easy to get rid of this optimization if necessary.\n\n\t\t// Do not waste too much time if we already have a good match:\n\t\tif (prev_length >= good_match) {\n\t\t\tchain_length >>= 2;\n\t\t}\n\n\t\t// Do not look for matches beyond the end of the input. This is\n\t\t// necessary\n\t\t// to make deflate deterministic.\n\t\tif (_nice_match > lookahead)\n\t\t\t_nice_match = lookahead;\n\n\t\tdo {\n\t\t\tmatch = cur_match;\n\n\t\t\t// Skip to next match if the match length cannot increase\n\t\t\t// or if the match length is less than 2:\n\t\t\tif (win[match + best_len] != scan_end || win[match + best_len - 1] != scan_end1 || win[match] != win[scan]\n\t\t\t\t|| win[++match] != win[scan + 1])\n\t\t\t\tcontinue;\n\n\t\t\t// The check at best_len-1 can be removed because it will be made\n\t\t\t// again later. (This heuristic is not always a win.)\n\t\t\t// It is not necessary to compare scan[2] and match[2] since they\n\t\t\t// are always equal when the other bytes match, given that\n\t\t\t// the hash keys are equal and that HASH_BITS >= 8.\n\t\t\tscan += 2;\n\t\t\tmatch++;\n\n\t\t\t// We check for insufficient lookahead only every 8th comparison;\n\t\t\t// the 256th check will be made at strstart+258.\n\t\t\t// eslint-disable-next-line no-empty\n\t\t\tdo {\n\t\t\t\t// empty block\n\t\t\t} while (win[++scan] == win[++match] && win[++scan] == win[++match] && win[++scan] == win[++match]\n\t\t\t&& win[++scan] == win[++match] && win[++scan] == win[++match] && win[++scan] == win[++match]\n\t\t\t&& win[++scan] == win[++match] && win[++scan] == win[++match] && scan < strend);\n\n\t\t\tlen = MAX_MATCH - (strend - scan);\n\t\t\tscan = strend - MAX_MATCH;\n\n\t\t\tif (len > best_len) {\n\t\t\t\tmatch_start = cur_match;\n\t\t\t\tbest_len = len;\n\t\t\t\tif (len >= _nice_match)\n\t\t\t\t\tbreak;\n\t\t\t\tscan_end1 = win[scan + best_len - 1];\n\t\t\t\tscan_end = win[scan + best_len];\n\t\t\t}\n\n\t\t} while ((cur_match = (prev[cur_match & wmask] & 0xffff)) > limit && --chain_length !== 0);\n\n\t\tif (best_len <= lookahead)\n\t\t\treturn best_len;\n\t\treturn lookahead;\n\t}\n\n\t// Compress as much as possible from the input stream, return the current\n\t// block state.\n\t// This function does not perform lazy evaluation of matches and inserts\n\t// new strings in the dictionary only for unmatched strings or for short\n\t// matches. It is used only for the fast compression options.\n\tfunction deflate_fast(flush) {\n\t\t// short hash_head = 0; // head of the hash chain\n\t\tlet hash_head = 0; // head of the hash chain\n\t\tlet bflush; // set if current block must be flushed\n\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\t// Make sure that we always have enough lookahead, except\n\t\t\t// at the end of the input file. We need MAX_MATCH bytes\n\t\t\t// for the next match, plus MIN_MATCH bytes to insert the\n\t\t\t// string following the next match.\n\t\t\tif (lookahead < MIN_LOOKAHEAD) {\n\t\t\t\tfill_window();\n\t\t\t\tif (lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) {\n\t\t\t\t\treturn NeedMore;\n\t\t\t\t}\n\t\t\t\tif (lookahead === 0)\n\t\t\t\t\tbreak; // flush the current block\n\t\t\t}\n\n\t\t\t// Insert the string win[strstart .. strstart+2] in the\n\t\t\t// dictionary, and set hash_head to the head of the hash chain:\n\t\t\tif (lookahead >= MIN_MATCH) {\n\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\n\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\thead[ins_h] = strstart;\n\t\t\t}\n\n\t\t\t// Find the longest match, discarding those <= prev_length.\n\t\t\t// At this point we have always match_length < MIN_MATCH\n\n\t\t\tif (hash_head !== 0 && ((strstart - hash_head) & 0xffff) <= w_size - MIN_LOOKAHEAD) {\n\t\t\t\t// To simplify the code, we prevent matches with the string\n\t\t\t\t// of win index 0 (in particular we have to avoid a match\n\t\t\t\t// of the string with itself at the start of the input file).\n\t\t\t\tif (strategy != Z_HUFFMAN_ONLY) {\n\t\t\t\t\tmatch_length = longest_match(hash_head);\n\t\t\t\t}\n\t\t\t\t// longest_match() sets match_start\n\t\t\t}\n\t\t\tif (match_length >= MIN_MATCH) {\n\t\t\t\t// check_match(strstart, match_start, match_length);\n\n\t\t\t\tbflush = _tr_tally(strstart - match_start, match_length - MIN_MATCH);\n\n\t\t\t\tlookahead -= match_length;\n\n\t\t\t\t// Insert new strings in the hash table only if the match length\n\t\t\t\t// is not too large. This saves time but degrades compression.\n\t\t\t\tif (match_length <= max_lazy_match && lookahead >= MIN_MATCH) {\n\t\t\t\t\tmatch_length--; // string at strstart already in hash table\n\t\t\t\t\tdo {\n\t\t\t\t\t\tstrstart++;\n\n\t\t\t\t\t\tins_h = ((ins_h << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\t\t\thead[ins_h] = strstart;\n\n\t\t\t\t\t\t// strstart never exceeds WSIZE-MAX_MATCH, so there are\n\t\t\t\t\t\t// always MIN_MATCH bytes ahead.\n\t\t\t\t\t} while (--match_length !== 0);\n\t\t\t\t\tstrstart++;\n\t\t\t\t} else {\n\t\t\t\t\tstrstart += match_length;\n\t\t\t\t\tmatch_length = 0;\n\t\t\t\t\tins_h = win[strstart] & 0xff;\n\n\t\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[strstart + 1] & 0xff)) & hash_mask;\n\t\t\t\t\t// If lookahead < MIN_MATCH, ins_h is garbage, but it does\n\t\t\t\t\t// not\n\t\t\t\t\t// matter since it will be recomputed at next deflate call.\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// No match, output a literal byte\n\n\t\t\t\tbflush = _tr_tally(0, win[strstart] & 0xff);\n\t\t\t\tlookahead--;\n\t\t\t\tstrstart++;\n\t\t\t}\n\t\t\tif (bflush) {\n\n\t\t\t\tflush_block_only(false);\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\t\t\t}\n\t\t}\n\n\t\tflush_block_only(flush == Z_FINISH);\n\t\tif (strm.avail_out === 0) {\n\t\t\tif (flush == Z_FINISH)\n\t\t\t\treturn FinishStarted;\n\t\t\telse\n\t\t\t\treturn NeedMore;\n\t\t}\n\t\treturn flush == Z_FINISH ? FinishDone : BlockDone;\n\t}\n\n\t// Same as above, but achieves better compression. We use a lazy\n\t// evaluation for matches: a match is finally adopted only if there is\n\t// no better match at the next win position.\n\tfunction deflate_slow(flush) {\n\t\t// short hash_head = 0; // head of hash chain\n\t\tlet hash_head = 0; // head of hash chain\n\t\tlet bflush; // set if current block must be flushed\n\t\tlet max_insert;\n\n\t\t// Process the input block.\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\t// Make sure that we always have enough lookahead, except\n\t\t\t// at the end of the input file. We need MAX_MATCH bytes\n\t\t\t// for the next match, plus MIN_MATCH bytes to insert the\n\t\t\t// string following the next match.\n\n\t\t\tif (lookahead < MIN_LOOKAHEAD) {\n\t\t\t\tfill_window();\n\t\t\t\tif (lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) {\n\t\t\t\t\treturn NeedMore;\n\t\t\t\t}\n\t\t\t\tif (lookahead === 0)\n\t\t\t\t\tbreak; // flush the current block\n\t\t\t}\n\n\t\t\t// Insert the string win[strstart .. strstart+2] in the\n\t\t\t// dictionary, and set hash_head to the head of the hash chain:\n\n\t\t\tif (lookahead >= MIN_MATCH) {\n\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\thead[ins_h] = strstart;\n\t\t\t}\n\n\t\t\t// Find the longest match, discarding those <= prev_length.\n\t\t\tprev_length = match_length;\n\t\t\tprev_match = match_start;\n\t\t\tmatch_length = MIN_MATCH - 1;\n\n\t\t\tif (hash_head !== 0 && prev_length < max_lazy_match && ((strstart - hash_head) & 0xffff) <= w_size - MIN_LOOKAHEAD) {\n\t\t\t\t// To simplify the code, we prevent matches with the string\n\t\t\t\t// of win index 0 (in particular we have to avoid a match\n\t\t\t\t// of the string with itself at the start of the input file).\n\n\t\t\t\tif (strategy != Z_HUFFMAN_ONLY) {\n\t\t\t\t\tmatch_length = longest_match(hash_head);\n\t\t\t\t}\n\t\t\t\t// longest_match() sets match_start\n\n\t\t\t\tif (match_length <= 5 && (strategy == Z_FILTERED || (match_length == MIN_MATCH && strstart - match_start > 4096))) {\n\n\t\t\t\t\t// If prev_match is also MIN_MATCH, match_start is garbage\n\t\t\t\t\t// but we will ignore the current match anyway.\n\t\t\t\t\tmatch_length = MIN_MATCH - 1;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// If there was a match at the previous step and the current\n\t\t\t// match is not better, output the previous match:\n\t\t\tif (prev_length >= MIN_MATCH && match_length <= prev_length) {\n\t\t\t\tmax_insert = strstart + lookahead - MIN_MATCH;\n\t\t\t\t// Do not insert strings in hash table beyond this.\n\n\t\t\t\t// check_match(strstart-1, prev_match, prev_length);\n\n\t\t\t\tbflush = _tr_tally(strstart - 1 - prev_match, prev_length - MIN_MATCH);\n\n\t\t\t\t// Insert in hash table all strings up to the end of the match.\n\t\t\t\t// strstart-1 and strstart are already inserted. If there is not\n\t\t\t\t// enough lookahead, the last two strings are not inserted in\n\t\t\t\t// the hash table.\n\t\t\t\tlookahead -= prev_length - 1;\n\t\t\t\tprev_length -= 2;\n\t\t\t\tdo {\n\t\t\t\t\tif (++strstart <= max_insert) {\n\t\t\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\t\t\thead[ins_h] = strstart;\n\t\t\t\t\t}\n\t\t\t\t} while (--prev_length !== 0);\n\t\t\t\tmatch_available = 0;\n\t\t\t\tmatch_length = MIN_MATCH - 1;\n\t\t\t\tstrstart++;\n\n\t\t\t\tif (bflush) {\n\t\t\t\t\tflush_block_only(false);\n\t\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\t\treturn NeedMore;\n\t\t\t\t}\n\t\t\t} else if (match_available !== 0) {\n\n\t\t\t\t// If there was no match at the previous position, output a\n\t\t\t\t// single literal. If there was a match but the current match\n\t\t\t\t// is longer, truncate the previous match to a single literal.\n\n\t\t\t\tbflush = _tr_tally(0, win[strstart - 1] & 0xff);\n\n\t\t\t\tif (bflush) {\n\t\t\t\t\tflush_block_only(false);\n\t\t\t\t}\n\t\t\t\tstrstart++;\n\t\t\t\tlookahead--;\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\t\t\t} else {\n\t\t\t\t// There is no previous match to compare with, wait for\n\t\t\t\t// the next step to decide.\n\n\t\t\t\tmatch_available = 1;\n\t\t\t\tstrstart++;\n\t\t\t\tlookahead--;\n\t\t\t}\n\t\t}\n\n\t\tif (match_available !== 0) {\n\t\t\tbflush = _tr_tally(0, win[strstart - 1] & 0xff);\n\t\t\tmatch_available = 0;\n\t\t}\n\t\tflush_block_only(flush == Z_FINISH);\n\n\t\tif (strm.avail_out === 0) {\n\t\t\tif (flush == Z_FINISH)\n\t\t\t\treturn FinishStarted;\n\t\t\telse\n\t\t\t\treturn NeedMore;\n\t\t}\n\n\t\treturn flush == Z_FINISH ? FinishDone : BlockDone;\n\t}\n\n\tfunction deflateReset(strm) {\n\t\tstrm.total_in = strm.total_out = 0;\n\t\tstrm.msg = null; //\n\n\t\tthat.pending = 0;\n\t\tthat.pending_out = 0;\n\n\t\tstatus = BUSY_STATE;\n\n\t\tlast_flush = Z_NO_FLUSH;\n\n\t\ttr_init();\n\t\tlm_init();\n\t\treturn Z_OK;\n\t}\n\n\tthat.deflateInit = function (strm, _level, bits, _method, memLevel, _strategy) {\n\t\tif (!_method)\n\t\t\t_method = Z_DEFLATED;\n\t\tif (!memLevel)\n\t\t\tmemLevel = DEF_MEM_LEVEL;\n\t\tif (!_strategy)\n\t\t\t_strategy = Z_DEFAULT_STRATEGY;\n\n\t\t// byte[] my_version=ZLIB_VERSION;\n\n\t\t//\n\t\t// if (!version || version[0] != my_version[0]\n\t\t// || stream_size != sizeof(z_stream)) {\n\t\t// return Z_VERSION_ERROR;\n\t\t// }\n\n\t\tstrm.msg = null;\n\n\t\tif (_level == Z_DEFAULT_COMPRESSION)\n\t\t\t_level = 6;\n\n\t\tif (memLevel < 1 || memLevel > MAX_MEM_LEVEL || _method != Z_DEFLATED || bits < 9 || bits > 15 || _level < 0 || _level > 9 || _strategy < 0\n\t\t\t|| _strategy > Z_HUFFMAN_ONLY) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\n\t\tstrm.dstate = that;\n\n\t\tw_bits = bits;\n\t\tw_size = 1 << w_bits;\n\t\tw_mask = w_size - 1;\n\n\t\thash_bits = memLevel + 7;\n\t\thash_size = 1 << hash_bits;\n\t\thash_mask = hash_size - 1;\n\t\thash_shift = Math.floor((hash_bits + MIN_MATCH - 1) / MIN_MATCH);\n\n\t\twin = new Uint8Array(w_size * 2);\n\t\tprev = [];\n\t\thead = [];\n\n\t\tlit_bufsize = 1 << (memLevel + 6); // 16K elements by default\n\n\t\tthat.pending_buf = new Uint8Array(lit_bufsize * 4);\n\t\tpending_buf_size = lit_bufsize * 4;\n\n\t\tthat.dist_buf = new Uint16Array(lit_bufsize);\n\t\tthat.lc_buf = new Uint8Array(lit_bufsize);\n\n\t\tlevel = _level;\n\n\t\tstrategy = _strategy;\n\n\t\treturn deflateReset(strm);\n\t};\n\n\tthat.deflateEnd = function () {\n\t\tif (status != INIT_STATE && status != BUSY_STATE && status != FINISH_STATE) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\t// Deallocate in reverse order of allocations:\n\t\tthat.lc_buf = null;\n\t\tthat.dist_buf = null;\n\t\tthat.pending_buf = null;\n\t\thead = null;\n\t\tprev = null;\n\t\twin = null;\n\t\t// free\n\t\tthat.dstate = null;\n\t\treturn status == BUSY_STATE ? Z_DATA_ERROR : Z_OK;\n\t};\n\n\tthat.deflateParams = function (strm, _level, _strategy) {\n\t\tlet err = Z_OK;\n\n\t\tif (_level == Z_DEFAULT_COMPRESSION) {\n\t\t\t_level = 6;\n\t\t}\n\t\tif (_level < 0 || _level > 9 || _strategy < 0 || _strategy > Z_HUFFMAN_ONLY) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\n\t\tif (config_table[level].func != config_table[_level].func && strm.total_in !== 0) {\n\t\t\t// Flush the last buffer:\n\t\t\terr = strm.deflate(Z_PARTIAL_FLUSH);\n\t\t}\n\n\t\tif (level != _level) {\n\t\t\tlevel = _level;\n\t\t\tmax_lazy_match = config_table[level].max_lazy;\n\t\t\tgood_match = config_table[level].good_length;\n\t\t\tnice_match = config_table[level].nice_length;\n\t\t\tmax_chain_length = config_table[level].max_chain;\n\t\t}\n\t\tstrategy = _strategy;\n\t\treturn err;\n\t};\n\n\tthat.deflateSetDictionary = function (_strm, dictionary, dictLength) {\n\t\tlet length = dictLength;\n\t\tlet n, index = 0;\n\n\t\tif (!dictionary || status != INIT_STATE)\n\t\t\treturn Z_STREAM_ERROR;\n\n\t\tif (length < MIN_MATCH)\n\t\t\treturn Z_OK;\n\t\tif (length > w_size - MIN_LOOKAHEAD) {\n\t\t\tlength = w_size - MIN_LOOKAHEAD;\n\t\t\tindex = dictLength - length; // use the tail of the dictionary\n\t\t}\n\t\twin.set(dictionary.subarray(index, index + length), 0);\n\n\t\tstrstart = length;\n\t\tblock_start = length;\n\n\t\t// Insert all strings in the hash table (except for the last two bytes).\n\t\t// s->lookahead stays null, so s->ins_h will be recomputed at the next\n\t\t// call of fill_window.\n\n\t\tins_h = win[0] & 0xff;\n\t\tins_h = (((ins_h) << hash_shift) ^ (win[1] & 0xff)) & hash_mask;\n\n\t\tfor (n = 0; n <= length - MIN_MATCH; n++) {\n\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(n) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\tprev[n & w_mask] = head[ins_h];\n\t\t\thead[ins_h] = n;\n\t\t}\n\t\treturn Z_OK;\n\t};\n\n\tthat.deflate = function (_strm, flush) {\n\t\tlet i, header, level_flags, old_flush, bstate;\n\n\t\tif (flush > Z_FINISH || flush < 0) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\n\t\tif (!_strm.next_out || (!_strm.next_in && _strm.avail_in !== 0) || (status == FINISH_STATE && flush != Z_FINISH)) {\n\t\t\t_strm.msg = z_errmsg[Z_NEED_DICT - (Z_STREAM_ERROR)];\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\tif (_strm.avail_out === 0) {\n\t\t\t_strm.msg = z_errmsg[Z_NEED_DICT - (Z_BUF_ERROR)];\n\t\t\treturn Z_BUF_ERROR;\n\t\t}\n\n\t\tstrm = _strm; // just in case\n\t\told_flush = last_flush;\n\t\tlast_flush = flush;\n\n\t\t// Write the zlib header\n\t\tif (status == INIT_STATE) {\n\t\t\theader = (Z_DEFLATED + ((w_bits - 8) << 4)) << 8;\n\t\t\tlevel_flags = ((level - 1) & 0xff) >> 1;\n\n\t\t\tif (level_flags > 3)\n\t\t\t\tlevel_flags = 3;\n\t\t\theader |= (level_flags << 6);\n\t\t\tif (strstart !== 0)\n\t\t\t\theader |= PRESET_DICT;\n\t\t\theader += 31 - (header % 31);\n\n\t\t\tstatus = BUSY_STATE;\n\t\t\tputShortMSB(header);\n\t\t}\n\n\t\t// Flush as much pending output as possible\n\t\tif (that.pending !== 0) {\n\t\t\tstrm.flush_pending();\n\t\t\tif (strm.avail_out === 0) {\n\t\t\t\t// console.log(\" avail_out==0\");\n\t\t\t\t// Since avail_out is 0, deflate will be called again with\n\t\t\t\t// more output space, but possibly with both pending and\n\t\t\t\t// avail_in equal to zero. There won't be anything to do,\n\t\t\t\t// but this is not an error situation so make sure we\n\t\t\t\t// return OK instead of BUF_ERROR at next call of deflate:\n\t\t\t\tlast_flush = -1;\n\t\t\t\treturn Z_OK;\n\t\t\t}\n\n\t\t\t// Make sure there is something to do and avoid duplicate\n\t\t\t// consecutive\n\t\t\t// flushes. For repeated and useless calls with Z_FINISH, we keep\n\t\t\t// returning Z_STREAM_END instead of Z_BUFF_ERROR.\n\t\t} else if (strm.avail_in === 0 && flush <= old_flush && flush != Z_FINISH) {\n\t\t\tstrm.msg = z_errmsg[Z_NEED_DICT - (Z_BUF_ERROR)];\n\t\t\treturn Z_BUF_ERROR;\n\t\t}\n\n\t\t// User must not provide more input after the first FINISH:\n\t\tif (status == FINISH_STATE && strm.avail_in !== 0) {\n\t\t\t_strm.msg = z_errmsg[Z_NEED_DICT - (Z_BUF_ERROR)];\n\t\t\treturn Z_BUF_ERROR;\n\t\t}\n\n\t\t// Start a new block or continue the current one.\n\t\tif (strm.avail_in !== 0 || lookahead !== 0 || (flush != Z_NO_FLUSH && status != FINISH_STATE)) {\n\t\t\tbstate = -1;\n\t\t\tswitch (config_table[level].func) {\n\t\t\t\tcase STORED:\n\t\t\t\t\tbstate = deflate_stored(flush);\n\t\t\t\t\tbreak;\n\t\t\t\tcase FAST:\n\t\t\t\t\tbstate = deflate_fast(flush);\n\t\t\t\t\tbreak;\n\t\t\t\tcase SLOW:\n\t\t\t\t\tbstate = deflate_slow(flush);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t}\n\n\t\t\tif (bstate == FinishStarted || bstate == FinishDone) {\n\t\t\t\tstatus = FINISH_STATE;\n\t\t\t}\n\t\t\tif (bstate == NeedMore || bstate == FinishStarted) {\n\t\t\t\tif (strm.avail_out === 0) {\n\t\t\t\t\tlast_flush = -1; // avoid BUF_ERROR next call, see above\n\t\t\t\t}\n\t\t\t\treturn Z_OK;\n\t\t\t\t// If flush != Z_NO_FLUSH && avail_out === 0, the next call\n\t\t\t\t// of deflate should use the same flush parameter to make sure\n\t\t\t\t// that the flush is complete. So we don't have to output an\n\t\t\t\t// empty block here, this will be done at next call. This also\n\t\t\t\t// ensures that for a very small output buffer, we emit at most\n\t\t\t\t// one empty block.\n\t\t\t}\n\n\t\t\tif (bstate == BlockDone) {\n\t\t\t\tif (flush == Z_PARTIAL_FLUSH) {\n\t\t\t\t\t_tr_align();\n\t\t\t\t} else { // FULL_FLUSH or SYNC_FLUSH\n\t\t\t\t\t_tr_stored_block(0, 0, false);\n\t\t\t\t\t// For a full flush, this empty block will be recognized\n\t\t\t\t\t// as a special marker by inflate_sync().\n\t\t\t\t\tif (flush == Z_FULL_FLUSH) {\n\t\t\t\t\t\t// state.head[s.hash_size-1]=0;\n\t\t\t\t\t\tfor (i = 0; i < hash_size/*-1*/; i++)\n\t\t\t\t\t\t\t// forget history\n\t\t\t\t\t\t\thead[i] = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tstrm.flush_pending();\n\t\t\t\tif (strm.avail_out === 0) {\n\t\t\t\t\tlast_flush = -1; // avoid BUF_ERROR at next call, see above\n\t\t\t\t\treturn Z_OK;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (flush != Z_FINISH)\n\t\t\treturn Z_OK;\n\t\treturn Z_STREAM_END;\n\t};\n}\n\n// ZStream\n\nfunction ZStream() {\n\tconst that = this;\n\tthat.next_in_index = 0;\n\tthat.next_out_index = 0;\n\t// that.next_in; // next input byte\n\tthat.avail_in = 0; // number of bytes available at next_in\n\tthat.total_in = 0; // total nb of input bytes read so far\n\t// that.next_out; // next output byte should be put there\n\tthat.avail_out = 0; // remaining free space at next_out\n\tthat.total_out = 0; // total nb of bytes output so far\n\t// that.msg;\n\t// that.dstate;\n}\n\nZStream.prototype = {\n\tdeflateInit(level, bits) {\n\t\tconst that = this;\n\t\tthat.dstate = new Deflate();\n\t\tif (!bits)\n\t\t\tbits = MAX_BITS;\n\t\treturn that.dstate.deflateInit(that, level, bits);\n\t},\n\n\tdeflate(flush) {\n\t\tconst that = this;\n\t\tif (!that.dstate) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\treturn that.dstate.deflate(that, flush);\n\t},\n\n\tdeflateEnd() {\n\t\tconst that = this;\n\t\tif (!that.dstate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst ret = that.dstate.deflateEnd();\n\t\tthat.dstate = null;\n\t\treturn ret;\n\t},\n\n\tdeflateParams(level, strategy) {\n\t\tconst that = this;\n\t\tif (!that.dstate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.dstate.deflateParams(that, level, strategy);\n\t},\n\n\tdeflateSetDictionary(dictionary, dictLength) {\n\t\tconst that = this;\n\t\tif (!that.dstate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.dstate.deflateSetDictionary(that, dictionary, dictLength);\n\t},\n\n\t// Read a new buffer from the current input stream, update the\n\t// total number of bytes read. All deflate() input goes through\n\t// this function so some applications may wish to modify it to avoid\n\t// allocating a large strm->next_in buffer and copying from it.\n\t// (See also flush_pending()).\n\tread_buf(buf, start, size) {\n\t\tconst that = this;\n\t\tlet len = that.avail_in;\n\t\tif (len > size)\n\t\t\tlen = size;\n\t\tif (len === 0)\n\t\t\treturn 0;\n\t\tthat.avail_in -= len;\n\t\tbuf.set(that.next_in.subarray(that.next_in_index, that.next_in_index + len), start);\n\t\tthat.next_in_index += len;\n\t\tthat.total_in += len;\n\t\treturn len;\n\t},\n\n\t// Flush as much pending output as possible. All deflate() output goes\n\t// through this function so some applications may wish to modify it\n\t// to avoid allocating a large strm->next_out buffer and copying into it.\n\t// (See also read_buf()).\n\tflush_pending() {\n\t\tconst that = this;\n\t\tlet len = that.dstate.pending;\n\n\t\tif (len > that.avail_out)\n\t\t\tlen = that.avail_out;\n\t\tif (len === 0)\n\t\t\treturn;\n\n\t\t// if (that.dstate.pending_buf.length <= that.dstate.pending_out || that.next_out.length <= that.next_out_index\n\t\t// || that.dstate.pending_buf.length < (that.dstate.pending_out + len) || that.next_out.length < (that.next_out_index +\n\t\t// len)) {\n\t\t// console.log(that.dstate.pending_buf.length + \", \" + that.dstate.pending_out + \", \" + that.next_out.length + \", \" +\n\t\t// that.next_out_index + \", \" + len);\n\t\t// console.log(\"avail_out=\" + that.avail_out);\n\t\t// }\n\n\t\tthat.next_out.set(that.dstate.pending_buf.subarray(that.dstate.pending_out, that.dstate.pending_out + len), that.next_out_index);\n\n\t\tthat.next_out_index += len;\n\t\tthat.dstate.pending_out += len;\n\t\tthat.total_out += len;\n\t\tthat.avail_out -= len;\n\t\tthat.dstate.pending -= len;\n\t\tif (that.dstate.pending === 0) {\n\t\t\tthat.dstate.pending_out = 0;\n\t\t}\n\t}\n};\n\n// Deflate\n\nfunction ZipDeflate(options) {\n\tconst that = this;\n\tconst z = new ZStream();\n\tconst bufsize = getMaximumCompressedSize(options && options.chunkSize ? options.chunkSize : 64 * 1024);\n\tconst flush = Z_NO_FLUSH;\n\tconst buf = new Uint8Array(bufsize);\n\tlet level = options ? options.level : Z_DEFAULT_COMPRESSION;\n\tif (typeof level == \"undefined\")\n\t\tlevel = Z_DEFAULT_COMPRESSION;\n\tz.deflateInit(level);\n\tz.next_out = buf;\n\n\tthat.append = function (data, onprogress) {\n\t\tlet err, array, lastIndex = 0, bufferIndex = 0, bufferSize = 0;\n\t\tconst buffers = [];\n\t\tif (!data.length)\n\t\t\treturn;\n\t\tz.next_in_index = 0;\n\t\tz.next_in = data;\n\t\tz.avail_in = data.length;\n\t\tdo {\n\t\t\tz.next_out_index = 0;\n\t\t\tz.avail_out = bufsize;\n\t\t\terr = z.deflate(flush);\n\t\t\tif (err != Z_OK)\n\t\t\t\tthrow new Error(\"deflating: \" + z.msg);\n\t\t\tif (z.next_out_index)\n\t\t\t\tif (z.next_out_index == bufsize)\n\t\t\t\t\tbuffers.push(new Uint8Array(buf));\n\t\t\t\telse\n\t\t\t\t\tbuffers.push(buf.slice(0, z.next_out_index));\n\t\t\tbufferSize += z.next_out_index;\n\t\t\tif (onprogress && z.next_in_index > 0 && z.next_in_index != lastIndex) {\n\t\t\t\tonprogress(z.next_in_index);\n\t\t\t\tlastIndex = z.next_in_index;\n\t\t\t}\n\t\t} while (z.avail_in > 0 || z.avail_out === 0);\n\t\tif (buffers.length > 1) {\n\t\t\tarray = new Uint8Array(bufferSize);\n\t\t\tbuffers.forEach(function (chunk) {\n\t\t\t\tarray.set(chunk, bufferIndex);\n\t\t\t\tbufferIndex += chunk.length;\n\t\t\t});\n\t\t} else {\n\t\t\tarray = buffers[0] || new Uint8Array();\n\t\t}\n\t\treturn array;\n\t};\n\tthat.flush = function () {\n\t\tlet err, array, bufferIndex = 0, bufferSize = 0;\n\t\tconst buffers = [];\n\t\tdo {\n\t\t\tz.next_out_index = 0;\n\t\t\tz.avail_out = bufsize;\n\t\t\terr = z.deflate(Z_FINISH);\n\t\t\tif (err != Z_STREAM_END && err != Z_OK)\n\t\t\t\tthrow new Error(\"deflating: \" + z.msg);\n\t\t\tif (bufsize - z.avail_out > 0)\n\t\t\t\tbuffers.push(buf.slice(0, z.next_out_index));\n\t\t\tbufferSize += z.next_out_index;\n\t\t} while (z.avail_in > 0 || z.avail_out === 0);\n\t\tz.deflateEnd();\n\t\tarray = new Uint8Array(bufferSize);\n\t\tbuffers.forEach(function (chunk) {\n\t\t\tarray.set(chunk, bufferIndex);\n\t\t\tbufferIndex += chunk.length;\n\t\t});\n\t\treturn array;\n\t};\n}\n\nfunction getMaximumCompressedSize(uncompressedSize) {\n\treturn uncompressedSize + (5 * (Math.floor(uncompressedSize / 16383) + 1));\n}\n\nexport {\n\tZipDeflate as Deflate\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/*\n * This program is based on JZlib 1.0.2 ymnk, JCraft,Inc.\n * JZlib is based on zlib-1.1.3, so all credit should go authors\n * Jean-loup Gailly(jloup@gzip.org) and Mark Adler(madler@alumni.caltech.edu)\n * and contributors of zlib.\n */\n\n// deno-lint-ignore-file no-this-alias prefer-const\n\n// Global\n\nconst MAX_BITS = 15;\n\nconst Z_OK = 0;\nconst Z_STREAM_END = 1;\nconst Z_NEED_DICT = 2;\nconst Z_STREAM_ERROR = -2;\nconst Z_DATA_ERROR = -3;\nconst Z_MEM_ERROR = -4;\nconst Z_BUF_ERROR = -5;\n\nconst inflate_mask = [0x00000000, 0x00000001, 0x00000003, 0x00000007, 0x0000000f, 0x0000001f, 0x0000003f, 0x0000007f, 0x000000ff, 0x000001ff, 0x000003ff,\n\t0x000007ff, 0x00000fff, 0x00001fff, 0x00003fff, 0x00007fff, 0x0000ffff];\n\nconst MANY = 1440;\n\n// JZlib version : \"1.0.2\"\nconst Z_NO_FLUSH = 0;\nconst Z_FINISH = 4;\n\n// InfTree\nconst fixed_bl = 9;\nconst fixed_bd = 5;\n\nconst fixed_tl = [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,\n\t0, 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,\n\t0, 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,\n\t0, 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,\n\t0, 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,\n\t35, 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,\n\t26, 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,\n\t7, 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,\n\t8, 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,\n\t8, 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,\n\t0, 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,\n\t81, 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,\n\t0, 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,\n\t84, 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,\n\t0, 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,\n\t80, 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,\n\t0, 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,\n\t0, 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,\n\t0, 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,\n\t193, 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,\n\t120, 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,\n\t227, 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,\n\t92, 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,\n\t249, 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,\n\t130, 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,\n\t181, 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,\n\t102, 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,\n\t221, 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,\n\t8, 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,\n\t147, 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,\n\t85, 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,\n\t235, 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,\n\t141, 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,\n\t167, 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,\n\t107, 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,\n\t207, 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,\n\t127, 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];\nconst fixed_td = [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,\n\t8193, 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,\n\t24577, 80, 5, 4, 88, 5, 769, 84, 5, 49, 92, 5, 12289, 82, 5, 13, 90, 5, 3073, 86, 5, 193, 192, 5, 24577];\n\n// Tables for deflate from PKZIP's appnote.txt.\nconst cplens = [ // Copy lengths for literal codes 257..285\n\t3, 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];\n\n// see note #13 above about 258\nconst cplext = [ // Extra bits for literal codes 257..285\n\t0, 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 // 112==invalid\n];\n\nconst cpdist = [ // Copy offsets for distance codes 0..29\n\t1, 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];\n\nconst cpdext = [ // Extra bits for distance codes\n\t0, 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];\n\n// If BMAX needs to be larger than 16, then h and x[] should be uLong.\nconst BMAX = 15; // maximum bit length of any code\n\nfunction InfTree() {\n\tconst that = this;\n\n\tlet hn; // hufts used in space\n\tlet v; // work area for huft_build\n\tlet c; // bit length count table\n\tlet r; // table entry for structure assignment\n\tlet u; // table stack\n\tlet x; // bit offsets, then code stack\n\n\tfunction huft_build(b, // code lengths in bits (all assumed <=\n\t\t// BMAX)\n\t\tbindex, n, // number of codes (assumed <= 288)\n\t\ts, // number of simple-valued codes (0..s-1)\n\t\td, // list of base values for non-simple codes\n\t\te, // list of extra bits for non-simple codes\n\t\tt, // result: starting table\n\t\tm, // maximum lookup bits, returns actual\n\t\thp,// space for trees\n\t\thn,// hufts used in space\n\t\tv // working area: values in order of bit length\n\t) {\n\t\t// Given a list of code lengths and a maximum table size, make a set of\n\t\t// tables to decode that set of codes. Return Z_OK on success,\n\t\t// Z_BUF_ERROR\n\t\t// if the given code set is incomplete (the tables are still built in\n\t\t// this\n\t\t// case), Z_DATA_ERROR if the input is invalid (an over-subscribed set\n\t\t// of\n\t\t// lengths), or Z_MEM_ERROR if not enough memory.\n\n\t\tlet a; // counter for codes of length k\n\t\tlet f; // i repeats in table every f entries\n\t\tlet g; // maximum code length\n\t\tlet h; // table level\n\t\tlet i; // counter, current code\n\t\tlet j; // counter\n\t\tlet k; // number of bits in current code\n\t\tlet l; // bits per table (returned in m)\n\t\tlet mask; // (1 << w) - 1, to avoid cc -O bug on HP\n\t\tlet p; // pointer into c[], b[], or v[]\n\t\tlet q; // points to current table\n\t\tlet w; // bits before this table == (l * h)\n\t\tlet xp; // pointer into x\n\t\tlet y; // number of dummy codes added\n\t\tlet z; // number of entries in current table\n\n\t\t// Generate counts for each bit length\n\n\t\tp = 0;\n\t\ti = n;\n\t\tdo {\n\t\t\tc[b[bindex + p]]++;\n\t\t\tp++;\n\t\t\ti--; // assume all entries <= BMAX\n\t\t} while (i !== 0);\n\n\t\tif (c[0] == n) { // null input--all zero length codes\n\t\t\tt[0] = -1;\n\t\t\tm[0] = 0;\n\t\t\treturn Z_OK;\n\t\t}\n\n\t\t// Find minimum and maximum length, bound *m by those\n\t\tl = m[0];\n\t\tfor (j = 1; j <= BMAX; j++)\n\t\t\tif (c[j] !== 0)\n\t\t\t\tbreak;\n\t\tk = j; // minimum code length\n\t\tif (l < j) {\n\t\t\tl = j;\n\t\t}\n\t\tfor (i = BMAX; i !== 0; i--) {\n\t\t\tif (c[i] !== 0)\n\t\t\t\tbreak;\n\t\t}\n\t\tg = i; // maximum code length\n\t\tif (l > i) {\n\t\t\tl = i;\n\t\t}\n\t\tm[0] = l;\n\n\t\t// Adjust last length count to fill out codes, if needed\n\t\tfor (y = 1 << j; j < i; j++, y <<= 1) {\n\t\t\tif ((y -= c[j]) < 0) {\n\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t}\n\t\t}\n\t\tif ((y -= c[i]) < 0) {\n\t\t\treturn Z_DATA_ERROR;\n\t\t}\n\t\tc[i] += y;\n\n\t\t// Generate starting offsets into the value table for each length\n\t\tx[1] = j = 0;\n\t\tp = 1;\n\t\txp = 2;\n\t\twhile (--i !== 0) { // note that i == g from above\n\t\t\tx[xp] = (j += c[p]);\n\t\t\txp++;\n\t\t\tp++;\n\t\t}\n\n\t\t// Make a table of values in order of bit lengths\n\t\ti = 0;\n\t\tp = 0;\n\t\tdo {\n\t\t\tif ((j = b[bindex + p]) !== 0) {\n\t\t\t\tv[x[j]++] = i;\n\t\t\t}\n\t\t\tp++;\n\t\t} while (++i < n);\n\t\tn = x[g]; // set n to length of v\n\n\t\t// Generate the Huffman codes and for each, make the table entries\n\t\tx[0] = i = 0; // first Huffman code is zero\n\t\tp = 0; // grab values in bit order\n\t\th = -1; // no tables yet--level -1\n\t\tw = -l; // bits decoded == (l * h)\n\t\tu[0] = 0; // just to keep compilers happy\n\t\tq = 0; // ditto\n\t\tz = 0; // ditto\n\n\t\t// go through the bit lengths (k already is bits in shortest code)\n\t\tfor (; k <= g; k++) {\n\t\t\ta = c[k];\n\t\t\twhile (a-- !== 0) {\n\t\t\t\t// here i is the Huffman code of length k bits for value *p\n\t\t\t\t// make tables up to required level\n\t\t\t\twhile (k > w + l) {\n\t\t\t\t\th++;\n\t\t\t\t\tw += l; // previous table always l bits\n\t\t\t\t\t// compute minimum size table less than or equal to l bits\n\t\t\t\t\tz = g - w;\n\t\t\t\t\tz = (z > l) ? l : z; // table size upper limit\n\t\t\t\t\tif ((f = 1 << (j = k - w)) > a + 1) { // try a k-w bit table\n\t\t\t\t\t\t// too few codes for\n\t\t\t\t\t\t// k-w bit table\n\t\t\t\t\t\tf -= a + 1; // deduct codes from patterns left\n\t\t\t\t\t\txp = k;\n\t\t\t\t\t\tif (j < z) {\n\t\t\t\t\t\t\twhile (++j < z) { // try smaller tables up to z bits\n\t\t\t\t\t\t\t\tif ((f <<= 1) <= c[++xp])\n\t\t\t\t\t\t\t\t\tbreak; // enough codes to use up j bits\n\t\t\t\t\t\t\t\tf -= c[xp]; // else deduct codes from patterns\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tz = 1 << j; // table entries for j-bit table\n\n\t\t\t\t\t// allocate new table\n\t\t\t\t\tif (hn[0] + z > MANY) { // (note: doesn't matter for fixed)\n\t\t\t\t\t\treturn Z_DATA_ERROR; // overflow of MANY\n\t\t\t\t\t}\n\t\t\t\t\tu[h] = q = /* hp+ */hn[0]; // DEBUG\n\t\t\t\t\thn[0] += z;\n\n\t\t\t\t\t// connect to last table, if there is one\n\t\t\t\t\tif (h !== 0) {\n\t\t\t\t\t\tx[h] = i; // save pattern for backing up\n\t\t\t\t\t\tr[0] = /* (byte) */j; // bits in this table\n\t\t\t\t\t\tr[1] = /* (byte) */l; // bits to dump before this table\n\t\t\t\t\t\tj = i >>> (w - l);\n\t\t\t\t\t\tr[2] = /* (int) */(q - u[h - 1] - j); // offset to this table\n\t\t\t\t\t\thp.set(r, (u[h - 1] + j) * 3);\n\t\t\t\t\t\t// to\n\t\t\t\t\t\t// last\n\t\t\t\t\t\t// table\n\t\t\t\t\t} else {\n\t\t\t\t\t\tt[0] = q; // first table is returned result\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// set up table entry in r\n\t\t\t\tr[1] = /* (byte) */(k - w);\n\t\t\t\tif (p >= n) {\n\t\t\t\t\tr[0] = 128 + 64; // out of values--invalid code\n\t\t\t\t} else if (v[p] < s) {\n\t\t\t\t\tr[0] = /* (byte) */(v[p] < 256 ? 0 : 32 + 64); // 256 is\n\t\t\t\t\t// end-of-block\n\t\t\t\t\tr[2] = v[p++]; // simple code is just the value\n\t\t\t\t} else {\n\t\t\t\t\tr[0] = /* (byte) */(e[v[p] - s] + 16 + 64); // non-simple--look\n\t\t\t\t\t// up in lists\n\t\t\t\t\tr[2] = d[v[p++] - s];\n\t\t\t\t}\n\n\t\t\t\t// fill code-like entries with r\n\t\t\t\tf = 1 << (k - w);\n\t\t\t\tfor (j = i >>> w; j < z; j += f) {\n\t\t\t\t\thp.set(r, (q + j) * 3);\n\t\t\t\t}\n\n\t\t\t\t// backwards increment the k-bit code i\n\t\t\t\tfor (j = 1 << (k - 1); (i & j) !== 0; j >>>= 1) {\n\t\t\t\t\ti ^= j;\n\t\t\t\t}\n\t\t\t\ti ^= j;\n\n\t\t\t\t// backup over finished tables\n\t\t\t\tmask = (1 << w) - 1; // needed on HP, cc -O bug\n\t\t\t\twhile ((i & mask) != x[h]) {\n\t\t\t\t\th--; // don't need to update q\n\t\t\t\t\tw -= l;\n\t\t\t\t\tmask = (1 << w) - 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// Return Z_BUF_ERROR if we were given an incomplete table\n\t\treturn y !== 0 && g != 1 ? Z_BUF_ERROR : Z_OK;\n\t}\n\n\tfunction initWorkArea(vsize) {\n\t\tlet i;\n\t\tif (!hn) {\n\t\t\thn = []; // []; //new Array(1);\n\t\t\tv = []; // new Array(vsize);\n\t\t\tc = new Int32Array(BMAX + 1); // new Array(BMAX + 1);\n\t\t\tr = []; // new Array(3);\n\t\t\tu = new Int32Array(BMAX); // new Array(BMAX);\n\t\t\tx = new Int32Array(BMAX + 1); // new Array(BMAX + 1);\n\t\t}\n\t\tif (v.length < vsize) {\n\t\t\tv = []; // new Array(vsize);\n\t\t}\n\t\tfor (i = 0; i < vsize; i++) {\n\t\t\tv[i] = 0;\n\t\t}\n\t\tfor (i = 0; i < BMAX + 1; i++) {\n\t\t\tc[i] = 0;\n\t\t}\n\t\tfor (i = 0; i < 3; i++) {\n\t\t\tr[i] = 0;\n\t\t}\n\t\t// for(int i=0; i 257)) {\n\t\t\tif (result == Z_DATA_ERROR) {\n\t\t\t\tz.msg = \"oversubscribed distance tree\";\n\t\t\t} else if (result == Z_BUF_ERROR) {\n\t\t\t\tz.msg = \"incomplete distance tree\";\n\t\t\t\tresult = Z_DATA_ERROR;\n\t\t\t} else if (result != Z_MEM_ERROR) {\n\t\t\t\tz.msg = \"empty distance tree with lengths\";\n\t\t\t\tresult = Z_DATA_ERROR;\n\t\t\t}\n\t\t\treturn result;\n\t\t}\n\n\t\treturn Z_OK;\n\t};\n\n}\n\nInfTree.inflate_trees_fixed = function (bl, // literal desired/actual bit depth\n\tbd, // distance desired/actual bit depth\n\ttl,// literal/length tree result\n\ttd// distance tree result\n) {\n\tbl[0] = fixed_bl;\n\tbd[0] = fixed_bd;\n\ttl[0] = fixed_tl;\n\ttd[0] = fixed_td;\n\treturn Z_OK;\n};\n\n// InfCodes\n\n// waiting for \"i:\"=input,\n// \"o:\"=output,\n// \"x:\"=nothing\nconst START = 0; // x: set up for LEN\nconst LEN = 1; // i: get length/literal/eob next\nconst LENEXT = 2; // i: getting length extra (have base)\nconst DIST = 3; // i: get distance next\nconst DISTEXT = 4;// i: getting distance extra\nconst COPY = 5; // o: copying bytes in win, waiting\n// for space\nconst LIT = 6; // o: got literal, waiting for output\n// space\nconst WASH = 7; // o: got eob, possibly still output\n// waiting\nconst END = 8; // x: got eob and all data flushed\nconst BADCODE = 9;// x: got error\n\nfunction InfCodes() {\n\tconst that = this;\n\n\tlet mode; // current inflate_codes mode\n\n\t// mode dependent information\n\tlet len = 0;\n\n\tlet tree; // pointer into tree\n\tlet tree_index = 0;\n\tlet need = 0; // bits needed\n\n\tlet lit = 0;\n\n\t// if EXT or COPY, where and how much\n\tlet get = 0; // bits to get for extra\n\tlet dist = 0; // distance back to copy from\n\n\tlet lbits = 0; // ltree bits decoded per branch\n\tlet dbits = 0; // dtree bits decoder per branch\n\tlet ltree; // literal/length/eob tree\n\tlet ltree_index = 0; // literal/length/eob tree\n\tlet dtree; // distance tree\n\tlet dtree_index = 0; // distance tree\n\n\t// Called with number of bytes left to write in win at least 258\n\t// (the maximum string length) and number of input bytes available\n\t// at least ten. The ten bytes are six bytes for the longest length/\n\t// distance pair plus four bytes for overloading the bit buffer.\n\n\tfunction inflate_fast(bl, bd, tl, tl_index, td, td_index, s, z) {\n\t\tlet t; // temporary pointer\n\t\tlet tp; // temporary pointer\n\t\tlet tp_index; // temporary pointer\n\t\tlet e; // extra bits or operation\n\t\tlet b; // bit buffer\n\t\tlet k; // bits in bit buffer\n\t\tlet p; // input data pointer\n\t\tlet n; // bytes available there\n\t\tlet q; // output win write pointer\n\t\tlet m; // bytes to end of win or read pointer\n\t\tlet ml; // mask for literal/length tree\n\t\tlet md; // mask for distance tree\n\t\tlet c; // bytes to copy\n\t\tlet d; // distance back to copy from\n\t\tlet r; // copy source pointer\n\n\t\tlet tp_index_t_3; // (tp_index+t)*3\n\n\t\t// load input, output, bit values\n\t\tp = z.next_in_index;\n\t\tn = z.avail_in;\n\t\tb = s.bitb;\n\t\tk = s.bitk;\n\t\tq = s.write;\n\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t// initialize masks\n\t\tml = inflate_mask[bl];\n\t\tmd = inflate_mask[bd];\n\n\t\t// do until not enough input or output space for fast loop\n\t\tdo { // assume called with m >= 258 && n >= 10\n\t\t\t// get literal/length code\n\t\t\twhile (k < (20)) { // max bits for literal/length code\n\t\t\t\tn--;\n\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\tk += 8;\n\t\t\t}\n\n\t\t\tt = b & ml;\n\t\t\ttp = tl;\n\t\t\ttp_index = tl_index;\n\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\tif ((e = tp[tp_index_t_3]) === 0) {\n\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\ts.win[q++] = /* (byte) */tp[tp_index_t_3 + 2];\n\t\t\t\tm--;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tdo {\n\n\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\tif ((e & 16) !== 0) {\n\t\t\t\t\te &= 15;\n\t\t\t\t\tc = tp[tp_index_t_3 + 2] + (/* (int) */b & inflate_mask[e]);\n\n\t\t\t\t\tb >>= e;\n\t\t\t\t\tk -= e;\n\n\t\t\t\t\t// decode distance base of block to copy\n\t\t\t\t\twhile (k < (15)) { // max bits for distance code\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tt = b & md;\n\t\t\t\t\ttp = td;\n\t\t\t\t\ttp_index = td_index;\n\t\t\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\t\t\te = tp[tp_index_t_3];\n\n\t\t\t\t\tdo {\n\n\t\t\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\t\t\tif ((e & 16) !== 0) {\n\t\t\t\t\t\t\t// get extra bits to add to distance base\n\t\t\t\t\t\t\te &= 15;\n\t\t\t\t\t\t\twhile (k < (e)) { // get extra bits (up to 13)\n\t\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\td = tp[tp_index_t_3 + 2] + (b & inflate_mask[e]);\n\n\t\t\t\t\t\t\tb >>= (e);\n\t\t\t\t\t\t\tk -= (e);\n\n\t\t\t\t\t\t\t// do the copy\n\t\t\t\t\t\t\tm -= c;\n\t\t\t\t\t\t\tif (q >= d) { // offset before dest\n\t\t\t\t\t\t\t\t// just copy\n\t\t\t\t\t\t\t\tr = q - d;\n\t\t\t\t\t\t\t\tif (q - r > 0 && 2 > (q - r)) {\n\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++]; // minimum\n\t\t\t\t\t\t\t\t\t// count is\n\t\t\t\t\t\t\t\t\t// three,\n\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++]; // so unroll\n\t\t\t\t\t\t\t\t\t// loop a\n\t\t\t\t\t\t\t\t\t// little\n\t\t\t\t\t\t\t\t\tc -= 2;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\ts.win.set(s.win.subarray(r, r + 2), q);\n\t\t\t\t\t\t\t\t\tq += 2;\n\t\t\t\t\t\t\t\t\tr += 2;\n\t\t\t\t\t\t\t\t\tc -= 2;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else { // else offset after destination\n\t\t\t\t\t\t\t\tr = q - d;\n\t\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t\tr += s.end; // force pointer in win\n\t\t\t\t\t\t\t\t} while (r < 0); // covers invalid distances\n\t\t\t\t\t\t\t\te = s.end - r;\n\t\t\t\t\t\t\t\tif (c > e) { // if source crosses,\n\t\t\t\t\t\t\t\t\tc -= e; // wrapped copy\n\t\t\t\t\t\t\t\t\tif (q - r > 0 && e > (q - r)) {\n\t\t\t\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++];\n\t\t\t\t\t\t\t\t\t\t} while (--e !== 0);\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\ts.win.set(s.win.subarray(r, r + e), q);\n\t\t\t\t\t\t\t\t\t\tq += e;\n\t\t\t\t\t\t\t\t\t\tr += e;\n\t\t\t\t\t\t\t\t\t\te = 0;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tr = 0; // copy rest from start of win\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// copy all or what's left\n\t\t\t\t\t\t\tif (q - r > 0 && c > (q - r)) {\n\t\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++];\n\t\t\t\t\t\t\t\t} while (--c !== 0);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts.win.set(s.win.subarray(r, r + c), q);\n\t\t\t\t\t\t\t\tq += c;\n\t\t\t\t\t\t\t\tr += c;\n\t\t\t\t\t\t\t\tc = 0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t} else if ((e & 64) === 0) {\n\t\t\t\t\t\t\tt += tp[tp_index_t_3 + 2];\n\t\t\t\t\t\t\tt += (b & inflate_mask[e]);\n\t\t\t\t\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\t\t\t\t\te = tp[tp_index_t_3];\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tz.msg = \"invalid distance code\";\n\n\t\t\t\t\t\t\tc = z.avail_in - n;\n\t\t\t\t\t\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\t\t\t\t\t\tn += c;\n\t\t\t\t\t\t\tp -= c;\n\t\t\t\t\t\t\tk -= c << 3;\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\n\t\t\t\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// eslint-disable-next-line no-constant-condition\n\t\t\t\t\t} while (true);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tif ((e & 64) === 0) {\n\t\t\t\t\tt += tp[tp_index_t_3 + 2];\n\t\t\t\t\tt += (b & inflate_mask[e]);\n\t\t\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\t\t\tif ((e = tp[tp_index_t_3]) === 0) {\n\n\t\t\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\t\t\ts.win[q++] = /* (byte) */tp[tp_index_t_3 + 2];\n\t\t\t\t\t\tm--;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t} else if ((e & 32) !== 0) {\n\n\t\t\t\t\tc = z.avail_in - n;\n\t\t\t\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\t\t\t\tn += c;\n\t\t\t\t\tp -= c;\n\t\t\t\t\tk -= c << 3;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\n\t\t\t\t\treturn Z_STREAM_END;\n\t\t\t\t} else {\n\t\t\t\t\tz.msg = \"invalid literal/length code\";\n\n\t\t\t\t\tc = z.avail_in - n;\n\t\t\t\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\t\t\t\tn += c;\n\t\t\t\t\tp -= c;\n\t\t\t\t\tk -= c << 3;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\n\t\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t\t}\n\t\t\t\t// eslint-disable-next-line no-constant-condition\n\t\t\t} while (true);\n\t\t} while (m >= 258 && n >= 10);\n\n\t\t// not enough input or output--restore pointers and return\n\t\tc = z.avail_in - n;\n\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\tn += c;\n\t\tp -= c;\n\t\tk -= c << 3;\n\n\t\ts.bitb = b;\n\t\ts.bitk = k;\n\t\tz.avail_in = n;\n\t\tz.total_in += p - z.next_in_index;\n\t\tz.next_in_index = p;\n\t\ts.write = q;\n\n\t\treturn Z_OK;\n\t}\n\n\tthat.init = function (bl, bd, tl, tl_index, td, td_index) {\n\t\tmode = START;\n\t\tlbits = /* (byte) */bl;\n\t\tdbits = /* (byte) */bd;\n\t\tltree = tl;\n\t\tltree_index = tl_index;\n\t\tdtree = td;\n\t\tdtree_index = td_index;\n\t\ttree = null;\n\t};\n\n\tthat.proc = function (s, z, r) {\n\t\tlet j; // temporary storage\n\t\tlet tindex; // temporary pointer\n\t\tlet e; // extra bits or operation\n\t\tlet b = 0; // bit buffer\n\t\tlet k = 0; // bits in bit buffer\n\t\tlet p = 0; // input data pointer\n\t\tlet n; // bytes available there\n\t\tlet q; // output win write pointer\n\t\tlet m; // bytes to end of win or read pointer\n\t\tlet f; // pointer to copy strings from\n\n\t\t// copy input/output information to locals (UPDATE macro restores)\n\t\tp = z.next_in_index;\n\t\tn = z.avail_in;\n\t\tb = s.bitb;\n\t\tk = s.bitk;\n\t\tq = s.write;\n\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t// process input and output based on current state\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\tswitch (mode) {\n\t\t\t\t// waiting for \"i:\"=input, \"o:\"=output, \"x:\"=nothing\n\t\t\t\tcase START: // x: set up for LEN\n\t\t\t\t\tif (m >= 258 && n >= 10) {\n\n\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\tr = inflate_fast(lbits, dbits, ltree, ltree_index, dtree, dtree_index, s, z);\n\n\t\t\t\t\t\tp = z.next_in_index;\n\t\t\t\t\t\tn = z.avail_in;\n\t\t\t\t\t\tb = s.bitb;\n\t\t\t\t\t\tk = s.bitk;\n\t\t\t\t\t\tq = s.write;\n\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\t\tif (r != Z_OK) {\n\t\t\t\t\t\t\tmode = r == Z_STREAM_END ? WASH : BADCODE;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tneed = lbits;\n\t\t\t\t\ttree = ltree;\n\t\t\t\t\ttree_index = ltree_index;\n\n\t\t\t\t\tmode = LEN;\n\t\t\t\t/* falls through */\n\t\t\t\tcase LEN: // i: get length/literal/eob next\n\t\t\t\t\tj = need;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\ttindex = (tree_index + (b & inflate_mask[j])) * 3;\n\n\t\t\t\t\tb >>>= (tree[tindex + 1]);\n\t\t\t\t\tk -= (tree[tindex + 1]);\n\n\t\t\t\t\te = tree[tindex];\n\n\t\t\t\t\tif (e === 0) { // literal\n\t\t\t\t\t\tlit = tree[tindex + 2];\n\t\t\t\t\t\tmode = LIT;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 16) !== 0) { // length\n\t\t\t\t\t\tget = e & 15;\n\t\t\t\t\t\tlen = tree[tindex + 2];\n\t\t\t\t\t\tmode = LENEXT;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 64) === 0) { // next table\n\t\t\t\t\t\tneed = e;\n\t\t\t\t\t\ttree_index = tindex / 3 + tree[tindex + 2];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 32) !== 0) { // end of block\n\t\t\t\t\t\tmode = WASH;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tmode = BADCODE; // invalid code\n\t\t\t\t\tz.msg = \"invalid literal/length code\";\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tcase LENEXT: // i: getting length extra (have base)\n\t\t\t\t\tj = get;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tlen += (b & inflate_mask[j]);\n\n\t\t\t\t\tb >>= j;\n\t\t\t\t\tk -= j;\n\n\t\t\t\t\tneed = dbits;\n\t\t\t\t\ttree = dtree;\n\t\t\t\t\ttree_index = dtree_index;\n\t\t\t\t\tmode = DIST;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DIST: // i: get distance next\n\t\t\t\t\tj = need;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\ttindex = (tree_index + (b & inflate_mask[j])) * 3;\n\n\t\t\t\t\tb >>= tree[tindex + 1];\n\t\t\t\t\tk -= tree[tindex + 1];\n\n\t\t\t\t\te = (tree[tindex]);\n\t\t\t\t\tif ((e & 16) !== 0) { // distance\n\t\t\t\t\t\tget = e & 15;\n\t\t\t\t\t\tdist = tree[tindex + 2];\n\t\t\t\t\t\tmode = DISTEXT;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 64) === 0) { // next table\n\t\t\t\t\t\tneed = e;\n\t\t\t\t\t\ttree_index = tindex / 3 + tree[tindex + 2];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tmode = BADCODE; // invalid code\n\t\t\t\t\tz.msg = \"invalid distance code\";\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tcase DISTEXT: // i: getting distance extra\n\t\t\t\t\tj = get;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tdist += (b & inflate_mask[j]);\n\n\t\t\t\t\tb >>= j;\n\t\t\t\t\tk -= j;\n\n\t\t\t\t\tmode = COPY;\n\t\t\t\t/* falls through */\n\t\t\t\tcase COPY: // o: copying bytes in win, waiting for space\n\t\t\t\t\tf = q - dist;\n\t\t\t\t\twhile (f < 0) { // modulo win size-\"while\" instead\n\t\t\t\t\t\tf += s.end; // of \"if\" handles invalid distances\n\t\t\t\t\t}\n\t\t\t\t\twhile (len !== 0) {\n\n\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\t\tr = s.inflate_flush(z, r);\n\t\t\t\t\t\t\t\tq = s.write;\n\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\ts.win[q++] = s.win[f++];\n\t\t\t\t\t\tm--;\n\n\t\t\t\t\t\tif (f == s.end)\n\t\t\t\t\t\t\tf = 0;\n\t\t\t\t\t\tlen--;\n\t\t\t\t\t}\n\t\t\t\t\tmode = START;\n\t\t\t\t\tbreak;\n\t\t\t\tcase LIT: // o: got literal, waiting for output space\n\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\tr = s.inflate_flush(z, r);\n\t\t\t\t\t\t\tq = s.write;\n\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tr = Z_OK;\n\n\t\t\t\t\ts.win[q++] = /* (byte) */lit;\n\t\t\t\t\tm--;\n\n\t\t\t\t\tmode = START;\n\t\t\t\t\tbreak;\n\t\t\t\tcase WASH: // o: got eob, possibly more output\n\t\t\t\t\tif (k > 7) { // return unused byte, if any\n\t\t\t\t\t\tk -= 8;\n\t\t\t\t\t\tn++;\n\t\t\t\t\t\tp--; // can always return one\n\t\t\t\t\t}\n\n\t\t\t\t\ts.write = q;\n\t\t\t\t\tr = s.inflate_flush(z, r);\n\t\t\t\t\tq = s.write;\n\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\tif (s.read != s.write) {\n\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tmode = END;\n\t\t\t\t/* falls through */\n\t\t\t\tcase END:\n\t\t\t\t\tr = Z_STREAM_END;\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tcase BADCODE: // x: got error\n\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tdefault:\n\t\t\t\t\tr = Z_STREAM_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t}\n\t\t}\n\t};\n\n\tthat.free = function () {\n\t\t// ZFREE(z, c);\n\t};\n\n}\n\n// InfBlocks\n\n// Table for deflate from PKZIP's appnote.txt.\nconst border = [ // Order of the bit length code lengths\n\t16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15];\n\nconst TYPE = 0; // get type bits (3, including end bit)\nconst LENS = 1; // get lengths for stored\nconst STORED = 2;// processing stored block\nconst TABLE = 3; // get table lengths\nconst BTREE = 4; // get bit lengths tree for a dynamic\n// block\nconst DTREE = 5; // get length, distance trees for a\n// dynamic block\nconst CODES = 6; // processing fixed or dynamic block\nconst DRY = 7; // output remaining win bytes\nconst DONELOCKS = 8; // finished last block, done\nconst BADBLOCKS = 9; // ot a data error--stuck here\n\nfunction InfBlocks(z, w) {\n\tconst that = this;\n\n\tlet mode = TYPE; // current inflate_block mode\n\n\tlet left = 0; // if STORED, bytes left to copy\n\n\tlet table = 0; // table lengths (14 bits)\n\tlet index = 0; // index into blens (or border)\n\tlet blens; // bit lengths of codes\n\tconst bb = [0]; // bit length tree depth\n\tconst tb = [0]; // bit length decoding tree\n\n\tconst codes = new InfCodes(); // if CODES, current state\n\n\tlet last = 0; // true if this block is the last block\n\n\tlet hufts = new Int32Array(MANY * 3); // single malloc for tree space\n\tconst check = 0; // check on output\n\tconst inftree = new InfTree();\n\n\tthat.bitk = 0; // bits in bit buffer\n\tthat.bitb = 0; // bit buffer\n\tthat.win = new Uint8Array(w); // sliding win\n\tthat.end = w; // one byte after sliding win\n\tthat.read = 0; // win read pointer\n\tthat.write = 0; // win write pointer\n\n\tthat.reset = function (z, c) {\n\t\tif (c)\n\t\t\tc[0] = check;\n\t\t// if (mode == BTREE || mode == DTREE) {\n\t\t// }\n\t\tif (mode == CODES) {\n\t\t\tcodes.free(z);\n\t\t}\n\t\tmode = TYPE;\n\t\tthat.bitk = 0;\n\t\tthat.bitb = 0;\n\t\tthat.read = that.write = 0;\n\t};\n\n\tthat.reset(z, null);\n\n\t// copy as much as possible from the sliding win to the output area\n\tthat.inflate_flush = function (z, r) {\n\t\tlet n;\n\t\tlet p;\n\t\tlet q;\n\n\t\t// local copies of source and destination pointers\n\t\tp = z.next_out_index;\n\t\tq = that.read;\n\n\t\t// compute number of bytes to copy as far as end of win\n\t\tn = /* (int) */((q <= that.write ? that.write : that.end) - q);\n\t\tif (n > z.avail_out)\n\t\t\tn = z.avail_out;\n\t\tif (n !== 0 && r == Z_BUF_ERROR)\n\t\t\tr = Z_OK;\n\n\t\t// update counters\n\t\tz.avail_out -= n;\n\t\tz.total_out += n;\n\n\t\t// copy as far as end of win\n\t\tz.next_out.set(that.win.subarray(q, q + n), p);\n\t\tp += n;\n\t\tq += n;\n\n\t\t// see if more to copy at beginning of win\n\t\tif (q == that.end) {\n\t\t\t// wrap pointers\n\t\t\tq = 0;\n\t\t\tif (that.write == that.end)\n\t\t\t\tthat.write = 0;\n\n\t\t\t// compute bytes to copy\n\t\t\tn = that.write - q;\n\t\t\tif (n > z.avail_out)\n\t\t\t\tn = z.avail_out;\n\t\t\tif (n !== 0 && r == Z_BUF_ERROR)\n\t\t\t\tr = Z_OK;\n\n\t\t\t// update counters\n\t\t\tz.avail_out -= n;\n\t\t\tz.total_out += n;\n\n\t\t\t// copy\n\t\t\tz.next_out.set(that.win.subarray(q, q + n), p);\n\t\t\tp += n;\n\t\t\tq += n;\n\t\t}\n\n\t\t// update pointers\n\t\tz.next_out_index = p;\n\t\tthat.read = q;\n\n\t\t// done\n\t\treturn r;\n\t};\n\n\tthat.proc = function (z, r) {\n\t\tlet t; // temporary storage\n\t\tlet b; // bit buffer\n\t\tlet k; // bits in bit buffer\n\t\tlet p; // input data pointer\n\t\tlet n; // bytes available there\n\t\tlet q; // output win write pointer\n\t\tlet m; // bytes to end of win or read pointer\n\n\t\tlet i;\n\n\t\t// copy input/output information to locals (UPDATE macro restores)\n\t\t// {\n\t\tp = z.next_in_index;\n\t\tn = z.avail_in;\n\t\tb = that.bitb;\n\t\tk = that.bitk;\n\t\t// }\n\t\t// {\n\t\tq = that.write;\n\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t// }\n\n\t\t// process input based on current state\n\t\t// DEBUG dtree\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\tlet bl, bd, tl, td, bl_, bd_, tl_, td_;\n\t\t\tswitch (mode) {\n\t\t\t\tcase TYPE:\n\n\t\t\t\t\twhile (k < (3)) {\n\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\t\t\t\t\tt = /* (int) */(b & 7);\n\t\t\t\t\tlast = t & 1;\n\n\t\t\t\t\tswitch (t >>> 1) {\n\t\t\t\t\t\tcase 0: // stored\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\t\t\t\t\t\t\tt = k & 7; // go to byte boundary\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (t);\n\t\t\t\t\t\t\tk -= (t);\n\t\t\t\t\t\t\t// }\n\t\t\t\t\t\t\tmode = LENS; // get length of stored block\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 1: // fixed\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tbl = []; // new Array(1);\n\t\t\t\t\t\t\tbd = []; // new Array(1);\n\t\t\t\t\t\t\ttl = [[]]; // new Array(1);\n\t\t\t\t\t\t\ttd = [[]]; // new Array(1);\n\n\t\t\t\t\t\t\tInfTree.inflate_trees_fixed(bl, bd, tl, td);\n\t\t\t\t\t\t\tcodes.init(bl[0], bd[0], tl[0], 0, td[0], 0);\n\t\t\t\t\t\t\t// }\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\n\t\t\t\t\t\t\tmode = CODES;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 2: // dynamic\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\n\t\t\t\t\t\t\tmode = TABLE;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 3: // illegal\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t\tz.msg = \"invalid block type\";\n\t\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase LENS:\n\n\t\t\t\t\twhile (k < (32)) {\n\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ((((~b) >>> 16) & 0xffff) != (b & 0xffff)) {\n\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\tz.msg = \"invalid stored block lengths\";\n\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tleft = (b & 0xffff);\n\t\t\t\t\tb = k = 0; // dump bits\n\t\t\t\t\tmode = left !== 0 ? STORED : (last !== 0 ? DRY : TYPE);\n\t\t\t\t\tbreak;\n\t\t\t\tcase STORED:\n\t\t\t\t\tif (n === 0) {\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\tif (q == that.end && that.read !== 0) {\n\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\tr = that.inflate_flush(z, r);\n\t\t\t\t\t\t\tq = that.write;\n\t\t\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\t\t\tif (q == that.end && that.read !== 0) {\n\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tr = Z_OK;\n\n\t\t\t\t\tt = left;\n\t\t\t\t\tif (t > n)\n\t\t\t\t\t\tt = n;\n\t\t\t\t\tif (t > m)\n\t\t\t\t\t\tt = m;\n\t\t\t\t\tthat.win.set(z.read_buf(p, t), q);\n\t\t\t\t\tp += t;\n\t\t\t\t\tn -= t;\n\t\t\t\t\tq += t;\n\t\t\t\t\tm -= t;\n\t\t\t\t\tif ((left -= t) !== 0)\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tmode = last !== 0 ? DRY : TYPE;\n\t\t\t\t\tbreak;\n\t\t\t\tcase TABLE:\n\n\t\t\t\t\twhile (k < (14)) {\n\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\ttable = t = (b & 0x3fff);\n\t\t\t\t\tif ((t & 0x1f) > 29 || ((t >> 5) & 0x1f) > 29) {\n\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\tz.msg = \"too many length or distance symbols\";\n\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tt = 258 + (t & 0x1f) + ((t >> 5) & 0x1f);\n\t\t\t\t\tif (!blens || blens.length < t) {\n\t\t\t\t\t\tblens = []; // new Array(t);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfor (i = 0; i < t; i++) {\n\t\t\t\t\t\t\tblens[i] = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// {\n\t\t\t\t\tb >>>= (14);\n\t\t\t\t\tk -= (14);\n\t\t\t\t\t// }\n\n\t\t\t\t\tindex = 0;\n\t\t\t\t\tmode = BTREE;\n\t\t\t\t/* falls through */\n\t\t\t\tcase BTREE:\n\t\t\t\t\twhile (index < 4 + (table >>> 10)) {\n\t\t\t\t\t\twhile (k < (3)) {\n\t\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tblens[border[index++]] = b & 7;\n\n\t\t\t\t\t\t// {\n\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t// }\n\t\t\t\t\t}\n\n\t\t\t\t\twhile (index < 19) {\n\t\t\t\t\t\tblens[border[index++]] = 0;\n\t\t\t\t\t}\n\n\t\t\t\t\tbb[0] = 7;\n\t\t\t\t\tt = inftree.inflate_trees_bits(blens, bb, tb, hufts, z);\n\t\t\t\t\tif (t != Z_OK) {\n\t\t\t\t\t\tr = t;\n\t\t\t\t\t\tif (r == Z_DATA_ERROR) {\n\t\t\t\t\t\t\tblens = null;\n\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\n\t\t\t\t\tindex = 0;\n\t\t\t\t\tmode = DTREE;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DTREE:\n\t\t\t\t\t// eslint-disable-next-line no-constant-condition\n\t\t\t\t\twhile (true) {\n\t\t\t\t\t\tt = table;\n\t\t\t\t\t\tif (index >= 258 + (t & 0x1f) + ((t >> 5) & 0x1f)) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tlet j, c;\n\n\t\t\t\t\t\tt = bb[0];\n\n\t\t\t\t\t\twhile (k < (t)) {\n\t\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// if (tb[0] == -1) {\n\t\t\t\t\t\t// System.err.println(\"null...\");\n\t\t\t\t\t\t// }\n\n\t\t\t\t\t\tt = hufts[(tb[0] + (b & inflate_mask[t])) * 3 + 1];\n\t\t\t\t\t\tc = hufts[(tb[0] + (b & inflate_mask[t])) * 3 + 2];\n\n\t\t\t\t\t\tif (c < 16) {\n\t\t\t\t\t\t\tb >>>= (t);\n\t\t\t\t\t\t\tk -= (t);\n\t\t\t\t\t\t\tblens[index++] = c;\n\t\t\t\t\t\t} else { // c == 16..18\n\t\t\t\t\t\t\ti = c == 18 ? 7 : c - 14;\n\t\t\t\t\t\t\tj = c == 18 ? 11 : 3;\n\n\t\t\t\t\t\t\twhile (k < (t + i)) {\n\t\t\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tb >>>= (t);\n\t\t\t\t\t\t\tk -= (t);\n\n\t\t\t\t\t\t\tj += (b & inflate_mask[i]);\n\n\t\t\t\t\t\t\tb >>>= (i);\n\t\t\t\t\t\t\tk -= (i);\n\n\t\t\t\t\t\t\ti = index;\n\t\t\t\t\t\t\tt = table;\n\t\t\t\t\t\t\tif (i + j > 258 + (t & 0x1f) + ((t >> 5) & 0x1f) || (c == 16 && i < 1)) {\n\t\t\t\t\t\t\t\tblens = null;\n\t\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t\t\tz.msg = \"invalid bit length repeat\";\n\t\t\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tc = c == 16 ? blens[i - 1] : 0;\n\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\tblens[i++] = c;\n\t\t\t\t\t\t\t} while (--j !== 0);\n\t\t\t\t\t\t\tindex = i;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\ttb[0] = -1;\n\t\t\t\t\t// {\n\t\t\t\t\tbl_ = []; // new Array(1);\n\t\t\t\t\tbd_ = []; // new Array(1);\n\t\t\t\t\ttl_ = []; // new Array(1);\n\t\t\t\t\ttd_ = []; // new Array(1);\n\t\t\t\t\tbl_[0] = 9; // must be <= 9 for lookahead assumptions\n\t\t\t\t\tbd_[0] = 6; // must be <= 9 for lookahead assumptions\n\n\t\t\t\t\tt = table;\n\t\t\t\t\tt = inftree.inflate_trees_dynamic(257 + (t & 0x1f), 1 + ((t >> 5) & 0x1f), blens, bl_, bd_, tl_, td_, hufts, z);\n\n\t\t\t\t\tif (t != Z_OK) {\n\t\t\t\t\t\tif (t == Z_DATA_ERROR) {\n\t\t\t\t\t\t\tblens = null;\n\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tr = t;\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tcodes.init(bl_[0], bd_[0], hufts, tl_[0], hufts, td_[0]);\n\t\t\t\t\t// }\n\t\t\t\t\tmode = CODES;\n\t\t\t\t/* falls through */\n\t\t\t\tcase CODES:\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\n\t\t\t\t\tif ((r = codes.proc(that, z, r)) != Z_STREAM_END) {\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tr = Z_OK;\n\t\t\t\t\tcodes.free(z);\n\n\t\t\t\t\tp = z.next_in_index;\n\t\t\t\t\tn = z.avail_in;\n\t\t\t\t\tb = that.bitb;\n\t\t\t\t\tk = that.bitk;\n\t\t\t\t\tq = that.write;\n\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\n\t\t\t\t\tif (last === 0) {\n\t\t\t\t\t\tmode = TYPE;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tmode = DRY;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DRY:\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\tr = that.inflate_flush(z, r);\n\t\t\t\t\tq = that.write;\n\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\tif (that.read != that.write) {\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tmode = DONELOCKS;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DONELOCKS:\n\t\t\t\t\tr = Z_STREAM_END;\n\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\tcase BADBLOCKS:\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\treturn that.inflate_flush(z, r);\n\n\t\t\t\tdefault:\n\t\t\t\t\tr = Z_STREAM_ERROR;\n\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t}\n\t\t}\n\t};\n\n\tthat.free = function (z) {\n\t\tthat.reset(z, null);\n\t\tthat.win = null;\n\t\thufts = null;\n\t\t// ZFREE(z, s);\n\t};\n\n\tthat.set_dictionary = function (d, start, n) {\n\t\tthat.win.set(d.subarray(start, start + n), 0);\n\t\tthat.read = that.write = n;\n\t};\n\n\t// Returns true if inflate is currently at the end of a block generated\n\t// by Z_SYNC_FLUSH or Z_FULL_FLUSH.\n\tthat.sync_point = function () {\n\t\treturn mode == LENS ? 1 : 0;\n\t};\n\n}\n\n// Inflate\n\n// preset dictionary flag in zlib header\nconst PRESET_DICT = 0x20;\n\nconst Z_DEFLATED = 8;\n\nconst METHOD = 0; // waiting for method byte\nconst FLAG = 1; // waiting for flag byte\nconst DICT4 = 2; // four dictionary check bytes to go\nconst DICT3 = 3; // three dictionary check bytes to go\nconst DICT2 = 4; // two dictionary check bytes to go\nconst DICT1 = 5; // one dictionary check byte to go\nconst DICT0 = 6; // waiting for inflateSetDictionary\nconst BLOCKS = 7; // decompressing blocks\nconst DONE = 12; // finished check, done\nconst BAD = 13; // got an error--stay here\n\nconst mark = [0, 0, 0xff, 0xff];\n\nfunction Inflate() {\n\tconst that = this;\n\n\tthat.mode = 0; // current inflate mode\n\n\t// mode dependent information\n\tthat.method = 0; // if FLAGS, method byte\n\n\t// if CHECK, check values to compare\n\tthat.was = [0]; // new Array(1); // computed check value\n\tthat.need = 0; // stream check value\n\n\t// if BAD, inflateSync's marker bytes count\n\tthat.marker = 0;\n\n\t// mode independent information\n\tthat.wbits = 0; // log2(win size) (8..15, defaults to 15)\n\n\t// this.blocks; // current inflate_blocks state\n\n\tfunction inflateReset(z) {\n\t\tif (!z || !z.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\n\t\tz.total_in = z.total_out = 0;\n\t\tz.msg = null;\n\t\tz.istate.mode = BLOCKS;\n\t\tz.istate.blocks.reset(z, null);\n\t\treturn Z_OK;\n\t}\n\n\tthat.inflateEnd = function (z) {\n\t\tif (that.blocks)\n\t\t\tthat.blocks.free(z);\n\t\tthat.blocks = null;\n\t\t// ZFREE(z, z->state);\n\t\treturn Z_OK;\n\t};\n\n\tthat.inflateInit = function (z, w) {\n\t\tz.msg = null;\n\t\tthat.blocks = null;\n\n\t\t// set win size\n\t\tif (w < 8 || w > 15) {\n\t\t\tthat.inflateEnd(z);\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\tthat.wbits = w;\n\n\t\tz.istate.blocks = new InfBlocks(z, 1 << w);\n\n\t\t// reset state\n\t\tinflateReset(z);\n\t\treturn Z_OK;\n\t};\n\n\tthat.inflate = function (z, f) {\n\t\tlet r;\n\t\tlet b;\n\n\t\tif (!z || !z.istate || !z.next_in)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst istate = z.istate;\n\t\tf = f == Z_FINISH ? Z_BUF_ERROR : Z_OK;\n\t\tr = Z_BUF_ERROR;\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\tswitch (istate.mode) {\n\t\t\t\tcase METHOD:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tif (((istate.method = z.read_byte(z.next_in_index++)) & 0xf) != Z_DEFLATED) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tz.msg = \"unknown compression method\";\n\t\t\t\t\t\tistate.marker = 5; // can't try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((istate.method >> 4) + 8 > istate.wbits) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tz.msg = \"invalid win size\";\n\t\t\t\t\t\tistate.marker = 5; // can't try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tistate.mode = FLAG;\n\t\t\t\t/* falls through */\n\t\t\t\tcase FLAG:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tb = (z.read_byte(z.next_in_index++)) & 0xff;\n\n\t\t\t\t\tif ((((istate.method << 8) + b) % 31) !== 0) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tz.msg = \"incorrect header check\";\n\t\t\t\t\t\tistate.marker = 5; // can't try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ((b & PRESET_DICT) === 0) {\n\t\t\t\t\t\tistate.mode = BLOCKS;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tistate.mode = DICT4;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT4:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need = ((z.read_byte(z.next_in_index++) & 0xff) << 24) & 0xff000000;\n\t\t\t\t\tistate.mode = DICT3;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT3:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need += ((z.read_byte(z.next_in_index++) & 0xff) << 16) & 0xff0000;\n\t\t\t\t\tistate.mode = DICT2;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT2:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need += ((z.read_byte(z.next_in_index++) & 0xff) << 8) & 0xff00;\n\t\t\t\t\tistate.mode = DICT1;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT1:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need += (z.read_byte(z.next_in_index++) & 0xff);\n\t\t\t\t\tistate.mode = DICT0;\n\t\t\t\t\treturn Z_NEED_DICT;\n\t\t\t\tcase DICT0:\n\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\tz.msg = \"need dictionary\";\n\t\t\t\t\tistate.marker = 0; // can try inflateSync\n\t\t\t\t\treturn Z_STREAM_ERROR;\n\t\t\t\tcase BLOCKS:\n\n\t\t\t\t\tr = istate.blocks.proc(z, r);\n\t\t\t\t\tif (r == Z_DATA_ERROR) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tistate.marker = 0; // can try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif (r == Z_OK) {\n\t\t\t\t\t\tr = f;\n\t\t\t\t\t}\n\t\t\t\t\tif (r != Z_STREAM_END) {\n\t\t\t\t\t\treturn r;\n\t\t\t\t\t}\n\t\t\t\t\tr = f;\n\t\t\t\t\tistate.blocks.reset(z, istate.was);\n\t\t\t\t\tistate.mode = DONE;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DONE:\n\t\t\t\t\tz.avail_in = 0;\n\t\t\t\t\treturn Z_STREAM_END;\n\t\t\t\tcase BAD:\n\t\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t\tdefault:\n\t\t\t\t\treturn Z_STREAM_ERROR;\n\t\t\t}\n\t\t}\n\t};\n\n\tthat.inflateSetDictionary = function (z, dictionary, dictLength) {\n\t\tlet index = 0, length = dictLength;\n\t\tif (!z || !z.istate || z.istate.mode != DICT0)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst istate = z.istate;\n\t\tif (length >= (1 << istate.wbits)) {\n\t\t\tlength = (1 << istate.wbits) - 1;\n\t\t\tindex = dictLength - length;\n\t\t}\n\t\tistate.blocks.set_dictionary(dictionary, index, length);\n\t\tistate.mode = BLOCKS;\n\t\treturn Z_OK;\n\t};\n\n\tthat.inflateSync = function (z) {\n\t\tlet n; // number of bytes to look at\n\t\tlet p; // pointer to bytes\n\t\tlet m; // number of marker bytes found in a row\n\t\tlet r, w; // temporaries to save total_in and total_out\n\n\t\t// set up\n\t\tif (!z || !z.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst istate = z.istate;\n\t\tif (istate.mode != BAD) {\n\t\t\tistate.mode = BAD;\n\t\t\tistate.marker = 0;\n\t\t}\n\t\tif ((n = z.avail_in) === 0)\n\t\t\treturn Z_BUF_ERROR;\n\t\tp = z.next_in_index;\n\t\tm = istate.marker;\n\n\t\t// search\n\t\twhile (n !== 0 && m < 4) {\n\t\t\tif (z.read_byte(p) == mark[m]) {\n\t\t\t\tm++;\n\t\t\t} else if (z.read_byte(p) !== 0) {\n\t\t\t\tm = 0;\n\t\t\t} else {\n\t\t\t\tm = 4 - m;\n\t\t\t}\n\t\t\tp++;\n\t\t\tn--;\n\t\t}\n\n\t\t// restore\n\t\tz.total_in += p - z.next_in_index;\n\t\tz.next_in_index = p;\n\t\tz.avail_in = n;\n\t\tistate.marker = m;\n\n\t\t// return no joy or set up to restart on a new block\n\t\tif (m != 4) {\n\t\t\treturn Z_DATA_ERROR;\n\t\t}\n\t\tr = z.total_in;\n\t\tw = z.total_out;\n\t\tinflateReset(z);\n\t\tz.total_in = r;\n\t\tz.total_out = w;\n\t\tistate.mode = BLOCKS;\n\t\treturn Z_OK;\n\t};\n\n\t// Returns true if inflate is currently at the end of a block generated\n\t// by Z_SYNC_FLUSH or Z_FULL_FLUSH. This function is used by one PPP\n\t// implementation to provide an additional safety check. PPP uses\n\t// Z_SYNC_FLUSH\n\t// but removes the length bytes of the resulting empty stored block. When\n\t// decompressing, PPP checks that at the end of input packet, inflate is\n\t// waiting for these length bytes.\n\tthat.inflateSyncPoint = function (z) {\n\t\tif (!z || !z.istate || !z.istate.blocks)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn z.istate.blocks.sync_point();\n\t};\n}\n\n// ZStream\n\nfunction ZStream() {\n}\n\nZStream.prototype = {\n\tinflateInit(bits) {\n\t\tconst that = this;\n\t\tthat.istate = new Inflate();\n\t\tif (!bits)\n\t\t\tbits = MAX_BITS;\n\t\treturn that.istate.inflateInit(that, bits);\n\t},\n\n\tinflate(f) {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.istate.inflate(that, f);\n\t},\n\n\tinflateEnd() {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst ret = that.istate.inflateEnd(that);\n\t\tthat.istate = null;\n\t\treturn ret;\n\t},\n\n\tinflateSync() {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.istate.inflateSync(that);\n\t},\n\tinflateSetDictionary(dictionary, dictLength) {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.istate.inflateSetDictionary(that, dictionary, dictLength);\n\t},\n\tread_byte(start) {\n\t\tconst that = this;\n\t\treturn that.next_in[start];\n\t},\n\tread_buf(start, size) {\n\t\tconst that = this;\n\t\treturn that.next_in.subarray(start, start + size);\n\t}\n};\n\n// Inflater\n\nfunction ZipInflate(options) {\n\tconst that = this;\n\tconst z = new ZStream();\n\tconst bufsize = options && options.chunkSize ? Math.floor(options.chunkSize * 2) : 128 * 1024;\n\tconst flush = Z_NO_FLUSH;\n\tconst buf = new Uint8Array(bufsize);\n\tlet nomoreinput = false;\n\n\tz.inflateInit();\n\tz.next_out = buf;\n\n\tthat.append = function (data, onprogress) {\n\t\tconst buffers = [];\n\t\tlet err, array, lastIndex = 0, bufferIndex = 0, bufferSize = 0;\n\t\tif (data.length === 0)\n\t\t\treturn;\n\t\tz.next_in_index = 0;\n\t\tz.next_in = data;\n\t\tz.avail_in = data.length;\n\t\tdo {\n\t\t\tz.next_out_index = 0;\n\t\t\tz.avail_out = bufsize;\n\t\t\tif ((z.avail_in === 0) && (!nomoreinput)) { // if buffer is empty and more input is available, refill it\n\t\t\t\tz.next_in_index = 0;\n\t\t\t\tnomoreinput = true;\n\t\t\t}\n\t\t\terr = z.inflate(flush);\n\t\t\tif (nomoreinput && (err === Z_BUF_ERROR)) {\n\t\t\t\tif (z.avail_in !== 0)\n\t\t\t\t\tthrow new Error(\"inflating: bad input\");\n\t\t\t} else if (err !== Z_OK && err !== Z_STREAM_END)\n\t\t\t\tthrow new Error(\"inflating: \" + z.msg);\n\t\t\tif ((nomoreinput || err === Z_STREAM_END) && (z.avail_in === data.length))\n\t\t\t\tthrow new Error(\"inflating: bad input\");\n\t\t\tif (z.next_out_index)\n\t\t\t\tif (z.next_out_index === bufsize)\n\t\t\t\t\tbuffers.push(new Uint8Array(buf));\n\t\t\t\telse\n\t\t\t\t\tbuffers.push(buf.slice(0, z.next_out_index));\n\t\t\tbufferSize += z.next_out_index;\n\t\t\tif (onprogress && z.next_in_index > 0 && z.next_in_index != lastIndex) {\n\t\t\t\tonprogress(z.next_in_index);\n\t\t\t\tlastIndex = z.next_in_index;\n\t\t\t}\n\t\t} while (z.avail_in > 0 || z.avail_out === 0);\n\t\tif (buffers.length > 1) {\n\t\t\tarray = new Uint8Array(bufferSize);\n\t\t\tbuffers.forEach(function (chunk) {\n\t\t\t\tarray.set(chunk, bufferIndex);\n\t\t\t\tbufferIndex += chunk.length;\n\t\t\t});\n\t\t} else {\n\t\t\tarray = buffers[0] || new Uint8Array();\n\t\t}\n\t\treturn array;\n\t};\n\tthat.flush = function () {\n\t\tz.inflateEnd();\n\t};\n}\n\nexport {\n\tZipInflate as Inflate\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nconst MAX_32_BITS = 0xffffffff;\nconst MAX_16_BITS = 0xffff;\nconst COMPRESSION_METHOD_DEFLATE = 0x08;\nconst COMPRESSION_METHOD_STORE = 0x00;\nconst COMPRESSION_METHOD_AES = 0x63;\n\nconst LOCAL_FILE_HEADER_SIGNATURE = 0x04034b50;\nconst SPLIT_ZIP_FILE_SIGNATURE = 0x08074b50;\nconst DATA_DESCRIPTOR_RECORD_SIGNATURE = SPLIT_ZIP_FILE_SIGNATURE;\nconst CENTRAL_FILE_HEADER_SIGNATURE = 0x02014b50;\nconst END_OF_CENTRAL_DIR_SIGNATURE = 0x06054b50;\nconst ZIP64_END_OF_CENTRAL_DIR_SIGNATURE = 0x06064b50;\nconst ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE = 0x07064b50;\nconst END_OF_CENTRAL_DIR_LENGTH = 22;\nconst ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH = 20;\nconst ZIP64_END_OF_CENTRAL_DIR_LENGTH = 56;\nconst ZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH = END_OF_CENTRAL_DIR_LENGTH + ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH + ZIP64_END_OF_CENTRAL_DIR_LENGTH;\n\nconst EXTRAFIELD_TYPE_ZIP64 = 0x0001;\nconst EXTRAFIELD_TYPE_AES = 0x9901;\nconst EXTRAFIELD_TYPE_NTFS = 0x000a;\nconst EXTRAFIELD_TYPE_NTFS_TAG1 = 0x0001;\nconst EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP = 0x5455;\nconst EXTRAFIELD_TYPE_UNICODE_PATH = 0x7075;\nconst EXTRAFIELD_TYPE_UNICODE_COMMENT = 0x6375;\n\nconst BITFLAG_ENCRYPTED = 0x01;\nconst BITFLAG_LEVEL = 0x06;\nconst BITFLAG_DATA_DESCRIPTOR = 0x0008;\nconst BITFLAG_LANG_ENCODING_FLAG = 0x0800;\nconst FILE_ATTR_MSDOS_DIR_MASK = 0x10;\n\nconst VERSION_DEFLATE = 0x14;\nconst VERSION_ZIP64 = 0x2D;\nconst VERSION_AES = 0x33;\n\nconst DIRECTORY_SIGNATURE = \"/\";\n\nconst MAX_DATE = new Date(2107, 11, 31);\nconst MIN_DATE = new Date(1980, 0, 1);\n\nconst UNDEFINED_VALUE = undefined;\nconst UNDEFINED_TYPE = \"undefined\";\nconst FUNCTION_TYPE = \"function\";\n\nexport {\n\tMAX_32_BITS,\n\tMAX_16_BITS,\n\tCOMPRESSION_METHOD_DEFLATE,\n\tCOMPRESSION_METHOD_STORE,\n\tCOMPRESSION_METHOD_AES,\n\tSPLIT_ZIP_FILE_SIGNATURE,\n\tLOCAL_FILE_HEADER_SIGNATURE,\n\tDATA_DESCRIPTOR_RECORD_SIGNATURE,\n\tCENTRAL_FILE_HEADER_SIGNATURE,\n\tEND_OF_CENTRAL_DIR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_SIGNATURE,\n\tEXTRAFIELD_TYPE_ZIP64,\n\tEXTRAFIELD_TYPE_AES,\n\tEXTRAFIELD_TYPE_NTFS,\n\tEXTRAFIELD_TYPE_NTFS_TAG1,\n\tEXTRAFIELD_TYPE_EXTENDED_TIMESTAMP,\n\tEXTRAFIELD_TYPE_UNICODE_PATH,\n\tEXTRAFIELD_TYPE_UNICODE_COMMENT,\n\tEND_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH,\n\tBITFLAG_ENCRYPTED,\n\tBITFLAG_LEVEL,\n\tBITFLAG_DATA_DESCRIPTOR,\n\tBITFLAG_LANG_ENCODING_FLAG,\n\tFILE_ATTR_MSDOS_DIR_MASK,\n\tVERSION_DEFLATE,\n\tVERSION_ZIP64,\n\tVERSION_AES,\n\tDIRECTORY_SIGNATURE,\n\tMIN_DATE,\n\tMAX_DATE,\n\tUNDEFINED_VALUE,\n\tUNDEFINED_TYPE,\n\tFUNCTION_TYPE\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n\nexport {\n\tStreamAdapter\n};\n\nclass StreamAdapter {\n\n\tconstructor(Codec) {\n\t\treturn class extends TransformStream {\n\t\t\tconstructor(_format, options) {\n\t\t\t\tconst codec = new Codec(options);\n\t\t\t\tsuper({\n\t\t\t\t\ttransform(chunk, controller) {\n\t\t\t\t\t\tcontroller.enqueue(codec.append(chunk));\n\t\t\t\t\t},\n\t\t\t\t\tflush(controller) {\n\t\t\t\t\t\tconst chunk = codec.flush();\n\t\t\t\t\t\tif (chunk) {\n\t\t\t\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t};\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global navigator, CompressionStream, DecompressionStream */\n\nimport {\n\tUNDEFINED_VALUE,\n\tUNDEFINED_TYPE\n} from \"./constants.js\";\nimport { StreamAdapter } from \"./streams/stream-adapter.js\";\n\nconst MINIMUM_CHUNK_SIZE = 64;\nlet maxWorkers = 2;\ntry {\n\tif (typeof navigator != UNDEFINED_TYPE && navigator.hardwareConcurrency) {\n\t\tmaxWorkers = navigator.hardwareConcurrency;\n\t}\n} catch (_error) {\n\t// ignored\n}\nconst DEFAULT_CONFIGURATION = {\n\tchunkSize: 512 * 1024,\n\tmaxWorkers,\n\tterminateWorkerTimeout: 5000,\n\tuseWebWorkers: true,\n\tuseCompressionStream: true,\n\tworkerScripts: UNDEFINED_VALUE,\n\tCompressionStreamNative: typeof CompressionStream != UNDEFINED_TYPE && CompressionStream,\n\tDecompressionStreamNative: typeof DecompressionStream != UNDEFINED_TYPE && DecompressionStream\n};\n\nconst config = Object.assign({}, DEFAULT_CONFIGURATION);\n\nexport {\n\tconfigure,\n\tgetConfiguration,\n\tgetChunkSize\n};\n\nfunction getConfiguration() {\n\treturn config;\n}\n\nfunction getChunkSize(config) {\n\treturn Math.max(config.chunkSize, MINIMUM_CHUNK_SIZE);\n}\n\nfunction configure(configuration) {\n\tconst {\n\t\tbaseURL,\n\t\tchunkSize,\n\t\tmaxWorkers,\n\t\tterminateWorkerTimeout,\n\t\tuseCompressionStream,\n\t\tuseWebWorkers,\n\t\tDeflate,\n\t\tInflate,\n\t\tCompressionStream,\n\t\tDecompressionStream,\n\t\tworkerScripts\n\t} = configuration;\n\tsetIfDefined(\"baseURL\", baseURL);\n\tsetIfDefined(\"chunkSize\", chunkSize);\n\tsetIfDefined(\"maxWorkers\", maxWorkers);\n\tsetIfDefined(\"terminateWorkerTimeout\", terminateWorkerTimeout);\n\tsetIfDefined(\"useCompressionStream\", useCompressionStream);\n\tsetIfDefined(\"useWebWorkers\", useWebWorkers);\n\tif (Deflate) {\n\t\tconfig.CompressionStream = new StreamAdapter(Deflate);\n\t}\n\tif (Inflate) {\n\t\tconfig.DecompressionStream = new StreamAdapter(Inflate);\n\t}\n\tsetIfDefined(\"CompressionStream\", CompressionStream);\n\tsetIfDefined(\"DecompressionStream\", DecompressionStream);\n\tif (workerScripts !== UNDEFINED_VALUE) {\n\t\tconst { deflate, inflate } = workerScripts;\n\t\tif (deflate || inflate) {\n\t\t\tif (!config.workerScripts) {\n\t\t\t\tconfig.workerScripts = {};\n\t\t\t}\n\t\t}\n\t\tif (deflate) {\n\t\t\tif (!Array.isArray(deflate)) {\n\t\t\t\tthrow new Error(\"workerScripts.deflate must be an array\");\n\t\t\t}\n\t\t\tconfig.workerScripts.deflate = deflate;\n\t\t}\n\t\tif (inflate) {\n\t\t\tif (!Array.isArray(inflate)) {\n\t\t\t\tthrow new Error(\"workerScripts.inflate must be an array\");\n\t\t\t}\n\t\t\tconfig.workerScripts.inflate = inflate;\n\t\t}\n\t}\n}\n\nfunction setIfDefined(propertyName, propertyValue) {\n\tif (propertyValue !== UNDEFINED_VALUE) {\n\t\tconfig[propertyName] = propertyValue;\n\t}\n}\n","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n// deno-lint-ignore-file no-prototype-builtins\n\nimport { getMimeType as getDefaultMimeType } from \"./default-mime-type.js\";\n\nconst table = {\n\t\"application\": {\n\t\t\"andrew-inset\": \"ez\",\n\t\t\"annodex\": \"anx\",\n\t\t\"atom+xml\": \"atom\",\n\t\t\"atomcat+xml\": \"atomcat\",\n\t\t\"atomserv+xml\": \"atomsrv\",\n\t\t\"bbolin\": \"lin\",\n\t\t\"cap\": [\"cap\", \"pcap\"],\n\t\t\"cu-seeme\": \"cu\",\n\t\t\"davmount+xml\": \"davmount\",\n\t\t\"dsptype\": \"tsp\",\n\t\t\"ecmascript\": [\"es\", \"ecma\"],\n\t\t\"futuresplash\": \"spl\",\n\t\t\"hta\": \"hta\",\n\t\t\"java-archive\": \"jar\",\n\t\t\"java-serialized-object\": \"ser\",\n\t\t\"java-vm\": \"class\",\n\t\t\"javascript\": \"js\",\n\t\t\"m3g\": \"m3g\",\n\t\t\"mac-binhex40\": \"hqx\",\n\t\t\"mathematica\": [\"nb\", \"ma\", \"mb\"],\n\t\t\"msaccess\": \"mdb\",\n\t\t\"msword\": [\"doc\", \"dot\"],\n\t\t\"mxf\": \"mxf\",\n\t\t\"oda\": \"oda\",\n\t\t\"ogg\": \"ogx\",\n\t\t\"pdf\": \"pdf\",\n\t\t\"pgp-keys\": \"key\",\n\t\t\"pgp-signature\": [\"asc\", \"sig\"],\n\t\t\"pics-rules\": \"prf\",\n\t\t\"postscript\": [\"ps\", \"ai\", \"eps\", \"epsi\", \"epsf\", \"eps2\", \"eps3\"],\n\t\t\"rar\": \"rar\",\n\t\t\"rdf+xml\": \"rdf\",\n\t\t\"rss+xml\": \"rss\",\n\t\t\"rtf\": \"rtf\",\n\t\t\"smil\": [\"smi\", \"smil\"],\n\t\t\"xhtml+xml\": [\"xhtml\", \"xht\"],\n\t\t\"xml\": [\"xml\", \"xsl\", \"xsd\"],\n\t\t\"xspf+xml\": \"xspf\",\n\t\t\"zip\": \"zip\",\n\t\t\"vnd.android.package-archive\": \"apk\",\n\t\t\"vnd.cinderella\": \"cdy\",\n\t\t\"vnd.google-earth.kml+xml\": \"kml\",\n\t\t\"vnd.google-earth.kmz\": \"kmz\",\n\t\t\"vnd.mozilla.xul+xml\": \"xul\",\n\t\t\"vnd.ms-excel\": [\"xls\", \"xlb\", \"xlt\", \"xlm\", \"xla\", \"xlc\", \"xlw\"],\n\t\t\"vnd.ms-pki.seccat\": \"cat\",\n\t\t\"vnd.ms-pki.stl\": \"stl\",\n\t\t\"vnd.ms-powerpoint\": [\"ppt\", \"pps\", \"pot\"],\n\t\t\"vnd.oasis.opendocument.chart\": \"odc\",\n\t\t\"vnd.oasis.opendocument.database\": \"odb\",\n\t\t\"vnd.oasis.opendocument.formula\": \"odf\",\n\t\t\"vnd.oasis.opendocument.graphics\": \"odg\",\n\t\t\"vnd.oasis.opendocument.graphics-template\": \"otg\",\n\t\t\"vnd.oasis.opendocument.image\": \"odi\",\n\t\t\"vnd.oasis.opendocument.presentation\": \"odp\",\n\t\t\"vnd.oasis.opendocument.presentation-template\": \"otp\",\n\t\t\"vnd.oasis.opendocument.spreadsheet\": \"ods\",\n\t\t\"vnd.oasis.opendocument.spreadsheet-template\": \"ots\",\n\t\t\"vnd.oasis.opendocument.text\": \"odt\",\n\t\t\"vnd.oasis.opendocument.text-master\": \"odm\",\n\t\t\"vnd.oasis.opendocument.text-template\": \"ott\",\n\t\t\"vnd.oasis.opendocument.text-web\": \"oth\",\n\t\t\"vnd.openxmlformats-officedocument.spreadsheetml.sheet\": \"xlsx\",\n\t\t\"vnd.openxmlformats-officedocument.spreadsheetml.template\": \"xltx\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.presentation\": \"pptx\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.slideshow\": \"ppsx\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.template\": \"potx\",\n\t\t\"vnd.openxmlformats-officedocument.wordprocessingml.document\": \"docx\",\n\t\t\"vnd.openxmlformats-officedocument.wordprocessingml.template\": \"dotx\",\n\t\t\"vnd.smaf\": \"mmf\",\n\t\t\"vnd.stardivision.calc\": \"sdc\",\n\t\t\"vnd.stardivision.chart\": \"sds\",\n\t\t\"vnd.stardivision.draw\": \"sda\",\n\t\t\"vnd.stardivision.impress\": \"sdd\",\n\t\t\"vnd.stardivision.math\": [\"sdf\", \"smf\"],\n\t\t\"vnd.stardivision.writer\": [\"sdw\", \"vor\"],\n\t\t\"vnd.stardivision.writer-global\": \"sgl\",\n\t\t\"vnd.sun.xml.calc\": \"sxc\",\n\t\t\"vnd.sun.xml.calc.template\": \"stc\",\n\t\t\"vnd.sun.xml.draw\": \"sxd\",\n\t\t\"vnd.sun.xml.draw.template\": \"std\",\n\t\t\"vnd.sun.xml.impress\": \"sxi\",\n\t\t\"vnd.sun.xml.impress.template\": \"sti\",\n\t\t\"vnd.sun.xml.math\": \"sxm\",\n\t\t\"vnd.sun.xml.writer\": \"sxw\",\n\t\t\"vnd.sun.xml.writer.global\": \"sxg\",\n\t\t\"vnd.sun.xml.writer.template\": \"stw\",\n\t\t\"vnd.symbian.install\": [\"sis\", \"sisx\"],\n\t\t\"vnd.visio\": [\"vsd\", \"vst\", \"vss\", \"vsw\"],\n\t\t\"vnd.wap.wbxml\": \"wbxml\",\n\t\t\"vnd.wap.wmlc\": \"wmlc\",\n\t\t\"vnd.wap.wmlscriptc\": \"wmlsc\",\n\t\t\"vnd.wordperfect\": \"wpd\",\n\t\t\"vnd.wordperfect5.1\": \"wp5\",\n\t\t\"x-123\": \"wk\",\n\t\t\"x-7z-compressed\": \"7z\",\n\t\t\"x-abiword\": \"abw\",\n\t\t\"x-apple-diskimage\": \"dmg\",\n\t\t\"x-bcpio\": \"bcpio\",\n\t\t\"x-bittorrent\": \"torrent\",\n\t\t\"x-cbr\": [\"cbr\", \"cba\", \"cbt\", \"cb7\"],\n\t\t\"x-cbz\": \"cbz\",\n\t\t\"x-cdf\": [\"cdf\", \"cda\"],\n\t\t\"x-cdlink\": \"vcd\",\n\t\t\"x-chess-pgn\": \"pgn\",\n\t\t\"x-cpio\": \"cpio\",\n\t\t\"x-csh\": \"csh\",\n\t\t\"x-debian-package\": [\"deb\", \"udeb\"],\n\t\t\"x-director\": [\"dcr\", \"dir\", \"dxr\", \"cst\", \"cct\", \"cxt\", \"w3d\", \"fgd\", \"swa\"],\n\t\t\"x-dms\": \"dms\",\n\t\t\"x-doom\": \"wad\",\n\t\t\"x-dvi\": \"dvi\",\n\t\t\"x-httpd-eruby\": \"rhtml\",\n\t\t\"x-font\": \"pcf.Z\",\n\t\t\"x-freemind\": \"mm\",\n\t\t\"x-gnumeric\": \"gnumeric\",\n\t\t\"x-go-sgf\": \"sgf\",\n\t\t\"x-graphing-calculator\": \"gcf\",\n\t\t\"x-gtar\": [\"gtar\", \"taz\"],\n\t\t\"x-hdf\": \"hdf\",\n\t\t\"x-httpd-php\": [\"phtml\", \"pht\", \"php\"],\n\t\t\"x-httpd-php-source\": \"phps\",\n\t\t\"x-httpd-php3\": \"php3\",\n\t\t\"x-httpd-php3-preprocessed\": \"php3p\",\n\t\t\"x-httpd-php4\": \"php4\",\n\t\t\"x-httpd-php5\": \"php5\",\n\t\t\"x-ica\": \"ica\",\n\t\t\"x-info\": \"info\",\n\t\t\"x-internet-signup\": [\"ins\", \"isp\"],\n\t\t\"x-iphone\": \"iii\",\n\t\t\"x-iso9660-image\": \"iso\",\n\t\t\"x-java-jnlp-file\": \"jnlp\",\n\t\t\"x-jmol\": \"jmz\",\n\t\t\"x-killustrator\": \"kil\",\n\t\t\"x-koan\": [\"skp\", \"skd\", \"skt\", \"skm\"],\n\t\t\"x-kpresenter\": [\"kpr\", \"kpt\"],\n\t\t\"x-kword\": [\"kwd\", \"kwt\"],\n\t\t\"x-latex\": \"latex\",\n\t\t\"x-lha\": \"lha\",\n\t\t\"x-lyx\": \"lyx\",\n\t\t\"x-lzh\": \"lzh\",\n\t\t\"x-lzx\": \"lzx\",\n\t\t\"x-maker\": [\"frm\", \"maker\", \"frame\", \"fm\", \"fb\", \"book\", \"fbdoc\"],\n\t\t\"x-ms-wmd\": \"wmd\",\n\t\t\"x-ms-wmz\": \"wmz\",\n\t\t\"x-msdos-program\": [\"com\", \"exe\", \"bat\", \"dll\"],\n\t\t\"x-msi\": \"msi\",\n\t\t\"x-netcdf\": [\"nc\", \"cdf\"],\n\t\t\"x-ns-proxy-autoconfig\": [\"pac\", \"dat\"],\n\t\t\"x-nwc\": \"nwc\",\n\t\t\"x-object\": \"o\",\n\t\t\"x-oz-application\": \"oza\",\n\t\t\"x-pkcs7-certreqresp\": \"p7r\",\n\t\t\"x-python-code\": [\"pyc\", \"pyo\"],\n\t\t\"x-qgis\": [\"qgs\", \"shp\", \"shx\"],\n\t\t\"x-quicktimeplayer\": \"qtl\",\n\t\t\"x-redhat-package-manager\": \"rpm\",\n\t\t\"x-ruby\": \"rb\",\n\t\t\"x-sh\": \"sh\",\n\t\t\"x-shar\": \"shar\",\n\t\t\"x-shockwave-flash\": [\"swf\", \"swfl\"],\n\t\t\"x-silverlight\": \"scr\",\n\t\t\"x-stuffit\": \"sit\",\n\t\t\"x-sv4cpio\": \"sv4cpio\",\n\t\t\"x-sv4crc\": \"sv4crc\",\n\t\t\"x-tar\": \"tar\",\n\t\t\"x-tcl\": \"tcl\",\n\t\t\"x-tex-gf\": \"gf\",\n\t\t\"x-tex-pk\": \"pk\",\n\t\t\"x-texinfo\": [\"texinfo\", \"texi\"],\n\t\t\"x-trash\": [\"~\", \"%\", \"bak\", \"old\", \"sik\"],\n\t\t\"x-troff\": [\"t\", \"tr\", \"roff\"],\n\t\t\"x-troff-man\": \"man\",\n\t\t\"x-troff-me\": \"me\",\n\t\t\"x-troff-ms\": \"ms\",\n\t\t\"x-ustar\": \"ustar\",\n\t\t\"x-wais-source\": \"src\",\n\t\t\"x-wingz\": \"wz\",\n\t\t\"x-x509-ca-cert\": [\"crt\", \"der\", \"cer\"],\n\t\t\"x-xcf\": \"xcf\",\n\t\t\"x-xfig\": \"fig\",\n\t\t\"x-xpinstall\": \"xpi\",\n\t\t\"applixware\": \"aw\",\n\t\t\"atomsvc+xml\": \"atomsvc\",\n\t\t\"ccxml+xml\": \"ccxml\",\n\t\t\"cdmi-capability\": \"cdmia\",\n\t\t\"cdmi-container\": \"cdmic\",\n\t\t\"cdmi-domain\": \"cdmid\",\n\t\t\"cdmi-object\": \"cdmio\",\n\t\t\"cdmi-queue\": \"cdmiq\",\n\t\t\"docbook+xml\": \"dbk\",\n\t\t\"dssc+der\": \"dssc\",\n\t\t\"dssc+xml\": \"xdssc\",\n\t\t\"emma+xml\": \"emma\",\n\t\t\"epub+zip\": \"epub\",\n\t\t\"exi\": \"exi\",\n\t\t\"font-tdpfr\": \"pfr\",\n\t\t\"gml+xml\": \"gml\",\n\t\t\"gpx+xml\": \"gpx\",\n\t\t\"gxf\": \"gxf\",\n\t\t\"hyperstudio\": \"stk\",\n\t\t\"inkml+xml\": [\"ink\", \"inkml\"],\n\t\t\"ipfix\": \"ipfix\",\n\t\t\"json\": \"json\",\n\t\t\"jsonml+json\": \"jsonml\",\n\t\t\"lost+xml\": \"lostxml\",\n\t\t\"mads+xml\": \"mads\",\n\t\t\"marc\": \"mrc\",\n\t\t\"marcxml+xml\": \"mrcx\",\n\t\t\"mathml+xml\": \"mathml\",\n\t\t\"mbox\": \"mbox\",\n\t\t\"mediaservercontrol+xml\": \"mscml\",\n\t\t\"metalink+xml\": \"metalink\",\n\t\t\"metalink4+xml\": \"meta4\",\n\t\t\"mets+xml\": \"mets\",\n\t\t\"mods+xml\": \"mods\",\n\t\t\"mp21\": [\"m21\", \"mp21\"],\n\t\t\"mp4\": \"mp4s\",\n\t\t\"oebps-package+xml\": \"opf\",\n\t\t\"omdoc+xml\": \"omdoc\",\n\t\t\"onenote\": [\"onetoc\", \"onetoc2\", \"onetmp\", \"onepkg\"],\n\t\t\"oxps\": \"oxps\",\n\t\t\"patch-ops-error+xml\": \"xer\",\n\t\t\"pgp-encrypted\": \"pgp\",\n\t\t\"pkcs10\": \"p10\",\n\t\t\"pkcs7-mime\": [\"p7m\", \"p7c\"],\n\t\t\"pkcs7-signature\": \"p7s\",\n\t\t\"pkcs8\": \"p8\",\n\t\t\"pkix-attr-cert\": \"ac\",\n\t\t\"pkix-crl\": \"crl\",\n\t\t\"pkix-pkipath\": \"pkipath\",\n\t\t\"pkixcmp\": \"pki\",\n\t\t\"pls+xml\": \"pls\",\n\t\t\"prs.cww\": \"cww\",\n\t\t\"pskc+xml\": \"pskcxml\",\n\t\t\"reginfo+xml\": \"rif\",\n\t\t\"relax-ng-compact-syntax\": \"rnc\",\n\t\t\"resource-lists+xml\": \"rl\",\n\t\t\"resource-lists-diff+xml\": \"rld\",\n\t\t\"rls-services+xml\": \"rs\",\n\t\t\"rpki-ghostbusters\": \"gbr\",\n\t\t\"rpki-manifest\": \"mft\",\n\t\t\"rpki-roa\": \"roa\",\n\t\t\"rsd+xml\": \"rsd\",\n\t\t\"sbml+xml\": \"sbml\",\n\t\t\"scvp-cv-request\": \"scq\",\n\t\t\"scvp-cv-response\": \"scs\",\n\t\t\"scvp-vp-request\": \"spq\",\n\t\t\"scvp-vp-response\": \"spp\",\n\t\t\"sdp\": \"sdp\",\n\t\t\"set-payment-initiation\": \"setpay\",\n\t\t\"set-registration-initiation\": \"setreg\",\n\t\t\"shf+xml\": \"shf\",\n\t\t\"sparql-query\": \"rq\",\n\t\t\"sparql-results+xml\": \"srx\",\n\t\t\"srgs\": \"gram\",\n\t\t\"srgs+xml\": \"grxml\",\n\t\t\"sru+xml\": \"sru\",\n\t\t\"ssdl+xml\": \"ssdl\",\n\t\t\"ssml+xml\": \"ssml\",\n\t\t\"tei+xml\": [\"tei\", \"teicorpus\"],\n\t\t\"thraud+xml\": \"tfi\",\n\t\t\"timestamped-data\": \"tsd\",\n\t\t\"vnd.3gpp.pic-bw-large\": \"plb\",\n\t\t\"vnd.3gpp.pic-bw-small\": \"psb\",\n\t\t\"vnd.3gpp.pic-bw-var\": \"pvb\",\n\t\t\"vnd.3gpp2.tcap\": \"tcap\",\n\t\t\"vnd.3m.post-it-notes\": \"pwn\",\n\t\t\"vnd.accpac.simply.aso\": \"aso\",\n\t\t\"vnd.accpac.simply.imp\": \"imp\",\n\t\t\"vnd.acucobol\": \"acu\",\n\t\t\"vnd.acucorp\": [\"atc\", \"acutc\"],\n\t\t\"vnd.adobe.air-application-installer-package+zip\": \"air\",\n\t\t\"vnd.adobe.formscentral.fcdt\": \"fcdt\",\n\t\t\"vnd.adobe.fxp\": [\"fxp\", \"fxpl\"],\n\t\t\"vnd.adobe.xdp+xml\": \"xdp\",\n\t\t\"vnd.adobe.xfdf\": \"xfdf\",\n\t\t\"vnd.ahead.space\": \"ahead\",\n\t\t\"vnd.airzip.filesecure.azf\": \"azf\",\n\t\t\"vnd.airzip.filesecure.azs\": \"azs\",\n\t\t\"vnd.amazon.ebook\": \"azw\",\n\t\t\"vnd.americandynamics.acc\": \"acc\",\n\t\t\"vnd.amiga.ami\": \"ami\",\n\t\t\"vnd.anser-web-certificate-issue-initiation\": \"cii\",\n\t\t\"vnd.anser-web-funds-transfer-initiation\": \"fti\",\n\t\t\"vnd.antix.game-component\": \"atx\",\n\t\t\"vnd.apple.installer+xml\": \"mpkg\",\n\t\t\"vnd.apple.mpegurl\": \"m3u8\",\n\t\t\"vnd.aristanetworks.swi\": \"swi\",\n\t\t\"vnd.astraea-software.iota\": \"iota\",\n\t\t\"vnd.audiograph\": \"aep\",\n\t\t\"vnd.blueice.multipass\": \"mpm\",\n\t\t\"vnd.bmi\": \"bmi\",\n\t\t\"vnd.businessobjects\": \"rep\",\n\t\t\"vnd.chemdraw+xml\": \"cdxml\",\n\t\t\"vnd.chipnuts.karaoke-mmd\": \"mmd\",\n\t\t\"vnd.claymore\": \"cla\",\n\t\t\"vnd.cloanto.rp9\": \"rp9\",\n\t\t\"vnd.clonk.c4group\": [\"c4g\", \"c4d\", \"c4f\", \"c4p\", \"c4u\"],\n\t\t\"vnd.cluetrust.cartomobile-config\": \"c11amc\",\n\t\t\"vnd.cluetrust.cartomobile-config-pkg\": \"c11amz\",\n\t\t\"vnd.commonspace\": \"csp\",\n\t\t\"vnd.contact.cmsg\": \"cdbcmsg\",\n\t\t\"vnd.cosmocaller\": \"cmc\",\n\t\t\"vnd.crick.clicker\": \"clkx\",\n\t\t\"vnd.crick.clicker.keyboard\": \"clkk\",\n\t\t\"vnd.crick.clicker.palette\": \"clkp\",\n\t\t\"vnd.crick.clicker.template\": \"clkt\",\n\t\t\"vnd.crick.clicker.wordbank\": \"clkw\",\n\t\t\"vnd.criticaltools.wbs+xml\": \"wbs\",\n\t\t\"vnd.ctc-posml\": \"pml\",\n\t\t\"vnd.cups-ppd\": \"ppd\",\n\t\t\"vnd.curl.car\": \"car\",\n\t\t\"vnd.curl.pcurl\": \"pcurl\",\n\t\t\"vnd.dart\": \"dart\",\n\t\t\"vnd.data-vision.rdz\": \"rdz\",\n\t\t\"vnd.dece.data\": [\"uvf\", \"uvvf\", \"uvd\", \"uvvd\"],\n\t\t\"vnd.dece.ttml+xml\": [\"uvt\", \"uvvt\"],\n\t\t\"vnd.dece.unspecified\": [\"uvx\", \"uvvx\"],\n\t\t\"vnd.dece.zip\": [\"uvz\", \"uvvz\"],\n\t\t\"vnd.denovo.fcselayout-link\": \"fe_launch\",\n\t\t\"vnd.dna\": \"dna\",\n\t\t\"vnd.dolby.mlp\": \"mlp\",\n\t\t\"vnd.dpgraph\": \"dpg\",\n\t\t\"vnd.dreamfactory\": \"dfac\",\n\t\t\"vnd.ds-keypoint\": \"kpxx\",\n\t\t\"vnd.dvb.ait\": \"ait\",\n\t\t\"vnd.dvb.service\": \"svc\",\n\t\t\"vnd.dynageo\": \"geo\",\n\t\t\"vnd.ecowin.chart\": \"mag\",\n\t\t\"vnd.enliven\": \"nml\",\n\t\t\"vnd.epson.esf\": \"esf\",\n\t\t\"vnd.epson.msf\": \"msf\",\n\t\t\"vnd.epson.quickanime\": \"qam\",\n\t\t\"vnd.epson.salt\": \"slt\",\n\t\t\"vnd.epson.ssf\": \"ssf\",\n\t\t\"vnd.eszigno3+xml\": [\"es3\", \"et3\"],\n\t\t\"vnd.ezpix-album\": \"ez2\",\n\t\t\"vnd.ezpix-package\": \"ez3\",\n\t\t\"vnd.fdf\": \"fdf\",\n\t\t\"vnd.fdsn.mseed\": \"mseed\",\n\t\t\"vnd.fdsn.seed\": [\"seed\", \"dataless\"],\n\t\t\"vnd.flographit\": \"gph\",\n\t\t\"vnd.fluxtime.clip\": \"ftc\",\n\t\t\"vnd.framemaker\": [\"fm\", \"frame\", \"maker\", \"book\"],\n\t\t\"vnd.frogans.fnc\": \"fnc\",\n\t\t\"vnd.frogans.ltf\": \"ltf\",\n\t\t\"vnd.fsc.weblaunch\": \"fsc\",\n\t\t\"vnd.fujitsu.oasys\": \"oas\",\n\t\t\"vnd.fujitsu.oasys2\": \"oa2\",\n\t\t\"vnd.fujitsu.oasys3\": \"oa3\",\n\t\t\"vnd.fujitsu.oasysgp\": \"fg5\",\n\t\t\"vnd.fujitsu.oasysprs\": \"bh2\",\n\t\t\"vnd.fujixerox.ddd\": \"ddd\",\n\t\t\"vnd.fujixerox.docuworks\": \"xdw\",\n\t\t\"vnd.fujixerox.docuworks.binder\": \"xbd\",\n\t\t\"vnd.fuzzysheet\": \"fzs\",\n\t\t\"vnd.genomatix.tuxedo\": \"txd\",\n\t\t\"vnd.geogebra.file\": \"ggb\",\n\t\t\"vnd.geogebra.tool\": \"ggt\",\n\t\t\"vnd.geometry-explorer\": [\"gex\", \"gre\"],\n\t\t\"vnd.geonext\": \"gxt\",\n\t\t\"vnd.geoplan\": \"g2w\",\n\t\t\"vnd.geospace\": \"g3w\",\n\t\t\"vnd.gmx\": \"gmx\",\n\t\t\"vnd.grafeq\": [\"gqf\", \"gqs\"],\n\t\t\"vnd.groove-account\": \"gac\",\n\t\t\"vnd.groove-help\": \"ghf\",\n\t\t\"vnd.groove-identity-message\": \"gim\",\n\t\t\"vnd.groove-injector\": \"grv\",\n\t\t\"vnd.groove-tool-message\": \"gtm\",\n\t\t\"vnd.groove-tool-template\": \"tpl\",\n\t\t\"vnd.groove-vcard\": \"vcg\",\n\t\t\"vnd.hal+xml\": \"hal\",\n\t\t\"vnd.handheld-entertainment+xml\": \"zmm\",\n\t\t\"vnd.hbci\": \"hbci\",\n\t\t\"vnd.hhe.lesson-player\": \"les\",\n\t\t\"vnd.hp-hpgl\": \"hpgl\",\n\t\t\"vnd.hp-hpid\": \"hpid\",\n\t\t\"vnd.hp-hps\": \"hps\",\n\t\t\"vnd.hp-jlyt\": \"jlt\",\n\t\t\"vnd.hp-pcl\": \"pcl\",\n\t\t\"vnd.hp-pclxl\": \"pclxl\",\n\t\t\"vnd.hydrostatix.sof-data\": \"sfd-hdstx\",\n\t\t\"vnd.ibm.minipay\": \"mpy\",\n\t\t\"vnd.ibm.modcap\": [\"afp\", \"listafp\", \"list3820\"],\n\t\t\"vnd.ibm.rights-management\": \"irm\",\n\t\t\"vnd.ibm.secure-container\": \"sc\",\n\t\t\"vnd.iccprofile\": [\"icc\", \"icm\"],\n\t\t\"vnd.igloader\": \"igl\",\n\t\t\"vnd.immervision-ivp\": \"ivp\",\n\t\t\"vnd.immervision-ivu\": \"ivu\",\n\t\t\"vnd.insors.igm\": \"igm\",\n\t\t\"vnd.intercon.formnet\": [\"xpw\", \"xpx\"],\n\t\t\"vnd.intergeo\": \"i2g\",\n\t\t\"vnd.intu.qbo\": \"qbo\",\n\t\t\"vnd.intu.qfx\": \"qfx\",\n\t\t\"vnd.ipunplugged.rcprofile\": \"rcprofile\",\n\t\t\"vnd.irepository.package+xml\": \"irp\",\n\t\t\"vnd.is-xpr\": \"xpr\",\n\t\t\"vnd.isac.fcs\": \"fcs\",\n\t\t\"vnd.jam\": \"jam\",\n\t\t\"vnd.jcp.javame.midlet-rms\": \"rms\",\n\t\t\"vnd.jisp\": \"jisp\",\n\t\t\"vnd.joost.joda-archive\": \"joda\",\n\t\t\"vnd.kahootz\": [\"ktz\", \"ktr\"],\n\t\t\"vnd.kde.karbon\": \"karbon\",\n\t\t\"vnd.kde.kchart\": \"chrt\",\n\t\t\"vnd.kde.kformula\": \"kfo\",\n\t\t\"vnd.kde.kivio\": \"flw\",\n\t\t\"vnd.kde.kontour\": \"kon\",\n\t\t\"vnd.kde.kpresenter\": [\"kpr\", \"kpt\"],\n\t\t\"vnd.kde.kspread\": \"ksp\",\n\t\t\"vnd.kde.kword\": [\"kwd\", \"kwt\"],\n\t\t\"vnd.kenameaapp\": \"htke\",\n\t\t\"vnd.kidspiration\": \"kia\",\n\t\t\"vnd.kinar\": [\"kne\", \"knp\"],\n\t\t\"vnd.koan\": [\"skp\", \"skd\", \"skt\", \"skm\"],\n\t\t\"vnd.kodak-descriptor\": \"sse\",\n\t\t\"vnd.las.las+xml\": \"lasxml\",\n\t\t\"vnd.llamagraphics.life-balance.desktop\": \"lbd\",\n\t\t\"vnd.llamagraphics.life-balance.exchange+xml\": \"lbe\",\n\t\t\"vnd.lotus-1-2-3\": \"123\",\n\t\t\"vnd.lotus-approach\": \"apr\",\n\t\t\"vnd.lotus-freelance\": \"pre\",\n\t\t\"vnd.lotus-notes\": \"nsf\",\n\t\t\"vnd.lotus-organizer\": \"org\",\n\t\t\"vnd.lotus-screencam\": \"scm\",\n\t\t\"vnd.lotus-wordpro\": \"lwp\",\n\t\t\"vnd.macports.portpkg\": \"portpkg\",\n\t\t\"vnd.mcd\": \"mcd\",\n\t\t\"vnd.medcalcdata\": \"mc1\",\n\t\t\"vnd.mediastation.cdkey\": \"cdkey\",\n\t\t\"vnd.mfer\": \"mwf\",\n\t\t\"vnd.mfmp\": \"mfm\",\n\t\t\"vnd.micrografx.flo\": \"flo\",\n\t\t\"vnd.micrografx.igx\": \"igx\",\n\t\t\"vnd.mif\": \"mif\",\n\t\t\"vnd.mobius.daf\": \"daf\",\n\t\t\"vnd.mobius.dis\": \"dis\",\n\t\t\"vnd.mobius.mbk\": \"mbk\",\n\t\t\"vnd.mobius.mqy\": \"mqy\",\n\t\t\"vnd.mobius.msl\": \"msl\",\n\t\t\"vnd.mobius.plc\": \"plc\",\n\t\t\"vnd.mobius.txf\": \"txf\",\n\t\t\"vnd.mophun.application\": \"mpn\",\n\t\t\"vnd.mophun.certificate\": \"mpc\",\n\t\t\"vnd.ms-artgalry\": \"cil\",\n\t\t\"vnd.ms-cab-compressed\": \"cab\",\n\t\t\"vnd.ms-excel.addin.macroenabled.12\": \"xlam\",\n\t\t\"vnd.ms-excel.sheet.binary.macroenabled.12\": \"xlsb\",\n\t\t\"vnd.ms-excel.sheet.macroenabled.12\": \"xlsm\",\n\t\t\"vnd.ms-excel.template.macroenabled.12\": \"xltm\",\n\t\t\"vnd.ms-fontobject\": \"eot\",\n\t\t\"vnd.ms-htmlhelp\": \"chm\",\n\t\t\"vnd.ms-ims\": \"ims\",\n\t\t\"vnd.ms-lrm\": \"lrm\",\n\t\t\"vnd.ms-officetheme\": \"thmx\",\n\t\t\"vnd.ms-powerpoint.addin.macroenabled.12\": \"ppam\",\n\t\t\"vnd.ms-powerpoint.presentation.macroenabled.12\": \"pptm\",\n\t\t\"vnd.ms-powerpoint.slide.macroenabled.12\": \"sldm\",\n\t\t\"vnd.ms-powerpoint.slideshow.macroenabled.12\": \"ppsm\",\n\t\t\"vnd.ms-powerpoint.template.macroenabled.12\": \"potm\",\n\t\t\"vnd.ms-project\": [\"mpp\", \"mpt\"],\n\t\t\"vnd.ms-word.document.macroenabled.12\": \"docm\",\n\t\t\"vnd.ms-word.template.macroenabled.12\": \"dotm\",\n\t\t\"vnd.ms-works\": [\"wps\", \"wks\", \"wcm\", \"wdb\"],\n\t\t\"vnd.ms-wpl\": \"wpl\",\n\t\t\"vnd.ms-xpsdocument\": \"xps\",\n\t\t\"vnd.mseq\": \"mseq\",\n\t\t\"vnd.musician\": \"mus\",\n\t\t\"vnd.muvee.style\": \"msty\",\n\t\t\"vnd.mynfc\": \"taglet\",\n\t\t\"vnd.neurolanguage.nlu\": \"nlu\",\n\t\t\"vnd.nitf\": [\"ntf\", \"nitf\"],\n\t\t\"vnd.noblenet-directory\": \"nnd\",\n\t\t\"vnd.noblenet-sealer\": \"nns\",\n\t\t\"vnd.noblenet-web\": \"nnw\",\n\t\t\"vnd.nokia.n-gage.data\": \"ngdat\",\n\t\t\"vnd.nokia.n-gage.symbian.install\": \"n-gage\",\n\t\t\"vnd.nokia.radio-preset\": \"rpst\",\n\t\t\"vnd.nokia.radio-presets\": \"rpss\",\n\t\t\"vnd.novadigm.edm\": \"edm\",\n\t\t\"vnd.novadigm.edx\": \"edx\",\n\t\t\"vnd.novadigm.ext\": \"ext\",\n\t\t\"vnd.oasis.opendocument.chart-template\": \"otc\",\n\t\t\"vnd.oasis.opendocument.formula-template\": \"odft\",\n\t\t\"vnd.oasis.opendocument.image-template\": \"oti\",\n\t\t\"vnd.olpc-sugar\": \"xo\",\n\t\t\"vnd.oma.dd2+xml\": \"dd2\",\n\t\t\"vnd.openofficeorg.extension\": \"oxt\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.slide\": \"sldx\",\n\t\t\"vnd.osgeo.mapguide.package\": \"mgp\",\n\t\t\"vnd.osgi.dp\": \"dp\",\n\t\t\"vnd.osgi.subsystem\": \"esa\",\n\t\t\"vnd.palm\": [\"pdb\", \"pqa\", \"oprc\"],\n\t\t\"vnd.pawaafile\": \"paw\",\n\t\t\"vnd.pg.format\": \"str\",\n\t\t\"vnd.pg.osasli\": \"ei6\",\n\t\t\"vnd.picsel\": \"efif\",\n\t\t\"vnd.pmi.widget\": \"wg\",\n\t\t\"vnd.pocketlearn\": \"plf\",\n\t\t\"vnd.powerbuilder6\": \"pbd\",\n\t\t\"vnd.previewsystems.box\": \"box\",\n\t\t\"vnd.proteus.magazine\": \"mgz\",\n\t\t\"vnd.publishare-delta-tree\": \"qps\",\n\t\t\"vnd.pvi.ptid1\": \"ptid\",\n\t\t\"vnd.quark.quarkxpress\": [\"qxd\", \"qxt\", \"qwd\", \"qwt\", \"qxl\", \"qxb\"],\n\t\t\"vnd.realvnc.bed\": \"bed\",\n\t\t\"vnd.recordare.musicxml\": \"mxl\",\n\t\t\"vnd.recordare.musicxml+xml\": \"musicxml\",\n\t\t\"vnd.rig.cryptonote\": \"cryptonote\",\n\t\t\"vnd.rn-realmedia\": \"rm\",\n\t\t\"vnd.rn-realmedia-vbr\": \"rmvb\",\n\t\t\"vnd.route66.link66+xml\": \"link66\",\n\t\t\"vnd.sailingtracker.track\": \"st\",\n\t\t\"vnd.seemail\": \"see\",\n\t\t\"vnd.sema\": \"sema\",\n\t\t\"vnd.semd\": \"semd\",\n\t\t\"vnd.semf\": \"semf\",\n\t\t\"vnd.shana.informed.formdata\": \"ifm\",\n\t\t\"vnd.shana.informed.formtemplate\": \"itp\",\n\t\t\"vnd.shana.informed.interchange\": \"iif\",\n\t\t\"vnd.shana.informed.package\": \"ipk\",\n\t\t\"vnd.simtech-mindmapper\": [\"twd\", \"twds\"],\n\t\t\"vnd.smart.teacher\": \"teacher\",\n\t\t\"vnd.solent.sdkm+xml\": [\"sdkm\", \"sdkd\"],\n\t\t\"vnd.spotfire.dxp\": \"dxp\",\n\t\t\"vnd.spotfire.sfs\": \"sfs\",\n\t\t\"vnd.stepmania.package\": \"smzip\",\n\t\t\"vnd.stepmania.stepchart\": \"sm\",\n\t\t\"vnd.sus-calendar\": [\"sus\", \"susp\"],\n\t\t\"vnd.svd\": \"svd\",\n\t\t\"vnd.syncml+xml\": \"xsm\",\n\t\t\"vnd.syncml.dm+wbxml\": \"bdm\",\n\t\t\"vnd.syncml.dm+xml\": \"xdm\",\n\t\t\"vnd.tao.intent-module-archive\": \"tao\",\n\t\t\"vnd.tcpdump.pcap\": [\"pcap\", \"cap\", \"dmp\"],\n\t\t\"vnd.tmobile-livetv\": \"tmo\",\n\t\t\"vnd.trid.tpt\": \"tpt\",\n\t\t\"vnd.triscape.mxs\": \"mxs\",\n\t\t\"vnd.trueapp\": \"tra\",\n\t\t\"vnd.ufdl\": [\"ufd\", \"ufdl\"],\n\t\t\"vnd.uiq.theme\": \"utz\",\n\t\t\"vnd.umajin\": \"umj\",\n\t\t\"vnd.unity\": \"unityweb\",\n\t\t\"vnd.uoml+xml\": \"uoml\",\n\t\t\"vnd.vcx\": \"vcx\",\n\t\t\"vnd.visionary\": \"vis\",\n\t\t\"vnd.vsf\": \"vsf\",\n\t\t\"vnd.webturbo\": \"wtb\",\n\t\t\"vnd.wolfram.player\": \"nbp\",\n\t\t\"vnd.wqd\": \"wqd\",\n\t\t\"vnd.wt.stf\": \"stf\",\n\t\t\"vnd.xara\": \"xar\",\n\t\t\"vnd.xfdl\": \"xfdl\",\n\t\t\"vnd.yamaha.hv-dic\": \"hvd\",\n\t\t\"vnd.yamaha.hv-script\": \"hvs\",\n\t\t\"vnd.yamaha.hv-voice\": \"hvp\",\n\t\t\"vnd.yamaha.openscoreformat\": \"osf\",\n\t\t\"vnd.yamaha.openscoreformat.osfpvg+xml\": \"osfpvg\",\n\t\t\"vnd.yamaha.smaf-audio\": \"saf\",\n\t\t\"vnd.yamaha.smaf-phrase\": \"spf\",\n\t\t\"vnd.yellowriver-custom-menu\": \"cmp\",\n\t\t\"vnd.zul\": [\"zir\", \"zirz\"],\n\t\t\"vnd.zzazz.deck+xml\": \"zaz\",\n\t\t\"voicexml+xml\": \"vxml\",\n\t\t\"widget\": \"wgt\",\n\t\t\"winhlp\": \"hlp\",\n\t\t\"wsdl+xml\": \"wsdl\",\n\t\t\"wspolicy+xml\": \"wspolicy\",\n\t\t\"x-ace-compressed\": \"ace\",\n\t\t\"x-authorware-bin\": [\"aab\", \"x32\", \"u32\", \"vox\"],\n\t\t\"x-authorware-map\": \"aam\",\n\t\t\"x-authorware-seg\": \"aas\",\n\t\t\"x-blorb\": [\"blb\", \"blorb\"],\n\t\t\"x-bzip\": \"bz\",\n\t\t\"x-bzip2\": [\"bz2\", \"boz\"],\n\t\t\"x-cfs-compressed\": \"cfs\",\n\t\t\"x-chat\": \"chat\",\n\t\t\"x-conference\": \"nsc\",\n\t\t\"x-dgc-compressed\": \"dgc\",\n\t\t\"x-dtbncx+xml\": \"ncx\",\n\t\t\"x-dtbook+xml\": \"dtb\",\n\t\t\"x-dtbresource+xml\": \"res\",\n\t\t\"x-eva\": \"eva\",\n\t\t\"x-font-bdf\": \"bdf\",\n\t\t\"x-font-ghostscript\": \"gsf\",\n\t\t\"x-font-linux-psf\": \"psf\",\n\t\t\"x-font-otf\": \"otf\",\n\t\t\"x-font-pcf\": \"pcf\",\n\t\t\"x-font-snf\": \"snf\",\n\t\t\"x-font-ttf\": [\"ttf\", \"ttc\"],\n\t\t\"x-font-type1\": [\"pfa\", \"pfb\", \"pfm\", \"afm\"],\n\t\t\"x-font-woff\": \"woff\",\n\t\t\"x-freearc\": \"arc\",\n\t\t\"x-gca-compressed\": \"gca\",\n\t\t\"x-glulx\": \"ulx\",\n\t\t\"x-gramps-xml\": \"gramps\",\n\t\t\"x-install-instructions\": \"install\",\n\t\t\"x-lzh-compressed\": [\"lzh\", \"lha\"],\n\t\t\"x-mie\": \"mie\",\n\t\t\"x-mobipocket-ebook\": [\"prc\", \"mobi\"],\n\t\t\"x-ms-application\": \"application\",\n\t\t\"x-ms-shortcut\": \"lnk\",\n\t\t\"x-ms-xbap\": \"xbap\",\n\t\t\"x-msbinder\": \"obd\",\n\t\t\"x-mscardfile\": \"crd\",\n\t\t\"x-msclip\": \"clp\",\n\t\t\"x-msdownload\": [\"exe\", \"dll\", \"com\", \"bat\", \"msi\"],\n\t\t\"x-msmediaview\": [\"mvb\", \"m13\", \"m14\"],\n\t\t\"x-msmetafile\": [\"wmf\", \"wmz\", \"emf\", \"emz\"],\n\t\t\"x-msmoney\": \"mny\",\n\t\t\"x-mspublisher\": \"pub\",\n\t\t\"x-msschedule\": \"scd\",\n\t\t\"x-msterminal\": \"trm\",\n\t\t\"x-mswrite\": \"wri\",\n\t\t\"x-nzb\": \"nzb\",\n\t\t\"x-pkcs12\": [\"p12\", \"pfx\"],\n\t\t\"x-pkcs7-certificates\": [\"p7b\", \"spc\"],\n\t\t\"x-research-info-systems\": \"ris\",\n\t\t\"x-silverlight-app\": \"xap\",\n\t\t\"x-sql\": \"sql\",\n\t\t\"x-stuffitx\": \"sitx\",\n\t\t\"x-subrip\": \"srt\",\n\t\t\"x-t3vm-image\": \"t3\",\n\t\t\"x-tads\": \"gam\",\n\t\t\"x-tex\": \"tex\",\n\t\t\"x-tex-tfm\": \"tfm\",\n\t\t\"x-tgif\": \"obj\",\n\t\t\"x-xliff+xml\": \"xlf\",\n\t\t\"x-xz\": \"xz\",\n\t\t\"x-zmachine\": [\"z1\", \"z2\", \"z3\", \"z4\", \"z5\", \"z6\", \"z7\", \"z8\"],\n\t\t\"xaml+xml\": \"xaml\",\n\t\t\"xcap-diff+xml\": \"xdf\",\n\t\t\"xenc+xml\": \"xenc\",\n\t\t\"xml-dtd\": \"dtd\",\n\t\t\"xop+xml\": \"xop\",\n\t\t\"xproc+xml\": \"xpl\",\n\t\t\"xslt+xml\": \"xslt\",\n\t\t\"xv+xml\": [\"mxml\", \"xhvml\", \"xvml\", \"xvm\"],\n\t\t\"yang\": \"yang\",\n\t\t\"yin+xml\": \"yin\",\n\t\t\"envoy\": \"evy\",\n\t\t\"fractals\": \"fif\",\n\t\t\"internet-property-stream\": \"acx\",\n\t\t\"olescript\": \"axs\",\n\t\t\"vnd.ms-outlook\": \"msg\",\n\t\t\"vnd.ms-pkicertstore\": \"sst\",\n\t\t\"x-compress\": \"z\",\n\t\t\"x-compressed\": \"tgz\",\n\t\t\"x-gzip\": \"gz\",\n\t\t\"x-perfmon\": [\"pma\", \"pmc\", \"pml\", \"pmr\", \"pmw\"],\n\t\t\"x-pkcs7-mime\": [\"p7c\", \"p7m\"],\n\t\t\"ynd.ms-pkipko\": \"pko\"\n\t},\n\t\"audio\": {\n\t\t\"amr\": \"amr\",\n\t\t\"amr-wb\": \"awb\",\n\t\t\"annodex\": \"axa\",\n\t\t\"basic\": [\"au\", \"snd\"],\n\t\t\"flac\": \"flac\",\n\t\t\"midi\": [\"mid\", \"midi\", \"kar\", \"rmi\"],\n\t\t\"mpeg\": [\"mpga\", \"mpega\", \"mp2\", \"mp3\", \"m4a\", \"mp2a\", \"m2a\", \"m3a\"],\n\t\t\"mpegurl\": \"m3u\",\n\t\t\"ogg\": [\"oga\", \"ogg\", \"spx\"],\n\t\t\"prs.sid\": \"sid\",\n\t\t\"x-aiff\": [\"aif\", \"aiff\", \"aifc\"],\n\t\t\"x-gsm\": \"gsm\",\n\t\t\"x-ms-wma\": \"wma\",\n\t\t\"x-ms-wax\": \"wax\",\n\t\t\"x-pn-realaudio\": \"ram\",\n\t\t\"x-realaudio\": \"ra\",\n\t\t\"x-sd2\": \"sd2\",\n\t\t\"x-wav\": \"wav\",\n\t\t\"adpcm\": \"adp\",\n\t\t\"mp4\": \"mp4a\",\n\t\t\"s3m\": \"s3m\",\n\t\t\"silk\": \"sil\",\n\t\t\"vnd.dece.audio\": [\"uva\", \"uvva\"],\n\t\t\"vnd.digital-winds\": \"eol\",\n\t\t\"vnd.dra\": \"dra\",\n\t\t\"vnd.dts\": \"dts\",\n\t\t\"vnd.dts.hd\": \"dtshd\",\n\t\t\"vnd.lucent.voice\": \"lvp\",\n\t\t\"vnd.ms-playready.media.pya\": \"pya\",\n\t\t\"vnd.nuera.ecelp4800\": \"ecelp4800\",\n\t\t\"vnd.nuera.ecelp7470\": \"ecelp7470\",\n\t\t\"vnd.nuera.ecelp9600\": \"ecelp9600\",\n\t\t\"vnd.rip\": \"rip\",\n\t\t\"webm\": \"weba\",\n\t\t\"x-aac\": \"aac\",\n\t\t\"x-caf\": \"caf\",\n\t\t\"x-matroska\": \"mka\",\n\t\t\"x-pn-realaudio-plugin\": \"rmp\",\n\t\t\"xm\": \"xm\",\n\t\t\"mid\": [\"mid\", \"rmi\"]\n\t},\n\t\"chemical\": {\n\t\t\"x-alchemy\": \"alc\",\n\t\t\"x-cache\": [\"cac\", \"cache\"],\n\t\t\"x-cache-csf\": \"csf\",\n\t\t\"x-cactvs-binary\": [\"cbin\", \"cascii\", \"ctab\"],\n\t\t\"x-cdx\": \"cdx\",\n\t\t\"x-chem3d\": \"c3d\",\n\t\t\"x-cif\": \"cif\",\n\t\t\"x-cmdf\": \"cmdf\",\n\t\t\"x-cml\": \"cml\",\n\t\t\"x-compass\": \"cpa\",\n\t\t\"x-crossfire\": \"bsd\",\n\t\t\"x-csml\": [\"csml\", \"csm\"],\n\t\t\"x-ctx\": \"ctx\",\n\t\t\"x-cxf\": [\"cxf\", \"cef\"],\n\t\t\"x-embl-dl-nucleotide\": [\"emb\", \"embl\"],\n\t\t\"x-gamess-input\": [\"inp\", \"gam\", \"gamin\"],\n\t\t\"x-gaussian-checkpoint\": [\"fch\", \"fchk\"],\n\t\t\"x-gaussian-cube\": \"cub\",\n\t\t\"x-gaussian-input\": [\"gau\", \"gjc\", \"gjf\"],\n\t\t\"x-gaussian-log\": \"gal\",\n\t\t\"x-gcg8-sequence\": \"gcg\",\n\t\t\"x-genbank\": \"gen\",\n\t\t\"x-hin\": \"hin\",\n\t\t\"x-isostar\": [\"istr\", \"ist\"],\n\t\t\"x-jcamp-dx\": [\"jdx\", \"dx\"],\n\t\t\"x-kinemage\": \"kin\",\n\t\t\"x-macmolecule\": \"mcm\",\n\t\t\"x-macromodel-input\": [\"mmd\", \"mmod\"],\n\t\t\"x-mdl-molfile\": \"mol\",\n\t\t\"x-mdl-rdfile\": \"rd\",\n\t\t\"x-mdl-rxnfile\": \"rxn\",\n\t\t\"x-mdl-sdfile\": [\"sd\", \"sdf\"],\n\t\t\"x-mdl-tgf\": \"tgf\",\n\t\t\"x-mmcif\": \"mcif\",\n\t\t\"x-mol2\": \"mol2\",\n\t\t\"x-molconn-Z\": \"b\",\n\t\t\"x-mopac-graph\": \"gpt\",\n\t\t\"x-mopac-input\": [\"mop\", \"mopcrt\", \"mpc\", \"zmt\"],\n\t\t\"x-mopac-out\": \"moo\",\n\t\t\"x-ncbi-asn1\": \"asn\",\n\t\t\"x-ncbi-asn1-ascii\": [\"prt\", \"ent\"],\n\t\t\"x-ncbi-asn1-binary\": [\"val\", \"aso\"],\n\t\t\"x-pdb\": [\"pdb\", \"ent\"],\n\t\t\"x-rosdal\": \"ros\",\n\t\t\"x-swissprot\": \"sw\",\n\t\t\"x-vamas-iso14976\": \"vms\",\n\t\t\"x-vmd\": \"vmd\",\n\t\t\"x-xtel\": \"xtel\",\n\t\t\"x-xyz\": \"xyz\"\n\t},\n\t\"image\": {\n\t\t\"gif\": \"gif\",\n\t\t\"ief\": \"ief\",\n\t\t\"jpeg\": [\"jpeg\", \"jpg\", \"jpe\"],\n\t\t\"pcx\": \"pcx\",\n\t\t\"png\": \"png\",\n\t\t\"svg+xml\": [\"svg\", \"svgz\"],\n\t\t\"tiff\": [\"tiff\", \"tif\"],\n\t\t\"vnd.djvu\": [\"djvu\", \"djv\"],\n\t\t\"vnd.wap.wbmp\": \"wbmp\",\n\t\t\"x-canon-cr2\": \"cr2\",\n\t\t\"x-canon-crw\": \"crw\",\n\t\t\"x-cmu-raster\": \"ras\",\n\t\t\"x-coreldraw\": \"cdr\",\n\t\t\"x-coreldrawpattern\": \"pat\",\n\t\t\"x-coreldrawtemplate\": \"cdt\",\n\t\t\"x-corelphotopaint\": \"cpt\",\n\t\t\"x-epson-erf\": \"erf\",\n\t\t\"x-icon\": \"ico\",\n\t\t\"x-jg\": \"art\",\n\t\t\"x-jng\": \"jng\",\n\t\t\"x-nikon-nef\": \"nef\",\n\t\t\"x-olympus-orf\": \"orf\",\n\t\t\"x-photoshop\": \"psd\",\n\t\t\"x-portable-anymap\": \"pnm\",\n\t\t\"x-portable-bitmap\": \"pbm\",\n\t\t\"x-portable-graymap\": \"pgm\",\n\t\t\"x-portable-pixmap\": \"ppm\",\n\t\t\"x-rgb\": \"rgb\",\n\t\t\"x-xbitmap\": \"xbm\",\n\t\t\"x-xpixmap\": \"xpm\",\n\t\t\"x-xwindowdump\": \"xwd\",\n\t\t\"bmp\": \"bmp\",\n\t\t\"cgm\": \"cgm\",\n\t\t\"g3fax\": \"g3\",\n\t\t\"ktx\": \"ktx\",\n\t\t\"prs.btif\": \"btif\",\n\t\t\"sgi\": \"sgi\",\n\t\t\"vnd.dece.graphic\": [\"uvi\", \"uvvi\", \"uvg\", \"uvvg\"],\n\t\t\"vnd.dwg\": \"dwg\",\n\t\t\"vnd.dxf\": \"dxf\",\n\t\t\"vnd.fastbidsheet\": \"fbs\",\n\t\t\"vnd.fpx\": \"fpx\",\n\t\t\"vnd.fst\": \"fst\",\n\t\t\"vnd.fujixerox.edmics-mmr\": \"mmr\",\n\t\t\"vnd.fujixerox.edmics-rlc\": \"rlc\",\n\t\t\"vnd.ms-modi\": \"mdi\",\n\t\t\"vnd.ms-photo\": \"wdp\",\n\t\t\"vnd.net-fpx\": \"npx\",\n\t\t\"vnd.xiff\": \"xif\",\n\t\t\"webp\": \"webp\",\n\t\t\"x-3ds\": \"3ds\",\n\t\t\"x-cmx\": \"cmx\",\n\t\t\"x-freehand\": [\"fh\", \"fhc\", \"fh4\", \"fh5\", \"fh7\"],\n\t\t\"x-pict\": [\"pic\", \"pct\"],\n\t\t\"x-tga\": \"tga\",\n\t\t\"cis-cod\": \"cod\",\n\t\t\"pipeg\": \"jfif\"\n\t},\n\t\"message\": {\n\t\t\"rfc822\": [\"eml\", \"mime\", \"mht\", \"mhtml\", \"nws\"]\n\t},\n\t\"model\": {\n\t\t\"iges\": [\"igs\", \"iges\"],\n\t\t\"mesh\": [\"msh\", \"mesh\", \"silo\"],\n\t\t\"vrml\": [\"wrl\", \"vrml\"],\n\t\t\"x3d+vrml\": [\"x3dv\", \"x3dvz\"],\n\t\t\"x3d+xml\": [\"x3d\", \"x3dz\"],\n\t\t\"x3d+binary\": [\"x3db\", \"x3dbz\"],\n\t\t\"vnd.collada+xml\": \"dae\",\n\t\t\"vnd.dwf\": \"dwf\",\n\t\t\"vnd.gdl\": \"gdl\",\n\t\t\"vnd.gtw\": \"gtw\",\n\t\t\"vnd.mts\": \"mts\",\n\t\t\"vnd.vtu\": \"vtu\"\n\t},\n\t\"text\": {\n\t\t\"cache-manifest\": [\"manifest\", \"appcache\"],\n\t\t\"calendar\": [\"ics\", \"icz\", \"ifb\"],\n\t\t\"css\": \"css\",\n\t\t\"csv\": \"csv\",\n\t\t\"h323\": \"323\",\n\t\t\"html\": [\"html\", \"htm\", \"shtml\", \"stm\"],\n\t\t\"iuls\": \"uls\",\n\t\t\"mathml\": \"mml\",\n\t\t\"plain\": [\"txt\", \"text\", \"brf\", \"conf\", \"def\", \"list\", \"log\", \"in\", \"bas\"],\n\t\t\"richtext\": \"rtx\",\n\t\t\"scriptlet\": [\"sct\", \"wsc\"],\n\t\t\"texmacs\": [\"tm\", \"ts\"],\n\t\t\"tab-separated-values\": \"tsv\",\n\t\t\"vnd.sun.j2me.app-descriptor\": \"jad\",\n\t\t\"vnd.wap.wml\": \"wml\",\n\t\t\"vnd.wap.wmlscript\": \"wmls\",\n\t\t\"x-bibtex\": \"bib\",\n\t\t\"x-boo\": \"boo\",\n\t\t\"x-c++hdr\": [\"h++\", \"hpp\", \"hxx\", \"hh\"],\n\t\t\"x-c++src\": [\"c++\", \"cpp\", \"cxx\", \"cc\"],\n\t\t\"x-component\": \"htc\",\n\t\t\"x-dsrc\": \"d\",\n\t\t\"x-diff\": [\"diff\", \"patch\"],\n\t\t\"x-haskell\": \"hs\",\n\t\t\"x-java\": \"java\",\n\t\t\"x-literate-haskell\": \"lhs\",\n\t\t\"x-moc\": \"moc\",\n\t\t\"x-pascal\": [\"p\", \"pas\"],\n\t\t\"x-pcs-gcd\": \"gcd\",\n\t\t\"x-perl\": [\"pl\", \"pm\"],\n\t\t\"x-python\": \"py\",\n\t\t\"x-scala\": \"scala\",\n\t\t\"x-setext\": \"etx\",\n\t\t\"x-tcl\": [\"tcl\", \"tk\"],\n\t\t\"x-tex\": [\"tex\", \"ltx\", \"sty\", \"cls\"],\n\t\t\"x-vcalendar\": \"vcs\",\n\t\t\"x-vcard\": \"vcf\",\n\t\t\"n3\": \"n3\",\n\t\t\"prs.lines.tag\": \"dsc\",\n\t\t\"sgml\": [\"sgml\", \"sgm\"],\n\t\t\"troff\": [\"t\", \"tr\", \"roff\", \"man\", \"me\", \"ms\"],\n\t\t\"turtle\": \"ttl\",\n\t\t\"uri-list\": [\"uri\", \"uris\", \"urls\"],\n\t\t\"vcard\": \"vcard\",\n\t\t\"vnd.curl\": \"curl\",\n\t\t\"vnd.curl.dcurl\": \"dcurl\",\n\t\t\"vnd.curl.scurl\": \"scurl\",\n\t\t\"vnd.curl.mcurl\": \"mcurl\",\n\t\t\"vnd.dvb.subtitle\": \"sub\",\n\t\t\"vnd.fly\": \"fly\",\n\t\t\"vnd.fmi.flexstor\": \"flx\",\n\t\t\"vnd.graphviz\": \"gv\",\n\t\t\"vnd.in3d.3dml\": \"3dml\",\n\t\t\"vnd.in3d.spot\": \"spot\",\n\t\t\"x-asm\": [\"s\", \"asm\"],\n\t\t\"x-c\": [\"c\", \"cc\", \"cxx\", \"cpp\", \"h\", \"hh\", \"dic\"],\n\t\t\"x-fortran\": [\"f\", \"for\", \"f77\", \"f90\"],\n\t\t\"x-opml\": \"opml\",\n\t\t\"x-nfo\": \"nfo\",\n\t\t\"x-sfv\": \"sfv\",\n\t\t\"x-uuencode\": \"uu\",\n\t\t\"webviewhtml\": \"htt\"\n\t},\n\t\"video\": {\n\t\t\"avif\": \".avif\",\n\t\t\"3gpp\": \"3gp\",\n\t\t\"annodex\": \"axv\",\n\t\t\"dl\": \"dl\",\n\t\t\"dv\": [\"dif\", \"dv\"],\n\t\t\"fli\": \"fli\",\n\t\t\"gl\": \"gl\",\n\t\t\"mpeg\": [\"mpeg\", \"mpg\", \"mpe\", \"m1v\", \"m2v\", \"mp2\", \"mpa\", \"mpv2\"],\n\t\t\"mp4\": [\"mp4\", \"mp4v\", \"mpg4\"],\n\t\t\"quicktime\": [\"qt\", \"mov\"],\n\t\t\"ogg\": \"ogv\",\n\t\t\"vnd.mpegurl\": [\"mxu\", \"m4u\"],\n\t\t\"x-flv\": \"flv\",\n\t\t\"x-la-asf\": [\"lsf\", \"lsx\"],\n\t\t\"x-mng\": \"mng\",\n\t\t\"x-ms-asf\": [\"asf\", \"asx\", \"asr\"],\n\t\t\"x-ms-wm\": \"wm\",\n\t\t\"x-ms-wmv\": \"wmv\",\n\t\t\"x-ms-wmx\": \"wmx\",\n\t\t\"x-ms-wvx\": \"wvx\",\n\t\t\"x-msvideo\": \"avi\",\n\t\t\"x-sgi-movie\": \"movie\",\n\t\t\"x-matroska\": [\"mpv\", \"mkv\", \"mk3d\", \"mks\"],\n\t\t\"3gpp2\": \"3g2\",\n\t\t\"h261\": \"h261\",\n\t\t\"h263\": \"h263\",\n\t\t\"h264\": \"h264\",\n\t\t\"jpeg\": \"jpgv\",\n\t\t\"jpm\": [\"jpm\", \"jpgm\"],\n\t\t\"mj2\": [\"mj2\", \"mjp2\"],\n\t\t\"vnd.dece.hd\": [\"uvh\", \"uvvh\"],\n\t\t\"vnd.dece.mobile\": [\"uvm\", \"uvvm\"],\n\t\t\"vnd.dece.pd\": [\"uvp\", \"uvvp\"],\n\t\t\"vnd.dece.sd\": [\"uvs\", \"uvvs\"],\n\t\t\"vnd.dece.video\": [\"uvv\", \"uvvv\"],\n\t\t\"vnd.dvb.file\": \"dvb\",\n\t\t\"vnd.fvt\": \"fvt\",\n\t\t\"vnd.ms-playready.media.pyv\": \"pyv\",\n\t\t\"vnd.uvvu.mp4\": [\"uvu\", \"uvvu\"],\n\t\t\"vnd.vivo\": \"viv\",\n\t\t\"webm\": \"webm\",\n\t\t\"x-f4v\": \"f4v\",\n\t\t\"x-m4v\": \"m4v\",\n\t\t\"x-ms-vob\": \"vob\",\n\t\t\"x-smv\": \"smv\"\n\t},\n\t\"x-conference\": {\n\t\t\"x-cooltalk\": \"ice\"\n\t},\n\t\"x-world\": {\n\t\t\"x-vrml\": [\"vrm\", \"vrml\", \"wrl\", \"flr\", \"wrz\", \"xaf\", \"xof\"]\n\t}\n};\n\nconst mimeTypes = (() => {\n\tconst mimeTypes = {};\n\tfor (const type in table) {\n\t\t// eslint-disable-next-line no-prototype-builtins\n\t\tif (table.hasOwnProperty(type)) {\n\t\t\tfor (const subtype in table[type]) {\n\t\t\t\t// eslint-disable-next-line no-prototype-builtins\n\t\t\t\tif (table[type].hasOwnProperty(subtype)) {\n\t\t\t\t\tconst value = table[type][subtype];\n\t\t\t\t\tif (typeof value == \"string\") {\n\t\t\t\t\t\tmimeTypes[value] = type + \"/\" + subtype;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfor (let indexMimeType = 0; indexMimeType < value.length; indexMimeType++) {\n\t\t\t\t\t\t\tmimeTypes[value[indexMimeType]] = type + \"/\" + subtype;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn mimeTypes;\n})();\n\nexport {\n\tmimeTypes,\n\tgetMimeType\n};\n\nfunction getMimeType(filename) {\n\treturn filename && mimeTypes[filename.split(\".\").pop().toLowerCase()] || getDefaultMimeType();\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nconst table = [];\nfor (let i = 0; i < 256; i++) {\n\tlet t = i;\n\tfor (let j = 0; j < 8; j++) {\n\t\tif (t & 1) {\n\t\t\tt = (t >>> 1) ^ 0xEDB88320;\n\t\t} else {\n\t\t\tt = t >>> 1;\n\t\t}\n\t}\n\ttable[i] = t;\n}\n\nclass Crc32 {\n\n\tconstructor(crc) {\n\t\tthis.crc = crc || -1;\n\t}\n\n\tappend(data) {\n\t\tlet crc = this.crc | 0;\n\t\tfor (let offset = 0, length = data.length | 0; offset < length; offset++) {\n\t\t\tcrc = (crc >>> 8) ^ table[(crc ^ data[offset]) & 0xFF];\n\t\t}\n\t\tthis.crc = crc;\n\t}\n\n\tget() {\n\t\treturn ~this.crc;\n\t}\n}\n\nexport {\n\tCrc32\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n\nimport { Crc32 } from \"./codecs/crc32.js\";\n\nclass Crc32Stream extends TransformStream {\n\n\tconstructor() {\n\t\tconst crc32 = new Crc32();\n\t\tsuper({\n\t\t\ttransform(chunk) {\n\t\t\t\tcrc32.append(chunk);\n\t\t\t},\n\t\t\tflush(controller) {\n\t\t\t\tconst value = new Uint8Array(4);\n\t\t\t\tconst dataView = new DataView(value.buffer);\n\t\t\t\tdataView.setUint32(0, crc32.get());\n\t\t\t\tcontroller.enqueue(value);\n\t\t\t}\n\t\t});\n\t}\n}\n\nexport {\n\tCrc32Stream\n};","// Derived from https://github.com/xqdoo00o/jszip/blob/master/lib/sjcl.js and https://github.com/bitwiseshiftleft/sjcl\n\n// deno-lint-ignore-file no-this-alias\n\n/*\n * SJCL is open. You can use, modify and redistribute it under a BSD\n * license or under the GNU GPL, version 2.0.\n */\n\n/** @fileOverview Javascript cryptography implementation.\n *\n * Crush to remove comments, shorten variable names and\n * generally reduce transmission size.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/*jslint indent: 2, bitwise: false, nomen: false, plusplus: false, white: false, regexp: false */\n\n/** @fileOverview Arrays of bits, encoded as arrays of Numbers.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/**\n * Arrays of bits, encoded as arrays of Numbers.\n * @namespace\n * @description\n *

\n * These objects are the currency accepted by SJCL's crypto functions.\n *

\n *\n *

\n * Most of our crypto primitives operate on arrays of 4-byte words internally,\n * but many of them can take arguments that are not a multiple of 4 bytes.\n * This library encodes arrays of bits (whose size need not be a multiple of 8\n * bits) as arrays of 32-bit words. The bits are packed, big-endian, into an\n * array of words, 32 bits at a time. Since the words are double-precision\n * floating point numbers, they fit some extra data. We use this (in a private,\n * possibly-changing manner) to encode the number of bits actually present\n * in the last word of the array.\n *

\n *\n *

\n * Because bitwise ops clear this out-of-band data, these arrays can be passed\n * to ciphers like AES which want arrays of words.\n *

\n */\nconst bitArray = {\n\t/**\n\t * Concatenate two bit arrays.\n\t * @param {bitArray} a1 The first array.\n\t * @param {bitArray} a2 The second array.\n\t * @return {bitArray} The concatenation of a1 and a2.\n\t */\n\tconcat(a1, a2) {\n\t\tif (a1.length === 0 || a2.length === 0) {\n\t\t\treturn a1.concat(a2);\n\t\t}\n\n\t\tconst last = a1[a1.length - 1], shift = bitArray.getPartial(last);\n\t\tif (shift === 32) {\n\t\t\treturn a1.concat(a2);\n\t\t} else {\n\t\t\treturn bitArray._shiftRight(a2, shift, last | 0, a1.slice(0, a1.length - 1));\n\t\t}\n\t},\n\n\t/**\n\t * Find the length of an array of bits.\n\t * @param {bitArray} a The array.\n\t * @return {Number} The length of a, in bits.\n\t */\n\tbitLength(a) {\n\t\tconst l = a.length;\n\t\tif (l === 0) {\n\t\t\treturn 0;\n\t\t}\n\t\tconst x = a[l - 1];\n\t\treturn (l - 1) * 32 + bitArray.getPartial(x);\n\t},\n\n\t/**\n\t * Truncate an array.\n\t * @param {bitArray} a The array.\n\t * @param {Number} len The length to truncate to, in bits.\n\t * @return {bitArray} A new array, truncated to len bits.\n\t */\n\tclamp(a, len) {\n\t\tif (a.length * 32 < len) {\n\t\t\treturn a;\n\t\t}\n\t\ta = a.slice(0, Math.ceil(len / 32));\n\t\tconst l = a.length;\n\t\tlen = len & 31;\n\t\tif (l > 0 && len) {\n\t\t\ta[l - 1] = bitArray.partial(len, a[l - 1] & 0x80000000 >> (len - 1), 1);\n\t\t}\n\t\treturn a;\n\t},\n\n\t/**\n\t * Make a partial word for a bit array.\n\t * @param {Number} len The number of bits in the word.\n\t * @param {Number} x The bits.\n\t * @param {Number} [_end=0] Pass 1 if x has already been shifted to the high side.\n\t * @return {Number} The partial word.\n\t */\n\tpartial(len, x, _end) {\n\t\tif (len === 32) {\n\t\t\treturn x;\n\t\t}\n\t\treturn (_end ? x | 0 : x << (32 - len)) + len * 0x10000000000;\n\t},\n\n\t/**\n\t * Get the number of bits used by a partial word.\n\t * @param {Number} x The partial word.\n\t * @return {Number} The number of bits used by the partial word.\n\t */\n\tgetPartial(x) {\n\t\treturn Math.round(x / 0x10000000000) || 32;\n\t},\n\n\t/** Shift an array right.\n\t * @param {bitArray} a The array to shift.\n\t * @param {Number} shift The number of bits to shift.\n\t * @param {Number} [carry=0] A byte to carry in\n\t * @param {bitArray} [out=[]] An array to prepend to the output.\n\t * @private\n\t */\n\t_shiftRight(a, shift, carry, out) {\n\t\tif (out === undefined) {\n\t\t\tout = [];\n\t\t}\n\n\t\tfor (; shift >= 32; shift -= 32) {\n\t\t\tout.push(carry);\n\t\t\tcarry = 0;\n\t\t}\n\t\tif (shift === 0) {\n\t\t\treturn out.concat(a);\n\t\t}\n\n\t\tfor (let i = 0; i < a.length; i++) {\n\t\t\tout.push(carry | a[i] >>> shift);\n\t\t\tcarry = a[i] << (32 - shift);\n\t\t}\n\t\tconst last2 = a.length ? a[a.length - 1] : 0;\n\t\tconst shift2 = bitArray.getPartial(last2);\n\t\tout.push(bitArray.partial(shift + shift2 & 31, (shift + shift2 > 32) ? carry : out.pop(), 1));\n\t\treturn out;\n\t}\n};\n\n/** @fileOverview Bit array codec implementations.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/**\n * Arrays of bytes\n * @namespace\n */\nconst codec = {\n\tbytes: {\n\t\t/** Convert from a bitArray to an array of bytes. */\n\t\tfromBits(arr) {\n\t\t\tconst bl = bitArray.bitLength(arr);\n\t\t\tconst byteLength = bl / 8;\n\t\t\tconst out = new Uint8Array(byteLength);\n\t\t\tlet tmp;\n\t\t\tfor (let i = 0; i < byteLength; i++) {\n\t\t\t\tif ((i & 3) === 0) {\n\t\t\t\t\ttmp = arr[i / 4];\n\t\t\t\t}\n\t\t\t\tout[i] = tmp >>> 24;\n\t\t\t\ttmp <<= 8;\n\t\t\t}\n\t\t\treturn out;\n\t\t},\n\t\t/** Convert from an array of bytes to a bitArray. */\n\t\ttoBits(bytes) {\n\t\t\tconst out = [];\n\t\t\tlet i;\n\t\t\tlet tmp = 0;\n\t\t\tfor (i = 0; i < bytes.length; i++) {\n\t\t\t\ttmp = tmp << 8 | bytes[i];\n\t\t\t\tif ((i & 3) === 3) {\n\t\t\t\t\tout.push(tmp);\n\t\t\t\t\ttmp = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (i & 3) {\n\t\t\t\tout.push(bitArray.partial(8 * (i & 3), tmp));\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t}\n};\n\nconst hash = {};\n\n/**\n * Context for a SHA-1 operation in progress.\n * @constructor\n */\nhash.sha1 = class {\n\tconstructor(hash) {\n\t\tconst sha1 = this;\n\t\t/**\n\t\t * The hash's block size, in bits.\n\t\t * @constant\n\t\t */\n\t\tsha1.blockSize = 512;\n\t\t/**\n\t\t * The SHA-1 initialization vector.\n\t\t * @private\n\t\t */\n\t\tsha1._init = [0x67452301, 0xEFCDAB89, 0x98BADCFE, 0x10325476, 0xC3D2E1F0];\n\t\t/**\n\t\t * The SHA-1 hash key.\n\t\t * @private\n\t\t */\n\t\tsha1._key = [0x5A827999, 0x6ED9EBA1, 0x8F1BBCDC, 0xCA62C1D6];\n\t\tif (hash) {\n\t\t\tsha1._h = hash._h.slice(0);\n\t\t\tsha1._buffer = hash._buffer.slice(0);\n\t\t\tsha1._length = hash._length;\n\t\t} else {\n\t\t\tsha1.reset();\n\t\t}\n\t}\n\n\t/**\n\t * Reset the hash state.\n\t * @return this\n\t */\n\treset() {\n\t\tconst sha1 = this;\n\t\tsha1._h = sha1._init.slice(0);\n\t\tsha1._buffer = [];\n\t\tsha1._length = 0;\n\t\treturn sha1;\n\t}\n\n\t/**\n\t * Input several words to the hash.\n\t * @param {bitArray|String} data the data to hash.\n\t * @return this\n\t */\n\tupdate(data) {\n\t\tconst sha1 = this;\n\t\tif (typeof data === \"string\") {\n\t\t\tdata = codec.utf8String.toBits(data);\n\t\t}\n\t\tconst b = sha1._buffer = bitArray.concat(sha1._buffer, data);\n\t\tconst ol = sha1._length;\n\t\tconst nl = sha1._length = ol + bitArray.bitLength(data);\n\t\tif (nl > 9007199254740991) {\n\t\t\tthrow new Error(\"Cannot hash more than 2^53 - 1 bits\");\n\t\t}\n\t\tconst c = new Uint32Array(b);\n\t\tlet j = 0;\n\t\tfor (let i = sha1.blockSize + ol - ((sha1.blockSize + ol) & (sha1.blockSize - 1)); i <= nl;\n\t\t\ti += sha1.blockSize) {\n\t\t\tsha1._block(c.subarray(16 * j, 16 * (j + 1)));\n\t\t\tj += 1;\n\t\t}\n\t\tb.splice(0, 16 * j);\n\t\treturn sha1;\n\t}\n\n\t/**\n\t * Complete hashing and output the hash value.\n\t * @return {bitArray} The hash value, an array of 5 big-endian words. TODO\n\t */\n\tfinalize() {\n\t\tconst sha1 = this;\n\t\tlet b = sha1._buffer;\n\t\tconst h = sha1._h;\n\n\t\t// Round out and push the buffer\n\t\tb = bitArray.concat(b, [bitArray.partial(1, 1)]);\n\t\t// Round out the buffer to a multiple of 16 words, less the 2 length words.\n\t\tfor (let i = b.length + 2; i & 15; i++) {\n\t\t\tb.push(0);\n\t\t}\n\n\t\t// append the length\n\t\tb.push(Math.floor(sha1._length / 0x100000000));\n\t\tb.push(sha1._length | 0);\n\n\t\twhile (b.length) {\n\t\t\tsha1._block(b.splice(0, 16));\n\t\t}\n\n\t\tsha1.reset();\n\t\treturn h;\n\t}\n\n\t/**\n\t * The SHA-1 logical functions f(0), f(1), ..., f(79).\n\t * @private\n\t */\n\t_f(t, b, c, d) {\n\t\tif (t <= 19) {\n\t\t\treturn (b & c) | (~b & d);\n\t\t} else if (t <= 39) {\n\t\t\treturn b ^ c ^ d;\n\t\t} else if (t <= 59) {\n\t\t\treturn (b & c) | (b & d) | (c & d);\n\t\t} else if (t <= 79) {\n\t\t\treturn b ^ c ^ d;\n\t\t}\n\t}\n\n\t/**\n\t * Circular left-shift operator.\n\t * @private\n\t */\n\t_S(n, x) {\n\t\treturn (x << n) | (x >>> 32 - n);\n\t}\n\n\t/**\n\t * Perform one cycle of SHA-1.\n\t * @param {Uint32Array|bitArray} words one block of words.\n\t * @private\n\t */\n\t_block(words) {\n\t\tconst sha1 = this;\n\t\tconst h = sha1._h;\n\t\t// When words is passed to _block, it has 16 elements. SHA1 _block\n\t\t// function extends words with new elements (at the end there are 80 elements). \n\t\t// The problem is that if we use Uint32Array instead of Array, \n\t\t// the length of Uint32Array cannot be changed. Thus, we replace words with a \n\t\t// normal Array here.\n\t\tconst w = Array(80); // do not use Uint32Array here as the instantiation is slower\n\t\tfor (let j = 0; j < 16; j++) {\n\t\t\tw[j] = words[j];\n\t\t}\n\n\t\tlet a = h[0];\n\t\tlet b = h[1];\n\t\tlet c = h[2];\n\t\tlet d = h[3];\n\t\tlet e = h[4];\n\n\t\tfor (let t = 0; t <= 79; t++) {\n\t\t\tif (t >= 16) {\n\t\t\t\tw[t] = sha1._S(1, w[t - 3] ^ w[t - 8] ^ w[t - 14] ^ w[t - 16]);\n\t\t\t}\n\t\t\tconst tmp = (sha1._S(5, a) + sha1._f(t, b, c, d) + e + w[t] +\n\t\t\t\tsha1._key[Math.floor(t / 20)]) | 0;\n\t\t\te = d;\n\t\t\td = c;\n\t\t\tc = sha1._S(30, b);\n\t\t\tb = a;\n\t\t\ta = tmp;\n\t\t}\n\n\t\th[0] = (h[0] + a) | 0;\n\t\th[1] = (h[1] + b) | 0;\n\t\th[2] = (h[2] + c) | 0;\n\t\th[3] = (h[3] + d) | 0;\n\t\th[4] = (h[4] + e) | 0;\n\t}\n};\n\n/** @fileOverview Low-level AES implementation.\n *\n * This file contains a low-level implementation of AES, optimized for\n * size and for efficiency on several browsers. It is based on\n * OpenSSL's aes_core.c, a public-domain implementation by Vincent\n * Rijmen, Antoon Bosselaers and Paulo Barreto.\n *\n * An older version of this implementation is available in the public\n * domain, but this one is (c) Emily Stark, Mike Hamburg, Dan Boneh,\n * Stanford University 2008-2010 and BSD-licensed for liability\n * reasons.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\nconst cipher = {};\n\n/**\n * Schedule out an AES key for both encryption and decryption. This\n * is a low-level class. Use a cipher mode to do bulk encryption.\n *\n * @constructor\n * @param {Array} key The key as an array of 4, 6 or 8 words.\n */\ncipher.aes = class {\n\tconstructor(key) {\n\t\t/**\n\t\t * The expanded S-box and inverse S-box tables. These will be computed\n\t\t * on the client so that we don't have to send them down the wire.\n\t\t *\n\t\t * There are two tables, _tables[0] is for encryption and\n\t\t * _tables[1] is for decryption.\n\t\t *\n\t\t * The first 4 sub-tables are the expanded S-box with MixColumns. The\n\t\t * last (_tables[01][4]) is the S-box itself.\n\t\t *\n\t\t * @private\n\t\t */\n\t\tconst aes = this;\n\t\taes._tables = [[[], [], [], [], []], [[], [], [], [], []]];\n\n\t\tif (!aes._tables[0][0][0]) {\n\t\t\taes._precompute();\n\t\t}\n\n\t\tconst sbox = aes._tables[0][4];\n\t\tconst decTable = aes._tables[1];\n\t\tconst keyLen = key.length;\n\n\t\tlet i, encKey, decKey, rcon = 1;\n\n\t\tif (keyLen !== 4 && keyLen !== 6 && keyLen !== 8) {\n\t\t\tthrow new Error(\"invalid aes key size\");\n\t\t}\n\n\t\taes._key = [encKey = key.slice(0), decKey = []];\n\n\t\t// schedule encryption keys\n\t\tfor (i = keyLen; i < 4 * keyLen + 28; i++) {\n\t\t\tlet tmp = encKey[i - 1];\n\n\t\t\t// apply sbox\n\t\t\tif (i % keyLen === 0 || (keyLen === 8 && i % keyLen === 4)) {\n\t\t\t\ttmp = sbox[tmp >>> 24] << 24 ^ sbox[tmp >> 16 & 255] << 16 ^ sbox[tmp >> 8 & 255] << 8 ^ sbox[tmp & 255];\n\n\t\t\t\t// shift rows and add rcon\n\t\t\t\tif (i % keyLen === 0) {\n\t\t\t\t\ttmp = tmp << 8 ^ tmp >>> 24 ^ rcon << 24;\n\t\t\t\t\trcon = rcon << 1 ^ (rcon >> 7) * 283;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tencKey[i] = encKey[i - keyLen] ^ tmp;\n\t\t}\n\n\t\t// schedule decryption keys\n\t\tfor (let j = 0; i; j++, i--) {\n\t\t\tconst tmp = encKey[j & 3 ? i : i - 4];\n\t\t\tif (i <= 4 || j < 4) {\n\t\t\t\tdecKey[j] = tmp;\n\t\t\t} else {\n\t\t\t\tdecKey[j] = decTable[0][sbox[tmp >>> 24]] ^\n\t\t\t\t\tdecTable[1][sbox[tmp >> 16 & 255]] ^\n\t\t\t\t\tdecTable[2][sbox[tmp >> 8 & 255]] ^\n\t\t\t\t\tdecTable[3][sbox[tmp & 255]];\n\t\t\t}\n\t\t}\n\t}\n\t// public\n\t/* Something like this might appear here eventually\n\tname: \"AES\",\n\tblockSize: 4,\n\tkeySizes: [4,6,8],\n\t*/\n\n\t/**\n\t * Encrypt an array of 4 big-endian words.\n\t * @param {Array} data The plaintext.\n\t * @return {Array} The ciphertext.\n\t */\n\tencrypt(data) {\n\t\treturn this._crypt(data, 0);\n\t}\n\n\t/**\n\t * Decrypt an array of 4 big-endian words.\n\t * @param {Array} data The ciphertext.\n\t * @return {Array} The plaintext.\n\t */\n\tdecrypt(data) {\n\t\treturn this._crypt(data, 1);\n\t}\n\n\t/**\n\t * Expand the S-box tables.\n\t *\n\t * @private\n\t */\n\t_precompute() {\n\t\tconst encTable = this._tables[0];\n\t\tconst decTable = this._tables[1];\n\t\tconst sbox = encTable[4];\n\t\tconst sboxInv = decTable[4];\n\t\tconst d = [];\n\t\tconst th = [];\n\t\tlet xInv, x2, x4, x8;\n\n\t\t// Compute double and third tables\n\t\tfor (let i = 0; i < 256; i++) {\n\t\t\tth[(d[i] = i << 1 ^ (i >> 7) * 283) ^ i] = i;\n\t\t}\n\n\t\tfor (let x = xInv = 0; !sbox[x]; x ^= x2 || 1, xInv = th[xInv] || 1) {\n\t\t\t// Compute sbox\n\t\t\tlet s = xInv ^ xInv << 1 ^ xInv << 2 ^ xInv << 3 ^ xInv << 4;\n\t\t\ts = s >> 8 ^ s & 255 ^ 99;\n\t\t\tsbox[x] = s;\n\t\t\tsboxInv[s] = x;\n\n\t\t\t// Compute MixColumns\n\t\t\tx8 = d[x4 = d[x2 = d[x]]];\n\t\t\tlet tDec = x8 * 0x1010101 ^ x4 * 0x10001 ^ x2 * 0x101 ^ x * 0x1010100;\n\t\t\tlet tEnc = d[s] * 0x101 ^ s * 0x1010100;\n\n\t\t\tfor (let i = 0; i < 4; i++) {\n\t\t\t\tencTable[i][x] = tEnc = tEnc << 24 ^ tEnc >>> 8;\n\t\t\t\tdecTable[i][s] = tDec = tDec << 24 ^ tDec >>> 8;\n\t\t\t}\n\t\t}\n\n\t\t// Compactify. Considerable speedup on Firefox.\n\t\tfor (let i = 0; i < 5; i++) {\n\t\t\tencTable[i] = encTable[i].slice(0);\n\t\t\tdecTable[i] = decTable[i].slice(0);\n\t\t}\n\t}\n\n\t/**\n\t * Encryption and decryption core.\n\t * @param {Array} input Four words to be encrypted or decrypted.\n\t * @param dir The direction, 0 for encrypt and 1 for decrypt.\n\t * @return {Array} The four encrypted or decrypted words.\n\t * @private\n\t */\n\t_crypt(input, dir) {\n\t\tif (input.length !== 4) {\n\t\t\tthrow new Error(\"invalid aes block size\");\n\t\t}\n\n\t\tconst key = this._key[dir];\n\n\t\tconst nInnerRounds = key.length / 4 - 2;\n\t\tconst out = [0, 0, 0, 0];\n\t\tconst table = this._tables[dir];\n\n\t\t// load up the tables\n\t\tconst t0 = table[0];\n\t\tconst t1 = table[1];\n\t\tconst t2 = table[2];\n\t\tconst t3 = table[3];\n\t\tconst sbox = table[4];\n\n\t\t// state variables a,b,c,d are loaded with pre-whitened data\n\t\tlet a = input[0] ^ key[0];\n\t\tlet b = input[dir ? 3 : 1] ^ key[1];\n\t\tlet c = input[2] ^ key[2];\n\t\tlet d = input[dir ? 1 : 3] ^ key[3];\n\t\tlet kIndex = 4;\n\t\tlet a2, b2, c2;\n\n\t\t// Inner rounds. Cribbed from OpenSSL.\n\t\tfor (let i = 0; i < nInnerRounds; i++) {\n\t\t\ta2 = t0[a >>> 24] ^ t1[b >> 16 & 255] ^ t2[c >> 8 & 255] ^ t3[d & 255] ^ key[kIndex];\n\t\t\tb2 = t0[b >>> 24] ^ t1[c >> 16 & 255] ^ t2[d >> 8 & 255] ^ t3[a & 255] ^ key[kIndex + 1];\n\t\t\tc2 = t0[c >>> 24] ^ t1[d >> 16 & 255] ^ t2[a >> 8 & 255] ^ t3[b & 255] ^ key[kIndex + 2];\n\t\t\td = t0[d >>> 24] ^ t1[a >> 16 & 255] ^ t2[b >> 8 & 255] ^ t3[c & 255] ^ key[kIndex + 3];\n\t\t\tkIndex += 4;\n\t\t\ta = a2; b = b2; c = c2;\n\t\t}\n\n\t\t// Last round.\n\t\tfor (let i = 0; i < 4; i++) {\n\t\t\tout[dir ? 3 & -i : i] =\n\t\t\t\tsbox[a >>> 24] << 24 ^\n\t\t\t\tsbox[b >> 16 & 255] << 16 ^\n\t\t\t\tsbox[c >> 8 & 255] << 8 ^\n\t\t\t\tsbox[d & 255] ^\n\t\t\t\tkey[kIndex++];\n\t\t\ta2 = a; a = b; b = c; c = d; d = a2;\n\t\t}\n\n\t\treturn out;\n\t}\n};\n\n/**\n * Random values\n * @namespace\n */\nconst random = {\n\t/** \n\t * Generate random words with pure js, cryptographically not as strong & safe as native implementation.\n\t * @param {TypedArray} typedArray The array to fill.\n\t * @return {TypedArray} The random values.\n\t */\n\tgetRandomValues(typedArray) {\n\t\tconst words = new Uint32Array(typedArray.buffer);\n\t\tconst r = (m_w) => {\n\t\t\tlet m_z = 0x3ade68b1;\n\t\t\tconst mask = 0xffffffff;\n\t\t\treturn function () {\n\t\t\t\tm_z = (0x9069 * (m_z & 0xFFFF) + (m_z >> 0x10)) & mask;\n\t\t\t\tm_w = (0x4650 * (m_w & 0xFFFF) + (m_w >> 0x10)) & mask;\n\t\t\t\tconst result = ((((m_z << 0x10) + m_w) & mask) / 0x100000000) + .5;\n\t\t\t\treturn result * (Math.random() > .5 ? 1 : -1);\n\t\t\t};\n\t\t};\n\t\tfor (let i = 0, rcache; i < typedArray.length; i += 4) {\n\t\t\tconst _r = r((rcache || Math.random()) * 0x100000000);\n\t\t\trcache = _r() * 0x3ade67b7;\n\t\t\twords[i / 4] = (_r() * 0x100000000) | 0;\n\t\t}\n\t\treturn typedArray;\n\t}\n};\n\n/** @fileOverview CTR mode implementation.\n *\n * Special thanks to Roy Nicholson for pointing out a bug in our\n * implementation.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/** Brian Gladman's CTR Mode.\n* @constructor\n* @param {Object} _prf The aes instance to generate key.\n* @param {bitArray} _iv The iv for ctr mode, it must be 128 bits.\n*/\n\nconst mode = {};\n\n/**\n * Brian Gladman's CTR Mode.\n * @namespace\n */\nmode.ctrGladman = class {\n\tconstructor(prf, iv) {\n\t\tthis._prf = prf;\n\t\tthis._initIv = iv;\n\t\tthis._iv = iv;\n\t}\n\n\treset() {\n\t\tthis._iv = this._initIv;\n\t}\n\n\t/** Input some data to calculate.\n\t * @param {bitArray} data the data to process, it must be intergral multiple of 128 bits unless it's the last.\n\t */\n\tupdate(data) {\n\t\treturn this.calculate(this._prf, data, this._iv);\n\t}\n\n\tincWord(word) {\n\t\tif (((word >> 24) & 0xff) === 0xff) { //overflow\n\t\t\tlet b1 = (word >> 16) & 0xff;\n\t\t\tlet b2 = (word >> 8) & 0xff;\n\t\t\tlet b3 = word & 0xff;\n\n\t\t\tif (b1 === 0xff) { // overflow b1 \n\t\t\t\tb1 = 0;\n\t\t\t\tif (b2 === 0xff) {\n\t\t\t\t\tb2 = 0;\n\t\t\t\t\tif (b3 === 0xff) {\n\t\t\t\t\t\tb3 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t++b3;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t++b2;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t++b1;\n\t\t\t}\n\n\t\t\tword = 0;\n\t\t\tword += (b1 << 16);\n\t\t\tword += (b2 << 8);\n\t\t\tword += b3;\n\t\t} else {\n\t\t\tword += (0x01 << 24);\n\t\t}\n\t\treturn word;\n\t}\n\n\tincCounter(counter) {\n\t\tif ((counter[0] = this.incWord(counter[0])) === 0) {\n\t\t\t// encr_data in fileenc.c from Dr Brian Gladman's counts only with DWORD j < 8\n\t\t\tcounter[1] = this.incWord(counter[1]);\n\t\t}\n\t}\n\n\tcalculate(prf, data, iv) {\n\t\tlet l;\n\t\tif (!(l = data.length)) {\n\t\t\treturn [];\n\t\t}\n\t\tconst bl = bitArray.bitLength(data);\n\t\tfor (let i = 0; i < l; i += 4) {\n\t\t\tthis.incCounter(iv);\n\t\t\tconst e = prf.encrypt(iv);\n\t\t\tdata[i] ^= e[0];\n\t\t\tdata[i + 1] ^= e[1];\n\t\t\tdata[i + 2] ^= e[2];\n\t\t\tdata[i + 3] ^= e[3];\n\t\t}\n\t\treturn bitArray.clamp(data, bl);\n\t}\n};\n\nconst misc = {\n\timportKey(password) {\n\t\treturn new misc.hmacSha1(codec.bytes.toBits(password));\n\t},\n\tpbkdf2(prf, salt, count, length) {\n\t\tcount = count || 10000;\n\t\tif (length < 0 || count < 0) {\n\t\t\tthrow new Error(\"invalid params to pbkdf2\");\n\t\t}\n\t\tconst byteLength = ((length >> 5) + 1) << 2;\n\t\tlet u, ui, i, j, k;\n\t\tconst arrayBuffer = new ArrayBuffer(byteLength);\n\t\tconst out = new DataView(arrayBuffer);\n\t\tlet outLength = 0;\n\t\tconst b = bitArray;\n\t\tsalt = codec.bytes.toBits(salt);\n\t\tfor (k = 1; outLength < (byteLength || 1); k++) {\n\t\t\tu = ui = prf.encrypt(b.concat(salt, [k]));\n\t\t\tfor (i = 1; i < count; i++) {\n\t\t\t\tui = prf.encrypt(ui);\n\t\t\t\tfor (j = 0; j < ui.length; j++) {\n\t\t\t\t\tu[j] ^= ui[j];\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (i = 0; outLength < (byteLength || 1) && i < u.length; i++) {\n\t\t\t\tout.setInt32(outLength, u[i]);\n\t\t\t\toutLength += 4;\n\t\t\t}\n\t\t}\n\t\treturn arrayBuffer.slice(0, length / 8);\n\t}\n};\n\n/** @fileOverview HMAC implementation.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/** HMAC with the specified hash function.\n * @constructor\n * @param {bitArray} key the key for HMAC.\n * @param {Object} [Hash=hash.sha1] The hash function to use.\n */\nmisc.hmacSha1 = class {\n\n\tconstructor(key) {\n\t\tconst hmac = this;\n\t\tconst Hash = hmac._hash = hash.sha1;\n\t\tconst exKey = [[], []];\n\t\thmac._baseHash = [new Hash(), new Hash()];\n\t\tconst bs = hmac._baseHash[0].blockSize / 32;\n\n\t\tif (key.length > bs) {\n\t\t\tkey = new Hash().update(key).finalize();\n\t\t}\n\n\t\tfor (let i = 0; i < bs; i++) {\n\t\t\texKey[0][i] = key[i] ^ 0x36363636;\n\t\t\texKey[1][i] = key[i] ^ 0x5C5C5C5C;\n\t\t}\n\n\t\thmac._baseHash[0].update(exKey[0]);\n\t\thmac._baseHash[1].update(exKey[1]);\n\t\thmac._resultHash = new Hash(hmac._baseHash[0]);\n\t}\n\treset() {\n\t\tconst hmac = this;\n\t\thmac._resultHash = new hmac._hash(hmac._baseHash[0]);\n\t\thmac._updated = false;\n\t}\n\n\tupdate(data) {\n\t\tconst hmac = this;\n\t\thmac._updated = true;\n\t\thmac._resultHash.update(data);\n\t}\n\n\tdigest() {\n\t\tconst hmac = this;\n\t\tconst w = hmac._resultHash.finalize();\n\t\tconst result = new (hmac._hash)(hmac._baseHash[1]).update(w).finalize();\n\n\t\thmac.reset();\n\n\t\treturn result;\n\t}\n\n\tencrypt(data) {\n\t\tif (!this._updated) {\n\t\t\tthis.update(data);\n\t\t\treturn this.digest(data);\n\t\t} else {\n\t\t\tthrow new Error(\"encrypt on already updated hmac called!\");\n\t\t}\n\t}\n};\n\nexport {\n\tcipher,\n\tcodec,\n\tmisc,\n\tmode,\n\trandom\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global crypto */\n\nimport {\n\trandom\n} from \"./codecs/sjcl.js\";\n\nconst GET_RANDOM_VALUES_SUPPORTED = typeof crypto != \"undefined\" && typeof crypto.getRandomValues == \"function\";\n\nconst ERR_INVALID_PASSWORD = \"Invalid password\";\nconst ERR_INVALID_SIGNATURE = \"Invalid signature\";\nconst ERR_ABORT_CHECK_PASSWORD = \"zipjs-abort-check-password\";\n\nexport {\n\tgetRandomValues,\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE,\n\tERR_ABORT_CHECK_PASSWORD\n};\n\nfunction getRandomValues(array) {\n\tif (GET_RANDOM_VALUES_SUPPORTED) {\n\t\treturn crypto.getRandomValues(array);\n\t} else {\n\t\treturn random.getRandomValues(array);\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global crypto, TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport { encodeText } from \"./../util/encode-text.js\";\nimport {\n\tcipher,\n\tcodec,\n\tmisc,\n\tmode\n} from \"./codecs/sjcl.js\";\nimport {\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE,\n\tERR_ABORT_CHECK_PASSWORD,\n\tgetRandomValues\n} from \"./common-crypto.js\";\n\nconst BLOCK_LENGTH = 16;\nconst RAW_FORMAT = \"raw\";\nconst PBKDF2_ALGORITHM = { name: \"PBKDF2\" };\nconst HASH_ALGORITHM = { name: \"HMAC\" };\nconst HASH_FUNCTION = \"SHA-1\";\nconst BASE_KEY_ALGORITHM = Object.assign({ hash: HASH_ALGORITHM }, PBKDF2_ALGORITHM);\nconst DERIVED_BITS_ALGORITHM = Object.assign({ iterations: 1000, hash: { name: HASH_FUNCTION } }, PBKDF2_ALGORITHM);\nconst DERIVED_BITS_USAGE = [\"deriveBits\"];\nconst SALT_LENGTH = [8, 12, 16];\nconst KEY_LENGTH = [16, 24, 32];\nconst SIGNATURE_LENGTH = 10;\nconst COUNTER_DEFAULT_VALUE = [0, 0, 0, 0];\nconst UNDEFINED_TYPE = \"undefined\";\nconst FUNCTION_TYPE = \"function\";\n// deno-lint-ignore valid-typeof\nconst CRYPTO_API_SUPPORTED = typeof crypto != UNDEFINED_TYPE;\nconst subtle = CRYPTO_API_SUPPORTED && crypto.subtle;\nconst SUBTLE_API_SUPPORTED = CRYPTO_API_SUPPORTED && typeof subtle != UNDEFINED_TYPE;\nconst codecBytes = codec.bytes;\nconst Aes = cipher.aes;\nconst CtrGladman = mode.ctrGladman;\nconst HmacSha1 = misc.hmacSha1;\n\nlet IMPORT_KEY_SUPPORTED = CRYPTO_API_SUPPORTED && SUBTLE_API_SUPPORTED && typeof subtle.importKey == FUNCTION_TYPE;\nlet DERIVE_BITS_SUPPORTED = CRYPTO_API_SUPPORTED && SUBTLE_API_SUPPORTED && typeof subtle.deriveBits == FUNCTION_TYPE;\n\nclass AESDecryptionStream extends TransformStream {\n\n\tconstructor({ password, signed, encryptionStrength, checkPasswordOnly }) {\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tready: new Promise(resolve => this.resolveReady = resolve),\n\t\t\t\t\tpassword,\n\t\t\t\t\tsigned,\n\t\t\t\t\tstrength: encryptionStrength - 1,\n\t\t\t\t\tpending: new Uint8Array()\n\t\t\t\t});\n\t\t\t},\n\t\t\tasync transform(chunk, controller) {\n\t\t\t\tconst aesCrypto = this;\n\t\t\t\tconst {\n\t\t\t\t\tpassword,\n\t\t\t\t\tstrength,\n\t\t\t\t\tresolveReady,\n\t\t\t\t\tready\n\t\t\t\t} = aesCrypto;\n\t\t\t\tif (password) {\n\t\t\t\t\tawait createDecryptionKeys(aesCrypto, strength, password, subarray(chunk, 0, SALT_LENGTH[strength] + 2));\n\t\t\t\t\tchunk = subarray(chunk, SALT_LENGTH[strength] + 2);\n\t\t\t\t\tif (checkPasswordOnly) {\n\t\t\t\t\t\tcontroller.error(new Error(ERR_ABORT_CHECK_PASSWORD));\n\t\t\t\t\t} else {\n\t\t\t\t\t\tresolveReady();\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tawait ready;\n\t\t\t\t}\n\t\t\t\tconst output = new Uint8Array(chunk.length - SIGNATURE_LENGTH - ((chunk.length - SIGNATURE_LENGTH) % BLOCK_LENGTH));\n\t\t\t\tcontroller.enqueue(append(aesCrypto, chunk, output, 0, SIGNATURE_LENGTH, true));\n\t\t\t},\n\t\t\tasync flush(controller) {\n\t\t\t\tconst {\n\t\t\t\t\tsigned,\n\t\t\t\t\tctr,\n\t\t\t\t\thmac,\n\t\t\t\t\tpending,\n\t\t\t\t\tready\n\t\t\t\t} = this;\n\t\t\t\tawait ready;\n\t\t\t\tconst chunkToDecrypt = subarray(pending, 0, pending.length - SIGNATURE_LENGTH);\n\t\t\t\tconst originalSignature = subarray(pending, pending.length - SIGNATURE_LENGTH);\n\t\t\t\tlet decryptedChunkArray = new Uint8Array();\n\t\t\t\tif (chunkToDecrypt.length) {\n\t\t\t\t\tconst encryptedChunk = toBits(codecBytes, chunkToDecrypt);\n\t\t\t\t\thmac.update(encryptedChunk);\n\t\t\t\t\tconst decryptedChunk = ctr.update(encryptedChunk);\n\t\t\t\t\tdecryptedChunkArray = fromBits(codecBytes, decryptedChunk);\n\t\t\t\t}\n\t\t\t\tif (signed) {\n\t\t\t\t\tconst signature = subarray(fromBits(codecBytes, hmac.digest()), 0, SIGNATURE_LENGTH);\n\t\t\t\t\tfor (let indexSignature = 0; indexSignature < SIGNATURE_LENGTH; indexSignature++) {\n\t\t\t\t\t\tif (signature[indexSignature] != originalSignature[indexSignature]) {\n\t\t\t\t\t\t\tthrow new Error(ERR_INVALID_SIGNATURE);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcontroller.enqueue(decryptedChunkArray);\n\t\t\t}\n\t\t});\n\t}\n}\n\nclass AESEncryptionStream extends TransformStream {\n\n\tconstructor({ password, encryptionStrength }) {\n\t\t// deno-lint-ignore prefer-const\n\t\tlet stream;\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tready: new Promise(resolve => this.resolveReady = resolve),\n\t\t\t\t\tpassword,\n\t\t\t\t\tstrength: encryptionStrength - 1,\n\t\t\t\t\tpending: new Uint8Array()\n\t\t\t\t});\n\t\t\t},\n\t\t\tasync transform(chunk, controller) {\n\t\t\t\tconst aesCrypto = this;\n\t\t\t\tconst {\n\t\t\t\t\tpassword,\n\t\t\t\t\tstrength,\n\t\t\t\t\tresolveReady,\n\t\t\t\t\tready\n\t\t\t\t} = aesCrypto;\n\t\t\t\tlet preamble = new Uint8Array();\n\t\t\t\tif (password) {\n\t\t\t\t\tpreamble = await createEncryptionKeys(aesCrypto, strength, password);\n\t\t\t\t\tresolveReady();\n\t\t\t\t} else {\n\t\t\t\t\tawait ready;\n\t\t\t\t}\n\t\t\t\tconst output = new Uint8Array(preamble.length + chunk.length - (chunk.length % BLOCK_LENGTH));\n\t\t\t\toutput.set(preamble, 0);\n\t\t\t\tcontroller.enqueue(append(aesCrypto, chunk, output, preamble.length, 0));\n\t\t\t},\n\t\t\tasync flush(controller) {\n\t\t\t\tconst {\n\t\t\t\t\tctr,\n\t\t\t\t\thmac,\n\t\t\t\t\tpending,\n\t\t\t\t\tready\n\t\t\t\t} = this;\n\t\t\t\tawait ready;\n\t\t\t\tlet encryptedChunkArray = new Uint8Array();\n\t\t\t\tif (pending.length) {\n\t\t\t\t\tconst encryptedChunk = ctr.update(toBits(codecBytes, pending));\n\t\t\t\t\thmac.update(encryptedChunk);\n\t\t\t\t\tencryptedChunkArray = fromBits(codecBytes, encryptedChunk);\n\t\t\t\t}\n\t\t\t\tstream.signature = fromBits(codecBytes, hmac.digest()).slice(0, SIGNATURE_LENGTH);\n\t\t\t\tcontroller.enqueue(concat(encryptedChunkArray, stream.signature));\n\t\t\t}\n\t\t});\n\t\tstream = this;\n\t}\n}\n\nexport {\n\tAESDecryptionStream,\n\tAESEncryptionStream,\n\tERR_INVALID_PASSWORD\n};\n\nfunction append(aesCrypto, input, output, paddingStart, paddingEnd, verifySignature) {\n\tconst {\n\t\tctr,\n\t\thmac,\n\t\tpending\n\t} = aesCrypto;\n\tconst inputLength = input.length - paddingEnd;\n\tif (pending.length) {\n\t\tinput = concat(pending, input);\n\t\toutput = expand(output, inputLength - (inputLength % BLOCK_LENGTH));\n\t}\n\tlet offset;\n\tfor (offset = 0; offset <= inputLength - BLOCK_LENGTH; offset += BLOCK_LENGTH) {\n\t\tconst inputChunk = toBits(codecBytes, subarray(input, offset, offset + BLOCK_LENGTH));\n\t\tif (verifySignature) {\n\t\t\thmac.update(inputChunk);\n\t\t}\n\t\tconst outputChunk = ctr.update(inputChunk);\n\t\tif (!verifySignature) {\n\t\t\thmac.update(outputChunk);\n\t\t}\n\t\toutput.set(fromBits(codecBytes, outputChunk), offset + paddingStart);\n\t}\n\taesCrypto.pending = subarray(input, offset);\n\treturn output;\n}\n\nasync function createDecryptionKeys(decrypt, strength, password, preamble) {\n\tconst passwordVerificationKey = await createKeys(decrypt, strength, password, subarray(preamble, 0, SALT_LENGTH[strength]));\n\tconst passwordVerification = subarray(preamble, SALT_LENGTH[strength]);\n\tif (passwordVerificationKey[0] != passwordVerification[0] || passwordVerificationKey[1] != passwordVerification[1]) {\n\t\tthrow new Error(ERR_INVALID_PASSWORD);\n\t}\n}\n\nasync function createEncryptionKeys(encrypt, strength, password) {\n\tconst salt = getRandomValues(new Uint8Array(SALT_LENGTH[strength]));\n\tconst passwordVerification = await createKeys(encrypt, strength, password, salt);\n\treturn concat(salt, passwordVerification);\n}\n\nasync function createKeys(aesCrypto, strength, password, salt) {\n\taesCrypto.password = null;\n\tconst encodedPassword = encodeText(password);\n\tconst baseKey = await importKey(RAW_FORMAT, encodedPassword, BASE_KEY_ALGORITHM, false, DERIVED_BITS_USAGE);\n\tconst derivedBits = await deriveBits(Object.assign({ salt }, DERIVED_BITS_ALGORITHM), baseKey, 8 * ((KEY_LENGTH[strength] * 2) + 2));\n\tconst compositeKey = new Uint8Array(derivedBits);\n\tconst key = toBits(codecBytes, subarray(compositeKey, 0, KEY_LENGTH[strength]));\n\tconst authentication = toBits(codecBytes, subarray(compositeKey, KEY_LENGTH[strength], KEY_LENGTH[strength] * 2));\n\tconst passwordVerification = subarray(compositeKey, KEY_LENGTH[strength] * 2);\n\tObject.assign(aesCrypto, {\n\t\tkeys: {\n\t\t\tkey,\n\t\t\tauthentication,\n\t\t\tpasswordVerification\n\t\t},\n\t\tctr: new CtrGladman(new Aes(key), Array.from(COUNTER_DEFAULT_VALUE)),\n\t\thmac: new HmacSha1(authentication)\n\t});\n\treturn passwordVerification;\n}\n\nasync function importKey(format, password, algorithm, extractable, keyUsages) {\n\tif (IMPORT_KEY_SUPPORTED) {\n\t\ttry {\n\t\t\treturn await subtle.importKey(format, password, algorithm, extractable, keyUsages);\n\t\t} catch (_error) {\n\t\t\tIMPORT_KEY_SUPPORTED = false;\n\t\t\treturn misc.importKey(password);\n\t\t}\n\t} else {\n\t\treturn misc.importKey(password);\n\t}\n}\n\nasync function deriveBits(algorithm, baseKey, length) {\n\tif (DERIVE_BITS_SUPPORTED) {\n\t\ttry {\n\t\t\treturn await subtle.deriveBits(algorithm, baseKey, length);\n\t\t} catch (_error) {\n\t\t\tDERIVE_BITS_SUPPORTED = false;\n\t\t\treturn misc.pbkdf2(baseKey, algorithm.salt, DERIVED_BITS_ALGORITHM.iterations, length);\n\t\t}\n\t} else {\n\t\treturn misc.pbkdf2(baseKey, algorithm.salt, DERIVED_BITS_ALGORITHM.iterations, length);\n\t}\n}\n\nfunction concat(leftArray, rightArray) {\n\tlet array = leftArray;\n\tif (leftArray.length + rightArray.length) {\n\t\tarray = new Uint8Array(leftArray.length + rightArray.length);\n\t\tarray.set(leftArray, 0);\n\t\tarray.set(rightArray, leftArray.length);\n\t}\n\treturn array;\n}\n\nfunction expand(inputArray, length) {\n\tif (length && length > inputArray.length) {\n\t\tconst array = inputArray;\n\t\tinputArray = new Uint8Array(length);\n\t\tinputArray.set(array, 0);\n\t}\n\treturn inputArray;\n}\n\nfunction subarray(array, begin, end) {\n\treturn array.subarray(begin, end);\n}\n\nfunction fromBits(codecBytes, chunk) {\n\treturn codecBytes.fromBits(chunk);\n}\nfunction toBits(codecBytes, chunk) {\n\treturn codecBytes.toBits(chunk);\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TextEncoder */\n\nexport {\n\tencodeText\n};\n\nfunction encodeText(value) {\n\tif (typeof TextEncoder == \"undefined\") {\n\t\tvalue = unescape(encodeURIComponent(value));\n\t\tconst result = new Uint8Array(value.length);\n\t\tfor (let i = 0; i < result.length; i++) {\n\t\t\tresult[i] = value.charCodeAt(i);\n\t\t}\n\t\treturn result;\n\t} else {\n\t\treturn new TextEncoder().encode(value);\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport { Crc32 } from \"./codecs/crc32.js\";\nimport {\n\tERR_INVALID_PASSWORD,\n\tERR_ABORT_CHECK_PASSWORD,\n\tgetRandomValues\n} from \"./common-crypto.js\";\n\nconst HEADER_LENGTH = 12;\n\nclass ZipCryptoDecryptionStream extends TransformStream {\n\n\tconstructor({ password, passwordVerification, checkPasswordOnly }) {\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tpassword,\n\t\t\t\t\tpasswordVerification\n\t\t\t\t});\n\t\t\t\tcreateKeys(this, password);\n\t\t\t},\n\t\t\ttransform(chunk, controller) {\n\t\t\t\tconst zipCrypto = this;\n\t\t\t\tif (zipCrypto.password) {\n\t\t\t\t\tconst decryptedHeader = decrypt(zipCrypto, chunk.subarray(0, HEADER_LENGTH));\n\t\t\t\t\tzipCrypto.password = null;\n\t\t\t\t\tif (decryptedHeader[HEADER_LENGTH - 1] != zipCrypto.passwordVerification) {\n\t\t\t\t\t\tthrow new Error(ERR_INVALID_PASSWORD);\n\t\t\t\t\t}\n\t\t\t\t\tchunk = chunk.subarray(HEADER_LENGTH);\n\t\t\t\t}\n\t\t\t\tif (checkPasswordOnly) {\n\t\t\t\t\tcontroller.error(new Error(ERR_ABORT_CHECK_PASSWORD));\n\t\t\t\t} else {\n\t\t\t\t\tcontroller.enqueue(decrypt(zipCrypto, chunk));\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n}\n\nclass ZipCryptoEncryptionStream extends TransformStream {\n\n\tconstructor({ password, passwordVerification }) {\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tpassword,\n\t\t\t\t\tpasswordVerification\n\t\t\t\t});\n\t\t\t\tcreateKeys(this, password);\n\t\t\t},\n\t\t\ttransform(chunk, controller) {\n\t\t\t\tconst zipCrypto = this;\n\t\t\t\tlet output;\n\t\t\t\tlet offset;\n\t\t\t\tif (zipCrypto.password) {\n\t\t\t\t\tzipCrypto.password = null;\n\t\t\t\t\tconst header = getRandomValues(new Uint8Array(HEADER_LENGTH));\n\t\t\t\t\theader[HEADER_LENGTH - 1] = zipCrypto.passwordVerification;\n\t\t\t\t\toutput = new Uint8Array(chunk.length + header.length);\n\t\t\t\t\toutput.set(encrypt(zipCrypto, header), 0);\n\t\t\t\t\toffset = HEADER_LENGTH;\n\t\t\t\t} else {\n\t\t\t\t\toutput = new Uint8Array(chunk.length);\n\t\t\t\t\toffset = 0;\n\t\t\t\t}\n\t\t\t\toutput.set(encrypt(zipCrypto, chunk), offset);\n\t\t\t\tcontroller.enqueue(output);\n\t\t\t}\n\t\t});\n\t}\n}\n\nexport {\n\tZipCryptoDecryptionStream,\n\tZipCryptoEncryptionStream,\n\tERR_INVALID_PASSWORD\n};\n\nfunction decrypt(target, input) {\n\tconst output = new Uint8Array(input.length);\n\tfor (let index = 0; index < input.length; index++) {\n\t\toutput[index] = getByte(target) ^ input[index];\n\t\tupdateKeys(target, output[index]);\n\t}\n\treturn output;\n}\n\nfunction encrypt(target, input) {\n\tconst output = new Uint8Array(input.length);\n\tfor (let index = 0; index < input.length; index++) {\n\t\toutput[index] = getByte(target) ^ input[index];\n\t\tupdateKeys(target, input[index]);\n\t}\n\treturn output;\n}\n\nfunction createKeys(target, password) {\n\tconst keys = [0x12345678, 0x23456789, 0x34567890];\n\tObject.assign(target, {\n\t\tkeys,\n\t\tcrcKey0: new Crc32(keys[0]),\n\t\tcrcKey2: new Crc32(keys[2]),\n\t});\n\tfor (let index = 0; index < password.length; index++) {\n\t\tupdateKeys(target, password.charCodeAt(index));\n\t}\n}\n\nfunction updateKeys(target, byte) {\n\tlet [key0, key1, key2] = target.keys;\n\ttarget.crcKey0.append([byte]);\n\tkey0 = ~target.crcKey0.get();\n\tkey1 = getInt32(Math.imul(getInt32(key1 + getInt8(key0)), 134775813) + 1);\n\ttarget.crcKey2.append([key1 >>> 24]);\n\tkey2 = ~target.crcKey2.get();\n\ttarget.keys = [key0, key1, key2];\n}\n\nfunction getByte(target) {\n\tconst temp = target.keys[2] | 2;\n\treturn getInt8(Math.imul(temp, (temp ^ 1)) >>> 8);\n}\n\nfunction getInt8(number) {\n\treturn number & 0xFF;\n}\n\nfunction getInt32(number) {\n\treturn number & 0xFFFFFFFF;\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport { Crc32Stream } from \"./crc32-stream.js\";\nimport {\n\tAESEncryptionStream,\n\tAESDecryptionStream\n} from \"./aes-crypto-stream.js\";\nimport {\n\tZipCryptoEncryptionStream,\n\tZipCryptoDecryptionStream\n} from \"./zip-crypto-stream.js\";\nimport {\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE,\n\tERR_ABORT_CHECK_PASSWORD\n} from \"./common-crypto.js\";\n\nconst COMPRESSION_FORMAT = \"deflate-raw\";\n\nclass DeflateStream extends TransformStream {\n\n\tconstructor(options, { chunkSize, CompressionStream, CompressionStreamNative }) {\n\t\tsuper({});\n\t\tconst { compressed, encrypted, useCompressionStream, zipCrypto, signed, level } = options;\n\t\tconst stream = this;\n\t\tlet crc32Stream, encryptionStream;\n\t\tlet readable = filterEmptyChunks(super.readable);\n\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t[readable, crc32Stream] = readable.tee();\n\t\t\tcrc32Stream = pipeThrough(crc32Stream, new Crc32Stream());\n\t\t}\n\t\tif (compressed) {\n\t\t\treadable = pipeThroughCommpressionStream(readable, useCompressionStream, { level, chunkSize }, CompressionStreamNative, CompressionStream);\n\t\t}\n\t\tif (encrypted) {\n\t\t\tif (zipCrypto) {\n\t\t\t\treadable = pipeThrough(readable, new ZipCryptoEncryptionStream(options));\n\t\t\t} else {\n\t\t\t\tencryptionStream = new AESEncryptionStream(options);\n\t\t\t\treadable = pipeThrough(readable, encryptionStream);\n\t\t\t}\n\t\t}\n\t\tsetReadable(stream, readable, async () => {\n\t\t\tlet signature;\n\t\t\tif (encrypted && !zipCrypto) {\n\t\t\t\tsignature = encryptionStream.signature;\n\t\t\t}\n\t\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t\tsignature = await crc32Stream.getReader().read();\n\t\t\t\tsignature = new DataView(signature.value.buffer).getUint32(0);\n\t\t\t}\n\t\t\tstream.signature = signature;\n\t\t});\n\t}\n}\n\nclass InflateStream extends TransformStream {\n\n\tconstructor(options, { chunkSize, DecompressionStream, DecompressionStreamNative }) {\n\t\tsuper({});\n\t\tconst { zipCrypto, encrypted, signed, signature, compressed, useCompressionStream } = options;\n\t\tlet crc32Stream, decryptionStream;\n\t\tlet readable = filterEmptyChunks(super.readable);\n\t\tif (encrypted) {\n\t\t\tif (zipCrypto) {\n\t\t\t\treadable = pipeThrough(readable, new ZipCryptoDecryptionStream(options));\n\t\t\t} else {\n\t\t\t\tdecryptionStream = new AESDecryptionStream(options);\n\t\t\t\treadable = pipeThrough(readable, decryptionStream);\n\t\t\t}\n\t\t}\n\t\tif (compressed) {\n\t\t\treadable = pipeThroughCommpressionStream(readable, useCompressionStream, { chunkSize }, DecompressionStreamNative, DecompressionStream);\n\t\t}\n\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t[readable, crc32Stream] = readable.tee();\n\t\t\tcrc32Stream = pipeThrough(crc32Stream, new Crc32Stream());\n\t\t}\n\t\tsetReadable(this, readable, async () => {\n\t\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t\tconst streamSignature = await crc32Stream.getReader().read();\n\t\t\t\tconst dataViewSignature = new DataView(streamSignature.value.buffer);\n\t\t\t\tif (signature != dataViewSignature.getUint32(0, false)) {\n\t\t\t\t\tthrow new Error(ERR_INVALID_SIGNATURE);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n}\n\nexport {\n\tDeflateStream,\n\tInflateStream,\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE,\n\tERR_ABORT_CHECK_PASSWORD\n};\n\nfunction filterEmptyChunks(readable) {\n\treturn pipeThrough(readable, new TransformStream({\n\t\ttransform(chunk, controller) {\n\t\t\tif (chunk && chunk.length) {\n\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t}\n\t\t}\n\t}));\n}\n\nfunction setReadable(stream, readable, flush) {\n\treadable = pipeThrough(readable, new TransformStream({ flush }));\n\tObject.defineProperty(stream, \"readable\", {\n\t\tget() {\n\t\t\treturn readable;\n\t\t}\n\t});\n}\n\nfunction pipeThroughCommpressionStream(readable, useCompressionStream, options, CodecStreamNative, CodecStream) {\n\ttry {\n\t\tconst CompressionStream = useCompressionStream && CodecStreamNative ? CodecStreamNative : CodecStream;\n\t\treadable = pipeThrough(readable, new CompressionStream(COMPRESSION_FORMAT, options));\n\t} catch (error) {\n\t\tif (useCompressionStream) {\n\t\t\treadable = pipeThrough(readable, new CodecStream(COMPRESSION_FORMAT, options));\n\t\t} else {\n\t\t\tthrow error;\n\t\t}\n\t}\n\treturn readable;\n}\n\nfunction pipeThrough(readable, transformStream) {\n\treturn readable.pipeThrough(transformStream);\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/*\n * This program is based on JZlib 1.0.2 ymnk, JCraft,Inc.\n * JZlib is based on zlib-1.1.3, so all credit should go authors\n * Jean-loup Gailly(jloup@gzip.org) and Mark Adler(madler@alumni.caltech.edu)\n * and contributors of zlib.\n */\n\n/* global TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE,\n\tERR_ABORT_CHECK_PASSWORD,\n\tInflateStream,\n\tDeflateStream\n} from \"./zip-entry-stream.js\";\n\nconst MESSAGE_EVENT_TYPE = \"message\";\nconst MESSAGE_START = \"start\";\nconst MESSAGE_PULL = \"pull\";\nconst MESSAGE_DATA = \"data\";\nconst MESSAGE_ACK_DATA = \"ack\";\nconst MESSAGE_CLOSE = \"close\";\nconst CODEC_DEFLATE = \"deflate\";\nconst CODEC_INFLATE = \"inflate\";\n\nexport {\n\tCODEC_DEFLATE,\n\tCODEC_INFLATE,\n\tMESSAGE_EVENT_TYPE,\n\tMESSAGE_START,\n\tMESSAGE_PULL,\n\tMESSAGE_DATA,\n\tMESSAGE_ACK_DATA,\n\tMESSAGE_CLOSE,\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE,\n\tERR_ABORT_CHECK_PASSWORD,\n\tCodecStream\n};\n\nclass CodecStream extends TransformStream {\n\n\tconstructor(options, config) {\n\t\tsuper({});\n\t\tconst codec = this;\n\t\tconst { codecType } = options;\n\t\tlet Stream;\n\t\tif (codecType.startsWith(CODEC_DEFLATE)) {\n\t\t\tStream = DeflateStream;\n\t\t} else if (codecType.startsWith(CODEC_INFLATE)) {\n\t\t\tStream = InflateStream;\n\t\t}\n\t\tlet size = 0;\n\t\tconst stream = new Stream(options, config);\n\t\tconst readable = super.readable;\n\t\tconst transformStream = new TransformStream({\n\t\t\ttransform(chunk, controller) {\n\t\t\t\tif (chunk && chunk.length) {\n\t\t\t\t\tsize += chunk.length;\n\t\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t\t}\n\t\t\t},\n\t\t\tflush() {\n\t\t\t\tconst { signature } = stream;\n\t\t\t\tObject.assign(codec, {\n\t\t\t\t\tsignature,\n\t\t\t\t\tsize\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(codec, \"readable\", {\n\t\t\tget() {\n\t\t\t\treturn readable.pipeThrough(stream).pipeThrough(transformStream);\n\t\t\t}\n\t\t});\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global Worker, URL, TransformStream, WritableStream */\n\nimport {\n\tUNDEFINED_TYPE,\n\tFUNCTION_TYPE\n} from \"./constants.js\";\nimport {\n\tCodecStream,\n\tMESSAGE_EVENT_TYPE,\n\tMESSAGE_START,\n\tMESSAGE_PULL,\n\tMESSAGE_DATA,\n\tMESSAGE_ACK_DATA,\n\tMESSAGE_CLOSE\n} from \"./streams/codec-stream.js\";\n\n// deno-lint-ignore valid-typeof\nconst WEB_WORKERS_SUPPORTED = typeof Worker != UNDEFINED_TYPE;\n\nexport {\n\tCodecWorker\n};\n\nclass CodecWorker {\n\n\tconstructor(workerData, { readable, writable }, { options, config, streamOptions, useWebWorkers, transferStreams, scripts }, onTaskFinished) {\n\t\tconst { signal } = streamOptions;\n\t\tObject.assign(workerData, {\n\t\t\tbusy: true,\n\t\t\treadable: readable.pipeThrough(new ProgressWatcherStream(readable, streamOptions, config), { signal }),\n\t\t\twritable,\n\t\t\toptions: Object.assign({}, options),\n\t\t\tscripts,\n\t\t\ttransferStreams,\n\t\t\tterminate() {\n\t\t\t\tconst { worker, busy } = workerData;\n\t\t\t\tif (worker && !busy) {\n\t\t\t\t\tworker.terminate();\n\t\t\t\t\tworkerData.interface = null;\n\t\t\t\t}\n\t\t\t},\n\t\t\tonTaskFinished() {\n\t\t\t\tworkerData.busy = false;\n\t\t\t\tonTaskFinished(workerData);\n\t\t\t}\n\t\t});\n\t\treturn (useWebWorkers && WEB_WORKERS_SUPPORTED ? createWebWorkerInterface : createWorkerInterface)(workerData, config);\n\t}\n}\n\nclass ProgressWatcherStream extends TransformStream {\n\n\tconstructor(readableSource, { onstart, onprogress, size, onend }, { chunkSize }) {\n\t\tlet chunkOffset = 0;\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tif (onstart) {\n\t\t\t\t\tcallHandler(onstart, size);\n\t\t\t\t}\n\t\t\t},\n\t\t\tasync transform(chunk, controller) {\n\t\t\t\tchunkOffset += chunk.length;\n\t\t\t\tif (onprogress) {\n\t\t\t\t\tawait callHandler(onprogress, chunkOffset, size);\n\t\t\t\t}\n\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t},\n\t\t\tflush() {\n\t\t\t\treadableSource.size = chunkOffset;\n\t\t\t\tif (onend) {\n\t\t\t\t\tcallHandler(onend, chunkOffset);\n\t\t\t\t}\n\t\t\t}\n\t\t}, { highWaterMark: 1, size: () => chunkSize });\n\t}\n}\n\nasync function callHandler(handler, ...parameters) {\n\ttry {\n\t\tawait handler(...parameters);\n\t} catch (_error) {\n\t\t// ignored\n\t}\n}\n\nfunction createWorkerInterface(workerData, config) {\n\treturn {\n\t\trun: () => runWorker(workerData, config)\n\t};\n}\n\nfunction createWebWorkerInterface(workerData, { baseURL, chunkSize }) {\n\tif (!workerData.interface) {\n\t\tObject.assign(workerData, {\n\t\t\tworker: getWebWorker(workerData.scripts[0], baseURL, workerData),\n\t\t\tinterface: {\n\t\t\t\trun: () => runWebWorker(workerData, { chunkSize })\n\t\t\t}\n\t\t});\n\t}\n\treturn workerData.interface;\n}\n\nasync function runWorker({ options, readable, writable, onTaskFinished }, config) {\n\tconst codecStream = new CodecStream(options, config);\n\ttry {\n\t\tawait readable.pipeThrough(codecStream).pipeTo(writable, { preventClose: true, preventAbort: true });\n\t\tconst {\n\t\t\tsignature,\n\t\t\tsize\n\t\t} = codecStream;\n\t\treturn {\n\t\t\tsignature,\n\t\t\tsize\n\t\t};\n\t} finally {\n\t\tonTaskFinished();\n\t}\n}\n\nasync function runWebWorker(workerData, config) {\n\tlet resolveResult, rejectResult;\n\tconst result = new Promise((resolve, reject) => {\n\t\tresolveResult = resolve;\n\t\trejectResult = reject;\n\t});\n\tObject.assign(workerData, {\n\t\treader: null,\n\t\twriter: null,\n\t\tresolveResult,\n\t\trejectResult,\n\t\tresult\n\t});\n\tconst { readable, options, scripts } = workerData;\n\tconst { writable, closed } = watchClosedStream(workerData.writable);\n\tconst streamsTransferred = sendMessage({\n\t\ttype: MESSAGE_START,\n\t\tscripts: scripts.slice(1),\n\t\toptions,\n\t\tconfig,\n\t\treadable,\n\t\twritable\n\t}, workerData);\n\tif (!streamsTransferred) {\n\t\tObject.assign(workerData, {\n\t\t\treader: readable.getReader(),\n\t\t\twriter: writable.getWriter()\n\t\t});\n\t}\n\tconst resultValue = await result;\n\ttry {\n\t\tawait writable.close();\n\t} catch (_error) {\n\t\t// ignored\n\t}\n\tawait closed;\n\treturn resultValue;\n}\n\nfunction watchClosedStream(writableSource) {\n\tconst writer = writableSource.getWriter();\n\tlet resolveStreamClosed;\n\tconst closed = new Promise(resolve => resolveStreamClosed = resolve);\n\tconst writable = new WritableStream({\n\t\tasync write(chunk) {\n\t\t\tawait writer.ready;\n\t\t\tawait writer.write(chunk);\n\t\t},\n\t\tclose() {\n\t\t\twriter.releaseLock();\n\t\t\tresolveStreamClosed();\n\t\t},\n\t\tabort(reason) {\n\t\t\treturn writer.abort(reason);\n\t\t}\n\t});\n\treturn { writable, closed };\n}\n\nlet classicWorkersSupported = true;\nlet transferStreamsSupported = true;\n\nfunction getWebWorker(url, baseURL, workerData) {\n\tconst workerOptions = { type: \"module\" };\n\tlet scriptUrl, worker;\n\t// deno-lint-ignore valid-typeof\n\tif (typeof url == FUNCTION_TYPE) {\n\t\turl = url();\n\t}\n\ttry {\n\t\tscriptUrl = new URL(url, baseURL);\n\t} catch (_error) {\n\t\tscriptUrl = url;\n\t}\n\tif (classicWorkersSupported) {\n\t\ttry {\n\t\t\tworker = new Worker(scriptUrl);\n\t\t} catch (_error) {\n\t\t\tclassicWorkersSupported = false;\n\t\t\tworker = new Worker(scriptUrl, workerOptions);\n\t\t}\n\t} else {\n\t\tworker = new Worker(scriptUrl, workerOptions);\n\t}\n\tworker.addEventListener(MESSAGE_EVENT_TYPE, event => onMessage(event, workerData));\n\treturn worker;\n}\n\nfunction sendMessage(message, { worker, writer, onTaskFinished, transferStreams }) {\n\ttry {\n\t\tlet { value, readable, writable } = message;\n\t\tconst transferables = [];\n\t\tif (value) {\n\t\t\tconst { buffer, length } = value;\n\t\t\tif (length != buffer.byteLength) {\n\t\t\t\tvalue = new Uint8Array(value);\n\t\t\t}\n\t\t\tmessage.value = value.buffer;\n\t\t\ttransferables.push(message.value);\n\t\t}\n\t\tif (transferStreams && transferStreamsSupported) {\n\t\t\tif (readable) {\n\t\t\t\ttransferables.push(readable);\n\t\t\t}\n\t\t\tif (writable) {\n\t\t\t\ttransferables.push(writable);\n\t\t\t}\n\t\t} else {\n\t\t\tmessage.readable = message.writable = null;\n\t\t}\n\t\tif (transferables.length) {\n\t\t\ttry {\n\t\t\t\tworker.postMessage(message, transferables);\n\t\t\t\treturn true;\n\t\t\t} catch (_error) {\n\t\t\t\ttransferStreamsSupported = false;\n\t\t\t\tmessage.readable = message.writable = null;\n\t\t\t\tworker.postMessage(message);\n\t\t\t}\n\t\t} else {\n\t\t\tworker.postMessage(message);\n\t\t}\n\t} catch (error) {\n\t\tif (writer) {\n\t\t\twriter.releaseLock();\n\t\t}\n\t\tonTaskFinished();\n\t\tthrow error;\n\t}\n}\n\nasync function onMessage({ data }, workerData) {\n\tconst { type, value, messageId, result, error } = data;\n\tconst { reader, writer, resolveResult, rejectResult, onTaskFinished } = workerData;\n\ttry {\n\t\tif (error) {\n\t\t\tconst { message, stack, code, name } = error;\n\t\t\tconst responseError = new Error(message);\n\t\t\tObject.assign(responseError, { stack, code, name });\n\t\t\tclose(responseError);\n\t\t} else {\n\t\t\tif (type == MESSAGE_PULL) {\n\t\t\t\tconst { value, done } = await reader.read();\n\t\t\t\tsendMessage({ type: MESSAGE_DATA, value, done, messageId }, workerData);\n\t\t\t}\n\t\t\tif (type == MESSAGE_DATA) {\n\t\t\t\tawait writer.ready;\n\t\t\t\tawait writer.write(new Uint8Array(value));\n\t\t\t\tsendMessage({ type: MESSAGE_ACK_DATA, messageId }, workerData);\n\t\t\t}\n\t\t\tif (type == MESSAGE_CLOSE) {\n\t\t\t\tclose(null, result);\n\t\t\t}\n\t\t}\n\t} catch (error) {\n\t\tclose(error);\n\t}\n\n\tfunction close(error, result) {\n\t\tif (error) {\n\t\t\trejectResult(error);\n\t\t} else {\n\t\t\tresolveResult(result);\n\t\t}\n\t\tif (writer) {\n\t\t\twriter.releaseLock();\n\t\t}\n\t\tonTaskFinished();\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global setTimeout, clearTimeout */\n\nimport { UNDEFINED_VALUE } from \"./constants.js\";\nimport {\n\tCODEC_INFLATE,\n\tCODEC_DEFLATE,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD,\n\tERR_ABORT_CHECK_PASSWORD\n} from \"./streams/codec-stream.js\";\nimport { CodecWorker } from \"./codec-worker.js\";\n\nlet pool = [];\nconst pendingRequests = [];\n\nexport {\n\trunWorker,\n\tterminateWorkers,\n\tCODEC_DEFLATE,\n\tCODEC_INFLATE,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD,\n\tERR_ABORT_CHECK_PASSWORD\n};\n\nlet indexWorker = 0;\n\nasync function runWorker(stream, workerOptions) {\n\tconst { options, config } = workerOptions;\n\tconst { transferStreams, useWebWorkers, useCompressionStream, codecType, compressed, signed, encrypted } = options;\n\tconst { workerScripts, maxWorkers, terminateWorkerTimeout } = config;\n\tworkerOptions.transferStreams = transferStreams || transferStreams === UNDEFINED_VALUE;\n\tconst streamCopy = !compressed && !signed && !encrypted && !workerOptions.transferStreams;\n\tworkerOptions.useWebWorkers = !streamCopy && (useWebWorkers || (useWebWorkers === UNDEFINED_VALUE && config.useWebWorkers));\n\tworkerOptions.scripts = workerOptions.useWebWorkers && workerScripts ? workerScripts[codecType] : [];\n\toptions.useCompressionStream = useCompressionStream || (useCompressionStream === UNDEFINED_VALUE && config.useCompressionStream);\n\tlet worker;\n\tconst workerData = pool.find(workerData => !workerData.busy);\n\tif (workerData) {\n\t\tclearTerminateTimeout(workerData);\n\t\tworker = new CodecWorker(workerData, stream, workerOptions, onTaskFinished);\n\t} else if (pool.length < maxWorkers) {\n\t\tconst workerData = { indexWorker };\n\t\tindexWorker++;\n\t\tpool.push(workerData);\n\t\tworker = new CodecWorker(workerData, stream, workerOptions, onTaskFinished);\n\t} else {\n\t\tworker = await new Promise(resolve => pendingRequests.push({ resolve, stream, workerOptions }));\n\t}\n\treturn worker.run();\n\n\tfunction onTaskFinished(workerData) {\n\t\tif (pendingRequests.length) {\n\t\t\tconst [{ resolve, stream, workerOptions }] = pendingRequests.splice(0, 1);\n\t\t\tresolve(new CodecWorker(workerData, stream, workerOptions, onTaskFinished));\n\t\t} else if (workerData.worker) {\n\t\t\tclearTerminateTimeout(workerData);\n\t\t\tif (Number.isFinite(terminateWorkerTimeout) && terminateWorkerTimeout >= 0) {\n\t\t\t\tworkerData.terminateTimeout = setTimeout(() => {\n\t\t\t\t\tpool = pool.filter(data => data != workerData);\n\t\t\t\t\tworkerData.terminate();\n\t\t\t\t}, terminateWorkerTimeout);\n\t\t\t}\n\t\t} else {\n\t\t\tpool = pool.filter(data => data != workerData);\n\t\t}\n\t}\n}\n\nfunction clearTerminateTimeout(workerData) {\n\tconst { terminateTimeout } = workerData;\n\tif (terminateTimeout) {\n\t\tclearTimeout(terminateTimeout);\n\t\tworkerData.terminateTimeout = null;\n\t}\n}\n\nfunction terminateWorkers() {\n\tpool.forEach(workerData => {\n\t\tclearTerminateTimeout(workerData);\n\t\tworkerData.terminate();\n\t});\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global Blob, atob, btoa, XMLHttpRequest, URL, fetch, ReadableStream, WritableStream, FileReader, TransformStream, Response */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tUNDEFINED_VALUE,\n\tFUNCTION_TYPE\n} from \"./constants.js\";\nimport { getConfiguration } from \"./configuration.js\";\n\nconst ERR_HTTP_STATUS = \"HTTP error \";\nconst ERR_HTTP_RANGE = \"HTTP Range not supported\";\nconst ERR_ITERATOR_COMPLETED_TOO_SOON = \"Writer iterator completed too soon\";\n\nconst CONTENT_TYPE_TEXT_PLAIN = \"text/plain\";\nconst HTTP_HEADER_CONTENT_LENGTH = \"Content-Length\";\nconst HTTP_HEADER_CONTENT_RANGE = \"Content-Range\";\nconst HTTP_HEADER_ACCEPT_RANGES = \"Accept-Ranges\";\nconst HTTP_HEADER_RANGE = \"Range\";\nconst HTTP_HEADER_CONTENT_TYPE = \"Content-Type\";\nconst HTTP_METHOD_HEAD = \"HEAD\";\nconst HTTP_METHOD_GET = \"GET\";\nconst HTTP_RANGE_UNIT = \"bytes\";\nconst DEFAULT_CHUNK_SIZE = 64 * 1024;\n\nconst PROPERTY_NAME_WRITABLE = \"writable\";\n\nclass Stream {\n\n\tconstructor() {\n\t\tthis.size = 0;\n\t}\n\n\tinit() {\n\t\tthis.initialized = true;\n\t}\n}\n\nclass Reader extends Stream {\n\n\tget readable() {\n\t\tconst reader = this;\n\t\tconst { chunkSize = DEFAULT_CHUNK_SIZE } = reader;\n\t\tconst readable = new ReadableStream({\n\t\t\tstart() {\n\t\t\t\tthis.chunkOffset = 0;\n\t\t\t},\n\t\t\tasync pull(controller) {\n\t\t\t\tconst { offset = 0, size, diskNumberStart } = readable;\n\t\t\t\tconst { chunkOffset } = this;\n\t\t\t\tcontroller.enqueue(await readUint8Array(reader, offset + chunkOffset, Math.min(chunkSize, size - chunkOffset), diskNumberStart));\n\t\t\t\tif (chunkOffset + chunkSize > size) {\n\t\t\t\t\tcontroller.close();\n\t\t\t\t} else {\n\t\t\t\t\tthis.chunkOffset += chunkSize;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\treturn readable;\n\t}\n}\n\nclass Writer extends Stream {\n\n\tconstructor() {\n\t\tsuper();\n\t\tconst writer = this;\n\t\tconst writable = new WritableStream({\n\t\t\twrite(chunk) {\n\t\t\t\treturn writer.writeUint8Array(chunk);\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(writer, PROPERTY_NAME_WRITABLE, {\n\t\t\tget() {\n\t\t\t\treturn writable;\n\t\t\t}\n\t\t});\n\t}\n\n\twriteUint8Array() {\n\t\t// abstract\n\t}\n}\n\nclass Data64URIReader extends Reader {\n\n\tconstructor(dataURI) {\n\t\tsuper();\n\t\tlet dataEnd = dataURI.length;\n\t\twhile (dataURI.charAt(dataEnd - 1) == \"=\") {\n\t\t\tdataEnd--;\n\t\t}\n\t\tconst dataStart = dataURI.indexOf(\",\") + 1;\n\t\tObject.assign(this, {\n\t\t\tdataURI,\n\t\t\tdataStart,\n\t\t\tsize: Math.floor((dataEnd - dataStart) * 0.75)\n\t\t});\n\t}\n\n\treadUint8Array(offset, length) {\n\t\tconst {\n\t\t\tdataStart,\n\t\t\tdataURI\n\t\t} = this;\n\t\tconst dataArray = new Uint8Array(length);\n\t\tconst start = Math.floor(offset / 3) * 4;\n\t\tconst bytes = atob(dataURI.substring(start + dataStart, Math.ceil((offset + length) / 3) * 4 + dataStart));\n\t\tconst delta = offset - Math.floor(start / 4) * 3;\n\t\tfor (let indexByte = delta; indexByte < delta + length; indexByte++) {\n\t\t\tdataArray[indexByte - delta] = bytes.charCodeAt(indexByte);\n\t\t}\n\t\treturn dataArray;\n\t}\n}\n\nclass Data64URIWriter extends Writer {\n\n\tconstructor(contentType) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\tdata: \"data:\" + (contentType || \"\") + \";base64,\",\n\t\t\tpending: []\n\t\t});\n\t}\n\n\twriteUint8Array(array) {\n\t\tconst writer = this;\n\t\tlet indexArray = 0;\n\t\tlet dataString = writer.pending;\n\t\tconst delta = writer.pending.length;\n\t\twriter.pending = \"\";\n\t\tfor (indexArray = 0; indexArray < (Math.floor((delta + array.length) / 3) * 3) - delta; indexArray++) {\n\t\t\tdataString += String.fromCharCode(array[indexArray]);\n\t\t}\n\t\tfor (; indexArray < array.length; indexArray++) {\n\t\t\twriter.pending += String.fromCharCode(array[indexArray]);\n\t\t}\n\t\tif (dataString.length > 2) {\n\t\t\twriter.data += btoa(dataString);\n\t\t} else {\n\t\t\twriter.pending = dataString;\n\t\t}\n\t}\n\n\tgetData() {\n\t\treturn this.data + btoa(this.pending);\n\t}\n}\n\nclass BlobReader extends Reader {\n\n\tconstructor(blob) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\tblob,\n\t\t\tsize: blob.size\n\t\t});\n\t}\n\n\tasync readUint8Array(offset, length) {\n\t\tconst reader = this;\n\t\tconst offsetEnd = offset + length;\n\t\tconst blob = offset || offsetEnd < reader.size ? reader.blob.slice(offset, offsetEnd) : reader.blob;\n\t\treturn new Uint8Array(await blob.arrayBuffer());\n\t}\n}\n\nclass BlobWriter extends Stream {\n\n\tconstructor(contentType) {\n\t\tsuper();\n\t\tconst writer = this;\n\t\tconst transformStream = new TransformStream();\n\t\tconst headers = [];\n\t\tif (contentType) {\n\t\t\theaders.push([HTTP_HEADER_CONTENT_TYPE, contentType]);\n\t\t}\n\t\tObject.defineProperty(writer, PROPERTY_NAME_WRITABLE, {\n\t\t\tget() {\n\t\t\t\treturn transformStream.writable;\n\t\t\t}\n\t\t});\n\t\twriter.blob = new Response(transformStream.readable, { headers }).blob();\n\t}\n\n\tgetData() {\n\t\treturn this.blob;\n\t}\n}\n\nclass TextReader extends BlobReader {\n\n\tconstructor(text) {\n\t\tsuper(new Blob([text], { type: CONTENT_TYPE_TEXT_PLAIN }));\n\t}\n}\n\nclass TextWriter extends BlobWriter {\n\n\tconstructor(encoding) {\n\t\tsuper(encoding);\n\t\tObject.assign(this, {\n\t\t\tencoding,\n\t\t\tutf8: !encoding || encoding.toLowerCase() == \"utf-8\"\n\t\t});\n\t}\n\n\tasync getData() {\n\t\tconst {\n\t\t\tencoding,\n\t\t\tutf8\n\t\t} = this;\n\t\tconst blob = await super.getData();\n\t\tif (blob.text && utf8) {\n\t\t\treturn blob.text();\n\t\t} else {\n\t\t\tconst reader = new FileReader();\n\t\t\treturn new Promise((resolve, reject) => {\n\t\t\t\tObject.assign(reader, {\n\t\t\t\t\tonload: ({ target }) => resolve(target.result),\n\t\t\t\t\tonerror: () => reject(reader.error)\n\t\t\t\t});\n\t\t\t\treader.readAsText(blob, encoding);\n\t\t\t});\n\t\t}\n\t}\n}\n\nclass FetchReader extends Reader {\n\n\tconstructor(url, options) {\n\t\tsuper();\n\t\tcreateHtpReader(this, url, options);\n\t}\n\n\tasync init() {\n\t\tawait initHttpReader(this, sendFetchRequest, getFetchRequestData);\n\t\tsuper.init();\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn readUint8ArrayHttpReader(this, index, length, sendFetchRequest, getFetchRequestData);\n\t}\n}\n\nclass XHRReader extends Reader {\n\n\tconstructor(url, options) {\n\t\tsuper();\n\t\tcreateHtpReader(this, url, options);\n\t}\n\n\tasync init() {\n\t\tawait initHttpReader(this, sendXMLHttpRequest, getXMLHttpRequestData);\n\t\tsuper.init();\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn readUint8ArrayHttpReader(this, index, length, sendXMLHttpRequest, getXMLHttpRequestData);\n\t}\n}\n\nfunction createHtpReader(httpReader, url, options) {\n\tconst {\n\t\tpreventHeadRequest,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests\n\t} = options;\n\toptions = Object.assign({}, options);\n\tdelete options.preventHeadRequest;\n\tdelete options.useRangeHeader;\n\tdelete options.forceRangeRequests;\n\tdelete options.useXHR;\n\tObject.assign(httpReader, {\n\t\turl,\n\t\toptions,\n\t\tpreventHeadRequest,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests\n\t});\n}\n\nasync function initHttpReader(httpReader, sendRequest, getRequestData) {\n\tconst {\n\t\turl,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests\n\t} = httpReader;\n\tif (isHttpFamily(url) && (useRangeHeader || forceRangeRequests)) {\n\t\tconst { headers } = await sendRequest(HTTP_METHOD_GET, httpReader, getRangeHeaders(httpReader));\n\t\tif (!forceRangeRequests && headers.get(HTTP_HEADER_ACCEPT_RANGES) != HTTP_RANGE_UNIT) {\n\t\t\tthrow new Error(ERR_HTTP_RANGE);\n\t\t} else {\n\t\t\tlet contentSize;\n\t\t\tconst contentRangeHeader = headers.get(HTTP_HEADER_CONTENT_RANGE);\n\t\t\tif (contentRangeHeader) {\n\t\t\t\tconst splitHeader = contentRangeHeader.trim().split(/\\s*\\/\\s*/);\n\t\t\t\tif (splitHeader.length) {\n\t\t\t\t\tconst headerValue = splitHeader[1];\n\t\t\t\t\tif (headerValue && headerValue != \"*\") {\n\t\t\t\t\t\tcontentSize = Number(headerValue);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (contentSize === UNDEFINED_VALUE) {\n\t\t\t\tawait getContentLength(httpReader, sendRequest, getRequestData);\n\t\t\t} else {\n\t\t\t\thttpReader.size = contentSize;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tawait getContentLength(httpReader, sendRequest, getRequestData);\n\t}\n}\n\nasync function readUint8ArrayHttpReader(httpReader, index, length, sendRequest, getRequestData) {\n\tconst {\n\t\tuseRangeHeader,\n\t\tforceRangeRequests,\n\t\toptions\n\t} = httpReader;\n\tif (useRangeHeader || forceRangeRequests) {\n\t\tconst response = await sendRequest(HTTP_METHOD_GET, httpReader, getRangeHeaders(httpReader, index, length));\n\t\tif (response.status != 206) {\n\t\t\tthrow new Error(ERR_HTTP_RANGE);\n\t\t}\n\t\treturn new Uint8Array(await response.arrayBuffer());\n\t} else {\n\t\tconst { data } = httpReader;\n\t\tif (!data) {\n\t\t\tawait getRequestData(httpReader, options);\n\t\t}\n\t\treturn new Uint8Array(httpReader.data.subarray(index, index + length));\n\t}\n}\n\nfunction getRangeHeaders(httpReader, index = 0, length = 1) {\n\treturn Object.assign({}, getHeaders(httpReader), { [HTTP_HEADER_RANGE]: HTTP_RANGE_UNIT + \"=\" + index + \"-\" + (index + length - 1) });\n}\n\nfunction getHeaders({ options }) {\n\tconst { headers } = options;\n\tif (headers) {\n\t\tif (Symbol.iterator in headers) {\n\t\t\treturn Object.fromEntries(headers);\n\t\t} else {\n\t\t\treturn headers;\n\t\t}\n\t}\n}\n\nasync function getFetchRequestData(httpReader) {\n\tawait getRequestData(httpReader, sendFetchRequest);\n}\n\nasync function getXMLHttpRequestData(httpReader) {\n\tawait getRequestData(httpReader, sendXMLHttpRequest);\n}\n\nasync function getRequestData(httpReader, sendRequest) {\n\tconst response = await sendRequest(HTTP_METHOD_GET, httpReader, getHeaders(httpReader));\n\thttpReader.data = new Uint8Array(await response.arrayBuffer());\n\tif (!httpReader.size) {\n\t\thttpReader.size = httpReader.data.length;\n\t}\n}\n\nasync function getContentLength(httpReader, sendRequest, getRequestData) {\n\tif (httpReader.preventHeadRequest) {\n\t\tawait getRequestData(httpReader, httpReader.options);\n\t} else {\n\t\tconst response = await sendRequest(HTTP_METHOD_HEAD, httpReader, getHeaders(httpReader));\n\t\tconst contentLength = response.headers.get(HTTP_HEADER_CONTENT_LENGTH);\n\t\tif (contentLength) {\n\t\t\thttpReader.size = Number(contentLength);\n\t\t} else {\n\t\t\tawait getRequestData(httpReader, httpReader.options);\n\t\t}\n\t}\n}\n\nasync function sendFetchRequest(method, { options, url }, headers) {\n\tconst response = await fetch(url, Object.assign({}, options, { method, headers }));\n\tif (response.status < 400) {\n\t\treturn response;\n\t} else {\n\t\tthrow response.status == 416 ? new Error(ERR_HTTP_RANGE) : new Error(ERR_HTTP_STATUS + (response.statusText || response.status));\n\t}\n}\n\nfunction sendXMLHttpRequest(method, { url }, headers) {\n\treturn new Promise((resolve, reject) => {\n\t\tconst request = new XMLHttpRequest();\n\t\trequest.addEventListener(\"load\", () => {\n\t\t\tif (request.status < 400) {\n\t\t\t\tconst headers = [];\n\t\t\t\trequest.getAllResponseHeaders().trim().split(/[\\r\\n]+/).forEach(header => {\n\t\t\t\t\tconst splitHeader = header.trim().split(/\\s*:\\s*/);\n\t\t\t\t\tsplitHeader[0] = splitHeader[0].trim().replace(/^[a-z]|-[a-z]/g, value => value.toUpperCase());\n\t\t\t\t\theaders.push(splitHeader);\n\t\t\t\t});\n\t\t\t\tresolve({\n\t\t\t\t\tstatus: request.status,\n\t\t\t\t\tarrayBuffer: () => request.response,\n\t\t\t\t\theaders: new Map(headers)\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\treject(request.status == 416 ? new Error(ERR_HTTP_RANGE) : new Error(ERR_HTTP_STATUS + (request.statusText || request.status)));\n\t\t\t}\n\t\t}, false);\n\t\trequest.addEventListener(\"error\", event => reject(event.detail.error), false);\n\t\trequest.open(method, url);\n\t\tif (headers) {\n\t\t\tfor (const entry of Object.entries(headers)) {\n\t\t\t\trequest.setRequestHeader(entry[0], entry[1]);\n\t\t\t}\n\t\t}\n\t\trequest.responseType = \"arraybuffer\";\n\t\trequest.send();\n\t});\n}\n\nclass HttpReader extends Reader {\n\n\tconstructor(url, options = {}) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\turl,\n\t\t\treader: options.useXHR ? new XHRReader(url, options) : new FetchReader(url, options)\n\t\t});\n\t}\n\n\tset size(value) {\n\t\t// ignored\n\t}\n\n\tget size() {\n\t\treturn this.reader.size;\n\t}\n\n\tasync init() {\n\t\tawait this.reader.init();\n\t\tsuper.init();\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn this.reader.readUint8Array(index, length);\n\t}\n}\n\nclass HttpRangeReader extends HttpReader {\n\n\tconstructor(url, options = {}) {\n\t\toptions.useRangeHeader = true;\n\t\tsuper(url, options);\n\t}\n}\n\n\nclass Uint8ArrayReader extends Reader {\n\n\tconstructor(array) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\tarray,\n\t\t\tsize: array.length\n\t\t});\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn this.array.slice(index, index + length);\n\t}\n}\n\nclass Uint8ArrayWriter extends Writer {\n\n\tinit(initSize = 0) {\n\t\tObject.assign(this, {\n\t\t\toffset: 0,\n\t\t\tarray: new Uint8Array(initSize)\n\t\t});\n\t\tsuper.init();\n\t}\n\n\twriteUint8Array(array) {\n\t\tconst writer = this;\n\t\tif (writer.offset + array.length > writer.array.length) {\n\t\t\tconst previousArray = writer.array;\n\t\t\twriter.array = new Uint8Array(previousArray.length + array.length);\n\t\t\twriter.array.set(previousArray);\n\t\t}\n\t\twriter.array.set(array, writer.offset);\n\t\twriter.offset += array.length;\n\t}\n\n\tgetData() {\n\t\treturn this.array;\n\t}\n}\n\nclass SplitDataReader extends Reader {\n\n\tconstructor(readers) {\n\t\tsuper();\n\t\tthis.readers = readers;\n\t}\n\n\tasync init() {\n\t\tconst reader = this;\n\t\tconst { readers } = reader;\n\t\treader.lastDiskNumber = 0;\n\t\tawait Promise.all(readers.map(async diskReader => {\n\t\t\tawait diskReader.init();\n\t\t\treader.size += diskReader.size;\n\t\t}));\n\t\tsuper.init();\n\t}\n\n\tasync readUint8Array(offset, length, diskNumber = 0) {\n\t\tconst reader = this;\n\t\tconst { readers } = this;\n\t\tlet result;\n\t\tlet currentDiskNumber = diskNumber;\n\t\tif (currentDiskNumber == -1) {\n\t\t\tcurrentDiskNumber = readers.length - 1;\n\t\t}\n\t\tlet currentReaderOffset = offset;\n\t\twhile (currentReaderOffset >= readers[currentDiskNumber].size) {\n\t\t\tcurrentReaderOffset -= readers[currentDiskNumber].size;\n\t\t\tcurrentDiskNumber++;\n\t\t}\n\t\tconst currentReader = readers[currentDiskNumber];\n\t\tconst currentReaderSize = currentReader.size;\n\t\tif (currentReaderOffset + length <= currentReaderSize) {\n\t\t\tresult = await readUint8Array(currentReader, currentReaderOffset, length);\n\t\t} else {\n\t\t\tconst chunkLength = currentReaderSize - currentReaderOffset;\n\t\t\tresult = new Uint8Array(length);\n\t\t\tresult.set(await readUint8Array(currentReader, currentReaderOffset, chunkLength));\n\t\t\tresult.set(await reader.readUint8Array(offset + chunkLength, length - chunkLength, diskNumber), chunkLength);\n\t\t}\n\t\treader.lastDiskNumber = Math.max(currentDiskNumber, reader.lastDiskNumber);\n\t\treturn result;\n\t}\n}\n\nclass SplitDataWriter extends Stream {\n\n\tconstructor(writerGenerator, maxSize = 4294967295) {\n\t\tsuper();\n\t\tconst zipWriter = this;\n\t\tObject.assign(zipWriter, {\n\t\t\tdiskNumber: 0,\n\t\t\tdiskOffset: 0,\n\t\t\tsize: 0,\n\t\t\tmaxSize,\n\t\t\tavailableSize: maxSize\n\t\t});\n\t\tlet diskSourceWriter, diskWritable, diskWriter;\n\t\tconst writable = new WritableStream({\n\t\t\tasync write(chunk) {\n\t\t\t\tconst { availableSize } = zipWriter;\n\t\t\t\tif (!diskWriter) {\n\t\t\t\t\tconst { value, done } = await writerGenerator.next();\n\t\t\t\t\tif (done && !value) {\n\t\t\t\t\t\tthrow new Error(ERR_ITERATOR_COMPLETED_TOO_SOON);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdiskSourceWriter = value;\n\t\t\t\t\t\tdiskSourceWriter.size = 0;\n\t\t\t\t\t\tif (diskSourceWriter.maxSize) {\n\t\t\t\t\t\t\tzipWriter.maxSize = diskSourceWriter.maxSize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tzipWriter.availableSize = zipWriter.maxSize;\n\t\t\t\t\t\tawait initStream(diskSourceWriter);\n\t\t\t\t\t\tdiskWritable = value.writable;\n\t\t\t\t\t\tdiskWriter = diskWritable.getWriter();\n\t\t\t\t\t}\n\t\t\t\t\tawait this.write(chunk);\n\t\t\t\t} else if (chunk.length >= availableSize) {\n\t\t\t\t\tawait writeChunk(chunk.slice(0, availableSize));\n\t\t\t\t\tawait closeDisk();\n\t\t\t\t\tzipWriter.diskOffset += diskSourceWriter.size;\n\t\t\t\t\tzipWriter.diskNumber++;\n\t\t\t\t\tdiskWriter = null;\n\t\t\t\t\tawait this.write(chunk.slice(availableSize));\n\t\t\t\t} else {\n\t\t\t\t\tawait writeChunk(chunk);\n\t\t\t\t}\n\t\t\t},\n\t\t\tasync close() {\n\t\t\t\tawait diskWriter.ready;\n\t\t\t\tawait closeDisk();\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(zipWriter, PROPERTY_NAME_WRITABLE, {\n\t\t\tget() {\n\t\t\t\treturn writable;\n\t\t\t}\n\t\t});\n\n\t\tasync function writeChunk(chunk) {\n\t\t\tconst chunkLength = chunk.length;\n\t\t\tif (chunkLength) {\n\t\t\t\tawait diskWriter.ready;\n\t\t\t\tawait diskWriter.write(chunk);\n\t\t\t\tdiskSourceWriter.size += chunkLength;\n\t\t\t\tzipWriter.size += chunkLength;\n\t\t\t\tzipWriter.availableSize -= chunkLength;\n\t\t\t}\n\t\t}\n\n\t\tasync function closeDisk() {\n\t\t\tdiskWritable.size = diskSourceWriter.size;\n\t\t\tawait diskWriter.close();\n\t\t}\n\t}\n}\n\nfunction isHttpFamily(url) {\n\tconst { baseURL } = getConfiguration();\n\tconst { protocol } = new URL(url, baseURL);\n\treturn protocol == \"http:\" || protocol == \"https:\";\n}\n\nasync function initStream(stream, initSize) {\n\tif (stream.init && !stream.initialized) {\n\t\tawait stream.init(initSize);\n\t}\n}\n\nfunction initReader(reader) {\n\tif (Array.isArray(reader)) {\n\t\treader = new SplitDataReader(reader);\n\t}\n\tif (reader instanceof ReadableStream) {\n\t\treader = {\n\t\t\treadable: reader\n\t\t};\n\t}\n\treturn reader;\n}\n\nfunction initWriter(writer) {\n\tif (writer.writable === UNDEFINED_VALUE && typeof writer.next == FUNCTION_TYPE) {\n\t\twriter = new SplitDataWriter(writer);\n\t}\n\tif (writer instanceof WritableStream) {\n\t\twriter = {\n\t\t\twritable: writer\n\t\t};\n\t}\n\tconst { writable } = writer;\n\tif (writable.size === UNDEFINED_VALUE) {\n\t\twritable.size = 0;\n\t}\n\tconst splitZipFile = writer instanceof SplitDataWriter;\n\tif (!splitZipFile) {\n\t\tObject.assign(writer, {\n\t\t\tdiskNumber: 0,\n\t\t\tdiskOffset: 0,\n\t\t\tavailableSize: Infinity,\n\t\t\tmaxSize: Infinity\n\t\t});\n\t}\n\treturn writer;\n}\n\nfunction readUint8Array(reader, offset, size, diskNumber) {\n\treturn reader.readUint8Array(offset, size, diskNumber);\n}\n\nconst SplitZipReader = SplitDataReader;\nconst SplitZipWriter = SplitDataWriter;\n\nexport {\n\tinitStream,\n\tinitReader,\n\tinitWriter,\n\treadUint8Array,\n\tReader,\n\tWriter,\n\tTextReader,\n\tTextWriter,\n\tData64URIReader,\n\tData64URIWriter,\n\tBlobReader,\n\tBlobWriter,\n\tUint8ArrayReader,\n\tUint8ArrayWriter,\n\tHttpReader,\n\tHttpRangeReader,\n\tSplitZipReader,\n\tSplitZipWriter,\n\tSplitDataReader,\n\tSplitDataWriter,\n\tERR_HTTP_RANGE,\n\tERR_ITERATOR_COMPLETED_TOO_SOON\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TextDecoder */\n\nconst CP437 = \"\\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\\\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ \".split(\"\");\nconst VALID_CP437 = CP437.length == 256;\n\nexport {\n\tdecodeCP437\n};\n\nfunction decodeCP437(stringValue) {\n\tif (VALID_CP437) {\n\t\tlet result = \"\";\n\t\tfor (let indexCharacter = 0; indexCharacter < stringValue.length; indexCharacter++) {\n\t\t\tresult += CP437[stringValue[indexCharacter]];\n\t\t}\n\t\treturn result;\n\t} else {\n\t\treturn new TextDecoder().decode(stringValue);\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TextDecoder */\n\nimport { decodeCP437 } from \"./cp437-decode.js\";\n\nexport {\n\tdecodeText\n};\n\nfunction decodeText(value, encoding) {\n\tif (encoding && encoding.trim().toLowerCase() == \"cp437\") {\n\t\treturn decodeCP437(value);\n\t} else {\n\t\treturn new TextDecoder(encoding).decode(value);\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nconst PROPERTY_NAME_FILENAME = \"filename\";\nconst PROPERTY_NAME_RAW_FILENAME = \"rawFilename\";\nconst PROPERTY_NAME_COMMENT = \"comment\";\nconst PROPERTY_NAME_RAW_COMMENT = \"rawComment\";\nconst PROPERTY_NAME_UNCOMPPRESSED_SIZE = \"uncompressedSize\";\nconst PROPERTY_NAME_COMPPRESSED_SIZE = \"compressedSize\";\nconst PROPERTY_NAME_OFFSET = \"offset\";\nconst PROPERTY_NAME_DISK_NUMBER_START = \"diskNumberStart\";\nconst PROPERTY_NAME_LAST_MODIFICATION_DATE = \"lastModDate\";\nconst PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE = \"rawLastModDate\";\nconst PROPERTY_NAME_LAST_ACCESS_DATE = \"lastAccessDate\";\nconst PROPERTY_NAME_RAW_LAST_ACCESS_DATE = \"rawLastAccessDate\";\nconst PROPERTY_NAME_CREATION_DATE = \"creationDate\";\nconst PROPERTY_NAME_RAW_CREATION_DATE = \"rawCreationDate\";\nconst PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE = \"internalFileAttribute\";\nconst PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE = \"externalFileAttribute\";\nconst PROPERTY_NAME_MS_DOS_COMPATIBLE = \"msDosCompatible\";\nconst PROPERTY_NAME_ZIP64 = \"zip64\";\n\nconst PROPERTY_NAMES = [\n\tPROPERTY_NAME_FILENAME, PROPERTY_NAME_RAW_FILENAME, PROPERTY_NAME_COMPPRESSED_SIZE, PROPERTY_NAME_UNCOMPPRESSED_SIZE,\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE, PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE, PROPERTY_NAME_COMMENT, PROPERTY_NAME_RAW_COMMENT,\n\tPROPERTY_NAME_LAST_ACCESS_DATE, PROPERTY_NAME_CREATION_DATE, PROPERTY_NAME_OFFSET, PROPERTY_NAME_DISK_NUMBER_START,\n\tPROPERTY_NAME_DISK_NUMBER_START, PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE, PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_MS_DOS_COMPATIBLE, PROPERTY_NAME_ZIP64,\n\t\"directory\", \"bitFlag\", \"encrypted\", \"signature\", \"filenameUTF8\", \"commentUTF8\", \"compressionMethod\", \"version\", \"versionMadeBy\",\n\t\"extraField\", \"rawExtraField\", \"extraFieldZip64\", \"extraFieldUnicodePath\", \"extraFieldUnicodeComment\", \"extraFieldAES\", \"extraFieldNTFS\",\n\t\"extraFieldExtendedTimestamp\"];\n\nclass Entry {\n\n\tconstructor(data) {\n\t\tPROPERTY_NAMES.forEach(name => this[name] = data[name]);\n\t}\n\n}\n\nexport {\n\tPROPERTY_NAME_FILENAME,\n\tPROPERTY_NAME_RAW_FILENAME,\n\tPROPERTY_NAME_COMMENT,\n\tPROPERTY_NAME_RAW_COMMENT,\n\tPROPERTY_NAME_UNCOMPPRESSED_SIZE,\n\tPROPERTY_NAME_COMPPRESSED_SIZE,\n\tPROPERTY_NAME_OFFSET,\n\tPROPERTY_NAME_DISK_NUMBER_START,\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_RAW_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_RAW_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_CREATION_DATE,\n\tPROPERTY_NAME_RAW_CREATION_DATE,\n\tPROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_MS_DOS_COMPATIBLE,\n\tPROPERTY_NAME_ZIP64,\n\tEntry\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global BigInt, Response, WritableStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tMAX_32_BITS,\n\tMAX_16_BITS,\n\tCOMPRESSION_METHOD_DEFLATE,\n\tCOMPRESSION_METHOD_STORE,\n\tCOMPRESSION_METHOD_AES,\n\tSPLIT_ZIP_FILE_SIGNATURE,\n\tLOCAL_FILE_HEADER_SIGNATURE,\n\tCENTRAL_FILE_HEADER_SIGNATURE,\n\tEND_OF_CENTRAL_DIR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_SIGNATURE,\n\tEXTRAFIELD_TYPE_ZIP64,\n\tEXTRAFIELD_TYPE_UNICODE_PATH,\n\tEXTRAFIELD_TYPE_UNICODE_COMMENT,\n\tEXTRAFIELD_TYPE_AES,\n\tEXTRAFIELD_TYPE_NTFS,\n\tEXTRAFIELD_TYPE_NTFS_TAG1,\n\tEXTRAFIELD_TYPE_EXTENDED_TIMESTAMP,\n\tEND_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LENGTH,\n\tBITFLAG_ENCRYPTED,\n\tBITFLAG_LEVEL,\n\tBITFLAG_DATA_DESCRIPTOR,\n\tBITFLAG_LANG_ENCODING_FLAG,\n\tFILE_ATTR_MSDOS_DIR_MASK,\n\tDIRECTORY_SIGNATURE,\n\tUNDEFINED_VALUE\n} from \"./constants.js\";\nimport {\n\tgetConfiguration,\n\tgetChunkSize\n} from \"./configuration.js\";\nimport {\n\trunWorker,\n\tCODEC_INFLATE,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD,\n\tERR_ABORT_CHECK_PASSWORD\n} from \"./codec-pool.js\";\nimport {\n\tinitStream,\n\tinitReader,\n\tinitWriter,\n\treadUint8Array,\n\tBlobReader\n} from \"./io.js\";\nimport { decodeText } from \"./util/decode-text.js\";\nimport { Crc32 } from \"./streams/codecs/crc32.js\";\nimport {\n\tPROPERTY_NAME_RAW_FILENAME,\n\tPROPERTY_NAME_FILENAME,\n\tPROPERTY_NAME_RAW_COMMENT,\n\tPROPERTY_NAME_COMMENT,\n\tPROPERTY_NAME_UNCOMPPRESSED_SIZE,\n\tPROPERTY_NAME_COMPPRESSED_SIZE,\n\tPROPERTY_NAME_OFFSET,\n\tPROPERTY_NAME_DISK_NUMBER_START,\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_RAW_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_RAW_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_CREATION_DATE,\n\tPROPERTY_NAME_RAW_CREATION_DATE,\n\tEntry\n} from \"./zip-entry.js\";\n\nconst ERR_BAD_FORMAT = \"File format is not recognized\";\nconst ERR_EOCDR_NOT_FOUND = \"End of central directory not found\";\nconst ERR_EOCDR_ZIP64_NOT_FOUND = \"End of Zip64 central directory not found\";\nconst ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND = \"End of Zip64 central directory locator not found\";\nconst ERR_CENTRAL_DIRECTORY_NOT_FOUND = \"Central directory header not found\";\nconst ERR_LOCAL_FILE_HEADER_NOT_FOUND = \"Local file header not found\";\nconst ERR_EXTRAFIELD_ZIP64_NOT_FOUND = \"Zip64 extra field not found\";\nconst ERR_ENCRYPTED = \"File contains encrypted entry\";\nconst ERR_UNSUPPORTED_ENCRYPTION = \"Encryption method not supported\";\nconst ERR_UNSUPPORTED_COMPRESSION = \"Compression method not supported\";\nconst ERR_SPLIT_ZIP_FILE = \"Split zip file\";\nconst CHARSET_UTF8 = \"utf-8\";\nconst CHARSET_CP437 = \"cp437\";\nconst ZIP64_PROPERTIES = [\n\t[PROPERTY_NAME_UNCOMPPRESSED_SIZE, MAX_32_BITS],\n\t[PROPERTY_NAME_COMPPRESSED_SIZE, MAX_32_BITS],\n\t[PROPERTY_NAME_OFFSET, MAX_32_BITS],\n\t[PROPERTY_NAME_DISK_NUMBER_START, MAX_16_BITS]\n];\nconst ZIP64_EXTRACTION = {\n\t[MAX_16_BITS]: {\n\t\tgetValue: getUint32,\n\t\tbytes: 4\n\t},\n\t[MAX_32_BITS]: {\n\t\tgetValue: getBigUint64,\n\t\tbytes: 8\n\t}\n};\n\nclass ZipReader {\n\n\tconstructor(reader, options = {}) {\n\t\tObject.assign(this, {\n\t\t\treader: initReader(reader),\n\t\t\toptions,\n\t\t\tconfig: getConfiguration()\n\t\t});\n\t}\n\n\tasync* getEntriesGenerator(options = {}) {\n\t\tconst zipReader = this;\n\t\tlet { reader } = zipReader;\n\t\tconst { config } = zipReader;\n\t\tawait initStream(reader);\n\t\tif (reader.size === UNDEFINED_VALUE || !reader.readUint8Array) {\n\t\t\treader = new BlobReader(await new Response(reader.readable).blob());\n\t\t\tawait initStream(reader);\n\t\t}\n\t\tif (reader.size < END_OF_CENTRAL_DIR_LENGTH) {\n\t\t\tthrow new Error(ERR_BAD_FORMAT);\n\t\t}\n\t\treader.chunkSize = getChunkSize(config);\n\t\tconst endOfDirectoryInfo = await seekSignature(reader, END_OF_CENTRAL_DIR_SIGNATURE, reader.size, END_OF_CENTRAL_DIR_LENGTH, MAX_16_BITS * 16);\n\t\tif (!endOfDirectoryInfo) {\n\t\t\tconst signatureArray = await readUint8Array(reader, 0, 4);\n\t\t\tconst signatureView = getDataView(signatureArray);\n\t\t\tif (getUint32(signatureView) == SPLIT_ZIP_FILE_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_SPLIT_ZIP_FILE);\n\t\t\t} else {\n\t\t\t\tthrow new Error(ERR_EOCDR_NOT_FOUND);\n\t\t\t}\n\t\t}\n\t\tconst endOfDirectoryView = getDataView(endOfDirectoryInfo);\n\t\tlet directoryDataLength = getUint32(endOfDirectoryView, 12);\n\t\tlet directoryDataOffset = getUint32(endOfDirectoryView, 16);\n\t\tconst commentOffset = endOfDirectoryInfo.offset;\n\t\tconst commentLength = getUint16(endOfDirectoryView, 20);\n\t\tconst appendedDataOffset = commentOffset + END_OF_CENTRAL_DIR_LENGTH + commentLength;\n\t\tlet lastDiskNumber = getUint16(endOfDirectoryView, 4);\n\t\tconst expectedLastDiskNumber = reader.lastDiskNumber || 0;\n\t\tlet diskNumber = getUint16(endOfDirectoryView, 6);\n\t\tlet filesLength = getUint16(endOfDirectoryView, 8);\n\t\tlet prependedDataLength = 0;\n\t\tlet startOffset = 0;\n\t\tif (directoryDataOffset == MAX_32_BITS || directoryDataLength == MAX_32_BITS || filesLength == MAX_16_BITS || diskNumber == MAX_16_BITS) {\n\t\t\tconst endOfDirectoryLocatorArray = await readUint8Array(reader, endOfDirectoryInfo.offset - ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH, ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH);\n\t\t\tconst endOfDirectoryLocatorView = getDataView(endOfDirectoryLocatorArray);\n\t\t\tif (getUint32(endOfDirectoryLocatorView, 0) != ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_EOCDR_ZIP64_NOT_FOUND);\n\t\t\t}\n\t\t\tdirectoryDataOffset = getBigUint64(endOfDirectoryLocatorView, 8);\n\t\t\tlet endOfDirectoryArray = await readUint8Array(reader, directoryDataOffset, ZIP64_END_OF_CENTRAL_DIR_LENGTH, -1);\n\t\t\tlet endOfDirectoryView = getDataView(endOfDirectoryArray);\n\t\t\tconst expectedDirectoryDataOffset = endOfDirectoryInfo.offset - ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH - ZIP64_END_OF_CENTRAL_DIR_LENGTH;\n\t\t\tif (getUint32(endOfDirectoryView, 0) != ZIP64_END_OF_CENTRAL_DIR_SIGNATURE && directoryDataOffset != expectedDirectoryDataOffset) {\n\t\t\t\tconst originalDirectoryDataOffset = directoryDataOffset;\n\t\t\t\tdirectoryDataOffset = expectedDirectoryDataOffset;\n\t\t\t\tprependedDataLength = directoryDataOffset - originalDirectoryDataOffset;\n\t\t\t\tendOfDirectoryArray = await readUint8Array(reader, directoryDataOffset, ZIP64_END_OF_CENTRAL_DIR_LENGTH, -1);\n\t\t\t\tendOfDirectoryView = getDataView(endOfDirectoryArray);\n\t\t\t}\n\t\t\tif (getUint32(endOfDirectoryView, 0) != ZIP64_END_OF_CENTRAL_DIR_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND);\n\t\t\t}\n\t\t\tif (lastDiskNumber == MAX_16_BITS) {\n\t\t\t\tlastDiskNumber = getUint32(endOfDirectoryView, 16);\n\t\t\t}\n\t\t\tif (diskNumber == MAX_16_BITS) {\n\t\t\t\tdiskNumber = getUint32(endOfDirectoryView, 20);\n\t\t\t}\n\t\t\tif (filesLength == MAX_16_BITS) {\n\t\t\t\tfilesLength = getBigUint64(endOfDirectoryView, 32);\n\t\t\t}\n\t\t\tif (directoryDataLength == MAX_32_BITS) {\n\t\t\t\tdirectoryDataLength = getBigUint64(endOfDirectoryView, 40);\n\t\t\t}\n\t\t\tdirectoryDataOffset -= directoryDataLength;\n\t\t}\n\t\tif (expectedLastDiskNumber != lastDiskNumber) {\n\t\t\tthrow new Error(ERR_SPLIT_ZIP_FILE);\n\t\t}\n\t\tif (directoryDataOffset < 0 || directoryDataOffset >= reader.size) {\n\t\t\tthrow new Error(ERR_BAD_FORMAT);\n\t\t}\n\t\tlet offset = 0;\n\t\tlet directoryArray = await readUint8Array(reader, directoryDataOffset, directoryDataLength, diskNumber);\n\t\tlet directoryView = getDataView(directoryArray);\n\t\tif (directoryDataLength) {\n\t\t\tconst expectedDirectoryDataOffset = endOfDirectoryInfo.offset - directoryDataLength;\n\t\t\tif (getUint32(directoryView, offset) != CENTRAL_FILE_HEADER_SIGNATURE && directoryDataOffset != expectedDirectoryDataOffset) {\n\t\t\t\tconst originalDirectoryDataOffset = directoryDataOffset;\n\t\t\t\tdirectoryDataOffset = expectedDirectoryDataOffset;\n\t\t\t\tprependedDataLength = directoryDataOffset - originalDirectoryDataOffset;\n\t\t\t\tdirectoryArray = await readUint8Array(reader, directoryDataOffset, directoryDataLength, diskNumber);\n\t\t\t\tdirectoryView = getDataView(directoryArray);\n\t\t\t}\n\t\t}\n\t\tif (directoryDataOffset < 0 || directoryDataOffset >= reader.size) {\n\t\t\tthrow new Error(ERR_BAD_FORMAT);\n\t\t}\n\t\tconst filenameEncoding = getOptionValue(zipReader, options, \"filenameEncoding\");\n\t\tconst commentEncoding = getOptionValue(zipReader, options, \"commentEncoding\");\n\t\tfor (let indexFile = 0; indexFile < filesLength; indexFile++) {\n\t\t\tconst fileEntry = new ZipEntry(reader, config, zipReader.options);\n\t\t\tif (getUint32(directoryView, offset) != CENTRAL_FILE_HEADER_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_CENTRAL_DIRECTORY_NOT_FOUND);\n\t\t\t}\n\t\t\treadCommonHeader(fileEntry, directoryView, offset + 6);\n\t\t\tconst languageEncodingFlag = Boolean(fileEntry.bitFlag.languageEncodingFlag);\n\t\t\tconst filenameOffset = offset + 46;\n\t\t\tconst extraFieldOffset = filenameOffset + fileEntry.filenameLength;\n\t\t\tconst commentOffset = extraFieldOffset + fileEntry.extraFieldLength;\n\t\t\tconst versionMadeBy = getUint16(directoryView, offset + 4);\n\t\t\tconst msDosCompatible = (versionMadeBy & 0) == 0;\n\t\t\tconst rawFilename = directoryArray.subarray(filenameOffset, extraFieldOffset);\n\t\t\tconst commentLength = getUint16(directoryView, offset + 32);\n\t\t\tconst endOffset = commentOffset + commentLength;\n\t\t\tconst rawComment = directoryArray.subarray(commentOffset, endOffset);\n\t\t\tconst filenameUTF8 = languageEncodingFlag;\n\t\t\tconst commentUTF8 = languageEncodingFlag;\n\t\t\tconst directory = msDosCompatible && ((getUint8(directoryView, offset + 38) & FILE_ATTR_MSDOS_DIR_MASK) == FILE_ATTR_MSDOS_DIR_MASK);\n\t\t\tconst offsetFileEntry = getUint32(directoryView, offset + 42) + prependedDataLength;\n\t\t\tObject.assign(fileEntry, {\n\t\t\t\tversionMadeBy,\n\t\t\t\tmsDosCompatible,\n\t\t\t\tcompressedSize: 0,\n\t\t\t\tuncompressedSize: 0,\n\t\t\t\tcommentLength,\n\t\t\t\tdirectory,\n\t\t\t\toffset: offsetFileEntry,\n\t\t\t\tdiskNumberStart: getUint16(directoryView, offset + 34),\n\t\t\t\tinternalFileAttribute: getUint16(directoryView, offset + 36),\n\t\t\t\texternalFileAttribute: getUint32(directoryView, offset + 38),\n\t\t\t\trawFilename,\n\t\t\t\tfilenameUTF8,\n\t\t\t\tcommentUTF8,\n\t\t\t\trawExtraField: directoryArray.subarray(extraFieldOffset, commentOffset)\n\t\t\t});\n\t\t\tconst [filename, comment] = await Promise.all([\n\t\t\t\tdecodeText(rawFilename, filenameUTF8 ? CHARSET_UTF8 : filenameEncoding || CHARSET_CP437),\n\t\t\t\tdecodeText(rawComment, commentUTF8 ? CHARSET_UTF8 : commentEncoding || CHARSET_CP437)\n\t\t\t]);\n\t\t\tObject.assign(fileEntry, {\n\t\t\t\trawComment,\n\t\t\t\tfilename,\n\t\t\t\tcomment,\n\t\t\t\tdirectory: directory || filename.endsWith(DIRECTORY_SIGNATURE)\n\t\t\t});\n\t\t\tstartOffset = Math.max(offsetFileEntry, startOffset);\n\t\t\tawait readCommonFooter(fileEntry, fileEntry, directoryView, offset + 6);\n\t\t\tconst entry = new Entry(fileEntry);\n\t\t\tentry.getData = (writer, options) => fileEntry.getData(writer, entry, options);\n\t\t\toffset = endOffset;\n\t\t\tconst { onprogress } = options;\n\t\t\tif (onprogress) {\n\t\t\t\ttry {\n\t\t\t\t\tawait onprogress(indexFile + 1, filesLength, new Entry(fileEntry));\n\t\t\t\t} catch (_error) {\n\t\t\t\t\t// ignored\n\t\t\t\t}\n\t\t\t}\n\t\t\tyield entry;\n\t\t}\n\t\tconst extractPrependedData = getOptionValue(zipReader, options, \"extractPrependedData\");\n\t\tconst extractAppendedData = getOptionValue(zipReader, options, \"extractAppendedData\");\n\t\tif (extractPrependedData) {\n\t\t\tzipReader.prependedData = startOffset > 0 ? await readUint8Array(reader, 0, startOffset) : new Uint8Array();\n\t\t}\n\t\tzipReader.comment = commentLength ? await readUint8Array(reader, commentOffset + END_OF_CENTRAL_DIR_LENGTH, commentLength) : new Uint8Array();\n\t\tif (extractAppendedData) {\n\t\t\tzipReader.appendedData = appendedDataOffset < reader.size ? await readUint8Array(reader, appendedDataOffset, reader.size - appendedDataOffset) : new Uint8Array();\n\t\t}\n\t\treturn true;\n\t}\n\n\tasync getEntries(options = {}) {\n\t\tconst entries = [];\n\t\tfor await (const entry of this.getEntriesGenerator(options)) {\n\t\t\tentries.push(entry);\n\t\t}\n\t\treturn entries;\n\t}\n\n\tasync close() {\n\t}\n}\n\nexport {\n\tZipReader,\n\tERR_BAD_FORMAT,\n\tERR_EOCDR_NOT_FOUND,\n\tERR_EOCDR_ZIP64_NOT_FOUND,\n\tERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND,\n\tERR_CENTRAL_DIRECTORY_NOT_FOUND,\n\tERR_LOCAL_FILE_HEADER_NOT_FOUND,\n\tERR_EXTRAFIELD_ZIP64_NOT_FOUND,\n\tERR_ENCRYPTED,\n\tERR_UNSUPPORTED_ENCRYPTION,\n\tERR_UNSUPPORTED_COMPRESSION,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD,\n\tERR_SPLIT_ZIP_FILE\n};\n\nclass ZipEntry {\n\n\tconstructor(reader, config, options) {\n\t\tObject.assign(this, {\n\t\t\treader,\n\t\t\tconfig,\n\t\t\toptions\n\t\t});\n\t}\n\n\tasync getData(writer, fileEntry, options = {}) {\n\t\tconst zipEntry = this;\n\t\tconst {\n\t\t\treader,\n\t\t\toffset,\n\t\t\tdiskNumberStart,\n\t\t\textraFieldAES,\n\t\t\tcompressionMethod,\n\t\t\tconfig,\n\t\t\tbitFlag,\n\t\t\tsignature,\n\t\t\trawLastModDate,\n\t\t\tuncompressedSize,\n\t\t\tcompressedSize\n\t\t} = zipEntry;\n\t\tconst localDirectory = zipEntry.localDirectory = {};\n\t\tconst dataArray = await readUint8Array(reader, offset, 30, diskNumberStart);\n\t\tconst dataView = getDataView(dataArray);\n\t\tlet password = getOptionValue(zipEntry, options, \"password\");\n\t\tpassword = password && password.length && password;\n\t\tif (extraFieldAES) {\n\t\t\tif (extraFieldAES.originalCompressionMethod != COMPRESSION_METHOD_AES) {\n\t\t\t\tthrow new Error(ERR_UNSUPPORTED_COMPRESSION);\n\t\t\t}\n\t\t}\n\t\tif (compressionMethod != COMPRESSION_METHOD_STORE && compressionMethod != COMPRESSION_METHOD_DEFLATE) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_COMPRESSION);\n\t\t}\n\t\tif (getUint32(dataView, 0) != LOCAL_FILE_HEADER_SIGNATURE) {\n\t\t\tthrow new Error(ERR_LOCAL_FILE_HEADER_NOT_FOUND);\n\t\t}\n\t\treadCommonHeader(localDirectory, dataView, 4);\n\t\tlocalDirectory.rawExtraField = localDirectory.extraFieldLength ?\n\t\t\tawait readUint8Array(reader, offset + 30 + localDirectory.filenameLength, localDirectory.extraFieldLength, diskNumberStart) :\n\t\t\tnew Uint8Array();\n\t\tawait readCommonFooter(zipEntry, localDirectory, dataView, 4);\n\t\tObject.assign(fileEntry, {\n\t\t\tlastAccessDate: localDirectory.lastAccessDate,\n\t\t\tcreationDate: localDirectory.creationDate\n\t\t});\n\t\tconst encrypted = zipEntry.encrypted && localDirectory.encrypted;\n\t\tconst zipCrypto = encrypted && !extraFieldAES;\n\t\tif (encrypted) {\n\t\t\tif (!zipCrypto && extraFieldAES.strength === UNDEFINED_VALUE) {\n\t\t\t\tthrow new Error(ERR_UNSUPPORTED_ENCRYPTION);\n\t\t\t} else if (!password) {\n\t\t\t\tthrow new Error(ERR_ENCRYPTED);\n\t\t\t}\n\t\t}\n\t\tconst dataOffset = offset + 30 + localDirectory.filenameLength + localDirectory.extraFieldLength;\n\t\tconst readable = reader.readable;\n\t\treadable.diskNumberStart = diskNumberStart;\n\t\treadable.offset = dataOffset;\n\t\tlet size = readable.size = compressedSize;\n\t\tconst signal = getOptionValue(zipEntry, options, \"signal\");\n\t\tconst checkPasswordOnly = getOptionValue(zipEntry, options, \"checkPasswordOnly\");\n\t\tif (checkPasswordOnly) {\n\t\t\twriter = new WritableStream();\n\t\t}\n\t\twriter = initWriter(writer);\n\t\tawait initStream(writer, uncompressedSize);\n\t\tconst { writable } = writer;\n\t\tconst { onstart, onprogress, onend } = options;\n\t\tconst workerOptions = {\n\t\t\toptions: {\n\t\t\t\tcodecType: CODEC_INFLATE,\n\t\t\t\tpassword,\n\t\t\t\tzipCrypto,\n\t\t\t\tencryptionStrength: extraFieldAES && extraFieldAES.strength,\n\t\t\t\tsigned: getOptionValue(zipEntry, options, \"checkSignature\"),\n\t\t\t\tpasswordVerification: zipCrypto && (bitFlag.dataDescriptor ? ((rawLastModDate >>> 8) & 0xFF) : ((signature >>> 24) & 0xFF)),\n\t\t\t\tsignature,\n\t\t\t\tcompressed: compressionMethod != 0,\n\t\t\t\tencrypted,\n\t\t\t\tuseWebWorkers: getOptionValue(zipEntry, options, \"useWebWorkers\"),\n\t\t\t\tuseCompressionStream: getOptionValue(zipEntry, options, \"useCompressionStream\"),\n\t\t\t\ttransferStreams: getOptionValue(zipEntry, options, \"transferStreams\"),\n\t\t\t\tcheckPasswordOnly\n\t\t\t},\n\t\t\tconfig,\n\t\t\tstreamOptions: { signal, size, onstart, onprogress, onend }\n\t\t};\n\t\tlet outputSize = 0;\n\t\ttry {\n\t\t\t({ outputSize } = (await runWorker({ readable, writable }, workerOptions)));\n\t\t} catch (error) {\n\t\t\tif (!checkPasswordOnly || error.message != ERR_ABORT_CHECK_PASSWORD) {\n\t\t\t\tthrow error;\n\t\t\t}\n\t\t} finally {\n\t\t\tconst preventClose = getOptionValue(zipEntry, options, \"preventClose\");\n\t\t\twritable.size += outputSize;\n\t\t\tif (!preventClose && !writable.locked) {\n\t\t\t\tawait writable.close();\n\t\t\t}\n\t\t}\n\t\treturn checkPasswordOnly ? undefined : writer.getData ? writer.getData() : writable;\n\t}\n}\n\nfunction readCommonHeader(directory, dataView, offset) {\n\tconst rawBitFlag = directory.rawBitFlag = getUint16(dataView, offset + 2);\n\tconst encrypted = (rawBitFlag & BITFLAG_ENCRYPTED) == BITFLAG_ENCRYPTED;\n\tconst rawLastModDate = getUint32(dataView, offset + 6);\n\tObject.assign(directory, {\n\t\tencrypted,\n\t\tversion: getUint16(dataView, offset),\n\t\tbitFlag: {\n\t\t\tlevel: (rawBitFlag & BITFLAG_LEVEL) >> 1,\n\t\t\tdataDescriptor: (rawBitFlag & BITFLAG_DATA_DESCRIPTOR) == BITFLAG_DATA_DESCRIPTOR,\n\t\t\tlanguageEncodingFlag: (rawBitFlag & BITFLAG_LANG_ENCODING_FLAG) == BITFLAG_LANG_ENCODING_FLAG\n\t\t},\n\t\trawLastModDate,\n\t\tlastModDate: getDate(rawLastModDate),\n\t\tfilenameLength: getUint16(dataView, offset + 22),\n\t\textraFieldLength: getUint16(dataView, offset + 24)\n\t});\n}\n\nasync function readCommonFooter(fileEntry, directory, dataView, offset) {\n\tconst { rawExtraField } = directory;\n\tconst extraField = directory.extraField = new Map();\n\tconst rawExtraFieldView = getDataView(new Uint8Array(rawExtraField));\n\tlet offsetExtraField = 0;\n\ttry {\n\t\twhile (offsetExtraField < rawExtraField.length) {\n\t\t\tconst type = getUint16(rawExtraFieldView, offsetExtraField);\n\t\t\tconst size = getUint16(rawExtraFieldView, offsetExtraField + 2);\n\t\t\textraField.set(type, {\n\t\t\t\ttype,\n\t\t\t\tdata: rawExtraField.slice(offsetExtraField + 4, offsetExtraField + 4 + size)\n\t\t\t});\n\t\t\toffsetExtraField += 4 + size;\n\t\t}\n\t} catch (_error) {\n\t\t// ignored\n\t}\n\tconst compressionMethod = getUint16(dataView, offset + 4);\n\tObject.assign(directory, {\n\t\tsignature: getUint32(dataView, offset + 10),\n\t\tuncompressedSize: getUint32(dataView, offset + 18),\n\t\tcompressedSize: getUint32(dataView, offset + 14)\n\t});\n\tconst extraFieldZip64 = extraField.get(EXTRAFIELD_TYPE_ZIP64);\n\tif (extraFieldZip64) {\n\t\treadExtraFieldZip64(extraFieldZip64, directory);\n\t\tdirectory.extraFieldZip64 = extraFieldZip64;\n\t}\n\tconst extraFieldUnicodePath = extraField.get(EXTRAFIELD_TYPE_UNICODE_PATH);\n\tif (extraFieldUnicodePath) {\n\t\tawait readExtraFieldUnicode(extraFieldUnicodePath, PROPERTY_NAME_FILENAME, PROPERTY_NAME_RAW_FILENAME, directory, fileEntry);\n\t\tdirectory.extraFieldUnicodePath = extraFieldUnicodePath;\n\t}\n\tconst extraFieldUnicodeComment = extraField.get(EXTRAFIELD_TYPE_UNICODE_COMMENT);\n\tif (extraFieldUnicodeComment) {\n\t\tawait readExtraFieldUnicode(extraFieldUnicodeComment, PROPERTY_NAME_COMMENT, PROPERTY_NAME_RAW_COMMENT, directory, fileEntry);\n\t\tdirectory.extraFieldUnicodeComment = extraFieldUnicodeComment;\n\t}\n\tconst extraFieldAES = extraField.get(EXTRAFIELD_TYPE_AES);\n\tif (extraFieldAES) {\n\t\treadExtraFieldAES(extraFieldAES, directory, compressionMethod);\n\t\tdirectory.extraFieldAES = extraFieldAES;\n\t} else {\n\t\tdirectory.compressionMethod = compressionMethod;\n\t}\n\tconst extraFieldNTFS = extraField.get(EXTRAFIELD_TYPE_NTFS);\n\tif (extraFieldNTFS) {\n\t\treadExtraFieldNTFS(extraFieldNTFS, directory);\n\t\tdirectory.extraFieldNTFS = extraFieldNTFS;\n\t}\n\tconst extraFieldExtendedTimestamp = extraField.get(EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP);\n\tif (extraFieldExtendedTimestamp) {\n\t\treadExtraFieldExtendedTimestamp(extraFieldExtendedTimestamp, directory);\n\t\tdirectory.extraFieldExtendedTimestamp = extraFieldExtendedTimestamp;\n\t}\n}\n\nfunction readExtraFieldZip64(extraFieldZip64, directory) {\n\tdirectory.zip64 = true;\n\tconst extraFieldView = getDataView(extraFieldZip64.data);\n\tconst missingProperties = ZIP64_PROPERTIES.filter(([propertyName, max]) => directory[propertyName] == max);\n\tfor (let indexMissingProperty = 0, offset = 0; indexMissingProperty < missingProperties.length; indexMissingProperty++) {\n\t\tconst [propertyName, max] = missingProperties[indexMissingProperty];\n\t\tif (directory[propertyName] == max) {\n\t\t\tconst extraction = ZIP64_EXTRACTION[max];\n\t\t\tdirectory[propertyName] = extraFieldZip64[propertyName] = extraction.getValue(extraFieldView, offset);\n\t\t\toffset += extraction.bytes;\n\t\t} else if (extraFieldZip64[propertyName]) {\n\t\t\tthrow new Error(ERR_EXTRAFIELD_ZIP64_NOT_FOUND);\n\t\t}\n\t}\n}\n\nasync function readExtraFieldUnicode(extraFieldUnicode, propertyName, rawPropertyName, directory, fileEntry) {\n\tconst extraFieldView = getDataView(extraFieldUnicode.data);\n\tconst crc32 = new Crc32();\n\tcrc32.append(fileEntry[rawPropertyName]);\n\tconst dataViewSignature = getDataView(new Uint8Array(4));\n\tdataViewSignature.setUint32(0, crc32.get(), true);\n\tObject.assign(extraFieldUnicode, {\n\t\tversion: getUint8(extraFieldView, 0),\n\t\tsignature: getUint32(extraFieldView, 1),\n\t\t[propertyName]: await decodeText(extraFieldUnicode.data.subarray(5)),\n\t\tvalid: !fileEntry.bitFlag.languageEncodingFlag && extraFieldUnicode.signature == getUint32(dataViewSignature, 0)\n\t});\n\tif (extraFieldUnicode.valid) {\n\t\tdirectory[propertyName] = extraFieldUnicode[propertyName];\n\t\tdirectory[propertyName + \"UTF8\"] = true;\n\t}\n}\n\nfunction readExtraFieldAES(extraFieldAES, directory, compressionMethod) {\n\tconst extraFieldView = getDataView(extraFieldAES.data);\n\tconst strength = getUint8(extraFieldView, 4);\n\tObject.assign(extraFieldAES, {\n\t\tvendorVersion: getUint8(extraFieldView, 0),\n\t\tvendorId: getUint8(extraFieldView, 2),\n\t\tstrength,\n\t\toriginalCompressionMethod: compressionMethod,\n\t\tcompressionMethod: getUint16(extraFieldView, 5)\n\t});\n\tdirectory.compressionMethod = extraFieldAES.compressionMethod;\n}\n\nfunction readExtraFieldNTFS(extraFieldNTFS, directory) {\n\tconst extraFieldView = getDataView(extraFieldNTFS.data);\n\tlet offsetExtraField = 4;\n\tlet tag1Data;\n\ttry {\n\t\twhile (offsetExtraField < extraFieldNTFS.data.length && !tag1Data) {\n\t\t\tconst tagValue = getUint16(extraFieldView, offsetExtraField);\n\t\t\tconst attributeSize = getUint16(extraFieldView, offsetExtraField + 2);\n\t\t\tif (tagValue == EXTRAFIELD_TYPE_NTFS_TAG1) {\n\t\t\t\ttag1Data = extraFieldNTFS.data.slice(offsetExtraField + 4, offsetExtraField + 4 + attributeSize);\n\t\t\t}\n\t\t\toffsetExtraField += 4 + attributeSize;\n\t\t}\n\t} catch (_error) {\n\t\t// ignored\n\t}\n\ttry {\n\t\tif (tag1Data && tag1Data.length == 24) {\n\t\t\tconst tag1View = getDataView(tag1Data);\n\t\t\tconst rawLastModDate = tag1View.getBigUint64(0, true);\n\t\t\tconst rawLastAccessDate = tag1View.getBigUint64(8, true);\n\t\t\tconst rawCreationDate = tag1View.getBigUint64(16, true);\n\t\t\tObject.assign(extraFieldNTFS, {\n\t\t\t\trawLastModDate,\n\t\t\t\trawLastAccessDate,\n\t\t\t\trawCreationDate\n\t\t\t});\n\t\t\tconst lastModDate = getDateNTFS(rawLastModDate);\n\t\t\tconst lastAccessDate = getDateNTFS(rawLastAccessDate);\n\t\t\tconst creationDate = getDateNTFS(rawCreationDate);\n\t\t\tconst extraFieldData = { lastModDate, lastAccessDate, creationDate };\n\t\t\tObject.assign(extraFieldNTFS, extraFieldData);\n\t\t\tObject.assign(directory, extraFieldData);\n\t\t}\n\t} catch (_error) {\n\t\t// ignored\n\t}\n}\n\nfunction readExtraFieldExtendedTimestamp(extraFieldExtendedTimestamp, directory) {\n\tconst extraFieldView = getDataView(extraFieldExtendedTimestamp.data);\n\tconst flags = getUint8(extraFieldView, 0);\n\tconst timeProperties = [];\n\tconst timeRawProperties = [];\n\tif ((flags & 0x1) == 0x1) {\n\t\ttimeProperties.push(PROPERTY_NAME_LAST_MODIFICATION_DATE);\n\t\ttimeRawProperties.push(PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE);\n\t}\n\tif ((flags & 0x2) == 0x2) {\n\t\ttimeProperties.push(PROPERTY_NAME_LAST_ACCESS_DATE);\n\t\ttimeRawProperties.push(PROPERTY_NAME_RAW_LAST_ACCESS_DATE);\n\t}\n\tif ((flags & 0x4) == 0x4) {\n\t\ttimeProperties.push(PROPERTY_NAME_CREATION_DATE);\n\t\ttimeRawProperties.push(PROPERTY_NAME_RAW_CREATION_DATE);\n\t}\n\tlet offset = 1;\n\ttimeProperties.forEach((propertyName, indexProperty) => {\n\t\tif (extraFieldExtendedTimestamp.data.length >= offset + 4) {\n\t\t\tconst time = getUint32(extraFieldView, offset);\n\t\t\tdirectory[propertyName] = extraFieldExtendedTimestamp[propertyName] = new Date(time * 1000);\n\t\t\tconst rawPropertyName = timeRawProperties[indexProperty];\n\t\t\textraFieldExtendedTimestamp[rawPropertyName] = time;\n\t\t}\n\t\toffset += 4;\n\t});\n}\n\nasync function seekSignature(reader, signature, startOffset, minimumBytes, maximumLength) {\n\tconst signatureArray = new Uint8Array(4);\n\tconst signatureView = getDataView(signatureArray);\n\tsetUint32(signatureView, 0, signature);\n\tconst maximumBytes = minimumBytes + maximumLength;\n\treturn (await seek(minimumBytes)) || await seek(Math.min(maximumBytes, startOffset));\n\n\tasync function seek(length) {\n\t\tconst offset = startOffset - length;\n\t\tconst bytes = await readUint8Array(reader, offset, length);\n\t\tfor (let indexByte = bytes.length - minimumBytes; indexByte >= 0; indexByte--) {\n\t\t\tif (bytes[indexByte] == signatureArray[0] && bytes[indexByte + 1] == signatureArray[1] &&\n\t\t\t\tbytes[indexByte + 2] == signatureArray[2] && bytes[indexByte + 3] == signatureArray[3]) {\n\t\t\t\treturn {\n\t\t\t\t\toffset: offset + indexByte,\n\t\t\t\t\tbuffer: bytes.slice(indexByte, indexByte + minimumBytes).buffer\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction getOptionValue(zipReader, options, name) {\n\treturn options[name] === UNDEFINED_VALUE ? zipReader.options[name] : options[name];\n}\n\nfunction getDate(timeRaw) {\n\tconst date = (timeRaw & 0xffff0000) >> 16, time = timeRaw & 0x0000ffff;\n\ttry {\n\t\treturn new Date(1980 + ((date & 0xFE00) >> 9), ((date & 0x01E0) >> 5) - 1, date & 0x001F, (time & 0xF800) >> 11, (time & 0x07E0) >> 5, (time & 0x001F) * 2, 0);\n\t} catch (_error) {\n\t\t// ignored\n\t}\n}\n\nfunction getDateNTFS(timeRaw) {\n\treturn new Date((Number((timeRaw / BigInt(10000)) - BigInt(11644473600000))));\n}\n\nfunction getUint8(view, offset) {\n\treturn view.getUint8(offset);\n}\n\nfunction getUint16(view, offset) {\n\treturn view.getUint16(offset, true);\n}\n\nfunction getUint32(view, offset) {\n\treturn view.getUint32(offset, true);\n}\n\nfunction getBigUint64(view, offset) {\n\treturn Number(view.getBigUint64(offset, true));\n}\n\nfunction setUint32(view, offset, value) {\n\tview.setUint32(offset, value, true);\n}\n\nfunction getDataView(array) {\n\treturn new DataView(array.buffer);\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport { configure } from \"./core/configuration.js\";\nimport { configureWebWorker } from \"./z-worker-inline.js\";\nimport { getMimeType } from \"./core/util/default-mime-type.js\";\nimport { initShimAsyncCodec } from \"./core/util/stream-codec-shim.js\";\nimport { terminateWorkers } from \"./core/codec-pool.js\";\n\nlet baseURL;\ntry {\n\tbaseURL = import.meta.url;\n} catch (_error) {\n\t// ignored\n}\nconfigure({ baseURL });\nconfigureWebWorker(configure);\n\nexport * from \"./core/io.js\";\nexport * from \"./core/zip-reader.js\";\nexport * from \"./core/zip-writer.js\";\nexport * from \"./core/zip-fs-core.js\";\nexport {\n\tconfigure,\n\tgetMimeType,\n\tinitShimAsyncCodec,\n\tterminateWorkers\n};","import { EntryMetadata, getEntryMetadata, zipGetData } from \"./common\";\nimport { BlobReader, BlobWriter, Entry, EntryGetDataOptions, Reader } from \"@zip.js/zip.js\";\n\nfunction parseIndex(index: number, size: number) {\n return index < 0 ?\n Math.max(index + size, 0) :\n Math.min(index, size);\n}\n\nclass BlobEntryReaderImpl extends Reader {\n private readonly blob: Blob;\n private readonly offset: number;\n\n constructor(blob: Blob, entryMetadata: EntryMetadata) {\n super(blob);\n\n this.blob = blob;\n this.offset = entryMetadata.offset + entryMetadata.headerSize;\n this.size = entryMetadata.compressedSize;\n }\n\n async readUint8Array(index: number, length: number): Promise {\n const start = parseIndex(index, this.size) + this.offset;\n const end = parseIndex(index + length, this.size) + this.offset;\n const blob = this.blob.slice(start, end);\n return new Uint8Array(await blob.arrayBuffer());\n }\n}\n\n/**\n * Represents a {@link Reader} instance used to read data of an entry in a zip\n * file provided as a {@link Blob}. It directly reads data if it is uncompressed.\n */\nexport class BlobEntryReader extends Reader {\n private readonly blob: Blob;\n private readonly entry: Entry;\n private readonly mimeString: string | undefined;\n private readonly options: EntryGetDataOptions | undefined;\n\n private reader: Reader | undefined;\n\n /**\n * @param blob - The blob to read data from, usually the outer zip file.\n * @param entry - The entry to read data of, usually the inner zip file.\n * @param mimeString - The MIME type of the data.\n * @param options - Represents options passed to {@link Entry#getData}.\n */\n constructor(\n blob: Blob,\n entry: Entry,\n mimeString?: string,\n options?: EntryGetDataOptions\n ) {\n super();\n\n this.blob = blob;\n this.entry = entry;\n this.mimeString = mimeString;\n this.options = options;\n }\n\n async init(): Promise {\n const entryMetadata = await getEntryMetadata(this.blob, this.entry);\n\n if (entryMetadata.compressionMethod !== 0) {\n const entryBlob: Blob = await zipGetData(\n this.entry,\n new BlobWriter(this.mimeString),\n this.options\n );\n this.reader = new BlobReader(entryBlob);\n } else {\n this.reader = new BlobEntryReaderImpl(this.blob, entryMetadata);\n }\n\n this.size = this.reader.size;\n }\n\n async readUint8Array(index: number, length: number): Promise {\n return this.reader!.readUint8Array(index, length);\n }\n}\n","function e(e){const t=()=>URL.createObjectURL(new Blob(['const{Array:e,Object:t,Number:n,Math:r,Error:s,Uint8Array:i,Uint16Array:o,Uint32Array:c,Int32Array:f,Map:a,DataView:l,Promise:u,TextEncoder:w,crypto:h,postMessage:d,TransformStream:p,ReadableStream:y,WritableStream:m,CompressionStream:b,DecompressionStream:g}=self;class k{constructor(e){return class extends p{constructor(t,n){const r=new e(n);super({transform(e,t){t.enqueue(r.append(e))},flush(e){const t=r.flush();t&&e.enqueue(t)}})}}}}const v=[];for(let e=0;256>e;e++){let t=e;for(let e=0;8>e;e++)1&t?t=t>>>1^3988292384:t>>>=1;v[e]=t}class S{constructor(e){this.t=e||-1}append(e){let t=0|this.t;for(let n=0,r=0|e.length;r>n;n++)t=t>>>8^v[255&(t^e[n])];this.t=t}get(){return~this.t}}class z extends p{constructor(){const e=new S;super({transform(t){e.append(t)},flush(t){const n=new i(4);new l(n.buffer).setUint32(0,e.get()),t.enqueue(n)}})}}const C={concat(e,t){if(0===e.length||0===t.length)return e.concat(t);const n=e[e.length-1],r=C.i(n);return 32===r?e.concat(t):C.o(t,r,0|n,e.slice(0,e.length-1))},l(e){const t=e.length;if(0===t)return 0;const n=e[t-1];return 32*(t-1)+C.i(n)},u(e,t){if(32*e.length0&&t&&(e[n-1]=C.h(t,e[n-1]&2147483648>>t-1,1)),e},h:(e,t,n)=>32===e?t:(n?0|t:t<<32-e)+1099511627776*e,i:e=>r.round(e/1099511627776)||32,o(e,t,n,r){for(void 0===r&&(r=[]);t>=32;t-=32)r.push(n),n=0;if(0===t)return r.concat(e);for(let s=0;s>>t),n=e[s]<<32-t;const s=e.length?e[e.length-1]:0,i=C.i(s);return r.push(C.h(t+i&31,t+i>32?n:r.pop(),1)),r}},x={p:{m(e){const t=C.l(e)/8,n=new i(t);let r;for(let s=0;t>s;s++)0==(3&s)&&(r=e[s/4]),n[s]=r>>>24,r<<=8;return n},g(e){const t=[];let n,r=0;for(n=0;n9007199254740991)throw new s(\"Cannot hash more than 2^53 - 1 bits\");const o=new c(n);let f=0;for(let e=t.blockSize+r-(t.blockSize+r&t.blockSize-1);i>=e;e+=t.blockSize)t.I(o.subarray(16*f,16*(f+1))),f+=1;return n.splice(0,16*f),t}D(){const e=this;let t=e.C;const n=e.S;t=C.concat(t,[C.h(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(r.floor(e._/4294967296)),t.push(0|e._);t.length;)e.I(t.splice(0,16));return e.reset(),n}V(e,t,n,r){return e>19?e>39?e>59?e>79?void 0:t^n^r:t&n|t&r|n&r:t^n^r:t&n|~t&r}P(e,t){return t<>>32-e}I(t){const n=this,s=n.S,i=e(80);for(let e=0;16>e;e++)i[e]=t[e];let o=s[0],c=s[1],f=s[2],a=s[3],l=s[4];for(let e=0;79>=e;e++){16>e||(i[e]=n.P(1,i[e-3]^i[e-8]^i[e-14]^i[e-16]));const t=n.P(5,o)+n.V(e,c,f,a)+l+i[e]+n.v[r.floor(e/20)]|0;l=a,a=f,f=n.P(30,c),c=o,o=t}s[0]=s[0]+o|0,s[1]=s[1]+c|0,s[2]=s[2]+f|0,s[3]=s[3]+a|0,s[4]=s[4]+l|0}},A={getRandomValues(e){const t=new c(e.buffer),n=e=>{let t=987654321;const n=4294967295;return()=>(t=36969*(65535&t)+(t>>16)&n,(((t<<16)+(e=18e3*(65535&e)+(e>>16)&n)&n)/4294967296+.5)*(r.random()>.5?1:-1))};for(let s,i=0;inew I.R(x.p.g(e)),B(e,t,n,r){if(n=n||1e4,0>r||0>n)throw new s(\"invalid params to pbkdf2\");const i=1+(r>>5)<<2;let o,c,f,a,u;const w=new ArrayBuffer(i),h=new l(w);let d=0;const p=C;for(t=x.p.g(t),u=1;(i||1)>d;u++){for(o=c=e.encrypt(p.concat(t,[u])),f=1;n>f;f++)for(c=e.encrypt(c),a=0;ad&&fs&&(e=(new n).update(e).D());for(let t=0;s>t;t++)r[0][t]=909522486^e[t],r[1][t]=1549556828^e[t];t.K[0].update(r[0]),t.K[1].update(r[1]),t.U=new n(t.K[0])}reset(){const e=this;e.U=new e.M(e.K[0]),e.N=!1}update(e){this.N=!0,this.U.update(e)}digest(){const e=this,t=e.U.D(),n=new e.M(e.K[1]).update(t).D();return e.reset(),n}encrypt(e){if(this.N)throw new s(\"encrypt on already updated hmac called!\");return this.update(e),this.digest(e)}}},D=void 0!==h&&\"function\"==typeof h.getRandomValues,V=\"Invalid password\",P=\"Invalid signature\",R=\"zipjs-abort-check-password\";function B(e){return D?h.getRandomValues(e):A.getRandomValues(e)}const E=16,M={name:\"PBKDF2\"},K=t.assign({hash:{name:\"HMAC\"}},M),U=t.assign({iterations:1e3,hash:{name:\"SHA-1\"}},M),N=[\"deriveBits\"],O=[8,12,16],T=[16,24,32],W=10,j=[0,0,0,0],H=\"undefined\",L=\"function\",F=typeof h!=H,q=F&&h.subtle,G=F&&typeof q!=H,J=x.p,Q=class{constructor(e){const t=this;t.O=[[[],[],[],[],[]],[[],[],[],[],[]]],t.O[0][0][0]||t.T();const n=t.O[0][4],r=t.O[1],i=e.length;let o,c,f,a=1;if(4!==i&&6!==i&&8!==i)throw new s(\"invalid aes key size\");for(t.v=[c=e.slice(0),f=[]],o=i;4*i+28>o;o++){let e=c[o-1];(o%i==0||8===i&&o%i==4)&&(e=n[e>>>24]<<24^n[e>>16&255]<<16^n[e>>8&255]<<8^n[255&e],o%i==0&&(e=e<<8^e>>>24^a<<24,a=a<<1^283*(a>>7))),c[o]=c[o-i]^e}for(let e=0;o;e++,o--){const t=c[3&e?o:o-4];f[e]=4>=o||4>e?t:r[0][n[t>>>24]]^r[1][n[t>>16&255]]^r[2][n[t>>8&255]]^r[3][n[255&t]]}}encrypt(e){return this.W(e,0)}decrypt(e){return this.W(e,1)}T(){const e=this.O[0],t=this.O[1],n=e[4],r=t[4],s=[],i=[];let o,c,f,a;for(let e=0;256>e;e++)i[(s[e]=e<<1^283*(e>>7))^e]=e;for(let l=o=0;!n[l];l^=c||1,o=i[o]||1){let i=o^o<<1^o<<2^o<<3^o<<4;i=i>>8^255&i^99,n[l]=i,r[i]=l,a=s[f=s[c=s[l]]];let u=16843009*a^65537*f^257*c^16843008*l,w=257*s[i]^16843008*i;for(let n=0;4>n;n++)e[n][l]=w=w<<24^w>>>8,t[n][i]=u=u<<24^u>>>8}for(let n=0;5>n;n++)e[n]=e[n].slice(0),t[n]=t[n].slice(0)}W(e,t){if(4!==e.length)throw new s(\"invalid aes block size\");const n=this.v[t],r=n.length/4-2,i=[0,0,0,0],o=this.O[t],c=o[0],f=o[1],a=o[2],l=o[3],u=o[4];let w,h,d,p=e[0]^n[0],y=e[t?3:1]^n[1],m=e[2]^n[2],b=e[t?1:3]^n[3],g=4;for(let e=0;r>e;e++)w=c[p>>>24]^f[y>>16&255]^a[m>>8&255]^l[255&b]^n[g],h=c[y>>>24]^f[m>>16&255]^a[b>>8&255]^l[255&p]^n[g+1],d=c[m>>>24]^f[b>>16&255]^a[p>>8&255]^l[255&y]^n[g+2],b=c[b>>>24]^f[p>>16&255]^a[y>>8&255]^l[255&m]^n[g+3],g+=4,p=w,y=h,m=d;for(let e=0;4>e;e++)i[t?3&-e:e]=u[p>>>24]<<24^u[y>>16&255]<<16^u[m>>8&255]<<8^u[255&b]^n[g++],w=p,p=y,y=m,m=b,b=w;return i}},X=class{constructor(e,t){this.j=e,this.H=t,this.L=t}reset(){this.L=this.H}update(e){return this.F(this.j,e,this.L)}q(e){if(255==(e>>24&255)){let t=e>>16&255,n=e>>8&255,r=255&e;255===t?(t=0,255===n?(n=0,255===r?r=0:++r):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=r}else e+=1<<24;return e}G(e){0===(e[0]=this.q(e[0]))&&(e[1]=this.q(e[1]))}F(e,t,n){let r;if(!(r=t.length))return[];const s=C.l(t);for(let s=0;r>s;s+=4){this.G(n);const r=e.encrypt(n);t[s]^=r[0],t[s+1]^=r[1],t[s+2]^=r[2],t[s+3]^=r[3]}return C.u(t,s)}},Y=I.R;let Z=F&&G&&typeof q.importKey==L,$=F&&G&&typeof q.deriveBits==L;class ee extends p{constructor({password:e,signed:n,encryptionStrength:r,checkPasswordOnly:o}){super({start(){t.assign(this,{ready:new u((e=>this.J=e)),password:e,signed:n,X:r-1,pending:new i})},async transform(e,t){const n=this,{password:r,X:c,J:f,ready:a}=n;r?(await(async(e,t,n,r)=>{const i=await re(e,t,n,ie(r,0,O[t])),o=ie(r,O[t]);if(i[0]!=o[0]||i[1]!=o[1])throw new s(V)})(n,c,r,ie(e,0,O[c]+2)),e=ie(e,O[c]+2),o?t.error(new s(R)):f()):await a;const l=new i(e.length-W-(e.length-W)%E);t.enqueue(ne(n,e,l,0,W,!0))},async flush(e){const{signed:t,Y:n,Z:r,pending:o,ready:c}=this;await c;const f=ie(o,0,o.length-W),a=ie(o,o.length-W);let l=new i;if(f.length){const e=ce(J,f);r.update(e);const t=n.update(e);l=oe(J,t)}if(t){const e=ie(oe(J,r.digest()),0,W);for(let t=0;W>t;t++)if(e[t]!=a[t])throw new s(P)}e.enqueue(l)}})}}class te extends p{constructor({password:e,encryptionStrength:n}){let r;super({start(){t.assign(this,{ready:new u((e=>this.J=e)),password:e,X:n-1,pending:new i})},async transform(e,t){const n=this,{password:r,X:s,J:o,ready:c}=n;let f=new i;r?(f=await(async(e,t,n)=>{const r=B(new i(O[t]));return se(r,await re(e,t,n,r))})(n,s,r),o()):await c;const a=new i(f.length+e.length-e.length%E);a.set(f,0),t.enqueue(ne(n,e,a,f.length,0))},async flush(e){const{Y:t,Z:n,pending:s,ready:o}=this;await o;let c=new i;if(s.length){const e=t.update(ce(J,s));n.update(e),c=oe(J,e)}r.signature=oe(J,n.digest()).slice(0,W),e.enqueue(se(c,r.signature))}}),r=this}}function ne(e,t,n,r,s,o){const{Y:c,Z:f,pending:a}=e,l=t.length-s;let u;for(a.length&&(t=se(a,t),n=((e,t)=>{if(t&&t>e.length){const n=e;(e=new i(t)).set(n,0)}return e})(n,l-l%E)),u=0;l-E>=u;u+=E){const e=ce(J,ie(t,u,u+E));o&&f.update(e);const s=c.update(e);o||f.update(s),n.set(oe(J,s),u+r)}return e.pending=ie(t,u),n}async function re(n,r,s,o){n.password=null;const c=(e=>{if(void 0===w){const t=new i((e=unescape(encodeURIComponent(e))).length);for(let n=0;n{if(!Z)return I.importKey(t);try{return await q.importKey(\"raw\",t,n,!1,s)}catch(e){return Z=!1,I.importKey(t)}})(0,c,K,0,N),a=await(async(e,t,n)=>{if(!$)return I.B(t,e.salt,U.iterations,n);try{return await q.deriveBits(e,t,n)}catch(r){return $=!1,I.B(t,e.salt,U.iterations,n)}})(t.assign({salt:o},U),f,8*(2*T[r]+2)),l=new i(a),u=ce(J,ie(l,0,T[r])),h=ce(J,ie(l,T[r],2*T[r])),d=ie(l,2*T[r]);return t.assign(n,{keys:{key:u,$:h,passwordVerification:d},Y:new X(new Q(u),e.from(j)),Z:new Y(h)}),d}function se(e,t){let n=e;return e.length+t.length&&(n=new i(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function ie(e,t,n){return e.subarray(t,n)}function oe(e,t){return e.m(t)}function ce(e,t){return e.g(t)}class fe extends p{constructor({password:e,passwordVerification:n,checkPasswordOnly:r}){super({start(){t.assign(this,{password:e,passwordVerification:n}),we(this,e)},transform(e,t){const n=this;if(n.password){const t=le(n,e.subarray(0,12));if(n.password=null,t[11]!=n.passwordVerification)throw new s(V);e=e.subarray(12)}r?t.error(new s(R)):t.enqueue(le(n,e))}})}}class ae extends p{constructor({password:e,passwordVerification:n}){super({start(){t.assign(this,{password:e,passwordVerification:n}),we(this,e)},transform(e,t){const n=this;let r,s;if(n.password){n.password=null;const t=B(new i(12));t[11]=n.passwordVerification,r=new i(e.length+t.length),r.set(ue(n,t),0),s=12}else r=new i(e.length),s=0;r.set(ue(n,e),s),t.enqueue(r)}})}}function le(e,t){const n=new i(t.length);for(let r=0;r>>24]),i=~e.te.get(),e.keys=[n,s,i]}function de(e){const t=2|e.keys[2];return pe(r.imul(t,1^t)>>>8)}function pe(e){return 255&e}function ye(e){return 4294967295&e}const me=\"deflate-raw\";class be extends p{constructor(e,{chunkSize:t,CompressionStream:n,CompressionStreamNative:r}){super({});const{compressed:s,encrypted:i,useCompressionStream:o,zipCrypto:c,signed:f,level:a}=e,u=this;let w,h,d=ke(super.readable);i&&!c||!f||([d,w]=d.tee(),w=ze(w,new z)),s&&(d=Se(d,o,{level:a,chunkSize:t},r,n)),i&&(c?d=ze(d,new ae(e)):(h=new te(e),d=ze(d,h))),ve(u,d,(async()=>{let e;i&&!c&&(e=h.signature),i&&!c||!f||(e=await w.getReader().read(),e=new l(e.value.buffer).getUint32(0)),u.signature=e}))}}class ge extends p{constructor(e,{chunkSize:t,DecompressionStream:n,DecompressionStreamNative:r}){super({});const{zipCrypto:i,encrypted:o,signed:c,signature:f,compressed:a,useCompressionStream:u}=e;let w,h,d=ke(super.readable);o&&(i?d=ze(d,new fe(e)):(h=new ee(e),d=ze(d,h))),a&&(d=Se(d,u,{chunkSize:t},r,n)),o&&!i||!c||([d,w]=d.tee(),w=ze(w,new z)),ve(this,d,(async()=>{if((!o||i)&&c){const e=await w.getReader().read(),t=new l(e.value.buffer);if(f!=t.getUint32(0,!1))throw new s(P)}}))}}function ke(e){return ze(e,new p({transform(e,t){e&&e.length&&t.enqueue(e)}}))}function ve(e,n,r){n=ze(n,new p({flush:r})),t.defineProperty(e,\"readable\",{get:()=>n})}function Se(e,t,n,r,s){try{e=ze(e,new(t&&r?r:s)(me,n))}catch(r){if(!t)throw r;e=ze(e,new s(me,n))}return e}function ze(e,t){return e.pipeThrough(t)}const Ce=\"data\";class xe extends p{constructor(e,n){super({});const r=this,{codecType:s}=e;let i;s.startsWith(\"deflate\")?i=be:s.startsWith(\"inflate\")&&(i=ge);let o=0;const c=new i(e,n),f=super.readable,a=new p({transform(e,t){e&&e.length&&(o+=e.length,t.enqueue(e))},flush(){const{signature:e}=c;t.assign(r,{signature:e,size:o})}});t.defineProperty(r,\"readable\",{get:()=>f.pipeThrough(c).pipeThrough(a)})}}const _e=new a,Ae=new a;let Ie=0;async function De(e){try{const{options:t,scripts:r,config:s}=e;r&&r.length&&importScripts.apply(void 0,r),self.initCodec&&self.initCodec(),s.CompressionStreamNative=self.CompressionStream,s.DecompressionStreamNative=self.DecompressionStream,self.Deflate&&(s.CompressionStream=new k(self.Deflate)),self.Inflate&&(s.DecompressionStream=new k(self.Inflate));const i={highWaterMark:1,size:()=>s.chunkSize},o=e.readable||new y({async pull(e){const t=new u((e=>_e.set(Ie,e)));Ve({type:\"pull\",messageId:Ie}),Ie=(Ie+1)%n.MAX_SAFE_INTEGER;const{value:r,done:s}=await t;e.enqueue(r),s&&e.close()}},i),c=e.writable||new m({async write(e){let t;const r=new u((e=>t=e));Ae.set(Ie,t),Ve({type:Ce,value:e,messageId:Ie}),Ie=(Ie+1)%n.MAX_SAFE_INTEGER,await r}},i),f=new xe(t,s);await o.pipeThrough(f).pipeTo(c,{preventClose:!0,preventAbort:!0});try{await c.close()}catch(e){}const{signature:a,size:l}=f;Ve({type:\"close\",result:{signature:a,size:l}})}catch(e){Pe(e)}}function Ve(e){let{value:t}=e;if(t)if(t.length)try{t=new i(t),e.value=t.buffer,d(e,[e.value])}catch(t){d(e)}else d(e);else d(e)}function Pe(e){const{message:t,stack:n,code:r,name:s}=e;d({error:{message:t,stack:n,code:r,name:s}})}addEventListener(\"message\",(({data:e})=>{const{type:t,messageId:n,value:r,done:s}=e;try{if(\"start\"==t&&De(e),t==Ce){const e=_e.get(n);_e.delete(n),e({value:new i(r),done:s})}if(\"ack\"==t){const e=Ae.get(n);Ae.delete(n),e()}}catch(e){Pe(e)}}));const Re=-2;function Be(t){return Ee(t.map((([t,n])=>new e(t).fill(n,0,t))))}function Ee(t){return t.reduce(((t,n)=>t.concat(e.isArray(n)?Ee(n):n)),[])}const Me=[0,1,2,3].concat(...Be([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function Ke(){const e=this;function t(e,t){let n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1}e.ne=n=>{const s=e.re,i=e.ie.se,o=e.ie.oe;let c,f,a,l=-1;for(n.ce=0,n.fe=573,c=0;o>c;c++)0!==s[2*c]?(n.ae[++n.ce]=l=c,n.le[c]=0):s[2*c+1]=0;for(;2>n.ce;)a=n.ae[++n.ce]=2>l?++l:0,s[2*a]=1,n.le[a]=0,n.ue--,i&&(n.we-=i[2*a+1]);for(e.he=l,c=r.floor(n.ce/2);c>=1;c--)n.de(s,c);a=o;do{c=n.ae[1],n.ae[1]=n.ae[n.ce--],n.de(s,1),f=n.ae[1],n.ae[--n.fe]=c,n.ae[--n.fe]=f,s[2*a]=s[2*c]+s[2*f],n.le[a]=r.max(n.le[c],n.le[f])+1,s[2*c+1]=s[2*f+1]=a,n.ae[1]=a++,n.de(s,1)}while(n.ce>=2);n.ae[--n.fe]=n.ae[1],(t=>{const n=e.re,r=e.ie.se,s=e.ie.pe,i=e.ie.ye,o=e.ie.me;let c,f,a,l,u,w,h=0;for(l=0;15>=l;l++)t.be[l]=0;for(n[2*t.ae[t.fe]+1]=0,c=t.fe+1;573>c;c++)f=t.ae[c],l=n[2*n[2*f+1]+1]+1,l>o&&(l=o,h++),n[2*f+1]=l,f>e.he||(t.be[l]++,u=0,i>f||(u=s[f-i]),w=n[2*f],t.ue+=w*(l+u),r&&(t.we+=w*(r[2*f+1]+u)));if(0!==h){do{for(l=o-1;0===t.be[l];)l--;t.be[l]--,t.be[l+1]+=2,t.be[o]--,h-=2}while(h>0);for(l=o;0!==l;l--)for(f=t.be[l];0!==f;)a=t.ae[--c],a>e.he||(n[2*a+1]!=l&&(t.ue+=(l-n[2*a+1])*n[2*a],n[2*a+1]=l),f--)}})(n),((e,n,r)=>{const s=[];let i,o,c,f=0;for(i=1;15>=i;i++)s[i]=f=f+r[i-1]<<1;for(o=0;n>=o;o++)c=e[2*o+1],0!==c&&(e[2*o]=t(s[c]++,c))})(s,e.he,n.be)}}function Ue(e,t,n,r,s){const i=this;i.se=e,i.pe=t,i.ye=n,i.oe=r,i.me=s}Ke.ge=[0,1,2,3,4,5,6,7].concat(...Be([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]])),Ke.ke=[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],Ke.ve=[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],Ke.Se=e=>256>e?Me[e]:Me[256+(e>>>7)],Ke.ze=[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],Ke.Ce=[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],Ke.xe=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],Ke._e=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];const Ne=Be([[144,8],[112,9],[24,7],[8,8]]);Ue.Ae=Ee([12,140,76,204,44,172,108,236,28,156,92,220,60,188,124,252,2,130,66,194,34,162,98,226,18,146,82,210,50,178,114,242,10,138,74,202,42,170,106,234,26,154,90,218,58,186,122,250,6,134,70,198,38,166,102,230,22,150,86,214,54,182,118,246,14,142,78,206,46,174,110,238,30,158,94,222,62,190,126,254,1,129,65,193,33,161,97,225,17,145,81,209,49,177,113,241,9,137,73,201,41,169,105,233,25,153,89,217,57,185,121,249,5,133,69,197,37,165,101,229,21,149,85,213,53,181,117,245,13,141,77,205,45,173,109,237,29,157,93,221,61,189,125,253,19,275,147,403,83,339,211,467,51,307,179,435,115,371,243,499,11,267,139,395,75,331,203,459,43,299,171,427,107,363,235,491,27,283,155,411,91,347,219,475,59,315,187,443,123,379,251,507,7,263,135,391,71,327,199,455,39,295,167,423,103,359,231,487,23,279,151,407,87,343,215,471,55,311,183,439,119,375,247,503,15,271,143,399,79,335,207,463,47,303,175,431,111,367,239,495,31,287,159,415,95,351,223,479,63,319,191,447,127,383,255,511,0,64,32,96,16,80,48,112,8,72,40,104,24,88,56,120,4,68,36,100,20,84,52,116,3,131,67,195,35,163,99,227].map(((e,t)=>[e,Ne[t]])));const Oe=Be([[30,5]]);function Te(e,t,n,r,s){const i=this;i.Ie=e,i.De=t,i.Ve=n,i.Pe=r,i.Re=s}Ue.Be=Ee([0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30,1,17,9,25,5,21,13,29,3,19,11,27,7,23].map(((e,t)=>[e,Oe[t]]))),Ue.Ee=new Ue(Ue.Ae,Ke.ze,257,286,15),Ue.Me=new Ue(Ue.Be,Ke.Ce,0,30,15),Ue.Ke=new Ue(null,Ke.xe,0,19,7);const We=[new Te(0,0,0,0,0),new Te(4,4,8,4,1),new Te(4,5,16,8,1),new Te(4,6,32,32,1),new Te(4,4,16,16,2),new Te(8,16,32,32,2),new Te(8,16,128,128,2),new Te(8,32,128,256,2),new Te(32,128,258,1024,2),new Te(32,258,258,4096,2)],je=[\"need dictionary\",\"stream end\",\"\",\"\",\"stream error\",\"data error\",\"\",\"buffer error\",\"\",\"\"],He=113,Le=666,Fe=262;function qe(e,t,n,r){const s=e[2*t],i=e[2*n];return i>s||s==i&&r[t]<=r[n]}function Ge(){const e=this;let t,n,s,c,f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z,C,x,_,A,I,D,V,P,R,B,E,M,K;const U=new Ke,N=new Ke,O=new Ke;let T,W,j,H,L,F;function q(){let t;for(t=0;286>t;t++)E[2*t]=0;for(t=0;30>t;t++)M[2*t]=0;for(t=0;19>t;t++)K[2*t]=0;E[512]=1,e.ue=e.we=0,W=j=0}function G(e,t){let n,r=-1,s=e[1],i=0,o=7,c=4;0===s&&(o=138,c=3),e[2*(t+1)+1]=65535;for(let f=0;t>=f;f++)n=s,s=e[2*(f+1)+1],++ii?K[2*n]+=i:0!==n?(n!=r&&K[2*n]++,K[32]++):i>10?K[36]++:K[34]++,i=0,r=n,0===s?(o=138,c=3):n==s?(o=6,c=3):(o=7,c=4))}function J(t){e.Ue[e.pending++]=t}function Q(e){J(255&e),J(e>>>8&255)}function X(e,t){let n;const r=t;F>16-r?(n=e,L|=n<>>16-F,F+=r-16):(L|=e<=n;n++)if(r=i,i=e[2*(n+1)+1],++o>=c||r!=i){if(f>o)do{Y(r,K)}while(0!=--o);else 0!==r?(r!=s&&(Y(r,K),o--),Y(16,K),X(o-3,2)):o>10?(Y(18,K),X(o-11,7)):(Y(17,K),X(o-3,3));o=0,s=r,0===i?(c=138,f=3):r==i?(c=6,f=3):(c=7,f=4)}}function $(){16==F?(Q(L),L=0,F=0):8>F||(J(255&L),L>>>=8,F-=8)}function ee(t,n){let s,i,o;if(e.Ne[W]=t,e.Oe[W]=255&n,W++,0===t?E[2*n]++:(j++,t--,E[2*(Ke.ge[n]+256+1)]++,M[2*Ke.Se(t)]++),0==(8191&W)&&V>2){for(s=8*W,i=C-k,o=0;30>o;o++)s+=M[2*o]*(5+Ke.Ce[o]);if(s>>>=3,jc);Y(256,t),H=t[513]}function ne(){F>8?Q(L):F>0&&J(255&L),L=0,F=0}function re(t,n,r){X(0+(r?1:0),3),((t,n)=>{ne(),H=8,Q(n),Q(~n),e.Ue.set(u.subarray(t,t+n),e.pending),e.pending+=n})(t,n)}function se(n){((t,n,r)=>{let s,i,o=0;V>0?(U.ne(e),N.ne(e),o=(()=>{let t;for(G(E,U.he),G(M,N.he),O.ne(e),t=18;t>=3&&0===K[2*Ke._e[t]+1];t--);return e.ue+=14+3*(t+1),t})(),s=e.ue+3+7>>>3,i=e.we+3+7>>>3,i>s||(s=i)):s=i=n+5,n+4>s||-1==t?i==s?(X(2+(r?1:0),3),te(Ue.Ae,Ue.Be)):(X(4+(r?1:0),3),((e,t,n)=>{let r;for(X(e-257,5),X(t-1,5),X(n-4,4),r=0;n>r;r++)X(K[2*Ke._e[r]+1],3);Z(E,e-1),Z(M,t-1)})(U.he+1,N.he+1,o+1),te(E,M)):re(t,n,r),q(),r&&ne()})(0>k?-1:k,C-k,n),k=C,t.Te()}function ie(){let e,n,r,s;do{if(s=w-_-C,0===s&&0===C&&0===_)s=f;else if(-1==s)s--;else if(C>=f+f-Fe){u.set(u.subarray(f,f+f),0),x-=f,C-=f,k-=f,e=y,r=e;do{n=65535&d[--r],d[r]=f>n?0:n-f}while(0!=--e);e=f,r=e;do{n=65535&h[--r],h[r]=f>n?0:n-f}while(0!=--e);s+=f}if(0===t.We)return;e=t.je(u,C+_,s),_+=e,3>_||(p=255&u[C],p=(p<_&&0!==t.We)}function oe(e){let t,n,r=I,s=C,i=A;const o=C>f-Fe?C-(f-Fe):0;let c=B;const a=l,w=C+258;let d=u[s+i-1],p=u[s+i];R>A||(r>>=2),c>_&&(c=_);do{if(t=e,u[t+i]==p&&u[t+i-1]==d&&u[t]==u[s]&&u[++t]==u[s+1]){s+=2,t++;do{}while(u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&w>s);if(n=258-(w-s),s=w-258,n>i){if(x=e,i=n,n>=c)break;d=u[s+i-1],p=u[s+i]}}}while((e=65535&h[e&a])>o&&0!=--r);return i>_?_:i}e.le=[],e.be=[],e.ae=[],E=[],M=[],K=[],e.de=(t,n)=>{const r=e.ae,s=r[n];let i=n<<1;for(;i<=e.ce&&(i(W||(W=8),j||(j=8),G||(G=0),t.Le=null,-1==S&&(S=6),1>j||j>9||8!=W||9>x||x>15||0>S||S>9||0>G||G>2?Re:(t.Fe=e,a=x,f=1<(t.qe=t.Ge=0,t.Le=null,e.pending=0,e.Je=0,n=He,c=0,U.re=E,U.ie=Ue.Ee,N.re=M,N.ie=Ue.Me,O.re=K,O.ie=Ue.Ke,L=0,F=0,H=8,q(),(()=>{w=2*f,d[y-1]=0;for(let e=0;y-1>e;e++)d[e]=0;D=We[V].De,R=We[V].Ie,B=We[V].Ve,I=We[V].Pe,C=0,k=0,_=0,v=A=2,z=0,p=0})(),0))(t))),e.Qe=()=>42!=n&&n!=He&&n!=Le?Re:(e.Oe=null,e.Ne=null,e.Ue=null,d=null,h=null,u=null,e.Fe=null,n==He?-3:0),e.Xe=(e,t,n)=>{let r=0;return-1==t&&(t=6),0>t||t>9||0>n||n>2?Re:(We[V].Re!=We[t].Re&&0!==e.qe&&(r=e.Ye(1)),V!=t&&(V=t,D=We[V].De,R=We[V].Ie,B=We[V].Ve,I=We[V].Pe),P=n,r)},e.Ze=(e,t,r)=>{let s,i=r,o=0;if(!t||42!=n)return Re;if(3>i)return 0;for(i>f-Fe&&(i=f-Fe,o=r-i),u.set(t.subarray(o,o+i),0),C=i,k=i,p=255&u[0],p=(p<=s;s++)p=(p<{let o,w,m,I,R;if(i>4||0>i)return Re;if(!r.$e||!r.et&&0!==r.We||n==Le&&4!=i)return r.Le=je[4],Re;if(0===r.tt)return r.Le=je[7],-5;var B;if(t=r,I=c,c=i,42==n&&(w=8+(a-8<<4)<<8,m=(V-1&255)>>1,m>3&&(m=3),w|=m<<6,0!==C&&(w|=32),w+=31-w%31,n=He,J((B=w)>>8&255),J(255&B)),0!==e.pending){if(t.Te(),0===t.tt)return c=-1,0}else if(0===t.We&&I>=i&&4!=i)return t.Le=je[7],-5;if(n==Le&&0!==t.We)return r.Le=je[7],-5;if(0!==t.We||0!==_||0!=i&&n!=Le){switch(R=-1,We[V].Re){case 0:R=(e=>{let n,r=65535;for(r>s-5&&(r=s-5);;){if(1>=_){if(ie(),0===_&&0==e)return 0;if(0===_)break}if(C+=_,_=0,n=k+r,(0===C||C>=n)&&(_=C-n,C=n,se(!1),0===t.tt))return 0;if(C-k>=f-Fe&&(se(!1),0===t.tt))return 0}return se(4==e),0===t.tt?4==e?2:0:4==e?3:1})(i);break;case 1:R=(e=>{let n,r=0;for(;;){if(Fe>_){if(ie(),Fe>_&&0==e)return 0;if(0===_)break}if(3>_||(p=(p<f-Fe||2!=P&&(v=oe(r)),3>v)n=ee(0,255&u[C]),_--,C++;else if(n=ee(C-x,v-3),_-=v,v>D||3>_)C+=v,v=0,p=255&u[C],p=(p<{let n,r,s=0;for(;;){if(Fe>_){if(ie(),Fe>_&&0==e)return 0;if(0===_)break}if(3>_||(p=(p<A&&f-Fe>=(C-s&65535)&&(2!=P&&(v=oe(s)),5>=v&&(1==P||3==v&&C-x>4096)&&(v=2)),3>A||v>A)if(0!==z){if(n=ee(0,255&u[C-1]),n&&se(!1),C++,_--,0===t.tt)return 0}else z=1,C++,_--;else{r=C+_-3,n=ee(C-1-S,A-3),_-=A-1,A-=2;do{++C>r||(p=(p<1+H+10-F&&(X(2,3),Y(256,Ue.Ae),$()),H=7;else if(re(0,0,!1),3==i)for(o=0;y>o;o++)d[o]=0;if(t.Te(),0===t.tt)return c=-1,0}}return 4!=i?0:1}}function Je(){const e=this;e.nt=0,e.rt=0,e.We=0,e.qe=0,e.tt=0,e.Ge=0}function Qe(e){const t=new Je,n=(o=e&&e.chunkSize?e.chunkSize:65536)+5*(r.floor(o/16383)+1);var o;const c=new i(n);let f=e?e.level:-1;void 0===f&&(f=-1),t.He(f),t.$e=c,this.append=(e,r)=>{let o,f,a=0,l=0,u=0;const w=[];if(e.length){t.nt=0,t.et=e,t.We=e.length;do{if(t.rt=0,t.tt=n,o=t.Ye(0),0!=o)throw new s(\"deflating: \"+t.Le);t.rt&&(t.rt==n?w.push(new i(c)):w.push(c.slice(0,t.rt))),u+=t.rt,r&&t.nt>0&&t.nt!=a&&(r(t.nt),a=t.nt)}while(t.We>0||0===t.tt);return w.length>1?(f=new i(u),w.forEach((e=>{f.set(e,l),l+=e.length}))):f=w[0]||new i,f}},this.flush=()=>{let e,r,o=0,f=0;const a=[];do{if(t.rt=0,t.tt=n,e=t.Ye(4),1!=e&&0!=e)throw new s(\"deflating: \"+t.Le);n-t.tt>0&&a.push(c.slice(0,t.rt)),f+=t.rt}while(t.We>0||0===t.tt);return t.Qe(),r=new i(f),a.forEach((e=>{r.set(e,o),o+=e.length})),r}}Je.prototype={He(e,t){const n=this;return n.Fe=new Ge,t||(t=15),n.Fe.He(n,e,t)},Ye(e){const t=this;return t.Fe?t.Fe.Ye(t,e):Re},Qe(){const e=this;if(!e.Fe)return Re;const t=e.Fe.Qe();return e.Fe=null,t},Xe(e,t){const n=this;return n.Fe?n.Fe.Xe(n,e,t):Re},Ze(e,t){const n=this;return n.Fe?n.Fe.Ze(n,e,t):Re},je(e,t,n){const r=this;let s=r.We;return s>n&&(s=n),0===s?0:(r.We-=s,e.set(r.et.subarray(r.nt,r.nt+s),t),r.nt+=s,r.qe+=s,s)},Te(){const e=this;let t=e.Fe.pending;t>e.tt&&(t=e.tt),0!==t&&(e.$e.set(e.Fe.Ue.subarray(e.Fe.Je,e.Fe.Je+t),e.rt),e.rt+=t,e.Fe.Je+=t,e.Ge+=t,e.tt-=t,e.Fe.pending-=t,0===e.Fe.pending&&(e.Fe.Je=0))}};const Xe=-2,Ye=-3,Ze=-5,$e=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],et=[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],tt=[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],nt=[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],rt=[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],st=[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],it=[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 ot(){let e,t,n,r,s,i;function o(e,t,o,c,f,a,l,u,w,h,d){let p,y,m,b,g,k,v,S,z,C,x,_,A,I,D;C=0,g=o;do{n[e[t+C]]++,C++,g--}while(0!==g);if(n[0]==o)return l[0]=-1,u[0]=0,0;for(S=u[0],k=1;15>=k&&0===n[k];k++);for(v=k,k>S&&(S=k),g=15;0!==g&&0===n[g];g--);for(m=g,S>g&&(S=g),u[0]=S,I=1<k;k++,I<<=1)if(0>(I-=n[k]))return Ye;if(0>(I-=n[g]))return Ye;for(n[g]+=I,i[1]=k=0,C=1,A=2;0!=--g;)i[A]=k+=n[C],A++,C++;g=0,C=0;do{0!==(k=e[t+C])&&(d[i[k]++]=g),C++}while(++g=v;v++)for(p=n[v];0!=p--;){for(;v>_+S;){if(b++,_+=S,D=m-_,D=D>S?S:D,(y=1<<(k=v-_))>p+1&&(y-=p+1,A=v,D>k))for(;++kn[++A];)y-=n[A];if(D=1<1440)return Ye;s[b]=x=h[0],h[0]+=D,0!==b?(i[b]=g,r[0]=k,r[1]=S,k=g>>>_-S,r[2]=x-s[b-1]-k,w.set(r,3*(s[b-1]+k))):l[0]=x}for(r[1]=v-_,o>C?d[C]d[C]?0:96,r[2]=d[C++]):(r[0]=a[d[C]-c]+16+64,r[2]=f[d[C++]-c]):r[0]=192,y=1<>>_;D>k;k+=y)w.set(r,3*(x+k));for(k=1<>>=1)g^=k;for(g^=k,z=(1<<_)-1;(g&z)!=i[b];)b--,_-=S,z=(1<<_)-1}return 0!==I&&1!=m?Ze:0}function c(o){let c;for(e||(e=[],t=[],n=new f(16),r=[],s=new f(15),i=new f(16)),t.lengthc;c++)t[c]=0;for(c=0;16>c;c++)n[c]=0;for(c=0;3>c;c++)r[c]=0;s.set(n.subarray(0,15),0),i.set(n.subarray(0,16),0)}this.st=(n,r,s,i,f)=>{let a;return c(19),e[0]=0,a=o(n,0,19,19,null,null,s,r,i,e,t),a==Ye?f.Le=\"oversubscribed dynamic bit lengths tree\":a!=Ze&&0!==r[0]||(f.Le=\"incomplete dynamic bit lengths tree\",a=Ye),a},this.it=(n,r,s,i,f,a,l,u,w)=>{let h;return c(288),e[0]=0,h=o(s,0,n,257,nt,rt,a,i,u,e,t),0!=h||0===i[0]?(h==Ye?w.Le=\"oversubscribed literal/length tree\":-4!=h&&(w.Le=\"incomplete literal/length tree\",h=Ye),h):(c(288),h=o(s,n,r,0,st,it,l,f,u,e,t),0!=h||0===f[0]&&n>257?(h==Ye?w.Le=\"oversubscribed distance tree\":h==Ze?(w.Le=\"incomplete distance tree\",h=Ye):-4!=h&&(w.Le=\"empty distance tree with lengths\",h=Ye),h):0)}}function ct(){const e=this;let t,n,r,s,i=0,o=0,c=0,f=0,a=0,l=0,u=0,w=0,h=0,d=0;function p(e,t,n,r,s,i,o,c){let f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z;d=c.nt,p=c.We,w=o.ot,h=o.ct,y=o.write,m=yh;)p--,w|=(255&c.ft(d++))<>=a[z+1],h-=a[z+1],0!=(16&u)){for(u&=15,k=a[z+2]+(w&$e[u]),w>>=u,h-=u;15>h;)p--,w|=(255&c.ft(d++))<>=a[z+1],h-=a[z+1],0!=(16&u)){for(u&=15;u>h;)p--,w|=(255&c.ft(d++))<>=u,h-=u,m-=k,v>y){S=y-v;do{S+=o.end}while(0>S);if(u=o.end-S,k>u){if(k-=u,y-S>0&&u>y-S)do{o.lt[y++]=o.lt[S++]}while(0!=--u);else o.lt.set(o.lt.subarray(S,S+u),y),y+=u,S+=u,u=0;S=0}}else S=y-v,y-S>0&&2>y-S?(o.lt[y++]=o.lt[S++],o.lt[y++]=o.lt[S++],k-=2):(o.lt.set(o.lt.subarray(S,S+2),y),y+=2,S+=2,k-=2);if(y-S>0&&k>y-S)do{o.lt[y++]=o.lt[S++]}while(0!=--k);else o.lt.set(o.lt.subarray(S,S+k),y),y+=k,S+=k,k=0;break}if(0!=(64&u))return c.Le=\"invalid distance code\",k=c.We-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ot=w,o.ct=h,c.We=p,c.qe+=d-c.nt,c.nt=d,o.write=y,Ye;f+=a[z+2],f+=w&$e[u],z=3*(l+f),u=a[z]}break}if(0!=(64&u))return 0!=(32&u)?(k=c.We-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ot=w,o.ct=h,c.We=p,c.qe+=d-c.nt,c.nt=d,o.write=y,1):(c.Le=\"invalid literal/length code\",k=c.We-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ot=w,o.ct=h,c.We=p,c.qe+=d-c.nt,c.nt=d,o.write=y,Ye);if(f+=a[z+2],f+=w&$e[u],z=3*(l+f),0===(u=a[z])){w>>=a[z+1],h-=a[z+1],o.lt[y++]=a[z+2],m--;break}}else w>>=a[z+1],h-=a[z+1],o.lt[y++]=a[z+2],m--}while(m>=258&&p>=10);return k=c.We-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ot=w,o.ct=h,c.We=p,c.qe+=d-c.nt,c.nt=d,o.write=y,0}e.init=(e,i,o,c,f,a)=>{t=0,u=e,w=i,r=o,h=c,s=f,d=a,n=null},e.ut=(e,y,m)=>{let b,g,k,v,S,z,C,x=0,_=0,A=0;for(A=y.nt,v=y.We,x=e.ot,_=e.ct,S=e.write,z=S=258&&v>=10&&(e.ot=x,e.ct=_,y.We=v,y.qe+=A-y.nt,y.nt=A,e.write=S,m=p(u,w,r,h,s,d,e,y),A=y.nt,v=y.We,x=e.ot,_=e.ct,S=e.write,z=S_;){if(0===v)return e.ot=x,e.ct=_,y.We=v,y.qe+=A-y.nt,y.nt=A,e.write=S,e.wt(y,m);m=0,v--,x|=(255&y.ft(A++))<<_,_+=8}if(g=3*(o+(x&$e[b])),x>>>=n[g+1],_-=n[g+1],k=n[g],0===k){f=n[g+2],t=6;break}if(0!=(16&k)){a=15&k,i=n[g+2],t=2;break}if(0==(64&k)){c=k,o=g/3+n[g+2];break}if(0!=(32&k)){t=7;break}return t=9,y.Le=\"invalid literal/length code\",m=Ye,e.ot=x,e.ct=_,y.We=v,y.qe+=A-y.nt,y.nt=A,e.write=S,e.wt(y,m);case 2:for(b=a;b>_;){if(0===v)return e.ot=x,e.ct=_,y.We=v,y.qe+=A-y.nt,y.nt=A,e.write=S,e.wt(y,m);m=0,v--,x|=(255&y.ft(A++))<<_,_+=8}i+=x&$e[b],x>>=b,_-=b,c=w,n=s,o=d,t=3;case 3:for(b=c;b>_;){if(0===v)return e.ot=x,e.ct=_,y.We=v,y.qe+=A-y.nt,y.nt=A,e.write=S,e.wt(y,m);m=0,v--,x|=(255&y.ft(A++))<<_,_+=8}if(g=3*(o+(x&$e[b])),x>>=n[g+1],_-=n[g+1],k=n[g],0!=(16&k)){a=15&k,l=n[g+2],t=4;break}if(0==(64&k)){c=k,o=g/3+n[g+2];break}return t=9,y.Le=\"invalid distance code\",m=Ye,e.ot=x,e.ct=_,y.We=v,y.qe+=A-y.nt,y.nt=A,e.write=S,e.wt(y,m);case 4:for(b=a;b>_;){if(0===v)return e.ot=x,e.ct=_,y.We=v,y.qe+=A-y.nt,y.nt=A,e.write=S,e.wt(y,m);m=0,v--,x|=(255&y.ft(A++))<<_,_+=8}l+=x&$e[b],x>>=b,_-=b,t=5;case 5:for(C=S-l;0>C;)C+=e.end;for(;0!==i;){if(0===z&&(S==e.end&&0!==e.read&&(S=0,z=S7&&(_-=8,v++,A--),e.write=S,m=e.wt(y,m),S=e.write,z=S{}}ot.dt=(e,t,n,r)=>(e[0]=9,t[0]=5,n[0]=et,r[0]=tt,0);const ft=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function at(e,t){const n=this;let r,s=0,o=0,c=0,a=0;const l=[0],u=[0],w=new ct;let h=0,d=new f(4320);const p=new ot;n.ct=0,n.ot=0,n.lt=new i(t),n.end=t,n.read=0,n.write=0,n.reset=(e,t)=>{t&&(t[0]=0),6==s&&w.ht(e),s=0,n.ct=0,n.ot=0,n.read=n.write=0},n.reset(e,null),n.wt=(e,t)=>{let r,s,i;return s=e.rt,i=n.read,r=(i>n.write?n.end:n.write)-i,r>e.tt&&(r=e.tt),0!==r&&t==Ze&&(t=0),e.tt-=r,e.Ge+=r,e.$e.set(n.lt.subarray(i,i+r),s),s+=r,i+=r,i==n.end&&(i=0,n.write==n.end&&(n.write=0),r=n.write-i,r>e.tt&&(r=e.tt),0!==r&&t==Ze&&(t=0),e.tt-=r,e.Ge+=r,e.$e.set(n.lt.subarray(i,i+r),s),s+=r,i+=r),e.rt=s,n.read=i,t},n.ut=(e,t)=>{let i,f,y,m,b,g,k,v;for(m=e.nt,b=e.We,f=n.ot,y=n.ct,g=n.write,k=gy;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<>>1){case 0:f>>>=3,y-=3,i=7&y,f>>>=i,y-=i,s=1;break;case 1:S=[],z=[],C=[[]],x=[[]],ot.dt(S,z,C,x),w.init(S[0],z[0],C[0],0,x[0],0),f>>>=3,y-=3,s=6;break;case 2:f>>>=3,y-=3,s=3;break;case 3:return f>>>=3,y-=3,s=9,e.Le=\"invalid block type\",t=Ye,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t)}break;case 1:for(;32>y;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<>>16&65535)!=(65535&f))return s=9,e.Le=\"invalid stored block lengths\",t=Ye,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);o=65535&f,f=y=0,s=0!==o?2:0!==h?7:0;break;case 2:if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);if(0===k&&(g==n.end&&0!==n.read&&(g=0,k=gb&&(i=b),i>k&&(i=k),n.lt.set(e.je(m,i),g),m+=i,b-=i,g+=i,k-=i,0!=(o-=i))break;s=0!==h?7:0;break;case 3:for(;14>y;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<29||(i>>5&31)>29)return s=9,e.Le=\"too many length or distance symbols\",t=Ye,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);if(i=258+(31&i)+(i>>5&31),!r||r.lengthv;v++)r[v]=0;f>>>=14,y-=14,a=0,s=4;case 4:for(;4+(c>>>10)>a;){for(;3>y;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<>>=3,y-=3}for(;19>a;)r[ft[a++]]=0;if(l[0]=7,i=p.st(r,l,u,d,e),0!=i)return(t=i)==Ye&&(r=null,s=9),n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);a=0,s=5;case 5:for(;i=c,258+(31&i)+(i>>5&31)>a;){let o,w;for(i=l[0];i>y;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<w)f>>>=i,y-=i,r[a++]=w;else{for(v=18==w?7:w-14,o=18==w?11:3;i+v>y;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<>>=i,y-=i,o+=f&$e[v],f>>>=v,y-=v,v=a,i=c,v+o>258+(31&i)+(i>>5&31)||16==w&&1>v)return r=null,s=9,e.Le=\"invalid bit length repeat\",t=Ye,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);w=16==w?r[v-1]:0;do{r[v++]=w}while(0!=--o);a=v}}if(u[0]=-1,_=[],A=[],I=[],D=[],_[0]=9,A[0]=6,i=c,i=p.it(257+(31&i),1+(i>>5&31),r,_,A,I,D,d,e),0!=i)return i==Ye&&(r=null,s=9),t=i,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);w.init(_[0],A[0],d,I[0],d,D[0]),s=6;case 6:if(n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,1!=(t=w.ut(n,e,t)))return n.wt(e,t);if(t=0,w.ht(e),m=e.nt,b=e.We,f=n.ot,y=n.ct,g=n.write,k=g{n.reset(e,null),n.lt=null,d=null},n.yt=(e,t,r)=>{n.lt.set(e.subarray(t,t+r),0),n.read=n.write=r},n.bt=()=>1==s?1:0}const lt=13,ut=[0,0,255,255];function wt(){const e=this;function t(e){return e&&e.gt?(e.qe=e.Ge=0,e.Le=null,e.gt.mode=7,e.gt.kt.reset(e,null),0):Xe}e.mode=0,e.method=0,e.vt=[0],e.St=0,e.marker=0,e.zt=0,e.Ct=t=>(e.kt&&e.kt.ht(t),e.kt=null,0),e.xt=(n,r)=>(n.Le=null,e.kt=null,8>r||r>15?(e.Ct(n),Xe):(e.zt=r,n.gt.kt=new at(n,1<{let n,r;if(!e||!e.gt||!e.et)return Xe;const s=e.gt;for(t=4==t?Ze:0,n=Ze;;)switch(s.mode){case 0:if(0===e.We)return n;if(n=t,e.We--,e.qe++,8!=(15&(s.method=e.ft(e.nt++)))){s.mode=lt,e.Le=\"unknown compression method\",s.marker=5;break}if(8+(s.method>>4)>s.zt){s.mode=lt,e.Le=\"invalid win size\",s.marker=5;break}s.mode=1;case 1:if(0===e.We)return n;if(n=t,e.We--,e.qe++,r=255&e.ft(e.nt++),((s.method<<8)+r)%31!=0){s.mode=lt,e.Le=\"incorrect header check\",s.marker=5;break}if(0==(32&r)){s.mode=7;break}s.mode=2;case 2:if(0===e.We)return n;n=t,e.We--,e.qe++,s.St=(255&e.ft(e.nt++))<<24&4278190080,s.mode=3;case 3:if(0===e.We)return n;n=t,e.We--,e.qe++,s.St+=(255&e.ft(e.nt++))<<16&16711680,s.mode=4;case 4:if(0===e.We)return n;n=t,e.We--,e.qe++,s.St+=(255&e.ft(e.nt++))<<8&65280,s.mode=5;case 5:return 0===e.We?n:(n=t,e.We--,e.qe++,s.St+=255&e.ft(e.nt++),s.mode=6,2);case 6:return s.mode=lt,e.Le=\"need dictionary\",s.marker=0,Xe;case 7:if(n=s.kt.ut(e,n),n==Ye){s.mode=lt,s.marker=0;break}if(0==n&&(n=t),1!=n)return n;n=t,s.kt.reset(e,s.vt),s.mode=12;case 12:return e.We=0,1;case lt:return Ye;default:return Xe}},e.At=(e,t,n)=>{let r=0,s=n;if(!e||!e.gt||6!=e.gt.mode)return Xe;const i=e.gt;return s<1<{let n,r,s,i,o;if(!e||!e.gt)return Xe;const c=e.gt;if(c.mode!=lt&&(c.mode=lt,c.marker=0),0===(n=e.We))return Ze;for(r=e.nt,s=c.marker;0!==n&&4>s;)e.ft(r)==ut[s]?s++:s=0!==e.ft(r)?0:4-s,r++,n--;return e.qe+=r-e.nt,e.nt=r,e.We=n,c.marker=s,4!=s?Ye:(i=e.qe,o=e.Ge,t(e),e.qe=i,e.Ge=o,c.mode=7,0)},e.Dt=e=>e&&e.gt&&e.gt.kt?e.gt.kt.bt():Xe}function ht(){}function dt(e){const t=new ht,n=e&&e.chunkSize?r.floor(2*e.chunkSize):131072,o=new i(n);let c=!1;t.xt(),t.$e=o,this.append=(e,r)=>{const f=[];let a,l,u=0,w=0,h=0;if(0!==e.length){t.nt=0,t.et=e,t.We=e.length;do{if(t.rt=0,t.tt=n,0!==t.We||c||(t.nt=0,c=!0),a=t._t(0),c&&a===Ze){if(0!==t.We)throw new s(\"inflating: bad input\")}else if(0!==a&&1!==a)throw new s(\"inflating: \"+t.Le);if((c||1===a)&&t.We===e.length)throw new s(\"inflating: bad input\");t.rt&&(t.rt===n?f.push(new i(o)):f.push(o.slice(0,t.rt))),h+=t.rt,r&&t.nt>0&&t.nt!=u&&(r(t.nt),u=t.nt)}while(t.We>0||0===t.tt);return f.length>1?(l=new i(h),f.forEach((e=>{l.set(e,w),w+=e.length}))):l=f[0]||new i,l}},this.flush=()=>{t.Ct()}}ht.prototype={xt(e){const t=this;return t.gt=new wt,e||(e=15),t.gt.xt(t,e)},_t(e){const t=this;return t.gt?t.gt._t(t,e):Xe},Ct(){const e=this;if(!e.gt)return Xe;const t=e.gt.Ct(e);return e.gt=null,t},It(){const e=this;return e.gt?e.gt.It(e):Xe},At(e,t){const n=this;return n.gt?n.gt.At(n,e,t):Xe},ft(e){return this.et[e]},je(e,t){return this.et.subarray(e,e+t)}},self.initCodec=()=>{self.Deflate=Qe,self.Inflate=dt};\\n'],{type:\"text/javascript\"}));e({workerScripts:{inflate:[t],deflate:[t]}})}export{e as configureWebWorker};\n","/// \n\n/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport { Deflate } from \"./lib/core/streams/codecs/deflate.js\";\nimport { Inflate } from \"./lib/core/streams/codecs/inflate.js\";\nimport { configure } from \"./lib/core/configuration.js\";\nimport { getMimeType } from \"./lib/core/util/mime-type.js\";\nimport { terminateWorkers } from \"./lib/core/codec-pool.js\";\n\nconfigure({ Deflate, Inflate });\n\nexport {\n\tfs,\n\tconfigure,\n\tinitShimAsyncCodec,\n\tZipReader,\n\tZipWriter,\n\tReader,\n\tWriter,\n\tTextReader,\n\tTextWriter,\n\tData64URIReader,\n\tData64URIWriter,\n\tBlobReader,\n\tBlobWriter,\n\tHttpReader,\n\tHttpRangeReader,\n\tUint8ArrayWriter,\n\tUint8ArrayReader,\n\tSplitZipReader,\n\tSplitZipWriter,\n\tSplitDataReader,\n\tSplitDataWriter,\n\tERR_HTTP_RANGE,\n\tERR_BAD_FORMAT,\n\tERR_EOCDR_NOT_FOUND,\n\tERR_EOCDR_ZIP64_NOT_FOUND,\n\tERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND,\n\tERR_CENTRAL_DIRECTORY_NOT_FOUND,\n\tERR_LOCAL_FILE_HEADER_NOT_FOUND,\n\tERR_EXTRAFIELD_ZIP64_NOT_FOUND,\n\tERR_ENCRYPTED,\n\tERR_UNSUPPORTED_ENCRYPTION,\n\tERR_UNSUPPORTED_COMPRESSION,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD,\n\tERR_DUPLICATED_NAME,\n\tERR_INVALID_COMMENT,\n\tERR_INVALID_ENTRY_NAME,\n\tERR_INVALID_ENTRY_COMMENT,\n\tERR_INVALID_VERSION,\n\tERR_INVALID_EXTRAFIELD_TYPE,\n\tERR_INVALID_EXTRAFIELD_DATA,\n\tERR_INVALID_ENCRYPTION_STRENGTH,\n\tERR_UNSUPPORTED_FORMAT,\n\tERR_SPLIT_ZIP_FILE,\n\tERR_ITERATOR_COMPLETED_TOO_SOON\n} from \"./lib/zip-fs.js\";\nexport { getMimeType, terminateWorkers };","import * as common from \"./common\";\nimport {\n ZipReader,\n BlobReader,\n BlobWriter,\n TextWriter,\n Entry,\n} from \"@zip.js/zip.js\";\nimport { FastbootDevice, FastbootError, ReconnectCallback } from \"./fastboot\";\nimport { BlobEntryReader } from \"./io\";\n\n/**\n * Callback for factory image flashing progress.\n *\n * @callback FactoryProgressCallback\n * @param {string} action - Action in the flashing process, e.g. unpack/flash.\n * @param {string} item - Item processed by the action, e.g. partition being flashed.\n * @param {number} progress - Progress within the current action between 0 and 1.\n */\nexport type FactoryProgressCallback = (\n action: string,\n item: string,\n progress: number\n) => void;\n\n// Images needed for fastbootd\nconst BOOT_CRITICAL_IMAGES = [\n \"boot\",\n \"dt\",\n \"dtbo\",\n \"init_boot\",\n \"pvmfw\",\n \"recovery\",\n \"vbmeta_system\",\n \"vbmeta_vendor\",\n \"vbmeta\",\n \"vendor_boot\",\n \"vendor_kernel_boot\",\n];\n\n// Less critical images to flash after boot-critical ones\nconst SYSTEM_IMAGES = [\n \"odm\",\n \"odm_dlkm\",\n \"product\",\n \"system_dlkm\",\n \"system_ext\",\n \"system\",\n \"vendor_dlkm\",\n \"vendor\",\n];\n\n/**\n * User-friendly action strings for factory image flashing progress.\n * This can be indexed by the action argument in FactoryFlashCallback.\n */\nexport const USER_ACTION_MAP = {\n load: \"Loading\",\n unpack: \"Unpacking\",\n flash: \"Writing\",\n wipe: \"Wiping\",\n reboot: \"Restarting\",\n};\n\nconst BOOTLOADER_REBOOT_TIME = 4000; // ms\nconst FASTBOOTD_REBOOT_TIME = 16000; // ms\nconst USERDATA_ERASE_TIME = 1000; // ms\n\nasync function flashEntryBlob(\n device: FastbootDevice,\n entry: Entry,\n onProgress: FactoryProgressCallback,\n partition: string\n) {\n const blob: Blob = await common.zipGetData(\n entry,\n new BlobWriter(\"application/octet-stream\"),\n {\n onstart(total: number): Promise | undefined {\n common.logDebug(`Unpacking ${partition} (${total} bytes)`);\n onProgress(\"unpack\", partition, 0.0);\n return;\n },\n onprogress(progress: number, total: number): Promise | undefined {\n onProgress(\"unpack\", partition, progress / total);\n return;\n }\n }\n );\n\n common.logDebug(`Flashing ${partition}`);\n onProgress(\"flash\", partition, 0.0);\n await device.flashBlob(partition, blob, (progress) => {\n onProgress(\"flash\", partition, progress);\n });\n}\n\nasync function tryFlashImages(\n device: FastbootDevice,\n entries: Array,\n onProgress: FactoryProgressCallback,\n imageNames: Array\n) {\n for (let imageName of imageNames) {\n let pattern = new RegExp(`${imageName}(?:-.+)?\\\\.img$`);\n let entry = entries.find((entry) => entry.filename.match(pattern));\n if (entry !== undefined) {\n if (imageName == \"bootloader\") {\n let current_slot = await device.getVariable(\"current-slot\");\n if (current_slot == \"a\") {\n await flashEntryBlob(device, entry, onProgress, (imageName + \"_b\"));\n await device.runCommand(\"set_active:b\");\n } else if (current_slot == \"b\") {\n await flashEntryBlob(device, entry, onProgress, (imageName + \"_a\"));\n await device.runCommand(\"set_active:a\");\n } else {\n throw new FastbootError(\n \"FAIL\",\n `Invalid slot given by bootloader.`\n );\n }\n }\n else {\n await flashEntryBlob(device, entry, onProgress, imageName);\n }\n }\n }\n}\n\nasync function checkRequirements(device: FastbootDevice, androidInfo: string) {\n // Deal with CRLF just in case\n for (let line of androidInfo.replace(\"\\r\", \"\").split(\"\\n\")) {\n let match = line.match(/^require\\s+(.+?)=(.+)$/);\n if (!match) {\n continue;\n }\n\n let variable = match[1];\n // Historical mismatch that we still need to deal with\n if (variable === \"board\") {\n variable = \"product\";\n }\n\n let expectValue = match[2];\n let expectValues: Array = expectValue.split(\"|\");\n\n // Special case: not a real variable at all\n if (variable === \"partition-exists\") {\n // Check whether the partition exists on the device:\n // has-slot = undefined || FAIL => doesn't exist\n // has-slot = yes || no => exists\n let hasSlot = await device.getVariable(`has-slot:${expectValue}`);\n if (hasSlot !== \"yes\" && hasSlot !== \"no\") {\n throw new FastbootError(\n \"FAIL\",\n `Requirement ${variable}=${expectValue} failed, device lacks partition`\n );\n }\n\n // Check whether we recognize the partition\n if (\n !BOOT_CRITICAL_IMAGES.includes(expectValue) &&\n !SYSTEM_IMAGES.includes(expectValue)\n ) {\n throw new FastbootError(\n \"FAIL\",\n `Requirement ${variable}=${expectValue} failed, unrecognized partition`\n );\n }\n } else {\n let realValue = await device.getVariable(variable);\n\n if (expectValues.includes(realValue)) {\n common.logDebug(\n `Requirement ${variable}=${expectValue} passed`\n );\n } else {\n let msg = `Requirement ${variable}=${expectValue} failed, value = ${realValue}`;\n common.logDebug(msg);\n throw new FastbootError(\"FAIL\", msg);\n }\n }\n }\n}\n\nasync function tryReboot(\n device: FastbootDevice,\n target: string,\n onReconnect: ReconnectCallback\n) {\n try {\n await device.reboot(target, false);\n } catch (e) {\n /* Failed = device rebooted by itself */\n }\n\n await device.waitForConnect(onReconnect);\n}\n\nexport async function flashZip(\n device: FastbootDevice,\n blob: Blob,\n wipe: boolean,\n onReconnect: ReconnectCallback,\n onProgress: FactoryProgressCallback = (\n _action: string,\n _item: string,\n _progress: number\n ) => {}\n) {\n onProgress(\"load\", \"package\", 0.0);\n let reader = new ZipReader(new BlobReader(blob));\n let entries = await reader.getEntries();\n\n // Bootloader and radio packs can only be flashed in the bare-metal bootloader\n if ((await device.getVariable(\"is-userspace\")) === \"yes\") {\n await device.reboot(\"bootloader\", true, onReconnect);\n }\n\n // 1. Bootloader pack (repeated for slot A and B)\n await tryFlashImages(device, entries, onProgress, [\"bootloader\"]);\n await common.runWithTimedProgress(\n onProgress,\n \"reboot\",\n \"device\",\n BOOTLOADER_REBOOT_TIME,\n tryReboot(device, \"bootloader\", onReconnect)\n );\n\n await tryFlashImages(device, entries, onProgress, [\"bootloader\"]);\n await common.runWithTimedProgress(\n onProgress,\n \"reboot\",\n \"device\",\n BOOTLOADER_REBOOT_TIME,\n tryReboot(device, \"bootloader\", onReconnect)\n );\n\n // 2. Radio pack\n await tryFlashImages(device, entries, onProgress, [\"radio\"]);\n await common.runWithTimedProgress(\n onProgress,\n \"reboot\",\n \"device\",\n BOOTLOADER_REBOOT_TIME,\n tryReboot(device, \"bootloader\", onReconnect)\n );\n\n // Cancel snapshot update if in progress\n let snapshotStatus = await device.getVariable(\"snapshot-update-status\");\n if (snapshotStatus !== null && snapshotStatus !== \"none\") {\n await device.runCommand(\"snapshot-update:cancel\");\n }\n\n // Load nested images for the following steps\n let entry = entries.find((e) => e.filename.match(/image-.+\\.zip$/));\n const imageReader = new ZipReader(new BlobEntryReader(\n blob,\n entry!,\n \"application/zip\",\n {\n onstart(total: number): Promise | undefined {\n common.logDebug(`Loading nested images from zip (${total} bytes)`);\n onProgress(\"unpack\", \"images\", 0.0);\n return;\n },\n onprogress(progress: number, total: number): Promise | undefined {\n onProgress(\"unpack\", \"images\", progress / total);\n return;\n }\n }\n ));\n const imageEntries = await imageReader.getEntries();\n\n // 3. Check requirements\n entry = imageEntries.find((e) => e.filename === \"android-info.txt\");\n if (entry !== undefined) {\n const reqText: string = await common.zipGetData(entry, new TextWriter());\n await checkRequirements(device, reqText);\n }\n\n // 4. Boot-critical images\n await tryFlashImages(\n device,\n imageEntries,\n onProgress,\n BOOT_CRITICAL_IMAGES\n );\n\n // 5. Super partition template\n // This is also where we reboot to fastbootd.\n entry = imageEntries.find((e) => e.filename === \"super_empty.img\");\n if (entry !== undefined) {\n await common.runWithTimedProgress(\n onProgress,\n \"reboot\",\n \"device\",\n FASTBOOTD_REBOOT_TIME,\n device.reboot(\"fastboot\", true, onReconnect)\n );\n\n let superName = await device.getVariable(\"super-partition-name\");\n if (!superName) {\n superName = \"super\";\n }\n\n let superAction = wipe ? \"wipe\" : \"flash\";\n onProgress(superAction, \"super\", 0.0);\n const superBlob: Blob = await common.zipGetData(\n entry,\n new BlobWriter(\"application/octet-stream\")\n );\n await device.upload(\n superName,\n await common.readBlobAsBuffer(superBlob),\n (progress) => {\n onProgress(superAction, \"super\", progress);\n }\n );\n await device.runCommand(\n `update-super:${superName}${wipe ? \":wipe\" : \"\"}`\n );\n }\n\n // 6. Remaining system images\n await tryFlashImages(device, imageEntries, onProgress, SYSTEM_IMAGES);\n\n // We unconditionally reboot back to the bootloader here if we're in fastbootd,\n // even when there's no custom AVB key, because common follow-up actions like\n // locking the bootloader and wiping data need to be done in the bootloader.\n if ((await device.getVariable(\"is-userspace\")) === \"yes\") {\n await common.runWithTimedProgress(\n onProgress,\n \"reboot\",\n \"device\",\n BOOTLOADER_REBOOT_TIME,\n device.reboot(\"bootloader\", true, onReconnect)\n );\n }\n\n // 7. Custom AVB key\n entry = entries.find((e) => e.filename.endsWith(\"avb_pkmd.bin\"));\n if (entry !== undefined) {\n await device.runCommand(\"erase:avb_custom_key\");\n await flashEntryBlob(device, entry, onProgress, \"avb_custom_key\");\n }\n\n // 8. Wipe userdata\n if (wipe) {\n await common.runWithTimedProgress(\n onProgress,\n \"wipe\",\n \"data\",\n USERDATA_ERASE_TIME,\n device.runCommand(\"erase:userdata\")\n );\n }\n}\n","import * as Sparse from \"./sparse\";\nimport * as common from \"./common\";\nimport {\n FactoryProgressCallback,\n flashZip as flashFactoryZip,\n} from \"./factory\";\n\nconst FASTBOOT_USB_CLASS = 0xff;\nconst FASTBOOT_USB_SUBCLASS = 0x42;\nconst FASTBOOT_USB_PROTOCOL = 0x03;\n\nconst BULK_TRANSFER_SIZE = 16384;\n\nconst DEFAULT_DOWNLOAD_SIZE = 512 * 1024 * 1024; // 512 MiB\n// To conserve RAM and work around Chromium's ~2 GiB size limit, we limit the\n// max download size even if the bootloader can accept more data.\nconst MAX_DOWNLOAD_SIZE = 1024 * 1024 * 1024; // 1 GiB\n\nconst GETVAR_TIMEOUT = 10000; // ms\n\n/**\n * Exception class for USB errors not directly thrown by WebUSB.\n */\nexport class UsbError extends Error {\n constructor(message: string) {\n super(message);\n this.name = \"UsbError\";\n }\n}\n\n/**\n * Exception class for errors returned by the bootloader, as well as high-level\n * fastboot errors resulting from bootloader responses.\n */\nexport class FastbootError extends Error {\n status: string;\n bootloaderMessage: string;\n\n constructor(status: string, message: string) {\n super(`Bootloader replied with ${status}: ${message}`);\n this.status = status;\n this.bootloaderMessage = message;\n this.name = \"FastbootError\";\n }\n}\n\ninterface CommandResponse {\n text: string;\n // hex string from DATA\n dataSize?: string;\n}\n\n/**\n * Callback for progress updates while flashing or uploading an image.\n *\n * @callback FlashProgressCallback\n * @param {number} progress - Progress for the current action, between 0 and 1.\n */\nexport type FlashProgressCallback = (progress: number) => void;\n\n/**\n * Callback for reconnecting to the USB device.\n * This is necessary because some platforms do not support automatic reconnection,\n * and USB connection requests can only be triggered as the result of explicit\n * user action.\n *\n * @callback ReconnectCallback\n */\nexport type ReconnectCallback = () => void;\n\n/**\n * This class is a client for executing fastboot commands and operations on a\n * device connected over USB.\n */\nexport class FastbootDevice {\n device: USBDevice | null;\n epIn: number | null;\n epOut: number | null;\n\n private _registeredUsbListeners: boolean;\n private _connectResolve: ((value: any) => void) | null;\n private _connectReject: ((err: unknown) => void) | null;\n private _disconnectResolve: ((value: any) => void) | null;\n\n /**\n * Create a new fastboot device instance. This doesn't actually connect to\n * any USB devices; call {@link connect} to do so.\n */\n constructor() {\n this.device = null;\n this.epIn = null;\n this.epOut = null;\n\n this._registeredUsbListeners = false;\n this._connectResolve = null;\n this._connectReject = null;\n this._disconnectResolve = null;\n }\n\n /**\n * Returns whether a USB device is connected and ready for use.\n */\n get isConnected() {\n return (\n this.device !== null &&\n this.device.opened &&\n this.device.configurations[0].interfaces[0].claimed\n );\n }\n\n /**\n * Validate the current USB device's details and connect to it.\n *\n * @private\n */\n private async _validateAndConnectDevice() {\n if (this.device === null) {\n throw new UsbError(\"Attempted to connect to null device\");\n }\n\n // Validate device\n let ife = this.device!.configurations[0].interfaces[0].alternates[0];\n if (ife.endpoints.length !== 2) {\n throw new UsbError(\"Interface has wrong number of endpoints\");\n }\n\n this.epIn = null;\n this.epOut = null;\n for (let endpoint of ife.endpoints) {\n common.logVerbose(\"Checking endpoint:\", endpoint);\n if (endpoint.type !== \"bulk\") {\n throw new UsbError(\"Interface endpoint is not bulk\");\n }\n\n if (endpoint.direction === \"in\") {\n if (this.epIn === null) {\n this.epIn = endpoint.endpointNumber;\n } else {\n throw new UsbError(\"Interface has multiple IN endpoints\");\n }\n } else if (endpoint.direction === \"out\") {\n if (this.epOut === null) {\n this.epOut = endpoint.endpointNumber;\n } else {\n throw new UsbError(\"Interface has multiple OUT endpoints\");\n }\n }\n }\n common.logVerbose(\"Endpoints: in =\", this.epIn, \", out =\", this.epOut);\n\n try {\n await this.device!.open();\n // Opportunistically reset to fix issues on some platforms\n try {\n await this.device!.reset();\n } catch (error) {\n /* Failed = doesn't support reset */\n }\n\n await this.device!.selectConfiguration(1);\n await this.device!.claimInterface(0); // fastboot\n } catch (error) {\n // Propagate exception from waitForConnect()\n if (this._connectReject !== null) {\n this._connectReject(error);\n this._connectResolve = null;\n this._connectReject = null;\n }\n\n throw error;\n }\n\n // Return from waitForConnect()\n if (this._connectResolve !== null) {\n this._connectResolve(undefined);\n this._connectResolve = null;\n this._connectReject = null;\n }\n }\n\n /**\n * Wait for the current USB device to disconnect, if it's still connected.\n * Returns immediately if no device is connected.\n */\n async waitForDisconnect() {\n if (this.device === null) {\n return;\n }\n\n return await new Promise((resolve, _reject) => {\n this._disconnectResolve = resolve;\n });\n }\n\n /**\n * Wait for the USB device to connect. Returns at the next connection,\n * regardless of whether the connected USB device matches the previous one.\n *\n * @param {ReconnectCallback} onReconnect - Callback to request device reconnection on Android.\n */\n async waitForConnect(onReconnect: ReconnectCallback = () => {}) {\n // On Android, we need to request the user to reconnect the device manually\n // because there is no support for automatic reconnection.\n if (navigator.userAgent.includes(\"Android\")) {\n await this.waitForDisconnect();\n onReconnect();\n }\n\n return await new Promise((resolve, reject) => {\n this._connectResolve = resolve;\n this._connectReject = reject;\n });\n }\n\n /**\n * Request the user to select a USB device and connect to it using the\n * fastboot protocol.\n *\n * @throws {UsbError}\n */\n async connect() {\n let devices = await navigator.usb.getDevices();\n common.logDebug(\"Found paired USB devices:\", devices);\n if (devices.length === 1) {\n this.device = devices[0];\n } else {\n // If multiple paired devices are connected, request the user to\n // select a specific one to reduce ambiguity. This is also necessary\n // if no devices are already paired, i.e. first use.\n common.logDebug(\n \"No or multiple paired devices are connected, requesting one\"\n );\n this.device = await navigator.usb.requestDevice({\n filters: [\n {\n classCode: FASTBOOT_USB_CLASS,\n subclassCode: FASTBOOT_USB_SUBCLASS,\n protocolCode: FASTBOOT_USB_PROTOCOL,\n },\n ],\n });\n }\n common.logDebug(\"Using USB device:\", this.device);\n\n if (!this._registeredUsbListeners) {\n navigator.usb.addEventListener(\"disconnect\", (event) => {\n if (event.device === this.device) {\n common.logDebug(\"USB device disconnected\");\n if (this._disconnectResolve !== null) {\n this._disconnectResolve(undefined);\n this._disconnectResolve = null;\n }\n }\n });\n\n navigator.usb.addEventListener(\"connect\", async (event) => {\n common.logDebug(\"USB device connected\");\n this.device = event.device;\n\n // Check whether waitForConnect() is pending and save it for later\n let hasPromiseReject = this._connectReject !== null;\n try {\n await this._validateAndConnectDevice();\n } catch (error) {\n // Only rethrow errors from the event handler if waitForConnect()\n // didn't already handle them\n if (!hasPromiseReject) {\n throw error;\n }\n }\n });\n\n this._registeredUsbListeners = true;\n }\n\n await this._validateAndConnectDevice();\n }\n\n /**\n * Read a raw command response from the bootloader.\n *\n * @private\n * @returns {Promise} Object containing response text and data size, if any.\n * @throws {FastbootError}\n */\n private async _readResponse(): Promise {\n let respData = {\n text: \"\",\n } as CommandResponse;\n let respStatus;\n\n do {\n let respPacket = await this.device!.transferIn(this.epIn!, 64);\n let response = new TextDecoder().decode(respPacket.data);\n\n respStatus = response.substring(0, 4);\n let respMessage = response.substring(4);\n common.logDebug(`Response: ${respStatus} ${respMessage}`);\n\n if (respStatus === \"OKAY\") {\n // OKAY = end of response for this command\n respData.text += respMessage;\n } else if (respStatus === \"INFO\") {\n // INFO = additional info line\n respData.text += respMessage + \"\\n\";\n } else if (respStatus === \"DATA\") {\n // DATA = hex string, but it's returned separately for safety\n respData.dataSize = respMessage;\n } else {\n // Assume FAIL or garbage data\n throw new FastbootError(respStatus, respMessage);\n }\n // INFO = more packets are coming\n } while (respStatus === \"INFO\");\n\n return respData;\n }\n\n /**\n * Send a textual command to the bootloader and read the response.\n * This is in raw fastboot format, not AOSP fastboot syntax.\n *\n * @param {string} command - The command to send.\n * @returns {Promise} Object containing response text and data size, if any.\n * @throws {FastbootError}\n */\n async runCommand(command: string): Promise {\n // Command and response length is always 64 bytes regardless of protocol\n if (command.length > 64) {\n throw new RangeError();\n }\n\n // Send raw UTF-8 command\n let cmdPacket = new TextEncoder().encode(command);\n await this.device!.transferOut(this.epOut!, cmdPacket);\n common.logDebug(\"Command:\", command);\n\n return this._readResponse();\n }\n\n /**\n * Read the value of a bootloader variable. Returns undefined if the variable\n * does not exist.\n *\n * @param {string} varName - The name of the variable to get.\n * @returns {Promise} Textual content of the variable.\n * @throws {FastbootError}\n */\n async getVariable(varName: string): Promise {\n let resp;\n try {\n resp = (\n await common.runWithTimeout(\n this.runCommand(`getvar:${varName}`),\n GETVAR_TIMEOUT\n )\n ).text;\n } catch (error) {\n // Some bootloaders return FAIL instead of empty responses, despite\n // what the spec says. Normalize it here.\n if (error instanceof FastbootError && error.status == \"FAIL\") {\n resp = null;\n } else {\n throw error;\n }\n }\n\n // Some bootloaders send whitespace around some variables.\n // According to the spec, non-existent variables should return empty\n // responses\n return resp ? resp.trim() : null;\n }\n\n /**\n * Get the maximum download size for a single payload, in bytes.\n *\n * @private\n * @returns {Promise}\n * @throws {FastbootError}\n */\n private async _getDownloadSize(): Promise {\n try {\n let resp = (await this.getVariable(\n \"max-download-size\"\n ))!.toLowerCase();\n if (resp) {\n // AOSP fastboot requires hex\n return Math.min(parseInt(resp, 16), MAX_DOWNLOAD_SIZE);\n }\n } catch (error) {\n /* Failed = no value, fallthrough */\n }\n\n // FAIL or empty variable means no max, set a reasonable limit to conserve memory\n return DEFAULT_DOWNLOAD_SIZE;\n }\n\n /**\n * Send a raw data payload to the bootloader.\n *\n * @private\n */\n private async _sendRawPayload(\n buffer: ArrayBuffer,\n onProgress: FlashProgressCallback\n ) {\n let i = 0;\n let remainingBytes = buffer.byteLength;\n while (remainingBytes > 0) {\n let chunk = buffer.slice(\n i * BULK_TRANSFER_SIZE,\n (i + 1) * BULK_TRANSFER_SIZE\n );\n if (i % 1000 === 0) {\n common.logVerbose(\n ` Sending ${chunk.byteLength} bytes to endpoint, ${remainingBytes} remaining, i=${i}`\n );\n }\n if (i % 10 === 0) {\n onProgress(\n (buffer.byteLength - remainingBytes) / buffer.byteLength\n );\n }\n\n await this.device!.transferOut(this.epOut!, chunk);\n\n remainingBytes -= chunk.byteLength;\n i += 1;\n }\n\n onProgress(1.0);\n }\n\n /**\n * Upload a payload to the bootloader for later use, e.g. flashing.\n * Does not handle raw images, flashing, or splitting.\n *\n * @param {string} partition - Name of the partition the payload is intended for.\n * @param {ArrayBuffer} buffer - Buffer containing the data to upload.\n * @param {FlashProgressCallback} onProgress - Callback for upload progress updates.\n * @throws {FastbootError}\n */\n async upload(\n partition: string,\n buffer: ArrayBuffer,\n onProgress: FlashProgressCallback = (_progress) => {}\n ) {\n common.logDebug(\n `Uploading single sparse to ${partition}: ${buffer.byteLength} bytes`\n );\n\n // Bootloader requires an 8-digit hex number\n let xferHex = buffer.byteLength.toString(16).padStart(8, \"0\");\n if (xferHex.length !== 8) {\n throw new FastbootError(\n \"FAIL\",\n `Transfer size overflow: ${xferHex} is more than 8 digits`\n );\n }\n\n // Check with the device and make sure size matches\n let downloadResp = await this.runCommand(`download:${xferHex}`);\n if (downloadResp.dataSize === undefined) {\n throw new FastbootError(\n \"FAIL\",\n `Unexpected response to download command: ${downloadResp.text}`\n );\n }\n let downloadSize = parseInt(downloadResp.dataSize!, 16);\n if (downloadSize !== buffer.byteLength) {\n throw new FastbootError(\n \"FAIL\",\n `Bootloader wants ${buffer.byteLength} bytes, requested to send ${buffer.byteLength} bytes`\n );\n }\n\n common.logDebug(`Sending payload: ${buffer.byteLength} bytes`);\n await this._sendRawPayload(buffer, onProgress);\n\n common.logDebug(\"Payload sent, waiting for response...\");\n await this._readResponse();\n }\n\n /**\n * Reboot to the given target, and optionally wait for the device to\n * reconnect.\n *\n * @param {string} target - Where to reboot to, i.e. fastboot or bootloader.\n * @param {boolean} wait - Whether to wait for the device to reconnect.\n * @param {ReconnectCallback} onReconnect - Callback to request device reconnection, if wait is enabled.\n */\n async reboot(\n target: string = \"\",\n wait: boolean = false,\n onReconnect: ReconnectCallback = () => {}\n ) {\n if (target.length > 0) {\n await this.runCommand(`reboot-${target}`);\n } else {\n await this.runCommand(\"reboot\");\n }\n\n if (wait) {\n await this.waitForConnect(onReconnect);\n }\n }\n\n /**\n * Flash the given Blob to the given partition on the device. Any image\n * format supported by the bootloader is allowed, e.g. sparse or raw images.\n * Large raw images will be converted to sparse images automatically, and\n * large sparse images will be split and flashed in multiple passes\n * depending on the bootloader's payload size limit.\n *\n * @param {string} partition - The name of the partition to flash.\n * @param {Blob} blob - The Blob to retrieve data from.\n * @param {FlashProgressCallback} onProgress - Callback for flashing progress updates.\n * @throws {FastbootError}\n */\n async flashBlob(\n partition: string,\n blob: Blob,\n onProgress: FlashProgressCallback = (_progress) => {}\n ) {\n // Use current slot if partition is A/B\n if ((await this.getVariable(`has-slot:${partition}`)) === \"yes\") {\n partition += \"_\" + (await this.getVariable(\"current-slot\"));\n }\n\n let maxDlSize = await this._getDownloadSize();\n let fileHeader = await common.readBlobAsBuffer(\n blob.slice(0, Sparse.FILE_HEADER_SIZE)\n );\n\n let totalBytes = blob.size;\n let isSparse = false;\n try {\n let sparseHeader = Sparse.parseFileHeader(fileHeader);\n if (sparseHeader !== null) {\n totalBytes = sparseHeader.blocks * sparseHeader.blockSize;\n isSparse = true;\n }\n } catch (error) {\n // ImageError = invalid, so keep blob.size\n }\n\n // Logical partitions need to be resized before flashing because they're\n // sized perfectly to the payload.\n if ((await this.getVariable(`is-logical:${partition}`)) === \"yes\") {\n // As per AOSP fastboot, we reset the partition to 0 bytes first\n // to optimize extent allocation.\n await this.runCommand(`resize-logical-partition:${partition}:0`);\n // Set the actual size\n await this.runCommand(\n `resize-logical-partition:${partition}:${totalBytes}`\n );\n }\n\n // Convert image to sparse (for splitting) if it exceeds the size limit\n if (blob.size > maxDlSize && !isSparse) {\n common.logDebug(`${partition} image is raw, converting to sparse`);\n blob = await Sparse.fromRaw(blob);\n }\n\n common.logDebug(\n `Flashing ${blob.size} bytes to ${partition}, ${maxDlSize} bytes per split`\n );\n let splits = 0;\n let sentBytes = 0;\n for await (let split of Sparse.splitBlob(blob, maxDlSize)) {\n await this.upload(partition, split.data, (progress) => {\n onProgress((sentBytes + progress * split.bytes) / totalBytes);\n });\n\n common.logDebug(\"Flashing payload...\");\n await this.runCommand(`flash:${partition}`);\n\n splits += 1;\n sentBytes += split.bytes;\n }\n\n common.logDebug(`Flashed ${partition} with ${splits} split(s)`);\n }\n\n /**\n * Boot the given Blob on the device.\n * Equivalent to `fastboot boot boot.img`.\n *\n * @param {Blob} blob - The Blob to retrieve data from.\n * @param {FlashProgressCallback} onProgress - Callback for flashing progress updates.\n * @throws {FastbootError}\n */\n async bootBlob(\n blob: Blob,\n onProgress: FlashProgressCallback = (_progress) => {}\n ) {\n\n common.logDebug(`Booting ${blob.size} bytes image`);\n\n let data = await common.readBlobAsBuffer(blob);\n await this.upload(\"boot.img\", data, onProgress);\n\n common.logDebug(\"Booting payload...\");\n await this.runCommand(\"boot\");\n\n common.logDebug(`Booted ${blob.size} bytes image`);\n }\n\n /**\n * Flash the given factory images zip onto the device, with automatic handling\n * of firmware, system, and logical partitions as AOSP fastboot and\n * flash-all.sh would do.\n * Equivalent to `fastboot update name.zip`.\n *\n * @param {Blob} blob - Blob containing the zip file to flash.\n * @param {boolean} wipe - Whether to wipe super and userdata. Equivalent to `fastboot -w`.\n * @param {ReconnectCallback} onReconnect - Callback to request device reconnection.\n * @param {FactoryProgressCallback} onProgress - Progress callback for image flashing.\n */\n async flashFactoryZip(\n blob: Blob,\n wipe: boolean,\n onReconnect: ReconnectCallback,\n onProgress: FactoryProgressCallback = (_progress) => {}\n ) {\n return await flashFactoryZip(this, blob, wipe, onReconnect, onProgress);\n }\n}\n"],"names":["DebugLevel","debugLevel","Silent","logDebug","data","console","log","logVerbose","readBlobAsBuffer","blob","Promise","resolve","reject","reader","FileReader","onload","result","onerror","error","readAsArrayBuffer","async","runWithTimedProgress","onProgress","action","item","duration","workPromise","startTime","Date","getTime","stop","progressPromise","now","targetTime","_reject","window","requestAnimationFrame","race","TimeoutError","Error","constructor","timeout","super","this","name","zipGetData","entry","writer","options","getData","e","ProgressEvent","type","target","FILE_MAGIC","MAJOR_VERSION","MINOR_VERSION","FILE_HEADER_SIZE","CHUNK_HEADER_SIZE","ImageError","message","ChunkType","BlobBuilder","Blob","append","getBlob","parseFileHeader","buffer","view","DataView","getUint32","major","getUint16","minor","fileHdrSize","chunkHdrSize","blockSize","blocks","chunks","crc32","parseChunkHeader","dataBytes","calcChunksBlockSize","map","chunk","reduce","total","c","createImage","header","blobBuilder","ArrayBuffer","dataView","arrayView","Uint8Array","setUint32","setUint16","length","size","chunkArrayView","common.readBlobAsBuffer","set","MAX_BITS","LITERALS","HEAP_SIZE","END_BLOCK","Z_DEFAULT_COMPRESSION","Z_NO_FLUSH","Z_FINISH","Z_OK","Z_STREAM_END","Z_STREAM_ERROR","Z_BUF_ERROR","extractArray","array","flatArray","value","Array","fill","a","b","concat","isArray","_dist_code","Tree","that","bi_reverse","code","len","res","build_tree","s","tree","dyn_tree","stree","stat_desc","static_tree","elems","n","m","node","max_code","heap_len","heap_max","heap","depth","opt_len","static_len","Math","floor","pqdownheap","max","extra","extra_bits","base","extra_base","max_length","h","bits","xbits","f","overflow","bl_count","gen_bitlen","next_code","gen_codes","StaticTree","_length_code","base_length","base_dist","d_code","dist","extra_lbits","extra_dbits","extra_blbits","bl_order","static_ltree2_second_part","static_ltree","index","static_dtree_second_part","static_dtree","static_l_desc","static_d_desc","static_bl_desc","Config","good_length","max_lazy","nice_length","max_chain","func","config_table","z_errmsg","BUSY_STATE","FINISH_STATE","MAX_MATCH","MIN_LOOKAHEAD","smaller","tn2","tm2","Deflate","strm","status","pending_buf_size","last_flush","w_size","w_bits","w_mask","win","window_size","prev","head","ins_h","hash_size","hash_bits","hash_mask","hash_shift","block_start","match_length","prev_match","match_available","strstart","match_start","lookahead","prev_length","max_chain_length","max_lazy_match","level","strategy","good_match","nice_match","dyn_ltree","dyn_dtree","bl_tree","l_desc","d_desc","bl_desc","lit_bufsize","last_lit","matches","last_eob_len","bi_buf","bi_valid","init_block","i","scan_tree","curlen","prevlen","nextlen","count","max_count","min_count","REP_3_6","REPZ_3_10","REPZ_11_138","put_byte","p","pending_buf","pending","put_short","w","send_bits","val","send_code","c2","send_tree","bi_flush","_tr_tally","lc","out_length","in_length","dcode","dist_buf","lc_buf","compress_block","ltree","dtree","lx","bi_windup","_tr_stored_block","buf","stored_len","eof","subarray","copy_block","_tr_flush_block","opt_lenb","static_lenb","max_blindex","BL_CODES","build_bl_tree","lcodes","dcodes","blcodes","rank","send_all_trees","flush_block_only","flush_pending","fill_window","more","avail_in","read_buf","longest_match","cur_match","match","chain_length","scan","best_len","limit","_nice_match","wmask","strend","scan_end1","scan_end","deflateReset","total_in","total_out","msg","pending_out","MIN_MATCH","lm_init","k","v","j","deflateInit","_level","_method","memLevel","_strategy","dstate","Uint16Array","deflateEnd","deflateParams","err","deflate","deflateSetDictionary","_strm","dictionary","dictLength","flush","level_flags","old_flush","bstate","next_out","next_in","avail_out","Z_NEED_DICT","max_start","max_block_size","deflate_stored","bflush","hash_head","deflate_fast","max_insert","deflate_slow","STATIC_TREES","ZStream","next_in_index","next_out_index","prototype","ret","start","Z_DATA_ERROR","Z_MEM_ERROR","inflate_mask","MANY","fixed_tl","fixed_td","cplens","cplext","cpdist","cpdext","BMAX","InfTree","hn","r","u","x","huft_build","bindex","d","t","hp","g","l","mask","q","xp","y","z","initWorkArea","vsize","Int32Array","inflate_trees_bits","bb","tb","inflate_trees_dynamic","nl","nd","bl","bd","tl","td","inflate_trees_fixed","START","LEN","LENEXT","DIST","DISTEXT","COPY","LIT","WASH","END","BADCODE","InfCodes","mode","tree_index","need","lit","get","lbits","dbits","ltree_index","dtree_index","inflate_fast","tl_index","td_index","tp","tp_index","ml","md","tp_index_t_3","bitb","bitk","write","read","end","read_byte","init","proc","tindex","inflate_flush","free","border","TYPE","LENS","STORED","TABLE","BTREE","DTREE","CODES","DRY","DONELOCKS","BADBLOCKS","InfBlocks","blens","left","table","codes","last","hufts","inftree","reset","bl_","bd_","tl_","td_","set_dictionary","sync_point","BAD","mark","Inflate","inflateReset","istate","method","was","marker","wbits","inflateEnd","inflateInit","inflate","inflateSetDictionary","inflateSync","inflateSyncPoint","MAX_32_BITS","MAX_16_BITS","CENTRAL_FILE_HEADER_SIGNATURE","ZIP64_END_OF_CENTRAL_DIR_SIGNATURE","EXTRAFIELD_TYPE_NTFS_TAG1","UNDEFINED_VALUE","undefined","UNDEFINED_TYPE","FUNCTION_TYPE","StreamAdapter","Codec","TransformStream","_format","codec","transform","controller","enqueue","maxWorkers","navigator","hardwareConcurrency","_error","DEFAULT_CONFIGURATION","chunkSize","terminateWorkerTimeout","useWebWorkers","useCompressionStream","workerScripts","CompressionStreamNative","CompressionStream","DecompressionStreamNative","DecompressionStream","config","Object","assign","configure","configuration","baseURL","setIfDefined","propertyName","propertyValue","application","annodex","bbolin","cap","dsptype","ecmascript","futuresplash","hta","javascript","m3g","mathematica","msaccess","msword","mxf","oda","ogg","pdf","postscript","rar","rtf","smil","xml","zip","applixware","exi","gxf","hyperstudio","ipfix","json","marc","mbox","mp21","mp4","onenote","oxps","pkcs10","pkcs8","pkixcmp","sdp","srgs","widget","winhlp","yang","envoy","fractals","olescript","audio","amr","basic","flac","midi","mpeg","mpegurl","adpcm","s3m","silk","webm","xm","mid","chemical","image","gif","ief","jpeg","pcx","png","tiff","bmp","cgm","g3fax","ktx","sgi","webp","pipeg","rfc822","model","iges","mesh","vrml","text","calendar","css","csv","h323","html","iuls","mathml","plain","richtext","scriptlet","texmacs","n3","sgml","troff","turtle","vcard","webviewhtml","video","avif","dl","dv","fli","gl","quicktime","h261","h263","h264","jpm","mj2","mimeTypes","hasOwnProperty","subtype","indexMimeType","Crc32","crc","offset","Crc32Stream","bitArray","a1","a2","shift","getPartial","_shiftRight","slice","bitLength","clamp","ceil","partial","_end","round","carry","out","push","last2","shift2","pop","bytes","fromBits","arr","byteLength","tmp","toBits","hash","sha1","_init","_key","_h","_buffer","_length","update","utf8String","ol","Uint32Array","_block","splice","finalize","_f","_S","words","cipher","key","aes","_tables","_precompute","sbox","decTable","keyLen","encKey","decKey","rcon","encrypt","_crypt","decrypt","encTable","sboxInv","th","xInv","x2","x4","x8","tDec","tEnc","input","dir","nInnerRounds","t0","t1","t2","t3","b2","kIndex","random","getRandomValues","typedArray","m_w","m_z","rcache","_r","prf","iv","_prf","_initIv","_iv","calculate","incWord","word","b1","b3","incCounter","counter","misc","importKey","password","hmacSha1","pbkdf2","salt","ui","arrayBuffer","outLength","setInt32","hmac","Hash","_hash","exKey","_baseHash","bs","_resultHash","_updated","digest","GET_RANDOM_VALUES_SUPPORTED","crypto","ERR_INVALID_PASSWORD","ERR_INVALID_SIGNATURE","ERR_ABORT_CHECK_PASSWORD","BLOCK_LENGTH","RAW_FORMAT","PBKDF2_ALGORITHM","BASE_KEY_ALGORITHM","DERIVED_BITS_ALGORITHM","iterations","DERIVED_BITS_USAGE","SALT_LENGTH","KEY_LENGTH","SIGNATURE_LENGTH","COUNTER_DEFAULT_VALUE","CRYPTO_API_SUPPORTED","subtle","SUBTLE_API_SUPPORTED","codecBytes","Aes","CtrGladman","ctrGladman","HmacSha1","IMPORT_KEY_SUPPORTED","DERIVE_BITS_SUPPORTED","deriveBits","AESDecryptionStream","signed","encryptionStrength","checkPasswordOnly","ready","resolveReady","strength","aesCrypto","preamble","passwordVerificationKey","createKeys","passwordVerification","createDecryptionKeys","output","ctr","chunkToDecrypt","originalSignature","decryptedChunkArray","encryptedChunk","decryptedChunk","signature","indexSignature","AESEncryptionStream","stream","createEncryptionKeys","encryptedChunkArray","paddingStart","paddingEnd","verifySignature","inputLength","inputArray","expand","inputChunk","outputChunk","encodedPassword","TextEncoder","unescape","encodeURIComponent","charCodeAt","encode","encodeText","baseKey","format","algorithm","extractable","keyUsages","derivedBits","compositeKey","authentication","keys","from","leftArray","rightArray","begin","HEADER_LENGTH","ZipCryptoDecryptionStream","zipCrypto","decryptedHeader","ZipCryptoEncryptionStream","getByte","updateKeys","crcKey0","crcKey2","byte","key0","key1","key2","getInt32","imul","getInt8","temp","number","COMPRESSION_FORMAT","DeflateStream","compressed","encrypted","crc32Stream","encryptionStream","readable","filterEmptyChunks","tee","pipeThrough","pipeThroughCommpressionStream","setReadable","getReader","InflateStream","decryptionStream","streamSignature","dataViewSignature","defineProperty","CodecStreamNative","CodecStream","transformStream","MESSAGE_EVENT_TYPE","MESSAGE_START","MESSAGE_PULL","MESSAGE_DATA","MESSAGE_ACK_DATA","MESSAGE_CLOSE","CODEC_INFLATE","codecType","Stream","startsWith","WEB_WORKERS_SUPPORTED","Worker","CodecWorker","workerData","writable","streamOptions","transferStreams","scripts","onTaskFinished","signal","busy","ProgressWatcherStream","terminate","worker","interface","createWebWorkerInterface","createWorkerInterface","readableSource","onstart","onprogress","onend","chunkOffset","callHandler","highWaterMark","handler","parameters","run","codecStream","pipeTo","preventClose","preventAbort","runWorker","getWebWorker","resolveResult","rejectResult","closed","writableSource","getWriter","resolveStreamClosed","WritableStream","close","releaseLock","abort","reason","watchClosedStream","streamsTransferred","sendMessage","resultValue","runWebWorker","classicWorkersSupported","transferStreamsSupported","url","workerOptions","scriptUrl","URL","addEventListener","event","messageId","stack","responseError","done","onMessage","transferables","postMessage","pool","pendingRequests","indexWorker","clearTerminateTimeout","terminateTimeout","clearTimeout","DEFAULT_CHUNK_SIZE","PROPERTY_NAME_WRITABLE","initialized","Reader","ReadableStream","diskNumberStart","readUint8Array","min","BlobReader","offsetEnd","BlobWriter","contentType","headers","Response","TextWriter","encoding","utf8","toLowerCase","readAsText","SplitDataReader","readers","lastDiskNumber","all","diskReader","diskNumber","currentDiskNumber","currentReaderOffset","currentReader","currentReaderSize","chunkLength","SplitDataWriter","writerGenerator","maxSize","zipWriter","diskSourceWriter","diskWritable","diskWriter","diskOffset","availableSize","writeChunk","closeDisk","next","initStream","initSize","initReader","CP437","split","VALID_CP437","decodeText","trim","stringValue","indexCharacter","TextDecoder","decode","decodeCP437","PROPERTY_NAME_FILENAME","PROPERTY_NAME_RAW_FILENAME","PROPERTY_NAME_COMMENT","PROPERTY_NAME_RAW_COMMENT","PROPERTY_NAME_UNCOMPPRESSED_SIZE","PROPERTY_NAME_COMPPRESSED_SIZE","PROPERTY_NAME_OFFSET","PROPERTY_NAME_DISK_NUMBER_START","PROPERTY_NAME_LAST_MODIFICATION_DATE","PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE","PROPERTY_NAME_LAST_ACCESS_DATE","PROPERTY_NAME_RAW_LAST_ACCESS_DATE","PROPERTY_NAME_CREATION_DATE","PROPERTY_NAME_RAW_CREATION_DATE","PROPERTY_NAMES","Entry","forEach","ERR_BAD_FORMAT","ERR_EXTRAFIELD_ZIP64_NOT_FOUND","ERR_UNSUPPORTED_COMPRESSION","ERR_SPLIT_ZIP_FILE","CHARSET_UTF8","CHARSET_CP437","ZIP64_PROPERTIES","ZIP64_EXTRACTION","getValue","getBigUint64","ZipReader","zipReader","getChunkSize","endOfDirectoryInfo","startOffset","minimumBytes","maximumLength","signatureArray","getDataView","maximumBytes","seek","indexByte","seekSignature","endOfDirectoryView","directoryDataLength","directoryDataOffset","commentOffset","commentLength","appendedDataOffset","expectedLastDiskNumber","filesLength","prependedDataLength","endOfDirectoryLocatorView","endOfDirectoryArray","expectedDirectoryDataOffset","originalDirectoryDataOffset","directoryArray","directoryView","filenameEncoding","getOptionValue","commentEncoding","indexFile","fileEntry","ZipEntry","readCommonHeader","languageEncodingFlag","Boolean","bitFlag","filenameOffset","extraFieldOffset","filenameLength","extraFieldLength","versionMadeBy","msDosCompatible","rawFilename","endOffset","rawComment","filenameUTF8","commentUTF8","directory","getUint8","offsetFileEntry","compressedSize","uncompressedSize","internalFileAttribute","externalFileAttribute","rawExtraField","filename","comment","endsWith","readCommonFooter","extractPrependedData","extractAppendedData","prependedData","appendedData","entries","getEntriesGenerator","zipEntry","extraFieldAES","compressionMethod","rawLastModDate","localDirectory","originalCompressionMethod","lastAccessDate","creationDate","dataOffset","Infinity","initWriter","dataDescriptor","outputSize","streamCopy","find","Number","isFinite","setTimeout","filter","locked","rawBitFlag","version","lastModDate","getDate","extraField","Map","rawExtraFieldView","offsetExtraField","extraFieldZip64","zip64","extraFieldView","missingProperties","indexMissingProperty","extraction","readExtraFieldZip64","extraFieldUnicodePath","readExtraFieldUnicode","extraFieldUnicodeComment","vendorVersion","vendorId","readExtraFieldAES","extraFieldNTFS","tag1Data","tagValue","attributeSize","tag1View","rawLastAccessDate","rawCreationDate","getDateNTFS","extraFieldData","readExtraFieldNTFS","extraFieldExtendedTimestamp","flags","timeProperties","timeRawProperties","indexProperty","time","rawPropertyName","readExtraFieldExtendedTimestamp","extraFieldUnicode","valid","timeRaw","date","BigInt","document","require","pathToFileURL","__filename","href","currentScript","src","baseURI","parseIndex","createObjectURL","configureWebWorker","bufsize","lastIndex","bufferIndex","bufferSize","buffers","nomoreinput","BlobEntryReaderImpl","entryMetadata","headerSize","BlobEntryReader","mimeString","headerBeginRaw","getEntryMetadata","entryBlob","BOOT_CRITICAL_IMAGES","SYSTEM_IMAGES","BOOTLOADER_REBOOT_TIME","flashEntryBlob","device","partition","common.zipGetData","common.logDebug","progress","flashBlob","tryFlashImages","imageNames","imageName","pattern","RegExp","current_slot","getVariable","runCommand","FastbootError","tryReboot","onReconnect","reboot","waitForConnect","flashZip","wipe","_action","_item","_progress","getEntries","common.runWithTimedProgress","snapshotStatus","imageReader","imageEntries","reqText","androidInfo","line","replace","variable","expectValue","expectValues","hasSlot","includes","realValue","checkRequirements","superName","superAction","superBlob","upload","UsbError","bootloaderMessage","epIn","epOut","_registeredUsbListeners","_connectResolve","_connectReject","_disconnectResolve","isConnected","opened","configurations","interfaces","claimed","ife","alternates","endpoints","endpoint","common.logVerbose","direction","endpointNumber","open","selectConfiguration","claimInterface","userAgent","waitForDisconnect","devices","usb","getDevices","requestDevice","filters","classCode","subclassCode","protocolCode","hasPromiseReject","_validateAndConnectDevice","respStatus","respData","respPacket","transferIn","response","substring","respMessage","dataSize","command","RangeError","cmdPacket","transferOut","_readResponse","varName","resp","promise","timedOut","tid","then","catch","finally","parseInt","remainingBytes","xferHex","toString","padStart","downloadResp","_sendRawPayload","wait","maxDlSize","_getDownloadSize","fileHeader","Sparse.FILE_HEADER_SIZE","totalBytes","isSparse","sparseHeader","Sparse.parseFileHeader","Raw","Sparse.fromRaw","splits","sentBytes","splitSize","splitChunks","splitDataBytes","bytesRemaining","calcChunksDataSize","splitBlocks","Skip","splitImage","Sparse.splitBlob","flashFactoryZip","load","unpack","flash"],"mappings":"aAKA,IAAYA,GAAZ,SAAYA,GACRA,EAAAA,EAAA,OAAA,GAAA,SACAA,EAAAA,EAAA,MAAA,GAAA,QACAA,EAAAA,EAAA,QAAA,GAAA,SACH,CAJD,CAAYA,IAAAA,EAIX,CAAA,IAUD,IAAIC,EAAaD,EAAWE,OAEZ,SAAAC,KAAYC,GACpBH,GAAc,GACdI,QAAQC,OAAOF,EAEvB,CAEgB,SAAAG,KAAcH,GACtBH,GAAc,GACdI,QAAQC,OAAOF,EAEvB,CAqBM,SAAUI,EAAiBC,GAC7B,OAAO,IAAIC,SAAQ,CAACC,EAASC,KACzB,IAAIC,EAAS,IAAIC,WACjBD,EAAOE,OAAS,KACZJ,EAAQE,EAAOG,OAAuB,EAE1CH,EAAOI,QAAU,KACbL,EAAOC,EAAOK,MAAM,EAGxBL,EAAOM,kBAAkBV,EAAK,GAEtC,CAQOW,eAAeC,EAClBC,EACAC,EACAC,EACAC,EACAC,GAEA,IAAIC,GAAY,IAAIC,MAAOC,UACvBC,GAAO,EAEXR,EAAWC,EAAQC,EAAM,GACzB,IAAIO,EAAkB,WAClB,IAAIC,EACAC,EAAaN,EAAYF,EAE7B,GACIO,GAAM,IAAIJ,MAAOC,UACjBP,EAAWC,EAAQC,GAAOQ,EAAML,GAAaF,SAtB9C,IAAIf,SAAQ,CAACC,EAASuB,KACzBC,OAAOC,sBAAsBzB,EAAQ,WAuB3BmB,GAAQE,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E/BqH,GAAU,EACVC,GAAa3T,EAAMnV,MAGvB0hB,EAAgB,WAAWF,UAAkBqH,aAChD,CAUD5wC,eACIX,EACAa,EAAoC,CAAC2qC,IAAD,IAGpCpB,EAAgB,WAAWpqC,EAAKyF,oBAEhC,IAAI9F,QAAagG,EAAwB3F,SACnCkC,KAAK0qC,OAAO,WAAYjtC,EAAMkB,GAEpCupC,EAAgB,4BACVloC,KAAK4oC,WAAW,QAEtBV,EAAgB,UAAUpqC,EAAKyF,mBAClC,CAaD9E,sBACIX,EACAqrC,EACAJ,EACApqC,EAAsC,CAAC2qC,IAAD,IAEtC,aAAa0G,GAAgBhwC,KAAMlC,EAAMqrC,EAAMJ,EAAapqC,EAC/D,2ED1jB0B,CAC3BsxC,KAAM,UACNC,OAAQ,YACRC,MAAO,UACPhH,KAAM,SACNH,OAAQ,gF5BpBN,SAAwBz9B,GAC1BjO,EAAaiO,CACjB","x_google_ignoreList":[2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,26,27]} \ No newline at end of file diff --git a/dist/fastboot.min.mjs b/dist/fastboot.min.mjs deleted file mode 100644 index 1f93091..0000000 --- a/dist/fastboot.min.mjs +++ /dev/null @@ -1,2 +0,0 @@ -var e;!function(e){e[e.Silent=0]="Silent",e[e.Debug=1]="Debug",e[e.Verbose=2]="Verbose"}(e||(e={}));let t=e.Silent;function n(...e){t>=1&&console.log(...e)}function i(...e){t>=2&&console.log(...e)}function r(e){t=e}function s(e){return new Promise(((t,n)=>{let i=new FileReader;i.onload=()=>{t(i.result)},i.onerror=()=>{n(i.error)},i.readAsArrayBuffer(e)}))}async function a(e,t,n,i,r){let s=(new Date).getTime(),a=!1;e(t,n,0);let o=(async()=>{let r,o=s+i;do{r=(new Date).getTime(),e(t,n,(r-s)/i),await new Promise(((e,t)=>{window.requestAnimationFrame(e)}))}while(!a&&re.blocks)).reduce(((e,t)=>e+t),0)}async function v(e,t){let n=new w,i=new ArrayBuffer(u),r=new DataView(i),a=new Uint8Array(i);r.setUint32(0,l,!0),r.setUint16(4,d,!0),r.setUint16(6,f,!0),r.setUint16(8,u,!0),r.setUint16(10,m,!0),r.setUint32(12,e.blockSize,!0),r.setUint32(16,e.blocks,!0),r.setUint32(20,t.length,!0),r.setUint32(24,0,!0),n.append(new Blob([i]));for(let e of t){i=new ArrayBuffer(m+e.data.size),r=new DataView(i),a=new Uint8Array(i),r.setUint16(0,e.type,!0),r.setUint16(2,0,!0),r.setUint32(4,e.blocks,!0),r.setUint32(8,m+e.data.size,!0);let t=new Uint8Array(await s(e.data));a.set(t,m),n.append(new Blob([i]))}return n.getBlob()}const y=15,_=256,k=573,z=256,S=-1,C=0,A=4,U=0,W=1,j=-2,q=-5;function F(e){return D(e.map((([e,t])=>new Array(e).fill(t,0,e))))}function D(e){return e.reduce(((e,t)=>e.concat(Array.isArray(t)?D(t):t)),[])}const E=[0,1,2,3].concat(...F([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function L(){const e=this;function t(e,t){let n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1}e.build_tree=function(n){const i=e.dyn_tree,r=e.stat_desc.static_tree,s=e.stat_desc.elems;let a,o,c,l=-1;for(n.heap_len=0,n.heap_max=k,a=0;a=1;a--)n.pqdownheap(i,a);c=s;do{a=n.heap[1],n.heap[1]=n.heap[n.heap_len--],n.pqdownheap(i,1),o=n.heap[1],n.heap[--n.heap_max]=a,n.heap[--n.heap_max]=o,i[2*c]=i[2*a]+i[2*o],n.depth[c]=Math.max(n.depth[a],n.depth[o])+1,i[2*a+1]=i[2*o+1]=c,n.heap[1]=c++,n.pqdownheap(i,1)}while(n.heap_len>=2);n.heap[--n.heap_max]=n.heap[1],function(t){const n=e.dyn_tree,i=e.stat_desc.static_tree,r=e.stat_desc.extra_bits,s=e.stat_desc.extra_base,a=e.stat_desc.max_length;let o,c,l,d,f,u,m=0;for(d=0;d<=y;d++)t.bl_count[d]=0;for(n[2*t.heap[t.heap_max]+1]=0,o=t.heap_max+1;oa&&(d=a,m++),n[2*c+1]=d,c>e.max_code||(t.bl_count[d]++,f=0,c>=s&&(f=r[c-s]),u=n[2*c],t.opt_len+=u*(d+f),i&&(t.static_len+=u*(i[2*c+1]+f)));if(0!==m){do{for(d=a-1;0===t.bl_count[d];)d--;t.bl_count[d]--,t.bl_count[d+1]+=2,t.bl_count[a]--,m-=2}while(m>0);for(d=a;0!==d;d--)for(c=t.bl_count[d];0!==c;)l=t.heap[--o],l>e.max_code||(n[2*l+1]!=d&&(t.opt_len+=(d-n[2*l+1])*n[2*l],n[2*l+1]=d),c--)}}(n),function(e,n,i){const r=[];let s,a,o,c=0;for(s=1;s<=y;s++)r[s]=c=c+i[s-1]<<1;for(a=0;a<=n;a++)o=e[2*a+1],0!==o&&(e[2*a]=t(r[o]++,o))}(i,e.max_code,n.bl_count)}}function I(e,t,n,i,r){const s=this;s.static_tree=e,s.extra_bits=t,s.extra_base=n,s.elems=i,s.max_length=r}L._length_code=[0,1,2,3,4,5,6,7].concat(...F([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]])),L.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],L.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],L.d_code=function(e){return e<256?E[e]:E[256+(e>>>7)]},L.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],L.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],L.extra_blbits=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],L.bl_order=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];const R=F([[144,8],[112,9],[24,7],[8,8]]);I.static_ltree=D([12,140,76,204,44,172,108,236,28,156,92,220,60,188,124,252,2,130,66,194,34,162,98,226,18,146,82,210,50,178,114,242,10,138,74,202,42,170,106,234,26,154,90,218,58,186,122,250,6,134,70,198,38,166,102,230,22,150,86,214,54,182,118,246,14,142,78,206,46,174,110,238,30,158,94,222,62,190,126,254,1,129,65,193,33,161,97,225,17,145,81,209,49,177,113,241,9,137,73,201,41,169,105,233,25,153,89,217,57,185,121,249,5,133,69,197,37,165,101,229,21,149,85,213,53,181,117,245,13,141,77,205,45,173,109,237,29,157,93,221,61,189,125,253,19,275,147,403,83,339,211,467,51,307,179,435,115,371,243,499,11,267,139,395,75,331,203,459,43,299,171,427,107,363,235,491,27,283,155,411,91,347,219,475,59,315,187,443,123,379,251,507,7,263,135,391,71,327,199,455,39,295,167,423,103,359,231,487,23,279,151,407,87,343,215,471,55,311,183,439,119,375,247,503,15,271,143,399,79,335,207,463,47,303,175,431,111,367,239,495,31,287,159,415,95,351,223,479,63,319,191,447,127,383,255,511,0,64,32,96,16,80,48,112,8,72,40,104,24,88,56,120,4,68,36,100,20,84,52,116,3,131,67,195,35,163,99,227].map(((e,t)=>[e,R[t]])));const T=F([[30,5]]);I.static_dtree=D([0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30,1,17,9,25,5,21,13,29,3,19,11,27,7,23].map(((e,t)=>[e,T[t]]))),I.static_l_desc=new I(I.static_ltree,L.extra_lbits,257,286,y),I.static_d_desc=new I(I.static_dtree,L.extra_dbits,0,30,y),I.static_bl_desc=new I(null,L.extra_blbits,0,19,7);function $(e,t,n,i,r){const s=this;s.good_length=e,s.max_lazy=t,s.nice_length=n,s.max_chain=i,s.func=r}const O=[new $(0,0,0,0,0),new $(4,4,8,4,1),new $(4,5,16,8,1),new $(4,6,32,32,1),new $(4,4,16,16,2),new $(8,16,32,32,2),new $(8,16,128,128,2),new $(8,32,128,256,2),new $(32,128,258,1024,2),new $(32,258,258,4096,2)],B=["need dictionary","stream end","","","stream error","data error","","buffer error","",""],V=113,M=666,K=258,P=262;function N(e,t,n,i){const r=e[2*t],s=e[2*n];return r>>8&255)}function fe(e,t){let n;const i=t;ae>16-i?(n=e,se|=n<>>16-ae,ae+=i-16):(se|=e<=8&&(le(255&se),se>>>=8,ae-=8)}function he(t,n){let i,r,s;if(e.dist_buf[ne]=t,e.lc_buf[ne]=255&n,ne++,0===t?H[2*n]++:(ie++,t--,H[2*(L._length_code[n]+_+1)]++,Z[2*L.d_code(t)]++),0==(8191&ne)&&T>2){for(i=8*ne,r=y-x,s=0;s<30;s++)i+=Z[2*s]*(5+L.extra_dbits[s]);if(i>>>=3,ie8?de(se):ae>0&&le(255&se),se=0,ae=0}function ge(t,n,i){fe(0+(i?1:0),3),function(t,n,i){xe(),re=8,i&&(de(n),de(~n)),e.pending_buf.set(c.subarray(t,t+n),e.pending),e.pending+=n}(t,n,!0)}function be(t,n,i){let r,s,a=0;T>0?(J.build_tree(e),Q.build_tree(e),a=function(){let t;for(ce(H,J.max_code),ce(Z,Q.max_code),ee.build_tree(e),t=18;t>=3&&0===G[2*L.bl_order[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(),r=e.opt_len+3+7>>>3,s=e.static_len+3+7>>>3,s<=r&&(r=s)):r=s=n+5,n+4<=r&&-1!=t?ge(t,n,i):s==r?(fe(2+(i?1:0),3),we(I.static_ltree,I.static_dtree)):(fe(4+(i?1:0),3),function(e,t,n){let i;for(fe(e-257,5),fe(t-1,5),fe(n-4,4),i=0;i=0?x:-1,y-x,e),x=y,t.flush_pending()}function ye(){let e,n,i,r;do{if(r=l-F-y,0===r&&0===y&&0===F)r=s;else if(-1==r)r--;else if(y>=s+s-P){c.set(c.subarray(s,s+s),0),k-=s,y-=s,x-=s,e=m,i=e;do{n=65535&f[--i],f[i]=n>=s?n-s:0}while(0!=--e);e=s,i=e;do{n=65535&d[--i],d[i]=n>=s?n-s:0}while(0!=--e);r+=s}if(0===t.avail_in)return;e=t.read_buf(c,y+F,r),F+=e,F>=3&&(u=255&c[y],u=(u<s-P?y-(s-P):0;let f=X;const u=o,m=y+K;let p=c[r+a-1],h=c[r+a];D>=Y&&(i>>=2),f>F&&(f=F);do{if(t=e,c[t+a]==h&&c[t+a-1]==p&&c[t]==c[r]&&c[++t]==c[r+1]){r+=2,t++;do{}while(c[++r]==c[++t]&&c[++r]==c[++t]&&c[++r]==c[++t]&&c[++r]==c[++t]&&c[++r]==c[++t]&&c[++r]==c[++t]&&c[++r]==c[++t]&&c[++r]==c[++t]&&ra){if(k=e,a=n,n>=f)break;p=c[r+a-1],h=c[r+a]}}}while((e=65535&d[e&u])>l&&0!=--i);return a<=F?a:F}function ke(t){return t.total_in=t.total_out=0,t.msg=null,e.pending=0,e.pending_out=0,n=V,r=C,J.dyn_tree=H,J.stat_desc=I.static_l_desc,Q.dyn_tree=Z,Q.stat_desc=I.static_d_desc,ee.dyn_tree=G,ee.stat_desc=I.static_bl_desc,se=0,ae=0,re=8,oe(),function(){l=2*s,f[m-1]=0;for(let e=0;e9||8!=l||r<9||r>15||n<0||n>9||x<0||x>2?j:(t.dstate=e,a=r,s=1<9||n<0||n>2?j:(O[T].func!=O[t].func&&0!==e.total_in&&(i=e.deflate(1)),T!=t&&(T=t,R=O[T].max_lazy,Y=O[T].good_length,X=O[T].nice_length,E=O[T].max_chain),$=n,i)},e.deflateSetDictionary=function(e,t,i){let r,a=i,l=0;if(!t||42!=n)return j;if(a<3)return U;for(a>s-P&&(a=s-P,l=i-a),c.set(t.subarray(l,l+a),0),y=a,x=a,u=255&c[0],u=(u<A||p<0)return j;if(!l.next_out||!l.next_in&&0!==l.avail_in||n==M&&p!=A)return l.msg=B[2-j],j;if(0===l.avail_out)return l.msg=B[7],q;var N;if(t=l,L=r,r=p,42==n&&(S=8+(a-8<<4)<<8,E=(T-1&255)>>1,E>3&&(E=3),S|=E<<6,0!==y&&(S|=32),S+=31-S%31,n=V,le((N=S)>>8&255),le(255&N)),0!==e.pending){if(t.flush_pending(),0===t.avail_out)return r=-1,U}else if(0===t.avail_in&&p<=L&&p!=A)return t.msg=B[7],q;if(n==M&&0!==t.avail_in)return l.msg=B[7],q;if(0!==t.avail_in||0!==F||p!=C&&n!=M){switch(K=-1,O[T].func){case 0:K=function(e){let n,r=65535;for(r>i-5&&(r=i-5);;){if(F<=1){if(ye(),0===F&&e==C)return 0;if(0===F)break}if(y+=F,F=0,n=x+r,(0===y||y>=n)&&(F=y-n,y=n,ve(!1),0===t.avail_out))return 0;if(y-x>=s-P&&(ve(!1),0===t.avail_out))return 0}return ve(e==A),0===t.avail_out?e==A?2:0:e==A?3:1}(p);break;case 1:K=function(e){let n,i=0;for(;;){if(F=3&&(u=(u<=3)if(n=he(y-k,g-3),F-=g,g<=R&&F>=3){g--;do{y++,u=(u<=3&&(u=(u<4096)&&(g=2)),D>=3&&g<=D){i=y+F-3,n=he(y-1-b,D-3),F-=D-1,D-=2;do{++y<=i&&(u=(u<n&&(r=n),0===r?0:(i.avail_in-=r,e.set(i.next_in.subarray(i.next_in_index,i.next_in_index+r),t),i.next_in_index+=r,i.total_in+=r,r)},flush_pending(){const e=this;let t=e.dstate.pending;t>e.avail_out&&(t=e.avail_out),0!==t&&(e.next_out.set(e.dstate.pending_buf.subarray(e.dstate.pending_out,e.dstate.pending_out+t),e.next_out_index),e.next_out_index+=t,e.dstate.pending_out+=t,e.total_out+=t,e.avail_out-=t,e.dstate.pending-=t,0===e.dstate.pending&&(e.dstate.pending_out=0))}};const H=0,Z=1,G=-2,J=-3,Q=-4,ee=-5,te=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],ne=1440,ie=[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],re=[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],se=[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],ae=[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],oe=[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],ce=[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],le=15;function de(){let e,t,n,i,r,s;function a(e,t,a,o,c,l,d,f,u,m,p){let h,w,x,g,b,v,y,_,k,z,S,C,A,U,W;z=0,b=a;do{n[e[t+z]]++,z++,b--}while(0!==b);if(n[0]==a)return d[0]=-1,f[0]=0,H;for(_=f[0],v=1;v<=le&&0===n[v];v++);for(y=v,_b&&(_=b),f[0]=_,U=1<C+_;){if(g++,C+=_,W=x-C,W=W>_?_:W,(w=1<<(v=y-C))>h+1&&(w-=h+1,A=y,vne)return J;r[g]=S=m[0],m[0]+=W,0!==g?(s[g]=b,i[0]=v,i[1]=_,v=b>>>C-_,i[2]=S-r[g-1]-v,u.set(i,3*(r[g-1]+v))):d[0]=S}for(i[1]=y-C,z>=a?i[0]=192:p[z]>>C;v>>=1)b^=v;for(b^=v,k=(1<257?(m==J?u.msg="oversubscribed distance tree":m==ee?(u.msg="incomplete distance tree",m=J):m!=Q&&(u.msg="empty distance tree with lengths",m=J),m):H)}}de.inflate_trees_fixed=function(e,t,n,i){return e[0]=9,t[0]=5,n[0]=ie,i[0]=re,H};const fe=0,ue=1,me=2,pe=3,he=4,we=5,xe=6,ge=7,be=8,ve=9;function ye(){const e=this;let t,n,i,r,s=0,a=0,o=0,c=0,l=0,d=0,f=0,u=0,m=0,p=0;function h(e,t,n,i,r,s,a,o){let c,l,d,f,u,m,p,h,w,x,g,b,v,y,_,k;p=o.next_in_index,h=o.avail_in,u=a.bitb,m=a.bitk,w=a.write,x=w>=l[k+1],m-=l[k+1],0!=(16&f)){for(f&=15,v=l[k+2]+(u&te[f]),u>>=f,m-=f;m<15;)h--,u|=(255&o.read_byte(p++))<>=l[k+1],m-=l[k+1],0!=(16&f)){for(f&=15;m>=f,m-=f,x-=v,w>=y)_=w-y,w-_>0&&2>w-_?(a.win[w++]=a.win[_++],a.win[w++]=a.win[_++],v-=2):(a.win.set(a.win.subarray(_,_+2),w),w+=2,_+=2,v-=2);else{_=w-y;do{_+=a.end}while(_<0);if(f=a.end-_,v>f){if(v-=f,w-_>0&&f>w-_)do{a.win[w++]=a.win[_++]}while(0!=--f);else a.win.set(a.win.subarray(_,_+f),w),w+=f,_+=f,f=0;_=0}}if(w-_>0&&v>w-_)do{a.win[w++]=a.win[_++]}while(0!=--v);else a.win.set(a.win.subarray(_,_+v),w),w+=v,_+=v,v=0;break}if(0!=(64&f))return o.msg="invalid distance code",v=o.avail_in-h,v=m>>3>3:v,h+=v,p-=v,m-=v<<3,a.bitb=u,a.bitk=m,o.avail_in=h,o.total_in+=p-o.next_in_index,o.next_in_index=p,a.write=w,J;c+=l[k+2],c+=u&te[f],k=3*(d+c),f=l[k]}break}if(0!=(64&f))return 0!=(32&f)?(v=o.avail_in-h,v=m>>3>3:v,h+=v,p-=v,m-=v<<3,a.bitb=u,a.bitk=m,o.avail_in=h,o.total_in+=p-o.next_in_index,o.next_in_index=p,a.write=w,Z):(o.msg="invalid literal/length code",v=o.avail_in-h,v=m>>3>3:v,h+=v,p-=v,m-=v<<3,a.bitb=u,a.bitk=m,o.avail_in=h,o.total_in+=p-o.next_in_index,o.next_in_index=p,a.write=w,J);if(c+=l[k+2],c+=u&te[f],k=3*(d+c),0===(f=l[k])){u>>=l[k+1],m-=l[k+1],a.win[w++]=l[k+2],x--;break}}else u>>=l[k+1],m-=l[k+1],a.win[w++]=l[k+2],x--}while(x>=258&&h>=10);return v=o.avail_in-h,v=m>>3>3:v,h+=v,p-=v,m-=v<<3,a.bitb=u,a.bitk=m,o.avail_in=h,o.total_in+=p-o.next_in_index,o.next_in_index=p,a.write=w,H}e.init=function(e,s,a,o,c,l){t=fe,f=e,u=s,i=a,m=o,r=c,p=l,n=null},e.proc=function(e,w,x){let g,b,v,y,_,k,z,S=0,C=0,A=0;for(A=w.next_in_index,y=w.avail_in,S=e.bitb,C=e.bitk,_=e.write,k=_=258&&y>=10&&(e.bitb=S,e.bitk=C,w.avail_in=y,w.total_in+=A-w.next_in_index,w.next_in_index=A,e.write=_,x=h(f,u,i,m,r,p,e,w),A=w.next_in_index,y=w.avail_in,S=e.bitb,C=e.bitk,_=e.write,k=_>>=n[b+1],C-=n[b+1],v=n[b],0===v){c=n[b+2],t=xe;break}if(0!=(16&v)){l=15&v,s=n[b+2],t=me;break}if(0==(64&v)){o=v,a=b/3+n[b+2];break}if(0!=(32&v)){t=ge;break}return t=ve,w.msg="invalid literal/length code",x=J,e.bitb=S,e.bitk=C,w.avail_in=y,w.total_in+=A-w.next_in_index,w.next_in_index=A,e.write=_,e.inflate_flush(w,x);case me:for(g=l;C>=g,C-=g,o=u,n=r,a=p,t=pe;case pe:for(g=o;C>=n[b+1],C-=n[b+1],v=n[b],0!=(16&v)){l=15&v,d=n[b+2],t=he;break}if(0==(64&v)){o=v,a=b/3+n[b+2];break}return t=ve,w.msg="invalid distance code",x=J,e.bitb=S,e.bitk=C,w.avail_in=y,w.total_in+=A-w.next_in_index,w.next_in_index=A,e.write=_,e.inflate_flush(w,x);case he:for(g=l;C>=g,C-=g,t=we;case we:for(z=_-d;z<0;)z+=e.end;for(;0!==s;){if(0===k&&(_==e.end&&0!==e.read&&(_=0,k=_7&&(C-=8,y++,A--),e.write=_,x=e.inflate_flush(w,x),_=e.write,k=_e.avail_out&&(i=e.avail_out),0!==i&&t==ee&&(t=H),e.avail_out-=i,e.total_out+=i,e.next_out.set(n.win.subarray(s,s+i),r),r+=i,s+=i,s==n.end&&(s=0,n.write==n.end&&(n.write=0),i=n.write-s,i>e.avail_out&&(i=e.avail_out),0!==i&&t==ee&&(t=H),e.avail_out-=i,e.total_out+=i,e.next_out.set(n.win.subarray(s,s+i),r),r+=i,s+=i),e.next_out_index=r,n.read=s,t},n.proc=function(e,t){let p,h,w,x,g,b,v,y;for(x=e.next_in_index,g=e.avail_in,h=n.bitb,w=n.bitk,b=n.write,v=b>>1){case 0:h>>>=3,w-=3,p=7&w,h>>>=p,w-=p,r=ze;break;case 1:_=[],k=[],z=[[]],S=[[]],de.inflate_trees_fixed(_,k,z,S),d.init(_[0],k[0],z[0],0,S[0],0),h>>>=3,w-=3,r=We;break;case 2:h>>>=3,w-=3,r=Ce;break;case 3:return h>>>=3,w-=3,r=Fe,e.msg="invalid block type",t=J,n.bitb=h,n.bitk=w,e.avail_in=g,e.total_in+=x-e.next_in_index,e.next_in_index=x,n.write=b,n.inflate_flush(e,t)}break;case ze:for(;w<32;){if(0===g)return n.bitb=h,n.bitk=w,e.avail_in=g,e.total_in+=x-e.next_in_index,e.next_in_index=x,n.write=b,n.inflate_flush(e,t);t=H,g--,h|=(255&e.read_byte(x++))<>>16&65535)!=(65535&h))return r=Fe,e.msg="invalid stored block lengths",t=J,n.bitb=h,n.bitk=w,e.avail_in=g,e.total_in+=x-e.next_in_index,e.next_in_index=x,n.write=b,n.inflate_flush(e,t);s=65535&h,h=w=0,r=0!==s?Se:0!==f?je:ke;break;case Se:if(0===g)return n.bitb=h,n.bitk=w,e.avail_in=g,e.total_in+=x-e.next_in_index,e.next_in_index=x,n.write=b,n.inflate_flush(e,t);if(0===v&&(b==n.end&&0!==n.read&&(b=0,v=bg&&(p=g),p>v&&(p=v),n.win.set(e.read_buf(x,p),b),x+=p,g-=p,b+=p,v-=p,0!=(s-=p))break;r=0!==f?je:ke;break;case Ce:for(;w<14;){if(0===g)return n.bitb=h,n.bitk=w,e.avail_in=g,e.total_in+=x-e.next_in_index,e.next_in_index=x,n.write=b,n.inflate_flush(e,t);t=H,g--,h|=(255&e.read_byte(x++))<29||(p>>5&31)>29)return r=Fe,e.msg="too many length or distance symbols",t=J,n.bitb=h,n.bitk=w,e.avail_in=g,e.total_in+=x-e.next_in_index,e.next_in_index=x,n.write=b,n.inflate_flush(e,t);if(p=258+(31&p)+(p>>5&31),!i||i.length>>=14,w-=14,o=0,r=Ae;case Ae:for(;o<4+(a>>>10);){for(;w<3;){if(0===g)return n.bitb=h,n.bitk=w,e.avail_in=g,e.total_in+=x-e.next_in_index,e.next_in_index=x,n.write=b,n.inflate_flush(e,t);t=H,g--,h|=(255&e.read_byte(x++))<>>=3,w-=3}for(;o<19;)i[_e[o++]]=0;if(c[0]=7,p=m.inflate_trees_bits(i,c,l,u,e),p!=H)return(t=p)==J&&(i=null,r=Fe),n.bitb=h,n.bitk=w,e.avail_in=g,e.total_in+=x-e.next_in_index,e.next_in_index=x,n.write=b,n.inflate_flush(e,t);o=0,r=Ue;case Ue:for(;p=a,!(o>=258+(31&p)+(p>>5&31));){let s,d;for(p=c[0];w>>=p,w-=p,i[o++]=d;else{for(y=18==d?7:d-14,s=18==d?11:3;w>>=p,w-=p,s+=h&te[y],h>>>=y,w-=y,y=o,p=a,y+s>258+(31&p)+(p>>5&31)||16==d&&y<1)return i=null,r=Fe,e.msg="invalid bit length repeat",t=J,n.bitb=h,n.bitk=w,e.avail_in=g,e.total_in+=x-e.next_in_index,e.next_in_index=x,n.write=b,n.inflate_flush(e,t);d=16==d?i[y-1]:0;do{i[y++]=d}while(0!=--s);o=y}}if(l[0]=-1,C=[],A=[],U=[],W=[],C[0]=9,A[0]=6,p=a,p=m.inflate_trees_dynamic(257+(31&p),1+(p>>5&31),i,C,A,U,W,u,e),p!=H)return p==J&&(i=null,r=Fe),t=p,n.bitb=h,n.bitk=w,e.avail_in=g,e.total_in+=x-e.next_in_index,e.next_in_index=x,n.write=b,n.inflate_flush(e,t);d.init(C[0],A[0],u,U[0],u,W[0]),r=We;case We:if(n.bitb=h,n.bitk=w,e.avail_in=g,e.total_in+=x-e.next_in_index,e.next_in_index=x,n.write=b,(t=d.proc(n,e,t))!=Z)return n.inflate_flush(e,t);if(t=H,d.free(e),x=e.next_in_index,g=e.avail_in,h=n.bitb,w=n.bitk,b=n.write,v=b15?(e.inflateEnd(n),G):(e.wbits=i,n.istate.blocks=new De(n,1<>4)>r.wbits){r.mode=Ee,e.msg="invalid win size",r.marker=5;break}r.mode=1;case 1:if(0===e.avail_in)return n;if(n=t,e.avail_in--,e.total_in++,i=255&e.read_byte(e.next_in_index++),((r.method<<8)+i)%31!=0){r.mode=Ee,e.msg="incorrect header check",r.marker=5;break}if(0==(32&i)){r.mode=7;break}r.mode=2;case 2:if(0===e.avail_in)return n;n=t,e.avail_in--,e.total_in++,r.need=(255&e.read_byte(e.next_in_index++))<<24&4278190080,r.mode=3;case 3:if(0===e.avail_in)return n;n=t,e.avail_in--,e.total_in++,r.need+=(255&e.read_byte(e.next_in_index++))<<16&16711680,r.mode=4;case 4:if(0===e.avail_in)return n;n=t,e.avail_in--,e.total_in++,r.need+=(255&e.read_byte(e.next_in_index++))<<8&65280,r.mode=5;case 5:return 0===e.avail_in?n:(n=t,e.avail_in--,e.total_in++,r.need+=255&e.read_byte(e.next_in_index++),r.mode=6,2);case 6:return r.mode=Ee,e.msg="need dictionary",r.marker=0,G;case 7:if(n=r.blocks.proc(e,n),n==J){r.mode=Ee,r.marker=0;break}if(n==H&&(n=t),n!=Z)return n;n=t,r.blocks.reset(e,r.was),r.mode=12;case 12:return e.avail_in=0,Z;case Ee:return J;default:return G}},e.inflateSetDictionary=function(e,t,n){let i=0,r=n;if(!e||!e.istate||6!=e.istate.mode)return G;const s=e.istate;return r>=1<{const e={};for(const t in Je)if(Je.hasOwnProperty(t))for(const n in Je[t])if(Je[t].hasOwnProperty(n)){const i=Je[t][n];if("string"==typeof i)e[i]=t+"/"+n;else for(let r=0;r>>1^3988292384:t>>>=1;Qe[e]=t}class et{constructor(e){this.crc=e||-1}append(e){let t=0|this.crc;for(let n=0,i=0|e.length;n>>8^Qe[255&(t^e[n])];this.crc=t}get(){return~this.crc}}class tt extends TransformStream{constructor(){const e=new et;super({transform(t){e.append(t)},flush(t){const n=new Uint8Array(4);new DataView(n.buffer).setUint32(0,e.get()),t.enqueue(n)}})}}const nt={concat(e,t){if(0===e.length||0===t.length)return e.concat(t);const n=e[e.length-1],i=nt.getPartial(n);return 32===i?e.concat(t):nt._shiftRight(t,i,0|n,e.slice(0,e.length-1))},bitLength(e){const t=e.length;if(0===t)return 0;const n=e[t-1];return 32*(t-1)+nt.getPartial(n)},clamp(e,t){if(32*e.length0&&t&&(e[n-1]=nt.partial(t,e[n-1]&2147483648>>t-1,1)),e},partial:(e,t,n)=>32===e?t:(n?0|t:t<<32-e)+1099511627776*e,getPartial:e=>Math.round(e/1099511627776)||32,_shiftRight(e,t,n,i){for(void 0===i&&(i=[]);t>=32;t-=32)i.push(n),n=0;if(0===t)return i.concat(e);for(let r=0;r>>t),n=e[r]<<32-t;const r=e.length?e[e.length-1]:0,s=nt.getPartial(r);return i.push(nt.partial(t+s&31,t+s>32?n:i.pop(),1)),i}},it={bytes:{fromBits(e){const t=nt.bitLength(e)/8,n=new Uint8Array(t);let i;for(let r=0;r>>24,i<<=8;return n},toBits(e){const t=[];let n,i=0;for(n=0;n9007199254740991)throw new Error("Cannot hash more than 2^53 - 1 bits");const s=new Uint32Array(n);let a=0;for(let e=t.blockSize+i-(t.blockSize+i&t.blockSize-1);e<=r;e+=t.blockSize)t._block(s.subarray(16*a,16*(a+1))),a+=1;return n.splice(0,16*a),t}finalize(){const e=this;let t=e._buffer;const n=e._h;t=nt.concat(t,[nt.partial(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(Math.floor(e._length/4294967296)),t.push(0|e._length);t.length;)e._block(t.splice(0,16));return e.reset(),n}_f(e,t,n,i){return e<=19?t&n|~t&i:e<=39?t^n^i:e<=59?t&n|t&i|n&i:e<=79?t^n^i:void 0}_S(e,t){return t<>>32-e}_block(e){const t=this,n=t._h,i=Array(80);for(let t=0;t<16;t++)i[t]=e[t];let r=n[0],s=n[1],a=n[2],o=n[3],c=n[4];for(let e=0;e<=79;e++){e>=16&&(i[e]=t._S(1,i[e-3]^i[e-8]^i[e-14]^i[e-16]));const n=t._S(5,r)+t._f(e,s,a,o)+c+i[e]+t._key[Math.floor(e/20)]|0;c=o,o=a,a=t._S(30,s),s=r,r=n}n[0]=n[0]+r|0,n[1]=n[1]+s|0,n[2]=n[2]+a|0,n[3]=n[3]+o|0,n[4]=n[4]+c|0}}},st={aes:class{constructor(e){const t=this;t._tables=[[[],[],[],[],[]],[[],[],[],[],[]]],t._tables[0][0][0]||t._precompute();const n=t._tables[0][4],i=t._tables[1],r=e.length;let s,a,o,c=1;if(4!==r&&6!==r&&8!==r)throw new Error("invalid aes key size");for(t._key=[a=e.slice(0),o=[]],s=r;s<4*r+28;s++){let e=a[s-1];(s%r==0||8===r&&s%r==4)&&(e=n[e>>>24]<<24^n[e>>16&255]<<16^n[e>>8&255]<<8^n[255&e],s%r==0&&(e=e<<8^e>>>24^c<<24,c=c<<1^283*(c>>7))),a[s]=a[s-r]^e}for(let e=0;s;e++,s--){const t=a[3&e?s:s-4];o[e]=s<=4||e<4?t:i[0][n[t>>>24]]^i[1][n[t>>16&255]]^i[2][n[t>>8&255]]^i[3][n[255&t]]}}encrypt(e){return this._crypt(e,0)}decrypt(e){return this._crypt(e,1)}_precompute(){const e=this._tables[0],t=this._tables[1],n=e[4],i=t[4],r=[],s=[];let a,o,c,l;for(let e=0;e<256;e++)s[(r[e]=e<<1^283*(e>>7))^e]=e;for(let d=a=0;!n[d];d^=o||1,a=s[a]||1){let s=a^a<<1^a<<2^a<<3^a<<4;s=s>>8^255&s^99,n[d]=s,i[s]=d,l=r[c=r[o=r[d]]];let f=16843009*l^65537*c^257*o^16843008*d,u=257*r[s]^16843008*s;for(let n=0;n<4;n++)e[n][d]=u=u<<24^u>>>8,t[n][s]=f=f<<24^f>>>8}for(let n=0;n<5;n++)e[n]=e[n].slice(0),t[n]=t[n].slice(0)}_crypt(e,t){if(4!==e.length)throw new Error("invalid aes block size");const n=this._key[t],i=n.length/4-2,r=[0,0,0,0],s=this._tables[t],a=s[0],o=s[1],c=s[2],l=s[3],d=s[4];let f,u,m,p=e[0]^n[0],h=e[t?3:1]^n[1],w=e[2]^n[2],x=e[t?1:3]^n[3],g=4;for(let e=0;e>>24]^o[h>>16&255]^c[w>>8&255]^l[255&x]^n[g],u=a[h>>>24]^o[w>>16&255]^c[x>>8&255]^l[255&p]^n[g+1],m=a[w>>>24]^o[x>>16&255]^c[p>>8&255]^l[255&h]^n[g+2],x=a[x>>>24]^o[p>>16&255]^c[h>>8&255]^l[255&w]^n[g+3],g+=4,p=f,h=u,w=m;for(let e=0;e<4;e++)r[t?3&-e:e]=d[p>>>24]<<24^d[h>>16&255]<<16^d[w>>8&255]<<8^d[255&x]^n[g++],f=p,p=h,h=w,w=x,x=f;return r}}},at={getRandomValues(e){const t=new Uint32Array(e.buffer),n=e=>{let t=987654321;const n=4294967295;return function(){t=36969*(65535&t)+(t>>16)&n;return(((t<<16)+(e=18e3*(65535&e)+(e>>16)&n)&n)/4294967296+.5)*(Math.random()>.5?1:-1)}};for(let i,r=0;r>24&255)){let t=e>>16&255,n=e>>8&255,i=255&e;255===t?(t=0,255===n?(n=0,255===i?i=0:++i):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=i}else e+=1<<24;return e}incCounter(e){0===(e[0]=this.incWord(e[0]))&&(e[1]=this.incWord(e[1]))}calculate(e,t,n){let i;if(!(i=t.length))return[];const r=nt.bitLength(t);for(let r=0;rnew ct.hmacSha1(it.bytes.toBits(e)),pbkdf2(e,t,n,i){if(n=n||1e4,i<0||n<0)throw new Error("invalid params to pbkdf2");const r=1+(i>>5)<<2;let s,a,o,c,l;const d=new ArrayBuffer(r),f=new DataView(d);let u=0;const m=nt;for(t=it.bytes.toBits(t),l=1;u<(r||1);l++){for(s=a=e.encrypt(m.concat(t,[l])),o=1;or&&(e=(new n).update(e).finalize());for(let t=0;tthis.resolveReady=e)),password:e,signed:t,strength:n-1,pending:new Uint8Array})},async transform(e,t){const n=this,{password:r,strength:s,resolveReady:a,ready:o}=n;r?(await async function(e,t,n,i){const r=await Tt(e,t,n,Ot(i,0,vt[t])),s=Ot(i,vt[t]);if(r[0]!=s[0]||r[1]!=s[1])throw new Error(dt)}(n,s,r,Ot(e,0,vt[s]+2)),e=Ot(e,vt[s]+2),i?t.error(new Error(ut)):a()):await o;const c=new Uint8Array(e.length-_t-(e.length-_t)%pt);t.enqueue(Rt(n,e,c,0,_t,!0))},async flush(e){const{signed:t,ctr:n,hmac:i,pending:r,ready:s}=this;await s;const a=Ot(r,0,r.length-_t),o=Ot(r,r.length-_t);let c=new Uint8Array;if(a.length){const e=Vt(Wt,a);i.update(e);const t=n.update(e);c=Bt(Wt,t)}if(t){const e=Ot(Bt(Wt,i.digest()),0,_t);for(let t=0;t<_t;t++)if(e[t]!=o[t])throw new Error(ft)}e.enqueue(c)}})}}class It extends TransformStream{constructor({password:e,encryptionStrength:t}){let n;super({start(){Object.assign(this,{ready:new Promise((e=>this.resolveReady=e)),password:e,strength:t-1,pending:new Uint8Array})},async transform(e,t){const n=this,{password:i,strength:r,resolveReady:s,ready:a}=n;let o=new Uint8Array;i?(o=await async function(e,t,n){const i=mt(new Uint8Array(vt[t])),r=await Tt(e,t,n,i);return $t(i,r)}(n,r,i),s()):await a;const c=new Uint8Array(o.length+e.length-e.length%pt);c.set(o,0),t.enqueue(Rt(n,e,c,o.length,0))},async flush(e){const{ctr:t,hmac:i,pending:r,ready:s}=this;await s;let a=new Uint8Array;if(r.length){const e=t.update(Vt(Wt,r));i.update(e),a=Bt(Wt,e)}n.signature=Bt(Wt,i.digest()).slice(0,_t),e.enqueue($t(a,n.signature))}}),n=this}}function Rt(e,t,n,i,r,s){const{ctr:a,hmac:o,pending:c}=e,l=t.length-r;let d;for(c.length&&(t=$t(c,t),n=function(e,t){if(t&&t>e.length){const n=e;(e=new Uint8Array(t)).set(n,0)}return e}(n,l-l%pt)),d=0;d<=l-pt;d+=pt){const e=Vt(Wt,Ot(t,d,d+pt));s&&o.update(e);const r=a.update(e);s||o.update(r),n.set(Bt(Wt,r),d+i)}return e.pending=Ot(t,d),n}async function Tt(e,t,n,i){e.password=null;const r=function(e){if("undefined"==typeof TextEncoder){e=unescape(encodeURIComponent(e));const t=new Uint8Array(e.length);for(let n=0;n>>24]),r=~e.crcKey2.get(),e.keys=[n,i,r]}function Zt(e){const t=2|e.keys[2];return Gt(Math.imul(t,1^t)>>>8)}function Gt(e){return 255&e}function Jt(e){return 4294967295&e}const Qt="deflate-raw";class en extends TransformStream{constructor(e,{chunkSize:t,CompressionStream:n,CompressionStreamNative:i}){super({});const{compressed:r,encrypted:s,useCompressionStream:a,zipCrypto:o,signed:c,level:l}=e,d=this;let f,u,m=nn(super.readable);s&&!o||!c||([m,f]=m.tee(),f=an(f,new tt)),r&&(m=sn(m,a,{level:l,chunkSize:t},i,n)),s&&(o?m=an(m,new Pt(e)):(u=new It(e),m=an(m,u))),rn(d,m,(async()=>{let e;s&&!o&&(e=u.signature),s&&!o||!c||(e=await f.getReader().read(),e=new DataView(e.value.buffer).getUint32(0)),d.signature=e}))}}class tn extends TransformStream{constructor(e,{chunkSize:t,DecompressionStream:n,DecompressionStreamNative:i}){super({});const{zipCrypto:r,encrypted:s,signed:a,signature:o,compressed:c,useCompressionStream:l}=e;let d,f,u=nn(super.readable);s&&(r?u=an(u,new Kt(e)):(f=new Lt(e),u=an(u,f))),c&&(u=sn(u,l,{chunkSize:t},i,n)),s&&!r||!a||([u,d]=u.tee(),d=an(d,new tt)),rn(this,u,(async()=>{if((!s||r)&&a){const e=await d.getReader().read(),t=new DataView(e.value.buffer);if(o!=t.getUint32(0,!1))throw new Error(ft)}}))}}function nn(e){return an(e,new TransformStream({transform(e,t){e&&e.length&&t.enqueue(e)}}))}function rn(e,t,n){t=an(t,new TransformStream({flush:n})),Object.defineProperty(e,"readable",{get:()=>t})}function sn(e,t,n,i,r){try{e=an(e,new(t&&i?i:r)(Qt,n))}catch(i){if(!t)throw i;e=an(e,new r(Qt,n))}return e}function an(e,t){return e.pipeThrough(t)}const on="message",cn="start",ln="pull",dn="data",fn="ack",un="close",mn="inflate";class pn extends TransformStream{constructor(e,t){super({});const n=this,{codecType:i}=e;let r;i.startsWith("deflate")?r=en:i.startsWith(mn)&&(r=tn);let s=0;const a=new r(e,t),o=super.readable,c=new TransformStream({transform(e,t){e&&e.length&&(s+=e.length,t.enqueue(e))},flush(){const{signature:e}=a;Object.assign(n,{signature:e,size:s})}});Object.defineProperty(n,"readable",{get:()=>o.pipeThrough(a).pipeThrough(c)})}}const hn=typeof Worker!=Ke;class wn{constructor(e,{readable:t,writable:n},{options:i,config:r,streamOptions:s,useWebWorkers:a,transferStreams:o,scripts:c},l){const{signal:d}=s;return Object.assign(e,{busy:!0,readable:t.pipeThrough(new xn(t,s,r),{signal:d}),writable:n,options:Object.assign({},i),scripts:c,transferStreams:o,terminate(){const{worker:t,busy:n}=e;t&&!n&&(t.terminate(),e.interface=null)},onTaskFinished(){e.busy=!1,l(e)}}),(a&&hn?vn:bn)(e,r)}}class xn extends TransformStream{constructor(e,{onstart:t,onprogress:n,size:i,onend:r},{chunkSize:s}){let a=0;super({start(){t&&gn(t,i)},async transform(e,t){a+=e.length,n&&await gn(n,a,i),t.enqueue(e)},flush(){e.size=a,r&&gn(r,a)}},{highWaterMark:1,size:()=>s})}}async function gn(e,...t){try{await e(...t)}catch(e){}}function bn(e,t){return{run:()=>async function({options:e,readable:t,writable:n,onTaskFinished:i},r){const s=new pn(e,r);try{await t.pipeThrough(s).pipeTo(n,{preventClose:!0,preventAbort:!0});const{signature:e,size:i}=s;return{signature:e,size:i}}finally{i()}}(e,t)}}function vn(e,{baseURL:t,chunkSize:n}){return e.interface||Object.assign(e,{worker:kn(e.scripts[0],t,e),interface:{run:()=>async function(e,t){let n,i;const r=new Promise(((e,t)=>{n=e,i=t}));Object.assign(e,{reader:null,writer:null,resolveResult:n,rejectResult:i,result:r});const{readable:s,options:a,scripts:o}=e,{writable:c,closed:l}=function(e){const t=e.getWriter();let n;const i=new Promise((e=>n=e)),r=new WritableStream({async write(e){await t.ready,await t.write(e)},close(){t.releaseLock(),n()},abort:e=>t.abort(e)});return{writable:r,closed:i}}(e.writable),d=zn({type:cn,scripts:o.slice(1),options:a,config:t,readable:s,writable:c},e);d||Object.assign(e,{reader:s.getReader(),writer:c.getWriter()});const f=await r;try{await c.close()}catch(e){}return await l,f}(e,{chunkSize:n})}}),e.interface}let yn=!0,_n=!0;function kn(e,t,n){const i={type:"module"};let r,s;typeof e==Pe&&(e=e());try{r=new URL(e,t)}catch(t){r=e}if(yn)try{s=new Worker(r)}catch(e){yn=!1,s=new Worker(r,i)}else s=new Worker(r,i);return s.addEventListener(on,(e=>async function({data:e},t){const{type:n,value:i,messageId:r,result:s,error:a}=e,{reader:o,writer:c,resolveResult:l,rejectResult:d,onTaskFinished:f}=t;try{if(a){const{message:e,stack:t,code:n,name:i}=a,r=new Error(e);Object.assign(r,{stack:t,code:n,name:i}),u(r)}else{if(n==ln){const{value:e,done:n}=await o.read();zn({type:dn,value:e,done:n,messageId:r},t)}n==dn&&(await c.ready,await c.write(new Uint8Array(i)),zn({type:fn,messageId:r},t)),n==un&&u(null,s)}}catch(a){u(a)}function u(e,t){e?d(e):l(t),c&&c.releaseLock(),f()}}(e,n))),s}function zn(e,{worker:t,writer:n,onTaskFinished:i,transferStreams:r}){try{let{value:n,readable:i,writable:s}=e;const a=[];if(n){const{buffer:t,length:i}=n;i!=t.byteLength&&(n=new Uint8Array(n)),e.value=n.buffer,a.push(e.value)}if(r&&_n?(i&&a.push(i),s&&a.push(s)):e.readable=e.writable=null,a.length)try{return t.postMessage(e,a),!0}catch(n){_n=!1,e.readable=e.writable=null,t.postMessage(e)}else t.postMessage(e)}catch(e){throw n&&n.releaseLock(),i(),e}}let Sn=[];const Cn=[];let An=0;function Un(e){const{terminateTimeout:t}=e;t&&(clearTimeout(t),e.terminateTimeout=null)}const Wn=65536,jn="writable";class qn{constructor(){this.size=0}init(){this.initialized=!0}}class Fn extends qn{get readable(){const e=this,{chunkSize:t=Wn}=e,n=new ReadableStream({start(){this.chunkOffset=0},async pull(i){const{offset:r=0,size:s,diskNumberStart:a}=n,{chunkOffset:o}=this;i.enqueue(await On(e,r+o,Math.min(t,s-o),a)),o+t>s?i.close():this.chunkOffset+=t}});return n}}class Dn extends Fn{constructor(e){super(),Object.assign(this,{blob:e,size:e.size})}async readUint8Array(e,t){const n=this,i=e+t,r=e||it.writable}),this.blob=new Response(t.readable,{headers:n}).blob()}getData(){return this.blob}}class Ln extends En{constructor(e){super(e),Object.assign(this,{encoding:e,utf8:!e||"utf-8"==e.toLowerCase()})}async getData(){const{encoding:e,utf8:t}=this,n=await super.getData();if(n.text&&t)return n.text();{const t=new FileReader;return new Promise(((i,r)=>{Object.assign(t,{onload:({target:e})=>i(e.result),onerror:()=>r(t.error)}),t.readAsText(n,e)}))}}}class In extends Fn{constructor(e){super(),this.readers=e}async init(){const e=this,{readers:t}=e;e.lastDiskNumber=0,await Promise.all(t.map((async t=>{await t.init(),e.size+=t.size}))),super.init()}async readUint8Array(e,t,n=0){const i=this,{readers:r}=this;let s,a=n;-1==a&&(a=r.length-1);let o=e;for(;o>=r[a].size;)o-=r[a].size,a++;const c=r[a],l=c.size;if(o+t<=l)s=await On(c,o,t);else{const r=l-o;s=new Uint8Array(t),s.set(await On(c,o,r)),s.set(await i.readUint8Array(e+r,t-r,n),r)}return i.lastDiskNumber=Math.max(a,i.lastDiskNumber),s}}class Rn extends qn{constructor(e,t=4294967295){super();const n=this;let i,r,s;Object.assign(n,{diskNumber:0,diskOffset:0,size:0,maxSize:t,availableSize:t});const a=new WritableStream({async write(t){const{availableSize:a}=n;if(s)t.length>=a?(await o(t.slice(0,a)),await c(),n.diskOffset+=i.size,n.diskNumber++,s=null,await this.write(t.slice(a))):await o(t);else{const{value:a,done:o}=await e.next();if(o&&!a)throw new Error("Writer iterator completed too soon");i=a,i.size=0,i.maxSize&&(n.maxSize=i.maxSize),n.availableSize=n.maxSize,await Tn(i),r=a.writable,s=r.getWriter(),await this.write(t)}},async close(){await s.ready,await c()}});async function o(e){const t=e.length;t&&(await s.ready,await s.write(e),i.size+=t,n.size+=t,n.availableSize-=t)}async function c(){r.size=i.size,await s.close()}Object.defineProperty(n,jn,{get:()=>a})}}async function Tn(e,t){e.init&&!e.initialized&&await e.init(t)}function $n(e){return Array.isArray(e)&&(e=new In(e)),e instanceof ReadableStream&&(e={readable:e}),e}function On(e,t,n,i){return e.readUint8Array(t,n,i)}const Bn="\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ ".split(""),Vn=256==Bn.length;function Mn(e,t){return t&&"cp437"==t.trim().toLowerCase()?function(e){if(Vn){let t="";for(let n=0;nthis[t]=e[t]))}}const ai="File format is not recognized",oi="Zip64 extra field not found",ci="Compression method not supported",li="Split zip file",di="utf-8",fi="cp437",ui=[[Xn,Te],[Hn,Te],[Zn,Te],[Gn,$e]],mi={[$e]:{getValue:zi,bytes:4},[Te]:{getValue:Si,bytes:8}};class pi{constructor(e,t={}){Object.assign(this,{reader:$n(e),options:t,config:He})}async*getEntriesGenerator(e={}){const t=this;let{reader:n}=t;const{config:i}=t;if(await Tn(n),n.size!==Me&&n.readUint8Array||(n=new Dn(await new Response(n.readable).blob()),await Tn(n)),n.size<22)throw new Error(ai);n.chunkSize=function(e){return Math.max(e.chunkSize,64)}(i);const r=await async function(e,t,n,i,r){const s=new Uint8Array(4);!function(e,t,n){e.setUint32(t,n,!0)}(Ci(s),0,t);const a=i+r;return await o(i)||await o(Math.min(a,n));async function o(t){const r=n-t,a=await On(e,r,t);for(let e=a.length-i;e>=0;e--)if(a[e]==s[0]&&a[e+1]==s[1]&&a[e+2]==s[2]&&a[e+3]==s[3])return{offset:r+e,buffer:a.slice(e,e+i).buffer}}}(n,101010256,n.size,22,1048560);if(!r){throw 134695760==zi(Ci(await On(n,0,4)))?new Error(li):new Error("End of central directory not found")}const s=Ci(r);let a=zi(s,12),o=zi(s,16);const c=r.offset,l=ki(s,20),d=c+22+l;let f=ki(s,4);const u=n.lastDiskNumber||0;let m=ki(s,6),p=ki(s,8),h=0,w=0;if(o==Te||a==Te||p==$e||m==$e){const e=Ci(await On(n,r.offset-20,20));if(117853008!=zi(e,0))throw new Error("End of Zip64 central directory not found");o=Si(e,8);let t=await On(n,o,56,-1),i=Ci(t);const s=r.offset-20-56;if(zi(i,0)!=Be&&o!=s){const e=o;o=s,h=o-e,t=await On(n,o,56,-1),i=Ci(t)}if(zi(i,0)!=Be)throw new Error("End of Zip64 central directory locator not found");f==$e&&(f=zi(i,16)),m==$e&&(m=zi(i,20)),p==$e&&(p=Si(i,32)),a==Te&&(a=Si(i,40)),o-=a}if(u!=f)throw new Error(li);if(o<0||o>=n.size)throw new Error(ai);let x=0,g=await On(n,o,a,m),b=Ci(g);if(a){const e=r.offset-a;if(zi(b,x)!=Oe&&o!=e){const t=o;o=e,h=o-t,g=await On(n,o,a,m),b=Ci(g)}}if(o<0||o>=n.size)throw new Error(ai);const v=bi(t,e,"filenameEncoding"),y=bi(t,e,"commentEncoding");for(let r=0;rs.getData(e,j,t),x=_;const{onprogress:q}=e;if(q)try{await q(r+1,p,new si(s))}catch(e){}yield j}const _=bi(t,e,"extractPrependedData"),k=bi(t,e,"extractAppendedData");return _&&(t.prependedData=w>0?await On(n,0,w):new Uint8Array),t.comment=l?await On(n,c+22,l):new Uint8Array,k&&(t.appendedData=d>>8&255:f>>>24&255),signature:f,compressed:0!=c,encrypted:g,useWebWorkers:bi(i,n,"useWebWorkers"),useCompressionStream:bi(i,n,"useCompressionStream"),transferStreams:bi(i,n,"transferStreams"),checkPasswordOnly:z},config:l,streamOptions:{signal:k,size:_,onstart:C,onprogress:A,onend:U}};let j=0;try{({outputSize:j}=await async function(e,t){const{options:n,config:i}=t,{transferStreams:r,useWebWorkers:s,useCompressionStream:a,codecType:o,compressed:c,signed:l,encrypted:d}=n,{workerScripts:f,maxWorkers:u,terminateWorkerTimeout:m}=i;t.transferStreams=r||r===Me;const p=!(c||l||d||t.transferStreams);let h;t.useWebWorkers=!p&&(s||s===Me&&i.useWebWorkers),t.scripts=t.useWebWorkers&&f?f[o]:[],n.useCompressionStream=a||a===Me&&i.useCompressionStream;const w=Sn.find((e=>!e.busy));if(w)Un(w),h=new wn(w,e,t,x);else if(Sn.lengthCn.push({resolve:n,stream:e,workerOptions:t})));return h.run();function x(e){if(Cn.length){const[{resolve:t,stream:n,workerOptions:i}]=Cn.splice(0,1);t(new wn(e,n,i,x))}else e.worker?(Un(e),Number.isFinite(m)&&m>=0&&(e.terminateTimeout=setTimeout((()=>{Sn=Sn.filter((t=>t!=e)),e.terminate()}),m))):Sn=Sn.filter((t=>t!=e))}}({readable:y,writable:S},W))}catch(e){if(!z||e.message!=ut)throw e}finally{const e=bi(i,n,"preventClose");S.size+=j,e||S.locked||await S.close()}return z?void 0:e.getData?e.getData():S}}function wi(e,t,n){const i=e.rawBitFlag=ki(t,n+2),r=1==(1&i),s=zi(t,n+6);Object.assign(e,{encrypted:r,version:ki(t,n),bitFlag:{level:(6&i)>>1,dataDescriptor:8==(8&i),languageEncodingFlag:2048==(2048&i)},rawLastModDate:s,lastModDate:vi(s),filenameLength:ki(t,n+22),extraFieldLength:ki(t,n+24)})}async function xi(e,t,n,i){const{rawExtraField:r}=t,s=t.extraField=new Map,a=Ci(new Uint8Array(r));let o=0;try{for(;ot[e]==n));for(let r=0,s=0;r{if(e.data.length>=a+4){const o=zi(n,a);t[i]=e[i]=new Date(1e3*o);const c=s[r];e[c]=o}a+=4}))}(p,t),t.extraFieldExtendedTimestamp=p)}async function gi(e,t,n,i,r){const s=Ci(e.data),a=new et;a.append(r[n]);const o=Ci(new Uint8Array(4));o.setUint32(0,a.get(),!0),Object.assign(e,{version:_i(s,0),signature:zi(s,1),[t]:await Mn(e.data.subarray(5)),valid:!r.bitFlag.languageEncodingFlag&&e.signature==zi(o,0)}),e.valid&&(i[t]=e[t],i[t+"UTF8"]=!0)}function bi(e,t,n){return t[n]===Me?e.options[n]:t[n]}function vi(e){const t=(4294901760&e)>>16,n=65535&e;try{return new Date(1980+((65024&t)>>9),((480&t)>>5)-1,31&t,(63488&n)>>11,(2016&n)>>5,2*(31&n),0)}catch(e){}}function yi(e){return new Date(Number(e/BigInt(1e4)-BigInt(116444736e5)))}function _i(e,t){return e.getUint8(t)}function ki(e,t){return e.getUint16(t,!0)}function zi(e,t){return e.getUint32(t,!0)}function Si(e,t){return Number(e.getBigUint64(t,!0))}function Ci(e){return new DataView(e.buffer)}let Ai;try{Ai=import.meta.url}catch(e){}function Ui(e,t){return e<0?Math.max(e+t,0):Math.min(e,t)}Ze({baseURL:Ai}),function(e){const t=()=>URL.createObjectURL(new Blob(['const{Array:e,Object:t,Number:n,Math:r,Error:s,Uint8Array:i,Uint16Array:o,Uint32Array:c,Int32Array:f,Map:a,DataView:l,Promise:u,TextEncoder:w,crypto:h,postMessage:d,TransformStream:p,ReadableStream:y,WritableStream:m,CompressionStream:b,DecompressionStream:g}=self;class k{constructor(e){return class extends p{constructor(t,n){const r=new e(n);super({transform(e,t){t.enqueue(r.append(e))},flush(e){const t=r.flush();t&&e.enqueue(t)}})}}}}const v=[];for(let e=0;256>e;e++){let t=e;for(let e=0;8>e;e++)1&t?t=t>>>1^3988292384:t>>>=1;v[e]=t}class S{constructor(e){this.t=e||-1}append(e){let t=0|this.t;for(let n=0,r=0|e.length;r>n;n++)t=t>>>8^v[255&(t^e[n])];this.t=t}get(){return~this.t}}class z extends p{constructor(){const e=new S;super({transform(t){e.append(t)},flush(t){const n=new i(4);new l(n.buffer).setUint32(0,e.get()),t.enqueue(n)}})}}const C={concat(e,t){if(0===e.length||0===t.length)return e.concat(t);const n=e[e.length-1],r=C.i(n);return 32===r?e.concat(t):C.o(t,r,0|n,e.slice(0,e.length-1))},l(e){const t=e.length;if(0===t)return 0;const n=e[t-1];return 32*(t-1)+C.i(n)},u(e,t){if(32*e.length0&&t&&(e[n-1]=C.h(t,e[n-1]&2147483648>>t-1,1)),e},h:(e,t,n)=>32===e?t:(n?0|t:t<<32-e)+1099511627776*e,i:e=>r.round(e/1099511627776)||32,o(e,t,n,r){for(void 0===r&&(r=[]);t>=32;t-=32)r.push(n),n=0;if(0===t)return r.concat(e);for(let s=0;s>>t),n=e[s]<<32-t;const s=e.length?e[e.length-1]:0,i=C.i(s);return r.push(C.h(t+i&31,t+i>32?n:r.pop(),1)),r}},x={p:{m(e){const t=C.l(e)/8,n=new i(t);let r;for(let s=0;t>s;s++)0==(3&s)&&(r=e[s/4]),n[s]=r>>>24,r<<=8;return n},g(e){const t=[];let n,r=0;for(n=0;n9007199254740991)throw new s("Cannot hash more than 2^53 - 1 bits");const o=new c(n);let f=0;for(let e=t.blockSize+r-(t.blockSize+r&t.blockSize-1);i>=e;e+=t.blockSize)t.I(o.subarray(16*f,16*(f+1))),f+=1;return n.splice(0,16*f),t}D(){const e=this;let t=e.C;const n=e.S;t=C.concat(t,[C.h(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(r.floor(e._/4294967296)),t.push(0|e._);t.length;)e.I(t.splice(0,16));return e.reset(),n}V(e,t,n,r){return e>19?e>39?e>59?e>79?void 0:t^n^r:t&n|t&r|n&r:t^n^r:t&n|~t&r}P(e,t){return t<>>32-e}I(t){const n=this,s=n.S,i=e(80);for(let e=0;16>e;e++)i[e]=t[e];let o=s[0],c=s[1],f=s[2],a=s[3],l=s[4];for(let e=0;79>=e;e++){16>e||(i[e]=n.P(1,i[e-3]^i[e-8]^i[e-14]^i[e-16]));const t=n.P(5,o)+n.V(e,c,f,a)+l+i[e]+n.v[r.floor(e/20)]|0;l=a,a=f,f=n.P(30,c),c=o,o=t}s[0]=s[0]+o|0,s[1]=s[1]+c|0,s[2]=s[2]+f|0,s[3]=s[3]+a|0,s[4]=s[4]+l|0}},A={getRandomValues(e){const t=new c(e.buffer),n=e=>{let t=987654321;const n=4294967295;return()=>(t=36969*(65535&t)+(t>>16)&n,(((t<<16)+(e=18e3*(65535&e)+(e>>16)&n)&n)/4294967296+.5)*(r.random()>.5?1:-1))};for(let s,i=0;inew I.R(x.p.g(e)),B(e,t,n,r){if(n=n||1e4,0>r||0>n)throw new s("invalid params to pbkdf2");const i=1+(r>>5)<<2;let o,c,f,a,u;const w=new ArrayBuffer(i),h=new l(w);let d=0;const p=C;for(t=x.p.g(t),u=1;(i||1)>d;u++){for(o=c=e.encrypt(p.concat(t,[u])),f=1;n>f;f++)for(c=e.encrypt(c),a=0;ad&&fs&&(e=(new n).update(e).D());for(let t=0;s>t;t++)r[0][t]=909522486^e[t],r[1][t]=1549556828^e[t];t.K[0].update(r[0]),t.K[1].update(r[1]),t.U=new n(t.K[0])}reset(){const e=this;e.U=new e.M(e.K[0]),e.N=!1}update(e){this.N=!0,this.U.update(e)}digest(){const e=this,t=e.U.D(),n=new e.M(e.K[1]).update(t).D();return e.reset(),n}encrypt(e){if(this.N)throw new s("encrypt on already updated hmac called!");return this.update(e),this.digest(e)}}},D=void 0!==h&&"function"==typeof h.getRandomValues,V="Invalid password",P="Invalid signature",R="zipjs-abort-check-password";function B(e){return D?h.getRandomValues(e):A.getRandomValues(e)}const E=16,M={name:"PBKDF2"},K=t.assign({hash:{name:"HMAC"}},M),U=t.assign({iterations:1e3,hash:{name:"SHA-1"}},M),N=["deriveBits"],O=[8,12,16],T=[16,24,32],W=10,j=[0,0,0,0],H="undefined",L="function",F=typeof h!=H,q=F&&h.subtle,G=F&&typeof q!=H,J=x.p,Q=class{constructor(e){const t=this;t.O=[[[],[],[],[],[]],[[],[],[],[],[]]],t.O[0][0][0]||t.T();const n=t.O[0][4],r=t.O[1],i=e.length;let o,c,f,a=1;if(4!==i&&6!==i&&8!==i)throw new s("invalid aes key size");for(t.v=[c=e.slice(0),f=[]],o=i;4*i+28>o;o++){let e=c[o-1];(o%i==0||8===i&&o%i==4)&&(e=n[e>>>24]<<24^n[e>>16&255]<<16^n[e>>8&255]<<8^n[255&e],o%i==0&&(e=e<<8^e>>>24^a<<24,a=a<<1^283*(a>>7))),c[o]=c[o-i]^e}for(let e=0;o;e++,o--){const t=c[3&e?o:o-4];f[e]=4>=o||4>e?t:r[0][n[t>>>24]]^r[1][n[t>>16&255]]^r[2][n[t>>8&255]]^r[3][n[255&t]]}}encrypt(e){return this.W(e,0)}decrypt(e){return this.W(e,1)}T(){const e=this.O[0],t=this.O[1],n=e[4],r=t[4],s=[],i=[];let o,c,f,a;for(let e=0;256>e;e++)i[(s[e]=e<<1^283*(e>>7))^e]=e;for(let l=o=0;!n[l];l^=c||1,o=i[o]||1){let i=o^o<<1^o<<2^o<<3^o<<4;i=i>>8^255&i^99,n[l]=i,r[i]=l,a=s[f=s[c=s[l]]];let u=16843009*a^65537*f^257*c^16843008*l,w=257*s[i]^16843008*i;for(let n=0;4>n;n++)e[n][l]=w=w<<24^w>>>8,t[n][i]=u=u<<24^u>>>8}for(let n=0;5>n;n++)e[n]=e[n].slice(0),t[n]=t[n].slice(0)}W(e,t){if(4!==e.length)throw new s("invalid aes block size");const n=this.v[t],r=n.length/4-2,i=[0,0,0,0],o=this.O[t],c=o[0],f=o[1],a=o[2],l=o[3],u=o[4];let w,h,d,p=e[0]^n[0],y=e[t?3:1]^n[1],m=e[2]^n[2],b=e[t?1:3]^n[3],g=4;for(let e=0;r>e;e++)w=c[p>>>24]^f[y>>16&255]^a[m>>8&255]^l[255&b]^n[g],h=c[y>>>24]^f[m>>16&255]^a[b>>8&255]^l[255&p]^n[g+1],d=c[m>>>24]^f[b>>16&255]^a[p>>8&255]^l[255&y]^n[g+2],b=c[b>>>24]^f[p>>16&255]^a[y>>8&255]^l[255&m]^n[g+3],g+=4,p=w,y=h,m=d;for(let e=0;4>e;e++)i[t?3&-e:e]=u[p>>>24]<<24^u[y>>16&255]<<16^u[m>>8&255]<<8^u[255&b]^n[g++],w=p,p=y,y=m,m=b,b=w;return i}},X=class{constructor(e,t){this.j=e,this.H=t,this.L=t}reset(){this.L=this.H}update(e){return this.F(this.j,e,this.L)}q(e){if(255==(e>>24&255)){let t=e>>16&255,n=e>>8&255,r=255&e;255===t?(t=0,255===n?(n=0,255===r?r=0:++r):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=r}else e+=1<<24;return e}G(e){0===(e[0]=this.q(e[0]))&&(e[1]=this.q(e[1]))}F(e,t,n){let r;if(!(r=t.length))return[];const s=C.l(t);for(let s=0;r>s;s+=4){this.G(n);const r=e.encrypt(n);t[s]^=r[0],t[s+1]^=r[1],t[s+2]^=r[2],t[s+3]^=r[3]}return C.u(t,s)}},Y=I.R;let Z=F&&G&&typeof q.importKey==L,$=F&&G&&typeof q.deriveBits==L;class ee extends p{constructor({password:e,signed:n,encryptionStrength:r,checkPasswordOnly:o}){super({start(){t.assign(this,{ready:new u((e=>this.J=e)),password:e,signed:n,X:r-1,pending:new i})},async transform(e,t){const n=this,{password:r,X:c,J:f,ready:a}=n;r?(await(async(e,t,n,r)=>{const i=await re(e,t,n,ie(r,0,O[t])),o=ie(r,O[t]);if(i[0]!=o[0]||i[1]!=o[1])throw new s(V)})(n,c,r,ie(e,0,O[c]+2)),e=ie(e,O[c]+2),o?t.error(new s(R)):f()):await a;const l=new i(e.length-W-(e.length-W)%E);t.enqueue(ne(n,e,l,0,W,!0))},async flush(e){const{signed:t,Y:n,Z:r,pending:o,ready:c}=this;await c;const f=ie(o,0,o.length-W),a=ie(o,o.length-W);let l=new i;if(f.length){const e=ce(J,f);r.update(e);const t=n.update(e);l=oe(J,t)}if(t){const e=ie(oe(J,r.digest()),0,W);for(let t=0;W>t;t++)if(e[t]!=a[t])throw new s(P)}e.enqueue(l)}})}}class te extends p{constructor({password:e,encryptionStrength:n}){let r;super({start(){t.assign(this,{ready:new u((e=>this.J=e)),password:e,X:n-1,pending:new i})},async transform(e,t){const n=this,{password:r,X:s,J:o,ready:c}=n;let f=new i;r?(f=await(async(e,t,n)=>{const r=B(new i(O[t]));return se(r,await re(e,t,n,r))})(n,s,r),o()):await c;const a=new i(f.length+e.length-e.length%E);a.set(f,0),t.enqueue(ne(n,e,a,f.length,0))},async flush(e){const{Y:t,Z:n,pending:s,ready:o}=this;await o;let c=new i;if(s.length){const e=t.update(ce(J,s));n.update(e),c=oe(J,e)}r.signature=oe(J,n.digest()).slice(0,W),e.enqueue(se(c,r.signature))}}),r=this}}function ne(e,t,n,r,s,o){const{Y:c,Z:f,pending:a}=e,l=t.length-s;let u;for(a.length&&(t=se(a,t),n=((e,t)=>{if(t&&t>e.length){const n=e;(e=new i(t)).set(n,0)}return e})(n,l-l%E)),u=0;l-E>=u;u+=E){const e=ce(J,ie(t,u,u+E));o&&f.update(e);const s=c.update(e);o||f.update(s),n.set(oe(J,s),u+r)}return e.pending=ie(t,u),n}async function re(n,r,s,o){n.password=null;const c=(e=>{if(void 0===w){const t=new i((e=unescape(encodeURIComponent(e))).length);for(let n=0;n{if(!Z)return I.importKey(t);try{return await q.importKey("raw",t,n,!1,s)}catch(e){return Z=!1,I.importKey(t)}})(0,c,K,0,N),a=await(async(e,t,n)=>{if(!$)return I.B(t,e.salt,U.iterations,n);try{return await q.deriveBits(e,t,n)}catch(r){return $=!1,I.B(t,e.salt,U.iterations,n)}})(t.assign({salt:o},U),f,8*(2*T[r]+2)),l=new i(a),u=ce(J,ie(l,0,T[r])),h=ce(J,ie(l,T[r],2*T[r])),d=ie(l,2*T[r]);return t.assign(n,{keys:{key:u,$:h,passwordVerification:d},Y:new X(new Q(u),e.from(j)),Z:new Y(h)}),d}function se(e,t){let n=e;return e.length+t.length&&(n=new i(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function ie(e,t,n){return e.subarray(t,n)}function oe(e,t){return e.m(t)}function ce(e,t){return e.g(t)}class fe extends p{constructor({password:e,passwordVerification:n,checkPasswordOnly:r}){super({start(){t.assign(this,{password:e,passwordVerification:n}),we(this,e)},transform(e,t){const n=this;if(n.password){const t=le(n,e.subarray(0,12));if(n.password=null,t[11]!=n.passwordVerification)throw new s(V);e=e.subarray(12)}r?t.error(new s(R)):t.enqueue(le(n,e))}})}}class ae extends p{constructor({password:e,passwordVerification:n}){super({start(){t.assign(this,{password:e,passwordVerification:n}),we(this,e)},transform(e,t){const n=this;let r,s;if(n.password){n.password=null;const t=B(new i(12));t[11]=n.passwordVerification,r=new i(e.length+t.length),r.set(ue(n,t),0),s=12}else r=new i(e.length),s=0;r.set(ue(n,e),s),t.enqueue(r)}})}}function le(e,t){const n=new i(t.length);for(let r=0;r>>24]),i=~e.te.get(),e.keys=[n,s,i]}function de(e){const t=2|e.keys[2];return pe(r.imul(t,1^t)>>>8)}function pe(e){return 255&e}function ye(e){return 4294967295&e}const me="deflate-raw";class be extends p{constructor(e,{chunkSize:t,CompressionStream:n,CompressionStreamNative:r}){super({});const{compressed:s,encrypted:i,useCompressionStream:o,zipCrypto:c,signed:f,level:a}=e,u=this;let w,h,d=ke(super.readable);i&&!c||!f||([d,w]=d.tee(),w=ze(w,new z)),s&&(d=Se(d,o,{level:a,chunkSize:t},r,n)),i&&(c?d=ze(d,new ae(e)):(h=new te(e),d=ze(d,h))),ve(u,d,(async()=>{let e;i&&!c&&(e=h.signature),i&&!c||!f||(e=await w.getReader().read(),e=new l(e.value.buffer).getUint32(0)),u.signature=e}))}}class ge extends p{constructor(e,{chunkSize:t,DecompressionStream:n,DecompressionStreamNative:r}){super({});const{zipCrypto:i,encrypted:o,signed:c,signature:f,compressed:a,useCompressionStream:u}=e;let w,h,d=ke(super.readable);o&&(i?d=ze(d,new fe(e)):(h=new ee(e),d=ze(d,h))),a&&(d=Se(d,u,{chunkSize:t},r,n)),o&&!i||!c||([d,w]=d.tee(),w=ze(w,new z)),ve(this,d,(async()=>{if((!o||i)&&c){const e=await w.getReader().read(),t=new l(e.value.buffer);if(f!=t.getUint32(0,!1))throw new s(P)}}))}}function ke(e){return ze(e,new p({transform(e,t){e&&e.length&&t.enqueue(e)}}))}function ve(e,n,r){n=ze(n,new p({flush:r})),t.defineProperty(e,"readable",{get:()=>n})}function Se(e,t,n,r,s){try{e=ze(e,new(t&&r?r:s)(me,n))}catch(r){if(!t)throw r;e=ze(e,new s(me,n))}return e}function ze(e,t){return e.pipeThrough(t)}const Ce="data";class xe extends p{constructor(e,n){super({});const r=this,{codecType:s}=e;let i;s.startsWith("deflate")?i=be:s.startsWith("inflate")&&(i=ge);let o=0;const c=new i(e,n),f=super.readable,a=new p({transform(e,t){e&&e.length&&(o+=e.length,t.enqueue(e))},flush(){const{signature:e}=c;t.assign(r,{signature:e,size:o})}});t.defineProperty(r,"readable",{get:()=>f.pipeThrough(c).pipeThrough(a)})}}const _e=new a,Ae=new a;let Ie=0;async function De(e){try{const{options:t,scripts:r,config:s}=e;r&&r.length&&importScripts.apply(void 0,r),self.initCodec&&self.initCodec(),s.CompressionStreamNative=self.CompressionStream,s.DecompressionStreamNative=self.DecompressionStream,self.Deflate&&(s.CompressionStream=new k(self.Deflate)),self.Inflate&&(s.DecompressionStream=new k(self.Inflate));const i={highWaterMark:1,size:()=>s.chunkSize},o=e.readable||new y({async pull(e){const t=new u((e=>_e.set(Ie,e)));Ve({type:"pull",messageId:Ie}),Ie=(Ie+1)%n.MAX_SAFE_INTEGER;const{value:r,done:s}=await t;e.enqueue(r),s&&e.close()}},i),c=e.writable||new m({async write(e){let t;const r=new u((e=>t=e));Ae.set(Ie,t),Ve({type:Ce,value:e,messageId:Ie}),Ie=(Ie+1)%n.MAX_SAFE_INTEGER,await r}},i),f=new xe(t,s);await o.pipeThrough(f).pipeTo(c,{preventClose:!0,preventAbort:!0});try{await c.close()}catch(e){}const{signature:a,size:l}=f;Ve({type:"close",result:{signature:a,size:l}})}catch(e){Pe(e)}}function Ve(e){let{value:t}=e;if(t)if(t.length)try{t=new i(t),e.value=t.buffer,d(e,[e.value])}catch(t){d(e)}else d(e);else d(e)}function Pe(e){const{message:t,stack:n,code:r,name:s}=e;d({error:{message:t,stack:n,code:r,name:s}})}addEventListener("message",(({data:e})=>{const{type:t,messageId:n,value:r,done:s}=e;try{if("start"==t&&De(e),t==Ce){const e=_e.get(n);_e.delete(n),e({value:new i(r),done:s})}if("ack"==t){const e=Ae.get(n);Ae.delete(n),e()}}catch(e){Pe(e)}}));const Re=-2;function Be(t){return Ee(t.map((([t,n])=>new e(t).fill(n,0,t))))}function Ee(t){return t.reduce(((t,n)=>t.concat(e.isArray(n)?Ee(n):n)),[])}const Me=[0,1,2,3].concat(...Be([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function Ke(){const e=this;function t(e,t){let n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1}e.ne=n=>{const s=e.re,i=e.ie.se,o=e.ie.oe;let c,f,a,l=-1;for(n.ce=0,n.fe=573,c=0;o>c;c++)0!==s[2*c]?(n.ae[++n.ce]=l=c,n.le[c]=0):s[2*c+1]=0;for(;2>n.ce;)a=n.ae[++n.ce]=2>l?++l:0,s[2*a]=1,n.le[a]=0,n.ue--,i&&(n.we-=i[2*a+1]);for(e.he=l,c=r.floor(n.ce/2);c>=1;c--)n.de(s,c);a=o;do{c=n.ae[1],n.ae[1]=n.ae[n.ce--],n.de(s,1),f=n.ae[1],n.ae[--n.fe]=c,n.ae[--n.fe]=f,s[2*a]=s[2*c]+s[2*f],n.le[a]=r.max(n.le[c],n.le[f])+1,s[2*c+1]=s[2*f+1]=a,n.ae[1]=a++,n.de(s,1)}while(n.ce>=2);n.ae[--n.fe]=n.ae[1],(t=>{const n=e.re,r=e.ie.se,s=e.ie.pe,i=e.ie.ye,o=e.ie.me;let c,f,a,l,u,w,h=0;for(l=0;15>=l;l++)t.be[l]=0;for(n[2*t.ae[t.fe]+1]=0,c=t.fe+1;573>c;c++)f=t.ae[c],l=n[2*n[2*f+1]+1]+1,l>o&&(l=o,h++),n[2*f+1]=l,f>e.he||(t.be[l]++,u=0,i>f||(u=s[f-i]),w=n[2*f],t.ue+=w*(l+u),r&&(t.we+=w*(r[2*f+1]+u)));if(0!==h){do{for(l=o-1;0===t.be[l];)l--;t.be[l]--,t.be[l+1]+=2,t.be[o]--,h-=2}while(h>0);for(l=o;0!==l;l--)for(f=t.be[l];0!==f;)a=t.ae[--c],a>e.he||(n[2*a+1]!=l&&(t.ue+=(l-n[2*a+1])*n[2*a],n[2*a+1]=l),f--)}})(n),((e,n,r)=>{const s=[];let i,o,c,f=0;for(i=1;15>=i;i++)s[i]=f=f+r[i-1]<<1;for(o=0;n>=o;o++)c=e[2*o+1],0!==c&&(e[2*o]=t(s[c]++,c))})(s,e.he,n.be)}}function Ue(e,t,n,r,s){const i=this;i.se=e,i.pe=t,i.ye=n,i.oe=r,i.me=s}Ke.ge=[0,1,2,3,4,5,6,7].concat(...Be([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]])),Ke.ke=[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],Ke.ve=[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],Ke.Se=e=>256>e?Me[e]:Me[256+(e>>>7)],Ke.ze=[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],Ke.Ce=[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],Ke.xe=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],Ke._e=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];const Ne=Be([[144,8],[112,9],[24,7],[8,8]]);Ue.Ae=Ee([12,140,76,204,44,172,108,236,28,156,92,220,60,188,124,252,2,130,66,194,34,162,98,226,18,146,82,210,50,178,114,242,10,138,74,202,42,170,106,234,26,154,90,218,58,186,122,250,6,134,70,198,38,166,102,230,22,150,86,214,54,182,118,246,14,142,78,206,46,174,110,238,30,158,94,222,62,190,126,254,1,129,65,193,33,161,97,225,17,145,81,209,49,177,113,241,9,137,73,201,41,169,105,233,25,153,89,217,57,185,121,249,5,133,69,197,37,165,101,229,21,149,85,213,53,181,117,245,13,141,77,205,45,173,109,237,29,157,93,221,61,189,125,253,19,275,147,403,83,339,211,467,51,307,179,435,115,371,243,499,11,267,139,395,75,331,203,459,43,299,171,427,107,363,235,491,27,283,155,411,91,347,219,475,59,315,187,443,123,379,251,507,7,263,135,391,71,327,199,455,39,295,167,423,103,359,231,487,23,279,151,407,87,343,215,471,55,311,183,439,119,375,247,503,15,271,143,399,79,335,207,463,47,303,175,431,111,367,239,495,31,287,159,415,95,351,223,479,63,319,191,447,127,383,255,511,0,64,32,96,16,80,48,112,8,72,40,104,24,88,56,120,4,68,36,100,20,84,52,116,3,131,67,195,35,163,99,227].map(((e,t)=>[e,Ne[t]])));const Oe=Be([[30,5]]);function Te(e,t,n,r,s){const i=this;i.Ie=e,i.De=t,i.Ve=n,i.Pe=r,i.Re=s}Ue.Be=Ee([0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30,1,17,9,25,5,21,13,29,3,19,11,27,7,23].map(((e,t)=>[e,Oe[t]]))),Ue.Ee=new Ue(Ue.Ae,Ke.ze,257,286,15),Ue.Me=new Ue(Ue.Be,Ke.Ce,0,30,15),Ue.Ke=new Ue(null,Ke.xe,0,19,7);const We=[new Te(0,0,0,0,0),new Te(4,4,8,4,1),new Te(4,5,16,8,1),new Te(4,6,32,32,1),new Te(4,4,16,16,2),new Te(8,16,32,32,2),new Te(8,16,128,128,2),new Te(8,32,128,256,2),new Te(32,128,258,1024,2),new Te(32,258,258,4096,2)],je=["need dictionary","stream end","","","stream error","data error","","buffer error","",""],He=113,Le=666,Fe=262;function qe(e,t,n,r){const s=e[2*t],i=e[2*n];return i>s||s==i&&r[t]<=r[n]}function Ge(){const e=this;let t,n,s,c,f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z,C,x,_,A,I,D,V,P,R,B,E,M,K;const U=new Ke,N=new Ke,O=new Ke;let T,W,j,H,L,F;function q(){let t;for(t=0;286>t;t++)E[2*t]=0;for(t=0;30>t;t++)M[2*t]=0;for(t=0;19>t;t++)K[2*t]=0;E[512]=1,e.ue=e.we=0,W=j=0}function G(e,t){let n,r=-1,s=e[1],i=0,o=7,c=4;0===s&&(o=138,c=3),e[2*(t+1)+1]=65535;for(let f=0;t>=f;f++)n=s,s=e[2*(f+1)+1],++ii?K[2*n]+=i:0!==n?(n!=r&&K[2*n]++,K[32]++):i>10?K[36]++:K[34]++,i=0,r=n,0===s?(o=138,c=3):n==s?(o=6,c=3):(o=7,c=4))}function J(t){e.Ue[e.pending++]=t}function Q(e){J(255&e),J(e>>>8&255)}function X(e,t){let n;const r=t;F>16-r?(n=e,L|=n<>>16-F,F+=r-16):(L|=e<=n;n++)if(r=i,i=e[2*(n+1)+1],++o>=c||r!=i){if(f>o)do{Y(r,K)}while(0!=--o);else 0!==r?(r!=s&&(Y(r,K),o--),Y(16,K),X(o-3,2)):o>10?(Y(18,K),X(o-11,7)):(Y(17,K),X(o-3,3));o=0,s=r,0===i?(c=138,f=3):r==i?(c=6,f=3):(c=7,f=4)}}function $(){16==F?(Q(L),L=0,F=0):8>F||(J(255&L),L>>>=8,F-=8)}function ee(t,n){let s,i,o;if(e.Ne[W]=t,e.Oe[W]=255&n,W++,0===t?E[2*n]++:(j++,t--,E[2*(Ke.ge[n]+256+1)]++,M[2*Ke.Se(t)]++),0==(8191&W)&&V>2){for(s=8*W,i=C-k,o=0;30>o;o++)s+=M[2*o]*(5+Ke.Ce[o]);if(s>>>=3,jc);Y(256,t),H=t[513]}function ne(){F>8?Q(L):F>0&&J(255&L),L=0,F=0}function re(t,n,r){X(0+(r?1:0),3),((t,n)=>{ne(),H=8,Q(n),Q(~n),e.Ue.set(u.subarray(t,t+n),e.pending),e.pending+=n})(t,n)}function se(n){((t,n,r)=>{let s,i,o=0;V>0?(U.ne(e),N.ne(e),o=(()=>{let t;for(G(E,U.he),G(M,N.he),O.ne(e),t=18;t>=3&&0===K[2*Ke._e[t]+1];t--);return e.ue+=14+3*(t+1),t})(),s=e.ue+3+7>>>3,i=e.we+3+7>>>3,i>s||(s=i)):s=i=n+5,n+4>s||-1==t?i==s?(X(2+(r?1:0),3),te(Ue.Ae,Ue.Be)):(X(4+(r?1:0),3),((e,t,n)=>{let r;for(X(e-257,5),X(t-1,5),X(n-4,4),r=0;n>r;r++)X(K[2*Ke._e[r]+1],3);Z(E,e-1),Z(M,t-1)})(U.he+1,N.he+1,o+1),te(E,M)):re(t,n,r),q(),r&&ne()})(0>k?-1:k,C-k,n),k=C,t.Te()}function ie(){let e,n,r,s;do{if(s=w-_-C,0===s&&0===C&&0===_)s=f;else if(-1==s)s--;else if(C>=f+f-Fe){u.set(u.subarray(f,f+f),0),x-=f,C-=f,k-=f,e=y,r=e;do{n=65535&d[--r],d[r]=f>n?0:n-f}while(0!=--e);e=f,r=e;do{n=65535&h[--r],h[r]=f>n?0:n-f}while(0!=--e);s+=f}if(0===t.We)return;e=t.je(u,C+_,s),_+=e,3>_||(p=255&u[C],p=(p<_&&0!==t.We)}function oe(e){let t,n,r=I,s=C,i=A;const o=C>f-Fe?C-(f-Fe):0;let c=B;const a=l,w=C+258;let d=u[s+i-1],p=u[s+i];R>A||(r>>=2),c>_&&(c=_);do{if(t=e,u[t+i]==p&&u[t+i-1]==d&&u[t]==u[s]&&u[++t]==u[s+1]){s+=2,t++;do{}while(u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&w>s);if(n=258-(w-s),s=w-258,n>i){if(x=e,i=n,n>=c)break;d=u[s+i-1],p=u[s+i]}}}while((e=65535&h[e&a])>o&&0!=--r);return i>_?_:i}e.le=[],e.be=[],e.ae=[],E=[],M=[],K=[],e.de=(t,n)=>{const r=e.ae,s=r[n];let i=n<<1;for(;i<=e.ce&&(i(W||(W=8),j||(j=8),G||(G=0),t.Le=null,-1==S&&(S=6),1>j||j>9||8!=W||9>x||x>15||0>S||S>9||0>G||G>2?Re:(t.Fe=e,a=x,f=1<(t.qe=t.Ge=0,t.Le=null,e.pending=0,e.Je=0,n=He,c=0,U.re=E,U.ie=Ue.Ee,N.re=M,N.ie=Ue.Me,O.re=K,O.ie=Ue.Ke,L=0,F=0,H=8,q(),(()=>{w=2*f,d[y-1]=0;for(let e=0;y-1>e;e++)d[e]=0;D=We[V].De,R=We[V].Ie,B=We[V].Ve,I=We[V].Pe,C=0,k=0,_=0,v=A=2,z=0,p=0})(),0))(t))),e.Qe=()=>42!=n&&n!=He&&n!=Le?Re:(e.Oe=null,e.Ne=null,e.Ue=null,d=null,h=null,u=null,e.Fe=null,n==He?-3:0),e.Xe=(e,t,n)=>{let r=0;return-1==t&&(t=6),0>t||t>9||0>n||n>2?Re:(We[V].Re!=We[t].Re&&0!==e.qe&&(r=e.Ye(1)),V!=t&&(V=t,D=We[V].De,R=We[V].Ie,B=We[V].Ve,I=We[V].Pe),P=n,r)},e.Ze=(e,t,r)=>{let s,i=r,o=0;if(!t||42!=n)return Re;if(3>i)return 0;for(i>f-Fe&&(i=f-Fe,o=r-i),u.set(t.subarray(o,o+i),0),C=i,k=i,p=255&u[0],p=(p<=s;s++)p=(p<{let o,w,m,I,R;if(i>4||0>i)return Re;if(!r.$e||!r.et&&0!==r.We||n==Le&&4!=i)return r.Le=je[4],Re;if(0===r.tt)return r.Le=je[7],-5;var B;if(t=r,I=c,c=i,42==n&&(w=8+(a-8<<4)<<8,m=(V-1&255)>>1,m>3&&(m=3),w|=m<<6,0!==C&&(w|=32),w+=31-w%31,n=He,J((B=w)>>8&255),J(255&B)),0!==e.pending){if(t.Te(),0===t.tt)return c=-1,0}else if(0===t.We&&I>=i&&4!=i)return t.Le=je[7],-5;if(n==Le&&0!==t.We)return r.Le=je[7],-5;if(0!==t.We||0!==_||0!=i&&n!=Le){switch(R=-1,We[V].Re){case 0:R=(e=>{let n,r=65535;for(r>s-5&&(r=s-5);;){if(1>=_){if(ie(),0===_&&0==e)return 0;if(0===_)break}if(C+=_,_=0,n=k+r,(0===C||C>=n)&&(_=C-n,C=n,se(!1),0===t.tt))return 0;if(C-k>=f-Fe&&(se(!1),0===t.tt))return 0}return se(4==e),0===t.tt?4==e?2:0:4==e?3:1})(i);break;case 1:R=(e=>{let n,r=0;for(;;){if(Fe>_){if(ie(),Fe>_&&0==e)return 0;if(0===_)break}if(3>_||(p=(p<f-Fe||2!=P&&(v=oe(r)),3>v)n=ee(0,255&u[C]),_--,C++;else if(n=ee(C-x,v-3),_-=v,v>D||3>_)C+=v,v=0,p=255&u[C],p=(p<{let n,r,s=0;for(;;){if(Fe>_){if(ie(),Fe>_&&0==e)return 0;if(0===_)break}if(3>_||(p=(p<A&&f-Fe>=(C-s&65535)&&(2!=P&&(v=oe(s)),5>=v&&(1==P||3==v&&C-x>4096)&&(v=2)),3>A||v>A)if(0!==z){if(n=ee(0,255&u[C-1]),n&&se(!1),C++,_--,0===t.tt)return 0}else z=1,C++,_--;else{r=C+_-3,n=ee(C-1-S,A-3),_-=A-1,A-=2;do{++C>r||(p=(p<1+H+10-F&&(X(2,3),Y(256,Ue.Ae),$()),H=7;else if(re(0,0,!1),3==i)for(o=0;y>o;o++)d[o]=0;if(t.Te(),0===t.tt)return c=-1,0}}return 4!=i?0:1}}function Je(){const e=this;e.nt=0,e.rt=0,e.We=0,e.qe=0,e.tt=0,e.Ge=0}function Qe(e){const t=new Je,n=(o=e&&e.chunkSize?e.chunkSize:65536)+5*(r.floor(o/16383)+1);var o;const c=new i(n);let f=e?e.level:-1;void 0===f&&(f=-1),t.He(f),t.$e=c,this.append=(e,r)=>{let o,f,a=0,l=0,u=0;const w=[];if(e.length){t.nt=0,t.et=e,t.We=e.length;do{if(t.rt=0,t.tt=n,o=t.Ye(0),0!=o)throw new s("deflating: "+t.Le);t.rt&&(t.rt==n?w.push(new i(c)):w.push(c.slice(0,t.rt))),u+=t.rt,r&&t.nt>0&&t.nt!=a&&(r(t.nt),a=t.nt)}while(t.We>0||0===t.tt);return w.length>1?(f=new i(u),w.forEach((e=>{f.set(e,l),l+=e.length}))):f=w[0]||new i,f}},this.flush=()=>{let e,r,o=0,f=0;const a=[];do{if(t.rt=0,t.tt=n,e=t.Ye(4),1!=e&&0!=e)throw new s("deflating: "+t.Le);n-t.tt>0&&a.push(c.slice(0,t.rt)),f+=t.rt}while(t.We>0||0===t.tt);return t.Qe(),r=new i(f),a.forEach((e=>{r.set(e,o),o+=e.length})),r}}Je.prototype={He(e,t){const n=this;return n.Fe=new Ge,t||(t=15),n.Fe.He(n,e,t)},Ye(e){const t=this;return t.Fe?t.Fe.Ye(t,e):Re},Qe(){const e=this;if(!e.Fe)return Re;const t=e.Fe.Qe();return e.Fe=null,t},Xe(e,t){const n=this;return n.Fe?n.Fe.Xe(n,e,t):Re},Ze(e,t){const n=this;return n.Fe?n.Fe.Ze(n,e,t):Re},je(e,t,n){const r=this;let s=r.We;return s>n&&(s=n),0===s?0:(r.We-=s,e.set(r.et.subarray(r.nt,r.nt+s),t),r.nt+=s,r.qe+=s,s)},Te(){const e=this;let t=e.Fe.pending;t>e.tt&&(t=e.tt),0!==t&&(e.$e.set(e.Fe.Ue.subarray(e.Fe.Je,e.Fe.Je+t),e.rt),e.rt+=t,e.Fe.Je+=t,e.Ge+=t,e.tt-=t,e.Fe.pending-=t,0===e.Fe.pending&&(e.Fe.Je=0))}};const Xe=-2,Ye=-3,Ze=-5,$e=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],et=[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],tt=[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],nt=[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],rt=[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],st=[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],it=[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 ot(){let e,t,n,r,s,i;function o(e,t,o,c,f,a,l,u,w,h,d){let p,y,m,b,g,k,v,S,z,C,x,_,A,I,D;C=0,g=o;do{n[e[t+C]]++,C++,g--}while(0!==g);if(n[0]==o)return l[0]=-1,u[0]=0,0;for(S=u[0],k=1;15>=k&&0===n[k];k++);for(v=k,k>S&&(S=k),g=15;0!==g&&0===n[g];g--);for(m=g,S>g&&(S=g),u[0]=S,I=1<k;k++,I<<=1)if(0>(I-=n[k]))return Ye;if(0>(I-=n[g]))return Ye;for(n[g]+=I,i[1]=k=0,C=1,A=2;0!=--g;)i[A]=k+=n[C],A++,C++;g=0,C=0;do{0!==(k=e[t+C])&&(d[i[k]++]=g),C++}while(++g=v;v++)for(p=n[v];0!=p--;){for(;v>_+S;){if(b++,_+=S,D=m-_,D=D>S?S:D,(y=1<<(k=v-_))>p+1&&(y-=p+1,A=v,D>k))for(;++kn[++A];)y-=n[A];if(D=1<1440)return Ye;s[b]=x=h[0],h[0]+=D,0!==b?(i[b]=g,r[0]=k,r[1]=S,k=g>>>_-S,r[2]=x-s[b-1]-k,w.set(r,3*(s[b-1]+k))):l[0]=x}for(r[1]=v-_,o>C?d[C]d[C]?0:96,r[2]=d[C++]):(r[0]=a[d[C]-c]+16+64,r[2]=f[d[C++]-c]):r[0]=192,y=1<>>_;D>k;k+=y)w.set(r,3*(x+k));for(k=1<>>=1)g^=k;for(g^=k,z=(1<<_)-1;(g&z)!=i[b];)b--,_-=S,z=(1<<_)-1}return 0!==I&&1!=m?Ze:0}function c(o){let c;for(e||(e=[],t=[],n=new f(16),r=[],s=new f(15),i=new f(16)),t.lengthc;c++)t[c]=0;for(c=0;16>c;c++)n[c]=0;for(c=0;3>c;c++)r[c]=0;s.set(n.subarray(0,15),0),i.set(n.subarray(0,16),0)}this.st=(n,r,s,i,f)=>{let a;return c(19),e[0]=0,a=o(n,0,19,19,null,null,s,r,i,e,t),a==Ye?f.Le="oversubscribed dynamic bit lengths tree":a!=Ze&&0!==r[0]||(f.Le="incomplete dynamic bit lengths tree",a=Ye),a},this.it=(n,r,s,i,f,a,l,u,w)=>{let h;return c(288),e[0]=0,h=o(s,0,n,257,nt,rt,a,i,u,e,t),0!=h||0===i[0]?(h==Ye?w.Le="oversubscribed literal/length tree":-4!=h&&(w.Le="incomplete literal/length tree",h=Ye),h):(c(288),h=o(s,n,r,0,st,it,l,f,u,e,t),0!=h||0===f[0]&&n>257?(h==Ye?w.Le="oversubscribed distance tree":h==Ze?(w.Le="incomplete distance tree",h=Ye):-4!=h&&(w.Le="empty distance tree with lengths",h=Ye),h):0)}}function ct(){const e=this;let t,n,r,s,i=0,o=0,c=0,f=0,a=0,l=0,u=0,w=0,h=0,d=0;function p(e,t,n,r,s,i,o,c){let f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z;d=c.nt,p=c.We,w=o.ot,h=o.ct,y=o.write,m=yh;)p--,w|=(255&c.ft(d++))<>=a[z+1],h-=a[z+1],0!=(16&u)){for(u&=15,k=a[z+2]+(w&$e[u]),w>>=u,h-=u;15>h;)p--,w|=(255&c.ft(d++))<>=a[z+1],h-=a[z+1],0!=(16&u)){for(u&=15;u>h;)p--,w|=(255&c.ft(d++))<>=u,h-=u,m-=k,v>y){S=y-v;do{S+=o.end}while(0>S);if(u=o.end-S,k>u){if(k-=u,y-S>0&&u>y-S)do{o.lt[y++]=o.lt[S++]}while(0!=--u);else o.lt.set(o.lt.subarray(S,S+u),y),y+=u,S+=u,u=0;S=0}}else S=y-v,y-S>0&&2>y-S?(o.lt[y++]=o.lt[S++],o.lt[y++]=o.lt[S++],k-=2):(o.lt.set(o.lt.subarray(S,S+2),y),y+=2,S+=2,k-=2);if(y-S>0&&k>y-S)do{o.lt[y++]=o.lt[S++]}while(0!=--k);else o.lt.set(o.lt.subarray(S,S+k),y),y+=k,S+=k,k=0;break}if(0!=(64&u))return c.Le="invalid distance code",k=c.We-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ot=w,o.ct=h,c.We=p,c.qe+=d-c.nt,c.nt=d,o.write=y,Ye;f+=a[z+2],f+=w&$e[u],z=3*(l+f),u=a[z]}break}if(0!=(64&u))return 0!=(32&u)?(k=c.We-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ot=w,o.ct=h,c.We=p,c.qe+=d-c.nt,c.nt=d,o.write=y,1):(c.Le="invalid literal/length code",k=c.We-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ot=w,o.ct=h,c.We=p,c.qe+=d-c.nt,c.nt=d,o.write=y,Ye);if(f+=a[z+2],f+=w&$e[u],z=3*(l+f),0===(u=a[z])){w>>=a[z+1],h-=a[z+1],o.lt[y++]=a[z+2],m--;break}}else w>>=a[z+1],h-=a[z+1],o.lt[y++]=a[z+2],m--}while(m>=258&&p>=10);return k=c.We-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ot=w,o.ct=h,c.We=p,c.qe+=d-c.nt,c.nt=d,o.write=y,0}e.init=(e,i,o,c,f,a)=>{t=0,u=e,w=i,r=o,h=c,s=f,d=a,n=null},e.ut=(e,y,m)=>{let b,g,k,v,S,z,C,x=0,_=0,A=0;for(A=y.nt,v=y.We,x=e.ot,_=e.ct,S=e.write,z=S=258&&v>=10&&(e.ot=x,e.ct=_,y.We=v,y.qe+=A-y.nt,y.nt=A,e.write=S,m=p(u,w,r,h,s,d,e,y),A=y.nt,v=y.We,x=e.ot,_=e.ct,S=e.write,z=S_;){if(0===v)return e.ot=x,e.ct=_,y.We=v,y.qe+=A-y.nt,y.nt=A,e.write=S,e.wt(y,m);m=0,v--,x|=(255&y.ft(A++))<<_,_+=8}if(g=3*(o+(x&$e[b])),x>>>=n[g+1],_-=n[g+1],k=n[g],0===k){f=n[g+2],t=6;break}if(0!=(16&k)){a=15&k,i=n[g+2],t=2;break}if(0==(64&k)){c=k,o=g/3+n[g+2];break}if(0!=(32&k)){t=7;break}return t=9,y.Le="invalid literal/length code",m=Ye,e.ot=x,e.ct=_,y.We=v,y.qe+=A-y.nt,y.nt=A,e.write=S,e.wt(y,m);case 2:for(b=a;b>_;){if(0===v)return e.ot=x,e.ct=_,y.We=v,y.qe+=A-y.nt,y.nt=A,e.write=S,e.wt(y,m);m=0,v--,x|=(255&y.ft(A++))<<_,_+=8}i+=x&$e[b],x>>=b,_-=b,c=w,n=s,o=d,t=3;case 3:for(b=c;b>_;){if(0===v)return e.ot=x,e.ct=_,y.We=v,y.qe+=A-y.nt,y.nt=A,e.write=S,e.wt(y,m);m=0,v--,x|=(255&y.ft(A++))<<_,_+=8}if(g=3*(o+(x&$e[b])),x>>=n[g+1],_-=n[g+1],k=n[g],0!=(16&k)){a=15&k,l=n[g+2],t=4;break}if(0==(64&k)){c=k,o=g/3+n[g+2];break}return t=9,y.Le="invalid distance code",m=Ye,e.ot=x,e.ct=_,y.We=v,y.qe+=A-y.nt,y.nt=A,e.write=S,e.wt(y,m);case 4:for(b=a;b>_;){if(0===v)return e.ot=x,e.ct=_,y.We=v,y.qe+=A-y.nt,y.nt=A,e.write=S,e.wt(y,m);m=0,v--,x|=(255&y.ft(A++))<<_,_+=8}l+=x&$e[b],x>>=b,_-=b,t=5;case 5:for(C=S-l;0>C;)C+=e.end;for(;0!==i;){if(0===z&&(S==e.end&&0!==e.read&&(S=0,z=S7&&(_-=8,v++,A--),e.write=S,m=e.wt(y,m),S=e.write,z=S{}}ot.dt=(e,t,n,r)=>(e[0]=9,t[0]=5,n[0]=et,r[0]=tt,0);const ft=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function at(e,t){const n=this;let r,s=0,o=0,c=0,a=0;const l=[0],u=[0],w=new ct;let h=0,d=new f(4320);const p=new ot;n.ct=0,n.ot=0,n.lt=new i(t),n.end=t,n.read=0,n.write=0,n.reset=(e,t)=>{t&&(t[0]=0),6==s&&w.ht(e),s=0,n.ct=0,n.ot=0,n.read=n.write=0},n.reset(e,null),n.wt=(e,t)=>{let r,s,i;return s=e.rt,i=n.read,r=(i>n.write?n.end:n.write)-i,r>e.tt&&(r=e.tt),0!==r&&t==Ze&&(t=0),e.tt-=r,e.Ge+=r,e.$e.set(n.lt.subarray(i,i+r),s),s+=r,i+=r,i==n.end&&(i=0,n.write==n.end&&(n.write=0),r=n.write-i,r>e.tt&&(r=e.tt),0!==r&&t==Ze&&(t=0),e.tt-=r,e.Ge+=r,e.$e.set(n.lt.subarray(i,i+r),s),s+=r,i+=r),e.rt=s,n.read=i,t},n.ut=(e,t)=>{let i,f,y,m,b,g,k,v;for(m=e.nt,b=e.We,f=n.ot,y=n.ct,g=n.write,k=gy;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<>>1){case 0:f>>>=3,y-=3,i=7&y,f>>>=i,y-=i,s=1;break;case 1:S=[],z=[],C=[[]],x=[[]],ot.dt(S,z,C,x),w.init(S[0],z[0],C[0],0,x[0],0),f>>>=3,y-=3,s=6;break;case 2:f>>>=3,y-=3,s=3;break;case 3:return f>>>=3,y-=3,s=9,e.Le="invalid block type",t=Ye,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t)}break;case 1:for(;32>y;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<>>16&65535)!=(65535&f))return s=9,e.Le="invalid stored block lengths",t=Ye,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);o=65535&f,f=y=0,s=0!==o?2:0!==h?7:0;break;case 2:if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);if(0===k&&(g==n.end&&0!==n.read&&(g=0,k=gb&&(i=b),i>k&&(i=k),n.lt.set(e.je(m,i),g),m+=i,b-=i,g+=i,k-=i,0!=(o-=i))break;s=0!==h?7:0;break;case 3:for(;14>y;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<29||(i>>5&31)>29)return s=9,e.Le="too many length or distance symbols",t=Ye,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);if(i=258+(31&i)+(i>>5&31),!r||r.lengthv;v++)r[v]=0;f>>>=14,y-=14,a=0,s=4;case 4:for(;4+(c>>>10)>a;){for(;3>y;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<>>=3,y-=3}for(;19>a;)r[ft[a++]]=0;if(l[0]=7,i=p.st(r,l,u,d,e),0!=i)return(t=i)==Ye&&(r=null,s=9),n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);a=0,s=5;case 5:for(;i=c,258+(31&i)+(i>>5&31)>a;){let o,w;for(i=l[0];i>y;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<w)f>>>=i,y-=i,r[a++]=w;else{for(v=18==w?7:w-14,o=18==w?11:3;i+v>y;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<>>=i,y-=i,o+=f&$e[v],f>>>=v,y-=v,v=a,i=c,v+o>258+(31&i)+(i>>5&31)||16==w&&1>v)return r=null,s=9,e.Le="invalid bit length repeat",t=Ye,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);w=16==w?r[v-1]:0;do{r[v++]=w}while(0!=--o);a=v}}if(u[0]=-1,_=[],A=[],I=[],D=[],_[0]=9,A[0]=6,i=c,i=p.it(257+(31&i),1+(i>>5&31),r,_,A,I,D,d,e),0!=i)return i==Ye&&(r=null,s=9),t=i,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);w.init(_[0],A[0],d,I[0],d,D[0]),s=6;case 6:if(n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,1!=(t=w.ut(n,e,t)))return n.wt(e,t);if(t=0,w.ht(e),m=e.nt,b=e.We,f=n.ot,y=n.ct,g=n.write,k=g{n.reset(e,null),n.lt=null,d=null},n.yt=(e,t,r)=>{n.lt.set(e.subarray(t,t+r),0),n.read=n.write=r},n.bt=()=>1==s?1:0}const lt=13,ut=[0,0,255,255];function wt(){const e=this;function t(e){return e&&e.gt?(e.qe=e.Ge=0,e.Le=null,e.gt.mode=7,e.gt.kt.reset(e,null),0):Xe}e.mode=0,e.method=0,e.vt=[0],e.St=0,e.marker=0,e.zt=0,e.Ct=t=>(e.kt&&e.kt.ht(t),e.kt=null,0),e.xt=(n,r)=>(n.Le=null,e.kt=null,8>r||r>15?(e.Ct(n),Xe):(e.zt=r,n.gt.kt=new at(n,1<{let n,r;if(!e||!e.gt||!e.et)return Xe;const s=e.gt;for(t=4==t?Ze:0,n=Ze;;)switch(s.mode){case 0:if(0===e.We)return n;if(n=t,e.We--,e.qe++,8!=(15&(s.method=e.ft(e.nt++)))){s.mode=lt,e.Le="unknown compression method",s.marker=5;break}if(8+(s.method>>4)>s.zt){s.mode=lt,e.Le="invalid win size",s.marker=5;break}s.mode=1;case 1:if(0===e.We)return n;if(n=t,e.We--,e.qe++,r=255&e.ft(e.nt++),((s.method<<8)+r)%31!=0){s.mode=lt,e.Le="incorrect header check",s.marker=5;break}if(0==(32&r)){s.mode=7;break}s.mode=2;case 2:if(0===e.We)return n;n=t,e.We--,e.qe++,s.St=(255&e.ft(e.nt++))<<24&4278190080,s.mode=3;case 3:if(0===e.We)return n;n=t,e.We--,e.qe++,s.St+=(255&e.ft(e.nt++))<<16&16711680,s.mode=4;case 4:if(0===e.We)return n;n=t,e.We--,e.qe++,s.St+=(255&e.ft(e.nt++))<<8&65280,s.mode=5;case 5:return 0===e.We?n:(n=t,e.We--,e.qe++,s.St+=255&e.ft(e.nt++),s.mode=6,2);case 6:return s.mode=lt,e.Le="need dictionary",s.marker=0,Xe;case 7:if(n=s.kt.ut(e,n),n==Ye){s.mode=lt,s.marker=0;break}if(0==n&&(n=t),1!=n)return n;n=t,s.kt.reset(e,s.vt),s.mode=12;case 12:return e.We=0,1;case lt:return Ye;default:return Xe}},e.At=(e,t,n)=>{let r=0,s=n;if(!e||!e.gt||6!=e.gt.mode)return Xe;const i=e.gt;return s<1<{let n,r,s,i,o;if(!e||!e.gt)return Xe;const c=e.gt;if(c.mode!=lt&&(c.mode=lt,c.marker=0),0===(n=e.We))return Ze;for(r=e.nt,s=c.marker;0!==n&&4>s;)e.ft(r)==ut[s]?s++:s=0!==e.ft(r)?0:4-s,r++,n--;return e.qe+=r-e.nt,e.nt=r,e.We=n,c.marker=s,4!=s?Ye:(i=e.qe,o=e.Ge,t(e),e.qe=i,e.Ge=o,c.mode=7,0)},e.Dt=e=>e&&e.gt&&e.gt.kt?e.gt.kt.bt():Xe}function ht(){}function dt(e){const t=new ht,n=e&&e.chunkSize?r.floor(2*e.chunkSize):131072,o=new i(n);let c=!1;t.xt(),t.$e=o,this.append=(e,r)=>{const f=[];let a,l,u=0,w=0,h=0;if(0!==e.length){t.nt=0,t.et=e,t.We=e.length;do{if(t.rt=0,t.tt=n,0!==t.We||c||(t.nt=0,c=!0),a=t._t(0),c&&a===Ze){if(0!==t.We)throw new s("inflating: bad input")}else if(0!==a&&1!==a)throw new s("inflating: "+t.Le);if((c||1===a)&&t.We===e.length)throw new s("inflating: bad input");t.rt&&(t.rt===n?f.push(new i(o)):f.push(o.slice(0,t.rt))),h+=t.rt,r&&t.nt>0&&t.nt!=u&&(r(t.nt),u=t.nt)}while(t.We>0||0===t.tt);return f.length>1?(l=new i(h),f.forEach((e=>{l.set(e,w),w+=e.length}))):l=f[0]||new i,l}},this.flush=()=>{t.Ct()}}ht.prototype={xt(e){const t=this;return t.gt=new wt,e||(e=15),t.gt.xt(t,e)},_t(e){const t=this;return t.gt?t.gt._t(t,e):Xe},Ct(){const e=this;if(!e.gt)return Xe;const t=e.gt.Ct(e);return e.gt=null,t},It(){const e=this;return e.gt?e.gt.It(e):Xe},At(e,t){const n=this;return n.gt?n.gt.At(n,e,t):Xe},ft(e){return this.et[e]},je(e,t){return this.et.subarray(e,e+t)}},self.initCodec=()=>{self.Deflate=Qe,self.Inflate=dt};\n'],{type:"text/javascript"}));e({workerScripts:{inflate:[t],deflate:[t]}})}(Ze),Ze({Deflate:function(e){const t=new X,n=(i=e&&e.chunkSize?e.chunkSize:65536)+5*(Math.floor(i/16383)+1);var i;const r=C,s=new Uint8Array(n);let a=e?e.level:S;void 0===a&&(a=S),t.deflateInit(a),t.next_out=s,this.append=function(e,i){let a,o,c=0,l=0,d=0;const f=[];if(e.length){t.next_in_index=0,t.next_in=e,t.avail_in=e.length;do{if(t.next_out_index=0,t.avail_out=n,a=t.deflate(r),a!=U)throw new Error("deflating: "+t.msg);t.next_out_index&&(t.next_out_index==n?f.push(new Uint8Array(s)):f.push(s.slice(0,t.next_out_index))),d+=t.next_out_index,i&&t.next_in_index>0&&t.next_in_index!=c&&(i(t.next_in_index),c=t.next_in_index)}while(t.avail_in>0||0===t.avail_out);return f.length>1?(o=new Uint8Array(d),f.forEach((function(e){o.set(e,l),l+=e.length}))):o=f[0]||new Uint8Array,o}},this.flush=function(){let e,i,r=0,a=0;const o=[];do{if(t.next_out_index=0,t.avail_out=n,e=t.deflate(A),e!=W&&e!=U)throw new Error("deflating: "+t.msg);n-t.avail_out>0&&o.push(s.slice(0,t.next_out_index)),a+=t.next_out_index}while(t.avail_in>0||0===t.avail_out);return t.deflateEnd(),i=new Uint8Array(a),o.forEach((function(e){i.set(e,r),r+=e.length})),i}},Inflate:function(e){const t=new Re,n=e&&e.chunkSize?Math.floor(2*e.chunkSize):131072,i=new Uint8Array(n);let r=!1;t.inflateInit(),t.next_out=i,this.append=function(e,s){const a=[];let o,c,l=0,d=0,f=0;if(0!==e.length){t.next_in_index=0,t.next_in=e,t.avail_in=e.length;do{if(t.next_out_index=0,t.avail_out=n,0!==t.avail_in||r||(t.next_in_index=0,r=!0),o=t.inflate(0),r&&o===ee){if(0!==t.avail_in)throw new Error("inflating: bad input")}else if(o!==H&&o!==Z)throw new Error("inflating: "+t.msg);if((r||o===Z)&&t.avail_in===e.length)throw new Error("inflating: bad input");t.next_out_index&&(t.next_out_index===n?a.push(new Uint8Array(i)):a.push(i.slice(0,t.next_out_index))),f+=t.next_out_index,s&&t.next_in_index>0&&t.next_in_index!=l&&(s(t.next_in_index),l=t.next_in_index)}while(t.avail_in>0||0===t.avail_out);return a.length>1?(c=new Uint8Array(f),a.forEach((function(e){c.set(e,d),d+=e.length}))):c=a[0]||new Uint8Array,c}},this.flush=function(){t.inflateEnd()}}});class Wi extends Fn{constructor(e,t){super(e),this.blob=e,this.offset=t.offset+t.headerSize,this.size=t.compressedSize}async readUint8Array(e,t){const n=Ui(e,this.size)+this.offset,i=Ui(e+t,this.size)+this.offset,r=this.blob.slice(n,i);return new Uint8Array(await r.arrayBuffer())}}class ji extends Fn{constructor(e,t,n,i){super(),this.blob=e,this.entry=t,this.mimeString=n,this.options=i}async init(){const e=await async function(e,t){const n=t.offset,i=await e.slice(n,n+30).arrayBuffer(),r=new DataView(i);return{offset:n,compressionMethod:r.getUint16(8,!0),compressedSize:r.getUint32(18,!0),uncompressedSize:r.getUint32(22,!0),headerSize:30+r.getUint16(26,!0)+r.getUint16(28,!0)}}(this.blob,this.entry);if(0!==e.compressionMethod){const e=await c(this.entry,new En(this.mimeString),this.options);this.reader=new Dn(e)}else this.reader=new Wi(this.blob,e);this.size=this.reader.size}async readUint8Array(e,t){return this.reader.readUint8Array(e,t)}}const qi=["boot","dt","dtbo","init_boot","pvmfw","recovery","vbmeta_system","vbmeta_vendor","vbmeta","vendor_boot","vendor_kernel_boot"],Fi=["odm","odm_dlkm","product","system_dlkm","system_ext","system","vendor_dlkm","vendor"],Di={load:"Loading",unpack:"Unpacking",flash:"Writing",wipe:"Wiping",reboot:"Restarting"},Ei=4e3;async function Li(e,t,i,r){const s=await c(t,new En("application/octet-stream"),{onstart(e){n(`Unpacking ${r} (${e} bytes)`),i("unpack",r,0)},onprogress(e,t){i("unpack",r,e/t)}});n(`Flashing ${r}`),i("flash",r,0),await e.flashBlob(r,s,(e=>{i("flash",r,e)}))}async function Ii(e,t,n,i){for(let r of i){let i=new RegExp(`${r}(?:-.+)?\\.img$`),s=t.find((e=>e.filename.match(i)));if(void 0!==s)if("bootloader"==r){let t=await e.getVariable("current-slot");if("a"==t)await Li(e,s,n,r+"_b"),await e.runCommand("set_active:b");else{if("b"!=t)throw new Oi("FAIL","Invalid slot given by bootloader.");await Li(e,s,n,r+"_a"),await e.runCommand("set_active:a")}}else await Li(e,s,n,r)}}async function Ri(e,t,n){try{await e.reboot(t,!1)}catch(e){}await e.waitForConnect(n)}async function Ti(e,t,i,r,o=((e,t,n)=>{})){o("load","package",0);let l=new pi(new Dn(t)),d=await l.getEntries();"yes"===await e.getVariable("is-userspace")&&await e.reboot("bootloader",!0,r),await Ii(e,d,o,["bootloader"]),await a(o,"reboot","device",Ei,Ri(e,"bootloader",r)),await Ii(e,d,o,["bootloader"]),await a(o,"reboot","device",Ei,Ri(e,"bootloader",r)),await Ii(e,d,o,["radio"]),await a(o,"reboot","device",Ei,Ri(e,"bootloader",r));let f=await e.getVariable("snapshot-update-status");null!==f&&"none"!==f&&await e.runCommand("snapshot-update:cancel");let u=d.find((e=>e.filename.match(/image-.+\.zip$/)));const m=new pi(new ji(t,u,"application/zip",{onstart(e){n(`Loading nested images from zip (${e} bytes)`),o("unpack","images",0)},onprogress(e,t){o("unpack","images",e/t)}})),p=await m.getEntries();if(u=p.find((e=>"android-info.txt"===e.filename)),void 0!==u){const t=await c(u,new Ln);await async function(e,t){for(let i of t.replace("\r","").split("\n")){let t=i.match(/^require\s+(.+?)=(.+)$/);if(!t)continue;let r=t[1];"board"===r&&(r="product");let s=t[2],a=s.split("|");if("partition-exists"===r){let t=await e.getVariable(`has-slot:${s}`);if("yes"!==t&&"no"!==t)throw new Oi("FAIL",`Requirement ${r}=${s} failed, device lacks partition`);if(!qi.includes(s)&&!Fi.includes(s))throw new Oi("FAIL",`Requirement ${r}=${s} failed, unrecognized partition`)}else{let t=await e.getVariable(r);if(!a.includes(t)){let e=`Requirement ${r}=${s} failed, value = ${t}`;throw n(e),new Oi("FAIL",e)}n(`Requirement ${r}=${s} passed`)}}}(e,t)}if(await Ii(e,p,o,qi),u=p.find((e=>"super_empty.img"===e.filename)),void 0!==u){await a(o,"reboot","device",16e3,e.reboot("fastboot",!0,r));let t=await e.getVariable("super-partition-name");t||(t="super");let n=i?"wipe":"flash";o(n,"super",0);const l=await c(u,new En("application/octet-stream"));await e.upload(t,await s(l),(e=>{o(n,"super",e)})),await e.runCommand(`update-super:${t}${i?":wipe":""}`)}await Ii(e,p,o,Fi),"yes"===await e.getVariable("is-userspace")&&await a(o,"reboot","device",Ei,e.reboot("bootloader",!0,r)),u=d.find((e=>e.filename.endsWith("avb_pkmd.bin"))),void 0!==u&&(await e.runCommand("erase:avb_custom_key"),await Li(e,u,o,"avb_custom_key")),i&&await a(o,"wipe","data",1e3,e.runCommand("erase:userdata"))}class $i extends Error{constructor(e){super(e),this.name="UsbError"}}class Oi extends Error{constructor(e,t){super(`Bootloader replied with ${e}: ${t}`),this.status=e,this.bootloaderMessage=t,this.name="FastbootError"}}class Bi{constructor(){this.device=null,this.epIn=null,this.epOut=null,this._registeredUsbListeners=!1,this._connectResolve=null,this._connectReject=null,this._disconnectResolve=null}get isConnected(){return null!==this.device&&this.device.opened&&this.device.configurations[0].interfaces[0].claimed}async _validateAndConnectDevice(){if(null===this.device)throw new $i("Attempted to connect to null device");let e=this.device.configurations[0].interfaces[0].alternates[0];if(2!==e.endpoints.length)throw new $i("Interface has wrong number of endpoints");this.epIn=null,this.epOut=null;for(let t of e.endpoints){if(i("Checking endpoint:",t),"bulk"!==t.type)throw new $i("Interface endpoint is not bulk");if("in"===t.direction){if(null!==this.epIn)throw new $i("Interface has multiple IN endpoints");this.epIn=t.endpointNumber}else if("out"===t.direction){if(null!==this.epOut)throw new $i("Interface has multiple OUT endpoints");this.epOut=t.endpointNumber}}i("Endpoints: in =",this.epIn,", out =",this.epOut);try{await this.device.open();try{await this.device.reset()}catch(e){}await this.device.selectConfiguration(1),await this.device.claimInterface(0)}catch(e){throw null!==this._connectReject&&(this._connectReject(e),this._connectResolve=null,this._connectReject=null),e}null!==this._connectResolve&&(this._connectResolve(void 0),this._connectResolve=null,this._connectReject=null)}async waitForDisconnect(){if(null!==this.device)return await new Promise(((e,t)=>{this._disconnectResolve=e}))}async waitForConnect(e=(()=>{})){return navigator.userAgent.includes("Android")&&(await this.waitForDisconnect(),e()),await new Promise(((e,t)=>{this._connectResolve=e,this._connectReject=t}))}async connect(){let e=await navigator.usb.getDevices();n("Found paired USB devices:",e),1===e.length?this.device=e[0]:(n("No or multiple paired devices are connected, requesting one"),this.device=await navigator.usb.requestDevice({filters:[{classCode:255,subclassCode:66,protocolCode:3}]})),n("Using USB device:",this.device),this._registeredUsbListeners||(navigator.usb.addEventListener("disconnect",(e=>{e.device===this.device&&(n("USB device disconnected"),null!==this._disconnectResolve&&(this._disconnectResolve(void 0),this._disconnectResolve=null))})),navigator.usb.addEventListener("connect",(async e=>{n("USB device connected"),this.device=e.device;let t=null!==this._connectReject;try{await this._validateAndConnectDevice()}catch(e){if(!t)throw e}})),this._registeredUsbListeners=!0),await this._validateAndConnectDevice()}async _readResponse(){let e,t={text:""};do{let i=await this.device.transferIn(this.epIn,64),r=(new TextDecoder).decode(i.data);e=r.substring(0,4);let s=r.substring(4);if(n(`Response: ${e} ${s}`),"OKAY"===e)t.text+=s;else if("INFO"===e)t.text+=s+"\n";else{if("DATA"!==e)throw new Oi(e,s);t.dataSize=s}}while("INFO"===e);return t}async runCommand(e){if(e.length>64)throw new RangeError;let t=(new TextEncoder).encode(e);return await this.device.transferOut(this.epOut,t),n("Command:",e),this._readResponse()}async getVariable(e){let t;try{t=(await(n=this.runCommand(`getvar:${e}`),i=1e4,new Promise(((e,t)=>{let r=!1,s=setTimeout((()=>{r=!0,t(new o(i))}),i);n.then((t=>{r||e(t)})).catch((e=>{r||t(e)})).finally((()=>{r||clearTimeout(s)}))})))).text}catch(e){if(!(e instanceof Oi&&"FAIL"==e.status))throw e;t=null}var n,i;return t?t.trim():null}async _getDownloadSize(){try{let e=(await this.getVariable("max-download-size")).toLowerCase();if(e)return Math.min(parseInt(e,16),1073741824)}catch(e){}return 536870912}async _sendRawPayload(e,t){let n=0,r=e.byteLength;for(;r>0;){let s=e.slice(16384*n,16384*(n+1));n%1e3==0&&i(` Sending ${s.byteLength} bytes to endpoint, ${r} remaining, i=${n}`),n%10==0&&t((e.byteLength-r)/e.byteLength),await this.device.transferOut(this.epOut,s),r-=s.byteLength,n+=1}t(1)}async upload(e,t,i=(e=>{})){n(`Uploading single sparse to ${e}: ${t.byteLength} bytes`);let r=t.byteLength.toString(16).padStart(8,"0");if(8!==r.length)throw new Oi("FAIL",`Transfer size overflow: ${r} is more than 8 digits`);let s=await this.runCommand(`download:${r}`);if(void 0===s.dataSize)throw new Oi("FAIL",`Unexpected response to download command: ${s.text}`);if(parseInt(s.dataSize,16)!==t.byteLength)throw new Oi("FAIL",`Bootloader wants ${t.byteLength} bytes, requested to send ${t.byteLength} bytes`);n(`Sending payload: ${t.byteLength} bytes`),await this._sendRawPayload(t,i),n("Payload sent, waiting for response..."),await this._readResponse()}async reboot(e="",t=!1,n=(()=>{})){e.length>0?await this.runCommand(`reboot-${e}`):await this.runCommand("reboot"),t&&await this.waitForConnect(n)}async flashBlob(e,t,r=(e=>{})){"yes"===await this.getVariable(`has-slot:${e}`)&&(e+="_"+await this.getVariable("current-slot"));let a=await this._getDownloadSize(),o=await s(t.slice(0,u)),c=t.size,l=!1;try{let e=x(o);null!==e&&(c=e.blocks*e.blockSize,l=!0)}catch(e){}"yes"===await this.getVariable(`is-logical:${e}`)&&(await this.runCommand(`resize-logical-partition:${e}:0`),await this.runCommand(`resize-logical-partition:${e}:${c}`)),t.size>a&&!l&&(n(`${e} image is raw, converting to sparse`),t=await async function(e){let t={blockSize:4096,blocks:e.size/4096,chunks:1,crc32:0},n=[];for(;e.size>0;){let i=Math.min(e.size,67108864);n.push({type:h.Raw,blocks:i/t.blockSize,data:e.slice(0,i)}),e=e.slice(i)}return v(t,n)}(t)),n(`Flashing ${t.size} bytes to ${e}, ${a} bytes per split`);let d=0,f=0;for await(let o of async function*(e,t){if(n(`Splitting ${e.size}-byte sparse image into ${t}-byte chunks`),e.size<=t)return n("Blob fits in 1 payload, not splitting"),void(yield{data:await s(e),bytes:e.size});let r=x(await s(e.slice(0,u)));if(null===r)throw new p("Blob is not a sparse image");r.crc32=0,e=e.slice(u);let a=[],o=0;for(let l=0;le.data.size)).reduce(((e,t)=>e+t),0)}(c));if(i(` Chunk ${l}: type ${d.type}, ${d.dataBytes} bytes / ${d.blocks} blocks, ${f} bytes remaining`),f>=d.dataBytes)i(" Space is available, adding chunk"),a.push(d),o+=d.blocks*r.blockSize;else{let e=b(a);a.push({type:h.Skip,blocks:r.blocks-e,data:new Blob([]),dataBytes:0}),i(`Partition is ${r.blocks} blocks, used ${e}, padded with ${r.blocks-e}, finishing split with ${b(a)} blocks`);let t=await v(r,a);n(`Finished ${t.size}-byte split with ${a.length} chunks`),yield{data:await s(t),bytes:o},i(`Starting new split: skipping first ${e} blocks and adding chunk`),a=[{type:h.Skip,blocks:e,data:new Blob([]),dataBytes:0},d],o=0}}var c;if(a.length>0&&(a.length>1||a[0].type!==h.Skip)){let e=await v(r,a);n(`Finishing final ${e.size}-byte split with ${a.length} chunks`),yield{data:await s(e),bytes:o}}}(t,a))await this.upload(e,o.data,(e=>{r((f+e*o.bytes)/c)})),n("Flashing payload..."),await this.runCommand(`flash:${e}`),d+=1,f+=o.bytes;n(`Flashed ${e} with ${d} split(s)`)}async bootBlob(e,t=(e=>{})){n(`Booting ${e.size} bytes image`);let i=await s(e);await this.upload("boot.img",i,t),n("Booting payload..."),await this.runCommand("boot"),n(`Booted ${e.size} bytes image`)}async flashFactoryZip(e,t,n,i=(e=>{})){return await Ti(this,e,t,n,i)}}export{Bi as FastbootDevice,Oi as FastbootError,o as TimeoutError,Di as USER_ACTION_MAP,$i as UsbError,Ze as configureZip,r as setDebugLevel}; -//# sourceMappingURL=fastboot.min.mjs.map diff --git a/dist/fastboot.min.mjs.map b/dist/fastboot.min.mjs.map deleted file mode 100644 index 77e202c..0000000 --- a/dist/fastboot.min.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"fastboot.min.mjs","sources":["../src/common.ts","../src/sparse.ts","../node_modules/@zip.js/zip.js/lib/core/streams/codecs/deflate.js","../node_modules/@zip.js/zip.js/lib/core/streams/codecs/inflate.js","../node_modules/@zip.js/zip.js/lib/core/constants.js","../node_modules/@zip.js/zip.js/lib/core/streams/stream-adapter.js","../node_modules/@zip.js/zip.js/lib/core/configuration.js","../node_modules/@zip.js/zip.js/lib/core/util/mime-type.js","../node_modules/@zip.js/zip.js/lib/core/streams/codecs/crc32.js","../node_modules/@zip.js/zip.js/lib/core/streams/crc32-stream.js","../node_modules/@zip.js/zip.js/lib/core/streams/codecs/sjcl.js","../node_modules/@zip.js/zip.js/lib/core/streams/common-crypto.js","../node_modules/@zip.js/zip.js/lib/core/streams/aes-crypto-stream.js","../node_modules/@zip.js/zip.js/lib/core/util/encode-text.js","../node_modules/@zip.js/zip.js/lib/core/streams/zip-crypto-stream.js","../node_modules/@zip.js/zip.js/lib/core/streams/zip-entry-stream.js","../node_modules/@zip.js/zip.js/lib/core/streams/codec-stream.js","../node_modules/@zip.js/zip.js/lib/core/codec-worker.js","../node_modules/@zip.js/zip.js/lib/core/codec-pool.js","../node_modules/@zip.js/zip.js/lib/core/io.js","../node_modules/@zip.js/zip.js/lib/core/util/cp437-decode.js","../node_modules/@zip.js/zip.js/lib/core/util/decode-text.js","../node_modules/@zip.js/zip.js/lib/core/zip-entry.js","../node_modules/@zip.js/zip.js/lib/core/zip-reader.js","../node_modules/@zip.js/zip.js/lib/zip-fs.js","../src/io.ts","../node_modules/@zip.js/zip.js/lib/z-worker-inline.js","../node_modules/@zip.js/zip.js/index.js","../src/factory.ts","../src/fastboot.ts"],"sourcesContent":["import { FactoryProgressCallback } from \"./factory\";\nimport { Entry, EntryGetDataOptions, WritableWriter } from \"@zip.js/zip.js\";\n\nconst ZIP_ENTRY_HEADER_BEGIN_LENGTH = 30; // bytes\n\nexport enum DebugLevel {\n Silent = 0,\n Debug,\n Verbose,\n}\n\nexport interface EntryMetadata {\n offset: number;\n compressionMethod: number;\n compressedSize: number;\n uncompressedSize: number;\n headerSize: number;\n}\n\nlet debugLevel = DebugLevel.Silent;\n\nexport function logDebug(...data: any[]) {\n if (debugLevel >= 1) {\n console.log(...data);\n }\n}\n\nexport function logVerbose(...data: any[]) {\n if (debugLevel >= 2) {\n console.log(...data);\n }\n}\n\n/**\n * Change the debug level for the fastboot client:\n * - 0 = silent\n * - 1 = debug, recommended for general use\n * - 2 = verbose, for debugging only\n *\n * @param {number} level - Debug level to use.\n */\nexport function setDebugLevel(level: DebugLevel) {\n debugLevel = level;\n}\n\n/**\n * Reads all of the data in the given blob and returns it as an ArrayBuffer.\n *\n * @param {Blob} blob - Blob with the data to read.\n * @returns {Promise} ArrayBuffer containing data from the blob.\n * @ignore\n */\nexport function readBlobAsBuffer(blob: Blob): Promise {\n return new Promise((resolve, reject) => {\n let reader = new FileReader();\n reader.onload = () => {\n resolve(reader.result! as ArrayBuffer);\n };\n reader.onerror = () => {\n reject(reader.error);\n };\n\n reader.readAsArrayBuffer(blob);\n });\n}\n\nfunction waitForFrame() {\n return new Promise((resolve, _reject) => {\n window.requestAnimationFrame(resolve);\n });\n}\n\nexport async function runWithTimedProgress(\n onProgress: FactoryProgressCallback,\n action: string,\n item: string,\n duration: number,\n workPromise: Promise\n) {\n let startTime = new Date().getTime();\n let stop = false;\n\n onProgress(action, item, 0.0);\n let progressPromise = (async () => {\n let now;\n let targetTime = startTime + duration;\n\n do {\n now = new Date().getTime();\n onProgress(action, item, (now - startTime) / duration);\n await waitForFrame();\n } while (!stop && now < targetTime);\n })();\n\n await Promise.race([progressPromise, workPromise]);\n stop = true;\n await progressPromise;\n await workPromise;\n\n onProgress(action, item, 1.0);\n}\n\n/** Exception class for operations that exceeded their timeout duration. */\nexport class TimeoutError extends Error {\n timeout: number;\n\n constructor(timeout: number) {\n super(`Timeout of ${timeout} ms exceeded`);\n this.name = \"TimeoutError\";\n this.timeout = timeout;\n }\n}\n\nexport function runWithTimeout(\n promise: Promise,\n timeout: number\n): Promise {\n return new Promise((resolve, reject) => {\n // Set up timeout\n let timedOut = false;\n let tid = setTimeout(() => {\n // Set sentinel first to prevent race in promise resolving\n timedOut = true;\n reject(new TimeoutError(timeout));\n }, timeout);\n\n // Passthrough\n promise\n .then((val) => {\n if (!timedOut) {\n resolve(val);\n }\n })\n .catch((err) => {\n if (!timedOut) {\n reject(err);\n }\n })\n .finally(() => {\n if (!timedOut) {\n clearTimeout(tid);\n }\n });\n });\n}\n\nexport async function getEntryMetadata(\n blob: Blob,\n entry: Entry\n): Promise {\n const offset = entry.offset;\n const headerBeginRaw =\n await blob.slice(offset, offset + ZIP_ENTRY_HEADER_BEGIN_LENGTH).arrayBuffer();\n const dataView = new DataView(headerBeginRaw);\n const compressionMethod = dataView.getUint16(8, true);\n const compressedSize = dataView.getUint32(18, true);\n const uncompressedSize = dataView.getUint32(22, true);\n const fileNameLength = dataView.getUint16(26, true);\n const extraFieldLength = dataView.getUint16(28, true);\n const headerSize = ZIP_ENTRY_HEADER_BEGIN_LENGTH + fileNameLength + extraFieldLength;\n\n return {\n offset,\n compressionMethod,\n compressedSize,\n uncompressedSize,\n headerSize,\n };\n}\n\n// Wrapper for Entry#getData() that unwraps ProgressEvent errors\nexport async function zipGetData(\n entry: Entry,\n writer: WritableWriter,\n options?: EntryGetDataOptions\n): Promise {\n try {\n return await entry.getData!(writer, options);\n } catch (e) {\n if (\n e instanceof ProgressEvent &&\n e.type === \"error\" &&\n e.target !== null\n ) {\n throw (e.target as any).error;\n } else {\n throw e;\n }\n }\n}\n","import * as common from \"./common\";\n\nconst FILE_MAGIC = 0xed26ff3a;\n\nconst MAJOR_VERSION = 1;\nconst MINOR_VERSION = 0;\nexport const FILE_HEADER_SIZE = 28;\nconst CHUNK_HEADER_SIZE = 12;\n\n// AOSP libsparse uses 64 MiB chunks\nconst RAW_CHUNK_SIZE = 64 * 1024 * 1024;\n\nexport class ImageError extends Error {\n constructor(message: string) {\n super(message);\n this.name = \"ImageError\";\n }\n}\n\nexport interface SparseSplit {\n data: ArrayBuffer;\n bytes: number;\n}\n\nexport enum ChunkType {\n Raw = 0xcac1,\n Fill = 0xcac2,\n Skip = 0xcac3,\n Crc32 = 0xcac4,\n}\n\nexport interface SparseHeader {\n blockSize: number;\n blocks: number;\n chunks: number;\n crc32: number;\n}\n\nexport interface SparseChunk {\n type: ChunkType;\n /* 2: reserved, 16 bits */\n blocks: number;\n dataBytes: number;\n data: Blob | null; // to be populated by consumer\n}\n\nclass BlobBuilder {\n private blob: Blob;\n private type: string;\n\n constructor(type: string = \"\") {\n this.type = type;\n this.blob = new Blob([], { type: this.type });\n }\n\n append(blob: Blob) {\n this.blob = new Blob([this.blob, blob], { type: this.type });\n }\n\n getBlob(): Blob {\n return this.blob;\n }\n}\n\n/**\n * Returns a parsed version of the sparse image file header from the given buffer.\n *\n * @param {ArrayBuffer} buffer - Raw file header data.\n * @returns {SparseHeader} Object containing the header information.\n */\nexport function parseFileHeader(buffer: ArrayBuffer): SparseHeader | null {\n let view = new DataView(buffer);\n\n let magic = view.getUint32(0, true);\n if (magic !== FILE_MAGIC) {\n return null;\n }\n\n // v1.0+\n let major = view.getUint16(4, true);\n let minor = view.getUint16(6, true);\n if (major !== MAJOR_VERSION || minor < MINOR_VERSION) {\n throw new ImageError(\n `Unsupported sparse image version ${major}.${minor}`\n );\n }\n\n let fileHdrSize = view.getUint16(8, true);\n let chunkHdrSize = view.getUint16(10, true);\n if (\n fileHdrSize !== FILE_HEADER_SIZE ||\n chunkHdrSize !== CHUNK_HEADER_SIZE\n ) {\n throw new ImageError(\n `Invalid file header size ${fileHdrSize}, chunk header size ${chunkHdrSize}`\n );\n }\n\n let blockSize = view.getUint32(12, true);\n if (blockSize % 4 !== 0) {\n throw new ImageError(`Block size ${blockSize} is not a multiple of 4`);\n }\n\n return {\n blockSize: blockSize,\n blocks: view.getUint32(16, true),\n chunks: view.getUint32(20, true),\n crc32: view.getUint32(24, true),\n };\n}\n\nfunction parseChunkHeader(buffer: ArrayBuffer) {\n let view = new DataView(buffer);\n\n // This isn't the same as what createImage takes.\n // Further processing needs to be done on the chunks.\n return {\n type: view.getUint16(0, true),\n /* 2: reserved, 16 bits */\n blocks: view.getUint32(4, true),\n dataBytes: view.getUint32(8, true) - CHUNK_HEADER_SIZE,\n data: null, // to be populated by consumer\n } as SparseChunk;\n}\n\nfunction calcChunksBlockSize(chunks: Array) {\n return chunks\n .map((chunk) => chunk.blocks)\n .reduce((total, c) => total + c, 0);\n}\n\nfunction calcChunksDataSize(chunks: Array) {\n return chunks\n .map((chunk) => chunk.data!.size)\n .reduce((total, c) => total + c, 0);\n}\n\nfunction calcChunksSize(chunks: Array) {\n // 28-byte file header, 12-byte chunk headers\n let overhead = FILE_HEADER_SIZE + CHUNK_HEADER_SIZE * chunks.length;\n return overhead + calcChunksDataSize(chunks);\n}\n\nasync function createImage(header: SparseHeader, chunks: Array): Promise {\n let blobBuilder = new BlobBuilder();\n\n let buffer = new ArrayBuffer(FILE_HEADER_SIZE);\n let dataView = new DataView(buffer);\n let arrayView = new Uint8Array(buffer);\n\n dataView.setUint32(0, FILE_MAGIC, true);\n // v1.0\n dataView.setUint16(4, MAJOR_VERSION, true);\n dataView.setUint16(6, MINOR_VERSION, true);\n dataView.setUint16(8, FILE_HEADER_SIZE, true);\n dataView.setUint16(10, CHUNK_HEADER_SIZE, true);\n\n // Match input parameters\n dataView.setUint32(12, header.blockSize, true);\n dataView.setUint32(16, header.blocks, true);\n dataView.setUint32(20, chunks.length, true);\n\n // We don't care about the CRC. AOSP docs specify that this should be a CRC32,\n // but AOSP libsparse always sets 0 and puts the CRC in a final undocumented\n // 0xCAC4 chunk instead.\n dataView.setUint32(24, 0, true);\n\n blobBuilder.append(new Blob([buffer]));\n for (let chunk of chunks) {\n buffer = new ArrayBuffer(CHUNK_HEADER_SIZE + chunk.data!.size);\n dataView = new DataView(buffer);\n arrayView = new Uint8Array(buffer);\n\n dataView.setUint16(0, chunk.type, true);\n dataView.setUint16(2, 0, true); // reserved\n dataView.setUint32(4, chunk.blocks, true);\n dataView.setUint32(\n 8,\n CHUNK_HEADER_SIZE + chunk.data!.size,\n true\n );\n\n let chunkArrayView = new Uint8Array(await common.readBlobAsBuffer(chunk.data!));\n arrayView.set(chunkArrayView, CHUNK_HEADER_SIZE);\n blobBuilder.append(new Blob([buffer]));\n }\n\n return blobBuilder.getBlob();\n}\n\n/**\n * Creates a sparse image from buffer containing raw image data.\n *\n * @param {Blob} blob - Blob containing the raw image data.\n * @returns {Promise} Promise that resolves the blob containing the new sparse image.\n */\nexport async function fromRaw(blob: Blob): Promise {\n let header = {\n blockSize: 4096,\n blocks: blob.size / 4096,\n chunks: 1,\n crc32: 0,\n };\n\n let chunks = [];\n while (blob.size > 0) {\n let chunkSize = Math.min(blob.size, RAW_CHUNK_SIZE);\n chunks.push({\n type: ChunkType.Raw,\n blocks: chunkSize / header.blockSize,\n data: blob.slice(0, chunkSize),\n } as SparseChunk);\n blob = blob.slice(chunkSize);\n }\n\n return createImage(header, chunks);\n}\n\n/**\n * Split a sparse image into smaller sparse images within the given size.\n * This takes a Blob instead of an ArrayBuffer because it may process images\n * larger than RAM.\n *\n * @param {Blob} blob - Blob containing the sparse image to split.\n * @param {number} splitSize - Maximum size per split.\n * @yields {Object} Data of the next split image and its output size in bytes.\n */\nexport async function* splitBlob(blob: Blob, splitSize: number) {\n common.logDebug(\n `Splitting ${blob.size}-byte sparse image into ${splitSize}-byte chunks`\n );\n // Short-circuit if splitting isn't required\n if (blob.size <= splitSize) {\n common.logDebug(\"Blob fits in 1 payload, not splitting\");\n yield {\n data: await common.readBlobAsBuffer(blob),\n bytes: blob.size,\n } as SparseSplit;\n return;\n }\n\n let headerData = await common.readBlobAsBuffer(\n blob.slice(0, FILE_HEADER_SIZE)\n );\n let header = parseFileHeader(headerData);\n if (header === null) {\n throw new ImageError(\"Blob is not a sparse image\");\n }\n\n // Remove CRC32 (if present), otherwise splitting will invalidate it\n header.crc32 = 0;\n blob = blob.slice(FILE_HEADER_SIZE);\n\n let splitChunks: Array = [];\n let splitDataBytes = 0;\n for (let i = 0; i < header.chunks; i++) {\n let chunkHeaderData = await common.readBlobAsBuffer(\n blob.slice(0, CHUNK_HEADER_SIZE)\n );\n let chunk = parseChunkHeader(chunkHeaderData);\n chunk.data = blob.slice(CHUNK_HEADER_SIZE, CHUNK_HEADER_SIZE + chunk.dataBytes);\n blob = blob.slice(CHUNK_HEADER_SIZE + chunk.dataBytes);\n\n let bytesRemaining = splitSize - calcChunksSize(splitChunks);\n common.logVerbose(\n ` Chunk ${i}: type ${chunk.type}, ${chunk.dataBytes} bytes / ${chunk.blocks} blocks, ${bytesRemaining} bytes remaining`\n );\n if (bytesRemaining >= chunk.dataBytes) {\n // Read the chunk and add it\n common.logVerbose(\" Space is available, adding chunk\");\n splitChunks.push(chunk);\n // Track amount of data written on the output device, in bytes\n splitDataBytes += chunk.blocks * header.blockSize;\n } else {\n // Out of space, finish this split\n // Blocks need to be calculated from chunk headers instead of going by size\n // because FILL and SKIP chunks cover more blocks than the data they contain.\n let splitBlocks = calcChunksBlockSize(splitChunks);\n splitChunks.push({\n type: ChunkType.Skip,\n blocks: header.blocks - splitBlocks,\n data: new Blob([]),\n dataBytes: 0,\n });\n common.logVerbose(\n `Partition is ${\n header.blocks\n } blocks, used ${splitBlocks}, padded with ${\n header.blocks - splitBlocks\n }, finishing split with ${calcChunksBlockSize(\n splitChunks\n )} blocks`\n );\n let splitImage = await createImage(header, splitChunks);\n common.logDebug(\n `Finished ${splitImage.size}-byte split with ${splitChunks.length} chunks`\n );\n yield {\n data: await common.readBlobAsBuffer(splitImage),\n bytes: splitDataBytes,\n } as SparseSplit;\n\n // Start a new split. Every split is considered a full image by the\n // bootloader, so we need to skip the *total* written blocks.\n common.logVerbose(\n `Starting new split: skipping first ${splitBlocks} blocks and adding chunk`\n );\n splitChunks = [\n {\n type: ChunkType.Skip,\n blocks: splitBlocks,\n data: new Blob([]),\n dataBytes: 0,\n },\n chunk,\n ];\n splitDataBytes = 0;\n }\n }\n\n // Finish the final split if necessary\n if (\n splitChunks.length > 0 &&\n (splitChunks.length > 1 || splitChunks[0].type !== ChunkType.Skip)\n ) {\n let splitImage = await createImage(header, splitChunks);\n common.logDebug(\n `Finishing final ${splitImage.size}-byte split with ${splitChunks.length} chunks`\n );\n yield {\n data: await common.readBlobAsBuffer(splitImage),\n bytes: splitDataBytes,\n } as SparseSplit;\n }\n}\n","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/*\n * This program is based on JZlib 1.0.2 ymnk, JCraft,Inc.\n * JZlib is based on zlib-1.1.3, so all credit should go authors\n * Jean-loup Gailly(jloup@gzip.org) and Mark Adler(madler@alumni.caltech.edu)\n * and contributors of zlib.\n */\n\n// deno-lint-ignore-file no-this-alias prefer-const\n\n// Global\n\nconst MAX_BITS = 15;\nconst D_CODES = 30;\nconst BL_CODES = 19;\n\nconst LENGTH_CODES = 29;\nconst LITERALS = 256;\nconst L_CODES = (LITERALS + 1 + LENGTH_CODES);\nconst HEAP_SIZE = (2 * L_CODES + 1);\n\nconst END_BLOCK = 256;\n\n// Bit length codes must not exceed MAX_BL_BITS bits\nconst MAX_BL_BITS = 7;\n\n// repeat previous bit length 3-6 times (2 bits of repeat count)\nconst REP_3_6 = 16;\n\n// repeat a zero length 3-10 times (3 bits of repeat count)\nconst REPZ_3_10 = 17;\n\n// repeat a zero length 11-138 times (7 bits of repeat count)\nconst REPZ_11_138 = 18;\n\n// The lengths of the bit length codes are sent in order of decreasing\n// probability, to avoid transmitting the lengths for unused bit\n// length codes.\n\nconst Buf_size = 8 * 2;\n\n// JZlib version : \"1.0.2\"\nconst Z_DEFAULT_COMPRESSION = -1;\n\n// compression strategy\nconst Z_FILTERED = 1;\nconst Z_HUFFMAN_ONLY = 2;\nconst Z_DEFAULT_STRATEGY = 0;\n\nconst Z_NO_FLUSH = 0;\nconst Z_PARTIAL_FLUSH = 1;\nconst Z_FULL_FLUSH = 3;\nconst Z_FINISH = 4;\n\nconst Z_OK = 0;\nconst Z_STREAM_END = 1;\nconst Z_NEED_DICT = 2;\nconst Z_STREAM_ERROR = -2;\nconst Z_DATA_ERROR = -3;\nconst Z_BUF_ERROR = -5;\n\n// Tree\n\nfunction extractArray(array) {\n\treturn flatArray(array.map(([length, value]) => (new Array(length)).fill(value, 0, length)));\n}\n\nfunction flatArray(array) {\n\treturn array.reduce((a, b) => a.concat(Array.isArray(b) ? flatArray(b) : b), []);\n}\n\n// see definition of array dist_code below\nconst _dist_code = [0, 1, 2, 3].concat(...extractArray([\n\t[2, 4], [2, 5], [4, 6], [4, 7], [8, 8], [8, 9], [16, 10], [16, 11], [32, 12], [32, 13], [64, 14], [64, 15], [2, 0], [1, 16],\n\t[1, 17], [2, 18], [2, 19], [4, 20], [4, 21], [8, 22], [8, 23], [16, 24], [16, 25], [32, 26], [32, 27], [64, 28], [64, 29]\n]));\n\nfunction Tree() {\n\tconst that = this;\n\n\t// dyn_tree; // the dynamic tree\n\t// max_code; // largest code with non zero frequency\n\t// stat_desc; // the corresponding static tree\n\n\t// Compute the optimal bit lengths for a tree and update the total bit\n\t// length\n\t// for the current block.\n\t// IN assertion: the fields freq and dad are set, heap[heap_max] and\n\t// above are the tree nodes sorted by increasing frequency.\n\t// OUT assertions: the field len is set to the optimal bit length, the\n\t// array bl_count contains the frequencies for each bit length.\n\t// The length opt_len is updated; static_len is also updated if stree is\n\t// not null.\n\tfunction gen_bitlen(s) {\n\t\tconst tree = that.dyn_tree;\n\t\tconst stree = that.stat_desc.static_tree;\n\t\tconst extra = that.stat_desc.extra_bits;\n\t\tconst base = that.stat_desc.extra_base;\n\t\tconst max_length = that.stat_desc.max_length;\n\t\tlet h; // heap index\n\t\tlet n, m; // iterate over the tree elements\n\t\tlet bits; // bit length\n\t\tlet xbits; // extra bits\n\t\tlet f; // frequency\n\t\tlet overflow = 0; // number of elements with bit length too large\n\n\t\tfor (bits = 0; bits <= MAX_BITS; bits++)\n\t\t\ts.bl_count[bits] = 0;\n\n\t\t// In a first pass, compute the optimal bit lengths (which may\n\t\t// overflow in the case of the bit length tree).\n\t\ttree[s.heap[s.heap_max] * 2 + 1] = 0; // root of the heap\n\n\t\tfor (h = s.heap_max + 1; h < HEAP_SIZE; h++) {\n\t\t\tn = s.heap[h];\n\t\t\tbits = tree[tree[n * 2 + 1] * 2 + 1] + 1;\n\t\t\tif (bits > max_length) {\n\t\t\t\tbits = max_length;\n\t\t\t\toverflow++;\n\t\t\t}\n\t\t\ttree[n * 2 + 1] = bits;\n\t\t\t// We overwrite tree[n*2+1] which is no longer needed\n\n\t\t\tif (n > that.max_code)\n\t\t\t\tcontinue; // not a leaf node\n\n\t\t\ts.bl_count[bits]++;\n\t\t\txbits = 0;\n\t\t\tif (n >= base)\n\t\t\t\txbits = extra[n - base];\n\t\t\tf = tree[n * 2];\n\t\t\ts.opt_len += f * (bits + xbits);\n\t\t\tif (stree)\n\t\t\t\ts.static_len += f * (stree[n * 2 + 1] + xbits);\n\t\t}\n\t\tif (overflow === 0)\n\t\t\treturn;\n\n\t\t// This happens for example on obj2 and pic of the Calgary corpus\n\t\t// Find the first bit length which could increase:\n\t\tdo {\n\t\t\tbits = max_length - 1;\n\t\t\twhile (s.bl_count[bits] === 0)\n\t\t\t\tbits--;\n\t\t\ts.bl_count[bits]--; // move one leaf down the tree\n\t\t\ts.bl_count[bits + 1] += 2; // move one overflow item as its brother\n\t\t\ts.bl_count[max_length]--;\n\t\t\t// The brother of the overflow item also moves one step up,\n\t\t\t// but this does not affect bl_count[max_length]\n\t\t\toverflow -= 2;\n\t\t} while (overflow > 0);\n\n\t\tfor (bits = max_length; bits !== 0; bits--) {\n\t\t\tn = s.bl_count[bits];\n\t\t\twhile (n !== 0) {\n\t\t\t\tm = s.heap[--h];\n\t\t\t\tif (m > that.max_code)\n\t\t\t\t\tcontinue;\n\t\t\t\tif (tree[m * 2 + 1] != bits) {\n\t\t\t\t\ts.opt_len += (bits - tree[m * 2 + 1]) * tree[m * 2];\n\t\t\t\t\ttree[m * 2 + 1] = bits;\n\t\t\t\t}\n\t\t\t\tn--;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Reverse the first len bits of a code, using straightforward code (a\n\t// faster\n\t// method would use a table)\n\t// IN assertion: 1 <= len <= 15\n\tfunction bi_reverse(code, // the value to invert\n\t\tlen // its bit length\n\t) {\n\t\tlet res = 0;\n\t\tdo {\n\t\t\tres |= code & 1;\n\t\t\tcode >>>= 1;\n\t\t\tres <<= 1;\n\t\t} while (--len > 0);\n\t\treturn res >>> 1;\n\t}\n\n\t// Generate the codes for a given tree and bit counts (which need not be\n\t// optimal).\n\t// IN assertion: the array bl_count contains the bit length statistics for\n\t// the given tree and the field len is set for all tree elements.\n\t// OUT assertion: the field code is set for all tree elements of non\n\t// zero code length.\n\tfunction gen_codes(tree, // the tree to decorate\n\t\tmax_code, // largest code with non zero frequency\n\t\tbl_count // number of codes at each bit length\n\t) {\n\t\tconst next_code = []; // next code value for each\n\t\t// bit length\n\t\tlet code = 0; // running code value\n\t\tlet bits; // bit index\n\t\tlet n; // code index\n\t\tlet len;\n\n\t\t// The distribution counts are first used to generate the code values\n\t\t// without bit reversal.\n\t\tfor (bits = 1; bits <= MAX_BITS; bits++) {\n\t\t\tnext_code[bits] = code = ((code + bl_count[bits - 1]) << 1);\n\t\t}\n\n\t\t// Check that the bit counts in bl_count are consistent. The last code\n\t\t// must be all ones.\n\t\t// Assert (code + bl_count[MAX_BITS]-1 == (1<= 1; n--)\n\t\t\ts.pqdownheap(tree, n);\n\n\t\t// Construct the Huffman tree by repeatedly combining the least two\n\t\t// frequent nodes.\n\n\t\tnode = elems; // next internal node of the tree\n\t\tdo {\n\t\t\t// n = node of least frequency\n\t\t\tn = s.heap[1];\n\t\t\ts.heap[1] = s.heap[s.heap_len--];\n\t\t\ts.pqdownheap(tree, 1);\n\t\t\tm = s.heap[1]; // m = node of next least frequency\n\n\t\t\ts.heap[--s.heap_max] = n; // keep the nodes sorted by frequency\n\t\t\ts.heap[--s.heap_max] = m;\n\n\t\t\t// Create a new node father of n and m\n\t\t\ttree[node * 2] = (tree[n * 2] + tree[m * 2]);\n\t\t\ts.depth[node] = Math.max(s.depth[n], s.depth[m]) + 1;\n\t\t\ttree[n * 2 + 1] = tree[m * 2 + 1] = node;\n\n\t\t\t// and insert the new node in the heap\n\t\t\ts.heap[1] = node++;\n\t\t\ts.pqdownheap(tree, 1);\n\t\t} while (s.heap_len >= 2);\n\n\t\ts.heap[--s.heap_max] = s.heap[1];\n\n\t\t// At this point, the fields freq and dad are set. We can now\n\t\t// generate the bit lengths.\n\n\t\tgen_bitlen(s);\n\n\t\t// The field len is now set, we can generate the bit codes\n\t\tgen_codes(tree, that.max_code, s.bl_count);\n\t};\n\n}\n\nTree._length_code = [0, 1, 2, 3, 4, 5, 6, 7].concat(...extractArray([\n\t[2, 8], [2, 9], [2, 10], [2, 11], [4, 12], [4, 13], [4, 14], [4, 15], [8, 16], [8, 17], [8, 18], [8, 19],\n\t[16, 20], [16, 21], [16, 22], [16, 23], [32, 24], [32, 25], [32, 26], [31, 27], [1, 28]]));\n\nTree.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];\n\nTree.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,\n\t24576];\n\n// Mapping from a distance to a distance code. dist is the distance - 1 and\n// must not have side effects. _dist_code[256] and _dist_code[257] are never\n// used.\nTree.d_code = function (dist) {\n\treturn ((dist) < 256 ? _dist_code[dist] : _dist_code[256 + ((dist) >>> 7)]);\n};\n\n// extra bits for each length code\nTree.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];\n\n// extra bits for each distance code\nTree.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];\n\n// extra bits for each bit length code\nTree.extra_blbits = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7];\n\nTree.bl_order = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15];\n\n// StaticTree\n\nfunction StaticTree(static_tree, extra_bits, extra_base, elems, max_length) {\n\tconst that = this;\n\tthat.static_tree = static_tree;\n\tthat.extra_bits = extra_bits;\n\tthat.extra_base = extra_base;\n\tthat.elems = elems;\n\tthat.max_length = max_length;\n}\n\nconst static_ltree2_first_part = [12, 140, 76, 204, 44, 172, 108, 236, 28, 156, 92, 220, 60, 188, 124, 252, 2, 130, 66, 194, 34, 162, 98, 226, 18, 146, 82,\n\t210, 50, 178, 114, 242, 10, 138, 74, 202, 42, 170, 106, 234, 26, 154, 90, 218, 58, 186, 122, 250, 6, 134, 70, 198, 38, 166, 102, 230, 22, 150, 86,\n\t214, 54, 182, 118, 246, 14, 142, 78, 206, 46, 174, 110, 238, 30, 158, 94, 222, 62, 190, 126, 254, 1, 129, 65, 193, 33, 161, 97, 225, 17, 145, 81,\n\t209, 49, 177, 113, 241, 9, 137, 73, 201, 41, 169, 105, 233, 25, 153, 89, 217, 57, 185, 121, 249, 5, 133, 69, 197, 37, 165, 101, 229, 21, 149, 85,\n\t213, 53, 181, 117, 245, 13, 141, 77, 205, 45, 173, 109, 237, 29, 157, 93, 221, 61, 189, 125, 253, 19, 275, 147, 403, 83, 339, 211, 467, 51, 307,\n\t179, 435, 115, 371, 243, 499, 11, 267, 139, 395, 75, 331, 203, 459, 43, 299, 171, 427, 107, 363, 235, 491, 27, 283, 155, 411, 91, 347, 219, 475,\n\t59, 315, 187, 443, 123, 379, 251, 507, 7, 263, 135, 391, 71, 327, 199, 455, 39, 295, 167, 423, 103, 359, 231, 487, 23, 279, 151, 407, 87, 343, 215,\n\t471, 55, 311, 183, 439, 119, 375, 247, 503, 15, 271, 143, 399, 79, 335, 207, 463, 47, 303, 175, 431, 111, 367, 239, 495, 31, 287, 159, 415, 95,\n\t351, 223, 479, 63, 319, 191, 447, 127, 383, 255, 511, 0, 64, 32, 96, 16, 80, 48, 112, 8, 72, 40, 104, 24, 88, 56, 120, 4, 68, 36, 100, 20, 84, 52,\n\t116, 3, 131, 67, 195, 35, 163, 99, 227];\nconst static_ltree2_second_part = extractArray([[144, 8], [112, 9], [24, 7], [8, 8]]);\nStaticTree.static_ltree = flatArray(static_ltree2_first_part.map((value, index) => [value, static_ltree2_second_part[index]]));\n\nconst static_dtree_first_part = [0, 16, 8, 24, 4, 20, 12, 28, 2, 18, 10, 26, 6, 22, 14, 30, 1, 17, 9, 25, 5, 21, 13, 29, 3, 19, 11, 27, 7, 23];\nconst static_dtree_second_part = extractArray([[30, 5]]);\nStaticTree.static_dtree = flatArray(static_dtree_first_part.map((value, index) => [value, static_dtree_second_part[index]]));\n\nStaticTree.static_l_desc = new StaticTree(StaticTree.static_ltree, Tree.extra_lbits, LITERALS + 1, L_CODES, MAX_BITS);\n\nStaticTree.static_d_desc = new StaticTree(StaticTree.static_dtree, Tree.extra_dbits, 0, D_CODES, MAX_BITS);\n\nStaticTree.static_bl_desc = new StaticTree(null, Tree.extra_blbits, 0, BL_CODES, MAX_BL_BITS);\n\n// Deflate\n\nconst MAX_MEM_LEVEL = 9;\nconst DEF_MEM_LEVEL = 8;\n\nfunction Config(good_length, max_lazy, nice_length, max_chain, func) {\n\tconst that = this;\n\tthat.good_length = good_length;\n\tthat.max_lazy = max_lazy;\n\tthat.nice_length = nice_length;\n\tthat.max_chain = max_chain;\n\tthat.func = func;\n}\n\nconst STORED = 0;\nconst FAST = 1;\nconst SLOW = 2;\nconst config_table = [\n\tnew Config(0, 0, 0, 0, STORED),\n\tnew Config(4, 4, 8, 4, FAST),\n\tnew Config(4, 5, 16, 8, FAST),\n\tnew Config(4, 6, 32, 32, FAST),\n\tnew Config(4, 4, 16, 16, SLOW),\n\tnew Config(8, 16, 32, 32, SLOW),\n\tnew Config(8, 16, 128, 128, SLOW),\n\tnew Config(8, 32, 128, 256, SLOW),\n\tnew Config(32, 128, 258, 1024, SLOW),\n\tnew Config(32, 258, 258, 4096, SLOW)\n];\n\nconst z_errmsg = [\"need dictionary\", // Z_NEED_DICT\n\t// 2\n\t\"stream end\", // Z_STREAM_END 1\n\t\"\", // Z_OK 0\n\t\"\", // Z_ERRNO (-1)\n\t\"stream error\", // Z_STREAM_ERROR (-2)\n\t\"data error\", // Z_DATA_ERROR (-3)\n\t\"\", // Z_MEM_ERROR (-4)\n\t\"buffer error\", // Z_BUF_ERROR (-5)\n\t\"\",// Z_VERSION_ERROR (-6)\n\t\"\"];\n\n// block not completed, need more input or more output\nconst NeedMore = 0;\n\n// block flush performed\nconst BlockDone = 1;\n\n// finish started, need only more output at next deflate\nconst FinishStarted = 2;\n\n// finish done, accept no more input or output\nconst FinishDone = 3;\n\n// preset dictionary flag in zlib header\nconst PRESET_DICT = 0x20;\n\nconst INIT_STATE = 42;\nconst BUSY_STATE = 113;\nconst FINISH_STATE = 666;\n\n// The deflate compression method\nconst Z_DEFLATED = 8;\n\nconst STORED_BLOCK = 0;\nconst STATIC_TREES = 1;\nconst DYN_TREES = 2;\n\nconst MIN_MATCH = 3;\nconst MAX_MATCH = 258;\nconst MIN_LOOKAHEAD = (MAX_MATCH + MIN_MATCH + 1);\n\nfunction smaller(tree, n, m, depth) {\n\tconst tn2 = tree[n * 2];\n\tconst tm2 = tree[m * 2];\n\treturn (tn2 < tm2 || (tn2 == tm2 && depth[n] <= depth[m]));\n}\n\nfunction Deflate() {\n\n\tconst that = this;\n\tlet strm; // pointer back to this zlib stream\n\tlet status; // as the name implies\n\t// pending_buf; // output still pending\n\tlet pending_buf_size; // size of pending_buf\n\t// pending_out; // next pending byte to output to the stream\n\t// pending; // nb of bytes in the pending buffer\n\n\t// dist_buf; // buffer for distances\n\t// lc_buf; // buffer for literals or lengths\n\t// To simplify the code, dist_buf and lc_buf have the same number of elements.\n\t// To use different lengths, an extra flag array would be necessary.\n\n\tlet last_flush; // value of flush param for previous deflate call\n\n\tlet w_size; // LZ77 win size (32K by default)\n\tlet w_bits; // log2(w_size) (8..16)\n\tlet w_mask; // w_size - 1\n\n\tlet win;\n\t// Sliding win. Input bytes are read into the second half of the win,\n\t// and move to the first half later to keep a dictionary of at least wSize\n\t// bytes. With this organization, matches are limited to a distance of\n\t// wSize-MAX_MATCH bytes, but this ensures that IO is always\n\t// performed with a length multiple of the block size. Also, it limits\n\t// the win size to 64K, which is quite useful on MSDOS.\n\t// To do: use the user input buffer as sliding win.\n\n\tlet window_size;\n\t// Actual size of win: 2*wSize, except when the user input buffer\n\t// is directly used as sliding win.\n\n\tlet prev;\n\t// Link to older string with same hash index. To limit the size of this\n\t// array to 64K, this link is maintained only for the last 32K strings.\n\t// An index in this array is thus a win index modulo 32K.\n\n\tlet head; // Heads of the hash chains or NIL.\n\n\tlet ins_h; // hash index of string to be inserted\n\tlet hash_size; // number of elements in hash table\n\tlet hash_bits; // log2(hash_size)\n\tlet hash_mask; // hash_size-1\n\n\t// Number of bits by which ins_h must be shifted at each input\n\t// step. It must be such that after MIN_MATCH steps, the oldest\n\t// byte no longer takes part in the hash key, that is:\n\t// hash_shift * MIN_MATCH >= hash_bits\n\tlet hash_shift;\n\n\t// Window position at the beginning of the current output block. Gets\n\t// negative when the win is moved backwards.\n\n\tlet block_start;\n\n\tlet match_length; // length of best match\n\tlet prev_match; // previous match\n\tlet match_available; // set if previous match exists\n\tlet strstart; // start of string to insert\n\tlet match_start; // start of matching string\n\tlet lookahead; // number of valid bytes ahead in win\n\n\t// Length of the best match at previous step. Matches not greater than this\n\t// are discarded. This is used in the lazy match evaluation.\n\tlet prev_length;\n\n\t// To speed up deflation, hash chains are never searched beyond this\n\t// length. A higher limit improves compression ratio but degrades the speed.\n\tlet max_chain_length;\n\n\t// Attempt to find a better match only when the current match is strictly\n\t// smaller than this value. This mechanism is used only for compression\n\t// levels >= 4.\n\tlet max_lazy_match;\n\n\t// Insert new strings in the hash table only if the match length is not\n\t// greater than this length. This saves time but degrades compression.\n\t// max_insert_length is used only for compression levels <= 3.\n\n\tlet level; // compression level (1..9)\n\tlet strategy; // favor or force Huffman coding\n\n\t// Use a faster search when the previous match is longer than this\n\tlet good_match;\n\n\t// Stop searching when current match exceeds this\n\tlet nice_match;\n\n\tlet dyn_ltree; // literal and length tree\n\tlet dyn_dtree; // distance tree\n\tlet bl_tree; // Huffman tree for bit lengths\n\n\tconst l_desc = new Tree(); // desc for literal tree\n\tconst d_desc = new Tree(); // desc for distance tree\n\tconst bl_desc = new Tree(); // desc for bit length tree\n\n\t// that.heap_len; // number of elements in the heap\n\t// that.heap_max; // element of largest frequency\n\t// The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used.\n\t// The same heap array is used to build all trees.\n\n\t// Depth of each subtree used as tie breaker for trees of equal frequency\n\tthat.depth = [];\n\n\t// Size of match buffer for literals/lengths. There are 4 reasons for\n\t// limiting lit_bufsize to 64K:\n\t// - frequencies can be kept in 16 bit counters\n\t// - if compression is not successful for the first block, all input\n\t// data is still in the win so we can still emit a stored block even\n\t// when input comes from standard input. (This can also be done for\n\t// all blocks if lit_bufsize is not greater than 32K.)\n\t// - if compression is not successful for a file smaller than 64K, we can\n\t// even emit a stored file instead of a stored block (saving 5 bytes).\n\t// This is applicable only for zip (not gzip or zlib).\n\t// - creating new Huffman trees less frequently may not provide fast\n\t// adaptation to changes in the input data statistics. (Take for\n\t// example a binary file with poorly compressible code followed by\n\t// a highly compressible string table.) Smaller buffer sizes give\n\t// fast adaptation but have of course the overhead of transmitting\n\t// trees more frequently.\n\t// - I can't count above 4\n\tlet lit_bufsize;\n\n\tlet last_lit; // running index in dist_buf and lc_buf\n\n\t// that.opt_len; // bit length of current block with optimal trees\n\t// that.static_len; // bit length of current block with static trees\n\tlet matches; // number of string matches in current block\n\tlet last_eob_len; // bit length of EOB code for last block\n\n\t// Output buffer. bits are inserted starting at the bottom (least\n\t// significant bits).\n\tlet bi_buf;\n\n\t// Number of valid bits in bi_buf. All bits above the last valid bit\n\t// are always zero.\n\tlet bi_valid;\n\n\t// number of codes at each bit length for an optimal tree\n\tthat.bl_count = [];\n\n\t// heap used to build the Huffman trees\n\tthat.heap = [];\n\n\tdyn_ltree = [];\n\tdyn_dtree = [];\n\tbl_tree = [];\n\n\tfunction lm_init() {\n\t\twindow_size = 2 * w_size;\n\n\t\thead[hash_size - 1] = 0;\n\t\tfor (let i = 0; i < hash_size - 1; i++) {\n\t\t\thead[i] = 0;\n\t\t}\n\n\t\t// Set the default configuration parameters:\n\t\tmax_lazy_match = config_table[level].max_lazy;\n\t\tgood_match = config_table[level].good_length;\n\t\tnice_match = config_table[level].nice_length;\n\t\tmax_chain_length = config_table[level].max_chain;\n\n\t\tstrstart = 0;\n\t\tblock_start = 0;\n\t\tlookahead = 0;\n\t\tmatch_length = prev_length = MIN_MATCH - 1;\n\t\tmatch_available = 0;\n\t\tins_h = 0;\n\t}\n\n\tfunction init_block() {\n\t\tlet i;\n\t\t// Initialize the trees.\n\t\tfor (i = 0; i < L_CODES; i++)\n\t\t\tdyn_ltree[i * 2] = 0;\n\t\tfor (i = 0; i < D_CODES; i++)\n\t\t\tdyn_dtree[i * 2] = 0;\n\t\tfor (i = 0; i < BL_CODES; i++)\n\t\t\tbl_tree[i * 2] = 0;\n\n\t\tdyn_ltree[END_BLOCK * 2] = 1;\n\t\tthat.opt_len = that.static_len = 0;\n\t\tlast_lit = matches = 0;\n\t}\n\n\t// Initialize the tree data structures for a new zlib stream.\n\tfunction tr_init() {\n\n\t\tl_desc.dyn_tree = dyn_ltree;\n\t\tl_desc.stat_desc = StaticTree.static_l_desc;\n\n\t\td_desc.dyn_tree = dyn_dtree;\n\t\td_desc.stat_desc = StaticTree.static_d_desc;\n\n\t\tbl_desc.dyn_tree = bl_tree;\n\t\tbl_desc.stat_desc = StaticTree.static_bl_desc;\n\n\t\tbi_buf = 0;\n\t\tbi_valid = 0;\n\t\tlast_eob_len = 8; // enough lookahead for inflate\n\n\t\t// Initialize the first block of the first file:\n\t\tinit_block();\n\t}\n\n\t// Restore the heap property by moving down the tree starting at node k,\n\t// exchanging a node with the smallest of its two sons if necessary,\n\t// stopping\n\t// when the heap property is re-established (each father smaller than its\n\t// two sons).\n\tthat.pqdownheap = function (tree, // the tree to restore\n\t\tk // node to move down\n\t) {\n\t\tconst heap = that.heap;\n\t\tconst v = heap[k];\n\t\tlet j = k << 1; // left son of k\n\t\twhile (j <= that.heap_len) {\n\t\t\t// Set j to the smallest of the two sons:\n\t\t\tif (j < that.heap_len && smaller(tree, heap[j + 1], heap[j], that.depth)) {\n\t\t\t\tj++;\n\t\t\t}\n\t\t\t// Exit if v is smaller than both sons\n\t\t\tif (smaller(tree, v, heap[j], that.depth))\n\t\t\t\tbreak;\n\n\t\t\t// Exchange v with the smallest son\n\t\t\theap[k] = heap[j];\n\t\t\tk = j;\n\t\t\t// And continue down the tree, setting j to the left son of k\n\t\t\tj <<= 1;\n\t\t}\n\t\theap[k] = v;\n\t};\n\n\t// Scan a literal or distance tree to determine the frequencies of the codes\n\t// in the bit length tree.\n\tfunction scan_tree(tree,// the tree to be scanned\n\t\tmax_code // and its largest code of non zero frequency\n\t) {\n\t\tlet prevlen = -1; // last emitted length\n\t\tlet curlen; // length of current code\n\t\tlet nextlen = tree[0 * 2 + 1]; // length of next code\n\t\tlet count = 0; // repeat count of the current code\n\t\tlet max_count = 7; // max repeat count\n\t\tlet min_count = 4; // min repeat count\n\n\t\tif (nextlen === 0) {\n\t\t\tmax_count = 138;\n\t\t\tmin_count = 3;\n\t\t}\n\t\ttree[(max_code + 1) * 2 + 1] = 0xffff; // guard\n\n\t\tfor (let n = 0; n <= max_code; n++) {\n\t\t\tcurlen = nextlen;\n\t\t\tnextlen = tree[(n + 1) * 2 + 1];\n\t\t\tif (++count < max_count && curlen == nextlen) {\n\t\t\t\tcontinue;\n\t\t\t} else if (count < min_count) {\n\t\t\t\tbl_tree[curlen * 2] += count;\n\t\t\t} else if (curlen !== 0) {\n\t\t\t\tif (curlen != prevlen)\n\t\t\t\t\tbl_tree[curlen * 2]++;\n\t\t\t\tbl_tree[REP_3_6 * 2]++;\n\t\t\t} else if (count <= 10) {\n\t\t\t\tbl_tree[REPZ_3_10 * 2]++;\n\t\t\t} else {\n\t\t\t\tbl_tree[REPZ_11_138 * 2]++;\n\t\t\t}\n\t\t\tcount = 0;\n\t\t\tprevlen = curlen;\n\t\t\tif (nextlen === 0) {\n\t\t\t\tmax_count = 138;\n\t\t\t\tmin_count = 3;\n\t\t\t} else if (curlen == nextlen) {\n\t\t\t\tmax_count = 6;\n\t\t\t\tmin_count = 3;\n\t\t\t} else {\n\t\t\t\tmax_count = 7;\n\t\t\t\tmin_count = 4;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Construct the Huffman tree for the bit lengths and return the index in\n\t// bl_order of the last bit length code to send.\n\tfunction build_bl_tree() {\n\t\tlet max_blindex; // index of last bit length code of non zero freq\n\n\t\t// Determine the bit length frequencies for literal and distance trees\n\t\tscan_tree(dyn_ltree, l_desc.max_code);\n\t\tscan_tree(dyn_dtree, d_desc.max_code);\n\n\t\t// Build the bit length tree:\n\t\tbl_desc.build_tree(that);\n\t\t// opt_len now includes the length of the tree representations, except\n\t\t// the lengths of the bit lengths codes and the 5+5+4 bits for the\n\t\t// counts.\n\n\t\t// Determine the number of bit length codes to send. The pkzip format\n\t\t// requires that at least 4 bit length codes be sent. (appnote.txt says\n\t\t// 3 but the actual value used is 4.)\n\t\tfor (max_blindex = BL_CODES - 1; max_blindex >= 3; max_blindex--) {\n\t\t\tif (bl_tree[Tree.bl_order[max_blindex] * 2 + 1] !== 0)\n\t\t\t\tbreak;\n\t\t}\n\t\t// Update opt_len to include the bit length tree and counts\n\t\tthat.opt_len += 3 * (max_blindex + 1) + 5 + 5 + 4;\n\n\t\treturn max_blindex;\n\t}\n\n\t// Output a byte on the stream.\n\t// IN assertion: there is enough room in pending_buf.\n\tfunction put_byte(p) {\n\t\tthat.pending_buf[that.pending++] = p;\n\t}\n\n\tfunction put_short(w) {\n\t\tput_byte(w & 0xff);\n\t\tput_byte((w >>> 8) & 0xff);\n\t}\n\n\tfunction putShortMSB(b) {\n\t\tput_byte((b >> 8) & 0xff);\n\t\tput_byte((b & 0xff) & 0xff);\n\t}\n\n\tfunction send_bits(value, length) {\n\t\tlet val;\n\t\tconst len = length;\n\t\tif (bi_valid > Buf_size - len) {\n\t\t\tval = value;\n\t\t\t// bi_buf |= (val << bi_valid);\n\t\t\tbi_buf |= ((val << bi_valid) & 0xffff);\n\t\t\tput_short(bi_buf);\n\t\t\tbi_buf = val >>> (Buf_size - bi_valid);\n\t\t\tbi_valid += len - Buf_size;\n\t\t} else {\n\t\t\t// bi_buf |= (value) << bi_valid;\n\t\t\tbi_buf |= (((value) << bi_valid) & 0xffff);\n\t\t\tbi_valid += len;\n\t\t}\n\t}\n\n\tfunction send_code(c, tree) {\n\t\tconst c2 = c * 2;\n\t\tsend_bits(tree[c2] & 0xffff, tree[c2 + 1] & 0xffff);\n\t}\n\n\t// Send a literal or distance tree in compressed form, using the codes in\n\t// bl_tree.\n\tfunction send_tree(tree,// the tree to be sent\n\t\tmax_code // and its largest code of non zero frequency\n\t) {\n\t\tlet n; // iterates over all tree elements\n\t\tlet prevlen = -1; // last emitted length\n\t\tlet curlen; // length of current code\n\t\tlet nextlen = tree[0 * 2 + 1]; // length of next code\n\t\tlet count = 0; // repeat count of the current code\n\t\tlet max_count = 7; // max repeat count\n\t\tlet min_count = 4; // min repeat count\n\n\t\tif (nextlen === 0) {\n\t\t\tmax_count = 138;\n\t\t\tmin_count = 3;\n\t\t}\n\n\t\tfor (n = 0; n <= max_code; n++) {\n\t\t\tcurlen = nextlen;\n\t\t\tnextlen = tree[(n + 1) * 2 + 1];\n\t\t\tif (++count < max_count && curlen == nextlen) {\n\t\t\t\tcontinue;\n\t\t\t} else if (count < min_count) {\n\t\t\t\tdo {\n\t\t\t\t\tsend_code(curlen, bl_tree);\n\t\t\t\t} while (--count !== 0);\n\t\t\t} else if (curlen !== 0) {\n\t\t\t\tif (curlen != prevlen) {\n\t\t\t\t\tsend_code(curlen, bl_tree);\n\t\t\t\t\tcount--;\n\t\t\t\t}\n\t\t\t\tsend_code(REP_3_6, bl_tree);\n\t\t\t\tsend_bits(count - 3, 2);\n\t\t\t} else if (count <= 10) {\n\t\t\t\tsend_code(REPZ_3_10, bl_tree);\n\t\t\t\tsend_bits(count - 3, 3);\n\t\t\t} else {\n\t\t\t\tsend_code(REPZ_11_138, bl_tree);\n\t\t\t\tsend_bits(count - 11, 7);\n\t\t\t}\n\t\t\tcount = 0;\n\t\t\tprevlen = curlen;\n\t\t\tif (nextlen === 0) {\n\t\t\t\tmax_count = 138;\n\t\t\t\tmin_count = 3;\n\t\t\t} else if (curlen == nextlen) {\n\t\t\t\tmax_count = 6;\n\t\t\t\tmin_count = 3;\n\t\t\t} else {\n\t\t\t\tmax_count = 7;\n\t\t\t\tmin_count = 4;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Send the header for a block using dynamic Huffman trees: the counts, the\n\t// lengths of the bit length codes, the literal tree and the distance tree.\n\t// IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4.\n\tfunction send_all_trees(lcodes, dcodes, blcodes) {\n\t\tlet rank; // index in bl_order\n\n\t\tsend_bits(lcodes - 257, 5); // not +255 as stated in appnote.txt\n\t\tsend_bits(dcodes - 1, 5);\n\t\tsend_bits(blcodes - 4, 4); // not -3 as stated in appnote.txt\n\t\tfor (rank = 0; rank < blcodes; rank++) {\n\t\t\tsend_bits(bl_tree[Tree.bl_order[rank] * 2 + 1], 3);\n\t\t}\n\t\tsend_tree(dyn_ltree, lcodes - 1); // literal tree\n\t\tsend_tree(dyn_dtree, dcodes - 1); // distance tree\n\t}\n\n\t// Flush the bit buffer, keeping at most 7 bits in it.\n\tfunction bi_flush() {\n\t\tif (bi_valid == 16) {\n\t\t\tput_short(bi_buf);\n\t\t\tbi_buf = 0;\n\t\t\tbi_valid = 0;\n\t\t} else if (bi_valid >= 8) {\n\t\t\tput_byte(bi_buf & 0xff);\n\t\t\tbi_buf >>>= 8;\n\t\t\tbi_valid -= 8;\n\t\t}\n\t}\n\n\t// Send one empty static block to give enough lookahead for inflate.\n\t// This takes 10 bits, of which 7 may remain in the bit buffer.\n\t// The current inflate code requires 9 bits of lookahead. If the\n\t// last two codes for the previous block (real code plus EOB) were coded\n\t// on 5 bits or less, inflate may have only 5+3 bits of lookahead to decode\n\t// the last real code. In this case we send two empty static blocks instead\n\t// of one. (There are no problems if the previous block is stored or fixed.)\n\t// To simplify the code, we assume the worst case of last real code encoded\n\t// on one bit only.\n\tfunction _tr_align() {\n\t\tsend_bits(STATIC_TREES << 1, 3);\n\t\tsend_code(END_BLOCK, StaticTree.static_ltree);\n\n\t\tbi_flush();\n\n\t\t// Of the 10 bits for the empty block, we have already sent\n\t\t// (10 - bi_valid) bits. The lookahead for the last real code (before\n\t\t// the EOB of the previous block) was thus at least one plus the length\n\t\t// of the EOB plus what we have just sent of the empty static block.\n\t\tif (1 + last_eob_len + 10 - bi_valid < 9) {\n\t\t\tsend_bits(STATIC_TREES << 1, 3);\n\t\t\tsend_code(END_BLOCK, StaticTree.static_ltree);\n\t\t\tbi_flush();\n\t\t}\n\t\tlast_eob_len = 7;\n\t}\n\n\t// Save the match info and tally the frequency counts. Return true if\n\t// the current block must be flushed.\n\tfunction _tr_tally(dist, // distance of matched string\n\t\tlc // match length-MIN_MATCH or unmatched char (if dist==0)\n\t) {\n\t\tlet out_length, in_length, dcode;\n\t\tthat.dist_buf[last_lit] = dist;\n\t\tthat.lc_buf[last_lit] = lc & 0xff;\n\t\tlast_lit++;\n\n\t\tif (dist === 0) {\n\t\t\t// lc is the unmatched char\n\t\t\tdyn_ltree[lc * 2]++;\n\t\t} else {\n\t\t\tmatches++;\n\t\t\t// Here, lc is the match length - MIN_MATCH\n\t\t\tdist--; // dist = match distance - 1\n\t\t\tdyn_ltree[(Tree._length_code[lc] + LITERALS + 1) * 2]++;\n\t\t\tdyn_dtree[Tree.d_code(dist) * 2]++;\n\t\t}\n\n\t\tif ((last_lit & 0x1fff) === 0 && level > 2) {\n\t\t\t// Compute an upper bound for the compressed length\n\t\t\tout_length = last_lit * 8;\n\t\t\tin_length = strstart - block_start;\n\t\t\tfor (dcode = 0; dcode < D_CODES; dcode++) {\n\t\t\t\tout_length += dyn_dtree[dcode * 2] * (5 + Tree.extra_dbits[dcode]);\n\t\t\t}\n\t\t\tout_length >>>= 3;\n\t\t\tif ((matches < Math.floor(last_lit / 2)) && out_length < Math.floor(in_length / 2))\n\t\t\t\treturn true;\n\t\t}\n\n\t\treturn (last_lit == lit_bufsize - 1);\n\t\t// We avoid equality with lit_bufsize because of wraparound at 64K\n\t\t// on 16 bit machines and because stored blocks are restricted to\n\t\t// 64K-1 bytes.\n\t}\n\n\t// Send the block data compressed using the given Huffman trees\n\tfunction compress_block(ltree, dtree) {\n\t\tlet dist; // distance of matched string\n\t\tlet lc; // match length or unmatched char (if dist === 0)\n\t\tlet lx = 0; // running index in dist_buf and lc_buf\n\t\tlet code; // the code to send\n\t\tlet extra; // number of extra bits to send\n\n\t\tif (last_lit !== 0) {\n\t\t\tdo {\n\t\t\t\tdist = that.dist_buf[lx];\n\t\t\t\tlc = that.lc_buf[lx];\n\t\t\t\tlx++;\n\n\t\t\t\tif (dist === 0) {\n\t\t\t\t\tsend_code(lc, ltree); // send a literal byte\n\t\t\t\t} else {\n\t\t\t\t\t// Here, lc is the match length - MIN_MATCH\n\t\t\t\t\tcode = Tree._length_code[lc];\n\n\t\t\t\t\tsend_code(code + LITERALS + 1, ltree); // send the length\n\t\t\t\t\t// code\n\t\t\t\t\textra = Tree.extra_lbits[code];\n\t\t\t\t\tif (extra !== 0) {\n\t\t\t\t\t\tlc -= Tree.base_length[code];\n\t\t\t\t\t\tsend_bits(lc, extra); // send the extra length bits\n\t\t\t\t\t}\n\t\t\t\t\tdist--; // dist is now the match distance - 1\n\t\t\t\t\tcode = Tree.d_code(dist);\n\n\t\t\t\t\tsend_code(code, dtree); // send the distance code\n\t\t\t\t\textra = Tree.extra_dbits[code];\n\t\t\t\t\tif (extra !== 0) {\n\t\t\t\t\t\tdist -= Tree.base_dist[code];\n\t\t\t\t\t\tsend_bits(dist, extra); // send the extra distance bits\n\t\t\t\t\t}\n\t\t\t\t} // literal or match pair ?\n\t\t\t} while (lx < last_lit);\n\t\t}\n\n\t\tsend_code(END_BLOCK, ltree);\n\t\tlast_eob_len = ltree[END_BLOCK * 2 + 1];\n\t}\n\n\t// Flush the bit buffer and align the output on a byte boundary\n\tfunction bi_windup() {\n\t\tif (bi_valid > 8) {\n\t\t\tput_short(bi_buf);\n\t\t} else if (bi_valid > 0) {\n\t\t\tput_byte(bi_buf & 0xff);\n\t\t}\n\t\tbi_buf = 0;\n\t\tbi_valid = 0;\n\t}\n\n\t// Copy a stored block, storing first the length and its\n\t// one's complement if requested.\n\tfunction copy_block(buf, // the input data\n\t\tlen, // its length\n\t\theader // true if block header must be written\n\t) {\n\t\tbi_windup(); // align on byte boundary\n\t\tlast_eob_len = 8; // enough lookahead for inflate\n\n\t\tif (header) {\n\t\t\tput_short(len);\n\t\t\tput_short(~len);\n\t\t}\n\n\t\tthat.pending_buf.set(win.subarray(buf, buf + len), that.pending);\n\t\tthat.pending += len;\n\t}\n\n\t// Send a stored block\n\tfunction _tr_stored_block(buf, // input block\n\t\tstored_len, // length of input block\n\t\teof // true if this is the last block for a file\n\t) {\n\t\tsend_bits((STORED_BLOCK << 1) + (eof ? 1 : 0), 3); // send block type\n\t\tcopy_block(buf, stored_len, true); // with header\n\t}\n\n\t// Determine the best encoding for the current block: dynamic trees, static\n\t// trees or store, and output the encoded block to the zip file.\n\tfunction _tr_flush_block(buf, // input block, or NULL if too old\n\t\tstored_len, // length of input block\n\t\teof // true if this is the last block for a file\n\t) {\n\t\tlet opt_lenb, static_lenb;// opt_len and static_len in bytes\n\t\tlet max_blindex = 0; // index of last bit length code of non zero freq\n\n\t\t// Build the Huffman trees unless a stored block is forced\n\t\tif (level > 0) {\n\t\t\t// Construct the literal and distance trees\n\t\t\tl_desc.build_tree(that);\n\n\t\t\td_desc.build_tree(that);\n\n\t\t\t// At this point, opt_len and static_len are the total bit lengths\n\t\t\t// of\n\t\t\t// the compressed block data, excluding the tree representations.\n\n\t\t\t// Build the bit length tree for the above two trees, and get the\n\t\t\t// index\n\t\t\t// in bl_order of the last bit length code to send.\n\t\t\tmax_blindex = build_bl_tree();\n\n\t\t\t// Determine the best encoding. Compute first the block length in\n\t\t\t// bytes\n\t\t\topt_lenb = (that.opt_len + 3 + 7) >>> 3;\n\t\t\tstatic_lenb = (that.static_len + 3 + 7) >>> 3;\n\n\t\t\tif (static_lenb <= opt_lenb)\n\t\t\t\topt_lenb = static_lenb;\n\t\t} else {\n\t\t\topt_lenb = static_lenb = stored_len + 5; // force a stored block\n\t\t}\n\n\t\tif ((stored_len + 4 <= opt_lenb) && buf != -1) {\n\t\t\t// 4: two words for the lengths\n\t\t\t// The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE.\n\t\t\t// Otherwise we can't have processed more than WSIZE input bytes\n\t\t\t// since\n\t\t\t// the last block flush, because compression would have been\n\t\t\t// successful. If LIT_BUFSIZE <= WSIZE, it is never too late to\n\t\t\t// transform a block into a stored block.\n\t\t\t_tr_stored_block(buf, stored_len, eof);\n\t\t} else if (static_lenb == opt_lenb) {\n\t\t\tsend_bits((STATIC_TREES << 1) + (eof ? 1 : 0), 3);\n\t\t\tcompress_block(StaticTree.static_ltree, StaticTree.static_dtree);\n\t\t} else {\n\t\t\tsend_bits((DYN_TREES << 1) + (eof ? 1 : 0), 3);\n\t\t\tsend_all_trees(l_desc.max_code + 1, d_desc.max_code + 1, max_blindex + 1);\n\t\t\tcompress_block(dyn_ltree, dyn_dtree);\n\t\t}\n\n\t\t// The above check is made mod 2^32, for files larger than 512 MB\n\t\t// and uLong implemented on 32 bits.\n\n\t\tinit_block();\n\n\t\tif (eof) {\n\t\t\tbi_windup();\n\t\t}\n\t}\n\n\tfunction flush_block_only(eof) {\n\t\t_tr_flush_block(block_start >= 0 ? block_start : -1, strstart - block_start, eof);\n\t\tblock_start = strstart;\n\t\tstrm.flush_pending();\n\t}\n\n\t// Fill the win when the lookahead becomes insufficient.\n\t// Updates strstart and lookahead.\n\t//\n\t// IN assertion: lookahead < MIN_LOOKAHEAD\n\t// OUT assertions: strstart <= window_size-MIN_LOOKAHEAD\n\t// At least one byte has been read, or avail_in === 0; reads are\n\t// performed for at least two bytes (required for the zip translate_eol\n\t// option -- not supported here).\n\tfunction fill_window() {\n\t\tlet n, m;\n\t\tlet p;\n\t\tlet more; // Amount of free space at the end of the win.\n\n\t\tdo {\n\t\t\tmore = (window_size - lookahead - strstart);\n\n\t\t\t// Deal with !@#$% 64K limit:\n\t\t\tif (more === 0 && strstart === 0 && lookahead === 0) {\n\t\t\t\tmore = w_size;\n\t\t\t} else if (more == -1) {\n\t\t\t\t// Very unlikely, but possible on 16 bit machine if strstart ==\n\t\t\t\t// 0\n\t\t\t\t// and lookahead == 1 (input done one byte at time)\n\t\t\t\tmore--;\n\n\t\t\t\t// If the win is almost full and there is insufficient\n\t\t\t\t// lookahead,\n\t\t\t\t// move the upper half to the lower one to make room in the\n\t\t\t\t// upper half.\n\t\t\t} else if (strstart >= w_size + w_size - MIN_LOOKAHEAD) {\n\t\t\t\twin.set(win.subarray(w_size, w_size + w_size), 0);\n\n\t\t\t\tmatch_start -= w_size;\n\t\t\t\tstrstart -= w_size; // we now have strstart >= MAX_DIST\n\t\t\t\tblock_start -= w_size;\n\n\t\t\t\t// Slide the hash table (could be avoided with 32 bit values\n\t\t\t\t// at the expense of memory usage). We slide even when level ==\n\t\t\t\t// 0\n\t\t\t\t// to keep the hash table consistent if we switch back to level\n\t\t\t\t// > 0\n\t\t\t\t// later. (Using level 0 permanently is not an optimal usage of\n\t\t\t\t// zlib, so we don't care about this pathological case.)\n\n\t\t\t\tn = hash_size;\n\t\t\t\tp = n;\n\t\t\t\tdo {\n\t\t\t\t\tm = (head[--p] & 0xffff);\n\t\t\t\t\thead[p] = (m >= w_size ? m - w_size : 0);\n\t\t\t\t} while (--n !== 0);\n\n\t\t\t\tn = w_size;\n\t\t\t\tp = n;\n\t\t\t\tdo {\n\t\t\t\t\tm = (prev[--p] & 0xffff);\n\t\t\t\t\tprev[p] = (m >= w_size ? m - w_size : 0);\n\t\t\t\t\t// If n is not on any hash chain, prev[n] is garbage but\n\t\t\t\t\t// its value will never be used.\n\t\t\t\t} while (--n !== 0);\n\t\t\t\tmore += w_size;\n\t\t\t}\n\n\t\t\tif (strm.avail_in === 0)\n\t\t\t\treturn;\n\n\t\t\t// If there was no sliding:\n\t\t\t// strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 &&\n\t\t\t// more == window_size - lookahead - strstart\n\t\t\t// => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1)\n\t\t\t// => more >= window_size - 2*WSIZE + 2\n\t\t\t// In the BIG_MEM or MMAP case (not yet supported),\n\t\t\t// window_size == input_size + MIN_LOOKAHEAD &&\n\t\t\t// strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD.\n\t\t\t// Otherwise, window_size == 2*WSIZE so more >= 2.\n\t\t\t// If there was sliding, more >= WSIZE. So in all cases, more >= 2.\n\n\t\t\tn = strm.read_buf(win, strstart + lookahead, more);\n\t\t\tlookahead += n;\n\n\t\t\t// Initialize the hash value now that we have some input:\n\t\t\tif (lookahead >= MIN_MATCH) {\n\t\t\t\tins_h = win[strstart] & 0xff;\n\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[strstart + 1] & 0xff)) & hash_mask;\n\t\t\t}\n\t\t\t// If the whole input has less than MIN_MATCH bytes, ins_h is\n\t\t\t// garbage,\n\t\t\t// but this is not important since only literal bytes will be\n\t\t\t// emitted.\n\t\t} while (lookahead < MIN_LOOKAHEAD && strm.avail_in !== 0);\n\t}\n\n\t// Copy without compression as much as possible from the input stream,\n\t// return\n\t// the current block state.\n\t// This function does not insert new strings in the dictionary since\n\t// uncompressible data is probably not useful. This function is used\n\t// only for the level=0 compression option.\n\t// NOTE: this function should be optimized to avoid extra copying from\n\t// win to pending_buf.\n\tfunction deflate_stored(flush) {\n\t\t// Stored blocks are limited to 0xffff bytes, pending_buf is limited\n\t\t// to pending_buf_size, and each stored block has a 5 byte header:\n\n\t\tlet max_block_size = 0xffff;\n\t\tlet max_start;\n\n\t\tif (max_block_size > pending_buf_size - 5) {\n\t\t\tmax_block_size = pending_buf_size - 5;\n\t\t}\n\n\t\t// Copy as much as possible from input to output:\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\t// Fill the win as much as possible:\n\t\t\tif (lookahead <= 1) {\n\t\t\t\tfill_window();\n\t\t\t\tif (lookahead === 0 && flush == Z_NO_FLUSH)\n\t\t\t\t\treturn NeedMore;\n\t\t\t\tif (lookahead === 0)\n\t\t\t\t\tbreak; // flush the current block\n\t\t\t}\n\n\t\t\tstrstart += lookahead;\n\t\t\tlookahead = 0;\n\n\t\t\t// Emit a stored block if pending_buf will be full:\n\t\t\tmax_start = block_start + max_block_size;\n\t\t\tif (strstart === 0 || strstart >= max_start) {\n\t\t\t\t// strstart === 0 is possible when wraparound on 16-bit machine\n\t\t\t\tlookahead = (strstart - max_start);\n\t\t\t\tstrstart = max_start;\n\n\t\t\t\tflush_block_only(false);\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\n\t\t\t}\n\n\t\t\t// Flush if we may have to slide, otherwise block_start may become\n\t\t\t// negative and the data will be gone:\n\t\t\tif (strstart - block_start >= w_size - MIN_LOOKAHEAD) {\n\t\t\t\tflush_block_only(false);\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\t\t\t}\n\t\t}\n\n\t\tflush_block_only(flush == Z_FINISH);\n\t\tif (strm.avail_out === 0)\n\t\t\treturn (flush == Z_FINISH) ? FinishStarted : NeedMore;\n\n\t\treturn flush == Z_FINISH ? FinishDone : BlockDone;\n\t}\n\n\tfunction longest_match(cur_match) {\n\t\tlet chain_length = max_chain_length; // max hash chain length\n\t\tlet scan = strstart; // current string\n\t\tlet match; // matched string\n\t\tlet len; // length of current match\n\t\tlet best_len = prev_length; // best match length so far\n\t\tconst limit = strstart > (w_size - MIN_LOOKAHEAD) ? strstart - (w_size - MIN_LOOKAHEAD) : 0;\n\t\tlet _nice_match = nice_match;\n\n\t\t// Stop when cur_match becomes <= limit. To simplify the code,\n\t\t// we prevent matches with the string of win index 0.\n\n\t\tconst wmask = w_mask;\n\n\t\tconst strend = strstart + MAX_MATCH;\n\t\tlet scan_end1 = win[scan + best_len - 1];\n\t\tlet scan_end = win[scan + best_len];\n\n\t\t// The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of\n\t\t// 16.\n\t\t// It is easy to get rid of this optimization if necessary.\n\n\t\t// Do not waste too much time if we already have a good match:\n\t\tif (prev_length >= good_match) {\n\t\t\tchain_length >>= 2;\n\t\t}\n\n\t\t// Do not look for matches beyond the end of the input. This is\n\t\t// necessary\n\t\t// to make deflate deterministic.\n\t\tif (_nice_match > lookahead)\n\t\t\t_nice_match = lookahead;\n\n\t\tdo {\n\t\t\tmatch = cur_match;\n\n\t\t\t// Skip to next match if the match length cannot increase\n\t\t\t// or if the match length is less than 2:\n\t\t\tif (win[match + best_len] != scan_end || win[match + best_len - 1] != scan_end1 || win[match] != win[scan]\n\t\t\t\t|| win[++match] != win[scan + 1])\n\t\t\t\tcontinue;\n\n\t\t\t// The check at best_len-1 can be removed because it will be made\n\t\t\t// again later. (This heuristic is not always a win.)\n\t\t\t// It is not necessary to compare scan[2] and match[2] since they\n\t\t\t// are always equal when the other bytes match, given that\n\t\t\t// the hash keys are equal and that HASH_BITS >= 8.\n\t\t\tscan += 2;\n\t\t\tmatch++;\n\n\t\t\t// We check for insufficient lookahead only every 8th comparison;\n\t\t\t// the 256th check will be made at strstart+258.\n\t\t\t// eslint-disable-next-line no-empty\n\t\t\tdo {\n\t\t\t\t// empty block\n\t\t\t} while (win[++scan] == win[++match] && win[++scan] == win[++match] && win[++scan] == win[++match]\n\t\t\t&& win[++scan] == win[++match] && win[++scan] == win[++match] && win[++scan] == win[++match]\n\t\t\t&& win[++scan] == win[++match] && win[++scan] == win[++match] && scan < strend);\n\n\t\t\tlen = MAX_MATCH - (strend - scan);\n\t\t\tscan = strend - MAX_MATCH;\n\n\t\t\tif (len > best_len) {\n\t\t\t\tmatch_start = cur_match;\n\t\t\t\tbest_len = len;\n\t\t\t\tif (len >= _nice_match)\n\t\t\t\t\tbreak;\n\t\t\t\tscan_end1 = win[scan + best_len - 1];\n\t\t\t\tscan_end = win[scan + best_len];\n\t\t\t}\n\n\t\t} while ((cur_match = (prev[cur_match & wmask] & 0xffff)) > limit && --chain_length !== 0);\n\n\t\tif (best_len <= lookahead)\n\t\t\treturn best_len;\n\t\treturn lookahead;\n\t}\n\n\t// Compress as much as possible from the input stream, return the current\n\t// block state.\n\t// This function does not perform lazy evaluation of matches and inserts\n\t// new strings in the dictionary only for unmatched strings or for short\n\t// matches. It is used only for the fast compression options.\n\tfunction deflate_fast(flush) {\n\t\t// short hash_head = 0; // head of the hash chain\n\t\tlet hash_head = 0; // head of the hash chain\n\t\tlet bflush; // set if current block must be flushed\n\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\t// Make sure that we always have enough lookahead, except\n\t\t\t// at the end of the input file. We need MAX_MATCH bytes\n\t\t\t// for the next match, plus MIN_MATCH bytes to insert the\n\t\t\t// string following the next match.\n\t\t\tif (lookahead < MIN_LOOKAHEAD) {\n\t\t\t\tfill_window();\n\t\t\t\tif (lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) {\n\t\t\t\t\treturn NeedMore;\n\t\t\t\t}\n\t\t\t\tif (lookahead === 0)\n\t\t\t\t\tbreak; // flush the current block\n\t\t\t}\n\n\t\t\t// Insert the string win[strstart .. strstart+2] in the\n\t\t\t// dictionary, and set hash_head to the head of the hash chain:\n\t\t\tif (lookahead >= MIN_MATCH) {\n\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\n\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\thead[ins_h] = strstart;\n\t\t\t}\n\n\t\t\t// Find the longest match, discarding those <= prev_length.\n\t\t\t// At this point we have always match_length < MIN_MATCH\n\n\t\t\tif (hash_head !== 0 && ((strstart - hash_head) & 0xffff) <= w_size - MIN_LOOKAHEAD) {\n\t\t\t\t// To simplify the code, we prevent matches with the string\n\t\t\t\t// of win index 0 (in particular we have to avoid a match\n\t\t\t\t// of the string with itself at the start of the input file).\n\t\t\t\tif (strategy != Z_HUFFMAN_ONLY) {\n\t\t\t\t\tmatch_length = longest_match(hash_head);\n\t\t\t\t}\n\t\t\t\t// longest_match() sets match_start\n\t\t\t}\n\t\t\tif (match_length >= MIN_MATCH) {\n\t\t\t\t// check_match(strstart, match_start, match_length);\n\n\t\t\t\tbflush = _tr_tally(strstart - match_start, match_length - MIN_MATCH);\n\n\t\t\t\tlookahead -= match_length;\n\n\t\t\t\t// Insert new strings in the hash table only if the match length\n\t\t\t\t// is not too large. This saves time but degrades compression.\n\t\t\t\tif (match_length <= max_lazy_match && lookahead >= MIN_MATCH) {\n\t\t\t\t\tmatch_length--; // string at strstart already in hash table\n\t\t\t\t\tdo {\n\t\t\t\t\t\tstrstart++;\n\n\t\t\t\t\t\tins_h = ((ins_h << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\t\t\thead[ins_h] = strstart;\n\n\t\t\t\t\t\t// strstart never exceeds WSIZE-MAX_MATCH, so there are\n\t\t\t\t\t\t// always MIN_MATCH bytes ahead.\n\t\t\t\t\t} while (--match_length !== 0);\n\t\t\t\t\tstrstart++;\n\t\t\t\t} else {\n\t\t\t\t\tstrstart += match_length;\n\t\t\t\t\tmatch_length = 0;\n\t\t\t\t\tins_h = win[strstart] & 0xff;\n\n\t\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[strstart + 1] & 0xff)) & hash_mask;\n\t\t\t\t\t// If lookahead < MIN_MATCH, ins_h is garbage, but it does\n\t\t\t\t\t// not\n\t\t\t\t\t// matter since it will be recomputed at next deflate call.\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// No match, output a literal byte\n\n\t\t\t\tbflush = _tr_tally(0, win[strstart] & 0xff);\n\t\t\t\tlookahead--;\n\t\t\t\tstrstart++;\n\t\t\t}\n\t\t\tif (bflush) {\n\n\t\t\t\tflush_block_only(false);\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\t\t\t}\n\t\t}\n\n\t\tflush_block_only(flush == Z_FINISH);\n\t\tif (strm.avail_out === 0) {\n\t\t\tif (flush == Z_FINISH)\n\t\t\t\treturn FinishStarted;\n\t\t\telse\n\t\t\t\treturn NeedMore;\n\t\t}\n\t\treturn flush == Z_FINISH ? FinishDone : BlockDone;\n\t}\n\n\t// Same as above, but achieves better compression. We use a lazy\n\t// evaluation for matches: a match is finally adopted only if there is\n\t// no better match at the next win position.\n\tfunction deflate_slow(flush) {\n\t\t// short hash_head = 0; // head of hash chain\n\t\tlet hash_head = 0; // head of hash chain\n\t\tlet bflush; // set if current block must be flushed\n\t\tlet max_insert;\n\n\t\t// Process the input block.\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\t// Make sure that we always have enough lookahead, except\n\t\t\t// at the end of the input file. We need MAX_MATCH bytes\n\t\t\t// for the next match, plus MIN_MATCH bytes to insert the\n\t\t\t// string following the next match.\n\n\t\t\tif (lookahead < MIN_LOOKAHEAD) {\n\t\t\t\tfill_window();\n\t\t\t\tif (lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) {\n\t\t\t\t\treturn NeedMore;\n\t\t\t\t}\n\t\t\t\tif (lookahead === 0)\n\t\t\t\t\tbreak; // flush the current block\n\t\t\t}\n\n\t\t\t// Insert the string win[strstart .. strstart+2] in the\n\t\t\t// dictionary, and set hash_head to the head of the hash chain:\n\n\t\t\tif (lookahead >= MIN_MATCH) {\n\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\thead[ins_h] = strstart;\n\t\t\t}\n\n\t\t\t// Find the longest match, discarding those <= prev_length.\n\t\t\tprev_length = match_length;\n\t\t\tprev_match = match_start;\n\t\t\tmatch_length = MIN_MATCH - 1;\n\n\t\t\tif (hash_head !== 0 && prev_length < max_lazy_match && ((strstart - hash_head) & 0xffff) <= w_size - MIN_LOOKAHEAD) {\n\t\t\t\t// To simplify the code, we prevent matches with the string\n\t\t\t\t// of win index 0 (in particular we have to avoid a match\n\t\t\t\t// of the string with itself at the start of the input file).\n\n\t\t\t\tif (strategy != Z_HUFFMAN_ONLY) {\n\t\t\t\t\tmatch_length = longest_match(hash_head);\n\t\t\t\t}\n\t\t\t\t// longest_match() sets match_start\n\n\t\t\t\tif (match_length <= 5 && (strategy == Z_FILTERED || (match_length == MIN_MATCH && strstart - match_start > 4096))) {\n\n\t\t\t\t\t// If prev_match is also MIN_MATCH, match_start is garbage\n\t\t\t\t\t// but we will ignore the current match anyway.\n\t\t\t\t\tmatch_length = MIN_MATCH - 1;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// If there was a match at the previous step and the current\n\t\t\t// match is not better, output the previous match:\n\t\t\tif (prev_length >= MIN_MATCH && match_length <= prev_length) {\n\t\t\t\tmax_insert = strstart + lookahead - MIN_MATCH;\n\t\t\t\t// Do not insert strings in hash table beyond this.\n\n\t\t\t\t// check_match(strstart-1, prev_match, prev_length);\n\n\t\t\t\tbflush = _tr_tally(strstart - 1 - prev_match, prev_length - MIN_MATCH);\n\n\t\t\t\t// Insert in hash table all strings up to the end of the match.\n\t\t\t\t// strstart-1 and strstart are already inserted. If there is not\n\t\t\t\t// enough lookahead, the last two strings are not inserted in\n\t\t\t\t// the hash table.\n\t\t\t\tlookahead -= prev_length - 1;\n\t\t\t\tprev_length -= 2;\n\t\t\t\tdo {\n\t\t\t\t\tif (++strstart <= max_insert) {\n\t\t\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\t\t\thead[ins_h] = strstart;\n\t\t\t\t\t}\n\t\t\t\t} while (--prev_length !== 0);\n\t\t\t\tmatch_available = 0;\n\t\t\t\tmatch_length = MIN_MATCH - 1;\n\t\t\t\tstrstart++;\n\n\t\t\t\tif (bflush) {\n\t\t\t\t\tflush_block_only(false);\n\t\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\t\treturn NeedMore;\n\t\t\t\t}\n\t\t\t} else if (match_available !== 0) {\n\n\t\t\t\t// If there was no match at the previous position, output a\n\t\t\t\t// single literal. If there was a match but the current match\n\t\t\t\t// is longer, truncate the previous match to a single literal.\n\n\t\t\t\tbflush = _tr_tally(0, win[strstart - 1] & 0xff);\n\n\t\t\t\tif (bflush) {\n\t\t\t\t\tflush_block_only(false);\n\t\t\t\t}\n\t\t\t\tstrstart++;\n\t\t\t\tlookahead--;\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\t\t\t} else {\n\t\t\t\t// There is no previous match to compare with, wait for\n\t\t\t\t// the next step to decide.\n\n\t\t\t\tmatch_available = 1;\n\t\t\t\tstrstart++;\n\t\t\t\tlookahead--;\n\t\t\t}\n\t\t}\n\n\t\tif (match_available !== 0) {\n\t\t\tbflush = _tr_tally(0, win[strstart - 1] & 0xff);\n\t\t\tmatch_available = 0;\n\t\t}\n\t\tflush_block_only(flush == Z_FINISH);\n\n\t\tif (strm.avail_out === 0) {\n\t\t\tif (flush == Z_FINISH)\n\t\t\t\treturn FinishStarted;\n\t\t\telse\n\t\t\t\treturn NeedMore;\n\t\t}\n\n\t\treturn flush == Z_FINISH ? FinishDone : BlockDone;\n\t}\n\n\tfunction deflateReset(strm) {\n\t\tstrm.total_in = strm.total_out = 0;\n\t\tstrm.msg = null; //\n\n\t\tthat.pending = 0;\n\t\tthat.pending_out = 0;\n\n\t\tstatus = BUSY_STATE;\n\n\t\tlast_flush = Z_NO_FLUSH;\n\n\t\ttr_init();\n\t\tlm_init();\n\t\treturn Z_OK;\n\t}\n\n\tthat.deflateInit = function (strm, _level, bits, _method, memLevel, _strategy) {\n\t\tif (!_method)\n\t\t\t_method = Z_DEFLATED;\n\t\tif (!memLevel)\n\t\t\tmemLevel = DEF_MEM_LEVEL;\n\t\tif (!_strategy)\n\t\t\t_strategy = Z_DEFAULT_STRATEGY;\n\n\t\t// byte[] my_version=ZLIB_VERSION;\n\n\t\t//\n\t\t// if (!version || version[0] != my_version[0]\n\t\t// || stream_size != sizeof(z_stream)) {\n\t\t// return Z_VERSION_ERROR;\n\t\t// }\n\n\t\tstrm.msg = null;\n\n\t\tif (_level == Z_DEFAULT_COMPRESSION)\n\t\t\t_level = 6;\n\n\t\tif (memLevel < 1 || memLevel > MAX_MEM_LEVEL || _method != Z_DEFLATED || bits < 9 || bits > 15 || _level < 0 || _level > 9 || _strategy < 0\n\t\t\t|| _strategy > Z_HUFFMAN_ONLY) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\n\t\tstrm.dstate = that;\n\n\t\tw_bits = bits;\n\t\tw_size = 1 << w_bits;\n\t\tw_mask = w_size - 1;\n\n\t\thash_bits = memLevel + 7;\n\t\thash_size = 1 << hash_bits;\n\t\thash_mask = hash_size - 1;\n\t\thash_shift = Math.floor((hash_bits + MIN_MATCH - 1) / MIN_MATCH);\n\n\t\twin = new Uint8Array(w_size * 2);\n\t\tprev = [];\n\t\thead = [];\n\n\t\tlit_bufsize = 1 << (memLevel + 6); // 16K elements by default\n\n\t\tthat.pending_buf = new Uint8Array(lit_bufsize * 4);\n\t\tpending_buf_size = lit_bufsize * 4;\n\n\t\tthat.dist_buf = new Uint16Array(lit_bufsize);\n\t\tthat.lc_buf = new Uint8Array(lit_bufsize);\n\n\t\tlevel = _level;\n\n\t\tstrategy = _strategy;\n\n\t\treturn deflateReset(strm);\n\t};\n\n\tthat.deflateEnd = function () {\n\t\tif (status != INIT_STATE && status != BUSY_STATE && status != FINISH_STATE) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\t// Deallocate in reverse order of allocations:\n\t\tthat.lc_buf = null;\n\t\tthat.dist_buf = null;\n\t\tthat.pending_buf = null;\n\t\thead = null;\n\t\tprev = null;\n\t\twin = null;\n\t\t// free\n\t\tthat.dstate = null;\n\t\treturn status == BUSY_STATE ? Z_DATA_ERROR : Z_OK;\n\t};\n\n\tthat.deflateParams = function (strm, _level, _strategy) {\n\t\tlet err = Z_OK;\n\n\t\tif (_level == Z_DEFAULT_COMPRESSION) {\n\t\t\t_level = 6;\n\t\t}\n\t\tif (_level < 0 || _level > 9 || _strategy < 0 || _strategy > Z_HUFFMAN_ONLY) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\n\t\tif (config_table[level].func != config_table[_level].func && strm.total_in !== 0) {\n\t\t\t// Flush the last buffer:\n\t\t\terr = strm.deflate(Z_PARTIAL_FLUSH);\n\t\t}\n\n\t\tif (level != _level) {\n\t\t\tlevel = _level;\n\t\t\tmax_lazy_match = config_table[level].max_lazy;\n\t\t\tgood_match = config_table[level].good_length;\n\t\t\tnice_match = config_table[level].nice_length;\n\t\t\tmax_chain_length = config_table[level].max_chain;\n\t\t}\n\t\tstrategy = _strategy;\n\t\treturn err;\n\t};\n\n\tthat.deflateSetDictionary = function (_strm, dictionary, dictLength) {\n\t\tlet length = dictLength;\n\t\tlet n, index = 0;\n\n\t\tif (!dictionary || status != INIT_STATE)\n\t\t\treturn Z_STREAM_ERROR;\n\n\t\tif (length < MIN_MATCH)\n\t\t\treturn Z_OK;\n\t\tif (length > w_size - MIN_LOOKAHEAD) {\n\t\t\tlength = w_size - MIN_LOOKAHEAD;\n\t\t\tindex = dictLength - length; // use the tail of the dictionary\n\t\t}\n\t\twin.set(dictionary.subarray(index, index + length), 0);\n\n\t\tstrstart = length;\n\t\tblock_start = length;\n\n\t\t// Insert all strings in the hash table (except for the last two bytes).\n\t\t// s->lookahead stays null, so s->ins_h will be recomputed at the next\n\t\t// call of fill_window.\n\n\t\tins_h = win[0] & 0xff;\n\t\tins_h = (((ins_h) << hash_shift) ^ (win[1] & 0xff)) & hash_mask;\n\n\t\tfor (n = 0; n <= length - MIN_MATCH; n++) {\n\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(n) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\tprev[n & w_mask] = head[ins_h];\n\t\t\thead[ins_h] = n;\n\t\t}\n\t\treturn Z_OK;\n\t};\n\n\tthat.deflate = function (_strm, flush) {\n\t\tlet i, header, level_flags, old_flush, bstate;\n\n\t\tif (flush > Z_FINISH || flush < 0) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\n\t\tif (!_strm.next_out || (!_strm.next_in && _strm.avail_in !== 0) || (status == FINISH_STATE && flush != Z_FINISH)) {\n\t\t\t_strm.msg = z_errmsg[Z_NEED_DICT - (Z_STREAM_ERROR)];\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\tif (_strm.avail_out === 0) {\n\t\t\t_strm.msg = z_errmsg[Z_NEED_DICT - (Z_BUF_ERROR)];\n\t\t\treturn Z_BUF_ERROR;\n\t\t}\n\n\t\tstrm = _strm; // just in case\n\t\told_flush = last_flush;\n\t\tlast_flush = flush;\n\n\t\t// Write the zlib header\n\t\tif (status == INIT_STATE) {\n\t\t\theader = (Z_DEFLATED + ((w_bits - 8) << 4)) << 8;\n\t\t\tlevel_flags = ((level - 1) & 0xff) >> 1;\n\n\t\t\tif (level_flags > 3)\n\t\t\t\tlevel_flags = 3;\n\t\t\theader |= (level_flags << 6);\n\t\t\tif (strstart !== 0)\n\t\t\t\theader |= PRESET_DICT;\n\t\t\theader += 31 - (header % 31);\n\n\t\t\tstatus = BUSY_STATE;\n\t\t\tputShortMSB(header);\n\t\t}\n\n\t\t// Flush as much pending output as possible\n\t\tif (that.pending !== 0) {\n\t\t\tstrm.flush_pending();\n\t\t\tif (strm.avail_out === 0) {\n\t\t\t\t// console.log(\" avail_out==0\");\n\t\t\t\t// Since avail_out is 0, deflate will be called again with\n\t\t\t\t// more output space, but possibly with both pending and\n\t\t\t\t// avail_in equal to zero. There won't be anything to do,\n\t\t\t\t// but this is not an error situation so make sure we\n\t\t\t\t// return OK instead of BUF_ERROR at next call of deflate:\n\t\t\t\tlast_flush = -1;\n\t\t\t\treturn Z_OK;\n\t\t\t}\n\n\t\t\t// Make sure there is something to do and avoid duplicate\n\t\t\t// consecutive\n\t\t\t// flushes. For repeated and useless calls with Z_FINISH, we keep\n\t\t\t// returning Z_STREAM_END instead of Z_BUFF_ERROR.\n\t\t} else if (strm.avail_in === 0 && flush <= old_flush && flush != Z_FINISH) {\n\t\t\tstrm.msg = z_errmsg[Z_NEED_DICT - (Z_BUF_ERROR)];\n\t\t\treturn Z_BUF_ERROR;\n\t\t}\n\n\t\t// User must not provide more input after the first FINISH:\n\t\tif (status == FINISH_STATE && strm.avail_in !== 0) {\n\t\t\t_strm.msg = z_errmsg[Z_NEED_DICT - (Z_BUF_ERROR)];\n\t\t\treturn Z_BUF_ERROR;\n\t\t}\n\n\t\t// Start a new block or continue the current one.\n\t\tif (strm.avail_in !== 0 || lookahead !== 0 || (flush != Z_NO_FLUSH && status != FINISH_STATE)) {\n\t\t\tbstate = -1;\n\t\t\tswitch (config_table[level].func) {\n\t\t\t\tcase STORED:\n\t\t\t\t\tbstate = deflate_stored(flush);\n\t\t\t\t\tbreak;\n\t\t\t\tcase FAST:\n\t\t\t\t\tbstate = deflate_fast(flush);\n\t\t\t\t\tbreak;\n\t\t\t\tcase SLOW:\n\t\t\t\t\tbstate = deflate_slow(flush);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t}\n\n\t\t\tif (bstate == FinishStarted || bstate == FinishDone) {\n\t\t\t\tstatus = FINISH_STATE;\n\t\t\t}\n\t\t\tif (bstate == NeedMore || bstate == FinishStarted) {\n\t\t\t\tif (strm.avail_out === 0) {\n\t\t\t\t\tlast_flush = -1; // avoid BUF_ERROR next call, see above\n\t\t\t\t}\n\t\t\t\treturn Z_OK;\n\t\t\t\t// If flush != Z_NO_FLUSH && avail_out === 0, the next call\n\t\t\t\t// of deflate should use the same flush parameter to make sure\n\t\t\t\t// that the flush is complete. So we don't have to output an\n\t\t\t\t// empty block here, this will be done at next call. This also\n\t\t\t\t// ensures that for a very small output buffer, we emit at most\n\t\t\t\t// one empty block.\n\t\t\t}\n\n\t\t\tif (bstate == BlockDone) {\n\t\t\t\tif (flush == Z_PARTIAL_FLUSH) {\n\t\t\t\t\t_tr_align();\n\t\t\t\t} else { // FULL_FLUSH or SYNC_FLUSH\n\t\t\t\t\t_tr_stored_block(0, 0, false);\n\t\t\t\t\t// For a full flush, this empty block will be recognized\n\t\t\t\t\t// as a special marker by inflate_sync().\n\t\t\t\t\tif (flush == Z_FULL_FLUSH) {\n\t\t\t\t\t\t// state.head[s.hash_size-1]=0;\n\t\t\t\t\t\tfor (i = 0; i < hash_size/*-1*/; i++)\n\t\t\t\t\t\t\t// forget history\n\t\t\t\t\t\t\thead[i] = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tstrm.flush_pending();\n\t\t\t\tif (strm.avail_out === 0) {\n\t\t\t\t\tlast_flush = -1; // avoid BUF_ERROR at next call, see above\n\t\t\t\t\treturn Z_OK;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (flush != Z_FINISH)\n\t\t\treturn Z_OK;\n\t\treturn Z_STREAM_END;\n\t};\n}\n\n// ZStream\n\nfunction ZStream() {\n\tconst that = this;\n\tthat.next_in_index = 0;\n\tthat.next_out_index = 0;\n\t// that.next_in; // next input byte\n\tthat.avail_in = 0; // number of bytes available at next_in\n\tthat.total_in = 0; // total nb of input bytes read so far\n\t// that.next_out; // next output byte should be put there\n\tthat.avail_out = 0; // remaining free space at next_out\n\tthat.total_out = 0; // total nb of bytes output so far\n\t// that.msg;\n\t// that.dstate;\n}\n\nZStream.prototype = {\n\tdeflateInit(level, bits) {\n\t\tconst that = this;\n\t\tthat.dstate = new Deflate();\n\t\tif (!bits)\n\t\t\tbits = MAX_BITS;\n\t\treturn that.dstate.deflateInit(that, level, bits);\n\t},\n\n\tdeflate(flush) {\n\t\tconst that = this;\n\t\tif (!that.dstate) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\treturn that.dstate.deflate(that, flush);\n\t},\n\n\tdeflateEnd() {\n\t\tconst that = this;\n\t\tif (!that.dstate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst ret = that.dstate.deflateEnd();\n\t\tthat.dstate = null;\n\t\treturn ret;\n\t},\n\n\tdeflateParams(level, strategy) {\n\t\tconst that = this;\n\t\tif (!that.dstate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.dstate.deflateParams(that, level, strategy);\n\t},\n\n\tdeflateSetDictionary(dictionary, dictLength) {\n\t\tconst that = this;\n\t\tif (!that.dstate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.dstate.deflateSetDictionary(that, dictionary, dictLength);\n\t},\n\n\t// Read a new buffer from the current input stream, update the\n\t// total number of bytes read. All deflate() input goes through\n\t// this function so some applications may wish to modify it to avoid\n\t// allocating a large strm->next_in buffer and copying from it.\n\t// (See also flush_pending()).\n\tread_buf(buf, start, size) {\n\t\tconst that = this;\n\t\tlet len = that.avail_in;\n\t\tif (len > size)\n\t\t\tlen = size;\n\t\tif (len === 0)\n\t\t\treturn 0;\n\t\tthat.avail_in -= len;\n\t\tbuf.set(that.next_in.subarray(that.next_in_index, that.next_in_index + len), start);\n\t\tthat.next_in_index += len;\n\t\tthat.total_in += len;\n\t\treturn len;\n\t},\n\n\t// Flush as much pending output as possible. All deflate() output goes\n\t// through this function so some applications may wish to modify it\n\t// to avoid allocating a large strm->next_out buffer and copying into it.\n\t// (See also read_buf()).\n\tflush_pending() {\n\t\tconst that = this;\n\t\tlet len = that.dstate.pending;\n\n\t\tif (len > that.avail_out)\n\t\t\tlen = that.avail_out;\n\t\tif (len === 0)\n\t\t\treturn;\n\n\t\t// if (that.dstate.pending_buf.length <= that.dstate.pending_out || that.next_out.length <= that.next_out_index\n\t\t// || that.dstate.pending_buf.length < (that.dstate.pending_out + len) || that.next_out.length < (that.next_out_index +\n\t\t// len)) {\n\t\t// console.log(that.dstate.pending_buf.length + \", \" + that.dstate.pending_out + \", \" + that.next_out.length + \", \" +\n\t\t// that.next_out_index + \", \" + len);\n\t\t// console.log(\"avail_out=\" + that.avail_out);\n\t\t// }\n\n\t\tthat.next_out.set(that.dstate.pending_buf.subarray(that.dstate.pending_out, that.dstate.pending_out + len), that.next_out_index);\n\n\t\tthat.next_out_index += len;\n\t\tthat.dstate.pending_out += len;\n\t\tthat.total_out += len;\n\t\tthat.avail_out -= len;\n\t\tthat.dstate.pending -= len;\n\t\tif (that.dstate.pending === 0) {\n\t\t\tthat.dstate.pending_out = 0;\n\t\t}\n\t}\n};\n\n// Deflate\n\nfunction ZipDeflate(options) {\n\tconst that = this;\n\tconst z = new ZStream();\n\tconst bufsize = getMaximumCompressedSize(options && options.chunkSize ? options.chunkSize : 64 * 1024);\n\tconst flush = Z_NO_FLUSH;\n\tconst buf = new Uint8Array(bufsize);\n\tlet level = options ? options.level : Z_DEFAULT_COMPRESSION;\n\tif (typeof level == \"undefined\")\n\t\tlevel = Z_DEFAULT_COMPRESSION;\n\tz.deflateInit(level);\n\tz.next_out = buf;\n\n\tthat.append = function (data, onprogress) {\n\t\tlet err, array, lastIndex = 0, bufferIndex = 0, bufferSize = 0;\n\t\tconst buffers = [];\n\t\tif (!data.length)\n\t\t\treturn;\n\t\tz.next_in_index = 0;\n\t\tz.next_in = data;\n\t\tz.avail_in = data.length;\n\t\tdo {\n\t\t\tz.next_out_index = 0;\n\t\t\tz.avail_out = bufsize;\n\t\t\terr = z.deflate(flush);\n\t\t\tif (err != Z_OK)\n\t\t\t\tthrow new Error(\"deflating: \" + z.msg);\n\t\t\tif (z.next_out_index)\n\t\t\t\tif (z.next_out_index == bufsize)\n\t\t\t\t\tbuffers.push(new Uint8Array(buf));\n\t\t\t\telse\n\t\t\t\t\tbuffers.push(buf.slice(0, z.next_out_index));\n\t\t\tbufferSize += z.next_out_index;\n\t\t\tif (onprogress && z.next_in_index > 0 && z.next_in_index != lastIndex) {\n\t\t\t\tonprogress(z.next_in_index);\n\t\t\t\tlastIndex = z.next_in_index;\n\t\t\t}\n\t\t} while (z.avail_in > 0 || z.avail_out === 0);\n\t\tif (buffers.length > 1) {\n\t\t\tarray = new Uint8Array(bufferSize);\n\t\t\tbuffers.forEach(function (chunk) {\n\t\t\t\tarray.set(chunk, bufferIndex);\n\t\t\t\tbufferIndex += chunk.length;\n\t\t\t});\n\t\t} else {\n\t\t\tarray = buffers[0] || new Uint8Array();\n\t\t}\n\t\treturn array;\n\t};\n\tthat.flush = function () {\n\t\tlet err, array, bufferIndex = 0, bufferSize = 0;\n\t\tconst buffers = [];\n\t\tdo {\n\t\t\tz.next_out_index = 0;\n\t\t\tz.avail_out = bufsize;\n\t\t\terr = z.deflate(Z_FINISH);\n\t\t\tif (err != Z_STREAM_END && err != Z_OK)\n\t\t\t\tthrow new Error(\"deflating: \" + z.msg);\n\t\t\tif (bufsize - z.avail_out > 0)\n\t\t\t\tbuffers.push(buf.slice(0, z.next_out_index));\n\t\t\tbufferSize += z.next_out_index;\n\t\t} while (z.avail_in > 0 || z.avail_out === 0);\n\t\tz.deflateEnd();\n\t\tarray = new Uint8Array(bufferSize);\n\t\tbuffers.forEach(function (chunk) {\n\t\t\tarray.set(chunk, bufferIndex);\n\t\t\tbufferIndex += chunk.length;\n\t\t});\n\t\treturn array;\n\t};\n}\n\nfunction getMaximumCompressedSize(uncompressedSize) {\n\treturn uncompressedSize + (5 * (Math.floor(uncompressedSize / 16383) + 1));\n}\n\nexport {\n\tZipDeflate as Deflate\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/*\n * This program is based on JZlib 1.0.2 ymnk, JCraft,Inc.\n * JZlib is based on zlib-1.1.3, so all credit should go authors\n * Jean-loup Gailly(jloup@gzip.org) and Mark Adler(madler@alumni.caltech.edu)\n * and contributors of zlib.\n */\n\n// deno-lint-ignore-file no-this-alias prefer-const\n\n// Global\n\nconst MAX_BITS = 15;\n\nconst Z_OK = 0;\nconst Z_STREAM_END = 1;\nconst Z_NEED_DICT = 2;\nconst Z_STREAM_ERROR = -2;\nconst Z_DATA_ERROR = -3;\nconst Z_MEM_ERROR = -4;\nconst Z_BUF_ERROR = -5;\n\nconst inflate_mask = [0x00000000, 0x00000001, 0x00000003, 0x00000007, 0x0000000f, 0x0000001f, 0x0000003f, 0x0000007f, 0x000000ff, 0x000001ff, 0x000003ff,\n\t0x000007ff, 0x00000fff, 0x00001fff, 0x00003fff, 0x00007fff, 0x0000ffff];\n\nconst MANY = 1440;\n\n// JZlib version : \"1.0.2\"\nconst Z_NO_FLUSH = 0;\nconst Z_FINISH = 4;\n\n// InfTree\nconst fixed_bl = 9;\nconst fixed_bd = 5;\n\nconst fixed_tl = [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,\n\t0, 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,\n\t0, 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,\n\t0, 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,\n\t0, 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,\n\t35, 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,\n\t26, 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,\n\t7, 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,\n\t8, 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,\n\t8, 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,\n\t0, 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,\n\t81, 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,\n\t0, 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,\n\t84, 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,\n\t0, 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,\n\t80, 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,\n\t0, 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,\n\t0, 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,\n\t0, 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,\n\t193, 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,\n\t120, 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,\n\t227, 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,\n\t92, 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,\n\t249, 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,\n\t130, 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,\n\t181, 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,\n\t102, 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,\n\t221, 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,\n\t8, 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,\n\t147, 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,\n\t85, 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,\n\t235, 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,\n\t141, 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,\n\t167, 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,\n\t107, 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,\n\t207, 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,\n\t127, 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];\nconst fixed_td = [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,\n\t8193, 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,\n\t24577, 80, 5, 4, 88, 5, 769, 84, 5, 49, 92, 5, 12289, 82, 5, 13, 90, 5, 3073, 86, 5, 193, 192, 5, 24577];\n\n// Tables for deflate from PKZIP's appnote.txt.\nconst cplens = [ // Copy lengths for literal codes 257..285\n\t3, 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];\n\n// see note #13 above about 258\nconst cplext = [ // Extra bits for literal codes 257..285\n\t0, 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 // 112==invalid\n];\n\nconst cpdist = [ // Copy offsets for distance codes 0..29\n\t1, 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];\n\nconst cpdext = [ // Extra bits for distance codes\n\t0, 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];\n\n// If BMAX needs to be larger than 16, then h and x[] should be uLong.\nconst BMAX = 15; // maximum bit length of any code\n\nfunction InfTree() {\n\tconst that = this;\n\n\tlet hn; // hufts used in space\n\tlet v; // work area for huft_build\n\tlet c; // bit length count table\n\tlet r; // table entry for structure assignment\n\tlet u; // table stack\n\tlet x; // bit offsets, then code stack\n\n\tfunction huft_build(b, // code lengths in bits (all assumed <=\n\t\t// BMAX)\n\t\tbindex, n, // number of codes (assumed <= 288)\n\t\ts, // number of simple-valued codes (0..s-1)\n\t\td, // list of base values for non-simple codes\n\t\te, // list of extra bits for non-simple codes\n\t\tt, // result: starting table\n\t\tm, // maximum lookup bits, returns actual\n\t\thp,// space for trees\n\t\thn,// hufts used in space\n\t\tv // working area: values in order of bit length\n\t) {\n\t\t// Given a list of code lengths and a maximum table size, make a set of\n\t\t// tables to decode that set of codes. Return Z_OK on success,\n\t\t// Z_BUF_ERROR\n\t\t// if the given code set is incomplete (the tables are still built in\n\t\t// this\n\t\t// case), Z_DATA_ERROR if the input is invalid (an over-subscribed set\n\t\t// of\n\t\t// lengths), or Z_MEM_ERROR if not enough memory.\n\n\t\tlet a; // counter for codes of length k\n\t\tlet f; // i repeats in table every f entries\n\t\tlet g; // maximum code length\n\t\tlet h; // table level\n\t\tlet i; // counter, current code\n\t\tlet j; // counter\n\t\tlet k; // number of bits in current code\n\t\tlet l; // bits per table (returned in m)\n\t\tlet mask; // (1 << w) - 1, to avoid cc -O bug on HP\n\t\tlet p; // pointer into c[], b[], or v[]\n\t\tlet q; // points to current table\n\t\tlet w; // bits before this table == (l * h)\n\t\tlet xp; // pointer into x\n\t\tlet y; // number of dummy codes added\n\t\tlet z; // number of entries in current table\n\n\t\t// Generate counts for each bit length\n\n\t\tp = 0;\n\t\ti = n;\n\t\tdo {\n\t\t\tc[b[bindex + p]]++;\n\t\t\tp++;\n\t\t\ti--; // assume all entries <= BMAX\n\t\t} while (i !== 0);\n\n\t\tif (c[0] == n) { // null input--all zero length codes\n\t\t\tt[0] = -1;\n\t\t\tm[0] = 0;\n\t\t\treturn Z_OK;\n\t\t}\n\n\t\t// Find minimum and maximum length, bound *m by those\n\t\tl = m[0];\n\t\tfor (j = 1; j <= BMAX; j++)\n\t\t\tif (c[j] !== 0)\n\t\t\t\tbreak;\n\t\tk = j; // minimum code length\n\t\tif (l < j) {\n\t\t\tl = j;\n\t\t}\n\t\tfor (i = BMAX; i !== 0; i--) {\n\t\t\tif (c[i] !== 0)\n\t\t\t\tbreak;\n\t\t}\n\t\tg = i; // maximum code length\n\t\tif (l > i) {\n\t\t\tl = i;\n\t\t}\n\t\tm[0] = l;\n\n\t\t// Adjust last length count to fill out codes, if needed\n\t\tfor (y = 1 << j; j < i; j++, y <<= 1) {\n\t\t\tif ((y -= c[j]) < 0) {\n\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t}\n\t\t}\n\t\tif ((y -= c[i]) < 0) {\n\t\t\treturn Z_DATA_ERROR;\n\t\t}\n\t\tc[i] += y;\n\n\t\t// Generate starting offsets into the value table for each length\n\t\tx[1] = j = 0;\n\t\tp = 1;\n\t\txp = 2;\n\t\twhile (--i !== 0) { // note that i == g from above\n\t\t\tx[xp] = (j += c[p]);\n\t\t\txp++;\n\t\t\tp++;\n\t\t}\n\n\t\t// Make a table of values in order of bit lengths\n\t\ti = 0;\n\t\tp = 0;\n\t\tdo {\n\t\t\tif ((j = b[bindex + p]) !== 0) {\n\t\t\t\tv[x[j]++] = i;\n\t\t\t}\n\t\t\tp++;\n\t\t} while (++i < n);\n\t\tn = x[g]; // set n to length of v\n\n\t\t// Generate the Huffman codes and for each, make the table entries\n\t\tx[0] = i = 0; // first Huffman code is zero\n\t\tp = 0; // grab values in bit order\n\t\th = -1; // no tables yet--level -1\n\t\tw = -l; // bits decoded == (l * h)\n\t\tu[0] = 0; // just to keep compilers happy\n\t\tq = 0; // ditto\n\t\tz = 0; // ditto\n\n\t\t// go through the bit lengths (k already is bits in shortest code)\n\t\tfor (; k <= g; k++) {\n\t\t\ta = c[k];\n\t\t\twhile (a-- !== 0) {\n\t\t\t\t// here i is the Huffman code of length k bits for value *p\n\t\t\t\t// make tables up to required level\n\t\t\t\twhile (k > w + l) {\n\t\t\t\t\th++;\n\t\t\t\t\tw += l; // previous table always l bits\n\t\t\t\t\t// compute minimum size table less than or equal to l bits\n\t\t\t\t\tz = g - w;\n\t\t\t\t\tz = (z > l) ? l : z; // table size upper limit\n\t\t\t\t\tif ((f = 1 << (j = k - w)) > a + 1) { // try a k-w bit table\n\t\t\t\t\t\t// too few codes for\n\t\t\t\t\t\t// k-w bit table\n\t\t\t\t\t\tf -= a + 1; // deduct codes from patterns left\n\t\t\t\t\t\txp = k;\n\t\t\t\t\t\tif (j < z) {\n\t\t\t\t\t\t\twhile (++j < z) { // try smaller tables up to z bits\n\t\t\t\t\t\t\t\tif ((f <<= 1) <= c[++xp])\n\t\t\t\t\t\t\t\t\tbreak; // enough codes to use up j bits\n\t\t\t\t\t\t\t\tf -= c[xp]; // else deduct codes from patterns\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tz = 1 << j; // table entries for j-bit table\n\n\t\t\t\t\t// allocate new table\n\t\t\t\t\tif (hn[0] + z > MANY) { // (note: doesn't matter for fixed)\n\t\t\t\t\t\treturn Z_DATA_ERROR; // overflow of MANY\n\t\t\t\t\t}\n\t\t\t\t\tu[h] = q = /* hp+ */hn[0]; // DEBUG\n\t\t\t\t\thn[0] += z;\n\n\t\t\t\t\t// connect to last table, if there is one\n\t\t\t\t\tif (h !== 0) {\n\t\t\t\t\t\tx[h] = i; // save pattern for backing up\n\t\t\t\t\t\tr[0] = /* (byte) */j; // bits in this table\n\t\t\t\t\t\tr[1] = /* (byte) */l; // bits to dump before this table\n\t\t\t\t\t\tj = i >>> (w - l);\n\t\t\t\t\t\tr[2] = /* (int) */(q - u[h - 1] - j); // offset to this table\n\t\t\t\t\t\thp.set(r, (u[h - 1] + j) * 3);\n\t\t\t\t\t\t// to\n\t\t\t\t\t\t// last\n\t\t\t\t\t\t// table\n\t\t\t\t\t} else {\n\t\t\t\t\t\tt[0] = q; // first table is returned result\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// set up table entry in r\n\t\t\t\tr[1] = /* (byte) */(k - w);\n\t\t\t\tif (p >= n) {\n\t\t\t\t\tr[0] = 128 + 64; // out of values--invalid code\n\t\t\t\t} else if (v[p] < s) {\n\t\t\t\t\tr[0] = /* (byte) */(v[p] < 256 ? 0 : 32 + 64); // 256 is\n\t\t\t\t\t// end-of-block\n\t\t\t\t\tr[2] = v[p++]; // simple code is just the value\n\t\t\t\t} else {\n\t\t\t\t\tr[0] = /* (byte) */(e[v[p] - s] + 16 + 64); // non-simple--look\n\t\t\t\t\t// up in lists\n\t\t\t\t\tr[2] = d[v[p++] - s];\n\t\t\t\t}\n\n\t\t\t\t// fill code-like entries with r\n\t\t\t\tf = 1 << (k - w);\n\t\t\t\tfor (j = i >>> w; j < z; j += f) {\n\t\t\t\t\thp.set(r, (q + j) * 3);\n\t\t\t\t}\n\n\t\t\t\t// backwards increment the k-bit code i\n\t\t\t\tfor (j = 1 << (k - 1); (i & j) !== 0; j >>>= 1) {\n\t\t\t\t\ti ^= j;\n\t\t\t\t}\n\t\t\t\ti ^= j;\n\n\t\t\t\t// backup over finished tables\n\t\t\t\tmask = (1 << w) - 1; // needed on HP, cc -O bug\n\t\t\t\twhile ((i & mask) != x[h]) {\n\t\t\t\t\th--; // don't need to update q\n\t\t\t\t\tw -= l;\n\t\t\t\t\tmask = (1 << w) - 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// Return Z_BUF_ERROR if we were given an incomplete table\n\t\treturn y !== 0 && g != 1 ? Z_BUF_ERROR : Z_OK;\n\t}\n\n\tfunction initWorkArea(vsize) {\n\t\tlet i;\n\t\tif (!hn) {\n\t\t\thn = []; // []; //new Array(1);\n\t\t\tv = []; // new Array(vsize);\n\t\t\tc = new Int32Array(BMAX + 1); // new Array(BMAX + 1);\n\t\t\tr = []; // new Array(3);\n\t\t\tu = new Int32Array(BMAX); // new Array(BMAX);\n\t\t\tx = new Int32Array(BMAX + 1); // new Array(BMAX + 1);\n\t\t}\n\t\tif (v.length < vsize) {\n\t\t\tv = []; // new Array(vsize);\n\t\t}\n\t\tfor (i = 0; i < vsize; i++) {\n\t\t\tv[i] = 0;\n\t\t}\n\t\tfor (i = 0; i < BMAX + 1; i++) {\n\t\t\tc[i] = 0;\n\t\t}\n\t\tfor (i = 0; i < 3; i++) {\n\t\t\tr[i] = 0;\n\t\t}\n\t\t// for(int i=0; i 257)) {\n\t\t\tif (result == Z_DATA_ERROR) {\n\t\t\t\tz.msg = \"oversubscribed distance tree\";\n\t\t\t} else if (result == Z_BUF_ERROR) {\n\t\t\t\tz.msg = \"incomplete distance tree\";\n\t\t\t\tresult = Z_DATA_ERROR;\n\t\t\t} else if (result != Z_MEM_ERROR) {\n\t\t\t\tz.msg = \"empty distance tree with lengths\";\n\t\t\t\tresult = Z_DATA_ERROR;\n\t\t\t}\n\t\t\treturn result;\n\t\t}\n\n\t\treturn Z_OK;\n\t};\n\n}\n\nInfTree.inflate_trees_fixed = function (bl, // literal desired/actual bit depth\n\tbd, // distance desired/actual bit depth\n\ttl,// literal/length tree result\n\ttd// distance tree result\n) {\n\tbl[0] = fixed_bl;\n\tbd[0] = fixed_bd;\n\ttl[0] = fixed_tl;\n\ttd[0] = fixed_td;\n\treturn Z_OK;\n};\n\n// InfCodes\n\n// waiting for \"i:\"=input,\n// \"o:\"=output,\n// \"x:\"=nothing\nconst START = 0; // x: set up for LEN\nconst LEN = 1; // i: get length/literal/eob next\nconst LENEXT = 2; // i: getting length extra (have base)\nconst DIST = 3; // i: get distance next\nconst DISTEXT = 4;// i: getting distance extra\nconst COPY = 5; // o: copying bytes in win, waiting\n// for space\nconst LIT = 6; // o: got literal, waiting for output\n// space\nconst WASH = 7; // o: got eob, possibly still output\n// waiting\nconst END = 8; // x: got eob and all data flushed\nconst BADCODE = 9;// x: got error\n\nfunction InfCodes() {\n\tconst that = this;\n\n\tlet mode; // current inflate_codes mode\n\n\t// mode dependent information\n\tlet len = 0;\n\n\tlet tree; // pointer into tree\n\tlet tree_index = 0;\n\tlet need = 0; // bits needed\n\n\tlet lit = 0;\n\n\t// if EXT or COPY, where and how much\n\tlet get = 0; // bits to get for extra\n\tlet dist = 0; // distance back to copy from\n\n\tlet lbits = 0; // ltree bits decoded per branch\n\tlet dbits = 0; // dtree bits decoder per branch\n\tlet ltree; // literal/length/eob tree\n\tlet ltree_index = 0; // literal/length/eob tree\n\tlet dtree; // distance tree\n\tlet dtree_index = 0; // distance tree\n\n\t// Called with number of bytes left to write in win at least 258\n\t// (the maximum string length) and number of input bytes available\n\t// at least ten. The ten bytes are six bytes for the longest length/\n\t// distance pair plus four bytes for overloading the bit buffer.\n\n\tfunction inflate_fast(bl, bd, tl, tl_index, td, td_index, s, z) {\n\t\tlet t; // temporary pointer\n\t\tlet tp; // temporary pointer\n\t\tlet tp_index; // temporary pointer\n\t\tlet e; // extra bits or operation\n\t\tlet b; // bit buffer\n\t\tlet k; // bits in bit buffer\n\t\tlet p; // input data pointer\n\t\tlet n; // bytes available there\n\t\tlet q; // output win write pointer\n\t\tlet m; // bytes to end of win or read pointer\n\t\tlet ml; // mask for literal/length tree\n\t\tlet md; // mask for distance tree\n\t\tlet c; // bytes to copy\n\t\tlet d; // distance back to copy from\n\t\tlet r; // copy source pointer\n\n\t\tlet tp_index_t_3; // (tp_index+t)*3\n\n\t\t// load input, output, bit values\n\t\tp = z.next_in_index;\n\t\tn = z.avail_in;\n\t\tb = s.bitb;\n\t\tk = s.bitk;\n\t\tq = s.write;\n\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t// initialize masks\n\t\tml = inflate_mask[bl];\n\t\tmd = inflate_mask[bd];\n\n\t\t// do until not enough input or output space for fast loop\n\t\tdo { // assume called with m >= 258 && n >= 10\n\t\t\t// get literal/length code\n\t\t\twhile (k < (20)) { // max bits for literal/length code\n\t\t\t\tn--;\n\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\tk += 8;\n\t\t\t}\n\n\t\t\tt = b & ml;\n\t\t\ttp = tl;\n\t\t\ttp_index = tl_index;\n\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\tif ((e = tp[tp_index_t_3]) === 0) {\n\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\ts.win[q++] = /* (byte) */tp[tp_index_t_3 + 2];\n\t\t\t\tm--;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tdo {\n\n\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\tif ((e & 16) !== 0) {\n\t\t\t\t\te &= 15;\n\t\t\t\t\tc = tp[tp_index_t_3 + 2] + (/* (int) */b & inflate_mask[e]);\n\n\t\t\t\t\tb >>= e;\n\t\t\t\t\tk -= e;\n\n\t\t\t\t\t// decode distance base of block to copy\n\t\t\t\t\twhile (k < (15)) { // max bits for distance code\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tt = b & md;\n\t\t\t\t\ttp = td;\n\t\t\t\t\ttp_index = td_index;\n\t\t\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\t\t\te = tp[tp_index_t_3];\n\n\t\t\t\t\tdo {\n\n\t\t\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\t\t\tif ((e & 16) !== 0) {\n\t\t\t\t\t\t\t// get extra bits to add to distance base\n\t\t\t\t\t\t\te &= 15;\n\t\t\t\t\t\t\twhile (k < (e)) { // get extra bits (up to 13)\n\t\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\td = tp[tp_index_t_3 + 2] + (b & inflate_mask[e]);\n\n\t\t\t\t\t\t\tb >>= (e);\n\t\t\t\t\t\t\tk -= (e);\n\n\t\t\t\t\t\t\t// do the copy\n\t\t\t\t\t\t\tm -= c;\n\t\t\t\t\t\t\tif (q >= d) { // offset before dest\n\t\t\t\t\t\t\t\t// just copy\n\t\t\t\t\t\t\t\tr = q - d;\n\t\t\t\t\t\t\t\tif (q - r > 0 && 2 > (q - r)) {\n\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++]; // minimum\n\t\t\t\t\t\t\t\t\t// count is\n\t\t\t\t\t\t\t\t\t// three,\n\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++]; // so unroll\n\t\t\t\t\t\t\t\t\t// loop a\n\t\t\t\t\t\t\t\t\t// little\n\t\t\t\t\t\t\t\t\tc -= 2;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\ts.win.set(s.win.subarray(r, r + 2), q);\n\t\t\t\t\t\t\t\t\tq += 2;\n\t\t\t\t\t\t\t\t\tr += 2;\n\t\t\t\t\t\t\t\t\tc -= 2;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else { // else offset after destination\n\t\t\t\t\t\t\t\tr = q - d;\n\t\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t\tr += s.end; // force pointer in win\n\t\t\t\t\t\t\t\t} while (r < 0); // covers invalid distances\n\t\t\t\t\t\t\t\te = s.end - r;\n\t\t\t\t\t\t\t\tif (c > e) { // if source crosses,\n\t\t\t\t\t\t\t\t\tc -= e; // wrapped copy\n\t\t\t\t\t\t\t\t\tif (q - r > 0 && e > (q - r)) {\n\t\t\t\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++];\n\t\t\t\t\t\t\t\t\t\t} while (--e !== 0);\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\ts.win.set(s.win.subarray(r, r + e), q);\n\t\t\t\t\t\t\t\t\t\tq += e;\n\t\t\t\t\t\t\t\t\t\tr += e;\n\t\t\t\t\t\t\t\t\t\te = 0;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tr = 0; // copy rest from start of win\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// copy all or what's left\n\t\t\t\t\t\t\tif (q - r > 0 && c > (q - r)) {\n\t\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++];\n\t\t\t\t\t\t\t\t} while (--c !== 0);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts.win.set(s.win.subarray(r, r + c), q);\n\t\t\t\t\t\t\t\tq += c;\n\t\t\t\t\t\t\t\tr += c;\n\t\t\t\t\t\t\t\tc = 0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t} else if ((e & 64) === 0) {\n\t\t\t\t\t\t\tt += tp[tp_index_t_3 + 2];\n\t\t\t\t\t\t\tt += (b & inflate_mask[e]);\n\t\t\t\t\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\t\t\t\t\te = tp[tp_index_t_3];\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tz.msg = \"invalid distance code\";\n\n\t\t\t\t\t\t\tc = z.avail_in - n;\n\t\t\t\t\t\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\t\t\t\t\t\tn += c;\n\t\t\t\t\t\t\tp -= c;\n\t\t\t\t\t\t\tk -= c << 3;\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\n\t\t\t\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// eslint-disable-next-line no-constant-condition\n\t\t\t\t\t} while (true);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tif ((e & 64) === 0) {\n\t\t\t\t\tt += tp[tp_index_t_3 + 2];\n\t\t\t\t\tt += (b & inflate_mask[e]);\n\t\t\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\t\t\tif ((e = tp[tp_index_t_3]) === 0) {\n\n\t\t\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\t\t\ts.win[q++] = /* (byte) */tp[tp_index_t_3 + 2];\n\t\t\t\t\t\tm--;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t} else if ((e & 32) !== 0) {\n\n\t\t\t\t\tc = z.avail_in - n;\n\t\t\t\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\t\t\t\tn += c;\n\t\t\t\t\tp -= c;\n\t\t\t\t\tk -= c << 3;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\n\t\t\t\t\treturn Z_STREAM_END;\n\t\t\t\t} else {\n\t\t\t\t\tz.msg = \"invalid literal/length code\";\n\n\t\t\t\t\tc = z.avail_in - n;\n\t\t\t\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\t\t\t\tn += c;\n\t\t\t\t\tp -= c;\n\t\t\t\t\tk -= c << 3;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\n\t\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t\t}\n\t\t\t\t// eslint-disable-next-line no-constant-condition\n\t\t\t} while (true);\n\t\t} while (m >= 258 && n >= 10);\n\n\t\t// not enough input or output--restore pointers and return\n\t\tc = z.avail_in - n;\n\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\tn += c;\n\t\tp -= c;\n\t\tk -= c << 3;\n\n\t\ts.bitb = b;\n\t\ts.bitk = k;\n\t\tz.avail_in = n;\n\t\tz.total_in += p - z.next_in_index;\n\t\tz.next_in_index = p;\n\t\ts.write = q;\n\n\t\treturn Z_OK;\n\t}\n\n\tthat.init = function (bl, bd, tl, tl_index, td, td_index) {\n\t\tmode = START;\n\t\tlbits = /* (byte) */bl;\n\t\tdbits = /* (byte) */bd;\n\t\tltree = tl;\n\t\tltree_index = tl_index;\n\t\tdtree = td;\n\t\tdtree_index = td_index;\n\t\ttree = null;\n\t};\n\n\tthat.proc = function (s, z, r) {\n\t\tlet j; // temporary storage\n\t\tlet tindex; // temporary pointer\n\t\tlet e; // extra bits or operation\n\t\tlet b = 0; // bit buffer\n\t\tlet k = 0; // bits in bit buffer\n\t\tlet p = 0; // input data pointer\n\t\tlet n; // bytes available there\n\t\tlet q; // output win write pointer\n\t\tlet m; // bytes to end of win or read pointer\n\t\tlet f; // pointer to copy strings from\n\n\t\t// copy input/output information to locals (UPDATE macro restores)\n\t\tp = z.next_in_index;\n\t\tn = z.avail_in;\n\t\tb = s.bitb;\n\t\tk = s.bitk;\n\t\tq = s.write;\n\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t// process input and output based on current state\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\tswitch (mode) {\n\t\t\t\t// waiting for \"i:\"=input, \"o:\"=output, \"x:\"=nothing\n\t\t\t\tcase START: // x: set up for LEN\n\t\t\t\t\tif (m >= 258 && n >= 10) {\n\n\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\tr = inflate_fast(lbits, dbits, ltree, ltree_index, dtree, dtree_index, s, z);\n\n\t\t\t\t\t\tp = z.next_in_index;\n\t\t\t\t\t\tn = z.avail_in;\n\t\t\t\t\t\tb = s.bitb;\n\t\t\t\t\t\tk = s.bitk;\n\t\t\t\t\t\tq = s.write;\n\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\t\tif (r != Z_OK) {\n\t\t\t\t\t\t\tmode = r == Z_STREAM_END ? WASH : BADCODE;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tneed = lbits;\n\t\t\t\t\ttree = ltree;\n\t\t\t\t\ttree_index = ltree_index;\n\n\t\t\t\t\tmode = LEN;\n\t\t\t\t/* falls through */\n\t\t\t\tcase LEN: // i: get length/literal/eob next\n\t\t\t\t\tj = need;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\ttindex = (tree_index + (b & inflate_mask[j])) * 3;\n\n\t\t\t\t\tb >>>= (tree[tindex + 1]);\n\t\t\t\t\tk -= (tree[tindex + 1]);\n\n\t\t\t\t\te = tree[tindex];\n\n\t\t\t\t\tif (e === 0) { // literal\n\t\t\t\t\t\tlit = tree[tindex + 2];\n\t\t\t\t\t\tmode = LIT;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 16) !== 0) { // length\n\t\t\t\t\t\tget = e & 15;\n\t\t\t\t\t\tlen = tree[tindex + 2];\n\t\t\t\t\t\tmode = LENEXT;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 64) === 0) { // next table\n\t\t\t\t\t\tneed = e;\n\t\t\t\t\t\ttree_index = tindex / 3 + tree[tindex + 2];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 32) !== 0) { // end of block\n\t\t\t\t\t\tmode = WASH;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tmode = BADCODE; // invalid code\n\t\t\t\t\tz.msg = \"invalid literal/length code\";\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tcase LENEXT: // i: getting length extra (have base)\n\t\t\t\t\tj = get;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tlen += (b & inflate_mask[j]);\n\n\t\t\t\t\tb >>= j;\n\t\t\t\t\tk -= j;\n\n\t\t\t\t\tneed = dbits;\n\t\t\t\t\ttree = dtree;\n\t\t\t\t\ttree_index = dtree_index;\n\t\t\t\t\tmode = DIST;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DIST: // i: get distance next\n\t\t\t\t\tj = need;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\ttindex = (tree_index + (b & inflate_mask[j])) * 3;\n\n\t\t\t\t\tb >>= tree[tindex + 1];\n\t\t\t\t\tk -= tree[tindex + 1];\n\n\t\t\t\t\te = (tree[tindex]);\n\t\t\t\t\tif ((e & 16) !== 0) { // distance\n\t\t\t\t\t\tget = e & 15;\n\t\t\t\t\t\tdist = tree[tindex + 2];\n\t\t\t\t\t\tmode = DISTEXT;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 64) === 0) { // next table\n\t\t\t\t\t\tneed = e;\n\t\t\t\t\t\ttree_index = tindex / 3 + tree[tindex + 2];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tmode = BADCODE; // invalid code\n\t\t\t\t\tz.msg = \"invalid distance code\";\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tcase DISTEXT: // i: getting distance extra\n\t\t\t\t\tj = get;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tdist += (b & inflate_mask[j]);\n\n\t\t\t\t\tb >>= j;\n\t\t\t\t\tk -= j;\n\n\t\t\t\t\tmode = COPY;\n\t\t\t\t/* falls through */\n\t\t\t\tcase COPY: // o: copying bytes in win, waiting for space\n\t\t\t\t\tf = q - dist;\n\t\t\t\t\twhile (f < 0) { // modulo win size-\"while\" instead\n\t\t\t\t\t\tf += s.end; // of \"if\" handles invalid distances\n\t\t\t\t\t}\n\t\t\t\t\twhile (len !== 0) {\n\n\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\t\tr = s.inflate_flush(z, r);\n\t\t\t\t\t\t\t\tq = s.write;\n\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\ts.win[q++] = s.win[f++];\n\t\t\t\t\t\tm--;\n\n\t\t\t\t\t\tif (f == s.end)\n\t\t\t\t\t\t\tf = 0;\n\t\t\t\t\t\tlen--;\n\t\t\t\t\t}\n\t\t\t\t\tmode = START;\n\t\t\t\t\tbreak;\n\t\t\t\tcase LIT: // o: got literal, waiting for output space\n\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\tr = s.inflate_flush(z, r);\n\t\t\t\t\t\t\tq = s.write;\n\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tr = Z_OK;\n\n\t\t\t\t\ts.win[q++] = /* (byte) */lit;\n\t\t\t\t\tm--;\n\n\t\t\t\t\tmode = START;\n\t\t\t\t\tbreak;\n\t\t\t\tcase WASH: // o: got eob, possibly more output\n\t\t\t\t\tif (k > 7) { // return unused byte, if any\n\t\t\t\t\t\tk -= 8;\n\t\t\t\t\t\tn++;\n\t\t\t\t\t\tp--; // can always return one\n\t\t\t\t\t}\n\n\t\t\t\t\ts.write = q;\n\t\t\t\t\tr = s.inflate_flush(z, r);\n\t\t\t\t\tq = s.write;\n\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\tif (s.read != s.write) {\n\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tmode = END;\n\t\t\t\t/* falls through */\n\t\t\t\tcase END:\n\t\t\t\t\tr = Z_STREAM_END;\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tcase BADCODE: // x: got error\n\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tdefault:\n\t\t\t\t\tr = Z_STREAM_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t}\n\t\t}\n\t};\n\n\tthat.free = function () {\n\t\t// ZFREE(z, c);\n\t};\n\n}\n\n// InfBlocks\n\n// Table for deflate from PKZIP's appnote.txt.\nconst border = [ // Order of the bit length code lengths\n\t16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15];\n\nconst TYPE = 0; // get type bits (3, including end bit)\nconst LENS = 1; // get lengths for stored\nconst STORED = 2;// processing stored block\nconst TABLE = 3; // get table lengths\nconst BTREE = 4; // get bit lengths tree for a dynamic\n// block\nconst DTREE = 5; // get length, distance trees for a\n// dynamic block\nconst CODES = 6; // processing fixed or dynamic block\nconst DRY = 7; // output remaining win bytes\nconst DONELOCKS = 8; // finished last block, done\nconst BADBLOCKS = 9; // ot a data error--stuck here\n\nfunction InfBlocks(z, w) {\n\tconst that = this;\n\n\tlet mode = TYPE; // current inflate_block mode\n\n\tlet left = 0; // if STORED, bytes left to copy\n\n\tlet table = 0; // table lengths (14 bits)\n\tlet index = 0; // index into blens (or border)\n\tlet blens; // bit lengths of codes\n\tconst bb = [0]; // bit length tree depth\n\tconst tb = [0]; // bit length decoding tree\n\n\tconst codes = new InfCodes(); // if CODES, current state\n\n\tlet last = 0; // true if this block is the last block\n\n\tlet hufts = new Int32Array(MANY * 3); // single malloc for tree space\n\tconst check = 0; // check on output\n\tconst inftree = new InfTree();\n\n\tthat.bitk = 0; // bits in bit buffer\n\tthat.bitb = 0; // bit buffer\n\tthat.win = new Uint8Array(w); // sliding win\n\tthat.end = w; // one byte after sliding win\n\tthat.read = 0; // win read pointer\n\tthat.write = 0; // win write pointer\n\n\tthat.reset = function (z, c) {\n\t\tif (c)\n\t\t\tc[0] = check;\n\t\t// if (mode == BTREE || mode == DTREE) {\n\t\t// }\n\t\tif (mode == CODES) {\n\t\t\tcodes.free(z);\n\t\t}\n\t\tmode = TYPE;\n\t\tthat.bitk = 0;\n\t\tthat.bitb = 0;\n\t\tthat.read = that.write = 0;\n\t};\n\n\tthat.reset(z, null);\n\n\t// copy as much as possible from the sliding win to the output area\n\tthat.inflate_flush = function (z, r) {\n\t\tlet n;\n\t\tlet p;\n\t\tlet q;\n\n\t\t// local copies of source and destination pointers\n\t\tp = z.next_out_index;\n\t\tq = that.read;\n\n\t\t// compute number of bytes to copy as far as end of win\n\t\tn = /* (int) */((q <= that.write ? that.write : that.end) - q);\n\t\tif (n > z.avail_out)\n\t\t\tn = z.avail_out;\n\t\tif (n !== 0 && r == Z_BUF_ERROR)\n\t\t\tr = Z_OK;\n\n\t\t// update counters\n\t\tz.avail_out -= n;\n\t\tz.total_out += n;\n\n\t\t// copy as far as end of win\n\t\tz.next_out.set(that.win.subarray(q, q + n), p);\n\t\tp += n;\n\t\tq += n;\n\n\t\t// see if more to copy at beginning of win\n\t\tif (q == that.end) {\n\t\t\t// wrap pointers\n\t\t\tq = 0;\n\t\t\tif (that.write == that.end)\n\t\t\t\tthat.write = 0;\n\n\t\t\t// compute bytes to copy\n\t\t\tn = that.write - q;\n\t\t\tif (n > z.avail_out)\n\t\t\t\tn = z.avail_out;\n\t\t\tif (n !== 0 && r == Z_BUF_ERROR)\n\t\t\t\tr = Z_OK;\n\n\t\t\t// update counters\n\t\t\tz.avail_out -= n;\n\t\t\tz.total_out += n;\n\n\t\t\t// copy\n\t\t\tz.next_out.set(that.win.subarray(q, q + n), p);\n\t\t\tp += n;\n\t\t\tq += n;\n\t\t}\n\n\t\t// update pointers\n\t\tz.next_out_index = p;\n\t\tthat.read = q;\n\n\t\t// done\n\t\treturn r;\n\t};\n\n\tthat.proc = function (z, r) {\n\t\tlet t; // temporary storage\n\t\tlet b; // bit buffer\n\t\tlet k; // bits in bit buffer\n\t\tlet p; // input data pointer\n\t\tlet n; // bytes available there\n\t\tlet q; // output win write pointer\n\t\tlet m; // bytes to end of win or read pointer\n\n\t\tlet i;\n\n\t\t// copy input/output information to locals (UPDATE macro restores)\n\t\t// {\n\t\tp = z.next_in_index;\n\t\tn = z.avail_in;\n\t\tb = that.bitb;\n\t\tk = that.bitk;\n\t\t// }\n\t\t// {\n\t\tq = that.write;\n\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t// }\n\n\t\t// process input based on current state\n\t\t// DEBUG dtree\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\tlet bl, bd, tl, td, bl_, bd_, tl_, td_;\n\t\t\tswitch (mode) {\n\t\t\t\tcase TYPE:\n\n\t\t\t\t\twhile (k < (3)) {\n\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\t\t\t\t\tt = /* (int) */(b & 7);\n\t\t\t\t\tlast = t & 1;\n\n\t\t\t\t\tswitch (t >>> 1) {\n\t\t\t\t\t\tcase 0: // stored\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\t\t\t\t\t\t\tt = k & 7; // go to byte boundary\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (t);\n\t\t\t\t\t\t\tk -= (t);\n\t\t\t\t\t\t\t// }\n\t\t\t\t\t\t\tmode = LENS; // get length of stored block\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 1: // fixed\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tbl = []; // new Array(1);\n\t\t\t\t\t\t\tbd = []; // new Array(1);\n\t\t\t\t\t\t\ttl = [[]]; // new Array(1);\n\t\t\t\t\t\t\ttd = [[]]; // new Array(1);\n\n\t\t\t\t\t\t\tInfTree.inflate_trees_fixed(bl, bd, tl, td);\n\t\t\t\t\t\t\tcodes.init(bl[0], bd[0], tl[0], 0, td[0], 0);\n\t\t\t\t\t\t\t// }\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\n\t\t\t\t\t\t\tmode = CODES;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 2: // dynamic\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\n\t\t\t\t\t\t\tmode = TABLE;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 3: // illegal\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t\tz.msg = \"invalid block type\";\n\t\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase LENS:\n\n\t\t\t\t\twhile (k < (32)) {\n\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ((((~b) >>> 16) & 0xffff) != (b & 0xffff)) {\n\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\tz.msg = \"invalid stored block lengths\";\n\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tleft = (b & 0xffff);\n\t\t\t\t\tb = k = 0; // dump bits\n\t\t\t\t\tmode = left !== 0 ? STORED : (last !== 0 ? DRY : TYPE);\n\t\t\t\t\tbreak;\n\t\t\t\tcase STORED:\n\t\t\t\t\tif (n === 0) {\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\tif (q == that.end && that.read !== 0) {\n\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\tr = that.inflate_flush(z, r);\n\t\t\t\t\t\t\tq = that.write;\n\t\t\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\t\t\tif (q == that.end && that.read !== 0) {\n\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tr = Z_OK;\n\n\t\t\t\t\tt = left;\n\t\t\t\t\tif (t > n)\n\t\t\t\t\t\tt = n;\n\t\t\t\t\tif (t > m)\n\t\t\t\t\t\tt = m;\n\t\t\t\t\tthat.win.set(z.read_buf(p, t), q);\n\t\t\t\t\tp += t;\n\t\t\t\t\tn -= t;\n\t\t\t\t\tq += t;\n\t\t\t\t\tm -= t;\n\t\t\t\t\tif ((left -= t) !== 0)\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tmode = last !== 0 ? DRY : TYPE;\n\t\t\t\t\tbreak;\n\t\t\t\tcase TABLE:\n\n\t\t\t\t\twhile (k < (14)) {\n\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\ttable = t = (b & 0x3fff);\n\t\t\t\t\tif ((t & 0x1f) > 29 || ((t >> 5) & 0x1f) > 29) {\n\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\tz.msg = \"too many length or distance symbols\";\n\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tt = 258 + (t & 0x1f) + ((t >> 5) & 0x1f);\n\t\t\t\t\tif (!blens || blens.length < t) {\n\t\t\t\t\t\tblens = []; // new Array(t);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfor (i = 0; i < t; i++) {\n\t\t\t\t\t\t\tblens[i] = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// {\n\t\t\t\t\tb >>>= (14);\n\t\t\t\t\tk -= (14);\n\t\t\t\t\t// }\n\n\t\t\t\t\tindex = 0;\n\t\t\t\t\tmode = BTREE;\n\t\t\t\t/* falls through */\n\t\t\t\tcase BTREE:\n\t\t\t\t\twhile (index < 4 + (table >>> 10)) {\n\t\t\t\t\t\twhile (k < (3)) {\n\t\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tblens[border[index++]] = b & 7;\n\n\t\t\t\t\t\t// {\n\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t// }\n\t\t\t\t\t}\n\n\t\t\t\t\twhile (index < 19) {\n\t\t\t\t\t\tblens[border[index++]] = 0;\n\t\t\t\t\t}\n\n\t\t\t\t\tbb[0] = 7;\n\t\t\t\t\tt = inftree.inflate_trees_bits(blens, bb, tb, hufts, z);\n\t\t\t\t\tif (t != Z_OK) {\n\t\t\t\t\t\tr = t;\n\t\t\t\t\t\tif (r == Z_DATA_ERROR) {\n\t\t\t\t\t\t\tblens = null;\n\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\n\t\t\t\t\tindex = 0;\n\t\t\t\t\tmode = DTREE;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DTREE:\n\t\t\t\t\t// eslint-disable-next-line no-constant-condition\n\t\t\t\t\twhile (true) {\n\t\t\t\t\t\tt = table;\n\t\t\t\t\t\tif (index >= 258 + (t & 0x1f) + ((t >> 5) & 0x1f)) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tlet j, c;\n\n\t\t\t\t\t\tt = bb[0];\n\n\t\t\t\t\t\twhile (k < (t)) {\n\t\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// if (tb[0] == -1) {\n\t\t\t\t\t\t// System.err.println(\"null...\");\n\t\t\t\t\t\t// }\n\n\t\t\t\t\t\tt = hufts[(tb[0] + (b & inflate_mask[t])) * 3 + 1];\n\t\t\t\t\t\tc = hufts[(tb[0] + (b & inflate_mask[t])) * 3 + 2];\n\n\t\t\t\t\t\tif (c < 16) {\n\t\t\t\t\t\t\tb >>>= (t);\n\t\t\t\t\t\t\tk -= (t);\n\t\t\t\t\t\t\tblens[index++] = c;\n\t\t\t\t\t\t} else { // c == 16..18\n\t\t\t\t\t\t\ti = c == 18 ? 7 : c - 14;\n\t\t\t\t\t\t\tj = c == 18 ? 11 : 3;\n\n\t\t\t\t\t\t\twhile (k < (t + i)) {\n\t\t\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tb >>>= (t);\n\t\t\t\t\t\t\tk -= (t);\n\n\t\t\t\t\t\t\tj += (b & inflate_mask[i]);\n\n\t\t\t\t\t\t\tb >>>= (i);\n\t\t\t\t\t\t\tk -= (i);\n\n\t\t\t\t\t\t\ti = index;\n\t\t\t\t\t\t\tt = table;\n\t\t\t\t\t\t\tif (i + j > 258 + (t & 0x1f) + ((t >> 5) & 0x1f) || (c == 16 && i < 1)) {\n\t\t\t\t\t\t\t\tblens = null;\n\t\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t\t\tz.msg = \"invalid bit length repeat\";\n\t\t\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tc = c == 16 ? blens[i - 1] : 0;\n\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\tblens[i++] = c;\n\t\t\t\t\t\t\t} while (--j !== 0);\n\t\t\t\t\t\t\tindex = i;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\ttb[0] = -1;\n\t\t\t\t\t// {\n\t\t\t\t\tbl_ = []; // new Array(1);\n\t\t\t\t\tbd_ = []; // new Array(1);\n\t\t\t\t\ttl_ = []; // new Array(1);\n\t\t\t\t\ttd_ = []; // new Array(1);\n\t\t\t\t\tbl_[0] = 9; // must be <= 9 for lookahead assumptions\n\t\t\t\t\tbd_[0] = 6; // must be <= 9 for lookahead assumptions\n\n\t\t\t\t\tt = table;\n\t\t\t\t\tt = inftree.inflate_trees_dynamic(257 + (t & 0x1f), 1 + ((t >> 5) & 0x1f), blens, bl_, bd_, tl_, td_, hufts, z);\n\n\t\t\t\t\tif (t != Z_OK) {\n\t\t\t\t\t\tif (t == Z_DATA_ERROR) {\n\t\t\t\t\t\t\tblens = null;\n\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tr = t;\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tcodes.init(bl_[0], bd_[0], hufts, tl_[0], hufts, td_[0]);\n\t\t\t\t\t// }\n\t\t\t\t\tmode = CODES;\n\t\t\t\t/* falls through */\n\t\t\t\tcase CODES:\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\n\t\t\t\t\tif ((r = codes.proc(that, z, r)) != Z_STREAM_END) {\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tr = Z_OK;\n\t\t\t\t\tcodes.free(z);\n\n\t\t\t\t\tp = z.next_in_index;\n\t\t\t\t\tn = z.avail_in;\n\t\t\t\t\tb = that.bitb;\n\t\t\t\t\tk = that.bitk;\n\t\t\t\t\tq = that.write;\n\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\n\t\t\t\t\tif (last === 0) {\n\t\t\t\t\t\tmode = TYPE;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tmode = DRY;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DRY:\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\tr = that.inflate_flush(z, r);\n\t\t\t\t\tq = that.write;\n\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\tif (that.read != that.write) {\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tmode = DONELOCKS;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DONELOCKS:\n\t\t\t\t\tr = Z_STREAM_END;\n\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\tcase BADBLOCKS:\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\treturn that.inflate_flush(z, r);\n\n\t\t\t\tdefault:\n\t\t\t\t\tr = Z_STREAM_ERROR;\n\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t}\n\t\t}\n\t};\n\n\tthat.free = function (z) {\n\t\tthat.reset(z, null);\n\t\tthat.win = null;\n\t\thufts = null;\n\t\t// ZFREE(z, s);\n\t};\n\n\tthat.set_dictionary = function (d, start, n) {\n\t\tthat.win.set(d.subarray(start, start + n), 0);\n\t\tthat.read = that.write = n;\n\t};\n\n\t// Returns true if inflate is currently at the end of a block generated\n\t// by Z_SYNC_FLUSH or Z_FULL_FLUSH.\n\tthat.sync_point = function () {\n\t\treturn mode == LENS ? 1 : 0;\n\t};\n\n}\n\n// Inflate\n\n// preset dictionary flag in zlib header\nconst PRESET_DICT = 0x20;\n\nconst Z_DEFLATED = 8;\n\nconst METHOD = 0; // waiting for method byte\nconst FLAG = 1; // waiting for flag byte\nconst DICT4 = 2; // four dictionary check bytes to go\nconst DICT3 = 3; // three dictionary check bytes to go\nconst DICT2 = 4; // two dictionary check bytes to go\nconst DICT1 = 5; // one dictionary check byte to go\nconst DICT0 = 6; // waiting for inflateSetDictionary\nconst BLOCKS = 7; // decompressing blocks\nconst DONE = 12; // finished check, done\nconst BAD = 13; // got an error--stay here\n\nconst mark = [0, 0, 0xff, 0xff];\n\nfunction Inflate() {\n\tconst that = this;\n\n\tthat.mode = 0; // current inflate mode\n\n\t// mode dependent information\n\tthat.method = 0; // if FLAGS, method byte\n\n\t// if CHECK, check values to compare\n\tthat.was = [0]; // new Array(1); // computed check value\n\tthat.need = 0; // stream check value\n\n\t// if BAD, inflateSync's marker bytes count\n\tthat.marker = 0;\n\n\t// mode independent information\n\tthat.wbits = 0; // log2(win size) (8..15, defaults to 15)\n\n\t// this.blocks; // current inflate_blocks state\n\n\tfunction inflateReset(z) {\n\t\tif (!z || !z.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\n\t\tz.total_in = z.total_out = 0;\n\t\tz.msg = null;\n\t\tz.istate.mode = BLOCKS;\n\t\tz.istate.blocks.reset(z, null);\n\t\treturn Z_OK;\n\t}\n\n\tthat.inflateEnd = function (z) {\n\t\tif (that.blocks)\n\t\t\tthat.blocks.free(z);\n\t\tthat.blocks = null;\n\t\t// ZFREE(z, z->state);\n\t\treturn Z_OK;\n\t};\n\n\tthat.inflateInit = function (z, w) {\n\t\tz.msg = null;\n\t\tthat.blocks = null;\n\n\t\t// set win size\n\t\tif (w < 8 || w > 15) {\n\t\t\tthat.inflateEnd(z);\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\tthat.wbits = w;\n\n\t\tz.istate.blocks = new InfBlocks(z, 1 << w);\n\n\t\t// reset state\n\t\tinflateReset(z);\n\t\treturn Z_OK;\n\t};\n\n\tthat.inflate = function (z, f) {\n\t\tlet r;\n\t\tlet b;\n\n\t\tif (!z || !z.istate || !z.next_in)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst istate = z.istate;\n\t\tf = f == Z_FINISH ? Z_BUF_ERROR : Z_OK;\n\t\tr = Z_BUF_ERROR;\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\tswitch (istate.mode) {\n\t\t\t\tcase METHOD:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tif (((istate.method = z.read_byte(z.next_in_index++)) & 0xf) != Z_DEFLATED) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tz.msg = \"unknown compression method\";\n\t\t\t\t\t\tistate.marker = 5; // can't try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((istate.method >> 4) + 8 > istate.wbits) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tz.msg = \"invalid win size\";\n\t\t\t\t\t\tistate.marker = 5; // can't try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tistate.mode = FLAG;\n\t\t\t\t/* falls through */\n\t\t\t\tcase FLAG:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tb = (z.read_byte(z.next_in_index++)) & 0xff;\n\n\t\t\t\t\tif ((((istate.method << 8) + b) % 31) !== 0) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tz.msg = \"incorrect header check\";\n\t\t\t\t\t\tistate.marker = 5; // can't try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ((b & PRESET_DICT) === 0) {\n\t\t\t\t\t\tistate.mode = BLOCKS;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tistate.mode = DICT4;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT4:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need = ((z.read_byte(z.next_in_index++) & 0xff) << 24) & 0xff000000;\n\t\t\t\t\tistate.mode = DICT3;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT3:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need += ((z.read_byte(z.next_in_index++) & 0xff) << 16) & 0xff0000;\n\t\t\t\t\tistate.mode = DICT2;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT2:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need += ((z.read_byte(z.next_in_index++) & 0xff) << 8) & 0xff00;\n\t\t\t\t\tistate.mode = DICT1;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT1:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need += (z.read_byte(z.next_in_index++) & 0xff);\n\t\t\t\t\tistate.mode = DICT0;\n\t\t\t\t\treturn Z_NEED_DICT;\n\t\t\t\tcase DICT0:\n\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\tz.msg = \"need dictionary\";\n\t\t\t\t\tistate.marker = 0; // can try inflateSync\n\t\t\t\t\treturn Z_STREAM_ERROR;\n\t\t\t\tcase BLOCKS:\n\n\t\t\t\t\tr = istate.blocks.proc(z, r);\n\t\t\t\t\tif (r == Z_DATA_ERROR) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tistate.marker = 0; // can try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif (r == Z_OK) {\n\t\t\t\t\t\tr = f;\n\t\t\t\t\t}\n\t\t\t\t\tif (r != Z_STREAM_END) {\n\t\t\t\t\t\treturn r;\n\t\t\t\t\t}\n\t\t\t\t\tr = f;\n\t\t\t\t\tistate.blocks.reset(z, istate.was);\n\t\t\t\t\tistate.mode = DONE;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DONE:\n\t\t\t\t\tz.avail_in = 0;\n\t\t\t\t\treturn Z_STREAM_END;\n\t\t\t\tcase BAD:\n\t\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t\tdefault:\n\t\t\t\t\treturn Z_STREAM_ERROR;\n\t\t\t}\n\t\t}\n\t};\n\n\tthat.inflateSetDictionary = function (z, dictionary, dictLength) {\n\t\tlet index = 0, length = dictLength;\n\t\tif (!z || !z.istate || z.istate.mode != DICT0)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst istate = z.istate;\n\t\tif (length >= (1 << istate.wbits)) {\n\t\t\tlength = (1 << istate.wbits) - 1;\n\t\t\tindex = dictLength - length;\n\t\t}\n\t\tistate.blocks.set_dictionary(dictionary, index, length);\n\t\tistate.mode = BLOCKS;\n\t\treturn Z_OK;\n\t};\n\n\tthat.inflateSync = function (z) {\n\t\tlet n; // number of bytes to look at\n\t\tlet p; // pointer to bytes\n\t\tlet m; // number of marker bytes found in a row\n\t\tlet r, w; // temporaries to save total_in and total_out\n\n\t\t// set up\n\t\tif (!z || !z.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst istate = z.istate;\n\t\tif (istate.mode != BAD) {\n\t\t\tistate.mode = BAD;\n\t\t\tistate.marker = 0;\n\t\t}\n\t\tif ((n = z.avail_in) === 0)\n\t\t\treturn Z_BUF_ERROR;\n\t\tp = z.next_in_index;\n\t\tm = istate.marker;\n\n\t\t// search\n\t\twhile (n !== 0 && m < 4) {\n\t\t\tif (z.read_byte(p) == mark[m]) {\n\t\t\t\tm++;\n\t\t\t} else if (z.read_byte(p) !== 0) {\n\t\t\t\tm = 0;\n\t\t\t} else {\n\t\t\t\tm = 4 - m;\n\t\t\t}\n\t\t\tp++;\n\t\t\tn--;\n\t\t}\n\n\t\t// restore\n\t\tz.total_in += p - z.next_in_index;\n\t\tz.next_in_index = p;\n\t\tz.avail_in = n;\n\t\tistate.marker = m;\n\n\t\t// return no joy or set up to restart on a new block\n\t\tif (m != 4) {\n\t\t\treturn Z_DATA_ERROR;\n\t\t}\n\t\tr = z.total_in;\n\t\tw = z.total_out;\n\t\tinflateReset(z);\n\t\tz.total_in = r;\n\t\tz.total_out = w;\n\t\tistate.mode = BLOCKS;\n\t\treturn Z_OK;\n\t};\n\n\t// Returns true if inflate is currently at the end of a block generated\n\t// by Z_SYNC_FLUSH or Z_FULL_FLUSH. This function is used by one PPP\n\t// implementation to provide an additional safety check. PPP uses\n\t// Z_SYNC_FLUSH\n\t// but removes the length bytes of the resulting empty stored block. When\n\t// decompressing, PPP checks that at the end of input packet, inflate is\n\t// waiting for these length bytes.\n\tthat.inflateSyncPoint = function (z) {\n\t\tif (!z || !z.istate || !z.istate.blocks)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn z.istate.blocks.sync_point();\n\t};\n}\n\n// ZStream\n\nfunction ZStream() {\n}\n\nZStream.prototype = {\n\tinflateInit(bits) {\n\t\tconst that = this;\n\t\tthat.istate = new Inflate();\n\t\tif (!bits)\n\t\t\tbits = MAX_BITS;\n\t\treturn that.istate.inflateInit(that, bits);\n\t},\n\n\tinflate(f) {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.istate.inflate(that, f);\n\t},\n\n\tinflateEnd() {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst ret = that.istate.inflateEnd(that);\n\t\tthat.istate = null;\n\t\treturn ret;\n\t},\n\n\tinflateSync() {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.istate.inflateSync(that);\n\t},\n\tinflateSetDictionary(dictionary, dictLength) {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.istate.inflateSetDictionary(that, dictionary, dictLength);\n\t},\n\tread_byte(start) {\n\t\tconst that = this;\n\t\treturn that.next_in[start];\n\t},\n\tread_buf(start, size) {\n\t\tconst that = this;\n\t\treturn that.next_in.subarray(start, start + size);\n\t}\n};\n\n// Inflater\n\nfunction ZipInflate(options) {\n\tconst that = this;\n\tconst z = new ZStream();\n\tconst bufsize = options && options.chunkSize ? Math.floor(options.chunkSize * 2) : 128 * 1024;\n\tconst flush = Z_NO_FLUSH;\n\tconst buf = new Uint8Array(bufsize);\n\tlet nomoreinput = false;\n\n\tz.inflateInit();\n\tz.next_out = buf;\n\n\tthat.append = function (data, onprogress) {\n\t\tconst buffers = [];\n\t\tlet err, array, lastIndex = 0, bufferIndex = 0, bufferSize = 0;\n\t\tif (data.length === 0)\n\t\t\treturn;\n\t\tz.next_in_index = 0;\n\t\tz.next_in = data;\n\t\tz.avail_in = data.length;\n\t\tdo {\n\t\t\tz.next_out_index = 0;\n\t\t\tz.avail_out = bufsize;\n\t\t\tif ((z.avail_in === 0) && (!nomoreinput)) { // if buffer is empty and more input is available, refill it\n\t\t\t\tz.next_in_index = 0;\n\t\t\t\tnomoreinput = true;\n\t\t\t}\n\t\t\terr = z.inflate(flush);\n\t\t\tif (nomoreinput && (err === Z_BUF_ERROR)) {\n\t\t\t\tif (z.avail_in !== 0)\n\t\t\t\t\tthrow new Error(\"inflating: bad input\");\n\t\t\t} else if (err !== Z_OK && err !== Z_STREAM_END)\n\t\t\t\tthrow new Error(\"inflating: \" + z.msg);\n\t\t\tif ((nomoreinput || err === Z_STREAM_END) && (z.avail_in === data.length))\n\t\t\t\tthrow new Error(\"inflating: bad input\");\n\t\t\tif (z.next_out_index)\n\t\t\t\tif (z.next_out_index === bufsize)\n\t\t\t\t\tbuffers.push(new Uint8Array(buf));\n\t\t\t\telse\n\t\t\t\t\tbuffers.push(buf.slice(0, z.next_out_index));\n\t\t\tbufferSize += z.next_out_index;\n\t\t\tif (onprogress && z.next_in_index > 0 && z.next_in_index != lastIndex) {\n\t\t\t\tonprogress(z.next_in_index);\n\t\t\t\tlastIndex = z.next_in_index;\n\t\t\t}\n\t\t} while (z.avail_in > 0 || z.avail_out === 0);\n\t\tif (buffers.length > 1) {\n\t\t\tarray = new Uint8Array(bufferSize);\n\t\t\tbuffers.forEach(function (chunk) {\n\t\t\t\tarray.set(chunk, bufferIndex);\n\t\t\t\tbufferIndex += chunk.length;\n\t\t\t});\n\t\t} else {\n\t\t\tarray = buffers[0] || new Uint8Array();\n\t\t}\n\t\treturn array;\n\t};\n\tthat.flush = function () {\n\t\tz.inflateEnd();\n\t};\n}\n\nexport {\n\tZipInflate as Inflate\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nconst MAX_32_BITS = 0xffffffff;\nconst MAX_16_BITS = 0xffff;\nconst COMPRESSION_METHOD_DEFLATE = 0x08;\nconst COMPRESSION_METHOD_STORE = 0x00;\nconst COMPRESSION_METHOD_AES = 0x63;\n\nconst LOCAL_FILE_HEADER_SIGNATURE = 0x04034b50;\nconst SPLIT_ZIP_FILE_SIGNATURE = 0x08074b50;\nconst DATA_DESCRIPTOR_RECORD_SIGNATURE = SPLIT_ZIP_FILE_SIGNATURE;\nconst CENTRAL_FILE_HEADER_SIGNATURE = 0x02014b50;\nconst END_OF_CENTRAL_DIR_SIGNATURE = 0x06054b50;\nconst ZIP64_END_OF_CENTRAL_DIR_SIGNATURE = 0x06064b50;\nconst ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE = 0x07064b50;\nconst END_OF_CENTRAL_DIR_LENGTH = 22;\nconst ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH = 20;\nconst ZIP64_END_OF_CENTRAL_DIR_LENGTH = 56;\nconst ZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH = END_OF_CENTRAL_DIR_LENGTH + ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH + ZIP64_END_OF_CENTRAL_DIR_LENGTH;\n\nconst EXTRAFIELD_TYPE_ZIP64 = 0x0001;\nconst EXTRAFIELD_TYPE_AES = 0x9901;\nconst EXTRAFIELD_TYPE_NTFS = 0x000a;\nconst EXTRAFIELD_TYPE_NTFS_TAG1 = 0x0001;\nconst EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP = 0x5455;\nconst EXTRAFIELD_TYPE_UNICODE_PATH = 0x7075;\nconst EXTRAFIELD_TYPE_UNICODE_COMMENT = 0x6375;\n\nconst BITFLAG_ENCRYPTED = 0x01;\nconst BITFLAG_LEVEL = 0x06;\nconst BITFLAG_DATA_DESCRIPTOR = 0x0008;\nconst BITFLAG_LANG_ENCODING_FLAG = 0x0800;\nconst FILE_ATTR_MSDOS_DIR_MASK = 0x10;\n\nconst VERSION_DEFLATE = 0x14;\nconst VERSION_ZIP64 = 0x2D;\nconst VERSION_AES = 0x33;\n\nconst DIRECTORY_SIGNATURE = \"/\";\n\nconst MAX_DATE = new Date(2107, 11, 31);\nconst MIN_DATE = new Date(1980, 0, 1);\n\nconst UNDEFINED_VALUE = undefined;\nconst UNDEFINED_TYPE = \"undefined\";\nconst FUNCTION_TYPE = \"function\";\n\nexport {\n\tMAX_32_BITS,\n\tMAX_16_BITS,\n\tCOMPRESSION_METHOD_DEFLATE,\n\tCOMPRESSION_METHOD_STORE,\n\tCOMPRESSION_METHOD_AES,\n\tSPLIT_ZIP_FILE_SIGNATURE,\n\tLOCAL_FILE_HEADER_SIGNATURE,\n\tDATA_DESCRIPTOR_RECORD_SIGNATURE,\n\tCENTRAL_FILE_HEADER_SIGNATURE,\n\tEND_OF_CENTRAL_DIR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_SIGNATURE,\n\tEXTRAFIELD_TYPE_ZIP64,\n\tEXTRAFIELD_TYPE_AES,\n\tEXTRAFIELD_TYPE_NTFS,\n\tEXTRAFIELD_TYPE_NTFS_TAG1,\n\tEXTRAFIELD_TYPE_EXTENDED_TIMESTAMP,\n\tEXTRAFIELD_TYPE_UNICODE_PATH,\n\tEXTRAFIELD_TYPE_UNICODE_COMMENT,\n\tEND_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH,\n\tBITFLAG_ENCRYPTED,\n\tBITFLAG_LEVEL,\n\tBITFLAG_DATA_DESCRIPTOR,\n\tBITFLAG_LANG_ENCODING_FLAG,\n\tFILE_ATTR_MSDOS_DIR_MASK,\n\tVERSION_DEFLATE,\n\tVERSION_ZIP64,\n\tVERSION_AES,\n\tDIRECTORY_SIGNATURE,\n\tMIN_DATE,\n\tMAX_DATE,\n\tUNDEFINED_VALUE,\n\tUNDEFINED_TYPE,\n\tFUNCTION_TYPE\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n\nexport {\n\tStreamAdapter\n};\n\nclass StreamAdapter {\n\n\tconstructor(Codec) {\n\t\treturn class extends TransformStream {\n\t\t\tconstructor(_format, options) {\n\t\t\t\tconst codec = new Codec(options);\n\t\t\t\tsuper({\n\t\t\t\t\ttransform(chunk, controller) {\n\t\t\t\t\t\tcontroller.enqueue(codec.append(chunk));\n\t\t\t\t\t},\n\t\t\t\t\tflush(controller) {\n\t\t\t\t\t\tconst chunk = codec.flush();\n\t\t\t\t\t\tif (chunk) {\n\t\t\t\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t};\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global navigator, CompressionStream, DecompressionStream */\n\nimport {\n\tUNDEFINED_VALUE,\n\tUNDEFINED_TYPE\n} from \"./constants.js\";\nimport { StreamAdapter } from \"./streams/stream-adapter.js\";\n\nconst MINIMUM_CHUNK_SIZE = 64;\nlet maxWorkers = 2;\ntry {\n\tif (typeof navigator != UNDEFINED_TYPE && navigator.hardwareConcurrency) {\n\t\tmaxWorkers = navigator.hardwareConcurrency;\n\t}\n} catch (_error) {\n\t// ignored\n}\nconst DEFAULT_CONFIGURATION = {\n\tchunkSize: 512 * 1024,\n\tmaxWorkers,\n\tterminateWorkerTimeout: 5000,\n\tuseWebWorkers: true,\n\tuseCompressionStream: true,\n\tworkerScripts: UNDEFINED_VALUE,\n\tCompressionStreamNative: typeof CompressionStream != UNDEFINED_TYPE && CompressionStream,\n\tDecompressionStreamNative: typeof DecompressionStream != UNDEFINED_TYPE && DecompressionStream\n};\n\nconst config = Object.assign({}, DEFAULT_CONFIGURATION);\n\nexport {\n\tconfigure,\n\tgetConfiguration,\n\tgetChunkSize\n};\n\nfunction getConfiguration() {\n\treturn config;\n}\n\nfunction getChunkSize(config) {\n\treturn Math.max(config.chunkSize, MINIMUM_CHUNK_SIZE);\n}\n\nfunction configure(configuration) {\n\tconst {\n\t\tbaseURL,\n\t\tchunkSize,\n\t\tmaxWorkers,\n\t\tterminateWorkerTimeout,\n\t\tuseCompressionStream,\n\t\tuseWebWorkers,\n\t\tDeflate,\n\t\tInflate,\n\t\tCompressionStream,\n\t\tDecompressionStream,\n\t\tworkerScripts\n\t} = configuration;\n\tsetIfDefined(\"baseURL\", baseURL);\n\tsetIfDefined(\"chunkSize\", chunkSize);\n\tsetIfDefined(\"maxWorkers\", maxWorkers);\n\tsetIfDefined(\"terminateWorkerTimeout\", terminateWorkerTimeout);\n\tsetIfDefined(\"useCompressionStream\", useCompressionStream);\n\tsetIfDefined(\"useWebWorkers\", useWebWorkers);\n\tif (Deflate) {\n\t\tconfig.CompressionStream = new StreamAdapter(Deflate);\n\t}\n\tif (Inflate) {\n\t\tconfig.DecompressionStream = new StreamAdapter(Inflate);\n\t}\n\tsetIfDefined(\"CompressionStream\", CompressionStream);\n\tsetIfDefined(\"DecompressionStream\", DecompressionStream);\n\tif (workerScripts !== UNDEFINED_VALUE) {\n\t\tconst { deflate, inflate } = workerScripts;\n\t\tif (deflate || inflate) {\n\t\t\tif (!config.workerScripts) {\n\t\t\t\tconfig.workerScripts = {};\n\t\t\t}\n\t\t}\n\t\tif (deflate) {\n\t\t\tif (!Array.isArray(deflate)) {\n\t\t\t\tthrow new Error(\"workerScripts.deflate must be an array\");\n\t\t\t}\n\t\t\tconfig.workerScripts.deflate = deflate;\n\t\t}\n\t\tif (inflate) {\n\t\t\tif (!Array.isArray(inflate)) {\n\t\t\t\tthrow new Error(\"workerScripts.inflate must be an array\");\n\t\t\t}\n\t\t\tconfig.workerScripts.inflate = inflate;\n\t\t}\n\t}\n}\n\nfunction setIfDefined(propertyName, propertyValue) {\n\tif (propertyValue !== UNDEFINED_VALUE) {\n\t\tconfig[propertyName] = propertyValue;\n\t}\n}\n","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n// deno-lint-ignore-file no-prototype-builtins\n\nimport { getMimeType as getDefaultMimeType } from \"./default-mime-type.js\";\n\nconst table = {\n\t\"application\": {\n\t\t\"andrew-inset\": \"ez\",\n\t\t\"annodex\": \"anx\",\n\t\t\"atom+xml\": \"atom\",\n\t\t\"atomcat+xml\": \"atomcat\",\n\t\t\"atomserv+xml\": \"atomsrv\",\n\t\t\"bbolin\": \"lin\",\n\t\t\"cap\": [\"cap\", \"pcap\"],\n\t\t\"cu-seeme\": \"cu\",\n\t\t\"davmount+xml\": \"davmount\",\n\t\t\"dsptype\": \"tsp\",\n\t\t\"ecmascript\": [\"es\", \"ecma\"],\n\t\t\"futuresplash\": \"spl\",\n\t\t\"hta\": \"hta\",\n\t\t\"java-archive\": \"jar\",\n\t\t\"java-serialized-object\": \"ser\",\n\t\t\"java-vm\": \"class\",\n\t\t\"javascript\": \"js\",\n\t\t\"m3g\": \"m3g\",\n\t\t\"mac-binhex40\": \"hqx\",\n\t\t\"mathematica\": [\"nb\", \"ma\", \"mb\"],\n\t\t\"msaccess\": \"mdb\",\n\t\t\"msword\": [\"doc\", \"dot\"],\n\t\t\"mxf\": \"mxf\",\n\t\t\"oda\": \"oda\",\n\t\t\"ogg\": \"ogx\",\n\t\t\"pdf\": \"pdf\",\n\t\t\"pgp-keys\": \"key\",\n\t\t\"pgp-signature\": [\"asc\", \"sig\"],\n\t\t\"pics-rules\": \"prf\",\n\t\t\"postscript\": [\"ps\", \"ai\", \"eps\", \"epsi\", \"epsf\", \"eps2\", \"eps3\"],\n\t\t\"rar\": \"rar\",\n\t\t\"rdf+xml\": \"rdf\",\n\t\t\"rss+xml\": \"rss\",\n\t\t\"rtf\": \"rtf\",\n\t\t\"smil\": [\"smi\", \"smil\"],\n\t\t\"xhtml+xml\": [\"xhtml\", \"xht\"],\n\t\t\"xml\": [\"xml\", \"xsl\", \"xsd\"],\n\t\t\"xspf+xml\": \"xspf\",\n\t\t\"zip\": \"zip\",\n\t\t\"vnd.android.package-archive\": \"apk\",\n\t\t\"vnd.cinderella\": \"cdy\",\n\t\t\"vnd.google-earth.kml+xml\": \"kml\",\n\t\t\"vnd.google-earth.kmz\": \"kmz\",\n\t\t\"vnd.mozilla.xul+xml\": \"xul\",\n\t\t\"vnd.ms-excel\": [\"xls\", \"xlb\", \"xlt\", \"xlm\", \"xla\", \"xlc\", \"xlw\"],\n\t\t\"vnd.ms-pki.seccat\": \"cat\",\n\t\t\"vnd.ms-pki.stl\": \"stl\",\n\t\t\"vnd.ms-powerpoint\": [\"ppt\", \"pps\", \"pot\"],\n\t\t\"vnd.oasis.opendocument.chart\": \"odc\",\n\t\t\"vnd.oasis.opendocument.database\": \"odb\",\n\t\t\"vnd.oasis.opendocument.formula\": \"odf\",\n\t\t\"vnd.oasis.opendocument.graphics\": \"odg\",\n\t\t\"vnd.oasis.opendocument.graphics-template\": \"otg\",\n\t\t\"vnd.oasis.opendocument.image\": \"odi\",\n\t\t\"vnd.oasis.opendocument.presentation\": \"odp\",\n\t\t\"vnd.oasis.opendocument.presentation-template\": \"otp\",\n\t\t\"vnd.oasis.opendocument.spreadsheet\": \"ods\",\n\t\t\"vnd.oasis.opendocument.spreadsheet-template\": \"ots\",\n\t\t\"vnd.oasis.opendocument.text\": \"odt\",\n\t\t\"vnd.oasis.opendocument.text-master\": \"odm\",\n\t\t\"vnd.oasis.opendocument.text-template\": \"ott\",\n\t\t\"vnd.oasis.opendocument.text-web\": \"oth\",\n\t\t\"vnd.openxmlformats-officedocument.spreadsheetml.sheet\": \"xlsx\",\n\t\t\"vnd.openxmlformats-officedocument.spreadsheetml.template\": \"xltx\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.presentation\": \"pptx\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.slideshow\": \"ppsx\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.template\": \"potx\",\n\t\t\"vnd.openxmlformats-officedocument.wordprocessingml.document\": \"docx\",\n\t\t\"vnd.openxmlformats-officedocument.wordprocessingml.template\": \"dotx\",\n\t\t\"vnd.smaf\": \"mmf\",\n\t\t\"vnd.stardivision.calc\": \"sdc\",\n\t\t\"vnd.stardivision.chart\": \"sds\",\n\t\t\"vnd.stardivision.draw\": \"sda\",\n\t\t\"vnd.stardivision.impress\": \"sdd\",\n\t\t\"vnd.stardivision.math\": [\"sdf\", \"smf\"],\n\t\t\"vnd.stardivision.writer\": [\"sdw\", \"vor\"],\n\t\t\"vnd.stardivision.writer-global\": \"sgl\",\n\t\t\"vnd.sun.xml.calc\": \"sxc\",\n\t\t\"vnd.sun.xml.calc.template\": \"stc\",\n\t\t\"vnd.sun.xml.draw\": \"sxd\",\n\t\t\"vnd.sun.xml.draw.template\": \"std\",\n\t\t\"vnd.sun.xml.impress\": \"sxi\",\n\t\t\"vnd.sun.xml.impress.template\": \"sti\",\n\t\t\"vnd.sun.xml.math\": \"sxm\",\n\t\t\"vnd.sun.xml.writer\": \"sxw\",\n\t\t\"vnd.sun.xml.writer.global\": \"sxg\",\n\t\t\"vnd.sun.xml.writer.template\": \"stw\",\n\t\t\"vnd.symbian.install\": [\"sis\", \"sisx\"],\n\t\t\"vnd.visio\": [\"vsd\", \"vst\", \"vss\", \"vsw\"],\n\t\t\"vnd.wap.wbxml\": \"wbxml\",\n\t\t\"vnd.wap.wmlc\": \"wmlc\",\n\t\t\"vnd.wap.wmlscriptc\": \"wmlsc\",\n\t\t\"vnd.wordperfect\": \"wpd\",\n\t\t\"vnd.wordperfect5.1\": \"wp5\",\n\t\t\"x-123\": \"wk\",\n\t\t\"x-7z-compressed\": \"7z\",\n\t\t\"x-abiword\": \"abw\",\n\t\t\"x-apple-diskimage\": \"dmg\",\n\t\t\"x-bcpio\": \"bcpio\",\n\t\t\"x-bittorrent\": \"torrent\",\n\t\t\"x-cbr\": [\"cbr\", \"cba\", \"cbt\", \"cb7\"],\n\t\t\"x-cbz\": \"cbz\",\n\t\t\"x-cdf\": [\"cdf\", \"cda\"],\n\t\t\"x-cdlink\": \"vcd\",\n\t\t\"x-chess-pgn\": \"pgn\",\n\t\t\"x-cpio\": \"cpio\",\n\t\t\"x-csh\": \"csh\",\n\t\t\"x-debian-package\": [\"deb\", \"udeb\"],\n\t\t\"x-director\": [\"dcr\", \"dir\", \"dxr\", \"cst\", \"cct\", \"cxt\", \"w3d\", \"fgd\", \"swa\"],\n\t\t\"x-dms\": \"dms\",\n\t\t\"x-doom\": \"wad\",\n\t\t\"x-dvi\": \"dvi\",\n\t\t\"x-httpd-eruby\": \"rhtml\",\n\t\t\"x-font\": \"pcf.Z\",\n\t\t\"x-freemind\": \"mm\",\n\t\t\"x-gnumeric\": \"gnumeric\",\n\t\t\"x-go-sgf\": \"sgf\",\n\t\t\"x-graphing-calculator\": \"gcf\",\n\t\t\"x-gtar\": [\"gtar\", \"taz\"],\n\t\t\"x-hdf\": \"hdf\",\n\t\t\"x-httpd-php\": [\"phtml\", \"pht\", \"php\"],\n\t\t\"x-httpd-php-source\": \"phps\",\n\t\t\"x-httpd-php3\": \"php3\",\n\t\t\"x-httpd-php3-preprocessed\": \"php3p\",\n\t\t\"x-httpd-php4\": \"php4\",\n\t\t\"x-httpd-php5\": \"php5\",\n\t\t\"x-ica\": \"ica\",\n\t\t\"x-info\": \"info\",\n\t\t\"x-internet-signup\": [\"ins\", \"isp\"],\n\t\t\"x-iphone\": \"iii\",\n\t\t\"x-iso9660-image\": \"iso\",\n\t\t\"x-java-jnlp-file\": \"jnlp\",\n\t\t\"x-jmol\": \"jmz\",\n\t\t\"x-killustrator\": \"kil\",\n\t\t\"x-koan\": [\"skp\", \"skd\", \"skt\", \"skm\"],\n\t\t\"x-kpresenter\": [\"kpr\", \"kpt\"],\n\t\t\"x-kword\": [\"kwd\", \"kwt\"],\n\t\t\"x-latex\": \"latex\",\n\t\t\"x-lha\": \"lha\",\n\t\t\"x-lyx\": \"lyx\",\n\t\t\"x-lzh\": \"lzh\",\n\t\t\"x-lzx\": \"lzx\",\n\t\t\"x-maker\": [\"frm\", \"maker\", \"frame\", \"fm\", \"fb\", \"book\", \"fbdoc\"],\n\t\t\"x-ms-wmd\": \"wmd\",\n\t\t\"x-ms-wmz\": \"wmz\",\n\t\t\"x-msdos-program\": [\"com\", \"exe\", \"bat\", \"dll\"],\n\t\t\"x-msi\": \"msi\",\n\t\t\"x-netcdf\": [\"nc\", \"cdf\"],\n\t\t\"x-ns-proxy-autoconfig\": [\"pac\", \"dat\"],\n\t\t\"x-nwc\": \"nwc\",\n\t\t\"x-object\": \"o\",\n\t\t\"x-oz-application\": \"oza\",\n\t\t\"x-pkcs7-certreqresp\": \"p7r\",\n\t\t\"x-python-code\": [\"pyc\", \"pyo\"],\n\t\t\"x-qgis\": [\"qgs\", \"shp\", \"shx\"],\n\t\t\"x-quicktimeplayer\": \"qtl\",\n\t\t\"x-redhat-package-manager\": \"rpm\",\n\t\t\"x-ruby\": \"rb\",\n\t\t\"x-sh\": \"sh\",\n\t\t\"x-shar\": \"shar\",\n\t\t\"x-shockwave-flash\": [\"swf\", \"swfl\"],\n\t\t\"x-silverlight\": \"scr\",\n\t\t\"x-stuffit\": \"sit\",\n\t\t\"x-sv4cpio\": \"sv4cpio\",\n\t\t\"x-sv4crc\": \"sv4crc\",\n\t\t\"x-tar\": \"tar\",\n\t\t\"x-tcl\": \"tcl\",\n\t\t\"x-tex-gf\": \"gf\",\n\t\t\"x-tex-pk\": \"pk\",\n\t\t\"x-texinfo\": [\"texinfo\", \"texi\"],\n\t\t\"x-trash\": [\"~\", \"%\", \"bak\", \"old\", \"sik\"],\n\t\t\"x-troff\": [\"t\", \"tr\", \"roff\"],\n\t\t\"x-troff-man\": \"man\",\n\t\t\"x-troff-me\": \"me\",\n\t\t\"x-troff-ms\": \"ms\",\n\t\t\"x-ustar\": \"ustar\",\n\t\t\"x-wais-source\": \"src\",\n\t\t\"x-wingz\": \"wz\",\n\t\t\"x-x509-ca-cert\": [\"crt\", \"der\", \"cer\"],\n\t\t\"x-xcf\": \"xcf\",\n\t\t\"x-xfig\": \"fig\",\n\t\t\"x-xpinstall\": \"xpi\",\n\t\t\"applixware\": \"aw\",\n\t\t\"atomsvc+xml\": \"atomsvc\",\n\t\t\"ccxml+xml\": \"ccxml\",\n\t\t\"cdmi-capability\": \"cdmia\",\n\t\t\"cdmi-container\": \"cdmic\",\n\t\t\"cdmi-domain\": \"cdmid\",\n\t\t\"cdmi-object\": \"cdmio\",\n\t\t\"cdmi-queue\": \"cdmiq\",\n\t\t\"docbook+xml\": \"dbk\",\n\t\t\"dssc+der\": \"dssc\",\n\t\t\"dssc+xml\": \"xdssc\",\n\t\t\"emma+xml\": \"emma\",\n\t\t\"epub+zip\": \"epub\",\n\t\t\"exi\": \"exi\",\n\t\t\"font-tdpfr\": \"pfr\",\n\t\t\"gml+xml\": \"gml\",\n\t\t\"gpx+xml\": \"gpx\",\n\t\t\"gxf\": \"gxf\",\n\t\t\"hyperstudio\": \"stk\",\n\t\t\"inkml+xml\": [\"ink\", \"inkml\"],\n\t\t\"ipfix\": \"ipfix\",\n\t\t\"json\": \"json\",\n\t\t\"jsonml+json\": \"jsonml\",\n\t\t\"lost+xml\": \"lostxml\",\n\t\t\"mads+xml\": \"mads\",\n\t\t\"marc\": \"mrc\",\n\t\t\"marcxml+xml\": \"mrcx\",\n\t\t\"mathml+xml\": \"mathml\",\n\t\t\"mbox\": \"mbox\",\n\t\t\"mediaservercontrol+xml\": \"mscml\",\n\t\t\"metalink+xml\": \"metalink\",\n\t\t\"metalink4+xml\": \"meta4\",\n\t\t\"mets+xml\": \"mets\",\n\t\t\"mods+xml\": \"mods\",\n\t\t\"mp21\": [\"m21\", \"mp21\"],\n\t\t\"mp4\": \"mp4s\",\n\t\t\"oebps-package+xml\": \"opf\",\n\t\t\"omdoc+xml\": \"omdoc\",\n\t\t\"onenote\": [\"onetoc\", \"onetoc2\", \"onetmp\", \"onepkg\"],\n\t\t\"oxps\": \"oxps\",\n\t\t\"patch-ops-error+xml\": \"xer\",\n\t\t\"pgp-encrypted\": \"pgp\",\n\t\t\"pkcs10\": \"p10\",\n\t\t\"pkcs7-mime\": [\"p7m\", \"p7c\"],\n\t\t\"pkcs7-signature\": \"p7s\",\n\t\t\"pkcs8\": \"p8\",\n\t\t\"pkix-attr-cert\": \"ac\",\n\t\t\"pkix-crl\": \"crl\",\n\t\t\"pkix-pkipath\": \"pkipath\",\n\t\t\"pkixcmp\": \"pki\",\n\t\t\"pls+xml\": \"pls\",\n\t\t\"prs.cww\": \"cww\",\n\t\t\"pskc+xml\": \"pskcxml\",\n\t\t\"reginfo+xml\": \"rif\",\n\t\t\"relax-ng-compact-syntax\": \"rnc\",\n\t\t\"resource-lists+xml\": \"rl\",\n\t\t\"resource-lists-diff+xml\": \"rld\",\n\t\t\"rls-services+xml\": \"rs\",\n\t\t\"rpki-ghostbusters\": \"gbr\",\n\t\t\"rpki-manifest\": \"mft\",\n\t\t\"rpki-roa\": \"roa\",\n\t\t\"rsd+xml\": \"rsd\",\n\t\t\"sbml+xml\": \"sbml\",\n\t\t\"scvp-cv-request\": \"scq\",\n\t\t\"scvp-cv-response\": \"scs\",\n\t\t\"scvp-vp-request\": \"spq\",\n\t\t\"scvp-vp-response\": \"spp\",\n\t\t\"sdp\": \"sdp\",\n\t\t\"set-payment-initiation\": \"setpay\",\n\t\t\"set-registration-initiation\": \"setreg\",\n\t\t\"shf+xml\": \"shf\",\n\t\t\"sparql-query\": \"rq\",\n\t\t\"sparql-results+xml\": \"srx\",\n\t\t\"srgs\": \"gram\",\n\t\t\"srgs+xml\": \"grxml\",\n\t\t\"sru+xml\": \"sru\",\n\t\t\"ssdl+xml\": \"ssdl\",\n\t\t\"ssml+xml\": \"ssml\",\n\t\t\"tei+xml\": [\"tei\", \"teicorpus\"],\n\t\t\"thraud+xml\": \"tfi\",\n\t\t\"timestamped-data\": \"tsd\",\n\t\t\"vnd.3gpp.pic-bw-large\": \"plb\",\n\t\t\"vnd.3gpp.pic-bw-small\": \"psb\",\n\t\t\"vnd.3gpp.pic-bw-var\": \"pvb\",\n\t\t\"vnd.3gpp2.tcap\": \"tcap\",\n\t\t\"vnd.3m.post-it-notes\": \"pwn\",\n\t\t\"vnd.accpac.simply.aso\": \"aso\",\n\t\t\"vnd.accpac.simply.imp\": \"imp\",\n\t\t\"vnd.acucobol\": \"acu\",\n\t\t\"vnd.acucorp\": [\"atc\", \"acutc\"],\n\t\t\"vnd.adobe.air-application-installer-package+zip\": \"air\",\n\t\t\"vnd.adobe.formscentral.fcdt\": \"fcdt\",\n\t\t\"vnd.adobe.fxp\": [\"fxp\", \"fxpl\"],\n\t\t\"vnd.adobe.xdp+xml\": \"xdp\",\n\t\t\"vnd.adobe.xfdf\": \"xfdf\",\n\t\t\"vnd.ahead.space\": \"ahead\",\n\t\t\"vnd.airzip.filesecure.azf\": \"azf\",\n\t\t\"vnd.airzip.filesecure.azs\": \"azs\",\n\t\t\"vnd.amazon.ebook\": \"azw\",\n\t\t\"vnd.americandynamics.acc\": \"acc\",\n\t\t\"vnd.amiga.ami\": \"ami\",\n\t\t\"vnd.anser-web-certificate-issue-initiation\": \"cii\",\n\t\t\"vnd.anser-web-funds-transfer-initiation\": \"fti\",\n\t\t\"vnd.antix.game-component\": \"atx\",\n\t\t\"vnd.apple.installer+xml\": \"mpkg\",\n\t\t\"vnd.apple.mpegurl\": \"m3u8\",\n\t\t\"vnd.aristanetworks.swi\": \"swi\",\n\t\t\"vnd.astraea-software.iota\": \"iota\",\n\t\t\"vnd.audiograph\": \"aep\",\n\t\t\"vnd.blueice.multipass\": \"mpm\",\n\t\t\"vnd.bmi\": \"bmi\",\n\t\t\"vnd.businessobjects\": \"rep\",\n\t\t\"vnd.chemdraw+xml\": \"cdxml\",\n\t\t\"vnd.chipnuts.karaoke-mmd\": \"mmd\",\n\t\t\"vnd.claymore\": \"cla\",\n\t\t\"vnd.cloanto.rp9\": \"rp9\",\n\t\t\"vnd.clonk.c4group\": [\"c4g\", \"c4d\", \"c4f\", \"c4p\", \"c4u\"],\n\t\t\"vnd.cluetrust.cartomobile-config\": \"c11amc\",\n\t\t\"vnd.cluetrust.cartomobile-config-pkg\": \"c11amz\",\n\t\t\"vnd.commonspace\": \"csp\",\n\t\t\"vnd.contact.cmsg\": \"cdbcmsg\",\n\t\t\"vnd.cosmocaller\": \"cmc\",\n\t\t\"vnd.crick.clicker\": \"clkx\",\n\t\t\"vnd.crick.clicker.keyboard\": \"clkk\",\n\t\t\"vnd.crick.clicker.palette\": \"clkp\",\n\t\t\"vnd.crick.clicker.template\": \"clkt\",\n\t\t\"vnd.crick.clicker.wordbank\": \"clkw\",\n\t\t\"vnd.criticaltools.wbs+xml\": \"wbs\",\n\t\t\"vnd.ctc-posml\": \"pml\",\n\t\t\"vnd.cups-ppd\": \"ppd\",\n\t\t\"vnd.curl.car\": \"car\",\n\t\t\"vnd.curl.pcurl\": \"pcurl\",\n\t\t\"vnd.dart\": \"dart\",\n\t\t\"vnd.data-vision.rdz\": \"rdz\",\n\t\t\"vnd.dece.data\": [\"uvf\", \"uvvf\", \"uvd\", \"uvvd\"],\n\t\t\"vnd.dece.ttml+xml\": [\"uvt\", \"uvvt\"],\n\t\t\"vnd.dece.unspecified\": [\"uvx\", \"uvvx\"],\n\t\t\"vnd.dece.zip\": [\"uvz\", \"uvvz\"],\n\t\t\"vnd.denovo.fcselayout-link\": \"fe_launch\",\n\t\t\"vnd.dna\": \"dna\",\n\t\t\"vnd.dolby.mlp\": \"mlp\",\n\t\t\"vnd.dpgraph\": \"dpg\",\n\t\t\"vnd.dreamfactory\": \"dfac\",\n\t\t\"vnd.ds-keypoint\": \"kpxx\",\n\t\t\"vnd.dvb.ait\": \"ait\",\n\t\t\"vnd.dvb.service\": \"svc\",\n\t\t\"vnd.dynageo\": \"geo\",\n\t\t\"vnd.ecowin.chart\": \"mag\",\n\t\t\"vnd.enliven\": \"nml\",\n\t\t\"vnd.epson.esf\": \"esf\",\n\t\t\"vnd.epson.msf\": \"msf\",\n\t\t\"vnd.epson.quickanime\": \"qam\",\n\t\t\"vnd.epson.salt\": \"slt\",\n\t\t\"vnd.epson.ssf\": \"ssf\",\n\t\t\"vnd.eszigno3+xml\": [\"es3\", \"et3\"],\n\t\t\"vnd.ezpix-album\": \"ez2\",\n\t\t\"vnd.ezpix-package\": \"ez3\",\n\t\t\"vnd.fdf\": \"fdf\",\n\t\t\"vnd.fdsn.mseed\": \"mseed\",\n\t\t\"vnd.fdsn.seed\": [\"seed\", \"dataless\"],\n\t\t\"vnd.flographit\": \"gph\",\n\t\t\"vnd.fluxtime.clip\": \"ftc\",\n\t\t\"vnd.framemaker\": [\"fm\", \"frame\", \"maker\", \"book\"],\n\t\t\"vnd.frogans.fnc\": \"fnc\",\n\t\t\"vnd.frogans.ltf\": \"ltf\",\n\t\t\"vnd.fsc.weblaunch\": \"fsc\",\n\t\t\"vnd.fujitsu.oasys\": \"oas\",\n\t\t\"vnd.fujitsu.oasys2\": \"oa2\",\n\t\t\"vnd.fujitsu.oasys3\": \"oa3\",\n\t\t\"vnd.fujitsu.oasysgp\": \"fg5\",\n\t\t\"vnd.fujitsu.oasysprs\": \"bh2\",\n\t\t\"vnd.fujixerox.ddd\": \"ddd\",\n\t\t\"vnd.fujixerox.docuworks\": \"xdw\",\n\t\t\"vnd.fujixerox.docuworks.binder\": \"xbd\",\n\t\t\"vnd.fuzzysheet\": \"fzs\",\n\t\t\"vnd.genomatix.tuxedo\": \"txd\",\n\t\t\"vnd.geogebra.file\": \"ggb\",\n\t\t\"vnd.geogebra.tool\": \"ggt\",\n\t\t\"vnd.geometry-explorer\": [\"gex\", \"gre\"],\n\t\t\"vnd.geonext\": \"gxt\",\n\t\t\"vnd.geoplan\": \"g2w\",\n\t\t\"vnd.geospace\": \"g3w\",\n\t\t\"vnd.gmx\": \"gmx\",\n\t\t\"vnd.grafeq\": [\"gqf\", \"gqs\"],\n\t\t\"vnd.groove-account\": \"gac\",\n\t\t\"vnd.groove-help\": \"ghf\",\n\t\t\"vnd.groove-identity-message\": \"gim\",\n\t\t\"vnd.groove-injector\": \"grv\",\n\t\t\"vnd.groove-tool-message\": \"gtm\",\n\t\t\"vnd.groove-tool-template\": \"tpl\",\n\t\t\"vnd.groove-vcard\": \"vcg\",\n\t\t\"vnd.hal+xml\": \"hal\",\n\t\t\"vnd.handheld-entertainment+xml\": \"zmm\",\n\t\t\"vnd.hbci\": \"hbci\",\n\t\t\"vnd.hhe.lesson-player\": \"les\",\n\t\t\"vnd.hp-hpgl\": \"hpgl\",\n\t\t\"vnd.hp-hpid\": \"hpid\",\n\t\t\"vnd.hp-hps\": \"hps\",\n\t\t\"vnd.hp-jlyt\": \"jlt\",\n\t\t\"vnd.hp-pcl\": \"pcl\",\n\t\t\"vnd.hp-pclxl\": \"pclxl\",\n\t\t\"vnd.hydrostatix.sof-data\": \"sfd-hdstx\",\n\t\t\"vnd.ibm.minipay\": \"mpy\",\n\t\t\"vnd.ibm.modcap\": [\"afp\", \"listafp\", \"list3820\"],\n\t\t\"vnd.ibm.rights-management\": \"irm\",\n\t\t\"vnd.ibm.secure-container\": \"sc\",\n\t\t\"vnd.iccprofile\": [\"icc\", \"icm\"],\n\t\t\"vnd.igloader\": \"igl\",\n\t\t\"vnd.immervision-ivp\": \"ivp\",\n\t\t\"vnd.immervision-ivu\": \"ivu\",\n\t\t\"vnd.insors.igm\": \"igm\",\n\t\t\"vnd.intercon.formnet\": [\"xpw\", \"xpx\"],\n\t\t\"vnd.intergeo\": \"i2g\",\n\t\t\"vnd.intu.qbo\": \"qbo\",\n\t\t\"vnd.intu.qfx\": \"qfx\",\n\t\t\"vnd.ipunplugged.rcprofile\": \"rcprofile\",\n\t\t\"vnd.irepository.package+xml\": \"irp\",\n\t\t\"vnd.is-xpr\": \"xpr\",\n\t\t\"vnd.isac.fcs\": \"fcs\",\n\t\t\"vnd.jam\": \"jam\",\n\t\t\"vnd.jcp.javame.midlet-rms\": \"rms\",\n\t\t\"vnd.jisp\": \"jisp\",\n\t\t\"vnd.joost.joda-archive\": \"joda\",\n\t\t\"vnd.kahootz\": [\"ktz\", \"ktr\"],\n\t\t\"vnd.kde.karbon\": \"karbon\",\n\t\t\"vnd.kde.kchart\": \"chrt\",\n\t\t\"vnd.kde.kformula\": \"kfo\",\n\t\t\"vnd.kde.kivio\": \"flw\",\n\t\t\"vnd.kde.kontour\": \"kon\",\n\t\t\"vnd.kde.kpresenter\": [\"kpr\", \"kpt\"],\n\t\t\"vnd.kde.kspread\": \"ksp\",\n\t\t\"vnd.kde.kword\": [\"kwd\", \"kwt\"],\n\t\t\"vnd.kenameaapp\": \"htke\",\n\t\t\"vnd.kidspiration\": \"kia\",\n\t\t\"vnd.kinar\": [\"kne\", \"knp\"],\n\t\t\"vnd.koan\": [\"skp\", \"skd\", \"skt\", \"skm\"],\n\t\t\"vnd.kodak-descriptor\": \"sse\",\n\t\t\"vnd.las.las+xml\": \"lasxml\",\n\t\t\"vnd.llamagraphics.life-balance.desktop\": \"lbd\",\n\t\t\"vnd.llamagraphics.life-balance.exchange+xml\": \"lbe\",\n\t\t\"vnd.lotus-1-2-3\": \"123\",\n\t\t\"vnd.lotus-approach\": \"apr\",\n\t\t\"vnd.lotus-freelance\": \"pre\",\n\t\t\"vnd.lotus-notes\": \"nsf\",\n\t\t\"vnd.lotus-organizer\": \"org\",\n\t\t\"vnd.lotus-screencam\": \"scm\",\n\t\t\"vnd.lotus-wordpro\": \"lwp\",\n\t\t\"vnd.macports.portpkg\": \"portpkg\",\n\t\t\"vnd.mcd\": \"mcd\",\n\t\t\"vnd.medcalcdata\": \"mc1\",\n\t\t\"vnd.mediastation.cdkey\": \"cdkey\",\n\t\t\"vnd.mfer\": \"mwf\",\n\t\t\"vnd.mfmp\": \"mfm\",\n\t\t\"vnd.micrografx.flo\": \"flo\",\n\t\t\"vnd.micrografx.igx\": \"igx\",\n\t\t\"vnd.mif\": \"mif\",\n\t\t\"vnd.mobius.daf\": \"daf\",\n\t\t\"vnd.mobius.dis\": \"dis\",\n\t\t\"vnd.mobius.mbk\": \"mbk\",\n\t\t\"vnd.mobius.mqy\": \"mqy\",\n\t\t\"vnd.mobius.msl\": \"msl\",\n\t\t\"vnd.mobius.plc\": \"plc\",\n\t\t\"vnd.mobius.txf\": \"txf\",\n\t\t\"vnd.mophun.application\": \"mpn\",\n\t\t\"vnd.mophun.certificate\": \"mpc\",\n\t\t\"vnd.ms-artgalry\": \"cil\",\n\t\t\"vnd.ms-cab-compressed\": \"cab\",\n\t\t\"vnd.ms-excel.addin.macroenabled.12\": \"xlam\",\n\t\t\"vnd.ms-excel.sheet.binary.macroenabled.12\": \"xlsb\",\n\t\t\"vnd.ms-excel.sheet.macroenabled.12\": \"xlsm\",\n\t\t\"vnd.ms-excel.template.macroenabled.12\": \"xltm\",\n\t\t\"vnd.ms-fontobject\": \"eot\",\n\t\t\"vnd.ms-htmlhelp\": \"chm\",\n\t\t\"vnd.ms-ims\": \"ims\",\n\t\t\"vnd.ms-lrm\": \"lrm\",\n\t\t\"vnd.ms-officetheme\": \"thmx\",\n\t\t\"vnd.ms-powerpoint.addin.macroenabled.12\": \"ppam\",\n\t\t\"vnd.ms-powerpoint.presentation.macroenabled.12\": \"pptm\",\n\t\t\"vnd.ms-powerpoint.slide.macroenabled.12\": \"sldm\",\n\t\t\"vnd.ms-powerpoint.slideshow.macroenabled.12\": \"ppsm\",\n\t\t\"vnd.ms-powerpoint.template.macroenabled.12\": \"potm\",\n\t\t\"vnd.ms-project\": [\"mpp\", \"mpt\"],\n\t\t\"vnd.ms-word.document.macroenabled.12\": \"docm\",\n\t\t\"vnd.ms-word.template.macroenabled.12\": \"dotm\",\n\t\t\"vnd.ms-works\": [\"wps\", \"wks\", \"wcm\", \"wdb\"],\n\t\t\"vnd.ms-wpl\": \"wpl\",\n\t\t\"vnd.ms-xpsdocument\": \"xps\",\n\t\t\"vnd.mseq\": \"mseq\",\n\t\t\"vnd.musician\": \"mus\",\n\t\t\"vnd.muvee.style\": \"msty\",\n\t\t\"vnd.mynfc\": \"taglet\",\n\t\t\"vnd.neurolanguage.nlu\": \"nlu\",\n\t\t\"vnd.nitf\": [\"ntf\", \"nitf\"],\n\t\t\"vnd.noblenet-directory\": \"nnd\",\n\t\t\"vnd.noblenet-sealer\": \"nns\",\n\t\t\"vnd.noblenet-web\": \"nnw\",\n\t\t\"vnd.nokia.n-gage.data\": \"ngdat\",\n\t\t\"vnd.nokia.n-gage.symbian.install\": \"n-gage\",\n\t\t\"vnd.nokia.radio-preset\": \"rpst\",\n\t\t\"vnd.nokia.radio-presets\": \"rpss\",\n\t\t\"vnd.novadigm.edm\": \"edm\",\n\t\t\"vnd.novadigm.edx\": \"edx\",\n\t\t\"vnd.novadigm.ext\": \"ext\",\n\t\t\"vnd.oasis.opendocument.chart-template\": \"otc\",\n\t\t\"vnd.oasis.opendocument.formula-template\": \"odft\",\n\t\t\"vnd.oasis.opendocument.image-template\": \"oti\",\n\t\t\"vnd.olpc-sugar\": \"xo\",\n\t\t\"vnd.oma.dd2+xml\": \"dd2\",\n\t\t\"vnd.openofficeorg.extension\": \"oxt\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.slide\": \"sldx\",\n\t\t\"vnd.osgeo.mapguide.package\": \"mgp\",\n\t\t\"vnd.osgi.dp\": \"dp\",\n\t\t\"vnd.osgi.subsystem\": \"esa\",\n\t\t\"vnd.palm\": [\"pdb\", \"pqa\", \"oprc\"],\n\t\t\"vnd.pawaafile\": \"paw\",\n\t\t\"vnd.pg.format\": \"str\",\n\t\t\"vnd.pg.osasli\": \"ei6\",\n\t\t\"vnd.picsel\": \"efif\",\n\t\t\"vnd.pmi.widget\": \"wg\",\n\t\t\"vnd.pocketlearn\": \"plf\",\n\t\t\"vnd.powerbuilder6\": \"pbd\",\n\t\t\"vnd.previewsystems.box\": \"box\",\n\t\t\"vnd.proteus.magazine\": \"mgz\",\n\t\t\"vnd.publishare-delta-tree\": \"qps\",\n\t\t\"vnd.pvi.ptid1\": \"ptid\",\n\t\t\"vnd.quark.quarkxpress\": [\"qxd\", \"qxt\", \"qwd\", \"qwt\", \"qxl\", \"qxb\"],\n\t\t\"vnd.realvnc.bed\": \"bed\",\n\t\t\"vnd.recordare.musicxml\": \"mxl\",\n\t\t\"vnd.recordare.musicxml+xml\": \"musicxml\",\n\t\t\"vnd.rig.cryptonote\": \"cryptonote\",\n\t\t\"vnd.rn-realmedia\": \"rm\",\n\t\t\"vnd.rn-realmedia-vbr\": \"rmvb\",\n\t\t\"vnd.route66.link66+xml\": \"link66\",\n\t\t\"vnd.sailingtracker.track\": \"st\",\n\t\t\"vnd.seemail\": \"see\",\n\t\t\"vnd.sema\": \"sema\",\n\t\t\"vnd.semd\": \"semd\",\n\t\t\"vnd.semf\": \"semf\",\n\t\t\"vnd.shana.informed.formdata\": \"ifm\",\n\t\t\"vnd.shana.informed.formtemplate\": \"itp\",\n\t\t\"vnd.shana.informed.interchange\": \"iif\",\n\t\t\"vnd.shana.informed.package\": \"ipk\",\n\t\t\"vnd.simtech-mindmapper\": [\"twd\", \"twds\"],\n\t\t\"vnd.smart.teacher\": \"teacher\",\n\t\t\"vnd.solent.sdkm+xml\": [\"sdkm\", \"sdkd\"],\n\t\t\"vnd.spotfire.dxp\": \"dxp\",\n\t\t\"vnd.spotfire.sfs\": \"sfs\",\n\t\t\"vnd.stepmania.package\": \"smzip\",\n\t\t\"vnd.stepmania.stepchart\": \"sm\",\n\t\t\"vnd.sus-calendar\": [\"sus\", \"susp\"],\n\t\t\"vnd.svd\": \"svd\",\n\t\t\"vnd.syncml+xml\": \"xsm\",\n\t\t\"vnd.syncml.dm+wbxml\": \"bdm\",\n\t\t\"vnd.syncml.dm+xml\": \"xdm\",\n\t\t\"vnd.tao.intent-module-archive\": \"tao\",\n\t\t\"vnd.tcpdump.pcap\": [\"pcap\", \"cap\", \"dmp\"],\n\t\t\"vnd.tmobile-livetv\": \"tmo\",\n\t\t\"vnd.trid.tpt\": \"tpt\",\n\t\t\"vnd.triscape.mxs\": \"mxs\",\n\t\t\"vnd.trueapp\": \"tra\",\n\t\t\"vnd.ufdl\": [\"ufd\", \"ufdl\"],\n\t\t\"vnd.uiq.theme\": \"utz\",\n\t\t\"vnd.umajin\": \"umj\",\n\t\t\"vnd.unity\": \"unityweb\",\n\t\t\"vnd.uoml+xml\": \"uoml\",\n\t\t\"vnd.vcx\": \"vcx\",\n\t\t\"vnd.visionary\": \"vis\",\n\t\t\"vnd.vsf\": \"vsf\",\n\t\t\"vnd.webturbo\": \"wtb\",\n\t\t\"vnd.wolfram.player\": \"nbp\",\n\t\t\"vnd.wqd\": \"wqd\",\n\t\t\"vnd.wt.stf\": \"stf\",\n\t\t\"vnd.xara\": \"xar\",\n\t\t\"vnd.xfdl\": \"xfdl\",\n\t\t\"vnd.yamaha.hv-dic\": \"hvd\",\n\t\t\"vnd.yamaha.hv-script\": \"hvs\",\n\t\t\"vnd.yamaha.hv-voice\": \"hvp\",\n\t\t\"vnd.yamaha.openscoreformat\": \"osf\",\n\t\t\"vnd.yamaha.openscoreformat.osfpvg+xml\": \"osfpvg\",\n\t\t\"vnd.yamaha.smaf-audio\": \"saf\",\n\t\t\"vnd.yamaha.smaf-phrase\": \"spf\",\n\t\t\"vnd.yellowriver-custom-menu\": \"cmp\",\n\t\t\"vnd.zul\": [\"zir\", \"zirz\"],\n\t\t\"vnd.zzazz.deck+xml\": \"zaz\",\n\t\t\"voicexml+xml\": \"vxml\",\n\t\t\"widget\": \"wgt\",\n\t\t\"winhlp\": \"hlp\",\n\t\t\"wsdl+xml\": \"wsdl\",\n\t\t\"wspolicy+xml\": \"wspolicy\",\n\t\t\"x-ace-compressed\": \"ace\",\n\t\t\"x-authorware-bin\": [\"aab\", \"x32\", \"u32\", \"vox\"],\n\t\t\"x-authorware-map\": \"aam\",\n\t\t\"x-authorware-seg\": \"aas\",\n\t\t\"x-blorb\": [\"blb\", \"blorb\"],\n\t\t\"x-bzip\": \"bz\",\n\t\t\"x-bzip2\": [\"bz2\", \"boz\"],\n\t\t\"x-cfs-compressed\": \"cfs\",\n\t\t\"x-chat\": \"chat\",\n\t\t\"x-conference\": \"nsc\",\n\t\t\"x-dgc-compressed\": \"dgc\",\n\t\t\"x-dtbncx+xml\": \"ncx\",\n\t\t\"x-dtbook+xml\": \"dtb\",\n\t\t\"x-dtbresource+xml\": \"res\",\n\t\t\"x-eva\": \"eva\",\n\t\t\"x-font-bdf\": \"bdf\",\n\t\t\"x-font-ghostscript\": \"gsf\",\n\t\t\"x-font-linux-psf\": \"psf\",\n\t\t\"x-font-otf\": \"otf\",\n\t\t\"x-font-pcf\": \"pcf\",\n\t\t\"x-font-snf\": \"snf\",\n\t\t\"x-font-ttf\": [\"ttf\", \"ttc\"],\n\t\t\"x-font-type1\": [\"pfa\", \"pfb\", \"pfm\", \"afm\"],\n\t\t\"x-font-woff\": \"woff\",\n\t\t\"x-freearc\": \"arc\",\n\t\t\"x-gca-compressed\": \"gca\",\n\t\t\"x-glulx\": \"ulx\",\n\t\t\"x-gramps-xml\": \"gramps\",\n\t\t\"x-install-instructions\": \"install\",\n\t\t\"x-lzh-compressed\": [\"lzh\", \"lha\"],\n\t\t\"x-mie\": \"mie\",\n\t\t\"x-mobipocket-ebook\": [\"prc\", \"mobi\"],\n\t\t\"x-ms-application\": \"application\",\n\t\t\"x-ms-shortcut\": \"lnk\",\n\t\t\"x-ms-xbap\": \"xbap\",\n\t\t\"x-msbinder\": \"obd\",\n\t\t\"x-mscardfile\": \"crd\",\n\t\t\"x-msclip\": \"clp\",\n\t\t\"x-msdownload\": [\"exe\", \"dll\", \"com\", \"bat\", \"msi\"],\n\t\t\"x-msmediaview\": [\"mvb\", \"m13\", \"m14\"],\n\t\t\"x-msmetafile\": [\"wmf\", \"wmz\", \"emf\", \"emz\"],\n\t\t\"x-msmoney\": \"mny\",\n\t\t\"x-mspublisher\": \"pub\",\n\t\t\"x-msschedule\": \"scd\",\n\t\t\"x-msterminal\": \"trm\",\n\t\t\"x-mswrite\": \"wri\",\n\t\t\"x-nzb\": \"nzb\",\n\t\t\"x-pkcs12\": [\"p12\", \"pfx\"],\n\t\t\"x-pkcs7-certificates\": [\"p7b\", \"spc\"],\n\t\t\"x-research-info-systems\": \"ris\",\n\t\t\"x-silverlight-app\": \"xap\",\n\t\t\"x-sql\": \"sql\",\n\t\t\"x-stuffitx\": \"sitx\",\n\t\t\"x-subrip\": \"srt\",\n\t\t\"x-t3vm-image\": \"t3\",\n\t\t\"x-tads\": \"gam\",\n\t\t\"x-tex\": \"tex\",\n\t\t\"x-tex-tfm\": \"tfm\",\n\t\t\"x-tgif\": \"obj\",\n\t\t\"x-xliff+xml\": \"xlf\",\n\t\t\"x-xz\": \"xz\",\n\t\t\"x-zmachine\": [\"z1\", \"z2\", \"z3\", \"z4\", \"z5\", \"z6\", \"z7\", \"z8\"],\n\t\t\"xaml+xml\": \"xaml\",\n\t\t\"xcap-diff+xml\": \"xdf\",\n\t\t\"xenc+xml\": \"xenc\",\n\t\t\"xml-dtd\": \"dtd\",\n\t\t\"xop+xml\": \"xop\",\n\t\t\"xproc+xml\": \"xpl\",\n\t\t\"xslt+xml\": \"xslt\",\n\t\t\"xv+xml\": [\"mxml\", \"xhvml\", \"xvml\", \"xvm\"],\n\t\t\"yang\": \"yang\",\n\t\t\"yin+xml\": \"yin\",\n\t\t\"envoy\": \"evy\",\n\t\t\"fractals\": \"fif\",\n\t\t\"internet-property-stream\": \"acx\",\n\t\t\"olescript\": \"axs\",\n\t\t\"vnd.ms-outlook\": \"msg\",\n\t\t\"vnd.ms-pkicertstore\": \"sst\",\n\t\t\"x-compress\": \"z\",\n\t\t\"x-compressed\": \"tgz\",\n\t\t\"x-gzip\": \"gz\",\n\t\t\"x-perfmon\": [\"pma\", \"pmc\", \"pml\", \"pmr\", \"pmw\"],\n\t\t\"x-pkcs7-mime\": [\"p7c\", \"p7m\"],\n\t\t\"ynd.ms-pkipko\": \"pko\"\n\t},\n\t\"audio\": {\n\t\t\"amr\": \"amr\",\n\t\t\"amr-wb\": \"awb\",\n\t\t\"annodex\": \"axa\",\n\t\t\"basic\": [\"au\", \"snd\"],\n\t\t\"flac\": \"flac\",\n\t\t\"midi\": [\"mid\", \"midi\", \"kar\", \"rmi\"],\n\t\t\"mpeg\": [\"mpga\", \"mpega\", \"mp2\", \"mp3\", \"m4a\", \"mp2a\", \"m2a\", \"m3a\"],\n\t\t\"mpegurl\": \"m3u\",\n\t\t\"ogg\": [\"oga\", \"ogg\", \"spx\"],\n\t\t\"prs.sid\": \"sid\",\n\t\t\"x-aiff\": [\"aif\", \"aiff\", \"aifc\"],\n\t\t\"x-gsm\": \"gsm\",\n\t\t\"x-ms-wma\": \"wma\",\n\t\t\"x-ms-wax\": \"wax\",\n\t\t\"x-pn-realaudio\": \"ram\",\n\t\t\"x-realaudio\": \"ra\",\n\t\t\"x-sd2\": \"sd2\",\n\t\t\"x-wav\": \"wav\",\n\t\t\"adpcm\": \"adp\",\n\t\t\"mp4\": \"mp4a\",\n\t\t\"s3m\": \"s3m\",\n\t\t\"silk\": \"sil\",\n\t\t\"vnd.dece.audio\": [\"uva\", \"uvva\"],\n\t\t\"vnd.digital-winds\": \"eol\",\n\t\t\"vnd.dra\": \"dra\",\n\t\t\"vnd.dts\": \"dts\",\n\t\t\"vnd.dts.hd\": \"dtshd\",\n\t\t\"vnd.lucent.voice\": \"lvp\",\n\t\t\"vnd.ms-playready.media.pya\": \"pya\",\n\t\t\"vnd.nuera.ecelp4800\": \"ecelp4800\",\n\t\t\"vnd.nuera.ecelp7470\": \"ecelp7470\",\n\t\t\"vnd.nuera.ecelp9600\": \"ecelp9600\",\n\t\t\"vnd.rip\": \"rip\",\n\t\t\"webm\": \"weba\",\n\t\t\"x-aac\": \"aac\",\n\t\t\"x-caf\": \"caf\",\n\t\t\"x-matroska\": \"mka\",\n\t\t\"x-pn-realaudio-plugin\": \"rmp\",\n\t\t\"xm\": \"xm\",\n\t\t\"mid\": [\"mid\", \"rmi\"]\n\t},\n\t\"chemical\": {\n\t\t\"x-alchemy\": \"alc\",\n\t\t\"x-cache\": [\"cac\", \"cache\"],\n\t\t\"x-cache-csf\": \"csf\",\n\t\t\"x-cactvs-binary\": [\"cbin\", \"cascii\", \"ctab\"],\n\t\t\"x-cdx\": \"cdx\",\n\t\t\"x-chem3d\": \"c3d\",\n\t\t\"x-cif\": \"cif\",\n\t\t\"x-cmdf\": \"cmdf\",\n\t\t\"x-cml\": \"cml\",\n\t\t\"x-compass\": \"cpa\",\n\t\t\"x-crossfire\": \"bsd\",\n\t\t\"x-csml\": [\"csml\", \"csm\"],\n\t\t\"x-ctx\": \"ctx\",\n\t\t\"x-cxf\": [\"cxf\", \"cef\"],\n\t\t\"x-embl-dl-nucleotide\": [\"emb\", \"embl\"],\n\t\t\"x-gamess-input\": [\"inp\", \"gam\", \"gamin\"],\n\t\t\"x-gaussian-checkpoint\": [\"fch\", \"fchk\"],\n\t\t\"x-gaussian-cube\": \"cub\",\n\t\t\"x-gaussian-input\": [\"gau\", \"gjc\", \"gjf\"],\n\t\t\"x-gaussian-log\": \"gal\",\n\t\t\"x-gcg8-sequence\": \"gcg\",\n\t\t\"x-genbank\": \"gen\",\n\t\t\"x-hin\": \"hin\",\n\t\t\"x-isostar\": [\"istr\", \"ist\"],\n\t\t\"x-jcamp-dx\": [\"jdx\", \"dx\"],\n\t\t\"x-kinemage\": \"kin\",\n\t\t\"x-macmolecule\": \"mcm\",\n\t\t\"x-macromodel-input\": [\"mmd\", \"mmod\"],\n\t\t\"x-mdl-molfile\": \"mol\",\n\t\t\"x-mdl-rdfile\": \"rd\",\n\t\t\"x-mdl-rxnfile\": \"rxn\",\n\t\t\"x-mdl-sdfile\": [\"sd\", \"sdf\"],\n\t\t\"x-mdl-tgf\": \"tgf\",\n\t\t\"x-mmcif\": \"mcif\",\n\t\t\"x-mol2\": \"mol2\",\n\t\t\"x-molconn-Z\": \"b\",\n\t\t\"x-mopac-graph\": \"gpt\",\n\t\t\"x-mopac-input\": [\"mop\", \"mopcrt\", \"mpc\", \"zmt\"],\n\t\t\"x-mopac-out\": \"moo\",\n\t\t\"x-ncbi-asn1\": \"asn\",\n\t\t\"x-ncbi-asn1-ascii\": [\"prt\", \"ent\"],\n\t\t\"x-ncbi-asn1-binary\": [\"val\", \"aso\"],\n\t\t\"x-pdb\": [\"pdb\", \"ent\"],\n\t\t\"x-rosdal\": \"ros\",\n\t\t\"x-swissprot\": \"sw\",\n\t\t\"x-vamas-iso14976\": \"vms\",\n\t\t\"x-vmd\": \"vmd\",\n\t\t\"x-xtel\": \"xtel\",\n\t\t\"x-xyz\": \"xyz\"\n\t},\n\t\"image\": {\n\t\t\"gif\": \"gif\",\n\t\t\"ief\": \"ief\",\n\t\t\"jpeg\": [\"jpeg\", \"jpg\", \"jpe\"],\n\t\t\"pcx\": \"pcx\",\n\t\t\"png\": \"png\",\n\t\t\"svg+xml\": [\"svg\", \"svgz\"],\n\t\t\"tiff\": [\"tiff\", \"tif\"],\n\t\t\"vnd.djvu\": [\"djvu\", \"djv\"],\n\t\t\"vnd.wap.wbmp\": \"wbmp\",\n\t\t\"x-canon-cr2\": \"cr2\",\n\t\t\"x-canon-crw\": \"crw\",\n\t\t\"x-cmu-raster\": \"ras\",\n\t\t\"x-coreldraw\": \"cdr\",\n\t\t\"x-coreldrawpattern\": \"pat\",\n\t\t\"x-coreldrawtemplate\": \"cdt\",\n\t\t\"x-corelphotopaint\": \"cpt\",\n\t\t\"x-epson-erf\": \"erf\",\n\t\t\"x-icon\": \"ico\",\n\t\t\"x-jg\": \"art\",\n\t\t\"x-jng\": \"jng\",\n\t\t\"x-nikon-nef\": \"nef\",\n\t\t\"x-olympus-orf\": \"orf\",\n\t\t\"x-photoshop\": \"psd\",\n\t\t\"x-portable-anymap\": \"pnm\",\n\t\t\"x-portable-bitmap\": \"pbm\",\n\t\t\"x-portable-graymap\": \"pgm\",\n\t\t\"x-portable-pixmap\": \"ppm\",\n\t\t\"x-rgb\": \"rgb\",\n\t\t\"x-xbitmap\": \"xbm\",\n\t\t\"x-xpixmap\": \"xpm\",\n\t\t\"x-xwindowdump\": \"xwd\",\n\t\t\"bmp\": \"bmp\",\n\t\t\"cgm\": \"cgm\",\n\t\t\"g3fax\": \"g3\",\n\t\t\"ktx\": \"ktx\",\n\t\t\"prs.btif\": \"btif\",\n\t\t\"sgi\": \"sgi\",\n\t\t\"vnd.dece.graphic\": [\"uvi\", \"uvvi\", \"uvg\", \"uvvg\"],\n\t\t\"vnd.dwg\": \"dwg\",\n\t\t\"vnd.dxf\": \"dxf\",\n\t\t\"vnd.fastbidsheet\": \"fbs\",\n\t\t\"vnd.fpx\": \"fpx\",\n\t\t\"vnd.fst\": \"fst\",\n\t\t\"vnd.fujixerox.edmics-mmr\": \"mmr\",\n\t\t\"vnd.fujixerox.edmics-rlc\": \"rlc\",\n\t\t\"vnd.ms-modi\": \"mdi\",\n\t\t\"vnd.ms-photo\": \"wdp\",\n\t\t\"vnd.net-fpx\": \"npx\",\n\t\t\"vnd.xiff\": \"xif\",\n\t\t\"webp\": \"webp\",\n\t\t\"x-3ds\": \"3ds\",\n\t\t\"x-cmx\": \"cmx\",\n\t\t\"x-freehand\": [\"fh\", \"fhc\", \"fh4\", \"fh5\", \"fh7\"],\n\t\t\"x-pict\": [\"pic\", \"pct\"],\n\t\t\"x-tga\": \"tga\",\n\t\t\"cis-cod\": \"cod\",\n\t\t\"pipeg\": \"jfif\"\n\t},\n\t\"message\": {\n\t\t\"rfc822\": [\"eml\", \"mime\", \"mht\", \"mhtml\", \"nws\"]\n\t},\n\t\"model\": {\n\t\t\"iges\": [\"igs\", \"iges\"],\n\t\t\"mesh\": [\"msh\", \"mesh\", \"silo\"],\n\t\t\"vrml\": [\"wrl\", \"vrml\"],\n\t\t\"x3d+vrml\": [\"x3dv\", \"x3dvz\"],\n\t\t\"x3d+xml\": [\"x3d\", \"x3dz\"],\n\t\t\"x3d+binary\": [\"x3db\", \"x3dbz\"],\n\t\t\"vnd.collada+xml\": \"dae\",\n\t\t\"vnd.dwf\": \"dwf\",\n\t\t\"vnd.gdl\": \"gdl\",\n\t\t\"vnd.gtw\": \"gtw\",\n\t\t\"vnd.mts\": \"mts\",\n\t\t\"vnd.vtu\": \"vtu\"\n\t},\n\t\"text\": {\n\t\t\"cache-manifest\": [\"manifest\", \"appcache\"],\n\t\t\"calendar\": [\"ics\", \"icz\", \"ifb\"],\n\t\t\"css\": \"css\",\n\t\t\"csv\": \"csv\",\n\t\t\"h323\": \"323\",\n\t\t\"html\": [\"html\", \"htm\", \"shtml\", \"stm\"],\n\t\t\"iuls\": \"uls\",\n\t\t\"mathml\": \"mml\",\n\t\t\"plain\": [\"txt\", \"text\", \"brf\", \"conf\", \"def\", \"list\", \"log\", \"in\", \"bas\"],\n\t\t\"richtext\": \"rtx\",\n\t\t\"scriptlet\": [\"sct\", \"wsc\"],\n\t\t\"texmacs\": [\"tm\", \"ts\"],\n\t\t\"tab-separated-values\": \"tsv\",\n\t\t\"vnd.sun.j2me.app-descriptor\": \"jad\",\n\t\t\"vnd.wap.wml\": \"wml\",\n\t\t\"vnd.wap.wmlscript\": \"wmls\",\n\t\t\"x-bibtex\": \"bib\",\n\t\t\"x-boo\": \"boo\",\n\t\t\"x-c++hdr\": [\"h++\", \"hpp\", \"hxx\", \"hh\"],\n\t\t\"x-c++src\": [\"c++\", \"cpp\", \"cxx\", \"cc\"],\n\t\t\"x-component\": \"htc\",\n\t\t\"x-dsrc\": \"d\",\n\t\t\"x-diff\": [\"diff\", \"patch\"],\n\t\t\"x-haskell\": \"hs\",\n\t\t\"x-java\": \"java\",\n\t\t\"x-literate-haskell\": \"lhs\",\n\t\t\"x-moc\": \"moc\",\n\t\t\"x-pascal\": [\"p\", \"pas\"],\n\t\t\"x-pcs-gcd\": \"gcd\",\n\t\t\"x-perl\": [\"pl\", \"pm\"],\n\t\t\"x-python\": \"py\",\n\t\t\"x-scala\": \"scala\",\n\t\t\"x-setext\": \"etx\",\n\t\t\"x-tcl\": [\"tcl\", \"tk\"],\n\t\t\"x-tex\": [\"tex\", \"ltx\", \"sty\", \"cls\"],\n\t\t\"x-vcalendar\": \"vcs\",\n\t\t\"x-vcard\": \"vcf\",\n\t\t\"n3\": \"n3\",\n\t\t\"prs.lines.tag\": \"dsc\",\n\t\t\"sgml\": [\"sgml\", \"sgm\"],\n\t\t\"troff\": [\"t\", \"tr\", \"roff\", \"man\", \"me\", \"ms\"],\n\t\t\"turtle\": \"ttl\",\n\t\t\"uri-list\": [\"uri\", \"uris\", \"urls\"],\n\t\t\"vcard\": \"vcard\",\n\t\t\"vnd.curl\": \"curl\",\n\t\t\"vnd.curl.dcurl\": \"dcurl\",\n\t\t\"vnd.curl.scurl\": \"scurl\",\n\t\t\"vnd.curl.mcurl\": \"mcurl\",\n\t\t\"vnd.dvb.subtitle\": \"sub\",\n\t\t\"vnd.fly\": \"fly\",\n\t\t\"vnd.fmi.flexstor\": \"flx\",\n\t\t\"vnd.graphviz\": \"gv\",\n\t\t\"vnd.in3d.3dml\": \"3dml\",\n\t\t\"vnd.in3d.spot\": \"spot\",\n\t\t\"x-asm\": [\"s\", \"asm\"],\n\t\t\"x-c\": [\"c\", \"cc\", \"cxx\", \"cpp\", \"h\", \"hh\", \"dic\"],\n\t\t\"x-fortran\": [\"f\", \"for\", \"f77\", \"f90\"],\n\t\t\"x-opml\": \"opml\",\n\t\t\"x-nfo\": \"nfo\",\n\t\t\"x-sfv\": \"sfv\",\n\t\t\"x-uuencode\": \"uu\",\n\t\t\"webviewhtml\": \"htt\"\n\t},\n\t\"video\": {\n\t\t\"avif\": \".avif\",\n\t\t\"3gpp\": \"3gp\",\n\t\t\"annodex\": \"axv\",\n\t\t\"dl\": \"dl\",\n\t\t\"dv\": [\"dif\", \"dv\"],\n\t\t\"fli\": \"fli\",\n\t\t\"gl\": \"gl\",\n\t\t\"mpeg\": [\"mpeg\", \"mpg\", \"mpe\", \"m1v\", \"m2v\", \"mp2\", \"mpa\", \"mpv2\"],\n\t\t\"mp4\": [\"mp4\", \"mp4v\", \"mpg4\"],\n\t\t\"quicktime\": [\"qt\", \"mov\"],\n\t\t\"ogg\": \"ogv\",\n\t\t\"vnd.mpegurl\": [\"mxu\", \"m4u\"],\n\t\t\"x-flv\": \"flv\",\n\t\t\"x-la-asf\": [\"lsf\", \"lsx\"],\n\t\t\"x-mng\": \"mng\",\n\t\t\"x-ms-asf\": [\"asf\", \"asx\", \"asr\"],\n\t\t\"x-ms-wm\": \"wm\",\n\t\t\"x-ms-wmv\": \"wmv\",\n\t\t\"x-ms-wmx\": \"wmx\",\n\t\t\"x-ms-wvx\": \"wvx\",\n\t\t\"x-msvideo\": \"avi\",\n\t\t\"x-sgi-movie\": \"movie\",\n\t\t\"x-matroska\": [\"mpv\", \"mkv\", \"mk3d\", \"mks\"],\n\t\t\"3gpp2\": \"3g2\",\n\t\t\"h261\": \"h261\",\n\t\t\"h263\": \"h263\",\n\t\t\"h264\": \"h264\",\n\t\t\"jpeg\": \"jpgv\",\n\t\t\"jpm\": [\"jpm\", \"jpgm\"],\n\t\t\"mj2\": [\"mj2\", \"mjp2\"],\n\t\t\"vnd.dece.hd\": [\"uvh\", \"uvvh\"],\n\t\t\"vnd.dece.mobile\": [\"uvm\", \"uvvm\"],\n\t\t\"vnd.dece.pd\": [\"uvp\", \"uvvp\"],\n\t\t\"vnd.dece.sd\": [\"uvs\", \"uvvs\"],\n\t\t\"vnd.dece.video\": [\"uvv\", \"uvvv\"],\n\t\t\"vnd.dvb.file\": \"dvb\",\n\t\t\"vnd.fvt\": \"fvt\",\n\t\t\"vnd.ms-playready.media.pyv\": \"pyv\",\n\t\t\"vnd.uvvu.mp4\": [\"uvu\", \"uvvu\"],\n\t\t\"vnd.vivo\": \"viv\",\n\t\t\"webm\": \"webm\",\n\t\t\"x-f4v\": \"f4v\",\n\t\t\"x-m4v\": \"m4v\",\n\t\t\"x-ms-vob\": \"vob\",\n\t\t\"x-smv\": \"smv\"\n\t},\n\t\"x-conference\": {\n\t\t\"x-cooltalk\": \"ice\"\n\t},\n\t\"x-world\": {\n\t\t\"x-vrml\": [\"vrm\", \"vrml\", \"wrl\", \"flr\", \"wrz\", \"xaf\", \"xof\"]\n\t}\n};\n\nconst mimeTypes = (() => {\n\tconst mimeTypes = {};\n\tfor (const type in table) {\n\t\t// eslint-disable-next-line no-prototype-builtins\n\t\tif (table.hasOwnProperty(type)) {\n\t\t\tfor (const subtype in table[type]) {\n\t\t\t\t// eslint-disable-next-line no-prototype-builtins\n\t\t\t\tif (table[type].hasOwnProperty(subtype)) {\n\t\t\t\t\tconst value = table[type][subtype];\n\t\t\t\t\tif (typeof value == \"string\") {\n\t\t\t\t\t\tmimeTypes[value] = type + \"/\" + subtype;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfor (let indexMimeType = 0; indexMimeType < value.length; indexMimeType++) {\n\t\t\t\t\t\t\tmimeTypes[value[indexMimeType]] = type + \"/\" + subtype;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn mimeTypes;\n})();\n\nexport {\n\tmimeTypes,\n\tgetMimeType\n};\n\nfunction getMimeType(filename) {\n\treturn filename && mimeTypes[filename.split(\".\").pop().toLowerCase()] || getDefaultMimeType();\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nconst table = [];\nfor (let i = 0; i < 256; i++) {\n\tlet t = i;\n\tfor (let j = 0; j < 8; j++) {\n\t\tif (t & 1) {\n\t\t\tt = (t >>> 1) ^ 0xEDB88320;\n\t\t} else {\n\t\t\tt = t >>> 1;\n\t\t}\n\t}\n\ttable[i] = t;\n}\n\nclass Crc32 {\n\n\tconstructor(crc) {\n\t\tthis.crc = crc || -1;\n\t}\n\n\tappend(data) {\n\t\tlet crc = this.crc | 0;\n\t\tfor (let offset = 0, length = data.length | 0; offset < length; offset++) {\n\t\t\tcrc = (crc >>> 8) ^ table[(crc ^ data[offset]) & 0xFF];\n\t\t}\n\t\tthis.crc = crc;\n\t}\n\n\tget() {\n\t\treturn ~this.crc;\n\t}\n}\n\nexport {\n\tCrc32\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n\nimport { Crc32 } from \"./codecs/crc32.js\";\n\nclass Crc32Stream extends TransformStream {\n\n\tconstructor() {\n\t\tconst crc32 = new Crc32();\n\t\tsuper({\n\t\t\ttransform(chunk) {\n\t\t\t\tcrc32.append(chunk);\n\t\t\t},\n\t\t\tflush(controller) {\n\t\t\t\tconst value = new Uint8Array(4);\n\t\t\t\tconst dataView = new DataView(value.buffer);\n\t\t\t\tdataView.setUint32(0, crc32.get());\n\t\t\t\tcontroller.enqueue(value);\n\t\t\t}\n\t\t});\n\t}\n}\n\nexport {\n\tCrc32Stream\n};","// Derived from https://github.com/xqdoo00o/jszip/blob/master/lib/sjcl.js and https://github.com/bitwiseshiftleft/sjcl\n\n// deno-lint-ignore-file no-this-alias\n\n/*\n * SJCL is open. You can use, modify and redistribute it under a BSD\n * license or under the GNU GPL, version 2.0.\n */\n\n/** @fileOverview Javascript cryptography implementation.\n *\n * Crush to remove comments, shorten variable names and\n * generally reduce transmission size.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/*jslint indent: 2, bitwise: false, nomen: false, plusplus: false, white: false, regexp: false */\n\n/** @fileOverview Arrays of bits, encoded as arrays of Numbers.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/**\n * Arrays of bits, encoded as arrays of Numbers.\n * @namespace\n * @description\n *

\n * These objects are the currency accepted by SJCL's crypto functions.\n *

\n *\n *

\n * Most of our crypto primitives operate on arrays of 4-byte words internally,\n * but many of them can take arguments that are not a multiple of 4 bytes.\n * This library encodes arrays of bits (whose size need not be a multiple of 8\n * bits) as arrays of 32-bit words. The bits are packed, big-endian, into an\n * array of words, 32 bits at a time. Since the words are double-precision\n * floating point numbers, they fit some extra data. We use this (in a private,\n * possibly-changing manner) to encode the number of bits actually present\n * in the last word of the array.\n *

\n *\n *

\n * Because bitwise ops clear this out-of-band data, these arrays can be passed\n * to ciphers like AES which want arrays of words.\n *

\n */\nconst bitArray = {\n\t/**\n\t * Concatenate two bit arrays.\n\t * @param {bitArray} a1 The first array.\n\t * @param {bitArray} a2 The second array.\n\t * @return {bitArray} The concatenation of a1 and a2.\n\t */\n\tconcat(a1, a2) {\n\t\tif (a1.length === 0 || a2.length === 0) {\n\t\t\treturn a1.concat(a2);\n\t\t}\n\n\t\tconst last = a1[a1.length - 1], shift = bitArray.getPartial(last);\n\t\tif (shift === 32) {\n\t\t\treturn a1.concat(a2);\n\t\t} else {\n\t\t\treturn bitArray._shiftRight(a2, shift, last | 0, a1.slice(0, a1.length - 1));\n\t\t}\n\t},\n\n\t/**\n\t * Find the length of an array of bits.\n\t * @param {bitArray} a The array.\n\t * @return {Number} The length of a, in bits.\n\t */\n\tbitLength(a) {\n\t\tconst l = a.length;\n\t\tif (l === 0) {\n\t\t\treturn 0;\n\t\t}\n\t\tconst x = a[l - 1];\n\t\treturn (l - 1) * 32 + bitArray.getPartial(x);\n\t},\n\n\t/**\n\t * Truncate an array.\n\t * @param {bitArray} a The array.\n\t * @param {Number} len The length to truncate to, in bits.\n\t * @return {bitArray} A new array, truncated to len bits.\n\t */\n\tclamp(a, len) {\n\t\tif (a.length * 32 < len) {\n\t\t\treturn a;\n\t\t}\n\t\ta = a.slice(0, Math.ceil(len / 32));\n\t\tconst l = a.length;\n\t\tlen = len & 31;\n\t\tif (l > 0 && len) {\n\t\t\ta[l - 1] = bitArray.partial(len, a[l - 1] & 0x80000000 >> (len - 1), 1);\n\t\t}\n\t\treturn a;\n\t},\n\n\t/**\n\t * Make a partial word for a bit array.\n\t * @param {Number} len The number of bits in the word.\n\t * @param {Number} x The bits.\n\t * @param {Number} [_end=0] Pass 1 if x has already been shifted to the high side.\n\t * @return {Number} The partial word.\n\t */\n\tpartial(len, x, _end) {\n\t\tif (len === 32) {\n\t\t\treturn x;\n\t\t}\n\t\treturn (_end ? x | 0 : x << (32 - len)) + len * 0x10000000000;\n\t},\n\n\t/**\n\t * Get the number of bits used by a partial word.\n\t * @param {Number} x The partial word.\n\t * @return {Number} The number of bits used by the partial word.\n\t */\n\tgetPartial(x) {\n\t\treturn Math.round(x / 0x10000000000) || 32;\n\t},\n\n\t/** Shift an array right.\n\t * @param {bitArray} a The array to shift.\n\t * @param {Number} shift The number of bits to shift.\n\t * @param {Number} [carry=0] A byte to carry in\n\t * @param {bitArray} [out=[]] An array to prepend to the output.\n\t * @private\n\t */\n\t_shiftRight(a, shift, carry, out) {\n\t\tif (out === undefined) {\n\t\t\tout = [];\n\t\t}\n\n\t\tfor (; shift >= 32; shift -= 32) {\n\t\t\tout.push(carry);\n\t\t\tcarry = 0;\n\t\t}\n\t\tif (shift === 0) {\n\t\t\treturn out.concat(a);\n\t\t}\n\n\t\tfor (let i = 0; i < a.length; i++) {\n\t\t\tout.push(carry | a[i] >>> shift);\n\t\t\tcarry = a[i] << (32 - shift);\n\t\t}\n\t\tconst last2 = a.length ? a[a.length - 1] : 0;\n\t\tconst shift2 = bitArray.getPartial(last2);\n\t\tout.push(bitArray.partial(shift + shift2 & 31, (shift + shift2 > 32) ? carry : out.pop(), 1));\n\t\treturn out;\n\t}\n};\n\n/** @fileOverview Bit array codec implementations.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/**\n * Arrays of bytes\n * @namespace\n */\nconst codec = {\n\tbytes: {\n\t\t/** Convert from a bitArray to an array of bytes. */\n\t\tfromBits(arr) {\n\t\t\tconst bl = bitArray.bitLength(arr);\n\t\t\tconst byteLength = bl / 8;\n\t\t\tconst out = new Uint8Array(byteLength);\n\t\t\tlet tmp;\n\t\t\tfor (let i = 0; i < byteLength; i++) {\n\t\t\t\tif ((i & 3) === 0) {\n\t\t\t\t\ttmp = arr[i / 4];\n\t\t\t\t}\n\t\t\t\tout[i] = tmp >>> 24;\n\t\t\t\ttmp <<= 8;\n\t\t\t}\n\t\t\treturn out;\n\t\t},\n\t\t/** Convert from an array of bytes to a bitArray. */\n\t\ttoBits(bytes) {\n\t\t\tconst out = [];\n\t\t\tlet i;\n\t\t\tlet tmp = 0;\n\t\t\tfor (i = 0; i < bytes.length; i++) {\n\t\t\t\ttmp = tmp << 8 | bytes[i];\n\t\t\t\tif ((i & 3) === 3) {\n\t\t\t\t\tout.push(tmp);\n\t\t\t\t\ttmp = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (i & 3) {\n\t\t\t\tout.push(bitArray.partial(8 * (i & 3), tmp));\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t}\n};\n\nconst hash = {};\n\n/**\n * Context for a SHA-1 operation in progress.\n * @constructor\n */\nhash.sha1 = class {\n\tconstructor(hash) {\n\t\tconst sha1 = this;\n\t\t/**\n\t\t * The hash's block size, in bits.\n\t\t * @constant\n\t\t */\n\t\tsha1.blockSize = 512;\n\t\t/**\n\t\t * The SHA-1 initialization vector.\n\t\t * @private\n\t\t */\n\t\tsha1._init = [0x67452301, 0xEFCDAB89, 0x98BADCFE, 0x10325476, 0xC3D2E1F0];\n\t\t/**\n\t\t * The SHA-1 hash key.\n\t\t * @private\n\t\t */\n\t\tsha1._key = [0x5A827999, 0x6ED9EBA1, 0x8F1BBCDC, 0xCA62C1D6];\n\t\tif (hash) {\n\t\t\tsha1._h = hash._h.slice(0);\n\t\t\tsha1._buffer = hash._buffer.slice(0);\n\t\t\tsha1._length = hash._length;\n\t\t} else {\n\t\t\tsha1.reset();\n\t\t}\n\t}\n\n\t/**\n\t * Reset the hash state.\n\t * @return this\n\t */\n\treset() {\n\t\tconst sha1 = this;\n\t\tsha1._h = sha1._init.slice(0);\n\t\tsha1._buffer = [];\n\t\tsha1._length = 0;\n\t\treturn sha1;\n\t}\n\n\t/**\n\t * Input several words to the hash.\n\t * @param {bitArray|String} data the data to hash.\n\t * @return this\n\t */\n\tupdate(data) {\n\t\tconst sha1 = this;\n\t\tif (typeof data === \"string\") {\n\t\t\tdata = codec.utf8String.toBits(data);\n\t\t}\n\t\tconst b = sha1._buffer = bitArray.concat(sha1._buffer, data);\n\t\tconst ol = sha1._length;\n\t\tconst nl = sha1._length = ol + bitArray.bitLength(data);\n\t\tif (nl > 9007199254740991) {\n\t\t\tthrow new Error(\"Cannot hash more than 2^53 - 1 bits\");\n\t\t}\n\t\tconst c = new Uint32Array(b);\n\t\tlet j = 0;\n\t\tfor (let i = sha1.blockSize + ol - ((sha1.blockSize + ol) & (sha1.blockSize - 1)); i <= nl;\n\t\t\ti += sha1.blockSize) {\n\t\t\tsha1._block(c.subarray(16 * j, 16 * (j + 1)));\n\t\t\tj += 1;\n\t\t}\n\t\tb.splice(0, 16 * j);\n\t\treturn sha1;\n\t}\n\n\t/**\n\t * Complete hashing and output the hash value.\n\t * @return {bitArray} The hash value, an array of 5 big-endian words. TODO\n\t */\n\tfinalize() {\n\t\tconst sha1 = this;\n\t\tlet b = sha1._buffer;\n\t\tconst h = sha1._h;\n\n\t\t// Round out and push the buffer\n\t\tb = bitArray.concat(b, [bitArray.partial(1, 1)]);\n\t\t// Round out the buffer to a multiple of 16 words, less the 2 length words.\n\t\tfor (let i = b.length + 2; i & 15; i++) {\n\t\t\tb.push(0);\n\t\t}\n\n\t\t// append the length\n\t\tb.push(Math.floor(sha1._length / 0x100000000));\n\t\tb.push(sha1._length | 0);\n\n\t\twhile (b.length) {\n\t\t\tsha1._block(b.splice(0, 16));\n\t\t}\n\n\t\tsha1.reset();\n\t\treturn h;\n\t}\n\n\t/**\n\t * The SHA-1 logical functions f(0), f(1), ..., f(79).\n\t * @private\n\t */\n\t_f(t, b, c, d) {\n\t\tif (t <= 19) {\n\t\t\treturn (b & c) | (~b & d);\n\t\t} else if (t <= 39) {\n\t\t\treturn b ^ c ^ d;\n\t\t} else if (t <= 59) {\n\t\t\treturn (b & c) | (b & d) | (c & d);\n\t\t} else if (t <= 79) {\n\t\t\treturn b ^ c ^ d;\n\t\t}\n\t}\n\n\t/**\n\t * Circular left-shift operator.\n\t * @private\n\t */\n\t_S(n, x) {\n\t\treturn (x << n) | (x >>> 32 - n);\n\t}\n\n\t/**\n\t * Perform one cycle of SHA-1.\n\t * @param {Uint32Array|bitArray} words one block of words.\n\t * @private\n\t */\n\t_block(words) {\n\t\tconst sha1 = this;\n\t\tconst h = sha1._h;\n\t\t// When words is passed to _block, it has 16 elements. SHA1 _block\n\t\t// function extends words with new elements (at the end there are 80 elements). \n\t\t// The problem is that if we use Uint32Array instead of Array, \n\t\t// the length of Uint32Array cannot be changed. Thus, we replace words with a \n\t\t// normal Array here.\n\t\tconst w = Array(80); // do not use Uint32Array here as the instantiation is slower\n\t\tfor (let j = 0; j < 16; j++) {\n\t\t\tw[j] = words[j];\n\t\t}\n\n\t\tlet a = h[0];\n\t\tlet b = h[1];\n\t\tlet c = h[2];\n\t\tlet d = h[3];\n\t\tlet e = h[4];\n\n\t\tfor (let t = 0; t <= 79; t++) {\n\t\t\tif (t >= 16) {\n\t\t\t\tw[t] = sha1._S(1, w[t - 3] ^ w[t - 8] ^ w[t - 14] ^ w[t - 16]);\n\t\t\t}\n\t\t\tconst tmp = (sha1._S(5, a) + sha1._f(t, b, c, d) + e + w[t] +\n\t\t\t\tsha1._key[Math.floor(t / 20)]) | 0;\n\t\t\te = d;\n\t\t\td = c;\n\t\t\tc = sha1._S(30, b);\n\t\t\tb = a;\n\t\t\ta = tmp;\n\t\t}\n\n\t\th[0] = (h[0] + a) | 0;\n\t\th[1] = (h[1] + b) | 0;\n\t\th[2] = (h[2] + c) | 0;\n\t\th[3] = (h[3] + d) | 0;\n\t\th[4] = (h[4] + e) | 0;\n\t}\n};\n\n/** @fileOverview Low-level AES implementation.\n *\n * This file contains a low-level implementation of AES, optimized for\n * size and for efficiency on several browsers. It is based on\n * OpenSSL's aes_core.c, a public-domain implementation by Vincent\n * Rijmen, Antoon Bosselaers and Paulo Barreto.\n *\n * An older version of this implementation is available in the public\n * domain, but this one is (c) Emily Stark, Mike Hamburg, Dan Boneh,\n * Stanford University 2008-2010 and BSD-licensed for liability\n * reasons.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\nconst cipher = {};\n\n/**\n * Schedule out an AES key for both encryption and decryption. This\n * is a low-level class. Use a cipher mode to do bulk encryption.\n *\n * @constructor\n * @param {Array} key The key as an array of 4, 6 or 8 words.\n */\ncipher.aes = class {\n\tconstructor(key) {\n\t\t/**\n\t\t * The expanded S-box and inverse S-box tables. These will be computed\n\t\t * on the client so that we don't have to send them down the wire.\n\t\t *\n\t\t * There are two tables, _tables[0] is for encryption and\n\t\t * _tables[1] is for decryption.\n\t\t *\n\t\t * The first 4 sub-tables are the expanded S-box with MixColumns. The\n\t\t * last (_tables[01][4]) is the S-box itself.\n\t\t *\n\t\t * @private\n\t\t */\n\t\tconst aes = this;\n\t\taes._tables = [[[], [], [], [], []], [[], [], [], [], []]];\n\n\t\tif (!aes._tables[0][0][0]) {\n\t\t\taes._precompute();\n\t\t}\n\n\t\tconst sbox = aes._tables[0][4];\n\t\tconst decTable = aes._tables[1];\n\t\tconst keyLen = key.length;\n\n\t\tlet i, encKey, decKey, rcon = 1;\n\n\t\tif (keyLen !== 4 && keyLen !== 6 && keyLen !== 8) {\n\t\t\tthrow new Error(\"invalid aes key size\");\n\t\t}\n\n\t\taes._key = [encKey = key.slice(0), decKey = []];\n\n\t\t// schedule encryption keys\n\t\tfor (i = keyLen; i < 4 * keyLen + 28; i++) {\n\t\t\tlet tmp = encKey[i - 1];\n\n\t\t\t// apply sbox\n\t\t\tif (i % keyLen === 0 || (keyLen === 8 && i % keyLen === 4)) {\n\t\t\t\ttmp = sbox[tmp >>> 24] << 24 ^ sbox[tmp >> 16 & 255] << 16 ^ sbox[tmp >> 8 & 255] << 8 ^ sbox[tmp & 255];\n\n\t\t\t\t// shift rows and add rcon\n\t\t\t\tif (i % keyLen === 0) {\n\t\t\t\t\ttmp = tmp << 8 ^ tmp >>> 24 ^ rcon << 24;\n\t\t\t\t\trcon = rcon << 1 ^ (rcon >> 7) * 283;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tencKey[i] = encKey[i - keyLen] ^ tmp;\n\t\t}\n\n\t\t// schedule decryption keys\n\t\tfor (let j = 0; i; j++, i--) {\n\t\t\tconst tmp = encKey[j & 3 ? i : i - 4];\n\t\t\tif (i <= 4 || j < 4) {\n\t\t\t\tdecKey[j] = tmp;\n\t\t\t} else {\n\t\t\t\tdecKey[j] = decTable[0][sbox[tmp >>> 24]] ^\n\t\t\t\t\tdecTable[1][sbox[tmp >> 16 & 255]] ^\n\t\t\t\t\tdecTable[2][sbox[tmp >> 8 & 255]] ^\n\t\t\t\t\tdecTable[3][sbox[tmp & 255]];\n\t\t\t}\n\t\t}\n\t}\n\t// public\n\t/* Something like this might appear here eventually\n\tname: \"AES\",\n\tblockSize: 4,\n\tkeySizes: [4,6,8],\n\t*/\n\n\t/**\n\t * Encrypt an array of 4 big-endian words.\n\t * @param {Array} data The plaintext.\n\t * @return {Array} The ciphertext.\n\t */\n\tencrypt(data) {\n\t\treturn this._crypt(data, 0);\n\t}\n\n\t/**\n\t * Decrypt an array of 4 big-endian words.\n\t * @param {Array} data The ciphertext.\n\t * @return {Array} The plaintext.\n\t */\n\tdecrypt(data) {\n\t\treturn this._crypt(data, 1);\n\t}\n\n\t/**\n\t * Expand the S-box tables.\n\t *\n\t * @private\n\t */\n\t_precompute() {\n\t\tconst encTable = this._tables[0];\n\t\tconst decTable = this._tables[1];\n\t\tconst sbox = encTable[4];\n\t\tconst sboxInv = decTable[4];\n\t\tconst d = [];\n\t\tconst th = [];\n\t\tlet xInv, x2, x4, x8;\n\n\t\t// Compute double and third tables\n\t\tfor (let i = 0; i < 256; i++) {\n\t\t\tth[(d[i] = i << 1 ^ (i >> 7) * 283) ^ i] = i;\n\t\t}\n\n\t\tfor (let x = xInv = 0; !sbox[x]; x ^= x2 || 1, xInv = th[xInv] || 1) {\n\t\t\t// Compute sbox\n\t\t\tlet s = xInv ^ xInv << 1 ^ xInv << 2 ^ xInv << 3 ^ xInv << 4;\n\t\t\ts = s >> 8 ^ s & 255 ^ 99;\n\t\t\tsbox[x] = s;\n\t\t\tsboxInv[s] = x;\n\n\t\t\t// Compute MixColumns\n\t\t\tx8 = d[x4 = d[x2 = d[x]]];\n\t\t\tlet tDec = x8 * 0x1010101 ^ x4 * 0x10001 ^ x2 * 0x101 ^ x * 0x1010100;\n\t\t\tlet tEnc = d[s] * 0x101 ^ s * 0x1010100;\n\n\t\t\tfor (let i = 0; i < 4; i++) {\n\t\t\t\tencTable[i][x] = tEnc = tEnc << 24 ^ tEnc >>> 8;\n\t\t\t\tdecTable[i][s] = tDec = tDec << 24 ^ tDec >>> 8;\n\t\t\t}\n\t\t}\n\n\t\t// Compactify. Considerable speedup on Firefox.\n\t\tfor (let i = 0; i < 5; i++) {\n\t\t\tencTable[i] = encTable[i].slice(0);\n\t\t\tdecTable[i] = decTable[i].slice(0);\n\t\t}\n\t}\n\n\t/**\n\t * Encryption and decryption core.\n\t * @param {Array} input Four words to be encrypted or decrypted.\n\t * @param dir The direction, 0 for encrypt and 1 for decrypt.\n\t * @return {Array} The four encrypted or decrypted words.\n\t * @private\n\t */\n\t_crypt(input, dir) {\n\t\tif (input.length !== 4) {\n\t\t\tthrow new Error(\"invalid aes block size\");\n\t\t}\n\n\t\tconst key = this._key[dir];\n\n\t\tconst nInnerRounds = key.length / 4 - 2;\n\t\tconst out = [0, 0, 0, 0];\n\t\tconst table = this._tables[dir];\n\n\t\t// load up the tables\n\t\tconst t0 = table[0];\n\t\tconst t1 = table[1];\n\t\tconst t2 = table[2];\n\t\tconst t3 = table[3];\n\t\tconst sbox = table[4];\n\n\t\t// state variables a,b,c,d are loaded with pre-whitened data\n\t\tlet a = input[0] ^ key[0];\n\t\tlet b = input[dir ? 3 : 1] ^ key[1];\n\t\tlet c = input[2] ^ key[2];\n\t\tlet d = input[dir ? 1 : 3] ^ key[3];\n\t\tlet kIndex = 4;\n\t\tlet a2, b2, c2;\n\n\t\t// Inner rounds. Cribbed from OpenSSL.\n\t\tfor (let i = 0; i < nInnerRounds; i++) {\n\t\t\ta2 = t0[a >>> 24] ^ t1[b >> 16 & 255] ^ t2[c >> 8 & 255] ^ t3[d & 255] ^ key[kIndex];\n\t\t\tb2 = t0[b >>> 24] ^ t1[c >> 16 & 255] ^ t2[d >> 8 & 255] ^ t3[a & 255] ^ key[kIndex + 1];\n\t\t\tc2 = t0[c >>> 24] ^ t1[d >> 16 & 255] ^ t2[a >> 8 & 255] ^ t3[b & 255] ^ key[kIndex + 2];\n\t\t\td = t0[d >>> 24] ^ t1[a >> 16 & 255] ^ t2[b >> 8 & 255] ^ t3[c & 255] ^ key[kIndex + 3];\n\t\t\tkIndex += 4;\n\t\t\ta = a2; b = b2; c = c2;\n\t\t}\n\n\t\t// Last round.\n\t\tfor (let i = 0; i < 4; i++) {\n\t\t\tout[dir ? 3 & -i : i] =\n\t\t\t\tsbox[a >>> 24] << 24 ^\n\t\t\t\tsbox[b >> 16 & 255] << 16 ^\n\t\t\t\tsbox[c >> 8 & 255] << 8 ^\n\t\t\t\tsbox[d & 255] ^\n\t\t\t\tkey[kIndex++];\n\t\t\ta2 = a; a = b; b = c; c = d; d = a2;\n\t\t}\n\n\t\treturn out;\n\t}\n};\n\n/**\n * Random values\n * @namespace\n */\nconst random = {\n\t/** \n\t * Generate random words with pure js, cryptographically not as strong & safe as native implementation.\n\t * @param {TypedArray} typedArray The array to fill.\n\t * @return {TypedArray} The random values.\n\t */\n\tgetRandomValues(typedArray) {\n\t\tconst words = new Uint32Array(typedArray.buffer);\n\t\tconst r = (m_w) => {\n\t\t\tlet m_z = 0x3ade68b1;\n\t\t\tconst mask = 0xffffffff;\n\t\t\treturn function () {\n\t\t\t\tm_z = (0x9069 * (m_z & 0xFFFF) + (m_z >> 0x10)) & mask;\n\t\t\t\tm_w = (0x4650 * (m_w & 0xFFFF) + (m_w >> 0x10)) & mask;\n\t\t\t\tconst result = ((((m_z << 0x10) + m_w) & mask) / 0x100000000) + .5;\n\t\t\t\treturn result * (Math.random() > .5 ? 1 : -1);\n\t\t\t};\n\t\t};\n\t\tfor (let i = 0, rcache; i < typedArray.length; i += 4) {\n\t\t\tconst _r = r((rcache || Math.random()) * 0x100000000);\n\t\t\trcache = _r() * 0x3ade67b7;\n\t\t\twords[i / 4] = (_r() * 0x100000000) | 0;\n\t\t}\n\t\treturn typedArray;\n\t}\n};\n\n/** @fileOverview CTR mode implementation.\n *\n * Special thanks to Roy Nicholson for pointing out a bug in our\n * implementation.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/** Brian Gladman's CTR Mode.\n* @constructor\n* @param {Object} _prf The aes instance to generate key.\n* @param {bitArray} _iv The iv for ctr mode, it must be 128 bits.\n*/\n\nconst mode = {};\n\n/**\n * Brian Gladman's CTR Mode.\n * @namespace\n */\nmode.ctrGladman = class {\n\tconstructor(prf, iv) {\n\t\tthis._prf = prf;\n\t\tthis._initIv = iv;\n\t\tthis._iv = iv;\n\t}\n\n\treset() {\n\t\tthis._iv = this._initIv;\n\t}\n\n\t/** Input some data to calculate.\n\t * @param {bitArray} data the data to process, it must be intergral multiple of 128 bits unless it's the last.\n\t */\n\tupdate(data) {\n\t\treturn this.calculate(this._prf, data, this._iv);\n\t}\n\n\tincWord(word) {\n\t\tif (((word >> 24) & 0xff) === 0xff) { //overflow\n\t\t\tlet b1 = (word >> 16) & 0xff;\n\t\t\tlet b2 = (word >> 8) & 0xff;\n\t\t\tlet b3 = word & 0xff;\n\n\t\t\tif (b1 === 0xff) { // overflow b1 \n\t\t\t\tb1 = 0;\n\t\t\t\tif (b2 === 0xff) {\n\t\t\t\t\tb2 = 0;\n\t\t\t\t\tif (b3 === 0xff) {\n\t\t\t\t\t\tb3 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t++b3;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t++b2;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t++b1;\n\t\t\t}\n\n\t\t\tword = 0;\n\t\t\tword += (b1 << 16);\n\t\t\tword += (b2 << 8);\n\t\t\tword += b3;\n\t\t} else {\n\t\t\tword += (0x01 << 24);\n\t\t}\n\t\treturn word;\n\t}\n\n\tincCounter(counter) {\n\t\tif ((counter[0] = this.incWord(counter[0])) === 0) {\n\t\t\t// encr_data in fileenc.c from Dr Brian Gladman's counts only with DWORD j < 8\n\t\t\tcounter[1] = this.incWord(counter[1]);\n\t\t}\n\t}\n\n\tcalculate(prf, data, iv) {\n\t\tlet l;\n\t\tif (!(l = data.length)) {\n\t\t\treturn [];\n\t\t}\n\t\tconst bl = bitArray.bitLength(data);\n\t\tfor (let i = 0; i < l; i += 4) {\n\t\t\tthis.incCounter(iv);\n\t\t\tconst e = prf.encrypt(iv);\n\t\t\tdata[i] ^= e[0];\n\t\t\tdata[i + 1] ^= e[1];\n\t\t\tdata[i + 2] ^= e[2];\n\t\t\tdata[i + 3] ^= e[3];\n\t\t}\n\t\treturn bitArray.clamp(data, bl);\n\t}\n};\n\nconst misc = {\n\timportKey(password) {\n\t\treturn new misc.hmacSha1(codec.bytes.toBits(password));\n\t},\n\tpbkdf2(prf, salt, count, length) {\n\t\tcount = count || 10000;\n\t\tif (length < 0 || count < 0) {\n\t\t\tthrow new Error(\"invalid params to pbkdf2\");\n\t\t}\n\t\tconst byteLength = ((length >> 5) + 1) << 2;\n\t\tlet u, ui, i, j, k;\n\t\tconst arrayBuffer = new ArrayBuffer(byteLength);\n\t\tconst out = new DataView(arrayBuffer);\n\t\tlet outLength = 0;\n\t\tconst b = bitArray;\n\t\tsalt = codec.bytes.toBits(salt);\n\t\tfor (k = 1; outLength < (byteLength || 1); k++) {\n\t\t\tu = ui = prf.encrypt(b.concat(salt, [k]));\n\t\t\tfor (i = 1; i < count; i++) {\n\t\t\t\tui = prf.encrypt(ui);\n\t\t\t\tfor (j = 0; j < ui.length; j++) {\n\t\t\t\t\tu[j] ^= ui[j];\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (i = 0; outLength < (byteLength || 1) && i < u.length; i++) {\n\t\t\t\tout.setInt32(outLength, u[i]);\n\t\t\t\toutLength += 4;\n\t\t\t}\n\t\t}\n\t\treturn arrayBuffer.slice(0, length / 8);\n\t}\n};\n\n/** @fileOverview HMAC implementation.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/** HMAC with the specified hash function.\n * @constructor\n * @param {bitArray} key the key for HMAC.\n * @param {Object} [Hash=hash.sha1] The hash function to use.\n */\nmisc.hmacSha1 = class {\n\n\tconstructor(key) {\n\t\tconst hmac = this;\n\t\tconst Hash = hmac._hash = hash.sha1;\n\t\tconst exKey = [[], []];\n\t\thmac._baseHash = [new Hash(), new Hash()];\n\t\tconst bs = hmac._baseHash[0].blockSize / 32;\n\n\t\tif (key.length > bs) {\n\t\t\tkey = new Hash().update(key).finalize();\n\t\t}\n\n\t\tfor (let i = 0; i < bs; i++) {\n\t\t\texKey[0][i] = key[i] ^ 0x36363636;\n\t\t\texKey[1][i] = key[i] ^ 0x5C5C5C5C;\n\t\t}\n\n\t\thmac._baseHash[0].update(exKey[0]);\n\t\thmac._baseHash[1].update(exKey[1]);\n\t\thmac._resultHash = new Hash(hmac._baseHash[0]);\n\t}\n\treset() {\n\t\tconst hmac = this;\n\t\thmac._resultHash = new hmac._hash(hmac._baseHash[0]);\n\t\thmac._updated = false;\n\t}\n\n\tupdate(data) {\n\t\tconst hmac = this;\n\t\thmac._updated = true;\n\t\thmac._resultHash.update(data);\n\t}\n\n\tdigest() {\n\t\tconst hmac = this;\n\t\tconst w = hmac._resultHash.finalize();\n\t\tconst result = new (hmac._hash)(hmac._baseHash[1]).update(w).finalize();\n\n\t\thmac.reset();\n\n\t\treturn result;\n\t}\n\n\tencrypt(data) {\n\t\tif (!this._updated) {\n\t\t\tthis.update(data);\n\t\t\treturn this.digest(data);\n\t\t} else {\n\t\t\tthrow new Error(\"encrypt on already updated hmac called!\");\n\t\t}\n\t}\n};\n\nexport {\n\tcipher,\n\tcodec,\n\tmisc,\n\tmode,\n\trandom\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global crypto */\n\nimport {\n\trandom\n} from \"./codecs/sjcl.js\";\n\nconst GET_RANDOM_VALUES_SUPPORTED = typeof crypto != \"undefined\" && typeof crypto.getRandomValues == \"function\";\n\nconst ERR_INVALID_PASSWORD = \"Invalid password\";\nconst ERR_INVALID_SIGNATURE = \"Invalid signature\";\nconst ERR_ABORT_CHECK_PASSWORD = \"zipjs-abort-check-password\";\n\nexport {\n\tgetRandomValues,\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE,\n\tERR_ABORT_CHECK_PASSWORD\n};\n\nfunction getRandomValues(array) {\n\tif (GET_RANDOM_VALUES_SUPPORTED) {\n\t\treturn crypto.getRandomValues(array);\n\t} else {\n\t\treturn random.getRandomValues(array);\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global crypto, TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport { encodeText } from \"./../util/encode-text.js\";\nimport {\n\tcipher,\n\tcodec,\n\tmisc,\n\tmode\n} from \"./codecs/sjcl.js\";\nimport {\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE,\n\tERR_ABORT_CHECK_PASSWORD,\n\tgetRandomValues\n} from \"./common-crypto.js\";\n\nconst BLOCK_LENGTH = 16;\nconst RAW_FORMAT = \"raw\";\nconst PBKDF2_ALGORITHM = { name: \"PBKDF2\" };\nconst HASH_ALGORITHM = { name: \"HMAC\" };\nconst HASH_FUNCTION = \"SHA-1\";\nconst BASE_KEY_ALGORITHM = Object.assign({ hash: HASH_ALGORITHM }, PBKDF2_ALGORITHM);\nconst DERIVED_BITS_ALGORITHM = Object.assign({ iterations: 1000, hash: { name: HASH_FUNCTION } }, PBKDF2_ALGORITHM);\nconst DERIVED_BITS_USAGE = [\"deriveBits\"];\nconst SALT_LENGTH = [8, 12, 16];\nconst KEY_LENGTH = [16, 24, 32];\nconst SIGNATURE_LENGTH = 10;\nconst COUNTER_DEFAULT_VALUE = [0, 0, 0, 0];\nconst UNDEFINED_TYPE = \"undefined\";\nconst FUNCTION_TYPE = \"function\";\n// deno-lint-ignore valid-typeof\nconst CRYPTO_API_SUPPORTED = typeof crypto != UNDEFINED_TYPE;\nconst subtle = CRYPTO_API_SUPPORTED && crypto.subtle;\nconst SUBTLE_API_SUPPORTED = CRYPTO_API_SUPPORTED && typeof subtle != UNDEFINED_TYPE;\nconst codecBytes = codec.bytes;\nconst Aes = cipher.aes;\nconst CtrGladman = mode.ctrGladman;\nconst HmacSha1 = misc.hmacSha1;\n\nlet IMPORT_KEY_SUPPORTED = CRYPTO_API_SUPPORTED && SUBTLE_API_SUPPORTED && typeof subtle.importKey == FUNCTION_TYPE;\nlet DERIVE_BITS_SUPPORTED = CRYPTO_API_SUPPORTED && SUBTLE_API_SUPPORTED && typeof subtle.deriveBits == FUNCTION_TYPE;\n\nclass AESDecryptionStream extends TransformStream {\n\n\tconstructor({ password, signed, encryptionStrength, checkPasswordOnly }) {\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tready: new Promise(resolve => this.resolveReady = resolve),\n\t\t\t\t\tpassword,\n\t\t\t\t\tsigned,\n\t\t\t\t\tstrength: encryptionStrength - 1,\n\t\t\t\t\tpending: new Uint8Array()\n\t\t\t\t});\n\t\t\t},\n\t\t\tasync transform(chunk, controller) {\n\t\t\t\tconst aesCrypto = this;\n\t\t\t\tconst {\n\t\t\t\t\tpassword,\n\t\t\t\t\tstrength,\n\t\t\t\t\tresolveReady,\n\t\t\t\t\tready\n\t\t\t\t} = aesCrypto;\n\t\t\t\tif (password) {\n\t\t\t\t\tawait createDecryptionKeys(aesCrypto, strength, password, subarray(chunk, 0, SALT_LENGTH[strength] + 2));\n\t\t\t\t\tchunk = subarray(chunk, SALT_LENGTH[strength] + 2);\n\t\t\t\t\tif (checkPasswordOnly) {\n\t\t\t\t\t\tcontroller.error(new Error(ERR_ABORT_CHECK_PASSWORD));\n\t\t\t\t\t} else {\n\t\t\t\t\t\tresolveReady();\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tawait ready;\n\t\t\t\t}\n\t\t\t\tconst output = new Uint8Array(chunk.length - SIGNATURE_LENGTH - ((chunk.length - SIGNATURE_LENGTH) % BLOCK_LENGTH));\n\t\t\t\tcontroller.enqueue(append(aesCrypto, chunk, output, 0, SIGNATURE_LENGTH, true));\n\t\t\t},\n\t\t\tasync flush(controller) {\n\t\t\t\tconst {\n\t\t\t\t\tsigned,\n\t\t\t\t\tctr,\n\t\t\t\t\thmac,\n\t\t\t\t\tpending,\n\t\t\t\t\tready\n\t\t\t\t} = this;\n\t\t\t\tawait ready;\n\t\t\t\tconst chunkToDecrypt = subarray(pending, 0, pending.length - SIGNATURE_LENGTH);\n\t\t\t\tconst originalSignature = subarray(pending, pending.length - SIGNATURE_LENGTH);\n\t\t\t\tlet decryptedChunkArray = new Uint8Array();\n\t\t\t\tif (chunkToDecrypt.length) {\n\t\t\t\t\tconst encryptedChunk = toBits(codecBytes, chunkToDecrypt);\n\t\t\t\t\thmac.update(encryptedChunk);\n\t\t\t\t\tconst decryptedChunk = ctr.update(encryptedChunk);\n\t\t\t\t\tdecryptedChunkArray = fromBits(codecBytes, decryptedChunk);\n\t\t\t\t}\n\t\t\t\tif (signed) {\n\t\t\t\t\tconst signature = subarray(fromBits(codecBytes, hmac.digest()), 0, SIGNATURE_LENGTH);\n\t\t\t\t\tfor (let indexSignature = 0; indexSignature < SIGNATURE_LENGTH; indexSignature++) {\n\t\t\t\t\t\tif (signature[indexSignature] != originalSignature[indexSignature]) {\n\t\t\t\t\t\t\tthrow new Error(ERR_INVALID_SIGNATURE);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcontroller.enqueue(decryptedChunkArray);\n\t\t\t}\n\t\t});\n\t}\n}\n\nclass AESEncryptionStream extends TransformStream {\n\n\tconstructor({ password, encryptionStrength }) {\n\t\t// deno-lint-ignore prefer-const\n\t\tlet stream;\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tready: new Promise(resolve => this.resolveReady = resolve),\n\t\t\t\t\tpassword,\n\t\t\t\t\tstrength: encryptionStrength - 1,\n\t\t\t\t\tpending: new Uint8Array()\n\t\t\t\t});\n\t\t\t},\n\t\t\tasync transform(chunk, controller) {\n\t\t\t\tconst aesCrypto = this;\n\t\t\t\tconst {\n\t\t\t\t\tpassword,\n\t\t\t\t\tstrength,\n\t\t\t\t\tresolveReady,\n\t\t\t\t\tready\n\t\t\t\t} = aesCrypto;\n\t\t\t\tlet preamble = new Uint8Array();\n\t\t\t\tif (password) {\n\t\t\t\t\tpreamble = await createEncryptionKeys(aesCrypto, strength, password);\n\t\t\t\t\tresolveReady();\n\t\t\t\t} else {\n\t\t\t\t\tawait ready;\n\t\t\t\t}\n\t\t\t\tconst output = new Uint8Array(preamble.length + chunk.length - (chunk.length % BLOCK_LENGTH));\n\t\t\t\toutput.set(preamble, 0);\n\t\t\t\tcontroller.enqueue(append(aesCrypto, chunk, output, preamble.length, 0));\n\t\t\t},\n\t\t\tasync flush(controller) {\n\t\t\t\tconst {\n\t\t\t\t\tctr,\n\t\t\t\t\thmac,\n\t\t\t\t\tpending,\n\t\t\t\t\tready\n\t\t\t\t} = this;\n\t\t\t\tawait ready;\n\t\t\t\tlet encryptedChunkArray = new Uint8Array();\n\t\t\t\tif (pending.length) {\n\t\t\t\t\tconst encryptedChunk = ctr.update(toBits(codecBytes, pending));\n\t\t\t\t\thmac.update(encryptedChunk);\n\t\t\t\t\tencryptedChunkArray = fromBits(codecBytes, encryptedChunk);\n\t\t\t\t}\n\t\t\t\tstream.signature = fromBits(codecBytes, hmac.digest()).slice(0, SIGNATURE_LENGTH);\n\t\t\t\tcontroller.enqueue(concat(encryptedChunkArray, stream.signature));\n\t\t\t}\n\t\t});\n\t\tstream = this;\n\t}\n}\n\nexport {\n\tAESDecryptionStream,\n\tAESEncryptionStream,\n\tERR_INVALID_PASSWORD\n};\n\nfunction append(aesCrypto, input, output, paddingStart, paddingEnd, verifySignature) {\n\tconst {\n\t\tctr,\n\t\thmac,\n\t\tpending\n\t} = aesCrypto;\n\tconst inputLength = input.length - paddingEnd;\n\tif (pending.length) {\n\t\tinput = concat(pending, input);\n\t\toutput = expand(output, inputLength - (inputLength % BLOCK_LENGTH));\n\t}\n\tlet offset;\n\tfor (offset = 0; offset <= inputLength - BLOCK_LENGTH; offset += BLOCK_LENGTH) {\n\t\tconst inputChunk = toBits(codecBytes, subarray(input, offset, offset + BLOCK_LENGTH));\n\t\tif (verifySignature) {\n\t\t\thmac.update(inputChunk);\n\t\t}\n\t\tconst outputChunk = ctr.update(inputChunk);\n\t\tif (!verifySignature) {\n\t\t\thmac.update(outputChunk);\n\t\t}\n\t\toutput.set(fromBits(codecBytes, outputChunk), offset + paddingStart);\n\t}\n\taesCrypto.pending = subarray(input, offset);\n\treturn output;\n}\n\nasync function createDecryptionKeys(decrypt, strength, password, preamble) {\n\tconst passwordVerificationKey = await createKeys(decrypt, strength, password, subarray(preamble, 0, SALT_LENGTH[strength]));\n\tconst passwordVerification = subarray(preamble, SALT_LENGTH[strength]);\n\tif (passwordVerificationKey[0] != passwordVerification[0] || passwordVerificationKey[1] != passwordVerification[1]) {\n\t\tthrow new Error(ERR_INVALID_PASSWORD);\n\t}\n}\n\nasync function createEncryptionKeys(encrypt, strength, password) {\n\tconst salt = getRandomValues(new Uint8Array(SALT_LENGTH[strength]));\n\tconst passwordVerification = await createKeys(encrypt, strength, password, salt);\n\treturn concat(salt, passwordVerification);\n}\n\nasync function createKeys(aesCrypto, strength, password, salt) {\n\taesCrypto.password = null;\n\tconst encodedPassword = encodeText(password);\n\tconst baseKey = await importKey(RAW_FORMAT, encodedPassword, BASE_KEY_ALGORITHM, false, DERIVED_BITS_USAGE);\n\tconst derivedBits = await deriveBits(Object.assign({ salt }, DERIVED_BITS_ALGORITHM), baseKey, 8 * ((KEY_LENGTH[strength] * 2) + 2));\n\tconst compositeKey = new Uint8Array(derivedBits);\n\tconst key = toBits(codecBytes, subarray(compositeKey, 0, KEY_LENGTH[strength]));\n\tconst authentication = toBits(codecBytes, subarray(compositeKey, KEY_LENGTH[strength], KEY_LENGTH[strength] * 2));\n\tconst passwordVerification = subarray(compositeKey, KEY_LENGTH[strength] * 2);\n\tObject.assign(aesCrypto, {\n\t\tkeys: {\n\t\t\tkey,\n\t\t\tauthentication,\n\t\t\tpasswordVerification\n\t\t},\n\t\tctr: new CtrGladman(new Aes(key), Array.from(COUNTER_DEFAULT_VALUE)),\n\t\thmac: new HmacSha1(authentication)\n\t});\n\treturn passwordVerification;\n}\n\nasync function importKey(format, password, algorithm, extractable, keyUsages) {\n\tif (IMPORT_KEY_SUPPORTED) {\n\t\ttry {\n\t\t\treturn await subtle.importKey(format, password, algorithm, extractable, keyUsages);\n\t\t} catch (_error) {\n\t\t\tIMPORT_KEY_SUPPORTED = false;\n\t\t\treturn misc.importKey(password);\n\t\t}\n\t} else {\n\t\treturn misc.importKey(password);\n\t}\n}\n\nasync function deriveBits(algorithm, baseKey, length) {\n\tif (DERIVE_BITS_SUPPORTED) {\n\t\ttry {\n\t\t\treturn await subtle.deriveBits(algorithm, baseKey, length);\n\t\t} catch (_error) {\n\t\t\tDERIVE_BITS_SUPPORTED = false;\n\t\t\treturn misc.pbkdf2(baseKey, algorithm.salt, DERIVED_BITS_ALGORITHM.iterations, length);\n\t\t}\n\t} else {\n\t\treturn misc.pbkdf2(baseKey, algorithm.salt, DERIVED_BITS_ALGORITHM.iterations, length);\n\t}\n}\n\nfunction concat(leftArray, rightArray) {\n\tlet array = leftArray;\n\tif (leftArray.length + rightArray.length) {\n\t\tarray = new Uint8Array(leftArray.length + rightArray.length);\n\t\tarray.set(leftArray, 0);\n\t\tarray.set(rightArray, leftArray.length);\n\t}\n\treturn array;\n}\n\nfunction expand(inputArray, length) {\n\tif (length && length > inputArray.length) {\n\t\tconst array = inputArray;\n\t\tinputArray = new Uint8Array(length);\n\t\tinputArray.set(array, 0);\n\t}\n\treturn inputArray;\n}\n\nfunction subarray(array, begin, end) {\n\treturn array.subarray(begin, end);\n}\n\nfunction fromBits(codecBytes, chunk) {\n\treturn codecBytes.fromBits(chunk);\n}\nfunction toBits(codecBytes, chunk) {\n\treturn codecBytes.toBits(chunk);\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TextEncoder */\n\nexport {\n\tencodeText\n};\n\nfunction encodeText(value) {\n\tif (typeof TextEncoder == \"undefined\") {\n\t\tvalue = unescape(encodeURIComponent(value));\n\t\tconst result = new Uint8Array(value.length);\n\t\tfor (let i = 0; i < result.length; i++) {\n\t\t\tresult[i] = value.charCodeAt(i);\n\t\t}\n\t\treturn result;\n\t} else {\n\t\treturn new TextEncoder().encode(value);\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport { Crc32 } from \"./codecs/crc32.js\";\nimport {\n\tERR_INVALID_PASSWORD,\n\tERR_ABORT_CHECK_PASSWORD,\n\tgetRandomValues\n} from \"./common-crypto.js\";\n\nconst HEADER_LENGTH = 12;\n\nclass ZipCryptoDecryptionStream extends TransformStream {\n\n\tconstructor({ password, passwordVerification, checkPasswordOnly }) {\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tpassword,\n\t\t\t\t\tpasswordVerification\n\t\t\t\t});\n\t\t\t\tcreateKeys(this, password);\n\t\t\t},\n\t\t\ttransform(chunk, controller) {\n\t\t\t\tconst zipCrypto = this;\n\t\t\t\tif (zipCrypto.password) {\n\t\t\t\t\tconst decryptedHeader = decrypt(zipCrypto, chunk.subarray(0, HEADER_LENGTH));\n\t\t\t\t\tzipCrypto.password = null;\n\t\t\t\t\tif (decryptedHeader[HEADER_LENGTH - 1] != zipCrypto.passwordVerification) {\n\t\t\t\t\t\tthrow new Error(ERR_INVALID_PASSWORD);\n\t\t\t\t\t}\n\t\t\t\t\tchunk = chunk.subarray(HEADER_LENGTH);\n\t\t\t\t}\n\t\t\t\tif (checkPasswordOnly) {\n\t\t\t\t\tcontroller.error(new Error(ERR_ABORT_CHECK_PASSWORD));\n\t\t\t\t} else {\n\t\t\t\t\tcontroller.enqueue(decrypt(zipCrypto, chunk));\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n}\n\nclass ZipCryptoEncryptionStream extends TransformStream {\n\n\tconstructor({ password, passwordVerification }) {\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tpassword,\n\t\t\t\t\tpasswordVerification\n\t\t\t\t});\n\t\t\t\tcreateKeys(this, password);\n\t\t\t},\n\t\t\ttransform(chunk, controller) {\n\t\t\t\tconst zipCrypto = this;\n\t\t\t\tlet output;\n\t\t\t\tlet offset;\n\t\t\t\tif (zipCrypto.password) {\n\t\t\t\t\tzipCrypto.password = null;\n\t\t\t\t\tconst header = getRandomValues(new Uint8Array(HEADER_LENGTH));\n\t\t\t\t\theader[HEADER_LENGTH - 1] = zipCrypto.passwordVerification;\n\t\t\t\t\toutput = new Uint8Array(chunk.length + header.length);\n\t\t\t\t\toutput.set(encrypt(zipCrypto, header), 0);\n\t\t\t\t\toffset = HEADER_LENGTH;\n\t\t\t\t} else {\n\t\t\t\t\toutput = new Uint8Array(chunk.length);\n\t\t\t\t\toffset = 0;\n\t\t\t\t}\n\t\t\t\toutput.set(encrypt(zipCrypto, chunk), offset);\n\t\t\t\tcontroller.enqueue(output);\n\t\t\t}\n\t\t});\n\t}\n}\n\nexport {\n\tZipCryptoDecryptionStream,\n\tZipCryptoEncryptionStream,\n\tERR_INVALID_PASSWORD\n};\n\nfunction decrypt(target, input) {\n\tconst output = new Uint8Array(input.length);\n\tfor (let index = 0; index < input.length; index++) {\n\t\toutput[index] = getByte(target) ^ input[index];\n\t\tupdateKeys(target, output[index]);\n\t}\n\treturn output;\n}\n\nfunction encrypt(target, input) {\n\tconst output = new Uint8Array(input.length);\n\tfor (let index = 0; index < input.length; index++) {\n\t\toutput[index] = getByte(target) ^ input[index];\n\t\tupdateKeys(target, input[index]);\n\t}\n\treturn output;\n}\n\nfunction createKeys(target, password) {\n\tconst keys = [0x12345678, 0x23456789, 0x34567890];\n\tObject.assign(target, {\n\t\tkeys,\n\t\tcrcKey0: new Crc32(keys[0]),\n\t\tcrcKey2: new Crc32(keys[2]),\n\t});\n\tfor (let index = 0; index < password.length; index++) {\n\t\tupdateKeys(target, password.charCodeAt(index));\n\t}\n}\n\nfunction updateKeys(target, byte) {\n\tlet [key0, key1, key2] = target.keys;\n\ttarget.crcKey0.append([byte]);\n\tkey0 = ~target.crcKey0.get();\n\tkey1 = getInt32(Math.imul(getInt32(key1 + getInt8(key0)), 134775813) + 1);\n\ttarget.crcKey2.append([key1 >>> 24]);\n\tkey2 = ~target.crcKey2.get();\n\ttarget.keys = [key0, key1, key2];\n}\n\nfunction getByte(target) {\n\tconst temp = target.keys[2] | 2;\n\treturn getInt8(Math.imul(temp, (temp ^ 1)) >>> 8);\n}\n\nfunction getInt8(number) {\n\treturn number & 0xFF;\n}\n\nfunction getInt32(number) {\n\treturn number & 0xFFFFFFFF;\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport { Crc32Stream } from \"./crc32-stream.js\";\nimport {\n\tAESEncryptionStream,\n\tAESDecryptionStream\n} from \"./aes-crypto-stream.js\";\nimport {\n\tZipCryptoEncryptionStream,\n\tZipCryptoDecryptionStream\n} from \"./zip-crypto-stream.js\";\nimport {\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE,\n\tERR_ABORT_CHECK_PASSWORD\n} from \"./common-crypto.js\";\n\nconst COMPRESSION_FORMAT = \"deflate-raw\";\n\nclass DeflateStream extends TransformStream {\n\n\tconstructor(options, { chunkSize, CompressionStream, CompressionStreamNative }) {\n\t\tsuper({});\n\t\tconst { compressed, encrypted, useCompressionStream, zipCrypto, signed, level } = options;\n\t\tconst stream = this;\n\t\tlet crc32Stream, encryptionStream;\n\t\tlet readable = filterEmptyChunks(super.readable);\n\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t[readable, crc32Stream] = readable.tee();\n\t\t\tcrc32Stream = pipeThrough(crc32Stream, new Crc32Stream());\n\t\t}\n\t\tif (compressed) {\n\t\t\treadable = pipeThroughCommpressionStream(readable, useCompressionStream, { level, chunkSize }, CompressionStreamNative, CompressionStream);\n\t\t}\n\t\tif (encrypted) {\n\t\t\tif (zipCrypto) {\n\t\t\t\treadable = pipeThrough(readable, new ZipCryptoEncryptionStream(options));\n\t\t\t} else {\n\t\t\t\tencryptionStream = new AESEncryptionStream(options);\n\t\t\t\treadable = pipeThrough(readable, encryptionStream);\n\t\t\t}\n\t\t}\n\t\tsetReadable(stream, readable, async () => {\n\t\t\tlet signature;\n\t\t\tif (encrypted && !zipCrypto) {\n\t\t\t\tsignature = encryptionStream.signature;\n\t\t\t}\n\t\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t\tsignature = await crc32Stream.getReader().read();\n\t\t\t\tsignature = new DataView(signature.value.buffer).getUint32(0);\n\t\t\t}\n\t\t\tstream.signature = signature;\n\t\t});\n\t}\n}\n\nclass InflateStream extends TransformStream {\n\n\tconstructor(options, { chunkSize, DecompressionStream, DecompressionStreamNative }) {\n\t\tsuper({});\n\t\tconst { zipCrypto, encrypted, signed, signature, compressed, useCompressionStream } = options;\n\t\tlet crc32Stream, decryptionStream;\n\t\tlet readable = filterEmptyChunks(super.readable);\n\t\tif (encrypted) {\n\t\t\tif (zipCrypto) {\n\t\t\t\treadable = pipeThrough(readable, new ZipCryptoDecryptionStream(options));\n\t\t\t} else {\n\t\t\t\tdecryptionStream = new AESDecryptionStream(options);\n\t\t\t\treadable = pipeThrough(readable, decryptionStream);\n\t\t\t}\n\t\t}\n\t\tif (compressed) {\n\t\t\treadable = pipeThroughCommpressionStream(readable, useCompressionStream, { chunkSize }, DecompressionStreamNative, DecompressionStream);\n\t\t}\n\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t[readable, crc32Stream] = readable.tee();\n\t\t\tcrc32Stream = pipeThrough(crc32Stream, new Crc32Stream());\n\t\t}\n\t\tsetReadable(this, readable, async () => {\n\t\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t\tconst streamSignature = await crc32Stream.getReader().read();\n\t\t\t\tconst dataViewSignature = new DataView(streamSignature.value.buffer);\n\t\t\t\tif (signature != dataViewSignature.getUint32(0, false)) {\n\t\t\t\t\tthrow new Error(ERR_INVALID_SIGNATURE);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n}\n\nexport {\n\tDeflateStream,\n\tInflateStream,\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE,\n\tERR_ABORT_CHECK_PASSWORD\n};\n\nfunction filterEmptyChunks(readable) {\n\treturn pipeThrough(readable, new TransformStream({\n\t\ttransform(chunk, controller) {\n\t\t\tif (chunk && chunk.length) {\n\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t}\n\t\t}\n\t}));\n}\n\nfunction setReadable(stream, readable, flush) {\n\treadable = pipeThrough(readable, new TransformStream({ flush }));\n\tObject.defineProperty(stream, \"readable\", {\n\t\tget() {\n\t\t\treturn readable;\n\t\t}\n\t});\n}\n\nfunction pipeThroughCommpressionStream(readable, useCompressionStream, options, CodecStreamNative, CodecStream) {\n\ttry {\n\t\tconst CompressionStream = useCompressionStream && CodecStreamNative ? CodecStreamNative : CodecStream;\n\t\treadable = pipeThrough(readable, new CompressionStream(COMPRESSION_FORMAT, options));\n\t} catch (error) {\n\t\tif (useCompressionStream) {\n\t\t\treadable = pipeThrough(readable, new CodecStream(COMPRESSION_FORMAT, options));\n\t\t} else {\n\t\t\tthrow error;\n\t\t}\n\t}\n\treturn readable;\n}\n\nfunction pipeThrough(readable, transformStream) {\n\treturn readable.pipeThrough(transformStream);\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/*\n * This program is based on JZlib 1.0.2 ymnk, JCraft,Inc.\n * JZlib is based on zlib-1.1.3, so all credit should go authors\n * Jean-loup Gailly(jloup@gzip.org) and Mark Adler(madler@alumni.caltech.edu)\n * and contributors of zlib.\n */\n\n/* global TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE,\n\tERR_ABORT_CHECK_PASSWORD,\n\tInflateStream,\n\tDeflateStream\n} from \"./zip-entry-stream.js\";\n\nconst MESSAGE_EVENT_TYPE = \"message\";\nconst MESSAGE_START = \"start\";\nconst MESSAGE_PULL = \"pull\";\nconst MESSAGE_DATA = \"data\";\nconst MESSAGE_ACK_DATA = \"ack\";\nconst MESSAGE_CLOSE = \"close\";\nconst CODEC_DEFLATE = \"deflate\";\nconst CODEC_INFLATE = \"inflate\";\n\nexport {\n\tCODEC_DEFLATE,\n\tCODEC_INFLATE,\n\tMESSAGE_EVENT_TYPE,\n\tMESSAGE_START,\n\tMESSAGE_PULL,\n\tMESSAGE_DATA,\n\tMESSAGE_ACK_DATA,\n\tMESSAGE_CLOSE,\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE,\n\tERR_ABORT_CHECK_PASSWORD,\n\tCodecStream\n};\n\nclass CodecStream extends TransformStream {\n\n\tconstructor(options, config) {\n\t\tsuper({});\n\t\tconst codec = this;\n\t\tconst { codecType } = options;\n\t\tlet Stream;\n\t\tif (codecType.startsWith(CODEC_DEFLATE)) {\n\t\t\tStream = DeflateStream;\n\t\t} else if (codecType.startsWith(CODEC_INFLATE)) {\n\t\t\tStream = InflateStream;\n\t\t}\n\t\tlet size = 0;\n\t\tconst stream = new Stream(options, config);\n\t\tconst readable = super.readable;\n\t\tconst transformStream = new TransformStream({\n\t\t\ttransform(chunk, controller) {\n\t\t\t\tif (chunk && chunk.length) {\n\t\t\t\t\tsize += chunk.length;\n\t\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t\t}\n\t\t\t},\n\t\t\tflush() {\n\t\t\t\tconst { signature } = stream;\n\t\t\t\tObject.assign(codec, {\n\t\t\t\t\tsignature,\n\t\t\t\t\tsize\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(codec, \"readable\", {\n\t\t\tget() {\n\t\t\t\treturn readable.pipeThrough(stream).pipeThrough(transformStream);\n\t\t\t}\n\t\t});\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global Worker, URL, TransformStream, WritableStream */\n\nimport {\n\tUNDEFINED_TYPE,\n\tFUNCTION_TYPE\n} from \"./constants.js\";\nimport {\n\tCodecStream,\n\tMESSAGE_EVENT_TYPE,\n\tMESSAGE_START,\n\tMESSAGE_PULL,\n\tMESSAGE_DATA,\n\tMESSAGE_ACK_DATA,\n\tMESSAGE_CLOSE\n} from \"./streams/codec-stream.js\";\n\n// deno-lint-ignore valid-typeof\nconst WEB_WORKERS_SUPPORTED = typeof Worker != UNDEFINED_TYPE;\n\nexport {\n\tCodecWorker\n};\n\nclass CodecWorker {\n\n\tconstructor(workerData, { readable, writable }, { options, config, streamOptions, useWebWorkers, transferStreams, scripts }, onTaskFinished) {\n\t\tconst { signal } = streamOptions;\n\t\tObject.assign(workerData, {\n\t\t\tbusy: true,\n\t\t\treadable: readable.pipeThrough(new ProgressWatcherStream(readable, streamOptions, config), { signal }),\n\t\t\twritable,\n\t\t\toptions: Object.assign({}, options),\n\t\t\tscripts,\n\t\t\ttransferStreams,\n\t\t\tterminate() {\n\t\t\t\tconst { worker, busy } = workerData;\n\t\t\t\tif (worker && !busy) {\n\t\t\t\t\tworker.terminate();\n\t\t\t\t\tworkerData.interface = null;\n\t\t\t\t}\n\t\t\t},\n\t\t\tonTaskFinished() {\n\t\t\t\tworkerData.busy = false;\n\t\t\t\tonTaskFinished(workerData);\n\t\t\t}\n\t\t});\n\t\treturn (useWebWorkers && WEB_WORKERS_SUPPORTED ? createWebWorkerInterface : createWorkerInterface)(workerData, config);\n\t}\n}\n\nclass ProgressWatcherStream extends TransformStream {\n\n\tconstructor(readableSource, { onstart, onprogress, size, onend }, { chunkSize }) {\n\t\tlet chunkOffset = 0;\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tif (onstart) {\n\t\t\t\t\tcallHandler(onstart, size);\n\t\t\t\t}\n\t\t\t},\n\t\t\tasync transform(chunk, controller) {\n\t\t\t\tchunkOffset += chunk.length;\n\t\t\t\tif (onprogress) {\n\t\t\t\t\tawait callHandler(onprogress, chunkOffset, size);\n\t\t\t\t}\n\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t},\n\t\t\tflush() {\n\t\t\t\treadableSource.size = chunkOffset;\n\t\t\t\tif (onend) {\n\t\t\t\t\tcallHandler(onend, chunkOffset);\n\t\t\t\t}\n\t\t\t}\n\t\t}, { highWaterMark: 1, size: () => chunkSize });\n\t}\n}\n\nasync function callHandler(handler, ...parameters) {\n\ttry {\n\t\tawait handler(...parameters);\n\t} catch (_error) {\n\t\t// ignored\n\t}\n}\n\nfunction createWorkerInterface(workerData, config) {\n\treturn {\n\t\trun: () => runWorker(workerData, config)\n\t};\n}\n\nfunction createWebWorkerInterface(workerData, { baseURL, chunkSize }) {\n\tif (!workerData.interface) {\n\t\tObject.assign(workerData, {\n\t\t\tworker: getWebWorker(workerData.scripts[0], baseURL, workerData),\n\t\t\tinterface: {\n\t\t\t\trun: () => runWebWorker(workerData, { chunkSize })\n\t\t\t}\n\t\t});\n\t}\n\treturn workerData.interface;\n}\n\nasync function runWorker({ options, readable, writable, onTaskFinished }, config) {\n\tconst codecStream = new CodecStream(options, config);\n\ttry {\n\t\tawait readable.pipeThrough(codecStream).pipeTo(writable, { preventClose: true, preventAbort: true });\n\t\tconst {\n\t\t\tsignature,\n\t\t\tsize\n\t\t} = codecStream;\n\t\treturn {\n\t\t\tsignature,\n\t\t\tsize\n\t\t};\n\t} finally {\n\t\tonTaskFinished();\n\t}\n}\n\nasync function runWebWorker(workerData, config) {\n\tlet resolveResult, rejectResult;\n\tconst result = new Promise((resolve, reject) => {\n\t\tresolveResult = resolve;\n\t\trejectResult = reject;\n\t});\n\tObject.assign(workerData, {\n\t\treader: null,\n\t\twriter: null,\n\t\tresolveResult,\n\t\trejectResult,\n\t\tresult\n\t});\n\tconst { readable, options, scripts } = workerData;\n\tconst { writable, closed } = watchClosedStream(workerData.writable);\n\tconst streamsTransferred = sendMessage({\n\t\ttype: MESSAGE_START,\n\t\tscripts: scripts.slice(1),\n\t\toptions,\n\t\tconfig,\n\t\treadable,\n\t\twritable\n\t}, workerData);\n\tif (!streamsTransferred) {\n\t\tObject.assign(workerData, {\n\t\t\treader: readable.getReader(),\n\t\t\twriter: writable.getWriter()\n\t\t});\n\t}\n\tconst resultValue = await result;\n\ttry {\n\t\tawait writable.close();\n\t} catch (_error) {\n\t\t// ignored\n\t}\n\tawait closed;\n\treturn resultValue;\n}\n\nfunction watchClosedStream(writableSource) {\n\tconst writer = writableSource.getWriter();\n\tlet resolveStreamClosed;\n\tconst closed = new Promise(resolve => resolveStreamClosed = resolve);\n\tconst writable = new WritableStream({\n\t\tasync write(chunk) {\n\t\t\tawait writer.ready;\n\t\t\tawait writer.write(chunk);\n\t\t},\n\t\tclose() {\n\t\t\twriter.releaseLock();\n\t\t\tresolveStreamClosed();\n\t\t},\n\t\tabort(reason) {\n\t\t\treturn writer.abort(reason);\n\t\t}\n\t});\n\treturn { writable, closed };\n}\n\nlet classicWorkersSupported = true;\nlet transferStreamsSupported = true;\n\nfunction getWebWorker(url, baseURL, workerData) {\n\tconst workerOptions = { type: \"module\" };\n\tlet scriptUrl, worker;\n\t// deno-lint-ignore valid-typeof\n\tif (typeof url == FUNCTION_TYPE) {\n\t\turl = url();\n\t}\n\ttry {\n\t\tscriptUrl = new URL(url, baseURL);\n\t} catch (_error) {\n\t\tscriptUrl = url;\n\t}\n\tif (classicWorkersSupported) {\n\t\ttry {\n\t\t\tworker = new Worker(scriptUrl);\n\t\t} catch (_error) {\n\t\t\tclassicWorkersSupported = false;\n\t\t\tworker = new Worker(scriptUrl, workerOptions);\n\t\t}\n\t} else {\n\t\tworker = new Worker(scriptUrl, workerOptions);\n\t}\n\tworker.addEventListener(MESSAGE_EVENT_TYPE, event => onMessage(event, workerData));\n\treturn worker;\n}\n\nfunction sendMessage(message, { worker, writer, onTaskFinished, transferStreams }) {\n\ttry {\n\t\tlet { value, readable, writable } = message;\n\t\tconst transferables = [];\n\t\tif (value) {\n\t\t\tconst { buffer, length } = value;\n\t\t\tif (length != buffer.byteLength) {\n\t\t\t\tvalue = new Uint8Array(value);\n\t\t\t}\n\t\t\tmessage.value = value.buffer;\n\t\t\ttransferables.push(message.value);\n\t\t}\n\t\tif (transferStreams && transferStreamsSupported) {\n\t\t\tif (readable) {\n\t\t\t\ttransferables.push(readable);\n\t\t\t}\n\t\t\tif (writable) {\n\t\t\t\ttransferables.push(writable);\n\t\t\t}\n\t\t} else {\n\t\t\tmessage.readable = message.writable = null;\n\t\t}\n\t\tif (transferables.length) {\n\t\t\ttry {\n\t\t\t\tworker.postMessage(message, transferables);\n\t\t\t\treturn true;\n\t\t\t} catch (_error) {\n\t\t\t\ttransferStreamsSupported = false;\n\t\t\t\tmessage.readable = message.writable = null;\n\t\t\t\tworker.postMessage(message);\n\t\t\t}\n\t\t} else {\n\t\t\tworker.postMessage(message);\n\t\t}\n\t} catch (error) {\n\t\tif (writer) {\n\t\t\twriter.releaseLock();\n\t\t}\n\t\tonTaskFinished();\n\t\tthrow error;\n\t}\n}\n\nasync function onMessage({ data }, workerData) {\n\tconst { type, value, messageId, result, error } = data;\n\tconst { reader, writer, resolveResult, rejectResult, onTaskFinished } = workerData;\n\ttry {\n\t\tif (error) {\n\t\t\tconst { message, stack, code, name } = error;\n\t\t\tconst responseError = new Error(message);\n\t\t\tObject.assign(responseError, { stack, code, name });\n\t\t\tclose(responseError);\n\t\t} else {\n\t\t\tif (type == MESSAGE_PULL) {\n\t\t\t\tconst { value, done } = await reader.read();\n\t\t\t\tsendMessage({ type: MESSAGE_DATA, value, done, messageId }, workerData);\n\t\t\t}\n\t\t\tif (type == MESSAGE_DATA) {\n\t\t\t\tawait writer.ready;\n\t\t\t\tawait writer.write(new Uint8Array(value));\n\t\t\t\tsendMessage({ type: MESSAGE_ACK_DATA, messageId }, workerData);\n\t\t\t}\n\t\t\tif (type == MESSAGE_CLOSE) {\n\t\t\t\tclose(null, result);\n\t\t\t}\n\t\t}\n\t} catch (error) {\n\t\tclose(error);\n\t}\n\n\tfunction close(error, result) {\n\t\tif (error) {\n\t\t\trejectResult(error);\n\t\t} else {\n\t\t\tresolveResult(result);\n\t\t}\n\t\tif (writer) {\n\t\t\twriter.releaseLock();\n\t\t}\n\t\tonTaskFinished();\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global setTimeout, clearTimeout */\n\nimport { UNDEFINED_VALUE } from \"./constants.js\";\nimport {\n\tCODEC_INFLATE,\n\tCODEC_DEFLATE,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD,\n\tERR_ABORT_CHECK_PASSWORD\n} from \"./streams/codec-stream.js\";\nimport { CodecWorker } from \"./codec-worker.js\";\n\nlet pool = [];\nconst pendingRequests = [];\n\nexport {\n\trunWorker,\n\tterminateWorkers,\n\tCODEC_DEFLATE,\n\tCODEC_INFLATE,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD,\n\tERR_ABORT_CHECK_PASSWORD\n};\n\nlet indexWorker = 0;\n\nasync function runWorker(stream, workerOptions) {\n\tconst { options, config } = workerOptions;\n\tconst { transferStreams, useWebWorkers, useCompressionStream, codecType, compressed, signed, encrypted } = options;\n\tconst { workerScripts, maxWorkers, terminateWorkerTimeout } = config;\n\tworkerOptions.transferStreams = transferStreams || transferStreams === UNDEFINED_VALUE;\n\tconst streamCopy = !compressed && !signed && !encrypted && !workerOptions.transferStreams;\n\tworkerOptions.useWebWorkers = !streamCopy && (useWebWorkers || (useWebWorkers === UNDEFINED_VALUE && config.useWebWorkers));\n\tworkerOptions.scripts = workerOptions.useWebWorkers && workerScripts ? workerScripts[codecType] : [];\n\toptions.useCompressionStream = useCompressionStream || (useCompressionStream === UNDEFINED_VALUE && config.useCompressionStream);\n\tlet worker;\n\tconst workerData = pool.find(workerData => !workerData.busy);\n\tif (workerData) {\n\t\tclearTerminateTimeout(workerData);\n\t\tworker = new CodecWorker(workerData, stream, workerOptions, onTaskFinished);\n\t} else if (pool.length < maxWorkers) {\n\t\tconst workerData = { indexWorker };\n\t\tindexWorker++;\n\t\tpool.push(workerData);\n\t\tworker = new CodecWorker(workerData, stream, workerOptions, onTaskFinished);\n\t} else {\n\t\tworker = await new Promise(resolve => pendingRequests.push({ resolve, stream, workerOptions }));\n\t}\n\treturn worker.run();\n\n\tfunction onTaskFinished(workerData) {\n\t\tif (pendingRequests.length) {\n\t\t\tconst [{ resolve, stream, workerOptions }] = pendingRequests.splice(0, 1);\n\t\t\tresolve(new CodecWorker(workerData, stream, workerOptions, onTaskFinished));\n\t\t} else if (workerData.worker) {\n\t\t\tclearTerminateTimeout(workerData);\n\t\t\tif (Number.isFinite(terminateWorkerTimeout) && terminateWorkerTimeout >= 0) {\n\t\t\t\tworkerData.terminateTimeout = setTimeout(() => {\n\t\t\t\t\tpool = pool.filter(data => data != workerData);\n\t\t\t\t\tworkerData.terminate();\n\t\t\t\t}, terminateWorkerTimeout);\n\t\t\t}\n\t\t} else {\n\t\t\tpool = pool.filter(data => data != workerData);\n\t\t}\n\t}\n}\n\nfunction clearTerminateTimeout(workerData) {\n\tconst { terminateTimeout } = workerData;\n\tif (terminateTimeout) {\n\t\tclearTimeout(terminateTimeout);\n\t\tworkerData.terminateTimeout = null;\n\t}\n}\n\nfunction terminateWorkers() {\n\tpool.forEach(workerData => {\n\t\tclearTerminateTimeout(workerData);\n\t\tworkerData.terminate();\n\t});\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global Blob, atob, btoa, XMLHttpRequest, URL, fetch, ReadableStream, WritableStream, FileReader, TransformStream, Response */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tUNDEFINED_VALUE,\n\tFUNCTION_TYPE\n} from \"./constants.js\";\nimport { getConfiguration } from \"./configuration.js\";\n\nconst ERR_HTTP_STATUS = \"HTTP error \";\nconst ERR_HTTP_RANGE = \"HTTP Range not supported\";\nconst ERR_ITERATOR_COMPLETED_TOO_SOON = \"Writer iterator completed too soon\";\n\nconst CONTENT_TYPE_TEXT_PLAIN = \"text/plain\";\nconst HTTP_HEADER_CONTENT_LENGTH = \"Content-Length\";\nconst HTTP_HEADER_CONTENT_RANGE = \"Content-Range\";\nconst HTTP_HEADER_ACCEPT_RANGES = \"Accept-Ranges\";\nconst HTTP_HEADER_RANGE = \"Range\";\nconst HTTP_HEADER_CONTENT_TYPE = \"Content-Type\";\nconst HTTP_METHOD_HEAD = \"HEAD\";\nconst HTTP_METHOD_GET = \"GET\";\nconst HTTP_RANGE_UNIT = \"bytes\";\nconst DEFAULT_CHUNK_SIZE = 64 * 1024;\n\nconst PROPERTY_NAME_WRITABLE = \"writable\";\n\nclass Stream {\n\n\tconstructor() {\n\t\tthis.size = 0;\n\t}\n\n\tinit() {\n\t\tthis.initialized = true;\n\t}\n}\n\nclass Reader extends Stream {\n\n\tget readable() {\n\t\tconst reader = this;\n\t\tconst { chunkSize = DEFAULT_CHUNK_SIZE } = reader;\n\t\tconst readable = new ReadableStream({\n\t\t\tstart() {\n\t\t\t\tthis.chunkOffset = 0;\n\t\t\t},\n\t\t\tasync pull(controller) {\n\t\t\t\tconst { offset = 0, size, diskNumberStart } = readable;\n\t\t\t\tconst { chunkOffset } = this;\n\t\t\t\tcontroller.enqueue(await readUint8Array(reader, offset + chunkOffset, Math.min(chunkSize, size - chunkOffset), diskNumberStart));\n\t\t\t\tif (chunkOffset + chunkSize > size) {\n\t\t\t\t\tcontroller.close();\n\t\t\t\t} else {\n\t\t\t\t\tthis.chunkOffset += chunkSize;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\treturn readable;\n\t}\n}\n\nclass Writer extends Stream {\n\n\tconstructor() {\n\t\tsuper();\n\t\tconst writer = this;\n\t\tconst writable = new WritableStream({\n\t\t\twrite(chunk) {\n\t\t\t\treturn writer.writeUint8Array(chunk);\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(writer, PROPERTY_NAME_WRITABLE, {\n\t\t\tget() {\n\t\t\t\treturn writable;\n\t\t\t}\n\t\t});\n\t}\n\n\twriteUint8Array() {\n\t\t// abstract\n\t}\n}\n\nclass Data64URIReader extends Reader {\n\n\tconstructor(dataURI) {\n\t\tsuper();\n\t\tlet dataEnd = dataURI.length;\n\t\twhile (dataURI.charAt(dataEnd - 1) == \"=\") {\n\t\t\tdataEnd--;\n\t\t}\n\t\tconst dataStart = dataURI.indexOf(\",\") + 1;\n\t\tObject.assign(this, {\n\t\t\tdataURI,\n\t\t\tdataStart,\n\t\t\tsize: Math.floor((dataEnd - dataStart) * 0.75)\n\t\t});\n\t}\n\n\treadUint8Array(offset, length) {\n\t\tconst {\n\t\t\tdataStart,\n\t\t\tdataURI\n\t\t} = this;\n\t\tconst dataArray = new Uint8Array(length);\n\t\tconst start = Math.floor(offset / 3) * 4;\n\t\tconst bytes = atob(dataURI.substring(start + dataStart, Math.ceil((offset + length) / 3) * 4 + dataStart));\n\t\tconst delta = offset - Math.floor(start / 4) * 3;\n\t\tfor (let indexByte = delta; indexByte < delta + length; indexByte++) {\n\t\t\tdataArray[indexByte - delta] = bytes.charCodeAt(indexByte);\n\t\t}\n\t\treturn dataArray;\n\t}\n}\n\nclass Data64URIWriter extends Writer {\n\n\tconstructor(contentType) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\tdata: \"data:\" + (contentType || \"\") + \";base64,\",\n\t\t\tpending: []\n\t\t});\n\t}\n\n\twriteUint8Array(array) {\n\t\tconst writer = this;\n\t\tlet indexArray = 0;\n\t\tlet dataString = writer.pending;\n\t\tconst delta = writer.pending.length;\n\t\twriter.pending = \"\";\n\t\tfor (indexArray = 0; indexArray < (Math.floor((delta + array.length) / 3) * 3) - delta; indexArray++) {\n\t\t\tdataString += String.fromCharCode(array[indexArray]);\n\t\t}\n\t\tfor (; indexArray < array.length; indexArray++) {\n\t\t\twriter.pending += String.fromCharCode(array[indexArray]);\n\t\t}\n\t\tif (dataString.length > 2) {\n\t\t\twriter.data += btoa(dataString);\n\t\t} else {\n\t\t\twriter.pending = dataString;\n\t\t}\n\t}\n\n\tgetData() {\n\t\treturn this.data + btoa(this.pending);\n\t}\n}\n\nclass BlobReader extends Reader {\n\n\tconstructor(blob) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\tblob,\n\t\t\tsize: blob.size\n\t\t});\n\t}\n\n\tasync readUint8Array(offset, length) {\n\t\tconst reader = this;\n\t\tconst offsetEnd = offset + length;\n\t\tconst blob = offset || offsetEnd < reader.size ? reader.blob.slice(offset, offsetEnd) : reader.blob;\n\t\treturn new Uint8Array(await blob.arrayBuffer());\n\t}\n}\n\nclass BlobWriter extends Stream {\n\n\tconstructor(contentType) {\n\t\tsuper();\n\t\tconst writer = this;\n\t\tconst transformStream = new TransformStream();\n\t\tconst headers = [];\n\t\tif (contentType) {\n\t\t\theaders.push([HTTP_HEADER_CONTENT_TYPE, contentType]);\n\t\t}\n\t\tObject.defineProperty(writer, PROPERTY_NAME_WRITABLE, {\n\t\t\tget() {\n\t\t\t\treturn transformStream.writable;\n\t\t\t}\n\t\t});\n\t\twriter.blob = new Response(transformStream.readable, { headers }).blob();\n\t}\n\n\tgetData() {\n\t\treturn this.blob;\n\t}\n}\n\nclass TextReader extends BlobReader {\n\n\tconstructor(text) {\n\t\tsuper(new Blob([text], { type: CONTENT_TYPE_TEXT_PLAIN }));\n\t}\n}\n\nclass TextWriter extends BlobWriter {\n\n\tconstructor(encoding) {\n\t\tsuper(encoding);\n\t\tObject.assign(this, {\n\t\t\tencoding,\n\t\t\tutf8: !encoding || encoding.toLowerCase() == \"utf-8\"\n\t\t});\n\t}\n\n\tasync getData() {\n\t\tconst {\n\t\t\tencoding,\n\t\t\tutf8\n\t\t} = this;\n\t\tconst blob = await super.getData();\n\t\tif (blob.text && utf8) {\n\t\t\treturn blob.text();\n\t\t} else {\n\t\t\tconst reader = new FileReader();\n\t\t\treturn new Promise((resolve, reject) => {\n\t\t\t\tObject.assign(reader, {\n\t\t\t\t\tonload: ({ target }) => resolve(target.result),\n\t\t\t\t\tonerror: () => reject(reader.error)\n\t\t\t\t});\n\t\t\t\treader.readAsText(blob, encoding);\n\t\t\t});\n\t\t}\n\t}\n}\n\nclass FetchReader extends Reader {\n\n\tconstructor(url, options) {\n\t\tsuper();\n\t\tcreateHtpReader(this, url, options);\n\t}\n\n\tasync init() {\n\t\tawait initHttpReader(this, sendFetchRequest, getFetchRequestData);\n\t\tsuper.init();\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn readUint8ArrayHttpReader(this, index, length, sendFetchRequest, getFetchRequestData);\n\t}\n}\n\nclass XHRReader extends Reader {\n\n\tconstructor(url, options) {\n\t\tsuper();\n\t\tcreateHtpReader(this, url, options);\n\t}\n\n\tasync init() {\n\t\tawait initHttpReader(this, sendXMLHttpRequest, getXMLHttpRequestData);\n\t\tsuper.init();\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn readUint8ArrayHttpReader(this, index, length, sendXMLHttpRequest, getXMLHttpRequestData);\n\t}\n}\n\nfunction createHtpReader(httpReader, url, options) {\n\tconst {\n\t\tpreventHeadRequest,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests\n\t} = options;\n\toptions = Object.assign({}, options);\n\tdelete options.preventHeadRequest;\n\tdelete options.useRangeHeader;\n\tdelete options.forceRangeRequests;\n\tdelete options.useXHR;\n\tObject.assign(httpReader, {\n\t\turl,\n\t\toptions,\n\t\tpreventHeadRequest,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests\n\t});\n}\n\nasync function initHttpReader(httpReader, sendRequest, getRequestData) {\n\tconst {\n\t\turl,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests\n\t} = httpReader;\n\tif (isHttpFamily(url) && (useRangeHeader || forceRangeRequests)) {\n\t\tconst { headers } = await sendRequest(HTTP_METHOD_GET, httpReader, getRangeHeaders(httpReader));\n\t\tif (!forceRangeRequests && headers.get(HTTP_HEADER_ACCEPT_RANGES) != HTTP_RANGE_UNIT) {\n\t\t\tthrow new Error(ERR_HTTP_RANGE);\n\t\t} else {\n\t\t\tlet contentSize;\n\t\t\tconst contentRangeHeader = headers.get(HTTP_HEADER_CONTENT_RANGE);\n\t\t\tif (contentRangeHeader) {\n\t\t\t\tconst splitHeader = contentRangeHeader.trim().split(/\\s*\\/\\s*/);\n\t\t\t\tif (splitHeader.length) {\n\t\t\t\t\tconst headerValue = splitHeader[1];\n\t\t\t\t\tif (headerValue && headerValue != \"*\") {\n\t\t\t\t\t\tcontentSize = Number(headerValue);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (contentSize === UNDEFINED_VALUE) {\n\t\t\t\tawait getContentLength(httpReader, sendRequest, getRequestData);\n\t\t\t} else {\n\t\t\t\thttpReader.size = contentSize;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tawait getContentLength(httpReader, sendRequest, getRequestData);\n\t}\n}\n\nasync function readUint8ArrayHttpReader(httpReader, index, length, sendRequest, getRequestData) {\n\tconst {\n\t\tuseRangeHeader,\n\t\tforceRangeRequests,\n\t\toptions\n\t} = httpReader;\n\tif (useRangeHeader || forceRangeRequests) {\n\t\tconst response = await sendRequest(HTTP_METHOD_GET, httpReader, getRangeHeaders(httpReader, index, length));\n\t\tif (response.status != 206) {\n\t\t\tthrow new Error(ERR_HTTP_RANGE);\n\t\t}\n\t\treturn new Uint8Array(await response.arrayBuffer());\n\t} else {\n\t\tconst { data } = httpReader;\n\t\tif (!data) {\n\t\t\tawait getRequestData(httpReader, options);\n\t\t}\n\t\treturn new Uint8Array(httpReader.data.subarray(index, index + length));\n\t}\n}\n\nfunction getRangeHeaders(httpReader, index = 0, length = 1) {\n\treturn Object.assign({}, getHeaders(httpReader), { [HTTP_HEADER_RANGE]: HTTP_RANGE_UNIT + \"=\" + index + \"-\" + (index + length - 1) });\n}\n\nfunction getHeaders({ options }) {\n\tconst { headers } = options;\n\tif (headers) {\n\t\tif (Symbol.iterator in headers) {\n\t\t\treturn Object.fromEntries(headers);\n\t\t} else {\n\t\t\treturn headers;\n\t\t}\n\t}\n}\n\nasync function getFetchRequestData(httpReader) {\n\tawait getRequestData(httpReader, sendFetchRequest);\n}\n\nasync function getXMLHttpRequestData(httpReader) {\n\tawait getRequestData(httpReader, sendXMLHttpRequest);\n}\n\nasync function getRequestData(httpReader, sendRequest) {\n\tconst response = await sendRequest(HTTP_METHOD_GET, httpReader, getHeaders(httpReader));\n\thttpReader.data = new Uint8Array(await response.arrayBuffer());\n\tif (!httpReader.size) {\n\t\thttpReader.size = httpReader.data.length;\n\t}\n}\n\nasync function getContentLength(httpReader, sendRequest, getRequestData) {\n\tif (httpReader.preventHeadRequest) {\n\t\tawait getRequestData(httpReader, httpReader.options);\n\t} else {\n\t\tconst response = await sendRequest(HTTP_METHOD_HEAD, httpReader, getHeaders(httpReader));\n\t\tconst contentLength = response.headers.get(HTTP_HEADER_CONTENT_LENGTH);\n\t\tif (contentLength) {\n\t\t\thttpReader.size = Number(contentLength);\n\t\t} else {\n\t\t\tawait getRequestData(httpReader, httpReader.options);\n\t\t}\n\t}\n}\n\nasync function sendFetchRequest(method, { options, url }, headers) {\n\tconst response = await fetch(url, Object.assign({}, options, { method, headers }));\n\tif (response.status < 400) {\n\t\treturn response;\n\t} else {\n\t\tthrow response.status == 416 ? new Error(ERR_HTTP_RANGE) : new Error(ERR_HTTP_STATUS + (response.statusText || response.status));\n\t}\n}\n\nfunction sendXMLHttpRequest(method, { url }, headers) {\n\treturn new Promise((resolve, reject) => {\n\t\tconst request = new XMLHttpRequest();\n\t\trequest.addEventListener(\"load\", () => {\n\t\t\tif (request.status < 400) {\n\t\t\t\tconst headers = [];\n\t\t\t\trequest.getAllResponseHeaders().trim().split(/[\\r\\n]+/).forEach(header => {\n\t\t\t\t\tconst splitHeader = header.trim().split(/\\s*:\\s*/);\n\t\t\t\t\tsplitHeader[0] = splitHeader[0].trim().replace(/^[a-z]|-[a-z]/g, value => value.toUpperCase());\n\t\t\t\t\theaders.push(splitHeader);\n\t\t\t\t});\n\t\t\t\tresolve({\n\t\t\t\t\tstatus: request.status,\n\t\t\t\t\tarrayBuffer: () => request.response,\n\t\t\t\t\theaders: new Map(headers)\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\treject(request.status == 416 ? new Error(ERR_HTTP_RANGE) : new Error(ERR_HTTP_STATUS + (request.statusText || request.status)));\n\t\t\t}\n\t\t}, false);\n\t\trequest.addEventListener(\"error\", event => reject(event.detail.error), false);\n\t\trequest.open(method, url);\n\t\tif (headers) {\n\t\t\tfor (const entry of Object.entries(headers)) {\n\t\t\t\trequest.setRequestHeader(entry[0], entry[1]);\n\t\t\t}\n\t\t}\n\t\trequest.responseType = \"arraybuffer\";\n\t\trequest.send();\n\t});\n}\n\nclass HttpReader extends Reader {\n\n\tconstructor(url, options = {}) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\turl,\n\t\t\treader: options.useXHR ? new XHRReader(url, options) : new FetchReader(url, options)\n\t\t});\n\t}\n\n\tset size(value) {\n\t\t// ignored\n\t}\n\n\tget size() {\n\t\treturn this.reader.size;\n\t}\n\n\tasync init() {\n\t\tawait this.reader.init();\n\t\tsuper.init();\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn this.reader.readUint8Array(index, length);\n\t}\n}\n\nclass HttpRangeReader extends HttpReader {\n\n\tconstructor(url, options = {}) {\n\t\toptions.useRangeHeader = true;\n\t\tsuper(url, options);\n\t}\n}\n\n\nclass Uint8ArrayReader extends Reader {\n\n\tconstructor(array) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\tarray,\n\t\t\tsize: array.length\n\t\t});\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn this.array.slice(index, index + length);\n\t}\n}\n\nclass Uint8ArrayWriter extends Writer {\n\n\tinit(initSize = 0) {\n\t\tObject.assign(this, {\n\t\t\toffset: 0,\n\t\t\tarray: new Uint8Array(initSize)\n\t\t});\n\t\tsuper.init();\n\t}\n\n\twriteUint8Array(array) {\n\t\tconst writer = this;\n\t\tif (writer.offset + array.length > writer.array.length) {\n\t\t\tconst previousArray = writer.array;\n\t\t\twriter.array = new Uint8Array(previousArray.length + array.length);\n\t\t\twriter.array.set(previousArray);\n\t\t}\n\t\twriter.array.set(array, writer.offset);\n\t\twriter.offset += array.length;\n\t}\n\n\tgetData() {\n\t\treturn this.array;\n\t}\n}\n\nclass SplitDataReader extends Reader {\n\n\tconstructor(readers) {\n\t\tsuper();\n\t\tthis.readers = readers;\n\t}\n\n\tasync init() {\n\t\tconst reader = this;\n\t\tconst { readers } = reader;\n\t\treader.lastDiskNumber = 0;\n\t\tawait Promise.all(readers.map(async diskReader => {\n\t\t\tawait diskReader.init();\n\t\t\treader.size += diskReader.size;\n\t\t}));\n\t\tsuper.init();\n\t}\n\n\tasync readUint8Array(offset, length, diskNumber = 0) {\n\t\tconst reader = this;\n\t\tconst { readers } = this;\n\t\tlet result;\n\t\tlet currentDiskNumber = diskNumber;\n\t\tif (currentDiskNumber == -1) {\n\t\t\tcurrentDiskNumber = readers.length - 1;\n\t\t}\n\t\tlet currentReaderOffset = offset;\n\t\twhile (currentReaderOffset >= readers[currentDiskNumber].size) {\n\t\t\tcurrentReaderOffset -= readers[currentDiskNumber].size;\n\t\t\tcurrentDiskNumber++;\n\t\t}\n\t\tconst currentReader = readers[currentDiskNumber];\n\t\tconst currentReaderSize = currentReader.size;\n\t\tif (currentReaderOffset + length <= currentReaderSize) {\n\t\t\tresult = await readUint8Array(currentReader, currentReaderOffset, length);\n\t\t} else {\n\t\t\tconst chunkLength = currentReaderSize - currentReaderOffset;\n\t\t\tresult = new Uint8Array(length);\n\t\t\tresult.set(await readUint8Array(currentReader, currentReaderOffset, chunkLength));\n\t\t\tresult.set(await reader.readUint8Array(offset + chunkLength, length - chunkLength, diskNumber), chunkLength);\n\t\t}\n\t\treader.lastDiskNumber = Math.max(currentDiskNumber, reader.lastDiskNumber);\n\t\treturn result;\n\t}\n}\n\nclass SplitDataWriter extends Stream {\n\n\tconstructor(writerGenerator, maxSize = 4294967295) {\n\t\tsuper();\n\t\tconst zipWriter = this;\n\t\tObject.assign(zipWriter, {\n\t\t\tdiskNumber: 0,\n\t\t\tdiskOffset: 0,\n\t\t\tsize: 0,\n\t\t\tmaxSize,\n\t\t\tavailableSize: maxSize\n\t\t});\n\t\tlet diskSourceWriter, diskWritable, diskWriter;\n\t\tconst writable = new WritableStream({\n\t\t\tasync write(chunk) {\n\t\t\t\tconst { availableSize } = zipWriter;\n\t\t\t\tif (!diskWriter) {\n\t\t\t\t\tconst { value, done } = await writerGenerator.next();\n\t\t\t\t\tif (done && !value) {\n\t\t\t\t\t\tthrow new Error(ERR_ITERATOR_COMPLETED_TOO_SOON);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdiskSourceWriter = value;\n\t\t\t\t\t\tdiskSourceWriter.size = 0;\n\t\t\t\t\t\tif (diskSourceWriter.maxSize) {\n\t\t\t\t\t\t\tzipWriter.maxSize = diskSourceWriter.maxSize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tzipWriter.availableSize = zipWriter.maxSize;\n\t\t\t\t\t\tawait initStream(diskSourceWriter);\n\t\t\t\t\t\tdiskWritable = value.writable;\n\t\t\t\t\t\tdiskWriter = diskWritable.getWriter();\n\t\t\t\t\t}\n\t\t\t\t\tawait this.write(chunk);\n\t\t\t\t} else if (chunk.length >= availableSize) {\n\t\t\t\t\tawait writeChunk(chunk.slice(0, availableSize));\n\t\t\t\t\tawait closeDisk();\n\t\t\t\t\tzipWriter.diskOffset += diskSourceWriter.size;\n\t\t\t\t\tzipWriter.diskNumber++;\n\t\t\t\t\tdiskWriter = null;\n\t\t\t\t\tawait this.write(chunk.slice(availableSize));\n\t\t\t\t} else {\n\t\t\t\t\tawait writeChunk(chunk);\n\t\t\t\t}\n\t\t\t},\n\t\t\tasync close() {\n\t\t\t\tawait diskWriter.ready;\n\t\t\t\tawait closeDisk();\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(zipWriter, PROPERTY_NAME_WRITABLE, {\n\t\t\tget() {\n\t\t\t\treturn writable;\n\t\t\t}\n\t\t});\n\n\t\tasync function writeChunk(chunk) {\n\t\t\tconst chunkLength = chunk.length;\n\t\t\tif (chunkLength) {\n\t\t\t\tawait diskWriter.ready;\n\t\t\t\tawait diskWriter.write(chunk);\n\t\t\t\tdiskSourceWriter.size += chunkLength;\n\t\t\t\tzipWriter.size += chunkLength;\n\t\t\t\tzipWriter.availableSize -= chunkLength;\n\t\t\t}\n\t\t}\n\n\t\tasync function closeDisk() {\n\t\t\tdiskWritable.size = diskSourceWriter.size;\n\t\t\tawait diskWriter.close();\n\t\t}\n\t}\n}\n\nfunction isHttpFamily(url) {\n\tconst { baseURL } = getConfiguration();\n\tconst { protocol } = new URL(url, baseURL);\n\treturn protocol == \"http:\" || protocol == \"https:\";\n}\n\nasync function initStream(stream, initSize) {\n\tif (stream.init && !stream.initialized) {\n\t\tawait stream.init(initSize);\n\t}\n}\n\nfunction initReader(reader) {\n\tif (Array.isArray(reader)) {\n\t\treader = new SplitDataReader(reader);\n\t}\n\tif (reader instanceof ReadableStream) {\n\t\treader = {\n\t\t\treadable: reader\n\t\t};\n\t}\n\treturn reader;\n}\n\nfunction initWriter(writer) {\n\tif (writer.writable === UNDEFINED_VALUE && typeof writer.next == FUNCTION_TYPE) {\n\t\twriter = new SplitDataWriter(writer);\n\t}\n\tif (writer instanceof WritableStream) {\n\t\twriter = {\n\t\t\twritable: writer\n\t\t};\n\t}\n\tconst { writable } = writer;\n\tif (writable.size === UNDEFINED_VALUE) {\n\t\twritable.size = 0;\n\t}\n\tconst splitZipFile = writer instanceof SplitDataWriter;\n\tif (!splitZipFile) {\n\t\tObject.assign(writer, {\n\t\t\tdiskNumber: 0,\n\t\t\tdiskOffset: 0,\n\t\t\tavailableSize: Infinity,\n\t\t\tmaxSize: Infinity\n\t\t});\n\t}\n\treturn writer;\n}\n\nfunction readUint8Array(reader, offset, size, diskNumber) {\n\treturn reader.readUint8Array(offset, size, diskNumber);\n}\n\nconst SplitZipReader = SplitDataReader;\nconst SplitZipWriter = SplitDataWriter;\n\nexport {\n\tinitStream,\n\tinitReader,\n\tinitWriter,\n\treadUint8Array,\n\tReader,\n\tWriter,\n\tTextReader,\n\tTextWriter,\n\tData64URIReader,\n\tData64URIWriter,\n\tBlobReader,\n\tBlobWriter,\n\tUint8ArrayReader,\n\tUint8ArrayWriter,\n\tHttpReader,\n\tHttpRangeReader,\n\tSplitZipReader,\n\tSplitZipWriter,\n\tSplitDataReader,\n\tSplitDataWriter,\n\tERR_HTTP_RANGE,\n\tERR_ITERATOR_COMPLETED_TOO_SOON\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TextDecoder */\n\nconst CP437 = \"\\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\\\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ \".split(\"\");\nconst VALID_CP437 = CP437.length == 256;\n\nexport {\n\tdecodeCP437\n};\n\nfunction decodeCP437(stringValue) {\n\tif (VALID_CP437) {\n\t\tlet result = \"\";\n\t\tfor (let indexCharacter = 0; indexCharacter < stringValue.length; indexCharacter++) {\n\t\t\tresult += CP437[stringValue[indexCharacter]];\n\t\t}\n\t\treturn result;\n\t} else {\n\t\treturn new TextDecoder().decode(stringValue);\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TextDecoder */\n\nimport { decodeCP437 } from \"./cp437-decode.js\";\n\nexport {\n\tdecodeText\n};\n\nfunction decodeText(value, encoding) {\n\tif (encoding && encoding.trim().toLowerCase() == \"cp437\") {\n\t\treturn decodeCP437(value);\n\t} else {\n\t\treturn new TextDecoder(encoding).decode(value);\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nconst PROPERTY_NAME_FILENAME = \"filename\";\nconst PROPERTY_NAME_RAW_FILENAME = \"rawFilename\";\nconst PROPERTY_NAME_COMMENT = \"comment\";\nconst PROPERTY_NAME_RAW_COMMENT = \"rawComment\";\nconst PROPERTY_NAME_UNCOMPPRESSED_SIZE = \"uncompressedSize\";\nconst PROPERTY_NAME_COMPPRESSED_SIZE = \"compressedSize\";\nconst PROPERTY_NAME_OFFSET = \"offset\";\nconst PROPERTY_NAME_DISK_NUMBER_START = \"diskNumberStart\";\nconst PROPERTY_NAME_LAST_MODIFICATION_DATE = \"lastModDate\";\nconst PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE = \"rawLastModDate\";\nconst PROPERTY_NAME_LAST_ACCESS_DATE = \"lastAccessDate\";\nconst PROPERTY_NAME_RAW_LAST_ACCESS_DATE = \"rawLastAccessDate\";\nconst PROPERTY_NAME_CREATION_DATE = \"creationDate\";\nconst PROPERTY_NAME_RAW_CREATION_DATE = \"rawCreationDate\";\nconst PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE = \"internalFileAttribute\";\nconst PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE = \"externalFileAttribute\";\nconst PROPERTY_NAME_MS_DOS_COMPATIBLE = \"msDosCompatible\";\nconst PROPERTY_NAME_ZIP64 = \"zip64\";\n\nconst PROPERTY_NAMES = [\n\tPROPERTY_NAME_FILENAME, PROPERTY_NAME_RAW_FILENAME, PROPERTY_NAME_COMPPRESSED_SIZE, PROPERTY_NAME_UNCOMPPRESSED_SIZE,\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE, PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE, PROPERTY_NAME_COMMENT, PROPERTY_NAME_RAW_COMMENT,\n\tPROPERTY_NAME_LAST_ACCESS_DATE, PROPERTY_NAME_CREATION_DATE, PROPERTY_NAME_OFFSET, PROPERTY_NAME_DISK_NUMBER_START,\n\tPROPERTY_NAME_DISK_NUMBER_START, PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE, PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_MS_DOS_COMPATIBLE, PROPERTY_NAME_ZIP64,\n\t\"directory\", \"bitFlag\", \"encrypted\", \"signature\", \"filenameUTF8\", \"commentUTF8\", \"compressionMethod\", \"version\", \"versionMadeBy\",\n\t\"extraField\", \"rawExtraField\", \"extraFieldZip64\", \"extraFieldUnicodePath\", \"extraFieldUnicodeComment\", \"extraFieldAES\", \"extraFieldNTFS\",\n\t\"extraFieldExtendedTimestamp\"];\n\nclass Entry {\n\n\tconstructor(data) {\n\t\tPROPERTY_NAMES.forEach(name => this[name] = data[name]);\n\t}\n\n}\n\nexport {\n\tPROPERTY_NAME_FILENAME,\n\tPROPERTY_NAME_RAW_FILENAME,\n\tPROPERTY_NAME_COMMENT,\n\tPROPERTY_NAME_RAW_COMMENT,\n\tPROPERTY_NAME_UNCOMPPRESSED_SIZE,\n\tPROPERTY_NAME_COMPPRESSED_SIZE,\n\tPROPERTY_NAME_OFFSET,\n\tPROPERTY_NAME_DISK_NUMBER_START,\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_RAW_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_RAW_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_CREATION_DATE,\n\tPROPERTY_NAME_RAW_CREATION_DATE,\n\tPROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_MS_DOS_COMPATIBLE,\n\tPROPERTY_NAME_ZIP64,\n\tEntry\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global BigInt, Response, WritableStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tMAX_32_BITS,\n\tMAX_16_BITS,\n\tCOMPRESSION_METHOD_DEFLATE,\n\tCOMPRESSION_METHOD_STORE,\n\tCOMPRESSION_METHOD_AES,\n\tSPLIT_ZIP_FILE_SIGNATURE,\n\tLOCAL_FILE_HEADER_SIGNATURE,\n\tCENTRAL_FILE_HEADER_SIGNATURE,\n\tEND_OF_CENTRAL_DIR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_SIGNATURE,\n\tEXTRAFIELD_TYPE_ZIP64,\n\tEXTRAFIELD_TYPE_UNICODE_PATH,\n\tEXTRAFIELD_TYPE_UNICODE_COMMENT,\n\tEXTRAFIELD_TYPE_AES,\n\tEXTRAFIELD_TYPE_NTFS,\n\tEXTRAFIELD_TYPE_NTFS_TAG1,\n\tEXTRAFIELD_TYPE_EXTENDED_TIMESTAMP,\n\tEND_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LENGTH,\n\tBITFLAG_ENCRYPTED,\n\tBITFLAG_LEVEL,\n\tBITFLAG_DATA_DESCRIPTOR,\n\tBITFLAG_LANG_ENCODING_FLAG,\n\tFILE_ATTR_MSDOS_DIR_MASK,\n\tDIRECTORY_SIGNATURE,\n\tUNDEFINED_VALUE\n} from \"./constants.js\";\nimport {\n\tgetConfiguration,\n\tgetChunkSize\n} from \"./configuration.js\";\nimport {\n\trunWorker,\n\tCODEC_INFLATE,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD,\n\tERR_ABORT_CHECK_PASSWORD\n} from \"./codec-pool.js\";\nimport {\n\tinitStream,\n\tinitReader,\n\tinitWriter,\n\treadUint8Array,\n\tBlobReader\n} from \"./io.js\";\nimport { decodeText } from \"./util/decode-text.js\";\nimport { Crc32 } from \"./streams/codecs/crc32.js\";\nimport {\n\tPROPERTY_NAME_RAW_FILENAME,\n\tPROPERTY_NAME_FILENAME,\n\tPROPERTY_NAME_RAW_COMMENT,\n\tPROPERTY_NAME_COMMENT,\n\tPROPERTY_NAME_UNCOMPPRESSED_SIZE,\n\tPROPERTY_NAME_COMPPRESSED_SIZE,\n\tPROPERTY_NAME_OFFSET,\n\tPROPERTY_NAME_DISK_NUMBER_START,\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_RAW_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_RAW_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_CREATION_DATE,\n\tPROPERTY_NAME_RAW_CREATION_DATE,\n\tEntry\n} from \"./zip-entry.js\";\n\nconst ERR_BAD_FORMAT = \"File format is not recognized\";\nconst ERR_EOCDR_NOT_FOUND = \"End of central directory not found\";\nconst ERR_EOCDR_ZIP64_NOT_FOUND = \"End of Zip64 central directory not found\";\nconst ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND = \"End of Zip64 central directory locator not found\";\nconst ERR_CENTRAL_DIRECTORY_NOT_FOUND = \"Central directory header not found\";\nconst ERR_LOCAL_FILE_HEADER_NOT_FOUND = \"Local file header not found\";\nconst ERR_EXTRAFIELD_ZIP64_NOT_FOUND = \"Zip64 extra field not found\";\nconst ERR_ENCRYPTED = \"File contains encrypted entry\";\nconst ERR_UNSUPPORTED_ENCRYPTION = \"Encryption method not supported\";\nconst ERR_UNSUPPORTED_COMPRESSION = \"Compression method not supported\";\nconst ERR_SPLIT_ZIP_FILE = \"Split zip file\";\nconst CHARSET_UTF8 = \"utf-8\";\nconst CHARSET_CP437 = \"cp437\";\nconst ZIP64_PROPERTIES = [\n\t[PROPERTY_NAME_UNCOMPPRESSED_SIZE, MAX_32_BITS],\n\t[PROPERTY_NAME_COMPPRESSED_SIZE, MAX_32_BITS],\n\t[PROPERTY_NAME_OFFSET, MAX_32_BITS],\n\t[PROPERTY_NAME_DISK_NUMBER_START, MAX_16_BITS]\n];\nconst ZIP64_EXTRACTION = {\n\t[MAX_16_BITS]: {\n\t\tgetValue: getUint32,\n\t\tbytes: 4\n\t},\n\t[MAX_32_BITS]: {\n\t\tgetValue: getBigUint64,\n\t\tbytes: 8\n\t}\n};\n\nclass ZipReader {\n\n\tconstructor(reader, options = {}) {\n\t\tObject.assign(this, {\n\t\t\treader: initReader(reader),\n\t\t\toptions,\n\t\t\tconfig: getConfiguration()\n\t\t});\n\t}\n\n\tasync* getEntriesGenerator(options = {}) {\n\t\tconst zipReader = this;\n\t\tlet { reader } = zipReader;\n\t\tconst { config } = zipReader;\n\t\tawait initStream(reader);\n\t\tif (reader.size === UNDEFINED_VALUE || !reader.readUint8Array) {\n\t\t\treader = new BlobReader(await new Response(reader.readable).blob());\n\t\t\tawait initStream(reader);\n\t\t}\n\t\tif (reader.size < END_OF_CENTRAL_DIR_LENGTH) {\n\t\t\tthrow new Error(ERR_BAD_FORMAT);\n\t\t}\n\t\treader.chunkSize = getChunkSize(config);\n\t\tconst endOfDirectoryInfo = await seekSignature(reader, END_OF_CENTRAL_DIR_SIGNATURE, reader.size, END_OF_CENTRAL_DIR_LENGTH, MAX_16_BITS * 16);\n\t\tif (!endOfDirectoryInfo) {\n\t\t\tconst signatureArray = await readUint8Array(reader, 0, 4);\n\t\t\tconst signatureView = getDataView(signatureArray);\n\t\t\tif (getUint32(signatureView) == SPLIT_ZIP_FILE_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_SPLIT_ZIP_FILE);\n\t\t\t} else {\n\t\t\t\tthrow new Error(ERR_EOCDR_NOT_FOUND);\n\t\t\t}\n\t\t}\n\t\tconst endOfDirectoryView = getDataView(endOfDirectoryInfo);\n\t\tlet directoryDataLength = getUint32(endOfDirectoryView, 12);\n\t\tlet directoryDataOffset = getUint32(endOfDirectoryView, 16);\n\t\tconst commentOffset = endOfDirectoryInfo.offset;\n\t\tconst commentLength = getUint16(endOfDirectoryView, 20);\n\t\tconst appendedDataOffset = commentOffset + END_OF_CENTRAL_DIR_LENGTH + commentLength;\n\t\tlet lastDiskNumber = getUint16(endOfDirectoryView, 4);\n\t\tconst expectedLastDiskNumber = reader.lastDiskNumber || 0;\n\t\tlet diskNumber = getUint16(endOfDirectoryView, 6);\n\t\tlet filesLength = getUint16(endOfDirectoryView, 8);\n\t\tlet prependedDataLength = 0;\n\t\tlet startOffset = 0;\n\t\tif (directoryDataOffset == MAX_32_BITS || directoryDataLength == MAX_32_BITS || filesLength == MAX_16_BITS || diskNumber == MAX_16_BITS) {\n\t\t\tconst endOfDirectoryLocatorArray = await readUint8Array(reader, endOfDirectoryInfo.offset - ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH, ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH);\n\t\t\tconst endOfDirectoryLocatorView = getDataView(endOfDirectoryLocatorArray);\n\t\t\tif (getUint32(endOfDirectoryLocatorView, 0) != ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_EOCDR_ZIP64_NOT_FOUND);\n\t\t\t}\n\t\t\tdirectoryDataOffset = getBigUint64(endOfDirectoryLocatorView, 8);\n\t\t\tlet endOfDirectoryArray = await readUint8Array(reader, directoryDataOffset, ZIP64_END_OF_CENTRAL_DIR_LENGTH, -1);\n\t\t\tlet endOfDirectoryView = getDataView(endOfDirectoryArray);\n\t\t\tconst expectedDirectoryDataOffset = endOfDirectoryInfo.offset - ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH - ZIP64_END_OF_CENTRAL_DIR_LENGTH;\n\t\t\tif (getUint32(endOfDirectoryView, 0) != ZIP64_END_OF_CENTRAL_DIR_SIGNATURE && directoryDataOffset != expectedDirectoryDataOffset) {\n\t\t\t\tconst originalDirectoryDataOffset = directoryDataOffset;\n\t\t\t\tdirectoryDataOffset = expectedDirectoryDataOffset;\n\t\t\t\tprependedDataLength = directoryDataOffset - originalDirectoryDataOffset;\n\t\t\t\tendOfDirectoryArray = await readUint8Array(reader, directoryDataOffset, ZIP64_END_OF_CENTRAL_DIR_LENGTH, -1);\n\t\t\t\tendOfDirectoryView = getDataView(endOfDirectoryArray);\n\t\t\t}\n\t\t\tif (getUint32(endOfDirectoryView, 0) != ZIP64_END_OF_CENTRAL_DIR_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND);\n\t\t\t}\n\t\t\tif (lastDiskNumber == MAX_16_BITS) {\n\t\t\t\tlastDiskNumber = getUint32(endOfDirectoryView, 16);\n\t\t\t}\n\t\t\tif (diskNumber == MAX_16_BITS) {\n\t\t\t\tdiskNumber = getUint32(endOfDirectoryView, 20);\n\t\t\t}\n\t\t\tif (filesLength == MAX_16_BITS) {\n\t\t\t\tfilesLength = getBigUint64(endOfDirectoryView, 32);\n\t\t\t}\n\t\t\tif (directoryDataLength == MAX_32_BITS) {\n\t\t\t\tdirectoryDataLength = getBigUint64(endOfDirectoryView, 40);\n\t\t\t}\n\t\t\tdirectoryDataOffset -= directoryDataLength;\n\t\t}\n\t\tif (expectedLastDiskNumber != lastDiskNumber) {\n\t\t\tthrow new Error(ERR_SPLIT_ZIP_FILE);\n\t\t}\n\t\tif (directoryDataOffset < 0 || directoryDataOffset >= reader.size) {\n\t\t\tthrow new Error(ERR_BAD_FORMAT);\n\t\t}\n\t\tlet offset = 0;\n\t\tlet directoryArray = await readUint8Array(reader, directoryDataOffset, directoryDataLength, diskNumber);\n\t\tlet directoryView = getDataView(directoryArray);\n\t\tif (directoryDataLength) {\n\t\t\tconst expectedDirectoryDataOffset = endOfDirectoryInfo.offset - directoryDataLength;\n\t\t\tif (getUint32(directoryView, offset) != CENTRAL_FILE_HEADER_SIGNATURE && directoryDataOffset != expectedDirectoryDataOffset) {\n\t\t\t\tconst originalDirectoryDataOffset = directoryDataOffset;\n\t\t\t\tdirectoryDataOffset = expectedDirectoryDataOffset;\n\t\t\t\tprependedDataLength = directoryDataOffset - originalDirectoryDataOffset;\n\t\t\t\tdirectoryArray = await readUint8Array(reader, directoryDataOffset, directoryDataLength, diskNumber);\n\t\t\t\tdirectoryView = getDataView(directoryArray);\n\t\t\t}\n\t\t}\n\t\tif (directoryDataOffset < 0 || directoryDataOffset >= reader.size) {\n\t\t\tthrow new Error(ERR_BAD_FORMAT);\n\t\t}\n\t\tconst filenameEncoding = getOptionValue(zipReader, options, \"filenameEncoding\");\n\t\tconst commentEncoding = getOptionValue(zipReader, options, \"commentEncoding\");\n\t\tfor (let indexFile = 0; indexFile < filesLength; indexFile++) {\n\t\t\tconst fileEntry = new ZipEntry(reader, config, zipReader.options);\n\t\t\tif (getUint32(directoryView, offset) != CENTRAL_FILE_HEADER_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_CENTRAL_DIRECTORY_NOT_FOUND);\n\t\t\t}\n\t\t\treadCommonHeader(fileEntry, directoryView, offset + 6);\n\t\t\tconst languageEncodingFlag = Boolean(fileEntry.bitFlag.languageEncodingFlag);\n\t\t\tconst filenameOffset = offset + 46;\n\t\t\tconst extraFieldOffset = filenameOffset + fileEntry.filenameLength;\n\t\t\tconst commentOffset = extraFieldOffset + fileEntry.extraFieldLength;\n\t\t\tconst versionMadeBy = getUint16(directoryView, offset + 4);\n\t\t\tconst msDosCompatible = (versionMadeBy & 0) == 0;\n\t\t\tconst rawFilename = directoryArray.subarray(filenameOffset, extraFieldOffset);\n\t\t\tconst commentLength = getUint16(directoryView, offset + 32);\n\t\t\tconst endOffset = commentOffset + commentLength;\n\t\t\tconst rawComment = directoryArray.subarray(commentOffset, endOffset);\n\t\t\tconst filenameUTF8 = languageEncodingFlag;\n\t\t\tconst commentUTF8 = languageEncodingFlag;\n\t\t\tconst directory = msDosCompatible && ((getUint8(directoryView, offset + 38) & FILE_ATTR_MSDOS_DIR_MASK) == FILE_ATTR_MSDOS_DIR_MASK);\n\t\t\tconst offsetFileEntry = getUint32(directoryView, offset + 42) + prependedDataLength;\n\t\t\tObject.assign(fileEntry, {\n\t\t\t\tversionMadeBy,\n\t\t\t\tmsDosCompatible,\n\t\t\t\tcompressedSize: 0,\n\t\t\t\tuncompressedSize: 0,\n\t\t\t\tcommentLength,\n\t\t\t\tdirectory,\n\t\t\t\toffset: offsetFileEntry,\n\t\t\t\tdiskNumberStart: getUint16(directoryView, offset + 34),\n\t\t\t\tinternalFileAttribute: getUint16(directoryView, offset + 36),\n\t\t\t\texternalFileAttribute: getUint32(directoryView, offset + 38),\n\t\t\t\trawFilename,\n\t\t\t\tfilenameUTF8,\n\t\t\t\tcommentUTF8,\n\t\t\t\trawExtraField: directoryArray.subarray(extraFieldOffset, commentOffset)\n\t\t\t});\n\t\t\tconst [filename, comment] = await Promise.all([\n\t\t\t\tdecodeText(rawFilename, filenameUTF8 ? CHARSET_UTF8 : filenameEncoding || CHARSET_CP437),\n\t\t\t\tdecodeText(rawComment, commentUTF8 ? CHARSET_UTF8 : commentEncoding || CHARSET_CP437)\n\t\t\t]);\n\t\t\tObject.assign(fileEntry, {\n\t\t\t\trawComment,\n\t\t\t\tfilename,\n\t\t\t\tcomment,\n\t\t\t\tdirectory: directory || filename.endsWith(DIRECTORY_SIGNATURE)\n\t\t\t});\n\t\t\tstartOffset = Math.max(offsetFileEntry, startOffset);\n\t\t\tawait readCommonFooter(fileEntry, fileEntry, directoryView, offset + 6);\n\t\t\tconst entry = new Entry(fileEntry);\n\t\t\tentry.getData = (writer, options) => fileEntry.getData(writer, entry, options);\n\t\t\toffset = endOffset;\n\t\t\tconst { onprogress } = options;\n\t\t\tif (onprogress) {\n\t\t\t\ttry {\n\t\t\t\t\tawait onprogress(indexFile + 1, filesLength, new Entry(fileEntry));\n\t\t\t\t} catch (_error) {\n\t\t\t\t\t// ignored\n\t\t\t\t}\n\t\t\t}\n\t\t\tyield entry;\n\t\t}\n\t\tconst extractPrependedData = getOptionValue(zipReader, options, \"extractPrependedData\");\n\t\tconst extractAppendedData = getOptionValue(zipReader, options, \"extractAppendedData\");\n\t\tif (extractPrependedData) {\n\t\t\tzipReader.prependedData = startOffset > 0 ? await readUint8Array(reader, 0, startOffset) : new Uint8Array();\n\t\t}\n\t\tzipReader.comment = commentLength ? await readUint8Array(reader, commentOffset + END_OF_CENTRAL_DIR_LENGTH, commentLength) : new Uint8Array();\n\t\tif (extractAppendedData) {\n\t\t\tzipReader.appendedData = appendedDataOffset < reader.size ? await readUint8Array(reader, appendedDataOffset, reader.size - appendedDataOffset) : new Uint8Array();\n\t\t}\n\t\treturn true;\n\t}\n\n\tasync getEntries(options = {}) {\n\t\tconst entries = [];\n\t\tfor await (const entry of this.getEntriesGenerator(options)) {\n\t\t\tentries.push(entry);\n\t\t}\n\t\treturn entries;\n\t}\n\n\tasync close() {\n\t}\n}\n\nexport {\n\tZipReader,\n\tERR_BAD_FORMAT,\n\tERR_EOCDR_NOT_FOUND,\n\tERR_EOCDR_ZIP64_NOT_FOUND,\n\tERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND,\n\tERR_CENTRAL_DIRECTORY_NOT_FOUND,\n\tERR_LOCAL_FILE_HEADER_NOT_FOUND,\n\tERR_EXTRAFIELD_ZIP64_NOT_FOUND,\n\tERR_ENCRYPTED,\n\tERR_UNSUPPORTED_ENCRYPTION,\n\tERR_UNSUPPORTED_COMPRESSION,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD,\n\tERR_SPLIT_ZIP_FILE\n};\n\nclass ZipEntry {\n\n\tconstructor(reader, config, options) {\n\t\tObject.assign(this, {\n\t\t\treader,\n\t\t\tconfig,\n\t\t\toptions\n\t\t});\n\t}\n\n\tasync getData(writer, fileEntry, options = {}) {\n\t\tconst zipEntry = this;\n\t\tconst {\n\t\t\treader,\n\t\t\toffset,\n\t\t\tdiskNumberStart,\n\t\t\textraFieldAES,\n\t\t\tcompressionMethod,\n\t\t\tconfig,\n\t\t\tbitFlag,\n\t\t\tsignature,\n\t\t\trawLastModDate,\n\t\t\tuncompressedSize,\n\t\t\tcompressedSize\n\t\t} = zipEntry;\n\t\tconst localDirectory = zipEntry.localDirectory = {};\n\t\tconst dataArray = await readUint8Array(reader, offset, 30, diskNumberStart);\n\t\tconst dataView = getDataView(dataArray);\n\t\tlet password = getOptionValue(zipEntry, options, \"password\");\n\t\tpassword = password && password.length && password;\n\t\tif (extraFieldAES) {\n\t\t\tif (extraFieldAES.originalCompressionMethod != COMPRESSION_METHOD_AES) {\n\t\t\t\tthrow new Error(ERR_UNSUPPORTED_COMPRESSION);\n\t\t\t}\n\t\t}\n\t\tif (compressionMethod != COMPRESSION_METHOD_STORE && compressionMethod != COMPRESSION_METHOD_DEFLATE) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_COMPRESSION);\n\t\t}\n\t\tif (getUint32(dataView, 0) != LOCAL_FILE_HEADER_SIGNATURE) {\n\t\t\tthrow new Error(ERR_LOCAL_FILE_HEADER_NOT_FOUND);\n\t\t}\n\t\treadCommonHeader(localDirectory, dataView, 4);\n\t\tlocalDirectory.rawExtraField = localDirectory.extraFieldLength ?\n\t\t\tawait readUint8Array(reader, offset + 30 + localDirectory.filenameLength, localDirectory.extraFieldLength, diskNumberStart) :\n\t\t\tnew Uint8Array();\n\t\tawait readCommonFooter(zipEntry, localDirectory, dataView, 4);\n\t\tObject.assign(fileEntry, {\n\t\t\tlastAccessDate: localDirectory.lastAccessDate,\n\t\t\tcreationDate: localDirectory.creationDate\n\t\t});\n\t\tconst encrypted = zipEntry.encrypted && localDirectory.encrypted;\n\t\tconst zipCrypto = encrypted && !extraFieldAES;\n\t\tif (encrypted) {\n\t\t\tif (!zipCrypto && extraFieldAES.strength === UNDEFINED_VALUE) {\n\t\t\t\tthrow new Error(ERR_UNSUPPORTED_ENCRYPTION);\n\t\t\t} else if (!password) {\n\t\t\t\tthrow new Error(ERR_ENCRYPTED);\n\t\t\t}\n\t\t}\n\t\tconst dataOffset = offset + 30 + localDirectory.filenameLength + localDirectory.extraFieldLength;\n\t\tconst readable = reader.readable;\n\t\treadable.diskNumberStart = diskNumberStart;\n\t\treadable.offset = dataOffset;\n\t\tlet size = readable.size = compressedSize;\n\t\tconst signal = getOptionValue(zipEntry, options, \"signal\");\n\t\tconst checkPasswordOnly = getOptionValue(zipEntry, options, \"checkPasswordOnly\");\n\t\tif (checkPasswordOnly) {\n\t\t\twriter = new WritableStream();\n\t\t}\n\t\twriter = initWriter(writer);\n\t\tawait initStream(writer, uncompressedSize);\n\t\tconst { writable } = writer;\n\t\tconst { onstart, onprogress, onend } = options;\n\t\tconst workerOptions = {\n\t\t\toptions: {\n\t\t\t\tcodecType: CODEC_INFLATE,\n\t\t\t\tpassword,\n\t\t\t\tzipCrypto,\n\t\t\t\tencryptionStrength: extraFieldAES && extraFieldAES.strength,\n\t\t\t\tsigned: getOptionValue(zipEntry, options, \"checkSignature\"),\n\t\t\t\tpasswordVerification: zipCrypto && (bitFlag.dataDescriptor ? ((rawLastModDate >>> 8) & 0xFF) : ((signature >>> 24) & 0xFF)),\n\t\t\t\tsignature,\n\t\t\t\tcompressed: compressionMethod != 0,\n\t\t\t\tencrypted,\n\t\t\t\tuseWebWorkers: getOptionValue(zipEntry, options, \"useWebWorkers\"),\n\t\t\t\tuseCompressionStream: getOptionValue(zipEntry, options, \"useCompressionStream\"),\n\t\t\t\ttransferStreams: getOptionValue(zipEntry, options, \"transferStreams\"),\n\t\t\t\tcheckPasswordOnly\n\t\t\t},\n\t\t\tconfig,\n\t\t\tstreamOptions: { signal, size, onstart, onprogress, onend }\n\t\t};\n\t\tlet outputSize = 0;\n\t\ttry {\n\t\t\t({ outputSize } = (await runWorker({ readable, writable }, workerOptions)));\n\t\t} catch (error) {\n\t\t\tif (!checkPasswordOnly || error.message != ERR_ABORT_CHECK_PASSWORD) {\n\t\t\t\tthrow error;\n\t\t\t}\n\t\t} finally {\n\t\t\tconst preventClose = getOptionValue(zipEntry, options, \"preventClose\");\n\t\t\twritable.size += outputSize;\n\t\t\tif (!preventClose && !writable.locked) {\n\t\t\t\tawait writable.close();\n\t\t\t}\n\t\t}\n\t\treturn checkPasswordOnly ? undefined : writer.getData ? writer.getData() : writable;\n\t}\n}\n\nfunction readCommonHeader(directory, dataView, offset) {\n\tconst rawBitFlag = directory.rawBitFlag = getUint16(dataView, offset + 2);\n\tconst encrypted = (rawBitFlag & BITFLAG_ENCRYPTED) == BITFLAG_ENCRYPTED;\n\tconst rawLastModDate = getUint32(dataView, offset + 6);\n\tObject.assign(directory, {\n\t\tencrypted,\n\t\tversion: getUint16(dataView, offset),\n\t\tbitFlag: {\n\t\t\tlevel: (rawBitFlag & BITFLAG_LEVEL) >> 1,\n\t\t\tdataDescriptor: (rawBitFlag & BITFLAG_DATA_DESCRIPTOR) == BITFLAG_DATA_DESCRIPTOR,\n\t\t\tlanguageEncodingFlag: (rawBitFlag & BITFLAG_LANG_ENCODING_FLAG) == BITFLAG_LANG_ENCODING_FLAG\n\t\t},\n\t\trawLastModDate,\n\t\tlastModDate: getDate(rawLastModDate),\n\t\tfilenameLength: getUint16(dataView, offset + 22),\n\t\textraFieldLength: getUint16(dataView, offset + 24)\n\t});\n}\n\nasync function readCommonFooter(fileEntry, directory, dataView, offset) {\n\tconst { rawExtraField } = directory;\n\tconst extraField = directory.extraField = new Map();\n\tconst rawExtraFieldView = getDataView(new Uint8Array(rawExtraField));\n\tlet offsetExtraField = 0;\n\ttry {\n\t\twhile (offsetExtraField < rawExtraField.length) {\n\t\t\tconst type = getUint16(rawExtraFieldView, offsetExtraField);\n\t\t\tconst size = getUint16(rawExtraFieldView, offsetExtraField + 2);\n\t\t\textraField.set(type, {\n\t\t\t\ttype,\n\t\t\t\tdata: rawExtraField.slice(offsetExtraField + 4, offsetExtraField + 4 + size)\n\t\t\t});\n\t\t\toffsetExtraField += 4 + size;\n\t\t}\n\t} catch (_error) {\n\t\t// ignored\n\t}\n\tconst compressionMethod = getUint16(dataView, offset + 4);\n\tObject.assign(directory, {\n\t\tsignature: getUint32(dataView, offset + 10),\n\t\tuncompressedSize: getUint32(dataView, offset + 18),\n\t\tcompressedSize: getUint32(dataView, offset + 14)\n\t});\n\tconst extraFieldZip64 = extraField.get(EXTRAFIELD_TYPE_ZIP64);\n\tif (extraFieldZip64) {\n\t\treadExtraFieldZip64(extraFieldZip64, directory);\n\t\tdirectory.extraFieldZip64 = extraFieldZip64;\n\t}\n\tconst extraFieldUnicodePath = extraField.get(EXTRAFIELD_TYPE_UNICODE_PATH);\n\tif (extraFieldUnicodePath) {\n\t\tawait readExtraFieldUnicode(extraFieldUnicodePath, PROPERTY_NAME_FILENAME, PROPERTY_NAME_RAW_FILENAME, directory, fileEntry);\n\t\tdirectory.extraFieldUnicodePath = extraFieldUnicodePath;\n\t}\n\tconst extraFieldUnicodeComment = extraField.get(EXTRAFIELD_TYPE_UNICODE_COMMENT);\n\tif (extraFieldUnicodeComment) {\n\t\tawait readExtraFieldUnicode(extraFieldUnicodeComment, PROPERTY_NAME_COMMENT, PROPERTY_NAME_RAW_COMMENT, directory, fileEntry);\n\t\tdirectory.extraFieldUnicodeComment = extraFieldUnicodeComment;\n\t}\n\tconst extraFieldAES = extraField.get(EXTRAFIELD_TYPE_AES);\n\tif (extraFieldAES) {\n\t\treadExtraFieldAES(extraFieldAES, directory, compressionMethod);\n\t\tdirectory.extraFieldAES = extraFieldAES;\n\t} else {\n\t\tdirectory.compressionMethod = compressionMethod;\n\t}\n\tconst extraFieldNTFS = extraField.get(EXTRAFIELD_TYPE_NTFS);\n\tif (extraFieldNTFS) {\n\t\treadExtraFieldNTFS(extraFieldNTFS, directory);\n\t\tdirectory.extraFieldNTFS = extraFieldNTFS;\n\t}\n\tconst extraFieldExtendedTimestamp = extraField.get(EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP);\n\tif (extraFieldExtendedTimestamp) {\n\t\treadExtraFieldExtendedTimestamp(extraFieldExtendedTimestamp, directory);\n\t\tdirectory.extraFieldExtendedTimestamp = extraFieldExtendedTimestamp;\n\t}\n}\n\nfunction readExtraFieldZip64(extraFieldZip64, directory) {\n\tdirectory.zip64 = true;\n\tconst extraFieldView = getDataView(extraFieldZip64.data);\n\tconst missingProperties = ZIP64_PROPERTIES.filter(([propertyName, max]) => directory[propertyName] == max);\n\tfor (let indexMissingProperty = 0, offset = 0; indexMissingProperty < missingProperties.length; indexMissingProperty++) {\n\t\tconst [propertyName, max] = missingProperties[indexMissingProperty];\n\t\tif (directory[propertyName] == max) {\n\t\t\tconst extraction = ZIP64_EXTRACTION[max];\n\t\t\tdirectory[propertyName] = extraFieldZip64[propertyName] = extraction.getValue(extraFieldView, offset);\n\t\t\toffset += extraction.bytes;\n\t\t} else if (extraFieldZip64[propertyName]) {\n\t\t\tthrow new Error(ERR_EXTRAFIELD_ZIP64_NOT_FOUND);\n\t\t}\n\t}\n}\n\nasync function readExtraFieldUnicode(extraFieldUnicode, propertyName, rawPropertyName, directory, fileEntry) {\n\tconst extraFieldView = getDataView(extraFieldUnicode.data);\n\tconst crc32 = new Crc32();\n\tcrc32.append(fileEntry[rawPropertyName]);\n\tconst dataViewSignature = getDataView(new Uint8Array(4));\n\tdataViewSignature.setUint32(0, crc32.get(), true);\n\tObject.assign(extraFieldUnicode, {\n\t\tversion: getUint8(extraFieldView, 0),\n\t\tsignature: getUint32(extraFieldView, 1),\n\t\t[propertyName]: await decodeText(extraFieldUnicode.data.subarray(5)),\n\t\tvalid: !fileEntry.bitFlag.languageEncodingFlag && extraFieldUnicode.signature == getUint32(dataViewSignature, 0)\n\t});\n\tif (extraFieldUnicode.valid) {\n\t\tdirectory[propertyName] = extraFieldUnicode[propertyName];\n\t\tdirectory[propertyName + \"UTF8\"] = true;\n\t}\n}\n\nfunction readExtraFieldAES(extraFieldAES, directory, compressionMethod) {\n\tconst extraFieldView = getDataView(extraFieldAES.data);\n\tconst strength = getUint8(extraFieldView, 4);\n\tObject.assign(extraFieldAES, {\n\t\tvendorVersion: getUint8(extraFieldView, 0),\n\t\tvendorId: getUint8(extraFieldView, 2),\n\t\tstrength,\n\t\toriginalCompressionMethod: compressionMethod,\n\t\tcompressionMethod: getUint16(extraFieldView, 5)\n\t});\n\tdirectory.compressionMethod = extraFieldAES.compressionMethod;\n}\n\nfunction readExtraFieldNTFS(extraFieldNTFS, directory) {\n\tconst extraFieldView = getDataView(extraFieldNTFS.data);\n\tlet offsetExtraField = 4;\n\tlet tag1Data;\n\ttry {\n\t\twhile (offsetExtraField < extraFieldNTFS.data.length && !tag1Data) {\n\t\t\tconst tagValue = getUint16(extraFieldView, offsetExtraField);\n\t\t\tconst attributeSize = getUint16(extraFieldView, offsetExtraField + 2);\n\t\t\tif (tagValue == EXTRAFIELD_TYPE_NTFS_TAG1) {\n\t\t\t\ttag1Data = extraFieldNTFS.data.slice(offsetExtraField + 4, offsetExtraField + 4 + attributeSize);\n\t\t\t}\n\t\t\toffsetExtraField += 4 + attributeSize;\n\t\t}\n\t} catch (_error) {\n\t\t// ignored\n\t}\n\ttry {\n\t\tif (tag1Data && tag1Data.length == 24) {\n\t\t\tconst tag1View = getDataView(tag1Data);\n\t\t\tconst rawLastModDate = tag1View.getBigUint64(0, true);\n\t\t\tconst rawLastAccessDate = tag1View.getBigUint64(8, true);\n\t\t\tconst rawCreationDate = tag1View.getBigUint64(16, true);\n\t\t\tObject.assign(extraFieldNTFS, {\n\t\t\t\trawLastModDate,\n\t\t\t\trawLastAccessDate,\n\t\t\t\trawCreationDate\n\t\t\t});\n\t\t\tconst lastModDate = getDateNTFS(rawLastModDate);\n\t\t\tconst lastAccessDate = getDateNTFS(rawLastAccessDate);\n\t\t\tconst creationDate = getDateNTFS(rawCreationDate);\n\t\t\tconst extraFieldData = { lastModDate, lastAccessDate, creationDate };\n\t\t\tObject.assign(extraFieldNTFS, extraFieldData);\n\t\t\tObject.assign(directory, extraFieldData);\n\t\t}\n\t} catch (_error) {\n\t\t// ignored\n\t}\n}\n\nfunction readExtraFieldExtendedTimestamp(extraFieldExtendedTimestamp, directory) {\n\tconst extraFieldView = getDataView(extraFieldExtendedTimestamp.data);\n\tconst flags = getUint8(extraFieldView, 0);\n\tconst timeProperties = [];\n\tconst timeRawProperties = [];\n\tif ((flags & 0x1) == 0x1) {\n\t\ttimeProperties.push(PROPERTY_NAME_LAST_MODIFICATION_DATE);\n\t\ttimeRawProperties.push(PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE);\n\t}\n\tif ((flags & 0x2) == 0x2) {\n\t\ttimeProperties.push(PROPERTY_NAME_LAST_ACCESS_DATE);\n\t\ttimeRawProperties.push(PROPERTY_NAME_RAW_LAST_ACCESS_DATE);\n\t}\n\tif ((flags & 0x4) == 0x4) {\n\t\ttimeProperties.push(PROPERTY_NAME_CREATION_DATE);\n\t\ttimeRawProperties.push(PROPERTY_NAME_RAW_CREATION_DATE);\n\t}\n\tlet offset = 1;\n\ttimeProperties.forEach((propertyName, indexProperty) => {\n\t\tif (extraFieldExtendedTimestamp.data.length >= offset + 4) {\n\t\t\tconst time = getUint32(extraFieldView, offset);\n\t\t\tdirectory[propertyName] = extraFieldExtendedTimestamp[propertyName] = new Date(time * 1000);\n\t\t\tconst rawPropertyName = timeRawProperties[indexProperty];\n\t\t\textraFieldExtendedTimestamp[rawPropertyName] = time;\n\t\t}\n\t\toffset += 4;\n\t});\n}\n\nasync function seekSignature(reader, signature, startOffset, minimumBytes, maximumLength) {\n\tconst signatureArray = new Uint8Array(4);\n\tconst signatureView = getDataView(signatureArray);\n\tsetUint32(signatureView, 0, signature);\n\tconst maximumBytes = minimumBytes + maximumLength;\n\treturn (await seek(minimumBytes)) || await seek(Math.min(maximumBytes, startOffset));\n\n\tasync function seek(length) {\n\t\tconst offset = startOffset - length;\n\t\tconst bytes = await readUint8Array(reader, offset, length);\n\t\tfor (let indexByte = bytes.length - minimumBytes; indexByte >= 0; indexByte--) {\n\t\t\tif (bytes[indexByte] == signatureArray[0] && bytes[indexByte + 1] == signatureArray[1] &&\n\t\t\t\tbytes[indexByte + 2] == signatureArray[2] && bytes[indexByte + 3] == signatureArray[3]) {\n\t\t\t\treturn {\n\t\t\t\t\toffset: offset + indexByte,\n\t\t\t\t\tbuffer: bytes.slice(indexByte, indexByte + minimumBytes).buffer\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction getOptionValue(zipReader, options, name) {\n\treturn options[name] === UNDEFINED_VALUE ? zipReader.options[name] : options[name];\n}\n\nfunction getDate(timeRaw) {\n\tconst date = (timeRaw & 0xffff0000) >> 16, time = timeRaw & 0x0000ffff;\n\ttry {\n\t\treturn new Date(1980 + ((date & 0xFE00) >> 9), ((date & 0x01E0) >> 5) - 1, date & 0x001F, (time & 0xF800) >> 11, (time & 0x07E0) >> 5, (time & 0x001F) * 2, 0);\n\t} catch (_error) {\n\t\t// ignored\n\t}\n}\n\nfunction getDateNTFS(timeRaw) {\n\treturn new Date((Number((timeRaw / BigInt(10000)) - BigInt(11644473600000))));\n}\n\nfunction getUint8(view, offset) {\n\treturn view.getUint8(offset);\n}\n\nfunction getUint16(view, offset) {\n\treturn view.getUint16(offset, true);\n}\n\nfunction getUint32(view, offset) {\n\treturn view.getUint32(offset, true);\n}\n\nfunction getBigUint64(view, offset) {\n\treturn Number(view.getBigUint64(offset, true));\n}\n\nfunction setUint32(view, offset, value) {\n\tview.setUint32(offset, value, true);\n}\n\nfunction getDataView(array) {\n\treturn new DataView(array.buffer);\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport { configure } from \"./core/configuration.js\";\nimport { configureWebWorker } from \"./z-worker-inline.js\";\nimport { getMimeType } from \"./core/util/default-mime-type.js\";\nimport { initShimAsyncCodec } from \"./core/util/stream-codec-shim.js\";\nimport { terminateWorkers } from \"./core/codec-pool.js\";\n\nlet baseURL;\ntry {\n\tbaseURL = import.meta.url;\n} catch (_error) {\n\t// ignored\n}\nconfigure({ baseURL });\nconfigureWebWorker(configure);\n\nexport * from \"./core/io.js\";\nexport * from \"./core/zip-reader.js\";\nexport * from \"./core/zip-writer.js\";\nexport * from \"./core/zip-fs-core.js\";\nexport {\n\tconfigure,\n\tgetMimeType,\n\tinitShimAsyncCodec,\n\tterminateWorkers\n};","import { EntryMetadata, getEntryMetadata, zipGetData } from \"./common\";\nimport { BlobReader, BlobWriter, Entry, EntryGetDataOptions, Reader } from \"@zip.js/zip.js\";\n\nfunction parseIndex(index: number, size: number) {\n return index < 0 ?\n Math.max(index + size, 0) :\n Math.min(index, size);\n}\n\nclass BlobEntryReaderImpl extends Reader {\n private readonly blob: Blob;\n private readonly offset: number;\n\n constructor(blob: Blob, entryMetadata: EntryMetadata) {\n super(blob);\n\n this.blob = blob;\n this.offset = entryMetadata.offset + entryMetadata.headerSize;\n this.size = entryMetadata.compressedSize;\n }\n\n async readUint8Array(index: number, length: number): Promise {\n const start = parseIndex(index, this.size) + this.offset;\n const end = parseIndex(index + length, this.size) + this.offset;\n const blob = this.blob.slice(start, end);\n return new Uint8Array(await blob.arrayBuffer());\n }\n}\n\n/**\n * Represents a {@link Reader} instance used to read data of an entry in a zip\n * file provided as a {@link Blob}. It directly reads data if it is uncompressed.\n */\nexport class BlobEntryReader extends Reader {\n private readonly blob: Blob;\n private readonly entry: Entry;\n private readonly mimeString: string | undefined;\n private readonly options: EntryGetDataOptions | undefined;\n\n private reader: Reader | undefined;\n\n /**\n * @param blob - The blob to read data from, usually the outer zip file.\n * @param entry - The entry to read data of, usually the inner zip file.\n * @param mimeString - The MIME type of the data.\n * @param options - Represents options passed to {@link Entry#getData}.\n */\n constructor(\n blob: Blob,\n entry: Entry,\n mimeString?: string,\n options?: EntryGetDataOptions\n ) {\n super();\n\n this.blob = blob;\n this.entry = entry;\n this.mimeString = mimeString;\n this.options = options;\n }\n\n async init(): Promise {\n const entryMetadata = await getEntryMetadata(this.blob, this.entry);\n\n if (entryMetadata.compressionMethod !== 0) {\n const entryBlob: Blob = await zipGetData(\n this.entry,\n new BlobWriter(this.mimeString),\n this.options\n );\n this.reader = new BlobReader(entryBlob);\n } else {\n this.reader = new BlobEntryReaderImpl(this.blob, entryMetadata);\n }\n\n this.size = this.reader.size;\n }\n\n async readUint8Array(index: number, length: number): Promise {\n return this.reader!.readUint8Array(index, length);\n }\n}\n","function e(e){const t=()=>URL.createObjectURL(new Blob(['const{Array:e,Object:t,Number:n,Math:r,Error:s,Uint8Array:i,Uint16Array:o,Uint32Array:c,Int32Array:f,Map:a,DataView:l,Promise:u,TextEncoder:w,crypto:h,postMessage:d,TransformStream:p,ReadableStream:y,WritableStream:m,CompressionStream:b,DecompressionStream:g}=self;class k{constructor(e){return class extends p{constructor(t,n){const r=new e(n);super({transform(e,t){t.enqueue(r.append(e))},flush(e){const t=r.flush();t&&e.enqueue(t)}})}}}}const v=[];for(let e=0;256>e;e++){let t=e;for(let e=0;8>e;e++)1&t?t=t>>>1^3988292384:t>>>=1;v[e]=t}class S{constructor(e){this.t=e||-1}append(e){let t=0|this.t;for(let n=0,r=0|e.length;r>n;n++)t=t>>>8^v[255&(t^e[n])];this.t=t}get(){return~this.t}}class z extends p{constructor(){const e=new S;super({transform(t){e.append(t)},flush(t){const n=new i(4);new l(n.buffer).setUint32(0,e.get()),t.enqueue(n)}})}}const C={concat(e,t){if(0===e.length||0===t.length)return e.concat(t);const n=e[e.length-1],r=C.i(n);return 32===r?e.concat(t):C.o(t,r,0|n,e.slice(0,e.length-1))},l(e){const t=e.length;if(0===t)return 0;const n=e[t-1];return 32*(t-1)+C.i(n)},u(e,t){if(32*e.length0&&t&&(e[n-1]=C.h(t,e[n-1]&2147483648>>t-1,1)),e},h:(e,t,n)=>32===e?t:(n?0|t:t<<32-e)+1099511627776*e,i:e=>r.round(e/1099511627776)||32,o(e,t,n,r){for(void 0===r&&(r=[]);t>=32;t-=32)r.push(n),n=0;if(0===t)return r.concat(e);for(let s=0;s>>t),n=e[s]<<32-t;const s=e.length?e[e.length-1]:0,i=C.i(s);return r.push(C.h(t+i&31,t+i>32?n:r.pop(),1)),r}},x={p:{m(e){const t=C.l(e)/8,n=new i(t);let r;for(let s=0;t>s;s++)0==(3&s)&&(r=e[s/4]),n[s]=r>>>24,r<<=8;return n},g(e){const t=[];let n,r=0;for(n=0;n9007199254740991)throw new s(\"Cannot hash more than 2^53 - 1 bits\");const o=new c(n);let f=0;for(let e=t.blockSize+r-(t.blockSize+r&t.blockSize-1);i>=e;e+=t.blockSize)t.I(o.subarray(16*f,16*(f+1))),f+=1;return n.splice(0,16*f),t}D(){const e=this;let t=e.C;const n=e.S;t=C.concat(t,[C.h(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(r.floor(e._/4294967296)),t.push(0|e._);t.length;)e.I(t.splice(0,16));return e.reset(),n}V(e,t,n,r){return e>19?e>39?e>59?e>79?void 0:t^n^r:t&n|t&r|n&r:t^n^r:t&n|~t&r}P(e,t){return t<>>32-e}I(t){const n=this,s=n.S,i=e(80);for(let e=0;16>e;e++)i[e]=t[e];let o=s[0],c=s[1],f=s[2],a=s[3],l=s[4];for(let e=0;79>=e;e++){16>e||(i[e]=n.P(1,i[e-3]^i[e-8]^i[e-14]^i[e-16]));const t=n.P(5,o)+n.V(e,c,f,a)+l+i[e]+n.v[r.floor(e/20)]|0;l=a,a=f,f=n.P(30,c),c=o,o=t}s[0]=s[0]+o|0,s[1]=s[1]+c|0,s[2]=s[2]+f|0,s[3]=s[3]+a|0,s[4]=s[4]+l|0}},A={getRandomValues(e){const t=new c(e.buffer),n=e=>{let t=987654321;const n=4294967295;return()=>(t=36969*(65535&t)+(t>>16)&n,(((t<<16)+(e=18e3*(65535&e)+(e>>16)&n)&n)/4294967296+.5)*(r.random()>.5?1:-1))};for(let s,i=0;inew I.R(x.p.g(e)),B(e,t,n,r){if(n=n||1e4,0>r||0>n)throw new s(\"invalid params to pbkdf2\");const i=1+(r>>5)<<2;let o,c,f,a,u;const w=new ArrayBuffer(i),h=new l(w);let d=0;const p=C;for(t=x.p.g(t),u=1;(i||1)>d;u++){for(o=c=e.encrypt(p.concat(t,[u])),f=1;n>f;f++)for(c=e.encrypt(c),a=0;ad&&fs&&(e=(new n).update(e).D());for(let t=0;s>t;t++)r[0][t]=909522486^e[t],r[1][t]=1549556828^e[t];t.K[0].update(r[0]),t.K[1].update(r[1]),t.U=new n(t.K[0])}reset(){const e=this;e.U=new e.M(e.K[0]),e.N=!1}update(e){this.N=!0,this.U.update(e)}digest(){const e=this,t=e.U.D(),n=new e.M(e.K[1]).update(t).D();return e.reset(),n}encrypt(e){if(this.N)throw new s(\"encrypt on already updated hmac called!\");return this.update(e),this.digest(e)}}},D=void 0!==h&&\"function\"==typeof h.getRandomValues,V=\"Invalid password\",P=\"Invalid signature\",R=\"zipjs-abort-check-password\";function B(e){return D?h.getRandomValues(e):A.getRandomValues(e)}const E=16,M={name:\"PBKDF2\"},K=t.assign({hash:{name:\"HMAC\"}},M),U=t.assign({iterations:1e3,hash:{name:\"SHA-1\"}},M),N=[\"deriveBits\"],O=[8,12,16],T=[16,24,32],W=10,j=[0,0,0,0],H=\"undefined\",L=\"function\",F=typeof h!=H,q=F&&h.subtle,G=F&&typeof q!=H,J=x.p,Q=class{constructor(e){const t=this;t.O=[[[],[],[],[],[]],[[],[],[],[],[]]],t.O[0][0][0]||t.T();const n=t.O[0][4],r=t.O[1],i=e.length;let o,c,f,a=1;if(4!==i&&6!==i&&8!==i)throw new s(\"invalid aes key size\");for(t.v=[c=e.slice(0),f=[]],o=i;4*i+28>o;o++){let e=c[o-1];(o%i==0||8===i&&o%i==4)&&(e=n[e>>>24]<<24^n[e>>16&255]<<16^n[e>>8&255]<<8^n[255&e],o%i==0&&(e=e<<8^e>>>24^a<<24,a=a<<1^283*(a>>7))),c[o]=c[o-i]^e}for(let e=0;o;e++,o--){const t=c[3&e?o:o-4];f[e]=4>=o||4>e?t:r[0][n[t>>>24]]^r[1][n[t>>16&255]]^r[2][n[t>>8&255]]^r[3][n[255&t]]}}encrypt(e){return this.W(e,0)}decrypt(e){return this.W(e,1)}T(){const e=this.O[0],t=this.O[1],n=e[4],r=t[4],s=[],i=[];let o,c,f,a;for(let e=0;256>e;e++)i[(s[e]=e<<1^283*(e>>7))^e]=e;for(let l=o=0;!n[l];l^=c||1,o=i[o]||1){let i=o^o<<1^o<<2^o<<3^o<<4;i=i>>8^255&i^99,n[l]=i,r[i]=l,a=s[f=s[c=s[l]]];let u=16843009*a^65537*f^257*c^16843008*l,w=257*s[i]^16843008*i;for(let n=0;4>n;n++)e[n][l]=w=w<<24^w>>>8,t[n][i]=u=u<<24^u>>>8}for(let n=0;5>n;n++)e[n]=e[n].slice(0),t[n]=t[n].slice(0)}W(e,t){if(4!==e.length)throw new s(\"invalid aes block size\");const n=this.v[t],r=n.length/4-2,i=[0,0,0,0],o=this.O[t],c=o[0],f=o[1],a=o[2],l=o[3],u=o[4];let w,h,d,p=e[0]^n[0],y=e[t?3:1]^n[1],m=e[2]^n[2],b=e[t?1:3]^n[3],g=4;for(let e=0;r>e;e++)w=c[p>>>24]^f[y>>16&255]^a[m>>8&255]^l[255&b]^n[g],h=c[y>>>24]^f[m>>16&255]^a[b>>8&255]^l[255&p]^n[g+1],d=c[m>>>24]^f[b>>16&255]^a[p>>8&255]^l[255&y]^n[g+2],b=c[b>>>24]^f[p>>16&255]^a[y>>8&255]^l[255&m]^n[g+3],g+=4,p=w,y=h,m=d;for(let e=0;4>e;e++)i[t?3&-e:e]=u[p>>>24]<<24^u[y>>16&255]<<16^u[m>>8&255]<<8^u[255&b]^n[g++],w=p,p=y,y=m,m=b,b=w;return i}},X=class{constructor(e,t){this.j=e,this.H=t,this.L=t}reset(){this.L=this.H}update(e){return this.F(this.j,e,this.L)}q(e){if(255==(e>>24&255)){let t=e>>16&255,n=e>>8&255,r=255&e;255===t?(t=0,255===n?(n=0,255===r?r=0:++r):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=r}else e+=1<<24;return e}G(e){0===(e[0]=this.q(e[0]))&&(e[1]=this.q(e[1]))}F(e,t,n){let r;if(!(r=t.length))return[];const s=C.l(t);for(let s=0;r>s;s+=4){this.G(n);const r=e.encrypt(n);t[s]^=r[0],t[s+1]^=r[1],t[s+2]^=r[2],t[s+3]^=r[3]}return C.u(t,s)}},Y=I.R;let Z=F&&G&&typeof q.importKey==L,$=F&&G&&typeof q.deriveBits==L;class ee extends p{constructor({password:e,signed:n,encryptionStrength:r,checkPasswordOnly:o}){super({start(){t.assign(this,{ready:new u((e=>this.J=e)),password:e,signed:n,X:r-1,pending:new i})},async transform(e,t){const n=this,{password:r,X:c,J:f,ready:a}=n;r?(await(async(e,t,n,r)=>{const i=await re(e,t,n,ie(r,0,O[t])),o=ie(r,O[t]);if(i[0]!=o[0]||i[1]!=o[1])throw new s(V)})(n,c,r,ie(e,0,O[c]+2)),e=ie(e,O[c]+2),o?t.error(new s(R)):f()):await a;const l=new i(e.length-W-(e.length-W)%E);t.enqueue(ne(n,e,l,0,W,!0))},async flush(e){const{signed:t,Y:n,Z:r,pending:o,ready:c}=this;await c;const f=ie(o,0,o.length-W),a=ie(o,o.length-W);let l=new i;if(f.length){const e=ce(J,f);r.update(e);const t=n.update(e);l=oe(J,t)}if(t){const e=ie(oe(J,r.digest()),0,W);for(let t=0;W>t;t++)if(e[t]!=a[t])throw new s(P)}e.enqueue(l)}})}}class te extends p{constructor({password:e,encryptionStrength:n}){let r;super({start(){t.assign(this,{ready:new u((e=>this.J=e)),password:e,X:n-1,pending:new i})},async transform(e,t){const n=this,{password:r,X:s,J:o,ready:c}=n;let f=new i;r?(f=await(async(e,t,n)=>{const r=B(new i(O[t]));return se(r,await re(e,t,n,r))})(n,s,r),o()):await c;const a=new i(f.length+e.length-e.length%E);a.set(f,0),t.enqueue(ne(n,e,a,f.length,0))},async flush(e){const{Y:t,Z:n,pending:s,ready:o}=this;await o;let c=new i;if(s.length){const e=t.update(ce(J,s));n.update(e),c=oe(J,e)}r.signature=oe(J,n.digest()).slice(0,W),e.enqueue(se(c,r.signature))}}),r=this}}function ne(e,t,n,r,s,o){const{Y:c,Z:f,pending:a}=e,l=t.length-s;let u;for(a.length&&(t=se(a,t),n=((e,t)=>{if(t&&t>e.length){const n=e;(e=new i(t)).set(n,0)}return e})(n,l-l%E)),u=0;l-E>=u;u+=E){const e=ce(J,ie(t,u,u+E));o&&f.update(e);const s=c.update(e);o||f.update(s),n.set(oe(J,s),u+r)}return e.pending=ie(t,u),n}async function re(n,r,s,o){n.password=null;const c=(e=>{if(void 0===w){const t=new i((e=unescape(encodeURIComponent(e))).length);for(let n=0;n{if(!Z)return I.importKey(t);try{return await q.importKey(\"raw\",t,n,!1,s)}catch(e){return Z=!1,I.importKey(t)}})(0,c,K,0,N),a=await(async(e,t,n)=>{if(!$)return I.B(t,e.salt,U.iterations,n);try{return await q.deriveBits(e,t,n)}catch(r){return $=!1,I.B(t,e.salt,U.iterations,n)}})(t.assign({salt:o},U),f,8*(2*T[r]+2)),l=new i(a),u=ce(J,ie(l,0,T[r])),h=ce(J,ie(l,T[r],2*T[r])),d=ie(l,2*T[r]);return t.assign(n,{keys:{key:u,$:h,passwordVerification:d},Y:new X(new Q(u),e.from(j)),Z:new Y(h)}),d}function se(e,t){let n=e;return e.length+t.length&&(n=new i(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function ie(e,t,n){return e.subarray(t,n)}function oe(e,t){return e.m(t)}function ce(e,t){return e.g(t)}class fe extends p{constructor({password:e,passwordVerification:n,checkPasswordOnly:r}){super({start(){t.assign(this,{password:e,passwordVerification:n}),we(this,e)},transform(e,t){const n=this;if(n.password){const t=le(n,e.subarray(0,12));if(n.password=null,t[11]!=n.passwordVerification)throw new s(V);e=e.subarray(12)}r?t.error(new s(R)):t.enqueue(le(n,e))}})}}class ae extends p{constructor({password:e,passwordVerification:n}){super({start(){t.assign(this,{password:e,passwordVerification:n}),we(this,e)},transform(e,t){const n=this;let r,s;if(n.password){n.password=null;const t=B(new i(12));t[11]=n.passwordVerification,r=new i(e.length+t.length),r.set(ue(n,t),0),s=12}else r=new i(e.length),s=0;r.set(ue(n,e),s),t.enqueue(r)}})}}function le(e,t){const n=new i(t.length);for(let r=0;r>>24]),i=~e.te.get(),e.keys=[n,s,i]}function de(e){const t=2|e.keys[2];return pe(r.imul(t,1^t)>>>8)}function pe(e){return 255&e}function ye(e){return 4294967295&e}const me=\"deflate-raw\";class be extends p{constructor(e,{chunkSize:t,CompressionStream:n,CompressionStreamNative:r}){super({});const{compressed:s,encrypted:i,useCompressionStream:o,zipCrypto:c,signed:f,level:a}=e,u=this;let w,h,d=ke(super.readable);i&&!c||!f||([d,w]=d.tee(),w=ze(w,new z)),s&&(d=Se(d,o,{level:a,chunkSize:t},r,n)),i&&(c?d=ze(d,new ae(e)):(h=new te(e),d=ze(d,h))),ve(u,d,(async()=>{let e;i&&!c&&(e=h.signature),i&&!c||!f||(e=await w.getReader().read(),e=new l(e.value.buffer).getUint32(0)),u.signature=e}))}}class ge extends p{constructor(e,{chunkSize:t,DecompressionStream:n,DecompressionStreamNative:r}){super({});const{zipCrypto:i,encrypted:o,signed:c,signature:f,compressed:a,useCompressionStream:u}=e;let w,h,d=ke(super.readable);o&&(i?d=ze(d,new fe(e)):(h=new ee(e),d=ze(d,h))),a&&(d=Se(d,u,{chunkSize:t},r,n)),o&&!i||!c||([d,w]=d.tee(),w=ze(w,new z)),ve(this,d,(async()=>{if((!o||i)&&c){const e=await w.getReader().read(),t=new l(e.value.buffer);if(f!=t.getUint32(0,!1))throw new s(P)}}))}}function ke(e){return ze(e,new p({transform(e,t){e&&e.length&&t.enqueue(e)}}))}function ve(e,n,r){n=ze(n,new p({flush:r})),t.defineProperty(e,\"readable\",{get:()=>n})}function Se(e,t,n,r,s){try{e=ze(e,new(t&&r?r:s)(me,n))}catch(r){if(!t)throw r;e=ze(e,new s(me,n))}return e}function ze(e,t){return e.pipeThrough(t)}const Ce=\"data\";class xe extends p{constructor(e,n){super({});const r=this,{codecType:s}=e;let i;s.startsWith(\"deflate\")?i=be:s.startsWith(\"inflate\")&&(i=ge);let o=0;const c=new i(e,n),f=super.readable,a=new p({transform(e,t){e&&e.length&&(o+=e.length,t.enqueue(e))},flush(){const{signature:e}=c;t.assign(r,{signature:e,size:o})}});t.defineProperty(r,\"readable\",{get:()=>f.pipeThrough(c).pipeThrough(a)})}}const _e=new a,Ae=new a;let Ie=0;async function De(e){try{const{options:t,scripts:r,config:s}=e;r&&r.length&&importScripts.apply(void 0,r),self.initCodec&&self.initCodec(),s.CompressionStreamNative=self.CompressionStream,s.DecompressionStreamNative=self.DecompressionStream,self.Deflate&&(s.CompressionStream=new k(self.Deflate)),self.Inflate&&(s.DecompressionStream=new k(self.Inflate));const i={highWaterMark:1,size:()=>s.chunkSize},o=e.readable||new y({async pull(e){const t=new u((e=>_e.set(Ie,e)));Ve({type:\"pull\",messageId:Ie}),Ie=(Ie+1)%n.MAX_SAFE_INTEGER;const{value:r,done:s}=await t;e.enqueue(r),s&&e.close()}},i),c=e.writable||new m({async write(e){let t;const r=new u((e=>t=e));Ae.set(Ie,t),Ve({type:Ce,value:e,messageId:Ie}),Ie=(Ie+1)%n.MAX_SAFE_INTEGER,await r}},i),f=new xe(t,s);await o.pipeThrough(f).pipeTo(c,{preventClose:!0,preventAbort:!0});try{await c.close()}catch(e){}const{signature:a,size:l}=f;Ve({type:\"close\",result:{signature:a,size:l}})}catch(e){Pe(e)}}function Ve(e){let{value:t}=e;if(t)if(t.length)try{t=new i(t),e.value=t.buffer,d(e,[e.value])}catch(t){d(e)}else d(e);else d(e)}function Pe(e){const{message:t,stack:n,code:r,name:s}=e;d({error:{message:t,stack:n,code:r,name:s}})}addEventListener(\"message\",(({data:e})=>{const{type:t,messageId:n,value:r,done:s}=e;try{if(\"start\"==t&&De(e),t==Ce){const e=_e.get(n);_e.delete(n),e({value:new i(r),done:s})}if(\"ack\"==t){const e=Ae.get(n);Ae.delete(n),e()}}catch(e){Pe(e)}}));const Re=-2;function Be(t){return Ee(t.map((([t,n])=>new e(t).fill(n,0,t))))}function Ee(t){return t.reduce(((t,n)=>t.concat(e.isArray(n)?Ee(n):n)),[])}const Me=[0,1,2,3].concat(...Be([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function Ke(){const e=this;function t(e,t){let n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1}e.ne=n=>{const s=e.re,i=e.ie.se,o=e.ie.oe;let c,f,a,l=-1;for(n.ce=0,n.fe=573,c=0;o>c;c++)0!==s[2*c]?(n.ae[++n.ce]=l=c,n.le[c]=0):s[2*c+1]=0;for(;2>n.ce;)a=n.ae[++n.ce]=2>l?++l:0,s[2*a]=1,n.le[a]=0,n.ue--,i&&(n.we-=i[2*a+1]);for(e.he=l,c=r.floor(n.ce/2);c>=1;c--)n.de(s,c);a=o;do{c=n.ae[1],n.ae[1]=n.ae[n.ce--],n.de(s,1),f=n.ae[1],n.ae[--n.fe]=c,n.ae[--n.fe]=f,s[2*a]=s[2*c]+s[2*f],n.le[a]=r.max(n.le[c],n.le[f])+1,s[2*c+1]=s[2*f+1]=a,n.ae[1]=a++,n.de(s,1)}while(n.ce>=2);n.ae[--n.fe]=n.ae[1],(t=>{const n=e.re,r=e.ie.se,s=e.ie.pe,i=e.ie.ye,o=e.ie.me;let c,f,a,l,u,w,h=0;for(l=0;15>=l;l++)t.be[l]=0;for(n[2*t.ae[t.fe]+1]=0,c=t.fe+1;573>c;c++)f=t.ae[c],l=n[2*n[2*f+1]+1]+1,l>o&&(l=o,h++),n[2*f+1]=l,f>e.he||(t.be[l]++,u=0,i>f||(u=s[f-i]),w=n[2*f],t.ue+=w*(l+u),r&&(t.we+=w*(r[2*f+1]+u)));if(0!==h){do{for(l=o-1;0===t.be[l];)l--;t.be[l]--,t.be[l+1]+=2,t.be[o]--,h-=2}while(h>0);for(l=o;0!==l;l--)for(f=t.be[l];0!==f;)a=t.ae[--c],a>e.he||(n[2*a+1]!=l&&(t.ue+=(l-n[2*a+1])*n[2*a],n[2*a+1]=l),f--)}})(n),((e,n,r)=>{const s=[];let i,o,c,f=0;for(i=1;15>=i;i++)s[i]=f=f+r[i-1]<<1;for(o=0;n>=o;o++)c=e[2*o+1],0!==c&&(e[2*o]=t(s[c]++,c))})(s,e.he,n.be)}}function Ue(e,t,n,r,s){const i=this;i.se=e,i.pe=t,i.ye=n,i.oe=r,i.me=s}Ke.ge=[0,1,2,3,4,5,6,7].concat(...Be([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]])),Ke.ke=[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],Ke.ve=[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],Ke.Se=e=>256>e?Me[e]:Me[256+(e>>>7)],Ke.ze=[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],Ke.Ce=[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],Ke.xe=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],Ke._e=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];const Ne=Be([[144,8],[112,9],[24,7],[8,8]]);Ue.Ae=Ee([12,140,76,204,44,172,108,236,28,156,92,220,60,188,124,252,2,130,66,194,34,162,98,226,18,146,82,210,50,178,114,242,10,138,74,202,42,170,106,234,26,154,90,218,58,186,122,250,6,134,70,198,38,166,102,230,22,150,86,214,54,182,118,246,14,142,78,206,46,174,110,238,30,158,94,222,62,190,126,254,1,129,65,193,33,161,97,225,17,145,81,209,49,177,113,241,9,137,73,201,41,169,105,233,25,153,89,217,57,185,121,249,5,133,69,197,37,165,101,229,21,149,85,213,53,181,117,245,13,141,77,205,45,173,109,237,29,157,93,221,61,189,125,253,19,275,147,403,83,339,211,467,51,307,179,435,115,371,243,499,11,267,139,395,75,331,203,459,43,299,171,427,107,363,235,491,27,283,155,411,91,347,219,475,59,315,187,443,123,379,251,507,7,263,135,391,71,327,199,455,39,295,167,423,103,359,231,487,23,279,151,407,87,343,215,471,55,311,183,439,119,375,247,503,15,271,143,399,79,335,207,463,47,303,175,431,111,367,239,495,31,287,159,415,95,351,223,479,63,319,191,447,127,383,255,511,0,64,32,96,16,80,48,112,8,72,40,104,24,88,56,120,4,68,36,100,20,84,52,116,3,131,67,195,35,163,99,227].map(((e,t)=>[e,Ne[t]])));const Oe=Be([[30,5]]);function Te(e,t,n,r,s){const i=this;i.Ie=e,i.De=t,i.Ve=n,i.Pe=r,i.Re=s}Ue.Be=Ee([0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30,1,17,9,25,5,21,13,29,3,19,11,27,7,23].map(((e,t)=>[e,Oe[t]]))),Ue.Ee=new Ue(Ue.Ae,Ke.ze,257,286,15),Ue.Me=new Ue(Ue.Be,Ke.Ce,0,30,15),Ue.Ke=new Ue(null,Ke.xe,0,19,7);const We=[new Te(0,0,0,0,0),new Te(4,4,8,4,1),new Te(4,5,16,8,1),new Te(4,6,32,32,1),new Te(4,4,16,16,2),new Te(8,16,32,32,2),new Te(8,16,128,128,2),new Te(8,32,128,256,2),new Te(32,128,258,1024,2),new Te(32,258,258,4096,2)],je=[\"need dictionary\",\"stream end\",\"\",\"\",\"stream error\",\"data error\",\"\",\"buffer error\",\"\",\"\"],He=113,Le=666,Fe=262;function qe(e,t,n,r){const s=e[2*t],i=e[2*n];return i>s||s==i&&r[t]<=r[n]}function Ge(){const e=this;let t,n,s,c,f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z,C,x,_,A,I,D,V,P,R,B,E,M,K;const U=new Ke,N=new Ke,O=new Ke;let T,W,j,H,L,F;function q(){let t;for(t=0;286>t;t++)E[2*t]=0;for(t=0;30>t;t++)M[2*t]=0;for(t=0;19>t;t++)K[2*t]=0;E[512]=1,e.ue=e.we=0,W=j=0}function G(e,t){let n,r=-1,s=e[1],i=0,o=7,c=4;0===s&&(o=138,c=3),e[2*(t+1)+1]=65535;for(let f=0;t>=f;f++)n=s,s=e[2*(f+1)+1],++ii?K[2*n]+=i:0!==n?(n!=r&&K[2*n]++,K[32]++):i>10?K[36]++:K[34]++,i=0,r=n,0===s?(o=138,c=3):n==s?(o=6,c=3):(o=7,c=4))}function J(t){e.Ue[e.pending++]=t}function Q(e){J(255&e),J(e>>>8&255)}function X(e,t){let n;const r=t;F>16-r?(n=e,L|=n<>>16-F,F+=r-16):(L|=e<=n;n++)if(r=i,i=e[2*(n+1)+1],++o>=c||r!=i){if(f>o)do{Y(r,K)}while(0!=--o);else 0!==r?(r!=s&&(Y(r,K),o--),Y(16,K),X(o-3,2)):o>10?(Y(18,K),X(o-11,7)):(Y(17,K),X(o-3,3));o=0,s=r,0===i?(c=138,f=3):r==i?(c=6,f=3):(c=7,f=4)}}function $(){16==F?(Q(L),L=0,F=0):8>F||(J(255&L),L>>>=8,F-=8)}function ee(t,n){let s,i,o;if(e.Ne[W]=t,e.Oe[W]=255&n,W++,0===t?E[2*n]++:(j++,t--,E[2*(Ke.ge[n]+256+1)]++,M[2*Ke.Se(t)]++),0==(8191&W)&&V>2){for(s=8*W,i=C-k,o=0;30>o;o++)s+=M[2*o]*(5+Ke.Ce[o]);if(s>>>=3,jc);Y(256,t),H=t[513]}function ne(){F>8?Q(L):F>0&&J(255&L),L=0,F=0}function re(t,n,r){X(0+(r?1:0),3),((t,n)=>{ne(),H=8,Q(n),Q(~n),e.Ue.set(u.subarray(t,t+n),e.pending),e.pending+=n})(t,n)}function se(n){((t,n,r)=>{let s,i,o=0;V>0?(U.ne(e),N.ne(e),o=(()=>{let t;for(G(E,U.he),G(M,N.he),O.ne(e),t=18;t>=3&&0===K[2*Ke._e[t]+1];t--);return e.ue+=14+3*(t+1),t})(),s=e.ue+3+7>>>3,i=e.we+3+7>>>3,i>s||(s=i)):s=i=n+5,n+4>s||-1==t?i==s?(X(2+(r?1:0),3),te(Ue.Ae,Ue.Be)):(X(4+(r?1:0),3),((e,t,n)=>{let r;for(X(e-257,5),X(t-1,5),X(n-4,4),r=0;n>r;r++)X(K[2*Ke._e[r]+1],3);Z(E,e-1),Z(M,t-1)})(U.he+1,N.he+1,o+1),te(E,M)):re(t,n,r),q(),r&&ne()})(0>k?-1:k,C-k,n),k=C,t.Te()}function ie(){let e,n,r,s;do{if(s=w-_-C,0===s&&0===C&&0===_)s=f;else if(-1==s)s--;else if(C>=f+f-Fe){u.set(u.subarray(f,f+f),0),x-=f,C-=f,k-=f,e=y,r=e;do{n=65535&d[--r],d[r]=f>n?0:n-f}while(0!=--e);e=f,r=e;do{n=65535&h[--r],h[r]=f>n?0:n-f}while(0!=--e);s+=f}if(0===t.We)return;e=t.je(u,C+_,s),_+=e,3>_||(p=255&u[C],p=(p<_&&0!==t.We)}function oe(e){let t,n,r=I,s=C,i=A;const o=C>f-Fe?C-(f-Fe):0;let c=B;const a=l,w=C+258;let d=u[s+i-1],p=u[s+i];R>A||(r>>=2),c>_&&(c=_);do{if(t=e,u[t+i]==p&&u[t+i-1]==d&&u[t]==u[s]&&u[++t]==u[s+1]){s+=2,t++;do{}while(u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&w>s);if(n=258-(w-s),s=w-258,n>i){if(x=e,i=n,n>=c)break;d=u[s+i-1],p=u[s+i]}}}while((e=65535&h[e&a])>o&&0!=--r);return i>_?_:i}e.le=[],e.be=[],e.ae=[],E=[],M=[],K=[],e.de=(t,n)=>{const r=e.ae,s=r[n];let i=n<<1;for(;i<=e.ce&&(i(W||(W=8),j||(j=8),G||(G=0),t.Le=null,-1==S&&(S=6),1>j||j>9||8!=W||9>x||x>15||0>S||S>9||0>G||G>2?Re:(t.Fe=e,a=x,f=1<(t.qe=t.Ge=0,t.Le=null,e.pending=0,e.Je=0,n=He,c=0,U.re=E,U.ie=Ue.Ee,N.re=M,N.ie=Ue.Me,O.re=K,O.ie=Ue.Ke,L=0,F=0,H=8,q(),(()=>{w=2*f,d[y-1]=0;for(let e=0;y-1>e;e++)d[e]=0;D=We[V].De,R=We[V].Ie,B=We[V].Ve,I=We[V].Pe,C=0,k=0,_=0,v=A=2,z=0,p=0})(),0))(t))),e.Qe=()=>42!=n&&n!=He&&n!=Le?Re:(e.Oe=null,e.Ne=null,e.Ue=null,d=null,h=null,u=null,e.Fe=null,n==He?-3:0),e.Xe=(e,t,n)=>{let r=0;return-1==t&&(t=6),0>t||t>9||0>n||n>2?Re:(We[V].Re!=We[t].Re&&0!==e.qe&&(r=e.Ye(1)),V!=t&&(V=t,D=We[V].De,R=We[V].Ie,B=We[V].Ve,I=We[V].Pe),P=n,r)},e.Ze=(e,t,r)=>{let s,i=r,o=0;if(!t||42!=n)return Re;if(3>i)return 0;for(i>f-Fe&&(i=f-Fe,o=r-i),u.set(t.subarray(o,o+i),0),C=i,k=i,p=255&u[0],p=(p<=s;s++)p=(p<{let o,w,m,I,R;if(i>4||0>i)return Re;if(!r.$e||!r.et&&0!==r.We||n==Le&&4!=i)return r.Le=je[4],Re;if(0===r.tt)return r.Le=je[7],-5;var B;if(t=r,I=c,c=i,42==n&&(w=8+(a-8<<4)<<8,m=(V-1&255)>>1,m>3&&(m=3),w|=m<<6,0!==C&&(w|=32),w+=31-w%31,n=He,J((B=w)>>8&255),J(255&B)),0!==e.pending){if(t.Te(),0===t.tt)return c=-1,0}else if(0===t.We&&I>=i&&4!=i)return t.Le=je[7],-5;if(n==Le&&0!==t.We)return r.Le=je[7],-5;if(0!==t.We||0!==_||0!=i&&n!=Le){switch(R=-1,We[V].Re){case 0:R=(e=>{let n,r=65535;for(r>s-5&&(r=s-5);;){if(1>=_){if(ie(),0===_&&0==e)return 0;if(0===_)break}if(C+=_,_=0,n=k+r,(0===C||C>=n)&&(_=C-n,C=n,se(!1),0===t.tt))return 0;if(C-k>=f-Fe&&(se(!1),0===t.tt))return 0}return se(4==e),0===t.tt?4==e?2:0:4==e?3:1})(i);break;case 1:R=(e=>{let n,r=0;for(;;){if(Fe>_){if(ie(),Fe>_&&0==e)return 0;if(0===_)break}if(3>_||(p=(p<f-Fe||2!=P&&(v=oe(r)),3>v)n=ee(0,255&u[C]),_--,C++;else if(n=ee(C-x,v-3),_-=v,v>D||3>_)C+=v,v=0,p=255&u[C],p=(p<{let n,r,s=0;for(;;){if(Fe>_){if(ie(),Fe>_&&0==e)return 0;if(0===_)break}if(3>_||(p=(p<A&&f-Fe>=(C-s&65535)&&(2!=P&&(v=oe(s)),5>=v&&(1==P||3==v&&C-x>4096)&&(v=2)),3>A||v>A)if(0!==z){if(n=ee(0,255&u[C-1]),n&&se(!1),C++,_--,0===t.tt)return 0}else z=1,C++,_--;else{r=C+_-3,n=ee(C-1-S,A-3),_-=A-1,A-=2;do{++C>r||(p=(p<1+H+10-F&&(X(2,3),Y(256,Ue.Ae),$()),H=7;else if(re(0,0,!1),3==i)for(o=0;y>o;o++)d[o]=0;if(t.Te(),0===t.tt)return c=-1,0}}return 4!=i?0:1}}function Je(){const e=this;e.nt=0,e.rt=0,e.We=0,e.qe=0,e.tt=0,e.Ge=0}function Qe(e){const t=new Je,n=(o=e&&e.chunkSize?e.chunkSize:65536)+5*(r.floor(o/16383)+1);var o;const c=new i(n);let f=e?e.level:-1;void 0===f&&(f=-1),t.He(f),t.$e=c,this.append=(e,r)=>{let o,f,a=0,l=0,u=0;const w=[];if(e.length){t.nt=0,t.et=e,t.We=e.length;do{if(t.rt=0,t.tt=n,o=t.Ye(0),0!=o)throw new s(\"deflating: \"+t.Le);t.rt&&(t.rt==n?w.push(new i(c)):w.push(c.slice(0,t.rt))),u+=t.rt,r&&t.nt>0&&t.nt!=a&&(r(t.nt),a=t.nt)}while(t.We>0||0===t.tt);return w.length>1?(f=new i(u),w.forEach((e=>{f.set(e,l),l+=e.length}))):f=w[0]||new i,f}},this.flush=()=>{let e,r,o=0,f=0;const a=[];do{if(t.rt=0,t.tt=n,e=t.Ye(4),1!=e&&0!=e)throw new s(\"deflating: \"+t.Le);n-t.tt>0&&a.push(c.slice(0,t.rt)),f+=t.rt}while(t.We>0||0===t.tt);return t.Qe(),r=new i(f),a.forEach((e=>{r.set(e,o),o+=e.length})),r}}Je.prototype={He(e,t){const n=this;return n.Fe=new Ge,t||(t=15),n.Fe.He(n,e,t)},Ye(e){const t=this;return t.Fe?t.Fe.Ye(t,e):Re},Qe(){const e=this;if(!e.Fe)return Re;const t=e.Fe.Qe();return e.Fe=null,t},Xe(e,t){const n=this;return n.Fe?n.Fe.Xe(n,e,t):Re},Ze(e,t){const n=this;return n.Fe?n.Fe.Ze(n,e,t):Re},je(e,t,n){const r=this;let s=r.We;return s>n&&(s=n),0===s?0:(r.We-=s,e.set(r.et.subarray(r.nt,r.nt+s),t),r.nt+=s,r.qe+=s,s)},Te(){const e=this;let t=e.Fe.pending;t>e.tt&&(t=e.tt),0!==t&&(e.$e.set(e.Fe.Ue.subarray(e.Fe.Je,e.Fe.Je+t),e.rt),e.rt+=t,e.Fe.Je+=t,e.Ge+=t,e.tt-=t,e.Fe.pending-=t,0===e.Fe.pending&&(e.Fe.Je=0))}};const Xe=-2,Ye=-3,Ze=-5,$e=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],et=[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],tt=[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],nt=[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],rt=[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],st=[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],it=[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 ot(){let e,t,n,r,s,i;function o(e,t,o,c,f,a,l,u,w,h,d){let p,y,m,b,g,k,v,S,z,C,x,_,A,I,D;C=0,g=o;do{n[e[t+C]]++,C++,g--}while(0!==g);if(n[0]==o)return l[0]=-1,u[0]=0,0;for(S=u[0],k=1;15>=k&&0===n[k];k++);for(v=k,k>S&&(S=k),g=15;0!==g&&0===n[g];g--);for(m=g,S>g&&(S=g),u[0]=S,I=1<k;k++,I<<=1)if(0>(I-=n[k]))return Ye;if(0>(I-=n[g]))return Ye;for(n[g]+=I,i[1]=k=0,C=1,A=2;0!=--g;)i[A]=k+=n[C],A++,C++;g=0,C=0;do{0!==(k=e[t+C])&&(d[i[k]++]=g),C++}while(++g=v;v++)for(p=n[v];0!=p--;){for(;v>_+S;){if(b++,_+=S,D=m-_,D=D>S?S:D,(y=1<<(k=v-_))>p+1&&(y-=p+1,A=v,D>k))for(;++kn[++A];)y-=n[A];if(D=1<1440)return Ye;s[b]=x=h[0],h[0]+=D,0!==b?(i[b]=g,r[0]=k,r[1]=S,k=g>>>_-S,r[2]=x-s[b-1]-k,w.set(r,3*(s[b-1]+k))):l[0]=x}for(r[1]=v-_,o>C?d[C]d[C]?0:96,r[2]=d[C++]):(r[0]=a[d[C]-c]+16+64,r[2]=f[d[C++]-c]):r[0]=192,y=1<>>_;D>k;k+=y)w.set(r,3*(x+k));for(k=1<>>=1)g^=k;for(g^=k,z=(1<<_)-1;(g&z)!=i[b];)b--,_-=S,z=(1<<_)-1}return 0!==I&&1!=m?Ze:0}function c(o){let c;for(e||(e=[],t=[],n=new f(16),r=[],s=new f(15),i=new f(16)),t.lengthc;c++)t[c]=0;for(c=0;16>c;c++)n[c]=0;for(c=0;3>c;c++)r[c]=0;s.set(n.subarray(0,15),0),i.set(n.subarray(0,16),0)}this.st=(n,r,s,i,f)=>{let a;return c(19),e[0]=0,a=o(n,0,19,19,null,null,s,r,i,e,t),a==Ye?f.Le=\"oversubscribed dynamic bit lengths tree\":a!=Ze&&0!==r[0]||(f.Le=\"incomplete dynamic bit lengths tree\",a=Ye),a},this.it=(n,r,s,i,f,a,l,u,w)=>{let h;return c(288),e[0]=0,h=o(s,0,n,257,nt,rt,a,i,u,e,t),0!=h||0===i[0]?(h==Ye?w.Le=\"oversubscribed literal/length tree\":-4!=h&&(w.Le=\"incomplete literal/length tree\",h=Ye),h):(c(288),h=o(s,n,r,0,st,it,l,f,u,e,t),0!=h||0===f[0]&&n>257?(h==Ye?w.Le=\"oversubscribed distance tree\":h==Ze?(w.Le=\"incomplete distance tree\",h=Ye):-4!=h&&(w.Le=\"empty distance tree with lengths\",h=Ye),h):0)}}function ct(){const e=this;let t,n,r,s,i=0,o=0,c=0,f=0,a=0,l=0,u=0,w=0,h=0,d=0;function p(e,t,n,r,s,i,o,c){let f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z;d=c.nt,p=c.We,w=o.ot,h=o.ct,y=o.write,m=yh;)p--,w|=(255&c.ft(d++))<>=a[z+1],h-=a[z+1],0!=(16&u)){for(u&=15,k=a[z+2]+(w&$e[u]),w>>=u,h-=u;15>h;)p--,w|=(255&c.ft(d++))<>=a[z+1],h-=a[z+1],0!=(16&u)){for(u&=15;u>h;)p--,w|=(255&c.ft(d++))<>=u,h-=u,m-=k,v>y){S=y-v;do{S+=o.end}while(0>S);if(u=o.end-S,k>u){if(k-=u,y-S>0&&u>y-S)do{o.lt[y++]=o.lt[S++]}while(0!=--u);else o.lt.set(o.lt.subarray(S,S+u),y),y+=u,S+=u,u=0;S=0}}else S=y-v,y-S>0&&2>y-S?(o.lt[y++]=o.lt[S++],o.lt[y++]=o.lt[S++],k-=2):(o.lt.set(o.lt.subarray(S,S+2),y),y+=2,S+=2,k-=2);if(y-S>0&&k>y-S)do{o.lt[y++]=o.lt[S++]}while(0!=--k);else o.lt.set(o.lt.subarray(S,S+k),y),y+=k,S+=k,k=0;break}if(0!=(64&u))return c.Le=\"invalid distance code\",k=c.We-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ot=w,o.ct=h,c.We=p,c.qe+=d-c.nt,c.nt=d,o.write=y,Ye;f+=a[z+2],f+=w&$e[u],z=3*(l+f),u=a[z]}break}if(0!=(64&u))return 0!=(32&u)?(k=c.We-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ot=w,o.ct=h,c.We=p,c.qe+=d-c.nt,c.nt=d,o.write=y,1):(c.Le=\"invalid literal/length code\",k=c.We-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ot=w,o.ct=h,c.We=p,c.qe+=d-c.nt,c.nt=d,o.write=y,Ye);if(f+=a[z+2],f+=w&$e[u],z=3*(l+f),0===(u=a[z])){w>>=a[z+1],h-=a[z+1],o.lt[y++]=a[z+2],m--;break}}else w>>=a[z+1],h-=a[z+1],o.lt[y++]=a[z+2],m--}while(m>=258&&p>=10);return k=c.We-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ot=w,o.ct=h,c.We=p,c.qe+=d-c.nt,c.nt=d,o.write=y,0}e.init=(e,i,o,c,f,a)=>{t=0,u=e,w=i,r=o,h=c,s=f,d=a,n=null},e.ut=(e,y,m)=>{let b,g,k,v,S,z,C,x=0,_=0,A=0;for(A=y.nt,v=y.We,x=e.ot,_=e.ct,S=e.write,z=S=258&&v>=10&&(e.ot=x,e.ct=_,y.We=v,y.qe+=A-y.nt,y.nt=A,e.write=S,m=p(u,w,r,h,s,d,e,y),A=y.nt,v=y.We,x=e.ot,_=e.ct,S=e.write,z=S_;){if(0===v)return e.ot=x,e.ct=_,y.We=v,y.qe+=A-y.nt,y.nt=A,e.write=S,e.wt(y,m);m=0,v--,x|=(255&y.ft(A++))<<_,_+=8}if(g=3*(o+(x&$e[b])),x>>>=n[g+1],_-=n[g+1],k=n[g],0===k){f=n[g+2],t=6;break}if(0!=(16&k)){a=15&k,i=n[g+2],t=2;break}if(0==(64&k)){c=k,o=g/3+n[g+2];break}if(0!=(32&k)){t=7;break}return t=9,y.Le=\"invalid literal/length code\",m=Ye,e.ot=x,e.ct=_,y.We=v,y.qe+=A-y.nt,y.nt=A,e.write=S,e.wt(y,m);case 2:for(b=a;b>_;){if(0===v)return e.ot=x,e.ct=_,y.We=v,y.qe+=A-y.nt,y.nt=A,e.write=S,e.wt(y,m);m=0,v--,x|=(255&y.ft(A++))<<_,_+=8}i+=x&$e[b],x>>=b,_-=b,c=w,n=s,o=d,t=3;case 3:for(b=c;b>_;){if(0===v)return e.ot=x,e.ct=_,y.We=v,y.qe+=A-y.nt,y.nt=A,e.write=S,e.wt(y,m);m=0,v--,x|=(255&y.ft(A++))<<_,_+=8}if(g=3*(o+(x&$e[b])),x>>=n[g+1],_-=n[g+1],k=n[g],0!=(16&k)){a=15&k,l=n[g+2],t=4;break}if(0==(64&k)){c=k,o=g/3+n[g+2];break}return t=9,y.Le=\"invalid distance code\",m=Ye,e.ot=x,e.ct=_,y.We=v,y.qe+=A-y.nt,y.nt=A,e.write=S,e.wt(y,m);case 4:for(b=a;b>_;){if(0===v)return e.ot=x,e.ct=_,y.We=v,y.qe+=A-y.nt,y.nt=A,e.write=S,e.wt(y,m);m=0,v--,x|=(255&y.ft(A++))<<_,_+=8}l+=x&$e[b],x>>=b,_-=b,t=5;case 5:for(C=S-l;0>C;)C+=e.end;for(;0!==i;){if(0===z&&(S==e.end&&0!==e.read&&(S=0,z=S7&&(_-=8,v++,A--),e.write=S,m=e.wt(y,m),S=e.write,z=S{}}ot.dt=(e,t,n,r)=>(e[0]=9,t[0]=5,n[0]=et,r[0]=tt,0);const ft=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function at(e,t){const n=this;let r,s=0,o=0,c=0,a=0;const l=[0],u=[0],w=new ct;let h=0,d=new f(4320);const p=new ot;n.ct=0,n.ot=0,n.lt=new i(t),n.end=t,n.read=0,n.write=0,n.reset=(e,t)=>{t&&(t[0]=0),6==s&&w.ht(e),s=0,n.ct=0,n.ot=0,n.read=n.write=0},n.reset(e,null),n.wt=(e,t)=>{let r,s,i;return s=e.rt,i=n.read,r=(i>n.write?n.end:n.write)-i,r>e.tt&&(r=e.tt),0!==r&&t==Ze&&(t=0),e.tt-=r,e.Ge+=r,e.$e.set(n.lt.subarray(i,i+r),s),s+=r,i+=r,i==n.end&&(i=0,n.write==n.end&&(n.write=0),r=n.write-i,r>e.tt&&(r=e.tt),0!==r&&t==Ze&&(t=0),e.tt-=r,e.Ge+=r,e.$e.set(n.lt.subarray(i,i+r),s),s+=r,i+=r),e.rt=s,n.read=i,t},n.ut=(e,t)=>{let i,f,y,m,b,g,k,v;for(m=e.nt,b=e.We,f=n.ot,y=n.ct,g=n.write,k=gy;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<>>1){case 0:f>>>=3,y-=3,i=7&y,f>>>=i,y-=i,s=1;break;case 1:S=[],z=[],C=[[]],x=[[]],ot.dt(S,z,C,x),w.init(S[0],z[0],C[0],0,x[0],0),f>>>=3,y-=3,s=6;break;case 2:f>>>=3,y-=3,s=3;break;case 3:return f>>>=3,y-=3,s=9,e.Le=\"invalid block type\",t=Ye,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t)}break;case 1:for(;32>y;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<>>16&65535)!=(65535&f))return s=9,e.Le=\"invalid stored block lengths\",t=Ye,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);o=65535&f,f=y=0,s=0!==o?2:0!==h?7:0;break;case 2:if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);if(0===k&&(g==n.end&&0!==n.read&&(g=0,k=gb&&(i=b),i>k&&(i=k),n.lt.set(e.je(m,i),g),m+=i,b-=i,g+=i,k-=i,0!=(o-=i))break;s=0!==h?7:0;break;case 3:for(;14>y;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<29||(i>>5&31)>29)return s=9,e.Le=\"too many length or distance symbols\",t=Ye,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);if(i=258+(31&i)+(i>>5&31),!r||r.lengthv;v++)r[v]=0;f>>>=14,y-=14,a=0,s=4;case 4:for(;4+(c>>>10)>a;){for(;3>y;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<>>=3,y-=3}for(;19>a;)r[ft[a++]]=0;if(l[0]=7,i=p.st(r,l,u,d,e),0!=i)return(t=i)==Ye&&(r=null,s=9),n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);a=0,s=5;case 5:for(;i=c,258+(31&i)+(i>>5&31)>a;){let o,w;for(i=l[0];i>y;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<w)f>>>=i,y-=i,r[a++]=w;else{for(v=18==w?7:w-14,o=18==w?11:3;i+v>y;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<>>=i,y-=i,o+=f&$e[v],f>>>=v,y-=v,v=a,i=c,v+o>258+(31&i)+(i>>5&31)||16==w&&1>v)return r=null,s=9,e.Le=\"invalid bit length repeat\",t=Ye,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);w=16==w?r[v-1]:0;do{r[v++]=w}while(0!=--o);a=v}}if(u[0]=-1,_=[],A=[],I=[],D=[],_[0]=9,A[0]=6,i=c,i=p.it(257+(31&i),1+(i>>5&31),r,_,A,I,D,d,e),0!=i)return i==Ye&&(r=null,s=9),t=i,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);w.init(_[0],A[0],d,I[0],d,D[0]),s=6;case 6:if(n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,1!=(t=w.ut(n,e,t)))return n.wt(e,t);if(t=0,w.ht(e),m=e.nt,b=e.We,f=n.ot,y=n.ct,g=n.write,k=g{n.reset(e,null),n.lt=null,d=null},n.yt=(e,t,r)=>{n.lt.set(e.subarray(t,t+r),0),n.read=n.write=r},n.bt=()=>1==s?1:0}const lt=13,ut=[0,0,255,255];function wt(){const e=this;function t(e){return e&&e.gt?(e.qe=e.Ge=0,e.Le=null,e.gt.mode=7,e.gt.kt.reset(e,null),0):Xe}e.mode=0,e.method=0,e.vt=[0],e.St=0,e.marker=0,e.zt=0,e.Ct=t=>(e.kt&&e.kt.ht(t),e.kt=null,0),e.xt=(n,r)=>(n.Le=null,e.kt=null,8>r||r>15?(e.Ct(n),Xe):(e.zt=r,n.gt.kt=new at(n,1<{let n,r;if(!e||!e.gt||!e.et)return Xe;const s=e.gt;for(t=4==t?Ze:0,n=Ze;;)switch(s.mode){case 0:if(0===e.We)return n;if(n=t,e.We--,e.qe++,8!=(15&(s.method=e.ft(e.nt++)))){s.mode=lt,e.Le=\"unknown compression method\",s.marker=5;break}if(8+(s.method>>4)>s.zt){s.mode=lt,e.Le=\"invalid win size\",s.marker=5;break}s.mode=1;case 1:if(0===e.We)return n;if(n=t,e.We--,e.qe++,r=255&e.ft(e.nt++),((s.method<<8)+r)%31!=0){s.mode=lt,e.Le=\"incorrect header check\",s.marker=5;break}if(0==(32&r)){s.mode=7;break}s.mode=2;case 2:if(0===e.We)return n;n=t,e.We--,e.qe++,s.St=(255&e.ft(e.nt++))<<24&4278190080,s.mode=3;case 3:if(0===e.We)return n;n=t,e.We--,e.qe++,s.St+=(255&e.ft(e.nt++))<<16&16711680,s.mode=4;case 4:if(0===e.We)return n;n=t,e.We--,e.qe++,s.St+=(255&e.ft(e.nt++))<<8&65280,s.mode=5;case 5:return 0===e.We?n:(n=t,e.We--,e.qe++,s.St+=255&e.ft(e.nt++),s.mode=6,2);case 6:return s.mode=lt,e.Le=\"need dictionary\",s.marker=0,Xe;case 7:if(n=s.kt.ut(e,n),n==Ye){s.mode=lt,s.marker=0;break}if(0==n&&(n=t),1!=n)return n;n=t,s.kt.reset(e,s.vt),s.mode=12;case 12:return e.We=0,1;case lt:return Ye;default:return Xe}},e.At=(e,t,n)=>{let r=0,s=n;if(!e||!e.gt||6!=e.gt.mode)return Xe;const i=e.gt;return s<1<{let n,r,s,i,o;if(!e||!e.gt)return Xe;const c=e.gt;if(c.mode!=lt&&(c.mode=lt,c.marker=0),0===(n=e.We))return Ze;for(r=e.nt,s=c.marker;0!==n&&4>s;)e.ft(r)==ut[s]?s++:s=0!==e.ft(r)?0:4-s,r++,n--;return e.qe+=r-e.nt,e.nt=r,e.We=n,c.marker=s,4!=s?Ye:(i=e.qe,o=e.Ge,t(e),e.qe=i,e.Ge=o,c.mode=7,0)},e.Dt=e=>e&&e.gt&&e.gt.kt?e.gt.kt.bt():Xe}function ht(){}function dt(e){const t=new ht,n=e&&e.chunkSize?r.floor(2*e.chunkSize):131072,o=new i(n);let c=!1;t.xt(),t.$e=o,this.append=(e,r)=>{const f=[];let a,l,u=0,w=0,h=0;if(0!==e.length){t.nt=0,t.et=e,t.We=e.length;do{if(t.rt=0,t.tt=n,0!==t.We||c||(t.nt=0,c=!0),a=t._t(0),c&&a===Ze){if(0!==t.We)throw new s(\"inflating: bad input\")}else if(0!==a&&1!==a)throw new s(\"inflating: \"+t.Le);if((c||1===a)&&t.We===e.length)throw new s(\"inflating: bad input\");t.rt&&(t.rt===n?f.push(new i(o)):f.push(o.slice(0,t.rt))),h+=t.rt,r&&t.nt>0&&t.nt!=u&&(r(t.nt),u=t.nt)}while(t.We>0||0===t.tt);return f.length>1?(l=new i(h),f.forEach((e=>{l.set(e,w),w+=e.length}))):l=f[0]||new i,l}},this.flush=()=>{t.Ct()}}ht.prototype={xt(e){const t=this;return t.gt=new wt,e||(e=15),t.gt.xt(t,e)},_t(e){const t=this;return t.gt?t.gt._t(t,e):Xe},Ct(){const e=this;if(!e.gt)return Xe;const t=e.gt.Ct(e);return e.gt=null,t},It(){const e=this;return e.gt?e.gt.It(e):Xe},At(e,t){const n=this;return n.gt?n.gt.At(n,e,t):Xe},ft(e){return this.et[e]},je(e,t){return this.et.subarray(e,e+t)}},self.initCodec=()=>{self.Deflate=Qe,self.Inflate=dt};\\n'],{type:\"text/javascript\"}));e({workerScripts:{inflate:[t],deflate:[t]}})}export{e as configureWebWorker};\n","/// \n\n/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport { Deflate } from \"./lib/core/streams/codecs/deflate.js\";\nimport { Inflate } from \"./lib/core/streams/codecs/inflate.js\";\nimport { configure } from \"./lib/core/configuration.js\";\nimport { getMimeType } from \"./lib/core/util/mime-type.js\";\nimport { terminateWorkers } from \"./lib/core/codec-pool.js\";\n\nconfigure({ Deflate, Inflate });\n\nexport {\n\tfs,\n\tconfigure,\n\tinitShimAsyncCodec,\n\tZipReader,\n\tZipWriter,\n\tReader,\n\tWriter,\n\tTextReader,\n\tTextWriter,\n\tData64URIReader,\n\tData64URIWriter,\n\tBlobReader,\n\tBlobWriter,\n\tHttpReader,\n\tHttpRangeReader,\n\tUint8ArrayWriter,\n\tUint8ArrayReader,\n\tSplitZipReader,\n\tSplitZipWriter,\n\tSplitDataReader,\n\tSplitDataWriter,\n\tERR_HTTP_RANGE,\n\tERR_BAD_FORMAT,\n\tERR_EOCDR_NOT_FOUND,\n\tERR_EOCDR_ZIP64_NOT_FOUND,\n\tERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND,\n\tERR_CENTRAL_DIRECTORY_NOT_FOUND,\n\tERR_LOCAL_FILE_HEADER_NOT_FOUND,\n\tERR_EXTRAFIELD_ZIP64_NOT_FOUND,\n\tERR_ENCRYPTED,\n\tERR_UNSUPPORTED_ENCRYPTION,\n\tERR_UNSUPPORTED_COMPRESSION,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD,\n\tERR_DUPLICATED_NAME,\n\tERR_INVALID_COMMENT,\n\tERR_INVALID_ENTRY_NAME,\n\tERR_INVALID_ENTRY_COMMENT,\n\tERR_INVALID_VERSION,\n\tERR_INVALID_EXTRAFIELD_TYPE,\n\tERR_INVALID_EXTRAFIELD_DATA,\n\tERR_INVALID_ENCRYPTION_STRENGTH,\n\tERR_UNSUPPORTED_FORMAT,\n\tERR_SPLIT_ZIP_FILE,\n\tERR_ITERATOR_COMPLETED_TOO_SOON\n} from \"./lib/zip-fs.js\";\nexport { getMimeType, terminateWorkers };","import * as common from \"./common\";\nimport {\n ZipReader,\n BlobReader,\n BlobWriter,\n TextWriter,\n Entry,\n} from \"@zip.js/zip.js\";\nimport { FastbootDevice, FastbootError, ReconnectCallback } from \"./fastboot\";\nimport { BlobEntryReader } from \"./io\";\n\n/**\n * Callback for factory image flashing progress.\n *\n * @callback FactoryProgressCallback\n * @param {string} action - Action in the flashing process, e.g. unpack/flash.\n * @param {string} item - Item processed by the action, e.g. partition being flashed.\n * @param {number} progress - Progress within the current action between 0 and 1.\n */\nexport type FactoryProgressCallback = (\n action: string,\n item: string,\n progress: number\n) => void;\n\n// Images needed for fastbootd\nconst BOOT_CRITICAL_IMAGES = [\n \"boot\",\n \"dt\",\n \"dtbo\",\n \"init_boot\",\n \"pvmfw\",\n \"recovery\",\n \"vbmeta_system\",\n \"vbmeta_vendor\",\n \"vbmeta\",\n \"vendor_boot\",\n \"vendor_kernel_boot\",\n];\n\n// Less critical images to flash after boot-critical ones\nconst SYSTEM_IMAGES = [\n \"odm\",\n \"odm_dlkm\",\n \"product\",\n \"system_dlkm\",\n \"system_ext\",\n \"system\",\n \"vendor_dlkm\",\n \"vendor\",\n];\n\n/**\n * User-friendly action strings for factory image flashing progress.\n * This can be indexed by the action argument in FactoryFlashCallback.\n */\nexport const USER_ACTION_MAP = {\n load: \"Loading\",\n unpack: \"Unpacking\",\n flash: \"Writing\",\n wipe: \"Wiping\",\n reboot: \"Restarting\",\n};\n\nconst BOOTLOADER_REBOOT_TIME = 4000; // ms\nconst FASTBOOTD_REBOOT_TIME = 16000; // ms\nconst USERDATA_ERASE_TIME = 1000; // ms\n\nasync function flashEntryBlob(\n device: FastbootDevice,\n entry: Entry,\n onProgress: FactoryProgressCallback,\n partition: string\n) {\n const blob: Blob = await common.zipGetData(\n entry,\n new BlobWriter(\"application/octet-stream\"),\n {\n onstart(total: number): Promise | undefined {\n common.logDebug(`Unpacking ${partition} (${total} bytes)`);\n onProgress(\"unpack\", partition, 0.0);\n return;\n },\n onprogress(progress: number, total: number): Promise | undefined {\n onProgress(\"unpack\", partition, progress / total);\n return;\n }\n }\n );\n\n common.logDebug(`Flashing ${partition}`);\n onProgress(\"flash\", partition, 0.0);\n await device.flashBlob(partition, blob, (progress) => {\n onProgress(\"flash\", partition, progress);\n });\n}\n\nasync function tryFlashImages(\n device: FastbootDevice,\n entries: Array,\n onProgress: FactoryProgressCallback,\n imageNames: Array\n) {\n for (let imageName of imageNames) {\n let pattern = new RegExp(`${imageName}(?:-.+)?\\\\.img$`);\n let entry = entries.find((entry) => entry.filename.match(pattern));\n if (entry !== undefined) {\n if (imageName == \"bootloader\") {\n let current_slot = await device.getVariable(\"current-slot\");\n if (current_slot == \"a\") {\n await flashEntryBlob(device, entry, onProgress, (imageName + \"_b\"));\n await device.runCommand(\"set_active:b\");\n } else if (current_slot == \"b\") {\n await flashEntryBlob(device, entry, onProgress, (imageName + \"_a\"));\n await device.runCommand(\"set_active:a\");\n } else {\n throw new FastbootError(\n \"FAIL\",\n `Invalid slot given by bootloader.`\n );\n }\n }\n else {\n await flashEntryBlob(device, entry, onProgress, imageName);\n }\n }\n }\n}\n\nasync function checkRequirements(device: FastbootDevice, androidInfo: string) {\n // Deal with CRLF just in case\n for (let line of androidInfo.replace(\"\\r\", \"\").split(\"\\n\")) {\n let match = line.match(/^require\\s+(.+?)=(.+)$/);\n if (!match) {\n continue;\n }\n\n let variable = match[1];\n // Historical mismatch that we still need to deal with\n if (variable === \"board\") {\n variable = \"product\";\n }\n\n let expectValue = match[2];\n let expectValues: Array = expectValue.split(\"|\");\n\n // Special case: not a real variable at all\n if (variable === \"partition-exists\") {\n // Check whether the partition exists on the device:\n // has-slot = undefined || FAIL => doesn't exist\n // has-slot = yes || no => exists\n let hasSlot = await device.getVariable(`has-slot:${expectValue}`);\n if (hasSlot !== \"yes\" && hasSlot !== \"no\") {\n throw new FastbootError(\n \"FAIL\",\n `Requirement ${variable}=${expectValue} failed, device lacks partition`\n );\n }\n\n // Check whether we recognize the partition\n if (\n !BOOT_CRITICAL_IMAGES.includes(expectValue) &&\n !SYSTEM_IMAGES.includes(expectValue)\n ) {\n throw new FastbootError(\n \"FAIL\",\n `Requirement ${variable}=${expectValue} failed, unrecognized partition`\n );\n }\n } else {\n let realValue = await device.getVariable(variable);\n\n if (expectValues.includes(realValue)) {\n common.logDebug(\n `Requirement ${variable}=${expectValue} passed`\n );\n } else {\n let msg = `Requirement ${variable}=${expectValue} failed, value = ${realValue}`;\n common.logDebug(msg);\n throw new FastbootError(\"FAIL\", msg);\n }\n }\n }\n}\n\nasync function tryReboot(\n device: FastbootDevice,\n target: string,\n onReconnect: ReconnectCallback\n) {\n try {\n await device.reboot(target, false);\n } catch (e) {\n /* Failed = device rebooted by itself */\n }\n\n await device.waitForConnect(onReconnect);\n}\n\nexport async function flashZip(\n device: FastbootDevice,\n blob: Blob,\n wipe: boolean,\n onReconnect: ReconnectCallback,\n onProgress: FactoryProgressCallback = (\n _action: string,\n _item: string,\n _progress: number\n ) => {}\n) {\n onProgress(\"load\", \"package\", 0.0);\n let reader = new ZipReader(new BlobReader(blob));\n let entries = await reader.getEntries();\n\n // Bootloader and radio packs can only be flashed in the bare-metal bootloader\n if ((await device.getVariable(\"is-userspace\")) === \"yes\") {\n await device.reboot(\"bootloader\", true, onReconnect);\n }\n\n // 1. Bootloader pack (repeated for slot A and B)\n await tryFlashImages(device, entries, onProgress, [\"bootloader\"]);\n await common.runWithTimedProgress(\n onProgress,\n \"reboot\",\n \"device\",\n BOOTLOADER_REBOOT_TIME,\n tryReboot(device, \"bootloader\", onReconnect)\n );\n\n await tryFlashImages(device, entries, onProgress, [\"bootloader\"]);\n await common.runWithTimedProgress(\n onProgress,\n \"reboot\",\n \"device\",\n BOOTLOADER_REBOOT_TIME,\n tryReboot(device, \"bootloader\", onReconnect)\n );\n\n // 2. Radio pack\n await tryFlashImages(device, entries, onProgress, [\"radio\"]);\n await common.runWithTimedProgress(\n onProgress,\n \"reboot\",\n \"device\",\n BOOTLOADER_REBOOT_TIME,\n tryReboot(device, \"bootloader\", onReconnect)\n );\n\n // Cancel snapshot update if in progress\n let snapshotStatus = await device.getVariable(\"snapshot-update-status\");\n if (snapshotStatus !== null && snapshotStatus !== \"none\") {\n await device.runCommand(\"snapshot-update:cancel\");\n }\n\n // Load nested images for the following steps\n let entry = entries.find((e) => e.filename.match(/image-.+\\.zip$/));\n const imageReader = new ZipReader(new BlobEntryReader(\n blob,\n entry!,\n \"application/zip\",\n {\n onstart(total: number): Promise | undefined {\n common.logDebug(`Loading nested images from zip (${total} bytes)`);\n onProgress(\"unpack\", \"images\", 0.0);\n return;\n },\n onprogress(progress: number, total: number): Promise | undefined {\n onProgress(\"unpack\", \"images\", progress / total);\n return;\n }\n }\n ));\n const imageEntries = await imageReader.getEntries();\n\n // 3. Check requirements\n entry = imageEntries.find((e) => e.filename === \"android-info.txt\");\n if (entry !== undefined) {\n const reqText: string = await common.zipGetData(entry, new TextWriter());\n await checkRequirements(device, reqText);\n }\n\n // 4. Boot-critical images\n await tryFlashImages(\n device,\n imageEntries,\n onProgress,\n BOOT_CRITICAL_IMAGES\n );\n\n // 5. Super partition template\n // This is also where we reboot to fastbootd.\n entry = imageEntries.find((e) => e.filename === \"super_empty.img\");\n if (entry !== undefined) {\n await common.runWithTimedProgress(\n onProgress,\n \"reboot\",\n \"device\",\n FASTBOOTD_REBOOT_TIME,\n device.reboot(\"fastboot\", true, onReconnect)\n );\n\n let superName = await device.getVariable(\"super-partition-name\");\n if (!superName) {\n superName = \"super\";\n }\n\n let superAction = wipe ? \"wipe\" : \"flash\";\n onProgress(superAction, \"super\", 0.0);\n const superBlob: Blob = await common.zipGetData(\n entry,\n new BlobWriter(\"application/octet-stream\")\n );\n await device.upload(\n superName,\n await common.readBlobAsBuffer(superBlob),\n (progress) => {\n onProgress(superAction, \"super\", progress);\n }\n );\n await device.runCommand(\n `update-super:${superName}${wipe ? \":wipe\" : \"\"}`\n );\n }\n\n // 6. Remaining system images\n await tryFlashImages(device, imageEntries, onProgress, SYSTEM_IMAGES);\n\n // We unconditionally reboot back to the bootloader here if we're in fastbootd,\n // even when there's no custom AVB key, because common follow-up actions like\n // locking the bootloader and wiping data need to be done in the bootloader.\n if ((await device.getVariable(\"is-userspace\")) === \"yes\") {\n await common.runWithTimedProgress(\n onProgress,\n \"reboot\",\n \"device\",\n BOOTLOADER_REBOOT_TIME,\n device.reboot(\"bootloader\", true, onReconnect)\n );\n }\n\n // 7. Custom AVB key\n entry = entries.find((e) => e.filename.endsWith(\"avb_pkmd.bin\"));\n if (entry !== undefined) {\n await device.runCommand(\"erase:avb_custom_key\");\n await flashEntryBlob(device, entry, onProgress, \"avb_custom_key\");\n }\n\n // 8. Wipe userdata\n if (wipe) {\n await common.runWithTimedProgress(\n onProgress,\n \"wipe\",\n \"data\",\n USERDATA_ERASE_TIME,\n device.runCommand(\"erase:userdata\")\n );\n }\n}\n","import * as Sparse from \"./sparse\";\nimport * as common from \"./common\";\nimport {\n FactoryProgressCallback,\n flashZip as flashFactoryZip,\n} from \"./factory\";\n\nconst FASTBOOT_USB_CLASS = 0xff;\nconst FASTBOOT_USB_SUBCLASS = 0x42;\nconst FASTBOOT_USB_PROTOCOL = 0x03;\n\nconst BULK_TRANSFER_SIZE = 16384;\n\nconst DEFAULT_DOWNLOAD_SIZE = 512 * 1024 * 1024; // 512 MiB\n// To conserve RAM and work around Chromium's ~2 GiB size limit, we limit the\n// max download size even if the bootloader can accept more data.\nconst MAX_DOWNLOAD_SIZE = 1024 * 1024 * 1024; // 1 GiB\n\nconst GETVAR_TIMEOUT = 10000; // ms\n\n/**\n * Exception class for USB errors not directly thrown by WebUSB.\n */\nexport class UsbError extends Error {\n constructor(message: string) {\n super(message);\n this.name = \"UsbError\";\n }\n}\n\n/**\n * Exception class for errors returned by the bootloader, as well as high-level\n * fastboot errors resulting from bootloader responses.\n */\nexport class FastbootError extends Error {\n status: string;\n bootloaderMessage: string;\n\n constructor(status: string, message: string) {\n super(`Bootloader replied with ${status}: ${message}`);\n this.status = status;\n this.bootloaderMessage = message;\n this.name = \"FastbootError\";\n }\n}\n\ninterface CommandResponse {\n text: string;\n // hex string from DATA\n dataSize?: string;\n}\n\n/**\n * Callback for progress updates while flashing or uploading an image.\n *\n * @callback FlashProgressCallback\n * @param {number} progress - Progress for the current action, between 0 and 1.\n */\nexport type FlashProgressCallback = (progress: number) => void;\n\n/**\n * Callback for reconnecting to the USB device.\n * This is necessary because some platforms do not support automatic reconnection,\n * and USB connection requests can only be triggered as the result of explicit\n * user action.\n *\n * @callback ReconnectCallback\n */\nexport type ReconnectCallback = () => void;\n\n/**\n * This class is a client for executing fastboot commands and operations on a\n * device connected over USB.\n */\nexport class FastbootDevice {\n device: USBDevice | null;\n epIn: number | null;\n epOut: number | null;\n\n private _registeredUsbListeners: boolean;\n private _connectResolve: ((value: any) => void) | null;\n private _connectReject: ((err: unknown) => void) | null;\n private _disconnectResolve: ((value: any) => void) | null;\n\n /**\n * Create a new fastboot device instance. This doesn't actually connect to\n * any USB devices; call {@link connect} to do so.\n */\n constructor() {\n this.device = null;\n this.epIn = null;\n this.epOut = null;\n\n this._registeredUsbListeners = false;\n this._connectResolve = null;\n this._connectReject = null;\n this._disconnectResolve = null;\n }\n\n /**\n * Returns whether a USB device is connected and ready for use.\n */\n get isConnected() {\n return (\n this.device !== null &&\n this.device.opened &&\n this.device.configurations[0].interfaces[0].claimed\n );\n }\n\n /**\n * Validate the current USB device's details and connect to it.\n *\n * @private\n */\n private async _validateAndConnectDevice() {\n if (this.device === null) {\n throw new UsbError(\"Attempted to connect to null device\");\n }\n\n // Validate device\n let ife = this.device!.configurations[0].interfaces[0].alternates[0];\n if (ife.endpoints.length !== 2) {\n throw new UsbError(\"Interface has wrong number of endpoints\");\n }\n\n this.epIn = null;\n this.epOut = null;\n for (let endpoint of ife.endpoints) {\n common.logVerbose(\"Checking endpoint:\", endpoint);\n if (endpoint.type !== \"bulk\") {\n throw new UsbError(\"Interface endpoint is not bulk\");\n }\n\n if (endpoint.direction === \"in\") {\n if (this.epIn === null) {\n this.epIn = endpoint.endpointNumber;\n } else {\n throw new UsbError(\"Interface has multiple IN endpoints\");\n }\n } else if (endpoint.direction === \"out\") {\n if (this.epOut === null) {\n this.epOut = endpoint.endpointNumber;\n } else {\n throw new UsbError(\"Interface has multiple OUT endpoints\");\n }\n }\n }\n common.logVerbose(\"Endpoints: in =\", this.epIn, \", out =\", this.epOut);\n\n try {\n await this.device!.open();\n // Opportunistically reset to fix issues on some platforms\n try {\n await this.device!.reset();\n } catch (error) {\n /* Failed = doesn't support reset */\n }\n\n await this.device!.selectConfiguration(1);\n await this.device!.claimInterface(0); // fastboot\n } catch (error) {\n // Propagate exception from waitForConnect()\n if (this._connectReject !== null) {\n this._connectReject(error);\n this._connectResolve = null;\n this._connectReject = null;\n }\n\n throw error;\n }\n\n // Return from waitForConnect()\n if (this._connectResolve !== null) {\n this._connectResolve(undefined);\n this._connectResolve = null;\n this._connectReject = null;\n }\n }\n\n /**\n * Wait for the current USB device to disconnect, if it's still connected.\n * Returns immediately if no device is connected.\n */\n async waitForDisconnect() {\n if (this.device === null) {\n return;\n }\n\n return await new Promise((resolve, _reject) => {\n this._disconnectResolve = resolve;\n });\n }\n\n /**\n * Wait for the USB device to connect. Returns at the next connection,\n * regardless of whether the connected USB device matches the previous one.\n *\n * @param {ReconnectCallback} onReconnect - Callback to request device reconnection on Android.\n */\n async waitForConnect(onReconnect: ReconnectCallback = () => {}) {\n // On Android, we need to request the user to reconnect the device manually\n // because there is no support for automatic reconnection.\n if (navigator.userAgent.includes(\"Android\")) {\n await this.waitForDisconnect();\n onReconnect();\n }\n\n return await new Promise((resolve, reject) => {\n this._connectResolve = resolve;\n this._connectReject = reject;\n });\n }\n\n /**\n * Request the user to select a USB device and connect to it using the\n * fastboot protocol.\n *\n * @throws {UsbError}\n */\n async connect() {\n let devices = await navigator.usb.getDevices();\n common.logDebug(\"Found paired USB devices:\", devices);\n if (devices.length === 1) {\n this.device = devices[0];\n } else {\n // If multiple paired devices are connected, request the user to\n // select a specific one to reduce ambiguity. This is also necessary\n // if no devices are already paired, i.e. first use.\n common.logDebug(\n \"No or multiple paired devices are connected, requesting one\"\n );\n this.device = await navigator.usb.requestDevice({\n filters: [\n {\n classCode: FASTBOOT_USB_CLASS,\n subclassCode: FASTBOOT_USB_SUBCLASS,\n protocolCode: FASTBOOT_USB_PROTOCOL,\n },\n ],\n });\n }\n common.logDebug(\"Using USB device:\", this.device);\n\n if (!this._registeredUsbListeners) {\n navigator.usb.addEventListener(\"disconnect\", (event) => {\n if (event.device === this.device) {\n common.logDebug(\"USB device disconnected\");\n if (this._disconnectResolve !== null) {\n this._disconnectResolve(undefined);\n this._disconnectResolve = null;\n }\n }\n });\n\n navigator.usb.addEventListener(\"connect\", async (event) => {\n common.logDebug(\"USB device connected\");\n this.device = event.device;\n\n // Check whether waitForConnect() is pending and save it for later\n let hasPromiseReject = this._connectReject !== null;\n try {\n await this._validateAndConnectDevice();\n } catch (error) {\n // Only rethrow errors from the event handler if waitForConnect()\n // didn't already handle them\n if (!hasPromiseReject) {\n throw error;\n }\n }\n });\n\n this._registeredUsbListeners = true;\n }\n\n await this._validateAndConnectDevice();\n }\n\n /**\n * Read a raw command response from the bootloader.\n *\n * @private\n * @returns {Promise} Object containing response text and data size, if any.\n * @throws {FastbootError}\n */\n private async _readResponse(): Promise {\n let respData = {\n text: \"\",\n } as CommandResponse;\n let respStatus;\n\n do {\n let respPacket = await this.device!.transferIn(this.epIn!, 64);\n let response = new TextDecoder().decode(respPacket.data);\n\n respStatus = response.substring(0, 4);\n let respMessage = response.substring(4);\n common.logDebug(`Response: ${respStatus} ${respMessage}`);\n\n if (respStatus === \"OKAY\") {\n // OKAY = end of response for this command\n respData.text += respMessage;\n } else if (respStatus === \"INFO\") {\n // INFO = additional info line\n respData.text += respMessage + \"\\n\";\n } else if (respStatus === \"DATA\") {\n // DATA = hex string, but it's returned separately for safety\n respData.dataSize = respMessage;\n } else {\n // Assume FAIL or garbage data\n throw new FastbootError(respStatus, respMessage);\n }\n // INFO = more packets are coming\n } while (respStatus === \"INFO\");\n\n return respData;\n }\n\n /**\n * Send a textual command to the bootloader and read the response.\n * This is in raw fastboot format, not AOSP fastboot syntax.\n *\n * @param {string} command - The command to send.\n * @returns {Promise} Object containing response text and data size, if any.\n * @throws {FastbootError}\n */\n async runCommand(command: string): Promise {\n // Command and response length is always 64 bytes regardless of protocol\n if (command.length > 64) {\n throw new RangeError();\n }\n\n // Send raw UTF-8 command\n let cmdPacket = new TextEncoder().encode(command);\n await this.device!.transferOut(this.epOut!, cmdPacket);\n common.logDebug(\"Command:\", command);\n\n return this._readResponse();\n }\n\n /**\n * Read the value of a bootloader variable. Returns undefined if the variable\n * does not exist.\n *\n * @param {string} varName - The name of the variable to get.\n * @returns {Promise} Textual content of the variable.\n * @throws {FastbootError}\n */\n async getVariable(varName: string): Promise {\n let resp;\n try {\n resp = (\n await common.runWithTimeout(\n this.runCommand(`getvar:${varName}`),\n GETVAR_TIMEOUT\n )\n ).text;\n } catch (error) {\n // Some bootloaders return FAIL instead of empty responses, despite\n // what the spec says. Normalize it here.\n if (error instanceof FastbootError && error.status == \"FAIL\") {\n resp = null;\n } else {\n throw error;\n }\n }\n\n // Some bootloaders send whitespace around some variables.\n // According to the spec, non-existent variables should return empty\n // responses\n return resp ? resp.trim() : null;\n }\n\n /**\n * Get the maximum download size for a single payload, in bytes.\n *\n * @private\n * @returns {Promise}\n * @throws {FastbootError}\n */\n private async _getDownloadSize(): Promise {\n try {\n let resp = (await this.getVariable(\n \"max-download-size\"\n ))!.toLowerCase();\n if (resp) {\n // AOSP fastboot requires hex\n return Math.min(parseInt(resp, 16), MAX_DOWNLOAD_SIZE);\n }\n } catch (error) {\n /* Failed = no value, fallthrough */\n }\n\n // FAIL or empty variable means no max, set a reasonable limit to conserve memory\n return DEFAULT_DOWNLOAD_SIZE;\n }\n\n /**\n * Send a raw data payload to the bootloader.\n *\n * @private\n */\n private async _sendRawPayload(\n buffer: ArrayBuffer,\n onProgress: FlashProgressCallback\n ) {\n let i = 0;\n let remainingBytes = buffer.byteLength;\n while (remainingBytes > 0) {\n let chunk = buffer.slice(\n i * BULK_TRANSFER_SIZE,\n (i + 1) * BULK_TRANSFER_SIZE\n );\n if (i % 1000 === 0) {\n common.logVerbose(\n ` Sending ${chunk.byteLength} bytes to endpoint, ${remainingBytes} remaining, i=${i}`\n );\n }\n if (i % 10 === 0) {\n onProgress(\n (buffer.byteLength - remainingBytes) / buffer.byteLength\n );\n }\n\n await this.device!.transferOut(this.epOut!, chunk);\n\n remainingBytes -= chunk.byteLength;\n i += 1;\n }\n\n onProgress(1.0);\n }\n\n /**\n * Upload a payload to the bootloader for later use, e.g. flashing.\n * Does not handle raw images, flashing, or splitting.\n *\n * @param {string} partition - Name of the partition the payload is intended for.\n * @param {ArrayBuffer} buffer - Buffer containing the data to upload.\n * @param {FlashProgressCallback} onProgress - Callback for upload progress updates.\n * @throws {FastbootError}\n */\n async upload(\n partition: string,\n buffer: ArrayBuffer,\n onProgress: FlashProgressCallback = (_progress) => {}\n ) {\n common.logDebug(\n `Uploading single sparse to ${partition}: ${buffer.byteLength} bytes`\n );\n\n // Bootloader requires an 8-digit hex number\n let xferHex = buffer.byteLength.toString(16).padStart(8, \"0\");\n if (xferHex.length !== 8) {\n throw new FastbootError(\n \"FAIL\",\n `Transfer size overflow: ${xferHex} is more than 8 digits`\n );\n }\n\n // Check with the device and make sure size matches\n let downloadResp = await this.runCommand(`download:${xferHex}`);\n if (downloadResp.dataSize === undefined) {\n throw new FastbootError(\n \"FAIL\",\n `Unexpected response to download command: ${downloadResp.text}`\n );\n }\n let downloadSize = parseInt(downloadResp.dataSize!, 16);\n if (downloadSize !== buffer.byteLength) {\n throw new FastbootError(\n \"FAIL\",\n `Bootloader wants ${buffer.byteLength} bytes, requested to send ${buffer.byteLength} bytes`\n );\n }\n\n common.logDebug(`Sending payload: ${buffer.byteLength} bytes`);\n await this._sendRawPayload(buffer, onProgress);\n\n common.logDebug(\"Payload sent, waiting for response...\");\n await this._readResponse();\n }\n\n /**\n * Reboot to the given target, and optionally wait for the device to\n * reconnect.\n *\n * @param {string} target - Where to reboot to, i.e. fastboot or bootloader.\n * @param {boolean} wait - Whether to wait for the device to reconnect.\n * @param {ReconnectCallback} onReconnect - Callback to request device reconnection, if wait is enabled.\n */\n async reboot(\n target: string = \"\",\n wait: boolean = false,\n onReconnect: ReconnectCallback = () => {}\n ) {\n if (target.length > 0) {\n await this.runCommand(`reboot-${target}`);\n } else {\n await this.runCommand(\"reboot\");\n }\n\n if (wait) {\n await this.waitForConnect(onReconnect);\n }\n }\n\n /**\n * Flash the given Blob to the given partition on the device. Any image\n * format supported by the bootloader is allowed, e.g. sparse or raw images.\n * Large raw images will be converted to sparse images automatically, and\n * large sparse images will be split and flashed in multiple passes\n * depending on the bootloader's payload size limit.\n *\n * @param {string} partition - The name of the partition to flash.\n * @param {Blob} blob - The Blob to retrieve data from.\n * @param {FlashProgressCallback} onProgress - Callback for flashing progress updates.\n * @throws {FastbootError}\n */\n async flashBlob(\n partition: string,\n blob: Blob,\n onProgress: FlashProgressCallback = (_progress) => {}\n ) {\n // Use current slot if partition is A/B\n if ((await this.getVariable(`has-slot:${partition}`)) === \"yes\") {\n partition += \"_\" + (await this.getVariable(\"current-slot\"));\n }\n\n let maxDlSize = await this._getDownloadSize();\n let fileHeader = await common.readBlobAsBuffer(\n blob.slice(0, Sparse.FILE_HEADER_SIZE)\n );\n\n let totalBytes = blob.size;\n let isSparse = false;\n try {\n let sparseHeader = Sparse.parseFileHeader(fileHeader);\n if (sparseHeader !== null) {\n totalBytes = sparseHeader.blocks * sparseHeader.blockSize;\n isSparse = true;\n }\n } catch (error) {\n // ImageError = invalid, so keep blob.size\n }\n\n // Logical partitions need to be resized before flashing because they're\n // sized perfectly to the payload.\n if ((await this.getVariable(`is-logical:${partition}`)) === \"yes\") {\n // As per AOSP fastboot, we reset the partition to 0 bytes first\n // to optimize extent allocation.\n await this.runCommand(`resize-logical-partition:${partition}:0`);\n // Set the actual size\n await this.runCommand(\n `resize-logical-partition:${partition}:${totalBytes}`\n );\n }\n\n // Convert image to sparse (for splitting) if it exceeds the size limit\n if (blob.size > maxDlSize && !isSparse) {\n common.logDebug(`${partition} image is raw, converting to sparse`);\n blob = await Sparse.fromRaw(blob);\n }\n\n common.logDebug(\n `Flashing ${blob.size} bytes to ${partition}, ${maxDlSize} bytes per split`\n );\n let splits = 0;\n let sentBytes = 0;\n for await (let split of Sparse.splitBlob(blob, maxDlSize)) {\n await this.upload(partition, split.data, (progress) => {\n onProgress((sentBytes + progress * split.bytes) / totalBytes);\n });\n\n common.logDebug(\"Flashing payload...\");\n await this.runCommand(`flash:${partition}`);\n\n splits += 1;\n sentBytes += split.bytes;\n }\n\n common.logDebug(`Flashed ${partition} with ${splits} split(s)`);\n }\n\n /**\n * Boot the given Blob on the device.\n * Equivalent to `fastboot boot boot.img`.\n *\n * @param {Blob} blob - The Blob to retrieve data from.\n * @param {FlashProgressCallback} onProgress - Callback for flashing progress updates.\n * @throws {FastbootError}\n */\n async bootBlob(\n blob: Blob,\n onProgress: FlashProgressCallback = (_progress) => {}\n ) {\n\n common.logDebug(`Booting ${blob.size} bytes image`);\n\n let data = await common.readBlobAsBuffer(blob);\n await this.upload(\"boot.img\", data, onProgress);\n\n common.logDebug(\"Booting payload...\");\n await this.runCommand(\"boot\");\n\n common.logDebug(`Booted ${blob.size} bytes image`);\n }\n\n /**\n * Flash the given factory images zip onto the device, with automatic handling\n * of firmware, system, and logical partitions as AOSP fastboot and\n * flash-all.sh would do.\n * Equivalent to `fastboot update name.zip`.\n *\n * @param {Blob} blob - Blob containing the zip file to flash.\n * @param {boolean} wipe - Whether to wipe super and userdata. Equivalent to `fastboot -w`.\n * @param {ReconnectCallback} onReconnect - Callback to request device reconnection.\n * @param {FactoryProgressCallback} onProgress - Progress callback for image flashing.\n */\n async flashFactoryZip(\n blob: Blob,\n wipe: boolean,\n onReconnect: ReconnectCallback,\n onProgress: FactoryProgressCallback = (_progress) => {}\n ) {\n return await flashFactoryZip(this, blob, wipe, onReconnect, onProgress);\n }\n}\n"],"names":["DebugLevel","debugLevel","Silent","logDebug","data","console","log","logVerbose","setDebugLevel","level","readBlobAsBuffer","blob","Promise","resolve","reject","reader","FileReader","onload","result","onerror","error","readAsArrayBuffer","async","runWithTimedProgress","onProgress","action","item","duration","workPromise","startTime","Date","getTime","stop","progressPromise","now","targetTime","_reject","window","requestAnimationFrame","race","TimeoutError","Error","constructor","timeout","super","this","name","zipGetData","entry","writer","options","getData","e","ProgressEvent","type","target","FILE_MAGIC","MAJOR_VERSION","MINOR_VERSION","FILE_HEADER_SIZE","CHUNK_HEADER_SIZE","ImageError","message","ChunkType","BlobBuilder","Blob","append","getBlob","parseFileHeader","buffer","view","DataView","getUint32","major","getUint16","minor","fileHdrSize","chunkHdrSize","blockSize","blocks","chunks","crc32","parseChunkHeader","dataBytes","calcChunksBlockSize","map","chunk","reduce","total","c","createImage","header","blobBuilder","ArrayBuffer","dataView","arrayView","Uint8Array","setUint32","setUint16","length","size","chunkArrayView","common.readBlobAsBuffer","set","MAX_BITS","LITERALS","HEAP_SIZE","END_BLOCK","Z_DEFAULT_COMPRESSION","Z_NO_FLUSH","Z_FINISH","Z_OK","Z_STREAM_END","Z_STREAM_ERROR","Z_BUF_ERROR","extractArray","array","flatArray","value","Array","fill","a","b","concat","isArray","_dist_code","Tree","that","bi_reverse","code","len","res","build_tree","s","tree","dyn_tree","stree","stat_desc","static_tree","elems","n","m","node","max_code","heap_len","heap_max","heap","depth","opt_len","static_len","Math","floor","pqdownheap","max","extra","extra_bits","base","extra_base","max_length","h","bits","xbits","f","overflow","bl_count","gen_bitlen","next_code","gen_codes","StaticTree","_length_code","base_length","base_dist","d_code","dist","extra_lbits","extra_dbits","extra_blbits","bl_order","static_ltree2_second_part","static_ltree","index","static_dtree_second_part","static_dtree","static_l_desc","static_d_desc","static_bl_desc","Config","good_length","max_lazy","nice_length","max_chain","func","config_table","z_errmsg","BUSY_STATE","FINISH_STATE","MAX_MATCH","MIN_LOOKAHEAD","smaller","tn2","tm2","Deflate","strm","status","pending_buf_size","last_flush","w_size","w_bits","w_mask","win","window_size","prev","head","ins_h","hash_size","hash_bits","hash_mask","hash_shift","block_start","match_length","prev_match","match_available","strstart","match_start","lookahead","prev_length","max_chain_length","max_lazy_match","strategy","good_match","nice_match","dyn_ltree","dyn_dtree","bl_tree","l_desc","d_desc","bl_desc","lit_bufsize","last_lit","matches","last_eob_len","bi_buf","bi_valid","init_block","i","scan_tree","curlen","prevlen","nextlen","count","max_count","min_count","REP_3_6","REPZ_3_10","REPZ_11_138","put_byte","p","pending_buf","pending","put_short","w","send_bits","val","send_code","c2","send_tree","bi_flush","_tr_tally","lc","out_length","in_length","dcode","dist_buf","lc_buf","compress_block","ltree","dtree","lx","bi_windup","_tr_stored_block","buf","stored_len","eof","subarray","copy_block","_tr_flush_block","opt_lenb","static_lenb","max_blindex","BL_CODES","build_bl_tree","lcodes","dcodes","blcodes","rank","send_all_trees","flush_block_only","flush_pending","fill_window","more","avail_in","read_buf","longest_match","cur_match","match","chain_length","scan","best_len","limit","_nice_match","wmask","strend","scan_end1","scan_end","deflateReset","total_in","total_out","msg","pending_out","MIN_MATCH","lm_init","k","v","j","deflateInit","_level","_method","memLevel","_strategy","dstate","Uint16Array","deflateEnd","deflateParams","err","deflate","deflateSetDictionary","_strm","dictionary","dictLength","flush","level_flags","old_flush","bstate","next_out","next_in","avail_out","Z_NEED_DICT","max_start","max_block_size","deflate_stored","bflush","hash_head","deflate_fast","max_insert","deflate_slow","STATIC_TREES","ZStream","next_in_index","next_out_index","prototype","ret","start","Z_DATA_ERROR","Z_MEM_ERROR","inflate_mask","MANY","fixed_tl","fixed_td","cplens","cplext","cpdist","cpdext","BMAX","InfTree","hn","r","u","x","huft_build","bindex","d","t","hp","g","l","mask","q","xp","y","z","initWorkArea","vsize","Int32Array","inflate_trees_bits","bb","tb","inflate_trees_dynamic","nl","nd","bl","bd","tl","td","inflate_trees_fixed","START","LEN","LENEXT","DIST","DISTEXT","COPY","LIT","WASH","END","BADCODE","InfCodes","mode","tree_index","need","lit","get","lbits","dbits","ltree_index","dtree_index","inflate_fast","tl_index","td_index","tp","tp_index","ml","md","tp_index_t_3","bitb","bitk","write","read","end","read_byte","init","proc","tindex","inflate_flush","free","border","TYPE","LENS","STORED","TABLE","BTREE","DTREE","CODES","DRY","DONELOCKS","BADBLOCKS","InfBlocks","blens","left","table","codes","last","hufts","inftree","reset","bl_","bd_","tl_","td_","set_dictionary","sync_point","BAD","mark","Inflate","inflateReset","istate","method","was","marker","wbits","inflateEnd","inflateInit","inflate","inflateSetDictionary","inflateSync","inflateSyncPoint","MAX_32_BITS","MAX_16_BITS","CENTRAL_FILE_HEADER_SIGNATURE","ZIP64_END_OF_CENTRAL_DIR_SIGNATURE","EXTRAFIELD_TYPE_NTFS_TAG1","UNDEFINED_VALUE","undefined","UNDEFINED_TYPE","FUNCTION_TYPE","StreamAdapter","Codec","TransformStream","_format","codec","transform","controller","enqueue","maxWorkers","navigator","hardwareConcurrency","_error","DEFAULT_CONFIGURATION","chunkSize","terminateWorkerTimeout","useWebWorkers","useCompressionStream","workerScripts","CompressionStreamNative","CompressionStream","DecompressionStreamNative","DecompressionStream","config","Object","assign","configure","configuration","baseURL","setIfDefined","propertyName","propertyValue","application","annodex","bbolin","cap","dsptype","ecmascript","futuresplash","hta","javascript","m3g","mathematica","msaccess","msword","mxf","oda","ogg","pdf","postscript","rar","rtf","smil","xml","zip","applixware","exi","gxf","hyperstudio","ipfix","json","marc","mbox","mp21","mp4","onenote","oxps","pkcs10","pkcs8","pkixcmp","sdp","srgs","widget","winhlp","yang","envoy","fractals","olescript","audio","amr","basic","flac","midi","mpeg","mpegurl","adpcm","s3m","silk","webm","xm","mid","chemical","image","gif","ief","jpeg","pcx","png","tiff","bmp","cgm","g3fax","ktx","sgi","webp","pipeg","rfc822","model","iges","mesh","vrml","text","calendar","css","csv","h323","html","iuls","mathml","plain","richtext","scriptlet","texmacs","n3","sgml","troff","turtle","vcard","webviewhtml","video","avif","dl","dv","fli","gl","quicktime","h261","h263","h264","jpm","mj2","mimeTypes","hasOwnProperty","subtype","indexMimeType","Crc32","crc","offset","Crc32Stream","bitArray","a1","a2","shift","getPartial","_shiftRight","slice","bitLength","clamp","ceil","partial","_end","round","carry","out","push","last2","shift2","pop","bytes","fromBits","arr","byteLength","tmp","toBits","hash","sha1","_init","_key","_h","_buffer","_length","update","utf8String","ol","Uint32Array","_block","splice","finalize","_f","_S","words","cipher","key","aes","_tables","_precompute","sbox","decTable","keyLen","encKey","decKey","rcon","encrypt","_crypt","decrypt","encTable","sboxInv","th","xInv","x2","x4","x8","tDec","tEnc","input","dir","nInnerRounds","t0","t1","t2","t3","b2","kIndex","random","getRandomValues","typedArray","m_w","m_z","rcache","_r","prf","iv","_prf","_initIv","_iv","calculate","incWord","word","b1","b3","incCounter","counter","misc","importKey","password","hmacSha1","pbkdf2","salt","ui","arrayBuffer","outLength","setInt32","hmac","Hash","_hash","exKey","_baseHash","bs","_resultHash","_updated","digest","GET_RANDOM_VALUES_SUPPORTED","crypto","ERR_INVALID_PASSWORD","ERR_INVALID_SIGNATURE","ERR_ABORT_CHECK_PASSWORD","BLOCK_LENGTH","RAW_FORMAT","PBKDF2_ALGORITHM","BASE_KEY_ALGORITHM","DERIVED_BITS_ALGORITHM","iterations","DERIVED_BITS_USAGE","SALT_LENGTH","KEY_LENGTH","SIGNATURE_LENGTH","COUNTER_DEFAULT_VALUE","CRYPTO_API_SUPPORTED","subtle","SUBTLE_API_SUPPORTED","codecBytes","Aes","CtrGladman","ctrGladman","HmacSha1","IMPORT_KEY_SUPPORTED","DERIVE_BITS_SUPPORTED","deriveBits","AESDecryptionStream","signed","encryptionStrength","checkPasswordOnly","ready","resolveReady","strength","aesCrypto","preamble","passwordVerificationKey","createKeys","passwordVerification","createDecryptionKeys","output","ctr","chunkToDecrypt","originalSignature","decryptedChunkArray","encryptedChunk","decryptedChunk","signature","indexSignature","AESEncryptionStream","stream","createEncryptionKeys","encryptedChunkArray","paddingStart","paddingEnd","verifySignature","inputLength","inputArray","expand","inputChunk","outputChunk","encodedPassword","TextEncoder","unescape","encodeURIComponent","charCodeAt","encode","encodeText","baseKey","format","algorithm","extractable","keyUsages","derivedBits","compositeKey","authentication","keys","from","leftArray","rightArray","begin","HEADER_LENGTH","ZipCryptoDecryptionStream","zipCrypto","decryptedHeader","ZipCryptoEncryptionStream","getByte","updateKeys","crcKey0","crcKey2","byte","key0","key1","key2","getInt32","imul","getInt8","temp","number","COMPRESSION_FORMAT","DeflateStream","compressed","encrypted","crc32Stream","encryptionStream","readable","filterEmptyChunks","tee","pipeThrough","pipeThroughCommpressionStream","setReadable","getReader","InflateStream","decryptionStream","streamSignature","dataViewSignature","defineProperty","CodecStreamNative","CodecStream","transformStream","MESSAGE_EVENT_TYPE","MESSAGE_START","MESSAGE_PULL","MESSAGE_DATA","MESSAGE_ACK_DATA","MESSAGE_CLOSE","CODEC_INFLATE","codecType","Stream","startsWith","WEB_WORKERS_SUPPORTED","Worker","CodecWorker","workerData","writable","streamOptions","transferStreams","scripts","onTaskFinished","signal","busy","ProgressWatcherStream","terminate","worker","interface","createWebWorkerInterface","createWorkerInterface","readableSource","onstart","onprogress","onend","chunkOffset","callHandler","highWaterMark","handler","parameters","run","codecStream","pipeTo","preventClose","preventAbort","runWorker","getWebWorker","resolveResult","rejectResult","closed","writableSource","getWriter","resolveStreamClosed","WritableStream","close","releaseLock","abort","reason","watchClosedStream","streamsTransferred","sendMessage","resultValue","runWebWorker","classicWorkersSupported","transferStreamsSupported","url","workerOptions","scriptUrl","URL","addEventListener","event","messageId","stack","responseError","done","onMessage","transferables","postMessage","pool","pendingRequests","indexWorker","clearTerminateTimeout","terminateTimeout","clearTimeout","DEFAULT_CHUNK_SIZE","PROPERTY_NAME_WRITABLE","initialized","Reader","ReadableStream","diskNumberStart","readUint8Array","min","BlobReader","offsetEnd","BlobWriter","contentType","headers","Response","TextWriter","encoding","utf8","toLowerCase","readAsText","SplitDataReader","readers","lastDiskNumber","all","diskReader","diskNumber","currentDiskNumber","currentReaderOffset","currentReader","currentReaderSize","chunkLength","SplitDataWriter","writerGenerator","maxSize","zipWriter","diskSourceWriter","diskWritable","diskWriter","diskOffset","availableSize","writeChunk","closeDisk","next","initStream","initSize","initReader","CP437","split","VALID_CP437","decodeText","trim","stringValue","indexCharacter","TextDecoder","decode","decodeCP437","PROPERTY_NAME_FILENAME","PROPERTY_NAME_RAW_FILENAME","PROPERTY_NAME_COMMENT","PROPERTY_NAME_RAW_COMMENT","PROPERTY_NAME_UNCOMPPRESSED_SIZE","PROPERTY_NAME_COMPPRESSED_SIZE","PROPERTY_NAME_OFFSET","PROPERTY_NAME_DISK_NUMBER_START","PROPERTY_NAME_LAST_MODIFICATION_DATE","PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE","PROPERTY_NAME_LAST_ACCESS_DATE","PROPERTY_NAME_RAW_LAST_ACCESS_DATE","PROPERTY_NAME_CREATION_DATE","PROPERTY_NAME_RAW_CREATION_DATE","PROPERTY_NAMES","Entry","forEach","ERR_BAD_FORMAT","ERR_EXTRAFIELD_ZIP64_NOT_FOUND","ERR_UNSUPPORTED_COMPRESSION","ERR_SPLIT_ZIP_FILE","CHARSET_UTF8","CHARSET_CP437","ZIP64_PROPERTIES","ZIP64_EXTRACTION","getValue","getBigUint64","ZipReader","zipReader","getChunkSize","endOfDirectoryInfo","startOffset","minimumBytes","maximumLength","signatureArray","getDataView","maximumBytes","seek","indexByte","seekSignature","endOfDirectoryView","directoryDataLength","directoryDataOffset","commentOffset","commentLength","appendedDataOffset","expectedLastDiskNumber","filesLength","prependedDataLength","endOfDirectoryLocatorView","endOfDirectoryArray","expectedDirectoryDataOffset","originalDirectoryDataOffset","directoryArray","directoryView","filenameEncoding","getOptionValue","commentEncoding","indexFile","fileEntry","ZipEntry","readCommonHeader","languageEncodingFlag","Boolean","bitFlag","filenameOffset","extraFieldOffset","filenameLength","extraFieldLength","versionMadeBy","msDosCompatible","rawFilename","endOffset","rawComment","filenameUTF8","commentUTF8","directory","getUint8","offsetFileEntry","compressedSize","uncompressedSize","internalFileAttribute","externalFileAttribute","rawExtraField","filename","comment","endsWith","readCommonFooter","extractPrependedData","extractAppendedData","prependedData","appendedData","entries","getEntriesGenerator","zipEntry","extraFieldAES","compressionMethod","rawLastModDate","localDirectory","originalCompressionMethod","lastAccessDate","creationDate","dataOffset","Infinity","initWriter","dataDescriptor","outputSize","streamCopy","find","Number","isFinite","setTimeout","filter","locked","rawBitFlag","version","lastModDate","getDate","extraField","Map","rawExtraFieldView","offsetExtraField","extraFieldZip64","zip64","extraFieldView","missingProperties","indexMissingProperty","extraction","readExtraFieldZip64","extraFieldUnicodePath","readExtraFieldUnicode","extraFieldUnicodeComment","vendorVersion","vendorId","readExtraFieldAES","extraFieldNTFS","tag1Data","tagValue","attributeSize","tag1View","rawLastAccessDate","rawCreationDate","getDateNTFS","extraFieldData","readExtraFieldNTFS","extraFieldExtendedTimestamp","flags","timeProperties","timeRawProperties","indexProperty","time","rawPropertyName","readExtraFieldExtendedTimestamp","extraFieldUnicode","valid","timeRaw","date","BigInt","parseIndex","createObjectURL","configureWebWorker","bufsize","lastIndex","bufferIndex","bufferSize","buffers","nomoreinput","BlobEntryReaderImpl","entryMetadata","headerSize","BlobEntryReader","mimeString","headerBeginRaw","getEntryMetadata","entryBlob","BOOT_CRITICAL_IMAGES","SYSTEM_IMAGES","USER_ACTION_MAP","load","unpack","flash","wipe","reboot","BOOTLOADER_REBOOT_TIME","flashEntryBlob","device","partition","common.zipGetData","common.logDebug","progress","flashBlob","tryFlashImages","imageNames","imageName","pattern","RegExp","current_slot","getVariable","runCommand","FastbootError","tryReboot","onReconnect","waitForConnect","flashZip","_action","_item","_progress","getEntries","common.runWithTimedProgress","snapshotStatus","imageReader","imageEntries","reqText","androidInfo","line","replace","variable","expectValue","expectValues","hasSlot","includes","realValue","checkRequirements","superName","superAction","superBlob","upload","UsbError","bootloaderMessage","FastbootDevice","epIn","epOut","_registeredUsbListeners","_connectResolve","_connectReject","_disconnectResolve","isConnected","opened","configurations","interfaces","claimed","ife","alternates","endpoints","endpoint","common.logVerbose","direction","endpointNumber","open","selectConfiguration","claimInterface","userAgent","waitForDisconnect","devices","usb","getDevices","requestDevice","filters","classCode","subclassCode","protocolCode","hasPromiseReject","_validateAndConnectDevice","respStatus","respData","respPacket","transferIn","response","substring","respMessage","dataSize","command","RangeError","cmdPacket","transferOut","_readResponse","varName","resp","promise","timedOut","tid","then","catch","finally","parseInt","remainingBytes","xferHex","toString","padStart","downloadResp","_sendRawPayload","wait","maxDlSize","_getDownloadSize","fileHeader","Sparse.FILE_HEADER_SIZE","totalBytes","isSparse","sparseHeader","Sparse.parseFileHeader","Raw","Sparse.fromRaw","splits","sentBytes","splitSize","splitChunks","splitDataBytes","bytesRemaining","calcChunksDataSize","splitBlocks","Skip","splitImage","Sparse.splitBlob","flashFactoryZip"],"mappings":"AAKA,IAAYA,GAAZ,SAAYA,GACRA,EAAAA,EAAA,OAAA,GAAA,SACAA,EAAAA,EAAA,MAAA,GAAA,QACAA,EAAAA,EAAA,QAAA,GAAA,SACH,CAJD,CAAYA,IAAAA,EAIX,CAAA,IAUD,IAAIC,EAAaD,EAAWE,OAEZ,SAAAC,KAAYC,GACpBH,GAAc,GACdI,QAAQC,OAAOF,EAEvB,CAEgB,SAAAG,KAAcH,GACtBH,GAAc,GACdI,QAAQC,OAAOF,EAEvB,CAUM,SAAUI,EAAcC,GAC1BR,EAAaQ,CACjB,CASM,SAAUC,EAAiBC,GAC7B,OAAO,IAAIC,SAAQ,CAACC,EAASC,KACzB,IAAIC,EAAS,IAAIC,WACjBD,EAAOE,OAAS,KACZJ,EAAQE,EAAOG,OAAuB,EAE1CH,EAAOI,QAAU,KACbL,EAAOC,EAAOK,MAAM,EAGxBL,EAAOM,kBAAkBV,EAAK,GAEtC,CAQOW,eAAeC,EAClBC,EACAC,EACAC,EACAC,EACAC,GAEA,IAAIC,GAAY,IAAIC,MAAOC,UACvBC,GAAO,EAEXR,EAAWC,EAAQC,EA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AAKqqC,OAAOxC,EAAWnM,EAAMn+B,MAAOyqC,IACtCrpC,GAAYuwC,EAAYlH,EAAWtM,EAAMnV,OAASooB,EAAW,IAGjE5G,EAAgB,6BACV/nC,KAAKyoC,WAAW,SAASZ,KAE/BoH,GAAU,EACVC,GAAaxT,EAAMnV,MAGvBwhB,EAAgB,WAAWF,UAAkBoH,aAChD,CAUDxwC,eACIX,EACAa,EAAoC,CAACsqC,IAAD,IAGpClB,EAAgB,WAAWjqC,EAAKyF,oBAEhC,IAAIhG,QAAakG,EAAwB3F,SACnCkC,KAAKqqC,OAAO,WAAY9sC,EAAMoB,GAEpCopC,EAAgB,4BACV/nC,KAAKyoC,WAAW,QAEtBV,EAAgB,UAAUjqC,EAAKyF,mBAClC,CAaD9E,sBACIX,EACA0pC,EACAoB,EACAjqC,EAAsC,CAACsqC,IAAD,IAEtC,aAAa2G,GAAgB5vC,KAAMlC,EAAM0pC,EAAMoB,EAAajqC,EAC/D","x_google_ignoreList":[2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,26,27]} \ No newline at end of file diff --git a/dist/fastboot.mjs b/dist/fastboot.mjs deleted file mode 100644 index 09839d0..0000000 --- a/dist/fastboot.mjs +++ /dev/null @@ -1,9730 +0,0 @@ -const ZIP_ENTRY_HEADER_BEGIN_LENGTH = 30; // bytes -var DebugLevel; -(function (DebugLevel) { - DebugLevel[DebugLevel["Silent"] = 0] = "Silent"; - DebugLevel[DebugLevel["Debug"] = 1] = "Debug"; - DebugLevel[DebugLevel["Verbose"] = 2] = "Verbose"; -})(DebugLevel || (DebugLevel = {})); -let debugLevel = DebugLevel.Silent; -function logDebug(...data) { - if (debugLevel >= 1) { - console.log(...data); - } -} -function logVerbose(...data) { - if (debugLevel >= 2) { - console.log(...data); - } -} -/** - * Change the debug level for the fastboot client: - * - 0 = silent - * - 1 = debug, recommended for general use - * - 2 = verbose, for debugging only - * - * @param {number} level - Debug level to use. - */ -function setDebugLevel(level) { - debugLevel = level; -} -/** - * Reads all of the data in the given blob and returns it as an ArrayBuffer. - * - * @param {Blob} blob - Blob with the data to read. - * @returns {Promise} ArrayBuffer containing data from the blob. - * @ignore - */ -function readBlobAsBuffer(blob) { - return new Promise((resolve, reject) => { - let reader = new FileReader(); - reader.onload = () => { - resolve(reader.result); - }; - reader.onerror = () => { - reject(reader.error); - }; - reader.readAsArrayBuffer(blob); - }); -} -function waitForFrame() { - return new Promise((resolve, _reject) => { - window.requestAnimationFrame(resolve); - }); -} -async function runWithTimedProgress(onProgress, action, item, duration, workPromise) { - let startTime = new Date().getTime(); - let stop = false; - onProgress(action, item, 0.0); - let progressPromise = (async () => { - let now; - let targetTime = startTime + duration; - do { - now = new Date().getTime(); - onProgress(action, item, (now - startTime) / duration); - await waitForFrame(); - } while (!stop && now < targetTime); - })(); - await Promise.race([progressPromise, workPromise]); - stop = true; - await progressPromise; - await workPromise; - onProgress(action, item, 1.0); -} -/** Exception class for operations that exceeded their timeout duration. */ -class TimeoutError extends Error { - constructor(timeout) { - super(`Timeout of ${timeout} ms exceeded`); - this.name = "TimeoutError"; - this.timeout = timeout; - } -} -function runWithTimeout(promise, timeout) { - return new Promise((resolve, reject) => { - // Set up timeout - let timedOut = false; - let tid = setTimeout(() => { - // Set sentinel first to prevent race in promise resolving - timedOut = true; - reject(new TimeoutError(timeout)); - }, timeout); - // Passthrough - promise - .then((val) => { - if (!timedOut) { - resolve(val); - } - }) - .catch((err) => { - if (!timedOut) { - reject(err); - } - }) - .finally(() => { - if (!timedOut) { - clearTimeout(tid); - } - }); - }); -} -async function getEntryMetadata(blob, entry) { - const offset = entry.offset; - const headerBeginRaw = await blob.slice(offset, offset + ZIP_ENTRY_HEADER_BEGIN_LENGTH).arrayBuffer(); - const dataView = new DataView(headerBeginRaw); - const compressionMethod = dataView.getUint16(8, true); - const compressedSize = dataView.getUint32(18, true); - const uncompressedSize = dataView.getUint32(22, true); - const fileNameLength = dataView.getUint16(26, true); - const extraFieldLength = dataView.getUint16(28, true); - const headerSize = ZIP_ENTRY_HEADER_BEGIN_LENGTH + fileNameLength + extraFieldLength; - return { - offset, - compressionMethod, - compressedSize, - uncompressedSize, - headerSize, - }; -} -// Wrapper for Entry#getData() that unwraps ProgressEvent errors -async function zipGetData(entry, writer, options) { - try { - return await entry.getData(writer, options); - } - catch (e) { - if (e instanceof ProgressEvent && - e.type === "error" && - e.target !== null) { - throw e.target.error; - } - else { - throw e; - } - } -} - -const FILE_MAGIC = 0xed26ff3a; -const MAJOR_VERSION = 1; -const MINOR_VERSION = 0; -const FILE_HEADER_SIZE = 28; -const CHUNK_HEADER_SIZE = 12; -// AOSP libsparse uses 64 MiB chunks -const RAW_CHUNK_SIZE = 64 * 1024 * 1024; -class ImageError extends Error { - constructor(message) { - super(message); - this.name = "ImageError"; - } -} -var ChunkType; -(function (ChunkType) { - ChunkType[ChunkType["Raw"] = 51905] = "Raw"; - ChunkType[ChunkType["Fill"] = 51906] = "Fill"; - ChunkType[ChunkType["Skip"] = 51907] = "Skip"; - ChunkType[ChunkType["Crc32"] = 51908] = "Crc32"; -})(ChunkType || (ChunkType = {})); -class BlobBuilder { - constructor(type = "") { - this.type = type; - this.blob = new Blob([], { type: this.type }); - } - append(blob) { - this.blob = new Blob([this.blob, blob], { type: this.type }); - } - getBlob() { - return this.blob; - } -} -/** - * Returns a parsed version of the sparse image file header from the given buffer. - * - * @param {ArrayBuffer} buffer - Raw file header data. - * @returns {SparseHeader} Object containing the header information. - */ -function parseFileHeader(buffer) { - let view = new DataView(buffer); - let magic = view.getUint32(0, true); - if (magic !== FILE_MAGIC) { - return null; - } - // v1.0+ - let major = view.getUint16(4, true); - let minor = view.getUint16(6, true); - if (major !== MAJOR_VERSION || minor < MINOR_VERSION) { - throw new ImageError(`Unsupported sparse image version ${major}.${minor}`); - } - let fileHdrSize = view.getUint16(8, true); - let chunkHdrSize = view.getUint16(10, true); - if (fileHdrSize !== FILE_HEADER_SIZE || - chunkHdrSize !== CHUNK_HEADER_SIZE) { - throw new ImageError(`Invalid file header size ${fileHdrSize}, chunk header size ${chunkHdrSize}`); - } - let blockSize = view.getUint32(12, true); - if (blockSize % 4 !== 0) { - throw new ImageError(`Block size ${blockSize} is not a multiple of 4`); - } - return { - blockSize: blockSize, - blocks: view.getUint32(16, true), - chunks: view.getUint32(20, true), - crc32: view.getUint32(24, true), - }; -} -function parseChunkHeader(buffer) { - let view = new DataView(buffer); - // This isn't the same as what createImage takes. - // Further processing needs to be done on the chunks. - return { - type: view.getUint16(0, true), - /* 2: reserved, 16 bits */ - blocks: view.getUint32(4, true), - dataBytes: view.getUint32(8, true) - CHUNK_HEADER_SIZE, - data: null, // to be populated by consumer - }; -} -function calcChunksBlockSize(chunks) { - return chunks - .map((chunk) => chunk.blocks) - .reduce((total, c) => total + c, 0); -} -function calcChunksDataSize(chunks) { - return chunks - .map((chunk) => chunk.data.size) - .reduce((total, c) => total + c, 0); -} -function calcChunksSize(chunks) { - // 28-byte file header, 12-byte chunk headers - let overhead = FILE_HEADER_SIZE + CHUNK_HEADER_SIZE * chunks.length; - return overhead + calcChunksDataSize(chunks); -} -async function createImage(header, chunks) { - let blobBuilder = new BlobBuilder(); - let buffer = new ArrayBuffer(FILE_HEADER_SIZE); - let dataView = new DataView(buffer); - let arrayView = new Uint8Array(buffer); - dataView.setUint32(0, FILE_MAGIC, true); - // v1.0 - dataView.setUint16(4, MAJOR_VERSION, true); - dataView.setUint16(6, MINOR_VERSION, true); - dataView.setUint16(8, FILE_HEADER_SIZE, true); - dataView.setUint16(10, CHUNK_HEADER_SIZE, true); - // Match input parameters - dataView.setUint32(12, header.blockSize, true); - dataView.setUint32(16, header.blocks, true); - dataView.setUint32(20, chunks.length, true); - // We don't care about the CRC. AOSP docs specify that this should be a CRC32, - // but AOSP libsparse always sets 0 and puts the CRC in a final undocumented - // 0xCAC4 chunk instead. - dataView.setUint32(24, 0, true); - blobBuilder.append(new Blob([buffer])); - for (let chunk of chunks) { - buffer = new ArrayBuffer(CHUNK_HEADER_SIZE + chunk.data.size); - dataView = new DataView(buffer); - arrayView = new Uint8Array(buffer); - dataView.setUint16(0, chunk.type, true); - dataView.setUint16(2, 0, true); // reserved - dataView.setUint32(4, chunk.blocks, true); - dataView.setUint32(8, CHUNK_HEADER_SIZE + chunk.data.size, true); - let chunkArrayView = new Uint8Array(await readBlobAsBuffer(chunk.data)); - arrayView.set(chunkArrayView, CHUNK_HEADER_SIZE); - blobBuilder.append(new Blob([buffer])); - } - return blobBuilder.getBlob(); -} -/** - * Creates a sparse image from buffer containing raw image data. - * - * @param {Blob} blob - Blob containing the raw image data. - * @returns {Promise} Promise that resolves the blob containing the new sparse image. - */ -async function fromRaw(blob) { - let header = { - blockSize: 4096, - blocks: blob.size / 4096, - chunks: 1, - crc32: 0, - }; - let chunks = []; - while (blob.size > 0) { - let chunkSize = Math.min(blob.size, RAW_CHUNK_SIZE); - chunks.push({ - type: ChunkType.Raw, - blocks: chunkSize / header.blockSize, - data: blob.slice(0, chunkSize), - }); - blob = blob.slice(chunkSize); - } - return createImage(header, chunks); -} -/** - * Split a sparse image into smaller sparse images within the given size. - * This takes a Blob instead of an ArrayBuffer because it may process images - * larger than RAM. - * - * @param {Blob} blob - Blob containing the sparse image to split. - * @param {number} splitSize - Maximum size per split. - * @yields {Object} Data of the next split image and its output size in bytes. - */ -async function* splitBlob(blob, splitSize) { - logDebug(`Splitting ${blob.size}-byte sparse image into ${splitSize}-byte chunks`); - // Short-circuit if splitting isn't required - if (blob.size <= splitSize) { - logDebug("Blob fits in 1 payload, not splitting"); - yield { - data: await readBlobAsBuffer(blob), - bytes: blob.size, - }; - return; - } - let headerData = await readBlobAsBuffer(blob.slice(0, FILE_HEADER_SIZE)); - let header = parseFileHeader(headerData); - if (header === null) { - throw new ImageError("Blob is not a sparse image"); - } - // Remove CRC32 (if present), otherwise splitting will invalidate it - header.crc32 = 0; - blob = blob.slice(FILE_HEADER_SIZE); - let splitChunks = []; - let splitDataBytes = 0; - for (let i = 0; i < header.chunks; i++) { - let chunkHeaderData = await readBlobAsBuffer(blob.slice(0, CHUNK_HEADER_SIZE)); - let chunk = parseChunkHeader(chunkHeaderData); - chunk.data = blob.slice(CHUNK_HEADER_SIZE, CHUNK_HEADER_SIZE + chunk.dataBytes); - blob = blob.slice(CHUNK_HEADER_SIZE + chunk.dataBytes); - let bytesRemaining = splitSize - calcChunksSize(splitChunks); - logVerbose(` Chunk ${i}: type ${chunk.type}, ${chunk.dataBytes} bytes / ${chunk.blocks} blocks, ${bytesRemaining} bytes remaining`); - if (bytesRemaining >= chunk.dataBytes) { - // Read the chunk and add it - logVerbose(" Space is available, adding chunk"); - splitChunks.push(chunk); - // Track amount of data written on the output device, in bytes - splitDataBytes += chunk.blocks * header.blockSize; - } - else { - // Out of space, finish this split - // Blocks need to be calculated from chunk headers instead of going by size - // because FILL and SKIP chunks cover more blocks than the data they contain. - let splitBlocks = calcChunksBlockSize(splitChunks); - splitChunks.push({ - type: ChunkType.Skip, - blocks: header.blocks - splitBlocks, - data: new Blob([]), - dataBytes: 0, - }); - logVerbose(`Partition is ${header.blocks} blocks, used ${splitBlocks}, padded with ${header.blocks - splitBlocks}, finishing split with ${calcChunksBlockSize(splitChunks)} blocks`); - let splitImage = await createImage(header, splitChunks); - logDebug(`Finished ${splitImage.size}-byte split with ${splitChunks.length} chunks`); - yield { - data: await readBlobAsBuffer(splitImage), - bytes: splitDataBytes, - }; - // Start a new split. Every split is considered a full image by the - // bootloader, so we need to skip the *total* written blocks. - logVerbose(`Starting new split: skipping first ${splitBlocks} blocks and adding chunk`); - splitChunks = [ - { - type: ChunkType.Skip, - blocks: splitBlocks, - data: new Blob([]), - dataBytes: 0, - }, - chunk, - ]; - splitDataBytes = 0; - } - } - // Finish the final split if necessary - if (splitChunks.length > 0 && - (splitChunks.length > 1 || splitChunks[0].type !== ChunkType.Skip)) { - let splitImage = await createImage(header, splitChunks); - logDebug(`Finishing final ${splitImage.size}-byte split with ${splitChunks.length} chunks`); - yield { - data: await readBlobAsBuffer(splitImage), - bytes: splitDataBytes, - }; - } -} - -/* - Copyright (c) 2022 Gildas Lormeau. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the distribution. - - 3. The names of the authors may not be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT, - INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, - INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, - OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This program is based on JZlib 1.0.2 ymnk, JCraft,Inc. - * JZlib is based on zlib-1.1.3, so all credit should go authors - * Jean-loup Gailly(jloup@gzip.org) and Mark Adler(madler@alumni.caltech.edu) - * and contributors of zlib. - */ - -// deno-lint-ignore-file no-this-alias prefer-const - -// Global - -const MAX_BITS$1 = 15; -const D_CODES = 30; -const BL_CODES = 19; - -const LENGTH_CODES = 29; -const LITERALS = 256; -const L_CODES = (LITERALS + 1 + LENGTH_CODES); -const HEAP_SIZE = (2 * L_CODES + 1); - -const END_BLOCK = 256; - -// Bit length codes must not exceed MAX_BL_BITS bits -const MAX_BL_BITS = 7; - -// repeat previous bit length 3-6 times (2 bits of repeat count) -const REP_3_6 = 16; - -// repeat a zero length 3-10 times (3 bits of repeat count) -const REPZ_3_10 = 17; - -// repeat a zero length 11-138 times (7 bits of repeat count) -const REPZ_11_138 = 18; - -// The lengths of the bit length codes are sent in order of decreasing -// probability, to avoid transmitting the lengths for unused bit -// length codes. - -const Buf_size = 8 * 2; - -// JZlib version : "1.0.2" -const Z_DEFAULT_COMPRESSION = -1; - -// compression strategy -const Z_FILTERED = 1; -const Z_HUFFMAN_ONLY = 2; -const Z_DEFAULT_STRATEGY = 0; - -const Z_NO_FLUSH$1 = 0; -const Z_PARTIAL_FLUSH = 1; -const Z_FULL_FLUSH = 3; -const Z_FINISH$1 = 4; - -const Z_OK$1 = 0; -const Z_STREAM_END$1 = 1; -const Z_NEED_DICT$1 = 2; -const Z_STREAM_ERROR$1 = -2; -const Z_DATA_ERROR$1 = -3; -const Z_BUF_ERROR$1 = -5; - -// Tree - -function extractArray(array) { - return flatArray(array.map(([length, value]) => (new Array(length)).fill(value, 0, length))); -} - -function flatArray(array) { - return array.reduce((a, b) => a.concat(Array.isArray(b) ? flatArray(b) : b), []); -} - -// see definition of array dist_code below -const _dist_code = [0, 1, 2, 3].concat(...extractArray([ - [2, 4], [2, 5], [4, 6], [4, 7], [8, 8], [8, 9], [16, 10], [16, 11], [32, 12], [32, 13], [64, 14], [64, 15], [2, 0], [1, 16], - [1, 17], [2, 18], [2, 19], [4, 20], [4, 21], [8, 22], [8, 23], [16, 24], [16, 25], [32, 26], [32, 27], [64, 28], [64, 29] -])); - -function Tree() { - const that = this; - - // dyn_tree; // the dynamic tree - // max_code; // largest code with non zero frequency - // stat_desc; // the corresponding static tree - - // Compute the optimal bit lengths for a tree and update the total bit - // length - // for the current block. - // IN assertion: the fields freq and dad are set, heap[heap_max] and - // above are the tree nodes sorted by increasing frequency. - // OUT assertions: the field len is set to the optimal bit length, the - // array bl_count contains the frequencies for each bit length. - // The length opt_len is updated; static_len is also updated if stree is - // not null. - function gen_bitlen(s) { - const tree = that.dyn_tree; - const stree = that.stat_desc.static_tree; - const extra = that.stat_desc.extra_bits; - const base = that.stat_desc.extra_base; - const max_length = that.stat_desc.max_length; - let h; // heap index - let n, m; // iterate over the tree elements - let bits; // bit length - let xbits; // extra bits - let f; // frequency - let overflow = 0; // number of elements with bit length too large - - for (bits = 0; bits <= MAX_BITS$1; bits++) - s.bl_count[bits] = 0; - - // In a first pass, compute the optimal bit lengths (which may - // overflow in the case of the bit length tree). - tree[s.heap[s.heap_max] * 2 + 1] = 0; // root of the heap - - for (h = s.heap_max + 1; h < HEAP_SIZE; h++) { - n = s.heap[h]; - bits = tree[tree[n * 2 + 1] * 2 + 1] + 1; - if (bits > max_length) { - bits = max_length; - overflow++; - } - tree[n * 2 + 1] = bits; - // We overwrite tree[n*2+1] which is no longer needed - - if (n > that.max_code) - continue; // not a leaf node - - s.bl_count[bits]++; - xbits = 0; - if (n >= base) - xbits = extra[n - base]; - f = tree[n * 2]; - s.opt_len += f * (bits + xbits); - if (stree) - s.static_len += f * (stree[n * 2 + 1] + xbits); - } - if (overflow === 0) - return; - - // This happens for example on obj2 and pic of the Calgary corpus - // Find the first bit length which could increase: - do { - bits = max_length - 1; - while (s.bl_count[bits] === 0) - bits--; - s.bl_count[bits]--; // move one leaf down the tree - s.bl_count[bits + 1] += 2; // move one overflow item as its brother - s.bl_count[max_length]--; - // The brother of the overflow item also moves one step up, - // but this does not affect bl_count[max_length] - overflow -= 2; - } while (overflow > 0); - - for (bits = max_length; bits !== 0; bits--) { - n = s.bl_count[bits]; - while (n !== 0) { - m = s.heap[--h]; - if (m > that.max_code) - continue; - if (tree[m * 2 + 1] != bits) { - s.opt_len += (bits - tree[m * 2 + 1]) * tree[m * 2]; - tree[m * 2 + 1] = bits; - } - n--; - } - } - } - - // Reverse the first len bits of a code, using straightforward code (a - // faster - // method would use a table) - // IN assertion: 1 <= len <= 15 - function bi_reverse(code, // the value to invert - len // its bit length - ) { - let res = 0; - do { - res |= code & 1; - code >>>= 1; - res <<= 1; - } while (--len > 0); - return res >>> 1; - } - - // Generate the codes for a given tree and bit counts (which need not be - // optimal). - // IN assertion: the array bl_count contains the bit length statistics for - // the given tree and the field len is set for all tree elements. - // OUT assertion: the field code is set for all tree elements of non - // zero code length. - function gen_codes(tree, // the tree to decorate - max_code, // largest code with non zero frequency - bl_count // number of codes at each bit length - ) { - const next_code = []; // next code value for each - // bit length - let code = 0; // running code value - let bits; // bit index - let n; // code index - let len; - - // The distribution counts are first used to generate the code values - // without bit reversal. - for (bits = 1; bits <= MAX_BITS$1; bits++) { - next_code[bits] = code = ((code + bl_count[bits - 1]) << 1); - } - - // Check that the bit counts in bl_count are consistent. The last code - // must be all ones. - // Assert (code + bl_count[MAX_BITS]-1 == (1<= 1; n--) - s.pqdownheap(tree, n); - - // Construct the Huffman tree by repeatedly combining the least two - // frequent nodes. - - node = elems; // next internal node of the tree - do { - // n = node of least frequency - n = s.heap[1]; - s.heap[1] = s.heap[s.heap_len--]; - s.pqdownheap(tree, 1); - m = s.heap[1]; // m = node of next least frequency - - s.heap[--s.heap_max] = n; // keep the nodes sorted by frequency - s.heap[--s.heap_max] = m; - - // Create a new node father of n and m - tree[node * 2] = (tree[n * 2] + tree[m * 2]); - s.depth[node] = Math.max(s.depth[n], s.depth[m]) + 1; - tree[n * 2 + 1] = tree[m * 2 + 1] = node; - - // and insert the new node in the heap - s.heap[1] = node++; - s.pqdownheap(tree, 1); - } while (s.heap_len >= 2); - - s.heap[--s.heap_max] = s.heap[1]; - - // At this point, the fields freq and dad are set. We can now - // generate the bit lengths. - - gen_bitlen(s); - - // The field len is now set, we can generate the bit codes - gen_codes(tree, that.max_code, s.bl_count); - }; - -} - -Tree._length_code = [0, 1, 2, 3, 4, 5, 6, 7].concat(...extractArray([ - [2, 8], [2, 9], [2, 10], [2, 11], [4, 12], [4, 13], [4, 14], [4, 15], [8, 16], [8, 17], [8, 18], [8, 19], - [16, 20], [16, 21], [16, 22], [16, 23], [32, 24], [32, 25], [32, 26], [31, 27], [1, 28]])); - -Tree.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]; - -Tree.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]; - -// Mapping from a distance to a distance code. dist is the distance - 1 and -// must not have side effects. _dist_code[256] and _dist_code[257] are never -// used. -Tree.d_code = function (dist) { - return ((dist) < 256 ? _dist_code[dist] : _dist_code[256 + ((dist) >>> 7)]); -}; - -// extra bits for each length code -Tree.extra_lbits = [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0]; - -// extra bits for each distance code -Tree.extra_dbits = [0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13]; - -// extra bits for each bit length code -Tree.extra_blbits = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7]; - -Tree.bl_order = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]; - -// StaticTree - -function StaticTree(static_tree, extra_bits, extra_base, elems, max_length) { - const that = this; - that.static_tree = static_tree; - that.extra_bits = extra_bits; - that.extra_base = extra_base; - that.elems = elems; - that.max_length = max_length; -} - -const static_ltree2_first_part = [12, 140, 76, 204, 44, 172, 108, 236, 28, 156, 92, 220, 60, 188, 124, 252, 2, 130, 66, 194, 34, 162, 98, 226, 18, 146, 82, - 210, 50, 178, 114, 242, 10, 138, 74, 202, 42, 170, 106, 234, 26, 154, 90, 218, 58, 186, 122, 250, 6, 134, 70, 198, 38, 166, 102, 230, 22, 150, 86, - 214, 54, 182, 118, 246, 14, 142, 78, 206, 46, 174, 110, 238, 30, 158, 94, 222, 62, 190, 126, 254, 1, 129, 65, 193, 33, 161, 97, 225, 17, 145, 81, - 209, 49, 177, 113, 241, 9, 137, 73, 201, 41, 169, 105, 233, 25, 153, 89, 217, 57, 185, 121, 249, 5, 133, 69, 197, 37, 165, 101, 229, 21, 149, 85, - 213, 53, 181, 117, 245, 13, 141, 77, 205, 45, 173, 109, 237, 29, 157, 93, 221, 61, 189, 125, 253, 19, 275, 147, 403, 83, 339, 211, 467, 51, 307, - 179, 435, 115, 371, 243, 499, 11, 267, 139, 395, 75, 331, 203, 459, 43, 299, 171, 427, 107, 363, 235, 491, 27, 283, 155, 411, 91, 347, 219, 475, - 59, 315, 187, 443, 123, 379, 251, 507, 7, 263, 135, 391, 71, 327, 199, 455, 39, 295, 167, 423, 103, 359, 231, 487, 23, 279, 151, 407, 87, 343, 215, - 471, 55, 311, 183, 439, 119, 375, 247, 503, 15, 271, 143, 399, 79, 335, 207, 463, 47, 303, 175, 431, 111, 367, 239, 495, 31, 287, 159, 415, 95, - 351, 223, 479, 63, 319, 191, 447, 127, 383, 255, 511, 0, 64, 32, 96, 16, 80, 48, 112, 8, 72, 40, 104, 24, 88, 56, 120, 4, 68, 36, 100, 20, 84, 52, - 116, 3, 131, 67, 195, 35, 163, 99, 227]; -const static_ltree2_second_part = extractArray([[144, 8], [112, 9], [24, 7], [8, 8]]); -StaticTree.static_ltree = flatArray(static_ltree2_first_part.map((value, index) => [value, static_ltree2_second_part[index]])); - -const static_dtree_first_part = [0, 16, 8, 24, 4, 20, 12, 28, 2, 18, 10, 26, 6, 22, 14, 30, 1, 17, 9, 25, 5, 21, 13, 29, 3, 19, 11, 27, 7, 23]; -const static_dtree_second_part = extractArray([[30, 5]]); -StaticTree.static_dtree = flatArray(static_dtree_first_part.map((value, index) => [value, static_dtree_second_part[index]])); - -StaticTree.static_l_desc = new StaticTree(StaticTree.static_ltree, Tree.extra_lbits, LITERALS + 1, L_CODES, MAX_BITS$1); - -StaticTree.static_d_desc = new StaticTree(StaticTree.static_dtree, Tree.extra_dbits, 0, D_CODES, MAX_BITS$1); - -StaticTree.static_bl_desc = new StaticTree(null, Tree.extra_blbits, 0, BL_CODES, MAX_BL_BITS); - -// Deflate - -const MAX_MEM_LEVEL = 9; -const DEF_MEM_LEVEL = 8; - -function Config(good_length, max_lazy, nice_length, max_chain, func) { - const that = this; - that.good_length = good_length; - that.max_lazy = max_lazy; - that.nice_length = nice_length; - that.max_chain = max_chain; - that.func = func; -} - -const STORED$1 = 0; -const FAST = 1; -const SLOW = 2; -const config_table = [ - new Config(0, 0, 0, 0, STORED$1), - new Config(4, 4, 8, 4, FAST), - new Config(4, 5, 16, 8, FAST), - new Config(4, 6, 32, 32, FAST), - new Config(4, 4, 16, 16, SLOW), - new Config(8, 16, 32, 32, SLOW), - new Config(8, 16, 128, 128, SLOW), - new Config(8, 32, 128, 256, SLOW), - new Config(32, 128, 258, 1024, SLOW), - new Config(32, 258, 258, 4096, SLOW) -]; - -const z_errmsg = ["need dictionary", // Z_NEED_DICT - // 2 - "stream end", // Z_STREAM_END 1 - "", // Z_OK 0 - "", // Z_ERRNO (-1) - "stream error", // Z_STREAM_ERROR (-2) - "data error", // Z_DATA_ERROR (-3) - "", // Z_MEM_ERROR (-4) - "buffer error", // Z_BUF_ERROR (-5) - "",// Z_VERSION_ERROR (-6) - ""]; - -// block not completed, need more input or more output -const NeedMore = 0; - -// block flush performed -const BlockDone = 1; - -// finish started, need only more output at next deflate -const FinishStarted = 2; - -// finish done, accept no more input or output -const FinishDone = 3; - -// preset dictionary flag in zlib header -const PRESET_DICT$1 = 0x20; - -const INIT_STATE = 42; -const BUSY_STATE = 113; -const FINISH_STATE = 666; - -// The deflate compression method -const Z_DEFLATED$1 = 8; - -const STORED_BLOCK = 0; -const STATIC_TREES = 1; -const DYN_TREES = 2; - -const MIN_MATCH = 3; -const MAX_MATCH = 258; -const MIN_LOOKAHEAD = (MAX_MATCH + MIN_MATCH + 1); - -function smaller(tree, n, m, depth) { - const tn2 = tree[n * 2]; - const tm2 = tree[m * 2]; - return (tn2 < tm2 || (tn2 == tm2 && depth[n] <= depth[m])); -} - -function Deflate() { - - const that = this; - let strm; // pointer back to this zlib stream - let status; // as the name implies - // pending_buf; // output still pending - let pending_buf_size; // size of pending_buf - // pending_out; // next pending byte to output to the stream - // pending; // nb of bytes in the pending buffer - - // dist_buf; // buffer for distances - // lc_buf; // buffer for literals or lengths - // To simplify the code, dist_buf and lc_buf have the same number of elements. - // To use different lengths, an extra flag array would be necessary. - - let last_flush; // value of flush param for previous deflate call - - let w_size; // LZ77 win size (32K by default) - let w_bits; // log2(w_size) (8..16) - let w_mask; // w_size - 1 - - let win; - // Sliding win. Input bytes are read into the second half of the win, - // and move to the first half later to keep a dictionary of at least wSize - // bytes. With this organization, matches are limited to a distance of - // wSize-MAX_MATCH bytes, but this ensures that IO is always - // performed with a length multiple of the block size. Also, it limits - // the win size to 64K, which is quite useful on MSDOS. - // To do: use the user input buffer as sliding win. - - let window_size; - // Actual size of win: 2*wSize, except when the user input buffer - // is directly used as sliding win. - - let prev; - // Link to older string with same hash index. To limit the size of this - // array to 64K, this link is maintained only for the last 32K strings. - // An index in this array is thus a win index modulo 32K. - - let head; // Heads of the hash chains or NIL. - - let ins_h; // hash index of string to be inserted - let hash_size; // number of elements in hash table - let hash_bits; // log2(hash_size) - let hash_mask; // hash_size-1 - - // Number of bits by which ins_h must be shifted at each input - // step. It must be such that after MIN_MATCH steps, the oldest - // byte no longer takes part in the hash key, that is: - // hash_shift * MIN_MATCH >= hash_bits - let hash_shift; - - // Window position at the beginning of the current output block. Gets - // negative when the win is moved backwards. - - let block_start; - - let match_length; // length of best match - let prev_match; // previous match - let match_available; // set if previous match exists - let strstart; // start of string to insert - let match_start; // start of matching string - let lookahead; // number of valid bytes ahead in win - - // Length of the best match at previous step. Matches not greater than this - // are discarded. This is used in the lazy match evaluation. - let prev_length; - - // To speed up deflation, hash chains are never searched beyond this - // length. A higher limit improves compression ratio but degrades the speed. - let max_chain_length; - - // Attempt to find a better match only when the current match is strictly - // smaller than this value. This mechanism is used only for compression - // levels >= 4. - let max_lazy_match; - - // Insert new strings in the hash table only if the match length is not - // greater than this length. This saves time but degrades compression. - // max_insert_length is used only for compression levels <= 3. - - let level; // compression level (1..9) - let strategy; // favor or force Huffman coding - - // Use a faster search when the previous match is longer than this - let good_match; - - // Stop searching when current match exceeds this - let nice_match; - - let dyn_ltree; // literal and length tree - let dyn_dtree; // distance tree - let bl_tree; // Huffman tree for bit lengths - - const l_desc = new Tree(); // desc for literal tree - const d_desc = new Tree(); // desc for distance tree - const bl_desc = new Tree(); // desc for bit length tree - - // that.heap_len; // number of elements in the heap - // that.heap_max; // element of largest frequency - // The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used. - // The same heap array is used to build all trees. - - // Depth of each subtree used as tie breaker for trees of equal frequency - that.depth = []; - - // Size of match buffer for literals/lengths. There are 4 reasons for - // limiting lit_bufsize to 64K: - // - frequencies can be kept in 16 bit counters - // - if compression is not successful for the first block, all input - // data is still in the win so we can still emit a stored block even - // when input comes from standard input. (This can also be done for - // all blocks if lit_bufsize is not greater than 32K.) - // - if compression is not successful for a file smaller than 64K, we can - // even emit a stored file instead of a stored block (saving 5 bytes). - // This is applicable only for zip (not gzip or zlib). - // - creating new Huffman trees less frequently may not provide fast - // adaptation to changes in the input data statistics. (Take for - // example a binary file with poorly compressible code followed by - // a highly compressible string table.) Smaller buffer sizes give - // fast adaptation but have of course the overhead of transmitting - // trees more frequently. - // - I can't count above 4 - let lit_bufsize; - - let last_lit; // running index in dist_buf and lc_buf - - // that.opt_len; // bit length of current block with optimal trees - // that.static_len; // bit length of current block with static trees - let matches; // number of string matches in current block - let last_eob_len; // bit length of EOB code for last block - - // Output buffer. bits are inserted starting at the bottom (least - // significant bits). - let bi_buf; - - // Number of valid bits in bi_buf. All bits above the last valid bit - // are always zero. - let bi_valid; - - // number of codes at each bit length for an optimal tree - that.bl_count = []; - - // heap used to build the Huffman trees - that.heap = []; - - dyn_ltree = []; - dyn_dtree = []; - bl_tree = []; - - function lm_init() { - window_size = 2 * w_size; - - head[hash_size - 1] = 0; - for (let i = 0; i < hash_size - 1; i++) { - head[i] = 0; - } - - // Set the default configuration parameters: - max_lazy_match = config_table[level].max_lazy; - good_match = config_table[level].good_length; - nice_match = config_table[level].nice_length; - max_chain_length = config_table[level].max_chain; - - strstart = 0; - block_start = 0; - lookahead = 0; - match_length = prev_length = MIN_MATCH - 1; - match_available = 0; - ins_h = 0; - } - - function init_block() { - let i; - // Initialize the trees. - for (i = 0; i < L_CODES; i++) - dyn_ltree[i * 2] = 0; - for (i = 0; i < D_CODES; i++) - dyn_dtree[i * 2] = 0; - for (i = 0; i < BL_CODES; i++) - bl_tree[i * 2] = 0; - - dyn_ltree[END_BLOCK * 2] = 1; - that.opt_len = that.static_len = 0; - last_lit = matches = 0; - } - - // Initialize the tree data structures for a new zlib stream. - function tr_init() { - - l_desc.dyn_tree = dyn_ltree; - l_desc.stat_desc = StaticTree.static_l_desc; - - d_desc.dyn_tree = dyn_dtree; - d_desc.stat_desc = StaticTree.static_d_desc; - - bl_desc.dyn_tree = bl_tree; - bl_desc.stat_desc = StaticTree.static_bl_desc; - - bi_buf = 0; - bi_valid = 0; - last_eob_len = 8; // enough lookahead for inflate - - // Initialize the first block of the first file: - init_block(); - } - - // Restore the heap property by moving down the tree starting at node k, - // exchanging a node with the smallest of its two sons if necessary, - // stopping - // when the heap property is re-established (each father smaller than its - // two sons). - that.pqdownheap = function (tree, // the tree to restore - k // node to move down - ) { - const heap = that.heap; - const v = heap[k]; - let j = k << 1; // left son of k - while (j <= that.heap_len) { - // Set j to the smallest of the two sons: - if (j < that.heap_len && smaller(tree, heap[j + 1], heap[j], that.depth)) { - j++; - } - // Exit if v is smaller than both sons - if (smaller(tree, v, heap[j], that.depth)) - break; - - // Exchange v with the smallest son - heap[k] = heap[j]; - k = j; - // And continue down the tree, setting j to the left son of k - j <<= 1; - } - heap[k] = v; - }; - - // Scan a literal or distance tree to determine the frequencies of the codes - // in the bit length tree. - function scan_tree(tree,// the tree to be scanned - max_code // and its largest code of non zero frequency - ) { - let prevlen = -1; // last emitted length - let curlen; // length of current code - let nextlen = tree[0 * 2 + 1]; // length of next code - let count = 0; // repeat count of the current code - let max_count = 7; // max repeat count - let min_count = 4; // min repeat count - - if (nextlen === 0) { - max_count = 138; - min_count = 3; - } - tree[(max_code + 1) * 2 + 1] = 0xffff; // guard - - for (let n = 0; n <= max_code; n++) { - curlen = nextlen; - nextlen = tree[(n + 1) * 2 + 1]; - if (++count < max_count && curlen == nextlen) { - continue; - } else if (count < min_count) { - bl_tree[curlen * 2] += count; - } else if (curlen !== 0) { - if (curlen != prevlen) - bl_tree[curlen * 2]++; - bl_tree[REP_3_6 * 2]++; - } else if (count <= 10) { - bl_tree[REPZ_3_10 * 2]++; - } else { - bl_tree[REPZ_11_138 * 2]++; - } - count = 0; - prevlen = curlen; - if (nextlen === 0) { - max_count = 138; - min_count = 3; - } else if (curlen == nextlen) { - max_count = 6; - min_count = 3; - } else { - max_count = 7; - min_count = 4; - } - } - } - - // Construct the Huffman tree for the bit lengths and return the index in - // bl_order of the last bit length code to send. - function build_bl_tree() { - let max_blindex; // index of last bit length code of non zero freq - - // Determine the bit length frequencies for literal and distance trees - scan_tree(dyn_ltree, l_desc.max_code); - scan_tree(dyn_dtree, d_desc.max_code); - - // Build the bit length tree: - bl_desc.build_tree(that); - // opt_len now includes the length of the tree representations, except - // the lengths of the bit lengths codes and the 5+5+4 bits for the - // counts. - - // Determine the number of bit length codes to send. The pkzip format - // requires that at least 4 bit length codes be sent. (appnote.txt says - // 3 but the actual value used is 4.) - for (max_blindex = BL_CODES - 1; max_blindex >= 3; max_blindex--) { - if (bl_tree[Tree.bl_order[max_blindex] * 2 + 1] !== 0) - break; - } - // Update opt_len to include the bit length tree and counts - that.opt_len += 3 * (max_blindex + 1) + 5 + 5 + 4; - - return max_blindex; - } - - // Output a byte on the stream. - // IN assertion: there is enough room in pending_buf. - function put_byte(p) { - that.pending_buf[that.pending++] = p; - } - - function put_short(w) { - put_byte(w & 0xff); - put_byte((w >>> 8) & 0xff); - } - - function putShortMSB(b) { - put_byte((b >> 8) & 0xff); - put_byte((b & 0xff) & 0xff); - } - - function send_bits(value, length) { - let val; - const len = length; - if (bi_valid > Buf_size - len) { - val = value; - // bi_buf |= (val << bi_valid); - bi_buf |= ((val << bi_valid) & 0xffff); - put_short(bi_buf); - bi_buf = val >>> (Buf_size - bi_valid); - bi_valid += len - Buf_size; - } else { - // bi_buf |= (value) << bi_valid; - bi_buf |= (((value) << bi_valid) & 0xffff); - bi_valid += len; - } - } - - function send_code(c, tree) { - const c2 = c * 2; - send_bits(tree[c2] & 0xffff, tree[c2 + 1] & 0xffff); - } - - // Send a literal or distance tree in compressed form, using the codes in - // bl_tree. - function send_tree(tree,// the tree to be sent - max_code // and its largest code of non zero frequency - ) { - let n; // iterates over all tree elements - let prevlen = -1; // last emitted length - let curlen; // length of current code - let nextlen = tree[0 * 2 + 1]; // length of next code - let count = 0; // repeat count of the current code - let max_count = 7; // max repeat count - let min_count = 4; // min repeat count - - if (nextlen === 0) { - max_count = 138; - min_count = 3; - } - - for (n = 0; n <= max_code; n++) { - curlen = nextlen; - nextlen = tree[(n + 1) * 2 + 1]; - if (++count < max_count && curlen == nextlen) { - continue; - } else if (count < min_count) { - do { - send_code(curlen, bl_tree); - } while (--count !== 0); - } else if (curlen !== 0) { - if (curlen != prevlen) { - send_code(curlen, bl_tree); - count--; - } - send_code(REP_3_6, bl_tree); - send_bits(count - 3, 2); - } else if (count <= 10) { - send_code(REPZ_3_10, bl_tree); - send_bits(count - 3, 3); - } else { - send_code(REPZ_11_138, bl_tree); - send_bits(count - 11, 7); - } - count = 0; - prevlen = curlen; - if (nextlen === 0) { - max_count = 138; - min_count = 3; - } else if (curlen == nextlen) { - max_count = 6; - min_count = 3; - } else { - max_count = 7; - min_count = 4; - } - } - } - - // Send the header for a block using dynamic Huffman trees: the counts, the - // lengths of the bit length codes, the literal tree and the distance tree. - // IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4. - function send_all_trees(lcodes, dcodes, blcodes) { - let rank; // index in bl_order - - send_bits(lcodes - 257, 5); // not +255 as stated in appnote.txt - send_bits(dcodes - 1, 5); - send_bits(blcodes - 4, 4); // not -3 as stated in appnote.txt - for (rank = 0; rank < blcodes; rank++) { - send_bits(bl_tree[Tree.bl_order[rank] * 2 + 1], 3); - } - send_tree(dyn_ltree, lcodes - 1); // literal tree - send_tree(dyn_dtree, dcodes - 1); // distance tree - } - - // Flush the bit buffer, keeping at most 7 bits in it. - function bi_flush() { - if (bi_valid == 16) { - put_short(bi_buf); - bi_buf = 0; - bi_valid = 0; - } else if (bi_valid >= 8) { - put_byte(bi_buf & 0xff); - bi_buf >>>= 8; - bi_valid -= 8; - } - } - - // Send one empty static block to give enough lookahead for inflate. - // This takes 10 bits, of which 7 may remain in the bit buffer. - // The current inflate code requires 9 bits of lookahead. If the - // last two codes for the previous block (real code plus EOB) were coded - // on 5 bits or less, inflate may have only 5+3 bits of lookahead to decode - // the last real code. In this case we send two empty static blocks instead - // of one. (There are no problems if the previous block is stored or fixed.) - // To simplify the code, we assume the worst case of last real code encoded - // on one bit only. - function _tr_align() { - send_bits(STATIC_TREES << 1, 3); - send_code(END_BLOCK, StaticTree.static_ltree); - - bi_flush(); - - // Of the 10 bits for the empty block, we have already sent - // (10 - bi_valid) bits. The lookahead for the last real code (before - // the EOB of the previous block) was thus at least one plus the length - // of the EOB plus what we have just sent of the empty static block. - if (1 + last_eob_len + 10 - bi_valid < 9) { - send_bits(STATIC_TREES << 1, 3); - send_code(END_BLOCK, StaticTree.static_ltree); - bi_flush(); - } - last_eob_len = 7; - } - - // Save the match info and tally the frequency counts. Return true if - // the current block must be flushed. - function _tr_tally(dist, // distance of matched string - lc // match length-MIN_MATCH or unmatched char (if dist==0) - ) { - let out_length, in_length, dcode; - that.dist_buf[last_lit] = dist; - that.lc_buf[last_lit] = lc & 0xff; - last_lit++; - - if (dist === 0) { - // lc is the unmatched char - dyn_ltree[lc * 2]++; - } else { - matches++; - // Here, lc is the match length - MIN_MATCH - dist--; // dist = match distance - 1 - dyn_ltree[(Tree._length_code[lc] + LITERALS + 1) * 2]++; - dyn_dtree[Tree.d_code(dist) * 2]++; - } - - if ((last_lit & 0x1fff) === 0 && level > 2) { - // Compute an upper bound for the compressed length - out_length = last_lit * 8; - in_length = strstart - block_start; - for (dcode = 0; dcode < D_CODES; dcode++) { - out_length += dyn_dtree[dcode * 2] * (5 + Tree.extra_dbits[dcode]); - } - out_length >>>= 3; - if ((matches < Math.floor(last_lit / 2)) && out_length < Math.floor(in_length / 2)) - return true; - } - - return (last_lit == lit_bufsize - 1); - // We avoid equality with lit_bufsize because of wraparound at 64K - // on 16 bit machines and because stored blocks are restricted to - // 64K-1 bytes. - } - - // Send the block data compressed using the given Huffman trees - function compress_block(ltree, dtree) { - let dist; // distance of matched string - let lc; // match length or unmatched char (if dist === 0) - let lx = 0; // running index in dist_buf and lc_buf - let code; // the code to send - let extra; // number of extra bits to send - - if (last_lit !== 0) { - do { - dist = that.dist_buf[lx]; - lc = that.lc_buf[lx]; - lx++; - - if (dist === 0) { - send_code(lc, ltree); // send a literal byte - } else { - // Here, lc is the match length - MIN_MATCH - code = Tree._length_code[lc]; - - send_code(code + LITERALS + 1, ltree); // send the length - // code - extra = Tree.extra_lbits[code]; - if (extra !== 0) { - lc -= Tree.base_length[code]; - send_bits(lc, extra); // send the extra length bits - } - dist--; // dist is now the match distance - 1 - code = Tree.d_code(dist); - - send_code(code, dtree); // send the distance code - extra = Tree.extra_dbits[code]; - if (extra !== 0) { - dist -= Tree.base_dist[code]; - send_bits(dist, extra); // send the extra distance bits - } - } // literal or match pair ? - } while (lx < last_lit); - } - - send_code(END_BLOCK, ltree); - last_eob_len = ltree[END_BLOCK * 2 + 1]; - } - - // Flush the bit buffer and align the output on a byte boundary - function bi_windup() { - if (bi_valid > 8) { - put_short(bi_buf); - } else if (bi_valid > 0) { - put_byte(bi_buf & 0xff); - } - bi_buf = 0; - bi_valid = 0; - } - - // Copy a stored block, storing first the length and its - // one's complement if requested. - function copy_block(buf, // the input data - len, // its length - header // true if block header must be written - ) { - bi_windup(); // align on byte boundary - last_eob_len = 8; // enough lookahead for inflate - - if (header) { - put_short(len); - put_short(~len); - } - - that.pending_buf.set(win.subarray(buf, buf + len), that.pending); - that.pending += len; - } - - // Send a stored block - function _tr_stored_block(buf, // input block - stored_len, // length of input block - eof // true if this is the last block for a file - ) { - send_bits((STORED_BLOCK << 1) + (eof ? 1 : 0), 3); // send block type - copy_block(buf, stored_len, true); // with header - } - - // Determine the best encoding for the current block: dynamic trees, static - // trees or store, and output the encoded block to the zip file. - function _tr_flush_block(buf, // input block, or NULL if too old - stored_len, // length of input block - eof // true if this is the last block for a file - ) { - let opt_lenb, static_lenb;// opt_len and static_len in bytes - let max_blindex = 0; // index of last bit length code of non zero freq - - // Build the Huffman trees unless a stored block is forced - if (level > 0) { - // Construct the literal and distance trees - l_desc.build_tree(that); - - d_desc.build_tree(that); - - // At this point, opt_len and static_len are the total bit lengths - // of - // the compressed block data, excluding the tree representations. - - // Build the bit length tree for the above two trees, and get the - // index - // in bl_order of the last bit length code to send. - max_blindex = build_bl_tree(); - - // Determine the best encoding. Compute first the block length in - // bytes - opt_lenb = (that.opt_len + 3 + 7) >>> 3; - static_lenb = (that.static_len + 3 + 7) >>> 3; - - if (static_lenb <= opt_lenb) - opt_lenb = static_lenb; - } else { - opt_lenb = static_lenb = stored_len + 5; // force a stored block - } - - if ((stored_len + 4 <= opt_lenb) && buf != -1) { - // 4: two words for the lengths - // The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE. - // Otherwise we can't have processed more than WSIZE input bytes - // since - // the last block flush, because compression would have been - // successful. If LIT_BUFSIZE <= WSIZE, it is never too late to - // transform a block into a stored block. - _tr_stored_block(buf, stored_len, eof); - } else if (static_lenb == opt_lenb) { - send_bits((STATIC_TREES << 1) + (eof ? 1 : 0), 3); - compress_block(StaticTree.static_ltree, StaticTree.static_dtree); - } else { - send_bits((DYN_TREES << 1) + (eof ? 1 : 0), 3); - send_all_trees(l_desc.max_code + 1, d_desc.max_code + 1, max_blindex + 1); - compress_block(dyn_ltree, dyn_dtree); - } - - // The above check is made mod 2^32, for files larger than 512 MB - // and uLong implemented on 32 bits. - - init_block(); - - if (eof) { - bi_windup(); - } - } - - function flush_block_only(eof) { - _tr_flush_block(block_start >= 0 ? block_start : -1, strstart - block_start, eof); - block_start = strstart; - strm.flush_pending(); - } - - // Fill the win when the lookahead becomes insufficient. - // Updates strstart and lookahead. - // - // IN assertion: lookahead < MIN_LOOKAHEAD - // OUT assertions: strstart <= window_size-MIN_LOOKAHEAD - // At least one byte has been read, or avail_in === 0; reads are - // performed for at least two bytes (required for the zip translate_eol - // option -- not supported here). - function fill_window() { - let n, m; - let p; - let more; // Amount of free space at the end of the win. - - do { - more = (window_size - lookahead - strstart); - - // Deal with !@#$% 64K limit: - if (more === 0 && strstart === 0 && lookahead === 0) { - more = w_size; - } else if (more == -1) { - // Very unlikely, but possible on 16 bit machine if strstart == - // 0 - // and lookahead == 1 (input done one byte at time) - more--; - - // If the win is almost full and there is insufficient - // lookahead, - // move the upper half to the lower one to make room in the - // upper half. - } else if (strstart >= w_size + w_size - MIN_LOOKAHEAD) { - win.set(win.subarray(w_size, w_size + w_size), 0); - - match_start -= w_size; - strstart -= w_size; // we now have strstart >= MAX_DIST - block_start -= w_size; - - // Slide the hash table (could be avoided with 32 bit values - // at the expense of memory usage). We slide even when level == - // 0 - // to keep the hash table consistent if we switch back to level - // > 0 - // later. (Using level 0 permanently is not an optimal usage of - // zlib, so we don't care about this pathological case.) - - n = hash_size; - p = n; - do { - m = (head[--p] & 0xffff); - head[p] = (m >= w_size ? m - w_size : 0); - } while (--n !== 0); - - n = w_size; - p = n; - do { - m = (prev[--p] & 0xffff); - prev[p] = (m >= w_size ? m - w_size : 0); - // If n is not on any hash chain, prev[n] is garbage but - // its value will never be used. - } while (--n !== 0); - more += w_size; - } - - if (strm.avail_in === 0) - return; - - // If there was no sliding: - // strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 && - // more == window_size - lookahead - strstart - // => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1) - // => more >= window_size - 2*WSIZE + 2 - // In the BIG_MEM or MMAP case (not yet supported), - // window_size == input_size + MIN_LOOKAHEAD && - // strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD. - // Otherwise, window_size == 2*WSIZE so more >= 2. - // If there was sliding, more >= WSIZE. So in all cases, more >= 2. - - n = strm.read_buf(win, strstart + lookahead, more); - lookahead += n; - - // Initialize the hash value now that we have some input: - if (lookahead >= MIN_MATCH) { - ins_h = win[strstart] & 0xff; - ins_h = (((ins_h) << hash_shift) ^ (win[strstart + 1] & 0xff)) & hash_mask; - } - // If the whole input has less than MIN_MATCH bytes, ins_h is - // garbage, - // but this is not important since only literal bytes will be - // emitted. - } while (lookahead < MIN_LOOKAHEAD && strm.avail_in !== 0); - } - - // Copy without compression as much as possible from the input stream, - // return - // the current block state. - // This function does not insert new strings in the dictionary since - // uncompressible data is probably not useful. This function is used - // only for the level=0 compression option. - // NOTE: this function should be optimized to avoid extra copying from - // win to pending_buf. - function deflate_stored(flush) { - // Stored blocks are limited to 0xffff bytes, pending_buf is limited - // to pending_buf_size, and each stored block has a 5 byte header: - - let max_block_size = 0xffff; - let max_start; - - if (max_block_size > pending_buf_size - 5) { - max_block_size = pending_buf_size - 5; - } - - // Copy as much as possible from input to output: - // eslint-disable-next-line no-constant-condition - while (true) { - // Fill the win as much as possible: - if (lookahead <= 1) { - fill_window(); - if (lookahead === 0 && flush == Z_NO_FLUSH$1) - return NeedMore; - if (lookahead === 0) - break; // flush the current block - } - - strstart += lookahead; - lookahead = 0; - - // Emit a stored block if pending_buf will be full: - max_start = block_start + max_block_size; - if (strstart === 0 || strstart >= max_start) { - // strstart === 0 is possible when wraparound on 16-bit machine - lookahead = (strstart - max_start); - strstart = max_start; - - flush_block_only(false); - if (strm.avail_out === 0) - return NeedMore; - - } - - // Flush if we may have to slide, otherwise block_start may become - // negative and the data will be gone: - if (strstart - block_start >= w_size - MIN_LOOKAHEAD) { - flush_block_only(false); - if (strm.avail_out === 0) - return NeedMore; - } - } - - flush_block_only(flush == Z_FINISH$1); - if (strm.avail_out === 0) - return (flush == Z_FINISH$1) ? FinishStarted : NeedMore; - - return flush == Z_FINISH$1 ? FinishDone : BlockDone; - } - - function longest_match(cur_match) { - let chain_length = max_chain_length; // max hash chain length - let scan = strstart; // current string - let match; // matched string - let len; // length of current match - let best_len = prev_length; // best match length so far - const limit = strstart > (w_size - MIN_LOOKAHEAD) ? strstart - (w_size - MIN_LOOKAHEAD) : 0; - let _nice_match = nice_match; - - // Stop when cur_match becomes <= limit. To simplify the code, - // we prevent matches with the string of win index 0. - - const wmask = w_mask; - - const strend = strstart + MAX_MATCH; - let scan_end1 = win[scan + best_len - 1]; - let scan_end = win[scan + best_len]; - - // The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of - // 16. - // It is easy to get rid of this optimization if necessary. - - // Do not waste too much time if we already have a good match: - if (prev_length >= good_match) { - chain_length >>= 2; - } - - // Do not look for matches beyond the end of the input. This is - // necessary - // to make deflate deterministic. - if (_nice_match > lookahead) - _nice_match = lookahead; - - do { - match = cur_match; - - // Skip to next match if the match length cannot increase - // or if the match length is less than 2: - if (win[match + best_len] != scan_end || win[match + best_len - 1] != scan_end1 || win[match] != win[scan] - || win[++match] != win[scan + 1]) - continue; - - // The check at best_len-1 can be removed because it will be made - // again later. (This heuristic is not always a win.) - // It is not necessary to compare scan[2] and match[2] since they - // are always equal when the other bytes match, given that - // the hash keys are equal and that HASH_BITS >= 8. - scan += 2; - match++; - - // We check for insufficient lookahead only every 8th comparison; - // the 256th check will be made at strstart+258. - // eslint-disable-next-line no-empty - do { - // empty block - } while (win[++scan] == win[++match] && win[++scan] == win[++match] && win[++scan] == win[++match] - && win[++scan] == win[++match] && win[++scan] == win[++match] && win[++scan] == win[++match] - && win[++scan] == win[++match] && win[++scan] == win[++match] && scan < strend); - - len = MAX_MATCH - (strend - scan); - scan = strend - MAX_MATCH; - - if (len > best_len) { - match_start = cur_match; - best_len = len; - if (len >= _nice_match) - break; - scan_end1 = win[scan + best_len - 1]; - scan_end = win[scan + best_len]; - } - - } while ((cur_match = (prev[cur_match & wmask] & 0xffff)) > limit && --chain_length !== 0); - - if (best_len <= lookahead) - return best_len; - return lookahead; - } - - // Compress as much as possible from the input stream, return the current - // block state. - // This function does not perform lazy evaluation of matches and inserts - // new strings in the dictionary only for unmatched strings or for short - // matches. It is used only for the fast compression options. - function deflate_fast(flush) { - // short hash_head = 0; // head of the hash chain - let hash_head = 0; // head of the hash chain - let bflush; // set if current block must be flushed - - // eslint-disable-next-line no-constant-condition - while (true) { - // Make sure that we always have enough lookahead, except - // at the end of the input file. We need MAX_MATCH bytes - // for the next match, plus MIN_MATCH bytes to insert the - // string following the next match. - if (lookahead < MIN_LOOKAHEAD) { - fill_window(); - if (lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH$1) { - return NeedMore; - } - if (lookahead === 0) - break; // flush the current block - } - - // Insert the string win[strstart .. strstart+2] in the - // dictionary, and set hash_head to the head of the hash chain: - if (lookahead >= MIN_MATCH) { - ins_h = (((ins_h) << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask; - - // prev[strstart&w_mask]=hash_head=head[ins_h]; - hash_head = (head[ins_h] & 0xffff); - prev[strstart & w_mask] = head[ins_h]; - head[ins_h] = strstart; - } - - // Find the longest match, discarding those <= prev_length. - // At this point we have always match_length < MIN_MATCH - - if (hash_head !== 0 && ((strstart - hash_head) & 0xffff) <= w_size - MIN_LOOKAHEAD) { - // To simplify the code, we prevent matches with the string - // of win index 0 (in particular we have to avoid a match - // of the string with itself at the start of the input file). - if (strategy != Z_HUFFMAN_ONLY) { - match_length = longest_match(hash_head); - } - // longest_match() sets match_start - } - if (match_length >= MIN_MATCH) { - // check_match(strstart, match_start, match_length); - - bflush = _tr_tally(strstart - match_start, match_length - MIN_MATCH); - - lookahead -= match_length; - - // Insert new strings in the hash table only if the match length - // is not too large. This saves time but degrades compression. - if (match_length <= max_lazy_match && lookahead >= MIN_MATCH) { - match_length--; // string at strstart already in hash table - do { - strstart++; - - ins_h = ((ins_h << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask; - // prev[strstart&w_mask]=hash_head=head[ins_h]; - hash_head = (head[ins_h] & 0xffff); - prev[strstart & w_mask] = head[ins_h]; - head[ins_h] = strstart; - - // strstart never exceeds WSIZE-MAX_MATCH, so there are - // always MIN_MATCH bytes ahead. - } while (--match_length !== 0); - strstart++; - } else { - strstart += match_length; - match_length = 0; - ins_h = win[strstart] & 0xff; - - ins_h = (((ins_h) << hash_shift) ^ (win[strstart + 1] & 0xff)) & hash_mask; - // If lookahead < MIN_MATCH, ins_h is garbage, but it does - // not - // matter since it will be recomputed at next deflate call. - } - } else { - // No match, output a literal byte - - bflush = _tr_tally(0, win[strstart] & 0xff); - lookahead--; - strstart++; - } - if (bflush) { - - flush_block_only(false); - if (strm.avail_out === 0) - return NeedMore; - } - } - - flush_block_only(flush == Z_FINISH$1); - if (strm.avail_out === 0) { - if (flush == Z_FINISH$1) - return FinishStarted; - else - return NeedMore; - } - return flush == Z_FINISH$1 ? FinishDone : BlockDone; - } - - // Same as above, but achieves better compression. We use a lazy - // evaluation for matches: a match is finally adopted only if there is - // no better match at the next win position. - function deflate_slow(flush) { - // short hash_head = 0; // head of hash chain - let hash_head = 0; // head of hash chain - let bflush; // set if current block must be flushed - let max_insert; - - // Process the input block. - // eslint-disable-next-line no-constant-condition - while (true) { - // Make sure that we always have enough lookahead, except - // at the end of the input file. We need MAX_MATCH bytes - // for the next match, plus MIN_MATCH bytes to insert the - // string following the next match. - - if (lookahead < MIN_LOOKAHEAD) { - fill_window(); - if (lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH$1) { - return NeedMore; - } - if (lookahead === 0) - break; // flush the current block - } - - // Insert the string win[strstart .. strstart+2] in the - // dictionary, and set hash_head to the head of the hash chain: - - if (lookahead >= MIN_MATCH) { - ins_h = (((ins_h) << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask; - // prev[strstart&w_mask]=hash_head=head[ins_h]; - hash_head = (head[ins_h] & 0xffff); - prev[strstart & w_mask] = head[ins_h]; - head[ins_h] = strstart; - } - - // Find the longest match, discarding those <= prev_length. - prev_length = match_length; - prev_match = match_start; - match_length = MIN_MATCH - 1; - - if (hash_head !== 0 && prev_length < max_lazy_match && ((strstart - hash_head) & 0xffff) <= w_size - MIN_LOOKAHEAD) { - // To simplify the code, we prevent matches with the string - // of win index 0 (in particular we have to avoid a match - // of the string with itself at the start of the input file). - - if (strategy != Z_HUFFMAN_ONLY) { - match_length = longest_match(hash_head); - } - // longest_match() sets match_start - - if (match_length <= 5 && (strategy == Z_FILTERED || (match_length == MIN_MATCH && strstart - match_start > 4096))) { - - // If prev_match is also MIN_MATCH, match_start is garbage - // but we will ignore the current match anyway. - match_length = MIN_MATCH - 1; - } - } - - // If there was a match at the previous step and the current - // match is not better, output the previous match: - if (prev_length >= MIN_MATCH && match_length <= prev_length) { - max_insert = strstart + lookahead - MIN_MATCH; - // Do not insert strings in hash table beyond this. - - // check_match(strstart-1, prev_match, prev_length); - - bflush = _tr_tally(strstart - 1 - prev_match, prev_length - MIN_MATCH); - - // Insert in hash table all strings up to the end of the match. - // strstart-1 and strstart are already inserted. If there is not - // enough lookahead, the last two strings are not inserted in - // the hash table. - lookahead -= prev_length - 1; - prev_length -= 2; - do { - if (++strstart <= max_insert) { - ins_h = (((ins_h) << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask; - // prev[strstart&w_mask]=hash_head=head[ins_h]; - hash_head = (head[ins_h] & 0xffff); - prev[strstart & w_mask] = head[ins_h]; - head[ins_h] = strstart; - } - } while (--prev_length !== 0); - match_available = 0; - match_length = MIN_MATCH - 1; - strstart++; - - if (bflush) { - flush_block_only(false); - if (strm.avail_out === 0) - return NeedMore; - } - } else if (match_available !== 0) { - - // If there was no match at the previous position, output a - // single literal. If there was a match but the current match - // is longer, truncate the previous match to a single literal. - - bflush = _tr_tally(0, win[strstart - 1] & 0xff); - - if (bflush) { - flush_block_only(false); - } - strstart++; - lookahead--; - if (strm.avail_out === 0) - return NeedMore; - } else { - // There is no previous match to compare with, wait for - // the next step to decide. - - match_available = 1; - strstart++; - lookahead--; - } - } - - if (match_available !== 0) { - bflush = _tr_tally(0, win[strstart - 1] & 0xff); - match_available = 0; - } - flush_block_only(flush == Z_FINISH$1); - - if (strm.avail_out === 0) { - if (flush == Z_FINISH$1) - return FinishStarted; - else - return NeedMore; - } - - return flush == Z_FINISH$1 ? FinishDone : BlockDone; - } - - function deflateReset(strm) { - strm.total_in = strm.total_out = 0; - strm.msg = null; // - - that.pending = 0; - that.pending_out = 0; - - status = BUSY_STATE; - - last_flush = Z_NO_FLUSH$1; - - tr_init(); - lm_init(); - return Z_OK$1; - } - - that.deflateInit = function (strm, _level, bits, _method, memLevel, _strategy) { - if (!_method) - _method = Z_DEFLATED$1; - if (!memLevel) - memLevel = DEF_MEM_LEVEL; - if (!_strategy) - _strategy = Z_DEFAULT_STRATEGY; - - // byte[] my_version=ZLIB_VERSION; - - // - // if (!version || version[0] != my_version[0] - // || stream_size != sizeof(z_stream)) { - // return Z_VERSION_ERROR; - // } - - strm.msg = null; - - if (_level == Z_DEFAULT_COMPRESSION) - _level = 6; - - if (memLevel < 1 || memLevel > MAX_MEM_LEVEL || _method != Z_DEFLATED$1 || bits < 9 || bits > 15 || _level < 0 || _level > 9 || _strategy < 0 - || _strategy > Z_HUFFMAN_ONLY) { - return Z_STREAM_ERROR$1; - } - - strm.dstate = that; - - w_bits = bits; - w_size = 1 << w_bits; - w_mask = w_size - 1; - - hash_bits = memLevel + 7; - hash_size = 1 << hash_bits; - hash_mask = hash_size - 1; - hash_shift = Math.floor((hash_bits + MIN_MATCH - 1) / MIN_MATCH); - - win = new Uint8Array(w_size * 2); - prev = []; - head = []; - - lit_bufsize = 1 << (memLevel + 6); // 16K elements by default - - that.pending_buf = new Uint8Array(lit_bufsize * 4); - pending_buf_size = lit_bufsize * 4; - - that.dist_buf = new Uint16Array(lit_bufsize); - that.lc_buf = new Uint8Array(lit_bufsize); - - level = _level; - - strategy = _strategy; - - return deflateReset(strm); - }; - - that.deflateEnd = function () { - if (status != INIT_STATE && status != BUSY_STATE && status != FINISH_STATE) { - return Z_STREAM_ERROR$1; - } - // Deallocate in reverse order of allocations: - that.lc_buf = null; - that.dist_buf = null; - that.pending_buf = null; - head = null; - prev = null; - win = null; - // free - that.dstate = null; - return status == BUSY_STATE ? Z_DATA_ERROR$1 : Z_OK$1; - }; - - that.deflateParams = function (strm, _level, _strategy) { - let err = Z_OK$1; - - if (_level == Z_DEFAULT_COMPRESSION) { - _level = 6; - } - if (_level < 0 || _level > 9 || _strategy < 0 || _strategy > Z_HUFFMAN_ONLY) { - return Z_STREAM_ERROR$1; - } - - if (config_table[level].func != config_table[_level].func && strm.total_in !== 0) { - // Flush the last buffer: - err = strm.deflate(Z_PARTIAL_FLUSH); - } - - if (level != _level) { - level = _level; - max_lazy_match = config_table[level].max_lazy; - good_match = config_table[level].good_length; - nice_match = config_table[level].nice_length; - max_chain_length = config_table[level].max_chain; - } - strategy = _strategy; - return err; - }; - - that.deflateSetDictionary = function (_strm, dictionary, dictLength) { - let length = dictLength; - let n, index = 0; - - if (!dictionary || status != INIT_STATE) - return Z_STREAM_ERROR$1; - - if (length < MIN_MATCH) - return Z_OK$1; - if (length > w_size - MIN_LOOKAHEAD) { - length = w_size - MIN_LOOKAHEAD; - index = dictLength - length; // use the tail of the dictionary - } - win.set(dictionary.subarray(index, index + length), 0); - - strstart = length; - block_start = length; - - // Insert all strings in the hash table (except for the last two bytes). - // s->lookahead stays null, so s->ins_h will be recomputed at the next - // call of fill_window. - - ins_h = win[0] & 0xff; - ins_h = (((ins_h) << hash_shift) ^ (win[1] & 0xff)) & hash_mask; - - for (n = 0; n <= length - MIN_MATCH; n++) { - ins_h = (((ins_h) << hash_shift) ^ (win[(n) + (MIN_MATCH - 1)] & 0xff)) & hash_mask; - prev[n & w_mask] = head[ins_h]; - head[ins_h] = n; - } - return Z_OK$1; - }; - - that.deflate = function (_strm, flush) { - let i, header, level_flags, old_flush, bstate; - - if (flush > Z_FINISH$1 || flush < 0) { - return Z_STREAM_ERROR$1; - } - - if (!_strm.next_out || (!_strm.next_in && _strm.avail_in !== 0) || (status == FINISH_STATE && flush != Z_FINISH$1)) { - _strm.msg = z_errmsg[Z_NEED_DICT$1 - (Z_STREAM_ERROR$1)]; - return Z_STREAM_ERROR$1; - } - if (_strm.avail_out === 0) { - _strm.msg = z_errmsg[Z_NEED_DICT$1 - (Z_BUF_ERROR$1)]; - return Z_BUF_ERROR$1; - } - - strm = _strm; // just in case - old_flush = last_flush; - last_flush = flush; - - // Write the zlib header - if (status == INIT_STATE) { - header = (Z_DEFLATED$1 + ((w_bits - 8) << 4)) << 8; - level_flags = ((level - 1) & 0xff) >> 1; - - if (level_flags > 3) - level_flags = 3; - header |= (level_flags << 6); - if (strstart !== 0) - header |= PRESET_DICT$1; - header += 31 - (header % 31); - - status = BUSY_STATE; - putShortMSB(header); - } - - // Flush as much pending output as possible - if (that.pending !== 0) { - strm.flush_pending(); - if (strm.avail_out === 0) { - // console.log(" avail_out==0"); - // Since avail_out is 0, deflate will be called again with - // more output space, but possibly with both pending and - // avail_in equal to zero. There won't be anything to do, - // but this is not an error situation so make sure we - // return OK instead of BUF_ERROR at next call of deflate: - last_flush = -1; - return Z_OK$1; - } - - // Make sure there is something to do and avoid duplicate - // consecutive - // flushes. For repeated and useless calls with Z_FINISH, we keep - // returning Z_STREAM_END instead of Z_BUFF_ERROR. - } else if (strm.avail_in === 0 && flush <= old_flush && flush != Z_FINISH$1) { - strm.msg = z_errmsg[Z_NEED_DICT$1 - (Z_BUF_ERROR$1)]; - return Z_BUF_ERROR$1; - } - - // User must not provide more input after the first FINISH: - if (status == FINISH_STATE && strm.avail_in !== 0) { - _strm.msg = z_errmsg[Z_NEED_DICT$1 - (Z_BUF_ERROR$1)]; - return Z_BUF_ERROR$1; - } - - // Start a new block or continue the current one. - if (strm.avail_in !== 0 || lookahead !== 0 || (flush != Z_NO_FLUSH$1 && status != FINISH_STATE)) { - bstate = -1; - switch (config_table[level].func) { - case STORED$1: - bstate = deflate_stored(flush); - break; - case FAST: - bstate = deflate_fast(flush); - break; - case SLOW: - bstate = deflate_slow(flush); - break; - } - - if (bstate == FinishStarted || bstate == FinishDone) { - status = FINISH_STATE; - } - if (bstate == NeedMore || bstate == FinishStarted) { - if (strm.avail_out === 0) { - last_flush = -1; // avoid BUF_ERROR next call, see above - } - return Z_OK$1; - // If flush != Z_NO_FLUSH && avail_out === 0, the next call - // of deflate should use the same flush parameter to make sure - // that the flush is complete. So we don't have to output an - // empty block here, this will be done at next call. This also - // ensures that for a very small output buffer, we emit at most - // one empty block. - } - - if (bstate == BlockDone) { - if (flush == Z_PARTIAL_FLUSH) { - _tr_align(); - } else { // FULL_FLUSH or SYNC_FLUSH - _tr_stored_block(0, 0, false); - // For a full flush, this empty block will be recognized - // as a special marker by inflate_sync(). - if (flush == Z_FULL_FLUSH) { - // state.head[s.hash_size-1]=0; - for (i = 0; i < hash_size/*-1*/; i++) - // forget history - head[i] = 0; - } - } - strm.flush_pending(); - if (strm.avail_out === 0) { - last_flush = -1; // avoid BUF_ERROR at next call, see above - return Z_OK$1; - } - } - } - - if (flush != Z_FINISH$1) - return Z_OK$1; - return Z_STREAM_END$1; - }; -} - -// ZStream - -function ZStream$1() { - const that = this; - that.next_in_index = 0; - that.next_out_index = 0; - // that.next_in; // next input byte - that.avail_in = 0; // number of bytes available at next_in - that.total_in = 0; // total nb of input bytes read so far - // that.next_out; // next output byte should be put there - that.avail_out = 0; // remaining free space at next_out - that.total_out = 0; // total nb of bytes output so far - // that.msg; - // that.dstate; -} - -ZStream$1.prototype = { - deflateInit(level, bits) { - const that = this; - that.dstate = new Deflate(); - if (!bits) - bits = MAX_BITS$1; - return that.dstate.deflateInit(that, level, bits); - }, - - deflate(flush) { - const that = this; - if (!that.dstate) { - return Z_STREAM_ERROR$1; - } - return that.dstate.deflate(that, flush); - }, - - deflateEnd() { - const that = this; - if (!that.dstate) - return Z_STREAM_ERROR$1; - const ret = that.dstate.deflateEnd(); - that.dstate = null; - return ret; - }, - - deflateParams(level, strategy) { - const that = this; - if (!that.dstate) - return Z_STREAM_ERROR$1; - return that.dstate.deflateParams(that, level, strategy); - }, - - deflateSetDictionary(dictionary, dictLength) { - const that = this; - if (!that.dstate) - return Z_STREAM_ERROR$1; - return that.dstate.deflateSetDictionary(that, dictionary, dictLength); - }, - - // Read a new buffer from the current input stream, update the - // total number of bytes read. All deflate() input goes through - // this function so some applications may wish to modify it to avoid - // allocating a large strm->next_in buffer and copying from it. - // (See also flush_pending()). - read_buf(buf, start, size) { - const that = this; - let len = that.avail_in; - if (len > size) - len = size; - if (len === 0) - return 0; - that.avail_in -= len; - buf.set(that.next_in.subarray(that.next_in_index, that.next_in_index + len), start); - that.next_in_index += len; - that.total_in += len; - return len; - }, - - // Flush as much pending output as possible. All deflate() output goes - // through this function so some applications may wish to modify it - // to avoid allocating a large strm->next_out buffer and copying into it. - // (See also read_buf()). - flush_pending() { - const that = this; - let len = that.dstate.pending; - - if (len > that.avail_out) - len = that.avail_out; - if (len === 0) - return; - - // if (that.dstate.pending_buf.length <= that.dstate.pending_out || that.next_out.length <= that.next_out_index - // || that.dstate.pending_buf.length < (that.dstate.pending_out + len) || that.next_out.length < (that.next_out_index + - // len)) { - // console.log(that.dstate.pending_buf.length + ", " + that.dstate.pending_out + ", " + that.next_out.length + ", " + - // that.next_out_index + ", " + len); - // console.log("avail_out=" + that.avail_out); - // } - - that.next_out.set(that.dstate.pending_buf.subarray(that.dstate.pending_out, that.dstate.pending_out + len), that.next_out_index); - - that.next_out_index += len; - that.dstate.pending_out += len; - that.total_out += len; - that.avail_out -= len; - that.dstate.pending -= len; - if (that.dstate.pending === 0) { - that.dstate.pending_out = 0; - } - } -}; - -// Deflate - -function ZipDeflate(options) { - const that = this; - const z = new ZStream$1(); - const bufsize = getMaximumCompressedSize(options && options.chunkSize ? options.chunkSize : 64 * 1024); - const flush = Z_NO_FLUSH$1; - const buf = new Uint8Array(bufsize); - let level = options ? options.level : Z_DEFAULT_COMPRESSION; - if (typeof level == "undefined") - level = Z_DEFAULT_COMPRESSION; - z.deflateInit(level); - z.next_out = buf; - - that.append = function (data, onprogress) { - let err, array, lastIndex = 0, bufferIndex = 0, bufferSize = 0; - const buffers = []; - if (!data.length) - return; - z.next_in_index = 0; - z.next_in = data; - z.avail_in = data.length; - do { - z.next_out_index = 0; - z.avail_out = bufsize; - err = z.deflate(flush); - if (err != Z_OK$1) - throw new Error("deflating: " + z.msg); - if (z.next_out_index) - if (z.next_out_index == bufsize) - buffers.push(new Uint8Array(buf)); - else - buffers.push(buf.slice(0, z.next_out_index)); - bufferSize += z.next_out_index; - if (onprogress && z.next_in_index > 0 && z.next_in_index != lastIndex) { - onprogress(z.next_in_index); - lastIndex = z.next_in_index; - } - } while (z.avail_in > 0 || z.avail_out === 0); - if (buffers.length > 1) { - array = new Uint8Array(bufferSize); - buffers.forEach(function (chunk) { - array.set(chunk, bufferIndex); - bufferIndex += chunk.length; - }); - } else { - array = buffers[0] || new Uint8Array(); - } - return array; - }; - that.flush = function () { - let err, array, bufferIndex = 0, bufferSize = 0; - const buffers = []; - do { - z.next_out_index = 0; - z.avail_out = bufsize; - err = z.deflate(Z_FINISH$1); - if (err != Z_STREAM_END$1 && err != Z_OK$1) - throw new Error("deflating: " + z.msg); - if (bufsize - z.avail_out > 0) - buffers.push(buf.slice(0, z.next_out_index)); - bufferSize += z.next_out_index; - } while (z.avail_in > 0 || z.avail_out === 0); - z.deflateEnd(); - array = new Uint8Array(bufferSize); - buffers.forEach(function (chunk) { - array.set(chunk, bufferIndex); - bufferIndex += chunk.length; - }); - return array; - }; -} - -function getMaximumCompressedSize(uncompressedSize) { - return uncompressedSize + (5 * (Math.floor(uncompressedSize / 16383) + 1)); -} - -/* - Copyright (c) 2022 Gildas Lormeau. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the distribution. - - 3. The names of the authors may not be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT, - INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, - INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, - OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This program is based on JZlib 1.0.2 ymnk, JCraft,Inc. - * JZlib is based on zlib-1.1.3, so all credit should go authors - * Jean-loup Gailly(jloup@gzip.org) and Mark Adler(madler@alumni.caltech.edu) - * and contributors of zlib. - */ - -// deno-lint-ignore-file no-this-alias prefer-const - -// Global - -const MAX_BITS = 15; - -const Z_OK = 0; -const Z_STREAM_END = 1; -const Z_NEED_DICT = 2; -const Z_STREAM_ERROR = -2; -const Z_DATA_ERROR = -3; -const Z_MEM_ERROR = -4; -const Z_BUF_ERROR = -5; - -const inflate_mask = [0x00000000, 0x00000001, 0x00000003, 0x00000007, 0x0000000f, 0x0000001f, 0x0000003f, 0x0000007f, 0x000000ff, 0x000001ff, 0x000003ff, - 0x000007ff, 0x00000fff, 0x00001fff, 0x00003fff, 0x00007fff, 0x0000ffff]; - -const MANY = 1440; - -// JZlib version : "1.0.2" -const Z_NO_FLUSH = 0; -const Z_FINISH = 4; - -// InfTree -const fixed_bl = 9; -const fixed_bd = 5; - -const fixed_tl = [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]; -const fixed_td = [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]; - -// Tables for deflate from PKZIP's appnote.txt. -const cplens = [ // Copy lengths for literal codes 257..285 - 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]; - -// see note #13 above about 258 -const cplext = [ // Extra bits for literal codes 257..285 - 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 // 112==invalid -]; - -const cpdist = [ // Copy offsets for distance codes 0..29 - 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]; - -const cpdext = [ // Extra bits for distance codes - 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]; - -// If BMAX needs to be larger than 16, then h and x[] should be uLong. -const BMAX = 15; // maximum bit length of any code - -function InfTree() { - const that = this; - - let hn; // hufts used in space - let v; // work area for huft_build - let c; // bit length count table - let r; // table entry for structure assignment - let u; // table stack - let x; // bit offsets, then code stack - - function huft_build(b, // code lengths in bits (all assumed <= - // BMAX) - bindex, n, // number of codes (assumed <= 288) - s, // number of simple-valued codes (0..s-1) - d, // list of base values for non-simple codes - e, // list of extra bits for non-simple codes - t, // result: starting table - m, // maximum lookup bits, returns actual - hp,// space for trees - hn,// hufts used in space - v // working area: values in order of bit length - ) { - // Given a list of code lengths and a maximum table size, make a set of - // tables to decode that set of codes. Return Z_OK on success, - // Z_BUF_ERROR - // if the given code set is incomplete (the tables are still built in - // this - // case), Z_DATA_ERROR if the input is invalid (an over-subscribed set - // of - // lengths), or Z_MEM_ERROR if not enough memory. - - let a; // counter for codes of length k - let f; // i repeats in table every f entries - let g; // maximum code length - let h; // table level - let i; // counter, current code - let j; // counter - let k; // number of bits in current code - let l; // bits per table (returned in m) - let mask; // (1 << w) - 1, to avoid cc -O bug on HP - let p; // pointer into c[], b[], or v[] - let q; // points to current table - let w; // bits before this table == (l * h) - let xp; // pointer into x - let y; // number of dummy codes added - let z; // number of entries in current table - - // Generate counts for each bit length - - p = 0; - i = n; - do { - c[b[bindex + p]]++; - p++; - i--; // assume all entries <= BMAX - } while (i !== 0); - - if (c[0] == n) { // null input--all zero length codes - t[0] = -1; - m[0] = 0; - return Z_OK; - } - - // Find minimum and maximum length, bound *m by those - l = m[0]; - for (j = 1; j <= BMAX; j++) - if (c[j] !== 0) - break; - k = j; // minimum code length - if (l < j) { - l = j; - } - for (i = BMAX; i !== 0; i--) { - if (c[i] !== 0) - break; - } - g = i; // maximum code length - if (l > i) { - l = i; - } - m[0] = l; - - // Adjust last length count to fill out codes, if needed - for (y = 1 << j; j < i; j++, y <<= 1) { - if ((y -= c[j]) < 0) { - return Z_DATA_ERROR; - } - } - if ((y -= c[i]) < 0) { - return Z_DATA_ERROR; - } - c[i] += y; - - // Generate starting offsets into the value table for each length - x[1] = j = 0; - p = 1; - xp = 2; - while (--i !== 0) { // note that i == g from above - x[xp] = (j += c[p]); - xp++; - p++; - } - - // Make a table of values in order of bit lengths - i = 0; - p = 0; - do { - if ((j = b[bindex + p]) !== 0) { - v[x[j]++] = i; - } - p++; - } while (++i < n); - n = x[g]; // set n to length of v - - // Generate the Huffman codes and for each, make the table entries - x[0] = i = 0; // first Huffman code is zero - p = 0; // grab values in bit order - h = -1; // no tables yet--level -1 - w = -l; // bits decoded == (l * h) - u[0] = 0; // just to keep compilers happy - q = 0; // ditto - z = 0; // ditto - - // go through the bit lengths (k already is bits in shortest code) - for (; k <= g; k++) { - a = c[k]; - while (a-- !== 0) { - // here i is the Huffman code of length k bits for value *p - // make tables up to required level - while (k > w + l) { - h++; - w += l; // previous table always l bits - // compute minimum size table less than or equal to l bits - z = g - w; - z = (z > l) ? l : z; // table size upper limit - if ((f = 1 << (j = k - w)) > a + 1) { // try a k-w bit table - // too few codes for - // k-w bit table - f -= a + 1; // deduct codes from patterns left - xp = k; - if (j < z) { - while (++j < z) { // try smaller tables up to z bits - if ((f <<= 1) <= c[++xp]) - break; // enough codes to use up j bits - f -= c[xp]; // else deduct codes from patterns - } - } - } - z = 1 << j; // table entries for j-bit table - - // allocate new table - if (hn[0] + z > MANY) { // (note: doesn't matter for fixed) - return Z_DATA_ERROR; // overflow of MANY - } - u[h] = q = /* hp+ */hn[0]; // DEBUG - hn[0] += z; - - // connect to last table, if there is one - if (h !== 0) { - x[h] = i; // save pattern for backing up - r[0] = /* (byte) */j; // bits in this table - r[1] = /* (byte) */l; // bits to dump before this table - j = i >>> (w - l); - r[2] = /* (int) */(q - u[h - 1] - j); // offset to this table - hp.set(r, (u[h - 1] + j) * 3); - // to - // last - // table - } else { - t[0] = q; // first table is returned result - } - } - - // set up table entry in r - r[1] = /* (byte) */(k - w); - if (p >= n) { - r[0] = 128 + 64; // out of values--invalid code - } else if (v[p] < s) { - r[0] = /* (byte) */(v[p] < 256 ? 0 : 32 + 64); // 256 is - // end-of-block - r[2] = v[p++]; // simple code is just the value - } else { - r[0] = /* (byte) */(e[v[p] - s] + 16 + 64); // non-simple--look - // up in lists - r[2] = d[v[p++] - s]; - } - - // fill code-like entries with r - f = 1 << (k - w); - for (j = i >>> w; j < z; j += f) { - hp.set(r, (q + j) * 3); - } - - // backwards increment the k-bit code i - for (j = 1 << (k - 1); (i & j) !== 0; j >>>= 1) { - i ^= j; - } - i ^= j; - - // backup over finished tables - mask = (1 << w) - 1; // needed on HP, cc -O bug - while ((i & mask) != x[h]) { - h--; // don't need to update q - w -= l; - mask = (1 << w) - 1; - } - } - } - // Return Z_BUF_ERROR if we were given an incomplete table - return y !== 0 && g != 1 ? Z_BUF_ERROR : Z_OK; - } - - function initWorkArea(vsize) { - let i; - if (!hn) { - hn = []; // []; //new Array(1); - v = []; // new Array(vsize); - c = new Int32Array(BMAX + 1); // new Array(BMAX + 1); - r = []; // new Array(3); - u = new Int32Array(BMAX); // new Array(BMAX); - x = new Int32Array(BMAX + 1); // new Array(BMAX + 1); - } - if (v.length < vsize) { - v = []; // new Array(vsize); - } - for (i = 0; i < vsize; i++) { - v[i] = 0; - } - for (i = 0; i < BMAX + 1; i++) { - c[i] = 0; - } - for (i = 0; i < 3; i++) { - r[i] = 0; - } - // for(int i=0; i 257)) { - if (result == Z_DATA_ERROR) { - z.msg = "oversubscribed distance tree"; - } else if (result == Z_BUF_ERROR) { - z.msg = "incomplete distance tree"; - result = Z_DATA_ERROR; - } else if (result != Z_MEM_ERROR) { - z.msg = "empty distance tree with lengths"; - result = Z_DATA_ERROR; - } - return result; - } - - return Z_OK; - }; - -} - -InfTree.inflate_trees_fixed = function (bl, // literal desired/actual bit depth - bd, // distance desired/actual bit depth - tl,// literal/length tree result - td// distance tree result -) { - bl[0] = fixed_bl; - bd[0] = fixed_bd; - tl[0] = fixed_tl; - td[0] = fixed_td; - return Z_OK; -}; - -// InfCodes - -// waiting for "i:"=input, -// "o:"=output, -// "x:"=nothing -const START = 0; // x: set up for LEN -const LEN = 1; // i: get length/literal/eob next -const LENEXT = 2; // i: getting length extra (have base) -const DIST = 3; // i: get distance next -const DISTEXT = 4;// i: getting distance extra -const COPY = 5; // o: copying bytes in win, waiting -// for space -const LIT = 6; // o: got literal, waiting for output -// space -const WASH = 7; // o: got eob, possibly still output -// waiting -const END = 8; // x: got eob and all data flushed -const BADCODE = 9;// x: got error - -function InfCodes() { - const that = this; - - let mode; // current inflate_codes mode - - // mode dependent information - let len = 0; - - let tree; // pointer into tree - let tree_index = 0; - let need = 0; // bits needed - - let lit = 0; - - // if EXT or COPY, where and how much - let get = 0; // bits to get for extra - let dist = 0; // distance back to copy from - - let lbits = 0; // ltree bits decoded per branch - let dbits = 0; // dtree bits decoder per branch - let ltree; // literal/length/eob tree - let ltree_index = 0; // literal/length/eob tree - let dtree; // distance tree - let dtree_index = 0; // distance tree - - // Called with number of bytes left to write in win at least 258 - // (the maximum string length) and number of input bytes available - // at least ten. The ten bytes are six bytes for the longest length/ - // distance pair plus four bytes for overloading the bit buffer. - - function inflate_fast(bl, bd, tl, tl_index, td, td_index, s, z) { - let t; // temporary pointer - let tp; // temporary pointer - let tp_index; // temporary pointer - let e; // extra bits or operation - let b; // bit buffer - let k; // bits in bit buffer - let p; // input data pointer - let n; // bytes available there - let q; // output win write pointer - let m; // bytes to end of win or read pointer - let ml; // mask for literal/length tree - let md; // mask for distance tree - let c; // bytes to copy - let d; // distance back to copy from - let r; // copy source pointer - - let tp_index_t_3; // (tp_index+t)*3 - - // load input, output, bit values - p = z.next_in_index; - n = z.avail_in; - b = s.bitb; - k = s.bitk; - q = s.write; - m = q < s.read ? s.read - q - 1 : s.end - q; - - // initialize masks - ml = inflate_mask[bl]; - md = inflate_mask[bd]; - - // do until not enough input or output space for fast loop - do { // assume called with m >= 258 && n >= 10 - // get literal/length code - while (k < (20)) { // max bits for literal/length code - n--; - b |= (z.read_byte(p++) & 0xff) << k; - k += 8; - } - - t = b & ml; - tp = tl; - tp_index = tl_index; - tp_index_t_3 = (tp_index + t) * 3; - if ((e = tp[tp_index_t_3]) === 0) { - b >>= (tp[tp_index_t_3 + 1]); - k -= (tp[tp_index_t_3 + 1]); - - s.win[q++] = /* (byte) */tp[tp_index_t_3 + 2]; - m--; - continue; - } - do { - - b >>= (tp[tp_index_t_3 + 1]); - k -= (tp[tp_index_t_3 + 1]); - - if ((e & 16) !== 0) { - e &= 15; - c = tp[tp_index_t_3 + 2] + (/* (int) */b & inflate_mask[e]); - - b >>= e; - k -= e; - - // decode distance base of block to copy - while (k < (15)) { // max bits for distance code - n--; - b |= (z.read_byte(p++) & 0xff) << k; - k += 8; - } - - t = b & md; - tp = td; - tp_index = td_index; - tp_index_t_3 = (tp_index + t) * 3; - e = tp[tp_index_t_3]; - - do { - - b >>= (tp[tp_index_t_3 + 1]); - k -= (tp[tp_index_t_3 + 1]); - - if ((e & 16) !== 0) { - // get extra bits to add to distance base - e &= 15; - while (k < (e)) { // get extra bits (up to 13) - n--; - b |= (z.read_byte(p++) & 0xff) << k; - k += 8; - } - - d = tp[tp_index_t_3 + 2] + (b & inflate_mask[e]); - - b >>= (e); - k -= (e); - - // do the copy - m -= c; - if (q >= d) { // offset before dest - // just copy - r = q - d; - if (q - r > 0 && 2 > (q - r)) { - s.win[q++] = s.win[r++]; // minimum - // count is - // three, - s.win[q++] = s.win[r++]; // so unroll - // loop a - // little - c -= 2; - } else { - s.win.set(s.win.subarray(r, r + 2), q); - q += 2; - r += 2; - c -= 2; - } - } else { // else offset after destination - r = q - d; - do { - r += s.end; // force pointer in win - } while (r < 0); // covers invalid distances - e = s.end - r; - if (c > e) { // if source crosses, - c -= e; // wrapped copy - if (q - r > 0 && e > (q - r)) { - do { - s.win[q++] = s.win[r++]; - } while (--e !== 0); - } else { - s.win.set(s.win.subarray(r, r + e), q); - q += e; - r += e; - e = 0; - } - r = 0; // copy rest from start of win - } - - } - - // copy all or what's left - if (q - r > 0 && c > (q - r)) { - do { - s.win[q++] = s.win[r++]; - } while (--c !== 0); - } else { - s.win.set(s.win.subarray(r, r + c), q); - q += c; - r += c; - c = 0; - } - break; - } else if ((e & 64) === 0) { - t += tp[tp_index_t_3 + 2]; - t += (b & inflate_mask[e]); - tp_index_t_3 = (tp_index + t) * 3; - e = tp[tp_index_t_3]; - } else { - z.msg = "invalid distance code"; - - c = z.avail_in - n; - c = (k >> 3) < c ? k >> 3 : c; - n += c; - p -= c; - k -= c << 3; - - s.bitb = b; - s.bitk = k; - z.avail_in = n; - z.total_in += p - z.next_in_index; - z.next_in_index = p; - s.write = q; - - return Z_DATA_ERROR; - } - // eslint-disable-next-line no-constant-condition - } while (true); - break; - } - - if ((e & 64) === 0) { - t += tp[tp_index_t_3 + 2]; - t += (b & inflate_mask[e]); - tp_index_t_3 = (tp_index + t) * 3; - if ((e = tp[tp_index_t_3]) === 0) { - - b >>= (tp[tp_index_t_3 + 1]); - k -= (tp[tp_index_t_3 + 1]); - - s.win[q++] = /* (byte) */tp[tp_index_t_3 + 2]; - m--; - break; - } - } else if ((e & 32) !== 0) { - - c = z.avail_in - n; - c = (k >> 3) < c ? k >> 3 : c; - n += c; - p -= c; - k -= c << 3; - - s.bitb = b; - s.bitk = k; - z.avail_in = n; - z.total_in += p - z.next_in_index; - z.next_in_index = p; - s.write = q; - - return Z_STREAM_END; - } else { - z.msg = "invalid literal/length code"; - - c = z.avail_in - n; - c = (k >> 3) < c ? k >> 3 : c; - n += c; - p -= c; - k -= c << 3; - - s.bitb = b; - s.bitk = k; - z.avail_in = n; - z.total_in += p - z.next_in_index; - z.next_in_index = p; - s.write = q; - - return Z_DATA_ERROR; - } - // eslint-disable-next-line no-constant-condition - } while (true); - } while (m >= 258 && n >= 10); - - // not enough input or output--restore pointers and return - c = z.avail_in - n; - c = (k >> 3) < c ? k >> 3 : c; - n += c; - p -= c; - k -= c << 3; - - s.bitb = b; - s.bitk = k; - z.avail_in = n; - z.total_in += p - z.next_in_index; - z.next_in_index = p; - s.write = q; - - return Z_OK; - } - - that.init = function (bl, bd, tl, tl_index, td, td_index) { - mode = START; - lbits = /* (byte) */bl; - dbits = /* (byte) */bd; - ltree = tl; - ltree_index = tl_index; - dtree = td; - dtree_index = td_index; - tree = null; - }; - - that.proc = function (s, z, r) { - let j; // temporary storage - let tindex; // temporary pointer - let e; // extra bits or operation - let b = 0; // bit buffer - let k = 0; // bits in bit buffer - let p = 0; // input data pointer - let n; // bytes available there - let q; // output win write pointer - let m; // bytes to end of win or read pointer - let f; // pointer to copy strings from - - // copy input/output information to locals (UPDATE macro restores) - p = z.next_in_index; - n = z.avail_in; - b = s.bitb; - k = s.bitk; - q = s.write; - m = q < s.read ? s.read - q - 1 : s.end - q; - - // process input and output based on current state - // eslint-disable-next-line no-constant-condition - while (true) { - switch (mode) { - // waiting for "i:"=input, "o:"=output, "x:"=nothing - case START: // x: set up for LEN - if (m >= 258 && n >= 10) { - - s.bitb = b; - s.bitk = k; - z.avail_in = n; - z.total_in += p - z.next_in_index; - z.next_in_index = p; - s.write = q; - r = inflate_fast(lbits, dbits, ltree, ltree_index, dtree, dtree_index, s, z); - - p = z.next_in_index; - n = z.avail_in; - b = s.bitb; - k = s.bitk; - q = s.write; - m = q < s.read ? s.read - q - 1 : s.end - q; - - if (r != Z_OK) { - mode = r == Z_STREAM_END ? WASH : BADCODE; - break; - } - } - need = lbits; - tree = ltree; - tree_index = ltree_index; - - mode = LEN; - /* falls through */ - case LEN: // i: get length/literal/eob next - j = need; - - while (k < (j)) { - if (n !== 0) - r = Z_OK; - else { - - s.bitb = b; - s.bitk = k; - z.avail_in = n; - z.total_in += p - z.next_in_index; - z.next_in_index = p; - s.write = q; - return s.inflate_flush(z, r); - } - n--; - b |= (z.read_byte(p++) & 0xff) << k; - k += 8; - } - - tindex = (tree_index + (b & inflate_mask[j])) * 3; - - b >>>= (tree[tindex + 1]); - k -= (tree[tindex + 1]); - - e = tree[tindex]; - - if (e === 0) { // literal - lit = tree[tindex + 2]; - mode = LIT; - break; - } - if ((e & 16) !== 0) { // length - get = e & 15; - len = tree[tindex + 2]; - mode = LENEXT; - break; - } - if ((e & 64) === 0) { // next table - need = e; - tree_index = tindex / 3 + tree[tindex + 2]; - break; - } - if ((e & 32) !== 0) { // end of block - mode = WASH; - break; - } - mode = BADCODE; // invalid code - z.msg = "invalid literal/length code"; - r = Z_DATA_ERROR; - - s.bitb = b; - s.bitk = k; - z.avail_in = n; - z.total_in += p - z.next_in_index; - z.next_in_index = p; - s.write = q; - return s.inflate_flush(z, r); - - case LENEXT: // i: getting length extra (have base) - j = get; - - while (k < (j)) { - if (n !== 0) - r = Z_OK; - else { - - s.bitb = b; - s.bitk = k; - z.avail_in = n; - z.total_in += p - z.next_in_index; - z.next_in_index = p; - s.write = q; - return s.inflate_flush(z, r); - } - n--; - b |= (z.read_byte(p++) & 0xff) << k; - k += 8; - } - - len += (b & inflate_mask[j]); - - b >>= j; - k -= j; - - need = dbits; - tree = dtree; - tree_index = dtree_index; - mode = DIST; - /* falls through */ - case DIST: // i: get distance next - j = need; - - while (k < (j)) { - if (n !== 0) - r = Z_OK; - else { - - s.bitb = b; - s.bitk = k; - z.avail_in = n; - z.total_in += p - z.next_in_index; - z.next_in_index = p; - s.write = q; - return s.inflate_flush(z, r); - } - n--; - b |= (z.read_byte(p++) & 0xff) << k; - k += 8; - } - - tindex = (tree_index + (b & inflate_mask[j])) * 3; - - b >>= tree[tindex + 1]; - k -= tree[tindex + 1]; - - e = (tree[tindex]); - if ((e & 16) !== 0) { // distance - get = e & 15; - dist = tree[tindex + 2]; - mode = DISTEXT; - break; - } - if ((e & 64) === 0) { // next table - need = e; - tree_index = tindex / 3 + tree[tindex + 2]; - break; - } - mode = BADCODE; // invalid code - z.msg = "invalid distance code"; - r = Z_DATA_ERROR; - - s.bitb = b; - s.bitk = k; - z.avail_in = n; - z.total_in += p - z.next_in_index; - z.next_in_index = p; - s.write = q; - return s.inflate_flush(z, r); - - case DISTEXT: // i: getting distance extra - j = get; - - while (k < (j)) { - if (n !== 0) - r = Z_OK; - else { - - s.bitb = b; - s.bitk = k; - z.avail_in = n; - z.total_in += p - z.next_in_index; - z.next_in_index = p; - s.write = q; - return s.inflate_flush(z, r); - } - n--; - b |= (z.read_byte(p++) & 0xff) << k; - k += 8; - } - - dist += (b & inflate_mask[j]); - - b >>= j; - k -= j; - - mode = COPY; - /* falls through */ - case COPY: // o: copying bytes in win, waiting for space - f = q - dist; - while (f < 0) { // modulo win size-"while" instead - f += s.end; // of "if" handles invalid distances - } - while (len !== 0) { - - if (m === 0) { - if (q == s.end && s.read !== 0) { - q = 0; - m = q < s.read ? s.read - q - 1 : s.end - q; - } - if (m === 0) { - s.write = q; - r = s.inflate_flush(z, r); - q = s.write; - m = q < s.read ? s.read - q - 1 : s.end - q; - - if (q == s.end && s.read !== 0) { - q = 0; - m = q < s.read ? s.read - q - 1 : s.end - q; - } - - if (m === 0) { - s.bitb = b; - s.bitk = k; - z.avail_in = n; - z.total_in += p - z.next_in_index; - z.next_in_index = p; - s.write = q; - return s.inflate_flush(z, r); - } - } - } - - s.win[q++] = s.win[f++]; - m--; - - if (f == s.end) - f = 0; - len--; - } - mode = START; - break; - case LIT: // o: got literal, waiting for output space - if (m === 0) { - if (q == s.end && s.read !== 0) { - q = 0; - m = q < s.read ? s.read - q - 1 : s.end - q; - } - if (m === 0) { - s.write = q; - r = s.inflate_flush(z, r); - q = s.write; - m = q < s.read ? s.read - q - 1 : s.end - q; - - if (q == s.end && s.read !== 0) { - q = 0; - m = q < s.read ? s.read - q - 1 : s.end - q; - } - if (m === 0) { - s.bitb = b; - s.bitk = k; - z.avail_in = n; - z.total_in += p - z.next_in_index; - z.next_in_index = p; - s.write = q; - return s.inflate_flush(z, r); - } - } - } - r = Z_OK; - - s.win[q++] = /* (byte) */lit; - m--; - - mode = START; - break; - case WASH: // o: got eob, possibly more output - if (k > 7) { // return unused byte, if any - k -= 8; - n++; - p--; // can always return one - } - - s.write = q; - r = s.inflate_flush(z, r); - q = s.write; - m = q < s.read ? s.read - q - 1 : s.end - q; - - if (s.read != s.write) { - s.bitb = b; - s.bitk = k; - z.avail_in = n; - z.total_in += p - z.next_in_index; - z.next_in_index = p; - s.write = q; - return s.inflate_flush(z, r); - } - mode = END; - /* falls through */ - case END: - r = Z_STREAM_END; - s.bitb = b; - s.bitk = k; - z.avail_in = n; - z.total_in += p - z.next_in_index; - z.next_in_index = p; - s.write = q; - return s.inflate_flush(z, r); - - case BADCODE: // x: got error - - r = Z_DATA_ERROR; - - s.bitb = b; - s.bitk = k; - z.avail_in = n; - z.total_in += p - z.next_in_index; - z.next_in_index = p; - s.write = q; - return s.inflate_flush(z, r); - - default: - r = Z_STREAM_ERROR; - - s.bitb = b; - s.bitk = k; - z.avail_in = n; - z.total_in += p - z.next_in_index; - z.next_in_index = p; - s.write = q; - return s.inflate_flush(z, r); - } - } - }; - - that.free = function () { - // ZFREE(z, c); - }; - -} - -// InfBlocks - -// Table for deflate from PKZIP's appnote.txt. -const border = [ // Order of the bit length code lengths - 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]; - -const TYPE = 0; // get type bits (3, including end bit) -const LENS = 1; // get lengths for stored -const STORED = 2;// processing stored block -const TABLE = 3; // get table lengths -const BTREE = 4; // get bit lengths tree for a dynamic -// block -const DTREE = 5; // get length, distance trees for a -// dynamic block -const CODES = 6; // processing fixed or dynamic block -const DRY = 7; // output remaining win bytes -const DONELOCKS = 8; // finished last block, done -const BADBLOCKS = 9; // ot a data error--stuck here - -function InfBlocks(z, w) { - const that = this; - - let mode = TYPE; // current inflate_block mode - - let left = 0; // if STORED, bytes left to copy - - let table = 0; // table lengths (14 bits) - let index = 0; // index into blens (or border) - let blens; // bit lengths of codes - const bb = [0]; // bit length tree depth - const tb = [0]; // bit length decoding tree - - const codes = new InfCodes(); // if CODES, current state - - let last = 0; // true if this block is the last block - - let hufts = new Int32Array(MANY * 3); // single malloc for tree space - const check = 0; // check on output - const inftree = new InfTree(); - - that.bitk = 0; // bits in bit buffer - that.bitb = 0; // bit buffer - that.win = new Uint8Array(w); // sliding win - that.end = w; // one byte after sliding win - that.read = 0; // win read pointer - that.write = 0; // win write pointer - - that.reset = function (z, c) { - if (c) - c[0] = check; - // if (mode == BTREE || mode == DTREE) { - // } - if (mode == CODES) { - codes.free(z); - } - mode = TYPE; - that.bitk = 0; - that.bitb = 0; - that.read = that.write = 0; - }; - - that.reset(z, null); - - // copy as much as possible from the sliding win to the output area - that.inflate_flush = function (z, r) { - let n; - let p; - let q; - - // local copies of source and destination pointers - p = z.next_out_index; - q = that.read; - - // compute number of bytes to copy as far as end of win - n = /* (int) */((q <= that.write ? that.write : that.end) - q); - if (n > z.avail_out) - n = z.avail_out; - if (n !== 0 && r == Z_BUF_ERROR) - r = Z_OK; - - // update counters - z.avail_out -= n; - z.total_out += n; - - // copy as far as end of win - z.next_out.set(that.win.subarray(q, q + n), p); - p += n; - q += n; - - // see if more to copy at beginning of win - if (q == that.end) { - // wrap pointers - q = 0; - if (that.write == that.end) - that.write = 0; - - // compute bytes to copy - n = that.write - q; - if (n > z.avail_out) - n = z.avail_out; - if (n !== 0 && r == Z_BUF_ERROR) - r = Z_OK; - - // update counters - z.avail_out -= n; - z.total_out += n; - - // copy - z.next_out.set(that.win.subarray(q, q + n), p); - p += n; - q += n; - } - - // update pointers - z.next_out_index = p; - that.read = q; - - // done - return r; - }; - - that.proc = function (z, r) { - let t; // temporary storage - let b; // bit buffer - let k; // bits in bit buffer - let p; // input data pointer - let n; // bytes available there - let q; // output win write pointer - let m; // bytes to end of win or read pointer - - let i; - - // copy input/output information to locals (UPDATE macro restores) - // { - p = z.next_in_index; - n = z.avail_in; - b = that.bitb; - k = that.bitk; - // } - // { - q = that.write; - m = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q); - // } - - // process input based on current state - // DEBUG dtree - // eslint-disable-next-line no-constant-condition - while (true) { - let bl, bd, tl, td, bl_, bd_, tl_, td_; - switch (mode) { - case TYPE: - - while (k < (3)) { - if (n !== 0) { - r = Z_OK; - } else { - that.bitb = b; - that.bitk = k; - z.avail_in = n; - z.total_in += p - z.next_in_index; - z.next_in_index = p; - that.write = q; - return that.inflate_flush(z, r); - } - n--; - b |= (z.read_byte(p++) & 0xff) << k; - k += 8; - } - t = /* (int) */(b & 7); - last = t & 1; - - switch (t >>> 1) { - case 0: // stored - // { - b >>>= (3); - k -= (3); - // } - t = k & 7; // go to byte boundary - - // { - b >>>= (t); - k -= (t); - // } - mode = LENS; // get length of stored block - break; - case 1: // fixed - // { - bl = []; // new Array(1); - bd = []; // new Array(1); - tl = [[]]; // new Array(1); - td = [[]]; // new Array(1); - - InfTree.inflate_trees_fixed(bl, bd, tl, td); - codes.init(bl[0], bd[0], tl[0], 0, td[0], 0); - // } - - // { - b >>>= (3); - k -= (3); - // } - - mode = CODES; - break; - case 2: // dynamic - - // { - b >>>= (3); - k -= (3); - // } - - mode = TABLE; - break; - case 3: // illegal - - // { - b >>>= (3); - k -= (3); - // } - mode = BADBLOCKS; - z.msg = "invalid block type"; - r = Z_DATA_ERROR; - - that.bitb = b; - that.bitk = k; - z.avail_in = n; - z.total_in += p - z.next_in_index; - z.next_in_index = p; - that.write = q; - return that.inflate_flush(z, r); - } - break; - case LENS: - - while (k < (32)) { - if (n !== 0) { - r = Z_OK; - } else { - that.bitb = b; - that.bitk = k; - z.avail_in = n; - z.total_in += p - z.next_in_index; - z.next_in_index = p; - that.write = q; - return that.inflate_flush(z, r); - } - n--; - b |= (z.read_byte(p++) & 0xff) << k; - k += 8; - } - - if ((((~b) >>> 16) & 0xffff) != (b & 0xffff)) { - mode = BADBLOCKS; - z.msg = "invalid stored block lengths"; - r = Z_DATA_ERROR; - - that.bitb = b; - that.bitk = k; - z.avail_in = n; - z.total_in += p - z.next_in_index; - z.next_in_index = p; - that.write = q; - return that.inflate_flush(z, r); - } - left = (b & 0xffff); - b = k = 0; // dump bits - mode = left !== 0 ? STORED : (last !== 0 ? DRY : TYPE); - break; - case STORED: - if (n === 0) { - that.bitb = b; - that.bitk = k; - z.avail_in = n; - z.total_in += p - z.next_in_index; - z.next_in_index = p; - that.write = q; - return that.inflate_flush(z, r); - } - - if (m === 0) { - if (q == that.end && that.read !== 0) { - q = 0; - m = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q); - } - if (m === 0) { - that.write = q; - r = that.inflate_flush(z, r); - q = that.write; - m = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q); - if (q == that.end && that.read !== 0) { - q = 0; - m = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q); - } - if (m === 0) { - that.bitb = b; - that.bitk = k; - z.avail_in = n; - z.total_in += p - z.next_in_index; - z.next_in_index = p; - that.write = q; - return that.inflate_flush(z, r); - } - } - } - r = Z_OK; - - t = left; - if (t > n) - t = n; - if (t > m) - t = m; - that.win.set(z.read_buf(p, t), q); - p += t; - n -= t; - q += t; - m -= t; - if ((left -= t) !== 0) - break; - mode = last !== 0 ? DRY : TYPE; - break; - case TABLE: - - while (k < (14)) { - if (n !== 0) { - r = Z_OK; - } else { - that.bitb = b; - that.bitk = k; - z.avail_in = n; - z.total_in += p - z.next_in_index; - z.next_in_index = p; - that.write = q; - return that.inflate_flush(z, r); - } - - n--; - b |= (z.read_byte(p++) & 0xff) << k; - k += 8; - } - - table = t = (b & 0x3fff); - if ((t & 0x1f) > 29 || ((t >> 5) & 0x1f) > 29) { - mode = BADBLOCKS; - z.msg = "too many length or distance symbols"; - r = Z_DATA_ERROR; - - that.bitb = b; - that.bitk = k; - z.avail_in = n; - z.total_in += p - z.next_in_index; - z.next_in_index = p; - that.write = q; - return that.inflate_flush(z, r); - } - t = 258 + (t & 0x1f) + ((t >> 5) & 0x1f); - if (!blens || blens.length < t) { - blens = []; // new Array(t); - } else { - for (i = 0; i < t; i++) { - blens[i] = 0; - } - } - - // { - b >>>= (14); - k -= (14); - // } - - index = 0; - mode = BTREE; - /* falls through */ - case BTREE: - while (index < 4 + (table >>> 10)) { - while (k < (3)) { - if (n !== 0) { - r = Z_OK; - } else { - that.bitb = b; - that.bitk = k; - z.avail_in = n; - z.total_in += p - z.next_in_index; - z.next_in_index = p; - that.write = q; - return that.inflate_flush(z, r); - } - n--; - b |= (z.read_byte(p++) & 0xff) << k; - k += 8; - } - - blens[border[index++]] = b & 7; - - // { - b >>>= (3); - k -= (3); - // } - } - - while (index < 19) { - blens[border[index++]] = 0; - } - - bb[0] = 7; - t = inftree.inflate_trees_bits(blens, bb, tb, hufts, z); - if (t != Z_OK) { - r = t; - if (r == Z_DATA_ERROR) { - blens = null; - mode = BADBLOCKS; - } - - that.bitb = b; - that.bitk = k; - z.avail_in = n; - z.total_in += p - z.next_in_index; - z.next_in_index = p; - that.write = q; - return that.inflate_flush(z, r); - } - - index = 0; - mode = DTREE; - /* falls through */ - case DTREE: - // eslint-disable-next-line no-constant-condition - while (true) { - t = table; - if (index >= 258 + (t & 0x1f) + ((t >> 5) & 0x1f)) { - break; - } - - let j, c; - - t = bb[0]; - - while (k < (t)) { - if (n !== 0) { - r = Z_OK; - } else { - that.bitb = b; - that.bitk = k; - z.avail_in = n; - z.total_in += p - z.next_in_index; - z.next_in_index = p; - that.write = q; - return that.inflate_flush(z, r); - } - n--; - b |= (z.read_byte(p++) & 0xff) << k; - k += 8; - } - - // if (tb[0] == -1) { - // System.err.println("null..."); - // } - - t = hufts[(tb[0] + (b & inflate_mask[t])) * 3 + 1]; - c = hufts[(tb[0] + (b & inflate_mask[t])) * 3 + 2]; - - if (c < 16) { - b >>>= (t); - k -= (t); - blens[index++] = c; - } else { // c == 16..18 - i = c == 18 ? 7 : c - 14; - j = c == 18 ? 11 : 3; - - while (k < (t + i)) { - if (n !== 0) { - r = Z_OK; - } else { - that.bitb = b; - that.bitk = k; - z.avail_in = n; - z.total_in += p - z.next_in_index; - z.next_in_index = p; - that.write = q; - return that.inflate_flush(z, r); - } - n--; - b |= (z.read_byte(p++) & 0xff) << k; - k += 8; - } - - b >>>= (t); - k -= (t); - - j += (b & inflate_mask[i]); - - b >>>= (i); - k -= (i); - - i = index; - t = table; - if (i + j > 258 + (t & 0x1f) + ((t >> 5) & 0x1f) || (c == 16 && i < 1)) { - blens = null; - mode = BADBLOCKS; - z.msg = "invalid bit length repeat"; - r = Z_DATA_ERROR; - - that.bitb = b; - that.bitk = k; - z.avail_in = n; - z.total_in += p - z.next_in_index; - z.next_in_index = p; - that.write = q; - return that.inflate_flush(z, r); - } - - c = c == 16 ? blens[i - 1] : 0; - do { - blens[i++] = c; - } while (--j !== 0); - index = i; - } - } - - tb[0] = -1; - // { - bl_ = []; // new Array(1); - bd_ = []; // new Array(1); - tl_ = []; // new Array(1); - td_ = []; // new Array(1); - bl_[0] = 9; // must be <= 9 for lookahead assumptions - bd_[0] = 6; // must be <= 9 for lookahead assumptions - - t = table; - t = inftree.inflate_trees_dynamic(257 + (t & 0x1f), 1 + ((t >> 5) & 0x1f), blens, bl_, bd_, tl_, td_, hufts, z); - - if (t != Z_OK) { - if (t == Z_DATA_ERROR) { - blens = null; - mode = BADBLOCKS; - } - r = t; - - that.bitb = b; - that.bitk = k; - z.avail_in = n; - z.total_in += p - z.next_in_index; - z.next_in_index = p; - that.write = q; - return that.inflate_flush(z, r); - } - codes.init(bl_[0], bd_[0], hufts, tl_[0], hufts, td_[0]); - // } - mode = CODES; - /* falls through */ - case CODES: - that.bitb = b; - that.bitk = k; - z.avail_in = n; - z.total_in += p - z.next_in_index; - z.next_in_index = p; - that.write = q; - - if ((r = codes.proc(that, z, r)) != Z_STREAM_END) { - return that.inflate_flush(z, r); - } - r = Z_OK; - codes.free(z); - - p = z.next_in_index; - n = z.avail_in; - b = that.bitb; - k = that.bitk; - q = that.write; - m = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q); - - if (last === 0) { - mode = TYPE; - break; - } - mode = DRY; - /* falls through */ - case DRY: - that.write = q; - r = that.inflate_flush(z, r); - q = that.write; - m = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q); - if (that.read != that.write) { - that.bitb = b; - that.bitk = k; - z.avail_in = n; - z.total_in += p - z.next_in_index; - z.next_in_index = p; - that.write = q; - return that.inflate_flush(z, r); - } - mode = DONELOCKS; - /* falls through */ - case DONELOCKS: - r = Z_STREAM_END; - - that.bitb = b; - that.bitk = k; - z.avail_in = n; - z.total_in += p - z.next_in_index; - z.next_in_index = p; - that.write = q; - return that.inflate_flush(z, r); - case BADBLOCKS: - r = Z_DATA_ERROR; - - that.bitb = b; - that.bitk = k; - z.avail_in = n; - z.total_in += p - z.next_in_index; - z.next_in_index = p; - that.write = q; - return that.inflate_flush(z, r); - - default: - r = Z_STREAM_ERROR; - - that.bitb = b; - that.bitk = k; - z.avail_in = n; - z.total_in += p - z.next_in_index; - z.next_in_index = p; - that.write = q; - return that.inflate_flush(z, r); - } - } - }; - - that.free = function (z) { - that.reset(z, null); - that.win = null; - hufts = null; - // ZFREE(z, s); - }; - - that.set_dictionary = function (d, start, n) { - that.win.set(d.subarray(start, start + n), 0); - that.read = that.write = n; - }; - - // Returns true if inflate is currently at the end of a block generated - // by Z_SYNC_FLUSH or Z_FULL_FLUSH. - that.sync_point = function () { - return mode == LENS ? 1 : 0; - }; - -} - -// Inflate - -// preset dictionary flag in zlib header -const PRESET_DICT = 0x20; - -const Z_DEFLATED = 8; - -const METHOD = 0; // waiting for method byte -const FLAG = 1; // waiting for flag byte -const DICT4 = 2; // four dictionary check bytes to go -const DICT3 = 3; // three dictionary check bytes to go -const DICT2 = 4; // two dictionary check bytes to go -const DICT1 = 5; // one dictionary check byte to go -const DICT0 = 6; // waiting for inflateSetDictionary -const BLOCKS = 7; // decompressing blocks -const DONE = 12; // finished check, done -const BAD = 13; // got an error--stay here - -const mark = [0, 0, 0xff, 0xff]; - -function Inflate() { - const that = this; - - that.mode = 0; // current inflate mode - - // mode dependent information - that.method = 0; // if FLAGS, method byte - - // if CHECK, check values to compare - that.was = [0]; // new Array(1); // computed check value - that.need = 0; // stream check value - - // if BAD, inflateSync's marker bytes count - that.marker = 0; - - // mode independent information - that.wbits = 0; // log2(win size) (8..15, defaults to 15) - - // this.blocks; // current inflate_blocks state - - function inflateReset(z) { - if (!z || !z.istate) - return Z_STREAM_ERROR; - - z.total_in = z.total_out = 0; - z.msg = null; - z.istate.mode = BLOCKS; - z.istate.blocks.reset(z, null); - return Z_OK; - } - - that.inflateEnd = function (z) { - if (that.blocks) - that.blocks.free(z); - that.blocks = null; - // ZFREE(z, z->state); - return Z_OK; - }; - - that.inflateInit = function (z, w) { - z.msg = null; - that.blocks = null; - - // set win size - if (w < 8 || w > 15) { - that.inflateEnd(z); - return Z_STREAM_ERROR; - } - that.wbits = w; - - z.istate.blocks = new InfBlocks(z, 1 << w); - - // reset state - inflateReset(z); - return Z_OK; - }; - - that.inflate = function (z, f) { - let r; - let b; - - if (!z || !z.istate || !z.next_in) - return Z_STREAM_ERROR; - const istate = z.istate; - f = f == Z_FINISH ? Z_BUF_ERROR : Z_OK; - r = Z_BUF_ERROR; - // eslint-disable-next-line no-constant-condition - while (true) { - switch (istate.mode) { - case METHOD: - - if (z.avail_in === 0) - return r; - r = f; - - z.avail_in--; - z.total_in++; - if (((istate.method = z.read_byte(z.next_in_index++)) & 0xf) != Z_DEFLATED) { - istate.mode = BAD; - z.msg = "unknown compression method"; - istate.marker = 5; // can't try inflateSync - break; - } - if ((istate.method >> 4) + 8 > istate.wbits) { - istate.mode = BAD; - z.msg = "invalid win size"; - istate.marker = 5; // can't try inflateSync - break; - } - istate.mode = FLAG; - /* falls through */ - case FLAG: - - if (z.avail_in === 0) - return r; - r = f; - - z.avail_in--; - z.total_in++; - b = (z.read_byte(z.next_in_index++)) & 0xff; - - if ((((istate.method << 8) + b) % 31) !== 0) { - istate.mode = BAD; - z.msg = "incorrect header check"; - istate.marker = 5; // can't try inflateSync - break; - } - - if ((b & PRESET_DICT) === 0) { - istate.mode = BLOCKS; - break; - } - istate.mode = DICT4; - /* falls through */ - case DICT4: - - if (z.avail_in === 0) - return r; - r = f; - - z.avail_in--; - z.total_in++; - istate.need = ((z.read_byte(z.next_in_index++) & 0xff) << 24) & 0xff000000; - istate.mode = DICT3; - /* falls through */ - case DICT3: - - if (z.avail_in === 0) - return r; - r = f; - - z.avail_in--; - z.total_in++; - istate.need += ((z.read_byte(z.next_in_index++) & 0xff) << 16) & 0xff0000; - istate.mode = DICT2; - /* falls through */ - case DICT2: - - if (z.avail_in === 0) - return r; - r = f; - - z.avail_in--; - z.total_in++; - istate.need += ((z.read_byte(z.next_in_index++) & 0xff) << 8) & 0xff00; - istate.mode = DICT1; - /* falls through */ - case DICT1: - - if (z.avail_in === 0) - return r; - r = f; - - z.avail_in--; - z.total_in++; - istate.need += (z.read_byte(z.next_in_index++) & 0xff); - istate.mode = DICT0; - return Z_NEED_DICT; - case DICT0: - istate.mode = BAD; - z.msg = "need dictionary"; - istate.marker = 0; // can try inflateSync - return Z_STREAM_ERROR; - case BLOCKS: - - r = istate.blocks.proc(z, r); - if (r == Z_DATA_ERROR) { - istate.mode = BAD; - istate.marker = 0; // can try inflateSync - break; - } - if (r == Z_OK) { - r = f; - } - if (r != Z_STREAM_END) { - return r; - } - r = f; - istate.blocks.reset(z, istate.was); - istate.mode = DONE; - /* falls through */ - case DONE: - z.avail_in = 0; - return Z_STREAM_END; - case BAD: - return Z_DATA_ERROR; - default: - return Z_STREAM_ERROR; - } - } - }; - - that.inflateSetDictionary = function (z, dictionary, dictLength) { - let index = 0, length = dictLength; - if (!z || !z.istate || z.istate.mode != DICT0) - return Z_STREAM_ERROR; - const istate = z.istate; - if (length >= (1 << istate.wbits)) { - length = (1 << istate.wbits) - 1; - index = dictLength - length; - } - istate.blocks.set_dictionary(dictionary, index, length); - istate.mode = BLOCKS; - return Z_OK; - }; - - that.inflateSync = function (z) { - let n; // number of bytes to look at - let p; // pointer to bytes - let m; // number of marker bytes found in a row - let r, w; // temporaries to save total_in and total_out - - // set up - if (!z || !z.istate) - return Z_STREAM_ERROR; - const istate = z.istate; - if (istate.mode != BAD) { - istate.mode = BAD; - istate.marker = 0; - } - if ((n = z.avail_in) === 0) - return Z_BUF_ERROR; - p = z.next_in_index; - m = istate.marker; - - // search - while (n !== 0 && m < 4) { - if (z.read_byte(p) == mark[m]) { - m++; - } else if (z.read_byte(p) !== 0) { - m = 0; - } else { - m = 4 - m; - } - p++; - n--; - } - - // restore - z.total_in += p - z.next_in_index; - z.next_in_index = p; - z.avail_in = n; - istate.marker = m; - - // return no joy or set up to restart on a new block - if (m != 4) { - return Z_DATA_ERROR; - } - r = z.total_in; - w = z.total_out; - inflateReset(z); - z.total_in = r; - z.total_out = w; - istate.mode = BLOCKS; - return Z_OK; - }; - - // Returns true if inflate is currently at the end of a block generated - // by Z_SYNC_FLUSH or Z_FULL_FLUSH. This function is used by one PPP - // implementation to provide an additional safety check. PPP uses - // Z_SYNC_FLUSH - // but removes the length bytes of the resulting empty stored block. When - // decompressing, PPP checks that at the end of input packet, inflate is - // waiting for these length bytes. - that.inflateSyncPoint = function (z) { - if (!z || !z.istate || !z.istate.blocks) - return Z_STREAM_ERROR; - return z.istate.blocks.sync_point(); - }; -} - -// ZStream - -function ZStream() { -} - -ZStream.prototype = { - inflateInit(bits) { - const that = this; - that.istate = new Inflate(); - if (!bits) - bits = MAX_BITS; - return that.istate.inflateInit(that, bits); - }, - - inflate(f) { - const that = this; - if (!that.istate) - return Z_STREAM_ERROR; - return that.istate.inflate(that, f); - }, - - inflateEnd() { - const that = this; - if (!that.istate) - return Z_STREAM_ERROR; - const ret = that.istate.inflateEnd(that); - that.istate = null; - return ret; - }, - - inflateSync() { - const that = this; - if (!that.istate) - return Z_STREAM_ERROR; - return that.istate.inflateSync(that); - }, - inflateSetDictionary(dictionary, dictLength) { - const that = this; - if (!that.istate) - return Z_STREAM_ERROR; - return that.istate.inflateSetDictionary(that, dictionary, dictLength); - }, - read_byte(start) { - const that = this; - return that.next_in[start]; - }, - read_buf(start, size) { - const that = this; - return that.next_in.subarray(start, start + size); - } -}; - -// Inflater - -function ZipInflate(options) { - const that = this; - const z = new ZStream(); - const bufsize = options && options.chunkSize ? Math.floor(options.chunkSize * 2) : 128 * 1024; - const flush = Z_NO_FLUSH; - const buf = new Uint8Array(bufsize); - let nomoreinput = false; - - z.inflateInit(); - z.next_out = buf; - - that.append = function (data, onprogress) { - const buffers = []; - let err, array, lastIndex = 0, bufferIndex = 0, bufferSize = 0; - if (data.length === 0) - return; - z.next_in_index = 0; - z.next_in = data; - z.avail_in = data.length; - do { - z.next_out_index = 0; - z.avail_out = bufsize; - if ((z.avail_in === 0) && (!nomoreinput)) { // if buffer is empty and more input is available, refill it - z.next_in_index = 0; - nomoreinput = true; - } - err = z.inflate(flush); - if (nomoreinput && (err === Z_BUF_ERROR)) { - if (z.avail_in !== 0) - throw new Error("inflating: bad input"); - } else if (err !== Z_OK && err !== Z_STREAM_END) - throw new Error("inflating: " + z.msg); - if ((nomoreinput || err === Z_STREAM_END) && (z.avail_in === data.length)) - throw new Error("inflating: bad input"); - if (z.next_out_index) - if (z.next_out_index === bufsize) - buffers.push(new Uint8Array(buf)); - else - buffers.push(buf.slice(0, z.next_out_index)); - bufferSize += z.next_out_index; - if (onprogress && z.next_in_index > 0 && z.next_in_index != lastIndex) { - onprogress(z.next_in_index); - lastIndex = z.next_in_index; - } - } while (z.avail_in > 0 || z.avail_out === 0); - if (buffers.length > 1) { - array = new Uint8Array(bufferSize); - buffers.forEach(function (chunk) { - array.set(chunk, bufferIndex); - bufferIndex += chunk.length; - }); - } else { - array = buffers[0] || new Uint8Array(); - } - return array; - }; - that.flush = function () { - z.inflateEnd(); - }; -} - -/* - Copyright (c) 2022 Gildas Lormeau. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the distribution. - - 3. The names of the authors may not be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT, - INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, - INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, - OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -const MAX_32_BITS = 0xffffffff; -const MAX_16_BITS = 0xffff; -const COMPRESSION_METHOD_DEFLATE = 0x08; -const COMPRESSION_METHOD_STORE = 0x00; -const COMPRESSION_METHOD_AES = 0x63; - -const LOCAL_FILE_HEADER_SIGNATURE = 0x04034b50; -const SPLIT_ZIP_FILE_SIGNATURE = 0x08074b50; -const CENTRAL_FILE_HEADER_SIGNATURE = 0x02014b50; -const END_OF_CENTRAL_DIR_SIGNATURE = 0x06054b50; -const ZIP64_END_OF_CENTRAL_DIR_SIGNATURE = 0x06064b50; -const ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE = 0x07064b50; -const END_OF_CENTRAL_DIR_LENGTH = 22; -const ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH = 20; -const ZIP64_END_OF_CENTRAL_DIR_LENGTH = 56; - -const EXTRAFIELD_TYPE_ZIP64 = 0x0001; -const EXTRAFIELD_TYPE_AES = 0x9901; -const EXTRAFIELD_TYPE_NTFS = 0x000a; -const EXTRAFIELD_TYPE_NTFS_TAG1 = 0x0001; -const EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP = 0x5455; -const EXTRAFIELD_TYPE_UNICODE_PATH = 0x7075; -const EXTRAFIELD_TYPE_UNICODE_COMMENT = 0x6375; - -const BITFLAG_ENCRYPTED = 0x01; -const BITFLAG_LEVEL = 0x06; -const BITFLAG_DATA_DESCRIPTOR = 0x0008; -const BITFLAG_LANG_ENCODING_FLAG = 0x0800; -const FILE_ATTR_MSDOS_DIR_MASK = 0x10; - -const DIRECTORY_SIGNATURE = "/"; - -const UNDEFINED_VALUE = undefined; -const UNDEFINED_TYPE$1 = "undefined"; -const FUNCTION_TYPE$1 = "function"; - -/* - Copyright (c) 2022 Gildas Lormeau. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the distribution. - - 3. The names of the authors may not be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT, - INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, - INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, - OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -class StreamAdapter { - - constructor(Codec) { - return class extends TransformStream { - constructor(_format, options) { - const codec = new Codec(options); - super({ - transform(chunk, controller) { - controller.enqueue(codec.append(chunk)); - }, - flush(controller) { - const chunk = codec.flush(); - if (chunk) { - controller.enqueue(chunk); - } - } - }); - } - }; - } -} - -/* - Copyright (c) 2022 Gildas Lormeau. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the distribution. - - 3. The names of the authors may not be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT, - INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, - INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, - OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -const MINIMUM_CHUNK_SIZE = 64; -let maxWorkers = 2; -try { - if (typeof navigator != UNDEFINED_TYPE$1 && navigator.hardwareConcurrency) { - maxWorkers = navigator.hardwareConcurrency; - } -} catch (_error) { - // ignored -} -const DEFAULT_CONFIGURATION = { - chunkSize: 512 * 1024, - maxWorkers, - terminateWorkerTimeout: 5000, - useWebWorkers: true, - useCompressionStream: true, - workerScripts: UNDEFINED_VALUE, - CompressionStreamNative: typeof CompressionStream != UNDEFINED_TYPE$1 && CompressionStream, - DecompressionStreamNative: typeof DecompressionStream != UNDEFINED_TYPE$1 && DecompressionStream -}; - -const config = Object.assign({}, DEFAULT_CONFIGURATION); - -function getConfiguration() { - return config; -} - -function getChunkSize(config) { - return Math.max(config.chunkSize, MINIMUM_CHUNK_SIZE); -} - -function configure(configuration) { - const { - baseURL, - chunkSize, - maxWorkers, - terminateWorkerTimeout, - useCompressionStream, - useWebWorkers, - Deflate, - Inflate, - CompressionStream, - DecompressionStream, - workerScripts - } = configuration; - setIfDefined("baseURL", baseURL); - setIfDefined("chunkSize", chunkSize); - setIfDefined("maxWorkers", maxWorkers); - setIfDefined("terminateWorkerTimeout", terminateWorkerTimeout); - setIfDefined("useCompressionStream", useCompressionStream); - setIfDefined("useWebWorkers", useWebWorkers); - if (Deflate) { - config.CompressionStream = new StreamAdapter(Deflate); - } - if (Inflate) { - config.DecompressionStream = new StreamAdapter(Inflate); - } - setIfDefined("CompressionStream", CompressionStream); - setIfDefined("DecompressionStream", DecompressionStream); - if (workerScripts !== UNDEFINED_VALUE) { - const { deflate, inflate } = workerScripts; - if (deflate || inflate) { - if (!config.workerScripts) { - config.workerScripts = {}; - } - } - if (deflate) { - if (!Array.isArray(deflate)) { - throw new Error("workerScripts.deflate must be an array"); - } - config.workerScripts.deflate = deflate; - } - if (inflate) { - if (!Array.isArray(inflate)) { - throw new Error("workerScripts.inflate must be an array"); - } - config.workerScripts.inflate = inflate; - } - } -} - -function setIfDefined(propertyName, propertyValue) { - if (propertyValue !== UNDEFINED_VALUE) { - config[propertyName] = propertyValue; - } -} - -/* - Copyright (c) 2022 Gildas Lormeau. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the distribution. - - 3. The names of the authors may not be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT, - INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, - INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, - OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -const table$1 = { - "application": { - "andrew-inset": "ez", - "annodex": "anx", - "atom+xml": "atom", - "atomcat+xml": "atomcat", - "atomserv+xml": "atomsrv", - "bbolin": "lin", - "cap": ["cap", "pcap"], - "cu-seeme": "cu", - "davmount+xml": "davmount", - "dsptype": "tsp", - "ecmascript": ["es", "ecma"], - "futuresplash": "spl", - "hta": "hta", - "java-archive": "jar", - "java-serialized-object": "ser", - "java-vm": "class", - "javascript": "js", - "m3g": "m3g", - "mac-binhex40": "hqx", - "mathematica": ["nb", "ma", "mb"], - "msaccess": "mdb", - "msword": ["doc", "dot"], - "mxf": "mxf", - "oda": "oda", - "ogg": "ogx", - "pdf": "pdf", - "pgp-keys": "key", - "pgp-signature": ["asc", "sig"], - "pics-rules": "prf", - "postscript": ["ps", "ai", "eps", "epsi", "epsf", "eps2", "eps3"], - "rar": "rar", - "rdf+xml": "rdf", - "rss+xml": "rss", - "rtf": "rtf", - "smil": ["smi", "smil"], - "xhtml+xml": ["xhtml", "xht"], - "xml": ["xml", "xsl", "xsd"], - "xspf+xml": "xspf", - "zip": "zip", - "vnd.android.package-archive": "apk", - "vnd.cinderella": "cdy", - "vnd.google-earth.kml+xml": "kml", - "vnd.google-earth.kmz": "kmz", - "vnd.mozilla.xul+xml": "xul", - "vnd.ms-excel": ["xls", "xlb", "xlt", "xlm", "xla", "xlc", "xlw"], - "vnd.ms-pki.seccat": "cat", - "vnd.ms-pki.stl": "stl", - "vnd.ms-powerpoint": ["ppt", "pps", "pot"], - "vnd.oasis.opendocument.chart": "odc", - "vnd.oasis.opendocument.database": "odb", - "vnd.oasis.opendocument.formula": "odf", - "vnd.oasis.opendocument.graphics": "odg", - "vnd.oasis.opendocument.graphics-template": "otg", - "vnd.oasis.opendocument.image": "odi", - "vnd.oasis.opendocument.presentation": "odp", - "vnd.oasis.opendocument.presentation-template": "otp", - "vnd.oasis.opendocument.spreadsheet": "ods", - "vnd.oasis.opendocument.spreadsheet-template": "ots", - "vnd.oasis.opendocument.text": "odt", - "vnd.oasis.opendocument.text-master": "odm", - "vnd.oasis.opendocument.text-template": "ott", - "vnd.oasis.opendocument.text-web": "oth", - "vnd.openxmlformats-officedocument.spreadsheetml.sheet": "xlsx", - "vnd.openxmlformats-officedocument.spreadsheetml.template": "xltx", - "vnd.openxmlformats-officedocument.presentationml.presentation": "pptx", - "vnd.openxmlformats-officedocument.presentationml.slideshow": "ppsx", - "vnd.openxmlformats-officedocument.presentationml.template": "potx", - "vnd.openxmlformats-officedocument.wordprocessingml.document": "docx", - "vnd.openxmlformats-officedocument.wordprocessingml.template": "dotx", - "vnd.smaf": "mmf", - "vnd.stardivision.calc": "sdc", - "vnd.stardivision.chart": "sds", - "vnd.stardivision.draw": "sda", - "vnd.stardivision.impress": "sdd", - "vnd.stardivision.math": ["sdf", "smf"], - "vnd.stardivision.writer": ["sdw", "vor"], - "vnd.stardivision.writer-global": "sgl", - "vnd.sun.xml.calc": "sxc", - "vnd.sun.xml.calc.template": "stc", - "vnd.sun.xml.draw": "sxd", - "vnd.sun.xml.draw.template": "std", - "vnd.sun.xml.impress": "sxi", - "vnd.sun.xml.impress.template": "sti", - "vnd.sun.xml.math": "sxm", - "vnd.sun.xml.writer": "sxw", - "vnd.sun.xml.writer.global": "sxg", - "vnd.sun.xml.writer.template": "stw", - "vnd.symbian.install": ["sis", "sisx"], - "vnd.visio": ["vsd", "vst", "vss", "vsw"], - "vnd.wap.wbxml": "wbxml", - "vnd.wap.wmlc": "wmlc", - "vnd.wap.wmlscriptc": "wmlsc", - "vnd.wordperfect": "wpd", - "vnd.wordperfect5.1": "wp5", - "x-123": "wk", - "x-7z-compressed": "7z", - "x-abiword": "abw", - "x-apple-diskimage": "dmg", - "x-bcpio": "bcpio", - "x-bittorrent": "torrent", - "x-cbr": ["cbr", "cba", "cbt", "cb7"], - "x-cbz": "cbz", - "x-cdf": ["cdf", "cda"], - "x-cdlink": "vcd", - "x-chess-pgn": "pgn", - "x-cpio": "cpio", - "x-csh": "csh", - "x-debian-package": ["deb", "udeb"], - "x-director": ["dcr", "dir", "dxr", "cst", "cct", "cxt", "w3d", "fgd", "swa"], - "x-dms": "dms", - "x-doom": "wad", - "x-dvi": "dvi", - "x-httpd-eruby": "rhtml", - "x-font": "pcf.Z", - "x-freemind": "mm", - "x-gnumeric": "gnumeric", - "x-go-sgf": "sgf", - "x-graphing-calculator": "gcf", - "x-gtar": ["gtar", "taz"], - "x-hdf": "hdf", - "x-httpd-php": ["phtml", "pht", "php"], - "x-httpd-php-source": "phps", - "x-httpd-php3": "php3", - "x-httpd-php3-preprocessed": "php3p", - "x-httpd-php4": "php4", - "x-httpd-php5": "php5", - "x-ica": "ica", - "x-info": "info", - "x-internet-signup": ["ins", "isp"], - "x-iphone": "iii", - "x-iso9660-image": "iso", - "x-java-jnlp-file": "jnlp", - "x-jmol": "jmz", - "x-killustrator": "kil", - "x-koan": ["skp", "skd", "skt", "skm"], - "x-kpresenter": ["kpr", "kpt"], - "x-kword": ["kwd", "kwt"], - "x-latex": "latex", - "x-lha": "lha", - "x-lyx": "lyx", - "x-lzh": "lzh", - "x-lzx": "lzx", - "x-maker": ["frm", "maker", "frame", "fm", "fb", "book", "fbdoc"], - "x-ms-wmd": "wmd", - "x-ms-wmz": "wmz", - "x-msdos-program": ["com", "exe", "bat", "dll"], - "x-msi": "msi", - "x-netcdf": ["nc", "cdf"], - "x-ns-proxy-autoconfig": ["pac", "dat"], - "x-nwc": "nwc", - "x-object": "o", - "x-oz-application": "oza", - "x-pkcs7-certreqresp": "p7r", - "x-python-code": ["pyc", "pyo"], - "x-qgis": ["qgs", "shp", "shx"], - "x-quicktimeplayer": "qtl", - "x-redhat-package-manager": "rpm", - "x-ruby": "rb", - "x-sh": "sh", - "x-shar": "shar", - "x-shockwave-flash": ["swf", "swfl"], - "x-silverlight": "scr", - "x-stuffit": "sit", - "x-sv4cpio": "sv4cpio", - "x-sv4crc": "sv4crc", - "x-tar": "tar", - "x-tcl": "tcl", - "x-tex-gf": "gf", - "x-tex-pk": "pk", - "x-texinfo": ["texinfo", "texi"], - "x-trash": ["~", "%", "bak", "old", "sik"], - "x-troff": ["t", "tr", "roff"], - "x-troff-man": "man", - "x-troff-me": "me", - "x-troff-ms": "ms", - "x-ustar": "ustar", - "x-wais-source": "src", - "x-wingz": "wz", - "x-x509-ca-cert": ["crt", "der", "cer"], - "x-xcf": "xcf", - "x-xfig": "fig", - "x-xpinstall": "xpi", - "applixware": "aw", - "atomsvc+xml": "atomsvc", - "ccxml+xml": "ccxml", - "cdmi-capability": "cdmia", - "cdmi-container": "cdmic", - "cdmi-domain": "cdmid", - "cdmi-object": "cdmio", - "cdmi-queue": "cdmiq", - "docbook+xml": "dbk", - "dssc+der": "dssc", - "dssc+xml": "xdssc", - "emma+xml": "emma", - "epub+zip": "epub", - "exi": "exi", - "font-tdpfr": "pfr", - "gml+xml": "gml", - "gpx+xml": "gpx", - "gxf": "gxf", - "hyperstudio": "stk", - "inkml+xml": ["ink", "inkml"], - "ipfix": "ipfix", - "json": "json", - "jsonml+json": "jsonml", - "lost+xml": "lostxml", - "mads+xml": "mads", - "marc": "mrc", - "marcxml+xml": "mrcx", - "mathml+xml": "mathml", - "mbox": "mbox", - "mediaservercontrol+xml": "mscml", - "metalink+xml": "metalink", - "metalink4+xml": "meta4", - "mets+xml": "mets", - "mods+xml": "mods", - "mp21": ["m21", "mp21"], - "mp4": "mp4s", - "oebps-package+xml": "opf", - "omdoc+xml": "omdoc", - "onenote": ["onetoc", "onetoc2", "onetmp", "onepkg"], - "oxps": "oxps", - "patch-ops-error+xml": "xer", - "pgp-encrypted": "pgp", - "pkcs10": "p10", - "pkcs7-mime": ["p7m", "p7c"], - "pkcs7-signature": "p7s", - "pkcs8": "p8", - "pkix-attr-cert": "ac", - "pkix-crl": "crl", - "pkix-pkipath": "pkipath", - "pkixcmp": "pki", - "pls+xml": "pls", - "prs.cww": "cww", - "pskc+xml": "pskcxml", - "reginfo+xml": "rif", - "relax-ng-compact-syntax": "rnc", - "resource-lists+xml": "rl", - "resource-lists-diff+xml": "rld", - "rls-services+xml": "rs", - "rpki-ghostbusters": "gbr", - "rpki-manifest": "mft", - "rpki-roa": "roa", - "rsd+xml": "rsd", - "sbml+xml": "sbml", - "scvp-cv-request": "scq", - "scvp-cv-response": "scs", - "scvp-vp-request": "spq", - "scvp-vp-response": "spp", - "sdp": "sdp", - "set-payment-initiation": "setpay", - "set-registration-initiation": "setreg", - "shf+xml": "shf", - "sparql-query": "rq", - "sparql-results+xml": "srx", - "srgs": "gram", - "srgs+xml": "grxml", - "sru+xml": "sru", - "ssdl+xml": "ssdl", - "ssml+xml": "ssml", - "tei+xml": ["tei", "teicorpus"], - "thraud+xml": "tfi", - "timestamped-data": "tsd", - "vnd.3gpp.pic-bw-large": "plb", - "vnd.3gpp.pic-bw-small": "psb", - "vnd.3gpp.pic-bw-var": "pvb", - "vnd.3gpp2.tcap": "tcap", - "vnd.3m.post-it-notes": "pwn", - "vnd.accpac.simply.aso": "aso", - "vnd.accpac.simply.imp": "imp", - "vnd.acucobol": "acu", - "vnd.acucorp": ["atc", "acutc"], - "vnd.adobe.air-application-installer-package+zip": "air", - "vnd.adobe.formscentral.fcdt": "fcdt", - "vnd.adobe.fxp": ["fxp", "fxpl"], - "vnd.adobe.xdp+xml": "xdp", - "vnd.adobe.xfdf": "xfdf", - "vnd.ahead.space": "ahead", - "vnd.airzip.filesecure.azf": "azf", - "vnd.airzip.filesecure.azs": "azs", - "vnd.amazon.ebook": "azw", - "vnd.americandynamics.acc": "acc", - "vnd.amiga.ami": "ami", - "vnd.anser-web-certificate-issue-initiation": "cii", - "vnd.anser-web-funds-transfer-initiation": "fti", - "vnd.antix.game-component": "atx", - "vnd.apple.installer+xml": "mpkg", - "vnd.apple.mpegurl": "m3u8", - "vnd.aristanetworks.swi": "swi", - "vnd.astraea-software.iota": "iota", - "vnd.audiograph": "aep", - "vnd.blueice.multipass": "mpm", - "vnd.bmi": "bmi", - "vnd.businessobjects": "rep", - "vnd.chemdraw+xml": "cdxml", - "vnd.chipnuts.karaoke-mmd": "mmd", - "vnd.claymore": "cla", - "vnd.cloanto.rp9": "rp9", - "vnd.clonk.c4group": ["c4g", "c4d", "c4f", "c4p", "c4u"], - "vnd.cluetrust.cartomobile-config": "c11amc", - "vnd.cluetrust.cartomobile-config-pkg": "c11amz", - "vnd.commonspace": "csp", - "vnd.contact.cmsg": "cdbcmsg", - "vnd.cosmocaller": "cmc", - "vnd.crick.clicker": "clkx", - "vnd.crick.clicker.keyboard": "clkk", - "vnd.crick.clicker.palette": "clkp", - "vnd.crick.clicker.template": "clkt", - "vnd.crick.clicker.wordbank": "clkw", - "vnd.criticaltools.wbs+xml": "wbs", - "vnd.ctc-posml": "pml", - "vnd.cups-ppd": "ppd", - "vnd.curl.car": "car", - "vnd.curl.pcurl": "pcurl", - "vnd.dart": "dart", - "vnd.data-vision.rdz": "rdz", - "vnd.dece.data": ["uvf", "uvvf", "uvd", "uvvd"], - "vnd.dece.ttml+xml": ["uvt", "uvvt"], - "vnd.dece.unspecified": ["uvx", "uvvx"], - "vnd.dece.zip": ["uvz", "uvvz"], - "vnd.denovo.fcselayout-link": "fe_launch", - "vnd.dna": "dna", - "vnd.dolby.mlp": "mlp", - "vnd.dpgraph": "dpg", - "vnd.dreamfactory": "dfac", - "vnd.ds-keypoint": "kpxx", - "vnd.dvb.ait": "ait", - "vnd.dvb.service": "svc", - "vnd.dynageo": "geo", - "vnd.ecowin.chart": "mag", - "vnd.enliven": "nml", - "vnd.epson.esf": "esf", - "vnd.epson.msf": "msf", - "vnd.epson.quickanime": "qam", - "vnd.epson.salt": "slt", - "vnd.epson.ssf": "ssf", - "vnd.eszigno3+xml": ["es3", "et3"], - "vnd.ezpix-album": "ez2", - "vnd.ezpix-package": "ez3", - "vnd.fdf": "fdf", - "vnd.fdsn.mseed": "mseed", - "vnd.fdsn.seed": ["seed", "dataless"], - "vnd.flographit": "gph", - "vnd.fluxtime.clip": "ftc", - "vnd.framemaker": ["fm", "frame", "maker", "book"], - "vnd.frogans.fnc": "fnc", - "vnd.frogans.ltf": "ltf", - "vnd.fsc.weblaunch": "fsc", - "vnd.fujitsu.oasys": "oas", - "vnd.fujitsu.oasys2": "oa2", - "vnd.fujitsu.oasys3": "oa3", - "vnd.fujitsu.oasysgp": "fg5", - "vnd.fujitsu.oasysprs": "bh2", - "vnd.fujixerox.ddd": "ddd", - "vnd.fujixerox.docuworks": "xdw", - "vnd.fujixerox.docuworks.binder": "xbd", - "vnd.fuzzysheet": "fzs", - "vnd.genomatix.tuxedo": "txd", - "vnd.geogebra.file": "ggb", - "vnd.geogebra.tool": "ggt", - "vnd.geometry-explorer": ["gex", "gre"], - "vnd.geonext": "gxt", - "vnd.geoplan": "g2w", - "vnd.geospace": "g3w", - "vnd.gmx": "gmx", - "vnd.grafeq": ["gqf", "gqs"], - "vnd.groove-account": "gac", - "vnd.groove-help": "ghf", - "vnd.groove-identity-message": "gim", - "vnd.groove-injector": "grv", - "vnd.groove-tool-message": "gtm", - "vnd.groove-tool-template": "tpl", - "vnd.groove-vcard": "vcg", - "vnd.hal+xml": "hal", - "vnd.handheld-entertainment+xml": "zmm", - "vnd.hbci": "hbci", - "vnd.hhe.lesson-player": "les", - "vnd.hp-hpgl": "hpgl", - "vnd.hp-hpid": "hpid", - "vnd.hp-hps": "hps", - "vnd.hp-jlyt": "jlt", - "vnd.hp-pcl": "pcl", - "vnd.hp-pclxl": "pclxl", - "vnd.hydrostatix.sof-data": "sfd-hdstx", - "vnd.ibm.minipay": "mpy", - "vnd.ibm.modcap": ["afp", "listafp", "list3820"], - "vnd.ibm.rights-management": "irm", - "vnd.ibm.secure-container": "sc", - "vnd.iccprofile": ["icc", "icm"], - "vnd.igloader": "igl", - "vnd.immervision-ivp": "ivp", - "vnd.immervision-ivu": "ivu", - "vnd.insors.igm": "igm", - "vnd.intercon.formnet": ["xpw", "xpx"], - "vnd.intergeo": "i2g", - "vnd.intu.qbo": "qbo", - "vnd.intu.qfx": "qfx", - "vnd.ipunplugged.rcprofile": "rcprofile", - "vnd.irepository.package+xml": "irp", - "vnd.is-xpr": "xpr", - "vnd.isac.fcs": "fcs", - "vnd.jam": "jam", - "vnd.jcp.javame.midlet-rms": "rms", - "vnd.jisp": "jisp", - "vnd.joost.joda-archive": "joda", - "vnd.kahootz": ["ktz", "ktr"], - "vnd.kde.karbon": "karbon", - "vnd.kde.kchart": "chrt", - "vnd.kde.kformula": "kfo", - "vnd.kde.kivio": "flw", - "vnd.kde.kontour": "kon", - "vnd.kde.kpresenter": ["kpr", "kpt"], - "vnd.kde.kspread": "ksp", - "vnd.kde.kword": ["kwd", "kwt"], - "vnd.kenameaapp": "htke", - "vnd.kidspiration": "kia", - "vnd.kinar": ["kne", "knp"], - "vnd.koan": ["skp", "skd", "skt", "skm"], - "vnd.kodak-descriptor": "sse", - "vnd.las.las+xml": "lasxml", - "vnd.llamagraphics.life-balance.desktop": "lbd", - "vnd.llamagraphics.life-balance.exchange+xml": "lbe", - "vnd.lotus-1-2-3": "123", - "vnd.lotus-approach": "apr", - "vnd.lotus-freelance": "pre", - "vnd.lotus-notes": "nsf", - "vnd.lotus-organizer": "org", - "vnd.lotus-screencam": "scm", - "vnd.lotus-wordpro": "lwp", - "vnd.macports.portpkg": "portpkg", - "vnd.mcd": "mcd", - "vnd.medcalcdata": "mc1", - "vnd.mediastation.cdkey": "cdkey", - "vnd.mfer": "mwf", - "vnd.mfmp": "mfm", - "vnd.micrografx.flo": "flo", - "vnd.micrografx.igx": "igx", - "vnd.mif": "mif", - "vnd.mobius.daf": "daf", - "vnd.mobius.dis": "dis", - "vnd.mobius.mbk": "mbk", - "vnd.mobius.mqy": "mqy", - "vnd.mobius.msl": "msl", - "vnd.mobius.plc": "plc", - "vnd.mobius.txf": "txf", - "vnd.mophun.application": "mpn", - "vnd.mophun.certificate": "mpc", - "vnd.ms-artgalry": "cil", - "vnd.ms-cab-compressed": "cab", - "vnd.ms-excel.addin.macroenabled.12": "xlam", - "vnd.ms-excel.sheet.binary.macroenabled.12": "xlsb", - "vnd.ms-excel.sheet.macroenabled.12": "xlsm", - "vnd.ms-excel.template.macroenabled.12": "xltm", - "vnd.ms-fontobject": "eot", - "vnd.ms-htmlhelp": "chm", - "vnd.ms-ims": "ims", - "vnd.ms-lrm": "lrm", - "vnd.ms-officetheme": "thmx", - "vnd.ms-powerpoint.addin.macroenabled.12": "ppam", - "vnd.ms-powerpoint.presentation.macroenabled.12": "pptm", - "vnd.ms-powerpoint.slide.macroenabled.12": "sldm", - "vnd.ms-powerpoint.slideshow.macroenabled.12": "ppsm", - "vnd.ms-powerpoint.template.macroenabled.12": "potm", - "vnd.ms-project": ["mpp", "mpt"], - "vnd.ms-word.document.macroenabled.12": "docm", - "vnd.ms-word.template.macroenabled.12": "dotm", - "vnd.ms-works": ["wps", "wks", "wcm", "wdb"], - "vnd.ms-wpl": "wpl", - "vnd.ms-xpsdocument": "xps", - "vnd.mseq": "mseq", - "vnd.musician": "mus", - "vnd.muvee.style": "msty", - "vnd.mynfc": "taglet", - "vnd.neurolanguage.nlu": "nlu", - "vnd.nitf": ["ntf", "nitf"], - "vnd.noblenet-directory": "nnd", - "vnd.noblenet-sealer": "nns", - "vnd.noblenet-web": "nnw", - "vnd.nokia.n-gage.data": "ngdat", - "vnd.nokia.n-gage.symbian.install": "n-gage", - "vnd.nokia.radio-preset": "rpst", - "vnd.nokia.radio-presets": "rpss", - "vnd.novadigm.edm": "edm", - "vnd.novadigm.edx": "edx", - "vnd.novadigm.ext": "ext", - "vnd.oasis.opendocument.chart-template": "otc", - "vnd.oasis.opendocument.formula-template": "odft", - "vnd.oasis.opendocument.image-template": "oti", - "vnd.olpc-sugar": "xo", - "vnd.oma.dd2+xml": "dd2", - "vnd.openofficeorg.extension": "oxt", - "vnd.openxmlformats-officedocument.presentationml.slide": "sldx", - "vnd.osgeo.mapguide.package": "mgp", - "vnd.osgi.dp": "dp", - "vnd.osgi.subsystem": "esa", - "vnd.palm": ["pdb", "pqa", "oprc"], - "vnd.pawaafile": "paw", - "vnd.pg.format": "str", - "vnd.pg.osasli": "ei6", - "vnd.picsel": "efif", - "vnd.pmi.widget": "wg", - "vnd.pocketlearn": "plf", - "vnd.powerbuilder6": "pbd", - "vnd.previewsystems.box": "box", - "vnd.proteus.magazine": "mgz", - "vnd.publishare-delta-tree": "qps", - "vnd.pvi.ptid1": "ptid", - "vnd.quark.quarkxpress": ["qxd", "qxt", "qwd", "qwt", "qxl", "qxb"], - "vnd.realvnc.bed": "bed", - "vnd.recordare.musicxml": "mxl", - "vnd.recordare.musicxml+xml": "musicxml", - "vnd.rig.cryptonote": "cryptonote", - "vnd.rn-realmedia": "rm", - "vnd.rn-realmedia-vbr": "rmvb", - "vnd.route66.link66+xml": "link66", - "vnd.sailingtracker.track": "st", - "vnd.seemail": "see", - "vnd.sema": "sema", - "vnd.semd": "semd", - "vnd.semf": "semf", - "vnd.shana.informed.formdata": "ifm", - "vnd.shana.informed.formtemplate": "itp", - "vnd.shana.informed.interchange": "iif", - "vnd.shana.informed.package": "ipk", - "vnd.simtech-mindmapper": ["twd", "twds"], - "vnd.smart.teacher": "teacher", - "vnd.solent.sdkm+xml": ["sdkm", "sdkd"], - "vnd.spotfire.dxp": "dxp", - "vnd.spotfire.sfs": "sfs", - "vnd.stepmania.package": "smzip", - "vnd.stepmania.stepchart": "sm", - "vnd.sus-calendar": ["sus", "susp"], - "vnd.svd": "svd", - "vnd.syncml+xml": "xsm", - "vnd.syncml.dm+wbxml": "bdm", - "vnd.syncml.dm+xml": "xdm", - "vnd.tao.intent-module-archive": "tao", - "vnd.tcpdump.pcap": ["pcap", "cap", "dmp"], - "vnd.tmobile-livetv": "tmo", - "vnd.trid.tpt": "tpt", - "vnd.triscape.mxs": "mxs", - "vnd.trueapp": "tra", - "vnd.ufdl": ["ufd", "ufdl"], - "vnd.uiq.theme": "utz", - "vnd.umajin": "umj", - "vnd.unity": "unityweb", - "vnd.uoml+xml": "uoml", - "vnd.vcx": "vcx", - "vnd.visionary": "vis", - "vnd.vsf": "vsf", - "vnd.webturbo": "wtb", - "vnd.wolfram.player": "nbp", - "vnd.wqd": "wqd", - "vnd.wt.stf": "stf", - "vnd.xara": "xar", - "vnd.xfdl": "xfdl", - "vnd.yamaha.hv-dic": "hvd", - "vnd.yamaha.hv-script": "hvs", - "vnd.yamaha.hv-voice": "hvp", - "vnd.yamaha.openscoreformat": "osf", - "vnd.yamaha.openscoreformat.osfpvg+xml": "osfpvg", - "vnd.yamaha.smaf-audio": "saf", - "vnd.yamaha.smaf-phrase": "spf", - "vnd.yellowriver-custom-menu": "cmp", - "vnd.zul": ["zir", "zirz"], - "vnd.zzazz.deck+xml": "zaz", - "voicexml+xml": "vxml", - "widget": "wgt", - "winhlp": "hlp", - "wsdl+xml": "wsdl", - "wspolicy+xml": "wspolicy", - "x-ace-compressed": "ace", - "x-authorware-bin": ["aab", "x32", "u32", "vox"], - "x-authorware-map": "aam", - "x-authorware-seg": "aas", - "x-blorb": ["blb", "blorb"], - "x-bzip": "bz", - "x-bzip2": ["bz2", "boz"], - "x-cfs-compressed": "cfs", - "x-chat": "chat", - "x-conference": "nsc", - "x-dgc-compressed": "dgc", - "x-dtbncx+xml": "ncx", - "x-dtbook+xml": "dtb", - "x-dtbresource+xml": "res", - "x-eva": "eva", - "x-font-bdf": "bdf", - "x-font-ghostscript": "gsf", - "x-font-linux-psf": "psf", - "x-font-otf": "otf", - "x-font-pcf": "pcf", - "x-font-snf": "snf", - "x-font-ttf": ["ttf", "ttc"], - "x-font-type1": ["pfa", "pfb", "pfm", "afm"], - "x-font-woff": "woff", - "x-freearc": "arc", - "x-gca-compressed": "gca", - "x-glulx": "ulx", - "x-gramps-xml": "gramps", - "x-install-instructions": "install", - "x-lzh-compressed": ["lzh", "lha"], - "x-mie": "mie", - "x-mobipocket-ebook": ["prc", "mobi"], - "x-ms-application": "application", - "x-ms-shortcut": "lnk", - "x-ms-xbap": "xbap", - "x-msbinder": "obd", - "x-mscardfile": "crd", - "x-msclip": "clp", - "x-msdownload": ["exe", "dll", "com", "bat", "msi"], - "x-msmediaview": ["mvb", "m13", "m14"], - "x-msmetafile": ["wmf", "wmz", "emf", "emz"], - "x-msmoney": "mny", - "x-mspublisher": "pub", - "x-msschedule": "scd", - "x-msterminal": "trm", - "x-mswrite": "wri", - "x-nzb": "nzb", - "x-pkcs12": ["p12", "pfx"], - "x-pkcs7-certificates": ["p7b", "spc"], - "x-research-info-systems": "ris", - "x-silverlight-app": "xap", - "x-sql": "sql", - "x-stuffitx": "sitx", - "x-subrip": "srt", - "x-t3vm-image": "t3", - "x-tads": "gam", - "x-tex": "tex", - "x-tex-tfm": "tfm", - "x-tgif": "obj", - "x-xliff+xml": "xlf", - "x-xz": "xz", - "x-zmachine": ["z1", "z2", "z3", "z4", "z5", "z6", "z7", "z8"], - "xaml+xml": "xaml", - "xcap-diff+xml": "xdf", - "xenc+xml": "xenc", - "xml-dtd": "dtd", - "xop+xml": "xop", - "xproc+xml": "xpl", - "xslt+xml": "xslt", - "xv+xml": ["mxml", "xhvml", "xvml", "xvm"], - "yang": "yang", - "yin+xml": "yin", - "envoy": "evy", - "fractals": "fif", - "internet-property-stream": "acx", - "olescript": "axs", - "vnd.ms-outlook": "msg", - "vnd.ms-pkicertstore": "sst", - "x-compress": "z", - "x-compressed": "tgz", - "x-gzip": "gz", - "x-perfmon": ["pma", "pmc", "pml", "pmr", "pmw"], - "x-pkcs7-mime": ["p7c", "p7m"], - "ynd.ms-pkipko": "pko" - }, - "audio": { - "amr": "amr", - "amr-wb": "awb", - "annodex": "axa", - "basic": ["au", "snd"], - "flac": "flac", - "midi": ["mid", "midi", "kar", "rmi"], - "mpeg": ["mpga", "mpega", "mp2", "mp3", "m4a", "mp2a", "m2a", "m3a"], - "mpegurl": "m3u", - "ogg": ["oga", "ogg", "spx"], - "prs.sid": "sid", - "x-aiff": ["aif", "aiff", "aifc"], - "x-gsm": "gsm", - "x-ms-wma": "wma", - "x-ms-wax": "wax", - "x-pn-realaudio": "ram", - "x-realaudio": "ra", - "x-sd2": "sd2", - "x-wav": "wav", - "adpcm": "adp", - "mp4": "mp4a", - "s3m": "s3m", - "silk": "sil", - "vnd.dece.audio": ["uva", "uvva"], - "vnd.digital-winds": "eol", - "vnd.dra": "dra", - "vnd.dts": "dts", - "vnd.dts.hd": "dtshd", - "vnd.lucent.voice": "lvp", - "vnd.ms-playready.media.pya": "pya", - "vnd.nuera.ecelp4800": "ecelp4800", - "vnd.nuera.ecelp7470": "ecelp7470", - "vnd.nuera.ecelp9600": "ecelp9600", - "vnd.rip": "rip", - "webm": "weba", - "x-aac": "aac", - "x-caf": "caf", - "x-matroska": "mka", - "x-pn-realaudio-plugin": "rmp", - "xm": "xm", - "mid": ["mid", "rmi"] - }, - "chemical": { - "x-alchemy": "alc", - "x-cache": ["cac", "cache"], - "x-cache-csf": "csf", - "x-cactvs-binary": ["cbin", "cascii", "ctab"], - "x-cdx": "cdx", - "x-chem3d": "c3d", - "x-cif": "cif", - "x-cmdf": "cmdf", - "x-cml": "cml", - "x-compass": "cpa", - "x-crossfire": "bsd", - "x-csml": ["csml", "csm"], - "x-ctx": "ctx", - "x-cxf": ["cxf", "cef"], - "x-embl-dl-nucleotide": ["emb", "embl"], - "x-gamess-input": ["inp", "gam", "gamin"], - "x-gaussian-checkpoint": ["fch", "fchk"], - "x-gaussian-cube": "cub", - "x-gaussian-input": ["gau", "gjc", "gjf"], - "x-gaussian-log": "gal", - "x-gcg8-sequence": "gcg", - "x-genbank": "gen", - "x-hin": "hin", - "x-isostar": ["istr", "ist"], - "x-jcamp-dx": ["jdx", "dx"], - "x-kinemage": "kin", - "x-macmolecule": "mcm", - "x-macromodel-input": ["mmd", "mmod"], - "x-mdl-molfile": "mol", - "x-mdl-rdfile": "rd", - "x-mdl-rxnfile": "rxn", - "x-mdl-sdfile": ["sd", "sdf"], - "x-mdl-tgf": "tgf", - "x-mmcif": "mcif", - "x-mol2": "mol2", - "x-molconn-Z": "b", - "x-mopac-graph": "gpt", - "x-mopac-input": ["mop", "mopcrt", "mpc", "zmt"], - "x-mopac-out": "moo", - "x-ncbi-asn1": "asn", - "x-ncbi-asn1-ascii": ["prt", "ent"], - "x-ncbi-asn1-binary": ["val", "aso"], - "x-pdb": ["pdb", "ent"], - "x-rosdal": "ros", - "x-swissprot": "sw", - "x-vamas-iso14976": "vms", - "x-vmd": "vmd", - "x-xtel": "xtel", - "x-xyz": "xyz" - }, - "image": { - "gif": "gif", - "ief": "ief", - "jpeg": ["jpeg", "jpg", "jpe"], - "pcx": "pcx", - "png": "png", - "svg+xml": ["svg", "svgz"], - "tiff": ["tiff", "tif"], - "vnd.djvu": ["djvu", "djv"], - "vnd.wap.wbmp": "wbmp", - "x-canon-cr2": "cr2", - "x-canon-crw": "crw", - "x-cmu-raster": "ras", - "x-coreldraw": "cdr", - "x-coreldrawpattern": "pat", - "x-coreldrawtemplate": "cdt", - "x-corelphotopaint": "cpt", - "x-epson-erf": "erf", - "x-icon": "ico", - "x-jg": "art", - "x-jng": "jng", - "x-nikon-nef": "nef", - "x-olympus-orf": "orf", - "x-photoshop": "psd", - "x-portable-anymap": "pnm", - "x-portable-bitmap": "pbm", - "x-portable-graymap": "pgm", - "x-portable-pixmap": "ppm", - "x-rgb": "rgb", - "x-xbitmap": "xbm", - "x-xpixmap": "xpm", - "x-xwindowdump": "xwd", - "bmp": "bmp", - "cgm": "cgm", - "g3fax": "g3", - "ktx": "ktx", - "prs.btif": "btif", - "sgi": "sgi", - "vnd.dece.graphic": ["uvi", "uvvi", "uvg", "uvvg"], - "vnd.dwg": "dwg", - "vnd.dxf": "dxf", - "vnd.fastbidsheet": "fbs", - "vnd.fpx": "fpx", - "vnd.fst": "fst", - "vnd.fujixerox.edmics-mmr": "mmr", - "vnd.fujixerox.edmics-rlc": "rlc", - "vnd.ms-modi": "mdi", - "vnd.ms-photo": "wdp", - "vnd.net-fpx": "npx", - "vnd.xiff": "xif", - "webp": "webp", - "x-3ds": "3ds", - "x-cmx": "cmx", - "x-freehand": ["fh", "fhc", "fh4", "fh5", "fh7"], - "x-pict": ["pic", "pct"], - "x-tga": "tga", - "cis-cod": "cod", - "pipeg": "jfif" - }, - "message": { - "rfc822": ["eml", "mime", "mht", "mhtml", "nws"] - }, - "model": { - "iges": ["igs", "iges"], - "mesh": ["msh", "mesh", "silo"], - "vrml": ["wrl", "vrml"], - "x3d+vrml": ["x3dv", "x3dvz"], - "x3d+xml": ["x3d", "x3dz"], - "x3d+binary": ["x3db", "x3dbz"], - "vnd.collada+xml": "dae", - "vnd.dwf": "dwf", - "vnd.gdl": "gdl", - "vnd.gtw": "gtw", - "vnd.mts": "mts", - "vnd.vtu": "vtu" - }, - "text": { - "cache-manifest": ["manifest", "appcache"], - "calendar": ["ics", "icz", "ifb"], - "css": "css", - "csv": "csv", - "h323": "323", - "html": ["html", "htm", "shtml", "stm"], - "iuls": "uls", - "mathml": "mml", - "plain": ["txt", "text", "brf", "conf", "def", "list", "log", "in", "bas"], - "richtext": "rtx", - "scriptlet": ["sct", "wsc"], - "texmacs": ["tm", "ts"], - "tab-separated-values": "tsv", - "vnd.sun.j2me.app-descriptor": "jad", - "vnd.wap.wml": "wml", - "vnd.wap.wmlscript": "wmls", - "x-bibtex": "bib", - "x-boo": "boo", - "x-c++hdr": ["h++", "hpp", "hxx", "hh"], - "x-c++src": ["c++", "cpp", "cxx", "cc"], - "x-component": "htc", - "x-dsrc": "d", - "x-diff": ["diff", "patch"], - "x-haskell": "hs", - "x-java": "java", - "x-literate-haskell": "lhs", - "x-moc": "moc", - "x-pascal": ["p", "pas"], - "x-pcs-gcd": "gcd", - "x-perl": ["pl", "pm"], - "x-python": "py", - "x-scala": "scala", - "x-setext": "etx", - "x-tcl": ["tcl", "tk"], - "x-tex": ["tex", "ltx", "sty", "cls"], - "x-vcalendar": "vcs", - "x-vcard": "vcf", - "n3": "n3", - "prs.lines.tag": "dsc", - "sgml": ["sgml", "sgm"], - "troff": ["t", "tr", "roff", "man", "me", "ms"], - "turtle": "ttl", - "uri-list": ["uri", "uris", "urls"], - "vcard": "vcard", - "vnd.curl": "curl", - "vnd.curl.dcurl": "dcurl", - "vnd.curl.scurl": "scurl", - "vnd.curl.mcurl": "mcurl", - "vnd.dvb.subtitle": "sub", - "vnd.fly": "fly", - "vnd.fmi.flexstor": "flx", - "vnd.graphviz": "gv", - "vnd.in3d.3dml": "3dml", - "vnd.in3d.spot": "spot", - "x-asm": ["s", "asm"], - "x-c": ["c", "cc", "cxx", "cpp", "h", "hh", "dic"], - "x-fortran": ["f", "for", "f77", "f90"], - "x-opml": "opml", - "x-nfo": "nfo", - "x-sfv": "sfv", - "x-uuencode": "uu", - "webviewhtml": "htt" - }, - "video": { - "avif": ".avif", - "3gpp": "3gp", - "annodex": "axv", - "dl": "dl", - "dv": ["dif", "dv"], - "fli": "fli", - "gl": "gl", - "mpeg": ["mpeg", "mpg", "mpe", "m1v", "m2v", "mp2", "mpa", "mpv2"], - "mp4": ["mp4", "mp4v", "mpg4"], - "quicktime": ["qt", "mov"], - "ogg": "ogv", - "vnd.mpegurl": ["mxu", "m4u"], - "x-flv": "flv", - "x-la-asf": ["lsf", "lsx"], - "x-mng": "mng", - "x-ms-asf": ["asf", "asx", "asr"], - "x-ms-wm": "wm", - "x-ms-wmv": "wmv", - "x-ms-wmx": "wmx", - "x-ms-wvx": "wvx", - "x-msvideo": "avi", - "x-sgi-movie": "movie", - "x-matroska": ["mpv", "mkv", "mk3d", "mks"], - "3gpp2": "3g2", - "h261": "h261", - "h263": "h263", - "h264": "h264", - "jpeg": "jpgv", - "jpm": ["jpm", "jpgm"], - "mj2": ["mj2", "mjp2"], - "vnd.dece.hd": ["uvh", "uvvh"], - "vnd.dece.mobile": ["uvm", "uvvm"], - "vnd.dece.pd": ["uvp", "uvvp"], - "vnd.dece.sd": ["uvs", "uvvs"], - "vnd.dece.video": ["uvv", "uvvv"], - "vnd.dvb.file": "dvb", - "vnd.fvt": "fvt", - "vnd.ms-playready.media.pyv": "pyv", - "vnd.uvvu.mp4": ["uvu", "uvvu"], - "vnd.vivo": "viv", - "webm": "webm", - "x-f4v": "f4v", - "x-m4v": "m4v", - "x-ms-vob": "vob", - "x-smv": "smv" - }, - "x-conference": { - "x-cooltalk": "ice" - }, - "x-world": { - "x-vrml": ["vrm", "vrml", "wrl", "flr", "wrz", "xaf", "xof"] - } -}; - -(() => { - const mimeTypes = {}; - for (const type in table$1) { - // eslint-disable-next-line no-prototype-builtins - if (table$1.hasOwnProperty(type)) { - for (const subtype in table$1[type]) { - // eslint-disable-next-line no-prototype-builtins - if (table$1[type].hasOwnProperty(subtype)) { - const value = table$1[type][subtype]; - if (typeof value == "string") { - mimeTypes[value] = type + "/" + subtype; - } else { - for (let indexMimeType = 0; indexMimeType < value.length; indexMimeType++) { - mimeTypes[value[indexMimeType]] = type + "/" + subtype; - } - } - } - } - } - } - return mimeTypes; -})(); - -/* - Copyright (c) 2022 Gildas Lormeau. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the distribution. - - 3. The names of the authors may not be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT, - INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, - INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, - OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -const table = []; -for (let i = 0; i < 256; i++) { - let t = i; - for (let j = 0; j < 8; j++) { - if (t & 1) { - t = (t >>> 1) ^ 0xEDB88320; - } else { - t = t >>> 1; - } - } - table[i] = t; -} - -class Crc32 { - - constructor(crc) { - this.crc = crc || -1; - } - - append(data) { - let crc = this.crc | 0; - for (let offset = 0, length = data.length | 0; offset < length; offset++) { - crc = (crc >>> 8) ^ table[(crc ^ data[offset]) & 0xFF]; - } - this.crc = crc; - } - - get() { - return ~this.crc; - } -} - -/* - Copyright (c) 2022 Gildas Lormeau. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the distribution. - - 3. The names of the authors may not be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT, - INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, - INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, - OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -class Crc32Stream extends TransformStream { - - constructor() { - const crc32 = new Crc32(); - super({ - transform(chunk) { - crc32.append(chunk); - }, - flush(controller) { - const value = new Uint8Array(4); - const dataView = new DataView(value.buffer); - dataView.setUint32(0, crc32.get()); - controller.enqueue(value); - } - }); - } -} - -/* - Copyright (c) 2022 Gildas Lormeau. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the distribution. - - 3. The names of the authors may not be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT, - INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, - INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, - OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -function encodeText(value) { - if (typeof TextEncoder == "undefined") { - value = unescape(encodeURIComponent(value)); - const result = new Uint8Array(value.length); - for (let i = 0; i < result.length; i++) { - result[i] = value.charCodeAt(i); - } - return result; - } else { - return new TextEncoder().encode(value); - } -} - -// Derived from https://github.com/xqdoo00o/jszip/blob/master/lib/sjcl.js and https://github.com/bitwiseshiftleft/sjcl - -// deno-lint-ignore-file no-this-alias - -/* - * SJCL is open. You can use, modify and redistribute it under a BSD - * license or under the GNU GPL, version 2.0. - */ - -/** @fileOverview Javascript cryptography implementation. - * - * Crush to remove comments, shorten variable names and - * generally reduce transmission size. - * - * @author Emily Stark - * @author Mike Hamburg - * @author Dan Boneh - */ - -/*jslint indent: 2, bitwise: false, nomen: false, plusplus: false, white: false, regexp: false */ - -/** @fileOverview Arrays of bits, encoded as arrays of Numbers. - * - * @author Emily Stark - * @author Mike Hamburg - * @author Dan Boneh - */ - -/** - * Arrays of bits, encoded as arrays of Numbers. - * @namespace - * @description - *

- * These objects are the currency accepted by SJCL's crypto functions. - *

- * - *

- * Most of our crypto primitives operate on arrays of 4-byte words internally, - * but many of them can take arguments that are not a multiple of 4 bytes. - * This library encodes arrays of bits (whose size need not be a multiple of 8 - * bits) as arrays of 32-bit words. The bits are packed, big-endian, into an - * array of words, 32 bits at a time. Since the words are double-precision - * floating point numbers, they fit some extra data. We use this (in a private, - * possibly-changing manner) to encode the number of bits actually present - * in the last word of the array. - *

- * - *

- * Because bitwise ops clear this out-of-band data, these arrays can be passed - * to ciphers like AES which want arrays of words. - *

- */ -const bitArray = { - /** - * Concatenate two bit arrays. - * @param {bitArray} a1 The first array. - * @param {bitArray} a2 The second array. - * @return {bitArray} The concatenation of a1 and a2. - */ - concat(a1, a2) { - if (a1.length === 0 || a2.length === 0) { - return a1.concat(a2); - } - - const last = a1[a1.length - 1], shift = bitArray.getPartial(last); - if (shift === 32) { - return a1.concat(a2); - } else { - return bitArray._shiftRight(a2, shift, last | 0, a1.slice(0, a1.length - 1)); - } - }, - - /** - * Find the length of an array of bits. - * @param {bitArray} a The array. - * @return {Number} The length of a, in bits. - */ - bitLength(a) { - const l = a.length; - if (l === 0) { - return 0; - } - const x = a[l - 1]; - return (l - 1) * 32 + bitArray.getPartial(x); - }, - - /** - * Truncate an array. - * @param {bitArray} a The array. - * @param {Number} len The length to truncate to, in bits. - * @return {bitArray} A new array, truncated to len bits. - */ - clamp(a, len) { - if (a.length * 32 < len) { - return a; - } - a = a.slice(0, Math.ceil(len / 32)); - const l = a.length; - len = len & 31; - if (l > 0 && len) { - a[l - 1] = bitArray.partial(len, a[l - 1] & 0x80000000 >> (len - 1), 1); - } - return a; - }, - - /** - * Make a partial word for a bit array. - * @param {Number} len The number of bits in the word. - * @param {Number} x The bits. - * @param {Number} [_end=0] Pass 1 if x has already been shifted to the high side. - * @return {Number} The partial word. - */ - partial(len, x, _end) { - if (len === 32) { - return x; - } - return (_end ? x | 0 : x << (32 - len)) + len * 0x10000000000; - }, - - /** - * Get the number of bits used by a partial word. - * @param {Number} x The partial word. - * @return {Number} The number of bits used by the partial word. - */ - getPartial(x) { - return Math.round(x / 0x10000000000) || 32; - }, - - /** Shift an array right. - * @param {bitArray} a The array to shift. - * @param {Number} shift The number of bits to shift. - * @param {Number} [carry=0] A byte to carry in - * @param {bitArray} [out=[]] An array to prepend to the output. - * @private - */ - _shiftRight(a, shift, carry, out) { - if (out === undefined) { - out = []; - } - - for (; shift >= 32; shift -= 32) { - out.push(carry); - carry = 0; - } - if (shift === 0) { - return out.concat(a); - } - - for (let i = 0; i < a.length; i++) { - out.push(carry | a[i] >>> shift); - carry = a[i] << (32 - shift); - } - const last2 = a.length ? a[a.length - 1] : 0; - const shift2 = bitArray.getPartial(last2); - out.push(bitArray.partial(shift + shift2 & 31, (shift + shift2 > 32) ? carry : out.pop(), 1)); - return out; - } -}; - -/** @fileOverview Bit array codec implementations. - * - * @author Emily Stark - * @author Mike Hamburg - * @author Dan Boneh - */ - -/** - * Arrays of bytes - * @namespace - */ -const codec = { - bytes: { - /** Convert from a bitArray to an array of bytes. */ - fromBits(arr) { - const bl = bitArray.bitLength(arr); - const byteLength = bl / 8; - const out = new Uint8Array(byteLength); - let tmp; - for (let i = 0; i < byteLength; i++) { - if ((i & 3) === 0) { - tmp = arr[i / 4]; - } - out[i] = tmp >>> 24; - tmp <<= 8; - } - return out; - }, - /** Convert from an array of bytes to a bitArray. */ - toBits(bytes) { - const out = []; - let i; - let tmp = 0; - for (i = 0; i < bytes.length; i++) { - tmp = tmp << 8 | bytes[i]; - if ((i & 3) === 3) { - out.push(tmp); - tmp = 0; - } - } - if (i & 3) { - out.push(bitArray.partial(8 * (i & 3), tmp)); - } - return out; - } - } -}; - -const hash = {}; - -/** - * Context for a SHA-1 operation in progress. - * @constructor - */ -hash.sha1 = class { - constructor(hash) { - const sha1 = this; - /** - * The hash's block size, in bits. - * @constant - */ - sha1.blockSize = 512; - /** - * The SHA-1 initialization vector. - * @private - */ - sha1._init = [0x67452301, 0xEFCDAB89, 0x98BADCFE, 0x10325476, 0xC3D2E1F0]; - /** - * The SHA-1 hash key. - * @private - */ - sha1._key = [0x5A827999, 0x6ED9EBA1, 0x8F1BBCDC, 0xCA62C1D6]; - if (hash) { - sha1._h = hash._h.slice(0); - sha1._buffer = hash._buffer.slice(0); - sha1._length = hash._length; - } else { - sha1.reset(); - } - } - - /** - * Reset the hash state. - * @return this - */ - reset() { - const sha1 = this; - sha1._h = sha1._init.slice(0); - sha1._buffer = []; - sha1._length = 0; - return sha1; - } - - /** - * Input several words to the hash. - * @param {bitArray|String} data the data to hash. - * @return this - */ - update(data) { - const sha1 = this; - if (typeof data === "string") { - data = codec.utf8String.toBits(data); - } - const b = sha1._buffer = bitArray.concat(sha1._buffer, data); - const ol = sha1._length; - const nl = sha1._length = ol + bitArray.bitLength(data); - if (nl > 9007199254740991) { - throw new Error("Cannot hash more than 2^53 - 1 bits"); - } - const c = new Uint32Array(b); - let j = 0; - for (let i = sha1.blockSize + ol - ((sha1.blockSize + ol) & (sha1.blockSize - 1)); i <= nl; - i += sha1.blockSize) { - sha1._block(c.subarray(16 * j, 16 * (j + 1))); - j += 1; - } - b.splice(0, 16 * j); - return sha1; - } - - /** - * Complete hashing and output the hash value. - * @return {bitArray} The hash value, an array of 5 big-endian words. TODO - */ - finalize() { - const sha1 = this; - let b = sha1._buffer; - const h = sha1._h; - - // Round out and push the buffer - b = bitArray.concat(b, [bitArray.partial(1, 1)]); - // Round out the buffer to a multiple of 16 words, less the 2 length words. - for (let i = b.length + 2; i & 15; i++) { - b.push(0); - } - - // append the length - b.push(Math.floor(sha1._length / 0x100000000)); - b.push(sha1._length | 0); - - while (b.length) { - sha1._block(b.splice(0, 16)); - } - - sha1.reset(); - return h; - } - - /** - * The SHA-1 logical functions f(0), f(1), ..., f(79). - * @private - */ - _f(t, b, c, d) { - if (t <= 19) { - return (b & c) | (~b & d); - } else if (t <= 39) { - return b ^ c ^ d; - } else if (t <= 59) { - return (b & c) | (b & d) | (c & d); - } else if (t <= 79) { - return b ^ c ^ d; - } - } - - /** - * Circular left-shift operator. - * @private - */ - _S(n, x) { - return (x << n) | (x >>> 32 - n); - } - - /** - * Perform one cycle of SHA-1. - * @param {Uint32Array|bitArray} words one block of words. - * @private - */ - _block(words) { - const sha1 = this; - const h = sha1._h; - // When words is passed to _block, it has 16 elements. SHA1 _block - // function extends words with new elements (at the end there are 80 elements). - // The problem is that if we use Uint32Array instead of Array, - // the length of Uint32Array cannot be changed. Thus, we replace words with a - // normal Array here. - const w = Array(80); // do not use Uint32Array here as the instantiation is slower - for (let j = 0; j < 16; j++) { - w[j] = words[j]; - } - - let a = h[0]; - let b = h[1]; - let c = h[2]; - let d = h[3]; - let e = h[4]; - - for (let t = 0; t <= 79; t++) { - if (t >= 16) { - w[t] = sha1._S(1, w[t - 3] ^ w[t - 8] ^ w[t - 14] ^ w[t - 16]); - } - const tmp = (sha1._S(5, a) + sha1._f(t, b, c, d) + e + w[t] + - sha1._key[Math.floor(t / 20)]) | 0; - e = d; - d = c; - c = sha1._S(30, b); - b = a; - a = tmp; - } - - h[0] = (h[0] + a) | 0; - h[1] = (h[1] + b) | 0; - h[2] = (h[2] + c) | 0; - h[3] = (h[3] + d) | 0; - h[4] = (h[4] + e) | 0; - } -}; - -/** @fileOverview Low-level AES implementation. - * - * This file contains a low-level implementation of AES, optimized for - * size and for efficiency on several browsers. It is based on - * OpenSSL's aes_core.c, a public-domain implementation by Vincent - * Rijmen, Antoon Bosselaers and Paulo Barreto. - * - * An older version of this implementation is available in the public - * domain, but this one is (c) Emily Stark, Mike Hamburg, Dan Boneh, - * Stanford University 2008-2010 and BSD-licensed for liability - * reasons. - * - * @author Emily Stark - * @author Mike Hamburg - * @author Dan Boneh - */ - -const cipher = {}; - -/** - * Schedule out an AES key for both encryption and decryption. This - * is a low-level class. Use a cipher mode to do bulk encryption. - * - * @constructor - * @param {Array} key The key as an array of 4, 6 or 8 words. - */ -cipher.aes = class { - constructor(key) { - /** - * The expanded S-box and inverse S-box tables. These will be computed - * on the client so that we don't have to send them down the wire. - * - * There are two tables, _tables[0] is for encryption and - * _tables[1] is for decryption. - * - * The first 4 sub-tables are the expanded S-box with MixColumns. The - * last (_tables[01][4]) is the S-box itself. - * - * @private - */ - const aes = this; - aes._tables = [[[], [], [], [], []], [[], [], [], [], []]]; - - if (!aes._tables[0][0][0]) { - aes._precompute(); - } - - const sbox = aes._tables[0][4]; - const decTable = aes._tables[1]; - const keyLen = key.length; - - let i, encKey, decKey, rcon = 1; - - if (keyLen !== 4 && keyLen !== 6 && keyLen !== 8) { - throw new Error("invalid aes key size"); - } - - aes._key = [encKey = key.slice(0), decKey = []]; - - // schedule encryption keys - for (i = keyLen; i < 4 * keyLen + 28; i++) { - let tmp = encKey[i - 1]; - - // apply sbox - if (i % keyLen === 0 || (keyLen === 8 && i % keyLen === 4)) { - tmp = sbox[tmp >>> 24] << 24 ^ sbox[tmp >> 16 & 255] << 16 ^ sbox[tmp >> 8 & 255] << 8 ^ sbox[tmp & 255]; - - // shift rows and add rcon - if (i % keyLen === 0) { - tmp = tmp << 8 ^ tmp >>> 24 ^ rcon << 24; - rcon = rcon << 1 ^ (rcon >> 7) * 283; - } - } - - encKey[i] = encKey[i - keyLen] ^ tmp; - } - - // schedule decryption keys - for (let j = 0; i; j++, i--) { - const tmp = encKey[j & 3 ? i : i - 4]; - if (i <= 4 || j < 4) { - decKey[j] = tmp; - } else { - decKey[j] = decTable[0][sbox[tmp >>> 24]] ^ - decTable[1][sbox[tmp >> 16 & 255]] ^ - decTable[2][sbox[tmp >> 8 & 255]] ^ - decTable[3][sbox[tmp & 255]]; - } - } - } - // public - /* Something like this might appear here eventually - name: "AES", - blockSize: 4, - keySizes: [4,6,8], - */ - - /** - * Encrypt an array of 4 big-endian words. - * @param {Array} data The plaintext. - * @return {Array} The ciphertext. - */ - encrypt(data) { - return this._crypt(data, 0); - } - - /** - * Decrypt an array of 4 big-endian words. - * @param {Array} data The ciphertext. - * @return {Array} The plaintext. - */ - decrypt(data) { - return this._crypt(data, 1); - } - - /** - * Expand the S-box tables. - * - * @private - */ - _precompute() { - const encTable = this._tables[0]; - const decTable = this._tables[1]; - const sbox = encTable[4]; - const sboxInv = decTable[4]; - const d = []; - const th = []; - let xInv, x2, x4, x8; - - // Compute double and third tables - for (let i = 0; i < 256; i++) { - th[(d[i] = i << 1 ^ (i >> 7) * 283) ^ i] = i; - } - - for (let x = xInv = 0; !sbox[x]; x ^= x2 || 1, xInv = th[xInv] || 1) { - // Compute sbox - let s = xInv ^ xInv << 1 ^ xInv << 2 ^ xInv << 3 ^ xInv << 4; - s = s >> 8 ^ s & 255 ^ 99; - sbox[x] = s; - sboxInv[s] = x; - - // Compute MixColumns - x8 = d[x4 = d[x2 = d[x]]]; - let tDec = x8 * 0x1010101 ^ x4 * 0x10001 ^ x2 * 0x101 ^ x * 0x1010100; - let tEnc = d[s] * 0x101 ^ s * 0x1010100; - - for (let i = 0; i < 4; i++) { - encTable[i][x] = tEnc = tEnc << 24 ^ tEnc >>> 8; - decTable[i][s] = tDec = tDec << 24 ^ tDec >>> 8; - } - } - - // Compactify. Considerable speedup on Firefox. - for (let i = 0; i < 5; i++) { - encTable[i] = encTable[i].slice(0); - decTable[i] = decTable[i].slice(0); - } - } - - /** - * Encryption and decryption core. - * @param {Array} input Four words to be encrypted or decrypted. - * @param dir The direction, 0 for encrypt and 1 for decrypt. - * @return {Array} The four encrypted or decrypted words. - * @private - */ - _crypt(input, dir) { - if (input.length !== 4) { - throw new Error("invalid aes block size"); - } - - const key = this._key[dir]; - - const nInnerRounds = key.length / 4 - 2; - const out = [0, 0, 0, 0]; - const table = this._tables[dir]; - - // load up the tables - const t0 = table[0]; - const t1 = table[1]; - const t2 = table[2]; - const t3 = table[3]; - const sbox = table[4]; - - // state variables a,b,c,d are loaded with pre-whitened data - let a = input[0] ^ key[0]; - let b = input[dir ? 3 : 1] ^ key[1]; - let c = input[2] ^ key[2]; - let d = input[dir ? 1 : 3] ^ key[3]; - let kIndex = 4; - let a2, b2, c2; - - // Inner rounds. Cribbed from OpenSSL. - for (let i = 0; i < nInnerRounds; i++) { - a2 = t0[a >>> 24] ^ t1[b >> 16 & 255] ^ t2[c >> 8 & 255] ^ t3[d & 255] ^ key[kIndex]; - b2 = t0[b >>> 24] ^ t1[c >> 16 & 255] ^ t2[d >> 8 & 255] ^ t3[a & 255] ^ key[kIndex + 1]; - c2 = t0[c >>> 24] ^ t1[d >> 16 & 255] ^ t2[a >> 8 & 255] ^ t3[b & 255] ^ key[kIndex + 2]; - d = t0[d >>> 24] ^ t1[a >> 16 & 255] ^ t2[b >> 8 & 255] ^ t3[c & 255] ^ key[kIndex + 3]; - kIndex += 4; - a = a2; b = b2; c = c2; - } - - // Last round. - for (let i = 0; i < 4; i++) { - out[dir ? 3 & -i : i] = - sbox[a >>> 24] << 24 ^ - sbox[b >> 16 & 255] << 16 ^ - sbox[c >> 8 & 255] << 8 ^ - sbox[d & 255] ^ - key[kIndex++]; - a2 = a; a = b; b = c; c = d; d = a2; - } - - return out; - } -}; - -/** - * Random values - * @namespace - */ -const random = { - /** - * Generate random words with pure js, cryptographically not as strong & safe as native implementation. - * @param {TypedArray} typedArray The array to fill. - * @return {TypedArray} The random values. - */ - getRandomValues(typedArray) { - const words = new Uint32Array(typedArray.buffer); - const r = (m_w) => { - let m_z = 0x3ade68b1; - const mask = 0xffffffff; - return function () { - m_z = (0x9069 * (m_z & 0xFFFF) + (m_z >> 0x10)) & mask; - m_w = (0x4650 * (m_w & 0xFFFF) + (m_w >> 0x10)) & mask; - const result = ((((m_z << 0x10) + m_w) & mask) / 0x100000000) + .5; - return result * (Math.random() > .5 ? 1 : -1); - }; - }; - for (let i = 0, rcache; i < typedArray.length; i += 4) { - const _r = r((rcache || Math.random()) * 0x100000000); - rcache = _r() * 0x3ade67b7; - words[i / 4] = (_r() * 0x100000000) | 0; - } - return typedArray; - } -}; - -/** @fileOverview CTR mode implementation. - * - * Special thanks to Roy Nicholson for pointing out a bug in our - * implementation. - * - * @author Emily Stark - * @author Mike Hamburg - * @author Dan Boneh - */ - -/** Brian Gladman's CTR Mode. -* @constructor -* @param {Object} _prf The aes instance to generate key. -* @param {bitArray} _iv The iv for ctr mode, it must be 128 bits. -*/ - -const mode = {}; - -/** - * Brian Gladman's CTR Mode. - * @namespace - */ -mode.ctrGladman = class { - constructor(prf, iv) { - this._prf = prf; - this._initIv = iv; - this._iv = iv; - } - - reset() { - this._iv = this._initIv; - } - - /** Input some data to calculate. - * @param {bitArray} data the data to process, it must be intergral multiple of 128 bits unless it's the last. - */ - update(data) { - return this.calculate(this._prf, data, this._iv); - } - - incWord(word) { - if (((word >> 24) & 0xff) === 0xff) { //overflow - let b1 = (word >> 16) & 0xff; - let b2 = (word >> 8) & 0xff; - let b3 = word & 0xff; - - if (b1 === 0xff) { // overflow b1 - b1 = 0; - if (b2 === 0xff) { - b2 = 0; - if (b3 === 0xff) { - b3 = 0; - } else { - ++b3; - } - } else { - ++b2; - } - } else { - ++b1; - } - - word = 0; - word += (b1 << 16); - word += (b2 << 8); - word += b3; - } else { - word += (0x01 << 24); - } - return word; - } - - incCounter(counter) { - if ((counter[0] = this.incWord(counter[0])) === 0) { - // encr_data in fileenc.c from Dr Brian Gladman's counts only with DWORD j < 8 - counter[1] = this.incWord(counter[1]); - } - } - - calculate(prf, data, iv) { - let l; - if (!(l = data.length)) { - return []; - } - const bl = bitArray.bitLength(data); - for (let i = 0; i < l; i += 4) { - this.incCounter(iv); - const e = prf.encrypt(iv); - data[i] ^= e[0]; - data[i + 1] ^= e[1]; - data[i + 2] ^= e[2]; - data[i + 3] ^= e[3]; - } - return bitArray.clamp(data, bl); - } -}; - -const misc = { - importKey(password) { - return new misc.hmacSha1(codec.bytes.toBits(password)); - }, - pbkdf2(prf, salt, count, length) { - count = count || 10000; - if (length < 0 || count < 0) { - throw new Error("invalid params to pbkdf2"); - } - const byteLength = ((length >> 5) + 1) << 2; - let u, ui, i, j, k; - const arrayBuffer = new ArrayBuffer(byteLength); - const out = new DataView(arrayBuffer); - let outLength = 0; - const b = bitArray; - salt = codec.bytes.toBits(salt); - for (k = 1; outLength < (byteLength || 1); k++) { - u = ui = prf.encrypt(b.concat(salt, [k])); - for (i = 1; i < count; i++) { - ui = prf.encrypt(ui); - for (j = 0; j < ui.length; j++) { - u[j] ^= ui[j]; - } - } - for (i = 0; outLength < (byteLength || 1) && i < u.length; i++) { - out.setInt32(outLength, u[i]); - outLength += 4; - } - } - return arrayBuffer.slice(0, length / 8); - } -}; - -/** @fileOverview HMAC implementation. - * - * @author Emily Stark - * @author Mike Hamburg - * @author Dan Boneh - */ - -/** HMAC with the specified hash function. - * @constructor - * @param {bitArray} key the key for HMAC. - * @param {Object} [Hash=hash.sha1] The hash function to use. - */ -misc.hmacSha1 = class { - - constructor(key) { - const hmac = this; - const Hash = hmac._hash = hash.sha1; - const exKey = [[], []]; - hmac._baseHash = [new Hash(), new Hash()]; - const bs = hmac._baseHash[0].blockSize / 32; - - if (key.length > bs) { - key = new Hash().update(key).finalize(); - } - - for (let i = 0; i < bs; i++) { - exKey[0][i] = key[i] ^ 0x36363636; - exKey[1][i] = key[i] ^ 0x5C5C5C5C; - } - - hmac._baseHash[0].update(exKey[0]); - hmac._baseHash[1].update(exKey[1]); - hmac._resultHash = new Hash(hmac._baseHash[0]); - } - reset() { - const hmac = this; - hmac._resultHash = new hmac._hash(hmac._baseHash[0]); - hmac._updated = false; - } - - update(data) { - const hmac = this; - hmac._updated = true; - hmac._resultHash.update(data); - } - - digest() { - const hmac = this; - const w = hmac._resultHash.finalize(); - const result = new (hmac._hash)(hmac._baseHash[1]).update(w).finalize(); - - hmac.reset(); - - return result; - } - - encrypt(data) { - if (!this._updated) { - this.update(data); - return this.digest(data); - } else { - throw new Error("encrypt on already updated hmac called!"); - } - } -}; - -/* - Copyright (c) 2022 Gildas Lormeau. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the distribution. - - 3. The names of the authors may not be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT, - INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, - INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, - OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -const GET_RANDOM_VALUES_SUPPORTED = typeof crypto != "undefined" && typeof crypto.getRandomValues == "function"; - -const ERR_INVALID_PASSWORD = "Invalid password"; -const ERR_INVALID_SIGNATURE = "Invalid signature"; -const ERR_ABORT_CHECK_PASSWORD = "zipjs-abort-check-password"; - -function getRandomValues(array) { - if (GET_RANDOM_VALUES_SUPPORTED) { - return crypto.getRandomValues(array); - } else { - return random.getRandomValues(array); - } -} - -/* - Copyright (c) 2022 Gildas Lormeau. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the distribution. - - 3. The names of the authors may not be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT, - INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, - INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, - OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -const BLOCK_LENGTH = 16; -const RAW_FORMAT = "raw"; -const PBKDF2_ALGORITHM = { name: "PBKDF2" }; -const HASH_ALGORITHM = { name: "HMAC" }; -const HASH_FUNCTION = "SHA-1"; -const BASE_KEY_ALGORITHM = Object.assign({ hash: HASH_ALGORITHM }, PBKDF2_ALGORITHM); -const DERIVED_BITS_ALGORITHM = Object.assign({ iterations: 1000, hash: { name: HASH_FUNCTION } }, PBKDF2_ALGORITHM); -const DERIVED_BITS_USAGE = ["deriveBits"]; -const SALT_LENGTH = [8, 12, 16]; -const KEY_LENGTH = [16, 24, 32]; -const SIGNATURE_LENGTH = 10; -const COUNTER_DEFAULT_VALUE = [0, 0, 0, 0]; -const UNDEFINED_TYPE = "undefined"; -const FUNCTION_TYPE = "function"; -// deno-lint-ignore valid-typeof -const CRYPTO_API_SUPPORTED = typeof crypto != UNDEFINED_TYPE; -const subtle = CRYPTO_API_SUPPORTED && crypto.subtle; -const SUBTLE_API_SUPPORTED = CRYPTO_API_SUPPORTED && typeof subtle != UNDEFINED_TYPE; -const codecBytes = codec.bytes; -const Aes = cipher.aes; -const CtrGladman = mode.ctrGladman; -const HmacSha1 = misc.hmacSha1; - -let IMPORT_KEY_SUPPORTED = CRYPTO_API_SUPPORTED && SUBTLE_API_SUPPORTED && typeof subtle.importKey == FUNCTION_TYPE; -let DERIVE_BITS_SUPPORTED = CRYPTO_API_SUPPORTED && SUBTLE_API_SUPPORTED && typeof subtle.deriveBits == FUNCTION_TYPE; - -class AESDecryptionStream extends TransformStream { - - constructor({ password, signed, encryptionStrength, checkPasswordOnly }) { - super({ - start() { - Object.assign(this, { - ready: new Promise(resolve => this.resolveReady = resolve), - password, - signed, - strength: encryptionStrength - 1, - pending: new Uint8Array() - }); - }, - async transform(chunk, controller) { - const aesCrypto = this; - const { - password, - strength, - resolveReady, - ready - } = aesCrypto; - if (password) { - await createDecryptionKeys(aesCrypto, strength, password, subarray(chunk, 0, SALT_LENGTH[strength] + 2)); - chunk = subarray(chunk, SALT_LENGTH[strength] + 2); - if (checkPasswordOnly) { - controller.error(new Error(ERR_ABORT_CHECK_PASSWORD)); - } else { - resolveReady(); - } - } else { - await ready; - } - const output = new Uint8Array(chunk.length - SIGNATURE_LENGTH - ((chunk.length - SIGNATURE_LENGTH) % BLOCK_LENGTH)); - controller.enqueue(append(aesCrypto, chunk, output, 0, SIGNATURE_LENGTH, true)); - }, - async flush(controller) { - const { - signed, - ctr, - hmac, - pending, - ready - } = this; - await ready; - const chunkToDecrypt = subarray(pending, 0, pending.length - SIGNATURE_LENGTH); - const originalSignature = subarray(pending, pending.length - SIGNATURE_LENGTH); - let decryptedChunkArray = new Uint8Array(); - if (chunkToDecrypt.length) { - const encryptedChunk = toBits(codecBytes, chunkToDecrypt); - hmac.update(encryptedChunk); - const decryptedChunk = ctr.update(encryptedChunk); - decryptedChunkArray = fromBits(codecBytes, decryptedChunk); - } - if (signed) { - const signature = subarray(fromBits(codecBytes, hmac.digest()), 0, SIGNATURE_LENGTH); - for (let indexSignature = 0; indexSignature < SIGNATURE_LENGTH; indexSignature++) { - if (signature[indexSignature] != originalSignature[indexSignature]) { - throw new Error(ERR_INVALID_SIGNATURE); - } - } - } - controller.enqueue(decryptedChunkArray); - } - }); - } -} - -class AESEncryptionStream extends TransformStream { - - constructor({ password, encryptionStrength }) { - // deno-lint-ignore prefer-const - let stream; - super({ - start() { - Object.assign(this, { - ready: new Promise(resolve => this.resolveReady = resolve), - password, - strength: encryptionStrength - 1, - pending: new Uint8Array() - }); - }, - async transform(chunk, controller) { - const aesCrypto = this; - const { - password, - strength, - resolveReady, - ready - } = aesCrypto; - let preamble = new Uint8Array(); - if (password) { - preamble = await createEncryptionKeys(aesCrypto, strength, password); - resolveReady(); - } else { - await ready; - } - const output = new Uint8Array(preamble.length + chunk.length - (chunk.length % BLOCK_LENGTH)); - output.set(preamble, 0); - controller.enqueue(append(aesCrypto, chunk, output, preamble.length, 0)); - }, - async flush(controller) { - const { - ctr, - hmac, - pending, - ready - } = this; - await ready; - let encryptedChunkArray = new Uint8Array(); - if (pending.length) { - const encryptedChunk = ctr.update(toBits(codecBytes, pending)); - hmac.update(encryptedChunk); - encryptedChunkArray = fromBits(codecBytes, encryptedChunk); - } - stream.signature = fromBits(codecBytes, hmac.digest()).slice(0, SIGNATURE_LENGTH); - controller.enqueue(concat(encryptedChunkArray, stream.signature)); - } - }); - stream = this; - } -} - -function append(aesCrypto, input, output, paddingStart, paddingEnd, verifySignature) { - const { - ctr, - hmac, - pending - } = aesCrypto; - const inputLength = input.length - paddingEnd; - if (pending.length) { - input = concat(pending, input); - output = expand(output, inputLength - (inputLength % BLOCK_LENGTH)); - } - let offset; - for (offset = 0; offset <= inputLength - BLOCK_LENGTH; offset += BLOCK_LENGTH) { - const inputChunk = toBits(codecBytes, subarray(input, offset, offset + BLOCK_LENGTH)); - if (verifySignature) { - hmac.update(inputChunk); - } - const outputChunk = ctr.update(inputChunk); - if (!verifySignature) { - hmac.update(outputChunk); - } - output.set(fromBits(codecBytes, outputChunk), offset + paddingStart); - } - aesCrypto.pending = subarray(input, offset); - return output; -} - -async function createDecryptionKeys(decrypt, strength, password, preamble) { - const passwordVerificationKey = await createKeys$1(decrypt, strength, password, subarray(preamble, 0, SALT_LENGTH[strength])); - const passwordVerification = subarray(preamble, SALT_LENGTH[strength]); - if (passwordVerificationKey[0] != passwordVerification[0] || passwordVerificationKey[1] != passwordVerification[1]) { - throw new Error(ERR_INVALID_PASSWORD); - } -} - -async function createEncryptionKeys(encrypt, strength, password) { - const salt = getRandomValues(new Uint8Array(SALT_LENGTH[strength])); - const passwordVerification = await createKeys$1(encrypt, strength, password, salt); - return concat(salt, passwordVerification); -} - -async function createKeys$1(aesCrypto, strength, password, salt) { - aesCrypto.password = null; - const encodedPassword = encodeText(password); - const baseKey = await importKey(RAW_FORMAT, encodedPassword, BASE_KEY_ALGORITHM, false, DERIVED_BITS_USAGE); - const derivedBits = await deriveBits(Object.assign({ salt }, DERIVED_BITS_ALGORITHM), baseKey, 8 * ((KEY_LENGTH[strength] * 2) + 2)); - const compositeKey = new Uint8Array(derivedBits); - const key = toBits(codecBytes, subarray(compositeKey, 0, KEY_LENGTH[strength])); - const authentication = toBits(codecBytes, subarray(compositeKey, KEY_LENGTH[strength], KEY_LENGTH[strength] * 2)); - const passwordVerification = subarray(compositeKey, KEY_LENGTH[strength] * 2); - Object.assign(aesCrypto, { - keys: { - key, - authentication, - passwordVerification - }, - ctr: new CtrGladman(new Aes(key), Array.from(COUNTER_DEFAULT_VALUE)), - hmac: new HmacSha1(authentication) - }); - return passwordVerification; -} - -async function importKey(format, password, algorithm, extractable, keyUsages) { - if (IMPORT_KEY_SUPPORTED) { - try { - return await subtle.importKey(format, password, algorithm, extractable, keyUsages); - } catch (_error) { - IMPORT_KEY_SUPPORTED = false; - return misc.importKey(password); - } - } else { - return misc.importKey(password); - } -} - -async function deriveBits(algorithm, baseKey, length) { - if (DERIVE_BITS_SUPPORTED) { - try { - return await subtle.deriveBits(algorithm, baseKey, length); - } catch (_error) { - DERIVE_BITS_SUPPORTED = false; - return misc.pbkdf2(baseKey, algorithm.salt, DERIVED_BITS_ALGORITHM.iterations, length); - } - } else { - return misc.pbkdf2(baseKey, algorithm.salt, DERIVED_BITS_ALGORITHM.iterations, length); - } -} - -function concat(leftArray, rightArray) { - let array = leftArray; - if (leftArray.length + rightArray.length) { - array = new Uint8Array(leftArray.length + rightArray.length); - array.set(leftArray, 0); - array.set(rightArray, leftArray.length); - } - return array; -} - -function expand(inputArray, length) { - if (length && length > inputArray.length) { - const array = inputArray; - inputArray = new Uint8Array(length); - inputArray.set(array, 0); - } - return inputArray; -} - -function subarray(array, begin, end) { - return array.subarray(begin, end); -} - -function fromBits(codecBytes, chunk) { - return codecBytes.fromBits(chunk); -} -function toBits(codecBytes, chunk) { - return codecBytes.toBits(chunk); -} - -/* - Copyright (c) 2022 Gildas Lormeau. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the distribution. - - 3. The names of the authors may not be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT, - INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, - INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, - OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -const HEADER_LENGTH = 12; - -class ZipCryptoDecryptionStream extends TransformStream { - - constructor({ password, passwordVerification, checkPasswordOnly }) { - super({ - start() { - Object.assign(this, { - password, - passwordVerification - }); - createKeys(this, password); - }, - transform(chunk, controller) { - const zipCrypto = this; - if (zipCrypto.password) { - const decryptedHeader = decrypt(zipCrypto, chunk.subarray(0, HEADER_LENGTH)); - zipCrypto.password = null; - if (decryptedHeader[HEADER_LENGTH - 1] != zipCrypto.passwordVerification) { - throw new Error(ERR_INVALID_PASSWORD); - } - chunk = chunk.subarray(HEADER_LENGTH); - } - if (checkPasswordOnly) { - controller.error(new Error(ERR_ABORT_CHECK_PASSWORD)); - } else { - controller.enqueue(decrypt(zipCrypto, chunk)); - } - } - }); - } -} - -class ZipCryptoEncryptionStream extends TransformStream { - - constructor({ password, passwordVerification }) { - super({ - start() { - Object.assign(this, { - password, - passwordVerification - }); - createKeys(this, password); - }, - transform(chunk, controller) { - const zipCrypto = this; - let output; - let offset; - if (zipCrypto.password) { - zipCrypto.password = null; - const header = getRandomValues(new Uint8Array(HEADER_LENGTH)); - header[HEADER_LENGTH - 1] = zipCrypto.passwordVerification; - output = new Uint8Array(chunk.length + header.length); - output.set(encrypt(zipCrypto, header), 0); - offset = HEADER_LENGTH; - } else { - output = new Uint8Array(chunk.length); - offset = 0; - } - output.set(encrypt(zipCrypto, chunk), offset); - controller.enqueue(output); - } - }); - } -} - -function decrypt(target, input) { - const output = new Uint8Array(input.length); - for (let index = 0; index < input.length; index++) { - output[index] = getByte(target) ^ input[index]; - updateKeys(target, output[index]); - } - return output; -} - -function encrypt(target, input) { - const output = new Uint8Array(input.length); - for (let index = 0; index < input.length; index++) { - output[index] = getByte(target) ^ input[index]; - updateKeys(target, input[index]); - } - return output; -} - -function createKeys(target, password) { - const keys = [0x12345678, 0x23456789, 0x34567890]; - Object.assign(target, { - keys, - crcKey0: new Crc32(keys[0]), - crcKey2: new Crc32(keys[2]), - }); - for (let index = 0; index < password.length; index++) { - updateKeys(target, password.charCodeAt(index)); - } -} - -function updateKeys(target, byte) { - let [key0, key1, key2] = target.keys; - target.crcKey0.append([byte]); - key0 = ~target.crcKey0.get(); - key1 = getInt32(Math.imul(getInt32(key1 + getInt8(key0)), 134775813) + 1); - target.crcKey2.append([key1 >>> 24]); - key2 = ~target.crcKey2.get(); - target.keys = [key0, key1, key2]; -} - -function getByte(target) { - const temp = target.keys[2] | 2; - return getInt8(Math.imul(temp, (temp ^ 1)) >>> 8); -} - -function getInt8(number) { - return number & 0xFF; -} - -function getInt32(number) { - return number & 0xFFFFFFFF; -} - -/* - Copyright (c) 2022 Gildas Lormeau. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the distribution. - - 3. The names of the authors may not be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT, - INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, - INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, - OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -const COMPRESSION_FORMAT = "deflate-raw"; - -class DeflateStream extends TransformStream { - - constructor(options, { chunkSize, CompressionStream, CompressionStreamNative }) { - super({}); - const { compressed, encrypted, useCompressionStream, zipCrypto, signed, level } = options; - const stream = this; - let crc32Stream, encryptionStream; - let readable = filterEmptyChunks(super.readable); - if ((!encrypted || zipCrypto) && signed) { - [readable, crc32Stream] = readable.tee(); - crc32Stream = pipeThrough(crc32Stream, new Crc32Stream()); - } - if (compressed) { - readable = pipeThroughCommpressionStream(readable, useCompressionStream, { level, chunkSize }, CompressionStreamNative, CompressionStream); - } - if (encrypted) { - if (zipCrypto) { - readable = pipeThrough(readable, new ZipCryptoEncryptionStream(options)); - } else { - encryptionStream = new AESEncryptionStream(options); - readable = pipeThrough(readable, encryptionStream); - } - } - setReadable(stream, readable, async () => { - let signature; - if (encrypted && !zipCrypto) { - signature = encryptionStream.signature; - } - if ((!encrypted || zipCrypto) && signed) { - signature = await crc32Stream.getReader().read(); - signature = new DataView(signature.value.buffer).getUint32(0); - } - stream.signature = signature; - }); - } -} - -class InflateStream extends TransformStream { - - constructor(options, { chunkSize, DecompressionStream, DecompressionStreamNative }) { - super({}); - const { zipCrypto, encrypted, signed, signature, compressed, useCompressionStream } = options; - let crc32Stream, decryptionStream; - let readable = filterEmptyChunks(super.readable); - if (encrypted) { - if (zipCrypto) { - readable = pipeThrough(readable, new ZipCryptoDecryptionStream(options)); - } else { - decryptionStream = new AESDecryptionStream(options); - readable = pipeThrough(readable, decryptionStream); - } - } - if (compressed) { - readable = pipeThroughCommpressionStream(readable, useCompressionStream, { chunkSize }, DecompressionStreamNative, DecompressionStream); - } - if ((!encrypted || zipCrypto) && signed) { - [readable, crc32Stream] = readable.tee(); - crc32Stream = pipeThrough(crc32Stream, new Crc32Stream()); - } - setReadable(this, readable, async () => { - if ((!encrypted || zipCrypto) && signed) { - const streamSignature = await crc32Stream.getReader().read(); - const dataViewSignature = new DataView(streamSignature.value.buffer); - if (signature != dataViewSignature.getUint32(0, false)) { - throw new Error(ERR_INVALID_SIGNATURE); - } - } - }); - } -} - -function filterEmptyChunks(readable) { - return pipeThrough(readable, new TransformStream({ - transform(chunk, controller) { - if (chunk && chunk.length) { - controller.enqueue(chunk); - } - } - })); -} - -function setReadable(stream, readable, flush) { - readable = pipeThrough(readable, new TransformStream({ flush })); - Object.defineProperty(stream, "readable", { - get() { - return readable; - } - }); -} - -function pipeThroughCommpressionStream(readable, useCompressionStream, options, CodecStreamNative, CodecStream) { - try { - const CompressionStream = useCompressionStream && CodecStreamNative ? CodecStreamNative : CodecStream; - readable = pipeThrough(readable, new CompressionStream(COMPRESSION_FORMAT, options)); - } catch (error) { - if (useCompressionStream) { - readable = pipeThrough(readable, new CodecStream(COMPRESSION_FORMAT, options)); - } else { - throw error; - } - } - return readable; -} - -function pipeThrough(readable, transformStream) { - return readable.pipeThrough(transformStream); -} - -/* - Copyright (c) 2022 Gildas Lormeau. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the distribution. - - 3. The names of the authors may not be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT, - INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, - INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, - OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -const MESSAGE_EVENT_TYPE = "message"; -const MESSAGE_START = "start"; -const MESSAGE_PULL = "pull"; -const MESSAGE_DATA = "data"; -const MESSAGE_ACK_DATA = "ack"; -const MESSAGE_CLOSE = "close"; -const CODEC_DEFLATE = "deflate"; -const CODEC_INFLATE = "inflate"; - -class CodecStream extends TransformStream { - - constructor(options, config) { - super({}); - const codec = this; - const { codecType } = options; - let Stream; - if (codecType.startsWith(CODEC_DEFLATE)) { - Stream = DeflateStream; - } else if (codecType.startsWith(CODEC_INFLATE)) { - Stream = InflateStream; - } - let size = 0; - const stream = new Stream(options, config); - const readable = super.readable; - const transformStream = new TransformStream({ - transform(chunk, controller) { - if (chunk && chunk.length) { - size += chunk.length; - controller.enqueue(chunk); - } - }, - flush() { - const { signature } = stream; - Object.assign(codec, { - signature, - size - }); - } - }); - Object.defineProperty(codec, "readable", { - get() { - return readable.pipeThrough(stream).pipeThrough(transformStream); - } - }); - } -} - -/* - Copyright (c) 2022 Gildas Lormeau. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the distribution. - - 3. The names of the authors may not be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT, - INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, - INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, - OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -// deno-lint-ignore valid-typeof -const WEB_WORKERS_SUPPORTED = typeof Worker != UNDEFINED_TYPE$1; - -class CodecWorker { - - constructor(workerData, { readable, writable }, { options, config, streamOptions, useWebWorkers, transferStreams, scripts }, onTaskFinished) { - const { signal } = streamOptions; - Object.assign(workerData, { - busy: true, - readable: readable.pipeThrough(new ProgressWatcherStream(readable, streamOptions, config), { signal }), - writable, - options: Object.assign({}, options), - scripts, - transferStreams, - terminate() { - const { worker, busy } = workerData; - if (worker && !busy) { - worker.terminate(); - workerData.interface = null; - } - }, - onTaskFinished() { - workerData.busy = false; - onTaskFinished(workerData); - } - }); - return (useWebWorkers && WEB_WORKERS_SUPPORTED ? createWebWorkerInterface : createWorkerInterface)(workerData, config); - } -} - -class ProgressWatcherStream extends TransformStream { - - constructor(readableSource, { onstart, onprogress, size, onend }, { chunkSize }) { - let chunkOffset = 0; - super({ - start() { - if (onstart) { - callHandler(onstart, size); - } - }, - async transform(chunk, controller) { - chunkOffset += chunk.length; - if (onprogress) { - await callHandler(onprogress, chunkOffset, size); - } - controller.enqueue(chunk); - }, - flush() { - readableSource.size = chunkOffset; - if (onend) { - callHandler(onend, chunkOffset); - } - } - }, { highWaterMark: 1, size: () => chunkSize }); - } -} - -async function callHandler(handler, ...parameters) { - try { - await handler(...parameters); - } catch (_error) { - // ignored - } -} - -function createWorkerInterface(workerData, config) { - return { - run: () => runWorker$1(workerData, config) - }; -} - -function createWebWorkerInterface(workerData, { baseURL, chunkSize }) { - if (!workerData.interface) { - Object.assign(workerData, { - worker: getWebWorker(workerData.scripts[0], baseURL, workerData), - interface: { - run: () => runWebWorker(workerData, { chunkSize }) - } - }); - } - return workerData.interface; -} - -async function runWorker$1({ options, readable, writable, onTaskFinished }, config) { - const codecStream = new CodecStream(options, config); - try { - await readable.pipeThrough(codecStream).pipeTo(writable, { preventClose: true, preventAbort: true }); - const { - signature, - size - } = codecStream; - return { - signature, - size - }; - } finally { - onTaskFinished(); - } -} - -async function runWebWorker(workerData, config) { - let resolveResult, rejectResult; - const result = new Promise((resolve, reject) => { - resolveResult = resolve; - rejectResult = reject; - }); - Object.assign(workerData, { - reader: null, - writer: null, - resolveResult, - rejectResult, - result - }); - const { readable, options, scripts } = workerData; - const { writable, closed } = watchClosedStream(workerData.writable); - const streamsTransferred = sendMessage({ - type: MESSAGE_START, - scripts: scripts.slice(1), - options, - config, - readable, - writable - }, workerData); - if (!streamsTransferred) { - Object.assign(workerData, { - reader: readable.getReader(), - writer: writable.getWriter() - }); - } - const resultValue = await result; - try { - await writable.close(); - } catch (_error) { - // ignored - } - await closed; - return resultValue; -} - -function watchClosedStream(writableSource) { - const writer = writableSource.getWriter(); - let resolveStreamClosed; - const closed = new Promise(resolve => resolveStreamClosed = resolve); - const writable = new WritableStream({ - async write(chunk) { - await writer.ready; - await writer.write(chunk); - }, - close() { - writer.releaseLock(); - resolveStreamClosed(); - }, - abort(reason) { - return writer.abort(reason); - } - }); - return { writable, closed }; -} - -let classicWorkersSupported = true; -let transferStreamsSupported = true; - -function getWebWorker(url, baseURL, workerData) { - const workerOptions = { type: "module" }; - let scriptUrl, worker; - // deno-lint-ignore valid-typeof - if (typeof url == FUNCTION_TYPE$1) { - url = url(); - } - try { - scriptUrl = new URL(url, baseURL); - } catch (_error) { - scriptUrl = url; - } - if (classicWorkersSupported) { - try { - worker = new Worker(scriptUrl); - } catch (_error) { - classicWorkersSupported = false; - worker = new Worker(scriptUrl, workerOptions); - } - } else { - worker = new Worker(scriptUrl, workerOptions); - } - worker.addEventListener(MESSAGE_EVENT_TYPE, event => onMessage(event, workerData)); - return worker; -} - -function sendMessage(message, { worker, writer, onTaskFinished, transferStreams }) { - try { - let { value, readable, writable } = message; - const transferables = []; - if (value) { - const { buffer, length } = value; - if (length != buffer.byteLength) { - value = new Uint8Array(value); - } - message.value = value.buffer; - transferables.push(message.value); - } - if (transferStreams && transferStreamsSupported) { - if (readable) { - transferables.push(readable); - } - if (writable) { - transferables.push(writable); - } - } else { - message.readable = message.writable = null; - } - if (transferables.length) { - try { - worker.postMessage(message, transferables); - return true; - } catch (_error) { - transferStreamsSupported = false; - message.readable = message.writable = null; - worker.postMessage(message); - } - } else { - worker.postMessage(message); - } - } catch (error) { - if (writer) { - writer.releaseLock(); - } - onTaskFinished(); - throw error; - } -} - -async function onMessage({ data }, workerData) { - const { type, value, messageId, result, error } = data; - const { reader, writer, resolveResult, rejectResult, onTaskFinished } = workerData; - try { - if (error) { - const { message, stack, code, name } = error; - const responseError = new Error(message); - Object.assign(responseError, { stack, code, name }); - close(responseError); - } else { - if (type == MESSAGE_PULL) { - const { value, done } = await reader.read(); - sendMessage({ type: MESSAGE_DATA, value, done, messageId }, workerData); - } - if (type == MESSAGE_DATA) { - await writer.ready; - await writer.write(new Uint8Array(value)); - sendMessage({ type: MESSAGE_ACK_DATA, messageId }, workerData); - } - if (type == MESSAGE_CLOSE) { - close(null, result); - } - } - } catch (error) { - close(error); - } - - function close(error, result) { - if (error) { - rejectResult(error); - } else { - resolveResult(result); - } - if (writer) { - writer.releaseLock(); - } - onTaskFinished(); - } -} - -/* - Copyright (c) 2022 Gildas Lormeau. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the distribution. - - 3. The names of the authors may not be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT, - INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, - INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, - OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -let pool = []; -const pendingRequests = []; - -let indexWorker = 0; - -async function runWorker(stream, workerOptions) { - const { options, config } = workerOptions; - const { transferStreams, useWebWorkers, useCompressionStream, codecType, compressed, signed, encrypted } = options; - const { workerScripts, maxWorkers, terminateWorkerTimeout } = config; - workerOptions.transferStreams = transferStreams || transferStreams === UNDEFINED_VALUE; - const streamCopy = !compressed && !signed && !encrypted && !workerOptions.transferStreams; - workerOptions.useWebWorkers = !streamCopy && (useWebWorkers || (useWebWorkers === UNDEFINED_VALUE && config.useWebWorkers)); - workerOptions.scripts = workerOptions.useWebWorkers && workerScripts ? workerScripts[codecType] : []; - options.useCompressionStream = useCompressionStream || (useCompressionStream === UNDEFINED_VALUE && config.useCompressionStream); - let worker; - const workerData = pool.find(workerData => !workerData.busy); - if (workerData) { - clearTerminateTimeout(workerData); - worker = new CodecWorker(workerData, stream, workerOptions, onTaskFinished); - } else if (pool.length < maxWorkers) { - const workerData = { indexWorker }; - indexWorker++; - pool.push(workerData); - worker = new CodecWorker(workerData, stream, workerOptions, onTaskFinished); - } else { - worker = await new Promise(resolve => pendingRequests.push({ resolve, stream, workerOptions })); - } - return worker.run(); - - function onTaskFinished(workerData) { - if (pendingRequests.length) { - const [{ resolve, stream, workerOptions }] = pendingRequests.splice(0, 1); - resolve(new CodecWorker(workerData, stream, workerOptions, onTaskFinished)); - } else if (workerData.worker) { - clearTerminateTimeout(workerData); - if (Number.isFinite(terminateWorkerTimeout) && terminateWorkerTimeout >= 0) { - workerData.terminateTimeout = setTimeout(() => { - pool = pool.filter(data => data != workerData); - workerData.terminate(); - }, terminateWorkerTimeout); - } - } else { - pool = pool.filter(data => data != workerData); - } - } -} - -function clearTerminateTimeout(workerData) { - const { terminateTimeout } = workerData; - if (terminateTimeout) { - clearTimeout(terminateTimeout); - workerData.terminateTimeout = null; - } -} - -function e(e){const t=()=>URL.createObjectURL(new Blob(['const{Array:e,Object:t,Number:n,Math:r,Error:s,Uint8Array:i,Uint16Array:o,Uint32Array:c,Int32Array:f,Map:a,DataView:l,Promise:u,TextEncoder:w,crypto:h,postMessage:d,TransformStream:p,ReadableStream:y,WritableStream:m,CompressionStream:b,DecompressionStream:g}=self;class k{constructor(e){return class extends p{constructor(t,n){const r=new e(n);super({transform(e,t){t.enqueue(r.append(e))},flush(e){const t=r.flush();t&&e.enqueue(t)}})}}}}const v=[];for(let e=0;256>e;e++){let t=e;for(let e=0;8>e;e++)1&t?t=t>>>1^3988292384:t>>>=1;v[e]=t}class S{constructor(e){this.t=e||-1}append(e){let t=0|this.t;for(let n=0,r=0|e.length;r>n;n++)t=t>>>8^v[255&(t^e[n])];this.t=t}get(){return~this.t}}class z extends p{constructor(){const e=new S;super({transform(t){e.append(t)},flush(t){const n=new i(4);new l(n.buffer).setUint32(0,e.get()),t.enqueue(n)}})}}const C={concat(e,t){if(0===e.length||0===t.length)return e.concat(t);const n=e[e.length-1],r=C.i(n);return 32===r?e.concat(t):C.o(t,r,0|n,e.slice(0,e.length-1))},l(e){const t=e.length;if(0===t)return 0;const n=e[t-1];return 32*(t-1)+C.i(n)},u(e,t){if(32*e.length0&&t&&(e[n-1]=C.h(t,e[n-1]&2147483648>>t-1,1)),e},h:(e,t,n)=>32===e?t:(n?0|t:t<<32-e)+1099511627776*e,i:e=>r.round(e/1099511627776)||32,o(e,t,n,r){for(void 0===r&&(r=[]);t>=32;t-=32)r.push(n),n=0;if(0===t)return r.concat(e);for(let s=0;s>>t),n=e[s]<<32-t;const s=e.length?e[e.length-1]:0,i=C.i(s);return r.push(C.h(t+i&31,t+i>32?n:r.pop(),1)),r}},x={p:{m(e){const t=C.l(e)/8,n=new i(t);let r;for(let s=0;t>s;s++)0==(3&s)&&(r=e[s/4]),n[s]=r>>>24,r<<=8;return n},g(e){const t=[];let n,r=0;for(n=0;n9007199254740991)throw new s("Cannot hash more than 2^53 - 1 bits");const o=new c(n);let f=0;for(let e=t.blockSize+r-(t.blockSize+r&t.blockSize-1);i>=e;e+=t.blockSize)t.I(o.subarray(16*f,16*(f+1))),f+=1;return n.splice(0,16*f),t}D(){const e=this;let t=e.C;const n=e.S;t=C.concat(t,[C.h(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(r.floor(e._/4294967296)),t.push(0|e._);t.length;)e.I(t.splice(0,16));return e.reset(),n}V(e,t,n,r){return e>19?e>39?e>59?e>79?void 0:t^n^r:t&n|t&r|n&r:t^n^r:t&n|~t&r}P(e,t){return t<>>32-e}I(t){const n=this,s=n.S,i=e(80);for(let e=0;16>e;e++)i[e]=t[e];let o=s[0],c=s[1],f=s[2],a=s[3],l=s[4];for(let e=0;79>=e;e++){16>e||(i[e]=n.P(1,i[e-3]^i[e-8]^i[e-14]^i[e-16]));const t=n.P(5,o)+n.V(e,c,f,a)+l+i[e]+n.v[r.floor(e/20)]|0;l=a,a=f,f=n.P(30,c),c=o,o=t}s[0]=s[0]+o|0,s[1]=s[1]+c|0,s[2]=s[2]+f|0,s[3]=s[3]+a|0,s[4]=s[4]+l|0}},A={getRandomValues(e){const t=new c(e.buffer),n=e=>{let t=987654321;const n=4294967295;return()=>(t=36969*(65535&t)+(t>>16)&n,(((t<<16)+(e=18e3*(65535&e)+(e>>16)&n)&n)/4294967296+.5)*(r.random()>.5?1:-1))};for(let s,i=0;inew I.R(x.p.g(e)),B(e,t,n,r){if(n=n||1e4,0>r||0>n)throw new s("invalid params to pbkdf2");const i=1+(r>>5)<<2;let o,c,f,a,u;const w=new ArrayBuffer(i),h=new l(w);let d=0;const p=C;for(t=x.p.g(t),u=1;(i||1)>d;u++){for(o=c=e.encrypt(p.concat(t,[u])),f=1;n>f;f++)for(c=e.encrypt(c),a=0;ad&&fs&&(e=(new n).update(e).D());for(let t=0;s>t;t++)r[0][t]=909522486^e[t],r[1][t]=1549556828^e[t];t.K[0].update(r[0]),t.K[1].update(r[1]),t.U=new n(t.K[0])}reset(){const e=this;e.U=new e.M(e.K[0]),e.N=!1}update(e){this.N=!0,this.U.update(e)}digest(){const e=this,t=e.U.D(),n=new e.M(e.K[1]).update(t).D();return e.reset(),n}encrypt(e){if(this.N)throw new s("encrypt on already updated hmac called!");return this.update(e),this.digest(e)}}},D=void 0!==h&&"function"==typeof h.getRandomValues,V="Invalid password",P="Invalid signature",R="zipjs-abort-check-password";function B(e){return D?h.getRandomValues(e):A.getRandomValues(e)}const E=16,M={name:"PBKDF2"},K=t.assign({hash:{name:"HMAC"}},M),U=t.assign({iterations:1e3,hash:{name:"SHA-1"}},M),N=["deriveBits"],O=[8,12,16],T=[16,24,32],W=10,j=[0,0,0,0],H="undefined",L="function",F=typeof h!=H,q=F&&h.subtle,G=F&&typeof q!=H,J=x.p,Q=class{constructor(e){const t=this;t.O=[[[],[],[],[],[]],[[],[],[],[],[]]],t.O[0][0][0]||t.T();const n=t.O[0][4],r=t.O[1],i=e.length;let o,c,f,a=1;if(4!==i&&6!==i&&8!==i)throw new s("invalid aes key size");for(t.v=[c=e.slice(0),f=[]],o=i;4*i+28>o;o++){let e=c[o-1];(o%i==0||8===i&&o%i==4)&&(e=n[e>>>24]<<24^n[e>>16&255]<<16^n[e>>8&255]<<8^n[255&e],o%i==0&&(e=e<<8^e>>>24^a<<24,a=a<<1^283*(a>>7))),c[o]=c[o-i]^e}for(let e=0;o;e++,o--){const t=c[3&e?o:o-4];f[e]=4>=o||4>e?t:r[0][n[t>>>24]]^r[1][n[t>>16&255]]^r[2][n[t>>8&255]]^r[3][n[255&t]]}}encrypt(e){return this.W(e,0)}decrypt(e){return this.W(e,1)}T(){const e=this.O[0],t=this.O[1],n=e[4],r=t[4],s=[],i=[];let o,c,f,a;for(let e=0;256>e;e++)i[(s[e]=e<<1^283*(e>>7))^e]=e;for(let l=o=0;!n[l];l^=c||1,o=i[o]||1){let i=o^o<<1^o<<2^o<<3^o<<4;i=i>>8^255&i^99,n[l]=i,r[i]=l,a=s[f=s[c=s[l]]];let u=16843009*a^65537*f^257*c^16843008*l,w=257*s[i]^16843008*i;for(let n=0;4>n;n++)e[n][l]=w=w<<24^w>>>8,t[n][i]=u=u<<24^u>>>8}for(let n=0;5>n;n++)e[n]=e[n].slice(0),t[n]=t[n].slice(0)}W(e,t){if(4!==e.length)throw new s("invalid aes block size");const n=this.v[t],r=n.length/4-2,i=[0,0,0,0],o=this.O[t],c=o[0],f=o[1],a=o[2],l=o[3],u=o[4];let w,h,d,p=e[0]^n[0],y=e[t?3:1]^n[1],m=e[2]^n[2],b=e[t?1:3]^n[3],g=4;for(let e=0;r>e;e++)w=c[p>>>24]^f[y>>16&255]^a[m>>8&255]^l[255&b]^n[g],h=c[y>>>24]^f[m>>16&255]^a[b>>8&255]^l[255&p]^n[g+1],d=c[m>>>24]^f[b>>16&255]^a[p>>8&255]^l[255&y]^n[g+2],b=c[b>>>24]^f[p>>16&255]^a[y>>8&255]^l[255&m]^n[g+3],g+=4,p=w,y=h,m=d;for(let e=0;4>e;e++)i[t?3&-e:e]=u[p>>>24]<<24^u[y>>16&255]<<16^u[m>>8&255]<<8^u[255&b]^n[g++],w=p,p=y,y=m,m=b,b=w;return i}},X=class{constructor(e,t){this.j=e,this.H=t,this.L=t}reset(){this.L=this.H}update(e){return this.F(this.j,e,this.L)}q(e){if(255==(e>>24&255)){let t=e>>16&255,n=e>>8&255,r=255&e;255===t?(t=0,255===n?(n=0,255===r?r=0:++r):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=r}else e+=1<<24;return e}G(e){0===(e[0]=this.q(e[0]))&&(e[1]=this.q(e[1]))}F(e,t,n){let r;if(!(r=t.length))return[];const s=C.l(t);for(let s=0;r>s;s+=4){this.G(n);const r=e.encrypt(n);t[s]^=r[0],t[s+1]^=r[1],t[s+2]^=r[2],t[s+3]^=r[3]}return C.u(t,s)}},Y=I.R;let Z=F&&G&&typeof q.importKey==L,$=F&&G&&typeof q.deriveBits==L;class ee extends p{constructor({password:e,signed:n,encryptionStrength:r,checkPasswordOnly:o}){super({start(){t.assign(this,{ready:new u((e=>this.J=e)),password:e,signed:n,X:r-1,pending:new i})},async transform(e,t){const n=this,{password:r,X:c,J:f,ready:a}=n;r?(await(async(e,t,n,r)=>{const i=await re(e,t,n,ie(r,0,O[t])),o=ie(r,O[t]);if(i[0]!=o[0]||i[1]!=o[1])throw new s(V)})(n,c,r,ie(e,0,O[c]+2)),e=ie(e,O[c]+2),o?t.error(new s(R)):f()):await a;const l=new i(e.length-W-(e.length-W)%E);t.enqueue(ne(n,e,l,0,W,!0))},async flush(e){const{signed:t,Y:n,Z:r,pending:o,ready:c}=this;await c;const f=ie(o,0,o.length-W),a=ie(o,o.length-W);let l=new i;if(f.length){const e=ce(J,f);r.update(e);const t=n.update(e);l=oe(J,t)}if(t){const e=ie(oe(J,r.digest()),0,W);for(let t=0;W>t;t++)if(e[t]!=a[t])throw new s(P)}e.enqueue(l)}})}}class te extends p{constructor({password:e,encryptionStrength:n}){let r;super({start(){t.assign(this,{ready:new u((e=>this.J=e)),password:e,X:n-1,pending:new i})},async transform(e,t){const n=this,{password:r,X:s,J:o,ready:c}=n;let f=new i;r?(f=await(async(e,t,n)=>{const r=B(new i(O[t]));return se(r,await re(e,t,n,r))})(n,s,r),o()):await c;const a=new i(f.length+e.length-e.length%E);a.set(f,0),t.enqueue(ne(n,e,a,f.length,0))},async flush(e){const{Y:t,Z:n,pending:s,ready:o}=this;await o;let c=new i;if(s.length){const e=t.update(ce(J,s));n.update(e),c=oe(J,e)}r.signature=oe(J,n.digest()).slice(0,W),e.enqueue(se(c,r.signature))}}),r=this}}function ne(e,t,n,r,s,o){const{Y:c,Z:f,pending:a}=e,l=t.length-s;let u;for(a.length&&(t=se(a,t),n=((e,t)=>{if(t&&t>e.length){const n=e;(e=new i(t)).set(n,0)}return e})(n,l-l%E)),u=0;l-E>=u;u+=E){const e=ce(J,ie(t,u,u+E));o&&f.update(e);const s=c.update(e);o||f.update(s),n.set(oe(J,s),u+r)}return e.pending=ie(t,u),n}async function re(n,r,s,o){n.password=null;const c=(e=>{if(void 0===w){const t=new i((e=unescape(encodeURIComponent(e))).length);for(let n=0;n{if(!Z)return I.importKey(t);try{return await q.importKey("raw",t,n,!1,s)}catch(e){return Z=!1,I.importKey(t)}})(0,c,K,0,N),a=await(async(e,t,n)=>{if(!$)return I.B(t,e.salt,U.iterations,n);try{return await q.deriveBits(e,t,n)}catch(r){return $=!1,I.B(t,e.salt,U.iterations,n)}})(t.assign({salt:o},U),f,8*(2*T[r]+2)),l=new i(a),u=ce(J,ie(l,0,T[r])),h=ce(J,ie(l,T[r],2*T[r])),d=ie(l,2*T[r]);return t.assign(n,{keys:{key:u,$:h,passwordVerification:d},Y:new X(new Q(u),e.from(j)),Z:new Y(h)}),d}function se(e,t){let n=e;return e.length+t.length&&(n=new i(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function ie(e,t,n){return e.subarray(t,n)}function oe(e,t){return e.m(t)}function ce(e,t){return e.g(t)}class fe extends p{constructor({password:e,passwordVerification:n,checkPasswordOnly:r}){super({start(){t.assign(this,{password:e,passwordVerification:n}),we(this,e)},transform(e,t){const n=this;if(n.password){const t=le(n,e.subarray(0,12));if(n.password=null,t[11]!=n.passwordVerification)throw new s(V);e=e.subarray(12)}r?t.error(new s(R)):t.enqueue(le(n,e))}})}}class ae extends p{constructor({password:e,passwordVerification:n}){super({start(){t.assign(this,{password:e,passwordVerification:n}),we(this,e)},transform(e,t){const n=this;let r,s;if(n.password){n.password=null;const t=B(new i(12));t[11]=n.passwordVerification,r=new i(e.length+t.length),r.set(ue(n,t),0),s=12}else r=new i(e.length),s=0;r.set(ue(n,e),s),t.enqueue(r)}})}}function le(e,t){const n=new i(t.length);for(let r=0;r>>24]),i=~e.te.get(),e.keys=[n,s,i]}function de(e){const t=2|e.keys[2];return pe(r.imul(t,1^t)>>>8)}function pe(e){return 255&e}function ye(e){return 4294967295&e}const me="deflate-raw";class be extends p{constructor(e,{chunkSize:t,CompressionStream:n,CompressionStreamNative:r}){super({});const{compressed:s,encrypted:i,useCompressionStream:o,zipCrypto:c,signed:f,level:a}=e,u=this;let w,h,d=ke(super.readable);i&&!c||!f||([d,w]=d.tee(),w=ze(w,new z)),s&&(d=Se(d,o,{level:a,chunkSize:t},r,n)),i&&(c?d=ze(d,new ae(e)):(h=new te(e),d=ze(d,h))),ve(u,d,(async()=>{let e;i&&!c&&(e=h.signature),i&&!c||!f||(e=await w.getReader().read(),e=new l(e.value.buffer).getUint32(0)),u.signature=e}))}}class ge extends p{constructor(e,{chunkSize:t,DecompressionStream:n,DecompressionStreamNative:r}){super({});const{zipCrypto:i,encrypted:o,signed:c,signature:f,compressed:a,useCompressionStream:u}=e;let w,h,d=ke(super.readable);o&&(i?d=ze(d,new fe(e)):(h=new ee(e),d=ze(d,h))),a&&(d=Se(d,u,{chunkSize:t},r,n)),o&&!i||!c||([d,w]=d.tee(),w=ze(w,new z)),ve(this,d,(async()=>{if((!o||i)&&c){const e=await w.getReader().read(),t=new l(e.value.buffer);if(f!=t.getUint32(0,!1))throw new s(P)}}))}}function ke(e){return ze(e,new p({transform(e,t){e&&e.length&&t.enqueue(e)}}))}function ve(e,n,r){n=ze(n,new p({flush:r})),t.defineProperty(e,"readable",{get:()=>n})}function Se(e,t,n,r,s){try{e=ze(e,new(t&&r?r:s)(me,n))}catch(r){if(!t)throw r;e=ze(e,new s(me,n))}return e}function ze(e,t){return e.pipeThrough(t)}const Ce="data";class xe extends p{constructor(e,n){super({});const r=this,{codecType:s}=e;let i;s.startsWith("deflate")?i=be:s.startsWith("inflate")&&(i=ge);let o=0;const c=new i(e,n),f=super.readable,a=new p({transform(e,t){e&&e.length&&(o+=e.length,t.enqueue(e))},flush(){const{signature:e}=c;t.assign(r,{signature:e,size:o})}});t.defineProperty(r,"readable",{get:()=>f.pipeThrough(c).pipeThrough(a)})}}const _e=new a,Ae=new a;let Ie=0;async function De(e){try{const{options:t,scripts:r,config:s}=e;r&&r.length&&importScripts.apply(void 0,r),self.initCodec&&self.initCodec(),s.CompressionStreamNative=self.CompressionStream,s.DecompressionStreamNative=self.DecompressionStream,self.Deflate&&(s.CompressionStream=new k(self.Deflate)),self.Inflate&&(s.DecompressionStream=new k(self.Inflate));const i={highWaterMark:1,size:()=>s.chunkSize},o=e.readable||new y({async pull(e){const t=new u((e=>_e.set(Ie,e)));Ve({type:"pull",messageId:Ie}),Ie=(Ie+1)%n.MAX_SAFE_INTEGER;const{value:r,done:s}=await t;e.enqueue(r),s&&e.close()}},i),c=e.writable||new m({async write(e){let t;const r=new u((e=>t=e));Ae.set(Ie,t),Ve({type:Ce,value:e,messageId:Ie}),Ie=(Ie+1)%n.MAX_SAFE_INTEGER,await r}},i),f=new xe(t,s);await o.pipeThrough(f).pipeTo(c,{preventClose:!0,preventAbort:!0});try{await c.close()}catch(e){}const{signature:a,size:l}=f;Ve({type:"close",result:{signature:a,size:l}})}catch(e){Pe(e)}}function Ve(e){let{value:t}=e;if(t)if(t.length)try{t=new i(t),e.value=t.buffer,d(e,[e.value])}catch(t){d(e)}else d(e);else d(e)}function Pe(e){const{message:t,stack:n,code:r,name:s}=e;d({error:{message:t,stack:n,code:r,name:s}})}addEventListener("message",(({data:e})=>{const{type:t,messageId:n,value:r,done:s}=e;try{if("start"==t&&De(e),t==Ce){const e=_e.get(n);_e.delete(n),e({value:new i(r),done:s})}if("ack"==t){const e=Ae.get(n);Ae.delete(n),e()}}catch(e){Pe(e)}}));const Re=-2;function Be(t){return Ee(t.map((([t,n])=>new e(t).fill(n,0,t))))}function Ee(t){return t.reduce(((t,n)=>t.concat(e.isArray(n)?Ee(n):n)),[])}const Me=[0,1,2,3].concat(...Be([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function Ke(){const e=this;function t(e,t){let n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1}e.ne=n=>{const s=e.re,i=e.ie.se,o=e.ie.oe;let c,f,a,l=-1;for(n.ce=0,n.fe=573,c=0;o>c;c++)0!==s[2*c]?(n.ae[++n.ce]=l=c,n.le[c]=0):s[2*c+1]=0;for(;2>n.ce;)a=n.ae[++n.ce]=2>l?++l:0,s[2*a]=1,n.le[a]=0,n.ue--,i&&(n.we-=i[2*a+1]);for(e.he=l,c=r.floor(n.ce/2);c>=1;c--)n.de(s,c);a=o;do{c=n.ae[1],n.ae[1]=n.ae[n.ce--],n.de(s,1),f=n.ae[1],n.ae[--n.fe]=c,n.ae[--n.fe]=f,s[2*a]=s[2*c]+s[2*f],n.le[a]=r.max(n.le[c],n.le[f])+1,s[2*c+1]=s[2*f+1]=a,n.ae[1]=a++,n.de(s,1)}while(n.ce>=2);n.ae[--n.fe]=n.ae[1],(t=>{const n=e.re,r=e.ie.se,s=e.ie.pe,i=e.ie.ye,o=e.ie.me;let c,f,a,l,u,w,h=0;for(l=0;15>=l;l++)t.be[l]=0;for(n[2*t.ae[t.fe]+1]=0,c=t.fe+1;573>c;c++)f=t.ae[c],l=n[2*n[2*f+1]+1]+1,l>o&&(l=o,h++),n[2*f+1]=l,f>e.he||(t.be[l]++,u=0,i>f||(u=s[f-i]),w=n[2*f],t.ue+=w*(l+u),r&&(t.we+=w*(r[2*f+1]+u)));if(0!==h){do{for(l=o-1;0===t.be[l];)l--;t.be[l]--,t.be[l+1]+=2,t.be[o]--,h-=2}while(h>0);for(l=o;0!==l;l--)for(f=t.be[l];0!==f;)a=t.ae[--c],a>e.he||(n[2*a+1]!=l&&(t.ue+=(l-n[2*a+1])*n[2*a],n[2*a+1]=l),f--)}})(n),((e,n,r)=>{const s=[];let i,o,c,f=0;for(i=1;15>=i;i++)s[i]=f=f+r[i-1]<<1;for(o=0;n>=o;o++)c=e[2*o+1],0!==c&&(e[2*o]=t(s[c]++,c))})(s,e.he,n.be)}}function Ue(e,t,n,r,s){const i=this;i.se=e,i.pe=t,i.ye=n,i.oe=r,i.me=s}Ke.ge=[0,1,2,3,4,5,6,7].concat(...Be([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]])),Ke.ke=[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],Ke.ve=[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],Ke.Se=e=>256>e?Me[e]:Me[256+(e>>>7)],Ke.ze=[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],Ke.Ce=[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],Ke.xe=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],Ke._e=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];const Ne=Be([[144,8],[112,9],[24,7],[8,8]]);Ue.Ae=Ee([12,140,76,204,44,172,108,236,28,156,92,220,60,188,124,252,2,130,66,194,34,162,98,226,18,146,82,210,50,178,114,242,10,138,74,202,42,170,106,234,26,154,90,218,58,186,122,250,6,134,70,198,38,166,102,230,22,150,86,214,54,182,118,246,14,142,78,206,46,174,110,238,30,158,94,222,62,190,126,254,1,129,65,193,33,161,97,225,17,145,81,209,49,177,113,241,9,137,73,201,41,169,105,233,25,153,89,217,57,185,121,249,5,133,69,197,37,165,101,229,21,149,85,213,53,181,117,245,13,141,77,205,45,173,109,237,29,157,93,221,61,189,125,253,19,275,147,403,83,339,211,467,51,307,179,435,115,371,243,499,11,267,139,395,75,331,203,459,43,299,171,427,107,363,235,491,27,283,155,411,91,347,219,475,59,315,187,443,123,379,251,507,7,263,135,391,71,327,199,455,39,295,167,423,103,359,231,487,23,279,151,407,87,343,215,471,55,311,183,439,119,375,247,503,15,271,143,399,79,335,207,463,47,303,175,431,111,367,239,495,31,287,159,415,95,351,223,479,63,319,191,447,127,383,255,511,0,64,32,96,16,80,48,112,8,72,40,104,24,88,56,120,4,68,36,100,20,84,52,116,3,131,67,195,35,163,99,227].map(((e,t)=>[e,Ne[t]])));const Oe=Be([[30,5]]);function Te(e,t,n,r,s){const i=this;i.Ie=e,i.De=t,i.Ve=n,i.Pe=r,i.Re=s}Ue.Be=Ee([0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30,1,17,9,25,5,21,13,29,3,19,11,27,7,23].map(((e,t)=>[e,Oe[t]]))),Ue.Ee=new Ue(Ue.Ae,Ke.ze,257,286,15),Ue.Me=new Ue(Ue.Be,Ke.Ce,0,30,15),Ue.Ke=new Ue(null,Ke.xe,0,19,7);const We=[new Te(0,0,0,0,0),new Te(4,4,8,4,1),new Te(4,5,16,8,1),new Te(4,6,32,32,1),new Te(4,4,16,16,2),new Te(8,16,32,32,2),new Te(8,16,128,128,2),new Te(8,32,128,256,2),new Te(32,128,258,1024,2),new Te(32,258,258,4096,2)],je=["need dictionary","stream end","","","stream error","data error","","buffer error","",""],He=113,Le=666,Fe=262;function qe(e,t,n,r){const s=e[2*t],i=e[2*n];return i>s||s==i&&r[t]<=r[n]}function Ge(){const e=this;let t,n,s,c,f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z,C,x,_,A,I,D,V,P,R,B,E,M,K;const U=new Ke,N=new Ke,O=new Ke;let T,W,j,H,L,F;function q(){let t;for(t=0;286>t;t++)E[2*t]=0;for(t=0;30>t;t++)M[2*t]=0;for(t=0;19>t;t++)K[2*t]=0;E[512]=1,e.ue=e.we=0,W=j=0}function G(e,t){let n,r=-1,s=e[1],i=0,o=7,c=4;0===s&&(o=138,c=3),e[2*(t+1)+1]=65535;for(let f=0;t>=f;f++)n=s,s=e[2*(f+1)+1],++ii?K[2*n]+=i:0!==n?(n!=r&&K[2*n]++,K[32]++):i>10?K[36]++:K[34]++,i=0,r=n,0===s?(o=138,c=3):n==s?(o=6,c=3):(o=7,c=4))}function J(t){e.Ue[e.pending++]=t}function Q(e){J(255&e),J(e>>>8&255)}function X(e,t){let n;const r=t;F>16-r?(n=e,L|=n<>>16-F,F+=r-16):(L|=e<=n;n++)if(r=i,i=e[2*(n+1)+1],++o>=c||r!=i){if(f>o)do{Y(r,K)}while(0!=--o);else 0!==r?(r!=s&&(Y(r,K),o--),Y(16,K),X(o-3,2)):o>10?(Y(18,K),X(o-11,7)):(Y(17,K),X(o-3,3));o=0,s=r,0===i?(c=138,f=3):r==i?(c=6,f=3):(c=7,f=4)}}function $(){16==F?(Q(L),L=0,F=0):8>F||(J(255&L),L>>>=8,F-=8)}function ee(t,n){let s,i,o;if(e.Ne[W]=t,e.Oe[W]=255&n,W++,0===t?E[2*n]++:(j++,t--,E[2*(Ke.ge[n]+256+1)]++,M[2*Ke.Se(t)]++),0==(8191&W)&&V>2){for(s=8*W,i=C-k,o=0;30>o;o++)s+=M[2*o]*(5+Ke.Ce[o]);if(s>>>=3,jc);Y(256,t),H=t[513]}function ne(){F>8?Q(L):F>0&&J(255&L),L=0,F=0}function re(t,n,r){X(0+(r?1:0),3),((t,n)=>{ne(),H=8,Q(n),Q(~n),e.Ue.set(u.subarray(t,t+n),e.pending),e.pending+=n})(t,n)}function se(n){((t,n,r)=>{let s,i,o=0;V>0?(U.ne(e),N.ne(e),o=(()=>{let t;for(G(E,U.he),G(M,N.he),O.ne(e),t=18;t>=3&&0===K[2*Ke._e[t]+1];t--);return e.ue+=14+3*(t+1),t})(),s=e.ue+3+7>>>3,i=e.we+3+7>>>3,i>s||(s=i)):s=i=n+5,n+4>s||-1==t?i==s?(X(2+(r?1:0),3),te(Ue.Ae,Ue.Be)):(X(4+(r?1:0),3),((e,t,n)=>{let r;for(X(e-257,5),X(t-1,5),X(n-4,4),r=0;n>r;r++)X(K[2*Ke._e[r]+1],3);Z(E,e-1),Z(M,t-1)})(U.he+1,N.he+1,o+1),te(E,M)):re(t,n,r),q(),r&&ne()})(0>k?-1:k,C-k,n),k=C,t.Te()}function ie(){let e,n,r,s;do{if(s=w-_-C,0===s&&0===C&&0===_)s=f;else if(-1==s)s--;else if(C>=f+f-Fe){u.set(u.subarray(f,f+f),0),x-=f,C-=f,k-=f,e=y,r=e;do{n=65535&d[--r],d[r]=f>n?0:n-f}while(0!=--e);e=f,r=e;do{n=65535&h[--r],h[r]=f>n?0:n-f}while(0!=--e);s+=f}if(0===t.We)return;e=t.je(u,C+_,s),_+=e,3>_||(p=255&u[C],p=(p<_&&0!==t.We)}function oe(e){let t,n,r=I,s=C,i=A;const o=C>f-Fe?C-(f-Fe):0;let c=B;const a=l,w=C+258;let d=u[s+i-1],p=u[s+i];R>A||(r>>=2),c>_&&(c=_);do{if(t=e,u[t+i]==p&&u[t+i-1]==d&&u[t]==u[s]&&u[++t]==u[s+1]){s+=2,t++;do{}while(u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&w>s);if(n=258-(w-s),s=w-258,n>i){if(x=e,i=n,n>=c)break;d=u[s+i-1],p=u[s+i]}}}while((e=65535&h[e&a])>o&&0!=--r);return i>_?_:i}e.le=[],e.be=[],e.ae=[],E=[],M=[],K=[],e.de=(t,n)=>{const r=e.ae,s=r[n];let i=n<<1;for(;i<=e.ce&&(i(W||(W=8),j||(j=8),G||(G=0),t.Le=null,-1==S&&(S=6),1>j||j>9||8!=W||9>x||x>15||0>S||S>9||0>G||G>2?Re:(t.Fe=e,a=x,f=1<(t.qe=t.Ge=0,t.Le=null,e.pending=0,e.Je=0,n=He,c=0,U.re=E,U.ie=Ue.Ee,N.re=M,N.ie=Ue.Me,O.re=K,O.ie=Ue.Ke,L=0,F=0,H=8,q(),(()=>{w=2*f,d[y-1]=0;for(let e=0;y-1>e;e++)d[e]=0;D=We[V].De,R=We[V].Ie,B=We[V].Ve,I=We[V].Pe,C=0,k=0,_=0,v=A=2,z=0,p=0})(),0))(t))),e.Qe=()=>42!=n&&n!=He&&n!=Le?Re:(e.Oe=null,e.Ne=null,e.Ue=null,d=null,h=null,u=null,e.Fe=null,n==He?-3:0),e.Xe=(e,t,n)=>{let r=0;return-1==t&&(t=6),0>t||t>9||0>n||n>2?Re:(We[V].Re!=We[t].Re&&0!==e.qe&&(r=e.Ye(1)),V!=t&&(V=t,D=We[V].De,R=We[V].Ie,B=We[V].Ve,I=We[V].Pe),P=n,r)},e.Ze=(e,t,r)=>{let s,i=r,o=0;if(!t||42!=n)return Re;if(3>i)return 0;for(i>f-Fe&&(i=f-Fe,o=r-i),u.set(t.subarray(o,o+i),0),C=i,k=i,p=255&u[0],p=(p<=s;s++)p=(p<{let o,w,m,I,R;if(i>4||0>i)return Re;if(!r.$e||!r.et&&0!==r.We||n==Le&&4!=i)return r.Le=je[4],Re;if(0===r.tt)return r.Le=je[7],-5;var B;if(t=r,I=c,c=i,42==n&&(w=8+(a-8<<4)<<8,m=(V-1&255)>>1,m>3&&(m=3),w|=m<<6,0!==C&&(w|=32),w+=31-w%31,n=He,J((B=w)>>8&255),J(255&B)),0!==e.pending){if(t.Te(),0===t.tt)return c=-1,0}else if(0===t.We&&I>=i&&4!=i)return t.Le=je[7],-5;if(n==Le&&0!==t.We)return r.Le=je[7],-5;if(0!==t.We||0!==_||0!=i&&n!=Le){switch(R=-1,We[V].Re){case 0:R=(e=>{let n,r=65535;for(r>s-5&&(r=s-5);;){if(1>=_){if(ie(),0===_&&0==e)return 0;if(0===_)break}if(C+=_,_=0,n=k+r,(0===C||C>=n)&&(_=C-n,C=n,se(!1),0===t.tt))return 0;if(C-k>=f-Fe&&(se(!1),0===t.tt))return 0}return se(4==e),0===t.tt?4==e?2:0:4==e?3:1})(i);break;case 1:R=(e=>{let n,r=0;for(;;){if(Fe>_){if(ie(),Fe>_&&0==e)return 0;if(0===_)break}if(3>_||(p=(p<f-Fe||2!=P&&(v=oe(r)),3>v)n=ee(0,255&u[C]),_--,C++;else if(n=ee(C-x,v-3),_-=v,v>D||3>_)C+=v,v=0,p=255&u[C],p=(p<{let n,r,s=0;for(;;){if(Fe>_){if(ie(),Fe>_&&0==e)return 0;if(0===_)break}if(3>_||(p=(p<A&&f-Fe>=(C-s&65535)&&(2!=P&&(v=oe(s)),5>=v&&(1==P||3==v&&C-x>4096)&&(v=2)),3>A||v>A)if(0!==z){if(n=ee(0,255&u[C-1]),n&&se(!1),C++,_--,0===t.tt)return 0}else z=1,C++,_--;else{r=C+_-3,n=ee(C-1-S,A-3),_-=A-1,A-=2;do{++C>r||(p=(p<1+H+10-F&&(X(2,3),Y(256,Ue.Ae),$()),H=7;else if(re(0,0,!1),3==i)for(o=0;y>o;o++)d[o]=0;if(t.Te(),0===t.tt)return c=-1,0}}return 4!=i?0:1}}function Je(){const e=this;e.nt=0,e.rt=0,e.We=0,e.qe=0,e.tt=0,e.Ge=0}function Qe(e){const t=new Je,n=(o=e&&e.chunkSize?e.chunkSize:65536)+5*(r.floor(o/16383)+1);var o;const c=new i(n);let f=e?e.level:-1;void 0===f&&(f=-1),t.He(f),t.$e=c,this.append=(e,r)=>{let o,f,a=0,l=0,u=0;const w=[];if(e.length){t.nt=0,t.et=e,t.We=e.length;do{if(t.rt=0,t.tt=n,o=t.Ye(0),0!=o)throw new s("deflating: "+t.Le);t.rt&&(t.rt==n?w.push(new i(c)):w.push(c.slice(0,t.rt))),u+=t.rt,r&&t.nt>0&&t.nt!=a&&(r(t.nt),a=t.nt)}while(t.We>0||0===t.tt);return w.length>1?(f=new i(u),w.forEach((e=>{f.set(e,l),l+=e.length}))):f=w[0]||new i,f}},this.flush=()=>{let e,r,o=0,f=0;const a=[];do{if(t.rt=0,t.tt=n,e=t.Ye(4),1!=e&&0!=e)throw new s("deflating: "+t.Le);n-t.tt>0&&a.push(c.slice(0,t.rt)),f+=t.rt}while(t.We>0||0===t.tt);return t.Qe(),r=new i(f),a.forEach((e=>{r.set(e,o),o+=e.length})),r}}Je.prototype={He(e,t){const n=this;return n.Fe=new Ge,t||(t=15),n.Fe.He(n,e,t)},Ye(e){const t=this;return t.Fe?t.Fe.Ye(t,e):Re},Qe(){const e=this;if(!e.Fe)return Re;const t=e.Fe.Qe();return e.Fe=null,t},Xe(e,t){const n=this;return n.Fe?n.Fe.Xe(n,e,t):Re},Ze(e,t){const n=this;return n.Fe?n.Fe.Ze(n,e,t):Re},je(e,t,n){const r=this;let s=r.We;return s>n&&(s=n),0===s?0:(r.We-=s,e.set(r.et.subarray(r.nt,r.nt+s),t),r.nt+=s,r.qe+=s,s)},Te(){const e=this;let t=e.Fe.pending;t>e.tt&&(t=e.tt),0!==t&&(e.$e.set(e.Fe.Ue.subarray(e.Fe.Je,e.Fe.Je+t),e.rt),e.rt+=t,e.Fe.Je+=t,e.Ge+=t,e.tt-=t,e.Fe.pending-=t,0===e.Fe.pending&&(e.Fe.Je=0))}};const Xe=-2,Ye=-3,Ze=-5,$e=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],et=[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],tt=[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],nt=[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],rt=[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],st=[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],it=[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 ot(){let e,t,n,r,s,i;function o(e,t,o,c,f,a,l,u,w,h,d){let p,y,m,b,g,k,v,S,z,C,x,_,A,I,D;C=0,g=o;do{n[e[t+C]]++,C++,g--}while(0!==g);if(n[0]==o)return l[0]=-1,u[0]=0,0;for(S=u[0],k=1;15>=k&&0===n[k];k++);for(v=k,k>S&&(S=k),g=15;0!==g&&0===n[g];g--);for(m=g,S>g&&(S=g),u[0]=S,I=1<k;k++,I<<=1)if(0>(I-=n[k]))return Ye;if(0>(I-=n[g]))return Ye;for(n[g]+=I,i[1]=k=0,C=1,A=2;0!=--g;)i[A]=k+=n[C],A++,C++;g=0,C=0;do{0!==(k=e[t+C])&&(d[i[k]++]=g),C++}while(++g=v;v++)for(p=n[v];0!=p--;){for(;v>_+S;){if(b++,_+=S,D=m-_,D=D>S?S:D,(y=1<<(k=v-_))>p+1&&(y-=p+1,A=v,D>k))for(;++kn[++A];)y-=n[A];if(D=1<1440)return Ye;s[b]=x=h[0],h[0]+=D,0!==b?(i[b]=g,r[0]=k,r[1]=S,k=g>>>_-S,r[2]=x-s[b-1]-k,w.set(r,3*(s[b-1]+k))):l[0]=x}for(r[1]=v-_,o>C?d[C]d[C]?0:96,r[2]=d[C++]):(r[0]=a[d[C]-c]+16+64,r[2]=f[d[C++]-c]):r[0]=192,y=1<>>_;D>k;k+=y)w.set(r,3*(x+k));for(k=1<>>=1)g^=k;for(g^=k,z=(1<<_)-1;(g&z)!=i[b];)b--,_-=S,z=(1<<_)-1}return 0!==I&&1!=m?Ze:0}function c(o){let c;for(e||(e=[],t=[],n=new f(16),r=[],s=new f(15),i=new f(16)),t.lengthc;c++)t[c]=0;for(c=0;16>c;c++)n[c]=0;for(c=0;3>c;c++)r[c]=0;s.set(n.subarray(0,15),0),i.set(n.subarray(0,16),0)}this.st=(n,r,s,i,f)=>{let a;return c(19),e[0]=0,a=o(n,0,19,19,null,null,s,r,i,e,t),a==Ye?f.Le="oversubscribed dynamic bit lengths tree":a!=Ze&&0!==r[0]||(f.Le="incomplete dynamic bit lengths tree",a=Ye),a},this.it=(n,r,s,i,f,a,l,u,w)=>{let h;return c(288),e[0]=0,h=o(s,0,n,257,nt,rt,a,i,u,e,t),0!=h||0===i[0]?(h==Ye?w.Le="oversubscribed literal/length tree":-4!=h&&(w.Le="incomplete literal/length tree",h=Ye),h):(c(288),h=o(s,n,r,0,st,it,l,f,u,e,t),0!=h||0===f[0]&&n>257?(h==Ye?w.Le="oversubscribed distance tree":h==Ze?(w.Le="incomplete distance tree",h=Ye):-4!=h&&(w.Le="empty distance tree with lengths",h=Ye),h):0)}}function ct(){const e=this;let t,n,r,s,i=0,o=0,c=0,f=0,a=0,l=0,u=0,w=0,h=0,d=0;function p(e,t,n,r,s,i,o,c){let f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z;d=c.nt,p=c.We,w=o.ot,h=o.ct,y=o.write,m=yh;)p--,w|=(255&c.ft(d++))<>=a[z+1],h-=a[z+1],0!=(16&u)){for(u&=15,k=a[z+2]+(w&$e[u]),w>>=u,h-=u;15>h;)p--,w|=(255&c.ft(d++))<>=a[z+1],h-=a[z+1],0!=(16&u)){for(u&=15;u>h;)p--,w|=(255&c.ft(d++))<>=u,h-=u,m-=k,v>y){S=y-v;do{S+=o.end}while(0>S);if(u=o.end-S,k>u){if(k-=u,y-S>0&&u>y-S)do{o.lt[y++]=o.lt[S++]}while(0!=--u);else o.lt.set(o.lt.subarray(S,S+u),y),y+=u,S+=u,u=0;S=0}}else S=y-v,y-S>0&&2>y-S?(o.lt[y++]=o.lt[S++],o.lt[y++]=o.lt[S++],k-=2):(o.lt.set(o.lt.subarray(S,S+2),y),y+=2,S+=2,k-=2);if(y-S>0&&k>y-S)do{o.lt[y++]=o.lt[S++]}while(0!=--k);else o.lt.set(o.lt.subarray(S,S+k),y),y+=k,S+=k,k=0;break}if(0!=(64&u))return c.Le="invalid distance code",k=c.We-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ot=w,o.ct=h,c.We=p,c.qe+=d-c.nt,c.nt=d,o.write=y,Ye;f+=a[z+2],f+=w&$e[u],z=3*(l+f),u=a[z]}break}if(0!=(64&u))return 0!=(32&u)?(k=c.We-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ot=w,o.ct=h,c.We=p,c.qe+=d-c.nt,c.nt=d,o.write=y,1):(c.Le="invalid literal/length code",k=c.We-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ot=w,o.ct=h,c.We=p,c.qe+=d-c.nt,c.nt=d,o.write=y,Ye);if(f+=a[z+2],f+=w&$e[u],z=3*(l+f),0===(u=a[z])){w>>=a[z+1],h-=a[z+1],o.lt[y++]=a[z+2],m--;break}}else w>>=a[z+1],h-=a[z+1],o.lt[y++]=a[z+2],m--}while(m>=258&&p>=10);return k=c.We-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ot=w,o.ct=h,c.We=p,c.qe+=d-c.nt,c.nt=d,o.write=y,0}e.init=(e,i,o,c,f,a)=>{t=0,u=e,w=i,r=o,h=c,s=f,d=a,n=null},e.ut=(e,y,m)=>{let b,g,k,v,S,z,C,x=0,_=0,A=0;for(A=y.nt,v=y.We,x=e.ot,_=e.ct,S=e.write,z=S=258&&v>=10&&(e.ot=x,e.ct=_,y.We=v,y.qe+=A-y.nt,y.nt=A,e.write=S,m=p(u,w,r,h,s,d,e,y),A=y.nt,v=y.We,x=e.ot,_=e.ct,S=e.write,z=S_;){if(0===v)return e.ot=x,e.ct=_,y.We=v,y.qe+=A-y.nt,y.nt=A,e.write=S,e.wt(y,m);m=0,v--,x|=(255&y.ft(A++))<<_,_+=8}if(g=3*(o+(x&$e[b])),x>>>=n[g+1],_-=n[g+1],k=n[g],0===k){f=n[g+2],t=6;break}if(0!=(16&k)){a=15&k,i=n[g+2],t=2;break}if(0==(64&k)){c=k,o=g/3+n[g+2];break}if(0!=(32&k)){t=7;break}return t=9,y.Le="invalid literal/length code",m=Ye,e.ot=x,e.ct=_,y.We=v,y.qe+=A-y.nt,y.nt=A,e.write=S,e.wt(y,m);case 2:for(b=a;b>_;){if(0===v)return e.ot=x,e.ct=_,y.We=v,y.qe+=A-y.nt,y.nt=A,e.write=S,e.wt(y,m);m=0,v--,x|=(255&y.ft(A++))<<_,_+=8}i+=x&$e[b],x>>=b,_-=b,c=w,n=s,o=d,t=3;case 3:for(b=c;b>_;){if(0===v)return e.ot=x,e.ct=_,y.We=v,y.qe+=A-y.nt,y.nt=A,e.write=S,e.wt(y,m);m=0,v--,x|=(255&y.ft(A++))<<_,_+=8}if(g=3*(o+(x&$e[b])),x>>=n[g+1],_-=n[g+1],k=n[g],0!=(16&k)){a=15&k,l=n[g+2],t=4;break}if(0==(64&k)){c=k,o=g/3+n[g+2];break}return t=9,y.Le="invalid distance code",m=Ye,e.ot=x,e.ct=_,y.We=v,y.qe+=A-y.nt,y.nt=A,e.write=S,e.wt(y,m);case 4:for(b=a;b>_;){if(0===v)return e.ot=x,e.ct=_,y.We=v,y.qe+=A-y.nt,y.nt=A,e.write=S,e.wt(y,m);m=0,v--,x|=(255&y.ft(A++))<<_,_+=8}l+=x&$e[b],x>>=b,_-=b,t=5;case 5:for(C=S-l;0>C;)C+=e.end;for(;0!==i;){if(0===z&&(S==e.end&&0!==e.read&&(S=0,z=S7&&(_-=8,v++,A--),e.write=S,m=e.wt(y,m),S=e.write,z=S{}}ot.dt=(e,t,n,r)=>(e[0]=9,t[0]=5,n[0]=et,r[0]=tt,0);const ft=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function at(e,t){const n=this;let r,s=0,o=0,c=0,a=0;const l=[0],u=[0],w=new ct;let h=0,d=new f(4320);const p=new ot;n.ct=0,n.ot=0,n.lt=new i(t),n.end=t,n.read=0,n.write=0,n.reset=(e,t)=>{t&&(t[0]=0),6==s&&w.ht(e),s=0,n.ct=0,n.ot=0,n.read=n.write=0},n.reset(e,null),n.wt=(e,t)=>{let r,s,i;return s=e.rt,i=n.read,r=(i>n.write?n.end:n.write)-i,r>e.tt&&(r=e.tt),0!==r&&t==Ze&&(t=0),e.tt-=r,e.Ge+=r,e.$e.set(n.lt.subarray(i,i+r),s),s+=r,i+=r,i==n.end&&(i=0,n.write==n.end&&(n.write=0),r=n.write-i,r>e.tt&&(r=e.tt),0!==r&&t==Ze&&(t=0),e.tt-=r,e.Ge+=r,e.$e.set(n.lt.subarray(i,i+r),s),s+=r,i+=r),e.rt=s,n.read=i,t},n.ut=(e,t)=>{let i,f,y,m,b,g,k,v;for(m=e.nt,b=e.We,f=n.ot,y=n.ct,g=n.write,k=gy;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<>>1){case 0:f>>>=3,y-=3,i=7&y,f>>>=i,y-=i,s=1;break;case 1:S=[],z=[],C=[[]],x=[[]],ot.dt(S,z,C,x),w.init(S[0],z[0],C[0],0,x[0],0),f>>>=3,y-=3,s=6;break;case 2:f>>>=3,y-=3,s=3;break;case 3:return f>>>=3,y-=3,s=9,e.Le="invalid block type",t=Ye,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t)}break;case 1:for(;32>y;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<>>16&65535)!=(65535&f))return s=9,e.Le="invalid stored block lengths",t=Ye,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);o=65535&f,f=y=0,s=0!==o?2:0!==h?7:0;break;case 2:if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);if(0===k&&(g==n.end&&0!==n.read&&(g=0,k=gb&&(i=b),i>k&&(i=k),n.lt.set(e.je(m,i),g),m+=i,b-=i,g+=i,k-=i,0!=(o-=i))break;s=0!==h?7:0;break;case 3:for(;14>y;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<29||(i>>5&31)>29)return s=9,e.Le="too many length or distance symbols",t=Ye,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);if(i=258+(31&i)+(i>>5&31),!r||r.lengthv;v++)r[v]=0;f>>>=14,y-=14,a=0,s=4;case 4:for(;4+(c>>>10)>a;){for(;3>y;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<>>=3,y-=3}for(;19>a;)r[ft[a++]]=0;if(l[0]=7,i=p.st(r,l,u,d,e),0!=i)return(t=i)==Ye&&(r=null,s=9),n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);a=0,s=5;case 5:for(;i=c,258+(31&i)+(i>>5&31)>a;){let o,w;for(i=l[0];i>y;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<w)f>>>=i,y-=i,r[a++]=w;else{for(v=18==w?7:w-14,o=18==w?11:3;i+v>y;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<>>=i,y-=i,o+=f&$e[v],f>>>=v,y-=v,v=a,i=c,v+o>258+(31&i)+(i>>5&31)||16==w&&1>v)return r=null,s=9,e.Le="invalid bit length repeat",t=Ye,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);w=16==w?r[v-1]:0;do{r[v++]=w}while(0!=--o);a=v}}if(u[0]=-1,_=[],A=[],I=[],D=[],_[0]=9,A[0]=6,i=c,i=p.it(257+(31&i),1+(i>>5&31),r,_,A,I,D,d,e),0!=i)return i==Ye&&(r=null,s=9),t=i,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);w.init(_[0],A[0],d,I[0],d,D[0]),s=6;case 6:if(n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,1!=(t=w.ut(n,e,t)))return n.wt(e,t);if(t=0,w.ht(e),m=e.nt,b=e.We,f=n.ot,y=n.ct,g=n.write,k=g{n.reset(e,null),n.lt=null,d=null},n.yt=(e,t,r)=>{n.lt.set(e.subarray(t,t+r),0),n.read=n.write=r},n.bt=()=>1==s?1:0}const lt=13,ut=[0,0,255,255];function wt(){const e=this;function t(e){return e&&e.gt?(e.qe=e.Ge=0,e.Le=null,e.gt.mode=7,e.gt.kt.reset(e,null),0):Xe}e.mode=0,e.method=0,e.vt=[0],e.St=0,e.marker=0,e.zt=0,e.Ct=t=>(e.kt&&e.kt.ht(t),e.kt=null,0),e.xt=(n,r)=>(n.Le=null,e.kt=null,8>r||r>15?(e.Ct(n),Xe):(e.zt=r,n.gt.kt=new at(n,1<{let n,r;if(!e||!e.gt||!e.et)return Xe;const s=e.gt;for(t=4==t?Ze:0,n=Ze;;)switch(s.mode){case 0:if(0===e.We)return n;if(n=t,e.We--,e.qe++,8!=(15&(s.method=e.ft(e.nt++)))){s.mode=lt,e.Le="unknown compression method",s.marker=5;break}if(8+(s.method>>4)>s.zt){s.mode=lt,e.Le="invalid win size",s.marker=5;break}s.mode=1;case 1:if(0===e.We)return n;if(n=t,e.We--,e.qe++,r=255&e.ft(e.nt++),((s.method<<8)+r)%31!=0){s.mode=lt,e.Le="incorrect header check",s.marker=5;break}if(0==(32&r)){s.mode=7;break}s.mode=2;case 2:if(0===e.We)return n;n=t,e.We--,e.qe++,s.St=(255&e.ft(e.nt++))<<24&4278190080,s.mode=3;case 3:if(0===e.We)return n;n=t,e.We--,e.qe++,s.St+=(255&e.ft(e.nt++))<<16&16711680,s.mode=4;case 4:if(0===e.We)return n;n=t,e.We--,e.qe++,s.St+=(255&e.ft(e.nt++))<<8&65280,s.mode=5;case 5:return 0===e.We?n:(n=t,e.We--,e.qe++,s.St+=255&e.ft(e.nt++),s.mode=6,2);case 6:return s.mode=lt,e.Le="need dictionary",s.marker=0,Xe;case 7:if(n=s.kt.ut(e,n),n==Ye){s.mode=lt,s.marker=0;break}if(0==n&&(n=t),1!=n)return n;n=t,s.kt.reset(e,s.vt),s.mode=12;case 12:return e.We=0,1;case lt:return Ye;default:return Xe}},e.At=(e,t,n)=>{let r=0,s=n;if(!e||!e.gt||6!=e.gt.mode)return Xe;const i=e.gt;return s<1<{let n,r,s,i,o;if(!e||!e.gt)return Xe;const c=e.gt;if(c.mode!=lt&&(c.mode=lt,c.marker=0),0===(n=e.We))return Ze;for(r=e.nt,s=c.marker;0!==n&&4>s;)e.ft(r)==ut[s]?s++:s=0!==e.ft(r)?0:4-s,r++,n--;return e.qe+=r-e.nt,e.nt=r,e.We=n,c.marker=s,4!=s?Ye:(i=e.qe,o=e.Ge,t(e),e.qe=i,e.Ge=o,c.mode=7,0)},e.Dt=e=>e&&e.gt&&e.gt.kt?e.gt.kt.bt():Xe}function ht(){}function dt(e){const t=new ht,n=e&&e.chunkSize?r.floor(2*e.chunkSize):131072,o=new i(n);let c=!1;t.xt(),t.$e=o,this.append=(e,r)=>{const f=[];let a,l,u=0,w=0,h=0;if(0!==e.length){t.nt=0,t.et=e,t.We=e.length;do{if(t.rt=0,t.tt=n,0!==t.We||c||(t.nt=0,c=!0),a=t._t(0),c&&a===Ze){if(0!==t.We)throw new s("inflating: bad input")}else if(0!==a&&1!==a)throw new s("inflating: "+t.Le);if((c||1===a)&&t.We===e.length)throw new s("inflating: bad input");t.rt&&(t.rt===n?f.push(new i(o)):f.push(o.slice(0,t.rt))),h+=t.rt,r&&t.nt>0&&t.nt!=u&&(r(t.nt),u=t.nt)}while(t.We>0||0===t.tt);return f.length>1?(l=new i(h),f.forEach((e=>{l.set(e,w),w+=e.length}))):l=f[0]||new i,l}},this.flush=()=>{t.Ct()}}ht.prototype={xt(e){const t=this;return t.gt=new wt,e||(e=15),t.gt.xt(t,e)},_t(e){const t=this;return t.gt?t.gt._t(t,e):Xe},Ct(){const e=this;if(!e.gt)return Xe;const t=e.gt.Ct(e);return e.gt=null,t},It(){const e=this;return e.gt?e.gt.It(e):Xe},At(e,t){const n=this;return n.gt?n.gt.At(n,e,t):Xe},ft(e){return this.et[e]},je(e,t){return this.et.subarray(e,e+t)}},self.initCodec=()=>{self.Deflate=Qe,self.Inflate=dt};\n'],{type:"text/javascript"}));e({workerScripts:{inflate:[t],deflate:[t]}});} - -/* - Copyright (c) 2022 Gildas Lormeau. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the distribution. - - 3. The names of the authors may not be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT, - INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, - INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, - OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -const ERR_ITERATOR_COMPLETED_TOO_SOON = "Writer iterator completed too soon"; -const HTTP_HEADER_CONTENT_TYPE = "Content-Type"; -const DEFAULT_CHUNK_SIZE = 64 * 1024; - -const PROPERTY_NAME_WRITABLE = "writable"; - -class Stream { - - constructor() { - this.size = 0; - } - - init() { - this.initialized = true; - } -} - -class Reader extends Stream { - - get readable() { - const reader = this; - const { chunkSize = DEFAULT_CHUNK_SIZE } = reader; - const readable = new ReadableStream({ - start() { - this.chunkOffset = 0; - }, - async pull(controller) { - const { offset = 0, size, diskNumberStart } = readable; - const { chunkOffset } = this; - controller.enqueue(await readUint8Array(reader, offset + chunkOffset, Math.min(chunkSize, size - chunkOffset), diskNumberStart)); - if (chunkOffset + chunkSize > size) { - controller.close(); - } else { - this.chunkOffset += chunkSize; - } - } - }); - return readable; - } -} - -class BlobReader extends Reader { - - constructor(blob) { - super(); - Object.assign(this, { - blob, - size: blob.size - }); - } - - async readUint8Array(offset, length) { - const reader = this; - const offsetEnd = offset + length; - const blob = offset || offsetEnd < reader.size ? reader.blob.slice(offset, offsetEnd) : reader.blob; - return new Uint8Array(await blob.arrayBuffer()); - } -} - -class BlobWriter extends Stream { - - constructor(contentType) { - super(); - const writer = this; - const transformStream = new TransformStream(); - const headers = []; - if (contentType) { - headers.push([HTTP_HEADER_CONTENT_TYPE, contentType]); - } - Object.defineProperty(writer, PROPERTY_NAME_WRITABLE, { - get() { - return transformStream.writable; - } - }); - writer.blob = new Response(transformStream.readable, { headers }).blob(); - } - - getData() { - return this.blob; - } -} - -class TextWriter extends BlobWriter { - - constructor(encoding) { - super(encoding); - Object.assign(this, { - encoding, - utf8: !encoding || encoding.toLowerCase() == "utf-8" - }); - } - - async getData() { - const { - encoding, - utf8 - } = this; - const blob = await super.getData(); - if (blob.text && utf8) { - return blob.text(); - } else { - const reader = new FileReader(); - return new Promise((resolve, reject) => { - Object.assign(reader, { - onload: ({ target }) => resolve(target.result), - onerror: () => reject(reader.error) - }); - reader.readAsText(blob, encoding); - }); - } - } -} - -class SplitDataReader extends Reader { - - constructor(readers) { - super(); - this.readers = readers; - } - - async init() { - const reader = this; - const { readers } = reader; - reader.lastDiskNumber = 0; - await Promise.all(readers.map(async diskReader => { - await diskReader.init(); - reader.size += diskReader.size; - })); - super.init(); - } - - async readUint8Array(offset, length, diskNumber = 0) { - const reader = this; - const { readers } = this; - let result; - let currentDiskNumber = diskNumber; - if (currentDiskNumber == -1) { - currentDiskNumber = readers.length - 1; - } - let currentReaderOffset = offset; - while (currentReaderOffset >= readers[currentDiskNumber].size) { - currentReaderOffset -= readers[currentDiskNumber].size; - currentDiskNumber++; - } - const currentReader = readers[currentDiskNumber]; - const currentReaderSize = currentReader.size; - if (currentReaderOffset + length <= currentReaderSize) { - result = await readUint8Array(currentReader, currentReaderOffset, length); - } else { - const chunkLength = currentReaderSize - currentReaderOffset; - result = new Uint8Array(length); - result.set(await readUint8Array(currentReader, currentReaderOffset, chunkLength)); - result.set(await reader.readUint8Array(offset + chunkLength, length - chunkLength, diskNumber), chunkLength); - } - reader.lastDiskNumber = Math.max(currentDiskNumber, reader.lastDiskNumber); - return result; - } -} - -class SplitDataWriter extends Stream { - - constructor(writerGenerator, maxSize = 4294967295) { - super(); - const zipWriter = this; - Object.assign(zipWriter, { - diskNumber: 0, - diskOffset: 0, - size: 0, - maxSize, - availableSize: maxSize - }); - let diskSourceWriter, diskWritable, diskWriter; - const writable = new WritableStream({ - async write(chunk) { - const { availableSize } = zipWriter; - if (!diskWriter) { - const { value, done } = await writerGenerator.next(); - if (done && !value) { - throw new Error(ERR_ITERATOR_COMPLETED_TOO_SOON); - } else { - diskSourceWriter = value; - diskSourceWriter.size = 0; - if (diskSourceWriter.maxSize) { - zipWriter.maxSize = diskSourceWriter.maxSize; - } - zipWriter.availableSize = zipWriter.maxSize; - await initStream(diskSourceWriter); - diskWritable = value.writable; - diskWriter = diskWritable.getWriter(); - } - await this.write(chunk); - } else if (chunk.length >= availableSize) { - await writeChunk(chunk.slice(0, availableSize)); - await closeDisk(); - zipWriter.diskOffset += diskSourceWriter.size; - zipWriter.diskNumber++; - diskWriter = null; - await this.write(chunk.slice(availableSize)); - } else { - await writeChunk(chunk); - } - }, - async close() { - await diskWriter.ready; - await closeDisk(); - } - }); - Object.defineProperty(zipWriter, PROPERTY_NAME_WRITABLE, { - get() { - return writable; - } - }); - - async function writeChunk(chunk) { - const chunkLength = chunk.length; - if (chunkLength) { - await diskWriter.ready; - await diskWriter.write(chunk); - diskSourceWriter.size += chunkLength; - zipWriter.size += chunkLength; - zipWriter.availableSize -= chunkLength; - } - } - - async function closeDisk() { - diskWritable.size = diskSourceWriter.size; - await diskWriter.close(); - } - } -} - -async function initStream(stream, initSize) { - if (stream.init && !stream.initialized) { - await stream.init(initSize); - } -} - -function initReader(reader) { - if (Array.isArray(reader)) { - reader = new SplitDataReader(reader); - } - if (reader instanceof ReadableStream) { - reader = { - readable: reader - }; - } - return reader; -} - -function initWriter(writer) { - if (writer.writable === UNDEFINED_VALUE && typeof writer.next == FUNCTION_TYPE$1) { - writer = new SplitDataWriter(writer); - } - if (writer instanceof WritableStream) { - writer = { - writable: writer - }; - } - const { writable } = writer; - if (writable.size === UNDEFINED_VALUE) { - writable.size = 0; - } - const splitZipFile = writer instanceof SplitDataWriter; - if (!splitZipFile) { - Object.assign(writer, { - diskNumber: 0, - diskOffset: 0, - availableSize: Infinity, - maxSize: Infinity - }); - } - return writer; -} - -function readUint8Array(reader, offset, size, diskNumber) { - return reader.readUint8Array(offset, size, diskNumber); -} - -/* - Copyright (c) 2022 Gildas Lormeau. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the distribution. - - 3. The names of the authors may not be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT, - INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, - INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, - OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* global TextDecoder */ - -const CP437 = "\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ ".split(""); -const VALID_CP437 = CP437.length == 256; - -function decodeCP437(stringValue) { - if (VALID_CP437) { - let result = ""; - for (let indexCharacter = 0; indexCharacter < stringValue.length; indexCharacter++) { - result += CP437[stringValue[indexCharacter]]; - } - return result; - } else { - return new TextDecoder().decode(stringValue); - } -} - -/* - Copyright (c) 2022 Gildas Lormeau. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the distribution. - - 3. The names of the authors may not be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT, - INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, - INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, - OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -function decodeText(value, encoding) { - if (encoding && encoding.trim().toLowerCase() == "cp437") { - return decodeCP437(value); - } else { - return new TextDecoder(encoding).decode(value); - } -} - -/* - Copyright (c) 2022 Gildas Lormeau. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the distribution. - - 3. The names of the authors may not be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT, - INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, - INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, - OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -const PROPERTY_NAME_FILENAME = "filename"; -const PROPERTY_NAME_RAW_FILENAME = "rawFilename"; -const PROPERTY_NAME_COMMENT = "comment"; -const PROPERTY_NAME_RAW_COMMENT = "rawComment"; -const PROPERTY_NAME_UNCOMPPRESSED_SIZE = "uncompressedSize"; -const PROPERTY_NAME_COMPPRESSED_SIZE = "compressedSize"; -const PROPERTY_NAME_OFFSET = "offset"; -const PROPERTY_NAME_DISK_NUMBER_START = "diskNumberStart"; -const PROPERTY_NAME_LAST_MODIFICATION_DATE = "lastModDate"; -const PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE = "rawLastModDate"; -const PROPERTY_NAME_LAST_ACCESS_DATE = "lastAccessDate"; -const PROPERTY_NAME_RAW_LAST_ACCESS_DATE = "rawLastAccessDate"; -const PROPERTY_NAME_CREATION_DATE = "creationDate"; -const PROPERTY_NAME_RAW_CREATION_DATE = "rawCreationDate"; -const PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE = "internalFileAttribute"; -const PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE = "externalFileAttribute"; -const PROPERTY_NAME_MS_DOS_COMPATIBLE = "msDosCompatible"; -const PROPERTY_NAME_ZIP64 = "zip64"; - -const PROPERTY_NAMES = [ - PROPERTY_NAME_FILENAME, PROPERTY_NAME_RAW_FILENAME, PROPERTY_NAME_COMPPRESSED_SIZE, PROPERTY_NAME_UNCOMPPRESSED_SIZE, - PROPERTY_NAME_LAST_MODIFICATION_DATE, PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE, PROPERTY_NAME_COMMENT, PROPERTY_NAME_RAW_COMMENT, - PROPERTY_NAME_LAST_ACCESS_DATE, PROPERTY_NAME_CREATION_DATE, PROPERTY_NAME_OFFSET, PROPERTY_NAME_DISK_NUMBER_START, - PROPERTY_NAME_DISK_NUMBER_START, PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE, PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE, - PROPERTY_NAME_MS_DOS_COMPATIBLE, PROPERTY_NAME_ZIP64, - "directory", "bitFlag", "encrypted", "signature", "filenameUTF8", "commentUTF8", "compressionMethod", "version", "versionMadeBy", - "extraField", "rawExtraField", "extraFieldZip64", "extraFieldUnicodePath", "extraFieldUnicodeComment", "extraFieldAES", "extraFieldNTFS", - "extraFieldExtendedTimestamp"]; - -class Entry { - - constructor(data) { - PROPERTY_NAMES.forEach(name => this[name] = data[name]); - } - -} - -/* - Copyright (c) 2022 Gildas Lormeau. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the distribution. - - 3. The names of the authors may not be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT, - INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, - INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, - OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -const ERR_BAD_FORMAT = "File format is not recognized"; -const ERR_EOCDR_NOT_FOUND = "End of central directory not found"; -const ERR_EOCDR_ZIP64_NOT_FOUND = "End of Zip64 central directory not found"; -const ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND = "End of Zip64 central directory locator not found"; -const ERR_CENTRAL_DIRECTORY_NOT_FOUND = "Central directory header not found"; -const ERR_LOCAL_FILE_HEADER_NOT_FOUND = "Local file header not found"; -const ERR_EXTRAFIELD_ZIP64_NOT_FOUND = "Zip64 extra field not found"; -const ERR_ENCRYPTED = "File contains encrypted entry"; -const ERR_UNSUPPORTED_ENCRYPTION = "Encryption method not supported"; -const ERR_UNSUPPORTED_COMPRESSION = "Compression method not supported"; -const ERR_SPLIT_ZIP_FILE = "Split zip file"; -const CHARSET_UTF8 = "utf-8"; -const CHARSET_CP437 = "cp437"; -const ZIP64_PROPERTIES = [ - [PROPERTY_NAME_UNCOMPPRESSED_SIZE, MAX_32_BITS], - [PROPERTY_NAME_COMPPRESSED_SIZE, MAX_32_BITS], - [PROPERTY_NAME_OFFSET, MAX_32_BITS], - [PROPERTY_NAME_DISK_NUMBER_START, MAX_16_BITS] -]; -const ZIP64_EXTRACTION = { - [MAX_16_BITS]: { - getValue: getUint32, - bytes: 4 - }, - [MAX_32_BITS]: { - getValue: getBigUint64, - bytes: 8 - } -}; - -class ZipReader { - - constructor(reader, options = {}) { - Object.assign(this, { - reader: initReader(reader), - options, - config: getConfiguration() - }); - } - - async* getEntriesGenerator(options = {}) { - const zipReader = this; - let { reader } = zipReader; - const { config } = zipReader; - await initStream(reader); - if (reader.size === UNDEFINED_VALUE || !reader.readUint8Array) { - reader = new BlobReader(await new Response(reader.readable).blob()); - await initStream(reader); - } - if (reader.size < END_OF_CENTRAL_DIR_LENGTH) { - throw new Error(ERR_BAD_FORMAT); - } - reader.chunkSize = getChunkSize(config); - const endOfDirectoryInfo = await seekSignature(reader, END_OF_CENTRAL_DIR_SIGNATURE, reader.size, END_OF_CENTRAL_DIR_LENGTH, MAX_16_BITS * 16); - if (!endOfDirectoryInfo) { - const signatureArray = await readUint8Array(reader, 0, 4); - const signatureView = getDataView(signatureArray); - if (getUint32(signatureView) == SPLIT_ZIP_FILE_SIGNATURE) { - throw new Error(ERR_SPLIT_ZIP_FILE); - } else { - throw new Error(ERR_EOCDR_NOT_FOUND); - } - } - const endOfDirectoryView = getDataView(endOfDirectoryInfo); - let directoryDataLength = getUint32(endOfDirectoryView, 12); - let directoryDataOffset = getUint32(endOfDirectoryView, 16); - const commentOffset = endOfDirectoryInfo.offset; - const commentLength = getUint16(endOfDirectoryView, 20); - const appendedDataOffset = commentOffset + END_OF_CENTRAL_DIR_LENGTH + commentLength; - let lastDiskNumber = getUint16(endOfDirectoryView, 4); - const expectedLastDiskNumber = reader.lastDiskNumber || 0; - let diskNumber = getUint16(endOfDirectoryView, 6); - let filesLength = getUint16(endOfDirectoryView, 8); - let prependedDataLength = 0; - let startOffset = 0; - if (directoryDataOffset == MAX_32_BITS || directoryDataLength == MAX_32_BITS || filesLength == MAX_16_BITS || diskNumber == MAX_16_BITS) { - const endOfDirectoryLocatorArray = await readUint8Array(reader, endOfDirectoryInfo.offset - ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH, ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH); - const endOfDirectoryLocatorView = getDataView(endOfDirectoryLocatorArray); - if (getUint32(endOfDirectoryLocatorView, 0) != ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE) { - throw new Error(ERR_EOCDR_ZIP64_NOT_FOUND); - } - directoryDataOffset = getBigUint64(endOfDirectoryLocatorView, 8); - let endOfDirectoryArray = await readUint8Array(reader, directoryDataOffset, ZIP64_END_OF_CENTRAL_DIR_LENGTH, -1); - let endOfDirectoryView = getDataView(endOfDirectoryArray); - const expectedDirectoryDataOffset = endOfDirectoryInfo.offset - ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH - ZIP64_END_OF_CENTRAL_DIR_LENGTH; - if (getUint32(endOfDirectoryView, 0) != ZIP64_END_OF_CENTRAL_DIR_SIGNATURE && directoryDataOffset != expectedDirectoryDataOffset) { - const originalDirectoryDataOffset = directoryDataOffset; - directoryDataOffset = expectedDirectoryDataOffset; - prependedDataLength = directoryDataOffset - originalDirectoryDataOffset; - endOfDirectoryArray = await readUint8Array(reader, directoryDataOffset, ZIP64_END_OF_CENTRAL_DIR_LENGTH, -1); - endOfDirectoryView = getDataView(endOfDirectoryArray); - } - if (getUint32(endOfDirectoryView, 0) != ZIP64_END_OF_CENTRAL_DIR_SIGNATURE) { - throw new Error(ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND); - } - if (lastDiskNumber == MAX_16_BITS) { - lastDiskNumber = getUint32(endOfDirectoryView, 16); - } - if (diskNumber == MAX_16_BITS) { - diskNumber = getUint32(endOfDirectoryView, 20); - } - if (filesLength == MAX_16_BITS) { - filesLength = getBigUint64(endOfDirectoryView, 32); - } - if (directoryDataLength == MAX_32_BITS) { - directoryDataLength = getBigUint64(endOfDirectoryView, 40); - } - directoryDataOffset -= directoryDataLength; - } - if (expectedLastDiskNumber != lastDiskNumber) { - throw new Error(ERR_SPLIT_ZIP_FILE); - } - if (directoryDataOffset < 0 || directoryDataOffset >= reader.size) { - throw new Error(ERR_BAD_FORMAT); - } - let offset = 0; - let directoryArray = await readUint8Array(reader, directoryDataOffset, directoryDataLength, diskNumber); - let directoryView = getDataView(directoryArray); - if (directoryDataLength) { - const expectedDirectoryDataOffset = endOfDirectoryInfo.offset - directoryDataLength; - if (getUint32(directoryView, offset) != CENTRAL_FILE_HEADER_SIGNATURE && directoryDataOffset != expectedDirectoryDataOffset) { - const originalDirectoryDataOffset = directoryDataOffset; - directoryDataOffset = expectedDirectoryDataOffset; - prependedDataLength = directoryDataOffset - originalDirectoryDataOffset; - directoryArray = await readUint8Array(reader, directoryDataOffset, directoryDataLength, diskNumber); - directoryView = getDataView(directoryArray); - } - } - if (directoryDataOffset < 0 || directoryDataOffset >= reader.size) { - throw new Error(ERR_BAD_FORMAT); - } - const filenameEncoding = getOptionValue(zipReader, options, "filenameEncoding"); - const commentEncoding = getOptionValue(zipReader, options, "commentEncoding"); - for (let indexFile = 0; indexFile < filesLength; indexFile++) { - const fileEntry = new ZipEntry(reader, config, zipReader.options); - if (getUint32(directoryView, offset) != CENTRAL_FILE_HEADER_SIGNATURE) { - throw new Error(ERR_CENTRAL_DIRECTORY_NOT_FOUND); - } - readCommonHeader(fileEntry, directoryView, offset + 6); - const languageEncodingFlag = Boolean(fileEntry.bitFlag.languageEncodingFlag); - const filenameOffset = offset + 46; - const extraFieldOffset = filenameOffset + fileEntry.filenameLength; - const commentOffset = extraFieldOffset + fileEntry.extraFieldLength; - const versionMadeBy = getUint16(directoryView, offset + 4); - const msDosCompatible = (versionMadeBy & 0) == 0; - const rawFilename = directoryArray.subarray(filenameOffset, extraFieldOffset); - const commentLength = getUint16(directoryView, offset + 32); - const endOffset = commentOffset + commentLength; - const rawComment = directoryArray.subarray(commentOffset, endOffset); - const filenameUTF8 = languageEncodingFlag; - const commentUTF8 = languageEncodingFlag; - const directory = msDosCompatible && ((getUint8(directoryView, offset + 38) & FILE_ATTR_MSDOS_DIR_MASK) == FILE_ATTR_MSDOS_DIR_MASK); - const offsetFileEntry = getUint32(directoryView, offset + 42) + prependedDataLength; - Object.assign(fileEntry, { - versionMadeBy, - msDosCompatible, - compressedSize: 0, - uncompressedSize: 0, - commentLength, - directory, - offset: offsetFileEntry, - diskNumberStart: getUint16(directoryView, offset + 34), - internalFileAttribute: getUint16(directoryView, offset + 36), - externalFileAttribute: getUint32(directoryView, offset + 38), - rawFilename, - filenameUTF8, - commentUTF8, - rawExtraField: directoryArray.subarray(extraFieldOffset, commentOffset) - }); - const [filename, comment] = await Promise.all([ - decodeText(rawFilename, filenameUTF8 ? CHARSET_UTF8 : filenameEncoding || CHARSET_CP437), - decodeText(rawComment, commentUTF8 ? CHARSET_UTF8 : commentEncoding || CHARSET_CP437) - ]); - Object.assign(fileEntry, { - rawComment, - filename, - comment, - directory: directory || filename.endsWith(DIRECTORY_SIGNATURE) - }); - startOffset = Math.max(offsetFileEntry, startOffset); - await readCommonFooter(fileEntry, fileEntry, directoryView, offset + 6); - const entry = new Entry(fileEntry); - entry.getData = (writer, options) => fileEntry.getData(writer, entry, options); - offset = endOffset; - const { onprogress } = options; - if (onprogress) { - try { - await onprogress(indexFile + 1, filesLength, new Entry(fileEntry)); - } catch (_error) { - // ignored - } - } - yield entry; - } - const extractPrependedData = getOptionValue(zipReader, options, "extractPrependedData"); - const extractAppendedData = getOptionValue(zipReader, options, "extractAppendedData"); - if (extractPrependedData) { - zipReader.prependedData = startOffset > 0 ? await readUint8Array(reader, 0, startOffset) : new Uint8Array(); - } - zipReader.comment = commentLength ? await readUint8Array(reader, commentOffset + END_OF_CENTRAL_DIR_LENGTH, commentLength) : new Uint8Array(); - if (extractAppendedData) { - zipReader.appendedData = appendedDataOffset < reader.size ? await readUint8Array(reader, appendedDataOffset, reader.size - appendedDataOffset) : new Uint8Array(); - } - return true; - } - - async getEntries(options = {}) { - const entries = []; - for await (const entry of this.getEntriesGenerator(options)) { - entries.push(entry); - } - return entries; - } - - async close() { - } -} - -class ZipEntry { - - constructor(reader, config, options) { - Object.assign(this, { - reader, - config, - options - }); - } - - async getData(writer, fileEntry, options = {}) { - const zipEntry = this; - const { - reader, - offset, - diskNumberStart, - extraFieldAES, - compressionMethod, - config, - bitFlag, - signature, - rawLastModDate, - uncompressedSize, - compressedSize - } = zipEntry; - const localDirectory = zipEntry.localDirectory = {}; - const dataArray = await readUint8Array(reader, offset, 30, diskNumberStart); - const dataView = getDataView(dataArray); - let password = getOptionValue(zipEntry, options, "password"); - password = password && password.length && password; - if (extraFieldAES) { - if (extraFieldAES.originalCompressionMethod != COMPRESSION_METHOD_AES) { - throw new Error(ERR_UNSUPPORTED_COMPRESSION); - } - } - if (compressionMethod != COMPRESSION_METHOD_STORE && compressionMethod != COMPRESSION_METHOD_DEFLATE) { - throw new Error(ERR_UNSUPPORTED_COMPRESSION); - } - if (getUint32(dataView, 0) != LOCAL_FILE_HEADER_SIGNATURE) { - throw new Error(ERR_LOCAL_FILE_HEADER_NOT_FOUND); - } - readCommonHeader(localDirectory, dataView, 4); - localDirectory.rawExtraField = localDirectory.extraFieldLength ? - await readUint8Array(reader, offset + 30 + localDirectory.filenameLength, localDirectory.extraFieldLength, diskNumberStart) : - new Uint8Array(); - await readCommonFooter(zipEntry, localDirectory, dataView, 4); - Object.assign(fileEntry, { - lastAccessDate: localDirectory.lastAccessDate, - creationDate: localDirectory.creationDate - }); - const encrypted = zipEntry.encrypted && localDirectory.encrypted; - const zipCrypto = encrypted && !extraFieldAES; - if (encrypted) { - if (!zipCrypto && extraFieldAES.strength === UNDEFINED_VALUE) { - throw new Error(ERR_UNSUPPORTED_ENCRYPTION); - } else if (!password) { - throw new Error(ERR_ENCRYPTED); - } - } - const dataOffset = offset + 30 + localDirectory.filenameLength + localDirectory.extraFieldLength; - const readable = reader.readable; - readable.diskNumberStart = diskNumberStart; - readable.offset = dataOffset; - let size = readable.size = compressedSize; - const signal = getOptionValue(zipEntry, options, "signal"); - const checkPasswordOnly = getOptionValue(zipEntry, options, "checkPasswordOnly"); - if (checkPasswordOnly) { - writer = new WritableStream(); - } - writer = initWriter(writer); - await initStream(writer, uncompressedSize); - const { writable } = writer; - const { onstart, onprogress, onend } = options; - const workerOptions = { - options: { - codecType: CODEC_INFLATE, - password, - zipCrypto, - encryptionStrength: extraFieldAES && extraFieldAES.strength, - signed: getOptionValue(zipEntry, options, "checkSignature"), - passwordVerification: zipCrypto && (bitFlag.dataDescriptor ? ((rawLastModDate >>> 8) & 0xFF) : ((signature >>> 24) & 0xFF)), - signature, - compressed: compressionMethod != 0, - encrypted, - useWebWorkers: getOptionValue(zipEntry, options, "useWebWorkers"), - useCompressionStream: getOptionValue(zipEntry, options, "useCompressionStream"), - transferStreams: getOptionValue(zipEntry, options, "transferStreams"), - checkPasswordOnly - }, - config, - streamOptions: { signal, size, onstart, onprogress, onend } - }; - let outputSize = 0; - try { - ({ outputSize } = (await runWorker({ readable, writable }, workerOptions))); - } catch (error) { - if (!checkPasswordOnly || error.message != ERR_ABORT_CHECK_PASSWORD) { - throw error; - } - } finally { - const preventClose = getOptionValue(zipEntry, options, "preventClose"); - writable.size += outputSize; - if (!preventClose && !writable.locked) { - await writable.close(); - } - } - return checkPasswordOnly ? undefined : writer.getData ? writer.getData() : writable; - } -} - -function readCommonHeader(directory, dataView, offset) { - const rawBitFlag = directory.rawBitFlag = getUint16(dataView, offset + 2); - const encrypted = (rawBitFlag & BITFLAG_ENCRYPTED) == BITFLAG_ENCRYPTED; - const rawLastModDate = getUint32(dataView, offset + 6); - Object.assign(directory, { - encrypted, - version: getUint16(dataView, offset), - bitFlag: { - level: (rawBitFlag & BITFLAG_LEVEL) >> 1, - dataDescriptor: (rawBitFlag & BITFLAG_DATA_DESCRIPTOR) == BITFLAG_DATA_DESCRIPTOR, - languageEncodingFlag: (rawBitFlag & BITFLAG_LANG_ENCODING_FLAG) == BITFLAG_LANG_ENCODING_FLAG - }, - rawLastModDate, - lastModDate: getDate(rawLastModDate), - filenameLength: getUint16(dataView, offset + 22), - extraFieldLength: getUint16(dataView, offset + 24) - }); -} - -async function readCommonFooter(fileEntry, directory, dataView, offset) { - const { rawExtraField } = directory; - const extraField = directory.extraField = new Map(); - const rawExtraFieldView = getDataView(new Uint8Array(rawExtraField)); - let offsetExtraField = 0; - try { - while (offsetExtraField < rawExtraField.length) { - const type = getUint16(rawExtraFieldView, offsetExtraField); - const size = getUint16(rawExtraFieldView, offsetExtraField + 2); - extraField.set(type, { - type, - data: rawExtraField.slice(offsetExtraField + 4, offsetExtraField + 4 + size) - }); - offsetExtraField += 4 + size; - } - } catch (_error) { - // ignored - } - const compressionMethod = getUint16(dataView, offset + 4); - Object.assign(directory, { - signature: getUint32(dataView, offset + 10), - uncompressedSize: getUint32(dataView, offset + 18), - compressedSize: getUint32(dataView, offset + 14) - }); - const extraFieldZip64 = extraField.get(EXTRAFIELD_TYPE_ZIP64); - if (extraFieldZip64) { - readExtraFieldZip64(extraFieldZip64, directory); - directory.extraFieldZip64 = extraFieldZip64; - } - const extraFieldUnicodePath = extraField.get(EXTRAFIELD_TYPE_UNICODE_PATH); - if (extraFieldUnicodePath) { - await readExtraFieldUnicode(extraFieldUnicodePath, PROPERTY_NAME_FILENAME, PROPERTY_NAME_RAW_FILENAME, directory, fileEntry); - directory.extraFieldUnicodePath = extraFieldUnicodePath; - } - const extraFieldUnicodeComment = extraField.get(EXTRAFIELD_TYPE_UNICODE_COMMENT); - if (extraFieldUnicodeComment) { - await readExtraFieldUnicode(extraFieldUnicodeComment, PROPERTY_NAME_COMMENT, PROPERTY_NAME_RAW_COMMENT, directory, fileEntry); - directory.extraFieldUnicodeComment = extraFieldUnicodeComment; - } - const extraFieldAES = extraField.get(EXTRAFIELD_TYPE_AES); - if (extraFieldAES) { - readExtraFieldAES(extraFieldAES, directory, compressionMethod); - directory.extraFieldAES = extraFieldAES; - } else { - directory.compressionMethod = compressionMethod; - } - const extraFieldNTFS = extraField.get(EXTRAFIELD_TYPE_NTFS); - if (extraFieldNTFS) { - readExtraFieldNTFS(extraFieldNTFS, directory); - directory.extraFieldNTFS = extraFieldNTFS; - } - const extraFieldExtendedTimestamp = extraField.get(EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP); - if (extraFieldExtendedTimestamp) { - readExtraFieldExtendedTimestamp(extraFieldExtendedTimestamp, directory); - directory.extraFieldExtendedTimestamp = extraFieldExtendedTimestamp; - } -} - -function readExtraFieldZip64(extraFieldZip64, directory) { - directory.zip64 = true; - const extraFieldView = getDataView(extraFieldZip64.data); - const missingProperties = ZIP64_PROPERTIES.filter(([propertyName, max]) => directory[propertyName] == max); - for (let indexMissingProperty = 0, offset = 0; indexMissingProperty < missingProperties.length; indexMissingProperty++) { - const [propertyName, max] = missingProperties[indexMissingProperty]; - if (directory[propertyName] == max) { - const extraction = ZIP64_EXTRACTION[max]; - directory[propertyName] = extraFieldZip64[propertyName] = extraction.getValue(extraFieldView, offset); - offset += extraction.bytes; - } else if (extraFieldZip64[propertyName]) { - throw new Error(ERR_EXTRAFIELD_ZIP64_NOT_FOUND); - } - } -} - -async function readExtraFieldUnicode(extraFieldUnicode, propertyName, rawPropertyName, directory, fileEntry) { - const extraFieldView = getDataView(extraFieldUnicode.data); - const crc32 = new Crc32(); - crc32.append(fileEntry[rawPropertyName]); - const dataViewSignature = getDataView(new Uint8Array(4)); - dataViewSignature.setUint32(0, crc32.get(), true); - Object.assign(extraFieldUnicode, { - version: getUint8(extraFieldView, 0), - signature: getUint32(extraFieldView, 1), - [propertyName]: await decodeText(extraFieldUnicode.data.subarray(5)), - valid: !fileEntry.bitFlag.languageEncodingFlag && extraFieldUnicode.signature == getUint32(dataViewSignature, 0) - }); - if (extraFieldUnicode.valid) { - directory[propertyName] = extraFieldUnicode[propertyName]; - directory[propertyName + "UTF8"] = true; - } -} - -function readExtraFieldAES(extraFieldAES, directory, compressionMethod) { - const extraFieldView = getDataView(extraFieldAES.data); - const strength = getUint8(extraFieldView, 4); - Object.assign(extraFieldAES, { - vendorVersion: getUint8(extraFieldView, 0), - vendorId: getUint8(extraFieldView, 2), - strength, - originalCompressionMethod: compressionMethod, - compressionMethod: getUint16(extraFieldView, 5) - }); - directory.compressionMethod = extraFieldAES.compressionMethod; -} - -function readExtraFieldNTFS(extraFieldNTFS, directory) { - const extraFieldView = getDataView(extraFieldNTFS.data); - let offsetExtraField = 4; - let tag1Data; - try { - while (offsetExtraField < extraFieldNTFS.data.length && !tag1Data) { - const tagValue = getUint16(extraFieldView, offsetExtraField); - const attributeSize = getUint16(extraFieldView, offsetExtraField + 2); - if (tagValue == EXTRAFIELD_TYPE_NTFS_TAG1) { - tag1Data = extraFieldNTFS.data.slice(offsetExtraField + 4, offsetExtraField + 4 + attributeSize); - } - offsetExtraField += 4 + attributeSize; - } - } catch (_error) { - // ignored - } - try { - if (tag1Data && tag1Data.length == 24) { - const tag1View = getDataView(tag1Data); - const rawLastModDate = tag1View.getBigUint64(0, true); - const rawLastAccessDate = tag1View.getBigUint64(8, true); - const rawCreationDate = tag1View.getBigUint64(16, true); - Object.assign(extraFieldNTFS, { - rawLastModDate, - rawLastAccessDate, - rawCreationDate - }); - const lastModDate = getDateNTFS(rawLastModDate); - const lastAccessDate = getDateNTFS(rawLastAccessDate); - const creationDate = getDateNTFS(rawCreationDate); - const extraFieldData = { lastModDate, lastAccessDate, creationDate }; - Object.assign(extraFieldNTFS, extraFieldData); - Object.assign(directory, extraFieldData); - } - } catch (_error) { - // ignored - } -} - -function readExtraFieldExtendedTimestamp(extraFieldExtendedTimestamp, directory) { - const extraFieldView = getDataView(extraFieldExtendedTimestamp.data); - const flags = getUint8(extraFieldView, 0); - const timeProperties = []; - const timeRawProperties = []; - if ((flags & 0x1) == 0x1) { - timeProperties.push(PROPERTY_NAME_LAST_MODIFICATION_DATE); - timeRawProperties.push(PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE); - } - if ((flags & 0x2) == 0x2) { - timeProperties.push(PROPERTY_NAME_LAST_ACCESS_DATE); - timeRawProperties.push(PROPERTY_NAME_RAW_LAST_ACCESS_DATE); - } - if ((flags & 0x4) == 0x4) { - timeProperties.push(PROPERTY_NAME_CREATION_DATE); - timeRawProperties.push(PROPERTY_NAME_RAW_CREATION_DATE); - } - let offset = 1; - timeProperties.forEach((propertyName, indexProperty) => { - if (extraFieldExtendedTimestamp.data.length >= offset + 4) { - const time = getUint32(extraFieldView, offset); - directory[propertyName] = extraFieldExtendedTimestamp[propertyName] = new Date(time * 1000); - const rawPropertyName = timeRawProperties[indexProperty]; - extraFieldExtendedTimestamp[rawPropertyName] = time; - } - offset += 4; - }); -} - -async function seekSignature(reader, signature, startOffset, minimumBytes, maximumLength) { - const signatureArray = new Uint8Array(4); - const signatureView = getDataView(signatureArray); - setUint32(signatureView, 0, signature); - const maximumBytes = minimumBytes + maximumLength; - return (await seek(minimumBytes)) || await seek(Math.min(maximumBytes, startOffset)); - - async function seek(length) { - const offset = startOffset - length; - const bytes = await readUint8Array(reader, offset, length); - for (let indexByte = bytes.length - minimumBytes; indexByte >= 0; indexByte--) { - if (bytes[indexByte] == signatureArray[0] && bytes[indexByte + 1] == signatureArray[1] && - bytes[indexByte + 2] == signatureArray[2] && bytes[indexByte + 3] == signatureArray[3]) { - return { - offset: offset + indexByte, - buffer: bytes.slice(indexByte, indexByte + minimumBytes).buffer - }; - } - } - } -} - -function getOptionValue(zipReader, options, name) { - return options[name] === UNDEFINED_VALUE ? zipReader.options[name] : options[name]; -} - -function getDate(timeRaw) { - const date = (timeRaw & 0xffff0000) >> 16, time = timeRaw & 0x0000ffff; - try { - return new Date(1980 + ((date & 0xFE00) >> 9), ((date & 0x01E0) >> 5) - 1, date & 0x001F, (time & 0xF800) >> 11, (time & 0x07E0) >> 5, (time & 0x001F) * 2, 0); - } catch (_error) { - // ignored - } -} - -function getDateNTFS(timeRaw) { - return new Date((Number((timeRaw / BigInt(10000)) - BigInt(11644473600000)))); -} - -function getUint8(view, offset) { - return view.getUint8(offset); -} - -function getUint16(view, offset) { - return view.getUint16(offset, true); -} - -function getUint32(view, offset) { - return view.getUint32(offset, true); -} - -function getBigUint64(view, offset) { - return Number(view.getBigUint64(offset, true)); -} - -function setUint32(view, offset, value) { - view.setUint32(offset, value, true); -} - -function getDataView(array) { - return new DataView(array.buffer); -} - -/* - Copyright (c) 2022 Gildas Lormeau. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the distribution. - - 3. The names of the authors may not be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT, - INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, - INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, - OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -let baseURL; -try { - baseURL = import.meta.url; -} catch (_error) { - // ignored -} -configure({ baseURL }); -e(configure); - -/// - -configure({ Deflate: ZipDeflate, Inflate: ZipInflate }); - -function parseIndex(index, size) { - return index < 0 ? - Math.max(index + size, 0) : - Math.min(index, size); -} -class BlobEntryReaderImpl extends Reader { - constructor(blob, entryMetadata) { - super(blob); - this.blob = blob; - this.offset = entryMetadata.offset + entryMetadata.headerSize; - this.size = entryMetadata.compressedSize; - } - async readUint8Array(index, length) { - const start = parseIndex(index, this.size) + this.offset; - const end = parseIndex(index + length, this.size) + this.offset; - const blob = this.blob.slice(start, end); - return new Uint8Array(await blob.arrayBuffer()); - } -} -/** - * Represents a {@link Reader} instance used to read data of an entry in a zip - * file provided as a {@link Blob}. It directly reads data if it is uncompressed. - */ -class BlobEntryReader extends Reader { - /** - * @param blob - The blob to read data from, usually the outer zip file. - * @param entry - The entry to read data of, usually the inner zip file. - * @param mimeString - The MIME type of the data. - * @param options - Represents options passed to {@link Entry#getData}. - */ - constructor(blob, entry, mimeString, options) { - super(); - this.blob = blob; - this.entry = entry; - this.mimeString = mimeString; - this.options = options; - } - async init() { - const entryMetadata = await getEntryMetadata(this.blob, this.entry); - if (entryMetadata.compressionMethod !== 0) { - const entryBlob = await zipGetData(this.entry, new BlobWriter(this.mimeString), this.options); - this.reader = new BlobReader(entryBlob); - } - else { - this.reader = new BlobEntryReaderImpl(this.blob, entryMetadata); - } - this.size = this.reader.size; - } - async readUint8Array(index, length) { - return this.reader.readUint8Array(index, length); - } -} - -// Images needed for fastbootd -const BOOT_CRITICAL_IMAGES = [ - "boot", - "dt", - "dtbo", - "init_boot", - "pvmfw", - "recovery", - "vbmeta_system", - "vbmeta_vendor", - "vbmeta", - "vendor_boot", - "vendor_kernel_boot", -]; -// Less critical images to flash after boot-critical ones -const SYSTEM_IMAGES = [ - "odm", - "odm_dlkm", - "product", - "system_dlkm", - "system_ext", - "system", - "vendor_dlkm", - "vendor", -]; -/** - * User-friendly action strings for factory image flashing progress. - * This can be indexed by the action argument in FactoryFlashCallback. - */ -const USER_ACTION_MAP = { - load: "Loading", - unpack: "Unpacking", - flash: "Writing", - wipe: "Wiping", - reboot: "Restarting", -}; -const BOOTLOADER_REBOOT_TIME = 4000; // ms -const FASTBOOTD_REBOOT_TIME = 16000; // ms -const USERDATA_ERASE_TIME = 1000; // ms -async function flashEntryBlob(device, entry, onProgress, partition) { - const blob = await zipGetData(entry, new BlobWriter("application/octet-stream"), { - onstart(total) { - logDebug(`Unpacking ${partition} (${total} bytes)`); - onProgress("unpack", partition, 0.0); - return; - }, - onprogress(progress, total) { - onProgress("unpack", partition, progress / total); - return; - } - }); - logDebug(`Flashing ${partition}`); - onProgress("flash", partition, 0.0); - await device.flashBlob(partition, blob, (progress) => { - onProgress("flash", partition, progress); - }); -} -async function tryFlashImages(device, entries, onProgress, imageNames) { - for (let imageName of imageNames) { - let pattern = new RegExp(`${imageName}(?:-.+)?\\.img$`); - let entry = entries.find((entry) => entry.filename.match(pattern)); - if (entry !== undefined) { - if (imageName == "bootloader") { - let current_slot = await device.getVariable("current-slot"); - if (current_slot == "a") { - await flashEntryBlob(device, entry, onProgress, (imageName + "_b")); - await device.runCommand("set_active:b"); - } - else if (current_slot == "b") { - await flashEntryBlob(device, entry, onProgress, (imageName + "_a")); - await device.runCommand("set_active:a"); - } - else { - throw new FastbootError("FAIL", `Invalid slot given by bootloader.`); - } - } - else { - await flashEntryBlob(device, entry, onProgress, imageName); - } - } - } -} -async function checkRequirements(device, androidInfo) { - // Deal with CRLF just in case - for (let line of androidInfo.replace("\r", "").split("\n")) { - let match = line.match(/^require\s+(.+?)=(.+)$/); - if (!match) { - continue; - } - let variable = match[1]; - // Historical mismatch that we still need to deal with - if (variable === "board") { - variable = "product"; - } - let expectValue = match[2]; - let expectValues = expectValue.split("|"); - // Special case: not a real variable at all - if (variable === "partition-exists") { - // Check whether the partition exists on the device: - // has-slot = undefined || FAIL => doesn't exist - // has-slot = yes || no => exists - let hasSlot = await device.getVariable(`has-slot:${expectValue}`); - if (hasSlot !== "yes" && hasSlot !== "no") { - throw new FastbootError("FAIL", `Requirement ${variable}=${expectValue} failed, device lacks partition`); - } - // Check whether we recognize the partition - if (!BOOT_CRITICAL_IMAGES.includes(expectValue) && - !SYSTEM_IMAGES.includes(expectValue)) { - throw new FastbootError("FAIL", `Requirement ${variable}=${expectValue} failed, unrecognized partition`); - } - } - else { - let realValue = await device.getVariable(variable); - if (expectValues.includes(realValue)) { - logDebug(`Requirement ${variable}=${expectValue} passed`); - } - else { - let msg = `Requirement ${variable}=${expectValue} failed, value = ${realValue}`; - logDebug(msg); - throw new FastbootError("FAIL", msg); - } - } - } -} -async function tryReboot(device, target, onReconnect) { - try { - await device.reboot(target, false); - } - catch (e) { - /* Failed = device rebooted by itself */ - } - await device.waitForConnect(onReconnect); -} -async function flashZip(device, blob, wipe, onReconnect, onProgress = (_action, _item, _progress) => { }) { - onProgress("load", "package", 0.0); - let reader = new ZipReader(new BlobReader(blob)); - let entries = await reader.getEntries(); - // Bootloader and radio packs can only be flashed in the bare-metal bootloader - if ((await device.getVariable("is-userspace")) === "yes") { - await device.reboot("bootloader", true, onReconnect); - } - // 1. Bootloader pack (repeated for slot A and B) - await tryFlashImages(device, entries, onProgress, ["bootloader"]); - await runWithTimedProgress(onProgress, "reboot", "device", BOOTLOADER_REBOOT_TIME, tryReboot(device, "bootloader", onReconnect)); - await tryFlashImages(device, entries, onProgress, ["bootloader"]); - await runWithTimedProgress(onProgress, "reboot", "device", BOOTLOADER_REBOOT_TIME, tryReboot(device, "bootloader", onReconnect)); - // 2. Radio pack - await tryFlashImages(device, entries, onProgress, ["radio"]); - await runWithTimedProgress(onProgress, "reboot", "device", BOOTLOADER_REBOOT_TIME, tryReboot(device, "bootloader", onReconnect)); - // Cancel snapshot update if in progress - let snapshotStatus = await device.getVariable("snapshot-update-status"); - if (snapshotStatus !== null && snapshotStatus !== "none") { - await device.runCommand("snapshot-update:cancel"); - } - // Load nested images for the following steps - let entry = entries.find((e) => e.filename.match(/image-.+\.zip$/)); - const imageReader = new ZipReader(new BlobEntryReader(blob, entry, "application/zip", { - onstart(total) { - logDebug(`Loading nested images from zip (${total} bytes)`); - onProgress("unpack", "images", 0.0); - return; - }, - onprogress(progress, total) { - onProgress("unpack", "images", progress / total); - return; - } - })); - const imageEntries = await imageReader.getEntries(); - // 3. Check requirements - entry = imageEntries.find((e) => e.filename === "android-info.txt"); - if (entry !== undefined) { - const reqText = await zipGetData(entry, new TextWriter()); - await checkRequirements(device, reqText); - } - // 4. Boot-critical images - await tryFlashImages(device, imageEntries, onProgress, BOOT_CRITICAL_IMAGES); - // 5. Super partition template - // This is also where we reboot to fastbootd. - entry = imageEntries.find((e) => e.filename === "super_empty.img"); - if (entry !== undefined) { - await runWithTimedProgress(onProgress, "reboot", "device", FASTBOOTD_REBOOT_TIME, device.reboot("fastboot", true, onReconnect)); - let superName = await device.getVariable("super-partition-name"); - if (!superName) { - superName = "super"; - } - let superAction = wipe ? "wipe" : "flash"; - onProgress(superAction, "super", 0.0); - const superBlob = await zipGetData(entry, new BlobWriter("application/octet-stream")); - await device.upload(superName, await readBlobAsBuffer(superBlob), (progress) => { - onProgress(superAction, "super", progress); - }); - await device.runCommand(`update-super:${superName}${wipe ? ":wipe" : ""}`); - } - // 6. Remaining system images - await tryFlashImages(device, imageEntries, onProgress, SYSTEM_IMAGES); - // We unconditionally reboot back to the bootloader here if we're in fastbootd, - // even when there's no custom AVB key, because common follow-up actions like - // locking the bootloader and wiping data need to be done in the bootloader. - if ((await device.getVariable("is-userspace")) === "yes") { - await runWithTimedProgress(onProgress, "reboot", "device", BOOTLOADER_REBOOT_TIME, device.reboot("bootloader", true, onReconnect)); - } - // 7. Custom AVB key - entry = entries.find((e) => e.filename.endsWith("avb_pkmd.bin")); - if (entry !== undefined) { - await device.runCommand("erase:avb_custom_key"); - await flashEntryBlob(device, entry, onProgress, "avb_custom_key"); - } - // 8. Wipe userdata - if (wipe) { - await runWithTimedProgress(onProgress, "wipe", "data", USERDATA_ERASE_TIME, device.runCommand("erase:userdata")); - } -} - -const FASTBOOT_USB_CLASS = 0xff; -const FASTBOOT_USB_SUBCLASS = 0x42; -const FASTBOOT_USB_PROTOCOL = 0x03; -const BULK_TRANSFER_SIZE = 16384; -const DEFAULT_DOWNLOAD_SIZE = 512 * 1024 * 1024; // 512 MiB -// To conserve RAM and work around Chromium's ~2 GiB size limit, we limit the -// max download size even if the bootloader can accept more data. -const MAX_DOWNLOAD_SIZE = 1024 * 1024 * 1024; // 1 GiB -const GETVAR_TIMEOUT = 10000; // ms -/** - * Exception class for USB errors not directly thrown by WebUSB. - */ -class UsbError extends Error { - constructor(message) { - super(message); - this.name = "UsbError"; - } -} -/** - * Exception class for errors returned by the bootloader, as well as high-level - * fastboot errors resulting from bootloader responses. - */ -class FastbootError extends Error { - constructor(status, message) { - super(`Bootloader replied with ${status}: ${message}`); - this.status = status; - this.bootloaderMessage = message; - this.name = "FastbootError"; - } -} -/** - * This class is a client for executing fastboot commands and operations on a - * device connected over USB. - */ -class FastbootDevice { - /** - * Create a new fastboot device instance. This doesn't actually connect to - * any USB devices; call {@link connect} to do so. - */ - constructor() { - this.device = null; - this.epIn = null; - this.epOut = null; - this._registeredUsbListeners = false; - this._connectResolve = null; - this._connectReject = null; - this._disconnectResolve = null; - } - /** - * Returns whether a USB device is connected and ready for use. - */ - get isConnected() { - return (this.device !== null && - this.device.opened && - this.device.configurations[0].interfaces[0].claimed); - } - /** - * Validate the current USB device's details and connect to it. - * - * @private - */ - async _validateAndConnectDevice() { - if (this.device === null) { - throw new UsbError("Attempted to connect to null device"); - } - // Validate device - let ife = this.device.configurations[0].interfaces[0].alternates[0]; - if (ife.endpoints.length !== 2) { - throw new UsbError("Interface has wrong number of endpoints"); - } - this.epIn = null; - this.epOut = null; - for (let endpoint of ife.endpoints) { - logVerbose("Checking endpoint:", endpoint); - if (endpoint.type !== "bulk") { - throw new UsbError("Interface endpoint is not bulk"); - } - if (endpoint.direction === "in") { - if (this.epIn === null) { - this.epIn = endpoint.endpointNumber; - } - else { - throw new UsbError("Interface has multiple IN endpoints"); - } - } - else if (endpoint.direction === "out") { - if (this.epOut === null) { - this.epOut = endpoint.endpointNumber; - } - else { - throw new UsbError("Interface has multiple OUT endpoints"); - } - } - } - logVerbose("Endpoints: in =", this.epIn, ", out =", this.epOut); - try { - await this.device.open(); - // Opportunistically reset to fix issues on some platforms - try { - await this.device.reset(); - } - catch (error) { - /* Failed = doesn't support reset */ - } - await this.device.selectConfiguration(1); - await this.device.claimInterface(0); // fastboot - } - catch (error) { - // Propagate exception from waitForConnect() - if (this._connectReject !== null) { - this._connectReject(error); - this._connectResolve = null; - this._connectReject = null; - } - throw error; - } - // Return from waitForConnect() - if (this._connectResolve !== null) { - this._connectResolve(undefined); - this._connectResolve = null; - this._connectReject = null; - } - } - /** - * Wait for the current USB device to disconnect, if it's still connected. - * Returns immediately if no device is connected. - */ - async waitForDisconnect() { - if (this.device === null) { - return; - } - return await new Promise((resolve, _reject) => { - this._disconnectResolve = resolve; - }); - } - /** - * Wait for the USB device to connect. Returns at the next connection, - * regardless of whether the connected USB device matches the previous one. - * - * @param {ReconnectCallback} onReconnect - Callback to request device reconnection on Android. - */ - async waitForConnect(onReconnect = () => { }) { - // On Android, we need to request the user to reconnect the device manually - // because there is no support for automatic reconnection. - if (navigator.userAgent.includes("Android")) { - await this.waitForDisconnect(); - onReconnect(); - } - return await new Promise((resolve, reject) => { - this._connectResolve = resolve; - this._connectReject = reject; - }); - } - /** - * Request the user to select a USB device and connect to it using the - * fastboot protocol. - * - * @throws {UsbError} - */ - async connect() { - let devices = await navigator.usb.getDevices(); - logDebug("Found paired USB devices:", devices); - if (devices.length === 1) { - this.device = devices[0]; - } - else { - // If multiple paired devices are connected, request the user to - // select a specific one to reduce ambiguity. This is also necessary - // if no devices are already paired, i.e. first use. - logDebug("No or multiple paired devices are connected, requesting one"); - this.device = await navigator.usb.requestDevice({ - filters: [ - { - classCode: FASTBOOT_USB_CLASS, - subclassCode: FASTBOOT_USB_SUBCLASS, - protocolCode: FASTBOOT_USB_PROTOCOL, - }, - ], - }); - } - logDebug("Using USB device:", this.device); - if (!this._registeredUsbListeners) { - navigator.usb.addEventListener("disconnect", (event) => { - if (event.device === this.device) { - logDebug("USB device disconnected"); - if (this._disconnectResolve !== null) { - this._disconnectResolve(undefined); - this._disconnectResolve = null; - } - } - }); - navigator.usb.addEventListener("connect", async (event) => { - logDebug("USB device connected"); - this.device = event.device; - // Check whether waitForConnect() is pending and save it for later - let hasPromiseReject = this._connectReject !== null; - try { - await this._validateAndConnectDevice(); - } - catch (error) { - // Only rethrow errors from the event handler if waitForConnect() - // didn't already handle them - if (!hasPromiseReject) { - throw error; - } - } - }); - this._registeredUsbListeners = true; - } - await this._validateAndConnectDevice(); - } - /** - * Read a raw command response from the bootloader. - * - * @private - * @returns {Promise} Object containing response text and data size, if any. - * @throws {FastbootError} - */ - async _readResponse() { - let respData = { - text: "", - }; - let respStatus; - do { - let respPacket = await this.device.transferIn(this.epIn, 64); - let response = new TextDecoder().decode(respPacket.data); - respStatus = response.substring(0, 4); - let respMessage = response.substring(4); - logDebug(`Response: ${respStatus} ${respMessage}`); - if (respStatus === "OKAY") { - // OKAY = end of response for this command - respData.text += respMessage; - } - else if (respStatus === "INFO") { - // INFO = additional info line - respData.text += respMessage + "\n"; - } - else if (respStatus === "DATA") { - // DATA = hex string, but it's returned separately for safety - respData.dataSize = respMessage; - } - else { - // Assume FAIL or garbage data - throw new FastbootError(respStatus, respMessage); - } - // INFO = more packets are coming - } while (respStatus === "INFO"); - return respData; - } - /** - * Send a textual command to the bootloader and read the response. - * This is in raw fastboot format, not AOSP fastboot syntax. - * - * @param {string} command - The command to send. - * @returns {Promise} Object containing response text and data size, if any. - * @throws {FastbootError} - */ - async runCommand(command) { - // Command and response length is always 64 bytes regardless of protocol - if (command.length > 64) { - throw new RangeError(); - } - // Send raw UTF-8 command - let cmdPacket = new TextEncoder().encode(command); - await this.device.transferOut(this.epOut, cmdPacket); - logDebug("Command:", command); - return this._readResponse(); - } - /** - * Read the value of a bootloader variable. Returns undefined if the variable - * does not exist. - * - * @param {string} varName - The name of the variable to get. - * @returns {Promise} Textual content of the variable. - * @throws {FastbootError} - */ - async getVariable(varName) { - let resp; - try { - resp = (await runWithTimeout(this.runCommand(`getvar:${varName}`), GETVAR_TIMEOUT)).text; - } - catch (error) { - // Some bootloaders return FAIL instead of empty responses, despite - // what the spec says. Normalize it here. - if (error instanceof FastbootError && error.status == "FAIL") { - resp = null; - } - else { - throw error; - } - } - // Some bootloaders send whitespace around some variables. - // According to the spec, non-existent variables should return empty - // responses - return resp ? resp.trim() : null; - } - /** - * Get the maximum download size for a single payload, in bytes. - * - * @private - * @returns {Promise} - * @throws {FastbootError} - */ - async _getDownloadSize() { - try { - let resp = (await this.getVariable("max-download-size")).toLowerCase(); - if (resp) { - // AOSP fastboot requires hex - return Math.min(parseInt(resp, 16), MAX_DOWNLOAD_SIZE); - } - } - catch (error) { - /* Failed = no value, fallthrough */ - } - // FAIL or empty variable means no max, set a reasonable limit to conserve memory - return DEFAULT_DOWNLOAD_SIZE; - } - /** - * Send a raw data payload to the bootloader. - * - * @private - */ - async _sendRawPayload(buffer, onProgress) { - let i = 0; - let remainingBytes = buffer.byteLength; - while (remainingBytes > 0) { - let chunk = buffer.slice(i * BULK_TRANSFER_SIZE, (i + 1) * BULK_TRANSFER_SIZE); - if (i % 1000 === 0) { - logVerbose(` Sending ${chunk.byteLength} bytes to endpoint, ${remainingBytes} remaining, i=${i}`); - } - if (i % 10 === 0) { - onProgress((buffer.byteLength - remainingBytes) / buffer.byteLength); - } - await this.device.transferOut(this.epOut, chunk); - remainingBytes -= chunk.byteLength; - i += 1; - } - onProgress(1.0); - } - /** - * Upload a payload to the bootloader for later use, e.g. flashing. - * Does not handle raw images, flashing, or splitting. - * - * @param {string} partition - Name of the partition the payload is intended for. - * @param {ArrayBuffer} buffer - Buffer containing the data to upload. - * @param {FlashProgressCallback} onProgress - Callback for upload progress updates. - * @throws {FastbootError} - */ - async upload(partition, buffer, onProgress = (_progress) => { }) { - logDebug(`Uploading single sparse to ${partition}: ${buffer.byteLength} bytes`); - // Bootloader requires an 8-digit hex number - let xferHex = buffer.byteLength.toString(16).padStart(8, "0"); - if (xferHex.length !== 8) { - throw new FastbootError("FAIL", `Transfer size overflow: ${xferHex} is more than 8 digits`); - } - // Check with the device and make sure size matches - let downloadResp = await this.runCommand(`download:${xferHex}`); - if (downloadResp.dataSize === undefined) { - throw new FastbootError("FAIL", `Unexpected response to download command: ${downloadResp.text}`); - } - let downloadSize = parseInt(downloadResp.dataSize, 16); - if (downloadSize !== buffer.byteLength) { - throw new FastbootError("FAIL", `Bootloader wants ${buffer.byteLength} bytes, requested to send ${buffer.byteLength} bytes`); - } - logDebug(`Sending payload: ${buffer.byteLength} bytes`); - await this._sendRawPayload(buffer, onProgress); - logDebug("Payload sent, waiting for response..."); - await this._readResponse(); - } - /** - * Reboot to the given target, and optionally wait for the device to - * reconnect. - * - * @param {string} target - Where to reboot to, i.e. fastboot or bootloader. - * @param {boolean} wait - Whether to wait for the device to reconnect. - * @param {ReconnectCallback} onReconnect - Callback to request device reconnection, if wait is enabled. - */ - async reboot(target = "", wait = false, onReconnect = () => { }) { - if (target.length > 0) { - await this.runCommand(`reboot-${target}`); - } - else { - await this.runCommand("reboot"); - } - if (wait) { - await this.waitForConnect(onReconnect); - } - } - /** - * Flash the given Blob to the given partition on the device. Any image - * format supported by the bootloader is allowed, e.g. sparse or raw images. - * Large raw images will be converted to sparse images automatically, and - * large sparse images will be split and flashed in multiple passes - * depending on the bootloader's payload size limit. - * - * @param {string} partition - The name of the partition to flash. - * @param {Blob} blob - The Blob to retrieve data from. - * @param {FlashProgressCallback} onProgress - Callback for flashing progress updates. - * @throws {FastbootError} - */ - async flashBlob(partition, blob, onProgress = (_progress) => { }) { - // Use current slot if partition is A/B - if ((await this.getVariable(`has-slot:${partition}`)) === "yes") { - partition += "_" + (await this.getVariable("current-slot")); - } - let maxDlSize = await this._getDownloadSize(); - let fileHeader = await readBlobAsBuffer(blob.slice(0, FILE_HEADER_SIZE)); - let totalBytes = blob.size; - let isSparse = false; - try { - let sparseHeader = parseFileHeader(fileHeader); - if (sparseHeader !== null) { - totalBytes = sparseHeader.blocks * sparseHeader.blockSize; - isSparse = true; - } - } - catch (error) { - // ImageError = invalid, so keep blob.size - } - // Logical partitions need to be resized before flashing because they're - // sized perfectly to the payload. - if ((await this.getVariable(`is-logical:${partition}`)) === "yes") { - // As per AOSP fastboot, we reset the partition to 0 bytes first - // to optimize extent allocation. - await this.runCommand(`resize-logical-partition:${partition}:0`); - // Set the actual size - await this.runCommand(`resize-logical-partition:${partition}:${totalBytes}`); - } - // Convert image to sparse (for splitting) if it exceeds the size limit - if (blob.size > maxDlSize && !isSparse) { - logDebug(`${partition} image is raw, converting to sparse`); - blob = await fromRaw(blob); - } - logDebug(`Flashing ${blob.size} bytes to ${partition}, ${maxDlSize} bytes per split`); - let splits = 0; - let sentBytes = 0; - for await (let split of splitBlob(blob, maxDlSize)) { - await this.upload(partition, split.data, (progress) => { - onProgress((sentBytes + progress * split.bytes) / totalBytes); - }); - logDebug("Flashing payload..."); - await this.runCommand(`flash:${partition}`); - splits += 1; - sentBytes += split.bytes; - } - logDebug(`Flashed ${partition} with ${splits} split(s)`); - } - /** - * Boot the given Blob on the device. - * Equivalent to `fastboot boot boot.img`. - * - * @param {Blob} blob - The Blob to retrieve data from. - * @param {FlashProgressCallback} onProgress - Callback for flashing progress updates. - * @throws {FastbootError} - */ - async bootBlob(blob, onProgress = (_progress) => { }) { - logDebug(`Booting ${blob.size} bytes image`); - let data = await readBlobAsBuffer(blob); - await this.upload("boot.img", data, onProgress); - logDebug("Booting payload..."); - await this.runCommand("boot"); - logDebug(`Booted ${blob.size} bytes image`); - } - /** - * Flash the given factory images zip onto the device, with automatic handling - * of firmware, system, and logical partitions as AOSP fastboot and - * flash-all.sh would do. - * Equivalent to `fastboot update name.zip`. - * - * @param {Blob} blob - Blob containing the zip file to flash. - * @param {boolean} wipe - Whether to wipe super and userdata. Equivalent to `fastboot -w`. - * @param {ReconnectCallback} onReconnect - Callback to request device reconnection. - * @param {FactoryProgressCallback} onProgress - Progress callback for image flashing. - */ - async flashFactoryZip(blob, wipe, onReconnect, onProgress = (_progress) => { }) { - return await flashZip(this, blob, wipe, onReconnect, onProgress); - } -} - -export { FastbootDevice, FastbootError, TimeoutError, USER_ACTION_MAP, UsbError, configure as configureZip, setDebugLevel }; -//# sourceMappingURL=fastboot.mjs.map diff --git a/dist/fastboot.mjs.map b/dist/fastboot.mjs.map deleted file mode 100644 index 2285acf..0000000 --- a/dist/fastboot.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"fastboot.mjs","sources":["../src/common.ts","../src/sparse.ts","../node_modules/@zip.js/zip.js/lib/core/streams/codecs/deflate.js","../node_modules/@zip.js/zip.js/lib/core/streams/codecs/inflate.js","../node_modules/@zip.js/zip.js/lib/core/constants.js","../node_modules/@zip.js/zip.js/lib/core/streams/stream-adapter.js","../node_modules/@zip.js/zip.js/lib/core/configuration.js","../node_modules/@zip.js/zip.js/lib/core/util/mime-type.js","../node_modules/@zip.js/zip.js/lib/core/streams/codecs/crc32.js","../node_modules/@zip.js/zip.js/lib/core/streams/crc32-stream.js","../node_modules/@zip.js/zip.js/lib/core/util/encode-text.js","../node_modules/@zip.js/zip.js/lib/core/streams/codecs/sjcl.js","../node_modules/@zip.js/zip.js/lib/core/streams/common-crypto.js","../node_modules/@zip.js/zip.js/lib/core/streams/aes-crypto-stream.js","../node_modules/@zip.js/zip.js/lib/core/streams/zip-crypto-stream.js","../node_modules/@zip.js/zip.js/lib/core/streams/zip-entry-stream.js","../node_modules/@zip.js/zip.js/lib/core/streams/codec-stream.js","../node_modules/@zip.js/zip.js/lib/core/codec-worker.js","../node_modules/@zip.js/zip.js/lib/core/codec-pool.js","../node_modules/@zip.js/zip.js/lib/z-worker-inline.js","../node_modules/@zip.js/zip.js/lib/core/io.js","../node_modules/@zip.js/zip.js/lib/core/util/cp437-decode.js","../node_modules/@zip.js/zip.js/lib/core/util/decode-text.js","../node_modules/@zip.js/zip.js/lib/core/zip-entry.js","../node_modules/@zip.js/zip.js/lib/core/zip-reader.js","../node_modules/@zip.js/zip.js/lib/zip-fs.js","../node_modules/@zip.js/zip.js/index.js","../src/io.ts","../src/factory.ts","../src/fastboot.ts"],"sourcesContent":["import { FactoryProgressCallback } from \"./factory\";\nimport { Entry, EntryGetDataOptions, WritableWriter } from \"@zip.js/zip.js\";\n\nconst ZIP_ENTRY_HEADER_BEGIN_LENGTH = 30; // bytes\n\nexport enum DebugLevel {\n Silent = 0,\n Debug,\n Verbose,\n}\n\nexport interface EntryMetadata {\n offset: number;\n compressionMethod: number;\n compressedSize: number;\n uncompressedSize: number;\n headerSize: number;\n}\n\nlet debugLevel = DebugLevel.Silent;\n\nexport function logDebug(...data: any[]) {\n if (debugLevel >= 1) {\n console.log(...data);\n }\n}\n\nexport function logVerbose(...data: any[]) {\n if (debugLevel >= 2) {\n console.log(...data);\n }\n}\n\n/**\n * Change the debug level for the fastboot client:\n * - 0 = silent\n * - 1 = debug, recommended for general use\n * - 2 = verbose, for debugging only\n *\n * @param {number} level - Debug level to use.\n */\nexport function setDebugLevel(level: DebugLevel) {\n debugLevel = level;\n}\n\n/**\n * Reads all of the data in the given blob and returns it as an ArrayBuffer.\n *\n * @param {Blob} blob - Blob with the data to read.\n * @returns {Promise} ArrayBuffer containing data from the blob.\n * @ignore\n */\nexport function readBlobAsBuffer(blob: Blob): Promise {\n return new Promise((resolve, reject) => {\n let reader = new FileReader();\n reader.onload = () => {\n resolve(reader.result! as ArrayBuffer);\n };\n reader.onerror = () => {\n reject(reader.error);\n };\n\n reader.readAsArrayBuffer(blob);\n });\n}\n\nfunction waitForFrame() {\n return new Promise((resolve, _reject) => {\n window.requestAnimationFrame(resolve);\n });\n}\n\nexport async function runWithTimedProgress(\n onProgress: FactoryProgressCallback,\n action: string,\n item: string,\n duration: number,\n workPromise: Promise\n) {\n let startTime = new Date().getTime();\n let stop = false;\n\n onProgress(action, item, 0.0);\n let progressPromise = (async () => {\n let now;\n let targetTime = startTime + duration;\n\n do {\n now = new Date().getTime();\n onProgress(action, item, (now - startTime) / duration);\n await waitForFrame();\n } while (!stop && now < targetTime);\n })();\n\n await Promise.race([progressPromise, workPromise]);\n stop = true;\n await progressPromise;\n await workPromise;\n\n onProgress(action, item, 1.0);\n}\n\n/** Exception class for operations that exceeded their timeout duration. */\nexport class TimeoutError extends Error {\n timeout: number;\n\n constructor(timeout: number) {\n super(`Timeout of ${timeout} ms exceeded`);\n this.name = \"TimeoutError\";\n this.timeout = timeout;\n }\n}\n\nexport function runWithTimeout(\n promise: Promise,\n timeout: number\n): Promise {\n return new Promise((resolve, reject) => {\n // Set up timeout\n let timedOut = false;\n let tid = setTimeout(() => {\n // Set sentinel first to prevent race in promise resolving\n timedOut = true;\n reject(new TimeoutError(timeout));\n }, timeout);\n\n // Passthrough\n promise\n .then((val) => {\n if (!timedOut) {\n resolve(val);\n }\n })\n .catch((err) => {\n if (!timedOut) {\n reject(err);\n }\n })\n .finally(() => {\n if (!timedOut) {\n clearTimeout(tid);\n }\n });\n });\n}\n\nexport async function getEntryMetadata(\n blob: Blob,\n entry: Entry\n): Promise {\n const offset = entry.offset;\n const headerBeginRaw =\n await blob.slice(offset, offset + ZIP_ENTRY_HEADER_BEGIN_LENGTH).arrayBuffer();\n const dataView = new DataView(headerBeginRaw);\n const compressionMethod = dataView.getUint16(8, true);\n const compressedSize = dataView.getUint32(18, true);\n const uncompressedSize = dataView.getUint32(22, true);\n const fileNameLength = dataView.getUint16(26, true);\n const extraFieldLength = dataView.getUint16(28, true);\n const headerSize = ZIP_ENTRY_HEADER_BEGIN_LENGTH + fileNameLength + extraFieldLength;\n\n return {\n offset,\n compressionMethod,\n compressedSize,\n uncompressedSize,\n headerSize,\n };\n}\n\n// Wrapper for Entry#getData() that unwraps ProgressEvent errors\nexport async function zipGetData(\n entry: Entry,\n writer: WritableWriter,\n options?: EntryGetDataOptions\n): Promise {\n try {\n return await entry.getData!(writer, options);\n } catch (e) {\n if (\n e instanceof ProgressEvent &&\n e.type === \"error\" &&\n e.target !== null\n ) {\n throw (e.target as any).error;\n } else {\n throw e;\n }\n }\n}\n","import * as common from \"./common\";\n\nconst FILE_MAGIC = 0xed26ff3a;\n\nconst MAJOR_VERSION = 1;\nconst MINOR_VERSION = 0;\nexport const FILE_HEADER_SIZE = 28;\nconst CHUNK_HEADER_SIZE = 12;\n\n// AOSP libsparse uses 64 MiB chunks\nconst RAW_CHUNK_SIZE = 64 * 1024 * 1024;\n\nexport class ImageError extends Error {\n constructor(message: string) {\n super(message);\n this.name = \"ImageError\";\n }\n}\n\nexport interface SparseSplit {\n data: ArrayBuffer;\n bytes: number;\n}\n\nexport enum ChunkType {\n Raw = 0xcac1,\n Fill = 0xcac2,\n Skip = 0xcac3,\n Crc32 = 0xcac4,\n}\n\nexport interface SparseHeader {\n blockSize: number;\n blocks: number;\n chunks: number;\n crc32: number;\n}\n\nexport interface SparseChunk {\n type: ChunkType;\n /* 2: reserved, 16 bits */\n blocks: number;\n dataBytes: number;\n data: Blob | null; // to be populated by consumer\n}\n\nclass BlobBuilder {\n private blob: Blob;\n private type: string;\n\n constructor(type: string = \"\") {\n this.type = type;\n this.blob = new Blob([], { type: this.type });\n }\n\n append(blob: Blob) {\n this.blob = new Blob([this.blob, blob], { type: this.type });\n }\n\n getBlob(): Blob {\n return this.blob;\n }\n}\n\n/**\n * Returns a parsed version of the sparse image file header from the given buffer.\n *\n * @param {ArrayBuffer} buffer - Raw file header data.\n * @returns {SparseHeader} Object containing the header information.\n */\nexport function parseFileHeader(buffer: ArrayBuffer): SparseHeader | null {\n let view = new DataView(buffer);\n\n let magic = view.getUint32(0, true);\n if (magic !== FILE_MAGIC) {\n return null;\n }\n\n // v1.0+\n let major = view.getUint16(4, true);\n let minor = view.getUint16(6, true);\n if (major !== MAJOR_VERSION || minor < MINOR_VERSION) {\n throw new ImageError(\n `Unsupported sparse image version ${major}.${minor}`\n );\n }\n\n let fileHdrSize = view.getUint16(8, true);\n let chunkHdrSize = view.getUint16(10, true);\n if (\n fileHdrSize !== FILE_HEADER_SIZE ||\n chunkHdrSize !== CHUNK_HEADER_SIZE\n ) {\n throw new ImageError(\n `Invalid file header size ${fileHdrSize}, chunk header size ${chunkHdrSize}`\n );\n }\n\n let blockSize = view.getUint32(12, true);\n if (blockSize % 4 !== 0) {\n throw new ImageError(`Block size ${blockSize} is not a multiple of 4`);\n }\n\n return {\n blockSize: blockSize,\n blocks: view.getUint32(16, true),\n chunks: view.getUint32(20, true),\n crc32: view.getUint32(24, true),\n };\n}\n\nfunction parseChunkHeader(buffer: ArrayBuffer) {\n let view = new DataView(buffer);\n\n // This isn't the same as what createImage takes.\n // Further processing needs to be done on the chunks.\n return {\n type: view.getUint16(0, true),\n /* 2: reserved, 16 bits */\n blocks: view.getUint32(4, true),\n dataBytes: view.getUint32(8, true) - CHUNK_HEADER_SIZE,\n data: null, // to be populated by consumer\n } as SparseChunk;\n}\n\nfunction calcChunksBlockSize(chunks: Array) {\n return chunks\n .map((chunk) => chunk.blocks)\n .reduce((total, c) => total + c, 0);\n}\n\nfunction calcChunksDataSize(chunks: Array) {\n return chunks\n .map((chunk) => chunk.data!.size)\n .reduce((total, c) => total + c, 0);\n}\n\nfunction calcChunksSize(chunks: Array) {\n // 28-byte file header, 12-byte chunk headers\n let overhead = FILE_HEADER_SIZE + CHUNK_HEADER_SIZE * chunks.length;\n return overhead + calcChunksDataSize(chunks);\n}\n\nasync function createImage(header: SparseHeader, chunks: Array): Promise {\n let blobBuilder = new BlobBuilder();\n\n let buffer = new ArrayBuffer(FILE_HEADER_SIZE);\n let dataView = new DataView(buffer);\n let arrayView = new Uint8Array(buffer);\n\n dataView.setUint32(0, FILE_MAGIC, true);\n // v1.0\n dataView.setUint16(4, MAJOR_VERSION, true);\n dataView.setUint16(6, MINOR_VERSION, true);\n dataView.setUint16(8, FILE_HEADER_SIZE, true);\n dataView.setUint16(10, CHUNK_HEADER_SIZE, true);\n\n // Match input parameters\n dataView.setUint32(12, header.blockSize, true);\n dataView.setUint32(16, header.blocks, true);\n dataView.setUint32(20, chunks.length, true);\n\n // We don't care about the CRC. AOSP docs specify that this should be a CRC32,\n // but AOSP libsparse always sets 0 and puts the CRC in a final undocumented\n // 0xCAC4 chunk instead.\n dataView.setUint32(24, 0, true);\n\n blobBuilder.append(new Blob([buffer]));\n for (let chunk of chunks) {\n buffer = new ArrayBuffer(CHUNK_HEADER_SIZE + chunk.data!.size);\n dataView = new DataView(buffer);\n arrayView = new Uint8Array(buffer);\n\n dataView.setUint16(0, chunk.type, true);\n dataView.setUint16(2, 0, true); // reserved\n dataView.setUint32(4, chunk.blocks, true);\n dataView.setUint32(\n 8,\n CHUNK_HEADER_SIZE + chunk.data!.size,\n true\n );\n\n let chunkArrayView = new Uint8Array(await common.readBlobAsBuffer(chunk.data!));\n arrayView.set(chunkArrayView, CHUNK_HEADER_SIZE);\n blobBuilder.append(new Blob([buffer]));\n }\n\n return blobBuilder.getBlob();\n}\n\n/**\n * Creates a sparse image from buffer containing raw image data.\n *\n * @param {Blob} blob - Blob containing the raw image data.\n * @returns {Promise} Promise that resolves the blob containing the new sparse image.\n */\nexport async function fromRaw(blob: Blob): Promise {\n let header = {\n blockSize: 4096,\n blocks: blob.size / 4096,\n chunks: 1,\n crc32: 0,\n };\n\n let chunks = [];\n while (blob.size > 0) {\n let chunkSize = Math.min(blob.size, RAW_CHUNK_SIZE);\n chunks.push({\n type: ChunkType.Raw,\n blocks: chunkSize / header.blockSize,\n data: blob.slice(0, chunkSize),\n } as SparseChunk);\n blob = blob.slice(chunkSize);\n }\n\n return createImage(header, chunks);\n}\n\n/**\n * Split a sparse image into smaller sparse images within the given size.\n * This takes a Blob instead of an ArrayBuffer because it may process images\n * larger than RAM.\n *\n * @param {Blob} blob - Blob containing the sparse image to split.\n * @param {number} splitSize - Maximum size per split.\n * @yields {Object} Data of the next split image and its output size in bytes.\n */\nexport async function* splitBlob(blob: Blob, splitSize: number) {\n common.logDebug(\n `Splitting ${blob.size}-byte sparse image into ${splitSize}-byte chunks`\n );\n // Short-circuit if splitting isn't required\n if (blob.size <= splitSize) {\n common.logDebug(\"Blob fits in 1 payload, not splitting\");\n yield {\n data: await common.readBlobAsBuffer(blob),\n bytes: blob.size,\n } as SparseSplit;\n return;\n }\n\n let headerData = await common.readBlobAsBuffer(\n blob.slice(0, FILE_HEADER_SIZE)\n );\n let header = parseFileHeader(headerData);\n if (header === null) {\n throw new ImageError(\"Blob is not a sparse image\");\n }\n\n // Remove CRC32 (if present), otherwise splitting will invalidate it\n header.crc32 = 0;\n blob = blob.slice(FILE_HEADER_SIZE);\n\n let splitChunks: Array = [];\n let splitDataBytes = 0;\n for (let i = 0; i < header.chunks; i++) {\n let chunkHeaderData = await common.readBlobAsBuffer(\n blob.slice(0, CHUNK_HEADER_SIZE)\n );\n let chunk = parseChunkHeader(chunkHeaderData);\n chunk.data = blob.slice(CHUNK_HEADER_SIZE, CHUNK_HEADER_SIZE + chunk.dataBytes);\n blob = blob.slice(CHUNK_HEADER_SIZE + chunk.dataBytes);\n\n let bytesRemaining = splitSize - calcChunksSize(splitChunks);\n common.logVerbose(\n ` Chunk ${i}: type ${chunk.type}, ${chunk.dataBytes} bytes / ${chunk.blocks} blocks, ${bytesRemaining} bytes remaining`\n );\n if (bytesRemaining >= chunk.dataBytes) {\n // Read the chunk and add it\n common.logVerbose(\" Space is available, adding chunk\");\n splitChunks.push(chunk);\n // Track amount of data written on the output device, in bytes\n splitDataBytes += chunk.blocks * header.blockSize;\n } else {\n // Out of space, finish this split\n // Blocks need to be calculated from chunk headers instead of going by size\n // because FILL and SKIP chunks cover more blocks than the data they contain.\n let splitBlocks = calcChunksBlockSize(splitChunks);\n splitChunks.push({\n type: ChunkType.Skip,\n blocks: header.blocks - splitBlocks,\n data: new Blob([]),\n dataBytes: 0,\n });\n common.logVerbose(\n `Partition is ${\n header.blocks\n } blocks, used ${splitBlocks}, padded with ${\n header.blocks - splitBlocks\n }, finishing split with ${calcChunksBlockSize(\n splitChunks\n )} blocks`\n );\n let splitImage = await createImage(header, splitChunks);\n common.logDebug(\n `Finished ${splitImage.size}-byte split with ${splitChunks.length} chunks`\n );\n yield {\n data: await common.readBlobAsBuffer(splitImage),\n bytes: splitDataBytes,\n } as SparseSplit;\n\n // Start a new split. Every split is considered a full image by the\n // bootloader, so we need to skip the *total* written blocks.\n common.logVerbose(\n `Starting new split: skipping first ${splitBlocks} blocks and adding chunk`\n );\n splitChunks = [\n {\n type: ChunkType.Skip,\n blocks: splitBlocks,\n data: new Blob([]),\n dataBytes: 0,\n },\n chunk,\n ];\n splitDataBytes = 0;\n }\n }\n\n // Finish the final split if necessary\n if (\n splitChunks.length > 0 &&\n (splitChunks.length > 1 || splitChunks[0].type !== ChunkType.Skip)\n ) {\n let splitImage = await createImage(header, splitChunks);\n common.logDebug(\n `Finishing final ${splitImage.size}-byte split with ${splitChunks.length} chunks`\n );\n yield {\n data: await common.readBlobAsBuffer(splitImage),\n bytes: splitDataBytes,\n } as SparseSplit;\n }\n}\n","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/*\n * This program is based on JZlib 1.0.2 ymnk, JCraft,Inc.\n * JZlib is based on zlib-1.1.3, so all credit should go authors\n * Jean-loup Gailly(jloup@gzip.org) and Mark Adler(madler@alumni.caltech.edu)\n * and contributors of zlib.\n */\n\n// deno-lint-ignore-file no-this-alias prefer-const\n\n// Global\n\nconst MAX_BITS = 15;\nconst D_CODES = 30;\nconst BL_CODES = 19;\n\nconst LENGTH_CODES = 29;\nconst LITERALS = 256;\nconst L_CODES = (LITERALS + 1 + LENGTH_CODES);\nconst HEAP_SIZE = (2 * L_CODES + 1);\n\nconst END_BLOCK = 256;\n\n// Bit length codes must not exceed MAX_BL_BITS bits\nconst MAX_BL_BITS = 7;\n\n// repeat previous bit length 3-6 times (2 bits of repeat count)\nconst REP_3_6 = 16;\n\n// repeat a zero length 3-10 times (3 bits of repeat count)\nconst REPZ_3_10 = 17;\n\n// repeat a zero length 11-138 times (7 bits of repeat count)\nconst REPZ_11_138 = 18;\n\n// The lengths of the bit length codes are sent in order of decreasing\n// probability, to avoid transmitting the lengths for unused bit\n// length codes.\n\nconst Buf_size = 8 * 2;\n\n// JZlib version : \"1.0.2\"\nconst Z_DEFAULT_COMPRESSION = -1;\n\n// compression strategy\nconst Z_FILTERED = 1;\nconst Z_HUFFMAN_ONLY = 2;\nconst Z_DEFAULT_STRATEGY = 0;\n\nconst Z_NO_FLUSH = 0;\nconst Z_PARTIAL_FLUSH = 1;\nconst Z_FULL_FLUSH = 3;\nconst Z_FINISH = 4;\n\nconst Z_OK = 0;\nconst Z_STREAM_END = 1;\nconst Z_NEED_DICT = 2;\nconst Z_STREAM_ERROR = -2;\nconst Z_DATA_ERROR = -3;\nconst Z_BUF_ERROR = -5;\n\n// Tree\n\nfunction extractArray(array) {\n\treturn flatArray(array.map(([length, value]) => (new Array(length)).fill(value, 0, length)));\n}\n\nfunction flatArray(array) {\n\treturn array.reduce((a, b) => a.concat(Array.isArray(b) ? flatArray(b) : b), []);\n}\n\n// see definition of array dist_code below\nconst _dist_code = [0, 1, 2, 3].concat(...extractArray([\n\t[2, 4], [2, 5], [4, 6], [4, 7], [8, 8], [8, 9], [16, 10], [16, 11], [32, 12], [32, 13], [64, 14], [64, 15], [2, 0], [1, 16],\n\t[1, 17], [2, 18], [2, 19], [4, 20], [4, 21], [8, 22], [8, 23], [16, 24], [16, 25], [32, 26], [32, 27], [64, 28], [64, 29]\n]));\n\nfunction Tree() {\n\tconst that = this;\n\n\t// dyn_tree; // the dynamic tree\n\t// max_code; // largest code with non zero frequency\n\t// stat_desc; // the corresponding static tree\n\n\t// Compute the optimal bit lengths for a tree and update the total bit\n\t// length\n\t// for the current block.\n\t// IN assertion: the fields freq and dad are set, heap[heap_max] and\n\t// above are the tree nodes sorted by increasing frequency.\n\t// OUT assertions: the field len is set to the optimal bit length, the\n\t// array bl_count contains the frequencies for each bit length.\n\t// The length opt_len is updated; static_len is also updated if stree is\n\t// not null.\n\tfunction gen_bitlen(s) {\n\t\tconst tree = that.dyn_tree;\n\t\tconst stree = that.stat_desc.static_tree;\n\t\tconst extra = that.stat_desc.extra_bits;\n\t\tconst base = that.stat_desc.extra_base;\n\t\tconst max_length = that.stat_desc.max_length;\n\t\tlet h; // heap index\n\t\tlet n, m; // iterate over the tree elements\n\t\tlet bits; // bit length\n\t\tlet xbits; // extra bits\n\t\tlet f; // frequency\n\t\tlet overflow = 0; // number of elements with bit length too large\n\n\t\tfor (bits = 0; bits <= MAX_BITS; bits++)\n\t\t\ts.bl_count[bits] = 0;\n\n\t\t// In a first pass, compute the optimal bit lengths (which may\n\t\t// overflow in the case of the bit length tree).\n\t\ttree[s.heap[s.heap_max] * 2 + 1] = 0; // root of the heap\n\n\t\tfor (h = s.heap_max + 1; h < HEAP_SIZE; h++) {\n\t\t\tn = s.heap[h];\n\t\t\tbits = tree[tree[n * 2 + 1] * 2 + 1] + 1;\n\t\t\tif (bits > max_length) {\n\t\t\t\tbits = max_length;\n\t\t\t\toverflow++;\n\t\t\t}\n\t\t\ttree[n * 2 + 1] = bits;\n\t\t\t// We overwrite tree[n*2+1] which is no longer needed\n\n\t\t\tif (n > that.max_code)\n\t\t\t\tcontinue; // not a leaf node\n\n\t\t\ts.bl_count[bits]++;\n\t\t\txbits = 0;\n\t\t\tif (n >= base)\n\t\t\t\txbits = extra[n - base];\n\t\t\tf = tree[n * 2];\n\t\t\ts.opt_len += f * (bits + xbits);\n\t\t\tif (stree)\n\t\t\t\ts.static_len += f * (stree[n * 2 + 1] + xbits);\n\t\t}\n\t\tif (overflow === 0)\n\t\t\treturn;\n\n\t\t// This happens for example on obj2 and pic of the Calgary corpus\n\t\t// Find the first bit length which could increase:\n\t\tdo {\n\t\t\tbits = max_length - 1;\n\t\t\twhile (s.bl_count[bits] === 0)\n\t\t\t\tbits--;\n\t\t\ts.bl_count[bits]--; // move one leaf down the tree\n\t\t\ts.bl_count[bits + 1] += 2; // move one overflow item as its brother\n\t\t\ts.bl_count[max_length]--;\n\t\t\t// The brother of the overflow item also moves one step up,\n\t\t\t// but this does not affect bl_count[max_length]\n\t\t\toverflow -= 2;\n\t\t} while (overflow > 0);\n\n\t\tfor (bits = max_length; bits !== 0; bits--) {\n\t\t\tn = s.bl_count[bits];\n\t\t\twhile (n !== 0) {\n\t\t\t\tm = s.heap[--h];\n\t\t\t\tif (m > that.max_code)\n\t\t\t\t\tcontinue;\n\t\t\t\tif (tree[m * 2 + 1] != bits) {\n\t\t\t\t\ts.opt_len += (bits - tree[m * 2 + 1]) * tree[m * 2];\n\t\t\t\t\ttree[m * 2 + 1] = bits;\n\t\t\t\t}\n\t\t\t\tn--;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Reverse the first len bits of a code, using straightforward code (a\n\t// faster\n\t// method would use a table)\n\t// IN assertion: 1 <= len <= 15\n\tfunction bi_reverse(code, // the value to invert\n\t\tlen // its bit length\n\t) {\n\t\tlet res = 0;\n\t\tdo {\n\t\t\tres |= code & 1;\n\t\t\tcode >>>= 1;\n\t\t\tres <<= 1;\n\t\t} while (--len > 0);\n\t\treturn res >>> 1;\n\t}\n\n\t// Generate the codes for a given tree and bit counts (which need not be\n\t// optimal).\n\t// IN assertion: the array bl_count contains the bit length statistics for\n\t// the given tree and the field len is set for all tree elements.\n\t// OUT assertion: the field code is set for all tree elements of non\n\t// zero code length.\n\tfunction gen_codes(tree, // the tree to decorate\n\t\tmax_code, // largest code with non zero frequency\n\t\tbl_count // number of codes at each bit length\n\t) {\n\t\tconst next_code = []; // next code value for each\n\t\t// bit length\n\t\tlet code = 0; // running code value\n\t\tlet bits; // bit index\n\t\tlet n; // code index\n\t\tlet len;\n\n\t\t// The distribution counts are first used to generate the code values\n\t\t// without bit reversal.\n\t\tfor (bits = 1; bits <= MAX_BITS; bits++) {\n\t\t\tnext_code[bits] = code = ((code + bl_count[bits - 1]) << 1);\n\t\t}\n\n\t\t// Check that the bit counts in bl_count are consistent. The last code\n\t\t// must be all ones.\n\t\t// Assert (code + bl_count[MAX_BITS]-1 == (1<= 1; n--)\n\t\t\ts.pqdownheap(tree, n);\n\n\t\t// Construct the Huffman tree by repeatedly combining the least two\n\t\t// frequent nodes.\n\n\t\tnode = elems; // next internal node of the tree\n\t\tdo {\n\t\t\t// n = node of least frequency\n\t\t\tn = s.heap[1];\n\t\t\ts.heap[1] = s.heap[s.heap_len--];\n\t\t\ts.pqdownheap(tree, 1);\n\t\t\tm = s.heap[1]; // m = node of next least frequency\n\n\t\t\ts.heap[--s.heap_max] = n; // keep the nodes sorted by frequency\n\t\t\ts.heap[--s.heap_max] = m;\n\n\t\t\t// Create a new node father of n and m\n\t\t\ttree[node * 2] = (tree[n * 2] + tree[m * 2]);\n\t\t\ts.depth[node] = Math.max(s.depth[n], s.depth[m]) + 1;\n\t\t\ttree[n * 2 + 1] = tree[m * 2 + 1] = node;\n\n\t\t\t// and insert the new node in the heap\n\t\t\ts.heap[1] = node++;\n\t\t\ts.pqdownheap(tree, 1);\n\t\t} while (s.heap_len >= 2);\n\n\t\ts.heap[--s.heap_max] = s.heap[1];\n\n\t\t// At this point, the fields freq and dad are set. We can now\n\t\t// generate the bit lengths.\n\n\t\tgen_bitlen(s);\n\n\t\t// The field len is now set, we can generate the bit codes\n\t\tgen_codes(tree, that.max_code, s.bl_count);\n\t};\n\n}\n\nTree._length_code = [0, 1, 2, 3, 4, 5, 6, 7].concat(...extractArray([\n\t[2, 8], [2, 9], [2, 10], [2, 11], [4, 12], [4, 13], [4, 14], [4, 15], [8, 16], [8, 17], [8, 18], [8, 19],\n\t[16, 20], [16, 21], [16, 22], [16, 23], [32, 24], [32, 25], [32, 26], [31, 27], [1, 28]]));\n\nTree.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];\n\nTree.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,\n\t24576];\n\n// Mapping from a distance to a distance code. dist is the distance - 1 and\n// must not have side effects. _dist_code[256] and _dist_code[257] are never\n// used.\nTree.d_code = function (dist) {\n\treturn ((dist) < 256 ? _dist_code[dist] : _dist_code[256 + ((dist) >>> 7)]);\n};\n\n// extra bits for each length code\nTree.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];\n\n// extra bits for each distance code\nTree.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];\n\n// extra bits for each bit length code\nTree.extra_blbits = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7];\n\nTree.bl_order = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15];\n\n// StaticTree\n\nfunction StaticTree(static_tree, extra_bits, extra_base, elems, max_length) {\n\tconst that = this;\n\tthat.static_tree = static_tree;\n\tthat.extra_bits = extra_bits;\n\tthat.extra_base = extra_base;\n\tthat.elems = elems;\n\tthat.max_length = max_length;\n}\n\nconst static_ltree2_first_part = [12, 140, 76, 204, 44, 172, 108, 236, 28, 156, 92, 220, 60, 188, 124, 252, 2, 130, 66, 194, 34, 162, 98, 226, 18, 146, 82,\n\t210, 50, 178, 114, 242, 10, 138, 74, 202, 42, 170, 106, 234, 26, 154, 90, 218, 58, 186, 122, 250, 6, 134, 70, 198, 38, 166, 102, 230, 22, 150, 86,\n\t214, 54, 182, 118, 246, 14, 142, 78, 206, 46, 174, 110, 238, 30, 158, 94, 222, 62, 190, 126, 254, 1, 129, 65, 193, 33, 161, 97, 225, 17, 145, 81,\n\t209, 49, 177, 113, 241, 9, 137, 73, 201, 41, 169, 105, 233, 25, 153, 89, 217, 57, 185, 121, 249, 5, 133, 69, 197, 37, 165, 101, 229, 21, 149, 85,\n\t213, 53, 181, 117, 245, 13, 141, 77, 205, 45, 173, 109, 237, 29, 157, 93, 221, 61, 189, 125, 253, 19, 275, 147, 403, 83, 339, 211, 467, 51, 307,\n\t179, 435, 115, 371, 243, 499, 11, 267, 139, 395, 75, 331, 203, 459, 43, 299, 171, 427, 107, 363, 235, 491, 27, 283, 155, 411, 91, 347, 219, 475,\n\t59, 315, 187, 443, 123, 379, 251, 507, 7, 263, 135, 391, 71, 327, 199, 455, 39, 295, 167, 423, 103, 359, 231, 487, 23, 279, 151, 407, 87, 343, 215,\n\t471, 55, 311, 183, 439, 119, 375, 247, 503, 15, 271, 143, 399, 79, 335, 207, 463, 47, 303, 175, 431, 111, 367, 239, 495, 31, 287, 159, 415, 95,\n\t351, 223, 479, 63, 319, 191, 447, 127, 383, 255, 511, 0, 64, 32, 96, 16, 80, 48, 112, 8, 72, 40, 104, 24, 88, 56, 120, 4, 68, 36, 100, 20, 84, 52,\n\t116, 3, 131, 67, 195, 35, 163, 99, 227];\nconst static_ltree2_second_part = extractArray([[144, 8], [112, 9], [24, 7], [8, 8]]);\nStaticTree.static_ltree = flatArray(static_ltree2_first_part.map((value, index) => [value, static_ltree2_second_part[index]]));\n\nconst static_dtree_first_part = [0, 16, 8, 24, 4, 20, 12, 28, 2, 18, 10, 26, 6, 22, 14, 30, 1, 17, 9, 25, 5, 21, 13, 29, 3, 19, 11, 27, 7, 23];\nconst static_dtree_second_part = extractArray([[30, 5]]);\nStaticTree.static_dtree = flatArray(static_dtree_first_part.map((value, index) => [value, static_dtree_second_part[index]]));\n\nStaticTree.static_l_desc = new StaticTree(StaticTree.static_ltree, Tree.extra_lbits, LITERALS + 1, L_CODES, MAX_BITS);\n\nStaticTree.static_d_desc = new StaticTree(StaticTree.static_dtree, Tree.extra_dbits, 0, D_CODES, MAX_BITS);\n\nStaticTree.static_bl_desc = new StaticTree(null, Tree.extra_blbits, 0, BL_CODES, MAX_BL_BITS);\n\n// Deflate\n\nconst MAX_MEM_LEVEL = 9;\nconst DEF_MEM_LEVEL = 8;\n\nfunction Config(good_length, max_lazy, nice_length, max_chain, func) {\n\tconst that = this;\n\tthat.good_length = good_length;\n\tthat.max_lazy = max_lazy;\n\tthat.nice_length = nice_length;\n\tthat.max_chain = max_chain;\n\tthat.func = func;\n}\n\nconst STORED = 0;\nconst FAST = 1;\nconst SLOW = 2;\nconst config_table = [\n\tnew Config(0, 0, 0, 0, STORED),\n\tnew Config(4, 4, 8, 4, FAST),\n\tnew Config(4, 5, 16, 8, FAST),\n\tnew Config(4, 6, 32, 32, FAST),\n\tnew Config(4, 4, 16, 16, SLOW),\n\tnew Config(8, 16, 32, 32, SLOW),\n\tnew Config(8, 16, 128, 128, SLOW),\n\tnew Config(8, 32, 128, 256, SLOW),\n\tnew Config(32, 128, 258, 1024, SLOW),\n\tnew Config(32, 258, 258, 4096, SLOW)\n];\n\nconst z_errmsg = [\"need dictionary\", // Z_NEED_DICT\n\t// 2\n\t\"stream end\", // Z_STREAM_END 1\n\t\"\", // Z_OK 0\n\t\"\", // Z_ERRNO (-1)\n\t\"stream error\", // Z_STREAM_ERROR (-2)\n\t\"data error\", // Z_DATA_ERROR (-3)\n\t\"\", // Z_MEM_ERROR (-4)\n\t\"buffer error\", // Z_BUF_ERROR (-5)\n\t\"\",// Z_VERSION_ERROR (-6)\n\t\"\"];\n\n// block not completed, need more input or more output\nconst NeedMore = 0;\n\n// block flush performed\nconst BlockDone = 1;\n\n// finish started, need only more output at next deflate\nconst FinishStarted = 2;\n\n// finish done, accept no more input or output\nconst FinishDone = 3;\n\n// preset dictionary flag in zlib header\nconst PRESET_DICT = 0x20;\n\nconst INIT_STATE = 42;\nconst BUSY_STATE = 113;\nconst FINISH_STATE = 666;\n\n// The deflate compression method\nconst Z_DEFLATED = 8;\n\nconst STORED_BLOCK = 0;\nconst STATIC_TREES = 1;\nconst DYN_TREES = 2;\n\nconst MIN_MATCH = 3;\nconst MAX_MATCH = 258;\nconst MIN_LOOKAHEAD = (MAX_MATCH + MIN_MATCH + 1);\n\nfunction smaller(tree, n, m, depth) {\n\tconst tn2 = tree[n * 2];\n\tconst tm2 = tree[m * 2];\n\treturn (tn2 < tm2 || (tn2 == tm2 && depth[n] <= depth[m]));\n}\n\nfunction Deflate() {\n\n\tconst that = this;\n\tlet strm; // pointer back to this zlib stream\n\tlet status; // as the name implies\n\t// pending_buf; // output still pending\n\tlet pending_buf_size; // size of pending_buf\n\t// pending_out; // next pending byte to output to the stream\n\t// pending; // nb of bytes in the pending buffer\n\n\t// dist_buf; // buffer for distances\n\t// lc_buf; // buffer for literals or lengths\n\t// To simplify the code, dist_buf and lc_buf have the same number of elements.\n\t// To use different lengths, an extra flag array would be necessary.\n\n\tlet last_flush; // value of flush param for previous deflate call\n\n\tlet w_size; // LZ77 win size (32K by default)\n\tlet w_bits; // log2(w_size) (8..16)\n\tlet w_mask; // w_size - 1\n\n\tlet win;\n\t// Sliding win. Input bytes are read into the second half of the win,\n\t// and move to the first half later to keep a dictionary of at least wSize\n\t// bytes. With this organization, matches are limited to a distance of\n\t// wSize-MAX_MATCH bytes, but this ensures that IO is always\n\t// performed with a length multiple of the block size. Also, it limits\n\t// the win size to 64K, which is quite useful on MSDOS.\n\t// To do: use the user input buffer as sliding win.\n\n\tlet window_size;\n\t// Actual size of win: 2*wSize, except when the user input buffer\n\t// is directly used as sliding win.\n\n\tlet prev;\n\t// Link to older string with same hash index. To limit the size of this\n\t// array to 64K, this link is maintained only for the last 32K strings.\n\t// An index in this array is thus a win index modulo 32K.\n\n\tlet head; // Heads of the hash chains or NIL.\n\n\tlet ins_h; // hash index of string to be inserted\n\tlet hash_size; // number of elements in hash table\n\tlet hash_bits; // log2(hash_size)\n\tlet hash_mask; // hash_size-1\n\n\t// Number of bits by which ins_h must be shifted at each input\n\t// step. It must be such that after MIN_MATCH steps, the oldest\n\t// byte no longer takes part in the hash key, that is:\n\t// hash_shift * MIN_MATCH >= hash_bits\n\tlet hash_shift;\n\n\t// Window position at the beginning of the current output block. Gets\n\t// negative when the win is moved backwards.\n\n\tlet block_start;\n\n\tlet match_length; // length of best match\n\tlet prev_match; // previous match\n\tlet match_available; // set if previous match exists\n\tlet strstart; // start of string to insert\n\tlet match_start; // start of matching string\n\tlet lookahead; // number of valid bytes ahead in win\n\n\t// Length of the best match at previous step. Matches not greater than this\n\t// are discarded. This is used in the lazy match evaluation.\n\tlet prev_length;\n\n\t// To speed up deflation, hash chains are never searched beyond this\n\t// length. A higher limit improves compression ratio but degrades the speed.\n\tlet max_chain_length;\n\n\t// Attempt to find a better match only when the current match is strictly\n\t// smaller than this value. This mechanism is used only for compression\n\t// levels >= 4.\n\tlet max_lazy_match;\n\n\t// Insert new strings in the hash table only if the match length is not\n\t// greater than this length. This saves time but degrades compression.\n\t// max_insert_length is used only for compression levels <= 3.\n\n\tlet level; // compression level (1..9)\n\tlet strategy; // favor or force Huffman coding\n\n\t// Use a faster search when the previous match is longer than this\n\tlet good_match;\n\n\t// Stop searching when current match exceeds this\n\tlet nice_match;\n\n\tlet dyn_ltree; // literal and length tree\n\tlet dyn_dtree; // distance tree\n\tlet bl_tree; // Huffman tree for bit lengths\n\n\tconst l_desc = new Tree(); // desc for literal tree\n\tconst d_desc = new Tree(); // desc for distance tree\n\tconst bl_desc = new Tree(); // desc for bit length tree\n\n\t// that.heap_len; // number of elements in the heap\n\t// that.heap_max; // element of largest frequency\n\t// The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used.\n\t// The same heap array is used to build all trees.\n\n\t// Depth of each subtree used as tie breaker for trees of equal frequency\n\tthat.depth = [];\n\n\t// Size of match buffer for literals/lengths. There are 4 reasons for\n\t// limiting lit_bufsize to 64K:\n\t// - frequencies can be kept in 16 bit counters\n\t// - if compression is not successful for the first block, all input\n\t// data is still in the win so we can still emit a stored block even\n\t// when input comes from standard input. (This can also be done for\n\t// all blocks if lit_bufsize is not greater than 32K.)\n\t// - if compression is not successful for a file smaller than 64K, we can\n\t// even emit a stored file instead of a stored block (saving 5 bytes).\n\t// This is applicable only for zip (not gzip or zlib).\n\t// - creating new Huffman trees less frequently may not provide fast\n\t// adaptation to changes in the input data statistics. (Take for\n\t// example a binary file with poorly compressible code followed by\n\t// a highly compressible string table.) Smaller buffer sizes give\n\t// fast adaptation but have of course the overhead of transmitting\n\t// trees more frequently.\n\t// - I can't count above 4\n\tlet lit_bufsize;\n\n\tlet last_lit; // running index in dist_buf and lc_buf\n\n\t// that.opt_len; // bit length of current block with optimal trees\n\t// that.static_len; // bit length of current block with static trees\n\tlet matches; // number of string matches in current block\n\tlet last_eob_len; // bit length of EOB code for last block\n\n\t// Output buffer. bits are inserted starting at the bottom (least\n\t// significant bits).\n\tlet bi_buf;\n\n\t// Number of valid bits in bi_buf. All bits above the last valid bit\n\t// are always zero.\n\tlet bi_valid;\n\n\t// number of codes at each bit length for an optimal tree\n\tthat.bl_count = [];\n\n\t// heap used to build the Huffman trees\n\tthat.heap = [];\n\n\tdyn_ltree = [];\n\tdyn_dtree = [];\n\tbl_tree = [];\n\n\tfunction lm_init() {\n\t\twindow_size = 2 * w_size;\n\n\t\thead[hash_size - 1] = 0;\n\t\tfor (let i = 0; i < hash_size - 1; i++) {\n\t\t\thead[i] = 0;\n\t\t}\n\n\t\t// Set the default configuration parameters:\n\t\tmax_lazy_match = config_table[level].max_lazy;\n\t\tgood_match = config_table[level].good_length;\n\t\tnice_match = config_table[level].nice_length;\n\t\tmax_chain_length = config_table[level].max_chain;\n\n\t\tstrstart = 0;\n\t\tblock_start = 0;\n\t\tlookahead = 0;\n\t\tmatch_length = prev_length = MIN_MATCH - 1;\n\t\tmatch_available = 0;\n\t\tins_h = 0;\n\t}\n\n\tfunction init_block() {\n\t\tlet i;\n\t\t// Initialize the trees.\n\t\tfor (i = 0; i < L_CODES; i++)\n\t\t\tdyn_ltree[i * 2] = 0;\n\t\tfor (i = 0; i < D_CODES; i++)\n\t\t\tdyn_dtree[i * 2] = 0;\n\t\tfor (i = 0; i < BL_CODES; i++)\n\t\t\tbl_tree[i * 2] = 0;\n\n\t\tdyn_ltree[END_BLOCK * 2] = 1;\n\t\tthat.opt_len = that.static_len = 0;\n\t\tlast_lit = matches = 0;\n\t}\n\n\t// Initialize the tree data structures for a new zlib stream.\n\tfunction tr_init() {\n\n\t\tl_desc.dyn_tree = dyn_ltree;\n\t\tl_desc.stat_desc = StaticTree.static_l_desc;\n\n\t\td_desc.dyn_tree = dyn_dtree;\n\t\td_desc.stat_desc = StaticTree.static_d_desc;\n\n\t\tbl_desc.dyn_tree = bl_tree;\n\t\tbl_desc.stat_desc = StaticTree.static_bl_desc;\n\n\t\tbi_buf = 0;\n\t\tbi_valid = 0;\n\t\tlast_eob_len = 8; // enough lookahead for inflate\n\n\t\t// Initialize the first block of the first file:\n\t\tinit_block();\n\t}\n\n\t// Restore the heap property by moving down the tree starting at node k,\n\t// exchanging a node with the smallest of its two sons if necessary,\n\t// stopping\n\t// when the heap property is re-established (each father smaller than its\n\t// two sons).\n\tthat.pqdownheap = function (tree, // the tree to restore\n\t\tk // node to move down\n\t) {\n\t\tconst heap = that.heap;\n\t\tconst v = heap[k];\n\t\tlet j = k << 1; // left son of k\n\t\twhile (j <= that.heap_len) {\n\t\t\t// Set j to the smallest of the two sons:\n\t\t\tif (j < that.heap_len && smaller(tree, heap[j + 1], heap[j], that.depth)) {\n\t\t\t\tj++;\n\t\t\t}\n\t\t\t// Exit if v is smaller than both sons\n\t\t\tif (smaller(tree, v, heap[j], that.depth))\n\t\t\t\tbreak;\n\n\t\t\t// Exchange v with the smallest son\n\t\t\theap[k] = heap[j];\n\t\t\tk = j;\n\t\t\t// And continue down the tree, setting j to the left son of k\n\t\t\tj <<= 1;\n\t\t}\n\t\theap[k] = v;\n\t};\n\n\t// Scan a literal or distance tree to determine the frequencies of the codes\n\t// in the bit length tree.\n\tfunction scan_tree(tree,// the tree to be scanned\n\t\tmax_code // and its largest code of non zero frequency\n\t) {\n\t\tlet prevlen = -1; // last emitted length\n\t\tlet curlen; // length of current code\n\t\tlet nextlen = tree[0 * 2 + 1]; // length of next code\n\t\tlet count = 0; // repeat count of the current code\n\t\tlet max_count = 7; // max repeat count\n\t\tlet min_count = 4; // min repeat count\n\n\t\tif (nextlen === 0) {\n\t\t\tmax_count = 138;\n\t\t\tmin_count = 3;\n\t\t}\n\t\ttree[(max_code + 1) * 2 + 1] = 0xffff; // guard\n\n\t\tfor (let n = 0; n <= max_code; n++) {\n\t\t\tcurlen = nextlen;\n\t\t\tnextlen = tree[(n + 1) * 2 + 1];\n\t\t\tif (++count < max_count && curlen == nextlen) {\n\t\t\t\tcontinue;\n\t\t\t} else if (count < min_count) {\n\t\t\t\tbl_tree[curlen * 2] += count;\n\t\t\t} else if (curlen !== 0) {\n\t\t\t\tif (curlen != prevlen)\n\t\t\t\t\tbl_tree[curlen * 2]++;\n\t\t\t\tbl_tree[REP_3_6 * 2]++;\n\t\t\t} else if (count <= 10) {\n\t\t\t\tbl_tree[REPZ_3_10 * 2]++;\n\t\t\t} else {\n\t\t\t\tbl_tree[REPZ_11_138 * 2]++;\n\t\t\t}\n\t\t\tcount = 0;\n\t\t\tprevlen = curlen;\n\t\t\tif (nextlen === 0) {\n\t\t\t\tmax_count = 138;\n\t\t\t\tmin_count = 3;\n\t\t\t} else if (curlen == nextlen) {\n\t\t\t\tmax_count = 6;\n\t\t\t\tmin_count = 3;\n\t\t\t} else {\n\t\t\t\tmax_count = 7;\n\t\t\t\tmin_count = 4;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Construct the Huffman tree for the bit lengths and return the index in\n\t// bl_order of the last bit length code to send.\n\tfunction build_bl_tree() {\n\t\tlet max_blindex; // index of last bit length code of non zero freq\n\n\t\t// Determine the bit length frequencies for literal and distance trees\n\t\tscan_tree(dyn_ltree, l_desc.max_code);\n\t\tscan_tree(dyn_dtree, d_desc.max_code);\n\n\t\t// Build the bit length tree:\n\t\tbl_desc.build_tree(that);\n\t\t// opt_len now includes the length of the tree representations, except\n\t\t// the lengths of the bit lengths codes and the 5+5+4 bits for the\n\t\t// counts.\n\n\t\t// Determine the number of bit length codes to send. The pkzip format\n\t\t// requires that at least 4 bit length codes be sent. (appnote.txt says\n\t\t// 3 but the actual value used is 4.)\n\t\tfor (max_blindex = BL_CODES - 1; max_blindex >= 3; max_blindex--) {\n\t\t\tif (bl_tree[Tree.bl_order[max_blindex] * 2 + 1] !== 0)\n\t\t\t\tbreak;\n\t\t}\n\t\t// Update opt_len to include the bit length tree and counts\n\t\tthat.opt_len += 3 * (max_blindex + 1) + 5 + 5 + 4;\n\n\t\treturn max_blindex;\n\t}\n\n\t// Output a byte on the stream.\n\t// IN assertion: there is enough room in pending_buf.\n\tfunction put_byte(p) {\n\t\tthat.pending_buf[that.pending++] = p;\n\t}\n\n\tfunction put_short(w) {\n\t\tput_byte(w & 0xff);\n\t\tput_byte((w >>> 8) & 0xff);\n\t}\n\n\tfunction putShortMSB(b) {\n\t\tput_byte((b >> 8) & 0xff);\n\t\tput_byte((b & 0xff) & 0xff);\n\t}\n\n\tfunction send_bits(value, length) {\n\t\tlet val;\n\t\tconst len = length;\n\t\tif (bi_valid > Buf_size - len) {\n\t\t\tval = value;\n\t\t\t// bi_buf |= (val << bi_valid);\n\t\t\tbi_buf |= ((val << bi_valid) & 0xffff);\n\t\t\tput_short(bi_buf);\n\t\t\tbi_buf = val >>> (Buf_size - bi_valid);\n\t\t\tbi_valid += len - Buf_size;\n\t\t} else {\n\t\t\t// bi_buf |= (value) << bi_valid;\n\t\t\tbi_buf |= (((value) << bi_valid) & 0xffff);\n\t\t\tbi_valid += len;\n\t\t}\n\t}\n\n\tfunction send_code(c, tree) {\n\t\tconst c2 = c * 2;\n\t\tsend_bits(tree[c2] & 0xffff, tree[c2 + 1] & 0xffff);\n\t}\n\n\t// Send a literal or distance tree in compressed form, using the codes in\n\t// bl_tree.\n\tfunction send_tree(tree,// the tree to be sent\n\t\tmax_code // and its largest code of non zero frequency\n\t) {\n\t\tlet n; // iterates over all tree elements\n\t\tlet prevlen = -1; // last emitted length\n\t\tlet curlen; // length of current code\n\t\tlet nextlen = tree[0 * 2 + 1]; // length of next code\n\t\tlet count = 0; // repeat count of the current code\n\t\tlet max_count = 7; // max repeat count\n\t\tlet min_count = 4; // min repeat count\n\n\t\tif (nextlen === 0) {\n\t\t\tmax_count = 138;\n\t\t\tmin_count = 3;\n\t\t}\n\n\t\tfor (n = 0; n <= max_code; n++) {\n\t\t\tcurlen = nextlen;\n\t\t\tnextlen = tree[(n + 1) * 2 + 1];\n\t\t\tif (++count < max_count && curlen == nextlen) {\n\t\t\t\tcontinue;\n\t\t\t} else if (count < min_count) {\n\t\t\t\tdo {\n\t\t\t\t\tsend_code(curlen, bl_tree);\n\t\t\t\t} while (--count !== 0);\n\t\t\t} else if (curlen !== 0) {\n\t\t\t\tif (curlen != prevlen) {\n\t\t\t\t\tsend_code(curlen, bl_tree);\n\t\t\t\t\tcount--;\n\t\t\t\t}\n\t\t\t\tsend_code(REP_3_6, bl_tree);\n\t\t\t\tsend_bits(count - 3, 2);\n\t\t\t} else if (count <= 10) {\n\t\t\t\tsend_code(REPZ_3_10, bl_tree);\n\t\t\t\tsend_bits(count - 3, 3);\n\t\t\t} else {\n\t\t\t\tsend_code(REPZ_11_138, bl_tree);\n\t\t\t\tsend_bits(count - 11, 7);\n\t\t\t}\n\t\t\tcount = 0;\n\t\t\tprevlen = curlen;\n\t\t\tif (nextlen === 0) {\n\t\t\t\tmax_count = 138;\n\t\t\t\tmin_count = 3;\n\t\t\t} else if (curlen == nextlen) {\n\t\t\t\tmax_count = 6;\n\t\t\t\tmin_count = 3;\n\t\t\t} else {\n\t\t\t\tmax_count = 7;\n\t\t\t\tmin_count = 4;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Send the header for a block using dynamic Huffman trees: the counts, the\n\t// lengths of the bit length codes, the literal tree and the distance tree.\n\t// IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4.\n\tfunction send_all_trees(lcodes, dcodes, blcodes) {\n\t\tlet rank; // index in bl_order\n\n\t\tsend_bits(lcodes - 257, 5); // not +255 as stated in appnote.txt\n\t\tsend_bits(dcodes - 1, 5);\n\t\tsend_bits(blcodes - 4, 4); // not -3 as stated in appnote.txt\n\t\tfor (rank = 0; rank < blcodes; rank++) {\n\t\t\tsend_bits(bl_tree[Tree.bl_order[rank] * 2 + 1], 3);\n\t\t}\n\t\tsend_tree(dyn_ltree, lcodes - 1); // literal tree\n\t\tsend_tree(dyn_dtree, dcodes - 1); // distance tree\n\t}\n\n\t// Flush the bit buffer, keeping at most 7 bits in it.\n\tfunction bi_flush() {\n\t\tif (bi_valid == 16) {\n\t\t\tput_short(bi_buf);\n\t\t\tbi_buf = 0;\n\t\t\tbi_valid = 0;\n\t\t} else if (bi_valid >= 8) {\n\t\t\tput_byte(bi_buf & 0xff);\n\t\t\tbi_buf >>>= 8;\n\t\t\tbi_valid -= 8;\n\t\t}\n\t}\n\n\t// Send one empty static block to give enough lookahead for inflate.\n\t// This takes 10 bits, of which 7 may remain in the bit buffer.\n\t// The current inflate code requires 9 bits of lookahead. If the\n\t// last two codes for the previous block (real code plus EOB) were coded\n\t// on 5 bits or less, inflate may have only 5+3 bits of lookahead to decode\n\t// the last real code. In this case we send two empty static blocks instead\n\t// of one. (There are no problems if the previous block is stored or fixed.)\n\t// To simplify the code, we assume the worst case of last real code encoded\n\t// on one bit only.\n\tfunction _tr_align() {\n\t\tsend_bits(STATIC_TREES << 1, 3);\n\t\tsend_code(END_BLOCK, StaticTree.static_ltree);\n\n\t\tbi_flush();\n\n\t\t// Of the 10 bits for the empty block, we have already sent\n\t\t// (10 - bi_valid) bits. The lookahead for the last real code (before\n\t\t// the EOB of the previous block) was thus at least one plus the length\n\t\t// of the EOB plus what we have just sent of the empty static block.\n\t\tif (1 + last_eob_len + 10 - bi_valid < 9) {\n\t\t\tsend_bits(STATIC_TREES << 1, 3);\n\t\t\tsend_code(END_BLOCK, StaticTree.static_ltree);\n\t\t\tbi_flush();\n\t\t}\n\t\tlast_eob_len = 7;\n\t}\n\n\t// Save the match info and tally the frequency counts. Return true if\n\t// the current block must be flushed.\n\tfunction _tr_tally(dist, // distance of matched string\n\t\tlc // match length-MIN_MATCH or unmatched char (if dist==0)\n\t) {\n\t\tlet out_length, in_length, dcode;\n\t\tthat.dist_buf[last_lit] = dist;\n\t\tthat.lc_buf[last_lit] = lc & 0xff;\n\t\tlast_lit++;\n\n\t\tif (dist === 0) {\n\t\t\t// lc is the unmatched char\n\t\t\tdyn_ltree[lc * 2]++;\n\t\t} else {\n\t\t\tmatches++;\n\t\t\t// Here, lc is the match length - MIN_MATCH\n\t\t\tdist--; // dist = match distance - 1\n\t\t\tdyn_ltree[(Tree._length_code[lc] + LITERALS + 1) * 2]++;\n\t\t\tdyn_dtree[Tree.d_code(dist) * 2]++;\n\t\t}\n\n\t\tif ((last_lit & 0x1fff) === 0 && level > 2) {\n\t\t\t// Compute an upper bound for the compressed length\n\t\t\tout_length = last_lit * 8;\n\t\t\tin_length = strstart - block_start;\n\t\t\tfor (dcode = 0; dcode < D_CODES; dcode++) {\n\t\t\t\tout_length += dyn_dtree[dcode * 2] * (5 + Tree.extra_dbits[dcode]);\n\t\t\t}\n\t\t\tout_length >>>= 3;\n\t\t\tif ((matches < Math.floor(last_lit / 2)) && out_length < Math.floor(in_length / 2))\n\t\t\t\treturn true;\n\t\t}\n\n\t\treturn (last_lit == lit_bufsize - 1);\n\t\t// We avoid equality with lit_bufsize because of wraparound at 64K\n\t\t// on 16 bit machines and because stored blocks are restricted to\n\t\t// 64K-1 bytes.\n\t}\n\n\t// Send the block data compressed using the given Huffman trees\n\tfunction compress_block(ltree, dtree) {\n\t\tlet dist; // distance of matched string\n\t\tlet lc; // match length or unmatched char (if dist === 0)\n\t\tlet lx = 0; // running index in dist_buf and lc_buf\n\t\tlet code; // the code to send\n\t\tlet extra; // number of extra bits to send\n\n\t\tif (last_lit !== 0) {\n\t\t\tdo {\n\t\t\t\tdist = that.dist_buf[lx];\n\t\t\t\tlc = that.lc_buf[lx];\n\t\t\t\tlx++;\n\n\t\t\t\tif (dist === 0) {\n\t\t\t\t\tsend_code(lc, ltree); // send a literal byte\n\t\t\t\t} else {\n\t\t\t\t\t// Here, lc is the match length - MIN_MATCH\n\t\t\t\t\tcode = Tree._length_code[lc];\n\n\t\t\t\t\tsend_code(code + LITERALS + 1, ltree); // send the length\n\t\t\t\t\t// code\n\t\t\t\t\textra = Tree.extra_lbits[code];\n\t\t\t\t\tif (extra !== 0) {\n\t\t\t\t\t\tlc -= Tree.base_length[code];\n\t\t\t\t\t\tsend_bits(lc, extra); // send the extra length bits\n\t\t\t\t\t}\n\t\t\t\t\tdist--; // dist is now the match distance - 1\n\t\t\t\t\tcode = Tree.d_code(dist);\n\n\t\t\t\t\tsend_code(code, dtree); // send the distance code\n\t\t\t\t\textra = Tree.extra_dbits[code];\n\t\t\t\t\tif (extra !== 0) {\n\t\t\t\t\t\tdist -= Tree.base_dist[code];\n\t\t\t\t\t\tsend_bits(dist, extra); // send the extra distance bits\n\t\t\t\t\t}\n\t\t\t\t} // literal or match pair ?\n\t\t\t} while (lx < last_lit);\n\t\t}\n\n\t\tsend_code(END_BLOCK, ltree);\n\t\tlast_eob_len = ltree[END_BLOCK * 2 + 1];\n\t}\n\n\t// Flush the bit buffer and align the output on a byte boundary\n\tfunction bi_windup() {\n\t\tif (bi_valid > 8) {\n\t\t\tput_short(bi_buf);\n\t\t} else if (bi_valid > 0) {\n\t\t\tput_byte(bi_buf & 0xff);\n\t\t}\n\t\tbi_buf = 0;\n\t\tbi_valid = 0;\n\t}\n\n\t// Copy a stored block, storing first the length and its\n\t// one's complement if requested.\n\tfunction copy_block(buf, // the input data\n\t\tlen, // its length\n\t\theader // true if block header must be written\n\t) {\n\t\tbi_windup(); // align on byte boundary\n\t\tlast_eob_len = 8; // enough lookahead for inflate\n\n\t\tif (header) {\n\t\t\tput_short(len);\n\t\t\tput_short(~len);\n\t\t}\n\n\t\tthat.pending_buf.set(win.subarray(buf, buf + len), that.pending);\n\t\tthat.pending += len;\n\t}\n\n\t// Send a stored block\n\tfunction _tr_stored_block(buf, // input block\n\t\tstored_len, // length of input block\n\t\teof // true if this is the last block for a file\n\t) {\n\t\tsend_bits((STORED_BLOCK << 1) + (eof ? 1 : 0), 3); // send block type\n\t\tcopy_block(buf, stored_len, true); // with header\n\t}\n\n\t// Determine the best encoding for the current block: dynamic trees, static\n\t// trees or store, and output the encoded block to the zip file.\n\tfunction _tr_flush_block(buf, // input block, or NULL if too old\n\t\tstored_len, // length of input block\n\t\teof // true if this is the last block for a file\n\t) {\n\t\tlet opt_lenb, static_lenb;// opt_len and static_len in bytes\n\t\tlet max_blindex = 0; // index of last bit length code of non zero freq\n\n\t\t// Build the Huffman trees unless a stored block is forced\n\t\tif (level > 0) {\n\t\t\t// Construct the literal and distance trees\n\t\t\tl_desc.build_tree(that);\n\n\t\t\td_desc.build_tree(that);\n\n\t\t\t// At this point, opt_len and static_len are the total bit lengths\n\t\t\t// of\n\t\t\t// the compressed block data, excluding the tree representations.\n\n\t\t\t// Build the bit length tree for the above two trees, and get the\n\t\t\t// index\n\t\t\t// in bl_order of the last bit length code to send.\n\t\t\tmax_blindex = build_bl_tree();\n\n\t\t\t// Determine the best encoding. Compute first the block length in\n\t\t\t// bytes\n\t\t\topt_lenb = (that.opt_len + 3 + 7) >>> 3;\n\t\t\tstatic_lenb = (that.static_len + 3 + 7) >>> 3;\n\n\t\t\tif (static_lenb <= opt_lenb)\n\t\t\t\topt_lenb = static_lenb;\n\t\t} else {\n\t\t\topt_lenb = static_lenb = stored_len + 5; // force a stored block\n\t\t}\n\n\t\tif ((stored_len + 4 <= opt_lenb) && buf != -1) {\n\t\t\t// 4: two words for the lengths\n\t\t\t// The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE.\n\t\t\t// Otherwise we can't have processed more than WSIZE input bytes\n\t\t\t// since\n\t\t\t// the last block flush, because compression would have been\n\t\t\t// successful. If LIT_BUFSIZE <= WSIZE, it is never too late to\n\t\t\t// transform a block into a stored block.\n\t\t\t_tr_stored_block(buf, stored_len, eof);\n\t\t} else if (static_lenb == opt_lenb) {\n\t\t\tsend_bits((STATIC_TREES << 1) + (eof ? 1 : 0), 3);\n\t\t\tcompress_block(StaticTree.static_ltree, StaticTree.static_dtree);\n\t\t} else {\n\t\t\tsend_bits((DYN_TREES << 1) + (eof ? 1 : 0), 3);\n\t\t\tsend_all_trees(l_desc.max_code + 1, d_desc.max_code + 1, max_blindex + 1);\n\t\t\tcompress_block(dyn_ltree, dyn_dtree);\n\t\t}\n\n\t\t// The above check is made mod 2^32, for files larger than 512 MB\n\t\t// and uLong implemented on 32 bits.\n\n\t\tinit_block();\n\n\t\tif (eof) {\n\t\t\tbi_windup();\n\t\t}\n\t}\n\n\tfunction flush_block_only(eof) {\n\t\t_tr_flush_block(block_start >= 0 ? block_start : -1, strstart - block_start, eof);\n\t\tblock_start = strstart;\n\t\tstrm.flush_pending();\n\t}\n\n\t// Fill the win when the lookahead becomes insufficient.\n\t// Updates strstart and lookahead.\n\t//\n\t// IN assertion: lookahead < MIN_LOOKAHEAD\n\t// OUT assertions: strstart <= window_size-MIN_LOOKAHEAD\n\t// At least one byte has been read, or avail_in === 0; reads are\n\t// performed for at least two bytes (required for the zip translate_eol\n\t// option -- not supported here).\n\tfunction fill_window() {\n\t\tlet n, m;\n\t\tlet p;\n\t\tlet more; // Amount of free space at the end of the win.\n\n\t\tdo {\n\t\t\tmore = (window_size - lookahead - strstart);\n\n\t\t\t// Deal with !@#$% 64K limit:\n\t\t\tif (more === 0 && strstart === 0 && lookahead === 0) {\n\t\t\t\tmore = w_size;\n\t\t\t} else if (more == -1) {\n\t\t\t\t// Very unlikely, but possible on 16 bit machine if strstart ==\n\t\t\t\t// 0\n\t\t\t\t// and lookahead == 1 (input done one byte at time)\n\t\t\t\tmore--;\n\n\t\t\t\t// If the win is almost full and there is insufficient\n\t\t\t\t// lookahead,\n\t\t\t\t// move the upper half to the lower one to make room in the\n\t\t\t\t// upper half.\n\t\t\t} else if (strstart >= w_size + w_size - MIN_LOOKAHEAD) {\n\t\t\t\twin.set(win.subarray(w_size, w_size + w_size), 0);\n\n\t\t\t\tmatch_start -= w_size;\n\t\t\t\tstrstart -= w_size; // we now have strstart >= MAX_DIST\n\t\t\t\tblock_start -= w_size;\n\n\t\t\t\t// Slide the hash table (could be avoided with 32 bit values\n\t\t\t\t// at the expense of memory usage). We slide even when level ==\n\t\t\t\t// 0\n\t\t\t\t// to keep the hash table consistent if we switch back to level\n\t\t\t\t// > 0\n\t\t\t\t// later. (Using level 0 permanently is not an optimal usage of\n\t\t\t\t// zlib, so we don't care about this pathological case.)\n\n\t\t\t\tn = hash_size;\n\t\t\t\tp = n;\n\t\t\t\tdo {\n\t\t\t\t\tm = (head[--p] & 0xffff);\n\t\t\t\t\thead[p] = (m >= w_size ? m - w_size : 0);\n\t\t\t\t} while (--n !== 0);\n\n\t\t\t\tn = w_size;\n\t\t\t\tp = n;\n\t\t\t\tdo {\n\t\t\t\t\tm = (prev[--p] & 0xffff);\n\t\t\t\t\tprev[p] = (m >= w_size ? m - w_size : 0);\n\t\t\t\t\t// If n is not on any hash chain, prev[n] is garbage but\n\t\t\t\t\t// its value will never be used.\n\t\t\t\t} while (--n !== 0);\n\t\t\t\tmore += w_size;\n\t\t\t}\n\n\t\t\tif (strm.avail_in === 0)\n\t\t\t\treturn;\n\n\t\t\t// If there was no sliding:\n\t\t\t// strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 &&\n\t\t\t// more == window_size - lookahead - strstart\n\t\t\t// => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1)\n\t\t\t// => more >= window_size - 2*WSIZE + 2\n\t\t\t// In the BIG_MEM or MMAP case (not yet supported),\n\t\t\t// window_size == input_size + MIN_LOOKAHEAD &&\n\t\t\t// strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD.\n\t\t\t// Otherwise, window_size == 2*WSIZE so more >= 2.\n\t\t\t// If there was sliding, more >= WSIZE. So in all cases, more >= 2.\n\n\t\t\tn = strm.read_buf(win, strstart + lookahead, more);\n\t\t\tlookahead += n;\n\n\t\t\t// Initialize the hash value now that we have some input:\n\t\t\tif (lookahead >= MIN_MATCH) {\n\t\t\t\tins_h = win[strstart] & 0xff;\n\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[strstart + 1] & 0xff)) & hash_mask;\n\t\t\t}\n\t\t\t// If the whole input has less than MIN_MATCH bytes, ins_h is\n\t\t\t// garbage,\n\t\t\t// but this is not important since only literal bytes will be\n\t\t\t// emitted.\n\t\t} while (lookahead < MIN_LOOKAHEAD && strm.avail_in !== 0);\n\t}\n\n\t// Copy without compression as much as possible from the input stream,\n\t// return\n\t// the current block state.\n\t// This function does not insert new strings in the dictionary since\n\t// uncompressible data is probably not useful. This function is used\n\t// only for the level=0 compression option.\n\t// NOTE: this function should be optimized to avoid extra copying from\n\t// win to pending_buf.\n\tfunction deflate_stored(flush) {\n\t\t// Stored blocks are limited to 0xffff bytes, pending_buf is limited\n\t\t// to pending_buf_size, and each stored block has a 5 byte header:\n\n\t\tlet max_block_size = 0xffff;\n\t\tlet max_start;\n\n\t\tif (max_block_size > pending_buf_size - 5) {\n\t\t\tmax_block_size = pending_buf_size - 5;\n\t\t}\n\n\t\t// Copy as much as possible from input to output:\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\t// Fill the win as much as possible:\n\t\t\tif (lookahead <= 1) {\n\t\t\t\tfill_window();\n\t\t\t\tif (lookahead === 0 && flush == Z_NO_FLUSH)\n\t\t\t\t\treturn NeedMore;\n\t\t\t\tif (lookahead === 0)\n\t\t\t\t\tbreak; // flush the current block\n\t\t\t}\n\n\t\t\tstrstart += lookahead;\n\t\t\tlookahead = 0;\n\n\t\t\t// Emit a stored block if pending_buf will be full:\n\t\t\tmax_start = block_start + max_block_size;\n\t\t\tif (strstart === 0 || strstart >= max_start) {\n\t\t\t\t// strstart === 0 is possible when wraparound on 16-bit machine\n\t\t\t\tlookahead = (strstart - max_start);\n\t\t\t\tstrstart = max_start;\n\n\t\t\t\tflush_block_only(false);\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\n\t\t\t}\n\n\t\t\t// Flush if we may have to slide, otherwise block_start may become\n\t\t\t// negative and the data will be gone:\n\t\t\tif (strstart - block_start >= w_size - MIN_LOOKAHEAD) {\n\t\t\t\tflush_block_only(false);\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\t\t\t}\n\t\t}\n\n\t\tflush_block_only(flush == Z_FINISH);\n\t\tif (strm.avail_out === 0)\n\t\t\treturn (flush == Z_FINISH) ? FinishStarted : NeedMore;\n\n\t\treturn flush == Z_FINISH ? FinishDone : BlockDone;\n\t}\n\n\tfunction longest_match(cur_match) {\n\t\tlet chain_length = max_chain_length; // max hash chain length\n\t\tlet scan = strstart; // current string\n\t\tlet match; // matched string\n\t\tlet len; // length of current match\n\t\tlet best_len = prev_length; // best match length so far\n\t\tconst limit = strstart > (w_size - MIN_LOOKAHEAD) ? strstart - (w_size - MIN_LOOKAHEAD) : 0;\n\t\tlet _nice_match = nice_match;\n\n\t\t// Stop when cur_match becomes <= limit. To simplify the code,\n\t\t// we prevent matches with the string of win index 0.\n\n\t\tconst wmask = w_mask;\n\n\t\tconst strend = strstart + MAX_MATCH;\n\t\tlet scan_end1 = win[scan + best_len - 1];\n\t\tlet scan_end = win[scan + best_len];\n\n\t\t// The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of\n\t\t// 16.\n\t\t// It is easy to get rid of this optimization if necessary.\n\n\t\t// Do not waste too much time if we already have a good match:\n\t\tif (prev_length >= good_match) {\n\t\t\tchain_length >>= 2;\n\t\t}\n\n\t\t// Do not look for matches beyond the end of the input. This is\n\t\t// necessary\n\t\t// to make deflate deterministic.\n\t\tif (_nice_match > lookahead)\n\t\t\t_nice_match = lookahead;\n\n\t\tdo {\n\t\t\tmatch = cur_match;\n\n\t\t\t// Skip to next match if the match length cannot increase\n\t\t\t// or if the match length is less than 2:\n\t\t\tif (win[match + best_len] != scan_end || win[match + best_len - 1] != scan_end1 || win[match] != win[scan]\n\t\t\t\t|| win[++match] != win[scan + 1])\n\t\t\t\tcontinue;\n\n\t\t\t// The check at best_len-1 can be removed because it will be made\n\t\t\t// again later. (This heuristic is not always a win.)\n\t\t\t// It is not necessary to compare scan[2] and match[2] since they\n\t\t\t// are always equal when the other bytes match, given that\n\t\t\t// the hash keys are equal and that HASH_BITS >= 8.\n\t\t\tscan += 2;\n\t\t\tmatch++;\n\n\t\t\t// We check for insufficient lookahead only every 8th comparison;\n\t\t\t// the 256th check will be made at strstart+258.\n\t\t\t// eslint-disable-next-line no-empty\n\t\t\tdo {\n\t\t\t\t// empty block\n\t\t\t} while (win[++scan] == win[++match] && win[++scan] == win[++match] && win[++scan] == win[++match]\n\t\t\t&& win[++scan] == win[++match] && win[++scan] == win[++match] && win[++scan] == win[++match]\n\t\t\t&& win[++scan] == win[++match] && win[++scan] == win[++match] && scan < strend);\n\n\t\t\tlen = MAX_MATCH - (strend - scan);\n\t\t\tscan = strend - MAX_MATCH;\n\n\t\t\tif (len > best_len) {\n\t\t\t\tmatch_start = cur_match;\n\t\t\t\tbest_len = len;\n\t\t\t\tif (len >= _nice_match)\n\t\t\t\t\tbreak;\n\t\t\t\tscan_end1 = win[scan + best_len - 1];\n\t\t\t\tscan_end = win[scan + best_len];\n\t\t\t}\n\n\t\t} while ((cur_match = (prev[cur_match & wmask] & 0xffff)) > limit && --chain_length !== 0);\n\n\t\tif (best_len <= lookahead)\n\t\t\treturn best_len;\n\t\treturn lookahead;\n\t}\n\n\t// Compress as much as possible from the input stream, return the current\n\t// block state.\n\t// This function does not perform lazy evaluation of matches and inserts\n\t// new strings in the dictionary only for unmatched strings or for short\n\t// matches. It is used only for the fast compression options.\n\tfunction deflate_fast(flush) {\n\t\t// short hash_head = 0; // head of the hash chain\n\t\tlet hash_head = 0; // head of the hash chain\n\t\tlet bflush; // set if current block must be flushed\n\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\t// Make sure that we always have enough lookahead, except\n\t\t\t// at the end of the input file. We need MAX_MATCH bytes\n\t\t\t// for the next match, plus MIN_MATCH bytes to insert the\n\t\t\t// string following the next match.\n\t\t\tif (lookahead < MIN_LOOKAHEAD) {\n\t\t\t\tfill_window();\n\t\t\t\tif (lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) {\n\t\t\t\t\treturn NeedMore;\n\t\t\t\t}\n\t\t\t\tif (lookahead === 0)\n\t\t\t\t\tbreak; // flush the current block\n\t\t\t}\n\n\t\t\t// Insert the string win[strstart .. strstart+2] in the\n\t\t\t// dictionary, and set hash_head to the head of the hash chain:\n\t\t\tif (lookahead >= MIN_MATCH) {\n\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\n\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\thead[ins_h] = strstart;\n\t\t\t}\n\n\t\t\t// Find the longest match, discarding those <= prev_length.\n\t\t\t// At this point we have always match_length < MIN_MATCH\n\n\t\t\tif (hash_head !== 0 && ((strstart - hash_head) & 0xffff) <= w_size - MIN_LOOKAHEAD) {\n\t\t\t\t// To simplify the code, we prevent matches with the string\n\t\t\t\t// of win index 0 (in particular we have to avoid a match\n\t\t\t\t// of the string with itself at the start of the input file).\n\t\t\t\tif (strategy != Z_HUFFMAN_ONLY) {\n\t\t\t\t\tmatch_length = longest_match(hash_head);\n\t\t\t\t}\n\t\t\t\t// longest_match() sets match_start\n\t\t\t}\n\t\t\tif (match_length >= MIN_MATCH) {\n\t\t\t\t// check_match(strstart, match_start, match_length);\n\n\t\t\t\tbflush = _tr_tally(strstart - match_start, match_length - MIN_MATCH);\n\n\t\t\t\tlookahead -= match_length;\n\n\t\t\t\t// Insert new strings in the hash table only if the match length\n\t\t\t\t// is not too large. This saves time but degrades compression.\n\t\t\t\tif (match_length <= max_lazy_match && lookahead >= MIN_MATCH) {\n\t\t\t\t\tmatch_length--; // string at strstart already in hash table\n\t\t\t\t\tdo {\n\t\t\t\t\t\tstrstart++;\n\n\t\t\t\t\t\tins_h = ((ins_h << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\t\t\thead[ins_h] = strstart;\n\n\t\t\t\t\t\t// strstart never exceeds WSIZE-MAX_MATCH, so there are\n\t\t\t\t\t\t// always MIN_MATCH bytes ahead.\n\t\t\t\t\t} while (--match_length !== 0);\n\t\t\t\t\tstrstart++;\n\t\t\t\t} else {\n\t\t\t\t\tstrstart += match_length;\n\t\t\t\t\tmatch_length = 0;\n\t\t\t\t\tins_h = win[strstart] & 0xff;\n\n\t\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[strstart + 1] & 0xff)) & hash_mask;\n\t\t\t\t\t// If lookahead < MIN_MATCH, ins_h is garbage, but it does\n\t\t\t\t\t// not\n\t\t\t\t\t// matter since it will be recomputed at next deflate call.\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// No match, output a literal byte\n\n\t\t\t\tbflush = _tr_tally(0, win[strstart] & 0xff);\n\t\t\t\tlookahead--;\n\t\t\t\tstrstart++;\n\t\t\t}\n\t\t\tif (bflush) {\n\n\t\t\t\tflush_block_only(false);\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\t\t\t}\n\t\t}\n\n\t\tflush_block_only(flush == Z_FINISH);\n\t\tif (strm.avail_out === 0) {\n\t\t\tif (flush == Z_FINISH)\n\t\t\t\treturn FinishStarted;\n\t\t\telse\n\t\t\t\treturn NeedMore;\n\t\t}\n\t\treturn flush == Z_FINISH ? FinishDone : BlockDone;\n\t}\n\n\t// Same as above, but achieves better compression. We use a lazy\n\t// evaluation for matches: a match is finally adopted only if there is\n\t// no better match at the next win position.\n\tfunction deflate_slow(flush) {\n\t\t// short hash_head = 0; // head of hash chain\n\t\tlet hash_head = 0; // head of hash chain\n\t\tlet bflush; // set if current block must be flushed\n\t\tlet max_insert;\n\n\t\t// Process the input block.\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\t// Make sure that we always have enough lookahead, except\n\t\t\t// at the end of the input file. We need MAX_MATCH bytes\n\t\t\t// for the next match, plus MIN_MATCH bytes to insert the\n\t\t\t// string following the next match.\n\n\t\t\tif (lookahead < MIN_LOOKAHEAD) {\n\t\t\t\tfill_window();\n\t\t\t\tif (lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) {\n\t\t\t\t\treturn NeedMore;\n\t\t\t\t}\n\t\t\t\tif (lookahead === 0)\n\t\t\t\t\tbreak; // flush the current block\n\t\t\t}\n\n\t\t\t// Insert the string win[strstart .. strstart+2] in the\n\t\t\t// dictionary, and set hash_head to the head of the hash chain:\n\n\t\t\tif (lookahead >= MIN_MATCH) {\n\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\thead[ins_h] = strstart;\n\t\t\t}\n\n\t\t\t// Find the longest match, discarding those <= prev_length.\n\t\t\tprev_length = match_length;\n\t\t\tprev_match = match_start;\n\t\t\tmatch_length = MIN_MATCH - 1;\n\n\t\t\tif (hash_head !== 0 && prev_length < max_lazy_match && ((strstart - hash_head) & 0xffff) <= w_size - MIN_LOOKAHEAD) {\n\t\t\t\t// To simplify the code, we prevent matches with the string\n\t\t\t\t// of win index 0 (in particular we have to avoid a match\n\t\t\t\t// of the string with itself at the start of the input file).\n\n\t\t\t\tif (strategy != Z_HUFFMAN_ONLY) {\n\t\t\t\t\tmatch_length = longest_match(hash_head);\n\t\t\t\t}\n\t\t\t\t// longest_match() sets match_start\n\n\t\t\t\tif (match_length <= 5 && (strategy == Z_FILTERED || (match_length == MIN_MATCH && strstart - match_start > 4096))) {\n\n\t\t\t\t\t// If prev_match is also MIN_MATCH, match_start is garbage\n\t\t\t\t\t// but we will ignore the current match anyway.\n\t\t\t\t\tmatch_length = MIN_MATCH - 1;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// If there was a match at the previous step and the current\n\t\t\t// match is not better, output the previous match:\n\t\t\tif (prev_length >= MIN_MATCH && match_length <= prev_length) {\n\t\t\t\tmax_insert = strstart + lookahead - MIN_MATCH;\n\t\t\t\t// Do not insert strings in hash table beyond this.\n\n\t\t\t\t// check_match(strstart-1, prev_match, prev_length);\n\n\t\t\t\tbflush = _tr_tally(strstart - 1 - prev_match, prev_length - MIN_MATCH);\n\n\t\t\t\t// Insert in hash table all strings up to the end of the match.\n\t\t\t\t// strstart-1 and strstart are already inserted. If there is not\n\t\t\t\t// enough lookahead, the last two strings are not inserted in\n\t\t\t\t// the hash table.\n\t\t\t\tlookahead -= prev_length - 1;\n\t\t\t\tprev_length -= 2;\n\t\t\t\tdo {\n\t\t\t\t\tif (++strstart <= max_insert) {\n\t\t\t\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(strstart) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\t\t\t\t// prev[strstart&w_mask]=hash_head=head[ins_h];\n\t\t\t\t\t\thash_head = (head[ins_h] & 0xffff);\n\t\t\t\t\t\tprev[strstart & w_mask] = head[ins_h];\n\t\t\t\t\t\thead[ins_h] = strstart;\n\t\t\t\t\t}\n\t\t\t\t} while (--prev_length !== 0);\n\t\t\t\tmatch_available = 0;\n\t\t\t\tmatch_length = MIN_MATCH - 1;\n\t\t\t\tstrstart++;\n\n\t\t\t\tif (bflush) {\n\t\t\t\t\tflush_block_only(false);\n\t\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\t\treturn NeedMore;\n\t\t\t\t}\n\t\t\t} else if (match_available !== 0) {\n\n\t\t\t\t// If there was no match at the previous position, output a\n\t\t\t\t// single literal. If there was a match but the current match\n\t\t\t\t// is longer, truncate the previous match to a single literal.\n\n\t\t\t\tbflush = _tr_tally(0, win[strstart - 1] & 0xff);\n\n\t\t\t\tif (bflush) {\n\t\t\t\t\tflush_block_only(false);\n\t\t\t\t}\n\t\t\t\tstrstart++;\n\t\t\t\tlookahead--;\n\t\t\t\tif (strm.avail_out === 0)\n\t\t\t\t\treturn NeedMore;\n\t\t\t} else {\n\t\t\t\t// There is no previous match to compare with, wait for\n\t\t\t\t// the next step to decide.\n\n\t\t\t\tmatch_available = 1;\n\t\t\t\tstrstart++;\n\t\t\t\tlookahead--;\n\t\t\t}\n\t\t}\n\n\t\tif (match_available !== 0) {\n\t\t\tbflush = _tr_tally(0, win[strstart - 1] & 0xff);\n\t\t\tmatch_available = 0;\n\t\t}\n\t\tflush_block_only(flush == Z_FINISH);\n\n\t\tif (strm.avail_out === 0) {\n\t\t\tif (flush == Z_FINISH)\n\t\t\t\treturn FinishStarted;\n\t\t\telse\n\t\t\t\treturn NeedMore;\n\t\t}\n\n\t\treturn flush == Z_FINISH ? FinishDone : BlockDone;\n\t}\n\n\tfunction deflateReset(strm) {\n\t\tstrm.total_in = strm.total_out = 0;\n\t\tstrm.msg = null; //\n\n\t\tthat.pending = 0;\n\t\tthat.pending_out = 0;\n\n\t\tstatus = BUSY_STATE;\n\n\t\tlast_flush = Z_NO_FLUSH;\n\n\t\ttr_init();\n\t\tlm_init();\n\t\treturn Z_OK;\n\t}\n\n\tthat.deflateInit = function (strm, _level, bits, _method, memLevel, _strategy) {\n\t\tif (!_method)\n\t\t\t_method = Z_DEFLATED;\n\t\tif (!memLevel)\n\t\t\tmemLevel = DEF_MEM_LEVEL;\n\t\tif (!_strategy)\n\t\t\t_strategy = Z_DEFAULT_STRATEGY;\n\n\t\t// byte[] my_version=ZLIB_VERSION;\n\n\t\t//\n\t\t// if (!version || version[0] != my_version[0]\n\t\t// || stream_size != sizeof(z_stream)) {\n\t\t// return Z_VERSION_ERROR;\n\t\t// }\n\n\t\tstrm.msg = null;\n\n\t\tif (_level == Z_DEFAULT_COMPRESSION)\n\t\t\t_level = 6;\n\n\t\tif (memLevel < 1 || memLevel > MAX_MEM_LEVEL || _method != Z_DEFLATED || bits < 9 || bits > 15 || _level < 0 || _level > 9 || _strategy < 0\n\t\t\t|| _strategy > Z_HUFFMAN_ONLY) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\n\t\tstrm.dstate = that;\n\n\t\tw_bits = bits;\n\t\tw_size = 1 << w_bits;\n\t\tw_mask = w_size - 1;\n\n\t\thash_bits = memLevel + 7;\n\t\thash_size = 1 << hash_bits;\n\t\thash_mask = hash_size - 1;\n\t\thash_shift = Math.floor((hash_bits + MIN_MATCH - 1) / MIN_MATCH);\n\n\t\twin = new Uint8Array(w_size * 2);\n\t\tprev = [];\n\t\thead = [];\n\n\t\tlit_bufsize = 1 << (memLevel + 6); // 16K elements by default\n\n\t\tthat.pending_buf = new Uint8Array(lit_bufsize * 4);\n\t\tpending_buf_size = lit_bufsize * 4;\n\n\t\tthat.dist_buf = new Uint16Array(lit_bufsize);\n\t\tthat.lc_buf = new Uint8Array(lit_bufsize);\n\n\t\tlevel = _level;\n\n\t\tstrategy = _strategy;\n\n\t\treturn deflateReset(strm);\n\t};\n\n\tthat.deflateEnd = function () {\n\t\tif (status != INIT_STATE && status != BUSY_STATE && status != FINISH_STATE) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\t// Deallocate in reverse order of allocations:\n\t\tthat.lc_buf = null;\n\t\tthat.dist_buf = null;\n\t\tthat.pending_buf = null;\n\t\thead = null;\n\t\tprev = null;\n\t\twin = null;\n\t\t// free\n\t\tthat.dstate = null;\n\t\treturn status == BUSY_STATE ? Z_DATA_ERROR : Z_OK;\n\t};\n\n\tthat.deflateParams = function (strm, _level, _strategy) {\n\t\tlet err = Z_OK;\n\n\t\tif (_level == Z_DEFAULT_COMPRESSION) {\n\t\t\t_level = 6;\n\t\t}\n\t\tif (_level < 0 || _level > 9 || _strategy < 0 || _strategy > Z_HUFFMAN_ONLY) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\n\t\tif (config_table[level].func != config_table[_level].func && strm.total_in !== 0) {\n\t\t\t// Flush the last buffer:\n\t\t\terr = strm.deflate(Z_PARTIAL_FLUSH);\n\t\t}\n\n\t\tif (level != _level) {\n\t\t\tlevel = _level;\n\t\t\tmax_lazy_match = config_table[level].max_lazy;\n\t\t\tgood_match = config_table[level].good_length;\n\t\t\tnice_match = config_table[level].nice_length;\n\t\t\tmax_chain_length = config_table[level].max_chain;\n\t\t}\n\t\tstrategy = _strategy;\n\t\treturn err;\n\t};\n\n\tthat.deflateSetDictionary = function (_strm, dictionary, dictLength) {\n\t\tlet length = dictLength;\n\t\tlet n, index = 0;\n\n\t\tif (!dictionary || status != INIT_STATE)\n\t\t\treturn Z_STREAM_ERROR;\n\n\t\tif (length < MIN_MATCH)\n\t\t\treturn Z_OK;\n\t\tif (length > w_size - MIN_LOOKAHEAD) {\n\t\t\tlength = w_size - MIN_LOOKAHEAD;\n\t\t\tindex = dictLength - length; // use the tail of the dictionary\n\t\t}\n\t\twin.set(dictionary.subarray(index, index + length), 0);\n\n\t\tstrstart = length;\n\t\tblock_start = length;\n\n\t\t// Insert all strings in the hash table (except for the last two bytes).\n\t\t// s->lookahead stays null, so s->ins_h will be recomputed at the next\n\t\t// call of fill_window.\n\n\t\tins_h = win[0] & 0xff;\n\t\tins_h = (((ins_h) << hash_shift) ^ (win[1] & 0xff)) & hash_mask;\n\n\t\tfor (n = 0; n <= length - MIN_MATCH; n++) {\n\t\t\tins_h = (((ins_h) << hash_shift) ^ (win[(n) + (MIN_MATCH - 1)] & 0xff)) & hash_mask;\n\t\t\tprev[n & w_mask] = head[ins_h];\n\t\t\thead[ins_h] = n;\n\t\t}\n\t\treturn Z_OK;\n\t};\n\n\tthat.deflate = function (_strm, flush) {\n\t\tlet i, header, level_flags, old_flush, bstate;\n\n\t\tif (flush > Z_FINISH || flush < 0) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\n\t\tif (!_strm.next_out || (!_strm.next_in && _strm.avail_in !== 0) || (status == FINISH_STATE && flush != Z_FINISH)) {\n\t\t\t_strm.msg = z_errmsg[Z_NEED_DICT - (Z_STREAM_ERROR)];\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\tif (_strm.avail_out === 0) {\n\t\t\t_strm.msg = z_errmsg[Z_NEED_DICT - (Z_BUF_ERROR)];\n\t\t\treturn Z_BUF_ERROR;\n\t\t}\n\n\t\tstrm = _strm; // just in case\n\t\told_flush = last_flush;\n\t\tlast_flush = flush;\n\n\t\t// Write the zlib header\n\t\tif (status == INIT_STATE) {\n\t\t\theader = (Z_DEFLATED + ((w_bits - 8) << 4)) << 8;\n\t\t\tlevel_flags = ((level - 1) & 0xff) >> 1;\n\n\t\t\tif (level_flags > 3)\n\t\t\t\tlevel_flags = 3;\n\t\t\theader |= (level_flags << 6);\n\t\t\tif (strstart !== 0)\n\t\t\t\theader |= PRESET_DICT;\n\t\t\theader += 31 - (header % 31);\n\n\t\t\tstatus = BUSY_STATE;\n\t\t\tputShortMSB(header);\n\t\t}\n\n\t\t// Flush as much pending output as possible\n\t\tif (that.pending !== 0) {\n\t\t\tstrm.flush_pending();\n\t\t\tif (strm.avail_out === 0) {\n\t\t\t\t// console.log(\" avail_out==0\");\n\t\t\t\t// Since avail_out is 0, deflate will be called again with\n\t\t\t\t// more output space, but possibly with both pending and\n\t\t\t\t// avail_in equal to zero. There won't be anything to do,\n\t\t\t\t// but this is not an error situation so make sure we\n\t\t\t\t// return OK instead of BUF_ERROR at next call of deflate:\n\t\t\t\tlast_flush = -1;\n\t\t\t\treturn Z_OK;\n\t\t\t}\n\n\t\t\t// Make sure there is something to do and avoid duplicate\n\t\t\t// consecutive\n\t\t\t// flushes. For repeated and useless calls with Z_FINISH, we keep\n\t\t\t// returning Z_STREAM_END instead of Z_BUFF_ERROR.\n\t\t} else if (strm.avail_in === 0 && flush <= old_flush && flush != Z_FINISH) {\n\t\t\tstrm.msg = z_errmsg[Z_NEED_DICT - (Z_BUF_ERROR)];\n\t\t\treturn Z_BUF_ERROR;\n\t\t}\n\n\t\t// User must not provide more input after the first FINISH:\n\t\tif (status == FINISH_STATE && strm.avail_in !== 0) {\n\t\t\t_strm.msg = z_errmsg[Z_NEED_DICT - (Z_BUF_ERROR)];\n\t\t\treturn Z_BUF_ERROR;\n\t\t}\n\n\t\t// Start a new block or continue the current one.\n\t\tif (strm.avail_in !== 0 || lookahead !== 0 || (flush != Z_NO_FLUSH && status != FINISH_STATE)) {\n\t\t\tbstate = -1;\n\t\t\tswitch (config_table[level].func) {\n\t\t\t\tcase STORED:\n\t\t\t\t\tbstate = deflate_stored(flush);\n\t\t\t\t\tbreak;\n\t\t\t\tcase FAST:\n\t\t\t\t\tbstate = deflate_fast(flush);\n\t\t\t\t\tbreak;\n\t\t\t\tcase SLOW:\n\t\t\t\t\tbstate = deflate_slow(flush);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t}\n\n\t\t\tif (bstate == FinishStarted || bstate == FinishDone) {\n\t\t\t\tstatus = FINISH_STATE;\n\t\t\t}\n\t\t\tif (bstate == NeedMore || bstate == FinishStarted) {\n\t\t\t\tif (strm.avail_out === 0) {\n\t\t\t\t\tlast_flush = -1; // avoid BUF_ERROR next call, see above\n\t\t\t\t}\n\t\t\t\treturn Z_OK;\n\t\t\t\t// If flush != Z_NO_FLUSH && avail_out === 0, the next call\n\t\t\t\t// of deflate should use the same flush parameter to make sure\n\t\t\t\t// that the flush is complete. So we don't have to output an\n\t\t\t\t// empty block here, this will be done at next call. This also\n\t\t\t\t// ensures that for a very small output buffer, we emit at most\n\t\t\t\t// one empty block.\n\t\t\t}\n\n\t\t\tif (bstate == BlockDone) {\n\t\t\t\tif (flush == Z_PARTIAL_FLUSH) {\n\t\t\t\t\t_tr_align();\n\t\t\t\t} else { // FULL_FLUSH or SYNC_FLUSH\n\t\t\t\t\t_tr_stored_block(0, 0, false);\n\t\t\t\t\t// For a full flush, this empty block will be recognized\n\t\t\t\t\t// as a special marker by inflate_sync().\n\t\t\t\t\tif (flush == Z_FULL_FLUSH) {\n\t\t\t\t\t\t// state.head[s.hash_size-1]=0;\n\t\t\t\t\t\tfor (i = 0; i < hash_size/*-1*/; i++)\n\t\t\t\t\t\t\t// forget history\n\t\t\t\t\t\t\thead[i] = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tstrm.flush_pending();\n\t\t\t\tif (strm.avail_out === 0) {\n\t\t\t\t\tlast_flush = -1; // avoid BUF_ERROR at next call, see above\n\t\t\t\t\treturn Z_OK;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (flush != Z_FINISH)\n\t\t\treturn Z_OK;\n\t\treturn Z_STREAM_END;\n\t};\n}\n\n// ZStream\n\nfunction ZStream() {\n\tconst that = this;\n\tthat.next_in_index = 0;\n\tthat.next_out_index = 0;\n\t// that.next_in; // next input byte\n\tthat.avail_in = 0; // number of bytes available at next_in\n\tthat.total_in = 0; // total nb of input bytes read so far\n\t// that.next_out; // next output byte should be put there\n\tthat.avail_out = 0; // remaining free space at next_out\n\tthat.total_out = 0; // total nb of bytes output so far\n\t// that.msg;\n\t// that.dstate;\n}\n\nZStream.prototype = {\n\tdeflateInit(level, bits) {\n\t\tconst that = this;\n\t\tthat.dstate = new Deflate();\n\t\tif (!bits)\n\t\t\tbits = MAX_BITS;\n\t\treturn that.dstate.deflateInit(that, level, bits);\n\t},\n\n\tdeflate(flush) {\n\t\tconst that = this;\n\t\tif (!that.dstate) {\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\treturn that.dstate.deflate(that, flush);\n\t},\n\n\tdeflateEnd() {\n\t\tconst that = this;\n\t\tif (!that.dstate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst ret = that.dstate.deflateEnd();\n\t\tthat.dstate = null;\n\t\treturn ret;\n\t},\n\n\tdeflateParams(level, strategy) {\n\t\tconst that = this;\n\t\tif (!that.dstate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.dstate.deflateParams(that, level, strategy);\n\t},\n\n\tdeflateSetDictionary(dictionary, dictLength) {\n\t\tconst that = this;\n\t\tif (!that.dstate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.dstate.deflateSetDictionary(that, dictionary, dictLength);\n\t},\n\n\t// Read a new buffer from the current input stream, update the\n\t// total number of bytes read. All deflate() input goes through\n\t// this function so some applications may wish to modify it to avoid\n\t// allocating a large strm->next_in buffer and copying from it.\n\t// (See also flush_pending()).\n\tread_buf(buf, start, size) {\n\t\tconst that = this;\n\t\tlet len = that.avail_in;\n\t\tif (len > size)\n\t\t\tlen = size;\n\t\tif (len === 0)\n\t\t\treturn 0;\n\t\tthat.avail_in -= len;\n\t\tbuf.set(that.next_in.subarray(that.next_in_index, that.next_in_index + len), start);\n\t\tthat.next_in_index += len;\n\t\tthat.total_in += len;\n\t\treturn len;\n\t},\n\n\t// Flush as much pending output as possible. All deflate() output goes\n\t// through this function so some applications may wish to modify it\n\t// to avoid allocating a large strm->next_out buffer and copying into it.\n\t// (See also read_buf()).\n\tflush_pending() {\n\t\tconst that = this;\n\t\tlet len = that.dstate.pending;\n\n\t\tif (len > that.avail_out)\n\t\t\tlen = that.avail_out;\n\t\tif (len === 0)\n\t\t\treturn;\n\n\t\t// if (that.dstate.pending_buf.length <= that.dstate.pending_out || that.next_out.length <= that.next_out_index\n\t\t// || that.dstate.pending_buf.length < (that.dstate.pending_out + len) || that.next_out.length < (that.next_out_index +\n\t\t// len)) {\n\t\t// console.log(that.dstate.pending_buf.length + \", \" + that.dstate.pending_out + \", \" + that.next_out.length + \", \" +\n\t\t// that.next_out_index + \", \" + len);\n\t\t// console.log(\"avail_out=\" + that.avail_out);\n\t\t// }\n\n\t\tthat.next_out.set(that.dstate.pending_buf.subarray(that.dstate.pending_out, that.dstate.pending_out + len), that.next_out_index);\n\n\t\tthat.next_out_index += len;\n\t\tthat.dstate.pending_out += len;\n\t\tthat.total_out += len;\n\t\tthat.avail_out -= len;\n\t\tthat.dstate.pending -= len;\n\t\tif (that.dstate.pending === 0) {\n\t\t\tthat.dstate.pending_out = 0;\n\t\t}\n\t}\n};\n\n// Deflate\n\nfunction ZipDeflate(options) {\n\tconst that = this;\n\tconst z = new ZStream();\n\tconst bufsize = getMaximumCompressedSize(options && options.chunkSize ? options.chunkSize : 64 * 1024);\n\tconst flush = Z_NO_FLUSH;\n\tconst buf = new Uint8Array(bufsize);\n\tlet level = options ? options.level : Z_DEFAULT_COMPRESSION;\n\tif (typeof level == \"undefined\")\n\t\tlevel = Z_DEFAULT_COMPRESSION;\n\tz.deflateInit(level);\n\tz.next_out = buf;\n\n\tthat.append = function (data, onprogress) {\n\t\tlet err, array, lastIndex = 0, bufferIndex = 0, bufferSize = 0;\n\t\tconst buffers = [];\n\t\tif (!data.length)\n\t\t\treturn;\n\t\tz.next_in_index = 0;\n\t\tz.next_in = data;\n\t\tz.avail_in = data.length;\n\t\tdo {\n\t\t\tz.next_out_index = 0;\n\t\t\tz.avail_out = bufsize;\n\t\t\terr = z.deflate(flush);\n\t\t\tif (err != Z_OK)\n\t\t\t\tthrow new Error(\"deflating: \" + z.msg);\n\t\t\tif (z.next_out_index)\n\t\t\t\tif (z.next_out_index == bufsize)\n\t\t\t\t\tbuffers.push(new Uint8Array(buf));\n\t\t\t\telse\n\t\t\t\t\tbuffers.push(buf.slice(0, z.next_out_index));\n\t\t\tbufferSize += z.next_out_index;\n\t\t\tif (onprogress && z.next_in_index > 0 && z.next_in_index != lastIndex) {\n\t\t\t\tonprogress(z.next_in_index);\n\t\t\t\tlastIndex = z.next_in_index;\n\t\t\t}\n\t\t} while (z.avail_in > 0 || z.avail_out === 0);\n\t\tif (buffers.length > 1) {\n\t\t\tarray = new Uint8Array(bufferSize);\n\t\t\tbuffers.forEach(function (chunk) {\n\t\t\t\tarray.set(chunk, bufferIndex);\n\t\t\t\tbufferIndex += chunk.length;\n\t\t\t});\n\t\t} else {\n\t\t\tarray = buffers[0] || new Uint8Array();\n\t\t}\n\t\treturn array;\n\t};\n\tthat.flush = function () {\n\t\tlet err, array, bufferIndex = 0, bufferSize = 0;\n\t\tconst buffers = [];\n\t\tdo {\n\t\t\tz.next_out_index = 0;\n\t\t\tz.avail_out = bufsize;\n\t\t\terr = z.deflate(Z_FINISH);\n\t\t\tif (err != Z_STREAM_END && err != Z_OK)\n\t\t\t\tthrow new Error(\"deflating: \" + z.msg);\n\t\t\tif (bufsize - z.avail_out > 0)\n\t\t\t\tbuffers.push(buf.slice(0, z.next_out_index));\n\t\t\tbufferSize += z.next_out_index;\n\t\t} while (z.avail_in > 0 || z.avail_out === 0);\n\t\tz.deflateEnd();\n\t\tarray = new Uint8Array(bufferSize);\n\t\tbuffers.forEach(function (chunk) {\n\t\t\tarray.set(chunk, bufferIndex);\n\t\t\tbufferIndex += chunk.length;\n\t\t});\n\t\treturn array;\n\t};\n}\n\nfunction getMaximumCompressedSize(uncompressedSize) {\n\treturn uncompressedSize + (5 * (Math.floor(uncompressedSize / 16383) + 1));\n}\n\nexport {\n\tZipDeflate as Deflate\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/*\n * This program is based on JZlib 1.0.2 ymnk, JCraft,Inc.\n * JZlib is based on zlib-1.1.3, so all credit should go authors\n * Jean-loup Gailly(jloup@gzip.org) and Mark Adler(madler@alumni.caltech.edu)\n * and contributors of zlib.\n */\n\n// deno-lint-ignore-file no-this-alias prefer-const\n\n// Global\n\nconst MAX_BITS = 15;\n\nconst Z_OK = 0;\nconst Z_STREAM_END = 1;\nconst Z_NEED_DICT = 2;\nconst Z_STREAM_ERROR = -2;\nconst Z_DATA_ERROR = -3;\nconst Z_MEM_ERROR = -4;\nconst Z_BUF_ERROR = -5;\n\nconst inflate_mask = [0x00000000, 0x00000001, 0x00000003, 0x00000007, 0x0000000f, 0x0000001f, 0x0000003f, 0x0000007f, 0x000000ff, 0x000001ff, 0x000003ff,\n\t0x000007ff, 0x00000fff, 0x00001fff, 0x00003fff, 0x00007fff, 0x0000ffff];\n\nconst MANY = 1440;\n\n// JZlib version : \"1.0.2\"\nconst Z_NO_FLUSH = 0;\nconst Z_FINISH = 4;\n\n// InfTree\nconst fixed_bl = 9;\nconst fixed_bd = 5;\n\nconst fixed_tl = [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,\n\t0, 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,\n\t0, 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,\n\t0, 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,\n\t0, 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,\n\t35, 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,\n\t26, 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,\n\t7, 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,\n\t8, 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,\n\t8, 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,\n\t0, 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,\n\t81, 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,\n\t0, 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,\n\t84, 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,\n\t0, 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,\n\t80, 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,\n\t0, 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,\n\t0, 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,\n\t0, 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,\n\t193, 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,\n\t120, 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,\n\t227, 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,\n\t92, 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,\n\t249, 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,\n\t130, 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,\n\t181, 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,\n\t102, 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,\n\t221, 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,\n\t8, 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,\n\t147, 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,\n\t85, 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,\n\t235, 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,\n\t141, 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,\n\t167, 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,\n\t107, 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,\n\t207, 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,\n\t127, 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];\nconst fixed_td = [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,\n\t8193, 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,\n\t24577, 80, 5, 4, 88, 5, 769, 84, 5, 49, 92, 5, 12289, 82, 5, 13, 90, 5, 3073, 86, 5, 193, 192, 5, 24577];\n\n// Tables for deflate from PKZIP's appnote.txt.\nconst cplens = [ // Copy lengths for literal codes 257..285\n\t3, 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];\n\n// see note #13 above about 258\nconst cplext = [ // Extra bits for literal codes 257..285\n\t0, 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 // 112==invalid\n];\n\nconst cpdist = [ // Copy offsets for distance codes 0..29\n\t1, 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];\n\nconst cpdext = [ // Extra bits for distance codes\n\t0, 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];\n\n// If BMAX needs to be larger than 16, then h and x[] should be uLong.\nconst BMAX = 15; // maximum bit length of any code\n\nfunction InfTree() {\n\tconst that = this;\n\n\tlet hn; // hufts used in space\n\tlet v; // work area for huft_build\n\tlet c; // bit length count table\n\tlet r; // table entry for structure assignment\n\tlet u; // table stack\n\tlet x; // bit offsets, then code stack\n\n\tfunction huft_build(b, // code lengths in bits (all assumed <=\n\t\t// BMAX)\n\t\tbindex, n, // number of codes (assumed <= 288)\n\t\ts, // number of simple-valued codes (0..s-1)\n\t\td, // list of base values for non-simple codes\n\t\te, // list of extra bits for non-simple codes\n\t\tt, // result: starting table\n\t\tm, // maximum lookup bits, returns actual\n\t\thp,// space for trees\n\t\thn,// hufts used in space\n\t\tv // working area: values in order of bit length\n\t) {\n\t\t// Given a list of code lengths and a maximum table size, make a set of\n\t\t// tables to decode that set of codes. Return Z_OK on success,\n\t\t// Z_BUF_ERROR\n\t\t// if the given code set is incomplete (the tables are still built in\n\t\t// this\n\t\t// case), Z_DATA_ERROR if the input is invalid (an over-subscribed set\n\t\t// of\n\t\t// lengths), or Z_MEM_ERROR if not enough memory.\n\n\t\tlet a; // counter for codes of length k\n\t\tlet f; // i repeats in table every f entries\n\t\tlet g; // maximum code length\n\t\tlet h; // table level\n\t\tlet i; // counter, current code\n\t\tlet j; // counter\n\t\tlet k; // number of bits in current code\n\t\tlet l; // bits per table (returned in m)\n\t\tlet mask; // (1 << w) - 1, to avoid cc -O bug on HP\n\t\tlet p; // pointer into c[], b[], or v[]\n\t\tlet q; // points to current table\n\t\tlet w; // bits before this table == (l * h)\n\t\tlet xp; // pointer into x\n\t\tlet y; // number of dummy codes added\n\t\tlet z; // number of entries in current table\n\n\t\t// Generate counts for each bit length\n\n\t\tp = 0;\n\t\ti = n;\n\t\tdo {\n\t\t\tc[b[bindex + p]]++;\n\t\t\tp++;\n\t\t\ti--; // assume all entries <= BMAX\n\t\t} while (i !== 0);\n\n\t\tif (c[0] == n) { // null input--all zero length codes\n\t\t\tt[0] = -1;\n\t\t\tm[0] = 0;\n\t\t\treturn Z_OK;\n\t\t}\n\n\t\t// Find minimum and maximum length, bound *m by those\n\t\tl = m[0];\n\t\tfor (j = 1; j <= BMAX; j++)\n\t\t\tif (c[j] !== 0)\n\t\t\t\tbreak;\n\t\tk = j; // minimum code length\n\t\tif (l < j) {\n\t\t\tl = j;\n\t\t}\n\t\tfor (i = BMAX; i !== 0; i--) {\n\t\t\tif (c[i] !== 0)\n\t\t\t\tbreak;\n\t\t}\n\t\tg = i; // maximum code length\n\t\tif (l > i) {\n\t\t\tl = i;\n\t\t}\n\t\tm[0] = l;\n\n\t\t// Adjust last length count to fill out codes, if needed\n\t\tfor (y = 1 << j; j < i; j++, y <<= 1) {\n\t\t\tif ((y -= c[j]) < 0) {\n\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t}\n\t\t}\n\t\tif ((y -= c[i]) < 0) {\n\t\t\treturn Z_DATA_ERROR;\n\t\t}\n\t\tc[i] += y;\n\n\t\t// Generate starting offsets into the value table for each length\n\t\tx[1] = j = 0;\n\t\tp = 1;\n\t\txp = 2;\n\t\twhile (--i !== 0) { // note that i == g from above\n\t\t\tx[xp] = (j += c[p]);\n\t\t\txp++;\n\t\t\tp++;\n\t\t}\n\n\t\t// Make a table of values in order of bit lengths\n\t\ti = 0;\n\t\tp = 0;\n\t\tdo {\n\t\t\tif ((j = b[bindex + p]) !== 0) {\n\t\t\t\tv[x[j]++] = i;\n\t\t\t}\n\t\t\tp++;\n\t\t} while (++i < n);\n\t\tn = x[g]; // set n to length of v\n\n\t\t// Generate the Huffman codes and for each, make the table entries\n\t\tx[0] = i = 0; // first Huffman code is zero\n\t\tp = 0; // grab values in bit order\n\t\th = -1; // no tables yet--level -1\n\t\tw = -l; // bits decoded == (l * h)\n\t\tu[0] = 0; // just to keep compilers happy\n\t\tq = 0; // ditto\n\t\tz = 0; // ditto\n\n\t\t// go through the bit lengths (k already is bits in shortest code)\n\t\tfor (; k <= g; k++) {\n\t\t\ta = c[k];\n\t\t\twhile (a-- !== 0) {\n\t\t\t\t// here i is the Huffman code of length k bits for value *p\n\t\t\t\t// make tables up to required level\n\t\t\t\twhile (k > w + l) {\n\t\t\t\t\th++;\n\t\t\t\t\tw += l; // previous table always l bits\n\t\t\t\t\t// compute minimum size table less than or equal to l bits\n\t\t\t\t\tz = g - w;\n\t\t\t\t\tz = (z > l) ? l : z; // table size upper limit\n\t\t\t\t\tif ((f = 1 << (j = k - w)) > a + 1) { // try a k-w bit table\n\t\t\t\t\t\t// too few codes for\n\t\t\t\t\t\t// k-w bit table\n\t\t\t\t\t\tf -= a + 1; // deduct codes from patterns left\n\t\t\t\t\t\txp = k;\n\t\t\t\t\t\tif (j < z) {\n\t\t\t\t\t\t\twhile (++j < z) { // try smaller tables up to z bits\n\t\t\t\t\t\t\t\tif ((f <<= 1) <= c[++xp])\n\t\t\t\t\t\t\t\t\tbreak; // enough codes to use up j bits\n\t\t\t\t\t\t\t\tf -= c[xp]; // else deduct codes from patterns\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tz = 1 << j; // table entries for j-bit table\n\n\t\t\t\t\t// allocate new table\n\t\t\t\t\tif (hn[0] + z > MANY) { // (note: doesn't matter for fixed)\n\t\t\t\t\t\treturn Z_DATA_ERROR; // overflow of MANY\n\t\t\t\t\t}\n\t\t\t\t\tu[h] = q = /* hp+ */hn[0]; // DEBUG\n\t\t\t\t\thn[0] += z;\n\n\t\t\t\t\t// connect to last table, if there is one\n\t\t\t\t\tif (h !== 0) {\n\t\t\t\t\t\tx[h] = i; // save pattern for backing up\n\t\t\t\t\t\tr[0] = /* (byte) */j; // bits in this table\n\t\t\t\t\t\tr[1] = /* (byte) */l; // bits to dump before this table\n\t\t\t\t\t\tj = i >>> (w - l);\n\t\t\t\t\t\tr[2] = /* (int) */(q - u[h - 1] - j); // offset to this table\n\t\t\t\t\t\thp.set(r, (u[h - 1] + j) * 3);\n\t\t\t\t\t\t// to\n\t\t\t\t\t\t// last\n\t\t\t\t\t\t// table\n\t\t\t\t\t} else {\n\t\t\t\t\t\tt[0] = q; // first table is returned result\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// set up table entry in r\n\t\t\t\tr[1] = /* (byte) */(k - w);\n\t\t\t\tif (p >= n) {\n\t\t\t\t\tr[0] = 128 + 64; // out of values--invalid code\n\t\t\t\t} else if (v[p] < s) {\n\t\t\t\t\tr[0] = /* (byte) */(v[p] < 256 ? 0 : 32 + 64); // 256 is\n\t\t\t\t\t// end-of-block\n\t\t\t\t\tr[2] = v[p++]; // simple code is just the value\n\t\t\t\t} else {\n\t\t\t\t\tr[0] = /* (byte) */(e[v[p] - s] + 16 + 64); // non-simple--look\n\t\t\t\t\t// up in lists\n\t\t\t\t\tr[2] = d[v[p++] - s];\n\t\t\t\t}\n\n\t\t\t\t// fill code-like entries with r\n\t\t\t\tf = 1 << (k - w);\n\t\t\t\tfor (j = i >>> w; j < z; j += f) {\n\t\t\t\t\thp.set(r, (q + j) * 3);\n\t\t\t\t}\n\n\t\t\t\t// backwards increment the k-bit code i\n\t\t\t\tfor (j = 1 << (k - 1); (i & j) !== 0; j >>>= 1) {\n\t\t\t\t\ti ^= j;\n\t\t\t\t}\n\t\t\t\ti ^= j;\n\n\t\t\t\t// backup over finished tables\n\t\t\t\tmask = (1 << w) - 1; // needed on HP, cc -O bug\n\t\t\t\twhile ((i & mask) != x[h]) {\n\t\t\t\t\th--; // don't need to update q\n\t\t\t\t\tw -= l;\n\t\t\t\t\tmask = (1 << w) - 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// Return Z_BUF_ERROR if we were given an incomplete table\n\t\treturn y !== 0 && g != 1 ? Z_BUF_ERROR : Z_OK;\n\t}\n\n\tfunction initWorkArea(vsize) {\n\t\tlet i;\n\t\tif (!hn) {\n\t\t\thn = []; // []; //new Array(1);\n\t\t\tv = []; // new Array(vsize);\n\t\t\tc = new Int32Array(BMAX + 1); // new Array(BMAX + 1);\n\t\t\tr = []; // new Array(3);\n\t\t\tu = new Int32Array(BMAX); // new Array(BMAX);\n\t\t\tx = new Int32Array(BMAX + 1); // new Array(BMAX + 1);\n\t\t}\n\t\tif (v.length < vsize) {\n\t\t\tv = []; // new Array(vsize);\n\t\t}\n\t\tfor (i = 0; i < vsize; i++) {\n\t\t\tv[i] = 0;\n\t\t}\n\t\tfor (i = 0; i < BMAX + 1; i++) {\n\t\t\tc[i] = 0;\n\t\t}\n\t\tfor (i = 0; i < 3; i++) {\n\t\t\tr[i] = 0;\n\t\t}\n\t\t// for(int i=0; i 257)) {\n\t\t\tif (result == Z_DATA_ERROR) {\n\t\t\t\tz.msg = \"oversubscribed distance tree\";\n\t\t\t} else if (result == Z_BUF_ERROR) {\n\t\t\t\tz.msg = \"incomplete distance tree\";\n\t\t\t\tresult = Z_DATA_ERROR;\n\t\t\t} else if (result != Z_MEM_ERROR) {\n\t\t\t\tz.msg = \"empty distance tree with lengths\";\n\t\t\t\tresult = Z_DATA_ERROR;\n\t\t\t}\n\t\t\treturn result;\n\t\t}\n\n\t\treturn Z_OK;\n\t};\n\n}\n\nInfTree.inflate_trees_fixed = function (bl, // literal desired/actual bit depth\n\tbd, // distance desired/actual bit depth\n\ttl,// literal/length tree result\n\ttd// distance tree result\n) {\n\tbl[0] = fixed_bl;\n\tbd[0] = fixed_bd;\n\ttl[0] = fixed_tl;\n\ttd[0] = fixed_td;\n\treturn Z_OK;\n};\n\n// InfCodes\n\n// waiting for \"i:\"=input,\n// \"o:\"=output,\n// \"x:\"=nothing\nconst START = 0; // x: set up for LEN\nconst LEN = 1; // i: get length/literal/eob next\nconst LENEXT = 2; // i: getting length extra (have base)\nconst DIST = 3; // i: get distance next\nconst DISTEXT = 4;// i: getting distance extra\nconst COPY = 5; // o: copying bytes in win, waiting\n// for space\nconst LIT = 6; // o: got literal, waiting for output\n// space\nconst WASH = 7; // o: got eob, possibly still output\n// waiting\nconst END = 8; // x: got eob and all data flushed\nconst BADCODE = 9;// x: got error\n\nfunction InfCodes() {\n\tconst that = this;\n\n\tlet mode; // current inflate_codes mode\n\n\t// mode dependent information\n\tlet len = 0;\n\n\tlet tree; // pointer into tree\n\tlet tree_index = 0;\n\tlet need = 0; // bits needed\n\n\tlet lit = 0;\n\n\t// if EXT or COPY, where and how much\n\tlet get = 0; // bits to get for extra\n\tlet dist = 0; // distance back to copy from\n\n\tlet lbits = 0; // ltree bits decoded per branch\n\tlet dbits = 0; // dtree bits decoder per branch\n\tlet ltree; // literal/length/eob tree\n\tlet ltree_index = 0; // literal/length/eob tree\n\tlet dtree; // distance tree\n\tlet dtree_index = 0; // distance tree\n\n\t// Called with number of bytes left to write in win at least 258\n\t// (the maximum string length) and number of input bytes available\n\t// at least ten. The ten bytes are six bytes for the longest length/\n\t// distance pair plus four bytes for overloading the bit buffer.\n\n\tfunction inflate_fast(bl, bd, tl, tl_index, td, td_index, s, z) {\n\t\tlet t; // temporary pointer\n\t\tlet tp; // temporary pointer\n\t\tlet tp_index; // temporary pointer\n\t\tlet e; // extra bits or operation\n\t\tlet b; // bit buffer\n\t\tlet k; // bits in bit buffer\n\t\tlet p; // input data pointer\n\t\tlet n; // bytes available there\n\t\tlet q; // output win write pointer\n\t\tlet m; // bytes to end of win or read pointer\n\t\tlet ml; // mask for literal/length tree\n\t\tlet md; // mask for distance tree\n\t\tlet c; // bytes to copy\n\t\tlet d; // distance back to copy from\n\t\tlet r; // copy source pointer\n\n\t\tlet tp_index_t_3; // (tp_index+t)*3\n\n\t\t// load input, output, bit values\n\t\tp = z.next_in_index;\n\t\tn = z.avail_in;\n\t\tb = s.bitb;\n\t\tk = s.bitk;\n\t\tq = s.write;\n\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t// initialize masks\n\t\tml = inflate_mask[bl];\n\t\tmd = inflate_mask[bd];\n\n\t\t// do until not enough input or output space for fast loop\n\t\tdo { // assume called with m >= 258 && n >= 10\n\t\t\t// get literal/length code\n\t\t\twhile (k < (20)) { // max bits for literal/length code\n\t\t\t\tn--;\n\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\tk += 8;\n\t\t\t}\n\n\t\t\tt = b & ml;\n\t\t\ttp = tl;\n\t\t\ttp_index = tl_index;\n\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\tif ((e = tp[tp_index_t_3]) === 0) {\n\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\ts.win[q++] = /* (byte) */tp[tp_index_t_3 + 2];\n\t\t\t\tm--;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tdo {\n\n\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\tif ((e & 16) !== 0) {\n\t\t\t\t\te &= 15;\n\t\t\t\t\tc = tp[tp_index_t_3 + 2] + (/* (int) */b & inflate_mask[e]);\n\n\t\t\t\t\tb >>= e;\n\t\t\t\t\tk -= e;\n\n\t\t\t\t\t// decode distance base of block to copy\n\t\t\t\t\twhile (k < (15)) { // max bits for distance code\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tt = b & md;\n\t\t\t\t\ttp = td;\n\t\t\t\t\ttp_index = td_index;\n\t\t\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\t\t\te = tp[tp_index_t_3];\n\n\t\t\t\t\tdo {\n\n\t\t\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\t\t\tif ((e & 16) !== 0) {\n\t\t\t\t\t\t\t// get extra bits to add to distance base\n\t\t\t\t\t\t\te &= 15;\n\t\t\t\t\t\t\twhile (k < (e)) { // get extra bits (up to 13)\n\t\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\td = tp[tp_index_t_3 + 2] + (b & inflate_mask[e]);\n\n\t\t\t\t\t\t\tb >>= (e);\n\t\t\t\t\t\t\tk -= (e);\n\n\t\t\t\t\t\t\t// do the copy\n\t\t\t\t\t\t\tm -= c;\n\t\t\t\t\t\t\tif (q >= d) { // offset before dest\n\t\t\t\t\t\t\t\t// just copy\n\t\t\t\t\t\t\t\tr = q - d;\n\t\t\t\t\t\t\t\tif (q - r > 0 && 2 > (q - r)) {\n\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++]; // minimum\n\t\t\t\t\t\t\t\t\t// count is\n\t\t\t\t\t\t\t\t\t// three,\n\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++]; // so unroll\n\t\t\t\t\t\t\t\t\t// loop a\n\t\t\t\t\t\t\t\t\t// little\n\t\t\t\t\t\t\t\t\tc -= 2;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\ts.win.set(s.win.subarray(r, r + 2), q);\n\t\t\t\t\t\t\t\t\tq += 2;\n\t\t\t\t\t\t\t\t\tr += 2;\n\t\t\t\t\t\t\t\t\tc -= 2;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else { // else offset after destination\n\t\t\t\t\t\t\t\tr = q - d;\n\t\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t\tr += s.end; // force pointer in win\n\t\t\t\t\t\t\t\t} while (r < 0); // covers invalid distances\n\t\t\t\t\t\t\t\te = s.end - r;\n\t\t\t\t\t\t\t\tif (c > e) { // if source crosses,\n\t\t\t\t\t\t\t\t\tc -= e; // wrapped copy\n\t\t\t\t\t\t\t\t\tif (q - r > 0 && e > (q - r)) {\n\t\t\t\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++];\n\t\t\t\t\t\t\t\t\t\t} while (--e !== 0);\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\ts.win.set(s.win.subarray(r, r + e), q);\n\t\t\t\t\t\t\t\t\t\tq += e;\n\t\t\t\t\t\t\t\t\t\tr += e;\n\t\t\t\t\t\t\t\t\t\te = 0;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tr = 0; // copy rest from start of win\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// copy all or what's left\n\t\t\t\t\t\t\tif (q - r > 0 && c > (q - r)) {\n\t\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t\ts.win[q++] = s.win[r++];\n\t\t\t\t\t\t\t\t} while (--c !== 0);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ts.win.set(s.win.subarray(r, r + c), q);\n\t\t\t\t\t\t\t\tq += c;\n\t\t\t\t\t\t\t\tr += c;\n\t\t\t\t\t\t\t\tc = 0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t} else if ((e & 64) === 0) {\n\t\t\t\t\t\t\tt += tp[tp_index_t_3 + 2];\n\t\t\t\t\t\t\tt += (b & inflate_mask[e]);\n\t\t\t\t\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\t\t\t\t\te = tp[tp_index_t_3];\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tz.msg = \"invalid distance code\";\n\n\t\t\t\t\t\t\tc = z.avail_in - n;\n\t\t\t\t\t\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\t\t\t\t\t\tn += c;\n\t\t\t\t\t\t\tp -= c;\n\t\t\t\t\t\t\tk -= c << 3;\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\n\t\t\t\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// eslint-disable-next-line no-constant-condition\n\t\t\t\t\t} while (true);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tif ((e & 64) === 0) {\n\t\t\t\t\tt += tp[tp_index_t_3 + 2];\n\t\t\t\t\tt += (b & inflate_mask[e]);\n\t\t\t\t\ttp_index_t_3 = (tp_index + t) * 3;\n\t\t\t\t\tif ((e = tp[tp_index_t_3]) === 0) {\n\n\t\t\t\t\t\tb >>= (tp[tp_index_t_3 + 1]);\n\t\t\t\t\t\tk -= (tp[tp_index_t_3 + 1]);\n\n\t\t\t\t\t\ts.win[q++] = /* (byte) */tp[tp_index_t_3 + 2];\n\t\t\t\t\t\tm--;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t} else if ((e & 32) !== 0) {\n\n\t\t\t\t\tc = z.avail_in - n;\n\t\t\t\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\t\t\t\tn += c;\n\t\t\t\t\tp -= c;\n\t\t\t\t\tk -= c << 3;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\n\t\t\t\t\treturn Z_STREAM_END;\n\t\t\t\t} else {\n\t\t\t\t\tz.msg = \"invalid literal/length code\";\n\n\t\t\t\t\tc = z.avail_in - n;\n\t\t\t\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\t\t\t\tn += c;\n\t\t\t\t\tp -= c;\n\t\t\t\t\tk -= c << 3;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\n\t\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t\t}\n\t\t\t\t// eslint-disable-next-line no-constant-condition\n\t\t\t} while (true);\n\t\t} while (m >= 258 && n >= 10);\n\n\t\t// not enough input or output--restore pointers and return\n\t\tc = z.avail_in - n;\n\t\tc = (k >> 3) < c ? k >> 3 : c;\n\t\tn += c;\n\t\tp -= c;\n\t\tk -= c << 3;\n\n\t\ts.bitb = b;\n\t\ts.bitk = k;\n\t\tz.avail_in = n;\n\t\tz.total_in += p - z.next_in_index;\n\t\tz.next_in_index = p;\n\t\ts.write = q;\n\n\t\treturn Z_OK;\n\t}\n\n\tthat.init = function (bl, bd, tl, tl_index, td, td_index) {\n\t\tmode = START;\n\t\tlbits = /* (byte) */bl;\n\t\tdbits = /* (byte) */bd;\n\t\tltree = tl;\n\t\tltree_index = tl_index;\n\t\tdtree = td;\n\t\tdtree_index = td_index;\n\t\ttree = null;\n\t};\n\n\tthat.proc = function (s, z, r) {\n\t\tlet j; // temporary storage\n\t\tlet tindex; // temporary pointer\n\t\tlet e; // extra bits or operation\n\t\tlet b = 0; // bit buffer\n\t\tlet k = 0; // bits in bit buffer\n\t\tlet p = 0; // input data pointer\n\t\tlet n; // bytes available there\n\t\tlet q; // output win write pointer\n\t\tlet m; // bytes to end of win or read pointer\n\t\tlet f; // pointer to copy strings from\n\n\t\t// copy input/output information to locals (UPDATE macro restores)\n\t\tp = z.next_in_index;\n\t\tn = z.avail_in;\n\t\tb = s.bitb;\n\t\tk = s.bitk;\n\t\tq = s.write;\n\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t// process input and output based on current state\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\tswitch (mode) {\n\t\t\t\t// waiting for \"i:\"=input, \"o:\"=output, \"x:\"=nothing\n\t\t\t\tcase START: // x: set up for LEN\n\t\t\t\t\tif (m >= 258 && n >= 10) {\n\n\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\tr = inflate_fast(lbits, dbits, ltree, ltree_index, dtree, dtree_index, s, z);\n\n\t\t\t\t\t\tp = z.next_in_index;\n\t\t\t\t\t\tn = z.avail_in;\n\t\t\t\t\t\tb = s.bitb;\n\t\t\t\t\t\tk = s.bitk;\n\t\t\t\t\t\tq = s.write;\n\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\t\tif (r != Z_OK) {\n\t\t\t\t\t\t\tmode = r == Z_STREAM_END ? WASH : BADCODE;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tneed = lbits;\n\t\t\t\t\ttree = ltree;\n\t\t\t\t\ttree_index = ltree_index;\n\n\t\t\t\t\tmode = LEN;\n\t\t\t\t/* falls through */\n\t\t\t\tcase LEN: // i: get length/literal/eob next\n\t\t\t\t\tj = need;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\ttindex = (tree_index + (b & inflate_mask[j])) * 3;\n\n\t\t\t\t\tb >>>= (tree[tindex + 1]);\n\t\t\t\t\tk -= (tree[tindex + 1]);\n\n\t\t\t\t\te = tree[tindex];\n\n\t\t\t\t\tif (e === 0) { // literal\n\t\t\t\t\t\tlit = tree[tindex + 2];\n\t\t\t\t\t\tmode = LIT;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 16) !== 0) { // length\n\t\t\t\t\t\tget = e & 15;\n\t\t\t\t\t\tlen = tree[tindex + 2];\n\t\t\t\t\t\tmode = LENEXT;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 64) === 0) { // next table\n\t\t\t\t\t\tneed = e;\n\t\t\t\t\t\ttree_index = tindex / 3 + tree[tindex + 2];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 32) !== 0) { // end of block\n\t\t\t\t\t\tmode = WASH;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tmode = BADCODE; // invalid code\n\t\t\t\t\tz.msg = \"invalid literal/length code\";\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tcase LENEXT: // i: getting length extra (have base)\n\t\t\t\t\tj = get;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tlen += (b & inflate_mask[j]);\n\n\t\t\t\t\tb >>= j;\n\t\t\t\t\tk -= j;\n\n\t\t\t\t\tneed = dbits;\n\t\t\t\t\ttree = dtree;\n\t\t\t\t\ttree_index = dtree_index;\n\t\t\t\t\tmode = DIST;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DIST: // i: get distance next\n\t\t\t\t\tj = need;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\ttindex = (tree_index + (b & inflate_mask[j])) * 3;\n\n\t\t\t\t\tb >>= tree[tindex + 1];\n\t\t\t\t\tk -= tree[tindex + 1];\n\n\t\t\t\t\te = (tree[tindex]);\n\t\t\t\t\tif ((e & 16) !== 0) { // distance\n\t\t\t\t\t\tget = e & 15;\n\t\t\t\t\t\tdist = tree[tindex + 2];\n\t\t\t\t\t\tmode = DISTEXT;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((e & 64) === 0) { // next table\n\t\t\t\t\t\tneed = e;\n\t\t\t\t\t\ttree_index = tindex / 3 + tree[tindex + 2];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tmode = BADCODE; // invalid code\n\t\t\t\t\tz.msg = \"invalid distance code\";\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tcase DISTEXT: // i: getting distance extra\n\t\t\t\t\tj = get;\n\n\t\t\t\t\twhile (k < (j)) {\n\t\t\t\t\t\tif (n !== 0)\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tdist += (b & inflate_mask[j]);\n\n\t\t\t\t\tb >>= j;\n\t\t\t\t\tk -= j;\n\n\t\t\t\t\tmode = COPY;\n\t\t\t\t/* falls through */\n\t\t\t\tcase COPY: // o: copying bytes in win, waiting for space\n\t\t\t\t\tf = q - dist;\n\t\t\t\t\twhile (f < 0) { // modulo win size-\"while\" instead\n\t\t\t\t\t\tf += s.end; // of \"if\" handles invalid distances\n\t\t\t\t\t}\n\t\t\t\t\twhile (len !== 0) {\n\n\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\t\tr = s.inflate_flush(z, r);\n\t\t\t\t\t\t\t\tq = s.write;\n\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\ts.win[q++] = s.win[f++];\n\t\t\t\t\t\tm--;\n\n\t\t\t\t\t\tif (f == s.end)\n\t\t\t\t\t\t\tf = 0;\n\t\t\t\t\t\tlen--;\n\t\t\t\t\t}\n\t\t\t\t\tmode = START;\n\t\t\t\t\tbreak;\n\t\t\t\tcase LIT: // o: got literal, waiting for output space\n\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\tr = s.inflate_flush(z, r);\n\t\t\t\t\t\t\tq = s.write;\n\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\t\t\tif (q == s.end && s.read !== 0) {\n\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tr = Z_OK;\n\n\t\t\t\t\ts.win[q++] = /* (byte) */lit;\n\t\t\t\t\tm--;\n\n\t\t\t\t\tmode = START;\n\t\t\t\t\tbreak;\n\t\t\t\tcase WASH: // o: got eob, possibly more output\n\t\t\t\t\tif (k > 7) { // return unused byte, if any\n\t\t\t\t\t\tk -= 8;\n\t\t\t\t\t\tn++;\n\t\t\t\t\t\tp--; // can always return one\n\t\t\t\t\t}\n\n\t\t\t\t\ts.write = q;\n\t\t\t\t\tr = s.inflate_flush(z, r);\n\t\t\t\t\tq = s.write;\n\t\t\t\t\tm = q < s.read ? s.read - q - 1 : s.end - q;\n\n\t\t\t\t\tif (s.read != s.write) {\n\t\t\t\t\t\ts.bitb = b;\n\t\t\t\t\t\ts.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\ts.write = q;\n\t\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tmode = END;\n\t\t\t\t/* falls through */\n\t\t\t\tcase END:\n\t\t\t\t\tr = Z_STREAM_END;\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tcase BADCODE: // x: got error\n\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\n\t\t\t\tdefault:\n\t\t\t\t\tr = Z_STREAM_ERROR;\n\n\t\t\t\t\ts.bitb = b;\n\t\t\t\t\ts.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\ts.write = q;\n\t\t\t\t\treturn s.inflate_flush(z, r);\n\t\t\t}\n\t\t}\n\t};\n\n\tthat.free = function () {\n\t\t// ZFREE(z, c);\n\t};\n\n}\n\n// InfBlocks\n\n// Table for deflate from PKZIP's appnote.txt.\nconst border = [ // Order of the bit length code lengths\n\t16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15];\n\nconst TYPE = 0; // get type bits (3, including end bit)\nconst LENS = 1; // get lengths for stored\nconst STORED = 2;// processing stored block\nconst TABLE = 3; // get table lengths\nconst BTREE = 4; // get bit lengths tree for a dynamic\n// block\nconst DTREE = 5; // get length, distance trees for a\n// dynamic block\nconst CODES = 6; // processing fixed or dynamic block\nconst DRY = 7; // output remaining win bytes\nconst DONELOCKS = 8; // finished last block, done\nconst BADBLOCKS = 9; // ot a data error--stuck here\n\nfunction InfBlocks(z, w) {\n\tconst that = this;\n\n\tlet mode = TYPE; // current inflate_block mode\n\n\tlet left = 0; // if STORED, bytes left to copy\n\n\tlet table = 0; // table lengths (14 bits)\n\tlet index = 0; // index into blens (or border)\n\tlet blens; // bit lengths of codes\n\tconst bb = [0]; // bit length tree depth\n\tconst tb = [0]; // bit length decoding tree\n\n\tconst codes = new InfCodes(); // if CODES, current state\n\n\tlet last = 0; // true if this block is the last block\n\n\tlet hufts = new Int32Array(MANY * 3); // single malloc for tree space\n\tconst check = 0; // check on output\n\tconst inftree = new InfTree();\n\n\tthat.bitk = 0; // bits in bit buffer\n\tthat.bitb = 0; // bit buffer\n\tthat.win = new Uint8Array(w); // sliding win\n\tthat.end = w; // one byte after sliding win\n\tthat.read = 0; // win read pointer\n\tthat.write = 0; // win write pointer\n\n\tthat.reset = function (z, c) {\n\t\tif (c)\n\t\t\tc[0] = check;\n\t\t// if (mode == BTREE || mode == DTREE) {\n\t\t// }\n\t\tif (mode == CODES) {\n\t\t\tcodes.free(z);\n\t\t}\n\t\tmode = TYPE;\n\t\tthat.bitk = 0;\n\t\tthat.bitb = 0;\n\t\tthat.read = that.write = 0;\n\t};\n\n\tthat.reset(z, null);\n\n\t// copy as much as possible from the sliding win to the output area\n\tthat.inflate_flush = function (z, r) {\n\t\tlet n;\n\t\tlet p;\n\t\tlet q;\n\n\t\t// local copies of source and destination pointers\n\t\tp = z.next_out_index;\n\t\tq = that.read;\n\n\t\t// compute number of bytes to copy as far as end of win\n\t\tn = /* (int) */((q <= that.write ? that.write : that.end) - q);\n\t\tif (n > z.avail_out)\n\t\t\tn = z.avail_out;\n\t\tif (n !== 0 && r == Z_BUF_ERROR)\n\t\t\tr = Z_OK;\n\n\t\t// update counters\n\t\tz.avail_out -= n;\n\t\tz.total_out += n;\n\n\t\t// copy as far as end of win\n\t\tz.next_out.set(that.win.subarray(q, q + n), p);\n\t\tp += n;\n\t\tq += n;\n\n\t\t// see if more to copy at beginning of win\n\t\tif (q == that.end) {\n\t\t\t// wrap pointers\n\t\t\tq = 0;\n\t\t\tif (that.write == that.end)\n\t\t\t\tthat.write = 0;\n\n\t\t\t// compute bytes to copy\n\t\t\tn = that.write - q;\n\t\t\tif (n > z.avail_out)\n\t\t\t\tn = z.avail_out;\n\t\t\tif (n !== 0 && r == Z_BUF_ERROR)\n\t\t\t\tr = Z_OK;\n\n\t\t\t// update counters\n\t\t\tz.avail_out -= n;\n\t\t\tz.total_out += n;\n\n\t\t\t// copy\n\t\t\tz.next_out.set(that.win.subarray(q, q + n), p);\n\t\t\tp += n;\n\t\t\tq += n;\n\t\t}\n\n\t\t// update pointers\n\t\tz.next_out_index = p;\n\t\tthat.read = q;\n\n\t\t// done\n\t\treturn r;\n\t};\n\n\tthat.proc = function (z, r) {\n\t\tlet t; // temporary storage\n\t\tlet b; // bit buffer\n\t\tlet k; // bits in bit buffer\n\t\tlet p; // input data pointer\n\t\tlet n; // bytes available there\n\t\tlet q; // output win write pointer\n\t\tlet m; // bytes to end of win or read pointer\n\n\t\tlet i;\n\n\t\t// copy input/output information to locals (UPDATE macro restores)\n\t\t// {\n\t\tp = z.next_in_index;\n\t\tn = z.avail_in;\n\t\tb = that.bitb;\n\t\tk = that.bitk;\n\t\t// }\n\t\t// {\n\t\tq = that.write;\n\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t// }\n\n\t\t// process input based on current state\n\t\t// DEBUG dtree\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\tlet bl, bd, tl, td, bl_, bd_, tl_, td_;\n\t\t\tswitch (mode) {\n\t\t\t\tcase TYPE:\n\n\t\t\t\t\twhile (k < (3)) {\n\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\t\t\t\t\tt = /* (int) */(b & 7);\n\t\t\t\t\tlast = t & 1;\n\n\t\t\t\t\tswitch (t >>> 1) {\n\t\t\t\t\t\tcase 0: // stored\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\t\t\t\t\t\t\tt = k & 7; // go to byte boundary\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (t);\n\t\t\t\t\t\t\tk -= (t);\n\t\t\t\t\t\t\t// }\n\t\t\t\t\t\t\tmode = LENS; // get length of stored block\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 1: // fixed\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tbl = []; // new Array(1);\n\t\t\t\t\t\t\tbd = []; // new Array(1);\n\t\t\t\t\t\t\ttl = [[]]; // new Array(1);\n\t\t\t\t\t\t\ttd = [[]]; // new Array(1);\n\n\t\t\t\t\t\t\tInfTree.inflate_trees_fixed(bl, bd, tl, td);\n\t\t\t\t\t\t\tcodes.init(bl[0], bd[0], tl[0], 0, td[0], 0);\n\t\t\t\t\t\t\t// }\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\n\t\t\t\t\t\t\tmode = CODES;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 2: // dynamic\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\n\t\t\t\t\t\t\tmode = TABLE;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 3: // illegal\n\n\t\t\t\t\t\t\t// {\n\t\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t\t// }\n\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t\tz.msg = \"invalid block type\";\n\t\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase LENS:\n\n\t\t\t\t\twhile (k < (32)) {\n\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ((((~b) >>> 16) & 0xffff) != (b & 0xffff)) {\n\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\tz.msg = \"invalid stored block lengths\";\n\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tleft = (b & 0xffff);\n\t\t\t\t\tb = k = 0; // dump bits\n\t\t\t\t\tmode = left !== 0 ? STORED : (last !== 0 ? DRY : TYPE);\n\t\t\t\t\tbreak;\n\t\t\t\tcase STORED:\n\t\t\t\t\tif (n === 0) {\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\tif (q == that.end && that.read !== 0) {\n\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\tr = that.inflate_flush(z, r);\n\t\t\t\t\t\t\tq = that.write;\n\t\t\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\t\t\tif (q == that.end && that.read !== 0) {\n\t\t\t\t\t\t\t\tq = 0;\n\t\t\t\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (m === 0) {\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tr = Z_OK;\n\n\t\t\t\t\tt = left;\n\t\t\t\t\tif (t > n)\n\t\t\t\t\t\tt = n;\n\t\t\t\t\tif (t > m)\n\t\t\t\t\t\tt = m;\n\t\t\t\t\tthat.win.set(z.read_buf(p, t), q);\n\t\t\t\t\tp += t;\n\t\t\t\t\tn -= t;\n\t\t\t\t\tq += t;\n\t\t\t\t\tm -= t;\n\t\t\t\t\tif ((left -= t) !== 0)\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tmode = last !== 0 ? DRY : TYPE;\n\t\t\t\t\tbreak;\n\t\t\t\tcase TABLE:\n\n\t\t\t\t\twhile (k < (14)) {\n\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tn--;\n\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\tk += 8;\n\t\t\t\t\t}\n\n\t\t\t\t\ttable = t = (b & 0x3fff);\n\t\t\t\t\tif ((t & 0x1f) > 29 || ((t >> 5) & 0x1f) > 29) {\n\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\tz.msg = \"too many length or distance symbols\";\n\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tt = 258 + (t & 0x1f) + ((t >> 5) & 0x1f);\n\t\t\t\t\tif (!blens || blens.length < t) {\n\t\t\t\t\t\tblens = []; // new Array(t);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfor (i = 0; i < t; i++) {\n\t\t\t\t\t\t\tblens[i] = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// {\n\t\t\t\t\tb >>>= (14);\n\t\t\t\t\tk -= (14);\n\t\t\t\t\t// }\n\n\t\t\t\t\tindex = 0;\n\t\t\t\t\tmode = BTREE;\n\t\t\t\t/* falls through */\n\t\t\t\tcase BTREE:\n\t\t\t\t\twhile (index < 4 + (table >>> 10)) {\n\t\t\t\t\t\twhile (k < (3)) {\n\t\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tblens[border[index++]] = b & 7;\n\n\t\t\t\t\t\t// {\n\t\t\t\t\t\tb >>>= (3);\n\t\t\t\t\t\tk -= (3);\n\t\t\t\t\t\t// }\n\t\t\t\t\t}\n\n\t\t\t\t\twhile (index < 19) {\n\t\t\t\t\t\tblens[border[index++]] = 0;\n\t\t\t\t\t}\n\n\t\t\t\t\tbb[0] = 7;\n\t\t\t\t\tt = inftree.inflate_trees_bits(blens, bb, tb, hufts, z);\n\t\t\t\t\tif (t != Z_OK) {\n\t\t\t\t\t\tr = t;\n\t\t\t\t\t\tif (r == Z_DATA_ERROR) {\n\t\t\t\t\t\t\tblens = null;\n\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\n\t\t\t\t\tindex = 0;\n\t\t\t\t\tmode = DTREE;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DTREE:\n\t\t\t\t\t// eslint-disable-next-line no-constant-condition\n\t\t\t\t\twhile (true) {\n\t\t\t\t\t\tt = table;\n\t\t\t\t\t\tif (index >= 258 + (t & 0x1f) + ((t >> 5) & 0x1f)) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tlet j, c;\n\n\t\t\t\t\t\tt = bb[0];\n\n\t\t\t\t\t\twhile (k < (t)) {\n\t\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// if (tb[0] == -1) {\n\t\t\t\t\t\t// System.err.println(\"null...\");\n\t\t\t\t\t\t// }\n\n\t\t\t\t\t\tt = hufts[(tb[0] + (b & inflate_mask[t])) * 3 + 1];\n\t\t\t\t\t\tc = hufts[(tb[0] + (b & inflate_mask[t])) * 3 + 2];\n\n\t\t\t\t\t\tif (c < 16) {\n\t\t\t\t\t\t\tb >>>= (t);\n\t\t\t\t\t\t\tk -= (t);\n\t\t\t\t\t\t\tblens[index++] = c;\n\t\t\t\t\t\t} else { // c == 16..18\n\t\t\t\t\t\t\ti = c == 18 ? 7 : c - 14;\n\t\t\t\t\t\t\tj = c == 18 ? 11 : 3;\n\n\t\t\t\t\t\t\twhile (k < (t + i)) {\n\t\t\t\t\t\t\t\tif (n !== 0) {\n\t\t\t\t\t\t\t\t\tr = Z_OK;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tn--;\n\t\t\t\t\t\t\t\tb |= (z.read_byte(p++) & 0xff) << k;\n\t\t\t\t\t\t\t\tk += 8;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tb >>>= (t);\n\t\t\t\t\t\t\tk -= (t);\n\n\t\t\t\t\t\t\tj += (b & inflate_mask[i]);\n\n\t\t\t\t\t\t\tb >>>= (i);\n\t\t\t\t\t\t\tk -= (i);\n\n\t\t\t\t\t\t\ti = index;\n\t\t\t\t\t\t\tt = table;\n\t\t\t\t\t\t\tif (i + j > 258 + (t & 0x1f) + ((t >> 5) & 0x1f) || (c == 16 && i < 1)) {\n\t\t\t\t\t\t\t\tblens = null;\n\t\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t\t\tz.msg = \"invalid bit length repeat\";\n\t\t\t\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tc = c == 16 ? blens[i - 1] : 0;\n\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\tblens[i++] = c;\n\t\t\t\t\t\t\t} while (--j !== 0);\n\t\t\t\t\t\t\tindex = i;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\ttb[0] = -1;\n\t\t\t\t\t// {\n\t\t\t\t\tbl_ = []; // new Array(1);\n\t\t\t\t\tbd_ = []; // new Array(1);\n\t\t\t\t\ttl_ = []; // new Array(1);\n\t\t\t\t\ttd_ = []; // new Array(1);\n\t\t\t\t\tbl_[0] = 9; // must be <= 9 for lookahead assumptions\n\t\t\t\t\tbd_[0] = 6; // must be <= 9 for lookahead assumptions\n\n\t\t\t\t\tt = table;\n\t\t\t\t\tt = inftree.inflate_trees_dynamic(257 + (t & 0x1f), 1 + ((t >> 5) & 0x1f), blens, bl_, bd_, tl_, td_, hufts, z);\n\n\t\t\t\t\tif (t != Z_OK) {\n\t\t\t\t\t\tif (t == Z_DATA_ERROR) {\n\t\t\t\t\t\t\tblens = null;\n\t\t\t\t\t\t\tmode = BADBLOCKS;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tr = t;\n\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tcodes.init(bl_[0], bd_[0], hufts, tl_[0], hufts, td_[0]);\n\t\t\t\t\t// }\n\t\t\t\t\tmode = CODES;\n\t\t\t\t/* falls through */\n\t\t\t\tcase CODES:\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\n\t\t\t\t\tif ((r = codes.proc(that, z, r)) != Z_STREAM_END) {\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tr = Z_OK;\n\t\t\t\t\tcodes.free(z);\n\n\t\t\t\t\tp = z.next_in_index;\n\t\t\t\t\tn = z.avail_in;\n\t\t\t\t\tb = that.bitb;\n\t\t\t\t\tk = that.bitk;\n\t\t\t\t\tq = that.write;\n\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\n\t\t\t\t\tif (last === 0) {\n\t\t\t\t\t\tmode = TYPE;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tmode = DRY;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DRY:\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\tr = that.inflate_flush(z, r);\n\t\t\t\t\tq = that.write;\n\t\t\t\t\tm = /* (int) */(q < that.read ? that.read - q - 1 : that.end - q);\n\t\t\t\t\tif (that.read != that.write) {\n\t\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\t\tthat.write = q;\n\t\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\t\t}\n\t\t\t\t\tmode = DONELOCKS;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DONELOCKS:\n\t\t\t\t\tr = Z_STREAM_END;\n\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t\tcase BADBLOCKS:\n\t\t\t\t\tr = Z_DATA_ERROR;\n\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\treturn that.inflate_flush(z, r);\n\n\t\t\t\tdefault:\n\t\t\t\t\tr = Z_STREAM_ERROR;\n\n\t\t\t\t\tthat.bitb = b;\n\t\t\t\t\tthat.bitk = k;\n\t\t\t\t\tz.avail_in = n;\n\t\t\t\t\tz.total_in += p - z.next_in_index;\n\t\t\t\t\tz.next_in_index = p;\n\t\t\t\t\tthat.write = q;\n\t\t\t\t\treturn that.inflate_flush(z, r);\n\t\t\t}\n\t\t}\n\t};\n\n\tthat.free = function (z) {\n\t\tthat.reset(z, null);\n\t\tthat.win = null;\n\t\thufts = null;\n\t\t// ZFREE(z, s);\n\t};\n\n\tthat.set_dictionary = function (d, start, n) {\n\t\tthat.win.set(d.subarray(start, start + n), 0);\n\t\tthat.read = that.write = n;\n\t};\n\n\t// Returns true if inflate is currently at the end of a block generated\n\t// by Z_SYNC_FLUSH or Z_FULL_FLUSH.\n\tthat.sync_point = function () {\n\t\treturn mode == LENS ? 1 : 0;\n\t};\n\n}\n\n// Inflate\n\n// preset dictionary flag in zlib header\nconst PRESET_DICT = 0x20;\n\nconst Z_DEFLATED = 8;\n\nconst METHOD = 0; // waiting for method byte\nconst FLAG = 1; // waiting for flag byte\nconst DICT4 = 2; // four dictionary check bytes to go\nconst DICT3 = 3; // three dictionary check bytes to go\nconst DICT2 = 4; // two dictionary check bytes to go\nconst DICT1 = 5; // one dictionary check byte to go\nconst DICT0 = 6; // waiting for inflateSetDictionary\nconst BLOCKS = 7; // decompressing blocks\nconst DONE = 12; // finished check, done\nconst BAD = 13; // got an error--stay here\n\nconst mark = [0, 0, 0xff, 0xff];\n\nfunction Inflate() {\n\tconst that = this;\n\n\tthat.mode = 0; // current inflate mode\n\n\t// mode dependent information\n\tthat.method = 0; // if FLAGS, method byte\n\n\t// if CHECK, check values to compare\n\tthat.was = [0]; // new Array(1); // computed check value\n\tthat.need = 0; // stream check value\n\n\t// if BAD, inflateSync's marker bytes count\n\tthat.marker = 0;\n\n\t// mode independent information\n\tthat.wbits = 0; // log2(win size) (8..15, defaults to 15)\n\n\t// this.blocks; // current inflate_blocks state\n\n\tfunction inflateReset(z) {\n\t\tif (!z || !z.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\n\t\tz.total_in = z.total_out = 0;\n\t\tz.msg = null;\n\t\tz.istate.mode = BLOCKS;\n\t\tz.istate.blocks.reset(z, null);\n\t\treturn Z_OK;\n\t}\n\n\tthat.inflateEnd = function (z) {\n\t\tif (that.blocks)\n\t\t\tthat.blocks.free(z);\n\t\tthat.blocks = null;\n\t\t// ZFREE(z, z->state);\n\t\treturn Z_OK;\n\t};\n\n\tthat.inflateInit = function (z, w) {\n\t\tz.msg = null;\n\t\tthat.blocks = null;\n\n\t\t// set win size\n\t\tif (w < 8 || w > 15) {\n\t\t\tthat.inflateEnd(z);\n\t\t\treturn Z_STREAM_ERROR;\n\t\t}\n\t\tthat.wbits = w;\n\n\t\tz.istate.blocks = new InfBlocks(z, 1 << w);\n\n\t\t// reset state\n\t\tinflateReset(z);\n\t\treturn Z_OK;\n\t};\n\n\tthat.inflate = function (z, f) {\n\t\tlet r;\n\t\tlet b;\n\n\t\tif (!z || !z.istate || !z.next_in)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst istate = z.istate;\n\t\tf = f == Z_FINISH ? Z_BUF_ERROR : Z_OK;\n\t\tr = Z_BUF_ERROR;\n\t\t// eslint-disable-next-line no-constant-condition\n\t\twhile (true) {\n\t\t\tswitch (istate.mode) {\n\t\t\t\tcase METHOD:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tif (((istate.method = z.read_byte(z.next_in_index++)) & 0xf) != Z_DEFLATED) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tz.msg = \"unknown compression method\";\n\t\t\t\t\t\tistate.marker = 5; // can't try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ((istate.method >> 4) + 8 > istate.wbits) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tz.msg = \"invalid win size\";\n\t\t\t\t\t\tistate.marker = 5; // can't try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tistate.mode = FLAG;\n\t\t\t\t/* falls through */\n\t\t\t\tcase FLAG:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tb = (z.read_byte(z.next_in_index++)) & 0xff;\n\n\t\t\t\t\tif ((((istate.method << 8) + b) % 31) !== 0) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tz.msg = \"incorrect header check\";\n\t\t\t\t\t\tistate.marker = 5; // can't try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ((b & PRESET_DICT) === 0) {\n\t\t\t\t\t\tistate.mode = BLOCKS;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tistate.mode = DICT4;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT4:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need = ((z.read_byte(z.next_in_index++) & 0xff) << 24) & 0xff000000;\n\t\t\t\t\tistate.mode = DICT3;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT3:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need += ((z.read_byte(z.next_in_index++) & 0xff) << 16) & 0xff0000;\n\t\t\t\t\tistate.mode = DICT2;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT2:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need += ((z.read_byte(z.next_in_index++) & 0xff) << 8) & 0xff00;\n\t\t\t\t\tistate.mode = DICT1;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DICT1:\n\n\t\t\t\t\tif (z.avail_in === 0)\n\t\t\t\t\t\treturn r;\n\t\t\t\t\tr = f;\n\n\t\t\t\t\tz.avail_in--;\n\t\t\t\t\tz.total_in++;\n\t\t\t\t\tistate.need += (z.read_byte(z.next_in_index++) & 0xff);\n\t\t\t\t\tistate.mode = DICT0;\n\t\t\t\t\treturn Z_NEED_DICT;\n\t\t\t\tcase DICT0:\n\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\tz.msg = \"need dictionary\";\n\t\t\t\t\tistate.marker = 0; // can try inflateSync\n\t\t\t\t\treturn Z_STREAM_ERROR;\n\t\t\t\tcase BLOCKS:\n\n\t\t\t\t\tr = istate.blocks.proc(z, r);\n\t\t\t\t\tif (r == Z_DATA_ERROR) {\n\t\t\t\t\t\tistate.mode = BAD;\n\t\t\t\t\t\tistate.marker = 0; // can try inflateSync\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif (r == Z_OK) {\n\t\t\t\t\t\tr = f;\n\t\t\t\t\t}\n\t\t\t\t\tif (r != Z_STREAM_END) {\n\t\t\t\t\t\treturn r;\n\t\t\t\t\t}\n\t\t\t\t\tr = f;\n\t\t\t\t\tistate.blocks.reset(z, istate.was);\n\t\t\t\t\tistate.mode = DONE;\n\t\t\t\t/* falls through */\n\t\t\t\tcase DONE:\n\t\t\t\t\tz.avail_in = 0;\n\t\t\t\t\treturn Z_STREAM_END;\n\t\t\t\tcase BAD:\n\t\t\t\t\treturn Z_DATA_ERROR;\n\t\t\t\tdefault:\n\t\t\t\t\treturn Z_STREAM_ERROR;\n\t\t\t}\n\t\t}\n\t};\n\n\tthat.inflateSetDictionary = function (z, dictionary, dictLength) {\n\t\tlet index = 0, length = dictLength;\n\t\tif (!z || !z.istate || z.istate.mode != DICT0)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst istate = z.istate;\n\t\tif (length >= (1 << istate.wbits)) {\n\t\t\tlength = (1 << istate.wbits) - 1;\n\t\t\tindex = dictLength - length;\n\t\t}\n\t\tistate.blocks.set_dictionary(dictionary, index, length);\n\t\tistate.mode = BLOCKS;\n\t\treturn Z_OK;\n\t};\n\n\tthat.inflateSync = function (z) {\n\t\tlet n; // number of bytes to look at\n\t\tlet p; // pointer to bytes\n\t\tlet m; // number of marker bytes found in a row\n\t\tlet r, w; // temporaries to save total_in and total_out\n\n\t\t// set up\n\t\tif (!z || !z.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst istate = z.istate;\n\t\tif (istate.mode != BAD) {\n\t\t\tistate.mode = BAD;\n\t\t\tistate.marker = 0;\n\t\t}\n\t\tif ((n = z.avail_in) === 0)\n\t\t\treturn Z_BUF_ERROR;\n\t\tp = z.next_in_index;\n\t\tm = istate.marker;\n\n\t\t// search\n\t\twhile (n !== 0 && m < 4) {\n\t\t\tif (z.read_byte(p) == mark[m]) {\n\t\t\t\tm++;\n\t\t\t} else if (z.read_byte(p) !== 0) {\n\t\t\t\tm = 0;\n\t\t\t} else {\n\t\t\t\tm = 4 - m;\n\t\t\t}\n\t\t\tp++;\n\t\t\tn--;\n\t\t}\n\n\t\t// restore\n\t\tz.total_in += p - z.next_in_index;\n\t\tz.next_in_index = p;\n\t\tz.avail_in = n;\n\t\tistate.marker = m;\n\n\t\t// return no joy or set up to restart on a new block\n\t\tif (m != 4) {\n\t\t\treturn Z_DATA_ERROR;\n\t\t}\n\t\tr = z.total_in;\n\t\tw = z.total_out;\n\t\tinflateReset(z);\n\t\tz.total_in = r;\n\t\tz.total_out = w;\n\t\tistate.mode = BLOCKS;\n\t\treturn Z_OK;\n\t};\n\n\t// Returns true if inflate is currently at the end of a block generated\n\t// by Z_SYNC_FLUSH or Z_FULL_FLUSH. This function is used by one PPP\n\t// implementation to provide an additional safety check. PPP uses\n\t// Z_SYNC_FLUSH\n\t// but removes the length bytes of the resulting empty stored block. When\n\t// decompressing, PPP checks that at the end of input packet, inflate is\n\t// waiting for these length bytes.\n\tthat.inflateSyncPoint = function (z) {\n\t\tif (!z || !z.istate || !z.istate.blocks)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn z.istate.blocks.sync_point();\n\t};\n}\n\n// ZStream\n\nfunction ZStream() {\n}\n\nZStream.prototype = {\n\tinflateInit(bits) {\n\t\tconst that = this;\n\t\tthat.istate = new Inflate();\n\t\tif (!bits)\n\t\t\tbits = MAX_BITS;\n\t\treturn that.istate.inflateInit(that, bits);\n\t},\n\n\tinflate(f) {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.istate.inflate(that, f);\n\t},\n\n\tinflateEnd() {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\tconst ret = that.istate.inflateEnd(that);\n\t\tthat.istate = null;\n\t\treturn ret;\n\t},\n\n\tinflateSync() {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.istate.inflateSync(that);\n\t},\n\tinflateSetDictionary(dictionary, dictLength) {\n\t\tconst that = this;\n\t\tif (!that.istate)\n\t\t\treturn Z_STREAM_ERROR;\n\t\treturn that.istate.inflateSetDictionary(that, dictionary, dictLength);\n\t},\n\tread_byte(start) {\n\t\tconst that = this;\n\t\treturn that.next_in[start];\n\t},\n\tread_buf(start, size) {\n\t\tconst that = this;\n\t\treturn that.next_in.subarray(start, start + size);\n\t}\n};\n\n// Inflater\n\nfunction ZipInflate(options) {\n\tconst that = this;\n\tconst z = new ZStream();\n\tconst bufsize = options && options.chunkSize ? Math.floor(options.chunkSize * 2) : 128 * 1024;\n\tconst flush = Z_NO_FLUSH;\n\tconst buf = new Uint8Array(bufsize);\n\tlet nomoreinput = false;\n\n\tz.inflateInit();\n\tz.next_out = buf;\n\n\tthat.append = function (data, onprogress) {\n\t\tconst buffers = [];\n\t\tlet err, array, lastIndex = 0, bufferIndex = 0, bufferSize = 0;\n\t\tif (data.length === 0)\n\t\t\treturn;\n\t\tz.next_in_index = 0;\n\t\tz.next_in = data;\n\t\tz.avail_in = data.length;\n\t\tdo {\n\t\t\tz.next_out_index = 0;\n\t\t\tz.avail_out = bufsize;\n\t\t\tif ((z.avail_in === 0) && (!nomoreinput)) { // if buffer is empty and more input is available, refill it\n\t\t\t\tz.next_in_index = 0;\n\t\t\t\tnomoreinput = true;\n\t\t\t}\n\t\t\terr = z.inflate(flush);\n\t\t\tif (nomoreinput && (err === Z_BUF_ERROR)) {\n\t\t\t\tif (z.avail_in !== 0)\n\t\t\t\t\tthrow new Error(\"inflating: bad input\");\n\t\t\t} else if (err !== Z_OK && err !== Z_STREAM_END)\n\t\t\t\tthrow new Error(\"inflating: \" + z.msg);\n\t\t\tif ((nomoreinput || err === Z_STREAM_END) && (z.avail_in === data.length))\n\t\t\t\tthrow new Error(\"inflating: bad input\");\n\t\t\tif (z.next_out_index)\n\t\t\t\tif (z.next_out_index === bufsize)\n\t\t\t\t\tbuffers.push(new Uint8Array(buf));\n\t\t\t\telse\n\t\t\t\t\tbuffers.push(buf.slice(0, z.next_out_index));\n\t\t\tbufferSize += z.next_out_index;\n\t\t\tif (onprogress && z.next_in_index > 0 && z.next_in_index != lastIndex) {\n\t\t\t\tonprogress(z.next_in_index);\n\t\t\t\tlastIndex = z.next_in_index;\n\t\t\t}\n\t\t} while (z.avail_in > 0 || z.avail_out === 0);\n\t\tif (buffers.length > 1) {\n\t\t\tarray = new Uint8Array(bufferSize);\n\t\t\tbuffers.forEach(function (chunk) {\n\t\t\t\tarray.set(chunk, bufferIndex);\n\t\t\t\tbufferIndex += chunk.length;\n\t\t\t});\n\t\t} else {\n\t\t\tarray = buffers[0] || new Uint8Array();\n\t\t}\n\t\treturn array;\n\t};\n\tthat.flush = function () {\n\t\tz.inflateEnd();\n\t};\n}\n\nexport {\n\tZipInflate as Inflate\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nconst MAX_32_BITS = 0xffffffff;\nconst MAX_16_BITS = 0xffff;\nconst COMPRESSION_METHOD_DEFLATE = 0x08;\nconst COMPRESSION_METHOD_STORE = 0x00;\nconst COMPRESSION_METHOD_AES = 0x63;\n\nconst LOCAL_FILE_HEADER_SIGNATURE = 0x04034b50;\nconst SPLIT_ZIP_FILE_SIGNATURE = 0x08074b50;\nconst DATA_DESCRIPTOR_RECORD_SIGNATURE = SPLIT_ZIP_FILE_SIGNATURE;\nconst CENTRAL_FILE_HEADER_SIGNATURE = 0x02014b50;\nconst END_OF_CENTRAL_DIR_SIGNATURE = 0x06054b50;\nconst ZIP64_END_OF_CENTRAL_DIR_SIGNATURE = 0x06064b50;\nconst ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE = 0x07064b50;\nconst END_OF_CENTRAL_DIR_LENGTH = 22;\nconst ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH = 20;\nconst ZIP64_END_OF_CENTRAL_DIR_LENGTH = 56;\nconst ZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH = END_OF_CENTRAL_DIR_LENGTH + ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH + ZIP64_END_OF_CENTRAL_DIR_LENGTH;\n\nconst EXTRAFIELD_TYPE_ZIP64 = 0x0001;\nconst EXTRAFIELD_TYPE_AES = 0x9901;\nconst EXTRAFIELD_TYPE_NTFS = 0x000a;\nconst EXTRAFIELD_TYPE_NTFS_TAG1 = 0x0001;\nconst EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP = 0x5455;\nconst EXTRAFIELD_TYPE_UNICODE_PATH = 0x7075;\nconst EXTRAFIELD_TYPE_UNICODE_COMMENT = 0x6375;\n\nconst BITFLAG_ENCRYPTED = 0x01;\nconst BITFLAG_LEVEL = 0x06;\nconst BITFLAG_DATA_DESCRIPTOR = 0x0008;\nconst BITFLAG_LANG_ENCODING_FLAG = 0x0800;\nconst FILE_ATTR_MSDOS_DIR_MASK = 0x10;\n\nconst VERSION_DEFLATE = 0x14;\nconst VERSION_ZIP64 = 0x2D;\nconst VERSION_AES = 0x33;\n\nconst DIRECTORY_SIGNATURE = \"/\";\n\nconst MAX_DATE = new Date(2107, 11, 31);\nconst MIN_DATE = new Date(1980, 0, 1);\n\nconst UNDEFINED_VALUE = undefined;\nconst UNDEFINED_TYPE = \"undefined\";\nconst FUNCTION_TYPE = \"function\";\n\nexport {\n\tMAX_32_BITS,\n\tMAX_16_BITS,\n\tCOMPRESSION_METHOD_DEFLATE,\n\tCOMPRESSION_METHOD_STORE,\n\tCOMPRESSION_METHOD_AES,\n\tSPLIT_ZIP_FILE_SIGNATURE,\n\tLOCAL_FILE_HEADER_SIGNATURE,\n\tDATA_DESCRIPTOR_RECORD_SIGNATURE,\n\tCENTRAL_FILE_HEADER_SIGNATURE,\n\tEND_OF_CENTRAL_DIR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_SIGNATURE,\n\tEXTRAFIELD_TYPE_ZIP64,\n\tEXTRAFIELD_TYPE_AES,\n\tEXTRAFIELD_TYPE_NTFS,\n\tEXTRAFIELD_TYPE_NTFS_TAG1,\n\tEXTRAFIELD_TYPE_EXTENDED_TIMESTAMP,\n\tEXTRAFIELD_TYPE_UNICODE_PATH,\n\tEXTRAFIELD_TYPE_UNICODE_COMMENT,\n\tEND_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH,\n\tBITFLAG_ENCRYPTED,\n\tBITFLAG_LEVEL,\n\tBITFLAG_DATA_DESCRIPTOR,\n\tBITFLAG_LANG_ENCODING_FLAG,\n\tFILE_ATTR_MSDOS_DIR_MASK,\n\tVERSION_DEFLATE,\n\tVERSION_ZIP64,\n\tVERSION_AES,\n\tDIRECTORY_SIGNATURE,\n\tMIN_DATE,\n\tMAX_DATE,\n\tUNDEFINED_VALUE,\n\tUNDEFINED_TYPE,\n\tFUNCTION_TYPE\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n\nexport {\n\tStreamAdapter\n};\n\nclass StreamAdapter {\n\n\tconstructor(Codec) {\n\t\treturn class extends TransformStream {\n\t\t\tconstructor(_format, options) {\n\t\t\t\tconst codec = new Codec(options);\n\t\t\t\tsuper({\n\t\t\t\t\ttransform(chunk, controller) {\n\t\t\t\t\t\tcontroller.enqueue(codec.append(chunk));\n\t\t\t\t\t},\n\t\t\t\t\tflush(controller) {\n\t\t\t\t\t\tconst chunk = codec.flush();\n\t\t\t\t\t\tif (chunk) {\n\t\t\t\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t};\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global navigator, CompressionStream, DecompressionStream */\n\nimport {\n\tUNDEFINED_VALUE,\n\tUNDEFINED_TYPE\n} from \"./constants.js\";\nimport { StreamAdapter } from \"./streams/stream-adapter.js\";\n\nconst MINIMUM_CHUNK_SIZE = 64;\nlet maxWorkers = 2;\ntry {\n\tif (typeof navigator != UNDEFINED_TYPE && navigator.hardwareConcurrency) {\n\t\tmaxWorkers = navigator.hardwareConcurrency;\n\t}\n} catch (_error) {\n\t// ignored\n}\nconst DEFAULT_CONFIGURATION = {\n\tchunkSize: 512 * 1024,\n\tmaxWorkers,\n\tterminateWorkerTimeout: 5000,\n\tuseWebWorkers: true,\n\tuseCompressionStream: true,\n\tworkerScripts: UNDEFINED_VALUE,\n\tCompressionStreamNative: typeof CompressionStream != UNDEFINED_TYPE && CompressionStream,\n\tDecompressionStreamNative: typeof DecompressionStream != UNDEFINED_TYPE && DecompressionStream\n};\n\nconst config = Object.assign({}, DEFAULT_CONFIGURATION);\n\nexport {\n\tconfigure,\n\tgetConfiguration,\n\tgetChunkSize\n};\n\nfunction getConfiguration() {\n\treturn config;\n}\n\nfunction getChunkSize(config) {\n\treturn Math.max(config.chunkSize, MINIMUM_CHUNK_SIZE);\n}\n\nfunction configure(configuration) {\n\tconst {\n\t\tbaseURL,\n\t\tchunkSize,\n\t\tmaxWorkers,\n\t\tterminateWorkerTimeout,\n\t\tuseCompressionStream,\n\t\tuseWebWorkers,\n\t\tDeflate,\n\t\tInflate,\n\t\tCompressionStream,\n\t\tDecompressionStream,\n\t\tworkerScripts\n\t} = configuration;\n\tsetIfDefined(\"baseURL\", baseURL);\n\tsetIfDefined(\"chunkSize\", chunkSize);\n\tsetIfDefined(\"maxWorkers\", maxWorkers);\n\tsetIfDefined(\"terminateWorkerTimeout\", terminateWorkerTimeout);\n\tsetIfDefined(\"useCompressionStream\", useCompressionStream);\n\tsetIfDefined(\"useWebWorkers\", useWebWorkers);\n\tif (Deflate) {\n\t\tconfig.CompressionStream = new StreamAdapter(Deflate);\n\t}\n\tif (Inflate) {\n\t\tconfig.DecompressionStream = new StreamAdapter(Inflate);\n\t}\n\tsetIfDefined(\"CompressionStream\", CompressionStream);\n\tsetIfDefined(\"DecompressionStream\", DecompressionStream);\n\tif (workerScripts !== UNDEFINED_VALUE) {\n\t\tconst { deflate, inflate } = workerScripts;\n\t\tif (deflate || inflate) {\n\t\t\tif (!config.workerScripts) {\n\t\t\t\tconfig.workerScripts = {};\n\t\t\t}\n\t\t}\n\t\tif (deflate) {\n\t\t\tif (!Array.isArray(deflate)) {\n\t\t\t\tthrow new Error(\"workerScripts.deflate must be an array\");\n\t\t\t}\n\t\t\tconfig.workerScripts.deflate = deflate;\n\t\t}\n\t\tif (inflate) {\n\t\t\tif (!Array.isArray(inflate)) {\n\t\t\t\tthrow new Error(\"workerScripts.inflate must be an array\");\n\t\t\t}\n\t\t\tconfig.workerScripts.inflate = inflate;\n\t\t}\n\t}\n}\n\nfunction setIfDefined(propertyName, propertyValue) {\n\tif (propertyValue !== UNDEFINED_VALUE) {\n\t\tconfig[propertyName] = propertyValue;\n\t}\n}\n","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n// deno-lint-ignore-file no-prototype-builtins\n\nimport { getMimeType as getDefaultMimeType } from \"./default-mime-type.js\";\n\nconst table = {\n\t\"application\": {\n\t\t\"andrew-inset\": \"ez\",\n\t\t\"annodex\": \"anx\",\n\t\t\"atom+xml\": \"atom\",\n\t\t\"atomcat+xml\": \"atomcat\",\n\t\t\"atomserv+xml\": \"atomsrv\",\n\t\t\"bbolin\": \"lin\",\n\t\t\"cap\": [\"cap\", \"pcap\"],\n\t\t\"cu-seeme\": \"cu\",\n\t\t\"davmount+xml\": \"davmount\",\n\t\t\"dsptype\": \"tsp\",\n\t\t\"ecmascript\": [\"es\", \"ecma\"],\n\t\t\"futuresplash\": \"spl\",\n\t\t\"hta\": \"hta\",\n\t\t\"java-archive\": \"jar\",\n\t\t\"java-serialized-object\": \"ser\",\n\t\t\"java-vm\": \"class\",\n\t\t\"javascript\": \"js\",\n\t\t\"m3g\": \"m3g\",\n\t\t\"mac-binhex40\": \"hqx\",\n\t\t\"mathematica\": [\"nb\", \"ma\", \"mb\"],\n\t\t\"msaccess\": \"mdb\",\n\t\t\"msword\": [\"doc\", \"dot\"],\n\t\t\"mxf\": \"mxf\",\n\t\t\"oda\": \"oda\",\n\t\t\"ogg\": \"ogx\",\n\t\t\"pdf\": \"pdf\",\n\t\t\"pgp-keys\": \"key\",\n\t\t\"pgp-signature\": [\"asc\", \"sig\"],\n\t\t\"pics-rules\": \"prf\",\n\t\t\"postscript\": [\"ps\", \"ai\", \"eps\", \"epsi\", \"epsf\", \"eps2\", \"eps3\"],\n\t\t\"rar\": \"rar\",\n\t\t\"rdf+xml\": \"rdf\",\n\t\t\"rss+xml\": \"rss\",\n\t\t\"rtf\": \"rtf\",\n\t\t\"smil\": [\"smi\", \"smil\"],\n\t\t\"xhtml+xml\": [\"xhtml\", \"xht\"],\n\t\t\"xml\": [\"xml\", \"xsl\", \"xsd\"],\n\t\t\"xspf+xml\": \"xspf\",\n\t\t\"zip\": \"zip\",\n\t\t\"vnd.android.package-archive\": \"apk\",\n\t\t\"vnd.cinderella\": \"cdy\",\n\t\t\"vnd.google-earth.kml+xml\": \"kml\",\n\t\t\"vnd.google-earth.kmz\": \"kmz\",\n\t\t\"vnd.mozilla.xul+xml\": \"xul\",\n\t\t\"vnd.ms-excel\": [\"xls\", \"xlb\", \"xlt\", \"xlm\", \"xla\", \"xlc\", \"xlw\"],\n\t\t\"vnd.ms-pki.seccat\": \"cat\",\n\t\t\"vnd.ms-pki.stl\": \"stl\",\n\t\t\"vnd.ms-powerpoint\": [\"ppt\", \"pps\", \"pot\"],\n\t\t\"vnd.oasis.opendocument.chart\": \"odc\",\n\t\t\"vnd.oasis.opendocument.database\": \"odb\",\n\t\t\"vnd.oasis.opendocument.formula\": \"odf\",\n\t\t\"vnd.oasis.opendocument.graphics\": \"odg\",\n\t\t\"vnd.oasis.opendocument.graphics-template\": \"otg\",\n\t\t\"vnd.oasis.opendocument.image\": \"odi\",\n\t\t\"vnd.oasis.opendocument.presentation\": \"odp\",\n\t\t\"vnd.oasis.opendocument.presentation-template\": \"otp\",\n\t\t\"vnd.oasis.opendocument.spreadsheet\": \"ods\",\n\t\t\"vnd.oasis.opendocument.spreadsheet-template\": \"ots\",\n\t\t\"vnd.oasis.opendocument.text\": \"odt\",\n\t\t\"vnd.oasis.opendocument.text-master\": \"odm\",\n\t\t\"vnd.oasis.opendocument.text-template\": \"ott\",\n\t\t\"vnd.oasis.opendocument.text-web\": \"oth\",\n\t\t\"vnd.openxmlformats-officedocument.spreadsheetml.sheet\": \"xlsx\",\n\t\t\"vnd.openxmlformats-officedocument.spreadsheetml.template\": \"xltx\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.presentation\": \"pptx\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.slideshow\": \"ppsx\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.template\": \"potx\",\n\t\t\"vnd.openxmlformats-officedocument.wordprocessingml.document\": \"docx\",\n\t\t\"vnd.openxmlformats-officedocument.wordprocessingml.template\": \"dotx\",\n\t\t\"vnd.smaf\": \"mmf\",\n\t\t\"vnd.stardivision.calc\": \"sdc\",\n\t\t\"vnd.stardivision.chart\": \"sds\",\n\t\t\"vnd.stardivision.draw\": \"sda\",\n\t\t\"vnd.stardivision.impress\": \"sdd\",\n\t\t\"vnd.stardivision.math\": [\"sdf\", \"smf\"],\n\t\t\"vnd.stardivision.writer\": [\"sdw\", \"vor\"],\n\t\t\"vnd.stardivision.writer-global\": \"sgl\",\n\t\t\"vnd.sun.xml.calc\": \"sxc\",\n\t\t\"vnd.sun.xml.calc.template\": \"stc\",\n\t\t\"vnd.sun.xml.draw\": \"sxd\",\n\t\t\"vnd.sun.xml.draw.template\": \"std\",\n\t\t\"vnd.sun.xml.impress\": \"sxi\",\n\t\t\"vnd.sun.xml.impress.template\": \"sti\",\n\t\t\"vnd.sun.xml.math\": \"sxm\",\n\t\t\"vnd.sun.xml.writer\": \"sxw\",\n\t\t\"vnd.sun.xml.writer.global\": \"sxg\",\n\t\t\"vnd.sun.xml.writer.template\": \"stw\",\n\t\t\"vnd.symbian.install\": [\"sis\", \"sisx\"],\n\t\t\"vnd.visio\": [\"vsd\", \"vst\", \"vss\", \"vsw\"],\n\t\t\"vnd.wap.wbxml\": \"wbxml\",\n\t\t\"vnd.wap.wmlc\": \"wmlc\",\n\t\t\"vnd.wap.wmlscriptc\": \"wmlsc\",\n\t\t\"vnd.wordperfect\": \"wpd\",\n\t\t\"vnd.wordperfect5.1\": \"wp5\",\n\t\t\"x-123\": \"wk\",\n\t\t\"x-7z-compressed\": \"7z\",\n\t\t\"x-abiword\": \"abw\",\n\t\t\"x-apple-diskimage\": \"dmg\",\n\t\t\"x-bcpio\": \"bcpio\",\n\t\t\"x-bittorrent\": \"torrent\",\n\t\t\"x-cbr\": [\"cbr\", \"cba\", \"cbt\", \"cb7\"],\n\t\t\"x-cbz\": \"cbz\",\n\t\t\"x-cdf\": [\"cdf\", \"cda\"],\n\t\t\"x-cdlink\": \"vcd\",\n\t\t\"x-chess-pgn\": \"pgn\",\n\t\t\"x-cpio\": \"cpio\",\n\t\t\"x-csh\": \"csh\",\n\t\t\"x-debian-package\": [\"deb\", \"udeb\"],\n\t\t\"x-director\": [\"dcr\", \"dir\", \"dxr\", \"cst\", \"cct\", \"cxt\", \"w3d\", \"fgd\", \"swa\"],\n\t\t\"x-dms\": \"dms\",\n\t\t\"x-doom\": \"wad\",\n\t\t\"x-dvi\": \"dvi\",\n\t\t\"x-httpd-eruby\": \"rhtml\",\n\t\t\"x-font\": \"pcf.Z\",\n\t\t\"x-freemind\": \"mm\",\n\t\t\"x-gnumeric\": \"gnumeric\",\n\t\t\"x-go-sgf\": \"sgf\",\n\t\t\"x-graphing-calculator\": \"gcf\",\n\t\t\"x-gtar\": [\"gtar\", \"taz\"],\n\t\t\"x-hdf\": \"hdf\",\n\t\t\"x-httpd-php\": [\"phtml\", \"pht\", \"php\"],\n\t\t\"x-httpd-php-source\": \"phps\",\n\t\t\"x-httpd-php3\": \"php3\",\n\t\t\"x-httpd-php3-preprocessed\": \"php3p\",\n\t\t\"x-httpd-php4\": \"php4\",\n\t\t\"x-httpd-php5\": \"php5\",\n\t\t\"x-ica\": \"ica\",\n\t\t\"x-info\": \"info\",\n\t\t\"x-internet-signup\": [\"ins\", \"isp\"],\n\t\t\"x-iphone\": \"iii\",\n\t\t\"x-iso9660-image\": \"iso\",\n\t\t\"x-java-jnlp-file\": \"jnlp\",\n\t\t\"x-jmol\": \"jmz\",\n\t\t\"x-killustrator\": \"kil\",\n\t\t\"x-koan\": [\"skp\", \"skd\", \"skt\", \"skm\"],\n\t\t\"x-kpresenter\": [\"kpr\", \"kpt\"],\n\t\t\"x-kword\": [\"kwd\", \"kwt\"],\n\t\t\"x-latex\": \"latex\",\n\t\t\"x-lha\": \"lha\",\n\t\t\"x-lyx\": \"lyx\",\n\t\t\"x-lzh\": \"lzh\",\n\t\t\"x-lzx\": \"lzx\",\n\t\t\"x-maker\": [\"frm\", \"maker\", \"frame\", \"fm\", \"fb\", \"book\", \"fbdoc\"],\n\t\t\"x-ms-wmd\": \"wmd\",\n\t\t\"x-ms-wmz\": \"wmz\",\n\t\t\"x-msdos-program\": [\"com\", \"exe\", \"bat\", \"dll\"],\n\t\t\"x-msi\": \"msi\",\n\t\t\"x-netcdf\": [\"nc\", \"cdf\"],\n\t\t\"x-ns-proxy-autoconfig\": [\"pac\", \"dat\"],\n\t\t\"x-nwc\": \"nwc\",\n\t\t\"x-object\": \"o\",\n\t\t\"x-oz-application\": \"oza\",\n\t\t\"x-pkcs7-certreqresp\": \"p7r\",\n\t\t\"x-python-code\": [\"pyc\", \"pyo\"],\n\t\t\"x-qgis\": [\"qgs\", \"shp\", \"shx\"],\n\t\t\"x-quicktimeplayer\": \"qtl\",\n\t\t\"x-redhat-package-manager\": \"rpm\",\n\t\t\"x-ruby\": \"rb\",\n\t\t\"x-sh\": \"sh\",\n\t\t\"x-shar\": \"shar\",\n\t\t\"x-shockwave-flash\": [\"swf\", \"swfl\"],\n\t\t\"x-silverlight\": \"scr\",\n\t\t\"x-stuffit\": \"sit\",\n\t\t\"x-sv4cpio\": \"sv4cpio\",\n\t\t\"x-sv4crc\": \"sv4crc\",\n\t\t\"x-tar\": \"tar\",\n\t\t\"x-tcl\": \"tcl\",\n\t\t\"x-tex-gf\": \"gf\",\n\t\t\"x-tex-pk\": \"pk\",\n\t\t\"x-texinfo\": [\"texinfo\", \"texi\"],\n\t\t\"x-trash\": [\"~\", \"%\", \"bak\", \"old\", \"sik\"],\n\t\t\"x-troff\": [\"t\", \"tr\", \"roff\"],\n\t\t\"x-troff-man\": \"man\",\n\t\t\"x-troff-me\": \"me\",\n\t\t\"x-troff-ms\": \"ms\",\n\t\t\"x-ustar\": \"ustar\",\n\t\t\"x-wais-source\": \"src\",\n\t\t\"x-wingz\": \"wz\",\n\t\t\"x-x509-ca-cert\": [\"crt\", \"der\", \"cer\"],\n\t\t\"x-xcf\": \"xcf\",\n\t\t\"x-xfig\": \"fig\",\n\t\t\"x-xpinstall\": \"xpi\",\n\t\t\"applixware\": \"aw\",\n\t\t\"atomsvc+xml\": \"atomsvc\",\n\t\t\"ccxml+xml\": \"ccxml\",\n\t\t\"cdmi-capability\": \"cdmia\",\n\t\t\"cdmi-container\": \"cdmic\",\n\t\t\"cdmi-domain\": \"cdmid\",\n\t\t\"cdmi-object\": \"cdmio\",\n\t\t\"cdmi-queue\": \"cdmiq\",\n\t\t\"docbook+xml\": \"dbk\",\n\t\t\"dssc+der\": \"dssc\",\n\t\t\"dssc+xml\": \"xdssc\",\n\t\t\"emma+xml\": \"emma\",\n\t\t\"epub+zip\": \"epub\",\n\t\t\"exi\": \"exi\",\n\t\t\"font-tdpfr\": \"pfr\",\n\t\t\"gml+xml\": \"gml\",\n\t\t\"gpx+xml\": \"gpx\",\n\t\t\"gxf\": \"gxf\",\n\t\t\"hyperstudio\": \"stk\",\n\t\t\"inkml+xml\": [\"ink\", \"inkml\"],\n\t\t\"ipfix\": \"ipfix\",\n\t\t\"json\": \"json\",\n\t\t\"jsonml+json\": \"jsonml\",\n\t\t\"lost+xml\": \"lostxml\",\n\t\t\"mads+xml\": \"mads\",\n\t\t\"marc\": \"mrc\",\n\t\t\"marcxml+xml\": \"mrcx\",\n\t\t\"mathml+xml\": \"mathml\",\n\t\t\"mbox\": \"mbox\",\n\t\t\"mediaservercontrol+xml\": \"mscml\",\n\t\t\"metalink+xml\": \"metalink\",\n\t\t\"metalink4+xml\": \"meta4\",\n\t\t\"mets+xml\": \"mets\",\n\t\t\"mods+xml\": \"mods\",\n\t\t\"mp21\": [\"m21\", \"mp21\"],\n\t\t\"mp4\": \"mp4s\",\n\t\t\"oebps-package+xml\": \"opf\",\n\t\t\"omdoc+xml\": \"omdoc\",\n\t\t\"onenote\": [\"onetoc\", \"onetoc2\", \"onetmp\", \"onepkg\"],\n\t\t\"oxps\": \"oxps\",\n\t\t\"patch-ops-error+xml\": \"xer\",\n\t\t\"pgp-encrypted\": \"pgp\",\n\t\t\"pkcs10\": \"p10\",\n\t\t\"pkcs7-mime\": [\"p7m\", \"p7c\"],\n\t\t\"pkcs7-signature\": \"p7s\",\n\t\t\"pkcs8\": \"p8\",\n\t\t\"pkix-attr-cert\": \"ac\",\n\t\t\"pkix-crl\": \"crl\",\n\t\t\"pkix-pkipath\": \"pkipath\",\n\t\t\"pkixcmp\": \"pki\",\n\t\t\"pls+xml\": \"pls\",\n\t\t\"prs.cww\": \"cww\",\n\t\t\"pskc+xml\": \"pskcxml\",\n\t\t\"reginfo+xml\": \"rif\",\n\t\t\"relax-ng-compact-syntax\": \"rnc\",\n\t\t\"resource-lists+xml\": \"rl\",\n\t\t\"resource-lists-diff+xml\": \"rld\",\n\t\t\"rls-services+xml\": \"rs\",\n\t\t\"rpki-ghostbusters\": \"gbr\",\n\t\t\"rpki-manifest\": \"mft\",\n\t\t\"rpki-roa\": \"roa\",\n\t\t\"rsd+xml\": \"rsd\",\n\t\t\"sbml+xml\": \"sbml\",\n\t\t\"scvp-cv-request\": \"scq\",\n\t\t\"scvp-cv-response\": \"scs\",\n\t\t\"scvp-vp-request\": \"spq\",\n\t\t\"scvp-vp-response\": \"spp\",\n\t\t\"sdp\": \"sdp\",\n\t\t\"set-payment-initiation\": \"setpay\",\n\t\t\"set-registration-initiation\": \"setreg\",\n\t\t\"shf+xml\": \"shf\",\n\t\t\"sparql-query\": \"rq\",\n\t\t\"sparql-results+xml\": \"srx\",\n\t\t\"srgs\": \"gram\",\n\t\t\"srgs+xml\": \"grxml\",\n\t\t\"sru+xml\": \"sru\",\n\t\t\"ssdl+xml\": \"ssdl\",\n\t\t\"ssml+xml\": \"ssml\",\n\t\t\"tei+xml\": [\"tei\", \"teicorpus\"],\n\t\t\"thraud+xml\": \"tfi\",\n\t\t\"timestamped-data\": \"tsd\",\n\t\t\"vnd.3gpp.pic-bw-large\": \"plb\",\n\t\t\"vnd.3gpp.pic-bw-small\": \"psb\",\n\t\t\"vnd.3gpp.pic-bw-var\": \"pvb\",\n\t\t\"vnd.3gpp2.tcap\": \"tcap\",\n\t\t\"vnd.3m.post-it-notes\": \"pwn\",\n\t\t\"vnd.accpac.simply.aso\": \"aso\",\n\t\t\"vnd.accpac.simply.imp\": \"imp\",\n\t\t\"vnd.acucobol\": \"acu\",\n\t\t\"vnd.acucorp\": [\"atc\", \"acutc\"],\n\t\t\"vnd.adobe.air-application-installer-package+zip\": \"air\",\n\t\t\"vnd.adobe.formscentral.fcdt\": \"fcdt\",\n\t\t\"vnd.adobe.fxp\": [\"fxp\", \"fxpl\"],\n\t\t\"vnd.adobe.xdp+xml\": \"xdp\",\n\t\t\"vnd.adobe.xfdf\": \"xfdf\",\n\t\t\"vnd.ahead.space\": \"ahead\",\n\t\t\"vnd.airzip.filesecure.azf\": \"azf\",\n\t\t\"vnd.airzip.filesecure.azs\": \"azs\",\n\t\t\"vnd.amazon.ebook\": \"azw\",\n\t\t\"vnd.americandynamics.acc\": \"acc\",\n\t\t\"vnd.amiga.ami\": \"ami\",\n\t\t\"vnd.anser-web-certificate-issue-initiation\": \"cii\",\n\t\t\"vnd.anser-web-funds-transfer-initiation\": \"fti\",\n\t\t\"vnd.antix.game-component\": \"atx\",\n\t\t\"vnd.apple.installer+xml\": \"mpkg\",\n\t\t\"vnd.apple.mpegurl\": \"m3u8\",\n\t\t\"vnd.aristanetworks.swi\": \"swi\",\n\t\t\"vnd.astraea-software.iota\": \"iota\",\n\t\t\"vnd.audiograph\": \"aep\",\n\t\t\"vnd.blueice.multipass\": \"mpm\",\n\t\t\"vnd.bmi\": \"bmi\",\n\t\t\"vnd.businessobjects\": \"rep\",\n\t\t\"vnd.chemdraw+xml\": \"cdxml\",\n\t\t\"vnd.chipnuts.karaoke-mmd\": \"mmd\",\n\t\t\"vnd.claymore\": \"cla\",\n\t\t\"vnd.cloanto.rp9\": \"rp9\",\n\t\t\"vnd.clonk.c4group\": [\"c4g\", \"c4d\", \"c4f\", \"c4p\", \"c4u\"],\n\t\t\"vnd.cluetrust.cartomobile-config\": \"c11amc\",\n\t\t\"vnd.cluetrust.cartomobile-config-pkg\": \"c11amz\",\n\t\t\"vnd.commonspace\": \"csp\",\n\t\t\"vnd.contact.cmsg\": \"cdbcmsg\",\n\t\t\"vnd.cosmocaller\": \"cmc\",\n\t\t\"vnd.crick.clicker\": \"clkx\",\n\t\t\"vnd.crick.clicker.keyboard\": \"clkk\",\n\t\t\"vnd.crick.clicker.palette\": \"clkp\",\n\t\t\"vnd.crick.clicker.template\": \"clkt\",\n\t\t\"vnd.crick.clicker.wordbank\": \"clkw\",\n\t\t\"vnd.criticaltools.wbs+xml\": \"wbs\",\n\t\t\"vnd.ctc-posml\": \"pml\",\n\t\t\"vnd.cups-ppd\": \"ppd\",\n\t\t\"vnd.curl.car\": \"car\",\n\t\t\"vnd.curl.pcurl\": \"pcurl\",\n\t\t\"vnd.dart\": \"dart\",\n\t\t\"vnd.data-vision.rdz\": \"rdz\",\n\t\t\"vnd.dece.data\": [\"uvf\", \"uvvf\", \"uvd\", \"uvvd\"],\n\t\t\"vnd.dece.ttml+xml\": [\"uvt\", \"uvvt\"],\n\t\t\"vnd.dece.unspecified\": [\"uvx\", \"uvvx\"],\n\t\t\"vnd.dece.zip\": [\"uvz\", \"uvvz\"],\n\t\t\"vnd.denovo.fcselayout-link\": \"fe_launch\",\n\t\t\"vnd.dna\": \"dna\",\n\t\t\"vnd.dolby.mlp\": \"mlp\",\n\t\t\"vnd.dpgraph\": \"dpg\",\n\t\t\"vnd.dreamfactory\": \"dfac\",\n\t\t\"vnd.ds-keypoint\": \"kpxx\",\n\t\t\"vnd.dvb.ait\": \"ait\",\n\t\t\"vnd.dvb.service\": \"svc\",\n\t\t\"vnd.dynageo\": \"geo\",\n\t\t\"vnd.ecowin.chart\": \"mag\",\n\t\t\"vnd.enliven\": \"nml\",\n\t\t\"vnd.epson.esf\": \"esf\",\n\t\t\"vnd.epson.msf\": \"msf\",\n\t\t\"vnd.epson.quickanime\": \"qam\",\n\t\t\"vnd.epson.salt\": \"slt\",\n\t\t\"vnd.epson.ssf\": \"ssf\",\n\t\t\"vnd.eszigno3+xml\": [\"es3\", \"et3\"],\n\t\t\"vnd.ezpix-album\": \"ez2\",\n\t\t\"vnd.ezpix-package\": \"ez3\",\n\t\t\"vnd.fdf\": \"fdf\",\n\t\t\"vnd.fdsn.mseed\": \"mseed\",\n\t\t\"vnd.fdsn.seed\": [\"seed\", \"dataless\"],\n\t\t\"vnd.flographit\": \"gph\",\n\t\t\"vnd.fluxtime.clip\": \"ftc\",\n\t\t\"vnd.framemaker\": [\"fm\", \"frame\", \"maker\", \"book\"],\n\t\t\"vnd.frogans.fnc\": \"fnc\",\n\t\t\"vnd.frogans.ltf\": \"ltf\",\n\t\t\"vnd.fsc.weblaunch\": \"fsc\",\n\t\t\"vnd.fujitsu.oasys\": \"oas\",\n\t\t\"vnd.fujitsu.oasys2\": \"oa2\",\n\t\t\"vnd.fujitsu.oasys3\": \"oa3\",\n\t\t\"vnd.fujitsu.oasysgp\": \"fg5\",\n\t\t\"vnd.fujitsu.oasysprs\": \"bh2\",\n\t\t\"vnd.fujixerox.ddd\": \"ddd\",\n\t\t\"vnd.fujixerox.docuworks\": \"xdw\",\n\t\t\"vnd.fujixerox.docuworks.binder\": \"xbd\",\n\t\t\"vnd.fuzzysheet\": \"fzs\",\n\t\t\"vnd.genomatix.tuxedo\": \"txd\",\n\t\t\"vnd.geogebra.file\": \"ggb\",\n\t\t\"vnd.geogebra.tool\": \"ggt\",\n\t\t\"vnd.geometry-explorer\": [\"gex\", \"gre\"],\n\t\t\"vnd.geonext\": \"gxt\",\n\t\t\"vnd.geoplan\": \"g2w\",\n\t\t\"vnd.geospace\": \"g3w\",\n\t\t\"vnd.gmx\": \"gmx\",\n\t\t\"vnd.grafeq\": [\"gqf\", \"gqs\"],\n\t\t\"vnd.groove-account\": \"gac\",\n\t\t\"vnd.groove-help\": \"ghf\",\n\t\t\"vnd.groove-identity-message\": \"gim\",\n\t\t\"vnd.groove-injector\": \"grv\",\n\t\t\"vnd.groove-tool-message\": \"gtm\",\n\t\t\"vnd.groove-tool-template\": \"tpl\",\n\t\t\"vnd.groove-vcard\": \"vcg\",\n\t\t\"vnd.hal+xml\": \"hal\",\n\t\t\"vnd.handheld-entertainment+xml\": \"zmm\",\n\t\t\"vnd.hbci\": \"hbci\",\n\t\t\"vnd.hhe.lesson-player\": \"les\",\n\t\t\"vnd.hp-hpgl\": \"hpgl\",\n\t\t\"vnd.hp-hpid\": \"hpid\",\n\t\t\"vnd.hp-hps\": \"hps\",\n\t\t\"vnd.hp-jlyt\": \"jlt\",\n\t\t\"vnd.hp-pcl\": \"pcl\",\n\t\t\"vnd.hp-pclxl\": \"pclxl\",\n\t\t\"vnd.hydrostatix.sof-data\": \"sfd-hdstx\",\n\t\t\"vnd.ibm.minipay\": \"mpy\",\n\t\t\"vnd.ibm.modcap\": [\"afp\", \"listafp\", \"list3820\"],\n\t\t\"vnd.ibm.rights-management\": \"irm\",\n\t\t\"vnd.ibm.secure-container\": \"sc\",\n\t\t\"vnd.iccprofile\": [\"icc\", \"icm\"],\n\t\t\"vnd.igloader\": \"igl\",\n\t\t\"vnd.immervision-ivp\": \"ivp\",\n\t\t\"vnd.immervision-ivu\": \"ivu\",\n\t\t\"vnd.insors.igm\": \"igm\",\n\t\t\"vnd.intercon.formnet\": [\"xpw\", \"xpx\"],\n\t\t\"vnd.intergeo\": \"i2g\",\n\t\t\"vnd.intu.qbo\": \"qbo\",\n\t\t\"vnd.intu.qfx\": \"qfx\",\n\t\t\"vnd.ipunplugged.rcprofile\": \"rcprofile\",\n\t\t\"vnd.irepository.package+xml\": \"irp\",\n\t\t\"vnd.is-xpr\": \"xpr\",\n\t\t\"vnd.isac.fcs\": \"fcs\",\n\t\t\"vnd.jam\": \"jam\",\n\t\t\"vnd.jcp.javame.midlet-rms\": \"rms\",\n\t\t\"vnd.jisp\": \"jisp\",\n\t\t\"vnd.joost.joda-archive\": \"joda\",\n\t\t\"vnd.kahootz\": [\"ktz\", \"ktr\"],\n\t\t\"vnd.kde.karbon\": \"karbon\",\n\t\t\"vnd.kde.kchart\": \"chrt\",\n\t\t\"vnd.kde.kformula\": \"kfo\",\n\t\t\"vnd.kde.kivio\": \"flw\",\n\t\t\"vnd.kde.kontour\": \"kon\",\n\t\t\"vnd.kde.kpresenter\": [\"kpr\", \"kpt\"],\n\t\t\"vnd.kde.kspread\": \"ksp\",\n\t\t\"vnd.kde.kword\": [\"kwd\", \"kwt\"],\n\t\t\"vnd.kenameaapp\": \"htke\",\n\t\t\"vnd.kidspiration\": \"kia\",\n\t\t\"vnd.kinar\": [\"kne\", \"knp\"],\n\t\t\"vnd.koan\": [\"skp\", \"skd\", \"skt\", \"skm\"],\n\t\t\"vnd.kodak-descriptor\": \"sse\",\n\t\t\"vnd.las.las+xml\": \"lasxml\",\n\t\t\"vnd.llamagraphics.life-balance.desktop\": \"lbd\",\n\t\t\"vnd.llamagraphics.life-balance.exchange+xml\": \"lbe\",\n\t\t\"vnd.lotus-1-2-3\": \"123\",\n\t\t\"vnd.lotus-approach\": \"apr\",\n\t\t\"vnd.lotus-freelance\": \"pre\",\n\t\t\"vnd.lotus-notes\": \"nsf\",\n\t\t\"vnd.lotus-organizer\": \"org\",\n\t\t\"vnd.lotus-screencam\": \"scm\",\n\t\t\"vnd.lotus-wordpro\": \"lwp\",\n\t\t\"vnd.macports.portpkg\": \"portpkg\",\n\t\t\"vnd.mcd\": \"mcd\",\n\t\t\"vnd.medcalcdata\": \"mc1\",\n\t\t\"vnd.mediastation.cdkey\": \"cdkey\",\n\t\t\"vnd.mfer\": \"mwf\",\n\t\t\"vnd.mfmp\": \"mfm\",\n\t\t\"vnd.micrografx.flo\": \"flo\",\n\t\t\"vnd.micrografx.igx\": \"igx\",\n\t\t\"vnd.mif\": \"mif\",\n\t\t\"vnd.mobius.daf\": \"daf\",\n\t\t\"vnd.mobius.dis\": \"dis\",\n\t\t\"vnd.mobius.mbk\": \"mbk\",\n\t\t\"vnd.mobius.mqy\": \"mqy\",\n\t\t\"vnd.mobius.msl\": \"msl\",\n\t\t\"vnd.mobius.plc\": \"plc\",\n\t\t\"vnd.mobius.txf\": \"txf\",\n\t\t\"vnd.mophun.application\": \"mpn\",\n\t\t\"vnd.mophun.certificate\": \"mpc\",\n\t\t\"vnd.ms-artgalry\": \"cil\",\n\t\t\"vnd.ms-cab-compressed\": \"cab\",\n\t\t\"vnd.ms-excel.addin.macroenabled.12\": \"xlam\",\n\t\t\"vnd.ms-excel.sheet.binary.macroenabled.12\": \"xlsb\",\n\t\t\"vnd.ms-excel.sheet.macroenabled.12\": \"xlsm\",\n\t\t\"vnd.ms-excel.template.macroenabled.12\": \"xltm\",\n\t\t\"vnd.ms-fontobject\": \"eot\",\n\t\t\"vnd.ms-htmlhelp\": \"chm\",\n\t\t\"vnd.ms-ims\": \"ims\",\n\t\t\"vnd.ms-lrm\": \"lrm\",\n\t\t\"vnd.ms-officetheme\": \"thmx\",\n\t\t\"vnd.ms-powerpoint.addin.macroenabled.12\": \"ppam\",\n\t\t\"vnd.ms-powerpoint.presentation.macroenabled.12\": \"pptm\",\n\t\t\"vnd.ms-powerpoint.slide.macroenabled.12\": \"sldm\",\n\t\t\"vnd.ms-powerpoint.slideshow.macroenabled.12\": \"ppsm\",\n\t\t\"vnd.ms-powerpoint.template.macroenabled.12\": \"potm\",\n\t\t\"vnd.ms-project\": [\"mpp\", \"mpt\"],\n\t\t\"vnd.ms-word.document.macroenabled.12\": \"docm\",\n\t\t\"vnd.ms-word.template.macroenabled.12\": \"dotm\",\n\t\t\"vnd.ms-works\": [\"wps\", \"wks\", \"wcm\", \"wdb\"],\n\t\t\"vnd.ms-wpl\": \"wpl\",\n\t\t\"vnd.ms-xpsdocument\": \"xps\",\n\t\t\"vnd.mseq\": \"mseq\",\n\t\t\"vnd.musician\": \"mus\",\n\t\t\"vnd.muvee.style\": \"msty\",\n\t\t\"vnd.mynfc\": \"taglet\",\n\t\t\"vnd.neurolanguage.nlu\": \"nlu\",\n\t\t\"vnd.nitf\": [\"ntf\", \"nitf\"],\n\t\t\"vnd.noblenet-directory\": \"nnd\",\n\t\t\"vnd.noblenet-sealer\": \"nns\",\n\t\t\"vnd.noblenet-web\": \"nnw\",\n\t\t\"vnd.nokia.n-gage.data\": \"ngdat\",\n\t\t\"vnd.nokia.n-gage.symbian.install\": \"n-gage\",\n\t\t\"vnd.nokia.radio-preset\": \"rpst\",\n\t\t\"vnd.nokia.radio-presets\": \"rpss\",\n\t\t\"vnd.novadigm.edm\": \"edm\",\n\t\t\"vnd.novadigm.edx\": \"edx\",\n\t\t\"vnd.novadigm.ext\": \"ext\",\n\t\t\"vnd.oasis.opendocument.chart-template\": \"otc\",\n\t\t\"vnd.oasis.opendocument.formula-template\": \"odft\",\n\t\t\"vnd.oasis.opendocument.image-template\": \"oti\",\n\t\t\"vnd.olpc-sugar\": \"xo\",\n\t\t\"vnd.oma.dd2+xml\": \"dd2\",\n\t\t\"vnd.openofficeorg.extension\": \"oxt\",\n\t\t\"vnd.openxmlformats-officedocument.presentationml.slide\": \"sldx\",\n\t\t\"vnd.osgeo.mapguide.package\": \"mgp\",\n\t\t\"vnd.osgi.dp\": \"dp\",\n\t\t\"vnd.osgi.subsystem\": \"esa\",\n\t\t\"vnd.palm\": [\"pdb\", \"pqa\", \"oprc\"],\n\t\t\"vnd.pawaafile\": \"paw\",\n\t\t\"vnd.pg.format\": \"str\",\n\t\t\"vnd.pg.osasli\": \"ei6\",\n\t\t\"vnd.picsel\": \"efif\",\n\t\t\"vnd.pmi.widget\": \"wg\",\n\t\t\"vnd.pocketlearn\": \"plf\",\n\t\t\"vnd.powerbuilder6\": \"pbd\",\n\t\t\"vnd.previewsystems.box\": \"box\",\n\t\t\"vnd.proteus.magazine\": \"mgz\",\n\t\t\"vnd.publishare-delta-tree\": \"qps\",\n\t\t\"vnd.pvi.ptid1\": \"ptid\",\n\t\t\"vnd.quark.quarkxpress\": [\"qxd\", \"qxt\", \"qwd\", \"qwt\", \"qxl\", \"qxb\"],\n\t\t\"vnd.realvnc.bed\": \"bed\",\n\t\t\"vnd.recordare.musicxml\": \"mxl\",\n\t\t\"vnd.recordare.musicxml+xml\": \"musicxml\",\n\t\t\"vnd.rig.cryptonote\": \"cryptonote\",\n\t\t\"vnd.rn-realmedia\": \"rm\",\n\t\t\"vnd.rn-realmedia-vbr\": \"rmvb\",\n\t\t\"vnd.route66.link66+xml\": \"link66\",\n\t\t\"vnd.sailingtracker.track\": \"st\",\n\t\t\"vnd.seemail\": \"see\",\n\t\t\"vnd.sema\": \"sema\",\n\t\t\"vnd.semd\": \"semd\",\n\t\t\"vnd.semf\": \"semf\",\n\t\t\"vnd.shana.informed.formdata\": \"ifm\",\n\t\t\"vnd.shana.informed.formtemplate\": \"itp\",\n\t\t\"vnd.shana.informed.interchange\": \"iif\",\n\t\t\"vnd.shana.informed.package\": \"ipk\",\n\t\t\"vnd.simtech-mindmapper\": [\"twd\", \"twds\"],\n\t\t\"vnd.smart.teacher\": \"teacher\",\n\t\t\"vnd.solent.sdkm+xml\": [\"sdkm\", \"sdkd\"],\n\t\t\"vnd.spotfire.dxp\": \"dxp\",\n\t\t\"vnd.spotfire.sfs\": \"sfs\",\n\t\t\"vnd.stepmania.package\": \"smzip\",\n\t\t\"vnd.stepmania.stepchart\": \"sm\",\n\t\t\"vnd.sus-calendar\": [\"sus\", \"susp\"],\n\t\t\"vnd.svd\": \"svd\",\n\t\t\"vnd.syncml+xml\": \"xsm\",\n\t\t\"vnd.syncml.dm+wbxml\": \"bdm\",\n\t\t\"vnd.syncml.dm+xml\": \"xdm\",\n\t\t\"vnd.tao.intent-module-archive\": \"tao\",\n\t\t\"vnd.tcpdump.pcap\": [\"pcap\", \"cap\", \"dmp\"],\n\t\t\"vnd.tmobile-livetv\": \"tmo\",\n\t\t\"vnd.trid.tpt\": \"tpt\",\n\t\t\"vnd.triscape.mxs\": \"mxs\",\n\t\t\"vnd.trueapp\": \"tra\",\n\t\t\"vnd.ufdl\": [\"ufd\", \"ufdl\"],\n\t\t\"vnd.uiq.theme\": \"utz\",\n\t\t\"vnd.umajin\": \"umj\",\n\t\t\"vnd.unity\": \"unityweb\",\n\t\t\"vnd.uoml+xml\": \"uoml\",\n\t\t\"vnd.vcx\": \"vcx\",\n\t\t\"vnd.visionary\": \"vis\",\n\t\t\"vnd.vsf\": \"vsf\",\n\t\t\"vnd.webturbo\": \"wtb\",\n\t\t\"vnd.wolfram.player\": \"nbp\",\n\t\t\"vnd.wqd\": \"wqd\",\n\t\t\"vnd.wt.stf\": \"stf\",\n\t\t\"vnd.xara\": \"xar\",\n\t\t\"vnd.xfdl\": \"xfdl\",\n\t\t\"vnd.yamaha.hv-dic\": \"hvd\",\n\t\t\"vnd.yamaha.hv-script\": \"hvs\",\n\t\t\"vnd.yamaha.hv-voice\": \"hvp\",\n\t\t\"vnd.yamaha.openscoreformat\": \"osf\",\n\t\t\"vnd.yamaha.openscoreformat.osfpvg+xml\": \"osfpvg\",\n\t\t\"vnd.yamaha.smaf-audio\": \"saf\",\n\t\t\"vnd.yamaha.smaf-phrase\": \"spf\",\n\t\t\"vnd.yellowriver-custom-menu\": \"cmp\",\n\t\t\"vnd.zul\": [\"zir\", \"zirz\"],\n\t\t\"vnd.zzazz.deck+xml\": \"zaz\",\n\t\t\"voicexml+xml\": \"vxml\",\n\t\t\"widget\": \"wgt\",\n\t\t\"winhlp\": \"hlp\",\n\t\t\"wsdl+xml\": \"wsdl\",\n\t\t\"wspolicy+xml\": \"wspolicy\",\n\t\t\"x-ace-compressed\": \"ace\",\n\t\t\"x-authorware-bin\": [\"aab\", \"x32\", \"u32\", \"vox\"],\n\t\t\"x-authorware-map\": \"aam\",\n\t\t\"x-authorware-seg\": \"aas\",\n\t\t\"x-blorb\": [\"blb\", \"blorb\"],\n\t\t\"x-bzip\": \"bz\",\n\t\t\"x-bzip2\": [\"bz2\", \"boz\"],\n\t\t\"x-cfs-compressed\": \"cfs\",\n\t\t\"x-chat\": \"chat\",\n\t\t\"x-conference\": \"nsc\",\n\t\t\"x-dgc-compressed\": \"dgc\",\n\t\t\"x-dtbncx+xml\": \"ncx\",\n\t\t\"x-dtbook+xml\": \"dtb\",\n\t\t\"x-dtbresource+xml\": \"res\",\n\t\t\"x-eva\": \"eva\",\n\t\t\"x-font-bdf\": \"bdf\",\n\t\t\"x-font-ghostscript\": \"gsf\",\n\t\t\"x-font-linux-psf\": \"psf\",\n\t\t\"x-font-otf\": \"otf\",\n\t\t\"x-font-pcf\": \"pcf\",\n\t\t\"x-font-snf\": \"snf\",\n\t\t\"x-font-ttf\": [\"ttf\", \"ttc\"],\n\t\t\"x-font-type1\": [\"pfa\", \"pfb\", \"pfm\", \"afm\"],\n\t\t\"x-font-woff\": \"woff\",\n\t\t\"x-freearc\": \"arc\",\n\t\t\"x-gca-compressed\": \"gca\",\n\t\t\"x-glulx\": \"ulx\",\n\t\t\"x-gramps-xml\": \"gramps\",\n\t\t\"x-install-instructions\": \"install\",\n\t\t\"x-lzh-compressed\": [\"lzh\", \"lha\"],\n\t\t\"x-mie\": \"mie\",\n\t\t\"x-mobipocket-ebook\": [\"prc\", \"mobi\"],\n\t\t\"x-ms-application\": \"application\",\n\t\t\"x-ms-shortcut\": \"lnk\",\n\t\t\"x-ms-xbap\": \"xbap\",\n\t\t\"x-msbinder\": \"obd\",\n\t\t\"x-mscardfile\": \"crd\",\n\t\t\"x-msclip\": \"clp\",\n\t\t\"x-msdownload\": [\"exe\", \"dll\", \"com\", \"bat\", \"msi\"],\n\t\t\"x-msmediaview\": [\"mvb\", \"m13\", \"m14\"],\n\t\t\"x-msmetafile\": [\"wmf\", \"wmz\", \"emf\", \"emz\"],\n\t\t\"x-msmoney\": \"mny\",\n\t\t\"x-mspublisher\": \"pub\",\n\t\t\"x-msschedule\": \"scd\",\n\t\t\"x-msterminal\": \"trm\",\n\t\t\"x-mswrite\": \"wri\",\n\t\t\"x-nzb\": \"nzb\",\n\t\t\"x-pkcs12\": [\"p12\", \"pfx\"],\n\t\t\"x-pkcs7-certificates\": [\"p7b\", \"spc\"],\n\t\t\"x-research-info-systems\": \"ris\",\n\t\t\"x-silverlight-app\": \"xap\",\n\t\t\"x-sql\": \"sql\",\n\t\t\"x-stuffitx\": \"sitx\",\n\t\t\"x-subrip\": \"srt\",\n\t\t\"x-t3vm-image\": \"t3\",\n\t\t\"x-tads\": \"gam\",\n\t\t\"x-tex\": \"tex\",\n\t\t\"x-tex-tfm\": \"tfm\",\n\t\t\"x-tgif\": \"obj\",\n\t\t\"x-xliff+xml\": \"xlf\",\n\t\t\"x-xz\": \"xz\",\n\t\t\"x-zmachine\": [\"z1\", \"z2\", \"z3\", \"z4\", \"z5\", \"z6\", \"z7\", \"z8\"],\n\t\t\"xaml+xml\": \"xaml\",\n\t\t\"xcap-diff+xml\": \"xdf\",\n\t\t\"xenc+xml\": \"xenc\",\n\t\t\"xml-dtd\": \"dtd\",\n\t\t\"xop+xml\": \"xop\",\n\t\t\"xproc+xml\": \"xpl\",\n\t\t\"xslt+xml\": \"xslt\",\n\t\t\"xv+xml\": [\"mxml\", \"xhvml\", \"xvml\", \"xvm\"],\n\t\t\"yang\": \"yang\",\n\t\t\"yin+xml\": \"yin\",\n\t\t\"envoy\": \"evy\",\n\t\t\"fractals\": \"fif\",\n\t\t\"internet-property-stream\": \"acx\",\n\t\t\"olescript\": \"axs\",\n\t\t\"vnd.ms-outlook\": \"msg\",\n\t\t\"vnd.ms-pkicertstore\": \"sst\",\n\t\t\"x-compress\": \"z\",\n\t\t\"x-compressed\": \"tgz\",\n\t\t\"x-gzip\": \"gz\",\n\t\t\"x-perfmon\": [\"pma\", \"pmc\", \"pml\", \"pmr\", \"pmw\"],\n\t\t\"x-pkcs7-mime\": [\"p7c\", \"p7m\"],\n\t\t\"ynd.ms-pkipko\": \"pko\"\n\t},\n\t\"audio\": {\n\t\t\"amr\": \"amr\",\n\t\t\"amr-wb\": \"awb\",\n\t\t\"annodex\": \"axa\",\n\t\t\"basic\": [\"au\", \"snd\"],\n\t\t\"flac\": \"flac\",\n\t\t\"midi\": [\"mid\", \"midi\", \"kar\", \"rmi\"],\n\t\t\"mpeg\": [\"mpga\", \"mpega\", \"mp2\", \"mp3\", \"m4a\", \"mp2a\", \"m2a\", \"m3a\"],\n\t\t\"mpegurl\": \"m3u\",\n\t\t\"ogg\": [\"oga\", \"ogg\", \"spx\"],\n\t\t\"prs.sid\": \"sid\",\n\t\t\"x-aiff\": [\"aif\", \"aiff\", \"aifc\"],\n\t\t\"x-gsm\": \"gsm\",\n\t\t\"x-ms-wma\": \"wma\",\n\t\t\"x-ms-wax\": \"wax\",\n\t\t\"x-pn-realaudio\": \"ram\",\n\t\t\"x-realaudio\": \"ra\",\n\t\t\"x-sd2\": \"sd2\",\n\t\t\"x-wav\": \"wav\",\n\t\t\"adpcm\": \"adp\",\n\t\t\"mp4\": \"mp4a\",\n\t\t\"s3m\": \"s3m\",\n\t\t\"silk\": \"sil\",\n\t\t\"vnd.dece.audio\": [\"uva\", \"uvva\"],\n\t\t\"vnd.digital-winds\": \"eol\",\n\t\t\"vnd.dra\": \"dra\",\n\t\t\"vnd.dts\": \"dts\",\n\t\t\"vnd.dts.hd\": \"dtshd\",\n\t\t\"vnd.lucent.voice\": \"lvp\",\n\t\t\"vnd.ms-playready.media.pya\": \"pya\",\n\t\t\"vnd.nuera.ecelp4800\": \"ecelp4800\",\n\t\t\"vnd.nuera.ecelp7470\": \"ecelp7470\",\n\t\t\"vnd.nuera.ecelp9600\": \"ecelp9600\",\n\t\t\"vnd.rip\": \"rip\",\n\t\t\"webm\": \"weba\",\n\t\t\"x-aac\": \"aac\",\n\t\t\"x-caf\": \"caf\",\n\t\t\"x-matroska\": \"mka\",\n\t\t\"x-pn-realaudio-plugin\": \"rmp\",\n\t\t\"xm\": \"xm\",\n\t\t\"mid\": [\"mid\", \"rmi\"]\n\t},\n\t\"chemical\": {\n\t\t\"x-alchemy\": \"alc\",\n\t\t\"x-cache\": [\"cac\", \"cache\"],\n\t\t\"x-cache-csf\": \"csf\",\n\t\t\"x-cactvs-binary\": [\"cbin\", \"cascii\", \"ctab\"],\n\t\t\"x-cdx\": \"cdx\",\n\t\t\"x-chem3d\": \"c3d\",\n\t\t\"x-cif\": \"cif\",\n\t\t\"x-cmdf\": \"cmdf\",\n\t\t\"x-cml\": \"cml\",\n\t\t\"x-compass\": \"cpa\",\n\t\t\"x-crossfire\": \"bsd\",\n\t\t\"x-csml\": [\"csml\", \"csm\"],\n\t\t\"x-ctx\": \"ctx\",\n\t\t\"x-cxf\": [\"cxf\", \"cef\"],\n\t\t\"x-embl-dl-nucleotide\": [\"emb\", \"embl\"],\n\t\t\"x-gamess-input\": [\"inp\", \"gam\", \"gamin\"],\n\t\t\"x-gaussian-checkpoint\": [\"fch\", \"fchk\"],\n\t\t\"x-gaussian-cube\": \"cub\",\n\t\t\"x-gaussian-input\": [\"gau\", \"gjc\", \"gjf\"],\n\t\t\"x-gaussian-log\": \"gal\",\n\t\t\"x-gcg8-sequence\": \"gcg\",\n\t\t\"x-genbank\": \"gen\",\n\t\t\"x-hin\": \"hin\",\n\t\t\"x-isostar\": [\"istr\", \"ist\"],\n\t\t\"x-jcamp-dx\": [\"jdx\", \"dx\"],\n\t\t\"x-kinemage\": \"kin\",\n\t\t\"x-macmolecule\": \"mcm\",\n\t\t\"x-macromodel-input\": [\"mmd\", \"mmod\"],\n\t\t\"x-mdl-molfile\": \"mol\",\n\t\t\"x-mdl-rdfile\": \"rd\",\n\t\t\"x-mdl-rxnfile\": \"rxn\",\n\t\t\"x-mdl-sdfile\": [\"sd\", \"sdf\"],\n\t\t\"x-mdl-tgf\": \"tgf\",\n\t\t\"x-mmcif\": \"mcif\",\n\t\t\"x-mol2\": \"mol2\",\n\t\t\"x-molconn-Z\": \"b\",\n\t\t\"x-mopac-graph\": \"gpt\",\n\t\t\"x-mopac-input\": [\"mop\", \"mopcrt\", \"mpc\", \"zmt\"],\n\t\t\"x-mopac-out\": \"moo\",\n\t\t\"x-ncbi-asn1\": \"asn\",\n\t\t\"x-ncbi-asn1-ascii\": [\"prt\", \"ent\"],\n\t\t\"x-ncbi-asn1-binary\": [\"val\", \"aso\"],\n\t\t\"x-pdb\": [\"pdb\", \"ent\"],\n\t\t\"x-rosdal\": \"ros\",\n\t\t\"x-swissprot\": \"sw\",\n\t\t\"x-vamas-iso14976\": \"vms\",\n\t\t\"x-vmd\": \"vmd\",\n\t\t\"x-xtel\": \"xtel\",\n\t\t\"x-xyz\": \"xyz\"\n\t},\n\t\"image\": {\n\t\t\"gif\": \"gif\",\n\t\t\"ief\": \"ief\",\n\t\t\"jpeg\": [\"jpeg\", \"jpg\", \"jpe\"],\n\t\t\"pcx\": \"pcx\",\n\t\t\"png\": \"png\",\n\t\t\"svg+xml\": [\"svg\", \"svgz\"],\n\t\t\"tiff\": [\"tiff\", \"tif\"],\n\t\t\"vnd.djvu\": [\"djvu\", \"djv\"],\n\t\t\"vnd.wap.wbmp\": \"wbmp\",\n\t\t\"x-canon-cr2\": \"cr2\",\n\t\t\"x-canon-crw\": \"crw\",\n\t\t\"x-cmu-raster\": \"ras\",\n\t\t\"x-coreldraw\": \"cdr\",\n\t\t\"x-coreldrawpattern\": \"pat\",\n\t\t\"x-coreldrawtemplate\": \"cdt\",\n\t\t\"x-corelphotopaint\": \"cpt\",\n\t\t\"x-epson-erf\": \"erf\",\n\t\t\"x-icon\": \"ico\",\n\t\t\"x-jg\": \"art\",\n\t\t\"x-jng\": \"jng\",\n\t\t\"x-nikon-nef\": \"nef\",\n\t\t\"x-olympus-orf\": \"orf\",\n\t\t\"x-photoshop\": \"psd\",\n\t\t\"x-portable-anymap\": \"pnm\",\n\t\t\"x-portable-bitmap\": \"pbm\",\n\t\t\"x-portable-graymap\": \"pgm\",\n\t\t\"x-portable-pixmap\": \"ppm\",\n\t\t\"x-rgb\": \"rgb\",\n\t\t\"x-xbitmap\": \"xbm\",\n\t\t\"x-xpixmap\": \"xpm\",\n\t\t\"x-xwindowdump\": \"xwd\",\n\t\t\"bmp\": \"bmp\",\n\t\t\"cgm\": \"cgm\",\n\t\t\"g3fax\": \"g3\",\n\t\t\"ktx\": \"ktx\",\n\t\t\"prs.btif\": \"btif\",\n\t\t\"sgi\": \"sgi\",\n\t\t\"vnd.dece.graphic\": [\"uvi\", \"uvvi\", \"uvg\", \"uvvg\"],\n\t\t\"vnd.dwg\": \"dwg\",\n\t\t\"vnd.dxf\": \"dxf\",\n\t\t\"vnd.fastbidsheet\": \"fbs\",\n\t\t\"vnd.fpx\": \"fpx\",\n\t\t\"vnd.fst\": \"fst\",\n\t\t\"vnd.fujixerox.edmics-mmr\": \"mmr\",\n\t\t\"vnd.fujixerox.edmics-rlc\": \"rlc\",\n\t\t\"vnd.ms-modi\": \"mdi\",\n\t\t\"vnd.ms-photo\": \"wdp\",\n\t\t\"vnd.net-fpx\": \"npx\",\n\t\t\"vnd.xiff\": \"xif\",\n\t\t\"webp\": \"webp\",\n\t\t\"x-3ds\": \"3ds\",\n\t\t\"x-cmx\": \"cmx\",\n\t\t\"x-freehand\": [\"fh\", \"fhc\", \"fh4\", \"fh5\", \"fh7\"],\n\t\t\"x-pict\": [\"pic\", \"pct\"],\n\t\t\"x-tga\": \"tga\",\n\t\t\"cis-cod\": \"cod\",\n\t\t\"pipeg\": \"jfif\"\n\t},\n\t\"message\": {\n\t\t\"rfc822\": [\"eml\", \"mime\", \"mht\", \"mhtml\", \"nws\"]\n\t},\n\t\"model\": {\n\t\t\"iges\": [\"igs\", \"iges\"],\n\t\t\"mesh\": [\"msh\", \"mesh\", \"silo\"],\n\t\t\"vrml\": [\"wrl\", \"vrml\"],\n\t\t\"x3d+vrml\": [\"x3dv\", \"x3dvz\"],\n\t\t\"x3d+xml\": [\"x3d\", \"x3dz\"],\n\t\t\"x3d+binary\": [\"x3db\", \"x3dbz\"],\n\t\t\"vnd.collada+xml\": \"dae\",\n\t\t\"vnd.dwf\": \"dwf\",\n\t\t\"vnd.gdl\": \"gdl\",\n\t\t\"vnd.gtw\": \"gtw\",\n\t\t\"vnd.mts\": \"mts\",\n\t\t\"vnd.vtu\": \"vtu\"\n\t},\n\t\"text\": {\n\t\t\"cache-manifest\": [\"manifest\", \"appcache\"],\n\t\t\"calendar\": [\"ics\", \"icz\", \"ifb\"],\n\t\t\"css\": \"css\",\n\t\t\"csv\": \"csv\",\n\t\t\"h323\": \"323\",\n\t\t\"html\": [\"html\", \"htm\", \"shtml\", \"stm\"],\n\t\t\"iuls\": \"uls\",\n\t\t\"mathml\": \"mml\",\n\t\t\"plain\": [\"txt\", \"text\", \"brf\", \"conf\", \"def\", \"list\", \"log\", \"in\", \"bas\"],\n\t\t\"richtext\": \"rtx\",\n\t\t\"scriptlet\": [\"sct\", \"wsc\"],\n\t\t\"texmacs\": [\"tm\", \"ts\"],\n\t\t\"tab-separated-values\": \"tsv\",\n\t\t\"vnd.sun.j2me.app-descriptor\": \"jad\",\n\t\t\"vnd.wap.wml\": \"wml\",\n\t\t\"vnd.wap.wmlscript\": \"wmls\",\n\t\t\"x-bibtex\": \"bib\",\n\t\t\"x-boo\": \"boo\",\n\t\t\"x-c++hdr\": [\"h++\", \"hpp\", \"hxx\", \"hh\"],\n\t\t\"x-c++src\": [\"c++\", \"cpp\", \"cxx\", \"cc\"],\n\t\t\"x-component\": \"htc\",\n\t\t\"x-dsrc\": \"d\",\n\t\t\"x-diff\": [\"diff\", \"patch\"],\n\t\t\"x-haskell\": \"hs\",\n\t\t\"x-java\": \"java\",\n\t\t\"x-literate-haskell\": \"lhs\",\n\t\t\"x-moc\": \"moc\",\n\t\t\"x-pascal\": [\"p\", \"pas\"],\n\t\t\"x-pcs-gcd\": \"gcd\",\n\t\t\"x-perl\": [\"pl\", \"pm\"],\n\t\t\"x-python\": \"py\",\n\t\t\"x-scala\": \"scala\",\n\t\t\"x-setext\": \"etx\",\n\t\t\"x-tcl\": [\"tcl\", \"tk\"],\n\t\t\"x-tex\": [\"tex\", \"ltx\", \"sty\", \"cls\"],\n\t\t\"x-vcalendar\": \"vcs\",\n\t\t\"x-vcard\": \"vcf\",\n\t\t\"n3\": \"n3\",\n\t\t\"prs.lines.tag\": \"dsc\",\n\t\t\"sgml\": [\"sgml\", \"sgm\"],\n\t\t\"troff\": [\"t\", \"tr\", \"roff\", \"man\", \"me\", \"ms\"],\n\t\t\"turtle\": \"ttl\",\n\t\t\"uri-list\": [\"uri\", \"uris\", \"urls\"],\n\t\t\"vcard\": \"vcard\",\n\t\t\"vnd.curl\": \"curl\",\n\t\t\"vnd.curl.dcurl\": \"dcurl\",\n\t\t\"vnd.curl.scurl\": \"scurl\",\n\t\t\"vnd.curl.mcurl\": \"mcurl\",\n\t\t\"vnd.dvb.subtitle\": \"sub\",\n\t\t\"vnd.fly\": \"fly\",\n\t\t\"vnd.fmi.flexstor\": \"flx\",\n\t\t\"vnd.graphviz\": \"gv\",\n\t\t\"vnd.in3d.3dml\": \"3dml\",\n\t\t\"vnd.in3d.spot\": \"spot\",\n\t\t\"x-asm\": [\"s\", \"asm\"],\n\t\t\"x-c\": [\"c\", \"cc\", \"cxx\", \"cpp\", \"h\", \"hh\", \"dic\"],\n\t\t\"x-fortran\": [\"f\", \"for\", \"f77\", \"f90\"],\n\t\t\"x-opml\": \"opml\",\n\t\t\"x-nfo\": \"nfo\",\n\t\t\"x-sfv\": \"sfv\",\n\t\t\"x-uuencode\": \"uu\",\n\t\t\"webviewhtml\": \"htt\"\n\t},\n\t\"video\": {\n\t\t\"avif\": \".avif\",\n\t\t\"3gpp\": \"3gp\",\n\t\t\"annodex\": \"axv\",\n\t\t\"dl\": \"dl\",\n\t\t\"dv\": [\"dif\", \"dv\"],\n\t\t\"fli\": \"fli\",\n\t\t\"gl\": \"gl\",\n\t\t\"mpeg\": [\"mpeg\", \"mpg\", \"mpe\", \"m1v\", \"m2v\", \"mp2\", \"mpa\", \"mpv2\"],\n\t\t\"mp4\": [\"mp4\", \"mp4v\", \"mpg4\"],\n\t\t\"quicktime\": [\"qt\", \"mov\"],\n\t\t\"ogg\": \"ogv\",\n\t\t\"vnd.mpegurl\": [\"mxu\", \"m4u\"],\n\t\t\"x-flv\": \"flv\",\n\t\t\"x-la-asf\": [\"lsf\", \"lsx\"],\n\t\t\"x-mng\": \"mng\",\n\t\t\"x-ms-asf\": [\"asf\", \"asx\", \"asr\"],\n\t\t\"x-ms-wm\": \"wm\",\n\t\t\"x-ms-wmv\": \"wmv\",\n\t\t\"x-ms-wmx\": \"wmx\",\n\t\t\"x-ms-wvx\": \"wvx\",\n\t\t\"x-msvideo\": \"avi\",\n\t\t\"x-sgi-movie\": \"movie\",\n\t\t\"x-matroska\": [\"mpv\", \"mkv\", \"mk3d\", \"mks\"],\n\t\t\"3gpp2\": \"3g2\",\n\t\t\"h261\": \"h261\",\n\t\t\"h263\": \"h263\",\n\t\t\"h264\": \"h264\",\n\t\t\"jpeg\": \"jpgv\",\n\t\t\"jpm\": [\"jpm\", \"jpgm\"],\n\t\t\"mj2\": [\"mj2\", \"mjp2\"],\n\t\t\"vnd.dece.hd\": [\"uvh\", \"uvvh\"],\n\t\t\"vnd.dece.mobile\": [\"uvm\", \"uvvm\"],\n\t\t\"vnd.dece.pd\": [\"uvp\", \"uvvp\"],\n\t\t\"vnd.dece.sd\": [\"uvs\", \"uvvs\"],\n\t\t\"vnd.dece.video\": [\"uvv\", \"uvvv\"],\n\t\t\"vnd.dvb.file\": \"dvb\",\n\t\t\"vnd.fvt\": \"fvt\",\n\t\t\"vnd.ms-playready.media.pyv\": \"pyv\",\n\t\t\"vnd.uvvu.mp4\": [\"uvu\", \"uvvu\"],\n\t\t\"vnd.vivo\": \"viv\",\n\t\t\"webm\": \"webm\",\n\t\t\"x-f4v\": \"f4v\",\n\t\t\"x-m4v\": \"m4v\",\n\t\t\"x-ms-vob\": \"vob\",\n\t\t\"x-smv\": \"smv\"\n\t},\n\t\"x-conference\": {\n\t\t\"x-cooltalk\": \"ice\"\n\t},\n\t\"x-world\": {\n\t\t\"x-vrml\": [\"vrm\", \"vrml\", \"wrl\", \"flr\", \"wrz\", \"xaf\", \"xof\"]\n\t}\n};\n\nconst mimeTypes = (() => {\n\tconst mimeTypes = {};\n\tfor (const type in table) {\n\t\t// eslint-disable-next-line no-prototype-builtins\n\t\tif (table.hasOwnProperty(type)) {\n\t\t\tfor (const subtype in table[type]) {\n\t\t\t\t// eslint-disable-next-line no-prototype-builtins\n\t\t\t\tif (table[type].hasOwnProperty(subtype)) {\n\t\t\t\t\tconst value = table[type][subtype];\n\t\t\t\t\tif (typeof value == \"string\") {\n\t\t\t\t\t\tmimeTypes[value] = type + \"/\" + subtype;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfor (let indexMimeType = 0; indexMimeType < value.length; indexMimeType++) {\n\t\t\t\t\t\t\tmimeTypes[value[indexMimeType]] = type + \"/\" + subtype;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn mimeTypes;\n})();\n\nexport {\n\tmimeTypes,\n\tgetMimeType\n};\n\nfunction getMimeType(filename) {\n\treturn filename && mimeTypes[filename.split(\".\").pop().toLowerCase()] || getDefaultMimeType();\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nconst table = [];\nfor (let i = 0; i < 256; i++) {\n\tlet t = i;\n\tfor (let j = 0; j < 8; j++) {\n\t\tif (t & 1) {\n\t\t\tt = (t >>> 1) ^ 0xEDB88320;\n\t\t} else {\n\t\t\tt = t >>> 1;\n\t\t}\n\t}\n\ttable[i] = t;\n}\n\nclass Crc32 {\n\n\tconstructor(crc) {\n\t\tthis.crc = crc || -1;\n\t}\n\n\tappend(data) {\n\t\tlet crc = this.crc | 0;\n\t\tfor (let offset = 0, length = data.length | 0; offset < length; offset++) {\n\t\t\tcrc = (crc >>> 8) ^ table[(crc ^ data[offset]) & 0xFF];\n\t\t}\n\t\tthis.crc = crc;\n\t}\n\n\tget() {\n\t\treturn ~this.crc;\n\t}\n}\n\nexport {\n\tCrc32\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n\nimport { Crc32 } from \"./codecs/crc32.js\";\n\nclass Crc32Stream extends TransformStream {\n\n\tconstructor() {\n\t\tconst crc32 = new Crc32();\n\t\tsuper({\n\t\t\ttransform(chunk) {\n\t\t\t\tcrc32.append(chunk);\n\t\t\t},\n\t\t\tflush(controller) {\n\t\t\t\tconst value = new Uint8Array(4);\n\t\t\t\tconst dataView = new DataView(value.buffer);\n\t\t\t\tdataView.setUint32(0, crc32.get());\n\t\t\t\tcontroller.enqueue(value);\n\t\t\t}\n\t\t});\n\t}\n}\n\nexport {\n\tCrc32Stream\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TextEncoder */\n\nexport {\n\tencodeText\n};\n\nfunction encodeText(value) {\n\tif (typeof TextEncoder == \"undefined\") {\n\t\tvalue = unescape(encodeURIComponent(value));\n\t\tconst result = new Uint8Array(value.length);\n\t\tfor (let i = 0; i < result.length; i++) {\n\t\t\tresult[i] = value.charCodeAt(i);\n\t\t}\n\t\treturn result;\n\t} else {\n\t\treturn new TextEncoder().encode(value);\n\t}\n}","// Derived from https://github.com/xqdoo00o/jszip/blob/master/lib/sjcl.js and https://github.com/bitwiseshiftleft/sjcl\n\n// deno-lint-ignore-file no-this-alias\n\n/*\n * SJCL is open. You can use, modify and redistribute it under a BSD\n * license or under the GNU GPL, version 2.0.\n */\n\n/** @fileOverview Javascript cryptography implementation.\n *\n * Crush to remove comments, shorten variable names and\n * generally reduce transmission size.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/*jslint indent: 2, bitwise: false, nomen: false, plusplus: false, white: false, regexp: false */\n\n/** @fileOverview Arrays of bits, encoded as arrays of Numbers.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/**\n * Arrays of bits, encoded as arrays of Numbers.\n * @namespace\n * @description\n *

\n * These objects are the currency accepted by SJCL's crypto functions.\n *

\n *\n *

\n * Most of our crypto primitives operate on arrays of 4-byte words internally,\n * but many of them can take arguments that are not a multiple of 4 bytes.\n * This library encodes arrays of bits (whose size need not be a multiple of 8\n * bits) as arrays of 32-bit words. The bits are packed, big-endian, into an\n * array of words, 32 bits at a time. Since the words are double-precision\n * floating point numbers, they fit some extra data. We use this (in a private,\n * possibly-changing manner) to encode the number of bits actually present\n * in the last word of the array.\n *

\n *\n *

\n * Because bitwise ops clear this out-of-band data, these arrays can be passed\n * to ciphers like AES which want arrays of words.\n *

\n */\nconst bitArray = {\n\t/**\n\t * Concatenate two bit arrays.\n\t * @param {bitArray} a1 The first array.\n\t * @param {bitArray} a2 The second array.\n\t * @return {bitArray} The concatenation of a1 and a2.\n\t */\n\tconcat(a1, a2) {\n\t\tif (a1.length === 0 || a2.length === 0) {\n\t\t\treturn a1.concat(a2);\n\t\t}\n\n\t\tconst last = a1[a1.length - 1], shift = bitArray.getPartial(last);\n\t\tif (shift === 32) {\n\t\t\treturn a1.concat(a2);\n\t\t} else {\n\t\t\treturn bitArray._shiftRight(a2, shift, last | 0, a1.slice(0, a1.length - 1));\n\t\t}\n\t},\n\n\t/**\n\t * Find the length of an array of bits.\n\t * @param {bitArray} a The array.\n\t * @return {Number} The length of a, in bits.\n\t */\n\tbitLength(a) {\n\t\tconst l = a.length;\n\t\tif (l === 0) {\n\t\t\treturn 0;\n\t\t}\n\t\tconst x = a[l - 1];\n\t\treturn (l - 1) * 32 + bitArray.getPartial(x);\n\t},\n\n\t/**\n\t * Truncate an array.\n\t * @param {bitArray} a The array.\n\t * @param {Number} len The length to truncate to, in bits.\n\t * @return {bitArray} A new array, truncated to len bits.\n\t */\n\tclamp(a, len) {\n\t\tif (a.length * 32 < len) {\n\t\t\treturn a;\n\t\t}\n\t\ta = a.slice(0, Math.ceil(len / 32));\n\t\tconst l = a.length;\n\t\tlen = len & 31;\n\t\tif (l > 0 && len) {\n\t\t\ta[l - 1] = bitArray.partial(len, a[l - 1] & 0x80000000 >> (len - 1), 1);\n\t\t}\n\t\treturn a;\n\t},\n\n\t/**\n\t * Make a partial word for a bit array.\n\t * @param {Number} len The number of bits in the word.\n\t * @param {Number} x The bits.\n\t * @param {Number} [_end=0] Pass 1 if x has already been shifted to the high side.\n\t * @return {Number} The partial word.\n\t */\n\tpartial(len, x, _end) {\n\t\tif (len === 32) {\n\t\t\treturn x;\n\t\t}\n\t\treturn (_end ? x | 0 : x << (32 - len)) + len * 0x10000000000;\n\t},\n\n\t/**\n\t * Get the number of bits used by a partial word.\n\t * @param {Number} x The partial word.\n\t * @return {Number} The number of bits used by the partial word.\n\t */\n\tgetPartial(x) {\n\t\treturn Math.round(x / 0x10000000000) || 32;\n\t},\n\n\t/** Shift an array right.\n\t * @param {bitArray} a The array to shift.\n\t * @param {Number} shift The number of bits to shift.\n\t * @param {Number} [carry=0] A byte to carry in\n\t * @param {bitArray} [out=[]] An array to prepend to the output.\n\t * @private\n\t */\n\t_shiftRight(a, shift, carry, out) {\n\t\tif (out === undefined) {\n\t\t\tout = [];\n\t\t}\n\n\t\tfor (; shift >= 32; shift -= 32) {\n\t\t\tout.push(carry);\n\t\t\tcarry = 0;\n\t\t}\n\t\tif (shift === 0) {\n\t\t\treturn out.concat(a);\n\t\t}\n\n\t\tfor (let i = 0; i < a.length; i++) {\n\t\t\tout.push(carry | a[i] >>> shift);\n\t\t\tcarry = a[i] << (32 - shift);\n\t\t}\n\t\tconst last2 = a.length ? a[a.length - 1] : 0;\n\t\tconst shift2 = bitArray.getPartial(last2);\n\t\tout.push(bitArray.partial(shift + shift2 & 31, (shift + shift2 > 32) ? carry : out.pop(), 1));\n\t\treturn out;\n\t}\n};\n\n/** @fileOverview Bit array codec implementations.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/**\n * Arrays of bytes\n * @namespace\n */\nconst codec = {\n\tbytes: {\n\t\t/** Convert from a bitArray to an array of bytes. */\n\t\tfromBits(arr) {\n\t\t\tconst bl = bitArray.bitLength(arr);\n\t\t\tconst byteLength = bl / 8;\n\t\t\tconst out = new Uint8Array(byteLength);\n\t\t\tlet tmp;\n\t\t\tfor (let i = 0; i < byteLength; i++) {\n\t\t\t\tif ((i & 3) === 0) {\n\t\t\t\t\ttmp = arr[i / 4];\n\t\t\t\t}\n\t\t\t\tout[i] = tmp >>> 24;\n\t\t\t\ttmp <<= 8;\n\t\t\t}\n\t\t\treturn out;\n\t\t},\n\t\t/** Convert from an array of bytes to a bitArray. */\n\t\ttoBits(bytes) {\n\t\t\tconst out = [];\n\t\t\tlet i;\n\t\t\tlet tmp = 0;\n\t\t\tfor (i = 0; i < bytes.length; i++) {\n\t\t\t\ttmp = tmp << 8 | bytes[i];\n\t\t\t\tif ((i & 3) === 3) {\n\t\t\t\t\tout.push(tmp);\n\t\t\t\t\ttmp = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (i & 3) {\n\t\t\t\tout.push(bitArray.partial(8 * (i & 3), tmp));\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t}\n};\n\nconst hash = {};\n\n/**\n * Context for a SHA-1 operation in progress.\n * @constructor\n */\nhash.sha1 = class {\n\tconstructor(hash) {\n\t\tconst sha1 = this;\n\t\t/**\n\t\t * The hash's block size, in bits.\n\t\t * @constant\n\t\t */\n\t\tsha1.blockSize = 512;\n\t\t/**\n\t\t * The SHA-1 initialization vector.\n\t\t * @private\n\t\t */\n\t\tsha1._init = [0x67452301, 0xEFCDAB89, 0x98BADCFE, 0x10325476, 0xC3D2E1F0];\n\t\t/**\n\t\t * The SHA-1 hash key.\n\t\t * @private\n\t\t */\n\t\tsha1._key = [0x5A827999, 0x6ED9EBA1, 0x8F1BBCDC, 0xCA62C1D6];\n\t\tif (hash) {\n\t\t\tsha1._h = hash._h.slice(0);\n\t\t\tsha1._buffer = hash._buffer.slice(0);\n\t\t\tsha1._length = hash._length;\n\t\t} else {\n\t\t\tsha1.reset();\n\t\t}\n\t}\n\n\t/**\n\t * Reset the hash state.\n\t * @return this\n\t */\n\treset() {\n\t\tconst sha1 = this;\n\t\tsha1._h = sha1._init.slice(0);\n\t\tsha1._buffer = [];\n\t\tsha1._length = 0;\n\t\treturn sha1;\n\t}\n\n\t/**\n\t * Input several words to the hash.\n\t * @param {bitArray|String} data the data to hash.\n\t * @return this\n\t */\n\tupdate(data) {\n\t\tconst sha1 = this;\n\t\tif (typeof data === \"string\") {\n\t\t\tdata = codec.utf8String.toBits(data);\n\t\t}\n\t\tconst b = sha1._buffer = bitArray.concat(sha1._buffer, data);\n\t\tconst ol = sha1._length;\n\t\tconst nl = sha1._length = ol + bitArray.bitLength(data);\n\t\tif (nl > 9007199254740991) {\n\t\t\tthrow new Error(\"Cannot hash more than 2^53 - 1 bits\");\n\t\t}\n\t\tconst c = new Uint32Array(b);\n\t\tlet j = 0;\n\t\tfor (let i = sha1.blockSize + ol - ((sha1.blockSize + ol) & (sha1.blockSize - 1)); i <= nl;\n\t\t\ti += sha1.blockSize) {\n\t\t\tsha1._block(c.subarray(16 * j, 16 * (j + 1)));\n\t\t\tj += 1;\n\t\t}\n\t\tb.splice(0, 16 * j);\n\t\treturn sha1;\n\t}\n\n\t/**\n\t * Complete hashing and output the hash value.\n\t * @return {bitArray} The hash value, an array of 5 big-endian words. TODO\n\t */\n\tfinalize() {\n\t\tconst sha1 = this;\n\t\tlet b = sha1._buffer;\n\t\tconst h = sha1._h;\n\n\t\t// Round out and push the buffer\n\t\tb = bitArray.concat(b, [bitArray.partial(1, 1)]);\n\t\t// Round out the buffer to a multiple of 16 words, less the 2 length words.\n\t\tfor (let i = b.length + 2; i & 15; i++) {\n\t\t\tb.push(0);\n\t\t}\n\n\t\t// append the length\n\t\tb.push(Math.floor(sha1._length / 0x100000000));\n\t\tb.push(sha1._length | 0);\n\n\t\twhile (b.length) {\n\t\t\tsha1._block(b.splice(0, 16));\n\t\t}\n\n\t\tsha1.reset();\n\t\treturn h;\n\t}\n\n\t/**\n\t * The SHA-1 logical functions f(0), f(1), ..., f(79).\n\t * @private\n\t */\n\t_f(t, b, c, d) {\n\t\tif (t <= 19) {\n\t\t\treturn (b & c) | (~b & d);\n\t\t} else if (t <= 39) {\n\t\t\treturn b ^ c ^ d;\n\t\t} else if (t <= 59) {\n\t\t\treturn (b & c) | (b & d) | (c & d);\n\t\t} else if (t <= 79) {\n\t\t\treturn b ^ c ^ d;\n\t\t}\n\t}\n\n\t/**\n\t * Circular left-shift operator.\n\t * @private\n\t */\n\t_S(n, x) {\n\t\treturn (x << n) | (x >>> 32 - n);\n\t}\n\n\t/**\n\t * Perform one cycle of SHA-1.\n\t * @param {Uint32Array|bitArray} words one block of words.\n\t * @private\n\t */\n\t_block(words) {\n\t\tconst sha1 = this;\n\t\tconst h = sha1._h;\n\t\t// When words is passed to _block, it has 16 elements. SHA1 _block\n\t\t// function extends words with new elements (at the end there are 80 elements). \n\t\t// The problem is that if we use Uint32Array instead of Array, \n\t\t// the length of Uint32Array cannot be changed. Thus, we replace words with a \n\t\t// normal Array here.\n\t\tconst w = Array(80); // do not use Uint32Array here as the instantiation is slower\n\t\tfor (let j = 0; j < 16; j++) {\n\t\t\tw[j] = words[j];\n\t\t}\n\n\t\tlet a = h[0];\n\t\tlet b = h[1];\n\t\tlet c = h[2];\n\t\tlet d = h[3];\n\t\tlet e = h[4];\n\n\t\tfor (let t = 0; t <= 79; t++) {\n\t\t\tif (t >= 16) {\n\t\t\t\tw[t] = sha1._S(1, w[t - 3] ^ w[t - 8] ^ w[t - 14] ^ w[t - 16]);\n\t\t\t}\n\t\t\tconst tmp = (sha1._S(5, a) + sha1._f(t, b, c, d) + e + w[t] +\n\t\t\t\tsha1._key[Math.floor(t / 20)]) | 0;\n\t\t\te = d;\n\t\t\td = c;\n\t\t\tc = sha1._S(30, b);\n\t\t\tb = a;\n\t\t\ta = tmp;\n\t\t}\n\n\t\th[0] = (h[0] + a) | 0;\n\t\th[1] = (h[1] + b) | 0;\n\t\th[2] = (h[2] + c) | 0;\n\t\th[3] = (h[3] + d) | 0;\n\t\th[4] = (h[4] + e) | 0;\n\t}\n};\n\n/** @fileOverview Low-level AES implementation.\n *\n * This file contains a low-level implementation of AES, optimized for\n * size and for efficiency on several browsers. It is based on\n * OpenSSL's aes_core.c, a public-domain implementation by Vincent\n * Rijmen, Antoon Bosselaers and Paulo Barreto.\n *\n * An older version of this implementation is available in the public\n * domain, but this one is (c) Emily Stark, Mike Hamburg, Dan Boneh,\n * Stanford University 2008-2010 and BSD-licensed for liability\n * reasons.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\nconst cipher = {};\n\n/**\n * Schedule out an AES key for both encryption and decryption. This\n * is a low-level class. Use a cipher mode to do bulk encryption.\n *\n * @constructor\n * @param {Array} key The key as an array of 4, 6 or 8 words.\n */\ncipher.aes = class {\n\tconstructor(key) {\n\t\t/**\n\t\t * The expanded S-box and inverse S-box tables. These will be computed\n\t\t * on the client so that we don't have to send them down the wire.\n\t\t *\n\t\t * There are two tables, _tables[0] is for encryption and\n\t\t * _tables[1] is for decryption.\n\t\t *\n\t\t * The first 4 sub-tables are the expanded S-box with MixColumns. The\n\t\t * last (_tables[01][4]) is the S-box itself.\n\t\t *\n\t\t * @private\n\t\t */\n\t\tconst aes = this;\n\t\taes._tables = [[[], [], [], [], []], [[], [], [], [], []]];\n\n\t\tif (!aes._tables[0][0][0]) {\n\t\t\taes._precompute();\n\t\t}\n\n\t\tconst sbox = aes._tables[0][4];\n\t\tconst decTable = aes._tables[1];\n\t\tconst keyLen = key.length;\n\n\t\tlet i, encKey, decKey, rcon = 1;\n\n\t\tif (keyLen !== 4 && keyLen !== 6 && keyLen !== 8) {\n\t\t\tthrow new Error(\"invalid aes key size\");\n\t\t}\n\n\t\taes._key = [encKey = key.slice(0), decKey = []];\n\n\t\t// schedule encryption keys\n\t\tfor (i = keyLen; i < 4 * keyLen + 28; i++) {\n\t\t\tlet tmp = encKey[i - 1];\n\n\t\t\t// apply sbox\n\t\t\tif (i % keyLen === 0 || (keyLen === 8 && i % keyLen === 4)) {\n\t\t\t\ttmp = sbox[tmp >>> 24] << 24 ^ sbox[tmp >> 16 & 255] << 16 ^ sbox[tmp >> 8 & 255] << 8 ^ sbox[tmp & 255];\n\n\t\t\t\t// shift rows and add rcon\n\t\t\t\tif (i % keyLen === 0) {\n\t\t\t\t\ttmp = tmp << 8 ^ tmp >>> 24 ^ rcon << 24;\n\t\t\t\t\trcon = rcon << 1 ^ (rcon >> 7) * 283;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tencKey[i] = encKey[i - keyLen] ^ tmp;\n\t\t}\n\n\t\t// schedule decryption keys\n\t\tfor (let j = 0; i; j++, i--) {\n\t\t\tconst tmp = encKey[j & 3 ? i : i - 4];\n\t\t\tif (i <= 4 || j < 4) {\n\t\t\t\tdecKey[j] = tmp;\n\t\t\t} else {\n\t\t\t\tdecKey[j] = decTable[0][sbox[tmp >>> 24]] ^\n\t\t\t\t\tdecTable[1][sbox[tmp >> 16 & 255]] ^\n\t\t\t\t\tdecTable[2][sbox[tmp >> 8 & 255]] ^\n\t\t\t\t\tdecTable[3][sbox[tmp & 255]];\n\t\t\t}\n\t\t}\n\t}\n\t// public\n\t/* Something like this might appear here eventually\n\tname: \"AES\",\n\tblockSize: 4,\n\tkeySizes: [4,6,8],\n\t*/\n\n\t/**\n\t * Encrypt an array of 4 big-endian words.\n\t * @param {Array} data The plaintext.\n\t * @return {Array} The ciphertext.\n\t */\n\tencrypt(data) {\n\t\treturn this._crypt(data, 0);\n\t}\n\n\t/**\n\t * Decrypt an array of 4 big-endian words.\n\t * @param {Array} data The ciphertext.\n\t * @return {Array} The plaintext.\n\t */\n\tdecrypt(data) {\n\t\treturn this._crypt(data, 1);\n\t}\n\n\t/**\n\t * Expand the S-box tables.\n\t *\n\t * @private\n\t */\n\t_precompute() {\n\t\tconst encTable = this._tables[0];\n\t\tconst decTable = this._tables[1];\n\t\tconst sbox = encTable[4];\n\t\tconst sboxInv = decTable[4];\n\t\tconst d = [];\n\t\tconst th = [];\n\t\tlet xInv, x2, x4, x8;\n\n\t\t// Compute double and third tables\n\t\tfor (let i = 0; i < 256; i++) {\n\t\t\tth[(d[i] = i << 1 ^ (i >> 7) * 283) ^ i] = i;\n\t\t}\n\n\t\tfor (let x = xInv = 0; !sbox[x]; x ^= x2 || 1, xInv = th[xInv] || 1) {\n\t\t\t// Compute sbox\n\t\t\tlet s = xInv ^ xInv << 1 ^ xInv << 2 ^ xInv << 3 ^ xInv << 4;\n\t\t\ts = s >> 8 ^ s & 255 ^ 99;\n\t\t\tsbox[x] = s;\n\t\t\tsboxInv[s] = x;\n\n\t\t\t// Compute MixColumns\n\t\t\tx8 = d[x4 = d[x2 = d[x]]];\n\t\t\tlet tDec = x8 * 0x1010101 ^ x4 * 0x10001 ^ x2 * 0x101 ^ x * 0x1010100;\n\t\t\tlet tEnc = d[s] * 0x101 ^ s * 0x1010100;\n\n\t\t\tfor (let i = 0; i < 4; i++) {\n\t\t\t\tencTable[i][x] = tEnc = tEnc << 24 ^ tEnc >>> 8;\n\t\t\t\tdecTable[i][s] = tDec = tDec << 24 ^ tDec >>> 8;\n\t\t\t}\n\t\t}\n\n\t\t// Compactify. Considerable speedup on Firefox.\n\t\tfor (let i = 0; i < 5; i++) {\n\t\t\tencTable[i] = encTable[i].slice(0);\n\t\t\tdecTable[i] = decTable[i].slice(0);\n\t\t}\n\t}\n\n\t/**\n\t * Encryption and decryption core.\n\t * @param {Array} input Four words to be encrypted or decrypted.\n\t * @param dir The direction, 0 for encrypt and 1 for decrypt.\n\t * @return {Array} The four encrypted or decrypted words.\n\t * @private\n\t */\n\t_crypt(input, dir) {\n\t\tif (input.length !== 4) {\n\t\t\tthrow new Error(\"invalid aes block size\");\n\t\t}\n\n\t\tconst key = this._key[dir];\n\n\t\tconst nInnerRounds = key.length / 4 - 2;\n\t\tconst out = [0, 0, 0, 0];\n\t\tconst table = this._tables[dir];\n\n\t\t// load up the tables\n\t\tconst t0 = table[0];\n\t\tconst t1 = table[1];\n\t\tconst t2 = table[2];\n\t\tconst t3 = table[3];\n\t\tconst sbox = table[4];\n\n\t\t// state variables a,b,c,d are loaded with pre-whitened data\n\t\tlet a = input[0] ^ key[0];\n\t\tlet b = input[dir ? 3 : 1] ^ key[1];\n\t\tlet c = input[2] ^ key[2];\n\t\tlet d = input[dir ? 1 : 3] ^ key[3];\n\t\tlet kIndex = 4;\n\t\tlet a2, b2, c2;\n\n\t\t// Inner rounds. Cribbed from OpenSSL.\n\t\tfor (let i = 0; i < nInnerRounds; i++) {\n\t\t\ta2 = t0[a >>> 24] ^ t1[b >> 16 & 255] ^ t2[c >> 8 & 255] ^ t3[d & 255] ^ key[kIndex];\n\t\t\tb2 = t0[b >>> 24] ^ t1[c >> 16 & 255] ^ t2[d >> 8 & 255] ^ t3[a & 255] ^ key[kIndex + 1];\n\t\t\tc2 = t0[c >>> 24] ^ t1[d >> 16 & 255] ^ t2[a >> 8 & 255] ^ t3[b & 255] ^ key[kIndex + 2];\n\t\t\td = t0[d >>> 24] ^ t1[a >> 16 & 255] ^ t2[b >> 8 & 255] ^ t3[c & 255] ^ key[kIndex + 3];\n\t\t\tkIndex += 4;\n\t\t\ta = a2; b = b2; c = c2;\n\t\t}\n\n\t\t// Last round.\n\t\tfor (let i = 0; i < 4; i++) {\n\t\t\tout[dir ? 3 & -i : i] =\n\t\t\t\tsbox[a >>> 24] << 24 ^\n\t\t\t\tsbox[b >> 16 & 255] << 16 ^\n\t\t\t\tsbox[c >> 8 & 255] << 8 ^\n\t\t\t\tsbox[d & 255] ^\n\t\t\t\tkey[kIndex++];\n\t\t\ta2 = a; a = b; b = c; c = d; d = a2;\n\t\t}\n\n\t\treturn out;\n\t}\n};\n\n/**\n * Random values\n * @namespace\n */\nconst random = {\n\t/** \n\t * Generate random words with pure js, cryptographically not as strong & safe as native implementation.\n\t * @param {TypedArray} typedArray The array to fill.\n\t * @return {TypedArray} The random values.\n\t */\n\tgetRandomValues(typedArray) {\n\t\tconst words = new Uint32Array(typedArray.buffer);\n\t\tconst r = (m_w) => {\n\t\t\tlet m_z = 0x3ade68b1;\n\t\t\tconst mask = 0xffffffff;\n\t\t\treturn function () {\n\t\t\t\tm_z = (0x9069 * (m_z & 0xFFFF) + (m_z >> 0x10)) & mask;\n\t\t\t\tm_w = (0x4650 * (m_w & 0xFFFF) + (m_w >> 0x10)) & mask;\n\t\t\t\tconst result = ((((m_z << 0x10) + m_w) & mask) / 0x100000000) + .5;\n\t\t\t\treturn result * (Math.random() > .5 ? 1 : -1);\n\t\t\t};\n\t\t};\n\t\tfor (let i = 0, rcache; i < typedArray.length; i += 4) {\n\t\t\tconst _r = r((rcache || Math.random()) * 0x100000000);\n\t\t\trcache = _r() * 0x3ade67b7;\n\t\t\twords[i / 4] = (_r() * 0x100000000) | 0;\n\t\t}\n\t\treturn typedArray;\n\t}\n};\n\n/** @fileOverview CTR mode implementation.\n *\n * Special thanks to Roy Nicholson for pointing out a bug in our\n * implementation.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/** Brian Gladman's CTR Mode.\n* @constructor\n* @param {Object} _prf The aes instance to generate key.\n* @param {bitArray} _iv The iv for ctr mode, it must be 128 bits.\n*/\n\nconst mode = {};\n\n/**\n * Brian Gladman's CTR Mode.\n * @namespace\n */\nmode.ctrGladman = class {\n\tconstructor(prf, iv) {\n\t\tthis._prf = prf;\n\t\tthis._initIv = iv;\n\t\tthis._iv = iv;\n\t}\n\n\treset() {\n\t\tthis._iv = this._initIv;\n\t}\n\n\t/** Input some data to calculate.\n\t * @param {bitArray} data the data to process, it must be intergral multiple of 128 bits unless it's the last.\n\t */\n\tupdate(data) {\n\t\treturn this.calculate(this._prf, data, this._iv);\n\t}\n\n\tincWord(word) {\n\t\tif (((word >> 24) & 0xff) === 0xff) { //overflow\n\t\t\tlet b1 = (word >> 16) & 0xff;\n\t\t\tlet b2 = (word >> 8) & 0xff;\n\t\t\tlet b3 = word & 0xff;\n\n\t\t\tif (b1 === 0xff) { // overflow b1 \n\t\t\t\tb1 = 0;\n\t\t\t\tif (b2 === 0xff) {\n\t\t\t\t\tb2 = 0;\n\t\t\t\t\tif (b3 === 0xff) {\n\t\t\t\t\t\tb3 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t++b3;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t++b2;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t++b1;\n\t\t\t}\n\n\t\t\tword = 0;\n\t\t\tword += (b1 << 16);\n\t\t\tword += (b2 << 8);\n\t\t\tword += b3;\n\t\t} else {\n\t\t\tword += (0x01 << 24);\n\t\t}\n\t\treturn word;\n\t}\n\n\tincCounter(counter) {\n\t\tif ((counter[0] = this.incWord(counter[0])) === 0) {\n\t\t\t// encr_data in fileenc.c from Dr Brian Gladman's counts only with DWORD j < 8\n\t\t\tcounter[1] = this.incWord(counter[1]);\n\t\t}\n\t}\n\n\tcalculate(prf, data, iv) {\n\t\tlet l;\n\t\tif (!(l = data.length)) {\n\t\t\treturn [];\n\t\t}\n\t\tconst bl = bitArray.bitLength(data);\n\t\tfor (let i = 0; i < l; i += 4) {\n\t\t\tthis.incCounter(iv);\n\t\t\tconst e = prf.encrypt(iv);\n\t\t\tdata[i] ^= e[0];\n\t\t\tdata[i + 1] ^= e[1];\n\t\t\tdata[i + 2] ^= e[2];\n\t\t\tdata[i + 3] ^= e[3];\n\t\t}\n\t\treturn bitArray.clamp(data, bl);\n\t}\n};\n\nconst misc = {\n\timportKey(password) {\n\t\treturn new misc.hmacSha1(codec.bytes.toBits(password));\n\t},\n\tpbkdf2(prf, salt, count, length) {\n\t\tcount = count || 10000;\n\t\tif (length < 0 || count < 0) {\n\t\t\tthrow new Error(\"invalid params to pbkdf2\");\n\t\t}\n\t\tconst byteLength = ((length >> 5) + 1) << 2;\n\t\tlet u, ui, i, j, k;\n\t\tconst arrayBuffer = new ArrayBuffer(byteLength);\n\t\tconst out = new DataView(arrayBuffer);\n\t\tlet outLength = 0;\n\t\tconst b = bitArray;\n\t\tsalt = codec.bytes.toBits(salt);\n\t\tfor (k = 1; outLength < (byteLength || 1); k++) {\n\t\t\tu = ui = prf.encrypt(b.concat(salt, [k]));\n\t\t\tfor (i = 1; i < count; i++) {\n\t\t\t\tui = prf.encrypt(ui);\n\t\t\t\tfor (j = 0; j < ui.length; j++) {\n\t\t\t\t\tu[j] ^= ui[j];\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (i = 0; outLength < (byteLength || 1) && i < u.length; i++) {\n\t\t\t\tout.setInt32(outLength, u[i]);\n\t\t\t\toutLength += 4;\n\t\t\t}\n\t\t}\n\t\treturn arrayBuffer.slice(0, length / 8);\n\t}\n};\n\n/** @fileOverview HMAC implementation.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/** HMAC with the specified hash function.\n * @constructor\n * @param {bitArray} key the key for HMAC.\n * @param {Object} [Hash=hash.sha1] The hash function to use.\n */\nmisc.hmacSha1 = class {\n\n\tconstructor(key) {\n\t\tconst hmac = this;\n\t\tconst Hash = hmac._hash = hash.sha1;\n\t\tconst exKey = [[], []];\n\t\thmac._baseHash = [new Hash(), new Hash()];\n\t\tconst bs = hmac._baseHash[0].blockSize / 32;\n\n\t\tif (key.length > bs) {\n\t\t\tkey = new Hash().update(key).finalize();\n\t\t}\n\n\t\tfor (let i = 0; i < bs; i++) {\n\t\t\texKey[0][i] = key[i] ^ 0x36363636;\n\t\t\texKey[1][i] = key[i] ^ 0x5C5C5C5C;\n\t\t}\n\n\t\thmac._baseHash[0].update(exKey[0]);\n\t\thmac._baseHash[1].update(exKey[1]);\n\t\thmac._resultHash = new Hash(hmac._baseHash[0]);\n\t}\n\treset() {\n\t\tconst hmac = this;\n\t\thmac._resultHash = new hmac._hash(hmac._baseHash[0]);\n\t\thmac._updated = false;\n\t}\n\n\tupdate(data) {\n\t\tconst hmac = this;\n\t\thmac._updated = true;\n\t\thmac._resultHash.update(data);\n\t}\n\n\tdigest() {\n\t\tconst hmac = this;\n\t\tconst w = hmac._resultHash.finalize();\n\t\tconst result = new (hmac._hash)(hmac._baseHash[1]).update(w).finalize();\n\n\t\thmac.reset();\n\n\t\treturn result;\n\t}\n\n\tencrypt(data) {\n\t\tif (!this._updated) {\n\t\t\tthis.update(data);\n\t\t\treturn this.digest(data);\n\t\t} else {\n\t\t\tthrow new Error(\"encrypt on already updated hmac called!\");\n\t\t}\n\t}\n};\n\nexport {\n\tcipher,\n\tcodec,\n\tmisc,\n\tmode,\n\trandom\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global crypto */\n\nimport {\n\trandom\n} from \"./codecs/sjcl.js\";\n\nconst GET_RANDOM_VALUES_SUPPORTED = typeof crypto != \"undefined\" && typeof crypto.getRandomValues == \"function\";\n\nconst ERR_INVALID_PASSWORD = \"Invalid password\";\nconst ERR_INVALID_SIGNATURE = \"Invalid signature\";\nconst ERR_ABORT_CHECK_PASSWORD = \"zipjs-abort-check-password\";\n\nexport {\n\tgetRandomValues,\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE,\n\tERR_ABORT_CHECK_PASSWORD\n};\n\nfunction getRandomValues(array) {\n\tif (GET_RANDOM_VALUES_SUPPORTED) {\n\t\treturn crypto.getRandomValues(array);\n\t} else {\n\t\treturn random.getRandomValues(array);\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global crypto, TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport { encodeText } from \"./../util/encode-text.js\";\nimport {\n\tcipher,\n\tcodec,\n\tmisc,\n\tmode\n} from \"./codecs/sjcl.js\";\nimport {\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE,\n\tERR_ABORT_CHECK_PASSWORD,\n\tgetRandomValues\n} from \"./common-crypto.js\";\n\nconst BLOCK_LENGTH = 16;\nconst RAW_FORMAT = \"raw\";\nconst PBKDF2_ALGORITHM = { name: \"PBKDF2\" };\nconst HASH_ALGORITHM = { name: \"HMAC\" };\nconst HASH_FUNCTION = \"SHA-1\";\nconst BASE_KEY_ALGORITHM = Object.assign({ hash: HASH_ALGORITHM }, PBKDF2_ALGORITHM);\nconst DERIVED_BITS_ALGORITHM = Object.assign({ iterations: 1000, hash: { name: HASH_FUNCTION } }, PBKDF2_ALGORITHM);\nconst DERIVED_BITS_USAGE = [\"deriveBits\"];\nconst SALT_LENGTH = [8, 12, 16];\nconst KEY_LENGTH = [16, 24, 32];\nconst SIGNATURE_LENGTH = 10;\nconst COUNTER_DEFAULT_VALUE = [0, 0, 0, 0];\nconst UNDEFINED_TYPE = \"undefined\";\nconst FUNCTION_TYPE = \"function\";\n// deno-lint-ignore valid-typeof\nconst CRYPTO_API_SUPPORTED = typeof crypto != UNDEFINED_TYPE;\nconst subtle = CRYPTO_API_SUPPORTED && crypto.subtle;\nconst SUBTLE_API_SUPPORTED = CRYPTO_API_SUPPORTED && typeof subtle != UNDEFINED_TYPE;\nconst codecBytes = codec.bytes;\nconst Aes = cipher.aes;\nconst CtrGladman = mode.ctrGladman;\nconst HmacSha1 = misc.hmacSha1;\n\nlet IMPORT_KEY_SUPPORTED = CRYPTO_API_SUPPORTED && SUBTLE_API_SUPPORTED && typeof subtle.importKey == FUNCTION_TYPE;\nlet DERIVE_BITS_SUPPORTED = CRYPTO_API_SUPPORTED && SUBTLE_API_SUPPORTED && typeof subtle.deriveBits == FUNCTION_TYPE;\n\nclass AESDecryptionStream extends TransformStream {\n\n\tconstructor({ password, signed, encryptionStrength, checkPasswordOnly }) {\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tready: new Promise(resolve => this.resolveReady = resolve),\n\t\t\t\t\tpassword,\n\t\t\t\t\tsigned,\n\t\t\t\t\tstrength: encryptionStrength - 1,\n\t\t\t\t\tpending: new Uint8Array()\n\t\t\t\t});\n\t\t\t},\n\t\t\tasync transform(chunk, controller) {\n\t\t\t\tconst aesCrypto = this;\n\t\t\t\tconst {\n\t\t\t\t\tpassword,\n\t\t\t\t\tstrength,\n\t\t\t\t\tresolveReady,\n\t\t\t\t\tready\n\t\t\t\t} = aesCrypto;\n\t\t\t\tif (password) {\n\t\t\t\t\tawait createDecryptionKeys(aesCrypto, strength, password, subarray(chunk, 0, SALT_LENGTH[strength] + 2));\n\t\t\t\t\tchunk = subarray(chunk, SALT_LENGTH[strength] + 2);\n\t\t\t\t\tif (checkPasswordOnly) {\n\t\t\t\t\t\tcontroller.error(new Error(ERR_ABORT_CHECK_PASSWORD));\n\t\t\t\t\t} else {\n\t\t\t\t\t\tresolveReady();\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tawait ready;\n\t\t\t\t}\n\t\t\t\tconst output = new Uint8Array(chunk.length - SIGNATURE_LENGTH - ((chunk.length - SIGNATURE_LENGTH) % BLOCK_LENGTH));\n\t\t\t\tcontroller.enqueue(append(aesCrypto, chunk, output, 0, SIGNATURE_LENGTH, true));\n\t\t\t},\n\t\t\tasync flush(controller) {\n\t\t\t\tconst {\n\t\t\t\t\tsigned,\n\t\t\t\t\tctr,\n\t\t\t\t\thmac,\n\t\t\t\t\tpending,\n\t\t\t\t\tready\n\t\t\t\t} = this;\n\t\t\t\tawait ready;\n\t\t\t\tconst chunkToDecrypt = subarray(pending, 0, pending.length - SIGNATURE_LENGTH);\n\t\t\t\tconst originalSignature = subarray(pending, pending.length - SIGNATURE_LENGTH);\n\t\t\t\tlet decryptedChunkArray = new Uint8Array();\n\t\t\t\tif (chunkToDecrypt.length) {\n\t\t\t\t\tconst encryptedChunk = toBits(codecBytes, chunkToDecrypt);\n\t\t\t\t\thmac.update(encryptedChunk);\n\t\t\t\t\tconst decryptedChunk = ctr.update(encryptedChunk);\n\t\t\t\t\tdecryptedChunkArray = fromBits(codecBytes, decryptedChunk);\n\t\t\t\t}\n\t\t\t\tif (signed) {\n\t\t\t\t\tconst signature = subarray(fromBits(codecBytes, hmac.digest()), 0, SIGNATURE_LENGTH);\n\t\t\t\t\tfor (let indexSignature = 0; indexSignature < SIGNATURE_LENGTH; indexSignature++) {\n\t\t\t\t\t\tif (signature[indexSignature] != originalSignature[indexSignature]) {\n\t\t\t\t\t\t\tthrow new Error(ERR_INVALID_SIGNATURE);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcontroller.enqueue(decryptedChunkArray);\n\t\t\t}\n\t\t});\n\t}\n}\n\nclass AESEncryptionStream extends TransformStream {\n\n\tconstructor({ password, encryptionStrength }) {\n\t\t// deno-lint-ignore prefer-const\n\t\tlet stream;\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tready: new Promise(resolve => this.resolveReady = resolve),\n\t\t\t\t\tpassword,\n\t\t\t\t\tstrength: encryptionStrength - 1,\n\t\t\t\t\tpending: new Uint8Array()\n\t\t\t\t});\n\t\t\t},\n\t\t\tasync transform(chunk, controller) {\n\t\t\t\tconst aesCrypto = this;\n\t\t\t\tconst {\n\t\t\t\t\tpassword,\n\t\t\t\t\tstrength,\n\t\t\t\t\tresolveReady,\n\t\t\t\t\tready\n\t\t\t\t} = aesCrypto;\n\t\t\t\tlet preamble = new Uint8Array();\n\t\t\t\tif (password) {\n\t\t\t\t\tpreamble = await createEncryptionKeys(aesCrypto, strength, password);\n\t\t\t\t\tresolveReady();\n\t\t\t\t} else {\n\t\t\t\t\tawait ready;\n\t\t\t\t}\n\t\t\t\tconst output = new Uint8Array(preamble.length + chunk.length - (chunk.length % BLOCK_LENGTH));\n\t\t\t\toutput.set(preamble, 0);\n\t\t\t\tcontroller.enqueue(append(aesCrypto, chunk, output, preamble.length, 0));\n\t\t\t},\n\t\t\tasync flush(controller) {\n\t\t\t\tconst {\n\t\t\t\t\tctr,\n\t\t\t\t\thmac,\n\t\t\t\t\tpending,\n\t\t\t\t\tready\n\t\t\t\t} = this;\n\t\t\t\tawait ready;\n\t\t\t\tlet encryptedChunkArray = new Uint8Array();\n\t\t\t\tif (pending.length) {\n\t\t\t\t\tconst encryptedChunk = ctr.update(toBits(codecBytes, pending));\n\t\t\t\t\thmac.update(encryptedChunk);\n\t\t\t\t\tencryptedChunkArray = fromBits(codecBytes, encryptedChunk);\n\t\t\t\t}\n\t\t\t\tstream.signature = fromBits(codecBytes, hmac.digest()).slice(0, SIGNATURE_LENGTH);\n\t\t\t\tcontroller.enqueue(concat(encryptedChunkArray, stream.signature));\n\t\t\t}\n\t\t});\n\t\tstream = this;\n\t}\n}\n\nexport {\n\tAESDecryptionStream,\n\tAESEncryptionStream,\n\tERR_INVALID_PASSWORD\n};\n\nfunction append(aesCrypto, input, output, paddingStart, paddingEnd, verifySignature) {\n\tconst {\n\t\tctr,\n\t\thmac,\n\t\tpending\n\t} = aesCrypto;\n\tconst inputLength = input.length - paddingEnd;\n\tif (pending.length) {\n\t\tinput = concat(pending, input);\n\t\toutput = expand(output, inputLength - (inputLength % BLOCK_LENGTH));\n\t}\n\tlet offset;\n\tfor (offset = 0; offset <= inputLength - BLOCK_LENGTH; offset += BLOCK_LENGTH) {\n\t\tconst inputChunk = toBits(codecBytes, subarray(input, offset, offset + BLOCK_LENGTH));\n\t\tif (verifySignature) {\n\t\t\thmac.update(inputChunk);\n\t\t}\n\t\tconst outputChunk = ctr.update(inputChunk);\n\t\tif (!verifySignature) {\n\t\t\thmac.update(outputChunk);\n\t\t}\n\t\toutput.set(fromBits(codecBytes, outputChunk), offset + paddingStart);\n\t}\n\taesCrypto.pending = subarray(input, offset);\n\treturn output;\n}\n\nasync function createDecryptionKeys(decrypt, strength, password, preamble) {\n\tconst passwordVerificationKey = await createKeys(decrypt, strength, password, subarray(preamble, 0, SALT_LENGTH[strength]));\n\tconst passwordVerification = subarray(preamble, SALT_LENGTH[strength]);\n\tif (passwordVerificationKey[0] != passwordVerification[0] || passwordVerificationKey[1] != passwordVerification[1]) {\n\t\tthrow new Error(ERR_INVALID_PASSWORD);\n\t}\n}\n\nasync function createEncryptionKeys(encrypt, strength, password) {\n\tconst salt = getRandomValues(new Uint8Array(SALT_LENGTH[strength]));\n\tconst passwordVerification = await createKeys(encrypt, strength, password, salt);\n\treturn concat(salt, passwordVerification);\n}\n\nasync function createKeys(aesCrypto, strength, password, salt) {\n\taesCrypto.password = null;\n\tconst encodedPassword = encodeText(password);\n\tconst baseKey = await importKey(RAW_FORMAT, encodedPassword, BASE_KEY_ALGORITHM, false, DERIVED_BITS_USAGE);\n\tconst derivedBits = await deriveBits(Object.assign({ salt }, DERIVED_BITS_ALGORITHM), baseKey, 8 * ((KEY_LENGTH[strength] * 2) + 2));\n\tconst compositeKey = new Uint8Array(derivedBits);\n\tconst key = toBits(codecBytes, subarray(compositeKey, 0, KEY_LENGTH[strength]));\n\tconst authentication = toBits(codecBytes, subarray(compositeKey, KEY_LENGTH[strength], KEY_LENGTH[strength] * 2));\n\tconst passwordVerification = subarray(compositeKey, KEY_LENGTH[strength] * 2);\n\tObject.assign(aesCrypto, {\n\t\tkeys: {\n\t\t\tkey,\n\t\t\tauthentication,\n\t\t\tpasswordVerification\n\t\t},\n\t\tctr: new CtrGladman(new Aes(key), Array.from(COUNTER_DEFAULT_VALUE)),\n\t\thmac: new HmacSha1(authentication)\n\t});\n\treturn passwordVerification;\n}\n\nasync function importKey(format, password, algorithm, extractable, keyUsages) {\n\tif (IMPORT_KEY_SUPPORTED) {\n\t\ttry {\n\t\t\treturn await subtle.importKey(format, password, algorithm, extractable, keyUsages);\n\t\t} catch (_error) {\n\t\t\tIMPORT_KEY_SUPPORTED = false;\n\t\t\treturn misc.importKey(password);\n\t\t}\n\t} else {\n\t\treturn misc.importKey(password);\n\t}\n}\n\nasync function deriveBits(algorithm, baseKey, length) {\n\tif (DERIVE_BITS_SUPPORTED) {\n\t\ttry {\n\t\t\treturn await subtle.deriveBits(algorithm, baseKey, length);\n\t\t} catch (_error) {\n\t\t\tDERIVE_BITS_SUPPORTED = false;\n\t\t\treturn misc.pbkdf2(baseKey, algorithm.salt, DERIVED_BITS_ALGORITHM.iterations, length);\n\t\t}\n\t} else {\n\t\treturn misc.pbkdf2(baseKey, algorithm.salt, DERIVED_BITS_ALGORITHM.iterations, length);\n\t}\n}\n\nfunction concat(leftArray, rightArray) {\n\tlet array = leftArray;\n\tif (leftArray.length + rightArray.length) {\n\t\tarray = new Uint8Array(leftArray.length + rightArray.length);\n\t\tarray.set(leftArray, 0);\n\t\tarray.set(rightArray, leftArray.length);\n\t}\n\treturn array;\n}\n\nfunction expand(inputArray, length) {\n\tif (length && length > inputArray.length) {\n\t\tconst array = inputArray;\n\t\tinputArray = new Uint8Array(length);\n\t\tinputArray.set(array, 0);\n\t}\n\treturn inputArray;\n}\n\nfunction subarray(array, begin, end) {\n\treturn array.subarray(begin, end);\n}\n\nfunction fromBits(codecBytes, chunk) {\n\treturn codecBytes.fromBits(chunk);\n}\nfunction toBits(codecBytes, chunk) {\n\treturn codecBytes.toBits(chunk);\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport { Crc32 } from \"./codecs/crc32.js\";\nimport {\n\tERR_INVALID_PASSWORD,\n\tERR_ABORT_CHECK_PASSWORD,\n\tgetRandomValues\n} from \"./common-crypto.js\";\n\nconst HEADER_LENGTH = 12;\n\nclass ZipCryptoDecryptionStream extends TransformStream {\n\n\tconstructor({ password, passwordVerification, checkPasswordOnly }) {\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tpassword,\n\t\t\t\t\tpasswordVerification\n\t\t\t\t});\n\t\t\t\tcreateKeys(this, password);\n\t\t\t},\n\t\t\ttransform(chunk, controller) {\n\t\t\t\tconst zipCrypto = this;\n\t\t\t\tif (zipCrypto.password) {\n\t\t\t\t\tconst decryptedHeader = decrypt(zipCrypto, chunk.subarray(0, HEADER_LENGTH));\n\t\t\t\t\tzipCrypto.password = null;\n\t\t\t\t\tif (decryptedHeader[HEADER_LENGTH - 1] != zipCrypto.passwordVerification) {\n\t\t\t\t\t\tthrow new Error(ERR_INVALID_PASSWORD);\n\t\t\t\t\t}\n\t\t\t\t\tchunk = chunk.subarray(HEADER_LENGTH);\n\t\t\t\t}\n\t\t\t\tif (checkPasswordOnly) {\n\t\t\t\t\tcontroller.error(new Error(ERR_ABORT_CHECK_PASSWORD));\n\t\t\t\t} else {\n\t\t\t\t\tcontroller.enqueue(decrypt(zipCrypto, chunk));\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n}\n\nclass ZipCryptoEncryptionStream extends TransformStream {\n\n\tconstructor({ password, passwordVerification }) {\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tpassword,\n\t\t\t\t\tpasswordVerification\n\t\t\t\t});\n\t\t\t\tcreateKeys(this, password);\n\t\t\t},\n\t\t\ttransform(chunk, controller) {\n\t\t\t\tconst zipCrypto = this;\n\t\t\t\tlet output;\n\t\t\t\tlet offset;\n\t\t\t\tif (zipCrypto.password) {\n\t\t\t\t\tzipCrypto.password = null;\n\t\t\t\t\tconst header = getRandomValues(new Uint8Array(HEADER_LENGTH));\n\t\t\t\t\theader[HEADER_LENGTH - 1] = zipCrypto.passwordVerification;\n\t\t\t\t\toutput = new Uint8Array(chunk.length + header.length);\n\t\t\t\t\toutput.set(encrypt(zipCrypto, header), 0);\n\t\t\t\t\toffset = HEADER_LENGTH;\n\t\t\t\t} else {\n\t\t\t\t\toutput = new Uint8Array(chunk.length);\n\t\t\t\t\toffset = 0;\n\t\t\t\t}\n\t\t\t\toutput.set(encrypt(zipCrypto, chunk), offset);\n\t\t\t\tcontroller.enqueue(output);\n\t\t\t}\n\t\t});\n\t}\n}\n\nexport {\n\tZipCryptoDecryptionStream,\n\tZipCryptoEncryptionStream,\n\tERR_INVALID_PASSWORD\n};\n\nfunction decrypt(target, input) {\n\tconst output = new Uint8Array(input.length);\n\tfor (let index = 0; index < input.length; index++) {\n\t\toutput[index] = getByte(target) ^ input[index];\n\t\tupdateKeys(target, output[index]);\n\t}\n\treturn output;\n}\n\nfunction encrypt(target, input) {\n\tconst output = new Uint8Array(input.length);\n\tfor (let index = 0; index < input.length; index++) {\n\t\toutput[index] = getByte(target) ^ input[index];\n\t\tupdateKeys(target, input[index]);\n\t}\n\treturn output;\n}\n\nfunction createKeys(target, password) {\n\tconst keys = [0x12345678, 0x23456789, 0x34567890];\n\tObject.assign(target, {\n\t\tkeys,\n\t\tcrcKey0: new Crc32(keys[0]),\n\t\tcrcKey2: new Crc32(keys[2]),\n\t});\n\tfor (let index = 0; index < password.length; index++) {\n\t\tupdateKeys(target, password.charCodeAt(index));\n\t}\n}\n\nfunction updateKeys(target, byte) {\n\tlet [key0, key1, key2] = target.keys;\n\ttarget.crcKey0.append([byte]);\n\tkey0 = ~target.crcKey0.get();\n\tkey1 = getInt32(Math.imul(getInt32(key1 + getInt8(key0)), 134775813) + 1);\n\ttarget.crcKey2.append([key1 >>> 24]);\n\tkey2 = ~target.crcKey2.get();\n\ttarget.keys = [key0, key1, key2];\n}\n\nfunction getByte(target) {\n\tconst temp = target.keys[2] | 2;\n\treturn getInt8(Math.imul(temp, (temp ^ 1)) >>> 8);\n}\n\nfunction getInt8(number) {\n\treturn number & 0xFF;\n}\n\nfunction getInt32(number) {\n\treturn number & 0xFFFFFFFF;\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport { Crc32Stream } from \"./crc32-stream.js\";\nimport {\n\tAESEncryptionStream,\n\tAESDecryptionStream\n} from \"./aes-crypto-stream.js\";\nimport {\n\tZipCryptoEncryptionStream,\n\tZipCryptoDecryptionStream\n} from \"./zip-crypto-stream.js\";\nimport {\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE,\n\tERR_ABORT_CHECK_PASSWORD\n} from \"./common-crypto.js\";\n\nconst COMPRESSION_FORMAT = \"deflate-raw\";\n\nclass DeflateStream extends TransformStream {\n\n\tconstructor(options, { chunkSize, CompressionStream, CompressionStreamNative }) {\n\t\tsuper({});\n\t\tconst { compressed, encrypted, useCompressionStream, zipCrypto, signed, level } = options;\n\t\tconst stream = this;\n\t\tlet crc32Stream, encryptionStream;\n\t\tlet readable = filterEmptyChunks(super.readable);\n\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t[readable, crc32Stream] = readable.tee();\n\t\t\tcrc32Stream = pipeThrough(crc32Stream, new Crc32Stream());\n\t\t}\n\t\tif (compressed) {\n\t\t\treadable = pipeThroughCommpressionStream(readable, useCompressionStream, { level, chunkSize }, CompressionStreamNative, CompressionStream);\n\t\t}\n\t\tif (encrypted) {\n\t\t\tif (zipCrypto) {\n\t\t\t\treadable = pipeThrough(readable, new ZipCryptoEncryptionStream(options));\n\t\t\t} else {\n\t\t\t\tencryptionStream = new AESEncryptionStream(options);\n\t\t\t\treadable = pipeThrough(readable, encryptionStream);\n\t\t\t}\n\t\t}\n\t\tsetReadable(stream, readable, async () => {\n\t\t\tlet signature;\n\t\t\tif (encrypted && !zipCrypto) {\n\t\t\t\tsignature = encryptionStream.signature;\n\t\t\t}\n\t\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t\tsignature = await crc32Stream.getReader().read();\n\t\t\t\tsignature = new DataView(signature.value.buffer).getUint32(0);\n\t\t\t}\n\t\t\tstream.signature = signature;\n\t\t});\n\t}\n}\n\nclass InflateStream extends TransformStream {\n\n\tconstructor(options, { chunkSize, DecompressionStream, DecompressionStreamNative }) {\n\t\tsuper({});\n\t\tconst { zipCrypto, encrypted, signed, signature, compressed, useCompressionStream } = options;\n\t\tlet crc32Stream, decryptionStream;\n\t\tlet readable = filterEmptyChunks(super.readable);\n\t\tif (encrypted) {\n\t\t\tif (zipCrypto) {\n\t\t\t\treadable = pipeThrough(readable, new ZipCryptoDecryptionStream(options));\n\t\t\t} else {\n\t\t\t\tdecryptionStream = new AESDecryptionStream(options);\n\t\t\t\treadable = pipeThrough(readable, decryptionStream);\n\t\t\t}\n\t\t}\n\t\tif (compressed) {\n\t\t\treadable = pipeThroughCommpressionStream(readable, useCompressionStream, { chunkSize }, DecompressionStreamNative, DecompressionStream);\n\t\t}\n\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t[readable, crc32Stream] = readable.tee();\n\t\t\tcrc32Stream = pipeThrough(crc32Stream, new Crc32Stream());\n\t\t}\n\t\tsetReadable(this, readable, async () => {\n\t\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t\tconst streamSignature = await crc32Stream.getReader().read();\n\t\t\t\tconst dataViewSignature = new DataView(streamSignature.value.buffer);\n\t\t\t\tif (signature != dataViewSignature.getUint32(0, false)) {\n\t\t\t\t\tthrow new Error(ERR_INVALID_SIGNATURE);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n}\n\nexport {\n\tDeflateStream,\n\tInflateStream,\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE,\n\tERR_ABORT_CHECK_PASSWORD\n};\n\nfunction filterEmptyChunks(readable) {\n\treturn pipeThrough(readable, new TransformStream({\n\t\ttransform(chunk, controller) {\n\t\t\tif (chunk && chunk.length) {\n\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t}\n\t\t}\n\t}));\n}\n\nfunction setReadable(stream, readable, flush) {\n\treadable = pipeThrough(readable, new TransformStream({ flush }));\n\tObject.defineProperty(stream, \"readable\", {\n\t\tget() {\n\t\t\treturn readable;\n\t\t}\n\t});\n}\n\nfunction pipeThroughCommpressionStream(readable, useCompressionStream, options, CodecStreamNative, CodecStream) {\n\ttry {\n\t\tconst CompressionStream = useCompressionStream && CodecStreamNative ? CodecStreamNative : CodecStream;\n\t\treadable = pipeThrough(readable, new CompressionStream(COMPRESSION_FORMAT, options));\n\t} catch (error) {\n\t\tif (useCompressionStream) {\n\t\t\treadable = pipeThrough(readable, new CodecStream(COMPRESSION_FORMAT, options));\n\t\t} else {\n\t\t\tthrow error;\n\t\t}\n\t}\n\treturn readable;\n}\n\nfunction pipeThrough(readable, transformStream) {\n\treturn readable.pipeThrough(transformStream);\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/*\n * This program is based on JZlib 1.0.2 ymnk, JCraft,Inc.\n * JZlib is based on zlib-1.1.3, so all credit should go authors\n * Jean-loup Gailly(jloup@gzip.org) and Mark Adler(madler@alumni.caltech.edu)\n * and contributors of zlib.\n */\n\n/* global TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE,\n\tERR_ABORT_CHECK_PASSWORD,\n\tInflateStream,\n\tDeflateStream\n} from \"./zip-entry-stream.js\";\n\nconst MESSAGE_EVENT_TYPE = \"message\";\nconst MESSAGE_START = \"start\";\nconst MESSAGE_PULL = \"pull\";\nconst MESSAGE_DATA = \"data\";\nconst MESSAGE_ACK_DATA = \"ack\";\nconst MESSAGE_CLOSE = \"close\";\nconst CODEC_DEFLATE = \"deflate\";\nconst CODEC_INFLATE = \"inflate\";\n\nexport {\n\tCODEC_DEFLATE,\n\tCODEC_INFLATE,\n\tMESSAGE_EVENT_TYPE,\n\tMESSAGE_START,\n\tMESSAGE_PULL,\n\tMESSAGE_DATA,\n\tMESSAGE_ACK_DATA,\n\tMESSAGE_CLOSE,\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE,\n\tERR_ABORT_CHECK_PASSWORD,\n\tCodecStream\n};\n\nclass CodecStream extends TransformStream {\n\n\tconstructor(options, config) {\n\t\tsuper({});\n\t\tconst codec = this;\n\t\tconst { codecType } = options;\n\t\tlet Stream;\n\t\tif (codecType.startsWith(CODEC_DEFLATE)) {\n\t\t\tStream = DeflateStream;\n\t\t} else if (codecType.startsWith(CODEC_INFLATE)) {\n\t\t\tStream = InflateStream;\n\t\t}\n\t\tlet size = 0;\n\t\tconst stream = new Stream(options, config);\n\t\tconst readable = super.readable;\n\t\tconst transformStream = new TransformStream({\n\t\t\ttransform(chunk, controller) {\n\t\t\t\tif (chunk && chunk.length) {\n\t\t\t\t\tsize += chunk.length;\n\t\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t\t}\n\t\t\t},\n\t\t\tflush() {\n\t\t\t\tconst { signature } = stream;\n\t\t\t\tObject.assign(codec, {\n\t\t\t\t\tsignature,\n\t\t\t\t\tsize\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(codec, \"readable\", {\n\t\t\tget() {\n\t\t\t\treturn readable.pipeThrough(stream).pipeThrough(transformStream);\n\t\t\t}\n\t\t});\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global Worker, URL, TransformStream, WritableStream */\n\nimport {\n\tUNDEFINED_TYPE,\n\tFUNCTION_TYPE\n} from \"./constants.js\";\nimport {\n\tCodecStream,\n\tMESSAGE_EVENT_TYPE,\n\tMESSAGE_START,\n\tMESSAGE_PULL,\n\tMESSAGE_DATA,\n\tMESSAGE_ACK_DATA,\n\tMESSAGE_CLOSE\n} from \"./streams/codec-stream.js\";\n\n// deno-lint-ignore valid-typeof\nconst WEB_WORKERS_SUPPORTED = typeof Worker != UNDEFINED_TYPE;\n\nexport {\n\tCodecWorker\n};\n\nclass CodecWorker {\n\n\tconstructor(workerData, { readable, writable }, { options, config, streamOptions, useWebWorkers, transferStreams, scripts }, onTaskFinished) {\n\t\tconst { signal } = streamOptions;\n\t\tObject.assign(workerData, {\n\t\t\tbusy: true,\n\t\t\treadable: readable.pipeThrough(new ProgressWatcherStream(readable, streamOptions, config), { signal }),\n\t\t\twritable,\n\t\t\toptions: Object.assign({}, options),\n\t\t\tscripts,\n\t\t\ttransferStreams,\n\t\t\tterminate() {\n\t\t\t\tconst { worker, busy } = workerData;\n\t\t\t\tif (worker && !busy) {\n\t\t\t\t\tworker.terminate();\n\t\t\t\t\tworkerData.interface = null;\n\t\t\t\t}\n\t\t\t},\n\t\t\tonTaskFinished() {\n\t\t\t\tworkerData.busy = false;\n\t\t\t\tonTaskFinished(workerData);\n\t\t\t}\n\t\t});\n\t\treturn (useWebWorkers && WEB_WORKERS_SUPPORTED ? createWebWorkerInterface : createWorkerInterface)(workerData, config);\n\t}\n}\n\nclass ProgressWatcherStream extends TransformStream {\n\n\tconstructor(readableSource, { onstart, onprogress, size, onend }, { chunkSize }) {\n\t\tlet chunkOffset = 0;\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tif (onstart) {\n\t\t\t\t\tcallHandler(onstart, size);\n\t\t\t\t}\n\t\t\t},\n\t\t\tasync transform(chunk, controller) {\n\t\t\t\tchunkOffset += chunk.length;\n\t\t\t\tif (onprogress) {\n\t\t\t\t\tawait callHandler(onprogress, chunkOffset, size);\n\t\t\t\t}\n\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t},\n\t\t\tflush() {\n\t\t\t\treadableSource.size = chunkOffset;\n\t\t\t\tif (onend) {\n\t\t\t\t\tcallHandler(onend, chunkOffset);\n\t\t\t\t}\n\t\t\t}\n\t\t}, { highWaterMark: 1, size: () => chunkSize });\n\t}\n}\n\nasync function callHandler(handler, ...parameters) {\n\ttry {\n\t\tawait handler(...parameters);\n\t} catch (_error) {\n\t\t// ignored\n\t}\n}\n\nfunction createWorkerInterface(workerData, config) {\n\treturn {\n\t\trun: () => runWorker(workerData, config)\n\t};\n}\n\nfunction createWebWorkerInterface(workerData, { baseURL, chunkSize }) {\n\tif (!workerData.interface) {\n\t\tObject.assign(workerData, {\n\t\t\tworker: getWebWorker(workerData.scripts[0], baseURL, workerData),\n\t\t\tinterface: {\n\t\t\t\trun: () => runWebWorker(workerData, { chunkSize })\n\t\t\t}\n\t\t});\n\t}\n\treturn workerData.interface;\n}\n\nasync function runWorker({ options, readable, writable, onTaskFinished }, config) {\n\tconst codecStream = new CodecStream(options, config);\n\ttry {\n\t\tawait readable.pipeThrough(codecStream).pipeTo(writable, { preventClose: true, preventAbort: true });\n\t\tconst {\n\t\t\tsignature,\n\t\t\tsize\n\t\t} = codecStream;\n\t\treturn {\n\t\t\tsignature,\n\t\t\tsize\n\t\t};\n\t} finally {\n\t\tonTaskFinished();\n\t}\n}\n\nasync function runWebWorker(workerData, config) {\n\tlet resolveResult, rejectResult;\n\tconst result = new Promise((resolve, reject) => {\n\t\tresolveResult = resolve;\n\t\trejectResult = reject;\n\t});\n\tObject.assign(workerData, {\n\t\treader: null,\n\t\twriter: null,\n\t\tresolveResult,\n\t\trejectResult,\n\t\tresult\n\t});\n\tconst { readable, options, scripts } = workerData;\n\tconst { writable, closed } = watchClosedStream(workerData.writable);\n\tconst streamsTransferred = sendMessage({\n\t\ttype: MESSAGE_START,\n\t\tscripts: scripts.slice(1),\n\t\toptions,\n\t\tconfig,\n\t\treadable,\n\t\twritable\n\t}, workerData);\n\tif (!streamsTransferred) {\n\t\tObject.assign(workerData, {\n\t\t\treader: readable.getReader(),\n\t\t\twriter: writable.getWriter()\n\t\t});\n\t}\n\tconst resultValue = await result;\n\ttry {\n\t\tawait writable.close();\n\t} catch (_error) {\n\t\t// ignored\n\t}\n\tawait closed;\n\treturn resultValue;\n}\n\nfunction watchClosedStream(writableSource) {\n\tconst writer = writableSource.getWriter();\n\tlet resolveStreamClosed;\n\tconst closed = new Promise(resolve => resolveStreamClosed = resolve);\n\tconst writable = new WritableStream({\n\t\tasync write(chunk) {\n\t\t\tawait writer.ready;\n\t\t\tawait writer.write(chunk);\n\t\t},\n\t\tclose() {\n\t\t\twriter.releaseLock();\n\t\t\tresolveStreamClosed();\n\t\t},\n\t\tabort(reason) {\n\t\t\treturn writer.abort(reason);\n\t\t}\n\t});\n\treturn { writable, closed };\n}\n\nlet classicWorkersSupported = true;\nlet transferStreamsSupported = true;\n\nfunction getWebWorker(url, baseURL, workerData) {\n\tconst workerOptions = { type: \"module\" };\n\tlet scriptUrl, worker;\n\t// deno-lint-ignore valid-typeof\n\tif (typeof url == FUNCTION_TYPE) {\n\t\turl = url();\n\t}\n\ttry {\n\t\tscriptUrl = new URL(url, baseURL);\n\t} catch (_error) {\n\t\tscriptUrl = url;\n\t}\n\tif (classicWorkersSupported) {\n\t\ttry {\n\t\t\tworker = new Worker(scriptUrl);\n\t\t} catch (_error) {\n\t\t\tclassicWorkersSupported = false;\n\t\t\tworker = new Worker(scriptUrl, workerOptions);\n\t\t}\n\t} else {\n\t\tworker = new Worker(scriptUrl, workerOptions);\n\t}\n\tworker.addEventListener(MESSAGE_EVENT_TYPE, event => onMessage(event, workerData));\n\treturn worker;\n}\n\nfunction sendMessage(message, { worker, writer, onTaskFinished, transferStreams }) {\n\ttry {\n\t\tlet { value, readable, writable } = message;\n\t\tconst transferables = [];\n\t\tif (value) {\n\t\t\tconst { buffer, length } = value;\n\t\t\tif (length != buffer.byteLength) {\n\t\t\t\tvalue = new Uint8Array(value);\n\t\t\t}\n\t\t\tmessage.value = value.buffer;\n\t\t\ttransferables.push(message.value);\n\t\t}\n\t\tif (transferStreams && transferStreamsSupported) {\n\t\t\tif (readable) {\n\t\t\t\ttransferables.push(readable);\n\t\t\t}\n\t\t\tif (writable) {\n\t\t\t\ttransferables.push(writable);\n\t\t\t}\n\t\t} else {\n\t\t\tmessage.readable = message.writable = null;\n\t\t}\n\t\tif (transferables.length) {\n\t\t\ttry {\n\t\t\t\tworker.postMessage(message, transferables);\n\t\t\t\treturn true;\n\t\t\t} catch (_error) {\n\t\t\t\ttransferStreamsSupported = false;\n\t\t\t\tmessage.readable = message.writable = null;\n\t\t\t\tworker.postMessage(message);\n\t\t\t}\n\t\t} else {\n\t\t\tworker.postMessage(message);\n\t\t}\n\t} catch (error) {\n\t\tif (writer) {\n\t\t\twriter.releaseLock();\n\t\t}\n\t\tonTaskFinished();\n\t\tthrow error;\n\t}\n}\n\nasync function onMessage({ data }, workerData) {\n\tconst { type, value, messageId, result, error } = data;\n\tconst { reader, writer, resolveResult, rejectResult, onTaskFinished } = workerData;\n\ttry {\n\t\tif (error) {\n\t\t\tconst { message, stack, code, name } = error;\n\t\t\tconst responseError = new Error(message);\n\t\t\tObject.assign(responseError, { stack, code, name });\n\t\t\tclose(responseError);\n\t\t} else {\n\t\t\tif (type == MESSAGE_PULL) {\n\t\t\t\tconst { value, done } = await reader.read();\n\t\t\t\tsendMessage({ type: MESSAGE_DATA, value, done, messageId }, workerData);\n\t\t\t}\n\t\t\tif (type == MESSAGE_DATA) {\n\t\t\t\tawait writer.ready;\n\t\t\t\tawait writer.write(new Uint8Array(value));\n\t\t\t\tsendMessage({ type: MESSAGE_ACK_DATA, messageId }, workerData);\n\t\t\t}\n\t\t\tif (type == MESSAGE_CLOSE) {\n\t\t\t\tclose(null, result);\n\t\t\t}\n\t\t}\n\t} catch (error) {\n\t\tclose(error);\n\t}\n\n\tfunction close(error, result) {\n\t\tif (error) {\n\t\t\trejectResult(error);\n\t\t} else {\n\t\t\tresolveResult(result);\n\t\t}\n\t\tif (writer) {\n\t\t\twriter.releaseLock();\n\t\t}\n\t\tonTaskFinished();\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global setTimeout, clearTimeout */\n\nimport { UNDEFINED_VALUE } from \"./constants.js\";\nimport {\n\tCODEC_INFLATE,\n\tCODEC_DEFLATE,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD,\n\tERR_ABORT_CHECK_PASSWORD\n} from \"./streams/codec-stream.js\";\nimport { CodecWorker } from \"./codec-worker.js\";\n\nlet pool = [];\nconst pendingRequests = [];\n\nexport {\n\trunWorker,\n\tterminateWorkers,\n\tCODEC_DEFLATE,\n\tCODEC_INFLATE,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD,\n\tERR_ABORT_CHECK_PASSWORD\n};\n\nlet indexWorker = 0;\n\nasync function runWorker(stream, workerOptions) {\n\tconst { options, config } = workerOptions;\n\tconst { transferStreams, useWebWorkers, useCompressionStream, codecType, compressed, signed, encrypted } = options;\n\tconst { workerScripts, maxWorkers, terminateWorkerTimeout } = config;\n\tworkerOptions.transferStreams = transferStreams || transferStreams === UNDEFINED_VALUE;\n\tconst streamCopy = !compressed && !signed && !encrypted && !workerOptions.transferStreams;\n\tworkerOptions.useWebWorkers = !streamCopy && (useWebWorkers || (useWebWorkers === UNDEFINED_VALUE && config.useWebWorkers));\n\tworkerOptions.scripts = workerOptions.useWebWorkers && workerScripts ? workerScripts[codecType] : [];\n\toptions.useCompressionStream = useCompressionStream || (useCompressionStream === UNDEFINED_VALUE && config.useCompressionStream);\n\tlet worker;\n\tconst workerData = pool.find(workerData => !workerData.busy);\n\tif (workerData) {\n\t\tclearTerminateTimeout(workerData);\n\t\tworker = new CodecWorker(workerData, stream, workerOptions, onTaskFinished);\n\t} else if (pool.length < maxWorkers) {\n\t\tconst workerData = { indexWorker };\n\t\tindexWorker++;\n\t\tpool.push(workerData);\n\t\tworker = new CodecWorker(workerData, stream, workerOptions, onTaskFinished);\n\t} else {\n\t\tworker = await new Promise(resolve => pendingRequests.push({ resolve, stream, workerOptions }));\n\t}\n\treturn worker.run();\n\n\tfunction onTaskFinished(workerData) {\n\t\tif (pendingRequests.length) {\n\t\t\tconst [{ resolve, stream, workerOptions }] = pendingRequests.splice(0, 1);\n\t\t\tresolve(new CodecWorker(workerData, stream, workerOptions, onTaskFinished));\n\t\t} else if (workerData.worker) {\n\t\t\tclearTerminateTimeout(workerData);\n\t\t\tif (Number.isFinite(terminateWorkerTimeout) && terminateWorkerTimeout >= 0) {\n\t\t\t\tworkerData.terminateTimeout = setTimeout(() => {\n\t\t\t\t\tpool = pool.filter(data => data != workerData);\n\t\t\t\t\tworkerData.terminate();\n\t\t\t\t}, terminateWorkerTimeout);\n\t\t\t}\n\t\t} else {\n\t\t\tpool = pool.filter(data => data != workerData);\n\t\t}\n\t}\n}\n\nfunction clearTerminateTimeout(workerData) {\n\tconst { terminateTimeout } = workerData;\n\tif (terminateTimeout) {\n\t\tclearTimeout(terminateTimeout);\n\t\tworkerData.terminateTimeout = null;\n\t}\n}\n\nfunction terminateWorkers() {\n\tpool.forEach(workerData => {\n\t\tclearTerminateTimeout(workerData);\n\t\tworkerData.terminate();\n\t});\n}","function e(e){const t=()=>URL.createObjectURL(new Blob(['const{Array:e,Object:t,Number:n,Math:r,Error:s,Uint8Array:i,Uint16Array:o,Uint32Array:c,Int32Array:f,Map:a,DataView:l,Promise:u,TextEncoder:w,crypto:h,postMessage:d,TransformStream:p,ReadableStream:y,WritableStream:m,CompressionStream:b,DecompressionStream:g}=self;class k{constructor(e){return class extends p{constructor(t,n){const r=new e(n);super({transform(e,t){t.enqueue(r.append(e))},flush(e){const t=r.flush();t&&e.enqueue(t)}})}}}}const v=[];for(let e=0;256>e;e++){let t=e;for(let e=0;8>e;e++)1&t?t=t>>>1^3988292384:t>>>=1;v[e]=t}class S{constructor(e){this.t=e||-1}append(e){let t=0|this.t;for(let n=0,r=0|e.length;r>n;n++)t=t>>>8^v[255&(t^e[n])];this.t=t}get(){return~this.t}}class z extends p{constructor(){const e=new S;super({transform(t){e.append(t)},flush(t){const n=new i(4);new l(n.buffer).setUint32(0,e.get()),t.enqueue(n)}})}}const C={concat(e,t){if(0===e.length||0===t.length)return e.concat(t);const n=e[e.length-1],r=C.i(n);return 32===r?e.concat(t):C.o(t,r,0|n,e.slice(0,e.length-1))},l(e){const t=e.length;if(0===t)return 0;const n=e[t-1];return 32*(t-1)+C.i(n)},u(e,t){if(32*e.length0&&t&&(e[n-1]=C.h(t,e[n-1]&2147483648>>t-1,1)),e},h:(e,t,n)=>32===e?t:(n?0|t:t<<32-e)+1099511627776*e,i:e=>r.round(e/1099511627776)||32,o(e,t,n,r){for(void 0===r&&(r=[]);t>=32;t-=32)r.push(n),n=0;if(0===t)return r.concat(e);for(let s=0;s>>t),n=e[s]<<32-t;const s=e.length?e[e.length-1]:0,i=C.i(s);return r.push(C.h(t+i&31,t+i>32?n:r.pop(),1)),r}},x={p:{m(e){const t=C.l(e)/8,n=new i(t);let r;for(let s=0;t>s;s++)0==(3&s)&&(r=e[s/4]),n[s]=r>>>24,r<<=8;return n},g(e){const t=[];let n,r=0;for(n=0;n9007199254740991)throw new s(\"Cannot hash more than 2^53 - 1 bits\");const o=new c(n);let f=0;for(let e=t.blockSize+r-(t.blockSize+r&t.blockSize-1);i>=e;e+=t.blockSize)t.I(o.subarray(16*f,16*(f+1))),f+=1;return n.splice(0,16*f),t}D(){const e=this;let t=e.C;const n=e.S;t=C.concat(t,[C.h(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(r.floor(e._/4294967296)),t.push(0|e._);t.length;)e.I(t.splice(0,16));return e.reset(),n}V(e,t,n,r){return e>19?e>39?e>59?e>79?void 0:t^n^r:t&n|t&r|n&r:t^n^r:t&n|~t&r}P(e,t){return t<>>32-e}I(t){const n=this,s=n.S,i=e(80);for(let e=0;16>e;e++)i[e]=t[e];let o=s[0],c=s[1],f=s[2],a=s[3],l=s[4];for(let e=0;79>=e;e++){16>e||(i[e]=n.P(1,i[e-3]^i[e-8]^i[e-14]^i[e-16]));const t=n.P(5,o)+n.V(e,c,f,a)+l+i[e]+n.v[r.floor(e/20)]|0;l=a,a=f,f=n.P(30,c),c=o,o=t}s[0]=s[0]+o|0,s[1]=s[1]+c|0,s[2]=s[2]+f|0,s[3]=s[3]+a|0,s[4]=s[4]+l|0}},A={getRandomValues(e){const t=new c(e.buffer),n=e=>{let t=987654321;const n=4294967295;return()=>(t=36969*(65535&t)+(t>>16)&n,(((t<<16)+(e=18e3*(65535&e)+(e>>16)&n)&n)/4294967296+.5)*(r.random()>.5?1:-1))};for(let s,i=0;inew I.R(x.p.g(e)),B(e,t,n,r){if(n=n||1e4,0>r||0>n)throw new s(\"invalid params to pbkdf2\");const i=1+(r>>5)<<2;let o,c,f,a,u;const w=new ArrayBuffer(i),h=new l(w);let d=0;const p=C;for(t=x.p.g(t),u=1;(i||1)>d;u++){for(o=c=e.encrypt(p.concat(t,[u])),f=1;n>f;f++)for(c=e.encrypt(c),a=0;ad&&fs&&(e=(new n).update(e).D());for(let t=0;s>t;t++)r[0][t]=909522486^e[t],r[1][t]=1549556828^e[t];t.K[0].update(r[0]),t.K[1].update(r[1]),t.U=new n(t.K[0])}reset(){const e=this;e.U=new e.M(e.K[0]),e.N=!1}update(e){this.N=!0,this.U.update(e)}digest(){const e=this,t=e.U.D(),n=new e.M(e.K[1]).update(t).D();return e.reset(),n}encrypt(e){if(this.N)throw new s(\"encrypt on already updated hmac called!\");return this.update(e),this.digest(e)}}},D=void 0!==h&&\"function\"==typeof h.getRandomValues,V=\"Invalid password\",P=\"Invalid signature\",R=\"zipjs-abort-check-password\";function B(e){return D?h.getRandomValues(e):A.getRandomValues(e)}const E=16,M={name:\"PBKDF2\"},K=t.assign({hash:{name:\"HMAC\"}},M),U=t.assign({iterations:1e3,hash:{name:\"SHA-1\"}},M),N=[\"deriveBits\"],O=[8,12,16],T=[16,24,32],W=10,j=[0,0,0,0],H=\"undefined\",L=\"function\",F=typeof h!=H,q=F&&h.subtle,G=F&&typeof q!=H,J=x.p,Q=class{constructor(e){const t=this;t.O=[[[],[],[],[],[]],[[],[],[],[],[]]],t.O[0][0][0]||t.T();const n=t.O[0][4],r=t.O[1],i=e.length;let o,c,f,a=1;if(4!==i&&6!==i&&8!==i)throw new s(\"invalid aes key size\");for(t.v=[c=e.slice(0),f=[]],o=i;4*i+28>o;o++){let e=c[o-1];(o%i==0||8===i&&o%i==4)&&(e=n[e>>>24]<<24^n[e>>16&255]<<16^n[e>>8&255]<<8^n[255&e],o%i==0&&(e=e<<8^e>>>24^a<<24,a=a<<1^283*(a>>7))),c[o]=c[o-i]^e}for(let e=0;o;e++,o--){const t=c[3&e?o:o-4];f[e]=4>=o||4>e?t:r[0][n[t>>>24]]^r[1][n[t>>16&255]]^r[2][n[t>>8&255]]^r[3][n[255&t]]}}encrypt(e){return this.W(e,0)}decrypt(e){return this.W(e,1)}T(){const e=this.O[0],t=this.O[1],n=e[4],r=t[4],s=[],i=[];let o,c,f,a;for(let e=0;256>e;e++)i[(s[e]=e<<1^283*(e>>7))^e]=e;for(let l=o=0;!n[l];l^=c||1,o=i[o]||1){let i=o^o<<1^o<<2^o<<3^o<<4;i=i>>8^255&i^99,n[l]=i,r[i]=l,a=s[f=s[c=s[l]]];let u=16843009*a^65537*f^257*c^16843008*l,w=257*s[i]^16843008*i;for(let n=0;4>n;n++)e[n][l]=w=w<<24^w>>>8,t[n][i]=u=u<<24^u>>>8}for(let n=0;5>n;n++)e[n]=e[n].slice(0),t[n]=t[n].slice(0)}W(e,t){if(4!==e.length)throw new s(\"invalid aes block size\");const n=this.v[t],r=n.length/4-2,i=[0,0,0,0],o=this.O[t],c=o[0],f=o[1],a=o[2],l=o[3],u=o[4];let w,h,d,p=e[0]^n[0],y=e[t?3:1]^n[1],m=e[2]^n[2],b=e[t?1:3]^n[3],g=4;for(let e=0;r>e;e++)w=c[p>>>24]^f[y>>16&255]^a[m>>8&255]^l[255&b]^n[g],h=c[y>>>24]^f[m>>16&255]^a[b>>8&255]^l[255&p]^n[g+1],d=c[m>>>24]^f[b>>16&255]^a[p>>8&255]^l[255&y]^n[g+2],b=c[b>>>24]^f[p>>16&255]^a[y>>8&255]^l[255&m]^n[g+3],g+=4,p=w,y=h,m=d;for(let e=0;4>e;e++)i[t?3&-e:e]=u[p>>>24]<<24^u[y>>16&255]<<16^u[m>>8&255]<<8^u[255&b]^n[g++],w=p,p=y,y=m,m=b,b=w;return i}},X=class{constructor(e,t){this.j=e,this.H=t,this.L=t}reset(){this.L=this.H}update(e){return this.F(this.j,e,this.L)}q(e){if(255==(e>>24&255)){let t=e>>16&255,n=e>>8&255,r=255&e;255===t?(t=0,255===n?(n=0,255===r?r=0:++r):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=r}else e+=1<<24;return e}G(e){0===(e[0]=this.q(e[0]))&&(e[1]=this.q(e[1]))}F(e,t,n){let r;if(!(r=t.length))return[];const s=C.l(t);for(let s=0;r>s;s+=4){this.G(n);const r=e.encrypt(n);t[s]^=r[0],t[s+1]^=r[1],t[s+2]^=r[2],t[s+3]^=r[3]}return C.u(t,s)}},Y=I.R;let Z=F&&G&&typeof q.importKey==L,$=F&&G&&typeof q.deriveBits==L;class ee extends p{constructor({password:e,signed:n,encryptionStrength:r,checkPasswordOnly:o}){super({start(){t.assign(this,{ready:new u((e=>this.J=e)),password:e,signed:n,X:r-1,pending:new i})},async transform(e,t){const n=this,{password:r,X:c,J:f,ready:a}=n;r?(await(async(e,t,n,r)=>{const i=await re(e,t,n,ie(r,0,O[t])),o=ie(r,O[t]);if(i[0]!=o[0]||i[1]!=o[1])throw new s(V)})(n,c,r,ie(e,0,O[c]+2)),e=ie(e,O[c]+2),o?t.error(new s(R)):f()):await a;const l=new i(e.length-W-(e.length-W)%E);t.enqueue(ne(n,e,l,0,W,!0))},async flush(e){const{signed:t,Y:n,Z:r,pending:o,ready:c}=this;await c;const f=ie(o,0,o.length-W),a=ie(o,o.length-W);let l=new i;if(f.length){const e=ce(J,f);r.update(e);const t=n.update(e);l=oe(J,t)}if(t){const e=ie(oe(J,r.digest()),0,W);for(let t=0;W>t;t++)if(e[t]!=a[t])throw new s(P)}e.enqueue(l)}})}}class te extends p{constructor({password:e,encryptionStrength:n}){let r;super({start(){t.assign(this,{ready:new u((e=>this.J=e)),password:e,X:n-1,pending:new i})},async transform(e,t){const n=this,{password:r,X:s,J:o,ready:c}=n;let f=new i;r?(f=await(async(e,t,n)=>{const r=B(new i(O[t]));return se(r,await re(e,t,n,r))})(n,s,r),o()):await c;const a=new i(f.length+e.length-e.length%E);a.set(f,0),t.enqueue(ne(n,e,a,f.length,0))},async flush(e){const{Y:t,Z:n,pending:s,ready:o}=this;await o;let c=new i;if(s.length){const e=t.update(ce(J,s));n.update(e),c=oe(J,e)}r.signature=oe(J,n.digest()).slice(0,W),e.enqueue(se(c,r.signature))}}),r=this}}function ne(e,t,n,r,s,o){const{Y:c,Z:f,pending:a}=e,l=t.length-s;let u;for(a.length&&(t=se(a,t),n=((e,t)=>{if(t&&t>e.length){const n=e;(e=new i(t)).set(n,0)}return e})(n,l-l%E)),u=0;l-E>=u;u+=E){const e=ce(J,ie(t,u,u+E));o&&f.update(e);const s=c.update(e);o||f.update(s),n.set(oe(J,s),u+r)}return e.pending=ie(t,u),n}async function re(n,r,s,o){n.password=null;const c=(e=>{if(void 0===w){const t=new i((e=unescape(encodeURIComponent(e))).length);for(let n=0;n{if(!Z)return I.importKey(t);try{return await q.importKey(\"raw\",t,n,!1,s)}catch(e){return Z=!1,I.importKey(t)}})(0,c,K,0,N),a=await(async(e,t,n)=>{if(!$)return I.B(t,e.salt,U.iterations,n);try{return await q.deriveBits(e,t,n)}catch(r){return $=!1,I.B(t,e.salt,U.iterations,n)}})(t.assign({salt:o},U),f,8*(2*T[r]+2)),l=new i(a),u=ce(J,ie(l,0,T[r])),h=ce(J,ie(l,T[r],2*T[r])),d=ie(l,2*T[r]);return t.assign(n,{keys:{key:u,$:h,passwordVerification:d},Y:new X(new Q(u),e.from(j)),Z:new Y(h)}),d}function se(e,t){let n=e;return e.length+t.length&&(n=new i(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function ie(e,t,n){return e.subarray(t,n)}function oe(e,t){return e.m(t)}function ce(e,t){return e.g(t)}class fe extends p{constructor({password:e,passwordVerification:n,checkPasswordOnly:r}){super({start(){t.assign(this,{password:e,passwordVerification:n}),we(this,e)},transform(e,t){const n=this;if(n.password){const t=le(n,e.subarray(0,12));if(n.password=null,t[11]!=n.passwordVerification)throw new s(V);e=e.subarray(12)}r?t.error(new s(R)):t.enqueue(le(n,e))}})}}class ae extends p{constructor({password:e,passwordVerification:n}){super({start(){t.assign(this,{password:e,passwordVerification:n}),we(this,e)},transform(e,t){const n=this;let r,s;if(n.password){n.password=null;const t=B(new i(12));t[11]=n.passwordVerification,r=new i(e.length+t.length),r.set(ue(n,t),0),s=12}else r=new i(e.length),s=0;r.set(ue(n,e),s),t.enqueue(r)}})}}function le(e,t){const n=new i(t.length);for(let r=0;r>>24]),i=~e.te.get(),e.keys=[n,s,i]}function de(e){const t=2|e.keys[2];return pe(r.imul(t,1^t)>>>8)}function pe(e){return 255&e}function ye(e){return 4294967295&e}const me=\"deflate-raw\";class be extends p{constructor(e,{chunkSize:t,CompressionStream:n,CompressionStreamNative:r}){super({});const{compressed:s,encrypted:i,useCompressionStream:o,zipCrypto:c,signed:f,level:a}=e,u=this;let w,h,d=ke(super.readable);i&&!c||!f||([d,w]=d.tee(),w=ze(w,new z)),s&&(d=Se(d,o,{level:a,chunkSize:t},r,n)),i&&(c?d=ze(d,new ae(e)):(h=new te(e),d=ze(d,h))),ve(u,d,(async()=>{let e;i&&!c&&(e=h.signature),i&&!c||!f||(e=await w.getReader().read(),e=new l(e.value.buffer).getUint32(0)),u.signature=e}))}}class ge extends p{constructor(e,{chunkSize:t,DecompressionStream:n,DecompressionStreamNative:r}){super({});const{zipCrypto:i,encrypted:o,signed:c,signature:f,compressed:a,useCompressionStream:u}=e;let w,h,d=ke(super.readable);o&&(i?d=ze(d,new fe(e)):(h=new ee(e),d=ze(d,h))),a&&(d=Se(d,u,{chunkSize:t},r,n)),o&&!i||!c||([d,w]=d.tee(),w=ze(w,new z)),ve(this,d,(async()=>{if((!o||i)&&c){const e=await w.getReader().read(),t=new l(e.value.buffer);if(f!=t.getUint32(0,!1))throw new s(P)}}))}}function ke(e){return ze(e,new p({transform(e,t){e&&e.length&&t.enqueue(e)}}))}function ve(e,n,r){n=ze(n,new p({flush:r})),t.defineProperty(e,\"readable\",{get:()=>n})}function Se(e,t,n,r,s){try{e=ze(e,new(t&&r?r:s)(me,n))}catch(r){if(!t)throw r;e=ze(e,new s(me,n))}return e}function ze(e,t){return e.pipeThrough(t)}const Ce=\"data\";class xe extends p{constructor(e,n){super({});const r=this,{codecType:s}=e;let i;s.startsWith(\"deflate\")?i=be:s.startsWith(\"inflate\")&&(i=ge);let o=0;const c=new i(e,n),f=super.readable,a=new p({transform(e,t){e&&e.length&&(o+=e.length,t.enqueue(e))},flush(){const{signature:e}=c;t.assign(r,{signature:e,size:o})}});t.defineProperty(r,\"readable\",{get:()=>f.pipeThrough(c).pipeThrough(a)})}}const _e=new a,Ae=new a;let Ie=0;async function De(e){try{const{options:t,scripts:r,config:s}=e;r&&r.length&&importScripts.apply(void 0,r),self.initCodec&&self.initCodec(),s.CompressionStreamNative=self.CompressionStream,s.DecompressionStreamNative=self.DecompressionStream,self.Deflate&&(s.CompressionStream=new k(self.Deflate)),self.Inflate&&(s.DecompressionStream=new k(self.Inflate));const i={highWaterMark:1,size:()=>s.chunkSize},o=e.readable||new y({async pull(e){const t=new u((e=>_e.set(Ie,e)));Ve({type:\"pull\",messageId:Ie}),Ie=(Ie+1)%n.MAX_SAFE_INTEGER;const{value:r,done:s}=await t;e.enqueue(r),s&&e.close()}},i),c=e.writable||new m({async write(e){let t;const r=new u((e=>t=e));Ae.set(Ie,t),Ve({type:Ce,value:e,messageId:Ie}),Ie=(Ie+1)%n.MAX_SAFE_INTEGER,await r}},i),f=new xe(t,s);await o.pipeThrough(f).pipeTo(c,{preventClose:!0,preventAbort:!0});try{await c.close()}catch(e){}const{signature:a,size:l}=f;Ve({type:\"close\",result:{signature:a,size:l}})}catch(e){Pe(e)}}function Ve(e){let{value:t}=e;if(t)if(t.length)try{t=new i(t),e.value=t.buffer,d(e,[e.value])}catch(t){d(e)}else d(e);else d(e)}function Pe(e){const{message:t,stack:n,code:r,name:s}=e;d({error:{message:t,stack:n,code:r,name:s}})}addEventListener(\"message\",(({data:e})=>{const{type:t,messageId:n,value:r,done:s}=e;try{if(\"start\"==t&&De(e),t==Ce){const e=_e.get(n);_e.delete(n),e({value:new i(r),done:s})}if(\"ack\"==t){const e=Ae.get(n);Ae.delete(n),e()}}catch(e){Pe(e)}}));const Re=-2;function Be(t){return Ee(t.map((([t,n])=>new e(t).fill(n,0,t))))}function Ee(t){return t.reduce(((t,n)=>t.concat(e.isArray(n)?Ee(n):n)),[])}const Me=[0,1,2,3].concat(...Be([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function Ke(){const e=this;function t(e,t){let n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1}e.ne=n=>{const s=e.re,i=e.ie.se,o=e.ie.oe;let c,f,a,l=-1;for(n.ce=0,n.fe=573,c=0;o>c;c++)0!==s[2*c]?(n.ae[++n.ce]=l=c,n.le[c]=0):s[2*c+1]=0;for(;2>n.ce;)a=n.ae[++n.ce]=2>l?++l:0,s[2*a]=1,n.le[a]=0,n.ue--,i&&(n.we-=i[2*a+1]);for(e.he=l,c=r.floor(n.ce/2);c>=1;c--)n.de(s,c);a=o;do{c=n.ae[1],n.ae[1]=n.ae[n.ce--],n.de(s,1),f=n.ae[1],n.ae[--n.fe]=c,n.ae[--n.fe]=f,s[2*a]=s[2*c]+s[2*f],n.le[a]=r.max(n.le[c],n.le[f])+1,s[2*c+1]=s[2*f+1]=a,n.ae[1]=a++,n.de(s,1)}while(n.ce>=2);n.ae[--n.fe]=n.ae[1],(t=>{const n=e.re,r=e.ie.se,s=e.ie.pe,i=e.ie.ye,o=e.ie.me;let c,f,a,l,u,w,h=0;for(l=0;15>=l;l++)t.be[l]=0;for(n[2*t.ae[t.fe]+1]=0,c=t.fe+1;573>c;c++)f=t.ae[c],l=n[2*n[2*f+1]+1]+1,l>o&&(l=o,h++),n[2*f+1]=l,f>e.he||(t.be[l]++,u=0,i>f||(u=s[f-i]),w=n[2*f],t.ue+=w*(l+u),r&&(t.we+=w*(r[2*f+1]+u)));if(0!==h){do{for(l=o-1;0===t.be[l];)l--;t.be[l]--,t.be[l+1]+=2,t.be[o]--,h-=2}while(h>0);for(l=o;0!==l;l--)for(f=t.be[l];0!==f;)a=t.ae[--c],a>e.he||(n[2*a+1]!=l&&(t.ue+=(l-n[2*a+1])*n[2*a],n[2*a+1]=l),f--)}})(n),((e,n,r)=>{const s=[];let i,o,c,f=0;for(i=1;15>=i;i++)s[i]=f=f+r[i-1]<<1;for(o=0;n>=o;o++)c=e[2*o+1],0!==c&&(e[2*o]=t(s[c]++,c))})(s,e.he,n.be)}}function Ue(e,t,n,r,s){const i=this;i.se=e,i.pe=t,i.ye=n,i.oe=r,i.me=s}Ke.ge=[0,1,2,3,4,5,6,7].concat(...Be([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]])),Ke.ke=[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],Ke.ve=[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],Ke.Se=e=>256>e?Me[e]:Me[256+(e>>>7)],Ke.ze=[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],Ke.Ce=[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],Ke.xe=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],Ke._e=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];const Ne=Be([[144,8],[112,9],[24,7],[8,8]]);Ue.Ae=Ee([12,140,76,204,44,172,108,236,28,156,92,220,60,188,124,252,2,130,66,194,34,162,98,226,18,146,82,210,50,178,114,242,10,138,74,202,42,170,106,234,26,154,90,218,58,186,122,250,6,134,70,198,38,166,102,230,22,150,86,214,54,182,118,246,14,142,78,206,46,174,110,238,30,158,94,222,62,190,126,254,1,129,65,193,33,161,97,225,17,145,81,209,49,177,113,241,9,137,73,201,41,169,105,233,25,153,89,217,57,185,121,249,5,133,69,197,37,165,101,229,21,149,85,213,53,181,117,245,13,141,77,205,45,173,109,237,29,157,93,221,61,189,125,253,19,275,147,403,83,339,211,467,51,307,179,435,115,371,243,499,11,267,139,395,75,331,203,459,43,299,171,427,107,363,235,491,27,283,155,411,91,347,219,475,59,315,187,443,123,379,251,507,7,263,135,391,71,327,199,455,39,295,167,423,103,359,231,487,23,279,151,407,87,343,215,471,55,311,183,439,119,375,247,503,15,271,143,399,79,335,207,463,47,303,175,431,111,367,239,495,31,287,159,415,95,351,223,479,63,319,191,447,127,383,255,511,0,64,32,96,16,80,48,112,8,72,40,104,24,88,56,120,4,68,36,100,20,84,52,116,3,131,67,195,35,163,99,227].map(((e,t)=>[e,Ne[t]])));const Oe=Be([[30,5]]);function Te(e,t,n,r,s){const i=this;i.Ie=e,i.De=t,i.Ve=n,i.Pe=r,i.Re=s}Ue.Be=Ee([0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30,1,17,9,25,5,21,13,29,3,19,11,27,7,23].map(((e,t)=>[e,Oe[t]]))),Ue.Ee=new Ue(Ue.Ae,Ke.ze,257,286,15),Ue.Me=new Ue(Ue.Be,Ke.Ce,0,30,15),Ue.Ke=new Ue(null,Ke.xe,0,19,7);const We=[new Te(0,0,0,0,0),new Te(4,4,8,4,1),new Te(4,5,16,8,1),new Te(4,6,32,32,1),new Te(4,4,16,16,2),new Te(8,16,32,32,2),new Te(8,16,128,128,2),new Te(8,32,128,256,2),new Te(32,128,258,1024,2),new Te(32,258,258,4096,2)],je=[\"need dictionary\",\"stream end\",\"\",\"\",\"stream error\",\"data error\",\"\",\"buffer error\",\"\",\"\"],He=113,Le=666,Fe=262;function qe(e,t,n,r){const s=e[2*t],i=e[2*n];return i>s||s==i&&r[t]<=r[n]}function Ge(){const e=this;let t,n,s,c,f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z,C,x,_,A,I,D,V,P,R,B,E,M,K;const U=new Ke,N=new Ke,O=new Ke;let T,W,j,H,L,F;function q(){let t;for(t=0;286>t;t++)E[2*t]=0;for(t=0;30>t;t++)M[2*t]=0;for(t=0;19>t;t++)K[2*t]=0;E[512]=1,e.ue=e.we=0,W=j=0}function G(e,t){let n,r=-1,s=e[1],i=0,o=7,c=4;0===s&&(o=138,c=3),e[2*(t+1)+1]=65535;for(let f=0;t>=f;f++)n=s,s=e[2*(f+1)+1],++ii?K[2*n]+=i:0!==n?(n!=r&&K[2*n]++,K[32]++):i>10?K[36]++:K[34]++,i=0,r=n,0===s?(o=138,c=3):n==s?(o=6,c=3):(o=7,c=4))}function J(t){e.Ue[e.pending++]=t}function Q(e){J(255&e),J(e>>>8&255)}function X(e,t){let n;const r=t;F>16-r?(n=e,L|=n<>>16-F,F+=r-16):(L|=e<=n;n++)if(r=i,i=e[2*(n+1)+1],++o>=c||r!=i){if(f>o)do{Y(r,K)}while(0!=--o);else 0!==r?(r!=s&&(Y(r,K),o--),Y(16,K),X(o-3,2)):o>10?(Y(18,K),X(o-11,7)):(Y(17,K),X(o-3,3));o=0,s=r,0===i?(c=138,f=3):r==i?(c=6,f=3):(c=7,f=4)}}function $(){16==F?(Q(L),L=0,F=0):8>F||(J(255&L),L>>>=8,F-=8)}function ee(t,n){let s,i,o;if(e.Ne[W]=t,e.Oe[W]=255&n,W++,0===t?E[2*n]++:(j++,t--,E[2*(Ke.ge[n]+256+1)]++,M[2*Ke.Se(t)]++),0==(8191&W)&&V>2){for(s=8*W,i=C-k,o=0;30>o;o++)s+=M[2*o]*(5+Ke.Ce[o]);if(s>>>=3,jc);Y(256,t),H=t[513]}function ne(){F>8?Q(L):F>0&&J(255&L),L=0,F=0}function re(t,n,r){X(0+(r?1:0),3),((t,n)=>{ne(),H=8,Q(n),Q(~n),e.Ue.set(u.subarray(t,t+n),e.pending),e.pending+=n})(t,n)}function se(n){((t,n,r)=>{let s,i,o=0;V>0?(U.ne(e),N.ne(e),o=(()=>{let t;for(G(E,U.he),G(M,N.he),O.ne(e),t=18;t>=3&&0===K[2*Ke._e[t]+1];t--);return e.ue+=14+3*(t+1),t})(),s=e.ue+3+7>>>3,i=e.we+3+7>>>3,i>s||(s=i)):s=i=n+5,n+4>s||-1==t?i==s?(X(2+(r?1:0),3),te(Ue.Ae,Ue.Be)):(X(4+(r?1:0),3),((e,t,n)=>{let r;for(X(e-257,5),X(t-1,5),X(n-4,4),r=0;n>r;r++)X(K[2*Ke._e[r]+1],3);Z(E,e-1),Z(M,t-1)})(U.he+1,N.he+1,o+1),te(E,M)):re(t,n,r),q(),r&&ne()})(0>k?-1:k,C-k,n),k=C,t.Te()}function ie(){let e,n,r,s;do{if(s=w-_-C,0===s&&0===C&&0===_)s=f;else if(-1==s)s--;else if(C>=f+f-Fe){u.set(u.subarray(f,f+f),0),x-=f,C-=f,k-=f,e=y,r=e;do{n=65535&d[--r],d[r]=f>n?0:n-f}while(0!=--e);e=f,r=e;do{n=65535&h[--r],h[r]=f>n?0:n-f}while(0!=--e);s+=f}if(0===t.We)return;e=t.je(u,C+_,s),_+=e,3>_||(p=255&u[C],p=(p<_&&0!==t.We)}function oe(e){let t,n,r=I,s=C,i=A;const o=C>f-Fe?C-(f-Fe):0;let c=B;const a=l,w=C+258;let d=u[s+i-1],p=u[s+i];R>A||(r>>=2),c>_&&(c=_);do{if(t=e,u[t+i]==p&&u[t+i-1]==d&&u[t]==u[s]&&u[++t]==u[s+1]){s+=2,t++;do{}while(u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&w>s);if(n=258-(w-s),s=w-258,n>i){if(x=e,i=n,n>=c)break;d=u[s+i-1],p=u[s+i]}}}while((e=65535&h[e&a])>o&&0!=--r);return i>_?_:i}e.le=[],e.be=[],e.ae=[],E=[],M=[],K=[],e.de=(t,n)=>{const r=e.ae,s=r[n];let i=n<<1;for(;i<=e.ce&&(i(W||(W=8),j||(j=8),G||(G=0),t.Le=null,-1==S&&(S=6),1>j||j>9||8!=W||9>x||x>15||0>S||S>9||0>G||G>2?Re:(t.Fe=e,a=x,f=1<(t.qe=t.Ge=0,t.Le=null,e.pending=0,e.Je=0,n=He,c=0,U.re=E,U.ie=Ue.Ee,N.re=M,N.ie=Ue.Me,O.re=K,O.ie=Ue.Ke,L=0,F=0,H=8,q(),(()=>{w=2*f,d[y-1]=0;for(let e=0;y-1>e;e++)d[e]=0;D=We[V].De,R=We[V].Ie,B=We[V].Ve,I=We[V].Pe,C=0,k=0,_=0,v=A=2,z=0,p=0})(),0))(t))),e.Qe=()=>42!=n&&n!=He&&n!=Le?Re:(e.Oe=null,e.Ne=null,e.Ue=null,d=null,h=null,u=null,e.Fe=null,n==He?-3:0),e.Xe=(e,t,n)=>{let r=0;return-1==t&&(t=6),0>t||t>9||0>n||n>2?Re:(We[V].Re!=We[t].Re&&0!==e.qe&&(r=e.Ye(1)),V!=t&&(V=t,D=We[V].De,R=We[V].Ie,B=We[V].Ve,I=We[V].Pe),P=n,r)},e.Ze=(e,t,r)=>{let s,i=r,o=0;if(!t||42!=n)return Re;if(3>i)return 0;for(i>f-Fe&&(i=f-Fe,o=r-i),u.set(t.subarray(o,o+i),0),C=i,k=i,p=255&u[0],p=(p<=s;s++)p=(p<{let o,w,m,I,R;if(i>4||0>i)return Re;if(!r.$e||!r.et&&0!==r.We||n==Le&&4!=i)return r.Le=je[4],Re;if(0===r.tt)return r.Le=je[7],-5;var B;if(t=r,I=c,c=i,42==n&&(w=8+(a-8<<4)<<8,m=(V-1&255)>>1,m>3&&(m=3),w|=m<<6,0!==C&&(w|=32),w+=31-w%31,n=He,J((B=w)>>8&255),J(255&B)),0!==e.pending){if(t.Te(),0===t.tt)return c=-1,0}else if(0===t.We&&I>=i&&4!=i)return t.Le=je[7],-5;if(n==Le&&0!==t.We)return r.Le=je[7],-5;if(0!==t.We||0!==_||0!=i&&n!=Le){switch(R=-1,We[V].Re){case 0:R=(e=>{let n,r=65535;for(r>s-5&&(r=s-5);;){if(1>=_){if(ie(),0===_&&0==e)return 0;if(0===_)break}if(C+=_,_=0,n=k+r,(0===C||C>=n)&&(_=C-n,C=n,se(!1),0===t.tt))return 0;if(C-k>=f-Fe&&(se(!1),0===t.tt))return 0}return se(4==e),0===t.tt?4==e?2:0:4==e?3:1})(i);break;case 1:R=(e=>{let n,r=0;for(;;){if(Fe>_){if(ie(),Fe>_&&0==e)return 0;if(0===_)break}if(3>_||(p=(p<f-Fe||2!=P&&(v=oe(r)),3>v)n=ee(0,255&u[C]),_--,C++;else if(n=ee(C-x,v-3),_-=v,v>D||3>_)C+=v,v=0,p=255&u[C],p=(p<{let n,r,s=0;for(;;){if(Fe>_){if(ie(),Fe>_&&0==e)return 0;if(0===_)break}if(3>_||(p=(p<A&&f-Fe>=(C-s&65535)&&(2!=P&&(v=oe(s)),5>=v&&(1==P||3==v&&C-x>4096)&&(v=2)),3>A||v>A)if(0!==z){if(n=ee(0,255&u[C-1]),n&&se(!1),C++,_--,0===t.tt)return 0}else z=1,C++,_--;else{r=C+_-3,n=ee(C-1-S,A-3),_-=A-1,A-=2;do{++C>r||(p=(p<1+H+10-F&&(X(2,3),Y(256,Ue.Ae),$()),H=7;else if(re(0,0,!1),3==i)for(o=0;y>o;o++)d[o]=0;if(t.Te(),0===t.tt)return c=-1,0}}return 4!=i?0:1}}function Je(){const e=this;e.nt=0,e.rt=0,e.We=0,e.qe=0,e.tt=0,e.Ge=0}function Qe(e){const t=new Je,n=(o=e&&e.chunkSize?e.chunkSize:65536)+5*(r.floor(o/16383)+1);var o;const c=new i(n);let f=e?e.level:-1;void 0===f&&(f=-1),t.He(f),t.$e=c,this.append=(e,r)=>{let o,f,a=0,l=0,u=0;const w=[];if(e.length){t.nt=0,t.et=e,t.We=e.length;do{if(t.rt=0,t.tt=n,o=t.Ye(0),0!=o)throw new s(\"deflating: \"+t.Le);t.rt&&(t.rt==n?w.push(new i(c)):w.push(c.slice(0,t.rt))),u+=t.rt,r&&t.nt>0&&t.nt!=a&&(r(t.nt),a=t.nt)}while(t.We>0||0===t.tt);return w.length>1?(f=new i(u),w.forEach((e=>{f.set(e,l),l+=e.length}))):f=w[0]||new i,f}},this.flush=()=>{let e,r,o=0,f=0;const a=[];do{if(t.rt=0,t.tt=n,e=t.Ye(4),1!=e&&0!=e)throw new s(\"deflating: \"+t.Le);n-t.tt>0&&a.push(c.slice(0,t.rt)),f+=t.rt}while(t.We>0||0===t.tt);return t.Qe(),r=new i(f),a.forEach((e=>{r.set(e,o),o+=e.length})),r}}Je.prototype={He(e,t){const n=this;return n.Fe=new Ge,t||(t=15),n.Fe.He(n,e,t)},Ye(e){const t=this;return t.Fe?t.Fe.Ye(t,e):Re},Qe(){const e=this;if(!e.Fe)return Re;const t=e.Fe.Qe();return e.Fe=null,t},Xe(e,t){const n=this;return n.Fe?n.Fe.Xe(n,e,t):Re},Ze(e,t){const n=this;return n.Fe?n.Fe.Ze(n,e,t):Re},je(e,t,n){const r=this;let s=r.We;return s>n&&(s=n),0===s?0:(r.We-=s,e.set(r.et.subarray(r.nt,r.nt+s),t),r.nt+=s,r.qe+=s,s)},Te(){const e=this;let t=e.Fe.pending;t>e.tt&&(t=e.tt),0!==t&&(e.$e.set(e.Fe.Ue.subarray(e.Fe.Je,e.Fe.Je+t),e.rt),e.rt+=t,e.Fe.Je+=t,e.Ge+=t,e.tt-=t,e.Fe.pending-=t,0===e.Fe.pending&&(e.Fe.Je=0))}};const Xe=-2,Ye=-3,Ze=-5,$e=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],et=[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],tt=[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],nt=[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],rt=[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],st=[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],it=[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 ot(){let e,t,n,r,s,i;function o(e,t,o,c,f,a,l,u,w,h,d){let p,y,m,b,g,k,v,S,z,C,x,_,A,I,D;C=0,g=o;do{n[e[t+C]]++,C++,g--}while(0!==g);if(n[0]==o)return l[0]=-1,u[0]=0,0;for(S=u[0],k=1;15>=k&&0===n[k];k++);for(v=k,k>S&&(S=k),g=15;0!==g&&0===n[g];g--);for(m=g,S>g&&(S=g),u[0]=S,I=1<k;k++,I<<=1)if(0>(I-=n[k]))return Ye;if(0>(I-=n[g]))return Ye;for(n[g]+=I,i[1]=k=0,C=1,A=2;0!=--g;)i[A]=k+=n[C],A++,C++;g=0,C=0;do{0!==(k=e[t+C])&&(d[i[k]++]=g),C++}while(++g=v;v++)for(p=n[v];0!=p--;){for(;v>_+S;){if(b++,_+=S,D=m-_,D=D>S?S:D,(y=1<<(k=v-_))>p+1&&(y-=p+1,A=v,D>k))for(;++kn[++A];)y-=n[A];if(D=1<1440)return Ye;s[b]=x=h[0],h[0]+=D,0!==b?(i[b]=g,r[0]=k,r[1]=S,k=g>>>_-S,r[2]=x-s[b-1]-k,w.set(r,3*(s[b-1]+k))):l[0]=x}for(r[1]=v-_,o>C?d[C]d[C]?0:96,r[2]=d[C++]):(r[0]=a[d[C]-c]+16+64,r[2]=f[d[C++]-c]):r[0]=192,y=1<>>_;D>k;k+=y)w.set(r,3*(x+k));for(k=1<>>=1)g^=k;for(g^=k,z=(1<<_)-1;(g&z)!=i[b];)b--,_-=S,z=(1<<_)-1}return 0!==I&&1!=m?Ze:0}function c(o){let c;for(e||(e=[],t=[],n=new f(16),r=[],s=new f(15),i=new f(16)),t.lengthc;c++)t[c]=0;for(c=0;16>c;c++)n[c]=0;for(c=0;3>c;c++)r[c]=0;s.set(n.subarray(0,15),0),i.set(n.subarray(0,16),0)}this.st=(n,r,s,i,f)=>{let a;return c(19),e[0]=0,a=o(n,0,19,19,null,null,s,r,i,e,t),a==Ye?f.Le=\"oversubscribed dynamic bit lengths tree\":a!=Ze&&0!==r[0]||(f.Le=\"incomplete dynamic bit lengths tree\",a=Ye),a},this.it=(n,r,s,i,f,a,l,u,w)=>{let h;return c(288),e[0]=0,h=o(s,0,n,257,nt,rt,a,i,u,e,t),0!=h||0===i[0]?(h==Ye?w.Le=\"oversubscribed literal/length tree\":-4!=h&&(w.Le=\"incomplete literal/length tree\",h=Ye),h):(c(288),h=o(s,n,r,0,st,it,l,f,u,e,t),0!=h||0===f[0]&&n>257?(h==Ye?w.Le=\"oversubscribed distance tree\":h==Ze?(w.Le=\"incomplete distance tree\",h=Ye):-4!=h&&(w.Le=\"empty distance tree with lengths\",h=Ye),h):0)}}function ct(){const e=this;let t,n,r,s,i=0,o=0,c=0,f=0,a=0,l=0,u=0,w=0,h=0,d=0;function p(e,t,n,r,s,i,o,c){let f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z;d=c.nt,p=c.We,w=o.ot,h=o.ct,y=o.write,m=yh;)p--,w|=(255&c.ft(d++))<>=a[z+1],h-=a[z+1],0!=(16&u)){for(u&=15,k=a[z+2]+(w&$e[u]),w>>=u,h-=u;15>h;)p--,w|=(255&c.ft(d++))<>=a[z+1],h-=a[z+1],0!=(16&u)){for(u&=15;u>h;)p--,w|=(255&c.ft(d++))<>=u,h-=u,m-=k,v>y){S=y-v;do{S+=o.end}while(0>S);if(u=o.end-S,k>u){if(k-=u,y-S>0&&u>y-S)do{o.lt[y++]=o.lt[S++]}while(0!=--u);else o.lt.set(o.lt.subarray(S,S+u),y),y+=u,S+=u,u=0;S=0}}else S=y-v,y-S>0&&2>y-S?(o.lt[y++]=o.lt[S++],o.lt[y++]=o.lt[S++],k-=2):(o.lt.set(o.lt.subarray(S,S+2),y),y+=2,S+=2,k-=2);if(y-S>0&&k>y-S)do{o.lt[y++]=o.lt[S++]}while(0!=--k);else o.lt.set(o.lt.subarray(S,S+k),y),y+=k,S+=k,k=0;break}if(0!=(64&u))return c.Le=\"invalid distance code\",k=c.We-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ot=w,o.ct=h,c.We=p,c.qe+=d-c.nt,c.nt=d,o.write=y,Ye;f+=a[z+2],f+=w&$e[u],z=3*(l+f),u=a[z]}break}if(0!=(64&u))return 0!=(32&u)?(k=c.We-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ot=w,o.ct=h,c.We=p,c.qe+=d-c.nt,c.nt=d,o.write=y,1):(c.Le=\"invalid literal/length code\",k=c.We-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ot=w,o.ct=h,c.We=p,c.qe+=d-c.nt,c.nt=d,o.write=y,Ye);if(f+=a[z+2],f+=w&$e[u],z=3*(l+f),0===(u=a[z])){w>>=a[z+1],h-=a[z+1],o.lt[y++]=a[z+2],m--;break}}else w>>=a[z+1],h-=a[z+1],o.lt[y++]=a[z+2],m--}while(m>=258&&p>=10);return k=c.We-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ot=w,o.ct=h,c.We=p,c.qe+=d-c.nt,c.nt=d,o.write=y,0}e.init=(e,i,o,c,f,a)=>{t=0,u=e,w=i,r=o,h=c,s=f,d=a,n=null},e.ut=(e,y,m)=>{let b,g,k,v,S,z,C,x=0,_=0,A=0;for(A=y.nt,v=y.We,x=e.ot,_=e.ct,S=e.write,z=S=258&&v>=10&&(e.ot=x,e.ct=_,y.We=v,y.qe+=A-y.nt,y.nt=A,e.write=S,m=p(u,w,r,h,s,d,e,y),A=y.nt,v=y.We,x=e.ot,_=e.ct,S=e.write,z=S_;){if(0===v)return e.ot=x,e.ct=_,y.We=v,y.qe+=A-y.nt,y.nt=A,e.write=S,e.wt(y,m);m=0,v--,x|=(255&y.ft(A++))<<_,_+=8}if(g=3*(o+(x&$e[b])),x>>>=n[g+1],_-=n[g+1],k=n[g],0===k){f=n[g+2],t=6;break}if(0!=(16&k)){a=15&k,i=n[g+2],t=2;break}if(0==(64&k)){c=k,o=g/3+n[g+2];break}if(0!=(32&k)){t=7;break}return t=9,y.Le=\"invalid literal/length code\",m=Ye,e.ot=x,e.ct=_,y.We=v,y.qe+=A-y.nt,y.nt=A,e.write=S,e.wt(y,m);case 2:for(b=a;b>_;){if(0===v)return e.ot=x,e.ct=_,y.We=v,y.qe+=A-y.nt,y.nt=A,e.write=S,e.wt(y,m);m=0,v--,x|=(255&y.ft(A++))<<_,_+=8}i+=x&$e[b],x>>=b,_-=b,c=w,n=s,o=d,t=3;case 3:for(b=c;b>_;){if(0===v)return e.ot=x,e.ct=_,y.We=v,y.qe+=A-y.nt,y.nt=A,e.write=S,e.wt(y,m);m=0,v--,x|=(255&y.ft(A++))<<_,_+=8}if(g=3*(o+(x&$e[b])),x>>=n[g+1],_-=n[g+1],k=n[g],0!=(16&k)){a=15&k,l=n[g+2],t=4;break}if(0==(64&k)){c=k,o=g/3+n[g+2];break}return t=9,y.Le=\"invalid distance code\",m=Ye,e.ot=x,e.ct=_,y.We=v,y.qe+=A-y.nt,y.nt=A,e.write=S,e.wt(y,m);case 4:for(b=a;b>_;){if(0===v)return e.ot=x,e.ct=_,y.We=v,y.qe+=A-y.nt,y.nt=A,e.write=S,e.wt(y,m);m=0,v--,x|=(255&y.ft(A++))<<_,_+=8}l+=x&$e[b],x>>=b,_-=b,t=5;case 5:for(C=S-l;0>C;)C+=e.end;for(;0!==i;){if(0===z&&(S==e.end&&0!==e.read&&(S=0,z=S7&&(_-=8,v++,A--),e.write=S,m=e.wt(y,m),S=e.write,z=S{}}ot.dt=(e,t,n,r)=>(e[0]=9,t[0]=5,n[0]=et,r[0]=tt,0);const ft=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function at(e,t){const n=this;let r,s=0,o=0,c=0,a=0;const l=[0],u=[0],w=new ct;let h=0,d=new f(4320);const p=new ot;n.ct=0,n.ot=0,n.lt=new i(t),n.end=t,n.read=0,n.write=0,n.reset=(e,t)=>{t&&(t[0]=0),6==s&&w.ht(e),s=0,n.ct=0,n.ot=0,n.read=n.write=0},n.reset(e,null),n.wt=(e,t)=>{let r,s,i;return s=e.rt,i=n.read,r=(i>n.write?n.end:n.write)-i,r>e.tt&&(r=e.tt),0!==r&&t==Ze&&(t=0),e.tt-=r,e.Ge+=r,e.$e.set(n.lt.subarray(i,i+r),s),s+=r,i+=r,i==n.end&&(i=0,n.write==n.end&&(n.write=0),r=n.write-i,r>e.tt&&(r=e.tt),0!==r&&t==Ze&&(t=0),e.tt-=r,e.Ge+=r,e.$e.set(n.lt.subarray(i,i+r),s),s+=r,i+=r),e.rt=s,n.read=i,t},n.ut=(e,t)=>{let i,f,y,m,b,g,k,v;for(m=e.nt,b=e.We,f=n.ot,y=n.ct,g=n.write,k=gy;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<>>1){case 0:f>>>=3,y-=3,i=7&y,f>>>=i,y-=i,s=1;break;case 1:S=[],z=[],C=[[]],x=[[]],ot.dt(S,z,C,x),w.init(S[0],z[0],C[0],0,x[0],0),f>>>=3,y-=3,s=6;break;case 2:f>>>=3,y-=3,s=3;break;case 3:return f>>>=3,y-=3,s=9,e.Le=\"invalid block type\",t=Ye,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t)}break;case 1:for(;32>y;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<>>16&65535)!=(65535&f))return s=9,e.Le=\"invalid stored block lengths\",t=Ye,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);o=65535&f,f=y=0,s=0!==o?2:0!==h?7:0;break;case 2:if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);if(0===k&&(g==n.end&&0!==n.read&&(g=0,k=gb&&(i=b),i>k&&(i=k),n.lt.set(e.je(m,i),g),m+=i,b-=i,g+=i,k-=i,0!=(o-=i))break;s=0!==h?7:0;break;case 3:for(;14>y;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<29||(i>>5&31)>29)return s=9,e.Le=\"too many length or distance symbols\",t=Ye,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);if(i=258+(31&i)+(i>>5&31),!r||r.lengthv;v++)r[v]=0;f>>>=14,y-=14,a=0,s=4;case 4:for(;4+(c>>>10)>a;){for(;3>y;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<>>=3,y-=3}for(;19>a;)r[ft[a++]]=0;if(l[0]=7,i=p.st(r,l,u,d,e),0!=i)return(t=i)==Ye&&(r=null,s=9),n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);a=0,s=5;case 5:for(;i=c,258+(31&i)+(i>>5&31)>a;){let o,w;for(i=l[0];i>y;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<w)f>>>=i,y-=i,r[a++]=w;else{for(v=18==w?7:w-14,o=18==w?11:3;i+v>y;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<>>=i,y-=i,o+=f&$e[v],f>>>=v,y-=v,v=a,i=c,v+o>258+(31&i)+(i>>5&31)||16==w&&1>v)return r=null,s=9,e.Le=\"invalid bit length repeat\",t=Ye,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);w=16==w?r[v-1]:0;do{r[v++]=w}while(0!=--o);a=v}}if(u[0]=-1,_=[],A=[],I=[],D=[],_[0]=9,A[0]=6,i=c,i=p.it(257+(31&i),1+(i>>5&31),r,_,A,I,D,d,e),0!=i)return i==Ye&&(r=null,s=9),t=i,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);w.init(_[0],A[0],d,I[0],d,D[0]),s=6;case 6:if(n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,1!=(t=w.ut(n,e,t)))return n.wt(e,t);if(t=0,w.ht(e),m=e.nt,b=e.We,f=n.ot,y=n.ct,g=n.write,k=g{n.reset(e,null),n.lt=null,d=null},n.yt=(e,t,r)=>{n.lt.set(e.subarray(t,t+r),0),n.read=n.write=r},n.bt=()=>1==s?1:0}const lt=13,ut=[0,0,255,255];function wt(){const e=this;function t(e){return e&&e.gt?(e.qe=e.Ge=0,e.Le=null,e.gt.mode=7,e.gt.kt.reset(e,null),0):Xe}e.mode=0,e.method=0,e.vt=[0],e.St=0,e.marker=0,e.zt=0,e.Ct=t=>(e.kt&&e.kt.ht(t),e.kt=null,0),e.xt=(n,r)=>(n.Le=null,e.kt=null,8>r||r>15?(e.Ct(n),Xe):(e.zt=r,n.gt.kt=new at(n,1<{let n,r;if(!e||!e.gt||!e.et)return Xe;const s=e.gt;for(t=4==t?Ze:0,n=Ze;;)switch(s.mode){case 0:if(0===e.We)return n;if(n=t,e.We--,e.qe++,8!=(15&(s.method=e.ft(e.nt++)))){s.mode=lt,e.Le=\"unknown compression method\",s.marker=5;break}if(8+(s.method>>4)>s.zt){s.mode=lt,e.Le=\"invalid win size\",s.marker=5;break}s.mode=1;case 1:if(0===e.We)return n;if(n=t,e.We--,e.qe++,r=255&e.ft(e.nt++),((s.method<<8)+r)%31!=0){s.mode=lt,e.Le=\"incorrect header check\",s.marker=5;break}if(0==(32&r)){s.mode=7;break}s.mode=2;case 2:if(0===e.We)return n;n=t,e.We--,e.qe++,s.St=(255&e.ft(e.nt++))<<24&4278190080,s.mode=3;case 3:if(0===e.We)return n;n=t,e.We--,e.qe++,s.St+=(255&e.ft(e.nt++))<<16&16711680,s.mode=4;case 4:if(0===e.We)return n;n=t,e.We--,e.qe++,s.St+=(255&e.ft(e.nt++))<<8&65280,s.mode=5;case 5:return 0===e.We?n:(n=t,e.We--,e.qe++,s.St+=255&e.ft(e.nt++),s.mode=6,2);case 6:return s.mode=lt,e.Le=\"need dictionary\",s.marker=0,Xe;case 7:if(n=s.kt.ut(e,n),n==Ye){s.mode=lt,s.marker=0;break}if(0==n&&(n=t),1!=n)return n;n=t,s.kt.reset(e,s.vt),s.mode=12;case 12:return e.We=0,1;case lt:return Ye;default:return Xe}},e.At=(e,t,n)=>{let r=0,s=n;if(!e||!e.gt||6!=e.gt.mode)return Xe;const i=e.gt;return s<1<{let n,r,s,i,o;if(!e||!e.gt)return Xe;const c=e.gt;if(c.mode!=lt&&(c.mode=lt,c.marker=0),0===(n=e.We))return Ze;for(r=e.nt,s=c.marker;0!==n&&4>s;)e.ft(r)==ut[s]?s++:s=0!==e.ft(r)?0:4-s,r++,n--;return e.qe+=r-e.nt,e.nt=r,e.We=n,c.marker=s,4!=s?Ye:(i=e.qe,o=e.Ge,t(e),e.qe=i,e.Ge=o,c.mode=7,0)},e.Dt=e=>e&&e.gt&&e.gt.kt?e.gt.kt.bt():Xe}function ht(){}function dt(e){const t=new ht,n=e&&e.chunkSize?r.floor(2*e.chunkSize):131072,o=new i(n);let c=!1;t.xt(),t.$e=o,this.append=(e,r)=>{const f=[];let a,l,u=0,w=0,h=0;if(0!==e.length){t.nt=0,t.et=e,t.We=e.length;do{if(t.rt=0,t.tt=n,0!==t.We||c||(t.nt=0,c=!0),a=t._t(0),c&&a===Ze){if(0!==t.We)throw new s(\"inflating: bad input\")}else if(0!==a&&1!==a)throw new s(\"inflating: \"+t.Le);if((c||1===a)&&t.We===e.length)throw new s(\"inflating: bad input\");t.rt&&(t.rt===n?f.push(new i(o)):f.push(o.slice(0,t.rt))),h+=t.rt,r&&t.nt>0&&t.nt!=u&&(r(t.nt),u=t.nt)}while(t.We>0||0===t.tt);return f.length>1?(l=new i(h),f.forEach((e=>{l.set(e,w),w+=e.length}))):l=f[0]||new i,l}},this.flush=()=>{t.Ct()}}ht.prototype={xt(e){const t=this;return t.gt=new wt,e||(e=15),t.gt.xt(t,e)},_t(e){const t=this;return t.gt?t.gt._t(t,e):Xe},Ct(){const e=this;if(!e.gt)return Xe;const t=e.gt.Ct(e);return e.gt=null,t},It(){const e=this;return e.gt?e.gt.It(e):Xe},At(e,t){const n=this;return n.gt?n.gt.At(n,e,t):Xe},ft(e){return this.et[e]},je(e,t){return this.et.subarray(e,e+t)}},self.initCodec=()=>{self.Deflate=Qe,self.Inflate=dt};\\n'],{type:\"text/javascript\"}));e({workerScripts:{inflate:[t],deflate:[t]}})}export{e as configureWebWorker};\n","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global Blob, atob, btoa, XMLHttpRequest, URL, fetch, ReadableStream, WritableStream, FileReader, TransformStream, Response */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tUNDEFINED_VALUE,\n\tFUNCTION_TYPE\n} from \"./constants.js\";\nimport { getConfiguration } from \"./configuration.js\";\n\nconst ERR_HTTP_STATUS = \"HTTP error \";\nconst ERR_HTTP_RANGE = \"HTTP Range not supported\";\nconst ERR_ITERATOR_COMPLETED_TOO_SOON = \"Writer iterator completed too soon\";\n\nconst CONTENT_TYPE_TEXT_PLAIN = \"text/plain\";\nconst HTTP_HEADER_CONTENT_LENGTH = \"Content-Length\";\nconst HTTP_HEADER_CONTENT_RANGE = \"Content-Range\";\nconst HTTP_HEADER_ACCEPT_RANGES = \"Accept-Ranges\";\nconst HTTP_HEADER_RANGE = \"Range\";\nconst HTTP_HEADER_CONTENT_TYPE = \"Content-Type\";\nconst HTTP_METHOD_HEAD = \"HEAD\";\nconst HTTP_METHOD_GET = \"GET\";\nconst HTTP_RANGE_UNIT = \"bytes\";\nconst DEFAULT_CHUNK_SIZE = 64 * 1024;\n\nconst PROPERTY_NAME_WRITABLE = \"writable\";\n\nclass Stream {\n\n\tconstructor() {\n\t\tthis.size = 0;\n\t}\n\n\tinit() {\n\t\tthis.initialized = true;\n\t}\n}\n\nclass Reader extends Stream {\n\n\tget readable() {\n\t\tconst reader = this;\n\t\tconst { chunkSize = DEFAULT_CHUNK_SIZE } = reader;\n\t\tconst readable = new ReadableStream({\n\t\t\tstart() {\n\t\t\t\tthis.chunkOffset = 0;\n\t\t\t},\n\t\t\tasync pull(controller) {\n\t\t\t\tconst { offset = 0, size, diskNumberStart } = readable;\n\t\t\t\tconst { chunkOffset } = this;\n\t\t\t\tcontroller.enqueue(await readUint8Array(reader, offset + chunkOffset, Math.min(chunkSize, size - chunkOffset), diskNumberStart));\n\t\t\t\tif (chunkOffset + chunkSize > size) {\n\t\t\t\t\tcontroller.close();\n\t\t\t\t} else {\n\t\t\t\t\tthis.chunkOffset += chunkSize;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\treturn readable;\n\t}\n}\n\nclass Writer extends Stream {\n\n\tconstructor() {\n\t\tsuper();\n\t\tconst writer = this;\n\t\tconst writable = new WritableStream({\n\t\t\twrite(chunk) {\n\t\t\t\treturn writer.writeUint8Array(chunk);\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(writer, PROPERTY_NAME_WRITABLE, {\n\t\t\tget() {\n\t\t\t\treturn writable;\n\t\t\t}\n\t\t});\n\t}\n\n\twriteUint8Array() {\n\t\t// abstract\n\t}\n}\n\nclass Data64URIReader extends Reader {\n\n\tconstructor(dataURI) {\n\t\tsuper();\n\t\tlet dataEnd = dataURI.length;\n\t\twhile (dataURI.charAt(dataEnd - 1) == \"=\") {\n\t\t\tdataEnd--;\n\t\t}\n\t\tconst dataStart = dataURI.indexOf(\",\") + 1;\n\t\tObject.assign(this, {\n\t\t\tdataURI,\n\t\t\tdataStart,\n\t\t\tsize: Math.floor((dataEnd - dataStart) * 0.75)\n\t\t});\n\t}\n\n\treadUint8Array(offset, length) {\n\t\tconst {\n\t\t\tdataStart,\n\t\t\tdataURI\n\t\t} = this;\n\t\tconst dataArray = new Uint8Array(length);\n\t\tconst start = Math.floor(offset / 3) * 4;\n\t\tconst bytes = atob(dataURI.substring(start + dataStart, Math.ceil((offset + length) / 3) * 4 + dataStart));\n\t\tconst delta = offset - Math.floor(start / 4) * 3;\n\t\tfor (let indexByte = delta; indexByte < delta + length; indexByte++) {\n\t\t\tdataArray[indexByte - delta] = bytes.charCodeAt(indexByte);\n\t\t}\n\t\treturn dataArray;\n\t}\n}\n\nclass Data64URIWriter extends Writer {\n\n\tconstructor(contentType) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\tdata: \"data:\" + (contentType || \"\") + \";base64,\",\n\t\t\tpending: []\n\t\t});\n\t}\n\n\twriteUint8Array(array) {\n\t\tconst writer = this;\n\t\tlet indexArray = 0;\n\t\tlet dataString = writer.pending;\n\t\tconst delta = writer.pending.length;\n\t\twriter.pending = \"\";\n\t\tfor (indexArray = 0; indexArray < (Math.floor((delta + array.length) / 3) * 3) - delta; indexArray++) {\n\t\t\tdataString += String.fromCharCode(array[indexArray]);\n\t\t}\n\t\tfor (; indexArray < array.length; indexArray++) {\n\t\t\twriter.pending += String.fromCharCode(array[indexArray]);\n\t\t}\n\t\tif (dataString.length > 2) {\n\t\t\twriter.data += btoa(dataString);\n\t\t} else {\n\t\t\twriter.pending = dataString;\n\t\t}\n\t}\n\n\tgetData() {\n\t\treturn this.data + btoa(this.pending);\n\t}\n}\n\nclass BlobReader extends Reader {\n\n\tconstructor(blob) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\tblob,\n\t\t\tsize: blob.size\n\t\t});\n\t}\n\n\tasync readUint8Array(offset, length) {\n\t\tconst reader = this;\n\t\tconst offsetEnd = offset + length;\n\t\tconst blob = offset || offsetEnd < reader.size ? reader.blob.slice(offset, offsetEnd) : reader.blob;\n\t\treturn new Uint8Array(await blob.arrayBuffer());\n\t}\n}\n\nclass BlobWriter extends Stream {\n\n\tconstructor(contentType) {\n\t\tsuper();\n\t\tconst writer = this;\n\t\tconst transformStream = new TransformStream();\n\t\tconst headers = [];\n\t\tif (contentType) {\n\t\t\theaders.push([HTTP_HEADER_CONTENT_TYPE, contentType]);\n\t\t}\n\t\tObject.defineProperty(writer, PROPERTY_NAME_WRITABLE, {\n\t\t\tget() {\n\t\t\t\treturn transformStream.writable;\n\t\t\t}\n\t\t});\n\t\twriter.blob = new Response(transformStream.readable, { headers }).blob();\n\t}\n\n\tgetData() {\n\t\treturn this.blob;\n\t}\n}\n\nclass TextReader extends BlobReader {\n\n\tconstructor(text) {\n\t\tsuper(new Blob([text], { type: CONTENT_TYPE_TEXT_PLAIN }));\n\t}\n}\n\nclass TextWriter extends BlobWriter {\n\n\tconstructor(encoding) {\n\t\tsuper(encoding);\n\t\tObject.assign(this, {\n\t\t\tencoding,\n\t\t\tutf8: !encoding || encoding.toLowerCase() == \"utf-8\"\n\t\t});\n\t}\n\n\tasync getData() {\n\t\tconst {\n\t\t\tencoding,\n\t\t\tutf8\n\t\t} = this;\n\t\tconst blob = await super.getData();\n\t\tif (blob.text && utf8) {\n\t\t\treturn blob.text();\n\t\t} else {\n\t\t\tconst reader = new FileReader();\n\t\t\treturn new Promise((resolve, reject) => {\n\t\t\t\tObject.assign(reader, {\n\t\t\t\t\tonload: ({ target }) => resolve(target.result),\n\t\t\t\t\tonerror: () => reject(reader.error)\n\t\t\t\t});\n\t\t\t\treader.readAsText(blob, encoding);\n\t\t\t});\n\t\t}\n\t}\n}\n\nclass FetchReader extends Reader {\n\n\tconstructor(url, options) {\n\t\tsuper();\n\t\tcreateHtpReader(this, url, options);\n\t}\n\n\tasync init() {\n\t\tawait initHttpReader(this, sendFetchRequest, getFetchRequestData);\n\t\tsuper.init();\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn readUint8ArrayHttpReader(this, index, length, sendFetchRequest, getFetchRequestData);\n\t}\n}\n\nclass XHRReader extends Reader {\n\n\tconstructor(url, options) {\n\t\tsuper();\n\t\tcreateHtpReader(this, url, options);\n\t}\n\n\tasync init() {\n\t\tawait initHttpReader(this, sendXMLHttpRequest, getXMLHttpRequestData);\n\t\tsuper.init();\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn readUint8ArrayHttpReader(this, index, length, sendXMLHttpRequest, getXMLHttpRequestData);\n\t}\n}\n\nfunction createHtpReader(httpReader, url, options) {\n\tconst {\n\t\tpreventHeadRequest,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests\n\t} = options;\n\toptions = Object.assign({}, options);\n\tdelete options.preventHeadRequest;\n\tdelete options.useRangeHeader;\n\tdelete options.forceRangeRequests;\n\tdelete options.useXHR;\n\tObject.assign(httpReader, {\n\t\turl,\n\t\toptions,\n\t\tpreventHeadRequest,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests\n\t});\n}\n\nasync function initHttpReader(httpReader, sendRequest, getRequestData) {\n\tconst {\n\t\turl,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests\n\t} = httpReader;\n\tif (isHttpFamily(url) && (useRangeHeader || forceRangeRequests)) {\n\t\tconst { headers } = await sendRequest(HTTP_METHOD_GET, httpReader, getRangeHeaders(httpReader));\n\t\tif (!forceRangeRequests && headers.get(HTTP_HEADER_ACCEPT_RANGES) != HTTP_RANGE_UNIT) {\n\t\t\tthrow new Error(ERR_HTTP_RANGE);\n\t\t} else {\n\t\t\tlet contentSize;\n\t\t\tconst contentRangeHeader = headers.get(HTTP_HEADER_CONTENT_RANGE);\n\t\t\tif (contentRangeHeader) {\n\t\t\t\tconst splitHeader = contentRangeHeader.trim().split(/\\s*\\/\\s*/);\n\t\t\t\tif (splitHeader.length) {\n\t\t\t\t\tconst headerValue = splitHeader[1];\n\t\t\t\t\tif (headerValue && headerValue != \"*\") {\n\t\t\t\t\t\tcontentSize = Number(headerValue);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (contentSize === UNDEFINED_VALUE) {\n\t\t\t\tawait getContentLength(httpReader, sendRequest, getRequestData);\n\t\t\t} else {\n\t\t\t\thttpReader.size = contentSize;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tawait getContentLength(httpReader, sendRequest, getRequestData);\n\t}\n}\n\nasync function readUint8ArrayHttpReader(httpReader, index, length, sendRequest, getRequestData) {\n\tconst {\n\t\tuseRangeHeader,\n\t\tforceRangeRequests,\n\t\toptions\n\t} = httpReader;\n\tif (useRangeHeader || forceRangeRequests) {\n\t\tconst response = await sendRequest(HTTP_METHOD_GET, httpReader, getRangeHeaders(httpReader, index, length));\n\t\tif (response.status != 206) {\n\t\t\tthrow new Error(ERR_HTTP_RANGE);\n\t\t}\n\t\treturn new Uint8Array(await response.arrayBuffer());\n\t} else {\n\t\tconst { data } = httpReader;\n\t\tif (!data) {\n\t\t\tawait getRequestData(httpReader, options);\n\t\t}\n\t\treturn new Uint8Array(httpReader.data.subarray(index, index + length));\n\t}\n}\n\nfunction getRangeHeaders(httpReader, index = 0, length = 1) {\n\treturn Object.assign({}, getHeaders(httpReader), { [HTTP_HEADER_RANGE]: HTTP_RANGE_UNIT + \"=\" + index + \"-\" + (index + length - 1) });\n}\n\nfunction getHeaders({ options }) {\n\tconst { headers } = options;\n\tif (headers) {\n\t\tif (Symbol.iterator in headers) {\n\t\t\treturn Object.fromEntries(headers);\n\t\t} else {\n\t\t\treturn headers;\n\t\t}\n\t}\n}\n\nasync function getFetchRequestData(httpReader) {\n\tawait getRequestData(httpReader, sendFetchRequest);\n}\n\nasync function getXMLHttpRequestData(httpReader) {\n\tawait getRequestData(httpReader, sendXMLHttpRequest);\n}\n\nasync function getRequestData(httpReader, sendRequest) {\n\tconst response = await sendRequest(HTTP_METHOD_GET, httpReader, getHeaders(httpReader));\n\thttpReader.data = new Uint8Array(await response.arrayBuffer());\n\tif (!httpReader.size) {\n\t\thttpReader.size = httpReader.data.length;\n\t}\n}\n\nasync function getContentLength(httpReader, sendRequest, getRequestData) {\n\tif (httpReader.preventHeadRequest) {\n\t\tawait getRequestData(httpReader, httpReader.options);\n\t} else {\n\t\tconst response = await sendRequest(HTTP_METHOD_HEAD, httpReader, getHeaders(httpReader));\n\t\tconst contentLength = response.headers.get(HTTP_HEADER_CONTENT_LENGTH);\n\t\tif (contentLength) {\n\t\t\thttpReader.size = Number(contentLength);\n\t\t} else {\n\t\t\tawait getRequestData(httpReader, httpReader.options);\n\t\t}\n\t}\n}\n\nasync function sendFetchRequest(method, { options, url }, headers) {\n\tconst response = await fetch(url, Object.assign({}, options, { method, headers }));\n\tif (response.status < 400) {\n\t\treturn response;\n\t} else {\n\t\tthrow response.status == 416 ? new Error(ERR_HTTP_RANGE) : new Error(ERR_HTTP_STATUS + (response.statusText || response.status));\n\t}\n}\n\nfunction sendXMLHttpRequest(method, { url }, headers) {\n\treturn new Promise((resolve, reject) => {\n\t\tconst request = new XMLHttpRequest();\n\t\trequest.addEventListener(\"load\", () => {\n\t\t\tif (request.status < 400) {\n\t\t\t\tconst headers = [];\n\t\t\t\trequest.getAllResponseHeaders().trim().split(/[\\r\\n]+/).forEach(header => {\n\t\t\t\t\tconst splitHeader = header.trim().split(/\\s*:\\s*/);\n\t\t\t\t\tsplitHeader[0] = splitHeader[0].trim().replace(/^[a-z]|-[a-z]/g, value => value.toUpperCase());\n\t\t\t\t\theaders.push(splitHeader);\n\t\t\t\t});\n\t\t\t\tresolve({\n\t\t\t\t\tstatus: request.status,\n\t\t\t\t\tarrayBuffer: () => request.response,\n\t\t\t\t\theaders: new Map(headers)\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\treject(request.status == 416 ? new Error(ERR_HTTP_RANGE) : new Error(ERR_HTTP_STATUS + (request.statusText || request.status)));\n\t\t\t}\n\t\t}, false);\n\t\trequest.addEventListener(\"error\", event => reject(event.detail.error), false);\n\t\trequest.open(method, url);\n\t\tif (headers) {\n\t\t\tfor (const entry of Object.entries(headers)) {\n\t\t\t\trequest.setRequestHeader(entry[0], entry[1]);\n\t\t\t}\n\t\t}\n\t\trequest.responseType = \"arraybuffer\";\n\t\trequest.send();\n\t});\n}\n\nclass HttpReader extends Reader {\n\n\tconstructor(url, options = {}) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\turl,\n\t\t\treader: options.useXHR ? new XHRReader(url, options) : new FetchReader(url, options)\n\t\t});\n\t}\n\n\tset size(value) {\n\t\t// ignored\n\t}\n\n\tget size() {\n\t\treturn this.reader.size;\n\t}\n\n\tasync init() {\n\t\tawait this.reader.init();\n\t\tsuper.init();\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn this.reader.readUint8Array(index, length);\n\t}\n}\n\nclass HttpRangeReader extends HttpReader {\n\n\tconstructor(url, options = {}) {\n\t\toptions.useRangeHeader = true;\n\t\tsuper(url, options);\n\t}\n}\n\n\nclass Uint8ArrayReader extends Reader {\n\n\tconstructor(array) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\tarray,\n\t\t\tsize: array.length\n\t\t});\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn this.array.slice(index, index + length);\n\t}\n}\n\nclass Uint8ArrayWriter extends Writer {\n\n\tinit(initSize = 0) {\n\t\tObject.assign(this, {\n\t\t\toffset: 0,\n\t\t\tarray: new Uint8Array(initSize)\n\t\t});\n\t\tsuper.init();\n\t}\n\n\twriteUint8Array(array) {\n\t\tconst writer = this;\n\t\tif (writer.offset + array.length > writer.array.length) {\n\t\t\tconst previousArray = writer.array;\n\t\t\twriter.array = new Uint8Array(previousArray.length + array.length);\n\t\t\twriter.array.set(previousArray);\n\t\t}\n\t\twriter.array.set(array, writer.offset);\n\t\twriter.offset += array.length;\n\t}\n\n\tgetData() {\n\t\treturn this.array;\n\t}\n}\n\nclass SplitDataReader extends Reader {\n\n\tconstructor(readers) {\n\t\tsuper();\n\t\tthis.readers = readers;\n\t}\n\n\tasync init() {\n\t\tconst reader = this;\n\t\tconst { readers } = reader;\n\t\treader.lastDiskNumber = 0;\n\t\tawait Promise.all(readers.map(async diskReader => {\n\t\t\tawait diskReader.init();\n\t\t\treader.size += diskReader.size;\n\t\t}));\n\t\tsuper.init();\n\t}\n\n\tasync readUint8Array(offset, length, diskNumber = 0) {\n\t\tconst reader = this;\n\t\tconst { readers } = this;\n\t\tlet result;\n\t\tlet currentDiskNumber = diskNumber;\n\t\tif (currentDiskNumber == -1) {\n\t\t\tcurrentDiskNumber = readers.length - 1;\n\t\t}\n\t\tlet currentReaderOffset = offset;\n\t\twhile (currentReaderOffset >= readers[currentDiskNumber].size) {\n\t\t\tcurrentReaderOffset -= readers[currentDiskNumber].size;\n\t\t\tcurrentDiskNumber++;\n\t\t}\n\t\tconst currentReader = readers[currentDiskNumber];\n\t\tconst currentReaderSize = currentReader.size;\n\t\tif (currentReaderOffset + length <= currentReaderSize) {\n\t\t\tresult = await readUint8Array(currentReader, currentReaderOffset, length);\n\t\t} else {\n\t\t\tconst chunkLength = currentReaderSize - currentReaderOffset;\n\t\t\tresult = new Uint8Array(length);\n\t\t\tresult.set(await readUint8Array(currentReader, currentReaderOffset, chunkLength));\n\t\t\tresult.set(await reader.readUint8Array(offset + chunkLength, length - chunkLength, diskNumber), chunkLength);\n\t\t}\n\t\treader.lastDiskNumber = Math.max(currentDiskNumber, reader.lastDiskNumber);\n\t\treturn result;\n\t}\n}\n\nclass SplitDataWriter extends Stream {\n\n\tconstructor(writerGenerator, maxSize = 4294967295) {\n\t\tsuper();\n\t\tconst zipWriter = this;\n\t\tObject.assign(zipWriter, {\n\t\t\tdiskNumber: 0,\n\t\t\tdiskOffset: 0,\n\t\t\tsize: 0,\n\t\t\tmaxSize,\n\t\t\tavailableSize: maxSize\n\t\t});\n\t\tlet diskSourceWriter, diskWritable, diskWriter;\n\t\tconst writable = new WritableStream({\n\t\t\tasync write(chunk) {\n\t\t\t\tconst { availableSize } = zipWriter;\n\t\t\t\tif (!diskWriter) {\n\t\t\t\t\tconst { value, done } = await writerGenerator.next();\n\t\t\t\t\tif (done && !value) {\n\t\t\t\t\t\tthrow new Error(ERR_ITERATOR_COMPLETED_TOO_SOON);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdiskSourceWriter = value;\n\t\t\t\t\t\tdiskSourceWriter.size = 0;\n\t\t\t\t\t\tif (diskSourceWriter.maxSize) {\n\t\t\t\t\t\t\tzipWriter.maxSize = diskSourceWriter.maxSize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tzipWriter.availableSize = zipWriter.maxSize;\n\t\t\t\t\t\tawait initStream(diskSourceWriter);\n\t\t\t\t\t\tdiskWritable = value.writable;\n\t\t\t\t\t\tdiskWriter = diskWritable.getWriter();\n\t\t\t\t\t}\n\t\t\t\t\tawait this.write(chunk);\n\t\t\t\t} else if (chunk.length >= availableSize) {\n\t\t\t\t\tawait writeChunk(chunk.slice(0, availableSize));\n\t\t\t\t\tawait closeDisk();\n\t\t\t\t\tzipWriter.diskOffset += diskSourceWriter.size;\n\t\t\t\t\tzipWriter.diskNumber++;\n\t\t\t\t\tdiskWriter = null;\n\t\t\t\t\tawait this.write(chunk.slice(availableSize));\n\t\t\t\t} else {\n\t\t\t\t\tawait writeChunk(chunk);\n\t\t\t\t}\n\t\t\t},\n\t\t\tasync close() {\n\t\t\t\tawait diskWriter.ready;\n\t\t\t\tawait closeDisk();\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(zipWriter, PROPERTY_NAME_WRITABLE, {\n\t\t\tget() {\n\t\t\t\treturn writable;\n\t\t\t}\n\t\t});\n\n\t\tasync function writeChunk(chunk) {\n\t\t\tconst chunkLength = chunk.length;\n\t\t\tif (chunkLength) {\n\t\t\t\tawait diskWriter.ready;\n\t\t\t\tawait diskWriter.write(chunk);\n\t\t\t\tdiskSourceWriter.size += chunkLength;\n\t\t\t\tzipWriter.size += chunkLength;\n\t\t\t\tzipWriter.availableSize -= chunkLength;\n\t\t\t}\n\t\t}\n\n\t\tasync function closeDisk() {\n\t\t\tdiskWritable.size = diskSourceWriter.size;\n\t\t\tawait diskWriter.close();\n\t\t}\n\t}\n}\n\nfunction isHttpFamily(url) {\n\tconst { baseURL } = getConfiguration();\n\tconst { protocol } = new URL(url, baseURL);\n\treturn protocol == \"http:\" || protocol == \"https:\";\n}\n\nasync function initStream(stream, initSize) {\n\tif (stream.init && !stream.initialized) {\n\t\tawait stream.init(initSize);\n\t}\n}\n\nfunction initReader(reader) {\n\tif (Array.isArray(reader)) {\n\t\treader = new SplitDataReader(reader);\n\t}\n\tif (reader instanceof ReadableStream) {\n\t\treader = {\n\t\t\treadable: reader\n\t\t};\n\t}\n\treturn reader;\n}\n\nfunction initWriter(writer) {\n\tif (writer.writable === UNDEFINED_VALUE && typeof writer.next == FUNCTION_TYPE) {\n\t\twriter = new SplitDataWriter(writer);\n\t}\n\tif (writer instanceof WritableStream) {\n\t\twriter = {\n\t\t\twritable: writer\n\t\t};\n\t}\n\tconst { writable } = writer;\n\tif (writable.size === UNDEFINED_VALUE) {\n\t\twritable.size = 0;\n\t}\n\tconst splitZipFile = writer instanceof SplitDataWriter;\n\tif (!splitZipFile) {\n\t\tObject.assign(writer, {\n\t\t\tdiskNumber: 0,\n\t\t\tdiskOffset: 0,\n\t\t\tavailableSize: Infinity,\n\t\t\tmaxSize: Infinity\n\t\t});\n\t}\n\treturn writer;\n}\n\nfunction readUint8Array(reader, offset, size, diskNumber) {\n\treturn reader.readUint8Array(offset, size, diskNumber);\n}\n\nconst SplitZipReader = SplitDataReader;\nconst SplitZipWriter = SplitDataWriter;\n\nexport {\n\tinitStream,\n\tinitReader,\n\tinitWriter,\n\treadUint8Array,\n\tReader,\n\tWriter,\n\tTextReader,\n\tTextWriter,\n\tData64URIReader,\n\tData64URIWriter,\n\tBlobReader,\n\tBlobWriter,\n\tUint8ArrayReader,\n\tUint8ArrayWriter,\n\tHttpReader,\n\tHttpRangeReader,\n\tSplitZipReader,\n\tSplitZipWriter,\n\tSplitDataReader,\n\tSplitDataWriter,\n\tERR_HTTP_RANGE,\n\tERR_ITERATOR_COMPLETED_TOO_SOON\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TextDecoder */\n\nconst CP437 = \"\\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\\\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ \".split(\"\");\nconst VALID_CP437 = CP437.length == 256;\n\nexport {\n\tdecodeCP437\n};\n\nfunction decodeCP437(stringValue) {\n\tif (VALID_CP437) {\n\t\tlet result = \"\";\n\t\tfor (let indexCharacter = 0; indexCharacter < stringValue.length; indexCharacter++) {\n\t\t\tresult += CP437[stringValue[indexCharacter]];\n\t\t}\n\t\treturn result;\n\t} else {\n\t\treturn new TextDecoder().decode(stringValue);\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TextDecoder */\n\nimport { decodeCP437 } from \"./cp437-decode.js\";\n\nexport {\n\tdecodeText\n};\n\nfunction decodeText(value, encoding) {\n\tif (encoding && encoding.trim().toLowerCase() == \"cp437\") {\n\t\treturn decodeCP437(value);\n\t} else {\n\t\treturn new TextDecoder(encoding).decode(value);\n\t}\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nconst PROPERTY_NAME_FILENAME = \"filename\";\nconst PROPERTY_NAME_RAW_FILENAME = \"rawFilename\";\nconst PROPERTY_NAME_COMMENT = \"comment\";\nconst PROPERTY_NAME_RAW_COMMENT = \"rawComment\";\nconst PROPERTY_NAME_UNCOMPPRESSED_SIZE = \"uncompressedSize\";\nconst PROPERTY_NAME_COMPPRESSED_SIZE = \"compressedSize\";\nconst PROPERTY_NAME_OFFSET = \"offset\";\nconst PROPERTY_NAME_DISK_NUMBER_START = \"diskNumberStart\";\nconst PROPERTY_NAME_LAST_MODIFICATION_DATE = \"lastModDate\";\nconst PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE = \"rawLastModDate\";\nconst PROPERTY_NAME_LAST_ACCESS_DATE = \"lastAccessDate\";\nconst PROPERTY_NAME_RAW_LAST_ACCESS_DATE = \"rawLastAccessDate\";\nconst PROPERTY_NAME_CREATION_DATE = \"creationDate\";\nconst PROPERTY_NAME_RAW_CREATION_DATE = \"rawCreationDate\";\nconst PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE = \"internalFileAttribute\";\nconst PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE = \"externalFileAttribute\";\nconst PROPERTY_NAME_MS_DOS_COMPATIBLE = \"msDosCompatible\";\nconst PROPERTY_NAME_ZIP64 = \"zip64\";\n\nconst PROPERTY_NAMES = [\n\tPROPERTY_NAME_FILENAME, PROPERTY_NAME_RAW_FILENAME, PROPERTY_NAME_COMPPRESSED_SIZE, PROPERTY_NAME_UNCOMPPRESSED_SIZE,\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE, PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE, PROPERTY_NAME_COMMENT, PROPERTY_NAME_RAW_COMMENT,\n\tPROPERTY_NAME_LAST_ACCESS_DATE, PROPERTY_NAME_CREATION_DATE, PROPERTY_NAME_OFFSET, PROPERTY_NAME_DISK_NUMBER_START,\n\tPROPERTY_NAME_DISK_NUMBER_START, PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE, PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_MS_DOS_COMPATIBLE, PROPERTY_NAME_ZIP64,\n\t\"directory\", \"bitFlag\", \"encrypted\", \"signature\", \"filenameUTF8\", \"commentUTF8\", \"compressionMethod\", \"version\", \"versionMadeBy\",\n\t\"extraField\", \"rawExtraField\", \"extraFieldZip64\", \"extraFieldUnicodePath\", \"extraFieldUnicodeComment\", \"extraFieldAES\", \"extraFieldNTFS\",\n\t\"extraFieldExtendedTimestamp\"];\n\nclass Entry {\n\n\tconstructor(data) {\n\t\tPROPERTY_NAMES.forEach(name => this[name] = data[name]);\n\t}\n\n}\n\nexport {\n\tPROPERTY_NAME_FILENAME,\n\tPROPERTY_NAME_RAW_FILENAME,\n\tPROPERTY_NAME_COMMENT,\n\tPROPERTY_NAME_RAW_COMMENT,\n\tPROPERTY_NAME_UNCOMPPRESSED_SIZE,\n\tPROPERTY_NAME_COMPPRESSED_SIZE,\n\tPROPERTY_NAME_OFFSET,\n\tPROPERTY_NAME_DISK_NUMBER_START,\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_RAW_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_RAW_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_CREATION_DATE,\n\tPROPERTY_NAME_RAW_CREATION_DATE,\n\tPROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_MS_DOS_COMPATIBLE,\n\tPROPERTY_NAME_ZIP64,\n\tEntry\n};","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global BigInt, Response, WritableStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tMAX_32_BITS,\n\tMAX_16_BITS,\n\tCOMPRESSION_METHOD_DEFLATE,\n\tCOMPRESSION_METHOD_STORE,\n\tCOMPRESSION_METHOD_AES,\n\tSPLIT_ZIP_FILE_SIGNATURE,\n\tLOCAL_FILE_HEADER_SIGNATURE,\n\tCENTRAL_FILE_HEADER_SIGNATURE,\n\tEND_OF_CENTRAL_DIR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_SIGNATURE,\n\tEXTRAFIELD_TYPE_ZIP64,\n\tEXTRAFIELD_TYPE_UNICODE_PATH,\n\tEXTRAFIELD_TYPE_UNICODE_COMMENT,\n\tEXTRAFIELD_TYPE_AES,\n\tEXTRAFIELD_TYPE_NTFS,\n\tEXTRAFIELD_TYPE_NTFS_TAG1,\n\tEXTRAFIELD_TYPE_EXTENDED_TIMESTAMP,\n\tEND_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LENGTH,\n\tBITFLAG_ENCRYPTED,\n\tBITFLAG_LEVEL,\n\tBITFLAG_DATA_DESCRIPTOR,\n\tBITFLAG_LANG_ENCODING_FLAG,\n\tFILE_ATTR_MSDOS_DIR_MASK,\n\tDIRECTORY_SIGNATURE,\n\tUNDEFINED_VALUE\n} from \"./constants.js\";\nimport {\n\tgetConfiguration,\n\tgetChunkSize\n} from \"./configuration.js\";\nimport {\n\trunWorker,\n\tCODEC_INFLATE,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD,\n\tERR_ABORT_CHECK_PASSWORD\n} from \"./codec-pool.js\";\nimport {\n\tinitStream,\n\tinitReader,\n\tinitWriter,\n\treadUint8Array,\n\tBlobReader\n} from \"./io.js\";\nimport { decodeText } from \"./util/decode-text.js\";\nimport { Crc32 } from \"./streams/codecs/crc32.js\";\nimport {\n\tPROPERTY_NAME_RAW_FILENAME,\n\tPROPERTY_NAME_FILENAME,\n\tPROPERTY_NAME_RAW_COMMENT,\n\tPROPERTY_NAME_COMMENT,\n\tPROPERTY_NAME_UNCOMPPRESSED_SIZE,\n\tPROPERTY_NAME_COMPPRESSED_SIZE,\n\tPROPERTY_NAME_OFFSET,\n\tPROPERTY_NAME_DISK_NUMBER_START,\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_RAW_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_RAW_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_CREATION_DATE,\n\tPROPERTY_NAME_RAW_CREATION_DATE,\n\tEntry\n} from \"./zip-entry.js\";\n\nconst ERR_BAD_FORMAT = \"File format is not recognized\";\nconst ERR_EOCDR_NOT_FOUND = \"End of central directory not found\";\nconst ERR_EOCDR_ZIP64_NOT_FOUND = \"End of Zip64 central directory not found\";\nconst ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND = \"End of Zip64 central directory locator not found\";\nconst ERR_CENTRAL_DIRECTORY_NOT_FOUND = \"Central directory header not found\";\nconst ERR_LOCAL_FILE_HEADER_NOT_FOUND = \"Local file header not found\";\nconst ERR_EXTRAFIELD_ZIP64_NOT_FOUND = \"Zip64 extra field not found\";\nconst ERR_ENCRYPTED = \"File contains encrypted entry\";\nconst ERR_UNSUPPORTED_ENCRYPTION = \"Encryption method not supported\";\nconst ERR_UNSUPPORTED_COMPRESSION = \"Compression method not supported\";\nconst ERR_SPLIT_ZIP_FILE = \"Split zip file\";\nconst CHARSET_UTF8 = \"utf-8\";\nconst CHARSET_CP437 = \"cp437\";\nconst ZIP64_PROPERTIES = [\n\t[PROPERTY_NAME_UNCOMPPRESSED_SIZE, MAX_32_BITS],\n\t[PROPERTY_NAME_COMPPRESSED_SIZE, MAX_32_BITS],\n\t[PROPERTY_NAME_OFFSET, MAX_32_BITS],\n\t[PROPERTY_NAME_DISK_NUMBER_START, MAX_16_BITS]\n];\nconst ZIP64_EXTRACTION = {\n\t[MAX_16_BITS]: {\n\t\tgetValue: getUint32,\n\t\tbytes: 4\n\t},\n\t[MAX_32_BITS]: {\n\t\tgetValue: getBigUint64,\n\t\tbytes: 8\n\t}\n};\n\nclass ZipReader {\n\n\tconstructor(reader, options = {}) {\n\t\tObject.assign(this, {\n\t\t\treader: initReader(reader),\n\t\t\toptions,\n\t\t\tconfig: getConfiguration()\n\t\t});\n\t}\n\n\tasync* getEntriesGenerator(options = {}) {\n\t\tconst zipReader = this;\n\t\tlet { reader } = zipReader;\n\t\tconst { config } = zipReader;\n\t\tawait initStream(reader);\n\t\tif (reader.size === UNDEFINED_VALUE || !reader.readUint8Array) {\n\t\t\treader = new BlobReader(await new Response(reader.readable).blob());\n\t\t\tawait initStream(reader);\n\t\t}\n\t\tif (reader.size < END_OF_CENTRAL_DIR_LENGTH) {\n\t\t\tthrow new Error(ERR_BAD_FORMAT);\n\t\t}\n\t\treader.chunkSize = getChunkSize(config);\n\t\tconst endOfDirectoryInfo = await seekSignature(reader, END_OF_CENTRAL_DIR_SIGNATURE, reader.size, END_OF_CENTRAL_DIR_LENGTH, MAX_16_BITS * 16);\n\t\tif (!endOfDirectoryInfo) {\n\t\t\tconst signatureArray = await readUint8Array(reader, 0, 4);\n\t\t\tconst signatureView = getDataView(signatureArray);\n\t\t\tif (getUint32(signatureView) == SPLIT_ZIP_FILE_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_SPLIT_ZIP_FILE);\n\t\t\t} else {\n\t\t\t\tthrow new Error(ERR_EOCDR_NOT_FOUND);\n\t\t\t}\n\t\t}\n\t\tconst endOfDirectoryView = getDataView(endOfDirectoryInfo);\n\t\tlet directoryDataLength = getUint32(endOfDirectoryView, 12);\n\t\tlet directoryDataOffset = getUint32(endOfDirectoryView, 16);\n\t\tconst commentOffset = endOfDirectoryInfo.offset;\n\t\tconst commentLength = getUint16(endOfDirectoryView, 20);\n\t\tconst appendedDataOffset = commentOffset + END_OF_CENTRAL_DIR_LENGTH + commentLength;\n\t\tlet lastDiskNumber = getUint16(endOfDirectoryView, 4);\n\t\tconst expectedLastDiskNumber = reader.lastDiskNumber || 0;\n\t\tlet diskNumber = getUint16(endOfDirectoryView, 6);\n\t\tlet filesLength = getUint16(endOfDirectoryView, 8);\n\t\tlet prependedDataLength = 0;\n\t\tlet startOffset = 0;\n\t\tif (directoryDataOffset == MAX_32_BITS || directoryDataLength == MAX_32_BITS || filesLength == MAX_16_BITS || diskNumber == MAX_16_BITS) {\n\t\t\tconst endOfDirectoryLocatorArray = await readUint8Array(reader, endOfDirectoryInfo.offset - ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH, ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH);\n\t\t\tconst endOfDirectoryLocatorView = getDataView(endOfDirectoryLocatorArray);\n\t\t\tif (getUint32(endOfDirectoryLocatorView, 0) != ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_EOCDR_ZIP64_NOT_FOUND);\n\t\t\t}\n\t\t\tdirectoryDataOffset = getBigUint64(endOfDirectoryLocatorView, 8);\n\t\t\tlet endOfDirectoryArray = await readUint8Array(reader, directoryDataOffset, ZIP64_END_OF_CENTRAL_DIR_LENGTH, -1);\n\t\t\tlet endOfDirectoryView = getDataView(endOfDirectoryArray);\n\t\t\tconst expectedDirectoryDataOffset = endOfDirectoryInfo.offset - ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH - ZIP64_END_OF_CENTRAL_DIR_LENGTH;\n\t\t\tif (getUint32(endOfDirectoryView, 0) != ZIP64_END_OF_CENTRAL_DIR_SIGNATURE && directoryDataOffset != expectedDirectoryDataOffset) {\n\t\t\t\tconst originalDirectoryDataOffset = directoryDataOffset;\n\t\t\t\tdirectoryDataOffset = expectedDirectoryDataOffset;\n\t\t\t\tprependedDataLength = directoryDataOffset - originalDirectoryDataOffset;\n\t\t\t\tendOfDirectoryArray = await readUint8Array(reader, directoryDataOffset, ZIP64_END_OF_CENTRAL_DIR_LENGTH, -1);\n\t\t\t\tendOfDirectoryView = getDataView(endOfDirectoryArray);\n\t\t\t}\n\t\t\tif (getUint32(endOfDirectoryView, 0) != ZIP64_END_OF_CENTRAL_DIR_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND);\n\t\t\t}\n\t\t\tif (lastDiskNumber == MAX_16_BITS) {\n\t\t\t\tlastDiskNumber = getUint32(endOfDirectoryView, 16);\n\t\t\t}\n\t\t\tif (diskNumber == MAX_16_BITS) {\n\t\t\t\tdiskNumber = getUint32(endOfDirectoryView, 20);\n\t\t\t}\n\t\t\tif (filesLength == MAX_16_BITS) {\n\t\t\t\tfilesLength = getBigUint64(endOfDirectoryView, 32);\n\t\t\t}\n\t\t\tif (directoryDataLength == MAX_32_BITS) {\n\t\t\t\tdirectoryDataLength = getBigUint64(endOfDirectoryView, 40);\n\t\t\t}\n\t\t\tdirectoryDataOffset -= directoryDataLength;\n\t\t}\n\t\tif (expectedLastDiskNumber != lastDiskNumber) {\n\t\t\tthrow new Error(ERR_SPLIT_ZIP_FILE);\n\t\t}\n\t\tif (directoryDataOffset < 0 || directoryDataOffset >= reader.size) {\n\t\t\tthrow new Error(ERR_BAD_FORMAT);\n\t\t}\n\t\tlet offset = 0;\n\t\tlet directoryArray = await readUint8Array(reader, directoryDataOffset, directoryDataLength, diskNumber);\n\t\tlet directoryView = getDataView(directoryArray);\n\t\tif (directoryDataLength) {\n\t\t\tconst expectedDirectoryDataOffset = endOfDirectoryInfo.offset - directoryDataLength;\n\t\t\tif (getUint32(directoryView, offset) != CENTRAL_FILE_HEADER_SIGNATURE && directoryDataOffset != expectedDirectoryDataOffset) {\n\t\t\t\tconst originalDirectoryDataOffset = directoryDataOffset;\n\t\t\t\tdirectoryDataOffset = expectedDirectoryDataOffset;\n\t\t\t\tprependedDataLength = directoryDataOffset - originalDirectoryDataOffset;\n\t\t\t\tdirectoryArray = await readUint8Array(reader, directoryDataOffset, directoryDataLength, diskNumber);\n\t\t\t\tdirectoryView = getDataView(directoryArray);\n\t\t\t}\n\t\t}\n\t\tif (directoryDataOffset < 0 || directoryDataOffset >= reader.size) {\n\t\t\tthrow new Error(ERR_BAD_FORMAT);\n\t\t}\n\t\tconst filenameEncoding = getOptionValue(zipReader, options, \"filenameEncoding\");\n\t\tconst commentEncoding = getOptionValue(zipReader, options, \"commentEncoding\");\n\t\tfor (let indexFile = 0; indexFile < filesLength; indexFile++) {\n\t\t\tconst fileEntry = new ZipEntry(reader, config, zipReader.options);\n\t\t\tif (getUint32(directoryView, offset) != CENTRAL_FILE_HEADER_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_CENTRAL_DIRECTORY_NOT_FOUND);\n\t\t\t}\n\t\t\treadCommonHeader(fileEntry, directoryView, offset + 6);\n\t\t\tconst languageEncodingFlag = Boolean(fileEntry.bitFlag.languageEncodingFlag);\n\t\t\tconst filenameOffset = offset + 46;\n\t\t\tconst extraFieldOffset = filenameOffset + fileEntry.filenameLength;\n\t\t\tconst commentOffset = extraFieldOffset + fileEntry.extraFieldLength;\n\t\t\tconst versionMadeBy = getUint16(directoryView, offset + 4);\n\t\t\tconst msDosCompatible = (versionMadeBy & 0) == 0;\n\t\t\tconst rawFilename = directoryArray.subarray(filenameOffset, extraFieldOffset);\n\t\t\tconst commentLength = getUint16(directoryView, offset + 32);\n\t\t\tconst endOffset = commentOffset + commentLength;\n\t\t\tconst rawComment = directoryArray.subarray(commentOffset, endOffset);\n\t\t\tconst filenameUTF8 = languageEncodingFlag;\n\t\t\tconst commentUTF8 = languageEncodingFlag;\n\t\t\tconst directory = msDosCompatible && ((getUint8(directoryView, offset + 38) & FILE_ATTR_MSDOS_DIR_MASK) == FILE_ATTR_MSDOS_DIR_MASK);\n\t\t\tconst offsetFileEntry = getUint32(directoryView, offset + 42) + prependedDataLength;\n\t\t\tObject.assign(fileEntry, {\n\t\t\t\tversionMadeBy,\n\t\t\t\tmsDosCompatible,\n\t\t\t\tcompressedSize: 0,\n\t\t\t\tuncompressedSize: 0,\n\t\t\t\tcommentLength,\n\t\t\t\tdirectory,\n\t\t\t\toffset: offsetFileEntry,\n\t\t\t\tdiskNumberStart: getUint16(directoryView, offset + 34),\n\t\t\t\tinternalFileAttribute: getUint16(directoryView, offset + 36),\n\t\t\t\texternalFileAttribute: getUint32(directoryView, offset + 38),\n\t\t\t\trawFilename,\n\t\t\t\tfilenameUTF8,\n\t\t\t\tcommentUTF8,\n\t\t\t\trawExtraField: directoryArray.subarray(extraFieldOffset, commentOffset)\n\t\t\t});\n\t\t\tconst [filename, comment] = await Promise.all([\n\t\t\t\tdecodeText(rawFilename, filenameUTF8 ? CHARSET_UTF8 : filenameEncoding || CHARSET_CP437),\n\t\t\t\tdecodeText(rawComment, commentUTF8 ? CHARSET_UTF8 : commentEncoding || CHARSET_CP437)\n\t\t\t]);\n\t\t\tObject.assign(fileEntry, {\n\t\t\t\trawComment,\n\t\t\t\tfilename,\n\t\t\t\tcomment,\n\t\t\t\tdirectory: directory || filename.endsWith(DIRECTORY_SIGNATURE)\n\t\t\t});\n\t\t\tstartOffset = Math.max(offsetFileEntry, startOffset);\n\t\t\tawait readCommonFooter(fileEntry, fileEntry, directoryView, offset + 6);\n\t\t\tconst entry = new Entry(fileEntry);\n\t\t\tentry.getData = (writer, options) => fileEntry.getData(writer, entry, options);\n\t\t\toffset = endOffset;\n\t\t\tconst { onprogress } = options;\n\t\t\tif (onprogress) {\n\t\t\t\ttry {\n\t\t\t\t\tawait onprogress(indexFile + 1, filesLength, new Entry(fileEntry));\n\t\t\t\t} catch (_error) {\n\t\t\t\t\t// ignored\n\t\t\t\t}\n\t\t\t}\n\t\t\tyield entry;\n\t\t}\n\t\tconst extractPrependedData = getOptionValue(zipReader, options, \"extractPrependedData\");\n\t\tconst extractAppendedData = getOptionValue(zipReader, options, \"extractAppendedData\");\n\t\tif (extractPrependedData) {\n\t\t\tzipReader.prependedData = startOffset > 0 ? await readUint8Array(reader, 0, startOffset) : new Uint8Array();\n\t\t}\n\t\tzipReader.comment = commentLength ? await readUint8Array(reader, commentOffset + END_OF_CENTRAL_DIR_LENGTH, commentLength) : new Uint8Array();\n\t\tif (extractAppendedData) {\n\t\t\tzipReader.appendedData = appendedDataOffset < reader.size ? await readUint8Array(reader, appendedDataOffset, reader.size - appendedDataOffset) : new Uint8Array();\n\t\t}\n\t\treturn true;\n\t}\n\n\tasync getEntries(options = {}) {\n\t\tconst entries = [];\n\t\tfor await (const entry of this.getEntriesGenerator(options)) {\n\t\t\tentries.push(entry);\n\t\t}\n\t\treturn entries;\n\t}\n\n\tasync close() {\n\t}\n}\n\nexport {\n\tZipReader,\n\tERR_BAD_FORMAT,\n\tERR_EOCDR_NOT_FOUND,\n\tERR_EOCDR_ZIP64_NOT_FOUND,\n\tERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND,\n\tERR_CENTRAL_DIRECTORY_NOT_FOUND,\n\tERR_LOCAL_FILE_HEADER_NOT_FOUND,\n\tERR_EXTRAFIELD_ZIP64_NOT_FOUND,\n\tERR_ENCRYPTED,\n\tERR_UNSUPPORTED_ENCRYPTION,\n\tERR_UNSUPPORTED_COMPRESSION,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD,\n\tERR_SPLIT_ZIP_FILE\n};\n\nclass ZipEntry {\n\n\tconstructor(reader, config, options) {\n\t\tObject.assign(this, {\n\t\t\treader,\n\t\t\tconfig,\n\t\t\toptions\n\t\t});\n\t}\n\n\tasync getData(writer, fileEntry, options = {}) {\n\t\tconst zipEntry = this;\n\t\tconst {\n\t\t\treader,\n\t\t\toffset,\n\t\t\tdiskNumberStart,\n\t\t\textraFieldAES,\n\t\t\tcompressionMethod,\n\t\t\tconfig,\n\t\t\tbitFlag,\n\t\t\tsignature,\n\t\t\trawLastModDate,\n\t\t\tuncompressedSize,\n\t\t\tcompressedSize\n\t\t} = zipEntry;\n\t\tconst localDirectory = zipEntry.localDirectory = {};\n\t\tconst dataArray = await readUint8Array(reader, offset, 30, diskNumberStart);\n\t\tconst dataView = getDataView(dataArray);\n\t\tlet password = getOptionValue(zipEntry, options, \"password\");\n\t\tpassword = password && password.length && password;\n\t\tif (extraFieldAES) {\n\t\t\tif (extraFieldAES.originalCompressionMethod != COMPRESSION_METHOD_AES) {\n\t\t\t\tthrow new Error(ERR_UNSUPPORTED_COMPRESSION);\n\t\t\t}\n\t\t}\n\t\tif (compressionMethod != COMPRESSION_METHOD_STORE && compressionMethod != COMPRESSION_METHOD_DEFLATE) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_COMPRESSION);\n\t\t}\n\t\tif (getUint32(dataView, 0) != LOCAL_FILE_HEADER_SIGNATURE) {\n\t\t\tthrow new Error(ERR_LOCAL_FILE_HEADER_NOT_FOUND);\n\t\t}\n\t\treadCommonHeader(localDirectory, dataView, 4);\n\t\tlocalDirectory.rawExtraField = localDirectory.extraFieldLength ?\n\t\t\tawait readUint8Array(reader, offset + 30 + localDirectory.filenameLength, localDirectory.extraFieldLength, diskNumberStart) :\n\t\t\tnew Uint8Array();\n\t\tawait readCommonFooter(zipEntry, localDirectory, dataView, 4);\n\t\tObject.assign(fileEntry, {\n\t\t\tlastAccessDate: localDirectory.lastAccessDate,\n\t\t\tcreationDate: localDirectory.creationDate\n\t\t});\n\t\tconst encrypted = zipEntry.encrypted && localDirectory.encrypted;\n\t\tconst zipCrypto = encrypted && !extraFieldAES;\n\t\tif (encrypted) {\n\t\t\tif (!zipCrypto && extraFieldAES.strength === UNDEFINED_VALUE) {\n\t\t\t\tthrow new Error(ERR_UNSUPPORTED_ENCRYPTION);\n\t\t\t} else if (!password) {\n\t\t\t\tthrow new Error(ERR_ENCRYPTED);\n\t\t\t}\n\t\t}\n\t\tconst dataOffset = offset + 30 + localDirectory.filenameLength + localDirectory.extraFieldLength;\n\t\tconst readable = reader.readable;\n\t\treadable.diskNumberStart = diskNumberStart;\n\t\treadable.offset = dataOffset;\n\t\tlet size = readable.size = compressedSize;\n\t\tconst signal = getOptionValue(zipEntry, options, \"signal\");\n\t\tconst checkPasswordOnly = getOptionValue(zipEntry, options, \"checkPasswordOnly\");\n\t\tif (checkPasswordOnly) {\n\t\t\twriter = new WritableStream();\n\t\t}\n\t\twriter = initWriter(writer);\n\t\tawait initStream(writer, uncompressedSize);\n\t\tconst { writable } = writer;\n\t\tconst { onstart, onprogress, onend } = options;\n\t\tconst workerOptions = {\n\t\t\toptions: {\n\t\t\t\tcodecType: CODEC_INFLATE,\n\t\t\t\tpassword,\n\t\t\t\tzipCrypto,\n\t\t\t\tencryptionStrength: extraFieldAES && extraFieldAES.strength,\n\t\t\t\tsigned: getOptionValue(zipEntry, options, \"checkSignature\"),\n\t\t\t\tpasswordVerification: zipCrypto && (bitFlag.dataDescriptor ? ((rawLastModDate >>> 8) & 0xFF) : ((signature >>> 24) & 0xFF)),\n\t\t\t\tsignature,\n\t\t\t\tcompressed: compressionMethod != 0,\n\t\t\t\tencrypted,\n\t\t\t\tuseWebWorkers: getOptionValue(zipEntry, options, \"useWebWorkers\"),\n\t\t\t\tuseCompressionStream: getOptionValue(zipEntry, options, \"useCompressionStream\"),\n\t\t\t\ttransferStreams: getOptionValue(zipEntry, options, \"transferStreams\"),\n\t\t\t\tcheckPasswordOnly\n\t\t\t},\n\t\t\tconfig,\n\t\t\tstreamOptions: { signal, size, onstart, onprogress, onend }\n\t\t};\n\t\tlet outputSize = 0;\n\t\ttry {\n\t\t\t({ outputSize } = (await runWorker({ readable, writable }, workerOptions)));\n\t\t} catch (error) {\n\t\t\tif (!checkPasswordOnly || error.message != ERR_ABORT_CHECK_PASSWORD) {\n\t\t\t\tthrow error;\n\t\t\t}\n\t\t} finally {\n\t\t\tconst preventClose = getOptionValue(zipEntry, options, \"preventClose\");\n\t\t\twritable.size += outputSize;\n\t\t\tif (!preventClose && !writable.locked) {\n\t\t\t\tawait writable.close();\n\t\t\t}\n\t\t}\n\t\treturn checkPasswordOnly ? undefined : writer.getData ? writer.getData() : writable;\n\t}\n}\n\nfunction readCommonHeader(directory, dataView, offset) {\n\tconst rawBitFlag = directory.rawBitFlag = getUint16(dataView, offset + 2);\n\tconst encrypted = (rawBitFlag & BITFLAG_ENCRYPTED) == BITFLAG_ENCRYPTED;\n\tconst rawLastModDate = getUint32(dataView, offset + 6);\n\tObject.assign(directory, {\n\t\tencrypted,\n\t\tversion: getUint16(dataView, offset),\n\t\tbitFlag: {\n\t\t\tlevel: (rawBitFlag & BITFLAG_LEVEL) >> 1,\n\t\t\tdataDescriptor: (rawBitFlag & BITFLAG_DATA_DESCRIPTOR) == BITFLAG_DATA_DESCRIPTOR,\n\t\t\tlanguageEncodingFlag: (rawBitFlag & BITFLAG_LANG_ENCODING_FLAG) == BITFLAG_LANG_ENCODING_FLAG\n\t\t},\n\t\trawLastModDate,\n\t\tlastModDate: getDate(rawLastModDate),\n\t\tfilenameLength: getUint16(dataView, offset + 22),\n\t\textraFieldLength: getUint16(dataView, offset + 24)\n\t});\n}\n\nasync function readCommonFooter(fileEntry, directory, dataView, offset) {\n\tconst { rawExtraField } = directory;\n\tconst extraField = directory.extraField = new Map();\n\tconst rawExtraFieldView = getDataView(new Uint8Array(rawExtraField));\n\tlet offsetExtraField = 0;\n\ttry {\n\t\twhile (offsetExtraField < rawExtraField.length) {\n\t\t\tconst type = getUint16(rawExtraFieldView, offsetExtraField);\n\t\t\tconst size = getUint16(rawExtraFieldView, offsetExtraField + 2);\n\t\t\textraField.set(type, {\n\t\t\t\ttype,\n\t\t\t\tdata: rawExtraField.slice(offsetExtraField + 4, offsetExtraField + 4 + size)\n\t\t\t});\n\t\t\toffsetExtraField += 4 + size;\n\t\t}\n\t} catch (_error) {\n\t\t// ignored\n\t}\n\tconst compressionMethod = getUint16(dataView, offset + 4);\n\tObject.assign(directory, {\n\t\tsignature: getUint32(dataView, offset + 10),\n\t\tuncompressedSize: getUint32(dataView, offset + 18),\n\t\tcompressedSize: getUint32(dataView, offset + 14)\n\t});\n\tconst extraFieldZip64 = extraField.get(EXTRAFIELD_TYPE_ZIP64);\n\tif (extraFieldZip64) {\n\t\treadExtraFieldZip64(extraFieldZip64, directory);\n\t\tdirectory.extraFieldZip64 = extraFieldZip64;\n\t}\n\tconst extraFieldUnicodePath = extraField.get(EXTRAFIELD_TYPE_UNICODE_PATH);\n\tif (extraFieldUnicodePath) {\n\t\tawait readExtraFieldUnicode(extraFieldUnicodePath, PROPERTY_NAME_FILENAME, PROPERTY_NAME_RAW_FILENAME, directory, fileEntry);\n\t\tdirectory.extraFieldUnicodePath = extraFieldUnicodePath;\n\t}\n\tconst extraFieldUnicodeComment = extraField.get(EXTRAFIELD_TYPE_UNICODE_COMMENT);\n\tif (extraFieldUnicodeComment) {\n\t\tawait readExtraFieldUnicode(extraFieldUnicodeComment, PROPERTY_NAME_COMMENT, PROPERTY_NAME_RAW_COMMENT, directory, fileEntry);\n\t\tdirectory.extraFieldUnicodeComment = extraFieldUnicodeComment;\n\t}\n\tconst extraFieldAES = extraField.get(EXTRAFIELD_TYPE_AES);\n\tif (extraFieldAES) {\n\t\treadExtraFieldAES(extraFieldAES, directory, compressionMethod);\n\t\tdirectory.extraFieldAES = extraFieldAES;\n\t} else {\n\t\tdirectory.compressionMethod = compressionMethod;\n\t}\n\tconst extraFieldNTFS = extraField.get(EXTRAFIELD_TYPE_NTFS);\n\tif (extraFieldNTFS) {\n\t\treadExtraFieldNTFS(extraFieldNTFS, directory);\n\t\tdirectory.extraFieldNTFS = extraFieldNTFS;\n\t}\n\tconst extraFieldExtendedTimestamp = extraField.get(EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP);\n\tif (extraFieldExtendedTimestamp) {\n\t\treadExtraFieldExtendedTimestamp(extraFieldExtendedTimestamp, directory);\n\t\tdirectory.extraFieldExtendedTimestamp = extraFieldExtendedTimestamp;\n\t}\n}\n\nfunction readExtraFieldZip64(extraFieldZip64, directory) {\n\tdirectory.zip64 = true;\n\tconst extraFieldView = getDataView(extraFieldZip64.data);\n\tconst missingProperties = ZIP64_PROPERTIES.filter(([propertyName, max]) => directory[propertyName] == max);\n\tfor (let indexMissingProperty = 0, offset = 0; indexMissingProperty < missingProperties.length; indexMissingProperty++) {\n\t\tconst [propertyName, max] = missingProperties[indexMissingProperty];\n\t\tif (directory[propertyName] == max) {\n\t\t\tconst extraction = ZIP64_EXTRACTION[max];\n\t\t\tdirectory[propertyName] = extraFieldZip64[propertyName] = extraction.getValue(extraFieldView, offset);\n\t\t\toffset += extraction.bytes;\n\t\t} else if (extraFieldZip64[propertyName]) {\n\t\t\tthrow new Error(ERR_EXTRAFIELD_ZIP64_NOT_FOUND);\n\t\t}\n\t}\n}\n\nasync function readExtraFieldUnicode(extraFieldUnicode, propertyName, rawPropertyName, directory, fileEntry) {\n\tconst extraFieldView = getDataView(extraFieldUnicode.data);\n\tconst crc32 = new Crc32();\n\tcrc32.append(fileEntry[rawPropertyName]);\n\tconst dataViewSignature = getDataView(new Uint8Array(4));\n\tdataViewSignature.setUint32(0, crc32.get(), true);\n\tObject.assign(extraFieldUnicode, {\n\t\tversion: getUint8(extraFieldView, 0),\n\t\tsignature: getUint32(extraFieldView, 1),\n\t\t[propertyName]: await decodeText(extraFieldUnicode.data.subarray(5)),\n\t\tvalid: !fileEntry.bitFlag.languageEncodingFlag && extraFieldUnicode.signature == getUint32(dataViewSignature, 0)\n\t});\n\tif (extraFieldUnicode.valid) {\n\t\tdirectory[propertyName] = extraFieldUnicode[propertyName];\n\t\tdirectory[propertyName + \"UTF8\"] = true;\n\t}\n}\n\nfunction readExtraFieldAES(extraFieldAES, directory, compressionMethod) {\n\tconst extraFieldView = getDataView(extraFieldAES.data);\n\tconst strength = getUint8(extraFieldView, 4);\n\tObject.assign(extraFieldAES, {\n\t\tvendorVersion: getUint8(extraFieldView, 0),\n\t\tvendorId: getUint8(extraFieldView, 2),\n\t\tstrength,\n\t\toriginalCompressionMethod: compressionMethod,\n\t\tcompressionMethod: getUint16(extraFieldView, 5)\n\t});\n\tdirectory.compressionMethod = extraFieldAES.compressionMethod;\n}\n\nfunction readExtraFieldNTFS(extraFieldNTFS, directory) {\n\tconst extraFieldView = getDataView(extraFieldNTFS.data);\n\tlet offsetExtraField = 4;\n\tlet tag1Data;\n\ttry {\n\t\twhile (offsetExtraField < extraFieldNTFS.data.length && !tag1Data) {\n\t\t\tconst tagValue = getUint16(extraFieldView, offsetExtraField);\n\t\t\tconst attributeSize = getUint16(extraFieldView, offsetExtraField + 2);\n\t\t\tif (tagValue == EXTRAFIELD_TYPE_NTFS_TAG1) {\n\t\t\t\ttag1Data = extraFieldNTFS.data.slice(offsetExtraField + 4, offsetExtraField + 4 + attributeSize);\n\t\t\t}\n\t\t\toffsetExtraField += 4 + attributeSize;\n\t\t}\n\t} catch (_error) {\n\t\t// ignored\n\t}\n\ttry {\n\t\tif (tag1Data && tag1Data.length == 24) {\n\t\t\tconst tag1View = getDataView(tag1Data);\n\t\t\tconst rawLastModDate = tag1View.getBigUint64(0, true);\n\t\t\tconst rawLastAccessDate = tag1View.getBigUint64(8, true);\n\t\t\tconst rawCreationDate = tag1View.getBigUint64(16, true);\n\t\t\tObject.assign(extraFieldNTFS, {\n\t\t\t\trawLastModDate,\n\t\t\t\trawLastAccessDate,\n\t\t\t\trawCreationDate\n\t\t\t});\n\t\t\tconst lastModDate = getDateNTFS(rawLastModDate);\n\t\t\tconst lastAccessDate = getDateNTFS(rawLastAccessDate);\n\t\t\tconst creationDate = getDateNTFS(rawCreationDate);\n\t\t\tconst extraFieldData = { lastModDate, lastAccessDate, creationDate };\n\t\t\tObject.assign(extraFieldNTFS, extraFieldData);\n\t\t\tObject.assign(directory, extraFieldData);\n\t\t}\n\t} catch (_error) {\n\t\t// ignored\n\t}\n}\n\nfunction readExtraFieldExtendedTimestamp(extraFieldExtendedTimestamp, directory) {\n\tconst extraFieldView = getDataView(extraFieldExtendedTimestamp.data);\n\tconst flags = getUint8(extraFieldView, 0);\n\tconst timeProperties = [];\n\tconst timeRawProperties = [];\n\tif ((flags & 0x1) == 0x1) {\n\t\ttimeProperties.push(PROPERTY_NAME_LAST_MODIFICATION_DATE);\n\t\ttimeRawProperties.push(PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE);\n\t}\n\tif ((flags & 0x2) == 0x2) {\n\t\ttimeProperties.push(PROPERTY_NAME_LAST_ACCESS_DATE);\n\t\ttimeRawProperties.push(PROPERTY_NAME_RAW_LAST_ACCESS_DATE);\n\t}\n\tif ((flags & 0x4) == 0x4) {\n\t\ttimeProperties.push(PROPERTY_NAME_CREATION_DATE);\n\t\ttimeRawProperties.push(PROPERTY_NAME_RAW_CREATION_DATE);\n\t}\n\tlet offset = 1;\n\ttimeProperties.forEach((propertyName, indexProperty) => {\n\t\tif (extraFieldExtendedTimestamp.data.length >= offset + 4) {\n\t\t\tconst time = getUint32(extraFieldView, offset);\n\t\t\tdirectory[propertyName] = extraFieldExtendedTimestamp[propertyName] = new Date(time * 1000);\n\t\t\tconst rawPropertyName = timeRawProperties[indexProperty];\n\t\t\textraFieldExtendedTimestamp[rawPropertyName] = time;\n\t\t}\n\t\toffset += 4;\n\t});\n}\n\nasync function seekSignature(reader, signature, startOffset, minimumBytes, maximumLength) {\n\tconst signatureArray = new Uint8Array(4);\n\tconst signatureView = getDataView(signatureArray);\n\tsetUint32(signatureView, 0, signature);\n\tconst maximumBytes = minimumBytes + maximumLength;\n\treturn (await seek(minimumBytes)) || await seek(Math.min(maximumBytes, startOffset));\n\n\tasync function seek(length) {\n\t\tconst offset = startOffset - length;\n\t\tconst bytes = await readUint8Array(reader, offset, length);\n\t\tfor (let indexByte = bytes.length - minimumBytes; indexByte >= 0; indexByte--) {\n\t\t\tif (bytes[indexByte] == signatureArray[0] && bytes[indexByte + 1] == signatureArray[1] &&\n\t\t\t\tbytes[indexByte + 2] == signatureArray[2] && bytes[indexByte + 3] == signatureArray[3]) {\n\t\t\t\treturn {\n\t\t\t\t\toffset: offset + indexByte,\n\t\t\t\t\tbuffer: bytes.slice(indexByte, indexByte + minimumBytes).buffer\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction getOptionValue(zipReader, options, name) {\n\treturn options[name] === UNDEFINED_VALUE ? zipReader.options[name] : options[name];\n}\n\nfunction getDate(timeRaw) {\n\tconst date = (timeRaw & 0xffff0000) >> 16, time = timeRaw & 0x0000ffff;\n\ttry {\n\t\treturn new Date(1980 + ((date & 0xFE00) >> 9), ((date & 0x01E0) >> 5) - 1, date & 0x001F, (time & 0xF800) >> 11, (time & 0x07E0) >> 5, (time & 0x001F) * 2, 0);\n\t} catch (_error) {\n\t\t// ignored\n\t}\n}\n\nfunction getDateNTFS(timeRaw) {\n\treturn new Date((Number((timeRaw / BigInt(10000)) - BigInt(11644473600000))));\n}\n\nfunction getUint8(view, offset) {\n\treturn view.getUint8(offset);\n}\n\nfunction getUint16(view, offset) {\n\treturn view.getUint16(offset, true);\n}\n\nfunction getUint32(view, offset) {\n\treturn view.getUint32(offset, true);\n}\n\nfunction getBigUint64(view, offset) {\n\treturn Number(view.getBigUint64(offset, true));\n}\n\nfunction setUint32(view, offset, value) {\n\tview.setUint32(offset, value, true);\n}\n\nfunction getDataView(array) {\n\treturn new DataView(array.buffer);\n}","/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport { configure } from \"./core/configuration.js\";\nimport { configureWebWorker } from \"./z-worker-inline.js\";\nimport { getMimeType } from \"./core/util/default-mime-type.js\";\nimport { initShimAsyncCodec } from \"./core/util/stream-codec-shim.js\";\nimport { terminateWorkers } from \"./core/codec-pool.js\";\n\nlet baseURL;\ntry {\n\tbaseURL = import.meta.url;\n} catch (_error) {\n\t// ignored\n}\nconfigure({ baseURL });\nconfigureWebWorker(configure);\n\nexport * from \"./core/io.js\";\nexport * from \"./core/zip-reader.js\";\nexport * from \"./core/zip-writer.js\";\nexport * from \"./core/zip-fs-core.js\";\nexport {\n\tconfigure,\n\tgetMimeType,\n\tinitShimAsyncCodec,\n\tterminateWorkers\n};","/// \n\n/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport { Deflate } from \"./lib/core/streams/codecs/deflate.js\";\nimport { Inflate } from \"./lib/core/streams/codecs/inflate.js\";\nimport { configure } from \"./lib/core/configuration.js\";\nimport { getMimeType } from \"./lib/core/util/mime-type.js\";\nimport { terminateWorkers } from \"./lib/core/codec-pool.js\";\n\nconfigure({ Deflate, Inflate });\n\nexport {\n\tfs,\n\tconfigure,\n\tinitShimAsyncCodec,\n\tZipReader,\n\tZipWriter,\n\tReader,\n\tWriter,\n\tTextReader,\n\tTextWriter,\n\tData64URIReader,\n\tData64URIWriter,\n\tBlobReader,\n\tBlobWriter,\n\tHttpReader,\n\tHttpRangeReader,\n\tUint8ArrayWriter,\n\tUint8ArrayReader,\n\tSplitZipReader,\n\tSplitZipWriter,\n\tSplitDataReader,\n\tSplitDataWriter,\n\tERR_HTTP_RANGE,\n\tERR_BAD_FORMAT,\n\tERR_EOCDR_NOT_FOUND,\n\tERR_EOCDR_ZIP64_NOT_FOUND,\n\tERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND,\n\tERR_CENTRAL_DIRECTORY_NOT_FOUND,\n\tERR_LOCAL_FILE_HEADER_NOT_FOUND,\n\tERR_EXTRAFIELD_ZIP64_NOT_FOUND,\n\tERR_ENCRYPTED,\n\tERR_UNSUPPORTED_ENCRYPTION,\n\tERR_UNSUPPORTED_COMPRESSION,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD,\n\tERR_DUPLICATED_NAME,\n\tERR_INVALID_COMMENT,\n\tERR_INVALID_ENTRY_NAME,\n\tERR_INVALID_ENTRY_COMMENT,\n\tERR_INVALID_VERSION,\n\tERR_INVALID_EXTRAFIELD_TYPE,\n\tERR_INVALID_EXTRAFIELD_DATA,\n\tERR_INVALID_ENCRYPTION_STRENGTH,\n\tERR_UNSUPPORTED_FORMAT,\n\tERR_SPLIT_ZIP_FILE,\n\tERR_ITERATOR_COMPLETED_TOO_SOON\n} from \"./lib/zip-fs.js\";\nexport { getMimeType, terminateWorkers };","import { EntryMetadata, getEntryMetadata, zipGetData } from \"./common\";\nimport { BlobReader, BlobWriter, Entry, EntryGetDataOptions, Reader } from \"@zip.js/zip.js\";\n\nfunction parseIndex(index: number, size: number) {\n return index < 0 ?\n Math.max(index + size, 0) :\n Math.min(index, size);\n}\n\nclass BlobEntryReaderImpl extends Reader {\n private readonly blob: Blob;\n private readonly offset: number;\n\n constructor(blob: Blob, entryMetadata: EntryMetadata) {\n super(blob);\n\n this.blob = blob;\n this.offset = entryMetadata.offset + entryMetadata.headerSize;\n this.size = entryMetadata.compressedSize;\n }\n\n async readUint8Array(index: number, length: number): Promise {\n const start = parseIndex(index, this.size) + this.offset;\n const end = parseIndex(index + length, this.size) + this.offset;\n const blob = this.blob.slice(start, end);\n return new Uint8Array(await blob.arrayBuffer());\n }\n}\n\n/**\n * Represents a {@link Reader} instance used to read data of an entry in a zip\n * file provided as a {@link Blob}. It directly reads data if it is uncompressed.\n */\nexport class BlobEntryReader extends Reader {\n private readonly blob: Blob;\n private readonly entry: Entry;\n private readonly mimeString: string | undefined;\n private readonly options: EntryGetDataOptions | undefined;\n\n private reader: Reader | undefined;\n\n /**\n * @param blob - The blob to read data from, usually the outer zip file.\n * @param entry - The entry to read data of, usually the inner zip file.\n * @param mimeString - The MIME type of the data.\n * @param options - Represents options passed to {@link Entry#getData}.\n */\n constructor(\n blob: Blob,\n entry: Entry,\n mimeString?: string,\n options?: EntryGetDataOptions\n ) {\n super();\n\n this.blob = blob;\n this.entry = entry;\n this.mimeString = mimeString;\n this.options = options;\n }\n\n async init(): Promise {\n const entryMetadata = await getEntryMetadata(this.blob, this.entry);\n\n if (entryMetadata.compressionMethod !== 0) {\n const entryBlob: Blob = await zipGetData(\n this.entry,\n new BlobWriter(this.mimeString),\n this.options\n );\n this.reader = new BlobReader(entryBlob);\n } else {\n this.reader = new BlobEntryReaderImpl(this.blob, entryMetadata);\n }\n\n this.size = this.reader.size;\n }\n\n async readUint8Array(index: number, length: number): Promise {\n return this.reader!.readUint8Array(index, length);\n }\n}\n","import * as common from \"./common\";\nimport {\n ZipReader,\n BlobReader,\n BlobWriter,\n TextWriter,\n Entry,\n} from \"@zip.js/zip.js\";\nimport { FastbootDevice, FastbootError, ReconnectCallback } from \"./fastboot\";\nimport { BlobEntryReader } from \"./io\";\n\n/**\n * Callback for factory image flashing progress.\n *\n * @callback FactoryProgressCallback\n * @param {string} action - Action in the flashing process, e.g. unpack/flash.\n * @param {string} item - Item processed by the action, e.g. partition being flashed.\n * @param {number} progress - Progress within the current action between 0 and 1.\n */\nexport type FactoryProgressCallback = (\n action: string,\n item: string,\n progress: number\n) => void;\n\n// Images needed for fastbootd\nconst BOOT_CRITICAL_IMAGES = [\n \"boot\",\n \"dt\",\n \"dtbo\",\n \"init_boot\",\n \"pvmfw\",\n \"recovery\",\n \"vbmeta_system\",\n \"vbmeta_vendor\",\n \"vbmeta\",\n \"vendor_boot\",\n \"vendor_kernel_boot\",\n];\n\n// Less critical images to flash after boot-critical ones\nconst SYSTEM_IMAGES = [\n \"odm\",\n \"odm_dlkm\",\n \"product\",\n \"system_dlkm\",\n \"system_ext\",\n \"system\",\n \"vendor_dlkm\",\n \"vendor\",\n];\n\n/**\n * User-friendly action strings for factory image flashing progress.\n * This can be indexed by the action argument in FactoryFlashCallback.\n */\nexport const USER_ACTION_MAP = {\n load: \"Loading\",\n unpack: \"Unpacking\",\n flash: \"Writing\",\n wipe: \"Wiping\",\n reboot: \"Restarting\",\n};\n\nconst BOOTLOADER_REBOOT_TIME = 4000; // ms\nconst FASTBOOTD_REBOOT_TIME = 16000; // ms\nconst USERDATA_ERASE_TIME = 1000; // ms\n\nasync function flashEntryBlob(\n device: FastbootDevice,\n entry: Entry,\n onProgress: FactoryProgressCallback,\n partition: string\n) {\n const blob: Blob = await common.zipGetData(\n entry,\n new BlobWriter(\"application/octet-stream\"),\n {\n onstart(total: number): Promise | undefined {\n common.logDebug(`Unpacking ${partition} (${total} bytes)`);\n onProgress(\"unpack\", partition, 0.0);\n return;\n },\n onprogress(progress: number, total: number): Promise | undefined {\n onProgress(\"unpack\", partition, progress / total);\n return;\n }\n }\n );\n\n common.logDebug(`Flashing ${partition}`);\n onProgress(\"flash\", partition, 0.0);\n await device.flashBlob(partition, blob, (progress) => {\n onProgress(\"flash\", partition, progress);\n });\n}\n\nasync function tryFlashImages(\n device: FastbootDevice,\n entries: Array,\n onProgress: FactoryProgressCallback,\n imageNames: Array\n) {\n for (let imageName of imageNames) {\n let pattern = new RegExp(`${imageName}(?:-.+)?\\\\.img$`);\n let entry = entries.find((entry) => entry.filename.match(pattern));\n if (entry !== undefined) {\n if (imageName == \"bootloader\") {\n let current_slot = await device.getVariable(\"current-slot\");\n if (current_slot == \"a\") {\n await flashEntryBlob(device, entry, onProgress, (imageName + \"_b\"));\n await device.runCommand(\"set_active:b\");\n } else if (current_slot == \"b\") {\n await flashEntryBlob(device, entry, onProgress, (imageName + \"_a\"));\n await device.runCommand(\"set_active:a\");\n } else {\n throw new FastbootError(\n \"FAIL\",\n `Invalid slot given by bootloader.`\n );\n }\n }\n else {\n await flashEntryBlob(device, entry, onProgress, imageName);\n }\n }\n }\n}\n\nasync function checkRequirements(device: FastbootDevice, androidInfo: string) {\n // Deal with CRLF just in case\n for (let line of androidInfo.replace(\"\\r\", \"\").split(\"\\n\")) {\n let match = line.match(/^require\\s+(.+?)=(.+)$/);\n if (!match) {\n continue;\n }\n\n let variable = match[1];\n // Historical mismatch that we still need to deal with\n if (variable === \"board\") {\n variable = \"product\";\n }\n\n let expectValue = match[2];\n let expectValues: Array = expectValue.split(\"|\");\n\n // Special case: not a real variable at all\n if (variable === \"partition-exists\") {\n // Check whether the partition exists on the device:\n // has-slot = undefined || FAIL => doesn't exist\n // has-slot = yes || no => exists\n let hasSlot = await device.getVariable(`has-slot:${expectValue}`);\n if (hasSlot !== \"yes\" && hasSlot !== \"no\") {\n throw new FastbootError(\n \"FAIL\",\n `Requirement ${variable}=${expectValue} failed, device lacks partition`\n );\n }\n\n // Check whether we recognize the partition\n if (\n !BOOT_CRITICAL_IMAGES.includes(expectValue) &&\n !SYSTEM_IMAGES.includes(expectValue)\n ) {\n throw new FastbootError(\n \"FAIL\",\n `Requirement ${variable}=${expectValue} failed, unrecognized partition`\n );\n }\n } else {\n let realValue = await device.getVariable(variable);\n\n if (expectValues.includes(realValue)) {\n common.logDebug(\n `Requirement ${variable}=${expectValue} passed`\n );\n } else {\n let msg = `Requirement ${variable}=${expectValue} failed, value = ${realValue}`;\n common.logDebug(msg);\n throw new FastbootError(\"FAIL\", msg);\n }\n }\n }\n}\n\nasync function tryReboot(\n device: FastbootDevice,\n target: string,\n onReconnect: ReconnectCallback\n) {\n try {\n await device.reboot(target, false);\n } catch (e) {\n /* Failed = device rebooted by itself */\n }\n\n await device.waitForConnect(onReconnect);\n}\n\nexport async function flashZip(\n device: FastbootDevice,\n blob: Blob,\n wipe: boolean,\n onReconnect: ReconnectCallback,\n onProgress: FactoryProgressCallback = (\n _action: string,\n _item: string,\n _progress: number\n ) => {}\n) {\n onProgress(\"load\", \"package\", 0.0);\n let reader = new ZipReader(new BlobReader(blob));\n let entries = await reader.getEntries();\n\n // Bootloader and radio packs can only be flashed in the bare-metal bootloader\n if ((await device.getVariable(\"is-userspace\")) === \"yes\") {\n await device.reboot(\"bootloader\", true, onReconnect);\n }\n\n // 1. Bootloader pack (repeated for slot A and B)\n await tryFlashImages(device, entries, onProgress, [\"bootloader\"]);\n await common.runWithTimedProgress(\n onProgress,\n \"reboot\",\n \"device\",\n BOOTLOADER_REBOOT_TIME,\n tryReboot(device, \"bootloader\", onReconnect)\n );\n\n await tryFlashImages(device, entries, onProgress, [\"bootloader\"]);\n await common.runWithTimedProgress(\n onProgress,\n \"reboot\",\n \"device\",\n BOOTLOADER_REBOOT_TIME,\n tryReboot(device, \"bootloader\", onReconnect)\n );\n\n // 2. Radio pack\n await tryFlashImages(device, entries, onProgress, [\"radio\"]);\n await common.runWithTimedProgress(\n onProgress,\n \"reboot\",\n \"device\",\n BOOTLOADER_REBOOT_TIME,\n tryReboot(device, \"bootloader\", onReconnect)\n );\n\n // Cancel snapshot update if in progress\n let snapshotStatus = await device.getVariable(\"snapshot-update-status\");\n if (snapshotStatus !== null && snapshotStatus !== \"none\") {\n await device.runCommand(\"snapshot-update:cancel\");\n }\n\n // Load nested images for the following steps\n let entry = entries.find((e) => e.filename.match(/image-.+\\.zip$/));\n const imageReader = new ZipReader(new BlobEntryReader(\n blob,\n entry!,\n \"application/zip\",\n {\n onstart(total: number): Promise | undefined {\n common.logDebug(`Loading nested images from zip (${total} bytes)`);\n onProgress(\"unpack\", \"images\", 0.0);\n return;\n },\n onprogress(progress: number, total: number): Promise | undefined {\n onProgress(\"unpack\", \"images\", progress / total);\n return;\n }\n }\n ));\n const imageEntries = await imageReader.getEntries();\n\n // 3. Check requirements\n entry = imageEntries.find((e) => e.filename === \"android-info.txt\");\n if (entry !== undefined) {\n const reqText: string = await common.zipGetData(entry, new TextWriter());\n await checkRequirements(device, reqText);\n }\n\n // 4. Boot-critical images\n await tryFlashImages(\n device,\n imageEntries,\n onProgress,\n BOOT_CRITICAL_IMAGES\n );\n\n // 5. Super partition template\n // This is also where we reboot to fastbootd.\n entry = imageEntries.find((e) => e.filename === \"super_empty.img\");\n if (entry !== undefined) {\n await common.runWithTimedProgress(\n onProgress,\n \"reboot\",\n \"device\",\n FASTBOOTD_REBOOT_TIME,\n device.reboot(\"fastboot\", true, onReconnect)\n );\n\n let superName = await device.getVariable(\"super-partition-name\");\n if (!superName) {\n superName = \"super\";\n }\n\n let superAction = wipe ? \"wipe\" : \"flash\";\n onProgress(superAction, \"super\", 0.0);\n const superBlob: Blob = await common.zipGetData(\n entry,\n new BlobWriter(\"application/octet-stream\")\n );\n await device.upload(\n superName,\n await common.readBlobAsBuffer(superBlob),\n (progress) => {\n onProgress(superAction, \"super\", progress);\n }\n );\n await device.runCommand(\n `update-super:${superName}${wipe ? \":wipe\" : \"\"}`\n );\n }\n\n // 6. Remaining system images\n await tryFlashImages(device, imageEntries, onProgress, SYSTEM_IMAGES);\n\n // We unconditionally reboot back to the bootloader here if we're in fastbootd,\n // even when there's no custom AVB key, because common follow-up actions like\n // locking the bootloader and wiping data need to be done in the bootloader.\n if ((await device.getVariable(\"is-userspace\")) === \"yes\") {\n await common.runWithTimedProgress(\n onProgress,\n \"reboot\",\n \"device\",\n BOOTLOADER_REBOOT_TIME,\n device.reboot(\"bootloader\", true, onReconnect)\n );\n }\n\n // 7. Custom AVB key\n entry = entries.find((e) => e.filename.endsWith(\"avb_pkmd.bin\"));\n if (entry !== undefined) {\n await device.runCommand(\"erase:avb_custom_key\");\n await flashEntryBlob(device, entry, onProgress, \"avb_custom_key\");\n }\n\n // 8. Wipe userdata\n if (wipe) {\n await common.runWithTimedProgress(\n onProgress,\n \"wipe\",\n \"data\",\n USERDATA_ERASE_TIME,\n device.runCommand(\"erase:userdata\")\n );\n }\n}\n","import * as Sparse from \"./sparse\";\nimport * as common from \"./common\";\nimport {\n FactoryProgressCallback,\n flashZip as flashFactoryZip,\n} from \"./factory\";\n\nconst FASTBOOT_USB_CLASS = 0xff;\nconst FASTBOOT_USB_SUBCLASS = 0x42;\nconst FASTBOOT_USB_PROTOCOL = 0x03;\n\nconst BULK_TRANSFER_SIZE = 16384;\n\nconst DEFAULT_DOWNLOAD_SIZE = 512 * 1024 * 1024; // 512 MiB\n// To conserve RAM and work around Chromium's ~2 GiB size limit, we limit the\n// max download size even if the bootloader can accept more data.\nconst MAX_DOWNLOAD_SIZE = 1024 * 1024 * 1024; // 1 GiB\n\nconst GETVAR_TIMEOUT = 10000; // ms\n\n/**\n * Exception class for USB errors not directly thrown by WebUSB.\n */\nexport class UsbError extends Error {\n constructor(message: string) {\n super(message);\n this.name = \"UsbError\";\n }\n}\n\n/**\n * Exception class for errors returned by the bootloader, as well as high-level\n * fastboot errors resulting from bootloader responses.\n */\nexport class FastbootError extends Error {\n status: string;\n bootloaderMessage: string;\n\n constructor(status: string, message: string) {\n super(`Bootloader replied with ${status}: ${message}`);\n this.status = status;\n this.bootloaderMessage = message;\n this.name = \"FastbootError\";\n }\n}\n\ninterface CommandResponse {\n text: string;\n // hex string from DATA\n dataSize?: string;\n}\n\n/**\n * Callback for progress updates while flashing or uploading an image.\n *\n * @callback FlashProgressCallback\n * @param {number} progress - Progress for the current action, between 0 and 1.\n */\nexport type FlashProgressCallback = (progress: number) => void;\n\n/**\n * Callback for reconnecting to the USB device.\n * This is necessary because some platforms do not support automatic reconnection,\n * and USB connection requests can only be triggered as the result of explicit\n * user action.\n *\n * @callback ReconnectCallback\n */\nexport type ReconnectCallback = () => void;\n\n/**\n * This class is a client for executing fastboot commands and operations on a\n * device connected over USB.\n */\nexport class FastbootDevice {\n device: USBDevice | null;\n epIn: number | null;\n epOut: number | null;\n\n private _registeredUsbListeners: boolean;\n private _connectResolve: ((value: any) => void) | null;\n private _connectReject: ((err: unknown) => void) | null;\n private _disconnectResolve: ((value: any) => void) | null;\n\n /**\n * Create a new fastboot device instance. This doesn't actually connect to\n * any USB devices; call {@link connect} to do so.\n */\n constructor() {\n this.device = null;\n this.epIn = null;\n this.epOut = null;\n\n this._registeredUsbListeners = false;\n this._connectResolve = null;\n this._connectReject = null;\n this._disconnectResolve = null;\n }\n\n /**\n * Returns whether a USB device is connected and ready for use.\n */\n get isConnected() {\n return (\n this.device !== null &&\n this.device.opened &&\n this.device.configurations[0].interfaces[0].claimed\n );\n }\n\n /**\n * Validate the current USB device's details and connect to it.\n *\n * @private\n */\n private async _validateAndConnectDevice() {\n if (this.device === null) {\n throw new UsbError(\"Attempted to connect to null device\");\n }\n\n // Validate device\n let ife = this.device!.configurations[0].interfaces[0].alternates[0];\n if (ife.endpoints.length !== 2) {\n throw new UsbError(\"Interface has wrong number of endpoints\");\n }\n\n this.epIn = null;\n this.epOut = null;\n for (let endpoint of ife.endpoints) {\n common.logVerbose(\"Checking endpoint:\", endpoint);\n if (endpoint.type !== \"bulk\") {\n throw new UsbError(\"Interface endpoint is not bulk\");\n }\n\n if (endpoint.direction === \"in\") {\n if (this.epIn === null) {\n this.epIn = endpoint.endpointNumber;\n } else {\n throw new UsbError(\"Interface has multiple IN endpoints\");\n }\n } else if (endpoint.direction === \"out\") {\n if (this.epOut === null) {\n this.epOut = endpoint.endpointNumber;\n } else {\n throw new UsbError(\"Interface has multiple OUT endpoints\");\n }\n }\n }\n common.logVerbose(\"Endpoints: in =\", this.epIn, \", out =\", this.epOut);\n\n try {\n await this.device!.open();\n // Opportunistically reset to fix issues on some platforms\n try {\n await this.device!.reset();\n } catch (error) {\n /* Failed = doesn't support reset */\n }\n\n await this.device!.selectConfiguration(1);\n await this.device!.claimInterface(0); // fastboot\n } catch (error) {\n // Propagate exception from waitForConnect()\n if (this._connectReject !== null) {\n this._connectReject(error);\n this._connectResolve = null;\n this._connectReject = null;\n }\n\n throw error;\n }\n\n // Return from waitForConnect()\n if (this._connectResolve !== null) {\n this._connectResolve(undefined);\n this._connectResolve = null;\n this._connectReject = null;\n }\n }\n\n /**\n * Wait for the current USB device to disconnect, if it's still connected.\n * Returns immediately if no device is connected.\n */\n async waitForDisconnect() {\n if (this.device === null) {\n return;\n }\n\n return await new Promise((resolve, _reject) => {\n this._disconnectResolve = resolve;\n });\n }\n\n /**\n * Wait for the USB device to connect. Returns at the next connection,\n * regardless of whether the connected USB device matches the previous one.\n *\n * @param {ReconnectCallback} onReconnect - Callback to request device reconnection on Android.\n */\n async waitForConnect(onReconnect: ReconnectCallback = () => {}) {\n // On Android, we need to request the user to reconnect the device manually\n // because there is no support for automatic reconnection.\n if (navigator.userAgent.includes(\"Android\")) {\n await this.waitForDisconnect();\n onReconnect();\n }\n\n return await new Promise((resolve, reject) => {\n this._connectResolve = resolve;\n this._connectReject = reject;\n });\n }\n\n /**\n * Request the user to select a USB device and connect to it using the\n * fastboot protocol.\n *\n * @throws {UsbError}\n */\n async connect() {\n let devices = await navigator.usb.getDevices();\n common.logDebug(\"Found paired USB devices:\", devices);\n if (devices.length === 1) {\n this.device = devices[0];\n } else {\n // If multiple paired devices are connected, request the user to\n // select a specific one to reduce ambiguity. This is also necessary\n // if no devices are already paired, i.e. first use.\n common.logDebug(\n \"No or multiple paired devices are connected, requesting one\"\n );\n this.device = await navigator.usb.requestDevice({\n filters: [\n {\n classCode: FASTBOOT_USB_CLASS,\n subclassCode: FASTBOOT_USB_SUBCLASS,\n protocolCode: FASTBOOT_USB_PROTOCOL,\n },\n ],\n });\n }\n common.logDebug(\"Using USB device:\", this.device);\n\n if (!this._registeredUsbListeners) {\n navigator.usb.addEventListener(\"disconnect\", (event) => {\n if (event.device === this.device) {\n common.logDebug(\"USB device disconnected\");\n if (this._disconnectResolve !== null) {\n this._disconnectResolve(undefined);\n this._disconnectResolve = null;\n }\n }\n });\n\n navigator.usb.addEventListener(\"connect\", async (event) => {\n common.logDebug(\"USB device connected\");\n this.device = event.device;\n\n // Check whether waitForConnect() is pending and save it for later\n let hasPromiseReject = this._connectReject !== null;\n try {\n await this._validateAndConnectDevice();\n } catch (error) {\n // Only rethrow errors from the event handler if waitForConnect()\n // didn't already handle them\n if (!hasPromiseReject) {\n throw error;\n }\n }\n });\n\n this._registeredUsbListeners = true;\n }\n\n await this._validateAndConnectDevice();\n }\n\n /**\n * Read a raw command response from the bootloader.\n *\n * @private\n * @returns {Promise} Object containing response text and data size, if any.\n * @throws {FastbootError}\n */\n private async _readResponse(): Promise {\n let respData = {\n text: \"\",\n } as CommandResponse;\n let respStatus;\n\n do {\n let respPacket = await this.device!.transferIn(this.epIn!, 64);\n let response = new TextDecoder().decode(respPacket.data);\n\n respStatus = response.substring(0, 4);\n let respMessage = response.substring(4);\n common.logDebug(`Response: ${respStatus} ${respMessage}`);\n\n if (respStatus === \"OKAY\") {\n // OKAY = end of response for this command\n respData.text += respMessage;\n } else if (respStatus === \"INFO\") {\n // INFO = additional info line\n respData.text += respMessage + \"\\n\";\n } else if (respStatus === \"DATA\") {\n // DATA = hex string, but it's returned separately for safety\n respData.dataSize = respMessage;\n } else {\n // Assume FAIL or garbage data\n throw new FastbootError(respStatus, respMessage);\n }\n // INFO = more packets are coming\n } while (respStatus === \"INFO\");\n\n return respData;\n }\n\n /**\n * Send a textual command to the bootloader and read the response.\n * This is in raw fastboot format, not AOSP fastboot syntax.\n *\n * @param {string} command - The command to send.\n * @returns {Promise} Object containing response text and data size, if any.\n * @throws {FastbootError}\n */\n async runCommand(command: string): Promise {\n // Command and response length is always 64 bytes regardless of protocol\n if (command.length > 64) {\n throw new RangeError();\n }\n\n // Send raw UTF-8 command\n let cmdPacket = new TextEncoder().encode(command);\n await this.device!.transferOut(this.epOut!, cmdPacket);\n common.logDebug(\"Command:\", command);\n\n return this._readResponse();\n }\n\n /**\n * Read the value of a bootloader variable. Returns undefined if the variable\n * does not exist.\n *\n * @param {string} varName - The name of the variable to get.\n * @returns {Promise} Textual content of the variable.\n * @throws {FastbootError}\n */\n async getVariable(varName: string): Promise {\n let resp;\n try {\n resp = (\n await common.runWithTimeout(\n this.runCommand(`getvar:${varName}`),\n GETVAR_TIMEOUT\n )\n ).text;\n } catch (error) {\n // Some bootloaders return FAIL instead of empty responses, despite\n // what the spec says. Normalize it here.\n if (error instanceof FastbootError && error.status == \"FAIL\") {\n resp = null;\n } else {\n throw error;\n }\n }\n\n // Some bootloaders send whitespace around some variables.\n // According to the spec, non-existent variables should return empty\n // responses\n return resp ? resp.trim() : null;\n }\n\n /**\n * Get the maximum download size for a single payload, in bytes.\n *\n * @private\n * @returns {Promise}\n * @throws {FastbootError}\n */\n private async _getDownloadSize(): Promise {\n try {\n let resp = (await this.getVariable(\n \"max-download-size\"\n ))!.toLowerCase();\n if (resp) {\n // AOSP fastboot requires hex\n return Math.min(parseInt(resp, 16), MAX_DOWNLOAD_SIZE);\n }\n } catch (error) {\n /* Failed = no value, fallthrough */\n }\n\n // FAIL or empty variable means no max, set a reasonable limit to conserve memory\n return DEFAULT_DOWNLOAD_SIZE;\n }\n\n /**\n * Send a raw data payload to the bootloader.\n *\n * @private\n */\n private async _sendRawPayload(\n buffer: ArrayBuffer,\n onProgress: FlashProgressCallback\n ) {\n let i = 0;\n let remainingBytes = buffer.byteLength;\n while (remainingBytes > 0) {\n let chunk = buffer.slice(\n i * BULK_TRANSFER_SIZE,\n (i + 1) * BULK_TRANSFER_SIZE\n );\n if (i % 1000 === 0) {\n common.logVerbose(\n ` Sending ${chunk.byteLength} bytes to endpoint, ${remainingBytes} remaining, i=${i}`\n );\n }\n if (i % 10 === 0) {\n onProgress(\n (buffer.byteLength - remainingBytes) / buffer.byteLength\n );\n }\n\n await this.device!.transferOut(this.epOut!, chunk);\n\n remainingBytes -= chunk.byteLength;\n i += 1;\n }\n\n onProgress(1.0);\n }\n\n /**\n * Upload a payload to the bootloader for later use, e.g. flashing.\n * Does not handle raw images, flashing, or splitting.\n *\n * @param {string} partition - Name of the partition the payload is intended for.\n * @param {ArrayBuffer} buffer - Buffer containing the data to upload.\n * @param {FlashProgressCallback} onProgress - Callback for upload progress updates.\n * @throws {FastbootError}\n */\n async upload(\n partition: string,\n buffer: ArrayBuffer,\n onProgress: FlashProgressCallback = (_progress) => {}\n ) {\n common.logDebug(\n `Uploading single sparse to ${partition}: ${buffer.byteLength} bytes`\n );\n\n // Bootloader requires an 8-digit hex number\n let xferHex = buffer.byteLength.toString(16).padStart(8, \"0\");\n if (xferHex.length !== 8) {\n throw new FastbootError(\n \"FAIL\",\n `Transfer size overflow: ${xferHex} is more than 8 digits`\n );\n }\n\n // Check with the device and make sure size matches\n let downloadResp = await this.runCommand(`download:${xferHex}`);\n if (downloadResp.dataSize === undefined) {\n throw new FastbootError(\n \"FAIL\",\n `Unexpected response to download command: ${downloadResp.text}`\n );\n }\n let downloadSize = parseInt(downloadResp.dataSize!, 16);\n if (downloadSize !== buffer.byteLength) {\n throw new FastbootError(\n \"FAIL\",\n `Bootloader wants ${buffer.byteLength} bytes, requested to send ${buffer.byteLength} bytes`\n );\n }\n\n common.logDebug(`Sending payload: ${buffer.byteLength} bytes`);\n await this._sendRawPayload(buffer, onProgress);\n\n common.logDebug(\"Payload sent, waiting for response...\");\n await this._readResponse();\n }\n\n /**\n * Reboot to the given target, and optionally wait for the device to\n * reconnect.\n *\n * @param {string} target - Where to reboot to, i.e. fastboot or bootloader.\n * @param {boolean} wait - Whether to wait for the device to reconnect.\n * @param {ReconnectCallback} onReconnect - Callback to request device reconnection, if wait is enabled.\n */\n async reboot(\n target: string = \"\",\n wait: boolean = false,\n onReconnect: ReconnectCallback = () => {}\n ) {\n if (target.length > 0) {\n await this.runCommand(`reboot-${target}`);\n } else {\n await this.runCommand(\"reboot\");\n }\n\n if (wait) {\n await this.waitForConnect(onReconnect);\n }\n }\n\n /**\n * Flash the given Blob to the given partition on the device. Any image\n * format supported by the bootloader is allowed, e.g. sparse or raw images.\n * Large raw images will be converted to sparse images automatically, and\n * large sparse images will be split and flashed in multiple passes\n * depending on the bootloader's payload size limit.\n *\n * @param {string} partition - The name of the partition to flash.\n * @param {Blob} blob - The Blob to retrieve data from.\n * @param {FlashProgressCallback} onProgress - Callback for flashing progress updates.\n * @throws {FastbootError}\n */\n async flashBlob(\n partition: string,\n blob: Blob,\n onProgress: FlashProgressCallback = (_progress) => {}\n ) {\n // Use current slot if partition is A/B\n if ((await this.getVariable(`has-slot:${partition}`)) === \"yes\") {\n partition += \"_\" + (await this.getVariable(\"current-slot\"));\n }\n\n let maxDlSize = await this._getDownloadSize();\n let fileHeader = await common.readBlobAsBuffer(\n blob.slice(0, Sparse.FILE_HEADER_SIZE)\n );\n\n let totalBytes = blob.size;\n let isSparse = false;\n try {\n let sparseHeader = Sparse.parseFileHeader(fileHeader);\n if (sparseHeader !== null) {\n totalBytes = sparseHeader.blocks * sparseHeader.blockSize;\n isSparse = true;\n }\n } catch (error) {\n // ImageError = invalid, so keep blob.size\n }\n\n // Logical partitions need to be resized before flashing because they're\n // sized perfectly to the payload.\n if ((await this.getVariable(`is-logical:${partition}`)) === \"yes\") {\n // As per AOSP fastboot, we reset the partition to 0 bytes first\n // to optimize extent allocation.\n await this.runCommand(`resize-logical-partition:${partition}:0`);\n // Set the actual size\n await this.runCommand(\n `resize-logical-partition:${partition}:${totalBytes}`\n );\n }\n\n // Convert image to sparse (for splitting) if it exceeds the size limit\n if (blob.size > maxDlSize && !isSparse) {\n common.logDebug(`${partition} image is raw, converting to sparse`);\n blob = await Sparse.fromRaw(blob);\n }\n\n common.logDebug(\n `Flashing ${blob.size} bytes to ${partition}, ${maxDlSize} bytes per split`\n );\n let splits = 0;\n let sentBytes = 0;\n for await (let split of Sparse.splitBlob(blob, maxDlSize)) {\n await this.upload(partition, split.data, (progress) => {\n onProgress((sentBytes + progress * split.bytes) / totalBytes);\n });\n\n common.logDebug(\"Flashing payload...\");\n await this.runCommand(`flash:${partition}`);\n\n splits += 1;\n sentBytes += split.bytes;\n }\n\n common.logDebug(`Flashed ${partition} with ${splits} split(s)`);\n }\n\n /**\n * Boot the given Blob on the device.\n * Equivalent to `fastboot boot boot.img`.\n *\n * @param {Blob} blob - The Blob to retrieve data from.\n * @param {FlashProgressCallback} onProgress - Callback for flashing progress updates.\n * @throws {FastbootError}\n */\n async bootBlob(\n blob: Blob,\n onProgress: FlashProgressCallback = (_progress) => {}\n ) {\n\n common.logDebug(`Booting ${blob.size} bytes image`);\n\n let data = await common.readBlobAsBuffer(blob);\n await this.upload(\"boot.img\", data, onProgress);\n\n common.logDebug(\"Booting payload...\");\n await this.runCommand(\"boot\");\n\n common.logDebug(`Booted ${blob.size} bytes image`);\n }\n\n /**\n * Flash the given factory images zip onto the device, with automatic handling\n * of firmware, system, and logical partitions as AOSP fastboot and\n * flash-all.sh would do.\n * Equivalent to `fastboot update name.zip`.\n *\n * @param {Blob} blob - Blob containing the zip file to flash.\n * @param {boolean} wipe - Whether to wipe super and userdata. Equivalent to `fastboot -w`.\n * @param {ReconnectCallback} onReconnect - Callback to request device reconnection.\n * @param {FactoryProgressCallback} onProgress - Progress callback for image flashing.\n */\n async flashFactoryZip(\n blob: Blob,\n wipe: boolean,\n onReconnect: ReconnectCallback,\n onProgress: FactoryProgressCallback = (_progress) => {}\n ) {\n return await flashFactoryZip(this, blob, wipe, onReconnect, onProgress);\n }\n}\n"],"names":["common.readBlobAsBuffer","common.logDebug","common.logVerbose","MAX_BITS","Z_NO_FLUSH","Z_FINISH","Z_OK","Z_STREAM_END","Z_NEED_DICT","Z_STREAM_ERROR","Z_DATA_ERROR","Z_BUF_ERROR","STORED","PRESET_DICT","Z_DEFLATED","ZStream","UNDEFINED_TYPE","FUNCTION_TYPE","table","createKeys","runWorker","configureWebWorker","Deflate","Inflate","common.zipGetData","common.runWithTimedProgress","common.runWithTimeout","Sparse.FILE_HEADER_SIZE","Sparse.parseFileHeader","Sparse.fromRaw","Sparse.splitBlob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AAC,SAAS,KAAI,GAAG,EAAA;QAGrDA,QAAe,CAAC,CAAA,QAAA,EAAW,IAAI,CAAC,IAAI,CAAc,YAAA,CAAA,CAAC,CAAC;QAEpD,IAAI,IAAI,GAAG,MAAMD,gBAAuB,CAAC,IAAI,CAAC,CAAC;QAC/C,MAAM,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE,IAAI,EAAE,UAAU,CAAC,CAAC;AAEhD,QAAAC,QAAe,CAAC,oBAAoB,CAAC,CAAC;AACtC,QAAA,MAAM,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;QAE9BA,QAAe,CAAC,CAAA,OAAA,EAAU,IAAI,CAAC,IAAI,CAAc,YAAA,CAAA,CAAC,CAAC;KACtD;AAED;;;;;;;;;;AAUG;AACH,IAAA,MAAM,eAAe,CACjB,IAAU,EACV,IAAa,EACb,WAA8B,EAC9B,aAAsC,CAAC,SAAS,QAAO,EAAA;AAEvD,QAAA,OAAO,MAAM8B,QAAe,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,WAAW,EAAE,UAAU,CAAC,CAAC;KAC3E;AACJ;;;;","x_google_ignoreList":[2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]} \ No newline at end of file diff --git a/dist/vendor/pako_inflate.min.js b/dist/vendor/pako_inflate.min.js deleted file mode 100644 index 587fbdd..0000000 --- a/dist/vendor/pako_inflate.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! pako 2.1.0 https://github.com/nodeca/pako @license (MIT AND Zlib) */ -!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).pako={})}(this,(function(e){"use strict";var t=(e,t,i,n)=>{let a=65535&e|0,r=e>>>16&65535|0,o=0;for(;0!==i;){o=i>2e3?2e3:i,i-=o;do{a=a+t[n++]|0,r=r+a|0}while(--o);a%=65521,r%=65521}return a|r<<16|0};const i=new Uint32Array((()=>{let e,t=[];for(var i=0;i<256;i++){e=i;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[i]=e}return t})());var n=(e,t,n,a)=>{const r=i,o=a+n;e^=-1;for(let i=a;i>>8^r[255&(e^t[i])];return-1^e};const a=16209;var r=function(e,t){let i,n,r,o,s,l,d,f,c,h,u,w,b,m,k,_,g,p,v,x,y,E,R,A;const Z=e.state;i=e.next_in,R=e.input,n=i+(e.avail_in-5),r=e.next_out,A=e.output,o=r-(t-e.avail_out),s=r+(e.avail_out-257),l=Z.dmax,d=Z.wsize,f=Z.whave,c=Z.wnext,h=Z.window,u=Z.hold,w=Z.bits,b=Z.lencode,m=Z.distcode,k=(1<>>24,u>>>=p,w-=p,p=g>>>16&255,0===p)A[r++]=65535&g;else{if(!(16&p)){if(0==(64&p)){g=b[(65535&g)+(u&(1<>>=p,w-=p),w<15&&(u+=R[i++]<>>24,u>>>=p,w-=p,p=g>>>16&255,!(16&p)){if(0==(64&p)){g=m[(65535&g)+(u&(1<l){e.msg="invalid distance too far back",Z.mode=a;break e}if(u>>>=p,w-=p,p=r-o,x>p){if(p=x-p,p>f&&Z.sane){e.msg="invalid distance too far back",Z.mode=a;break e}if(y=0,E=h,0===c){if(y+=d-p,p2;)A[r++]=E[y++],A[r++]=E[y++],A[r++]=E[y++],v-=3;v&&(A[r++]=E[y++],v>1&&(A[r++]=E[y++]))}else{y=r-x;do{A[r++]=A[y++],A[r++]=A[y++],A[r++]=A[y++],v-=3}while(v>2);v&&(A[r++]=A[y++],v>1&&(A[r++]=A[y++]))}break}}break}}while(i>3,i-=v,w-=v<<3,u&=(1<{const u=h.bits;let w,b,m,k,_,g,p=0,v=0,x=0,y=0,E=0,R=0,A=0,Z=0,S=0,T=0,O=null;const U=new Uint16Array(16),D=new Uint16Array(16);let I,B,N,C=null;for(p=0;p<=o;p++)U[p]=0;for(v=0;v=1&&0===U[y];y--);if(E>y&&(E=y),0===y)return a[r++]=20971520,a[r++]=20971520,h.bits=1,0;for(x=1;x0&&(0===e||1!==y))return-1;for(D[1]=0,p=1;p852||2===e&&S>592)return 1;for(;;){I=p-A,c[v]+1=g?(B=C[c[v]-g],N=O[c[v]-g]):(B=96,N=0),w=1<>A)+b]=I<<24|B<<16|N|0}while(0!==b);for(w=1<>=1;if(0!==w?(T&=w-1,T+=w):T=0,v++,0==--U[p]){if(p===y)break;p=t[i+c[v]]}if(p>E&&(T&k)!==m){for(0===A&&(A=E),_+=x,R=p-A,Z=1<852||2===e&&S>592)return 1;m=T&k,a[m]=E<<24|R<<16|_-r|0}}return 0!==T&&(a[_+T]=p-A<<24|64<<16|0),h.bits=E,0},h={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};const{Z_FINISH:u,Z_BLOCK:w,Z_TREES:b,Z_OK:m,Z_STREAM_END:k,Z_NEED_DICT:_,Z_STREAM_ERROR:g,Z_DATA_ERROR:p,Z_MEM_ERROR:v,Z_BUF_ERROR:x,Z_DEFLATED:y}=h,E=16180,R=16190,A=16191,Z=16192,S=16194,T=16199,O=16200,U=16206,D=16209,I=e=>(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24);function B(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const N=e=>{if(!e)return 1;const t=e.state;return!t||t.strm!==e||t.mode16211?1:0},C=e=>{if(N(e))return g;const t=e.state;return e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=E,t.last=0,t.havedict=0,t.flags=-1,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Int32Array(852),t.distcode=t.distdyn=new Int32Array(592),t.sane=1,t.back=-1,m},z=e=>{if(N(e))return g;const t=e.state;return t.wsize=0,t.whave=0,t.wnext=0,C(e)},F=(e,t)=>{let i;if(N(e))return g;const n=e.state;return t<0?(i=0,t=-t):(i=5+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?g:(null!==n.window&&n.wbits!==t&&(n.window=null),n.wrap=i,n.wbits=t,z(e))},L=(e,t)=>{if(!e)return g;const i=new B;e.state=i,i.strm=e,i.window=null,i.mode=E;const n=F(e,t);return n!==m&&(e.state=null),n};let M,H,j=!0;const K=e=>{if(j){M=new Int32Array(512),H=new Int32Array(32);let t=0;for(;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(c(1,e.lens,0,288,M,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;c(2,e.lens,0,32,H,0,e.work,{bits:5}),j=!1}e.lencode=M,e.lenbits=9,e.distcode=H,e.distbits=5},P=(e,t,i,n)=>{let a;const r=e.state;return null===r.window&&(r.wsize=1<=r.wsize?(r.window.set(t.subarray(i-r.wsize,i),0),r.wnext=0,r.whave=r.wsize):(a=r.wsize-r.wnext,a>n&&(a=n),r.window.set(t.subarray(i-n,i-n+a),r.wnext),(n-=a)?(r.window.set(t.subarray(i-n,i),0),r.wnext=n,r.whave=r.wsize):(r.wnext+=a,r.wnext===r.wsize&&(r.wnext=0),r.whaveL(e,15),inflateInit2:L,inflate:(e,i)=>{let a,o,s,l,d,f,h,B,C,z,F,L,M,H,j,Y,G,X,W,q,J,Q,V=0;const $=new Uint8Array(4);let ee,te;const ie=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(N(e)||!e.output||!e.input&&0!==e.avail_in)return g;a=e.state,a.mode===A&&(a.mode=Z),d=e.next_out,s=e.output,h=e.avail_out,l=e.next_in,o=e.input,f=e.avail_in,B=a.hold,C=a.bits,z=f,F=h,Q=m;e:for(;;)switch(a.mode){case E:if(0===a.wrap){a.mode=Z;break}for(;C<16;){if(0===f)break e;f--,B+=o[l++]<>>8&255,a.check=n(a.check,$,2,0),B=0,C=0,a.mode=16181;break}if(a.head&&(a.head.done=!1),!(1&a.wrap)||(((255&B)<<8)+(B>>8))%31){e.msg="incorrect header check",a.mode=D;break}if((15&B)!==y){e.msg="unknown compression method",a.mode=D;break}if(B>>>=4,C-=4,J=8+(15&B),0===a.wbits&&(a.wbits=J),J>15||J>a.wbits){e.msg="invalid window size",a.mode=D;break}a.dmax=1<>8&1),512&a.flags&&4&a.wrap&&($[0]=255&B,$[1]=B>>>8&255,a.check=n(a.check,$,2,0)),B=0,C=0,a.mode=16182;case 16182:for(;C<32;){if(0===f)break e;f--,B+=o[l++]<>>8&255,$[2]=B>>>16&255,$[3]=B>>>24&255,a.check=n(a.check,$,4,0)),B=0,C=0,a.mode=16183;case 16183:for(;C<16;){if(0===f)break e;f--,B+=o[l++]<>8),512&a.flags&&4&a.wrap&&($[0]=255&B,$[1]=B>>>8&255,a.check=n(a.check,$,2,0)),B=0,C=0,a.mode=16184;case 16184:if(1024&a.flags){for(;C<16;){if(0===f)break e;f--,B+=o[l++]<>>8&255,a.check=n(a.check,$,2,0)),B=0,C=0}else a.head&&(a.head.extra=null);a.mode=16185;case 16185:if(1024&a.flags&&(L=a.length,L>f&&(L=f),L&&(a.head&&(J=a.head.extra_len-a.length,a.head.extra||(a.head.extra=new Uint8Array(a.head.extra_len)),a.head.extra.set(o.subarray(l,l+L),J)),512&a.flags&&4&a.wrap&&(a.check=n(a.check,o,L,l)),f-=L,l+=L,a.length-=L),a.length))break e;a.length=0,a.mode=16186;case 16186:if(2048&a.flags){if(0===f)break e;L=0;do{J=o[l+L++],a.head&&J&&a.length<65536&&(a.head.name+=String.fromCharCode(J))}while(J&&L>9&1,a.head.done=!0),e.adler=a.check=0,a.mode=A;break;case 16189:for(;C<32;){if(0===f)break e;f--,B+=o[l++]<>>=7&C,C-=7&C,a.mode=U;break}for(;C<3;){if(0===f)break e;f--,B+=o[l++]<>>=1,C-=1,3&B){case 0:a.mode=16193;break;case 1:if(K(a),a.mode=T,i===b){B>>>=2,C-=2;break e}break;case 2:a.mode=16196;break;case 3:e.msg="invalid block type",a.mode=D}B>>>=2,C-=2;break;case 16193:for(B>>>=7&C,C-=7&C;C<32;){if(0===f)break e;f--,B+=o[l++]<>>16^65535)){e.msg="invalid stored block lengths",a.mode=D;break}if(a.length=65535&B,B=0,C=0,a.mode=S,i===b)break e;case S:a.mode=16195;case 16195:if(L=a.length,L){if(L>f&&(L=f),L>h&&(L=h),0===L)break e;s.set(o.subarray(l,l+L),d),f-=L,l+=L,h-=L,d+=L,a.length-=L;break}a.mode=A;break;case 16196:for(;C<14;){if(0===f)break e;f--,B+=o[l++]<>>=5,C-=5,a.ndist=1+(31&B),B>>>=5,C-=5,a.ncode=4+(15&B),B>>>=4,C-=4,a.nlen>286||a.ndist>30){e.msg="too many length or distance symbols",a.mode=D;break}a.have=0,a.mode=16197;case 16197:for(;a.have>>=3,C-=3}for(;a.have<19;)a.lens[ie[a.have++]]=0;if(a.lencode=a.lendyn,a.lenbits=7,ee={bits:a.lenbits},Q=c(0,a.lens,0,19,a.lencode,0,a.work,ee),a.lenbits=ee.bits,Q){e.msg="invalid code lengths set",a.mode=D;break}a.have=0,a.mode=16198;case 16198:for(;a.have>>24,Y=V>>>16&255,G=65535&V,!(j<=C);){if(0===f)break e;f--,B+=o[l++]<>>=j,C-=j,a.lens[a.have++]=G;else{if(16===G){for(te=j+2;C>>=j,C-=j,0===a.have){e.msg="invalid bit length repeat",a.mode=D;break}J=a.lens[a.have-1],L=3+(3&B),B>>>=2,C-=2}else if(17===G){for(te=j+3;C>>=j,C-=j,J=0,L=3+(7&B),B>>>=3,C-=3}else{for(te=j+7;C>>=j,C-=j,J=0,L=11+(127&B),B>>>=7,C-=7}if(a.have+L>a.nlen+a.ndist){e.msg="invalid bit length repeat",a.mode=D;break}for(;L--;)a.lens[a.have++]=J}}if(a.mode===D)break;if(0===a.lens[256]){e.msg="invalid code -- missing end-of-block",a.mode=D;break}if(a.lenbits=9,ee={bits:a.lenbits},Q=c(1,a.lens,0,a.nlen,a.lencode,0,a.work,ee),a.lenbits=ee.bits,Q){e.msg="invalid literal/lengths set",a.mode=D;break}if(a.distbits=6,a.distcode=a.distdyn,ee={bits:a.distbits},Q=c(2,a.lens,a.nlen,a.ndist,a.distcode,0,a.work,ee),a.distbits=ee.bits,Q){e.msg="invalid distances set",a.mode=D;break}if(a.mode=T,i===b)break e;case T:a.mode=O;case O:if(f>=6&&h>=258){e.next_out=d,e.avail_out=h,e.next_in=l,e.avail_in=f,a.hold=B,a.bits=C,r(e,F),d=e.next_out,s=e.output,h=e.avail_out,l=e.next_in,o=e.input,f=e.avail_in,B=a.hold,C=a.bits,a.mode===A&&(a.back=-1);break}for(a.back=0;V=a.lencode[B&(1<>>24,Y=V>>>16&255,G=65535&V,!(j<=C);){if(0===f)break e;f--,B+=o[l++]<>X)],j=V>>>24,Y=V>>>16&255,G=65535&V,!(X+j<=C);){if(0===f)break e;f--,B+=o[l++]<>>=X,C-=X,a.back+=X}if(B>>>=j,C-=j,a.back+=j,a.length=G,0===Y){a.mode=16205;break}if(32&Y){a.back=-1,a.mode=A;break}if(64&Y){e.msg="invalid literal/length code",a.mode=D;break}a.extra=15&Y,a.mode=16201;case 16201:if(a.extra){for(te=a.extra;C>>=a.extra,C-=a.extra,a.back+=a.extra}a.was=a.length,a.mode=16202;case 16202:for(;V=a.distcode[B&(1<>>24,Y=V>>>16&255,G=65535&V,!(j<=C);){if(0===f)break e;f--,B+=o[l++]<>X)],j=V>>>24,Y=V>>>16&255,G=65535&V,!(X+j<=C);){if(0===f)break e;f--,B+=o[l++]<>>=X,C-=X,a.back+=X}if(B>>>=j,C-=j,a.back+=j,64&Y){e.msg="invalid distance code",a.mode=D;break}a.offset=G,a.extra=15&Y,a.mode=16203;case 16203:if(a.extra){for(te=a.extra;C>>=a.extra,C-=a.extra,a.back+=a.extra}if(a.offset>a.dmax){e.msg="invalid distance too far back",a.mode=D;break}a.mode=16204;case 16204:if(0===h)break e;if(L=F-h,a.offset>L){if(L=a.offset-L,L>a.whave&&a.sane){e.msg="invalid distance too far back",a.mode=D;break}L>a.wnext?(L-=a.wnext,M=a.wsize-L):M=a.wnext-L,L>a.length&&(L=a.length),H=a.window}else H=s,M=d-a.offset,L=a.length;L>h&&(L=h),h-=L,a.length-=L;do{s[d++]=H[M++]}while(--L);0===a.length&&(a.mode=O);break;case 16205:if(0===h)break e;s[d++]=a.length,h--,a.mode=O;break;case U:if(a.wrap){for(;C<32;){if(0===f)break e;f--,B|=o[l++]<{if(N(e))return g;let t=e.state;return t.window&&(t.window=null),e.state=null,m},inflateGetHeader:(e,t)=>{if(N(e))return g;const i=e.state;return 0==(2&i.wrap)?g:(i.head=t,t.done=!1,m)},inflateSetDictionary:(e,i)=>{const n=i.length;let a,r,o;return N(e)?g:(a=e.state,0!==a.wrap&&a.mode!==R?g:a.mode===R&&(r=1,r=t(r,i,n,0),r!==a.check)?p:(o=P(e,i,n,n),o?(a.mode=16210,v):(a.havedict=1,m)))},inflateInfo:"pako inflate (from Nodeca project)"};const G=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var X=function(e){const t=Array.prototype.slice.call(arguments,1);for(;t.length;){const i=t.shift();if(i){if("object"!=typeof i)throw new TypeError(i+"must be non-object");for(const t in i)G(i,t)&&(e[t]=i[t])}}return e},W=e=>{let t=0;for(let i=0,n=e.length;i=252?6:e>=248?5:e>=240?4:e>=224?3:e>=192?2:1;J[254]=J[254]=1;var Q=e=>{if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(e);let t,i,n,a,r,o=e.length,s=0;for(a=0;a>>6,t[r++]=128|63&i):i<65536?(t[r++]=224|i>>>12,t[r++]=128|i>>>6&63,t[r++]=128|63&i):(t[r++]=240|i>>>18,t[r++]=128|i>>>12&63,t[r++]=128|i>>>6&63,t[r++]=128|63&i);return t},V=(e,t)=>{const i=t||e.length;if("function"==typeof TextDecoder&&TextDecoder.prototype.decode)return(new TextDecoder).decode(e.subarray(0,t));let n,a;const r=new Array(2*i);for(a=0,n=0;n4)r[a++]=65533,n+=o-1;else{for(t&=2===o?31:3===o?15:7;o>1&&n1?r[a++]=65533:t<65536?r[a++]=t:(t-=65536,r[a++]=55296|t>>10&1023,r[a++]=56320|1023&t)}}return((e,t)=>{if(t<65534&&e.subarray&&q)return String.fromCharCode.apply(null,e.length===t?e:e.subarray(0,t));let i="";for(let n=0;n{(t=t||e.length)>e.length&&(t=e.length);let i=t-1;for(;i>=0&&128==(192&e[i]);)i--;return i<0||0===i?t:i+J[e[i]]>t?i:t},ee={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"};var te=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0};var ie=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1};const ne=Object.prototype.toString,{Z_NO_FLUSH:ae,Z_FINISH:re,Z_OK:oe,Z_STREAM_END:se,Z_NEED_DICT:le,Z_STREAM_ERROR:de,Z_DATA_ERROR:fe,Z_MEM_ERROR:ce}=h;function he(e){this.options=X({chunkSize:65536,windowBits:15,to:""},e||{});const t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&0==(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new te,this.strm.avail_out=0;let i=Y.inflateInit2(this.strm,t.windowBits);if(i!==oe)throw new Error(ee[i]);if(this.header=new ie,Y.inflateGetHeader(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=Q(t.dictionary):"[object ArrayBuffer]"===ne.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(i=Y.inflateSetDictionary(this.strm,t.dictionary),i!==oe)))throw new Error(ee[i])}function ue(e,t){const i=new he(t);if(i.push(e),i.err)throw i.msg||ee[i.err];return i.result}he.prototype.push=function(e,t){const i=this.strm,n=this.options.chunkSize,a=this.options.dictionary;let r,o,s;if(this.ended)return!1;for(o=t===~~t?t:!0===t?re:ae,"[object ArrayBuffer]"===ne.call(e)?i.input=new Uint8Array(e):i.input=e,i.next_in=0,i.avail_in=i.input.length;;){for(0===i.avail_out&&(i.output=new Uint8Array(n),i.next_out=0,i.avail_out=n),r=Y.inflate(i,o),r===le&&a&&(r=Y.inflateSetDictionary(i,a),r===oe?r=Y.inflate(i,o):r===fe&&(r=le));i.avail_in>0&&r===se&&i.state.wrap>0&&0!==e[i.next_in];)Y.inflateReset(i),r=Y.inflate(i,o);switch(r){case de:case fe:case le:case ce:return this.onEnd(r),this.ended=!0,!1}if(s=i.avail_out,i.next_out&&(0===i.avail_out||r===se))if("string"===this.options.to){let e=$(i.output,i.next_out),t=i.next_out-e,a=V(i.output,e);i.next_out=t,i.avail_out=n-t,t&&i.output.set(i.output.subarray(e,e+t),0),this.onData(a)}else this.onData(i.output.length===i.next_out?i.output:i.output.subarray(0,i.next_out));if(r!==oe||0!==s){if(r===se)return r=Y.inflateEnd(this.strm),this.onEnd(r),this.ended=!0,!0;if(0===i.avail_in)break}}return!0},he.prototype.onData=function(e){this.chunks.push(e)},he.prototype.onEnd=function(e){e===oe&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=W(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var we=he,be=ue,me=function(e,t){return(t=t||{}).raw=!0,ue(e,t)},ke=ue,_e=h,ge={Inflate:we,inflate:be,inflateRaw:me,ungzip:ke,constants:_e};e.Inflate=we,e.constants=_e,e.default=ge,e.inflate=be,e.inflateRaw=me,e.ungzip=ke,Object.defineProperty(e,"__esModule",{value:!0})})); diff --git a/dist/vendor/z-worker-pako.js b/dist/vendor/z-worker-pako.js deleted file mode 100644 index 960967d..0000000 --- a/dist/vendor/z-worker-pako.js +++ /dev/null @@ -1 +0,0 @@ -!function(){"use strict";const{Array:e,Object:t,Number:n,Math:s,Error:r,Uint8Array:a,Uint16Array:o,Uint32Array:i,Int32Array:c,Map:l,DataView:u,Promise:h,TextEncoder:f,crypto:p,postMessage:d,TransformStream:g,ReadableStream:w,WritableStream:y,CompressionStream:m,DecompressionStream:_}=self;class b{constructor(e){return class extends g{constructor(t,n){const s=new e(n);super({transform(e,t){t.enqueue(s.append(e))},flush(e){const t=s.flush();t&&e.enqueue(t)}})}}}}const v=[];for(let e=0;256>e;e++){let t=e;for(let e=0;8>e;e++)1&t?t=t>>>1^3988292384:t>>>=1;v[e]=t}class S{constructor(e){this.crc=e||-1}append(e){let t=0|this.crc;for(let n=0,s=0|e.length;s>n;n++)t=t>>>8^v[255&(t^e[n])];this.crc=t}get(){return~this.crc}}class k extends g{constructor(){const e=new S;super({transform(t){e.append(t)},flush(t){const n=new a(4);new u(n.buffer).setUint32(0,e.get()),t.enqueue(n)}})}}const z={concat(e,t){if(0===e.length||0===t.length)return e.concat(t);const n=e[e.length-1],s=z.getPartial(n);return 32===s?e.concat(t):z._shiftRight(t,s,0|n,e.slice(0,e.length-1))},bitLength(e){const t=e.length;if(0===t)return 0;const n=e[t-1];return 32*(t-1)+z.getPartial(n)},clamp(e,t){if(32*e.length0&&t&&(e[n-1]=z.partial(t,e[n-1]&2147483648>>t-1,1)),e},partial:(e,t,n)=>32===e?t:(n?0|t:t<<32-e)+1099511627776*e,getPartial:e=>s.round(e/1099511627776)||32,_shiftRight(e,t,n,s){for(void 0===s&&(s=[]);t>=32;t-=32)s.push(n),n=0;if(0===t)return s.concat(e);for(let r=0;r>>t),n=e[r]<<32-t;const r=e.length?e[e.length-1]:0,a=z.getPartial(r);return s.push(z.partial(t+a&31,t+a>32?n:s.pop(),1)),s}},D={bytes:{fromBits(e){const t=z.bitLength(e)/8,n=new a(t);let s;for(let r=0;t>r;r++)0==(3&r)&&(s=e[r/4]),n[r]=s>>>24,s<<=8;return n},toBits(e){const t=[];let n,s=0;for(n=0;n9007199254740991)throw new r("Cannot hash more than 2^53 - 1 bits");const o=new i(n);let c=0;for(let e=t.blockSize+s-(t.blockSize+s&t.blockSize-1);a>=e;e+=t.blockSize)t._block(o.subarray(16*c,16*(c+1))),c+=1;return n.splice(0,16*c),t}finalize(){const e=this;let t=e._buffer;const n=e._h;t=z.concat(t,[z.partial(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(s.floor(e._length/4294967296)),t.push(0|e._length);t.length;)e._block(t.splice(0,16));return e.reset(),n}_f(e,t,n,s){return e>19?e>39?e>59?e>79?void 0:t^n^s:t&n|t&s|n&s:t^n^s:t&n|~t&s}_S(e,t){return t<>>32-e}_block(t){const n=this,r=n._h,a=e(80);for(let e=0;16>e;e++)a[e]=t[e];let o=r[0],i=r[1],c=r[2],l=r[3],u=r[4];for(let e=0;79>=e;e++){16>e||(a[e]=n._S(1,a[e-3]^a[e-8]^a[e-14]^a[e-16]));const t=n._S(5,o)+n._f(e,i,c,l)+u+a[e]+n._key[s.floor(e/20)]|0;u=l,l=c,c=n._S(30,i),i=o,o=t}r[0]=r[0]+o|0,r[1]=r[1]+i|0,r[2]=r[2]+c|0,r[3]=r[3]+l|0,r[4]=r[4]+u|0}},I={getRandomValues(e){const t=new i(e.buffer),n=e=>{let t=987654321;const n=4294967295;return()=>(t=36969*(65535&t)+(t>>16)&n,(((t<<16)+(e=18e3*(65535&e)+(e>>16)&n)&n)/4294967296+.5)*(s.random()>.5?1:-1))};for(let r,a=0;anew R.hmacSha1(D.bytes.toBits(e)),pbkdf2(e,t,n,s){if(n=n||1e4,0>s||0>n)throw new r("invalid params to pbkdf2");const a=1+(s>>5)<<2;let o,i,c,l,h;const f=new ArrayBuffer(a),p=new u(f);let d=0;const g=z;for(t=D.bytes.toBits(t),h=1;(a||1)>d;h++){for(o=i=e.encrypt(g.concat(t,[h])),c=1;n>c;c++)for(i=e.encrypt(i),l=0;ld&&cr&&(e=(new n).update(e).finalize());for(let t=0;r>t;t++)s[0][t]=909522486^e[t],s[1][t]=1549556828^e[t];t._baseHash[0].update(s[0]),t._baseHash[1].update(s[1]),t._resultHash=new n(t._baseHash[0])}reset(){const e=this;e._resultHash=new e._hash(e._baseHash[0]),e._updated=!1}update(e){this._updated=!0,this._resultHash.update(e)}digest(){const e=this,t=e._resultHash.finalize(),n=new e._hash(e._baseHash[1]).update(t).finalize();return e.reset(),n}encrypt(e){if(this._updated)throw new r("encrypt on already updated hmac called!");return this.update(e),this.digest(e)}}},A=void 0!==p&&"function"==typeof p.getRandomValues,H="Invalid password",q="Invalid signature",B="zipjs-abort-check-password";function K(e){return A?p.getRandomValues(e):I.getRandomValues(e)}const V=16,x={name:"PBKDF2"},P=t.assign({hash:{name:"HMAC"}},x),T=t.assign({iterations:1e3,hash:{name:"SHA-1"}},x),E=["deriveBits"],M=[8,12,16],N=[16,24,32],U=10,W=[0,0,0,0],L="undefined",O="function",F=typeof p!=L,j=F&&p.subtle,G=F&&typeof j!=L,X=D.bytes,J=class{constructor(e){const t=this;t._tables=[[[],[],[],[],[]],[[],[],[],[],[]]],t._tables[0][0][0]||t._precompute();const n=t._tables[0][4],s=t._tables[1],a=e.length;let o,i,c,l=1;if(4!==a&&6!==a&&8!==a)throw new r("invalid aes key size");for(t._key=[i=e.slice(0),c=[]],o=a;4*a+28>o;o++){let e=i[o-1];(o%a==0||8===a&&o%a==4)&&(e=n[e>>>24]<<24^n[e>>16&255]<<16^n[e>>8&255]<<8^n[255&e],o%a==0&&(e=e<<8^e>>>24^l<<24,l=l<<1^283*(l>>7))),i[o]=i[o-a]^e}for(let e=0;o;e++,o--){const t=i[3&e?o:o-4];c[e]=4>=o||4>e?t:s[0][n[t>>>24]]^s[1][n[t>>16&255]]^s[2][n[t>>8&255]]^s[3][n[255&t]]}}encrypt(e){return this._crypt(e,0)}decrypt(e){return this._crypt(e,1)}_precompute(){const e=this._tables[0],t=this._tables[1],n=e[4],s=t[4],r=[],a=[];let o,i,c,l;for(let e=0;256>e;e++)a[(r[e]=e<<1^283*(e>>7))^e]=e;for(let u=o=0;!n[u];u^=i||1,o=a[o]||1){let a=o^o<<1^o<<2^o<<3^o<<4;a=a>>8^255&a^99,n[u]=a,s[a]=u,l=r[c=r[i=r[u]]];let h=16843009*l^65537*c^257*i^16843008*u,f=257*r[a]^16843008*a;for(let n=0;4>n;n++)e[n][u]=f=f<<24^f>>>8,t[n][a]=h=h<<24^h>>>8}for(let n=0;5>n;n++)e[n]=e[n].slice(0),t[n]=t[n].slice(0)}_crypt(e,t){if(4!==e.length)throw new r("invalid aes block size");const n=this._key[t],s=n.length/4-2,a=[0,0,0,0],o=this._tables[t],i=o[0],c=o[1],l=o[2],u=o[3],h=o[4];let f,p,d,g=e[0]^n[0],w=e[t?3:1]^n[1],y=e[2]^n[2],m=e[t?1:3]^n[3],_=4;for(let e=0;s>e;e++)f=i[g>>>24]^c[w>>16&255]^l[y>>8&255]^u[255&m]^n[_],p=i[w>>>24]^c[y>>16&255]^l[m>>8&255]^u[255&g]^n[_+1],d=i[y>>>24]^c[m>>16&255]^l[g>>8&255]^u[255&w]^n[_+2],m=i[m>>>24]^c[g>>16&255]^l[w>>8&255]^u[255&y]^n[_+3],_+=4,g=f,w=p,y=d;for(let e=0;4>e;e++)a[t?3&-e:e]=h[g>>>24]<<24^h[w>>16&255]<<16^h[y>>8&255]<<8^h[255&m]^n[_++],f=g,g=w,w=y,y=m,m=f;return a}},Q=class{constructor(e,t){this._prf=e,this._initIv=t,this._iv=t}reset(){this._iv=this._initIv}update(e){return this.calculate(this._prf,e,this._iv)}incWord(e){if(255==(e>>24&255)){let t=e>>16&255,n=e>>8&255,s=255&e;255===t?(t=0,255===n?(n=0,255===s?s=0:++s):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=s}else e+=1<<24;return e}incCounter(e){0===(e[0]=this.incWord(e[0]))&&(e[1]=this.incWord(e[1]))}calculate(e,t,n){let s;if(!(s=t.length))return[];const r=z.bitLength(t);for(let r=0;s>r;r+=4){this.incCounter(n);const s=e.encrypt(n);t[r]^=s[0],t[r+1]^=s[1],t[r+2]^=s[2],t[r+3]^=s[3]}return z.clamp(t,r)}},Y=R.hmacSha1;let Z=F&&G&&typeof j.importKey==O,$=F&&G&&typeof j.deriveBits==O;class ee extends g{constructor({password:e,signed:n,encryptionStrength:s,checkPasswordOnly:o}){super({start(){t.assign(this,{ready:new h((e=>this.resolveReady=e)),password:e,signed:n,strength:s-1,pending:new a})},async transform(e,t){const n=this,{password:s,strength:i,resolveReady:c,ready:l}=n;s?(await(async(e,t,n,s)=>{const a=await se(e,t,n,ae(s,0,M[t])),o=ae(s,M[t]);if(a[0]!=o[0]||a[1]!=o[1])throw new r(H)})(n,i,s,ae(e,0,M[i]+2)),e=ae(e,M[i]+2),o?t.error(new r(B)):c()):await l;const u=new a(e.length-U-(e.length-U)%V);t.enqueue(ne(n,e,u,0,U,!0))},async flush(e){const{signed:t,ctr:n,hmac:s,pending:o,ready:i}=this;await i;const c=ae(o,0,o.length-U),l=ae(o,o.length-U);let u=new a;if(c.length){const e=ie(X,c);s.update(e);const t=n.update(e);u=oe(X,t)}if(t){const e=ae(oe(X,s.digest()),0,U);for(let t=0;U>t;t++)if(e[t]!=l[t])throw new r(q)}e.enqueue(u)}})}}class te extends g{constructor({password:e,encryptionStrength:n}){let s;super({start(){t.assign(this,{ready:new h((e=>this.resolveReady=e)),password:e,strength:n-1,pending:new a})},async transform(e,t){const n=this,{password:s,strength:r,resolveReady:o,ready:i}=n;let c=new a;s?(c=await(async(e,t,n)=>{const s=K(new a(M[t]));return re(s,await se(e,t,n,s))})(n,r,s),o()):await i;const l=new a(c.length+e.length-e.length%V);l.set(c,0),t.enqueue(ne(n,e,l,c.length,0))},async flush(e){const{ctr:t,hmac:n,pending:r,ready:o}=this;await o;let i=new a;if(r.length){const e=t.update(ie(X,r));n.update(e),i=oe(X,e)}s.signature=oe(X,n.digest()).slice(0,U),e.enqueue(re(i,s.signature))}}),s=this}}function ne(e,t,n,s,r,o){const{ctr:i,hmac:c,pending:l}=e,u=t.length-r;let h;for(l.length&&(t=re(l,t),n=((e,t)=>{if(t&&t>e.length){const n=e;(e=new a(t)).set(n,0)}return e})(n,u-u%V)),h=0;u-V>=h;h+=V){const e=ie(X,ae(t,h,h+V));o&&c.update(e);const r=i.update(e);o||c.update(r),n.set(oe(X,r),h+s)}return e.pending=ae(t,h),n}async function se(n,s,r,o){n.password=null;const i=(e=>{if(void 0===f){const t=new a((e=unescape(encodeURIComponent(e))).length);for(let n=0;n{if(!Z)return R.importKey(t);try{return await j.importKey("raw",t,n,!1,r)}catch(e){return Z=!1,R.importKey(t)}})(0,i,P,0,E),l=await(async(e,t,n)=>{if(!$)return R.pbkdf2(t,e.salt,T.iterations,n);try{return await j.deriveBits(e,t,n)}catch(s){return $=!1,R.pbkdf2(t,e.salt,T.iterations,n)}})(t.assign({salt:o},T),c,8*(2*N[s]+2)),u=new a(l),h=ie(X,ae(u,0,N[s])),p=ie(X,ae(u,N[s],2*N[s])),d=ae(u,2*N[s]);return t.assign(n,{keys:{key:h,authentication:p,passwordVerification:d},ctr:new Q(new J(h),e.from(W)),hmac:new Y(p)}),d}function re(e,t){let n=e;return e.length+t.length&&(n=new a(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function ae(e,t,n){return e.subarray(t,n)}function oe(e,t){return e.fromBits(t)}function ie(e,t){return e.toBits(t)}class ce extends g{constructor({password:e,passwordVerification:n,checkPasswordOnly:s}){super({start(){t.assign(this,{password:e,passwordVerification:n}),fe(this,e)},transform(e,t){const n=this;if(n.password){const t=ue(n,e.subarray(0,12));if(n.password=null,t[11]!=n.passwordVerification)throw new r(H);e=e.subarray(12)}s?t.error(new r(B)):t.enqueue(ue(n,e))}})}}class le extends g{constructor({password:e,passwordVerification:n}){super({start(){t.assign(this,{password:e,passwordVerification:n}),fe(this,e)},transform(e,t){const n=this;let s,r;if(n.password){n.password=null;const t=K(new a(12));t[11]=n.passwordVerification,s=new a(e.length+t.length),s.set(he(n,t),0),r=12}else s=new a(e.length),r=0;s.set(he(n,e),r),t.enqueue(s)}})}}function ue(e,t){const n=new a(t.length);for(let s=0;s>>24]),a=~e.crcKey2.get(),e.keys=[n,r,a]}function de(e){const t=2|e.keys[2];return ge(s.imul(t,1^t)>>>8)}function ge(e){return 255&e}function we(e){return 4294967295&e}const ye="deflate-raw";class me extends g{constructor(e,{chunkSize:t,CompressionStream:n,CompressionStreamNative:s}){super({});const{compressed:r,encrypted:a,useCompressionStream:o,zipCrypto:i,signed:c,level:l}=e,h=this;let f,p,d=be(super.readable);a&&!i||!c||([d,f]=d.tee(),f=ke(f,new k)),r&&(d=Se(d,o,{level:l,chunkSize:t},s,n)),a&&(i?d=ke(d,new le(e)):(p=new te(e),d=ke(d,p))),ve(h,d,(async()=>{let e;a&&!i&&(e=p.signature),a&&!i||!c||(e=await f.getReader().read(),e=new u(e.value.buffer).getUint32(0)),h.signature=e}))}}class _e extends g{constructor(e,{chunkSize:t,DecompressionStream:n,DecompressionStreamNative:s}){super({});const{zipCrypto:a,encrypted:o,signed:i,signature:c,compressed:l,useCompressionStream:h}=e;let f,p,d=be(super.readable);o&&(a?d=ke(d,new ce(e)):(p=new ee(e),d=ke(d,p))),l&&(d=Se(d,h,{chunkSize:t},s,n)),o&&!a||!i||([d,f]=d.tee(),f=ke(f,new k)),ve(this,d,(async()=>{if((!o||a)&&i){const e=await f.getReader().read(),t=new u(e.value.buffer);if(c!=t.getUint32(0,!1))throw new r(q)}}))}}function be(e){return ke(e,new g({transform(e,t){e&&e.length&&t.enqueue(e)}}))}function ve(e,n,s){n=ke(n,new g({flush:s})),t.defineProperty(e,"readable",{get:()=>n})}function Se(e,t,n,s,r){try{e=ke(e,new(t&&s?s:r)(ye,n))}catch(s){if(!t)throw s;e=ke(e,new r(ye,n))}return e}function ke(e,t){return e.pipeThrough(t)}const ze="data";class De extends g{constructor(e,n){super({});const s=this,{codecType:r}=e;let a;r.startsWith("deflate")?a=me:r.startsWith("inflate")&&(a=_e);let o=0;const i=new a(e,n),c=super.readable,l=new g({transform(e,t){e&&e.length&&(o+=e.length,t.enqueue(e))},flush(){const{signature:e}=i;t.assign(s,{signature:e,size:o})}});t.defineProperty(s,"readable",{get:()=>c.pipeThrough(i).pipeThrough(l)})}}const Ce=new l,Ie=new l;let Re=0;async function Ae(e){try{const{options:t,scripts:s,config:r}=e;s&&s.length&&importScripts.apply(void 0,s),self.initCodec&&self.initCodec(),r.CompressionStreamNative=self.CompressionStream,r.DecompressionStreamNative=self.DecompressionStream,self.Deflate&&(r.CompressionStream=new b(self.Deflate)),self.Inflate&&(r.DecompressionStream=new b(self.Inflate));const a={highWaterMark:1,size:()=>r.chunkSize},o=e.readable||new w({async pull(e){const t=new h((e=>Ce.set(Re,e)));He({type:"pull",messageId:Re}),Re=(Re+1)%n.MAX_SAFE_INTEGER;const{value:s,done:r}=await t;e.enqueue(s),r&&e.close()}},a),i=e.writable||new y({async write(e){let t;const s=new h((e=>t=e));Ie.set(Re,t),He({type:ze,value:e,messageId:Re}),Re=(Re+1)%n.MAX_SAFE_INTEGER,await s}},a),c=new De(t,r);await o.pipeThrough(c).pipeTo(i,{preventClose:!0,preventAbort:!0});try{await i.close()}catch(e){}const{signature:l,size:u}=c;He({type:"close",result:{signature:l,size:u}})}catch(e){qe(e)}}function He(e){let{value:t}=e;if(t)if(t.length)try{t=new a(t),e.value=t.buffer,d(e,[e.value])}catch(t){d(e)}else d(e);else d(e)}function qe(e){const{message:t,stack:n,code:s,name:r}=e;d({error:{message:t,stack:n,code:s,name:r}})}function Be(e,n,s){return class{constructor(r){const o=this;t.hasOwn(r,"level")&&void 0===r.level&&delete r.level,o.codec=new e(t.assign({},n,r)),s(o.codec,(e=>{if(o.pendingData){const t=o.pendingData;o.pendingData=new a(t.length+e.length);const{pendingData:n}=o;n.set(t,0),n.set(e,t.length)}else o.pendingData=new a(e)}))}append(e){return this.codec.push(e),r(this)}flush(){return this.codec.push(new a,!0),r(this)}};function r(e){if(e.pendingData){const t=e.pendingData;return e.pendingData=null,t}return new a}}addEventListener("message",(({data:e})=>{const{type:t,messageId:n,value:s,done:r}=e;try{if("start"==t&&Ae(e),t==ze){const e=Ce.get(n);Ce.delete(n),e({value:new a(s),done:r})}if("ack"==t){const e=Ie.get(n);Ie.delete(n),e()}}catch(e){qe(e)}})),self.initCodec=()=>{const{Deflate:e,Inflate:t}=((e,t={},n)=>({Deflate:Be(e.Deflate,t.deflate,n),Inflate:Be(e.Inflate,t.inflate,n)}))(pako,{deflate:{raw:!0},inflate:{raw:!0}},((e,t)=>e.onData=t));self.Deflate=e,self.Inflate=t}}(); -- GitLab From e785373ca720de6cbe3b42331a26cfbe4dbd0905 Mon Sep 17 00:00:00 2001 From: Nicolas Gelot Date: Thu, 16 Jan 2025 22:13:14 +0100 Subject: [PATCH 5/5] Bump version 1.1.4 --- .gitlab-ci.yml | 2 ++ package.json | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index cb83543..8edc8eb 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -24,3 +24,5 @@ publish: - build rules: - if: '$CI_COMMIT_TAG' + - if: '$CI_PIPELINE_SOURCE == "merge_request_event"' + when: manual diff --git a/package.json b/package.json index 9334c2e..0c0f2df 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@e/fastboot", - "version": "1.1.1", + "version": "1.1.4", "description": "JavaScript implementation of fastboot, using WebUSB", "main": "dist/fastboot.cjs", "repository": "https://gitlab.e.foundation/e/tools/fastboot.js", -- GitLab