@ai-matrx/vault 0.1.6 → 0.1.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../node_modules/.pnpm/@zip.js+zip.js@2.18.2/node_modules/@zip.js/zip.js/lib/core/constants.js","../../../../node_modules/.pnpm/@zip.js+zip.js@2.18.2/node_modules/@zip.js/zip.js/lib/core/options.js","../../../../node_modules/.pnpm/@zip.js+zip.js@2.18.2/node_modules/@zip.js/zip.js/lib/core/configuration.js","../../../../node_modules/.pnpm/@zip.js+zip.js@2.18.2/node_modules/@zip.js/zip.js/lib/core/util/array.js","../../../../node_modules/.pnpm/@zip.js+zip.js@2.18.2/node_modules/@zip.js/zip.js/lib/core/util/error.js","../../../../node_modules/.pnpm/@zip.js+zip.js@2.18.2/node_modules/@zip.js/zip.js/lib/core/streams/codecs/crc32.js","../../../../node_modules/.pnpm/@zip.js+zip.js@2.18.2/node_modules/@zip.js/zip.js/lib/core/streams/crc32-stream.js","../../../../node_modules/.pnpm/@zip.js+zip.js@2.18.2/node_modules/@zip.js/zip.js/lib/core/util/encode-text.js","../../../../node_modules/.pnpm/@zip.js+zip.js@2.18.2/node_modules/@zip.js/zip.js/lib/core/streams/codecs/aes-hmac-sha1.js","../../../../node_modules/.pnpm/@zip.js+zip.js@2.18.2/node_modules/@zip.js/zip.js/lib/core/streams/common-crypto.js","../../../../node_modules/.pnpm/@zip.js+zip.js@2.18.2/node_modules/@zip.js/zip.js/lib/core/streams/aes-crypto-stream.js","../../../../node_modules/.pnpm/@zip.js+zip.js@2.18.2/node_modules/@zip.js/zip.js/lib/core/streams/zip-crypto-stream.js","../../../../node_modules/.pnpm/@zip.js+zip.js@2.18.2/node_modules/@zip.js/zip.js/lib/core/util/compatible-streams.js","../../../../node_modules/.pnpm/@zip.js+zip.js@2.18.2/node_modules/@zip.js/zip.js/lib/core/codec-registry.js","../../../../node_modules/.pnpm/@zip.js+zip.js@2.18.2/node_modules/@zip.js/zip.js/lib/core/streams/zip-entry-stream.js","../../../../node_modules/.pnpm/@zip.js+zip.js@2.18.2/node_modules/@zip.js/zip.js/lib/core/streams/codec-stream.js","../../../../node_modules/.pnpm/@zip.js+zip.js@2.18.2/node_modules/@zip.js/zip.js/lib/core/codec-worker.js","../../../../node_modules/.pnpm/@zip.js+zip.js@2.18.2/node_modules/@zip.js/zip.js/lib/core/codec-pool.js","../../../../node_modules/.pnpm/@zip.js+zip.js@2.18.2/node_modules/@zip.js/zip.js/lib/core/util/decode-cp437.js","../../../../node_modules/.pnpm/@zip.js+zip.js@2.18.2/node_modules/@zip.js/zip.js/lib/core/util/decode-text.js","../../../../node_modules/.pnpm/@zip.js+zip.js@2.18.2/node_modules/@zip.js/zip.js/lib/core/io.js","../../../../node_modules/.pnpm/@zip.js+zip.js@2.18.2/node_modules/@zip.js/zip.js/lib/core/util/warnings.js","../../../../node_modules/.pnpm/@zip.js+zip.js@2.18.2/node_modules/@zip.js/zip.js/lib/core/zip-entry.js","../../../../node_modules/.pnpm/@zip.js+zip.js@2.18.2/node_modules/@zip.js/zip.js/lib/core/zip-reader.js","../../../../node_modules/.pnpm/lossless-json@4.3.1/node_modules/lossless-json/src/utils.ts","../../../../node_modules/.pnpm/lossless-json@4.3.1/node_modules/lossless-json/src/LosslessNumber.ts","../../../../node_modules/.pnpm/lossless-json@4.3.1/node_modules/lossless-json/src/numberParsers.ts","../../../../node_modules/.pnpm/lossless-json@4.3.1/node_modules/lossless-json/src/revive.ts","../../../../node_modules/.pnpm/lossless-json@4.3.1/node_modules/lossless-json/src/parse.ts","../../../../node_modules/.pnpm/lossless-json@4.3.1/node_modules/lossless-json/src/stringify.ts","../../src/io/strict-json.ts","../../src/io/csv-import.ts","../../src/io/bitwarden-json.ts","../../src/io/onepux.ts","../../../../node_modules/.pnpm/@zip.js+zip.js@2.18.2/node_modules/@zip.js/zip.js/lib/zip-fs-wasm.js","../../../../node_modules/.pnpm/@zip.js+zip.js@2.18.2/node_modules/@zip.js/zip.js/lib/core/web-worker-inline-wasm.js","../../../../node_modules/.pnpm/@zip.js+zip.js@2.18.2/node_modules/@zip.js/zip.js/lib/zip-core-base.js","../../../../node_modules/.pnpm/@zip.js+zip.js@2.18.2/node_modules/@zip.js/zip.js/lib/core/codec-worker-web.js","../../../../node_modules/.pnpm/@zip.js+zip.js@2.18.2/node_modules/@zip.js/zip.js/lib/zip-core-reader.js","../../../../node_modules/.pnpm/@zip.js+zip.js@2.18.2/node_modules/@zip.js/zip.js/lib/core/zip-writer.js","../../../../node_modules/.pnpm/@zip.js+zip.js@2.18.2/node_modules/@zip.js/zip.js/lib/core/compression-methods.js","../../../../node_modules/.pnpm/@zip.js+zip.js@2.18.2/node_modules/@zip.js/zip.js/lib/core/util/opfs-temp-stream.js","../../../../node_modules/.pnpm/@zip.js+zip.js@2.18.2/node_modules/@zip.js/zip.js/lib/core/util/blob-temp-stream.js","../../../../node_modules/.pnpm/@zip.js+zip.js@2.18.2/node_modules/@zip.js/zip.js/lib/core/util/sync-access-handle-temp-stream.js","../../../../node_modules/.pnpm/@zip.js+zip.js@2.18.2/node_modules/@zip.js/zip.js/lib/zip-module-wasm.js","../../../../node_modules/.pnpm/@zip.js+zip.js@2.18.2/node_modules/@zip.js/zip.js/lib/core/zlib-streams-inline.js","../../../../node_modules/.pnpm/@zip.js+zip.js@2.18.2/node_modules/@zip.js/zip.js/lib/zip-module-wasm-base.js","../../../../node_modules/.pnpm/@zip.js+zip.js@2.18.2/node_modules/@zip.js/zip.js/lib/core/streams/zlib-wasm/zlib-streams.js","../../../../node_modules/.pnpm/@zip.js+zip.js@2.18.2/node_modules/@zip.js/zip.js/lib/core/streams/zlib-wasm/aes-hmac-sha1-wasm.js","../../../../node_modules/.pnpm/@zip.js+zip.js@2.18.2/node_modules/@zip.js/zip.js/lib/core/streams/zlib-wasm/zlib-streams-loader.js","../../../../node_modules/.pnpm/@zip.js+zip.js@2.18.2/node_modules/@zip.js/zip.js/lib/core/zip-fs.js","../../src/io/bounded-zip.ts","../../src/io/onepux-archive.ts","../../src/io/onepux.worker.ts"],"sourcesContent":["/*\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 MAX_8_BITS = 0xff;\nconst COMPRESSION_METHOD_DEFLATE = 0x08;\nconst COMPRESSION_METHOD_DEFLATE_64 = 0x09;\nconst COMPRESSION_METHOD_STORE = 0x00;\nconst COMPRESSION_METHOD_AES = 0x63;\n\nconst LOCAL_FILE_HEADER_SIGNATURE = 0x04034b50;\nconst SPLIT_ZIP_FILE_SIGNATURE = 0x08074b50;\nconst TEMPORARY_SPLIT_ZIP_FILE_SIGNATURE = 0x30304b50;\nconst DATA_DESCRIPTOR_RECORD_SIGNATURE = SPLIT_ZIP_FILE_SIGNATURE;\nconst ARCHIVE_EXTRA_DATA_SIGNATURE = 0x08064b50;\nconst DIGITAL_SIGNATURE_RECORD_SIGNATURE = 0x05054b50;\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 CENTRAL_FILE_HEADER_LENGTH = 46;\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 DATA_DESCRIPTOR_RECORD_LENGTH = 12;\nconst DATA_DESCRIPTOR_RECORD_ZIP_64_LENGTH = 20;\nconst DATA_DESCRIPTOR_RECORD_SIGNATURE_LENGTH = 4;\nconst SPLIT_ZIP_FILE_SIGNATURE_LENGTH = 4;\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;\nconst EXTRAFIELD_TYPE_USDZ = 0x1986;\nconst EXTRAFIELD_TYPE_INFOZIP = 0x7875;\nconst EXTRAFIELD_TYPE_UNIX = 0x7855;\nconst EXTRAFIELD_TYPE_UNIX_TYPE1 = 0x5855;\nconst EXTRAFIELD_TYPE_PKWARE_UNIX = 0x000d;\n\nconst BITFLAG_ENCRYPTED = 0b1;\nconst BITFLAG_LEVEL = 0b0110;\nconst BITFLAG_LEVEL_MAX_MASK = 0b010;\nconst BITFLAG_LEVEL_FAST_MASK = 0b100;\nconst BITFLAG_LEVEL_SUPER_FAST_MASK = 0b110;\nconst BITFLAG_DATA_DESCRIPTOR = 0b1000;\nconst BITFLAG_COMPRESSED_PATCHED_DATA = 0b100000;\nconst BITFLAG_STRONG_ENCRYPTION = 0b1000000;\nconst BITFLAG_LANG_ENCODING_FLAG = 0b100000000000;\nconst BITFLAG_MASKED_LOCAL_HEADERS = 0b10000000000000;\nconst FILE_ATTR_MSDOS_DIR_MASK = 0b10000;\nconst FILE_ATTR_MSDOS_READONLY_MASK = 0x01;\nconst FILE_ATTR_MSDOS_HIDDEN_MASK = 0x02;\nconst FILE_ATTR_MSDOS_SYSTEM_MASK = 0x04;\nconst FILE_ATTR_MSDOS_ARCHIVE_MASK = 0x20;\nconst FILE_ATTR_UNIX_TYPE_MASK = 0o170000;\nconst FILE_ATTR_UNIX_TYPE_DIR = 0o040000;\nconst FILE_ATTR_UNIX_TYPE_SYMLINK = 0o120000;\nconst FILE_ATTR_UNIX_TYPE_FILE = 0o100000;\nconst FILE_ATTR_UNIX_EXECUTABLE_MASK = 0o111;\nconst FILE_ATTR_UNIX_DEFAULT_MASK = 0o644;\nconst FILE_ATTR_UNIX_SETUID_MASK = 0o4000;\nconst FILE_ATTR_UNIX_SETGID_MASK = 0o2000;\nconst FILE_ATTR_UNIX_STICKY_MASK = 0o1000;\n\nconst VERSION_STORE = 0x0A;\nconst VERSION_DEFLATE = 0x14;\nconst VERSION_ZIP64 = 0x2D;\nconst VERSION_AES = 0x33;\n\nconst VERSION_MADE_BY_MSDOS = 0x0014;\nconst VERSION_MADE_BY_UNIX = 0x0300;\n\nconst DIRECTORY_SIGNATURE = \"/\";\n\nconst HEADER_SIZE = 30;\nconst HEADER_OFFSET_VERSION = 0;\nconst HEADER_OFFSET_SIGNATURE = 10;\nconst HEADER_OFFSET_COMPRESSED_SIZE = 14;\nconst HEADER_OFFSET_UNCOMPRESSED_SIZE = 18;\nconst HEADER_OFFSET_FILENAME_LENGTH = 22;\nconst HEADER_OFFSET_EXTRAFIELD_LENGTH = 24;\nconst LOCAL_HEADER_COMMON_OFFSET = 4;\n\nconst MAX_DATE = new Date(2107, 11, 31, 23, 59, 58);\nconst MIN_DATE = new Date(1980, 0, 1);\n\nconst UNDEFINED_VALUE = undefined;\nconst INFINITY_VALUE = Infinity;\nconst UNDEFINED_TYPE = \"undefined\";\nconst FUNCTION_TYPE = \"function\";\nconst OBJECT_TYPE = \"object\";\nconst STRING_TYPE = \"string\";\nconst NUMBER_TYPE = \"number\";\nconst BOOLEAN_TYPE = \"boolean\";\n\nconst EMPTY_UINT8_ARRAY = new Uint8Array();\nconst SYMBOL_ASYNC_DISPOSE = Symbol.asyncDispose || Symbol();\n\nexport {\n\tEMPTY_UINT8_ARRAY,\n\tSYMBOL_ASYNC_DISPOSE,\n\tMAX_32_BITS,\n\tMAX_16_BITS,\n\tMAX_8_BITS,\n\tCOMPRESSION_METHOD_DEFLATE,\n\tCOMPRESSION_METHOD_DEFLATE_64,\n\tCOMPRESSION_METHOD_STORE,\n\tCOMPRESSION_METHOD_AES,\n\tSPLIT_ZIP_FILE_SIGNATURE,\n\tTEMPORARY_SPLIT_ZIP_FILE_SIGNATURE,\n\tARCHIVE_EXTRA_DATA_SIGNATURE,\n\tDIGITAL_SIGNATURE_RECORD_SIGNATURE,\n\tLOCAL_FILE_HEADER_SIGNATURE,\n\tDATA_DESCRIPTOR_RECORD_SIGNATURE,\n\tCENTRAL_FILE_HEADER_SIGNATURE,\n\tCENTRAL_FILE_HEADER_LENGTH,\n\tEND_OF_CENTRAL_DIR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_SIGNATURE,\n\tDATA_DESCRIPTOR_RECORD_LENGTH,\n\tDATA_DESCRIPTOR_RECORD_ZIP_64_LENGTH,\n\tDATA_DESCRIPTOR_RECORD_SIGNATURE_LENGTH,\n\tSPLIT_ZIP_FILE_SIGNATURE_LENGTH,\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\tEXTRAFIELD_TYPE_USDZ,\n\tEXTRAFIELD_TYPE_INFOZIP,\n\tEXTRAFIELD_TYPE_UNIX,\n\tEXTRAFIELD_TYPE_UNIX_TYPE1,\n\tEXTRAFIELD_TYPE_PKWARE_UNIX,\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_LEVEL_MAX_MASK,\n\tBITFLAG_LEVEL_FAST_MASK,\n\tBITFLAG_LEVEL_SUPER_FAST_MASK,\n\tBITFLAG_DATA_DESCRIPTOR,\n\tBITFLAG_COMPRESSED_PATCHED_DATA,\n\tBITFLAG_STRONG_ENCRYPTION,\n\tBITFLAG_LANG_ENCODING_FLAG,\n\tBITFLAG_MASKED_LOCAL_HEADERS,\n\tFILE_ATTR_MSDOS_DIR_MASK,\n\tFILE_ATTR_MSDOS_READONLY_MASK,\n\tFILE_ATTR_MSDOS_HIDDEN_MASK,\n\tFILE_ATTR_MSDOS_SYSTEM_MASK,\n\tFILE_ATTR_MSDOS_ARCHIVE_MASK,\n\tFILE_ATTR_UNIX_TYPE_MASK,\n\tFILE_ATTR_UNIX_TYPE_DIR,\n\tFILE_ATTR_UNIX_TYPE_SYMLINK,\n\tFILE_ATTR_UNIX_TYPE_FILE,\n\tFILE_ATTR_UNIX_EXECUTABLE_MASK,\n\tFILE_ATTR_UNIX_DEFAULT_MASK,\n\tFILE_ATTR_UNIX_SETUID_MASK,\n\tFILE_ATTR_UNIX_SETGID_MASK,\n\tFILE_ATTR_UNIX_STICKY_MASK,\n\tVERSION_STORE,\n\tVERSION_DEFLATE,\n\tVERSION_MADE_BY_MSDOS,\n\tVERSION_MADE_BY_UNIX,\n\tVERSION_ZIP64,\n\tVERSION_AES,\n\tHEADER_SIZE,\n\tHEADER_OFFSET_VERSION,\n\tHEADER_OFFSET_SIGNATURE,\n\tHEADER_OFFSET_COMPRESSED_SIZE,\n\tHEADER_OFFSET_UNCOMPRESSED_SIZE,\n\tHEADER_OFFSET_FILENAME_LENGTH,\n\tHEADER_OFFSET_EXTRAFIELD_LENGTH,\n\tLOCAL_HEADER_COMMON_OFFSET,\n\tDIRECTORY_SIGNATURE,\n\tMIN_DATE,\n\tMAX_DATE,\n\tUNDEFINED_VALUE,\n\tINFINITY_VALUE,\n\tUNDEFINED_TYPE,\n\tFUNCTION_TYPE,\n\tOBJECT_TYPE,\n\tSTRING_TYPE,\n\tNUMBER_TYPE,\n\tBOOLEAN_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 DOMException */\n\nimport {\n\tBOOLEAN_TYPE,\n\tFUNCTION_TYPE,\n\tSTRING_TYPE,\n\tUNDEFINED_VALUE\n} from \"./constants.js\";\n\nconst OPTION_FILENAME_ENCODING = \"filenameEncoding\";\nconst OPTION_COMMENT_ENCODING = \"commentEncoding\";\nconst OPTION_DECODE_TEXT = \"decodeText\";\nconst OPTION_EXTRACT_PREPENDED_DATA = \"extractPrependedData\";\nconst OPTION_EXTRACT_APPENDED_DATA = \"extractAppendedData\";\nconst OPTION_PASSWORD = \"password\";\nconst OPTION_RAW_PASSWORD = \"rawPassword\";\nconst OPTION_PASS_THROUGH = \"passThrough\";\nconst OPTION_SIGNAL = \"signal\";\nconst OPTION_CHECK_PASSWORD_ONLY = \"checkPasswordOnly\";\nconst OPTION_CHECK_OVERLAPPING_ENTRY_ONLY = \"checkOverlappingEntryOnly\";\nconst OPTION_CHECK_OVERLAPPING_ENTRY = \"checkOverlappingEntry\";\nconst OPTION_CHECK_AMBIGUITY = \"checkAmbiguity\";\nconst OPTION_CHECK_LOCAL_DIRECTORY = \"checkLocalDirectory\";\nconst OPTION_CHECK_LOCAL_FILENAME = \"checkLocalFilename\";\nconst OPTION_CHECK_SIGNATURE = \"checkSignature\";\nconst OPTION_CHECK_CRC32 = \"checkCrc32\";\nconst OPTION_CHECK_AUTHENTICATION_CODE = \"checkAuthenticationCode\";\nconst OPTION_USE_WEB_WORKERS = \"useWebWorkers\";\nconst OPTION_USE_COMPRESSION_STREAM = \"useCompressionStream\";\nconst OPTION_TRANSFER_STREAMS = \"transferStreams\";\nconst OPTION_PREVENT_CLOSE = \"preventClose\";\nconst OPTION_ENCRYPTION_STRENGTH = \"encryptionStrength\";\nconst OPTION_EXTENDED_TIMESTAMP = \"extendedTimestamp\";\nconst OPTION_NTFS_TIMESTAMP = \"ntfsTimestamp\";\nconst OPTION_KEEP_ORDER = \"keepOrder\";\nconst OPTION_LEVEL = \"level\";\nconst OPTION_BUFFERED_WRITE = \"bufferedWrite\";\nconst OPTION_CREATE_TEMP_STREAM = \"createTempStream\";\nconst OPTION_DATA_DESCRIPTOR_SIGNATURE = \"dataDescriptorSignature\";\nconst OPTION_USE_UNICODE_FILE_NAMES = \"useUnicodeFileNames\";\nconst OPTION_DATA_DESCRIPTOR = \"dataDescriptor\";\nconst OPTION_SUPPORT_ZIP64_SPLIT_FILE = \"supportZip64SplitFile\";\nconst OPTION_ENCODE_TEXT = \"encodeText\";\nconst OPTION_OFFSET = \"offset\";\nconst OPTION_USDZ = \"usdz\";\nconst OPTION_UNIX_EXTRA_FIELD_TYPE = \"unixExtraFieldType\";\nconst OPTION_LOCAL_EXTRA_FIELD = \"localExtraField\";\nconst OPTION_CENTRAL_EXTRA_FIELD = \"centralExtraField\";\nconst OPTION_STRICTNESS = \"strictness\";\nconst OPTION_FILENAME_VALIDATION = \"filenameValidation\";\nconst OPTION_NORMALIZE_FILENAME = \"normalizeFilename\";\nconst OPTION_MAX_APPENDED_DATA_SIZE = \"maxAppendedDataSize\";\nconst OPTION_DECRYPT_CENTRAL_DIRECTORY = \"decryptCentralDirectory\";\nconst OPTION_SIGN_CENTRAL_DIRECTORY = \"signCentralDirectory\";\nconst OPTION_ENTRY = \"entry\";\nconst TEXT_TYPE_FILENAME = \"filename\";\nconst TEXT_TYPE_COMMENT = \"comment\";\nconst STRICTNESS_STRICT = \"strict\";\nconst STRICTNESS_BALANCED = \"balanced\";\nconst STRICTNESS_TOLERANT = \"tolerant\";\nconst PASS_THROUGH_COMPRESSED = \"compressed\";\n\nconst ERR_INVALID_FUNCTION_OPTION = \"Invalid option (must be a function)\";\nconst ERR_INVALID_SIGNAL = \"Invalid signal (must be an AbortSignal instance)\";\nconst ERR_INVALID_PASSWORD_TYPE = \"Invalid password (password must be a string, rawPassword must be a Uint8Array)\";\nconst ERR_INVALID_PASS_THROUGH_VALUE = \"Invalid passThrough option (must be a boolean or 'compressed')\";\nconst ERR_ABORTED = \"The operation was aborted\";\nconst ABORT_ERROR_NAME = \"AbortError\";\n\nexport {\n\tOPTION_FILENAME_ENCODING,\n\tOPTION_COMMENT_ENCODING,\n\tOPTION_DECODE_TEXT,\n\tOPTION_EXTRACT_PREPENDED_DATA,\n\tOPTION_EXTRACT_APPENDED_DATA,\n\tOPTION_PASSWORD,\n\tOPTION_RAW_PASSWORD,\n\tOPTION_PASS_THROUGH,\n\tOPTION_SIGNAL,\n\tOPTION_CHECK_PASSWORD_ONLY,\n\tOPTION_CHECK_OVERLAPPING_ENTRY_ONLY,\n\tOPTION_CHECK_OVERLAPPING_ENTRY,\n\tOPTION_CHECK_AMBIGUITY,\n\tOPTION_CHECK_LOCAL_DIRECTORY,\n\tOPTION_CHECK_LOCAL_FILENAME,\n\tOPTION_CHECK_SIGNATURE,\n\tOPTION_CHECK_CRC32,\n\tOPTION_CHECK_AUTHENTICATION_CODE,\n\tOPTION_USE_WEB_WORKERS,\n\tOPTION_USE_COMPRESSION_STREAM,\n\tOPTION_TRANSFER_STREAMS,\n\tOPTION_PREVENT_CLOSE,\n\tOPTION_ENCRYPTION_STRENGTH,\n\tOPTION_EXTENDED_TIMESTAMP,\n\tOPTION_NTFS_TIMESTAMP,\n\tOPTION_KEEP_ORDER,\n\tOPTION_LEVEL,\n\tOPTION_BUFFERED_WRITE,\n\tOPTION_CREATE_TEMP_STREAM,\n\tOPTION_DATA_DESCRIPTOR_SIGNATURE,\n\tOPTION_USE_UNICODE_FILE_NAMES,\n\tOPTION_DATA_DESCRIPTOR,\n\tOPTION_SUPPORT_ZIP64_SPLIT_FILE,\n\tOPTION_ENCODE_TEXT,\n\tOPTION_OFFSET,\n\tOPTION_USDZ,\n\tOPTION_UNIX_EXTRA_FIELD_TYPE,\n\tOPTION_LOCAL_EXTRA_FIELD,\n\tOPTION_CENTRAL_EXTRA_FIELD,\n\tOPTION_STRICTNESS,\n\tOPTION_FILENAME_VALIDATION,\n\tOPTION_NORMALIZE_FILENAME,\n\tOPTION_MAX_APPENDED_DATA_SIZE,\n\tOPTION_DECRYPT_CENTRAL_DIRECTORY,\n\tOPTION_SIGN_CENTRAL_DIRECTORY,\n\tOPTION_ENTRY,\n\tTEXT_TYPE_FILENAME,\n\tTEXT_TYPE_COMMENT,\n\tSTRICTNESS_STRICT,\n\tSTRICTNESS_BALANCED,\n\tSTRICTNESS_TOLERANT,\n\tPASS_THROUGH_COMPRESSED,\n\tERR_INVALID_FUNCTION_OPTION,\n\tERR_INVALID_SIGNAL,\n\tERR_INVALID_PASSWORD_TYPE,\n\tERR_INVALID_PASS_THROUGH_VALUE,\n\tERR_ABORTED,\n\tABORT_ERROR_NAME,\n\tcheckFunctionOption,\n\tcheckSignalOption,\n\tthrowIfAborted,\n\tcheckPasswordOption,\n\tcheckPassThroughOption,\n\tcheckInteger,\n\tcheckIntegerOption,\n\ttoNumber\n};\n\nfunction checkFunctionOption(value) {\n\tif (value && typeof value != FUNCTION_TYPE) {\n\t\tthrow new Error(ERR_INVALID_FUNCTION_OPTION);\n\t}\n\treturn value;\n}\n\nfunction checkSignalOption(signal) {\n\tif (signal && (typeof signal.addEventListener != FUNCTION_TYPE || typeof signal.aborted != BOOLEAN_TYPE)) {\n\t\tthrow new Error(ERR_INVALID_SIGNAL);\n\t}\n\treturn signal || UNDEFINED_VALUE;\n}\n\nfunction throwIfAborted(signal) {\n\tif (signal && signal.aborted) {\n\t\tthrow signal.reason === UNDEFINED_VALUE ? new DOMException(ERR_ABORTED, ABORT_ERROR_NAME) : signal.reason;\n\t}\n}\n\nfunction checkPasswordOption(password, rawPassword) {\n\tif ((password && typeof password != STRING_TYPE) || (rawPassword && !(rawPassword instanceof Uint8Array))) {\n\t\tthrow new Error(ERR_INVALID_PASSWORD_TYPE);\n\t}\n}\n\nfunction checkPassThroughOption(passThrough) {\n\tif (passThrough !== UNDEFINED_VALUE && typeof passThrough != BOOLEAN_TYPE && passThrough !== PASS_THROUGH_COMPRESSED) {\n\t\tthrow new Error(ERR_INVALID_PASS_THROUGH_VALUE);\n\t}\n\treturn passThrough;\n}\n\nfunction checkInteger(value, maxValue, errorMessage) {\n\tif (!Number.isInteger(value) || value < 0 || value > maxValue) {\n\t\tthrow new Error(errorMessage);\n\t}\n}\n\nfunction checkIntegerOption(value, maxValue, errorMessage) {\n\tif (value !== UNDEFINED_VALUE) {\n\t\tcheckInteger(value, maxValue, errorMessage);\n\t}\n}\n\nfunction toNumber(value) {\n\treturn typeof value == STRING_TYPE && value.trim() ? Number(value) : value;\n}","/*\n Copyright (c) 2025 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\tFUNCTION_TYPE,\n\tSTRING_TYPE\n} from \"./constants.js\";\nimport {\n\tcheckFunctionOption,\n\ttoNumber\n} from \"./options.js\";\n\nconst DEFAULT_CHUNK_SIZE = 64 * 1024;\nconst MINIMUM_CHUNK_SIZE = 64;\nconst MINIMUM_PROPERTY_VALUE = 1;\nconst ERR_INVALID_MAX_WORKERS = \"Invalid maxWorkers (must be an integer greater than 0)\";\nconst ERR_INVALID_BASE_URI = \"Invalid baseURI (must be a string)\";\nconst ERR_INVALID_URI = \"Invalid URI (must be a string or a function returning a string)\";\nlet maxWorkers = 2;\ntry {\n\tif (typeof navigator != UNDEFINED_TYPE && navigator.hardwareConcurrency) {\n\t\tmaxWorkers = navigator.hardwareConcurrency;\n\t}\n} catch {\n\t// ignored\n}\nconst DEFAULT_CONFIGURATION = {\n\tworkerURI: \"./core/web-worker-wasm.js\",\n\twasmURI: \"./core/streams/zlib-wasm/zlib-streams.wasm\",\n\tchunkSize: DEFAULT_CHUNK_SIZE,\n\tmaxWorkers,\n\tterminateWorkerTimeout: 5000,\n\tworkerStarvationTimeout: 5000,\n\tworkerStartupTimeout: 5000,\n\tuseWebWorkers: true,\n\tuseCompressionStream: true,\n\ttransferStreams: true,\n\tCompressionStream: typeof CompressionStream != UNDEFINED_TYPE && CompressionStream,\n\tDecompressionStream: typeof DecompressionStream != UNDEFINED_TYPE && DecompressionStream\n};\n\nconst PROPERTY_NAME_MAX_WORKERS = \"maxWorkers\";\nconst PROPERTY_NAME_BASE_URI = \"baseURI\";\n\nconst URI_PROPERTY_NAMES = [\n\t\"wasmURI\",\n\t\"workerURI\"\n];\nconst BOOLEAN_PROPERTY_NAMES = [\n\t\"useCompressionStream\",\n\t\"useWebWorkers\",\n\t\"transferStreams\"\n];\nconst NUMBER_PROPERTY_NAMES = [\n\t\"chunkSize\",\n\tPROPERTY_NAME_MAX_WORKERS,\n\t\"terminateWorkerTimeout\",\n\t\"workerStarvationTimeout\",\n\t\"workerStartupTimeout\"\n];\nconst FUNCTION_PROPERTY_NAMES = [\n\t\"createWorker\",\n\t\"CompressionStream\",\n\t\"DecompressionStream\",\n\t\"CompressionStreamFallback\",\n\t\"DecompressionStreamFallback\"\n];\nconst CONFIGURABLE_PROPERTY_NAMES = [\n\tPROPERTY_NAME_BASE_URI,\n\t...URI_PROPERTY_NAMES,\n\t...BOOLEAN_PROPERTY_NAMES,\n\t...NUMBER_PROPERTY_NAMES,\n\t...FUNCTION_PROPERTY_NAMES\n];\n\nconst config = { ...DEFAULT_CONFIGURATION };\n\nexport {\n\tconfigure,\n\tsetDefaultConfiguration,\n\tresetConfiguration,\n\tgetConfiguration,\n\tgetChunkSize,\n\tnormalizeChunkSize,\n\tERR_INVALID_MAX_WORKERS,\n\tERR_INVALID_BASE_URI,\n\tERR_INVALID_URI\n};\n\nfunction getConfiguration() {\n\treturn config;\n}\n\nfunction getChunkSize(config) {\n\treturn normalizeChunkSize(config.chunkSize);\n}\n\nfunction normalizeChunkSize(chunkSize) {\n\tchunkSize = toNumber(chunkSize);\n\treturn Number.isInteger(chunkSize) && chunkSize >= MINIMUM_PROPERTY_VALUE ? Math.max(chunkSize, MINIMUM_CHUNK_SIZE) : DEFAULT_CHUNK_SIZE;\n}\n\nfunction configure(configuration) {\n\tObject.assign(config, checkConfiguration(normalizeConfiguration(configuration)));\n}\n\nfunction checkConfiguration(configuration) {\n\tconst checkedConfiguration = {};\n\tfor (const propertyName of CONFIGURABLE_PROPERTY_NAMES) {\n\t\tconst propertyValue = configuration[propertyName];\n\t\tif (propertyValue !== UNDEFINED_VALUE) {\n\t\t\tcheckedConfiguration[propertyName] = checkPropertyValue(propertyName, propertyValue);\n\t\t}\n\t}\n\treturn checkedConfiguration;\n}\n\nfunction checkPropertyValue(propertyName, propertyValue) {\n\tif (NUMBER_PROPERTY_NAMES.includes(propertyName)) {\n\t\tpropertyValue = toNumber(propertyValue);\n\t\tif (propertyName == PROPERTY_NAME_MAX_WORKERS && (!Number.isInteger(propertyValue) || propertyValue < MINIMUM_PROPERTY_VALUE)) {\n\t\t\tthrow new Error(ERR_INVALID_MAX_WORKERS);\n\t\t}\n\t} else if (FUNCTION_PROPERTY_NAMES.includes(propertyName)) {\n\t\tcheckFunctionOption(propertyValue);\n\t} else if (propertyName == PROPERTY_NAME_BASE_URI) {\n\t\tif (propertyValue && typeof propertyValue != STRING_TYPE) {\n\t\t\tthrow new Error(ERR_INVALID_BASE_URI);\n\t\t}\n\t} else if (URI_PROPERTY_NAMES.includes(propertyName)) {\n\t\tif (propertyValue && typeof propertyValue != STRING_TYPE && typeof propertyValue != FUNCTION_TYPE) {\n\t\t\tthrow new Error(ERR_INVALID_URI);\n\t\t}\n\t}\n\treturn propertyValue;\n}\n\nfunction normalizeConfiguration(configuration) {\n\tconfiguration = configuration || {};\n\tconst { CompressionStreamZlib, DecompressionStreamZlib } = configuration;\n\tif (CompressionStreamZlib === UNDEFINED_VALUE && DecompressionStreamZlib === UNDEFINED_VALUE) {\n\t\treturn configuration;\n\t}\n\tconst normalizedConfiguration = Object.assign({}, configuration);\n\tif (normalizedConfiguration.CompressionStreamFallback === UNDEFINED_VALUE) {\n\t\tnormalizedConfiguration.CompressionStreamFallback = CompressionStreamZlib;\n\t}\n\tif (normalizedConfiguration.DecompressionStreamFallback === UNDEFINED_VALUE) {\n\t\tnormalizedConfiguration.DecompressionStreamFallback = DecompressionStreamZlib;\n\t}\n\treturn normalizedConfiguration;\n}\n\nfunction setDefaultConfiguration(configuration) {\n\tconst checkedConfiguration = checkConfiguration(normalizeConfiguration(configuration));\n\tObject.assign(DEFAULT_CONFIGURATION, checkedConfiguration);\n\tObject.assign(config, checkedConfiguration);\n}\n\nfunction resetConfiguration() {\n\tfor (const propertyName of CONFIGURABLE_PROPERTY_NAMES) {\n\t\tdelete config[propertyName];\n\t}\n\tObject.assign(config, DEFAULT_CONFIGURATION);\n}\n","/*\n Copyright (c) 2026 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\nexport {\n\tconcat,\n\ttoExactUint8Array,\n\tgetDataView\n};\n\nfunction concat(first, second) {\n\tconst result = new Uint8Array(first.length + second.length);\n\tresult.set(first);\n\tresult.set(second, first.length);\n\treturn result;\n}\n\nfunction toExactUint8Array(array) {\n\treturn array.byteOffset || array.byteLength != array.buffer.byteLength ? new Uint8Array(array) : array;\n}\n\nfunction getDataView(array) {\n\treturn new DataView(array.buffer, array.byteOffset, array.byteLength);\n}\n","/*\n Copyright (c) 2026 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\nexport {\n\tisErrorObject\n};\n\nfunction isErrorObject(error) {\n\treturn Boolean(error) && typeof error == \"object\";\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// Slicing-by-8 CRC-32 (Intel / zlib). The eight 256-entry tables let the inner loop\n// consume 8 bytes per iteration with a shorter dependency chain, ~4x the byte-at-a-time\n// rate (measured ~320 -> ~1400 MB/s on 64KB chunks).\n//\n// Every table MUST stay a PACKED_SMI array: build with array literals (not `new Array(n)`,\n// which is HOLEY) and store the signed int32 XOR result (no `>>> 0`). An unsigned or holey\n// table becomes a V8 FixedDoubleArray whose every hot-loop lookup unboxes a double (~1.6x\n// slower). Signedness is irrelevant to the result: the reads mask/shift it and the final\n// `~crc` normalizes it. Do NOT reintroduce `>>> 0` here or switch to `new Array(256)`.\nconst T = [[], [], [], [], [], [], [], []];\nfor (let n = 0; n < 256; n++) {\n\tlet t = n;\n\tfor (let j = 0; j < 8; j++) {\n\t\tt = (t & 1) ? (t >>> 1) ^ 0xEDB88320 : t >>> 1;\n\t}\n\tT[0][n] = t;\n}\nfor (let n = 0; n < 256; n++) {\n\tfor (let k = 1; k < 8; k++) {\n\t\tconst previous = T[k - 1][n];\n\t\tT[k][n] = (previous >>> 8) ^ T[0][previous & 0xFF];\n\t}\n}\nconst [T0, T1, T2, T3, T4, T5, T6, T7] = T;\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\tconst length = data.length | 0;\n\t\tlet offset = 0;\n\t\t// Process 8 bytes per iteration over the typed-array body. DataView.getInt32(le)\n\t\t// reads an unaligned little-endian word as a signed int32 (no double boxing), so no\n\t\t// alignment or endianness handling is needed; data.buffer guards non-typed inputs.\n\t\tif (length >= 8 && data.buffer) {\n\t\t\tconst view = new DataView(data.buffer, data.byteOffset, length);\n\t\t\tconst end = length - 8;\n\t\t\tfor (; offset <= end; offset += 8) {\n\t\t\t\tconst a = crc ^ view.getInt32(offset, true);\n\t\t\t\tconst b = view.getInt32(offset + 4, true);\n\t\t\t\tcrc = T7[a & 0xFF] ^ T6[(a >>> 8) & 0xFF] ^ T5[(a >>> 16) & 0xFF] ^ T4[(a >>> 24) & 0xFF] ^\n\t\t\t\t\tT3[b & 0xFF] ^ T2[(b >>> 8) & 0xFF] ^ T1[(b >>> 16) & 0xFF] ^ T0[(b >>> 24) & 0xFF];\n\t\t\t}\n\t\t}\n\t\t// Remaining tail (and non-typed inputs) byte-at-a-time with the base table.\n\t\tfor (; offset < length; offset++) {\n\t\t\tcrc = (crc >>> 8) ^ T0[(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\t// deno-lint-ignore prefer-const\n\t\tlet stream;\n\t\tconst crc32 = new Crc32();\n\t\tsuper({\n\t\t\ttransform(chunk, controller) {\n\t\t\t\tcrc32.append(chunk);\n\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t},\n\t\t\tflush() {\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\tstream.value = value;\n\t\t\t}\n\t\t});\n\t\tstream = this;\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\nimport { UNDEFINED_TYPE } from \"../constants.js\";\n\nexport {\n\tencodeText\n};\n\nfunction encodeText(value) {\n\t// deno-lint-ignore valid-typeof\n\tif (typeof TextEncoder == UNDEFINED_TYPE) {\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) 2026 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 BLOCK_LENGTH = 16;\nconst ROUND_KEYS_LENGTH = 60;\nconst SHA1_BLOCK_LENGTH = 64;\nconst SHA1_DIGEST_LENGTH = 20;\nconst SHA1_SCHEDULE_LENGTH = 16;\nconst SHA1_LENGTH_OFFSET = 56;\nconst SHA1_PADDING = new Uint8Array([0x80]);\nconst SHA1_ZERO = new Uint8Array(1);\nconst SHA1_INITIAL_STATE = new Int32Array([0x67452301, 0xEFCDAB89, 0x98BADCFE, 0x10325476, 0xC3D2E1F0]);\nconst HMAC_INNER_PADDING = 0x36;\nconst HMAC_OUTER_PADDING = 0x5c;\nconst S_BOX = new Uint8Array(256);\nconst T0 = new Int32Array(256);\nconst T1 = new Int32Array(256);\nconst T2 = new Int32Array(256);\nconst T3 = new Int32Array(256);\n\nlet tablesInitialized = false;\n\nexport {\n\tcreateEngine,\n\tpbkdf2\n};\n\nfunction createEngine(key, authenticationKey) {\n\tinitTables();\n\tconst roundKeys = new Int32Array(ROUND_KEYS_LENGTH);\n\tconst rounds = expandKey(key, roundKeys);\n\tconst keystream = new Int32Array(BLOCK_LENGTH / 4);\n\tconst hmac = createHmac(authenticationKey);\n\tlet counter0 = 0;\n\tlet counter1 = 0;\n\tlet counter2 = 0;\n\tlet counter3 = 0;\n\treturn {\n\t\tprocess(data, decrypt) {\n\t\t\tif (decrypt) {\n\t\t\t\thmac.update(data, 0, data.length);\n\t\t\t}\n\t\t\tencrypt(data);\n\t\t\tif (!decrypt) {\n\t\t\t\thmac.update(data, 0, data.length);\n\t\t\t}\n\t\t},\n\t\tdigest() {\n\t\t\treturn hmac.digest();\n\t\t}\n\t};\n\n\tfunction encrypt(data) {\n\t\tconst view = new DataView(data.buffer, data.byteOffset, data.byteLength);\n\t\tconst length = data.length;\n\t\tlet offset = 0;\n\t\tfor (; offset + BLOCK_LENGTH <= length; offset += BLOCK_LENGTH) {\n\t\t\tnextKeystream();\n\t\t\tview.setInt32(offset, view.getInt32(offset) ^ keystream[0]);\n\t\t\tview.setInt32(offset + 4, view.getInt32(offset + 4) ^ keystream[1]);\n\t\t\tview.setInt32(offset + 8, view.getInt32(offset + 8) ^ keystream[2]);\n\t\t\tview.setInt32(offset + 12, view.getInt32(offset + 12) ^ keystream[3]);\n\t\t}\n\t\tif (offset < length) {\n\t\t\tnextKeystream();\n\t\t\tfor (let indexByte = 0; offset < length; offset++, indexByte++) {\n\t\t\t\tdata[offset] ^= keystream[indexByte >> 2] >>> (24 - 8 * (indexByte & 3));\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction nextKeystream() {\n\t\tcounter0 = (counter0 + 1) | 0;\n\t\tif (!counter0) {\n\t\t\tcounter1 = (counter1 + 1) | 0;\n\t\t\tif (!counter1) {\n\t\t\t\tcounter2 = (counter2 + 1) | 0;\n\t\t\t\tif (!counter2) {\n\t\t\t\t\tcounter3 = (counter3 + 1) | 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tlet s0 = swapBytes(counter0) ^ roundKeys[0];\n\t\tlet s1 = swapBytes(counter1) ^ roundKeys[1];\n\t\tlet s2 = swapBytes(counter2) ^ roundKeys[2];\n\t\tlet s3 = swapBytes(counter3) ^ roundKeys[3];\n\t\tlet t0 = T0[s0 >>> 24] ^ T1[(s1 >>> 16) & 255] ^ T2[(s2 >>> 8) & 255] ^ T3[s3 & 255] ^ roundKeys[4];\n\t\tlet t1 = T0[s1 >>> 24] ^ T1[(s2 >>> 16) & 255] ^ T2[(s3 >>> 8) & 255] ^ T3[s0 & 255] ^ roundKeys[5];\n\t\tlet t2 = T0[s2 >>> 24] ^ T1[(s3 >>> 16) & 255] ^ T2[(s0 >>> 8) & 255] ^ T3[s1 & 255] ^ roundKeys[6];\n\t\tlet t3 = T0[s3 >>> 24] ^ T1[(s0 >>> 16) & 255] ^ T2[(s1 >>> 8) & 255] ^ T3[s2 & 255] ^ roundKeys[7];\n\t\ts0 = T0[t0 >>> 24] ^ T1[(t1 >>> 16) & 255] ^ T2[(t2 >>> 8) & 255] ^ T3[t3 & 255] ^ roundKeys[8];\n\t\ts1 = T0[t1 >>> 24] ^ T1[(t2 >>> 16) & 255] ^ T2[(t3 >>> 8) & 255] ^ T3[t0 & 255] ^ roundKeys[9];\n\t\ts2 = T0[t2 >>> 24] ^ T1[(t3 >>> 16) & 255] ^ T2[(t0 >>> 8) & 255] ^ T3[t1 & 255] ^ roundKeys[10];\n\t\ts3 = T0[t3 >>> 24] ^ T1[(t0 >>> 16) & 255] ^ T2[(t1 >>> 8) & 255] ^ T3[t2 & 255] ^ roundKeys[11];\n\t\tt0 = T0[s0 >>> 24] ^ T1[(s1 >>> 16) & 255] ^ T2[(s2 >>> 8) & 255] ^ T3[s3 & 255] ^ roundKeys[12];\n\t\tt1 = T0[s1 >>> 24] ^ T1[(s2 >>> 16) & 255] ^ T2[(s3 >>> 8) & 255] ^ T3[s0 & 255] ^ roundKeys[13];\n\t\tt2 = T0[s2 >>> 24] ^ T1[(s3 >>> 16) & 255] ^ T2[(s0 >>> 8) & 255] ^ T3[s1 & 255] ^ roundKeys[14];\n\t\tt3 = T0[s3 >>> 24] ^ T1[(s0 >>> 16) & 255] ^ T2[(s1 >>> 8) & 255] ^ T3[s2 & 255] ^ roundKeys[15];\n\t\ts0 = T0[t0 >>> 24] ^ T1[(t1 >>> 16) & 255] ^ T2[(t2 >>> 8) & 255] ^ T3[t3 & 255] ^ roundKeys[16];\n\t\ts1 = T0[t1 >>> 24] ^ T1[(t2 >>> 16) & 255] ^ T2[(t3 >>> 8) & 255] ^ T3[t0 & 255] ^ roundKeys[17];\n\t\ts2 = T0[t2 >>> 24] ^ T1[(t3 >>> 16) & 255] ^ T2[(t0 >>> 8) & 255] ^ T3[t1 & 255] ^ roundKeys[18];\n\t\ts3 = T0[t3 >>> 24] ^ T1[(t0 >>> 16) & 255] ^ T2[(t1 >>> 8) & 255] ^ T3[t2 & 255] ^ roundKeys[19];\n\t\tt0 = T0[s0 >>> 24] ^ T1[(s1 >>> 16) & 255] ^ T2[(s2 >>> 8) & 255] ^ T3[s3 & 255] ^ roundKeys[20];\n\t\tt1 = T0[s1 >>> 24] ^ T1[(s2 >>> 16) & 255] ^ T2[(s3 >>> 8) & 255] ^ T3[s0 & 255] ^ roundKeys[21];\n\t\tt2 = T0[s2 >>> 24] ^ T1[(s3 >>> 16) & 255] ^ T2[(s0 >>> 8) & 255] ^ T3[s1 & 255] ^ roundKeys[22];\n\t\tt3 = T0[s3 >>> 24] ^ T1[(s0 >>> 16) & 255] ^ T2[(s1 >>> 8) & 255] ^ T3[s2 & 255] ^ roundKeys[23];\n\t\ts0 = T0[t0 >>> 24] ^ T1[(t1 >>> 16) & 255] ^ T2[(t2 >>> 8) & 255] ^ T3[t3 & 255] ^ roundKeys[24];\n\t\ts1 = T0[t1 >>> 24] ^ T1[(t2 >>> 16) & 255] ^ T2[(t3 >>> 8) & 255] ^ T3[t0 & 255] ^ roundKeys[25];\n\t\ts2 = T0[t2 >>> 24] ^ T1[(t3 >>> 16) & 255] ^ T2[(t0 >>> 8) & 255] ^ T3[t1 & 255] ^ roundKeys[26];\n\t\ts3 = T0[t3 >>> 24] ^ T1[(t0 >>> 16) & 255] ^ T2[(t1 >>> 8) & 255] ^ T3[t2 & 255] ^ roundKeys[27];\n\t\tt0 = T0[s0 >>> 24] ^ T1[(s1 >>> 16) & 255] ^ T2[(s2 >>> 8) & 255] ^ T3[s3 & 255] ^ roundKeys[28];\n\t\tt1 = T0[s1 >>> 24] ^ T1[(s2 >>> 16) & 255] ^ T2[(s3 >>> 8) & 255] ^ T3[s0 & 255] ^ roundKeys[29];\n\t\tt2 = T0[s2 >>> 24] ^ T1[(s3 >>> 16) & 255] ^ T2[(s0 >>> 8) & 255] ^ T3[s1 & 255] ^ roundKeys[30];\n\t\tt3 = T0[s3 >>> 24] ^ T1[(s0 >>> 16) & 255] ^ T2[(s1 >>> 8) & 255] ^ T3[s2 & 255] ^ roundKeys[31];\n\t\ts0 = T0[t0 >>> 24] ^ T1[(t1 >>> 16) & 255] ^ T2[(t2 >>> 8) & 255] ^ T3[t3 & 255] ^ roundKeys[32];\n\t\ts1 = T0[t1 >>> 24] ^ T1[(t2 >>> 16) & 255] ^ T2[(t3 >>> 8) & 255] ^ T3[t0 & 255] ^ roundKeys[33];\n\t\ts2 = T0[t2 >>> 24] ^ T1[(t3 >>> 16) & 255] ^ T2[(t0 >>> 8) & 255] ^ T3[t1 & 255] ^ roundKeys[34];\n\t\ts3 = T0[t3 >>> 24] ^ T1[(t0 >>> 16) & 255] ^ T2[(t1 >>> 8) & 255] ^ T3[t2 & 255] ^ roundKeys[35];\n\t\tt0 = T0[s0 >>> 24] ^ T1[(s1 >>> 16) & 255] ^ T2[(s2 >>> 8) & 255] ^ T3[s3 & 255] ^ roundKeys[36];\n\t\tt1 = T0[s1 >>> 24] ^ T1[(s2 >>> 16) & 255] ^ T2[(s3 >>> 8) & 255] ^ T3[s0 & 255] ^ roundKeys[37];\n\t\tt2 = T0[s2 >>> 24] ^ T1[(s3 >>> 16) & 255] ^ T2[(s0 >>> 8) & 255] ^ T3[s1 & 255] ^ roundKeys[38];\n\t\tt3 = T0[s3 >>> 24] ^ T1[(s0 >>> 16) & 255] ^ T2[(s1 >>> 8) & 255] ^ T3[s2 & 255] ^ roundKeys[39];\n\t\tlet indexKey = 40;\n\t\tif (rounds > 10) {\n\t\t\ts0 = T0[t0 >>> 24] ^ T1[(t1 >>> 16) & 255] ^ T2[(t2 >>> 8) & 255] ^ T3[t3 & 255] ^ roundKeys[40];\n\t\t\ts1 = T0[t1 >>> 24] ^ T1[(t2 >>> 16) & 255] ^ T2[(t3 >>> 8) & 255] ^ T3[t0 & 255] ^ roundKeys[41];\n\t\t\ts2 = T0[t2 >>> 24] ^ T1[(t3 >>> 16) & 255] ^ T2[(t0 >>> 8) & 255] ^ T3[t1 & 255] ^ roundKeys[42];\n\t\t\ts3 = T0[t3 >>> 24] ^ T1[(t0 >>> 16) & 255] ^ T2[(t1 >>> 8) & 255] ^ T3[t2 & 255] ^ roundKeys[43];\n\t\t\tt0 = T0[s0 >>> 24] ^ T1[(s1 >>> 16) & 255] ^ T2[(s2 >>> 8) & 255] ^ T3[s3 & 255] ^ roundKeys[44];\n\t\t\tt1 = T0[s1 >>> 24] ^ T1[(s2 >>> 16) & 255] ^ T2[(s3 >>> 8) & 255] ^ T3[s0 & 255] ^ roundKeys[45];\n\t\t\tt2 = T0[s2 >>> 24] ^ T1[(s3 >>> 16) & 255] ^ T2[(s0 >>> 8) & 255] ^ T3[s1 & 255] ^ roundKeys[46];\n\t\t\tt3 = T0[s3 >>> 24] ^ T1[(s0 >>> 16) & 255] ^ T2[(s1 >>> 8) & 255] ^ T3[s2 & 255] ^ roundKeys[47];\n\t\t\tindexKey = 48;\n\t\t}\n\t\tif (rounds > 12) {\n\t\t\ts0 = T0[t0 >>> 24] ^ T1[(t1 >>> 16) & 255] ^ T2[(t2 >>> 8) & 255] ^ T3[t3 & 255] ^ roundKeys[48];\n\t\t\ts1 = T0[t1 >>> 24] ^ T1[(t2 >>> 16) & 255] ^ T2[(t3 >>> 8) & 255] ^ T3[t0 & 255] ^ roundKeys[49];\n\t\t\ts2 = T0[t2 >>> 24] ^ T1[(t3 >>> 16) & 255] ^ T2[(t0 >>> 8) & 255] ^ T3[t1 & 255] ^ roundKeys[50];\n\t\t\ts3 = T0[t3 >>> 24] ^ T1[(t0 >>> 16) & 255] ^ T2[(t1 >>> 8) & 255] ^ T3[t2 & 255] ^ roundKeys[51];\n\t\t\tt0 = T0[s0 >>> 24] ^ T1[(s1 >>> 16) & 255] ^ T2[(s2 >>> 8) & 255] ^ T3[s3 & 255] ^ roundKeys[52];\n\t\t\tt1 = T0[s1 >>> 24] ^ T1[(s2 >>> 16) & 255] ^ T2[(s3 >>> 8) & 255] ^ T3[s0 & 255] ^ roundKeys[53];\n\t\t\tt2 = T0[s2 >>> 24] ^ T1[(s3 >>> 16) & 255] ^ T2[(s0 >>> 8) & 255] ^ T3[s1 & 255] ^ roundKeys[54];\n\t\t\tt3 = T0[s3 >>> 24] ^ T1[(s0 >>> 16) & 255] ^ T2[(s1 >>> 8) & 255] ^ T3[s2 & 255] ^ roundKeys[55];\n\t\t\tindexKey = 56;\n\t\t}\n\t\tkeystream[0] = ((S_BOX[t0 >>> 24] << 24) | (S_BOX[(t1 >>> 16) & 255] << 16) | (S_BOX[(t2 >>> 8) & 255] << 8) | S_BOX[t3 & 255]) ^ roundKeys[indexKey];\n\t\tkeystream[1] = ((S_BOX[t1 >>> 24] << 24) | (S_BOX[(t2 >>> 16) & 255] << 16) | (S_BOX[(t3 >>> 8) & 255] << 8) | S_BOX[t0 & 255]) ^ roundKeys[indexKey + 1];\n\t\tkeystream[2] = ((S_BOX[t2 >>> 24] << 24) | (S_BOX[(t3 >>> 16) & 255] << 16) | (S_BOX[(t0 >>> 8) & 255] << 8) | S_BOX[t1 & 255]) ^ roundKeys[indexKey + 2];\n\t\tkeystream[3] = ((S_BOX[t3 >>> 24] << 24) | (S_BOX[(t0 >>> 16) & 255] << 16) | (S_BOX[(t1 >>> 8) & 255] << 8) | S_BOX[t2 & 255]) ^ roundKeys[indexKey + 3];\n\t}\n}\n\nfunction pbkdf2(password, salt, iterations, length) {\n\tconst hmac = createHmac(password);\n\tconst result = new Uint8Array(length);\n\tconst block = new Uint8Array(salt.length + 4);\n\tconst blockView = new DataView(block.buffer);\n\tblock.set(salt);\n\tfor (let indexBlock = 1, offset = 0; offset < length; indexBlock++, offset += SHA1_DIGEST_LENGTH) {\n\t\tblockView.setUint32(salt.length, indexBlock);\n\t\thmac.update(block, 0, block.length);\n\t\tlet previous = hmac.digest();\n\t\tconst output = previous.slice();\n\t\tfor (let iteration = 1; iteration < iterations; iteration++) {\n\t\t\thmac.update(previous, 0, SHA1_DIGEST_LENGTH);\n\t\t\tprevious = hmac.digest();\n\t\t\tfor (let indexByte = 0; indexByte < SHA1_DIGEST_LENGTH; indexByte++) {\n\t\t\t\toutput[indexByte] ^= previous[indexByte];\n\t\t\t}\n\t\t}\n\t\tresult.set(output.subarray(0, Math.min(SHA1_DIGEST_LENGTH, length - offset)), offset);\n\t}\n\treturn result;\n}\n\nfunction createHmac(key) {\n\tconst sha1 = createSha1();\n\tconst innerKey = new Uint8Array(SHA1_BLOCK_LENGTH);\n\tconst outerKey = new Uint8Array(SHA1_BLOCK_LENGTH);\n\tif (key.length > SHA1_BLOCK_LENGTH) {\n\t\tsha1.update(key, 0, key.length);\n\t\tkey = sha1.digest();\n\t}\n\tfor (let indexByte = 0; indexByte < SHA1_BLOCK_LENGTH; indexByte++) {\n\t\tconst keyByte = indexByte < key.length ? key[indexByte] : 0;\n\t\tinnerKey[indexByte] = keyByte ^ HMAC_INNER_PADDING;\n\t\touterKey[indexByte] = keyByte ^ HMAC_OUTER_PADDING;\n\t}\n\tsha1.update(innerKey, 0, SHA1_BLOCK_LENGTH);\n\treturn {\n\t\tupdate(data, offset, length) {\n\t\t\tsha1.update(data, offset, length);\n\t\t},\n\t\tdigest() {\n\t\t\tconst innerDigest = sha1.digest();\n\t\t\tsha1.update(outerKey, 0, SHA1_BLOCK_LENGTH);\n\t\t\tsha1.update(innerDigest, 0, SHA1_DIGEST_LENGTH);\n\t\t\tconst result = sha1.digest();\n\t\t\tsha1.update(innerKey, 0, SHA1_BLOCK_LENGTH);\n\t\t\treturn result;\n\t\t}\n\t};\n}\n\nfunction createSha1() {\n\tconst state = new Int32Array(SHA1_INITIAL_STATE);\n\tconst schedule = new Int32Array(SHA1_SCHEDULE_LENGTH);\n\tconst block = new Uint8Array(SHA1_BLOCK_LENGTH);\n\tconst blockView = new DataView(block.buffer);\n\tconst lengthBytes = new Uint8Array(8);\n\tlet blockLength = 0;\n\tlet totalLength = 0;\n\treturn {\n\t\tupdate,\n\t\tdigest\n\t};\n\n\tfunction update(data, offset, length) {\n\t\tconst end = offset + length;\n\t\ttotalLength += length;\n\t\tif (blockLength) {\n\t\t\twhile (offset < end && blockLength < SHA1_BLOCK_LENGTH) {\n\t\t\t\tblock[blockLength++] = data[offset++];\n\t\t\t}\n\t\t\tif (blockLength == SHA1_BLOCK_LENGTH) {\n\t\t\t\tcompress(blockView, 0);\n\t\t\t\tblockLength = 0;\n\t\t\t}\n\t\t}\n\t\tif (offset + SHA1_BLOCK_LENGTH <= end) {\n\t\t\tconst view = new DataView(data.buffer, data.byteOffset, data.byteLength);\n\t\t\tfor (; offset + SHA1_BLOCK_LENGTH <= end; offset += SHA1_BLOCK_LENGTH) {\n\t\t\t\tcompress(view, offset);\n\t\t\t}\n\t\t}\n\t\twhile (offset < end) {\n\t\t\tblock[blockLength++] = data[offset++];\n\t\t}\n\t}\n\n\tfunction digest() {\n\t\tconst bits = totalLength * 8;\n\t\tconst high = Math.floor(bits / 0x100000000);\n\t\tconst low = bits >>> 0;\n\t\tupdate(SHA1_PADDING, 0, 1);\n\t\twhile (blockLength != SHA1_LENGTH_OFFSET) {\n\t\t\tupdate(SHA1_ZERO, 0, 1);\n\t\t}\n\t\tlengthBytes[0] = high >>> 24;\n\t\tlengthBytes[1] = high >>> 16;\n\t\tlengthBytes[2] = high >>> 8;\n\t\tlengthBytes[3] = high;\n\t\tlengthBytes[4] = low >>> 24;\n\t\tlengthBytes[5] = low >>> 16;\n\t\tlengthBytes[6] = low >>> 8;\n\t\tlengthBytes[7] = low;\n\t\tupdate(lengthBytes, 0, 8);\n\t\tconst result = new Uint8Array(SHA1_DIGEST_LENGTH);\n\t\tconst resultView = new DataView(result.buffer);\n\t\tfor (let indexWord = 0; indexWord < state.length; indexWord++) {\n\t\t\tresultView.setInt32(4 * indexWord, state[indexWord]);\n\t\t}\n\t\tstate.set(SHA1_INITIAL_STATE);\n\t\tblockLength = 0;\n\t\ttotalLength = 0;\n\t\treturn result;\n\t}\n\n\tfunction compress(view, offset) {\n\t\tfor (let index = 0; index < 16; index++) {\n\t\t\tschedule[index] = view.getInt32(offset + 4 * index);\n\t\t}\n\t\tlet a = state[0];\n\t\tlet b = state[1];\n\t\tlet c = state[2];\n\t\tlet d = state[3];\n\t\tlet e = state[4];\n\t\tlet t;\n\t\tfor (let index = 0; index < 15; index += 5) {\n\t\t\te = (((a << 5) | (a >>> 27)) + (((c ^ d) & b) ^ d) + e + 0x5A827999 + schedule[index]) | 0;\n\t\t\tb = (b << 30) | (b >>> 2);\n\t\t\td = (((e << 5) | (e >>> 27)) + (((b ^ c) & a) ^ c) + d + 0x5A827999 + schedule[index + 1]) | 0;\n\t\t\ta = (a << 30) | (a >>> 2);\n\t\t\tc = (((d << 5) | (d >>> 27)) + (((a ^ b) & e) ^ b) + c + 0x5A827999 + schedule[index + 2]) | 0;\n\t\t\te = (e << 30) | (e >>> 2);\n\t\t\tb = (((c << 5) | (c >>> 27)) + (((e ^ a) & d) ^ a) + b + 0x5A827999 + schedule[index + 3]) | 0;\n\t\t\td = (d << 30) | (d >>> 2);\n\t\t\ta = (((b << 5) | (b >>> 27)) + (((d ^ e) & c) ^ e) + a + 0x5A827999 + schedule[index + 4]) | 0;\n\t\t\tc = (c << 30) | (c >>> 2);\n\t\t}\n\t\te = (((a << 5) | (a >>> 27)) + (((c ^ d) & b) ^ d) + e + 0x5A827999 + schedule[15]) | 0;\n\t\tb = (b << 30) | (b >>> 2);\n\t\tt = schedule[13] ^ schedule[8] ^ schedule[2] ^ schedule[0];\n\t\tt = (t << 1) | (t >>> 31);\n\t\tschedule[0] = t;\n\t\td = (((e << 5) | (e >>> 27)) + (((b ^ c) & a) ^ c) + d + 0x5A827999 + t) | 0;\n\t\ta = (a << 30) | (a >>> 2);\n\t\tt = schedule[14] ^ schedule[9] ^ schedule[3] ^ schedule[1];\n\t\tt = (t << 1) | (t >>> 31);\n\t\tschedule[1] = t;\n\t\tc = (((d << 5) | (d >>> 27)) + (((a ^ b) & e) ^ b) + c + 0x5A827999 + t) | 0;\n\t\te = (e << 30) | (e >>> 2);\n\t\tt = schedule[15] ^ schedule[10] ^ schedule[4] ^ schedule[2];\n\t\tt = (t << 1) | (t >>> 31);\n\t\tschedule[2] = t;\n\t\tb = (((c << 5) | (c >>> 27)) + (((e ^ a) & d) ^ a) + b + 0x5A827999 + t) | 0;\n\t\td = (d << 30) | (d >>> 2);\n\t\tt = schedule[0] ^ schedule[11] ^ schedule[5] ^ schedule[3];\n\t\tt = (t << 1) | (t >>> 31);\n\t\tschedule[3] = t;\n\t\ta = (((b << 5) | (b >>> 27)) + (((d ^ e) & c) ^ e) + a + 0x5A827999 + t) | 0;\n\t\tc = (c << 30) | (c >>> 2);\n\t\tfor (let index = 20; index < 40; index += 5) {\n\t\t\tt = schedule[(index - 3) & 15] ^ schedule[(index - 8) & 15] ^ schedule[(index - 14) & 15] ^ schedule[(index) & 15];\n\t\t\tt = (t << 1) | (t >>> 31);\n\t\t\tschedule[(index) & 15] = t;\n\t\t\te = (((a << 5) | (a >>> 27)) + (b ^ c ^ d) + e + 0x6ED9EBA1 + t) | 0;\n\t\t\tb = (b << 30) | (b >>> 2);\n\t\t\tt = schedule[(index - 2) & 15] ^ schedule[(index - 7) & 15] ^ schedule[(index - 13) & 15] ^ schedule[(index + 1) & 15];\n\t\t\tt = (t << 1) | (t >>> 31);\n\t\t\tschedule[(index + 1) & 15] = t;\n\t\t\td = (((e << 5) | (e >>> 27)) + (a ^ b ^ c) + d + 0x6ED9EBA1 + t) | 0;\n\t\t\ta = (a << 30) | (a >>> 2);\n\t\t\tt = schedule[(index - 1) & 15] ^ schedule[(index - 6) & 15] ^ schedule[(index - 12) & 15] ^ schedule[(index + 2) & 15];\n\t\t\tt = (t << 1) | (t >>> 31);\n\t\t\tschedule[(index + 2) & 15] = t;\n\t\t\tc = (((d << 5) | (d >>> 27)) + (e ^ a ^ b) + c + 0x6ED9EBA1 + t) | 0;\n\t\t\te = (e << 30) | (e >>> 2);\n\t\t\tt = schedule[(index) & 15] ^ schedule[(index - 5) & 15] ^ schedule[(index - 11) & 15] ^ schedule[(index + 3) & 15];\n\t\t\tt = (t << 1) | (t >>> 31);\n\t\t\tschedule[(index + 3) & 15] = t;\n\t\t\tb = (((c << 5) | (c >>> 27)) + (d ^ e ^ a) + b + 0x6ED9EBA1 + t) | 0;\n\t\t\td = (d << 30) | (d >>> 2);\n\t\t\tt = schedule[(index + 1) & 15] ^ schedule[(index - 4) & 15] ^ schedule[(index - 10) & 15] ^ schedule[(index + 4) & 15];\n\t\t\tt = (t << 1) | (t >>> 31);\n\t\t\tschedule[(index + 4) & 15] = t;\n\t\t\ta = (((b << 5) | (b >>> 27)) + (c ^ d ^ e) + a + 0x6ED9EBA1 + t) | 0;\n\t\t\tc = (c << 30) | (c >>> 2);\n\t\t}\n\t\tfor (let index = 40; index < 60; index += 5) {\n\t\t\tt = schedule[(index - 3) & 15] ^ schedule[(index - 8) & 15] ^ schedule[(index - 14) & 15] ^ schedule[(index) & 15];\n\t\t\tt = (t << 1) | (t >>> 31);\n\t\t\tschedule[(index) & 15] = t;\n\t\t\te = (((a << 5) | (a >>> 27)) + ((b & c) | ((b | c) & d)) + e + 0x8F1BBCDC + t) | 0;\n\t\t\tb = (b << 30) | (b >>> 2);\n\t\t\tt = schedule[(index - 2) & 15] ^ schedule[(index - 7) & 15] ^ schedule[(index - 13) & 15] ^ schedule[(index + 1) & 15];\n\t\t\tt = (t << 1) | (t >>> 31);\n\t\t\tschedule[(index + 1) & 15] = t;\n\t\t\td = (((e << 5) | (e >>> 27)) + ((a & b) | ((a | b) & c)) + d + 0x8F1BBCDC + t) | 0;\n\t\t\ta = (a << 30) | (a >>> 2);\n\t\t\tt = schedule[(index - 1) & 15] ^ schedule[(index - 6) & 15] ^ schedule[(index - 12) & 15] ^ schedule[(index + 2) & 15];\n\t\t\tt = (t << 1) | (t >>> 31);\n\t\t\tschedule[(index + 2) & 15] = t;\n\t\t\tc = (((d << 5) | (d >>> 27)) + ((e & a) | ((e | a) & b)) + c + 0x8F1BBCDC + t) | 0;\n\t\t\te = (e << 30) | (e >>> 2);\n\t\t\tt = schedule[(index) & 15] ^ schedule[(index - 5) & 15] ^ schedule[(index - 11) & 15] ^ schedule[(index + 3) & 15];\n\t\t\tt = (t << 1) | (t >>> 31);\n\t\t\tschedule[(index + 3) & 15] = t;\n\t\t\tb = (((c << 5) | (c >>> 27)) + ((d & e) | ((d | e) & a)) + b + 0x8F1BBCDC + t) | 0;\n\t\t\td = (d << 30) | (d >>> 2);\n\t\t\tt = schedule[(index + 1) & 15] ^ schedule[(index - 4) & 15] ^ schedule[(index - 10) & 15] ^ schedule[(index + 4) & 15];\n\t\t\tt = (t << 1) | (t >>> 31);\n\t\t\tschedule[(index + 4) & 15] = t;\n\t\t\ta = (((b << 5) | (b >>> 27)) + ((c & d) | ((c | d) & e)) + a + 0x8F1BBCDC + t) | 0;\n\t\t\tc = (c << 30) | (c >>> 2);\n\t\t}\n\t\tfor (let index = 60; index < 80; index += 5) {\n\t\t\tt = schedule[(index - 3) & 15] ^ schedule[(index - 8) & 15] ^ schedule[(index - 14) & 15] ^ schedule[(index) & 15];\n\t\t\tt = (t << 1) | (t >>> 31);\n\t\t\tschedule[(index) & 15] = t;\n\t\t\te = (((a << 5) | (a >>> 27)) + (b ^ c ^ d) + e + 0xCA62C1D6 + t) | 0;\n\t\t\tb = (b << 30) | (b >>> 2);\n\t\t\tt = schedule[(index - 2) & 15] ^ schedule[(index - 7) & 15] ^ schedule[(index - 13) & 15] ^ schedule[(index + 1) & 15];\n\t\t\tt = (t << 1) | (t >>> 31);\n\t\t\tschedule[(index + 1) & 15] = t;\n\t\t\td = (((e << 5) | (e >>> 27)) + (a ^ b ^ c) + d + 0xCA62C1D6 + t) | 0;\n\t\t\ta = (a << 30) | (a >>> 2);\n\t\t\tt = schedule[(index - 1) & 15] ^ schedule[(index - 6) & 15] ^ schedule[(index - 12) & 15] ^ schedule[(index + 2) & 15];\n\t\t\tt = (t << 1) | (t >>> 31);\n\t\t\tschedule[(index + 2) & 15] = t;\n\t\t\tc = (((d << 5) | (d >>> 27)) + (e ^ a ^ b) + c + 0xCA62C1D6 + t) | 0;\n\t\t\te = (e << 30) | (e >>> 2);\n\t\t\tt = schedule[(index) & 15] ^ schedule[(index - 5) & 15] ^ schedule[(index - 11) & 15] ^ schedule[(index + 3) & 15];\n\t\t\tt = (t << 1) | (t >>> 31);\n\t\t\tschedule[(index + 3) & 15] = t;\n\t\t\tb = (((c << 5) | (c >>> 27)) + (d ^ e ^ a) + b + 0xCA62C1D6 + t) | 0;\n\t\t\td = (d << 30) | (d >>> 2);\n\t\t\tt = schedule[(index + 1) & 15] ^ schedule[(index - 4) & 15] ^ schedule[(index - 10) & 15] ^ schedule[(index + 4) & 15];\n\t\t\tt = (t << 1) | (t >>> 31);\n\t\t\tschedule[(index + 4) & 15] = t;\n\t\t\ta = (((b << 5) | (b >>> 27)) + (c ^ d ^ e) + a + 0xCA62C1D6 + t) | 0;\n\t\t\tc = (c << 30) | (c >>> 2);\n\t\t}\n\t\tstate[0] = (state[0] + a) | 0;\n\t\tstate[1] = (state[1] + b) | 0;\n\t\tstate[2] = (state[2] + c) | 0;\n\t\tstate[3] = (state[3] + d) | 0;\n\t\tstate[4] = (state[4] + e) | 0;\n\t}\n}\n\nfunction initTables() {\n\tif (!tablesInitialized) {\n\t\tlet p = 1;\n\t\tlet q = 1;\n\t\tdo {\n\t\t\tp = (p ^ (p << 1) ^ ((p & 0x80) ? 0x1b : 0)) & 255;\n\t\t\tq = (q ^ (q << 1)) & 255;\n\t\t\tq = (q ^ (q << 2)) & 255;\n\t\t\tq = (q ^ (q << 4)) & 255;\n\t\t\tif (q & 0x80) {\n\t\t\t\tq ^= 0x09;\n\t\t\t}\n\t\t\tS_BOX[p] = (q ^ ((q << 1) | (q >> 7)) ^ ((q << 2) | (q >> 6)) ^ ((q << 3) | (q >> 5)) ^ ((q << 4) | (q >> 4)) ^ 0x63) & 255;\n\t\t} while (p != 1);\n\t\tS_BOX[0] = 0x63;\n\t\tfor (let index = 0; index < 256; index++) {\n\t\t\tconst s = S_BOX[index];\n\t\t\tconst s2 = multiplyByTwo(s);\n\t\t\tconst t = (s2 << 24) | (s << 16) | (s << 8) | (s2 ^ s);\n\t\t\tT0[index] = t;\n\t\t\tT1[index] = (t >>> 8) | (t << 24);\n\t\t\tT2[index] = (t >>> 16) | (t << 16);\n\t\t\tT3[index] = (t >>> 24) | (t << 8);\n\t\t}\n\t\ttablesInitialized = true;\n\t}\n}\n\nfunction expandKey(key, roundKeys) {\n\tconst keyWords = key.length >> 2;\n\tconst rounds = keyWords + 6;\n\tconst total = 4 * (rounds + 1);\n\tlet roundConstant = 1;\n\tfor (let index = 0; index < keyWords; index++) {\n\t\troundKeys[index] = (key[4 * index] << 24) | (key[4 * index + 1] << 16) | (key[4 * index + 2] << 8) | key[4 * index + 3];\n\t}\n\tfor (let index = keyWords; index < total; index++) {\n\t\tlet word = roundKeys[index - 1];\n\t\tif (index % keyWords == 0) {\n\t\t\tword = substituteWord((word << 8) | (word >>> 24)) ^ (roundConstant << 24);\n\t\t\troundConstant = multiplyByTwo(roundConstant);\n\t\t} else if (keyWords > 6 && index % keyWords == 4) {\n\t\t\tword = substituteWord(word);\n\t\t}\n\t\troundKeys[index] = roundKeys[index - keyWords] ^ word;\n\t}\n\treturn rounds;\n}\n\nfunction substituteWord(word) {\n\treturn (S_BOX[word >>> 24] << 24) | (S_BOX[(word >>> 16) & 255] << 16) | (S_BOX[(word >>> 8) & 255] << 8) | S_BOX[word & 255];\n}\n\nfunction swapBytes(value) {\n\treturn (value << 24) | ((value & 0xff00) << 8) | ((value >>> 8) & 0xff00) | (value >>> 24);\n}\n\nfunction multiplyByTwo(value) {\n\treturn ((value << 1) ^ ((value >> 7) * 0x1b)) & 255;\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/* global crypto */\n\nimport { FUNCTION_TYPE, UNDEFINED_TYPE } from \"../constants.js\";\n\nconst GET_RANDOM_VALUES_SUPPORTED = typeof crypto != UNDEFINED_TYPE && typeof crypto.getRandomValues == FUNCTION_TYPE;\n\nconst ERR_INVALID_PASSWORD = \"Invalid password\";\nconst ERR_INVALID_AUTHENTICATION_CODE = \"Invalid authentication code\";\nconst ERR_ABORT_CHECK_PASSWORD = \"zipjs-abort-check-password\";\nconst ERR_UNSUPPORTED_CRYPTO_API = \"Crypto API not supported\";\n\nexport {\n\tgetRandomValues,\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_AUTHENTICATION_CODE,\n\tERR_ABORT_CHECK_PASSWORD,\n\tERR_UNSUPPORTED_CRYPTO_API\n};\n\nfunction getRandomValues(array) {\n\tif (GET_RANDOM_VALUES_SUPPORTED) {\n\t\treturn crypto.getRandomValues(array);\n\t} else {\n\t\tthrow new Error(ERR_UNSUPPORTED_CRYPTO_API);\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, ReadableStream */\n\nimport { UNDEFINED_VALUE, UNDEFINED_TYPE, FUNCTION_TYPE, EMPTY_UINT8_ARRAY } from \"../constants.js\";\nimport { encodeText } from \"./../util/encode-text.js\";\nimport { concat } from \"./../util/array.js\";\nimport { createEngine as createDefaultEngine, pbkdf2 } from \"./codecs/aes-hmac-sha1.js\";\nimport {\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_AUTHENTICATION_CODE,\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 PBKDF2_ITERATIONS = 1000;\nconst BASE_KEY_ALGORITHM = Object.assign({ hash: HASH_ALGORITHM }, PBKDF2_ALGORITHM);\nconst DERIVED_BITS_ALGORITHM = Object.assign({ iterations: PBKDF2_ITERATIONS, hash: { name: HASH_FUNCTION } }, PBKDF2_ALGORITHM);\nconst DERIVED_BITS_USAGE = [\"deriveBits\"];\nconst SALT_LENGTH = [8, 12, 16];\nconst KEY_LENGTH = [16, 24, 32];\nconst AUTHENTICATION_CODE_LENGTH = 10;\nconst PASSWORD_VERIFICATION_LENGTH = 2;\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;\n\nlet DERIVE_BITS_SUPPORTED = SUBTLE_API_SUPPORTED && typeof subtle.importKey == FUNCTION_TYPE && typeof subtle.deriveBits == FUNCTION_TYPE;\nlet createEngine = createDefaultEngine;\n\nclass AESDecryptionStream extends TransformStream {\n\n\tconstructor({ password, rawPassword, encryptionStrength, checkPasswordOnly, checkAuthenticationCode = true }) {\n\t\tconst aesCrypto = {};\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tinitAesCrypto(aesCrypto, password, rawPassword, encryptionStrength);\n\t\t\t},\n\t\t\tasync transform(chunk, controller) {\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] + PASSWORD_VERIFICATION_LENGTH));\n\t\t\t\t\tchunk = subarray(chunk, SALT_LENGTH[strength] + PASSWORD_VERIFICATION_LENGTH);\n\t\t\t\t\tif (checkPasswordOnly) {\n\t\t\t\t\t\tdisposeEngine(aesCrypto);\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\tif (aesCrypto.discarded) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tconst output = new Uint8Array(chunk.length - AUTHENTICATION_CODE_LENGTH - ((chunk.length - AUTHENTICATION_CODE_LENGTH) % BLOCK_LENGTH));\n\t\t\t\tcontroller.enqueue(append(aesCrypto, chunk, output, 0, AUTHENTICATION_CODE_LENGTH, true));\n\t\t\t},\n\t\t\tasync flush(controller) {\n\t\t\t\tconst {\n\t\t\t\t\tengine,\n\t\t\t\t\tpendingInput,\n\t\t\t\t\tready\n\t\t\t\t} = aesCrypto;\n\t\t\t\tif (engine) {\n\t\t\t\t\tawait ready;\n\t\t\t\t\tif (aesCrypto.discarded) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tconst originalAuthenticationCode = subarray(pendingInput, pendingInput.length - AUTHENTICATION_CODE_LENGTH);\n\t\t\t\t\tconst decryptedChunkArray = new Uint8Array(subarray(pendingInput, 0, pendingInput.length - AUTHENTICATION_CODE_LENGTH));\n\t\t\t\t\tengine.process(decryptedChunkArray, true);\n\t\t\t\t\tconst authenticationCode = engine.digest();\n\t\t\t\t\tlet invalidAuthenticationCode = pendingInput.length < AUTHENTICATION_CODE_LENGTH ? 1 : 0;\n\t\t\t\t\tfor (let indexByte = 0; indexByte < AUTHENTICATION_CODE_LENGTH; indexByte++) {\n\t\t\t\t\t\tinvalidAuthenticationCode |= authenticationCode[indexByte] ^ originalAuthenticationCode[indexByte];\n\t\t\t\t\t}\n\t\t\t\t\tif (invalidAuthenticationCode && checkAuthenticationCode) {\n\t\t\t\t\t\tcontroller.error(new Error(ERR_INVALID_AUTHENTICATION_CODE));\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tcontroller.enqueue(decryptedChunkArray);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tsetDisposingReadable(this, aesCrypto);\n\t}\n}\n\nclass AESEncryptionStream extends TransformStream {\n\n\tconstructor({ password, rawPassword, encryptionStrength }) {\n\t\tconst aesCrypto = {};\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tinitAesCrypto(aesCrypto, password, rawPassword, encryptionStrength);\n\t\t\t},\n\t\t\tasync transform(chunk, controller) {\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 = EMPTY_UINT8_ARRAY;\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\tif (aesCrypto.discarded) {\n\t\t\t\t\treturn;\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, false));\n\t\t\t},\n\t\t\tasync flush(controller) {\n\t\t\t\tconst {\n\t\t\t\t\tengine,\n\t\t\t\t\tpendingInput,\n\t\t\t\t\tready\n\t\t\t\t} = aesCrypto;\n\t\t\t\tif (engine) {\n\t\t\t\t\tawait ready;\n\t\t\t\t\tif (aesCrypto.discarded) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tconst encryptedChunkArray = new Uint8Array(pendingInput);\n\t\t\t\t\tengine.process(encryptedChunkArray, false);\n\t\t\t\t\tconst authenticationCode = subarray(engine.digest(), 0, AUTHENTICATION_CODE_LENGTH);\n\t\t\t\t\tcontroller.enqueue(concat(encryptedChunkArray, authenticationCode));\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tsetDisposingReadable(this, aesCrypto);\n\t}\n}\n\nexport {\n\tAESDecryptionStream,\n\tAESEncryptionStream,\n\tsetAESEngine\n};\n\nfunction setAESEngine(createEngineFunction) {\n\tcreateEngine = createEngineFunction || createDefaultEngine;\n}\n\nfunction initAesCrypto(aesCrypto, password, rawPassword, encryptionStrength) {\n\tObject.assign(aesCrypto, {\n\t\tready: new Promise(resolve => aesCrypto.resolveReady = resolve),\n\t\tpassword: encodePassword(password, rawPassword),\n\t\tstrength: encryptionStrength - 1,\n\t\tpendingInput: EMPTY_UINT8_ARRAY,\n\t\tdiscarded: false\n\t});\n}\n\nfunction setDisposingReadable(stream, aesCrypto) {\n\tconst reader = stream.readable.getReader();\n\tconst readable = new ReadableStream({\n\t\tasync pull(controller) {\n\t\t\ttry {\n\t\t\t\tconst { value, done } = await reader.read();\n\t\t\t\tif (done) {\n\t\t\t\t\tcontroller.close();\n\t\t\t\t} else {\n\t\t\t\t\tcontroller.enqueue(value);\n\t\t\t\t}\n\t\t\t} catch (error) {\n\t\t\t\tdisposeEngine(aesCrypto);\n\t\t\t\treader.cancel(error).catch(() => { });\n\t\t\t\tthrow error;\n\t\t\t}\n\t\t},\n\t\tcancel(reason) {\n\t\t\tdisposeEngine(aesCrypto);\n\t\t\treturn reader.cancel(reason);\n\t\t}\n\t});\n\tObject.defineProperty(stream, \"readable\", {\n\t\tget() {\n\t\t\treturn readable;\n\t\t}\n\t});\n}\n\nfunction append(aesCrypto, input, output, paddingStart, paddingEnd, decrypt) {\n\tconst {\n\t\tengine,\n\t\tpendingInput\n\t} = aesCrypto;\n\tif (pendingInput.length) {\n\t\tinput = concat(pendingInput, input);\n\t}\n\tconst inputLength = input.length - paddingEnd;\n\tconst alignedLength = inputLength - (inputLength % BLOCK_LENGTH);\n\toutput = expand(output, paddingStart + alignedLength);\n\tif (alignedLength) {\n\t\tconst chunk = subarray(output, paddingStart, paddingStart + alignedLength);\n\t\tchunk.set(subarray(input, 0, alignedLength));\n\t\tengine.process(chunk, decrypt);\n\t}\n\taesCrypto.pendingInput = subarray(input, alignedLength);\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\tdisposeEngine(decrypt);\n\t\tthrow new Error(ERR_INVALID_PASSWORD);\n\t}\n}\n\nfunction disposeEngine(aesCrypto) {\n\tconst { engine } = aesCrypto;\n\taesCrypto.discarded = true;\n\tif (engine && engine.dispose) {\n\t\tengine.dispose();\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 keyLength = KEY_LENGTH[strength];\n\tconst compositeKey = await deriveKey(password, salt, keyLength * 2 + PASSWORD_VERIFICATION_LENGTH);\n\taesCrypto.engine = createEngine(subarray(compositeKey, 0, keyLength), subarray(compositeKey, keyLength, keyLength * 2));\n\tif (aesCrypto.discarded) {\n\t\tdisposeEngine(aesCrypto);\n\t}\n\treturn subarray(compositeKey, keyLength * 2);\n}\n\nasync function deriveKey(password, salt, length) {\n\tif (DERIVE_BITS_SUPPORTED) {\n\t\ttry {\n\t\t\tconst baseKey = await subtle.importKey(RAW_FORMAT, password, BASE_KEY_ALGORITHM, false, DERIVED_BITS_USAGE);\n\t\t\treturn new Uint8Array(await subtle.deriveBits(Object.assign({ salt }, DERIVED_BITS_ALGORITHM), baseKey, length * 8));\n\t\t} catch {\n\t\t\tDERIVE_BITS_SUPPORTED = false;\n\t\t}\n\t}\n\treturn pbkdf2(password, salt, PBKDF2_ITERATIONS, length);\n}\n\nfunction encodePassword(password, rawPassword) {\n\tif (rawPassword === UNDEFINED_VALUE) {\n\t\treturn encodeText(password);\n\t} else {\n\t\treturn rawPassword;\n\t}\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","/*\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, rawPassword, passwordVerification, checkPasswordOnly }) {\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tinitZipCrypto(this, password, rawPassword, passwordVerification);\n\t\t\t},\n\t\t\ttransform(chunk, controller) {\n\t\t\t\tconst zipCrypto = this;\n\t\t\t\tif (zipCrypto.password || zipCrypto.rawPassword) {\n\t\t\t\t\tconst decryptedHeader = decrypt(zipCrypto, chunk.subarray(0, HEADER_LENGTH));\n\t\t\t\t\tzipCrypto.password = zipCrypto.rawPassword = null;\n\t\t\t\t\tif ((decryptedHeader[HEADER_LENGTH - 1] ^ zipCrypto.passwordVerification) != 0) {\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, rawPassword, passwordVerification }) {\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tinitZipCrypto(this, password, rawPassword, passwordVerification);\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 || zipCrypto.rawPassword) {\n\t\t\t\t\tzipCrypto.password = zipCrypto.rawPassword = 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};\n\nfunction initZipCrypto(zipCrypto, password, rawPassword, passwordVerification) {\n\tObject.assign(zipCrypto, {\n\t\tpassword,\n\t\trawPassword,\n\t\tpasswordVerification\n\t});\n\tcreateKeys(zipCrypto, password, rawPassword);\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, rawPassword) {\n\tconst cryptoKeys = [0x12345678, 0x23456789, 0x34567890];\n\tObject.assign(target, {\n\t\tcryptoKeys,\n\t\tcrcKey0: new Crc32(cryptoKeys[0]),\n\t\tcrcKey2: new Crc32(cryptoKeys[2])\n\t});\n\tif (rawPassword) {\n\t\tfor (let index = 0; index < rawPassword.length; index++) {\n\t\t\tupdateKeys(target, rawPassword[index]);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < password.length; index++) {\n\t\t\tupdateKeys(target, password.charCodeAt(index));\n\t\t}\n\t}\n}\n\nfunction updateKeys(target, byte) {\n\tlet [, key1] = target.cryptoKeys;\n\ttarget.crcKey0.append([byte]);\n\tconst key0 = ~target.crcKey0.get();\n\tkey1 = getInt32(Math.imul(getInt32(key1 + getInt8(key0)), 134775813) + 1);\n\ttarget.crcKey2.append([key1 >>> 24]);\n\tconst key2 = ~target.crcKey2.get();\n\ttarget.cryptoKeys = [key0, key1, key2];\n}\n\nfunction getByte(target) {\n\tconst temp = target.cryptoKeys[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) 2026 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, Response, ReadableStream, WritableStream */\n\nimport { FUNCTION_TYPE } from \"../constants.js\";\n\nexport {\n\ttoCompatibleReadable,\n\ttoCompatibleWritable,\n\tstreamToBlob\n};\n\nfunction toCompatibleReadable(readable) {\n\tif (readable instanceof ReadableStream) {\n\t\treturn readable;\n\t}\n\tconst reader = readable.getReader();\n\treturn new ReadableStream({\n\t\tasync pull(controller) {\n\t\t\ttry {\n\t\t\t\tconst { value, done } = await reader.read();\n\t\t\t\tif (done) {\n\t\t\t\t\tcontroller.close();\n\t\t\t\t} else {\n\t\t\t\t\tcontroller.enqueue(value);\n\t\t\t\t}\n\t\t\t} catch (error) {\n\t\t\t\treader.cancel(error).catch(() => { });\n\t\t\t\tthrow error;\n\t\t\t}\n\t\t},\n\t\tcancel(reason) {\n\t\t\treturn reader.cancel(reason);\n\t\t}\n\t});\n}\n\nfunction streamToBlob(readable, contentType) {\n\treadable = toCompatibleReadable(readable);\n\tconst blobOptions = contentType ? { type: contentType } : {};\n\tif (responseSupportsGlobalReadable()) {\n\t\treturn new Response(readable).blob().then(blob => contentType ? new Blob([blob], blobOptions) : blob);\n\t}\n\tconst chunks = [];\n\treturn readable\n\t\t.pipeTo(new WritableStream({\n\t\t\twrite(chunk) {\n\t\t\t\tchunks.push(chunk);\n\t\t\t}\n\t\t}))\n\t\t.then(() => new Blob(chunks, blobOptions));\n}\n\nfunction responseSupportsGlobalReadable() {\n\treturn typeof Blob.prototype.stream != FUNCTION_TYPE || new Blob([]).stream() instanceof ReadableStream;\n}\n\nfunction toCompatibleWritable(writable) {\n\tif (writable instanceof WritableStream) {\n\t\treturn writable;\n\t}\n\tconst writer = writable.getWriter();\n\treturn new WritableStream({\n\t\twrite(chunk) {\n\t\t\treturn writer.write(chunk);\n\t\t},\n\t\tclose() {\n\t\t\treturn writer.close();\n\t\t},\n\t\tabort(reason) {\n\t\t\treturn writer.abort(reason);\n\t\t}\n\t});\n}\n","/*\n Copyright (c) 2025 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 {\n\tMAX_16_BITS,\n\tCOMPRESSION_METHOD_STORE,\n\tCOMPRESSION_METHOD_DEFLATE,\n\tCOMPRESSION_METHOD_DEFLATE_64,\n\tCOMPRESSION_METHOD_AES,\n\tFUNCTION_TYPE,\n\tSTRING_TYPE\n} from \"./constants.js\";\n\nconst ERR_INVALID_CODEC_DEFINITION = \"Invalid codec definition\";\nconst ERR_RESERVED_COMPRESSION_METHOD = \"Reserved compression method\";\nconst ERR_INVALID_CODEC_MODULE = \"Invalid codec module\";\nconst ERR_UNSUPPORTED_COMPRESSION = \"Compression method not supported\";\n\nconst RESERVED_COMPRESSION_METHODS = [\n\tCOMPRESSION_METHOD_STORE,\n\tCOMPRESSION_METHOD_DEFLATE,\n\tCOMPRESSION_METHOD_DEFLATE_64,\n\tCOMPRESSION_METHOD_AES\n];\n\nconst registeredCodecs = new Map();\nconst codecStreams = new Map();\n\nexport {\n\tERR_INVALID_CODEC_DEFINITION,\n\tERR_UNSUPPORTED_COMPRESSION,\n\tERR_RESERVED_COMPRESSION_METHOD,\n\tERR_INVALID_CODEC_MODULE,\n\tregisterCodec,\n\tunregisterCodec,\n\tgetRegisteredCodec,\n\tgetRegisteredCodecs,\n\tgetCodecStreams,\n\tsetCodecStreams,\n\tensureCodecStreams\n};\n\nfunction registerCodec(codec = {}) {\n\tconst { compressionMethod, format, codecURI, CompressionStream, DecompressionStream, versionNeeded } = codec;\n\tif (!Number.isInteger(compressionMethod) || compressionMethod < 0 || compressionMethod > MAX_16_BITS ||\n\t\ttypeof format != STRING_TYPE || !format.length) {\n\t\tthrow new Error(ERR_INVALID_CODEC_DEFINITION);\n\t}\n\tif (RESERVED_COMPRESSION_METHODS.includes(compressionMethod)) {\n\t\tthrow new Error(ERR_RESERVED_COMPRESSION_METHOD);\n\t}\n\tconst hasStreams = typeof CompressionStream == FUNCTION_TYPE || typeof DecompressionStream == FUNCTION_TYPE;\n\tif (!hasStreams && (typeof codecURI != STRING_TYPE || !codecURI.length)) {\n\t\tthrow new Error(ERR_INVALID_CODEC_DEFINITION);\n\t}\n\tregisteredCodecs.set(compressionMethod, { compressionMethod, format, codecURI, versionNeeded });\n\tif (hasStreams) {\n\t\tsetCodecStreams(format, { CompressionStream, DecompressionStream });\n\t}\n}\n\nfunction unregisterCodec(compressionMethod) {\n\tconst codec = registeredCodecs.get(compressionMethod);\n\tif (codec) {\n\t\tregisteredCodecs.delete(compressionMethod);\n\t\tlet formatUsed;\n\t\tregisteredCodecs.forEach(otherCodec => formatUsed = formatUsed || otherCodec.format == codec.format);\n\t\tif (!formatUsed) {\n\t\t\tcodecStreams.delete(codec.format);\n\t\t}\n\t}\n}\n\nfunction getRegisteredCodec(compressionMethod) {\n\treturn registeredCodecs.get(compressionMethod);\n}\n\nfunction getRegisteredCodecs() {\n\treturn Array.from(registeredCodecs.values(), codec => Object.assign({}, codec, codecStreams.get(codec.format)));\n}\n\nfunction getCodecStreams(format) {\n\treturn codecStreams.get(format);\n}\n\nfunction setCodecStreams(format, streams) {\n\tconst { CompressionStream, DecompressionStream } = streams;\n\tif (typeof CompressionStream != FUNCTION_TYPE && typeof DecompressionStream != FUNCTION_TYPE) {\n\t\tthrow new Error(ERR_INVALID_CODEC_MODULE);\n\t}\n\tcodecStreams.set(format, { CompressionStream, DecompressionStream });\n}\n\nasync function ensureCodecStreams(format, codecURI) {\n\tif (!codecStreams.has(format) && codecURI) {\n\t\tsetCodecStreams(format, await import(/* webpackIgnore: true */ /* @vite-ignore */ codecURI));\n\t}\n}\n","/*\n Copyright (c) 2025 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, ReadableStream */\n// deno-lint-ignore-file no-this-alias\n\nimport { Crc32 } from \"./codecs/crc32.js\";\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_AUTHENTICATION_CODE,\n\tERR_ABORT_CHECK_PASSWORD,\n\tERR_UNSUPPORTED_CRYPTO_API\n} from \"./common-crypto.js\";\nimport { UNDEFINED_VALUE } from \"../constants.js\";\nimport { concat, getDataView } from \"../util/array.js\";\nimport { toCompatibleReadable } from \"../util/compatible-streams.js\";\nimport { isErrorObject } from \"../util/error.js\";\nimport { getCodecStreams, ERR_UNSUPPORTED_COMPRESSION } from \"../codec-registry.js\";\n\nconst ERR_INVALID_UNCOMPRESSED_SIZE = \"Invalid uncompressed size\";\nconst ERR_INVALID_COMPRESSED_DATA = \"Invalid compressed data\";\nconst ERR_CODEC_OUT_OF_MEMORY = \"Codec out of memory\";\nconst ERR_INVALID_CRC32 = \"Invalid CRC32\";\nconst Z_MEM_ERROR_CODE = \"Z_MEM_ERROR\";\nconst FORMAT_DEFLATE_RAW = \"deflate-raw\";\nconst FORMAT_DEFLATE64_RAW = \"deflate64-raw\";\nconst FORMAT_GZIP = \"gzip\";\nconst GZIP_HEADER_LENGTH = 10;\nconst GZIP_TRAILER_LENGTH = 8;\nconst GZIP_HEADER_BYTES = [0x1f, 0x8b, 0x08];\n\nclass DeflateStream extends TransformStream {\n\n\tconstructor(options, { chunkSize, CompressionStreamFallback, CompressionStream }) {\n\t\tsuper({});\n\t\tconst { compressed, encrypted, useCompressionStream, zipCrypto, computeCrc32, level, deflate64, format, compressionMethod, inputSize } = options;\n\t\tconst stream = this;\n\t\tlet crc32Stream, encryptionStream, gzipCrc32Stream;\n\t\tlet readable = super.readable;\n\t\tconst codecStreams = format && getCodecStreams(format);\n\t\tconst GzipCompressionStream = getGzipCodecStream(useCompressionStream, CompressionStream, CompressionStreamFallback);\n\t\tconst useGzipCrc32 = computeCrc32 && compressed && !deflate64 && !codecStreams && (!encrypted || zipCrypto) && Boolean(GzipCompressionStream);\n\t\tif ((!encrypted || zipCrypto) && computeCrc32 && !useGzipCrc32) {\n\t\t\tcrc32Stream = new Crc32Stream();\n\t\t\treadable = pipeThrough(readable, crc32Stream);\n\t\t}\n\t\tif (compressed) {\n\t\t\tif (codecStreams) {\n\t\t\t\treadable = pipeThroughBackpressured(readable, createCodecStream(codecStreams.CompressionStream, format, { level, chunkSize, compressionMethod, uncompressedSize: inputSize }));\n\t\t\t} else if (useGzipCrc32) {\n\t\t\t\tgzipCrc32Stream = new GzipToRawDeflateStream();\n\t\t\t\treadable = pipeThroughBackpressured(readable, new GzipCompressionStream(FORMAT_GZIP, { level, chunkSize }));\n\t\t\t\treadable = pipeThrough(readable, gzipCrc32Stream);\n\t\t\t} else {\n\t\t\t\ttry {\n\t\t\t\t\treadable = pipeThroughCompressionStream(readable, useCompressionStream, { level, chunkSize }, CompressionStream, CompressionStreamFallback);\n\t\t\t\t} catch (error) {\n\t\t\t\t\tif (!useCompressionStream && CompressionStreamFallback) {\n\t\t\t\t\t\tthrow mapMemoryError(error);\n\t\t\t\t\t}\n\t\t\t\t\tlet gzipStream;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tgzipStream = new CompressionStream(FORMAT_GZIP);\n\t\t\t\t\t} catch {\n\t\t\t\t\t\tthrow mapMemoryError(error);\n\t\t\t\t\t}\n\t\t\t\t\treadable = pipeThroughBackpressured(readable, gzipStream);\n\t\t\t\t\treadable = pipeThrough(readable, new GzipToRawDeflateStream());\n\t\t\t\t}\n\t\t\t}\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, () => {\n\t\t\tif ((!encrypted || zipCrypto) && computeCrc32) {\n\t\t\t\tstream.crc32 = useGzipCrc32 ? gzipCrc32Stream.crc32 : new DataView(crc32Stream.value.buffer).getUint32(0);\n\t\t\t}\n\t\t});\n\t}\n}\n\nclass GzipToRawDeflateStream extends TransformStream {\n\n\tconstructor() {\n\t\t// deno-lint-ignore prefer-const\n\t\tlet stream;\n\t\tlet headerBytesLeft = GZIP_HEADER_LENGTH;\n\t\tlet trailerCandidate = new Uint8Array(0);\n\t\tsuper({\n\t\t\ttransform(chunk, controller) {\n\t\t\t\tif (headerBytesLeft) {\n\t\t\t\t\tconst droppedLength = Math.min(headerBytesLeft, chunk.length);\n\t\t\t\t\theaderBytesLeft -= droppedLength;\n\t\t\t\t\tchunk = chunk.subarray(droppedLength);\n\t\t\t\t\tif (!chunk.length) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tconst availableLength = trailerCandidate.length + chunk.length;\n\t\t\t\tif (availableLength <= GZIP_TRAILER_LENGTH) {\n\t\t\t\t\ttrailerCandidate = concat(trailerCandidate, chunk);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tconst emitLength = availableLength - GZIP_TRAILER_LENGTH;\n\t\t\t\tconst emittedFromTrailer = Math.min(emitLength, trailerCandidate.length);\n\t\t\t\tcontroller.enqueue(concat(\n\t\t\t\t\ttrailerCandidate.subarray(0, emittedFromTrailer),\n\t\t\t\t\tchunk.subarray(0, emitLength - emittedFromTrailer)));\n\t\t\t\ttrailerCandidate = concat(\n\t\t\t\t\ttrailerCandidate.subarray(emittedFromTrailer),\n\t\t\t\t\tchunk.subarray(emitLength - emittedFromTrailer));\n\t\t\t},\n\t\t\tflush() {\n\t\t\t\tconst dataView = getDataView(trailerCandidate);\n\t\t\t\tstream.crc32 = dataView.getUint32(0, true);\n\t\t\t\tstream.uncompressedSize = dataView.getUint32(4, true);\n\t\t\t}\n\t\t});\n\t\tstream = this;\n\t}\n}\n\nfunction pipeThroughGzipDecompressionStream(readable, gzipStream, outputSize, crc32, sourceErrors) {\n\tconst writer = gzipStream.writable.getWriter();\n\tconst reader = gzipStream.readable.getReader();\n\tconst outputCrc32 = crc32 === UNDEFINED_VALUE ? new Crc32() : UNDEFINED_VALUE;\n\tlet outputLength = 0;\n\tlet trailerWritten = false;\n\tlet settled = false;\n\tlet resolvePull, controller;\n\tconst output = new ReadableStream({\n\t\tstart(streamController) {\n\t\t\tcontroller = streamController;\n\t\t},\n\t\tpull() {\n\t\t\tresumePump();\n\t\t},\n\t\tcancel(reason) {\n\t\t\tsettled = true;\n\t\t\tresumePump();\n\t\t\treturn reader.cancel(reason);\n\t\t}\n\t});\n\tpump();\n\tdrain();\n\treturn output;\n\n\tasync function pump() {\n\t\tconst inputReader = readable.getReader();\n\t\ttry {\n\t\t\tconst header = new Uint8Array(GZIP_HEADER_LENGTH);\n\t\t\theader.set(GZIP_HEADER_BYTES);\n\t\t\tawait writer.write(header);\n\t\t\tfor (; ;) {\n\t\t\t\tawait outputCapacity();\n\t\t\t\tawait writer.ready;\n\t\t\t\tconst { value, done } = await readSource(inputReader, sourceErrors);\n\t\t\t\tif (done) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tawait writer.write(value);\n\t\t\t}\n\t\t\tif (outputCrc32) {\n\t\t\t\tawait writer.write(new Uint8Array(0));\n\t\t\t}\n\t\t\tconst trailer = new Uint8Array(GZIP_TRAILER_LENGTH);\n\t\t\tconst dataView = getDataView(trailer);\n\t\t\tdataView.setUint32(0, outputCrc32 ? outputCrc32.get() : crc32, true);\n\t\t\tdataView.setUint32(4, outputSize, true);\n\t\t\ttrailerWritten = true;\n\t\t\tawait writer.write(trailer);\n\t\t\tawait writer.close();\n\t\t} catch (error) {\n\t\t\tawait abort(writer, error);\n\t\t\tawait cancel(inputReader, error);\n\t\t}\n\t}\n\n\tasync function drain() {\n\t\ttry {\n\t\t\tfor (; ;) {\n\t\t\t\tconst { value, done } = await read();\n\t\t\t\tif (done) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\toutputLength += value.length;\n\t\t\t\tif (outputLength > outputSize) {\n\t\t\t\t\tthrow new Error(ERR_INVALID_UNCOMPRESSED_SIZE);\n\t\t\t\t}\n\t\t\t\tif (outputCrc32) {\n\t\t\t\t\toutputCrc32.append(value);\n\t\t\t\t}\n\t\t\t\tcontroller.enqueue(value);\n\t\t\t}\n\t\t\tif (!settled) {\n\t\t\t\tsettled = true;\n\t\t\t\tcontroller.close();\n\t\t\t}\n\t\t} catch (error) {\n\t\t\tfail(error);\n\t\t\tawait cancel(reader, error);\n\t\t}\n\t}\n\n\tfunction read() {\n\t\treturn reader.read().catch(error => {\n\t\t\tif (trailerWritten) {\n\t\t\t\tif (!outputCrc32) {\n\t\t\t\t\tthrow mapError(error, ERR_INVALID_CRC32);\n\t\t\t\t}\n\t\t\t\tif (outputLength != outputSize) {\n\t\t\t\t\tthrow mapError(error, ERR_INVALID_UNCOMPRESSED_SIZE);\n\t\t\t\t}\n\t\t\t\treturn { done: true };\n\t\t\t}\n\t\t\tthrow mapCodecError(error, sourceErrors);\n\t\t});\n\t}\n\n\tfunction outputCapacity() {\n\t\tif (!settled && controller.desiredSize <= 0) {\n\t\t\treturn new Promise(resolve => resolvePull = resolve);\n\t\t}\n\t}\n\n\tfunction resumePump() {\n\t\tif (resolvePull) {\n\t\t\tconst resolve = resolvePull;\n\t\t\tresolvePull = UNDEFINED_VALUE;\n\t\t\tresolve();\n\t\t}\n\t}\n\n\tfunction fail(error) {\n\t\tif (!settled) {\n\t\t\tsettled = true;\n\t\t\tcontroller.error(error);\n\t\t\tresumePump();\n\t\t}\n\t}\n}\n\nclass InflateStream extends TransformStream {\n\n\tconstructor(options, { chunkSize, DecompressionStreamFallback, DecompressionStream }) {\n\t\tsuper({});\n\t\tconst { zipCrypto, encrypted, checkCrc32, crc32, compressed, useCompressionStream, deflate64, format, compressionMethod, rawBitFlag, outputSize } = options;\n\t\tlet crc32Stream, decryptionStream, gzipCrc32;\n\t\tlet readable = 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\tconst sourceErrors = new Set();\n\t\t\tconst codecStreams = format && getCodecStreams(format);\n\t\t\tlet gzipStream;\n\t\t\tif (codecStreams) {\n\t\t\t\treadable = pipeThroughBackpressured(readable, createCodecStream(codecStreams.DecompressionStream, format, { chunkSize, compressionMethod, rawBitFlag, uncompressedSize: outputSize }), sourceErrors);\n\t\t\t} else {\n\t\t\t\tconst GzipDecompressionStream = getGzipCodecStream(useCompressionStream, DecompressionStream, DecompressionStreamFallback);\n\t\t\t\tif (checkCrc32 && !deflate64 && crc32 !== UNDEFINED_VALUE && outputSize !== UNDEFINED_VALUE && GzipDecompressionStream) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tgzipStream = new GzipDecompressionStream(FORMAT_GZIP, { chunkSize });\n\t\t\t\t\t} catch {\n\t\t\t\t\t\tgzipStream = UNDEFINED_VALUE;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (!gzipStream) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\treadable = pipeThroughCompressionStream(readable, useCompressionStream, { chunkSize, deflate64 }, DecompressionStream, DecompressionStreamFallback, sourceErrors);\n\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\tif (deflate64 || outputSize === UNDEFINED_VALUE || (!useCompressionStream && DecompressionStreamFallback)) {\n\t\t\t\t\t\t\tthrow mapMemoryError(error);\n\t\t\t\t\t\t}\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tgzipStream = new DecompressionStream(FORMAT_GZIP);\n\t\t\t\t\t\t} catch {\n\t\t\t\t\t\t\tthrow mapMemoryError(error);\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\tif (gzipStream) {\n\t\t\t\tgzipCrc32 = true;\n\t\t\t\treadable = pipeThroughGzipDecompressionStream(readable, gzipStream, outputSize, crc32, sourceErrors);\n\t\t\t} else {\n\t\t\t\treadable = mapInflateStreamError(readable, sourceErrors);\n\t\t\t}\n\t\t}\n\t\tif (checkCrc32 && !gzipCrc32) {\n\t\t\tcrc32Stream = new Crc32Stream();\n\t\t\treadable = pipeThrough(readable, crc32Stream);\n\t\t}\n\t\tsetReadable(this, readable, () => {\n\t\t\tif (crc32Stream) {\n\t\t\t\tconst computedCrc32 = new DataView(crc32Stream.value.buffer).getUint32(0, false);\n\t\t\t\tif (crc32 != computedCrc32) {\n\t\t\t\t\tthrow new Error(ERR_INVALID_CRC32);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n}\n\nconst formatSupportByStream = new Map();\n\nfunction supportsFormat(StreamClass, format) {\n\tif (!StreamClass) {\n\t\treturn false;\n\t}\n\tlet supportByFormat = formatSupportByStream.get(StreamClass);\n\tif (!supportByFormat) {\n\t\tsupportByFormat = new Map();\n\t\tformatSupportByStream.set(StreamClass, supportByFormat);\n\t}\n\tlet supported = supportByFormat.get(format);\n\tif (supported === UNDEFINED_VALUE) {\n\t\ttry {\n\t\t\tnew StreamClass(format);\n\t\t\tsupported = true;\n\t\t} catch {\n\t\t\tsupported = false;\n\t\t}\n\t\tsupportByFormat.set(format, supported);\n\t}\n\treturn supported;\n}\n\nfunction supportsDeflateRaw(StreamClass) {\n\treturn supportsFormat(StreamClass, FORMAT_DEFLATE_RAW);\n}\n\nfunction supportsGzip(StreamClass) {\n\treturn supportsFormat(StreamClass, FORMAT_GZIP);\n}\n\nexport {\n\tDeflateStream,\n\tInflateStream,\n\tsupportsFormat,\n\tsupportsDeflateRaw,\n\tsupportsGzip,\n\tFORMAT_DEFLATE_RAW,\n\tFORMAT_DEFLATE64_RAW,\n\tFORMAT_GZIP,\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_CRC32,\n\tERR_INVALID_AUTHENTICATION_CODE,\n\tERR_INVALID_UNCOMPRESSED_SIZE,\n\tERR_INVALID_COMPRESSED_DATA,\n\tERR_CODEC_OUT_OF_MEMORY,\n\tERR_ABORT_CHECK_PASSWORD,\n\tERR_UNSUPPORTED_CRYPTO_API\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 createCodecStream(CodecStreamClass, format, options) {\n\tif (!CodecStreamClass) {\n\t\tthrow new Error(ERR_UNSUPPORTED_COMPRESSION);\n\t}\n\treturn new CodecStreamClass(format, options);\n}\n\nfunction getGzipCodecStream(useCompressionStream, CodecStreamNative, CodecStreamFallback) {\n\tif (useCompressionStream && CodecStreamNative) {\n\t\treturn CodecStreamNative;\n\t} else if (CodecStreamFallback && CodecStreamFallback.requiresModule) {\n\t\treturn CodecStreamFallback;\n\t}\n}\n\nfunction pipeThroughCompressionStream(readable, useCompressionStream, options, CompressionStreamNative, CompressionStreamFallback, sourceErrors) {\n\tconst Stream = useCompressionStream && CompressionStreamNative ?\n\t\tCompressionStreamNative :\n\t\tCompressionStreamFallback || CompressionStreamNative;\n\tconst format = options.deflate64 ? FORMAT_DEFLATE64_RAW : FORMAT_DEFLATE_RAW;\n\tlet codecStream;\n\ttry {\n\t\tcodecStream = new Stream(format, options);\n\t} catch (error) {\n\t\tif (useCompressionStream && CompressionStreamFallback && Stream != CompressionStreamFallback) {\n\t\t\tcodecStream = new CompressionStreamFallback(format, options);\n\t\t} else {\n\t\t\tthrow error;\n\t\t}\n\t}\n\treturn pipeThroughBackpressured(readable, codecStream, sourceErrors);\n}\n\nfunction pipeThrough(readable, transformStream) {\n\treturn toCompatibleReadable(readable).pipeThrough(transformStream);\n}\n\nfunction pipeThroughBackpressured(readable, transformStream, sourceErrors) {\n\tconst writer = transformStream.writable.getWriter();\n\tconst reader = readable.getReader();\n\tpump();\n\treturn transformStream.readable;\n\n\tasync function pump() {\n\t\ttry {\n\t\t\tfor (; ;) {\n\t\t\t\tawait writer.ready;\n\t\t\t\tconst result = await readSource(reader, sourceErrors);\n\t\t\t\tif (result.done) {\n\t\t\t\t\tawait writer.close();\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tawait writer.write(result.value);\n\t\t\t}\n\t\t} catch (error) {\n\t\t\tawait abort(writer, error);\n\t\t\tawait cancel(reader, error);\n\t\t}\n\t}\n}\n\nasync function abort(writer, error) {\n\ttry {\n\t\tawait writer.abort(error);\n\t} catch {\n\t\t// ignored: the writable may already be errored/closed\n\t}\n}\n\nasync function cancel(reader, error) {\n\ttry {\n\t\tawait reader.cancel(error);\n\t} catch {\n\t\t// ignored: the readable may already be errored/closed\n\t}\n}\n\nfunction readSource(reader, sourceErrors) {\n\tconst result = reader.read();\n\treturn sourceErrors ? result.catch(error => {\n\t\tsourceErrors.add(error);\n\t\tthrow error;\n\t}) : result;\n}\n\nfunction mapCodecError(error, sourceErrors) {\n\tif (sourceErrors.has(error)) {\n\t\treturn error;\n\t}\n\treturn mapError(error, isMemoryError(error) ? ERR_CODEC_OUT_OF_MEMORY : ERR_INVALID_COMPRESSED_DATA);\n}\n\nfunction mapMemoryError(error) {\n\treturn isMemoryError(error) ? mapError(error, ERR_CODEC_OUT_OF_MEMORY) : error;\n}\n\nfunction isMemoryError(error) {\n\treturn isErrorObject(error) && error.code == Z_MEM_ERROR_CODE;\n}\n\nfunction mapError(error, message) {\n\tconst mappedError = new Error(message);\n\tmappedError.cause = error;\n\treturn mappedError;\n}\n\nfunction mapInflateStreamError(readable, sourceErrors) {\n\tconst reader = readable.getReader();\n\treturn new ReadableStream({\n\t\tasync pull(controller) {\n\t\t\ttry {\n\t\t\t\tconst { value, done } = await reader.read();\n\t\t\t\tif (done) {\n\t\t\t\t\tcontroller.close();\n\t\t\t\t} else {\n\t\t\t\t\tcontroller.enqueue(value);\n\t\t\t\t}\n\t\t\t} catch (error) {\n\t\t\t\tawait cancel(reader, error);\n\t\t\t\tthrow mapCodecError(error, sourceErrors);\n\t\t\t}\n\t\t},\n\t\tcancel(reason) {\n\t\t\treturn reader.cancel(reason);\n\t\t}\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/*\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 { UNDEFINED_VALUE } from \"../constants.js\";\nimport {\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_CRC32,\n\tERR_INVALID_AUTHENTICATION_CODE,\n\tERR_INVALID_UNCOMPRESSED_SIZE,\n\tERR_INVALID_COMPRESSED_DATA,\n\tERR_CODEC_OUT_OF_MEMORY,\n\tERR_ABORT_CHECK_PASSWORD,\n\tERR_UNSUPPORTED_CRYPTO_API,\n\tInflateStream,\n\tDeflateStream,\n\tsupportsDeflateRaw,\n\tsupportsGzip\n} from \"./zip-entry-stream.js\";\n\nconst DEFAULT_CHUNK_SIZE = 64 * 1024;\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 MESSAGE_READY = \"ready\";\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\tMESSAGE_READY,\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_CRC32,\n\tERR_INVALID_AUTHENTICATION_CODE,\n\tERR_INVALID_UNCOMPRESSED_SIZE,\n\tERR_INVALID_COMPRESSED_DATA,\n\tERR_CODEC_OUT_OF_MEMORY,\n\tERR_ABORT_CHECK_PASSWORD,\n\tERR_UNSUPPORTED_CRYPTO_API,\n\tCodecStream,\n\tChunkStream,\n\tsupportsDeflateRaw,\n\tsupportsGzip\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\tcodec.outputSize = 0;\n\t\tlet inputSize = 0;\n\t\tconst stream = new Stream(options, config);\n\t\tconst readable = super.readable;\n\t\tconst inputSizeStream = new TransformStream({\n\t\t\ttransform(chunk, controller) {\n\t\t\t\tif (chunk && chunk.length) {\n\t\t\t\t\tinputSize += 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\tObject.assign(codec, {\n\t\t\t\t\tinputSize\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t\tconst outputSizeStream = new TransformStream({\n\t\t\ttransform(chunk, controller) {\n\t\t\t\tif (chunk && chunk.length) {\n\t\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t\t\tcodec.outputSize += chunk.length;\n\t\t\t\t\tif (options.outputSize !== UNDEFINED_VALUE && codec.outputSize > options.outputSize) {\n\t\t\t\t\t\tthrow new Error(ERR_INVALID_UNCOMPRESSED_SIZE);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\tflush() {\n\t\t\t\tconst { crc32 } = stream;\n\t\t\t\tObject.assign(codec, {\n\t\t\t\t\tcrc32,\n\t\t\t\t\tinputSize\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(inputSizeStream).pipeThrough(stream).pipeThrough(outputSizeStream);\n\t\t\t}\n\t\t});\n\t}\n}\n\nclass ChunkStream extends TransformStream {\n\n\tconstructor(chunkSize) {\n\t\tconst pendingChunks = [];\n\t\tlet pendingLength = 0;\n\t\tlet outputSize = 0;\n\t\tif (!Number.isFinite(chunkSize) || chunkSize < 1) {\n\t\t\tchunkSize = DEFAULT_CHUNK_SIZE;\n\t\t}\n\t\tsuper({\n\t\t\ttransform(chunk, controller) {\n\t\t\t\tpendingChunks.push(chunk);\n\t\t\t\tpendingLength += chunk.length;\n\t\t\t\twhile (pendingLength > chunkSize) {\n\t\t\t\t\toutputSize += chunkSize;\n\t\t\t\t\tcontroller.enqueue(shiftChunk());\n\t\t\t\t}\n\t\t\t},\n\t\t\tflush(controller) {\n\t\t\t\tif (pendingLength) {\n\t\t\t\t\toutputSize += pendingLength;\n\t\t\t\t\tcontroller.enqueue(concatChunks(pendingChunks, pendingLength));\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(this, \"outputSize\", {\n\t\t\tget: () => outputSize\n\t\t});\n\n\t\tfunction shiftChunk() {\n\t\t\tconst result = new Uint8Array(chunkSize);\n\t\t\tlet resultOffset = 0;\n\t\t\twhile (resultOffset < chunkSize) {\n\t\t\t\tconst firstChunk = pendingChunks[0];\n\t\t\t\tconst remainingLength = chunkSize - resultOffset;\n\t\t\t\tif (firstChunk.length <= remainingLength) {\n\t\t\t\t\tresult.set(firstChunk, resultOffset);\n\t\t\t\t\tresultOffset += firstChunk.length;\n\t\t\t\t\tpendingChunks.shift();\n\t\t\t\t} else {\n\t\t\t\t\tresult.set(firstChunk.subarray(0, remainingLength), resultOffset);\n\t\t\t\t\tpendingChunks[0] = firstChunk.subarray(remainingLength);\n\t\t\t\t\tresultOffset += remainingLength;\n\t\t\t\t}\n\t\t\t}\n\t\t\tpendingLength -= chunkSize;\n\t\t\treturn result;\n\t\t}\n\n\t\tfunction concatChunks(chunks, length) {\n\t\t\tconst result = new Uint8Array(length);\n\t\t\tlet offset = 0;\n\t\t\tfor (const chunk of chunks) {\n\t\t\t\tresult.set(chunk, offset);\n\t\t\t\toffset += chunk.length;\n\t\t\t}\n\t\t\treturn result;\n\t\t}\n\t}\n}","/*\n Copyright (c) 2025 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, TransformStream */\n\nimport {\n\tUNDEFINED_VALUE,\n\tUNDEFINED_TYPE\n} from \"./constants.js\";\nimport { getChunkSize } from \"./configuration.js\";\nimport { isErrorObject } from \"./util/error.js\";\nimport {\n\tCODEC_DEFLATE,\n\tCodecStream,\n\tChunkStream,\n\tsupportsDeflateRaw,\n\tsupportsGzip\n} from \"./streams/codec-stream.js\";\n\nconst ERR_WORKER_STARTUP_TIMEOUT = \"Worker startup timeout\";\n\nlet webWorkerSupported, createWorkerFailed, webWorkerBackend;\nlet initModule = () => { };\n\nexport {\n\tCodecWorker,\n\tProgressWatcherStream,\n\tcallHandler,\n\tconfigureWorker,\n\tresetWebWorkerSupport,\n\tsupportsDeflate,\n\tsetWebWorkerBackend,\n\tdisableWebWorker,\n\tcreateWorkerInterface,\n\trunWorker,\n\tERR_WORKER_STARTUP_TIMEOUT\n};\n\nfunction configureWorker({ initModule: initModuleFunction }) {\n\tinitModule = initModuleFunction;\n}\n\nfunction setWebWorkerBackend(backend) {\n\twebWorkerBackend = backend;\n}\n\nasync function supportsDeflate(config) {\n\tconst { CompressionStream: NativeStream, CompressionStreamFallback: FallbackStream } = config;\n\tif (FallbackStream && !FallbackStream.requiresModule) {\n\t\treturn true;\n\t}\n\tif (supportsDeflateRaw(NativeStream) || supportsGzip(NativeStream)) {\n\t\treturn true;\n\t}\n\tif (FallbackStream) {\n\t\treturn await loadModule(config);\n\t}\n\treturn false;\n}\n\nasync function loadModule(config) {\n\tif (initModule) {\n\t\ttry {\n\t\t\tawait initModule(config);\n\t\t\treturn true;\n\t\t} catch {\n\t\t\t// ignored\n\t\t}\n\t}\n\treturn false;\n}\n\nfunction resetWebWorkerSupport() {\n\twebWorkerSupported = UNDEFINED_VALUE;\n\tcreateWorkerFailed = false;\n}\n\nfunction disableWebWorker(workerData) {\n\tif (workerData.createWorker) {\n\t\tcreateWorkerFailed = true;\n\t} else {\n\t\twebWorkerSupported = false;\n\t}\n}\n\nclass CodecWorker {\n\n\tconstructor(workerData, { readable, writable }, workerOptions, onTaskFinished) {\n\t\tconst { options, config, streamOptions, useWebWorkers, transferStreams, workerURI } = workerOptions;\n\t\tlet { createWorker } = workerOptions;\n\t\tconst { signal } = streamOptions;\n\t\tif (createWorkerFailed) {\n\t\t\tcreateWorker = UNDEFINED_VALUE;\n\t\t}\n\t\tObject.assign(workerData, {\n\t\t\tbusy: true,\n\t\t\tgeneration: (workerData.generation || 0) + 1,\n\t\t\treadable: readable\n\t\t\t\t.pipeThrough(new ChunkStream(getChunkSize(config)))\n\t\t\t\t.pipeThrough(new ProgressWatcherStream(streamOptions), { signal }),\n\t\t\twritable,\n\t\t\toptions: Object.assign({}, options),\n\t\t\tworkerOptions,\n\t\t\tworkerURI,\n\t\t\tcreateWorker,\n\t\t\ttransferStreams,\n\t\t\tterminate() {\n\t\t\t\treturn new Promise(resolve => {\n\t\t\t\t\tconst { worker, busy } = workerData;\n\t\t\t\t\tif (busy) {\n\t\t\t\t\t\tworkerData.terminateResolvers = workerData.terminateResolvers || [];\n\t\t\t\t\t\tworkerData.terminateResolvers.push(resolve);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (worker) {\n\t\t\t\t\t\t\tworker.terminate();\n\t\t\t\t\t\t\tworkerData.worker = null;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tresolve();\n\t\t\t\t\t}\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\tif (workerData.busy) {\n\t\t\t\t\tconst { terminateResolvers, worker } = workerData;\n\t\t\t\t\tif (terminateResolvers) {\n\t\t\t\t\t\tworkerData.terminateResolvers = null;\n\t\t\t\t\t\tif (worker) {\n\t\t\t\t\t\t\tworkerData.terminated = true;\n\t\t\t\t\t\t\tworker.terminate();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tworkerData.busy = false;\n\t\t\t\t\tconst pendingTasks = onTaskFinished(workerData);\n\t\t\t\t\tif (terminateResolvers) {\n\t\t\t\t\t\tterminateResolvers.forEach(resolve => resolve(pendingTasks));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tif (webWorkerSupported === UNDEFINED_VALUE) {\n\t\t\t// deno-lint-ignore valid-typeof\n\t\t\twebWorkerSupported = typeof Worker != UNDEFINED_TYPE;\n\t\t}\n\t\treturn (useWebWorkers && webWorkerBackend && ((webWorkerSupported && workerURI) || createWorker) ? webWorkerBackend : createWorkerInterface)(workerData, config);\n\t}\n}\n\nclass ProgressWatcherStream extends TransformStream {\n\n\tconstructor({ onstart, onprogress, size, onend }) {\n\t\tlet chunkOffset = 0;\n\t\tsuper({\n\t\t\tasync start() {\n\t\t\t\tif (onstart) {\n\t\t\t\t\tawait callHandler(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\tasync flush() {\n\t\t\t\tif (onend) {\n\t\t\t\t\tawait callHandler(onend, chunkOffset);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n}\n\nasync function callHandler(handler, ...parameters) {\n\ttry {\n\t\tawait handler(...parameters);\n\t} catch {\n\t\t// ignored\n\t}\n}\n\nfunction createWorkerInterface(workerData, config) {\n\treturn {\n\t\trun: () => runWorker(workerData, config)\n\t};\n}\n\nasync function runWorker({ options, readable, writable, onTaskFinished, workerOptions }, config) {\n\tlet codecStream, chunkStream, modulePromise;\n\ttry {\n\t\tif (options.compressed && !options.format) {\n\t\t\tconst deflate = options.codecType.startsWith(CODEC_DEFLATE);\n\t\t\tconst FallbackStream = deflate ? config.CompressionStreamFallback : config.DecompressionStreamFallback;\n\t\t\tconst NativeStream = deflate ? config.CompressionStream : config.DecompressionStream;\n\t\t\tif (!options.useCompressionStream) {\n\t\t\t\tif (!await moduleLoaded() && (!FallbackStream || FallbackStream.requiresModule)) {\n\t\t\t\t\toptions.useCompressionStream = true;\n\t\t\t\t}\n\t\t\t} else if (FallbackStream && FallbackStream.requiresModule && !supportsDeflateRaw(NativeStream)) {\n\t\t\t\tawait moduleLoaded();\n\t\t\t}\n\t\t}\n\t\tif (options.encrypted && !options.zipCrypto) {\n\t\t\tawait moduleLoaded();\n\t\t}\n\t\tcodecStream = new CodecStream(options, config);\n\t\tchunkStream = new ChunkStream(getChunkSize(config));\n\t\tconst { signal } = workerOptions.streamOptions;\n\t\tawait readable\n\t\t\t.pipeThrough(codecStream)\n\t\t\t.pipeThrough(chunkStream)\n\t\t\t.pipeTo(writable, { preventClose: true, preventAbort: true, signal });\n\t\tconst {\n\t\t\tcrc32,\n\t\t\tinputSize,\n\t\t\toutputSize\n\t\t} = codecStream;\n\t\treturn {\n\t\t\tcrc32,\n\t\t\tinputSize,\n\t\t\toutputSize\n\t\t};\n\t} catch (error) {\n\t\tif (codecStream) {\n\t\t\tconst outputSize = chunkStream ? chunkStream.outputSize : 0;\n\t\t\tworkerOptions.outputSize = outputSize;\n\t\t\tif (isErrorObject(error)) {\n\t\t\t\ttry {\n\t\t\t\t\terror.outputSize = outputSize;\n\t\t\t\t} catch {\n\t\t\t\t\t// ignored\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tthrow error;\n\t} finally {\n\t\tonTaskFinished();\n\t}\n\n\tfunction moduleLoaded() {\n\t\tif (!modulePromise) {\n\t\t\tmodulePromise = loadModule(config);\n\t\t}\n\t\treturn modulePromise;\n\t}\n}\n","/*\n Copyright (c) 2025 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, URL */\n\nimport { UNDEFINED_VALUE } from \"./constants.js\";\nimport {\n\tCODEC_INFLATE,\n\tCODEC_DEFLATE,\n\tERR_INVALID_CRC32,\n\tERR_INVALID_AUTHENTICATION_CODE,\n\tERR_INVALID_UNCOMPRESSED_SIZE,\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_COMPRESSED_DATA,\n\tERR_CODEC_OUT_OF_MEMORY,\n\tERR_ABORT_CHECK_PASSWORD,\n\tERR_UNSUPPORTED_CRYPTO_API\n} from \"./streams/codec-stream.js\";\nimport { ensureCodecStreams } from \"./codec-registry.js\";\nimport { CodecWorker, resetWebWorkerSupport, ERR_WORKER_STARTUP_TIMEOUT } from \"./codec-worker.js\";\n\nlet pool = [];\nconst pendingRequests = [];\nlet starvationTimeout;\nlet starvationDelay;\n\nexport {\n\trunWorker,\n\tterminateWorkers,\n\tCODEC_DEFLATE,\n\tCODEC_INFLATE,\n\tERR_INVALID_CRC32,\n\tERR_INVALID_AUTHENTICATION_CODE,\n\tERR_INVALID_UNCOMPRESSED_SIZE,\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_COMPRESSED_DATA,\n\tERR_CODEC_OUT_OF_MEMORY,\n\tERR_ABORT_CHECK_PASSWORD,\n\tERR_UNSUPPORTED_CRYPTO_API,\n\tERR_WORKER_STARTUP_TIMEOUT\n};\n\nlet indexWorker = 0;\n\nasync function runWorker(stream, workerOptions) {\n\tconst { options, config } = workerOptions;\n\tconst { transferStreams, useWebWorkers, useCompressionStream, compressed, checkCrc32, computeCrc32, encrypted, format, codecURI } = options;\n\tconst { workerURI, createWorker, maxWorkers } = config;\n\tif (format) {\n\t\tif (codecURI) {\n\t\t\toptions.codecURI = resolveCodecURI(codecURI, config.baseURI);\n\t\t}\n\t\tawait ensureCodecStreams(format, options.codecURI);\n\t}\n\tworkerOptions.transferStreams = !format && (transferStreams || (transferStreams === UNDEFINED_VALUE && config.transferStreams));\n\tconst streamCopy = !compressed && !checkCrc32 && !computeCrc32 && !encrypted;\n\tconst workerSupported = format === UNDEFINED_VALUE || Boolean(options.codecURI);\n\tworkerOptions.useWebWorkers = !streamCopy && workerSupported && (useWebWorkers || (useWebWorkers === UNDEFINED_VALUE && config.useWebWorkers));\n\tworkerOptions.workerURI = workerOptions.useWebWorkers && workerURI ? workerURI : UNDEFINED_VALUE;\n\tworkerOptions.createWorker = workerOptions.useWebWorkers && createWorker ? createWorker : UNDEFINED_VALUE;\n\toptions.useCompressionStream = useCompressionStream || (useCompressionStream === UNDEFINED_VALUE && config.useCompressionStream);\n\treturn (await getWorker()).run();\n\n\t// deno-lint-ignore require-await\n\tasync function getWorker() {\n\t\tconst workerData = pool.find(workerData => !workerData.busy);\n\t\tif (workerData) {\n\t\t\tclearTerminateTimeout(workerData);\n\t\t\treturn new CodecWorker(workerData, stream, workerOptions, onTaskFinished);\n\t\t} else if (pool.length < maxWorkers) {\n\t\t\tconst workerData = { indexWorker };\n\t\t\tindexWorker++;\n\t\t\tpool.push(workerData);\n\t\t\treturn new CodecWorker(workerData, stream, workerOptions, onTaskFinished);\n\t\t} else {\n\t\t\treturn new Promise(resolve => {\n\t\t\t\tpendingRequests.push({ resolve, stream, workerOptions });\n\t\t\t\tstarvationDelay = config.workerStarvationTimeout;\n\t\t\t\tarmStarvationTimeout();\n\t\t\t});\n\t\t}\n\t}\n\n\tfunction onTaskFinished(workerData) {\n\t\tclearStarvationTimeout();\n\t\tif (workerData.terminated) {\n\t\t\tworkerData.terminated = false;\n\t\t\treturn runPendingRequestsInline();\n\t\t} else if (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\tarmStarvationTimeout();\n\t\t} else if (workerData.worker) {\n\t\t\tclearTerminateTimeout(workerData);\n\t\t\tterminateWorker(workerData, workerOptions);\n\t\t} else {\n\t\t\tpool = pool.filter(data => data != workerData);\n\t\t}\n\t}\n}\n\nfunction resolveCodecURI(codecURI, baseURI) {\n\ttry {\n\t\treturn new URL(codecURI, baseURI).toString();\n\t} catch {\n\t\treturn codecURI;\n\t}\n}\n\nfunction armStarvationTimeout() {\n\tif (!starvationTimeout && pendingRequests.length && Number.isFinite(starvationDelay) && starvationDelay >= 0) {\n\t\tstarvationTimeout = setTimeout(onWorkerStarvation, starvationDelay);\n\t}\n}\n\nfunction clearStarvationTimeout() {\n\tif (starvationTimeout) {\n\t\tclearTimeout(starvationTimeout);\n\t\tstarvationTimeout = null;\n\t}\n}\n\nfunction onWorkerStarvation() {\n\tstarvationTimeout = null;\n\tif (pendingRequests.length) {\n\t\tconst [{ resolve, stream, workerOptions }] = pendingRequests.splice(0, 1);\n\t\tresolve(new CodecWorker({}, stream, getInlineWorkerOptions(workerOptions), onInlineTaskFinished));\n\t\tarmStarvationTimeout();\n\t}\n}\n\nfunction runPendingRequestsInline() {\n\tconst tasks = pendingRequests.splice(0).map(({ resolve, stream, workerOptions }) => new Promise(resolveTask => {\n\t\tresolve(new CodecWorker({}, stream, getInlineWorkerOptions(workerOptions), () => {\n\t\t\tonInlineTaskFinished();\n\t\t\tresolveTask();\n\t\t}));\n\t}));\n\tclearStarvationTimeout();\n\treturn Promise.all(tasks);\n}\n\nfunction getInlineWorkerOptions(workerOptions) {\n\treturn Object.assign({}, workerOptions, { useWebWorkers: false, workerURI: UNDEFINED_VALUE, createWorker: UNDEFINED_VALUE });\n}\n\nfunction onInlineTaskFinished() {\n\tclearStarvationTimeout();\n\tarmStarvationTimeout();\n}\n\nfunction terminateWorker(workerData, workerOptions) {\n\tconst { config } = workerOptions;\n\tconst { terminateWorkerTimeout } = config;\n\tif (Number.isFinite(terminateWorkerTimeout) && terminateWorkerTimeout >= 0) {\n\t\tworkerData.terminateTimeout = setTimeout(async () => {\n\t\t\tpool = pool.filter(data => data != workerData);\n\t\t\ttry {\n\t\t\t\tawait workerData.terminate();\n\t\t\t} catch {\n\t\t\t\t// ignored\n\t\t\t}\n\t\t}, terminateWorkerTimeout);\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\nasync function terminateWorkers() {\n\tawait Promise.allSettled([\n\t\trunPendingRequestsInline(),\n\t\t...pool.map(workerData => {\n\t\t\tclearTerminateTimeout(workerData);\n\t\t\treturn workerData.terminate();\n\t\t})\n\t]);\n\tresetWebWorkerSupport();\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 CP437 = \"\\0\\u263A\\u263B\\u2665\\u2666\\u2663\\u2660\\u2022\\u25D8\\u25CB\\u25D9\\u2642\\u2640\\u266A\\u266B\\u263C\\u25BA\\u25C4\\u2195\\u203C\\u00B6\\u00A7\\u25AC\\u21A8\\u2191\\u2193\\u2192\\u2190\\u221F\\u2194\\u25B2\\u25BC !\\\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\\u2302\\u00C7\\u00FC\\u00E9\\u00E2\\u00E4\\u00E0\\u00E5\\u00E7\\u00EA\\u00EB\\u00E8\\u00EF\\u00EE\\u00EC\\u00C4\\u00C5\\u00C9\\u00E6\\u00C6\\u00F4\\u00F6\\u00F2\\u00FB\\u00F9\\u00FF\\u00D6\\u00DC\\u00A2\\u00A3\\u00A5\\u20A7\\u0192\\u00E1\\u00ED\\u00F3\\u00FA\\u00F1\\u00D1\\u00AA\\u00BA\\u00BF\\u2310\\u00AC\\u00BD\\u00BC\\u00A1\\u00AB\\u00BB\\u2591\\u2592\\u2593\\u2502\\u2524\\u2561\\u2562\\u2556\\u2555\\u2563\\u2551\\u2557\\u255D\\u255C\\u255B\\u2510\\u2514\\u2534\\u252C\\u251C\\u2500\\u253C\\u255E\\u255F\\u255A\\u2554\\u2569\\u2566\\u2560\\u2550\\u256C\\u2567\\u2568\\u2564\\u2565\\u2559\\u2558\\u2552\\u2553\\u256B\\u256A\\u2518\\u250C\\u2588\\u2584\\u258C\\u2590\\u2580\\u03B1\\u00DF\\u0393\\u03C0\\u03A3\\u03C3\\u00B5\\u03C4\\u03A6\\u0398\\u03A9\\u03B4\\u221E\\u03C6\\u03B5\\u2229\\u2261\\u00B1\\u2265\\u2264\\u2320\\u2321\\u00F7\\u2248\\u00B0\\u2219\\u00B7\\u221A\\u207F\\u00B2\\u25A0\\u00A0\".split(\"\");\n\nexport {\n\tdecodeCP437\n};\n\nfunction decodeCP437(stringValue) {\n\tlet result = \"\";\n\tfor (let indexCharacter = 0; indexCharacter < stringValue.length; indexCharacter++) {\n\t\tresult += CP437[stringValue[indexCharacter]];\n\t}\n\treturn result;\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 \"./decode-cp437.js\";\n\nexport {\n\tdecodeText,\n\tdecodeTextRemovingBOM,\n\tisUTF8Text\n};\n\nfunction decodeText(value, encoding) {\n\treturn decode(value, encoding, true);\n}\n\nfunction isUTF8Text(value) {\n\tif (value.some(byte => byte > 0x7f)) {\n\t\ttry {\n\t\t\tnew TextDecoder(\"utf-8\", { fatal: true }).decode(value);\n\t\t\treturn true;\n\t\t} catch {\n\t\t\treturn false;\n\t\t}\n\t} else {\n\t\treturn false;\n\t}\n}\n\nfunction decodeTextRemovingBOM(value, encoding) {\n\treturn decode(value, encoding, false);\n}\n\nfunction decode(value, encoding, ignoreBOM) {\n\tif (encoding && encoding.trim().toLowerCase() == \"cp437\") {\n\t\treturn decodeCP437(value);\n\t} else {\n\t\treturn new TextDecoder(encoding, { ignoreBOM }).decode(value);\n\t}\n}","/*\n Copyright (c) 2025 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, TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tUNDEFINED_VALUE,\n\tFUNCTION_TYPE,\n\tUNDEFINED_TYPE,\n\tEND_OF_CENTRAL_DIR_LENGTH,\n\tMAX_16_BITS,\n\tEMPTY_UINT8_ARRAY\n} from \"./constants.js\";\nimport { getConfiguration, getChunkSize, normalizeChunkSize } from \"./configuration.js\";\nimport { concat, toExactUint8Array } from \"./util/array.js\";\nimport { toCompatibleReadable, toCompatibleWritable, streamToBlob } from \"./util/compatible-streams.js\";\nimport { decodeTextRemovingBOM } from \"./util/decode-text.js\";\n\nconst ERR_HTTP_STATUS = \"HTTP error \";\nconst MIN_SUCCESS_HTTP_STATUS = 200;\nconst MAX_SUCCESS_HTTP_STATUS = 299;\nconst ERR_HTTP_RANGE = \"HTTP Range not supported\";\nconst ERR_HTTP_RESOURCE_CHANGED = \"HTTP resource changed\";\nconst ERR_ITERATOR_COMPLETED_TOO_SOON = \"Writer iterator completed too soon\";\nconst ERR_WRITER_NOT_INITIALIZED = \"Writer not initialized\";\nconst ERR_WRITER_SIZE_NOT_WRITABLE = \"Invalid writer (size must be writable)\";\n\nconst CONTENT_TYPE_TEXT_PLAIN = \"text/plain\";\nconst HTTP_HEADER_CONTENT_LENGTH = \"Content-Length\";\nconst HTTP_HEADER_CONTENT_ENCODING = \"Content-Encoding\";\nconst HTTP_HEADER_CONTENT_RANGE = \"Content-Range\";\nconst HTTP_HEADER_ACCEPT_RANGES = \"Accept-Ranges\";\nconst HTTP_HEADER_RANGE = \"Range\";\nconst HTTP_HEADER_ETAG = \"Etag\";\nconst HTTP_HEADER_LAST_MODIFIED = \"Last-Modified\";\nconst HTTP_METHOD_HEAD = \"HEAD\";\nconst HTTP_METHOD_GET = \"GET\";\nconst HTTP_RANGE_UNIT = \"bytes\";\nconst DEFAULT_BUFFER_SIZE = 256 * 1024;\nconst DEFAULT_MAXIMUM_RANGE_SIZE = 16 * 1024 * 1024;\nconst END_OF_CENTRAL_DIR_SEARCH_LENGTH = END_OF_CENTRAL_DIR_LENGTH + MAX_16_BITS;\n\nconst PROPERTY_NAME_WRITABLE = \"writable\";\nconst DISK_BOUNDARY = Symbol();\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\treturn this.createReadable();\n\t}\n\n\tcreateReadable({ offset = 0, size, chunkSize = getChunkSize(getConfiguration()) } = {}) {\n\t\tconst reader = this;\n\t\tlet chunkOffset = 0;\n\t\tchunkSize = normalizeChunkSize(chunkSize);\n\t\treturn new ReadableStream({\n\t\t\tasync pull(controller) {\n\t\t\t\tconst dataSize = size === UNDEFINED_VALUE ? chunkSize : Math.min(chunkSize, size - chunkOffset);\n\t\t\t\tconst data = await readUint8Array(reader, offset + chunkOffset, dataSize);\n\t\t\t\tif (data.length) {\n\t\t\t\t\tcontroller.enqueue(data);\n\t\t\t\t\tchunkOffset += data.length;\n\t\t\t\t}\n\t\t\t\tif ((size !== UNDEFINED_VALUE && chunkOffset >= size) || (!data.length && dataSize)) {\n\t\t\t\t\tcontroller.close();\n\t\t\t\t}\n\t\t\t}\n\t\t});\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\tif (!writer.initialized) {\n\t\t\t\t\tthrow new Error(ERR_WRITER_NOT_INITIALIZED);\n\t\t\t\t}\n\t\t\t\treturn writer.writeUint8Array(toExactUint8Array(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\tlet effectiveLength = 0;\n\t\tfor (let indexByte = delta; indexByte < delta + length && indexByte < bytes.length; indexByte++) {\n\t\t\tdataArray[indexByte - delta] = bytes.charCodeAt(indexByte);\n\t\t\teffectiveLength++;\n\t\t}\n\t\tif (effectiveLength < dataArray.length) {\n\t\t\treturn dataArray.subarray(0, effectiveLength);\n\t\t} else {\n\t\t\treturn dataArray;\n\t\t}\n\t}\n}\n\nclass Data64URIWriter extends Writer {\n\n\tconstructor(contentType) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\tcontentType,\n\t\t\tdata: \"data:\" + (contentType || \"\") + \";base64,\",\n\t\t\tpendingCharacters: \"\"\n\t\t});\n\t}\n\n\twriteUint8Array(array) {\n\t\tconst writer = this;\n\t\tlet indexArray;\n\t\tlet dataString = writer.pendingCharacters;\n\t\tconst delta = writer.pendingCharacters.length;\n\t\twriter.pendingCharacters = \"\";\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.pendingCharacters += 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.pendingCharacters = dataString + writer.pendingCharacters;\n\t\t}\n\t}\n\n\tgetData() {\n\t\treturn this.data + btoa(this.pendingCharacters);\n\t}\n}\n\nlet blobSliceReliable;\nlet blobSliceProbe;\n\nfunction probeBlobSliceReliability() {\n\tblobSliceProbe = (async () => {\n\t\ttry {\n\t\t\tconst slicedBlob = new Blob([new Uint8Array(3)]).slice(1, 2);\n\t\t\tconst streamReader = slicedBlob.stream().getReader();\n\t\t\tlet streamedLength = 0;\n\t\t\tlet result = await streamReader.read();\n\t\t\twhile (!result.done) {\n\t\t\t\tstreamedLength += result.value.length;\n\t\t\t\tresult = await streamReader.read();\n\t\t\t}\n\t\t\tblobSliceReliable = streamedLength == 1;\n\t\t} catch {\n\t\t\tblobSliceReliable = false;\n\t\t}\n\t})();\n}\n\nclass BlobReader extends Reader {\n\n\tconstructor(blob) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\tsourceBlob: blob,\n\t\t\tsize: blob.size\n\t\t});\n\t\tif (!blobSliceProbe) {\n\t\t\tprobeBlobSliceReliability();\n\t\t}\n\t}\n\n\tcreateReadable(options) {\n\t\tconst reader = this;\n\t\tconst { sourceBlob, size } = reader;\n\t\tconst { offset = 0, size: readSize = size - offset } = options || {};\n\t\t// deno-lint-ignore valid-typeof\n\t\tif (typeof sourceBlob.stream == FUNCTION_TYPE) {\n\t\t\tif (!offset && readSize >= size) {\n\t\t\t\treturn toCompatibleReadable(sourceBlob.stream());\n\t\t\t}\n\t\t\tif (blobSliceReliable) {\n\t\t\t\treturn toCompatibleReadable(sourceBlob.slice(offset, offset + readSize).stream());\n\t\t\t}\n\t\t}\n\t\treturn super.createReadable(options);\n\t}\n\n\tasync readUint8Array(offset, length) {\n\t\tconst reader = this;\n\t\tconst offsetEnd = offset + length;\n\t\tconst readsWholeBlob = !offset && offsetEnd >= reader.size;\n\t\tconst blob = readsWholeBlob ? reader.sourceBlob : reader.sourceBlob.slice(offset, offsetEnd);\n\t\tlet arrayBuffer = await blob.arrayBuffer();\n\t\tconst sliceIgnoredByBuggyImplementation = arrayBuffer.byteLength > length;\n\t\tif (sliceIgnoredByBuggyImplementation) {\n\t\t\tarrayBuffer = arrayBuffer.slice(offset, offsetEnd);\n\t\t}\n\t\treturn new Uint8Array(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\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.contentType = contentType;\n\t\twriter.blobPromise = streamToBlob(transformStream.readable, contentType);\n\t\twriter.blobPromise.catch(() => { });\n\t}\n\n\tgetData() {\n\t\treturn this.blobPromise;\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\nfunction getTextSize(text) {\n\tlet size = 0;\n\tfor (let indexCharacter = 0; indexCharacter < text.length; indexCharacter++) {\n\t\tconst characterCode = text.charCodeAt(indexCharacter);\n\t\tif (characterCode < 0x80) {\n\t\t\tsize += 1;\n\t\t} else if (characterCode < 0x800) {\n\t\t\tsize += 2;\n\t\t} else if (characterCode < 0xd800 || characterCode >= 0xe000) {\n\t\t\tsize += 3;\n\t\t} else if (characterCode < 0xdc00 && (text.charCodeAt(indexCharacter + 1) & 0xfc00) == 0xdc00) {\n\t\t\tsize += 4;\n\t\t\tindexCharacter++;\n\t\t} else {\n\t\t\tsize += 3;\n\t\t}\n\t}\n\treturn size;\n}\n\nclass TextWriter extends BlobWriter {\n\n\tconstructor(encoding) {\n\t\tsuper();\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\treturn decodeTextRemovingBOM(new Uint8Array(await blob.arrayBuffer()), encoding);\n\t\t}\n\t}\n}\n\nclass FetchReader extends Reader {\n\n\tconstructor(url, options) {\n\t\tsuper();\n\t\tcreateHttpReader(this, url, options);\n\t}\n\n\tasync init() {\n\t\tawait initHttpReader(this, sendFetchRequest, getFetchRequestData);\n\t\tsuper.init();\n\t}\n\n\tcreateReadable(options) {\n\t\tconst reader = this;\n\t\tconst { useRangeHeader, forceRangeRequests, size, eocdCache } = reader;\n\t\tif ((useRangeHeader || forceRangeRequests) && size !== UNDEFINED_VALUE) {\n\t\t\tconst { offset = 0, size: readSize = size - offset } = options || {};\n\t\t\tconst cached = eocdCache && offset >= size - eocdCache.length;\n\t\t\tif (readSize > 0 && offset < size && !cached) {\n\t\t\t\treturn createRangeReadable(reader, offset, Math.min(readSize, size - offset));\n\t\t\t}\n\t\t}\n\t\treturn super.createReadable(options);\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\tcreateHttpReader(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 createHttpReader(httpReader, url, options) {\n\tconst {\n\t\tpreventHeadRequest,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests,\n\t\tcombineSizeEocd,\n\t\tcheckResourceChanges = true,\n\t\tmaximumRangeSize = DEFAULT_MAXIMUM_RANGE_SIZE,\n\t\tfetch\n\t} = options;\n\toptions = Object.assign({}, options);\n\tdelete options.preventHeadRequest;\n\tdelete options.useRangeHeader;\n\tdelete options.forceRangeRequests;\n\tdelete options.combineSizeEocd;\n\tdelete options.checkResourceChanges;\n\tdelete options.maximumRangeSize;\n\tdelete options.useXHR;\n\tdelete options.fetch;\n\tObject.assign(httpReader, {\n\t\turl,\n\t\toptions,\n\t\tpreventHeadRequest,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests,\n\t\tcombineSizeEocd,\n\t\tcheckResourceChanges,\n\t\tmaximumRangeSize,\n\t\tfetch\n\t});\n}\n\nasync function initHttpReader(httpReader, sendRequest, getRequestData) {\n\tconst {\n\t\turl,\n\t\tpreventHeadRequest,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests,\n\t\tcombineSizeEocd\n\t} = httpReader;\n\tif (isHttpFamily(url) && (useRangeHeader || forceRangeRequests) && (typeof preventHeadRequest == UNDEFINED_TYPE || preventHeadRequest)) {\n\t\tconst response = await sendRequest(HTTP_METHOD_GET, httpReader, getRangeHeaders(httpReader, combineSizeEocd ? -END_OF_CENTRAL_DIR_SEARCH_LENGTH : undefined));\n\t\tconst acceptRanges = response.headers.get(HTTP_HEADER_ACCEPT_RANGES);\n\t\tif (!forceRangeRequests && (!acceptRanges || acceptRanges.toLowerCase() != HTTP_RANGE_UNIT)) {\n\t\t\tthrow new Error(ERR_HTTP_RANGE);\n\t\t} else {\n\t\t\tlet eocdCache;\n\t\t\tif (combineSizeEocd && response.status == 206) {\n\t\t\t\teocdCache = new Uint8Array(await response.arrayBuffer());\n\t\t\t}\n\t\t\tsetResourceValidators(httpReader, response);\n\t\t\tconst contentSize = getContentRangeSize(response);\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\tif (eocdCache && eocdCache.length && getContentRangeOffset(response) === httpReader.size - eocdCache.length) {\n\t\t\t\thttpReader.eocdCache = eocdCache;\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\teocdCache,\n\t\tsize,\n\t\toptions\n\t} = httpReader;\n\tif (useRangeHeader || forceRangeRequests) {\n\t\tif (index >= size || length === 0) {\n\t\t\treturn EMPTY_UINT8_ARRAY;\n\t\t} else {\n\t\t\tif (index + length > size) {\n\t\t\t\tlength = size - index;\n\t\t\t}\n\t\t\tif (eocdCache && index >= size - eocdCache.length) {\n\t\t\t\tconst cacheIndex = index - (size - eocdCache.length);\n\t\t\t\treturn eocdCache.slice(cacheIndex, cacheIndex + length);\n\t\t\t}\n\t\t\tconst response = await sendRequest(HTTP_METHOD_GET, httpReader, getRangeHeaders(httpReader, index, length));\n\t\t\tif (response.status != 206) {\n\t\t\t\tthrow new Error(ERR_HTTP_RANGE);\n\t\t\t}\n\t\t\tconst rangeStart = getContentRangeOffset(response);\n\t\t\tif (rangeStart !== UNDEFINED_VALUE && rangeStart != index) {\n\t\t\t\tthrow new Error(ERR_HTTP_RANGE);\n\t\t\t}\n\t\t\tcheckResourceValidators(httpReader, response);\n\t\t\tsetResourceValidators(httpReader, response);\n\t\t\tconst data = new Uint8Array(await response.arrayBuffer());\n\t\t\tif (data.length != length) {\n\t\t\t\tthrow new Error(ERR_HTTP_RANGE);\n\t\t\t}\n\t\t\treturn data;\n\t\t}\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 httpReader.data.subarray(index, index + length);\n\t}\n}\n\nfunction createRangeReadable(httpReader, offset, size) {\n\tlet bodyReader;\n\tlet windowOffset = offset;\n\tlet windowRemainingLength = 0;\n\tlet remainingLength = size;\n\treturn new ReadableStream({\n\t\tstart() {\n\t\t\treturn openWindow();\n\t\t},\n\t\tasync pull(controller) {\n\t\t\tif (!bodyReader) {\n\t\t\t\tawait openWindow();\n\t\t\t}\n\t\t\tconst { value, done } = await bodyReader.read();\n\t\t\tif (done) {\n\t\t\t\tthrow new Error(ERR_HTTP_RANGE);\n\t\t\t}\n\t\t\tconst chunk = value.length > windowRemainingLength ? value.subarray(0, windowRemainingLength) : value;\n\t\t\twindowRemainingLength -= chunk.length;\n\t\t\tremainingLength -= chunk.length;\n\t\t\tif (chunk.length) {\n\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t}\n\t\t\tif (!windowRemainingLength) {\n\t\t\t\tawait closeWindow();\n\t\t\t\tif (!remainingLength) {\n\t\t\t\t\tcontroller.close();\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tcancel(reason) {\n\t\t\treturn bodyReader && bodyReader.cancel(reason);\n\t\t}\n\t});\n\n\tasync function openWindow() {\n\t\tconst windowLength = Math.min(httpReader.maximumRangeSize, remainingLength);\n\t\tconst response = await sendFetchRequest(HTTP_METHOD_GET, httpReader, getRangeHeaders(httpReader, windowOffset, windowLength));\n\t\tif (response.status != 206) {\n\t\t\tthrow new Error(ERR_HTTP_RANGE);\n\t\t}\n\t\tconst rangeStart = getContentRangeOffset(response);\n\t\tif (rangeStart !== UNDEFINED_VALUE && rangeStart != windowOffset) {\n\t\t\tthrow new Error(ERR_HTTP_RANGE);\n\t\t}\n\t\tcheckResourceValidators(httpReader, response);\n\t\tsetResourceValidators(httpReader, response);\n\t\twindowOffset += windowLength;\n\t\twindowRemainingLength = windowLength;\n\t\tbodyReader = response.body.getReader();\n\t}\n\n\tasync function closeWindow() {\n\t\tconst currentBodyReader = bodyReader;\n\t\tbodyReader = UNDEFINED_VALUE;\n\t\tawait currentBodyReader.cancel();\n\t}\n}\n\nfunction getContentRangeOffset(response) {\n\tconst contentRangeHeader = response.headers.get(HTTP_HEADER_CONTENT_RANGE);\n\tif (contentRangeHeader) {\n\t\tconst rangeStart = Number(contentRangeHeader.trim().split(/[\\s-]+/)[1]);\n\t\tif (!Number.isNaN(rangeStart)) {\n\t\t\treturn rangeStart;\n\t\t}\n\t}\n}\n\nfunction getContentRangeSize(response) {\n\tconst contentRangeHeader = response.headers.get(HTTP_HEADER_CONTENT_RANGE);\n\tif (contentRangeHeader) {\n\t\tconst headerValue = contentRangeHeader.trim().split(/\\s*\\/\\s*/)[1];\n\t\tif (headerValue && headerValue != \"*\") {\n\t\t\tconst contentSize = Number(headerValue);\n\t\t\tif (!Number.isNaN(contentSize)) {\n\t\t\t\treturn contentSize;\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction getResourceValidators({ headers }) {\n\treturn {\n\t\tetag: headers.get(HTTP_HEADER_ETAG) || UNDEFINED_VALUE,\n\t\tlastModified: headers.get(HTTP_HEADER_LAST_MODIFIED) || UNDEFINED_VALUE\n\t};\n}\n\nfunction setResourceValidators(httpReader, response) {\n\tconst { checkResourceChanges, resourceValidators } = httpReader;\n\tif (checkResourceChanges && !resourceValidators && response.status == 206) {\n\t\thttpReader.resourceValidators = getResourceValidators(response);\n\t}\n}\n\nfunction checkResourceValidators(httpReader, response) {\n\tconst { checkResourceChanges, resourceValidators, size } = httpReader;\n\tif (checkResourceChanges) {\n\t\tconst contentRangeSize = getContentRangeSize(response);\n\t\tif (contentRangeSize !== UNDEFINED_VALUE && size !== UNDEFINED_VALUE && contentRangeSize != size) {\n\t\t\tthrow new Error(ERR_HTTP_RESOURCE_CHANGED);\n\t\t}\n\t\tif (resourceValidators) {\n\t\t\tconst validators = getResourceValidators(response);\n\t\t\tconst changed = Object.entries(resourceValidators).some(([name, value]) =>\n\t\t\t\tvalue !== UNDEFINED_VALUE && validators[name] !== UNDEFINED_VALUE && value != validators[name]);\n\t\t\tif (changed) {\n\t\t\t\tthrow new Error(ERR_HTTP_RESOURCE_CHANGED);\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction getRangeHeaders(httpReader, index = 0, length = 1) {\n\treturn Object.assign({}, getHeaders(httpReader), { [HTTP_HEADER_RANGE]: HTTP_RANGE_UNIT + \"=\" + (index < 0 ? index : 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\thttpReader.size = httpReader.data.length;\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 && !response.headers.get(HTTP_HEADER_CONTENT_ENCODING)) {\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, { fetch: fetchFunction = fetch, options, url }, headers) {\n\tconst response = await fetchFunction(url, Object.assign({}, options, { method, headers }));\n\tif (response.status >= MIN_SUCCESS_HTTP_STATUS && response.status <= MAX_SUCCESS_HTTP_STATUS) {\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 >= MIN_SUCCESS_HTTP_STATUS && request.status <= MAX_SUCCESS_HTTP_STATUS) {\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 ? event.detail.error : new Error(\"Network 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 && !options.fetch ? 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\tcreateReadable(options) {\n\t\treturn this.reader.createReadable(options);\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\tsuper(url, Object.assign({}, options, { useRangeHeader: true }));\n\t}\n}\n\n\nclass Uint8ArrayReader extends Reader {\n\n\tconstructor(array) {\n\t\tsuper();\n\t\tarray = new Uint8Array(array.buffer, array.byteOffset, array.byteLength);\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\tconstructor(defaultBufferSize) {\n\t\tsuper();\n\t\tthis.defaultBufferSize = defaultBufferSize || DEFAULT_BUFFER_SIZE;\n\t}\n\n\tinit(initSize = 0) {\n\t\tObject.assign(this, {\n\t\t\toffset: 0,\n\t\t\tarray: new Uint8Array(initSize > 0 ? initSize : this.defaultBufferSize)\n\t\t});\n\t\tsuper.init();\n\t}\n\n\twriteUint8Array(array) {\n\t\tconst writer = this;\n\t\tconst requiredLength = writer.offset + array.length;\n\t\tif (requiredLength > writer.array.length) {\n\t\t\tlet newLength = writer.array.length ? writer.array.length * 2 : writer.defaultBufferSize;\n\t\t\twhile (newLength < requiredLength) {\n\t\t\t\tnewLength *= 2;\n\t\t\t}\n\t\t\tconst previousArray = writer.array;\n\t\t\twriter.array = new Uint8Array(newLength);\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\tif (this.offset === this.array.length) {\n\t\t\treturn this.array;\n\t\t} else {\n\t\t\treturn this.array.slice(0, this.offset);\n\t\t}\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\treader.lastDiskNumber = 0;\n\t\tconst readers = reader.readers = await Promise.all(reader.readers.map(initDiskReader));\n\t\treader.diskOffsets = readers.map(diskReader => {\n\t\t\tconst diskOffset = reader.size;\n\t\t\treader.size += diskReader.size;\n\t\t\treturn diskOffset;\n\t\t});\n\t\tsuper.init();\n\t}\n\n\tgetDiskOffset(diskNumber) {\n\t\tconst { diskOffsets, size } = this;\n\t\tconst diskOffset = diskOffsets[diskNumber];\n\t\treturn diskOffset === UNDEFINED_VALUE ? size : diskOffset;\n\t}\n\n\tasync readUint8Array(offset, length) {\n\t\tconst reader = this;\n\t\tconst { readers } = this;\n\t\tlet result;\n\t\tlet currentDiskNumber = 0;\n\t\tlet currentReaderOffset = offset;\n\t\twhile (readers[currentDiskNumber] && 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\tif (currentReader) {\n\t\t\tconst currentReaderSize = currentReader.size;\n\t\t\tif (currentReaderOffset + length <= currentReaderSize) {\n\t\t\t\tresult = await readUint8Array(currentReader, currentReaderOffset, length);\n\t\t\t} else {\n\t\t\t\tconst chunkLength = currentReaderSize - currentReaderOffset;\n\t\t\t\tconst firstPart = await readUint8Array(currentReader, currentReaderOffset, chunkLength);\n\t\t\t\tconst secondPart = await reader.readUint8Array(offset + chunkLength, length - chunkLength);\n\t\t\t\tresult = concat(firstPart, secondPart);\n\t\t\t}\n\t\t} else {\n\t\t\tresult = EMPTY_UINT8_ARRAY;\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 writer = this;\n\t\tObject.assign(writer, {\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\tif (chunk === DISK_BOUNDARY) {\n\t\t\t\t\tif (diskWriter) {\n\t\t\t\t\t\tawait endDisk();\n\t\t\t\t\t}\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tconst { availableSize } = writer;\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\twriter.maxSize = diskSourceWriter.maxSize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\twriter.availableSize = writer.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.subarray(0, availableSize));\n\t\t\t\t\tawait endDisk();\n\t\t\t\t\tif (chunk.length > availableSize) {\n\t\t\t\t\t\tawait this.write(chunk.subarray(availableSize));\n\t\t\t\t\t}\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\tif (diskWriter) {\n\t\t\t\t\tawait diskWriter.ready;\n\t\t\t\t\tawait closeDiskWriter();\n\t\t\t\t}\n\t\t\t},\n\t\t\tasync abort(reason) {\n\t\t\t\tif (diskWriter) {\n\t\t\t\t\tawait diskWriter.abort(reason);\n\t\t\t\t}\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\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\twriter.availableSize -= chunkLength;\n\t\t\t}\n\t\t}\n\n\t\tasync function endDisk() {\n\t\t\tawait closeDiskWriter();\n\t\t\twriter.diskOffset += diskSourceWriter.size;\n\t\t\twriter.diskNumber++;\n\t\t\tdiskWriter = null;\n\t\t\twriter.availableSize = writer.maxSize;\n\t\t}\n\n\t\tasync function closeDiskWriter() {\n\t\t\tawait diskWriter.close();\n\t\t}\n\t}\n\n\tasync closeDisk() {\n\t\tconst streamWriter = this.writable.getWriter();\n\t\ttry {\n\t\t\tawait streamWriter.ready;\n\t\t\tawait streamWriter.write(DISK_BOUNDARY);\n\t\t} finally {\n\t\t\tstreamWriter.releaseLock();\n\t\t}\n\t}\n}\n\nclass GenericReader {\n\n\tconstructor(reader) {\n\t\tif (Array.isArray(reader)) {\n\t\t\treader = new SplitDataReader(reader);\n\t\t}\n\t\tif (reader instanceof ReadableStream || typeof reader.getReader == FUNCTION_TYPE) {\n\t\t\treader = {\n\t\t\t\treadable: toCompatibleReadable(reader)\n\t\t\t};\n\t\t}\n\t\treturn reader;\n\t}\n}\n\nclass GenericWriter {\n\n\tconstructor(writer) {\n\t\tif (writer.writable === UNDEFINED_VALUE && typeof writer.next == FUNCTION_TYPE) {\n\t\t\twriter = new SplitDataWriter(writer);\n\t\t}\n\t\tif (writer instanceof WritableStream || typeof writer.getWriter == FUNCTION_TYPE) {\n\t\t\twriter = {\n\t\t\t\twritable: toCompatibleWritable(writer)\n\t\t\t};\n\t\t}\n\t\ttry {\n\t\t\twriter.size = writer.size === UNDEFINED_VALUE ? 0 : writer.size;\n\t\t} catch {\n\t\t\tthrow new Error(ERR_WRITER_SIZE_NOT_WRITABLE);\n\t\t}\n\t\treturn writer;\n\t}\n}\n\nfunction ownsWritable(writer) {\n\treturn Boolean(writer && writer.getData);\n}\n\nfunction isHttpFamily(url) {\n\tconst { baseURI } = getConfiguration();\n\tconst { protocol } = new URL(url, baseURI);\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} else {\n\t\treturn Promise.resolve();\n\t}\n}\n\nasync function initDiskReader(diskReader) {\n\tdiskReader = new GenericReader(diskReader);\n\tawait initStream(diskReader);\n\tif (diskReader.size === UNDEFINED_VALUE || !diskReader.readUint8Array) {\n\t\tdiskReader = new BlobReader(await streamToBlob(diskReader.readable));\n\t\tawait initStream(diskReader);\n\t}\n\treturn diskReader;\n}\n\nfunction readUint8Array(reader, offset, size) {\n\treturn reader.readUint8Array(offset, size);\n}\n\nfunction createReadable(reader, options) {\n\tif (reader.createReadable) {\n\t\treturn reader.createReadable(options);\n\t} else if (reader.readUint8Array) {\n\t\treturn Reader.prototype.createReadable.call(reader, options);\n\t} else {\n\t\treturn reader.readable;\n\t}\n}\n\nexport {\n\tinitStream,\n\tcreateReadable,\n\tGenericReader,\n\tGenericWriter,\n\townsWritable,\n\treadUint8Array,\n\tReader,\n\tWriter,\n\tTextReader,\n\tTextWriter,\n\tgetTextSize,\n\tData64URIReader,\n\tData64URIWriter,\n\tBlobReader,\n\tBlobWriter,\n\tUint8ArrayReader,\n\tUint8ArrayWriter,\n\tHttpReader,\n\tHttpRangeReader,\n\tSplitDataReader,\n\tSplitDataWriter,\n\tERR_HTTP_RANGE,\n\tERR_HTTP_STATUS,\n\tERR_HTTP_RESOURCE_CHANGED,\n\tERR_ITERATOR_COMPLETED_TOO_SOON,\n\tERR_WRITER_NOT_INITIALIZED,\n\tERR_WRITER_SIZE_NOT_WRITABLE\n};","/*\n Copyright (c) 2026 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\nimport { UNDEFINED_VALUE } from \"../constants.js\";\n\nexport { addWarning };\n\nfunction addWarning(warnings, reason, filename) {\n\tif (!warnings.some(warning => warning.reason == reason)) {\n\t\tconst warning = { reason };\n\t\tif (filename !== UNDEFINED_VALUE) {\n\t\t\twarning.filename = filename;\n\t\t}\n\t\twarnings.push(warning);\n\t}\n}\n","/*\n Copyright (c) 2025 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 {\n\tEXTRAFIELD_TYPE_ZIP64,\n\tEXTRAFIELD_TYPE_AES,\n\tEXTRAFIELD_TYPE_NTFS,\n\tEXTRAFIELD_TYPE_EXTENDED_TIMESTAMP,\n\tEXTRAFIELD_TYPE_UNICODE_PATH,\n\tEXTRAFIELD_TYPE_UNICODE_COMMENT,\n\tEXTRAFIELD_TYPE_USDZ,\n\tEXTRAFIELD_TYPE_INFOZIP,\n\tEXTRAFIELD_TYPE_UNIX,\n\tEXTRAFIELD_TYPE_UNIX_TYPE1,\n\tEXTRAFIELD_TYPE_PKWARE_UNIX\n} from \"./constants.js\";\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_UNCOMPRESSED_SIZE = \"uncompressedSize\";\nconst PROPERTY_NAME_COMPRESSED_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_ATTRIBUTES = \"internalFileAttributes\";\nconst PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTES = \"externalFileAttributes\";\nconst PROPERTY_NAME_MSDOS_ATTRIBUTES_RAW = \"msdosAttributesRaw\";\nconst PROPERTY_NAME_MSDOS_ATTRIBUTES = \"msdosAttributes\";\nconst PROPERTY_NAME_MS_DOS_COMPATIBLE = \"msDosCompatible\";\nconst PROPERTY_NAME_ZIP64 = \"zip64\";\nconst PROPERTY_NAME_ENCRYPTED = \"encrypted\";\nconst PROPERTY_NAME_VERSION = \"version\";\nconst PROPERTY_NAME_VERSION_MADE_BY = \"versionMadeBy\";\nconst PROPERTY_NAME_ZIPCRYPTO = \"zipCrypto\";\nconst PROPERTY_NAME_DIRECTORY = \"directory\";\nconst PROPERTY_NAME_EXECUTABLE = \"executable\";\nconst PROPERTY_NAME_SYMLINK = \"symlink\";\nconst PROPERTY_NAME_COMPRESSION_METHOD = \"compressionMethod\";\nconst PROPERTY_NAME_SIGNATURE = \"signature\";\nconst PROPERTY_NAME_CRC32 = \"crc32\";\nconst PROPERTY_NAME_EXTRA_FIELD = \"extraField\";\nconst PROPERTY_NAME_EXTRA_FIELD_INFOZIP = \"extraFieldInfoZip\";\nconst PROPERTY_NAME_EXTRA_FIELD_UNIX = \"extraFieldUnix\";\nconst PROPERTY_NAME_EXTRA_FIELD_UNIX_TYPE1 = \"extraFieldUnixType1\";\nconst PROPERTY_NAME_EXTRA_FIELD_PKWARE_UNIX = \"extraFieldPkwareUnix\";\nconst PROPERTY_NAME_UID = \"uid\";\nconst PROPERTY_NAME_GID = \"gid\";\nconst PROPERTY_NAME_UNIX_MODE = \"unixMode\";\nconst PROPERTY_NAME_SETUID = \"setuid\";\nconst PROPERTY_NAME_SETGID = \"setgid\";\nconst PROPERTY_NAME_STICKY = \"sticky\";\nconst PROPERTY_NAME_BITFLAG = \"bitFlag\";\nconst PROPERTY_NAME_RAW_BITFLAG = \"rawBitFlag\";\nconst PROPERTY_NAME_FILENAME_LENGTH = \"filenameLength\";\nconst PROPERTY_NAME_EXTRA_FIELD_LENGTH = \"extraFieldLength\";\nconst PROPERTY_NAME_UNIX_EXTERNAL_UPPER = \"unixExternalUpper\";\nconst PROPERTY_NAME_FILENAME_UTF8 = \"filenameUTF8\";\nconst PROPERTY_NAME_COMMENT_UTF8 = \"commentUTF8\";\nconst PROPERTY_NAME_RAW_EXTRA_FIELD = \"rawExtraField\";\nconst PROPERTY_NAME_EXTRA_FIELD_ZIP64 = \"extraFieldZip64\";\nconst PROPERTY_NAME_EXTRA_FIELD_UNICODE_PATH = \"extraFieldUnicodePath\";\nconst PROPERTY_NAME_EXTRA_FIELD_UNICODE_COMMENT = \"extraFieldUnicodeComment\";\nconst PROPERTY_NAME_EXTRA_FIELD_AES = \"extraFieldAES\";\nconst PROPERTY_NAME_EXTRA_FIELD_NTFS = \"extraFieldNTFS\";\nconst PROPERTY_NAME_EXTRA_FIELD_EXTENDED_TIMESTAMP = \"extraFieldExtendedTimestamp\";\nconst PROPERTY_NAME_EXTRA_FIELD_USDZ = \"extraFieldUSDZ\";\n\nconst PROPERTY_NAMES = [\n\tPROPERTY_NAME_FILENAME,\n\tPROPERTY_NAME_RAW_FILENAME,\n\tPROPERTY_NAME_UNCOMPRESSED_SIZE,\n\tPROPERTY_NAME_COMPRESSED_SIZE,\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_RAW_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_COMMENT,\n\tPROPERTY_NAME_RAW_COMMENT,\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_OFFSET,\n\tPROPERTY_NAME_DISK_NUMBER_START,\n\tPROPERTY_NAME_INTERNAL_FILE_ATTRIBUTES,\n\tPROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTES,\n\tPROPERTY_NAME_MSDOS_ATTRIBUTES_RAW,\n\tPROPERTY_NAME_MSDOS_ATTRIBUTES,\n\tPROPERTY_NAME_MS_DOS_COMPATIBLE,\n\tPROPERTY_NAME_ZIP64,\n\tPROPERTY_NAME_ENCRYPTED,\n\tPROPERTY_NAME_VERSION,\n\tPROPERTY_NAME_VERSION_MADE_BY,\n\tPROPERTY_NAME_ZIPCRYPTO,\n\tPROPERTY_NAME_DIRECTORY,\n\tPROPERTY_NAME_EXECUTABLE,\n\tPROPERTY_NAME_SYMLINK,\n\tPROPERTY_NAME_COMPRESSION_METHOD,\n\tPROPERTY_NAME_SIGNATURE,\n\tPROPERTY_NAME_CRC32,\n\tPROPERTY_NAME_EXTRA_FIELD,\n\tPROPERTY_NAME_EXTRA_FIELD_UNIX,\n\tPROPERTY_NAME_EXTRA_FIELD_INFOZIP,\n\tPROPERTY_NAME_EXTRA_FIELD_UNIX_TYPE1,\n\tPROPERTY_NAME_EXTRA_FIELD_PKWARE_UNIX,\n\tPROPERTY_NAME_UID,\n\tPROPERTY_NAME_GID,\n\tPROPERTY_NAME_UNIX_MODE,\n\tPROPERTY_NAME_UNIX_EXTERNAL_UPPER,\n\tPROPERTY_NAME_SETUID,\n\tPROPERTY_NAME_SETGID,\n\tPROPERTY_NAME_STICKY,\n\tPROPERTY_NAME_BITFLAG,\n\tPROPERTY_NAME_RAW_BITFLAG,\n\tPROPERTY_NAME_FILENAME_LENGTH,\n\tPROPERTY_NAME_EXTRA_FIELD_LENGTH,\n\tPROPERTY_NAME_FILENAME_UTF8,\n\tPROPERTY_NAME_COMMENT_UTF8,\n\tPROPERTY_NAME_RAW_EXTRA_FIELD,\n\tPROPERTY_NAME_EXTRA_FIELD_ZIP64,\n\tPROPERTY_NAME_EXTRA_FIELD_UNICODE_PATH,\n\tPROPERTY_NAME_EXTRA_FIELD_UNICODE_COMMENT,\n\tPROPERTY_NAME_EXTRA_FIELD_AES,\n\tPROPERTY_NAME_EXTRA_FIELD_NTFS,\n\tPROPERTY_NAME_EXTRA_FIELD_EXTENDED_TIMESTAMP,\n\tPROPERTY_NAME_EXTRA_FIELD_USDZ\n];\n\nclass Entry {\n\n\tconstructor(data) {\n\t\tPROPERTY_NAMES.forEach(name => this[name] = data[name]);\n\t}\n\n}\n\nconst INTERPRETED_EXTRA_FIELD_TYPES = new Set([\n\tEXTRAFIELD_TYPE_ZIP64,\n\tEXTRAFIELD_TYPE_AES,\n\tEXTRAFIELD_TYPE_NTFS,\n\tEXTRAFIELD_TYPE_EXTENDED_TIMESTAMP,\n\tEXTRAFIELD_TYPE_UNICODE_PATH,\n\tEXTRAFIELD_TYPE_UNICODE_COMMENT,\n\tEXTRAFIELD_TYPE_USDZ,\n\tEXTRAFIELD_TYPE_INFOZIP,\n\tEXTRAFIELD_TYPE_UNIX,\n\tEXTRAFIELD_TYPE_UNIX_TYPE1,\n\tEXTRAFIELD_TYPE_PKWARE_UNIX\n]);\n\nfunction getUserExtraField(extraField) {\n\tif (extraField) {\n\t\tconst userExtraField = new Map();\n\t\textraField.forEach((field, type) => {\n\t\t\tif (!INTERPRETED_EXTRA_FIELD_TYPES.has(type)) {\n\t\t\t\tuserExtraField.set(type, field.data);\n\t\t\t}\n\t\t});\n\t\tif (userExtraField.size) {\n\t\t\treturn userExtraField;\n\t\t}\n\t}\n}\n\nfunction getEncryptionOverhead(encrypted, zipCrypto, encryptionStrength) {\n\treturn encrypted ? (zipCrypto ? 12 : 16 + encryptionStrength * 4) : 0;\n}\n\nexport {\n\tPROPERTY_NAME_FILENAME,\n\tPROPERTY_NAME_RAW_FILENAME,\n\tPROPERTY_NAME_COMMENT,\n\tPROPERTY_NAME_RAW_COMMENT,\n\tPROPERTY_NAME_UNCOMPRESSED_SIZE,\n\tPROPERTY_NAME_COMPRESSED_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_ATTRIBUTES,\n\tPROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTES,\n\tPROPERTY_NAME_MSDOS_ATTRIBUTES_RAW,\n\tPROPERTY_NAME_MSDOS_ATTRIBUTES,\n\tPROPERTY_NAME_MS_DOS_COMPATIBLE,\n\tPROPERTY_NAME_ZIP64,\n\tPROPERTY_NAME_ENCRYPTED,\n\tPROPERTY_NAME_VERSION,\n\tPROPERTY_NAME_VERSION_MADE_BY,\n\tPROPERTY_NAME_ZIPCRYPTO,\n\tPROPERTY_NAME_DIRECTORY,\n\tPROPERTY_NAME_EXECUTABLE,\n\tPROPERTY_NAME_COMPRESSION_METHOD,\n\tPROPERTY_NAME_SIGNATURE,\n\tPROPERTY_NAME_CRC32,\n\tPROPERTY_NAME_EXTRA_FIELD,\n\tPROPERTY_NAME_GID,\n\tPROPERTY_NAME_UID,\n\tPROPERTY_NAME_UNIX_MODE,\n\tPROPERTY_NAME_SETUID,\n\tPROPERTY_NAME_SETGID,\n\tPROPERTY_NAME_STICKY,\n\tEntry,\n\tgetEncryptionOverhead,\n\tgetUserExtraField\n};","/*\n Copyright (c) 2025 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 WritableStream, ReadableStream, TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tMAX_32_BITS,\n\tMAX_16_BITS,\n\tMAX_8_BITS,\n\tCOMPRESSION_METHOD_DEFLATE,\n\tCOMPRESSION_METHOD_STORE,\n\tCOMPRESSION_METHOD_AES,\n\tSPLIT_ZIP_FILE_SIGNATURE,\n\tTEMPORARY_SPLIT_ZIP_FILE_SIGNATURE,\n\tSPLIT_ZIP_FILE_SIGNATURE_LENGTH,\n\tDATA_DESCRIPTOR_RECORD_SIGNATURE,\n\tDATA_DESCRIPTOR_RECORD_LENGTH,\n\tDATA_DESCRIPTOR_RECORD_ZIP_64_LENGTH,\n\tDATA_DESCRIPTOR_RECORD_SIGNATURE_LENGTH,\n\tLOCAL_FILE_HEADER_SIGNATURE,\n\tARCHIVE_EXTRA_DATA_SIGNATURE,\n\tDIGITAL_SIGNATURE_RECORD_SIGNATURE,\n\tCENTRAL_FILE_HEADER_SIGNATURE,\n\tCENTRAL_FILE_HEADER_LENGTH,\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\tEXTRAFIELD_TYPE_INFOZIP,\n\tEXTRAFIELD_TYPE_UNIX,\n\tEXTRAFIELD_TYPE_UNIX_TYPE1,\n\tEXTRAFIELD_TYPE_PKWARE_UNIX,\n\tEXTRAFIELD_TYPE_USDZ,\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_STRONG_ENCRYPTION,\n\tBITFLAG_COMPRESSED_PATCHED_DATA,\n\tBITFLAG_MASKED_LOCAL_HEADERS,\n\tBITFLAG_LEVEL,\n\tBITFLAG_DATA_DESCRIPTOR,\n\tBITFLAG_LANG_ENCODING_FLAG,\n\tFILE_ATTR_MSDOS_DIR_MASK,\n\tFILE_ATTR_MSDOS_READONLY_MASK,\n\tFILE_ATTR_MSDOS_HIDDEN_MASK,\n\tFILE_ATTR_MSDOS_SYSTEM_MASK,\n\tFILE_ATTR_MSDOS_ARCHIVE_MASK,\n\tFILE_ATTR_UNIX_TYPE_MASK,\n\tFILE_ATTR_UNIX_TYPE_DIR,\n\tFILE_ATTR_UNIX_TYPE_SYMLINK,\n\tFILE_ATTR_UNIX_EXECUTABLE_MASK,\n\tFILE_ATTR_UNIX_DEFAULT_MASK,\n\tDIRECTORY_SIGNATURE,\n\tHEADER_SIZE,\n\tHEADER_OFFSET_SIGNATURE,\n\tHEADER_OFFSET_COMPRESSED_SIZE,\n\tHEADER_OFFSET_UNCOMPRESSED_SIZE,\n\tUNDEFINED_VALUE,\n\tCOMPRESSION_METHOD_DEFLATE_64,\n\tFILE_ATTR_UNIX_SETUID_MASK,\n\tFILE_ATTR_UNIX_SETGID_MASK,\n\tFILE_ATTR_UNIX_STICKY_MASK,\n\tNUMBER_TYPE,\n\tEMPTY_UINT8_ARRAY,\n\tSYMBOL_ASYNC_DISPOSE,\n\tMIN_DATE\n} from \"./constants.js\";\nimport { getConfiguration } from \"./configuration.js\";\nimport { getRegisteredCodec, ERR_UNSUPPORTED_COMPRESSION } from \"./codec-registry.js\";\nimport {\n\trunWorker,\n\tCODEC_INFLATE,\n\tERR_INVALID_CRC32,\n\tERR_INVALID_AUTHENTICATION_CODE,\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_UNCOMPRESSED_SIZE,\n\tERR_INVALID_COMPRESSED_DATA,\n\tERR_CODEC_OUT_OF_MEMORY,\n\tERR_ABORT_CHECK_PASSWORD,\n\tERR_WORKER_STARTUP_TIMEOUT\n} from \"./codec-pool.js\";\nimport {\n\tinitStream,\n\treadUint8Array,\n\tBlobReader,\n\tGenericReader,\n\tGenericWriter,\n\townsWritable\n} from \"./io.js\";\nimport { decodeText, isUTF8Text } from \"./util/decode-text.js\";\nimport { getDataView } from \"./util/array.js\";\nimport { addWarning } from \"./util/warnings.js\";\nimport { toCompatibleReadable, streamToBlob } from \"./util/compatible-streams.js\";\nimport { isErrorObject } from \"./util/error.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_UNCOMPRESSED_SIZE,\n\tPROPERTY_NAME_COMPRESSED_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\tgetEncryptionOverhead\n} from \"./zip-entry.js\";\nimport {\n\tOPTION_FILENAME_ENCODING,\n\tOPTION_COMMENT_ENCODING,\n\tOPTION_DECODE_TEXT,\n\tOPTION_EXTRACT_PREPENDED_DATA,\n\tOPTION_EXTRACT_APPENDED_DATA,\n\tOPTION_PASSWORD,\n\tOPTION_RAW_PASSWORD,\n\tOPTION_PASS_THROUGH,\n\tOPTION_SIGNAL,\n\tOPTION_CHECK_PASSWORD_ONLY,\n\tOPTION_CHECK_OVERLAPPING_ENTRY_ONLY,\n\tOPTION_CHECK_OVERLAPPING_ENTRY,\n\tOPTION_CHECK_AMBIGUITY,\n\tOPTION_CHECK_LOCAL_DIRECTORY,\n\tOPTION_CHECK_LOCAL_FILENAME,\n\tOPTION_CHECK_SIGNATURE,\n\tOPTION_CHECK_CRC32,\n\tOPTION_CHECK_AUTHENTICATION_CODE,\n\tOPTION_STRICTNESS,\n\tOPTION_FILENAME_VALIDATION,\n\tOPTION_NORMALIZE_FILENAME,\n\tOPTION_MAX_APPENDED_DATA_SIZE,\n\tOPTION_DECRYPT_CENTRAL_DIRECTORY,\n\tTEXT_TYPE_FILENAME,\n\tTEXT_TYPE_COMMENT,\n\tSTRICTNESS_STRICT,\n\tSTRICTNESS_BALANCED,\n\tSTRICTNESS_TOLERANT,\n\tOPTION_USE_WEB_WORKERS,\n\tOPTION_USE_COMPRESSION_STREAM,\n\tOPTION_TRANSFER_STREAMS,\n\tOPTION_PREVENT_CLOSE,\n\tcheckFunctionOption,\n\tcheckSignalOption,\n\tthrowIfAborted,\n\tcheckPasswordOption,\n\tcheckPassThroughOption,\n\ttoNumber\n} from \"./options.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_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_SPLIT_ZIP_FILE = \"Split zip file\";\nconst ERR_OVERLAPPING_ENTRY = \"Overlapping entry found\";\nconst ERR_ENTRY_DATA_OUT_OF_BOUNDS = \"Entry data out of bounds\";\nconst ERR_AMBIGUOUS_ARCHIVE = \"Ambiguous archive\";\nconst ERR_ENCRYPTED_CENTRAL_DIRECTORY = \"Encrypted central directory is not supported\";\nconst ERR_UNSAFE_FILENAME = \"Unsafe filename\";\nconst ERR_INVALID_STRICTNESS = \"Invalid strictness (must be 'strict', 'balanced' or 'tolerant')\";\nconst ERR_INVALID_FILENAME_VALIDATION = \"Invalid filenameValidation (must be 'strict', 'balanced' or 'tolerant')\";\nconst ERR_INVALID_MAX_APPENDED_DATA_SIZE = \"Invalid maxAppendedDataSize (must be a number greater than or equal to 0)\";\nconst ERR_UNSUPPORTED_UINT64 = \"64-bit value exceeds Number.MAX_SAFE_INTEGER\";\nconst WARNING_UNSORTED_CENTRAL_DIRECTORY = \"unsorted central directory\";\nconst WARNING_UNKNOWN_VERSION = \"unknown version needed to extract\";\nconst WARNING_COMPRESSED_PATCHED_DATA = \"compressed patched data\";\nconst WARNING_MALFORMED_EXTRA_FIELD = \"malformed extra field\";\nconst WARNING_UNKNOWN_ZIP64_EXTENSIBLE_DATA = \"unknown zip64 extensible data\";\nconst WARNING_WRAPPED_ENTRIES_COUNT = \"wrapped entries count\";\nconst WARNING_APPENDED_DATA = \"appended data\";\nconst WARNING_PREPENDED_DATA = \"prepended data\";\nconst WARNING_PREPENDED_CENTRAL_DIRECTORY = \"prepended central directory\";\nconst WARNING_TRAILING_CENTRAL_DIRECTORY_DATA = \"trailing central directory data\";\nconst WARNING_DUPLICATE_FILENAME = \"duplicate filename\";\nconst WARNING_MISMATCHED_ZIP64_END_OF_CENTRAL_DIRECTORY = \"mismatched zip64 end of central directory record\";\nconst WARNING_MULTIPLE_END_OF_CENTRAL_DIRECTORY = \"multiple end of central directory records\";\nconst WARNING_MISMATCHED_LOCAL_FILE_HEADER_FILENAME = \"mismatched local file header (filename)\";\nconst WARNING_MISMATCHED_LOCAL_FILE_HEADER_BIT_FLAG = \"mismatched local file header (general purpose bit flag)\";\nconst WARNING_MISMATCHED_LOCAL_FILE_HEADER_COMPRESSION_METHOD = \"mismatched local file header (compression method)\";\nconst WARNING_MISMATCHED_LOCAL_FILE_HEADER_CRC32_OR_SIZES = \"mismatched local file header (crc32 or sizes)\";\nconst MAX_KNOWN_VERSION = 63;\nconst DRIVE_LETTER_REGEXP = /^[a-zA-Z]:/;\nconst PARENT_DIRECTORY_REGEXP = /(^|[\\\\/])\\.\\.([\\\\/]|$)/;\nconst CHARSET_UTF8 = \"utf-8\";\nconst PROPERTY_NAME_UTF8_SUFFIX = \"UTF8\";\nconst CHARSET_CP437 = \"cp437\";\nconst BITFLAG_AMBIGUITY_MASK = BITFLAG_ENCRYPTED | BITFLAG_DATA_DESCRIPTOR | BITFLAG_STRONG_ENCRYPTION | BITFLAG_LANG_ENCODING_FLAG;\nconst VENDOR_VERSION_AE_1 = 1;\nconst ZIP64_PROPERTIES = [\n\t[PROPERTY_NAME_UNCOMPRESSED_SIZE, MAX_32_BITS],\n\t[PROPERTY_NAME_COMPRESSED_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};\nconst MAX_SAFE_UINT64 = BigInt(Number.MAX_SAFE_INTEGER);\nconst MAX_END_OF_CENTRAL_DIR_PROBES = 64;\nconst MAX_DEFLATE_EXPANSION_RATIO = 1032;\nconst CENTRAL_DIRECTORY_UNREACHABLE = 0;\nconst CENTRAL_DIRECTORY_PLAUSIBLE = 1;\nconst CENTRAL_DIRECTORY_REACHABLE = 2;\n\nclass ZipReader {\n\n\tconstructor(reader, options = {}) {\n\t\tObject.assign(this, {\n\t\t\treader: new GenericReader(reader),\n\t\t\toptions,\n\t\t\treadRanges: { indexes: new Set(), sortedRanges: [], pendingRanges: [] }\n\t\t});\n\t}\n\n\tasync* getEntriesGenerator(options = {}) {\n\t\tconst zipReader = this;\n\t\tlet { reader } = zipReader;\n\t\tawait initStream(reader);\n\t\tif (reader.size === UNDEFINED_VALUE || !reader.readUint8Array) {\n\t\t\treader = new BlobReader(await streamToBlob(reader.readable));\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\tconst warnings = zipReader.warnings = [];\n\t\tconst strictness = getStrictness(options, zipReader.options);\n\t\tconst checkAmbiguity = strictness == STRICTNESS_STRICT;\n\t\tconst rejectAmbiguousEndOfDirectory = strictness != STRICTNESS_TOLERANT;\n\t\tconst maxAppendedDataSize = getMaxAppendedDataSize(getOptionValue(zipReader, options, OPTION_MAX_APPENDED_DATA_SIZE), strictness);\n\t\tconst filenameValidation = getFilenameValidation(getOptionValue(zipReader, options, OPTION_FILENAME_VALIDATION), strictness);\n\t\tconst normalizeFilename = getOptionValue(zipReader, options, OPTION_NORMALIZE_FILENAME);\n\t\tconst { endOfDirectoryInfo, endOfDirectoryReachingEndCount } = await findEndOfCentralDirectory(reader, rejectAmbiguousEndOfDirectory, maxAppendedDataSize);\n\t\tif (!endOfDirectoryInfo) {\n\t\t\tif (await startsWithSplitZipSignature(reader)) {\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\tif (rejectAmbiguousEndOfDirectory && endOfDirectoryReachingEndCount > 1) {\n\t\t\tthrowAmbiguousArchive(WARNING_MULTIPLE_END_OF_CENTRAL_DIRECTORY);\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\tconst appendedDataLength = reader.size - appendedDataOffset;\n\t\tif (appendedDataLength > maxAppendedDataSize) {\n\t\t\tthrowAmbiguousArchive(WARNING_APPENDED_DATA);\n\t\t}\n\t\tif (appendedDataLength > 0) {\n\t\t\taddWarning(warnings, WARNING_APPENDED_DATA);\n\t\t}\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, 10);\n\t\tlet prependedDataLength = 0;\n\t\tlet prependedCentralDirectory;\n\t\tlet startOffset;\n\t\tlet zip64EndOfDirectory;\n\t\tlet zip64EndOfDirectoryVersion2;\n\t\tlet zip64EndOfDirectoryLength = ZIP64_END_OF_CENTRAL_DIR_LENGTH;\n\t\tlet directoryEncryptionInfo;\n\t\tconst requiresZip64 = directoryDataOffset == MAX_32_BITS || directoryDataLength == MAX_32_BITS || filesLength == MAX_16_BITS || diskNumber == MAX_16_BITS;\n\t\tif (directoryDataOffset != MAX_32_BITS && diskNumber != MAX_16_BITS) {\n\t\t\tdirectoryDataOffset += getDiskOffset(reader, diskNumber);\n\t\t}\n\t\tif (requiresZip64) {\n\t\t\tconst endOfDirectoryLocatorArray = endOfDirectoryInfo.offset >= ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH ?\n\t\t\t\tawait readUint8Array(reader, endOfDirectoryInfo.offset - ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH, ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH) :\n\t\t\t\tEMPTY_UINT8_ARRAY;\n\t\t\tconst endOfDirectoryLocatorView = getDataView(endOfDirectoryLocatorArray);\n\t\t\tif (endOfDirectoryLocatorArray.length == ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH &&\n\t\t\t\tgetUint32(endOfDirectoryLocatorView, 0) == ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE) {\n\t\t\t\tdirectoryDataOffset = getDiskOffset(reader, getUint32(endOfDirectoryLocatorView, 4)) + getBigUint64(endOfDirectoryLocatorView, 8);\n\t\t\t\tlet endOfDirectoryArray = await readUint8Array(reader, directoryDataOffset, ZIP64_END_OF_CENTRAL_DIR_LENGTH);\n\t\t\t\tlet endOfDirectoryView = getDataView(endOfDirectoryArray);\n\t\t\t\tconst expectedDirectoryDataOffset = endOfDirectoryInfo.offset - ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH - ZIP64_END_OF_CENTRAL_DIR_LENGTH;\n\t\t\t\tif ((endOfDirectoryArray.length < ZIP64_END_OF_CENTRAL_DIR_LENGTH || getUint32(endOfDirectoryView, 0) != ZIP64_END_OF_CENTRAL_DIR_SIGNATURE) &&\n\t\t\t\t\tdirectoryDataOffset != expectedDirectoryDataOffset && expectedDirectoryDataOffset >= 0) {\n\t\t\t\t\tconst originalDirectoryDataOffset = directoryDataOffset;\n\t\t\t\t\tdirectoryDataOffset = expectedDirectoryDataOffset;\n\t\t\t\t\tif (directoryDataOffset > originalDirectoryDataOffset) {\n\t\t\t\t\t\tprependedDataLength = directoryDataOffset - originalDirectoryDataOffset;\n\t\t\t\t\t}\n\t\t\t\t\tendOfDirectoryArray = await readUint8Array(reader, directoryDataOffset, ZIP64_END_OF_CENTRAL_DIR_LENGTH);\n\t\t\t\t\tendOfDirectoryView = getDataView(endOfDirectoryArray);\n\t\t\t\t}\n\t\t\t\tif (endOfDirectoryArray.length < ZIP64_END_OF_CENTRAL_DIR_LENGTH || getUint32(endOfDirectoryView, 0) != ZIP64_END_OF_CENTRAL_DIR_SIGNATURE) {\n\t\t\t\t\tthrow new Error(ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND);\n\t\t\t\t}\n\t\t\t\tzip64EndOfDirectory = true;\n\t\t\t\tzip64EndOfDirectoryVersion2 = getBigUint64(endOfDirectoryView, 4) > ZIP64_END_OF_CENTRAL_DIR_LENGTH - 12;\n\t\t\t\tif (zip64EndOfDirectoryVersion2) {\n\t\t\t\t\tconst extensibleDataLength = Math.min(\n\t\t\t\t\t\tgetBigUint64(endOfDirectoryView, 4) - (ZIP64_END_OF_CENTRAL_DIR_LENGTH - 12),\n\t\t\t\t\t\treader.size - directoryDataOffset - ZIP64_END_OF_CENTRAL_DIR_LENGTH);\n\t\t\t\t\tif (extensibleDataLength > 0) {\n\t\t\t\t\t\tzip64EndOfDirectoryLength += extensibleDataLength;\n\t\t\t\t\t\tconst rawExtensibleData = await readUint8Array(reader, directoryDataOffset + ZIP64_END_OF_CENTRAL_DIR_LENGTH, extensibleDataLength);\n\t\t\t\t\t\tdirectoryEncryptionInfo = getDirectoryEncryptionInfo(rawExtensibleData);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (lastDiskNumber == MAX_16_BITS) {\n\t\t\t\t\tlastDiskNumber = getUint32(endOfDirectoryView, 16);\n\t\t\t\t} else if (lastDiskNumber != getUint32(endOfDirectoryView, 16)) {\n\t\t\t\t\treportAmbiguity(checkAmbiguity, warnings, WARNING_MISMATCHED_ZIP64_END_OF_CENTRAL_DIRECTORY);\n\t\t\t\t}\n\t\t\t\tif (diskNumber == MAX_16_BITS) {\n\t\t\t\t\tdiskNumber = getUint32(endOfDirectoryView, 20);\n\t\t\t\t} else if (diskNumber != getUint32(endOfDirectoryView, 20)) {\n\t\t\t\t\treportAmbiguity(checkAmbiguity, warnings, WARNING_MISMATCHED_ZIP64_END_OF_CENTRAL_DIRECTORY);\n\t\t\t\t}\n\t\t\t\tif (filesLength == MAX_16_BITS) {\n\t\t\t\t\tfilesLength = getBigUint64(endOfDirectoryView, 32);\n\t\t\t\t} else if (filesLength != getBigUint64(endOfDirectoryView, 32)) {\n\t\t\t\t\treportAmbiguity(checkAmbiguity, warnings, WARNING_MISMATCHED_ZIP64_END_OF_CENTRAL_DIRECTORY);\n\t\t\t\t}\n\t\t\t\tif (directoryDataLength == MAX_32_BITS) {\n\t\t\t\t\tdirectoryDataLength = getBigUint64(endOfDirectoryView, 40);\n\t\t\t\t} else if (directoryDataLength != getBigUint64(endOfDirectoryView, 40)) {\n\t\t\t\t\treportAmbiguity(checkAmbiguity, warnings, WARNING_MISMATCHED_ZIP64_END_OF_CENTRAL_DIRECTORY);\n\t\t\t\t}\n\t\t\t\tdirectoryDataOffset = getDiskOffset(reader, diskNumber) + getBigUint64(endOfDirectoryView, 48) + prependedDataLength;\n\t\t\t}\n\t\t}\n\t\tlet declaredDirectoryDataLength = directoryDataLength;\n\t\tconst centralDirectoryEndOffset = endOfDirectoryInfo.offset -\n\t\t\t(zip64EndOfDirectory ? zip64EndOfDirectoryLength + ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH : 0);\n\t\tif (directoryDataOffset >= reader.size) {\n\t\t\tprependedDataLength = reader.size - directoryDataOffset - directoryDataLength - END_OF_CENTRAL_DIR_LENGTH;\n\t\t\tdirectoryDataOffset = reader.size - directoryDataLength - END_OF_CENTRAL_DIR_LENGTH;\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) {\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);\n\t\tlet directoryView = getDataView(directoryArray);\n\t\tif (directoryDataLength) {\n\t\t\tif (directoryArray.length < 4) {\n\t\t\t\tthrow new Error(ERR_BAD_FORMAT);\n\t\t\t}\n\t\t\tconst expectedDirectoryDataOffset = centralDirectoryEndOffset - directoryDataLength;\n\t\t\tif (directoryDataOffset != expectedDirectoryDataOffset && diskNumber == lastDiskNumber) {\n\t\t\t\tconst storedPointsAtDirectory = getUint32(directoryView, offset) == CENTRAL_FILE_HEADER_SIGNATURE ||\n\t\t\t\t\tBoolean(directoryEncryptionInfo && directoryEncryptionInfo.compressedSize) ||\n\t\t\t\t\tdetectEncryptedCentralDirectory(directoryView);\n\t\t\t\tlet reconcile = !storedPointsAtDirectory;\n\t\t\t\tif (!reconcile && expectedDirectoryDataOffset >= 0 && expectedDirectoryDataOffset + 4 <= reader.size) {\n\t\t\t\t\tconst expectedSignatureArray = await readUint8Array(reader, expectedDirectoryDataOffset, 4);\n\t\t\t\t\treconcile = getUint32(getDataView(expectedSignatureArray), 0) == CENTRAL_FILE_HEADER_SIGNATURE;\n\t\t\t\t}\n\t\t\t\tif (reconcile) {\n\t\t\t\t\tconst originalDirectoryDataOffset = directoryDataOffset;\n\t\t\t\t\tdirectoryDataOffset = expectedDirectoryDataOffset;\n\t\t\t\t\tif (directoryDataOffset > originalDirectoryDataOffset) {\n\t\t\t\t\t\tprependedDataLength += directoryDataOffset - originalDirectoryDataOffset;\n\t\t\t\t\t\tprependedCentralDirectory = storedPointsAtDirectory;\n\t\t\t\t\t}\n\t\t\t\t\tdirectoryArray = await readUint8Array(reader, directoryDataOffset, directoryDataLength);\n\t\t\t\t\tdirectoryView = getDataView(directoryArray);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tconst expectedDirectoryDataLength = centralDirectoryEndOffset - directoryDataOffset;\n\t\tif (directoryDataLength != expectedDirectoryDataLength && expectedDirectoryDataLength >= 0 && diskNumber == lastDiskNumber) {\n\t\t\tdirectoryDataLength = expectedDirectoryDataLength;\n\t\t\tdirectoryArray = await readUint8Array(reader, directoryDataOffset, directoryDataLength);\n\t\t\tdirectoryView = getDataView(directoryArray);\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\tzipReader.directoryOffset = directoryDataOffset;\n\t\tzipReader.directoryLength = declaredDirectoryDataLength;\n\t\tconst decryptCentralDirectory = getFunctionOptionValue(zipReader, options, OPTION_DECRYPT_CENTRAL_DIRECTORY);\n\t\tlet decryptedDirectory, dataAfterEncryptedDirectory;\n\t\tif (decryptCentralDirectory && filesLength && directoryArray.length >= 4 &&\n\t\t\tgetUint32(directoryView, 0) != CENTRAL_FILE_HEADER_SIGNATURE &&\n\t\t\t(zip64EndOfDirectoryVersion2 || detectEncryptedCentralDirectory(directoryView))) {\n\t\t\tconst encryptedDirectoryDataLength = getEncryptedDirectoryDataLength(directoryEncryptionInfo, declaredDirectoryDataLength, directoryArray.length);\n\t\t\tdataAfterEncryptedDirectory = directoryArray.subarray(encryptedDirectoryDataLength);\n\t\t\tdirectoryArray = await decryptCentralDirectory(directoryArray.subarray(0, encryptedDirectoryDataLength), directoryEncryptionInfo);\n\t\t\tdirectoryView = getDataView(directoryArray);\n\t\t\tdeclaredDirectoryDataLength = directoryArray.length;\n\t\t\tdecryptedDirectory = true;\n\t\t}\n\t\tif (directoryEncryptionInfo && !decryptedDirectory &&\n\t\t\t(directoryArray.length < 4 || getUint32(directoryView, 0) == CENTRAL_FILE_HEADER_SIGNATURE)) {\n\t\t\taddWarning(warnings, WARNING_UNKNOWN_ZIP64_EXTENSIBLE_DATA);\n\t\t}\n\t\tstartOffset = directoryDataOffset;\n\t\tconst filenameEncoding = getOptionValue(zipReader, options, OPTION_FILENAME_ENCODING);\n\t\tconst commentEncoding = getOptionValue(zipReader, options, OPTION_COMMENT_ENCODING);\n\t\tconst filenames = new Set();\n\t\tlet duplicateFilename;\n\t\tlet previousEntryPosition = -1;\n\t\tconst recoverWrappedFilesLength = !checkAmbiguity && !zip64EndOfDirectory;\n\t\tif (!filesLength && recoverWrappedFilesLength) {\n\t\t\tfilesLength = getWrappedFilesLength(directoryView, directoryArray, offset);\n\t\t\tif (filesLength) {\n\t\t\t\taddWarning(warnings, WARNING_WRAPPED_ENTRIES_COUNT);\n\t\t\t}\n\t\t}\n\t\tfor (let indexFile = 0; indexFile < filesLength; indexFile++) {\n\t\t\tconst fileEntry = new ZipEntry(reader, zipReader.options);\n\t\t\tif (offset + CENTRAL_FILE_HEADER_LENGTH > directoryArray.length || getUint32(directoryView, offset) != CENTRAL_FILE_HEADER_SIGNATURE) {\n\t\t\t\tif (indexFile == 0 && !decryptedDirectory && (zip64EndOfDirectoryVersion2 || detectEncryptedCentralDirectory(directoryView))) {\n\t\t\t\t\tthrow new Error(ERR_ENCRYPTED_CENTRAL_DIRECTORY);\n\t\t\t\t}\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 + CENTRAL_FILE_HEADER_LENGTH;\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 >> 8 == 0;\n\t\t\tconst unixCompatible = versionMadeBy >> 8 == 3;\n\t\t\tconst commentLength = getUint16(directoryView, offset + 32);\n\t\t\tconst endOffset = commentOffset + commentLength;\n\t\t\tconst rawEntryData = new Uint8Array(directoryArray.subarray(filenameOffset, endOffset));\n\t\t\tconst rawFilename = rawEntryData.subarray(0, fileEntry.filenameLength);\n\t\t\tconst rawComment = rawEntryData.subarray(fileEntry.filenameLength + fileEntry.extraFieldLength);\n\t\t\tconst filenameUTF8 = languageEncodingFlag || (!filenameEncoding && isUTF8Text(rawFilename));\n\t\t\tconst commentUTF8 = languageEncodingFlag || (!commentEncoding && isUTF8Text(rawComment));\n\t\t\tconst externalFileAttributes = getUint32(directoryView, offset + 38);\n\t\t\tconst msdosAttributesRaw = externalFileAttributes & MAX_8_BITS;\n\t\t\tconst msdosAttributes = {\n\t\t\t\treadOnly: Boolean(msdosAttributesRaw & FILE_ATTR_MSDOS_READONLY_MASK),\n\t\t\t\thidden: Boolean(msdosAttributesRaw & FILE_ATTR_MSDOS_HIDDEN_MASK),\n\t\t\t\tsystem: Boolean(msdosAttributesRaw & FILE_ATTR_MSDOS_SYSTEM_MASK),\n\t\t\t\tdirectory: Boolean(msdosAttributesRaw & FILE_ATTR_MSDOS_DIR_MASK),\n\t\t\t\tarchive: Boolean(msdosAttributesRaw & FILE_ATTR_MSDOS_ARCHIVE_MASK)\n\t\t\t};\n\t\t\tconst offsetFileEntry = getUint32(directoryView, offset + 42);\n\t\t\tconst decode = getFunctionOptionValue(zipReader, options, OPTION_DECODE_TEXT) || decodeText;\n\t\t\tconst rawFilenameEncoding = filenameUTF8 ? CHARSET_UTF8 : filenameEncoding || CHARSET_CP437;\n\t\t\tconst rawCommentEncoding = commentUTF8 ? CHARSET_UTF8 : commentEncoding || CHARSET_CP437;\n\t\t\tlet filename = decode(rawFilename, rawFilenameEncoding, TEXT_TYPE_FILENAME);\n\t\t\tif (filename === UNDEFINED_VALUE) {\n\t\t\t\tfilename = decodeText(rawFilename, rawFilenameEncoding);\n\t\t\t}\n\t\t\tif (normalizeFilename) {\n\t\t\t\tconst normalizedFilename = normalizeFilename(filename);\n\t\t\t\tif (normalizedFilename !== UNDEFINED_VALUE) {\n\t\t\t\t\tfilename = normalizedFilename;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (isUnsafeFilename(filename, filenameValidation)) {\n\t\t\t\tconst error = new Error(ERR_UNSAFE_FILENAME);\n\t\t\t\terror.filename = filename;\n\t\t\t\tthrow error;\n\t\t\t}\n\t\t\tlet comment = decode(rawComment, rawCommentEncoding, TEXT_TYPE_COMMENT);\n\t\t\tif (comment === UNDEFINED_VALUE) {\n\t\t\t\tcomment = decodeText(rawComment, rawCommentEncoding);\n\t\t\t}\n\t\t\tObject.assign(fileEntry, {\n\t\t\t\tindex: indexFile,\n\t\t\t\tdecryptedDirectory,\n\t\t\t\tversionMadeBy,\n\t\t\t\tmsDosCompatible,\n\t\t\t\tzip64: false,\n\t\t\t\tcompressedSize: 0,\n\t\t\t\tuncompressedSize: 0,\n\t\t\t\tcommentLength,\n\t\t\t\toffset: offsetFileEntry,\n\t\t\t\tdiskNumberStart: getUint16(directoryView, offset + 34),\n\t\t\t\tinternalFileAttributes: getUint16(directoryView, offset + 36),\n\t\t\t\texternalFileAttributes,\n\t\t\t\tmsdosAttributesRaw,\n\t\t\t\tmsdosAttributes,\n\t\t\t\trawFilename,\n\t\t\t\tfilenameUTF8,\n\t\t\t\tcommentUTF8,\n\t\t\t\trawExtraField: rawEntryData.subarray(fileEntry.filenameLength, fileEntry.filenameLength + fileEntry.extraFieldLength),\n\t\t\t\trawComment,\n\t\t\t\tfilename,\n\t\t\t\tcomment\n\t\t\t});\n\t\t\tif (readCommonFooter(fileEntry, fileEntry, directoryView, offset + 6)) {\n\t\t\t\taddWarning(warnings, WARNING_MALFORMED_EXTRA_FIELD, filename);\n\t\t\t}\n\t\t\tfileEntry.offset += prependedDataLength;\n\t\t\tconst entryPosition = getDiskOffset(reader, fileEntry.diskNumberStart) + fileEntry.offset;\n\t\t\tstartOffset = Math.min(entryPosition, startOffset);\n\t\t\tif (entryPosition < previousEntryPosition) {\n\t\t\t\taddWarning(warnings, WARNING_UNSORTED_CENTRAL_DIRECTORY, filename);\n\t\t\t}\n\t\t\tpreviousEntryPosition = entryPosition;\n\t\t\tif ((fileEntry.version & MAX_8_BITS) > MAX_KNOWN_VERSION) {\n\t\t\t\taddWarning(warnings, WARNING_UNKNOWN_VERSION, filename);\n\t\t\t}\n\t\t\tif ((fileEntry.rawBitFlag & BITFLAG_COMPRESSED_PATCHED_DATA) == BITFLAG_COMPRESSED_PATCHED_DATA) {\n\t\t\t\taddWarning(warnings, WARNING_COMPRESSED_PATCHED_DATA, filename);\n\t\t\t}\n\t\t\tif (filenames.has(fileEntry.filename)) {\n\t\t\t\tduplicateFilename = true;\n\t\t\t}\n\t\t\tfilenames.add(fileEntry.filename);\n\t\t\tconst unixExternalUpper = (fileEntry.externalFileAttributes >> 16) & MAX_16_BITS;\n\t\t\tif (fileEntry.unixMode === UNDEFINED_VALUE && (unixExternalUpper & (FILE_ATTR_UNIX_DEFAULT_MASK | FILE_ATTR_UNIX_EXECUTABLE_MASK | FILE_ATTR_UNIX_TYPE_DIR)) != 0) {\n\t\t\t\tfileEntry.unixMode = unixExternalUpper;\n\t\t\t}\n\t\t\tconst setuid = Boolean(fileEntry.unixMode & FILE_ATTR_UNIX_SETUID_MASK);\n\t\t\tconst setgid = Boolean(fileEntry.unixMode & FILE_ATTR_UNIX_SETGID_MASK);\n\t\t\tconst sticky = Boolean(fileEntry.unixMode & FILE_ATTR_UNIX_STICKY_MASK);\n\t\t\tconst unixType = fileEntry.unixMode === UNDEFINED_VALUE ? unixExternalUpper : fileEntry.unixMode;\n\t\t\tconst symlink = (unixType & FILE_ATTR_UNIX_TYPE_MASK) == FILE_ATTR_UNIX_TYPE_SYMLINK;\n\t\t\tconst executable = !symlink && ((fileEntry.unixMode !== UNDEFINED_VALUE)\n\t\t\t\t? ((fileEntry.unixMode & FILE_ATTR_UNIX_EXECUTABLE_MASK) != 0)\n\t\t\t\t: (unixCompatible && ((unixExternalUpper & FILE_ATTR_UNIX_EXECUTABLE_MASK) != 0)));\n\t\t\tconst modeIsDir = fileEntry.unixMode !== UNDEFINED_VALUE && ((fileEntry.unixMode & FILE_ATTR_UNIX_TYPE_MASK) == FILE_ATTR_UNIX_TYPE_DIR);\n\t\t\tconst upperIsDir = ((unixExternalUpper & FILE_ATTR_UNIX_TYPE_MASK) == FILE_ATTR_UNIX_TYPE_DIR);\n\t\t\tObject.assign(fileEntry, {\n\t\t\t\tsetuid,\n\t\t\t\tsetgid,\n\t\t\t\tsticky,\n\t\t\t\tsymlink,\n\t\t\t\tunixExternalUpper,\n\t\t\t\texecutable,\n\t\t\t\tdirectory: modeIsDir || upperIsDir || (msDosCompatible && msdosAttributes.directory) || fileEntry.filename.endsWith(DIRECTORY_SIGNATURE),\n\t\t\t\tzipCrypto: fileEntry.encrypted && !fileEntry.extraFieldAES\n\t\t\t});\n\t\t\tconst entry = new Entry(fileEntry);\n\t\t\tentry.getData = (writer, options) => fileEntry.getData(writer, entry, zipReader.readRanges, options);\n\t\t\tentry.arrayBuffer = async options => {\n\t\t\t\tconst writer = new TransformStream();\n\t\t\t\tconst arrayBufferPromise = streamToBlob(writer.readable).then(blob => blob.arrayBuffer());\n\t\t\t\tarrayBufferPromise.catch(() => { });\n\t\t\t\tawait fileEntry.getData(writer, entry, zipReader.readRanges,\n\t\t\t\t\tObject.assign({}, options, { preventClose: false }));\n\t\t\t\treturn arrayBufferPromise;\n\t\t\t};\n\t\t\toffset = endOffset;\n\t\t\tif (indexFile == filesLength - 1 && recoverWrappedFilesLength) {\n\t\t\t\tconst wrappedFilesLength = getWrappedFilesLength(directoryView, directoryArray, offset);\n\t\t\t\tif (wrappedFilesLength) {\n\t\t\t\t\tfilesLength += wrappedFilesLength;\n\t\t\t\t\taddWarning(warnings, WARNING_WRAPPED_ENTRIES_COUNT);\n\t\t\t\t}\n\t\t\t}\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 {\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\tlet offsetAfterSignature = offset;\n\t\tlet digitalSignature = readDigitalSignature(directoryArray.subarray(offset)) ||\n\t\t\t(decryptedDirectory ? readDigitalSignature(dataAfterEncryptedDirectory) : UNDEFINED_VALUE);\n\t\tif (!digitalSignature && !decryptedDirectory) {\n\t\t\tconst signatureRecordOffset = directoryDataOffset + offset;\n\t\t\tconst signatureRecordLength = Math.min(centralDirectoryEndOffset - signatureRecordOffset, 6 + MAX_16_BITS);\n\t\t\tif (signatureRecordLength >= 6) {\n\t\t\t\tdigitalSignature = readDigitalSignature(await readUint8Array(reader, signatureRecordOffset, signatureRecordLength));\n\t\t\t}\n\t\t}\n\t\tif (digitalSignature) {\n\t\t\tzipReader.digitalSignature = digitalSignature;\n\t\t\toffsetAfterSignature = offset + 6 + digitalSignature.length;\n\t\t}\n\t\tif ((offset != declaredDirectoryDataLength && offsetAfterSignature != declaredDirectoryDataLength) ||\n\t\t\t(!decryptedDirectory && offset != directoryDataLength && offsetAfterSignature != directoryDataLength)) {\n\t\t\treportAmbiguity(checkAmbiguity, warnings, WARNING_TRAILING_CENTRAL_DIRECTORY_DATA);\n\t\t}\n\t\tif (duplicateFilename) {\n\t\t\treportAmbiguity(checkAmbiguity, warnings, WARNING_DUPLICATE_FILENAME);\n\t\t}\n\t\tconst extractPrependedData = getOptionValue(zipReader, options, OPTION_EXTRACT_PREPENDED_DATA);\n\t\tconst extractAppendedData = getOptionValue(zipReader, options, OPTION_EXTRACT_APPENDED_DATA);\n\t\tconst splitZipSignatureLength = (checkAmbiguity || extractPrependedData) && filesLength &&\n\t\t\tstartOffset == SPLIT_ZIP_FILE_SIGNATURE_LENGTH && await startsWithSplitZipMarker(reader) ? SPLIT_ZIP_FILE_SIGNATURE_LENGTH : 0;\n\t\tif (checkAmbiguity && (prependedDataLength || (filesLength && startOffset > splitZipSignatureLength))) {\n\t\t\tthrowAmbiguousArchive(WARNING_PREPENDED_DATA);\n\t\t}\n\t\tif (prependedDataLength || (filesLength && startOffset > SPLIT_ZIP_FILE_SIGNATURE_LENGTH)) {\n\t\t\taddWarning(warnings, WARNING_PREPENDED_DATA);\n\t\t}\n\t\tif (prependedCentralDirectory) {\n\t\t\taddWarning(warnings, WARNING_PREPENDED_CENTRAL_DIRECTORY);\n\t\t}\n\t\tif (extractPrependedData) {\n\t\t\tzipReader.prependedData = startOffset > splitZipSignatureLength ?\n\t\t\t\tawait readUint8Array(reader, splitZipSignatureLength, startOffset - splitZipSignatureLength) :\n\t\t\t\tEMPTY_UINT8_ARRAY;\n\t\t}\n\t\tzipReader.comment = commentLength ? await readUint8Array(reader, commentOffset + END_OF_CENTRAL_DIR_LENGTH, commentLength) : EMPTY_UINT8_ARRAY;\n\t\tif (extractAppendedData) {\n\t\t\tzipReader.appendedData = appendedDataOffset < reader.size ? await readUint8Array(reader, appendedDataOffset, reader.size - appendedDataOffset) : EMPTY_UINT8_ARRAY;\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\tconst { reader } = this;\n\t\tif (!reader.readUint8Array && reader.readable && !reader.readable.locked) {\n\t\t\tawait reader.readable.cancel();\n\t\t}\n\t}\n\n\t[SYMBOL_ASYNC_DISPOSE]() {\n\t\treturn this.close();\n\t}\n}\n\nclass ZipReaderStream {\n\n\tconstructor(options = {}) {\n\t\tlet sourceController;\n\t\tconst { readable, writable } = new TransformStream({\n\t\t\tstart(controller) {\n\t\t\t\tsourceController = controller;\n\t\t\t}\n\t\t});\n\t\tconst zipReader = new ZipReader(readable, options);\n\t\tconst gen = zipReader.getEntriesGenerator();\n\t\tconst pendingEntries = new Set();\n\t\tthis.readable = new ReadableStream({\n\t\t\tasync pull(controller) {\n\t\t\t\tconst { done, value } = await gen.next();\n\t\t\t\tif (done)\n\t\t\t\t\treturn controller.close();\n\t\t\t\tconst entryStream = createEntryStream(value, pendingEntries);\n\t\t\t\tconst chunk = {\n\t\t\t\t\t...value,\n\t\t\t\t\treadable: entryStream.readable\n\t\t\t\t};\n\t\t\t\tdelete chunk.getData;\n\t\t\t\tObject.defineProperties(chunk, {\n\t\t\t\t\tlocalDirectory: {\n\t\t\t\t\t\tget: () => value.localDirectory,\n\t\t\t\t\t\tenumerable: true\n\t\t\t\t\t},\n\t\t\t\t\twarnings: {\n\t\t\t\t\t\tget: () => value.warnings,\n\t\t\t\t\t\tenumerable: true\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t},\n\t\t\tasync cancel(reason) {\n\t\t\t\tconst entryStreams = Array.from(pendingEntries);\n\t\t\t\tpendingEntries.clear();\n\t\t\t\tsourceController.error(reason);\n\t\t\t\tawait Promise.allSettled(entryStreams.map(entryStream => entryStream.cancel(reason)));\n\t\t\t\tawait Promise.allSettled([gen.return(), zipReader.close()]);\n\t\t\t}\n\t\t});\n\t\tthis.writable = writable;\n\t}\n}\n\nfunction createEntryStream(entry, pendingEntries) {\n\tconst { readable, writable } = new TransformStream();\n\tlet dataReader;\n\tconst entryStream = {\n\t\tcancel: async reason => {\n\t\t\tpendingEntries.delete(entryStream);\n\t\t\tawait (dataReader ? dataReader.cancel(reason) : readable.cancel(reason));\n\t\t}\n\t};\n\tentryStream.readable = new ReadableStream({\n\t\tasync pull(controller) {\n\t\t\tif (!dataReader) {\n\t\t\t\tdataReader = readable.getReader();\n\t\t\t\tpendingEntries.add(entryStream);\n\t\t\t\tgetData();\n\t\t\t}\n\t\t\tconst { done, value } = await dataReader.read();\n\t\t\tif (done) {\n\t\t\t\tcontroller.close();\n\t\t\t} else {\n\t\t\t\tcontroller.enqueue(value);\n\t\t\t}\n\t\t},\n\t\tcancel: reason => entryStream.cancel(reason)\n\t}, { highWaterMark: 0 });\n\treturn entryStream;\n\n\tasync function getData() {\n\t\ttry {\n\t\t\tawait entry.getData(writable, { preventClose: false });\n\t\t} catch (error) {\n\t\t\ttry {\n\t\t\t\tawait writable.abort(error);\n\t\t\t} catch {\n\t\t\t\t// ignored\n\t\t\t}\n\t\t} finally {\n\t\t\tpendingEntries.delete(entryStream);\n\t\t}\n\t}\n}\n\nasync function isZipFile(reader, options = {}) {\n\treader = new GenericReader(reader);\n\tawait initStream(reader);\n\tif (reader.size === UNDEFINED_VALUE || !reader.readUint8Array) {\n\t\treader = new BlobReader(await streamToBlob(reader.readable));\n\t\tawait initStream(reader);\n\t}\n\tif (reader.size < END_OF_CENTRAL_DIR_LENGTH) {\n\t\treturn false;\n\t}\n\tconst strictness = getStrictness(options, {});\n\tconst rejectAmbiguousEndOfDirectory = strictness != STRICTNESS_TOLERANT;\n\tconst maxAppendedDataSize = getMaxAppendedDataSize(options[OPTION_MAX_APPENDED_DATA_SIZE], strictness);\n\tconst { endOfDirectoryInfo, endOfDirectoryReachingEndCount } = await findEndOfCentralDirectory(reader, rejectAmbiguousEndOfDirectory, maxAppendedDataSize);\n\tif (!endOfDirectoryInfo || (strictness == STRICTNESS_STRICT && endOfDirectoryReachingEndCount > 1)) {\n\t\treturn false;\n\t}\n\tconst commentLength = getUint16(getDataView(endOfDirectoryInfo), 20);\n\tconst appendedDataOffset = endOfDirectoryInfo.offset + END_OF_CENTRAL_DIR_LENGTH + commentLength;\n\treturn reader.size - appendedDataOffset <= maxAppendedDataSize;\n}\n\nexport {\n\tZipReader,\n\tisZipFile,\n\tZipReaderStream,\n\tERR_BAD_FORMAT,\n\tERR_EOCDR_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_CRC32,\n\tERR_INVALID_AUTHENTICATION_CODE,\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_UNCOMPRESSED_SIZE,\n\tERR_INVALID_COMPRESSED_DATA,\n\tERR_CODEC_OUT_OF_MEMORY,\n\tERR_SPLIT_ZIP_FILE,\n\tERR_OVERLAPPING_ENTRY,\n\tERR_ENTRY_DATA_OUT_OF_BOUNDS,\n\tERR_AMBIGUOUS_ARCHIVE,\n\tERR_ENCRYPTED_CENTRAL_DIRECTORY,\n\tERR_UNSAFE_FILENAME,\n\tERR_INVALID_STRICTNESS,\n\tERR_INVALID_FILENAME_VALIDATION,\n\tERR_INVALID_MAX_APPENDED_DATA_SIZE,\n\tERR_UNSUPPORTED_UINT64,\n\tERR_WORKER_STARTUP_TIMEOUT,\n\tWARNING_UNSORTED_CENTRAL_DIRECTORY,\n\tWARNING_UNKNOWN_VERSION,\n\tWARNING_COMPRESSED_PATCHED_DATA,\n\tWARNING_MALFORMED_EXTRA_FIELD,\n\tWARNING_UNKNOWN_ZIP64_EXTENSIBLE_DATA,\n\tWARNING_WRAPPED_ENTRIES_COUNT,\n\tWARNING_APPENDED_DATA,\n\tWARNING_PREPENDED_DATA,\n\tWARNING_PREPENDED_CENTRAL_DIRECTORY,\n\tWARNING_TRAILING_CENTRAL_DIRECTORY_DATA,\n\tWARNING_DUPLICATE_FILENAME,\n\tWARNING_MISMATCHED_ZIP64_END_OF_CENTRAL_DIRECTORY,\n\tWARNING_MULTIPLE_END_OF_CENTRAL_DIRECTORY,\n\tWARNING_MISMATCHED_LOCAL_FILE_HEADER_FILENAME,\n\tWARNING_MISMATCHED_LOCAL_FILE_HEADER_BIT_FLAG,\n\tWARNING_MISMATCHED_LOCAL_FILE_HEADER_COMPRESSION_METHOD,\n\tWARNING_MISMATCHED_LOCAL_FILE_HEADER_CRC32_OR_SIZES\n};\n\nclass ZipEntry {\n\n\tconstructor(reader, options) {\n\t\tObject.assign(this, {\n\t\t\treader,\n\t\t\toptions\n\t\t});\n\t}\n\n\tasync getData(writer, fileEntry, readRanges, options = {}) {\n\t\tconst zipEntry = this;\n\t\tconst config = getConfiguration();\n\t\tconst {\n\t\t\treader,\n\t\t\tindex,\n\t\t\toffset,\n\t\t\tdiskNumberStart,\n\t\t\textraFieldAES,\n\t\t\textraFieldZip64,\n\t\t\tcompressionMethod,\n\t\t\tbitFlag,\n\t\t\trawBitFlag,\n\t\t\tcrc32,\n\t\t\trawLastModDate,\n\t\t\tuncompressedSize,\n\t\t\tcompressedSize\n\t\t} = zipEntry;\n\t\tconst {\n\t\t\tdataDescriptor\n\t\t} = bitFlag;\n\t\tconst localDirectory = fileEntry.localDirectory = {};\n\t\tconst warnings = fileEntry.warnings = [];\n\t\tconst localHeaderOffset = getDiskOffset(reader, diskNumberStart) + offset;\n\t\tconst dataArray = await readUint8Array(reader, localHeaderOffset, HEADER_SIZE);\n\t\tconst dataView = getDataView(dataArray);\n\t\tlet password = getOptionValue(zipEntry, options, OPTION_PASSWORD);\n\t\tlet rawPassword = getOptionValue(zipEntry, options, OPTION_RAW_PASSWORD);\n\t\tconst passThrough = checkPassThroughOption(getOptionValue(zipEntry, options, OPTION_PASS_THROUGH));\n\t\tconst passThroughCompression = Boolean(passThrough);\n\t\tconst passThroughEncryption = passThrough === true;\n\t\tcheckPasswordOption(password, rawPassword);\n\t\tpassword = password && password.length ? password : UNDEFINED_VALUE;\n\t\trawPassword = rawPassword && rawPassword.length ? rawPassword : UNDEFINED_VALUE;\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 (dataArray.length < HEADER_SIZE || 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\tconst {\n\t\t\textraFieldLength,\n\t\t\tfilenameLength\n\t\t} = localDirectory;\n\t\tconst dataOffset = localDirectory.dataOffset = localHeaderOffset + HEADER_SIZE + filenameLength + extraFieldLength;\n\t\tconst checkLocalDirectoryOption = getOptionValue(zipEntry, options, OPTION_CHECK_LOCAL_DIRECTORY);\n\t\tconst entryStrictness = getStrictness(options, zipEntry.options);\n\t\tconst checkLocalDirectory = getCheckLocalDirectory(checkLocalDirectoryOption, entryStrictness);\n\t\tconst checkLocalFilenameOption = getOptionValue(zipEntry, options, OPTION_CHECK_LOCAL_FILENAME);\n\t\tconst checkLocalFilename = getCheckLocalFilename(\n\t\t\tcheckLocalFilenameOption === UNDEFINED_VALUE ? checkLocalDirectoryOption : checkLocalFilenameOption, entryStrictness);\n\t\tlet rawLocalFilename = EMPTY_UINT8_ARRAY;\n\t\tif (checkLocalFilename && (filenameLength || extraFieldLength)) {\n\t\t\tconst trailingDataArray = await readUint8Array(reader, localHeaderOffset + HEADER_SIZE, filenameLength + extraFieldLength);\n\t\t\trawLocalFilename = trailingDataArray.subarray(0, filenameLength);\n\t\t\tlocalDirectory.rawExtraField = trailingDataArray.subarray(filenameLength);\n\t\t} else {\n\t\t\tlocalDirectory.rawExtraField = extraFieldLength ?\n\t\t\t\tawait readUint8Array(reader, localHeaderOffset + HEADER_SIZE + filenameLength, extraFieldLength) :\n\t\t\t\tEMPTY_UINT8_ARRAY;\n\t\t}\n\t\tif (checkLocalFilename) {\n\t\t\tlocalDirectory.rawFilename = rawLocalFilename;\n\t\t}\n\t\tif (readCommonFooter(zipEntry, localDirectory, dataView, 4, true)) {\n\t\t\taddWarning(warnings, WARNING_MALFORMED_EXTRA_FIELD);\n\t\t}\n\t\tvalidateLocalDirectory(zipEntry, localDirectory, rawLocalFilename, checkLocalFilename, checkLocalDirectory ? UNDEFINED_VALUE : warnings);\n\t\tconst { lastAccessDate, creationDate, uid, gid } = localDirectory;\n\t\tif (lastAccessDate) {\n\t\t\tfileEntry.lastAccessDate = lastAccessDate;\n\t\t}\n\t\tif (creationDate) {\n\t\t\tfileEntry.creationDate = creationDate;\n\t\t}\n\t\tif (uid !== UNDEFINED_VALUE && fileEntry.uid === UNDEFINED_VALUE) {\n\t\t\tfileEntry.uid = uid;\n\t\t}\n\t\tif (gid !== UNDEFINED_VALUE && fileEntry.gid === UNDEFINED_VALUE) {\n\t\t\tfileEntry.gid = gid;\n\t\t}\n\t\tconst checkPasswordOnly = getOptionValue(zipEntry, options, OPTION_CHECK_PASSWORD_ONLY);\n\t\tconst encrypted = zipEntry.encrypted && (!passThroughEncryption || checkPasswordOnly);\n\t\tconst zipCrypto = encrypted && !extraFieldAES;\n\t\tif (!passThroughEncryption) {\n\t\t\tfileEntry.zipCrypto = zipCrypto;\n\t\t}\n\t\tif (encrypted && (zipEntry.rawBitFlag & BITFLAG_STRONG_ENCRYPTION) == BITFLAG_STRONG_ENCRYPTION) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_ENCRYPTION);\n\t\t}\n\t\tconst registeredCodec = passThroughCompression ? UNDEFINED_VALUE : getRegisteredCodec(compressionMethod);\n\t\tif (compressionMethod != COMPRESSION_METHOD_STORE && compressionMethod != COMPRESSION_METHOD_DEFLATE && compressionMethod != COMPRESSION_METHOD_DEFLATE_64 && !registeredCodec && !passThroughCompression) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_COMPRESSION);\n\t\t}\n\t\tif (encrypted) {\n\t\t\tif (!zipCrypto && (extraFieldAES.strength < 1 || extraFieldAES.strength > 3)) {\n\t\t\t\tthrow new Error(ERR_UNSUPPORTED_ENCRYPTION);\n\t\t\t} else if (!password && !rawPassword) {\n\t\t\t\tthrow new Error(ERR_ENCRYPTED);\n\t\t\t}\n\t\t}\n\t\tif (dataOffset + compressedSize > reader.size) {\n\t\t\tthrow new Error(ERR_ENTRY_DATA_OUT_OF_BOUNDS);\n\t\t}\n\t\tconst size = compressedSize;\n\t\tconst signal = checkSignalOption(getOptionValue(zipEntry, options, OPTION_SIGNAL));\n\t\tthrowIfAborted(signal);\n\t\tlet checkOverlappingEntry = getOptionValue(zipEntry, options, OPTION_CHECK_OVERLAPPING_ENTRY);\n\t\tconst checkOverlappingEntryOnly = getOptionValue(zipEntry, options, OPTION_CHECK_OVERLAPPING_ENTRY_ONLY);\n\t\tif (checkOverlappingEntryOnly) {\n\t\t\tcheckOverlappingEntry = true;\n\t\t}\n\t\tconst { onstart, onprogress, onend } = options;\n\t\tconst compressed = compressionMethod != COMPRESSION_METHOD_STORE && !passThroughCompression;\n\t\tconst outputSize = passThroughCompression ?\n\t\t\tcompressedSize - getEncryptionOverhead(encrypted, zipCrypto, extraFieldAES && extraFieldAES.strength) :\n\t\t\tuncompressedSize;\n\t\tconst deflate64 = compressionMethod == COMPRESSION_METHOD_DEFLATE_64;\n\t\tlet useCompressionStream = getOptionValue(zipEntry, options, OPTION_USE_COMPRESSION_STREAM);\n\t\tif (deflate64) {\n\t\t\tuseCompressionStream = false;\n\t\t}\n\t\tconst checkCrc32Option = getOptionValue(zipEntry, options, OPTION_CHECK_CRC32);\n\t\tconst checkCrc32 = (checkCrc32Option === UNDEFINED_VALUE ?\n\t\t\tgetOptionValue(zipEntry, options, OPTION_CHECK_SIGNATURE) :\n\t\t\tcheckCrc32Option) && !passThroughCompression &&\n\t\t\t(!encrypted || zipCrypto || (extraFieldAES && extraFieldAES.vendorVersion == VENDOR_VERSION_AE_1));\n\t\tconst workerOptions = {\n\t\t\toptions: {\n\t\t\t\tcodecType: CODEC_INFLATE,\n\t\t\t\tpassword,\n\t\t\t\trawPassword,\n\t\t\t\tzipCrypto,\n\t\t\t\tencryptionStrength: extraFieldAES && extraFieldAES.strength,\n\t\t\t\tcheckCrc32,\n\t\t\t\tcheckAuthenticationCode: getOptionValue(zipEntry, options, OPTION_CHECK_AUTHENTICATION_CODE),\n\t\t\t\tpasswordVerification: zipCrypto && (dataDescriptor ? ((rawLastModDate >>> 8) & MAX_8_BITS) : ((crc32 >>> 24) & MAX_8_BITS)),\n\t\t\t\toutputSize,\n\t\t\t\tcrc32,\n\t\t\t\tcompressed,\n\t\t\t\tencrypted,\n\t\t\t\tuseWebWorkers: getOptionValue(zipEntry, options, OPTION_USE_WEB_WORKERS),\n\t\t\t\tuseCompressionStream,\n\t\t\t\ttransferStreams: getOptionValue(zipEntry, options, OPTION_TRANSFER_STREAMS),\n\t\t\t\tdeflate64,\n\t\t\t\tformat: registeredCodec ? registeredCodec.format : UNDEFINED_VALUE,\n\t\t\t\tcodecURI: registeredCodec ? registeredCodec.codecURI : UNDEFINED_VALUE,\n\t\t\t\tcompressionMethod,\n\t\t\t\trawBitFlag,\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\tif (checkOverlappingEntry) {\n\t\t\tawait detectOverlappingEntry({\n\t\t\t\treader,\n\t\t\t\tfileEntry,\n\t\t\t\tindex,\n\t\t\t\toffset: localHeaderOffset,\n\t\t\t\tcrc32,\n\t\t\t\tcompressedSize,\n\t\t\t\tuncompressedSize,\n\t\t\t\tdataOffset,\n\t\t\t\tdataDescriptor: dataDescriptor || localDirectory.bitFlag.dataDescriptor,\n\t\t\t\textraFieldZip64: extraFieldZip64 || localDirectory.extraFieldZip64,\n\t\t\t\treadRanges\n\t\t\t});\n\t\t}\n\t\tlet writable, abortError, aborted;\n\t\ttry {\n\t\t\tif (!checkOverlappingEntryOnly) {\n\t\t\t\tif (checkPasswordOnly) {\n\t\t\t\t\twriter = new WritableStream();\n\t\t\t\t}\n\t\t\t\twriter = new GenericWriter(writer);\n\t\t\t\tawait initStream(writer, getDecodableOutputSize(outputSize, compressedSize, compressed));\n\t\t\t\t({ writable } = writer);\n\t\t\t\tconst readable = toCompatibleReadable(reader.createReadable({ offset: dataOffset, size }));\n\t\t\t\tconst { outputSize: writtenSize } = await runWorker({ readable, writable }, workerOptions);\n\t\t\t\tthrowIfAborted(signal);\n\t\t\t\tif (writtenSize != outputSize) {\n\t\t\t\t\tthrow Object.assign(new Error(ERR_INVALID_UNCOMPRESSED_SIZE), { outputSize: writtenSize });\n\t\t\t\t}\n\t\t\t\twriter.size += writtenSize;\n\t\t\t}\n\t\t} catch (error) {\n\t\t\tconst { outputSize: failedOutputSize } = workerOptions;\n\t\t\tif (failedOutputSize !== UNDEFINED_VALUE) {\n\t\t\t\twriter.size += failedOutputSize;\n\t\t\t} else if (isErrorObject(error) && error.outputSize !== UNDEFINED_VALUE) {\n\t\t\t\twriter.size += error.outputSize;\n\t\t\t}\n\t\t\tif (!checkPasswordOnly || !isErrorObject(error) || error.message != ERR_ABORT_CHECK_PASSWORD) {\n\t\t\t\tabortError = error;\n\t\t\t\taborted = true;\n\t\t\t\tthrow error;\n\t\t\t}\n\t\t} finally {\n\t\t\tconst preventClose = !ownsWritable(writer) && getOptionValue(zipEntry, options, OPTION_PREVENT_CLOSE);\n\t\t\tif (!preventClose && writable && !writable.locked) {\n\t\t\t\tconst writableWriter = writable.getWriter();\n\t\t\t\tif (aborted) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tawait writableWriter.abort(abortError);\n\t\t\t\t\t} catch {\n\t\t\t\t\t\t// the error being propagated is more relevant; ignored\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tawait writableWriter.close();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn checkPasswordOnly || checkOverlappingEntryOnly ? UNDEFINED_VALUE : writer.getData ? writer.getData() : writable;\n\t}\n}\n\nfunction detectEncryptedCentralDirectory(directoryView) {\n\tconst maxOffset = Math.min(directoryView.byteLength, 1024) - 3;\n\tfor (let offset = 0; offset < maxOffset; offset++) {\n\t\tif (getUint32(directoryView, offset) == ARCHIVE_EXTRA_DATA_SIGNATURE) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}\n\nfunction getWrappedFilesLength(directoryView, directoryArray, offset) {\n\tlet wrappedFilesLength = 0;\n\twhile (offset + CENTRAL_FILE_HEADER_LENGTH <= directoryArray.length && getUint32(directoryView, offset) == CENTRAL_FILE_HEADER_SIGNATURE) {\n\t\toffset += CENTRAL_FILE_HEADER_LENGTH +\n\t\t\tgetUint16(directoryView, offset + 28) + getUint16(directoryView, offset + 30) + getUint16(directoryView, offset + 32);\n\t\twrappedFilesLength++;\n\t}\n\treturn wrappedFilesLength % (MAX_16_BITS + 1) ? 0 : wrappedFilesLength;\n}\n\nfunction readDigitalSignature(signatureRecordArray) {\n\tif (signatureRecordArray.length >= 6) {\n\t\tconst signatureRecordView = getDataView(signatureRecordArray);\n\t\tif (getUint32(signatureRecordView, 0) == DIGITAL_SIGNATURE_RECORD_SIGNATURE) {\n\t\t\tconst signatureDataLength = getUint16(signatureRecordView, 4);\n\t\t\tif (6 + signatureDataLength <= signatureRecordArray.length) {\n\t\t\t\treturn new Uint8Array(signatureRecordArray.subarray(6, 6 + signatureDataLength));\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction getEncryptedDirectoryDataLength(directoryEncryptionInfo, declaredDirectoryDataLength, directoryDataLength) {\n\tconst encryptedDirectoryDataLength = directoryEncryptionInfo && directoryEncryptionInfo.compressedSize ?\n\t\tdirectoryEncryptionInfo.compressedSize :\n\t\tdeclaredDirectoryDataLength;\n\treturn encryptedDirectoryDataLength > 0 && encryptedDirectoryDataLength <= directoryDataLength ?\n\t\tencryptedDirectoryDataLength :\n\t\tdirectoryDataLength;\n}\n\nfunction getDirectoryEncryptionInfo(rawExtensibleData) {\n\tconst directoryEncryptionInfo = { rawExtensibleData };\n\tif (rawExtensibleData.length >= 28) {\n\t\tconst extensibleDataView = getDataView(rawExtensibleData);\n\t\tconst hashDataLength = getUint16(extensibleDataView, 26);\n\t\tObject.assign(directoryEncryptionInfo, {\n\t\t\tcompressionMethod: getUint16(extensibleDataView, 0),\n\t\t\tcompressedSize: getBigUint64(extensibleDataView, 2),\n\t\t\tuncompressedSize: getBigUint64(extensibleDataView, 10),\n\t\t\tencryptionAlgorithm: getUint16(extensibleDataView, 18),\n\t\t\tbitLength: getUint16(extensibleDataView, 20),\n\t\t\tflags: getUint16(extensibleDataView, 22),\n\t\t\thashAlgorithm: getUint16(extensibleDataView, 24),\n\t\t\thashData: rawExtensibleData.subarray(28, 28 + hashDataLength)\n\t\t});\n\t}\n\treturn directoryEncryptionInfo;\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\nfunction readCommonFooter(fileEntry, directory, dataView, offset, localDirectory) {\n\tconst { rawExtraField } = directory;\n\tconst extraField = directory.extraField = new Map();\n\tconst rawExtraFieldView = getDataView(rawExtraField);\n\tlet offsetExtraField = 0;\n\tlet malformedExtraField = false;\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 {\n\t\tmalformedExtraField = true;\n\t}\n\tif (offsetExtraField > rawExtraField.length) {\n\t\tmalformedExtraField = true;\n\t}\n\tconst compressionMethod = getUint16(dataView, offset + 4);\n\tObject.assign(directory, {\n\t\tsignature: getUint32(dataView, offset + HEADER_OFFSET_SIGNATURE),\n\t\tcrc32: getUint32(dataView, offset + HEADER_OFFSET_SIGNATURE),\n\t\tcompressedSize: getUint32(dataView, offset + HEADER_OFFSET_COMPRESSED_SIZE),\n\t\tuncompressedSize: getUint32(dataView, offset + HEADER_OFFSET_UNCOMPRESSED_SIZE)\n\t});\n\tconst extraFieldZip64 = extraField.get(EXTRAFIELD_TYPE_ZIP64);\n\tif (extraFieldZip64) {\n\t\tif (!readExtraFieldZip64(extraFieldZip64, directory, localDirectory)) {\n\t\t\tmalformedExtraField = true;\n\t\t}\n\t\tdirectory.extraFieldZip64 = extraFieldZip64;\n\t} else if (ZIP64_PROPERTIES.some(([propertyName, max]) => directory[propertyName] == max)) {\n\t\tif (localDirectory) {\n\t\t\tmalformedExtraField = true;\n\t\t} else {\n\t\t\tthrow new Error(ERR_EXTRAFIELD_ZIP64_NOT_FOUND);\n\t\t}\n\t}\n\tconst extraFieldUnicodePath = extraField.get(EXTRAFIELD_TYPE_UNICODE_PATH);\n\tif (extraFieldUnicodePath) {\n\t\treadExtraFieldUnicode(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\treadExtraFieldUnicode(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 && (compressionMethod == COMPRESSION_METHOD_AES || directory.encrypted) && extraFieldAES.data.length >= 7) {\n\t\treadExtraFieldAES(extraFieldAES, directory, compressionMethod);\n\t\tdirectory.extraFieldAES = extraFieldAES;\n\t} else {\n\t\tif (extraFieldAES) {\n\t\t\tmalformedExtraField = true;\n\t\t}\n\t\tdirectory.compressionMethod = compressionMethod;\n\t}\n\tconst extraFieldPkwareUnix = extraField.get(EXTRAFIELD_TYPE_PKWARE_UNIX);\n\tif (extraFieldPkwareUnix) {\n\t\treadExtraFieldUnixDates(extraFieldPkwareUnix, directory);\n\t\tdirectory.extraFieldPkwareUnix = extraFieldPkwareUnix;\n\t}\n\tconst extraFieldUnixType1 = extraField.get(EXTRAFIELD_TYPE_UNIX_TYPE1);\n\tif (extraFieldUnixType1) {\n\t\treadExtraFieldUnixDates(extraFieldUnixType1, directory);\n\t\tdirectory.extraFieldUnixType1 = extraFieldUnixType1;\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 extraFieldUnix = extraField.get(EXTRAFIELD_TYPE_UNIX);\n\tlet unixIdsRead;\n\tif (extraFieldUnix) {\n\t\tunixIdsRead = readExtraFieldUnix(extraFieldUnix, directory, false);\n\t\tdirectory.extraFieldUnix = extraFieldUnix;\n\t}\n\tif (!unixIdsRead) {\n\t\tconst extraFieldInfoZip = extraField.get(EXTRAFIELD_TYPE_INFOZIP);\n\t\tif (extraFieldInfoZip) {\n\t\t\treadExtraFieldUnix(extraFieldInfoZip, directory, true);\n\t\t\tdirectory.extraFieldInfoZip = extraFieldInfoZip;\n\t\t}\n\t}\n\tconst extraFieldExtendedTimestamp = extraField.get(EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP);\n\tif (extraFieldExtendedTimestamp) {\n\t\treadExtraFieldExtendedTimestamp(extraFieldExtendedTimestamp, directory, localDirectory);\n\t\tdirectory.extraFieldExtendedTimestamp = extraFieldExtendedTimestamp;\n\t}\n\tconst extraFieldUSDZ = extraField.get(EXTRAFIELD_TYPE_USDZ);\n\tif (extraFieldUSDZ) {\n\t\tdirectory.extraFieldUSDZ = extraFieldUSDZ;\n\t}\n\treturn malformedExtraField;\n}\n\nfunction readExtraFieldZip64(extraFieldZip64, directory, localDirectory) {\n\tdirectory.zip64 = true;\n\tconst extraFieldView = getDataView(extraFieldZip64.data);\n\tconst missingProperties = ZIP64_PROPERTIES.filter(([propertyName, max]) => directory[propertyName] == max);\n\tconst requiredLength = missingProperties.reduce((length, [, max]) => length + ZIP64_EXTRACTION[max].bytes, 0);\n\tif (extraFieldZip64.data.length < requiredLength) {\n\t\tif (localDirectory) {\n\t\t\treturn false;\n\t\t}\n\t\tthrow new Error(ERR_EXTRAFIELD_ZIP64_NOT_FOUND);\n\t}\n\tconst values = [];\n\ttry {\n\t\tfor (let indexMissingProperty = 0, offset = 0; indexMissingProperty < missingProperties.length; indexMissingProperty++) {\n\t\t\tconst [, max] = missingProperties[indexMissingProperty];\n\t\t\tconst extraction = ZIP64_EXTRACTION[max];\n\t\t\tvalues.push(extraction.getValue(extraFieldView, offset));\n\t\t\toffset += extraction.bytes;\n\t\t}\n\t} catch (error) {\n\t\tif (localDirectory) {\n\t\t\treturn false;\n\t\t}\n\t\tthrow error;\n\t}\n\tmissingProperties.forEach(([propertyName], indexMissingProperty) => {\n\t\tdirectory[propertyName] = extraFieldZip64[propertyName] = values[indexMissingProperty];\n\t});\n\treturn true;\n}\n\nfunction readExtraFieldUnicode(extraFieldUnicode, propertyName, rawPropertyName, directory, fileEntry) {\n\tif (extraFieldUnicode.data.length < 5) {\n\t\textraFieldUnicode.valid = false;\n\t\treturn;\n\t}\n\tconst extraFieldView = getDataView(extraFieldUnicode.data);\n\tconst computedCrc32 = new Crc32();\n\tcomputedCrc32.append(fileEntry[rawPropertyName]);\n\tconst computedCrc32View = getDataView(new Uint8Array(4));\n\tcomputedCrc32View.setUint32(0, computedCrc32.get(), true);\n\tconst nameCrc32 = getUint32(extraFieldView, 1);\n\tconst version = getUint8(extraFieldView, 0);\n\tObject.assign(extraFieldUnicode, {\n\t\tversion,\n\t\t[propertyName]: decodeText(extraFieldUnicode.data.subarray(5)),\n\t\tvalid: version == 1 && !fileEntry.bitFlag.languageEncodingFlag && nameCrc32 == getUint32(computedCrc32View, 0)\n\t});\n\tif (extraFieldUnicode.valid) {\n\t\tdirectory[propertyName] = extraFieldUnicode[propertyName];\n\t\tdirectory[propertyName + PROPERTY_NAME_UTF8_SUFFIX] = 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\tif (extraFieldAES.vendorVersion != VENDOR_VERSION_AE_1) {\n\t\tdirectory.crc32 = UNDEFINED_VALUE;\n\t}\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 {\n\t\t// ignored\n\t}\n\tif (tag1Data && tag1Data.length == 24) {\n\t\tconst tag1View = getDataView(tag1Data);\n\t\tconst rawLastModDate = tag1View.getBigUint64(0, true);\n\t\tconst rawLastAccessDate = tag1View.getBigUint64(8, true);\n\t\tconst rawCreationDate = tag1View.getBigUint64(16, true);\n\t\tObject.assign(extraFieldNTFS, {\n\t\t\trawLastModDate,\n\t\t\trawLastAccessDate,\n\t\t\trawCreationDate\n\t\t});\n\t\tconst lastModDate = getDateNTFS(rawLastModDate);\n\t\tconst lastAccessDate = getDateNTFS(rawLastAccessDate);\n\t\tconst creationDate = getDateNTFS(rawCreationDate);\n\t\tconst extraFieldData = { lastModDate, lastAccessDate, creationDate };\n\t\tObject.assign(extraFieldNTFS, extraFieldData);\n\t\tObject.assign(directory, extraFieldData, { rawLastAccessDate, rawCreationDate });\n\t}\n}\n\nfunction readExtraFieldUnixDates(extraField, directory) {\n\tif (extraField.data.length < 8) {\n\t\treturn;\n\t}\n\tconst extraFieldView = getDataView(extraField.data);\n\tconst lastAccessDate = new Date((getUint32(extraFieldView, 0) | 0) * 1000);\n\tconst lastModDate = new Date((getUint32(extraFieldView, 4) | 0) * 1000);\n\tconst extraFieldData = { lastAccessDate, lastModDate };\n\tif (extraField.data.length >= 12) {\n\t\textraFieldData.uid = getUint16(extraFieldView, 8);\n\t\textraFieldData.gid = getUint16(extraFieldView, 10);\n\t}\n\tObject.assign(extraField, extraFieldData);\n\tObject.assign(directory, extraFieldData);\n}\n\nfunction readExtraFieldUnix(extraField, directory, isInfoZip) {\n\ttry {\n\t\tconst view = getDataView(extraField.data);\n\t\tlet uid, gid;\n\t\tif (isInfoZip) {\n\t\t\tlet offset = 0;\n\t\t\tconst version = getUint8(view, offset++);\n\t\t\tconst uidSize = getUint8(view, offset++);\n\t\t\tuid = unpackUnixId(extraField.data.subarray(offset, offset + uidSize));\n\t\t\toffset += uidSize;\n\t\t\tconst gidSize = getUint8(view, offset++);\n\t\t\tgid = unpackUnixId(extraField.data.subarray(offset, offset + gidSize));\n\t\t\tObject.assign(extraField, { version, uid, gid });\n\t\t} else if (extraField.data.length >= 4) {\n\t\t\tuid = getUint16(view, 0);\n\t\t\tgid = getUint16(view, 2);\n\t\t\tObject.assign(extraField, { uid, gid });\n\t\t}\n\t\tif (uid !== UNDEFINED_VALUE) {\n\t\t\tdirectory.uid = uid;\n\t\t}\n\t\tif (gid !== UNDEFINED_VALUE) {\n\t\t\tdirectory.gid = gid;\n\t\t}\n\t\treturn uid !== UNDEFINED_VALUE || gid !== UNDEFINED_VALUE;\n\t} catch {\n\t\t// ignored\n\t}\n}\n\nfunction unpackUnixId(bytes) {\n\tconst buffer = new Uint8Array(4);\n\tbuffer.set(bytes, 0);\n\tconst view = new DataView(buffer.buffer, buffer.byteOffset, 4);\n\treturn view.getUint32(0, true);\n}\n\nfunction readExtraFieldExtendedTimestamp(extraFieldExtendedTimestamp, directory, localDirectory) {\n\tif (!extraFieldExtendedTimestamp.data.length) {\n\t\treturn;\n\t}\n\tconst extraFieldView = getDataView(extraFieldExtendedTimestamp.data);\n\tconst flags = getUint8(extraFieldView, 0);\n\tconst timeProperties = [];\n\tconst timeRawProperties = [];\n\tif (localDirectory) {\n\t\tif ((flags & 0x1) == 0x1) {\n\t\t\ttimeProperties.push(PROPERTY_NAME_LAST_MODIFICATION_DATE);\n\t\t\ttimeRawProperties.push(PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE);\n\t\t}\n\t\tif ((flags & 0x2) == 0x2) {\n\t\t\ttimeProperties.push(PROPERTY_NAME_LAST_ACCESS_DATE);\n\t\t\ttimeRawProperties.push(PROPERTY_NAME_RAW_LAST_ACCESS_DATE);\n\t\t}\n\t\tif ((flags & 0x4) == 0x4) {\n\t\t\ttimeProperties.push(PROPERTY_NAME_CREATION_DATE);\n\t\t\ttimeRawProperties.push(PROPERTY_NAME_RAW_CREATION_DATE);\n\t\t}\n\t} else if (extraFieldExtendedTimestamp.data.length >= 5) {\n\t\ttimeProperties.push(PROPERTY_NAME_LAST_MODIFICATION_DATE);\n\t\ttimeRawProperties.push(PROPERTY_NAME_RAW_LAST_MODIFICATION_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 | 0) * 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 detectOverlappingEntry({\n\treader,\n\tfileEntry,\n\tindex,\n\toffset,\n\tcrc32,\n\tcompressedSize,\n\tuncompressedSize,\n\tdataOffset,\n\tdataDescriptor,\n\textraFieldZip64,\n\treadRanges\n}) {\n\tlet dataDescriptorLength = 0;\n\tif (dataDescriptor) {\n\t\tconst zip64 = Boolean(extraFieldZip64);\n\t\tconst dataDescriptorArray = await readUint8Array(reader, dataOffset + compressedSize, DATA_DESCRIPTOR_RECORD_ZIP_64_LENGTH + DATA_DESCRIPTOR_RECORD_SIGNATURE_LENGTH);\n\t\tconst dataDescriptorView = getDataView(dataDescriptorArray);\n\t\tconst candidates = [[zip64, true], [zip64, false], [!zip64, true], [!zip64, false]]\n\t\t\t.map(([zip64Layout, signature]) => readDataDescriptor(dataDescriptorView, zip64Layout, signature))\n\t\t\t.filter(candidate => candidate && candidate.compressedSize == compressedSize && candidate.uncompressedSize == uncompressedSize);\n\t\tconst localDataDescriptor = candidates.find(candidate => candidate.crc32 == crc32) || candidates[0] ||\n\t\t\treadDataDescriptor(dataDescriptorView, zip64, true) || readDataDescriptor(dataDescriptorView, zip64, false);\n\t\tif (localDataDescriptor) {\n\t\t\tfileEntry.localDirectory.dataDescriptor = localDataDescriptor;\n\t\t\tdataDescriptorLength = getDataDescriptorLength(localDataDescriptor.zip64, localDataDescriptor.signature);\n\t\t} else {\n\t\t\tdataDescriptorLength = getDataDescriptorLength(zip64, false);\n\t\t}\n\t}\n\tconst range = {\n\t\tstart: offset,\n\t\tend: dataOffset + compressedSize + dataDescriptorLength,\n\t\tfileEntry\n\t};\n\tconst { indexes, sortedRanges, pendingRanges } = readRanges;\n\tif (!indexes.has(index)) {\n\t\tconst overlappingRange = findOverlappingRange(sortedRanges, range) || pendingRanges.find(otherRange => rangesOverlap(range, otherRange));\n\t\tif (overlappingRange) {\n\t\t\tconst error = new Error(ERR_OVERLAPPING_ENTRY);\n\t\t\terror.overlappingEntry = overlappingRange.fileEntry;\n\t\t\tthrow error;\n\t\t}\n\t\tindexes.add(index);\n\t\tpendingRanges.push(range);\n\t\tif (pendingRanges.length * pendingRanges.length > sortedRanges.length) {\n\t\t\tpendingRanges.sort((range, otherRange) => range.start - otherRange.start);\n\t\t\treadRanges.sortedRanges = mergeRanges(sortedRanges, pendingRanges);\n\t\t\tpendingRanges.length = 0;\n\t\t}\n\t}\n}\n\nfunction findOverlappingRange(sortedRanges, range) {\n\tlet low = 0;\n\tlet high = sortedRanges.length;\n\twhile (low < high) {\n\t\tconst middle = (low + high) >>> 1;\n\t\tif (sortedRanges[middle].start < range.start) {\n\t\t\tlow = middle + 1;\n\t\t} else {\n\t\t\thigh = middle;\n\t\t}\n\t}\n\tconst previousRange = sortedRanges[low - 1];\n\tconst nextRange = sortedRanges[low];\n\tif (previousRange && rangesOverlap(range, previousRange)) {\n\t\treturn previousRange;\n\t}\n\tif (nextRange && rangesOverlap(range, nextRange)) {\n\t\treturn nextRange;\n\t}\n}\n\nfunction rangesOverlap(range, otherRange) {\n\treturn range.start < otherRange.end && otherRange.start < range.end;\n}\n\nfunction mergeRanges(sortedRanges, pendingRanges) {\n\tconst mergedRanges = [];\n\tlet indexSorted = 0;\n\tlet indexPending = 0;\n\twhile (indexSorted < sortedRanges.length || indexPending < pendingRanges.length) {\n\t\tif (indexPending == pendingRanges.length || (indexSorted < sortedRanges.length && sortedRanges[indexSorted].start < pendingRanges[indexPending].start)) {\n\t\t\tmergedRanges.push(sortedRanges[indexSorted++]);\n\t\t} else {\n\t\t\tmergedRanges.push(pendingRanges[indexPending++]);\n\t\t}\n\t}\n\treturn mergedRanges;\n}\n\nfunction readDataDescriptor(dataDescriptorView, zip64, signature) {\n\tconst offset = signature ? DATA_DESCRIPTOR_RECORD_SIGNATURE_LENGTH : 0;\n\tif (dataDescriptorView.byteLength < getDataDescriptorLength(zip64, signature) ||\n\t\t(signature && getUint32(dataDescriptorView, 0) != DATA_DESCRIPTOR_RECORD_SIGNATURE)) {\n\t\treturn UNDEFINED_VALUE;\n\t}\n\tconst crc32 = getUint32(dataDescriptorView, offset);\n\tlet compressedSize;\n\tlet uncompressedSize;\n\ttry {\n\t\tif (zip64) {\n\t\t\tcompressedSize = getBigUint64(dataDescriptorView, offset + 4);\n\t\t\tuncompressedSize = getBigUint64(dataDescriptorView, offset + 12);\n\t\t} else {\n\t\t\tcompressedSize = getUint32(dataDescriptorView, offset + 4);\n\t\t\tuncompressedSize = getUint32(dataDescriptorView, offset + 8);\n\t\t}\n\t} catch {\n\t\treturn UNDEFINED_VALUE;\n\t}\n\treturn { signature, zip64, crc32, compressedSize, uncompressedSize };\n}\n\nfunction getDataDescriptorLength(zip64, signature) {\n\treturn (zip64 ? DATA_DESCRIPTOR_RECORD_ZIP_64_LENGTH : DATA_DESCRIPTOR_RECORD_LENGTH) + (signature ? DATA_DESCRIPTOR_RECORD_SIGNATURE_LENGTH : 0);\n}\n\nfunction getDiskOffset(reader, diskNumber) {\n\treturn reader.getDiskOffset ? reader.getDiskOffset(diskNumber) : 0;\n}\n\nasync function startsWithSplitZipSignature(reader) {\n\treturn await getFirstSignature(reader) == SPLIT_ZIP_FILE_SIGNATURE;\n}\n\nasync function startsWithSplitZipMarker(reader) {\n\tconst signature = await getFirstSignature(reader);\n\treturn signature == SPLIT_ZIP_FILE_SIGNATURE || signature == TEMPORARY_SPLIT_ZIP_FILE_SIGNATURE;\n}\n\nasync function getFirstSignature(reader) {\n\tconst signatureArray = await readUint8Array(reader, 0, SPLIT_ZIP_FILE_SIGNATURE_LENGTH);\n\treturn getUint32(getDataView(signatureArray));\n}\n\nfunction isStrictnessValue(value) {\n\treturn value === STRICTNESS_STRICT || value === STRICTNESS_BALANCED || value === STRICTNESS_TOLERANT;\n}\n\nfunction getDecodableOutputSize(outputSize, compressedSize, compressed) {\n\treturn Math.min(outputSize, compressed ? compressedSize * MAX_DEFLATE_EXPANSION_RATIO : compressedSize);\n}\n\nfunction getStrictness(options, inheritedOptions) {\n\treturn resolveStrictness(options, resolveStrictness(inheritedOptions, STRICTNESS_BALANCED));\n}\n\nfunction resolveStrictness(options, inheritedStrictness) {\n\tconst strictness = options[OPTION_STRICTNESS];\n\tif (strictness !== UNDEFINED_VALUE) {\n\t\tif (!isStrictnessValue(strictness)) {\n\t\t\tthrow new Error(ERR_INVALID_STRICTNESS);\n\t\t}\n\t\treturn strictness;\n\t}\n\tconst checkAmbiguity = options[OPTION_CHECK_AMBIGUITY];\n\tif (checkAmbiguity === UNDEFINED_VALUE) {\n\t\treturn inheritedStrictness;\n\t}\n\tif (checkAmbiguity) {\n\t\treturn STRICTNESS_STRICT;\n\t}\n\treturn inheritedStrictness == STRICTNESS_TOLERANT ? STRICTNESS_TOLERANT : STRICTNESS_BALANCED;\n}\n\nfunction getCheckLocalDirectory(checkLocalDirectory, strictness) {\n\tif (checkLocalDirectory === UNDEFINED_VALUE) {\n\t\treturn strictness != STRICTNESS_TOLERANT;\n\t}\n\treturn Boolean(checkLocalDirectory);\n}\n\nfunction getCheckLocalFilename(checkLocalFilename, strictness) {\n\tif (checkLocalFilename === UNDEFINED_VALUE) {\n\t\treturn strictness == STRICTNESS_STRICT;\n\t}\n\treturn Boolean(checkLocalFilename);\n}\n\nfunction getFilenameValidation(filenameValidation, strictness) {\n\tif (filenameValidation === UNDEFINED_VALUE) {\n\t\treturn strictness;\n\t}\n\tif (!isStrictnessValue(filenameValidation)) {\n\t\tthrow new Error(ERR_INVALID_FILENAME_VALIDATION);\n\t}\n\treturn filenameValidation;\n}\n\nfunction isUnsafeFilename(filename, filenameValidation) {\n\tif (filenameValidation == STRICTNESS_TOLERANT) {\n\t\treturn false;\n\t}\n\tconst pathParts = filename.split(\"/\");\n\tif (pathParts.length > 1 && pathParts[pathParts.length - 1] === \"\") {\n\t\tpathParts.pop();\n\t}\n\tif (PARENT_DIRECTORY_REGEXP.test(filename) || filename.startsWith(\"/\") || filename.startsWith(\"\\\\\") || DRIVE_LETTER_REGEXP.test(filename)) {\n\t\treturn true;\n\t}\n\treturn filenameValidation == STRICTNESS_STRICT && (pathParts.includes(\".\") || pathParts.includes(\"\") || filename.includes(\"\\0\"));\n}\n\nfunction getMaxAppendedDataSize(maxAppendedDataSize, strictness) {\n\tif (maxAppendedDataSize !== UNDEFINED_VALUE) {\n\t\tconst size = toNumber(maxAppendedDataSize);\n\t\tif (typeof size != NUMBER_TYPE || Number.isNaN(size) || size < 0) {\n\t\t\tthrow new Error(ERR_INVALID_MAX_APPENDED_DATA_SIZE);\n\t\t}\n\t\treturn size;\n\t}\n\tif (strictness == STRICTNESS_STRICT) {\n\t\treturn 0;\n\t}\n\tif (strictness == STRICTNESS_TOLERANT) {\n\t\treturn Infinity;\n\t}\n\treturn MAX_16_BITS;\n}\n\nasync function findEndOfCentralDirectory(reader, rejectAmbiguous, maxAppendedDataSize) {\n\tconst { size } = reader;\n\tconst anchoredLength = Math.min(size, END_OF_CENTRAL_DIR_LENGTH + MAX_16_BITS);\n\tconst remoteProbeBudget = { remaining: MAX_END_OF_CENTRAL_DIR_PROBES };\n\tlet endOfDirectoryInfo;\n\tlet plausibleEndOfDirectoryInfo;\n\tlet endOfDirectoryReachingEndCount = 0;\n\tfor await (const [anchoredView, anchoredOffset, anchoredArray, indexByte, offset] of scanEndOfCentralDirectory(reader, anchoredLength)) {\n\t\tconst commentLength = getUint16(anchoredView, indexByte + 20);\n\t\tif (offset + END_OF_CENTRAL_DIR_LENGTH + commentLength == size) {\n\t\t\tconst reachability = await getCentralDirectoryReachability(reader, anchoredView, anchoredOffset, indexByte, offset, size, remoteProbeBudget);\n\t\t\tif (reachability == CENTRAL_DIRECTORY_REACHABLE) {\n\t\t\t\tif (!endOfDirectoryInfo) {\n\t\t\t\t\tendOfDirectoryInfo = getEndOfCentralDirectoryInfo(anchoredArray, indexByte, offset);\n\t\t\t\t}\n\t\t\t\tendOfDirectoryReachingEndCount++;\n\t\t\t\tif (!rejectAmbiguous || endOfDirectoryReachingEndCount > 1) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} else if (reachability == CENTRAL_DIRECTORY_PLAUSIBLE && !plausibleEndOfDirectoryInfo) {\n\t\t\t\tplausibleEndOfDirectoryInfo = getEndOfCentralDirectoryInfo(anchoredArray, indexByte, offset);\n\t\t\t}\n\t\t}\n\t}\n\tif (!endOfDirectoryInfo) {\n\t\tendOfDirectoryInfo = plausibleEndOfDirectoryInfo;\n\t}\n\tif (!endOfDirectoryInfo) {\n\t\tendOfDirectoryInfo = await seekEndOfCentralDirectory(reader, maxAppendedDataSize, remoteProbeBudget);\n\t}\n\treturn { endOfDirectoryInfo, endOfDirectoryReachingEndCount };\n}\n\nasync function seekEndOfCentralDirectory(reader, maxAppendedDataSize, remoteProbeBudget) {\n\tconst { size } = reader;\n\tconst searchLength = Math.min(size, maxAppendedDataSize == Infinity ? size :\n\t\tEND_OF_CENTRAL_DIR_LENGTH + MAX_16_BITS + maxAppendedDataSize);\n\tlet firstSignatureInfo, plausibleInfo;\n\tfor await (const [searchView, searchOffset, searchArray, indexByte, offset] of scanEndOfCentralDirectory(reader, searchLength)) {\n\t\tconst record = getEndOfCentralDirectoryInfo(searchArray, indexByte, offset);\n\t\tif (!firstSignatureInfo) {\n\t\t\tfirstSignatureInfo = record;\n\t\t}\n\t\tconst reachability = await getCentralDirectoryReachability(reader, searchView, searchOffset, indexByte, offset, size, remoteProbeBudget);\n\t\tif (reachability == CENTRAL_DIRECTORY_REACHABLE) {\n\t\t\treturn record;\n\t\t}\n\t\tif (reachability == CENTRAL_DIRECTORY_PLAUSIBLE && !plausibleInfo) {\n\t\t\tplausibleInfo = record;\n\t\t}\n\t}\n\treturn plausibleInfo || firstSignatureInfo;\n}\n\nasync function* scanEndOfCentralDirectory(reader, scanLength) {\n\tconst scanOffset = reader.size - scanLength;\n\tconst scanArray = await readUint8Array(reader, scanOffset, scanLength);\n\tconst scanView = getDataView(scanArray);\n\tfor (let indexByte = scanArray.length - END_OF_CENTRAL_DIR_LENGTH; indexByte >= 0; indexByte--) {\n\t\tif (getUint32(scanView, indexByte) == END_OF_CENTRAL_DIR_SIGNATURE) {\n\t\t\tyield [scanView, scanOffset, scanArray, indexByte, scanOffset + indexByte];\n\t\t}\n\t}\n}\n\nfunction getEndOfCentralDirectoryInfo(scanArray, indexByte, offset) {\n\treturn { offset, buffer: new Uint8Array(scanArray.subarray(indexByte, indexByte + END_OF_CENTRAL_DIR_LENGTH)).buffer };\n}\n\nasync function getCentralDirectoryReachability(reader, view, anchoredOffset, indexByte, offset, size, remoteProbeBudget) {\n\tconst filesLength = getUint16(view, indexByte + 10);\n\tconst directoryDataLength = getUint32(view, indexByte + 12);\n\tconst directoryDataOffset = getUint32(view, indexByte + 16);\n\tif (filesLength == MAX_16_BITS || directoryDataLength == MAX_32_BITS || directoryDataOffset == MAX_32_BITS) {\n\t\tconst locatorSignature = await readSignature(reader, view, anchoredOffset, offset - ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH, size, remoteProbeBudget);\n\t\treturn locatorSignature == ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE ? CENTRAL_DIRECTORY_REACHABLE : CENTRAL_DIRECTORY_UNREACHABLE;\n\t}\n\tif (!filesLength && !directoryDataLength) {\n\t\treturn CENTRAL_DIRECTORY_PLAUSIBLE;\n\t}\n\tconst directoryDiskNumber = getUint16(view, indexByte + 6);\n\tfor (const centralDirectoryOffset of [offset - directoryDataLength, getDiskOffset(reader, directoryDiskNumber) + directoryDataOffset]) {\n\t\tif (await readSignature(reader, view, anchoredOffset, centralDirectoryOffset, size, remoteProbeBudget) == CENTRAL_FILE_HEADER_SIGNATURE) {\n\t\t\treturn CENTRAL_DIRECTORY_REACHABLE;\n\t\t}\n\t}\n\treturn CENTRAL_DIRECTORY_UNREACHABLE;\n}\n\nasync function readSignature(reader, view, anchoredOffset, signatureOffset, size, remoteProbeBudget) {\n\tif (signatureOffset < 0 || signatureOffset + 4 > size) {\n\t\treturn UNDEFINED_VALUE;\n\t}\n\tif (signatureOffset >= anchoredOffset) {\n\t\treturn getUint32(view, signatureOffset - anchoredOffset);\n\t}\n\tif (remoteProbeBudget.remaining > 0) {\n\t\tremoteProbeBudget.remaining--;\n\t\tconst signatureArray = await readUint8Array(reader, signatureOffset, 4);\n\t\treturn getUint32(getDataView(signatureArray), 0);\n\t}\n\treturn UNDEFINED_VALUE;\n}\n\nfunction validateLocalDirectory(zipEntry, localDirectory, rawLocalFilename, checkLocalFilename, warnings) {\n\tconst { rawFilename } = zipEntry;\n\tconst reject = !warnings;\n\tconst maskedLocalDirectory = zipEntry.decryptedDirectory &&\n\t\t(localDirectory.rawBitFlag & BITFLAG_MASKED_LOCAL_HEADERS) == BITFLAG_MASKED_LOCAL_HEADERS;\n\tif (checkLocalFilename && !maskedLocalDirectory &&\n\t\t(rawLocalFilename.length != rawFilename.length ||\n\t\t\trawLocalFilename.some((byteValue, indexByte) => byteValue != rawFilename[indexByte]))) {\n\t\treportAmbiguity(reject, warnings, WARNING_MISMATCHED_LOCAL_FILE_HEADER_FILENAME);\n\t}\n\tif ((localDirectory.rawBitFlag & BITFLAG_AMBIGUITY_MASK) != (zipEntry.rawBitFlag & BITFLAG_AMBIGUITY_MASK)) {\n\t\treportAmbiguity(reject, warnings, WARNING_MISMATCHED_LOCAL_FILE_HEADER_BIT_FLAG);\n\t}\n\tif (localDirectory.compressionMethod != zipEntry.compressionMethod) {\n\t\treportAmbiguity(reject, warnings, WARNING_MISMATCHED_LOCAL_FILE_HEADER_COMPRESSION_METHOD);\n\t}\n\tif (!localDirectory.bitFlag.dataDescriptor && !maskedLocalDirectory &&\n\t\t(localDirectory.crc32 || localDirectory.compressedSize || localDirectory.uncompressedSize) &&\n\t\t(localDirectory.crc32 != zipEntry.crc32 ||\n\t\t\tlocalDirectory.compressedSize != zipEntry.compressedSize ||\n\t\t\tlocalDirectory.uncompressedSize != zipEntry.uncompressedSize)) {\n\t\treportAmbiguity(reject, warnings, WARNING_MISMATCHED_LOCAL_FILE_HEADER_CRC32_OR_SIZES);\n\t}\n}\n\nfunction reportAmbiguity(reject, warnings, reason) {\n\tif (reject) {\n\t\tthrowAmbiguousArchive(reason);\n\t} else {\n\t\taddWarning(warnings, reason);\n\t}\n}\n\nfunction throwAmbiguousArchive(reason) {\n\tconst error = new Error(ERR_AMBIGUOUS_ARCHIVE);\n\terror.reason = reason;\n\tthrow error;\n}\n\nfunction getOptionValue(zipReader, options, name) {\n\treturn options[name] === UNDEFINED_VALUE ? zipReader.options[name] : options[name];\n}\n\nfunction getFunctionOptionValue(zipReader, options, name) {\n\treturn checkFunctionOption(getOptionValue(zipReader, options, name));\n}\n\n\nfunction getDate(timeRaw) {\n\tconst date = (timeRaw & 0xffff0000) >> 16, time = timeRaw & MAX_16_BITS;\n\tconst result = new Date(1980 + ((date & 0xFE00) >> 9), ((date & 0x01E0) >> 5) - 1, date & 0x001F, (time & 0xF800) >> 11, (time & 0x07E0) >> 5, (time & 0x001F) * 2, 0);\n\treturn result < MIN_DATE ? MIN_DATE : result;\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\tconst value = view.getBigUint64(offset, true);\n\tif (value > MAX_SAFE_UINT64) {\n\t\tthrow new Error(ERR_UNSUPPORTED_UINT64);\n\t}\n\treturn Number(value);\n}\n","import type { NumberSplit } from './types'\n\n/**\n * Test whether a string contains an integer number\n */\nexport function isInteger(value: string): boolean {\n return INTEGER_REGEX.test(value)\n}\n\nconst INTEGER_REGEX = /^-?[0-9]+$/\n\n/**\n * Test whether a string contains a number\n * http://stackoverflow.com/questions/13340717/json-numbers-regular-expression\n */\nexport function isNumber(value: string): boolean {\n return NUMBER_REGEX.test(value)\n}\n\nconst NUMBER_REGEX = /^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$/\n\n/**\n * Test whether a string can be safely represented with a number\n * without information loss.\n *\n * When approx is true, floating point numbers that lose a few digits but\n * are still approximately equal in value are considered safe too.\n * Integer numbers must still be exactly equal.\n */\nexport function isSafeNumber(\n value: string,\n config?: {\n approx: boolean\n }\n): boolean {\n if (isInteger(value)) {\n return Number.isSafeInteger(Number.parseInt(value, 10))\n }\n\n const num = Number.parseFloat(value)\n const parsed = String(num)\n\n if (value === parsed) {\n return true\n }\n\n const valueDigits = extractSignificantDigits(value)\n const parsedDigits = extractSignificantDigits(parsed)\n\n if (valueDigits === parsedDigits) {\n return true\n }\n\n if (config?.approx === true) {\n // A value is approximately equal when:\n // 1. it is a floating point number, not an integer\n // 2. it has at least 14 digits\n // 3. the first 14 digits are equal\n const requiredDigits = 14\n if (\n !isInteger(value) &&\n parsedDigits.length >= requiredDigits &&\n valueDigits.startsWith(parsedDigits.substring(0, requiredDigits))\n ) {\n return true\n }\n }\n\n return false\n}\n\nexport enum UnsafeNumberReason {\n underflow = 'underflow',\n overflow = 'overflow',\n truncate_integer = 'truncate_integer',\n truncate_float = 'truncate_float'\n}\n\n/**\n * When the provided value is an unsafe number, describe what the reason is:\n * overflow, underflow, truncate_integer, or truncate_float.\n * Returns undefined when the value is safe.\n */\nexport function getUnsafeNumberReason(value: string): UnsafeNumberReason | undefined {\n if (isSafeNumber(value, { approx: false })) {\n return undefined\n }\n\n if (isInteger(value)) {\n return UnsafeNumberReason.truncate_integer\n }\n\n const num = Number.parseFloat(value)\n if (!Number.isFinite(num)) {\n return UnsafeNumberReason.overflow\n }\n\n if (num === 0) {\n return UnsafeNumberReason.underflow\n }\n\n return UnsafeNumberReason.truncate_float\n}\n\n/**\n * Convert a string into a number when it is safe to do so.\n * Throws an error otherwise, explaining the reason.\n */\nexport function toSafeNumberOrThrow(\n value: string,\n config?: {\n approx: boolean\n }\n): number {\n const number = Number.parseFloat(value)\n\n const unsafeReason = getUnsafeNumberReason(value)\n if (\n config?.approx === true\n ? unsafeReason && unsafeReason !== UnsafeNumberReason.truncate_float\n : unsafeReason\n ) {\n const unsafeReasonText = unsafeReason?.replace(/_\\w+$/, '')\n throw new Error(\n `Cannot safely convert to number: the value '${value}' would ${unsafeReasonText} and become ${number}`\n )\n }\n\n return number\n}\n\n/**\n * Split a number into sign, digits, and exponent.\n * Leading zeros and non-canonical zeros are normalized.\n *\n * The value can be constructed again from a split number by inserting a dot\n * at the second character of the digits if there is more than one digit,\n * prepending it with the sign, and appending an \"e\" and the exponent as follows:\n *\n * const reconstructed = `${sign}${digits[0]}.${digits.slice(1)}e${exponent}`\n *\n */\nexport function splitNumber(value: string): NumberSplit {\n const match = value.match(/^(-?)(\\d+\\.?\\d*)([eE]([+-]?\\d+))?$/)\n if (!match) {\n throw new SyntaxError(`Invalid number: ${value}`)\n }\n\n const sign = match[1] as '-' | ''\n const digitsStr = match[2]\n let exponent = match[4] !== undefined ? Number.parseInt(match[4], 10) : 0\n\n const dot = digitsStr.indexOf('.')\n exponent += dot !== -1 ? dot - 1 : digitsStr.length - 1\n\n const digits = digitsStr\n .replace('.', '') // remove the dot (must be removed before removing leading zeros)\n .replace(/^0*/, (zeros: string) => {\n // remove leading zeros, add their count to the exponent\n exponent -= zeros.length\n return ''\n })\n .replace(/0*$/, '') // remove trailing zeros\n\n // normalize zero, for example normalizes 0e5 or -0 into 0\n return digits.length > 0 ? { sign, digits, exponent } : { sign: '', digits: '0', exponent: 0 }\n}\n\n/**\n * Compare two strings containing a numeric value\n * Returns 1 when a is larger than b, 0 when they are equal,\n * and -1 when a is smaller than b.\n */\nexport function compareNumber(a: string, b: string): 1 | 0 | -1 {\n if (a === b) {\n return 0\n }\n\n const aa = splitNumber(a)\n const bb = splitNumber(b)\n\n type Sign = -1 | 1\n\n const sign: Sign = aa.sign === '-' ? -1 : 1\n\n if (aa.sign !== bb.sign) {\n return sign\n }\n\n if (aa.exponent !== bb.exponent) {\n return aa.exponent > bb.exponent ? sign : aa.exponent < bb.exponent ? (-sign as Sign) : 0\n }\n\n return aa.digits > bb.digits ? sign : aa.digits < bb.digits ? (-sign as Sign) : 0\n}\n\n/**\n * Count the significant digits of a number.\n *\n * For example:\n * '2.34' returns 3\n * '-77' returns 2\n * '0.003400' returns 2\n * '120.5e+30' returns 4\n **/\nexport function countSignificantDigits(value: string): number {\n const { start, end } = getSignificantDigitRange(value)\n\n const dot = value.indexOf('.')\n if (dot === -1 || dot < start || dot > end) {\n return end - start\n }\n\n return end - start - 1\n}\n\n/**\n * Get the significant digits of a number.\n *\n * For example:\n * '2.34' returns '234'\n * '-77' returns '77'\n * '0.003400' returns '34'\n * '120.5e+30' returns '1205'\n **/\nexport function extractSignificantDigits(value: string): string {\n const { start, end } = getSignificantDigitRange(value)\n\n const digits = value.substring(start, end)\n\n const dot = digits.indexOf('.')\n if (dot === -1) {\n return digits\n }\n\n return digits.substring(0, dot) + digits.substring(dot + 1)\n}\n\n/**\n * Returns the range (start to end) of the significant digits of a value.\n * Note that this range _may_ contain the decimal dot.\n *\n * For example:\n *\n * getSignificantDigitRange('0.0325900') // { start: 3, end: 7 }\n * getSignificantDigitRange('2.0300') // { start: 0, end: 3 }\n * getSignificantDigitRange('0.0') // { start: 3, end: 3 }\n *\n */\nfunction getSignificantDigitRange(value: string): { start: number; end: number } {\n let start = 0\n if (value[0] === '-') {\n start++\n }\n while (value[start] === '0' || value[start] === '.') {\n start++\n }\n\n let end = value.lastIndexOf('e')\n if (end === -1) {\n end = value.lastIndexOf('E')\n }\n if (end === -1) {\n end = value.length\n }\n while ((value[end - 1] === '0' || value[end - 1] === '.') && end > start) {\n end--\n }\n\n return { start, end }\n}\n","import {\n compareNumber,\n countSignificantDigits,\n getUnsafeNumberReason,\n isInteger,\n isNumber,\n UnsafeNumberReason\n} from './utils.js'\n\n/**\n * A lossless number. Stores its numeric value as string\n */\nexport class LosslessNumber {\n // numeric value as string\n value: string\n\n // type information\n isLosslessNumber = true\n\n constructor(value: string) {\n if (!isNumber(value)) {\n throw new Error(`Invalid number (value: \"${value}\")`)\n }\n\n this.value = value\n }\n\n /**\n * Get the value of the LosslessNumber as number or bigint.\n *\n * - a number is returned for safe numbers and decimal values that only lose some insignificant digits\n * - a bigint is returned for big integer numbers\n * - an Error is thrown for values that will overflow or underflow\n *\n * Note that you can implement your own strategy for conversion by just getting the value as string\n * via .toString(), and using util functions like isInteger, isSafeNumber, getUnsafeNumberReason,\n * and toSafeNumberOrThrow to convert it to a numeric value.\n */\n valueOf(): number | bigint {\n const unsafeReason = getUnsafeNumberReason(this.value)\n\n // safe or truncate_float\n if (unsafeReason === undefined || unsafeReason === UnsafeNumberReason.truncate_float) {\n return Number.parseFloat(this.value)\n }\n\n // truncate_integer\n if (isInteger(this.value)) {\n return BigInt(this.value)\n }\n\n // overflow or underflow\n throw new Error(\n `Cannot safely convert to number: the value '${this.value}' would ${unsafeReason} and become ${Number.parseFloat(this.value)}`\n )\n }\n\n /**\n * Get the value of the LosslessNumber as string.\n */\n toString(): string {\n return this.value\n }\n\n // Note: we do NOT implement a .toJSON() method, and you should not implement\n // or use that, it cannot safely turn the numeric value in the string into\n // stringified JSON since it has to be parsed into a number first.\n}\n\n/**\n * Test whether a value is a LosslessNumber\n */\nexport function isLosslessNumber(value: unknown): value is LosslessNumber {\n // @ts-expect-error\n return (value && typeof value === 'object' && value.isLosslessNumber) || false\n}\n\n/**\n * Convert a number into a LosslessNumber if this is possible in a safe way\n * If the value has too many digits, or is NaN or Infinity, an error will be thrown\n */\nexport function toLosslessNumber(value: number): LosslessNumber {\n const maxDigits = 15\n if (countSignificantDigits(String(value)) > maxDigits) {\n throw new Error(\n `Invalid number: contains more than 15 digits and is most likely truncated and unsafe by itself (value: ${value})`\n )\n }\n\n if (Number.isNaN(value)) {\n throw new Error('Invalid number: NaN')\n }\n\n if (!Number.isFinite(value)) {\n throw new Error(`Invalid number: ${value}`)\n }\n\n return new LosslessNumber(String(value))\n}\n\n/**\n * Compare two lossless numbers.\n * Returns 1 when a is larger than b, 0 when they are equal,\n * and -1 when a is smaller than b.\n */\nexport function compareLosslessNumber(a: LosslessNumber, b: LosslessNumber): 1 | 0 | -1 {\n return compareNumber(a.value, b.value)\n}\n","import { LosslessNumber } from './LosslessNumber.js'\nimport { isInteger } from './utils.js'\n\nexport function parseLosslessNumber(value: string): LosslessNumber {\n return new LosslessNumber(value)\n}\n\nexport function parseNumberAndBigInt(value: string): number | bigint {\n return isInteger(value) ? BigInt(value) : Number.parseFloat(value)\n}\n","import { isLosslessNumber } from './LosslessNumber.js'\nimport type { GenericObject, Reviver } from './types'\n\n/**\n * Revive a json object.\n * Applies the reviver function recursively on all values in the JSON object.\n * @param json A JSON Object, Array, or value\n * @param reviver\n * A reviver function invoked with arguments `key` and `value`,\n * which must return a replacement value. The function context\n * (`this`) is the Object or Array that contains the currently\n * handled value.\n */\nexport function revive(json: unknown, reviver: Reviver): unknown {\n return reviveValue({ '': json }, '', json, reviver)\n}\n\n/**\n * Revive a value\n */\nfunction reviveValue(\n context: GenericObject<unknown> | Array<unknown>,\n key: string,\n value: unknown,\n reviver: Reviver\n): unknown {\n if (Array.isArray(value)) {\n return reviver.call(context, key, reviveArray(value, reviver))\n }\n\n if (value && typeof value === 'object' && !isLosslessNumber(value)) {\n // note the special case for LosslessNumber,\n // we don't want to iterate over the internals of a LosslessNumber\n return reviver.call(context, key, reviveObject(value as GenericObject<unknown>, reviver))\n }\n\n return reviver.call(context, key, value)\n}\n\n/**\n * Revive the properties of an object\n */\nfunction reviveObject(object: GenericObject<unknown>, reviver: Reviver) {\n for (const key of Object.keys(object)) {\n const value = reviveValue(object, key, object[key], reviver)\n if (value !== undefined) {\n object[key] = value\n } else {\n delete object[key]\n }\n }\n\n return object\n}\n\n/**\n * Revive the properties of an Array\n */\nfunction reviveArray(array: Array<unknown>, reviver: Reviver): Array<unknown> {\n for (let i = 0; i < array.length; i++) {\n array[i] = reviveValue(array, String(i), array[i], reviver)\n }\n\n return array\n}\n","import { parseLosslessNumber } from './numberParsers.js'\nimport { revive } from './revive.js'\nimport type { DuplicateKeyInfo, GenericObject, NumberParser, ParseOptions, Reviver } from './types'\n\n/**\n * The LosslessJSON.parse() method parses a string as JSON, optionally transforming\n * the value produced by parsing.\n *\n * The parser is based on the parser of Tan Li Hou shared in\n * https://lihautan.com/json-parser-with-javascript/\n *\n * @param text\n * The string to parse as JSON. See the JSON object for a description of JSON syntax.\n *\n * @param [reviver]\n * If a function, prescribes how the value originally produced by parsing is\n * transformed, before being returned.\n *\n * @param [options=ParseOptions | NumberParserArgument]\n * Pass a custom number parser. Input is a string, and the output can be unknown\n * numeric value: number, bigint, LosslessNumber, or a custom BigNumber library.\n *\n * @returns Returns the Object corresponding to the given JSON text.\n *\n * @throws Throws a SyntaxError exception if the string to parse is not valid JSON.\n */\nexport function parse(\n text: string,\n reviver?: Reviver | null,\n options?: ParseOptions | NumberParser\n): unknown {\n const optionsObj = typeof options === 'function' ? { parseNumber: options } : options\n const parseNumber = optionsObj?.parseNumber ?? parseLosslessNumber\n const onDuplicateKey = optionsObj?.onDuplicateKey ?? throwDuplicateKey\n\n let i = 0\n const value = parseValue()\n expectValue(value)\n expectEndOfInput()\n\n return reviver ? revive(value, reviver) : value\n\n function parseObject(): GenericObject<unknown> | undefined {\n if (text.charCodeAt(i) === codeOpeningBrace) {\n i++\n skipWhitespace()\n\n const object: GenericObject<unknown> = {}\n let initial = true\n while (i < text.length && text.charCodeAt(i) !== codeClosingBrace) {\n if (!initial) {\n eatComma()\n skipWhitespace()\n } else {\n initial = false\n }\n\n const start = i\n\n const key = parseString()\n if (key === undefined) {\n throwObjectKeyExpected()\n return // To make TS happy\n }\n\n skipWhitespace()\n eatColon()\n const value = parseValue()\n\n if (value === undefined) {\n throwObjectValueExpected()\n return // To make TS happy\n }\n\n // handle duplicate keys\n // biome-ignore lint/suspicious/noPrototypeBuiltins: TODO: replace with hasOwn one day, when browser support is high enough\n if (Object.prototype.hasOwnProperty.call(object, key) && !isDeepEqual(value, object[key])) {\n // Note that we could also test `if(key in object) {...}`\n // or `if (object[key] !== 'undefined') {...}`, but that is slower.\n const returnedValue = onDuplicateKey({\n key,\n position: start + 1,\n oldValue: object[key],\n newValue: value\n })\n\n if (returnedValue !== undefined) {\n object[key] = returnedValue\n }\n } else {\n object[key] = value\n }\n }\n\n if (text.charCodeAt(i) !== codeClosingBrace) {\n throwObjectKeyOrEndExpected()\n }\n i++\n\n return object\n }\n }\n\n function parseArray(): Array<unknown> | unknown {\n if (text.charCodeAt(i) === codeOpeningBracket) {\n i++\n skipWhitespace()\n\n const array = []\n let initial = true\n while (i < text.length && text.charCodeAt(i) !== codeClosingBracket) {\n if (!initial) {\n eatComma()\n } else {\n initial = false\n }\n\n const value = parseValue()\n expectArrayItem(value)\n array.push(value)\n }\n\n if (text.charCodeAt(i) !== codeClosingBracket) {\n throwArrayItemOrEndExpected()\n }\n i++\n\n return array\n }\n }\n\n function parseValue(): unknown {\n skipWhitespace()\n\n const value =\n parseString() ??\n parseNumeric() ??\n parseObject() ??\n parseArray() ??\n parseKeyword('true', true) ??\n parseKeyword('false', false) ??\n parseKeyword('null', null)\n\n skipWhitespace()\n\n return value\n }\n\n function parseKeyword(name: string, value: unknown): unknown | undefined {\n if (text.slice(i, i + name.length) === name) {\n i += name.length\n return value\n }\n }\n\n function skipWhitespace() {\n while (isWhitespace(text.charCodeAt(i))) {\n i++\n }\n }\n\n function parseString() {\n if (text.charCodeAt(i) === codeDoubleQuote) {\n i++\n let result = ''\n while (i < text.length && text.charCodeAt(i) !== codeDoubleQuote) {\n if (text.charCodeAt(i) === codeBackslash) {\n const char = text[i + 1]\n const escapeChar = escapeCharacters[char]\n if (escapeChar !== undefined) {\n result += escapeChar\n i++\n } else if (char === 'u') {\n if (\n isHex(text.charCodeAt(i + 2)) &&\n isHex(text.charCodeAt(i + 3)) &&\n isHex(text.charCodeAt(i + 4)) &&\n isHex(text.charCodeAt(i + 5))\n ) {\n result += String.fromCharCode(Number.parseInt(text.slice(i + 2, i + 6), 16))\n i += 5\n } else {\n throwInvalidUnicodeCharacter(i)\n }\n } else {\n throwInvalidEscapeCharacter(i)\n }\n } else {\n if (isValidStringCharacter(text.charCodeAt(i))) {\n result += text[i]\n } else {\n throwInvalidCharacter(text[i])\n }\n }\n i++\n }\n expectEndOfString()\n i++\n return result\n }\n }\n\n function parseNumeric() {\n const start = i\n if (text.charCodeAt(i) === codeMinus) {\n i++\n expectDigit(start)\n }\n\n if (text.charCodeAt(i) === codeZero) {\n i++\n } else if (isNonZeroDigit(text.charCodeAt(i))) {\n i++\n while (isDigit(text.charCodeAt(i))) {\n i++\n }\n }\n\n if (text.charCodeAt(i) === codeDot) {\n i++\n expectDigit(start)\n while (isDigit(text.charCodeAt(i))) {\n i++\n }\n }\n\n if (text.charCodeAt(i) === codeLowercaseE || text.charCodeAt(i) === codeUppercaseE) {\n i++\n if (text.charCodeAt(i) === codeMinus || text.charCodeAt(i) === codePlus) {\n i++\n }\n expectDigit(start)\n while (isDigit(text.charCodeAt(i))) {\n i++\n }\n }\n\n if (i > start) {\n return parseNumber(text.slice(start, i))\n }\n }\n\n function eatComma() {\n if (text.charCodeAt(i) !== codeComma) {\n throw new SyntaxError(`Comma ',' expected after value ${gotAt()}`)\n }\n i++\n }\n\n function eatColon() {\n if (text.charCodeAt(i) !== codeColon) {\n throw new SyntaxError(`Colon ':' expected after property name ${gotAt()}`)\n }\n i++\n }\n\n function expectValue(value: unknown) {\n if (value === undefined) {\n throw new SyntaxError(`JSON value expected ${gotAt()}`)\n }\n }\n\n function expectArrayItem(value: unknown) {\n if (value === undefined) {\n throw new SyntaxError(`Array item expected ${gotAt()}`)\n }\n }\n\n function expectEndOfInput() {\n if (i < text.length) {\n throw new SyntaxError(`Expected end of input ${gotAt()}`)\n }\n }\n\n function expectDigit(start: number) {\n if (!isDigit(text.charCodeAt(i))) {\n const numSoFar = text.slice(start, i)\n throw new SyntaxError(`Invalid number '${numSoFar}', expecting a digit ${gotAt()}`)\n }\n }\n\n function expectEndOfString() {\n if (text.charCodeAt(i) !== codeDoubleQuote) {\n throw new SyntaxError(`End of string '\"' expected ${gotAt()}`)\n }\n }\n\n function throwObjectKeyExpected() {\n throw new SyntaxError(`Quoted object key expected ${gotAt()}`)\n }\n\n function throwDuplicateKey({ key, position }: DuplicateKeyInfo) {\n throw new SyntaxError(`Duplicate key '${key}' encountered at position ${position}`)\n }\n\n function throwObjectKeyOrEndExpected() {\n throw new SyntaxError(`Quoted object key or end of object '}' expected ${gotAt()}`)\n }\n\n function throwArrayItemOrEndExpected() {\n throw new SyntaxError(`Array item or end of array ']' expected ${gotAt()}`)\n }\n\n function throwInvalidCharacter(char: string) {\n throw new SyntaxError(`Invalid character '${char}' ${pos()}`)\n }\n\n function throwInvalidEscapeCharacter(start: number) {\n const chars = text.slice(start, start + 2)\n throw new SyntaxError(`Invalid escape character '${chars}' ${pos()}`)\n }\n\n function throwObjectValueExpected() {\n throw new SyntaxError(`Object value expected after ':' ${pos()}`)\n }\n\n function throwInvalidUnicodeCharacter(start: number) {\n const chars = text.slice(start, start + 6)\n throw new SyntaxError(`Invalid unicode character '${chars}' ${pos()}`)\n }\n\n // zero based character position\n function pos(): string {\n return `at position ${i}`\n }\n\n function got(): string {\n return i < text.length ? `but got '${text[i]}'` : 'but reached end of input'\n }\n\n function gotAt(): string {\n return `${got()} ${pos()}`\n }\n}\n\nfunction isWhitespace(code: number): boolean {\n return code === codeSpace || code === codeNewline || code === codeTab || code === codeReturn\n}\n\nfunction isHex(code: number): boolean {\n return (\n (code >= codeZero && code <= codeNine) ||\n (code >= codeUppercaseA && code <= codeUppercaseF) ||\n (code >= codeLowercaseA && code <= codeLowercaseF)\n )\n}\n\nfunction isDigit(code: number): boolean {\n return code >= codeZero && code <= codeNine\n}\n\nfunction isNonZeroDigit(code: number): boolean {\n return code >= codeOne && code <= codeNine\n}\n\nexport function isValidStringCharacter(code: number): boolean {\n return code >= 0x20 && code <= 0x10ffff\n}\n\nexport function isDeepEqual(a: unknown, b: unknown): boolean {\n if (a === b) {\n return true\n }\n\n if (Array.isArray(a) && Array.isArray(b)) {\n return a.length === b.length && a.every((item, index) => isDeepEqual(item, b[index]))\n }\n\n if (isObject(a) && isObject(b)) {\n const keys = [...new Set([...Object.keys(a), ...Object.keys(b)])]\n return keys.every((key) => isDeepEqual(a[key], b[key]))\n }\n\n return false\n}\n\nfunction isObject(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null\n}\n\n// map with all escape characters\nconst escapeCharacters: GenericObject<string> = {\n '\"': '\"',\n '\\\\': '\\\\',\n '/': '/',\n b: '\\b',\n f: '\\f',\n n: '\\n',\n r: '\\r',\n t: '\\t'\n // note that \\u is handled separately in parseString()\n}\n\nconst codeBackslash = 0x5c // \"\\\"\nconst codeOpeningBrace = 0x7b // \"{\"\nconst codeClosingBrace = 0x7d // \"}\"\nconst codeOpeningBracket = 0x5b // \"[\"\nconst codeClosingBracket = 0x5d // \"]\"\nconst codeSpace = 0x20 // \" \"\nconst codeNewline = 0xa // \"\\n\"\nconst codeTab = 0x9 // \"\\t\"\nconst codeReturn = 0xd // \"\\r\"\nconst codeDoubleQuote = 0x0022 // \"\nconst codePlus = 0x2b // \"+\"\nconst codeMinus = 0x2d // \"-\"\nconst codeZero = 0x30\nconst codeOne = 0x31\nconst codeNine = 0x39\nconst codeComma = 0x2c // \",\"\nconst codeDot = 0x2e // \".\" (dot, period)\nconst codeColon = 0x3a // \":\"\nexport const codeUppercaseA = 0x41 // \"A\"\nexport const codeLowercaseA = 0x61 // \"a\"\nexport const codeUppercaseE = 0x45 // \"E\"\nexport const codeLowercaseE = 0x65 // \"e\"\nexport const codeUppercaseF = 0x46 // \"F\"\nexport const codeLowercaseF = 0x66 // \"f\"\n","import type { GenericObject, NumberStringifier, Replacer } from './types'\nimport { isNumber } from './utils.js'\n\n/**\n * The LosslessJSON.stringify() method converts a JavaScript value to a JSON string,\n * optionally replacing values if a replacer function is specified, or\n * optionally including only the specified properties if a replacer array is specified.\n *\n * @param value\n * The value to convert to a JSON string.\n *\n * @param [replacer]\n * A function that alters the behavior of the stringification process,\n * or an array of String and Number objects that serve as a whitelist for\n * selecting the properties of the value object to be included in the JSON string.\n * If this value is null or not provided, all properties of the object are\n * included in the resulting JSON string.\n *\n * @param [space]\n * A String or Number object that's used to insert white space into the output\n * JSON string for readability purposes. If this is a Number, it indicates the\n * number of space characters to use as white space; this number is capped at 10\n * if it's larger than that. Values less than 1 indicate that no space should be\n * used. If this is a String, the string (or the first 10 characters of the string,\n * if it's longer than that) is used as white space. If this parameter is not\n * provided (or is null), no white space is used.\n *\n * @param [numberStringifiers]\n * An optional list with additional number stringifiers, for example to serialize\n * a BigNumber. The output of the function must be valid stringified JSON.\n * When `undefined` is returned, the property will be deleted from the object.\n * The difference with using a `replacer` is that the output of a `replacer`\n * must be JSON and will be stringified afterwards, whereas the output of the\n * `numberStringifiers` is already stringified JSON.\n *\n * @returns Returns the string representation of the JSON object.\n */\nexport function stringify(\n value: unknown,\n replacer?: Replacer | null,\n space?: number | string,\n numberStringifiers?: NumberStringifier[]\n): string | undefined {\n const resolvedSpace = resolveSpace(space)\n\n const replacedValue =\n typeof replacer === 'function' ? replacer.call({ '': value }, '', value) : value\n\n return stringifyValue(replacedValue, '')\n\n /**\n * Stringify a value\n */\n function stringifyValue(value: unknown, indent: string | undefined): string | undefined {\n if (Array.isArray(numberStringifiers)) {\n const stringifier = numberStringifiers.find((item) => item.test(value))\n if (stringifier) {\n const str: unknown = stringifier.stringify(value)\n if (typeof str !== 'string' || !isNumber(str)) {\n throw new Error(\n `Invalid JSON number: output of a number stringifier must be a string containing a JSON number (output: ${str})`\n )\n }\n return str\n }\n }\n\n // boolean, null, number, string, or date\n if (\n typeof value === 'boolean' ||\n typeof value === 'number' ||\n typeof value === 'string' ||\n value === null ||\n value instanceof Date ||\n value instanceof Boolean ||\n value instanceof Number ||\n value instanceof String\n ) {\n return JSON.stringify(value)\n }\n\n // lossless number, the secret ingredient :)\n // @ts-expect-error\n if (value?.isLosslessNumber) {\n return value.toString()\n }\n\n // BigInt\n if (typeof value === 'bigint') {\n return value.toString()\n }\n\n // Array\n if (Array.isArray(value)) {\n return stringifyArray(value, indent)\n }\n\n // Object (test lastly!)\n if (value && typeof value === 'object') {\n return stringifyObject(value as GenericObject<unknown>, indent)\n }\n\n return undefined\n }\n\n /**\n * Stringify an array\n */\n function stringifyArray(array: Array<unknown>, indent: string | undefined): string {\n if (array.length === 0) {\n return '[]'\n }\n\n const childIndent = resolvedSpace ? indent + resolvedSpace : undefined\n let str = resolvedSpace ? '[\\n' : '['\n\n for (let i = 0; i < array.length; i++) {\n const item =\n typeof replacer === 'function' ? replacer.call(array, String(i), array[i]) : array[i]\n\n if (resolvedSpace) {\n str += childIndent\n }\n\n if (typeof item !== 'undefined' && typeof item !== 'function') {\n str += stringifyValue(item, childIndent)\n } else {\n str += 'null'\n }\n\n if (i < array.length - 1) {\n str += resolvedSpace ? ',\\n' : ','\n }\n }\n\n str += resolvedSpace ? `\\n${indent}]` : ']'\n return str\n }\n\n /**\n * Stringify an object\n */\n function stringifyObject(\n object: GenericObject<unknown>,\n indent: string | undefined\n ): string | undefined {\n if (typeof object.toJSON === 'function') {\n return stringify(object.toJSON(), replacer, space, undefined)\n }\n\n const keys: string[] = Array.isArray(replacer) ? replacer.map(String) : Object.keys(object)\n\n if (keys.length === 0) {\n return '{}'\n }\n\n const childIndent = resolvedSpace ? indent + resolvedSpace : undefined\n let first = true\n let str = resolvedSpace ? '{\\n' : '{'\n\n for (const key of keys) {\n const value =\n typeof replacer === 'function' ? replacer.call(object, key, object[key]) : object[key]\n\n if (includeProperty(key, value)) {\n if (first) {\n first = false\n } else {\n str += resolvedSpace ? ',\\n' : ','\n }\n\n const keyStr = JSON.stringify(key)\n str += resolvedSpace ? `${childIndent + keyStr}: ` : `${keyStr}:`\n\n str += stringifyValue(value, childIndent)\n }\n }\n\n str += resolvedSpace ? `\\n${indent}}` : '}'\n return str\n }\n\n /**\n * Test whether to include a property in a stringified object or not.\n */\n function includeProperty(_key: string, value: unknown): boolean {\n return typeof value !== 'undefined' && typeof value !== 'function' && typeof value !== 'symbol'\n }\n}\n\n/**\n * Resolve a JSON stringify space:\n * replace a number with a string containing that number of spaces\n */\nfunction resolveSpace(space: number | string | undefined): string | undefined {\n if (typeof space === 'number') {\n return ' '.repeat(space)\n }\n\n if (typeof space === 'string' && space !== '') {\n return space\n }\n\n return undefined\n}\n","import { parse as losslessParse } from \"lossless-json\";\n\n/**\n * A JSON object that names the same key twice is refused — even when both values are equal. A\n * password-manager export with a repeated key is malformed or tampered with, and which copy wins\n * differs between readers. `lossless-json` only refuses a repeat with a DIFFERENT value (the web\n * app patched that in its own install; a patch cannot travel with this package), so every parse in\n * `io/` checks keys here first.\n */\nexport function assertNoDuplicateKeys(text: string): void {\n const stack: { keys: Set<string> | null; expectKey: boolean }[] = [];\n let i = 0;\n while (i < text.length) {\n const ch = text[i];\n if (ch === '\"') {\n const start = i;\n i++;\n while (i < text.length && text[i] !== '\"') i += text[i] === \"\\\\\" ? 2 : 1;\n const top = stack[stack.length - 1];\n if (top?.keys && top.expectKey) {\n const key = JSON.parse(text.slice(start, i + 1)) as string;\n if (top.keys.has(key)) throw new SyntaxError(`Duplicate key '${key}' encountered at position ${start + 1}`);\n top.keys.add(key);\n top.expectKey = false;\n }\n } else if (ch === \"{\") stack.push({ keys: new Set(), expectKey: true });\n else if (ch === \"[\") stack.push({ keys: null, expectKey: false });\n else if (ch === \"}\" || ch === \"]\") stack.pop();\n else if (ch === \",\") {\n const top = stack[stack.length - 1];\n if (top?.keys) top.expectKey = true;\n }\n i++;\n }\n}\n\n/** `lossless-json` `parse`, after the duplicate-key check. Every parse in `io/` uses this one. */\nexport const parse: typeof losslessParse = (text, ...rest) => {\n assertNoDuplicateKeys(text);\n return losslessParse(text, ...rest);\n};\n","/** Local-only CSV normalization for Vault's first password-manager import. */\nimport type { VaultItemCreateRequest } from \"@ai-matrx/api/account\";\nimport { parseDelimited } from \"@ai-matrx/kit/delimited\";\n\nimport { isLoopbackUrl } from \"./loopback\";\n\nexport type CsvImportLimits = {\n maxFileBytes: number;\n maxRecords: number;\n maxColumns: number;\n maxCellBytes: number;\n maxFields: number;\n maxPlaintextFieldBytes: number;\n maxRequestBodyBytes: number;\n maxJsonDepth?: number;\n jsonWorkerTimeoutMs?: number;\n};\nexport type CsvColumnRole =\n \"title\" | \"username\" | \"password\" | \"url\" | \"notes\" | \"otp\" | \"keep\";\nexport type CsvImportRow = {\n rowNumber: number;\n cells: string[];\n issue?: \"invalid\" | \"unsupported\" | undefined;\n};\nexport type CsvImportPreview = {\n headers: string[];\n rows: CsvImportRow[];\n issues: number;\n};\nexport type CsvImportCommand = {\n rowId: string;\n body: VaultItemCreateRequest;\n hasOtp: boolean;\n};\nexport type CsvImportPreparation =\n | { status: \"ready\"; command: CsvImportCommand }\n | {\n status: \"skipped\";\n reason:\n | \"invalid\"\n | \"unsupported\"\n | \"deleted\"\n | \"archived\"\n | \"possible_duplicate\";\n }\n | { status: \"invalid\"; diagnostic: string };\nexport type CsvImportOutcome = {\n imported: number;\n skipped: number;\n failed: number;\n cancelled: boolean;\n definitive: boolean;\n /** The first command that was not confirmed. Reuse it on a same-session retry. */\n progressCursor: number;\n};\n\nexport type CsvImportDispatch = \"committed\" | \"retryable\" | \"definitive\";\n\n/** The request's owner: an organization's vault, or the person's own. */\nexport function principalOf(organizationId: string | null): NonNullable<VaultItemCreateRequest[\"principal\"]> {\n return organizationId ? { type: \"organization\", organization_id: organizationId } : { type: \"user\" };\n}\n\nfunction utf8ByteLength(value: string): number {\n if (typeof TextEncoder !== \"undefined\")\n return new TextEncoder().encode(value).byteLength;\n return unescape(encodeURIComponent(value)).length;\n}\n\nfunction csvParserInput(text: string): string {\n // The parser emits an extra empty record for the final record terminator. Remove\n // exactly that terminator; interior/explicit blank rows retain their numbers.\n return text.replace(/^\\uFEFF/, \"\").replace(/(?:\\r\\n|\\r|\\n)$/, \"\");\n}\n\nexport function parseCsvText(\n text: string,\n limits: CsvImportLimits,\n): CsvImportPreview {\n if (utf8ByteLength(text) > limits.maxFileBytes)\n throw new Error(\"The file exceeds this organization’s import size limit.\");\n const parsed = parseDelimited(csvParserInput(text), {\n delimiter: \",\",\n skipEmptyLines: false,\n });\n if (\n parsed.errors.some(\n (error) =>\n error.code !== \"TooFewFields\" && error.code !== \"TooManyFields\",\n )\n )\n throw new Error(\"The CSV could not be read. Fix the file and try again.\");\n return validateParsedCsv(parsed.data, limits);\n}\n\nfunction validateParsedCsv(\n parsed: string[][],\n limits: CsvImportLimits,\n): CsvImportPreview {\n const [headers, ...data] = parsed;\n if (!headers?.length || headers.length > limits.maxColumns)\n throw new Error(\"The CSV has an unsupported number of columns.\");\n if (data.length > limits.maxRecords)\n throw new Error(\"The CSV has more records than this organization allows.\");\n const nonLoginTypeColumn = headers.findIndex((header) =>\n /^(item )?(type|kind|category)$/i.test(header.trim()),\n );\n const unsupportedValueColumns = headers\n .map((header, index) =>\n /(?:^|[\\s_-])(passkey|webauthn|fido|attachment|file)(?:$|[\\s_-])/i.test(\n header.trim(),\n )\n ? index\n : -1,\n )\n .filter((index) => index >= 0);\n let issues = 0;\n const rows = data.map((cells, index) => {\n const invalid =\n cells.length !== headers.length ||\n cells.some((cell) => utf8ByteLength(cell) > limits.maxCellBytes) ||\n cells.every((cell) => cell.trim().length === 0);\n const type =\n nonLoginTypeColumn >= 0\n ? (cells[nonLoginTypeColumn] ?? \"\").trim().toLowerCase()\n : \"\";\n const unsupported =\n !invalid &&\n (unsupportedValueColumns.some((column) =>\n Boolean(cells[column]?.trim()),\n ) ||\n (Boolean(type) &&\n !/^(login|website|web|password|credential)$/.test(type)));\n if (invalid || unsupported) issues += 1;\n return {\n rowNumber: index + 2,\n cells,\n issue: invalid\n ? (\"invalid\" as const)\n : unsupported\n ? (\"unsupported\" as const)\n : undefined,\n };\n });\n return { headers, rows, issues };\n}\n\nexport function safeDestination(raw: string): {\n metadata: string | null;\n host: string | null;\n} {\n try {\n const parsed = new URL(raw);\n if (!/^https?:$/.test(parsed.protocol))\n return { metadata: null, host: null };\n if (parsed.username || parsed.password)\n return { metadata: null, host: null };\n return { metadata: parsed.origin, host: parsed.host };\n } catch {\n return { metadata: null, host: null };\n }\n}\n\nexport function suggestedCsvMapping(\n headers: string[],\n source?: string,\n): CsvColumnRole[] {\n const aliases: Record<CsvColumnRole, ReadonlySet<string>> = {\n title: new Set([\"name\", \"title\", \"label\"]),\n username: new Set([\n \"username\",\n \"user\",\n \"login\",\n \"email\",\n \"loginusername\",\n \"loginemail\",\n ]),\n password: new Set([\"password\", \"pass\", \"pwd\", \"loginpassword\"]),\n url: new Set([\n \"url\",\n \"uri\",\n \"website\",\n \"websiteaddress\",\n \"loginurl\",\n \"loginuri\",\n ]),\n notes: new Set([\"note\", \"notes\", \"extra\"]),\n otp: new Set([\"otp\", \"totp\", \"otpauth\", \"onetimepassword\", \"onetimecode\"]),\n keep: new Set(),\n };\n let usernameAssigned = false;\n return headers.map((header) => {\n const key = header.trim().toLowerCase().replace(/[ _-]/g, \"\");\n if (source === \"nordpass\" && key === \"email\" && usernameAssigned)\n return \"keep\";\n const role =\n (Object.entries(aliases) as [CsvColumnRole, ReadonlySet<string>][]).find(\n ([, values]) => values.has(key),\n )?.[0] ?? \"keep\";\n if (role === \"username\") usernameAssigned = true;\n return role;\n });\n}\n\nfunction fieldKey(index: number, used: Set<string>): string {\n const base = `import_column_${index + 1}`;\n let key = base;\n let suffix = 2;\n while (used.has(key)) key = `${base}_${suffix++}`;\n used.add(key);\n return key;\n}\n\nfunction roleValue(\n row: CsvImportRow,\n mapping: CsvColumnRole[],\n role: CsvColumnRole,\n): string | null {\n const index = mapping.findIndex((entry) => entry === role);\n return index < 0 ? null : (row.cells[index] ?? \"\");\n}\n\nexport function hasAmbiguousCsvMapping(mapping: CsvColumnRole[]): boolean {\n return ([\"title\", \"username\", \"password\", \"notes\", \"otp\"] as const).some(\n (role) => mapping.filter((entry) => entry === role).length > 1,\n );\n}\n\nexport function isPossibleDuplicateRow(\n row: CsvImportRow,\n _preview: CsvImportPreview,\n mapping: CsvColumnRole[],\n existingItems: { displayName: string; loginUrls: string[] }[],\n): boolean {\n if (row.issue) return false;\n const title =\n roleValue(row, mapping, \"title\") || `Imported credential ${row.rowNumber}`;\n const urls = row.cells\n .filter((_, index) => mapping[index] === \"url\")\n .map(safeDestination)\n .flatMap((destination) =>\n destination.metadata ? [destination.metadata] : [],\n );\n return existingItems.some((item) => {\n if (item.displayName !== title) return false;\n const existingOrigins = item.loginUrls\n .map(safeDestination)\n .flatMap((destination) =>\n destination.metadata ? [destination.metadata] : [],\n );\n return urls.length > 0\n ? existingOrigins.some((origin) => urls.includes(origin))\n : existingOrigins.length === 0;\n });\n}\n\nexport function prepareCsvImportRow(input: {\n source: string;\n preview: CsvImportPreview;\n row: CsvImportRow;\n mapping: CsvColumnRole[];\n /** null = the person's own vault. */\n organizationId: string | null;\n rowId: string;\n limits: CsvImportLimits;\n browserFillEnabled?: boolean;\n existingItems?: { displayName: string; loginUrls: string[] }[];\n skipPossibleDuplicate?: boolean;\n}): CsvImportPreparation {\n if (input.row.issue === \"invalid\")\n return { status: \"skipped\", reason: \"invalid\" };\n if (input.row.issue === \"unsupported\")\n return { status: \"skipped\", reason: \"unsupported\" };\n if (\n input.skipPossibleDuplicate &&\n isPossibleDuplicateRow(\n input.row,\n input.preview,\n input.mapping,\n input.existingItems ?? [],\n )\n )\n return { status: \"skipped\", reason: \"possible_duplicate\" };\n const { headers } = input.preview;\n const { row, mapping } = input;\n const title =\n roleValue(row, mapping, \"title\") || `Imported credential ${row.rowNumber}`;\n const rawUrls = row.cells\n .filter((_, index) => mapping[index] === \"url\")\n .filter(Boolean);\n const urls = rawUrls\n .map(safeDestination)\n .flatMap((url) => (url.metadata ? [url.metadata] : []));\n const fields: NonNullable<VaultItemCreateRequest[\"fields\"]> = [];\n const used = new Set<string>();\n const add = (field_key: string, value: string, editable = true) => {\n if (!value) return;\n used.add(field_key);\n fields.push({\n field_key,\n value,\n handling: \"revealable\",\n editable,\n inject_into_sandbox: false,\n });\n };\n add(\"username\", roleValue(row, mapping, \"username\") ?? \"\");\n add(\"password\", roleValue(row, mapping, \"password\") ?? \"\");\n add(\"import_notes\", roleValue(row, mapping, \"notes\") ?? \"\");\n for (let index = 0; index < row.cells.length; index += 1) {\n if (mapping[index] === \"keep\")\n add(fieldKey(index, used), row.cells[index] ?? \"\");\n }\n // OTP stays only in the encrypted, revealable source representation until explicit enrollment.\n add(\n \"import_source_record\",\n JSON.stringify({\n source_vendor: input.source,\n format: \"csv\",\n cells: row.cells.map((value: string, column_index: number) => ({\n column_index,\n header: headers[column_index] ?? \"\",\n value,\n })),\n }),\n false,\n );\n if (\n fields.length > input.limits.maxFields ||\n fields.some(\n (field) =>\n utf8ByteLength(field.value) > input.limits.maxPlaintextFieldBytes,\n )\n )\n return {\n status: \"invalid\",\n diagnostic: `Row ${row.rowNumber} exceeds this organization’s encrypted field limit.`,\n };\n const command: CsvImportCommand = {\n rowId: input.rowId,\n hasOtp: Boolean(roleValue(row, mapping, \"otp\")),\n body: {\n principal: principalOf(input.organizationId),\n display_name: title,\n definition_key: \"website_login\",\n source: \"system_import\",\n login_urls: urls,\n uri_match_mode: \"never\",\n browser_fill_enabled:\n Boolean(input.browserFillEnabled) &&\n Boolean(roleValue(row, mapping, \"username\")) &&\n Boolean(roleValue(row, mapping, \"password\")) &&\n urls.length > 0 &&\n urls.every(\n (url) => new URL(url).protocol === \"https:\" || isLoopbackUrl(url),\n ),\n fields,\n },\n };\n // The browser matcher treats `never` as an absolute refusal. Keep this pair\n // coherent with the explicit, eligible bulk opt-in rather than advertising a\n // fill capability the canonical matcher will always reject.\n if (command.body.browser_fill_enabled) command.body.uri_match_mode = \"host\";\n if (\n utf8ByteLength(JSON.stringify(command.body)) >\n input.limits.maxRequestBodyBytes\n )\n return {\n status: \"invalid\",\n diagnostic: `Row ${row.rowNumber} exceeds this organization’s request size limit.`,\n };\n return { status: \"ready\", command };\n}\n\n/** Compatibility helper for callers that only need a command after preparation. */\nexport function toCsvImportCommand(\n input: Parameters<typeof prepareCsvImportRow>[0],\n): CsvImportCommand | null {\n const prepared = prepareCsvImportRow(input);\n return prepared.status === \"ready\" ? prepared.command : null;\n}\n\n/** Dispatch only one immutable command at a time; cancellation never rolls back a committed row. */\nexport async function runCsvImportCommands(\n commands: Array<CsvImportCommand | null>,\n dispatch: (command: CsvImportCommand) => Promise<CsvImportDispatch>,\n cancelled: () => boolean,\n progressCursor = 0,\n): Promise<CsvImportOutcome> {\n let imported = 0;\n let skipped = 0;\n let failed = 0;\n for (let index = progressCursor; index < commands.length; index += 1) {\n const command = commands[index];\n if (cancelled())\n return {\n imported,\n skipped,\n failed,\n cancelled: true,\n definitive: false,\n progressCursor: index,\n };\n if (!command) {\n skipped += 1;\n continue;\n }\n const result = await dispatch(command);\n if (result === \"committed\") {\n imported += 1;\n continue;\n }\n failed += 1;\n // A retryable or definitive outcome retains this exact command/UUID for review.\n return {\n imported,\n skipped,\n failed,\n cancelled: result === \"definitive\" || cancelled(),\n definitive: result === \"definitive\",\n progressCursor: index,\n };\n }\n return {\n imported,\n skipped,\n failed,\n cancelled: cancelled(),\n definitive: false,\n progressCursor: commands.length,\n };\n}\n","/** Bitwarden's plain JSON export adapter. Parsing is only invoked by its worker. */\nimport { LosslessNumber, stringify } from \"lossless-json\";\nimport { parse } from \"./strict-json\";\n\nimport { safeDestination, type CsvImportLimits } from \"./csv-import\";\nimport type { StructuredImportRecord } from \"./structured-import\";\nimport { isRfc4122Uuid } from \"@ai-matrx/kit/uuid\";\n\ntype JsonObject = Record<string, unknown>;\nconst rootKeys = new Set([\"encrypted\", \"folders\", \"items\"]);\nconst folderKeys = new Set([\"id\", \"name\"]);\nconst itemKeys = new Set([\"id\", \"name\", \"type\", \"folderId\", \"organizationId\", \"collectionIds\", \"notes\", \"login\", \"secureNote\", \"card\", \"identity\", \"sshKey\", \"favorite\", \"reprompt\", \"fields\", \"passwordHistory\", \"revisionDate\", \"creationDate\", \"deletedDate\", \"attachments\"]);\nconst loginKeys = new Set([\"username\", \"password\", \"totp\", \"uris\", \"fido2Credentials\"]);\nconst uriKeys = new Set([\"uri\", \"match\"]);\nconst sshKeys = new Set([\"privateKey\", \"publicKey\", \"keyFingerprint\"]);\nconst fieldKeys = new Set([\"name\", \"value\", \"type\", \"linkedId\"]);\nconst noteKeys = new Set([\"type\"]);\nconst cardKeys = new Set([\"cardholderName\", \"expMonth\", \"expYear\", \"code\", \"brand\", \"number\"]);\nconst identityKeys = new Set([\"title\", \"firstName\", \"middleName\", \"lastName\", \"address1\", \"address2\", \"address3\", \"city\", \"state\", \"postalCode\", \"country\", \"company\", \"email\", \"phone\", \"ssn\", \"username\", \"passportNumber\", \"licenseNumber\"]);\n\nfunction object(value: unknown): JsonObject | null {\n return value !== null && typeof value === \"object\" && !Array.isArray(value) ? value as JsonObject : null;\n}\nfunction bytes(value: string): number {\n return typeof TextEncoder !== \"undefined\" ? new TextEncoder().encode(value).byteLength : unescape(encodeURIComponent(value)).length;\n}\nfunction only(value: JsonObject, allowed: Set<string>): boolean { return Object.keys(value).every((key) => allowed.has(key)); }\nfunction stringOrNull(value: unknown): value is string | null { return value === null || typeof value === \"string\"; }\nfunction exactInt(value: unknown, min: number, max: number): boolean {\n const text = value instanceof LosslessNumber ? value.value : \"\";\n return /^(0|[1-9][0-9]*)$/.test(text) && Number(text) >= min && Number(text) <= max;\n}\nfunction timestamp(value: unknown): boolean { return typeof value === \"string\" && /^\\d{4}-\\d\\d-\\d\\dT\\d\\d:\\d\\d:\\d\\d(?:\\.\\d+)?(?:Z|[+-]\\d\\d:\\d\\d)$/.test(value); }\nexport function jsonDepthOk(value: unknown, maxDepth: number): boolean {\n const stack: Array<[unknown, number]> = [[value, 1]];\n while (stack.length) {\n const [node, depth] = stack.pop()!;\n if (depth > maxDepth) return false;\n const record = object(node);\n const children: unknown[] = Array.isArray(node)\n ? node\n : record\n ? Object.values(record)\n : [];\n for (const child of children) stack.push([child, depth + 1]);\n }\n return true;\n}\nfunction allStringsWithin(value: unknown, maxBytes: number): boolean {\n if (typeof value === \"string\") return bytes(value) <= maxBytes;\n if (Array.isArray(value)) return value.every((entry) => allStringsWithin(entry, maxBytes));\n const record = object(value);\n return !record || Object.values(record).every((entry) => allStringsWithin(entry, maxBytes));\n}\nfunction invalid(title: string, ordinal: number, reason: string): StructuredImportRecord { return { ordinal, title, status: \"invalid\", reason }; }\nfunction unsupported(title: string, ordinal: number, reason: string): StructuredImportRecord { return { ordinal, title, status: \"unsupported\", reason }; }\n\nfunction itemRecord(item: JsonObject, ordinal: number, maxCellBytes: number, maxJsonDepth: number, folders: JsonObject[]): StructuredImportRecord {\n const candidateTitle = typeof item.name === \"string\" ? item.name : `Item ${ordinal + 1}`;\n const title = bytes(candidateTitle) <= maxCellBytes ? candidateTitle : `Item ${ordinal + 1}`;\n if (!only(item, itemKeys)) return unsupported(title, ordinal, \"The item has an unsupported field.\");\n if (!isRfc4122Uuid(item.id) || typeof item.name !== \"string\" || !exactInt(item.type, 1, 5)) return exactInt(item.type, 0, Number.MAX_SAFE_INTEGER) ? unsupported(title, ordinal, \"The item type is unsupported.\") : invalid(title, ordinal, \"The item shape is not supported.\");\n if (![\"folderId\", \"organizationId\", \"notes\"].every((key) => item[key] === undefined || stringOrNull(item[key])) || [\"revisionDate\", \"creationDate\", \"deletedDate\"].some((key) => item[key] !== undefined && item[key] !== null && !timestamp(item[key])) || (item.folderId != null && !isRfc4122Uuid(item.folderId)) || (item.organizationId != null && !isRfc4122Uuid(item.organizationId)) || (item.collectionIds != null && (!Array.isArray(item.collectionIds) || !item.collectionIds.every(isRfc4122Uuid))) || (item.favorite != null && typeof item.favorite !== \"boolean\") || (item.reprompt != null && !exactInt(item.reprompt, 0, 1))) return invalid(title, ordinal, \"The item metadata is invalid.\");\n if (item.fields != null && (!Array.isArray(item.fields) || !item.fields.every((field) => { const row = object(field); return !!row && only(row, fieldKeys) && exactInt(row.type, 0, 3) && (row.name === undefined || stringOrNull(row.name)) && (row.value === undefined || stringOrNull(row.value)) && (row.linkedId === undefined || row.linkedId === null || exactInt(row.linkedId, 0, 4294967295)); }))) return invalid(title, ordinal, \"The custom fields are invalid.\");\n if (item.passwordHistory != null && (!Array.isArray(item.passwordHistory) || !item.passwordHistory.every((entry) => { const row = object(entry); return !!row && Object.keys(row).length === 2 && typeof row.password === \"string\" && timestamp(row.lastUsedDate); }))) return invalid(title, ordinal, \"The password history is invalid.\");\n if (item.attachments !== undefined && item.attachments !== null && !Array.isArray(item.attachments)) return invalid(title, ordinal, \"The attachment fields are invalid.\");\n if (!jsonDepthOk(item, maxJsonDepth) || !allStringsWithin(item, maxCellBytes)) return invalid(title, ordinal, \"The item exceeds the import limits.\");\n const type = Number((item.type as LosslessNumber).value);\n const matching = type === 1 ? \"login\" : type === 2 ? \"secureNote\" : type === 3 ? \"card\" : type === 4 ? \"identity\" : \"sshKey\";\n for (const component of [\"login\", \"secureNote\", \"card\", \"identity\", \"sshKey\"] as const) if (component !== matching && item[component] != null) return unsupported(title, ordinal, \"The item has an unclassified component.\");\n if (Array.isArray(item.attachments) && item.attachments.length) return unsupported(title, ordinal, \"Attachments require a later import path.\");\n const sourceRecord = (stringify({ source_vendor: \"bitwarden\", format: \"bitwarden-json-export-v1\", item, folders: typeof item.folderId === \"string\" ? folders.filter((folder) => folder.id === item.folderId) : [] }) ?? \"\");\n if (type === 1) {\n const login = object(item.login); if (!login) return invalid(title, ordinal, \"The login fields are invalid.\"); if (!only(login, loginKeys)) return unsupported(title, ordinal, \"The login has an unsupported field.\"); if (![\"username\", \"password\", \"totp\"].every((key) => login[key] === undefined || stringOrNull(login[key])) || (login.uris !== undefined && !Array.isArray(login.uris)) || (login.fido2Credentials !== undefined && !Array.isArray(login.fido2Credentials))) return invalid(title, ordinal, \"The login fields are invalid.\");\n if (Array.isArray(login.fido2Credentials) && login.fido2Credentials.length) return unsupported(title, ordinal, \"Passkeys require a later import path.\");\n const rawUrls: string[] = [];\n for (const uri of login.uris ?? []) { const row = object(uri); if (!row || !only(row, uriKeys)) return unsupported(title, ordinal, \"The login has an unsupported URL field.\"); if ((row.uri !== undefined && !stringOrNull(row.uri)) || (row.match !== undefined && row.match !== null && !exactInt(row.match, 0, 5))) return invalid(title, ordinal, \"The login URL fields are invalid.\"); if (typeof row.uri === \"string\") rawUrls.push(row.uri); }\n return { ordinal, title, kind: \"website_login\", status: \"supported\", sourceState: item.deletedDate ? \"deleted\" : \"active\", sourceRecord, urls: rawUrls.map(safeDestination).flatMap((x) => x.metadata ? [x.metadata] : []), username: typeof login.username === \"string\" ? login.username : null, password: typeof login.password === \"string\" ? login.password : null, hasOtp: typeof login.totp === \"string\" && login.totp.length > 0 };\n }\n if (type === 5) { const key = object(item.sshKey); if (!key || !only(key, sshKeys) || typeof key.privateKey !== \"string\" || !key.privateKey || typeof key.publicKey !== \"string\" || typeof key.keyFingerprint !== \"string\") return invalid(title, ordinal, \"The SSH key fields are invalid.\"); return { ordinal, title, kind: \"ssh_key\", status: \"supported\", sourceState: item.deletedDate ? \"deleted\" : \"active\", sourceRecord, hasOtp: false, privateKey: key.privateKey, publicKey: key.publicKey }; }\n const component = object(item[matching]); const allowed = type === 2 ? noteKeys : type === 3 ? cardKeys : identityKeys;\n if (!component) return invalid(title, ordinal, \"The item fields are invalid.\"); if (!only(component, allowed)) return unsupported(title, ordinal, \"The item has an unsupported field.\");\n if (type === 2 && !exactInt(component.type, 0, 0)) return invalid(title, ordinal, \"The secure note type is invalid.\");\n if (Object.entries(component).some(([key, value]) => key !== \"type\" && !stringOrNull(value))) return invalid(title, ordinal, \"The item fields are invalid.\");\n return { ordinal, title, kind: \"custom\", status: \"supported\", sourceState: item.deletedDate ? \"deleted\" : \"active\", sourceRecord, hasOtp: false };\n}\n\nexport function parseBitwardenExport(text: string, limits: Pick<CsvImportLimits, \"maxFileBytes\" | \"maxRecords\" | \"maxCellBytes\"> & { maxJsonDepth: number }): StructuredImportRecord[] {\n if (bytes(text) > limits.maxFileBytes) throw new Error(\"The file exceeds this organization’s import size limit.\");\n // Our pinned lossless-json patch rejects every duplicate key, including equal values; keep its details out of UI.\n let root: JsonObject; try { root = object(parse(text)) ?? {}; } catch { throw new Error(\"The JSON export has duplicate keys or could not be read safely.\"); }\n if (!jsonDepthOk(root, limits.maxJsonDepth) || !only(root, rootKeys) || root.encrypted !== false || !Array.isArray(root.folders) || !Array.isArray(root.items)) throw new Error(root.encrypted === true ? \"Encrypted Bitwarden exports need local decryption support before they can be imported.\" : \"This is not a supported plain Bitwarden JSON export.\");\n if (root.items.length > limits.maxRecords) throw new Error(\"The export has more records than this organization allows.\");\n if (!root.folders.every((folder) => { const row = object(folder); return !!row && only(row, folderKeys) && isRfc4122Uuid(row.id) && typeof row.name === \"string\" && allStringsWithin(row, limits.maxCellBytes); })) throw new Error(\"The export folders are not supported.\");\n return root.items.map((item, ordinal) => object(item) ? itemRecord(item, ordinal, limits.maxCellBytes, limits.maxJsonDepth, root.folders as JsonObject[]) : invalid(`Item ${ordinal + 1}`, ordinal, \"The item is invalid.\"));\n}\n","import { LosslessNumber, stringify } from \"lossless-json\";\nimport { parse } from \"./strict-json\";\n\nimport { safeDestination, type CsvImportLimits } from \"./csv-import\";\nimport { jsonDepthOk } from \"./bitwarden-json\";\nimport type { StructuredImportRecord } from \"./structured-import\";\n\ntype ObjectValue = Record<string, unknown>;\nconst object = (value: unknown): ObjectValue | null => value !== null && typeof value === \"object\" && !Array.isArray(value) ? value as ObjectValue : null;\nconst only = (value: ObjectValue, keys: readonly string[]) => Object.keys(value).every((key) => keys.includes(key));\nconst bytes = (value: string) => typeof TextEncoder !== \"undefined\" ? new TextEncoder().encode(value).byteLength : unescape(encodeURIComponent(value)).length;\nfunction numericLexeme(value: unknown): { negative: boolean; integral: boolean; isThree: boolean } | null {\n if (!(value instanceof LosslessNumber)) return null;\n const match = value.value.match(/^(-?)(\\d+)(?:\\.(\\d*))?(?:[eE]([+-]?\\d+))?$/); if (!match) return null;\n const negative = match[1] === \"-\" && !/^0*(?:\\.0*)?$/.test(value.value.slice(1).replace(/[eE].*$/, \"\"));\n const digits = `${match[2]}${match[3] ?? \"\"}`.replace(/^0+/, \"\") || \"0\"; const exponent = BigInt(match[4] ?? \"0\") - BigInt((match[3] ?? \"\").length);\n const zero = BigInt(0); const trailing = BigInt(digits.match(/0*$/)?.[0].length ?? 0);\n const integral = digits === \"0\" || exponent >= zero || -exponent <= trailing;\n const normalized = digits.replace(/0+$/, \"\") || \"0\";\n return { negative, integral, isThree: !negative && normalized === \"3\" && exponent + trailing === zero };\n}\nconst integer = (value: unknown) => { const parsed = numericLexeme(value); return !!parsed && !parsed.negative && parsed.integral; };\nconst nonnegativeNumber = (value: unknown) => { const parsed = numericLexeme(value); return !!parsed && !parsed.negative; };\nconst strings = (value: unknown): value is string[] => Array.isArray(value) && value.every((entry) => typeof entry === \"string\");\nconst textBytes = (value: string) => typeof TextEncoder === \"undefined\" ? unescape(encodeURIComponent(value)).length : new TextEncoder().encode(value).byteLength;\nfunction stringsWithin(value: unknown, max: number): boolean { if (typeof value === \"string\") return textBytes(value) <= max; if (Array.isArray(value)) return value.every((entry) => stringsWithin(entry, max)); const row = object(value); return !row || Object.values(row).every((entry) => stringsWithin(entry, max)); }\nconst rejected = (status: \"invalid\" | \"unsupported\", ordinal: number, title: string, reason: string): StructuredImportRecord => ({ status, ordinal, title, reason });\nfunction sectionsValid(value: unknown): \"valid\" | \"invalid\" | \"unsupported\" {\n if (value === undefined || value === null) return \"valid\";\n if (!Array.isArray(value)) return \"invalid\";\n for (const entry of value) {\n const section = object(entry);\n if (!section || !only(section, [\"title\", \"name\", \"fields\", \"hideAddAnotherField\"]) || typeof section.title !== \"string\" || (section.name !== undefined && section.name !== null && typeof section.name !== \"string\") || (section.hideAddAnotherField !== undefined && typeof section.hideAddAnotherField !== \"boolean\") || !Array.isArray(section.fields)) return \"invalid\";\n for (const fieldEntry of section.fields) {\n const field = object(fieldEntry); const traits = object(field?.inputTraits); const valueObject = object(field?.value);\n if (!field || !only(field, [\"title\", \"id\", \"value\", \"guarded\", \"multiline\", \"dontGenerate\", \"inputTraits\", \"placeholder\", \"clipboardFilter\", \"indexAtSource\"]) || typeof field.title !== \"string\" || typeof field.id !== \"string\" || typeof field.guarded !== \"boolean\" || typeof field.multiline !== \"boolean\" || typeof field.dontGenerate !== \"boolean\" || !traits || !only(traits, [\"keyboard\", \"correction\", \"capitalization\"]) || ![\"keyboard\", \"correction\", \"capitalization\"].every((key) => typeof traits[key] === \"string\") || (field.placeholder !== undefined && typeof field.placeholder !== \"string\") || (field.clipboardFilter !== undefined && field.clipboardFilter !== null && typeof field.clipboardFilter !== \"string\") || (field.indexAtSource !== undefined && !integer(field.indexAtSource)) || !valueObject) return \"invalid\";\n const keys = Object.keys(valueObject); if (keys.length !== 1) return \"invalid\";\n const key = keys[0]!; const fieldValue = valueObject[key];\n if ([\"string\", \"concealed\", \"totp\", \"url\", \"phone\", \"menu\", \"reference\"].includes(key)) { if (typeof fieldValue !== \"string\") return \"invalid\"; continue; }\n if (key === \"email\") { const email = object(fieldValue); if (!email || !only(email, [\"email_address\", \"provider\"]) || typeof email.email_address !== \"string\" || (email.provider !== null && typeof email.provider !== \"string\")) return \"invalid\"; continue; }\n return \"unsupported\";\n }\n }\n return \"valid\";\n}\n\nfunction loginRecord(item: ObjectValue, ordinal: number, attrs: ObjectValue, account: ObjectValue, vault: ObjectValue, maxCellBytes: number): StructuredImportRecord {\n const overview = object(item.overview);\n const details = object(item.details);\n const rawTitle = typeof overview?.title === \"string\" ? overview.title : `Item ${ordinal + 1}`;\n const title = textBytes(rawTitle) <= maxCellBytes ? rawTitle : `Item ${ordinal + 1}`;\n if (!overview || !details || !only(item, [\"uuid\", \"favIndex\", \"createdAt\", \"updatedAt\", \"state\", \"categoryUuid\", \"overview\", \"details\"])) return rejected(\"unsupported\", ordinal, title, \"The 1Password item has an unsupported field.\");\n if (!stringsWithin(item, maxCellBytes)) return rejected(\"invalid\", ordinal, `Item ${ordinal + 1}`, \"The 1Password item exceeds the import limits.\");\n if (typeof item.uuid !== \"string\" || !item.uuid || !integer(item.favIndex) || !integer(item.createdAt) || !integer(item.updatedAt) || (item.state !== \"active\" && item.state !== \"archived\") || typeof item.categoryUuid !== \"string\") return rejected(\"invalid\", ordinal, title, \"The 1Password item shape is invalid.\");\n if (item.categoryUuid !== \"001\") return rejected(\"unsupported\", ordinal, title, \"Only 1Password login items are supported.\");\n if (!only(overview, [\"title\", \"subtitle\", \"url\", \"urls\", \"tags\", \"ps\", \"pbe\", \"pgrng\", \"icons\", \"watchtowerExclusions\"]) || typeof overview.title !== \"string\" || typeof overview.subtitle !== \"string\" || typeof overview.url !== \"string\" || [overview.tags, overview.urls].some((value) => value !== undefined && value !== null && !Array.isArray(value)) || [overview.ps, overview.pbe].some((value) => value !== undefined && value !== null && !nonnegativeNumber(value)) || (overview.pgrng !== undefined && overview.pgrng !== null && typeof overview.pgrng !== \"boolean\") || [overview.icons, overview.watchtowerExclusions].some((value) => value !== undefined && value !== null && typeof value !== \"string\") || (Array.isArray(overview.tags) && !strings(overview.tags))) return rejected(\"invalid\", ordinal, title, \"The 1Password overview is invalid.\");\n if (overview.urls !== undefined && overview.urls !== null && (!Array.isArray(overview.urls) || !overview.urls.every((entry) => { const row = object(entry); return !!row && Object.keys(row).length === 2 && typeof row.label === \"string\" && typeof row.url === \"string\"; }))) return rejected(\"invalid\", ordinal, title, \"The 1Password URL list is invalid.\");\n if (!only(details, [\"loginFields\", \"notesPlain\", \"sections\", \"passwordHistory\", \"documentAttributes\", \"password\"]) || (details.documentAttributes != null || details.password != null)) return rejected(\"unsupported\", ordinal, title, \"This 1Password item requires a later import path.\");\n const sectionState = sectionsValid(details.sections);\n if (sectionState !== \"valid\") return rejected(sectionState, ordinal, title, sectionState === \"unsupported\" ? \"The 1Password item has an unsupported field value.\" : \"The 1Password sections are invalid.\");\n if ((details.notesPlain !== undefined && details.notesPlain !== null && typeof details.notesPlain !== \"string\") || (details.passwordHistory !== undefined && details.passwordHistory !== null && (!Array.isArray(details.passwordHistory) || !details.passwordHistory.every((entry) => { const row = object(entry); return !!row && only(row, [\"value\", \"time\"]) && typeof row.value === \"string\" && integer(row.time); })))) return rejected(\"invalid\", ordinal, title, \"The 1Password details are invalid.\");\n if (details.loginFields !== undefined && details.loginFields !== null && !Array.isArray(details.loginFields)) return rejected(\"invalid\", ordinal, title, \"The 1Password login fields are invalid.\");\n let username: string | null = null;\n let password: string | null = null;\n let hasOtp = false;\n for (const entry of details.loginFields ?? []) {\n const field = object(entry);\n if (!field || !only(field, [\"id\", \"name\", \"value\", \"fieldType\", \"designation\"]) || typeof field.id !== \"string\" || typeof field.name !== \"string\" || typeof field.value !== \"string\" || typeof field.fieldType !== \"string\" || (field.designation !== undefined && field.designation !== null && field.designation !== \"username\" && field.designation !== \"password\")) return rejected(\"invalid\", ordinal, title, \"The 1Password login fields are invalid.\");\n if (![\"T\", \"E\", \"U\", \"N\", \"P\", \"A\", \"TEL\", \"C\"].includes(field.fieldType)) return rejected(\"unsupported\", ordinal, title, \"The 1Password login field type is unsupported.\");\n if (field.designation === \"username\") { if (username !== null) return rejected(\"invalid\", ordinal, title, \"The 1Password login has duplicate username fields.\"); username = field.value; }\n if (field.designation === \"password\") { if (password !== null) return rejected(\"invalid\", ordinal, title, \"The 1Password login has duplicate password fields.\"); password = field.value; }\n }\n if (Array.isArray(details.sections)) for (const section of details.sections) { const fields = object(section)?.fields; if (Array.isArray(fields) && fields.some((field) => { const value = object(object(field)?.value); return typeof value?.totp === \"string\" && value.totp.length > 0; })) hasOtp = true; }\n const rawUrls = [overview.url, ...(Array.isArray(overview.urls) ? overview.urls.map((entry) => (entry as ObjectValue).url).filter((url): url is string => typeof url === \"string\") : [])];\n const urls = [...new Set(rawUrls.map(safeDestination).flatMap((url) => url.metadata ? [url.metadata] : []))];\n return { status: \"supported\", ordinal, title, sourceState: item.state === \"archived\" ? \"archived\" : \"active\", sourceRecord: (stringify({ source_vendor: \"1password\", format: \"1pux-v3\", export_attributes: attrs, account_attributes: account, vault_attributes: vault, item }) ?? \"\"), hasOtp, kind: \"website_login\", urls, username, password };\n}\n\nfunction attributes(value: ObjectValue, account: boolean): boolean {\n const keys = account ? [\"accountName\", \"name\", \"avatar\", \"email\", \"uuid\", \"domain\"] : [\"uuid\", \"desc\", \"avatar\", \"name\", \"type\"];\n const idKey = \"uuid\";\n return only(value, keys) && keys.every((key) => typeof value[key] === \"string\") && typeof value[idKey] === \"string\" && (value[idKey] as string).length > 0 && (!account ? [\"P\", \"E\", \"U\"].includes(value.type as string) : true);\n}\n\nexport function parseOnePuxData(exportAttributesText: string, exportDataText: string, limits: Pick<CsvImportLimits, \"maxFileBytes\" | \"maxRecords\" | \"maxCellBytes\" | \"maxJsonDepth\"> & { maxJsonDepth: number }): StructuredImportRecord[] {\n const maxCellBytes = limits.maxCellBytes;\n if (bytes(exportAttributesText) + bytes(exportDataText) > limits.maxFileBytes) throw new Error(\"The 1Password export exceeds this organization’s import size limit.\");\n let exportAttributes: ObjectValue;\n try { exportAttributes = object(parse(exportAttributesText)) ?? {}; } catch { throw new Error(\"The 1Password export attributes could not be read safely.\"); }\n if (!jsonDepthOk(exportAttributes, limits.maxJsonDepth)) throw new Error(\"The 1Password export attributes exceed the nesting limit.\");\n if (!only(exportAttributes, [\"version\", \"description\", \"createdAt\"]) || !numericLexeme(exportAttributes.version)?.isThree || exportAttributes.description !== \"1Password Unencrypted Export\" || !integer(exportAttributes.createdAt)) throw new Error(\"This is not a supported unencrypted 1Password v3 export.\");\n let root: ObjectValue;\n try { root = object(parse(exportDataText)) ?? {}; } catch { throw new Error(\"The 1Password export could not be read safely.\"); }\n if (!jsonDepthOk(root, limits.maxJsonDepth)) throw new Error(\"The 1Password export exceeds the nesting limit.\");\n if (!stringsWithin(exportAttributes, maxCellBytes)) throw new Error(\"The 1Password export exceeds this organization’s field limit.\");\n if (!only(root, [\"accounts\"]) || !Array.isArray(root.accounts)) throw new Error(\"This is not a supported 1Password 1PUX export.\");\n const records: StructuredImportRecord[] = [];\n const accountIds = new Set<string>();\n for (const accountRow of root.accounts) {\n const account = object(accountRow); const attrs = object(account?.attrs);\n if (!account || !attrs || !stringsWithin(attrs, maxCellBytes) || !attributes(attrs, true) || !only(account, [\"attrs\", \"vaults\"]) || !Array.isArray(account.vaults) || accountIds.has(attrs.uuid as string)) throw new Error(\"The 1Password account structure is invalid.\");\n accountIds.add(attrs.uuid as string); const vaultIds = new Set<string>();\n for (const vaultRow of account.vaults) {\n const vault = object(vaultRow); const vaultAttrs = object(vault?.attrs);\n if (!vault || !vaultAttrs || !stringsWithin(vaultAttrs, maxCellBytes) || !attributes(vaultAttrs, false) || !only(vault, [\"attrs\", \"items\"]) || !Array.isArray(vault.items) || vaultIds.has(vaultAttrs.uuid as string)) throw new Error(\"The 1Password vault structure is invalid.\");\n vaultIds.add(vaultAttrs.uuid as string); const itemIds = new Set<string>();\n for (const item of vault.items) { if (records.length >= limits.maxRecords) throw new Error(\"The export has more records than this organization allows.\"); const row = object(item); if (row && typeof row.uuid === \"string\" && itemIds.has(row.uuid)) throw new Error(\"The 1Password vault has duplicate item IDs.\"); if (row && typeof row.uuid === \"string\") itemIds.add(row.uuid); records.push(row ? loginRecord(row, records.length, exportAttributes, attrs, vaultAttrs, maxCellBytes) : rejected(\"invalid\", records.length, `Item ${records.length + 1}`, \"The 1Password item is invalid.\")); }\n }\n }\n return records;\n}\n","/*\n Copyright (c) 2025 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 { setDefaultConfiguration } from \"./core/configuration.js\";\nimport { configureWebWorker } from \"./core/web-worker-inline-wasm.js\";\n\nconfigureWebWorker(setDefaultConfiguration);\n\nexport * from \"./zip-fs-core-wasm.js\";\nexport { getMimeType } from \"./core/util/mime-type.js\";","const t=new Uint8Array(288);t.fill(8,0,144),t.fill(9,144,256),t.fill(7,256,280),t.fill(8,280,288),new Uint8Array(30).fill(5);const n=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\",e=t=>t({workerURI:t=>{const e=\"text/javascript\";let r='!function(t){\"function\"==typeof define&&define.amd?define(t):t()}(function(){\"use strict\";const{Array:t,Object:n,Number:e,Math:o,Error:r,Uint8Array:c,Uint16Array:s,Uint32Array:a,Int32Array:i,Map:f,DataView:u,Promise:w,TextEncoder:l,crypto:d,postMessage:p,TransformStream:h,ReadableStream:y,WritableStream:m,CompressionStream:S,DecompressionStream:g}=self,v=void 0,b=\"undefined\",k=\"function\",z=new c,C=[[],[],[],[],[],[],[],[]];for(let t=0;t<256;t++){let n=t;for(let t=0;t<8;t++)n=1&n?n>>>1^3988292384:n>>>1;C[0][t]=n}for(let t=0;t<256;t++)for(let n=1;n<8;n++){const e=C[n-1][t];C[n][t]=e>>>8^C[0][255&e]}const[I,M,A,E,R,x,P,D]=C;class F{constructor(t){this.o=t||-1}append(t){let n=0|this.o;const e=0|t.length;let o=0;if(e>=8&&t.buffer){const r=new u(t.buffer,t.byteOffset,e),c=e-8;for(;o<=c;o+=8){const t=n^r.getInt32(o,!0),e=r.getInt32(o+4,!0);n=D[255&t]^P[t>>>8&255]^x[t>>>16&255]^R[t>>>24&255]^E[255&e]^A[e>>>8&255]^M[e>>>16&255]^I[e>>>24&255]}}for(;o<e;o++)n=n>>>8^I[255&(n^t[o])];this.o=n}get(){return~this.o}}class U extends h{constructor(){let t;const n=new F;super({transform(t,e){n.append(t),e.enqueue(t)},flush(){const e=new c(4);new u(e.buffer).setUint32(0,n.get()),t.value=e}}),t=this}}function B(t,n){const e=new c(t.length+n.length);return e.set(t),e.set(n,t.length),e}function W(t){return new u(t.buffer,t.byteOffset,t.byteLength)}const O=64,V=20,K=new c([128]),T=new c(1),_=new i([1732584193,4023233417,2562383102,271733878,3285377520]),j=new c(256),H=new i(256),L=new i(256),Z=new i(256),N=new i(256);let q=!1;function G(t,n){!function(){if(!q){let t=1,n=1;do{t=255&(t^t<<1^(128&t?27:0)),n=255&(n^n<<1),n=255&(n^n<<2),n=255&(n^n<<4),128&n&&(n^=9),j[t]=255&(n^(n<<1|n>>7)^(n<<2|n>>6)^(n<<3|n>>5)^(n<<4|n>>4)^99)}while(1!=t);j[0]=99;for(let t=0;t<256;t++){const n=j[t],e=Y(n),o=e<<24|n<<16|n<<8|e^n;H[t]=o,L[t]=o>>>8|o<<24,Z[t]=o>>>16|o<<16,N[t]=o>>>24|o<<8}q=!0}}();const e=new i(60),o=function(t,n){const e=t.length>>2,o=e+6,r=4*(o+1);let c=1;for(let o=0;o<e;o++)n[o]=t[4*o]<<24|t[4*o+1]<<16|t[4*o+2]<<8|t[4*o+3];for(let t=e;t<r;t++){let o=n[t-1];t%e==0?(o=Q(o<<8|o>>>24)^c<<24,c=Y(c)):e>6&&t%e==4&&(o=Q(o)),n[t]=n[t-e]^o}return o}(t,e),r=new i(4),c=J(n);let s=0,a=0,f=0,w=0;return{process(t,n){n&&c.update(t,0,t.length),function(t){const n=new u(t.buffer,t.byteOffset,t.byteLength),e=t.length;let o=0;for(;o+16<=e;o+=16)l(),n.setInt32(o,n.getInt32(o)^r[0]),n.setInt32(o+4,n.getInt32(o+4)^r[1]),n.setInt32(o+8,n.getInt32(o+8)^r[2]),n.setInt32(o+12,n.getInt32(o+12)^r[3]);if(o<e){l();for(let n=0;o<e;o++,n++)t[o]^=r[n>>2]>>>24-8*(3&n)}}(t),n||c.update(t,0,t.length)},digest:()=>c.digest()};function l(){s=s+1|0,s||(a=a+1|0,a||(f=f+1|0,f||(w=w+1|0)));let t=X(s)^e[0],n=X(a)^e[1],c=X(f)^e[2],i=X(w)^e[3],u=H[t>>>24]^L[n>>>16&255]^Z[c>>>8&255]^N[255&i]^e[4],l=H[n>>>24]^L[c>>>16&255]^Z[i>>>8&255]^N[255&t]^e[5],d=H[c>>>24]^L[i>>>16&255]^Z[t>>>8&255]^N[255&n]^e[6],p=H[i>>>24]^L[t>>>16&255]^Z[n>>>8&255]^N[255&c]^e[7];t=H[u>>>24]^L[l>>>16&255]^Z[d>>>8&255]^N[255&p]^e[8],n=H[l>>>24]^L[d>>>16&255]^Z[p>>>8&255]^N[255&u]^e[9],c=H[d>>>24]^L[p>>>16&255]^Z[u>>>8&255]^N[255&l]^e[10],i=H[p>>>24]^L[u>>>16&255]^Z[l>>>8&255]^N[255&d]^e[11],u=H[t>>>24]^L[n>>>16&255]^Z[c>>>8&255]^N[255&i]^e[12],l=H[n>>>24]^L[c>>>16&255]^Z[i>>>8&255]^N[255&t]^e[13],d=H[c>>>24]^L[i>>>16&255]^Z[t>>>8&255]^N[255&n]^e[14],p=H[i>>>24]^L[t>>>16&255]^Z[n>>>8&255]^N[255&c]^e[15],t=H[u>>>24]^L[l>>>16&255]^Z[d>>>8&255]^N[255&p]^e[16],n=H[l>>>24]^L[d>>>16&255]^Z[p>>>8&255]^N[255&u]^e[17],c=H[d>>>24]^L[p>>>16&255]^Z[u>>>8&255]^N[255&l]^e[18],i=H[p>>>24]^L[u>>>16&255]^Z[l>>>8&255]^N[255&d]^e[19],u=H[t>>>24]^L[n>>>16&255]^Z[c>>>8&255]^N[255&i]^e[20],l=H[n>>>24]^L[c>>>16&255]^Z[i>>>8&255]^N[255&t]^e[21],d=H[c>>>24]^L[i>>>16&255]^Z[t>>>8&255]^N[255&n]^e[22],p=H[i>>>24]^L[t>>>16&255]^Z[n>>>8&255]^N[255&c]^e[23],t=H[u>>>24]^L[l>>>16&255]^Z[d>>>8&255]^N[255&p]^e[24],n=H[l>>>24]^L[d>>>16&255]^Z[p>>>8&255]^N[255&u]^e[25],c=H[d>>>24]^L[p>>>16&255]^Z[u>>>8&255]^N[255&l]^e[26],i=H[p>>>24]^L[u>>>16&255]^Z[l>>>8&255]^N[255&d]^e[27],u=H[t>>>24]^L[n>>>16&255]^Z[c>>>8&255]^N[255&i]^e[28],l=H[n>>>24]^L[c>>>16&255]^Z[i>>>8&255]^N[255&t]^e[29],d=H[c>>>24]^L[i>>>16&255]^Z[t>>>8&255]^N[255&n]^e[30],p=H[i>>>24]^L[t>>>16&255]^Z[n>>>8&255]^N[255&c]^e[31],t=H[u>>>24]^L[l>>>16&255]^Z[d>>>8&255]^N[255&p]^e[32],n=H[l>>>24]^L[d>>>16&255]^Z[p>>>8&255]^N[255&u]^e[33],c=H[d>>>24]^L[p>>>16&255]^Z[u>>>8&255]^N[255&l]^e[34],i=H[p>>>24]^L[u>>>16&255]^Z[l>>>8&255]^N[255&d]^e[35],u=H[t>>>24]^L[n>>>16&255]^Z[c>>>8&255]^N[255&i]^e[36],l=H[n>>>24]^L[c>>>16&255]^Z[i>>>8&255]^N[255&t]^e[37],d=H[c>>>24]^L[i>>>16&255]^Z[t>>>8&255]^N[255&n]^e[38],p=H[i>>>24]^L[t>>>16&255]^Z[n>>>8&255]^N[255&c]^e[39];let h=40;o>10&&(t=H[u>>>24]^L[l>>>16&255]^Z[d>>>8&255]^N[255&p]^e[40],n=H[l>>>24]^L[d>>>16&255]^Z[p>>>8&255]^N[255&u]^e[41],c=H[d>>>24]^L[p>>>16&255]^Z[u>>>8&255]^N[255&l]^e[42],i=H[p>>>24]^L[u>>>16&255]^Z[l>>>8&255]^N[255&d]^e[43],u=H[t>>>24]^L[n>>>16&255]^Z[c>>>8&255]^N[255&i]^e[44],l=H[n>>>24]^L[c>>>16&255]^Z[i>>>8&255]^N[255&t]^e[45],d=H[c>>>24]^L[i>>>16&255]^Z[t>>>8&255]^N[255&n]^e[46],p=H[i>>>24]^L[t>>>16&255]^Z[n>>>8&255]^N[255&c]^e[47],h=48),o>12&&(t=H[u>>>24]^L[l>>>16&255]^Z[d>>>8&255]^N[255&p]^e[48],n=H[l>>>24]^L[d>>>16&255]^Z[p>>>8&255]^N[255&u]^e[49],c=H[d>>>24]^L[p>>>16&255]^Z[u>>>8&255]^N[255&l]^e[50],i=H[p>>>24]^L[u>>>16&255]^Z[l>>>8&255]^N[255&d]^e[51],u=H[t>>>24]^L[n>>>16&255]^Z[c>>>8&255]^N[255&i]^e[52],l=H[n>>>24]^L[c>>>16&255]^Z[i>>>8&255]^N[255&t]^e[53],d=H[c>>>24]^L[i>>>16&255]^Z[t>>>8&255]^N[255&n]^e[54],p=H[i>>>24]^L[t>>>16&255]^Z[n>>>8&255]^N[255&c]^e[55],h=56),r[0]=(j[u>>>24]<<24|j[l>>>16&255]<<16|j[d>>>8&255]<<8|j[255&p])^e[h],r[1]=(j[l>>>24]<<24|j[d>>>16&255]<<16|j[p>>>8&255]<<8|j[255&u])^e[h+1],r[2]=(j[d>>>24]<<24|j[p>>>16&255]<<16|j[u>>>8&255]<<8|j[255&l])^e[h+2],r[3]=(j[p>>>24]<<24|j[u>>>16&255]<<16|j[l>>>8&255]<<8|j[255&d])^e[h+3]}}function J(t){const n=function(){const t=new i(_),n=new i(16),e=new c(O),r=new u(e.buffer),s=new c(8);let a=0,f=0;return{update:w,digest:function(){const n=8*f,e=o.floor(n/4294967296),r=n>>>0;for(w(K,0,1);56!=a;)w(T,0,1);s[0]=e>>>24,s[1]=e>>>16,s[2]=e>>>8,s[3]=e,s[4]=r>>>24,s[5]=r>>>16,s[6]=r>>>8,s[7]=r,w(s,0,8);const i=new c(V),l=new u(i.buffer);for(let n=0;n<t.length;n++)l.setInt32(4*n,t[n]);return t.set(_),a=0,f=0,i}};function w(t,n,o){const c=n+o;if(f+=o,a){for(;n<c&&a<O;)e[a++]=t[n++];a==O&&(l(r,0),a=0)}if(n+O<=c){const e=new u(t.buffer,t.byteOffset,t.byteLength);for(;n+O<=c;n+=O)l(e,n)}for(;n<c;)e[a++]=t[n++]}function l(e,o){for(let t=0;t<16;t++)n[t]=e.getInt32(o+4*t);let r,c=t[0],s=t[1],a=t[2],i=t[3],f=t[4];for(let t=0;t<15;t+=5)f=(c<<5|c>>>27)+((a^i)&s^i)+f+1518500249+n[t]|0,s=s<<30|s>>>2,i=(f<<5|f>>>27)+((s^a)&c^a)+i+1518500249+n[t+1]|0,c=c<<30|c>>>2,a=(i<<5|i>>>27)+((c^s)&f^s)+a+1518500249+n[t+2]|0,f=f<<30|f>>>2,s=(a<<5|a>>>27)+((f^c)&i^c)+s+1518500249+n[t+3]|0,i=i<<30|i>>>2,c=(s<<5|s>>>27)+((i^f)&a^f)+c+1518500249+n[t+4]|0,a=a<<30|a>>>2;f=(c<<5|c>>>27)+((a^i)&s^i)+f+1518500249+n[15]|0,s=s<<30|s>>>2,r=n[13]^n[8]^n[2]^n[0],r=r<<1|r>>>31,n[0]=r,i=(f<<5|f>>>27)+((s^a)&c^a)+i+1518500249+r|0,c=c<<30|c>>>2,r=n[14]^n[9]^n[3]^n[1],r=r<<1|r>>>31,n[1]=r,a=(i<<5|i>>>27)+((c^s)&f^s)+a+1518500249+r|0,f=f<<30|f>>>2,r=n[15]^n[10]^n[4]^n[2],r=r<<1|r>>>31,n[2]=r,s=(a<<5|a>>>27)+((f^c)&i^c)+s+1518500249+r|0,i=i<<30|i>>>2,r=n[0]^n[11]^n[5]^n[3],r=r<<1|r>>>31,n[3]=r,c=(s<<5|s>>>27)+((i^f)&a^f)+c+1518500249+r|0,a=a<<30|a>>>2;for(let t=20;t<40;t+=5)r=n[t-3&15]^n[t-8&15]^n[t-14&15]^n[15&t],r=r<<1|r>>>31,n[15&t]=r,f=(c<<5|c>>>27)+(s^a^i)+f+1859775393+r|0,s=s<<30|s>>>2,r=n[t-2&15]^n[t-7&15]^n[t-13&15]^n[t+1&15],r=r<<1|r>>>31,n[t+1&15]=r,i=(f<<5|f>>>27)+(c^s^a)+i+1859775393+r|0,c=c<<30|c>>>2,r=n[t-1&15]^n[t-6&15]^n[t-12&15]^n[t+2&15],r=r<<1|r>>>31,n[t+2&15]=r,a=(i<<5|i>>>27)+(f^c^s)+a+1859775393+r|0,f=f<<30|f>>>2,r=n[15&t]^n[t-5&15]^n[t-11&15]^n[t+3&15],r=r<<1|r>>>31,n[t+3&15]=r,s=(a<<5|a>>>27)+(i^f^c)+s+1859775393+r|0,i=i<<30|i>>>2,r=n[t+1&15]^n[t-4&15]^n[t-10&15]^n[t+4&15],r=r<<1|r>>>31,n[t+4&15]=r,c=(s<<5|s>>>27)+(a^i^f)+c+1859775393+r|0,a=a<<30|a>>>2;for(let t=40;t<60;t+=5)r=n[t-3&15]^n[t-8&15]^n[t-14&15]^n[15&t],r=r<<1|r>>>31,n[15&t]=r,f=(c<<5|c>>>27)+(s&a|(s|a)&i)+f+2400959708+r|0,s=s<<30|s>>>2,r=n[t-2&15]^n[t-7&15]^n[t-13&15]^n[t+1&15],r=r<<1|r>>>31,n[t+1&15]=r,i=(f<<5|f>>>27)+(c&s|(c|s)&a)+i+2400959708+r|0,c=c<<30|c>>>2,r=n[t-1&15]^n[t-6&15]^n[t-12&15]^n[t+2&15],r=r<<1|r>>>31,n[t+2&15]=r,a=(i<<5|i>>>27)+(f&c|(f|c)&s)+a+2400959708+r|0,f=f<<30|f>>>2,r=n[15&t]^n[t-5&15]^n[t-11&15]^n[t+3&15],r=r<<1|r>>>31,n[t+3&15]=r,s=(a<<5|a>>>27)+(i&f|(i|f)&c)+s+2400959708+r|0,i=i<<30|i>>>2,r=n[t+1&15]^n[t-4&15]^n[t-10&15]^n[t+4&15],r=r<<1|r>>>31,n[t+4&15]=r,c=(s<<5|s>>>27)+(a&i|(a|i)&f)+c+2400959708+r|0,a=a<<30|a>>>2;for(let t=60;t<80;t+=5)r=n[t-3&15]^n[t-8&15]^n[t-14&15]^n[15&t],r=r<<1|r>>>31,n[15&t]=r,f=(c<<5|c>>>27)+(s^a^i)+f+3395469782+r|0,s=s<<30|s>>>2,r=n[t-2&15]^n[t-7&15]^n[t-13&15]^n[t+1&15],r=r<<1|r>>>31,n[t+1&15]=r,i=(f<<5|f>>>27)+(c^s^a)+i+3395469782+r|0,c=c<<30|c>>>2,r=n[t-1&15]^n[t-6&15]^n[t-12&15]^n[t+2&15],r=r<<1|r>>>31,n[t+2&15]=r,a=(i<<5|i>>>27)+(f^c^s)+a+3395469782+r|0,f=f<<30|f>>>2,r=n[15&t]^n[t-5&15]^n[t-11&15]^n[t+3&15],r=r<<1|r>>>31,n[t+3&15]=r,s=(a<<5|a>>>27)+(i^f^c)+s+3395469782+r|0,i=i<<30|i>>>2,r=n[t+1&15]^n[t-4&15]^n[t-10&15]^n[t+4&15],r=r<<1|r>>>31,n[t+4&15]=r,c=(s<<5|s>>>27)+(a^i^f)+c+3395469782+r|0,a=a<<30|a>>>2;t[0]=t[0]+c|0,t[1]=t[1]+s|0,t[2]=t[2]+a|0,t[3]=t[3]+i|0,t[4]=t[4]+f|0}}(),e=new c(O),r=new c(O);t.length>O&&(n.update(t,0,t.length),t=n.digest());for(let n=0;n<O;n++){const o=n<t.length?t[n]:0;e[n]=54^o,r[n]=92^o}return n.update(e,0,O),{update(t,e,o){n.update(t,e,o)},digest(){const t=n.digest();n.update(r,0,O),n.update(t,0,V);const o=n.digest();return n.update(e,0,O),o}}}function Q(t){return j[t>>>24]<<24|j[t>>>16&255]<<16|j[t>>>8&255]<<8|j[255&t]}function X(t){return t<<24|(65280&t)<<8|t>>>8&65280|t>>>24}function Y(t){return 255&(t<<1^27*(t>>7))}const $=typeof d!=b&&typeof d.getRandomValues==k,tt=\"Invalid password\",nt=\"zipjs-abort-check-password\";function et(t){if($)return d.getRandomValues(t);throw new r(\"Crypto API not supported\")}const ot={name:\"PBKDF2\"},rt=n.assign({hash:{name:\"HMAC\"}},ot),ct=n.assign({iterations:1e3,hash:{name:\"SHA-1\"}},ot),st=[\"deriveBits\"],at=[8,12,16],it=[16,24,32],ft=10,ut=typeof d!=b,wt=ut&&d.subtle;let lt=ut&&typeof wt!=b&&typeof wt.importKey==k&&typeof wt.deriveBits==k,dt=G;class pt extends h{constructor({password:t,rawPassword:n,encryptionStrength:e,checkPasswordOnly:o,checkAuthenticationCode:s=!0}){const a={};super({start(){yt(a,t,n,e)},async transform(t,n){const{password:e,strength:s,l:i,ready:f}=a;if(e?(await async function(t,n,e,o){const c=await vt(t,n,e,kt(o,0,at[n])),s=kt(o,at[n]);if(c[0]!=s[0]||c[1]!=s[1])throw gt(t),new r(tt)}(a,s,e,kt(t,0,at[s]+2)),t=kt(t,at[s]+2),o?(gt(a),n.error(new r(nt))):i()):await f,a.h)return;const u=new c(t.length-ft-(t.length-ft)%16);n.enqueue(St(a,t,u,0,ft,!0))},async flush(t){const{m:n,S:e,ready:o}=a;if(n){if(await o,a.h)return;const i=kt(e,e.length-ft),f=new c(kt(e,0,e.length-ft));n.process(f,!0);const u=n.digest();let w=e.length<ft?1:0;for(let t=0;t<ft;t++)w|=u[t]^i[t];if(w&&s)return void t.error(new r(\"Invalid authentication code\"));t.enqueue(f)}}}),mt(this,a)}}class ht extends h{constructor({password:t,rawPassword:n,encryptionStrength:e}){const o={};super({start(){yt(o,t,n,e)},async transform(t,n){const{password:e,strength:r,l:s,ready:a}=o;let i=z;if(e?(i=await async function(t,n,e){const o=et(new c(at[n]));return B(o,await vt(t,n,e,o))}(o,r,e),s()):await a,o.h)return;const f=new c(i.length+t.length-t.length%16);f.set(i,0),n.enqueue(St(o,t,f,i.length,0,!1))},async flush(t){const{m:n,S:e,ready:r}=o;if(n){if(await r,o.h)return;const s=new c(e);n.process(s,!1);const a=kt(n.digest(),0,ft);t.enqueue(B(s,a))}}}),mt(this,o)}}function yt(t,e,o,r){n.assign(t,{ready:new w(n=>t.l=n),password:bt(e,o),strength:r-1,S:z,h:!1})}function mt(t,e){const o=t.readable.getReader(),r=new y({async pull(t){try{const{value:n,done:e}=await o.read();e?t.close():t.enqueue(n)}catch(t){throw gt(e),o.cancel(t).catch(()=>{}),t}},cancel:t=>(gt(e),o.cancel(t))});n.defineProperty(t,\"readable\",{get:()=>r})}function St(t,n,e,o,r,s){const{m:a,S:i}=t;i.length&&(n=B(i,n));const f=n.length-r,u=f-f%16;if(e=function(t,n){if(n&&n>t.length){const e=t;(t=new c(n)).set(e,0)}return t}(e,o+u),u){const t=kt(e,o,o+u);t.set(kt(n,0,u)),a.process(t,s)}return t.S=kt(n,u),e}function gt(t){const{m:n}=t;t.h=!0,n&&n.dispose&&n.dispose()}async function vt(t,e,r,s){t.password=null;const a=it[e],i=await async function(t,e,r){if(lt)try{const o=await wt.importKey(\"raw\",t,rt,!1,st);return new c(await wt.deriveBits(n.assign({salt:e},ct),o,8*r))}catch{lt=!1}return function(t,n,e,r){const s=J(t),a=new c(r),i=new c(n.length+4),f=new u(i.buffer);i.set(n);for(let t=1,e=0;e<r;t++,e+=V){f.setUint32(n.length,t),s.update(i,0,i.length);let c=s.digest();const u=c.slice();for(let t=1;t<1e3;t++){s.update(c,0,V),c=s.digest();for(let t=0;t<V;t++)u[t]^=c[t]}a.set(u.subarray(0,o.min(V,r-e)),e)}return a}(t,e,0,r)}(r,s,2*a+2);return t.m=dt(kt(i,0,a),kt(i,a,2*a)),t.h&&gt(t),kt(i,2*a)}function bt(t,n){return n===v?function(t){if(typeof l==b){t=unescape(encodeURIComponent(t));const n=new c(t.length);for(let e=0;e<n.length;e++)n[e]=t.charCodeAt(e);return n}return(new l).encode(t)}(t):n}function kt(t,n,e){return t.subarray(n,e)}class zt extends h{constructor({password:t,rawPassword:n,passwordVerification:e,checkPasswordOnly:o}){super({start(){It(this,t,n,e)},transform(t,n){const e=this;if(e.password||e.rawPassword){const n=Mt(e,t.subarray(0,12));if(e.password=e.rawPassword=null,0!=(n[11]^e.passwordVerification))throw new r(tt);t=t.subarray(12)}o?n.error(new r(nt)):n.enqueue(Mt(e,t))}})}}class Ct extends h{constructor({password:t,rawPassword:n,passwordVerification:e}){super({start(){It(this,t,n,e)},transform(t,n){const e=this;let o,r;if(e.password||e.rawPassword){e.password=e.rawPassword=null;const n=et(new c(12));n[11]=e.passwordVerification,o=new c(t.length+n.length),o.set(At(e,n),0),r=12}else o=new c(t.length),r=0;o.set(At(e,t),r),n.enqueue(o)}})}}function It(t,e,o,r){n.assign(t,{password:e,rawPassword:o,passwordVerification:r}),function(t,e,o){const r=[305419896,591751049,878082192];if(n.assign(t,{v:r,C:new F(r[0]),I:new F(r[2])}),o)for(let n=0;n<o.length;n++)Et(t,o[n]);else for(let n=0;n<e.length;n++)Et(t,e.charCodeAt(n))}(t,e,o)}function Mt(t,n){const e=new c(n.length);for(let o=0;o<n.length;o++)e[o]=Rt(t)^n[o],Et(t,e[o]);return e}function At(t,n){const e=new c(n.length);for(let o=0;o<n.length;o++)e[o]=Rt(t)^n[o],Et(t,n[o]);return e}function Et(t,n){let[,e]=t.v;t.C.append([n]);const r=~t.C.get();e=Pt(o.imul(Pt(e+xt(r)),134775813)+1),t.I.append([e>>>24]);const c=~t.I.get();t.v=[r,e,c]}function Rt(t){const n=2|t.v[2];return xt(o.imul(n,1^n)>>>8)}function xt(t){return 255&t}function Pt(t){return 4294967295&t}function Dt(t){if(t instanceof y)return t;const n=t.getReader();return new y({async pull(t){try{const{value:e,done:o}=await n.read();o?t.close():t.enqueue(e)}catch(t){throw n.cancel(t).catch(()=>{}),t}},cancel:t=>n.cancel(t)})}function Ft(t){return Boolean(t)&&\"object\"==typeof t}const Ut=new f;function Bt(t){return Ut.get(t)}const Wt=\"Invalid uncompressed size\",Ot=\"Codec out of memory\",Vt=\"Invalid CRC32\",Kt=\"deflate-raw\",Tt=\"gzip\",_t=[31,139,8];class jt extends h{constructor(t,{chunkSize:n,CompressionStreamFallback:e,CompressionStream:o}){super({});const{compressed:r,encrypted:c,useCompressionStream:s,zipCrypto:a,computeCrc32:i,level:f,deflate64:w,format:l,compressionMethod:d,inputSize:p}=t,h=this;let y,m,S,g=super.readable;const v=l&&Bt(l),b=Gt(s,o,e),k=i&&r&&!w&&!v&&(!c||a)&&Boolean(b);if(c&&!a||!i||k||(y=new U,g=Qt(g,y)),r)if(v)g=Xt(g,qt(v.CompressionStream,l,{level:f,chunkSize:n,compressionMethod:d,uncompressedSize:p}));else if(k)S=new Ht,g=Xt(g,new b(Tt,{level:f,chunkSize:n})),g=Qt(g,S);else try{g=Jt(g,s,{level:f,chunkSize:n},o,e)}catch(t){if(!s&&e)throw en(t);let n;try{n=new o(Tt)}catch{throw en(t)}g=Xt(g,n),g=Qt(g,new Ht)}c&&(a?g=Qt(g,new Ct(t)):(m=new ht(t),g=Qt(g,m))),Nt(h,g,()=>{c&&!a||!i||(h.crc32=k?S.crc32:new u(y.value.buffer).getUint32(0))})}}class Ht extends h{constructor(){let t,n=10,e=new c(0);super({transform(t,r){if(n){const e=o.min(n,t.length);if(n-=e,!(t=t.subarray(e)).length)return}const c=e.length+t.length;if(c<=8)return void(e=B(e,t));const s=c-8,a=o.min(s,e.length);r.enqueue(B(e.subarray(0,a),t.subarray(0,s-a))),e=B(e.subarray(a),t.subarray(s-a))},flush(){const n=W(e);t.crc32=n.getUint32(0,!0),t.uncompressedSize=n.getUint32(4,!0)}}),t=this}}class Lt extends h{constructor(t,{chunkSize:n,DecompressionStreamFallback:e,DecompressionStream:o}){super({});const{zipCrypto:s,encrypted:a,checkCrc32:i,crc32:f,compressed:l,useCompressionStream:d,deflate64:p,format:h,compressionMethod:m,rawBitFlag:S,outputSize:g}=t;let b,k,z,C=super.readable;if(a&&(s?C=Qt(C,new zt(t)):(k=new pt(t),C=Qt(C,k))),l){const t=new Set,s=h&&Bt(h);let a;if(s)C=Xt(C,qt(s.DecompressionStream,h,{chunkSize:n,compressionMethod:m,rawBitFlag:S,uncompressedSize:g}),t);else{const r=Gt(d,o,e);if(i&&!p&&f!==v&&g!==v&&r)try{a=new r(Tt,{chunkSize:n})}catch{a=v}if(!a)try{C=Jt(C,d,{chunkSize:n,deflate64:p},o,e,t)}catch(t){if(p||g===v||!d&&e)throw en(t);try{a=new o(Tt)}catch{throw en(t)}}}a?(z=!0,C=function(t,n,e,o,s){const a=n.writable.getWriter(),i=n.readable.getReader(),f=o===v?new F:v;let u,l,d=0,p=!1,h=!1;const m=new y({start(t){l=t},pull(){b()},cancel:t=>(h=!0,b(),i.cancel(t))});return async function(){const n=t.getReader();try{const t=new c(10);for(t.set(_t),await a.write(t);;){await g(),await a.ready;const{value:t,done:e}=await tn(n,s);if(e)break;await a.write(t)}f&&await a.write(new c(0));const r=new c(8),i=W(r);i.setUint32(0,f?f.get():o,!0),i.setUint32(4,e,!0),p=!0,await a.write(r),await a.close()}catch(t){await Yt(a,t),await $t(n,t)}}(),async function(){try{for(;;){const{value:t,done:n}=await S();if(n)break;if(d+=t.length,d>e)throw new r(Wt);f&&f.append(t),l.enqueue(t)}h||(h=!0,l.close())}catch(t){!function(t){h||(h=!0,l.error(t),b())}(t),await $t(i,t)}}(),m;function S(){return i.read().catch(t=>{if(p){if(!f)throw rn(t,Vt);if(d!=e)throw rn(t,Wt);return{done:!0}}throw nn(t,s)})}function g(){if(!h&&l.desiredSize<=0)return new w(t=>u=t)}function b(){if(u){const t=u;u=v,t()}}}(C,a,g,f,t)):C=function(t,n){const e=t.getReader();return new y({async pull(t){try{const{value:n,done:o}=await e.read();o?t.close():t.enqueue(n)}catch(t){throw await $t(e,t),nn(t,n)}},cancel:t=>e.cancel(t)})}(C,t)}i&&!z&&(b=new U,C=Qt(C,b)),Nt(this,C,()=>{if(b){const t=new u(b.value.buffer).getUint32(0,!1);if(f!=t)throw new r(Vt)}})}}const Zt=new f;function Nt(t,e,o){e=Qt(e,new h({flush:o})),n.defineProperty(t,\"readable\",{get:()=>e})}function qt(t,n,e){if(!t)throw new r(\"Compression method not supported\");return new t(n,e)}function Gt(t,n,e){return t&&n?n:e&&e.requiresModule?e:void 0}function Jt(t,n,e,o,r,c){const s=n&&o?o:r||o,a=e.deflate64?\"deflate64-raw\":Kt;let i;try{i=new s(a,e)}catch(t){if(!n||!r||s==r)throw t;i=new r(a,e)}return Xt(t,i,c)}function Qt(t,n){return Dt(t).pipeThrough(n)}function Xt(t,n,e){const o=n.writable.getWriter(),r=t.getReader();return async function(){try{for(;;){await o.ready;const t=await tn(r,e);if(t.done){await o.close();break}await o.write(t.value)}}catch(t){await Yt(o,t),await $t(r,t)}}(),n.readable}async function Yt(t,n){try{await t.abort(n)}catch{}}async function $t(t,n){try{await t.cancel(n)}catch{}}function tn(t,n){const e=t.read();return n?e.catch(t=>{throw n.add(t),t}):e}function nn(t,n){return n.has(t)?t:rn(t,on(t)?Ot:\"Invalid compressed data\")}function en(t){return on(t)?rn(t,Ot):t}function on(t){return Ft(t)&&\"Z_MEM_ERROR\"==t.code}function rn(t,n){const e=new r(n);return e.cause=t,e}const cn=\"data\",sn=\"deflate\";class an extends h{constructor(t,e){super({});const o=this,{codecType:c}=t;let s;c.startsWith(sn)?s=jt:c.startsWith(\"inflate\")&&(s=Lt),o.outputSize=0;let a=0;const i=new s(t,e),f=super.readable,u=new h({transform(t,n){t&&t.length&&(a+=t.length,n.enqueue(t))},flush(){n.assign(o,{inputSize:a})}}),w=new h({transform(n,e){if(n&&n.length&&(e.enqueue(n),o.outputSize+=n.length,t.outputSize!==v&&o.outputSize>t.outputSize))throw new r(Wt)},flush(){const{crc32:t}=i;n.assign(o,{crc32:t,inputSize:a})}});n.defineProperty(o,\"readable\",{get:()=>f.pipeThrough(u).pipeThrough(i).pipeThrough(w)})}}class fn extends h{constructor(t){const o=[];let r=0,s=0;function a(){const n=new c(t);let e=0;for(;e<t;){const r=o[0],c=t-e;r.length<=c?(n.set(r,e),e+=r.length,o.shift()):(n.set(r.subarray(0,c),e),o[0]=r.subarray(c),e+=c)}return r-=t,n}(!e.isFinite(t)||t<1)&&(t=65536),super({transform(n,e){for(o.push(n),r+=n.length;r>t;)s+=t,e.enqueue(a())},flush(t){r&&(s+=r,t.enqueue(function(t,n){const e=new c(n);let o=0;for(const n of t)e.set(n,o),o+=n.length;return e}(o,r)))}}),n.defineProperty(this,\"outputSize\",{get:()=>s})}}let un=2;try{typeof navigator!=b&&navigator.hardwareConcurrency&&(un=navigator.hardwareConcurrency)}catch{}const wn=new f,ln=new f,dn=function(){try{return structuredClone(new r)instanceof r}catch{return!1}}();let pn=0;async function hn(t){let n,c,s;try{const{options:a,config:i}=t;if(a.format)try{await async function(t,n){!Ut.has(t)&&n&&function(t,n){const{CompressionStream:e,DecompressionStream:o}=n;if(typeof e!=k&&typeof o!=k)throw new r(\"Invalid codec module\");Ut.set(t,{CompressionStream:e,DecompressionStream:o})}(t,await(import(n)))}(a.format,a.codecURI)}catch(t){if(Ft(t))try{t.codecImportFailed=!0}catch{}throw t}if(i.CompressionStream=self.CompressionStream,i.DecompressionStream=self.DecompressionStream,a.compressed&&!a.format)if(a.useCompressionStream){if(!function(t,n){if(!t)return!1;let e=Zt.get(t);e||(e=new f,Zt.set(t,e));let o=e.get(n);if(o===v){try{new t(n),o=!0}catch{o=!1}e.set(n,o)}return o}(a.codecType.startsWith(sn)?i.CompressionStream:i.DecompressionStream,Kt))try{await self.initModule(t.config)}catch{}}else try{await self.initModule(t.config)}catch{a.useCompressionStream=!0}if(a.encrypted&&!a.zipCrypto)try{await self.initModule(t.config)}catch{}!i.CompressionStreamFallback&&i.CompressionStreamZlib&&(i.CompressionStreamFallback=i.CompressionStreamZlib),!i.DecompressionStreamFallback&&i.DecompressionStreamZlib&&(i.DecompressionStreamFallback=i.DecompressionStreamZlib);const u={highWaterMark:1},l=t.readable?Dt(t.readable):new y({async pull(t){const n=new w(t=>wn.set(pn,t));yn({type:\"pull\",messageId:pn}),pn=(pn+1)%e.MAX_SAFE_INTEGER;const{value:o,done:r}=await n;t.enqueue(o),r&&t.close()}},u);s=t.writable?function(t){if(t instanceof m)return t;const n=t.getWriter();return new m({write:t=>n.write(t),close:()=>n.close(),abort:t=>n.abort(t)})}(t.writable):new m({async write(t){let n;const o=new w(t=>n=t);ln.set(pn,n),yn({type:cn,value:t,messageId:pn}),pn=(pn+1)%e.MAX_SAFE_INTEGER,await o}},u),n=new an(a,i),c=new fn(function(t){return r=\"string\"==typeof(n=r=t.chunkSize)&&n.trim()?e(n):n,e.isInteger(r)&&r>=1?o.max(r,64):65536;var n,r}(i)),await l.pipeThrough(n).pipeThrough(c).pipeTo(s,{preventClose:!0,preventAbort:!0}),await s.getWriter().close();const{crc32:d,inputSize:p,outputSize:h}=n;yn({type:\"close\",result:{crc32:d,inputSize:p,outputSize:h}})}catch(t){const n=c?c.outputSize:0;if(Ft(t))try{t.outputSize=n}catch{}if(s&&!s.locked)try{await s.getWriter().close()}catch{}mn(t,n)}}function yn(t){const{value:n}=t;if(n)if(n.length)try{t.value=(e=n,e.byteOffset||e.byteLength!=e.buffer.byteLength?new c(e):e).buffer,p(t,[t.value])}catch{p(t)}else p(t);else p(t);var e}function mn(t,n){const{message:e,stack:o,code:c,name:s,outputSize:a,cause:i,codecImportFailed:f}=function(t=new r(\"Unknown error\")){return Ft(t)?t:new r(String(t))}(t),u={message:e,stack:o,code:c,name:s,outputSize:a===v?n:a};if(Ft(i)&&(u.cause={name:i.name,message:i.message,code:i.code}),f&&(u.codecImportFailed=!0),dn)try{return void p({error:u,errorValue:{value:t}})}catch{}p({error:u})}addEventListener(\"message\",({data:t})=>{const{type:n,messageId:e,value:o,done:r}=t;try{if(\"start\"==n&&hn(t),n==cn){const t=wn.get(e);wn.delete(e),t({value:o||new c,done:r})}if(\"ack\"==n){const t=ln.get(e);ln.delete(e),t()}}catch(t){mn(t)}}),p({type:\"ready\"});const Sn=\"deflate\",gn=\"deflate-raw\",vn=\"deflate64-raw\",bn=\"gzip\",kn=[Sn,gn,bn],zn=[Sn,gn,bn,vn];let Cn,In,Mn,An,En;function Rn(t,n){return-4===n&&(t.code=\"Z_MEM_ERROR\"),t}function xn(t,n,e={}){if(!(t?kn:zn).includes(n))throw new TypeError(\"Unsupported format: \"+n);if(!Cn){const t=new r(\"WASM module not loaded\");throw t.cause=En,t}const s=\"number\"==typeof e.level?e.level:-1,a=\"number\"==typeof e.outBuffer?e.outBuffer:65536,i=\"number\"==typeof e.inBufferSize?e.inBufferSize:65536,f={M:0,in:0,inBufferSize:0,A:0,R:!1};let u,l,d,p,h=!0,S=!1;return function(){try{let e;if(f.M=In(a),f.in=In(i),f.inBufferSize=i,!f.M||!f.in)throw Rn(new r(\"allocation failed\"),-4);if(t?(f.P=Cn.deflate_process,f.D=Cn.deflate_last_consumed,f.F=Cn.deflate_end,f.A=Cn.deflate_new(),e=n===bn?Cn.deflate_init_gzip(f.A,s):n===gn?Cn.deflate_init_raw(f.A,s):Cn.deflate_init(f.A,s)):n===vn?(f.P=Cn.inflate9_process,f.D=Cn.inflate9_last_consumed,f.F=Cn.inflate9_end,f.A=Cn.inflate9_new(),e=Cn.inflate9_init_raw(f.A)):(f.P=Cn.inflate_process,f.D=Cn.inflate_last_consumed,f.F=Cn.inflate_end,f.A=Cn.inflate_new(),e=n===gn?Cn.inflate_init_raw(f.A):n===bn?Cn.inflate_init_gzip(f.A):Cn.inflate_init(f.A)),0!==e)throw Rn(new r(\"init failed:\"+e),e)}catch(t){throw b(f),t}}(),{readable:new y({start(t){u=t},pull(){h=!1,v()},cancel(t){S=!0,p=t,b(f),l.error(t),v()}},{highWaterMark:0}),writable:new m({start(t){l=t},async write(t){if(h&&await new w(t=>d=t),S)throw p;try{!function(t){const n=new c(An.buffer),e=f.P,s=f.D,i=f.M;let u=0;for(;u<t.length;){if(f.R)throw new r(\"trailing data after the end of the stream\");const c=o.min(t.length-u,32768);if((!f.in||f.inBufferSize<c)&&(f.in&&Mn&&(Mn(f.in),f.in=0),f.in=In(c),f.inBufferSize=c,!f.in))throw Rn(new r(\"allocation failed\"),-4);n.set(t.subarray(u,u+c),f.in);const w=e(f.A,f.in,c,i,a,0),l=w>>24&255,d=128&l?l-256:l;if(d<0)throw Rn(new r(\"process error:\"+d),d);const p=16777215&w;p&&g(n.slice(i,i+p));const h=s(f.A);if(1===l)f.R=!0;else if(0===h&&0===p)break;u+=h}}(t)}catch(t){throw b(f),u.error(t),t}},close(){if(S)return;try{!function(){const t=new c(An.buffer),n=f.P,e=f.M;for(;;){const o=n(f.A,0,0,e,a,4),c=o>>24&255,s=128&c?c-256:c;if(s<0)throw Rn(new r(\"process error:\"+s),s);const i=16777215&o;if(i&&g(t.slice(e,e+i)),1===c||0===i)break}}()}catch(t){throw b(f),u.error(t),t}const t=b(f);if(0!==t){const n=Rn(new r(\"end error:\"+t),t);throw u.error(n),n}u.close()},abort(t){b(f),u.error(t)}},{highWaterMark:1})};function g(t){h=!0,u.enqueue(t)}function v(){if(d){const t=d;d=null,t()}}function b(t){let n=0;return t.A&&t.F&&(n=t.F(t.A)),t.A=0,t.in&&Mn&&Mn(t.in),t.in=0,t.M&&Mn&&Mn(t.M),t.M=0,n}}class Pn{constructor(t=Sn,n){return xn(!0,t,n)}}class Dn{constructor(t=Sn,n){return xn(!1,t,n)}}Pn.requiresModule=!0,Dn.requiresModule=!0,Pn.supportedFormats=kn,Dn.supportedFormats=zn;const Fn=65536;let Un,Bn;function Wn(t){return new c(t.memory.buffer)}let On=!1;!function(t={}){const{init:n,U:e}=t,o=t.CompressionStreamFallback||t.CompressionStreamZlib,r=t.DecompressionStreamFallback||t.DecompressionStreamZlib;e&&(dt=e||G),self.initModule=async t=>{n&&await n(t),o&&(t.CompressionStreamFallback=o),r&&(t.DecompressionStreamFallback=r)}}({CompressionStreamFallback:Pn,DecompressionStreamFallback:Dn,U:function(t,n){const e=Un;let o=e?function(t,n,e){Bn||(Bn=t.malloc(Fn));const o=Bn?t.aes_hmac_new():0;if(o){const r=Wn(t);if(r.set(n,Bn),r.set(e,Bn+n.length),t.aes_hmac_init(o,Bn,n.length,Bn+n.length,e.length))return t.aes_hmac_end(o,0),0}return o}(e,t,n):0;if(!o)return G(t,n);const r=Bn;return{process(t,n){for(let c=0;c<t.length;c+=Fn){const s=t.subarray(c,c+Fn),a=Wn(e);a.set(s,r),e.aes_hmac_process(o,r,s.length,n?1:0),s.set(a.subarray(r,r+s.length))}},digest:()=>(e.aes_hmac_end(o,r),o=0,Wn(e).slice(r,r+20)),dispose(){o&&(e.aes_hmac_end(o,0),o=0)}}},init:t=>async function(t,{baseURI:n}){if(!On)try{await async function(t,n){let e,o;try{try{o=new URL(t,n)}catch{}const r=await fetch(o);e=await r.arrayBuffer()}catch(n){if(!t.startsWith(\"data:application/wasm;base64,\"))throw n;e=function(t){const n=t.split(\",\")[1],e=atob(n),o=e.length,r=new c(o);for(let t=0;t<o;++t)r[t]=e.charCodeAt(t);return r.buffer}(t)}const s=await WebAssembly.instantiate(e);var a;(function(t){if(Cn=t,({malloc:In,free:Mn,memory:An}=Cn),\"function\"!=typeof In||\"function\"!=typeof Mn||!An)throw Cn=In=Mn=An=null,new r(\"Invalid WASM module\")})(s.instance.exports),typeof(a=s.instance.exports).aes_hmac_new==k&&(Un=a,Bn=0)}(t,n),On=!0}catch(t){throw function(t){En=t}(t),t}}(t.wasmURI,t)})});\\n';if(\"string\"==typeof r&&(r=(new TextEncoder).encode(r)),t){const t=new Blob([r],{type:e});return URL.createObjectURL(t)}return\"data:\"+e+\";base64,\"+function(t){let e=\"\";const r=t.length;let o=0;for(;o+2<r;o+=3){const r=t[o]<<16|t[o+1]<<8|t[o+2];e+=n[r>>18&63]+n[r>>12&63]+n[r>>6&63]+n[63&r]}const s=r-o;if(1===s){const r=t[o]<<16;e+=n[r>>18&63]+n[r>>12&63]+\"==\"}else if(2===s){const r=t[o]<<16|t[o+1]<<8;e+=n[r>>18&63]+n[r>>12&63]+n[r>>6&63]+\"=\"}return e}(r)}});export{e as configureWebWorker};\n","/*\n Copyright (c) 2025 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 { setDefaultConfiguration } from \"./core/configuration.js\";\n\ntry {\n\tsetDefaultConfiguration({ baseURI: import.meta.url });\n} catch {\n\t// ignored\n}\n\nexport * from \"./zip-core-reader.js\";\nexport * from \"./zip-core-writer.js\";\nexport {\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\tSplitDataReader,\n\tSplitDataWriter,\n\tERR_HTTP_RANGE,\n\tERR_HTTP_STATUS,\n\tERR_HTTP_RESOURCE_CHANGED,\n\tERR_ITERATOR_COMPLETED_TOO_SOON,\n\tERR_WRITER_NOT_INITIALIZED,\n\tERR_WRITER_SIZE_NOT_WRITABLE\n} from \"./core/io.js\";\nexport {\n\tERR_INVALID_FUNCTION_OPTION,\n\tERR_INVALID_SIGNAL,\n\tERR_INVALID_PASS_THROUGH_VALUE,\n\tERR_ABORTED\n} from \"./core/options.js\";\nexport {\n\tgetMimeType\n} from \"./core/util/default-mime-type.js\";\nexport {\n\tconfigure,\n\tresetConfiguration,\n\tERR_INVALID_MAX_WORKERS,\n\tERR_INVALID_BASE_URI,\n\tERR_INVALID_URI\n} from \"./core/configuration.js\";\nexport {\n\tregisterCodec,\n\tunregisterCodec,\n\tgetRegisteredCodecs,\n\tERR_INVALID_CODEC_DEFINITION,\n\tERR_RESERVED_COMPRESSION_METHOD,\n\tERR_INVALID_CODEC_MODULE\n} from \"./core/codec-registry.js\";\nexport {\n\tgetSupportedCompressionMethods\n} from \"./core/compression-methods.js\";\nexport {\n\tVERSION\n} from \"./core/version.js\";\nexport {\n\tcreateOPFSTempStream\n} from \"./core/util/opfs-temp-stream.js\";\nexport {\n\tcreateBlobTempStream\n} from \"./core/util/blob-temp-stream.js\";\nexport {\n\tcreateSyncAccessHandleTempStream,\n\tERR_UNSUPPORTED_CONTEXT\n} from \"./core/util/sync-access-handle-temp-stream.js\";","/*\n Copyright (c) 2025 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, AbortController, structuredClone, DOMException, setTimeout, clearTimeout */\n\nimport {\n\tUNDEFINED_VALUE,\n\tFUNCTION_TYPE\n} from \"./constants.js\";\nimport { toExactUint8Array } from \"./util/array.js\";\nimport { isErrorObject } from \"./util/error.js\";\nimport {\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\";\nimport {\n\tsetWebWorkerBackend,\n\tdisableWebWorker,\n\tcreateWorkerInterface,\n\trunWorker,\n\tERR_WORKER_STARTUP_TIMEOUT\n} from \"./codec-worker.js\";\n\nconst MODULE_WORKER_OPTIONS = { type: \"module\" };\nconst ERROR_EVENT_TYPE = \"error\";\nconst MESSAGE_ERROR_EVENT_TYPE = \"messageerror\";\nconst ABORT_EVENT_TYPE = \"abort\";\n\nlet webWorkerSource, webWorkerURI, webWorkerOptions;\nlet transferStreamsSupported = true;\ntry {\n\ttransferStreamsSupported = typeof structuredClone == FUNCTION_TYPE && structuredClone(new DOMException(\"\", \"AbortError\")).code !== UNDEFINED_VALUE;\n} catch {\n\t// ignored\n}\n\nsetWebWorkerBackend(createWebWorkerInterface);\n\nfunction createWebWorkerInterface(workerData, config) {\n\tconst { baseURI, chunkSize, workerStartupTimeout } = config;\n\tlet { wasmURI } = config;\n\n\tif (!workerData.interface) {\n\t\t// deno-lint-ignore valid-typeof\n\t\tif (typeof wasmURI == FUNCTION_TYPE) {\n\t\t\twasmURI = wasmURI();\n\t\t}\n\t\tlet worker;\n\t\ttry {\n\t\t\tworker = getWebWorker(workerData.workerURI, baseURI, workerData);\n\t\t} catch {\n\t\t\tdisableWebWorker(workerData);\n\t\t\treturn createWorkerInterface(workerData, config);\n\t\t}\n\t\tObject.assign(workerData, {\n\t\t\tworker,\n\t\t\tworkerAlive: false,\n\t\t\tterminated: false,\n\t\t\tstartupError: null,\n\t\t\tinterface: {\n\t\t\t\trun: async () => {\n\t\t\t\t\ttry {\n\t\t\t\t\t\treturn await runWebWorker(workerData, { chunkSize, wasmURI, baseURI, workerStartupTimeout });\n\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\tif (error && error.workerStartupFailed) {\n\t\t\t\t\t\t\tdisableWebWorker(workerData);\n\t\t\t\t\t\t\treleaseWorkerStreams(workerData);\n\t\t\t\t\t\t\treturn runWorker(workerData, config);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (error && error.codecImportFailed) {\n\t\t\t\t\t\t\tif (workerData.reader) {\n\t\t\t\t\t\t\t\treleaseWorkerStreams(workerData);\n\t\t\t\t\t\t\t\treturn runWorker(workerData, config);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tworkerData.onTaskFinished();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthrow error;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n\treturn workerData.interface;\n}\n\nasync function runWebWorker(workerData, config) {\n\tif (!workerData.worker) {\n\t\tconst { startupError } = workerData;\n\t\tworkerData.startupError = null;\n\t\tconst error = startupError || new Error(ERR_WORKER_STARTUP_TIMEOUT);\n\t\terror.workerStartupFailed = true;\n\t\tthrow error;\n\t}\n\tlet resolveResult, rejectResult;\n\tconst result = new Promise((resolve, reject) => {\n\t\tresolveResult = resolve;\n\t\trejectResult = error => {\n\t\t\tconst { outputSize, workerOptions } = workerData;\n\t\t\tworkerOptions.outputSize = outputSize;\n\t\t\tif (isErrorObject(error)) {\n\t\t\t\ttry {\n\t\t\t\t\terror.outputSize = outputSize;\n\t\t\t\t} catch {\n\t\t\t\t\t// ignored\n\t\t\t\t}\n\t\t\t}\n\t\t\treject(error);\n\t\t};\n\t});\n\tObject.assign(workerData, {\n\t\treader: null,\n\t\twriter: null,\n\t\toutputSize: 0,\n\t\tdestinationFailed: false,\n\t\tdestinationError: null,\n\t\tresolveResult,\n\t\trejectResult,\n\t\tresult\n\t});\n\tconst { readable, options } = workerData;\n\tconst { writable, closed, abortPipe } = watchClosedStream(workerData.writable, workerData);\n\tlet streamsTransferred;\n\ttry {\n\t\tstreamsTransferred = sendMessage({\n\t\t\ttype: MESSAGE_START,\n\t\t\toptions,\n\t\t\tconfig,\n\t\t\treadable,\n\t\t\twritable\n\t\t}, workerData);\n\t} catch (error) {\n\t\tabortPipe();\n\t\ttry {\n\t\t\tawait closed;\n\t\t} catch {\n\t\t\t// ignored\n\t\t}\n\t\tworkerData.onTaskFinished();\n\t\tthrow error;\n\t}\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 { workerStartupTimeout } = config;\n\tif (!workerData.workerAlive && Number.isFinite(workerStartupTimeout) && workerStartupTimeout >= 0) {\n\t\tworkerData.startupTimeout = setTimeout(() => onStartupTimeout(workerData), workerStartupTimeout);\n\t}\n\ttry {\n\t\tconst resultValue = await result;\n\t\tawait closeWritable();\n\t\tawait closed;\n\t\treturn resultValue;\n\t} catch (error) {\n\t\tawait closeWritable();\n\t\tabortPipe();\n\t\ttry {\n\t\t\tawait closed;\n\t\t} catch {\n\t\t\t// ignored\n\t\t}\n\t\tconst { outputSize, workerOptions, destinationFailed, destinationError } = workerData;\n\t\tworkerOptions.outputSize = outputSize;\n\t\tconst workerFailed = isErrorObject(error) && (error.codecImportFailed || error.workerStartupFailed);\n\t\tconst reportedError = destinationFailed && !workerFailed ? destinationError : error;\n\t\tif (isErrorObject(reportedError)) {\n\t\t\ttry {\n\t\t\t\treportedError.outputSize = outputSize;\n\t\t\t} catch {\n\t\t\t\t// ignored\n\t\t\t}\n\t\t}\n\t\tthrow reportedError;\n\t}\n\n\tasync function closeWritable() {\n\t\tif (!streamsTransferred && !writable.locked) {\n\t\t\ttry {\n\t\t\t\tawait writable.getWriter().close();\n\t\t\t} catch {\n\t\t\t\t// ignored\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction watchClosedStream(writableSource, workerData) {\n\tconst abortController = new AbortController();\n\tlet aborting;\n\tconst { writable, readable } = new TransformStream({\n\t\ttransform(chunk, controller) {\n\t\t\tworkerData.outputSize += chunk.length;\n\t\t\tcontroller.enqueue(chunk);\n\t\t}\n\t});\n\tconst closed = readable.pipeTo(writableSource, { preventClose: true, preventAbort: true, signal: abortController.signal });\n\tclosed.catch(error => {\n\t\tif (!aborting) {\n\t\t\tObject.assign(workerData, { destinationFailed: true, destinationError: error });\n\t\t}\n\t});\n\tconst { signal } = workerData.workerOptions.streamOptions;\n\tif (signal) {\n\t\tconst onAbort = () => abortController.abort(signal.reason);\n\t\tconst removeAbortListener = () => signal.removeEventListener(ABORT_EVENT_TYPE, onAbort);\n\t\tsignal.addEventListener(ABORT_EVENT_TYPE, onAbort);\n\t\tclosed.then(removeAbortListener, removeAbortListener);\n\t}\n\treturn {\n\t\twritable, closed, abortPipe: () => {\n\t\t\taborting = true;\n\t\t\tabortController.abort();\n\t\t}\n\t};\n}\n\nfunction releaseWorkerStreams(workerData) {\n\tconst { reader } = workerData;\n\tif (reader) {\n\t\treader.releaseLock();\n\t}\n\tworkerData.reader = null;\n\tworkerData.writer = null;\n}\n\nfunction terminateWorker(workerData) {\n\tconst { worker } = workerData;\n\tif (worker) {\n\t\ttry {\n\t\t\tworker.terminate();\n\t\t} catch {\n\t\t\t// ignored\n\t\t}\n\t}\n\tworkerData.interface = null;\n}\n\nfunction getWebWorker(url, baseURI, workerData, isModuleType, useBlobURI = true) {\n\tconst { createWorker } = workerData;\n\tlet worker, resolvedURI, resolvedOptions;\n\tif (createWorker) {\n\t\tworker = createWorker();\n\t} else if (webWorkerURI === UNDEFINED_VALUE || webWorkerSource !== url) {\n\t\t// deno-lint-ignore valid-typeof\n\t\tconst isFunctionURI = typeof url == FUNCTION_TYPE;\n\t\tif (isFunctionURI) {\n\t\t\tresolvedURI = url(useBlobURI);\n\t\t} else {\n\t\t\tresolvedURI = url;\n\t\t}\n\t\tconst isDataURI = resolvedURI.startsWith(\"data:\");\n\t\tconst isBlobURI = resolvedURI.startsWith(\"blob:\");\n\t\tif (isDataURI || isBlobURI) {\n\t\t\tif (isModuleType === UNDEFINED_VALUE) {\n\t\t\t\tisModuleType = false;\n\t\t\t}\n\t\t\tif (isModuleType) {\n\t\t\t\tresolvedOptions = MODULE_WORKER_OPTIONS;\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tworker = new Worker(resolvedURI, resolvedOptions);\n\t\t\t} catch (error) {\n\t\t\t\tif (isBlobURI) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tURL.revokeObjectURL(resolvedURI);\n\t\t\t\t\t} catch {\n\t\t\t\t\t\t// ignored\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (isFunctionURI && isBlobURI) {\n\t\t\t\t\treturn getWebWorker(url, baseURI, workerData, isModuleType, false);\n\t\t\t\t} else if (!isModuleType) {\n\t\t\t\t\treturn getWebWorker(url, baseURI, workerData, true, false);\n\t\t\t\t} else {\n\t\t\t\t\tthrow error;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tif (isModuleType === UNDEFINED_VALUE) {\n\t\t\t\tisModuleType = true;\n\t\t\t}\n\t\t\tif (isModuleType) {\n\t\t\t\tresolvedOptions = MODULE_WORKER_OPTIONS;\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tresolvedURI = new URL(resolvedURI, baseURI);\n\t\t\t} catch {\n\t\t\t\t// ignored\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tworker = new Worker(resolvedURI, resolvedOptions);\n\t\t\t} catch (error) {\n\t\t\t\tif (isModuleType) {\n\t\t\t\t\treturn getWebWorker(url, baseURI, workerData, false, useBlobURI);\n\t\t\t\t} else {\n\t\t\t\t\tthrow error;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\twebWorkerSource = url;\n\t\twebWorkerURI = resolvedURI;\n\t\twebWorkerOptions = resolvedOptions;\n\t} else {\n\t\tworker = new Worker(webWorkerURI, webWorkerOptions);\n\t}\n\tworker.addEventListener(MESSAGE_EVENT_TYPE, event => {\n\t\tworkerData.workerAlive = true;\n\t\tclearStartupTimeout(workerData);\n\t\tonMessage(event, workerData);\n\t});\n\tworker.addEventListener(ERROR_EVENT_TYPE, event => onWorkerError(event, workerData));\n\tworker.addEventListener(MESSAGE_ERROR_EVENT_TYPE, event => onWorkerError(event, workerData));\n\treturn worker;\n}\n\nfunction onStartupTimeout(workerData) {\n\tworkerData.startupTimeout = null;\n\tif (workerData.workerAlive) {\n\t\treturn;\n\t}\n\tconst { rejectResult, writer } = workerData;\n\tterminateWorker(workerData);\n\tworkerData.worker = null;\n\tif (rejectResult) {\n\t\tconst error = new Error(ERR_WORKER_STARTUP_TIMEOUT);\n\t\terror.workerStartupFailed = true;\n\t\trejectResult(error);\n\t\tif (writer) {\n\t\t\twriter.releaseLock();\n\t\t}\n\t}\n}\n\nfunction clearStartupTimeout(workerData) {\n\tconst { startupTimeout } = workerData;\n\tif (startupTimeout) {\n\t\tclearTimeout(startupTimeout);\n\t\tworkerData.startupTimeout = null;\n\t}\n}\n\nfunction onWorkerError(event, workerData) {\n\tif (event.preventDefault) {\n\t\tevent.preventDefault();\n\t}\n\tclearStartupTimeout(workerData);\n\tconst { workerAlive, rejectResult, writer, onTaskFinished } = workerData;\n\tterminateWorker(workerData);\n\tif (!workerAlive) {\n\t\tworkerData.worker = null;\n\t}\n\tlet error = event.error || new Error(event.message || ERROR_EVENT_TYPE);\n\tif (!workerAlive) {\n\t\terror = Object.assign(new Error(error.message || ERROR_EVENT_TYPE), { workerStartupFailed: true });\n\t\tworkerData.startupError = error;\n\t}\n\tif (rejectResult) {\n\t\trejectResult(error);\n\t\tif (writer) {\n\t\t\twriter.releaseLock();\n\t\t}\n\t\tif (workerAlive) {\n\t\t\tonTaskFinished();\n\t\t}\n\t}\n}\n\nfunction sendMessage(message, { worker, writer, transferStreams, workerAlive }) {\n\ttry {\n\t\tconst { value, readable, writable } = message;\n\t\tconst transferables = [];\n\t\tif (value) {\n\t\t\tmessage.value = toExactUint8Array(value);\n\t\t\ttransferables.push(message.value.buffer);\n\t\t}\n\t\tif (transferStreams && transferStreamsSupported && workerAlive) {\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 {\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\tthrow error;\n\t}\n}\n\nasync function onMessage({ data }, workerData) {\n\tconst { type, value, messageId, result, error, errorValue } = data;\n\tconst { reader, writer, resolveResult, rejectResult, onTaskFinished, generation } = workerData;\n\tconst stale = () => workerData.generation != generation;\n\ttry {\n\t\tif (error) {\n\t\t\tfail(getResponseError(error, errorValue));\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\tif (!stale()) {\n\t\t\t\t\tsendMessage({ type: MESSAGE_DATA, value, done, messageId }, workerData);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (type == MESSAGE_DATA) {\n\t\t\t\tconst chunk = new Uint8Array(value);\n\t\t\t\tawait writer.ready;\n\t\t\t\tawait writer.write(chunk);\n\t\t\t\tif (!stale()) {\n\t\t\t\t\tsendMessage({ type: MESSAGE_ACK_DATA, messageId }, workerData);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (type == MESSAGE_CLOSE) {\n\t\t\t\tsucceed(result);\n\t\t\t}\n\t\t}\n\t} catch (error) {\n\t\tif (!stale()) {\n\t\t\tterminateWorker(workerData);\n\t\t\tfail(error);\n\t\t}\n\t}\n\n\tfunction fail(error) {\n\t\tif (!stale()) {\n\t\t\trejectResult(error);\n\t\t\treleaseWriter();\n\t\t\tif (!(isErrorObject(error) && error.codecImportFailed)) {\n\t\t\t\tonTaskFinished();\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction succeed(result) {\n\t\tif (!stale()) {\n\t\t\tresolveResult(result);\n\t\t\treleaseWriter();\n\t\t\tonTaskFinished();\n\t\t}\n\t}\n\n\tfunction releaseWriter() {\n\t\tif (writer) {\n\t\t\twriter.releaseLock();\n\t\t}\n\t}\n}\n\nfunction getResponseError(errorData, errorValue) {\n\tconst { message, stack, code, name, outputSize, cause, codecImportFailed } = errorData;\n\tlet responseError;\n\tif (errorValue) {\n\t\tresponseError = errorValue.value;\n\t} else {\n\t\tresponseError = Object.assign(new Error(message), { stack, code, name });\n\t}\n\tif (isErrorObject(responseError)) {\n\t\ttry {\n\t\t\tif (outputSize !== UNDEFINED_VALUE) {\n\t\t\t\tresponseError.outputSize = outputSize;\n\t\t\t}\n\t\t\tif (codecImportFailed) {\n\t\t\t\tresponseError.codecImportFailed = true;\n\t\t\t}\n\t\t\tif (cause) {\n\t\t\t\tif (!isErrorObject(responseError.cause)) {\n\t\t\t\t\tresponseError.cause = Object.assign(new Error(cause.message), { name: cause.name });\n\t\t\t\t}\n\t\t\t\tif (cause.code !== UNDEFINED_VALUE && responseError.cause.code !== cause.code) {\n\t\t\t\t\tresponseError.cause.code = cause.code;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (errorValue) {\n\t\t\t\tif (responseError.name !== name) {\n\t\t\t\t\tresponseError.name = name;\n\t\t\t\t}\n\t\t\t\tif (responseError.code !== code) {\n\t\t\t\t\tresponseError.code = code;\n\t\t\t\t}\n\t\t\t}\n\t\t} catch {\n\t\t\t// ignored\n\t\t}\n\t}\n\treturn responseError;\n}\n","/*\n Copyright (c) 2025 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 \"./core/codec-worker-web.js\";\n\nexport {\n\tZipReader,\n\tZipReaderStream,\n\tisZipFile,\n\tERR_BAD_FORMAT,\n\tERR_EOCDR_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_CRC32,\n\tERR_INVALID_AUTHENTICATION_CODE,\n\tERR_INVALID_UNCOMPRESSED_SIZE,\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_COMPRESSED_DATA,\n\tERR_CODEC_OUT_OF_MEMORY,\n\tERR_SPLIT_ZIP_FILE,\n\tERR_OVERLAPPING_ENTRY,\n\tERR_ENTRY_DATA_OUT_OF_BOUNDS,\n\tERR_AMBIGUOUS_ARCHIVE,\n\tERR_ENCRYPTED_CENTRAL_DIRECTORY,\n\tERR_UNSAFE_FILENAME,\n\tERR_INVALID_STRICTNESS,\n\tERR_INVALID_FILENAME_VALIDATION,\n\tERR_INVALID_MAX_APPENDED_DATA_SIZE,\n\tERR_UNSUPPORTED_UINT64,\n\tERR_WORKER_STARTUP_TIMEOUT,\n\tWARNING_UNSORTED_CENTRAL_DIRECTORY,\n\tWARNING_UNKNOWN_VERSION,\n\tWARNING_COMPRESSED_PATCHED_DATA,\n\tWARNING_MALFORMED_EXTRA_FIELD,\n\tWARNING_UNKNOWN_ZIP64_EXTENSIBLE_DATA,\n\tWARNING_WRAPPED_ENTRIES_COUNT,\n\tWARNING_APPENDED_DATA,\n\tWARNING_PREPENDED_DATA,\n\tWARNING_PREPENDED_CENTRAL_DIRECTORY,\n\tWARNING_TRAILING_CENTRAL_DIRECTORY_DATA,\n\tWARNING_DUPLICATE_FILENAME,\n\tWARNING_MISMATCHED_ZIP64_END_OF_CENTRAL_DIRECTORY,\n\tWARNING_MULTIPLE_END_OF_CENTRAL_DIRECTORY,\n\tWARNING_MISMATCHED_LOCAL_FILE_HEADER_FILENAME,\n\tWARNING_MISMATCHED_LOCAL_FILE_HEADER_BIT_FLAG,\n\tWARNING_MISMATCHED_LOCAL_FILE_HEADER_COMPRESSION_METHOD,\n\tWARNING_MISMATCHED_LOCAL_FILE_HEADER_CRC32_OR_SIZES\n} from \"./core/zip-reader.js\";","/*\n Copyright (c) 2025 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, WritableStream */\n// deno-lint-ignore-file no-this-alias\n\n/*\n * Internal state invariants\n *\n * Positions:\n * - `zipWriter.offset` is the logical write position: the offset where the next entry will start\n * in the final archive. It includes `zipWriter.initialOffset` (see below) and is only updated\n * between entries, or by the recovery code in getFileEntry() when a write fails mid-entry.\n * - `writer.size` counts the bytes actually written into the writer. Between entries,\n * `zipWriter.offset - writer.size` is constant and equals `initialOffset`.\n * - `zipWriter.initialOffset` is the number of bytes assumed to be prepended to the final archive\n * (i.e. to the first segment when the archive is split): the `offset` option minus the data\n * already stored in the writer. Positions within the first segment include it; positions within\n * the other segments do not, see getSegmentOffset().\n * - For split archives, `writer.diskOffset` is the total size of the closed segments and\n * `writer.diskNumber` the index of the current segment. `writer.availableSize` is the remaining\n * capacity of the current segment; `writer.closeDisk()` ends it, the next segment being opened\n * when more data is written. This is how header records are kept whole within a segment, as\n * required by APPNOTE section 8.5.2. These properties only exist on split writers; the\n * getDiskNumber(), getDiskOffset() and exceedsAvailableSize() accessors default them otherwise.\n * - The segment coordinates of an entry (`diskNumberStart` and `offset`) must be read after\n * calling skipDiskIfNeeded() and while holding the writer lock; they are unstable otherwise.\n *\n * Scheduling:\n * - The central directory order (i.e. the order in which entries are listed by getEntries()) is\n * the insertion order of the `fileEntries` map. addFile() reserves each entry's slot synchronously in\n * add() call order, before initializing the reader, so concurrent entries whose readers\n * initialize at different speeds are still listed in call order.\n * - `fileEntry.lockFileEntry` chains every entry to the previous one; awaiting it serializes the\n * physical writes when `keepOrder` is set. addFile() claims the link in the same synchronous\n * prologue as the central directory slot, so the physical layout follows the add() call order\n * as well, whatever the readers do. The lock is released for every entry, including the ones\n * failing before they reach getFileEntry().\n * - `zipWriter.lockWriter`/`writerLocked` is the mutex over the writer; only the holder may write\n * into it or read the position variables above.\n * - At most one entry is written directly into the writer at a time, every other one is buffered.\n * `bufferedWrites`/`directWrites` record the choice in the same synchronous block that makes it,\n * because `writerLocked` is only raised an await later: concurrent add() calls all decide before\n * that, and would all pick the direct path and then serialize on the previous entry's lock.\n * - Both write paths await the lock of the previous entry before requesting the writer lock.\n * Requesting it first would deadlock an entry written directly into the writer (i.e. without\n * being buffered) against a buffered predecessor, which needs that same lock to be flushed.\n * - `lastFileEntry` is the tail of the lock chain (the most recently added entry).\n *\n * Failures:\n * - When a write fails mid-entry, `zipWriter.offset` advances by the number of bytes written for\n * the entry so that the offsets of subsequent entries remain correct, and\n * `hasCorruptedEntries` is set on the ZipWriter.\n * - closeFile() does not update `zipWriter.offset`; the position of the central directory and of\n * the end of central directory records are derived from it.\n */\n\nimport {\n\tMAX_32_BITS,\n\tMAX_16_BITS,\n\tMAX_8_BITS,\n\tCOMPRESSION_METHOD_DEFLATE,\n\tCOMPRESSION_METHOD_DEFLATE_64,\n\tCOMPRESSION_METHOD_STORE,\n\tCOMPRESSION_METHOD_AES,\n\tSPLIT_ZIP_FILE_SIGNATURE,\n\tSPLIT_ZIP_FILE_SIGNATURE_LENGTH,\n\tLOCAL_FILE_HEADER_SIGNATURE,\n\tDATA_DESCRIPTOR_RECORD_SIGNATURE,\n\tDIGITAL_SIGNATURE_RECORD_SIGNATURE,\n\tCENTRAL_FILE_HEADER_SIGNATURE,\n\tCENTRAL_FILE_HEADER_LENGTH,\n\tEND_OF_CENTRAL_DIR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_SIGNATURE,\n\tDATA_DESCRIPTOR_RECORD_LENGTH,\n\tDATA_DESCRIPTOR_RECORD_ZIP_64_LENGTH,\n\tDATA_DESCRIPTOR_RECORD_SIGNATURE_LENGTH,\n\tEXTRAFIELD_TYPE_AES,\n\tEXTRAFIELD_TYPE_ZIP64,\n\tEXTRAFIELD_TYPE_EXTENDED_TIMESTAMP,\n\tEXTRAFIELD_TYPE_NTFS,\n\tEXTRAFIELD_TYPE_NTFS_TAG1,\n\tEXTRAFIELD_TYPE_USDZ,\n\tEXTRAFIELD_TYPE_INFOZIP,\n\tEXTRAFIELD_TYPE_UNIX,\n\tEND_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH,\n\tBITFLAG_ENCRYPTED,\n\tBITFLAG_DATA_DESCRIPTOR,\n\tBITFLAG_LANG_ENCODING_FLAG,\n\tBITFLAG_LEVEL,\n\tBITFLAG_LEVEL_FAST_MASK,\n\tBITFLAG_LEVEL_SUPER_FAST_MASK,\n\tBITFLAG_LEVEL_MAX_MASK,\n\tFILE_ATTR_MSDOS_DIR_MASK,\n\tFILE_ATTR_MSDOS_READONLY_MASK,\n\tFILE_ATTR_MSDOS_HIDDEN_MASK,\n\tFILE_ATTR_MSDOS_SYSTEM_MASK,\n\tFILE_ATTR_MSDOS_ARCHIVE_MASK,\n\tFILE_ATTR_UNIX_TYPE_DIR,\n\tFILE_ATTR_UNIX_TYPE_FILE,\n\tFILE_ATTR_UNIX_TYPE_MASK,\n\tFILE_ATTR_UNIX_TYPE_SYMLINK,\n\tFILE_ATTR_UNIX_EXECUTABLE_MASK,\n\tFILE_ATTR_UNIX_DEFAULT_MASK,\n\tFILE_ATTR_UNIX_SETUID_MASK,\n\tFILE_ATTR_UNIX_SETGID_MASK,\n\tFILE_ATTR_UNIX_STICKY_MASK,\n\tVERSION_STORE,\n\tVERSION_DEFLATE,\n\tVERSION_MADE_BY_MSDOS,\n\tVERSION_MADE_BY_UNIX,\n\tVERSION_ZIP64,\n\tVERSION_AES,\n\tDIRECTORY_SIGNATURE,\n\tHEADER_SIZE,\n\tHEADER_OFFSET_VERSION,\n\tHEADER_OFFSET_SIGNATURE,\n\tHEADER_OFFSET_COMPRESSED_SIZE,\n\tHEADER_OFFSET_UNCOMPRESSED_SIZE,\n\tHEADER_OFFSET_FILENAME_LENGTH,\n\tHEADER_OFFSET_EXTRAFIELD_LENGTH,\n\tLOCAL_HEADER_COMMON_OFFSET,\n\tMIN_DATE,\n\tMAX_DATE,\n\tUNDEFINED_VALUE,\n\tINFINITY_VALUE,\n\tOBJECT_TYPE,\n\tSTRING_TYPE,\n\tFUNCTION_TYPE,\n\tEMPTY_UINT8_ARRAY,\n\tSYMBOL_ASYNC_DISPOSE\n} from \"./constants.js\";\nimport { getConfiguration } from \"./configuration.js\";\nimport { getRegisteredCodec, ERR_UNSUPPORTED_COMPRESSION } from \"./codec-registry.js\";\nimport { supportsDeflate } from \"./codec-worker.js\";\nimport {\n\tCODEC_DEFLATE,\n\trunWorker,\n\tERR_UNSUPPORTED_CRYPTO_API\n} from \"./codec-pool.js\";\nimport {\n\tinitStream,\n\tcreateReadable,\n\treadUint8Array,\n\tGenericWriter,\n\tGenericReader,\n\tBlobReader,\n\townsWritable\n} from \"./io.js\";\nimport { encodeText } from \"./util/encode-text.js\";\nimport { concat, getDataView } from \"./util/array.js\";\nimport { addWarning } from \"./util/warnings.js\";\nimport { toCompatibleReadable, streamToBlob } from \"./util/compatible-streams.js\";\nimport { isErrorObject } from \"./util/error.js\";\nimport {\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_RAW_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_CREATION_DATE,\n\tPROPERTY_NAME_INTERNAL_FILE_ATTRIBUTES,\n\tPROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTES,\n\tPROPERTY_NAME_MS_DOS_COMPATIBLE,\n\tPROPERTY_NAME_ZIP64,\n\tPROPERTY_NAME_ENCRYPTED,\n\tPROPERTY_NAME_VERSION,\n\tPROPERTY_NAME_VERSION_MADE_BY,\n\tPROPERTY_NAME_ZIPCRYPTO,\n\tPROPERTY_NAME_DIRECTORY,\n\tPROPERTY_NAME_EXECUTABLE,\n\tPROPERTY_NAME_COMPRESSION_METHOD,\n\tPROPERTY_NAME_SIGNATURE,\n\tPROPERTY_NAME_COMMENT,\n\tPROPERTY_NAME_UNCOMPRESSED_SIZE,\n\tPROPERTY_NAME_EXTRA_FIELD,\n\tPROPERTY_NAME_UID,\n\tPROPERTY_NAME_GID,\n\tPROPERTY_NAME_UNIX_MODE,\n\tPROPERTY_NAME_SETUID,\n\tPROPERTY_NAME_SETGID,\n\tPROPERTY_NAME_STICKY,\n\tPROPERTY_NAME_MSDOS_ATTRIBUTES,\n\tPROPERTY_NAME_MSDOS_ATTRIBUTES_RAW,\n\tEntry,\n\tgetEncryptionOverhead,\n\tgetUserExtraField\n} from \"./zip-entry.js\";\nimport {\n\tOPTION_PASSWORD,\n\tOPTION_RAW_PASSWORD,\n\tOPTION_PASS_THROUGH,\n\tOPTION_SIGNAL,\n\tOPTION_USE_WEB_WORKERS,\n\tOPTION_USE_COMPRESSION_STREAM,\n\tOPTION_TRANSFER_STREAMS,\n\tOPTION_PREVENT_CLOSE,\n\tOPTION_ENCRYPTION_STRENGTH,\n\tOPTION_EXTENDED_TIMESTAMP,\n\tOPTION_NTFS_TIMESTAMP,\n\tOPTION_KEEP_ORDER,\n\tOPTION_LEVEL,\n\tOPTION_BUFFERED_WRITE,\n\tOPTION_CREATE_TEMP_STREAM,\n\tOPTION_DATA_DESCRIPTOR_SIGNATURE,\n\tOPTION_USE_UNICODE_FILE_NAMES,\n\tOPTION_DATA_DESCRIPTOR,\n\tOPTION_SUPPORT_ZIP64_SPLIT_FILE,\n\tOPTION_ENCODE_TEXT,\n\tOPTION_OFFSET,\n\tOPTION_USDZ,\n\tOPTION_UNIX_EXTRA_FIELD_TYPE,\n\tOPTION_LOCAL_EXTRA_FIELD,\n\tOPTION_CENTRAL_EXTRA_FIELD,\n\tOPTION_SIGN_CENTRAL_DIRECTORY,\n\tTEXT_TYPE_FILENAME,\n\tTEXT_TYPE_COMMENT,\n\tERR_INVALID_PASSWORD_TYPE,\n\tcheckFunctionOption,\n\tcheckSignalOption,\n\tthrowIfAborted,\n\tcheckPasswordOption,\n\tcheckPassThroughOption,\n\tcheckInteger,\n\tcheckIntegerOption,\n\ttoNumber,\n\tOPTION_ENTRY,\n\tPASS_THROUGH_COMPRESSED\n} from \"./options.js\";\n\nconst ERR_DUPLICATED_NAME = \"File already exists\";\nconst ERR_INVALID_COMMENT = \"Zip file comment exceeds 64KB\";\nconst ERR_INVALID_COMMENT_TYPE = \"Invalid zip file comment (must be a Uint8Array)\";\nconst ERR_INVALID_ENTRY_COMMENT = \"File entry comment exceeds 64KB\";\nconst ERR_INVALID_ENTRY_COMMENT_TYPE = \"Invalid file entry comment (must be a string)\";\nconst ERR_INVALID_DATE = \"Invalid date (must be a valid Date instance)\";\nconst ERR_INVALID_ENTRY_NAME = \"File entry name exceeds 64KB\";\nconst ERR_INVALID_VERSION = \"Version exceeds 65535\";\nconst ERR_INVALID_ENCRYPTION_STRENGTH = \"The strength must equal 1, 2, or 3\";\nconst ERR_UNSUPPORTED_ENCRYPTION_USDZ = \"Encryption is not supported in USDZ files\";\nconst ERR_UNSUPPORTED_SPLIT_USDZ = \"Split zip files are not supported in USDZ files\";\nconst ERR_UNSUPPORTED_ENCRYPTION_PASS_THROUGH = \"Encryption is not supported when the 'passThrough' option is set to true (use 'compressed' instead)\";\nconst ERR_INVALID_EXTRAFIELD = \"Invalid extra field (must be a Map)\";\nconst ERR_INVALID_EXTRAFIELD_TYPE = \"Invalid extra field type (must be integer 0..65535)\";\nconst ERR_INVALID_EXTRAFIELD_DATA_TYPE = \"Invalid extra field data (must be a Uint8Array)\";\nconst ERR_INVALID_EXTRAFIELD_DATA = \"Extra field data exceeds 64KB\";\nconst MIN_UNIX_TIME = -2147483648;\nconst MAX_UNIX_TIME = 2147483647;\nconst MIN_NTFS_TIME = BigInt(0);\nconst MAX_NTFS_TIME = BigInt(\"0x7fffffffffffffff\");\nconst ERR_UNSUPPORTED_FORMAT = \"Zip64 is not supported (set the 'zip64' option to 'true')\";\nconst ERR_UNDEFINED_UNCOMPRESSED_SIZE = \"Undefined uncompressed size\";\nconst ERR_UNDEFINED_COMPRESSION_METHOD = \"Undefined compression method\";\nconst ERR_UNDEFINED_CRC32 = \"Undefined CRC32\";\nconst ERR_UNDETERMINED_SIZE = \"Undetermined size\";\nconst ERR_UNDEFINED_READER = \"Undefined reader\";\nconst ERR_INVALID_READER = \"Invalid reader (must be a Reader instance, a ReadableStream instance, or an object with a 'readable' property)\";\nconst ERR_ZIP_NOT_EMPTY = \"Zip file not empty\";\nconst ERR_INVALID_UID = \"Invalid uid (must be integer 0..2^32-1)\";\nconst ERR_INVALID_GID = \"Invalid gid (must be integer 0..2^32-1)\";\nconst ERR_INVALID_UNIX_MODE = \"Invalid UNIX mode (must be integer 0..65535)\";\nconst ERR_INVALID_UNIX_EXTRA_FIELD_TYPE = \"Invalid unixExtraFieldType (must be 'infozip' or 'unix')\";\nconst ERR_INVALID_UNIX_ID_SIZE = \"uid/gid must be 0..65535 for unixExtraFieldType 'unix' (use 'infozip' for larger ids)\";\nconst ERR_INVALID_MSDOS_ATTRIBUTES = \"Invalid msdosAttributesRaw (must be integer 0..255)\";\nconst ERR_INVALID_MSDOS_DATA = \"Invalid msdosAttributes (must be an object with boolean flags)\";\nconst ERR_INVALID_LEVEL = \"Invalid level (must be integer 0..9)\";\nconst ERR_INVALID_SIGNATURE_DATA = \"Signature data exceeds 64KB\";\nconst ERR_INVALID_ENTRY = \"Invalid entry option (must be an entry returned by ZipReader#getEntries())\";\nconst ERR_ZIP_CRYPTO_LAST_MOD_DATE = \"The last modification date of an entry encrypted with ZipCrypto cannot be changed when passThrough is set\";\nconst WARNING_COMPRESSION_UNAVAILABLE = \"compression unavailable\";\nconst WARNING_CLAMPED_LAST_MODIFICATION_DATE = \"clamped last modification date\";\n\nconst EXTRAFIELD_DATA_AES = new Uint8Array([0x07, 0x00, 0x02, 0x00, 0x41, 0x45, 0x03, 0x00, 0x00]);\nconst EXTRAFIELD_OFFSET_AES_VENDOR_VERSION = 4;\nconst EXTRAFIELD_OFFSET_AES_COMPRESSION_METHOD = 9;\nconst EXTRAFIELD_USDZ_MAX_LENGTH = 67;\nconst MIN_PRINTABLE_ASCII_CHARACTER_CODE = 0x20;\nconst MAX_PRINTABLE_ASCII_CHARACTER_CODE = 0x7e;\nconst VENDOR_VERSION_AE_1 = 1;\nconst INFOZIP_EXTRA_FIELD_TYPE = \"infozip\";\nconst UNIX_EXTRA_FIELD_TYPE = \"unix\";\nconst LEVEL_BY_BITFLAG_LEVEL = [8, 9, 5, 3];\nconst MAX_LEVEL = 9;\n\nlet workers = 0;\nconst pendingEntries = [];\n\nclass ZipWriter {\n\n\tconstructor(writer, options = {}) {\n\t\twriter = new GenericWriter(writer);\n\t\tconst { availableSize = INFINITY_VALUE, maxSize = INFINITY_VALUE } = writer;\n\t\tconst addSplitZipSignature =\n\t\t\tavailableSize > 0 && availableSize !== INFINITY_VALUE &&\n\t\t\tmaxSize > 0 && maxSize !== INFINITY_VALUE;\n\t\tif (addSplitZipSignature && options[OPTION_USDZ]) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_SPLIT_USDZ);\n\t\t}\n\t\tObject.assign(this, {\n\t\t\twriter,\n\t\t\taddSplitZipSignature,\n\t\t\toptions,\n\t\t\tfileEntries: new Map(),\n\t\t\tfilenames: new Set(),\n\t\t\toffset: options[OPTION_OFFSET] === UNDEFINED_VALUE ? writer.size || writer.writable.size || 0 : options[OPTION_OFFSET],\n\t\t\tinitialOffset: options[OPTION_OFFSET] === UNDEFINED_VALUE ? 0 : options[OPTION_OFFSET] - (writer.size || writer.writable.size || 0),\n\t\t\tpendingAddFileCalls: new Set(),\n\t\t\tpendingErrors: [],\n\t\t\twarnings: [],\n\t\t\tbufferedWrites: 0,\n\t\t\tdirectWrites: 0,\n\t\t\tlastFileEntry: UNDEFINED_VALUE,\n\t\t\tarchiveClosed: false\n\t\t});\n\t}\n\n\tprependZip(reader) {\n\t\treturn watchPromiseError(this, prependZipEntries(this, reader));\n\t}\n\n\tappendZip(reader) {\n\t\treturn watchPromiseError(this, this.appendZipEntries(reader));\n\t}\n\n\tasync appendZipEntries(reader) {\n\t\tconst zipWriter = this;\n\t\tconst { pendingAddFileCalls, filenames, fileEntries } = zipWriter;\n\t\twhile (pendingAddFileCalls.size) {\n\t\t\tawait Promise.allSettled(Array.from(pendingAddFileCalls));\n\t\t}\n\t\tlet resolveAppendZip;\n\t\tconst promiseAppendZip = new Promise(resolve => resolveAppendZip = resolve);\n\t\tpendingAddFileCalls.add(promiseAppendZip);\n\t\tconst appendedFilenames = [];\n\t\tlet releaseLockWriter;\n\t\ttry {\n\t\t\treader = new GenericReader(reader);\n\t\t\tawait initStream(reader);\n\t\t\tif (reader.size === UNDEFINED_VALUE || !reader.readUint8Array) {\n\t\t\t\treader = new BlobReader(await streamToBlob(reader.readable));\n\t\t\t\tawait initStream(reader);\n\t\t\t}\n\t\t\tconst { ZipReader } = await import(\"./zip-reader.js\");\n\t\t\tconst zipReader = new ZipReader(reader);\n\t\t\tconst entries = await zipReader.getEntries();\n\t\t\tawait zipReader.close();\n\t\t\tawait initStream(zipWriter.writer);\n\t\t\tconst { directoryOffset } = zipReader;\n\t\t\tentries.forEach(({ filename }) => {\n\t\t\t\tif (filenames.has(filename)) {\n\t\t\t\t\tthrow new Error(ERR_DUPLICATED_NAME);\n\t\t\t\t}\n\t\t\t\tfilenames.add(filename);\n\t\t\t\tappendedFilenames.push(filename);\n\t\t\t});\n\t\t\tzipWriter.writerLocked = true;\n\t\t\tconst { lockWriter } = zipWriter;\n\t\t\tzipWriter.lockWriter = new Promise(resolve => releaseLockWriter = () => {\n\t\t\t\tzipWriter.writerLocked = false;\n\t\t\t\tresolve();\n\t\t\t});\n\t\t\tawait lockWriter;\n\t\t\tif (zipWriter.addSplitZipSignature) {\n\t\t\t\tdelete zipWriter.addSplitZipSignature;\n\t\t\t\tif (!await startsWithSplitZipSignature(reader)) {\n\t\t\t\t\tawait writeData(zipWriter.writer, getSplitZipSignatureArray());\n\t\t\t\t\tzipWriter.offset += SPLIT_ZIP_FILE_SIGNATURE_LENGTH;\n\t\t\t\t}\n\t\t\t}\n\t\t\tconst entryPositions = await copyZipData(zipWriter, reader, entries, directoryOffset);\n\t\t\tentries.forEach(entry => {\n\t\t\t\tconst {\n\t\t\t\t\tversion,\n\t\t\t\t\trawLastModDate,\n\t\t\t\t\trawFilename,\n\t\t\t\t\tbitFlag,\n\t\t\t\t\tencrypted,\n\t\t\t\t\tuncompressedSize,\n\t\t\t\t\tcompressedSize,\n\t\t\t\t\textraFieldZip64\n\t\t\t\t} = entry;\n\t\t\t\tlet {\n\t\t\t\t\tcompressionMethod,\n\t\t\t\t\trawExtraField,\n\t\t\t\t} = entry;\n\t\t\t\tconst { level, languageEncodingFlag, dataDescriptor } = bitFlag;\n\t\t\t\trawExtraField = removeExtraFieldZip64(rawExtraField || EMPTY_UINT8_ARRAY);\n\t\t\t\tif (entry.extraFieldAES) {\n\t\t\t\t\tcompressionMethod = COMPRESSION_METHOD_AES;\n\t\t\t\t}\n\t\t\t\tconst extraFieldLength = getLength(rawExtraField);\n\t\t\t\tconst zip64UncompressedSize = Boolean(extraFieldZip64) && extraFieldZip64.uncompressedSize !== UNDEFINED_VALUE;\n\t\t\t\tconst zip64CompressedSize = Boolean(extraFieldZip64) && extraFieldZip64.compressedSize !== UNDEFINED_VALUE;\n\t\t\t\tconst bitFlagValue = (getBitFlag(level, languageEncodingFlag, dataDescriptor, encrypted, compressionMethod) & ~BITFLAG_LEVEL) | (level << 1);\n\t\t\t\tconst {\n\t\t\t\t\theaderArray,\n\t\t\t\t\theaderView\n\t\t\t\t} = getHeaderArrayData({\n\t\t\t\t\tversion,\n\t\t\t\t\tbitFlag: bitFlagValue,\n\t\t\t\t\tcompressionMethod,\n\t\t\t\t\tuncompressedSize,\n\t\t\t\t\tcompressedSize,\n\t\t\t\t\trawLastModDate,\n\t\t\t\t\trawFilename,\n\t\t\t\t\tzip64CompressedSize,\n\t\t\t\t\tzip64UncompressedSize,\n\t\t\t\t\textraFieldLength\n\t\t\t\t});\n\t\t\t\tconst { crc32 } = entry;\n\t\t\t\tif (crc32 !== UNDEFINED_VALUE) {\n\t\t\t\t\tsetUint32(headerView, HEADER_OFFSET_SIGNATURE, crc32);\n\t\t\t\t}\n\t\t\t\tconst { offset, diskNumberStart } = entryPositions.get(entry);\n\t\t\t\tObject.assign(entry, {\n\t\t\t\t\tzip64Enabled: true,\n\t\t\t\t\tzip64UncompressedSize,\n\t\t\t\t\tzip64CompressedSize,\n\t\t\t\t\toffset,\n\t\t\t\t\tdiskNumberStart,\n\t\t\t\t\tzip64DiskNumberStart: false,\n\t\t\t\t\trawExtraFieldZip64: EMPTY_UINT8_ARRAY,\n\t\t\t\t\trawExtraFieldAES: EMPTY_UINT8_ARRAY,\n\t\t\t\t\trawExtraFieldExtendedTimestamp: EMPTY_UINT8_ARRAY,\n\t\t\t\t\trawExtraFieldNTFS: EMPTY_UINT8_ARRAY,\n\t\t\t\t\trawExtraFieldUnix: EMPTY_UINT8_ARRAY,\n\t\t\t\t\trawExtraField,\n\t\t\t\t\trawCentralExtraField: EMPTY_UINT8_ARRAY,\n\t\t\t\t\theaderArray,\n\t\t\t\t\theaderView\n\t\t\t\t});\n\t\t\t\tfileEntries.set(entry.filename, entry);\n\t\t\t});\n\t\t} catch (error) {\n\t\t\tappendedFilenames.forEach(filename => filenames.delete(filename));\n\t\t\tthrow error;\n\t\t} finally {\n\t\t\tresolveAppendZip();\n\t\t\tpendingAddFileCalls.delete(promiseAppendZip);\n\t\t\tif (releaseLockWriter) {\n\t\t\t\treleaseLockWriter();\n\t\t\t}\n\t\t}\n\t}\n\n\tadd(name = \"\", reader, options = {}) {\n\t\tconst zipWriter = this;\n\t\tconst { pendingAddFileCalls } = zipWriter;\n\t\tconst promiseAddFile = addFileEntry(zipWriter, name, reader, options);\n\t\tpendingAddFileCalls.add(promiseAddFile);\n\t\tconst deletePendingAddFileCall = () => pendingAddFileCalls.delete(promiseAddFile);\n\t\tPromise.prototype.then.call(promiseAddFile, deletePendingAddFileCall, deletePendingAddFileCall);\n\t\treturn watchPromiseError(zipWriter, promiseAddFile);\n\t}\n\n\tremove(entry) {\n\t\tconst { filenames, fileEntries } = this;\n\t\t// deno-lint-ignore valid-typeof\n\t\tif (typeof entry == STRING_TYPE) {\n\t\t\tentry = fileEntries.get(entry);\n\t\t}\n\t\tif (entry && entry.filename !== UNDEFINED_VALUE) {\n\t\t\tconst { filename } = entry;\n\t\t\tif (filenames.has(filename) && fileEntries.has(filename)) {\n\t\t\t\tfilenames.delete(filename);\n\t\t\t\tfileEntries.delete(filename);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}\n\n\tasync close(comment = EMPTY_UINT8_ARRAY, options = {}) {\n\t\tconst zipWriter = this;\n\t\tconst { pendingAddFileCalls, writer } = this;\n\t\tconst { writable } = writer;\n\t\tif (zipWriter.archiveClosed) {\n\t\t\treturn getWriterData(writer);\n\t\t}\n\t\tif (!(comment instanceof Uint8Array)) {\n\t\t\tthrow new Error(ERR_INVALID_COMMENT_TYPE);\n\t\t}\n\t\tif (getLength(comment) > MAX_16_BITS) {\n\t\t\tthrow new Error(ERR_INVALID_COMMENT);\n\t\t}\n\t\twhile (pendingAddFileCalls.size) {\n\t\t\tawait Promise.allSettled(Array.from(pendingAddFileCalls));\n\t\t}\n\t\tawait Promise.allSettled(zipWriter.pendingErrors.map(watcher => watcher.recorded));\n\t\tconst unobservedWatchers = zipWriter.pendingErrors.filter(watcher => watcher.failed && !watcher.observed);\n\t\tif (unobservedWatchers.length) {\n\t\t\tconst unobservedErrors = unobservedWatchers.map(watcher => watcher.error);\n\t\t\tunobservedWatchers.forEach(watcher => watcher.observed = true);\n\t\t\tconst [error] = unobservedErrors;\n\t\t\ttry {\n\t\t\t\terror.entryErrors = unobservedErrors;\n\t\t\t} catch {\n\t\t\t\t// ignored\n\t\t\t}\n\t\t\tthrow error;\n\t\t}\n\t\tawait closeFile(zipWriter, comment, options);\n\t\tzipWriter.archiveClosed = true;\n\t\tconst preventClose = !ownsWritable(writer) && getOptionValue(zipWriter, options, OPTION_PREVENT_CLOSE);\n\t\tif (!preventClose) {\n\t\t\tawait writable.getWriter().close();\n\t\t}\n\t\treturn getWriterData(writer);\n\t}\n\n\t[SYMBOL_ASYNC_DISPOSE]() {\n\t\treturn this.close();\n\t}\n}\n\nclass ZipWriterStream {\n\n\tconstructor(options = {}) {\n\t\tconst { readable, writable } = new TransformStream();\n\t\tthis.readable = readable;\n\t\tthis.zipWriter = new ZipWriter(writable, options);\n\t\tthis.pendingAddFileCalls = new Set();\n\t}\n\n\ttransform(path) {\n\t\tconst zipWriter = this.zipWriter;\n\t\tlet streamController;\n\t\tconst { readable, writable } = new TransformStream({\n\t\t\tstart(controller) {\n\t\t\t\tstreamController = controller;\n\t\t\t},\n\t\t\tflush: () => void closeArchive()\n\t\t});\n\t\twatchAddFileCall(this, this.zipWriter.add(path, readable), error => streamController.error(error));\n\t\treturn { readable: this.readable, writable };\n\n\t\tasync function closeArchive() {\n\t\t\ttry {\n\t\t\t\tawait zipWriter.close();\n\t\t\t} catch (error) {\n\t\t\t\tawait abortWritable(zipWriter, error);\n\t\t\t}\n\t\t}\n\t}\n\n\twritable(path) {\n\t\tlet streamController;\n\t\tconst { readable, writable } = new TransformStream({\n\t\t\tstart(controller) {\n\t\t\t\tstreamController = controller;\n\t\t\t}\n\t\t});\n\t\twatchAddFileCall(this, this.zipWriter.add(path, readable), error => streamController.error(error));\n\t\treturn writable;\n\t}\n\n\tasync close(comment = UNDEFINED_VALUE, options = {}) {\n\t\tconst { zipWriter } = this;\n\t\tconst results = await Promise.allSettled(Array.from(this.pendingAddFileCalls));\n\t\tconst entryErrors = results.filter(result => result.status == \"rejected\").map(result => result.reason);\n\t\tif (entryErrors.length) {\n\t\t\tconst [error] = entryErrors;\n\t\t\ttry {\n\t\t\t\terror.entryErrors = entryErrors;\n\t\t\t} catch {\n\t\t\t\t// ignored\n\t\t\t}\n\t\t\tawait abortWritable(zipWriter, error);\n\t\t\tthrow error;\n\t\t}\n\t\ttry {\n\t\t\treturn await zipWriter.close(comment, options);\n\t\t} catch (error) {\n\t\t\tawait abortWritable(zipWriter, error);\n\t\t\tthrow error;\n\t\t}\n\t}\n}\n\nclass WatchedPromise extends Promise {\n\n\tthen(onFulfilled, onRejected) {\n\t\tconst { watcher } = this;\n\t\tif (watcher) {\n\t\t\twatcher.observed = true;\n\t\t}\n\t\treturn super.then(onFulfilled, onRejected);\n\t}\n}\n\nfunction getWriterData(writer) {\n\treturn writer.getData ? writer.getData() : writer.writable;\n}\n\nfunction watchPromiseError(zipWriter, promise) {\n\tconst watchedPromise = new WatchedPromise((resolve, reject) => Promise.prototype.then.call(promise, resolve, reject));\n\tconst watcher = {};\n\twatchedPromise.watcher = watcher;\n\twatcher.recorded = Promise.prototype.then.call(watchedPromise, UNDEFINED_VALUE,\n\t\terror => Object.assign(watcher, { failed: true, error }));\n\tzipWriter.pendingErrors.push(watcher);\n\treturn watchedPromise;\n}\n\nasync function prependZipEntries(zipWriter, reader) {\n\tif (zipWriter.filenames.size) {\n\t\tthrow new Error(ERR_ZIP_NOT_EMPTY);\n\t}\n\tawait zipWriter.appendZipEntries(reader);\n}\n\nasync function addFileEntry(zipWriter, name, reader, options) {\n\toptions = Object.assign({}, options);\n\tconst entry = options[OPTION_ENTRY];\n\tif (entry !== UNDEFINED_VALUE) {\n\t\tconst { entryOptions, passThroughOptions } = getSourceEntryOptions(entry,\n\t\t\tcheckPassThroughOption(getOptionValue(zipWriter, options, OPTION_PASS_THROUGH)),\n\t\t\tgetOptionValue(zipWriter, options, PROPERTY_NAME_LAST_MODIFICATION_DATE));\n\t\tdelete options[OPTION_ENTRY];\n\t\toptions = Object.assign(entryOptions, passThroughOptions, options);\n\t}\n\tif (getOptionValue(zipWriter, options, PROPERTY_NAME_DIRECTORY) && !name.endsWith(DIRECTORY_SIGNATURE)) {\n\t\tname += DIRECTORY_SIGNATURE;\n\t}\n\tif (zipWriter.filenames.has(name)) {\n\t\tthrow new Error(ERR_DUPLICATED_NAME);\n\t}\n\tzipWriter.filenames.add(name);\n\tif (workers < getConfiguration().maxWorkers) {\n\t\tworkers++;\n\t} else {\n\t\tawait new Promise(resolve => pendingEntries.push(resolve));\n\t}\n\ttry {\n\t\treturn await addFile(zipWriter, name, reader, options);\n\t} catch (error) {\n\t\tzipWriter.filenames.delete(name);\n\t\tthrow error;\n\t} finally {\n\t\tconst pendingEntry = pendingEntries.shift();\n\t\tif (pendingEntry) {\n\t\t\tpendingEntry();\n\t\t} else {\n\t\t\tworkers--;\n\t\t}\n\t}\n}\n\nasync function abortWritable(zipWriter, error) {\n\ttry {\n\t\tawait zipWriter.writer.writable.abort(error);\n\t} catch {\n\t\t// ignored\n\t}\n}\n\nfunction watchAddFileCall(zipWriterStream, promiseAddFile, onerror) {\n\tzipWriterStream.pendingAddFileCalls.add(promiseAddFile);\n\tpromiseAddFile.catch(error => {\n\t\ttry {\n\t\t\tonerror(error);\n\t\t} catch {\n\t\t\t// ignored\n\t\t}\n\t});\n}\n\nexport {\n\tZipWriter,\n\tZipWriterStream,\n\tgetEntriesSize,\n\tgetSourceEntryOptions,\n\tERR_DUPLICATED_NAME,\n\tERR_INVALID_COMMENT,\n\tERR_INVALID_COMMENT_TYPE,\n\tERR_INVALID_ENTRY_NAME,\n\tERR_INVALID_ENTRY_COMMENT,\n\tERR_INVALID_ENTRY_COMMENT_TYPE,\n\tERR_INVALID_DATE,\n\tERR_INVALID_VERSION,\n\tERR_INVALID_EXTRAFIELD,\n\tERR_INVALID_EXTRAFIELD_TYPE,\n\tERR_INVALID_EXTRAFIELD_DATA_TYPE,\n\tERR_INVALID_EXTRAFIELD_DATA,\n\tERR_INVALID_ENCRYPTION_STRENGTH,\n\tERR_UNSUPPORTED_ENCRYPTION_USDZ,\n\tERR_UNSUPPORTED_SPLIT_USDZ,\n\tERR_UNSUPPORTED_ENCRYPTION_PASS_THROUGH,\n\tERR_UNSUPPORTED_FORMAT,\n\tERR_UNDEFINED_UNCOMPRESSED_SIZE,\n\tERR_UNDEFINED_COMPRESSION_METHOD,\n\tERR_UNDEFINED_CRC32,\n\tERR_UNDETERMINED_SIZE,\n\tERR_UNDEFINED_READER,\n\tERR_INVALID_READER,\n\tERR_ZIP_NOT_EMPTY,\n\tERR_INVALID_SIGNATURE_DATA,\n\tERR_INVALID_ENTRY,\n\tERR_ZIP_CRYPTO_LAST_MOD_DATE,\n\tERR_INVALID_UID,\n\tERR_INVALID_GID,\n\tERR_INVALID_UNIX_MODE,\n\tERR_INVALID_UNIX_EXTRA_FIELD_TYPE,\n\tERR_INVALID_UNIX_ID_SIZE,\n\tERR_INVALID_MSDOS_ATTRIBUTES,\n\tERR_INVALID_MSDOS_DATA,\n\tERR_INVALID_LEVEL,\n\tERR_INVALID_PASSWORD_TYPE,\n\tERR_UNSUPPORTED_CRYPTO_API,\n\tWARNING_COMPRESSION_UNAVAILABLE,\n\tWARNING_CLAMPED_LAST_MODIFICATION_DATE\n};\n\nasync function addFile(zipWriter, name, reader, options) {\n\tconst attributesInfo = resolveAttributes(zipWriter, name, options);\n\t({ name } = attributesInfo);\n\tconst metadataInfo = resolveMetadata(zipWriter, name, options);\n\tconst { comment } = metadataInfo;\n\tconst extraField = options[PROPERTY_NAME_EXTRA_FIELD];\n\tzipWriter.fileEntries.set(name, UNDEFINED_VALUE);\n\tconst previousFileEntry = zipWriter.lastFileEntry;\n\tconst pendingFileEntry = {};\n\tlet releaseLockFileEntry;\n\tif (metadataInfo.resolvedOptions.keepOrder) {\n\t\tpendingFileEntry.lockFileEntry = new Promise(resolve => releaseLockFileEntry = resolve);\n\t}\n\tzipWriter.lastFileEntry = pendingFileEntry;\n\tlet fileEntry;\n\ttry {\n\t\tconst { resolvedOptions } = metadataInfo;\n\t\tif (resolvedOptions.level != 0 && resolvedOptions.compressionMethod === UNDEFINED_VALUE &&\n\t\t\t!resolvedOptions.passThroughCompression && !(await supportsDeflate(getConfiguration()))) {\n\t\t\tresolvedOptions.level = 0;\n\t\t\taddWarning(zipWriter.warnings, WARNING_COMPRESSION_UNAVAILABLE, name);\n\t\t}\n\t\tconst sizesInfo = await resolveSizes(zipWriter, reader, metadataInfo, options);\n\t\t({ reader } = sizesInfo);\n\t\tconst diskOffset = getDiskOffset(zipWriter.writer);\n\t\tconst diskNumber = getDiskNumber(zipWriter.writer);\n\t\tlet crc32 = options.crc32 === UNDEFINED_VALUE ? options[PROPERTY_NAME_SIGNATURE] : options.crc32;\n\t\tconst storesAE2 = sizesInfo.resolvedOptions.encrypted && !resolvedOptions.zipCrypto;\n\t\tif (resolvedOptions.passThroughCompression && !resolvedOptions.passThroughEncryption && storesAE2) {\n\t\t\tcrc32 = UNDEFINED_VALUE;\n\t\t}\n\t\tif (resolvedOptions.passThroughCompression && reader && !storesAE2 && crc32 === UNDEFINED_VALUE) {\n\t\t\tthrow new Error(ERR_UNDEFINED_CRC32);\n\t\t}\n\t\toptions = Object.assign({}, options, attributesInfo.resolvedOptions, metadataInfo.resolvedOptions, sizesInfo.resolvedOptions, {\n\t\t\tsignature: options[PROPERTY_NAME_SIGNATURE],\n\t\t\tcrc32,\n\t\t\toffset: zipWriter.offset - diskOffset,\n\t\t\tdiskNumberStart: diskNumber,\n\t\t\t[OPTION_USDZ]: zipWriter.options[OPTION_USDZ]\n\t\t});\n\t\tconst headerInfo = getHeaderInfo(options);\n\t\tif (headerInfo.lastModDateClamped) {\n\t\t\taddWarning(zipWriter.warnings, WARNING_CLAMPED_LAST_MODIFICATION_DATE, name);\n\t\t}\n\t\tconst dataDescriptorInfo = getDataDescriptorInfo(options);\n\t\tconst metadataSize = getLength(headerInfo.localHeaderArray, dataDescriptorInfo.dataDescriptorArray);\n\t\tfileEntry = await getFileEntry(zipWriter, name, reader, {\n\t\t\theaderInfo,\n\t\t\tdataDescriptorInfo,\n\t\t\tmetadataSize,\n\t\t\tfileEntry: pendingFileEntry,\n\t\t\tpreviousFileEntry,\n\t\t\treleaseLockFileEntry\n\t\t}, options);\n\t} catch (error) {\n\t\tzipWriter.fileEntries.delete(name);\n\t\tthrow error;\n\t} finally {\n\t\tif (releaseLockFileEntry) {\n\t\t\treleaseLockFileEntry(previousFileEntry && previousFileEntry.lockFileEntry);\n\t\t}\n\t}\n\tObject.assign(fileEntry, {\n\t\tname,\n\t\tcomment,\n\t\textraField\n\t});\n\treturn new Entry(fileEntry);\n}\n\nfunction getSourceEntryOptions(entry, passThrough, lastModDateOverride) {\n\tif (entry === null || typeof entry != OBJECT_TYPE || Array.isArray(entry)) {\n\t\tthrow new Error(ERR_INVALID_ENTRY);\n\t}\n\tconst {\n\t\texternalFileAttributes,\n\t\tversionMadeBy,\n\t\tcomment,\n\t\tlastModDate,\n\t\trawLastModDate,\n\t\tcreationDate,\n\t\tlastAccessDate,\n\t\tuncompressedSize,\n\t\tencrypted,\n\t\tzipCrypto,\n\t\tcrc32,\n\t\tcompressionMethod,\n\t\textraFieldAES,\n\t\textraFieldUnix,\n\t\tinternalFileAttributes,\n\t\textraField,\n\t\tbitFlag,\n\t\tdirectory,\n\t\tuid,\n\t\tgid\n\t} = entry;\n\tconst entryOptions = {\n\t\texternalFileAttributes,\n\t\tversionMadeBy,\n\t\tcomment,\n\t\tlastModDate,\n\t\tcreationDate,\n\t\tlastAccessDate,\n\t\tinternalFileAttributes,\n\t\tdirectory\n\t};\n\tif (bitFlag && bitFlag.languageEncodingFlag) {\n\t\tentryOptions[OPTION_USE_UNICODE_FILE_NAMES] = true;\n\t}\n\tconst userExtraField = getUserExtraField(extraField);\n\tif (userExtraField) {\n\t\tentryOptions[PROPERTY_NAME_EXTRA_FIELD] = userExtraField;\n\t}\n\tif (uid !== UNDEFINED_VALUE || gid !== UNDEFINED_VALUE) {\n\t\tObject.assign(entryOptions, {\n\t\t\tuid,\n\t\t\tgid,\n\t\t\tunixExtraFieldType: extraFieldUnix ? UNIX_EXTRA_FIELD_TYPE : INFOZIP_EXTRA_FIELD_TYPE\n\t\t});\n\t}\n\tconst passThroughOptions = {};\n\tif (passThrough && !directory) {\n\t\tObject.assign(passThroughOptions, {\n\t\t\tuncompressedSize,\n\t\t\tcrc32,\n\t\t\tcompressionMethod\n\t\t});\n\t\tif (passThrough !== PASS_THROUGH_COMPRESSED) {\n\t\t\tObject.assign(passThroughOptions, {\n\t\t\t\tencrypted,\n\t\t\t\tzipCrypto,\n\t\t\t\tencryptionStrength: extraFieldAES ? extraFieldAES.strength : UNDEFINED_VALUE\n\t\t\t});\n\t\t}\n\t\tif (bitFlag) {\n\t\t\tpassThroughOptions.dataDescriptor = bitFlag.dataDescriptor;\n\t\t\tpassThroughOptions[OPTION_LEVEL] = LEVEL_BY_BITFLAG_LEVEL[bitFlag.level];\n\t\t}\n\t\tif (lastModDateOverride === UNDEFINED_VALUE) {\n\t\t\tpassThroughOptions.rawLastModDate = rawLastModDate;\n\t\t} else if (passThrough !== PASS_THROUGH_COMPRESSED && zipCrypto && (!bitFlag || bitFlag.dataDescriptor) &&\n\t\t\tlastModDateOverride instanceof Date &&\n\t\t\tgetDosTimeHighByte(lastModDateOverride) != ((rawLastModDate >>> 8) & MAX_8_BITS)) {\n\t\t\tthrow new Error(ERR_ZIP_CRYPTO_LAST_MOD_DATE);\n\t\t}\n\t}\n\treturn { entryOptions, passThroughOptions };\n}\n\nfunction getDosTimeHighByte(lastModDate) {\n\tlet dosLastModDate = new Date(Math.ceil(Math.floor(lastModDate.getTime() / 1000) / 2) * 2000);\n\tif (dosLastModDate < MIN_DATE) {\n\t\tdosLastModDate = MIN_DATE;\n\t} else if (dosLastModDate > MAX_DATE) {\n\t\tdosLastModDate = MAX_DATE;\n\t}\n\treturn ((dosLastModDate.getHours() << 3) | (dosLastModDate.getMinutes() >> 3)) & MAX_8_BITS;\n}\n\nfunction resolveAttributes(zipWriter, name, options) {\n\tlet msDosCompatible = getOptionValue(zipWriter, options, PROPERTY_NAME_MS_DOS_COMPATIBLE);\n\tlet versionMadeBy = getOptionValue(zipWriter, options, PROPERTY_NAME_VERSION_MADE_BY, msDosCompatible ? VERSION_MADE_BY_MSDOS : VERSION_MADE_BY_UNIX);\n\tconst executable = getOptionValue(zipWriter, options, PROPERTY_NAME_EXECUTABLE);\n\tconst uid = getNumberOptionValue(zipWriter, options, PROPERTY_NAME_UID);\n\tconst gid = getNumberOptionValue(zipWriter, options, PROPERTY_NAME_GID);\n\tlet unixMode = getNumberOptionValue(zipWriter, options, PROPERTY_NAME_UNIX_MODE);\n\tlet unixExtraFieldType = getOptionValue(zipWriter, options, OPTION_UNIX_EXTRA_FIELD_TYPE);\n\tlet setuid = getOptionValue(zipWriter, options, PROPERTY_NAME_SETUID);\n\tlet setgid = getOptionValue(zipWriter, options, PROPERTY_NAME_SETGID);\n\tlet sticky = getOptionValue(zipWriter, options, PROPERTY_NAME_STICKY);\n\tcheckIntegerOption(uid, MAX_32_BITS, ERR_INVALID_UID);\n\tcheckIntegerOption(gid, MAX_32_BITS, ERR_INVALID_GID);\n\tcheckIntegerOption(unixMode, MAX_16_BITS, ERR_INVALID_UNIX_MODE);\n\tif (unixExtraFieldType !== UNDEFINED_VALUE && unixExtraFieldType !== INFOZIP_EXTRA_FIELD_TYPE && unixExtraFieldType !== UNIX_EXTRA_FIELD_TYPE) {\n\t\tthrow new Error(ERR_INVALID_UNIX_EXTRA_FIELD_TYPE);\n\t}\n\tif (unixExtraFieldType === UNIX_EXTRA_FIELD_TYPE &&\n\t\t((uid !== UNDEFINED_VALUE && uid > MAX_16_BITS) || (gid !== UNDEFINED_VALUE && gid > MAX_16_BITS))) {\n\t\tthrow new Error(ERR_INVALID_UNIX_ID_SIZE);\n\t}\n\tif (unixExtraFieldType === UNDEFINED_VALUE && (uid !== UNDEFINED_VALUE || gid !== UNDEFINED_VALUE)) {\n\t\tunixExtraFieldType = INFOZIP_EXTRA_FIELD_TYPE;\n\t}\n\tlet msdosAttributesRaw = getNumberOptionValue(zipWriter, options, PROPERTY_NAME_MSDOS_ATTRIBUTES_RAW);\n\tlet msdosAttributes = getOptionValue(zipWriter, options, PROPERTY_NAME_MSDOS_ATTRIBUTES);\n\tconst hasUnixMetadata = uid !== UNDEFINED_VALUE || gid !== UNDEFINED_VALUE || unixMode !== UNDEFINED_VALUE || unixExtraFieldType || executable;\n\tconst hasMsDosProvided = msdosAttributesRaw !== UNDEFINED_VALUE || msdosAttributes !== UNDEFINED_VALUE;\n\tif (hasUnixMetadata) {\n\t\tmsDosCompatible = false;\n\t\tversionMadeBy = (versionMadeBy & MAX_8_BITS) | VERSION_MADE_BY_UNIX;\n\t} else if (hasMsDosProvided) {\n\t\tmsDosCompatible = true;\n\t\tversionMadeBy = (versionMadeBy & MAX_8_BITS);\n\t}\n\tcheckIntegerOption(msdosAttributesRaw, MAX_8_BITS, ERR_INVALID_MSDOS_ATTRIBUTES);\n\tif (msdosAttributes && (typeof msdosAttributes !== OBJECT_TYPE || Array.isArray(msdosAttributes))) {\n\t\tthrow new Error(ERR_INVALID_MSDOS_DATA);\n\t}\n\tif (versionMadeBy > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_VERSION);\n\t}\n\tlet externalFileAttributes = getOptionValue(zipWriter, options, PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTES);\n\tconst externalFileAttributesProvided = externalFileAttributes !== UNDEFINED_VALUE;\n\tif (!externalFileAttributesProvided) {\n\t\texternalFileAttributes = 0;\n\t}\n\tif (!options[PROPERTY_NAME_DIRECTORY] && name.endsWith(DIRECTORY_SIGNATURE)) {\n\t\toptions[PROPERTY_NAME_DIRECTORY] = true;\n\t}\n\tconst directory = getOptionValue(zipWriter, options, PROPERTY_NAME_DIRECTORY);\n\tif (directory) {\n\t\tif (!name.endsWith(DIRECTORY_SIGNATURE)) {\n\t\t\tname += DIRECTORY_SIGNATURE;\n\t\t}\n\t\tif (!externalFileAttributesProvided) {\n\t\t\texternalFileAttributes = FILE_ATTR_MSDOS_DIR_MASK;\n\t\t\tif (!msDosCompatible) {\n\t\t\t\texternalFileAttributes |= (FILE_ATTR_UNIX_TYPE_DIR | FILE_ATTR_UNIX_EXECUTABLE_MASK | FILE_ATTR_UNIX_DEFAULT_MASK) << 16;\n\t\t\t}\n\t\t}\n\t} else if (!msDosCompatible && !externalFileAttributesProvided) {\n\t\tif (executable) {\n\t\t\texternalFileAttributes = (FILE_ATTR_UNIX_EXECUTABLE_MASK | FILE_ATTR_UNIX_DEFAULT_MASK) << 16;\n\t\t} else {\n\t\t\texternalFileAttributes = FILE_ATTR_UNIX_DEFAULT_MASK << 16;\n\t\t}\n\t}\n\tif (!msDosCompatible) {\n\t\tconst unixModeProvided = unixMode !== UNDEFINED_VALUE || Boolean(setuid || setgid || sticky);\n\t\tconst defaultUnixMode = (externalFileAttributes >> 16) & MAX_16_BITS;\n\t\tunixMode = unixMode === UNDEFINED_VALUE ? defaultUnixMode : (unixMode & MAX_16_BITS);\n\t\tif (setuid) {\n\t\t\tunixMode |= FILE_ATTR_UNIX_SETUID_MASK;\n\t\t} else {\n\t\t\tsetuid = Boolean(unixMode & FILE_ATTR_UNIX_SETUID_MASK);\n\t\t}\n\t\tif (setgid) {\n\t\t\tunixMode |= FILE_ATTR_UNIX_SETGID_MASK;\n\t\t} else {\n\t\t\tsetgid = Boolean(unixMode & FILE_ATTR_UNIX_SETGID_MASK);\n\t\t}\n\t\tif (sticky) {\n\t\t\tunixMode |= FILE_ATTR_UNIX_STICKY_MASK;\n\t\t} else {\n\t\t\tsticky = Boolean(unixMode & FILE_ATTR_UNIX_STICKY_MASK);\n\t\t}\n\t\tif (!externalFileAttributesProvided || unixModeProvided) {\n\t\t\tif (directory) {\n\t\t\t\tunixMode = (unixMode & ~FILE_ATTR_UNIX_TYPE_MASK) | FILE_ATTR_UNIX_TYPE_DIR;\n\t\t\t} else if (!(unixMode & FILE_ATTR_UNIX_TYPE_MASK)) {\n\t\t\t\tunixMode |= FILE_ATTR_UNIX_TYPE_FILE;\n\t\t\t}\n\t\t\texternalFileAttributes = ((unixMode & MAX_16_BITS) << 16) | (externalFileAttributes & MAX_16_BITS);\n\t\t}\n\t}\n\t({ msdosAttributesRaw, msdosAttributes } = normalizeMsdosAttributes(msdosAttributesRaw, msdosAttributes));\n\tif (hasMsDosProvided) {\n\t\texternalFileAttributes = (externalFileAttributes & MAX_32_BITS) | (msdosAttributesRaw & MAX_8_BITS);\n\t}\n\tconst unixExternalUpper = (externalFileAttributes >> 16) & MAX_16_BITS;\n\tconst symlink = unixMode !== UNDEFINED_VALUE && ((unixMode & FILE_ATTR_UNIX_TYPE_MASK) == FILE_ATTR_UNIX_TYPE_SYMLINK);\n\treturn {\n\t\tname,\n\t\tresolvedOptions: {\n\t\t\tversionMadeBy,\n\t\t\tmsDosCompatible: Boolean(msDosCompatible),\n\t\t\texternalFileAttributes,\n\t\t\tunixExternalUpper,\n\t\t\tuid,\n\t\t\tgid,\n\t\t\tunixMode,\n\t\t\tunixExtraFieldType,\n\t\t\tsymlink,\n\t\t\tsetuid,\n\t\t\tsetgid,\n\t\t\tsticky,\n\t\t\tmsdosAttributesRaw,\n\t\t\tmsdosAttributes\n\t\t}\n\t};\n}\n\nfunction resolveMetadata(zipWriter, name, options) {\n\tconst encode = getFunctionOptionValue(zipWriter, options, OPTION_ENCODE_TEXT) || encodeText;\n\tlet rawFilename = encode(name, TEXT_TYPE_FILENAME);\n\tif (rawFilename === UNDEFINED_VALUE) {\n\t\trawFilename = encodeText(name);\n\t}\n\tif (getLength(rawFilename) > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_ENTRY_NAME);\n\t}\n\tconst comment = options[PROPERTY_NAME_COMMENT] || \"\";\n\t// deno-lint-ignore valid-typeof\n\tif (typeof comment != STRING_TYPE) {\n\t\tthrow new Error(ERR_INVALID_ENTRY_COMMENT_TYPE);\n\t}\n\tlet rawComment = encode(comment, TEXT_TYPE_COMMENT);\n\tif (rawComment === UNDEFINED_VALUE) {\n\t\trawComment = encodeText(comment);\n\t}\n\tif (getLength(rawComment) > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_ENTRY_COMMENT);\n\t}\n\tconst version = getOptionValue(zipWriter, options, PROPERTY_NAME_VERSION);\n\tif (version !== UNDEFINED_VALUE && version > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_VERSION);\n\t}\n\tconst lastModDate = getDateOptionValue(zipWriter, options, PROPERTY_NAME_LAST_MODIFICATION_DATE, new Date());\n\tconst rawLastModDate = getOptionValue(zipWriter, options, PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE);\n\tconst lastAccessDate = getDateOptionValue(zipWriter, options, PROPERTY_NAME_LAST_ACCESS_DATE);\n\tconst creationDate = getDateOptionValue(zipWriter, options, PROPERTY_NAME_CREATION_DATE);\n\tconst internalFileAttributes = getOptionValue(zipWriter, options, PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTES, 0);\n\tconst passThrough = checkPassThroughOption(getOptionValue(zipWriter, options, OPTION_PASS_THROUGH));\n\tconst passThroughCompression = Boolean(passThrough);\n\tconst passThroughEncryption = passThrough === true;\n\tlet password = getOptionValue(zipWriter, options, OPTION_PASSWORD);\n\tlet rawPassword = getOptionValue(zipWriter, options, OPTION_RAW_PASSWORD);\n\tcheckPasswordOption(password, rawPassword);\n\tpassword = password && password.length ? password : UNDEFINED_VALUE;\n\trawPassword = rawPassword && rawPassword.length ? rawPassword : UNDEFINED_VALUE;\n\tconst encryptionStrength = getNumberOptionValue(zipWriter, options, OPTION_ENCRYPTION_STRENGTH, 3);\n\tconst zipCrypto = getOptionValue(zipWriter, options, PROPERTY_NAME_ZIPCRYPTO);\n\tconst extendedTimestamp = getOptionValue(zipWriter, options, OPTION_EXTENDED_TIMESTAMP, true);\n\tconst ntfsTimestamp = getOptionValue(zipWriter, options, OPTION_NTFS_TIMESTAMP);\n\tconst keepOrder = getOptionValue(zipWriter, options, OPTION_KEEP_ORDER, true);\n\tconst useWebWorkers = getOptionValue(zipWriter, options, OPTION_USE_WEB_WORKERS);\n\tconst transferStreams = getOptionValue(zipWriter, options, OPTION_TRANSFER_STREAMS);\n\tconst bufferedWrite = getOptionValue(zipWriter, options, OPTION_BUFFERED_WRITE);\n\tconst createTempStream = getFunctionOptionValue(zipWriter, options, OPTION_CREATE_TEMP_STREAM);\n\tconst dataDescriptorSignature = getOptionValue(zipWriter, options, OPTION_DATA_DESCRIPTOR_SIGNATURE, true);\n\tconst signal = checkSignalOption(getOptionValue(zipWriter, options, OPTION_SIGNAL));\n\tthrowIfAborted(signal);\n\tconst useUnicodeFileNames = getOptionValue(zipWriter, options, OPTION_USE_UNICODE_FILE_NAMES,\n\t\t!isPrintableASCIIText(rawFilename) || !isPrintableASCIIText(rawComment));\n\tconst compressionMethod = getOptionValue(zipWriter, options, PROPERTY_NAME_COMPRESSION_METHOD);\n\tconst registeredCodec = passThroughCompression || compressionMethod === UNDEFINED_VALUE ? UNDEFINED_VALUE : getRegisteredCodec(compressionMethod);\n\tif (!passThroughCompression && compressionMethod !== UNDEFINED_VALUE &&\n\t\tcompressionMethod !== COMPRESSION_METHOD_STORE && compressionMethod !== COMPRESSION_METHOD_DEFLATE && !registeredCodec) {\n\t\tthrow new Error(ERR_UNSUPPORTED_COMPRESSION);\n\t}\n\tlet level = getNumberOptionValue(zipWriter, options, OPTION_LEVEL);\n\tcheckIntegerOption(level, MAX_LEVEL, ERR_INVALID_LEVEL);\n\tif (zipWriter.options[OPTION_USDZ]) {\n\t\tif (password !== UNDEFINED_VALUE || rawPassword !== UNDEFINED_VALUE) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_ENCRYPTION_USDZ);\n\t\t}\n\t\tif (level === UNDEFINED_VALUE && compressionMethod === UNDEFINED_VALUE) {\n\t\t\tlevel = 0;\n\t\t}\n\t}\n\tif (passThroughCompression) {\n\t\tlevel = toNumber(options[OPTION_LEVEL]);\n\t}\n\tlet useCompressionStream = getOptionValue(zipWriter, options, OPTION_USE_COMPRESSION_STREAM);\n\tlet dataDescriptor = getOptionValue(zipWriter, options, OPTION_DATA_DESCRIPTOR);\n\tif (bufferedWrite && dataDescriptor === UNDEFINED_VALUE) {\n\t\tdataDescriptor = false;\n\t}\n\tif (dataDescriptor === UNDEFINED_VALUE || (zipCrypto && !passThroughEncryption)) {\n\t\tdataDescriptor = true;\n\t}\n\tif (level !== UNDEFINED_VALUE && level != 6) {\n\t\tuseCompressionStream = false;\n\t}\n\tconst zip64 = getOptionValue(zipWriter, options, PROPERTY_NAME_ZIP64);\n\tif (!zipCrypto && (password !== UNDEFINED_VALUE || rawPassword !== UNDEFINED_VALUE) && !(Number.isInteger(encryptionStrength) && encryptionStrength >= 1 && encryptionStrength <= 3)) {\n\t\tthrow new Error(ERR_INVALID_ENCRYPTION_STRENGTH);\n\t}\n\tconst rawExtraField = serializeExtraField(options[PROPERTY_NAME_EXTRA_FIELD]);\n\tconst rawLocalExtraField = serializeExtraField(options[OPTION_LOCAL_EXTRA_FIELD]);\n\tconst rawCentralExtraField = serializeExtraField(options[OPTION_CENTRAL_EXTRA_FIELD]);\n\treturn {\n\t\tcomment,\n\t\tresolvedOptions: {\n\t\t\trawFilename,\n\t\t\trawComment,\n\t\t\tversion,\n\t\t\tlastModDate,\n\t\t\trawLastModDate,\n\t\t\tlastAccessDate,\n\t\t\tcreationDate,\n\t\t\tinternalFileAttributes,\n\t\t\tpassThroughCompression,\n\t\t\tpassThroughEncryption,\n\t\t\tpassword,\n\t\t\trawPassword,\n\t\t\tencryptionStrength,\n\t\t\tzipCrypto,\n\t\t\textendedTimestamp,\n\t\t\tntfsTimestamp,\n\t\t\tkeepOrder,\n\t\t\tuseWebWorkers,\n\t\t\ttransferStreams,\n\t\t\tbufferedWrite,\n\t\t\tcreateTempStream,\n\t\t\tdataDescriptorSignature,\n\t\t\tsignal,\n\t\t\tuseUnicodeFileNames,\n\t\t\tcompressionMethod,\n\t\t\tformat: registeredCodec ? registeredCodec.format : UNDEFINED_VALUE,\n\t\t\tcodecURI: registeredCodec ? registeredCodec.codecURI : UNDEFINED_VALUE,\n\t\t\tcodecVersionNeeded: registeredCodec ? registeredCodec.versionNeeded : UNDEFINED_VALUE,\n\t\t\tlevel,\n\t\t\tuseCompressionStream,\n\t\t\tdataDescriptor,\n\t\t\tzip64,\n\t\t\trawExtraField,\n\t\t\trawLocalExtraField,\n\t\t\trawCentralExtraField\n\t\t}\n\t};\n}\n\nfunction serializeExtraField(extraField) {\n\tif (!extraField) {\n\t\treturn EMPTY_UINT8_ARRAY;\n\t}\n\tif (!(extraField instanceof Map)) {\n\t\tthrow new Error(ERR_INVALID_EXTRAFIELD);\n\t}\n\tlet extraFieldSize = 0;\n\tlet offset = 0;\n\textraField.forEach((data, type) => {\n\t\tcheckInteger(type, MAX_16_BITS, ERR_INVALID_EXTRAFIELD_TYPE);\n\t\tif (!(data instanceof Uint8Array)) {\n\t\t\tthrow new Error(ERR_INVALID_EXTRAFIELD_DATA_TYPE);\n\t\t}\n\t\tif (getLength(data) > MAX_16_BITS) {\n\t\t\tthrow new Error(ERR_INVALID_EXTRAFIELD_DATA);\n\t\t}\n\t\textraFieldSize += 4 + getLength(data);\n\t});\n\tconst rawExtraField = new Uint8Array(extraFieldSize);\n\tconst rawExtraFieldView = getDataView(rawExtraField);\n\textraField.forEach((data, type) => {\n\t\tsetUint16(rawExtraFieldView, offset, type);\n\t\tsetUint16(rawExtraFieldView, offset + 2, getLength(data));\n\t\tarraySet(rawExtraField, data, offset + 4);\n\t\toffset += 4 + getLength(data);\n\t});\n\treturn rawExtraField;\n}\n\nasync function resolveSizes(zipWriter, reader, { resolvedOptions: metadata }, options) {\n\tif (metadata.passThroughCompression && !reader && !getOptionValue(zipWriter, options, PROPERTY_NAME_DIRECTORY)) {\n\t\tthrow new Error(ERR_UNDEFINED_READER);\n\t}\n\tlet contentSize;\n\tif (reader) {\n\t\treader = new GenericReader(reader);\n\t\tawait initStream(reader);\n\t\tif (!reader.readable && !reader.readUint8Array) {\n\t\t\tthrow new Error(ERR_INVALID_READER);\n\t\t}\n\t\t({ size: contentSize } = reader);\n\t}\n\treturn Object.assign({ reader }, resolveEntrySizes(zipWriter, Boolean(reader), contentSize, metadata, options));\n}\n\nfunction resolveEntrySizes(zipWriter, hasContent, contentSize, metadata, options) {\n\tconst { passThroughCompression, passThroughEncryption, zipCrypto, password, rawPassword, encryptionStrength } = metadata;\n\tlet { dataDescriptor, zip64, level, compressionMethod } = metadata;\n\tlet maximumCompressedSize = 0;\n\tlet uncompressedSize = 0;\n\tlet unknownSize = false;\n\tif (passThroughCompression && hasContent) {\n\t\tuncompressedSize = options[PROPERTY_NAME_UNCOMPRESSED_SIZE];\n\t\tif (uncompressedSize === UNDEFINED_VALUE) {\n\t\t\tthrow new Error(ERR_UNDEFINED_UNCOMPRESSED_SIZE);\n\t\t}\n\t\tif (compressionMethod === UNDEFINED_VALUE) {\n\t\t\tthrow new Error(ERR_UNDEFINED_COMPRESSION_METHOD);\n\t\t}\n\t}\n\tconst zip64Enabled = zip64 === true;\n\tconst encrypted = getOptionValue(zipWriter, options, PROPERTY_NAME_ENCRYPTED);\n\tif (hasContent && passThroughEncryption && !encrypted && getLength(password, rawPassword)) {\n\t\tthrow new Error(ERR_UNSUPPORTED_ENCRYPTION_PASS_THROUGH);\n\t}\n\tconst encryptedEntry = hasContent && (Boolean((password && getLength(password)) || (rawPassword && getLength(rawPassword))) || (passThroughEncryption && encrypted));\n\tif (!hasContent) {\n\t\tlevel = 0;\n\t\tcompressionMethod = COMPRESSION_METHOD_STORE;\n\t}\n\tconst encryptionOverhead = getEncryptionOverhead(encryptedEntry, zipCrypto, encryptionStrength);\n\tif (hasContent) {\n\t\tif (!passThroughCompression) {\n\t\t\tif (contentSize === UNDEFINED_VALUE) {\n\t\t\t\tdataDescriptor = true;\n\t\t\t\tif (zip64 || zip64 === UNDEFINED_VALUE) {\n\t\t\t\t\tzip64 = unknownSize = true;\n\t\t\t\t\tmaximumCompressedSize = MAX_32_BITS + 1;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\toptions.uncompressedSize = uncompressedSize = contentSize;\n\t\t\t\tmaximumCompressedSize = (isCompressed(compressionMethod, level) ? getMaximumCompressedSize(uncompressedSize) : uncompressedSize) + encryptionOverhead;\n\t\t\t}\n\t\t} else {\n\t\t\toptions.uncompressedSize = uncompressedSize;\n\t\t\tmaximumCompressedSize = contentSize === UNDEFINED_VALUE ?\n\t\t\t\tgetMaximumCompressedSize(uncompressedSize) + encryptionOverhead :\n\t\t\t\tcontentSize + (passThroughEncryption ? 0 : encryptionOverhead);\n\t\t}\n\t}\n\tconst emptyEntry = !encryptedEntry && (!hasContent || (contentSize === 0 && !passThroughCompression)) && !isCompressed(compressionMethod, level);\n\tif (emptyEntry && getOptionValue(zipWriter, options, OPTION_DATA_DESCRIPTOR) === UNDEFINED_VALUE) {\n\t\tdataDescriptor = false;\n\t}\n\tconst zip64UncompressedSize = zip64Enabled || unknownSize || uncompressedSize >= MAX_32_BITS;\n\tconst zip64CompressedSize = zip64Enabled || maximumCompressedSize >= MAX_32_BITS;\n\tif (zip64UncompressedSize || zip64CompressedSize) {\n\t\tif (zip64 === false) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_FORMAT);\n\t\t} else {\n\t\t\tzip64 = true;\n\t\t}\n\t}\n\tzip64 = zip64 || false;\n\treturn {\n\t\tmaximumCompressedSize,\n\t\tresolvedOptions: {\n\t\t\tdataDescriptor,\n\t\t\temptyEntry,\n\t\t\tzip64,\n\t\t\tzip64Enabled,\n\t\t\tunknownSize,\n\t\t\tzip64UncompressedSize,\n\t\t\tzip64CompressedSize,\n\t\t\tuncompressedSize,\n\t\t\tlevel,\n\t\t\tcompressionMethod,\n\t\t\tencrypted: encryptedEntry\n\t\t}\n\t};\n}\n\nasync function getEntriesSize(writerOptions, entries, writeOrderGuaranteed, comment) {\n\tconst zipWriter = { options: writerOptions };\n\tif (checkFunctionOption(writerOptions[OPTION_SIGN_CENTRAL_DIRECTORY])) {\n\t\tthrow new Error(ERR_UNDETERMINED_SIZE);\n\t}\n\tif (comment !== UNDEFINED_VALUE && !(comment instanceof Uint8Array)) {\n\t\tthrow new Error(ERR_INVALID_COMMENT_TYPE);\n\t}\n\tconst commentLength = getLength(comment);\n\tif (commentLength > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_COMMENT);\n\t}\n\tconst usdz = writerOptions[OPTION_USDZ];\n\tconst files = new Map();\n\tconst initialOffset = writerOptions[OPTION_OFFSET] === UNDEFINED_VALUE ? 0 : writerOptions[OPTION_OFFSET];\n\tlet offset = initialOffset;\n\tlet minimumEntrySize = INFINITY_VALUE;\n\tconst entrySizes = [];\n\tconst entriesAlreadyZip64 = new Set();\n\tfor (const entry of entries) {\n\t\tlet { name } = entry;\n\t\tconst { size } = entry;\n\t\tconst options = Object.assign({}, entry.options);\n\t\tif (getOptionValue(zipWriter, options, PROPERTY_NAME_DIRECTORY) && !name.endsWith(DIRECTORY_SIGNATURE)) {\n\t\t\tname += DIRECTORY_SIGNATURE;\n\t\t}\n\t\tconst attributesInfo = resolveAttributes(zipWriter, name, options);\n\t\t({ name } = attributesInfo);\n\t\tconst { resolvedOptions: metadata } = resolveMetadata(zipWriter, name, options);\n\t\tif (metadata.level != 0 && metadata.compressionMethod === UNDEFINED_VALUE &&\n\t\t\t!metadata.passThroughCompression && !(await supportsDeflate(getConfiguration()))) {\n\t\t\tmetadata.level = 0;\n\t\t}\n\t\tconst hasContent = !getOptionValue(zipWriter, options, PROPERTY_NAME_DIRECTORY);\n\t\tif (hasContent && size === UNDEFINED_VALUE) {\n\t\t\tthrow new Error(ERR_UNDETERMINED_SIZE);\n\t\t}\n\t\tconst { maximumCompressedSize, resolvedOptions: sizes } = resolveEntrySizes(zipWriter, hasContent, size, metadata, options);\n\t\tif (hasContent && !metadata.passThroughCompression && isCompressed(sizes.compressionMethod, sizes.level)) {\n\t\t\tthrow new Error(ERR_UNDETERMINED_SIZE);\n\t\t}\n\t\tconst entryOptions = Object.assign({}, options, attributesInfo.resolvedOptions, metadata, sizes, { [OPTION_USDZ]: usdz });\n\t\tconst headerInfo = getHeaderInfo(entryOptions);\n\t\tconst dataDescriptorInfo = getDataDescriptorInfo(entryOptions);\n\t\tconst entryInfo = {\n\t\t\theaderInfo,\n\t\t\tmetadataSize: getLength(headerInfo.localHeaderArray, dataDescriptorInfo.dataDescriptorArray)\n\t\t};\n\t\tif (usdz) {\n\t\t\tappendExtraFieldUSDZ(entryInfo, offset);\n\t\t}\n\t\tconst compressedSize = hasContent ? maximumCompressedSize : 0;\n\t\tfiles.set(name, Object.assign({}, entryOptions, headerInfo, {\n\t\t\toffset,\n\t\t\tdiskNumberStart: 0,\n\t\t\tcompressedSize\n\t\t}));\n\t\tconst entrySize = entryInfo.metadataSize + compressedSize;\n\t\tentrySizes.push(entrySize);\n\t\tentriesAlreadyZip64.add(Boolean(entryOptions.zip64Enabled ||\n\t\t\tentryOptions.uncompressedSize >= MAX_32_BITS || compressedSize >= MAX_32_BITS));\n\t\tminimumEntrySize = Math.min(minimumEntrySize, entrySize);\n\t\toffset += entrySize;\n\t}\n\tconst layoutDependsOnWriteOrder = files.size > 1 && (usdz ||\n\t\t(offset - minimumEntrySize >= MAX_32_BITS &&\n\t\t\t(entriesAlreadyZip64.size > 1 || countEntriesBefore4GB(entrySizes, initialOffset, true) != countEntriesBefore4GB(entrySizes, initialOffset, false))));\n\tif (layoutDependsOnWriteOrder && !writeOrderGuaranteed) {\n\t\tthrow new Error(ERR_UNDETERMINED_SIZE);\n\t}\n\tconst { directoryDataLength, zip64Entries } = createDirectoryRecords(files);\n\tlet zip64 = getOptionValue(zipWriter, writerOptions, PROPERTY_NAME_ZIP64);\n\tif (offset >= MAX_32_BITS || directoryDataLength >= MAX_32_BITS || files.size >= MAX_16_BITS) {\n\t\tif (zip64 === false) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_FORMAT);\n\t\t} else {\n\t\t\tzip64 = true;\n\t\t}\n\t} else if (zip64 === UNDEFINED_VALUE && zip64Entries) {\n\t\tzip64 = true;\n\t}\n\treturn offset - initialOffset + directoryDataLength + commentLength + (zip64 ? ZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH : END_OF_CENTRAL_DIR_LENGTH);\n}\n\nfunction countEntriesBefore4GB(entrySizes, initialOffset, largestFirst) {\n\tconst ordered = entrySizes.slice().sort((first, second) => largestFirst ? second - first : first - second);\n\tlet position = initialOffset;\n\tlet count = 0;\n\tfor (const entrySize of ordered) {\n\t\tif (position >= MAX_32_BITS) {\n\t\t\tbreak;\n\t\t}\n\t\tposition += entrySize;\n\t\tcount++;\n\t}\n\treturn count;\n}\n\nasync function getFileEntry(zipWriter, name, reader, entryInfo, options) {\n\tconst {\n\t\tfileEntries,\n\t\twriter\n\t} = zipWriter;\n\tconst {\n\t\tkeepOrder,\n\t\tdataDescriptor,\n\t\temptyEntry,\n\t\tsignal\n\t} = options;\n\tconst {\n\t\theaderInfo,\n\t\tfileEntry: pendingFileEntry,\n\t\tpreviousFileEntry,\n\t\treleaseLockFileEntry\n\t} = entryInfo;\n\tconst usdz = zipWriter.options[OPTION_USDZ];\n\tlet fileEntry = pendingFileEntry;\n\tlet bufferedWrite;\n\tlet directWrite;\n\tlet releaseLockWriter;\n\tlet writingBufferedEntryData;\n\tlet writingEntryData;\n\tlet writerSizeBeforeEntry;\n\tlet flushedBufferedSize = 0;\n\tlet fileWriter;\n\tconst lockPreviousFileEntry = keepOrder && previousFileEntry ? previousFileEntry.lockFileEntry : UNDEFINED_VALUE;\n\tfileEntries.set(name, fileEntry);\n\ttry {\n\t\tif (options.bufferedWrite || !keepOrder || zipWriter.writerLocked || zipWriter.bufferedWrites || zipWriter.directWrites || (!dataDescriptor && !emptyEntry)) {\n\t\t\tbufferedWrite = true;\n\t\t\tzipWriter.bufferedWrites++;\n\t\t\tif (options.createTempStream) {\n\t\t\t\tfileWriter = await options.createTempStream();\n\t\t\t} else {\n\t\t\t\tfileWriter = new TransformStream(UNDEFINED_VALUE, UNDEFINED_VALUE, { highWaterMark: INFINITY_VALUE });\n\t\t\t}\n\t\t\tfileWriter.size = 0;\n\t\t\tawait initStream(writer);\n\t\t} else {\n\t\t\tdirectWrite = true;\n\t\t\tzipWriter.directWrites++;\n\t\t\tfileWriter = writer;\n\t\t\tawait lockPreviousFileEntry;\n\t\t\tawait requestLockWriter();\n\t\t}\n\t\tawait initStream(fileWriter);\n\t\tconst diskOffset = getDiskOffset(writer);\n\t\tif (zipWriter.addSplitZipSignature && !bufferedWrite) {\n\t\t\tawait writeSplitZipSignature(zipWriter, writer);\n\t\t}\n\t\tif (usdz && !bufferedWrite) {\n\t\t\tappendExtraFieldUSDZ(entryInfo, zipWriter.offset - diskOffset);\n\t\t}\n\t\tconst { localHeaderArray } = headerInfo;\n\t\tif (!bufferedWrite) {\n\t\t\tawait skipDiskIfNeeded();\n\t\t}\n\t\tconst diskNumberStart = getDiskNumber(writer);\n\t\tconst entryOffset = getSegmentOffset(zipWriter, writer);\n\t\tfileEntry.diskNumberStart = diskNumberStart;\n\t\tif (!bufferedWrite) {\n\t\t\twritingEntryData = true;\n\t\t\twriterSizeBeforeEntry = writer.size;\n\t\t\tawait writeData(fileWriter, localHeaderArray);\n\t\t}\n\t\tfileEntry = await createFileEntry(reader, fileWriter, fileEntry, entryInfo, getConfiguration(), options);\n\t\tif (!bufferedWrite) {\n\t\t\twritingEntryData = false;\n\t\t}\n\t\tfileEntries.set(name, fileEntry);\n\t\tfileEntry.filename = name;\n\t\tif (bufferedWrite) {\n\t\t\tawait Promise.all([fileWriter.writable.getWriter().close(), lockPreviousFileEntry]);\n\t\t\tawait requestLockWriter();\n\t\t\tif (zipWriter.addSplitZipSignature) {\n\t\t\t\tawait writeSplitZipSignature(zipWriter, writer);\n\t\t\t}\n\t\t\twritingBufferedEntryData = true;\n\t\t\twriterSizeBeforeEntry = writer.size;\n\t\t\tawait skipDiskIfNeeded();\n\t\t\tfileEntry.diskNumberStart = getDiskNumber(writer);\n\t\t\tfileEntry.offset = getSegmentOffset(zipWriter, writer);\n\t\t\tif (usdz) {\n\t\t\t\tconst previousMetadataSize = entryInfo.metadataSize;\n\t\t\t\tappendExtraFieldUSDZ(entryInfo, zipWriter.offset - getDiskOffset(writer));\n\t\t\t\tfileEntry.size += entryInfo.metadataSize - previousMetadataSize;\n\t\t\t}\n\t\t\tupdateLocalHeader(fileEntry, headerInfo.localHeaderView, options);\n\t\t\tawait writeData(writer, headerInfo.localHeaderArray);\n\t\t\tawait flushBufferedData(fileWriter.readable, writer, signal, chunkLength => flushedBufferedSize += chunkLength);\n\t\t\twriter.size += fileWriter.size;\n\t\t\twritingBufferedEntryData = false;\n\t\t} else {\n\t\t\tfileEntry.diskNumberStart = diskNumberStart;\n\t\t\tfileEntry.offset = entryOffset;\n\t\t}\n\t\tzipWriter.offset += fileEntry.size;\n\t\treturn fileEntry;\n\t} catch (error) {\n\t\tif (writingBufferedEntryData || writingEntryData) {\n\t\t\tzipWriter.hasCorruptedEntries = true;\n\t\t\tif (error) {\n\t\t\t\ttry {\n\t\t\t\t\terror.corruptedEntry = true;\n\t\t\t\t} catch {\n\t\t\t\t\t// ignored\n\t\t\t\t}\n\t\t\t}\n\t\t\tzipWriter.offset += writer.size - writerSizeBeforeEntry;\n\t\t\tif (bufferedWrite) {\n\t\t\t\tzipWriter.offset += flushedBufferedSize;\n\t\t\t}\n\t\t}\n\t\tfileEntries.delete(name);\n\t\tthrow error;\n\t} finally {\n\t\tif (bufferedWrite) {\n\t\t\tzipWriter.bufferedWrites--;\n\t\t}\n\t\tif (directWrite) {\n\t\t\tzipWriter.directWrites--;\n\t\t}\n\t\tif (releaseLockFileEntry) {\n\t\t\treleaseLockFileEntry(lockPreviousFileEntry);\n\t\t}\n\t\tif (releaseLockWriter) {\n\t\t\treleaseLockWriter();\n\t\t}\n\t\tif (bufferedWrite && fileWriter && fileWriter.dispose) {\n\t\t\ttry {\n\t\t\t\tawait fileWriter.dispose();\n\t\t\t} catch {\n\t\t\t\t// ignored\n\t\t\t}\n\t\t}\n\t}\n\n\tasync function requestLockWriter() {\n\t\tzipWriter.writerLocked = true;\n\t\tconst { lockWriter } = zipWriter;\n\t\tzipWriter.lockWriter = new Promise(resolve => releaseLockWriter = () => {\n\t\t\tzipWriter.writerLocked = false;\n\t\t\tresolve();\n\t\t});\n\t\tawait lockWriter;\n\t}\n\n\tasync function skipDiskIfNeeded() {\n\t\tif (exceedsAvailableSize(writer, getLength(headerInfo.localHeaderArray))) {\n\t\t\tawait writer.closeDisk();\n\t\t}\n\t}\n}\n\nasync function createFileEntry(reader, writer, { diskNumberStart, lockFileEntry }, entryInfo, config, options) {\n\tconst {\n\t\theaderInfo,\n\t\tdataDescriptorInfo,\n\t\tmetadataSize\n\t} = entryInfo;\n\tconst {\n\t\theaderArray,\n\t\theaderView,\n\t\tlastModDate,\n\t\trawLastModDate,\n\t\tencrypted,\n\t\tcompressed,\n\t\tversion,\n\t\tcompressionMethod,\n\t\trawExtraFieldZip64,\n\t\tlocalExtraFieldZip64Length,\n\t\trawExtraFieldExtendedTimestamp,\n\t\textraFieldExtendedTimestampFlag,\n\t\textraFieldExtendedTimestampTime,\n\t\trawExtraFieldNTFS,\n\t\trawExtraFieldUnix,\n\t\trawExtraFieldAES,\n\t} = headerInfo;\n\tconst { dataDescriptorArray } = dataDescriptorInfo;\n\tconst {\n\t\trawFilename,\n\t\tlastAccessDate,\n\t\tcreationDate,\n\t\tpassword,\n\t\trawPassword,\n\t\tlevel,\n\t\tuseUnicodeFileNames,\n\t\tzip64,\n\t\tzip64Enabled,\n\t\tzip64UncompressedSize,\n\t\tzip64CompressedSize,\n\t\tzipCrypto,\n\t\tdataDescriptor,\n\t\tdirectory,\n\t\texecutable,\n\t\tversionMadeBy,\n\t\trawComment,\n\t\trawExtraField,\n\t\trawCentralExtraField,\n\t\tuseWebWorkers,\n\t\ttransferStreams,\n\t\tonstart,\n\t\tonprogress,\n\t\tonend,\n\t\tsignal,\n\t\tencryptionStrength,\n\t\textendedTimestamp,\n\t\tmsDosCompatible,\n\t\tinternalFileAttributes,\n\t\texternalFileAttributes,\n\t\tuid,\n\t\tgid,\n\t\tunixMode,\n\t\tsymlink,\n\t\tsetuid,\n\t\tsetgid,\n\t\tsticky,\n\t\tunixExternalUpper,\n\t\tmsdosAttributesRaw,\n\t\tmsdosAttributes,\n\t\tuseCompressionStream,\n\t\tpassThroughCompression,\n\t\tpassThroughEncryption,\n\t\tformat,\n\t\tcodecURI\n\t} = options;\n\tconst fileEntry = {\n\t\tlockFileEntry,\n\t\tversionMadeBy,\n\t\tzip64,\n\t\tzip64Enabled,\n\t\tdirectory: Boolean(directory),\n\t\texecutable: Boolean(executable),\n\t\tfilenameUTF8: Boolean(useUnicodeFileNames),\n\t\trawFilename,\n\t\tcommentUTF8: Boolean(useUnicodeFileNames),\n\t\trawComment,\n\t\trawExtraFieldZip64,\n\t\tlocalExtraFieldZip64Length,\n\t\trawExtraFieldExtendedTimestamp,\n\t\trawExtraFieldNTFS,\n\t\trawExtraFieldUnix,\n\t\trawExtraFieldAES,\n\t\trawExtraField,\n\t\trawCentralExtraField,\n\t\textendedTimestamp,\n\t\tmsDosCompatible,\n\t\tinternalFileAttributes,\n\t\texternalFileAttributes,\n\t\tdiskNumberStart,\n\t\tuid,\n\t\tgid,\n\t\tunixMode,\n\t\tsymlink: Boolean(symlink),\n\t\tsetuid,\n\t\tsetgid,\n\t\tsticky,\n\t\tunixExternalUpper,\n\t\tmsdosAttributesRaw,\n\t\tmsdosAttributes\n\t};\n\tlet {\n\t\tcrc32,\n\t\tuncompressedSize\n\t} = options;\n\tlet compressedSize = 0;\n\tif (!passThroughCompression) {\n\t\tuncompressedSize = 0;\n\t}\n\tconst { writable } = writer;\n\tif (reader) {\n\t\tconst size = reader.size;\n\t\tconst readable = toCompatibleReadable(createReadable(reader, { size }));\n\t\tconst workerOptions = {\n\t\t\toptions: {\n\t\t\t\tcodecType: CODEC_DEFLATE,\n\t\t\t\tinputSize: size,\n\t\t\t\tlevel,\n\t\t\t\trawPassword,\n\t\t\t\tpassword,\n\t\t\t\tencryptionStrength,\n\t\t\t\tzipCrypto: encrypted && zipCrypto,\n\t\t\t\tpasswordVerification: encrypted && zipCrypto && (rawLastModDate >> 8) & MAX_8_BITS,\n\t\t\t\tcomputeCrc32: !passThroughCompression,\n\t\t\t\tcompressed: compressed && !passThroughCompression,\n\t\t\t\tencrypted: encrypted && !passThroughEncryption,\n\t\t\t\tuseWebWorkers,\n\t\t\t\tuseCompressionStream,\n\t\t\t\ttransferStreams,\n\t\t\t\tformat,\n\t\t\t\tcodecURI,\n\t\t\t\tcompressionMethod\n\t\t\t},\n\t\t\tconfig,\n\t\t\tstreamOptions: { signal, size, onstart, onprogress, onend }\n\t\t};\n\t\ttry {\n\t\t\tconst result = await runWorker({ readable, writable }, workerOptions);\n\t\t\tcompressedSize = result.outputSize;\n\t\t\twriter.size += compressedSize;\n\t\t\tthrowIfAborted(signal);\n\t\t\tif (!passThroughCompression) {\n\t\t\t\tuncompressedSize = result.inputSize;\n\t\t\t\tif (!encrypted || zipCrypto) {\n\t\t\t\t\tcrc32 = result.crc32;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ((!zip64CompressedSize && compressedSize >= MAX_32_BITS) ||\n\t\t\t\t(!zip64UncompressedSize && uncompressedSize >= MAX_32_BITS)) {\n\t\t\t\tthrow new Error(ERR_UNSUPPORTED_FORMAT);\n\t\t\t}\n\t\t} catch (error) {\n\t\t\tconst { outputSize: failedOutputSize } = workerOptions;\n\t\t\tif (failedOutputSize !== UNDEFINED_VALUE) {\n\t\t\t\twriter.size += failedOutputSize;\n\t\t\t} else if (isErrorObject(error) && error.outputSize !== UNDEFINED_VALUE) {\n\t\t\t\twriter.size += error.outputSize;\n\t\t\t}\n\t\t\tthrow error;\n\t\t}\n\n\t}\n\tsetEntryInfo({\n\t\tcrc32,\n\t\tcompressedSize,\n\t\tuncompressedSize,\n\t\theaderInfo,\n\t\tdataDescriptorInfo\n\t}, options);\n\tif (dataDescriptor) {\n\t\tawait writeData(writer, dataDescriptorArray);\n\t}\n\tObject.assign(fileEntry, {\n\t\tuncompressedSize,\n\t\tcompressedSize,\n\t\tlastModDate,\n\t\trawLastModDate,\n\t\tcreationDate,\n\t\tlastAccessDate,\n\t\tencrypted: Boolean(encrypted),\n\t\tzipCrypto: Boolean(zipCrypto),\n\t\tsize: metadataSize + compressedSize,\n\t\tcompressionMethod,\n\t\tversion,\n\t\theaderArray,\n\t\theaderView,\n\t\tsignature: crc32,\n\t\tcrc32: encrypted && !zipCrypto && !passThroughCompression ? UNDEFINED_VALUE : crc32,\n\t\textraFieldExtendedTimestampFlag,\n\t\textraFieldExtendedTimestampTime,\n\t\tzip64UncompressedSize,\n\t\tzip64CompressedSize\n\t});\n\treturn fileEntry;\n}\n\nfunction getHeaderInfo(options) {\n\tconst {\n\t\trawFilename,\n\t\tlastModDate,\n\t\trawLastModDate: rawLastModDateOption,\n\t\tlastAccessDate,\n\t\tcreationDate,\n\t\tlevel,\n\t\tzip64,\n\t\tzipCrypto,\n\t\tuseUnicodeFileNames,\n\t\tdataDescriptor,\n\t\tdirectory,\n\t\trawExtraField,\n\t\trawLocalExtraField,\n\t\tencryptionStrength,\n\t\textendedTimestamp,\n\t\tntfsTimestamp,\n\t\tpassThroughCompression,\n\t\tencrypted,\n\t\tzip64UncompressedSize,\n\t\tzip64CompressedSize,\n\t\tuncompressedSize,\n\t\tunknownSize,\n\t\tcrc32\n\t} = options;\n\tlet { version, compressionMethod } = options;\n\tconst compressed = !directory && isCompressed(compressionMethod, level);\n\tlet rawLocalExtraFieldZip64;\n\tconst uncompressedFile = passThroughCompression || !compressed;\n\tconst zip64ExtraFieldComplete = zip64 && (options.bufferedWrite || !dataDescriptor || ((!zip64UncompressedSize && !zip64CompressedSize) || (uncompressedFile && !unknownSize)));\n\tconst writeLocalExtraFieldZip64 = zip64ExtraFieldComplete || (zip64 && dataDescriptor && (zip64UncompressedSize || zip64CompressedSize));\n\tif (zip64 && (zip64UncompressedSize || zip64CompressedSize)) {\n\t\tconst length = 4 + 16;\n\t\tconst extraFieldZip64 = createRecordWriter(length);\n\t\textraFieldZip64.writeUint16(EXTRAFIELD_TYPE_ZIP64);\n\t\textraFieldZip64.writeUint16(length - 4);\n\t\trawLocalExtraFieldZip64 = extraFieldZip64.array;\n\t\tif (zip64ExtraFieldComplete) {\n\t\t\textraFieldZip64.writeUint64(uncompressedSize);\n\t\t\tif (uncompressedFile) {\n\t\t\t\tconst encryptionOverhead = getEncryptionOverhead(encrypted, zipCrypto, encryptionStrength);\n\t\t\t\textraFieldZip64.writeUint64(passThroughCompression ? 0 : uncompressedSize + encryptionOverhead);\n\t\t\t}\n\t\t}\n\t} else {\n\t\trawLocalExtraFieldZip64 = EMPTY_UINT8_ARRAY;\n\t}\n\tlet rawExtraFieldAES;\n\tif (encrypted && !zipCrypto) {\n\t\tconst extraFieldAES = createRecordWriter(getLength(EXTRAFIELD_DATA_AES) + 2);\n\t\textraFieldAES.writeUint16(EXTRAFIELD_TYPE_AES);\n\t\textraFieldAES.writeBytes(EXTRAFIELD_DATA_AES);\n\t\trawExtraFieldAES = extraFieldAES.array;\n\t\trawExtraFieldAES[8] = encryptionStrength;\n\t} else {\n\t\trawExtraFieldAES = EMPTY_UINT8_ARRAY;\n\t}\n\tlet rawExtraFieldNTFS;\n\tlet rawExtraFieldExtendedTimestamp;\n\tlet extraFieldExtendedTimestampFlag;\n\tlet extraFieldExtendedTimestampTime;\n\tif (extendedTimestamp) {\n\t\tconst lastModTimeUnix = getTimeUnix(lastModDate);\n\t\tconst lastModTimeUnixInRange = inUnixTimeRange(lastModTimeUnix);\n\t\tif (lastModTimeUnixInRange) {\n\t\t\tconst extraFieldTimestampLength = 9 + (lastAccessDate ? 4 : 0) + (creationDate ? 4 : 0);\n\t\t\tconst extraFieldTimestamp = createRecordWriter(extraFieldTimestampLength);\n\t\t\textraFieldExtendedTimestampFlag = 0x1 + (lastAccessDate ? 0x2 : 0) + (creationDate ? 0x4 : 0);\n\t\t\textraFieldExtendedTimestampTime = lastModTimeUnix;\n\t\t\textraFieldTimestamp.writeUint16(EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP);\n\t\t\textraFieldTimestamp.writeUint16(extraFieldTimestampLength - 4);\n\t\t\textraFieldTimestamp.writeUint8(extraFieldExtendedTimestampFlag);\n\t\t\textraFieldTimestamp.writeUint32(lastModTimeUnix);\n\t\t\tif (lastAccessDate) {\n\t\t\t\textraFieldTimestamp.writeUint32(clampUnixTime(getTimeUnix(lastAccessDate)));\n\t\t\t}\n\t\t\tif (creationDate) {\n\t\t\t\textraFieldTimestamp.writeUint32(clampUnixTime(getTimeUnix(creationDate)));\n\t\t\t}\n\t\t\trawExtraFieldExtendedTimestamp = extraFieldTimestamp.array;\n\t\t} else {\n\t\t\trawExtraFieldExtendedTimestamp = EMPTY_UINT8_ARRAY;\n\t\t}\n\t\tconst writeExtraFieldNTFS = ntfsTimestamp === UNDEFINED_VALUE ?\n\t\t\t!lastModTimeUnixInRange || Boolean(lastAccessDate || creationDate) :\n\t\t\tntfsTimestamp;\n\t\tif (writeExtraFieldNTFS) {\n\t\t\ttry {\n\t\t\t\tconst lastModTimeNTFS = getTimeNTFS(lastModDate);\n\t\t\t\tconst extraFieldNTFS = createRecordWriter(36);\n\t\t\t\textraFieldNTFS.writeUint16(EXTRAFIELD_TYPE_NTFS);\n\t\t\t\textraFieldNTFS.writeUint16(32);\n\t\t\t\textraFieldNTFS.skip(4);\n\t\t\t\textraFieldNTFS.writeUint16(EXTRAFIELD_TYPE_NTFS_TAG1);\n\t\t\t\textraFieldNTFS.writeUint16(24);\n\t\t\t\textraFieldNTFS.writeUint64(lastModTimeNTFS);\n\t\t\t\textraFieldNTFS.writeUint64(lastAccessDate ? getTimeNTFS(lastAccessDate) : lastModTimeNTFS);\n\t\t\t\textraFieldNTFS.writeUint64(creationDate ? getTimeNTFS(creationDate) : lastModTimeNTFS);\n\t\t\t\trawExtraFieldNTFS = extraFieldNTFS.array;\n\t\t\t} catch {\n\t\t\t\trawExtraFieldNTFS = EMPTY_UINT8_ARRAY;\n\t\t\t}\n\t\t} else {\n\t\t\trawExtraFieldNTFS = EMPTY_UINT8_ARRAY;\n\t\t}\n\t} else {\n\t\trawExtraFieldNTFS = rawExtraFieldExtendedTimestamp = EMPTY_UINT8_ARRAY;\n\t}\n\tlet rawExtraFieldUnix;\n\ttry {\n\t\tconst { uid, gid, unixExtraFieldType } = options;\n\t\tif (unixExtraFieldType == INFOZIP_EXTRA_FIELD_TYPE && (uid !== UNDEFINED_VALUE || gid !== UNDEFINED_VALUE)) {\n\t\t\tconst uidBytes = packUnixId(uid === UNDEFINED_VALUE ? 0 : uid);\n\t\t\tconst gidBytes = packUnixId(gid === UNDEFINED_VALUE ? 0 : gid);\n\t\t\tconst payloadLength = 3 + uidBytes.length + gidBytes.length;\n\t\t\tconst extraFieldUnix = createRecordWriter(4 + payloadLength);\n\t\t\textraFieldUnix.writeUint16(EXTRAFIELD_TYPE_INFOZIP);\n\t\t\textraFieldUnix.writeUint16(payloadLength);\n\t\t\textraFieldUnix.writeUint8(1);\n\t\t\textraFieldUnix.writeUint8(uidBytes.length);\n\t\t\textraFieldUnix.writeBytes(uidBytes);\n\t\t\textraFieldUnix.writeUint8(gidBytes.length);\n\t\t\textraFieldUnix.writeBytes(gidBytes);\n\t\t\trawExtraFieldUnix = extraFieldUnix.array;\n\t\t} else if (unixExtraFieldType == UNIX_EXTRA_FIELD_TYPE && (uid !== UNDEFINED_VALUE || gid !== UNDEFINED_VALUE)) {\n\t\t\tconst extraFieldUnix = createRecordWriter(8);\n\t\t\textraFieldUnix.writeUint16(EXTRAFIELD_TYPE_UNIX);\n\t\t\textraFieldUnix.writeUint16(4);\n\t\t\textraFieldUnix.writeUint16((uid === UNDEFINED_VALUE ? 0 : uid) & MAX_16_BITS);\n\t\t\textraFieldUnix.writeUint16((gid === UNDEFINED_VALUE ? 0 : gid) & MAX_16_BITS);\n\t\t\trawExtraFieldUnix = extraFieldUnix.array;\n\t\t} else {\n\t\t\trawExtraFieldUnix = EMPTY_UINT8_ARRAY;\n\t\t}\n\t} catch {\n\t\trawExtraFieldUnix = EMPTY_UINT8_ARRAY;\n\t}\n\tif (compressionMethod === UNDEFINED_VALUE) {\n\t\tcompressionMethod = compressed ? COMPRESSION_METHOD_DEFLATE : COMPRESSION_METHOD_STORE;\n\t}\n\tif (version === UNDEFINED_VALUE) {\n\t\tversion = compressionMethod == COMPRESSION_METHOD_STORE && !directory && !encrypted ? VERSION_STORE : VERSION_DEFLATE;\n\t}\n\tconst { codecVersionNeeded } = options;\n\tif (compressed && codecVersionNeeded !== UNDEFINED_VALUE) {\n\t\tversion = version > codecVersionNeeded ? version : codecVersionNeeded;\n\t}\n\tif (zip64) {\n\t\tversion = version > VERSION_ZIP64 ? version : VERSION_ZIP64;\n\t}\n\tif (encrypted && !zipCrypto) {\n\t\tversion = version > VERSION_AES ? version : VERSION_AES;\n\t\tif (passThroughCompression && crc32 !== UNDEFINED_VALUE) {\n\t\t\trawExtraFieldAES[EXTRAFIELD_OFFSET_AES_VENDOR_VERSION] = VENDOR_VERSION_AE_1;\n\t\t}\n\t\tsetUint16(getDataView(rawExtraFieldAES), EXTRAFIELD_OFFSET_AES_COMPRESSION_METHOD, compressionMethod);\n\t\tcompressionMethod = COMPRESSION_METHOD_AES;\n\t}\n\tconst localExtraFieldZip64Length = writeLocalExtraFieldZip64 ? getLength(rawLocalExtraFieldZip64) : 0;\n\tconst extraFieldLength = localExtraFieldZip64Length + getLength(rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS, rawExtraFieldUnix, rawExtraField, rawLocalExtraField);\n\tconst maximumUsdzExtraFieldLength = options[OPTION_USDZ] ? EXTRAFIELD_USDZ_MAX_LENGTH : 0;\n\tif (extraFieldLength + maximumUsdzExtraFieldLength > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_EXTRAFIELD_DATA);\n\t}\n\tconst dosLastModDate = new Date(Math.ceil(Math.floor(lastModDate.getTime() / 1000) / 2) * 2000);\n\tconst clampedLastModDate = dosLastModDate < MIN_DATE ? MIN_DATE : dosLastModDate > MAX_DATE ? MAX_DATE : dosLastModDate;\n\tconst storedLastModDate = getLength(rawExtraFieldExtendedTimestamp) ?\n\t\tnew Date(getTimeUnix(lastModDate) * 1000) :\n\t\tgetLength(rawExtraFieldNTFS) ? lastModDate : clampedLastModDate;\n\tconst {\n\t\theaderArray,\n\t\theaderView,\n\t\trawLastModDate\n\t} = getHeaderArrayData({\n\t\tversion,\n\t\tbitFlag: getBitFlag(level, useUnicodeFileNames, dataDescriptor, encrypted, compressionMethod),\n\t\tcompressionMethod,\n\t\tuncompressedSize,\n\t\tlastModDate: clampedLastModDate,\n\t\trawLastModDate: rawLastModDateOption,\n\t\trawFilename,\n\t\tzip64CompressedSize,\n\t\tzip64UncompressedSize,\n\t\textraFieldLength\n\t});\n\tconst localHeader = createRecordWriter(HEADER_SIZE + getLength(rawFilename) + extraFieldLength);\n\tconst localHeaderArray = localHeader.array;\n\tconst localHeaderView = getDataView(localHeaderArray);\n\tlocalHeader.writeUint32(LOCAL_FILE_HEADER_SIGNATURE);\n\tlocalHeader.writeBytes(headerArray);\n\tlocalHeader.writeBytes(rawFilename);\n\tif (writeLocalExtraFieldZip64) {\n\t\tlocalHeader.writeBytes(rawLocalExtraFieldZip64);\n\t}\n\tlocalHeader.writeBytes(rawExtraFieldAES);\n\tlocalHeader.writeBytes(rawExtraFieldExtendedTimestamp);\n\tlocalHeader.writeBytes(rawExtraFieldNTFS);\n\tlocalHeader.writeBytes(rawExtraFieldUnix);\n\tlocalHeader.writeBytes(rawExtraField);\n\tlocalHeader.writeBytes(rawLocalExtraField);\n\tif (dataDescriptor) {\n\t\tif (!zip64CompressedSize) {\n\t\t\tsetUint32(localHeaderView, HEADER_OFFSET_COMPRESSED_SIZE + LOCAL_HEADER_COMMON_OFFSET, 0);\n\t\t}\n\t\tif (!zip64UncompressedSize) {\n\t\t\tsetUint32(localHeaderView, HEADER_OFFSET_UNCOMPRESSED_SIZE + LOCAL_HEADER_COMMON_OFFSET, 0);\n\t\t}\n\t}\n\treturn {\n\t\tlocalHeaderArray,\n\t\tlocalHeaderView,\n\t\theaderArray,\n\t\theaderView,\n\t\tlastModDate: storedLastModDate,\n\t\tlastModDateClamped: storedLastModDate === clampedLastModDate && dosLastModDate.getTime() != clampedLastModDate.getTime(),\n\t\trawLastModDate,\n\t\tencrypted,\n\t\tcompressed,\n\t\tversion,\n\t\tcompressionMethod,\n\t\textraFieldExtendedTimestampFlag,\n\t\textraFieldExtendedTimestampTime,\n\t\trawExtraFieldZip64: EMPTY_UINT8_ARRAY,\n\t\tlocalExtraFieldZip64Length,\n\t\trawExtraFieldExtendedTimestamp,\n\t\trawExtraFieldNTFS,\n\t\trawExtraFieldUnix,\n\t\trawExtraFieldAES,\n\t\textraFieldLength\n\t};\n}\n\nfunction appendExtraFieldUSDZ(entryInfo, zipWriterOffset) {\n\tconst { headerInfo } = entryInfo;\n\tlet { localHeaderArray, extraFieldLength } = headerInfo;\n\tlet extraBytesLength = 64 - ((zipWriterOffset + getLength(localHeaderArray)) % 64);\n\tif (extraBytesLength < 4) {\n\t\textraBytesLength += 64;\n\t}\n\tconst rawExtraFieldUSDZ = new Uint8Array(extraBytesLength);\n\tconst extraFieldUSDZView = getDataView(rawExtraFieldUSDZ);\n\tsetUint16(extraFieldUSDZView, 0, EXTRAFIELD_TYPE_USDZ);\n\tsetUint16(extraFieldUSDZView, 2, extraBytesLength - 4);\n\tconst previousLocalHeaderArray = localHeaderArray;\n\theaderInfo.localHeaderArray = localHeaderArray = new Uint8Array(getLength(previousLocalHeaderArray) + extraBytesLength);\n\tarraySet(localHeaderArray, previousLocalHeaderArray);\n\tarraySet(localHeaderArray, rawExtraFieldUSDZ, getLength(previousLocalHeaderArray));\n\tconst localHeaderArrayView = getDataView(localHeaderArray);\n\tsetUint16(localHeaderArrayView, 28, extraFieldLength + extraBytesLength);\n\theaderInfo.localHeaderView = localHeaderArrayView;\n\tentryInfo.metadataSize += extraBytesLength;\n}\n\nfunction packUnixId(id) {\n\tconst dataArray = new Uint8Array(4);\n\tconst dataView = getDataView(dataArray);\n\tdataView.setUint32(0, id, true);\n\tlet length = 4;\n\twhile (length > 1 && dataArray[length - 1] === 0) {\n\t\tlength--;\n\t}\n\treturn dataArray.subarray(0, length);\n}\n\nfunction normalizeMsdosAttributes(msdosAttributesRaw, msdosAttributes) {\n\tif (msdosAttributesRaw !== UNDEFINED_VALUE) {\n\t\tmsdosAttributesRaw = msdosAttributesRaw & MAX_8_BITS;\n\t} else if (msdosAttributes !== UNDEFINED_VALUE) {\n\t\tconst { readOnly, hidden, system, directory: msdDir, archive } = msdosAttributes;\n\t\tlet raw = 0;\n\t\tif (readOnly) raw |= FILE_ATTR_MSDOS_READONLY_MASK;\n\t\tif (hidden) raw |= FILE_ATTR_MSDOS_HIDDEN_MASK;\n\t\tif (system) raw |= FILE_ATTR_MSDOS_SYSTEM_MASK;\n\t\tif (msdDir) raw |= FILE_ATTR_MSDOS_DIR_MASK;\n\t\tif (archive) raw |= FILE_ATTR_MSDOS_ARCHIVE_MASK;\n\t\tmsdosAttributesRaw = raw & MAX_8_BITS;\n\t}\n\tif (msdosAttributes === UNDEFINED_VALUE) {\n\t\tmsdosAttributes = {\n\t\t\treadOnly: Boolean(msdosAttributesRaw & FILE_ATTR_MSDOS_READONLY_MASK),\n\t\t\thidden: Boolean(msdosAttributesRaw & FILE_ATTR_MSDOS_HIDDEN_MASK),\n\t\t\tsystem: Boolean(msdosAttributesRaw & FILE_ATTR_MSDOS_SYSTEM_MASK),\n\t\t\tdirectory: Boolean(msdosAttributesRaw & FILE_ATTR_MSDOS_DIR_MASK),\n\t\t\tarchive: Boolean(msdosAttributesRaw & FILE_ATTR_MSDOS_ARCHIVE_MASK)\n\t\t};\n\t}\n\treturn { msdosAttributesRaw, msdosAttributes };\n}\n\nfunction getDataDescriptorInfo({\n\tzip64,\n\tdataDescriptor,\n\tdataDescriptorSignature\n}) {\n\tlet dataDescriptorArray = EMPTY_UINT8_ARRAY;\n\tlet dataDescriptorView, dataDescriptorOffset = 0;\n\tlet dataDescriptorLength = zip64 ? DATA_DESCRIPTOR_RECORD_ZIP_64_LENGTH : DATA_DESCRIPTOR_RECORD_LENGTH;\n\tif (dataDescriptorSignature) {\n\t\tdataDescriptorLength += DATA_DESCRIPTOR_RECORD_SIGNATURE_LENGTH;\n\t}\n\tif (dataDescriptor) {\n\t\tdataDescriptorArray = new Uint8Array(dataDescriptorLength);\n\t\tdataDescriptorView = getDataView(dataDescriptorArray);\n\t\tif (dataDescriptorSignature) {\n\t\t\tdataDescriptorOffset = DATA_DESCRIPTOR_RECORD_SIGNATURE_LENGTH;\n\t\t\tsetUint32(dataDescriptorView, 0, DATA_DESCRIPTOR_RECORD_SIGNATURE);\n\t\t}\n\t}\n\treturn {\n\t\tdataDescriptorArray,\n\t\tdataDescriptorView,\n\t\tdataDescriptorOffset\n\t};\n}\n\nfunction setEntryInfo({\n\tcrc32,\n\tcompressedSize,\n\tuncompressedSize,\n\theaderInfo,\n\tdataDescriptorInfo\n}, {\n\tzip64,\n\tzipCrypto,\n\tpassThroughCompression,\n\tdataDescriptor\n}) {\n\tconst {\n\t\theaderView,\n\t\tencrypted\n\t} = headerInfo;\n\tconst {\n\t\tdataDescriptorView,\n\t\tdataDescriptorOffset\n\t} = dataDescriptorInfo;\n\tif ((!encrypted || zipCrypto || passThroughCompression) && crc32 !== UNDEFINED_VALUE) {\n\t\tsetUint32(headerView, HEADER_OFFSET_SIGNATURE, crc32);\n\t\tif (dataDescriptor) {\n\t\t\tsetUint32(dataDescriptorView, dataDescriptorOffset, crc32);\n\t\t}\n\t}\n\tif (zip64) {\n\t\tif (dataDescriptor) {\n\t\t\tsetBigUint64(dataDescriptorView, dataDescriptorOffset + 4, BigInt(compressedSize));\n\t\t\tsetBigUint64(dataDescriptorView, dataDescriptorOffset + 12, BigInt(uncompressedSize));\n\t\t}\n\t} else {\n\t\tsetUint32(headerView, HEADER_OFFSET_COMPRESSED_SIZE, compressedSize);\n\t\tsetUint32(headerView, HEADER_OFFSET_UNCOMPRESSED_SIZE, uncompressedSize);\n\t\tif (dataDescriptor) {\n\t\t\tsetUint32(dataDescriptorView, dataDescriptorOffset + 4, compressedSize);\n\t\t\tsetUint32(dataDescriptorView, dataDescriptorOffset + 8, uncompressedSize);\n\t\t}\n\t}\n}\n\nfunction updateLocalHeader({\n\trawFilename,\n\tencrypted,\n\tzip64,\n\tlocalExtraFieldZip64Length,\n\tcrc32,\n\tcompressedSize,\n\tuncompressedSize,\n\tzip64UncompressedSize,\n\tzip64CompressedSize\n}, localHeaderView, { dataDescriptor, passThroughCompression }) {\n\tif (!dataDescriptor) {\n\t\tif (!encrypted || (passThroughCompression && crc32 !== UNDEFINED_VALUE)) {\n\t\t\tsetUint32(localHeaderView, HEADER_OFFSET_SIGNATURE + LOCAL_HEADER_COMMON_OFFSET, crc32);\n\t\t}\n\t\tif (!zip64CompressedSize) {\n\t\t\tsetUint32(localHeaderView, HEADER_OFFSET_COMPRESSED_SIZE + LOCAL_HEADER_COMMON_OFFSET, compressedSize);\n\t\t}\n\t\tif (!zip64UncompressedSize) {\n\t\t\tsetUint32(localHeaderView, HEADER_OFFSET_UNCOMPRESSED_SIZE + LOCAL_HEADER_COMMON_OFFSET, uncompressedSize);\n\t\t}\n\t}\n\tif (zip64 && localExtraFieldZip64Length) {\n\t\tconst localHeaderOffset = HEADER_SIZE + getLength(rawFilename) + 4;\n\t\tsetBigUint64(localHeaderView, localHeaderOffset, BigInt(uncompressedSize));\n\t\tsetBigUint64(localHeaderView, localHeaderOffset + 8, BigInt(compressedSize));\n\t}\n}\n\n\nasync function closeFile(zipWriter, comment, options) {\n\tconst { directoryDataLength, zip64Entries } = createDirectoryRecords(zipWriter.fileEntries);\n\tconst { directoryStart, directoryEnd, directoryArray } = await writeDirectoryRecords(zipWriter, directoryDataLength, options);\n\tconst signatureLength = await writeDigitalSignatureRecord(zipWriter, directoryArray, options);\n\tawait writeEndOfDirectoryRecord(zipWriter, comment, options, { directoryStart, directoryEnd, directoryDataLength, signatureLength, zip64Entries });\n}\n\nfunction createDirectoryRecords(files) {\n\tlet directoryDataLength = 0;\n\tlet zip64Entries = false;\n\tfor (const [, fileEntry] of files) {\n\t\tconst {\n\t\t\trawFilename,\n\t\t\trawExtraFieldAES,\n\t\t\trawComment,\n\t\t\trawExtraFieldNTFS,\n\t\t\trawExtraFieldUnix,\n\t\t\trawExtraField,\n\t\t\trawCentralExtraField,\n\t\t\textraFieldExtendedTimestampFlag,\n\t\t\textraFieldExtendedTimestampTime,\n\t\t\tzip64Enabled,\n\t\t\tuncompressedSize,\n\t\t\tcompressedSize\n\t\t} = fileEntry;\n\t\tlet { zip64UncompressedSize, zip64CompressedSize } = fileEntry;\n\t\tif (!zip64Enabled) {\n\t\t\tif (zip64UncompressedSize && uncompressedSize < MAX_32_BITS) {\n\t\t\t\tzip64UncompressedSize = fileEntry.zip64UncompressedSize = false;\n\t\t\t}\n\t\t\tif (zip64CompressedSize && compressedSize < MAX_32_BITS) {\n\t\t\t\tzip64CompressedSize = fileEntry.zip64CompressedSize = false;\n\t\t\t}\n\t\t}\n\t\tzip64Entries = zip64Entries || zip64UncompressedSize || zip64CompressedSize;\n\t\tconst zip64Offset = fileEntry.offset >= MAX_32_BITS;\n\t\tconst zip64DiskNumberStart = fileEntry.diskNumberStart >= MAX_16_BITS;\n\t\tlet rawExtraFieldZip64;\n\t\tif (zip64Offset || zip64DiskNumberStart || zip64UncompressedSize || zip64CompressedSize) {\n\t\t\tconst length = 4 + (zip64UncompressedSize ? 8 : 0) + (zip64CompressedSize ? 8 : 0) + (zip64Offset ? 8 : 0) + (zip64DiskNumberStart ? 4 : 0);\n\t\t\tconst extraFieldZip64 = createRecordWriter(length);\n\t\t\textraFieldZip64.writeUint16(EXTRAFIELD_TYPE_ZIP64);\n\t\t\textraFieldZip64.writeUint16(length - 4);\n\t\t\tif (zip64UncompressedSize) {\n\t\t\t\textraFieldZip64.writeUint64(uncompressedSize);\n\t\t\t}\n\t\t\tif (zip64CompressedSize) {\n\t\t\t\textraFieldZip64.writeUint64(compressedSize);\n\t\t\t}\n\t\t\tif (zip64Offset) {\n\t\t\t\textraFieldZip64.writeUint64(fileEntry.offset);\n\t\t\t}\n\t\t\tif (zip64DiskNumberStart) {\n\t\t\t\textraFieldZip64.writeUint32(fileEntry.diskNumberStart);\n\t\t\t}\n\t\t\trawExtraFieldZip64 = extraFieldZip64.array;\n\t\t} else {\n\t\t\trawExtraFieldZip64 = EMPTY_UINT8_ARRAY;\n\t\t}\n\t\tfileEntry.rawExtraFieldZip64 = rawExtraFieldZip64;\n\t\tfileEntry.zip64Offset = zip64Offset;\n\t\tfileEntry.zip64DiskNumberStart = zip64DiskNumberStart;\n\t\tlet rawExtraFieldTimestamp;\n\t\tif (extraFieldExtendedTimestampTime === UNDEFINED_VALUE) {\n\t\t\trawExtraFieldTimestamp = EMPTY_UINT8_ARRAY;\n\t\t} else {\n\t\t\tconst extraFieldTimestamp = createRecordWriter(9);\n\t\t\textraFieldTimestamp.writeUint16(EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP);\n\t\t\textraFieldTimestamp.writeUint16(5);\n\t\t\textraFieldTimestamp.writeUint8(extraFieldExtendedTimestampFlag);\n\t\t\textraFieldTimestamp.writeUint32(extraFieldExtendedTimestampTime);\n\t\t\trawExtraFieldTimestamp = extraFieldTimestamp.array;\n\t\t}\n\t\tfileEntry.rawExtraFieldExtendedTimestamp = rawExtraFieldTimestamp;\n\t\tconst extraFieldLength = getLength(\n\t\t\trawExtraFieldZip64,\n\t\t\trawExtraFieldAES,\n\t\t\trawExtraFieldNTFS,\n\t\t\trawExtraFieldUnix,\n\t\t\trawExtraFieldTimestamp,\n\t\t\trawExtraField,\n\t\t\trawCentralExtraField);\n\t\tif (extraFieldLength > MAX_16_BITS) {\n\t\t\tthrow new Error(ERR_INVALID_EXTRAFIELD_DATA);\n\t\t}\n\t\tdirectoryDataLength += CENTRAL_FILE_HEADER_LENGTH + getLength(rawFilename, rawComment) + extraFieldLength;\n\t}\n\treturn { directoryDataLength, zip64Entries };\n}\n\nasync function writeDirectoryRecords(zipWriter, directoryDataLength, options) {\n\tconst { fileEntries, writer } = zipWriter;\n\tconst directoryArray = new Uint8Array(directoryDataLength);\n\tawait initStream(writer);\n\tlet offset = 0;\n\tlet directoryDiskOffset = 0;\n\tlet directoryStartDiskNumber = getDiskNumber(writer);\n\tlet directoryStartDiskOffset = getDiskOffset(writer);\n\tlet directoryEndDiskEntriesLength = 0;\n\tfor (const [indexFileEntry, fileEntry] of Array.from(fileEntries.values()).entries()) {\n\t\tconst {\n\t\t\toffset: fileEntryOffset,\n\t\t\trawFilename,\n\t\t\trawExtraFieldZip64,\n\t\t\trawExtraFieldAES,\n\t\t\trawExtraFieldExtendedTimestamp,\n\t\t\trawExtraFieldNTFS,\n\t\t\trawExtraFieldUnix,\n\t\t\trawExtraField,\n\t\t\trawCentralExtraField,\n\t\t\trawComment,\n\t\t\tversionMadeBy,\n\t\t\theaderArray,\n\t\t\theaderView,\n\t\t\tzip64UncompressedSize,\n\t\t\tzip64CompressedSize,\n\t\t\tzip64DiskNumberStart,\n\t\t\tzip64Offset,\n\t\t\tinternalFileAttributes,\n\t\t\texternalFileAttributes,\n\t\t\tdiskNumberStart,\n\t\t\tuncompressedSize,\n\t\t\tcompressedSize\n\t\t} = fileEntry;\n\t\tconst extraFieldLength = getLength(rawExtraFieldZip64, rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS, rawExtraFieldUnix, rawExtraField, rawCentralExtraField);\n\t\tconst directoryRecordLength = CENTRAL_FILE_HEADER_LENGTH + getLength(rawFilename, rawComment) + extraFieldLength;\n\t\tif (exceedsAvailableSize(writer, offset + directoryRecordLength - directoryDiskOffset)) {\n\t\t\tawait writeData(writer, directoryArray.slice(directoryDiskOffset, offset));\n\t\t\tdirectoryDiskOffset = offset;\n\t\t\tdirectoryEndDiskEntriesLength = 0;\n\t\t\tawait writer.closeDisk();\n\t\t}\n\t\tif (indexFileEntry == 0) {\n\t\t\tdirectoryStartDiskNumber = getDiskNumber(writer);\n\t\t\tdirectoryStartDiskOffset = getDiskOffset(writer);\n\t\t}\n\t\tif (!zip64UncompressedSize) {\n\t\t\tsetUint32(headerView, HEADER_OFFSET_UNCOMPRESSED_SIZE, uncompressedSize);\n\t\t}\n\t\tif (!zip64CompressedSize) {\n\t\t\tsetUint32(headerView, HEADER_OFFSET_COMPRESSED_SIZE, compressedSize);\n\t\t}\n\t\tif ((zip64Offset || zip64DiskNumberStart) && fileEntry.version < VERSION_ZIP64) {\n\t\t\tsetUint16(headerView, HEADER_OFFSET_VERSION, VERSION_ZIP64);\n\t\t}\n\t\tconst directoryRecord = createRecordWriter(directoryRecordLength);\n\t\tdirectoryRecord.writeUint32(CENTRAL_FILE_HEADER_SIGNATURE);\n\t\tdirectoryRecord.writeUint16(versionMadeBy);\n\t\tdirectoryRecord.writeBytes(headerArray.subarray(0, HEADER_SIZE - 4 - 2));\n\t\tdirectoryRecord.writeUint16(extraFieldLength);\n\t\tdirectoryRecord.writeUint16(getLength(rawComment));\n\t\tdirectoryRecord.writeUint16(zip64DiskNumberStart ? MAX_16_BITS : diskNumberStart);\n\t\tdirectoryRecord.writeUint16(internalFileAttributes);\n\t\tdirectoryRecord.writeUint32(externalFileAttributes);\n\t\tdirectoryRecord.writeUint32(zip64Offset ? MAX_32_BITS : fileEntryOffset);\n\t\tdirectoryRecord.writeBytes(rawFilename);\n\t\tdirectoryRecord.writeBytes(rawExtraFieldZip64);\n\t\tdirectoryRecord.writeBytes(rawExtraFieldAES);\n\t\tdirectoryRecord.writeBytes(rawExtraFieldExtendedTimestamp);\n\t\tdirectoryRecord.writeBytes(rawExtraFieldNTFS);\n\t\tdirectoryRecord.writeBytes(rawExtraFieldUnix);\n\t\tdirectoryRecord.writeBytes(rawExtraField);\n\t\tdirectoryRecord.writeBytes(rawCentralExtraField);\n\t\tdirectoryRecord.writeBytes(rawComment);\n\t\tarraySet(directoryArray, directoryRecord.array, offset);\n\t\toffset += directoryRecordLength;\n\t\tdirectoryEndDiskEntriesLength++;\n\t\tif (options.onprogress) {\n\t\t\ttry {\n\t\t\t\tawait options.onprogress(indexFileEntry + 1, fileEntries.size, new Entry(fileEntry));\n\t\t\t} catch {\n\t\t\t\t// ignored\n\t\t\t}\n\t\t}\n\t}\n\tawait writeData(writer, directoryDiskOffset ? directoryArray.slice(directoryDiskOffset) : directoryArray);\n\treturn {\n\t\tdirectoryStart: { diskNumber: directoryStartDiskNumber, diskOffset: directoryStartDiskOffset },\n\t\tdirectoryEnd: { diskNumber: getDiskNumber(writer), entriesLength: directoryEndDiskEntriesLength },\n\t\tdirectoryArray\n\t};\n}\n\nasync function writeDigitalSignatureRecord(zipWriter, directoryArray, options) {\n\tconst signCentralDirectory = getFunctionOptionValue(zipWriter, options, OPTION_SIGN_CENTRAL_DIRECTORY);\n\tif (signCentralDirectory) {\n\t\tconst signatureData = await signCentralDirectory(directoryArray);\n\t\tconst signatureDataLength = getLength(signatureData);\n\t\tif (signatureDataLength > MAX_16_BITS) {\n\t\t\tthrow new Error(ERR_INVALID_SIGNATURE_DATA);\n\t\t}\n\t\tconst signatureRecord = createRecordWriter(6 + signatureDataLength);\n\t\tsignatureRecord.writeUint32(DIGITAL_SIGNATURE_RECORD_SIGNATURE);\n\t\tsignatureRecord.writeUint16(signatureDataLength);\n\t\tsignatureRecord.writeBytes(signatureData);\n\t\tconst { writer } = zipWriter;\n\t\tif (exceedsAvailableSize(writer, getLength(signatureRecord.array))) {\n\t\t\tawait writer.closeDisk();\n\t\t}\n\t\tawait writeData(writer, signatureRecord.array);\n\t\treturn 6 + signatureDataLength;\n\t}\n\treturn 0;\n}\n\nasync function writeEndOfDirectoryRecord(zipWriter, comment, options, cdInfo) {\n\tconst { writer } = zipWriter;\n\tconst { directoryStart, directoryEnd, signatureLength, zip64Entries } = cdInfo;\n\tlet { directoryDataLength } = cdInfo;\n\tlet fileEntriesLength = zipWriter.fileEntries.size;\n\tlet diskNumber = directoryStart.diskNumber;\n\tlet directoryOffset = getSegmentOffset(zipWriter, directoryStart);\n\tconst commentLength = getLength(comment);\n\tif (commentLength > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_COMMENT);\n\t}\n\tlet zip64 = getOptionValue(zipWriter, options, PROPERTY_NAME_ZIP64);\n\tlet lastDiskNumber = getDiskNumber(writer);\n\tif (exceedsAvailableSize(writer, (zip64 ? ZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH : END_OF_CENTRAL_DIR_LENGTH) + commentLength)) {\n\t\tlastDiskNumber++;\n\t}\n\tif (directoryOffset >= MAX_32_BITS || directoryDataLength >= MAX_32_BITS || fileEntriesLength >= MAX_16_BITS || lastDiskNumber >= MAX_16_BITS) {\n\t\tif (zip64 === false) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_FORMAT);\n\t\t} else {\n\t\t\tzip64 = true;\n\t\t}\n\t} else if (zip64 === UNDEFINED_VALUE && zip64Entries) {\n\t\tzip64 = true;\n\t}\n\tconst endOfdirectoryRecord = createRecordWriter(zip64 ? ZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH : END_OF_CENTRAL_DIR_LENGTH);\n\tif (exceedsAvailableSize(writer, getLength(endOfdirectoryRecord.array) + commentLength)) {\n\t\tawait writer.closeDisk();\n\t}\n\tlastDiskNumber = getDiskNumber(writer);\n\tlet diskFileEntriesLength = lastDiskNumber == directoryEnd.diskNumber ? directoryEnd.entriesLength : 0;\n\tif (zip64) {\n\t\tendOfdirectoryRecord.writeUint32(ZIP64_END_OF_CENTRAL_DIR_SIGNATURE);\n\t\tendOfdirectoryRecord.writeUint64(44);\n\t\tendOfdirectoryRecord.writeUint16(45);\n\t\tendOfdirectoryRecord.writeUint16(45);\n\t\tendOfdirectoryRecord.writeUint32(lastDiskNumber);\n\t\tendOfdirectoryRecord.writeUint32(diskNumber);\n\t\tendOfdirectoryRecord.writeUint64(diskFileEntriesLength);\n\t\tendOfdirectoryRecord.writeUint64(fileEntriesLength);\n\t\tendOfdirectoryRecord.writeUint64(directoryDataLength);\n\t\tendOfdirectoryRecord.writeUint64(directoryOffset);\n\t\tendOfdirectoryRecord.writeUint32(ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE);\n\t\tendOfdirectoryRecord.writeUint32(lastDiskNumber);\n\t\tendOfdirectoryRecord.writeUint64(BigInt(getSegmentOffset(zipWriter, writer)) + BigInt(directoryDataLength) + BigInt(signatureLength));\n\t\tendOfdirectoryRecord.writeUint32(lastDiskNumber + 1);\n\t\tconst supportZip64SplitFile = getOptionValue(zipWriter, options, OPTION_SUPPORT_ZIP64_SPLIT_FILE, true);\n\t\tif (supportZip64SplitFile) {\n\t\t\tlastDiskNumber = MAX_16_BITS;\n\t\t\tdiskNumber = MAX_16_BITS;\n\t\t}\n\t\tdiskFileEntriesLength = MAX_16_BITS;\n\t\tfileEntriesLength = MAX_16_BITS;\n\t\tdirectoryOffset = MAX_32_BITS;\n\t\tdirectoryDataLength = MAX_32_BITS;\n\t}\n\tendOfdirectoryRecord.writeUint32(END_OF_CENTRAL_DIR_SIGNATURE);\n\tendOfdirectoryRecord.writeUint16(lastDiskNumber);\n\tendOfdirectoryRecord.writeUint16(diskNumber);\n\tendOfdirectoryRecord.writeUint16(diskFileEntriesLength);\n\tendOfdirectoryRecord.writeUint16(fileEntriesLength);\n\tendOfdirectoryRecord.writeUint32(directoryDataLength);\n\tendOfdirectoryRecord.writeUint32(directoryOffset);\n\tendOfdirectoryRecord.writeUint16(commentLength);\n\tawait writeData(writer, endOfdirectoryRecord.array);\n\tif (commentLength) {\n\t\tawait writeData(writer, comment);\n\t}\n}\n\nfunction createRecordWriter(length) {\n\tconst array = new Uint8Array(length);\n\tconst view = getDataView(array);\n\tlet offset = 0;\n\treturn {\n\t\tarray,\n\t\twriteUint8: value => { setUint8(view, offset, value); offset += 1; },\n\t\twriteUint16: value => { setUint16(view, offset, value); offset += 2; },\n\t\twriteUint32: value => { setUint32(view, offset, value); offset += 4; },\n\t\twriteUint64: value => { setBigUint64(view, offset, BigInt(value)); offset += 8; },\n\t\twriteBytes: value => { arraySet(array, value, offset); offset += getLength(value); },\n\t\tskip: count => offset += count\n\t};\n}\n\nfunction getDiskNumber(writer) {\n\tconst { diskNumber = 0 } = writer;\n\treturn diskNumber;\n}\n\nfunction getDiskOffset(writer) {\n\tconst { diskOffset = 0 } = writer;\n\treturn diskOffset;\n}\n\nfunction exceedsAvailableSize(writer, length) {\n\tconst { availableSize = INFINITY_VALUE } = writer;\n\treturn length > availableSize;\n}\n\nfunction getSegmentOffset(zipWriter, { diskNumber = 0, diskOffset = 0 }) {\n\treturn zipWriter.offset - diskOffset - (diskNumber ? zipWriter.initialOffset : 0);\n}\n\nasync function startsWithSplitZipSignature(reader) {\n\tconst signatureArray = await readUint8Array(reader, 0, SPLIT_ZIP_FILE_SIGNATURE_LENGTH);\n\treturn getUint32(getDataView(signatureArray), 0) == SPLIT_ZIP_FILE_SIGNATURE;\n}\n\nfunction removeExtraFieldZip64(rawExtraField) {\n\tconst rawExtraFieldView = getDataView(rawExtraField);\n\tlet offsetExtraField = 0;\n\twhile (offsetExtraField + 4 <= getLength(rawExtraField)) {\n\t\tconst size = 4 + getUint16(rawExtraFieldView, offsetExtraField + 2);\n\t\tif (getUint16(rawExtraFieldView, offsetExtraField) == EXTRAFIELD_TYPE_ZIP64) {\n\t\t\treturn removeExtraFieldZip64(concat(\n\t\t\t\trawExtraField.subarray(0, offsetExtraField),\n\t\t\t\trawExtraField.subarray(Math.min(offsetExtraField + size, getLength(rawExtraField)))));\n\t\t}\n\t\toffsetExtraField += size;\n\t}\n\treturn rawExtraField;\n}\n\nasync function copyZipData(zipWriter, reader, entries, directoryOffset) {\n\tconst { writer } = zipWriter;\n\tconst entryPositions = new Map();\n\tif (writer.closeDisk) {\n\t\tconst sortedEntries = Array.from(entries).sort((firstEntry, secondEntry) =>\n\t\t\tgetSourceOffset(reader, firstEntry) - getSourceOffset(reader, secondEntry));\n\t\tlet copiedLength = 0;\n\t\tfor (const entry of sortedEntries) {\n\t\t\tconst sourceOffset = getSourceOffset(reader, entry);\n\t\t\tawait copyData(zipWriter, reader, copiedLength, sourceOffset - copiedLength);\n\t\t\tif (exceedsAvailableSize(writer, await getLocalHeaderLength(reader, sourceOffset))) {\n\t\t\t\tawait writer.closeDisk();\n\t\t\t}\n\t\t\tentryPositions.set(entry, {\n\t\t\t\toffset: getSegmentOffset(zipWriter, writer),\n\t\t\t\tdiskNumberStart: getDiskNumber(writer)\n\t\t\t});\n\t\t\tcopiedLength = sourceOffset;\n\t\t}\n\t\tawait copyData(zipWriter, reader, copiedLength, directoryOffset - copiedLength);\n\t} else {\n\t\tconst baseOffset = zipWriter.offset;\n\t\tawait copyData(zipWriter, reader, 0, directoryOffset);\n\t\tentries.forEach(entry => entryPositions.set(entry, {\n\t\t\toffset: baseOffset + getSourceOffset(reader, entry),\n\t\t\tdiskNumberStart: 0\n\t\t}));\n\t}\n\treturn entryPositions;\n}\n\nasync function copyData(zipWriter, reader, offset, size) {\n\tif (size > 0) {\n\t\tconst { writer } = zipWriter;\n\t\tlet copiedLength = 0;\n\t\ttry {\n\t\t\tawait flushBufferedData(createReadable(reader, { offset, size }), writer, UNDEFINED_VALUE, chunkLength => copiedLength += chunkLength);\n\t\t} catch (error) {\n\t\t\tzipWriter.hasCorruptedEntries = true;\n\t\t\ttry {\n\t\t\t\terror.corruptedEntry = true;\n\t\t\t} catch {\n\t\t\t\t// ignored\n\t\t\t}\n\t\t\tthrow error;\n\t\t} finally {\n\t\t\twriter.size += copiedLength;\n\t\t\tzipWriter.offset += copiedLength;\n\t\t}\n\t}\n}\n\nasync function getLocalHeaderLength(reader, offset) {\n\tconst headerArray = await readUint8Array(reader, offset, HEADER_SIZE);\n\tif (getLength(headerArray) < HEADER_SIZE) {\n\t\treturn HEADER_SIZE;\n\t}\n\tconst headerView = getDataView(headerArray);\n\treturn HEADER_SIZE +\n\t\tgetUint16(headerView, HEADER_OFFSET_FILENAME_LENGTH + LOCAL_HEADER_COMMON_OFFSET) +\n\t\tgetUint16(headerView, HEADER_OFFSET_EXTRAFIELD_LENGTH + LOCAL_HEADER_COMMON_OFFSET);\n}\n\nfunction getSourceOffset(reader, { offset, diskNumberStart }) {\n\treturn offset + (reader.getDiskOffset ? reader.getDiskOffset(diskNumberStart) : 0);\n}\n\nfunction getSplitZipSignatureArray() {\n\tconst signatureArray = new Uint8Array(SPLIT_ZIP_FILE_SIGNATURE_LENGTH);\n\tsetUint32(getDataView(signatureArray), 0, SPLIT_ZIP_FILE_SIGNATURE);\n\treturn signatureArray;\n}\n\nasync function writeSplitZipSignature(zipWriter, writer) {\n\tdelete zipWriter.addSplitZipSignature;\n\tawait writeData(writer, getSplitZipSignatureArray());\n\tzipWriter.offset += SPLIT_ZIP_FILE_SIGNATURE_LENGTH;\n}\n\nasync function writeData(writer, array) {\n\tconst { writable } = writer;\n\tconst streamWriter = writable.getWriter();\n\ttry {\n\t\tawait streamWriter.ready;\n\t\twriter.size += getLength(array);\n\t\tawait streamWriter.write(array);\n\t} finally {\n\t\tstreamWriter.releaseLock();\n\t}\n}\n\nasync function flushBufferedData(readable, writer, signal, onChunkWritten) {\n\tconst streamWriter = writer.writable.getWriter();\n\ttry {\n\t\tawait readable.pipeTo(new WritableStream({\n\t\t\tasync write(chunk) {\n\t\t\t\tawait streamWriter.ready;\n\t\t\t\tawait streamWriter.write(chunk);\n\t\t\t\tonChunkWritten(getLength(chunk));\n\t\t\t}\n\t\t}), { preventClose: true, preventAbort: true, signal });\n\t} finally {\n\t\tstreamWriter.releaseLock();\n\t}\n}\n\nfunction getTimeNTFS(date) {\n\tif (date) {\n\t\tconst timeNTFS = ((BigInt(date.getTime()) + BigInt(11644473600000)) * BigInt(10000));\n\t\treturn timeNTFS < MIN_NTFS_TIME ? MIN_NTFS_TIME : timeNTFS > MAX_NTFS_TIME ? MAX_NTFS_TIME : timeNTFS;\n\t}\n}\n\nfunction getTimeUnix(date) {\n\treturn Math.floor(date.getTime() / 1000);\n}\n\nfunction inUnixTimeRange(timeUnix) {\n\treturn timeUnix >= MIN_UNIX_TIME && timeUnix <= MAX_UNIX_TIME;\n}\n\nfunction clampUnixTime(timeUnix) {\n\treturn Math.min(MAX_UNIX_TIME, Math.max(MIN_UNIX_TIME, timeUnix));\n}\n\nfunction getOptionValue(zipWriter, options, name, defaultValue) {\n\tconst result = options[name] === UNDEFINED_VALUE ? zipWriter.options[name] : options[name];\n\treturn result === UNDEFINED_VALUE ? defaultValue : result;\n}\n\nfunction getDateOptionValue(zipWriter, options, name, defaultValue) {\n\tconst date = getOptionValue(zipWriter, options, name, defaultValue);\n\tif (date === null) {\n\t\treturn defaultValue;\n\t}\n\tif (date !== UNDEFINED_VALUE && (typeof date.getTime != FUNCTION_TYPE || Number.isNaN(date.getTime()))) {\n\t\tthrow new Error(ERR_INVALID_DATE);\n\t}\n\treturn date;\n}\n\nfunction getFunctionOptionValue(zipWriter, options, name) {\n\treturn checkFunctionOption(getOptionValue(zipWriter, options, name));\n}\n\nfunction getNumberOptionValue(zipWriter, options, name, defaultValue) {\n\treturn toNumber(getOptionValue(zipWriter, options, name, defaultValue));\n}\n\n\nfunction getMaximumCompressedSize(uncompressedSize) {\n\treturn uncompressedSize + (5 * (Math.floor(uncompressedSize / 16383) + 1));\n}\n\nfunction isCompressed(compressionMethod, level) {\n\treturn compressionMethod === UNDEFINED_VALUE\n\t\t? (level === UNDEFINED_VALUE || level > 0)\n\t\t: compressionMethod !== COMPRESSION_METHOD_STORE;\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 setUint8(view, offset, value) {\n\tview.setUint8(offset, value);\n}\n\nfunction setUint16(view, offset, value) {\n\tview.setUint16(offset, value, true);\n}\n\nfunction setUint32(view, offset, value) {\n\tview.setUint32(offset, value, true);\n}\n\nfunction setBigUint64(view, offset, value) {\n\tview.setBigUint64(offset, value, true);\n}\n\nfunction arraySet(array, typedArray, offset) {\n\tarray.set(typedArray, offset);\n}\n\n\nfunction getLength(...arrayLikes) {\n\tlet result = 0;\n\tarrayLikes.forEach(arrayLike => arrayLike && (result += arrayLike.length));\n\treturn result;\n}\n\nfunction getHeaderArrayData({\n\tversion,\n\tbitFlag,\n\tcompressionMethod,\n\tuncompressedSize,\n\tcompressedSize,\n\tlastModDate,\n\trawLastModDate,\n\trawFilename,\n\tzip64CompressedSize,\n\tzip64UncompressedSize,\n\textraFieldLength\n}) {\n\tconst headerRecord = createRecordWriter(HEADER_SIZE - 4);\n\tconst headerArray = headerRecord.array;\n\tconst headerView = getDataView(headerArray);\n\theaderRecord.writeUint16(version);\n\theaderRecord.writeUint16(bitFlag);\n\theaderRecord.writeUint16(compressionMethod);\n\tif (rawLastModDate === UNDEFINED_VALUE) {\n\t\tconst dateArray = new Uint32Array(1);\n\t\tconst dateView = getDataView(dateArray);\n\t\tsetUint16(dateView, 0, (((lastModDate.getHours() << 6) | lastModDate.getMinutes()) << 5) | lastModDate.getSeconds() / 2);\n\t\tsetUint16(dateView, 2, ((((lastModDate.getFullYear() - 1980) << 4) | (lastModDate.getMonth() + 1)) << 5) | lastModDate.getDate());\n\t\trawLastModDate = dateArray[0];\n\t}\n\theaderRecord.writeUint32(rawLastModDate);\n\theaderRecord.skip(4);\n\tif (zip64CompressedSize || compressedSize !== UNDEFINED_VALUE) {\n\t\theaderRecord.writeUint32(zip64CompressedSize ? MAX_32_BITS : compressedSize);\n\t} else {\n\t\theaderRecord.skip(4);\n\t}\n\tif (zip64UncompressedSize || uncompressedSize !== UNDEFINED_VALUE) {\n\t\theaderRecord.writeUint32(zip64UncompressedSize ? MAX_32_BITS : uncompressedSize);\n\t} else {\n\t\theaderRecord.skip(4);\n\t}\n\theaderRecord.writeUint16(getLength(rawFilename));\n\theaderRecord.writeUint16(extraFieldLength);\n\treturn {\n\t\theaderArray,\n\t\theaderView,\n\t\trawLastModDate\n\t};\n}\n\nfunction isPrintableASCIIText(rawText) {\n\treturn rawText.every(characterCode =>\n\t\tcharacterCode >= MIN_PRINTABLE_ASCII_CHARACTER_CODE && characterCode <= MAX_PRINTABLE_ASCII_CHARACTER_CODE);\n}\n\nfunction getBitFlag(level, useUnicodeFileNames, dataDescriptor, encrypted, compressionMethod) {\n\tlet bitFlag = 0;\n\tif (useUnicodeFileNames) {\n\t\tbitFlag = bitFlag | BITFLAG_LANG_ENCODING_FLAG;\n\t}\n\tif (dataDescriptor) {\n\t\tbitFlag = bitFlag | BITFLAG_DATA_DESCRIPTOR;\n\t}\n\tif (compressionMethod == COMPRESSION_METHOD_DEFLATE || compressionMethod == COMPRESSION_METHOD_DEFLATE_64) {\n\t\tif (level >= 0 && level <= 3) {\n\t\t\tbitFlag = bitFlag | BITFLAG_LEVEL_SUPER_FAST_MASK;\n\t\t}\n\t\tif (level > 3 && level <= 5) {\n\t\t\tbitFlag = bitFlag | BITFLAG_LEVEL_FAST_MASK;\n\t\t}\n\t\tif (level == 9) {\n\t\t\tbitFlag = bitFlag | BITFLAG_LEVEL_MAX_MASK;\n\t\t}\n\t}\n\tif (encrypted) {\n\t\tbitFlag = bitFlag | BITFLAG_ENCRYPTED;\n\t}\n\treturn bitFlag;\n}\n","/*\n Copyright (c) 2025 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 {\n\tCOMPRESSION_METHOD_STORE,\n\tCOMPRESSION_METHOD_DEFLATE,\n\tCOMPRESSION_METHOD_DEFLATE_64,\n\tUNDEFINED_VALUE,\n\tFUNCTION_TYPE\n} from \"./constants.js\";\nimport { getConfiguration } from \"./configuration.js\";\nimport { getRegisteredCodecs, getCodecStreams } from \"./codec-registry.js\";\nimport {\n\tsupportsFormat,\n\tFORMAT_DEFLATE_RAW,\n\tFORMAT_DEFLATE64_RAW,\n\tFORMAT_GZIP\n} from \"./streams/zip-entry-stream.js\";\n\nexport {\n\tgetSupportedCompressionMethods\n};\n\nfunction getSupportedCompressionMethods() {\n\tconst { CompressionStream, DecompressionStream, CompressionStreamFallback, DecompressionStreamFallback } = getConfiguration();\n\tconst supportedMethods = [{\n\t\tcompressionMethod: COMPRESSION_METHOD_STORE,\n\t\tcompression: true,\n\t\tdecompression: true,\n\t\tregistered: false\n\t}, {\n\t\tcompressionMethod: COMPRESSION_METHOD_DEFLATE,\n\t\tcompression: formatSupported(CompressionStreamFallback, FORMAT_DEFLATE_RAW) ||\n\t\t\tformatSupported(CompressionStream, FORMAT_DEFLATE_RAW) || formatSupported(CompressionStream, FORMAT_GZIP),\n\t\tdecompression: formatSupported(DecompressionStreamFallback, FORMAT_DEFLATE_RAW) ||\n\t\t\tformatSupported(DecompressionStream, FORMAT_DEFLATE_RAW) || formatSupported(DecompressionStream, FORMAT_GZIP),\n\t\tregistered: false\n\t}, {\n\t\tcompressionMethod: COMPRESSION_METHOD_DEFLATE_64,\n\t\tcompression: false,\n\t\tdecompression: formatSupported(DecompressionStreamFallback, FORMAT_DEFLATE64_RAW) ||\n\t\t\tformatSupported(DecompressionStream, FORMAT_DEFLATE64_RAW),\n\t\tregistered: false\n\t}];\n\tfor (const codec of getRegisteredCodecs()) {\n\t\tconst codecStreams = getCodecStreams(codec.format);\n\t\tsupportedMethods.push({\n\t\t\tcompressionMethod: codec.compressionMethod,\n\t\t\t// deno-lint-ignore valid-typeof\n\t\t\tcompression: codecStreams ? typeof codecStreams.CompressionStream == FUNCTION_TYPE : UNDEFINED_VALUE,\n\t\t\t// deno-lint-ignore valid-typeof\n\t\t\tdecompression: codecStreams ? typeof codecStreams.DecompressionStream == FUNCTION_TYPE : UNDEFINED_VALUE,\n\t\t\tregistered: true\n\t\t});\n\t}\n\treturn supportedMethods;\n}\n\nfunction formatSupported(StreamClass, format) {\n\tif (!StreamClass) {\n\t\treturn false;\n\t}\n\tconst { supportedFormats } = StreamClass;\n\tif (supportedFormats) {\n\t\treturn supportedFormats.includes(format);\n\t}\n\treturn supportsFormat(StreamClass, format);\n}\n","/*\n Copyright (c) 2025 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, crypto, ReadableStream, WritableStream */\n\nexport {\n\tcreateOPFSTempStream\n};\n\nconst DEFAULT_THRESHOLD = 1024 * 1024;\nconst DEFAULT_DIRECTORY_NAME = \".zip.js-temp\";\n\nfunction createOPFSTempStream(options = {}) {\n\tconst {\n\t\tthresholdBytes = DEFAULT_THRESHOLD,\n\t\tdirectoryName = DEFAULT_DIRECTORY_NAME,\n\t\tgetDirectory = () => navigator.storage.getDirectory()\n\t} = options;\n\tlet directoryHandlePromise;\n\tfunction getTempDirectory() {\n\t\tif (!directoryHandlePromise) {\n\t\t\tdirectoryHandlePromise = Promise.resolve(getDirectory())\n\t\t\t\t.then(root => root.getDirectoryHandle(directoryName, { create: true }));\n\t\t}\n\t\treturn directoryHandlePromise;\n\t}\n\treturn function () {\n\t\tconst memoryChunks = [];\n\t\tlet bufferedSize = 0;\n\t\tlet spilled = false;\n\t\tlet fileName, fileHandle, fileWriter, fileReader;\n\n\t\tasync function spillToFile() {\n\t\t\tconst directoryHandle = await getTempDirectory();\n\t\t\tfileName = getRandomFileName();\n\t\t\tfileHandle = await directoryHandle.getFileHandle(fileName, { create: true });\n\t\t\tfileWriter = (await fileHandle.createWritable()).getWriter();\n\t\t\tspilled = true;\n\t\t\tfor (const chunk of memoryChunks) {\n\t\t\t\tawait fileWriter.write(chunk);\n\t\t\t}\n\t\t\tmemoryChunks.length = 0;\n\t\t}\n\n\t\tconst writable = new WritableStream({\n\t\t\tasync write(chunk) {\n\t\t\t\tif (spilled) {\n\t\t\t\t\tawait fileWriter.write(chunk);\n\t\t\t\t} else {\n\t\t\t\t\tmemoryChunks.push(chunk);\n\t\t\t\t\tbufferedSize += chunk.length;\n\t\t\t\t\tif (bufferedSize > thresholdBytes) {\n\t\t\t\t\t\tawait spillToFile();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\tasync close() {\n\t\t\t\tif (fileWriter) {\n\t\t\t\t\tawait fileWriter.close();\n\t\t\t\t\tfileWriter = null;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tlet memoryIndex = 0;\n\t\tconst readable = new ReadableStream({\n\t\t\tasync pull(controller) {\n\t\t\t\tif (spilled) {\n\t\t\t\t\tif (!fileReader) {\n\t\t\t\t\t\tconst file = await fileHandle.getFile();\n\t\t\t\t\t\tfileReader = file.stream().getReader();\n\t\t\t\t\t}\n\t\t\t\t\tconst { value, done } = await fileReader.read();\n\t\t\t\t\tif (done) {\n\t\t\t\t\t\tcontroller.close();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcontroller.enqueue(value);\n\t\t\t\t\t}\n\t\t\t\t} else if (memoryIndex < memoryChunks.length) {\n\t\t\t\t\tcontroller.enqueue(memoryChunks[memoryIndex++]);\n\t\t\t\t} else {\n\t\t\t\t\tcontroller.close();\n\t\t\t\t}\n\t\t\t},\n\t\t\tasync cancel(reason) {\n\t\t\t\tif (fileReader) {\n\t\t\t\t\tawait fileReader.cancel(reason);\n\t\t\t\t}\n\t\t\t}\n\t\t}, { highWaterMark: 0 });\n\t\tasync function dispose() {\n\t\t\tif (fileWriter) {\n\t\t\t\ttry {\n\t\t\t\t\tawait fileWriter.close();\n\t\t\t\t} catch {\n\t\t\t\t\t// ignored\n\t\t\t\t}\n\t\t\t\tfileWriter = null;\n\t\t\t}\n\t\t\tif (fileName) {\n\t\t\t\ttry {\n\t\t\t\t\tconst directoryHandle = await getTempDirectory();\n\t\t\t\t\tawait directoryHandle.removeEntry(fileName);\n\t\t\t\t} catch {\n\t\t\t\t\t// ignored\n\t\t\t\t}\n\t\t\t\tfileHandle = fileName = null;\n\t\t\t}\n\t\t\tmemoryChunks.length = 0;\n\t\t}\n\n\t\treturn { writable, readable, dispose };\n\t};\n}\n\nfunction getRandomFileName() {\n\tif (crypto.randomUUID) {\n\t\treturn crypto.randomUUID();\n\t}\n\treturn Array.from(crypto.getRandomValues(new Uint8Array(16)), byteValue => byteValue.toString(16).padStart(2, \"0\")).join(\"\");\n}\n","/*\n Copyright (c) 2025 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 ReadableStream, WritableStream, TransformStream */\n\nimport { streamToBlob } from \"./compatible-streams.js\";\n\nexport {\n\tcreateBlobTempStream\n};\n\nconst DEFAULT_THRESHOLD = 1024 * 1024;\n\nfunction createBlobTempStream(options = {}) {\n\tconst {\n\t\tthresholdBytes = DEFAULT_THRESHOLD\n\t} = options;\n\treturn function () {\n\t\tconst memoryChunks = [];\n\t\tlet bufferedSize = 0;\n\t\tlet spilled = false;\n\t\tlet blobWriter, blobPromise, blobReader;\n\n\t\tasync function spillToBlob() {\n\t\t\tconst transformStream = new TransformStream();\n\t\t\tblobPromise = streamToBlob(transformStream.readable);\n\t\t\tblobWriter = transformStream.writable.getWriter();\n\t\t\tspilled = true;\n\t\t\tfor (const chunk of memoryChunks) {\n\t\t\t\tawait blobWriter.write(chunk);\n\t\t\t}\n\t\t\tmemoryChunks.length = 0;\n\t\t}\n\n\t\tconst writable = new WritableStream({\n\t\t\tasync write(chunk) {\n\t\t\t\tif (spilled) {\n\t\t\t\t\tawait blobWriter.write(chunk);\n\t\t\t\t} else {\n\t\t\t\t\tmemoryChunks.push(chunk);\n\t\t\t\t\tbufferedSize += chunk.length;\n\t\t\t\t\tif (bufferedSize > thresholdBytes) {\n\t\t\t\t\t\tawait spillToBlob();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\tasync close() {\n\t\t\t\tif (blobWriter) {\n\t\t\t\t\tawait blobWriter.close();\n\t\t\t\t\tblobWriter = null;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tlet memoryIndex = 0;\n\t\tconst readable = new ReadableStream({\n\t\t\tasync pull(controller) {\n\t\t\t\tif (spilled) {\n\t\t\t\t\tif (!blobReader) {\n\t\t\t\t\t\tconst blob = await blobPromise;\n\t\t\t\t\t\tblobReader = blob.stream().getReader();\n\t\t\t\t\t}\n\t\t\t\t\tconst { value, done } = await blobReader.read();\n\t\t\t\t\tif (done) {\n\t\t\t\t\t\tcontroller.close();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcontroller.enqueue(value);\n\t\t\t\t\t}\n\t\t\t\t} else if (memoryIndex < memoryChunks.length) {\n\t\t\t\t\tcontroller.enqueue(memoryChunks[memoryIndex++]);\n\t\t\t\t} else {\n\t\t\t\t\tcontroller.close();\n\t\t\t\t}\n\t\t\t},\n\t\t\tasync cancel(reason) {\n\t\t\t\tif (blobReader) {\n\t\t\t\t\tawait blobReader.cancel(reason);\n\t\t\t\t}\n\t\t\t}\n\t\t}, { highWaterMark: 0 });\n\t\tasync function dispose() {\n\t\t\tif (blobWriter) {\n\t\t\t\ttry {\n\t\t\t\t\tawait blobWriter.abort();\n\t\t\t\t} catch {\n\t\t\t\t\t// ignored\n\t\t\t\t}\n\t\t\t\tblobWriter = null;\n\t\t\t}\n\t\t\tif (blobPromise) {\n\t\t\t\tblobPromise.catch(() => {\n\t\t\t\t\t// ignored\n\t\t\t\t});\n\t\t\t\tblobPromise = null;\n\t\t\t}\n\t\t\tmemoryChunks.length = 0;\n\t\t}\n\n\t\treturn { writable, readable, dispose };\n\t};\n}\n","/*\n Copyright (c) 2025 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, crypto, FileSystemFileHandle, ReadableStream, WritableStream */\n\nexport {\n\tcreateSyncAccessHandleTempStream,\n\tERR_UNSUPPORTED_CONTEXT\n};\n\nconst DEFAULT_THRESHOLD = 1024 * 1024;\nconst DEFAULT_DIRECTORY_NAME = \".zip.js-temp\";\nconst READ_CHUNK_SIZE = 512 * 1024;\nconst ERR_UNSUPPORTED_CONTEXT = \"createSyncAccessHandle is only available in dedicated workers\";\n\nfunction createSyncAccessHandleTempStream(options = {}) {\n\tconst {\n\t\tthresholdBytes = DEFAULT_THRESHOLD,\n\t\tdirectoryName = DEFAULT_DIRECTORY_NAME,\n\t\tgetDirectory\n\t} = options;\n\tif (!getDirectory &&\n\t\t(typeof FileSystemFileHandle == \"undefined\" || !FileSystemFileHandle.prototype.createSyncAccessHandle)) {\n\t\tthrow new Error(ERR_UNSUPPORTED_CONTEXT);\n\t}\n\tconst getRootDirectory = getDirectory || (() => navigator.storage.getDirectory());\n\tlet directoryHandlePromise;\n\tfunction getTempDirectory() {\n\t\tif (!directoryHandlePromise) {\n\t\t\tdirectoryHandlePromise = Promise.resolve(getRootDirectory())\n\t\t\t\t.then(root => root.getDirectoryHandle(directoryName, { create: true }));\n\t\t}\n\t\treturn directoryHandlePromise;\n\t}\n\treturn function () {\n\t\tconst memoryChunks = [];\n\t\tlet bufferedSize = 0;\n\t\tlet spilled = false;\n\t\tlet fileName, accessHandle;\n\t\tlet writeOffset = 0;\n\t\tlet readOffset = 0;\n\n\t\tasync function spillToFile() {\n\t\t\tconst directoryHandle = await getTempDirectory();\n\t\t\tfileName = getRandomFileName();\n\t\t\tconst fileHandle = await directoryHandle.getFileHandle(fileName, { create: true });\n\t\t\taccessHandle = await fileHandle.createSyncAccessHandle();\n\t\t\tspilled = true;\n\t\t\tfor (const chunk of memoryChunks) {\n\t\t\t\taccessHandle.write(chunk, { at: writeOffset });\n\t\t\t\twriteOffset += chunk.length;\n\t\t\t}\n\t\t\tmemoryChunks.length = 0;\n\t\t}\n\n\t\tconst writable = new WritableStream({\n\t\t\tasync write(chunk) {\n\t\t\t\tif (spilled) {\n\t\t\t\t\taccessHandle.write(chunk, { at: writeOffset });\n\t\t\t\t\twriteOffset += chunk.length;\n\t\t\t\t} else {\n\t\t\t\t\tmemoryChunks.push(chunk);\n\t\t\t\t\tbufferedSize += chunk.length;\n\t\t\t\t\tif (bufferedSize > thresholdBytes) {\n\t\t\t\t\t\tawait spillToFile();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\tclose() {\n\t\t\t\tif (accessHandle) {\n\t\t\t\t\taccessHandle.flush();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tlet memoryIndex = 0;\n\t\tconst readable = new ReadableStream({\n\t\t\tpull(controller) {\n\t\t\t\tif (spilled) {\n\t\t\t\t\tconst remaining = writeOffset - readOffset;\n\t\t\t\t\tif (remaining <= 0) {\n\t\t\t\t\t\tcontroller.close();\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tconst buffer = new Uint8Array(Math.min(READ_CHUNK_SIZE, remaining));\n\t\t\t\t\tconst read = accessHandle.read(buffer, { at: readOffset });\n\t\t\t\t\tif (read) {\n\t\t\t\t\t\treadOffset += read;\n\t\t\t\t\t\tcontroller.enqueue(buffer.subarray(0, read));\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcontroller.close();\n\t\t\t\t\t}\n\t\t\t\t} else if (memoryIndex < memoryChunks.length) {\n\t\t\t\t\tcontroller.enqueue(memoryChunks[memoryIndex++]);\n\t\t\t\t} else {\n\t\t\t\t\tcontroller.close();\n\t\t\t\t}\n\t\t\t}\n\t\t}, { highWaterMark: 0 });\n\t\tasync function dispose() {\n\t\t\tif (accessHandle) {\n\t\t\t\ttry {\n\t\t\t\t\taccessHandle.close();\n\t\t\t\t} catch {\n\t\t\t\t\t// ignored\n\t\t\t\t}\n\t\t\t\taccessHandle = null;\n\t\t\t}\n\t\t\tif (fileName) {\n\t\t\t\ttry {\n\t\t\t\t\tconst directoryHandle = await getTempDirectory();\n\t\t\t\t\tawait directoryHandle.removeEntry(fileName);\n\t\t\t\t} catch {\n\t\t\t\t\t// ignored\n\t\t\t\t}\n\t\t\t\tfileName = null;\n\t\t\t}\n\t\t\tmemoryChunks.length = 0;\n\t\t}\n\n\t\treturn { writable, readable, dispose };\n\t};\n}\n\nfunction getRandomFileName() {\n\tif (crypto.randomUUID) {\n\t\treturn crypto.randomUUID();\n\t}\n\treturn Array.from(crypto.getRandomValues(new Uint8Array(16)), byteValue => byteValue.toString(16).padStart(2, \"0\")).join(\"\");\n}\n","/*\n Copyright (c) 2025 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 { setDefaultConfiguration } from \"./core/configuration.js\";\nimport { configureZlibModule } from \"./core/zlib-streams-inline.js\";\n\nconfigureZlibModule(setDefaultConfiguration);\n\nexport * from \"./zip-module-wasm-base.js\";\n","const n=[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],t=[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],r=[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],e=[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],o=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],f=new Uint8Array(288);f.fill(8,0,144),f.fill(9,144,256),f.fill(7,256,280),f.fill(8,280,288);const b=new Uint8Array(30).fill(5);function l(n){const t=new Uint16Array(16);for(const r of n)t[r]++;t[0]=0;const r=new Uint16Array(17);for(let n=1;n<=15;n++)r[n+1]=r[n]+t[n];const e=new Uint16Array(n.length);for(let t=0;t<n.length;t++)n[t]&&(e[r[n[t]]++]=t);return{lengthCounts:t,symbols:e}}const p=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\";function s(s){let X;s({wasmURI:()=>(X||(X=\"data:application/wasm;base64,\"+function(n){let t=\"\";const r=n.length;let e=0;for(;e+2<r;e+=3){const r=n[e]<<16|n[e+1]<<8|n[e+2];t+=p[r>>18&63]+p[r>>12&63]+p[r>>6&63]+p[63&r]}const o=r-e;if(1===o){const r=n[e]<<16;t+=p[r>>18&63]+p[r>>12&63]+\"==\"}else if(2===o){const r=n[e]<<16|n[e+1]<<8;t+=p[r>>18&63]+p[r>>12&63]+p[r>>6&63]+\"=\"}return t}(function(p){let s=0,X=0,x=0,Y=new Uint8Array(1024),a=0,w=0;for(;!w;){w=U(1);const n=U(2);if(0==n)h();else if(1==n)P(l(f),l(b));else{if(2!=n)throw new Error(\"invalid deflate block type\");P(...B())}}return Y.subarray(0,a);function c(){if(s>=p.length)throw new Error(\"unexpected end of deflate data\");return p[s++]}function U(n){for(;x<n;)X|=c()<<x,x+=8;const t=X&(1<<n)-1;return X>>>=n,x-=n,t}function h(){X=0,x=0;const n=c()|c()<<8;s+=2,R(a+n);for(let t=0;t<n;t++)Y[a++]=c()}function P(o,f){let b=i(o);for(;256!=b;){if(b<256)R(a+1),Y[a++]=b;else{const o=b-257,l=n[o]+U(t[o]),p=i(f),s=r[p]+U(e[p]);R(a+l);const X=a-s;for(let n=0;n<l;n++)Y[a++]=Y[X+n]}b=i(o)}}function B(){const n=U(5)+257,t=U(5)+1,r=U(4)+4,e=new Uint8Array(19);for(let n=0;n<r;n++)e[o[n]]=U(3);const f=l(e),b=new Uint8Array(n+t);let p=0;for(;p<b.length;){const n=i(f);if(n<16)b[p++]=n;else if(16==n){const n=b[p-1];let t=U(2)+3;for(;t--;)b[p++]=n}else p+=17==n?U(3)+3:U(7)+11}return[l(b.subarray(0,n)),l(b.subarray(n))]}function i(n){const{lengthCounts:t,symbols:r}=n;let e=0,o=0,f=0;for(let n=1;n<=15;n++){e|=U(1);const b=t[n];if(e-o<b)return r[f+(e-o)];f+=b,o=o+b<<1,e<<=1}throw new Error(\"invalid huffman code\")}function R(n){if(Y.length<n){let t=2*Y.length;for(;t<n;)t*=2;const r=new Uint8Array(t);r.set(Y.subarray(0,a)),Y=r}}}(function(n){const t=(n=String(n).replace(/[^A-Za-z0-9+/=]/g,\"\")).length,r=[];for(let e=0;e<t;e+=4){const t=p.indexOf(n[e])<<18|p.indexOf(n[e+1])<<12|(63&p.indexOf(n[e+2]))<<6|63&p.indexOf(n[e+3]);r.push(t>>16&255),\"=\"!==n[e+2]&&r.push(t>>8&255),\"=\"!==n[e+3]&&r.push(255&t)}return new Uint8Array(r)}(\"zb19kF3HdSfW3bfvx3v3vXl3gAEwwIDAuRcQNZQ4AClRA4qkpWmIg+EQhKh19Ier4ioSAkcS7gMBvvdGIOWlOUPxw5BNaRGHUdEOa43YSqRykRUmy93IDncFr+m1dq3d0BttLROpUqpYZWsTpYrKslysFEOGv3P6vo/5AEAStsMp8N17++v06dOnT58+57Q63rtfK6X0fzp2r1lZUffqFb2CJ71yb7DCP3pF8aO6V+mVe+2KPKp7oxX+T6/cG6/0H63/1Y/olXtD/zX49LFEW6W1jSJtdM3UNf4zxtSM1irQQVAP0yAIlDKN0NjY2liFYRhqYwNjjTEqaupQaaViZZPAhvoBXa+HkdZfMV8xUaJXtHvhO2Ea/5ml6P6l+890v2xU4+Tpz586vrz08XtOLz2okvH+68nTJ5fv6R5/UNWaI99UmvXfH+ieObHU66nGoJal0/ep1vb+66njveV7Tpw53fvS/Uv3qSz1CdJYVUr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/tqjp5uvelz3/+5ImTS6eX6f6l+890v6xuPPDRAzceuHHm/jPLp5a+rE6ePnv81Mn76NTJ5aXu8VMHTy2d/sLyF3vUW1rup504c98SDSd86XT79JkHT9MXl47ft9Slz586/oXREved7C0fP31iafTr504u+2qou/TA0vFltXzmDN1//PSXq89nuv2i1Pvy/Z87c6rXL91bPtNduo8+d+rMiXYFjfrclz7/+aUuLXW7Z7qqt9xdOn6/fxkBfmaG7j/Z6508/QVaOn3fzJnPz3A16uTpE2e63aUTy1VXTnxxaeSzh2vt5/uOLx/vfxztMqFPnz/epc8dP9FWVbXdEwDg/uPLJ77YL/HgydP3nXmQeid/ZWmAIu7d8pcfWNpkZLg/6xvlr9WwnDhz/wPdpV7v5JnTdP/S8hfP3KfwX6bG1RalVKJiVVORqqtQpcqqhgpUUxk1prRqKXexkf6BDZRVoYpUrBJVU3WVqqZqqXG1Ve1QU2qv2qc+rD6qblWfUv+JOqF66jH1e+qP1V8oo5Vva/Rv3P9t8X9b/d+E/9vm/zK1qL7HkSeMEhgAa1ONq50qVzcqp46rR9UfKa0fxS2wgbY60olu6ExPatI36Dl973D7VZtVW2hju9qudqgdalJNqp1qp9qldqkpNaV2q93qGnWNmlNz6r32P5Duq9U1f4/6v6/4v8f83+P+7wn/d/4q9F+v6ovD7VbtVe08qZ5Uv6Z+TZ1T59RX1VfVr6tfV7+hfkM9pZ5SX1NfU19XX1d0WKnVRCmtldqjlWoppS4cUUrVpH97lHzjvvpvW5VSsXIXxtNjEjxk8M+s+Res+WfX/AtH/rnzW9KltVWtLVplj/y/2P9L/L+a/1f3/1L/r+H/Nfmfu7g13VdVH/sOZuNbVBLXonqY2kbQNGO6pdwbW9P7Y27bqoT/KR6vTCX+OWIfncTnATXWGJaMv1fPGCV5pneelcYznoxWVp6NNlplNeV+NpHWbvhlLVj9/wA=\")))),X)})}export{s as configureZlibModule};\n","/*\n Copyright (c) 2025 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 { FUNCTION_TYPE } from \"./core/constants.js\";\nimport { setDefaultConfiguration } from \"./core/configuration.js\";\nimport { configureWorker } from \"./core/codec-worker.js\";\nimport { terminateWorkers } from \"./core/codec-pool.js\";\nimport { setAESEngine } from \"./core/streams/aes-crypto-stream.js\";\nimport { initModule, resetWasmModule, createAESEngine, CompressionStreamZlib as CompressionStreamFallback, DecompressionStreamZlib as DecompressionStreamFallback } from \"./core/streams/zlib-wasm/zlib-streams-loader.js\";\n\nlet modulePromise;\n\nsetAESEngine(createAESEngine);\nconfigureWorker({\n\tinitModule: config => {\n\t\tif (!modulePromise) {\n\t\t\tlet { wasmURI } = config;\n\t\t\t// deno-lint-ignore valid-typeof\n\t\t\tif (typeof wasmURI == FUNCTION_TYPE) {\n\t\t\t\twasmURI = wasmURI();\n\t\t\t}\n\t\t\tmodulePromise = initModule(wasmURI, config).catch(error => {\n\t\t\t\tmodulePromise = null;\n\t\t\t\tthrow error;\n\t\t\t});\n\t\t}\n\t\treturn modulePromise;\n\t}\n});\nsetDefaultConfiguration({\n\tCompressionStreamFallback,\n\tDecompressionStreamFallback\n});\n\nexport { terminateWorkersAndModule as terminateWorkers };\n\nasync function terminateWorkersAndModule() {\n\tawait terminateWorkers();\n\tmodulePromise = null;\n\tresetWasmModule();\n}\n","/*\n Copyright (c) 2025 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 ReadableStream, WritableStream */\n\nconst FORMAT_DEFLATE = \"deflate\";\nconst FORMAT_DEFLATE_RAW = \"deflate-raw\";\nconst FORMAT_DEFLATE64_RAW = \"deflate64-raw\";\nconst FORMAT_GZIP = \"gzip\";\nconst Z_MEM_ERROR = -4;\nconst Z_MEM_ERROR_CODE = \"Z_MEM_ERROR\";\nconst COMPRESSION_FORMATS = [FORMAT_DEFLATE, FORMAT_DEFLATE_RAW, FORMAT_GZIP];\nconst DECOMPRESSION_FORMATS = [FORMAT_DEFLATE, FORMAT_DEFLATE_RAW, FORMAT_GZIP, FORMAT_DEFLATE64_RAW];\n\nlet wasm, malloc, free, memory, initError;\n\nexport function setWasmExports(wasmAPI) {\n\twasm = wasmAPI;\n\t({ malloc, free, memory } = wasm);\n\tif (typeof malloc !== \"function\" || typeof free !== \"function\" || !memory) {\n\t\twasm = malloc = free = memory = null;\n\t\tthrow new Error(\"Invalid WASM module\");\n\t}\n}\n\nexport function setInitError(error) {\n\tinitError = error;\n}\n\nexport function resetWasmExports() {\n\twasm = malloc = free = memory = initError = null;\n}\n\nfunction setZlibCode(error, result) {\n\tif (result === Z_MEM_ERROR) {\n\t\terror.code = Z_MEM_ERROR_CODE;\n\t}\n\treturn error;\n}\n\nfunction _make(isCompress, type, options = {}) {\n\tif (!(isCompress ? COMPRESSION_FORMATS : DECOMPRESSION_FORMATS).includes(type)) {\n\t\tthrow new TypeError(\"Unsupported format: \" + type);\n\t}\n\tif (!wasm) {\n\t\tconst error = new Error(\"WASM module not loaded\");\n\t\terror.cause = initError;\n\t\tthrow error;\n\t}\n\tconst level = (typeof options.level === \"number\") ? options.level : -1;\n\tconst outBufferSize = (typeof options.outBuffer === \"number\") ? options.outBuffer : 64 * 1024;\n\tconst inBufferSize = (typeof options.inBufferSize === \"number\") ? options.inBufferSize : 64 * 1024;\n\tconst state = { out: 0, in: 0, inBufferSize: 0, streamHandle: 0, streamEnded: false };\n\tlet readableController, writableController, resolveWrite, cancelReason;\n\tlet backpressure = true;\n\tlet cancelled = false;\n\tinitStream();\n\tconst readable = new ReadableStream({\n\t\tstart(controller) {\n\t\t\treadableController = controller;\n\t\t},\n\t\tpull() {\n\t\t\tbackpressure = false;\n\t\t\tresumeWrite();\n\t\t},\n\t\tcancel(reason) {\n\t\t\tcancelled = true;\n\t\t\tcancelReason = reason;\n\t\t\tdisposeStream(state);\n\t\t\twritableController.error(reason);\n\t\t\tresumeWrite();\n\t\t}\n\t}, { highWaterMark: 0 });\n\tconst writable = new WritableStream({\n\t\tstart(controller) {\n\t\t\twritableController = controller;\n\t\t},\n\t\tasync write(chunk) {\n\t\t\tif (backpressure) {\n\t\t\t\tawait new Promise(resolve => resolveWrite = resolve);\n\t\t\t}\n\t\t\tif (cancelled) {\n\t\t\t\tthrow cancelReason;\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tprocessChunk(chunk);\n\t\t\t} catch (error) {\n\t\t\t\tdisposeStream(state);\n\t\t\t\treadableController.error(error);\n\t\t\t\tthrow error;\n\t\t\t}\n\t\t},\n\t\tclose() {\n\t\t\tif (cancelled) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tflushStream();\n\t\t\t} catch (error) {\n\t\t\t\tdisposeStream(state);\n\t\t\t\treadableController.error(error);\n\t\t\t\tthrow error;\n\t\t\t}\n\t\t\tconst result = disposeStream(state);\n\t\t\tif (result !== 0) {\n\t\t\t\tconst error = setZlibCode(new Error(\"end error:\" + result), result);\n\t\t\t\treadableController.error(error);\n\t\t\t\tthrow error;\n\t\t\t}\n\t\t\treadableController.close();\n\t\t},\n\t\tabort(reason) {\n\t\t\tdisposeStream(state);\n\t\t\treadableController.error(reason);\n\t\t}\n\t}, { highWaterMark: 1 });\n\treturn { readable, writable };\n\n\tfunction initStream() {\n\t\ttry {\n\t\t\tlet result;\n\t\t\tstate.out = malloc(outBufferSize);\n\t\t\tstate.in = malloc(inBufferSize);\n\t\t\tstate.inBufferSize = inBufferSize;\n\t\t\tif (!state.out || !state.in) {\n\t\t\t\tthrow setZlibCode(new Error(\"allocation failed\"), Z_MEM_ERROR);\n\t\t\t}\n\t\t\tif (isCompress) {\n\t\t\t\tstate._process = wasm.deflate_process;\n\t\t\t\tstate._last_consumed = wasm.deflate_last_consumed;\n\t\t\t\tstate._end = wasm.deflate_end;\n\t\t\t\tstate.streamHandle = wasm.deflate_new();\n\t\t\t\tif (type === FORMAT_GZIP) {\n\t\t\t\t\tresult = wasm.deflate_init_gzip(state.streamHandle, level);\n\t\t\t\t} else if (type === FORMAT_DEFLATE_RAW) {\n\t\t\t\t\tresult = wasm.deflate_init_raw(state.streamHandle, level);\n\t\t\t\t} else {\n\t\t\t\t\tresult = wasm.deflate_init(state.streamHandle, level);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (type === FORMAT_DEFLATE64_RAW) {\n\t\t\t\t\tstate._process = wasm.inflate9_process;\n\t\t\t\t\tstate._last_consumed = wasm.inflate9_last_consumed;\n\t\t\t\t\tstate._end = wasm.inflate9_end;\n\t\t\t\t\tstate.streamHandle = wasm.inflate9_new();\n\t\t\t\t\tresult = wasm.inflate9_init_raw(state.streamHandle);\n\t\t\t\t} else {\n\t\t\t\t\tstate._process = wasm.inflate_process;\n\t\t\t\t\tstate._last_consumed = wasm.inflate_last_consumed;\n\t\t\t\t\tstate._end = wasm.inflate_end;\n\t\t\t\t\tstate.streamHandle = wasm.inflate_new();\n\t\t\t\t\tif (type === FORMAT_DEFLATE_RAW) {\n\t\t\t\t\t\tresult = wasm.inflate_init_raw(state.streamHandle);\n\t\t\t\t\t} else if (type === FORMAT_GZIP) {\n\t\t\t\t\t\tresult = wasm.inflate_init_gzip(state.streamHandle);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tresult = wasm.inflate_init(state.streamHandle);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (result !== 0) {\n\t\t\t\tthrow setZlibCode(new Error(\"init failed:\" + result), result);\n\t\t\t}\n\t\t} catch (error) {\n\t\t\tdisposeStream(state);\n\t\t\tthrow error;\n\t\t}\n\t}\n\n\tfunction processChunk(chunk) {\n\t\tconst heap = new Uint8Array(memory.buffer);\n\t\tconst process = state._process;\n\t\tconst last_consumed = state._last_consumed;\n\t\tconst out = state.out;\n\t\tlet offset = 0;\n\t\twhile (offset < chunk.length) {\n\t\t\tif (state.streamEnded) {\n\t\t\t\tthrow new Error(\"trailing data after the end of the stream\");\n\t\t\t}\n\t\t\tconst toRead = Math.min(chunk.length - offset, 32 * 1024);\n\t\t\tif (!state.in || state.inBufferSize < toRead) {\n\t\t\t\tif (state.in && free) {\n\t\t\t\t\tfree(state.in);\n\t\t\t\t\tstate.in = 0;\n\t\t\t\t}\n\t\t\t\tstate.in = malloc(toRead);\n\t\t\t\tstate.inBufferSize = toRead;\n\t\t\t\tif (!state.in) {\n\t\t\t\t\tthrow setZlibCode(new Error(\"allocation failed\"), Z_MEM_ERROR);\n\t\t\t\t}\n\t\t\t}\n\t\t\theap.set(chunk.subarray(offset, offset + toRead), state.in);\n\t\t\tconst result = process(state.streamHandle, state.in, toRead, out, outBufferSize, 0);\n\t\t\t// checked before the byte count is used, so a status code can never be read as one\n\t\t\tconst code = (result >> 24) & 0xff;\n\t\t\tconst signedCode = (code & 0x80) ? code - 256 : code;\n\t\t\tif (signedCode < 0) {\n\t\t\t\tthrow setZlibCode(new Error(\"process error:\" + signedCode), signedCode);\n\t\t\t}\n\t\t\tconst prod = result & 0x00ffffff;\n\t\t\tif (prod) {\n\t\t\t\tenqueue(heap.slice(out, out + prod));\n\t\t\t}\n\t\t\tconst consumed = last_consumed(state.streamHandle);\n\t\t\tif (code === 1) {\n\t\t\t\tstate.streamEnded = true;\n\t\t\t} else if (consumed === 0 && prod === 0) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\toffset += consumed;\n\t\t}\n\t}\n\n\tfunction flushStream() {\n\t\tconst heap = new Uint8Array(memory.buffer);\n\t\tconst process = state._process;\n\t\tconst out = state.out;\n\t\twhile (true) {\n\t\t\tconst result = process(state.streamHandle, 0, 0, out, outBufferSize, 4);\n\t\t\tconst code = (result >> 24) & 0xff;\n\t\t\tconst signedCode = (code & 0x80) ? code - 256 : code;\n\t\t\tif (signedCode < 0) {\n\t\t\t\tthrow setZlibCode(new Error(\"process error:\" + signedCode), signedCode);\n\t\t\t}\n\t\t\tconst produced = result & 0x00ffffff;\n\t\t\tif (produced) {\n\t\t\t\tenqueue(heap.slice(out, out + produced));\n\t\t\t}\n\t\t\tif (code === 1 || produced === 0) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction enqueue(chunk) {\n\t\tbackpressure = true;\n\t\treadableController.enqueue(chunk);\n\t}\n\n\tfunction resumeWrite() {\n\t\tif (resolveWrite) {\n\t\t\tconst resolve = resolveWrite;\n\t\t\tresolveWrite = null;\n\t\t\tresolve();\n\t\t}\n\t}\n\n\tfunction disposeStream(state) {\n\t\tlet endResult = 0;\n\t\tif (state.streamHandle && state._end) {\n\t\t\tendResult = state._end(state.streamHandle);\n\t\t}\n\t\tstate.streamHandle = 0;\n\t\tif (state.in && free) {\n\t\t\tfree(state.in);\n\t\t}\n\t\tstate.in = 0;\n\t\tif (state.out && free) {\n\t\t\tfree(state.out);\n\t\t}\n\t\tstate.out = 0;\n\t\treturn endResult;\n\t}\n}\n\nexport class CompressionStreamZlib {\n\tconstructor(type = FORMAT_DEFLATE, options) {\n\t\treturn _make(true, type, options);\n\t}\n}\nexport class DecompressionStreamZlib {\n\tconstructor(type = FORMAT_DEFLATE, options) {\n\t\treturn _make(false, type, options);\n\t}\n}\n// These codecs are backed by the WASM module; they are unusable until setWasmExports() has run.\n// The worker uses this flag to know it must fall back to the native CompressionStream when the\n// module fails to load, rather than discarding a self-contained codec supplied through config.\nCompressionStreamZlib.requiresModule = true;\nDecompressionStreamZlib.requiresModule = true;\n// Constructing these classes before the module is loaded throws, so capability probes cannot rely\n// on trying the constructor; the formats are declared instead, the lists _make() checks a format\n// against before anything else.\nCompressionStreamZlib.supportedFormats = COMPRESSION_FORMATS;\nDecompressionStreamZlib.supportedFormats = DECOMPRESSION_FORMATS;","/*\n Copyright (c) 2026 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 { FUNCTION_TYPE } from \"../../constants.js\";\nimport { createEngine as createDefaultEngine } from \"../codecs/aes-hmac-sha1.js\";\n\nconst BUFFER_LENGTH = 64 * 1024;\nconst DIGEST_LENGTH = 20;\n\nlet wasm, buffer;\n\nexport {\n\tsetWasmExports,\n\tresetWasmExports,\n\tcreateEngine\n};\n\nfunction setWasmExports(wasmAPI) {\n\t// deno-lint-ignore valid-typeof\n\tif (typeof wasmAPI.aes_hmac_new == FUNCTION_TYPE) {\n\t\twasm = wasmAPI;\n\t\tbuffer = 0;\n\t}\n}\n\nfunction resetWasmExports() {\n\twasm = null;\n\tbuffer = 0;\n}\n\nfunction createEngine(key, authenticationKey) {\n\tconst exports = wasm;\n\tlet context = exports ? createContext(exports, key, authenticationKey) : 0;\n\tif (!context) {\n\t\treturn createDefaultEngine(key, authenticationKey);\n\t}\n\tconst scratch = buffer;\n\treturn {\n\t\tprocess(data, decrypt) {\n\t\t\tfor (let offset = 0; offset < data.length; offset += BUFFER_LENGTH) {\n\t\t\t\tconst chunk = data.subarray(offset, offset + BUFFER_LENGTH);\n\t\t\t\tconst heap = getHeap(exports);\n\t\t\t\theap.set(chunk, scratch);\n\t\t\t\texports.aes_hmac_process(context, scratch, chunk.length, decrypt ? 1 : 0);\n\t\t\t\tchunk.set(heap.subarray(scratch, scratch + chunk.length));\n\t\t\t}\n\t\t},\n\t\tdigest() {\n\t\t\texports.aes_hmac_end(context, scratch);\n\t\t\tcontext = 0;\n\t\t\treturn getHeap(exports).slice(scratch, scratch + DIGEST_LENGTH);\n\t\t},\n\t\tdispose() {\n\t\t\tif (context) {\n\t\t\t\texports.aes_hmac_end(context, 0);\n\t\t\t\tcontext = 0;\n\t\t\t}\n\t\t}\n\t};\n}\n\nfunction createContext(exports, key, authenticationKey) {\n\tif (!buffer) {\n\t\tbuffer = exports.malloc(BUFFER_LENGTH);\n\t}\n\tconst context = buffer ? exports.aes_hmac_new() : 0;\n\tif (context) {\n\t\tconst heap = getHeap(exports);\n\t\theap.set(key, buffer);\n\t\theap.set(authenticationKey, buffer + key.length);\n\t\tif (exports.aes_hmac_init(context, buffer, key.length, buffer + key.length, authenticationKey.length)) {\n\t\t\texports.aes_hmac_end(context, 0);\n\t\t\treturn 0;\n\t\t}\n\t}\n\treturn context;\n}\n\nfunction getHeap(exports) {\n\treturn new Uint8Array(exports.memory.buffer);\n}\n","/*\n Copyright (c) 2025 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 WebAssembly, URL, fetch, atob */\n\nimport { setWasmExports, setInitError, resetWasmExports } from \"./zlib-streams.js\";\nimport { setWasmExports as setEngineWasmExports, resetWasmExports as resetEngineWasmExports } from \"./aes-hmac-sha1-wasm.js\";\n\nlet initializedModule = false;\n\nasync function initModule(wasmURI, { baseURI }) {\n\tif (!initializedModule) {\n\t\ttry {\n\t\t\tawait instantiateModule(wasmURI, baseURI);\n\t\t\tinitializedModule = true;\n\t\t} catch (error) {\n\t\t\tsetInitError(error);\n\t\t\tthrow error;\n\t\t}\n\t}\n}\n\nasync function instantiateModule(wasmURI, baseURI) {\n\tlet arrayBuffer, uri;\n\ttry {\n\t\ttry {\n\t\t\turi = new URL(wasmURI, baseURI);\n\t\t} catch {\n\t\t\t// ignored\n\t\t}\n\t\tconst response = await fetch(uri);\n\t\tarrayBuffer = await response.arrayBuffer();\n\t} catch (error) {\n\t\tif (wasmURI.startsWith(\"data:application/wasm;base64,\")) {\n\t\t\tarrayBuffer = arrayBufferFromDataURI(wasmURI);\n\t\t} else {\n\t\t\tthrow error;\n\t\t}\n\t}\n\tconst wasmInstance = await WebAssembly.instantiate(arrayBuffer);\n\tsetWasmExports(wasmInstance.instance.exports);\n\tsetEngineWasmExports(wasmInstance.instance.exports);\n}\n\nfunction resetWasmModule() {\n\tinitializedModule = false;\n\tresetWasmExports();\n\tresetEngineWasmExports();\n}\n\nfunction arrayBufferFromDataURI(dataURI) {\n\tconst base64 = dataURI.split(\",\")[1];\n\tconst binary = atob(base64);\n\tconst len = binary.length;\n\tconst bytes = new Uint8Array(len);\n\tfor (let i = 0; i < len; ++i) {\n\t\tbytes[i] = binary.charCodeAt(i);\n\t}\n\treturn bytes.buffer;\n}\n\nexport {\n\tCompressionStreamZlib,\n\tDecompressionStreamZlib\n} from \"./zlib-streams.js\";\nexport { createEngine as createAESEngine } from \"./aes-hmac-sha1-wasm.js\";\nexport {\n\tinitModule,\n\tresetWasmModule\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 WritableStream, AbortController */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tinitStream,\n\tReader,\n\tTextReader,\n\tTextWriter,\n\tgetTextSize,\n\tData64URIReader,\n\tData64URIWriter,\n\tUint8ArrayReader,\n\tUint8ArrayWriter,\n\tBlobReader,\n\tBlobWriter,\n\tHttpReader,\n\townsWritable\n} from \"./io.js\";\nimport {\n\tZipReader,\n\tERR_INVALID_PASSWORD,\n\tERR_ENCRYPTED,\n\tERR_INVALID_CRC32,\n\tERR_INVALID_UNCOMPRESSED_SIZE,\n\tERR_INVALID_COMPRESSED_DATA\n} from \"./zip-reader.js\";\nimport {\n\tZipWriter,\n\tgetEntriesSize,\n\tgetSourceEntryOptions\n} from \"./zip-writer.js\";\nimport {\n\tEntry\n} from \"./zip-entry.js\";\nimport { checkSignalOption, throwIfAborted, checkPassThroughOption, PASS_THROUGH_COMPRESSED } from \"./options.js\";\nimport { ProgressWatcherStream, callHandler } from \"./codec-worker.js\";\nimport {\n\tUNDEFINED_VALUE,\n\tFUNCTION_TYPE,\n\tOBJECT_TYPE,\n\tSTRING_TYPE\n} from \"./constants.js\";\nimport { toExactUint8Array } from \"./util/array.js\";\nimport { toCompatibleReadable, toCompatibleWritable } from \"./util/compatible-streams.js\";\nimport { isErrorObject } from \"./util/error.js\";\n\nconst ERR_ENTRY_EXISTS = \"Entry filename already exists\";\nconst ERR_DUPLICATE_IMPORTED_ENTRY = \"Duplicate entry filename in the imported zip file\";\nconst ERR_INVALID_DUPLICATES = \"Invalid duplicates option (must be \\\"throw\\\", \\\"keep-first\\\" or \\\"keep-last\\\")\";\nconst ERR_ANCESTOR_ENTRY = \"Entry is an ancestor of target entry\";\nconst ERR_ROOT_DIRECTORY_NOT_MOVABLE = \"Root directory cannot be moved\";\nconst ERR_TARGET_NOT_DIRECTORY = \"Target entry is not a directory\";\nconst ERR_PARENT_NOT_DIRECTORY = \"Parent entry is not a directory\";\nconst ERR_READABLE_CONSUMED = \"Readable stream already consumed\";\nconst DUPLICATES_THROW = \"throw\";\nconst DUPLICATES_KEEP_FIRST = \"keep-first\";\nconst DUPLICATES_KEEP_LAST = \"keep-last\";\nconst DUPLICATES_VALUES = new Set([DUPLICATES_THROW, DUPLICATES_KEEP_FIRST, DUPLICATES_KEEP_LAST]);\nconst ERR_INVALID_PASS_THROUGH = \"Invalid passThrough option (use readerOptions.passThrough or set uncompressedSize for each entry)\";\nconst ERR_INVALID_READER_OPTIONS = \"Invalid readerOptions (must be an object)\";\nconst ERR_UNSUPPORTED_PASS_THROUGH_VALUE = \"The 'compressed' passThrough option is only supported by Entry#getData() and ZipWriter#add()\";\nconst ERR_INVALID_PASSWORDS = \"Invalid passwords option (must be an array of strings)\";\nconst ERR_INVALID_REQUEST_PASSWORD = \"Invalid requestPassword option (must be a function returning a string or undefined)\";\nconst ERR_ABORT_EXPORT = \"zipjs-abort-export\";\nconst ABORT_ERROR_NAME = \"AbortError\";\nconst EMPTY_RAW_PASSWORD = new Uint8Array(0);\nconst FALSE_ACCEPT_ERRORS = new Set([ERR_INVALID_CRC32, ERR_INVALID_UNCOMPRESSED_SIZE, ERR_INVALID_COMPRESSED_DATA]);\n\nclass ZipEntry {\n\n\tconstructor(fs, name, params, parent) {\n\t\tconst zipEntry = this;\n\t\tif (fs.root && parent && parent.getChildByName(name)) {\n\t\t\tthrow new Error(ERR_ENTRY_EXISTS);\n\t\t}\n\t\tif (!params) {\n\t\t\tparams = {};\n\t\t}\n\t\tObject.assign(zipEntry, {\n\t\t\tfs,\n\t\t\tname,\n\t\t\tdata: params.data,\n\t\t\toptions: params.options && Object.assign({}, params.options),\n\t\t\tid: fs.entryIdCounter++,\n\t\t\tparent,\n\t\t\tchildren: [],\n\t\t\tuncompressedSize: params.uncompressedSize || 0,\n\t\t\tundeterminedSize: params.undeterminedSize || params.uncompressedSize === UNDEFINED_VALUE,\n\t\t\tpassThrough: params.passThrough,\n\t\t\tdefaultLastModDate: params.defaultLastModDate || new Date()\n\t\t});\n\t\tif (parent || !fs.root) {\n\t\t\tfs.entries[zipEntry.id] = zipEntry;\n\t\t}\n\t\tif (parent) {\n\t\t\tzipEntry.parent.children.push(zipEntry);\n\t\t}\n\t}\n\n\tgetFullname() {\n\t\treturn this.getRelativeName();\n\t}\n\n\tgetRelativeName(ancestor = this.fs.root) {\n\t\tconst zipEntry = this;\n\t\tlet relativeName = zipEntry.name;\n\t\tlet entry = zipEntry.parent;\n\t\twhile (entry && entry != ancestor) {\n\t\t\trelativeName = (entry.name ? entry.name + \"/\" : \"\") + relativeName;\n\t\t\tentry = entry.parent;\n\t\t}\n\t\treturn relativeName;\n\t}\n\n\tisDescendantOf(ancestor) {\n\t\tlet entry = this.parent;\n\t\twhile (entry && entry.id != ancestor.id) {\n\t\t\tentry = entry.parent;\n\t\t}\n\t\treturn Boolean(entry);\n\t}\n\n\trename(name) {\n\t\tconst zipEntry = this;\n\t\tlet parent = zipEntry.parent;\n\t\tif (parent) {\n\t\t\tconst path = splitPath(name);\n\t\t\tif (path) {\n\t\t\t\tname = path.pop();\n\t\t\t\tparent = getPathParent(parent, path, zipEntry);\n\t\t\t}\n\t\t\tconst existingChild = parent.getChildByName(name);\n\t\t\tif (existingChild && existingChild != zipEntry) {\n\t\t\t\tthrow new Error(ERR_ENTRY_EXISTS);\n\t\t\t}\n\t\t\tif (parent != zipEntry.parent) {\n\t\t\t\tdetach(zipEntry);\n\t\t\t\tzipEntry.parent = parent;\n\t\t\t\tparent.children.push(zipEntry);\n\t\t\t\tregisterEntries(zipEntry.fs, zipEntry);\n\t\t\t}\n\t\t}\n\t\tzipEntry.name = name;\n\t}\n\n\tsetOptions(options) {\n\t\tconst entryOptions = Object.assign({}, this.options, options);\n\t\tthis.options = Object.fromEntries(Object.entries(entryOptions).filter(([, value]) => value !== UNDEFINED_VALUE));\n\t}\n}\n\nclass ZipFileEntry extends ZipEntry {\n\n\tconstructor(fs, name, params, parent) {\n\t\tsuper(fs, name, params, parent);\n\t\tconst zipEntry = this;\n\t\tzipEntry.Reader = params.Reader;\n\t\tzipEntry.Writer = params.Writer;\n\t\tif (params.getData) {\n\t\t\tzipEntry.getData = params.getData;\n\t\t}\n\t}\n\n\tclone() {\n\t\treturn new ZipFileEntry(this.fs, this.name, this);\n\t}\n\n\tasync getData(writer, options = {}) {\n\t\tconst zipEntry = this;\n\t\tif (!writer || (writer.constructor == zipEntry.Writer && zipEntry.data && keepsContentType(writer, zipEntry.data))) {\n\t\t\treturn zipEntry.data;\n\t\t} else {\n\t\t\tconst reader = zipEntry.reader = createReader(zipEntry.Reader, zipEntry.data, options);\n\t\t\tconst dataSize = zipEntry.uncompressedSize || reader.size;\n\t\t\tawait Promise.all([initStream(reader), initStream(writer, dataSize)]);\n\t\t\tconst signal = checkSignalOption(options.signal);\n\t\t\tconst readable = createProgressReadable(zipEntry, reader, options, signal);\n\t\t\tconst preventClose = !ownsWritable(writer) && Boolean(options.preventClose);\n\t\t\tzipEntry.uncompressedSize = reader.size;\n\t\t\tawait toCompatibleReadable(readable).pipeTo(toCompatibleWritable(writer.writable), { signal, preventClose, preventAbort: preventClose });\n\t\t\treturn writer.getData ? writer.getData() : writer.writable;\n\t\t}\n\t}\n\n\tisPasswordProtected() {\n\t\treturn Boolean(this.data && this.data.encrypted);\n\t}\n\n\tasync checkPassword(password, options = {}) {\n\t\tconst zipEntry = this;\n\t\tif (zipEntry.isPasswordProtected()) {\n\t\t\ttry {\n\t\t\t\tawait zipEntry.data.getData(null, Object.assign({}, options, {\n\t\t\t\t\tpassword,\n\t\t\t\t\tcheckPasswordOnly: true\n\t\t\t\t}));\n\t\t\t\treturn true;\n\t\t\t} catch (error) {\n\t\t\t\tif (isErrorObject(error) && error.message == ERR_INVALID_PASSWORD) {\n\t\t\t\t\treturn false;\n\t\t\t\t} else {\n\t\t\t\t\tthrow error;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\treturn true;\n\t\t}\n\t}\n\n\tgetText(encoding, options) {\n\t\treturn this.getData(new TextWriter(encoding), options);\n\t}\n\n\tgetBlob(mimeType, options) {\n\t\treturn this.getData(new BlobWriter(mimeType), options);\n\t}\n\n\tgetData64URI(mimeType, options) {\n\t\treturn this.getData(new Data64URIWriter(mimeType), options);\n\t}\n\n\tgetUint8Array(options) {\n\t\treturn this.getData(new Uint8ArrayWriter(), options);\n\t}\n\n\tgetWritable(writable = new WritableStream(), options) {\n\t\treturn this.getData({ writable }, options);\n\t}\n\n\tasync getArrayBuffer(options) {\n\t\tconst array = await this.getUint8Array(options);\n\t\treturn toExactUint8Array(array).buffer;\n\t}\n\n\treplaceBlob(blob) {\n\t\treplaceContent(this, {\n\t\t\tdata: blob,\n\t\t\tReader: BlobReader,\n\t\t\tWriter: BlobWriter,\n\t\t\tuncompressedSize: blob.size\n\t\t});\n\t}\n\n\treplaceText(text) {\n\t\treplaceContent(this, {\n\t\t\tdata: text,\n\t\t\tReader: TextReader,\n\t\t\tWriter: TextWriter,\n\t\t\tuncompressedSize: getTextSize(text)\n\t\t});\n\t}\n\n\treplaceData64URI(dataURI) {\n\t\treplaceContent(this, {\n\t\t\tdata: dataURI,\n\t\t\tReader: Data64URIReader,\n\t\t\tWriter: Data64URIWriter,\n\t\t\tuncompressedSize: getData64URISize(dataURI)\n\t\t});\n\t}\n\n\treplaceUint8Array(array) {\n\t\treplaceContent(this, {\n\t\t\tdata: array,\n\t\t\tReader: Uint8ArrayReader,\n\t\t\tWriter: Uint8ArrayWriter,\n\t\t\tuncompressedSize: array.length\n\t\t});\n\t}\n\n\treplaceReadable(readable) {\n\t\treplaceContent(this, {\n\t\t\tdata: null,\n\t\t\tReader: getReadableReader(readable),\n\t\t\tWriter: null,\n\t\t\tuncompressedSize: UNDEFINED_VALUE\n\t\t});\n\t}\n}\n\nclass ZipDirectoryEntry extends ZipEntry {\n\n\tconstructor(fs, name, params, parent) {\n\t\tsuper(fs, name, params, parent);\n\t\tthis.directory = true;\n\t}\n\n\tclone(deepClone) {\n\t\tconst zipEntry = this;\n\t\tconst clonedEntry = new ZipDirectoryEntry(zipEntry.fs, zipEntry.name, zipEntry);\n\t\tif (deepClone) {\n\t\t\tclonedEntry.children = zipEntry.children.map(child => {\n\t\t\t\tconst childClone = child.clone(deepClone);\n\t\t\t\tchildClone.parent = clonedEntry;\n\t\t\t\treturn childClone;\n\t\t\t});\n\t\t}\n\t\treturn clonedEntry;\n\t}\n\n\taddDirectory(name, options) {\n\t\treturn addChild(this, name, { options }, true);\n\t}\n\n\taddText(name, text, options = {}) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: text,\n\t\t\tReader: TextReader,\n\t\t\tWriter: TextWriter,\n\t\t\toptions,\n\t\t\tuncompressedSize: getTextSize(text)\n\t\t});\n\t}\n\n\taddBlob(name, blob, options = {}) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: blob,\n\t\t\tReader: BlobReader,\n\t\t\tWriter: BlobWriter,\n\t\t\toptions,\n\t\t\tuncompressedSize: blob.size\n\t\t});\n\t}\n\n\taddData64URI(name, dataURI, options = {}) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: dataURI,\n\t\t\tReader: Data64URIReader,\n\t\t\tWriter: Data64URIWriter,\n\t\t\toptions,\n\t\t\tuncompressedSize: getData64URISize(dataURI)\n\t\t});\n\t}\n\n\taddUint8Array(name, array, options = {}) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: array,\n\t\t\tReader: Uint8ArrayReader,\n\t\t\tWriter: Uint8ArrayWriter,\n\t\t\toptions,\n\t\t\tuncompressedSize: array.length\n\t\t});\n\t}\n\n\taddHttpContent(name, url, options = {}) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: url,\n\t\t\tReader: class extends HttpReader {\n\t\t\t\tconstructor(url) {\n\t\t\t\t\tsuper(url, options);\n\t\t\t\t}\n\t\t\t},\n\t\t\toptions\n\t\t});\n\t}\n\n\taddReadable(name, readable, options = {}) {\n\t\treturn addChild(this, name, {\n\t\t\tReader: getReadableReader(readable),\n\t\t\toptions\n\t\t});\n\t}\n\n\taddFileSystemEntry(fileSystemEntry, options = {}) {\n\t\treturn addFileSystemHandle(this, fileSystemEntry, options);\n\t}\n\n\taddFileSystemHandle(handle, options = {}) {\n\t\treturn addFileSystemHandle(this, handle, options);\n\t}\n\n\taddFile(file, options = {}) {\n\t\toptions = Object.assign({}, options);\n\t\tif (!options.lastModDate) {\n\t\t\toptions.lastModDate = new Date(file.lastModified);\n\t\t}\n\t\treturn addChild(this, file.name, {\n\t\t\tdata: file,\n\t\t\tReader: function () {\n\t\t\t\tconst readable = file.stream();\n\t\t\t\tconst size = file.size;\n\t\t\t\treturn { readable, size };\n\t\t\t},\n\t\t\toptions,\n\t\t\tuncompressedSize: file.size\n\t\t});\n\t}\n\n\timportBlob(blob, options) {\n\t\treturn this.importZip(new BlobReader(blob), options);\n\t}\n\n\timportData64URI(dataURI, options) {\n\t\treturn this.importZip(new Data64URIReader(dataURI), options);\n\t}\n\n\timportUint8Array(array, options) {\n\t\treturn this.importZip(new Uint8ArrayReader(array), options);\n\t}\n\n\timportHttpContent(url, options) {\n\t\treturn this.importZip(new HttpReader(url, options), options);\n\t}\n\n\timportReadable(readable, options) {\n\t\treturn this.importZip({ readable }, options);\n\t}\n\n\texportBlob(options = {}) {\n\t\treturn this.exportZip(new BlobWriter(options.mimeType || \"application/zip\"), options);\n\t}\n\n\texportData64URI(options = {}) {\n\t\treturn this.exportZip(new Data64URIWriter(options.mimeType || \"application/zip\"), options);\n\t}\n\n\texportUint8Array(options = {}) {\n\t\treturn this.exportZip(new Uint8ArrayWriter(), options);\n\t}\n\n\tasync exportWritable(writable = new WritableStream(), options = {}) {\n\t\tawait this.exportZip({ writable }, options);\n\t\treturn writable;\n\t}\n\n\texportFileSystemHandle(handle, options = {}) {\n\t\treturn exportFileSystemHandle(this, handle, options);\n\t}\n\n\tasync importZip(reader, options = {}) {\n\t\tlet zipReader;\n\t\tif (reader && typeof reader.getEntries == FUNCTION_TYPE) {\n\t\t\tzipReader = reader;\n\t\t\toptions = Object.assign({}, zipReader.options, options);\n\t\t} else {\n\t\t\tawait initStream(reader);\n\t\t\tzipReader = new ZipReader(reader, options);\n\t\t}\n\t\tcheckPassThroughValue(options.passThrough);\n\t\tcheckPasswordCandidatesOptions(options);\n\t\tconst duplicates = checkDuplicatesOption(options.duplicates);\n\t\tconst importedEntries = [];\n\t\tconst passwordState = { known: [] };\n\t\tconst entries = await zipReader.getEntries(options);\n\t\tfor (const entry of entries) {\n\t\t\tlet parent = this;\n\t\t\ttry {\n\t\t\t\tconst path = entry.filename.split(\"/\").filter(pathPart => pathPart != \"\" && pathPart != \".\");\n\t\t\t\tconst name = path.pop();\n\t\t\t\tlet skippedEntry = false;\n\t\t\t\tfor (const pathPart of path) {\n\t\t\t\t\tconst previousParent = parent;\n\t\t\t\t\tparent = parent.getChildByName(pathPart);\n\t\t\t\t\tif (parent) {\n\t\t\t\t\t\tif (!parent.directory) {\n\t\t\t\t\t\t\tif (duplicates == DUPLICATES_KEEP_FIRST) {\n\t\t\t\t\t\t\t\tskippedEntry = true;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t} else if (duplicates == DUPLICATES_KEEP_LAST) {\n\t\t\t\t\t\t\t\tthis.fs.remove(parent);\n\t\t\t\t\t\t\t\tparent = new ZipDirectoryEntry(this.fs, pathPart, { data: null }, previousParent);\n\t\t\t\t\t\t\t\timportedEntries.push(parent);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthrow new Error(ERR_DUPLICATE_IMPORTED_ENTRY);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tparent = new ZipDirectoryEntry(this.fs, pathPart, { data: null }, previousParent);\n\t\t\t\t\t\timportedEntries.push(parent);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (skippedEntry) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (!entry.directory) {\n\t\t\t\t\tconst existingChild = parent.getChildByName(name);\n\t\t\t\t\tif (existingChild) {\n\t\t\t\t\t\tif (duplicates == DUPLICATES_KEEP_FIRST) {\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t} else if (duplicates == DUPLICATES_KEEP_LAST) {\n\t\t\t\t\t\t\tthis.fs.remove(existingChild);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthrow new Error(ERR_DUPLICATE_IMPORTED_ENTRY);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\timportedEntries.push(addChild(parent, name, {\n\t\t\t\t\t\tdata: entry,\n\t\t\t\t\t\tReader: getZipBlobReader(Object.assign({}, options), passwordState),\n\t\t\t\t\t\tuncompressedSize: options.passThrough ? entry.compressedSize : entry.uncompressedSize,\n\t\t\t\t\t\tpassThrough: options.passThrough\n\t\t\t\t\t}));\n\t\t\t\t} else {\n\t\t\t\t\tlet directoryEntry = parent;\n\t\t\t\t\tif (name) {\n\t\t\t\t\t\tdirectoryEntry = parent.getChildByName(name);\n\t\t\t\t\t\tif (directoryEntry && (!directoryEntry.directory || directoryEntry.data)) {\n\t\t\t\t\t\t\tif (duplicates == DUPLICATES_KEEP_FIRST) {\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t} else if (duplicates == DUPLICATES_KEEP_LAST) {\n\t\t\t\t\t\t\t\tif (directoryEntry.directory) {\n\t\t\t\t\t\t\t\t\tdirectoryEntry.data = entry;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tthis.fs.remove(directoryEntry);\n\t\t\t\t\t\t\t\t\tdirectoryEntry = UNDEFINED_VALUE;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthrow new Error(ERR_DUPLICATE_IMPORTED_ENTRY);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (!directoryEntry) {\n\t\t\t\t\t\t\tdirectoryEntry = new ZipDirectoryEntry(this.fs, name, { data: null }, parent);\n\t\t\t\t\t\t\timportedEntries.push(directoryEntry);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (directoryEntry != this && !directoryEntry.data) {\n\t\t\t\t\t\tdirectoryEntry.data = entry;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (error) {\n\t\t\t\timportedEntries.reverse().forEach(importedEntry => this.fs.remove(importedEntry));\n\t\t\t\ttry {\n\t\t\t\t\terror.cause = {\n\t\t\t\t\t\tentry\n\t\t\t\t\t};\n\t\t\t\t} catch {\n\t\t\t\t\t// ignored\n\t\t\t\t}\n\t\t\t\tthrow error;\n\t\t\t}\n\t\t}\n\t\treturn importedEntries;\n\t}\n\n\tasync exportZip(writer, options = {}) {\n\t\tconst zipEntry = this;\n\t\tconst zipWriterProvided = Boolean(writer) && typeof writer.add == FUNCTION_TYPE;\n\t\toptions = Object.assign({}, options);\n\t\tif (!zipWriterProvided && options.bufferedWrite === UNDEFINED_VALUE) {\n\t\t\toptions.bufferedWrite = true;\n\t\t}\n\t\tconst [readers] = await Promise.all([\n\t\t\tinitReaders(zipEntry, checkReaderOptions(options.readerOptions)),\n\t\t\tzipWriterProvided ? UNDEFINED_VALUE : initStream(writer)\n\t\t]);\n\t\tconst zipWriter = zipWriterProvided ? writer : new ZipWriter(writer, options);\n\t\tawait exportZip(zipWriter, zipEntry, getTotalSize([zipEntry], getUncompressedSize), options, readers);\n\t\tif (zipWriterProvided) {\n\t\t\treturn zipWriter;\n\t\t}\n\t\tawait zipWriter.close(options.globalComment);\n\t\treturn writer.getData ? writer.getData() : writer.writable;\n\t}\n\n\tasync getExportedSize(options = {}) {\n\t\tconst zipEntry = this;\n\t\toptions = Object.assign({}, options);\n\t\tcheckReaderOptions(options.readerOptions);\n\t\tif (options.bufferedWrite === UNDEFINED_VALUE) {\n\t\t\toptions.bufferedWrite = true;\n\t\t}\n\t\tconst children = zipEntry.getChildren({ recursive: true });\n\t\tconst entries = children.filter(child => !isImplicitDirectory(child)).map(child => {\n\t\t\tconst { name, entryOptions } = getChildEntryOptions(child, zipEntry, options);\n\t\t\treturn { name, size: child.directory ? 0 : getDeterminedSize(child, isPassThrough(child, options)), options: entryOptions };\n\t\t});\n\t\tconst writeOrderGuaranteed = !options.bufferedWrite ||\n\t\t\t(entries.every(entry => entry.options.keepOrder !== false) &&\n\t\t\t\tchildren.every(child => isImplicitDirectory(child) || !child.children.length));\n\t\treturn await getEntriesSize(options, entries, writeOrderGuaranteed, options.globalComment);\n\t}\n\n\tgetChildByName(name) {\n\t\tconst children = this.children;\n\t\tfor (let childIndex = 0; childIndex < children.length; childIndex++) {\n\t\t\tconst child = children[childIndex];\n\t\t\tif (child.name == name) {\n\t\t\t\treturn child;\n\t\t\t}\n\t\t}\n\t}\n\n\tgetChildren(options = {}) {\n\t\treturn collectChildren(this, options.recursive);\n\t}\n\n\tisPasswordProtected() {\n\t\tconst children = this.children;\n\t\tfor (let childIndex = 0; childIndex < children.length; childIndex++) {\n\t\t\tconst child = children[childIndex];\n\t\t\tif (child.isPasswordProtected()) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}\n\n\tasync checkPassword(password, options = {}) {\n\t\tconst children = this.children;\n\t\tconst result = await Promise.all(children.map(child => child.checkPassword(password, options)));\n\t\treturn !result.includes(false);\n\t}\n}\n\n\nclass ZipFS {\n\n\tconstructor() {\n\t\tresetFS(this);\n\t}\n\n\tget children() {\n\t\treturn this.root.children;\n\t}\n\n\tremove(entry) {\n\t\tdetach(entry);\n\t\tconst removedEntries = [entry];\n\t\twhile (removedEntries.length) {\n\t\t\tconst removedEntry = removedEntries.pop();\n\t\t\tthis.entries[removedEntry.id] = null;\n\t\t\tfor (const child of removedEntry.children) {\n\t\t\t\tremovedEntries.push(child);\n\t\t\t}\n\t\t}\n\t\tentry.parent = UNDEFINED_VALUE;\n\t}\n\n\tmove(entry, destination) {\n\t\tif (entry == this.root) {\n\t\t\tthrow new Error(ERR_ROOT_DIRECTORY_NOT_MOVABLE);\n\t\t} else {\n\t\t\tif (destination.directory) {\n\t\t\t\tif (!destination.isDescendantOf(entry)) {\n\t\t\t\t\tif (entry != destination) {\n\t\t\t\t\t\tconst existingChild = destination.getChildByName(entry.name);\n\t\t\t\t\t\tif (existingChild) {\n\t\t\t\t\t\t\tif (existingChild != entry) {\n\t\t\t\t\t\t\t\tthrow new Error(ERR_ENTRY_EXISTS);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tdetach(entry);\n\t\t\t\t\t\t\tentry.parent = destination;\n\t\t\t\t\t\t\tdestination.children.push(entry);\n\t\t\t\t\t\t\tregisterEntries(this, entry);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tthrow new Error(ERR_ANCESTOR_ENTRY);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthrow new Error(ERR_TARGET_NOT_DIRECTORY);\n\t\t\t}\n\t\t}\n\t}\n\n\tfind(fullname) {\n\t\tconst path = fullname.split(\"/\");\n\t\tlet node = this.root;\n\t\tfor (let index = 0; node && index < path.length; index++) {\n\t\t\tnode = node.directory ? node.getChildByName(path[index]) : UNDEFINED_VALUE;\n\t\t}\n\t\tif (!node) {\n\t\t\tnode = this.entries.find(entry => entry && (entry == this.root || entry.isDescendantOf(this.root)) &&\n\t\t\t\tentry.getRelativeName() == fullname);\n\t\t}\n\t\treturn node;\n\t}\n\n\tgetById(id) {\n\t\treturn this.entries[id];\n\t}\n\n\tgetChildByName(name) {\n\t\treturn this.root.getChildByName(name);\n\t}\n\n\tgetChildren(options) {\n\t\treturn this.root.getChildren(options);\n\t}\n\n\taddDirectory(name, options) {\n\t\treturn this.root.addDirectory(name, options);\n\t}\n\n\taddText(name, text, options) {\n\t\treturn this.root.addText(name, text, options);\n\t}\n\n\taddBlob(name, blob, options) {\n\t\treturn this.root.addBlob(name, blob, options);\n\t}\n\n\taddData64URI(name, dataURI, options) {\n\t\treturn this.root.addData64URI(name, dataURI, options);\n\t}\n\n\taddUint8Array(name, array, options) {\n\t\treturn this.root.addUint8Array(name, array, options);\n\t}\n\n\taddHttpContent(name, url, options) {\n\t\treturn this.root.addHttpContent(name, url, options);\n\t}\n\n\taddReadable(name, readable, options) {\n\t\treturn this.root.addReadable(name, readable, options);\n\t}\n\n\taddFileSystemEntry(fileSystemEntry, options) {\n\t\treturn this.root.addFileSystemEntry(fileSystemEntry, options);\n\t}\n\n\taddFileSystemHandle(handle, options) {\n\t\treturn this.root.addFileSystemHandle(handle, options);\n\t}\n\n\taddFile(file, options) {\n\t\treturn this.root.addFile(file, options);\n\t}\n\n\timportBlob(blob, options) {\n\t\treturn resetAndImport(this, root => root.importBlob(blob, options));\n\t}\n\n\timportData64URI(dataURI, options) {\n\t\treturn resetAndImport(this, root => root.importData64URI(dataURI, options));\n\t}\n\n\timportUint8Array(array, options) {\n\t\treturn resetAndImport(this, root => root.importUint8Array(array, options));\n\t}\n\n\timportHttpContent(url, options) {\n\t\treturn resetAndImport(this, root => root.importHttpContent(url, options));\n\t}\n\n\timportReadable(readable, options) {\n\t\treturn resetAndImport(this, root => root.importReadable(readable, options));\n\t}\n\n\timportZip(reader, options) {\n\t\treturn resetAndImport(this, root => root.importZip(reader, options));\n\t}\n\n\texportBlob(options) {\n\t\treturn this.root.exportBlob(options);\n\t}\n\n\texportData64URI(options) {\n\t\treturn this.root.exportData64URI(options);\n\t}\n\n\texportUint8Array(options) {\n\t\treturn this.root.exportUint8Array(options);\n\t}\n\n\texportWritable(writable, options) {\n\t\treturn this.root.exportWritable(writable, options);\n\t}\n\n\texportFileSystemHandle(handle, options) {\n\t\treturn this.root.exportFileSystemHandle(handle, options);\n\t}\n\n\texportZip(writer, options) {\n\t\treturn this.root.exportZip(writer, options);\n\t}\n\n\tgetExportedSize(options) {\n\t\treturn this.root.getExportedSize(options);\n\t}\n\n\tisPasswordProtected() {\n\t\treturn this.root.isPasswordProtected();\n\t}\n\n\tcheckPassword(password, options) {\n\t\treturn this.root.checkPassword(password, options);\n\t}\n}\n\nconst fs = { FS: ZipFS, ZipDirectoryEntry, ZipFileEntry };\nexport { ZipFS, ZipEntry, ZipFileEntry, ZipDirectoryEntry, fs, ERR_ENTRY_EXISTS, ERR_DUPLICATE_IMPORTED_ENTRY, ERR_INVALID_DUPLICATES, ERR_READABLE_CONSUMED, ERR_INVALID_PASS_THROUGH, ERR_UNSUPPORTED_PASS_THROUGH_VALUE, ERR_INVALID_READER_OPTIONS, ERR_INVALID_PASSWORDS, ERR_INVALID_REQUEST_PASSWORD, ERR_ANCESTOR_ENTRY, ERR_ROOT_DIRECTORY_NOT_MOVABLE, ERR_TARGET_NOT_DIRECTORY, ERR_PARENT_NOT_DIRECTORY };\n\nfunction getTotalSize(entries, getEntrySize) {\n\tlet size = 0;\n\tconst pendingEntries = Array.from(entries);\n\twhile (pendingEntries.length) {\n\t\tconst entry = pendingEntries.pop();\n\t\tsize += getEntrySize(entry) || 0;\n\t\tfor (const child of entry.children) {\n\t\t\tpendingEntries.push(child);\n\t\t}\n\t}\n\treturn size;\n}\n\nfunction getUncompressedSize(entry) {\n\treturn entry.uncompressedSize;\n}\n\nfunction getExtractedSize(entry, passThrough) {\n\tconst { data } = entry;\n\treturn passThrough && data instanceof Entry ? data.compressedSize : entry.uncompressedSize;\n}\n\nfunction getReadableReader(readable) {\n\tlet consumed;\n\treturn function () {\n\t\tif (consumed) {\n\t\t\tthrow new Error(ERR_READABLE_CONSUMED);\n\t\t}\n\t\tconsumed = true;\n\t\treturn { readable };\n\t};\n}\n\nfunction getZipBlobReader(options, passwordState) {\n\treturn class extends Reader {\n\n\t\tconstructor(entry, options = {}) {\n\t\t\tsuper();\n\t\t\tthis.entry = entry;\n\t\t\tthis.options = options;\n\t\t}\n\n\t\tasync init() {\n\t\t\tconst zipBlobReader = this;\n\t\t\tconst readerOptions = Object.assign({}, options, zipBlobReader.options);\n\t\t\tconst { checkOverlappingEntry, checkOverlappingEntryOnly } = readerOptions;\n\t\t\tconst data = await readEntryData(zipBlobReader.entry, Object.assign(readerOptions, {\n\t\t\t\tcheckPasswordOnly: false,\n\t\t\t\tcheckOverlappingEntry: checkOverlappingEntryOnly || checkOverlappingEntry,\n\t\t\t\tcheckOverlappingEntryOnly: false,\n\t\t\t\tpreventClose: false\n\t\t\t}), passwordState);\n\t\t\tzipBlobReader.data = data;\n\t\t\tzipBlobReader.blobReader = new BlobReader(data);\n\t\t\tzipBlobReader.size = data.size;\n\t\t\tsuper.init();\n\t\t}\n\n\t\treadUint8Array(index, length) {\n\t\t\treturn this.blobReader.readUint8Array(index, length);\n\t\t}\n\t};\n}\n\nfunction createReader(Reader, data, options) {\n\treturn Reader.prototype ? new Reader(data, options) : Reader(data, options);\n}\n\nfunction keepsContentType(writer, data) {\n\tconst { contentType } = writer;\n\tif (contentType === UNDEFINED_VALUE) {\n\t\treturn true;\n\t} else if (writer.constructor == BlobWriter) {\n\t\treturn data.type == contentType;\n\t} else if (writer.constructor == Data64URIWriter) {\n\t\treturn data.startsWith(\"data:\" + (contentType || \"\") + \";base64,\");\n\t} else {\n\t\treturn true;\n\t}\n}\n\nfunction createProgressReadable(zipEntry, reader, options, signal) {\n\tconst { onstart, onprogress, onend } = options;\n\tconst { readable } = reader;\n\tconst coreReaderReportsProgress = zipEntry.data instanceof Entry;\n\tif (coreReaderReportsProgress || (!onstart && !onprogress && !onend)) {\n\t\treturn readable;\n\t} else {\n\t\treturn toCompatibleReadable(readable).pipeThrough(new ProgressWatcherStream({ onstart, onprogress, onend, size: reader.size }), { signal });\n\t}\n}\n\nasync function initReaders(entry, options) {\n\tconst fileEntries = [];\n\tconst pendingEntries = [entry];\n\tconst readers = new Map();\n\twhile (pendingEntries.length) {\n\t\tconst pendingEntry = pendingEntries.pop();\n\t\tfor (const child of pendingEntry.children) {\n\t\t\tif (child.directory) {\n\t\t\t\tpendingEntries.push(child);\n\t\t\t} else {\n\t\t\t\tfileEntries.push(child);\n\t\t\t}\n\t\t}\n\t}\n\tawait Promise.all(fileEntries.map(async child => {\n\t\tconst reader = child.reader = createReader(child.Reader, child.data, options);\n\t\treaders.set(child, reader);\n\t\ttry {\n\t\t\tawait initStream(reader);\n\t\t} catch (error) {\n\t\t\ttry {\n\t\t\t\terror.entry = child;\n\t\t\t\terror.entryId = child.id;\n\t\t\t\terror.entryName = child.getRelativeName(entry);\n\t\t\t} catch {\n\t\t\t\t// ignored\n\t\t\t}\n\t\t\tthrow error;\n\t\t}\n\t\tif (reader.size !== UNDEFINED_VALUE) {\n\t\t\tchild.uncompressedSize = reader.size;\n\t\t\tchild.undeterminedSize = false;\n\t\t}\n\t}));\n\treturn readers;\n}\n\nfunction detach(entry) {\n\tif (entry.parent) {\n\t\tconst children = entry.parent.children;\n\t\tchildren.forEach((child, index) => {\n\t\t\tif (child.id == entry.id) {\n\t\t\t\tchildren.splice(index, 1);\n\t\t\t}\n\t\t});\n\t}\n}\n\nfunction forwardAbort(signal, abortController) {\n\tif (!checkSignalOption(signal)) {\n\t\treturn () => { };\n\t}\n\tif (signal.aborted) {\n\t\tabortController.abort(signal.reason);\n\t\treturn () => { };\n\t}\n\tconst abort = () => abortController.abort(signal.reason);\n\tsignal.addEventListener(\"abort\", abort, { once: true });\n\treturn () => signal.removeEventListener(\"abort\", abort);\n}\n\nfunction isExportAborted(error) {\n\treturn Boolean(error) && error.message == ERR_ABORT_EXPORT;\n}\n\nfunction aggregateEntryErrors(errors) {\n\tconst [error] = errors;\n\tconst otherErrors = errors\n\t\t.slice(1)\n\t\t.flatMap(otherError => [otherError, ...(otherError && otherError.entryErrors || [])])\n\t\t.filter(otherError => otherError !== error);\n\tif (otherErrors.length) {\n\t\ttry {\n\t\t\terror.entryErrors = [...(error.entryErrors || []), ...otherErrors];\n\t\t} catch {\n\t\t\t// ignored\n\t\t}\n\t}\n\treturn error;\n}\n\nfunction getChildEntryOptions(child, selectedEntry, options) {\n\tconst name = options.relativePath ? child.getRelativeName(selectedEntry) : child.getFullname();\n\tconst childOptions = child.options || {};\n\tlet zipEntryMetadata = {};\n\tlet passThroughOptions = {};\n\tif (child.data instanceof Entry) {\n\t\tconst passThrough = isPassThrough(child, options);\n\t\tconst lastModDateOverride = childOptions.lastModDate === UNDEFINED_VALUE ? options.lastModDate : childOptions.lastModDate;\n\t\t({ entryOptions: zipEntryMetadata, passThroughOptions } = getSourceEntryOptions(child.data, passThrough, lastModDateOverride));\n\t\tif (passThrough) {\n\t\t\tpassThroughOptions.passThrough = true;\n\t\t}\n\t}\n\tconst entryOptions = Object.assign({ lastModDate: child.defaultLastModDate }, zipEntryMetadata, options, childOptions, passThroughOptions, { directory: child.directory });\n\tif (!child.directory && entryOptions.passThrough && entryOptions.uncompressedSize === UNDEFINED_VALUE) {\n\t\tthrow new Error(ERR_INVALID_PASS_THROUGH);\n\t}\n\treturn { name, entryOptions };\n}\n\nfunction getDeterminedSize(child, passThrough) {\n\tconst { reader } = child;\n\tif (reader && reader.size !== UNDEFINED_VALUE) {\n\t\treturn reader.size;\n\t}\n\treturn child.undeterminedSize ? UNDEFINED_VALUE : getExtractedSize(child, passThrough);\n}\n\nfunction checkReaderOptions(readerOptions) {\n\tif (readerOptions && (typeof readerOptions != OBJECT_TYPE || Array.isArray(readerOptions))) {\n\t\tthrow new Error(ERR_INVALID_READER_OPTIONS);\n\t}\n\tif (readerOptions) {\n\t\tcheckPassThroughValue(readerOptions.passThrough);\n\t\tcheckPasswordCandidatesOptions(readerOptions);\n\t}\n\treturn readerOptions;\n}\n\nfunction checkPasswordCandidatesOptions(options) {\n\tconst { passwords, requestPassword } = options;\n\tif (passwords && (!Array.isArray(passwords) || passwords.some(password => typeof password != STRING_TYPE))) {\n\t\tthrow new Error(ERR_INVALID_PASSWORDS);\n\t}\n\tif (requestPassword && typeof requestPassword != FUNCTION_TYPE) {\n\t\tthrow new Error(ERR_INVALID_REQUEST_PASSWORD);\n\t}\n}\n\nasync function readEntryData(entry, options, passwordState) {\n\tcheckPasswordCandidatesOptions(options);\n\tconst { passwords, requestPassword, signal } = options;\n\toptions = Object.assign({}, options);\n\tdelete options.passwords;\n\tdelete options.requestPassword;\n\tif (!entry.encrypted || options.passThrough || (!passwords && !requestPassword)) {\n\t\treturn entry.getData(new BlobWriter(), options);\n\t}\n\tconst tried = new Set();\n\tlet error;\n\twhile (true) {\n\t\tfor (const candidate of getPasswordCandidates(options, passwordState, passwords)) {\n\t\t\tif (!tried.has(candidate.key)) {\n\t\t\t\tconst result = await tryPasswordCandidate(candidate);\n\t\t\t\tif (result.done) {\n\t\t\t\t\treturn result.data;\n\t\t\t\t}\n\t\t\t\terror = result.error;\n\t\t\t}\n\t\t}\n\t\tif (!requestPassword) {\n\t\t\tbreak;\n\t\t}\n\t\tif (passwordState.pendingPrompt) {\n\t\t\tawait passwordState.pendingPrompt;\n\t\t\tcontinue;\n\t\t}\n\t\tlet release;\n\t\tpasswordState.pendingPrompt = new Promise(resolve => release = resolve);\n\t\ttry {\n\t\t\tconst answer = await requestPassword(entry, error);\n\t\t\tif (answer === UNDEFINED_VALUE || answer === null) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t// deno-lint-ignore valid-typeof\n\t\t\tif (typeof answer != STRING_TYPE) {\n\t\t\t\tthrow new Error(ERR_INVALID_REQUEST_PASSWORD);\n\t\t\t}\n\t\t\tconst result = await tryPasswordCandidate(getPasswordCandidate(answer));\n\t\t\tif (result.done) {\n\t\t\t\treturn result.data;\n\t\t\t}\n\t\t\terror = result.error;\n\t\t} finally {\n\t\t\tpasswordState.pendingPrompt = UNDEFINED_VALUE;\n\t\t\trelease();\n\t\t}\n\t}\n\tif (!tried.size) {\n\t\tthrow new Error(ERR_ENCRYPTED);\n\t}\n\tconst passwordError = new Error(ERR_INVALID_PASSWORD);\n\tpasswordError.cause = error;\n\tthrow passwordError;\n\n\tasync function tryPasswordCandidate(candidate) {\n\t\ttried.add(candidate.key);\n\t\tconst candidateOptions = Object.assign({}, options, candidate.options);\n\t\tif (entry.zipCrypto) {\n\t\t\tcandidateOptions.checkCrc32 = true;\n\t\t\ttry {\n\t\t\t\tawait entry.getData(null, Object.assign({}, candidateOptions, { checkPasswordOnly: true }));\n\t\t\t} catch (probeError) {\n\t\t\t\tif (isInvalidPasswordError(probeError)) {\n\t\t\t\t\treturn { done: false, error: probeError };\n\t\t\t\t}\n\t\t\t\tthrow probeError;\n\t\t\t}\n\t\t}\n\t\ttry {\n\t\t\tconst data = await entry.getData(new BlobWriter(), candidateOptions);\n\t\t\trememberPassword(passwordState, candidate);\n\t\t\treturn { done: true, data };\n\t\t} catch (readError) {\n\t\t\tif (isAbortError(readError, signal) || !isWrongPasswordError(readError, entry)) {\n\t\t\t\tthrow readError;\n\t\t\t}\n\t\t\treturn { done: false, error: readError };\n\t\t}\n\t}\n}\n\nfunction isInvalidPasswordError(error) {\n\treturn isErrorObject(error) && error.message == ERR_INVALID_PASSWORD;\n}\n\nfunction isWrongPasswordError(error, entry) {\n\treturn isInvalidPasswordError(error) || (entry.zipCrypto && isErrorObject(error) && FALSE_ACCEPT_ERRORS.has(error.message));\n}\n\nfunction isAbortError(error, signal) {\n\treturn Boolean(signal && signal.aborted) || (isErrorObject(error) && error.name == ABORT_ERROR_NAME);\n}\n\nfunction getPasswordCandidates(options, passwordState, passwords) {\n\tconst candidates = [];\n\tconst { password, rawPassword } = options;\n\tif (rawPassword && rawPassword.length) {\n\t\tcandidates.push({ key: rawPassword, options: { password: \"\", rawPassword } });\n\t}\n\tif (password) {\n\t\tcandidates.push(getPasswordCandidate(password));\n\t}\n\tcandidates.push(...passwordState.known);\n\tif (passwords) {\n\t\tcandidates.push(...passwords.filter(password => password).map(getPasswordCandidate));\n\t}\n\treturn candidates;\n}\n\nfunction getPasswordCandidate(password) {\n\treturn { key: password, options: { password, rawPassword: EMPTY_RAW_PASSWORD } };\n}\n\nfunction rememberPassword(passwordState, candidate) {\n\tconst { known } = passwordState;\n\tconst index = known.findIndex(knownCandidate => knownCandidate.key === candidate.key);\n\tif (index != -1) {\n\t\tknown.splice(index, 1);\n\t}\n\tknown.unshift(candidate);\n}\n\nfunction checkPassThroughValue(passThrough) {\n\tif (checkPassThroughOption(passThrough) === PASS_THROUGH_COMPRESSED) {\n\t\tthrow new Error(ERR_UNSUPPORTED_PASS_THROUGH_VALUE);\n\t}\n}\n\nfunction replaceContent(zipEntry, params) {\n\tconst { uncompressedSize } = params;\n\tObject.assign(zipEntry, params, {\n\t\treader: null,\n\t\tpassThrough: UNDEFINED_VALUE,\n\t\tuncompressedSize: uncompressedSize === UNDEFINED_VALUE ? 0 : uncompressedSize,\n\t\tundeterminedSize: uncompressedSize === UNDEFINED_VALUE\n\t});\n}\n\nfunction getData64URISize(dataURI) {\n\tlet dataEnd = dataURI.length;\n\twhile (dataURI.charAt(dataEnd - 1) == \"=\") {\n\t\tdataEnd--;\n\t}\n\tconst dataStart = dataURI.indexOf(\",\") + 1;\n\treturn Math.floor((dataEnd - dataStart) * 0.75);\n}\n\nfunction isPassThrough(child, options) {\n\tconst { readerOptions } = options;\n\treturn Boolean(!child.directory && (child.passThrough || (readerOptions && readerOptions.passThrough)));\n}\n\nfunction isImplicitDirectory(child) {\n\treturn child.directory && child.data === null;\n}\n\nasync function exportZip(zipWriter, entry, totalSize, options, readers) {\n\tconst { onstart, onprogress, onend, onentryprogress } = options;\n\tconst selectedEntry = entry;\n\tconst totalEntries = getTotalSize(entry.children, child => isImplicitDirectory(child) ? 0 : 1);\n\tlet writtenSize = 0;\n\tlet writtenEntries = 0;\n\tif (onstart) {\n\t\tawait callHandler(onstart, totalSize);\n\t}\n\tif (options.bufferedWrite) {\n\t\tawait processChildren(entry);\n\t} else {\n\t\tfor (const child of entry.getChildren({ recursive: true })) {\n\t\t\tawait addChild(child);\n\t\t}\n\t}\n\tif (onend) {\n\t\tawait callHandler(onend, writtenSize);\n\t}\n\n\tasync function processChildren(entry) {\n\t\tconst results = await Promise.allSettled(entry.children.map(async child => {\n\t\t\tawait addChild(child);\n\t\t\tawait processChildren(child);\n\t\t}));\n\t\tconst errorResult = results.find(result => result.status == \"rejected\");\n\t\tif (errorResult) {\n\t\t\tthrow errorResult.reason;\n\t\t}\n\t}\n\n\tasync function addChild(child) {\n\t\tif (isImplicitDirectory(child)) {\n\t\t\treturn;\n\t\t}\n\t\tconst { name, entryOptions } = getChildEntryOptions(child, selectedEntry, options);\n\t\tlet entryWrittenSize = 0;\n\t\tconst entryMetadata = await zipWriter.add(name, readers.get(child), Object.assign(entryOptions, {\n\t\t\tonstart: UNDEFINED_VALUE,\n\t\t\tonend: UNDEFINED_VALUE,\n\t\t\tonprogress: async indexProgress => {\n\t\t\t\twrittenSize += indexProgress - entryWrittenSize;\n\t\t\t\tentryWrittenSize = indexProgress;\n\t\t\t\tif (onprogress) {\n\t\t\t\t\tawait callHandler(onprogress, writtenSize, totalSize);\n\t\t\t\t}\n\t\t\t}\n\t\t}));\n\t\twrittenEntries++;\n\t\tif (onentryprogress) {\n\t\t\tawait callHandler(onentryprogress, writtenEntries, totalEntries, entryMetadata);\n\t\t}\n\t}\n}\n\nfunction addFileSystemHandle(zipEntry, handle, options) {\n\treturn addFile(zipEntry, handle, []);\n\n\tasync function addFile(parentEntry, handle, addedEntries, parentName = \"\") {\n\t\tif (handle) {\n\t\t\tconst entryName = parentName ? parentName + \"/\" + handle.name : handle.name;\n\t\t\ttry {\n\t\t\t\tif (handle.isFile || handle.isDirectory) {\n\t\t\t\t\thandle = await transformToFileSystemhandle(handle);\n\t\t\t\t}\n\t\t\t\tif (handle.kind == \"file\") {\n\t\t\t\t\tconst file = await handle.getFile();\n\t\t\t\t\taddedEntries.push(\n\t\t\t\t\t\taddChild(parentEntry, file.name, {\n\t\t\t\t\t\t\tReader: function () {\n\t\t\t\t\t\t\t\tconst readable = file.stream();\n\t\t\t\t\t\t\t\tconst size = file.size;\n\t\t\t\t\t\t\t\treturn { readable, size };\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\toptions: Object.assign({}, { lastModDate: new Date(file.lastModified) }, options),\n\t\t\t\t\t\t\tuncompressedSize: file.size\n\t\t\t\t\t\t})\n\t\t\t\t\t);\n\t\t\t\t} else if (handle.kind == \"directory\") {\n\t\t\t\t\tconst directoryEntry = parentEntry.addDirectory(handle.name, options);\n\t\t\t\t\taddedEntries.push(directoryEntry);\n\t\t\t\t\tfor await (const childHandle of handle.values()) {\n\t\t\t\t\t\tawait addFile(directoryEntry, childHandle, addedEntries, entryName);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (error) {\n\t\t\t\ttry {\n\t\t\t\t\tif (error.entryName === UNDEFINED_VALUE) {\n\t\t\t\t\t\terror.entryName = entryName;\n\t\t\t\t\t}\n\t\t\t\t} catch {\n\t\t\t\t\t// ignored\n\t\t\t\t}\n\t\t\t\tthrow error;\n\t\t\t}\n\t\t}\n\t\treturn addedEntries;\n\t}\n}\n\nasync function exportFileSystemHandle(zipEntry, directoryHandle, options) {\n\tconst { onstart, onprogress, onend } = options;\n\tcheckPassThroughValue(options.passThrough);\n\tcheckPasswordCandidatesOptions(options);\n\tconst readerOptions = checkReaderOptions(options.readerOptions);\n\tconst abortController = new AbortController();\n\tconst { signal } = abortController;\n\tconst releaseSignal = forwardAbort(options.signal, abortController);\n\tconst getDataOptions = Object.assign({}, options, readerOptions, {\n\t\tsignal,\n\t\tonstart: UNDEFINED_VALUE,\n\t\tonprogress: UNDEFINED_VALUE,\n\t\tonend: UNDEFINED_VALUE,\n\t\tpreventClose: false\n\t});\n\tconst totalSize = getTotalSize([zipEntry], entry => getExtractedSize(entry, getDataOptions.passThrough));\n\tconst exportedEntryNames = [];\n\tlet exportAborted = false;\n\tlet writtenSize = 0;\n\ttry {\n\t\tif (onstart) {\n\t\t\tawait callHandler(onstart, totalSize);\n\t\t}\n\t\tawait exportChildren(zipEntry, directoryHandle);\n\t\tif (onend) {\n\t\t\tawait callHandler(onend, writtenSize);\n\t\t}\n\t} catch (error) {\n\t\ttry {\n\t\t\terror.exportedEntryNames = exportedEntryNames;\n\t\t} catch {\n\t\t\t// ignored\n\t\t}\n\t\tthrow error;\n\t} finally {\n\t\treleaseSignal();\n\t}\n\treturn directoryHandle;\n\n\tfunction createProgressWritable(writable) {\n\t\tconst writer = writable.getWriter();\n\t\treturn new WritableStream({\n\t\t\tasync write(chunk) {\n\t\t\t\tawait writer.write(chunk);\n\t\t\t\twrittenSize += chunk.length;\n\t\t\t\tif (onprogress) {\n\t\t\t\t\tawait callHandler(onprogress, writtenSize, totalSize);\n\t\t\t\t}\n\t\t\t},\n\t\t\tclose() {\n\t\t\t\treturn writer.close();\n\t\t\t},\n\t\t\tabort(reason) {\n\t\t\t\treturn writer.abort(reason);\n\t\t\t}\n\t\t});\n\t}\n\n\tasync function exportChildren(entry, parentHandle) {\n\t\tif (options.concurrent) {\n\t\t\tconst results = await Promise.allSettled(entry.children.map(child => exportChild(child, parentHandle)));\n\t\t\tconst rejectedResults = results.filter(result => result.status == \"rejected\");\n\t\t\tif (rejectedResults.length) {\n\t\t\t\tconst failedResults = rejectedResults.filter(result => !isExportAborted(result.reason));\n\t\t\t\tconst reportedResults = failedResults.length ? failedResults : rejectedResults;\n\t\t\t\tthrow aggregateEntryErrors(reportedResults.map(result => result.reason));\n\t\t\t}\n\t\t} else {\n\t\t\tfor (const child of entry.children) {\n\t\t\t\tawait exportChild(child, parentHandle);\n\t\t\t}\n\t\t}\n\t}\n\n\tasync function exportChild(child, parentHandle) {\n\t\tif (signal.aborted) {\n\t\t\tif (exportAborted || isExportAborted(signal.reason)) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthrowIfAborted(signal);\n\t\t}\n\t\ttry {\n\t\t\tif (child.directory) {\n\t\t\t\tconst childDirectoryHandle = await parentHandle.getDirectoryHandle(child.name, { create: true });\n\t\t\t\tawait exportChildren(child, childDirectoryHandle);\n\t\t\t} else {\n\t\t\t\tconst fileHandle = await parentHandle.getFileHandle(child.name, { create: true });\n\t\t\t\tconst writable = await fileHandle.createWritable();\n\t\t\t\ttry {\n\t\t\t\t\tawait child.getData({ writable: createProgressWritable(writable) }, getDataOptions);\n\t\t\t\t} catch (error) {\n\t\t\t\t\tthrow exportAborted ? new Error(ERR_ABORT_EXPORT) : error;\n\t\t\t\t}\n\t\t\t\texportedEntryNames.push(child.getRelativeName(zipEntry));\n\t\t\t}\n\t\t} catch (error) {\n\t\t\texportAborted = true;\n\t\t\tabortController.abort(new Error(ERR_ABORT_EXPORT));\n\t\t\ttry {\n\t\t\t\tif (error.entryName === UNDEFINED_VALUE) {\n\t\t\t\t\terror.entryName = child.getRelativeName(zipEntry);\n\t\t\t\t\terror.entryId = child.id;\n\t\t\t\t}\n\t\t\t} catch {\n\t\t\t\t// ignored\n\t\t\t}\n\t\t\tthrow error;\n\t\t}\n\t}\n}\n\nasync function transformToFileSystemhandle(entry) {\n\tconst handle = {\n\t\tname: entry.name\n\t};\n\tif (entry.isFile) {\n\t\thandle.kind = \"file\";\n\t\thandle.getFile = () =>\n\t\t\tnew Promise((resolve, reject) => entry.file(resolve, reject));\n\t}\n\tif (entry.isDirectory) {\n\t\thandle.kind = \"directory\";\n\t\tconst handles = await transformToFileSystemhandles(entry);\n\t\thandle.values = () => handles;\n\t}\n\treturn handle;\n}\n\nasync function transformToFileSystemhandles(entry) {\n\tconst entries = [];\n\tfunction readEntries(directoryReader, resolve, reject) {\n\t\tdirectoryReader.readEntries(async (entriesPart) => {\n\t\t\tif (!entriesPart.length) {\n\t\t\t\tresolve(entries);\n\t\t\t} else {\n\t\t\t\tfor (const entry of entriesPart) {\n\t\t\t\t\tentries.push(await transformToFileSystemhandle(entry));\n\t\t\t\t}\n\t\t\t\treadEntries(directoryReader, resolve, reject);\n\t\t\t}\n\t\t}, reject);\n\t}\n\tawait new Promise((resolve, reject) =>\n\t\treadEntries(entry.createReader(), resolve, reject)\n\t);\n\treturn {\n\t\t[Symbol.iterator]() {\n\t\t\tlet entryIndex = 0;\n\t\t\treturn {\n\t\t\t\tnext() {\n\t\t\t\t\tconst result = {\n\t\t\t\t\t\tvalue: entries[entryIndex],\n\t\t\t\t\t\tdone: entryIndex == entries.length\n\t\t\t\t\t};\n\t\t\t\t\tentryIndex++;\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t};\n}\n\nfunction resetFS(fs) {\n\tfs.entries = [];\n\tfs.entryIdCounter = 0;\n\tfs.root = new ZipDirectoryEntry(fs);\n}\n\nfunction resetAndImport(fs, importFunction) {\n\tconst { entries, entryIdCounter, root } = fs;\n\tresetFS(fs);\n\treturn importFunction(fs.root).catch(error => {\n\t\tObject.assign(fs, { entries, entryIdCounter, root });\n\t\tthrow error;\n\t});\n}\n\nfunction collectChildren(directory, recursive) {\n\tconst children = [];\n\tconst pendingDirectories = [directory];\n\tlet directoryIndex = 0;\n\twhile (directoryIndex < pendingDirectories.length) {\n\t\tfor (const child of pendingDirectories[directoryIndex++].children) {\n\t\t\tchildren.push(child);\n\t\t\tif (recursive) {\n\t\t\t\tpendingDirectories.push(child);\n\t\t\t}\n\t\t}\n\t}\n\treturn children;\n}\n\nfunction registerEntries(fs, entry) {\n\tconst pendingEntries = [entry];\n\twhile (pendingEntries.length) {\n\t\tconst pendingEntry = pendingEntries.pop();\n\t\tfs.entries[pendingEntry.id] = pendingEntry;\n\t\tfor (const child of pendingEntry.children) {\n\t\t\tpendingEntries.push(child);\n\t\t}\n\t}\n}\n\nfunction addChild(parent, name, params, directory) {\n\tif (parent.directory) {\n\t\tconst path = splitPath(name);\n\t\tif (path) {\n\t\t\tname = path.pop();\n\t\t\tparent = getPathParent(parent, path);\n\t\t}\n\t\treturn directory ? new ZipDirectoryEntry(parent.fs, name, params, parent) : new ZipFileEntry(parent.fs, name, params, parent);\n\t} else {\n\t\tthrow new Error(ERR_PARENT_NOT_DIRECTORY);\n\t}\n}\n\nfunction checkDuplicatesOption(duplicates) {\n\tif (duplicates === UNDEFINED_VALUE) {\n\t\treturn DUPLICATES_THROW;\n\t} else if (DUPLICATES_VALUES.has(duplicates)) {\n\t\treturn duplicates;\n\t} else {\n\t\tthrow new Error(ERR_INVALID_DUPLICATES);\n\t}\n}\n\nfunction splitPath(name) {\n\tif (name.includes(\"/\")) {\n\t\tconst path = name.split(\"/\").filter(pathPart => pathPart != \"\" && pathPart != \".\");\n\t\tif (path.length) {\n\t\t\treturn path;\n\t\t}\n\t}\n}\n\nfunction getPathParent(parent, path, movedEntry) {\n\tpath.forEach(pathPart => {\n\t\tconst previousParent = parent;\n\t\tparent = parent.getChildByName(pathPart);\n\t\tif (parent) {\n\t\t\tif (!parent.directory) {\n\t\t\t\tthrow new Error(ERR_ENTRY_EXISTS);\n\t\t\t}\n\t\t\tif (movedEntry && (parent == movedEntry || parent.isDescendantOf(movedEntry))) {\n\t\t\t\tthrow new Error(ERR_ANCESTOR_ENTRY);\n\t\t\t}\n\t\t} else {\n\t\t\tparent = new ZipDirectoryEntry(previousParent.fs, pathPart, { data: null }, previousParent);\n\t\t}\n\t});\n\treturn parent;\n}\n","import { BlobReader, ZipReader, type Entry } from \"@zip.js/zip.js\";\n\nimport type { CsvImportLimits } from \"./csv-import\";\n\nexport type BoundedZip = {\n entries: readonly Entry[];\n readRange: (entry: Entry) => Promise<void>;\n readText: (entry: Entry) => Promise<string>;\n assertActive: () => void;\n close: () => Promise<void>;\n};\n\nconst safe = (value: number) => Number.isSafeInteger(value) && value >= 0;\nconst unsafeName = (name: string) => /[\\\\\\0-\\x1F\\x7F-\\x9F]/.test(name);\n\nfunction stopIfCancelled(signal?: AbortSignal): void {\n if (signal?.aborted) throw new Error(\"The archive import was cancelled.\");\n}\n\nfunction hasWarnings(reader: ZipReader<Blob>, entry: Entry): boolean {\n return Boolean(reader.warnings?.length || entry.warnings?.length);\n}\n\nfunction boundedText(limit: number, used: { value: number }) {\n let size = 0;\n const parts: Uint8Array[] = [];\n return {\n writable: new WritableStream<Uint8Array>({\n write(chunk) {\n if (used.value > limit - chunk.byteLength)\n throw new Error(\"The archive exceeds the organization size limit.\");\n used.value += chunk.byteLength;\n size += chunk.byteLength;\n parts.push(chunk);\n },\n }),\n text: () => {\n const bytes = new Uint8Array(size);\n let offset = 0;\n for (const part of parts) {\n bytes.set(part, offset);\n offset += part.byteLength;\n }\n return new TextDecoder(\"utf-8\", { fatal: true }).decode(bytes);\n },\n };\n}\n\n/** zip.js provides directory getData at runtime while omitting it from its Entry type. */\nasync function directoryRange(\n entry: Entry,\n signal?: AbortSignal,\n): Promise<void> {\n if (!(\"getData\" in entry) || typeof entry.getData !== \"function\")\n throw new Error(\"The archive is unsafe.\");\n await entry.getData(new WritableStream<Uint8Array>(), {\n checkOverlappingEntryOnly: true,\n ...(signal ? { signal } : {}),\n });\n}\n\n/**\n * Opens a ZIP under vendor-neutral structural limits. Callers retain ownership of\n * their member grammar and may only read an entry through this object.\n */\nexport async function openBoundedZip(\n file: Blob,\n limits: Pick<CsvImportLimits, \"maxFileBytes\" | \"maxRecords\">,\n signal?: AbortSignal,\n): Promise<BoundedZip> {\n if (file.size > limits.maxFileBytes)\n throw new Error(\"The archive exceeds the organization size limit.\");\n const reader = new ZipReader(new BlobReader(file), {\n strictness: \"strict\",\n filenameValidation: \"strict\",\n checkAmbiguity: true,\n });\n try {\n stopIfCancelled(signal);\n const entries = await reader.getEntries();\n if (reader.warnings?.length || entries.length > limits.maxRecords)\n throw new Error(\"The archive is unsafe.\");\n const names = new Set<string>();\n let declared = 0;\n for (const entry of entries) {\n const unixType = (entry.externalFileAttributes >>> 16) & 0o170000;\n if (\n names.has(entry.filename) ||\n unsafeName(entry.filename) ||\n !safe(entry.compressedSize) ||\n !safe(entry.uncompressedSize) ||\n !safe(entry.offset) ||\n declared > limits.maxFileBytes - entry.uncompressedSize ||\n entry.encrypted ||\n (entry.directory\n ? unixType !== 0 && unixType !== 0o040000\n : unixType !== 0 && unixType !== 0o100000)\n )\n throw new Error(\"The archive is unsafe.\");\n names.add(entry.filename);\n declared += entry.uncompressedSize;\n }\n const used = { value: declared };\n const ownedEntries = new Set(entries);\n const ensureOwnedAndSafe = (entry: Entry) => {\n if (!ownedEntries.has(entry) || hasWarnings(reader, entry))\n throw new Error(\"The archive is unsafe.\");\n };\n const readRange = async (entry: Entry) => {\n ensureOwnedAndSafe(entry);\n stopIfCancelled(signal);\n if (entry.directory) await directoryRange(entry, signal);\n else\n await entry.getData(new WritableStream<Uint8Array>(), {\n checkOverlappingEntryOnly: true,\n ...(signal ? { signal } : {}),\n });\n stopIfCancelled(signal);\n ensureOwnedAndSafe(entry);\n };\n return {\n entries: Object.freeze([...entries]),\n assertActive: () => stopIfCancelled(signal),\n readRange,\n readText: async (entry) => {\n ensureOwnedAndSafe(entry);\n if (entry.directory) throw new Error(\"The archive is unsafe.\");\n await readRange(entry);\n const output = boundedText(limits.maxFileBytes, used);\n try {\n await entry.getData(output.writable, { checkCrc32: true, ...(signal ? { signal } : {}) });\n } catch (error) {\n if (used.value >= limits.maxFileBytes)\n throw new Error(\"The archive exceeds the organization size limit.\");\n throw error;\n }\n stopIfCancelled(signal);\n ensureOwnedAndSafe(entry);\n return output.text();\n },\n close: () => reader.close(),\n };\n } catch (error) {\n await reader.close();\n if (signal?.aborted) throw new Error(\"The archive import was cancelled.\");\n throw error;\n }\n}\n","import type { CsvImportLimits } from \"./csv-import\";\nimport { openBoundedZip } from \"./bounded-zip\";\n\nexport type OnePuxArchive = {\n attributesText: string;\n dataText: string;\n attachmentMemberCount: number;\n};\n\nfunction invalid(): never {\n throw new Error(\"The 1Password archive is invalid.\");\n}\n\n/** Applies the 1PUX member grammar to shared bounded ZIP mechanics. */\nexport async function readOnePuxArchive(\n file: Blob,\n limits: Pick<CsvImportLimits, \"maxFileBytes\" | \"maxRecords\">,\n signal?: AbortSignal,\n): Promise<OnePuxArchive> {\n let archive;\n try {\n archive = await openBoundedZip(file, limits, signal);\n let attachmentMemberCount = 0;\n let hasAttributes = false;\n let hasData = false;\n for (const entry of archive.entries) {\n if (\n entry.filename === \"files/\" &&\n entry.directory &&\n entry.uncompressedSize === 0\n )\n continue;\n if (entry.directory) invalid();\n if (entry.filename === \"export.attributes\") {\n hasAttributes = true;\n continue;\n }\n if (entry.filename === \"export.data\") {\n hasData = true;\n continue;\n }\n if (\n entry.filename.startsWith(\"files/\") &&\n entry.filename.slice(6) &&\n !entry.filename.slice(6).includes(\"/\")\n ) {\n attachmentMemberCount += 1;\n continue;\n }\n invalid();\n }\n if (!hasAttributes || !hasData) invalid();\n let attributesText: string | undefined;\n let dataText: string | undefined;\n for (const entry of archive.entries) {\n if (\n entry.filename !== \"export.attributes\" &&\n entry.filename !== \"export.data\"\n ) {\n await archive.readRange(entry);\n continue;\n }\n const text = await archive.readText(entry);\n if (entry.filename === \"export.attributes\") attributesText = text;\n else dataText = text;\n }\n if (!attributesText || !dataText) invalid();\n return { attributesText, dataText, attachmentMemberCount };\n } catch (error) {\n if (signal?.aborted) throw new Error(\"The 1Password import was cancelled.\");\n if (error instanceof Error && /size limit/.test(error.message))\n throw new Error(\n \"The 1Password export exceeds this organization’s import size limit.\",\n );\n throw error;\n } finally {\n await archive?.close();\n }\n}\n","import { parseOnePuxData } from \"./onepux\";\nimport { readOnePuxArchive } from \"./onepux-archive\";\nimport type {\n StructuredImportWorkerRequest,\n StructuredImportWorkerResponse,\n} from \"./structured-import-worker-protocol\";\n\nexport type OnePuxWorkerLimits = Extract<\n StructuredImportWorkerRequest,\n { type: \"parse\" }\n>[\"limits\"];\nexport type OnePuxWorkerRequest = StructuredImportWorkerRequest;\nexport type OnePuxWorkerResponse = StructuredImportWorkerResponse;\ntype ActiveOperation = { requestId: string; controller: AbortController };\n\n/** The production worker handler is exported so real ZIP integration tests use this exact path. */\nexport function createOnePuxWorkerMessageHandler(\n post: (response: OnePuxWorkerResponse) => void,\n) {\n let active: ActiveOperation | undefined;\n return async (request: OnePuxWorkerRequest): Promise<void> => {\n if (request.type === \"cancel\") {\n if (active && request.requestId === active.requestId) {\n active.controller.abort();\n active = undefined;\n }\n return;\n }\n active?.controller.abort();\n const operation: ActiveOperation = {\n requestId: request.requestId,\n controller: new AbortController(),\n };\n active = operation;\n try {\n const archive = await readOnePuxArchive(\n request.file,\n request.limits,\n operation.controller.signal,\n );\n const records = parseOnePuxData(\n archive.attributesText,\n archive.dataText,\n request.limits,\n );\n if (active !== operation || operation.controller.signal.aborted) return;\n post({\n ok: true,\n requestId: request.requestId,\n records,\n fileNotices:\n archive.attachmentMemberCount > 0\n ? [\n {\n code: \"unsupported_archive_members\",\n count: archive.attachmentMemberCount,\n },\n ]\n : [],\n });\n } catch {\n if (active !== operation || operation.controller.signal.aborted) return;\n post({\n ok: false,\n requestId: request.requestId,\n error: \"The 1Password archive could not be read.\",\n });\n } finally {\n if (active === operation) active = undefined;\n }\n };\n}\n\nif (typeof self !== \"undefined\") {\n const handleMessage = createOnePuxWorkerMessageHandler((response) =>\n self.postMessage(response),\n );\n self.onmessage = (event: MessageEvent<OnePuxWorkerRequest>) => {\n void handleMessage(event.data);\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA,IA4BM,aACA,aACA,YACA,4BACA,+BACA,0BACA,wBAEA,6BACA,0BACA,o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ACjE,WAAK;AAAA,QACH,IAAI;AAAA,QACJ,WAAW,QAAQ;AAAA,QACnB,OAAO;AAAA,MACT,CAAC;AAAA,IACH,UAAE;AACA,UAAI,WAAW,UAAW,UAAS;AAAA,IACrC;AAAA,EACF;AACF;AAEA,IAAI,OAAO,SAAS,aAAa;AAC/B,QAAM,gBAAgB;AAAA,IAAiC,CAAC,aACtD,KAAK,YAAY,QAAQ;AAAA,EAC3B;AACA,OAAK,YAAY,CAAC,UAA6C;AAC7D,SAAK,cAAc,MAAM,IAAI;AAAA,EAC/B;AACF;","names":["config","CompressionStreamZlib","DecompressionStreamZlib","n","t","b","decrypt","encrypt","T0","T1","T2","T3","t2","b","e","t","p","s","s2","createEngine","decrypt","BLOCK_LENGTH","encrypt","password","createKeys","CompressionStream","DecompressionStream","Stream","CompressionStream","codecStreams","DecompressionStream","DEFAULT_CHUNK_SIZE","config","Stream","config","modulePromise","runWorker","config","maxWorkers","workerData","stream","workerOptions","terminateWorker","pendingEntries","bytes","buffer","range","endOfDirectoryView","commentOffset","commentLength","decode","options","config","runWorker","isInteger","value","INTEGER_REGEX","test","isNumber","NUMBER_REGEX","isSafeNumber","config","Number","isSafeInteger","parseInt","num","parseFloat","parsed","String","valueDigits","extractSignificantDigits","parsedDigits","approx","requiredDigits","length","startsWith","substring","UnsafeNumberReason","getUnsafeNumberReason","undefined","truncate_integer","isFinite","overflow","underflow","truncate_float","extractSignificantDigits","value","start","end","getSignificantDigitRange","digits","substring","dot","indexOf","lastIndexOf","length","LosslessNumber","isLosslessNumber","constructor","value","isNumber","Error","valueOf","unsafeReason","getUnsafeNumberReason","undefined","UnsafeNumberReason","truncate_float","Number","parseFloat","isInteger","BigInt","toString","parseLosslessNumber","value","LosslessNumber","revive","json","reviver","reviveValue","context","key","value","Array","isArray","call","reviveArray","isLosslessNumber","reviveObject","object","Object","keys","undefined","array","i","length","String","parse","text","reviver","options","optionsObj","parseNumber","parseLosslessNumber","onDuplicateKey","throwDuplicateKey","i","value","parseValue","expectValue","expectEndOfInput","revive","parseObject","charCodeAt","codeOpeningBrace","skipWhitespace","object","initial","length","codeClosingBrace","eatComma","start","key","parseString","undefined","throwObjectKeyExpected","eatColon","throwObjectValueExpected","Object","prototype","hasOwnProperty","call","isDeepEqual","returnedValue","position","oldValue","newValue","throwObjectKeyOrEndExpected","parseArray","codeOpeningBracket","array","codeClosingBracket","expectArrayItem","push","throwArrayItemOrEndExpected","parseNumeric","parseKeyword","name","slice","isWhitespace","codeDoubleQuote","result","codeBackslash","char","escapeChar","escapeCharacters","isHex","String","fromCharCode","Number","parseInt","throwInvalidUnicodeCharacter","throwInvalidEscapeCharacter","isValidStringCharacter","throwInvalidCharacter","expectEndOfString","codeMinus","expectDigit","codeZero","isNonZeroDigit","isDigit","codeDot","codeLowercaseE","codeUppercaseE","codePlus","codeComma","SyntaxError","gotAt","codeColon","numSoFar","_ref","pos","chars","got","code","codeSpace","codeNewline","codeTab","codeReturn","codeNine","codeUppercaseA","codeUppercaseF","codeLowercaseA","codeLowercaseF","codeOne","a","b","Array","isArray","every","item","index","isObject","keys","Set","f","n","r","t","stringify","value","replacer","space","numberStringifiers","resolvedSpace","resolveSpace","replacedValue","call","stringifyValue","indent","Array","isArray","stringifier","find","item","test","str","isNumber","Error","Date","Boolean","Number","String","JSON","isLosslessNumber","toString","stringifyArray","stringifyObject","undefined","array","length","childIndent","i","object","toJSON","keys","map","Object","first","key","includeProperty","keyStr","_key","repeat","parse","object","key","parse","t","e","r","o","s","config","value","error","result","VENDOR_VERSION_AE_1","ZipReader","startsWithSplitZipSignature","getOptionValue","getOptionValue","getDiskOffset","getOptionValue","getFunctionOptionValue","getDiskOffset","config","runWorker","VENDOR_VERSION_AE_1","getFunctionOptionValue","getOptionValue","startsWithSplitZipSignature","getUint32","getUint16","DEFAULT_THRESHOLD","DEFAULT_THRESHOLD","n","t","e","r","s","o","p","X","f","b","l","FORMAT_DEFLATE_RAW","FORMAT_DEFLATE64_RAW","FORMAT_GZIP","Z_MEM_ERROR_CODE","Z_MEM_ERROR_CODE","initStream","FORMAT_GZIP","FORMAT_DEFLATE_RAW","FORMAT_DEFLATE64_RAW","state","wasm","setWasmExports","wasm","createEngine","wasm","decrypt","initModule","setWasmExports","bytes","createEngine","config","initModule","bytes"]}
1
+ {"version":3,"sources":["../../../../node_modules/.pnpm/@zip.js+zip.js@2.18.2/node_modules/@zip.js/zip.js/lib/core/constants.js","../../../../node_modules/.pnpm/@zip.js+zip.js@2.18.2/node_modules/@zip.js/zip.js/lib/core/options.js","../../../../node_modules/.pnpm/@zip.js+zip.js@2.18.2/node_modules/@zip.js/zip.js/lib/core/configuration.js","../../../../node_modules/.pnpm/@zip.js+zip.js@2.18.2/node_modules/@zip.js/zip.js/lib/core/util/array.js","../../../../node_modules/.pnpm/@zip.js+zip.js@2.18.2/node_modules/@zip.js/zip.js/lib/core/util/error.js","../../../../node_modules/.pnpm/@zip.js+zip.js@2.18.2/node_modules/@zip.js/zip.js/lib/core/streams/codecs/crc32.js","../../../../node_modules/.pnpm/@zip.js+zip.js@2.18.2/node_modules/@zip.js/zip.js/lib/core/streams/crc32-stream.js","../../../../node_modules/.pnpm/@zip.js+zip.js@2.18.2/node_modules/@zip.js/zip.js/lib/core/util/encode-text.js","../../../../node_modules/.pnpm/@zip.js+zip.js@2.18.2/node_modules/@zip.js/zip.js/lib/core/streams/codecs/aes-hmac-sha1.js","../../../../node_modules/.pnpm/@zip.js+zip.js@2.18.2/node_modules/@zip.js/zip.js/lib/core/streams/common-crypto.js","../../../../node_modules/.pnpm/@zip.js+zip.js@2.18.2/node_modules/@zip.js/zip.js/lib/core/streams/aes-crypto-stream.js","../../../../node_modules/.pnpm/@zip.js+zip.js@2.18.2/node_modules/@zip.js/zip.js/lib/core/streams/zip-crypto-stream.js","../../../../node_modules/.pnpm/@zip.js+zip.js@2.18.2/node_modules/@zip.js/zip.js/lib/core/util/compatible-streams.js","../../../../node_modules/.pnpm/@zip.js+zip.js@2.18.2/node_modules/@zip.js/zip.js/lib/core/codec-registry.js","../../../../node_modules/.pnpm/@zip.js+zip.js@2.18.2/node_modules/@zip.js/zip.js/lib/core/streams/zip-entry-stream.js","../../../../node_modules/.pnpm/@zip.js+zip.js@2.18.2/node_modules/@zip.js/zip.js/lib/core/streams/codec-stream.js","../../../../node_modules/.pnpm/@zip.js+zip.js@2.18.2/node_modules/@zip.js/zip.js/lib/core/codec-worker.js","../../../../node_modules/.pnpm/@zip.js+zip.js@2.18.2/node_modules/@zip.js/zip.js/lib/core/codec-pool.js","../../../../node_modules/.pnpm/@zip.js+zip.js@2.18.2/node_modules/@zip.js/zip.js/lib/core/util/decode-cp437.js","../../../../node_modules/.pnpm/@zip.js+zip.js@2.18.2/node_modules/@zip.js/zip.js/lib/core/util/decode-text.js","../../../../node_modules/.pnpm/@zip.js+zip.js@2.18.2/node_modules/@zip.js/zip.js/lib/core/io.js","../../../../node_modules/.pnpm/@zip.js+zip.js@2.18.2/node_modules/@zip.js/zip.js/lib/core/util/warnings.js","../../../../node_modules/.pnpm/@zip.js+zip.js@2.18.2/node_modules/@zip.js/zip.js/lib/core/zip-entry.js","../../../../node_modules/.pnpm/@zip.js+zip.js@2.18.2/node_modules/@zip.js/zip.js/lib/core/zip-reader.js","../../../../node_modules/.pnpm/lossless-json@4.3.1/node_modules/lossless-json/src/utils.ts","../../../../node_modules/.pnpm/lossless-json@4.3.1/node_modules/lossless-json/src/LosslessNumber.ts","../../../../node_modules/.pnpm/lossless-json@4.3.1/node_modules/lossless-json/src/numberParsers.ts","../../../../node_modules/.pnpm/lossless-json@4.3.1/node_modules/lossless-json/src/revive.ts","../../../../node_modules/.pnpm/lossless-json@4.3.1/node_modules/lossless-json/src/parse.ts","../../../../node_modules/.pnpm/lossless-json@4.3.1/node_modules/lossless-json/src/stringify.ts","../../src/io/strict-json.ts","../../src/io/csv-import.ts","../../src/io/bitwarden-json.ts","../../src/io/onepux.ts","../../../../node_modules/.pnpm/@zip.js+zip.js@2.18.2/node_modules/@zip.js/zip.js/lib/zip-fs-wasm.js","../../../../node_modules/.pnpm/@zip.js+zip.js@2.18.2/node_modules/@zip.js/zip.js/lib/core/web-worker-inline-wasm.js","../../../../node_modules/.pnpm/@zip.js+zip.js@2.18.2/node_modules/@zip.js/zip.js/lib/zip-core-base.js","../../../../node_modules/.pnpm/@zip.js+zip.js@2.18.2/node_modules/@zip.js/zip.js/lib/core/codec-worker-web.js","../../../../node_modules/.pnpm/@zip.js+zip.js@2.18.2/node_modules/@zip.js/zip.js/lib/zip-core-reader.js","../../../../node_modules/.pnpm/@zip.js+zip.js@2.18.2/node_modules/@zip.js/zip.js/lib/core/zip-writer.js","../../../../node_modules/.pnpm/@zip.js+zip.js@2.18.2/node_modules/@zip.js/zip.js/lib/core/compression-methods.js","../../../../node_modules/.pnpm/@zip.js+zip.js@2.18.2/node_modules/@zip.js/zip.js/lib/core/util/opfs-temp-stream.js","../../../../node_modules/.pnpm/@zip.js+zip.js@2.18.2/node_modules/@zip.js/zip.js/lib/core/util/blob-temp-stream.js","../../../../node_modules/.pnpm/@zip.js+zip.js@2.18.2/node_modules/@zip.js/zip.js/lib/core/util/sync-access-handle-temp-stream.js","../../../../node_modules/.pnpm/@zip.js+zip.js@2.18.2/node_modules/@zip.js/zip.js/lib/zip-module-wasm.js","../../../../node_modules/.pnpm/@zip.js+zip.js@2.18.2/node_modules/@zip.js/zip.js/lib/core/zlib-streams-inline.js","../../../../node_modules/.pnpm/@zip.js+zip.js@2.18.2/node_modules/@zip.js/zip.js/lib/zip-module-wasm-base.js","../../../../node_modules/.pnpm/@zip.js+zip.js@2.18.2/node_modules/@zip.js/zip.js/lib/core/streams/zlib-wasm/zlib-streams.js","../../../../node_modules/.pnpm/@zip.js+zip.js@2.18.2/node_modules/@zip.js/zip.js/lib/core/streams/zlib-wasm/aes-hmac-sha1-wasm.js","../../../../node_modules/.pnpm/@zip.js+zip.js@2.18.2/node_modules/@zip.js/zip.js/lib/core/streams/zlib-wasm/zlib-streams-loader.js","../../../../node_modules/.pnpm/@zip.js+zip.js@2.18.2/node_modules/@zip.js/zip.js/lib/core/zip-fs.js","../../src/io/bounded-zip.ts","../../src/io/onepux-archive.ts","../../src/io/onepux.worker.ts"],"sourcesContent":["/*\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 MAX_8_BITS = 0xff;\nconst COMPRESSION_METHOD_DEFLATE = 0x08;\nconst COMPRESSION_METHOD_DEFLATE_64 = 0x09;\nconst COMPRESSION_METHOD_STORE = 0x00;\nconst COMPRESSION_METHOD_AES = 0x63;\n\nconst LOCAL_FILE_HEADER_SIGNATURE = 0x04034b50;\nconst SPLIT_ZIP_FILE_SIGNATURE = 0x08074b50;\nconst TEMPORARY_SPLIT_ZIP_FILE_SIGNATURE = 0x30304b50;\nconst DATA_DESCRIPTOR_RECORD_SIGNATURE = SPLIT_ZIP_FILE_SIGNATURE;\nconst ARCHIVE_EXTRA_DATA_SIGNATURE = 0x08064b50;\nconst DIGITAL_SIGNATURE_RECORD_SIGNATURE = 0x05054b50;\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 CENTRAL_FILE_HEADER_LENGTH = 46;\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 DATA_DESCRIPTOR_RECORD_LENGTH = 12;\nconst DATA_DESCRIPTOR_RECORD_ZIP_64_LENGTH = 20;\nconst DATA_DESCRIPTOR_RECORD_SIGNATURE_LENGTH = 4;\nconst SPLIT_ZIP_FILE_SIGNATURE_LENGTH = 4;\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;\nconst EXTRAFIELD_TYPE_USDZ = 0x1986;\nconst EXTRAFIELD_TYPE_INFOZIP = 0x7875;\nconst EXTRAFIELD_TYPE_UNIX = 0x7855;\nconst EXTRAFIELD_TYPE_UNIX_TYPE1 = 0x5855;\nconst EXTRAFIELD_TYPE_PKWARE_UNIX = 0x000d;\n\nconst BITFLAG_ENCRYPTED = 0b1;\nconst BITFLAG_LEVEL = 0b0110;\nconst BITFLAG_LEVEL_MAX_MASK = 0b010;\nconst BITFLAG_LEVEL_FAST_MASK = 0b100;\nconst BITFLAG_LEVEL_SUPER_FAST_MASK = 0b110;\nconst BITFLAG_DATA_DESCRIPTOR = 0b1000;\nconst BITFLAG_COMPRESSED_PATCHED_DATA = 0b100000;\nconst BITFLAG_STRONG_ENCRYPTION = 0b1000000;\nconst BITFLAG_LANG_ENCODING_FLAG = 0b100000000000;\nconst BITFLAG_MASKED_LOCAL_HEADERS = 0b10000000000000;\nconst FILE_ATTR_MSDOS_DIR_MASK = 0b10000;\nconst FILE_ATTR_MSDOS_READONLY_MASK = 0x01;\nconst FILE_ATTR_MSDOS_HIDDEN_MASK = 0x02;\nconst FILE_ATTR_MSDOS_SYSTEM_MASK = 0x04;\nconst FILE_ATTR_MSDOS_ARCHIVE_MASK = 0x20;\nconst FILE_ATTR_UNIX_TYPE_MASK = 0o170000;\nconst FILE_ATTR_UNIX_TYPE_DIR = 0o040000;\nconst FILE_ATTR_UNIX_TYPE_SYMLINK = 0o120000;\nconst FILE_ATTR_UNIX_TYPE_FILE = 0o100000;\nconst FILE_ATTR_UNIX_EXECUTABLE_MASK = 0o111;\nconst FILE_ATTR_UNIX_DEFAULT_MASK = 0o644;\nconst FILE_ATTR_UNIX_SETUID_MASK = 0o4000;\nconst FILE_ATTR_UNIX_SETGID_MASK = 0o2000;\nconst FILE_ATTR_UNIX_STICKY_MASK = 0o1000;\n\nconst VERSION_STORE = 0x0A;\nconst VERSION_DEFLATE = 0x14;\nconst VERSION_ZIP64 = 0x2D;\nconst VERSION_AES = 0x33;\n\nconst VERSION_MADE_BY_MSDOS = 0x0014;\nconst VERSION_MADE_BY_UNIX = 0x0300;\n\nconst DIRECTORY_SIGNATURE = \"/\";\n\nconst HEADER_SIZE = 30;\nconst HEADER_OFFSET_VERSION = 0;\nconst HEADER_OFFSET_SIGNATURE = 10;\nconst HEADER_OFFSET_COMPRESSED_SIZE = 14;\nconst HEADER_OFFSET_UNCOMPRESSED_SIZE = 18;\nconst HEADER_OFFSET_FILENAME_LENGTH = 22;\nconst HEADER_OFFSET_EXTRAFIELD_LENGTH = 24;\nconst LOCAL_HEADER_COMMON_OFFSET = 4;\n\nconst MAX_DATE = new Date(2107, 11, 31, 23, 59, 58);\nconst MIN_DATE = new Date(1980, 0, 1);\n\nconst UNDEFINED_VALUE = undefined;\nconst INFINITY_VALUE = Infinity;\nconst UNDEFINED_TYPE = \"undefined\";\nconst FUNCTION_TYPE = \"function\";\nconst OBJECT_TYPE = \"object\";\nconst STRING_TYPE = \"string\";\nconst NUMBER_TYPE = \"number\";\nconst BOOLEAN_TYPE = \"boolean\";\n\nconst EMPTY_UINT8_ARRAY = new Uint8Array();\nconst SYMBOL_ASYNC_DISPOSE = Symbol.asyncDispose || Symbol();\n\nexport {\n\tEMPTY_UINT8_ARRAY,\n\tSYMBOL_ASYNC_DISPOSE,\n\tMAX_32_BITS,\n\tMAX_16_BITS,\n\tMAX_8_BITS,\n\tCOMPRESSION_METHOD_DEFLATE,\n\tCOMPRESSION_METHOD_DEFLATE_64,\n\tCOMPRESSION_METHOD_STORE,\n\tCOMPRESSION_METHOD_AES,\n\tSPLIT_ZIP_FILE_SIGNATURE,\n\tTEMPORARY_SPLIT_ZIP_FILE_SIGNATURE,\n\tARCHIVE_EXTRA_DATA_SIGNATURE,\n\tDIGITAL_SIGNATURE_RECORD_SIGNATURE,\n\tLOCAL_FILE_HEADER_SIGNATURE,\n\tDATA_DESCRIPTOR_RECORD_SIGNATURE,\n\tCENTRAL_FILE_HEADER_SIGNATURE,\n\tCENTRAL_FILE_HEADER_LENGTH,\n\tEND_OF_CENTRAL_DIR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_SIGNATURE,\n\tDATA_DESCRIPTOR_RECORD_LENGTH,\n\tDATA_DESCRIPTOR_RECORD_ZIP_64_LENGTH,\n\tDATA_DESCRIPTOR_RECORD_SIGNATURE_LENGTH,\n\tSPLIT_ZIP_FILE_SIGNATURE_LENGTH,\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\tEXTRAFIELD_TYPE_USDZ,\n\tEXTRAFIELD_TYPE_INFOZIP,\n\tEXTRAFIELD_TYPE_UNIX,\n\tEXTRAFIELD_TYPE_UNIX_TYPE1,\n\tEXTRAFIELD_TYPE_PKWARE_UNIX,\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_LEVEL_MAX_MASK,\n\tBITFLAG_LEVEL_FAST_MASK,\n\tBITFLAG_LEVEL_SUPER_FAST_MASK,\n\tBITFLAG_DATA_DESCRIPTOR,\n\tBITFLAG_COMPRESSED_PATCHED_DATA,\n\tBITFLAG_STRONG_ENCRYPTION,\n\tBITFLAG_LANG_ENCODING_FLAG,\n\tBITFLAG_MASKED_LOCAL_HEADERS,\n\tFILE_ATTR_MSDOS_DIR_MASK,\n\tFILE_ATTR_MSDOS_READONLY_MASK,\n\tFILE_ATTR_MSDOS_HIDDEN_MASK,\n\tFILE_ATTR_MSDOS_SYSTEM_MASK,\n\tFILE_ATTR_MSDOS_ARCHIVE_MASK,\n\tFILE_ATTR_UNIX_TYPE_MASK,\n\tFILE_ATTR_UNIX_TYPE_DIR,\n\tFILE_ATTR_UNIX_TYPE_SYMLINK,\n\tFILE_ATTR_UNIX_TYPE_FILE,\n\tFILE_ATTR_UNIX_EXECUTABLE_MASK,\n\tFILE_ATTR_UNIX_DEFAULT_MASK,\n\tFILE_ATTR_UNIX_SETUID_MASK,\n\tFILE_ATTR_UNIX_SETGID_MASK,\n\tFILE_ATTR_UNIX_STICKY_MASK,\n\tVERSION_STORE,\n\tVERSION_DEFLATE,\n\tVERSION_MADE_BY_MSDOS,\n\tVERSION_MADE_BY_UNIX,\n\tVERSION_ZIP64,\n\tVERSION_AES,\n\tHEADER_SIZE,\n\tHEADER_OFFSET_VERSION,\n\tHEADER_OFFSET_SIGNATURE,\n\tHEADER_OFFSET_COMPRESSED_SIZE,\n\tHEADER_OFFSET_UNCOMPRESSED_SIZE,\n\tHEADER_OFFSET_FILENAME_LENGTH,\n\tHEADER_OFFSET_EXTRAFIELD_LENGTH,\n\tLOCAL_HEADER_COMMON_OFFSET,\n\tDIRECTORY_SIGNATURE,\n\tMIN_DATE,\n\tMAX_DATE,\n\tUNDEFINED_VALUE,\n\tINFINITY_VALUE,\n\tUNDEFINED_TYPE,\n\tFUNCTION_TYPE,\n\tOBJECT_TYPE,\n\tSTRING_TYPE,\n\tNUMBER_TYPE,\n\tBOOLEAN_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 DOMException */\n\nimport {\n\tBOOLEAN_TYPE,\n\tFUNCTION_TYPE,\n\tSTRING_TYPE,\n\tUNDEFINED_VALUE\n} from \"./constants.js\";\n\nconst OPTION_FILENAME_ENCODING = \"filenameEncoding\";\nconst OPTION_COMMENT_ENCODING = \"commentEncoding\";\nconst OPTION_DECODE_TEXT = \"decodeText\";\nconst OPTION_EXTRACT_PREPENDED_DATA = \"extractPrependedData\";\nconst OPTION_EXTRACT_APPENDED_DATA = \"extractAppendedData\";\nconst OPTION_PASSWORD = \"password\";\nconst OPTION_RAW_PASSWORD = \"rawPassword\";\nconst OPTION_PASS_THROUGH = \"passThrough\";\nconst OPTION_SIGNAL = \"signal\";\nconst OPTION_CHECK_PASSWORD_ONLY = \"checkPasswordOnly\";\nconst OPTION_CHECK_OVERLAPPING_ENTRY_ONLY = \"checkOverlappingEntryOnly\";\nconst OPTION_CHECK_OVERLAPPING_ENTRY = \"checkOverlappingEntry\";\nconst OPTION_CHECK_AMBIGUITY = \"checkAmbiguity\";\nconst OPTION_CHECK_LOCAL_DIRECTORY = \"checkLocalDirectory\";\nconst OPTION_CHECK_LOCAL_FILENAME = \"checkLocalFilename\";\nconst OPTION_CHECK_SIGNATURE = \"checkSignature\";\nconst OPTION_CHECK_CRC32 = \"checkCrc32\";\nconst OPTION_CHECK_AUTHENTICATION_CODE = \"checkAuthenticationCode\";\nconst OPTION_USE_WEB_WORKERS = \"useWebWorkers\";\nconst OPTION_USE_COMPRESSION_STREAM = \"useCompressionStream\";\nconst OPTION_TRANSFER_STREAMS = \"transferStreams\";\nconst OPTION_PREVENT_CLOSE = \"preventClose\";\nconst OPTION_ENCRYPTION_STRENGTH = \"encryptionStrength\";\nconst OPTION_EXTENDED_TIMESTAMP = \"extendedTimestamp\";\nconst OPTION_NTFS_TIMESTAMP = \"ntfsTimestamp\";\nconst OPTION_KEEP_ORDER = \"keepOrder\";\nconst OPTION_LEVEL = \"level\";\nconst OPTION_BUFFERED_WRITE = \"bufferedWrite\";\nconst OPTION_CREATE_TEMP_STREAM = \"createTempStream\";\nconst OPTION_DATA_DESCRIPTOR_SIGNATURE = \"dataDescriptorSignature\";\nconst OPTION_USE_UNICODE_FILE_NAMES = \"useUnicodeFileNames\";\nconst OPTION_DATA_DESCRIPTOR = \"dataDescriptor\";\nconst OPTION_SUPPORT_ZIP64_SPLIT_FILE = \"supportZip64SplitFile\";\nconst OPTION_ENCODE_TEXT = \"encodeText\";\nconst OPTION_OFFSET = \"offset\";\nconst OPTION_USDZ = \"usdz\";\nconst OPTION_UNIX_EXTRA_FIELD_TYPE = \"unixExtraFieldType\";\nconst OPTION_LOCAL_EXTRA_FIELD = \"localExtraField\";\nconst OPTION_CENTRAL_EXTRA_FIELD = \"centralExtraField\";\nconst OPTION_STRICTNESS = \"strictness\";\nconst OPTION_FILENAME_VALIDATION = \"filenameValidation\";\nconst OPTION_NORMALIZE_FILENAME = \"normalizeFilename\";\nconst OPTION_MAX_APPENDED_DATA_SIZE = \"maxAppendedDataSize\";\nconst OPTION_DECRYPT_CENTRAL_DIRECTORY = \"decryptCentralDirectory\";\nconst OPTION_SIGN_CENTRAL_DIRECTORY = \"signCentralDirectory\";\nconst OPTION_ENTRY = \"entry\";\nconst TEXT_TYPE_FILENAME = \"filename\";\nconst TEXT_TYPE_COMMENT = \"comment\";\nconst STRICTNESS_STRICT = \"strict\";\nconst STRICTNESS_BALANCED = \"balanced\";\nconst STRICTNESS_TOLERANT = \"tolerant\";\nconst PASS_THROUGH_COMPRESSED = \"compressed\";\n\nconst ERR_INVALID_FUNCTION_OPTION = \"Invalid option (must be a function)\";\nconst ERR_INVALID_SIGNAL = \"Invalid signal (must be an AbortSignal instance)\";\nconst ERR_INVALID_PASSWORD_TYPE = \"Invalid password (password must be a string, rawPassword must be a Uint8Array)\";\nconst ERR_INVALID_PASS_THROUGH_VALUE = \"Invalid passThrough option (must be a boolean or 'compressed')\";\nconst ERR_ABORTED = \"The operation was aborted\";\nconst ABORT_ERROR_NAME = \"AbortError\";\n\nexport {\n\tOPTION_FILENAME_ENCODING,\n\tOPTION_COMMENT_ENCODING,\n\tOPTION_DECODE_TEXT,\n\tOPTION_EXTRACT_PREPENDED_DATA,\n\tOPTION_EXTRACT_APPENDED_DATA,\n\tOPTION_PASSWORD,\n\tOPTION_RAW_PASSWORD,\n\tOPTION_PASS_THROUGH,\n\tOPTION_SIGNAL,\n\tOPTION_CHECK_PASSWORD_ONLY,\n\tOPTION_CHECK_OVERLAPPING_ENTRY_ONLY,\n\tOPTION_CHECK_OVERLAPPING_ENTRY,\n\tOPTION_CHECK_AMBIGUITY,\n\tOPTION_CHECK_LOCAL_DIRECTORY,\n\tOPTION_CHECK_LOCAL_FILENAME,\n\tOPTION_CHECK_SIGNATURE,\n\tOPTION_CHECK_CRC32,\n\tOPTION_CHECK_AUTHENTICATION_CODE,\n\tOPTION_USE_WEB_WORKERS,\n\tOPTION_USE_COMPRESSION_STREAM,\n\tOPTION_TRANSFER_STREAMS,\n\tOPTION_PREVENT_CLOSE,\n\tOPTION_ENCRYPTION_STRENGTH,\n\tOPTION_EXTENDED_TIMESTAMP,\n\tOPTION_NTFS_TIMESTAMP,\n\tOPTION_KEEP_ORDER,\n\tOPTION_LEVEL,\n\tOPTION_BUFFERED_WRITE,\n\tOPTION_CREATE_TEMP_STREAM,\n\tOPTION_DATA_DESCRIPTOR_SIGNATURE,\n\tOPTION_USE_UNICODE_FILE_NAMES,\n\tOPTION_DATA_DESCRIPTOR,\n\tOPTION_SUPPORT_ZIP64_SPLIT_FILE,\n\tOPTION_ENCODE_TEXT,\n\tOPTION_OFFSET,\n\tOPTION_USDZ,\n\tOPTION_UNIX_EXTRA_FIELD_TYPE,\n\tOPTION_LOCAL_EXTRA_FIELD,\n\tOPTION_CENTRAL_EXTRA_FIELD,\n\tOPTION_STRICTNESS,\n\tOPTION_FILENAME_VALIDATION,\n\tOPTION_NORMALIZE_FILENAME,\n\tOPTION_MAX_APPENDED_DATA_SIZE,\n\tOPTION_DECRYPT_CENTRAL_DIRECTORY,\n\tOPTION_SIGN_CENTRAL_DIRECTORY,\n\tOPTION_ENTRY,\n\tTEXT_TYPE_FILENAME,\n\tTEXT_TYPE_COMMENT,\n\tSTRICTNESS_STRICT,\n\tSTRICTNESS_BALANCED,\n\tSTRICTNESS_TOLERANT,\n\tPASS_THROUGH_COMPRESSED,\n\tERR_INVALID_FUNCTION_OPTION,\n\tERR_INVALID_SIGNAL,\n\tERR_INVALID_PASSWORD_TYPE,\n\tERR_INVALID_PASS_THROUGH_VALUE,\n\tERR_ABORTED,\n\tABORT_ERROR_NAME,\n\tcheckFunctionOption,\n\tcheckSignalOption,\n\tthrowIfAborted,\n\tcheckPasswordOption,\n\tcheckPassThroughOption,\n\tcheckInteger,\n\tcheckIntegerOption,\n\ttoNumber\n};\n\nfunction checkFunctionOption(value) {\n\tif (value && typeof value != FUNCTION_TYPE) {\n\t\tthrow new Error(ERR_INVALID_FUNCTION_OPTION);\n\t}\n\treturn value;\n}\n\nfunction checkSignalOption(signal) {\n\tif (signal && (typeof signal.addEventListener != FUNCTION_TYPE || typeof signal.aborted != BOOLEAN_TYPE)) {\n\t\tthrow new Error(ERR_INVALID_SIGNAL);\n\t}\n\treturn signal || UNDEFINED_VALUE;\n}\n\nfunction throwIfAborted(signal) {\n\tif (signal && signal.aborted) {\n\t\tthrow signal.reason === UNDEFINED_VALUE ? new DOMException(ERR_ABORTED, ABORT_ERROR_NAME) : signal.reason;\n\t}\n}\n\nfunction checkPasswordOption(password, rawPassword) {\n\tif ((password && typeof password != STRING_TYPE) || (rawPassword && !(rawPassword instanceof Uint8Array))) {\n\t\tthrow new Error(ERR_INVALID_PASSWORD_TYPE);\n\t}\n}\n\nfunction checkPassThroughOption(passThrough) {\n\tif (passThrough !== UNDEFINED_VALUE && typeof passThrough != BOOLEAN_TYPE && passThrough !== PASS_THROUGH_COMPRESSED) {\n\t\tthrow new Error(ERR_INVALID_PASS_THROUGH_VALUE);\n\t}\n\treturn passThrough;\n}\n\nfunction checkInteger(value, maxValue, errorMessage) {\n\tif (!Number.isInteger(value) || value < 0 || value > maxValue) {\n\t\tthrow new Error(errorMessage);\n\t}\n}\n\nfunction checkIntegerOption(value, maxValue, errorMessage) {\n\tif (value !== UNDEFINED_VALUE) {\n\t\tcheckInteger(value, maxValue, errorMessage);\n\t}\n}\n\nfunction toNumber(value) {\n\treturn typeof value == STRING_TYPE && value.trim() ? Number(value) : value;\n}","/*\n Copyright (c) 2025 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\tFUNCTION_TYPE,\n\tSTRING_TYPE\n} from \"./constants.js\";\nimport {\n\tcheckFunctionOption,\n\ttoNumber\n} from \"./options.js\";\n\nconst DEFAULT_CHUNK_SIZE = 64 * 1024;\nconst MINIMUM_CHUNK_SIZE = 64;\nconst MINIMUM_PROPERTY_VALUE = 1;\nconst ERR_INVALID_MAX_WORKERS = \"Invalid maxWorkers (must be an integer greater than 0)\";\nconst ERR_INVALID_BASE_URI = \"Invalid baseURI (must be a string)\";\nconst ERR_INVALID_URI = \"Invalid URI (must be a string or a function returning a string)\";\nlet maxWorkers = 2;\ntry {\n\tif (typeof navigator != UNDEFINED_TYPE && navigator.hardwareConcurrency) {\n\t\tmaxWorkers = navigator.hardwareConcurrency;\n\t}\n} catch {\n\t// ignored\n}\nconst DEFAULT_CONFIGURATION = {\n\tworkerURI: \"./core/web-worker-wasm.js\",\n\twasmURI: \"./core/streams/zlib-wasm/zlib-streams.wasm\",\n\tchunkSize: DEFAULT_CHUNK_SIZE,\n\tmaxWorkers,\n\tterminateWorkerTimeout: 5000,\n\tworkerStarvationTimeout: 5000,\n\tworkerStartupTimeout: 5000,\n\tuseWebWorkers: true,\n\tuseCompressionStream: true,\n\ttransferStreams: true,\n\tCompressionStream: typeof CompressionStream != UNDEFINED_TYPE && CompressionStream,\n\tDecompressionStream: typeof DecompressionStream != UNDEFINED_TYPE && DecompressionStream\n};\n\nconst PROPERTY_NAME_MAX_WORKERS = \"maxWorkers\";\nconst PROPERTY_NAME_BASE_URI = \"baseURI\";\n\nconst URI_PROPERTY_NAMES = [\n\t\"wasmURI\",\n\t\"workerURI\"\n];\nconst BOOLEAN_PROPERTY_NAMES = [\n\t\"useCompressionStream\",\n\t\"useWebWorkers\",\n\t\"transferStreams\"\n];\nconst NUMBER_PROPERTY_NAMES = [\n\t\"chunkSize\",\n\tPROPERTY_NAME_MAX_WORKERS,\n\t\"terminateWorkerTimeout\",\n\t\"workerStarvationTimeout\",\n\t\"workerStartupTimeout\"\n];\nconst FUNCTION_PROPERTY_NAMES = [\n\t\"createWorker\",\n\t\"CompressionStream\",\n\t\"DecompressionStream\",\n\t\"CompressionStreamFallback\",\n\t\"DecompressionStreamFallback\"\n];\nconst CONFIGURABLE_PROPERTY_NAMES = [\n\tPROPERTY_NAME_BASE_URI,\n\t...URI_PROPERTY_NAMES,\n\t...BOOLEAN_PROPERTY_NAMES,\n\t...NUMBER_PROPERTY_NAMES,\n\t...FUNCTION_PROPERTY_NAMES\n];\n\nconst config = { ...DEFAULT_CONFIGURATION };\n\nexport {\n\tconfigure,\n\tsetDefaultConfiguration,\n\tresetConfiguration,\n\tgetConfiguration,\n\tgetChunkSize,\n\tnormalizeChunkSize,\n\tERR_INVALID_MAX_WORKERS,\n\tERR_INVALID_BASE_URI,\n\tERR_INVALID_URI\n};\n\nfunction getConfiguration() {\n\treturn config;\n}\n\nfunction getChunkSize(config) {\n\treturn normalizeChunkSize(config.chunkSize);\n}\n\nfunction normalizeChunkSize(chunkSize) {\n\tchunkSize = toNumber(chunkSize);\n\treturn Number.isInteger(chunkSize) && chunkSize >= MINIMUM_PROPERTY_VALUE ? Math.max(chunkSize, MINIMUM_CHUNK_SIZE) : DEFAULT_CHUNK_SIZE;\n}\n\nfunction configure(configuration) {\n\tObject.assign(config, checkConfiguration(normalizeConfiguration(configuration)));\n}\n\nfunction checkConfiguration(configuration) {\n\tconst checkedConfiguration = {};\n\tfor (const propertyName of CONFIGURABLE_PROPERTY_NAMES) {\n\t\tconst propertyValue = configuration[propertyName];\n\t\tif (propertyValue !== UNDEFINED_VALUE) {\n\t\t\tcheckedConfiguration[propertyName] = checkPropertyValue(propertyName, propertyValue);\n\t\t}\n\t}\n\treturn checkedConfiguration;\n}\n\nfunction checkPropertyValue(propertyName, propertyValue) {\n\tif (NUMBER_PROPERTY_NAMES.includes(propertyName)) {\n\t\tpropertyValue = toNumber(propertyValue);\n\t\tif (propertyName == PROPERTY_NAME_MAX_WORKERS && (!Number.isInteger(propertyValue) || propertyValue < MINIMUM_PROPERTY_VALUE)) {\n\t\t\tthrow new Error(ERR_INVALID_MAX_WORKERS);\n\t\t}\n\t} else if (FUNCTION_PROPERTY_NAMES.includes(propertyName)) {\n\t\tcheckFunctionOption(propertyValue);\n\t} else if (propertyName == PROPERTY_NAME_BASE_URI) {\n\t\tif (propertyValue && typeof propertyValue != STRING_TYPE) {\n\t\t\tthrow new Error(ERR_INVALID_BASE_URI);\n\t\t}\n\t} else if (URI_PROPERTY_NAMES.includes(propertyName)) {\n\t\tif (propertyValue && typeof propertyValue != STRING_TYPE && typeof propertyValue != FUNCTION_TYPE) {\n\t\t\tthrow new Error(ERR_INVALID_URI);\n\t\t}\n\t}\n\treturn propertyValue;\n}\n\nfunction normalizeConfiguration(configuration) {\n\tconfiguration = configuration || {};\n\tconst { CompressionStreamZlib, DecompressionStreamZlib } = configuration;\n\tif (CompressionStreamZlib === UNDEFINED_VALUE && DecompressionStreamZlib === UNDEFINED_VALUE) {\n\t\treturn configuration;\n\t}\n\tconst normalizedConfiguration = Object.assign({}, configuration);\n\tif (normalizedConfiguration.CompressionStreamFallback === UNDEFINED_VALUE) {\n\t\tnormalizedConfiguration.CompressionStreamFallback = CompressionStreamZlib;\n\t}\n\tif (normalizedConfiguration.DecompressionStreamFallback === UNDEFINED_VALUE) {\n\t\tnormalizedConfiguration.DecompressionStreamFallback = DecompressionStreamZlib;\n\t}\n\treturn normalizedConfiguration;\n}\n\nfunction setDefaultConfiguration(configuration) {\n\tconst checkedConfiguration = checkConfiguration(normalizeConfiguration(configuration));\n\tObject.assign(DEFAULT_CONFIGURATION, checkedConfiguration);\n\tObject.assign(config, checkedConfiguration);\n}\n\nfunction resetConfiguration() {\n\tfor (const propertyName of CONFIGURABLE_PROPERTY_NAMES) {\n\t\tdelete config[propertyName];\n\t}\n\tObject.assign(config, DEFAULT_CONFIGURATION);\n}\n","/*\n Copyright (c) 2026 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\nexport {\n\tconcat,\n\ttoExactUint8Array,\n\tgetDataView\n};\n\nfunction concat(first, second) {\n\tconst result = new Uint8Array(first.length + second.length);\n\tresult.set(first);\n\tresult.set(second, first.length);\n\treturn result;\n}\n\nfunction toExactUint8Array(array) {\n\treturn array.byteOffset || array.byteLength != array.buffer.byteLength ? new Uint8Array(array) : array;\n}\n\nfunction getDataView(array) {\n\treturn new DataView(array.buffer, array.byteOffset, array.byteLength);\n}\n","/*\n Copyright (c) 2026 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\nexport {\n\tisErrorObject\n};\n\nfunction isErrorObject(error) {\n\treturn Boolean(error) && typeof error == \"object\";\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// Slicing-by-8 CRC-32 (Intel / zlib). The eight 256-entry tables let the inner loop\n// consume 8 bytes per iteration with a shorter dependency chain, ~4x the byte-at-a-time\n// rate (measured ~320 -> ~1400 MB/s on 64KB chunks).\n//\n// Every table MUST stay a PACKED_SMI array: build with array literals (not `new Array(n)`,\n// which is HOLEY) and store the signed int32 XOR result (no `>>> 0`). An unsigned or holey\n// table becomes a V8 FixedDoubleArray whose every hot-loop lookup unboxes a double (~1.6x\n// slower). Signedness is irrelevant to the result: the reads mask/shift it and the final\n// `~crc` normalizes it. Do NOT reintroduce `>>> 0` here or switch to `new Array(256)`.\nconst T = [[], [], [], [], [], [], [], []];\nfor (let n = 0; n < 256; n++) {\n\tlet t = n;\n\tfor (let j = 0; j < 8; j++) {\n\t\tt = (t & 1) ? (t >>> 1) ^ 0xEDB88320 : t >>> 1;\n\t}\n\tT[0][n] = t;\n}\nfor (let n = 0; n < 256; n++) {\n\tfor (let k = 1; k < 8; k++) {\n\t\tconst previous = T[k - 1][n];\n\t\tT[k][n] = (previous >>> 8) ^ T[0][previous & 0xFF];\n\t}\n}\nconst [T0, T1, T2, T3, T4, T5, T6, T7] = T;\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\tconst length = data.length | 0;\n\t\tlet offset = 0;\n\t\t// Process 8 bytes per iteration over the typed-array body. DataView.getInt32(le)\n\t\t// reads an unaligned little-endian word as a signed int32 (no double boxing), so no\n\t\t// alignment or endianness handling is needed; data.buffer guards non-typed inputs.\n\t\tif (length >= 8 && data.buffer) {\n\t\t\tconst view = new DataView(data.buffer, data.byteOffset, length);\n\t\t\tconst end = length - 8;\n\t\t\tfor (; offset <= end; offset += 8) {\n\t\t\t\tconst a = crc ^ view.getInt32(offset, true);\n\t\t\t\tconst b = view.getInt32(offset + 4, true);\n\t\t\t\tcrc = T7[a & 0xFF] ^ T6[(a >>> 8) & 0xFF] ^ T5[(a >>> 16) & 0xFF] ^ T4[(a >>> 24) & 0xFF] ^\n\t\t\t\t\tT3[b & 0xFF] ^ T2[(b >>> 8) & 0xFF] ^ T1[(b >>> 16) & 0xFF] ^ T0[(b >>> 24) & 0xFF];\n\t\t\t}\n\t\t}\n\t\t// Remaining tail (and non-typed inputs) byte-at-a-time with the base table.\n\t\tfor (; offset < length; offset++) {\n\t\t\tcrc = (crc >>> 8) ^ T0[(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\t// deno-lint-ignore prefer-const\n\t\tlet stream;\n\t\tconst crc32 = new Crc32();\n\t\tsuper({\n\t\t\ttransform(chunk, controller) {\n\t\t\t\tcrc32.append(chunk);\n\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t},\n\t\t\tflush() {\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\tstream.value = value;\n\t\t\t}\n\t\t});\n\t\tstream = this;\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\nimport { UNDEFINED_TYPE } from \"../constants.js\";\n\nexport {\n\tencodeText\n};\n\nfunction encodeText(value) {\n\t// deno-lint-ignore valid-typeof\n\tif (typeof TextEncoder == UNDEFINED_TYPE) {\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) 2026 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 BLOCK_LENGTH = 16;\nconst ROUND_KEYS_LENGTH = 60;\nconst SHA1_BLOCK_LENGTH = 64;\nconst SHA1_DIGEST_LENGTH = 20;\nconst SHA1_SCHEDULE_LENGTH = 16;\nconst SHA1_LENGTH_OFFSET = 56;\nconst SHA1_PADDING = new Uint8Array([0x80]);\nconst SHA1_ZERO = new Uint8Array(1);\nconst SHA1_INITIAL_STATE = new Int32Array([0x67452301, 0xEFCDAB89, 0x98BADCFE, 0x10325476, 0xC3D2E1F0]);\nconst HMAC_INNER_PADDING = 0x36;\nconst HMAC_OUTER_PADDING = 0x5c;\nconst S_BOX = new Uint8Array(256);\nconst T0 = new Int32Array(256);\nconst T1 = new Int32Array(256);\nconst T2 = new Int32Array(256);\nconst T3 = new Int32Array(256);\n\nlet tablesInitialized = false;\n\nexport {\n\tcreateEngine,\n\tpbkdf2\n};\n\nfunction createEngine(key, authenticationKey) {\n\tinitTables();\n\tconst roundKeys = new Int32Array(ROUND_KEYS_LENGTH);\n\tconst rounds = expandKey(key, roundKeys);\n\tconst keystream = new Int32Array(BLOCK_LENGTH / 4);\n\tconst hmac = createHmac(authenticationKey);\n\tlet counter0 = 0;\n\tlet counter1 = 0;\n\tlet counter2 = 0;\n\tlet counter3 = 0;\n\treturn {\n\t\tprocess(data, decrypt) {\n\t\t\tif (decrypt) {\n\t\t\t\thmac.update(data, 0, data.length);\n\t\t\t}\n\t\t\tencrypt(data);\n\t\t\tif (!decrypt) {\n\t\t\t\thmac.update(data, 0, data.length);\n\t\t\t}\n\t\t},\n\t\tdigest() {\n\t\t\treturn hmac.digest();\n\t\t}\n\t};\n\n\tfunction encrypt(data) {\n\t\tconst view = new DataView(data.buffer, data.byteOffset, data.byteLength);\n\t\tconst length = data.length;\n\t\tlet offset = 0;\n\t\tfor (; offset + BLOCK_LENGTH <= length; offset += BLOCK_LENGTH) {\n\t\t\tnextKeystream();\n\t\t\tview.setInt32(offset, view.getInt32(offset) ^ keystream[0]);\n\t\t\tview.setInt32(offset + 4, view.getInt32(offset + 4) ^ keystream[1]);\n\t\t\tview.setInt32(offset + 8, view.getInt32(offset + 8) ^ keystream[2]);\n\t\t\tview.setInt32(offset + 12, view.getInt32(offset + 12) ^ keystream[3]);\n\t\t}\n\t\tif (offset < length) {\n\t\t\tnextKeystream();\n\t\t\tfor (let indexByte = 0; offset < length; offset++, indexByte++) {\n\t\t\t\tdata[offset] ^= keystream[indexByte >> 2] >>> (24 - 8 * (indexByte & 3));\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction nextKeystream() {\n\t\tcounter0 = (counter0 + 1) | 0;\n\t\tif (!counter0) {\n\t\t\tcounter1 = (counter1 + 1) | 0;\n\t\t\tif (!counter1) {\n\t\t\t\tcounter2 = (counter2 + 1) | 0;\n\t\t\t\tif (!counter2) {\n\t\t\t\t\tcounter3 = (counter3 + 1) | 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tlet s0 = swapBytes(counter0) ^ roundKeys[0];\n\t\tlet s1 = swapBytes(counter1) ^ roundKeys[1];\n\t\tlet s2 = swapBytes(counter2) ^ roundKeys[2];\n\t\tlet s3 = swapBytes(counter3) ^ roundKeys[3];\n\t\tlet t0 = T0[s0 >>> 24] ^ T1[(s1 >>> 16) & 255] ^ T2[(s2 >>> 8) & 255] ^ T3[s3 & 255] ^ roundKeys[4];\n\t\tlet t1 = T0[s1 >>> 24] ^ T1[(s2 >>> 16) & 255] ^ T2[(s3 >>> 8) & 255] ^ T3[s0 & 255] ^ roundKeys[5];\n\t\tlet t2 = T0[s2 >>> 24] ^ T1[(s3 >>> 16) & 255] ^ T2[(s0 >>> 8) & 255] ^ T3[s1 & 255] ^ roundKeys[6];\n\t\tlet t3 = T0[s3 >>> 24] ^ T1[(s0 >>> 16) & 255] ^ T2[(s1 >>> 8) & 255] ^ T3[s2 & 255] ^ roundKeys[7];\n\t\ts0 = T0[t0 >>> 24] ^ T1[(t1 >>> 16) & 255] ^ T2[(t2 >>> 8) & 255] ^ T3[t3 & 255] ^ roundKeys[8];\n\t\ts1 = T0[t1 >>> 24] ^ T1[(t2 >>> 16) & 255] ^ T2[(t3 >>> 8) & 255] ^ T3[t0 & 255] ^ roundKeys[9];\n\t\ts2 = T0[t2 >>> 24] ^ T1[(t3 >>> 16) & 255] ^ T2[(t0 >>> 8) & 255] ^ T3[t1 & 255] ^ roundKeys[10];\n\t\ts3 = T0[t3 >>> 24] ^ T1[(t0 >>> 16) & 255] ^ T2[(t1 >>> 8) & 255] ^ T3[t2 & 255] ^ roundKeys[11];\n\t\tt0 = T0[s0 >>> 24] ^ T1[(s1 >>> 16) & 255] ^ T2[(s2 >>> 8) & 255] ^ T3[s3 & 255] ^ roundKeys[12];\n\t\tt1 = T0[s1 >>> 24] ^ T1[(s2 >>> 16) & 255] ^ T2[(s3 >>> 8) & 255] ^ T3[s0 & 255] ^ roundKeys[13];\n\t\tt2 = T0[s2 >>> 24] ^ T1[(s3 >>> 16) & 255] ^ T2[(s0 >>> 8) & 255] ^ T3[s1 & 255] ^ roundKeys[14];\n\t\tt3 = T0[s3 >>> 24] ^ T1[(s0 >>> 16) & 255] ^ T2[(s1 >>> 8) & 255] ^ T3[s2 & 255] ^ roundKeys[15];\n\t\ts0 = T0[t0 >>> 24] ^ T1[(t1 >>> 16) & 255] ^ T2[(t2 >>> 8) & 255] ^ T3[t3 & 255] ^ roundKeys[16];\n\t\ts1 = T0[t1 >>> 24] ^ T1[(t2 >>> 16) & 255] ^ T2[(t3 >>> 8) & 255] ^ T3[t0 & 255] ^ roundKeys[17];\n\t\ts2 = T0[t2 >>> 24] ^ T1[(t3 >>> 16) & 255] ^ T2[(t0 >>> 8) & 255] ^ T3[t1 & 255] ^ roundKeys[18];\n\t\ts3 = T0[t3 >>> 24] ^ T1[(t0 >>> 16) & 255] ^ T2[(t1 >>> 8) & 255] ^ T3[t2 & 255] ^ roundKeys[19];\n\t\tt0 = T0[s0 >>> 24] ^ T1[(s1 >>> 16) & 255] ^ T2[(s2 >>> 8) & 255] ^ T3[s3 & 255] ^ roundKeys[20];\n\t\tt1 = T0[s1 >>> 24] ^ T1[(s2 >>> 16) & 255] ^ T2[(s3 >>> 8) & 255] ^ T3[s0 & 255] ^ roundKeys[21];\n\t\tt2 = T0[s2 >>> 24] ^ T1[(s3 >>> 16) & 255] ^ T2[(s0 >>> 8) & 255] ^ T3[s1 & 255] ^ roundKeys[22];\n\t\tt3 = T0[s3 >>> 24] ^ T1[(s0 >>> 16) & 255] ^ T2[(s1 >>> 8) & 255] ^ T3[s2 & 255] ^ roundKeys[23];\n\t\ts0 = T0[t0 >>> 24] ^ T1[(t1 >>> 16) & 255] ^ T2[(t2 >>> 8) & 255] ^ T3[t3 & 255] ^ roundKeys[24];\n\t\ts1 = T0[t1 >>> 24] ^ T1[(t2 >>> 16) & 255] ^ T2[(t3 >>> 8) & 255] ^ T3[t0 & 255] ^ roundKeys[25];\n\t\ts2 = T0[t2 >>> 24] ^ T1[(t3 >>> 16) & 255] ^ T2[(t0 >>> 8) & 255] ^ T3[t1 & 255] ^ roundKeys[26];\n\t\ts3 = T0[t3 >>> 24] ^ T1[(t0 >>> 16) & 255] ^ T2[(t1 >>> 8) & 255] ^ T3[t2 & 255] ^ roundKeys[27];\n\t\tt0 = T0[s0 >>> 24] ^ T1[(s1 >>> 16) & 255] ^ T2[(s2 >>> 8) & 255] ^ T3[s3 & 255] ^ roundKeys[28];\n\t\tt1 = T0[s1 >>> 24] ^ T1[(s2 >>> 16) & 255] ^ T2[(s3 >>> 8) & 255] ^ T3[s0 & 255] ^ roundKeys[29];\n\t\tt2 = T0[s2 >>> 24] ^ T1[(s3 >>> 16) & 255] ^ T2[(s0 >>> 8) & 255] ^ T3[s1 & 255] ^ roundKeys[30];\n\t\tt3 = T0[s3 >>> 24] ^ T1[(s0 >>> 16) & 255] ^ T2[(s1 >>> 8) & 255] ^ T3[s2 & 255] ^ roundKeys[31];\n\t\ts0 = T0[t0 >>> 24] ^ T1[(t1 >>> 16) & 255] ^ T2[(t2 >>> 8) & 255] ^ T3[t3 & 255] ^ roundKeys[32];\n\t\ts1 = T0[t1 >>> 24] ^ T1[(t2 >>> 16) & 255] ^ T2[(t3 >>> 8) & 255] ^ T3[t0 & 255] ^ roundKeys[33];\n\t\ts2 = T0[t2 >>> 24] ^ T1[(t3 >>> 16) & 255] ^ T2[(t0 >>> 8) & 255] ^ T3[t1 & 255] ^ roundKeys[34];\n\t\ts3 = T0[t3 >>> 24] ^ T1[(t0 >>> 16) & 255] ^ T2[(t1 >>> 8) & 255] ^ T3[t2 & 255] ^ roundKeys[35];\n\t\tt0 = T0[s0 >>> 24] ^ T1[(s1 >>> 16) & 255] ^ T2[(s2 >>> 8) & 255] ^ T3[s3 & 255] ^ roundKeys[36];\n\t\tt1 = T0[s1 >>> 24] ^ T1[(s2 >>> 16) & 255] ^ T2[(s3 >>> 8) & 255] ^ T3[s0 & 255] ^ roundKeys[37];\n\t\tt2 = T0[s2 >>> 24] ^ T1[(s3 >>> 16) & 255] ^ T2[(s0 >>> 8) & 255] ^ T3[s1 & 255] ^ roundKeys[38];\n\t\tt3 = T0[s3 >>> 24] ^ T1[(s0 >>> 16) & 255] ^ T2[(s1 >>> 8) & 255] ^ T3[s2 & 255] ^ roundKeys[39];\n\t\tlet indexKey = 40;\n\t\tif (rounds > 10) {\n\t\t\ts0 = T0[t0 >>> 24] ^ T1[(t1 >>> 16) & 255] ^ T2[(t2 >>> 8) & 255] ^ T3[t3 & 255] ^ roundKeys[40];\n\t\t\ts1 = T0[t1 >>> 24] ^ T1[(t2 >>> 16) & 255] ^ T2[(t3 >>> 8) & 255] ^ T3[t0 & 255] ^ roundKeys[41];\n\t\t\ts2 = T0[t2 >>> 24] ^ T1[(t3 >>> 16) & 255] ^ T2[(t0 >>> 8) & 255] ^ T3[t1 & 255] ^ roundKeys[42];\n\t\t\ts3 = T0[t3 >>> 24] ^ T1[(t0 >>> 16) & 255] ^ T2[(t1 >>> 8) & 255] ^ T3[t2 & 255] ^ roundKeys[43];\n\t\t\tt0 = T0[s0 >>> 24] ^ T1[(s1 >>> 16) & 255] ^ T2[(s2 >>> 8) & 255] ^ T3[s3 & 255] ^ roundKeys[44];\n\t\t\tt1 = T0[s1 >>> 24] ^ T1[(s2 >>> 16) & 255] ^ T2[(s3 >>> 8) & 255] ^ T3[s0 & 255] ^ roundKeys[45];\n\t\t\tt2 = T0[s2 >>> 24] ^ T1[(s3 >>> 16) & 255] ^ T2[(s0 >>> 8) & 255] ^ T3[s1 & 255] ^ roundKeys[46];\n\t\t\tt3 = T0[s3 >>> 24] ^ T1[(s0 >>> 16) & 255] ^ T2[(s1 >>> 8) & 255] ^ T3[s2 & 255] ^ roundKeys[47];\n\t\t\tindexKey = 48;\n\t\t}\n\t\tif (rounds > 12) {\n\t\t\ts0 = T0[t0 >>> 24] ^ T1[(t1 >>> 16) & 255] ^ T2[(t2 >>> 8) & 255] ^ T3[t3 & 255] ^ roundKeys[48];\n\t\t\ts1 = T0[t1 >>> 24] ^ T1[(t2 >>> 16) & 255] ^ T2[(t3 >>> 8) & 255] ^ T3[t0 & 255] ^ roundKeys[49];\n\t\t\ts2 = T0[t2 >>> 24] ^ T1[(t3 >>> 16) & 255] ^ T2[(t0 >>> 8) & 255] ^ T3[t1 & 255] ^ roundKeys[50];\n\t\t\ts3 = T0[t3 >>> 24] ^ T1[(t0 >>> 16) & 255] ^ T2[(t1 >>> 8) & 255] ^ T3[t2 & 255] ^ roundKeys[51];\n\t\t\tt0 = T0[s0 >>> 24] ^ T1[(s1 >>> 16) & 255] ^ T2[(s2 >>> 8) & 255] ^ T3[s3 & 255] ^ roundKeys[52];\n\t\t\tt1 = T0[s1 >>> 24] ^ T1[(s2 >>> 16) & 255] ^ T2[(s3 >>> 8) & 255] ^ T3[s0 & 255] ^ roundKeys[53];\n\t\t\tt2 = T0[s2 >>> 24] ^ T1[(s3 >>> 16) & 255] ^ T2[(s0 >>> 8) & 255] ^ T3[s1 & 255] ^ roundKeys[54];\n\t\t\tt3 = T0[s3 >>> 24] ^ T1[(s0 >>> 16) & 255] ^ T2[(s1 >>> 8) & 255] ^ T3[s2 & 255] ^ roundKeys[55];\n\t\t\tindexKey = 56;\n\t\t}\n\t\tkeystream[0] = ((S_BOX[t0 >>> 24] << 24) | (S_BOX[(t1 >>> 16) & 255] << 16) | (S_BOX[(t2 >>> 8) & 255] << 8) | S_BOX[t3 & 255]) ^ roundKeys[indexKey];\n\t\tkeystream[1] = ((S_BOX[t1 >>> 24] << 24) | (S_BOX[(t2 >>> 16) & 255] << 16) | (S_BOX[(t3 >>> 8) & 255] << 8) | S_BOX[t0 & 255]) ^ roundKeys[indexKey + 1];\n\t\tkeystream[2] = ((S_BOX[t2 >>> 24] << 24) | (S_BOX[(t3 >>> 16) & 255] << 16) | (S_BOX[(t0 >>> 8) & 255] << 8) | S_BOX[t1 & 255]) ^ roundKeys[indexKey + 2];\n\t\tkeystream[3] = ((S_BOX[t3 >>> 24] << 24) | (S_BOX[(t0 >>> 16) & 255] << 16) | (S_BOX[(t1 >>> 8) & 255] << 8) | S_BOX[t2 & 255]) ^ roundKeys[indexKey + 3];\n\t}\n}\n\nfunction pbkdf2(password, salt, iterations, length) {\n\tconst hmac = createHmac(password);\n\tconst result = new Uint8Array(length);\n\tconst block = new Uint8Array(salt.length + 4);\n\tconst blockView = new DataView(block.buffer);\n\tblock.set(salt);\n\tfor (let indexBlock = 1, offset = 0; offset < length; indexBlock++, offset += SHA1_DIGEST_LENGTH) {\n\t\tblockView.setUint32(salt.length, indexBlock);\n\t\thmac.update(block, 0, block.length);\n\t\tlet previous = hmac.digest();\n\t\tconst output = previous.slice();\n\t\tfor (let iteration = 1; iteration < iterations; iteration++) {\n\t\t\thmac.update(previous, 0, SHA1_DIGEST_LENGTH);\n\t\t\tprevious = hmac.digest();\n\t\t\tfor (let indexByte = 0; indexByte < SHA1_DIGEST_LENGTH; indexByte++) {\n\t\t\t\toutput[indexByte] ^= previous[indexByte];\n\t\t\t}\n\t\t}\n\t\tresult.set(output.subarray(0, Math.min(SHA1_DIGEST_LENGTH, length - offset)), offset);\n\t}\n\treturn result;\n}\n\nfunction createHmac(key) {\n\tconst sha1 = createSha1();\n\tconst innerKey = new Uint8Array(SHA1_BLOCK_LENGTH);\n\tconst outerKey = new Uint8Array(SHA1_BLOCK_LENGTH);\n\tif (key.length > SHA1_BLOCK_LENGTH) {\n\t\tsha1.update(key, 0, key.length);\n\t\tkey = sha1.digest();\n\t}\n\tfor (let indexByte = 0; indexByte < SHA1_BLOCK_LENGTH; indexByte++) {\n\t\tconst keyByte = indexByte < key.length ? key[indexByte] : 0;\n\t\tinnerKey[indexByte] = keyByte ^ HMAC_INNER_PADDING;\n\t\touterKey[indexByte] = keyByte ^ HMAC_OUTER_PADDING;\n\t}\n\tsha1.update(innerKey, 0, SHA1_BLOCK_LENGTH);\n\treturn {\n\t\tupdate(data, offset, length) {\n\t\t\tsha1.update(data, offset, length);\n\t\t},\n\t\tdigest() {\n\t\t\tconst innerDigest = sha1.digest();\n\t\t\tsha1.update(outerKey, 0, SHA1_BLOCK_LENGTH);\n\t\t\tsha1.update(innerDigest, 0, SHA1_DIGEST_LENGTH);\n\t\t\tconst result = sha1.digest();\n\t\t\tsha1.update(innerKey, 0, SHA1_BLOCK_LENGTH);\n\t\t\treturn result;\n\t\t}\n\t};\n}\n\nfunction createSha1() {\n\tconst state = new Int32Array(SHA1_INITIAL_STATE);\n\tconst schedule = new Int32Array(SHA1_SCHEDULE_LENGTH);\n\tconst block = new Uint8Array(SHA1_BLOCK_LENGTH);\n\tconst blockView = new DataView(block.buffer);\n\tconst lengthBytes = new Uint8Array(8);\n\tlet blockLength = 0;\n\tlet totalLength = 0;\n\treturn {\n\t\tupdate,\n\t\tdigest\n\t};\n\n\tfunction update(data, offset, length) {\n\t\tconst end = offset + length;\n\t\ttotalLength += length;\n\t\tif (blockLength) {\n\t\t\twhile (offset < end && blockLength < SHA1_BLOCK_LENGTH) {\n\t\t\t\tblock[blockLength++] = data[offset++];\n\t\t\t}\n\t\t\tif (blockLength == SHA1_BLOCK_LENGTH) {\n\t\t\t\tcompress(blockView, 0);\n\t\t\t\tblockLength = 0;\n\t\t\t}\n\t\t}\n\t\tif (offset + SHA1_BLOCK_LENGTH <= end) {\n\t\t\tconst view = new DataView(data.buffer, data.byteOffset, data.byteLength);\n\t\t\tfor (; offset + SHA1_BLOCK_LENGTH <= end; offset += SHA1_BLOCK_LENGTH) {\n\t\t\t\tcompress(view, offset);\n\t\t\t}\n\t\t}\n\t\twhile (offset < end) {\n\t\t\tblock[blockLength++] = data[offset++];\n\t\t}\n\t}\n\n\tfunction digest() {\n\t\tconst bits = totalLength * 8;\n\t\tconst high = Math.floor(bits / 0x100000000);\n\t\tconst low = bits >>> 0;\n\t\tupdate(SHA1_PADDING, 0, 1);\n\t\twhile (blockLength != SHA1_LENGTH_OFFSET) {\n\t\t\tupdate(SHA1_ZERO, 0, 1);\n\t\t}\n\t\tlengthBytes[0] = high >>> 24;\n\t\tlengthBytes[1] = high >>> 16;\n\t\tlengthBytes[2] = high >>> 8;\n\t\tlengthBytes[3] = high;\n\t\tlengthBytes[4] = low >>> 24;\n\t\tlengthBytes[5] = low >>> 16;\n\t\tlengthBytes[6] = low >>> 8;\n\t\tlengthBytes[7] = low;\n\t\tupdate(lengthBytes, 0, 8);\n\t\tconst result = new Uint8Array(SHA1_DIGEST_LENGTH);\n\t\tconst resultView = new DataView(result.buffer);\n\t\tfor (let indexWord = 0; indexWord < state.length; indexWord++) {\n\t\t\tresultView.setInt32(4 * indexWord, state[indexWord]);\n\t\t}\n\t\tstate.set(SHA1_INITIAL_STATE);\n\t\tblockLength = 0;\n\t\ttotalLength = 0;\n\t\treturn result;\n\t}\n\n\tfunction compress(view, offset) {\n\t\tfor (let index = 0; index < 16; index++) {\n\t\t\tschedule[index] = view.getInt32(offset + 4 * index);\n\t\t}\n\t\tlet a = state[0];\n\t\tlet b = state[1];\n\t\tlet c = state[2];\n\t\tlet d = state[3];\n\t\tlet e = state[4];\n\t\tlet t;\n\t\tfor (let index = 0; index < 15; index += 5) {\n\t\t\te = (((a << 5) | (a >>> 27)) + (((c ^ d) & b) ^ d) + e + 0x5A827999 + schedule[index]) | 0;\n\t\t\tb = (b << 30) | (b >>> 2);\n\t\t\td = (((e << 5) | (e >>> 27)) + (((b ^ c) & a) ^ c) + d + 0x5A827999 + schedule[index + 1]) | 0;\n\t\t\ta = (a << 30) | (a >>> 2);\n\t\t\tc = (((d << 5) | (d >>> 27)) + (((a ^ b) & e) ^ b) + c + 0x5A827999 + schedule[index + 2]) | 0;\n\t\t\te = (e << 30) | (e >>> 2);\n\t\t\tb = (((c << 5) | (c >>> 27)) + (((e ^ a) & d) ^ a) + b + 0x5A827999 + schedule[index + 3]) | 0;\n\t\t\td = (d << 30) | (d >>> 2);\n\t\t\ta = (((b << 5) | (b >>> 27)) + (((d ^ e) & c) ^ e) + a + 0x5A827999 + schedule[index + 4]) | 0;\n\t\t\tc = (c << 30) | (c >>> 2);\n\t\t}\n\t\te = (((a << 5) | (a >>> 27)) + (((c ^ d) & b) ^ d) + e + 0x5A827999 + schedule[15]) | 0;\n\t\tb = (b << 30) | (b >>> 2);\n\t\tt = schedule[13] ^ schedule[8] ^ schedule[2] ^ schedule[0];\n\t\tt = (t << 1) | (t >>> 31);\n\t\tschedule[0] = t;\n\t\td = (((e << 5) | (e >>> 27)) + (((b ^ c) & a) ^ c) + d + 0x5A827999 + t) | 0;\n\t\ta = (a << 30) | (a >>> 2);\n\t\tt = schedule[14] ^ schedule[9] ^ schedule[3] ^ schedule[1];\n\t\tt = (t << 1) | (t >>> 31);\n\t\tschedule[1] = t;\n\t\tc = (((d << 5) | (d >>> 27)) + (((a ^ b) & e) ^ b) + c + 0x5A827999 + t) | 0;\n\t\te = (e << 30) | (e >>> 2);\n\t\tt = schedule[15] ^ schedule[10] ^ schedule[4] ^ schedule[2];\n\t\tt = (t << 1) | (t >>> 31);\n\t\tschedule[2] = t;\n\t\tb = (((c << 5) | (c >>> 27)) + (((e ^ a) & d) ^ a) + b + 0x5A827999 + t) | 0;\n\t\td = (d << 30) | (d >>> 2);\n\t\tt = schedule[0] ^ schedule[11] ^ schedule[5] ^ schedule[3];\n\t\tt = (t << 1) | (t >>> 31);\n\t\tschedule[3] = t;\n\t\ta = (((b << 5) | (b >>> 27)) + (((d ^ e) & c) ^ e) + a + 0x5A827999 + t) | 0;\n\t\tc = (c << 30) | (c >>> 2);\n\t\tfor (let index = 20; index < 40; index += 5) {\n\t\t\tt = schedule[(index - 3) & 15] ^ schedule[(index - 8) & 15] ^ schedule[(index - 14) & 15] ^ schedule[(index) & 15];\n\t\t\tt = (t << 1) | (t >>> 31);\n\t\t\tschedule[(index) & 15] = t;\n\t\t\te = (((a << 5) | (a >>> 27)) + (b ^ c ^ d) + e + 0x6ED9EBA1 + t) | 0;\n\t\t\tb = (b << 30) | (b >>> 2);\n\t\t\tt = schedule[(index - 2) & 15] ^ schedule[(index - 7) & 15] ^ schedule[(index - 13) & 15] ^ schedule[(index + 1) & 15];\n\t\t\tt = (t << 1) | (t >>> 31);\n\t\t\tschedule[(index + 1) & 15] = t;\n\t\t\td = (((e << 5) | (e >>> 27)) + (a ^ b ^ c) + d + 0x6ED9EBA1 + t) | 0;\n\t\t\ta = (a << 30) | (a >>> 2);\n\t\t\tt = schedule[(index - 1) & 15] ^ schedule[(index - 6) & 15] ^ schedule[(index - 12) & 15] ^ schedule[(index + 2) & 15];\n\t\t\tt = (t << 1) | (t >>> 31);\n\t\t\tschedule[(index + 2) & 15] = t;\n\t\t\tc = (((d << 5) | (d >>> 27)) + (e ^ a ^ b) + c + 0x6ED9EBA1 + t) | 0;\n\t\t\te = (e << 30) | (e >>> 2);\n\t\t\tt = schedule[(index) & 15] ^ schedule[(index - 5) & 15] ^ schedule[(index - 11) & 15] ^ schedule[(index + 3) & 15];\n\t\t\tt = (t << 1) | (t >>> 31);\n\t\t\tschedule[(index + 3) & 15] = t;\n\t\t\tb = (((c << 5) | (c >>> 27)) + (d ^ e ^ a) + b + 0x6ED9EBA1 + t) | 0;\n\t\t\td = (d << 30) | (d >>> 2);\n\t\t\tt = schedule[(index + 1) & 15] ^ schedule[(index - 4) & 15] ^ schedule[(index - 10) & 15] ^ schedule[(index + 4) & 15];\n\t\t\tt = (t << 1) | (t >>> 31);\n\t\t\tschedule[(index + 4) & 15] = t;\n\t\t\ta = (((b << 5) | (b >>> 27)) + (c ^ d ^ e) + a + 0x6ED9EBA1 + t) | 0;\n\t\t\tc = (c << 30) | (c >>> 2);\n\t\t}\n\t\tfor (let index = 40; index < 60; index += 5) {\n\t\t\tt = schedule[(index - 3) & 15] ^ schedule[(index - 8) & 15] ^ schedule[(index - 14) & 15] ^ schedule[(index) & 15];\n\t\t\tt = (t << 1) | (t >>> 31);\n\t\t\tschedule[(index) & 15] = t;\n\t\t\te = (((a << 5) | (a >>> 27)) + ((b & c) | ((b | c) & d)) + e + 0x8F1BBCDC + t) | 0;\n\t\t\tb = (b << 30) | (b >>> 2);\n\t\t\tt = schedule[(index - 2) & 15] ^ schedule[(index - 7) & 15] ^ schedule[(index - 13) & 15] ^ schedule[(index + 1) & 15];\n\t\t\tt = (t << 1) | (t >>> 31);\n\t\t\tschedule[(index + 1) & 15] = t;\n\t\t\td = (((e << 5) | (e >>> 27)) + ((a & b) | ((a | b) & c)) + d + 0x8F1BBCDC + t) | 0;\n\t\t\ta = (a << 30) | (a >>> 2);\n\t\t\tt = schedule[(index - 1) & 15] ^ schedule[(index - 6) & 15] ^ schedule[(index - 12) & 15] ^ schedule[(index + 2) & 15];\n\t\t\tt = (t << 1) | (t >>> 31);\n\t\t\tschedule[(index + 2) & 15] = t;\n\t\t\tc = (((d << 5) | (d >>> 27)) + ((e & a) | ((e | a) & b)) + c + 0x8F1BBCDC + t) | 0;\n\t\t\te = (e << 30) | (e >>> 2);\n\t\t\tt = schedule[(index) & 15] ^ schedule[(index - 5) & 15] ^ schedule[(index - 11) & 15] ^ schedule[(index + 3) & 15];\n\t\t\tt = (t << 1) | (t >>> 31);\n\t\t\tschedule[(index + 3) & 15] = t;\n\t\t\tb = (((c << 5) | (c >>> 27)) + ((d & e) | ((d | e) & a)) + b + 0x8F1BBCDC + t) | 0;\n\t\t\td = (d << 30) | (d >>> 2);\n\t\t\tt = schedule[(index + 1) & 15] ^ schedule[(index - 4) & 15] ^ schedule[(index - 10) & 15] ^ schedule[(index + 4) & 15];\n\t\t\tt = (t << 1) | (t >>> 31);\n\t\t\tschedule[(index + 4) & 15] = t;\n\t\t\ta = (((b << 5) | (b >>> 27)) + ((c & d) | ((c | d) & e)) + a + 0x8F1BBCDC + t) | 0;\n\t\t\tc = (c << 30) | (c >>> 2);\n\t\t}\n\t\tfor (let index = 60; index < 80; index += 5) {\n\t\t\tt = schedule[(index - 3) & 15] ^ schedule[(index - 8) & 15] ^ schedule[(index - 14) & 15] ^ schedule[(index) & 15];\n\t\t\tt = (t << 1) | (t >>> 31);\n\t\t\tschedule[(index) & 15] = t;\n\t\t\te = (((a << 5) | (a >>> 27)) + (b ^ c ^ d) + e + 0xCA62C1D6 + t) | 0;\n\t\t\tb = (b << 30) | (b >>> 2);\n\t\t\tt = schedule[(index - 2) & 15] ^ schedule[(index - 7) & 15] ^ schedule[(index - 13) & 15] ^ schedule[(index + 1) & 15];\n\t\t\tt = (t << 1) | (t >>> 31);\n\t\t\tschedule[(index + 1) & 15] = t;\n\t\t\td = (((e << 5) | (e >>> 27)) + (a ^ b ^ c) + d + 0xCA62C1D6 + t) | 0;\n\t\t\ta = (a << 30) | (a >>> 2);\n\t\t\tt = schedule[(index - 1) & 15] ^ schedule[(index - 6) & 15] ^ schedule[(index - 12) & 15] ^ schedule[(index + 2) & 15];\n\t\t\tt = (t << 1) | (t >>> 31);\n\t\t\tschedule[(index + 2) & 15] = t;\n\t\t\tc = (((d << 5) | (d >>> 27)) + (e ^ a ^ b) + c + 0xCA62C1D6 + t) | 0;\n\t\t\te = (e << 30) | (e >>> 2);\n\t\t\tt = schedule[(index) & 15] ^ schedule[(index - 5) & 15] ^ schedule[(index - 11) & 15] ^ schedule[(index + 3) & 15];\n\t\t\tt = (t << 1) | (t >>> 31);\n\t\t\tschedule[(index + 3) & 15] = t;\n\t\t\tb = (((c << 5) | (c >>> 27)) + (d ^ e ^ a) + b + 0xCA62C1D6 + t) | 0;\n\t\t\td = (d << 30) | (d >>> 2);\n\t\t\tt = schedule[(index + 1) & 15] ^ schedule[(index - 4) & 15] ^ schedule[(index - 10) & 15] ^ schedule[(index + 4) & 15];\n\t\t\tt = (t << 1) | (t >>> 31);\n\t\t\tschedule[(index + 4) & 15] = t;\n\t\t\ta = (((b << 5) | (b >>> 27)) + (c ^ d ^ e) + a + 0xCA62C1D6 + t) | 0;\n\t\t\tc = (c << 30) | (c >>> 2);\n\t\t}\n\t\tstate[0] = (state[0] + a) | 0;\n\t\tstate[1] = (state[1] + b) | 0;\n\t\tstate[2] = (state[2] + c) | 0;\n\t\tstate[3] = (state[3] + d) | 0;\n\t\tstate[4] = (state[4] + e) | 0;\n\t}\n}\n\nfunction initTables() {\n\tif (!tablesInitialized) {\n\t\tlet p = 1;\n\t\tlet q = 1;\n\t\tdo {\n\t\t\tp = (p ^ (p << 1) ^ ((p & 0x80) ? 0x1b : 0)) & 255;\n\t\t\tq = (q ^ (q << 1)) & 255;\n\t\t\tq = (q ^ (q << 2)) & 255;\n\t\t\tq = (q ^ (q << 4)) & 255;\n\t\t\tif (q & 0x80) {\n\t\t\t\tq ^= 0x09;\n\t\t\t}\n\t\t\tS_BOX[p] = (q ^ ((q << 1) | (q >> 7)) ^ ((q << 2) | (q >> 6)) ^ ((q << 3) | (q >> 5)) ^ ((q << 4) | (q >> 4)) ^ 0x63) & 255;\n\t\t} while (p != 1);\n\t\tS_BOX[0] = 0x63;\n\t\tfor (let index = 0; index < 256; index++) {\n\t\t\tconst s = S_BOX[index];\n\t\t\tconst s2 = multiplyByTwo(s);\n\t\t\tconst t = (s2 << 24) | (s << 16) | (s << 8) | (s2 ^ s);\n\t\t\tT0[index] = t;\n\t\t\tT1[index] = (t >>> 8) | (t << 24);\n\t\t\tT2[index] = (t >>> 16) | (t << 16);\n\t\t\tT3[index] = (t >>> 24) | (t << 8);\n\t\t}\n\t\ttablesInitialized = true;\n\t}\n}\n\nfunction expandKey(key, roundKeys) {\n\tconst keyWords = key.length >> 2;\n\tconst rounds = keyWords + 6;\n\tconst total = 4 * (rounds + 1);\n\tlet roundConstant = 1;\n\tfor (let index = 0; index < keyWords; index++) {\n\t\troundKeys[index] = (key[4 * index] << 24) | (key[4 * index + 1] << 16) | (key[4 * index + 2] << 8) | key[4 * index + 3];\n\t}\n\tfor (let index = keyWords; index < total; index++) {\n\t\tlet word = roundKeys[index - 1];\n\t\tif (index % keyWords == 0) {\n\t\t\tword = substituteWord((word << 8) | (word >>> 24)) ^ (roundConstant << 24);\n\t\t\troundConstant = multiplyByTwo(roundConstant);\n\t\t} else if (keyWords > 6 && index % keyWords == 4) {\n\t\t\tword = substituteWord(word);\n\t\t}\n\t\troundKeys[index] = roundKeys[index - keyWords] ^ word;\n\t}\n\treturn rounds;\n}\n\nfunction substituteWord(word) {\n\treturn (S_BOX[word >>> 24] << 24) | (S_BOX[(word >>> 16) & 255] << 16) | (S_BOX[(word >>> 8) & 255] << 8) | S_BOX[word & 255];\n}\n\nfunction swapBytes(value) {\n\treturn (value << 24) | ((value & 0xff00) << 8) | ((value >>> 8) & 0xff00) | (value >>> 24);\n}\n\nfunction multiplyByTwo(value) {\n\treturn ((value << 1) ^ ((value >> 7) * 0x1b)) & 255;\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/* global crypto */\n\nimport { FUNCTION_TYPE, UNDEFINED_TYPE } from \"../constants.js\";\n\nconst GET_RANDOM_VALUES_SUPPORTED = typeof crypto != UNDEFINED_TYPE && typeof crypto.getRandomValues == FUNCTION_TYPE;\n\nconst ERR_INVALID_PASSWORD = \"Invalid password\";\nconst ERR_INVALID_AUTHENTICATION_CODE = \"Invalid authentication code\";\nconst ERR_ABORT_CHECK_PASSWORD = \"zipjs-abort-check-password\";\nconst ERR_UNSUPPORTED_CRYPTO_API = \"Crypto API not supported\";\n\nexport {\n\tgetRandomValues,\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_AUTHENTICATION_CODE,\n\tERR_ABORT_CHECK_PASSWORD,\n\tERR_UNSUPPORTED_CRYPTO_API\n};\n\nfunction getRandomValues(array) {\n\tif (GET_RANDOM_VALUES_SUPPORTED) {\n\t\treturn crypto.getRandomValues(array);\n\t} else {\n\t\tthrow new Error(ERR_UNSUPPORTED_CRYPTO_API);\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, ReadableStream */\n\nimport { UNDEFINED_VALUE, UNDEFINED_TYPE, FUNCTION_TYPE, EMPTY_UINT8_ARRAY } from \"../constants.js\";\nimport { encodeText } from \"./../util/encode-text.js\";\nimport { concat } from \"./../util/array.js\";\nimport { createEngine as createDefaultEngine, pbkdf2 } from \"./codecs/aes-hmac-sha1.js\";\nimport {\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_AUTHENTICATION_CODE,\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 PBKDF2_ITERATIONS = 1000;\nconst BASE_KEY_ALGORITHM = Object.assign({ hash: HASH_ALGORITHM }, PBKDF2_ALGORITHM);\nconst DERIVED_BITS_ALGORITHM = Object.assign({ iterations: PBKDF2_ITERATIONS, hash: { name: HASH_FUNCTION } }, PBKDF2_ALGORITHM);\nconst DERIVED_BITS_USAGE = [\"deriveBits\"];\nconst SALT_LENGTH = [8, 12, 16];\nconst KEY_LENGTH = [16, 24, 32];\nconst AUTHENTICATION_CODE_LENGTH = 10;\nconst PASSWORD_VERIFICATION_LENGTH = 2;\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;\n\nlet DERIVE_BITS_SUPPORTED = SUBTLE_API_SUPPORTED && typeof subtle.importKey == FUNCTION_TYPE && typeof subtle.deriveBits == FUNCTION_TYPE;\nlet createEngine = createDefaultEngine;\n\nclass AESDecryptionStream extends TransformStream {\n\n\tconstructor({ password, rawPassword, encryptionStrength, checkPasswordOnly, checkAuthenticationCode = true }) {\n\t\tconst aesCrypto = {};\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tinitAesCrypto(aesCrypto, password, rawPassword, encryptionStrength);\n\t\t\t},\n\t\t\tasync transform(chunk, controller) {\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] + PASSWORD_VERIFICATION_LENGTH));\n\t\t\t\t\tchunk = subarray(chunk, SALT_LENGTH[strength] + PASSWORD_VERIFICATION_LENGTH);\n\t\t\t\t\tif (checkPasswordOnly) {\n\t\t\t\t\t\tdisposeEngine(aesCrypto);\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\tif (aesCrypto.discarded) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tconst output = new Uint8Array(chunk.length - AUTHENTICATION_CODE_LENGTH - ((chunk.length - AUTHENTICATION_CODE_LENGTH) % BLOCK_LENGTH));\n\t\t\t\tcontroller.enqueue(append(aesCrypto, chunk, output, 0, AUTHENTICATION_CODE_LENGTH, true));\n\t\t\t},\n\t\t\tasync flush(controller) {\n\t\t\t\tconst {\n\t\t\t\t\tengine,\n\t\t\t\t\tpendingInput,\n\t\t\t\t\tready\n\t\t\t\t} = aesCrypto;\n\t\t\t\tif (engine) {\n\t\t\t\t\tawait ready;\n\t\t\t\t\tif (aesCrypto.discarded) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tconst originalAuthenticationCode = subarray(pendingInput, pendingInput.length - AUTHENTICATION_CODE_LENGTH);\n\t\t\t\t\tconst decryptedChunkArray = new Uint8Array(subarray(pendingInput, 0, pendingInput.length - AUTHENTICATION_CODE_LENGTH));\n\t\t\t\t\tengine.process(decryptedChunkArray, true);\n\t\t\t\t\tconst authenticationCode = engine.digest();\n\t\t\t\t\tlet invalidAuthenticationCode = pendingInput.length < AUTHENTICATION_CODE_LENGTH ? 1 : 0;\n\t\t\t\t\tfor (let indexByte = 0; indexByte < AUTHENTICATION_CODE_LENGTH; indexByte++) {\n\t\t\t\t\t\tinvalidAuthenticationCode |= authenticationCode[indexByte] ^ originalAuthenticationCode[indexByte];\n\t\t\t\t\t}\n\t\t\t\t\tif (invalidAuthenticationCode && checkAuthenticationCode) {\n\t\t\t\t\t\tcontroller.error(new Error(ERR_INVALID_AUTHENTICATION_CODE));\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tcontroller.enqueue(decryptedChunkArray);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tsetDisposingReadable(this, aesCrypto);\n\t}\n}\n\nclass AESEncryptionStream extends TransformStream {\n\n\tconstructor({ password, rawPassword, encryptionStrength }) {\n\t\tconst aesCrypto = {};\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tinitAesCrypto(aesCrypto, password, rawPassword, encryptionStrength);\n\t\t\t},\n\t\t\tasync transform(chunk, controller) {\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 = EMPTY_UINT8_ARRAY;\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\tif (aesCrypto.discarded) {\n\t\t\t\t\treturn;\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, false));\n\t\t\t},\n\t\t\tasync flush(controller) {\n\t\t\t\tconst {\n\t\t\t\t\tengine,\n\t\t\t\t\tpendingInput,\n\t\t\t\t\tready\n\t\t\t\t} = aesCrypto;\n\t\t\t\tif (engine) {\n\t\t\t\t\tawait ready;\n\t\t\t\t\tif (aesCrypto.discarded) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tconst encryptedChunkArray = new Uint8Array(pendingInput);\n\t\t\t\t\tengine.process(encryptedChunkArray, false);\n\t\t\t\t\tconst authenticationCode = subarray(engine.digest(), 0, AUTHENTICATION_CODE_LENGTH);\n\t\t\t\t\tcontroller.enqueue(concat(encryptedChunkArray, authenticationCode));\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tsetDisposingReadable(this, aesCrypto);\n\t}\n}\n\nexport {\n\tAESDecryptionStream,\n\tAESEncryptionStream,\n\tsetAESEngine\n};\n\nfunction setAESEngine(createEngineFunction) {\n\tcreateEngine = createEngineFunction || createDefaultEngine;\n}\n\nfunction initAesCrypto(aesCrypto, password, rawPassword, encryptionStrength) {\n\tObject.assign(aesCrypto, {\n\t\tready: new Promise(resolve => aesCrypto.resolveReady = resolve),\n\t\tpassword: encodePassword(password, rawPassword),\n\t\tstrength: encryptionStrength - 1,\n\t\tpendingInput: EMPTY_UINT8_ARRAY,\n\t\tdiscarded: false\n\t});\n}\n\nfunction setDisposingReadable(stream, aesCrypto) {\n\tconst reader = stream.readable.getReader();\n\tconst readable = new ReadableStream({\n\t\tasync pull(controller) {\n\t\t\ttry {\n\t\t\t\tconst { value, done } = await reader.read();\n\t\t\t\tif (done) {\n\t\t\t\t\tcontroller.close();\n\t\t\t\t} else {\n\t\t\t\t\tcontroller.enqueue(value);\n\t\t\t\t}\n\t\t\t} catch (error) {\n\t\t\t\tdisposeEngine(aesCrypto);\n\t\t\t\treader.cancel(error).catch(() => { });\n\t\t\t\tthrow error;\n\t\t\t}\n\t\t},\n\t\tcancel(reason) {\n\t\t\tdisposeEngine(aesCrypto);\n\t\t\treturn reader.cancel(reason);\n\t\t}\n\t});\n\tObject.defineProperty(stream, \"readable\", {\n\t\tget() {\n\t\t\treturn readable;\n\t\t}\n\t});\n}\n\nfunction append(aesCrypto, input, output, paddingStart, paddingEnd, decrypt) {\n\tconst {\n\t\tengine,\n\t\tpendingInput\n\t} = aesCrypto;\n\tif (pendingInput.length) {\n\t\tinput = concat(pendingInput, input);\n\t}\n\tconst inputLength = input.length - paddingEnd;\n\tconst alignedLength = inputLength - (inputLength % BLOCK_LENGTH);\n\toutput = expand(output, paddingStart + alignedLength);\n\tif (alignedLength) {\n\t\tconst chunk = subarray(output, paddingStart, paddingStart + alignedLength);\n\t\tchunk.set(subarray(input, 0, alignedLength));\n\t\tengine.process(chunk, decrypt);\n\t}\n\taesCrypto.pendingInput = subarray(input, alignedLength);\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\tdisposeEngine(decrypt);\n\t\tthrow new Error(ERR_INVALID_PASSWORD);\n\t}\n}\n\nfunction disposeEngine(aesCrypto) {\n\tconst { engine } = aesCrypto;\n\taesCrypto.discarded = true;\n\tif (engine && engine.dispose) {\n\t\tengine.dispose();\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 keyLength = KEY_LENGTH[strength];\n\tconst compositeKey = await deriveKey(password, salt, keyLength * 2 + PASSWORD_VERIFICATION_LENGTH);\n\taesCrypto.engine = createEngine(subarray(compositeKey, 0, keyLength), subarray(compositeKey, keyLength, keyLength * 2));\n\tif (aesCrypto.discarded) {\n\t\tdisposeEngine(aesCrypto);\n\t}\n\treturn subarray(compositeKey, keyLength * 2);\n}\n\nasync function deriveKey(password, salt, length) {\n\tif (DERIVE_BITS_SUPPORTED) {\n\t\ttry {\n\t\t\tconst baseKey = await subtle.importKey(RAW_FORMAT, password, BASE_KEY_ALGORITHM, false, DERIVED_BITS_USAGE);\n\t\t\treturn new Uint8Array(await subtle.deriveBits(Object.assign({ salt }, DERIVED_BITS_ALGORITHM), baseKey, length * 8));\n\t\t} catch {\n\t\t\tDERIVE_BITS_SUPPORTED = false;\n\t\t}\n\t}\n\treturn pbkdf2(password, salt, PBKDF2_ITERATIONS, length);\n}\n\nfunction encodePassword(password, rawPassword) {\n\tif (rawPassword === UNDEFINED_VALUE) {\n\t\treturn encodeText(password);\n\t} else {\n\t\treturn rawPassword;\n\t}\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","/*\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, rawPassword, passwordVerification, checkPasswordOnly }) {\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tinitZipCrypto(this, password, rawPassword, passwordVerification);\n\t\t\t},\n\t\t\ttransform(chunk, controller) {\n\t\t\t\tconst zipCrypto = this;\n\t\t\t\tif (zipCrypto.password || zipCrypto.rawPassword) {\n\t\t\t\t\tconst decryptedHeader = decrypt(zipCrypto, chunk.subarray(0, HEADER_LENGTH));\n\t\t\t\t\tzipCrypto.password = zipCrypto.rawPassword = null;\n\t\t\t\t\tif ((decryptedHeader[HEADER_LENGTH - 1] ^ zipCrypto.passwordVerification) != 0) {\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, rawPassword, passwordVerification }) {\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tinitZipCrypto(this, password, rawPassword, passwordVerification);\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 || zipCrypto.rawPassword) {\n\t\t\t\t\tzipCrypto.password = zipCrypto.rawPassword = 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};\n\nfunction initZipCrypto(zipCrypto, password, rawPassword, passwordVerification) {\n\tObject.assign(zipCrypto, {\n\t\tpassword,\n\t\trawPassword,\n\t\tpasswordVerification\n\t});\n\tcreateKeys(zipCrypto, password, rawPassword);\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, rawPassword) {\n\tconst cryptoKeys = [0x12345678, 0x23456789, 0x34567890];\n\tObject.assign(target, {\n\t\tcryptoKeys,\n\t\tcrcKey0: new Crc32(cryptoKeys[0]),\n\t\tcrcKey2: new Crc32(cryptoKeys[2])\n\t});\n\tif (rawPassword) {\n\t\tfor (let index = 0; index < rawPassword.length; index++) {\n\t\t\tupdateKeys(target, rawPassword[index]);\n\t\t}\n\t} else {\n\t\tfor (let index = 0; index < password.length; index++) {\n\t\t\tupdateKeys(target, password.charCodeAt(index));\n\t\t}\n\t}\n}\n\nfunction updateKeys(target, byte) {\n\tlet [, key1] = target.cryptoKeys;\n\ttarget.crcKey0.append([byte]);\n\tconst key0 = ~target.crcKey0.get();\n\tkey1 = getInt32(Math.imul(getInt32(key1 + getInt8(key0)), 134775813) + 1);\n\ttarget.crcKey2.append([key1 >>> 24]);\n\tconst key2 = ~target.crcKey2.get();\n\ttarget.cryptoKeys = [key0, key1, key2];\n}\n\nfunction getByte(target) {\n\tconst temp = target.cryptoKeys[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) 2026 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, Response, ReadableStream, WritableStream */\n\nimport { FUNCTION_TYPE } from \"../constants.js\";\n\nexport {\n\ttoCompatibleReadable,\n\ttoCompatibleWritable,\n\tstreamToBlob\n};\n\nfunction toCompatibleReadable(readable) {\n\tif (readable instanceof ReadableStream) {\n\t\treturn readable;\n\t}\n\tconst reader = readable.getReader();\n\treturn new ReadableStream({\n\t\tasync pull(controller) {\n\t\t\ttry {\n\t\t\t\tconst { value, done } = await reader.read();\n\t\t\t\tif (done) {\n\t\t\t\t\tcontroller.close();\n\t\t\t\t} else {\n\t\t\t\t\tcontroller.enqueue(value);\n\t\t\t\t}\n\t\t\t} catch (error) {\n\t\t\t\treader.cancel(error).catch(() => { });\n\t\t\t\tthrow error;\n\t\t\t}\n\t\t},\n\t\tcancel(reason) {\n\t\t\treturn reader.cancel(reason);\n\t\t}\n\t});\n}\n\nfunction streamToBlob(readable, contentType) {\n\treadable = toCompatibleReadable(readable);\n\tconst blobOptions = contentType ? { type: contentType } : {};\n\tif (responseSupportsGlobalReadable()) {\n\t\treturn new Response(readable).blob().then(blob => contentType ? new Blob([blob], blobOptions) : blob);\n\t}\n\tconst chunks = [];\n\treturn readable\n\t\t.pipeTo(new WritableStream({\n\t\t\twrite(chunk) {\n\t\t\t\tchunks.push(chunk);\n\t\t\t}\n\t\t}))\n\t\t.then(() => new Blob(chunks, blobOptions));\n}\n\nfunction responseSupportsGlobalReadable() {\n\treturn typeof Blob.prototype.stream != FUNCTION_TYPE || new Blob([]).stream() instanceof ReadableStream;\n}\n\nfunction toCompatibleWritable(writable) {\n\tif (writable instanceof WritableStream) {\n\t\treturn writable;\n\t}\n\tconst writer = writable.getWriter();\n\treturn new WritableStream({\n\t\twrite(chunk) {\n\t\t\treturn writer.write(chunk);\n\t\t},\n\t\tclose() {\n\t\t\treturn writer.close();\n\t\t},\n\t\tabort(reason) {\n\t\t\treturn writer.abort(reason);\n\t\t}\n\t});\n}\n","/*\n Copyright (c) 2025 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 {\n\tMAX_16_BITS,\n\tCOMPRESSION_METHOD_STORE,\n\tCOMPRESSION_METHOD_DEFLATE,\n\tCOMPRESSION_METHOD_DEFLATE_64,\n\tCOMPRESSION_METHOD_AES,\n\tFUNCTION_TYPE,\n\tSTRING_TYPE\n} from \"./constants.js\";\n\nconst ERR_INVALID_CODEC_DEFINITION = \"Invalid codec definition\";\nconst ERR_RESERVED_COMPRESSION_METHOD = \"Reserved compression method\";\nconst ERR_INVALID_CODEC_MODULE = \"Invalid codec module\";\nconst ERR_UNSUPPORTED_COMPRESSION = \"Compression method not supported\";\n\nconst RESERVED_COMPRESSION_METHODS = [\n\tCOMPRESSION_METHOD_STORE,\n\tCOMPRESSION_METHOD_DEFLATE,\n\tCOMPRESSION_METHOD_DEFLATE_64,\n\tCOMPRESSION_METHOD_AES\n];\n\nconst registeredCodecs = new Map();\nconst codecStreams = new Map();\n\nexport {\n\tERR_INVALID_CODEC_DEFINITION,\n\tERR_UNSUPPORTED_COMPRESSION,\n\tERR_RESERVED_COMPRESSION_METHOD,\n\tERR_INVALID_CODEC_MODULE,\n\tregisterCodec,\n\tunregisterCodec,\n\tgetRegisteredCodec,\n\tgetRegisteredCodecs,\n\tgetCodecStreams,\n\tsetCodecStreams,\n\tensureCodecStreams\n};\n\nfunction registerCodec(codec = {}) {\n\tconst { compressionMethod, format, codecURI, CompressionStream, DecompressionStream, versionNeeded } = codec;\n\tif (!Number.isInteger(compressionMethod) || compressionMethod < 0 || compressionMethod > MAX_16_BITS ||\n\t\ttypeof format != STRING_TYPE || !format.length) {\n\t\tthrow new Error(ERR_INVALID_CODEC_DEFINITION);\n\t}\n\tif (RESERVED_COMPRESSION_METHODS.includes(compressionMethod)) {\n\t\tthrow new Error(ERR_RESERVED_COMPRESSION_METHOD);\n\t}\n\tconst hasStreams = typeof CompressionStream == FUNCTION_TYPE || typeof DecompressionStream == FUNCTION_TYPE;\n\tif (!hasStreams && (typeof codecURI != STRING_TYPE || !codecURI.length)) {\n\t\tthrow new Error(ERR_INVALID_CODEC_DEFINITION);\n\t}\n\tregisteredCodecs.set(compressionMethod, { compressionMethod, format, codecURI, versionNeeded });\n\tif (hasStreams) {\n\t\tsetCodecStreams(format, { CompressionStream, DecompressionStream });\n\t}\n}\n\nfunction unregisterCodec(compressionMethod) {\n\tconst codec = registeredCodecs.get(compressionMethod);\n\tif (codec) {\n\t\tregisteredCodecs.delete(compressionMethod);\n\t\tlet formatUsed;\n\t\tregisteredCodecs.forEach(otherCodec => formatUsed = formatUsed || otherCodec.format == codec.format);\n\t\tif (!formatUsed) {\n\t\t\tcodecStreams.delete(codec.format);\n\t\t}\n\t}\n}\n\nfunction getRegisteredCodec(compressionMethod) {\n\treturn registeredCodecs.get(compressionMethod);\n}\n\nfunction getRegisteredCodecs() {\n\treturn Array.from(registeredCodecs.values(), codec => Object.assign({}, codec, codecStreams.get(codec.format)));\n}\n\nfunction getCodecStreams(format) {\n\treturn codecStreams.get(format);\n}\n\nfunction setCodecStreams(format, streams) {\n\tconst { CompressionStream, DecompressionStream } = streams;\n\tif (typeof CompressionStream != FUNCTION_TYPE && typeof DecompressionStream != FUNCTION_TYPE) {\n\t\tthrow new Error(ERR_INVALID_CODEC_MODULE);\n\t}\n\tcodecStreams.set(format, { CompressionStream, DecompressionStream });\n}\n\nasync function ensureCodecStreams(format, codecURI) {\n\tif (!codecStreams.has(format) && codecURI) {\n\t\tsetCodecStreams(format, await import(/* webpackIgnore: true */ /* @vite-ignore */ codecURI));\n\t}\n}\n","/*\n Copyright (c) 2025 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, ReadableStream */\n// deno-lint-ignore-file no-this-alias\n\nimport { Crc32 } from \"./codecs/crc32.js\";\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_AUTHENTICATION_CODE,\n\tERR_ABORT_CHECK_PASSWORD,\n\tERR_UNSUPPORTED_CRYPTO_API\n} from \"./common-crypto.js\";\nimport { UNDEFINED_VALUE } from \"../constants.js\";\nimport { concat, getDataView } from \"../util/array.js\";\nimport { toCompatibleReadable } from \"../util/compatible-streams.js\";\nimport { isErrorObject } from \"../util/error.js\";\nimport { getCodecStreams, ERR_UNSUPPORTED_COMPRESSION } from \"../codec-registry.js\";\n\nconst ERR_INVALID_UNCOMPRESSED_SIZE = \"Invalid uncompressed size\";\nconst ERR_INVALID_COMPRESSED_DATA = \"Invalid compressed data\";\nconst ERR_CODEC_OUT_OF_MEMORY = \"Codec out of memory\";\nconst ERR_INVALID_CRC32 = \"Invalid CRC32\";\nconst Z_MEM_ERROR_CODE = \"Z_MEM_ERROR\";\nconst FORMAT_DEFLATE_RAW = \"deflate-raw\";\nconst FORMAT_DEFLATE64_RAW = \"deflate64-raw\";\nconst FORMAT_GZIP = \"gzip\";\nconst GZIP_HEADER_LENGTH = 10;\nconst GZIP_TRAILER_LENGTH = 8;\nconst GZIP_HEADER_BYTES = [0x1f, 0x8b, 0x08];\n\nclass DeflateStream extends TransformStream {\n\n\tconstructor(options, { chunkSize, CompressionStreamFallback, CompressionStream }) {\n\t\tsuper({});\n\t\tconst { compressed, encrypted, useCompressionStream, zipCrypto, computeCrc32, level, deflate64, format, compressionMethod, inputSize } = options;\n\t\tconst stream = this;\n\t\tlet crc32Stream, encryptionStream, gzipCrc32Stream;\n\t\tlet readable = super.readable;\n\t\tconst codecStreams = format && getCodecStreams(format);\n\t\tconst GzipCompressionStream = getGzipCodecStream(useCompressionStream, CompressionStream, CompressionStreamFallback);\n\t\tconst useGzipCrc32 = computeCrc32 && compressed && !deflate64 && !codecStreams && (!encrypted || zipCrypto) && Boolean(GzipCompressionStream);\n\t\tif ((!encrypted || zipCrypto) && computeCrc32 && !useGzipCrc32) {\n\t\t\tcrc32Stream = new Crc32Stream();\n\t\t\treadable = pipeThrough(readable, crc32Stream);\n\t\t}\n\t\tif (compressed) {\n\t\t\tif (codecStreams) {\n\t\t\t\treadable = pipeThroughBackpressured(readable, createCodecStream(codecStreams.CompressionStream, format, { level, chunkSize, compressionMethod, uncompressedSize: inputSize }));\n\t\t\t} else if (useGzipCrc32) {\n\t\t\t\tgzipCrc32Stream = new GzipToRawDeflateStream();\n\t\t\t\treadable = pipeThroughBackpressured(readable, new GzipCompressionStream(FORMAT_GZIP, { level, chunkSize }));\n\t\t\t\treadable = pipeThrough(readable, gzipCrc32Stream);\n\t\t\t} else {\n\t\t\t\ttry {\n\t\t\t\t\treadable = pipeThroughCompressionStream(readable, useCompressionStream, { level, chunkSize }, CompressionStream, CompressionStreamFallback);\n\t\t\t\t} catch (error) {\n\t\t\t\t\tif (!useCompressionStream && CompressionStreamFallback) {\n\t\t\t\t\t\tthrow mapMemoryError(error);\n\t\t\t\t\t}\n\t\t\t\t\tlet gzipStream;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tgzipStream = new CompressionStream(FORMAT_GZIP);\n\t\t\t\t\t} catch {\n\t\t\t\t\t\tthrow mapMemoryError(error);\n\t\t\t\t\t}\n\t\t\t\t\treadable = pipeThroughBackpressured(readable, gzipStream);\n\t\t\t\t\treadable = pipeThrough(readable, new GzipToRawDeflateStream());\n\t\t\t\t}\n\t\t\t}\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, () => {\n\t\t\tif ((!encrypted || zipCrypto) && computeCrc32) {\n\t\t\t\tstream.crc32 = useGzipCrc32 ? gzipCrc32Stream.crc32 : new DataView(crc32Stream.value.buffer).getUint32(0);\n\t\t\t}\n\t\t});\n\t}\n}\n\nclass GzipToRawDeflateStream extends TransformStream {\n\n\tconstructor() {\n\t\t// deno-lint-ignore prefer-const\n\t\tlet stream;\n\t\tlet headerBytesLeft = GZIP_HEADER_LENGTH;\n\t\tlet trailerCandidate = new Uint8Array(0);\n\t\tsuper({\n\t\t\ttransform(chunk, controller) {\n\t\t\t\tif (headerBytesLeft) {\n\t\t\t\t\tconst droppedLength = Math.min(headerBytesLeft, chunk.length);\n\t\t\t\t\theaderBytesLeft -= droppedLength;\n\t\t\t\t\tchunk = chunk.subarray(droppedLength);\n\t\t\t\t\tif (!chunk.length) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tconst availableLength = trailerCandidate.length + chunk.length;\n\t\t\t\tif (availableLength <= GZIP_TRAILER_LENGTH) {\n\t\t\t\t\ttrailerCandidate = concat(trailerCandidate, chunk);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tconst emitLength = availableLength - GZIP_TRAILER_LENGTH;\n\t\t\t\tconst emittedFromTrailer = Math.min(emitLength, trailerCandidate.length);\n\t\t\t\tcontroller.enqueue(concat(\n\t\t\t\t\ttrailerCandidate.subarray(0, emittedFromTrailer),\n\t\t\t\t\tchunk.subarray(0, emitLength - emittedFromTrailer)));\n\t\t\t\ttrailerCandidate = concat(\n\t\t\t\t\ttrailerCandidate.subarray(emittedFromTrailer),\n\t\t\t\t\tchunk.subarray(emitLength - emittedFromTrailer));\n\t\t\t},\n\t\t\tflush() {\n\t\t\t\tconst dataView = getDataView(trailerCandidate);\n\t\t\t\tstream.crc32 = dataView.getUint32(0, true);\n\t\t\t\tstream.uncompressedSize = dataView.getUint32(4, true);\n\t\t\t}\n\t\t});\n\t\tstream = this;\n\t}\n}\n\nfunction pipeThroughGzipDecompressionStream(readable, gzipStream, outputSize, crc32, sourceErrors) {\n\tconst writer = gzipStream.writable.getWriter();\n\tconst reader = gzipStream.readable.getReader();\n\tconst outputCrc32 = crc32 === UNDEFINED_VALUE ? new Crc32() : UNDEFINED_VALUE;\n\tlet outputLength = 0;\n\tlet trailerWritten = false;\n\tlet settled = false;\n\tlet resolvePull, controller;\n\tconst output = new ReadableStream({\n\t\tstart(streamController) {\n\t\t\tcontroller = streamController;\n\t\t},\n\t\tpull() {\n\t\t\tresumePump();\n\t\t},\n\t\tcancel(reason) {\n\t\t\tsettled = true;\n\t\t\tresumePump();\n\t\t\treturn reader.cancel(reason);\n\t\t}\n\t});\n\tpump();\n\tdrain();\n\treturn output;\n\n\tasync function pump() {\n\t\tconst inputReader = readable.getReader();\n\t\ttry {\n\t\t\tconst header = new Uint8Array(GZIP_HEADER_LENGTH);\n\t\t\theader.set(GZIP_HEADER_BYTES);\n\t\t\tawait writer.write(header);\n\t\t\tfor (; ;) {\n\t\t\t\tawait outputCapacity();\n\t\t\t\tawait writer.ready;\n\t\t\t\tconst { value, done } = await readSource(inputReader, sourceErrors);\n\t\t\t\tif (done) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tawait writer.write(value);\n\t\t\t}\n\t\t\tif (outputCrc32) {\n\t\t\t\tawait writer.write(new Uint8Array(0));\n\t\t\t}\n\t\t\tconst trailer = new Uint8Array(GZIP_TRAILER_LENGTH);\n\t\t\tconst dataView = getDataView(trailer);\n\t\t\tdataView.setUint32(0, outputCrc32 ? outputCrc32.get() : crc32, true);\n\t\t\tdataView.setUint32(4, outputSize, true);\n\t\t\ttrailerWritten = true;\n\t\t\tawait writer.write(trailer);\n\t\t\tawait writer.close();\n\t\t} catch (error) {\n\t\t\tawait abort(writer, error);\n\t\t\tawait cancel(inputReader, error);\n\t\t}\n\t}\n\n\tasync function drain() {\n\t\ttry {\n\t\t\tfor (; ;) {\n\t\t\t\tconst { value, done } = await read();\n\t\t\t\tif (done) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\toutputLength += value.length;\n\t\t\t\tif (outputLength > outputSize) {\n\t\t\t\t\tthrow new Error(ERR_INVALID_UNCOMPRESSED_SIZE);\n\t\t\t\t}\n\t\t\t\tif (outputCrc32) {\n\t\t\t\t\toutputCrc32.append(value);\n\t\t\t\t}\n\t\t\t\tcontroller.enqueue(value);\n\t\t\t}\n\t\t\tif (!settled) {\n\t\t\t\tsettled = true;\n\t\t\t\tcontroller.close();\n\t\t\t}\n\t\t} catch (error) {\n\t\t\tfail(error);\n\t\t\tawait cancel(reader, error);\n\t\t}\n\t}\n\n\tfunction read() {\n\t\treturn reader.read().catch(error => {\n\t\t\tif (trailerWritten) {\n\t\t\t\tif (!outputCrc32) {\n\t\t\t\t\tthrow mapError(error, ERR_INVALID_CRC32);\n\t\t\t\t}\n\t\t\t\tif (outputLength != outputSize) {\n\t\t\t\t\tthrow mapError(error, ERR_INVALID_UNCOMPRESSED_SIZE);\n\t\t\t\t}\n\t\t\t\treturn { done: true };\n\t\t\t}\n\t\t\tthrow mapCodecError(error, sourceErrors);\n\t\t});\n\t}\n\n\tfunction outputCapacity() {\n\t\tif (!settled && controller.desiredSize <= 0) {\n\t\t\treturn new Promise(resolve => resolvePull = resolve);\n\t\t}\n\t}\n\n\tfunction resumePump() {\n\t\tif (resolvePull) {\n\t\t\tconst resolve = resolvePull;\n\t\t\tresolvePull = UNDEFINED_VALUE;\n\t\t\tresolve();\n\t\t}\n\t}\n\n\tfunction fail(error) {\n\t\tif (!settled) {\n\t\t\tsettled = true;\n\t\t\tcontroller.error(error);\n\t\t\tresumePump();\n\t\t}\n\t}\n}\n\nclass InflateStream extends TransformStream {\n\n\tconstructor(options, { chunkSize, DecompressionStreamFallback, DecompressionStream }) {\n\t\tsuper({});\n\t\tconst { zipCrypto, encrypted, checkCrc32, crc32, compressed, useCompressionStream, deflate64, format, compressionMethod, rawBitFlag, outputSize } = options;\n\t\tlet crc32Stream, decryptionStream, gzipCrc32;\n\t\tlet readable = 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\tconst sourceErrors = new Set();\n\t\t\tconst codecStreams = format && getCodecStreams(format);\n\t\t\tlet gzipStream;\n\t\t\tif (codecStreams) {\n\t\t\t\treadable = pipeThroughBackpressured(readable, createCodecStream(codecStreams.DecompressionStream, format, { chunkSize, compressionMethod, rawBitFlag, uncompressedSize: outputSize }), sourceErrors);\n\t\t\t} else {\n\t\t\t\tconst GzipDecompressionStream = getGzipCodecStream(useCompressionStream, DecompressionStream, DecompressionStreamFallback);\n\t\t\t\tif (checkCrc32 && !deflate64 && crc32 !== UNDEFINED_VALUE && outputSize !== UNDEFINED_VALUE && GzipDecompressionStream) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tgzipStream = new GzipDecompressionStream(FORMAT_GZIP, { chunkSize });\n\t\t\t\t\t} catch {\n\t\t\t\t\t\tgzipStream = UNDEFINED_VALUE;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (!gzipStream) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\treadable = pipeThroughCompressionStream(readable, useCompressionStream, { chunkSize, deflate64 }, DecompressionStream, DecompressionStreamFallback, sourceErrors);\n\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\tif (deflate64 || outputSize === UNDEFINED_VALUE || (!useCompressionStream && DecompressionStreamFallback)) {\n\t\t\t\t\t\t\tthrow mapMemoryError(error);\n\t\t\t\t\t\t}\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tgzipStream = new DecompressionStream(FORMAT_GZIP);\n\t\t\t\t\t\t} catch {\n\t\t\t\t\t\t\tthrow mapMemoryError(error);\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\tif (gzipStream) {\n\t\t\t\tgzipCrc32 = true;\n\t\t\t\treadable = pipeThroughGzipDecompressionStream(readable, gzipStream, outputSize, crc32, sourceErrors);\n\t\t\t} else {\n\t\t\t\treadable = mapInflateStreamError(readable, sourceErrors);\n\t\t\t}\n\t\t}\n\t\tif (checkCrc32 && !gzipCrc32) {\n\t\t\tcrc32Stream = new Crc32Stream();\n\t\t\treadable = pipeThrough(readable, crc32Stream);\n\t\t}\n\t\tsetReadable(this, readable, () => {\n\t\t\tif (crc32Stream) {\n\t\t\t\tconst computedCrc32 = new DataView(crc32Stream.value.buffer).getUint32(0, false);\n\t\t\t\tif (crc32 != computedCrc32) {\n\t\t\t\t\tthrow new Error(ERR_INVALID_CRC32);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n}\n\nconst formatSupportByStream = new Map();\n\nfunction supportsFormat(StreamClass, format) {\n\tif (!StreamClass) {\n\t\treturn false;\n\t}\n\tlet supportByFormat = formatSupportByStream.get(StreamClass);\n\tif (!supportByFormat) {\n\t\tsupportByFormat = new Map();\n\t\tformatSupportByStream.set(StreamClass, supportByFormat);\n\t}\n\tlet supported = supportByFormat.get(format);\n\tif (supported === UNDEFINED_VALUE) {\n\t\ttry {\n\t\t\tnew StreamClass(format);\n\t\t\tsupported = true;\n\t\t} catch {\n\t\t\tsupported = false;\n\t\t}\n\t\tsupportByFormat.set(format, supported);\n\t}\n\treturn supported;\n}\n\nfunction supportsDeflateRaw(StreamClass) {\n\treturn supportsFormat(StreamClass, FORMAT_DEFLATE_RAW);\n}\n\nfunction supportsGzip(StreamClass) {\n\treturn supportsFormat(StreamClass, FORMAT_GZIP);\n}\n\nexport {\n\tDeflateStream,\n\tInflateStream,\n\tsupportsFormat,\n\tsupportsDeflateRaw,\n\tsupportsGzip,\n\tFORMAT_DEFLATE_RAW,\n\tFORMAT_DEFLATE64_RAW,\n\tFORMAT_GZIP,\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_CRC32,\n\tERR_INVALID_AUTHENTICATION_CODE,\n\tERR_INVALID_UNCOMPRESSED_SIZE,\n\tERR_INVALID_COMPRESSED_DATA,\n\tERR_CODEC_OUT_OF_MEMORY,\n\tERR_ABORT_CHECK_PASSWORD,\n\tERR_UNSUPPORTED_CRYPTO_API\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 createCodecStream(CodecStreamClass, format, options) {\n\tif (!CodecStreamClass) {\n\t\tthrow new Error(ERR_UNSUPPORTED_COMPRESSION);\n\t}\n\treturn new CodecStreamClass(format, options);\n}\n\nfunction getGzipCodecStream(useCompressionStream, CodecStreamNative, CodecStreamFallback) {\n\tif (useCompressionStream && CodecStreamNative) {\n\t\treturn CodecStreamNative;\n\t} else if (CodecStreamFallback && CodecStreamFallback.requiresModule) {\n\t\treturn CodecStreamFallback;\n\t}\n}\n\nfunction pipeThroughCompressionStream(readable, useCompressionStream, options, CompressionStreamNative, CompressionStreamFallback, sourceErrors) {\n\tconst Stream = useCompressionStream && CompressionStreamNative ?\n\t\tCompressionStreamNative :\n\t\tCompressionStreamFallback || CompressionStreamNative;\n\tconst format = options.deflate64 ? FORMAT_DEFLATE64_RAW : FORMAT_DEFLATE_RAW;\n\tlet codecStream;\n\ttry {\n\t\tcodecStream = new Stream(format, options);\n\t} catch (error) {\n\t\tif (useCompressionStream && CompressionStreamFallback && Stream != CompressionStreamFallback) {\n\t\t\tcodecStream = new CompressionStreamFallback(format, options);\n\t\t} else {\n\t\t\tthrow error;\n\t\t}\n\t}\n\treturn pipeThroughBackpressured(readable, codecStream, sourceErrors);\n}\n\nfunction pipeThrough(readable, transformStream) {\n\treturn toCompatibleReadable(readable).pipeThrough(transformStream);\n}\n\nfunction pipeThroughBackpressured(readable, transformStream, sourceErrors) {\n\tconst writer = transformStream.writable.getWriter();\n\tconst reader = readable.getReader();\n\tpump();\n\treturn transformStream.readable;\n\n\tasync function pump() {\n\t\ttry {\n\t\t\tfor (; ;) {\n\t\t\t\tawait writer.ready;\n\t\t\t\tconst result = await readSource(reader, sourceErrors);\n\t\t\t\tif (result.done) {\n\t\t\t\t\tawait writer.close();\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tawait writer.write(result.value);\n\t\t\t}\n\t\t} catch (error) {\n\t\t\tawait abort(writer, error);\n\t\t\tawait cancel(reader, error);\n\t\t}\n\t}\n}\n\nasync function abort(writer, error) {\n\ttry {\n\t\tawait writer.abort(error);\n\t} catch {\n\t\t// ignored: the writable may already be errored/closed\n\t}\n}\n\nasync function cancel(reader, error) {\n\ttry {\n\t\tawait reader.cancel(error);\n\t} catch {\n\t\t// ignored: the readable may already be errored/closed\n\t}\n}\n\nfunction readSource(reader, sourceErrors) {\n\tconst result = reader.read();\n\treturn sourceErrors ? result.catch(error => {\n\t\tsourceErrors.add(error);\n\t\tthrow error;\n\t}) : result;\n}\n\nfunction mapCodecError(error, sourceErrors) {\n\tif (sourceErrors.has(error)) {\n\t\treturn error;\n\t}\n\treturn mapError(error, isMemoryError(error) ? ERR_CODEC_OUT_OF_MEMORY : ERR_INVALID_COMPRESSED_DATA);\n}\n\nfunction mapMemoryError(error) {\n\treturn isMemoryError(error) ? mapError(error, ERR_CODEC_OUT_OF_MEMORY) : error;\n}\n\nfunction isMemoryError(error) {\n\treturn isErrorObject(error) && error.code == Z_MEM_ERROR_CODE;\n}\n\nfunction mapError(error, message) {\n\tconst mappedError = new Error(message);\n\tmappedError.cause = error;\n\treturn mappedError;\n}\n\nfunction mapInflateStreamError(readable, sourceErrors) {\n\tconst reader = readable.getReader();\n\treturn new ReadableStream({\n\t\tasync pull(controller) {\n\t\t\ttry {\n\t\t\t\tconst { value, done } = await reader.read();\n\t\t\t\tif (done) {\n\t\t\t\t\tcontroller.close();\n\t\t\t\t} else {\n\t\t\t\t\tcontroller.enqueue(value);\n\t\t\t\t}\n\t\t\t} catch (error) {\n\t\t\t\tawait cancel(reader, error);\n\t\t\t\tthrow mapCodecError(error, sourceErrors);\n\t\t\t}\n\t\t},\n\t\tcancel(reason) {\n\t\t\treturn reader.cancel(reason);\n\t\t}\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/*\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 { UNDEFINED_VALUE } from \"../constants.js\";\nimport {\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_CRC32,\n\tERR_INVALID_AUTHENTICATION_CODE,\n\tERR_INVALID_UNCOMPRESSED_SIZE,\n\tERR_INVALID_COMPRESSED_DATA,\n\tERR_CODEC_OUT_OF_MEMORY,\n\tERR_ABORT_CHECK_PASSWORD,\n\tERR_UNSUPPORTED_CRYPTO_API,\n\tInflateStream,\n\tDeflateStream,\n\tsupportsDeflateRaw,\n\tsupportsGzip\n} from \"./zip-entry-stream.js\";\n\nconst DEFAULT_CHUNK_SIZE = 64 * 1024;\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 MESSAGE_READY = \"ready\";\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\tMESSAGE_READY,\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_CRC32,\n\tERR_INVALID_AUTHENTICATION_CODE,\n\tERR_INVALID_UNCOMPRESSED_SIZE,\n\tERR_INVALID_COMPRESSED_DATA,\n\tERR_CODEC_OUT_OF_MEMORY,\n\tERR_ABORT_CHECK_PASSWORD,\n\tERR_UNSUPPORTED_CRYPTO_API,\n\tCodecStream,\n\tChunkStream,\n\tsupportsDeflateRaw,\n\tsupportsGzip\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\tcodec.outputSize = 0;\n\t\tlet inputSize = 0;\n\t\tconst stream = new Stream(options, config);\n\t\tconst readable = super.readable;\n\t\tconst inputSizeStream = new TransformStream({\n\t\t\ttransform(chunk, controller) {\n\t\t\t\tif (chunk && chunk.length) {\n\t\t\t\t\tinputSize += 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\tObject.assign(codec, {\n\t\t\t\t\tinputSize\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t\tconst outputSizeStream = new TransformStream({\n\t\t\ttransform(chunk, controller) {\n\t\t\t\tif (chunk && chunk.length) {\n\t\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t\t\tcodec.outputSize += chunk.length;\n\t\t\t\t\tif (options.outputSize !== UNDEFINED_VALUE && codec.outputSize > options.outputSize) {\n\t\t\t\t\t\tthrow new Error(ERR_INVALID_UNCOMPRESSED_SIZE);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\tflush() {\n\t\t\t\tconst { crc32 } = stream;\n\t\t\t\tObject.assign(codec, {\n\t\t\t\t\tcrc32,\n\t\t\t\t\tinputSize\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(inputSizeStream).pipeThrough(stream).pipeThrough(outputSizeStream);\n\t\t\t}\n\t\t});\n\t}\n}\n\nclass ChunkStream extends TransformStream {\n\n\tconstructor(chunkSize) {\n\t\tconst pendingChunks = [];\n\t\tlet pendingLength = 0;\n\t\tlet outputSize = 0;\n\t\tif (!Number.isFinite(chunkSize) || chunkSize < 1) {\n\t\t\tchunkSize = DEFAULT_CHUNK_SIZE;\n\t\t}\n\t\tsuper({\n\t\t\ttransform(chunk, controller) {\n\t\t\t\tpendingChunks.push(chunk);\n\t\t\t\tpendingLength += chunk.length;\n\t\t\t\twhile (pendingLength > chunkSize) {\n\t\t\t\t\toutputSize += chunkSize;\n\t\t\t\t\tcontroller.enqueue(shiftChunk());\n\t\t\t\t}\n\t\t\t},\n\t\t\tflush(controller) {\n\t\t\t\tif (pendingLength) {\n\t\t\t\t\toutputSize += pendingLength;\n\t\t\t\t\tcontroller.enqueue(concatChunks(pendingChunks, pendingLength));\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(this, \"outputSize\", {\n\t\t\tget: () => outputSize\n\t\t});\n\n\t\tfunction shiftChunk() {\n\t\t\tconst result = new Uint8Array(chunkSize);\n\t\t\tlet resultOffset = 0;\n\t\t\twhile (resultOffset < chunkSize) {\n\t\t\t\tconst firstChunk = pendingChunks[0];\n\t\t\t\tconst remainingLength = chunkSize - resultOffset;\n\t\t\t\tif (firstChunk.length <= remainingLength) {\n\t\t\t\t\tresult.set(firstChunk, resultOffset);\n\t\t\t\t\tresultOffset += firstChunk.length;\n\t\t\t\t\tpendingChunks.shift();\n\t\t\t\t} else {\n\t\t\t\t\tresult.set(firstChunk.subarray(0, remainingLength), resultOffset);\n\t\t\t\t\tpendingChunks[0] = firstChunk.subarray(remainingLength);\n\t\t\t\t\tresultOffset += remainingLength;\n\t\t\t\t}\n\t\t\t}\n\t\t\tpendingLength -= chunkSize;\n\t\t\treturn result;\n\t\t}\n\n\t\tfunction concatChunks(chunks, length) {\n\t\t\tconst result = new Uint8Array(length);\n\t\t\tlet offset = 0;\n\t\t\tfor (const chunk of chunks) {\n\t\t\t\tresult.set(chunk, offset);\n\t\t\t\toffset += chunk.length;\n\t\t\t}\n\t\t\treturn result;\n\t\t}\n\t}\n}","/*\n Copyright (c) 2025 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, TransformStream */\n\nimport {\n\tUNDEFINED_VALUE,\n\tUNDEFINED_TYPE\n} from \"./constants.js\";\nimport { getChunkSize } from \"./configuration.js\";\nimport { isErrorObject } from \"./util/error.js\";\nimport {\n\tCODEC_DEFLATE,\n\tCodecStream,\n\tChunkStream,\n\tsupportsDeflateRaw,\n\tsupportsGzip\n} from \"./streams/codec-stream.js\";\n\nconst ERR_WORKER_STARTUP_TIMEOUT = \"Worker startup timeout\";\n\nlet webWorkerSupported, createWorkerFailed, webWorkerBackend;\nlet initModule = () => { };\n\nexport {\n\tCodecWorker,\n\tProgressWatcherStream,\n\tcallHandler,\n\tconfigureWorker,\n\tresetWebWorkerSupport,\n\tsupportsDeflate,\n\tsetWebWorkerBackend,\n\tdisableWebWorker,\n\tcreateWorkerInterface,\n\trunWorker,\n\tERR_WORKER_STARTUP_TIMEOUT\n};\n\nfunction configureWorker({ initModule: initModuleFunction }) {\n\tinitModule = initModuleFunction;\n}\n\nfunction setWebWorkerBackend(backend) {\n\twebWorkerBackend = backend;\n}\n\nasync function supportsDeflate(config) {\n\tconst { CompressionStream: NativeStream, CompressionStreamFallback: FallbackStream } = config;\n\tif (FallbackStream && !FallbackStream.requiresModule) {\n\t\treturn true;\n\t}\n\tif (supportsDeflateRaw(NativeStream) || supportsGzip(NativeStream)) {\n\t\treturn true;\n\t}\n\tif (FallbackStream) {\n\t\treturn await loadModule(config);\n\t}\n\treturn false;\n}\n\nasync function loadModule(config) {\n\tif (initModule) {\n\t\ttry {\n\t\t\tawait initModule(config);\n\t\t\treturn true;\n\t\t} catch {\n\t\t\t// ignored\n\t\t}\n\t}\n\treturn false;\n}\n\nfunction resetWebWorkerSupport() {\n\twebWorkerSupported = UNDEFINED_VALUE;\n\tcreateWorkerFailed = false;\n}\n\nfunction disableWebWorker(workerData) {\n\tif (workerData.createWorker) {\n\t\tcreateWorkerFailed = true;\n\t} else {\n\t\twebWorkerSupported = false;\n\t}\n}\n\nclass CodecWorker {\n\n\tconstructor(workerData, { readable, writable }, workerOptions, onTaskFinished) {\n\t\tconst { options, config, streamOptions, useWebWorkers, transferStreams, workerURI } = workerOptions;\n\t\tlet { createWorker } = workerOptions;\n\t\tconst { signal } = streamOptions;\n\t\tif (createWorkerFailed) {\n\t\t\tcreateWorker = UNDEFINED_VALUE;\n\t\t}\n\t\tObject.assign(workerData, {\n\t\t\tbusy: true,\n\t\t\tgeneration: (workerData.generation || 0) + 1,\n\t\t\treadable: readable\n\t\t\t\t.pipeThrough(new ChunkStream(getChunkSize(config)))\n\t\t\t\t.pipeThrough(new ProgressWatcherStream(streamOptions), { signal }),\n\t\t\twritable,\n\t\t\toptions: Object.assign({}, options),\n\t\t\tworkerOptions,\n\t\t\tworkerURI,\n\t\t\tcreateWorker,\n\t\t\ttransferStreams,\n\t\t\tterminate() {\n\t\t\t\treturn new Promise(resolve => {\n\t\t\t\t\tconst { worker, busy } = workerData;\n\t\t\t\t\tif (busy) {\n\t\t\t\t\t\tworkerData.terminateResolvers = workerData.terminateResolvers || [];\n\t\t\t\t\t\tworkerData.terminateResolvers.push(resolve);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (worker) {\n\t\t\t\t\t\t\tworker.terminate();\n\t\t\t\t\t\t\tworkerData.worker = null;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tresolve();\n\t\t\t\t\t}\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\tif (workerData.busy) {\n\t\t\t\t\tconst { terminateResolvers, worker } = workerData;\n\t\t\t\t\tif (terminateResolvers) {\n\t\t\t\t\t\tworkerData.terminateResolvers = null;\n\t\t\t\t\t\tif (worker) {\n\t\t\t\t\t\t\tworkerData.terminated = true;\n\t\t\t\t\t\t\tworker.terminate();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tworkerData.busy = false;\n\t\t\t\t\tconst pendingTasks = onTaskFinished(workerData);\n\t\t\t\t\tif (terminateResolvers) {\n\t\t\t\t\t\tterminateResolvers.forEach(resolve => resolve(pendingTasks));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tif (webWorkerSupported === UNDEFINED_VALUE) {\n\t\t\t// deno-lint-ignore valid-typeof\n\t\t\twebWorkerSupported = typeof Worker != UNDEFINED_TYPE;\n\t\t}\n\t\treturn (useWebWorkers && webWorkerBackend && ((webWorkerSupported && workerURI) || createWorker) ? webWorkerBackend : createWorkerInterface)(workerData, config);\n\t}\n}\n\nclass ProgressWatcherStream extends TransformStream {\n\n\tconstructor({ onstart, onprogress, size, onend }) {\n\t\tlet chunkOffset = 0;\n\t\tsuper({\n\t\t\tasync start() {\n\t\t\t\tif (onstart) {\n\t\t\t\t\tawait callHandler(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\tasync flush() {\n\t\t\t\tif (onend) {\n\t\t\t\t\tawait callHandler(onend, chunkOffset);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n}\n\nasync function callHandler(handler, ...parameters) {\n\ttry {\n\t\tawait handler(...parameters);\n\t} catch {\n\t\t// ignored\n\t}\n}\n\nfunction createWorkerInterface(workerData, config) {\n\treturn {\n\t\trun: () => runWorker(workerData, config)\n\t};\n}\n\nasync function runWorker({ options, readable, writable, onTaskFinished, workerOptions }, config) {\n\tlet codecStream, chunkStream, modulePromise;\n\ttry {\n\t\tif (options.compressed && !options.format) {\n\t\t\tconst deflate = options.codecType.startsWith(CODEC_DEFLATE);\n\t\t\tconst FallbackStream = deflate ? config.CompressionStreamFallback : config.DecompressionStreamFallback;\n\t\t\tconst NativeStream = deflate ? config.CompressionStream : config.DecompressionStream;\n\t\t\tif (!options.useCompressionStream) {\n\t\t\t\tif (!await moduleLoaded() && (!FallbackStream || FallbackStream.requiresModule)) {\n\t\t\t\t\toptions.useCompressionStream = true;\n\t\t\t\t}\n\t\t\t} else if (FallbackStream && FallbackStream.requiresModule && !supportsDeflateRaw(NativeStream)) {\n\t\t\t\tawait moduleLoaded();\n\t\t\t}\n\t\t}\n\t\tif (options.encrypted && !options.zipCrypto) {\n\t\t\tawait moduleLoaded();\n\t\t}\n\t\tcodecStream = new CodecStream(options, config);\n\t\tchunkStream = new ChunkStream(getChunkSize(config));\n\t\tconst { signal } = workerOptions.streamOptions;\n\t\tawait readable\n\t\t\t.pipeThrough(codecStream)\n\t\t\t.pipeThrough(chunkStream)\n\t\t\t.pipeTo(writable, { preventClose: true, preventAbort: true, signal });\n\t\tconst {\n\t\t\tcrc32,\n\t\t\tinputSize,\n\t\t\toutputSize\n\t\t} = codecStream;\n\t\treturn {\n\t\t\tcrc32,\n\t\t\tinputSize,\n\t\t\toutputSize\n\t\t};\n\t} catch (error) {\n\t\tif (codecStream) {\n\t\t\tconst outputSize = chunkStream ? chunkStream.outputSize : 0;\n\t\t\tworkerOptions.outputSize = outputSize;\n\t\t\tif (isErrorObject(error)) {\n\t\t\t\ttry {\n\t\t\t\t\terror.outputSize = outputSize;\n\t\t\t\t} catch {\n\t\t\t\t\t// ignored\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tthrow error;\n\t} finally {\n\t\tonTaskFinished();\n\t}\n\n\tfunction moduleLoaded() {\n\t\tif (!modulePromise) {\n\t\t\tmodulePromise = loadModule(config);\n\t\t}\n\t\treturn modulePromise;\n\t}\n}\n","/*\n Copyright (c) 2025 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, URL */\n\nimport { UNDEFINED_VALUE } from \"./constants.js\";\nimport {\n\tCODEC_INFLATE,\n\tCODEC_DEFLATE,\n\tERR_INVALID_CRC32,\n\tERR_INVALID_AUTHENTICATION_CODE,\n\tERR_INVALID_UNCOMPRESSED_SIZE,\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_COMPRESSED_DATA,\n\tERR_CODEC_OUT_OF_MEMORY,\n\tERR_ABORT_CHECK_PASSWORD,\n\tERR_UNSUPPORTED_CRYPTO_API\n} from \"./streams/codec-stream.js\";\nimport { ensureCodecStreams } from \"./codec-registry.js\";\nimport { CodecWorker, resetWebWorkerSupport, ERR_WORKER_STARTUP_TIMEOUT } from \"./codec-worker.js\";\n\nlet pool = [];\nconst pendingRequests = [];\nlet starvationTimeout;\nlet starvationDelay;\n\nexport {\n\trunWorker,\n\tterminateWorkers,\n\tCODEC_DEFLATE,\n\tCODEC_INFLATE,\n\tERR_INVALID_CRC32,\n\tERR_INVALID_AUTHENTICATION_CODE,\n\tERR_INVALID_UNCOMPRESSED_SIZE,\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_COMPRESSED_DATA,\n\tERR_CODEC_OUT_OF_MEMORY,\n\tERR_ABORT_CHECK_PASSWORD,\n\tERR_UNSUPPORTED_CRYPTO_API,\n\tERR_WORKER_STARTUP_TIMEOUT\n};\n\nlet indexWorker = 0;\n\nasync function runWorker(stream, workerOptions) {\n\tconst { options, config } = workerOptions;\n\tconst { transferStreams, useWebWorkers, useCompressionStream, compressed, checkCrc32, computeCrc32, encrypted, format, codecURI } = options;\n\tconst { workerURI, createWorker, maxWorkers } = config;\n\tif (format) {\n\t\tif (codecURI) {\n\t\t\toptions.codecURI = resolveCodecURI(codecURI, config.baseURI);\n\t\t}\n\t\tawait ensureCodecStreams(format, options.codecURI);\n\t}\n\tworkerOptions.transferStreams = !format && (transferStreams || (transferStreams === UNDEFINED_VALUE && config.transferStreams));\n\tconst streamCopy = !compressed && !checkCrc32 && !computeCrc32 && !encrypted;\n\tconst workerSupported = format === UNDEFINED_VALUE || Boolean(options.codecURI);\n\tworkerOptions.useWebWorkers = !streamCopy && workerSupported && (useWebWorkers || (useWebWorkers === UNDEFINED_VALUE && config.useWebWorkers));\n\tworkerOptions.workerURI = workerOptions.useWebWorkers && workerURI ? workerURI : UNDEFINED_VALUE;\n\tworkerOptions.createWorker = workerOptions.useWebWorkers && createWorker ? createWorker : UNDEFINED_VALUE;\n\toptions.useCompressionStream = useCompressionStream || (useCompressionStream === UNDEFINED_VALUE && config.useCompressionStream);\n\treturn (await getWorker()).run();\n\n\t// deno-lint-ignore require-await\n\tasync function getWorker() {\n\t\tconst workerData = pool.find(workerData => !workerData.busy);\n\t\tif (workerData) {\n\t\t\tclearTerminateTimeout(workerData);\n\t\t\treturn new CodecWorker(workerData, stream, workerOptions, onTaskFinished);\n\t\t} else if (pool.length < maxWorkers) {\n\t\t\tconst workerData = { indexWorker };\n\t\t\tindexWorker++;\n\t\t\tpool.push(workerData);\n\t\t\treturn new CodecWorker(workerData, stream, workerOptions, onTaskFinished);\n\t\t} else {\n\t\t\treturn new Promise(resolve => {\n\t\t\t\tpendingRequests.push({ resolve, stream, workerOptions });\n\t\t\t\tstarvationDelay = config.workerStarvationTimeout;\n\t\t\t\tarmStarvationTimeout();\n\t\t\t});\n\t\t}\n\t}\n\n\tfunction onTaskFinished(workerData) {\n\t\tclearStarvationTimeout();\n\t\tif (workerData.terminated) {\n\t\t\tworkerData.terminated = false;\n\t\t\treturn runPendingRequestsInline();\n\t\t} else if (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\tarmStarvationTimeout();\n\t\t} else if (workerData.worker) {\n\t\t\tclearTerminateTimeout(workerData);\n\t\t\tterminateWorker(workerData, workerOptions);\n\t\t} else {\n\t\t\tpool = pool.filter(data => data != workerData);\n\t\t}\n\t}\n}\n\nfunction resolveCodecURI(codecURI, baseURI) {\n\ttry {\n\t\treturn new URL(codecURI, baseURI).toString();\n\t} catch {\n\t\treturn codecURI;\n\t}\n}\n\nfunction armStarvationTimeout() {\n\tif (!starvationTimeout && pendingRequests.length && Number.isFinite(starvationDelay) && starvationDelay >= 0) {\n\t\tstarvationTimeout = setTimeout(onWorkerStarvation, starvationDelay);\n\t}\n}\n\nfunction clearStarvationTimeout() {\n\tif (starvationTimeout) {\n\t\tclearTimeout(starvationTimeout);\n\t\tstarvationTimeout = null;\n\t}\n}\n\nfunction onWorkerStarvation() {\n\tstarvationTimeout = null;\n\tif (pendingRequests.length) {\n\t\tconst [{ resolve, stream, workerOptions }] = pendingRequests.splice(0, 1);\n\t\tresolve(new CodecWorker({}, stream, getInlineWorkerOptions(workerOptions), onInlineTaskFinished));\n\t\tarmStarvationTimeout();\n\t}\n}\n\nfunction runPendingRequestsInline() {\n\tconst tasks = pendingRequests.splice(0).map(({ resolve, stream, workerOptions }) => new Promise(resolveTask => {\n\t\tresolve(new CodecWorker({}, stream, getInlineWorkerOptions(workerOptions), () => {\n\t\t\tonInlineTaskFinished();\n\t\t\tresolveTask();\n\t\t}));\n\t}));\n\tclearStarvationTimeout();\n\treturn Promise.all(tasks);\n}\n\nfunction getInlineWorkerOptions(workerOptions) {\n\treturn Object.assign({}, workerOptions, { useWebWorkers: false, workerURI: UNDEFINED_VALUE, createWorker: UNDEFINED_VALUE });\n}\n\nfunction onInlineTaskFinished() {\n\tclearStarvationTimeout();\n\tarmStarvationTimeout();\n}\n\nfunction terminateWorker(workerData, workerOptions) {\n\tconst { config } = workerOptions;\n\tconst { terminateWorkerTimeout } = config;\n\tif (Number.isFinite(terminateWorkerTimeout) && terminateWorkerTimeout >= 0) {\n\t\tworkerData.terminateTimeout = setTimeout(async () => {\n\t\t\tpool = pool.filter(data => data != workerData);\n\t\t\ttry {\n\t\t\t\tawait workerData.terminate();\n\t\t\t} catch {\n\t\t\t\t// ignored\n\t\t\t}\n\t\t}, terminateWorkerTimeout);\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\nasync function terminateWorkers() {\n\tawait Promise.allSettled([\n\t\trunPendingRequestsInline(),\n\t\t...pool.map(workerData => {\n\t\t\tclearTerminateTimeout(workerData);\n\t\t\treturn workerData.terminate();\n\t\t})\n\t]);\n\tresetWebWorkerSupport();\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 CP437 = \"\\0\\u263A\\u263B\\u2665\\u2666\\u2663\\u2660\\u2022\\u25D8\\u25CB\\u25D9\\u2642\\u2640\\u266A\\u266B\\u263C\\u25BA\\u25C4\\u2195\\u203C\\u00B6\\u00A7\\u25AC\\u21A8\\u2191\\u2193\\u2192\\u2190\\u221F\\u2194\\u25B2\\u25BC !\\\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\\u2302\\u00C7\\u00FC\\u00E9\\u00E2\\u00E4\\u00E0\\u00E5\\u00E7\\u00EA\\u00EB\\u00E8\\u00EF\\u00EE\\u00EC\\u00C4\\u00C5\\u00C9\\u00E6\\u00C6\\u00F4\\u00F6\\u00F2\\u00FB\\u00F9\\u00FF\\u00D6\\u00DC\\u00A2\\u00A3\\u00A5\\u20A7\\u0192\\u00E1\\u00ED\\u00F3\\u00FA\\u00F1\\u00D1\\u00AA\\u00BA\\u00BF\\u2310\\u00AC\\u00BD\\u00BC\\u00A1\\u00AB\\u00BB\\u2591\\u2592\\u2593\\u2502\\u2524\\u2561\\u2562\\u2556\\u2555\\u2563\\u2551\\u2557\\u255D\\u255C\\u255B\\u2510\\u2514\\u2534\\u252C\\u251C\\u2500\\u253C\\u255E\\u255F\\u255A\\u2554\\u2569\\u2566\\u2560\\u2550\\u256C\\u2567\\u2568\\u2564\\u2565\\u2559\\u2558\\u2552\\u2553\\u256B\\u256A\\u2518\\u250C\\u2588\\u2584\\u258C\\u2590\\u2580\\u03B1\\u00DF\\u0393\\u03C0\\u03A3\\u03C3\\u00B5\\u03C4\\u03A6\\u0398\\u03A9\\u03B4\\u221E\\u03C6\\u03B5\\u2229\\u2261\\u00B1\\u2265\\u2264\\u2320\\u2321\\u00F7\\u2248\\u00B0\\u2219\\u00B7\\u221A\\u207F\\u00B2\\u25A0\\u00A0\".split(\"\");\n\nexport {\n\tdecodeCP437\n};\n\nfunction decodeCP437(stringValue) {\n\tlet result = \"\";\n\tfor (let indexCharacter = 0; indexCharacter < stringValue.length; indexCharacter++) {\n\t\tresult += CP437[stringValue[indexCharacter]];\n\t}\n\treturn result;\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 \"./decode-cp437.js\";\n\nexport {\n\tdecodeText,\n\tdecodeTextRemovingBOM,\n\tisUTF8Text\n};\n\nfunction decodeText(value, encoding) {\n\treturn decode(value, encoding, true);\n}\n\nfunction isUTF8Text(value) {\n\tif (value.some(byte => byte > 0x7f)) {\n\t\ttry {\n\t\t\tnew TextDecoder(\"utf-8\", { fatal: true }).decode(value);\n\t\t\treturn true;\n\t\t} catch {\n\t\t\treturn false;\n\t\t}\n\t} else {\n\t\treturn false;\n\t}\n}\n\nfunction decodeTextRemovingBOM(value, encoding) {\n\treturn decode(value, encoding, false);\n}\n\nfunction decode(value, encoding, ignoreBOM) {\n\tif (encoding && encoding.trim().toLowerCase() == \"cp437\") {\n\t\treturn decodeCP437(value);\n\t} else {\n\t\treturn new TextDecoder(encoding, { ignoreBOM }).decode(value);\n\t}\n}","/*\n Copyright (c) 2025 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, TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tUNDEFINED_VALUE,\n\tFUNCTION_TYPE,\n\tUNDEFINED_TYPE,\n\tEND_OF_CENTRAL_DIR_LENGTH,\n\tMAX_16_BITS,\n\tEMPTY_UINT8_ARRAY\n} from \"./constants.js\";\nimport { getConfiguration, getChunkSize, normalizeChunkSize } from \"./configuration.js\";\nimport { concat, toExactUint8Array } from \"./util/array.js\";\nimport { toCompatibleReadable, toCompatibleWritable, streamToBlob } from \"./util/compatible-streams.js\";\nimport { decodeTextRemovingBOM } from \"./util/decode-text.js\";\n\nconst ERR_HTTP_STATUS = \"HTTP error \";\nconst MIN_SUCCESS_HTTP_STATUS = 200;\nconst MAX_SUCCESS_HTTP_STATUS = 299;\nconst ERR_HTTP_RANGE = \"HTTP Range not supported\";\nconst ERR_HTTP_RESOURCE_CHANGED = \"HTTP resource changed\";\nconst ERR_ITERATOR_COMPLETED_TOO_SOON = \"Writer iterator completed too soon\";\nconst ERR_WRITER_NOT_INITIALIZED = \"Writer not initialized\";\nconst ERR_WRITER_SIZE_NOT_WRITABLE = \"Invalid writer (size must be writable)\";\n\nconst CONTENT_TYPE_TEXT_PLAIN = \"text/plain\";\nconst HTTP_HEADER_CONTENT_LENGTH = \"Content-Length\";\nconst HTTP_HEADER_CONTENT_ENCODING = \"Content-Encoding\";\nconst HTTP_HEADER_CONTENT_RANGE = \"Content-Range\";\nconst HTTP_HEADER_ACCEPT_RANGES = \"Accept-Ranges\";\nconst HTTP_HEADER_RANGE = \"Range\";\nconst HTTP_HEADER_ETAG = \"Etag\";\nconst HTTP_HEADER_LAST_MODIFIED = \"Last-Modified\";\nconst HTTP_METHOD_HEAD = \"HEAD\";\nconst HTTP_METHOD_GET = \"GET\";\nconst HTTP_RANGE_UNIT = \"bytes\";\nconst DEFAULT_BUFFER_SIZE = 256 * 1024;\nconst DEFAULT_MAXIMUM_RANGE_SIZE = 16 * 1024 * 1024;\nconst END_OF_CENTRAL_DIR_SEARCH_LENGTH = END_OF_CENTRAL_DIR_LENGTH + MAX_16_BITS;\n\nconst PROPERTY_NAME_WRITABLE = \"writable\";\nconst DISK_BOUNDARY = Symbol();\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\treturn this.createReadable();\n\t}\n\n\tcreateReadable({ offset = 0, size, chunkSize = getChunkSize(getConfiguration()) } = {}) {\n\t\tconst reader = this;\n\t\tlet chunkOffset = 0;\n\t\tchunkSize = normalizeChunkSize(chunkSize);\n\t\treturn new ReadableStream({\n\t\t\tasync pull(controller) {\n\t\t\t\tconst dataSize = size === UNDEFINED_VALUE ? chunkSize : Math.min(chunkSize, size - chunkOffset);\n\t\t\t\tconst data = await readUint8Array(reader, offset + chunkOffset, dataSize);\n\t\t\t\tif (data.length) {\n\t\t\t\t\tcontroller.enqueue(data);\n\t\t\t\t\tchunkOffset += data.length;\n\t\t\t\t}\n\t\t\t\tif ((size !== UNDEFINED_VALUE && chunkOffset >= size) || (!data.length && dataSize)) {\n\t\t\t\t\tcontroller.close();\n\t\t\t\t}\n\t\t\t}\n\t\t});\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\tif (!writer.initialized) {\n\t\t\t\t\tthrow new Error(ERR_WRITER_NOT_INITIALIZED);\n\t\t\t\t}\n\t\t\t\treturn writer.writeUint8Array(toExactUint8Array(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\tlet effectiveLength = 0;\n\t\tfor (let indexByte = delta; indexByte < delta + length && indexByte < bytes.length; indexByte++) {\n\t\t\tdataArray[indexByte - delta] = bytes.charCodeAt(indexByte);\n\t\t\teffectiveLength++;\n\t\t}\n\t\tif (effectiveLength < dataArray.length) {\n\t\t\treturn dataArray.subarray(0, effectiveLength);\n\t\t} else {\n\t\t\treturn dataArray;\n\t\t}\n\t}\n}\n\nclass Data64URIWriter extends Writer {\n\n\tconstructor(contentType) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\tcontentType,\n\t\t\tdata: \"data:\" + (contentType || \"\") + \";base64,\",\n\t\t\tpendingCharacters: \"\"\n\t\t});\n\t}\n\n\twriteUint8Array(array) {\n\t\tconst writer = this;\n\t\tlet indexArray;\n\t\tlet dataString = writer.pendingCharacters;\n\t\tconst delta = writer.pendingCharacters.length;\n\t\twriter.pendingCharacters = \"\";\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.pendingCharacters += 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.pendingCharacters = dataString + writer.pendingCharacters;\n\t\t}\n\t}\n\n\tgetData() {\n\t\treturn this.data + btoa(this.pendingCharacters);\n\t}\n}\n\nlet blobSliceReliable;\nlet blobSliceProbe;\n\nfunction probeBlobSliceReliability() {\n\tblobSliceProbe = (async () => {\n\t\ttry {\n\t\t\tconst slicedBlob = new Blob([new Uint8Array(3)]).slice(1, 2);\n\t\t\tconst streamReader = slicedBlob.stream().getReader();\n\t\t\tlet streamedLength = 0;\n\t\t\tlet result = await streamReader.read();\n\t\t\twhile (!result.done) {\n\t\t\t\tstreamedLength += result.value.length;\n\t\t\t\tresult = await streamReader.read();\n\t\t\t}\n\t\t\tblobSliceReliable = streamedLength == 1;\n\t\t} catch {\n\t\t\tblobSliceReliable = false;\n\t\t}\n\t})();\n}\n\nclass BlobReader extends Reader {\n\n\tconstructor(blob) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\tsourceBlob: blob,\n\t\t\tsize: blob.size\n\t\t});\n\t\tif (!blobSliceProbe) {\n\t\t\tprobeBlobSliceReliability();\n\t\t}\n\t}\n\n\tcreateReadable(options) {\n\t\tconst reader = this;\n\t\tconst { sourceBlob, size } = reader;\n\t\tconst { offset = 0, size: readSize = size - offset } = options || {};\n\t\t// deno-lint-ignore valid-typeof\n\t\tif (typeof sourceBlob.stream == FUNCTION_TYPE) {\n\t\t\tif (!offset && readSize >= size) {\n\t\t\t\treturn toCompatibleReadable(sourceBlob.stream());\n\t\t\t}\n\t\t\tif (blobSliceReliable) {\n\t\t\t\treturn toCompatibleReadable(sourceBlob.slice(offset, offset + readSize).stream());\n\t\t\t}\n\t\t}\n\t\treturn super.createReadable(options);\n\t}\n\n\tasync readUint8Array(offset, length) {\n\t\tconst reader = this;\n\t\tconst offsetEnd = offset + length;\n\t\tconst readsWholeBlob = !offset && offsetEnd >= reader.size;\n\t\tconst blob = readsWholeBlob ? reader.sourceBlob : reader.sourceBlob.slice(offset, offsetEnd);\n\t\tlet arrayBuffer = await blob.arrayBuffer();\n\t\tconst sliceIgnoredByBuggyImplementation = arrayBuffer.byteLength > length;\n\t\tif (sliceIgnoredByBuggyImplementation) {\n\t\t\tarrayBuffer = arrayBuffer.slice(offset, offsetEnd);\n\t\t}\n\t\treturn new Uint8Array(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\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.contentType = contentType;\n\t\twriter.blobPromise = streamToBlob(transformStream.readable, contentType);\n\t\twriter.blobPromise.catch(() => { });\n\t}\n\n\tgetData() {\n\t\treturn this.blobPromise;\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\nfunction getTextSize(text) {\n\tlet size = 0;\n\tfor (let indexCharacter = 0; indexCharacter < text.length; indexCharacter++) {\n\t\tconst characterCode = text.charCodeAt(indexCharacter);\n\t\tif (characterCode < 0x80) {\n\t\t\tsize += 1;\n\t\t} else if (characterCode < 0x800) {\n\t\t\tsize += 2;\n\t\t} else if (characterCode < 0xd800 || characterCode >= 0xe000) {\n\t\t\tsize += 3;\n\t\t} else if (characterCode < 0xdc00 && (text.charCodeAt(indexCharacter + 1) & 0xfc00) == 0xdc00) {\n\t\t\tsize += 4;\n\t\t\tindexCharacter++;\n\t\t} else {\n\t\t\tsize += 3;\n\t\t}\n\t}\n\treturn size;\n}\n\nclass TextWriter extends BlobWriter {\n\n\tconstructor(encoding) {\n\t\tsuper();\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\treturn decodeTextRemovingBOM(new Uint8Array(await blob.arrayBuffer()), encoding);\n\t\t}\n\t}\n}\n\nclass FetchReader extends Reader {\n\n\tconstructor(url, options) {\n\t\tsuper();\n\t\tcreateHttpReader(this, url, options);\n\t}\n\n\tasync init() {\n\t\tawait initHttpReader(this, sendFetchRequest, getFetchRequestData);\n\t\tsuper.init();\n\t}\n\n\tcreateReadable(options) {\n\t\tconst reader = this;\n\t\tconst { useRangeHeader, forceRangeRequests, size, eocdCache } = reader;\n\t\tif ((useRangeHeader || forceRangeRequests) && size !== UNDEFINED_VALUE) {\n\t\t\tconst { offset = 0, size: readSize = size - offset } = options || {};\n\t\t\tconst cached = eocdCache && offset >= size - eocdCache.length;\n\t\t\tif (readSize > 0 && offset < size && !cached) {\n\t\t\t\treturn createRangeReadable(reader, offset, Math.min(readSize, size - offset));\n\t\t\t}\n\t\t}\n\t\treturn super.createReadable(options);\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\tcreateHttpReader(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 createHttpReader(httpReader, url, options) {\n\tconst {\n\t\tpreventHeadRequest,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests,\n\t\tcombineSizeEocd,\n\t\tcheckResourceChanges = true,\n\t\tmaximumRangeSize = DEFAULT_MAXIMUM_RANGE_SIZE,\n\t\tfetch\n\t} = options;\n\toptions = Object.assign({}, options);\n\tdelete options.preventHeadRequest;\n\tdelete options.useRangeHeader;\n\tdelete options.forceRangeRequests;\n\tdelete options.combineSizeEocd;\n\tdelete options.checkResourceChanges;\n\tdelete options.maximumRangeSize;\n\tdelete options.useXHR;\n\tdelete options.fetch;\n\tObject.assign(httpReader, {\n\t\turl,\n\t\toptions,\n\t\tpreventHeadRequest,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests,\n\t\tcombineSizeEocd,\n\t\tcheckResourceChanges,\n\t\tmaximumRangeSize,\n\t\tfetch\n\t});\n}\n\nasync function initHttpReader(httpReader, sendRequest, getRequestData) {\n\tconst {\n\t\turl,\n\t\tpreventHeadRequest,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests,\n\t\tcombineSizeEocd\n\t} = httpReader;\n\tif (isHttpFamily(url) && (useRangeHeader || forceRangeRequests) && (typeof preventHeadRequest == UNDEFINED_TYPE || preventHeadRequest)) {\n\t\tconst response = await sendRequest(HTTP_METHOD_GET, httpReader, getRangeHeaders(httpReader, combineSizeEocd ? -END_OF_CENTRAL_DIR_SEARCH_LENGTH : undefined));\n\t\tconst acceptRanges = response.headers.get(HTTP_HEADER_ACCEPT_RANGES);\n\t\tif (!forceRangeRequests && (!acceptRanges || acceptRanges.toLowerCase() != HTTP_RANGE_UNIT)) {\n\t\t\tthrow new Error(ERR_HTTP_RANGE);\n\t\t} else {\n\t\t\tlet eocdCache;\n\t\t\tif (combineSizeEocd && response.status == 206) {\n\t\t\t\teocdCache = new Uint8Array(await response.arrayBuffer());\n\t\t\t}\n\t\t\tsetResourceValidators(httpReader, response);\n\t\t\tconst contentSize = getContentRangeSize(response);\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\tif (eocdCache && eocdCache.length && getContentRangeOffset(response) === httpReader.size - eocdCache.length) {\n\t\t\t\thttpReader.eocdCache = eocdCache;\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\teocdCache,\n\t\tsize,\n\t\toptions\n\t} = httpReader;\n\tif (useRangeHeader || forceRangeRequests) {\n\t\tif (index >= size || length === 0) {\n\t\t\treturn EMPTY_UINT8_ARRAY;\n\t\t} else {\n\t\t\tif (index + length > size) {\n\t\t\t\tlength = size - index;\n\t\t\t}\n\t\t\tif (eocdCache && index >= size - eocdCache.length) {\n\t\t\t\tconst cacheIndex = index - (size - eocdCache.length);\n\t\t\t\treturn eocdCache.slice(cacheIndex, cacheIndex + length);\n\t\t\t}\n\t\t\tconst response = await sendRequest(HTTP_METHOD_GET, httpReader, getRangeHeaders(httpReader, index, length));\n\t\t\tif (response.status != 206) {\n\t\t\t\tthrow new Error(ERR_HTTP_RANGE);\n\t\t\t}\n\t\t\tconst rangeStart = getContentRangeOffset(response);\n\t\t\tif (rangeStart !== UNDEFINED_VALUE && rangeStart != index) {\n\t\t\t\tthrow new Error(ERR_HTTP_RANGE);\n\t\t\t}\n\t\t\tcheckResourceValidators(httpReader, response);\n\t\t\tsetResourceValidators(httpReader, response);\n\t\t\tconst data = new Uint8Array(await response.arrayBuffer());\n\t\t\tif (data.length != length) {\n\t\t\t\tthrow new Error(ERR_HTTP_RANGE);\n\t\t\t}\n\t\t\treturn data;\n\t\t}\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 httpReader.data.subarray(index, index + length);\n\t}\n}\n\nfunction createRangeReadable(httpReader, offset, size) {\n\tlet bodyReader;\n\tlet windowOffset = offset;\n\tlet windowRemainingLength = 0;\n\tlet remainingLength = size;\n\treturn new ReadableStream({\n\t\tstart() {\n\t\t\treturn openWindow();\n\t\t},\n\t\tasync pull(controller) {\n\t\t\tif (!bodyReader) {\n\t\t\t\tawait openWindow();\n\t\t\t}\n\t\t\tconst { value, done } = await bodyReader.read();\n\t\t\tif (done) {\n\t\t\t\tthrow new Error(ERR_HTTP_RANGE);\n\t\t\t}\n\t\t\tconst chunk = value.length > windowRemainingLength ? value.subarray(0, windowRemainingLength) : value;\n\t\t\twindowRemainingLength -= chunk.length;\n\t\t\tremainingLength -= chunk.length;\n\t\t\tif (chunk.length) {\n\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t}\n\t\t\tif (!windowRemainingLength) {\n\t\t\t\tawait closeWindow();\n\t\t\t\tif (!remainingLength) {\n\t\t\t\t\tcontroller.close();\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tcancel(reason) {\n\t\t\treturn bodyReader && bodyReader.cancel(reason);\n\t\t}\n\t});\n\n\tasync function openWindow() {\n\t\tconst windowLength = Math.min(httpReader.maximumRangeSize, remainingLength);\n\t\tconst response = await sendFetchRequest(HTTP_METHOD_GET, httpReader, getRangeHeaders(httpReader, windowOffset, windowLength));\n\t\tif (response.status != 206) {\n\t\t\tthrow new Error(ERR_HTTP_RANGE);\n\t\t}\n\t\tconst rangeStart = getContentRangeOffset(response);\n\t\tif (rangeStart !== UNDEFINED_VALUE && rangeStart != windowOffset) {\n\t\t\tthrow new Error(ERR_HTTP_RANGE);\n\t\t}\n\t\tcheckResourceValidators(httpReader, response);\n\t\tsetResourceValidators(httpReader, response);\n\t\twindowOffset += windowLength;\n\t\twindowRemainingLength = windowLength;\n\t\tbodyReader = response.body.getReader();\n\t}\n\n\tasync function closeWindow() {\n\t\tconst currentBodyReader = bodyReader;\n\t\tbodyReader = UNDEFINED_VALUE;\n\t\tawait currentBodyReader.cancel();\n\t}\n}\n\nfunction getContentRangeOffset(response) {\n\tconst contentRangeHeader = response.headers.get(HTTP_HEADER_CONTENT_RANGE);\n\tif (contentRangeHeader) {\n\t\tconst rangeStart = Number(contentRangeHeader.trim().split(/[\\s-]+/)[1]);\n\t\tif (!Number.isNaN(rangeStart)) {\n\t\t\treturn rangeStart;\n\t\t}\n\t}\n}\n\nfunction getContentRangeSize(response) {\n\tconst contentRangeHeader = response.headers.get(HTTP_HEADER_CONTENT_RANGE);\n\tif (contentRangeHeader) {\n\t\tconst headerValue = contentRangeHeader.trim().split(/\\s*\\/\\s*/)[1];\n\t\tif (headerValue && headerValue != \"*\") {\n\t\t\tconst contentSize = Number(headerValue);\n\t\t\tif (!Number.isNaN(contentSize)) {\n\t\t\t\treturn contentSize;\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction getResourceValidators({ headers }) {\n\treturn {\n\t\tetag: headers.get(HTTP_HEADER_ETAG) || UNDEFINED_VALUE,\n\t\tlastModified: headers.get(HTTP_HEADER_LAST_MODIFIED) || UNDEFINED_VALUE\n\t};\n}\n\nfunction setResourceValidators(httpReader, response) {\n\tconst { checkResourceChanges, resourceValidators } = httpReader;\n\tif (checkResourceChanges && !resourceValidators && response.status == 206) {\n\t\thttpReader.resourceValidators = getResourceValidators(response);\n\t}\n}\n\nfunction checkResourceValidators(httpReader, response) {\n\tconst { checkResourceChanges, resourceValidators, size } = httpReader;\n\tif (checkResourceChanges) {\n\t\tconst contentRangeSize = getContentRangeSize(response);\n\t\tif (contentRangeSize !== UNDEFINED_VALUE && size !== UNDEFINED_VALUE && contentRangeSize != size) {\n\t\t\tthrow new Error(ERR_HTTP_RESOURCE_CHANGED);\n\t\t}\n\t\tif (resourceValidators) {\n\t\t\tconst validators = getResourceValidators(response);\n\t\t\tconst changed = Object.entries(resourceValidators).some(([name, value]) =>\n\t\t\t\tvalue !== UNDEFINED_VALUE && validators[name] !== UNDEFINED_VALUE && value != validators[name]);\n\t\t\tif (changed) {\n\t\t\t\tthrow new Error(ERR_HTTP_RESOURCE_CHANGED);\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction getRangeHeaders(httpReader, index = 0, length = 1) {\n\treturn Object.assign({}, getHeaders(httpReader), { [HTTP_HEADER_RANGE]: HTTP_RANGE_UNIT + \"=\" + (index < 0 ? index : 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\thttpReader.size = httpReader.data.length;\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 && !response.headers.get(HTTP_HEADER_CONTENT_ENCODING)) {\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, { fetch: fetchFunction = fetch, options, url }, headers) {\n\tconst response = await fetchFunction(url, Object.assign({}, options, { method, headers }));\n\tif (response.status >= MIN_SUCCESS_HTTP_STATUS && response.status <= MAX_SUCCESS_HTTP_STATUS) {\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 >= MIN_SUCCESS_HTTP_STATUS && request.status <= MAX_SUCCESS_HTTP_STATUS) {\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 ? event.detail.error : new Error(\"Network 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 && !options.fetch ? 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\tcreateReadable(options) {\n\t\treturn this.reader.createReadable(options);\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\tsuper(url, Object.assign({}, options, { useRangeHeader: true }));\n\t}\n}\n\n\nclass Uint8ArrayReader extends Reader {\n\n\tconstructor(array) {\n\t\tsuper();\n\t\tarray = new Uint8Array(array.buffer, array.byteOffset, array.byteLength);\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\tconstructor(defaultBufferSize) {\n\t\tsuper();\n\t\tthis.defaultBufferSize = defaultBufferSize || DEFAULT_BUFFER_SIZE;\n\t}\n\n\tinit(initSize = 0) {\n\t\tObject.assign(this, {\n\t\t\toffset: 0,\n\t\t\tarray: new Uint8Array(initSize > 0 ? initSize : this.defaultBufferSize)\n\t\t});\n\t\tsuper.init();\n\t}\n\n\twriteUint8Array(array) {\n\t\tconst writer = this;\n\t\tconst requiredLength = writer.offset + array.length;\n\t\tif (requiredLength > writer.array.length) {\n\t\t\tlet newLength = writer.array.length ? writer.array.length * 2 : writer.defaultBufferSize;\n\t\t\twhile (newLength < requiredLength) {\n\t\t\t\tnewLength *= 2;\n\t\t\t}\n\t\t\tconst previousArray = writer.array;\n\t\t\twriter.array = new Uint8Array(newLength);\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\tif (this.offset === this.array.length) {\n\t\t\treturn this.array;\n\t\t} else {\n\t\t\treturn this.array.slice(0, this.offset);\n\t\t}\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\treader.lastDiskNumber = 0;\n\t\tconst readers = reader.readers = await Promise.all(reader.readers.map(initDiskReader));\n\t\treader.diskOffsets = readers.map(diskReader => {\n\t\t\tconst diskOffset = reader.size;\n\t\t\treader.size += diskReader.size;\n\t\t\treturn diskOffset;\n\t\t});\n\t\tsuper.init();\n\t}\n\n\tgetDiskOffset(diskNumber) {\n\t\tconst { diskOffsets, size } = this;\n\t\tconst diskOffset = diskOffsets[diskNumber];\n\t\treturn diskOffset === UNDEFINED_VALUE ? size : diskOffset;\n\t}\n\n\tasync readUint8Array(offset, length) {\n\t\tconst reader = this;\n\t\tconst { readers } = this;\n\t\tlet result;\n\t\tlet currentDiskNumber = 0;\n\t\tlet currentReaderOffset = offset;\n\t\twhile (readers[currentDiskNumber] && 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\tif (currentReader) {\n\t\t\tconst currentReaderSize = currentReader.size;\n\t\t\tif (currentReaderOffset + length <= currentReaderSize) {\n\t\t\t\tresult = await readUint8Array(currentReader, currentReaderOffset, length);\n\t\t\t} else {\n\t\t\t\tconst chunkLength = currentReaderSize - currentReaderOffset;\n\t\t\t\tconst firstPart = await readUint8Array(currentReader, currentReaderOffset, chunkLength);\n\t\t\t\tconst secondPart = await reader.readUint8Array(offset + chunkLength, length - chunkLength);\n\t\t\t\tresult = concat(firstPart, secondPart);\n\t\t\t}\n\t\t} else {\n\t\t\tresult = EMPTY_UINT8_ARRAY;\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 writer = this;\n\t\tObject.assign(writer, {\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\tif (chunk === DISK_BOUNDARY) {\n\t\t\t\t\tif (diskWriter) {\n\t\t\t\t\t\tawait endDisk();\n\t\t\t\t\t}\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tconst { availableSize } = writer;\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\twriter.maxSize = diskSourceWriter.maxSize;\n\t\t\t\t\t\t}\n\t\t\t\t\t\twriter.availableSize = writer.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.subarray(0, availableSize));\n\t\t\t\t\tawait endDisk();\n\t\t\t\t\tif (chunk.length > availableSize) {\n\t\t\t\t\t\tawait this.write(chunk.subarray(availableSize));\n\t\t\t\t\t}\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\tif (diskWriter) {\n\t\t\t\t\tawait diskWriter.ready;\n\t\t\t\t\tawait closeDiskWriter();\n\t\t\t\t}\n\t\t\t},\n\t\t\tasync abort(reason) {\n\t\t\t\tif (diskWriter) {\n\t\t\t\t\tawait diskWriter.abort(reason);\n\t\t\t\t}\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\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\twriter.availableSize -= chunkLength;\n\t\t\t}\n\t\t}\n\n\t\tasync function endDisk() {\n\t\t\tawait closeDiskWriter();\n\t\t\twriter.diskOffset += diskSourceWriter.size;\n\t\t\twriter.diskNumber++;\n\t\t\tdiskWriter = null;\n\t\t\twriter.availableSize = writer.maxSize;\n\t\t}\n\n\t\tasync function closeDiskWriter() {\n\t\t\tawait diskWriter.close();\n\t\t}\n\t}\n\n\tasync closeDisk() {\n\t\tconst streamWriter = this.writable.getWriter();\n\t\ttry {\n\t\t\tawait streamWriter.ready;\n\t\t\tawait streamWriter.write(DISK_BOUNDARY);\n\t\t} finally {\n\t\t\tstreamWriter.releaseLock();\n\t\t}\n\t}\n}\n\nclass GenericReader {\n\n\tconstructor(reader) {\n\t\tif (Array.isArray(reader)) {\n\t\t\treader = new SplitDataReader(reader);\n\t\t}\n\t\tif (reader instanceof ReadableStream || typeof reader.getReader == FUNCTION_TYPE) {\n\t\t\treader = {\n\t\t\t\treadable: toCompatibleReadable(reader)\n\t\t\t};\n\t\t}\n\t\treturn reader;\n\t}\n}\n\nclass GenericWriter {\n\n\tconstructor(writer) {\n\t\tif (writer.writable === UNDEFINED_VALUE && typeof writer.next == FUNCTION_TYPE) {\n\t\t\twriter = new SplitDataWriter(writer);\n\t\t}\n\t\tif (writer instanceof WritableStream || typeof writer.getWriter == FUNCTION_TYPE) {\n\t\t\twriter = {\n\t\t\t\twritable: toCompatibleWritable(writer)\n\t\t\t};\n\t\t}\n\t\ttry {\n\t\t\twriter.size = writer.size === UNDEFINED_VALUE ? 0 : writer.size;\n\t\t} catch {\n\t\t\tthrow new Error(ERR_WRITER_SIZE_NOT_WRITABLE);\n\t\t}\n\t\treturn writer;\n\t}\n}\n\nfunction ownsWritable(writer) {\n\treturn Boolean(writer && writer.getData);\n}\n\nfunction isHttpFamily(url) {\n\tconst { baseURI } = getConfiguration();\n\tconst { protocol } = new URL(url, baseURI);\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} else {\n\t\treturn Promise.resolve();\n\t}\n}\n\nasync function initDiskReader(diskReader) {\n\tdiskReader = new GenericReader(diskReader);\n\tawait initStream(diskReader);\n\tif (diskReader.size === UNDEFINED_VALUE || !diskReader.readUint8Array) {\n\t\tdiskReader = new BlobReader(await streamToBlob(diskReader.readable));\n\t\tawait initStream(diskReader);\n\t}\n\treturn diskReader;\n}\n\nfunction readUint8Array(reader, offset, size) {\n\treturn reader.readUint8Array(offset, size);\n}\n\nfunction createReadable(reader, options) {\n\tif (reader.createReadable) {\n\t\treturn reader.createReadable(options);\n\t} else if (reader.readUint8Array) {\n\t\treturn Reader.prototype.createReadable.call(reader, options);\n\t} else {\n\t\treturn reader.readable;\n\t}\n}\n\nexport {\n\tinitStream,\n\tcreateReadable,\n\tGenericReader,\n\tGenericWriter,\n\townsWritable,\n\treadUint8Array,\n\tReader,\n\tWriter,\n\tTextReader,\n\tTextWriter,\n\tgetTextSize,\n\tData64URIReader,\n\tData64URIWriter,\n\tBlobReader,\n\tBlobWriter,\n\tUint8ArrayReader,\n\tUint8ArrayWriter,\n\tHttpReader,\n\tHttpRangeReader,\n\tSplitDataReader,\n\tSplitDataWriter,\n\tERR_HTTP_RANGE,\n\tERR_HTTP_STATUS,\n\tERR_HTTP_RESOURCE_CHANGED,\n\tERR_ITERATOR_COMPLETED_TOO_SOON,\n\tERR_WRITER_NOT_INITIALIZED,\n\tERR_WRITER_SIZE_NOT_WRITABLE\n};","/*\n Copyright (c) 2026 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\nimport { UNDEFINED_VALUE } from \"../constants.js\";\n\nexport { addWarning };\n\nfunction addWarning(warnings, reason, filename) {\n\tif (!warnings.some(warning => warning.reason == reason)) {\n\t\tconst warning = { reason };\n\t\tif (filename !== UNDEFINED_VALUE) {\n\t\t\twarning.filename = filename;\n\t\t}\n\t\twarnings.push(warning);\n\t}\n}\n","/*\n Copyright (c) 2025 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 {\n\tEXTRAFIELD_TYPE_ZIP64,\n\tEXTRAFIELD_TYPE_AES,\n\tEXTRAFIELD_TYPE_NTFS,\n\tEXTRAFIELD_TYPE_EXTENDED_TIMESTAMP,\n\tEXTRAFIELD_TYPE_UNICODE_PATH,\n\tEXTRAFIELD_TYPE_UNICODE_COMMENT,\n\tEXTRAFIELD_TYPE_USDZ,\n\tEXTRAFIELD_TYPE_INFOZIP,\n\tEXTRAFIELD_TYPE_UNIX,\n\tEXTRAFIELD_TYPE_UNIX_TYPE1,\n\tEXTRAFIELD_TYPE_PKWARE_UNIX\n} from \"./constants.js\";\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_UNCOMPRESSED_SIZE = \"uncompressedSize\";\nconst PROPERTY_NAME_COMPRESSED_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_ATTRIBUTES = \"internalFileAttributes\";\nconst PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTES = \"externalFileAttributes\";\nconst PROPERTY_NAME_MSDOS_ATTRIBUTES_RAW = \"msdosAttributesRaw\";\nconst PROPERTY_NAME_MSDOS_ATTRIBUTES = \"msdosAttributes\";\nconst PROPERTY_NAME_MS_DOS_COMPATIBLE = \"msDosCompatible\";\nconst PROPERTY_NAME_ZIP64 = \"zip64\";\nconst PROPERTY_NAME_ENCRYPTED = \"encrypted\";\nconst PROPERTY_NAME_VERSION = \"version\";\nconst PROPERTY_NAME_VERSION_MADE_BY = \"versionMadeBy\";\nconst PROPERTY_NAME_ZIPCRYPTO = \"zipCrypto\";\nconst PROPERTY_NAME_DIRECTORY = \"directory\";\nconst PROPERTY_NAME_EXECUTABLE = \"executable\";\nconst PROPERTY_NAME_SYMLINK = \"symlink\";\nconst PROPERTY_NAME_COMPRESSION_METHOD = \"compressionMethod\";\nconst PROPERTY_NAME_SIGNATURE = \"signature\";\nconst PROPERTY_NAME_CRC32 = \"crc32\";\nconst PROPERTY_NAME_EXTRA_FIELD = \"extraField\";\nconst PROPERTY_NAME_EXTRA_FIELD_INFOZIP = \"extraFieldInfoZip\";\nconst PROPERTY_NAME_EXTRA_FIELD_UNIX = \"extraFieldUnix\";\nconst PROPERTY_NAME_EXTRA_FIELD_UNIX_TYPE1 = \"extraFieldUnixType1\";\nconst PROPERTY_NAME_EXTRA_FIELD_PKWARE_UNIX = \"extraFieldPkwareUnix\";\nconst PROPERTY_NAME_UID = \"uid\";\nconst PROPERTY_NAME_GID = \"gid\";\nconst PROPERTY_NAME_UNIX_MODE = \"unixMode\";\nconst PROPERTY_NAME_SETUID = \"setuid\";\nconst PROPERTY_NAME_SETGID = \"setgid\";\nconst PROPERTY_NAME_STICKY = \"sticky\";\nconst PROPERTY_NAME_BITFLAG = \"bitFlag\";\nconst PROPERTY_NAME_RAW_BITFLAG = \"rawBitFlag\";\nconst PROPERTY_NAME_FILENAME_LENGTH = \"filenameLength\";\nconst PROPERTY_NAME_EXTRA_FIELD_LENGTH = \"extraFieldLength\";\nconst PROPERTY_NAME_UNIX_EXTERNAL_UPPER = \"unixExternalUpper\";\nconst PROPERTY_NAME_FILENAME_UTF8 = \"filenameUTF8\";\nconst PROPERTY_NAME_COMMENT_UTF8 = \"commentUTF8\";\nconst PROPERTY_NAME_RAW_EXTRA_FIELD = \"rawExtraField\";\nconst PROPERTY_NAME_EXTRA_FIELD_ZIP64 = \"extraFieldZip64\";\nconst PROPERTY_NAME_EXTRA_FIELD_UNICODE_PATH = \"extraFieldUnicodePath\";\nconst PROPERTY_NAME_EXTRA_FIELD_UNICODE_COMMENT = \"extraFieldUnicodeComment\";\nconst PROPERTY_NAME_EXTRA_FIELD_AES = \"extraFieldAES\";\nconst PROPERTY_NAME_EXTRA_FIELD_NTFS = \"extraFieldNTFS\";\nconst PROPERTY_NAME_EXTRA_FIELD_EXTENDED_TIMESTAMP = \"extraFieldExtendedTimestamp\";\nconst PROPERTY_NAME_EXTRA_FIELD_USDZ = \"extraFieldUSDZ\";\n\nconst PROPERTY_NAMES = [\n\tPROPERTY_NAME_FILENAME,\n\tPROPERTY_NAME_RAW_FILENAME,\n\tPROPERTY_NAME_UNCOMPRESSED_SIZE,\n\tPROPERTY_NAME_COMPRESSED_SIZE,\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_RAW_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_COMMENT,\n\tPROPERTY_NAME_RAW_COMMENT,\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_OFFSET,\n\tPROPERTY_NAME_DISK_NUMBER_START,\n\tPROPERTY_NAME_INTERNAL_FILE_ATTRIBUTES,\n\tPROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTES,\n\tPROPERTY_NAME_MSDOS_ATTRIBUTES_RAW,\n\tPROPERTY_NAME_MSDOS_ATTRIBUTES,\n\tPROPERTY_NAME_MS_DOS_COMPATIBLE,\n\tPROPERTY_NAME_ZIP64,\n\tPROPERTY_NAME_ENCRYPTED,\n\tPROPERTY_NAME_VERSION,\n\tPROPERTY_NAME_VERSION_MADE_BY,\n\tPROPERTY_NAME_ZIPCRYPTO,\n\tPROPERTY_NAME_DIRECTORY,\n\tPROPERTY_NAME_EXECUTABLE,\n\tPROPERTY_NAME_SYMLINK,\n\tPROPERTY_NAME_COMPRESSION_METHOD,\n\tPROPERTY_NAME_SIGNATURE,\n\tPROPERTY_NAME_CRC32,\n\tPROPERTY_NAME_EXTRA_FIELD,\n\tPROPERTY_NAME_EXTRA_FIELD_UNIX,\n\tPROPERTY_NAME_EXTRA_FIELD_INFOZIP,\n\tPROPERTY_NAME_EXTRA_FIELD_UNIX_TYPE1,\n\tPROPERTY_NAME_EXTRA_FIELD_PKWARE_UNIX,\n\tPROPERTY_NAME_UID,\n\tPROPERTY_NAME_GID,\n\tPROPERTY_NAME_UNIX_MODE,\n\tPROPERTY_NAME_UNIX_EXTERNAL_UPPER,\n\tPROPERTY_NAME_SETUID,\n\tPROPERTY_NAME_SETGID,\n\tPROPERTY_NAME_STICKY,\n\tPROPERTY_NAME_BITFLAG,\n\tPROPERTY_NAME_RAW_BITFLAG,\n\tPROPERTY_NAME_FILENAME_LENGTH,\n\tPROPERTY_NAME_EXTRA_FIELD_LENGTH,\n\tPROPERTY_NAME_FILENAME_UTF8,\n\tPROPERTY_NAME_COMMENT_UTF8,\n\tPROPERTY_NAME_RAW_EXTRA_FIELD,\n\tPROPERTY_NAME_EXTRA_FIELD_ZIP64,\n\tPROPERTY_NAME_EXTRA_FIELD_UNICODE_PATH,\n\tPROPERTY_NAME_EXTRA_FIELD_UNICODE_COMMENT,\n\tPROPERTY_NAME_EXTRA_FIELD_AES,\n\tPROPERTY_NAME_EXTRA_FIELD_NTFS,\n\tPROPERTY_NAME_EXTRA_FIELD_EXTENDED_TIMESTAMP,\n\tPROPERTY_NAME_EXTRA_FIELD_USDZ\n];\n\nclass Entry {\n\n\tconstructor(data) {\n\t\tPROPERTY_NAMES.forEach(name => this[name] = data[name]);\n\t}\n\n}\n\nconst INTERPRETED_EXTRA_FIELD_TYPES = new Set([\n\tEXTRAFIELD_TYPE_ZIP64,\n\tEXTRAFIELD_TYPE_AES,\n\tEXTRAFIELD_TYPE_NTFS,\n\tEXTRAFIELD_TYPE_EXTENDED_TIMESTAMP,\n\tEXTRAFIELD_TYPE_UNICODE_PATH,\n\tEXTRAFIELD_TYPE_UNICODE_COMMENT,\n\tEXTRAFIELD_TYPE_USDZ,\n\tEXTRAFIELD_TYPE_INFOZIP,\n\tEXTRAFIELD_TYPE_UNIX,\n\tEXTRAFIELD_TYPE_UNIX_TYPE1,\n\tEXTRAFIELD_TYPE_PKWARE_UNIX\n]);\n\nfunction getUserExtraField(extraField) {\n\tif (extraField) {\n\t\tconst userExtraField = new Map();\n\t\textraField.forEach((field, type) => {\n\t\t\tif (!INTERPRETED_EXTRA_FIELD_TYPES.has(type)) {\n\t\t\t\tuserExtraField.set(type, field.data);\n\t\t\t}\n\t\t});\n\t\tif (userExtraField.size) {\n\t\t\treturn userExtraField;\n\t\t}\n\t}\n}\n\nfunction getEncryptionOverhead(encrypted, zipCrypto, encryptionStrength) {\n\treturn encrypted ? (zipCrypto ? 12 : 16 + encryptionStrength * 4) : 0;\n}\n\nexport {\n\tPROPERTY_NAME_FILENAME,\n\tPROPERTY_NAME_RAW_FILENAME,\n\tPROPERTY_NAME_COMMENT,\n\tPROPERTY_NAME_RAW_COMMENT,\n\tPROPERTY_NAME_UNCOMPRESSED_SIZE,\n\tPROPERTY_NAME_COMPRESSED_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_ATTRIBUTES,\n\tPROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTES,\n\tPROPERTY_NAME_MSDOS_ATTRIBUTES_RAW,\n\tPROPERTY_NAME_MSDOS_ATTRIBUTES,\n\tPROPERTY_NAME_MS_DOS_COMPATIBLE,\n\tPROPERTY_NAME_ZIP64,\n\tPROPERTY_NAME_ENCRYPTED,\n\tPROPERTY_NAME_VERSION,\n\tPROPERTY_NAME_VERSION_MADE_BY,\n\tPROPERTY_NAME_ZIPCRYPTO,\n\tPROPERTY_NAME_DIRECTORY,\n\tPROPERTY_NAME_EXECUTABLE,\n\tPROPERTY_NAME_COMPRESSION_METHOD,\n\tPROPERTY_NAME_SIGNATURE,\n\tPROPERTY_NAME_CRC32,\n\tPROPERTY_NAME_EXTRA_FIELD,\n\tPROPERTY_NAME_GID,\n\tPROPERTY_NAME_UID,\n\tPROPERTY_NAME_UNIX_MODE,\n\tPROPERTY_NAME_SETUID,\n\tPROPERTY_NAME_SETGID,\n\tPROPERTY_NAME_STICKY,\n\tEntry,\n\tgetEncryptionOverhead,\n\tgetUserExtraField\n};","/*\n Copyright (c) 2025 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 WritableStream, ReadableStream, TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tMAX_32_BITS,\n\tMAX_16_BITS,\n\tMAX_8_BITS,\n\tCOMPRESSION_METHOD_DEFLATE,\n\tCOMPRESSION_METHOD_STORE,\n\tCOMPRESSION_METHOD_AES,\n\tSPLIT_ZIP_FILE_SIGNATURE,\n\tTEMPORARY_SPLIT_ZIP_FILE_SIGNATURE,\n\tSPLIT_ZIP_FILE_SIGNATURE_LENGTH,\n\tDATA_DESCRIPTOR_RECORD_SIGNATURE,\n\tDATA_DESCRIPTOR_RECORD_LENGTH,\n\tDATA_DESCRIPTOR_RECORD_ZIP_64_LENGTH,\n\tDATA_DESCRIPTOR_RECORD_SIGNATURE_LENGTH,\n\tLOCAL_FILE_HEADER_SIGNATURE,\n\tARCHIVE_EXTRA_DATA_SIGNATURE,\n\tDIGITAL_SIGNATURE_RECORD_SIGNATURE,\n\tCENTRAL_FILE_HEADER_SIGNATURE,\n\tCENTRAL_FILE_HEADER_LENGTH,\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\tEXTRAFIELD_TYPE_INFOZIP,\n\tEXTRAFIELD_TYPE_UNIX,\n\tEXTRAFIELD_TYPE_UNIX_TYPE1,\n\tEXTRAFIELD_TYPE_PKWARE_UNIX,\n\tEXTRAFIELD_TYPE_USDZ,\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_STRONG_ENCRYPTION,\n\tBITFLAG_COMPRESSED_PATCHED_DATA,\n\tBITFLAG_MASKED_LOCAL_HEADERS,\n\tBITFLAG_LEVEL,\n\tBITFLAG_DATA_DESCRIPTOR,\n\tBITFLAG_LANG_ENCODING_FLAG,\n\tFILE_ATTR_MSDOS_DIR_MASK,\n\tFILE_ATTR_MSDOS_READONLY_MASK,\n\tFILE_ATTR_MSDOS_HIDDEN_MASK,\n\tFILE_ATTR_MSDOS_SYSTEM_MASK,\n\tFILE_ATTR_MSDOS_ARCHIVE_MASK,\n\tFILE_ATTR_UNIX_TYPE_MASK,\n\tFILE_ATTR_UNIX_TYPE_DIR,\n\tFILE_ATTR_UNIX_TYPE_SYMLINK,\n\tFILE_ATTR_UNIX_EXECUTABLE_MASK,\n\tFILE_ATTR_UNIX_DEFAULT_MASK,\n\tDIRECTORY_SIGNATURE,\n\tHEADER_SIZE,\n\tHEADER_OFFSET_SIGNATURE,\n\tHEADER_OFFSET_COMPRESSED_SIZE,\n\tHEADER_OFFSET_UNCOMPRESSED_SIZE,\n\tUNDEFINED_VALUE,\n\tCOMPRESSION_METHOD_DEFLATE_64,\n\tFILE_ATTR_UNIX_SETUID_MASK,\n\tFILE_ATTR_UNIX_SETGID_MASK,\n\tFILE_ATTR_UNIX_STICKY_MASK,\n\tNUMBER_TYPE,\n\tEMPTY_UINT8_ARRAY,\n\tSYMBOL_ASYNC_DISPOSE,\n\tMIN_DATE\n} from \"./constants.js\";\nimport { getConfiguration } from \"./configuration.js\";\nimport { getRegisteredCodec, ERR_UNSUPPORTED_COMPRESSION } from \"./codec-registry.js\";\nimport {\n\trunWorker,\n\tCODEC_INFLATE,\n\tERR_INVALID_CRC32,\n\tERR_INVALID_AUTHENTICATION_CODE,\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_UNCOMPRESSED_SIZE,\n\tERR_INVALID_COMPRESSED_DATA,\n\tERR_CODEC_OUT_OF_MEMORY,\n\tERR_ABORT_CHECK_PASSWORD,\n\tERR_WORKER_STARTUP_TIMEOUT\n} from \"./codec-pool.js\";\nimport {\n\tinitStream,\n\treadUint8Array,\n\tBlobReader,\n\tGenericReader,\n\tGenericWriter,\n\townsWritable\n} from \"./io.js\";\nimport { decodeText, isUTF8Text } from \"./util/decode-text.js\";\nimport { getDataView } from \"./util/array.js\";\nimport { addWarning } from \"./util/warnings.js\";\nimport { toCompatibleReadable, streamToBlob } from \"./util/compatible-streams.js\";\nimport { isErrorObject } from \"./util/error.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_UNCOMPRESSED_SIZE,\n\tPROPERTY_NAME_COMPRESSED_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\tgetEncryptionOverhead\n} from \"./zip-entry.js\";\nimport {\n\tOPTION_FILENAME_ENCODING,\n\tOPTION_COMMENT_ENCODING,\n\tOPTION_DECODE_TEXT,\n\tOPTION_EXTRACT_PREPENDED_DATA,\n\tOPTION_EXTRACT_APPENDED_DATA,\n\tOPTION_PASSWORD,\n\tOPTION_RAW_PASSWORD,\n\tOPTION_PASS_THROUGH,\n\tOPTION_SIGNAL,\n\tOPTION_CHECK_PASSWORD_ONLY,\n\tOPTION_CHECK_OVERLAPPING_ENTRY_ONLY,\n\tOPTION_CHECK_OVERLAPPING_ENTRY,\n\tOPTION_CHECK_AMBIGUITY,\n\tOPTION_CHECK_LOCAL_DIRECTORY,\n\tOPTION_CHECK_LOCAL_FILENAME,\n\tOPTION_CHECK_SIGNATURE,\n\tOPTION_CHECK_CRC32,\n\tOPTION_CHECK_AUTHENTICATION_CODE,\n\tOPTION_STRICTNESS,\n\tOPTION_FILENAME_VALIDATION,\n\tOPTION_NORMALIZE_FILENAME,\n\tOPTION_MAX_APPENDED_DATA_SIZE,\n\tOPTION_DECRYPT_CENTRAL_DIRECTORY,\n\tTEXT_TYPE_FILENAME,\n\tTEXT_TYPE_COMMENT,\n\tSTRICTNESS_STRICT,\n\tSTRICTNESS_BALANCED,\n\tSTRICTNESS_TOLERANT,\n\tOPTION_USE_WEB_WORKERS,\n\tOPTION_USE_COMPRESSION_STREAM,\n\tOPTION_TRANSFER_STREAMS,\n\tOPTION_PREVENT_CLOSE,\n\tcheckFunctionOption,\n\tcheckSignalOption,\n\tthrowIfAborted,\n\tcheckPasswordOption,\n\tcheckPassThroughOption,\n\ttoNumber\n} from \"./options.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_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_SPLIT_ZIP_FILE = \"Split zip file\";\nconst ERR_OVERLAPPING_ENTRY = \"Overlapping entry found\";\nconst ERR_ENTRY_DATA_OUT_OF_BOUNDS = \"Entry data out of bounds\";\nconst ERR_AMBIGUOUS_ARCHIVE = \"Ambiguous archive\";\nconst ERR_ENCRYPTED_CENTRAL_DIRECTORY = \"Encrypted central directory is not supported\";\nconst ERR_UNSAFE_FILENAME = \"Unsafe filename\";\nconst ERR_INVALID_STRICTNESS = \"Invalid strictness (must be 'strict', 'balanced' or 'tolerant')\";\nconst ERR_INVALID_FILENAME_VALIDATION = \"Invalid filenameValidation (must be 'strict', 'balanced' or 'tolerant')\";\nconst ERR_INVALID_MAX_APPENDED_DATA_SIZE = \"Invalid maxAppendedDataSize (must be a number greater than or equal to 0)\";\nconst ERR_UNSUPPORTED_UINT64 = \"64-bit value exceeds Number.MAX_SAFE_INTEGER\";\nconst WARNING_UNSORTED_CENTRAL_DIRECTORY = \"unsorted central directory\";\nconst WARNING_UNKNOWN_VERSION = \"unknown version needed to extract\";\nconst WARNING_COMPRESSED_PATCHED_DATA = \"compressed patched data\";\nconst WARNING_MALFORMED_EXTRA_FIELD = \"malformed extra field\";\nconst WARNING_UNKNOWN_ZIP64_EXTENSIBLE_DATA = \"unknown zip64 extensible data\";\nconst WARNING_WRAPPED_ENTRIES_COUNT = \"wrapped entries count\";\nconst WARNING_APPENDED_DATA = \"appended data\";\nconst WARNING_PREPENDED_DATA = \"prepended data\";\nconst WARNING_PREPENDED_CENTRAL_DIRECTORY = \"prepended central directory\";\nconst WARNING_TRAILING_CENTRAL_DIRECTORY_DATA = \"trailing central directory data\";\nconst WARNING_DUPLICATE_FILENAME = \"duplicate filename\";\nconst WARNING_MISMATCHED_ZIP64_END_OF_CENTRAL_DIRECTORY = \"mismatched zip64 end of central directory record\";\nconst WARNING_MULTIPLE_END_OF_CENTRAL_DIRECTORY = \"multiple end of central directory records\";\nconst WARNING_MISMATCHED_LOCAL_FILE_HEADER_FILENAME = \"mismatched local file header (filename)\";\nconst WARNING_MISMATCHED_LOCAL_FILE_HEADER_BIT_FLAG = \"mismatched local file header (general purpose bit flag)\";\nconst WARNING_MISMATCHED_LOCAL_FILE_HEADER_COMPRESSION_METHOD = \"mismatched local file header (compression method)\";\nconst WARNING_MISMATCHED_LOCAL_FILE_HEADER_CRC32_OR_SIZES = \"mismatched local file header (crc32 or sizes)\";\nconst MAX_KNOWN_VERSION = 63;\nconst DRIVE_LETTER_REGEXP = /^[a-zA-Z]:/;\nconst PARENT_DIRECTORY_REGEXP = /(^|[\\\\/])\\.\\.([\\\\/]|$)/;\nconst CHARSET_UTF8 = \"utf-8\";\nconst PROPERTY_NAME_UTF8_SUFFIX = \"UTF8\";\nconst CHARSET_CP437 = \"cp437\";\nconst BITFLAG_AMBIGUITY_MASK = BITFLAG_ENCRYPTED | BITFLAG_DATA_DESCRIPTOR | BITFLAG_STRONG_ENCRYPTION | BITFLAG_LANG_ENCODING_FLAG;\nconst VENDOR_VERSION_AE_1 = 1;\nconst ZIP64_PROPERTIES = [\n\t[PROPERTY_NAME_UNCOMPRESSED_SIZE, MAX_32_BITS],\n\t[PROPERTY_NAME_COMPRESSED_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};\nconst MAX_SAFE_UINT64 = BigInt(Number.MAX_SAFE_INTEGER);\nconst MAX_END_OF_CENTRAL_DIR_PROBES = 64;\nconst MAX_DEFLATE_EXPANSION_RATIO = 1032;\nconst CENTRAL_DIRECTORY_UNREACHABLE = 0;\nconst CENTRAL_DIRECTORY_PLAUSIBLE = 1;\nconst CENTRAL_DIRECTORY_REACHABLE = 2;\n\nclass ZipReader {\n\n\tconstructor(reader, options = {}) {\n\t\tObject.assign(this, {\n\t\t\treader: new GenericReader(reader),\n\t\t\toptions,\n\t\t\treadRanges: { indexes: new Set(), sortedRanges: [], pendingRanges: [] }\n\t\t});\n\t}\n\n\tasync* getEntriesGenerator(options = {}) {\n\t\tconst zipReader = this;\n\t\tlet { reader } = zipReader;\n\t\tawait initStream(reader);\n\t\tif (reader.size === UNDEFINED_VALUE || !reader.readUint8Array) {\n\t\t\treader = new BlobReader(await streamToBlob(reader.readable));\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\tconst warnings = zipReader.warnings = [];\n\t\tconst strictness = getStrictness(options, zipReader.options);\n\t\tconst checkAmbiguity = strictness == STRICTNESS_STRICT;\n\t\tconst rejectAmbiguousEndOfDirectory = strictness != STRICTNESS_TOLERANT;\n\t\tconst maxAppendedDataSize = getMaxAppendedDataSize(getOptionValue(zipReader, options, OPTION_MAX_APPENDED_DATA_SIZE), strictness);\n\t\tconst filenameValidation = getFilenameValidation(getOptionValue(zipReader, options, OPTION_FILENAME_VALIDATION), strictness);\n\t\tconst normalizeFilename = getOptionValue(zipReader, options, OPTION_NORMALIZE_FILENAME);\n\t\tconst { endOfDirectoryInfo, endOfDirectoryReachingEndCount } = await findEndOfCentralDirectory(reader, rejectAmbiguousEndOfDirectory, maxAppendedDataSize);\n\t\tif (!endOfDirectoryInfo) {\n\t\t\tif (await startsWithSplitZipSignature(reader)) {\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\tif (rejectAmbiguousEndOfDirectory && endOfDirectoryReachingEndCount > 1) {\n\t\t\tthrowAmbiguousArchive(WARNING_MULTIPLE_END_OF_CENTRAL_DIRECTORY);\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\tconst appendedDataLength = reader.size - appendedDataOffset;\n\t\tif (appendedDataLength > maxAppendedDataSize) {\n\t\t\tthrowAmbiguousArchive(WARNING_APPENDED_DATA);\n\t\t}\n\t\tif (appendedDataLength > 0) {\n\t\t\taddWarning(warnings, WARNING_APPENDED_DATA);\n\t\t}\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, 10);\n\t\tlet prependedDataLength = 0;\n\t\tlet prependedCentralDirectory;\n\t\tlet startOffset;\n\t\tlet zip64EndOfDirectory;\n\t\tlet zip64EndOfDirectoryVersion2;\n\t\tlet zip64EndOfDirectoryLength = ZIP64_END_OF_CENTRAL_DIR_LENGTH;\n\t\tlet directoryEncryptionInfo;\n\t\tconst requiresZip64 = directoryDataOffset == MAX_32_BITS || directoryDataLength == MAX_32_BITS || filesLength == MAX_16_BITS || diskNumber == MAX_16_BITS;\n\t\tif (directoryDataOffset != MAX_32_BITS && diskNumber != MAX_16_BITS) {\n\t\t\tdirectoryDataOffset += getDiskOffset(reader, diskNumber);\n\t\t}\n\t\tif (requiresZip64) {\n\t\t\tconst endOfDirectoryLocatorArray = endOfDirectoryInfo.offset >= ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH ?\n\t\t\t\tawait readUint8Array(reader, endOfDirectoryInfo.offset - ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH, ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH) :\n\t\t\t\tEMPTY_UINT8_ARRAY;\n\t\t\tconst endOfDirectoryLocatorView = getDataView(endOfDirectoryLocatorArray);\n\t\t\tif (endOfDirectoryLocatorArray.length == ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH &&\n\t\t\t\tgetUint32(endOfDirectoryLocatorView, 0) == ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE) {\n\t\t\t\tdirectoryDataOffset = getDiskOffset(reader, getUint32(endOfDirectoryLocatorView, 4)) + getBigUint64(endOfDirectoryLocatorView, 8);\n\t\t\t\tlet endOfDirectoryArray = await readUint8Array(reader, directoryDataOffset, ZIP64_END_OF_CENTRAL_DIR_LENGTH);\n\t\t\t\tlet endOfDirectoryView = getDataView(endOfDirectoryArray);\n\t\t\t\tconst expectedDirectoryDataOffset = endOfDirectoryInfo.offset - ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH - ZIP64_END_OF_CENTRAL_DIR_LENGTH;\n\t\t\t\tif ((endOfDirectoryArray.length < ZIP64_END_OF_CENTRAL_DIR_LENGTH || getUint32(endOfDirectoryView, 0) != ZIP64_END_OF_CENTRAL_DIR_SIGNATURE) &&\n\t\t\t\t\tdirectoryDataOffset != expectedDirectoryDataOffset && expectedDirectoryDataOffset >= 0) {\n\t\t\t\t\tconst originalDirectoryDataOffset = directoryDataOffset;\n\t\t\t\t\tdirectoryDataOffset = expectedDirectoryDataOffset;\n\t\t\t\t\tif (directoryDataOffset > originalDirectoryDataOffset) {\n\t\t\t\t\t\tprependedDataLength = directoryDataOffset - originalDirectoryDataOffset;\n\t\t\t\t\t}\n\t\t\t\t\tendOfDirectoryArray = await readUint8Array(reader, directoryDataOffset, ZIP64_END_OF_CENTRAL_DIR_LENGTH);\n\t\t\t\t\tendOfDirectoryView = getDataView(endOfDirectoryArray);\n\t\t\t\t}\n\t\t\t\tif (endOfDirectoryArray.length < ZIP64_END_OF_CENTRAL_DIR_LENGTH || getUint32(endOfDirectoryView, 0) != ZIP64_END_OF_CENTRAL_DIR_SIGNATURE) {\n\t\t\t\t\tthrow new Error(ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND);\n\t\t\t\t}\n\t\t\t\tzip64EndOfDirectory = true;\n\t\t\t\tzip64EndOfDirectoryVersion2 = getBigUint64(endOfDirectoryView, 4) > ZIP64_END_OF_CENTRAL_DIR_LENGTH - 12;\n\t\t\t\tif (zip64EndOfDirectoryVersion2) {\n\t\t\t\t\tconst extensibleDataLength = Math.min(\n\t\t\t\t\t\tgetBigUint64(endOfDirectoryView, 4) - (ZIP64_END_OF_CENTRAL_DIR_LENGTH - 12),\n\t\t\t\t\t\treader.size - directoryDataOffset - ZIP64_END_OF_CENTRAL_DIR_LENGTH);\n\t\t\t\t\tif (extensibleDataLength > 0) {\n\t\t\t\t\t\tzip64EndOfDirectoryLength += extensibleDataLength;\n\t\t\t\t\t\tconst rawExtensibleData = await readUint8Array(reader, directoryDataOffset + ZIP64_END_OF_CENTRAL_DIR_LENGTH, extensibleDataLength);\n\t\t\t\t\t\tdirectoryEncryptionInfo = getDirectoryEncryptionInfo(rawExtensibleData);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (lastDiskNumber == MAX_16_BITS) {\n\t\t\t\t\tlastDiskNumber = getUint32(endOfDirectoryView, 16);\n\t\t\t\t} else if (lastDiskNumber != getUint32(endOfDirectoryView, 16)) {\n\t\t\t\t\treportAmbiguity(checkAmbiguity, warnings, WARNING_MISMATCHED_ZIP64_END_OF_CENTRAL_DIRECTORY);\n\t\t\t\t}\n\t\t\t\tif (diskNumber == MAX_16_BITS) {\n\t\t\t\t\tdiskNumber = getUint32(endOfDirectoryView, 20);\n\t\t\t\t} else if (diskNumber != getUint32(endOfDirectoryView, 20)) {\n\t\t\t\t\treportAmbiguity(checkAmbiguity, warnings, WARNING_MISMATCHED_ZIP64_END_OF_CENTRAL_DIRECTORY);\n\t\t\t\t}\n\t\t\t\tif (filesLength == MAX_16_BITS) {\n\t\t\t\t\tfilesLength = getBigUint64(endOfDirectoryView, 32);\n\t\t\t\t} else if (filesLength != getBigUint64(endOfDirectoryView, 32)) {\n\t\t\t\t\treportAmbiguity(checkAmbiguity, warnings, WARNING_MISMATCHED_ZIP64_END_OF_CENTRAL_DIRECTORY);\n\t\t\t\t}\n\t\t\t\tif (directoryDataLength == MAX_32_BITS) {\n\t\t\t\t\tdirectoryDataLength = getBigUint64(endOfDirectoryView, 40);\n\t\t\t\t} else if (directoryDataLength != getBigUint64(endOfDirectoryView, 40)) {\n\t\t\t\t\treportAmbiguity(checkAmbiguity, warnings, WARNING_MISMATCHED_ZIP64_END_OF_CENTRAL_DIRECTORY);\n\t\t\t\t}\n\t\t\t\tdirectoryDataOffset = getDiskOffset(reader, diskNumber) + getBigUint64(endOfDirectoryView, 48) + prependedDataLength;\n\t\t\t}\n\t\t}\n\t\tlet declaredDirectoryDataLength = directoryDataLength;\n\t\tconst centralDirectoryEndOffset = endOfDirectoryInfo.offset -\n\t\t\t(zip64EndOfDirectory ? zip64EndOfDirectoryLength + ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH : 0);\n\t\tif (directoryDataOffset >= reader.size) {\n\t\t\tprependedDataLength = reader.size - directoryDataOffset - directoryDataLength - END_OF_CENTRAL_DIR_LENGTH;\n\t\t\tdirectoryDataOffset = reader.size - directoryDataLength - END_OF_CENTRAL_DIR_LENGTH;\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) {\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);\n\t\tlet directoryView = getDataView(directoryArray);\n\t\tif (directoryDataLength) {\n\t\t\tif (directoryArray.length < 4) {\n\t\t\t\tthrow new Error(ERR_BAD_FORMAT);\n\t\t\t}\n\t\t\tconst expectedDirectoryDataOffset = centralDirectoryEndOffset - directoryDataLength;\n\t\t\tif (directoryDataOffset != expectedDirectoryDataOffset && diskNumber == lastDiskNumber) {\n\t\t\t\tconst storedPointsAtDirectory = getUint32(directoryView, offset) == CENTRAL_FILE_HEADER_SIGNATURE ||\n\t\t\t\t\tBoolean(directoryEncryptionInfo && directoryEncryptionInfo.compressedSize) ||\n\t\t\t\t\tdetectEncryptedCentralDirectory(directoryView);\n\t\t\t\tlet reconcile = !storedPointsAtDirectory;\n\t\t\t\tif (!reconcile && expectedDirectoryDataOffset >= 0 && expectedDirectoryDataOffset + 4 <= reader.size) {\n\t\t\t\t\tconst expectedSignatureArray = await readUint8Array(reader, expectedDirectoryDataOffset, 4);\n\t\t\t\t\treconcile = getUint32(getDataView(expectedSignatureArray), 0) == CENTRAL_FILE_HEADER_SIGNATURE;\n\t\t\t\t}\n\t\t\t\tif (reconcile) {\n\t\t\t\t\tconst originalDirectoryDataOffset = directoryDataOffset;\n\t\t\t\t\tdirectoryDataOffset = expectedDirectoryDataOffset;\n\t\t\t\t\tif (directoryDataOffset > originalDirectoryDataOffset) {\n\t\t\t\t\t\tprependedDataLength += directoryDataOffset - originalDirectoryDataOffset;\n\t\t\t\t\t\tprependedCentralDirectory = storedPointsAtDirectory;\n\t\t\t\t\t}\n\t\t\t\t\tdirectoryArray = await readUint8Array(reader, directoryDataOffset, directoryDataLength);\n\t\t\t\t\tdirectoryView = getDataView(directoryArray);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tconst expectedDirectoryDataLength = centralDirectoryEndOffset - directoryDataOffset;\n\t\tif (directoryDataLength != expectedDirectoryDataLength && expectedDirectoryDataLength >= 0 && diskNumber == lastDiskNumber) {\n\t\t\tdirectoryDataLength = expectedDirectoryDataLength;\n\t\t\tdirectoryArray = await readUint8Array(reader, directoryDataOffset, directoryDataLength);\n\t\t\tdirectoryView = getDataView(directoryArray);\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\tzipReader.directoryOffset = directoryDataOffset;\n\t\tzipReader.directoryLength = declaredDirectoryDataLength;\n\t\tconst decryptCentralDirectory = getFunctionOptionValue(zipReader, options, OPTION_DECRYPT_CENTRAL_DIRECTORY);\n\t\tlet decryptedDirectory, dataAfterEncryptedDirectory;\n\t\tif (decryptCentralDirectory && filesLength && directoryArray.length >= 4 &&\n\t\t\tgetUint32(directoryView, 0) != CENTRAL_FILE_HEADER_SIGNATURE &&\n\t\t\t(zip64EndOfDirectoryVersion2 || detectEncryptedCentralDirectory(directoryView))) {\n\t\t\tconst encryptedDirectoryDataLength = getEncryptedDirectoryDataLength(directoryEncryptionInfo, declaredDirectoryDataLength, directoryArray.length);\n\t\t\tdataAfterEncryptedDirectory = directoryArray.subarray(encryptedDirectoryDataLength);\n\t\t\tdirectoryArray = await decryptCentralDirectory(directoryArray.subarray(0, encryptedDirectoryDataLength), directoryEncryptionInfo);\n\t\t\tdirectoryView = getDataView(directoryArray);\n\t\t\tdeclaredDirectoryDataLength = directoryArray.length;\n\t\t\tdecryptedDirectory = true;\n\t\t}\n\t\tif (directoryEncryptionInfo && !decryptedDirectory &&\n\t\t\t(directoryArray.length < 4 || getUint32(directoryView, 0) == CENTRAL_FILE_HEADER_SIGNATURE)) {\n\t\t\taddWarning(warnings, WARNING_UNKNOWN_ZIP64_EXTENSIBLE_DATA);\n\t\t}\n\t\tstartOffset = directoryDataOffset;\n\t\tconst filenameEncoding = getOptionValue(zipReader, options, OPTION_FILENAME_ENCODING);\n\t\tconst commentEncoding = getOptionValue(zipReader, options, OPTION_COMMENT_ENCODING);\n\t\tconst filenames = new Set();\n\t\tlet duplicateFilename;\n\t\tlet previousEntryPosition = -1;\n\t\tconst recoverWrappedFilesLength = !checkAmbiguity && !zip64EndOfDirectory;\n\t\tif (!filesLength && recoverWrappedFilesLength) {\n\t\t\tfilesLength = getWrappedFilesLength(directoryView, directoryArray, offset);\n\t\t\tif (filesLength) {\n\t\t\t\taddWarning(warnings, WARNING_WRAPPED_ENTRIES_COUNT);\n\t\t\t}\n\t\t}\n\t\tfor (let indexFile = 0; indexFile < filesLength; indexFile++) {\n\t\t\tconst fileEntry = new ZipEntry(reader, zipReader.options);\n\t\t\tif (offset + CENTRAL_FILE_HEADER_LENGTH > directoryArray.length || getUint32(directoryView, offset) != CENTRAL_FILE_HEADER_SIGNATURE) {\n\t\t\t\tif (indexFile == 0 && !decryptedDirectory && (zip64EndOfDirectoryVersion2 || detectEncryptedCentralDirectory(directoryView))) {\n\t\t\t\t\tthrow new Error(ERR_ENCRYPTED_CENTRAL_DIRECTORY);\n\t\t\t\t}\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 + CENTRAL_FILE_HEADER_LENGTH;\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 >> 8 == 0;\n\t\t\tconst unixCompatible = versionMadeBy >> 8 == 3;\n\t\t\tconst commentLength = getUint16(directoryView, offset + 32);\n\t\t\tconst endOffset = commentOffset + commentLength;\n\t\t\tconst rawEntryData = new Uint8Array(directoryArray.subarray(filenameOffset, endOffset));\n\t\t\tconst rawFilename = rawEntryData.subarray(0, fileEntry.filenameLength);\n\t\t\tconst rawComment = rawEntryData.subarray(fileEntry.filenameLength + fileEntry.extraFieldLength);\n\t\t\tconst filenameUTF8 = languageEncodingFlag || (!filenameEncoding && isUTF8Text(rawFilename));\n\t\t\tconst commentUTF8 = languageEncodingFlag || (!commentEncoding && isUTF8Text(rawComment));\n\t\t\tconst externalFileAttributes = getUint32(directoryView, offset + 38);\n\t\t\tconst msdosAttributesRaw = externalFileAttributes & MAX_8_BITS;\n\t\t\tconst msdosAttributes = {\n\t\t\t\treadOnly: Boolean(msdosAttributesRaw & FILE_ATTR_MSDOS_READONLY_MASK),\n\t\t\t\thidden: Boolean(msdosAttributesRaw & FILE_ATTR_MSDOS_HIDDEN_MASK),\n\t\t\t\tsystem: Boolean(msdosAttributesRaw & FILE_ATTR_MSDOS_SYSTEM_MASK),\n\t\t\t\tdirectory: Boolean(msdosAttributesRaw & FILE_ATTR_MSDOS_DIR_MASK),\n\t\t\t\tarchive: Boolean(msdosAttributesRaw & FILE_ATTR_MSDOS_ARCHIVE_MASK)\n\t\t\t};\n\t\t\tconst offsetFileEntry = getUint32(directoryView, offset + 42);\n\t\t\tconst decode = getFunctionOptionValue(zipReader, options, OPTION_DECODE_TEXT) || decodeText;\n\t\t\tconst rawFilenameEncoding = filenameUTF8 ? CHARSET_UTF8 : filenameEncoding || CHARSET_CP437;\n\t\t\tconst rawCommentEncoding = commentUTF8 ? CHARSET_UTF8 : commentEncoding || CHARSET_CP437;\n\t\t\tlet filename = decode(rawFilename, rawFilenameEncoding, TEXT_TYPE_FILENAME);\n\t\t\tif (filename === UNDEFINED_VALUE) {\n\t\t\t\tfilename = decodeText(rawFilename, rawFilenameEncoding);\n\t\t\t}\n\t\t\tif (normalizeFilename) {\n\t\t\t\tconst normalizedFilename = normalizeFilename(filename);\n\t\t\t\tif (normalizedFilename !== UNDEFINED_VALUE) {\n\t\t\t\t\tfilename = normalizedFilename;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (isUnsafeFilename(filename, filenameValidation)) {\n\t\t\t\tconst error = new Error(ERR_UNSAFE_FILENAME);\n\t\t\t\terror.filename = filename;\n\t\t\t\tthrow error;\n\t\t\t}\n\t\t\tlet comment = decode(rawComment, rawCommentEncoding, TEXT_TYPE_COMMENT);\n\t\t\tif (comment === UNDEFINED_VALUE) {\n\t\t\t\tcomment = decodeText(rawComment, rawCommentEncoding);\n\t\t\t}\n\t\t\tObject.assign(fileEntry, {\n\t\t\t\tindex: indexFile,\n\t\t\t\tdecryptedDirectory,\n\t\t\t\tversionMadeBy,\n\t\t\t\tmsDosCompatible,\n\t\t\t\tzip64: false,\n\t\t\t\tcompressedSize: 0,\n\t\t\t\tuncompressedSize: 0,\n\t\t\t\tcommentLength,\n\t\t\t\toffset: offsetFileEntry,\n\t\t\t\tdiskNumberStart: getUint16(directoryView, offset + 34),\n\t\t\t\tinternalFileAttributes: getUint16(directoryView, offset + 36),\n\t\t\t\texternalFileAttributes,\n\t\t\t\tmsdosAttributesRaw,\n\t\t\t\tmsdosAttributes,\n\t\t\t\trawFilename,\n\t\t\t\tfilenameUTF8,\n\t\t\t\tcommentUTF8,\n\t\t\t\trawExtraField: rawEntryData.subarray(fileEntry.filenameLength, fileEntry.filenameLength + fileEntry.extraFieldLength),\n\t\t\t\trawComment,\n\t\t\t\tfilename,\n\t\t\t\tcomment\n\t\t\t});\n\t\t\tif (readCommonFooter(fileEntry, fileEntry, directoryView, offset + 6)) {\n\t\t\t\taddWarning(warnings, WARNING_MALFORMED_EXTRA_FIELD, filename);\n\t\t\t}\n\t\t\tfileEntry.offset += prependedDataLength;\n\t\t\tconst entryPosition = getDiskOffset(reader, fileEntry.diskNumberStart) + fileEntry.offset;\n\t\t\tstartOffset = Math.min(entryPosition, startOffset);\n\t\t\tif (entryPosition < previousEntryPosition) {\n\t\t\t\taddWarning(warnings, WARNING_UNSORTED_CENTRAL_DIRECTORY, filename);\n\t\t\t}\n\t\t\tpreviousEntryPosition = entryPosition;\n\t\t\tif ((fileEntry.version & MAX_8_BITS) > MAX_KNOWN_VERSION) {\n\t\t\t\taddWarning(warnings, WARNING_UNKNOWN_VERSION, filename);\n\t\t\t}\n\t\t\tif ((fileEntry.rawBitFlag & BITFLAG_COMPRESSED_PATCHED_DATA) == BITFLAG_COMPRESSED_PATCHED_DATA) {\n\t\t\t\taddWarning(warnings, WARNING_COMPRESSED_PATCHED_DATA, filename);\n\t\t\t}\n\t\t\tif (filenames.has(fileEntry.filename)) {\n\t\t\t\tduplicateFilename = true;\n\t\t\t}\n\t\t\tfilenames.add(fileEntry.filename);\n\t\t\tconst unixExternalUpper = (fileEntry.externalFileAttributes >> 16) & MAX_16_BITS;\n\t\t\tif (fileEntry.unixMode === UNDEFINED_VALUE && (unixExternalUpper & (FILE_ATTR_UNIX_DEFAULT_MASK | FILE_ATTR_UNIX_EXECUTABLE_MASK | FILE_ATTR_UNIX_TYPE_DIR)) != 0) {\n\t\t\t\tfileEntry.unixMode = unixExternalUpper;\n\t\t\t}\n\t\t\tconst setuid = Boolean(fileEntry.unixMode & FILE_ATTR_UNIX_SETUID_MASK);\n\t\t\tconst setgid = Boolean(fileEntry.unixMode & FILE_ATTR_UNIX_SETGID_MASK);\n\t\t\tconst sticky = Boolean(fileEntry.unixMode & FILE_ATTR_UNIX_STICKY_MASK);\n\t\t\tconst unixType = fileEntry.unixMode === UNDEFINED_VALUE ? unixExternalUpper : fileEntry.unixMode;\n\t\t\tconst symlink = (unixType & FILE_ATTR_UNIX_TYPE_MASK) == FILE_ATTR_UNIX_TYPE_SYMLINK;\n\t\t\tconst executable = !symlink && ((fileEntry.unixMode !== UNDEFINED_VALUE)\n\t\t\t\t? ((fileEntry.unixMode & FILE_ATTR_UNIX_EXECUTABLE_MASK) != 0)\n\t\t\t\t: (unixCompatible && ((unixExternalUpper & FILE_ATTR_UNIX_EXECUTABLE_MASK) != 0)));\n\t\t\tconst modeIsDir = fileEntry.unixMode !== UNDEFINED_VALUE && ((fileEntry.unixMode & FILE_ATTR_UNIX_TYPE_MASK) == FILE_ATTR_UNIX_TYPE_DIR);\n\t\t\tconst upperIsDir = ((unixExternalUpper & FILE_ATTR_UNIX_TYPE_MASK) == FILE_ATTR_UNIX_TYPE_DIR);\n\t\t\tObject.assign(fileEntry, {\n\t\t\t\tsetuid,\n\t\t\t\tsetgid,\n\t\t\t\tsticky,\n\t\t\t\tsymlink,\n\t\t\t\tunixExternalUpper,\n\t\t\t\texecutable,\n\t\t\t\tdirectory: modeIsDir || upperIsDir || (msDosCompatible && msdosAttributes.directory) || fileEntry.filename.endsWith(DIRECTORY_SIGNATURE),\n\t\t\t\tzipCrypto: fileEntry.encrypted && !fileEntry.extraFieldAES\n\t\t\t});\n\t\t\tconst entry = new Entry(fileEntry);\n\t\t\tentry.getData = (writer, options) => fileEntry.getData(writer, entry, zipReader.readRanges, options);\n\t\t\tentry.arrayBuffer = async options => {\n\t\t\t\tconst writer = new TransformStream();\n\t\t\t\tconst arrayBufferPromise = streamToBlob(writer.readable).then(blob => blob.arrayBuffer());\n\t\t\t\tarrayBufferPromise.catch(() => { });\n\t\t\t\tawait fileEntry.getData(writer, entry, zipReader.readRanges,\n\t\t\t\t\tObject.assign({}, options, { preventClose: false }));\n\t\t\t\treturn arrayBufferPromise;\n\t\t\t};\n\t\t\toffset = endOffset;\n\t\t\tif (indexFile == filesLength - 1 && recoverWrappedFilesLength) {\n\t\t\t\tconst wrappedFilesLength = getWrappedFilesLength(directoryView, directoryArray, offset);\n\t\t\t\tif (wrappedFilesLength) {\n\t\t\t\t\tfilesLength += wrappedFilesLength;\n\t\t\t\t\taddWarning(warnings, WARNING_WRAPPED_ENTRIES_COUNT);\n\t\t\t\t}\n\t\t\t}\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 {\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\tlet offsetAfterSignature = offset;\n\t\tlet digitalSignature = readDigitalSignature(directoryArray.subarray(offset)) ||\n\t\t\t(decryptedDirectory ? readDigitalSignature(dataAfterEncryptedDirectory) : UNDEFINED_VALUE);\n\t\tif (!digitalSignature && !decryptedDirectory) {\n\t\t\tconst signatureRecordOffset = directoryDataOffset + offset;\n\t\t\tconst signatureRecordLength = Math.min(centralDirectoryEndOffset - signatureRecordOffset, 6 + MAX_16_BITS);\n\t\t\tif (signatureRecordLength >= 6) {\n\t\t\t\tdigitalSignature = readDigitalSignature(await readUint8Array(reader, signatureRecordOffset, signatureRecordLength));\n\t\t\t}\n\t\t}\n\t\tif (digitalSignature) {\n\t\t\tzipReader.digitalSignature = digitalSignature;\n\t\t\toffsetAfterSignature = offset + 6 + digitalSignature.length;\n\t\t}\n\t\tif ((offset != declaredDirectoryDataLength && offsetAfterSignature != declaredDirectoryDataLength) ||\n\t\t\t(!decryptedDirectory && offset != directoryDataLength && offsetAfterSignature != directoryDataLength)) {\n\t\t\treportAmbiguity(checkAmbiguity, warnings, WARNING_TRAILING_CENTRAL_DIRECTORY_DATA);\n\t\t}\n\t\tif (duplicateFilename) {\n\t\t\treportAmbiguity(checkAmbiguity, warnings, WARNING_DUPLICATE_FILENAME);\n\t\t}\n\t\tconst extractPrependedData = getOptionValue(zipReader, options, OPTION_EXTRACT_PREPENDED_DATA);\n\t\tconst extractAppendedData = getOptionValue(zipReader, options, OPTION_EXTRACT_APPENDED_DATA);\n\t\tconst splitZipSignatureLength = (checkAmbiguity || extractPrependedData) && filesLength &&\n\t\t\tstartOffset == SPLIT_ZIP_FILE_SIGNATURE_LENGTH && await startsWithSplitZipMarker(reader) ? SPLIT_ZIP_FILE_SIGNATURE_LENGTH : 0;\n\t\tif (checkAmbiguity && (prependedDataLength || (filesLength && startOffset > splitZipSignatureLength))) {\n\t\t\tthrowAmbiguousArchive(WARNING_PREPENDED_DATA);\n\t\t}\n\t\tif (prependedDataLength || (filesLength && startOffset > SPLIT_ZIP_FILE_SIGNATURE_LENGTH)) {\n\t\t\taddWarning(warnings, WARNING_PREPENDED_DATA);\n\t\t}\n\t\tif (prependedCentralDirectory) {\n\t\t\taddWarning(warnings, WARNING_PREPENDED_CENTRAL_DIRECTORY);\n\t\t}\n\t\tif (extractPrependedData) {\n\t\t\tzipReader.prependedData = startOffset > splitZipSignatureLength ?\n\t\t\t\tawait readUint8Array(reader, splitZipSignatureLength, startOffset - splitZipSignatureLength) :\n\t\t\t\tEMPTY_UINT8_ARRAY;\n\t\t}\n\t\tzipReader.comment = commentLength ? await readUint8Array(reader, commentOffset + END_OF_CENTRAL_DIR_LENGTH, commentLength) : EMPTY_UINT8_ARRAY;\n\t\tif (extractAppendedData) {\n\t\t\tzipReader.appendedData = appendedDataOffset < reader.size ? await readUint8Array(reader, appendedDataOffset, reader.size - appendedDataOffset) : EMPTY_UINT8_ARRAY;\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\tconst { reader } = this;\n\t\tif (!reader.readUint8Array && reader.readable && !reader.readable.locked) {\n\t\t\tawait reader.readable.cancel();\n\t\t}\n\t}\n\n\t[SYMBOL_ASYNC_DISPOSE]() {\n\t\treturn this.close();\n\t}\n}\n\nclass ZipReaderStream {\n\n\tconstructor(options = {}) {\n\t\tlet sourceController;\n\t\tconst { readable, writable } = new TransformStream({\n\t\t\tstart(controller) {\n\t\t\t\tsourceController = controller;\n\t\t\t}\n\t\t});\n\t\tconst zipReader = new ZipReader(readable, options);\n\t\tconst gen = zipReader.getEntriesGenerator();\n\t\tconst pendingEntries = new Set();\n\t\tthis.readable = new ReadableStream({\n\t\t\tasync pull(controller) {\n\t\t\t\tconst { done, value } = await gen.next();\n\t\t\t\tif (done)\n\t\t\t\t\treturn controller.close();\n\t\t\t\tconst entryStream = createEntryStream(value, pendingEntries);\n\t\t\t\tconst chunk = {\n\t\t\t\t\t...value,\n\t\t\t\t\treadable: entryStream.readable\n\t\t\t\t};\n\t\t\t\tdelete chunk.getData;\n\t\t\t\tObject.defineProperties(chunk, {\n\t\t\t\t\tlocalDirectory: {\n\t\t\t\t\t\tget: () => value.localDirectory,\n\t\t\t\t\t\tenumerable: true\n\t\t\t\t\t},\n\t\t\t\t\twarnings: {\n\t\t\t\t\t\tget: () => value.warnings,\n\t\t\t\t\t\tenumerable: true\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t},\n\t\t\tasync cancel(reason) {\n\t\t\t\tconst entryStreams = Array.from(pendingEntries);\n\t\t\t\tpendingEntries.clear();\n\t\t\t\tsourceController.error(reason);\n\t\t\t\tawait Promise.allSettled(entryStreams.map(entryStream => entryStream.cancel(reason)));\n\t\t\t\tawait Promise.allSettled([gen.return(), zipReader.close()]);\n\t\t\t}\n\t\t});\n\t\tthis.writable = writable;\n\t}\n}\n\nfunction createEntryStream(entry, pendingEntries) {\n\tconst { readable, writable } = new TransformStream();\n\tlet dataReader;\n\tconst entryStream = {\n\t\tcancel: async reason => {\n\t\t\tpendingEntries.delete(entryStream);\n\t\t\tawait (dataReader ? dataReader.cancel(reason) : readable.cancel(reason));\n\t\t}\n\t};\n\tentryStream.readable = new ReadableStream({\n\t\tasync pull(controller) {\n\t\t\tif (!dataReader) {\n\t\t\t\tdataReader = readable.getReader();\n\t\t\t\tpendingEntries.add(entryStream);\n\t\t\t\tgetData();\n\t\t\t}\n\t\t\tconst { done, value } = await dataReader.read();\n\t\t\tif (done) {\n\t\t\t\tcontroller.close();\n\t\t\t} else {\n\t\t\t\tcontroller.enqueue(value);\n\t\t\t}\n\t\t},\n\t\tcancel: reason => entryStream.cancel(reason)\n\t}, { highWaterMark: 0 });\n\treturn entryStream;\n\n\tasync function getData() {\n\t\ttry {\n\t\t\tawait entry.getData(writable, { preventClose: false });\n\t\t} catch (error) {\n\t\t\ttry {\n\t\t\t\tawait writable.abort(error);\n\t\t\t} catch {\n\t\t\t\t// ignored\n\t\t\t}\n\t\t} finally {\n\t\t\tpendingEntries.delete(entryStream);\n\t\t}\n\t}\n}\n\nasync function isZipFile(reader, options = {}) {\n\treader = new GenericReader(reader);\n\tawait initStream(reader);\n\tif (reader.size === UNDEFINED_VALUE || !reader.readUint8Array) {\n\t\treader = new BlobReader(await streamToBlob(reader.readable));\n\t\tawait initStream(reader);\n\t}\n\tif (reader.size < END_OF_CENTRAL_DIR_LENGTH) {\n\t\treturn false;\n\t}\n\tconst strictness = getStrictness(options, {});\n\tconst rejectAmbiguousEndOfDirectory = strictness != STRICTNESS_TOLERANT;\n\tconst maxAppendedDataSize = getMaxAppendedDataSize(options[OPTION_MAX_APPENDED_DATA_SIZE], strictness);\n\tconst { endOfDirectoryInfo, endOfDirectoryReachingEndCount } = await findEndOfCentralDirectory(reader, rejectAmbiguousEndOfDirectory, maxAppendedDataSize);\n\tif (!endOfDirectoryInfo || (strictness == STRICTNESS_STRICT && endOfDirectoryReachingEndCount > 1)) {\n\t\treturn false;\n\t}\n\tconst commentLength = getUint16(getDataView(endOfDirectoryInfo), 20);\n\tconst appendedDataOffset = endOfDirectoryInfo.offset + END_OF_CENTRAL_DIR_LENGTH + commentLength;\n\treturn reader.size - appendedDataOffset <= maxAppendedDataSize;\n}\n\nexport {\n\tZipReader,\n\tisZipFile,\n\tZipReaderStream,\n\tERR_BAD_FORMAT,\n\tERR_EOCDR_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_CRC32,\n\tERR_INVALID_AUTHENTICATION_CODE,\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_UNCOMPRESSED_SIZE,\n\tERR_INVALID_COMPRESSED_DATA,\n\tERR_CODEC_OUT_OF_MEMORY,\n\tERR_SPLIT_ZIP_FILE,\n\tERR_OVERLAPPING_ENTRY,\n\tERR_ENTRY_DATA_OUT_OF_BOUNDS,\n\tERR_AMBIGUOUS_ARCHIVE,\n\tERR_ENCRYPTED_CENTRAL_DIRECTORY,\n\tERR_UNSAFE_FILENAME,\n\tERR_INVALID_STRICTNESS,\n\tERR_INVALID_FILENAME_VALIDATION,\n\tERR_INVALID_MAX_APPENDED_DATA_SIZE,\n\tERR_UNSUPPORTED_UINT64,\n\tERR_WORKER_STARTUP_TIMEOUT,\n\tWARNING_UNSORTED_CENTRAL_DIRECTORY,\n\tWARNING_UNKNOWN_VERSION,\n\tWARNING_COMPRESSED_PATCHED_DATA,\n\tWARNING_MALFORMED_EXTRA_FIELD,\n\tWARNING_UNKNOWN_ZIP64_EXTENSIBLE_DATA,\n\tWARNING_WRAPPED_ENTRIES_COUNT,\n\tWARNING_APPENDED_DATA,\n\tWARNING_PREPENDED_DATA,\n\tWARNING_PREPENDED_CENTRAL_DIRECTORY,\n\tWARNING_TRAILING_CENTRAL_DIRECTORY_DATA,\n\tWARNING_DUPLICATE_FILENAME,\n\tWARNING_MISMATCHED_ZIP64_END_OF_CENTRAL_DIRECTORY,\n\tWARNING_MULTIPLE_END_OF_CENTRAL_DIRECTORY,\n\tWARNING_MISMATCHED_LOCAL_FILE_HEADER_FILENAME,\n\tWARNING_MISMATCHED_LOCAL_FILE_HEADER_BIT_FLAG,\n\tWARNING_MISMATCHED_LOCAL_FILE_HEADER_COMPRESSION_METHOD,\n\tWARNING_MISMATCHED_LOCAL_FILE_HEADER_CRC32_OR_SIZES\n};\n\nclass ZipEntry {\n\n\tconstructor(reader, options) {\n\t\tObject.assign(this, {\n\t\t\treader,\n\t\t\toptions\n\t\t});\n\t}\n\n\tasync getData(writer, fileEntry, readRanges, options = {}) {\n\t\tconst zipEntry = this;\n\t\tconst config = getConfiguration();\n\t\tconst {\n\t\t\treader,\n\t\t\tindex,\n\t\t\toffset,\n\t\t\tdiskNumberStart,\n\t\t\textraFieldAES,\n\t\t\textraFieldZip64,\n\t\t\tcompressionMethod,\n\t\t\tbitFlag,\n\t\t\trawBitFlag,\n\t\t\tcrc32,\n\t\t\trawLastModDate,\n\t\t\tuncompressedSize,\n\t\t\tcompressedSize\n\t\t} = zipEntry;\n\t\tconst {\n\t\t\tdataDescriptor\n\t\t} = bitFlag;\n\t\tconst localDirectory = fileEntry.localDirectory = {};\n\t\tconst warnings = fileEntry.warnings = [];\n\t\tconst localHeaderOffset = getDiskOffset(reader, diskNumberStart) + offset;\n\t\tconst dataArray = await readUint8Array(reader, localHeaderOffset, HEADER_SIZE);\n\t\tconst dataView = getDataView(dataArray);\n\t\tlet password = getOptionValue(zipEntry, options, OPTION_PASSWORD);\n\t\tlet rawPassword = getOptionValue(zipEntry, options, OPTION_RAW_PASSWORD);\n\t\tconst passThrough = checkPassThroughOption(getOptionValue(zipEntry, options, OPTION_PASS_THROUGH));\n\t\tconst passThroughCompression = Boolean(passThrough);\n\t\tconst passThroughEncryption = passThrough === true;\n\t\tcheckPasswordOption(password, rawPassword);\n\t\tpassword = password && password.length ? password : UNDEFINED_VALUE;\n\t\trawPassword = rawPassword && rawPassword.length ? rawPassword : UNDEFINED_VALUE;\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 (dataArray.length < HEADER_SIZE || 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\tconst {\n\t\t\textraFieldLength,\n\t\t\tfilenameLength\n\t\t} = localDirectory;\n\t\tconst dataOffset = localDirectory.dataOffset = localHeaderOffset + HEADER_SIZE + filenameLength + extraFieldLength;\n\t\tconst checkLocalDirectoryOption = getOptionValue(zipEntry, options, OPTION_CHECK_LOCAL_DIRECTORY);\n\t\tconst entryStrictness = getStrictness(options, zipEntry.options);\n\t\tconst checkLocalDirectory = getCheckLocalDirectory(checkLocalDirectoryOption, entryStrictness);\n\t\tconst checkLocalFilenameOption = getOptionValue(zipEntry, options, OPTION_CHECK_LOCAL_FILENAME);\n\t\tconst checkLocalFilename = getCheckLocalFilename(\n\t\t\tcheckLocalFilenameOption === UNDEFINED_VALUE ? checkLocalDirectoryOption : checkLocalFilenameOption, entryStrictness);\n\t\tlet rawLocalFilename = EMPTY_UINT8_ARRAY;\n\t\tif (checkLocalFilename && (filenameLength || extraFieldLength)) {\n\t\t\tconst trailingDataArray = await readUint8Array(reader, localHeaderOffset + HEADER_SIZE, filenameLength + extraFieldLength);\n\t\t\trawLocalFilename = trailingDataArray.subarray(0, filenameLength);\n\t\t\tlocalDirectory.rawExtraField = trailingDataArray.subarray(filenameLength);\n\t\t} else {\n\t\t\tlocalDirectory.rawExtraField = extraFieldLength ?\n\t\t\t\tawait readUint8Array(reader, localHeaderOffset + HEADER_SIZE + filenameLength, extraFieldLength) :\n\t\t\t\tEMPTY_UINT8_ARRAY;\n\t\t}\n\t\tif (checkLocalFilename) {\n\t\t\tlocalDirectory.rawFilename = rawLocalFilename;\n\t\t}\n\t\tif (readCommonFooter(zipEntry, localDirectory, dataView, 4, true)) {\n\t\t\taddWarning(warnings, WARNING_MALFORMED_EXTRA_FIELD);\n\t\t}\n\t\tvalidateLocalDirectory(zipEntry, localDirectory, rawLocalFilename, checkLocalFilename, checkLocalDirectory ? UNDEFINED_VALUE : warnings);\n\t\tconst { lastAccessDate, creationDate, uid, gid } = localDirectory;\n\t\tif (lastAccessDate) {\n\t\t\tfileEntry.lastAccessDate = lastAccessDate;\n\t\t}\n\t\tif (creationDate) {\n\t\t\tfileEntry.creationDate = creationDate;\n\t\t}\n\t\tif (uid !== UNDEFINED_VALUE && fileEntry.uid === UNDEFINED_VALUE) {\n\t\t\tfileEntry.uid = uid;\n\t\t}\n\t\tif (gid !== UNDEFINED_VALUE && fileEntry.gid === UNDEFINED_VALUE) {\n\t\t\tfileEntry.gid = gid;\n\t\t}\n\t\tconst checkPasswordOnly = getOptionValue(zipEntry, options, OPTION_CHECK_PASSWORD_ONLY);\n\t\tconst encrypted = zipEntry.encrypted && (!passThroughEncryption || checkPasswordOnly);\n\t\tconst zipCrypto = encrypted && !extraFieldAES;\n\t\tif (!passThroughEncryption) {\n\t\t\tfileEntry.zipCrypto = zipCrypto;\n\t\t}\n\t\tif (encrypted && (zipEntry.rawBitFlag & BITFLAG_STRONG_ENCRYPTION) == BITFLAG_STRONG_ENCRYPTION) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_ENCRYPTION);\n\t\t}\n\t\tconst registeredCodec = passThroughCompression ? UNDEFINED_VALUE : getRegisteredCodec(compressionMethod);\n\t\tif (compressionMethod != COMPRESSION_METHOD_STORE && compressionMethod != COMPRESSION_METHOD_DEFLATE && compressionMethod != COMPRESSION_METHOD_DEFLATE_64 && !registeredCodec && !passThroughCompression) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_COMPRESSION);\n\t\t}\n\t\tif (encrypted) {\n\t\t\tif (!zipCrypto && (extraFieldAES.strength < 1 || extraFieldAES.strength > 3)) {\n\t\t\t\tthrow new Error(ERR_UNSUPPORTED_ENCRYPTION);\n\t\t\t} else if (!password && !rawPassword) {\n\t\t\t\tthrow new Error(ERR_ENCRYPTED);\n\t\t\t}\n\t\t}\n\t\tif (dataOffset + compressedSize > reader.size) {\n\t\t\tthrow new Error(ERR_ENTRY_DATA_OUT_OF_BOUNDS);\n\t\t}\n\t\tconst size = compressedSize;\n\t\tconst signal = checkSignalOption(getOptionValue(zipEntry, options, OPTION_SIGNAL));\n\t\tthrowIfAborted(signal);\n\t\tlet checkOverlappingEntry = getOptionValue(zipEntry, options, OPTION_CHECK_OVERLAPPING_ENTRY);\n\t\tconst checkOverlappingEntryOnly = getOptionValue(zipEntry, options, OPTION_CHECK_OVERLAPPING_ENTRY_ONLY);\n\t\tif (checkOverlappingEntryOnly) {\n\t\t\tcheckOverlappingEntry = true;\n\t\t}\n\t\tconst { onstart, onprogress, onend } = options;\n\t\tconst compressed = compressionMethod != COMPRESSION_METHOD_STORE && !passThroughCompression;\n\t\tconst outputSize = passThroughCompression ?\n\t\t\tcompressedSize - getEncryptionOverhead(encrypted, zipCrypto, extraFieldAES && extraFieldAES.strength) :\n\t\t\tuncompressedSize;\n\t\tconst deflate64 = compressionMethod == COMPRESSION_METHOD_DEFLATE_64;\n\t\tlet useCompressionStream = getOptionValue(zipEntry, options, OPTION_USE_COMPRESSION_STREAM);\n\t\tif (deflate64) {\n\t\t\tuseCompressionStream = false;\n\t\t}\n\t\tconst checkCrc32Option = getOptionValue(zipEntry, options, OPTION_CHECK_CRC32);\n\t\tconst checkCrc32 = (checkCrc32Option === UNDEFINED_VALUE ?\n\t\t\tgetOptionValue(zipEntry, options, OPTION_CHECK_SIGNATURE) :\n\t\t\tcheckCrc32Option) && !passThroughCompression &&\n\t\t\t(!encrypted || zipCrypto || (extraFieldAES && extraFieldAES.vendorVersion == VENDOR_VERSION_AE_1));\n\t\tconst workerOptions = {\n\t\t\toptions: {\n\t\t\t\tcodecType: CODEC_INFLATE,\n\t\t\t\tpassword,\n\t\t\t\trawPassword,\n\t\t\t\tzipCrypto,\n\t\t\t\tencryptionStrength: extraFieldAES && extraFieldAES.strength,\n\t\t\t\tcheckCrc32,\n\t\t\t\tcheckAuthenticationCode: getOptionValue(zipEntry, options, OPTION_CHECK_AUTHENTICATION_CODE),\n\t\t\t\tpasswordVerification: zipCrypto && (dataDescriptor ? ((rawLastModDate >>> 8) & MAX_8_BITS) : ((crc32 >>> 24) & MAX_8_BITS)),\n\t\t\t\toutputSize,\n\t\t\t\tcrc32,\n\t\t\t\tcompressed,\n\t\t\t\tencrypted,\n\t\t\t\tuseWebWorkers: getOptionValue(zipEntry, options, OPTION_USE_WEB_WORKERS),\n\t\t\t\tuseCompressionStream,\n\t\t\t\ttransferStreams: getOptionValue(zipEntry, options, OPTION_TRANSFER_STREAMS),\n\t\t\t\tdeflate64,\n\t\t\t\tformat: registeredCodec ? registeredCodec.format : UNDEFINED_VALUE,\n\t\t\t\tcodecURI: registeredCodec ? registeredCodec.codecURI : UNDEFINED_VALUE,\n\t\t\t\tcompressionMethod,\n\t\t\t\trawBitFlag,\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\tif (checkOverlappingEntry) {\n\t\t\tawait detectOverlappingEntry({\n\t\t\t\treader,\n\t\t\t\tfileEntry,\n\t\t\t\tindex,\n\t\t\t\toffset: localHeaderOffset,\n\t\t\t\tcrc32,\n\t\t\t\tcompressedSize,\n\t\t\t\tuncompressedSize,\n\t\t\t\tdataOffset,\n\t\t\t\tdataDescriptor: dataDescriptor || localDirectory.bitFlag.dataDescriptor,\n\t\t\t\textraFieldZip64: extraFieldZip64 || localDirectory.extraFieldZip64,\n\t\t\t\treadRanges\n\t\t\t});\n\t\t}\n\t\tlet writable, abortError, aborted;\n\t\ttry {\n\t\t\tif (!checkOverlappingEntryOnly) {\n\t\t\t\tif (checkPasswordOnly) {\n\t\t\t\t\twriter = new WritableStream();\n\t\t\t\t}\n\t\t\t\twriter = new GenericWriter(writer);\n\t\t\t\tawait initStream(writer, getDecodableOutputSize(outputSize, compressedSize, compressed));\n\t\t\t\t({ writable } = writer);\n\t\t\t\tconst readable = toCompatibleReadable(reader.createReadable({ offset: dataOffset, size }));\n\t\t\t\tconst { outputSize: writtenSize } = await runWorker({ readable, writable }, workerOptions);\n\t\t\t\tthrowIfAborted(signal);\n\t\t\t\tif (writtenSize != outputSize) {\n\t\t\t\t\tthrow Object.assign(new Error(ERR_INVALID_UNCOMPRESSED_SIZE), { outputSize: writtenSize });\n\t\t\t\t}\n\t\t\t\twriter.size += writtenSize;\n\t\t\t}\n\t\t} catch (error) {\n\t\t\tconst { outputSize: failedOutputSize } = workerOptions;\n\t\t\tif (failedOutputSize !== UNDEFINED_VALUE) {\n\t\t\t\twriter.size += failedOutputSize;\n\t\t\t} else if (isErrorObject(error) && error.outputSize !== UNDEFINED_VALUE) {\n\t\t\t\twriter.size += error.outputSize;\n\t\t\t}\n\t\t\tif (!checkPasswordOnly || !isErrorObject(error) || error.message != ERR_ABORT_CHECK_PASSWORD) {\n\t\t\t\tabortError = error;\n\t\t\t\taborted = true;\n\t\t\t\tthrow error;\n\t\t\t}\n\t\t} finally {\n\t\t\tconst preventClose = !ownsWritable(writer) && getOptionValue(zipEntry, options, OPTION_PREVENT_CLOSE);\n\t\t\tif (!preventClose && writable && !writable.locked) {\n\t\t\t\tconst writableWriter = writable.getWriter();\n\t\t\t\tif (aborted) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tawait writableWriter.abort(abortError);\n\t\t\t\t\t} catch {\n\t\t\t\t\t\t// the error being propagated is more relevant; ignored\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tawait writableWriter.close();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn checkPasswordOnly || checkOverlappingEntryOnly ? UNDEFINED_VALUE : writer.getData ? writer.getData() : writable;\n\t}\n}\n\nfunction detectEncryptedCentralDirectory(directoryView) {\n\tconst maxOffset = Math.min(directoryView.byteLength, 1024) - 3;\n\tfor (let offset = 0; offset < maxOffset; offset++) {\n\t\tif (getUint32(directoryView, offset) == ARCHIVE_EXTRA_DATA_SIGNATURE) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}\n\nfunction getWrappedFilesLength(directoryView, directoryArray, offset) {\n\tlet wrappedFilesLength = 0;\n\twhile (offset + CENTRAL_FILE_HEADER_LENGTH <= directoryArray.length && getUint32(directoryView, offset) == CENTRAL_FILE_HEADER_SIGNATURE) {\n\t\toffset += CENTRAL_FILE_HEADER_LENGTH +\n\t\t\tgetUint16(directoryView, offset + 28) + getUint16(directoryView, offset + 30) + getUint16(directoryView, offset + 32);\n\t\twrappedFilesLength++;\n\t}\n\treturn wrappedFilesLength % (MAX_16_BITS + 1) ? 0 : wrappedFilesLength;\n}\n\nfunction readDigitalSignature(signatureRecordArray) {\n\tif (signatureRecordArray.length >= 6) {\n\t\tconst signatureRecordView = getDataView(signatureRecordArray);\n\t\tif (getUint32(signatureRecordView, 0) == DIGITAL_SIGNATURE_RECORD_SIGNATURE) {\n\t\t\tconst signatureDataLength = getUint16(signatureRecordView, 4);\n\t\t\tif (6 + signatureDataLength <= signatureRecordArray.length) {\n\t\t\t\treturn new Uint8Array(signatureRecordArray.subarray(6, 6 + signatureDataLength));\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction getEncryptedDirectoryDataLength(directoryEncryptionInfo, declaredDirectoryDataLength, directoryDataLength) {\n\tconst encryptedDirectoryDataLength = directoryEncryptionInfo && directoryEncryptionInfo.compressedSize ?\n\t\tdirectoryEncryptionInfo.compressedSize :\n\t\tdeclaredDirectoryDataLength;\n\treturn encryptedDirectoryDataLength > 0 && encryptedDirectoryDataLength <= directoryDataLength ?\n\t\tencryptedDirectoryDataLength :\n\t\tdirectoryDataLength;\n}\n\nfunction getDirectoryEncryptionInfo(rawExtensibleData) {\n\tconst directoryEncryptionInfo = { rawExtensibleData };\n\tif (rawExtensibleData.length >= 28) {\n\t\tconst extensibleDataView = getDataView(rawExtensibleData);\n\t\tconst hashDataLength = getUint16(extensibleDataView, 26);\n\t\tObject.assign(directoryEncryptionInfo, {\n\t\t\tcompressionMethod: getUint16(extensibleDataView, 0),\n\t\t\tcompressedSize: getBigUint64(extensibleDataView, 2),\n\t\t\tuncompressedSize: getBigUint64(extensibleDataView, 10),\n\t\t\tencryptionAlgorithm: getUint16(extensibleDataView, 18),\n\t\t\tbitLength: getUint16(extensibleDataView, 20),\n\t\t\tflags: getUint16(extensibleDataView, 22),\n\t\t\thashAlgorithm: getUint16(extensibleDataView, 24),\n\t\t\thashData: rawExtensibleData.subarray(28, 28 + hashDataLength)\n\t\t});\n\t}\n\treturn directoryEncryptionInfo;\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\nfunction readCommonFooter(fileEntry, directory, dataView, offset, localDirectory) {\n\tconst { rawExtraField } = directory;\n\tconst extraField = directory.extraField = new Map();\n\tconst rawExtraFieldView = getDataView(rawExtraField);\n\tlet offsetExtraField = 0;\n\tlet malformedExtraField = false;\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 {\n\t\tmalformedExtraField = true;\n\t}\n\tif (offsetExtraField > rawExtraField.length) {\n\t\tmalformedExtraField = true;\n\t}\n\tconst compressionMethod = getUint16(dataView, offset + 4);\n\tObject.assign(directory, {\n\t\tsignature: getUint32(dataView, offset + HEADER_OFFSET_SIGNATURE),\n\t\tcrc32: getUint32(dataView, offset + HEADER_OFFSET_SIGNATURE),\n\t\tcompressedSize: getUint32(dataView, offset + HEADER_OFFSET_COMPRESSED_SIZE),\n\t\tuncompressedSize: getUint32(dataView, offset + HEADER_OFFSET_UNCOMPRESSED_SIZE)\n\t});\n\tconst extraFieldZip64 = extraField.get(EXTRAFIELD_TYPE_ZIP64);\n\tif (extraFieldZip64) {\n\t\tif (!readExtraFieldZip64(extraFieldZip64, directory, localDirectory)) {\n\t\t\tmalformedExtraField = true;\n\t\t}\n\t\tdirectory.extraFieldZip64 = extraFieldZip64;\n\t} else if (ZIP64_PROPERTIES.some(([propertyName, max]) => directory[propertyName] == max)) {\n\t\tif (localDirectory) {\n\t\t\tmalformedExtraField = true;\n\t\t} else {\n\t\t\tthrow new Error(ERR_EXTRAFIELD_ZIP64_NOT_FOUND);\n\t\t}\n\t}\n\tconst extraFieldUnicodePath = extraField.get(EXTRAFIELD_TYPE_UNICODE_PATH);\n\tif (extraFieldUnicodePath) {\n\t\treadExtraFieldUnicode(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\treadExtraFieldUnicode(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 && (compressionMethod == COMPRESSION_METHOD_AES || directory.encrypted) && extraFieldAES.data.length >= 7) {\n\t\treadExtraFieldAES(extraFieldAES, directory, compressionMethod);\n\t\tdirectory.extraFieldAES = extraFieldAES;\n\t} else {\n\t\tif (extraFieldAES) {\n\t\t\tmalformedExtraField = true;\n\t\t}\n\t\tdirectory.compressionMethod = compressionMethod;\n\t}\n\tconst extraFieldPkwareUnix = extraField.get(EXTRAFIELD_TYPE_PKWARE_UNIX);\n\tif (extraFieldPkwareUnix) {\n\t\treadExtraFieldUnixDates(extraFieldPkwareUnix, directory);\n\t\tdirectory.extraFieldPkwareUnix = extraFieldPkwareUnix;\n\t}\n\tconst extraFieldUnixType1 = extraField.get(EXTRAFIELD_TYPE_UNIX_TYPE1);\n\tif (extraFieldUnixType1) {\n\t\treadExtraFieldUnixDates(extraFieldUnixType1, directory);\n\t\tdirectory.extraFieldUnixType1 = extraFieldUnixType1;\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 extraFieldUnix = extraField.get(EXTRAFIELD_TYPE_UNIX);\n\tlet unixIdsRead;\n\tif (extraFieldUnix) {\n\t\tunixIdsRead = readExtraFieldUnix(extraFieldUnix, directory, false);\n\t\tdirectory.extraFieldUnix = extraFieldUnix;\n\t}\n\tif (!unixIdsRead) {\n\t\tconst extraFieldInfoZip = extraField.get(EXTRAFIELD_TYPE_INFOZIP);\n\t\tif (extraFieldInfoZip) {\n\t\t\treadExtraFieldUnix(extraFieldInfoZip, directory, true);\n\t\t\tdirectory.extraFieldInfoZip = extraFieldInfoZip;\n\t\t}\n\t}\n\tconst extraFieldExtendedTimestamp = extraField.get(EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP);\n\tif (extraFieldExtendedTimestamp) {\n\t\treadExtraFieldExtendedTimestamp(extraFieldExtendedTimestamp, directory, localDirectory);\n\t\tdirectory.extraFieldExtendedTimestamp = extraFieldExtendedTimestamp;\n\t}\n\tconst extraFieldUSDZ = extraField.get(EXTRAFIELD_TYPE_USDZ);\n\tif (extraFieldUSDZ) {\n\t\tdirectory.extraFieldUSDZ = extraFieldUSDZ;\n\t}\n\treturn malformedExtraField;\n}\n\nfunction readExtraFieldZip64(extraFieldZip64, directory, localDirectory) {\n\tdirectory.zip64 = true;\n\tconst extraFieldView = getDataView(extraFieldZip64.data);\n\tconst missingProperties = ZIP64_PROPERTIES.filter(([propertyName, max]) => directory[propertyName] == max);\n\tconst requiredLength = missingProperties.reduce((length, [, max]) => length + ZIP64_EXTRACTION[max].bytes, 0);\n\tif (extraFieldZip64.data.length < requiredLength) {\n\t\tif (localDirectory) {\n\t\t\treturn false;\n\t\t}\n\t\tthrow new Error(ERR_EXTRAFIELD_ZIP64_NOT_FOUND);\n\t}\n\tconst values = [];\n\ttry {\n\t\tfor (let indexMissingProperty = 0, offset = 0; indexMissingProperty < missingProperties.length; indexMissingProperty++) {\n\t\t\tconst [, max] = missingProperties[indexMissingProperty];\n\t\t\tconst extraction = ZIP64_EXTRACTION[max];\n\t\t\tvalues.push(extraction.getValue(extraFieldView, offset));\n\t\t\toffset += extraction.bytes;\n\t\t}\n\t} catch (error) {\n\t\tif (localDirectory) {\n\t\t\treturn false;\n\t\t}\n\t\tthrow error;\n\t}\n\tmissingProperties.forEach(([propertyName], indexMissingProperty) => {\n\t\tdirectory[propertyName] = extraFieldZip64[propertyName] = values[indexMissingProperty];\n\t});\n\treturn true;\n}\n\nfunction readExtraFieldUnicode(extraFieldUnicode, propertyName, rawPropertyName, directory, fileEntry) {\n\tif (extraFieldUnicode.data.length < 5) {\n\t\textraFieldUnicode.valid = false;\n\t\treturn;\n\t}\n\tconst extraFieldView = getDataView(extraFieldUnicode.data);\n\tconst computedCrc32 = new Crc32();\n\tcomputedCrc32.append(fileEntry[rawPropertyName]);\n\tconst computedCrc32View = getDataView(new Uint8Array(4));\n\tcomputedCrc32View.setUint32(0, computedCrc32.get(), true);\n\tconst nameCrc32 = getUint32(extraFieldView, 1);\n\tconst version = getUint8(extraFieldView, 0);\n\tObject.assign(extraFieldUnicode, {\n\t\tversion,\n\t\t[propertyName]: decodeText(extraFieldUnicode.data.subarray(5)),\n\t\tvalid: version == 1 && !fileEntry.bitFlag.languageEncodingFlag && nameCrc32 == getUint32(computedCrc32View, 0)\n\t});\n\tif (extraFieldUnicode.valid) {\n\t\tdirectory[propertyName] = extraFieldUnicode[propertyName];\n\t\tdirectory[propertyName + PROPERTY_NAME_UTF8_SUFFIX] = 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\tif (extraFieldAES.vendorVersion != VENDOR_VERSION_AE_1) {\n\t\tdirectory.crc32 = UNDEFINED_VALUE;\n\t}\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 {\n\t\t// ignored\n\t}\n\tif (tag1Data && tag1Data.length == 24) {\n\t\tconst tag1View = getDataView(tag1Data);\n\t\tconst rawLastModDate = tag1View.getBigUint64(0, true);\n\t\tconst rawLastAccessDate = tag1View.getBigUint64(8, true);\n\t\tconst rawCreationDate = tag1View.getBigUint64(16, true);\n\t\tObject.assign(extraFieldNTFS, {\n\t\t\trawLastModDate,\n\t\t\trawLastAccessDate,\n\t\t\trawCreationDate\n\t\t});\n\t\tconst lastModDate = getDateNTFS(rawLastModDate);\n\t\tconst lastAccessDate = getDateNTFS(rawLastAccessDate);\n\t\tconst creationDate = getDateNTFS(rawCreationDate);\n\t\tconst extraFieldData = { lastModDate, lastAccessDate, creationDate };\n\t\tObject.assign(extraFieldNTFS, extraFieldData);\n\t\tObject.assign(directory, extraFieldData, { rawLastAccessDate, rawCreationDate });\n\t}\n}\n\nfunction readExtraFieldUnixDates(extraField, directory) {\n\tif (extraField.data.length < 8) {\n\t\treturn;\n\t}\n\tconst extraFieldView = getDataView(extraField.data);\n\tconst lastAccessDate = new Date((getUint32(extraFieldView, 0) | 0) * 1000);\n\tconst lastModDate = new Date((getUint32(extraFieldView, 4) | 0) * 1000);\n\tconst extraFieldData = { lastAccessDate, lastModDate };\n\tif (extraField.data.length >= 12) {\n\t\textraFieldData.uid = getUint16(extraFieldView, 8);\n\t\textraFieldData.gid = getUint16(extraFieldView, 10);\n\t}\n\tObject.assign(extraField, extraFieldData);\n\tObject.assign(directory, extraFieldData);\n}\n\nfunction readExtraFieldUnix(extraField, directory, isInfoZip) {\n\ttry {\n\t\tconst view = getDataView(extraField.data);\n\t\tlet uid, gid;\n\t\tif (isInfoZip) {\n\t\t\tlet offset = 0;\n\t\t\tconst version = getUint8(view, offset++);\n\t\t\tconst uidSize = getUint8(view, offset++);\n\t\t\tuid = unpackUnixId(extraField.data.subarray(offset, offset + uidSize));\n\t\t\toffset += uidSize;\n\t\t\tconst gidSize = getUint8(view, offset++);\n\t\t\tgid = unpackUnixId(extraField.data.subarray(offset, offset + gidSize));\n\t\t\tObject.assign(extraField, { version, uid, gid });\n\t\t} else if (extraField.data.length >= 4) {\n\t\t\tuid = getUint16(view, 0);\n\t\t\tgid = getUint16(view, 2);\n\t\t\tObject.assign(extraField, { uid, gid });\n\t\t}\n\t\tif (uid !== UNDEFINED_VALUE) {\n\t\t\tdirectory.uid = uid;\n\t\t}\n\t\tif (gid !== UNDEFINED_VALUE) {\n\t\t\tdirectory.gid = gid;\n\t\t}\n\t\treturn uid !== UNDEFINED_VALUE || gid !== UNDEFINED_VALUE;\n\t} catch {\n\t\t// ignored\n\t}\n}\n\nfunction unpackUnixId(bytes) {\n\tconst buffer = new Uint8Array(4);\n\tbuffer.set(bytes, 0);\n\tconst view = new DataView(buffer.buffer, buffer.byteOffset, 4);\n\treturn view.getUint32(0, true);\n}\n\nfunction readExtraFieldExtendedTimestamp(extraFieldExtendedTimestamp, directory, localDirectory) {\n\tif (!extraFieldExtendedTimestamp.data.length) {\n\t\treturn;\n\t}\n\tconst extraFieldView = getDataView(extraFieldExtendedTimestamp.data);\n\tconst flags = getUint8(extraFieldView, 0);\n\tconst timeProperties = [];\n\tconst timeRawProperties = [];\n\tif (localDirectory) {\n\t\tif ((flags & 0x1) == 0x1) {\n\t\t\ttimeProperties.push(PROPERTY_NAME_LAST_MODIFICATION_DATE);\n\t\t\ttimeRawProperties.push(PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE);\n\t\t}\n\t\tif ((flags & 0x2) == 0x2) {\n\t\t\ttimeProperties.push(PROPERTY_NAME_LAST_ACCESS_DATE);\n\t\t\ttimeRawProperties.push(PROPERTY_NAME_RAW_LAST_ACCESS_DATE);\n\t\t}\n\t\tif ((flags & 0x4) == 0x4) {\n\t\t\ttimeProperties.push(PROPERTY_NAME_CREATION_DATE);\n\t\t\ttimeRawProperties.push(PROPERTY_NAME_RAW_CREATION_DATE);\n\t\t}\n\t} else if (extraFieldExtendedTimestamp.data.length >= 5) {\n\t\ttimeProperties.push(PROPERTY_NAME_LAST_MODIFICATION_DATE);\n\t\ttimeRawProperties.push(PROPERTY_NAME_RAW_LAST_MODIFICATION_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 | 0) * 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 detectOverlappingEntry({\n\treader,\n\tfileEntry,\n\tindex,\n\toffset,\n\tcrc32,\n\tcompressedSize,\n\tuncompressedSize,\n\tdataOffset,\n\tdataDescriptor,\n\textraFieldZip64,\n\treadRanges\n}) {\n\tlet dataDescriptorLength = 0;\n\tif (dataDescriptor) {\n\t\tconst zip64 = Boolean(extraFieldZip64);\n\t\tconst dataDescriptorArray = await readUint8Array(reader, dataOffset + compressedSize, DATA_DESCRIPTOR_RECORD_ZIP_64_LENGTH + DATA_DESCRIPTOR_RECORD_SIGNATURE_LENGTH);\n\t\tconst dataDescriptorView = getDataView(dataDescriptorArray);\n\t\tconst candidates = [[zip64, true], [zip64, false], [!zip64, true], [!zip64, false]]\n\t\t\t.map(([zip64Layout, signature]) => readDataDescriptor(dataDescriptorView, zip64Layout, signature))\n\t\t\t.filter(candidate => candidate && candidate.compressedSize == compressedSize && candidate.uncompressedSize == uncompressedSize);\n\t\tconst localDataDescriptor = candidates.find(candidate => candidate.crc32 == crc32) || candidates[0] ||\n\t\t\treadDataDescriptor(dataDescriptorView, zip64, true) || readDataDescriptor(dataDescriptorView, zip64, false);\n\t\tif (localDataDescriptor) {\n\t\t\tfileEntry.localDirectory.dataDescriptor = localDataDescriptor;\n\t\t\tdataDescriptorLength = getDataDescriptorLength(localDataDescriptor.zip64, localDataDescriptor.signature);\n\t\t} else {\n\t\t\tdataDescriptorLength = getDataDescriptorLength(zip64, false);\n\t\t}\n\t}\n\tconst range = {\n\t\tstart: offset,\n\t\tend: dataOffset + compressedSize + dataDescriptorLength,\n\t\tfileEntry\n\t};\n\tconst { indexes, sortedRanges, pendingRanges } = readRanges;\n\tif (!indexes.has(index)) {\n\t\tconst overlappingRange = findOverlappingRange(sortedRanges, range) || pendingRanges.find(otherRange => rangesOverlap(range, otherRange));\n\t\tif (overlappingRange) {\n\t\t\tconst error = new Error(ERR_OVERLAPPING_ENTRY);\n\t\t\terror.overlappingEntry = overlappingRange.fileEntry;\n\t\t\tthrow error;\n\t\t}\n\t\tindexes.add(index);\n\t\tpendingRanges.push(range);\n\t\tif (pendingRanges.length * pendingRanges.length > sortedRanges.length) {\n\t\t\tpendingRanges.sort((range, otherRange) => range.start - otherRange.start);\n\t\t\treadRanges.sortedRanges = mergeRanges(sortedRanges, pendingRanges);\n\t\t\tpendingRanges.length = 0;\n\t\t}\n\t}\n}\n\nfunction findOverlappingRange(sortedRanges, range) {\n\tlet low = 0;\n\tlet high = sortedRanges.length;\n\twhile (low < high) {\n\t\tconst middle = (low + high) >>> 1;\n\t\tif (sortedRanges[middle].start < range.start) {\n\t\t\tlow = middle + 1;\n\t\t} else {\n\t\t\thigh = middle;\n\t\t}\n\t}\n\tconst previousRange = sortedRanges[low - 1];\n\tconst nextRange = sortedRanges[low];\n\tif (previousRange && rangesOverlap(range, previousRange)) {\n\t\treturn previousRange;\n\t}\n\tif (nextRange && rangesOverlap(range, nextRange)) {\n\t\treturn nextRange;\n\t}\n}\n\nfunction rangesOverlap(range, otherRange) {\n\treturn range.start < otherRange.end && otherRange.start < range.end;\n}\n\nfunction mergeRanges(sortedRanges, pendingRanges) {\n\tconst mergedRanges = [];\n\tlet indexSorted = 0;\n\tlet indexPending = 0;\n\twhile (indexSorted < sortedRanges.length || indexPending < pendingRanges.length) {\n\t\tif (indexPending == pendingRanges.length || (indexSorted < sortedRanges.length && sortedRanges[indexSorted].start < pendingRanges[indexPending].start)) {\n\t\t\tmergedRanges.push(sortedRanges[indexSorted++]);\n\t\t} else {\n\t\t\tmergedRanges.push(pendingRanges[indexPending++]);\n\t\t}\n\t}\n\treturn mergedRanges;\n}\n\nfunction readDataDescriptor(dataDescriptorView, zip64, signature) {\n\tconst offset = signature ? DATA_DESCRIPTOR_RECORD_SIGNATURE_LENGTH : 0;\n\tif (dataDescriptorView.byteLength < getDataDescriptorLength(zip64, signature) ||\n\t\t(signature && getUint32(dataDescriptorView, 0) != DATA_DESCRIPTOR_RECORD_SIGNATURE)) {\n\t\treturn UNDEFINED_VALUE;\n\t}\n\tconst crc32 = getUint32(dataDescriptorView, offset);\n\tlet compressedSize;\n\tlet uncompressedSize;\n\ttry {\n\t\tif (zip64) {\n\t\t\tcompressedSize = getBigUint64(dataDescriptorView, offset + 4);\n\t\t\tuncompressedSize = getBigUint64(dataDescriptorView, offset + 12);\n\t\t} else {\n\t\t\tcompressedSize = getUint32(dataDescriptorView, offset + 4);\n\t\t\tuncompressedSize = getUint32(dataDescriptorView, offset + 8);\n\t\t}\n\t} catch {\n\t\treturn UNDEFINED_VALUE;\n\t}\n\treturn { signature, zip64, crc32, compressedSize, uncompressedSize };\n}\n\nfunction getDataDescriptorLength(zip64, signature) {\n\treturn (zip64 ? DATA_DESCRIPTOR_RECORD_ZIP_64_LENGTH : DATA_DESCRIPTOR_RECORD_LENGTH) + (signature ? DATA_DESCRIPTOR_RECORD_SIGNATURE_LENGTH : 0);\n}\n\nfunction getDiskOffset(reader, diskNumber) {\n\treturn reader.getDiskOffset ? reader.getDiskOffset(diskNumber) : 0;\n}\n\nasync function startsWithSplitZipSignature(reader) {\n\treturn await getFirstSignature(reader) == SPLIT_ZIP_FILE_SIGNATURE;\n}\n\nasync function startsWithSplitZipMarker(reader) {\n\tconst signature = await getFirstSignature(reader);\n\treturn signature == SPLIT_ZIP_FILE_SIGNATURE || signature == TEMPORARY_SPLIT_ZIP_FILE_SIGNATURE;\n}\n\nasync function getFirstSignature(reader) {\n\tconst signatureArray = await readUint8Array(reader, 0, SPLIT_ZIP_FILE_SIGNATURE_LENGTH);\n\treturn getUint32(getDataView(signatureArray));\n}\n\nfunction isStrictnessValue(value) {\n\treturn value === STRICTNESS_STRICT || value === STRICTNESS_BALANCED || value === STRICTNESS_TOLERANT;\n}\n\nfunction getDecodableOutputSize(outputSize, compressedSize, compressed) {\n\treturn Math.min(outputSize, compressed ? compressedSize * MAX_DEFLATE_EXPANSION_RATIO : compressedSize);\n}\n\nfunction getStrictness(options, inheritedOptions) {\n\treturn resolveStrictness(options, resolveStrictness(inheritedOptions, STRICTNESS_BALANCED));\n}\n\nfunction resolveStrictness(options, inheritedStrictness) {\n\tconst strictness = options[OPTION_STRICTNESS];\n\tif (strictness !== UNDEFINED_VALUE) {\n\t\tif (!isStrictnessValue(strictness)) {\n\t\t\tthrow new Error(ERR_INVALID_STRICTNESS);\n\t\t}\n\t\treturn strictness;\n\t}\n\tconst checkAmbiguity = options[OPTION_CHECK_AMBIGUITY];\n\tif (checkAmbiguity === UNDEFINED_VALUE) {\n\t\treturn inheritedStrictness;\n\t}\n\tif (checkAmbiguity) {\n\t\treturn STRICTNESS_STRICT;\n\t}\n\treturn inheritedStrictness == STRICTNESS_TOLERANT ? STRICTNESS_TOLERANT : STRICTNESS_BALANCED;\n}\n\nfunction getCheckLocalDirectory(checkLocalDirectory, strictness) {\n\tif (checkLocalDirectory === UNDEFINED_VALUE) {\n\t\treturn strictness != STRICTNESS_TOLERANT;\n\t}\n\treturn Boolean(checkLocalDirectory);\n}\n\nfunction getCheckLocalFilename(checkLocalFilename, strictness) {\n\tif (checkLocalFilename === UNDEFINED_VALUE) {\n\t\treturn strictness == STRICTNESS_STRICT;\n\t}\n\treturn Boolean(checkLocalFilename);\n}\n\nfunction getFilenameValidation(filenameValidation, strictness) {\n\tif (filenameValidation === UNDEFINED_VALUE) {\n\t\treturn strictness;\n\t}\n\tif (!isStrictnessValue(filenameValidation)) {\n\t\tthrow new Error(ERR_INVALID_FILENAME_VALIDATION);\n\t}\n\treturn filenameValidation;\n}\n\nfunction isUnsafeFilename(filename, filenameValidation) {\n\tif (filenameValidation == STRICTNESS_TOLERANT) {\n\t\treturn false;\n\t}\n\tconst pathParts = filename.split(\"/\");\n\tif (pathParts.length > 1 && pathParts[pathParts.length - 1] === \"\") {\n\t\tpathParts.pop();\n\t}\n\tif (PARENT_DIRECTORY_REGEXP.test(filename) || filename.startsWith(\"/\") || filename.startsWith(\"\\\\\") || DRIVE_LETTER_REGEXP.test(filename)) {\n\t\treturn true;\n\t}\n\treturn filenameValidation == STRICTNESS_STRICT && (pathParts.includes(\".\") || pathParts.includes(\"\") || filename.includes(\"\\0\"));\n}\n\nfunction getMaxAppendedDataSize(maxAppendedDataSize, strictness) {\n\tif (maxAppendedDataSize !== UNDEFINED_VALUE) {\n\t\tconst size = toNumber(maxAppendedDataSize);\n\t\tif (typeof size != NUMBER_TYPE || Number.isNaN(size) || size < 0) {\n\t\t\tthrow new Error(ERR_INVALID_MAX_APPENDED_DATA_SIZE);\n\t\t}\n\t\treturn size;\n\t}\n\tif (strictness == STRICTNESS_STRICT) {\n\t\treturn 0;\n\t}\n\tif (strictness == STRICTNESS_TOLERANT) {\n\t\treturn Infinity;\n\t}\n\treturn MAX_16_BITS;\n}\n\nasync function findEndOfCentralDirectory(reader, rejectAmbiguous, maxAppendedDataSize) {\n\tconst { size } = reader;\n\tconst anchoredLength = Math.min(size, END_OF_CENTRAL_DIR_LENGTH + MAX_16_BITS);\n\tconst remoteProbeBudget = { remaining: MAX_END_OF_CENTRAL_DIR_PROBES };\n\tlet endOfDirectoryInfo;\n\tlet plausibleEndOfDirectoryInfo;\n\tlet endOfDirectoryReachingEndCount = 0;\n\tfor await (const [anchoredView, anchoredOffset, anchoredArray, indexByte, offset] of scanEndOfCentralDirectory(reader, anchoredLength)) {\n\t\tconst commentLength = getUint16(anchoredView, indexByte + 20);\n\t\tif (offset + END_OF_CENTRAL_DIR_LENGTH + commentLength == size) {\n\t\t\tconst reachability = await getCentralDirectoryReachability(reader, anchoredView, anchoredOffset, indexByte, offset, size, remoteProbeBudget);\n\t\t\tif (reachability == CENTRAL_DIRECTORY_REACHABLE) {\n\t\t\t\tif (!endOfDirectoryInfo) {\n\t\t\t\t\tendOfDirectoryInfo = getEndOfCentralDirectoryInfo(anchoredArray, indexByte, offset);\n\t\t\t\t}\n\t\t\t\tendOfDirectoryReachingEndCount++;\n\t\t\t\tif (!rejectAmbiguous || endOfDirectoryReachingEndCount > 1) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} else if (reachability == CENTRAL_DIRECTORY_PLAUSIBLE && !plausibleEndOfDirectoryInfo) {\n\t\t\t\tplausibleEndOfDirectoryInfo = getEndOfCentralDirectoryInfo(anchoredArray, indexByte, offset);\n\t\t\t}\n\t\t}\n\t}\n\tif (!endOfDirectoryInfo) {\n\t\tendOfDirectoryInfo = plausibleEndOfDirectoryInfo;\n\t}\n\tif (!endOfDirectoryInfo) {\n\t\tendOfDirectoryInfo = await seekEndOfCentralDirectory(reader, maxAppendedDataSize, remoteProbeBudget);\n\t}\n\treturn { endOfDirectoryInfo, endOfDirectoryReachingEndCount };\n}\n\nasync function seekEndOfCentralDirectory(reader, maxAppendedDataSize, remoteProbeBudget) {\n\tconst { size } = reader;\n\tconst searchLength = Math.min(size, maxAppendedDataSize == Infinity ? size :\n\t\tEND_OF_CENTRAL_DIR_LENGTH + MAX_16_BITS + maxAppendedDataSize);\n\tlet firstSignatureInfo, plausibleInfo;\n\tfor await (const [searchView, searchOffset, searchArray, indexByte, offset] of scanEndOfCentralDirectory(reader, searchLength)) {\n\t\tconst record = getEndOfCentralDirectoryInfo(searchArray, indexByte, offset);\n\t\tif (!firstSignatureInfo) {\n\t\t\tfirstSignatureInfo = record;\n\t\t}\n\t\tconst reachability = await getCentralDirectoryReachability(reader, searchView, searchOffset, indexByte, offset, size, remoteProbeBudget);\n\t\tif (reachability == CENTRAL_DIRECTORY_REACHABLE) {\n\t\t\treturn record;\n\t\t}\n\t\tif (reachability == CENTRAL_DIRECTORY_PLAUSIBLE && !plausibleInfo) {\n\t\t\tplausibleInfo = record;\n\t\t}\n\t}\n\treturn plausibleInfo || firstSignatureInfo;\n}\n\nasync function* scanEndOfCentralDirectory(reader, scanLength) {\n\tconst scanOffset = reader.size - scanLength;\n\tconst scanArray = await readUint8Array(reader, scanOffset, scanLength);\n\tconst scanView = getDataView(scanArray);\n\tfor (let indexByte = scanArray.length - END_OF_CENTRAL_DIR_LENGTH; indexByte >= 0; indexByte--) {\n\t\tif (getUint32(scanView, indexByte) == END_OF_CENTRAL_DIR_SIGNATURE) {\n\t\t\tyield [scanView, scanOffset, scanArray, indexByte, scanOffset + indexByte];\n\t\t}\n\t}\n}\n\nfunction getEndOfCentralDirectoryInfo(scanArray, indexByte, offset) {\n\treturn { offset, buffer: new Uint8Array(scanArray.subarray(indexByte, indexByte + END_OF_CENTRAL_DIR_LENGTH)).buffer };\n}\n\nasync function getCentralDirectoryReachability(reader, view, anchoredOffset, indexByte, offset, size, remoteProbeBudget) {\n\tconst filesLength = getUint16(view, indexByte + 10);\n\tconst directoryDataLength = getUint32(view, indexByte + 12);\n\tconst directoryDataOffset = getUint32(view, indexByte + 16);\n\tif (filesLength == MAX_16_BITS || directoryDataLength == MAX_32_BITS || directoryDataOffset == MAX_32_BITS) {\n\t\tconst locatorSignature = await readSignature(reader, view, anchoredOffset, offset - ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH, size, remoteProbeBudget);\n\t\treturn locatorSignature == ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE ? CENTRAL_DIRECTORY_REACHABLE : CENTRAL_DIRECTORY_UNREACHABLE;\n\t}\n\tif (!filesLength && !directoryDataLength) {\n\t\treturn CENTRAL_DIRECTORY_PLAUSIBLE;\n\t}\n\tconst directoryDiskNumber = getUint16(view, indexByte + 6);\n\tfor (const centralDirectoryOffset of [offset - directoryDataLength, getDiskOffset(reader, directoryDiskNumber) + directoryDataOffset]) {\n\t\tif (await readSignature(reader, view, anchoredOffset, centralDirectoryOffset, size, remoteProbeBudget) == CENTRAL_FILE_HEADER_SIGNATURE) {\n\t\t\treturn CENTRAL_DIRECTORY_REACHABLE;\n\t\t}\n\t}\n\treturn CENTRAL_DIRECTORY_UNREACHABLE;\n}\n\nasync function readSignature(reader, view, anchoredOffset, signatureOffset, size, remoteProbeBudget) {\n\tif (signatureOffset < 0 || signatureOffset + 4 > size) {\n\t\treturn UNDEFINED_VALUE;\n\t}\n\tif (signatureOffset >= anchoredOffset) {\n\t\treturn getUint32(view, signatureOffset - anchoredOffset);\n\t}\n\tif (remoteProbeBudget.remaining > 0) {\n\t\tremoteProbeBudget.remaining--;\n\t\tconst signatureArray = await readUint8Array(reader, signatureOffset, 4);\n\t\treturn getUint32(getDataView(signatureArray), 0);\n\t}\n\treturn UNDEFINED_VALUE;\n}\n\nfunction validateLocalDirectory(zipEntry, localDirectory, rawLocalFilename, checkLocalFilename, warnings) {\n\tconst { rawFilename } = zipEntry;\n\tconst reject = !warnings;\n\tconst maskedLocalDirectory = zipEntry.decryptedDirectory &&\n\t\t(localDirectory.rawBitFlag & BITFLAG_MASKED_LOCAL_HEADERS) == BITFLAG_MASKED_LOCAL_HEADERS;\n\tif (checkLocalFilename && !maskedLocalDirectory &&\n\t\t(rawLocalFilename.length != rawFilename.length ||\n\t\t\trawLocalFilename.some((byteValue, indexByte) => byteValue != rawFilename[indexByte]))) {\n\t\treportAmbiguity(reject, warnings, WARNING_MISMATCHED_LOCAL_FILE_HEADER_FILENAME);\n\t}\n\tif ((localDirectory.rawBitFlag & BITFLAG_AMBIGUITY_MASK) != (zipEntry.rawBitFlag & BITFLAG_AMBIGUITY_MASK)) {\n\t\treportAmbiguity(reject, warnings, WARNING_MISMATCHED_LOCAL_FILE_HEADER_BIT_FLAG);\n\t}\n\tif (localDirectory.compressionMethod != zipEntry.compressionMethod) {\n\t\treportAmbiguity(reject, warnings, WARNING_MISMATCHED_LOCAL_FILE_HEADER_COMPRESSION_METHOD);\n\t}\n\tif (!localDirectory.bitFlag.dataDescriptor && !maskedLocalDirectory &&\n\t\t(localDirectory.crc32 || localDirectory.compressedSize || localDirectory.uncompressedSize) &&\n\t\t(localDirectory.crc32 != zipEntry.crc32 ||\n\t\t\tlocalDirectory.compressedSize != zipEntry.compressedSize ||\n\t\t\tlocalDirectory.uncompressedSize != zipEntry.uncompressedSize)) {\n\t\treportAmbiguity(reject, warnings, WARNING_MISMATCHED_LOCAL_FILE_HEADER_CRC32_OR_SIZES);\n\t}\n}\n\nfunction reportAmbiguity(reject, warnings, reason) {\n\tif (reject) {\n\t\tthrowAmbiguousArchive(reason);\n\t} else {\n\t\taddWarning(warnings, reason);\n\t}\n}\n\nfunction throwAmbiguousArchive(reason) {\n\tconst error = new Error(ERR_AMBIGUOUS_ARCHIVE);\n\terror.reason = reason;\n\tthrow error;\n}\n\nfunction getOptionValue(zipReader, options, name) {\n\treturn options[name] === UNDEFINED_VALUE ? zipReader.options[name] : options[name];\n}\n\nfunction getFunctionOptionValue(zipReader, options, name) {\n\treturn checkFunctionOption(getOptionValue(zipReader, options, name));\n}\n\n\nfunction getDate(timeRaw) {\n\tconst date = (timeRaw & 0xffff0000) >> 16, time = timeRaw & MAX_16_BITS;\n\tconst result = new Date(1980 + ((date & 0xFE00) >> 9), ((date & 0x01E0) >> 5) - 1, date & 0x001F, (time & 0xF800) >> 11, (time & 0x07E0) >> 5, (time & 0x001F) * 2, 0);\n\treturn result < MIN_DATE ? MIN_DATE : result;\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\tconst value = view.getBigUint64(offset, true);\n\tif (value > MAX_SAFE_UINT64) {\n\t\tthrow new Error(ERR_UNSUPPORTED_UINT64);\n\t}\n\treturn Number(value);\n}\n","import type { NumberSplit } from './types'\n\n/**\n * Test whether a string contains an integer number\n */\nexport function isInteger(value: string): boolean {\n return INTEGER_REGEX.test(value)\n}\n\nconst INTEGER_REGEX = /^-?[0-9]+$/\n\n/**\n * Test whether a string contains a number\n * http://stackoverflow.com/questions/13340717/json-numbers-regular-expression\n */\nexport function isNumber(value: string): boolean {\n return NUMBER_REGEX.test(value)\n}\n\nconst NUMBER_REGEX = /^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$/\n\n/**\n * Test whether a string can be safely represented with a number\n * without information loss.\n *\n * When approx is true, floating point numbers that lose a few digits but\n * are still approximately equal in value are considered safe too.\n * Integer numbers must still be exactly equal.\n */\nexport function isSafeNumber(\n value: string,\n config?: {\n approx: boolean\n }\n): boolean {\n if (isInteger(value)) {\n return Number.isSafeInteger(Number.parseInt(value, 10))\n }\n\n const num = Number.parseFloat(value)\n const parsed = String(num)\n\n if (value === parsed) {\n return true\n }\n\n const valueDigits = extractSignificantDigits(value)\n const parsedDigits = extractSignificantDigits(parsed)\n\n if (valueDigits === parsedDigits) {\n return true\n }\n\n if (config?.approx === true) {\n // A value is approximately equal when:\n // 1. it is a floating point number, not an integer\n // 2. it has at least 14 digits\n // 3. the first 14 digits are equal\n const requiredDigits = 14\n if (\n !isInteger(value) &&\n parsedDigits.length >= requiredDigits &&\n valueDigits.startsWith(parsedDigits.substring(0, requiredDigits))\n ) {\n return true\n }\n }\n\n return false\n}\n\nexport enum UnsafeNumberReason {\n underflow = 'underflow',\n overflow = 'overflow',\n truncate_integer = 'truncate_integer',\n truncate_float = 'truncate_float'\n}\n\n/**\n * When the provided value is an unsafe number, describe what the reason is:\n * overflow, underflow, truncate_integer, or truncate_float.\n * Returns undefined when the value is safe.\n */\nexport function getUnsafeNumberReason(value: string): UnsafeNumberReason | undefined {\n if (isSafeNumber(value, { approx: false })) {\n return undefined\n }\n\n if (isInteger(value)) {\n return UnsafeNumberReason.truncate_integer\n }\n\n const num = Number.parseFloat(value)\n if (!Number.isFinite(num)) {\n return UnsafeNumberReason.overflow\n }\n\n if (num === 0) {\n return UnsafeNumberReason.underflow\n }\n\n return UnsafeNumberReason.truncate_float\n}\n\n/**\n * Convert a string into a number when it is safe to do so.\n * Throws an error otherwise, explaining the reason.\n */\nexport function toSafeNumberOrThrow(\n value: string,\n config?: {\n approx: boolean\n }\n): number {\n const number = Number.parseFloat(value)\n\n const unsafeReason = getUnsafeNumberReason(value)\n if (\n config?.approx === true\n ? unsafeReason && unsafeReason !== UnsafeNumberReason.truncate_float\n : unsafeReason\n ) {\n const unsafeReasonText = unsafeReason?.replace(/_\\w+$/, '')\n throw new Error(\n `Cannot safely convert to number: the value '${value}' would ${unsafeReasonText} and become ${number}`\n )\n }\n\n return number\n}\n\n/**\n * Split a number into sign, digits, and exponent.\n * Leading zeros and non-canonical zeros are normalized.\n *\n * The value can be constructed again from a split number by inserting a dot\n * at the second character of the digits if there is more than one digit,\n * prepending it with the sign, and appending an \"e\" and the exponent as follows:\n *\n * const reconstructed = `${sign}${digits[0]}.${digits.slice(1)}e${exponent}`\n *\n */\nexport function splitNumber(value: string): NumberSplit {\n const match = value.match(/^(-?)(\\d+\\.?\\d*)([eE]([+-]?\\d+))?$/)\n if (!match) {\n throw new SyntaxError(`Invalid number: ${value}`)\n }\n\n const sign = match[1] as '-' | ''\n const digitsStr = match[2]\n let exponent = match[4] !== undefined ? Number.parseInt(match[4], 10) : 0\n\n const dot = digitsStr.indexOf('.')\n exponent += dot !== -1 ? dot - 1 : digitsStr.length - 1\n\n const digits = digitsStr\n .replace('.', '') // remove the dot (must be removed before removing leading zeros)\n .replace(/^0*/, (zeros: string) => {\n // remove leading zeros, add their count to the exponent\n exponent -= zeros.length\n return ''\n })\n .replace(/0*$/, '') // remove trailing zeros\n\n // normalize zero, for example normalizes 0e5 or -0 into 0\n return digits.length > 0 ? { sign, digits, exponent } : { sign: '', digits: '0', exponent: 0 }\n}\n\n/**\n * Compare two strings containing a numeric value\n * Returns 1 when a is larger than b, 0 when they are equal,\n * and -1 when a is smaller than b.\n */\nexport function compareNumber(a: string, b: string): 1 | 0 | -1 {\n if (a === b) {\n return 0\n }\n\n const aa = splitNumber(a)\n const bb = splitNumber(b)\n\n type Sign = -1 | 1\n\n const sign: Sign = aa.sign === '-' ? -1 : 1\n\n if (aa.sign !== bb.sign) {\n return sign\n }\n\n if (aa.exponent !== bb.exponent) {\n return aa.exponent > bb.exponent ? sign : aa.exponent < bb.exponent ? (-sign as Sign) : 0\n }\n\n return aa.digits > bb.digits ? sign : aa.digits < bb.digits ? (-sign as Sign) : 0\n}\n\n/**\n * Count the significant digits of a number.\n *\n * For example:\n * '2.34' returns 3\n * '-77' returns 2\n * '0.003400' returns 2\n * '120.5e+30' returns 4\n **/\nexport function countSignificantDigits(value: string): number {\n const { start, end } = getSignificantDigitRange(value)\n\n const dot = value.indexOf('.')\n if (dot === -1 || dot < start || dot > end) {\n return end - start\n }\n\n return end - start - 1\n}\n\n/**\n * Get the significant digits of a number.\n *\n * For example:\n * '2.34' returns '234'\n * '-77' returns '77'\n * '0.003400' returns '34'\n * '120.5e+30' returns '1205'\n **/\nexport function extractSignificantDigits(value: string): string {\n const { start, end } = getSignificantDigitRange(value)\n\n const digits = value.substring(start, end)\n\n const dot = digits.indexOf('.')\n if (dot === -1) {\n return digits\n }\n\n return digits.substring(0, dot) + digits.substring(dot + 1)\n}\n\n/**\n * Returns the range (start to end) of the significant digits of a value.\n * Note that this range _may_ contain the decimal dot.\n *\n * For example:\n *\n * getSignificantDigitRange('0.0325900') // { start: 3, end: 7 }\n * getSignificantDigitRange('2.0300') // { start: 0, end: 3 }\n * getSignificantDigitRange('0.0') // { start: 3, end: 3 }\n *\n */\nfunction getSignificantDigitRange(value: string): { start: number; end: number } {\n let start = 0\n if (value[0] === '-') {\n start++\n }\n while (value[start] === '0' || value[start] === '.') {\n start++\n }\n\n let end = value.lastIndexOf('e')\n if (end === -1) {\n end = value.lastIndexOf('E')\n }\n if (end === -1) {\n end = value.length\n }\n while ((value[end - 1] === '0' || value[end - 1] === '.') && end > start) {\n end--\n }\n\n return { start, end }\n}\n","import {\n compareNumber,\n countSignificantDigits,\n getUnsafeNumberReason,\n isInteger,\n isNumber,\n UnsafeNumberReason\n} from './utils.js'\n\n/**\n * A lossless number. Stores its numeric value as string\n */\nexport class LosslessNumber {\n // numeric value as string\n value: string\n\n // type information\n isLosslessNumber = true\n\n constructor(value: string) {\n if (!isNumber(value)) {\n throw new Error(`Invalid number (value: \"${value}\")`)\n }\n\n this.value = value\n }\n\n /**\n * Get the value of the LosslessNumber as number or bigint.\n *\n * - a number is returned for safe numbers and decimal values that only lose some insignificant digits\n * - a bigint is returned for big integer numbers\n * - an Error is thrown for values that will overflow or underflow\n *\n * Note that you can implement your own strategy for conversion by just getting the value as string\n * via .toString(), and using util functions like isInteger, isSafeNumber, getUnsafeNumberReason,\n * and toSafeNumberOrThrow to convert it to a numeric value.\n */\n valueOf(): number | bigint {\n const unsafeReason = getUnsafeNumberReason(this.value)\n\n // safe or truncate_float\n if (unsafeReason === undefined || unsafeReason === UnsafeNumberReason.truncate_float) {\n return Number.parseFloat(this.value)\n }\n\n // truncate_integer\n if (isInteger(this.value)) {\n return BigInt(this.value)\n }\n\n // overflow or underflow\n throw new Error(\n `Cannot safely convert to number: the value '${this.value}' would ${unsafeReason} and become ${Number.parseFloat(this.value)}`\n )\n }\n\n /**\n * Get the value of the LosslessNumber as string.\n */\n toString(): string {\n return this.value\n }\n\n // Note: we do NOT implement a .toJSON() method, and you should not implement\n // or use that, it cannot safely turn the numeric value in the string into\n // stringified JSON since it has to be parsed into a number first.\n}\n\n/**\n * Test whether a value is a LosslessNumber\n */\nexport function isLosslessNumber(value: unknown): value is LosslessNumber {\n // @ts-expect-error\n return (value && typeof value === 'object' && value.isLosslessNumber) || false\n}\n\n/**\n * Convert a number into a LosslessNumber if this is possible in a safe way\n * If the value has too many digits, or is NaN or Infinity, an error will be thrown\n */\nexport function toLosslessNumber(value: number): LosslessNumber {\n const maxDigits = 15\n if (countSignificantDigits(String(value)) > maxDigits) {\n throw new Error(\n `Invalid number: contains more than 15 digits and is most likely truncated and unsafe by itself (value: ${value})`\n )\n }\n\n if (Number.isNaN(value)) {\n throw new Error('Invalid number: NaN')\n }\n\n if (!Number.isFinite(value)) {\n throw new Error(`Invalid number: ${value}`)\n }\n\n return new LosslessNumber(String(value))\n}\n\n/**\n * Compare two lossless numbers.\n * Returns 1 when a is larger than b, 0 when they are equal,\n * and -1 when a is smaller than b.\n */\nexport function compareLosslessNumber(a: LosslessNumber, b: LosslessNumber): 1 | 0 | -1 {\n return compareNumber(a.value, b.value)\n}\n","import { LosslessNumber } from './LosslessNumber.js'\nimport { isInteger } from './utils.js'\n\nexport function parseLosslessNumber(value: string): LosslessNumber {\n return new LosslessNumber(value)\n}\n\nexport function parseNumberAndBigInt(value: string): number | bigint {\n return isInteger(value) ? BigInt(value) : Number.parseFloat(value)\n}\n","import { isLosslessNumber } from './LosslessNumber.js'\nimport type { GenericObject, Reviver } from './types'\n\n/**\n * Revive a json object.\n * Applies the reviver function recursively on all values in the JSON object.\n * @param json A JSON Object, Array, or value\n * @param reviver\n * A reviver function invoked with arguments `key` and `value`,\n * which must return a replacement value. The function context\n * (`this`) is the Object or Array that contains the currently\n * handled value.\n */\nexport function revive(json: unknown, reviver: Reviver): unknown {\n return reviveValue({ '': json }, '', json, reviver)\n}\n\n/**\n * Revive a value\n */\nfunction reviveValue(\n context: GenericObject<unknown> | Array<unknown>,\n key: string,\n value: unknown,\n reviver: Reviver\n): unknown {\n if (Array.isArray(value)) {\n return reviver.call(context, key, reviveArray(value, reviver))\n }\n\n if (value && typeof value === 'object' && !isLosslessNumber(value)) {\n // note the special case for LosslessNumber,\n // we don't want to iterate over the internals of a LosslessNumber\n return reviver.call(context, key, reviveObject(value as GenericObject<unknown>, reviver))\n }\n\n return reviver.call(context, key, value)\n}\n\n/**\n * Revive the properties of an object\n */\nfunction reviveObject(object: GenericObject<unknown>, reviver: Reviver) {\n for (const key of Object.keys(object)) {\n const value = reviveValue(object, key, object[key], reviver)\n if (value !== undefined) {\n object[key] = value\n } else {\n delete object[key]\n }\n }\n\n return object\n}\n\n/**\n * Revive the properties of an Array\n */\nfunction reviveArray(array: Array<unknown>, reviver: Reviver): Array<unknown> {\n for (let i = 0; i < array.length; i++) {\n array[i] = reviveValue(array, String(i), array[i], reviver)\n }\n\n return array\n}\n","import { parseLosslessNumber } from './numberParsers.js'\nimport { revive } from './revive.js'\nimport type { DuplicateKeyInfo, GenericObject, NumberParser, ParseOptions, Reviver } from './types'\n\n/**\n * The LosslessJSON.parse() method parses a string as JSON, optionally transforming\n * the value produced by parsing.\n *\n * The parser is based on the parser of Tan Li Hou shared in\n * https://lihautan.com/json-parser-with-javascript/\n *\n * @param text\n * The string to parse as JSON. See the JSON object for a description of JSON syntax.\n *\n * @param [reviver]\n * If a function, prescribes how the value originally produced by parsing is\n * transformed, before being returned.\n *\n * @param [options=ParseOptions | NumberParserArgument]\n * Pass a custom number parser. Input is a string, and the output can be unknown\n * numeric value: number, bigint, LosslessNumber, or a custom BigNumber library.\n *\n * @returns Returns the Object corresponding to the given JSON text.\n *\n * @throws Throws a SyntaxError exception if the string to parse is not valid JSON.\n */\nexport function parse(\n text: string,\n reviver?: Reviver | null,\n options?: ParseOptions | NumberParser\n): unknown {\n const optionsObj = typeof options === 'function' ? { parseNumber: options } : options\n const parseNumber = optionsObj?.parseNumber ?? parseLosslessNumber\n const onDuplicateKey = optionsObj?.onDuplicateKey ?? throwDuplicateKey\n\n let i = 0\n const value = parseValue()\n expectValue(value)\n expectEndOfInput()\n\n return reviver ? revive(value, reviver) : value\n\n function parseObject(): GenericObject<unknown> | undefined {\n if (text.charCodeAt(i) === codeOpeningBrace) {\n i++\n skipWhitespace()\n\n const object: GenericObject<unknown> = {}\n let initial = true\n while (i < text.length && text.charCodeAt(i) !== codeClosingBrace) {\n if (!initial) {\n eatComma()\n skipWhitespace()\n } else {\n initial = false\n }\n\n const start = i\n\n const key = parseString()\n if (key === undefined) {\n throwObjectKeyExpected()\n return // To make TS happy\n }\n\n skipWhitespace()\n eatColon()\n const value = parseValue()\n\n if (value === undefined) {\n throwObjectValueExpected()\n return // To make TS happy\n }\n\n // handle duplicate keys\n // biome-ignore lint/suspicious/noPrototypeBuiltins: TODO: replace with hasOwn one day, when browser support is high enough\n if (Object.prototype.hasOwnProperty.call(object, key) && !isDeepEqual(value, object[key])) {\n // Note that we could also test `if(key in object) {...}`\n // or `if (object[key] !== 'undefined') {...}`, but that is slower.\n const returnedValue = onDuplicateKey({\n key,\n position: start + 1,\n oldValue: object[key],\n newValue: value\n })\n\n if (returnedValue !== undefined) {\n object[key] = returnedValue\n }\n } else {\n object[key] = value\n }\n }\n\n if (text.charCodeAt(i) !== codeClosingBrace) {\n throwObjectKeyOrEndExpected()\n }\n i++\n\n return object\n }\n }\n\n function parseArray(): Array<unknown> | unknown {\n if (text.charCodeAt(i) === codeOpeningBracket) {\n i++\n skipWhitespace()\n\n const array = []\n let initial = true\n while (i < text.length && text.charCodeAt(i) !== codeClosingBracket) {\n if (!initial) {\n eatComma()\n } else {\n initial = false\n }\n\n const value = parseValue()\n expectArrayItem(value)\n array.push(value)\n }\n\n if (text.charCodeAt(i) !== codeClosingBracket) {\n throwArrayItemOrEndExpected()\n }\n i++\n\n return array\n }\n }\n\n function parseValue(): unknown {\n skipWhitespace()\n\n const value =\n parseString() ??\n parseNumeric() ??\n parseObject() ??\n parseArray() ??\n parseKeyword('true', true) ??\n parseKeyword('false', false) ??\n parseKeyword('null', null)\n\n skipWhitespace()\n\n return value\n }\n\n function parseKeyword(name: string, value: unknown): unknown | undefined {\n if (text.slice(i, i + name.length) === name) {\n i += name.length\n return value\n }\n }\n\n function skipWhitespace() {\n while (isWhitespace(text.charCodeAt(i))) {\n i++\n }\n }\n\n function parseString() {\n if (text.charCodeAt(i) === codeDoubleQuote) {\n i++\n let result = ''\n while (i < text.length && text.charCodeAt(i) !== codeDoubleQuote) {\n if (text.charCodeAt(i) === codeBackslash) {\n const char = text[i + 1]\n const escapeChar = escapeCharacters[char]\n if (escapeChar !== undefined) {\n result += escapeChar\n i++\n } else if (char === 'u') {\n if (\n isHex(text.charCodeAt(i + 2)) &&\n isHex(text.charCodeAt(i + 3)) &&\n isHex(text.charCodeAt(i + 4)) &&\n isHex(text.charCodeAt(i + 5))\n ) {\n result += String.fromCharCode(Number.parseInt(text.slice(i + 2, i + 6), 16))\n i += 5\n } else {\n throwInvalidUnicodeCharacter(i)\n }\n } else {\n throwInvalidEscapeCharacter(i)\n }\n } else {\n if (isValidStringCharacter(text.charCodeAt(i))) {\n result += text[i]\n } else {\n throwInvalidCharacter(text[i])\n }\n }\n i++\n }\n expectEndOfString()\n i++\n return result\n }\n }\n\n function parseNumeric() {\n const start = i\n if (text.charCodeAt(i) === codeMinus) {\n i++\n expectDigit(start)\n }\n\n if (text.charCodeAt(i) === codeZero) {\n i++\n } else if (isNonZeroDigit(text.charCodeAt(i))) {\n i++\n while (isDigit(text.charCodeAt(i))) {\n i++\n }\n }\n\n if (text.charCodeAt(i) === codeDot) {\n i++\n expectDigit(start)\n while (isDigit(text.charCodeAt(i))) {\n i++\n }\n }\n\n if (text.charCodeAt(i) === codeLowercaseE || text.charCodeAt(i) === codeUppercaseE) {\n i++\n if (text.charCodeAt(i) === codeMinus || text.charCodeAt(i) === codePlus) {\n i++\n }\n expectDigit(start)\n while (isDigit(text.charCodeAt(i))) {\n i++\n }\n }\n\n if (i > start) {\n return parseNumber(text.slice(start, i))\n }\n }\n\n function eatComma() {\n if (text.charCodeAt(i) !== codeComma) {\n throw new SyntaxError(`Comma ',' expected after value ${gotAt()}`)\n }\n i++\n }\n\n function eatColon() {\n if (text.charCodeAt(i) !== codeColon) {\n throw new SyntaxError(`Colon ':' expected after property name ${gotAt()}`)\n }\n i++\n }\n\n function expectValue(value: unknown) {\n if (value === undefined) {\n throw new SyntaxError(`JSON value expected ${gotAt()}`)\n }\n }\n\n function expectArrayItem(value: unknown) {\n if (value === undefined) {\n throw new SyntaxError(`Array item expected ${gotAt()}`)\n }\n }\n\n function expectEndOfInput() {\n if (i < text.length) {\n throw new SyntaxError(`Expected end of input ${gotAt()}`)\n }\n }\n\n function expectDigit(start: number) {\n if (!isDigit(text.charCodeAt(i))) {\n const numSoFar = text.slice(start, i)\n throw new SyntaxError(`Invalid number '${numSoFar}', expecting a digit ${gotAt()}`)\n }\n }\n\n function expectEndOfString() {\n if (text.charCodeAt(i) !== codeDoubleQuote) {\n throw new SyntaxError(`End of string '\"' expected ${gotAt()}`)\n }\n }\n\n function throwObjectKeyExpected() {\n throw new SyntaxError(`Quoted object key expected ${gotAt()}`)\n }\n\n function throwDuplicateKey({ key, position }: DuplicateKeyInfo) {\n throw new SyntaxError(`Duplicate key '${key}' encountered at position ${position}`)\n }\n\n function throwObjectKeyOrEndExpected() {\n throw new SyntaxError(`Quoted object key or end of object '}' expected ${gotAt()}`)\n }\n\n function throwArrayItemOrEndExpected() {\n throw new SyntaxError(`Array item or end of array ']' expected ${gotAt()}`)\n }\n\n function throwInvalidCharacter(char: string) {\n throw new SyntaxError(`Invalid character '${char}' ${pos()}`)\n }\n\n function throwInvalidEscapeCharacter(start: number) {\n const chars = text.slice(start, start + 2)\n throw new SyntaxError(`Invalid escape character '${chars}' ${pos()}`)\n }\n\n function throwObjectValueExpected() {\n throw new SyntaxError(`Object value expected after ':' ${pos()}`)\n }\n\n function throwInvalidUnicodeCharacter(start: number) {\n const chars = text.slice(start, start + 6)\n throw new SyntaxError(`Invalid unicode character '${chars}' ${pos()}`)\n }\n\n // zero based character position\n function pos(): string {\n return `at position ${i}`\n }\n\n function got(): string {\n return i < text.length ? `but got '${text[i]}'` : 'but reached end of input'\n }\n\n function gotAt(): string {\n return `${got()} ${pos()}`\n }\n}\n\nfunction isWhitespace(code: number): boolean {\n return code === codeSpace || code === codeNewline || code === codeTab || code === codeReturn\n}\n\nfunction isHex(code: number): boolean {\n return (\n (code >= codeZero && code <= codeNine) ||\n (code >= codeUppercaseA && code <= codeUppercaseF) ||\n (code >= codeLowercaseA && code <= codeLowercaseF)\n )\n}\n\nfunction isDigit(code: number): boolean {\n return code >= codeZero && code <= codeNine\n}\n\nfunction isNonZeroDigit(code: number): boolean {\n return code >= codeOne && code <= codeNine\n}\n\nexport function isValidStringCharacter(code: number): boolean {\n return code >= 0x20 && code <= 0x10ffff\n}\n\nexport function isDeepEqual(a: unknown, b: unknown): boolean {\n if (a === b) {\n return true\n }\n\n if (Array.isArray(a) && Array.isArray(b)) {\n return a.length === b.length && a.every((item, index) => isDeepEqual(item, b[index]))\n }\n\n if (isObject(a) && isObject(b)) {\n const keys = [...new Set([...Object.keys(a), ...Object.keys(b)])]\n return keys.every((key) => isDeepEqual(a[key], b[key]))\n }\n\n return false\n}\n\nfunction isObject(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null\n}\n\n// map with all escape characters\nconst escapeCharacters: GenericObject<string> = {\n '\"': '\"',\n '\\\\': '\\\\',\n '/': '/',\n b: '\\b',\n f: '\\f',\n n: '\\n',\n r: '\\r',\n t: '\\t'\n // note that \\u is handled separately in parseString()\n}\n\nconst codeBackslash = 0x5c // \"\\\"\nconst codeOpeningBrace = 0x7b // \"{\"\nconst codeClosingBrace = 0x7d // \"}\"\nconst codeOpeningBracket = 0x5b // \"[\"\nconst codeClosingBracket = 0x5d // \"]\"\nconst codeSpace = 0x20 // \" \"\nconst codeNewline = 0xa // \"\\n\"\nconst codeTab = 0x9 // \"\\t\"\nconst codeReturn = 0xd // \"\\r\"\nconst codeDoubleQuote = 0x0022 // \"\nconst codePlus = 0x2b // \"+\"\nconst codeMinus = 0x2d // \"-\"\nconst codeZero = 0x30\nconst codeOne = 0x31\nconst codeNine = 0x39\nconst codeComma = 0x2c // \",\"\nconst codeDot = 0x2e // \".\" (dot, period)\nconst codeColon = 0x3a // \":\"\nexport const codeUppercaseA = 0x41 // \"A\"\nexport const codeLowercaseA = 0x61 // \"a\"\nexport const codeUppercaseE = 0x45 // \"E\"\nexport const codeLowercaseE = 0x65 // \"e\"\nexport const codeUppercaseF = 0x46 // \"F\"\nexport const codeLowercaseF = 0x66 // \"f\"\n","import type { GenericObject, NumberStringifier, Replacer } from './types'\nimport { isNumber } from './utils.js'\n\n/**\n * The LosslessJSON.stringify() method converts a JavaScript value to a JSON string,\n * optionally replacing values if a replacer function is specified, or\n * optionally including only the specified properties if a replacer array is specified.\n *\n * @param value\n * The value to convert to a JSON string.\n *\n * @param [replacer]\n * A function that alters the behavior of the stringification process,\n * or an array of String and Number objects that serve as a whitelist for\n * selecting the properties of the value object to be included in the JSON string.\n * If this value is null or not provided, all properties of the object are\n * included in the resulting JSON string.\n *\n * @param [space]\n * A String or Number object that's used to insert white space into the output\n * JSON string for readability purposes. If this is a Number, it indicates the\n * number of space characters to use as white space; this number is capped at 10\n * if it's larger than that. Values less than 1 indicate that no space should be\n * used. If this is a String, the string (or the first 10 characters of the string,\n * if it's longer than that) is used as white space. If this parameter is not\n * provided (or is null), no white space is used.\n *\n * @param [numberStringifiers]\n * An optional list with additional number stringifiers, for example to serialize\n * a BigNumber. The output of the function must be valid stringified JSON.\n * When `undefined` is returned, the property will be deleted from the object.\n * The difference with using a `replacer` is that the output of a `replacer`\n * must be JSON and will be stringified afterwards, whereas the output of the\n * `numberStringifiers` is already stringified JSON.\n *\n * @returns Returns the string representation of the JSON object.\n */\nexport function stringify(\n value: unknown,\n replacer?: Replacer | null,\n space?: number | string,\n numberStringifiers?: NumberStringifier[]\n): string | undefined {\n const resolvedSpace = resolveSpace(space)\n\n const replacedValue =\n typeof replacer === 'function' ? replacer.call({ '': value }, '', value) : value\n\n return stringifyValue(replacedValue, '')\n\n /**\n * Stringify a value\n */\n function stringifyValue(value: unknown, indent: string | undefined): string | undefined {\n if (Array.isArray(numberStringifiers)) {\n const stringifier = numberStringifiers.find((item) => item.test(value))\n if (stringifier) {\n const str: unknown = stringifier.stringify(value)\n if (typeof str !== 'string' || !isNumber(str)) {\n throw new Error(\n `Invalid JSON number: output of a number stringifier must be a string containing a JSON number (output: ${str})`\n )\n }\n return str\n }\n }\n\n // boolean, null, number, string, or date\n if (\n typeof value === 'boolean' ||\n typeof value === 'number' ||\n typeof value === 'string' ||\n value === null ||\n value instanceof Date ||\n value instanceof Boolean ||\n value instanceof Number ||\n value instanceof String\n ) {\n return JSON.stringify(value)\n }\n\n // lossless number, the secret ingredient :)\n // @ts-expect-error\n if (value?.isLosslessNumber) {\n return value.toString()\n }\n\n // BigInt\n if (typeof value === 'bigint') {\n return value.toString()\n }\n\n // Array\n if (Array.isArray(value)) {\n return stringifyArray(value, indent)\n }\n\n // Object (test lastly!)\n if (value && typeof value === 'object') {\n return stringifyObject(value as GenericObject<unknown>, indent)\n }\n\n return undefined\n }\n\n /**\n * Stringify an array\n */\n function stringifyArray(array: Array<unknown>, indent: string | undefined): string {\n if (array.length === 0) {\n return '[]'\n }\n\n const childIndent = resolvedSpace ? indent + resolvedSpace : undefined\n let str = resolvedSpace ? '[\\n' : '['\n\n for (let i = 0; i < array.length; i++) {\n const item =\n typeof replacer === 'function' ? replacer.call(array, String(i), array[i]) : array[i]\n\n if (resolvedSpace) {\n str += childIndent\n }\n\n if (typeof item !== 'undefined' && typeof item !== 'function') {\n str += stringifyValue(item, childIndent)\n } else {\n str += 'null'\n }\n\n if (i < array.length - 1) {\n str += resolvedSpace ? ',\\n' : ','\n }\n }\n\n str += resolvedSpace ? `\\n${indent}]` : ']'\n return str\n }\n\n /**\n * Stringify an object\n */\n function stringifyObject(\n object: GenericObject<unknown>,\n indent: string | undefined\n ): string | undefined {\n if (typeof object.toJSON === 'function') {\n return stringify(object.toJSON(), replacer, space, undefined)\n }\n\n const keys: string[] = Array.isArray(replacer) ? replacer.map(String) : Object.keys(object)\n\n if (keys.length === 0) {\n return '{}'\n }\n\n const childIndent = resolvedSpace ? indent + resolvedSpace : undefined\n let first = true\n let str = resolvedSpace ? '{\\n' : '{'\n\n for (const key of keys) {\n const value =\n typeof replacer === 'function' ? replacer.call(object, key, object[key]) : object[key]\n\n if (includeProperty(key, value)) {\n if (first) {\n first = false\n } else {\n str += resolvedSpace ? ',\\n' : ','\n }\n\n const keyStr = JSON.stringify(key)\n str += resolvedSpace ? `${childIndent + keyStr}: ` : `${keyStr}:`\n\n str += stringifyValue(value, childIndent)\n }\n }\n\n str += resolvedSpace ? `\\n${indent}}` : '}'\n return str\n }\n\n /**\n * Test whether to include a property in a stringified object or not.\n */\n function includeProperty(_key: string, value: unknown): boolean {\n return typeof value !== 'undefined' && typeof value !== 'function' && typeof value !== 'symbol'\n }\n}\n\n/**\n * Resolve a JSON stringify space:\n * replace a number with a string containing that number of spaces\n */\nfunction resolveSpace(space: number | string | undefined): string | undefined {\n if (typeof space === 'number') {\n return ' '.repeat(space)\n }\n\n if (typeof space === 'string' && space !== '') {\n return space\n }\n\n return undefined\n}\n","import { parse as losslessParse } from \"lossless-json\";\n\n/**\n * A JSON object that names the same key twice is refused — even when both values are equal. A\n * password-manager export with a repeated key is malformed or tampered with, and which copy wins\n * differs between readers. `lossless-json` only refuses a repeat with a DIFFERENT value (the web\n * app patched that in its own install; a patch cannot travel with this package), so every parse in\n * `io/` checks keys here first.\n */\nexport function assertNoDuplicateKeys(text: string): void {\n const stack: { keys: Set<string> | null; expectKey: boolean }[] = [];\n let i = 0;\n while (i < text.length) {\n const ch = text[i];\n if (ch === '\"') {\n const start = i;\n i++;\n while (i < text.length && text[i] !== '\"') i += text[i] === \"\\\\\" ? 2 : 1;\n const top = stack[stack.length - 1];\n if (top?.keys && top.expectKey) {\n const key = JSON.parse(text.slice(start, i + 1)) as string;\n if (top.keys.has(key)) throw new SyntaxError(`Duplicate key '${key}' encountered at position ${start + 1}`);\n top.keys.add(key);\n top.expectKey = false;\n }\n } else if (ch === \"{\") stack.push({ keys: new Set(), expectKey: true });\n else if (ch === \"[\") stack.push({ keys: null, expectKey: false });\n else if (ch === \"}\" || ch === \"]\") stack.pop();\n else if (ch === \",\") {\n const top = stack[stack.length - 1];\n if (top?.keys) top.expectKey = true;\n }\n i++;\n }\n}\n\n/** `lossless-json` `parse`, after the duplicate-key check. Every parse in `io/` uses this one. */\nexport const parseStrictJson: typeof losslessParse = (text, ...rest) => {\n assertNoDuplicateKeys(text);\n return losslessParse(text, ...rest);\n};\n","/** Local-only CSV normalization for Vault's first password-manager import. */\nimport type { VaultItemCreateRequest } from \"@ai-matrx/api/account\";\nimport { parseDelimited } from \"@ai-matrx/kit/delimited\";\n\nimport { isLoopbackUrl } from \"./loopback\";\n\nexport type CsvImportLimits = {\n maxFileBytes: number;\n maxRecords: number;\n maxColumns: number;\n maxCellBytes: number;\n maxFields: number;\n maxPlaintextFieldBytes: number;\n maxRequestBodyBytes: number;\n maxJsonDepth?: number;\n jsonWorkerTimeoutMs?: number;\n};\nexport type CsvColumnRole =\n \"title\" | \"username\" | \"password\" | \"url\" | \"notes\" | \"otp\" | \"keep\";\nexport type CsvImportRow = {\n rowNumber: number;\n cells: string[];\n issue?: \"invalid\" | \"unsupported\" | undefined;\n};\nexport type CsvImportPreview = {\n headers: string[];\n rows: CsvImportRow[];\n issues: number;\n};\nexport type CsvImportCommand = {\n rowId: string;\n body: VaultItemCreateRequest;\n hasOtp: boolean;\n};\nexport type CsvImportPreparation =\n | { status: \"ready\"; command: CsvImportCommand }\n | {\n status: \"skipped\";\n reason:\n | \"invalid\"\n | \"unsupported\"\n | \"deleted\"\n | \"archived\"\n | \"possible_duplicate\";\n }\n | { status: \"invalid\"; diagnostic: string };\nexport type CsvImportOutcome = {\n imported: number;\n skipped: number;\n failed: number;\n cancelled: boolean;\n definitive: boolean;\n /** The first command that was not confirmed. Reuse it on a same-session retry. */\n progressCursor: number;\n};\n\nexport type CsvImportDispatch = \"committed\" | \"retryable\" | \"definitive\";\n\n/** The request's owner: an organization's vault, or the person's own. */\nexport function principalOf(organizationId: string | null): NonNullable<VaultItemCreateRequest[\"principal\"]> {\n return organizationId ? { type: \"organization\", organization_id: organizationId } : { type: \"user\" };\n}\n\nfunction utf8ByteLength(value: string): number {\n if (typeof TextEncoder !== \"undefined\")\n return new TextEncoder().encode(value).byteLength;\n return unescape(encodeURIComponent(value)).length;\n}\n\nfunction csvParserInput(text: string): string {\n // The parser emits an extra empty record for the final record terminator. Remove\n // exactly that terminator; interior/explicit blank rows retain their numbers.\n return text.replace(/^\\uFEFF/, \"\").replace(/(?:\\r\\n|\\r|\\n)$/, \"\");\n}\n\nexport function parseCsvText(\n text: string,\n limits: CsvImportLimits,\n): CsvImportPreview {\n if (utf8ByteLength(text) > limits.maxFileBytes)\n throw new Error(\"The file exceeds this organization’s import size limit.\");\n const parsed = parseDelimited(csvParserInput(text), {\n delimiter: \",\",\n skipEmptyLines: false,\n });\n if (\n parsed.errors.some(\n (error) =>\n error.code !== \"TooFewFields\" && error.code !== \"TooManyFields\",\n )\n )\n throw new Error(\"The CSV could not be read. Fix the file and try again.\");\n return validateParsedCsv(parsed.data, limits);\n}\n\nfunction validateParsedCsv(\n parsed: string[][],\n limits: CsvImportLimits,\n): CsvImportPreview {\n const [headers, ...data] = parsed;\n if (!headers?.length || headers.length > limits.maxColumns)\n throw new Error(\"The CSV has an unsupported number of columns.\");\n if (data.length > limits.maxRecords)\n throw new Error(\"The CSV has more records than this organization allows.\");\n const nonLoginTypeColumn = headers.findIndex((header) =>\n /^(item )?(type|kind|category)$/i.test(header.trim()),\n );\n const unsupportedValueColumns = headers\n .map((header, index) =>\n /(?:^|[\\s_-])(passkey|webauthn|fido|attachment|file)(?:$|[\\s_-])/i.test(\n header.trim(),\n )\n ? index\n : -1,\n )\n .filter((index) => index >= 0);\n let issues = 0;\n const rows = data.map((cells, index) => {\n const invalid =\n cells.length !== headers.length ||\n cells.some((cell) => utf8ByteLength(cell) > limits.maxCellBytes) ||\n cells.every((cell) => cell.trim().length === 0);\n const type =\n nonLoginTypeColumn >= 0\n ? (cells[nonLoginTypeColumn] ?? \"\").trim().toLowerCase()\n : \"\";\n const unsupported =\n !invalid &&\n (unsupportedValueColumns.some((column) =>\n Boolean(cells[column]?.trim()),\n ) ||\n (Boolean(type) &&\n !/^(login|website|web|password|credential)$/.test(type)));\n if (invalid || unsupported) issues += 1;\n return {\n rowNumber: index + 2,\n cells,\n issue: invalid\n ? (\"invalid\" as const)\n : unsupported\n ? (\"unsupported\" as const)\n : undefined,\n };\n });\n return { headers, rows, issues };\n}\n\nexport function safeDestination(raw: string): {\n metadata: string | null;\n host: string | null;\n} {\n try {\n const parsed = new URL(raw);\n if (!/^https?:$/.test(parsed.protocol))\n return { metadata: null, host: null };\n if (parsed.username || parsed.password)\n return { metadata: null, host: null };\n return { metadata: parsed.origin, host: parsed.host };\n } catch {\n return { metadata: null, host: null };\n }\n}\n\nexport function suggestedCsvMapping(\n headers: string[],\n source?: string,\n): CsvColumnRole[] {\n const aliases: Record<CsvColumnRole, ReadonlySet<string>> = {\n title: new Set([\"name\", \"title\", \"label\"]),\n username: new Set([\n \"username\",\n \"user\",\n \"login\",\n \"email\",\n \"loginusername\",\n \"loginemail\",\n ]),\n password: new Set([\"password\", \"pass\", \"pwd\", \"loginpassword\"]),\n url: new Set([\n \"url\",\n \"uri\",\n \"website\",\n \"websiteaddress\",\n \"loginurl\",\n \"loginuri\",\n ]),\n notes: new Set([\"note\", \"notes\", \"extra\"]),\n otp: new Set([\"otp\", \"totp\", \"otpauth\", \"onetimepassword\", \"onetimecode\"]),\n keep: new Set(),\n };\n let usernameAssigned = false;\n return headers.map((header) => {\n const key = header.trim().toLowerCase().replace(/[ _-]/g, \"\");\n if (source === \"nordpass\" && key === \"email\" && usernameAssigned)\n return \"keep\";\n const role =\n (Object.entries(aliases) as [CsvColumnRole, ReadonlySet<string>][]).find(\n ([, values]) => values.has(key),\n )?.[0] ?? \"keep\";\n if (role === \"username\") usernameAssigned = true;\n return role;\n });\n}\n\nfunction fieldKey(index: number, used: Set<string>): string {\n const base = `import_column_${index + 1}`;\n let key = base;\n let suffix = 2;\n while (used.has(key)) key = `${base}_${suffix++}`;\n used.add(key);\n return key;\n}\n\nfunction roleValue(\n row: CsvImportRow,\n mapping: CsvColumnRole[],\n role: CsvColumnRole,\n): string | null {\n const index = mapping.findIndex((entry) => entry === role);\n return index < 0 ? null : (row.cells[index] ?? \"\");\n}\n\nexport function hasAmbiguousCsvMapping(mapping: CsvColumnRole[]): boolean {\n return ([\"title\", \"username\", \"password\", \"notes\", \"otp\"] as const).some(\n (role) => mapping.filter((entry) => entry === role).length > 1,\n );\n}\n\nexport function isPossibleDuplicateRow(\n row: CsvImportRow,\n _preview: CsvImportPreview,\n mapping: CsvColumnRole[],\n existingItems: { displayName: string; loginUrls: string[] }[],\n): boolean {\n if (row.issue) return false;\n const title =\n roleValue(row, mapping, \"title\") || `Imported credential ${row.rowNumber}`;\n const urls = row.cells\n .filter((_, index) => mapping[index] === \"url\")\n .map(safeDestination)\n .flatMap((destination) =>\n destination.metadata ? [destination.metadata] : [],\n );\n return existingItems.some((item) => {\n if (item.displayName !== title) return false;\n const existingOrigins = item.loginUrls\n .map(safeDestination)\n .flatMap((destination) =>\n destination.metadata ? [destination.metadata] : [],\n );\n return urls.length > 0\n ? existingOrigins.some((origin) => urls.includes(origin))\n : existingOrigins.length === 0;\n });\n}\n\nexport function prepareCsvImportRow(input: {\n source: string;\n preview: CsvImportPreview;\n row: CsvImportRow;\n mapping: CsvColumnRole[];\n /** null = the person's own vault. */\n organizationId: string | null;\n rowId: string;\n limits: CsvImportLimits;\n browserFillEnabled?: boolean;\n existingItems?: { displayName: string; loginUrls: string[] }[];\n skipPossibleDuplicate?: boolean;\n}): CsvImportPreparation {\n if (input.row.issue === \"invalid\")\n return { status: \"skipped\", reason: \"invalid\" };\n if (input.row.issue === \"unsupported\")\n return { status: \"skipped\", reason: \"unsupported\" };\n if (\n input.skipPossibleDuplicate &&\n isPossibleDuplicateRow(\n input.row,\n input.preview,\n input.mapping,\n input.existingItems ?? [],\n )\n )\n return { status: \"skipped\", reason: \"possible_duplicate\" };\n const { headers } = input.preview;\n const { row, mapping } = input;\n const title =\n roleValue(row, mapping, \"title\") || `Imported credential ${row.rowNumber}`;\n const rawUrls = row.cells\n .filter((_, index) => mapping[index] === \"url\")\n .filter(Boolean);\n const urls = rawUrls\n .map(safeDestination)\n .flatMap((url) => (url.metadata ? [url.metadata] : []));\n const fields: NonNullable<VaultItemCreateRequest[\"fields\"]> = [];\n const used = new Set<string>();\n const add = (field_key: string, value: string, editable = true) => {\n if (!value) return;\n used.add(field_key);\n fields.push({\n field_key,\n value,\n handling: \"revealable\",\n editable,\n inject_into_sandbox: false,\n });\n };\n add(\"username\", roleValue(row, mapping, \"username\") ?? \"\");\n add(\"password\", roleValue(row, mapping, \"password\") ?? \"\");\n add(\"import_notes\", roleValue(row, mapping, \"notes\") ?? \"\");\n for (let index = 0; index < row.cells.length; index += 1) {\n if (mapping[index] === \"keep\")\n add(fieldKey(index, used), row.cells[index] ?? \"\");\n }\n // OTP stays only in the encrypted, revealable source representation until explicit enrollment.\n add(\n \"import_source_record\",\n JSON.stringify({\n source_vendor: input.source,\n format: \"csv\",\n cells: row.cells.map((value: string, column_index: number) => ({\n column_index,\n header: headers[column_index] ?? \"\",\n value,\n })),\n }),\n false,\n );\n if (\n fields.length > input.limits.maxFields ||\n fields.some(\n (field) =>\n utf8ByteLength(field.value) > input.limits.maxPlaintextFieldBytes,\n )\n )\n return {\n status: \"invalid\",\n diagnostic: `Row ${row.rowNumber} exceeds this organization’s encrypted field limit.`,\n };\n const command: CsvImportCommand = {\n rowId: input.rowId,\n hasOtp: Boolean(roleValue(row, mapping, \"otp\")),\n body: {\n principal: principalOf(input.organizationId),\n display_name: title,\n definition_key: \"website_login\",\n source: \"system_import\",\n login_urls: urls,\n uri_match_mode: \"never\",\n browser_fill_enabled:\n Boolean(input.browserFillEnabled) &&\n Boolean(roleValue(row, mapping, \"username\")) &&\n Boolean(roleValue(row, mapping, \"password\")) &&\n urls.length > 0 &&\n urls.every(\n (url) => new URL(url).protocol === \"https:\" || isLoopbackUrl(url),\n ),\n fields,\n },\n };\n // The browser matcher treats `never` as an absolute refusal. Keep this pair\n // coherent with the explicit, eligible bulk opt-in rather than advertising a\n // fill capability the canonical matcher will always reject.\n if (command.body.browser_fill_enabled) command.body.uri_match_mode = \"host\";\n if (\n utf8ByteLength(JSON.stringify(command.body)) >\n input.limits.maxRequestBodyBytes\n )\n return {\n status: \"invalid\",\n diagnostic: `Row ${row.rowNumber} exceeds this organization’s request size limit.`,\n };\n return { status: \"ready\", command };\n}\n\n/** Compatibility helper for callers that only need a command after preparation. */\nexport function toCsvImportCommand(\n input: Parameters<typeof prepareCsvImportRow>[0],\n): CsvImportCommand | null {\n const prepared = prepareCsvImportRow(input);\n return prepared.status === \"ready\" ? prepared.command : null;\n}\n\n/** Dispatch only one immutable command at a time; cancellation never rolls back a committed row. */\nexport async function runCsvImportCommands(\n commands: Array<CsvImportCommand | null>,\n dispatch: (command: CsvImportCommand) => Promise<CsvImportDispatch>,\n cancelled: () => boolean,\n progressCursor = 0,\n): Promise<CsvImportOutcome> {\n let imported = 0;\n let skipped = 0;\n let failed = 0;\n for (let index = progressCursor; index < commands.length; index += 1) {\n const command = commands[index];\n if (cancelled())\n return {\n imported,\n skipped,\n failed,\n cancelled: true,\n definitive: false,\n progressCursor: index,\n };\n if (!command) {\n skipped += 1;\n continue;\n }\n const result = await dispatch(command);\n if (result === \"committed\") {\n imported += 1;\n continue;\n }\n failed += 1;\n // A retryable or definitive outcome retains this exact command/UUID for review.\n return {\n imported,\n skipped,\n failed,\n cancelled: result === \"definitive\" || cancelled(),\n definitive: result === \"definitive\",\n progressCursor: index,\n };\n }\n return {\n imported,\n skipped,\n failed,\n cancelled: cancelled(),\n definitive: false,\n progressCursor: commands.length,\n };\n}\n","/** Bitwarden's plain JSON export adapter. Parsing is only invoked by its worker. */\nimport { LosslessNumber, stringify } from \"lossless-json\";\nimport { parseStrictJson } from \"./strict-json\";\n\nimport { safeDestination, type CsvImportLimits } from \"./csv-import\";\nimport type { StructuredImportRecord } from \"./structured-import\";\nimport { isRfc4122Uuid } from \"@ai-matrx/kit/uuid\";\n\ntype JsonObject = Record<string, unknown>;\nconst rootKeys = new Set([\"encrypted\", \"folders\", \"items\"]);\nconst folderKeys = new Set([\"id\", \"name\"]);\nconst itemKeys = new Set([\"id\", \"name\", \"type\", \"folderId\", \"organizationId\", \"collectionIds\", \"notes\", \"login\", \"secureNote\", \"card\", \"identity\", \"sshKey\", \"favorite\", \"reprompt\", \"fields\", \"passwordHistory\", \"revisionDate\", \"creationDate\", \"deletedDate\", \"attachments\"]);\nconst loginKeys = new Set([\"username\", \"password\", \"totp\", \"uris\", \"fido2Credentials\"]);\nconst uriKeys = new Set([\"uri\", \"match\"]);\nconst sshKeys = new Set([\"privateKey\", \"publicKey\", \"keyFingerprint\"]);\nconst fieldKeys = new Set([\"name\", \"value\", \"type\", \"linkedId\"]);\nconst noteKeys = new Set([\"type\"]);\nconst cardKeys = new Set([\"cardholderName\", \"expMonth\", \"expYear\", \"code\", \"brand\", \"number\"]);\nconst identityKeys = new Set([\"title\", \"firstName\", \"middleName\", \"lastName\", \"address1\", \"address2\", \"address3\", \"city\", \"state\", \"postalCode\", \"country\", \"company\", \"email\", \"phone\", \"ssn\", \"username\", \"passportNumber\", \"licenseNumber\"]);\n\nfunction object(value: unknown): JsonObject | null {\n return value !== null && typeof value === \"object\" && !Array.isArray(value) ? value as JsonObject : null;\n}\nfunction bytes(value: string): number {\n return typeof TextEncoder !== \"undefined\" ? new TextEncoder().encode(value).byteLength : unescape(encodeURIComponent(value)).length;\n}\nfunction only(value: JsonObject, allowed: Set<string>): boolean { return Object.keys(value).every((key) => allowed.has(key)); }\nfunction stringOrNull(value: unknown): value is string | null { return value === null || typeof value === \"string\"; }\nfunction exactInt(value: unknown, min: number, max: number): boolean {\n const text = value instanceof LosslessNumber ? value.value : \"\";\n return /^(0|[1-9][0-9]*)$/.test(text) && Number(text) >= min && Number(text) <= max;\n}\nfunction timestamp(value: unknown): boolean { return typeof value === \"string\" && /^\\d{4}-\\d\\d-\\d\\dT\\d\\d:\\d\\d:\\d\\d(?:\\.\\d+)?(?:Z|[+-]\\d\\d:\\d\\d)$/.test(value); }\nexport function jsonDepthOk(value: unknown, maxDepth: number): boolean {\n const stack: Array<[unknown, number]> = [[value, 1]];\n while (stack.length) {\n const [node, depth] = stack.pop()!;\n if (depth > maxDepth) return false;\n const record = object(node);\n const children: unknown[] = Array.isArray(node)\n ? node\n : record\n ? Object.values(record)\n : [];\n for (const child of children) stack.push([child, depth + 1]);\n }\n return true;\n}\nfunction allStringsWithin(value: unknown, maxBytes: number): boolean {\n if (typeof value === \"string\") return bytes(value) <= maxBytes;\n if (Array.isArray(value)) return value.every((entry) => allStringsWithin(entry, maxBytes));\n const record = object(value);\n return !record || Object.values(record).every((entry) => allStringsWithin(entry, maxBytes));\n}\nfunction invalid(title: string, ordinal: number, reason: string): StructuredImportRecord { return { ordinal, title, status: \"invalid\", reason }; }\nfunction unsupported(title: string, ordinal: number, reason: string): StructuredImportRecord { return { ordinal, title, status: \"unsupported\", reason }; }\n\nfunction itemRecord(item: JsonObject, ordinal: number, maxCellBytes: number, maxJsonDepth: number, folders: JsonObject[]): StructuredImportRecord {\n const candidateTitle = typeof item.name === \"string\" ? item.name : `Item ${ordinal + 1}`;\n const title = bytes(candidateTitle) <= maxCellBytes ? candidateTitle : `Item ${ordinal + 1}`;\n if (!only(item, itemKeys)) return unsupported(title, ordinal, \"The item has an unsupported field.\");\n if (!isRfc4122Uuid(item.id) || typeof item.name !== \"string\" || !exactInt(item.type, 1, 5)) return exactInt(item.type, 0, Number.MAX_SAFE_INTEGER) ? unsupported(title, ordinal, \"The item type is unsupported.\") : invalid(title, ordinal, \"The item shape is not supported.\");\n if (![\"folderId\", \"organizationId\", \"notes\"].every((key) => item[key] === undefined || stringOrNull(item[key])) || [\"revisionDate\", \"creationDate\", \"deletedDate\"].some((key) => item[key] !== undefined && item[key] !== null && !timestamp(item[key])) || (item.folderId != null && !isRfc4122Uuid(item.folderId)) || (item.organizationId != null && !isRfc4122Uuid(item.organizationId)) || (item.collectionIds != null && (!Array.isArray(item.collectionIds) || !item.collectionIds.every(isRfc4122Uuid))) || (item.favorite != null && typeof item.favorite !== \"boolean\") || (item.reprompt != null && !exactInt(item.reprompt, 0, 1))) return invalid(title, ordinal, \"The item metadata is invalid.\");\n if (item.fields != null && (!Array.isArray(item.fields) || !item.fields.every((field) => { const row = object(field); return !!row && only(row, fieldKeys) && exactInt(row.type, 0, 3) && (row.name === undefined || stringOrNull(row.name)) && (row.value === undefined || stringOrNull(row.value)) && (row.linkedId === undefined || row.linkedId === null || exactInt(row.linkedId, 0, 4294967295)); }))) return invalid(title, ordinal, \"The custom fields are invalid.\");\n if (item.passwordHistory != null && (!Array.isArray(item.passwordHistory) || !item.passwordHistory.every((entry) => { const row = object(entry); return !!row && Object.keys(row).length === 2 && typeof row.password === \"string\" && timestamp(row.lastUsedDate); }))) return invalid(title, ordinal, \"The password history is invalid.\");\n if (item.attachments !== undefined && item.attachments !== null && !Array.isArray(item.attachments)) return invalid(title, ordinal, \"The attachment fields are invalid.\");\n if (!jsonDepthOk(item, maxJsonDepth) || !allStringsWithin(item, maxCellBytes)) return invalid(title, ordinal, \"The item exceeds the import limits.\");\n const type = Number((item.type as LosslessNumber).value);\n const matching = type === 1 ? \"login\" : type === 2 ? \"secureNote\" : type === 3 ? \"card\" : type === 4 ? \"identity\" : \"sshKey\";\n for (const component of [\"login\", \"secureNote\", \"card\", \"identity\", \"sshKey\"] as const) if (component !== matching && item[component] != null) return unsupported(title, ordinal, \"The item has an unclassified component.\");\n if (Array.isArray(item.attachments) && item.attachments.length) return unsupported(title, ordinal, \"Attachments require a later import path.\");\n const sourceRecord = (stringify({ source_vendor: \"bitwarden\", format: \"bitwarden-json-export-v1\", item, folders: typeof item.folderId === \"string\" ? folders.filter((folder) => folder.id === item.folderId) : [] }) ?? \"\");\n if (type === 1) {\n const login = object(item.login); if (!login) return invalid(title, ordinal, \"The login fields are invalid.\"); if (!only(login, loginKeys)) return unsupported(title, ordinal, \"The login has an unsupported field.\"); if (![\"username\", \"password\", \"totp\"].every((key) => login[key] === undefined || stringOrNull(login[key])) || (login.uris !== undefined && !Array.isArray(login.uris)) || (login.fido2Credentials !== undefined && !Array.isArray(login.fido2Credentials))) return invalid(title, ordinal, \"The login fields are invalid.\");\n if (Array.isArray(login.fido2Credentials) && login.fido2Credentials.length) return unsupported(title, ordinal, \"Passkeys require a later import path.\");\n const rawUrls: string[] = [];\n for (const uri of login.uris ?? []) { const row = object(uri); if (!row || !only(row, uriKeys)) return unsupported(title, ordinal, \"The login has an unsupported URL field.\"); if ((row.uri !== undefined && !stringOrNull(row.uri)) || (row.match !== undefined && row.match !== null && !exactInt(row.match, 0, 5))) return invalid(title, ordinal, \"The login URL fields are invalid.\"); if (typeof row.uri === \"string\") rawUrls.push(row.uri); }\n return { ordinal, title, kind: \"website_login\", status: \"supported\", sourceState: item.deletedDate ? \"deleted\" : \"active\", sourceRecord, urls: rawUrls.map(safeDestination).flatMap((x) => x.metadata ? [x.metadata] : []), username: typeof login.username === \"string\" ? login.username : null, password: typeof login.password === \"string\" ? login.password : null, hasOtp: typeof login.totp === \"string\" && login.totp.length > 0 };\n }\n if (type === 5) { const key = object(item.sshKey); if (!key || !only(key, sshKeys) || typeof key.privateKey !== \"string\" || !key.privateKey || typeof key.publicKey !== \"string\" || typeof key.keyFingerprint !== \"string\") return invalid(title, ordinal, \"The SSH key fields are invalid.\"); return { ordinal, title, kind: \"ssh_key\", status: \"supported\", sourceState: item.deletedDate ? \"deleted\" : \"active\", sourceRecord, hasOtp: false, privateKey: key.privateKey, publicKey: key.publicKey }; }\n const component = object(item[matching]); const allowed = type === 2 ? noteKeys : type === 3 ? cardKeys : identityKeys;\n if (!component) return invalid(title, ordinal, \"The item fields are invalid.\"); if (!only(component, allowed)) return unsupported(title, ordinal, \"The item has an unsupported field.\");\n if (type === 2 && !exactInt(component.type, 0, 0)) return invalid(title, ordinal, \"The secure note type is invalid.\");\n if (Object.entries(component).some(([key, value]) => key !== \"type\" && !stringOrNull(value))) return invalid(title, ordinal, \"The item fields are invalid.\");\n return { ordinal, title, kind: \"custom\", status: \"supported\", sourceState: item.deletedDate ? \"deleted\" : \"active\", sourceRecord, hasOtp: false };\n}\n\nexport function parseBitwardenExport(text: string, limits: Pick<CsvImportLimits, \"maxFileBytes\" | \"maxRecords\" | \"maxCellBytes\"> & { maxJsonDepth: number }): StructuredImportRecord[] {\n if (bytes(text) > limits.maxFileBytes) throw new Error(\"The file exceeds this organization’s import size limit.\");\n // Our pinned lossless-json patch rejects every duplicate key, including equal values; keep its details out of UI.\n let root: JsonObject; try { root = object(parseStrictJson(text)) ?? {}; } catch { throw new Error(\"The JSON export has duplicate keys or could not be read safely.\"); }\n if (!jsonDepthOk(root, limits.maxJsonDepth) || !only(root, rootKeys) || root.encrypted !== false || !Array.isArray(root.folders) || !Array.isArray(root.items)) throw new Error(root.encrypted === true ? \"Encrypted Bitwarden exports need local decryption support before they can be imported.\" : \"This is not a supported plain Bitwarden JSON export.\");\n if (root.items.length > limits.maxRecords) throw new Error(\"The export has more records than this organization allows.\");\n if (!root.folders.every((folder) => { const row = object(folder); return !!row && only(row, folderKeys) && isRfc4122Uuid(row.id) && typeof row.name === \"string\" && allStringsWithin(row, limits.maxCellBytes); })) throw new Error(\"The export folders are not supported.\");\n return root.items.map((item, ordinal) => object(item) ? itemRecord(item, ordinal, limits.maxCellBytes, limits.maxJsonDepth, root.folders as JsonObject[]) : invalid(`Item ${ordinal + 1}`, ordinal, \"The item is invalid.\"));\n}\n","import { LosslessNumber, stringify } from \"lossless-json\";\nimport { parseStrictJson } from \"./strict-json\";\n\nimport { safeDestination, type CsvImportLimits } from \"./csv-import\";\nimport { jsonDepthOk } from \"./bitwarden-json\";\nimport type { StructuredImportRecord } from \"./structured-import\";\n\ntype ObjectValue = Record<string, unknown>;\nconst object = (value: unknown): ObjectValue | null => value !== null && typeof value === \"object\" && !Array.isArray(value) ? value as ObjectValue : null;\nconst only = (value: ObjectValue, keys: readonly string[]) => Object.keys(value).every((key) => keys.includes(key));\nconst bytes = (value: string) => typeof TextEncoder !== \"undefined\" ? new TextEncoder().encode(value).byteLength : unescape(encodeURIComponent(value)).length;\nfunction numericLexeme(value: unknown): { negative: boolean; integral: boolean; isThree: boolean } | null {\n if (!(value instanceof LosslessNumber)) return null;\n const match = value.value.match(/^(-?)(\\d+)(?:\\.(\\d*))?(?:[eE]([+-]?\\d+))?$/); if (!match) return null;\n const negative = match[1] === \"-\" && !/^0*(?:\\.0*)?$/.test(value.value.slice(1).replace(/[eE].*$/, \"\"));\n const digits = `${match[2]}${match[3] ?? \"\"}`.replace(/^0+/, \"\") || \"0\"; const exponent = BigInt(match[4] ?? \"0\") - BigInt((match[3] ?? \"\").length);\n const zero = BigInt(0); const trailing = BigInt(digits.match(/0*$/)?.[0].length ?? 0);\n const integral = digits === \"0\" || exponent >= zero || -exponent <= trailing;\n const normalized = digits.replace(/0+$/, \"\") || \"0\";\n return { negative, integral, isThree: !negative && normalized === \"3\" && exponent + trailing === zero };\n}\nconst integer = (value: unknown) => { const parsed = numericLexeme(value); return !!parsed && !parsed.negative && parsed.integral; };\nconst nonnegativeNumber = (value: unknown) => { const parsed = numericLexeme(value); return !!parsed && !parsed.negative; };\nconst strings = (value: unknown): value is string[] => Array.isArray(value) && value.every((entry) => typeof entry === \"string\");\nconst textBytes = (value: string) => typeof TextEncoder === \"undefined\" ? unescape(encodeURIComponent(value)).length : new TextEncoder().encode(value).byteLength;\nfunction stringsWithin(value: unknown, max: number): boolean { if (typeof value === \"string\") return textBytes(value) <= max; if (Array.isArray(value)) return value.every((entry) => stringsWithin(entry, max)); const row = object(value); return !row || Object.values(row).every((entry) => stringsWithin(entry, max)); }\nconst rejected = (status: \"invalid\" | \"unsupported\", ordinal: number, title: string, reason: string): StructuredImportRecord => ({ status, ordinal, title, reason });\nfunction sectionsValid(value: unknown): \"valid\" | \"invalid\" | \"unsupported\" {\n if (value === undefined || value === null) return \"valid\";\n if (!Array.isArray(value)) return \"invalid\";\n for (const entry of value) {\n const section = object(entry);\n if (!section || !only(section, [\"title\", \"name\", \"fields\", \"hideAddAnotherField\"]) || typeof section.title !== \"string\" || (section.name !== undefined && section.name !== null && typeof section.name !== \"string\") || (section.hideAddAnotherField !== undefined && typeof section.hideAddAnotherField !== \"boolean\") || !Array.isArray(section.fields)) return \"invalid\";\n for (const fieldEntry of section.fields) {\n const field = object(fieldEntry); const traits = object(field?.inputTraits); const valueObject = object(field?.value);\n if (!field || !only(field, [\"title\", \"id\", \"value\", \"guarded\", \"multiline\", \"dontGenerate\", \"inputTraits\", \"placeholder\", \"clipboardFilter\", \"indexAtSource\"]) || typeof field.title !== \"string\" || typeof field.id !== \"string\" || typeof field.guarded !== \"boolean\" || typeof field.multiline !== \"boolean\" || typeof field.dontGenerate !== \"boolean\" || !traits || !only(traits, [\"keyboard\", \"correction\", \"capitalization\"]) || ![\"keyboard\", \"correction\", \"capitalization\"].every((key) => typeof traits[key] === \"string\") || (field.placeholder !== undefined && typeof field.placeholder !== \"string\") || (field.clipboardFilter !== undefined && field.clipboardFilter !== null && typeof field.clipboardFilter !== \"string\") || (field.indexAtSource !== undefined && !integer(field.indexAtSource)) || !valueObject) return \"invalid\";\n const keys = Object.keys(valueObject); if (keys.length !== 1) return \"invalid\";\n const key = keys[0]!; const fieldValue = valueObject[key];\n if ([\"string\", \"concealed\", \"totp\", \"url\", \"phone\", \"menu\", \"reference\"].includes(key)) { if (typeof fieldValue !== \"string\") return \"invalid\"; continue; }\n if (key === \"email\") { const email = object(fieldValue); if (!email || !only(email, [\"email_address\", \"provider\"]) || typeof email.email_address !== \"string\" || (email.provider !== null && typeof email.provider !== \"string\")) return \"invalid\"; continue; }\n return \"unsupported\";\n }\n }\n return \"valid\";\n}\n\nfunction loginRecord(item: ObjectValue, ordinal: number, attrs: ObjectValue, account: ObjectValue, vault: ObjectValue, maxCellBytes: number): StructuredImportRecord {\n const overview = object(item.overview);\n const details = object(item.details);\n const rawTitle = typeof overview?.title === \"string\" ? overview.title : `Item ${ordinal + 1}`;\n const title = textBytes(rawTitle) <= maxCellBytes ? rawTitle : `Item ${ordinal + 1}`;\n if (!overview || !details || !only(item, [\"uuid\", \"favIndex\", \"createdAt\", \"updatedAt\", \"state\", \"categoryUuid\", \"overview\", \"details\"])) return rejected(\"unsupported\", ordinal, title, \"The 1Password item has an unsupported field.\");\n if (!stringsWithin(item, maxCellBytes)) return rejected(\"invalid\", ordinal, `Item ${ordinal + 1}`, \"The 1Password item exceeds the import limits.\");\n if (typeof item.uuid !== \"string\" || !item.uuid || !integer(item.favIndex) || !integer(item.createdAt) || !integer(item.updatedAt) || (item.state !== \"active\" && item.state !== \"archived\") || typeof item.categoryUuid !== \"string\") return rejected(\"invalid\", ordinal, title, \"The 1Password item shape is invalid.\");\n if (item.categoryUuid !== \"001\") return rejected(\"unsupported\", ordinal, title, \"Only 1Password login items are supported.\");\n if (!only(overview, [\"title\", \"subtitle\", \"url\", \"urls\", \"tags\", \"ps\", \"pbe\", \"pgrng\", \"icons\", \"watchtowerExclusions\"]) || typeof overview.title !== \"string\" || typeof overview.subtitle !== \"string\" || typeof overview.url !== \"string\" || [overview.tags, overview.urls].some((value) => value !== undefined && value !== null && !Array.isArray(value)) || [overview.ps, overview.pbe].some((value) => value !== undefined && value !== null && !nonnegativeNumber(value)) || (overview.pgrng !== undefined && overview.pgrng !== null && typeof overview.pgrng !== \"boolean\") || [overview.icons, overview.watchtowerExclusions].some((value) => value !== undefined && value !== null && typeof value !== \"string\") || (Array.isArray(overview.tags) && !strings(overview.tags))) return rejected(\"invalid\", ordinal, title, \"The 1Password overview is invalid.\");\n if (overview.urls !== undefined && overview.urls !== null && (!Array.isArray(overview.urls) || !overview.urls.every((entry) => { const row = object(entry); return !!row && Object.keys(row).length === 2 && typeof row.label === \"string\" && typeof row.url === \"string\"; }))) return rejected(\"invalid\", ordinal, title, \"The 1Password URL list is invalid.\");\n if (!only(details, [\"loginFields\", \"notesPlain\", \"sections\", \"passwordHistory\", \"documentAttributes\", \"password\"]) || (details.documentAttributes != null || details.password != null)) return rejected(\"unsupported\", ordinal, title, \"This 1Password item requires a later import path.\");\n const sectionState = sectionsValid(details.sections);\n if (sectionState !== \"valid\") return rejected(sectionState, ordinal, title, sectionState === \"unsupported\" ? \"The 1Password item has an unsupported field value.\" : \"The 1Password sections are invalid.\");\n if ((details.notesPlain !== undefined && details.notesPlain !== null && typeof details.notesPlain !== \"string\") || (details.passwordHistory !== undefined && details.passwordHistory !== null && (!Array.isArray(details.passwordHistory) || !details.passwordHistory.every((entry) => { const row = object(entry); return !!row && only(row, [\"value\", \"time\"]) && typeof row.value === \"string\" && integer(row.time); })))) return rejected(\"invalid\", ordinal, title, \"The 1Password details are invalid.\");\n if (details.loginFields !== undefined && details.loginFields !== null && !Array.isArray(details.loginFields)) return rejected(\"invalid\", ordinal, title, \"The 1Password login fields are invalid.\");\n let username: string | null = null;\n let password: string | null = null;\n let hasOtp = false;\n for (const entry of details.loginFields ?? []) {\n const field = object(entry);\n if (!field || !only(field, [\"id\", \"name\", \"value\", \"fieldType\", \"designation\"]) || typeof field.id !== \"string\" || typeof field.name !== \"string\" || typeof field.value !== \"string\" || typeof field.fieldType !== \"string\" || (field.designation !== undefined && field.designation !== null && field.designation !== \"username\" && field.designation !== \"password\")) return rejected(\"invalid\", ordinal, title, \"The 1Password login fields are invalid.\");\n if (![\"T\", \"E\", \"U\", \"N\", \"P\", \"A\", \"TEL\", \"C\"].includes(field.fieldType)) return rejected(\"unsupported\", ordinal, title, \"The 1Password login field type is unsupported.\");\n if (field.designation === \"username\") { if (username !== null) return rejected(\"invalid\", ordinal, title, \"The 1Password login has duplicate username fields.\"); username = field.value; }\n if (field.designation === \"password\") { if (password !== null) return rejected(\"invalid\", ordinal, title, \"The 1Password login has duplicate password fields.\"); password = field.value; }\n }\n if (Array.isArray(details.sections)) for (const section of details.sections) { const fields = object(section)?.fields; if (Array.isArray(fields) && fields.some((field) => { const value = object(object(field)?.value); return typeof value?.totp === \"string\" && value.totp.length > 0; })) hasOtp = true; }\n const rawUrls = [overview.url, ...(Array.isArray(overview.urls) ? overview.urls.map((entry) => (entry as ObjectValue).url).filter((url): url is string => typeof url === \"string\") : [])];\n const urls = [...new Set(rawUrls.map(safeDestination).flatMap((url) => url.metadata ? [url.metadata] : []))];\n return { status: \"supported\", ordinal, title, sourceState: item.state === \"archived\" ? \"archived\" : \"active\", sourceRecord: (stringify({ source_vendor: \"1password\", format: \"1pux-v3\", export_attributes: attrs, account_attributes: account, vault_attributes: vault, item }) ?? \"\"), hasOtp, kind: \"website_login\", urls, username, password };\n}\n\nfunction attributes(value: ObjectValue, account: boolean): boolean {\n const keys = account ? [\"accountName\", \"name\", \"avatar\", \"email\", \"uuid\", \"domain\"] : [\"uuid\", \"desc\", \"avatar\", \"name\", \"type\"];\n const idKey = \"uuid\";\n return only(value, keys) && keys.every((key) => typeof value[key] === \"string\") && typeof value[idKey] === \"string\" && (value[idKey] as string).length > 0 && (!account ? [\"P\", \"E\", \"U\"].includes(value.type as string) : true);\n}\n\nexport function parseOnePuxData(exportAttributesText: string, exportDataText: string, limits: Pick<CsvImportLimits, \"maxFileBytes\" | \"maxRecords\" | \"maxCellBytes\" | \"maxJsonDepth\"> & { maxJsonDepth: number }): StructuredImportRecord[] {\n const maxCellBytes = limits.maxCellBytes;\n if (bytes(exportAttributesText) + bytes(exportDataText) > limits.maxFileBytes) throw new Error(\"The 1Password export exceeds this organization’s import size limit.\");\n let exportAttributes: ObjectValue;\n try { exportAttributes = object(parseStrictJson(exportAttributesText)) ?? {}; } catch { throw new Error(\"The 1Password export attributes could not be read safely.\"); }\n if (!jsonDepthOk(exportAttributes, limits.maxJsonDepth)) throw new Error(\"The 1Password export attributes exceed the nesting limit.\");\n if (!only(exportAttributes, [\"version\", \"description\", \"createdAt\"]) || !numericLexeme(exportAttributes.version)?.isThree || exportAttributes.description !== \"1Password Unencrypted Export\" || !integer(exportAttributes.createdAt)) throw new Error(\"This is not a supported unencrypted 1Password v3 export.\");\n let root: ObjectValue;\n try { root = object(parseStrictJson(exportDataText)) ?? {}; } catch { throw new Error(\"The 1Password export could not be read safely.\"); }\n if (!jsonDepthOk(root, limits.maxJsonDepth)) throw new Error(\"The 1Password export exceeds the nesting limit.\");\n if (!stringsWithin(exportAttributes, maxCellBytes)) throw new Error(\"The 1Password export exceeds this organization’s field limit.\");\n if (!only(root, [\"accounts\"]) || !Array.isArray(root.accounts)) throw new Error(\"This is not a supported 1Password 1PUX export.\");\n const records: StructuredImportRecord[] = [];\n const accountIds = new Set<string>();\n for (const accountRow of root.accounts) {\n const account = object(accountRow); const attrs = object(account?.attrs);\n if (!account || !attrs || !stringsWithin(attrs, maxCellBytes) || !attributes(attrs, true) || !only(account, [\"attrs\", \"vaults\"]) || !Array.isArray(account.vaults) || accountIds.has(attrs.uuid as string)) throw new Error(\"The 1Password account structure is invalid.\");\n accountIds.add(attrs.uuid as string); const vaultIds = new Set<string>();\n for (const vaultRow of account.vaults) {\n const vault = object(vaultRow); const vaultAttrs = object(vault?.attrs);\n if (!vault || !vaultAttrs || !stringsWithin(vaultAttrs, maxCellBytes) || !attributes(vaultAttrs, false) || !only(vault, [\"attrs\", \"items\"]) || !Array.isArray(vault.items) || vaultIds.has(vaultAttrs.uuid as string)) throw new Error(\"The 1Password vault structure is invalid.\");\n vaultIds.add(vaultAttrs.uuid as string); const itemIds = new Set<string>();\n for (const item of vault.items) { if (records.length >= limits.maxRecords) throw new Error(\"The export has more records than this organization allows.\"); const row = object(item); if (row && typeof row.uuid === \"string\" && itemIds.has(row.uuid)) throw new Error(\"The 1Password vault has duplicate item IDs.\"); if (row && typeof row.uuid === \"string\") itemIds.add(row.uuid); records.push(row ? loginRecord(row, records.length, exportAttributes, attrs, vaultAttrs, maxCellBytes) : rejected(\"invalid\", records.length, `Item ${records.length + 1}`, \"The 1Password item is invalid.\")); }\n }\n }\n return records;\n}\n","/*\n Copyright (c) 2025 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 { setDefaultConfiguration } from \"./core/configuration.js\";\nimport { configureWebWorker } from \"./core/web-worker-inline-wasm.js\";\n\nconfigureWebWorker(setDefaultConfiguration);\n\nexport * from \"./zip-fs-core-wasm.js\";\nexport { getMimeType } from \"./core/util/mime-type.js\";","const t=new Uint8Array(288);t.fill(8,0,144),t.fill(9,144,256),t.fill(7,256,280),t.fill(8,280,288),new Uint8Array(30).fill(5);const n=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\",e=t=>t({workerURI:t=>{const e=\"text/javascript\";let r='!function(t){\"function\"==typeof define&&define.amd?define(t):t()}(function(){\"use strict\";const{Array:t,Object:n,Number:e,Math:o,Error:r,Uint8Array:c,Uint16Array:s,Uint32Array:a,Int32Array:i,Map:f,DataView:u,Promise:w,TextEncoder:l,crypto:d,postMessage:p,TransformStream:h,ReadableStream:y,WritableStream:m,CompressionStream:S,DecompressionStream:g}=self,v=void 0,b=\"undefined\",k=\"function\",z=new c,C=[[],[],[],[],[],[],[],[]];for(let t=0;t<256;t++){let n=t;for(let t=0;t<8;t++)n=1&n?n>>>1^3988292384:n>>>1;C[0][t]=n}for(let t=0;t<256;t++)for(let n=1;n<8;n++){const e=C[n-1][t];C[n][t]=e>>>8^C[0][255&e]}const[I,M,A,E,R,x,P,D]=C;class F{constructor(t){this.o=t||-1}append(t){let n=0|this.o;const e=0|t.length;let o=0;if(e>=8&&t.buffer){const r=new u(t.buffer,t.byteOffset,e),c=e-8;for(;o<=c;o+=8){const t=n^r.getInt32(o,!0),e=r.getInt32(o+4,!0);n=D[255&t]^P[t>>>8&255]^x[t>>>16&255]^R[t>>>24&255]^E[255&e]^A[e>>>8&255]^M[e>>>16&255]^I[e>>>24&255]}}for(;o<e;o++)n=n>>>8^I[255&(n^t[o])];this.o=n}get(){return~this.o}}class U extends h{constructor(){let t;const n=new F;super({transform(t,e){n.append(t),e.enqueue(t)},flush(){const e=new c(4);new u(e.buffer).setUint32(0,n.get()),t.value=e}}),t=this}}function B(t,n){const e=new c(t.length+n.length);return e.set(t),e.set(n,t.length),e}function W(t){return new u(t.buffer,t.byteOffset,t.byteLength)}const O=64,V=20,K=new c([128]),T=new c(1),_=new i([1732584193,4023233417,2562383102,271733878,3285377520]),j=new c(256),H=new i(256),L=new i(256),Z=new i(256),N=new i(256);let q=!1;function G(t,n){!function(){if(!q){let t=1,n=1;do{t=255&(t^t<<1^(128&t?27:0)),n=255&(n^n<<1),n=255&(n^n<<2),n=255&(n^n<<4),128&n&&(n^=9),j[t]=255&(n^(n<<1|n>>7)^(n<<2|n>>6)^(n<<3|n>>5)^(n<<4|n>>4)^99)}while(1!=t);j[0]=99;for(let t=0;t<256;t++){const n=j[t],e=Y(n),o=e<<24|n<<16|n<<8|e^n;H[t]=o,L[t]=o>>>8|o<<24,Z[t]=o>>>16|o<<16,N[t]=o>>>24|o<<8}q=!0}}();const e=new i(60),o=function(t,n){const e=t.length>>2,o=e+6,r=4*(o+1);let c=1;for(let o=0;o<e;o++)n[o]=t[4*o]<<24|t[4*o+1]<<16|t[4*o+2]<<8|t[4*o+3];for(let t=e;t<r;t++){let o=n[t-1];t%e==0?(o=Q(o<<8|o>>>24)^c<<24,c=Y(c)):e>6&&t%e==4&&(o=Q(o)),n[t]=n[t-e]^o}return o}(t,e),r=new i(4),c=J(n);let s=0,a=0,f=0,w=0;return{process(t,n){n&&c.update(t,0,t.length),function(t){const n=new u(t.buffer,t.byteOffset,t.byteLength),e=t.length;let o=0;for(;o+16<=e;o+=16)l(),n.setInt32(o,n.getInt32(o)^r[0]),n.setInt32(o+4,n.getInt32(o+4)^r[1]),n.setInt32(o+8,n.getInt32(o+8)^r[2]),n.setInt32(o+12,n.getInt32(o+12)^r[3]);if(o<e){l();for(let n=0;o<e;o++,n++)t[o]^=r[n>>2]>>>24-8*(3&n)}}(t),n||c.update(t,0,t.length)},digest:()=>c.digest()};function l(){s=s+1|0,s||(a=a+1|0,a||(f=f+1|0,f||(w=w+1|0)));let t=X(s)^e[0],n=X(a)^e[1],c=X(f)^e[2],i=X(w)^e[3],u=H[t>>>24]^L[n>>>16&255]^Z[c>>>8&255]^N[255&i]^e[4],l=H[n>>>24]^L[c>>>16&255]^Z[i>>>8&255]^N[255&t]^e[5],d=H[c>>>24]^L[i>>>16&255]^Z[t>>>8&255]^N[255&n]^e[6],p=H[i>>>24]^L[t>>>16&255]^Z[n>>>8&255]^N[255&c]^e[7];t=H[u>>>24]^L[l>>>16&255]^Z[d>>>8&255]^N[255&p]^e[8],n=H[l>>>24]^L[d>>>16&255]^Z[p>>>8&255]^N[255&u]^e[9],c=H[d>>>24]^L[p>>>16&255]^Z[u>>>8&255]^N[255&l]^e[10],i=H[p>>>24]^L[u>>>16&255]^Z[l>>>8&255]^N[255&d]^e[11],u=H[t>>>24]^L[n>>>16&255]^Z[c>>>8&255]^N[255&i]^e[12],l=H[n>>>24]^L[c>>>16&255]^Z[i>>>8&255]^N[255&t]^e[13],d=H[c>>>24]^L[i>>>16&255]^Z[t>>>8&255]^N[255&n]^e[14],p=H[i>>>24]^L[t>>>16&255]^Z[n>>>8&255]^N[255&c]^e[15],t=H[u>>>24]^L[l>>>16&255]^Z[d>>>8&255]^N[255&p]^e[16],n=H[l>>>24]^L[d>>>16&255]^Z[p>>>8&255]^N[255&u]^e[17],c=H[d>>>24]^L[p>>>16&255]^Z[u>>>8&255]^N[255&l]^e[18],i=H[p>>>24]^L[u>>>16&255]^Z[l>>>8&255]^N[255&d]^e[19],u=H[t>>>24]^L[n>>>16&255]^Z[c>>>8&255]^N[255&i]^e[20],l=H[n>>>24]^L[c>>>16&255]^Z[i>>>8&255]^N[255&t]^e[21],d=H[c>>>24]^L[i>>>16&255]^Z[t>>>8&255]^N[255&n]^e[22],p=H[i>>>24]^L[t>>>16&255]^Z[n>>>8&255]^N[255&c]^e[23],t=H[u>>>24]^L[l>>>16&255]^Z[d>>>8&255]^N[255&p]^e[24],n=H[l>>>24]^L[d>>>16&255]^Z[p>>>8&255]^N[255&u]^e[25],c=H[d>>>24]^L[p>>>16&255]^Z[u>>>8&255]^N[255&l]^e[26],i=H[p>>>24]^L[u>>>16&255]^Z[l>>>8&255]^N[255&d]^e[27],u=H[t>>>24]^L[n>>>16&255]^Z[c>>>8&255]^N[255&i]^e[28],l=H[n>>>24]^L[c>>>16&255]^Z[i>>>8&255]^N[255&t]^e[29],d=H[c>>>24]^L[i>>>16&255]^Z[t>>>8&255]^N[255&n]^e[30],p=H[i>>>24]^L[t>>>16&255]^Z[n>>>8&255]^N[255&c]^e[31],t=H[u>>>24]^L[l>>>16&255]^Z[d>>>8&255]^N[255&p]^e[32],n=H[l>>>24]^L[d>>>16&255]^Z[p>>>8&255]^N[255&u]^e[33],c=H[d>>>24]^L[p>>>16&255]^Z[u>>>8&255]^N[255&l]^e[34],i=H[p>>>24]^L[u>>>16&255]^Z[l>>>8&255]^N[255&d]^e[35],u=H[t>>>24]^L[n>>>16&255]^Z[c>>>8&255]^N[255&i]^e[36],l=H[n>>>24]^L[c>>>16&255]^Z[i>>>8&255]^N[255&t]^e[37],d=H[c>>>24]^L[i>>>16&255]^Z[t>>>8&255]^N[255&n]^e[38],p=H[i>>>24]^L[t>>>16&255]^Z[n>>>8&255]^N[255&c]^e[39];let h=40;o>10&&(t=H[u>>>24]^L[l>>>16&255]^Z[d>>>8&255]^N[255&p]^e[40],n=H[l>>>24]^L[d>>>16&255]^Z[p>>>8&255]^N[255&u]^e[41],c=H[d>>>24]^L[p>>>16&255]^Z[u>>>8&255]^N[255&l]^e[42],i=H[p>>>24]^L[u>>>16&255]^Z[l>>>8&255]^N[255&d]^e[43],u=H[t>>>24]^L[n>>>16&255]^Z[c>>>8&255]^N[255&i]^e[44],l=H[n>>>24]^L[c>>>16&255]^Z[i>>>8&255]^N[255&t]^e[45],d=H[c>>>24]^L[i>>>16&255]^Z[t>>>8&255]^N[255&n]^e[46],p=H[i>>>24]^L[t>>>16&255]^Z[n>>>8&255]^N[255&c]^e[47],h=48),o>12&&(t=H[u>>>24]^L[l>>>16&255]^Z[d>>>8&255]^N[255&p]^e[48],n=H[l>>>24]^L[d>>>16&255]^Z[p>>>8&255]^N[255&u]^e[49],c=H[d>>>24]^L[p>>>16&255]^Z[u>>>8&255]^N[255&l]^e[50],i=H[p>>>24]^L[u>>>16&255]^Z[l>>>8&255]^N[255&d]^e[51],u=H[t>>>24]^L[n>>>16&255]^Z[c>>>8&255]^N[255&i]^e[52],l=H[n>>>24]^L[c>>>16&255]^Z[i>>>8&255]^N[255&t]^e[53],d=H[c>>>24]^L[i>>>16&255]^Z[t>>>8&255]^N[255&n]^e[54],p=H[i>>>24]^L[t>>>16&255]^Z[n>>>8&255]^N[255&c]^e[55],h=56),r[0]=(j[u>>>24]<<24|j[l>>>16&255]<<16|j[d>>>8&255]<<8|j[255&p])^e[h],r[1]=(j[l>>>24]<<24|j[d>>>16&255]<<16|j[p>>>8&255]<<8|j[255&u])^e[h+1],r[2]=(j[d>>>24]<<24|j[p>>>16&255]<<16|j[u>>>8&255]<<8|j[255&l])^e[h+2],r[3]=(j[p>>>24]<<24|j[u>>>16&255]<<16|j[l>>>8&255]<<8|j[255&d])^e[h+3]}}function J(t){const n=function(){const t=new i(_),n=new i(16),e=new c(O),r=new u(e.buffer),s=new c(8);let a=0,f=0;return{update:w,digest:function(){const n=8*f,e=o.floor(n/4294967296),r=n>>>0;for(w(K,0,1);56!=a;)w(T,0,1);s[0]=e>>>24,s[1]=e>>>16,s[2]=e>>>8,s[3]=e,s[4]=r>>>24,s[5]=r>>>16,s[6]=r>>>8,s[7]=r,w(s,0,8);const i=new c(V),l=new u(i.buffer);for(let n=0;n<t.length;n++)l.setInt32(4*n,t[n]);return t.set(_),a=0,f=0,i}};function w(t,n,o){const c=n+o;if(f+=o,a){for(;n<c&&a<O;)e[a++]=t[n++];a==O&&(l(r,0),a=0)}if(n+O<=c){const e=new u(t.buffer,t.byteOffset,t.byteLength);for(;n+O<=c;n+=O)l(e,n)}for(;n<c;)e[a++]=t[n++]}function l(e,o){for(let t=0;t<16;t++)n[t]=e.getInt32(o+4*t);let r,c=t[0],s=t[1],a=t[2],i=t[3],f=t[4];for(let t=0;t<15;t+=5)f=(c<<5|c>>>27)+((a^i)&s^i)+f+1518500249+n[t]|0,s=s<<30|s>>>2,i=(f<<5|f>>>27)+((s^a)&c^a)+i+1518500249+n[t+1]|0,c=c<<30|c>>>2,a=(i<<5|i>>>27)+((c^s)&f^s)+a+1518500249+n[t+2]|0,f=f<<30|f>>>2,s=(a<<5|a>>>27)+((f^c)&i^c)+s+1518500249+n[t+3]|0,i=i<<30|i>>>2,c=(s<<5|s>>>27)+((i^f)&a^f)+c+1518500249+n[t+4]|0,a=a<<30|a>>>2;f=(c<<5|c>>>27)+((a^i)&s^i)+f+1518500249+n[15]|0,s=s<<30|s>>>2,r=n[13]^n[8]^n[2]^n[0],r=r<<1|r>>>31,n[0]=r,i=(f<<5|f>>>27)+((s^a)&c^a)+i+1518500249+r|0,c=c<<30|c>>>2,r=n[14]^n[9]^n[3]^n[1],r=r<<1|r>>>31,n[1]=r,a=(i<<5|i>>>27)+((c^s)&f^s)+a+1518500249+r|0,f=f<<30|f>>>2,r=n[15]^n[10]^n[4]^n[2],r=r<<1|r>>>31,n[2]=r,s=(a<<5|a>>>27)+((f^c)&i^c)+s+1518500249+r|0,i=i<<30|i>>>2,r=n[0]^n[11]^n[5]^n[3],r=r<<1|r>>>31,n[3]=r,c=(s<<5|s>>>27)+((i^f)&a^f)+c+1518500249+r|0,a=a<<30|a>>>2;for(let t=20;t<40;t+=5)r=n[t-3&15]^n[t-8&15]^n[t-14&15]^n[15&t],r=r<<1|r>>>31,n[15&t]=r,f=(c<<5|c>>>27)+(s^a^i)+f+1859775393+r|0,s=s<<30|s>>>2,r=n[t-2&15]^n[t-7&15]^n[t-13&15]^n[t+1&15],r=r<<1|r>>>31,n[t+1&15]=r,i=(f<<5|f>>>27)+(c^s^a)+i+1859775393+r|0,c=c<<30|c>>>2,r=n[t-1&15]^n[t-6&15]^n[t-12&15]^n[t+2&15],r=r<<1|r>>>31,n[t+2&15]=r,a=(i<<5|i>>>27)+(f^c^s)+a+1859775393+r|0,f=f<<30|f>>>2,r=n[15&t]^n[t-5&15]^n[t-11&15]^n[t+3&15],r=r<<1|r>>>31,n[t+3&15]=r,s=(a<<5|a>>>27)+(i^f^c)+s+1859775393+r|0,i=i<<30|i>>>2,r=n[t+1&15]^n[t-4&15]^n[t-10&15]^n[t+4&15],r=r<<1|r>>>31,n[t+4&15]=r,c=(s<<5|s>>>27)+(a^i^f)+c+1859775393+r|0,a=a<<30|a>>>2;for(let t=40;t<60;t+=5)r=n[t-3&15]^n[t-8&15]^n[t-14&15]^n[15&t],r=r<<1|r>>>31,n[15&t]=r,f=(c<<5|c>>>27)+(s&a|(s|a)&i)+f+2400959708+r|0,s=s<<30|s>>>2,r=n[t-2&15]^n[t-7&15]^n[t-13&15]^n[t+1&15],r=r<<1|r>>>31,n[t+1&15]=r,i=(f<<5|f>>>27)+(c&s|(c|s)&a)+i+2400959708+r|0,c=c<<30|c>>>2,r=n[t-1&15]^n[t-6&15]^n[t-12&15]^n[t+2&15],r=r<<1|r>>>31,n[t+2&15]=r,a=(i<<5|i>>>27)+(f&c|(f|c)&s)+a+2400959708+r|0,f=f<<30|f>>>2,r=n[15&t]^n[t-5&15]^n[t-11&15]^n[t+3&15],r=r<<1|r>>>31,n[t+3&15]=r,s=(a<<5|a>>>27)+(i&f|(i|f)&c)+s+2400959708+r|0,i=i<<30|i>>>2,r=n[t+1&15]^n[t-4&15]^n[t-10&15]^n[t+4&15],r=r<<1|r>>>31,n[t+4&15]=r,c=(s<<5|s>>>27)+(a&i|(a|i)&f)+c+2400959708+r|0,a=a<<30|a>>>2;for(let t=60;t<80;t+=5)r=n[t-3&15]^n[t-8&15]^n[t-14&15]^n[15&t],r=r<<1|r>>>31,n[15&t]=r,f=(c<<5|c>>>27)+(s^a^i)+f+3395469782+r|0,s=s<<30|s>>>2,r=n[t-2&15]^n[t-7&15]^n[t-13&15]^n[t+1&15],r=r<<1|r>>>31,n[t+1&15]=r,i=(f<<5|f>>>27)+(c^s^a)+i+3395469782+r|0,c=c<<30|c>>>2,r=n[t-1&15]^n[t-6&15]^n[t-12&15]^n[t+2&15],r=r<<1|r>>>31,n[t+2&15]=r,a=(i<<5|i>>>27)+(f^c^s)+a+3395469782+r|0,f=f<<30|f>>>2,r=n[15&t]^n[t-5&15]^n[t-11&15]^n[t+3&15],r=r<<1|r>>>31,n[t+3&15]=r,s=(a<<5|a>>>27)+(i^f^c)+s+3395469782+r|0,i=i<<30|i>>>2,r=n[t+1&15]^n[t-4&15]^n[t-10&15]^n[t+4&15],r=r<<1|r>>>31,n[t+4&15]=r,c=(s<<5|s>>>27)+(a^i^f)+c+3395469782+r|0,a=a<<30|a>>>2;t[0]=t[0]+c|0,t[1]=t[1]+s|0,t[2]=t[2]+a|0,t[3]=t[3]+i|0,t[4]=t[4]+f|0}}(),e=new c(O),r=new c(O);t.length>O&&(n.update(t,0,t.length),t=n.digest());for(let n=0;n<O;n++){const o=n<t.length?t[n]:0;e[n]=54^o,r[n]=92^o}return n.update(e,0,O),{update(t,e,o){n.update(t,e,o)},digest(){const t=n.digest();n.update(r,0,O),n.update(t,0,V);const o=n.digest();return n.update(e,0,O),o}}}function Q(t){return j[t>>>24]<<24|j[t>>>16&255]<<16|j[t>>>8&255]<<8|j[255&t]}function X(t){return t<<24|(65280&t)<<8|t>>>8&65280|t>>>24}function Y(t){return 255&(t<<1^27*(t>>7))}const $=typeof d!=b&&typeof d.getRandomValues==k,tt=\"Invalid password\",nt=\"zipjs-abort-check-password\";function et(t){if($)return d.getRandomValues(t);throw new r(\"Crypto API not supported\")}const ot={name:\"PBKDF2\"},rt=n.assign({hash:{name:\"HMAC\"}},ot),ct=n.assign({iterations:1e3,hash:{name:\"SHA-1\"}},ot),st=[\"deriveBits\"],at=[8,12,16],it=[16,24,32],ft=10,ut=typeof d!=b,wt=ut&&d.subtle;let lt=ut&&typeof wt!=b&&typeof wt.importKey==k&&typeof wt.deriveBits==k,dt=G;class pt extends h{constructor({password:t,rawPassword:n,encryptionStrength:e,checkPasswordOnly:o,checkAuthenticationCode:s=!0}){const a={};super({start(){yt(a,t,n,e)},async transform(t,n){const{password:e,strength:s,l:i,ready:f}=a;if(e?(await async function(t,n,e,o){const c=await vt(t,n,e,kt(o,0,at[n])),s=kt(o,at[n]);if(c[0]!=s[0]||c[1]!=s[1])throw gt(t),new r(tt)}(a,s,e,kt(t,0,at[s]+2)),t=kt(t,at[s]+2),o?(gt(a),n.error(new r(nt))):i()):await f,a.h)return;const u=new c(t.length-ft-(t.length-ft)%16);n.enqueue(St(a,t,u,0,ft,!0))},async flush(t){const{m:n,S:e,ready:o}=a;if(n){if(await o,a.h)return;const i=kt(e,e.length-ft),f=new c(kt(e,0,e.length-ft));n.process(f,!0);const u=n.digest();let w=e.length<ft?1:0;for(let t=0;t<ft;t++)w|=u[t]^i[t];if(w&&s)return void t.error(new r(\"Invalid authentication code\"));t.enqueue(f)}}}),mt(this,a)}}class ht extends h{constructor({password:t,rawPassword:n,encryptionStrength:e}){const o={};super({start(){yt(o,t,n,e)},async transform(t,n){const{password:e,strength:r,l:s,ready:a}=o;let i=z;if(e?(i=await async function(t,n,e){const o=et(new c(at[n]));return B(o,await vt(t,n,e,o))}(o,r,e),s()):await a,o.h)return;const f=new c(i.length+t.length-t.length%16);f.set(i,0),n.enqueue(St(o,t,f,i.length,0,!1))},async flush(t){const{m:n,S:e,ready:r}=o;if(n){if(await r,o.h)return;const s=new c(e);n.process(s,!1);const a=kt(n.digest(),0,ft);t.enqueue(B(s,a))}}}),mt(this,o)}}function yt(t,e,o,r){n.assign(t,{ready:new w(n=>t.l=n),password:bt(e,o),strength:r-1,S:z,h:!1})}function mt(t,e){const o=t.readable.getReader(),r=new y({async pull(t){try{const{value:n,done:e}=await o.read();e?t.close():t.enqueue(n)}catch(t){throw gt(e),o.cancel(t).catch(()=>{}),t}},cancel:t=>(gt(e),o.cancel(t))});n.defineProperty(t,\"readable\",{get:()=>r})}function St(t,n,e,o,r,s){const{m:a,S:i}=t;i.length&&(n=B(i,n));const f=n.length-r,u=f-f%16;if(e=function(t,n){if(n&&n>t.length){const e=t;(t=new c(n)).set(e,0)}return t}(e,o+u),u){const t=kt(e,o,o+u);t.set(kt(n,0,u)),a.process(t,s)}return t.S=kt(n,u),e}function gt(t){const{m:n}=t;t.h=!0,n&&n.dispose&&n.dispose()}async function vt(t,e,r,s){t.password=null;const a=it[e],i=await async function(t,e,r){if(lt)try{const o=await wt.importKey(\"raw\",t,rt,!1,st);return new c(await wt.deriveBits(n.assign({salt:e},ct),o,8*r))}catch{lt=!1}return function(t,n,e,r){const s=J(t),a=new c(r),i=new c(n.length+4),f=new u(i.buffer);i.set(n);for(let t=1,e=0;e<r;t++,e+=V){f.setUint32(n.length,t),s.update(i,0,i.length);let c=s.digest();const u=c.slice();for(let t=1;t<1e3;t++){s.update(c,0,V),c=s.digest();for(let t=0;t<V;t++)u[t]^=c[t]}a.set(u.subarray(0,o.min(V,r-e)),e)}return a}(t,e,0,r)}(r,s,2*a+2);return t.m=dt(kt(i,0,a),kt(i,a,2*a)),t.h&&gt(t),kt(i,2*a)}function bt(t,n){return n===v?function(t){if(typeof l==b){t=unescape(encodeURIComponent(t));const n=new c(t.length);for(let e=0;e<n.length;e++)n[e]=t.charCodeAt(e);return n}return(new l).encode(t)}(t):n}function kt(t,n,e){return t.subarray(n,e)}class zt extends h{constructor({password:t,rawPassword:n,passwordVerification:e,checkPasswordOnly:o}){super({start(){It(this,t,n,e)},transform(t,n){const e=this;if(e.password||e.rawPassword){const n=Mt(e,t.subarray(0,12));if(e.password=e.rawPassword=null,0!=(n[11]^e.passwordVerification))throw new r(tt);t=t.subarray(12)}o?n.error(new r(nt)):n.enqueue(Mt(e,t))}})}}class Ct extends h{constructor({password:t,rawPassword:n,passwordVerification:e}){super({start(){It(this,t,n,e)},transform(t,n){const e=this;let o,r;if(e.password||e.rawPassword){e.password=e.rawPassword=null;const n=et(new c(12));n[11]=e.passwordVerification,o=new c(t.length+n.length),o.set(At(e,n),0),r=12}else o=new c(t.length),r=0;o.set(At(e,t),r),n.enqueue(o)}})}}function It(t,e,o,r){n.assign(t,{password:e,rawPassword:o,passwordVerification:r}),function(t,e,o){const r=[305419896,591751049,878082192];if(n.assign(t,{v:r,C:new F(r[0]),I:new F(r[2])}),o)for(let n=0;n<o.length;n++)Et(t,o[n]);else for(let n=0;n<e.length;n++)Et(t,e.charCodeAt(n))}(t,e,o)}function Mt(t,n){const e=new c(n.length);for(let o=0;o<n.length;o++)e[o]=Rt(t)^n[o],Et(t,e[o]);return e}function At(t,n){const e=new c(n.length);for(let o=0;o<n.length;o++)e[o]=Rt(t)^n[o],Et(t,n[o]);return e}function Et(t,n){let[,e]=t.v;t.C.append([n]);const r=~t.C.get();e=Pt(o.imul(Pt(e+xt(r)),134775813)+1),t.I.append([e>>>24]);const c=~t.I.get();t.v=[r,e,c]}function Rt(t){const n=2|t.v[2];return xt(o.imul(n,1^n)>>>8)}function xt(t){return 255&t}function Pt(t){return 4294967295&t}function Dt(t){if(t instanceof y)return t;const n=t.getReader();return new y({async pull(t){try{const{value:e,done:o}=await n.read();o?t.close():t.enqueue(e)}catch(t){throw n.cancel(t).catch(()=>{}),t}},cancel:t=>n.cancel(t)})}function Ft(t){return Boolean(t)&&\"object\"==typeof t}const Ut=new f;function Bt(t){return Ut.get(t)}const Wt=\"Invalid uncompressed size\",Ot=\"Codec out of memory\",Vt=\"Invalid CRC32\",Kt=\"deflate-raw\",Tt=\"gzip\",_t=[31,139,8];class jt extends h{constructor(t,{chunkSize:n,CompressionStreamFallback:e,CompressionStream:o}){super({});const{compressed:r,encrypted:c,useCompressionStream:s,zipCrypto:a,computeCrc32:i,level:f,deflate64:w,format:l,compressionMethod:d,inputSize:p}=t,h=this;let y,m,S,g=super.readable;const v=l&&Bt(l),b=Gt(s,o,e),k=i&&r&&!w&&!v&&(!c||a)&&Boolean(b);if(c&&!a||!i||k||(y=new U,g=Qt(g,y)),r)if(v)g=Xt(g,qt(v.CompressionStream,l,{level:f,chunkSize:n,compressionMethod:d,uncompressedSize:p}));else if(k)S=new Ht,g=Xt(g,new b(Tt,{level:f,chunkSize:n})),g=Qt(g,S);else try{g=Jt(g,s,{level:f,chunkSize:n},o,e)}catch(t){if(!s&&e)throw en(t);let n;try{n=new o(Tt)}catch{throw en(t)}g=Xt(g,n),g=Qt(g,new Ht)}c&&(a?g=Qt(g,new Ct(t)):(m=new ht(t),g=Qt(g,m))),Nt(h,g,()=>{c&&!a||!i||(h.crc32=k?S.crc32:new u(y.value.buffer).getUint32(0))})}}class Ht extends h{constructor(){let t,n=10,e=new c(0);super({transform(t,r){if(n){const e=o.min(n,t.length);if(n-=e,!(t=t.subarray(e)).length)return}const c=e.length+t.length;if(c<=8)return void(e=B(e,t));const s=c-8,a=o.min(s,e.length);r.enqueue(B(e.subarray(0,a),t.subarray(0,s-a))),e=B(e.subarray(a),t.subarray(s-a))},flush(){const n=W(e);t.crc32=n.getUint32(0,!0),t.uncompressedSize=n.getUint32(4,!0)}}),t=this}}class Lt extends h{constructor(t,{chunkSize:n,DecompressionStreamFallback:e,DecompressionStream:o}){super({});const{zipCrypto:s,encrypted:a,checkCrc32:i,crc32:f,compressed:l,useCompressionStream:d,deflate64:p,format:h,compressionMethod:m,rawBitFlag:S,outputSize:g}=t;let b,k,z,C=super.readable;if(a&&(s?C=Qt(C,new zt(t)):(k=new pt(t),C=Qt(C,k))),l){const t=new Set,s=h&&Bt(h);let a;if(s)C=Xt(C,qt(s.DecompressionStream,h,{chunkSize:n,compressionMethod:m,rawBitFlag:S,uncompressedSize:g}),t);else{const r=Gt(d,o,e);if(i&&!p&&f!==v&&g!==v&&r)try{a=new r(Tt,{chunkSize:n})}catch{a=v}if(!a)try{C=Jt(C,d,{chunkSize:n,deflate64:p},o,e,t)}catch(t){if(p||g===v||!d&&e)throw en(t);try{a=new o(Tt)}catch{throw en(t)}}}a?(z=!0,C=function(t,n,e,o,s){const a=n.writable.getWriter(),i=n.readable.getReader(),f=o===v?new F:v;let u,l,d=0,p=!1,h=!1;const m=new y({start(t){l=t},pull(){b()},cancel:t=>(h=!0,b(),i.cancel(t))});return async function(){const n=t.getReader();try{const t=new c(10);for(t.set(_t),await a.write(t);;){await g(),await a.ready;const{value:t,done:e}=await tn(n,s);if(e)break;await a.write(t)}f&&await a.write(new c(0));const r=new c(8),i=W(r);i.setUint32(0,f?f.get():o,!0),i.setUint32(4,e,!0),p=!0,await a.write(r),await a.close()}catch(t){await Yt(a,t),await $t(n,t)}}(),async function(){try{for(;;){const{value:t,done:n}=await S();if(n)break;if(d+=t.length,d>e)throw new r(Wt);f&&f.append(t),l.enqueue(t)}h||(h=!0,l.close())}catch(t){!function(t){h||(h=!0,l.error(t),b())}(t),await $t(i,t)}}(),m;function S(){return i.read().catch(t=>{if(p){if(!f)throw rn(t,Vt);if(d!=e)throw rn(t,Wt);return{done:!0}}throw nn(t,s)})}function g(){if(!h&&l.desiredSize<=0)return new w(t=>u=t)}function b(){if(u){const t=u;u=v,t()}}}(C,a,g,f,t)):C=function(t,n){const e=t.getReader();return new y({async pull(t){try{const{value:n,done:o}=await e.read();o?t.close():t.enqueue(n)}catch(t){throw await $t(e,t),nn(t,n)}},cancel:t=>e.cancel(t)})}(C,t)}i&&!z&&(b=new U,C=Qt(C,b)),Nt(this,C,()=>{if(b){const t=new u(b.value.buffer).getUint32(0,!1);if(f!=t)throw new r(Vt)}})}}const Zt=new f;function Nt(t,e,o){e=Qt(e,new h({flush:o})),n.defineProperty(t,\"readable\",{get:()=>e})}function qt(t,n,e){if(!t)throw new r(\"Compression method not supported\");return new t(n,e)}function Gt(t,n,e){return t&&n?n:e&&e.requiresModule?e:void 0}function Jt(t,n,e,o,r,c){const s=n&&o?o:r||o,a=e.deflate64?\"deflate64-raw\":Kt;let i;try{i=new s(a,e)}catch(t){if(!n||!r||s==r)throw t;i=new r(a,e)}return Xt(t,i,c)}function Qt(t,n){return Dt(t).pipeThrough(n)}function Xt(t,n,e){const o=n.writable.getWriter(),r=t.getReader();return async function(){try{for(;;){await o.ready;const t=await tn(r,e);if(t.done){await o.close();break}await o.write(t.value)}}catch(t){await Yt(o,t),await $t(r,t)}}(),n.readable}async function Yt(t,n){try{await t.abort(n)}catch{}}async function $t(t,n){try{await t.cancel(n)}catch{}}function tn(t,n){const e=t.read();return n?e.catch(t=>{throw n.add(t),t}):e}function nn(t,n){return n.has(t)?t:rn(t,on(t)?Ot:\"Invalid compressed data\")}function en(t){return on(t)?rn(t,Ot):t}function on(t){return Ft(t)&&\"Z_MEM_ERROR\"==t.code}function rn(t,n){const e=new r(n);return e.cause=t,e}const cn=\"data\",sn=\"deflate\";class an extends h{constructor(t,e){super({});const o=this,{codecType:c}=t;let s;c.startsWith(sn)?s=jt:c.startsWith(\"inflate\")&&(s=Lt),o.outputSize=0;let a=0;const i=new s(t,e),f=super.readable,u=new h({transform(t,n){t&&t.length&&(a+=t.length,n.enqueue(t))},flush(){n.assign(o,{inputSize:a})}}),w=new h({transform(n,e){if(n&&n.length&&(e.enqueue(n),o.outputSize+=n.length,t.outputSize!==v&&o.outputSize>t.outputSize))throw new r(Wt)},flush(){const{crc32:t}=i;n.assign(o,{crc32:t,inputSize:a})}});n.defineProperty(o,\"readable\",{get:()=>f.pipeThrough(u).pipeThrough(i).pipeThrough(w)})}}class fn extends h{constructor(t){const o=[];let r=0,s=0;function a(){const n=new c(t);let e=0;for(;e<t;){const r=o[0],c=t-e;r.length<=c?(n.set(r,e),e+=r.length,o.shift()):(n.set(r.subarray(0,c),e),o[0]=r.subarray(c),e+=c)}return r-=t,n}(!e.isFinite(t)||t<1)&&(t=65536),super({transform(n,e){for(o.push(n),r+=n.length;r>t;)s+=t,e.enqueue(a())},flush(t){r&&(s+=r,t.enqueue(function(t,n){const e=new c(n);let o=0;for(const n of t)e.set(n,o),o+=n.length;return e}(o,r)))}}),n.defineProperty(this,\"outputSize\",{get:()=>s})}}let un=2;try{typeof navigator!=b&&navigator.hardwareConcurrency&&(un=navigator.hardwareConcurrency)}catch{}const wn=new f,ln=new f,dn=function(){try{return structuredClone(new r)instanceof r}catch{return!1}}();let pn=0;async function hn(t){let n,c,s;try{const{options:a,config:i}=t;if(a.format)try{await async function(t,n){!Ut.has(t)&&n&&function(t,n){const{CompressionStream:e,DecompressionStream:o}=n;if(typeof e!=k&&typeof o!=k)throw new r(\"Invalid codec module\");Ut.set(t,{CompressionStream:e,DecompressionStream:o})}(t,await(import(n)))}(a.format,a.codecURI)}catch(t){if(Ft(t))try{t.codecImportFailed=!0}catch{}throw t}if(i.CompressionStream=self.CompressionStream,i.DecompressionStream=self.DecompressionStream,a.compressed&&!a.format)if(a.useCompressionStream){if(!function(t,n){if(!t)return!1;let e=Zt.get(t);e||(e=new f,Zt.set(t,e));let o=e.get(n);if(o===v){try{new t(n),o=!0}catch{o=!1}e.set(n,o)}return o}(a.codecType.startsWith(sn)?i.CompressionStream:i.DecompressionStream,Kt))try{await self.initModule(t.config)}catch{}}else try{await self.initModule(t.config)}catch{a.useCompressionStream=!0}if(a.encrypted&&!a.zipCrypto)try{await self.initModule(t.config)}catch{}!i.CompressionStreamFallback&&i.CompressionStreamZlib&&(i.CompressionStreamFallback=i.CompressionStreamZlib),!i.DecompressionStreamFallback&&i.DecompressionStreamZlib&&(i.DecompressionStreamFallback=i.DecompressionStreamZlib);const u={highWaterMark:1},l=t.readable?Dt(t.readable):new y({async pull(t){const n=new w(t=>wn.set(pn,t));yn({type:\"pull\",messageId:pn}),pn=(pn+1)%e.MAX_SAFE_INTEGER;const{value:o,done:r}=await n;t.enqueue(o),r&&t.close()}},u);s=t.writable?function(t){if(t instanceof m)return t;const n=t.getWriter();return new m({write:t=>n.write(t),close:()=>n.close(),abort:t=>n.abort(t)})}(t.writable):new m({async write(t){let n;const o=new w(t=>n=t);ln.set(pn,n),yn({type:cn,value:t,messageId:pn}),pn=(pn+1)%e.MAX_SAFE_INTEGER,await o}},u),n=new an(a,i),c=new fn(function(t){return r=\"string\"==typeof(n=r=t.chunkSize)&&n.trim()?e(n):n,e.isInteger(r)&&r>=1?o.max(r,64):65536;var n,r}(i)),await l.pipeThrough(n).pipeThrough(c).pipeTo(s,{preventClose:!0,preventAbort:!0}),await s.getWriter().close();const{crc32:d,inputSize:p,outputSize:h}=n;yn({type:\"close\",result:{crc32:d,inputSize:p,outputSize:h}})}catch(t){const n=c?c.outputSize:0;if(Ft(t))try{t.outputSize=n}catch{}if(s&&!s.locked)try{await s.getWriter().close()}catch{}mn(t,n)}}function yn(t){const{value:n}=t;if(n)if(n.length)try{t.value=(e=n,e.byteOffset||e.byteLength!=e.buffer.byteLength?new c(e):e).buffer,p(t,[t.value])}catch{p(t)}else p(t);else p(t);var e}function mn(t,n){const{message:e,stack:o,code:c,name:s,outputSize:a,cause:i,codecImportFailed:f}=function(t=new r(\"Unknown error\")){return Ft(t)?t:new r(String(t))}(t),u={message:e,stack:o,code:c,name:s,outputSize:a===v?n:a};if(Ft(i)&&(u.cause={name:i.name,message:i.message,code:i.code}),f&&(u.codecImportFailed=!0),dn)try{return void p({error:u,errorValue:{value:t}})}catch{}p({error:u})}addEventListener(\"message\",({data:t})=>{const{type:n,messageId:e,value:o,done:r}=t;try{if(\"start\"==n&&hn(t),n==cn){const t=wn.get(e);wn.delete(e),t({value:o||new c,done:r})}if(\"ack\"==n){const t=ln.get(e);ln.delete(e),t()}}catch(t){mn(t)}}),p({type:\"ready\"});const Sn=\"deflate\",gn=\"deflate-raw\",vn=\"deflate64-raw\",bn=\"gzip\",kn=[Sn,gn,bn],zn=[Sn,gn,bn,vn];let Cn,In,Mn,An,En;function Rn(t,n){return-4===n&&(t.code=\"Z_MEM_ERROR\"),t}function xn(t,n,e={}){if(!(t?kn:zn).includes(n))throw new TypeError(\"Unsupported format: \"+n);if(!Cn){const t=new r(\"WASM module not loaded\");throw t.cause=En,t}const s=\"number\"==typeof e.level?e.level:-1,a=\"number\"==typeof e.outBuffer?e.outBuffer:65536,i=\"number\"==typeof e.inBufferSize?e.inBufferSize:65536,f={M:0,in:0,inBufferSize:0,A:0,R:!1};let u,l,d,p,h=!0,S=!1;return function(){try{let e;if(f.M=In(a),f.in=In(i),f.inBufferSize=i,!f.M||!f.in)throw Rn(new r(\"allocation failed\"),-4);if(t?(f.P=Cn.deflate_process,f.D=Cn.deflate_last_consumed,f.F=Cn.deflate_end,f.A=Cn.deflate_new(),e=n===bn?Cn.deflate_init_gzip(f.A,s):n===gn?Cn.deflate_init_raw(f.A,s):Cn.deflate_init(f.A,s)):n===vn?(f.P=Cn.inflate9_process,f.D=Cn.inflate9_last_consumed,f.F=Cn.inflate9_end,f.A=Cn.inflate9_new(),e=Cn.inflate9_init_raw(f.A)):(f.P=Cn.inflate_process,f.D=Cn.inflate_last_consumed,f.F=Cn.inflate_end,f.A=Cn.inflate_new(),e=n===gn?Cn.inflate_init_raw(f.A):n===bn?Cn.inflate_init_gzip(f.A):Cn.inflate_init(f.A)),0!==e)throw Rn(new r(\"init failed:\"+e),e)}catch(t){throw b(f),t}}(),{readable:new y({start(t){u=t},pull(){h=!1,v()},cancel(t){S=!0,p=t,b(f),l.error(t),v()}},{highWaterMark:0}),writable:new m({start(t){l=t},async write(t){if(h&&await new w(t=>d=t),S)throw p;try{!function(t){const n=new c(An.buffer),e=f.P,s=f.D,i=f.M;let u=0;for(;u<t.length;){if(f.R)throw new r(\"trailing data after the end of the stream\");const c=o.min(t.length-u,32768);if((!f.in||f.inBufferSize<c)&&(f.in&&Mn&&(Mn(f.in),f.in=0),f.in=In(c),f.inBufferSize=c,!f.in))throw Rn(new r(\"allocation failed\"),-4);n.set(t.subarray(u,u+c),f.in);const w=e(f.A,f.in,c,i,a,0),l=w>>24&255,d=128&l?l-256:l;if(d<0)throw Rn(new r(\"process error:\"+d),d);const p=16777215&w;p&&g(n.slice(i,i+p));const h=s(f.A);if(1===l)f.R=!0;else if(0===h&&0===p)break;u+=h}}(t)}catch(t){throw b(f),u.error(t),t}},close(){if(S)return;try{!function(){const t=new c(An.buffer),n=f.P,e=f.M;for(;;){const o=n(f.A,0,0,e,a,4),c=o>>24&255,s=128&c?c-256:c;if(s<0)throw Rn(new r(\"process error:\"+s),s);const i=16777215&o;if(i&&g(t.slice(e,e+i)),1===c||0===i)break}}()}catch(t){throw b(f),u.error(t),t}const t=b(f);if(0!==t){const n=Rn(new r(\"end error:\"+t),t);throw u.error(n),n}u.close()},abort(t){b(f),u.error(t)}},{highWaterMark:1})};function g(t){h=!0,u.enqueue(t)}function v(){if(d){const t=d;d=null,t()}}function b(t){let n=0;return t.A&&t.F&&(n=t.F(t.A)),t.A=0,t.in&&Mn&&Mn(t.in),t.in=0,t.M&&Mn&&Mn(t.M),t.M=0,n}}class Pn{constructor(t=Sn,n){return xn(!0,t,n)}}class Dn{constructor(t=Sn,n){return xn(!1,t,n)}}Pn.requiresModule=!0,Dn.requiresModule=!0,Pn.supportedFormats=kn,Dn.supportedFormats=zn;const Fn=65536;let Un,Bn;function Wn(t){return new c(t.memory.buffer)}let On=!1;!function(t={}){const{init:n,U:e}=t,o=t.CompressionStreamFallback||t.CompressionStreamZlib,r=t.DecompressionStreamFallback||t.DecompressionStreamZlib;e&&(dt=e||G),self.initModule=async t=>{n&&await n(t),o&&(t.CompressionStreamFallback=o),r&&(t.DecompressionStreamFallback=r)}}({CompressionStreamFallback:Pn,DecompressionStreamFallback:Dn,U:function(t,n){const e=Un;let o=e?function(t,n,e){Bn||(Bn=t.malloc(Fn));const o=Bn?t.aes_hmac_new():0;if(o){const r=Wn(t);if(r.set(n,Bn),r.set(e,Bn+n.length),t.aes_hmac_init(o,Bn,n.length,Bn+n.length,e.length))return t.aes_hmac_end(o,0),0}return o}(e,t,n):0;if(!o)return G(t,n);const r=Bn;return{process(t,n){for(let c=0;c<t.length;c+=Fn){const s=t.subarray(c,c+Fn),a=Wn(e);a.set(s,r),e.aes_hmac_process(o,r,s.length,n?1:0),s.set(a.subarray(r,r+s.length))}},digest:()=>(e.aes_hmac_end(o,r),o=0,Wn(e).slice(r,r+20)),dispose(){o&&(e.aes_hmac_end(o,0),o=0)}}},init:t=>async function(t,{baseURI:n}){if(!On)try{await async function(t,n){let e,o;try{try{o=new URL(t,n)}catch{}const r=await fetch(o);e=await r.arrayBuffer()}catch(n){if(!t.startsWith(\"data:application/wasm;base64,\"))throw n;e=function(t){const n=t.split(\",\")[1],e=atob(n),o=e.length,r=new c(o);for(let t=0;t<o;++t)r[t]=e.charCodeAt(t);return r.buffer}(t)}const s=await WebAssembly.instantiate(e);var a;(function(t){if(Cn=t,({malloc:In,free:Mn,memory:An}=Cn),\"function\"!=typeof In||\"function\"!=typeof Mn||!An)throw Cn=In=Mn=An=null,new r(\"Invalid WASM module\")})(s.instance.exports),typeof(a=s.instance.exports).aes_hmac_new==k&&(Un=a,Bn=0)}(t,n),On=!0}catch(t){throw function(t){En=t}(t),t}}(t.wasmURI,t)})});\\n';if(\"string\"==typeof r&&(r=(new TextEncoder).encode(r)),t){const t=new Blob([r],{type:e});return URL.createObjectURL(t)}return\"data:\"+e+\";base64,\"+function(t){let e=\"\";const r=t.length;let o=0;for(;o+2<r;o+=3){const r=t[o]<<16|t[o+1]<<8|t[o+2];e+=n[r>>18&63]+n[r>>12&63]+n[r>>6&63]+n[63&r]}const s=r-o;if(1===s){const r=t[o]<<16;e+=n[r>>18&63]+n[r>>12&63]+\"==\"}else if(2===s){const r=t[o]<<16|t[o+1]<<8;e+=n[r>>18&63]+n[r>>12&63]+n[r>>6&63]+\"=\"}return e}(r)}});export{e as configureWebWorker};\n","/*\n Copyright (c) 2025 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 { setDefaultConfiguration } from \"./core/configuration.js\";\n\ntry {\n\tsetDefaultConfiguration({ baseURI: import.meta.url });\n} catch {\n\t// ignored\n}\n\nexport * from \"./zip-core-reader.js\";\nexport * from \"./zip-core-writer.js\";\nexport {\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\tSplitDataReader,\n\tSplitDataWriter,\n\tERR_HTTP_RANGE,\n\tERR_HTTP_STATUS,\n\tERR_HTTP_RESOURCE_CHANGED,\n\tERR_ITERATOR_COMPLETED_TOO_SOON,\n\tERR_WRITER_NOT_INITIALIZED,\n\tERR_WRITER_SIZE_NOT_WRITABLE\n} from \"./core/io.js\";\nexport {\n\tERR_INVALID_FUNCTION_OPTION,\n\tERR_INVALID_SIGNAL,\n\tERR_INVALID_PASS_THROUGH_VALUE,\n\tERR_ABORTED\n} from \"./core/options.js\";\nexport {\n\tgetMimeType\n} from \"./core/util/default-mime-type.js\";\nexport {\n\tconfigure,\n\tresetConfiguration,\n\tERR_INVALID_MAX_WORKERS,\n\tERR_INVALID_BASE_URI,\n\tERR_INVALID_URI\n} from \"./core/configuration.js\";\nexport {\n\tregisterCodec,\n\tunregisterCodec,\n\tgetRegisteredCodecs,\n\tERR_INVALID_CODEC_DEFINITION,\n\tERR_RESERVED_COMPRESSION_METHOD,\n\tERR_INVALID_CODEC_MODULE\n} from \"./core/codec-registry.js\";\nexport {\n\tgetSupportedCompressionMethods\n} from \"./core/compression-methods.js\";\nexport {\n\tVERSION\n} from \"./core/version.js\";\nexport {\n\tcreateOPFSTempStream\n} from \"./core/util/opfs-temp-stream.js\";\nexport {\n\tcreateBlobTempStream\n} from \"./core/util/blob-temp-stream.js\";\nexport {\n\tcreateSyncAccessHandleTempStream,\n\tERR_UNSUPPORTED_CONTEXT\n} from \"./core/util/sync-access-handle-temp-stream.js\";","/*\n Copyright (c) 2025 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, AbortController, structuredClone, DOMException, setTimeout, clearTimeout */\n\nimport {\n\tUNDEFINED_VALUE,\n\tFUNCTION_TYPE\n} from \"./constants.js\";\nimport { toExactUint8Array } from \"./util/array.js\";\nimport { isErrorObject } from \"./util/error.js\";\nimport {\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\";\nimport {\n\tsetWebWorkerBackend,\n\tdisableWebWorker,\n\tcreateWorkerInterface,\n\trunWorker,\n\tERR_WORKER_STARTUP_TIMEOUT\n} from \"./codec-worker.js\";\n\nconst MODULE_WORKER_OPTIONS = { type: \"module\" };\nconst ERROR_EVENT_TYPE = \"error\";\nconst MESSAGE_ERROR_EVENT_TYPE = \"messageerror\";\nconst ABORT_EVENT_TYPE = \"abort\";\n\nlet webWorkerSource, webWorkerURI, webWorkerOptions;\nlet transferStreamsSupported = true;\ntry {\n\ttransferStreamsSupported = typeof structuredClone == FUNCTION_TYPE && structuredClone(new DOMException(\"\", \"AbortError\")).code !== UNDEFINED_VALUE;\n} catch {\n\t// ignored\n}\n\nsetWebWorkerBackend(createWebWorkerInterface);\n\nfunction createWebWorkerInterface(workerData, config) {\n\tconst { baseURI, chunkSize, workerStartupTimeout } = config;\n\tlet { wasmURI } = config;\n\n\tif (!workerData.interface) {\n\t\t// deno-lint-ignore valid-typeof\n\t\tif (typeof wasmURI == FUNCTION_TYPE) {\n\t\t\twasmURI = wasmURI();\n\t\t}\n\t\tlet worker;\n\t\ttry {\n\t\t\tworker = getWebWorker(workerData.workerURI, baseURI, workerData);\n\t\t} catch {\n\t\t\tdisableWebWorker(workerData);\n\t\t\treturn createWorkerInterface(workerData, config);\n\t\t}\n\t\tObject.assign(workerData, {\n\t\t\tworker,\n\t\t\tworkerAlive: false,\n\t\t\tterminated: false,\n\t\t\tstartupError: null,\n\t\t\tinterface: {\n\t\t\t\trun: async () => {\n\t\t\t\t\ttry {\n\t\t\t\t\t\treturn await runWebWorker(workerData, { chunkSize, wasmURI, baseURI, workerStartupTimeout });\n\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\tif (error && error.workerStartupFailed) {\n\t\t\t\t\t\t\tdisableWebWorker(workerData);\n\t\t\t\t\t\t\treleaseWorkerStreams(workerData);\n\t\t\t\t\t\t\treturn runWorker(workerData, config);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (error && error.codecImportFailed) {\n\t\t\t\t\t\t\tif (workerData.reader) {\n\t\t\t\t\t\t\t\treleaseWorkerStreams(workerData);\n\t\t\t\t\t\t\t\treturn runWorker(workerData, config);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tworkerData.onTaskFinished();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthrow error;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n\treturn workerData.interface;\n}\n\nasync function runWebWorker(workerData, config) {\n\tif (!workerData.worker) {\n\t\tconst { startupError } = workerData;\n\t\tworkerData.startupError = null;\n\t\tconst error = startupError || new Error(ERR_WORKER_STARTUP_TIMEOUT);\n\t\terror.workerStartupFailed = true;\n\t\tthrow error;\n\t}\n\tlet resolveResult, rejectResult;\n\tconst result = new Promise((resolve, reject) => {\n\t\tresolveResult = resolve;\n\t\trejectResult = error => {\n\t\t\tconst { outputSize, workerOptions } = workerData;\n\t\t\tworkerOptions.outputSize = outputSize;\n\t\t\tif (isErrorObject(error)) {\n\t\t\t\ttry {\n\t\t\t\t\terror.outputSize = outputSize;\n\t\t\t\t} catch {\n\t\t\t\t\t// ignored\n\t\t\t\t}\n\t\t\t}\n\t\t\treject(error);\n\t\t};\n\t});\n\tObject.assign(workerData, {\n\t\treader: null,\n\t\twriter: null,\n\t\toutputSize: 0,\n\t\tdestinationFailed: false,\n\t\tdestinationError: null,\n\t\tresolveResult,\n\t\trejectResult,\n\t\tresult\n\t});\n\tconst { readable, options } = workerData;\n\tconst { writable, closed, abortPipe } = watchClosedStream(workerData.writable, workerData);\n\tlet streamsTransferred;\n\ttry {\n\t\tstreamsTransferred = sendMessage({\n\t\t\ttype: MESSAGE_START,\n\t\t\toptions,\n\t\t\tconfig,\n\t\t\treadable,\n\t\t\twritable\n\t\t}, workerData);\n\t} catch (error) {\n\t\tabortPipe();\n\t\ttry {\n\t\t\tawait closed;\n\t\t} catch {\n\t\t\t// ignored\n\t\t}\n\t\tworkerData.onTaskFinished();\n\t\tthrow error;\n\t}\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 { workerStartupTimeout } = config;\n\tif (!workerData.workerAlive && Number.isFinite(workerStartupTimeout) && workerStartupTimeout >= 0) {\n\t\tworkerData.startupTimeout = setTimeout(() => onStartupTimeout(workerData), workerStartupTimeout);\n\t}\n\ttry {\n\t\tconst resultValue = await result;\n\t\tawait closeWritable();\n\t\tawait closed;\n\t\treturn resultValue;\n\t} catch (error) {\n\t\tawait closeWritable();\n\t\tabortPipe();\n\t\ttry {\n\t\t\tawait closed;\n\t\t} catch {\n\t\t\t// ignored\n\t\t}\n\t\tconst { outputSize, workerOptions, destinationFailed, destinationError } = workerData;\n\t\tworkerOptions.outputSize = outputSize;\n\t\tconst workerFailed = isErrorObject(error) && (error.codecImportFailed || error.workerStartupFailed);\n\t\tconst reportedError = destinationFailed && !workerFailed ? destinationError : error;\n\t\tif (isErrorObject(reportedError)) {\n\t\t\ttry {\n\t\t\t\treportedError.outputSize = outputSize;\n\t\t\t} catch {\n\t\t\t\t// ignored\n\t\t\t}\n\t\t}\n\t\tthrow reportedError;\n\t}\n\n\tasync function closeWritable() {\n\t\tif (!streamsTransferred && !writable.locked) {\n\t\t\ttry {\n\t\t\t\tawait writable.getWriter().close();\n\t\t\t} catch {\n\t\t\t\t// ignored\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction watchClosedStream(writableSource, workerData) {\n\tconst abortController = new AbortController();\n\tlet aborting;\n\tconst { writable, readable } = new TransformStream({\n\t\ttransform(chunk, controller) {\n\t\t\tworkerData.outputSize += chunk.length;\n\t\t\tcontroller.enqueue(chunk);\n\t\t}\n\t});\n\tconst closed = readable.pipeTo(writableSource, { preventClose: true, preventAbort: true, signal: abortController.signal });\n\tclosed.catch(error => {\n\t\tif (!aborting) {\n\t\t\tObject.assign(workerData, { destinationFailed: true, destinationError: error });\n\t\t}\n\t});\n\tconst { signal } = workerData.workerOptions.streamOptions;\n\tif (signal) {\n\t\tconst onAbort = () => abortController.abort(signal.reason);\n\t\tconst removeAbortListener = () => signal.removeEventListener(ABORT_EVENT_TYPE, onAbort);\n\t\tsignal.addEventListener(ABORT_EVENT_TYPE, onAbort);\n\t\tclosed.then(removeAbortListener, removeAbortListener);\n\t}\n\treturn {\n\t\twritable, closed, abortPipe: () => {\n\t\t\taborting = true;\n\t\t\tabortController.abort();\n\t\t}\n\t};\n}\n\nfunction releaseWorkerStreams(workerData) {\n\tconst { reader } = workerData;\n\tif (reader) {\n\t\treader.releaseLock();\n\t}\n\tworkerData.reader = null;\n\tworkerData.writer = null;\n}\n\nfunction terminateWorker(workerData) {\n\tconst { worker } = workerData;\n\tif (worker) {\n\t\ttry {\n\t\t\tworker.terminate();\n\t\t} catch {\n\t\t\t// ignored\n\t\t}\n\t}\n\tworkerData.interface = null;\n}\n\nfunction getWebWorker(url, baseURI, workerData, isModuleType, useBlobURI = true) {\n\tconst { createWorker } = workerData;\n\tlet worker, resolvedURI, resolvedOptions;\n\tif (createWorker) {\n\t\tworker = createWorker();\n\t} else if (webWorkerURI === UNDEFINED_VALUE || webWorkerSource !== url) {\n\t\t// deno-lint-ignore valid-typeof\n\t\tconst isFunctionURI = typeof url == FUNCTION_TYPE;\n\t\tif (isFunctionURI) {\n\t\t\tresolvedURI = url(useBlobURI);\n\t\t} else {\n\t\t\tresolvedURI = url;\n\t\t}\n\t\tconst isDataURI = resolvedURI.startsWith(\"data:\");\n\t\tconst isBlobURI = resolvedURI.startsWith(\"blob:\");\n\t\tif (isDataURI || isBlobURI) {\n\t\t\tif (isModuleType === UNDEFINED_VALUE) {\n\t\t\t\tisModuleType = false;\n\t\t\t}\n\t\t\tif (isModuleType) {\n\t\t\t\tresolvedOptions = MODULE_WORKER_OPTIONS;\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tworker = new Worker(resolvedURI, resolvedOptions);\n\t\t\t} catch (error) {\n\t\t\t\tif (isBlobURI) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tURL.revokeObjectURL(resolvedURI);\n\t\t\t\t\t} catch {\n\t\t\t\t\t\t// ignored\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (isFunctionURI && isBlobURI) {\n\t\t\t\t\treturn getWebWorker(url, baseURI, workerData, isModuleType, false);\n\t\t\t\t} else if (!isModuleType) {\n\t\t\t\t\treturn getWebWorker(url, baseURI, workerData, true, false);\n\t\t\t\t} else {\n\t\t\t\t\tthrow error;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tif (isModuleType === UNDEFINED_VALUE) {\n\t\t\t\tisModuleType = true;\n\t\t\t}\n\t\t\tif (isModuleType) {\n\t\t\t\tresolvedOptions = MODULE_WORKER_OPTIONS;\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tresolvedURI = new URL(resolvedURI, baseURI);\n\t\t\t} catch {\n\t\t\t\t// ignored\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tworker = new Worker(resolvedURI, resolvedOptions);\n\t\t\t} catch (error) {\n\t\t\t\tif (isModuleType) {\n\t\t\t\t\treturn getWebWorker(url, baseURI, workerData, false, useBlobURI);\n\t\t\t\t} else {\n\t\t\t\t\tthrow error;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\twebWorkerSource = url;\n\t\twebWorkerURI = resolvedURI;\n\t\twebWorkerOptions = resolvedOptions;\n\t} else {\n\t\tworker = new Worker(webWorkerURI, webWorkerOptions);\n\t}\n\tworker.addEventListener(MESSAGE_EVENT_TYPE, event => {\n\t\tworkerData.workerAlive = true;\n\t\tclearStartupTimeout(workerData);\n\t\tonMessage(event, workerData);\n\t});\n\tworker.addEventListener(ERROR_EVENT_TYPE, event => onWorkerError(event, workerData));\n\tworker.addEventListener(MESSAGE_ERROR_EVENT_TYPE, event => onWorkerError(event, workerData));\n\treturn worker;\n}\n\nfunction onStartupTimeout(workerData) {\n\tworkerData.startupTimeout = null;\n\tif (workerData.workerAlive) {\n\t\treturn;\n\t}\n\tconst { rejectResult, writer } = workerData;\n\tterminateWorker(workerData);\n\tworkerData.worker = null;\n\tif (rejectResult) {\n\t\tconst error = new Error(ERR_WORKER_STARTUP_TIMEOUT);\n\t\terror.workerStartupFailed = true;\n\t\trejectResult(error);\n\t\tif (writer) {\n\t\t\twriter.releaseLock();\n\t\t}\n\t}\n}\n\nfunction clearStartupTimeout(workerData) {\n\tconst { startupTimeout } = workerData;\n\tif (startupTimeout) {\n\t\tclearTimeout(startupTimeout);\n\t\tworkerData.startupTimeout = null;\n\t}\n}\n\nfunction onWorkerError(event, workerData) {\n\tif (event.preventDefault) {\n\t\tevent.preventDefault();\n\t}\n\tclearStartupTimeout(workerData);\n\tconst { workerAlive, rejectResult, writer, onTaskFinished } = workerData;\n\tterminateWorker(workerData);\n\tif (!workerAlive) {\n\t\tworkerData.worker = null;\n\t}\n\tlet error = event.error || new Error(event.message || ERROR_EVENT_TYPE);\n\tif (!workerAlive) {\n\t\terror = Object.assign(new Error(error.message || ERROR_EVENT_TYPE), { workerStartupFailed: true });\n\t\tworkerData.startupError = error;\n\t}\n\tif (rejectResult) {\n\t\trejectResult(error);\n\t\tif (writer) {\n\t\t\twriter.releaseLock();\n\t\t}\n\t\tif (workerAlive) {\n\t\t\tonTaskFinished();\n\t\t}\n\t}\n}\n\nfunction sendMessage(message, { worker, writer, transferStreams, workerAlive }) {\n\ttry {\n\t\tconst { value, readable, writable } = message;\n\t\tconst transferables = [];\n\t\tif (value) {\n\t\t\tmessage.value = toExactUint8Array(value);\n\t\t\ttransferables.push(message.value.buffer);\n\t\t}\n\t\tif (transferStreams && transferStreamsSupported && workerAlive) {\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 {\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\tthrow error;\n\t}\n}\n\nasync function onMessage({ data }, workerData) {\n\tconst { type, value, messageId, result, error, errorValue } = data;\n\tconst { reader, writer, resolveResult, rejectResult, onTaskFinished, generation } = workerData;\n\tconst stale = () => workerData.generation != generation;\n\ttry {\n\t\tif (error) {\n\t\t\tfail(getResponseError(error, errorValue));\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\tif (!stale()) {\n\t\t\t\t\tsendMessage({ type: MESSAGE_DATA, value, done, messageId }, workerData);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (type == MESSAGE_DATA) {\n\t\t\t\tconst chunk = new Uint8Array(value);\n\t\t\t\tawait writer.ready;\n\t\t\t\tawait writer.write(chunk);\n\t\t\t\tif (!stale()) {\n\t\t\t\t\tsendMessage({ type: MESSAGE_ACK_DATA, messageId }, workerData);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (type == MESSAGE_CLOSE) {\n\t\t\t\tsucceed(result);\n\t\t\t}\n\t\t}\n\t} catch (error) {\n\t\tif (!stale()) {\n\t\t\tterminateWorker(workerData);\n\t\t\tfail(error);\n\t\t}\n\t}\n\n\tfunction fail(error) {\n\t\tif (!stale()) {\n\t\t\trejectResult(error);\n\t\t\treleaseWriter();\n\t\t\tif (!(isErrorObject(error) && error.codecImportFailed)) {\n\t\t\t\tonTaskFinished();\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction succeed(result) {\n\t\tif (!stale()) {\n\t\t\tresolveResult(result);\n\t\t\treleaseWriter();\n\t\t\tonTaskFinished();\n\t\t}\n\t}\n\n\tfunction releaseWriter() {\n\t\tif (writer) {\n\t\t\twriter.releaseLock();\n\t\t}\n\t}\n}\n\nfunction getResponseError(errorData, errorValue) {\n\tconst { message, stack, code, name, outputSize, cause, codecImportFailed } = errorData;\n\tlet responseError;\n\tif (errorValue) {\n\t\tresponseError = errorValue.value;\n\t} else {\n\t\tresponseError = Object.assign(new Error(message), { stack, code, name });\n\t}\n\tif (isErrorObject(responseError)) {\n\t\ttry {\n\t\t\tif (outputSize !== UNDEFINED_VALUE) {\n\t\t\t\tresponseError.outputSize = outputSize;\n\t\t\t}\n\t\t\tif (codecImportFailed) {\n\t\t\t\tresponseError.codecImportFailed = true;\n\t\t\t}\n\t\t\tif (cause) {\n\t\t\t\tif (!isErrorObject(responseError.cause)) {\n\t\t\t\t\tresponseError.cause = Object.assign(new Error(cause.message), { name: cause.name });\n\t\t\t\t}\n\t\t\t\tif (cause.code !== UNDEFINED_VALUE && responseError.cause.code !== cause.code) {\n\t\t\t\t\tresponseError.cause.code = cause.code;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (errorValue) {\n\t\t\t\tif (responseError.name !== name) {\n\t\t\t\t\tresponseError.name = name;\n\t\t\t\t}\n\t\t\t\tif (responseError.code !== code) {\n\t\t\t\t\tresponseError.code = code;\n\t\t\t\t}\n\t\t\t}\n\t\t} catch {\n\t\t\t// ignored\n\t\t}\n\t}\n\treturn responseError;\n}\n","/*\n Copyright (c) 2025 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 \"./core/codec-worker-web.js\";\n\nexport {\n\tZipReader,\n\tZipReaderStream,\n\tisZipFile,\n\tERR_BAD_FORMAT,\n\tERR_EOCDR_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_CRC32,\n\tERR_INVALID_AUTHENTICATION_CODE,\n\tERR_INVALID_UNCOMPRESSED_SIZE,\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_COMPRESSED_DATA,\n\tERR_CODEC_OUT_OF_MEMORY,\n\tERR_SPLIT_ZIP_FILE,\n\tERR_OVERLAPPING_ENTRY,\n\tERR_ENTRY_DATA_OUT_OF_BOUNDS,\n\tERR_AMBIGUOUS_ARCHIVE,\n\tERR_ENCRYPTED_CENTRAL_DIRECTORY,\n\tERR_UNSAFE_FILENAME,\n\tERR_INVALID_STRICTNESS,\n\tERR_INVALID_FILENAME_VALIDATION,\n\tERR_INVALID_MAX_APPENDED_DATA_SIZE,\n\tERR_UNSUPPORTED_UINT64,\n\tERR_WORKER_STARTUP_TIMEOUT,\n\tWARNING_UNSORTED_CENTRAL_DIRECTORY,\n\tWARNING_UNKNOWN_VERSION,\n\tWARNING_COMPRESSED_PATCHED_DATA,\n\tWARNING_MALFORMED_EXTRA_FIELD,\n\tWARNING_UNKNOWN_ZIP64_EXTENSIBLE_DATA,\n\tWARNING_WRAPPED_ENTRIES_COUNT,\n\tWARNING_APPENDED_DATA,\n\tWARNING_PREPENDED_DATA,\n\tWARNING_PREPENDED_CENTRAL_DIRECTORY,\n\tWARNING_TRAILING_CENTRAL_DIRECTORY_DATA,\n\tWARNING_DUPLICATE_FILENAME,\n\tWARNING_MISMATCHED_ZIP64_END_OF_CENTRAL_DIRECTORY,\n\tWARNING_MULTIPLE_END_OF_CENTRAL_DIRECTORY,\n\tWARNING_MISMATCHED_LOCAL_FILE_HEADER_FILENAME,\n\tWARNING_MISMATCHED_LOCAL_FILE_HEADER_BIT_FLAG,\n\tWARNING_MISMATCHED_LOCAL_FILE_HEADER_COMPRESSION_METHOD,\n\tWARNING_MISMATCHED_LOCAL_FILE_HEADER_CRC32_OR_SIZES\n} from \"./core/zip-reader.js\";","/*\n Copyright (c) 2025 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, WritableStream */\n// deno-lint-ignore-file no-this-alias\n\n/*\n * Internal state invariants\n *\n * Positions:\n * - `zipWriter.offset` is the logical write position: the offset where the next entry will start\n * in the final archive. It includes `zipWriter.initialOffset` (see below) and is only updated\n * between entries, or by the recovery code in getFileEntry() when a write fails mid-entry.\n * - `writer.size` counts the bytes actually written into the writer. Between entries,\n * `zipWriter.offset - writer.size` is constant and equals `initialOffset`.\n * - `zipWriter.initialOffset` is the number of bytes assumed to be prepended to the final archive\n * (i.e. to the first segment when the archive is split): the `offset` option minus the data\n * already stored in the writer. Positions within the first segment include it; positions within\n * the other segments do not, see getSegmentOffset().\n * - For split archives, `writer.diskOffset` is the total size of the closed segments and\n * `writer.diskNumber` the index of the current segment. `writer.availableSize` is the remaining\n * capacity of the current segment; `writer.closeDisk()` ends it, the next segment being opened\n * when more data is written. This is how header records are kept whole within a segment, as\n * required by APPNOTE section 8.5.2. These properties only exist on split writers; the\n * getDiskNumber(), getDiskOffset() and exceedsAvailableSize() accessors default them otherwise.\n * - The segment coordinates of an entry (`diskNumberStart` and `offset`) must be read after\n * calling skipDiskIfNeeded() and while holding the writer lock; they are unstable otherwise.\n *\n * Scheduling:\n * - The central directory order (i.e. the order in which entries are listed by getEntries()) is\n * the insertion order of the `fileEntries` map. addFile() reserves each entry's slot synchronously in\n * add() call order, before initializing the reader, so concurrent entries whose readers\n * initialize at different speeds are still listed in call order.\n * - `fileEntry.lockFileEntry` chains every entry to the previous one; awaiting it serializes the\n * physical writes when `keepOrder` is set. addFile() claims the link in the same synchronous\n * prologue as the central directory slot, so the physical layout follows the add() call order\n * as well, whatever the readers do. The lock is released for every entry, including the ones\n * failing before they reach getFileEntry().\n * - `zipWriter.lockWriter`/`writerLocked` is the mutex over the writer; only the holder may write\n * into it or read the position variables above.\n * - At most one entry is written directly into the writer at a time, every other one is buffered.\n * `bufferedWrites`/`directWrites` record the choice in the same synchronous block that makes it,\n * because `writerLocked` is only raised an await later: concurrent add() calls all decide before\n * that, and would all pick the direct path and then serialize on the previous entry's lock.\n * - Both write paths await the lock of the previous entry before requesting the writer lock.\n * Requesting it first would deadlock an entry written directly into the writer (i.e. without\n * being buffered) against a buffered predecessor, which needs that same lock to be flushed.\n * - `lastFileEntry` is the tail of the lock chain (the most recently added entry).\n *\n * Failures:\n * - When a write fails mid-entry, `zipWriter.offset` advances by the number of bytes written for\n * the entry so that the offsets of subsequent entries remain correct, and\n * `hasCorruptedEntries` is set on the ZipWriter.\n * - closeFile() does not update `zipWriter.offset`; the position of the central directory and of\n * the end of central directory records are derived from it.\n */\n\nimport {\n\tMAX_32_BITS,\n\tMAX_16_BITS,\n\tMAX_8_BITS,\n\tCOMPRESSION_METHOD_DEFLATE,\n\tCOMPRESSION_METHOD_DEFLATE_64,\n\tCOMPRESSION_METHOD_STORE,\n\tCOMPRESSION_METHOD_AES,\n\tSPLIT_ZIP_FILE_SIGNATURE,\n\tSPLIT_ZIP_FILE_SIGNATURE_LENGTH,\n\tLOCAL_FILE_HEADER_SIGNATURE,\n\tDATA_DESCRIPTOR_RECORD_SIGNATURE,\n\tDIGITAL_SIGNATURE_RECORD_SIGNATURE,\n\tCENTRAL_FILE_HEADER_SIGNATURE,\n\tCENTRAL_FILE_HEADER_LENGTH,\n\tEND_OF_CENTRAL_DIR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_SIGNATURE,\n\tDATA_DESCRIPTOR_RECORD_LENGTH,\n\tDATA_DESCRIPTOR_RECORD_ZIP_64_LENGTH,\n\tDATA_DESCRIPTOR_RECORD_SIGNATURE_LENGTH,\n\tEXTRAFIELD_TYPE_AES,\n\tEXTRAFIELD_TYPE_ZIP64,\n\tEXTRAFIELD_TYPE_EXTENDED_TIMESTAMP,\n\tEXTRAFIELD_TYPE_NTFS,\n\tEXTRAFIELD_TYPE_NTFS_TAG1,\n\tEXTRAFIELD_TYPE_USDZ,\n\tEXTRAFIELD_TYPE_INFOZIP,\n\tEXTRAFIELD_TYPE_UNIX,\n\tEND_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH,\n\tBITFLAG_ENCRYPTED,\n\tBITFLAG_DATA_DESCRIPTOR,\n\tBITFLAG_LANG_ENCODING_FLAG,\n\tBITFLAG_LEVEL,\n\tBITFLAG_LEVEL_FAST_MASK,\n\tBITFLAG_LEVEL_SUPER_FAST_MASK,\n\tBITFLAG_LEVEL_MAX_MASK,\n\tFILE_ATTR_MSDOS_DIR_MASK,\n\tFILE_ATTR_MSDOS_READONLY_MASK,\n\tFILE_ATTR_MSDOS_HIDDEN_MASK,\n\tFILE_ATTR_MSDOS_SYSTEM_MASK,\n\tFILE_ATTR_MSDOS_ARCHIVE_MASK,\n\tFILE_ATTR_UNIX_TYPE_DIR,\n\tFILE_ATTR_UNIX_TYPE_FILE,\n\tFILE_ATTR_UNIX_TYPE_MASK,\n\tFILE_ATTR_UNIX_TYPE_SYMLINK,\n\tFILE_ATTR_UNIX_EXECUTABLE_MASK,\n\tFILE_ATTR_UNIX_DEFAULT_MASK,\n\tFILE_ATTR_UNIX_SETUID_MASK,\n\tFILE_ATTR_UNIX_SETGID_MASK,\n\tFILE_ATTR_UNIX_STICKY_MASK,\n\tVERSION_STORE,\n\tVERSION_DEFLATE,\n\tVERSION_MADE_BY_MSDOS,\n\tVERSION_MADE_BY_UNIX,\n\tVERSION_ZIP64,\n\tVERSION_AES,\n\tDIRECTORY_SIGNATURE,\n\tHEADER_SIZE,\n\tHEADER_OFFSET_VERSION,\n\tHEADER_OFFSET_SIGNATURE,\n\tHEADER_OFFSET_COMPRESSED_SIZE,\n\tHEADER_OFFSET_UNCOMPRESSED_SIZE,\n\tHEADER_OFFSET_FILENAME_LENGTH,\n\tHEADER_OFFSET_EXTRAFIELD_LENGTH,\n\tLOCAL_HEADER_COMMON_OFFSET,\n\tMIN_DATE,\n\tMAX_DATE,\n\tUNDEFINED_VALUE,\n\tINFINITY_VALUE,\n\tOBJECT_TYPE,\n\tSTRING_TYPE,\n\tFUNCTION_TYPE,\n\tEMPTY_UINT8_ARRAY,\n\tSYMBOL_ASYNC_DISPOSE\n} from \"./constants.js\";\nimport { getConfiguration } from \"./configuration.js\";\nimport { getRegisteredCodec, ERR_UNSUPPORTED_COMPRESSION } from \"./codec-registry.js\";\nimport { supportsDeflate } from \"./codec-worker.js\";\nimport {\n\tCODEC_DEFLATE,\n\trunWorker,\n\tERR_UNSUPPORTED_CRYPTO_API\n} from \"./codec-pool.js\";\nimport {\n\tinitStream,\n\tcreateReadable,\n\treadUint8Array,\n\tGenericWriter,\n\tGenericReader,\n\tBlobReader,\n\townsWritable\n} from \"./io.js\";\nimport { encodeText } from \"./util/encode-text.js\";\nimport { concat, getDataView } from \"./util/array.js\";\nimport { addWarning } from \"./util/warnings.js\";\nimport { toCompatibleReadable, streamToBlob } from \"./util/compatible-streams.js\";\nimport { isErrorObject } from \"./util/error.js\";\nimport {\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_RAW_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_CREATION_DATE,\n\tPROPERTY_NAME_INTERNAL_FILE_ATTRIBUTES,\n\tPROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTES,\n\tPROPERTY_NAME_MS_DOS_COMPATIBLE,\n\tPROPERTY_NAME_ZIP64,\n\tPROPERTY_NAME_ENCRYPTED,\n\tPROPERTY_NAME_VERSION,\n\tPROPERTY_NAME_VERSION_MADE_BY,\n\tPROPERTY_NAME_ZIPCRYPTO,\n\tPROPERTY_NAME_DIRECTORY,\n\tPROPERTY_NAME_EXECUTABLE,\n\tPROPERTY_NAME_COMPRESSION_METHOD,\n\tPROPERTY_NAME_SIGNATURE,\n\tPROPERTY_NAME_COMMENT,\n\tPROPERTY_NAME_UNCOMPRESSED_SIZE,\n\tPROPERTY_NAME_EXTRA_FIELD,\n\tPROPERTY_NAME_UID,\n\tPROPERTY_NAME_GID,\n\tPROPERTY_NAME_UNIX_MODE,\n\tPROPERTY_NAME_SETUID,\n\tPROPERTY_NAME_SETGID,\n\tPROPERTY_NAME_STICKY,\n\tPROPERTY_NAME_MSDOS_ATTRIBUTES,\n\tPROPERTY_NAME_MSDOS_ATTRIBUTES_RAW,\n\tEntry,\n\tgetEncryptionOverhead,\n\tgetUserExtraField\n} from \"./zip-entry.js\";\nimport {\n\tOPTION_PASSWORD,\n\tOPTION_RAW_PASSWORD,\n\tOPTION_PASS_THROUGH,\n\tOPTION_SIGNAL,\n\tOPTION_USE_WEB_WORKERS,\n\tOPTION_USE_COMPRESSION_STREAM,\n\tOPTION_TRANSFER_STREAMS,\n\tOPTION_PREVENT_CLOSE,\n\tOPTION_ENCRYPTION_STRENGTH,\n\tOPTION_EXTENDED_TIMESTAMP,\n\tOPTION_NTFS_TIMESTAMP,\n\tOPTION_KEEP_ORDER,\n\tOPTION_LEVEL,\n\tOPTION_BUFFERED_WRITE,\n\tOPTION_CREATE_TEMP_STREAM,\n\tOPTION_DATA_DESCRIPTOR_SIGNATURE,\n\tOPTION_USE_UNICODE_FILE_NAMES,\n\tOPTION_DATA_DESCRIPTOR,\n\tOPTION_SUPPORT_ZIP64_SPLIT_FILE,\n\tOPTION_ENCODE_TEXT,\n\tOPTION_OFFSET,\n\tOPTION_USDZ,\n\tOPTION_UNIX_EXTRA_FIELD_TYPE,\n\tOPTION_LOCAL_EXTRA_FIELD,\n\tOPTION_CENTRAL_EXTRA_FIELD,\n\tOPTION_SIGN_CENTRAL_DIRECTORY,\n\tTEXT_TYPE_FILENAME,\n\tTEXT_TYPE_COMMENT,\n\tERR_INVALID_PASSWORD_TYPE,\n\tcheckFunctionOption,\n\tcheckSignalOption,\n\tthrowIfAborted,\n\tcheckPasswordOption,\n\tcheckPassThroughOption,\n\tcheckInteger,\n\tcheckIntegerOption,\n\ttoNumber,\n\tOPTION_ENTRY,\n\tPASS_THROUGH_COMPRESSED\n} from \"./options.js\";\n\nconst ERR_DUPLICATED_NAME = \"File already exists\";\nconst ERR_INVALID_COMMENT = \"Zip file comment exceeds 64KB\";\nconst ERR_INVALID_COMMENT_TYPE = \"Invalid zip file comment (must be a Uint8Array)\";\nconst ERR_INVALID_ENTRY_COMMENT = \"File entry comment exceeds 64KB\";\nconst ERR_INVALID_ENTRY_COMMENT_TYPE = \"Invalid file entry comment (must be a string)\";\nconst ERR_INVALID_DATE = \"Invalid date (must be a valid Date instance)\";\nconst ERR_INVALID_ENTRY_NAME = \"File entry name exceeds 64KB\";\nconst ERR_INVALID_VERSION = \"Version exceeds 65535\";\nconst ERR_INVALID_ENCRYPTION_STRENGTH = \"The strength must equal 1, 2, or 3\";\nconst ERR_UNSUPPORTED_ENCRYPTION_USDZ = \"Encryption is not supported in USDZ files\";\nconst ERR_UNSUPPORTED_SPLIT_USDZ = \"Split zip files are not supported in USDZ files\";\nconst ERR_UNSUPPORTED_ENCRYPTION_PASS_THROUGH = \"Encryption is not supported when the 'passThrough' option is set to true (use 'compressed' instead)\";\nconst ERR_INVALID_EXTRAFIELD = \"Invalid extra field (must be a Map)\";\nconst ERR_INVALID_EXTRAFIELD_TYPE = \"Invalid extra field type (must be integer 0..65535)\";\nconst ERR_INVALID_EXTRAFIELD_DATA_TYPE = \"Invalid extra field data (must be a Uint8Array)\";\nconst ERR_INVALID_EXTRAFIELD_DATA = \"Extra field data exceeds 64KB\";\nconst MIN_UNIX_TIME = -2147483648;\nconst MAX_UNIX_TIME = 2147483647;\nconst MIN_NTFS_TIME = BigInt(0);\nconst MAX_NTFS_TIME = BigInt(\"0x7fffffffffffffff\");\nconst ERR_UNSUPPORTED_FORMAT = \"Zip64 is not supported (set the 'zip64' option to 'true')\";\nconst ERR_UNDEFINED_UNCOMPRESSED_SIZE = \"Undefined uncompressed size\";\nconst ERR_UNDEFINED_COMPRESSION_METHOD = \"Undefined compression method\";\nconst ERR_UNDEFINED_CRC32 = \"Undefined CRC32\";\nconst ERR_UNDETERMINED_SIZE = \"Undetermined size\";\nconst ERR_UNDEFINED_READER = \"Undefined reader\";\nconst ERR_INVALID_READER = \"Invalid reader (must be a Reader instance, a ReadableStream instance, or an object with a 'readable' property)\";\nconst ERR_ZIP_NOT_EMPTY = \"Zip file not empty\";\nconst ERR_INVALID_UID = \"Invalid uid (must be integer 0..2^32-1)\";\nconst ERR_INVALID_GID = \"Invalid gid (must be integer 0..2^32-1)\";\nconst ERR_INVALID_UNIX_MODE = \"Invalid UNIX mode (must be integer 0..65535)\";\nconst ERR_INVALID_UNIX_EXTRA_FIELD_TYPE = \"Invalid unixExtraFieldType (must be 'infozip' or 'unix')\";\nconst ERR_INVALID_UNIX_ID_SIZE = \"uid/gid must be 0..65535 for unixExtraFieldType 'unix' (use 'infozip' for larger ids)\";\nconst ERR_INVALID_MSDOS_ATTRIBUTES = \"Invalid msdosAttributesRaw (must be integer 0..255)\";\nconst ERR_INVALID_MSDOS_DATA = \"Invalid msdosAttributes (must be an object with boolean flags)\";\nconst ERR_INVALID_LEVEL = \"Invalid level (must be integer 0..9)\";\nconst ERR_INVALID_SIGNATURE_DATA = \"Signature data exceeds 64KB\";\nconst ERR_INVALID_ENTRY = \"Invalid entry option (must be an entry returned by ZipReader#getEntries())\";\nconst ERR_ZIP_CRYPTO_LAST_MOD_DATE = \"The last modification date of an entry encrypted with ZipCrypto cannot be changed when passThrough is set\";\nconst WARNING_COMPRESSION_UNAVAILABLE = \"compression unavailable\";\nconst WARNING_CLAMPED_LAST_MODIFICATION_DATE = \"clamped last modification date\";\n\nconst EXTRAFIELD_DATA_AES = new Uint8Array([0x07, 0x00, 0x02, 0x00, 0x41, 0x45, 0x03, 0x00, 0x00]);\nconst EXTRAFIELD_OFFSET_AES_VENDOR_VERSION = 4;\nconst EXTRAFIELD_OFFSET_AES_COMPRESSION_METHOD = 9;\nconst EXTRAFIELD_USDZ_MAX_LENGTH = 67;\nconst MIN_PRINTABLE_ASCII_CHARACTER_CODE = 0x20;\nconst MAX_PRINTABLE_ASCII_CHARACTER_CODE = 0x7e;\nconst VENDOR_VERSION_AE_1 = 1;\nconst INFOZIP_EXTRA_FIELD_TYPE = \"infozip\";\nconst UNIX_EXTRA_FIELD_TYPE = \"unix\";\nconst LEVEL_BY_BITFLAG_LEVEL = [8, 9, 5, 3];\nconst MAX_LEVEL = 9;\n\nlet workers = 0;\nconst pendingEntries = [];\n\nclass ZipWriter {\n\n\tconstructor(writer, options = {}) {\n\t\twriter = new GenericWriter(writer);\n\t\tconst { availableSize = INFINITY_VALUE, maxSize = INFINITY_VALUE } = writer;\n\t\tconst addSplitZipSignature =\n\t\t\tavailableSize > 0 && availableSize !== INFINITY_VALUE &&\n\t\t\tmaxSize > 0 && maxSize !== INFINITY_VALUE;\n\t\tif (addSplitZipSignature && options[OPTION_USDZ]) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_SPLIT_USDZ);\n\t\t}\n\t\tObject.assign(this, {\n\t\t\twriter,\n\t\t\taddSplitZipSignature,\n\t\t\toptions,\n\t\t\tfileEntries: new Map(),\n\t\t\tfilenames: new Set(),\n\t\t\toffset: options[OPTION_OFFSET] === UNDEFINED_VALUE ? writer.size || writer.writable.size || 0 : options[OPTION_OFFSET],\n\t\t\tinitialOffset: options[OPTION_OFFSET] === UNDEFINED_VALUE ? 0 : options[OPTION_OFFSET] - (writer.size || writer.writable.size || 0),\n\t\t\tpendingAddFileCalls: new Set(),\n\t\t\tpendingErrors: [],\n\t\t\twarnings: [],\n\t\t\tbufferedWrites: 0,\n\t\t\tdirectWrites: 0,\n\t\t\tlastFileEntry: UNDEFINED_VALUE,\n\t\t\tarchiveClosed: false\n\t\t});\n\t}\n\n\tprependZip(reader) {\n\t\treturn watchPromiseError(this, prependZipEntries(this, reader));\n\t}\n\n\tappendZip(reader) {\n\t\treturn watchPromiseError(this, this.appendZipEntries(reader));\n\t}\n\n\tasync appendZipEntries(reader) {\n\t\tconst zipWriter = this;\n\t\tconst { pendingAddFileCalls, filenames, fileEntries } = zipWriter;\n\t\twhile (pendingAddFileCalls.size) {\n\t\t\tawait Promise.allSettled(Array.from(pendingAddFileCalls));\n\t\t}\n\t\tlet resolveAppendZip;\n\t\tconst promiseAppendZip = new Promise(resolve => resolveAppendZip = resolve);\n\t\tpendingAddFileCalls.add(promiseAppendZip);\n\t\tconst appendedFilenames = [];\n\t\tlet releaseLockWriter;\n\t\ttry {\n\t\t\treader = new GenericReader(reader);\n\t\t\tawait initStream(reader);\n\t\t\tif (reader.size === UNDEFINED_VALUE || !reader.readUint8Array) {\n\t\t\t\treader = new BlobReader(await streamToBlob(reader.readable));\n\t\t\t\tawait initStream(reader);\n\t\t\t}\n\t\t\tconst { ZipReader } = await import(\"./zip-reader.js\");\n\t\t\tconst zipReader = new ZipReader(reader);\n\t\t\tconst entries = await zipReader.getEntries();\n\t\t\tawait zipReader.close();\n\t\t\tawait initStream(zipWriter.writer);\n\t\t\tconst { directoryOffset } = zipReader;\n\t\t\tentries.forEach(({ filename }) => {\n\t\t\t\tif (filenames.has(filename)) {\n\t\t\t\t\tthrow new Error(ERR_DUPLICATED_NAME);\n\t\t\t\t}\n\t\t\t\tfilenames.add(filename);\n\t\t\t\tappendedFilenames.push(filename);\n\t\t\t});\n\t\t\tzipWriter.writerLocked = true;\n\t\t\tconst { lockWriter } = zipWriter;\n\t\t\tzipWriter.lockWriter = new Promise(resolve => releaseLockWriter = () => {\n\t\t\t\tzipWriter.writerLocked = false;\n\t\t\t\tresolve();\n\t\t\t});\n\t\t\tawait lockWriter;\n\t\t\tif (zipWriter.addSplitZipSignature) {\n\t\t\t\tdelete zipWriter.addSplitZipSignature;\n\t\t\t\tif (!await startsWithSplitZipSignature(reader)) {\n\t\t\t\t\tawait writeData(zipWriter.writer, getSplitZipSignatureArray());\n\t\t\t\t\tzipWriter.offset += SPLIT_ZIP_FILE_SIGNATURE_LENGTH;\n\t\t\t\t}\n\t\t\t}\n\t\t\tconst entryPositions = await copyZipData(zipWriter, reader, entries, directoryOffset);\n\t\t\tentries.forEach(entry => {\n\t\t\t\tconst {\n\t\t\t\t\tversion,\n\t\t\t\t\trawLastModDate,\n\t\t\t\t\trawFilename,\n\t\t\t\t\tbitFlag,\n\t\t\t\t\tencrypted,\n\t\t\t\t\tuncompressedSize,\n\t\t\t\t\tcompressedSize,\n\t\t\t\t\textraFieldZip64\n\t\t\t\t} = entry;\n\t\t\t\tlet {\n\t\t\t\t\tcompressionMethod,\n\t\t\t\t\trawExtraField,\n\t\t\t\t} = entry;\n\t\t\t\tconst { level, languageEncodingFlag, dataDescriptor } = bitFlag;\n\t\t\t\trawExtraField = removeExtraFieldZip64(rawExtraField || EMPTY_UINT8_ARRAY);\n\t\t\t\tif (entry.extraFieldAES) {\n\t\t\t\t\tcompressionMethod = COMPRESSION_METHOD_AES;\n\t\t\t\t}\n\t\t\t\tconst extraFieldLength = getLength(rawExtraField);\n\t\t\t\tconst zip64UncompressedSize = Boolean(extraFieldZip64) && extraFieldZip64.uncompressedSize !== UNDEFINED_VALUE;\n\t\t\t\tconst zip64CompressedSize = Boolean(extraFieldZip64) && extraFieldZip64.compressedSize !== UNDEFINED_VALUE;\n\t\t\t\tconst bitFlagValue = (getBitFlag(level, languageEncodingFlag, dataDescriptor, encrypted, compressionMethod) & ~BITFLAG_LEVEL) | (level << 1);\n\t\t\t\tconst {\n\t\t\t\t\theaderArray,\n\t\t\t\t\theaderView\n\t\t\t\t} = getHeaderArrayData({\n\t\t\t\t\tversion,\n\t\t\t\t\tbitFlag: bitFlagValue,\n\t\t\t\t\tcompressionMethod,\n\t\t\t\t\tuncompressedSize,\n\t\t\t\t\tcompressedSize,\n\t\t\t\t\trawLastModDate,\n\t\t\t\t\trawFilename,\n\t\t\t\t\tzip64CompressedSize,\n\t\t\t\t\tzip64UncompressedSize,\n\t\t\t\t\textraFieldLength\n\t\t\t\t});\n\t\t\t\tconst { crc32 } = entry;\n\t\t\t\tif (crc32 !== UNDEFINED_VALUE) {\n\t\t\t\t\tsetUint32(headerView, HEADER_OFFSET_SIGNATURE, crc32);\n\t\t\t\t}\n\t\t\t\tconst { offset, diskNumberStart } = entryPositions.get(entry);\n\t\t\t\tObject.assign(entry, {\n\t\t\t\t\tzip64Enabled: true,\n\t\t\t\t\tzip64UncompressedSize,\n\t\t\t\t\tzip64CompressedSize,\n\t\t\t\t\toffset,\n\t\t\t\t\tdiskNumberStart,\n\t\t\t\t\tzip64DiskNumberStart: false,\n\t\t\t\t\trawExtraFieldZip64: EMPTY_UINT8_ARRAY,\n\t\t\t\t\trawExtraFieldAES: EMPTY_UINT8_ARRAY,\n\t\t\t\t\trawExtraFieldExtendedTimestamp: EMPTY_UINT8_ARRAY,\n\t\t\t\t\trawExtraFieldNTFS: EMPTY_UINT8_ARRAY,\n\t\t\t\t\trawExtraFieldUnix: EMPTY_UINT8_ARRAY,\n\t\t\t\t\trawExtraField,\n\t\t\t\t\trawCentralExtraField: EMPTY_UINT8_ARRAY,\n\t\t\t\t\theaderArray,\n\t\t\t\t\theaderView\n\t\t\t\t});\n\t\t\t\tfileEntries.set(entry.filename, entry);\n\t\t\t});\n\t\t} catch (error) {\n\t\t\tappendedFilenames.forEach(filename => filenames.delete(filename));\n\t\t\tthrow error;\n\t\t} finally {\n\t\t\tresolveAppendZip();\n\t\t\tpendingAddFileCalls.delete(promiseAppendZip);\n\t\t\tif (releaseLockWriter) {\n\t\t\t\treleaseLockWriter();\n\t\t\t}\n\t\t}\n\t}\n\n\tadd(name = \"\", reader, options = {}) {\n\t\tconst zipWriter = this;\n\t\tconst { pendingAddFileCalls } = zipWriter;\n\t\tconst promiseAddFile = addFileEntry(zipWriter, name, reader, options);\n\t\tpendingAddFileCalls.add(promiseAddFile);\n\t\tconst deletePendingAddFileCall = () => pendingAddFileCalls.delete(promiseAddFile);\n\t\tPromise.prototype.then.call(promiseAddFile, deletePendingAddFileCall, deletePendingAddFileCall);\n\t\treturn watchPromiseError(zipWriter, promiseAddFile);\n\t}\n\n\tremove(entry) {\n\t\tconst { filenames, fileEntries } = this;\n\t\t// deno-lint-ignore valid-typeof\n\t\tif (typeof entry == STRING_TYPE) {\n\t\t\tentry = fileEntries.get(entry);\n\t\t}\n\t\tif (entry && entry.filename !== UNDEFINED_VALUE) {\n\t\t\tconst { filename } = entry;\n\t\t\tif (filenames.has(filename) && fileEntries.has(filename)) {\n\t\t\t\tfilenames.delete(filename);\n\t\t\t\tfileEntries.delete(filename);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}\n\n\tasync close(comment = EMPTY_UINT8_ARRAY, options = {}) {\n\t\tconst zipWriter = this;\n\t\tconst { pendingAddFileCalls, writer } = this;\n\t\tconst { writable } = writer;\n\t\tif (zipWriter.archiveClosed) {\n\t\t\treturn getWriterData(writer);\n\t\t}\n\t\tif (!(comment instanceof Uint8Array)) {\n\t\t\tthrow new Error(ERR_INVALID_COMMENT_TYPE);\n\t\t}\n\t\tif (getLength(comment) > MAX_16_BITS) {\n\t\t\tthrow new Error(ERR_INVALID_COMMENT);\n\t\t}\n\t\twhile (pendingAddFileCalls.size) {\n\t\t\tawait Promise.allSettled(Array.from(pendingAddFileCalls));\n\t\t}\n\t\tawait Promise.allSettled(zipWriter.pendingErrors.map(watcher => watcher.recorded));\n\t\tconst unobservedWatchers = zipWriter.pendingErrors.filter(watcher => watcher.failed && !watcher.observed);\n\t\tif (unobservedWatchers.length) {\n\t\t\tconst unobservedErrors = unobservedWatchers.map(watcher => watcher.error);\n\t\t\tunobservedWatchers.forEach(watcher => watcher.observed = true);\n\t\t\tconst [error] = unobservedErrors;\n\t\t\ttry {\n\t\t\t\terror.entryErrors = unobservedErrors;\n\t\t\t} catch {\n\t\t\t\t// ignored\n\t\t\t}\n\t\t\tthrow error;\n\t\t}\n\t\tawait closeFile(zipWriter, comment, options);\n\t\tzipWriter.archiveClosed = true;\n\t\tconst preventClose = !ownsWritable(writer) && getOptionValue(zipWriter, options, OPTION_PREVENT_CLOSE);\n\t\tif (!preventClose) {\n\t\t\tawait writable.getWriter().close();\n\t\t}\n\t\treturn getWriterData(writer);\n\t}\n\n\t[SYMBOL_ASYNC_DISPOSE]() {\n\t\treturn this.close();\n\t}\n}\n\nclass ZipWriterStream {\n\n\tconstructor(options = {}) {\n\t\tconst { readable, writable } = new TransformStream();\n\t\tthis.readable = readable;\n\t\tthis.zipWriter = new ZipWriter(writable, options);\n\t\tthis.pendingAddFileCalls = new Set();\n\t}\n\n\ttransform(path) {\n\t\tconst zipWriter = this.zipWriter;\n\t\tlet streamController;\n\t\tconst { readable, writable } = new TransformStream({\n\t\t\tstart(controller) {\n\t\t\t\tstreamController = controller;\n\t\t\t},\n\t\t\tflush: () => void closeArchive()\n\t\t});\n\t\twatchAddFileCall(this, this.zipWriter.add(path, readable), error => streamController.error(error));\n\t\treturn { readable: this.readable, writable };\n\n\t\tasync function closeArchive() {\n\t\t\ttry {\n\t\t\t\tawait zipWriter.close();\n\t\t\t} catch (error) {\n\t\t\t\tawait abortWritable(zipWriter, error);\n\t\t\t}\n\t\t}\n\t}\n\n\twritable(path) {\n\t\tlet streamController;\n\t\tconst { readable, writable } = new TransformStream({\n\t\t\tstart(controller) {\n\t\t\t\tstreamController = controller;\n\t\t\t}\n\t\t});\n\t\twatchAddFileCall(this, this.zipWriter.add(path, readable), error => streamController.error(error));\n\t\treturn writable;\n\t}\n\n\tasync close(comment = UNDEFINED_VALUE, options = {}) {\n\t\tconst { zipWriter } = this;\n\t\tconst results = await Promise.allSettled(Array.from(this.pendingAddFileCalls));\n\t\tconst entryErrors = results.filter(result => result.status == \"rejected\").map(result => result.reason);\n\t\tif (entryErrors.length) {\n\t\t\tconst [error] = entryErrors;\n\t\t\ttry {\n\t\t\t\terror.entryErrors = entryErrors;\n\t\t\t} catch {\n\t\t\t\t// ignored\n\t\t\t}\n\t\t\tawait abortWritable(zipWriter, error);\n\t\t\tthrow error;\n\t\t}\n\t\ttry {\n\t\t\treturn await zipWriter.close(comment, options);\n\t\t} catch (error) {\n\t\t\tawait abortWritable(zipWriter, error);\n\t\t\tthrow error;\n\t\t}\n\t}\n}\n\nclass WatchedPromise extends Promise {\n\n\tthen(onFulfilled, onRejected) {\n\t\tconst { watcher } = this;\n\t\tif (watcher) {\n\t\t\twatcher.observed = true;\n\t\t}\n\t\treturn super.then(onFulfilled, onRejected);\n\t}\n}\n\nfunction getWriterData(writer) {\n\treturn writer.getData ? writer.getData() : writer.writable;\n}\n\nfunction watchPromiseError(zipWriter, promise) {\n\tconst watchedPromise = new WatchedPromise((resolve, reject) => Promise.prototype.then.call(promise, resolve, reject));\n\tconst watcher = {};\n\twatchedPromise.watcher = watcher;\n\twatcher.recorded = Promise.prototype.then.call(watchedPromise, UNDEFINED_VALUE,\n\t\terror => Object.assign(watcher, { failed: true, error }));\n\tzipWriter.pendingErrors.push(watcher);\n\treturn watchedPromise;\n}\n\nasync function prependZipEntries(zipWriter, reader) {\n\tif (zipWriter.filenames.size) {\n\t\tthrow new Error(ERR_ZIP_NOT_EMPTY);\n\t}\n\tawait zipWriter.appendZipEntries(reader);\n}\n\nasync function addFileEntry(zipWriter, name, reader, options) {\n\toptions = Object.assign({}, options);\n\tconst entry = options[OPTION_ENTRY];\n\tif (entry !== UNDEFINED_VALUE) {\n\t\tconst { entryOptions, passThroughOptions } = getSourceEntryOptions(entry,\n\t\t\tcheckPassThroughOption(getOptionValue(zipWriter, options, OPTION_PASS_THROUGH)),\n\t\t\tgetOptionValue(zipWriter, options, PROPERTY_NAME_LAST_MODIFICATION_DATE));\n\t\tdelete options[OPTION_ENTRY];\n\t\toptions = Object.assign(entryOptions, passThroughOptions, options);\n\t}\n\tif (getOptionValue(zipWriter, options, PROPERTY_NAME_DIRECTORY) && !name.endsWith(DIRECTORY_SIGNATURE)) {\n\t\tname += DIRECTORY_SIGNATURE;\n\t}\n\tif (zipWriter.filenames.has(name)) {\n\t\tthrow new Error(ERR_DUPLICATED_NAME);\n\t}\n\tzipWriter.filenames.add(name);\n\tif (workers < getConfiguration().maxWorkers) {\n\t\tworkers++;\n\t} else {\n\t\tawait new Promise(resolve => pendingEntries.push(resolve));\n\t}\n\ttry {\n\t\treturn await addFile(zipWriter, name, reader, options);\n\t} catch (error) {\n\t\tzipWriter.filenames.delete(name);\n\t\tthrow error;\n\t} finally {\n\t\tconst pendingEntry = pendingEntries.shift();\n\t\tif (pendingEntry) {\n\t\t\tpendingEntry();\n\t\t} else {\n\t\t\tworkers--;\n\t\t}\n\t}\n}\n\nasync function abortWritable(zipWriter, error) {\n\ttry {\n\t\tawait zipWriter.writer.writable.abort(error);\n\t} catch {\n\t\t// ignored\n\t}\n}\n\nfunction watchAddFileCall(zipWriterStream, promiseAddFile, onerror) {\n\tzipWriterStream.pendingAddFileCalls.add(promiseAddFile);\n\tpromiseAddFile.catch(error => {\n\t\ttry {\n\t\t\tonerror(error);\n\t\t} catch {\n\t\t\t// ignored\n\t\t}\n\t});\n}\n\nexport {\n\tZipWriter,\n\tZipWriterStream,\n\tgetEntriesSize,\n\tgetSourceEntryOptions,\n\tERR_DUPLICATED_NAME,\n\tERR_INVALID_COMMENT,\n\tERR_INVALID_COMMENT_TYPE,\n\tERR_INVALID_ENTRY_NAME,\n\tERR_INVALID_ENTRY_COMMENT,\n\tERR_INVALID_ENTRY_COMMENT_TYPE,\n\tERR_INVALID_DATE,\n\tERR_INVALID_VERSION,\n\tERR_INVALID_EXTRAFIELD,\n\tERR_INVALID_EXTRAFIELD_TYPE,\n\tERR_INVALID_EXTRAFIELD_DATA_TYPE,\n\tERR_INVALID_EXTRAFIELD_DATA,\n\tERR_INVALID_ENCRYPTION_STRENGTH,\n\tERR_UNSUPPORTED_ENCRYPTION_USDZ,\n\tERR_UNSUPPORTED_SPLIT_USDZ,\n\tERR_UNSUPPORTED_ENCRYPTION_PASS_THROUGH,\n\tERR_UNSUPPORTED_FORMAT,\n\tERR_UNDEFINED_UNCOMPRESSED_SIZE,\n\tERR_UNDEFINED_COMPRESSION_METHOD,\n\tERR_UNDEFINED_CRC32,\n\tERR_UNDETERMINED_SIZE,\n\tERR_UNDEFINED_READER,\n\tERR_INVALID_READER,\n\tERR_ZIP_NOT_EMPTY,\n\tERR_INVALID_SIGNATURE_DATA,\n\tERR_INVALID_ENTRY,\n\tERR_ZIP_CRYPTO_LAST_MOD_DATE,\n\tERR_INVALID_UID,\n\tERR_INVALID_GID,\n\tERR_INVALID_UNIX_MODE,\n\tERR_INVALID_UNIX_EXTRA_FIELD_TYPE,\n\tERR_INVALID_UNIX_ID_SIZE,\n\tERR_INVALID_MSDOS_ATTRIBUTES,\n\tERR_INVALID_MSDOS_DATA,\n\tERR_INVALID_LEVEL,\n\tERR_INVALID_PASSWORD_TYPE,\n\tERR_UNSUPPORTED_CRYPTO_API,\n\tWARNING_COMPRESSION_UNAVAILABLE,\n\tWARNING_CLAMPED_LAST_MODIFICATION_DATE\n};\n\nasync function addFile(zipWriter, name, reader, options) {\n\tconst attributesInfo = resolveAttributes(zipWriter, name, options);\n\t({ name } = attributesInfo);\n\tconst metadataInfo = resolveMetadata(zipWriter, name, options);\n\tconst { comment } = metadataInfo;\n\tconst extraField = options[PROPERTY_NAME_EXTRA_FIELD];\n\tzipWriter.fileEntries.set(name, UNDEFINED_VALUE);\n\tconst previousFileEntry = zipWriter.lastFileEntry;\n\tconst pendingFileEntry = {};\n\tlet releaseLockFileEntry;\n\tif (metadataInfo.resolvedOptions.keepOrder) {\n\t\tpendingFileEntry.lockFileEntry = new Promise(resolve => releaseLockFileEntry = resolve);\n\t}\n\tzipWriter.lastFileEntry = pendingFileEntry;\n\tlet fileEntry;\n\ttry {\n\t\tconst { resolvedOptions } = metadataInfo;\n\t\tif (resolvedOptions.level != 0 && resolvedOptions.compressionMethod === UNDEFINED_VALUE &&\n\t\t\t!resolvedOptions.passThroughCompression && !(await supportsDeflate(getConfiguration()))) {\n\t\t\tresolvedOptions.level = 0;\n\t\t\taddWarning(zipWriter.warnings, WARNING_COMPRESSION_UNAVAILABLE, name);\n\t\t}\n\t\tconst sizesInfo = await resolveSizes(zipWriter, reader, metadataInfo, options);\n\t\t({ reader } = sizesInfo);\n\t\tconst diskOffset = getDiskOffset(zipWriter.writer);\n\t\tconst diskNumber = getDiskNumber(zipWriter.writer);\n\t\tlet crc32 = options.crc32 === UNDEFINED_VALUE ? options[PROPERTY_NAME_SIGNATURE] : options.crc32;\n\t\tconst storesAE2 = sizesInfo.resolvedOptions.encrypted && !resolvedOptions.zipCrypto;\n\t\tif (resolvedOptions.passThroughCompression && !resolvedOptions.passThroughEncryption && storesAE2) {\n\t\t\tcrc32 = UNDEFINED_VALUE;\n\t\t}\n\t\tif (resolvedOptions.passThroughCompression && reader && !storesAE2 && crc32 === UNDEFINED_VALUE) {\n\t\t\tthrow new Error(ERR_UNDEFINED_CRC32);\n\t\t}\n\t\toptions = Object.assign({}, options, attributesInfo.resolvedOptions, metadataInfo.resolvedOptions, sizesInfo.resolvedOptions, {\n\t\t\tsignature: options[PROPERTY_NAME_SIGNATURE],\n\t\t\tcrc32,\n\t\t\toffset: zipWriter.offset - diskOffset,\n\t\t\tdiskNumberStart: diskNumber,\n\t\t\t[OPTION_USDZ]: zipWriter.options[OPTION_USDZ]\n\t\t});\n\t\tconst headerInfo = getHeaderInfo(options);\n\t\tif (headerInfo.lastModDateClamped) {\n\t\t\taddWarning(zipWriter.warnings, WARNING_CLAMPED_LAST_MODIFICATION_DATE, name);\n\t\t}\n\t\tconst dataDescriptorInfo = getDataDescriptorInfo(options);\n\t\tconst metadataSize = getLength(headerInfo.localHeaderArray, dataDescriptorInfo.dataDescriptorArray);\n\t\tfileEntry = await getFileEntry(zipWriter, name, reader, {\n\t\t\theaderInfo,\n\t\t\tdataDescriptorInfo,\n\t\t\tmetadataSize,\n\t\t\tfileEntry: pendingFileEntry,\n\t\t\tpreviousFileEntry,\n\t\t\treleaseLockFileEntry\n\t\t}, options);\n\t} catch (error) {\n\t\tzipWriter.fileEntries.delete(name);\n\t\tthrow error;\n\t} finally {\n\t\tif (releaseLockFileEntry) {\n\t\t\treleaseLockFileEntry(previousFileEntry && previousFileEntry.lockFileEntry);\n\t\t}\n\t}\n\tObject.assign(fileEntry, {\n\t\tname,\n\t\tcomment,\n\t\textraField\n\t});\n\treturn new Entry(fileEntry);\n}\n\nfunction getSourceEntryOptions(entry, passThrough, lastModDateOverride) {\n\tif (entry === null || typeof entry != OBJECT_TYPE || Array.isArray(entry)) {\n\t\tthrow new Error(ERR_INVALID_ENTRY);\n\t}\n\tconst {\n\t\texternalFileAttributes,\n\t\tversionMadeBy,\n\t\tcomment,\n\t\tlastModDate,\n\t\trawLastModDate,\n\t\tcreationDate,\n\t\tlastAccessDate,\n\t\tuncompressedSize,\n\t\tencrypted,\n\t\tzipCrypto,\n\t\tcrc32,\n\t\tcompressionMethod,\n\t\textraFieldAES,\n\t\textraFieldUnix,\n\t\tinternalFileAttributes,\n\t\textraField,\n\t\tbitFlag,\n\t\tdirectory,\n\t\tuid,\n\t\tgid\n\t} = entry;\n\tconst entryOptions = {\n\t\texternalFileAttributes,\n\t\tversionMadeBy,\n\t\tcomment,\n\t\tlastModDate,\n\t\tcreationDate,\n\t\tlastAccessDate,\n\t\tinternalFileAttributes,\n\t\tdirectory\n\t};\n\tif (bitFlag && bitFlag.languageEncodingFlag) {\n\t\tentryOptions[OPTION_USE_UNICODE_FILE_NAMES] = true;\n\t}\n\tconst userExtraField = getUserExtraField(extraField);\n\tif (userExtraField) {\n\t\tentryOptions[PROPERTY_NAME_EXTRA_FIELD] = userExtraField;\n\t}\n\tif (uid !== UNDEFINED_VALUE || gid !== UNDEFINED_VALUE) {\n\t\tObject.assign(entryOptions, {\n\t\t\tuid,\n\t\t\tgid,\n\t\t\tunixExtraFieldType: extraFieldUnix ? UNIX_EXTRA_FIELD_TYPE : INFOZIP_EXTRA_FIELD_TYPE\n\t\t});\n\t}\n\tconst passThroughOptions = {};\n\tif (passThrough && !directory) {\n\t\tObject.assign(passThroughOptions, {\n\t\t\tuncompressedSize,\n\t\t\tcrc32,\n\t\t\tcompressionMethod\n\t\t});\n\t\tif (passThrough !== PASS_THROUGH_COMPRESSED) {\n\t\t\tObject.assign(passThroughOptions, {\n\t\t\t\tencrypted,\n\t\t\t\tzipCrypto,\n\t\t\t\tencryptionStrength: extraFieldAES ? extraFieldAES.strength : UNDEFINED_VALUE\n\t\t\t});\n\t\t}\n\t\tif (bitFlag) {\n\t\t\tpassThroughOptions.dataDescriptor = bitFlag.dataDescriptor;\n\t\t\tpassThroughOptions[OPTION_LEVEL] = LEVEL_BY_BITFLAG_LEVEL[bitFlag.level];\n\t\t}\n\t\tif (lastModDateOverride === UNDEFINED_VALUE) {\n\t\t\tpassThroughOptions.rawLastModDate = rawLastModDate;\n\t\t} else if (passThrough !== PASS_THROUGH_COMPRESSED && zipCrypto && (!bitFlag || bitFlag.dataDescriptor) &&\n\t\t\tlastModDateOverride instanceof Date &&\n\t\t\tgetDosTimeHighByte(lastModDateOverride) != ((rawLastModDate >>> 8) & MAX_8_BITS)) {\n\t\t\tthrow new Error(ERR_ZIP_CRYPTO_LAST_MOD_DATE);\n\t\t}\n\t}\n\treturn { entryOptions, passThroughOptions };\n}\n\nfunction getDosTimeHighByte(lastModDate) {\n\tlet dosLastModDate = new Date(Math.ceil(Math.floor(lastModDate.getTime() / 1000) / 2) * 2000);\n\tif (dosLastModDate < MIN_DATE) {\n\t\tdosLastModDate = MIN_DATE;\n\t} else if (dosLastModDate > MAX_DATE) {\n\t\tdosLastModDate = MAX_DATE;\n\t}\n\treturn ((dosLastModDate.getHours() << 3) | (dosLastModDate.getMinutes() >> 3)) & MAX_8_BITS;\n}\n\nfunction resolveAttributes(zipWriter, name, options) {\n\tlet msDosCompatible = getOptionValue(zipWriter, options, PROPERTY_NAME_MS_DOS_COMPATIBLE);\n\tlet versionMadeBy = getOptionValue(zipWriter, options, PROPERTY_NAME_VERSION_MADE_BY, msDosCompatible ? VERSION_MADE_BY_MSDOS : VERSION_MADE_BY_UNIX);\n\tconst executable = getOptionValue(zipWriter, options, PROPERTY_NAME_EXECUTABLE);\n\tconst uid = getNumberOptionValue(zipWriter, options, PROPERTY_NAME_UID);\n\tconst gid = getNumberOptionValue(zipWriter, options, PROPERTY_NAME_GID);\n\tlet unixMode = getNumberOptionValue(zipWriter, options, PROPERTY_NAME_UNIX_MODE);\n\tlet unixExtraFieldType = getOptionValue(zipWriter, options, OPTION_UNIX_EXTRA_FIELD_TYPE);\n\tlet setuid = getOptionValue(zipWriter, options, PROPERTY_NAME_SETUID);\n\tlet setgid = getOptionValue(zipWriter, options, PROPERTY_NAME_SETGID);\n\tlet sticky = getOptionValue(zipWriter, options, PROPERTY_NAME_STICKY);\n\tcheckIntegerOption(uid, MAX_32_BITS, ERR_INVALID_UID);\n\tcheckIntegerOption(gid, MAX_32_BITS, ERR_INVALID_GID);\n\tcheckIntegerOption(unixMode, MAX_16_BITS, ERR_INVALID_UNIX_MODE);\n\tif (unixExtraFieldType !== UNDEFINED_VALUE && unixExtraFieldType !== INFOZIP_EXTRA_FIELD_TYPE && unixExtraFieldType !== UNIX_EXTRA_FIELD_TYPE) {\n\t\tthrow new Error(ERR_INVALID_UNIX_EXTRA_FIELD_TYPE);\n\t}\n\tif (unixExtraFieldType === UNIX_EXTRA_FIELD_TYPE &&\n\t\t((uid !== UNDEFINED_VALUE && uid > MAX_16_BITS) || (gid !== UNDEFINED_VALUE && gid > MAX_16_BITS))) {\n\t\tthrow new Error(ERR_INVALID_UNIX_ID_SIZE);\n\t}\n\tif (unixExtraFieldType === UNDEFINED_VALUE && (uid !== UNDEFINED_VALUE || gid !== UNDEFINED_VALUE)) {\n\t\tunixExtraFieldType = INFOZIP_EXTRA_FIELD_TYPE;\n\t}\n\tlet msdosAttributesRaw = getNumberOptionValue(zipWriter, options, PROPERTY_NAME_MSDOS_ATTRIBUTES_RAW);\n\tlet msdosAttributes = getOptionValue(zipWriter, options, PROPERTY_NAME_MSDOS_ATTRIBUTES);\n\tconst hasUnixMetadata = uid !== UNDEFINED_VALUE || gid !== UNDEFINED_VALUE || unixMode !== UNDEFINED_VALUE || unixExtraFieldType || executable;\n\tconst hasMsDosProvided = msdosAttributesRaw !== UNDEFINED_VALUE || msdosAttributes !== UNDEFINED_VALUE;\n\tif (hasUnixMetadata) {\n\t\tmsDosCompatible = false;\n\t\tversionMadeBy = (versionMadeBy & MAX_8_BITS) | VERSION_MADE_BY_UNIX;\n\t} else if (hasMsDosProvided) {\n\t\tmsDosCompatible = true;\n\t\tversionMadeBy = (versionMadeBy & MAX_8_BITS);\n\t}\n\tcheckIntegerOption(msdosAttributesRaw, MAX_8_BITS, ERR_INVALID_MSDOS_ATTRIBUTES);\n\tif (msdosAttributes && (typeof msdosAttributes !== OBJECT_TYPE || Array.isArray(msdosAttributes))) {\n\t\tthrow new Error(ERR_INVALID_MSDOS_DATA);\n\t}\n\tif (versionMadeBy > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_VERSION);\n\t}\n\tlet externalFileAttributes = getOptionValue(zipWriter, options, PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTES);\n\tconst externalFileAttributesProvided = externalFileAttributes !== UNDEFINED_VALUE;\n\tif (!externalFileAttributesProvided) {\n\t\texternalFileAttributes = 0;\n\t}\n\tif (!options[PROPERTY_NAME_DIRECTORY] && name.endsWith(DIRECTORY_SIGNATURE)) {\n\t\toptions[PROPERTY_NAME_DIRECTORY] = true;\n\t}\n\tconst directory = getOptionValue(zipWriter, options, PROPERTY_NAME_DIRECTORY);\n\tif (directory) {\n\t\tif (!name.endsWith(DIRECTORY_SIGNATURE)) {\n\t\t\tname += DIRECTORY_SIGNATURE;\n\t\t}\n\t\tif (!externalFileAttributesProvided) {\n\t\t\texternalFileAttributes = FILE_ATTR_MSDOS_DIR_MASK;\n\t\t\tif (!msDosCompatible) {\n\t\t\t\texternalFileAttributes |= (FILE_ATTR_UNIX_TYPE_DIR | FILE_ATTR_UNIX_EXECUTABLE_MASK | FILE_ATTR_UNIX_DEFAULT_MASK) << 16;\n\t\t\t}\n\t\t}\n\t} else if (!msDosCompatible && !externalFileAttributesProvided) {\n\t\tif (executable) {\n\t\t\texternalFileAttributes = (FILE_ATTR_UNIX_EXECUTABLE_MASK | FILE_ATTR_UNIX_DEFAULT_MASK) << 16;\n\t\t} else {\n\t\t\texternalFileAttributes = FILE_ATTR_UNIX_DEFAULT_MASK << 16;\n\t\t}\n\t}\n\tif (!msDosCompatible) {\n\t\tconst unixModeProvided = unixMode !== UNDEFINED_VALUE || Boolean(setuid || setgid || sticky);\n\t\tconst defaultUnixMode = (externalFileAttributes >> 16) & MAX_16_BITS;\n\t\tunixMode = unixMode === UNDEFINED_VALUE ? defaultUnixMode : (unixMode & MAX_16_BITS);\n\t\tif (setuid) {\n\t\t\tunixMode |= FILE_ATTR_UNIX_SETUID_MASK;\n\t\t} else {\n\t\t\tsetuid = Boolean(unixMode & FILE_ATTR_UNIX_SETUID_MASK);\n\t\t}\n\t\tif (setgid) {\n\t\t\tunixMode |= FILE_ATTR_UNIX_SETGID_MASK;\n\t\t} else {\n\t\t\tsetgid = Boolean(unixMode & FILE_ATTR_UNIX_SETGID_MASK);\n\t\t}\n\t\tif (sticky) {\n\t\t\tunixMode |= FILE_ATTR_UNIX_STICKY_MASK;\n\t\t} else {\n\t\t\tsticky = Boolean(unixMode & FILE_ATTR_UNIX_STICKY_MASK);\n\t\t}\n\t\tif (!externalFileAttributesProvided || unixModeProvided) {\n\t\t\tif (directory) {\n\t\t\t\tunixMode = (unixMode & ~FILE_ATTR_UNIX_TYPE_MASK) | FILE_ATTR_UNIX_TYPE_DIR;\n\t\t\t} else if (!(unixMode & FILE_ATTR_UNIX_TYPE_MASK)) {\n\t\t\t\tunixMode |= FILE_ATTR_UNIX_TYPE_FILE;\n\t\t\t}\n\t\t\texternalFileAttributes = ((unixMode & MAX_16_BITS) << 16) | (externalFileAttributes & MAX_16_BITS);\n\t\t}\n\t}\n\t({ msdosAttributesRaw, msdosAttributes } = normalizeMsdosAttributes(msdosAttributesRaw, msdosAttributes));\n\tif (hasMsDosProvided) {\n\t\texternalFileAttributes = (externalFileAttributes & MAX_32_BITS) | (msdosAttributesRaw & MAX_8_BITS);\n\t}\n\tconst unixExternalUpper = (externalFileAttributes >> 16) & MAX_16_BITS;\n\tconst symlink = unixMode !== UNDEFINED_VALUE && ((unixMode & FILE_ATTR_UNIX_TYPE_MASK) == FILE_ATTR_UNIX_TYPE_SYMLINK);\n\treturn {\n\t\tname,\n\t\tresolvedOptions: {\n\t\t\tversionMadeBy,\n\t\t\tmsDosCompatible: Boolean(msDosCompatible),\n\t\t\texternalFileAttributes,\n\t\t\tunixExternalUpper,\n\t\t\tuid,\n\t\t\tgid,\n\t\t\tunixMode,\n\t\t\tunixExtraFieldType,\n\t\t\tsymlink,\n\t\t\tsetuid,\n\t\t\tsetgid,\n\t\t\tsticky,\n\t\t\tmsdosAttributesRaw,\n\t\t\tmsdosAttributes\n\t\t}\n\t};\n}\n\nfunction resolveMetadata(zipWriter, name, options) {\n\tconst encode = getFunctionOptionValue(zipWriter, options, OPTION_ENCODE_TEXT) || encodeText;\n\tlet rawFilename = encode(name, TEXT_TYPE_FILENAME);\n\tif (rawFilename === UNDEFINED_VALUE) {\n\t\trawFilename = encodeText(name);\n\t}\n\tif (getLength(rawFilename) > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_ENTRY_NAME);\n\t}\n\tconst comment = options[PROPERTY_NAME_COMMENT] || \"\";\n\t// deno-lint-ignore valid-typeof\n\tif (typeof comment != STRING_TYPE) {\n\t\tthrow new Error(ERR_INVALID_ENTRY_COMMENT_TYPE);\n\t}\n\tlet rawComment = encode(comment, TEXT_TYPE_COMMENT);\n\tif (rawComment === UNDEFINED_VALUE) {\n\t\trawComment = encodeText(comment);\n\t}\n\tif (getLength(rawComment) > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_ENTRY_COMMENT);\n\t}\n\tconst version = getOptionValue(zipWriter, options, PROPERTY_NAME_VERSION);\n\tif (version !== UNDEFINED_VALUE && version > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_VERSION);\n\t}\n\tconst lastModDate = getDateOptionValue(zipWriter, options, PROPERTY_NAME_LAST_MODIFICATION_DATE, new Date());\n\tconst rawLastModDate = getOptionValue(zipWriter, options, PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE);\n\tconst lastAccessDate = getDateOptionValue(zipWriter, options, PROPERTY_NAME_LAST_ACCESS_DATE);\n\tconst creationDate = getDateOptionValue(zipWriter, options, PROPERTY_NAME_CREATION_DATE);\n\tconst internalFileAttributes = getOptionValue(zipWriter, options, PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTES, 0);\n\tconst passThrough = checkPassThroughOption(getOptionValue(zipWriter, options, OPTION_PASS_THROUGH));\n\tconst passThroughCompression = Boolean(passThrough);\n\tconst passThroughEncryption = passThrough === true;\n\tlet password = getOptionValue(zipWriter, options, OPTION_PASSWORD);\n\tlet rawPassword = getOptionValue(zipWriter, options, OPTION_RAW_PASSWORD);\n\tcheckPasswordOption(password, rawPassword);\n\tpassword = password && password.length ? password : UNDEFINED_VALUE;\n\trawPassword = rawPassword && rawPassword.length ? rawPassword : UNDEFINED_VALUE;\n\tconst encryptionStrength = getNumberOptionValue(zipWriter, options, OPTION_ENCRYPTION_STRENGTH, 3);\n\tconst zipCrypto = getOptionValue(zipWriter, options, PROPERTY_NAME_ZIPCRYPTO);\n\tconst extendedTimestamp = getOptionValue(zipWriter, options, OPTION_EXTENDED_TIMESTAMP, true);\n\tconst ntfsTimestamp = getOptionValue(zipWriter, options, OPTION_NTFS_TIMESTAMP);\n\tconst keepOrder = getOptionValue(zipWriter, options, OPTION_KEEP_ORDER, true);\n\tconst useWebWorkers = getOptionValue(zipWriter, options, OPTION_USE_WEB_WORKERS);\n\tconst transferStreams = getOptionValue(zipWriter, options, OPTION_TRANSFER_STREAMS);\n\tconst bufferedWrite = getOptionValue(zipWriter, options, OPTION_BUFFERED_WRITE);\n\tconst createTempStream = getFunctionOptionValue(zipWriter, options, OPTION_CREATE_TEMP_STREAM);\n\tconst dataDescriptorSignature = getOptionValue(zipWriter, options, OPTION_DATA_DESCRIPTOR_SIGNATURE, true);\n\tconst signal = checkSignalOption(getOptionValue(zipWriter, options, OPTION_SIGNAL));\n\tthrowIfAborted(signal);\n\tconst useUnicodeFileNames = getOptionValue(zipWriter, options, OPTION_USE_UNICODE_FILE_NAMES,\n\t\t!isPrintableASCIIText(rawFilename) || !isPrintableASCIIText(rawComment));\n\tconst compressionMethod = getOptionValue(zipWriter, options, PROPERTY_NAME_COMPRESSION_METHOD);\n\tconst registeredCodec = passThroughCompression || compressionMethod === UNDEFINED_VALUE ? UNDEFINED_VALUE : getRegisteredCodec(compressionMethod);\n\tif (!passThroughCompression && compressionMethod !== UNDEFINED_VALUE &&\n\t\tcompressionMethod !== COMPRESSION_METHOD_STORE && compressionMethod !== COMPRESSION_METHOD_DEFLATE && !registeredCodec) {\n\t\tthrow new Error(ERR_UNSUPPORTED_COMPRESSION);\n\t}\n\tlet level = getNumberOptionValue(zipWriter, options, OPTION_LEVEL);\n\tcheckIntegerOption(level, MAX_LEVEL, ERR_INVALID_LEVEL);\n\tif (zipWriter.options[OPTION_USDZ]) {\n\t\tif (password !== UNDEFINED_VALUE || rawPassword !== UNDEFINED_VALUE) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_ENCRYPTION_USDZ);\n\t\t}\n\t\tif (level === UNDEFINED_VALUE && compressionMethod === UNDEFINED_VALUE) {\n\t\t\tlevel = 0;\n\t\t}\n\t}\n\tif (passThroughCompression) {\n\t\tlevel = toNumber(options[OPTION_LEVEL]);\n\t}\n\tlet useCompressionStream = getOptionValue(zipWriter, options, OPTION_USE_COMPRESSION_STREAM);\n\tlet dataDescriptor = getOptionValue(zipWriter, options, OPTION_DATA_DESCRIPTOR);\n\tif (bufferedWrite && dataDescriptor === UNDEFINED_VALUE) {\n\t\tdataDescriptor = false;\n\t}\n\tif (dataDescriptor === UNDEFINED_VALUE || (zipCrypto && !passThroughEncryption)) {\n\t\tdataDescriptor = true;\n\t}\n\tif (level !== UNDEFINED_VALUE && level != 6) {\n\t\tuseCompressionStream = false;\n\t}\n\tconst zip64 = getOptionValue(zipWriter, options, PROPERTY_NAME_ZIP64);\n\tif (!zipCrypto && (password !== UNDEFINED_VALUE || rawPassword !== UNDEFINED_VALUE) && !(Number.isInteger(encryptionStrength) && encryptionStrength >= 1 && encryptionStrength <= 3)) {\n\t\tthrow new Error(ERR_INVALID_ENCRYPTION_STRENGTH);\n\t}\n\tconst rawExtraField = serializeExtraField(options[PROPERTY_NAME_EXTRA_FIELD]);\n\tconst rawLocalExtraField = serializeExtraField(options[OPTION_LOCAL_EXTRA_FIELD]);\n\tconst rawCentralExtraField = serializeExtraField(options[OPTION_CENTRAL_EXTRA_FIELD]);\n\treturn {\n\t\tcomment,\n\t\tresolvedOptions: {\n\t\t\trawFilename,\n\t\t\trawComment,\n\t\t\tversion,\n\t\t\tlastModDate,\n\t\t\trawLastModDate,\n\t\t\tlastAccessDate,\n\t\t\tcreationDate,\n\t\t\tinternalFileAttributes,\n\t\t\tpassThroughCompression,\n\t\t\tpassThroughEncryption,\n\t\t\tpassword,\n\t\t\trawPassword,\n\t\t\tencryptionStrength,\n\t\t\tzipCrypto,\n\t\t\textendedTimestamp,\n\t\t\tntfsTimestamp,\n\t\t\tkeepOrder,\n\t\t\tuseWebWorkers,\n\t\t\ttransferStreams,\n\t\t\tbufferedWrite,\n\t\t\tcreateTempStream,\n\t\t\tdataDescriptorSignature,\n\t\t\tsignal,\n\t\t\tuseUnicodeFileNames,\n\t\t\tcompressionMethod,\n\t\t\tformat: registeredCodec ? registeredCodec.format : UNDEFINED_VALUE,\n\t\t\tcodecURI: registeredCodec ? registeredCodec.codecURI : UNDEFINED_VALUE,\n\t\t\tcodecVersionNeeded: registeredCodec ? registeredCodec.versionNeeded : UNDEFINED_VALUE,\n\t\t\tlevel,\n\t\t\tuseCompressionStream,\n\t\t\tdataDescriptor,\n\t\t\tzip64,\n\t\t\trawExtraField,\n\t\t\trawLocalExtraField,\n\t\t\trawCentralExtraField\n\t\t}\n\t};\n}\n\nfunction serializeExtraField(extraField) {\n\tif (!extraField) {\n\t\treturn EMPTY_UINT8_ARRAY;\n\t}\n\tif (!(extraField instanceof Map)) {\n\t\tthrow new Error(ERR_INVALID_EXTRAFIELD);\n\t}\n\tlet extraFieldSize = 0;\n\tlet offset = 0;\n\textraField.forEach((data, type) => {\n\t\tcheckInteger(type, MAX_16_BITS, ERR_INVALID_EXTRAFIELD_TYPE);\n\t\tif (!(data instanceof Uint8Array)) {\n\t\t\tthrow new Error(ERR_INVALID_EXTRAFIELD_DATA_TYPE);\n\t\t}\n\t\tif (getLength(data) > MAX_16_BITS) {\n\t\t\tthrow new Error(ERR_INVALID_EXTRAFIELD_DATA);\n\t\t}\n\t\textraFieldSize += 4 + getLength(data);\n\t});\n\tconst rawExtraField = new Uint8Array(extraFieldSize);\n\tconst rawExtraFieldView = getDataView(rawExtraField);\n\textraField.forEach((data, type) => {\n\t\tsetUint16(rawExtraFieldView, offset, type);\n\t\tsetUint16(rawExtraFieldView, offset + 2, getLength(data));\n\t\tarraySet(rawExtraField, data, offset + 4);\n\t\toffset += 4 + getLength(data);\n\t});\n\treturn rawExtraField;\n}\n\nasync function resolveSizes(zipWriter, reader, { resolvedOptions: metadata }, options) {\n\tif (metadata.passThroughCompression && !reader && !getOptionValue(zipWriter, options, PROPERTY_NAME_DIRECTORY)) {\n\t\tthrow new Error(ERR_UNDEFINED_READER);\n\t}\n\tlet contentSize;\n\tif (reader) {\n\t\treader = new GenericReader(reader);\n\t\tawait initStream(reader);\n\t\tif (!reader.readable && !reader.readUint8Array) {\n\t\t\tthrow new Error(ERR_INVALID_READER);\n\t\t}\n\t\t({ size: contentSize } = reader);\n\t}\n\treturn Object.assign({ reader }, resolveEntrySizes(zipWriter, Boolean(reader), contentSize, metadata, options));\n}\n\nfunction resolveEntrySizes(zipWriter, hasContent, contentSize, metadata, options) {\n\tconst { passThroughCompression, passThroughEncryption, zipCrypto, password, rawPassword, encryptionStrength } = metadata;\n\tlet { dataDescriptor, zip64, level, compressionMethod } = metadata;\n\tlet maximumCompressedSize = 0;\n\tlet uncompressedSize = 0;\n\tlet unknownSize = false;\n\tif (passThroughCompression && hasContent) {\n\t\tuncompressedSize = options[PROPERTY_NAME_UNCOMPRESSED_SIZE];\n\t\tif (uncompressedSize === UNDEFINED_VALUE) {\n\t\t\tthrow new Error(ERR_UNDEFINED_UNCOMPRESSED_SIZE);\n\t\t}\n\t\tif (compressionMethod === UNDEFINED_VALUE) {\n\t\t\tthrow new Error(ERR_UNDEFINED_COMPRESSION_METHOD);\n\t\t}\n\t}\n\tconst zip64Enabled = zip64 === true;\n\tconst encrypted = getOptionValue(zipWriter, options, PROPERTY_NAME_ENCRYPTED);\n\tif (hasContent && passThroughEncryption && !encrypted && getLength(password, rawPassword)) {\n\t\tthrow new Error(ERR_UNSUPPORTED_ENCRYPTION_PASS_THROUGH);\n\t}\n\tconst encryptedEntry = hasContent && (Boolean((password && getLength(password)) || (rawPassword && getLength(rawPassword))) || (passThroughEncryption && encrypted));\n\tif (!hasContent) {\n\t\tlevel = 0;\n\t\tcompressionMethod = COMPRESSION_METHOD_STORE;\n\t}\n\tconst encryptionOverhead = getEncryptionOverhead(encryptedEntry, zipCrypto, encryptionStrength);\n\tif (hasContent) {\n\t\tif (!passThroughCompression) {\n\t\t\tif (contentSize === UNDEFINED_VALUE) {\n\t\t\t\tdataDescriptor = true;\n\t\t\t\tif (zip64 || zip64 === UNDEFINED_VALUE) {\n\t\t\t\t\tzip64 = unknownSize = true;\n\t\t\t\t\tmaximumCompressedSize = MAX_32_BITS + 1;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\toptions.uncompressedSize = uncompressedSize = contentSize;\n\t\t\t\tmaximumCompressedSize = (isCompressed(compressionMethod, level) ? getMaximumCompressedSize(uncompressedSize) : uncompressedSize) + encryptionOverhead;\n\t\t\t}\n\t\t} else {\n\t\t\toptions.uncompressedSize = uncompressedSize;\n\t\t\tmaximumCompressedSize = contentSize === UNDEFINED_VALUE ?\n\t\t\t\tgetMaximumCompressedSize(uncompressedSize) + encryptionOverhead :\n\t\t\t\tcontentSize + (passThroughEncryption ? 0 : encryptionOverhead);\n\t\t}\n\t}\n\tconst emptyEntry = !encryptedEntry && (!hasContent || (contentSize === 0 && !passThroughCompression)) && !isCompressed(compressionMethod, level);\n\tif (emptyEntry && getOptionValue(zipWriter, options, OPTION_DATA_DESCRIPTOR) === UNDEFINED_VALUE) {\n\t\tdataDescriptor = false;\n\t}\n\tconst zip64UncompressedSize = zip64Enabled || unknownSize || uncompressedSize >= MAX_32_BITS;\n\tconst zip64CompressedSize = zip64Enabled || maximumCompressedSize >= MAX_32_BITS;\n\tif (zip64UncompressedSize || zip64CompressedSize) {\n\t\tif (zip64 === false) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_FORMAT);\n\t\t} else {\n\t\t\tzip64 = true;\n\t\t}\n\t}\n\tzip64 = zip64 || false;\n\treturn {\n\t\tmaximumCompressedSize,\n\t\tresolvedOptions: {\n\t\t\tdataDescriptor,\n\t\t\temptyEntry,\n\t\t\tzip64,\n\t\t\tzip64Enabled,\n\t\t\tunknownSize,\n\t\t\tzip64UncompressedSize,\n\t\t\tzip64CompressedSize,\n\t\t\tuncompressedSize,\n\t\t\tlevel,\n\t\t\tcompressionMethod,\n\t\t\tencrypted: encryptedEntry\n\t\t}\n\t};\n}\n\nasync function getEntriesSize(writerOptions, entries, writeOrderGuaranteed, comment) {\n\tconst zipWriter = { options: writerOptions };\n\tif (checkFunctionOption(writerOptions[OPTION_SIGN_CENTRAL_DIRECTORY])) {\n\t\tthrow new Error(ERR_UNDETERMINED_SIZE);\n\t}\n\tif (comment !== UNDEFINED_VALUE && !(comment instanceof Uint8Array)) {\n\t\tthrow new Error(ERR_INVALID_COMMENT_TYPE);\n\t}\n\tconst commentLength = getLength(comment);\n\tif (commentLength > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_COMMENT);\n\t}\n\tconst usdz = writerOptions[OPTION_USDZ];\n\tconst files = new Map();\n\tconst initialOffset = writerOptions[OPTION_OFFSET] === UNDEFINED_VALUE ? 0 : writerOptions[OPTION_OFFSET];\n\tlet offset = initialOffset;\n\tlet minimumEntrySize = INFINITY_VALUE;\n\tconst entrySizes = [];\n\tconst entriesAlreadyZip64 = new Set();\n\tfor (const entry of entries) {\n\t\tlet { name } = entry;\n\t\tconst { size } = entry;\n\t\tconst options = Object.assign({}, entry.options);\n\t\tif (getOptionValue(zipWriter, options, PROPERTY_NAME_DIRECTORY) && !name.endsWith(DIRECTORY_SIGNATURE)) {\n\t\t\tname += DIRECTORY_SIGNATURE;\n\t\t}\n\t\tconst attributesInfo = resolveAttributes(zipWriter, name, options);\n\t\t({ name } = attributesInfo);\n\t\tconst { resolvedOptions: metadata } = resolveMetadata(zipWriter, name, options);\n\t\tif (metadata.level != 0 && metadata.compressionMethod === UNDEFINED_VALUE &&\n\t\t\t!metadata.passThroughCompression && !(await supportsDeflate(getConfiguration()))) {\n\t\t\tmetadata.level = 0;\n\t\t}\n\t\tconst hasContent = !getOptionValue(zipWriter, options, PROPERTY_NAME_DIRECTORY);\n\t\tif (hasContent && size === UNDEFINED_VALUE) {\n\t\t\tthrow new Error(ERR_UNDETERMINED_SIZE);\n\t\t}\n\t\tconst { maximumCompressedSize, resolvedOptions: sizes } = resolveEntrySizes(zipWriter, hasContent, size, metadata, options);\n\t\tif (hasContent && !metadata.passThroughCompression && isCompressed(sizes.compressionMethod, sizes.level)) {\n\t\t\tthrow new Error(ERR_UNDETERMINED_SIZE);\n\t\t}\n\t\tconst entryOptions = Object.assign({}, options, attributesInfo.resolvedOptions, metadata, sizes, { [OPTION_USDZ]: usdz });\n\t\tconst headerInfo = getHeaderInfo(entryOptions);\n\t\tconst dataDescriptorInfo = getDataDescriptorInfo(entryOptions);\n\t\tconst entryInfo = {\n\t\t\theaderInfo,\n\t\t\tmetadataSize: getLength(headerInfo.localHeaderArray, dataDescriptorInfo.dataDescriptorArray)\n\t\t};\n\t\tif (usdz) {\n\t\t\tappendExtraFieldUSDZ(entryInfo, offset);\n\t\t}\n\t\tconst compressedSize = hasContent ? maximumCompressedSize : 0;\n\t\tfiles.set(name, Object.assign({}, entryOptions, headerInfo, {\n\t\t\toffset,\n\t\t\tdiskNumberStart: 0,\n\t\t\tcompressedSize\n\t\t}));\n\t\tconst entrySize = entryInfo.metadataSize + compressedSize;\n\t\tentrySizes.push(entrySize);\n\t\tentriesAlreadyZip64.add(Boolean(entryOptions.zip64Enabled ||\n\t\t\tentryOptions.uncompressedSize >= MAX_32_BITS || compressedSize >= MAX_32_BITS));\n\t\tminimumEntrySize = Math.min(minimumEntrySize, entrySize);\n\t\toffset += entrySize;\n\t}\n\tconst layoutDependsOnWriteOrder = files.size > 1 && (usdz ||\n\t\t(offset - minimumEntrySize >= MAX_32_BITS &&\n\t\t\t(entriesAlreadyZip64.size > 1 || countEntriesBefore4GB(entrySizes, initialOffset, true) != countEntriesBefore4GB(entrySizes, initialOffset, false))));\n\tif (layoutDependsOnWriteOrder && !writeOrderGuaranteed) {\n\t\tthrow new Error(ERR_UNDETERMINED_SIZE);\n\t}\n\tconst { directoryDataLength, zip64Entries } = createDirectoryRecords(files);\n\tlet zip64 = getOptionValue(zipWriter, writerOptions, PROPERTY_NAME_ZIP64);\n\tif (offset >= MAX_32_BITS || directoryDataLength >= MAX_32_BITS || files.size >= MAX_16_BITS) {\n\t\tif (zip64 === false) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_FORMAT);\n\t\t} else {\n\t\t\tzip64 = true;\n\t\t}\n\t} else if (zip64 === UNDEFINED_VALUE && zip64Entries) {\n\t\tzip64 = true;\n\t}\n\treturn offset - initialOffset + directoryDataLength + commentLength + (zip64 ? ZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH : END_OF_CENTRAL_DIR_LENGTH);\n}\n\nfunction countEntriesBefore4GB(entrySizes, initialOffset, largestFirst) {\n\tconst ordered = entrySizes.slice().sort((first, second) => largestFirst ? second - first : first - second);\n\tlet position = initialOffset;\n\tlet count = 0;\n\tfor (const entrySize of ordered) {\n\t\tif (position >= MAX_32_BITS) {\n\t\t\tbreak;\n\t\t}\n\t\tposition += entrySize;\n\t\tcount++;\n\t}\n\treturn count;\n}\n\nasync function getFileEntry(zipWriter, name, reader, entryInfo, options) {\n\tconst {\n\t\tfileEntries,\n\t\twriter\n\t} = zipWriter;\n\tconst {\n\t\tkeepOrder,\n\t\tdataDescriptor,\n\t\temptyEntry,\n\t\tsignal\n\t} = options;\n\tconst {\n\t\theaderInfo,\n\t\tfileEntry: pendingFileEntry,\n\t\tpreviousFileEntry,\n\t\treleaseLockFileEntry\n\t} = entryInfo;\n\tconst usdz = zipWriter.options[OPTION_USDZ];\n\tlet fileEntry = pendingFileEntry;\n\tlet bufferedWrite;\n\tlet directWrite;\n\tlet releaseLockWriter;\n\tlet writingBufferedEntryData;\n\tlet writingEntryData;\n\tlet writerSizeBeforeEntry;\n\tlet flushedBufferedSize = 0;\n\tlet fileWriter;\n\tconst lockPreviousFileEntry = keepOrder && previousFileEntry ? previousFileEntry.lockFileEntry : UNDEFINED_VALUE;\n\tfileEntries.set(name, fileEntry);\n\ttry {\n\t\tif (options.bufferedWrite || !keepOrder || zipWriter.writerLocked || zipWriter.bufferedWrites || zipWriter.directWrites || (!dataDescriptor && !emptyEntry)) {\n\t\t\tbufferedWrite = true;\n\t\t\tzipWriter.bufferedWrites++;\n\t\t\tif (options.createTempStream) {\n\t\t\t\tfileWriter = await options.createTempStream();\n\t\t\t} else {\n\t\t\t\tfileWriter = new TransformStream(UNDEFINED_VALUE, UNDEFINED_VALUE, { highWaterMark: INFINITY_VALUE });\n\t\t\t}\n\t\t\tfileWriter.size = 0;\n\t\t\tawait initStream(writer);\n\t\t} else {\n\t\t\tdirectWrite = true;\n\t\t\tzipWriter.directWrites++;\n\t\t\tfileWriter = writer;\n\t\t\tawait lockPreviousFileEntry;\n\t\t\tawait requestLockWriter();\n\t\t}\n\t\tawait initStream(fileWriter);\n\t\tconst diskOffset = getDiskOffset(writer);\n\t\tif (zipWriter.addSplitZipSignature && !bufferedWrite) {\n\t\t\tawait writeSplitZipSignature(zipWriter, writer);\n\t\t}\n\t\tif (usdz && !bufferedWrite) {\n\t\t\tappendExtraFieldUSDZ(entryInfo, zipWriter.offset - diskOffset);\n\t\t}\n\t\tconst { localHeaderArray } = headerInfo;\n\t\tif (!bufferedWrite) {\n\t\t\tawait skipDiskIfNeeded();\n\t\t}\n\t\tconst diskNumberStart = getDiskNumber(writer);\n\t\tconst entryOffset = getSegmentOffset(zipWriter, writer);\n\t\tfileEntry.diskNumberStart = diskNumberStart;\n\t\tif (!bufferedWrite) {\n\t\t\twritingEntryData = true;\n\t\t\twriterSizeBeforeEntry = writer.size;\n\t\t\tawait writeData(fileWriter, localHeaderArray);\n\t\t}\n\t\tfileEntry = await createFileEntry(reader, fileWriter, fileEntry, entryInfo, getConfiguration(), options);\n\t\tif (!bufferedWrite) {\n\t\t\twritingEntryData = false;\n\t\t}\n\t\tfileEntries.set(name, fileEntry);\n\t\tfileEntry.filename = name;\n\t\tif (bufferedWrite) {\n\t\t\tawait Promise.all([fileWriter.writable.getWriter().close(), lockPreviousFileEntry]);\n\t\t\tawait requestLockWriter();\n\t\t\tif (zipWriter.addSplitZipSignature) {\n\t\t\t\tawait writeSplitZipSignature(zipWriter, writer);\n\t\t\t}\n\t\t\twritingBufferedEntryData = true;\n\t\t\twriterSizeBeforeEntry = writer.size;\n\t\t\tawait skipDiskIfNeeded();\n\t\t\tfileEntry.diskNumberStart = getDiskNumber(writer);\n\t\t\tfileEntry.offset = getSegmentOffset(zipWriter, writer);\n\t\t\tif (usdz) {\n\t\t\t\tconst previousMetadataSize = entryInfo.metadataSize;\n\t\t\t\tappendExtraFieldUSDZ(entryInfo, zipWriter.offset - getDiskOffset(writer));\n\t\t\t\tfileEntry.size += entryInfo.metadataSize - previousMetadataSize;\n\t\t\t}\n\t\t\tupdateLocalHeader(fileEntry, headerInfo.localHeaderView, options);\n\t\t\tawait writeData(writer, headerInfo.localHeaderArray);\n\t\t\tawait flushBufferedData(fileWriter.readable, writer, signal, chunkLength => flushedBufferedSize += chunkLength);\n\t\t\twriter.size += fileWriter.size;\n\t\t\twritingBufferedEntryData = false;\n\t\t} else {\n\t\t\tfileEntry.diskNumberStart = diskNumberStart;\n\t\t\tfileEntry.offset = entryOffset;\n\t\t}\n\t\tzipWriter.offset += fileEntry.size;\n\t\treturn fileEntry;\n\t} catch (error) {\n\t\tif (writingBufferedEntryData || writingEntryData) {\n\t\t\tzipWriter.hasCorruptedEntries = true;\n\t\t\tif (error) {\n\t\t\t\ttry {\n\t\t\t\t\terror.corruptedEntry = true;\n\t\t\t\t} catch {\n\t\t\t\t\t// ignored\n\t\t\t\t}\n\t\t\t}\n\t\t\tzipWriter.offset += writer.size - writerSizeBeforeEntry;\n\t\t\tif (bufferedWrite) {\n\t\t\t\tzipWriter.offset += flushedBufferedSize;\n\t\t\t}\n\t\t}\n\t\tfileEntries.delete(name);\n\t\tthrow error;\n\t} finally {\n\t\tif (bufferedWrite) {\n\t\t\tzipWriter.bufferedWrites--;\n\t\t}\n\t\tif (directWrite) {\n\t\t\tzipWriter.directWrites--;\n\t\t}\n\t\tif (releaseLockFileEntry) {\n\t\t\treleaseLockFileEntry(lockPreviousFileEntry);\n\t\t}\n\t\tif (releaseLockWriter) {\n\t\t\treleaseLockWriter();\n\t\t}\n\t\tif (bufferedWrite && fileWriter && fileWriter.dispose) {\n\t\t\ttry {\n\t\t\t\tawait fileWriter.dispose();\n\t\t\t} catch {\n\t\t\t\t// ignored\n\t\t\t}\n\t\t}\n\t}\n\n\tasync function requestLockWriter() {\n\t\tzipWriter.writerLocked = true;\n\t\tconst { lockWriter } = zipWriter;\n\t\tzipWriter.lockWriter = new Promise(resolve => releaseLockWriter = () => {\n\t\t\tzipWriter.writerLocked = false;\n\t\t\tresolve();\n\t\t});\n\t\tawait lockWriter;\n\t}\n\n\tasync function skipDiskIfNeeded() {\n\t\tif (exceedsAvailableSize(writer, getLength(headerInfo.localHeaderArray))) {\n\t\t\tawait writer.closeDisk();\n\t\t}\n\t}\n}\n\nasync function createFileEntry(reader, writer, { diskNumberStart, lockFileEntry }, entryInfo, config, options) {\n\tconst {\n\t\theaderInfo,\n\t\tdataDescriptorInfo,\n\t\tmetadataSize\n\t} = entryInfo;\n\tconst {\n\t\theaderArray,\n\t\theaderView,\n\t\tlastModDate,\n\t\trawLastModDate,\n\t\tencrypted,\n\t\tcompressed,\n\t\tversion,\n\t\tcompressionMethod,\n\t\trawExtraFieldZip64,\n\t\tlocalExtraFieldZip64Length,\n\t\trawExtraFieldExtendedTimestamp,\n\t\textraFieldExtendedTimestampFlag,\n\t\textraFieldExtendedTimestampTime,\n\t\trawExtraFieldNTFS,\n\t\trawExtraFieldUnix,\n\t\trawExtraFieldAES,\n\t} = headerInfo;\n\tconst { dataDescriptorArray } = dataDescriptorInfo;\n\tconst {\n\t\trawFilename,\n\t\tlastAccessDate,\n\t\tcreationDate,\n\t\tpassword,\n\t\trawPassword,\n\t\tlevel,\n\t\tuseUnicodeFileNames,\n\t\tzip64,\n\t\tzip64Enabled,\n\t\tzip64UncompressedSize,\n\t\tzip64CompressedSize,\n\t\tzipCrypto,\n\t\tdataDescriptor,\n\t\tdirectory,\n\t\texecutable,\n\t\tversionMadeBy,\n\t\trawComment,\n\t\trawExtraField,\n\t\trawCentralExtraField,\n\t\tuseWebWorkers,\n\t\ttransferStreams,\n\t\tonstart,\n\t\tonprogress,\n\t\tonend,\n\t\tsignal,\n\t\tencryptionStrength,\n\t\textendedTimestamp,\n\t\tmsDosCompatible,\n\t\tinternalFileAttributes,\n\t\texternalFileAttributes,\n\t\tuid,\n\t\tgid,\n\t\tunixMode,\n\t\tsymlink,\n\t\tsetuid,\n\t\tsetgid,\n\t\tsticky,\n\t\tunixExternalUpper,\n\t\tmsdosAttributesRaw,\n\t\tmsdosAttributes,\n\t\tuseCompressionStream,\n\t\tpassThroughCompression,\n\t\tpassThroughEncryption,\n\t\tformat,\n\t\tcodecURI\n\t} = options;\n\tconst fileEntry = {\n\t\tlockFileEntry,\n\t\tversionMadeBy,\n\t\tzip64,\n\t\tzip64Enabled,\n\t\tdirectory: Boolean(directory),\n\t\texecutable: Boolean(executable),\n\t\tfilenameUTF8: Boolean(useUnicodeFileNames),\n\t\trawFilename,\n\t\tcommentUTF8: Boolean(useUnicodeFileNames),\n\t\trawComment,\n\t\trawExtraFieldZip64,\n\t\tlocalExtraFieldZip64Length,\n\t\trawExtraFieldExtendedTimestamp,\n\t\trawExtraFieldNTFS,\n\t\trawExtraFieldUnix,\n\t\trawExtraFieldAES,\n\t\trawExtraField,\n\t\trawCentralExtraField,\n\t\textendedTimestamp,\n\t\tmsDosCompatible,\n\t\tinternalFileAttributes,\n\t\texternalFileAttributes,\n\t\tdiskNumberStart,\n\t\tuid,\n\t\tgid,\n\t\tunixMode,\n\t\tsymlink: Boolean(symlink),\n\t\tsetuid,\n\t\tsetgid,\n\t\tsticky,\n\t\tunixExternalUpper,\n\t\tmsdosAttributesRaw,\n\t\tmsdosAttributes\n\t};\n\tlet {\n\t\tcrc32,\n\t\tuncompressedSize\n\t} = options;\n\tlet compressedSize = 0;\n\tif (!passThroughCompression) {\n\t\tuncompressedSize = 0;\n\t}\n\tconst { writable } = writer;\n\tif (reader) {\n\t\tconst size = reader.size;\n\t\tconst readable = toCompatibleReadable(createReadable(reader, { size }));\n\t\tconst workerOptions = {\n\t\t\toptions: {\n\t\t\t\tcodecType: CODEC_DEFLATE,\n\t\t\t\tinputSize: size,\n\t\t\t\tlevel,\n\t\t\t\trawPassword,\n\t\t\t\tpassword,\n\t\t\t\tencryptionStrength,\n\t\t\t\tzipCrypto: encrypted && zipCrypto,\n\t\t\t\tpasswordVerification: encrypted && zipCrypto && (rawLastModDate >> 8) & MAX_8_BITS,\n\t\t\t\tcomputeCrc32: !passThroughCompression,\n\t\t\t\tcompressed: compressed && !passThroughCompression,\n\t\t\t\tencrypted: encrypted && !passThroughEncryption,\n\t\t\t\tuseWebWorkers,\n\t\t\t\tuseCompressionStream,\n\t\t\t\ttransferStreams,\n\t\t\t\tformat,\n\t\t\t\tcodecURI,\n\t\t\t\tcompressionMethod\n\t\t\t},\n\t\t\tconfig,\n\t\t\tstreamOptions: { signal, size, onstart, onprogress, onend }\n\t\t};\n\t\ttry {\n\t\t\tconst result = await runWorker({ readable, writable }, workerOptions);\n\t\t\tcompressedSize = result.outputSize;\n\t\t\twriter.size += compressedSize;\n\t\t\tthrowIfAborted(signal);\n\t\t\tif (!passThroughCompression) {\n\t\t\t\tuncompressedSize = result.inputSize;\n\t\t\t\tif (!encrypted || zipCrypto) {\n\t\t\t\t\tcrc32 = result.crc32;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ((!zip64CompressedSize && compressedSize >= MAX_32_BITS) ||\n\t\t\t\t(!zip64UncompressedSize && uncompressedSize >= MAX_32_BITS)) {\n\t\t\t\tthrow new Error(ERR_UNSUPPORTED_FORMAT);\n\t\t\t}\n\t\t} catch (error) {\n\t\t\tconst { outputSize: failedOutputSize } = workerOptions;\n\t\t\tif (failedOutputSize !== UNDEFINED_VALUE) {\n\t\t\t\twriter.size += failedOutputSize;\n\t\t\t} else if (isErrorObject(error) && error.outputSize !== UNDEFINED_VALUE) {\n\t\t\t\twriter.size += error.outputSize;\n\t\t\t}\n\t\t\tthrow error;\n\t\t}\n\n\t}\n\tsetEntryInfo({\n\t\tcrc32,\n\t\tcompressedSize,\n\t\tuncompressedSize,\n\t\theaderInfo,\n\t\tdataDescriptorInfo\n\t}, options);\n\tif (dataDescriptor) {\n\t\tawait writeData(writer, dataDescriptorArray);\n\t}\n\tObject.assign(fileEntry, {\n\t\tuncompressedSize,\n\t\tcompressedSize,\n\t\tlastModDate,\n\t\trawLastModDate,\n\t\tcreationDate,\n\t\tlastAccessDate,\n\t\tencrypted: Boolean(encrypted),\n\t\tzipCrypto: Boolean(zipCrypto),\n\t\tsize: metadataSize + compressedSize,\n\t\tcompressionMethod,\n\t\tversion,\n\t\theaderArray,\n\t\theaderView,\n\t\tsignature: crc32,\n\t\tcrc32: encrypted && !zipCrypto && !passThroughCompression ? UNDEFINED_VALUE : crc32,\n\t\textraFieldExtendedTimestampFlag,\n\t\textraFieldExtendedTimestampTime,\n\t\tzip64UncompressedSize,\n\t\tzip64CompressedSize\n\t});\n\treturn fileEntry;\n}\n\nfunction getHeaderInfo(options) {\n\tconst {\n\t\trawFilename,\n\t\tlastModDate,\n\t\trawLastModDate: rawLastModDateOption,\n\t\tlastAccessDate,\n\t\tcreationDate,\n\t\tlevel,\n\t\tzip64,\n\t\tzipCrypto,\n\t\tuseUnicodeFileNames,\n\t\tdataDescriptor,\n\t\tdirectory,\n\t\trawExtraField,\n\t\trawLocalExtraField,\n\t\tencryptionStrength,\n\t\textendedTimestamp,\n\t\tntfsTimestamp,\n\t\tpassThroughCompression,\n\t\tencrypted,\n\t\tzip64UncompressedSize,\n\t\tzip64CompressedSize,\n\t\tuncompressedSize,\n\t\tunknownSize,\n\t\tcrc32\n\t} = options;\n\tlet { version, compressionMethod } = options;\n\tconst compressed = !directory && isCompressed(compressionMethod, level);\n\tlet rawLocalExtraFieldZip64;\n\tconst uncompressedFile = passThroughCompression || !compressed;\n\tconst zip64ExtraFieldComplete = zip64 && (options.bufferedWrite || !dataDescriptor || ((!zip64UncompressedSize && !zip64CompressedSize) || (uncompressedFile && !unknownSize)));\n\tconst writeLocalExtraFieldZip64 = zip64ExtraFieldComplete || (zip64 && dataDescriptor && (zip64UncompressedSize || zip64CompressedSize));\n\tif (zip64 && (zip64UncompressedSize || zip64CompressedSize)) {\n\t\tconst length = 4 + 16;\n\t\tconst extraFieldZip64 = createRecordWriter(length);\n\t\textraFieldZip64.writeUint16(EXTRAFIELD_TYPE_ZIP64);\n\t\textraFieldZip64.writeUint16(length - 4);\n\t\trawLocalExtraFieldZip64 = extraFieldZip64.array;\n\t\tif (zip64ExtraFieldComplete) {\n\t\t\textraFieldZip64.writeUint64(uncompressedSize);\n\t\t\tif (uncompressedFile) {\n\t\t\t\tconst encryptionOverhead = getEncryptionOverhead(encrypted, zipCrypto, encryptionStrength);\n\t\t\t\textraFieldZip64.writeUint64(passThroughCompression ? 0 : uncompressedSize + encryptionOverhead);\n\t\t\t}\n\t\t}\n\t} else {\n\t\trawLocalExtraFieldZip64 = EMPTY_UINT8_ARRAY;\n\t}\n\tlet rawExtraFieldAES;\n\tif (encrypted && !zipCrypto) {\n\t\tconst extraFieldAES = createRecordWriter(getLength(EXTRAFIELD_DATA_AES) + 2);\n\t\textraFieldAES.writeUint16(EXTRAFIELD_TYPE_AES);\n\t\textraFieldAES.writeBytes(EXTRAFIELD_DATA_AES);\n\t\trawExtraFieldAES = extraFieldAES.array;\n\t\trawExtraFieldAES[8] = encryptionStrength;\n\t} else {\n\t\trawExtraFieldAES = EMPTY_UINT8_ARRAY;\n\t}\n\tlet rawExtraFieldNTFS;\n\tlet rawExtraFieldExtendedTimestamp;\n\tlet extraFieldExtendedTimestampFlag;\n\tlet extraFieldExtendedTimestampTime;\n\tif (extendedTimestamp) {\n\t\tconst lastModTimeUnix = getTimeUnix(lastModDate);\n\t\tconst lastModTimeUnixInRange = inUnixTimeRange(lastModTimeUnix);\n\t\tif (lastModTimeUnixInRange) {\n\t\t\tconst extraFieldTimestampLength = 9 + (lastAccessDate ? 4 : 0) + (creationDate ? 4 : 0);\n\t\t\tconst extraFieldTimestamp = createRecordWriter(extraFieldTimestampLength);\n\t\t\textraFieldExtendedTimestampFlag = 0x1 + (lastAccessDate ? 0x2 : 0) + (creationDate ? 0x4 : 0);\n\t\t\textraFieldExtendedTimestampTime = lastModTimeUnix;\n\t\t\textraFieldTimestamp.writeUint16(EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP);\n\t\t\textraFieldTimestamp.writeUint16(extraFieldTimestampLength - 4);\n\t\t\textraFieldTimestamp.writeUint8(extraFieldExtendedTimestampFlag);\n\t\t\textraFieldTimestamp.writeUint32(lastModTimeUnix);\n\t\t\tif (lastAccessDate) {\n\t\t\t\textraFieldTimestamp.writeUint32(clampUnixTime(getTimeUnix(lastAccessDate)));\n\t\t\t}\n\t\t\tif (creationDate) {\n\t\t\t\textraFieldTimestamp.writeUint32(clampUnixTime(getTimeUnix(creationDate)));\n\t\t\t}\n\t\t\trawExtraFieldExtendedTimestamp = extraFieldTimestamp.array;\n\t\t} else {\n\t\t\trawExtraFieldExtendedTimestamp = EMPTY_UINT8_ARRAY;\n\t\t}\n\t\tconst writeExtraFieldNTFS = ntfsTimestamp === UNDEFINED_VALUE ?\n\t\t\t!lastModTimeUnixInRange || Boolean(lastAccessDate || creationDate) :\n\t\t\tntfsTimestamp;\n\t\tif (writeExtraFieldNTFS) {\n\t\t\ttry {\n\t\t\t\tconst lastModTimeNTFS = getTimeNTFS(lastModDate);\n\t\t\t\tconst extraFieldNTFS = createRecordWriter(36);\n\t\t\t\textraFieldNTFS.writeUint16(EXTRAFIELD_TYPE_NTFS);\n\t\t\t\textraFieldNTFS.writeUint16(32);\n\t\t\t\textraFieldNTFS.skip(4);\n\t\t\t\textraFieldNTFS.writeUint16(EXTRAFIELD_TYPE_NTFS_TAG1);\n\t\t\t\textraFieldNTFS.writeUint16(24);\n\t\t\t\textraFieldNTFS.writeUint64(lastModTimeNTFS);\n\t\t\t\textraFieldNTFS.writeUint64(lastAccessDate ? getTimeNTFS(lastAccessDate) : lastModTimeNTFS);\n\t\t\t\textraFieldNTFS.writeUint64(creationDate ? getTimeNTFS(creationDate) : lastModTimeNTFS);\n\t\t\t\trawExtraFieldNTFS = extraFieldNTFS.array;\n\t\t\t} catch {\n\t\t\t\trawExtraFieldNTFS = EMPTY_UINT8_ARRAY;\n\t\t\t}\n\t\t} else {\n\t\t\trawExtraFieldNTFS = EMPTY_UINT8_ARRAY;\n\t\t}\n\t} else {\n\t\trawExtraFieldNTFS = rawExtraFieldExtendedTimestamp = EMPTY_UINT8_ARRAY;\n\t}\n\tlet rawExtraFieldUnix;\n\ttry {\n\t\tconst { uid, gid, unixExtraFieldType } = options;\n\t\tif (unixExtraFieldType == INFOZIP_EXTRA_FIELD_TYPE && (uid !== UNDEFINED_VALUE || gid !== UNDEFINED_VALUE)) {\n\t\t\tconst uidBytes = packUnixId(uid === UNDEFINED_VALUE ? 0 : uid);\n\t\t\tconst gidBytes = packUnixId(gid === UNDEFINED_VALUE ? 0 : gid);\n\t\t\tconst payloadLength = 3 + uidBytes.length + gidBytes.length;\n\t\t\tconst extraFieldUnix = createRecordWriter(4 + payloadLength);\n\t\t\textraFieldUnix.writeUint16(EXTRAFIELD_TYPE_INFOZIP);\n\t\t\textraFieldUnix.writeUint16(payloadLength);\n\t\t\textraFieldUnix.writeUint8(1);\n\t\t\textraFieldUnix.writeUint8(uidBytes.length);\n\t\t\textraFieldUnix.writeBytes(uidBytes);\n\t\t\textraFieldUnix.writeUint8(gidBytes.length);\n\t\t\textraFieldUnix.writeBytes(gidBytes);\n\t\t\trawExtraFieldUnix = extraFieldUnix.array;\n\t\t} else if (unixExtraFieldType == UNIX_EXTRA_FIELD_TYPE && (uid !== UNDEFINED_VALUE || gid !== UNDEFINED_VALUE)) {\n\t\t\tconst extraFieldUnix = createRecordWriter(8);\n\t\t\textraFieldUnix.writeUint16(EXTRAFIELD_TYPE_UNIX);\n\t\t\textraFieldUnix.writeUint16(4);\n\t\t\textraFieldUnix.writeUint16((uid === UNDEFINED_VALUE ? 0 : uid) & MAX_16_BITS);\n\t\t\textraFieldUnix.writeUint16((gid === UNDEFINED_VALUE ? 0 : gid) & MAX_16_BITS);\n\t\t\trawExtraFieldUnix = extraFieldUnix.array;\n\t\t} else {\n\t\t\trawExtraFieldUnix = EMPTY_UINT8_ARRAY;\n\t\t}\n\t} catch {\n\t\trawExtraFieldUnix = EMPTY_UINT8_ARRAY;\n\t}\n\tif (compressionMethod === UNDEFINED_VALUE) {\n\t\tcompressionMethod = compressed ? COMPRESSION_METHOD_DEFLATE : COMPRESSION_METHOD_STORE;\n\t}\n\tif (version === UNDEFINED_VALUE) {\n\t\tversion = compressionMethod == COMPRESSION_METHOD_STORE && !directory && !encrypted ? VERSION_STORE : VERSION_DEFLATE;\n\t}\n\tconst { codecVersionNeeded } = options;\n\tif (compressed && codecVersionNeeded !== UNDEFINED_VALUE) {\n\t\tversion = version > codecVersionNeeded ? version : codecVersionNeeded;\n\t}\n\tif (zip64) {\n\t\tversion = version > VERSION_ZIP64 ? version : VERSION_ZIP64;\n\t}\n\tif (encrypted && !zipCrypto) {\n\t\tversion = version > VERSION_AES ? version : VERSION_AES;\n\t\tif (passThroughCompression && crc32 !== UNDEFINED_VALUE) {\n\t\t\trawExtraFieldAES[EXTRAFIELD_OFFSET_AES_VENDOR_VERSION] = VENDOR_VERSION_AE_1;\n\t\t}\n\t\tsetUint16(getDataView(rawExtraFieldAES), EXTRAFIELD_OFFSET_AES_COMPRESSION_METHOD, compressionMethod);\n\t\tcompressionMethod = COMPRESSION_METHOD_AES;\n\t}\n\tconst localExtraFieldZip64Length = writeLocalExtraFieldZip64 ? getLength(rawLocalExtraFieldZip64) : 0;\n\tconst extraFieldLength = localExtraFieldZip64Length + getLength(rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS, rawExtraFieldUnix, rawExtraField, rawLocalExtraField);\n\tconst maximumUsdzExtraFieldLength = options[OPTION_USDZ] ? EXTRAFIELD_USDZ_MAX_LENGTH : 0;\n\tif (extraFieldLength + maximumUsdzExtraFieldLength > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_EXTRAFIELD_DATA);\n\t}\n\tconst dosLastModDate = new Date(Math.ceil(Math.floor(lastModDate.getTime() / 1000) / 2) * 2000);\n\tconst clampedLastModDate = dosLastModDate < MIN_DATE ? MIN_DATE : dosLastModDate > MAX_DATE ? MAX_DATE : dosLastModDate;\n\tconst storedLastModDate = getLength(rawExtraFieldExtendedTimestamp) ?\n\t\tnew Date(getTimeUnix(lastModDate) * 1000) :\n\t\tgetLength(rawExtraFieldNTFS) ? lastModDate : clampedLastModDate;\n\tconst {\n\t\theaderArray,\n\t\theaderView,\n\t\trawLastModDate\n\t} = getHeaderArrayData({\n\t\tversion,\n\t\tbitFlag: getBitFlag(level, useUnicodeFileNames, dataDescriptor, encrypted, compressionMethod),\n\t\tcompressionMethod,\n\t\tuncompressedSize,\n\t\tlastModDate: clampedLastModDate,\n\t\trawLastModDate: rawLastModDateOption,\n\t\trawFilename,\n\t\tzip64CompressedSize,\n\t\tzip64UncompressedSize,\n\t\textraFieldLength\n\t});\n\tconst localHeader = createRecordWriter(HEADER_SIZE + getLength(rawFilename) + extraFieldLength);\n\tconst localHeaderArray = localHeader.array;\n\tconst localHeaderView = getDataView(localHeaderArray);\n\tlocalHeader.writeUint32(LOCAL_FILE_HEADER_SIGNATURE);\n\tlocalHeader.writeBytes(headerArray);\n\tlocalHeader.writeBytes(rawFilename);\n\tif (writeLocalExtraFieldZip64) {\n\t\tlocalHeader.writeBytes(rawLocalExtraFieldZip64);\n\t}\n\tlocalHeader.writeBytes(rawExtraFieldAES);\n\tlocalHeader.writeBytes(rawExtraFieldExtendedTimestamp);\n\tlocalHeader.writeBytes(rawExtraFieldNTFS);\n\tlocalHeader.writeBytes(rawExtraFieldUnix);\n\tlocalHeader.writeBytes(rawExtraField);\n\tlocalHeader.writeBytes(rawLocalExtraField);\n\tif (dataDescriptor) {\n\t\tif (!zip64CompressedSize) {\n\t\t\tsetUint32(localHeaderView, HEADER_OFFSET_COMPRESSED_SIZE + LOCAL_HEADER_COMMON_OFFSET, 0);\n\t\t}\n\t\tif (!zip64UncompressedSize) {\n\t\t\tsetUint32(localHeaderView, HEADER_OFFSET_UNCOMPRESSED_SIZE + LOCAL_HEADER_COMMON_OFFSET, 0);\n\t\t}\n\t}\n\treturn {\n\t\tlocalHeaderArray,\n\t\tlocalHeaderView,\n\t\theaderArray,\n\t\theaderView,\n\t\tlastModDate: storedLastModDate,\n\t\tlastModDateClamped: storedLastModDate === clampedLastModDate && dosLastModDate.getTime() != clampedLastModDate.getTime(),\n\t\trawLastModDate,\n\t\tencrypted,\n\t\tcompressed,\n\t\tversion,\n\t\tcompressionMethod,\n\t\textraFieldExtendedTimestampFlag,\n\t\textraFieldExtendedTimestampTime,\n\t\trawExtraFieldZip64: EMPTY_UINT8_ARRAY,\n\t\tlocalExtraFieldZip64Length,\n\t\trawExtraFieldExtendedTimestamp,\n\t\trawExtraFieldNTFS,\n\t\trawExtraFieldUnix,\n\t\trawExtraFieldAES,\n\t\textraFieldLength\n\t};\n}\n\nfunction appendExtraFieldUSDZ(entryInfo, zipWriterOffset) {\n\tconst { headerInfo } = entryInfo;\n\tlet { localHeaderArray, extraFieldLength } = headerInfo;\n\tlet extraBytesLength = 64 - ((zipWriterOffset + getLength(localHeaderArray)) % 64);\n\tif (extraBytesLength < 4) {\n\t\textraBytesLength += 64;\n\t}\n\tconst rawExtraFieldUSDZ = new Uint8Array(extraBytesLength);\n\tconst extraFieldUSDZView = getDataView(rawExtraFieldUSDZ);\n\tsetUint16(extraFieldUSDZView, 0, EXTRAFIELD_TYPE_USDZ);\n\tsetUint16(extraFieldUSDZView, 2, extraBytesLength - 4);\n\tconst previousLocalHeaderArray = localHeaderArray;\n\theaderInfo.localHeaderArray = localHeaderArray = new Uint8Array(getLength(previousLocalHeaderArray) + extraBytesLength);\n\tarraySet(localHeaderArray, previousLocalHeaderArray);\n\tarraySet(localHeaderArray, rawExtraFieldUSDZ, getLength(previousLocalHeaderArray));\n\tconst localHeaderArrayView = getDataView(localHeaderArray);\n\tsetUint16(localHeaderArrayView, 28, extraFieldLength + extraBytesLength);\n\theaderInfo.localHeaderView = localHeaderArrayView;\n\tentryInfo.metadataSize += extraBytesLength;\n}\n\nfunction packUnixId(id) {\n\tconst dataArray = new Uint8Array(4);\n\tconst dataView = getDataView(dataArray);\n\tdataView.setUint32(0, id, true);\n\tlet length = 4;\n\twhile (length > 1 && dataArray[length - 1] === 0) {\n\t\tlength--;\n\t}\n\treturn dataArray.subarray(0, length);\n}\n\nfunction normalizeMsdosAttributes(msdosAttributesRaw, msdosAttributes) {\n\tif (msdosAttributesRaw !== UNDEFINED_VALUE) {\n\t\tmsdosAttributesRaw = msdosAttributesRaw & MAX_8_BITS;\n\t} else if (msdosAttributes !== UNDEFINED_VALUE) {\n\t\tconst { readOnly, hidden, system, directory: msdDir, archive } = msdosAttributes;\n\t\tlet raw = 0;\n\t\tif (readOnly) raw |= FILE_ATTR_MSDOS_READONLY_MASK;\n\t\tif (hidden) raw |= FILE_ATTR_MSDOS_HIDDEN_MASK;\n\t\tif (system) raw |= FILE_ATTR_MSDOS_SYSTEM_MASK;\n\t\tif (msdDir) raw |= FILE_ATTR_MSDOS_DIR_MASK;\n\t\tif (archive) raw |= FILE_ATTR_MSDOS_ARCHIVE_MASK;\n\t\tmsdosAttributesRaw = raw & MAX_8_BITS;\n\t}\n\tif (msdosAttributes === UNDEFINED_VALUE) {\n\t\tmsdosAttributes = {\n\t\t\treadOnly: Boolean(msdosAttributesRaw & FILE_ATTR_MSDOS_READONLY_MASK),\n\t\t\thidden: Boolean(msdosAttributesRaw & FILE_ATTR_MSDOS_HIDDEN_MASK),\n\t\t\tsystem: Boolean(msdosAttributesRaw & FILE_ATTR_MSDOS_SYSTEM_MASK),\n\t\t\tdirectory: Boolean(msdosAttributesRaw & FILE_ATTR_MSDOS_DIR_MASK),\n\t\t\tarchive: Boolean(msdosAttributesRaw & FILE_ATTR_MSDOS_ARCHIVE_MASK)\n\t\t};\n\t}\n\treturn { msdosAttributesRaw, msdosAttributes };\n}\n\nfunction getDataDescriptorInfo({\n\tzip64,\n\tdataDescriptor,\n\tdataDescriptorSignature\n}) {\n\tlet dataDescriptorArray = EMPTY_UINT8_ARRAY;\n\tlet dataDescriptorView, dataDescriptorOffset = 0;\n\tlet dataDescriptorLength = zip64 ? DATA_DESCRIPTOR_RECORD_ZIP_64_LENGTH : DATA_DESCRIPTOR_RECORD_LENGTH;\n\tif (dataDescriptorSignature) {\n\t\tdataDescriptorLength += DATA_DESCRIPTOR_RECORD_SIGNATURE_LENGTH;\n\t}\n\tif (dataDescriptor) {\n\t\tdataDescriptorArray = new Uint8Array(dataDescriptorLength);\n\t\tdataDescriptorView = getDataView(dataDescriptorArray);\n\t\tif (dataDescriptorSignature) {\n\t\t\tdataDescriptorOffset = DATA_DESCRIPTOR_RECORD_SIGNATURE_LENGTH;\n\t\t\tsetUint32(dataDescriptorView, 0, DATA_DESCRIPTOR_RECORD_SIGNATURE);\n\t\t}\n\t}\n\treturn {\n\t\tdataDescriptorArray,\n\t\tdataDescriptorView,\n\t\tdataDescriptorOffset\n\t};\n}\n\nfunction setEntryInfo({\n\tcrc32,\n\tcompressedSize,\n\tuncompressedSize,\n\theaderInfo,\n\tdataDescriptorInfo\n}, {\n\tzip64,\n\tzipCrypto,\n\tpassThroughCompression,\n\tdataDescriptor\n}) {\n\tconst {\n\t\theaderView,\n\t\tencrypted\n\t} = headerInfo;\n\tconst {\n\t\tdataDescriptorView,\n\t\tdataDescriptorOffset\n\t} = dataDescriptorInfo;\n\tif ((!encrypted || zipCrypto || passThroughCompression) && crc32 !== UNDEFINED_VALUE) {\n\t\tsetUint32(headerView, HEADER_OFFSET_SIGNATURE, crc32);\n\t\tif (dataDescriptor) {\n\t\t\tsetUint32(dataDescriptorView, dataDescriptorOffset, crc32);\n\t\t}\n\t}\n\tif (zip64) {\n\t\tif (dataDescriptor) {\n\t\t\tsetBigUint64(dataDescriptorView, dataDescriptorOffset + 4, BigInt(compressedSize));\n\t\t\tsetBigUint64(dataDescriptorView, dataDescriptorOffset + 12, BigInt(uncompressedSize));\n\t\t}\n\t} else {\n\t\tsetUint32(headerView, HEADER_OFFSET_COMPRESSED_SIZE, compressedSize);\n\t\tsetUint32(headerView, HEADER_OFFSET_UNCOMPRESSED_SIZE, uncompressedSize);\n\t\tif (dataDescriptor) {\n\t\t\tsetUint32(dataDescriptorView, dataDescriptorOffset + 4, compressedSize);\n\t\t\tsetUint32(dataDescriptorView, dataDescriptorOffset + 8, uncompressedSize);\n\t\t}\n\t}\n}\n\nfunction updateLocalHeader({\n\trawFilename,\n\tencrypted,\n\tzip64,\n\tlocalExtraFieldZip64Length,\n\tcrc32,\n\tcompressedSize,\n\tuncompressedSize,\n\tzip64UncompressedSize,\n\tzip64CompressedSize\n}, localHeaderView, { dataDescriptor, passThroughCompression }) {\n\tif (!dataDescriptor) {\n\t\tif (!encrypted || (passThroughCompression && crc32 !== UNDEFINED_VALUE)) {\n\t\t\tsetUint32(localHeaderView, HEADER_OFFSET_SIGNATURE + LOCAL_HEADER_COMMON_OFFSET, crc32);\n\t\t}\n\t\tif (!zip64CompressedSize) {\n\t\t\tsetUint32(localHeaderView, HEADER_OFFSET_COMPRESSED_SIZE + LOCAL_HEADER_COMMON_OFFSET, compressedSize);\n\t\t}\n\t\tif (!zip64UncompressedSize) {\n\t\t\tsetUint32(localHeaderView, HEADER_OFFSET_UNCOMPRESSED_SIZE + LOCAL_HEADER_COMMON_OFFSET, uncompressedSize);\n\t\t}\n\t}\n\tif (zip64 && localExtraFieldZip64Length) {\n\t\tconst localHeaderOffset = HEADER_SIZE + getLength(rawFilename) + 4;\n\t\tsetBigUint64(localHeaderView, localHeaderOffset, BigInt(uncompressedSize));\n\t\tsetBigUint64(localHeaderView, localHeaderOffset + 8, BigInt(compressedSize));\n\t}\n}\n\n\nasync function closeFile(zipWriter, comment, options) {\n\tconst { directoryDataLength, zip64Entries } = createDirectoryRecords(zipWriter.fileEntries);\n\tconst { directoryStart, directoryEnd, directoryArray } = await writeDirectoryRecords(zipWriter, directoryDataLength, options);\n\tconst signatureLength = await writeDigitalSignatureRecord(zipWriter, directoryArray, options);\n\tawait writeEndOfDirectoryRecord(zipWriter, comment, options, { directoryStart, directoryEnd, directoryDataLength, signatureLength, zip64Entries });\n}\n\nfunction createDirectoryRecords(files) {\n\tlet directoryDataLength = 0;\n\tlet zip64Entries = false;\n\tfor (const [, fileEntry] of files) {\n\t\tconst {\n\t\t\trawFilename,\n\t\t\trawExtraFieldAES,\n\t\t\trawComment,\n\t\t\trawExtraFieldNTFS,\n\t\t\trawExtraFieldUnix,\n\t\t\trawExtraField,\n\t\t\trawCentralExtraField,\n\t\t\textraFieldExtendedTimestampFlag,\n\t\t\textraFieldExtendedTimestampTime,\n\t\t\tzip64Enabled,\n\t\t\tuncompressedSize,\n\t\t\tcompressedSize\n\t\t} = fileEntry;\n\t\tlet { zip64UncompressedSize, zip64CompressedSize } = fileEntry;\n\t\tif (!zip64Enabled) {\n\t\t\tif (zip64UncompressedSize && uncompressedSize < MAX_32_BITS) {\n\t\t\t\tzip64UncompressedSize = fileEntry.zip64UncompressedSize = false;\n\t\t\t}\n\t\t\tif (zip64CompressedSize && compressedSize < MAX_32_BITS) {\n\t\t\t\tzip64CompressedSize = fileEntry.zip64CompressedSize = false;\n\t\t\t}\n\t\t}\n\t\tzip64Entries = zip64Entries || zip64UncompressedSize || zip64CompressedSize;\n\t\tconst zip64Offset = fileEntry.offset >= MAX_32_BITS;\n\t\tconst zip64DiskNumberStart = fileEntry.diskNumberStart >= MAX_16_BITS;\n\t\tlet rawExtraFieldZip64;\n\t\tif (zip64Offset || zip64DiskNumberStart || zip64UncompressedSize || zip64CompressedSize) {\n\t\t\tconst length = 4 + (zip64UncompressedSize ? 8 : 0) + (zip64CompressedSize ? 8 : 0) + (zip64Offset ? 8 : 0) + (zip64DiskNumberStart ? 4 : 0);\n\t\t\tconst extraFieldZip64 = createRecordWriter(length);\n\t\t\textraFieldZip64.writeUint16(EXTRAFIELD_TYPE_ZIP64);\n\t\t\textraFieldZip64.writeUint16(length - 4);\n\t\t\tif (zip64UncompressedSize) {\n\t\t\t\textraFieldZip64.writeUint64(uncompressedSize);\n\t\t\t}\n\t\t\tif (zip64CompressedSize) {\n\t\t\t\textraFieldZip64.writeUint64(compressedSize);\n\t\t\t}\n\t\t\tif (zip64Offset) {\n\t\t\t\textraFieldZip64.writeUint64(fileEntry.offset);\n\t\t\t}\n\t\t\tif (zip64DiskNumberStart) {\n\t\t\t\textraFieldZip64.writeUint32(fileEntry.diskNumberStart);\n\t\t\t}\n\t\t\trawExtraFieldZip64 = extraFieldZip64.array;\n\t\t} else {\n\t\t\trawExtraFieldZip64 = EMPTY_UINT8_ARRAY;\n\t\t}\n\t\tfileEntry.rawExtraFieldZip64 = rawExtraFieldZip64;\n\t\tfileEntry.zip64Offset = zip64Offset;\n\t\tfileEntry.zip64DiskNumberStart = zip64DiskNumberStart;\n\t\tlet rawExtraFieldTimestamp;\n\t\tif (extraFieldExtendedTimestampTime === UNDEFINED_VALUE) {\n\t\t\trawExtraFieldTimestamp = EMPTY_UINT8_ARRAY;\n\t\t} else {\n\t\t\tconst extraFieldTimestamp = createRecordWriter(9);\n\t\t\textraFieldTimestamp.writeUint16(EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP);\n\t\t\textraFieldTimestamp.writeUint16(5);\n\t\t\textraFieldTimestamp.writeUint8(extraFieldExtendedTimestampFlag);\n\t\t\textraFieldTimestamp.writeUint32(extraFieldExtendedTimestampTime);\n\t\t\trawExtraFieldTimestamp = extraFieldTimestamp.array;\n\t\t}\n\t\tfileEntry.rawExtraFieldExtendedTimestamp = rawExtraFieldTimestamp;\n\t\tconst extraFieldLength = getLength(\n\t\t\trawExtraFieldZip64,\n\t\t\trawExtraFieldAES,\n\t\t\trawExtraFieldNTFS,\n\t\t\trawExtraFieldUnix,\n\t\t\trawExtraFieldTimestamp,\n\t\t\trawExtraField,\n\t\t\trawCentralExtraField);\n\t\tif (extraFieldLength > MAX_16_BITS) {\n\t\t\tthrow new Error(ERR_INVALID_EXTRAFIELD_DATA);\n\t\t}\n\t\tdirectoryDataLength += CENTRAL_FILE_HEADER_LENGTH + getLength(rawFilename, rawComment) + extraFieldLength;\n\t}\n\treturn { directoryDataLength, zip64Entries };\n}\n\nasync function writeDirectoryRecords(zipWriter, directoryDataLength, options) {\n\tconst { fileEntries, writer } = zipWriter;\n\tconst directoryArray = new Uint8Array(directoryDataLength);\n\tawait initStream(writer);\n\tlet offset = 0;\n\tlet directoryDiskOffset = 0;\n\tlet directoryStartDiskNumber = getDiskNumber(writer);\n\tlet directoryStartDiskOffset = getDiskOffset(writer);\n\tlet directoryEndDiskEntriesLength = 0;\n\tfor (const [indexFileEntry, fileEntry] of Array.from(fileEntries.values()).entries()) {\n\t\tconst {\n\t\t\toffset: fileEntryOffset,\n\t\t\trawFilename,\n\t\t\trawExtraFieldZip64,\n\t\t\trawExtraFieldAES,\n\t\t\trawExtraFieldExtendedTimestamp,\n\t\t\trawExtraFieldNTFS,\n\t\t\trawExtraFieldUnix,\n\t\t\trawExtraField,\n\t\t\trawCentralExtraField,\n\t\t\trawComment,\n\t\t\tversionMadeBy,\n\t\t\theaderArray,\n\t\t\theaderView,\n\t\t\tzip64UncompressedSize,\n\t\t\tzip64CompressedSize,\n\t\t\tzip64DiskNumberStart,\n\t\t\tzip64Offset,\n\t\t\tinternalFileAttributes,\n\t\t\texternalFileAttributes,\n\t\t\tdiskNumberStart,\n\t\t\tuncompressedSize,\n\t\t\tcompressedSize\n\t\t} = fileEntry;\n\t\tconst extraFieldLength = getLength(rawExtraFieldZip64, rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS, rawExtraFieldUnix, rawExtraField, rawCentralExtraField);\n\t\tconst directoryRecordLength = CENTRAL_FILE_HEADER_LENGTH + getLength(rawFilename, rawComment) + extraFieldLength;\n\t\tif (exceedsAvailableSize(writer, offset + directoryRecordLength - directoryDiskOffset)) {\n\t\t\tawait writeData(writer, directoryArray.slice(directoryDiskOffset, offset));\n\t\t\tdirectoryDiskOffset = offset;\n\t\t\tdirectoryEndDiskEntriesLength = 0;\n\t\t\tawait writer.closeDisk();\n\t\t}\n\t\tif (indexFileEntry == 0) {\n\t\t\tdirectoryStartDiskNumber = getDiskNumber(writer);\n\t\t\tdirectoryStartDiskOffset = getDiskOffset(writer);\n\t\t}\n\t\tif (!zip64UncompressedSize) {\n\t\t\tsetUint32(headerView, HEADER_OFFSET_UNCOMPRESSED_SIZE, uncompressedSize);\n\t\t}\n\t\tif (!zip64CompressedSize) {\n\t\t\tsetUint32(headerView, HEADER_OFFSET_COMPRESSED_SIZE, compressedSize);\n\t\t}\n\t\tif ((zip64Offset || zip64DiskNumberStart) && fileEntry.version < VERSION_ZIP64) {\n\t\t\tsetUint16(headerView, HEADER_OFFSET_VERSION, VERSION_ZIP64);\n\t\t}\n\t\tconst directoryRecord = createRecordWriter(directoryRecordLength);\n\t\tdirectoryRecord.writeUint32(CENTRAL_FILE_HEADER_SIGNATURE);\n\t\tdirectoryRecord.writeUint16(versionMadeBy);\n\t\tdirectoryRecord.writeBytes(headerArray.subarray(0, HEADER_SIZE - 4 - 2));\n\t\tdirectoryRecord.writeUint16(extraFieldLength);\n\t\tdirectoryRecord.writeUint16(getLength(rawComment));\n\t\tdirectoryRecord.writeUint16(zip64DiskNumberStart ? MAX_16_BITS : diskNumberStart);\n\t\tdirectoryRecord.writeUint16(internalFileAttributes);\n\t\tdirectoryRecord.writeUint32(externalFileAttributes);\n\t\tdirectoryRecord.writeUint32(zip64Offset ? MAX_32_BITS : fileEntryOffset);\n\t\tdirectoryRecord.writeBytes(rawFilename);\n\t\tdirectoryRecord.writeBytes(rawExtraFieldZip64);\n\t\tdirectoryRecord.writeBytes(rawExtraFieldAES);\n\t\tdirectoryRecord.writeBytes(rawExtraFieldExtendedTimestamp);\n\t\tdirectoryRecord.writeBytes(rawExtraFieldNTFS);\n\t\tdirectoryRecord.writeBytes(rawExtraFieldUnix);\n\t\tdirectoryRecord.writeBytes(rawExtraField);\n\t\tdirectoryRecord.writeBytes(rawCentralExtraField);\n\t\tdirectoryRecord.writeBytes(rawComment);\n\t\tarraySet(directoryArray, directoryRecord.array, offset);\n\t\toffset += directoryRecordLength;\n\t\tdirectoryEndDiskEntriesLength++;\n\t\tif (options.onprogress) {\n\t\t\ttry {\n\t\t\t\tawait options.onprogress(indexFileEntry + 1, fileEntries.size, new Entry(fileEntry));\n\t\t\t} catch {\n\t\t\t\t// ignored\n\t\t\t}\n\t\t}\n\t}\n\tawait writeData(writer, directoryDiskOffset ? directoryArray.slice(directoryDiskOffset) : directoryArray);\n\treturn {\n\t\tdirectoryStart: { diskNumber: directoryStartDiskNumber, diskOffset: directoryStartDiskOffset },\n\t\tdirectoryEnd: { diskNumber: getDiskNumber(writer), entriesLength: directoryEndDiskEntriesLength },\n\t\tdirectoryArray\n\t};\n}\n\nasync function writeDigitalSignatureRecord(zipWriter, directoryArray, options) {\n\tconst signCentralDirectory = getFunctionOptionValue(zipWriter, options, OPTION_SIGN_CENTRAL_DIRECTORY);\n\tif (signCentralDirectory) {\n\t\tconst signatureData = await signCentralDirectory(directoryArray);\n\t\tconst signatureDataLength = getLength(signatureData);\n\t\tif (signatureDataLength > MAX_16_BITS) {\n\t\t\tthrow new Error(ERR_INVALID_SIGNATURE_DATA);\n\t\t}\n\t\tconst signatureRecord = createRecordWriter(6 + signatureDataLength);\n\t\tsignatureRecord.writeUint32(DIGITAL_SIGNATURE_RECORD_SIGNATURE);\n\t\tsignatureRecord.writeUint16(signatureDataLength);\n\t\tsignatureRecord.writeBytes(signatureData);\n\t\tconst { writer } = zipWriter;\n\t\tif (exceedsAvailableSize(writer, getLength(signatureRecord.array))) {\n\t\t\tawait writer.closeDisk();\n\t\t}\n\t\tawait writeData(writer, signatureRecord.array);\n\t\treturn 6 + signatureDataLength;\n\t}\n\treturn 0;\n}\n\nasync function writeEndOfDirectoryRecord(zipWriter, comment, options, cdInfo) {\n\tconst { writer } = zipWriter;\n\tconst { directoryStart, directoryEnd, signatureLength, zip64Entries } = cdInfo;\n\tlet { directoryDataLength } = cdInfo;\n\tlet fileEntriesLength = zipWriter.fileEntries.size;\n\tlet diskNumber = directoryStart.diskNumber;\n\tlet directoryOffset = getSegmentOffset(zipWriter, directoryStart);\n\tconst commentLength = getLength(comment);\n\tif (commentLength > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_COMMENT);\n\t}\n\tlet zip64 = getOptionValue(zipWriter, options, PROPERTY_NAME_ZIP64);\n\tlet lastDiskNumber = getDiskNumber(writer);\n\tif (exceedsAvailableSize(writer, (zip64 ? ZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH : END_OF_CENTRAL_DIR_LENGTH) + commentLength)) {\n\t\tlastDiskNumber++;\n\t}\n\tif (directoryOffset >= MAX_32_BITS || directoryDataLength >= MAX_32_BITS || fileEntriesLength >= MAX_16_BITS || lastDiskNumber >= MAX_16_BITS) {\n\t\tif (zip64 === false) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_FORMAT);\n\t\t} else {\n\t\t\tzip64 = true;\n\t\t}\n\t} else if (zip64 === UNDEFINED_VALUE && zip64Entries) {\n\t\tzip64 = true;\n\t}\n\tconst endOfdirectoryRecord = createRecordWriter(zip64 ? ZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH : END_OF_CENTRAL_DIR_LENGTH);\n\tif (exceedsAvailableSize(writer, getLength(endOfdirectoryRecord.array) + commentLength)) {\n\t\tawait writer.closeDisk();\n\t}\n\tlastDiskNumber = getDiskNumber(writer);\n\tlet diskFileEntriesLength = lastDiskNumber == directoryEnd.diskNumber ? directoryEnd.entriesLength : 0;\n\tif (zip64) {\n\t\tendOfdirectoryRecord.writeUint32(ZIP64_END_OF_CENTRAL_DIR_SIGNATURE);\n\t\tendOfdirectoryRecord.writeUint64(44);\n\t\tendOfdirectoryRecord.writeUint16(45);\n\t\tendOfdirectoryRecord.writeUint16(45);\n\t\tendOfdirectoryRecord.writeUint32(lastDiskNumber);\n\t\tendOfdirectoryRecord.writeUint32(diskNumber);\n\t\tendOfdirectoryRecord.writeUint64(diskFileEntriesLength);\n\t\tendOfdirectoryRecord.writeUint64(fileEntriesLength);\n\t\tendOfdirectoryRecord.writeUint64(directoryDataLength);\n\t\tendOfdirectoryRecord.writeUint64(directoryOffset);\n\t\tendOfdirectoryRecord.writeUint32(ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE);\n\t\tendOfdirectoryRecord.writeUint32(lastDiskNumber);\n\t\tendOfdirectoryRecord.writeUint64(BigInt(getSegmentOffset(zipWriter, writer)) + BigInt(directoryDataLength) + BigInt(signatureLength));\n\t\tendOfdirectoryRecord.writeUint32(lastDiskNumber + 1);\n\t\tconst supportZip64SplitFile = getOptionValue(zipWriter, options, OPTION_SUPPORT_ZIP64_SPLIT_FILE, true);\n\t\tif (supportZip64SplitFile) {\n\t\t\tlastDiskNumber = MAX_16_BITS;\n\t\t\tdiskNumber = MAX_16_BITS;\n\t\t}\n\t\tdiskFileEntriesLength = MAX_16_BITS;\n\t\tfileEntriesLength = MAX_16_BITS;\n\t\tdirectoryOffset = MAX_32_BITS;\n\t\tdirectoryDataLength = MAX_32_BITS;\n\t}\n\tendOfdirectoryRecord.writeUint32(END_OF_CENTRAL_DIR_SIGNATURE);\n\tendOfdirectoryRecord.writeUint16(lastDiskNumber);\n\tendOfdirectoryRecord.writeUint16(diskNumber);\n\tendOfdirectoryRecord.writeUint16(diskFileEntriesLength);\n\tendOfdirectoryRecord.writeUint16(fileEntriesLength);\n\tendOfdirectoryRecord.writeUint32(directoryDataLength);\n\tendOfdirectoryRecord.writeUint32(directoryOffset);\n\tendOfdirectoryRecord.writeUint16(commentLength);\n\tawait writeData(writer, endOfdirectoryRecord.array);\n\tif (commentLength) {\n\t\tawait writeData(writer, comment);\n\t}\n}\n\nfunction createRecordWriter(length) {\n\tconst array = new Uint8Array(length);\n\tconst view = getDataView(array);\n\tlet offset = 0;\n\treturn {\n\t\tarray,\n\t\twriteUint8: value => { setUint8(view, offset, value); offset += 1; },\n\t\twriteUint16: value => { setUint16(view, offset, value); offset += 2; },\n\t\twriteUint32: value => { setUint32(view, offset, value); offset += 4; },\n\t\twriteUint64: value => { setBigUint64(view, offset, BigInt(value)); offset += 8; },\n\t\twriteBytes: value => { arraySet(array, value, offset); offset += getLength(value); },\n\t\tskip: count => offset += count\n\t};\n}\n\nfunction getDiskNumber(writer) {\n\tconst { diskNumber = 0 } = writer;\n\treturn diskNumber;\n}\n\nfunction getDiskOffset(writer) {\n\tconst { diskOffset = 0 } = writer;\n\treturn diskOffset;\n}\n\nfunction exceedsAvailableSize(writer, length) {\n\tconst { availableSize = INFINITY_VALUE } = writer;\n\treturn length > availableSize;\n}\n\nfunction getSegmentOffset(zipWriter, { diskNumber = 0, diskOffset = 0 }) {\n\treturn zipWriter.offset - diskOffset - (diskNumber ? zipWriter.initialOffset : 0);\n}\n\nasync function startsWithSplitZipSignature(reader) {\n\tconst signatureArray = await readUint8Array(reader, 0, SPLIT_ZIP_FILE_SIGNATURE_LENGTH);\n\treturn getUint32(getDataView(signatureArray), 0) == SPLIT_ZIP_FILE_SIGNATURE;\n}\n\nfunction removeExtraFieldZip64(rawExtraField) {\n\tconst rawExtraFieldView = getDataView(rawExtraField);\n\tlet offsetExtraField = 0;\n\twhile (offsetExtraField + 4 <= getLength(rawExtraField)) {\n\t\tconst size = 4 + getUint16(rawExtraFieldView, offsetExtraField + 2);\n\t\tif (getUint16(rawExtraFieldView, offsetExtraField) == EXTRAFIELD_TYPE_ZIP64) {\n\t\t\treturn removeExtraFieldZip64(concat(\n\t\t\t\trawExtraField.subarray(0, offsetExtraField),\n\t\t\t\trawExtraField.subarray(Math.min(offsetExtraField + size, getLength(rawExtraField)))));\n\t\t}\n\t\toffsetExtraField += size;\n\t}\n\treturn rawExtraField;\n}\n\nasync function copyZipData(zipWriter, reader, entries, directoryOffset) {\n\tconst { writer } = zipWriter;\n\tconst entryPositions = new Map();\n\tif (writer.closeDisk) {\n\t\tconst sortedEntries = Array.from(entries).sort((firstEntry, secondEntry) =>\n\t\t\tgetSourceOffset(reader, firstEntry) - getSourceOffset(reader, secondEntry));\n\t\tlet copiedLength = 0;\n\t\tfor (const entry of sortedEntries) {\n\t\t\tconst sourceOffset = getSourceOffset(reader, entry);\n\t\t\tawait copyData(zipWriter, reader, copiedLength, sourceOffset - copiedLength);\n\t\t\tif (exceedsAvailableSize(writer, await getLocalHeaderLength(reader, sourceOffset))) {\n\t\t\t\tawait writer.closeDisk();\n\t\t\t}\n\t\t\tentryPositions.set(entry, {\n\t\t\t\toffset: getSegmentOffset(zipWriter, writer),\n\t\t\t\tdiskNumberStart: getDiskNumber(writer)\n\t\t\t});\n\t\t\tcopiedLength = sourceOffset;\n\t\t}\n\t\tawait copyData(zipWriter, reader, copiedLength, directoryOffset - copiedLength);\n\t} else {\n\t\tconst baseOffset = zipWriter.offset;\n\t\tawait copyData(zipWriter, reader, 0, directoryOffset);\n\t\tentries.forEach(entry => entryPositions.set(entry, {\n\t\t\toffset: baseOffset + getSourceOffset(reader, entry),\n\t\t\tdiskNumberStart: 0\n\t\t}));\n\t}\n\treturn entryPositions;\n}\n\nasync function copyData(zipWriter, reader, offset, size) {\n\tif (size > 0) {\n\t\tconst { writer } = zipWriter;\n\t\tlet copiedLength = 0;\n\t\ttry {\n\t\t\tawait flushBufferedData(createReadable(reader, { offset, size }), writer, UNDEFINED_VALUE, chunkLength => copiedLength += chunkLength);\n\t\t} catch (error) {\n\t\t\tzipWriter.hasCorruptedEntries = true;\n\t\t\ttry {\n\t\t\t\terror.corruptedEntry = true;\n\t\t\t} catch {\n\t\t\t\t// ignored\n\t\t\t}\n\t\t\tthrow error;\n\t\t} finally {\n\t\t\twriter.size += copiedLength;\n\t\t\tzipWriter.offset += copiedLength;\n\t\t}\n\t}\n}\n\nasync function getLocalHeaderLength(reader, offset) {\n\tconst headerArray = await readUint8Array(reader, offset, HEADER_SIZE);\n\tif (getLength(headerArray) < HEADER_SIZE) {\n\t\treturn HEADER_SIZE;\n\t}\n\tconst headerView = getDataView(headerArray);\n\treturn HEADER_SIZE +\n\t\tgetUint16(headerView, HEADER_OFFSET_FILENAME_LENGTH + LOCAL_HEADER_COMMON_OFFSET) +\n\t\tgetUint16(headerView, HEADER_OFFSET_EXTRAFIELD_LENGTH + LOCAL_HEADER_COMMON_OFFSET);\n}\n\nfunction getSourceOffset(reader, { offset, diskNumberStart }) {\n\treturn offset + (reader.getDiskOffset ? reader.getDiskOffset(diskNumberStart) : 0);\n}\n\nfunction getSplitZipSignatureArray() {\n\tconst signatureArray = new Uint8Array(SPLIT_ZIP_FILE_SIGNATURE_LENGTH);\n\tsetUint32(getDataView(signatureArray), 0, SPLIT_ZIP_FILE_SIGNATURE);\n\treturn signatureArray;\n}\n\nasync function writeSplitZipSignature(zipWriter, writer) {\n\tdelete zipWriter.addSplitZipSignature;\n\tawait writeData(writer, getSplitZipSignatureArray());\n\tzipWriter.offset += SPLIT_ZIP_FILE_SIGNATURE_LENGTH;\n}\n\nasync function writeData(writer, array) {\n\tconst { writable } = writer;\n\tconst streamWriter = writable.getWriter();\n\ttry {\n\t\tawait streamWriter.ready;\n\t\twriter.size += getLength(array);\n\t\tawait streamWriter.write(array);\n\t} finally {\n\t\tstreamWriter.releaseLock();\n\t}\n}\n\nasync function flushBufferedData(readable, writer, signal, onChunkWritten) {\n\tconst streamWriter = writer.writable.getWriter();\n\ttry {\n\t\tawait readable.pipeTo(new WritableStream({\n\t\t\tasync write(chunk) {\n\t\t\t\tawait streamWriter.ready;\n\t\t\t\tawait streamWriter.write(chunk);\n\t\t\t\tonChunkWritten(getLength(chunk));\n\t\t\t}\n\t\t}), { preventClose: true, preventAbort: true, signal });\n\t} finally {\n\t\tstreamWriter.releaseLock();\n\t}\n}\n\nfunction getTimeNTFS(date) {\n\tif (date) {\n\t\tconst timeNTFS = ((BigInt(date.getTime()) + BigInt(11644473600000)) * BigInt(10000));\n\t\treturn timeNTFS < MIN_NTFS_TIME ? MIN_NTFS_TIME : timeNTFS > MAX_NTFS_TIME ? MAX_NTFS_TIME : timeNTFS;\n\t}\n}\n\nfunction getTimeUnix(date) {\n\treturn Math.floor(date.getTime() / 1000);\n}\n\nfunction inUnixTimeRange(timeUnix) {\n\treturn timeUnix >= MIN_UNIX_TIME && timeUnix <= MAX_UNIX_TIME;\n}\n\nfunction clampUnixTime(timeUnix) {\n\treturn Math.min(MAX_UNIX_TIME, Math.max(MIN_UNIX_TIME, timeUnix));\n}\n\nfunction getOptionValue(zipWriter, options, name, defaultValue) {\n\tconst result = options[name] === UNDEFINED_VALUE ? zipWriter.options[name] : options[name];\n\treturn result === UNDEFINED_VALUE ? defaultValue : result;\n}\n\nfunction getDateOptionValue(zipWriter, options, name, defaultValue) {\n\tconst date = getOptionValue(zipWriter, options, name, defaultValue);\n\tif (date === null) {\n\t\treturn defaultValue;\n\t}\n\tif (date !== UNDEFINED_VALUE && (typeof date.getTime != FUNCTION_TYPE || Number.isNaN(date.getTime()))) {\n\t\tthrow new Error(ERR_INVALID_DATE);\n\t}\n\treturn date;\n}\n\nfunction getFunctionOptionValue(zipWriter, options, name) {\n\treturn checkFunctionOption(getOptionValue(zipWriter, options, name));\n}\n\nfunction getNumberOptionValue(zipWriter, options, name, defaultValue) {\n\treturn toNumber(getOptionValue(zipWriter, options, name, defaultValue));\n}\n\n\nfunction getMaximumCompressedSize(uncompressedSize) {\n\treturn uncompressedSize + (5 * (Math.floor(uncompressedSize / 16383) + 1));\n}\n\nfunction isCompressed(compressionMethod, level) {\n\treturn compressionMethod === UNDEFINED_VALUE\n\t\t? (level === UNDEFINED_VALUE || level > 0)\n\t\t: compressionMethod !== COMPRESSION_METHOD_STORE;\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 setUint8(view, offset, value) {\n\tview.setUint8(offset, value);\n}\n\nfunction setUint16(view, offset, value) {\n\tview.setUint16(offset, value, true);\n}\n\nfunction setUint32(view, offset, value) {\n\tview.setUint32(offset, value, true);\n}\n\nfunction setBigUint64(view, offset, value) {\n\tview.setBigUint64(offset, value, true);\n}\n\nfunction arraySet(array, typedArray, offset) {\n\tarray.set(typedArray, offset);\n}\n\n\nfunction getLength(...arrayLikes) {\n\tlet result = 0;\n\tarrayLikes.forEach(arrayLike => arrayLike && (result += arrayLike.length));\n\treturn result;\n}\n\nfunction getHeaderArrayData({\n\tversion,\n\tbitFlag,\n\tcompressionMethod,\n\tuncompressedSize,\n\tcompressedSize,\n\tlastModDate,\n\trawLastModDate,\n\trawFilename,\n\tzip64CompressedSize,\n\tzip64UncompressedSize,\n\textraFieldLength\n}) {\n\tconst headerRecord = createRecordWriter(HEADER_SIZE - 4);\n\tconst headerArray = headerRecord.array;\n\tconst headerView = getDataView(headerArray);\n\theaderRecord.writeUint16(version);\n\theaderRecord.writeUint16(bitFlag);\n\theaderRecord.writeUint16(compressionMethod);\n\tif (rawLastModDate === UNDEFINED_VALUE) {\n\t\tconst dateArray = new Uint32Array(1);\n\t\tconst dateView = getDataView(dateArray);\n\t\tsetUint16(dateView, 0, (((lastModDate.getHours() << 6) | lastModDate.getMinutes()) << 5) | lastModDate.getSeconds() / 2);\n\t\tsetUint16(dateView, 2, ((((lastModDate.getFullYear() - 1980) << 4) | (lastModDate.getMonth() + 1)) << 5) | lastModDate.getDate());\n\t\trawLastModDate = dateArray[0];\n\t}\n\theaderRecord.writeUint32(rawLastModDate);\n\theaderRecord.skip(4);\n\tif (zip64CompressedSize || compressedSize !== UNDEFINED_VALUE) {\n\t\theaderRecord.writeUint32(zip64CompressedSize ? MAX_32_BITS : compressedSize);\n\t} else {\n\t\theaderRecord.skip(4);\n\t}\n\tif (zip64UncompressedSize || uncompressedSize !== UNDEFINED_VALUE) {\n\t\theaderRecord.writeUint32(zip64UncompressedSize ? MAX_32_BITS : uncompressedSize);\n\t} else {\n\t\theaderRecord.skip(4);\n\t}\n\theaderRecord.writeUint16(getLength(rawFilename));\n\theaderRecord.writeUint16(extraFieldLength);\n\treturn {\n\t\theaderArray,\n\t\theaderView,\n\t\trawLastModDate\n\t};\n}\n\nfunction isPrintableASCIIText(rawText) {\n\treturn rawText.every(characterCode =>\n\t\tcharacterCode >= MIN_PRINTABLE_ASCII_CHARACTER_CODE && characterCode <= MAX_PRINTABLE_ASCII_CHARACTER_CODE);\n}\n\nfunction getBitFlag(level, useUnicodeFileNames, dataDescriptor, encrypted, compressionMethod) {\n\tlet bitFlag = 0;\n\tif (useUnicodeFileNames) {\n\t\tbitFlag = bitFlag | BITFLAG_LANG_ENCODING_FLAG;\n\t}\n\tif (dataDescriptor) {\n\t\tbitFlag = bitFlag | BITFLAG_DATA_DESCRIPTOR;\n\t}\n\tif (compressionMethod == COMPRESSION_METHOD_DEFLATE || compressionMethod == COMPRESSION_METHOD_DEFLATE_64) {\n\t\tif (level >= 0 && level <= 3) {\n\t\t\tbitFlag = bitFlag | BITFLAG_LEVEL_SUPER_FAST_MASK;\n\t\t}\n\t\tif (level > 3 && level <= 5) {\n\t\t\tbitFlag = bitFlag | BITFLAG_LEVEL_FAST_MASK;\n\t\t}\n\t\tif (level == 9) {\n\t\t\tbitFlag = bitFlag | BITFLAG_LEVEL_MAX_MASK;\n\t\t}\n\t}\n\tif (encrypted) {\n\t\tbitFlag = bitFlag | BITFLAG_ENCRYPTED;\n\t}\n\treturn bitFlag;\n}\n","/*\n Copyright (c) 2025 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 {\n\tCOMPRESSION_METHOD_STORE,\n\tCOMPRESSION_METHOD_DEFLATE,\n\tCOMPRESSION_METHOD_DEFLATE_64,\n\tUNDEFINED_VALUE,\n\tFUNCTION_TYPE\n} from \"./constants.js\";\nimport { getConfiguration } from \"./configuration.js\";\nimport { getRegisteredCodecs, getCodecStreams } from \"./codec-registry.js\";\nimport {\n\tsupportsFormat,\n\tFORMAT_DEFLATE_RAW,\n\tFORMAT_DEFLATE64_RAW,\n\tFORMAT_GZIP\n} from \"./streams/zip-entry-stream.js\";\n\nexport {\n\tgetSupportedCompressionMethods\n};\n\nfunction getSupportedCompressionMethods() {\n\tconst { CompressionStream, DecompressionStream, CompressionStreamFallback, DecompressionStreamFallback } = getConfiguration();\n\tconst supportedMethods = [{\n\t\tcompressionMethod: COMPRESSION_METHOD_STORE,\n\t\tcompression: true,\n\t\tdecompression: true,\n\t\tregistered: false\n\t}, {\n\t\tcompressionMethod: COMPRESSION_METHOD_DEFLATE,\n\t\tcompression: formatSupported(CompressionStreamFallback, FORMAT_DEFLATE_RAW) ||\n\t\t\tformatSupported(CompressionStream, FORMAT_DEFLATE_RAW) || formatSupported(CompressionStream, FORMAT_GZIP),\n\t\tdecompression: formatSupported(DecompressionStreamFallback, FORMAT_DEFLATE_RAW) ||\n\t\t\tformatSupported(DecompressionStream, FORMAT_DEFLATE_RAW) || formatSupported(DecompressionStream, FORMAT_GZIP),\n\t\tregistered: false\n\t}, {\n\t\tcompressionMethod: COMPRESSION_METHOD_DEFLATE_64,\n\t\tcompression: false,\n\t\tdecompression: formatSupported(DecompressionStreamFallback, FORMAT_DEFLATE64_RAW) ||\n\t\t\tformatSupported(DecompressionStream, FORMAT_DEFLATE64_RAW),\n\t\tregistered: false\n\t}];\n\tfor (const codec of getRegisteredCodecs()) {\n\t\tconst codecStreams = getCodecStreams(codec.format);\n\t\tsupportedMethods.push({\n\t\t\tcompressionMethod: codec.compressionMethod,\n\t\t\t// deno-lint-ignore valid-typeof\n\t\t\tcompression: codecStreams ? typeof codecStreams.CompressionStream == FUNCTION_TYPE : UNDEFINED_VALUE,\n\t\t\t// deno-lint-ignore valid-typeof\n\t\t\tdecompression: codecStreams ? typeof codecStreams.DecompressionStream == FUNCTION_TYPE : UNDEFINED_VALUE,\n\t\t\tregistered: true\n\t\t});\n\t}\n\treturn supportedMethods;\n}\n\nfunction formatSupported(StreamClass, format) {\n\tif (!StreamClass) {\n\t\treturn false;\n\t}\n\tconst { supportedFormats } = StreamClass;\n\tif (supportedFormats) {\n\t\treturn supportedFormats.includes(format);\n\t}\n\treturn supportsFormat(StreamClass, format);\n}\n","/*\n Copyright (c) 2025 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, crypto, ReadableStream, WritableStream */\n\nexport {\n\tcreateOPFSTempStream\n};\n\nconst DEFAULT_THRESHOLD = 1024 * 1024;\nconst DEFAULT_DIRECTORY_NAME = \".zip.js-temp\";\n\nfunction createOPFSTempStream(options = {}) {\n\tconst {\n\t\tthresholdBytes = DEFAULT_THRESHOLD,\n\t\tdirectoryName = DEFAULT_DIRECTORY_NAME,\n\t\tgetDirectory = () => navigator.storage.getDirectory()\n\t} = options;\n\tlet directoryHandlePromise;\n\tfunction getTempDirectory() {\n\t\tif (!directoryHandlePromise) {\n\t\t\tdirectoryHandlePromise = Promise.resolve(getDirectory())\n\t\t\t\t.then(root => root.getDirectoryHandle(directoryName, { create: true }));\n\t\t}\n\t\treturn directoryHandlePromise;\n\t}\n\treturn function () {\n\t\tconst memoryChunks = [];\n\t\tlet bufferedSize = 0;\n\t\tlet spilled = false;\n\t\tlet fileName, fileHandle, fileWriter, fileReader;\n\n\t\tasync function spillToFile() {\n\t\t\tconst directoryHandle = await getTempDirectory();\n\t\t\tfileName = getRandomFileName();\n\t\t\tfileHandle = await directoryHandle.getFileHandle(fileName, { create: true });\n\t\t\tfileWriter = (await fileHandle.createWritable()).getWriter();\n\t\t\tspilled = true;\n\t\t\tfor (const chunk of memoryChunks) {\n\t\t\t\tawait fileWriter.write(chunk);\n\t\t\t}\n\t\t\tmemoryChunks.length = 0;\n\t\t}\n\n\t\tconst writable = new WritableStream({\n\t\t\tasync write(chunk) {\n\t\t\t\tif (spilled) {\n\t\t\t\t\tawait fileWriter.write(chunk);\n\t\t\t\t} else {\n\t\t\t\t\tmemoryChunks.push(chunk);\n\t\t\t\t\tbufferedSize += chunk.length;\n\t\t\t\t\tif (bufferedSize > thresholdBytes) {\n\t\t\t\t\t\tawait spillToFile();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\tasync close() {\n\t\t\t\tif (fileWriter) {\n\t\t\t\t\tawait fileWriter.close();\n\t\t\t\t\tfileWriter = null;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tlet memoryIndex = 0;\n\t\tconst readable = new ReadableStream({\n\t\t\tasync pull(controller) {\n\t\t\t\tif (spilled) {\n\t\t\t\t\tif (!fileReader) {\n\t\t\t\t\t\tconst file = await fileHandle.getFile();\n\t\t\t\t\t\tfileReader = file.stream().getReader();\n\t\t\t\t\t}\n\t\t\t\t\tconst { value, done } = await fileReader.read();\n\t\t\t\t\tif (done) {\n\t\t\t\t\t\tcontroller.close();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcontroller.enqueue(value);\n\t\t\t\t\t}\n\t\t\t\t} else if (memoryIndex < memoryChunks.length) {\n\t\t\t\t\tcontroller.enqueue(memoryChunks[memoryIndex++]);\n\t\t\t\t} else {\n\t\t\t\t\tcontroller.close();\n\t\t\t\t}\n\t\t\t},\n\t\t\tasync cancel(reason) {\n\t\t\t\tif (fileReader) {\n\t\t\t\t\tawait fileReader.cancel(reason);\n\t\t\t\t}\n\t\t\t}\n\t\t}, { highWaterMark: 0 });\n\t\tasync function dispose() {\n\t\t\tif (fileWriter) {\n\t\t\t\ttry {\n\t\t\t\t\tawait fileWriter.close();\n\t\t\t\t} catch {\n\t\t\t\t\t// ignored\n\t\t\t\t}\n\t\t\t\tfileWriter = null;\n\t\t\t}\n\t\t\tif (fileName) {\n\t\t\t\ttry {\n\t\t\t\t\tconst directoryHandle = await getTempDirectory();\n\t\t\t\t\tawait directoryHandle.removeEntry(fileName);\n\t\t\t\t} catch {\n\t\t\t\t\t// ignored\n\t\t\t\t}\n\t\t\t\tfileHandle = fileName = null;\n\t\t\t}\n\t\t\tmemoryChunks.length = 0;\n\t\t}\n\n\t\treturn { writable, readable, dispose };\n\t};\n}\n\nfunction getRandomFileName() {\n\tif (crypto.randomUUID) {\n\t\treturn crypto.randomUUID();\n\t}\n\treturn Array.from(crypto.getRandomValues(new Uint8Array(16)), byteValue => byteValue.toString(16).padStart(2, \"0\")).join(\"\");\n}\n","/*\n Copyright (c) 2025 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 ReadableStream, WritableStream, TransformStream */\n\nimport { streamToBlob } from \"./compatible-streams.js\";\n\nexport {\n\tcreateBlobTempStream\n};\n\nconst DEFAULT_THRESHOLD = 1024 * 1024;\n\nfunction createBlobTempStream(options = {}) {\n\tconst {\n\t\tthresholdBytes = DEFAULT_THRESHOLD\n\t} = options;\n\treturn function () {\n\t\tconst memoryChunks = [];\n\t\tlet bufferedSize = 0;\n\t\tlet spilled = false;\n\t\tlet blobWriter, blobPromise, blobReader;\n\n\t\tasync function spillToBlob() {\n\t\t\tconst transformStream = new TransformStream();\n\t\t\tblobPromise = streamToBlob(transformStream.readable);\n\t\t\tblobWriter = transformStream.writable.getWriter();\n\t\t\tspilled = true;\n\t\t\tfor (const chunk of memoryChunks) {\n\t\t\t\tawait blobWriter.write(chunk);\n\t\t\t}\n\t\t\tmemoryChunks.length = 0;\n\t\t}\n\n\t\tconst writable = new WritableStream({\n\t\t\tasync write(chunk) {\n\t\t\t\tif (spilled) {\n\t\t\t\t\tawait blobWriter.write(chunk);\n\t\t\t\t} else {\n\t\t\t\t\tmemoryChunks.push(chunk);\n\t\t\t\t\tbufferedSize += chunk.length;\n\t\t\t\t\tif (bufferedSize > thresholdBytes) {\n\t\t\t\t\t\tawait spillToBlob();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\tasync close() {\n\t\t\t\tif (blobWriter) {\n\t\t\t\t\tawait blobWriter.close();\n\t\t\t\t\tblobWriter = null;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tlet memoryIndex = 0;\n\t\tconst readable = new ReadableStream({\n\t\t\tasync pull(controller) {\n\t\t\t\tif (spilled) {\n\t\t\t\t\tif (!blobReader) {\n\t\t\t\t\t\tconst blob = await blobPromise;\n\t\t\t\t\t\tblobReader = blob.stream().getReader();\n\t\t\t\t\t}\n\t\t\t\t\tconst { value, done } = await blobReader.read();\n\t\t\t\t\tif (done) {\n\t\t\t\t\t\tcontroller.close();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcontroller.enqueue(value);\n\t\t\t\t\t}\n\t\t\t\t} else if (memoryIndex < memoryChunks.length) {\n\t\t\t\t\tcontroller.enqueue(memoryChunks[memoryIndex++]);\n\t\t\t\t} else {\n\t\t\t\t\tcontroller.close();\n\t\t\t\t}\n\t\t\t},\n\t\t\tasync cancel(reason) {\n\t\t\t\tif (blobReader) {\n\t\t\t\t\tawait blobReader.cancel(reason);\n\t\t\t\t}\n\t\t\t}\n\t\t}, { highWaterMark: 0 });\n\t\tasync function dispose() {\n\t\t\tif (blobWriter) {\n\t\t\t\ttry {\n\t\t\t\t\tawait blobWriter.abort();\n\t\t\t\t} catch {\n\t\t\t\t\t// ignored\n\t\t\t\t}\n\t\t\t\tblobWriter = null;\n\t\t\t}\n\t\t\tif (blobPromise) {\n\t\t\t\tblobPromise.catch(() => {\n\t\t\t\t\t// ignored\n\t\t\t\t});\n\t\t\t\tblobPromise = null;\n\t\t\t}\n\t\t\tmemoryChunks.length = 0;\n\t\t}\n\n\t\treturn { writable, readable, dispose };\n\t};\n}\n","/*\n Copyright (c) 2025 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, crypto, FileSystemFileHandle, ReadableStream, WritableStream */\n\nexport {\n\tcreateSyncAccessHandleTempStream,\n\tERR_UNSUPPORTED_CONTEXT\n};\n\nconst DEFAULT_THRESHOLD = 1024 * 1024;\nconst DEFAULT_DIRECTORY_NAME = \".zip.js-temp\";\nconst READ_CHUNK_SIZE = 512 * 1024;\nconst ERR_UNSUPPORTED_CONTEXT = \"createSyncAccessHandle is only available in dedicated workers\";\n\nfunction createSyncAccessHandleTempStream(options = {}) {\n\tconst {\n\t\tthresholdBytes = DEFAULT_THRESHOLD,\n\t\tdirectoryName = DEFAULT_DIRECTORY_NAME,\n\t\tgetDirectory\n\t} = options;\n\tif (!getDirectory &&\n\t\t(typeof FileSystemFileHandle == \"undefined\" || !FileSystemFileHandle.prototype.createSyncAccessHandle)) {\n\t\tthrow new Error(ERR_UNSUPPORTED_CONTEXT);\n\t}\n\tconst getRootDirectory = getDirectory || (() => navigator.storage.getDirectory());\n\tlet directoryHandlePromise;\n\tfunction getTempDirectory() {\n\t\tif (!directoryHandlePromise) {\n\t\t\tdirectoryHandlePromise = Promise.resolve(getRootDirectory())\n\t\t\t\t.then(root => root.getDirectoryHandle(directoryName, { create: true }));\n\t\t}\n\t\treturn directoryHandlePromise;\n\t}\n\treturn function () {\n\t\tconst memoryChunks = [];\n\t\tlet bufferedSize = 0;\n\t\tlet spilled = false;\n\t\tlet fileName, accessHandle;\n\t\tlet writeOffset = 0;\n\t\tlet readOffset = 0;\n\n\t\tasync function spillToFile() {\n\t\t\tconst directoryHandle = await getTempDirectory();\n\t\t\tfileName = getRandomFileName();\n\t\t\tconst fileHandle = await directoryHandle.getFileHandle(fileName, { create: true });\n\t\t\taccessHandle = await fileHandle.createSyncAccessHandle();\n\t\t\tspilled = true;\n\t\t\tfor (const chunk of memoryChunks) {\n\t\t\t\taccessHandle.write(chunk, { at: writeOffset });\n\t\t\t\twriteOffset += chunk.length;\n\t\t\t}\n\t\t\tmemoryChunks.length = 0;\n\t\t}\n\n\t\tconst writable = new WritableStream({\n\t\t\tasync write(chunk) {\n\t\t\t\tif (spilled) {\n\t\t\t\t\taccessHandle.write(chunk, { at: writeOffset });\n\t\t\t\t\twriteOffset += chunk.length;\n\t\t\t\t} else {\n\t\t\t\t\tmemoryChunks.push(chunk);\n\t\t\t\t\tbufferedSize += chunk.length;\n\t\t\t\t\tif (bufferedSize > thresholdBytes) {\n\t\t\t\t\t\tawait spillToFile();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\tclose() {\n\t\t\t\tif (accessHandle) {\n\t\t\t\t\taccessHandle.flush();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tlet memoryIndex = 0;\n\t\tconst readable = new ReadableStream({\n\t\t\tpull(controller) {\n\t\t\t\tif (spilled) {\n\t\t\t\t\tconst remaining = writeOffset - readOffset;\n\t\t\t\t\tif (remaining <= 0) {\n\t\t\t\t\t\tcontroller.close();\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tconst buffer = new Uint8Array(Math.min(READ_CHUNK_SIZE, remaining));\n\t\t\t\t\tconst read = accessHandle.read(buffer, { at: readOffset });\n\t\t\t\t\tif (read) {\n\t\t\t\t\t\treadOffset += read;\n\t\t\t\t\t\tcontroller.enqueue(buffer.subarray(0, read));\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcontroller.close();\n\t\t\t\t\t}\n\t\t\t\t} else if (memoryIndex < memoryChunks.length) {\n\t\t\t\t\tcontroller.enqueue(memoryChunks[memoryIndex++]);\n\t\t\t\t} else {\n\t\t\t\t\tcontroller.close();\n\t\t\t\t}\n\t\t\t}\n\t\t}, { highWaterMark: 0 });\n\t\tasync function dispose() {\n\t\t\tif (accessHandle) {\n\t\t\t\ttry {\n\t\t\t\t\taccessHandle.close();\n\t\t\t\t} catch {\n\t\t\t\t\t// ignored\n\t\t\t\t}\n\t\t\t\taccessHandle = null;\n\t\t\t}\n\t\t\tif (fileName) {\n\t\t\t\ttry {\n\t\t\t\t\tconst directoryHandle = await getTempDirectory();\n\t\t\t\t\tawait directoryHandle.removeEntry(fileName);\n\t\t\t\t} catch {\n\t\t\t\t\t// ignored\n\t\t\t\t}\n\t\t\t\tfileName = null;\n\t\t\t}\n\t\t\tmemoryChunks.length = 0;\n\t\t}\n\n\t\treturn { writable, readable, dispose };\n\t};\n}\n\nfunction getRandomFileName() {\n\tif (crypto.randomUUID) {\n\t\treturn crypto.randomUUID();\n\t}\n\treturn Array.from(crypto.getRandomValues(new Uint8Array(16)), byteValue => byteValue.toString(16).padStart(2, \"0\")).join(\"\");\n}\n","/*\n Copyright (c) 2025 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 { setDefaultConfiguration } from \"./core/configuration.js\";\nimport { configureZlibModule } from \"./core/zlib-streams-inline.js\";\n\nconfigureZlibModule(setDefaultConfiguration);\n\nexport * from \"./zip-module-wasm-base.js\";\n","const n=[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],t=[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],r=[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],e=[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],o=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],f=new Uint8Array(288);f.fill(8,0,144),f.fill(9,144,256),f.fill(7,256,280),f.fill(8,280,288);const b=new Uint8Array(30).fill(5);function l(n){const t=new Uint16Array(16);for(const r of n)t[r]++;t[0]=0;const r=new Uint16Array(17);for(let n=1;n<=15;n++)r[n+1]=r[n]+t[n];const e=new Uint16Array(n.length);for(let t=0;t<n.length;t++)n[t]&&(e[r[n[t]]++]=t);return{lengthCounts:t,symbols:e}}const p=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\";function s(s){let X;s({wasmURI:()=>(X||(X=\"data:application/wasm;base64,\"+function(n){let t=\"\";const r=n.length;let e=0;for(;e+2<r;e+=3){const r=n[e]<<16|n[e+1]<<8|n[e+2];t+=p[r>>18&63]+p[r>>12&63]+p[r>>6&63]+p[63&r]}const o=r-e;if(1===o){const r=n[e]<<16;t+=p[r>>18&63]+p[r>>12&63]+\"==\"}else if(2===o){const r=n[e]<<16|n[e+1]<<8;t+=p[r>>18&63]+p[r>>12&63]+p[r>>6&63]+\"=\"}return t}(function(p){let s=0,X=0,x=0,Y=new Uint8Array(1024),a=0,w=0;for(;!w;){w=U(1);const n=U(2);if(0==n)h();else if(1==n)P(l(f),l(b));else{if(2!=n)throw new Error(\"invalid deflate block type\");P(...B())}}return Y.subarray(0,a);function c(){if(s>=p.length)throw new Error(\"unexpected end of deflate data\");return p[s++]}function U(n){for(;x<n;)X|=c()<<x,x+=8;const t=X&(1<<n)-1;return X>>>=n,x-=n,t}function h(){X=0,x=0;const n=c()|c()<<8;s+=2,R(a+n);for(let t=0;t<n;t++)Y[a++]=c()}function P(o,f){let b=i(o);for(;256!=b;){if(b<256)R(a+1),Y[a++]=b;else{const o=b-257,l=n[o]+U(t[o]),p=i(f),s=r[p]+U(e[p]);R(a+l);const X=a-s;for(let n=0;n<l;n++)Y[a++]=Y[X+n]}b=i(o)}}function B(){const n=U(5)+257,t=U(5)+1,r=U(4)+4,e=new Uint8Array(19);for(let n=0;n<r;n++)e[o[n]]=U(3);const f=l(e),b=new Uint8Array(n+t);let p=0;for(;p<b.length;){const n=i(f);if(n<16)b[p++]=n;else if(16==n){const n=b[p-1];let t=U(2)+3;for(;t--;)b[p++]=n}else p+=17==n?U(3)+3:U(7)+11}return[l(b.subarray(0,n)),l(b.subarray(n))]}function i(n){const{lengthCounts:t,symbols:r}=n;let e=0,o=0,f=0;for(let n=1;n<=15;n++){e|=U(1);const b=t[n];if(e-o<b)return r[f+(e-o)];f+=b,o=o+b<<1,e<<=1}throw new Error(\"invalid huffman code\")}function R(n){if(Y.length<n){let t=2*Y.length;for(;t<n;)t*=2;const r=new Uint8Array(t);r.set(Y.subarray(0,a)),Y=r}}}(function(n){const t=(n=String(n).replace(/[^A-Za-z0-9+/=]/g,\"\")).length,r=[];for(let e=0;e<t;e+=4){const t=p.indexOf(n[e])<<18|p.indexOf(n[e+1])<<12|(63&p.indexOf(n[e+2]))<<6|63&p.indexOf(n[e+3]);r.push(t>>16&255),\"=\"!==n[e+2]&&r.push(t>>8&255),\"=\"!==n[e+3]&&r.push(255&t)}return new Uint8Array(r)}(\"zb19kF3HdSfW3bfvx3v3vXl3gAEwwIDAuRcQNZQ4AClRA4qkpWmIg+EQhKh19Ier4ioSAkcS7gMBvvdGIOWlOUPxw5BNaRGHUdEOa43YSqRykRUmy93IDncFr+m1dq3d0BttLROpUqpYZWsTpYrKslysFEOGv3P6vo/5AEAStsMp8N17++v06dOnT58+57Q63rtfK6X0fzp2r1lZUffqFb2CJ71yb7DCP3pF8aO6V+mVe+2KPKp7oxX+T6/cG6/0H63/1Y/olXtD/zX49LFEW6W1jSJtdM3UNf4zxtSM1irQQVAP0yAIlDKN0NjY2liFYRhqYwNjjTEqaupQaaViZZPAhvoBXa+HkdZfMV8xUaJXtHvhO2Ea/5ml6P6l+890v2xU4+Tpz586vrz08XtOLz2okvH+68nTJ5fv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Module};\n","/*\n Copyright (c) 2025 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 { FUNCTION_TYPE } from \"./core/constants.js\";\nimport { setDefaultConfiguration } from \"./core/configuration.js\";\nimport { configureWorker } from \"./core/codec-worker.js\";\nimport { terminateWorkers } from \"./core/codec-pool.js\";\nimport { setAESEngine } from \"./core/streams/aes-crypto-stream.js\";\nimport { initModule, resetWasmModule, createAESEngine, CompressionStreamZlib as CompressionStreamFallback, DecompressionStreamZlib as DecompressionStreamFallback } from \"./core/streams/zlib-wasm/zlib-streams-loader.js\";\n\nlet modulePromise;\n\nsetAESEngine(createAESEngine);\nconfigureWorker({\n\tinitModule: config => {\n\t\tif (!modulePromise) {\n\t\t\tlet { wasmURI } = config;\n\t\t\t// deno-lint-ignore valid-typeof\n\t\t\tif (typeof wasmURI == FUNCTION_TYPE) {\n\t\t\t\twasmURI = wasmURI();\n\t\t\t}\n\t\t\tmodulePromise = initModule(wasmURI, config).catch(error => {\n\t\t\t\tmodulePromise = null;\n\t\t\t\tthrow error;\n\t\t\t});\n\t\t}\n\t\treturn modulePromise;\n\t}\n});\nsetDefaultConfiguration({\n\tCompressionStreamFallback,\n\tDecompressionStreamFallback\n});\n\nexport { terminateWorkersAndModule as terminateWorkers };\n\nasync function terminateWorkersAndModule() {\n\tawait terminateWorkers();\n\tmodulePromise = null;\n\tresetWasmModule();\n}\n","/*\n Copyright (c) 2025 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 ReadableStream, WritableStream */\n\nconst FORMAT_DEFLATE = \"deflate\";\nconst FORMAT_DEFLATE_RAW = \"deflate-raw\";\nconst FORMAT_DEFLATE64_RAW = \"deflate64-raw\";\nconst FORMAT_GZIP = \"gzip\";\nconst Z_MEM_ERROR = -4;\nconst Z_MEM_ERROR_CODE = \"Z_MEM_ERROR\";\nconst COMPRESSION_FORMATS = [FORMAT_DEFLATE, FORMAT_DEFLATE_RAW, FORMAT_GZIP];\nconst DECOMPRESSION_FORMATS = [FORMAT_DEFLATE, FORMAT_DEFLATE_RAW, FORMAT_GZIP, FORMAT_DEFLATE64_RAW];\n\nlet wasm, malloc, free, memory, initError;\n\nexport function setWasmExports(wasmAPI) {\n\twasm = wasmAPI;\n\t({ malloc, free, memory } = wasm);\n\tif (typeof malloc !== \"function\" || typeof free !== \"function\" || !memory) {\n\t\twasm = malloc = free = memory = null;\n\t\tthrow new Error(\"Invalid WASM module\");\n\t}\n}\n\nexport function setInitError(error) {\n\tinitError = error;\n}\n\nexport function resetWasmExports() {\n\twasm = malloc = free = memory = initError = null;\n}\n\nfunction setZlibCode(error, result) {\n\tif (result === Z_MEM_ERROR) {\n\t\terror.code = Z_MEM_ERROR_CODE;\n\t}\n\treturn error;\n}\n\nfunction _make(isCompress, type, options = {}) {\n\tif (!(isCompress ? COMPRESSION_FORMATS : DECOMPRESSION_FORMATS).includes(type)) {\n\t\tthrow new TypeError(\"Unsupported format: \" + type);\n\t}\n\tif (!wasm) {\n\t\tconst error = new Error(\"WASM module not loaded\");\n\t\terror.cause = initError;\n\t\tthrow error;\n\t}\n\tconst level = (typeof options.level === \"number\") ? options.level : -1;\n\tconst outBufferSize = (typeof options.outBuffer === \"number\") ? options.outBuffer : 64 * 1024;\n\tconst inBufferSize = (typeof options.inBufferSize === \"number\") ? options.inBufferSize : 64 * 1024;\n\tconst state = { out: 0, in: 0, inBufferSize: 0, streamHandle: 0, streamEnded: false };\n\tlet readableController, writableController, resolveWrite, cancelReason;\n\tlet backpressure = true;\n\tlet cancelled = false;\n\tinitStream();\n\tconst readable = new ReadableStream({\n\t\tstart(controller) {\n\t\t\treadableController = controller;\n\t\t},\n\t\tpull() {\n\t\t\tbackpressure = false;\n\t\t\tresumeWrite();\n\t\t},\n\t\tcancel(reason) {\n\t\t\tcancelled = true;\n\t\t\tcancelReason = reason;\n\t\t\tdisposeStream(state);\n\t\t\twritableController.error(reason);\n\t\t\tresumeWrite();\n\t\t}\n\t}, { highWaterMark: 0 });\n\tconst writable = new WritableStream({\n\t\tstart(controller) {\n\t\t\twritableController = controller;\n\t\t},\n\t\tasync write(chunk) {\n\t\t\tif (backpressure) {\n\t\t\t\tawait new Promise(resolve => resolveWrite = resolve);\n\t\t\t}\n\t\t\tif (cancelled) {\n\t\t\t\tthrow cancelReason;\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tprocessChunk(chunk);\n\t\t\t} catch (error) {\n\t\t\t\tdisposeStream(state);\n\t\t\t\treadableController.error(error);\n\t\t\t\tthrow error;\n\t\t\t}\n\t\t},\n\t\tclose() {\n\t\t\tif (cancelled) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tflushStream();\n\t\t\t} catch (error) {\n\t\t\t\tdisposeStream(state);\n\t\t\t\treadableController.error(error);\n\t\t\t\tthrow error;\n\t\t\t}\n\t\t\tconst result = disposeStream(state);\n\t\t\tif (result !== 0) {\n\t\t\t\tconst error = setZlibCode(new Error(\"end error:\" + result), result);\n\t\t\t\treadableController.error(error);\n\t\t\t\tthrow error;\n\t\t\t}\n\t\t\treadableController.close();\n\t\t},\n\t\tabort(reason) {\n\t\t\tdisposeStream(state);\n\t\t\treadableController.error(reason);\n\t\t}\n\t}, { highWaterMark: 1 });\n\treturn { readable, writable };\n\n\tfunction initStream() {\n\t\ttry {\n\t\t\tlet result;\n\t\t\tstate.out = malloc(outBufferSize);\n\t\t\tstate.in = malloc(inBufferSize);\n\t\t\tstate.inBufferSize = inBufferSize;\n\t\t\tif (!state.out || !state.in) {\n\t\t\t\tthrow setZlibCode(new Error(\"allocation failed\"), Z_MEM_ERROR);\n\t\t\t}\n\t\t\tif (isCompress) {\n\t\t\t\tstate._process = wasm.deflate_process;\n\t\t\t\tstate._last_consumed = wasm.deflate_last_consumed;\n\t\t\t\tstate._end = wasm.deflate_end;\n\t\t\t\tstate.streamHandle = wasm.deflate_new();\n\t\t\t\tif (type === FORMAT_GZIP) {\n\t\t\t\t\tresult = wasm.deflate_init_gzip(state.streamHandle, level);\n\t\t\t\t} else if (type === FORMAT_DEFLATE_RAW) {\n\t\t\t\t\tresult = wasm.deflate_init_raw(state.streamHandle, level);\n\t\t\t\t} else {\n\t\t\t\t\tresult = wasm.deflate_init(state.streamHandle, level);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (type === FORMAT_DEFLATE64_RAW) {\n\t\t\t\t\tstate._process = wasm.inflate9_process;\n\t\t\t\t\tstate._last_consumed = wasm.inflate9_last_consumed;\n\t\t\t\t\tstate._end = wasm.inflate9_end;\n\t\t\t\t\tstate.streamHandle = wasm.inflate9_new();\n\t\t\t\t\tresult = wasm.inflate9_init_raw(state.streamHandle);\n\t\t\t\t} else {\n\t\t\t\t\tstate._process = wasm.inflate_process;\n\t\t\t\t\tstate._last_consumed = wasm.inflate_last_consumed;\n\t\t\t\t\tstate._end = wasm.inflate_end;\n\t\t\t\t\tstate.streamHandle = wasm.inflate_new();\n\t\t\t\t\tif (type === FORMAT_DEFLATE_RAW) {\n\t\t\t\t\t\tresult = wasm.inflate_init_raw(state.streamHandle);\n\t\t\t\t\t} else if (type === FORMAT_GZIP) {\n\t\t\t\t\t\tresult = wasm.inflate_init_gzip(state.streamHandle);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tresult = wasm.inflate_init(state.streamHandle);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (result !== 0) {\n\t\t\t\tthrow setZlibCode(new Error(\"init failed:\" + result), result);\n\t\t\t}\n\t\t} catch (error) {\n\t\t\tdisposeStream(state);\n\t\t\tthrow error;\n\t\t}\n\t}\n\n\tfunction processChunk(chunk) {\n\t\tconst heap = new Uint8Array(memory.buffer);\n\t\tconst process = state._process;\n\t\tconst last_consumed = state._last_consumed;\n\t\tconst out = state.out;\n\t\tlet offset = 0;\n\t\twhile (offset < chunk.length) {\n\t\t\tif (state.streamEnded) {\n\t\t\t\tthrow new Error(\"trailing data after the end of the stream\");\n\t\t\t}\n\t\t\tconst toRead = Math.min(chunk.length - offset, 32 * 1024);\n\t\t\tif (!state.in || state.inBufferSize < toRead) {\n\t\t\t\tif (state.in && free) {\n\t\t\t\t\tfree(state.in);\n\t\t\t\t\tstate.in = 0;\n\t\t\t\t}\n\t\t\t\tstate.in = malloc(toRead);\n\t\t\t\tstate.inBufferSize = toRead;\n\t\t\t\tif (!state.in) {\n\t\t\t\t\tthrow setZlibCode(new Error(\"allocation failed\"), Z_MEM_ERROR);\n\t\t\t\t}\n\t\t\t}\n\t\t\theap.set(chunk.subarray(offset, offset + toRead), state.in);\n\t\t\tconst result = process(state.streamHandle, state.in, toRead, out, outBufferSize, 0);\n\t\t\t// checked before the byte count is used, so a status code can never be read as one\n\t\t\tconst code = (result >> 24) & 0xff;\n\t\t\tconst signedCode = (code & 0x80) ? code - 256 : code;\n\t\t\tif (signedCode < 0) {\n\t\t\t\tthrow setZlibCode(new Error(\"process error:\" + signedCode), signedCode);\n\t\t\t}\n\t\t\tconst prod = result & 0x00ffffff;\n\t\t\tif (prod) {\n\t\t\t\tenqueue(heap.slice(out, out + prod));\n\t\t\t}\n\t\t\tconst consumed = last_consumed(state.streamHandle);\n\t\t\tif (code === 1) {\n\t\t\t\tstate.streamEnded = true;\n\t\t\t} else if (consumed === 0 && prod === 0) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\toffset += consumed;\n\t\t}\n\t}\n\n\tfunction flushStream() {\n\t\tconst heap = new Uint8Array(memory.buffer);\n\t\tconst process = state._process;\n\t\tconst out = state.out;\n\t\twhile (true) {\n\t\t\tconst result = process(state.streamHandle, 0, 0, out, outBufferSize, 4);\n\t\t\tconst code = (result >> 24) & 0xff;\n\t\t\tconst signedCode = (code & 0x80) ? code - 256 : code;\n\t\t\tif (signedCode < 0) {\n\t\t\t\tthrow setZlibCode(new Error(\"process error:\" + signedCode), signedCode);\n\t\t\t}\n\t\t\tconst produced = result & 0x00ffffff;\n\t\t\tif (produced) {\n\t\t\t\tenqueue(heap.slice(out, out + produced));\n\t\t\t}\n\t\t\tif (code === 1 || produced === 0) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction enqueue(chunk) {\n\t\tbackpressure = true;\n\t\treadableController.enqueue(chunk);\n\t}\n\n\tfunction resumeWrite() {\n\t\tif (resolveWrite) {\n\t\t\tconst resolve = resolveWrite;\n\t\t\tresolveWrite = null;\n\t\t\tresolve();\n\t\t}\n\t}\n\n\tfunction disposeStream(state) {\n\t\tlet endResult = 0;\n\t\tif (state.streamHandle && state._end) {\n\t\t\tendResult = state._end(state.streamHandle);\n\t\t}\n\t\tstate.streamHandle = 0;\n\t\tif (state.in && free) {\n\t\t\tfree(state.in);\n\t\t}\n\t\tstate.in = 0;\n\t\tif (state.out && free) {\n\t\t\tfree(state.out);\n\t\t}\n\t\tstate.out = 0;\n\t\treturn endResult;\n\t}\n}\n\nexport class CompressionStreamZlib {\n\tconstructor(type = FORMAT_DEFLATE, options) {\n\t\treturn _make(true, type, options);\n\t}\n}\nexport class DecompressionStreamZlib {\n\tconstructor(type = FORMAT_DEFLATE, options) {\n\t\treturn _make(false, type, options);\n\t}\n}\n// These codecs are backed by the WASM module; they are unusable until setWasmExports() has run.\n// The worker uses this flag to know it must fall back to the native CompressionStream when the\n// module fails to load, rather than discarding a self-contained codec supplied through config.\nCompressionStreamZlib.requiresModule = true;\nDecompressionStreamZlib.requiresModule = true;\n// Constructing these classes before the module is loaded throws, so capability probes cannot rely\n// on trying the constructor; the formats are declared instead, the lists _make() checks a format\n// against before anything else.\nCompressionStreamZlib.supportedFormats = COMPRESSION_FORMATS;\nDecompressionStreamZlib.supportedFormats = DECOMPRESSION_FORMATS;","/*\n Copyright (c) 2026 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 { FUNCTION_TYPE } from \"../../constants.js\";\nimport { createEngine as createDefaultEngine } from \"../codecs/aes-hmac-sha1.js\";\n\nconst BUFFER_LENGTH = 64 * 1024;\nconst DIGEST_LENGTH = 20;\n\nlet wasm, buffer;\n\nexport {\n\tsetWasmExports,\n\tresetWasmExports,\n\tcreateEngine\n};\n\nfunction setWasmExports(wasmAPI) {\n\t// deno-lint-ignore valid-typeof\n\tif (typeof wasmAPI.aes_hmac_new == FUNCTION_TYPE) {\n\t\twasm = wasmAPI;\n\t\tbuffer = 0;\n\t}\n}\n\nfunction resetWasmExports() {\n\twasm = null;\n\tbuffer = 0;\n}\n\nfunction createEngine(key, authenticationKey) {\n\tconst exports = wasm;\n\tlet context = exports ? createContext(exports, key, authenticationKey) : 0;\n\tif (!context) {\n\t\treturn createDefaultEngine(key, authenticationKey);\n\t}\n\tconst scratch = buffer;\n\treturn {\n\t\tprocess(data, decrypt) {\n\t\t\tfor (let offset = 0; offset < data.length; offset += BUFFER_LENGTH) {\n\t\t\t\tconst chunk = data.subarray(offset, offset + BUFFER_LENGTH);\n\t\t\t\tconst heap = getHeap(exports);\n\t\t\t\theap.set(chunk, scratch);\n\t\t\t\texports.aes_hmac_process(context, scratch, chunk.length, decrypt ? 1 : 0);\n\t\t\t\tchunk.set(heap.subarray(scratch, scratch + chunk.length));\n\t\t\t}\n\t\t},\n\t\tdigest() {\n\t\t\texports.aes_hmac_end(context, scratch);\n\t\t\tcontext = 0;\n\t\t\treturn getHeap(exports).slice(scratch, scratch + DIGEST_LENGTH);\n\t\t},\n\t\tdispose() {\n\t\t\tif (context) {\n\t\t\t\texports.aes_hmac_end(context, 0);\n\t\t\t\tcontext = 0;\n\t\t\t}\n\t\t}\n\t};\n}\n\nfunction createContext(exports, key, authenticationKey) {\n\tif (!buffer) {\n\t\tbuffer = exports.malloc(BUFFER_LENGTH);\n\t}\n\tconst context = buffer ? exports.aes_hmac_new() : 0;\n\tif (context) {\n\t\tconst heap = getHeap(exports);\n\t\theap.set(key, buffer);\n\t\theap.set(authenticationKey, buffer + key.length);\n\t\tif (exports.aes_hmac_init(context, buffer, key.length, buffer + key.length, authenticationKey.length)) {\n\t\t\texports.aes_hmac_end(context, 0);\n\t\t\treturn 0;\n\t\t}\n\t}\n\treturn context;\n}\n\nfunction getHeap(exports) {\n\treturn new Uint8Array(exports.memory.buffer);\n}\n","/*\n Copyright (c) 2025 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 WebAssembly, URL, fetch, atob */\n\nimport { setWasmExports, setInitError, resetWasmExports } from \"./zlib-streams.js\";\nimport { setWasmExports as setEngineWasmExports, resetWasmExports as resetEngineWasmExports } from \"./aes-hmac-sha1-wasm.js\";\n\nlet initializedModule = false;\n\nasync function initModule(wasmURI, { baseURI }) {\n\tif (!initializedModule) {\n\t\ttry {\n\t\t\tawait instantiateModule(wasmURI, baseURI);\n\t\t\tinitializedModule = true;\n\t\t} catch (error) {\n\t\t\tsetInitError(error);\n\t\t\tthrow error;\n\t\t}\n\t}\n}\n\nasync function instantiateModule(wasmURI, baseURI) {\n\tlet arrayBuffer, uri;\n\ttry {\n\t\ttry {\n\t\t\turi = new URL(wasmURI, baseURI);\n\t\t} catch {\n\t\t\t// ignored\n\t\t}\n\t\tconst response = await fetch(uri);\n\t\tarrayBuffer = await response.arrayBuffer();\n\t} catch (error) {\n\t\tif (wasmURI.startsWith(\"data:application/wasm;base64,\")) {\n\t\t\tarrayBuffer = arrayBufferFromDataURI(wasmURI);\n\t\t} else {\n\t\t\tthrow error;\n\t\t}\n\t}\n\tconst wasmInstance = await WebAssembly.instantiate(arrayBuffer);\n\tsetWasmExports(wasmInstance.instance.exports);\n\tsetEngineWasmExports(wasmInstance.instance.exports);\n}\n\nfunction resetWasmModule() {\n\tinitializedModule = false;\n\tresetWasmExports();\n\tresetEngineWasmExports();\n}\n\nfunction arrayBufferFromDataURI(dataURI) {\n\tconst base64 = dataURI.split(\",\")[1];\n\tconst binary = atob(base64);\n\tconst len = binary.length;\n\tconst bytes = new Uint8Array(len);\n\tfor (let i = 0; i < len; ++i) {\n\t\tbytes[i] = binary.charCodeAt(i);\n\t}\n\treturn bytes.buffer;\n}\n\nexport {\n\tCompressionStreamZlib,\n\tDecompressionStreamZlib\n} from \"./zlib-streams.js\";\nexport { createEngine as createAESEngine } from \"./aes-hmac-sha1-wasm.js\";\nexport {\n\tinitModule,\n\tresetWasmModule\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 WritableStream, AbortController */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tinitStream,\n\tReader,\n\tTextReader,\n\tTextWriter,\n\tgetTextSize,\n\tData64URIReader,\n\tData64URIWriter,\n\tUint8ArrayReader,\n\tUint8ArrayWriter,\n\tBlobReader,\n\tBlobWriter,\n\tHttpReader,\n\townsWritable\n} from \"./io.js\";\nimport {\n\tZipReader,\n\tERR_INVALID_PASSWORD,\n\tERR_ENCRYPTED,\n\tERR_INVALID_CRC32,\n\tERR_INVALID_UNCOMPRESSED_SIZE,\n\tERR_INVALID_COMPRESSED_DATA\n} from \"./zip-reader.js\";\nimport {\n\tZipWriter,\n\tgetEntriesSize,\n\tgetSourceEntryOptions\n} from \"./zip-writer.js\";\nimport {\n\tEntry\n} from \"./zip-entry.js\";\nimport { checkSignalOption, throwIfAborted, checkPassThroughOption, PASS_THROUGH_COMPRESSED } from \"./options.js\";\nimport { ProgressWatcherStream, callHandler } from \"./codec-worker.js\";\nimport {\n\tUNDEFINED_VALUE,\n\tFUNCTION_TYPE,\n\tOBJECT_TYPE,\n\tSTRING_TYPE\n} from \"./constants.js\";\nimport { toExactUint8Array } from \"./util/array.js\";\nimport { toCompatibleReadable, toCompatibleWritable } from \"./util/compatible-streams.js\";\nimport { isErrorObject } from \"./util/error.js\";\n\nconst ERR_ENTRY_EXISTS = \"Entry filename already exists\";\nconst ERR_DUPLICATE_IMPORTED_ENTRY = \"Duplicate entry filename in the imported zip file\";\nconst ERR_INVALID_DUPLICATES = \"Invalid duplicates option (must be \\\"throw\\\", \\\"keep-first\\\" or \\\"keep-last\\\")\";\nconst ERR_ANCESTOR_ENTRY = \"Entry is an ancestor of target entry\";\nconst ERR_ROOT_DIRECTORY_NOT_MOVABLE = \"Root directory cannot be moved\";\nconst ERR_TARGET_NOT_DIRECTORY = \"Target entry is not a directory\";\nconst ERR_PARENT_NOT_DIRECTORY = \"Parent entry is not a directory\";\nconst ERR_READABLE_CONSUMED = \"Readable stream already consumed\";\nconst DUPLICATES_THROW = \"throw\";\nconst DUPLICATES_KEEP_FIRST = \"keep-first\";\nconst DUPLICATES_KEEP_LAST = \"keep-last\";\nconst DUPLICATES_VALUES = new Set([DUPLICATES_THROW, DUPLICATES_KEEP_FIRST, DUPLICATES_KEEP_LAST]);\nconst ERR_INVALID_PASS_THROUGH = \"Invalid passThrough option (use readerOptions.passThrough or set uncompressedSize for each entry)\";\nconst ERR_INVALID_READER_OPTIONS = \"Invalid readerOptions (must be an object)\";\nconst ERR_UNSUPPORTED_PASS_THROUGH_VALUE = \"The 'compressed' passThrough option is only supported by Entry#getData() and ZipWriter#add()\";\nconst ERR_INVALID_PASSWORDS = \"Invalid passwords option (must be an array of strings)\";\nconst ERR_INVALID_REQUEST_PASSWORD = \"Invalid requestPassword option (must be a function returning a string or undefined)\";\nconst ERR_ABORT_EXPORT = \"zipjs-abort-export\";\nconst ABORT_ERROR_NAME = \"AbortError\";\nconst EMPTY_RAW_PASSWORD = new Uint8Array(0);\nconst FALSE_ACCEPT_ERRORS = new Set([ERR_INVALID_CRC32, ERR_INVALID_UNCOMPRESSED_SIZE, ERR_INVALID_COMPRESSED_DATA]);\n\nclass ZipEntry {\n\n\tconstructor(fs, name, params, parent) {\n\t\tconst zipEntry = this;\n\t\tif (fs.root && parent && parent.getChildByName(name)) {\n\t\t\tthrow new Error(ERR_ENTRY_EXISTS);\n\t\t}\n\t\tif (!params) {\n\t\t\tparams = {};\n\t\t}\n\t\tObject.assign(zipEntry, {\n\t\t\tfs,\n\t\t\tname,\n\t\t\tdata: params.data,\n\t\t\toptions: params.options && Object.assign({}, params.options),\n\t\t\tid: fs.entryIdCounter++,\n\t\t\tparent,\n\t\t\tchildren: [],\n\t\t\tuncompressedSize: params.uncompressedSize || 0,\n\t\t\tundeterminedSize: params.undeterminedSize || params.uncompressedSize === UNDEFINED_VALUE,\n\t\t\tpassThrough: params.passThrough,\n\t\t\tdefaultLastModDate: params.defaultLastModDate || new Date()\n\t\t});\n\t\tif (parent || !fs.root) {\n\t\t\tfs.entries[zipEntry.id] = zipEntry;\n\t\t}\n\t\tif (parent) {\n\t\t\tzipEntry.parent.children.push(zipEntry);\n\t\t}\n\t}\n\n\tgetFullname() {\n\t\treturn this.getRelativeName();\n\t}\n\n\tgetRelativeName(ancestor = this.fs.root) {\n\t\tconst zipEntry = this;\n\t\tlet relativeName = zipEntry.name;\n\t\tlet entry = zipEntry.parent;\n\t\twhile (entry && entry != ancestor) {\n\t\t\trelativeName = (entry.name ? entry.name + \"/\" : \"\") + relativeName;\n\t\t\tentry = entry.parent;\n\t\t}\n\t\treturn relativeName;\n\t}\n\n\tisDescendantOf(ancestor) {\n\t\tlet entry = this.parent;\n\t\twhile (entry && entry.id != ancestor.id) {\n\t\t\tentry = entry.parent;\n\t\t}\n\t\treturn Boolean(entry);\n\t}\n\n\trename(name) {\n\t\tconst zipEntry = this;\n\t\tlet parent = zipEntry.parent;\n\t\tif (parent) {\n\t\t\tconst path = splitPath(name);\n\t\t\tif (path) {\n\t\t\t\tname = path.pop();\n\t\t\t\tparent = getPathParent(parent, path, zipEntry);\n\t\t\t}\n\t\t\tconst existingChild = parent.getChildByName(name);\n\t\t\tif (existingChild && existingChild != zipEntry) {\n\t\t\t\tthrow new Error(ERR_ENTRY_EXISTS);\n\t\t\t}\n\t\t\tif (parent != zipEntry.parent) {\n\t\t\t\tdetach(zipEntry);\n\t\t\t\tzipEntry.parent = parent;\n\t\t\t\tparent.children.push(zipEntry);\n\t\t\t\tregisterEntries(zipEntry.fs, zipEntry);\n\t\t\t}\n\t\t}\n\t\tzipEntry.name = name;\n\t}\n\n\tsetOptions(options) {\n\t\tconst entryOptions = Object.assign({}, this.options, options);\n\t\tthis.options = Object.fromEntries(Object.entries(entryOptions).filter(([, value]) => value !== UNDEFINED_VALUE));\n\t}\n}\n\nclass ZipFileEntry extends ZipEntry {\n\n\tconstructor(fs, name, params, parent) {\n\t\tsuper(fs, name, params, parent);\n\t\tconst zipEntry = this;\n\t\tzipEntry.Reader = params.Reader;\n\t\tzipEntry.Writer = params.Writer;\n\t\tif (params.getData) {\n\t\t\tzipEntry.getData = params.getData;\n\t\t}\n\t}\n\n\tclone() {\n\t\treturn new ZipFileEntry(this.fs, this.name, this);\n\t}\n\n\tasync getData(writer, options = {}) {\n\t\tconst zipEntry = this;\n\t\tif (!writer || (writer.constructor == zipEntry.Writer && zipEntry.data && keepsContentType(writer, zipEntry.data))) {\n\t\t\treturn zipEntry.data;\n\t\t} else {\n\t\t\tconst reader = zipEntry.reader = createReader(zipEntry.Reader, zipEntry.data, options);\n\t\t\tconst dataSize = zipEntry.uncompressedSize || reader.size;\n\t\t\tawait Promise.all([initStream(reader), initStream(writer, dataSize)]);\n\t\t\tconst signal = checkSignalOption(options.signal);\n\t\t\tconst readable = createProgressReadable(zipEntry, reader, options, signal);\n\t\t\tconst preventClose = !ownsWritable(writer) && Boolean(options.preventClose);\n\t\t\tzipEntry.uncompressedSize = reader.size;\n\t\t\tawait toCompatibleReadable(readable).pipeTo(toCompatibleWritable(writer.writable), { signal, preventClose, preventAbort: preventClose });\n\t\t\treturn writer.getData ? writer.getData() : writer.writable;\n\t\t}\n\t}\n\n\tisPasswordProtected() {\n\t\treturn Boolean(this.data && this.data.encrypted);\n\t}\n\n\tasync checkPassword(password, options = {}) {\n\t\tconst zipEntry = this;\n\t\tif (zipEntry.isPasswordProtected()) {\n\t\t\ttry {\n\t\t\t\tawait zipEntry.data.getData(null, Object.assign({}, options, {\n\t\t\t\t\tpassword,\n\t\t\t\t\tcheckPasswordOnly: true\n\t\t\t\t}));\n\t\t\t\treturn true;\n\t\t\t} catch (error) {\n\t\t\t\tif (isErrorObject(error) && error.message == ERR_INVALID_PASSWORD) {\n\t\t\t\t\treturn false;\n\t\t\t\t} else {\n\t\t\t\t\tthrow error;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\treturn true;\n\t\t}\n\t}\n\n\tgetText(encoding, options) {\n\t\treturn this.getData(new TextWriter(encoding), options);\n\t}\n\n\tgetBlob(mimeType, options) {\n\t\treturn this.getData(new BlobWriter(mimeType), options);\n\t}\n\n\tgetData64URI(mimeType, options) {\n\t\treturn this.getData(new Data64URIWriter(mimeType), options);\n\t}\n\n\tgetUint8Array(options) {\n\t\treturn this.getData(new Uint8ArrayWriter(), options);\n\t}\n\n\tgetWritable(writable = new WritableStream(), options) {\n\t\treturn this.getData({ writable }, options);\n\t}\n\n\tasync getArrayBuffer(options) {\n\t\tconst array = await this.getUint8Array(options);\n\t\treturn toExactUint8Array(array).buffer;\n\t}\n\n\treplaceBlob(blob) {\n\t\treplaceContent(this, {\n\t\t\tdata: blob,\n\t\t\tReader: BlobReader,\n\t\t\tWriter: BlobWriter,\n\t\t\tuncompressedSize: blob.size\n\t\t});\n\t}\n\n\treplaceText(text) {\n\t\treplaceContent(this, {\n\t\t\tdata: text,\n\t\t\tReader: TextReader,\n\t\t\tWriter: TextWriter,\n\t\t\tuncompressedSize: getTextSize(text)\n\t\t});\n\t}\n\n\treplaceData64URI(dataURI) {\n\t\treplaceContent(this, {\n\t\t\tdata: dataURI,\n\t\t\tReader: Data64URIReader,\n\t\t\tWriter: Data64URIWriter,\n\t\t\tuncompressedSize: getData64URISize(dataURI)\n\t\t});\n\t}\n\n\treplaceUint8Array(array) {\n\t\treplaceContent(this, {\n\t\t\tdata: array,\n\t\t\tReader: Uint8ArrayReader,\n\t\t\tWriter: Uint8ArrayWriter,\n\t\t\tuncompressedSize: array.length\n\t\t});\n\t}\n\n\treplaceReadable(readable) {\n\t\treplaceContent(this, {\n\t\t\tdata: null,\n\t\t\tReader: getReadableReader(readable),\n\t\t\tWriter: null,\n\t\t\tuncompressedSize: UNDEFINED_VALUE\n\t\t});\n\t}\n}\n\nclass ZipDirectoryEntry extends ZipEntry {\n\n\tconstructor(fs, name, params, parent) {\n\t\tsuper(fs, name, params, parent);\n\t\tthis.directory = true;\n\t}\n\n\tclone(deepClone) {\n\t\tconst zipEntry = this;\n\t\tconst clonedEntry = new ZipDirectoryEntry(zipEntry.fs, zipEntry.name, zipEntry);\n\t\tif (deepClone) {\n\t\t\tclonedEntry.children = zipEntry.children.map(child => {\n\t\t\t\tconst childClone = child.clone(deepClone);\n\t\t\t\tchildClone.parent = clonedEntry;\n\t\t\t\treturn childClone;\n\t\t\t});\n\t\t}\n\t\treturn clonedEntry;\n\t}\n\n\taddDirectory(name, options) {\n\t\treturn addChild(this, name, { options }, true);\n\t}\n\n\taddText(name, text, options = {}) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: text,\n\t\t\tReader: TextReader,\n\t\t\tWriter: TextWriter,\n\t\t\toptions,\n\t\t\tuncompressedSize: getTextSize(text)\n\t\t});\n\t}\n\n\taddBlob(name, blob, options = {}) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: blob,\n\t\t\tReader: BlobReader,\n\t\t\tWriter: BlobWriter,\n\t\t\toptions,\n\t\t\tuncompressedSize: blob.size\n\t\t});\n\t}\n\n\taddData64URI(name, dataURI, options = {}) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: dataURI,\n\t\t\tReader: Data64URIReader,\n\t\t\tWriter: Data64URIWriter,\n\t\t\toptions,\n\t\t\tuncompressedSize: getData64URISize(dataURI)\n\t\t});\n\t}\n\n\taddUint8Array(name, array, options = {}) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: array,\n\t\t\tReader: Uint8ArrayReader,\n\t\t\tWriter: Uint8ArrayWriter,\n\t\t\toptions,\n\t\t\tuncompressedSize: array.length\n\t\t});\n\t}\n\n\taddHttpContent(name, url, options = {}) {\n\t\treturn addChild(this, name, {\n\t\t\tdata: url,\n\t\t\tReader: class extends HttpReader {\n\t\t\t\tconstructor(url) {\n\t\t\t\t\tsuper(url, options);\n\t\t\t\t}\n\t\t\t},\n\t\t\toptions\n\t\t});\n\t}\n\n\taddReadable(name, readable, options = {}) {\n\t\treturn addChild(this, name, {\n\t\t\tReader: getReadableReader(readable),\n\t\t\toptions\n\t\t});\n\t}\n\n\taddFileSystemEntry(fileSystemEntry, options = {}) {\n\t\treturn addFileSystemHandle(this, fileSystemEntry, options);\n\t}\n\n\taddFileSystemHandle(handle, options = {}) {\n\t\treturn addFileSystemHandle(this, handle, options);\n\t}\n\n\taddFile(file, options = {}) {\n\t\toptions = Object.assign({}, options);\n\t\tif (!options.lastModDate) {\n\t\t\toptions.lastModDate = new Date(file.lastModified);\n\t\t}\n\t\treturn addChild(this, file.name, {\n\t\t\tdata: file,\n\t\t\tReader: function () {\n\t\t\t\tconst readable = file.stream();\n\t\t\t\tconst size = file.size;\n\t\t\t\treturn { readable, size };\n\t\t\t},\n\t\t\toptions,\n\t\t\tuncompressedSize: file.size\n\t\t});\n\t}\n\n\timportBlob(blob, options) {\n\t\treturn this.importZip(new BlobReader(blob), options);\n\t}\n\n\timportData64URI(dataURI, options) {\n\t\treturn this.importZip(new Data64URIReader(dataURI), options);\n\t}\n\n\timportUint8Array(array, options) {\n\t\treturn this.importZip(new Uint8ArrayReader(array), options);\n\t}\n\n\timportHttpContent(url, options) {\n\t\treturn this.importZip(new HttpReader(url, options), options);\n\t}\n\n\timportReadable(readable, options) {\n\t\treturn this.importZip({ readable }, options);\n\t}\n\n\texportBlob(options = {}) {\n\t\treturn this.exportZip(new BlobWriter(options.mimeType || \"application/zip\"), options);\n\t}\n\n\texportData64URI(options = {}) {\n\t\treturn this.exportZip(new Data64URIWriter(options.mimeType || \"application/zip\"), options);\n\t}\n\n\texportUint8Array(options = {}) {\n\t\treturn this.exportZip(new Uint8ArrayWriter(), options);\n\t}\n\n\tasync exportWritable(writable = new WritableStream(), options = {}) {\n\t\tawait this.exportZip({ writable }, options);\n\t\treturn writable;\n\t}\n\n\texportFileSystemHandle(handle, options = {}) {\n\t\treturn exportFileSystemHandle(this, handle, options);\n\t}\n\n\tasync importZip(reader, options = {}) {\n\t\tlet zipReader;\n\t\tif (reader && typeof reader.getEntries == FUNCTION_TYPE) {\n\t\t\tzipReader = reader;\n\t\t\toptions = Object.assign({}, zipReader.options, options);\n\t\t} else {\n\t\t\tawait initStream(reader);\n\t\t\tzipReader = new ZipReader(reader, options);\n\t\t}\n\t\tcheckPassThroughValue(options.passThrough);\n\t\tcheckPasswordCandidatesOptions(options);\n\t\tconst duplicates = checkDuplicatesOption(options.duplicates);\n\t\tconst importedEntries = [];\n\t\tconst passwordState = { known: [] };\n\t\tconst entries = await zipReader.getEntries(options);\n\t\tfor (const entry of entries) {\n\t\t\tlet parent = this;\n\t\t\ttry {\n\t\t\t\tconst path = entry.filename.split(\"/\").filter(pathPart => pathPart != \"\" && pathPart != \".\");\n\t\t\t\tconst name = path.pop();\n\t\t\t\tlet skippedEntry = false;\n\t\t\t\tfor (const pathPart of path) {\n\t\t\t\t\tconst previousParent = parent;\n\t\t\t\t\tparent = parent.getChildByName(pathPart);\n\t\t\t\t\tif (parent) {\n\t\t\t\t\t\tif (!parent.directory) {\n\t\t\t\t\t\t\tif (duplicates == DUPLICATES_KEEP_FIRST) {\n\t\t\t\t\t\t\t\tskippedEntry = true;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t} else if (duplicates == DUPLICATES_KEEP_LAST) {\n\t\t\t\t\t\t\t\tthis.fs.remove(parent);\n\t\t\t\t\t\t\t\tparent = new ZipDirectoryEntry(this.fs, pathPart, { data: null }, previousParent);\n\t\t\t\t\t\t\t\timportedEntries.push(parent);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthrow new Error(ERR_DUPLICATE_IMPORTED_ENTRY);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tparent = new ZipDirectoryEntry(this.fs, pathPart, { data: null }, previousParent);\n\t\t\t\t\t\timportedEntries.push(parent);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (skippedEntry) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (!entry.directory) {\n\t\t\t\t\tconst existingChild = parent.getChildByName(name);\n\t\t\t\t\tif (existingChild) {\n\t\t\t\t\t\tif (duplicates == DUPLICATES_KEEP_FIRST) {\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t} else if (duplicates == DUPLICATES_KEEP_LAST) {\n\t\t\t\t\t\t\tthis.fs.remove(existingChild);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthrow new Error(ERR_DUPLICATE_IMPORTED_ENTRY);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\timportedEntries.push(addChild(parent, name, {\n\t\t\t\t\t\tdata: entry,\n\t\t\t\t\t\tReader: getZipBlobReader(Object.assign({}, options), passwordState),\n\t\t\t\t\t\tuncompressedSize: options.passThrough ? entry.compressedSize : entry.uncompressedSize,\n\t\t\t\t\t\tpassThrough: options.passThrough\n\t\t\t\t\t}));\n\t\t\t\t} else {\n\t\t\t\t\tlet directoryEntry = parent;\n\t\t\t\t\tif (name) {\n\t\t\t\t\t\tdirectoryEntry = parent.getChildByName(name);\n\t\t\t\t\t\tif (directoryEntry && (!directoryEntry.directory || directoryEntry.data)) {\n\t\t\t\t\t\t\tif (duplicates == DUPLICATES_KEEP_FIRST) {\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t} else if (duplicates == DUPLICATES_KEEP_LAST) {\n\t\t\t\t\t\t\t\tif (directoryEntry.directory) {\n\t\t\t\t\t\t\t\t\tdirectoryEntry.data = entry;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tthis.fs.remove(directoryEntry);\n\t\t\t\t\t\t\t\t\tdirectoryEntry = UNDEFINED_VALUE;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthrow new Error(ERR_DUPLICATE_IMPORTED_ENTRY);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (!directoryEntry) {\n\t\t\t\t\t\t\tdirectoryEntry = new ZipDirectoryEntry(this.fs, name, { data: null }, parent);\n\t\t\t\t\t\t\timportedEntries.push(directoryEntry);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (directoryEntry != this && !directoryEntry.data) {\n\t\t\t\t\t\tdirectoryEntry.data = entry;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (error) {\n\t\t\t\timportedEntries.reverse().forEach(importedEntry => this.fs.remove(importedEntry));\n\t\t\t\ttry {\n\t\t\t\t\terror.cause = {\n\t\t\t\t\t\tentry\n\t\t\t\t\t};\n\t\t\t\t} catch {\n\t\t\t\t\t// ignored\n\t\t\t\t}\n\t\t\t\tthrow error;\n\t\t\t}\n\t\t}\n\t\treturn importedEntries;\n\t}\n\n\tasync exportZip(writer, options = {}) {\n\t\tconst zipEntry = this;\n\t\tconst zipWriterProvided = Boolean(writer) && typeof writer.add == FUNCTION_TYPE;\n\t\toptions = Object.assign({}, options);\n\t\tif (!zipWriterProvided && options.bufferedWrite === UNDEFINED_VALUE) {\n\t\t\toptions.bufferedWrite = true;\n\t\t}\n\t\tconst [readers] = await Promise.all([\n\t\t\tinitReaders(zipEntry, checkReaderOptions(options.readerOptions)),\n\t\t\tzipWriterProvided ? UNDEFINED_VALUE : initStream(writer)\n\t\t]);\n\t\tconst zipWriter = zipWriterProvided ? writer : new ZipWriter(writer, options);\n\t\tawait exportZip(zipWriter, zipEntry, getTotalSize([zipEntry], getUncompressedSize), options, readers);\n\t\tif (zipWriterProvided) {\n\t\t\treturn zipWriter;\n\t\t}\n\t\tawait zipWriter.close(options.globalComment);\n\t\treturn writer.getData ? writer.getData() : writer.writable;\n\t}\n\n\tasync getExportedSize(options = {}) {\n\t\tconst zipEntry = this;\n\t\toptions = Object.assign({}, options);\n\t\tcheckReaderOptions(options.readerOptions);\n\t\tif (options.bufferedWrite === UNDEFINED_VALUE) {\n\t\t\toptions.bufferedWrite = true;\n\t\t}\n\t\tconst children = zipEntry.getChildren({ recursive: true });\n\t\tconst entries = children.filter(child => !isImplicitDirectory(child)).map(child => {\n\t\t\tconst { name, entryOptions } = getChildEntryOptions(child, zipEntry, options);\n\t\t\treturn { name, size: child.directory ? 0 : getDeterminedSize(child, isPassThrough(child, options)), options: entryOptions };\n\t\t});\n\t\tconst writeOrderGuaranteed = !options.bufferedWrite ||\n\t\t\t(entries.every(entry => entry.options.keepOrder !== false) &&\n\t\t\t\tchildren.every(child => isImplicitDirectory(child) || !child.children.length));\n\t\treturn await getEntriesSize(options, entries, writeOrderGuaranteed, options.globalComment);\n\t}\n\n\tgetChildByName(name) {\n\t\tconst children = this.children;\n\t\tfor (let childIndex = 0; childIndex < children.length; childIndex++) {\n\t\t\tconst child = children[childIndex];\n\t\t\tif (child.name == name) {\n\t\t\t\treturn child;\n\t\t\t}\n\t\t}\n\t}\n\n\tgetChildren(options = {}) {\n\t\treturn collectChildren(this, options.recursive);\n\t}\n\n\tisPasswordProtected() {\n\t\tconst children = this.children;\n\t\tfor (let childIndex = 0; childIndex < children.length; childIndex++) {\n\t\t\tconst child = children[childIndex];\n\t\t\tif (child.isPasswordProtected()) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}\n\n\tasync checkPassword(password, options = {}) {\n\t\tconst children = this.children;\n\t\tconst result = await Promise.all(children.map(child => child.checkPassword(password, options)));\n\t\treturn !result.includes(false);\n\t}\n}\n\n\nclass ZipFS {\n\n\tconstructor() {\n\t\tresetFS(this);\n\t}\n\n\tget children() {\n\t\treturn this.root.children;\n\t}\n\n\tremove(entry) {\n\t\tdetach(entry);\n\t\tconst removedEntries = [entry];\n\t\twhile (removedEntries.length) {\n\t\t\tconst removedEntry = removedEntries.pop();\n\t\t\tthis.entries[removedEntry.id] = null;\n\t\t\tfor (const child of removedEntry.children) {\n\t\t\t\tremovedEntries.push(child);\n\t\t\t}\n\t\t}\n\t\tentry.parent = UNDEFINED_VALUE;\n\t}\n\n\tmove(entry, destination) {\n\t\tif (entry == this.root) {\n\t\t\tthrow new Error(ERR_ROOT_DIRECTORY_NOT_MOVABLE);\n\t\t} else {\n\t\t\tif (destination.directory) {\n\t\t\t\tif (!destination.isDescendantOf(entry)) {\n\t\t\t\t\tif (entry != destination) {\n\t\t\t\t\t\tconst existingChild = destination.getChildByName(entry.name);\n\t\t\t\t\t\tif (existingChild) {\n\t\t\t\t\t\t\tif (existingChild != entry) {\n\t\t\t\t\t\t\t\tthrow new Error(ERR_ENTRY_EXISTS);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tdetach(entry);\n\t\t\t\t\t\t\tentry.parent = destination;\n\t\t\t\t\t\t\tdestination.children.push(entry);\n\t\t\t\t\t\t\tregisterEntries(this, entry);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tthrow new Error(ERR_ANCESTOR_ENTRY);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthrow new Error(ERR_TARGET_NOT_DIRECTORY);\n\t\t\t}\n\t\t}\n\t}\n\n\tfind(fullname) {\n\t\tconst path = fullname.split(\"/\");\n\t\tlet node = this.root;\n\t\tfor (let index = 0; node && index < path.length; index++) {\n\t\t\tnode = node.directory ? node.getChildByName(path[index]) : UNDEFINED_VALUE;\n\t\t}\n\t\tif (!node) {\n\t\t\tnode = this.entries.find(entry => entry && (entry == this.root || entry.isDescendantOf(this.root)) &&\n\t\t\t\tentry.getRelativeName() == fullname);\n\t\t}\n\t\treturn node;\n\t}\n\n\tgetById(id) {\n\t\treturn this.entries[id];\n\t}\n\n\tgetChildByName(name) {\n\t\treturn this.root.getChildByName(name);\n\t}\n\n\tgetChildren(options) {\n\t\treturn this.root.getChildren(options);\n\t}\n\n\taddDirectory(name, options) {\n\t\treturn this.root.addDirectory(name, options);\n\t}\n\n\taddText(name, text, options) {\n\t\treturn this.root.addText(name, text, options);\n\t}\n\n\taddBlob(name, blob, options) {\n\t\treturn this.root.addBlob(name, blob, options);\n\t}\n\n\taddData64URI(name, dataURI, options) {\n\t\treturn this.root.addData64URI(name, dataURI, options);\n\t}\n\n\taddUint8Array(name, array, options) {\n\t\treturn this.root.addUint8Array(name, array, options);\n\t}\n\n\taddHttpContent(name, url, options) {\n\t\treturn this.root.addHttpContent(name, url, options);\n\t}\n\n\taddReadable(name, readable, options) {\n\t\treturn this.root.addReadable(name, readable, options);\n\t}\n\n\taddFileSystemEntry(fileSystemEntry, options) {\n\t\treturn this.root.addFileSystemEntry(fileSystemEntry, options);\n\t}\n\n\taddFileSystemHandle(handle, options) {\n\t\treturn this.root.addFileSystemHandle(handle, options);\n\t}\n\n\taddFile(file, options) {\n\t\treturn this.root.addFile(file, options);\n\t}\n\n\timportBlob(blob, options) {\n\t\treturn resetAndImport(this, root => root.importBlob(blob, options));\n\t}\n\n\timportData64URI(dataURI, options) {\n\t\treturn resetAndImport(this, root => root.importData64URI(dataURI, options));\n\t}\n\n\timportUint8Array(array, options) {\n\t\treturn resetAndImport(this, root => root.importUint8Array(array, options));\n\t}\n\n\timportHttpContent(url, options) {\n\t\treturn resetAndImport(this, root => root.importHttpContent(url, options));\n\t}\n\n\timportReadable(readable, options) {\n\t\treturn resetAndImport(this, root => root.importReadable(readable, options));\n\t}\n\n\timportZip(reader, options) {\n\t\treturn resetAndImport(this, root => root.importZip(reader, options));\n\t}\n\n\texportBlob(options) {\n\t\treturn this.root.exportBlob(options);\n\t}\n\n\texportData64URI(options) {\n\t\treturn this.root.exportData64URI(options);\n\t}\n\n\texportUint8Array(options) {\n\t\treturn this.root.exportUint8Array(options);\n\t}\n\n\texportWritable(writable, options) {\n\t\treturn this.root.exportWritable(writable, options);\n\t}\n\n\texportFileSystemHandle(handle, options) {\n\t\treturn this.root.exportFileSystemHandle(handle, options);\n\t}\n\n\texportZip(writer, options) {\n\t\treturn this.root.exportZip(writer, options);\n\t}\n\n\tgetExportedSize(options) {\n\t\treturn this.root.getExportedSize(options);\n\t}\n\n\tisPasswordProtected() {\n\t\treturn this.root.isPasswordProtected();\n\t}\n\n\tcheckPassword(password, options) {\n\t\treturn this.root.checkPassword(password, options);\n\t}\n}\n\nconst fs = { FS: ZipFS, ZipDirectoryEntry, ZipFileEntry };\nexport { ZipFS, ZipEntry, ZipFileEntry, ZipDirectoryEntry, fs, ERR_ENTRY_EXISTS, ERR_DUPLICATE_IMPORTED_ENTRY, ERR_INVALID_DUPLICATES, ERR_READABLE_CONSUMED, ERR_INVALID_PASS_THROUGH, ERR_UNSUPPORTED_PASS_THROUGH_VALUE, ERR_INVALID_READER_OPTIONS, ERR_INVALID_PASSWORDS, ERR_INVALID_REQUEST_PASSWORD, ERR_ANCESTOR_ENTRY, ERR_ROOT_DIRECTORY_NOT_MOVABLE, ERR_TARGET_NOT_DIRECTORY, ERR_PARENT_NOT_DIRECTORY };\n\nfunction getTotalSize(entries, getEntrySize) {\n\tlet size = 0;\n\tconst pendingEntries = Array.from(entries);\n\twhile (pendingEntries.length) {\n\t\tconst entry = pendingEntries.pop();\n\t\tsize += getEntrySize(entry) || 0;\n\t\tfor (const child of entry.children) {\n\t\t\tpendingEntries.push(child);\n\t\t}\n\t}\n\treturn size;\n}\n\nfunction getUncompressedSize(entry) {\n\treturn entry.uncompressedSize;\n}\n\nfunction getExtractedSize(entry, passThrough) {\n\tconst { data } = entry;\n\treturn passThrough && data instanceof Entry ? data.compressedSize : entry.uncompressedSize;\n}\n\nfunction getReadableReader(readable) {\n\tlet consumed;\n\treturn function () {\n\t\tif (consumed) {\n\t\t\tthrow new Error(ERR_READABLE_CONSUMED);\n\t\t}\n\t\tconsumed = true;\n\t\treturn { readable };\n\t};\n}\n\nfunction getZipBlobReader(options, passwordState) {\n\treturn class extends Reader {\n\n\t\tconstructor(entry, options = {}) {\n\t\t\tsuper();\n\t\t\tthis.entry = entry;\n\t\t\tthis.options = options;\n\t\t}\n\n\t\tasync init() {\n\t\t\tconst zipBlobReader = this;\n\t\t\tconst readerOptions = Object.assign({}, options, zipBlobReader.options);\n\t\t\tconst { checkOverlappingEntry, checkOverlappingEntryOnly } = readerOptions;\n\t\t\tconst data = await readEntryData(zipBlobReader.entry, Object.assign(readerOptions, {\n\t\t\t\tcheckPasswordOnly: false,\n\t\t\t\tcheckOverlappingEntry: checkOverlappingEntryOnly || checkOverlappingEntry,\n\t\t\t\tcheckOverlappingEntryOnly: false,\n\t\t\t\tpreventClose: false\n\t\t\t}), passwordState);\n\t\t\tzipBlobReader.data = data;\n\t\t\tzipBlobReader.blobReader = new BlobReader(data);\n\t\t\tzipBlobReader.size = data.size;\n\t\t\tsuper.init();\n\t\t}\n\n\t\treadUint8Array(index, length) {\n\t\t\treturn this.blobReader.readUint8Array(index, length);\n\t\t}\n\t};\n}\n\nfunction createReader(Reader, data, options) {\n\treturn Reader.prototype ? new Reader(data, options) : Reader(data, options);\n}\n\nfunction keepsContentType(writer, data) {\n\tconst { contentType } = writer;\n\tif (contentType === UNDEFINED_VALUE) {\n\t\treturn true;\n\t} else if (writer.constructor == BlobWriter) {\n\t\treturn data.type == contentType;\n\t} else if (writer.constructor == Data64URIWriter) {\n\t\treturn data.startsWith(\"data:\" + (contentType || \"\") + \";base64,\");\n\t} else {\n\t\treturn true;\n\t}\n}\n\nfunction createProgressReadable(zipEntry, reader, options, signal) {\n\tconst { onstart, onprogress, onend } = options;\n\tconst { readable } = reader;\n\tconst coreReaderReportsProgress = zipEntry.data instanceof Entry;\n\tif (coreReaderReportsProgress || (!onstart && !onprogress && !onend)) {\n\t\treturn readable;\n\t} else {\n\t\treturn toCompatibleReadable(readable).pipeThrough(new ProgressWatcherStream({ onstart, onprogress, onend, size: reader.size }), { signal });\n\t}\n}\n\nasync function initReaders(entry, options) {\n\tconst fileEntries = [];\n\tconst pendingEntries = [entry];\n\tconst readers = new Map();\n\twhile (pendingEntries.length) {\n\t\tconst pendingEntry = pendingEntries.pop();\n\t\tfor (const child of pendingEntry.children) {\n\t\t\tif (child.directory) {\n\t\t\t\tpendingEntries.push(child);\n\t\t\t} else {\n\t\t\t\tfileEntries.push(child);\n\t\t\t}\n\t\t}\n\t}\n\tawait Promise.all(fileEntries.map(async child => {\n\t\tconst reader = child.reader = createReader(child.Reader, child.data, options);\n\t\treaders.set(child, reader);\n\t\ttry {\n\t\t\tawait initStream(reader);\n\t\t} catch (error) {\n\t\t\ttry {\n\t\t\t\terror.entry = child;\n\t\t\t\terror.entryId = child.id;\n\t\t\t\terror.entryName = child.getRelativeName(entry);\n\t\t\t} catch {\n\t\t\t\t// ignored\n\t\t\t}\n\t\t\tthrow error;\n\t\t}\n\t\tif (reader.size !== UNDEFINED_VALUE) {\n\t\t\tchild.uncompressedSize = reader.size;\n\t\t\tchild.undeterminedSize = false;\n\t\t}\n\t}));\n\treturn readers;\n}\n\nfunction detach(entry) {\n\tif (entry.parent) {\n\t\tconst children = entry.parent.children;\n\t\tchildren.forEach((child, index) => {\n\t\t\tif (child.id == entry.id) {\n\t\t\t\tchildren.splice(index, 1);\n\t\t\t}\n\t\t});\n\t}\n}\n\nfunction forwardAbort(signal, abortController) {\n\tif (!checkSignalOption(signal)) {\n\t\treturn () => { };\n\t}\n\tif (signal.aborted) {\n\t\tabortController.abort(signal.reason);\n\t\treturn () => { };\n\t}\n\tconst abort = () => abortController.abort(signal.reason);\n\tsignal.addEventListener(\"abort\", abort, { once: true });\n\treturn () => signal.removeEventListener(\"abort\", abort);\n}\n\nfunction isExportAborted(error) {\n\treturn Boolean(error) && error.message == ERR_ABORT_EXPORT;\n}\n\nfunction aggregateEntryErrors(errors) {\n\tconst [error] = errors;\n\tconst otherErrors = errors\n\t\t.slice(1)\n\t\t.flatMap(otherError => [otherError, ...(otherError && otherError.entryErrors || [])])\n\t\t.filter(otherError => otherError !== error);\n\tif (otherErrors.length) {\n\t\ttry {\n\t\t\terror.entryErrors = [...(error.entryErrors || []), ...otherErrors];\n\t\t} catch {\n\t\t\t// ignored\n\t\t}\n\t}\n\treturn error;\n}\n\nfunction getChildEntryOptions(child, selectedEntry, options) {\n\tconst name = options.relativePath ? child.getRelativeName(selectedEntry) : child.getFullname();\n\tconst childOptions = child.options || {};\n\tlet zipEntryMetadata = {};\n\tlet passThroughOptions = {};\n\tif (child.data instanceof Entry) {\n\t\tconst passThrough = isPassThrough(child, options);\n\t\tconst lastModDateOverride = childOptions.lastModDate === UNDEFINED_VALUE ? options.lastModDate : childOptions.lastModDate;\n\t\t({ entryOptions: zipEntryMetadata, passThroughOptions } = getSourceEntryOptions(child.data, passThrough, lastModDateOverride));\n\t\tif (passThrough) {\n\t\t\tpassThroughOptions.passThrough = true;\n\t\t}\n\t}\n\tconst entryOptions = Object.assign({ lastModDate: child.defaultLastModDate }, zipEntryMetadata, options, childOptions, passThroughOptions, { directory: child.directory });\n\tif (!child.directory && entryOptions.passThrough && entryOptions.uncompressedSize === UNDEFINED_VALUE) {\n\t\tthrow new Error(ERR_INVALID_PASS_THROUGH);\n\t}\n\treturn { name, entryOptions };\n}\n\nfunction getDeterminedSize(child, passThrough) {\n\tconst { reader } = child;\n\tif (reader && reader.size !== UNDEFINED_VALUE) {\n\t\treturn reader.size;\n\t}\n\treturn child.undeterminedSize ? UNDEFINED_VALUE : getExtractedSize(child, passThrough);\n}\n\nfunction checkReaderOptions(readerOptions) {\n\tif (readerOptions && (typeof readerOptions != OBJECT_TYPE || Array.isArray(readerOptions))) {\n\t\tthrow new Error(ERR_INVALID_READER_OPTIONS);\n\t}\n\tif (readerOptions) {\n\t\tcheckPassThroughValue(readerOptions.passThrough);\n\t\tcheckPasswordCandidatesOptions(readerOptions);\n\t}\n\treturn readerOptions;\n}\n\nfunction checkPasswordCandidatesOptions(options) {\n\tconst { passwords, requestPassword } = options;\n\tif (passwords && (!Array.isArray(passwords) || passwords.some(password => typeof password != STRING_TYPE))) {\n\t\tthrow new Error(ERR_INVALID_PASSWORDS);\n\t}\n\tif (requestPassword && typeof requestPassword != FUNCTION_TYPE) {\n\t\tthrow new Error(ERR_INVALID_REQUEST_PASSWORD);\n\t}\n}\n\nasync function readEntryData(entry, options, passwordState) {\n\tcheckPasswordCandidatesOptions(options);\n\tconst { passwords, requestPassword, signal } = options;\n\toptions = Object.assign({}, options);\n\tdelete options.passwords;\n\tdelete options.requestPassword;\n\tif (!entry.encrypted || options.passThrough || (!passwords && !requestPassword)) {\n\t\treturn entry.getData(new BlobWriter(), options);\n\t}\n\tconst tried = new Set();\n\tlet error;\n\twhile (true) {\n\t\tfor (const candidate of getPasswordCandidates(options, passwordState, passwords)) {\n\t\t\tif (!tried.has(candidate.key)) {\n\t\t\t\tconst result = await tryPasswordCandidate(candidate);\n\t\t\t\tif (result.done) {\n\t\t\t\t\treturn result.data;\n\t\t\t\t}\n\t\t\t\terror = result.error;\n\t\t\t}\n\t\t}\n\t\tif (!requestPassword) {\n\t\t\tbreak;\n\t\t}\n\t\tif (passwordState.pendingPrompt) {\n\t\t\tawait passwordState.pendingPrompt;\n\t\t\tcontinue;\n\t\t}\n\t\tlet release;\n\t\tpasswordState.pendingPrompt = new Promise(resolve => release = resolve);\n\t\ttry {\n\t\t\tconst answer = await requestPassword(entry, error);\n\t\t\tif (answer === UNDEFINED_VALUE || answer === null) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t// deno-lint-ignore valid-typeof\n\t\t\tif (typeof answer != STRING_TYPE) {\n\t\t\t\tthrow new Error(ERR_INVALID_REQUEST_PASSWORD);\n\t\t\t}\n\t\t\tconst result = await tryPasswordCandidate(getPasswordCandidate(answer));\n\t\t\tif (result.done) {\n\t\t\t\treturn result.data;\n\t\t\t}\n\t\t\terror = result.error;\n\t\t} finally {\n\t\t\tpasswordState.pendingPrompt = UNDEFINED_VALUE;\n\t\t\trelease();\n\t\t}\n\t}\n\tif (!tried.size) {\n\t\tthrow new Error(ERR_ENCRYPTED);\n\t}\n\tconst passwordError = new Error(ERR_INVALID_PASSWORD);\n\tpasswordError.cause = error;\n\tthrow passwordError;\n\n\tasync function tryPasswordCandidate(candidate) {\n\t\ttried.add(candidate.key);\n\t\tconst candidateOptions = Object.assign({}, options, candidate.options);\n\t\tif (entry.zipCrypto) {\n\t\t\tcandidateOptions.checkCrc32 = true;\n\t\t\ttry {\n\t\t\t\tawait entry.getData(null, Object.assign({}, candidateOptions, { checkPasswordOnly: true }));\n\t\t\t} catch (probeError) {\n\t\t\t\tif (isInvalidPasswordError(probeError)) {\n\t\t\t\t\treturn { done: false, error: probeError };\n\t\t\t\t}\n\t\t\t\tthrow probeError;\n\t\t\t}\n\t\t}\n\t\ttry {\n\t\t\tconst data = await entry.getData(new BlobWriter(), candidateOptions);\n\t\t\trememberPassword(passwordState, candidate);\n\t\t\treturn { done: true, data };\n\t\t} catch (readError) {\n\t\t\tif (isAbortError(readError, signal) || !isWrongPasswordError(readError, entry)) {\n\t\t\t\tthrow readError;\n\t\t\t}\n\t\t\treturn { done: false, error: readError };\n\t\t}\n\t}\n}\n\nfunction isInvalidPasswordError(error) {\n\treturn isErrorObject(error) && error.message == ERR_INVALID_PASSWORD;\n}\n\nfunction isWrongPasswordError(error, entry) {\n\treturn isInvalidPasswordError(error) || (entry.zipCrypto && isErrorObject(error) && FALSE_ACCEPT_ERRORS.has(error.message));\n}\n\nfunction isAbortError(error, signal) {\n\treturn Boolean(signal && signal.aborted) || (isErrorObject(error) && error.name == ABORT_ERROR_NAME);\n}\n\nfunction getPasswordCandidates(options, passwordState, passwords) {\n\tconst candidates = [];\n\tconst { password, rawPassword } = options;\n\tif (rawPassword && rawPassword.length) {\n\t\tcandidates.push({ key: rawPassword, options: { password: \"\", rawPassword } });\n\t}\n\tif (password) {\n\t\tcandidates.push(getPasswordCandidate(password));\n\t}\n\tcandidates.push(...passwordState.known);\n\tif (passwords) {\n\t\tcandidates.push(...passwords.filter(password => password).map(getPasswordCandidate));\n\t}\n\treturn candidates;\n}\n\nfunction getPasswordCandidate(password) {\n\treturn { key: password, options: { password, rawPassword: EMPTY_RAW_PASSWORD } };\n}\n\nfunction rememberPassword(passwordState, candidate) {\n\tconst { known } = passwordState;\n\tconst index = known.findIndex(knownCandidate => knownCandidate.key === candidate.key);\n\tif (index != -1) {\n\t\tknown.splice(index, 1);\n\t}\n\tknown.unshift(candidate);\n}\n\nfunction checkPassThroughValue(passThrough) {\n\tif (checkPassThroughOption(passThrough) === PASS_THROUGH_COMPRESSED) {\n\t\tthrow new Error(ERR_UNSUPPORTED_PASS_THROUGH_VALUE);\n\t}\n}\n\nfunction replaceContent(zipEntry, params) {\n\tconst { uncompressedSize } = params;\n\tObject.assign(zipEntry, params, {\n\t\treader: null,\n\t\tpassThrough: UNDEFINED_VALUE,\n\t\tuncompressedSize: uncompressedSize === UNDEFINED_VALUE ? 0 : uncompressedSize,\n\t\tundeterminedSize: uncompressedSize === UNDEFINED_VALUE\n\t});\n}\n\nfunction getData64URISize(dataURI) {\n\tlet dataEnd = dataURI.length;\n\twhile (dataURI.charAt(dataEnd - 1) == \"=\") {\n\t\tdataEnd--;\n\t}\n\tconst dataStart = dataURI.indexOf(\",\") + 1;\n\treturn Math.floor((dataEnd - dataStart) * 0.75);\n}\n\nfunction isPassThrough(child, options) {\n\tconst { readerOptions } = options;\n\treturn Boolean(!child.directory && (child.passThrough || (readerOptions && readerOptions.passThrough)));\n}\n\nfunction isImplicitDirectory(child) {\n\treturn child.directory && child.data === null;\n}\n\nasync function exportZip(zipWriter, entry, totalSize, options, readers) {\n\tconst { onstart, onprogress, onend, onentryprogress } = options;\n\tconst selectedEntry = entry;\n\tconst totalEntries = getTotalSize(entry.children, child => isImplicitDirectory(child) ? 0 : 1);\n\tlet writtenSize = 0;\n\tlet writtenEntries = 0;\n\tif (onstart) {\n\t\tawait callHandler(onstart, totalSize);\n\t}\n\tif (options.bufferedWrite) {\n\t\tawait processChildren(entry);\n\t} else {\n\t\tfor (const child of entry.getChildren({ recursive: true })) {\n\t\t\tawait addChild(child);\n\t\t}\n\t}\n\tif (onend) {\n\t\tawait callHandler(onend, writtenSize);\n\t}\n\n\tasync function processChildren(entry) {\n\t\tconst results = await Promise.allSettled(entry.children.map(async child => {\n\t\t\tawait addChild(child);\n\t\t\tawait processChildren(child);\n\t\t}));\n\t\tconst errorResult = results.find(result => result.status == \"rejected\");\n\t\tif (errorResult) {\n\t\t\tthrow errorResult.reason;\n\t\t}\n\t}\n\n\tasync function addChild(child) {\n\t\tif (isImplicitDirectory(child)) {\n\t\t\treturn;\n\t\t}\n\t\tconst { name, entryOptions } = getChildEntryOptions(child, selectedEntry, options);\n\t\tlet entryWrittenSize = 0;\n\t\tconst entryMetadata = await zipWriter.add(name, readers.get(child), Object.assign(entryOptions, {\n\t\t\tonstart: UNDEFINED_VALUE,\n\t\t\tonend: UNDEFINED_VALUE,\n\t\t\tonprogress: async indexProgress => {\n\t\t\t\twrittenSize += indexProgress - entryWrittenSize;\n\t\t\t\tentryWrittenSize = indexProgress;\n\t\t\t\tif (onprogress) {\n\t\t\t\t\tawait callHandler(onprogress, writtenSize, totalSize);\n\t\t\t\t}\n\t\t\t}\n\t\t}));\n\t\twrittenEntries++;\n\t\tif (onentryprogress) {\n\t\t\tawait callHandler(onentryprogress, writtenEntries, totalEntries, entryMetadata);\n\t\t}\n\t}\n}\n\nfunction addFileSystemHandle(zipEntry, handle, options) {\n\treturn addFile(zipEntry, handle, []);\n\n\tasync function addFile(parentEntry, handle, addedEntries, parentName = \"\") {\n\t\tif (handle) {\n\t\t\tconst entryName = parentName ? parentName + \"/\" + handle.name : handle.name;\n\t\t\ttry {\n\t\t\t\tif (handle.isFile || handle.isDirectory) {\n\t\t\t\t\thandle = await transformToFileSystemhandle(handle);\n\t\t\t\t}\n\t\t\t\tif (handle.kind == \"file\") {\n\t\t\t\t\tconst file = await handle.getFile();\n\t\t\t\t\taddedEntries.push(\n\t\t\t\t\t\taddChild(parentEntry, file.name, {\n\t\t\t\t\t\t\tReader: function () {\n\t\t\t\t\t\t\t\tconst readable = file.stream();\n\t\t\t\t\t\t\t\tconst size = file.size;\n\t\t\t\t\t\t\t\treturn { readable, size };\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\toptions: Object.assign({}, { lastModDate: new Date(file.lastModified) }, options),\n\t\t\t\t\t\t\tuncompressedSize: file.size\n\t\t\t\t\t\t})\n\t\t\t\t\t);\n\t\t\t\t} else if (handle.kind == \"directory\") {\n\t\t\t\t\tconst directoryEntry = parentEntry.addDirectory(handle.name, options);\n\t\t\t\t\taddedEntries.push(directoryEntry);\n\t\t\t\t\tfor await (const childHandle of handle.values()) {\n\t\t\t\t\t\tawait addFile(directoryEntry, childHandle, addedEntries, entryName);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (error) {\n\t\t\t\ttry {\n\t\t\t\t\tif (error.entryName === UNDEFINED_VALUE) {\n\t\t\t\t\t\terror.entryName = entryName;\n\t\t\t\t\t}\n\t\t\t\t} catch {\n\t\t\t\t\t// ignored\n\t\t\t\t}\n\t\t\t\tthrow error;\n\t\t\t}\n\t\t}\n\t\treturn addedEntries;\n\t}\n}\n\nasync function exportFileSystemHandle(zipEntry, directoryHandle, options) {\n\tconst { onstart, onprogress, onend } = options;\n\tcheckPassThroughValue(options.passThrough);\n\tcheckPasswordCandidatesOptions(options);\n\tconst readerOptions = checkReaderOptions(options.readerOptions);\n\tconst abortController = new AbortController();\n\tconst { signal } = abortController;\n\tconst releaseSignal = forwardAbort(options.signal, abortController);\n\tconst getDataOptions = Object.assign({}, options, readerOptions, {\n\t\tsignal,\n\t\tonstart: UNDEFINED_VALUE,\n\t\tonprogress: UNDEFINED_VALUE,\n\t\tonend: UNDEFINED_VALUE,\n\t\tpreventClose: false\n\t});\n\tconst totalSize = getTotalSize([zipEntry], entry => getExtractedSize(entry, getDataOptions.passThrough));\n\tconst exportedEntryNames = [];\n\tlet exportAborted = false;\n\tlet writtenSize = 0;\n\ttry {\n\t\tif (onstart) {\n\t\t\tawait callHandler(onstart, totalSize);\n\t\t}\n\t\tawait exportChildren(zipEntry, directoryHandle);\n\t\tif (onend) {\n\t\t\tawait callHandler(onend, writtenSize);\n\t\t}\n\t} catch (error) {\n\t\ttry {\n\t\t\terror.exportedEntryNames = exportedEntryNames;\n\t\t} catch {\n\t\t\t// ignored\n\t\t}\n\t\tthrow error;\n\t} finally {\n\t\treleaseSignal();\n\t}\n\treturn directoryHandle;\n\n\tfunction createProgressWritable(writable) {\n\t\tconst writer = writable.getWriter();\n\t\treturn new WritableStream({\n\t\t\tasync write(chunk) {\n\t\t\t\tawait writer.write(chunk);\n\t\t\t\twrittenSize += chunk.length;\n\t\t\t\tif (onprogress) {\n\t\t\t\t\tawait callHandler(onprogress, writtenSize, totalSize);\n\t\t\t\t}\n\t\t\t},\n\t\t\tclose() {\n\t\t\t\treturn writer.close();\n\t\t\t},\n\t\t\tabort(reason) {\n\t\t\t\treturn writer.abort(reason);\n\t\t\t}\n\t\t});\n\t}\n\n\tasync function exportChildren(entry, parentHandle) {\n\t\tif (options.concurrent) {\n\t\t\tconst results = await Promise.allSettled(entry.children.map(child => exportChild(child, parentHandle)));\n\t\t\tconst rejectedResults = results.filter(result => result.status == \"rejected\");\n\t\t\tif (rejectedResults.length) {\n\t\t\t\tconst failedResults = rejectedResults.filter(result => !isExportAborted(result.reason));\n\t\t\t\tconst reportedResults = failedResults.length ? failedResults : rejectedResults;\n\t\t\t\tthrow aggregateEntryErrors(reportedResults.map(result => result.reason));\n\t\t\t}\n\t\t} else {\n\t\t\tfor (const child of entry.children) {\n\t\t\t\tawait exportChild(child, parentHandle);\n\t\t\t}\n\t\t}\n\t}\n\n\tasync function exportChild(child, parentHandle) {\n\t\tif (signal.aborted) {\n\t\t\tif (exportAborted || isExportAborted(signal.reason)) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthrowIfAborted(signal);\n\t\t}\n\t\ttry {\n\t\t\tif (child.directory) {\n\t\t\t\tconst childDirectoryHandle = await parentHandle.getDirectoryHandle(child.name, { create: true });\n\t\t\t\tawait exportChildren(child, childDirectoryHandle);\n\t\t\t} else {\n\t\t\t\tconst fileHandle = await parentHandle.getFileHandle(child.name, { create: true });\n\t\t\t\tconst writable = await fileHandle.createWritable();\n\t\t\t\ttry {\n\t\t\t\t\tawait child.getData({ writable: createProgressWritable(writable) }, getDataOptions);\n\t\t\t\t} catch (error) {\n\t\t\t\t\tthrow exportAborted ? new Error(ERR_ABORT_EXPORT) : error;\n\t\t\t\t}\n\t\t\t\texportedEntryNames.push(child.getRelativeName(zipEntry));\n\t\t\t}\n\t\t} catch (error) {\n\t\t\texportAborted = true;\n\t\t\tabortController.abort(new Error(ERR_ABORT_EXPORT));\n\t\t\ttry {\n\t\t\t\tif (error.entryName === UNDEFINED_VALUE) {\n\t\t\t\t\terror.entryName = child.getRelativeName(zipEntry);\n\t\t\t\t\terror.entryId = child.id;\n\t\t\t\t}\n\t\t\t} catch {\n\t\t\t\t// ignored\n\t\t\t}\n\t\t\tthrow error;\n\t\t}\n\t}\n}\n\nasync function transformToFileSystemhandle(entry) {\n\tconst handle = {\n\t\tname: entry.name\n\t};\n\tif (entry.isFile) {\n\t\thandle.kind = \"file\";\n\t\thandle.getFile = () =>\n\t\t\tnew Promise((resolve, reject) => entry.file(resolve, reject));\n\t}\n\tif (entry.isDirectory) {\n\t\thandle.kind = \"directory\";\n\t\tconst handles = await transformToFileSystemhandles(entry);\n\t\thandle.values = () => handles;\n\t}\n\treturn handle;\n}\n\nasync function transformToFileSystemhandles(entry) {\n\tconst entries = [];\n\tfunction readEntries(directoryReader, resolve, reject) {\n\t\tdirectoryReader.readEntries(async (entriesPart) => {\n\t\t\tif (!entriesPart.length) {\n\t\t\t\tresolve(entries);\n\t\t\t} else {\n\t\t\t\tfor (const entry of entriesPart) {\n\t\t\t\t\tentries.push(await transformToFileSystemhandle(entry));\n\t\t\t\t}\n\t\t\t\treadEntries(directoryReader, resolve, reject);\n\t\t\t}\n\t\t}, reject);\n\t}\n\tawait new Promise((resolve, reject) =>\n\t\treadEntries(entry.createReader(), resolve, reject)\n\t);\n\treturn {\n\t\t[Symbol.iterator]() {\n\t\t\tlet entryIndex = 0;\n\t\t\treturn {\n\t\t\t\tnext() {\n\t\t\t\t\tconst result = {\n\t\t\t\t\t\tvalue: entries[entryIndex],\n\t\t\t\t\t\tdone: entryIndex == entries.length\n\t\t\t\t\t};\n\t\t\t\t\tentryIndex++;\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t};\n}\n\nfunction resetFS(fs) {\n\tfs.entries = [];\n\tfs.entryIdCounter = 0;\n\tfs.root = new ZipDirectoryEntry(fs);\n}\n\nfunction resetAndImport(fs, importFunction) {\n\tconst { entries, entryIdCounter, root } = fs;\n\tresetFS(fs);\n\treturn importFunction(fs.root).catch(error => {\n\t\tObject.assign(fs, { entries, entryIdCounter, root });\n\t\tthrow error;\n\t});\n}\n\nfunction collectChildren(directory, recursive) {\n\tconst children = [];\n\tconst pendingDirectories = [directory];\n\tlet directoryIndex = 0;\n\twhile (directoryIndex < pendingDirectories.length) {\n\t\tfor (const child of pendingDirectories[directoryIndex++].children) {\n\t\t\tchildren.push(child);\n\t\t\tif (recursive) {\n\t\t\t\tpendingDirectories.push(child);\n\t\t\t}\n\t\t}\n\t}\n\treturn children;\n}\n\nfunction registerEntries(fs, entry) {\n\tconst pendingEntries = [entry];\n\twhile (pendingEntries.length) {\n\t\tconst pendingEntry = pendingEntries.pop();\n\t\tfs.entries[pendingEntry.id] = pendingEntry;\n\t\tfor (const child of pendingEntry.children) {\n\t\t\tpendingEntries.push(child);\n\t\t}\n\t}\n}\n\nfunction addChild(parent, name, params, directory) {\n\tif (parent.directory) {\n\t\tconst path = splitPath(name);\n\t\tif (path) {\n\t\t\tname = path.pop();\n\t\t\tparent = getPathParent(parent, path);\n\t\t}\n\t\treturn directory ? new ZipDirectoryEntry(parent.fs, name, params, parent) : new ZipFileEntry(parent.fs, name, params, parent);\n\t} else {\n\t\tthrow new Error(ERR_PARENT_NOT_DIRECTORY);\n\t}\n}\n\nfunction checkDuplicatesOption(duplicates) {\n\tif (duplicates === UNDEFINED_VALUE) {\n\t\treturn DUPLICATES_THROW;\n\t} else if (DUPLICATES_VALUES.has(duplicates)) {\n\t\treturn duplicates;\n\t} else {\n\t\tthrow new Error(ERR_INVALID_DUPLICATES);\n\t}\n}\n\nfunction splitPath(name) {\n\tif (name.includes(\"/\")) {\n\t\tconst path = name.split(\"/\").filter(pathPart => pathPart != \"\" && pathPart != \".\");\n\t\tif (path.length) {\n\t\t\treturn path;\n\t\t}\n\t}\n}\n\nfunction getPathParent(parent, path, movedEntry) {\n\tpath.forEach(pathPart => {\n\t\tconst previousParent = parent;\n\t\tparent = parent.getChildByName(pathPart);\n\t\tif (parent) {\n\t\t\tif (!parent.directory) {\n\t\t\t\tthrow new Error(ERR_ENTRY_EXISTS);\n\t\t\t}\n\t\t\tif (movedEntry && (parent == movedEntry || parent.isDescendantOf(movedEntry))) {\n\t\t\t\tthrow new Error(ERR_ANCESTOR_ENTRY);\n\t\t\t}\n\t\t} else {\n\t\t\tparent = new ZipDirectoryEntry(previousParent.fs, pathPart, { data: null }, previousParent);\n\t\t}\n\t});\n\treturn parent;\n}\n","import { BlobReader, ZipReader, type Entry } from \"@zip.js/zip.js\";\n\nimport type { CsvImportLimits } from \"./csv-import\";\n\nexport type BoundedZip = {\n entries: readonly Entry[];\n readRange: (entry: Entry) => Promise<void>;\n readText: (entry: Entry) => Promise<string>;\n assertActive: () => void;\n close: () => Promise<void>;\n};\n\nconst safe = (value: number) => Number.isSafeInteger(value) && value >= 0;\nconst unsafeName = (name: string) => /[\\\\\\0-\\x1F\\x7F-\\x9F]/.test(name);\n\nfunction stopIfCancelled(signal?: AbortSignal): void {\n if (signal?.aborted) throw new Error(\"The archive import was cancelled.\");\n}\n\nfunction hasWarnings(reader: ZipReader<Blob>, entry: Entry): boolean {\n return Boolean(reader.warnings?.length || entry.warnings?.length);\n}\n\nfunction boundedText(limit: number, used: { value: number }) {\n let size = 0;\n const parts: Uint8Array[] = [];\n return {\n writable: new WritableStream<Uint8Array>({\n write(chunk) {\n if (used.value > limit - chunk.byteLength)\n throw new Error(\"The archive exceeds the organization size limit.\");\n used.value += chunk.byteLength;\n size += chunk.byteLength;\n parts.push(chunk);\n },\n }),\n text: () => {\n const bytes = new Uint8Array(size);\n let offset = 0;\n for (const part of parts) {\n bytes.set(part, offset);\n offset += part.byteLength;\n }\n return new TextDecoder(\"utf-8\", { fatal: true }).decode(bytes);\n },\n };\n}\n\n/** zip.js provides directory getData at runtime while omitting it from its Entry type. */\nasync function directoryRange(\n entry: Entry,\n signal?: AbortSignal,\n): Promise<void> {\n if (!(\"getData\" in entry) || typeof entry.getData !== \"function\")\n throw new Error(\"The archive is unsafe.\");\n await entry.getData(new WritableStream<Uint8Array>(), {\n checkOverlappingEntryOnly: true,\n ...(signal ? { signal } : {}),\n });\n}\n\n/**\n * Opens a ZIP under vendor-neutral structural limits. Callers retain ownership of\n * their member grammar and may only read an entry through this object.\n */\nexport async function openBoundedZip(\n file: Blob,\n limits: Pick<CsvImportLimits, \"maxFileBytes\" | \"maxRecords\">,\n signal?: AbortSignal,\n): Promise<BoundedZip> {\n if (file.size > limits.maxFileBytes)\n throw new Error(\"The archive exceeds the organization size limit.\");\n const reader = new ZipReader(new BlobReader(file), {\n strictness: \"strict\",\n filenameValidation: \"strict\",\n checkAmbiguity: true,\n });\n try {\n stopIfCancelled(signal);\n const entries = await reader.getEntries();\n if (reader.warnings?.length || entries.length > limits.maxRecords)\n throw new Error(\"The archive is unsafe.\");\n const names = new Set<string>();\n let declared = 0;\n for (const entry of entries) {\n const unixType = (entry.externalFileAttributes >>> 16) & 0o170000;\n if (\n names.has(entry.filename) ||\n unsafeName(entry.filename) ||\n !safe(entry.compressedSize) ||\n !safe(entry.uncompressedSize) ||\n !safe(entry.offset) ||\n declared > limits.maxFileBytes - entry.uncompressedSize ||\n entry.encrypted ||\n (entry.directory\n ? unixType !== 0 && unixType !== 0o040000\n : unixType !== 0 && unixType !== 0o100000)\n )\n throw new Error(\"The archive is unsafe.\");\n names.add(entry.filename);\n declared += entry.uncompressedSize;\n }\n const used = { value: declared };\n const ownedEntries = new Set(entries);\n const ensureOwnedAndSafe = (entry: Entry) => {\n if (!ownedEntries.has(entry) || hasWarnings(reader, entry))\n throw new Error(\"The archive is unsafe.\");\n };\n const readRange = async (entry: Entry) => {\n ensureOwnedAndSafe(entry);\n stopIfCancelled(signal);\n if (entry.directory) await directoryRange(entry, signal);\n else\n await entry.getData(new WritableStream<Uint8Array>(), {\n checkOverlappingEntryOnly: true,\n ...(signal ? { signal } : {}),\n });\n stopIfCancelled(signal);\n ensureOwnedAndSafe(entry);\n };\n return {\n entries: Object.freeze([...entries]),\n assertActive: () => stopIfCancelled(signal),\n readRange,\n readText: async (entry) => {\n ensureOwnedAndSafe(entry);\n if (entry.directory) throw new Error(\"The archive is unsafe.\");\n await readRange(entry);\n const output = boundedText(limits.maxFileBytes, used);\n try {\n await entry.getData(output.writable, { checkCrc32: true, ...(signal ? { signal } : {}) });\n } catch (error) {\n if (used.value >= limits.maxFileBytes)\n throw new Error(\"The archive exceeds the organization size limit.\");\n throw error;\n }\n stopIfCancelled(signal);\n ensureOwnedAndSafe(entry);\n return output.text();\n },\n close: () => reader.close(),\n };\n } catch (error) {\n await reader.close();\n if (signal?.aborted) throw new Error(\"The archive import was cancelled.\");\n throw error;\n }\n}\n","import type { CsvImportLimits } from \"./csv-import\";\nimport { openBoundedZip } from \"./bounded-zip\";\n\nexport type OnePuxArchive = {\n attributesText: string;\n dataText: string;\n attachmentMemberCount: number;\n};\n\nfunction invalid(): never {\n throw new Error(\"The 1Password archive is invalid.\");\n}\n\n/** Applies the 1PUX member grammar to shared bounded ZIP mechanics. */\nexport async function readOnePuxArchive(\n file: Blob,\n limits: Pick<CsvImportLimits, \"maxFileBytes\" | \"maxRecords\">,\n signal?: AbortSignal,\n): Promise<OnePuxArchive> {\n let archive;\n try {\n archive = await openBoundedZip(file, limits, signal);\n let attachmentMemberCount = 0;\n let hasAttributes = false;\n let hasData = false;\n for (const entry of archive.entries) {\n if (\n entry.filename === \"files/\" &&\n entry.directory &&\n entry.uncompressedSize === 0\n )\n continue;\n if (entry.directory) invalid();\n if (entry.filename === \"export.attributes\") {\n hasAttributes = true;\n continue;\n }\n if (entry.filename === \"export.data\") {\n hasData = true;\n continue;\n }\n if (\n entry.filename.startsWith(\"files/\") &&\n entry.filename.slice(6) &&\n !entry.filename.slice(6).includes(\"/\")\n ) {\n attachmentMemberCount += 1;\n continue;\n }\n invalid();\n }\n if (!hasAttributes || !hasData) invalid();\n let attributesText: string | undefined;\n let dataText: string | undefined;\n for (const entry of archive.entries) {\n if (\n entry.filename !== \"export.attributes\" &&\n entry.filename !== \"export.data\"\n ) {\n await archive.readRange(entry);\n continue;\n }\n const text = await archive.readText(entry);\n if (entry.filename === \"export.attributes\") attributesText = text;\n else dataText = text;\n }\n if (!attributesText || !dataText) invalid();\n return { attributesText, dataText, attachmentMemberCount };\n } catch (error) {\n if (signal?.aborted) throw new Error(\"The 1Password import was cancelled.\");\n if (error instanceof Error && /size limit/.test(error.message))\n throw new Error(\n \"The 1Password export exceeds this organization’s import size limit.\",\n );\n throw error;\n } finally {\n await archive?.close();\n }\n}\n","import { parseOnePuxData } from \"./onepux\";\nimport { readOnePuxArchive } from \"./onepux-archive\";\nimport type {\n StructuredImportWorkerRequest,\n StructuredImportWorkerResponse,\n} from \"./structured-import-worker-protocol\";\n\nexport type OnePuxWorkerLimits = Extract<\n StructuredImportWorkerRequest,\n { type: \"parse\" }\n>[\"limits\"];\nexport type OnePuxWorkerRequest = StructuredImportWorkerRequest;\nexport type OnePuxWorkerResponse = StructuredImportWorkerResponse;\ntype ActiveOperation = { requestId: string; controller: AbortController };\n\n/** The production worker handler is exported so real ZIP integration tests use this exact path. */\nexport function createOnePuxWorkerMessageHandler(\n post: (response: OnePuxWorkerResponse) => void,\n) {\n let active: ActiveOperation | undefined;\n return async (request: OnePuxWorkerRequest): Promise<void> => {\n if (request.type === \"cancel\") {\n if (active && request.requestId === active.requestId) {\n active.controller.abort();\n active = undefined;\n }\n return;\n }\n active?.controller.abort();\n const operation: ActiveOperation = {\n requestId: request.requestId,\n controller: new AbortController(),\n };\n active = operation;\n try {\n const archive = await readOnePuxArchive(\n request.file,\n request.limits,\n operation.controller.signal,\n );\n const records = parseOnePuxData(\n archive.attributesText,\n archive.dataText,\n request.limits,\n );\n if (active !== operation || operation.controller.signal.aborted) return;\n post({\n ok: true,\n requestId: request.requestId,\n records,\n fileNotices:\n archive.attachmentMemberCount > 0\n ? [\n {\n code: \"unsupported_archive_members\",\n count: archive.attachmentMemberCount,\n },\n ]\n : [],\n });\n } catch {\n if (active !== operation || operation.controller.signal.aborted) return;\n post({\n ok: false,\n requestId: request.requestId,\n error: \"The 1Password archive could not be read.\",\n });\n } finally {\n if (active === operation) active = undefined;\n }\n };\n}\n\nif (typeof self !== \"undefined\") {\n const handleMessage = createOnePuxWorkerMessageHandler((response) =>\n self.postMessage(response),\n );\n self.onmessage = (event: MessageEvent<OnePuxWorkerRequest>) => {\n void handleMessage(event.data);\n };\n}\n"],"mappings":";;;;;;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MACT,CAAC;AAAA,IACH,QAAQ;AACN,UAAI,WAAW,aAAa,UAAU,WAAW,OAAO,QAAS;AACjE,WAAK;AAAA,QACH,IAAI;AAAA,QACJ,WAAW,QAAQ;AAAA,QACnB,OAAO;AAAA,MACT,CAAC;AAAA,IACH,UAAE;AACA,UAAI,WAAW,UAAW,UAAS;AAAA,IACrC;AAAA,EACF;AACF;AAEA,IAAI,OAAO,SAAS,aAAa;AAC/B,QAAM,gBAAgB;AAAA,IAAiC,CAAC,aACtD,KAAK,YAAY,QAAQ;AAAA,EAC3B;AACA,OAAK,YAAY,CAAC,UAA6C;AAC7D,SAAK,cAAc,MAAM,IAAI;AAAA,EAC/B;AACF;","names":["config","CompressionStreamZlib","DecompressionStreamZlib","n","t","b","decrypt","encrypt","T0","T1","T2","T3","t2","b","e","t","p","s","s2","createEngine","decrypt","BLOCK_LENGTH","encrypt","password","createKeys","CompressionStream","DecompressionStream","Stream","CompressionStream","codecStreams","DecompressionStream","DEFAULT_CHUNK_SIZE","config","Stream","config","modulePromise","runWorker","config","maxWorkers","workerData","stream","workerOptions","terminateWorker","pendingEntries","bytes","buffer","range","endOfDirectoryView","commentOffset","commentLength","decode","options","config","runWorker","isInteger","value","INTEGER_REGEX","test","isNumber","NUMBER_REGEX","isSafeNumber","config","Number","isSafeInteger","parseInt","num","parseFloat","parsed","String","valueDigits","extractSignificantDigits","parsedDigits","approx","requiredDigits","length","startsWith","substring","UnsafeNumberReason","getUnsafeNumberReason","undefined","truncate_integer","isFinite","overflow","underflow","truncate_float","extractSignificantDigits","value","start","end","getSignificantDigitRange","digits","substring","dot","indexOf","lastIndexOf","length","LosslessNumber","isLosslessNumber","constructor","value","isNumber","Error","valueOf","unsafeReason","getUnsafeNumberReason","undefined","UnsafeNumberReason","truncate_float","Number","parseFloat","isInteger","BigInt","toString","parseLosslessNumber","value","LosslessNumber","revive","json","reviver","reviveValue","context","key","value","Array","isArray","call","reviveArray","isLosslessNumber","reviveObject","object","Object","keys","undefined","array","i","length","String","parse","text","reviver","options","optionsObj","parseNumber","parseLosslessNumber","onDuplicateKey","throwDuplicateKey","i","value","parseValue","expectValue","expectEndOfInput","revive","parseObject","charCodeAt","codeOpeningBrace","skipWhitespace","object","initial","length","codeClosingBrace","eatComma","start","key","parseString","undefined","throwObjectKeyExpected","eatColon","throwObjectValueExpected","Object","prototype","hasOwnProperty","call","isDeepEqual","returnedValue","position","oldValue","newValue","throwObjectKeyOrEndExpected","parseArray","codeOpeningBracket","array","codeClosingBracket","expectArrayItem","push","throwArrayItemOrEndExpected","parseNumeric","parseKeyword","name","slice","isWhitespace","codeDoubleQuote","result","codeBackslash","char","escapeChar","escapeCharacters","isHex","String","fromCharCode","Number","parseInt","throwInvalidUnicodeCharacter","throwInvalidEscapeCharacter","isValidStringCharacter","throwInvalidCharacter","expectEndOfString","codeMinus","expectDigit","codeZero","isNonZeroDigit","isDigit","codeDot","codeLowercaseE","codeUppercaseE","codePlus","codeComma","SyntaxError","gotAt","codeColon","numSoFar","_ref","pos","chars","got","code","codeSpace","codeNewline","codeTab","codeReturn","codeNine","codeUppercaseA","codeUppercaseF","codeLowercaseA","codeLowercaseF","codeOne","a","b","Array","isArray","every","item","index","isObject","keys","Set","f","n","r","t","stringify","value","replacer","space","numberStringifiers","resolvedSpace","resolveSpace","replacedValue","call","stringifyValue","indent","Array","isArray","stringifier","find","item","test","str","isNumber","Error","Date","Boolean","Number","String","JSON","isLosslessNumber","toString","stringifyArray","stringifyObject","undefined","array","length","childIndent","i","object","toJSON","keys","map","Object","first","key","includeProperty","keyStr","_key","repeat","object","key","t","e","r","o","s","config","value","error","result","VENDOR_VERSION_AE_1","ZipReader","startsWithSplitZipSignature","getOptionValue","getOptionValue","getDiskOffset","getOptionValue","getFunctionOptionValue","getDiskOffset","config","runWorker","VENDOR_VERSION_AE_1","getFunctionOptionValue","getOptionValue","startsWithSplitZipSignature","getUint32","getUint16","DEFAULT_THRESHOLD","DEFAULT_THRESHOLD","n","t","e","r","s","o","p","X","f","b","l","FORMAT_DEFLATE_RAW","FORMAT_DEFLATE64_RAW","FORMAT_GZIP","Z_MEM_ERROR_CODE","Z_MEM_ERROR_CODE","initStream","FORMAT_GZIP","FORMAT_DEFLATE_RAW","FORMAT_DEFLATE64_RAW","state","wasm","setWasmExports","wasm","createEngine","wasm","decrypt","initModule","setWasmExports","bytes","createEngine","config","initModule","bytes"]}