.dotfiles/.config/chromium/Default/Extensions/likgccmbimhjbgkjambclfkhldnlhbnn/24.9.9.0_0/lib/zip.js.map
2024-09-21 15:05:15 -03:00

8 lines
326 KiB
Plaintext

{
"version": 3,
"sources": ["../../node_modules/@zip.js/zip.js/lib/core/constants.js", "../../node_modules/@zip.js/zip.js/lib/core/streams/stream-adapter.js", "../../node_modules/@zip.js/zip.js/lib/core/configuration.js", "../../node_modules/@zip.js/zip.js/lib/z-worker-inline.js", "../../node_modules/@zip.js/zip.js/lib/core/util/default-mime-type.js", "../../node_modules/@zip.js/zip.js/lib/core/util/stream-codec-shim.js", "../../node_modules/@zip.js/zip.js/lib/core/streams/codecs/crc32.js", "../../node_modules/@zip.js/zip.js/lib/core/streams/crc32-stream.js", "../../node_modules/@zip.js/zip.js/lib/core/util/encode-text.js", "../../node_modules/@zip.js/zip.js/lib/core/streams/codecs/sjcl.js", "../../node_modules/@zip.js/zip.js/lib/core/streams/common-crypto.js", "../../node_modules/@zip.js/zip.js/lib/core/streams/aes-crypto-stream.js", "../../node_modules/@zip.js/zip.js/lib/core/streams/zip-crypto-stream.js", "../../node_modules/@zip.js/zip.js/lib/core/streams/zip-entry-stream.js", "../../node_modules/@zip.js/zip.js/lib/core/streams/codec-stream.js", "../../node_modules/@zip.js/zip.js/lib/core/codec-worker.js", "../../node_modules/@zip.js/zip.js/lib/core/codec-pool.js", "../../node_modules/@zip.js/zip.js/lib/core/io.js", "../../node_modules/@zip.js/zip.js/lib/core/util/cp437-decode.js", "../../node_modules/@zip.js/zip.js/lib/core/util/decode-text.js", "../../node_modules/@zip.js/zip.js/lib/core/zip-entry.js", "../../node_modules/@zip.js/zip.js/lib/core/zip-reader.js", "../../node_modules/@zip.js/zip.js/lib/core/zip-writer.js", "../../node_modules/@zip.js/zip.js/lib/zip.js"],
"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 COMPRESSION_METHOD_DEFLATE = 0x08;\nconst COMPRESSION_METHOD_STORE = 0x00;\nconst COMPRESSION_METHOD_AES = 0x63;\n\nconst LOCAL_FILE_HEADER_SIGNATURE = 0x04034b50;\nconst SPLIT_ZIP_FILE_SIGNATURE = 0x08074b50;\nconst DATA_DESCRIPTOR_RECORD_SIGNATURE = SPLIT_ZIP_FILE_SIGNATURE;\nconst CENTRAL_FILE_HEADER_SIGNATURE = 0x02014b50;\nconst END_OF_CENTRAL_DIR_SIGNATURE = 0x06054b50;\nconst ZIP64_END_OF_CENTRAL_DIR_SIGNATURE = 0x06064b50;\nconst ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE = 0x07064b50;\nconst END_OF_CENTRAL_DIR_LENGTH = 22;\nconst ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH = 20;\nconst ZIP64_END_OF_CENTRAL_DIR_LENGTH = 56;\nconst ZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH = END_OF_CENTRAL_DIR_LENGTH + ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH + ZIP64_END_OF_CENTRAL_DIR_LENGTH;\n\nconst EXTRAFIELD_TYPE_ZIP64 = 0x0001;\nconst EXTRAFIELD_TYPE_AES = 0x9901;\nconst EXTRAFIELD_TYPE_NTFS = 0x000a;\nconst EXTRAFIELD_TYPE_NTFS_TAG1 = 0x0001;\nconst EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP = 0x5455;\nconst EXTRAFIELD_TYPE_UNICODE_PATH = 0x7075;\nconst EXTRAFIELD_TYPE_UNICODE_COMMENT = 0x6375;\nconst EXTRAFIELD_TYPE_USDZ = 0x1986;\n\nconst BITFLAG_ENCRYPTED = 0x01;\nconst BITFLAG_LEVEL = 0x06;\nconst BITFLAG_DATA_DESCRIPTOR = 0x0008;\nconst BITFLAG_LANG_ENCODING_FLAG = 0x0800;\nconst FILE_ATTR_MSDOS_DIR_MASK = 0x10;\n\nconst VERSION_DEFLATE = 0x14;\nconst VERSION_ZIP64 = 0x2D;\nconst VERSION_AES = 0x33;\n\nconst DIRECTORY_SIGNATURE = \"/\";\n\nconst MAX_DATE = new Date(2107, 11, 31);\nconst MIN_DATE = new Date(1980, 0, 1);\n\nconst UNDEFINED_VALUE = undefined;\nconst UNDEFINED_TYPE = \"undefined\";\nconst FUNCTION_TYPE = \"function\";\n\nexport {\n\tMAX_32_BITS,\n\tMAX_16_BITS,\n\tCOMPRESSION_METHOD_DEFLATE,\n\tCOMPRESSION_METHOD_STORE,\n\tCOMPRESSION_METHOD_AES,\n\tSPLIT_ZIP_FILE_SIGNATURE,\n\tLOCAL_FILE_HEADER_SIGNATURE,\n\tDATA_DESCRIPTOR_RECORD_SIGNATURE,\n\tCENTRAL_FILE_HEADER_SIGNATURE,\n\tEND_OF_CENTRAL_DIR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_SIGNATURE,\n\tEXTRAFIELD_TYPE_ZIP64,\n\tEXTRAFIELD_TYPE_AES,\n\tEXTRAFIELD_TYPE_NTFS,\n\tEXTRAFIELD_TYPE_NTFS_TAG1,\n\tEXTRAFIELD_TYPE_EXTENDED_TIMESTAMP,\n\tEXTRAFIELD_TYPE_UNICODE_PATH,\n\tEXTRAFIELD_TYPE_UNICODE_COMMENT,\n\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\tZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH,\n\tBITFLAG_ENCRYPTED,\n\tBITFLAG_LEVEL,\n\tBITFLAG_DATA_DESCRIPTOR,\n\tBITFLAG_LANG_ENCODING_FLAG,\n\tFILE_ATTR_MSDOS_DIR_MASK,\n\tVERSION_DEFLATE,\n\tVERSION_ZIP64,\n\tVERSION_AES,\n\tDIRECTORY_SIGNATURE,\n\tMIN_DATE,\n\tMAX_DATE,\n\tUNDEFINED_VALUE,\n\tUNDEFINED_TYPE,\n\tFUNCTION_TYPE\n};", "/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n\nexport {\n\tStreamAdapter\n};\n\nclass StreamAdapter {\n\n\tconstructor(Codec) {\n\t\treturn class extends TransformStream {\n\t\t\tconstructor(_format, options) {\n\t\t\t\tconst codec = new Codec(options);\n\t\t\t\tsuper({\n\t\t\t\t\ttransform(chunk, controller) {\n\t\t\t\t\t\tcontroller.enqueue(codec.append(chunk));\n\t\t\t\t\t},\n\t\t\t\t\tflush(controller) {\n\t\t\t\t\t\tconst chunk = codec.flush();\n\t\t\t\t\t\tif (chunk) {\n\t\t\t\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t};\n\t}\n}", "/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global navigator, CompressionStream, DecompressionStream */\n\nimport {\n\tUNDEFINED_VALUE,\n\tUNDEFINED_TYPE\n} from \"./constants.js\";\nimport { StreamAdapter } from \"./streams/stream-adapter.js\";\n\nconst MINIMUM_CHUNK_SIZE = 64;\nlet maxWorkers = 2;\ntry {\n\tif (typeof navigator != UNDEFINED_TYPE && navigator.hardwareConcurrency) {\n\t\tmaxWorkers = navigator.hardwareConcurrency;\n\t}\n} catch (_error) {\n\t// ignored\n}\nconst DEFAULT_CONFIGURATION = {\n\tchunkSize: 512 * 1024,\n\tmaxWorkers,\n\tterminateWorkerTimeout: 5000,\n\tuseWebWorkers: true,\n\tuseCompressionStream: true,\n\tworkerScripts: UNDEFINED_VALUE,\n\tCompressionStreamNative: typeof CompressionStream != UNDEFINED_TYPE && CompressionStream,\n\tDecompressionStreamNative: typeof DecompressionStream != UNDEFINED_TYPE && DecompressionStream\n};\n\nconst config = Object.assign({}, DEFAULT_CONFIGURATION);\n\nexport {\n\tconfigure,\n\tgetConfiguration,\n\tgetChunkSize\n};\n\nfunction getConfiguration() {\n\treturn config;\n}\n\nfunction getChunkSize(config) {\n\treturn Math.max(config.chunkSize, MINIMUM_CHUNK_SIZE);\n}\n\nfunction configure(configuration) {\n\tconst {\n\t\tbaseURL,\n\t\tchunkSize,\n\t\tmaxWorkers,\n\t\tterminateWorkerTimeout,\n\t\tuseCompressionStream,\n\t\tuseWebWorkers,\n\t\tDeflate,\n\t\tInflate,\n\t\tCompressionStream,\n\t\tDecompressionStream,\n\t\tworkerScripts\n\t} = configuration;\n\tsetIfDefined(\"baseURL\", baseURL);\n\tsetIfDefined(\"chunkSize\", chunkSize);\n\tsetIfDefined(\"maxWorkers\", maxWorkers);\n\tsetIfDefined(\"terminateWorkerTimeout\", terminateWorkerTimeout);\n\tsetIfDefined(\"useCompressionStream\", useCompressionStream);\n\tsetIfDefined(\"useWebWorkers\", useWebWorkers);\n\tif (Deflate) {\n\t\tconfig.CompressionStream = new StreamAdapter(Deflate);\n\t}\n\tif (Inflate) {\n\t\tconfig.DecompressionStream = new StreamAdapter(Inflate);\n\t}\n\tsetIfDefined(\"CompressionStream\", CompressionStream);\n\tsetIfDefined(\"DecompressionStream\", DecompressionStream);\n\tif (workerScripts !== UNDEFINED_VALUE) {\n\t\tconst { deflate, inflate } = workerScripts;\n\t\tif (deflate || inflate) {\n\t\t\tif (!config.workerScripts) {\n\t\t\t\tconfig.workerScripts = {};\n\t\t\t}\n\t\t}\n\t\tif (deflate) {\n\t\t\tif (!Array.isArray(deflate)) {\n\t\t\t\tthrow new Error(\"workerScripts.deflate must be an array\");\n\t\t\t}\n\t\t\tconfig.workerScripts.deflate = deflate;\n\t\t}\n\t\tif (inflate) {\n\t\t\tif (!Array.isArray(inflate)) {\n\t\t\t\tthrow new Error(\"workerScripts.inflate must be an array\");\n\t\t\t}\n\t\t\tconfig.workerScripts.inflate = inflate;\n\t\t}\n\t}\n}\n\nfunction setIfDefined(propertyName, propertyValue) {\n\tif (propertyValue !== UNDEFINED_VALUE) {\n\t\tconfig[propertyName] = propertyValue;\n\t}\n}\n", "function e(e){const t=()=>URL.createObjectURL(new Blob(['const{Array:e,Object:t,Number:n,Math:r,Error:s,Uint8Array:i,Uint16Array:o,Uint32Array:c,Int32Array:f,Map:a,DataView:l,Promise:u,TextEncoder:w,crypto:h,postMessage:d,TransformStream:p,ReadableStream:y,WritableStream:m,CompressionStream:b,DecompressionStream:g}=self,k=void 0,v=\"undefined\",S=\"function\";class z{constructor(e){return class extends p{constructor(t,n){const r=new e(n);super({transform(e,t){t.enqueue(r.append(e))},flush(e){const t=r.flush();t&&e.enqueue(t)}})}}}}const C=[];for(let e=0;256>e;e++){let t=e;for(let e=0;8>e;e++)1&t?t=t>>>1^3988292384:t>>>=1;C[e]=t}class x{constructor(e){this.t=e||-1}append(e){let t=0|this.t;for(let n=0,r=0|e.length;r>n;n++)t=t>>>8^C[255&(t^e[n])];this.t=t}get(){return~this.t}}class A extends p{constructor(){let e;const t=new x;super({transform(e,n){t.append(e),n.enqueue(e)},flush(){const n=new i(4);new l(n.buffer).setUint32(0,t.get()),e.value=n}}),e=this}}const _={concat(e,t){if(0===e.length||0===t.length)return e.concat(t);const n=e[e.length-1],r=_.i(n);return 32===r?e.concat(t):_.o(t,r,0|n,e.slice(0,e.length-1))},l(e){const t=e.length;if(0===t)return 0;const n=e[t-1];return 32*(t-1)+_.i(n)},u(e,t){if(32*e.length<t)return e;const n=(e=e.slice(0,r.ceil(t/32))).length;return t&=31,n>0&&t&&(e[n-1]=_.h(t,e[n-1]&2147483648>>t-1,1)),e},h:(e,t,n)=>32===e?t:(n?0|t:t<<32-e)+1099511627776*e,i:e=>r.round(e/1099511627776)||32,o(e,t,n,r){for(void 0===r&&(r=[]);t>=32;t-=32)r.push(n),n=0;if(0===t)return r.concat(e);for(let s=0;s<e.length;s++)r.push(n|e[s]>>>t),n=e[s]<<32-t;const s=e.length?e[e.length-1]:0,i=_.i(s);return r.push(_.h(t+i&31,t+i>32?n:r.pop(),1)),r}},I={p:{m(e){const t=_.l(e)/8,n=new i(t);let r;for(let s=0;t>s;s++)3&s||(r=e[s/4]),n[s]=r>>>24,r<<=8;return n},k(e){const t=[];let n,r=0;for(n=0;n<e.length;n++)r=r<<8|e[n],3&~n||(t.push(r),r=0);return 3&n&&t.push(_.h(8*(3&n),r)),t}}},P=class{constructor(e){const t=this;t.blockSize=512,t.v=[1732584193,4023233417,2562383102,271733878,3285377520],t.S=[1518500249,1859775393,2400959708,3395469782],e?(t.C=e.C.slice(0),t.A=e.A.slice(0),t._=e._):t.reset()}reset(){const e=this;return e.C=e.v.slice(0),e.A=[],e._=0,e}update(e){const t=this;\"string\"==typeof e&&(e=I.I.k(e));const n=t.A=_.concat(t.A,e),r=t._,i=t._=r+_.l(e);if(i>9007199254740991)throw new s(\"Cannot hash more than 2^53 - 1 bits\");const o=new c(n);let f=0;for(let e=t.blockSize+r-(t.blockSize+r&t.blockSize-1);i>=e;e+=t.blockSize)t.P(o.subarray(16*f,16*(f+1))),f+=1;return n.splice(0,16*f),t}D(){const e=this;let t=e.A;const n=e.C;t=_.concat(t,[_.h(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(r.floor(e._/4294967296)),t.push(0|e._);t.length;)e.P(t.splice(0,16));return e.reset(),n}V(e,t,n,r){return e>19?e>39?e>59?e>79?void 0:t^n^r:t&n|t&r|n&r:t^n^r:t&n|~t&r}R(e,t){return t<<e|t>>>32-e}P(t){const n=this,s=n.C,i=e(80);for(let e=0;16>e;e++)i[e]=t[e];let o=s[0],c=s[1],f=s[2],a=s[3],l=s[4];for(let e=0;79>=e;e++){16>e||(i[e]=n.R(1,i[e-3]^i[e-8]^i[e-14]^i[e-16]));const t=n.R(5,o)+n.V(e,c,f,a)+l+i[e]+n.S[r.floor(e/20)]|0;l=a,a=f,f=n.R(30,c),c=o,o=t}s[0]=s[0]+o|0,s[1]=s[1]+c|0,s[2]=s[2]+f|0,s[3]=s[3]+a|0,s[4]=s[4]+l|0}},D={getRandomValues(e){const t=new c(e.buffer),n=e=>{let t=987654321;const n=4294967295;return()=>(t=36969*(65535&t)+(t>>16)&n,(((t<<16)+(e=18e3*(65535&e)+(e>>16)&n)&n)/4294967296+.5)*(r.random()>.5?1:-1))};for(let s,i=0;i<e.length;i+=4){const e=n(4294967296*(s||r.random()));s=987654071*e(),t[i/4]=4294967296*e()|0}return e}},V={importKey:e=>new V.B(I.p.k(e)),M(e,t,n,r){if(n=n||1e4,0>r||0>n)throw new s(\"invalid params to pbkdf2\");const i=1+(r>>5)<<2;let o,c,f,a,u;const w=new ArrayBuffer(i),h=new l(w);let d=0;const p=_;for(t=I.p.k(t),u=1;(i||1)>d;u++){for(o=c=e.encrypt(p.concat(t,[u])),f=1;n>f;f++)for(c=e.encrypt(c),a=0;a<c.length;a++)o[a]^=c[a];for(f=0;(i||1)>d&&f<o.length;f++)h.setInt32(d,o[f]),d+=4}return w.slice(0,r/8)},B:class{constructor(e){const t=this,n=t.U=P,r=[[],[]];t.K=[new n,new n];const s=t.K[0].blockSize/32;e.length>s&&(e=(new n).update(e).D());for(let t=0;s>t;t++)r[0][t]=909522486^e[t],r[1][t]=1549556828^e[t];t.K[0].update(r[0]),t.K[1].update(r[1]),t.N=new n(t.K[0])}reset(){const e=this;e.N=new e.U(e.K[0]),e.O=!1}update(e){this.O=!0,this.N.update(e)}digest(){const e=this,t=e.N.D(),n=new e.U(e.K[1]).update(t).D();return e.reset(),n}encrypt(e){if(this.O)throw new s(\"encrypt on already updated hmac called!\");return this.update(e),this.digest(e)}}},R=typeof h!=v&&typeof h.getRandomValues==S,B=\"Invalid password\",E=\"Invalid signature\",M=\"zipjs-abort-check-password\";function U(e){return R?h.getRandomValues(e):D.getRandomValues(e)}const K=16,N={name:\"PBKDF2\"},O=t.assign({hash:{name:\"HMAC\"}},N),T=t.assign({iterations:1e3,hash:{name:\"SHA-1\"}},N),W=[\"deriveBits\"],j=[8,12,16],H=[16,24,32],L=10,F=[0,0,0,0],q=typeof h!=v,G=q&&h.subtle,J=q&&typeof G!=v,Q=I.p,X=class{constructor(e){const t=this;t.T=[[[],[],[],[],[]],[[],[],[],[],[]]],t.T[0][0][0]||t.W();const n=t.T[0][4],r=t.T[1],i=e.length;let o,c,f,a=1;if(4!==i&&6!==i&&8!==i)throw new s(\"invalid aes key size\");for(t.S=[c=e.slice(0),f=[]],o=i;4*i+28>o;o++){let e=c[o-1];(o%i==0||8===i&&o%i==4)&&(e=n[e>>>24]<<24^n[e>>16&255]<<16^n[e>>8&255]<<8^n[255&e],o%i==0&&(e=e<<8^e>>>24^a<<24,a=a<<1^283*(a>>7))),c[o]=c[o-i]^e}for(let e=0;o;e++,o--){const t=c[3&e?o:o-4];f[e]=4>=o||4>e?t:r[0][n[t>>>24]]^r[1][n[t>>16&255]]^r[2][n[t>>8&255]]^r[3][n[255&t]]}}encrypt(e){return this.j(e,0)}decrypt(e){return this.j(e,1)}W(){const e=this.T[0],t=this.T[1],n=e[4],r=t[4],s=[],i=[];let o,c,f,a;for(let e=0;256>e;e++)i[(s[e]=e<<1^283*(e>>7))^e]=e;for(let l=o=0;!n[l];l^=c||1,o=i[o]||1){let i=o^o<<1^o<<2^o<<3^o<<4;i=i>>8^255&i^99,n[l]=i,r[i]=l,a=s[f=s[c=s[l]]];let u=16843009*a^65537*f^257*c^16843008*l,w=257*s[i]^16843008*i;for(let n=0;4>n;n++)e[n][l]=w=w<<24^w>>>8,t[n][i]=u=u<<24^u>>>8}for(let n=0;5>n;n++)e[n]=e[n].slice(0),t[n]=t[n].slice(0)}j(e,t){if(4!==e.length)throw new s(\"invalid aes block size\");const n=this.S[t],r=n.length/4-2,i=[0,0,0,0],o=this.T[t],c=o[0],f=o[1],a=o[2],l=o[3],u=o[4];let w,h,d,p=e[0]^n[0],y=e[t?3:1]^n[1],m=e[2]^n[2],b=e[t?1:3]^n[3],g=4;for(let e=0;r>e;e++)w=c[p>>>24]^f[y>>16&255]^a[m>>8&255]^l[255&b]^n[g],h=c[y>>>24]^f[m>>16&255]^a[b>>8&255]^l[255&p]^n[g+1],d=c[m>>>24]^f[b>>16&255]^a[p>>8&255]^l[255&y]^n[g+2],b=c[b>>>24]^f[p>>16&255]^a[y>>8&255]^l[255&m]^n[g+3],g+=4,p=w,y=h,m=d;for(let e=0;4>e;e++)i[t?3&-e:e]=u[p>>>24]<<24^u[y>>16&255]<<16^u[m>>8&255]<<8^u[255&b]^n[g++],w=p,p=y,y=m,m=b,b=w;return i}},Y=class{constructor(e,t){this.H=e,this.L=t,this.F=t}reset(){this.F=this.L}update(e){return this.q(this.H,e,this.F)}G(e){if(255&~(e>>24))e+=1<<24;else{let t=e>>16&255,n=e>>8&255,r=255&e;255===t?(t=0,255===n?(n=0,255===r?r=0:++r):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=r}return e}J(e){0===(e[0]=this.G(e[0]))&&(e[1]=this.G(e[1]))}q(e,t,n){let r;if(!(r=t.length))return[];const s=_.l(t);for(let s=0;r>s;s+=4){this.J(n);const r=e.encrypt(n);t[s]^=r[0],t[s+1]^=r[1],t[s+2]^=r[2],t[s+3]^=r[3]}return _.u(t,s)}},Z=V.B;let $=q&&J&&typeof G.importKey==S,ee=q&&J&&typeof G.deriveBits==S;class te extends p{constructor({password:e,rawPassword:n,signed:r,encryptionStrength:o,checkPasswordOnly:c}){super({start(){t.assign(this,{ready:new u((e=>this.X=e)),password:ie(e,n),signed:r,Y:o-1,pending:new i})},async transform(e,t){const n=this,{password:r,Y:o,X:f,ready:a}=n;r?(await(async(e,t,n,r)=>{const i=await se(e,t,n,ce(r,0,j[t])),o=ce(r,j[t]);if(i[0]!=o[0]||i[1]!=o[1])throw new s(B)})(n,o,r,ce(e,0,j[o]+2)),e=ce(e,j[o]+2),c?t.error(new s(M)):f()):await a;const l=new i(e.length-L-(e.length-L)%K);t.enqueue(re(n,e,l,0,L,!0))},async flush(e){const{signed:t,Z:n,$:r,pending:o,ready:c}=this;if(r&&n){await c;const f=ce(o,0,o.length-L),a=ce(o,o.length-L);let l=new i;if(f.length){const e=ae(Q,f);r.update(e);const t=n.update(e);l=fe(Q,t)}if(t){const e=ce(fe(Q,r.digest()),0,L);for(let t=0;L>t;t++)if(e[t]!=a[t])throw new s(E)}e.enqueue(l)}}})}}class ne extends p{constructor({password:e,rawPassword:n,encryptionStrength:r}){let s;super({start(){t.assign(this,{ready:new u((e=>this.X=e)),password:ie(e,n),Y:r-1,pending:new i})},async transform(e,t){const n=this,{password:r,Y:s,X:o,ready:c}=n;let f=new i;r?(f=await(async(e,t,n)=>{const r=U(new i(j[t]));return oe(r,await se(e,t,n,r))})(n,s,r),o()):await c;const a=new i(f.length+e.length-e.length%K);a.set(f,0),t.enqueue(re(n,e,a,f.length,0))},async flush(e){const{Z:t,$:n,pending:r,ready:o}=this;if(n&&t){await o;let c=new i;if(r.length){const e=t.update(ae(Q,r));n.update(e),c=fe(Q,e)}s.signature=fe(Q,n.digest()).slice(0,L),e.enqueue(oe(c,s.signature))}}}),s=this}}function re(e,t,n,r,s,o){const{Z:c,$:f,pending:a}=e,l=t.length-s;let u;for(a.length&&(t=oe(a,t),n=((e,t)=>{if(t&&t>e.length){const n=e;(e=new i(t)).set(n,0)}return e})(n,l-l%K)),u=0;l-K>=u;u+=K){const e=ae(Q,ce(t,u,u+K));o&&f.update(e);const s=c.update(e);o||f.update(s),n.set(fe(Q,s),u+r)}return e.pending=ce(t,u),n}async function se(n,r,s,o){n.password=null;const c=await(async(e,t,n,r,s)=>{if(!$)return V.importKey(t);try{return await G.importKey(\"raw\",t,n,!1,s)}catch(e){return $=!1,V.importKey(t)}})(0,s,O,0,W),f=await(async(e,t,n)=>{if(!ee)return V.M(t,e.salt,T.iterations,n);try{return await G.deriveBits(e,t,n)}catch(r){return ee=!1,V.M(t,e.salt,T.iterations,n)}})(t.assign({salt:o},T),c,8*(2*H[r]+2)),a=new i(f),l=ae(Q,ce(a,0,H[r])),u=ae(Q,ce(a,H[r],2*H[r])),w=ce(a,2*H[r]);return t.assign(n,{keys:{key:l,ee:u,passwordVerification:w},Z:new Y(new X(l),e.from(F)),$:new Z(u)}),w}function ie(e,t){return t===k?(e=>{if(typeof w==v){const t=new i((e=unescape(encodeURIComponent(e))).length);for(let n=0;n<t.length;n++)t[n]=e.charCodeAt(n);return t}return(new w).encode(e)})(e):t}function oe(e,t){let n=e;return e.length+t.length&&(n=new i(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function ce(e,t,n){return e.subarray(t,n)}function fe(e,t){return e.m(t)}function ae(e,t){return e.k(t)}class le extends p{constructor({password:e,passwordVerification:n,checkPasswordOnly:r}){super({start(){t.assign(this,{password:e,passwordVerification:n}),de(this,e)},transform(e,t){const n=this;if(n.password){const t=we(n,e.subarray(0,12));if(n.password=null,t[11]!=n.passwordVerification)throw new s(B);e=e.subarray(12)}r?t.error(new s(M)):t.enqueue(we(n,e))}})}}class ue extends p{constructor({password:e,passwordVerification:n}){super({start(){t.assign(this,{password:e,passwordVerification:n}),de(this,e)},transform(e,t){const n=this;let r,s;if(n.password){n.password=null;const t=U(new i(12));t[11]=n.passwordVerification,r=new i(e.length+t.length),r.set(he(n,t),0),s=12}else r=new i(e.length),s=0;r.set(he(n,e),s),t.enqueue(r)}})}}function we(e,t){const n=new i(t.length);for(let r=0;r<t.length;r++)n[r]=ye(e)^t[r],pe(e,n[r]);return n}function he(e,t){const n=new i(t.length);for(let r=0;r<t.length;r++)n[r]=ye(e)^t[r],pe(e,t[r]);return n}function de(e,n){const r=[305419896,591751049,878082192];t.assign(e,{keys:r,te:new x(r[0]),ne:new x(r[2])});for(let t=0;t<n.length;t++)pe(e,n.charCodeAt(t))}function pe(e,t){let[n,s,i]=e.keys;e.te.append([t]),n=~e.te.get(),s=be(r.imul(be(s+me(n)),134775813)+1),e.ne.append([s>>>24]),i=~e.ne.get(),e.keys=[n,s,i]}function ye(e){const t=2|e.keys[2];return me(r.imul(t,1^t)>>>8)}function me(e){return 255&e}function be(e){return 4294967295&e}const ge=\"deflate-raw\";class ke extends p{constructor(e,{chunkSize:t,CompressionStream:n,CompressionStreamNative:r}){super({});const{compressed:s,encrypted:i,useCompressionStream:o,zipCrypto:c,signed:f,level:a}=e,u=this;let w,h,d=Se(super.readable);i&&!c||!f||(w=new A,d=xe(d,w)),s&&(d=Ce(d,o,{level:a,chunkSize:t},r,n)),i&&(c?d=xe(d,new ue(e)):(h=new ne(e),d=xe(d,h))),ze(u,d,(()=>{let e;i&&!c&&(e=h.signature),i&&!c||!f||(e=new l(w.value.buffer).getUint32(0)),u.signature=e}))}}class ve extends p{constructor(e,{chunkSize:t,DecompressionStream:n,DecompressionStreamNative:r}){super({});const{zipCrypto:i,encrypted:o,signed:c,signature:f,compressed:a,useCompressionStream:u}=e;let w,h,d=Se(super.readable);o&&(i?d=xe(d,new le(e)):(h=new te(e),d=xe(d,h))),a&&(d=Ce(d,u,{chunkSize:t},r,n)),o&&!i||!c||(w=new A,d=xe(d,w)),ze(this,d,(()=>{if((!o||i)&&c){const e=new l(w.value.buffer);if(f!=e.getUint32(0,!1))throw new s(E)}}))}}function Se(e){return xe(e,new p({transform(e,t){e&&e.length&&t.enqueue(e)}}))}function ze(e,n,r){n=xe(n,new p({flush:r})),t.defineProperty(e,\"readable\",{get:()=>n})}function Ce(e,t,n,r,s){try{e=xe(e,new(t&&r?r:s)(ge,n))}catch(r){if(!t)return e;try{e=xe(e,new s(ge,n))}catch(t){return e}}return e}function xe(e,t){return e.pipeThrough(t)}const Ae=\"data\",_e=\"close\";class Ie extends p{constructor(e,n){super({});const r=this,{codecType:s}=e;let i;s.startsWith(\"deflate\")?i=ke:s.startsWith(\"inflate\")&&(i=ve);let o=0,c=0;const f=new i(e,n),a=super.readable,l=new p({transform(e,t){e&&e.length&&(c+=e.length,t.enqueue(e))},flush(){t.assign(r,{inputSize:c})}}),u=new p({transform(e,t){e&&e.length&&(o+=e.length,t.enqueue(e))},flush(){const{signature:e}=f;t.assign(r,{signature:e,outputSize:o,inputSize:c})}});t.defineProperty(r,\"readable\",{get:()=>a.pipeThrough(l).pipeThrough(f).pipeThrough(u)})}}class Pe extends p{constructor(e){let t;super({transform:function n(r,s){if(t){const e=new i(t.length+r.length);e.set(t),e.set(r,t.length),r=e,t=null}r.length>e?(s.enqueue(r.slice(0,e)),n(r.slice(e),s)):t=r},flush(e){t&&t.length&&e.enqueue(t)}})}}const De=new a,Ve=new a;let Re,Be=0,Ee=!0;async function Me(e){try{const{options:t,scripts:r,config:s}=e;if(r&&r.length)try{Ee?importScripts.apply(k,r):await Ue(r)}catch(e){Ee=!1,await Ue(r)}self.initCodec&&self.initCodec(),s.CompressionStreamNative=self.CompressionStream,s.DecompressionStreamNative=self.DecompressionStream,self.Deflate&&(s.CompressionStream=new z(self.Deflate)),self.Inflate&&(s.DecompressionStream=new z(self.Inflate));const i={highWaterMark:1},o=e.readable||new y({async pull(e){const t=new u((e=>De.set(Be,e)));Ke({type:\"pull\",messageId:Be}),Be=(Be+1)%n.MAX_SAFE_INTEGER;const{value:r,done:s}=await t;e.enqueue(r),s&&e.close()}},i),c=e.writable||new m({async write(e){let t;const r=new u((e=>t=e));Ve.set(Be,t),Ke({type:Ae,value:e,messageId:Be}),Be=(Be+1)%n.MAX_SAFE_INTEGER,await r}},i),f=new Ie(t,s);Re=new AbortController;const{signal:a}=Re;await o.pipeThrough(f).pipeThrough(new Pe(s.chunkSize)).pipeTo(c,{signal:a,preventClose:!0,preventAbort:!0}),await c.getWriter().close();const{signature:l,inputSize:w,outputSize:h}=f;Ke({type:_e,result:{signature:l,inputSize:w,outputSize:h}})}catch(e){Ne(e)}}async function Ue(e){for(const t of e)await import(t)}function Ke(e){let{value:t}=e;if(t)if(t.length)try{t=new i(t),e.value=t.buffer,d(e,[e.value])}catch(t){d(e)}else d(e);else d(e)}function Ne(e=new s(\"Unknown error\")){const{message:t,stack:n,code:r,name:i}=e;d({error:{message:t,stack:n,code:r,name:i}})}addEventListener(\"message\",(({data:e})=>{const{type:t,messageId:n,value:r,done:s}=e;try{if(\"start\"==t&&Me(e),t==Ae){const e=De.get(n);De.delete(n),e({value:new i(r),done:s})}if(\"ack\"==t){const e=Ve.get(n);Ve.delete(n),e()}t==_e&&Re.abort()}catch(e){Ne(e)}}));const Oe=15,Te=573,We=-2;function je(t){return He(t.map((([t,n])=>new e(t).fill(n,0,t))))}function He(t){return t.reduce(((t,n)=>t.concat(e.isArray(n)?He(n):n)),[])}const Le=[0,1,2,3].concat(...je([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function Fe(){const e=this;function t(e,t){let n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1}e.re=n=>{const s=e.se,i=e.oe.ie,o=e.oe.ce;let c,f,a,l=-1;for(n.fe=0,n.ae=Te,c=0;o>c;c++)0!==s[2*c]?(n.le[++n.fe]=l=c,n.ue[c]=0):s[2*c+1]=0;for(;2>n.fe;)a=n.le[++n.fe]=2>l?++l:0,s[2*a]=1,n.ue[a]=0,n.we--,i&&(n.he-=i[2*a+1]);for(e.de=l,c=r.floor(n.fe/2);c>=1;c--)n.pe(s,c);a=o;do{c=n.le[1],n.le[1]=n.le[n.fe--],n.pe(s,1),f=n.le[1],n.le[--n.ae]=c,n.le[--n.ae]=f,s[2*a]=s[2*c]+s[2*f],n.ue[a]=r.max(n.ue[c],n.ue[f])+1,s[2*c+1]=s[2*f+1]=a,n.le[1]=a++,n.pe(s,1)}while(n.fe>=2);n.le[--n.ae]=n.le[1],(t=>{const n=e.se,r=e.oe.ie,s=e.oe.ye,i=e.oe.me,o=e.oe.be;let c,f,a,l,u,w,h=0;for(l=0;Oe>=l;l++)t.ge[l]=0;for(n[2*t.le[t.ae]+1]=0,c=t.ae+1;Te>c;c++)f=t.le[c],l=n[2*n[2*f+1]+1]+1,l>o&&(l=o,h++),n[2*f+1]=l,f>e.de||(t.ge[l]++,u=0,i>f||(u=s[f-i]),w=n[2*f],t.we+=w*(l+u),r&&(t.he+=w*(r[2*f+1]+u)));if(0!==h){do{for(l=o-1;0===t.ge[l];)l--;t.ge[l]--,t.ge[l+1]+=2,t.ge[o]--,h-=2}while(h>0);for(l=o;0!==l;l--)for(f=t.ge[l];0!==f;)a=t.le[--c],a>e.de||(n[2*a+1]!=l&&(t.we+=(l-n[2*a+1])*n[2*a],n[2*a+1]=l),f--)}})(n),((e,n,r)=>{const s=[];let i,o,c,f=0;for(i=1;Oe>=i;i++)s[i]=f=f+r[i-1]<<1;for(o=0;n>=o;o++)c=e[2*o+1],0!==c&&(e[2*o]=t(s[c]++,c))})(s,e.de,n.ge)}}function qe(e,t,n,r,s){const i=this;i.ie=e,i.ye=t,i.me=n,i.ce=r,i.be=s}Fe.ke=[0,1,2,3,4,5,6,7].concat(...je([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]])),Fe.ve=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0],Fe.Se=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576],Fe.ze=e=>256>e?Le[e]:Le[256+(e>>>7)],Fe.Ce=[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],Fe.xe=[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],Fe.Ae=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],Fe._e=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];const Ge=je([[144,8],[112,9],[24,7],[8,8]]);qe.Ie=He([12,140,76,204,44,172,108,236,28,156,92,220,60,188,124,252,2,130,66,194,34,162,98,226,18,146,82,210,50,178,114,242,10,138,74,202,42,170,106,234,26,154,90,218,58,186,122,250,6,134,70,198,38,166,102,230,22,150,86,214,54,182,118,246,14,142,78,206,46,174,110,238,30,158,94,222,62,190,126,254,1,129,65,193,33,161,97,225,17,145,81,209,49,177,113,241,9,137,73,201,41,169,105,233,25,153,89,217,57,185,121,249,5,133,69,197,37,165,101,229,21,149,85,213,53,181,117,245,13,141,77,205,45,173,109,237,29,157,93,221,61,189,125,253,19,275,147,403,83,339,211,467,51,307,179,435,115,371,243,499,11,267,139,395,75,331,203,459,43,299,171,427,107,363,235,491,27,283,155,411,91,347,219,475,59,315,187,443,123,379,251,507,7,263,135,391,71,327,199,455,39,295,167,423,103,359,231,487,23,279,151,407,87,343,215,471,55,311,183,439,119,375,247,503,15,271,143,399,79,335,207,463,47,303,175,431,111,367,239,495,31,287,159,415,95,351,223,479,63,319,191,447,127,383,255,511,0,64,32,96,16,80,48,112,8,72,40,104,24,88,56,120,4,68,36,100,20,84,52,116,3,131,67,195,35,163,99,227].map(((e,t)=>[e,Ge[t]])));const Je=je([[30,5]]);function Qe(e,t,n,r,s){const i=this;i.Pe=e,i.De=t,i.Ve=n,i.Re=r,i.Be=s}qe.Ee=He([0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30,1,17,9,25,5,21,13,29,3,19,11,27,7,23].map(((e,t)=>[e,Je[t]]))),qe.Me=new qe(qe.Ie,Fe.Ce,257,286,Oe),qe.Ue=new qe(qe.Ee,Fe.xe,0,30,Oe),qe.Ke=new qe(null,Fe.Ae,0,19,7);const Xe=[new Qe(0,0,0,0,0),new Qe(4,4,8,4,1),new Qe(4,5,16,8,1),new Qe(4,6,32,32,1),new Qe(4,4,16,16,2),new Qe(8,16,32,32,2),new Qe(8,16,128,128,2),new Qe(8,32,128,256,2),new Qe(32,128,258,1024,2),new Qe(32,258,258,4096,2)],Ye=[\"need dictionary\",\"stream end\",\"\",\"\",\"stream error\",\"data error\",\"\",\"buffer error\",\"\",\"\"],Ze=113,$e=666,et=262;function tt(e,t,n,r){const s=e[2*t],i=e[2*n];return i>s||s==i&&r[t]<=r[n]}function nt(){const e=this;let t,n,s,c,f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z,C,x,A,_,I,P,D,V,R,B,E,M,U;const K=new Fe,N=new Fe,O=new Fe;let T,W,j,H,L,F;function q(){let t;for(t=0;286>t;t++)E[2*t]=0;for(t=0;30>t;t++)M[2*t]=0;for(t=0;19>t;t++)U[2*t]=0;E[512]=1,e.we=e.he=0,W=j=0}function G(e,t){let n,r=-1,s=e[1],i=0,o=7,c=4;0===s&&(o=138,c=3),e[2*(t+1)+1]=65535;for(let f=0;t>=f;f++)n=s,s=e[2*(f+1)+1],++i<o&&n==s||(c>i?U[2*n]+=i:0!==n?(n!=r&&U[2*n]++,U[32]++):i>10?U[36]++:U[34]++,i=0,r=n,0===s?(o=138,c=3):n==s?(o=6,c=3):(o=7,c=4))}function J(t){e.Ne[e.pending++]=t}function Q(e){J(255&e),J(e>>>8&255)}function X(e,t){let n;const r=t;F>16-r?(n=e,L|=n<<F&65535,Q(L),L=n>>>16-F,F+=r-16):(L|=e<<F&65535,F+=r)}function Y(e,t){const n=2*e;X(65535&t[n],65535&t[n+1])}function Z(e,t){let n,r,s=-1,i=e[1],o=0,c=7,f=4;for(0===i&&(c=138,f=3),n=0;t>=n;n++)if(r=i,i=e[2*(n+1)+1],++o>=c||r!=i){if(f>o)do{Y(r,U)}while(0!=--o);else 0!==r?(r!=s&&(Y(r,U),o--),Y(16,U),X(o-3,2)):o>10?(Y(18,U),X(o-11,7)):(Y(17,U),X(o-3,3));o=0,s=r,0===i?(c=138,f=3):r==i?(c=6,f=3):(c=7,f=4)}}function $(){16==F?(Q(L),L=0,F=0):8>F||(J(255&L),L>>>=8,F-=8)}function ee(t,n){let s,i,o;if(e.Oe[W]=t,e.Te[W]=255&n,W++,0===t?E[2*n]++:(j++,t--,E[2*(Fe.ke[n]+256+1)]++,M[2*Fe.ze(t)]++),!(8191&W)&&D>2){for(s=8*W,i=C-k,o=0;30>o;o++)s+=M[2*o]*(5+Fe.xe[o]);if(s>>>=3,j<r.floor(W/2)&&s<r.floor(i/2))return!0}return W==T-1}function te(t,n){let r,s,i,o,c=0;if(0!==W)do{r=e.Oe[c],s=e.Te[c],c++,0===r?Y(s,t):(i=Fe.ke[s],Y(i+256+1,t),o=Fe.Ce[i],0!==o&&(s-=Fe.ve[i],X(s,o)),r--,i=Fe.ze(r),Y(i,n),o=Fe.xe[i],0!==o&&(r-=Fe.Se[i],X(r,o)))}while(W>c);Y(256,t),H=t[513]}function ne(){F>8?Q(L):F>0&&J(255&L),L=0,F=0}function re(t,n,r){X(0+(r?1:0),3),((t,n)=>{ne(),H=8,Q(n),Q(~n),e.Ne.set(u.subarray(t,t+n),e.pending),e.pending+=n})(t,n)}function se(n){((t,n,r)=>{let s,i,o=0;D>0?(K.re(e),N.re(e),o=(()=>{let t;for(G(E,K.de),G(M,N.de),O.re(e),t=18;t>=3&&0===U[2*Fe._e[t]+1];t--);return e.we+=14+3*(t+1),t})(),s=e.we+3+7>>>3,i=e.he+3+7>>>3,i>s||(s=i)):s=i=n+5,n+4>s||-1==t?i==s?(X(2+(r?1:0),3),te(qe.Ie,qe.Ee)):(X(4+(r?1:0),3),((e,t,n)=>{let r;for(X(e-257,5),X(t-1,5),X(n-4,4),r=0;n>r;r++)X(U[2*Fe._e[r]+1],3);Z(E,e-1),Z(M,t-1)})(K.de+1,N.de+1,o+1),te(E,M)):re(t,n,r),q(),r&&ne()})(0>k?-1:k,C-k,n),k=C,t.We()}function ie(){let e,n,r,s;do{if(s=w-A-C,0===s&&0===C&&0===A)s=f;else if(-1==s)s--;else if(C>=f+f-et){u.set(u.subarray(f,f+f),0),x-=f,C-=f,k-=f,e=y,r=e;do{n=65535&d[--r],d[r]=f>n?0:n-f}while(0!=--e);e=f,r=e;do{n=65535&h[--r],h[r]=f>n?0:n-f}while(0!=--e);s+=f}if(0===t.je)return;e=t.He(u,C+A,s),A+=e,3>A||(p=255&u[C],p=(p<<g^255&u[C+1])&b)}while(et>A&&0!==t.je)}function oe(e){let t,n,r=I,s=C,i=_;const o=C>f-et?C-(f-et):0;let c=B;const a=l,w=C+258;let d=u[s+i-1],p=u[s+i];R>_||(r>>=2),c>A&&(c=A);do{if(t=e,u[t+i]==p&&u[t+i-1]==d&&u[t]==u[s]&&u[++t]==u[s+1]){s+=2,t++;do{}while(u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&w>s);if(n=258-(w-s),s=w-258,n>i){if(x=e,i=n,n>=c)break;d=u[s+i-1],p=u[s+i]}}}while((e=65535&h[e&a])>o&&0!=--r);return i>A?A:i}e.ue=[],e.ge=[],e.le=[],E=[],M=[],U=[],e.pe=(t,n)=>{const r=e.le,s=r[n];let i=n<<1;for(;i<=e.fe&&(i<e.fe&&tt(t,r[i+1],r[i],e.ue)&&i++,!tt(t,s,r[i],e.ue));)r[n]=r[i],n=i,i<<=1;r[n]=s},e.Le=(t,S,x,W,j,G)=>(W||(W=8),j||(j=8),G||(G=0),t.Fe=null,-1==S&&(S=6),1>j||j>9||8!=W||9>x||x>15||0>S||S>9||0>G||G>2?We:(t.qe=e,a=x,f=1<<a,l=f-1,m=j+7,y=1<<m,b=y-1,g=r.floor((m+3-1)/3),u=new i(2*f),h=[],d=[],T=1<<j+6,e.Ne=new i(4*T),s=4*T,e.Oe=new o(T),e.Te=new i(T),D=S,V=G,(t=>(t.Ge=t.Je=0,t.Fe=null,e.pending=0,e.Qe=0,n=Ze,c=0,K.se=E,K.oe=qe.Me,N.se=M,N.oe=qe.Ue,O.se=U,O.oe=qe.Ke,L=0,F=0,H=8,q(),(()=>{w=2*f,d[y-1]=0;for(let e=0;y-1>e;e++)d[e]=0;P=Xe[D].De,R=Xe[D].Pe,B=Xe[D].Ve,I=Xe[D].Re,C=0,k=0,A=0,v=_=2,z=0,p=0})(),0))(t))),e.Xe=()=>42!=n&&n!=Ze&&n!=$e?We:(e.Te=null,e.Oe=null,e.Ne=null,d=null,h=null,u=null,e.qe=null,n==Ze?-3:0),e.Ye=(e,t,n)=>{let r=0;return-1==t&&(t=6),0>t||t>9||0>n||n>2?We:(Xe[D].Be!=Xe[t].Be&&0!==e.Ge&&(r=e.Ze(1)),D!=t&&(D=t,P=Xe[D].De,R=Xe[D].Pe,B=Xe[D].Ve,I=Xe[D].Re),V=n,r)},e.$e=(e,t,r)=>{let s,i=r,o=0;if(!t||42!=n)return We;if(3>i)return 0;for(i>f-et&&(i=f-et,o=r-i),u.set(t.subarray(o,o+i),0),C=i,k=i,p=255&u[0],p=(p<<g^255&u[1])&b,s=0;i-3>=s;s++)p=(p<<g^255&u[s+2])&b,h[s&l]=d[p],d[p]=s;return 0},e.Ze=(r,i)=>{let o,w,m,I,R;if(i>4||0>i)return We;if(!r.et||!r.tt&&0!==r.je||n==$e&&4!=i)return r.Fe=Ye[4],We;if(0===r.nt)return r.Fe=Ye[7],-5;var B;if(t=r,I=c,c=i,42==n&&(w=8+(a-8<<4)<<8,m=(D-1&255)>>1,m>3&&(m=3),w|=m<<6,0!==C&&(w|=32),w+=31-w%31,n=Ze,J((B=w)>>8&255),J(255&B)),0!==e.pending){if(t.We(),0===t.nt)return c=-1,0}else if(0===t.je&&I>=i&&4!=i)return t.Fe=Ye[7],-5;if(n==$e&&0!==t.je)return r.Fe=Ye[7],-5;if(0!==t.je||0!==A||0!=i&&n!=$e){switch(R=-1,Xe[D].Be){case 0:R=(e=>{let n,r=65535;for(r>s-5&&(r=s-5);;){if(1>=A){if(ie(),0===A&&0==e)return 0;if(0===A)break}if(C+=A,A=0,n=k+r,(0===C||C>=n)&&(A=C-n,C=n,se(!1),0===t.nt))return 0;if(C-k>=f-et&&(se(!1),0===t.nt))return 0}return se(4==e),0===t.nt?4==e?2:0:4==e?3:1})(i);break;case 1:R=(e=>{let n,r=0;for(;;){if(et>A){if(ie(),et>A&&0==e)return 0;if(0===A)break}if(3>A||(p=(p<<g^255&u[C+2])&b,r=65535&d[p],h[C&l]=d[p],d[p]=C),0===r||(C-r&65535)>f-et||2!=V&&(v=oe(r)),3>v)n=ee(0,255&u[C]),A--,C++;else if(n=ee(C-x,v-3),A-=v,v>P||3>A)C+=v,v=0,p=255&u[C],p=(p<<g^255&u[C+1])&b;else{v--;do{C++,p=(p<<g^255&u[C+2])&b,r=65535&d[p],h[C&l]=d[p],d[p]=C}while(0!=--v);C++}if(n&&(se(!1),0===t.nt))return 0}return se(4==e),0===t.nt?4==e?2:0:4==e?3:1})(i);break;case 2:R=(e=>{let n,r,s=0;for(;;){if(et>A){if(ie(),et>A&&0==e)return 0;if(0===A)break}if(3>A||(p=(p<<g^255&u[C+2])&b,s=65535&d[p],h[C&l]=d[p],d[p]=C),_=v,S=x,v=2,0!==s&&P>_&&f-et>=(C-s&65535)&&(2!=V&&(v=oe(s)),5>=v&&(1==V||3==v&&C-x>4096)&&(v=2)),3>_||v>_)if(0!==z){if(n=ee(0,255&u[C-1]),n&&se(!1),C++,A--,0===t.nt)return 0}else z=1,C++,A--;else{r=C+A-3,n=ee(C-1-S,_-3),A-=_-1,_-=2;do{++C>r||(p=(p<<g^255&u[C+2])&b,s=65535&d[p],h[C&l]=d[p],d[p]=C)}while(0!=--_);if(z=0,v=2,C++,n&&(se(!1),0===t.nt))return 0}}return 0!==z&&(n=ee(0,255&u[C-1]),z=0),se(4==e),0===t.nt?4==e?2:0:4==e?3:1})(i)}if(2!=R&&3!=R||(n=$e),0==R||2==R)return 0===t.nt&&(c=-1),0;if(1==R){if(1==i)X(2,3),Y(256,qe.Ie),$(),9>1+H+10-F&&(X(2,3),Y(256,qe.Ie),$()),H=7;else if(re(0,0,!1),3==i)for(o=0;y>o;o++)d[o]=0;if(t.We(),0===t.nt)return c=-1,0}}return 4!=i?0:1}}function rt(){const e=this;e.rt=0,e.st=0,e.je=0,e.Ge=0,e.nt=0,e.Je=0}function st(e){const t=new rt,n=(o=e&&e.chunkSize?e.chunkSize:65536)+5*(r.floor(o/16383)+1);var o;const c=new i(n);let f=e?e.level:-1;void 0===f&&(f=-1),t.Le(f),t.et=c,this.append=(e,r)=>{let o,f,a=0,l=0,u=0;const w=[];if(e.length){t.rt=0,t.tt=e,t.je=e.length;do{if(t.st=0,t.nt=n,o=t.Ze(0),0!=o)throw new s(\"deflating: \"+t.Fe);t.st&&(t.st==n?w.push(new i(c)):w.push(c.subarray(0,t.st))),u+=t.st,r&&t.rt>0&&t.rt!=a&&(r(t.rt),a=t.rt)}while(t.je>0||0===t.nt);return w.length>1?(f=new i(u),w.forEach((e=>{f.set(e,l),l+=e.length}))):f=w[0]?new i(w[0]):new i,f}},this.flush=()=>{let e,r,o=0,f=0;const a=[];do{if(t.st=0,t.nt=n,e=t.Ze(4),1!=e&&0!=e)throw new s(\"deflating: \"+t.Fe);n-t.nt>0&&a.push(c.slice(0,t.st)),f+=t.st}while(t.je>0||0===t.nt);return t.Xe(),r=new i(f),a.forEach((e=>{r.set(e,o),o+=e.length})),r}}rt.prototype={Le(e,t){const n=this;return n.qe=new nt,t||(t=Oe),n.qe.Le(n,e,t)},Ze(e){const t=this;return t.qe?t.qe.Ze(t,e):We},Xe(){const e=this;if(!e.qe)return We;const t=e.qe.Xe();return e.qe=null,t},Ye(e,t){const n=this;return n.qe?n.qe.Ye(n,e,t):We},$e(e,t){const n=this;return n.qe?n.qe.$e(n,e,t):We},He(e,t,n){const r=this;let s=r.je;return s>n&&(s=n),0===s?0:(r.je-=s,e.set(r.tt.subarray(r.rt,r.rt+s),t),r.rt+=s,r.Ge+=s,s)},We(){const e=this;let t=e.qe.pending;t>e.nt&&(t=e.nt),0!==t&&(e.et.set(e.qe.Ne.subarray(e.qe.Qe,e.qe.Qe+t),e.st),e.st+=t,e.qe.Qe+=t,e.Je+=t,e.nt-=t,e.qe.pending-=t,0===e.qe.pending&&(e.qe.Qe=0))}};const it=0,ot=1,ct=-2,ft=-3,at=-4,lt=-5,ut=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],wt=1440,ht=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],dt=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],pt=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],yt=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,112,112],mt=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],bt=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],gt=15;function kt(){let e,t,n,r,s,i;function o(e,t,o,c,f,a,l,u,w,h,d){let p,y,m,b,g,k,v,S,z,C,x,A,_,I,P;C=0,g=o;do{n[e[t+C]]++,C++,g--}while(0!==g);if(n[0]==o)return l[0]=-1,u[0]=0,it;for(S=u[0],k=1;gt>=k&&0===n[k];k++);for(v=k,k>S&&(S=k),g=gt;0!==g&&0===n[g];g--);for(m=g,S>g&&(S=g),u[0]=S,I=1<<k;g>k;k++,I<<=1)if(0>(I-=n[k]))return ft;if(0>(I-=n[g]))return ft;for(n[g]+=I,i[1]=k=0,C=1,_=2;0!=--g;)i[_]=k+=n[C],_++,C++;g=0,C=0;do{0!==(k=e[t+C])&&(d[i[k]++]=g),C++}while(++g<o);for(o=i[m],i[0]=g=0,C=0,b=-1,A=-S,s[0]=0,x=0,P=0;m>=v;v++)for(p=n[v];0!=p--;){for(;v>A+S;){if(b++,A+=S,P=m-A,P=P>S?S:P,(y=1<<(k=v-A))>p+1&&(y-=p+1,_=v,P>k))for(;++k<P&&(y<<=1)>n[++_];)y-=n[_];if(P=1<<k,h[0]+P>wt)return ft;s[b]=x=h[0],h[0]+=P,0!==b?(i[b]=g,r[0]=k,r[1]=S,k=g>>>A-S,r[2]=x-s[b-1]-k,w.set(r,3*(s[b-1]+k))):l[0]=x}for(r[1]=v-A,o>C?d[C]<c?(r[0]=256>d[C]?0:96,r[2]=d[C++]):(r[0]=a[d[C]-c]+16+64,r[2]=f[d[C++]-c]):r[0]=192,y=1<<v-A,k=g>>>A;P>k;k+=y)w.set(r,3*(x+k));for(k=1<<v-1;g&k;k>>>=1)g^=k;for(g^=k,z=(1<<A)-1;(g&z)!=i[b];)b--,A-=S,z=(1<<A)-1}return 0!==I&&1!=m?lt:it}function c(o){let c;for(e||(e=[],t=[],n=new f(gt+1),r=[],s=new f(gt),i=new f(gt+1)),t.length<o&&(t=[]),c=0;o>c;c++)t[c]=0;for(c=0;gt+1>c;c++)n[c]=0;for(c=0;3>c;c++)r[c]=0;s.set(n.subarray(0,gt),0),i.set(n.subarray(0,gt+1),0)}this.it=(n,r,s,i,f)=>{let a;return c(19),e[0]=0,a=o(n,0,19,19,null,null,s,r,i,e,t),a==ft?f.Fe=\"oversubscribed dynamic bit lengths tree\":a!=lt&&0!==r[0]||(f.Fe=\"incomplete dynamic bit lengths tree\",a=ft),a},this.ot=(n,r,s,i,f,a,l,u,w)=>{let h;return c(288),e[0]=0,h=o(s,0,n,257,pt,yt,a,i,u,e,t),h!=it||0===i[0]?(h==ft?w.Fe=\"oversubscribed literal/length tree\":h!=at&&(w.Fe=\"incomplete literal/length tree\",h=ft),h):(c(288),h=o(s,n,r,0,mt,bt,l,f,u,e,t),h!=it||0===f[0]&&n>257?(h==ft?w.Fe=\"oversubscribed distance tree\":h==lt?(w.Fe=\"incomplete distance tree\",h=ft):h!=at&&(w.Fe=\"empty distance tree with lengths\",h=ft),h):it)}}kt.ct=(e,t,n,r)=>(e[0]=9,t[0]=5,n[0]=ht,r[0]=dt,it);const vt=0,St=1,zt=2,Ct=3,xt=4,At=5,_t=6,It=7,Pt=8,Dt=9;function Vt(){const e=this;let t,n,r,s,i=0,o=0,c=0,f=0,a=0,l=0,u=0,w=0,h=0,d=0;function p(e,t,n,r,s,i,o,c){let f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z;d=c.rt,p=c.je,w=o.ft,h=o.lt,y=o.write,m=y<o.read?o.read-y-1:o.end-y,b=ut[e],g=ut[t];do{for(;20>h;)p--,w|=(255&c.ut(d++))<<h,h+=8;if(f=w&b,a=n,l=r,z=3*(l+f),0!==(u=a[z]))for(;;){if(w>>=a[z+1],h-=a[z+1],16&u){for(u&=15,k=a[z+2]+(w&ut[u]),w>>=u,h-=u;15>h;)p--,w|=(255&c.ut(d++))<<h,h+=8;for(f=w&g,a=s,l=i,z=3*(l+f),u=a[z];;){if(w>>=a[z+1],h-=a[z+1],16&u){for(u&=15;u>h;)p--,w|=(255&c.ut(d++))<<h,h+=8;if(v=a[z+2]+(w&ut[u]),w>>=u,h-=u,m-=k,v>y){S=y-v;do{S+=o.end}while(0>S);if(u=o.end-S,k>u){if(k-=u,y-S>0&&u>y-S)do{o.wt[y++]=o.wt[S++]}while(0!=--u);else o.wt.set(o.wt.subarray(S,S+u),y),y+=u,S+=u,u=0;S=0}}else S=y-v,y-S>0&&2>y-S?(o.wt[y++]=o.wt[S++],o.wt[y++]=o.wt[S++],k-=2):(o.wt.set(o.wt.subarray(S,S+2),y),y+=2,S+=2,k-=2);if(y-S>0&&k>y-S)do{o.wt[y++]=o.wt[S++]}while(0!=--k);else o.wt.set(o.wt.subarray(S,S+k),y),y+=k,S+=k,k=0;break}if(64&u)return c.Fe=\"invalid distance code\",k=c.je-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ft=w,o.lt=h,c.je=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,ft;f+=a[z+2],f+=w&ut[u],z=3*(l+f),u=a[z]}break}if(64&u)return 32&u?(k=c.je-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ft=w,o.lt=h,c.je=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,ot):(c.Fe=\"invalid literal/length code\",k=c.je-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ft=w,o.lt=h,c.je=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,ft);if(f+=a[z+2],f+=w&ut[u],z=3*(l+f),0===(u=a[z])){w>>=a[z+1],h-=a[z+1],o.wt[y++]=a[z+2],m--;break}}else w>>=a[z+1],h-=a[z+1],o.wt[y++]=a[z+2],m--}while(m>=258&&p>=10);return k=c.je-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ft=w,o.lt=h,c.je=p,c.Ge+=d-c.rt,c.rt=d,o.write=y,it}e.init=(e,i,o,c,f,a)=>{t=vt,u=e,w=i,r=o,h=c,s=f,d=a,n=null},e.ht=(e,y,m)=>{let b,g,k,v,S,z,C,x=0,A=0,_=0;for(_=y.rt,v=y.je,x=e.ft,A=e.lt,S=e.write,z=S<e.read?e.read-S-1:e.end-S;;)switch(t){case vt:if(z>=258&&v>=10&&(e.ft=x,e.lt=A,y.je=v,y.Ge+=_-y.rt,y.rt=_,e.write=S,m=p(u,w,r,h,s,d,e,y),_=y.rt,v=y.je,x=e.ft,A=e.lt,S=e.write,z=S<e.read?e.read-S-1:e.end-S,m!=it)){t=m==ot?It:Dt;break}c=u,n=r,o=h,t=St;case St:for(b=c;b>A;){if(0===v)return e.ft=x,e.lt=A,y.je=v,y.Ge+=_-y.rt,y.rt=_,e.write=S,e.dt(y,m);m=it,v--,x|=(255&y.ut(_++))<<A,A+=8}if(g=3*(o+(x&ut[b])),x>>>=n[g+1],A-=n[g+1],k=n[g],0===k){f=n[g+2],t=_t;break}if(16&k){a=15&k,i=n[g+2],t=zt;break}if(!(64&k)){c=k,o=g/3+n[g+2];break}if(32&k){t=It;break}return t=Dt,y.Fe=\"invalid literal/length code\",m=ft,e.ft=x,e.lt=A,y.je=v,y.Ge+=_-y.rt,y.rt=_,e.write=S,e.dt(y,m);case zt:for(b=a;b>A;){if(0===v)return e.ft=x,e.lt=A,y.je=v,y.Ge+=_-y.rt,y.rt=_,e.write=S,e.dt(y,m);m=it,v--,x|=(255&y.ut(_++))<<A,A+=8}i+=x&ut[b],x>>=b,A-=b,c=w,n=s,o=d,t=Ct;case Ct:for(b=c;b>A;){if(0===v)return e.ft=x,e.lt=A,y.je=v,y.Ge+=_-y.rt,y.rt=_,e.write=S,e.dt(y,m);m=it,v--,x|=(255&y.ut(_++))<<A,A+=8}if(g=3*(o+(x&ut[b])),x>>=n[g+1],A-=n[g+1],k=n[g],16&k){a=15&k,l=n[g+2],t=xt;break}if(!(64&k)){c=k,o=g/3+n[g+2];break}return t=Dt,y.Fe=\"invalid distance code\",m=ft,e.ft=x,e.lt=A,y.je=v,y.Ge+=_-y.rt,y.rt=_,e.write=S,e.dt(y,m);case xt:for(b=a;b>A;){if(0===v)return e.ft=x,e.lt=A,y.je=v,y.Ge+=_-y.rt,y.rt=_,e.write=S,e.dt(y,m);m=it,v--,x|=(255&y.ut(_++))<<A,A+=8}l+=x&ut[b],x>>=b,A-=b,t=At;case At:for(C=S-l;0>C;)C+=e.end;for(;0!==i;){if(0===z&&(S==e.end&&0!==e.read&&(S=0,z=S<e.read?e.read-S-1:e.end-S),0===z&&(e.write=S,m=e.dt(y,m),S=e.write,z=S<e.read?e.read-S-1:e.end-S,S==e.end&&0!==e.read&&(S=0,z=S<e.read?e.read-S-1:e.end-S),0===z)))return e.ft=x,e.lt=A,y.je=v,y.Ge+=_-y.rt,y.rt=_,e.write=S,e.dt(y,m);e.wt[S++]=e.wt[C++],z--,C==e.end&&(C=0),i--}t=vt;break;case _t:if(0===z&&(S==e.end&&0!==e.read&&(S=0,z=S<e.read?e.read-S-1:e.end-S),0===z&&(e.write=S,m=e.dt(y,m),S=e.write,z=S<e.read?e.read-S-1:e.end-S,S==e.end&&0!==e.read&&(S=0,z=S<e.read?e.read-S-1:e.end-S),0===z)))return e.ft=x,e.lt=A,y.je=v,y.Ge+=_-y.rt,y.rt=_,e.write=S,e.dt(y,m);m=it,e.wt[S++]=f,z--,t=vt;break;case It:if(A>7&&(A-=8,v++,_--),e.write=S,m=e.dt(y,m),S=e.write,z=S<e.read?e.read-S-1:e.end-S,e.read!=e.write)return e.ft=x,e.lt=A,y.je=v,y.Ge+=_-y.rt,y.rt=_,e.write=S,e.dt(y,m);t=Pt;case Pt:return m=ot,e.ft=x,e.lt=A,y.je=v,y.Ge+=_-y.rt,y.rt=_,e.write=S,e.dt(y,m);case Dt:return m=ft,e.ft=x,e.lt=A,y.je=v,y.Ge+=_-y.rt,y.rt=_,e.write=S,e.dt(y,m);default:return m=ct,e.ft=x,e.lt=A,y.je=v,y.Ge+=_-y.rt,y.rt=_,e.write=S,e.dt(y,m)}},e.yt=()=>{}}const Rt=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],Bt=0,Et=1,Mt=2,Ut=3,Kt=4,Nt=5,Ot=6,Tt=7,Wt=8,jt=9;function Ht(e,t){const n=this;let r,s=Bt,o=0,c=0,a=0;const l=[0],u=[0],w=new Vt;let h=0,d=new f(3*wt);const p=new kt;n.lt=0,n.ft=0,n.wt=new i(t),n.end=t,n.read=0,n.write=0,n.reset=(e,t)=>{t&&(t[0]=0),s==Ot&&w.yt(e),s=Bt,n.lt=0,n.ft=0,n.read=n.write=0},n.reset(e,null),n.dt=(e,t)=>{let r,s,i;return s=e.st,i=n.read,r=(i>n.write?n.end:n.write)-i,r>e.nt&&(r=e.nt),0!==r&&t==lt&&(t=it),e.nt-=r,e.Je+=r,e.et.set(n.wt.subarray(i,i+r),s),s+=r,i+=r,i==n.end&&(i=0,n.write==n.end&&(n.write=0),r=n.write-i,r>e.nt&&(r=e.nt),0!==r&&t==lt&&(t=it),e.nt-=r,e.Je+=r,e.et.set(n.wt.subarray(i,i+r),s),s+=r,i+=r),e.st=s,n.read=i,t},n.ht=(e,t)=>{let i,f,y,m,b,g,k,v;for(m=e.rt,b=e.je,f=n.ft,y=n.lt,g=n.write,k=g<n.read?n.read-g-1:n.end-g;;){let S,z,C,x,A,_,I,P;switch(s){case Bt:for(;3>y;){if(0===b)return n.ft=f,n.lt=y,e.je=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.dt(e,t);t=it,b--,f|=(255&e.ut(m++))<<y,y+=8}switch(i=7&f,h=1&i,i>>>1){case 0:f>>>=3,y-=3,i=7&y,f>>>=i,y-=i,s=Et;break;case 1:S=[],z=[],C=[[]],x=[[]],kt.ct(S,z,C,x),w.init(S[0],z[0],C[0],0,x[0],0),f>>>=3,y-=3,s=Ot;break;case 2:f>>>=3,y-=3,s=Ut;break;case 3:return f>>>=3,y-=3,s=jt,e.Fe=\"invalid block type\",t=ft,n.ft=f,n.lt=y,e.je=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.dt(e,t)}break;case Et:for(;32>y;){if(0===b)return n.ft=f,n.lt=y,e.je=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.dt(e,t);t=it,b--,f|=(255&e.ut(m++))<<y,y+=8}if((~f>>>16&65535)!=(65535&f))return s=jt,e.Fe=\"invalid stored block lengths\",t=ft,n.ft=f,n.lt=y,e.je=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.dt(e,t);o=65535&f,f=y=0,s=0!==o?Mt:0!==h?Tt:Bt;break;case Mt:if(0===b)return n.ft=f,n.lt=y,e.je=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.dt(e,t);if(0===k&&(g==n.end&&0!==n.read&&(g=0,k=g<n.read?n.read-g-1:n.end-g),0===k&&(n.write=g,t=n.dt(e,t),g=n.write,k=g<n.read?n.read-g-1:n.end-g,g==n.end&&0!==n.read&&(g=0,k=g<n.read?n.read-g-1:n.end-g),0===k)))return n.ft=f,n.lt=y,e.je=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.dt(e,t);if(t=it,i=o,i>b&&(i=b),i>k&&(i=k),n.wt.set(e.He(m,i),g),m+=i,b-=i,g+=i,k-=i,0!=(o-=i))break;s=0!==h?Tt:Bt;break;case Ut:for(;14>y;){if(0===b)return n.ft=f,n.lt=y,e.je=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.dt(e,t);t=it,b--,f|=(255&e.ut(m++))<<y,y+=8}if(c=i=16383&f,(31&i)>29||(i>>5&31)>29)return s=jt,e.Fe=\"too many length or distance symbols\",t=ft,n.ft=f,n.lt=y,e.je=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.dt(e,t);if(i=258+(31&i)+(i>>5&31),!r||r.length<i)r=[];else for(v=0;i>v;v++)r[v]=0;f>>>=14,y-=14,a=0,s=Kt;case Kt:for(;4+(c>>>10)>a;){for(;3>y;){if(0===b)return n.ft=f,n.lt=y,e.je=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.dt(e,t);t=it,b--,f|=(255&e.ut(m++))<<y,y+=8}r[Rt[a++]]=7&f,f>>>=3,y-=3}for(;19>a;)r[Rt[a++]]=0;if(l[0]=7,i=p.it(r,l,u,d,e),i!=it)return(t=i)==ft&&(r=null,s=jt),n.ft=f,n.lt=y,e.je=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.dt(e,t);a=0,s=Nt;case Nt:for(;i=c,258+(31&i)+(i>>5&31)>a;){let o,w;for(i=l[0];i>y;){if(0===b)return n.ft=f,n.lt=y,e.je=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.dt(e,t);t=it,b--,f|=(255&e.ut(m++))<<y,y+=8}if(i=d[3*(u[0]+(f&ut[i]))+1],w=d[3*(u[0]+(f&ut[i]))+2],16>w)f>>>=i,y-=i,r[a++]=w;else{for(v=18==w?7:w-14,o=18==w?11:3;i+v>y;){if(0===b)return n.ft=f,n.lt=y,e.je=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.dt(e,t);t=it,b--,f|=(255&e.ut(m++))<<y,y+=8}if(f>>>=i,y-=i,o+=f&ut[v],f>>>=v,y-=v,v=a,i=c,v+o>258+(31&i)+(i>>5&31)||16==w&&1>v)return r=null,s=jt,e.Fe=\"invalid bit length repeat\",t=ft,n.ft=f,n.lt=y,e.je=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.dt(e,t);w=16==w?r[v-1]:0;do{r[v++]=w}while(0!=--o);a=v}}if(u[0]=-1,A=[],_=[],I=[],P=[],A[0]=9,_[0]=6,i=c,i=p.ot(257+(31&i),1+(i>>5&31),r,A,_,I,P,d,e),i!=it)return i==ft&&(r=null,s=jt),t=i,n.ft=f,n.lt=y,e.je=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.dt(e,t);w.init(A[0],_[0],d,I[0],d,P[0]),s=Ot;case Ot:if(n.ft=f,n.lt=y,e.je=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,(t=w.ht(n,e,t))!=ot)return n.dt(e,t);if(t=it,w.yt(e),m=e.rt,b=e.je,f=n.ft,y=n.lt,g=n.write,k=g<n.read?n.read-g-1:n.end-g,0===h){s=Bt;break}s=Tt;case Tt:if(n.write=g,t=n.dt(e,t),g=n.write,k=g<n.read?n.read-g-1:n.end-g,n.read!=n.write)return n.ft=f,n.lt=y,e.je=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.dt(e,t);s=Wt;case Wt:return t=ot,n.ft=f,n.lt=y,e.je=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.dt(e,t);case jt:return t=ft,n.ft=f,n.lt=y,e.je=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.dt(e,t);default:return t=ct,n.ft=f,n.lt=y,e.je=b,e.Ge+=m-e.rt,e.rt=m,n.write=g,n.dt(e,t)}}},n.yt=e=>{n.reset(e,null),n.wt=null,d=null},n.bt=(e,t,r)=>{n.wt.set(e.subarray(t,t+r),0),n.read=n.write=r},n.gt=()=>s==Et?1:0}const Lt=13,Ft=[0,0,255,255];function qt(){const e=this;function t(e){return e&&e.kt?(e.Ge=e.Je=0,e.Fe=null,e.kt.mode=7,e.kt.vt.reset(e,null),it):ct}e.mode=0,e.method=0,e.St=[0],e.zt=0,e.marker=0,e.Ct=0,e.xt=t=>(e.vt&&e.vt.yt(t),e.vt=null,it),e.At=(n,r)=>(n.Fe=null,e.vt=null,8>r||r>15?(e.xt(n),ct):(e.Ct=r,n.kt.vt=new Ht(n,1<<r),t(n),it)),e._t=(e,t)=>{let n,r;if(!e||!e.kt||!e.tt)return ct;const s=e.kt;for(t=4==t?lt:it,n=lt;;)switch(s.mode){case 0:if(0===e.je)return n;if(n=t,e.je--,e.Ge++,8!=(15&(s.method=e.ut(e.rt++)))){s.mode=Lt,e.Fe=\"unknown compression method\",s.marker=5;break}if(8+(s.method>>4)>s.Ct){s.mode=Lt,e.Fe=\"invalid win size\",s.marker=5;break}s.mode=1;case 1:if(0===e.je)return n;if(n=t,e.je--,e.Ge++,r=255&e.ut(e.rt++),((s.method<<8)+r)%31!=0){s.mode=Lt,e.Fe=\"incorrect header check\",s.marker=5;break}if(!(32&r)){s.mode=7;break}s.mode=2;case 2:if(0===e.je)return n;n=t,e.je--,e.Ge++,s.zt=(255&e.ut(e.rt++))<<24&4278190080,s.mode=3;case 3:if(0===e.je)return n;n=t,e.je--,e.Ge++,s.zt+=(255&e.ut(e.rt++))<<16&16711680,s.mode=4;case 4:if(0===e.je)return n;n=t,e.je--,e.Ge++,s.zt+=(255&e.ut(e.rt++))<<8&65280,s.mode=5;case 5:return 0===e.je?n:(n=t,e.je--,e.Ge++,s.zt+=255&e.ut(e.rt++),s.mode=6,2);case 6:return s.mode=Lt,e.Fe=\"need dictionary\",s.marker=0,ct;case 7:if(n=s.vt.ht(e,n),n==ft){s.mode=Lt,s.marker=0;break}if(n==it&&(n=t),n!=ot)return n;n=t,s.vt.reset(e,s.St),s.mode=12;case 12:return e.je=0,ot;case Lt:return ft;default:return ct}},e.It=(e,t,n)=>{let r=0,s=n;if(!e||!e.kt||6!=e.kt.mode)return ct;const i=e.kt;return s<1<<i.Ct||(s=(1<<i.Ct)-1,r=n-s),i.vt.bt(t,r,s),i.mode=7,it},e.Pt=e=>{let n,r,s,i,o;if(!e||!e.kt)return ct;const c=e.kt;if(c.mode!=Lt&&(c.mode=Lt,c.marker=0),0===(n=e.je))return lt;for(r=e.rt,s=c.marker;0!==n&&4>s;)e.ut(r)==Ft[s]?s++:s=0!==e.ut(r)?0:4-s,r++,n--;return e.Ge+=r-e.rt,e.rt=r,e.je=n,c.marker=s,4!=s?ft:(i=e.Ge,o=e.Je,t(e),e.Ge=i,e.Je=o,c.mode=7,it)},e.Dt=e=>e&&e.kt&&e.kt.vt?e.kt.vt.gt():ct}function Gt(){}function Jt(e){const t=new Gt,n=e&&e.chunkSize?r.floor(2*e.chunkSize):131072,o=new i(n);let c=!1;t.At(),t.et=o,this.append=(e,r)=>{const f=[];let a,l,u=0,w=0,h=0;if(0!==e.length){t.rt=0,t.tt=e,t.je=e.length;do{if(t.st=0,t.nt=n,0!==t.je||c||(t.rt=0,c=!0),a=t._t(0),c&&a===lt){if(0!==t.je)throw new s(\"inflating: bad input\")}else if(a!==it&&a!==ot)throw new s(\"inflating: \"+t.Fe);if((c||a===ot)&&t.je===e.length)throw new s(\"inflating: bad input\");t.st&&(t.st===n?f.push(new i(o)):f.push(o.subarray(0,t.st))),h+=t.st,r&&t.rt>0&&t.rt!=u&&(r(t.rt),u=t.rt)}while(t.je>0||0===t.nt);return f.length>1?(l=new i(h),f.forEach((e=>{l.set(e,w),w+=e.length}))):l=f[0]?new i(f[0]):new i,l}},this.flush=()=>{t.xt()}}Gt.prototype={At(e){const t=this;return t.kt=new qt,e||(e=15),t.kt.At(t,e)},_t(e){const t=this;return t.kt?t.kt._t(t,e):ct},xt(){const e=this;if(!e.kt)return ct;const t=e.kt.xt(e);return e.kt=null,t},Pt(){const e=this;return e.kt?e.kt.Pt(e):ct},It(e,t){const n=this;return n.kt?n.kt.It(n,e,t):ct},ut(e){return this.tt[e]},He(e,t){return this.tt.subarray(e,e+t)}},self.initCodec=()=>{self.Deflate=st,self.Inflate=Jt};\\n'],{type:\"text/javascript\"}));e({workerScripts:{inflate:[t],deflate:[t]}})}export{e as configureWebWorker};\n", "/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nconst mimeTypes = {};\n\nexport {\n\tmimeTypes,\n\tgetMimeType\n};\n\nfunction getMimeType() {\n\treturn \"application/octet-stream\";\n}", "\n/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n// deno-lint-ignore-file no-this-alias\n\nimport { FUNCTION_TYPE, UNDEFINED_VALUE } from \"../constants.js\";\n\nexport {\n\tinitShimAsyncCodec\n};\n\nfunction initShimAsyncCodec(library, options = {}, registerDataHandler) {\n\treturn {\n\t\tDeflate: createCodecClass(library.Deflate, options.deflate, registerDataHandler),\n\t\tInflate: createCodecClass(library.Inflate, options.inflate, registerDataHandler)\n\t};\n}\n\nfunction objectHasOwn(object, propertyName) {\n\t// eslint-disable-next-line no-prototype-builtins\n\treturn typeof Object.hasOwn === FUNCTION_TYPE ? Object.hasOwn(object, propertyName) : object.hasOwnProperty(propertyName);\n}\n\nfunction createCodecClass(constructor, constructorOptions, registerDataHandler) {\n\treturn class {\n\n\t\tconstructor(options) {\n\t\t\tconst codecAdapter = this;\n\t\t\tconst onData = data => {\n\t\t\t\tif (codecAdapter.pendingData) {\n\t\t\t\t\tconst previousPendingData = codecAdapter.pendingData;\n\t\t\t\t\tcodecAdapter.pendingData = new Uint8Array(previousPendingData.length + data.length);\n\t\t\t\t\tconst { pendingData } = codecAdapter;\n\t\t\t\t\tpendingData.set(previousPendingData, 0);\n\t\t\t\t\tpendingData.set(data, previousPendingData.length);\n\t\t\t\t} else {\n\t\t\t\t\tcodecAdapter.pendingData = new Uint8Array(data);\n\t\t\t\t}\n\t\t\t};\n\t\t\tif (objectHasOwn(options, \"level\") && options.level === UNDEFINED_VALUE) {\n\t\t\t\tdelete options.level;\n\t\t\t}\n\t\t\tcodecAdapter.codec = new constructor(Object.assign({}, constructorOptions, options));\n\t\t\tregisterDataHandler(codecAdapter.codec, onData);\n\t\t}\n\t\tappend(data) {\n\t\t\tthis.codec.push(data);\n\t\t\treturn getResponse(this);\n\t\t}\n\t\tflush() {\n\t\t\tthis.codec.push(new Uint8Array(), true);\n\t\t\treturn getResponse(this);\n\t\t}\n\t};\n\n\tfunction getResponse(codec) {\n\t\tif (codec.pendingData) {\n\t\t\tconst output = codec.pendingData;\n\t\t\tcodec.pendingData = null;\n\t\t\treturn output;\n\t\t} else {\n\t\t\treturn new Uint8Array();\n\t\t}\n\t}\n}", "/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nconst table = [];\nfor (let i = 0; i < 256; i++) {\n\tlet t = i;\n\tfor (let j = 0; j < 8; j++) {\n\t\tif (t & 1) {\n\t\t\tt = (t >>> 1) ^ 0xEDB88320;\n\t\t} else {\n\t\t\tt = t >>> 1;\n\t\t}\n\t}\n\ttable[i] = t;\n}\n\nclass Crc32 {\n\n\tconstructor(crc) {\n\t\tthis.crc = crc || -1;\n\t}\n\n\tappend(data) {\n\t\tlet crc = this.crc | 0;\n\t\tfor (let offset = 0, length = data.length | 0; offset < length; offset++) {\n\t\t\tcrc = (crc >>> 8) ^ table[(crc ^ data[offset]) & 0xFF];\n\t\t}\n\t\tthis.crc = crc;\n\t}\n\n\tget() {\n\t\treturn ~this.crc;\n\t}\n}\n\nexport {\n\tCrc32\n};", "/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n\nimport { Crc32 } from \"./codecs/crc32.js\";\n\nclass Crc32Stream extends TransformStream {\n\n\tconstructor() {\n\t\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\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}", "// Derived from https://github.com/xqdoo00o/jszip/blob/master/lib/sjcl.js and https://github.com/bitwiseshiftleft/sjcl\n\n// deno-lint-ignore-file no-this-alias\n\n/*\n * SJCL is open. You can use, modify and redistribute it under a BSD\n * license or under the GNU GPL, version 2.0.\n */\n\n/** @fileOverview Javascript cryptography implementation.\n *\n * Crush to remove comments, shorten variable names and\n * generally reduce transmission size.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/*jslint indent: 2, bitwise: false, nomen: false, plusplus: false, white: false, regexp: false */\n\n/** @fileOverview Arrays of bits, encoded as arrays of Numbers.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/**\n * Arrays of bits, encoded as arrays of Numbers.\n * @namespace\n * @description\n * <p>\n * These objects are the currency accepted by SJCL's crypto functions.\n * </p>\n *\n * <p>\n * Most of our crypto primitives operate on arrays of 4-byte words internally,\n * but many of them can take arguments that are not a multiple of 4 bytes.\n * This library encodes arrays of bits (whose size need not be a multiple of 8\n * bits) as arrays of 32-bit words. The bits are packed, big-endian, into an\n * array of words, 32 bits at a time. Since the words are double-precision\n * floating point numbers, they fit some extra data. We use this (in a private,\n * possibly-changing manner) to encode the number of bits actually present\n * in the last word of the array.\n * </p>\n *\n * <p>\n * Because bitwise ops clear this out-of-band data, these arrays can be passed\n * to ciphers like AES which want arrays of words.\n * </p>\n */\nconst bitArray = {\n\t/**\n\t * Concatenate two bit arrays.\n\t * @param {bitArray} a1 The first array.\n\t * @param {bitArray} a2 The second array.\n\t * @return {bitArray} The concatenation of a1 and a2.\n\t */\n\tconcat(a1, a2) {\n\t\tif (a1.length === 0 || a2.length === 0) {\n\t\t\treturn a1.concat(a2);\n\t\t}\n\n\t\tconst last = a1[a1.length - 1], shift = bitArray.getPartial(last);\n\t\tif (shift === 32) {\n\t\t\treturn a1.concat(a2);\n\t\t} else {\n\t\t\treturn bitArray._shiftRight(a2, shift, last | 0, a1.slice(0, a1.length - 1));\n\t\t}\n\t},\n\n\t/**\n\t * Find the length of an array of bits.\n\t * @param {bitArray} a The array.\n\t * @return {Number} The length of a, in bits.\n\t */\n\tbitLength(a) {\n\t\tconst l = a.length;\n\t\tif (l === 0) {\n\t\t\treturn 0;\n\t\t}\n\t\tconst x = a[l - 1];\n\t\treturn (l - 1) * 32 + bitArray.getPartial(x);\n\t},\n\n\t/**\n\t * Truncate an array.\n\t * @param {bitArray} a The array.\n\t * @param {Number} len The length to truncate to, in bits.\n\t * @return {bitArray} A new array, truncated to len bits.\n\t */\n\tclamp(a, len) {\n\t\tif (a.length * 32 < len) {\n\t\t\treturn a;\n\t\t}\n\t\ta = a.slice(0, Math.ceil(len / 32));\n\t\tconst l = a.length;\n\t\tlen = len & 31;\n\t\tif (l > 0 && len) {\n\t\t\ta[l - 1] = bitArray.partial(len, a[l - 1] & 0x80000000 >> (len - 1), 1);\n\t\t}\n\t\treturn a;\n\t},\n\n\t/**\n\t * Make a partial word for a bit array.\n\t * @param {Number} len The number of bits in the word.\n\t * @param {Number} x The bits.\n\t * @param {Number} [_end=0] Pass 1 if x has already been shifted to the high side.\n\t * @return {Number} The partial word.\n\t */\n\tpartial(len, x, _end) {\n\t\tif (len === 32) {\n\t\t\treturn x;\n\t\t}\n\t\treturn (_end ? x | 0 : x << (32 - len)) + len * 0x10000000000;\n\t},\n\n\t/**\n\t * Get the number of bits used by a partial word.\n\t * @param {Number} x The partial word.\n\t * @return {Number} The number of bits used by the partial word.\n\t */\n\tgetPartial(x) {\n\t\treturn Math.round(x / 0x10000000000) || 32;\n\t},\n\n\t/** Shift an array right.\n\t * @param {bitArray} a The array to shift.\n\t * @param {Number} shift The number of bits to shift.\n\t * @param {Number} [carry=0] A byte to carry in\n\t * @param {bitArray} [out=[]] An array to prepend to the output.\n\t * @private\n\t */\n\t_shiftRight(a, shift, carry, out) {\n\t\tif (out === undefined) {\n\t\t\tout = [];\n\t\t}\n\n\t\tfor (; shift >= 32; shift -= 32) {\n\t\t\tout.push(carry);\n\t\t\tcarry = 0;\n\t\t}\n\t\tif (shift === 0) {\n\t\t\treturn out.concat(a);\n\t\t}\n\n\t\tfor (let i = 0; i < a.length; i++) {\n\t\t\tout.push(carry | a[i] >>> shift);\n\t\t\tcarry = a[i] << (32 - shift);\n\t\t}\n\t\tconst last2 = a.length ? a[a.length - 1] : 0;\n\t\tconst shift2 = bitArray.getPartial(last2);\n\t\tout.push(bitArray.partial(shift + shift2 & 31, (shift + shift2 > 32) ? carry : out.pop(), 1));\n\t\treturn out;\n\t}\n};\n\n/** @fileOverview Bit array codec implementations.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/**\n * Arrays of bytes\n * @namespace\n */\nconst codec = {\n\tbytes: {\n\t\t/** Convert from a bitArray to an array of bytes. */\n\t\tfromBits(arr) {\n\t\t\tconst bl = bitArray.bitLength(arr);\n\t\t\tconst byteLength = bl / 8;\n\t\t\tconst out = new Uint8Array(byteLength);\n\t\t\tlet tmp;\n\t\t\tfor (let i = 0; i < byteLength; i++) {\n\t\t\t\tif ((i & 3) === 0) {\n\t\t\t\t\ttmp = arr[i / 4];\n\t\t\t\t}\n\t\t\t\tout[i] = tmp >>> 24;\n\t\t\t\ttmp <<= 8;\n\t\t\t}\n\t\t\treturn out;\n\t\t},\n\t\t/** Convert from an array of bytes to a bitArray. */\n\t\ttoBits(bytes) {\n\t\t\tconst out = [];\n\t\t\tlet i;\n\t\t\tlet tmp = 0;\n\t\t\tfor (i = 0; i < bytes.length; i++) {\n\t\t\t\ttmp = tmp << 8 | bytes[i];\n\t\t\t\tif ((i & 3) === 3) {\n\t\t\t\t\tout.push(tmp);\n\t\t\t\t\ttmp = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (i & 3) {\n\t\t\t\tout.push(bitArray.partial(8 * (i & 3), tmp));\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t}\n};\n\nconst hash = {};\n\n/**\n * Context for a SHA-1 operation in progress.\n * @constructor\n */\nhash.sha1 = class {\n\tconstructor(hash) {\n\t\tconst sha1 = this;\n\t\t/**\n\t\t * The hash's block size, in bits.\n\t\t * @constant\n\t\t */\n\t\tsha1.blockSize = 512;\n\t\t/**\n\t\t * The SHA-1 initialization vector.\n\t\t * @private\n\t\t */\n\t\tsha1._init = [0x67452301, 0xEFCDAB89, 0x98BADCFE, 0x10325476, 0xC3D2E1F0];\n\t\t/**\n\t\t * The SHA-1 hash key.\n\t\t * @private\n\t\t */\n\t\tsha1._key = [0x5A827999, 0x6ED9EBA1, 0x8F1BBCDC, 0xCA62C1D6];\n\t\tif (hash) {\n\t\t\tsha1._h = hash._h.slice(0);\n\t\t\tsha1._buffer = hash._buffer.slice(0);\n\t\t\tsha1._length = hash._length;\n\t\t} else {\n\t\t\tsha1.reset();\n\t\t}\n\t}\n\n\t/**\n\t * Reset the hash state.\n\t * @return this\n\t */\n\treset() {\n\t\tconst sha1 = this;\n\t\tsha1._h = sha1._init.slice(0);\n\t\tsha1._buffer = [];\n\t\tsha1._length = 0;\n\t\treturn sha1;\n\t}\n\n\t/**\n\t * Input several words to the hash.\n\t * @param {bitArray|String} data the data to hash.\n\t * @return this\n\t */\n\tupdate(data) {\n\t\tconst sha1 = this;\n\t\tif (typeof data === \"string\") {\n\t\t\tdata = codec.utf8String.toBits(data);\n\t\t}\n\t\tconst b = sha1._buffer = bitArray.concat(sha1._buffer, data);\n\t\tconst ol = sha1._length;\n\t\tconst nl = sha1._length = ol + bitArray.bitLength(data);\n\t\tif (nl > 9007199254740991) {\n\t\t\tthrow new Error(\"Cannot hash more than 2^53 - 1 bits\");\n\t\t}\n\t\tconst c = new Uint32Array(b);\n\t\tlet j = 0;\n\t\tfor (let i = sha1.blockSize + ol - ((sha1.blockSize + ol) & (sha1.blockSize - 1)); i <= nl;\n\t\t\ti += sha1.blockSize) {\n\t\t\tsha1._block(c.subarray(16 * j, 16 * (j + 1)));\n\t\t\tj += 1;\n\t\t}\n\t\tb.splice(0, 16 * j);\n\t\treturn sha1;\n\t}\n\n\t/**\n\t * Complete hashing and output the hash value.\n\t * @return {bitArray} The hash value, an array of 5 big-endian words. TODO\n\t */\n\tfinalize() {\n\t\tconst sha1 = this;\n\t\tlet b = sha1._buffer;\n\t\tconst h = sha1._h;\n\n\t\t// Round out and push the buffer\n\t\tb = bitArray.concat(b, [bitArray.partial(1, 1)]);\n\t\t// Round out the buffer to a multiple of 16 words, less the 2 length words.\n\t\tfor (let i = b.length + 2; i & 15; i++) {\n\t\t\tb.push(0);\n\t\t}\n\n\t\t// append the length\n\t\tb.push(Math.floor(sha1._length / 0x100000000));\n\t\tb.push(sha1._length | 0);\n\n\t\twhile (b.length) {\n\t\t\tsha1._block(b.splice(0, 16));\n\t\t}\n\n\t\tsha1.reset();\n\t\treturn h;\n\t}\n\n\t/**\n\t * The SHA-1 logical functions f(0), f(1), ..., f(79).\n\t * @private\n\t */\n\t_f(t, b, c, d) {\n\t\tif (t <= 19) {\n\t\t\treturn (b & c) | (~b & d);\n\t\t} else if (t <= 39) {\n\t\t\treturn b ^ c ^ d;\n\t\t} else if (t <= 59) {\n\t\t\treturn (b & c) | (b & d) | (c & d);\n\t\t} else if (t <= 79) {\n\t\t\treturn b ^ c ^ d;\n\t\t}\n\t}\n\n\t/**\n\t * Circular left-shift operator.\n\t * @private\n\t */\n\t_S(n, x) {\n\t\treturn (x << n) | (x >>> 32 - n);\n\t}\n\n\t/**\n\t * Perform one cycle of SHA-1.\n\t * @param {Uint32Array|bitArray} words one block of words.\n\t * @private\n\t */\n\t_block(words) {\n\t\tconst sha1 = this;\n\t\tconst h = sha1._h;\n\t\t// When words is passed to _block, it has 16 elements. SHA1 _block\n\t\t// function extends words with new elements (at the end there are 80 elements). \n\t\t// The problem is that if we use Uint32Array instead of Array, \n\t\t// the length of Uint32Array cannot be changed. Thus, we replace words with a \n\t\t// normal Array here.\n\t\tconst w = Array(80); // do not use Uint32Array here as the instantiation is slower\n\t\tfor (let j = 0; j < 16; j++) {\n\t\t\tw[j] = words[j];\n\t\t}\n\n\t\tlet a = h[0];\n\t\tlet b = h[1];\n\t\tlet c = h[2];\n\t\tlet d = h[3];\n\t\tlet e = h[4];\n\n\t\tfor (let t = 0; t <= 79; t++) {\n\t\t\tif (t >= 16) {\n\t\t\t\tw[t] = sha1._S(1, w[t - 3] ^ w[t - 8] ^ w[t - 14] ^ w[t - 16]);\n\t\t\t}\n\t\t\tconst tmp = (sha1._S(5, a) + sha1._f(t, b, c, d) + e + w[t] +\n\t\t\t\tsha1._key[Math.floor(t / 20)]) | 0;\n\t\t\te = d;\n\t\t\td = c;\n\t\t\tc = sha1._S(30, b);\n\t\t\tb = a;\n\t\t\ta = tmp;\n\t\t}\n\n\t\th[0] = (h[0] + a) | 0;\n\t\th[1] = (h[1] + b) | 0;\n\t\th[2] = (h[2] + c) | 0;\n\t\th[3] = (h[3] + d) | 0;\n\t\th[4] = (h[4] + e) | 0;\n\t}\n};\n\n/** @fileOverview Low-level AES implementation.\n *\n * This file contains a low-level implementation of AES, optimized for\n * size and for efficiency on several browsers. It is based on\n * OpenSSL's aes_core.c, a public-domain implementation by Vincent\n * Rijmen, Antoon Bosselaers and Paulo Barreto.\n *\n * An older version of this implementation is available in the public\n * domain, but this one is (c) Emily Stark, Mike Hamburg, Dan Boneh,\n * Stanford University 2008-2010 and BSD-licensed for liability\n * reasons.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\nconst cipher = {};\n\n/**\n * Schedule out an AES key for both encryption and decryption. This\n * is a low-level class. Use a cipher mode to do bulk encryption.\n *\n * @constructor\n * @param {Array} key The key as an array of 4, 6 or 8 words.\n */\ncipher.aes = class {\n\tconstructor(key) {\n\t\t/**\n\t\t * The expanded S-box and inverse S-box tables. These will be computed\n\t\t * on the client so that we don't have to send them down the wire.\n\t\t *\n\t\t * There are two tables, _tables[0] is for encryption and\n\t\t * _tables[1] is for decryption.\n\t\t *\n\t\t * The first 4 sub-tables are the expanded S-box with MixColumns. The\n\t\t * last (_tables[01][4]) is the S-box itself.\n\t\t *\n\t\t * @private\n\t\t */\n\t\tconst aes = this;\n\t\taes._tables = [[[], [], [], [], []], [[], [], [], [], []]];\n\n\t\tif (!aes._tables[0][0][0]) {\n\t\t\taes._precompute();\n\t\t}\n\n\t\tconst sbox = aes._tables[0][4];\n\t\tconst decTable = aes._tables[1];\n\t\tconst keyLen = key.length;\n\n\t\tlet i, encKey, decKey, rcon = 1;\n\n\t\tif (keyLen !== 4 && keyLen !== 6 && keyLen !== 8) {\n\t\t\tthrow new Error(\"invalid aes key size\");\n\t\t}\n\n\t\taes._key = [encKey = key.slice(0), decKey = []];\n\n\t\t// schedule encryption keys\n\t\tfor (i = keyLen; i < 4 * keyLen + 28; i++) {\n\t\t\tlet tmp = encKey[i - 1];\n\n\t\t\t// apply sbox\n\t\t\tif (i % keyLen === 0 || (keyLen === 8 && i % keyLen === 4)) {\n\t\t\t\ttmp = sbox[tmp >>> 24] << 24 ^ sbox[tmp >> 16 & 255] << 16 ^ sbox[tmp >> 8 & 255] << 8 ^ sbox[tmp & 255];\n\n\t\t\t\t// shift rows and add rcon\n\t\t\t\tif (i % keyLen === 0) {\n\t\t\t\t\ttmp = tmp << 8 ^ tmp >>> 24 ^ rcon << 24;\n\t\t\t\t\trcon = rcon << 1 ^ (rcon >> 7) * 283;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tencKey[i] = encKey[i - keyLen] ^ tmp;\n\t\t}\n\n\t\t// schedule decryption keys\n\t\tfor (let j = 0; i; j++, i--) {\n\t\t\tconst tmp = encKey[j & 3 ? i : i - 4];\n\t\t\tif (i <= 4 || j < 4) {\n\t\t\t\tdecKey[j] = tmp;\n\t\t\t} else {\n\t\t\t\tdecKey[j] = decTable[0][sbox[tmp >>> 24]] ^\n\t\t\t\t\tdecTable[1][sbox[tmp >> 16 & 255]] ^\n\t\t\t\t\tdecTable[2][sbox[tmp >> 8 & 255]] ^\n\t\t\t\t\tdecTable[3][sbox[tmp & 255]];\n\t\t\t}\n\t\t}\n\t}\n\t// public\n\t/* Something like this might appear here eventually\n\tname: \"AES\",\n\tblockSize: 4,\n\tkeySizes: [4,6,8],\n\t*/\n\n\t/**\n\t * Encrypt an array of 4 big-endian words.\n\t * @param {Array} data The plaintext.\n\t * @return {Array} The ciphertext.\n\t */\n\tencrypt(data) {\n\t\treturn this._crypt(data, 0);\n\t}\n\n\t/**\n\t * Decrypt an array of 4 big-endian words.\n\t * @param {Array} data The ciphertext.\n\t * @return {Array} The plaintext.\n\t */\n\tdecrypt(data) {\n\t\treturn this._crypt(data, 1);\n\t}\n\n\t/**\n\t * Expand the S-box tables.\n\t *\n\t * @private\n\t */\n\t_precompute() {\n\t\tconst encTable = this._tables[0];\n\t\tconst decTable = this._tables[1];\n\t\tconst sbox = encTable[4];\n\t\tconst sboxInv = decTable[4];\n\t\tconst d = [];\n\t\tconst th = [];\n\t\tlet xInv, x2, x4, x8;\n\n\t\t// Compute double and third tables\n\t\tfor (let i = 0; i < 256; i++) {\n\t\t\tth[(d[i] = i << 1 ^ (i >> 7) * 283) ^ i] = i;\n\t\t}\n\n\t\tfor (let x = xInv = 0; !sbox[x]; x ^= x2 || 1, xInv = th[xInv] || 1) {\n\t\t\t// Compute sbox\n\t\t\tlet s = xInv ^ xInv << 1 ^ xInv << 2 ^ xInv << 3 ^ xInv << 4;\n\t\t\ts = s >> 8 ^ s & 255 ^ 99;\n\t\t\tsbox[x] = s;\n\t\t\tsboxInv[s] = x;\n\n\t\t\t// Compute MixColumns\n\t\t\tx8 = d[x4 = d[x2 = d[x]]];\n\t\t\tlet tDec = x8 * 0x1010101 ^ x4 * 0x10001 ^ x2 * 0x101 ^ x * 0x1010100;\n\t\t\tlet tEnc = d[s] * 0x101 ^ s * 0x1010100;\n\n\t\t\tfor (let i = 0; i < 4; i++) {\n\t\t\t\tencTable[i][x] = tEnc = tEnc << 24 ^ tEnc >>> 8;\n\t\t\t\tdecTable[i][s] = tDec = tDec << 24 ^ tDec >>> 8;\n\t\t\t}\n\t\t}\n\n\t\t// Compactify. Considerable speedup on Firefox.\n\t\tfor (let i = 0; i < 5; i++) {\n\t\t\tencTable[i] = encTable[i].slice(0);\n\t\t\tdecTable[i] = decTable[i].slice(0);\n\t\t}\n\t}\n\n\t/**\n\t * Encryption and decryption core.\n\t * @param {Array} input Four words to be encrypted or decrypted.\n\t * @param dir The direction, 0 for encrypt and 1 for decrypt.\n\t * @return {Array} The four encrypted or decrypted words.\n\t * @private\n\t */\n\t_crypt(input, dir) {\n\t\tif (input.length !== 4) {\n\t\t\tthrow new Error(\"invalid aes block size\");\n\t\t}\n\n\t\tconst key = this._key[dir];\n\n\t\tconst nInnerRounds = key.length / 4 - 2;\n\t\tconst out = [0, 0, 0, 0];\n\t\tconst table = this._tables[dir];\n\n\t\t// load up the tables\n\t\tconst t0 = table[0];\n\t\tconst t1 = table[1];\n\t\tconst t2 = table[2];\n\t\tconst t3 = table[3];\n\t\tconst sbox = table[4];\n\n\t\t// state variables a,b,c,d are loaded with pre-whitened data\n\t\tlet a = input[0] ^ key[0];\n\t\tlet b = input[dir ? 3 : 1] ^ key[1];\n\t\tlet c = input[2] ^ key[2];\n\t\tlet d = input[dir ? 1 : 3] ^ key[3];\n\t\tlet kIndex = 4;\n\t\tlet a2, b2, c2;\n\n\t\t// Inner rounds. Cribbed from OpenSSL.\n\t\tfor (let i = 0; i < nInnerRounds; i++) {\n\t\t\ta2 = t0[a >>> 24] ^ t1[b >> 16 & 255] ^ t2[c >> 8 & 255] ^ t3[d & 255] ^ key[kIndex];\n\t\t\tb2 = t0[b >>> 24] ^ t1[c >> 16 & 255] ^ t2[d >> 8 & 255] ^ t3[a & 255] ^ key[kIndex + 1];\n\t\t\tc2 = t0[c >>> 24] ^ t1[d >> 16 & 255] ^ t2[a >> 8 & 255] ^ t3[b & 255] ^ key[kIndex + 2];\n\t\t\td = t0[d >>> 24] ^ t1[a >> 16 & 255] ^ t2[b >> 8 & 255] ^ t3[c & 255] ^ key[kIndex + 3];\n\t\t\tkIndex += 4;\n\t\t\ta = a2; b = b2; c = c2;\n\t\t}\n\n\t\t// Last round.\n\t\tfor (let i = 0; i < 4; i++) {\n\t\t\tout[dir ? 3 & -i : i] =\n\t\t\t\tsbox[a >>> 24] << 24 ^\n\t\t\t\tsbox[b >> 16 & 255] << 16 ^\n\t\t\t\tsbox[c >> 8 & 255] << 8 ^\n\t\t\t\tsbox[d & 255] ^\n\t\t\t\tkey[kIndex++];\n\t\t\ta2 = a; a = b; b = c; c = d; d = a2;\n\t\t}\n\n\t\treturn out;\n\t}\n};\n\n/**\n * Random values\n * @namespace\n */\nconst random = {\n\t/** \n\t * Generate random words with pure js, cryptographically not as strong & safe as native implementation.\n\t * @param {TypedArray} typedArray The array to fill.\n\t * @return {TypedArray} The random values.\n\t */\n\tgetRandomValues(typedArray) {\n\t\tconst words = new Uint32Array(typedArray.buffer);\n\t\tconst r = (m_w) => {\n\t\t\tlet m_z = 0x3ade68b1;\n\t\t\tconst mask = 0xffffffff;\n\t\t\treturn function () {\n\t\t\t\tm_z = (0x9069 * (m_z & 0xFFFF) + (m_z >> 0x10)) & mask;\n\t\t\t\tm_w = (0x4650 * (m_w & 0xFFFF) + (m_w >> 0x10)) & mask;\n\t\t\t\tconst result = ((((m_z << 0x10) + m_w) & mask) / 0x100000000) + .5;\n\t\t\t\treturn result * (Math.random() > .5 ? 1 : -1);\n\t\t\t};\n\t\t};\n\t\tfor (let i = 0, rcache; i < typedArray.length; i += 4) {\n\t\t\tconst _r = r((rcache || Math.random()) * 0x100000000);\n\t\t\trcache = _r() * 0x3ade67b7;\n\t\t\twords[i / 4] = (_r() * 0x100000000) | 0;\n\t\t}\n\t\treturn typedArray;\n\t}\n};\n\n/** @fileOverview CTR mode implementation.\n *\n * Special thanks to Roy Nicholson for pointing out a bug in our\n * implementation.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/** Brian Gladman's CTR Mode.\n* @constructor\n* @param {Object} _prf The aes instance to generate key.\n* @param {bitArray} _iv The iv for ctr mode, it must be 128 bits.\n*/\n\nconst mode = {};\n\n/**\n * Brian Gladman's CTR Mode.\n * @namespace\n */\nmode.ctrGladman = class {\n\tconstructor(prf, iv) {\n\t\tthis._prf = prf;\n\t\tthis._initIv = iv;\n\t\tthis._iv = iv;\n\t}\n\n\treset() {\n\t\tthis._iv = this._initIv;\n\t}\n\n\t/** Input some data to calculate.\n\t * @param {bitArray} data the data to process, it must be intergral multiple of 128 bits unless it's the last.\n\t */\n\tupdate(data) {\n\t\treturn this.calculate(this._prf, data, this._iv);\n\t}\n\n\tincWord(word) {\n\t\tif (((word >> 24) & 0xff) === 0xff) { //overflow\n\t\t\tlet b1 = (word >> 16) & 0xff;\n\t\t\tlet b2 = (word >> 8) & 0xff;\n\t\t\tlet b3 = word & 0xff;\n\n\t\t\tif (b1 === 0xff) { // overflow b1 \n\t\t\t\tb1 = 0;\n\t\t\t\tif (b2 === 0xff) {\n\t\t\t\t\tb2 = 0;\n\t\t\t\t\tif (b3 === 0xff) {\n\t\t\t\t\t\tb3 = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t++b3;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t++b2;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t++b1;\n\t\t\t}\n\n\t\t\tword = 0;\n\t\t\tword += (b1 << 16);\n\t\t\tword += (b2 << 8);\n\t\t\tword += b3;\n\t\t} else {\n\t\t\tword += (0x01 << 24);\n\t\t}\n\t\treturn word;\n\t}\n\n\tincCounter(counter) {\n\t\tif ((counter[0] = this.incWord(counter[0])) === 0) {\n\t\t\t// encr_data in fileenc.c from Dr Brian Gladman's counts only with DWORD j < 8\n\t\t\tcounter[1] = this.incWord(counter[1]);\n\t\t}\n\t}\n\n\tcalculate(prf, data, iv) {\n\t\tlet l;\n\t\tif (!(l = data.length)) {\n\t\t\treturn [];\n\t\t}\n\t\tconst bl = bitArray.bitLength(data);\n\t\tfor (let i = 0; i < l; i += 4) {\n\t\t\tthis.incCounter(iv);\n\t\t\tconst e = prf.encrypt(iv);\n\t\t\tdata[i] ^= e[0];\n\t\t\tdata[i + 1] ^= e[1];\n\t\t\tdata[i + 2] ^= e[2];\n\t\t\tdata[i + 3] ^= e[3];\n\t\t}\n\t\treturn bitArray.clamp(data, bl);\n\t}\n};\n\nconst misc = {\n\timportKey(password) {\n\t\treturn new misc.hmacSha1(codec.bytes.toBits(password));\n\t},\n\tpbkdf2(prf, salt, count, length) {\n\t\tcount = count || 10000;\n\t\tif (length < 0 || count < 0) {\n\t\t\tthrow new Error(\"invalid params to pbkdf2\");\n\t\t}\n\t\tconst byteLength = ((length >> 5) + 1) << 2;\n\t\tlet u, ui, i, j, k;\n\t\tconst arrayBuffer = new ArrayBuffer(byteLength);\n\t\tconst out = new DataView(arrayBuffer);\n\t\tlet outLength = 0;\n\t\tconst b = bitArray;\n\t\tsalt = codec.bytes.toBits(salt);\n\t\tfor (k = 1; outLength < (byteLength || 1); k++) {\n\t\t\tu = ui = prf.encrypt(b.concat(salt, [k]));\n\t\t\tfor (i = 1; i < count; i++) {\n\t\t\t\tui = prf.encrypt(ui);\n\t\t\t\tfor (j = 0; j < ui.length; j++) {\n\t\t\t\t\tu[j] ^= ui[j];\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (i = 0; outLength < (byteLength || 1) && i < u.length; i++) {\n\t\t\t\tout.setInt32(outLength, u[i]);\n\t\t\t\toutLength += 4;\n\t\t\t}\n\t\t}\n\t\treturn arrayBuffer.slice(0, length / 8);\n\t}\n};\n\n/** @fileOverview HMAC implementation.\n *\n * @author Emily Stark\n * @author Mike Hamburg\n * @author Dan Boneh\n */\n\n/** HMAC with the specified hash function.\n * @constructor\n * @param {bitArray} key the key for HMAC.\n * @param {Object} [Hash=hash.sha1] The hash function to use.\n */\nmisc.hmacSha1 = class {\n\n\tconstructor(key) {\n\t\tconst hmac = this;\n\t\tconst Hash = hmac._hash = hash.sha1;\n\t\tconst exKey = [[], []];\n\t\thmac._baseHash = [new Hash(), new Hash()];\n\t\tconst bs = hmac._baseHash[0].blockSize / 32;\n\n\t\tif (key.length > bs) {\n\t\t\tkey = new Hash().update(key).finalize();\n\t\t}\n\n\t\tfor (let i = 0; i < bs; i++) {\n\t\t\texKey[0][i] = key[i] ^ 0x36363636;\n\t\t\texKey[1][i] = key[i] ^ 0x5C5C5C5C;\n\t\t}\n\n\t\thmac._baseHash[0].update(exKey[0]);\n\t\thmac._baseHash[1].update(exKey[1]);\n\t\thmac._resultHash = new Hash(hmac._baseHash[0]);\n\t}\n\treset() {\n\t\tconst hmac = this;\n\t\thmac._resultHash = new hmac._hash(hmac._baseHash[0]);\n\t\thmac._updated = false;\n\t}\n\n\tupdate(data) {\n\t\tconst hmac = this;\n\t\thmac._updated = true;\n\t\thmac._resultHash.update(data);\n\t}\n\n\tdigest() {\n\t\tconst hmac = this;\n\t\tconst w = hmac._resultHash.finalize();\n\t\tconst result = new (hmac._hash)(hmac._baseHash[1]).update(w).finalize();\n\n\t\thmac.reset();\n\n\t\treturn result;\n\t}\n\n\tencrypt(data) {\n\t\tif (!this._updated) {\n\t\t\tthis.update(data);\n\t\t\treturn this.digest(data);\n\t\t} else {\n\t\t\tthrow new Error(\"encrypt on already updated hmac called!\");\n\t\t}\n\t}\n};\n\nexport {\n\tcipher,\n\tcodec,\n\tmisc,\n\tmode,\n\trandom\n};", "/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global crypto */\n\nimport { FUNCTION_TYPE, UNDEFINED_TYPE } from \"../constants.js\";\nimport {\n\trandom\n} from \"./codecs/sjcl.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_SIGNATURE = \"Invalid signature\";\nconst ERR_ABORT_CHECK_PASSWORD = \"zipjs-abort-check-password\";\n\nexport {\n\tgetRandomValues,\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE,\n\tERR_ABORT_CHECK_PASSWORD\n};\n\nfunction getRandomValues(array) {\n\tif (GET_RANDOM_VALUES_SUPPORTED) {\n\t\treturn crypto.getRandomValues(array);\n\t} else {\n\t\treturn random.getRandomValues(array);\n\t}\n}", "/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global crypto, TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport { UNDEFINED_VALUE, UNDEFINED_TYPE, FUNCTION_TYPE } from \"../constants.js\";\nimport { encodeText } from \"./../util/encode-text.js\";\nimport {\n\tcipher,\n\tcodec,\n\tmisc,\n\tmode\n} from \"./codecs/sjcl.js\";\nimport {\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE,\n\tERR_ABORT_CHECK_PASSWORD,\n\tgetRandomValues\n} from \"./common-crypto.js\";\n\nconst BLOCK_LENGTH = 16;\nconst RAW_FORMAT = \"raw\";\nconst PBKDF2_ALGORITHM = { name: \"PBKDF2\" };\nconst HASH_ALGORITHM = { name: \"HMAC\" };\nconst HASH_FUNCTION = \"SHA-1\";\nconst BASE_KEY_ALGORITHM = Object.assign({ hash: HASH_ALGORITHM }, PBKDF2_ALGORITHM);\nconst DERIVED_BITS_ALGORITHM = Object.assign({ iterations: 1000, hash: { name: HASH_FUNCTION } }, PBKDF2_ALGORITHM);\nconst DERIVED_BITS_USAGE = [\"deriveBits\"];\nconst SALT_LENGTH = [8, 12, 16];\nconst KEY_LENGTH = [16, 24, 32];\nconst SIGNATURE_LENGTH = 10;\nconst COUNTER_DEFAULT_VALUE = [0, 0, 0, 0];\n// deno-lint-ignore valid-typeof\nconst CRYPTO_API_SUPPORTED = typeof crypto != UNDEFINED_TYPE;\nconst subtle = CRYPTO_API_SUPPORTED && crypto.subtle;\nconst SUBTLE_API_SUPPORTED = CRYPTO_API_SUPPORTED && typeof subtle != UNDEFINED_TYPE;\nconst codecBytes = codec.bytes;\nconst Aes = cipher.aes;\nconst CtrGladman = mode.ctrGladman;\nconst HmacSha1 = misc.hmacSha1;\n\nlet IMPORT_KEY_SUPPORTED = CRYPTO_API_SUPPORTED && SUBTLE_API_SUPPORTED && typeof subtle.importKey == FUNCTION_TYPE;\nlet DERIVE_BITS_SUPPORTED = CRYPTO_API_SUPPORTED && SUBTLE_API_SUPPORTED && typeof subtle.deriveBits == FUNCTION_TYPE;\n\nclass AESDecryptionStream extends TransformStream {\n\n\tconstructor({ password, rawPassword, signed, encryptionStrength, checkPasswordOnly }) {\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tready: new Promise(resolve => this.resolveReady = resolve),\n\t\t\t\t\tpassword: encodePassword(password, rawPassword),\n\t\t\t\t\tsigned,\n\t\t\t\t\tstrength: encryptionStrength - 1,\n\t\t\t\t\tpending: new Uint8Array()\n\t\t\t\t});\n\t\t\t},\n\t\t\tasync transform(chunk, controller) {\n\t\t\t\tconst aesCrypto = this;\n\t\t\t\tconst {\n\t\t\t\t\tpassword,\n\t\t\t\t\tstrength,\n\t\t\t\t\tresolveReady,\n\t\t\t\t\tready\n\t\t\t\t} = aesCrypto;\n\t\t\t\tif (password) {\n\t\t\t\t\tawait createDecryptionKeys(aesCrypto, strength, password, subarray(chunk, 0, SALT_LENGTH[strength] + 2));\n\t\t\t\t\tchunk = subarray(chunk, SALT_LENGTH[strength] + 2);\n\t\t\t\t\tif (checkPasswordOnly) {\n\t\t\t\t\t\tcontroller.error(new Error(ERR_ABORT_CHECK_PASSWORD));\n\t\t\t\t\t} else {\n\t\t\t\t\t\tresolveReady();\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tawait ready;\n\t\t\t\t}\n\t\t\t\tconst output = new Uint8Array(chunk.length - SIGNATURE_LENGTH - ((chunk.length - SIGNATURE_LENGTH) % BLOCK_LENGTH));\n\t\t\t\tcontroller.enqueue(append(aesCrypto, chunk, output, 0, SIGNATURE_LENGTH, true));\n\t\t\t},\n\t\t\tasync flush(controller) {\n\t\t\t\tconst {\n\t\t\t\t\tsigned,\n\t\t\t\t\tctr,\n\t\t\t\t\thmac,\n\t\t\t\t\tpending,\n\t\t\t\t\tready\n\t\t\t\t} = this;\n\t\t\t\tif (hmac && ctr) {\n\t\t\t\t\tawait ready;\n\t\t\t\t\tconst chunkToDecrypt = subarray(pending, 0, pending.length - SIGNATURE_LENGTH);\n\t\t\t\t\tconst originalSignature = subarray(pending, pending.length - SIGNATURE_LENGTH);\n\t\t\t\t\tlet decryptedChunkArray = new Uint8Array();\n\t\t\t\t\tif (chunkToDecrypt.length) {\n\t\t\t\t\t\tconst encryptedChunk = toBits(codecBytes, chunkToDecrypt);\n\t\t\t\t\t\thmac.update(encryptedChunk);\n\t\t\t\t\t\tconst decryptedChunk = ctr.update(encryptedChunk);\n\t\t\t\t\t\tdecryptedChunkArray = fromBits(codecBytes, decryptedChunk);\n\t\t\t\t\t}\n\t\t\t\t\tif (signed) {\n\t\t\t\t\t\tconst signature = subarray(fromBits(codecBytes, hmac.digest()), 0, SIGNATURE_LENGTH);\n\t\t\t\t\t\tfor (let indexSignature = 0; indexSignature < SIGNATURE_LENGTH; indexSignature++) {\n\t\t\t\t\t\t\tif (signature[indexSignature] != originalSignature[indexSignature]) {\n\t\t\t\t\t\t\t\tthrow new Error(ERR_INVALID_SIGNATURE);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tcontroller.enqueue(decryptedChunkArray);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n}\n\nclass AESEncryptionStream extends TransformStream {\n\n\tconstructor({ password, rawPassword, encryptionStrength }) {\n\t\t// deno-lint-ignore prefer-const\n\t\tlet stream;\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tready: new Promise(resolve => this.resolveReady = resolve),\n\t\t\t\t\tpassword: encodePassword(password, rawPassword),\n\t\t\t\t\tstrength: encryptionStrength - 1,\n\t\t\t\t\tpending: new Uint8Array()\n\t\t\t\t});\n\t\t\t},\n\t\t\tasync transform(chunk, controller) {\n\t\t\t\tconst aesCrypto = this;\n\t\t\t\tconst {\n\t\t\t\t\tpassword,\n\t\t\t\t\tstrength,\n\t\t\t\t\tresolveReady,\n\t\t\t\t\tready\n\t\t\t\t} = aesCrypto;\n\t\t\t\tlet preamble = new Uint8Array();\n\t\t\t\tif (password) {\n\t\t\t\t\tpreamble = await createEncryptionKeys(aesCrypto, strength, password);\n\t\t\t\t\tresolveReady();\n\t\t\t\t} else {\n\t\t\t\t\tawait ready;\n\t\t\t\t}\n\t\t\t\tconst output = new Uint8Array(preamble.length + chunk.length - (chunk.length % BLOCK_LENGTH));\n\t\t\t\toutput.set(preamble, 0);\n\t\t\t\tcontroller.enqueue(append(aesCrypto, chunk, output, preamble.length, 0));\n\t\t\t},\n\t\t\tasync flush(controller) {\n\t\t\t\tconst {\n\t\t\t\t\tctr,\n\t\t\t\t\thmac,\n\t\t\t\t\tpending,\n\t\t\t\t\tready\n\t\t\t\t} = this;\n\t\t\t\tif (hmac && ctr) {\n\t\t\t\t\tawait ready;\n\t\t\t\t\tlet encryptedChunkArray = new Uint8Array();\n\t\t\t\t\tif (pending.length) {\n\t\t\t\t\t\tconst encryptedChunk = ctr.update(toBits(codecBytes, pending));\n\t\t\t\t\t\thmac.update(encryptedChunk);\n\t\t\t\t\t\tencryptedChunkArray = fromBits(codecBytes, encryptedChunk);\n\t\t\t\t\t}\n\t\t\t\t\tstream.signature = fromBits(codecBytes, hmac.digest()).slice(0, SIGNATURE_LENGTH);\n\t\t\t\t\tcontroller.enqueue(concat(encryptedChunkArray, stream.signature));\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tstream = this;\n\t}\n}\n\nexport {\n\tAESDecryptionStream,\n\tAESEncryptionStream,\n\tERR_INVALID_PASSWORD\n};\n\nfunction append(aesCrypto, input, output, paddingStart, paddingEnd, verifySignature) {\n\tconst {\n\t\tctr,\n\t\thmac,\n\t\tpending\n\t} = aesCrypto;\n\tconst inputLength = input.length - paddingEnd;\n\tif (pending.length) {\n\t\tinput = concat(pending, input);\n\t\toutput = expand(output, inputLength - (inputLength % BLOCK_LENGTH));\n\t}\n\tlet offset;\n\tfor (offset = 0; offset <= inputLength - BLOCK_LENGTH; offset += BLOCK_LENGTH) {\n\t\tconst inputChunk = toBits(codecBytes, subarray(input, offset, offset + BLOCK_LENGTH));\n\t\tif (verifySignature) {\n\t\t\thmac.update(inputChunk);\n\t\t}\n\t\tconst outputChunk = ctr.update(inputChunk);\n\t\tif (!verifySignature) {\n\t\t\thmac.update(outputChunk);\n\t\t}\n\t\toutput.set(fromBits(codecBytes, outputChunk), offset + paddingStart);\n\t}\n\taesCrypto.pending = subarray(input, offset);\n\treturn output;\n}\n\nasync function createDecryptionKeys(decrypt, strength, password, preamble) {\n\tconst passwordVerificationKey = await createKeys(decrypt, strength, password, subarray(preamble, 0, SALT_LENGTH[strength]));\n\tconst passwordVerification = subarray(preamble, SALT_LENGTH[strength]);\n\tif (passwordVerificationKey[0] != passwordVerification[0] || passwordVerificationKey[1] != passwordVerification[1]) {\n\t\tthrow new Error(ERR_INVALID_PASSWORD);\n\t}\n}\n\nasync function createEncryptionKeys(encrypt, strength, password) {\n\tconst salt = getRandomValues(new Uint8Array(SALT_LENGTH[strength]));\n\tconst passwordVerification = await createKeys(encrypt, strength, password, salt);\n\treturn concat(salt, passwordVerification);\n}\n\nasync function createKeys(aesCrypto, strength, password, salt) {\n\taesCrypto.password = null;\n\tconst baseKey = await importKey(RAW_FORMAT, password, BASE_KEY_ALGORITHM, false, DERIVED_BITS_USAGE);\n\tconst derivedBits = await deriveBits(Object.assign({ salt }, DERIVED_BITS_ALGORITHM), baseKey, 8 * ((KEY_LENGTH[strength] * 2) + 2));\n\tconst compositeKey = new Uint8Array(derivedBits);\n\tconst key = toBits(codecBytes, subarray(compositeKey, 0, KEY_LENGTH[strength]));\n\tconst authentication = toBits(codecBytes, subarray(compositeKey, KEY_LENGTH[strength], KEY_LENGTH[strength] * 2));\n\tconst passwordVerification = subarray(compositeKey, KEY_LENGTH[strength] * 2);\n\tObject.assign(aesCrypto, {\n\t\tkeys: {\n\t\t\tkey,\n\t\t\tauthentication,\n\t\t\tpasswordVerification\n\t\t},\n\t\tctr: new CtrGladman(new Aes(key), Array.from(COUNTER_DEFAULT_VALUE)),\n\t\thmac: new HmacSha1(authentication)\n\t});\n\treturn passwordVerification;\n}\n\nasync function importKey(format, password, algorithm, extractable, keyUsages) {\n\tif (IMPORT_KEY_SUPPORTED) {\n\t\ttry {\n\t\t\treturn await subtle.importKey(format, password, algorithm, extractable, keyUsages);\n\t\t} catch (_error) {\n\t\t\tIMPORT_KEY_SUPPORTED = false;\n\t\t\treturn misc.importKey(password);\n\t\t}\n\t} else {\n\t\treturn misc.importKey(password);\n\t}\n}\n\nasync function deriveBits(algorithm, baseKey, length) {\n\tif (DERIVE_BITS_SUPPORTED) {\n\t\ttry {\n\t\t\treturn await subtle.deriveBits(algorithm, baseKey, length);\n\t\t} catch (_error) {\n\t\t\tDERIVE_BITS_SUPPORTED = false;\n\t\t\treturn misc.pbkdf2(baseKey, algorithm.salt, DERIVED_BITS_ALGORITHM.iterations, length);\n\t\t}\n\t} else {\n\t\treturn misc.pbkdf2(baseKey, algorithm.salt, DERIVED_BITS_ALGORITHM.iterations, length);\n\t}\n}\n\nfunction 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 concat(leftArray, rightArray) {\n\tlet array = leftArray;\n\tif (leftArray.length + rightArray.length) {\n\t\tarray = new Uint8Array(leftArray.length + rightArray.length);\n\t\tarray.set(leftArray, 0);\n\t\tarray.set(rightArray, leftArray.length);\n\t}\n\treturn array;\n}\n\nfunction expand(inputArray, length) {\n\tif (length && length > inputArray.length) {\n\t\tconst array = inputArray;\n\t\tinputArray = new Uint8Array(length);\n\t\tinputArray.set(array, 0);\n\t}\n\treturn inputArray;\n}\n\nfunction subarray(array, begin, end) {\n\treturn array.subarray(begin, end);\n}\n\nfunction fromBits(codecBytes, chunk) {\n\treturn codecBytes.fromBits(chunk);\n}\nfunction toBits(codecBytes, chunk) {\n\treturn codecBytes.toBits(chunk);\n}", "/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport { Crc32 } from \"./codecs/crc32.js\";\nimport {\n\tERR_INVALID_PASSWORD,\n\tERR_ABORT_CHECK_PASSWORD,\n\tgetRandomValues\n} from \"./common-crypto.js\";\n\nconst HEADER_LENGTH = 12;\n\nclass ZipCryptoDecryptionStream extends TransformStream {\n\n\tconstructor({ password, passwordVerification, checkPasswordOnly }) {\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tpassword,\n\t\t\t\t\tpasswordVerification\n\t\t\t\t});\n\t\t\t\tcreateKeys(this, password);\n\t\t\t},\n\t\t\ttransform(chunk, controller) {\n\t\t\t\tconst zipCrypto = this;\n\t\t\t\tif (zipCrypto.password) {\n\t\t\t\t\tconst decryptedHeader = decrypt(zipCrypto, chunk.subarray(0, HEADER_LENGTH));\n\t\t\t\t\tzipCrypto.password = null;\n\t\t\t\t\tif (decryptedHeader[HEADER_LENGTH - 1] != zipCrypto.passwordVerification) {\n\t\t\t\t\t\tthrow new Error(ERR_INVALID_PASSWORD);\n\t\t\t\t\t}\n\t\t\t\t\tchunk = chunk.subarray(HEADER_LENGTH);\n\t\t\t\t}\n\t\t\t\tif (checkPasswordOnly) {\n\t\t\t\t\tcontroller.error(new Error(ERR_ABORT_CHECK_PASSWORD));\n\t\t\t\t} else {\n\t\t\t\t\tcontroller.enqueue(decrypt(zipCrypto, chunk));\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n}\n\nclass ZipCryptoEncryptionStream extends TransformStream {\n\n\tconstructor({ password, passwordVerification }) {\n\t\tsuper({\n\t\t\tstart() {\n\t\t\t\tObject.assign(this, {\n\t\t\t\t\tpassword,\n\t\t\t\t\tpasswordVerification\n\t\t\t\t});\n\t\t\t\tcreateKeys(this, password);\n\t\t\t},\n\t\t\ttransform(chunk, controller) {\n\t\t\t\tconst zipCrypto = this;\n\t\t\t\tlet output;\n\t\t\t\tlet offset;\n\t\t\t\tif (zipCrypto.password) {\n\t\t\t\t\tzipCrypto.password = null;\n\t\t\t\t\tconst header = getRandomValues(new Uint8Array(HEADER_LENGTH));\n\t\t\t\t\theader[HEADER_LENGTH - 1] = zipCrypto.passwordVerification;\n\t\t\t\t\toutput = new Uint8Array(chunk.length + header.length);\n\t\t\t\t\toutput.set(encrypt(zipCrypto, header), 0);\n\t\t\t\t\toffset = HEADER_LENGTH;\n\t\t\t\t} else {\n\t\t\t\t\toutput = new Uint8Array(chunk.length);\n\t\t\t\t\toffset = 0;\n\t\t\t\t}\n\t\t\t\toutput.set(encrypt(zipCrypto, chunk), offset);\n\t\t\t\tcontroller.enqueue(output);\n\t\t\t}\n\t\t});\n\t}\n}\n\nexport {\n\tZipCryptoDecryptionStream,\n\tZipCryptoEncryptionStream,\n\tERR_INVALID_PASSWORD\n};\n\nfunction decrypt(target, input) {\n\tconst output = new Uint8Array(input.length);\n\tfor (let index = 0; index < input.length; index++) {\n\t\toutput[index] = getByte(target) ^ input[index];\n\t\tupdateKeys(target, output[index]);\n\t}\n\treturn output;\n}\n\nfunction encrypt(target, input) {\n\tconst output = new Uint8Array(input.length);\n\tfor (let index = 0; index < input.length; index++) {\n\t\toutput[index] = getByte(target) ^ input[index];\n\t\tupdateKeys(target, input[index]);\n\t}\n\treturn output;\n}\n\nfunction createKeys(target, password) {\n\tconst keys = [0x12345678, 0x23456789, 0x34567890];\n\tObject.assign(target, {\n\t\tkeys,\n\t\tcrcKey0: new Crc32(keys[0]),\n\t\tcrcKey2: new Crc32(keys[2]),\n\t});\n\tfor (let index = 0; index < password.length; index++) {\n\t\tupdateKeys(target, password.charCodeAt(index));\n\t}\n}\n\nfunction updateKeys(target, byte) {\n\tlet [key0, key1, key2] = target.keys;\n\ttarget.crcKey0.append([byte]);\n\tkey0 = ~target.crcKey0.get();\n\tkey1 = getInt32(Math.imul(getInt32(key1 + getInt8(key0)), 134775813) + 1);\n\ttarget.crcKey2.append([key1 >>> 24]);\n\tkey2 = ~target.crcKey2.get();\n\ttarget.keys = [key0, key1, key2];\n}\n\nfunction getByte(target) {\n\tconst temp = target.keys[2] | 2;\n\treturn getInt8(Math.imul(temp, (temp ^ 1)) >>> 8);\n}\n\nfunction getInt8(number) {\n\treturn number & 0xFF;\n}\n\nfunction getInt32(number) {\n\treturn number & 0xFFFFFFFF;\n}", "/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport { Crc32Stream } from \"./crc32-stream.js\";\nimport {\n\tAESEncryptionStream,\n\tAESDecryptionStream\n} from \"./aes-crypto-stream.js\";\nimport {\n\tZipCryptoEncryptionStream,\n\tZipCryptoDecryptionStream\n} from \"./zip-crypto-stream.js\";\nimport {\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE,\n\tERR_ABORT_CHECK_PASSWORD\n} from \"./common-crypto.js\";\n\nconst COMPRESSION_FORMAT = \"deflate-raw\";\n\nclass DeflateStream extends TransformStream {\n\n\tconstructor(options, { chunkSize, CompressionStream, CompressionStreamNative }) {\n\t\tsuper({});\n\t\tconst { compressed, encrypted, useCompressionStream, zipCrypto, signed, level } = options;\n\t\tconst stream = this;\n\t\tlet crc32Stream, encryptionStream;\n\t\tlet readable = filterEmptyChunks(super.readable);\n\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\tcrc32Stream = new Crc32Stream();\n\t\t\treadable = pipeThrough(readable, crc32Stream);\n\t\t}\n\t\tif (compressed) {\n\t\t\treadable = pipeThroughCommpressionStream(readable, useCompressionStream, { level, chunkSize }, CompressionStreamNative, CompressionStream);\n\t\t}\n\t\tif (encrypted) {\n\t\t\tif (zipCrypto) {\n\t\t\t\treadable = pipeThrough(readable, new ZipCryptoEncryptionStream(options));\n\t\t\t} else {\n\t\t\t\tencryptionStream = new AESEncryptionStream(options);\n\t\t\t\treadable = pipeThrough(readable, encryptionStream);\n\t\t\t}\n\t\t}\n\t\tsetReadable(stream, readable, () => {\n\t\t\tlet signature;\n\t\t\tif (encrypted && !zipCrypto) {\n\t\t\t\tsignature = encryptionStream.signature;\n\t\t\t}\n\t\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t\tsignature = new DataView(crc32Stream.value.buffer).getUint32(0);\n\t\t\t}\n\t\t\tstream.signature = signature;\n\t\t});\n\t}\n}\n\nclass InflateStream extends TransformStream {\n\n\tconstructor(options, { chunkSize, DecompressionStream, DecompressionStreamNative }) {\n\t\tsuper({});\n\t\tconst { zipCrypto, encrypted, signed, signature, compressed, useCompressionStream } = options;\n\t\tlet crc32Stream, decryptionStream;\n\t\tlet readable = filterEmptyChunks(super.readable);\n\t\tif (encrypted) {\n\t\t\tif (zipCrypto) {\n\t\t\t\treadable = pipeThrough(readable, new ZipCryptoDecryptionStream(options));\n\t\t\t} else {\n\t\t\t\tdecryptionStream = new AESDecryptionStream(options);\n\t\t\t\treadable = pipeThrough(readable, decryptionStream);\n\t\t\t}\n\t\t}\n\t\tif (compressed) {\n\t\t\treadable = pipeThroughCommpressionStream(readable, useCompressionStream, { chunkSize }, DecompressionStreamNative, DecompressionStream);\n\t\t}\n\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\tcrc32Stream = new Crc32Stream();\n\t\t\treadable = pipeThrough(readable, crc32Stream);\n\t\t}\n\t\tsetReadable(this, readable, () => {\n\t\t\tif ((!encrypted || zipCrypto) && signed) {\n\t\t\t\tconst dataViewSignature = new DataView(crc32Stream.value.buffer);\n\t\t\t\tif (signature != dataViewSignature.getUint32(0, false)) {\n\t\t\t\t\tthrow new Error(ERR_INVALID_SIGNATURE);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n}\n\nexport {\n\tDeflateStream,\n\tInflateStream,\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE,\n\tERR_ABORT_CHECK_PASSWORD\n};\n\nfunction filterEmptyChunks(readable) {\n\treturn pipeThrough(readable, new TransformStream({\n\t\ttransform(chunk, controller) {\n\t\t\tif (chunk && chunk.length) {\n\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t}\n\t\t}\n\t}));\n}\n\nfunction setReadable(stream, readable, flush) {\n\treadable = pipeThrough(readable, new TransformStream({ flush }));\n\tObject.defineProperty(stream, \"readable\", {\n\t\tget() {\n\t\t\treturn readable;\n\t\t}\n\t});\n}\n\nfunction pipeThroughCommpressionStream(readable, useCompressionStream, options, CodecStreamNative, CodecStream) {\n\ttry {\n\t\tconst CompressionStream = useCompressionStream && CodecStreamNative ? CodecStreamNative : CodecStream;\n\t\treadable = pipeThrough(readable, new CompressionStream(COMPRESSION_FORMAT, options));\n\t} catch (error) {\n\t\tif (useCompressionStream) {\n\t\t\ttry {\n\t\t\t\treadable = pipeThrough(readable, new CodecStream(COMPRESSION_FORMAT, options));\n\t\t\t} catch (error) {\n\t\t\t\treturn readable;\n\t\t\t}\n\t\t} else {\n\t\t\treturn readable;\n\t\t}\n\t}\n\treturn readable;\n}\n\nfunction pipeThrough(readable, transformStream) {\n\treturn readable.pipeThrough(transformStream);\n}", "/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/*\n * This program is based on JZlib 1.0.2 ymnk, JCraft,Inc.\n * JZlib is based on zlib-1.1.3, so all credit should go authors\n * Jean-loup Gailly(jloup@gzip.org) and Mark Adler(madler@alumni.caltech.edu)\n * and contributors of zlib.\n */\n\n/* global TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE,\n\tERR_ABORT_CHECK_PASSWORD,\n\tInflateStream,\n\tDeflateStream\n} from \"./zip-entry-stream.js\";\n\nconst MESSAGE_EVENT_TYPE = \"message\";\nconst MESSAGE_START = \"start\";\nconst MESSAGE_PULL = \"pull\";\nconst MESSAGE_DATA = \"data\";\nconst MESSAGE_ACK_DATA = \"ack\";\nconst MESSAGE_CLOSE = \"close\";\nconst CODEC_DEFLATE = \"deflate\";\nconst CODEC_INFLATE = \"inflate\";\n\nexport {\n\tCODEC_DEFLATE,\n\tCODEC_INFLATE,\n\tMESSAGE_EVENT_TYPE,\n\tMESSAGE_START,\n\tMESSAGE_PULL,\n\tMESSAGE_DATA,\n\tMESSAGE_ACK_DATA,\n\tMESSAGE_CLOSE,\n\tERR_INVALID_PASSWORD,\n\tERR_INVALID_SIGNATURE,\n\tERR_ABORT_CHECK_PASSWORD,\n\tCodecStream,\n\tChunkStream\n};\n\nclass CodecStream extends TransformStream {\n\n\tconstructor(options, config) {\n\t\tsuper({});\n\t\tconst codec = this;\n\t\tconst { codecType } = options;\n\t\tlet Stream;\n\t\tif (codecType.startsWith(CODEC_DEFLATE)) {\n\t\t\tStream = DeflateStream;\n\t\t} else if (codecType.startsWith(CODEC_INFLATE)) {\n\t\t\tStream = InflateStream;\n\t\t}\n\t\tlet 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\toutputSize += chunk.length;\n\t\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t\t}\n\t\t\t},\n\t\t\tflush() {\n\t\t\t\tconst { signature } = stream;\n\t\t\t\tObject.assign(codec, {\n\t\t\t\t\tsignature,\n\t\t\t\t\toutputSize,\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\tlet pendingChunk;\n\t\tsuper({\n\t\t\ttransform,\n\t\t\tflush(controller) {\n\t\t\t\tif (pendingChunk && pendingChunk.length) {\n\t\t\t\t\tcontroller.enqueue(pendingChunk);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tfunction transform(chunk, controller) {\n\t\t\tif (pendingChunk) {\n\t\t\t\tconst newChunk = new Uint8Array(pendingChunk.length + chunk.length);\n\t\t\t\tnewChunk.set(pendingChunk);\n\t\t\t\tnewChunk.set(chunk, pendingChunk.length);\n\t\t\t\tchunk = newChunk;\n\t\t\t\tpendingChunk = null;\n\t\t\t}\n\t\t\tif (chunk.length > chunkSize) {\n\t\t\t\tcontroller.enqueue(chunk.slice(0, chunkSize));\n\t\t\t\ttransform(chunk.slice(chunkSize), controller);\n\t\t\t} else {\n\t\t\t\tpendingChunk = chunk;\n\t\t\t}\n\t\t}\n\t}\n}", "/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global Worker, URL, TransformStream, WritableStream */\n\nimport {\n\tUNDEFINED_TYPE,\n\tFUNCTION_TYPE\n} from \"./constants.js\";\nimport {\n\tCodecStream,\n\tChunkStream,\n\tMESSAGE_EVENT_TYPE,\n\tMESSAGE_START,\n\tMESSAGE_PULL,\n\tMESSAGE_DATA,\n\tMESSAGE_ACK_DATA,\n\tMESSAGE_CLOSE\n} from \"./streams/codec-stream.js\";\n\n// deno-lint-ignore valid-typeof\nlet WEB_WORKERS_SUPPORTED = typeof Worker != UNDEFINED_TYPE;\n\nexport {\n\tCodecWorker\n};\n\nclass CodecWorker {\n\n\tconstructor(workerData, { readable, writable }, { options, config, streamOptions, useWebWorkers, transferStreams, scripts }, onTaskFinished) {\n\t\tconst { signal } = streamOptions;\n\t\tObject.assign(workerData, {\n\t\t\tbusy: true,\n\t\t\treadable: readable\n\t\t\t\t.pipeThrough(new ChunkStream(config.chunkSize))\n\t\t\t\t.pipeThrough(new ProgressWatcherStream(readable, streamOptions), { signal }),\n\t\t\twritable,\n\t\t\toptions: Object.assign({}, options),\n\t\t\tscripts,\n\t\t\ttransferStreams,\n\t\t\tterminate() {\n\t\t\t\treturn new Promise(resolve => {\n\t\t\t\t\tconst { worker, busy } = workerData;\n\t\t\t\t\tif (worker) {\n\t\t\t\t\t\tif (busy) {\n\t\t\t\t\t\t\tworkerData.resolveTerminated = resolve;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tworker.terminate();\n\t\t\t\t\t\t\tresolve();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tworkerData.interface = null;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tresolve();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t},\n\t\t\tonTaskFinished() {\n\t\t\t\tconst { resolveTerminated } = workerData;\n\t\t\t\tif (resolveTerminated) {\n\t\t\t\t\tworkerData.resolveTerminated = null;\n\t\t\t\t\tworkerData.terminated = true;\n\t\t\t\t\tworkerData.worker.terminate();\n\t\t\t\t\tresolveTerminated();\n\t\t\t\t}\n\t\t\t\tworkerData.busy = false;\n\t\t\t\tonTaskFinished(workerData);\n\t\t\t}\n\t\t});\n\t\treturn (useWebWorkers && WEB_WORKERS_SUPPORTED ? createWebWorkerInterface : createWorkerInterface)(workerData, config);\n\t}\n}\n\nclass ProgressWatcherStream extends TransformStream {\n\n\tconstructor(readableSource, { onstart, onprogress, size, onend }) {\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\treadableSource.size = chunkOffset;\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 (_error) {\n\t\t// ignored\n\t}\n}\n\nfunction createWorkerInterface(workerData, config) {\n\treturn {\n\t\trun: () => runWorker(workerData, config)\n\t};\n}\n\nfunction createWebWorkerInterface(workerData, config) {\n\tconst { baseURL, chunkSize } = config;\n\tif (!workerData.interface) {\n\t\tlet worker;\n\t\ttry {\n\t\t\tworker = getWebWorker(workerData.scripts[0], baseURL, workerData);\n\t\t} catch (error) {\n\t\t\tWEB_WORKERS_SUPPORTED = false;\n\t\t\treturn createWorkerInterface(workerData, config);\n\t\t}\n\t\tObject.assign(workerData, {\n\t\t\tworker,\n\t\t\tinterface: {\n\t\t\t\trun: () => runWebWorker(workerData, { chunkSize })\n\t\t\t}\n\t\t});\n\t}\n\treturn workerData.interface;\n}\n\nasync function runWorker({ options, readable, writable, onTaskFinished }, config) {\n\ttry {\n\t\tconst codecStream = new CodecStream(options, config);\n\t\tawait readable.pipeThrough(codecStream).pipeTo(writable, { preventClose: true, preventAbort: true });\n\t\tconst {\n\t\t\tsignature,\n\t\t\tinputSize,\n\t\t\toutputSize\n\t\t} = codecStream;\n\t\treturn {\n\t\t\tsignature,\n\t\t\tinputSize,\n\t\t\toutputSize\n\t\t};\n\t} finally {\n\t\tonTaskFinished();\n\t}\n}\n\nasync function runWebWorker(workerData, config) {\n\tlet resolveResult, rejectResult;\n\tconst result = new Promise((resolve, reject) => {\n\t\tresolveResult = resolve;\n\t\trejectResult = reject;\n\t});\n\tObject.assign(workerData, {\n\t\treader: null,\n\t\twriter: null,\n\t\tresolveResult,\n\t\trejectResult,\n\t\tresult\n\t});\n\tconst { readable, options, scripts } = workerData;\n\tconst { writable, closed } = watchClosedStream(workerData.writable);\n\tconst streamsTransferred = sendMessage({\n\t\ttype: MESSAGE_START,\n\t\tscripts: scripts.slice(1),\n\t\toptions,\n\t\tconfig,\n\t\treadable,\n\t\twritable\n\t}, workerData);\n\tif (!streamsTransferred) {\n\t\tObject.assign(workerData, {\n\t\t\treader: readable.getReader(),\n\t\t\twriter: writable.getWriter()\n\t\t});\n\t}\n\tconst resultValue = await result;\n\tif (!streamsTransferred) {\n\t\tawait writable.getWriter().close();\n\t}\n\tawait closed;\n\treturn resultValue;\n}\n\nfunction watchClosedStream(writableSource) {\n\tlet resolveStreamClosed;\n\tconst closed = new Promise(resolve => resolveStreamClosed = resolve);\n\tconst writable = new WritableStream({\n\t\tasync write(chunk) {\n\t\t\tconst writer = writableSource.getWriter();\n\t\t\tawait writer.ready;\n\t\t\tawait writer.write(chunk);\n\t\t\twriter.releaseLock();\n\t\t},\n\t\tclose() {\n\t\t\tresolveStreamClosed();\n\t\t},\n\t\tabort(reason) {\n\t\t\tconst writer = writableSource.getWriter();\n\t\t\treturn writer.abort(reason);\n\t\t}\n\t});\n\treturn { writable, closed };\n}\n\nlet classicWorkersSupported = true;\nlet transferStreamsSupported = true;\n\nfunction getWebWorker(url, baseURL, workerData) {\n\tconst workerOptions = { type: \"module\" };\n\tlet scriptUrl, worker;\n\t// deno-lint-ignore valid-typeof\n\tif (typeof url == FUNCTION_TYPE) {\n\t\turl = url();\n\t}\n\ttry {\n\t\tscriptUrl = new URL(url, baseURL);\n\t} catch (_error) {\n\t\tscriptUrl = url;\n\t}\n\tif (classicWorkersSupported) {\n\t\ttry {\n\t\t\tworker = new Worker(scriptUrl);\n\t\t} catch (_error) {\n\t\t\tclassicWorkersSupported = false;\n\t\t\tworker = new Worker(scriptUrl, workerOptions);\n\t\t}\n\t} else {\n\t\tworker = new Worker(scriptUrl, workerOptions);\n\t}\n\tworker.addEventListener(MESSAGE_EVENT_TYPE, event => onMessage(event, workerData));\n\treturn worker;\n}\n\nfunction sendMessage(message, { worker, writer, onTaskFinished, transferStreams }) {\n\ttry {\n\t\tlet { value, readable, writable } = message;\n\t\tconst transferables = [];\n\t\tif (value) {\n\t\t\tif (value.byteLength < value.buffer.byteLength) {\n\t\t\t\tmessage.value = value.buffer.slice(0, value.byteLength);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tmessage.value = value.buffer;\n\t\t\t}\n\t\t\ttransferables.push(message.value);\n\t\t}\n\t\tif (transferStreams && transferStreamsSupported) {\n\t\t\tif (readable) {\n\t\t\t\ttransferables.push(readable);\n\t\t\t}\n\t\t\tif (writable) {\n\t\t\t\ttransferables.push(writable);\n\t\t\t}\n\t\t} else {\n\t\t\tmessage.readable = message.writable = null;\n\t\t}\n\t\tif (transferables.length) {\n\t\t\ttry {\n\t\t\t\tworker.postMessage(message, transferables);\n\t\t\t\treturn true;\n\t\t\t} catch (_error) {\n\t\t\t\ttransferStreamsSupported = false;\n\t\t\t\tmessage.readable = message.writable = null;\n\t\t\t\tworker.postMessage(message);\n\t\t\t}\n\t\t} else {\n\t\t\tworker.postMessage(message);\n\t\t}\n\t} catch (error) {\n\t\tif (writer) {\n\t\t\twriter.releaseLock();\n\t\t}\n\t\tonTaskFinished();\n\t\tthrow error;\n\t}\n}\n\nasync function onMessage({ data }, workerData) {\n\tconst { type, value, messageId, result, error } = data;\n\tconst { reader, writer, resolveResult, rejectResult, onTaskFinished } = workerData;\n\ttry {\n\t\tif (error) {\n\t\t\tconst { message, stack, code, name } = error;\n\t\t\tconst responseError = new Error(message);\n\t\t\tObject.assign(responseError, { stack, code, name });\n\t\t\tclose(responseError);\n\t\t} else {\n\t\t\tif (type == MESSAGE_PULL) {\n\t\t\t\tconst { value, done } = await reader.read();\n\t\t\t\tsendMessage({ type: MESSAGE_DATA, value, done, messageId }, workerData);\n\t\t\t}\n\t\t\tif (type == MESSAGE_DATA) {\n\t\t\t\tawait writer.ready;\n\t\t\t\tawait writer.write(new Uint8Array(value));\n\t\t\t\tsendMessage({ type: MESSAGE_ACK_DATA, messageId }, workerData);\n\t\t\t}\n\t\t\tif (type == MESSAGE_CLOSE) {\n\t\t\t\tclose(null, result);\n\t\t\t}\n\t\t}\n\t} catch (error) {\n\t\tsendMessage({ type: MESSAGE_CLOSE, messageId }, workerData);\n\t\tclose(error);\n\t}\n\n\tfunction close(error, result) {\n\t\tif (error) {\n\t\t\trejectResult(error);\n\t\t} else {\n\t\t\tresolveResult(result);\n\t\t}\n\t\tif (writer) {\n\t\t\twriter.releaseLock();\n\t\t}\n\t\tonTaskFinished();\n\t}\n}", "/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global setTimeout, clearTimeout */\n\nimport { UNDEFINED_VALUE } from \"./constants.js\";\nimport {\n\tCODEC_INFLATE,\n\tCODEC_DEFLATE,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD,\n\tERR_ABORT_CHECK_PASSWORD\n} from \"./streams/codec-stream.js\";\nimport { CodecWorker } from \"./codec-worker.js\";\n\nlet pool = [];\nconst pendingRequests = [];\n\nexport {\n\trunWorker,\n\tterminateWorkers,\n\tCODEC_DEFLATE,\n\tCODEC_INFLATE,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD,\n\tERR_ABORT_CHECK_PASSWORD\n};\n\nlet indexWorker = 0;\n\nasync function runWorker(stream, workerOptions) {\n\tconst { options, config } = workerOptions;\n\tconst { transferStreams, useWebWorkers, useCompressionStream, codecType, compressed, signed, encrypted } = options;\n\tconst { workerScripts, maxWorkers } = config;\n\tworkerOptions.transferStreams = transferStreams || transferStreams === UNDEFINED_VALUE;\n\tconst streamCopy = !compressed && !signed && !encrypted && !workerOptions.transferStreams;\n\tworkerOptions.useWebWorkers = !streamCopy && (useWebWorkers || (useWebWorkers === UNDEFINED_VALUE && config.useWebWorkers));\n\tworkerOptions.scripts = workerOptions.useWebWorkers && workerScripts ? workerScripts[codecType] : [];\n\toptions.useCompressionStream = useCompressionStream || (useCompressionStream === UNDEFINED_VALUE && config.useCompressionStream);\n\treturn (await getWorker()).run();\n\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 => pendingRequests.push({ resolve, stream, workerOptions }));\n\t\t}\n\t}\n\n\tfunction onTaskFinished(workerData) {\n\t\tif (pendingRequests.length) {\n\t\t\tconst [{ resolve, stream, workerOptions }] = pendingRequests.splice(0, 1);\n\t\t\tresolve(new CodecWorker(workerData, stream, workerOptions, onTaskFinished));\n\t\t} else if (workerData.worker) {\n\t\t\tclearTerminateTimeout(workerData);\n\t\t\tterminateWorker(workerData, workerOptions);\n\t\t} else {\n\t\t\tpool = pool.filter(data => data != workerData);\n\t\t}\n\t}\n}\n\nfunction terminateWorker(workerData, workerOptions) {\n\tconst { config } = workerOptions;\n\tconst { terminateWorkerTimeout } = config;\n\tif (Number.isFinite(terminateWorkerTimeout) && terminateWorkerTimeout >= 0) {\n\t\tif (workerData.terminated) {\n\t\t\tworkerData.terminated = false;\n\t\t} else {\n\t\t\tworkerData.terminateTimeout = setTimeout(async () => {\n\t\t\t\tpool = pool.filter(data => data != workerData);\n\t\t\t\ttry {\n\t\t\t\t\tawait workerData.terminate();\n\t\t\t\t} catch (_error) {\n\t\t\t\t\t// ignored\n\t\t\t\t}\n\t\t\t}, terminateWorkerTimeout);\n\t\t}\n\t}\n}\n\nfunction clearTerminateTimeout(workerData) {\n\tconst { terminateTimeout } = workerData;\n\tif (terminateTimeout) {\n\t\tclearTimeout(terminateTimeout);\n\t\tworkerData.terminateTimeout = null;\n\t}\n}\n\nasync function terminateWorkers() {\n\tawait Promise.allSettled(pool.map(workerData => {\n\t\tclearTerminateTimeout(workerData);\n\t\treturn workerData.terminate();\n\t}));\n}", "/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global Blob, atob, btoa, XMLHttpRequest, URL, fetch, ReadableStream, WritableStream, FileReader, TransformStream, Response */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tUNDEFINED_VALUE,\n\tFUNCTION_TYPE,\n\tEND_OF_CENTRAL_DIR_LENGTH\n} from \"./constants.js\";\nimport { getConfiguration } from \"./configuration.js\";\n\nconst ERR_HTTP_STATUS = \"HTTP error \";\nconst ERR_HTTP_RANGE = \"HTTP Range not supported\";\nconst ERR_ITERATOR_COMPLETED_TOO_SOON = \"Writer iterator completed too soon\";\n\nconst CONTENT_TYPE_TEXT_PLAIN = \"text/plain\";\nconst HTTP_HEADER_CONTENT_LENGTH = \"Content-Length\";\nconst HTTP_HEADER_CONTENT_RANGE = \"Content-Range\";\nconst HTTP_HEADER_ACCEPT_RANGES = \"Accept-Ranges\";\nconst HTTP_HEADER_RANGE = \"Range\";\nconst HTTP_HEADER_CONTENT_TYPE = \"Content-Type\";\nconst HTTP_METHOD_HEAD = \"HEAD\";\nconst HTTP_METHOD_GET = \"GET\";\nconst HTTP_RANGE_UNIT = \"bytes\";\nconst DEFAULT_CHUNK_SIZE = 64 * 1024;\n\nconst PROPERTY_NAME_WRITABLE = \"writable\";\n\nclass Stream {\n\n\tconstructor() {\n\t\tthis.size = 0;\n\t}\n\n\tinit() {\n\t\tthis.initialized = true;\n\t}\n}\n\nclass Reader extends Stream {\n\n\tget readable() {\n\t\tconst reader = this;\n\t\tconst { chunkSize = DEFAULT_CHUNK_SIZE } = reader;\n\t\tconst readable = new ReadableStream({\n\t\t\tstart() {\n\t\t\t\tthis.chunkOffset = 0;\n\t\t\t},\n\t\t\tasync pull(controller) {\n\t\t\t\tconst { offset = 0, size, diskNumberStart } = readable;\n\t\t\t\tconst { chunkOffset } = this;\n\t\t\t\tcontroller.enqueue(await readUint8Array(reader, offset + chunkOffset, Math.min(chunkSize, size - chunkOffset), diskNumberStart));\n\t\t\t\tif (chunkOffset + chunkSize > size) {\n\t\t\t\t\tcontroller.close();\n\t\t\t\t} else {\n\t\t\t\t\tthis.chunkOffset += chunkSize;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\treturn readable;\n\t}\n}\n\nclass Writer extends Stream {\n\n\tconstructor() {\n\t\tsuper();\n\t\tconst writer = this;\n\t\tconst writable = new WritableStream({\n\t\t\twrite(chunk) {\n\t\t\t\treturn writer.writeUint8Array(chunk);\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(writer, PROPERTY_NAME_WRITABLE, {\n\t\t\tget() {\n\t\t\t\treturn writable;\n\t\t\t}\n\t\t});\n\t}\n\n\twriteUint8Array() {\n\t\t// abstract\n\t}\n}\n\nclass Data64URIReader extends Reader {\n\n\tconstructor(dataURI) {\n\t\tsuper();\n\t\tlet dataEnd = dataURI.length;\n\t\twhile (dataURI.charAt(dataEnd - 1) == \"=\") {\n\t\t\tdataEnd--;\n\t\t}\n\t\tconst dataStart = dataURI.indexOf(\",\") + 1;\n\t\tObject.assign(this, {\n\t\t\tdataURI,\n\t\t\tdataStart,\n\t\t\tsize: Math.floor((dataEnd - dataStart) * 0.75)\n\t\t});\n\t}\n\n\treadUint8Array(offset, length) {\n\t\tconst {\n\t\t\tdataStart,\n\t\t\tdataURI\n\t\t} = this;\n\t\tconst dataArray = new Uint8Array(length);\n\t\tconst start = Math.floor(offset / 3) * 4;\n\t\tconst bytes = atob(dataURI.substring(start + dataStart, Math.ceil((offset + length) / 3) * 4 + dataStart));\n\t\tconst delta = offset - Math.floor(start / 4) * 3;\n\t\tfor (let indexByte = delta; indexByte < delta + length; indexByte++) {\n\t\t\tdataArray[indexByte - delta] = bytes.charCodeAt(indexByte);\n\t\t}\n\t\treturn dataArray;\n\t}\n}\n\nclass Data64URIWriter extends Writer {\n\n\tconstructor(contentType) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\tdata: \"data:\" + (contentType || \"\") + \";base64,\",\n\t\t\tpending: []\n\t\t});\n\t}\n\n\twriteUint8Array(array) {\n\t\tconst writer = this;\n\t\tlet indexArray = 0;\n\t\tlet dataString = writer.pending;\n\t\tconst delta = writer.pending.length;\n\t\twriter.pending = \"\";\n\t\tfor (indexArray = 0; indexArray < (Math.floor((delta + array.length) / 3) * 3) - delta; indexArray++) {\n\t\t\tdataString += String.fromCharCode(array[indexArray]);\n\t\t}\n\t\tfor (; indexArray < array.length; indexArray++) {\n\t\t\twriter.pending += String.fromCharCode(array[indexArray]);\n\t\t}\n\t\tif (dataString.length > 2) {\n\t\t\twriter.data += btoa(dataString);\n\t\t} else {\n\t\t\twriter.pending = dataString;\n\t\t}\n\t}\n\n\tgetData() {\n\t\treturn this.data + btoa(this.pending);\n\t}\n}\n\nclass BlobReader extends Reader {\n\n\tconstructor(blob) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\tblob,\n\t\t\tsize: blob.size\n\t\t});\n\t}\n\n\tasync readUint8Array(offset, length) {\n\t\tconst reader = this;\n\t\tconst offsetEnd = offset + length;\n\t\tconst blob = offset || offsetEnd < reader.size ? reader.blob.slice(offset, offsetEnd) : reader.blob;\n\t\tlet arrayBuffer = await blob.arrayBuffer();\n\t\tif (arrayBuffer.byteLength > length) {\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\tconst headers = [];\n\t\tif (contentType) {\n\t\t\theaders.push([HTTP_HEADER_CONTENT_TYPE, contentType]);\n\t\t}\n\t\tObject.defineProperty(writer, PROPERTY_NAME_WRITABLE, {\n\t\t\tget() {\n\t\t\t\treturn transformStream.writable;\n\t\t\t}\n\t\t});\n\t\twriter.blob = new Response(transformStream.readable, { headers }).blob();\n\t}\n\n\tgetData() {\n\t\treturn this.blob;\n\t}\n}\n\nclass TextReader extends BlobReader {\n\n\tconstructor(text) {\n\t\tsuper(new Blob([text], { type: CONTENT_TYPE_TEXT_PLAIN }));\n\t}\n}\n\nclass TextWriter extends BlobWriter {\n\n\tconstructor(encoding) {\n\t\tsuper(encoding);\n\t\tObject.assign(this, {\n\t\t\tencoding,\n\t\t\tutf8: !encoding || encoding.toLowerCase() == \"utf-8\"\n\t\t});\n\t}\n\n\tasync getData() {\n\t\tconst {\n\t\t\tencoding,\n\t\t\tutf8\n\t\t} = this;\n\t\tconst blob = await super.getData();\n\t\tif (blob.text && utf8) {\n\t\t\treturn blob.text();\n\t\t} else {\n\t\t\tconst reader = new FileReader();\n\t\t\treturn new Promise((resolve, reject) => {\n\t\t\t\tObject.assign(reader, {\n\t\t\t\t\tonload: ({ target }) => resolve(target.result),\n\t\t\t\t\tonerror: () => reject(reader.error)\n\t\t\t\t});\n\t\t\t\treader.readAsText(blob, encoding);\n\t\t\t});\n\t\t}\n\t}\n}\n\nclass FetchReader extends Reader {\n\n\tconstructor(url, options) {\n\t\tsuper();\n\t\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\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} = 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.useXHR;\n\tObject.assign(httpReader, {\n\t\turl,\n\t\toptions,\n\t\tpreventHeadRequest,\n\t\tuseRangeHeader,\n\t\tforceRangeRequests,\n\t\tcombineSizeEocd\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\" || preventHeadRequest)) {\n\t\tconst response = await sendRequest(HTTP_METHOD_GET, httpReader, getRangeHeaders(httpReader, combineSizeEocd ? -END_OF_CENTRAL_DIR_LENGTH : undefined));\n\t\tif (!forceRangeRequests && response.headers.get(HTTP_HEADER_ACCEPT_RANGES) != HTTP_RANGE_UNIT) {\n\t\t\tthrow new Error(ERR_HTTP_RANGE);\n\t\t} else {\n\t\t\tif (combineSizeEocd) {\n\t\t\t\thttpReader.eocdCache = new Uint8Array(await response.arrayBuffer());\n\t\t\t}\n\t\t\tlet contentSize;\n\t\t\tconst contentRangeHeader = response.headers.get(HTTP_HEADER_CONTENT_RANGE);\n\t\t\tif (contentRangeHeader) {\n\t\t\t\tconst splitHeader = contentRangeHeader.trim().split(/\\s*\\/\\s*/);\n\t\t\t\tif (splitHeader.length) {\n\t\t\t\t\tconst headerValue = splitHeader[1];\n\t\t\t\t\tif (headerValue && headerValue != \"*\") {\n\t\t\t\t\t\tcontentSize = Number(headerValue);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (contentSize === UNDEFINED_VALUE) {\n\t\t\t\tawait getContentLength(httpReader, sendRequest, getRequestData);\n\t\t\t} else {\n\t\t\t\thttpReader.size = contentSize;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tawait getContentLength(httpReader, sendRequest, getRequestData);\n\t}\n}\n\nasync function readUint8ArrayHttpReader(httpReader, index, length, sendRequest, getRequestData) {\n\tconst {\n\t\tuseRangeHeader,\n\t\tforceRangeRequests,\n\t\teocdCache,\n\t\tsize,\n\t\toptions\n\t} = httpReader;\n\tif (useRangeHeader || forceRangeRequests) {\n\t\tif (eocdCache && index == size - END_OF_CENTRAL_DIR_LENGTH && length == END_OF_CENTRAL_DIR_LENGTH) {\n\t\t\treturn eocdCache;\n\t\t}\n\t\tconst response = await sendRequest(HTTP_METHOD_GET, httpReader, getRangeHeaders(httpReader, index, length));\n\t\tif (response.status != 206) {\n\t\t\tthrow new Error(ERR_HTTP_RANGE);\n\t\t}\n\t\treturn new Uint8Array(await response.arrayBuffer());\n\t} else {\n\t\tconst { data } = httpReader;\n\t\tif (!data) {\n\t\t\tawait getRequestData(httpReader, options);\n\t\t}\n\t\treturn new Uint8Array(httpReader.data.subarray(index, index + length));\n\t}\n}\n\nfunction getRangeHeaders(httpReader, index = 0, length = 1) {\n\treturn Object.assign({}, getHeaders(httpReader), { [HTTP_HEADER_RANGE]: HTTP_RANGE_UNIT + \"=\" + (index < 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\tif (!httpReader.size) {\n\t\thttpReader.size = httpReader.data.length;\n\t}\n}\n\nasync function getContentLength(httpReader, sendRequest, getRequestData) {\n\tif (httpReader.preventHeadRequest) {\n\t\tawait getRequestData(httpReader, httpReader.options);\n\t} else {\n\t\tconst response = await sendRequest(HTTP_METHOD_HEAD, httpReader, getHeaders(httpReader));\n\t\tconst contentLength = response.headers.get(HTTP_HEADER_CONTENT_LENGTH);\n\t\tif (contentLength) {\n\t\t\thttpReader.size = Number(contentLength);\n\t\t} else {\n\t\t\tawait getRequestData(httpReader, httpReader.options);\n\t\t}\n\t}\n}\n\nasync function sendFetchRequest(method, { options, url }, headers) {\n\tconst response = await fetch(url, Object.assign({}, options, { method, headers }));\n\tif (response.status < 400) {\n\t\treturn response;\n\t} else {\n\t\tthrow response.status == 416 ? new Error(ERR_HTTP_RANGE) : new Error(ERR_HTTP_STATUS + (response.statusText || response.status));\n\t}\n}\n\nfunction sendXMLHttpRequest(method, { url }, headers) {\n\treturn new Promise((resolve, reject) => {\n\t\tconst request = new XMLHttpRequest();\n\t\trequest.addEventListener(\"load\", () => {\n\t\t\tif (request.status < 400) {\n\t\t\t\tconst headers = [];\n\t\t\t\trequest.getAllResponseHeaders().trim().split(/[\\r\\n]+/).forEach(header => {\n\t\t\t\t\tconst splitHeader = header.trim().split(/\\s*:\\s*/);\n\t\t\t\t\tsplitHeader[0] = splitHeader[0].trim().replace(/^[a-z]|-[a-z]/g, value => value.toUpperCase());\n\t\t\t\t\theaders.push(splitHeader);\n\t\t\t\t});\n\t\t\t\tresolve({\n\t\t\t\t\tstatus: request.status,\n\t\t\t\t\tarrayBuffer: () => request.response,\n\t\t\t\t\theaders: new Map(headers)\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\treject(request.status == 416 ? new Error(ERR_HTTP_RANGE) : new Error(ERR_HTTP_STATUS + (request.statusText || request.status)));\n\t\t\t}\n\t\t}, false);\n\t\trequest.addEventListener(\"error\", event => reject(event.detail ? 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 ? new XHRReader(url, options) : new FetchReader(url, options)\n\t\t});\n\t}\n\n\tset size(value) {\n\t\t// ignored\n\t}\n\n\tget size() {\n\t\treturn this.reader.size;\n\t}\n\n\tasync init() {\n\t\tawait this.reader.init();\n\t\tsuper.init();\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn this.reader.readUint8Array(index, length);\n\t}\n}\n\nclass HttpRangeReader extends HttpReader {\n\n\tconstructor(url, options = {}) {\n\t\toptions.useRangeHeader = true;\n\t\tsuper(url, options);\n\t}\n}\n\n\nclass Uint8ArrayReader extends Reader {\n\n\tconstructor(array) {\n\t\tsuper();\n\t\tObject.assign(this, {\n\t\t\tarray,\n\t\t\tsize: array.length\n\t\t});\n\t}\n\n\treadUint8Array(index, length) {\n\t\treturn this.array.slice(index, index + length);\n\t}\n}\n\nclass Uint8ArrayWriter extends Writer {\n\n\tinit(initSize = 0) {\n\t\tObject.assign(this, {\n\t\t\toffset: 0,\n\t\t\tarray: new Uint8Array(initSize)\n\t\t});\n\t\tsuper.init();\n\t}\n\n\twriteUint8Array(array) {\n\t\tconst writer = this;\n\t\tif (writer.offset + array.length > writer.array.length) {\n\t\t\tconst previousArray = writer.array;\n\t\t\twriter.array = new Uint8Array(previousArray.length + array.length);\n\t\t\twriter.array.set(previousArray);\n\t\t}\n\t\twriter.array.set(array, writer.offset);\n\t\twriter.offset += array.length;\n\t}\n\n\tgetData() {\n\t\treturn this.array;\n\t}\n}\n\nclass SplitDataReader extends Reader {\n\n\tconstructor(readers) {\n\t\tsuper();\n\t\tthis.readers = readers;\n\t}\n\n\tasync init() {\n\t\tconst reader = this;\n\t\tconst { readers } = reader;\n\t\treader.lastDiskNumber = 0;\n\t\treader.lastDiskOffset = 0;\n\t\tawait Promise.all(readers.map(async (diskReader, indexDiskReader) => {\n\t\t\tawait diskReader.init();\n\t\t\tif (indexDiskReader != readers.length - 1) {\n\t\t\t\treader.lastDiskOffset += diskReader.size;\n\t\t\t}\n\t\t\treader.size += diskReader.size;\n\t\t}));\n\t\tsuper.init();\n\t}\n\n\tasync readUint8Array(offset, length, diskNumber = 0) {\n\t\tconst reader = this;\n\t\tconst { readers } = this;\n\t\tlet result;\n\t\tlet currentDiskNumber = diskNumber;\n\t\tif (currentDiskNumber == -1) {\n\t\t\tcurrentDiskNumber = readers.length - 1;\n\t\t}\n\t\tlet currentReaderOffset = offset;\n\t\twhile (currentReaderOffset >= readers[currentDiskNumber].size) {\n\t\t\tcurrentReaderOffset -= readers[currentDiskNumber].size;\n\t\t\tcurrentDiskNumber++;\n\t\t}\n\t\tconst currentReader = readers[currentDiskNumber];\n\t\tconst currentReaderSize = currentReader.size;\n\t\tif (currentReaderOffset + length <= currentReaderSize) {\n\t\t\tresult = await readUint8Array(currentReader, currentReaderOffset, length);\n\t\t} else {\n\t\t\tconst chunkLength = currentReaderSize - currentReaderOffset;\n\t\t\tresult = new Uint8Array(length);\n\t\t\tresult.set(await readUint8Array(currentReader, currentReaderOffset, chunkLength));\n\t\t\tresult.set(await reader.readUint8Array(offset + chunkLength, length - chunkLength, diskNumber), chunkLength);\n\t\t}\n\t\treader.lastDiskNumber = Math.max(currentDiskNumber, reader.lastDiskNumber);\n\t\treturn result;\n\t}\n}\n\nclass SplitDataWriter extends Stream {\n\n\tconstructor(writerGenerator, maxSize = 4294967295) {\n\t\tsuper();\n\t\tconst 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\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.slice(0, availableSize));\n\t\t\t\t\tawait closeDisk();\n\t\t\t\t\twriter.diskOffset += diskSourceWriter.size;\n\t\t\t\t\twriter.diskNumber++;\n\t\t\t\t\tdiskWriter = null;\n\t\t\t\t\tawait this.write(chunk.slice(availableSize));\n\t\t\t\t} else {\n\t\t\t\t\tawait writeChunk(chunk);\n\t\t\t\t}\n\t\t\t},\n\t\t\tasync close() {\n\t\t\t\tawait diskWriter.ready;\n\t\t\t\tawait closeDisk();\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(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.size += chunkLength;\n\t\t\t\twriter.availableSize -= chunkLength;\n\t\t\t}\n\t\t}\n\n\t\tasync function closeDisk() {\n\t\t\tdiskWritable.size = diskSourceWriter.size;\n\t\t\tawait diskWriter.close();\n\t\t}\n\t}\n}\n\nfunction isHttpFamily(url) {\n\tconst { baseURL } = getConfiguration();\n\tconst { protocol } = new URL(url, baseURL);\n\treturn protocol == \"http:\" || protocol == \"https:\";\n}\n\nasync function initStream(stream, initSize) {\n\tif (stream.init && !stream.initialized) {\n\t\tawait stream.init(initSize);\n\t} else {\n\t\treturn Promise.resolve();\n\t}\n}\n\nfunction initReader(reader) {\n\tif (Array.isArray(reader)) {\n\t\treader = new SplitDataReader(reader);\n\t}\n\tif (reader instanceof ReadableStream) {\n\t\treader = {\n\t\t\treadable: reader\n\t\t};\n\t}\n\treturn reader;\n}\n\nfunction initWriter(writer) {\n\tif (writer.writable === UNDEFINED_VALUE && typeof writer.next == FUNCTION_TYPE) {\n\t\twriter = new SplitDataWriter(writer);\n\t}\n\tif (writer instanceof WritableStream) {\n\t\twriter = {\n\t\t\twritable: writer\n\t\t};\n\t}\n\tconst { writable } = writer;\n\tif (writable.size === UNDEFINED_VALUE) {\n\t\twritable.size = 0;\n\t}\n\tif (!(writer instanceof SplitDataWriter)) {\n\t\tObject.assign(writer, {\n\t\t\tdiskNumber: 0,\n\t\t\tdiskOffset: 0,\n\t\t\tavailableSize: Infinity,\n\t\t\tmaxSize: Infinity\n\t\t});\n\t}\n\treturn writer;\n}\n\nfunction readUint8Array(reader, offset, size, diskNumber) {\n\treturn reader.readUint8Array(offset, size, diskNumber);\n}\n\nconst SplitZipReader = SplitDataReader;\nconst SplitZipWriter = SplitDataWriter;\n\nexport {\n\tinitStream,\n\tinitReader,\n\tinitWriter,\n\treadUint8Array,\n\tReader,\n\tWriter,\n\tTextReader,\n\tTextWriter,\n\tData64URIReader,\n\tData64URIWriter,\n\tBlobReader,\n\tBlobWriter,\n\tUint8ArrayReader,\n\tUint8ArrayWriter,\n\tHttpReader,\n\tHttpRangeReader,\n\tSplitZipReader,\n\tSplitZipWriter,\n\tSplitDataReader,\n\tSplitDataWriter,\n\tERR_HTTP_RANGE,\n\tERR_ITERATOR_COMPLETED_TOO_SOON\n};", "/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TextDecoder */\n\nconst CP437 = \"\\0\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 \".split(\"\");\nconst VALID_CP437 = CP437.length == 256;\n\nexport {\n\tdecodeCP437\n};\n\nfunction decodeCP437(stringValue) {\n\tif (VALID_CP437) {\n\t\tlet result = \"\";\n\t\tfor (let indexCharacter = 0; indexCharacter < stringValue.length; indexCharacter++) {\n\t\t\tresult += CP437[stringValue[indexCharacter]];\n\t\t}\n\t\treturn result;\n\t} else {\n\t\treturn new TextDecoder().decode(stringValue);\n\t}\n}", "/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global TextDecoder */\n\nimport { decodeCP437 } from \"./cp437-decode.js\";\n\nexport {\n\tdecodeText\n};\n\nfunction decodeText(value, encoding) {\n\tif (encoding && encoding.trim().toLowerCase() == \"cp437\") {\n\t\treturn decodeCP437(value);\n\t} else {\n\t\treturn new TextDecoder(encoding).decode(value);\n\t}\n}", "/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nconst PROPERTY_NAME_FILENAME = \"filename\";\nconst PROPERTY_NAME_RAW_FILENAME = \"rawFilename\";\nconst PROPERTY_NAME_COMMENT = \"comment\";\nconst PROPERTY_NAME_RAW_COMMENT = \"rawComment\";\nconst PROPERTY_NAME_UNCOMPPRESSED_SIZE = \"uncompressedSize\";\nconst PROPERTY_NAME_COMPPRESSED_SIZE = \"compressedSize\";\nconst PROPERTY_NAME_OFFSET = \"offset\";\nconst PROPERTY_NAME_DISK_NUMBER_START = \"diskNumberStart\";\nconst PROPERTY_NAME_LAST_MODIFICATION_DATE = \"lastModDate\";\nconst PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE = \"rawLastModDate\";\nconst PROPERTY_NAME_LAST_ACCESS_DATE = \"lastAccessDate\";\nconst PROPERTY_NAME_RAW_LAST_ACCESS_DATE = \"rawLastAccessDate\";\nconst PROPERTY_NAME_CREATION_DATE = \"creationDate\";\nconst PROPERTY_NAME_RAW_CREATION_DATE = \"rawCreationDate\";\nconst PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE = \"internalFileAttribute\";\nconst PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE = \"externalFileAttribute\";\nconst PROPERTY_NAME_MS_DOS_COMPATIBLE = \"msDosCompatible\";\nconst PROPERTY_NAME_ZIP64 = \"zip64\";\n\nconst PROPERTY_NAMES = [\n\tPROPERTY_NAME_FILENAME, PROPERTY_NAME_RAW_FILENAME, PROPERTY_NAME_COMPPRESSED_SIZE, PROPERTY_NAME_UNCOMPPRESSED_SIZE,\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE, PROPERTY_NAME_RAW_LAST_MODIFICATION_DATE, PROPERTY_NAME_COMMENT, PROPERTY_NAME_RAW_COMMENT,\n\tPROPERTY_NAME_LAST_ACCESS_DATE, PROPERTY_NAME_CREATION_DATE, PROPERTY_NAME_OFFSET, PROPERTY_NAME_DISK_NUMBER_START,\n\tPROPERTY_NAME_DISK_NUMBER_START, PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE, PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_MS_DOS_COMPATIBLE, PROPERTY_NAME_ZIP64,\n\t\"directory\", \"bitFlag\", \"encrypted\", \"signature\", \"filenameUTF8\", \"commentUTF8\", \"compressionMethod\", \"version\", \"versionMadeBy\",\n\t\"extraField\", \"rawExtraField\", \"extraFieldZip64\", \"extraFieldUnicodePath\", \"extraFieldUnicodeComment\", \"extraFieldAES\", \"extraFieldNTFS\",\n\t\"extraFieldExtendedTimestamp\"];\n\nclass Entry {\n\n\tconstructor(data) {\n\t\tPROPERTY_NAMES.forEach(name => this[name] = data[name]);\n\t}\n\n}\n\nexport {\n\tPROPERTY_NAME_FILENAME,\n\tPROPERTY_NAME_RAW_FILENAME,\n\tPROPERTY_NAME_COMMENT,\n\tPROPERTY_NAME_RAW_COMMENT,\n\tPROPERTY_NAME_UNCOMPPRESSED_SIZE,\n\tPROPERTY_NAME_COMPPRESSED_SIZE,\n\tPROPERTY_NAME_OFFSET,\n\tPROPERTY_NAME_DISK_NUMBER_START,\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_RAW_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_RAW_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_CREATION_DATE,\n\tPROPERTY_NAME_RAW_CREATION_DATE,\n\tPROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_MS_DOS_COMPATIBLE,\n\tPROPERTY_NAME_ZIP64,\n\tEntry\n};", "/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright\n notice, this list of conditions and the following disclaimer in\n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global BigInt, Response, WritableStream, ReadableStream, TransformStream */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tMAX_32_BITS,\n\tMAX_16_BITS,\n\tCOMPRESSION_METHOD_DEFLATE,\n\tCOMPRESSION_METHOD_STORE,\n\tCOMPRESSION_METHOD_AES,\n\tSPLIT_ZIP_FILE_SIGNATURE,\n\tLOCAL_FILE_HEADER_SIGNATURE,\n\tCENTRAL_FILE_HEADER_SIGNATURE,\n\tEND_OF_CENTRAL_DIR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_SIGNATURE,\n\tEXTRAFIELD_TYPE_ZIP64,\n\tEXTRAFIELD_TYPE_UNICODE_PATH,\n\tEXTRAFIELD_TYPE_UNICODE_COMMENT,\n\tEXTRAFIELD_TYPE_AES,\n\tEXTRAFIELD_TYPE_NTFS,\n\tEXTRAFIELD_TYPE_NTFS_TAG1,\n\tEXTRAFIELD_TYPE_EXTENDED_TIMESTAMP,\n\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_LEVEL,\n\tBITFLAG_DATA_DESCRIPTOR,\n\tBITFLAG_LANG_ENCODING_FLAG,\n\tFILE_ATTR_MSDOS_DIR_MASK,\n\tDIRECTORY_SIGNATURE,\n\tUNDEFINED_VALUE\n} from \"./constants.js\";\nimport {\n\tgetConfiguration,\n\tgetChunkSize\n} from \"./configuration.js\";\nimport {\n\trunWorker,\n\tCODEC_INFLATE,\n\tERR_INVALID_SIGNATURE,\n\tERR_INVALID_PASSWORD,\n\tERR_ABORT_CHECK_PASSWORD\n} from \"./codec-pool.js\";\nimport {\n\tinitStream,\n\tinitReader,\n\tinitWriter,\n\treadUint8Array,\n\tBlobReader\n} from \"./io.js\";\nimport { decodeText } from \"./util/decode-text.js\";\nimport { Crc32 } from \"./streams/codecs/crc32.js\";\nimport {\n\tPROPERTY_NAME_RAW_FILENAME,\n\tPROPERTY_NAME_FILENAME,\n\tPROPERTY_NAME_RAW_COMMENT,\n\tPROPERTY_NAME_COMMENT,\n\tPROPERTY_NAME_UNCOMPPRESSED_SIZE,\n\tPROPERTY_NAME_COMPPRESSED_SIZE,\n\tPROPERTY_NAME_OFFSET,\n\tPROPERTY_NAME_DISK_NUMBER_START,\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_RAW_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_RAW_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_CREATION_DATE,\n\tPROPERTY_NAME_RAW_CREATION_DATE,\n\tEntry\n} from \"./zip-entry.js\";\n\nconst ERR_BAD_FORMAT = \"File format is not recognized\";\nconst ERR_EOCDR_NOT_FOUND = \"End of central directory not found\";\nconst ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND = \"End of Zip64 central directory locator not found\";\nconst ERR_CENTRAL_DIRECTORY_NOT_FOUND = \"Central directory header not found\";\nconst ERR_LOCAL_FILE_HEADER_NOT_FOUND = \"Local file header not found\";\nconst ERR_EXTRAFIELD_ZIP64_NOT_FOUND = \"Zip64 extra field not found\";\nconst ERR_ENCRYPTED = \"File contains encrypted entry\";\nconst ERR_UNSUPPORTED_ENCRYPTION = \"Encryption method not supported\";\nconst ERR_UNSUPPORTED_COMPRESSION = \"Compression method not supported\";\nconst ERR_SPLIT_ZIP_FILE = \"Split zip file\";\nconst CHARSET_UTF8 = \"utf-8\";\nconst CHARSET_CP437 = \"cp437\";\nconst ZIP64_PROPERTIES = [\n\t[PROPERTY_NAME_UNCOMPPRESSED_SIZE, MAX_32_BITS],\n\t[PROPERTY_NAME_COMPPRESSED_SIZE, MAX_32_BITS],\n\t[PROPERTY_NAME_OFFSET, MAX_32_BITS],\n\t[PROPERTY_NAME_DISK_NUMBER_START, MAX_16_BITS]\n];\nconst ZIP64_EXTRACTION = {\n\t[MAX_16_BITS]: {\n\t\tgetValue: getUint32,\n\t\tbytes: 4\n\t},\n\t[MAX_32_BITS]: {\n\t\tgetValue: getBigUint64,\n\t\tbytes: 8\n\t}\n};\n\nclass ZipReader {\n\n\tconstructor(reader, options = {}) {\n\t\tObject.assign(this, {\n\t\t\treader: initReader(reader),\n\t\t\toptions,\n\t\t\tconfig: getConfiguration()\n\t\t});\n\t}\n\n\tasync* getEntriesGenerator(options = {}) {\n\t\tconst zipReader = this;\n\t\tlet { reader } = zipReader;\n\t\tconst { config } = zipReader;\n\t\tawait initStream(reader);\n\t\tif (reader.size === UNDEFINED_VALUE || !reader.readUint8Array) {\n\t\t\treader = new BlobReader(await new Response(reader.readable).blob());\n\t\t\tawait initStream(reader);\n\t\t}\n\t\tif (reader.size < END_OF_CENTRAL_DIR_LENGTH) {\n\t\t\tthrow new Error(ERR_BAD_FORMAT);\n\t\t}\n\t\treader.chunkSize = getChunkSize(config);\n\t\tconst endOfDirectoryInfo = await seekSignature(reader, END_OF_CENTRAL_DIR_SIGNATURE, reader.size, END_OF_CENTRAL_DIR_LENGTH, MAX_16_BITS * 16);\n\t\tif (!endOfDirectoryInfo) {\n\t\t\tconst signatureArray = await readUint8Array(reader, 0, 4);\n\t\t\tconst signatureView = getDataView(signatureArray);\n\t\t\tif (getUint32(signatureView) == SPLIT_ZIP_FILE_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_SPLIT_ZIP_FILE);\n\t\t\t} else {\n\t\t\t\tthrow new Error(ERR_EOCDR_NOT_FOUND);\n\t\t\t}\n\t\t}\n\t\tconst endOfDirectoryView = getDataView(endOfDirectoryInfo);\n\t\tlet directoryDataLength = getUint32(endOfDirectoryView, 12);\n\t\tlet directoryDataOffset = getUint32(endOfDirectoryView, 16);\n\t\tconst commentOffset = endOfDirectoryInfo.offset;\n\t\tconst commentLength = getUint16(endOfDirectoryView, 20);\n\t\tconst appendedDataOffset = commentOffset + END_OF_CENTRAL_DIR_LENGTH + commentLength;\n\t\tlet lastDiskNumber = getUint16(endOfDirectoryView, 4);\n\t\tconst expectedLastDiskNumber = reader.lastDiskNumber || 0;\n\t\tlet diskNumber = getUint16(endOfDirectoryView, 6);\n\t\tlet filesLength = getUint16(endOfDirectoryView, 8);\n\t\tlet prependedDataLength = 0;\n\t\tlet startOffset = 0;\n\t\tif (directoryDataOffset == MAX_32_BITS || directoryDataLength == MAX_32_BITS || filesLength == MAX_16_BITS || diskNumber == MAX_16_BITS) {\n\t\t\tconst endOfDirectoryLocatorArray = await readUint8Array(reader, endOfDirectoryInfo.offset - ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH, ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH);\n\t\t\tconst endOfDirectoryLocatorView = getDataView(endOfDirectoryLocatorArray);\n\t\t\tif (getUint32(endOfDirectoryLocatorView, 0) == ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE) {\n\t\t\t\tdirectoryDataOffset = getBigUint64(endOfDirectoryLocatorView, 8);\n\t\t\t\tlet endOfDirectoryArray = await readUint8Array(reader, directoryDataOffset, ZIP64_END_OF_CENTRAL_DIR_LENGTH, -1);\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 (getUint32(endOfDirectoryView, 0) != ZIP64_END_OF_CENTRAL_DIR_SIGNATURE && directoryDataOffset != expectedDirectoryDataOffset) {\n\t\t\t\t\tconst originalDirectoryDataOffset = directoryDataOffset;\n\t\t\t\t\tdirectoryDataOffset = expectedDirectoryDataOffset;\n\t\t\t\t\tprependedDataLength = directoryDataOffset - originalDirectoryDataOffset;\n\t\t\t\t\tendOfDirectoryArray = await readUint8Array(reader, directoryDataOffset, ZIP64_END_OF_CENTRAL_DIR_LENGTH, -1);\n\t\t\t\t\tendOfDirectoryView = getDataView(endOfDirectoryArray);\n\t\t\t\t}\n\t\t\t\tif (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\tif (lastDiskNumber == MAX_16_BITS) {\n\t\t\t\t\tlastDiskNumber = getUint32(endOfDirectoryView, 16);\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}\n\t\t\t\tif (filesLength == MAX_16_BITS) {\n\t\t\t\t\tfilesLength = getBigUint64(endOfDirectoryView, 32);\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}\n\t\t\t\tdirectoryDataOffset -= directoryDataLength;\n\t\t\t}\n\t\t}\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, diskNumber);\n\t\tlet directoryView = getDataView(directoryArray);\n\t\tif (directoryDataLength) {\n\t\t\tconst expectedDirectoryDataOffset = endOfDirectoryInfo.offset - directoryDataLength;\n\t\t\tif (getUint32(directoryView, offset) != CENTRAL_FILE_HEADER_SIGNATURE && directoryDataOffset != expectedDirectoryDataOffset) {\n\t\t\t\tconst originalDirectoryDataOffset = directoryDataOffset;\n\t\t\t\tdirectoryDataOffset = expectedDirectoryDataOffset;\n\t\t\t\tprependedDataLength += directoryDataOffset - originalDirectoryDataOffset;\n\t\t\t\tdirectoryArray = await readUint8Array(reader, directoryDataOffset, directoryDataLength, diskNumber);\n\t\t\t\tdirectoryView = getDataView(directoryArray);\n\t\t\t}\n\t\t}\n\t\tconst expectedDirectoryDataLength = endOfDirectoryInfo.offset - directoryDataOffset - (reader.lastDiskOffset || 0);\n\t\tif (directoryDataLength != expectedDirectoryDataLength && expectedDirectoryDataLength >= 0) {\n\t\t\tdirectoryDataLength = expectedDirectoryDataLength;\n\t\t\tdirectoryArray = await readUint8Array(reader, directoryDataOffset, directoryDataLength, diskNumber);\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\tconst filenameEncoding = getOptionValue(zipReader, options, \"filenameEncoding\");\n\t\tconst commentEncoding = getOptionValue(zipReader, options, \"commentEncoding\");\n\t\tfor (let indexFile = 0; indexFile < filesLength; indexFile++) {\n\t\t\tconst fileEntry = new ZipEntry(reader, config, zipReader.options);\n\t\t\tif (getUint32(directoryView, offset) != CENTRAL_FILE_HEADER_SIGNATURE) {\n\t\t\t\tthrow new Error(ERR_CENTRAL_DIRECTORY_NOT_FOUND);\n\t\t\t}\n\t\t\treadCommonHeader(fileEntry, directoryView, offset + 6);\n\t\t\tconst languageEncodingFlag = Boolean(fileEntry.bitFlag.languageEncodingFlag);\n\t\t\tconst filenameOffset = offset + 46;\n\t\t\tconst extraFieldOffset = filenameOffset + fileEntry.filenameLength;\n\t\t\tconst commentOffset = extraFieldOffset + fileEntry.extraFieldLength;\n\t\t\tconst versionMadeBy = getUint16(directoryView, offset + 4);\n\t\t\tconst msDosCompatible = (versionMadeBy & 0) == 0;\n\t\t\tconst rawFilename = directoryArray.subarray(filenameOffset, extraFieldOffset);\n\t\t\tconst commentLength = getUint16(directoryView, offset + 32);\n\t\t\tconst endOffset = commentOffset + commentLength;\n\t\t\tconst rawComment = directoryArray.subarray(commentOffset, endOffset);\n\t\t\tconst filenameUTF8 = languageEncodingFlag;\n\t\t\tconst commentUTF8 = languageEncodingFlag;\n\t\t\tconst directory = msDosCompatible && ((getUint8(directoryView, offset + 38) & FILE_ATTR_MSDOS_DIR_MASK) == FILE_ATTR_MSDOS_DIR_MASK);\n\t\t\tconst offsetFileEntry = getUint32(directoryView, offset + 42) + prependedDataLength;\n\t\t\tObject.assign(fileEntry, {\n\t\t\t\tversionMadeBy,\n\t\t\t\tmsDosCompatible,\n\t\t\t\tcompressedSize: 0,\n\t\t\t\tuncompressedSize: 0,\n\t\t\t\tcommentLength,\n\t\t\t\tdirectory,\n\t\t\t\toffset: offsetFileEntry,\n\t\t\t\tdiskNumberStart: getUint16(directoryView, offset + 34),\n\t\t\t\tinternalFileAttribute: getUint16(directoryView, offset + 36),\n\t\t\t\texternalFileAttribute: getUint32(directoryView, offset + 38),\n\t\t\t\trawFilename,\n\t\t\t\tfilenameUTF8,\n\t\t\t\tcommentUTF8,\n\t\t\t\trawExtraField: directoryArray.subarray(extraFieldOffset, commentOffset)\n\t\t\t});\n\t\t\tconst decode = getOptionValue(zipReader, options, \"decodeText\") || 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);\n\t\t\tif (filename === UNDEFINED_VALUE) {\n\t\t\t\tfilename = decodeText(rawFilename, rawFilenameEncoding);\n\t\t\t}\n\t\t\tlet comment = decode(rawComment, rawCommentEncoding);\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\trawComment,\n\t\t\t\tfilename,\n\t\t\t\tcomment,\n\t\t\t\tdirectory: directory || filename.endsWith(DIRECTORY_SIGNATURE)\n\t\t\t});\n\t\t\tstartOffset = Math.max(offsetFileEntry, startOffset);\n\t\t\tawait readCommonFooter(fileEntry, fileEntry, directoryView, offset + 6);\n\t\t\tconst entry = new Entry(fileEntry);\n\t\t\tentry.getData = (writer, options) => fileEntry.getData(writer, entry, options);\n\t\t\toffset = endOffset;\n\t\t\tconst { onprogress } = options;\n\t\t\tif (onprogress) {\n\t\t\t\ttry {\n\t\t\t\t\tawait onprogress(indexFile + 1, filesLength, new Entry(fileEntry));\n\t\t\t\t} catch (_error) {\n\t\t\t\t\t// ignored\n\t\t\t\t}\n\t\t\t}\n\t\t\tyield entry;\n\t\t}\n\t\tconst extractPrependedData = getOptionValue(zipReader, options, \"extractPrependedData\");\n\t\tconst extractAppendedData = getOptionValue(zipReader, options, \"extractAppendedData\");\n\t\tif (extractPrependedData) {\n\t\t\tzipReader.prependedData = startOffset > 0 ? await readUint8Array(reader, 0, startOffset) : new Uint8Array();\n\t\t}\n\t\tzipReader.comment = commentLength ? await readUint8Array(reader, commentOffset + END_OF_CENTRAL_DIR_LENGTH, commentLength) : new Uint8Array();\n\t\tif (extractAppendedData) {\n\t\t\tzipReader.appendedData = appendedDataOffset < reader.size ? await readUint8Array(reader, appendedDataOffset, reader.size - appendedDataOffset) : new Uint8Array();\n\t\t}\n\t\treturn true;\n\t}\n\n\tasync getEntries(options = {}) {\n\t\tconst entries = [];\n\t\tfor await (const entry of this.getEntriesGenerator(options)) {\n\t\t\tentries.push(entry);\n\t\t}\n\t\treturn entries;\n\t}\n\n\tasync close() {\n\t}\n}\n\nclass ZipReaderStream {\n\n\tconstructor(options = {}) {\n\t\tconst { readable, writable } = new TransformStream();\n\t\tconst gen = new ZipReader(readable, options).getEntriesGenerator();\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 chunk = {\n\t\t\t\t\t...value,\n\t\t\t\t\treadable: (function () {\n\t\t\t\t\t\tconst { readable, writable } = new TransformStream();\n\t\t\t\t\t\tif (value.getData) {\n\t\t\t\t\t\t\tvalue.getData(writable);\n\t\t\t\t\t\t\treturn readable;\n\t\t\t\t\t\t}\n\t\t\t\t\t})()\n\t\t\t\t};\n\t\t\t\tdelete chunk.getData;\n\t\t\t\tcontroller.enqueue(chunk);\n\t\t\t}\n\t\t});\n\t\tthis.writable = writable;\n\t}\n}\n\nexport {\n\tZipReader,\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_SIGNATURE,\n\tERR_INVALID_PASSWORD,\n\tERR_SPLIT_ZIP_FILE\n};\n\nclass ZipEntry {\n\n\tconstructor(reader, config, options) {\n\t\tObject.assign(this, {\n\t\t\treader,\n\t\t\tconfig,\n\t\t\toptions\n\t\t});\n\t}\n\n\tasync getData(writer, fileEntry, options = {}) {\n\t\tconst zipEntry = this;\n\t\tconst {\n\t\t\treader,\n\t\t\toffset,\n\t\t\tdiskNumberStart,\n\t\t\textraFieldAES,\n\t\t\tcompressionMethod,\n\t\t\tconfig,\n\t\t\tbitFlag,\n\t\t\tsignature,\n\t\t\trawLastModDate,\n\t\t\tuncompressedSize,\n\t\t\tcompressedSize\n\t\t} = zipEntry;\n\t\tconst localDirectory = fileEntry.localDirectory = {};\n\t\tconst dataArray = await readUint8Array(reader, offset, 30, diskNumberStart);\n\t\tconst dataView = getDataView(dataArray);\n\t\tlet password = getOptionValue(zipEntry, options, \"password\");\n\t\tlet rawPassword = getOptionValue(zipEntry, options, \"rawPassword\");\n\t\tpassword = password && password.length && password;\n\t\trawPassword = rawPassword && rawPassword.length && rawPassword;\n\t\tif (extraFieldAES) {\n\t\t\tif (extraFieldAES.originalCompressionMethod != COMPRESSION_METHOD_AES) {\n\t\t\t\tthrow new Error(ERR_UNSUPPORTED_COMPRESSION);\n\t\t\t}\n\t\t}\n\t\tif (compressionMethod != COMPRESSION_METHOD_STORE && compressionMethod != COMPRESSION_METHOD_DEFLATE) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_COMPRESSION);\n\t\t}\n\t\tif (getUint32(dataView, 0) != LOCAL_FILE_HEADER_SIGNATURE) {\n\t\t\tthrow new Error(ERR_LOCAL_FILE_HEADER_NOT_FOUND);\n\t\t}\n\t\treadCommonHeader(localDirectory, dataView, 4);\n\t\tlocalDirectory.rawExtraField = localDirectory.extraFieldLength ?\n\t\t\tawait readUint8Array(reader, offset + 30 + localDirectory.filenameLength, localDirectory.extraFieldLength, diskNumberStart) :\n\t\t\tnew Uint8Array();\n\t\tawait readCommonFooter(zipEntry, localDirectory, dataView, 4, true);\n\t\tObject.assign(fileEntry, {\n\t\t\tlastAccessDate: localDirectory.lastAccessDate,\n\t\t\tcreationDate: localDirectory.creationDate\n\t\t});\n\t\tconst encrypted = zipEntry.encrypted && localDirectory.encrypted;\n\t\tconst zipCrypto = encrypted && !extraFieldAES;\n\t\tif (encrypted) {\n\t\t\tif (!zipCrypto && extraFieldAES.strength === UNDEFINED_VALUE) {\n\t\t\t\tthrow new Error(ERR_UNSUPPORTED_ENCRYPTION);\n\t\t\t} else if (!password && !rawPassword) {\n\t\t\t\tthrow new Error(ERR_ENCRYPTED);\n\t\t\t}\n\t\t}\n\t\tconst dataOffset = offset + 30 + localDirectory.filenameLength + localDirectory.extraFieldLength;\n\t\tconst size = compressedSize;\n\t\tconst readable = reader.readable;\n\t\tObject.assign(readable, {\n\t\t\tdiskNumberStart,\n\t\t\toffset: dataOffset,\n\t\t\tsize\n\t\t});\n\t\tconst signal = getOptionValue(zipEntry, options, \"signal\");\n\t\tconst checkPasswordOnly = getOptionValue(zipEntry, options, \"checkPasswordOnly\");\n\t\tif (checkPasswordOnly) {\n\t\t\twriter = new WritableStream();\n\t\t}\n\t\twriter = initWriter(writer);\n\t\tawait initStream(writer, uncompressedSize);\n\t\tconst { writable } = writer;\n\t\tconst { onstart, onprogress, onend } = options;\n\t\tconst workerOptions = {\n\t\t\toptions: {\n\t\t\t\tcodecType: CODEC_INFLATE,\n\t\t\t\tpassword,\n\t\t\t\trawPassword,\n\t\t\t\tzipCrypto,\n\t\t\t\tencryptionStrength: extraFieldAES && extraFieldAES.strength,\n\t\t\t\tsigned: getOptionValue(zipEntry, options, \"checkSignature\"),\n\t\t\t\tpasswordVerification: zipCrypto && (bitFlag.dataDescriptor ? ((rawLastModDate >>> 8) & 0xFF) : ((signature >>> 24) & 0xFF)),\n\t\t\t\tsignature,\n\t\t\t\tcompressed: compressionMethod != 0,\n\t\t\t\tencrypted,\n\t\t\t\tuseWebWorkers: getOptionValue(zipEntry, options, \"useWebWorkers\"),\n\t\t\t\tuseCompressionStream: getOptionValue(zipEntry, options, \"useCompressionStream\"),\n\t\t\t\ttransferStreams: getOptionValue(zipEntry, options, \"transferStreams\"),\n\t\t\t\tcheckPasswordOnly\n\t\t\t},\n\t\t\tconfig,\n\t\t\tstreamOptions: { signal, size, onstart, onprogress, onend }\n\t\t};\n\t\tlet outputSize = 0;\n\t\ttry {\n\t\t\t({ outputSize } = (await runWorker({ readable, writable }, workerOptions)));\n\t\t} catch (error) {\n\t\t\tif (!checkPasswordOnly || error.message != ERR_ABORT_CHECK_PASSWORD) {\n\t\t\t\tthrow error;\n\t\t\t}\n\t\t} finally {\n\t\t\tconst preventClose = getOptionValue(zipEntry, options, \"preventClose\");\n\t\t\twritable.size += outputSize;\n\t\t\tif (!preventClose && !writable.locked) {\n\t\t\t\tawait writable.getWriter().close();\n\t\t\t}\n\t\t}\n\t\treturn checkPasswordOnly ? UNDEFINED_VALUE : writer.getData ? writer.getData() : writable;\n\t}\n}\n\nfunction readCommonHeader(directory, dataView, offset) {\n\tconst rawBitFlag = directory.rawBitFlag = getUint16(dataView, offset + 2);\n\tconst encrypted = (rawBitFlag & BITFLAG_ENCRYPTED) == BITFLAG_ENCRYPTED;\n\tconst rawLastModDate = getUint32(dataView, offset + 6);\n\tObject.assign(directory, {\n\t\tencrypted,\n\t\tversion: getUint16(dataView, offset),\n\t\tbitFlag: {\n\t\t\tlevel: (rawBitFlag & BITFLAG_LEVEL) >> 1,\n\t\t\tdataDescriptor: (rawBitFlag & BITFLAG_DATA_DESCRIPTOR) == BITFLAG_DATA_DESCRIPTOR,\n\t\t\tlanguageEncodingFlag: (rawBitFlag & BITFLAG_LANG_ENCODING_FLAG) == BITFLAG_LANG_ENCODING_FLAG\n\t\t},\n\t\trawLastModDate,\n\t\tlastModDate: getDate(rawLastModDate),\n\t\tfilenameLength: getUint16(dataView, offset + 22),\n\t\textraFieldLength: getUint16(dataView, offset + 24)\n\t});\n}\n\nasync function readCommonFooter(fileEntry, directory, dataView, offset, localDirectory) {\n\tconst { rawExtraField } = directory;\n\tconst extraField = directory.extraField = new Map();\n\tconst rawExtraFieldView = getDataView(new Uint8Array(rawExtraField));\n\tlet offsetExtraField = 0;\n\ttry {\n\t\twhile (offsetExtraField < rawExtraField.length) {\n\t\t\tconst type = getUint16(rawExtraFieldView, offsetExtraField);\n\t\t\tconst size = getUint16(rawExtraFieldView, offsetExtraField + 2);\n\t\t\textraField.set(type, {\n\t\t\t\ttype,\n\t\t\t\tdata: rawExtraField.slice(offsetExtraField + 4, offsetExtraField + 4 + size)\n\t\t\t});\n\t\t\toffsetExtraField += 4 + size;\n\t\t}\n\t} catch (_error) {\n\t\t// ignored\n\t}\n\tconst compressionMethod = getUint16(dataView, offset + 4);\n\tObject.assign(directory, {\n\t\tsignature: getUint32(dataView, offset + 10),\n\t\tuncompressedSize: getUint32(dataView, offset + 18),\n\t\tcompressedSize: getUint32(dataView, offset + 14)\n\t});\n\tconst extraFieldZip64 = extraField.get(EXTRAFIELD_TYPE_ZIP64);\n\tif (extraFieldZip64) {\n\t\treadExtraFieldZip64(extraFieldZip64, directory);\n\t\tdirectory.extraFieldZip64 = extraFieldZip64;\n\t}\n\tconst extraFieldUnicodePath = extraField.get(EXTRAFIELD_TYPE_UNICODE_PATH);\n\tif (extraFieldUnicodePath) {\n\t\tawait readExtraFieldUnicode(extraFieldUnicodePath, PROPERTY_NAME_FILENAME, PROPERTY_NAME_RAW_FILENAME, directory, fileEntry);\n\t\tdirectory.extraFieldUnicodePath = extraFieldUnicodePath;\n\t}\n\tconst extraFieldUnicodeComment = extraField.get(EXTRAFIELD_TYPE_UNICODE_COMMENT);\n\tif (extraFieldUnicodeComment) {\n\t\tawait readExtraFieldUnicode(extraFieldUnicodeComment, PROPERTY_NAME_COMMENT, PROPERTY_NAME_RAW_COMMENT, directory, fileEntry);\n\t\tdirectory.extraFieldUnicodeComment = extraFieldUnicodeComment;\n\t}\n\tconst extraFieldAES = extraField.get(EXTRAFIELD_TYPE_AES);\n\tif (extraFieldAES) {\n\t\treadExtraFieldAES(extraFieldAES, directory, compressionMethod);\n\t\tdirectory.extraFieldAES = extraFieldAES;\n\t} else {\n\t\tdirectory.compressionMethod = compressionMethod;\n\t}\n\tconst extraFieldNTFS = extraField.get(EXTRAFIELD_TYPE_NTFS);\n\tif (extraFieldNTFS) {\n\t\treadExtraFieldNTFS(extraFieldNTFS, directory);\n\t\tdirectory.extraFieldNTFS = extraFieldNTFS;\n\t}\n\tconst extraFieldExtendedTimestamp = extraField.get(EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP);\n\tif (extraFieldExtendedTimestamp) {\n\t\treadExtraFieldExtendedTimestamp(extraFieldExtendedTimestamp, directory, 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}\n\nfunction readExtraFieldZip64(extraFieldZip64, directory) {\n\tdirectory.zip64 = true;\n\tconst extraFieldView = getDataView(extraFieldZip64.data);\n\tconst missingProperties = ZIP64_PROPERTIES.filter(([propertyName, max]) => directory[propertyName] == max);\n\tfor (let indexMissingProperty = 0, offset = 0; indexMissingProperty < missingProperties.length; indexMissingProperty++) {\n\t\tconst [propertyName, max] = missingProperties[indexMissingProperty];\n\t\tif (directory[propertyName] == max) {\n\t\t\tconst extraction = ZIP64_EXTRACTION[max];\n\t\t\tdirectory[propertyName] = extraFieldZip64[propertyName] = extraction.getValue(extraFieldView, offset);\n\t\t\toffset += extraction.bytes;\n\t\t} else if (extraFieldZip64[propertyName]) {\n\t\t\tthrow new Error(ERR_EXTRAFIELD_ZIP64_NOT_FOUND);\n\t\t}\n\t}\n}\n\nasync function readExtraFieldUnicode(extraFieldUnicode, propertyName, rawPropertyName, directory, fileEntry) {\n\tconst extraFieldView = getDataView(extraFieldUnicode.data);\n\tconst crc32 = new Crc32();\n\tcrc32.append(fileEntry[rawPropertyName]);\n\tconst dataViewSignature = getDataView(new Uint8Array(4));\n\tdataViewSignature.setUint32(0, crc32.get(), true);\n\tconst signature = getUint32(extraFieldView, 1);\n\tObject.assign(extraFieldUnicode, {\n\t\tversion: getUint8(extraFieldView, 0),\n\t\t[propertyName]: decodeText(extraFieldUnicode.data.subarray(5)),\n\t\tvalid: !fileEntry.bitFlag.languageEncodingFlag && signature == getUint32(dataViewSignature, 0)\n\t});\n\tif (extraFieldUnicode.valid) {\n\t\tdirectory[propertyName] = extraFieldUnicode[propertyName];\n\t\tdirectory[propertyName + \"UTF8\"] = true;\n\t}\n}\n\nfunction readExtraFieldAES(extraFieldAES, directory, compressionMethod) {\n\tconst extraFieldView = getDataView(extraFieldAES.data);\n\tconst strength = getUint8(extraFieldView, 4);\n\tObject.assign(extraFieldAES, {\n\t\tvendorVersion: getUint8(extraFieldView, 0),\n\t\tvendorId: getUint8(extraFieldView, 2),\n\t\tstrength,\n\t\toriginalCompressionMethod: compressionMethod,\n\t\tcompressionMethod: getUint16(extraFieldView, 5)\n\t});\n\tdirectory.compressionMethod = extraFieldAES.compressionMethod;\n}\n\nfunction readExtraFieldNTFS(extraFieldNTFS, directory) {\n\tconst extraFieldView = getDataView(extraFieldNTFS.data);\n\tlet offsetExtraField = 4;\n\tlet tag1Data;\n\ttry {\n\t\twhile (offsetExtraField < extraFieldNTFS.data.length && !tag1Data) {\n\t\t\tconst tagValue = getUint16(extraFieldView, offsetExtraField);\n\t\t\tconst attributeSize = getUint16(extraFieldView, offsetExtraField + 2);\n\t\t\tif (tagValue == EXTRAFIELD_TYPE_NTFS_TAG1) {\n\t\t\t\ttag1Data = extraFieldNTFS.data.slice(offsetExtraField + 4, offsetExtraField + 4 + attributeSize);\n\t\t\t}\n\t\t\toffsetExtraField += 4 + attributeSize;\n\t\t}\n\t} catch (_error) {\n\t\t// ignored\n\t}\n\ttry {\n\t\tif (tag1Data && tag1Data.length == 24) {\n\t\t\tconst tag1View = getDataView(tag1Data);\n\t\t\tconst rawLastModDate = tag1View.getBigUint64(0, true);\n\t\t\tconst rawLastAccessDate = tag1View.getBigUint64(8, true);\n\t\t\tconst rawCreationDate = tag1View.getBigUint64(16, true);\n\t\t\tObject.assign(extraFieldNTFS, {\n\t\t\t\trawLastModDate,\n\t\t\t\trawLastAccessDate,\n\t\t\t\trawCreationDate\n\t\t\t});\n\t\t\tconst lastModDate = getDateNTFS(rawLastModDate);\n\t\t\tconst lastAccessDate = getDateNTFS(rawLastAccessDate);\n\t\t\tconst creationDate = getDateNTFS(rawCreationDate);\n\t\t\tconst extraFieldData = { lastModDate, lastAccessDate, creationDate };\n\t\t\tObject.assign(extraFieldNTFS, extraFieldData);\n\t\t\tObject.assign(directory, extraFieldData);\n\t\t}\n\t} catch (_error) {\n\t\t// ignored\n\t}\n}\n\nfunction readExtraFieldExtendedTimestamp(extraFieldExtendedTimestamp, directory, localDirectory) {\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 * 1000);\n\t\t\tconst rawPropertyName = timeRawProperties[indexProperty];\n\t\t\textraFieldExtendedTimestamp[rawPropertyName] = time;\n\t\t}\n\t\toffset += 4;\n\t});\n}\n\nasync function seekSignature(reader, signature, startOffset, minimumBytes, maximumLength) {\n\tconst signatureArray = new Uint8Array(4);\n\tconst signatureView = getDataView(signatureArray);\n\tsetUint32(signatureView, 0, signature);\n\tconst maximumBytes = minimumBytes + maximumLength;\n\treturn (await seek(minimumBytes)) || await seek(Math.min(maximumBytes, startOffset));\n\n\tasync function seek(length) {\n\t\tconst offset = startOffset - length;\n\t\tconst bytes = await readUint8Array(reader, offset, length);\n\t\tfor (let indexByte = bytes.length - minimumBytes; indexByte >= 0; indexByte--) {\n\t\t\tif (bytes[indexByte] == signatureArray[0] && bytes[indexByte + 1] == signatureArray[1] &&\n\t\t\t\tbytes[indexByte + 2] == signatureArray[2] && bytes[indexByte + 3] == signatureArray[3]) {\n\t\t\t\treturn {\n\t\t\t\t\toffset: offset + indexByte,\n\t\t\t\t\tbuffer: bytes.slice(indexByte, indexByte + minimumBytes).buffer\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction getOptionValue(zipReader, options, name) {\n\treturn options[name] === UNDEFINED_VALUE ? zipReader.options[name] : options[name];\n}\n\nfunction getDate(timeRaw) {\n\tconst date = (timeRaw & 0xffff0000) >> 16, time = timeRaw & 0x0000ffff;\n\ttry {\n\t\treturn new Date(1980 + ((date & 0xFE00) >> 9), ((date & 0x01E0) >> 5) - 1, date & 0x001F, (time & 0xF800) >> 11, (time & 0x07E0) >> 5, (time & 0x001F) * 2, 0);\n\t} catch (_error) {\n\t\t// ignored\n\t}\n}\n\nfunction getDateNTFS(timeRaw) {\n\treturn new Date((Number((timeRaw / BigInt(10000)) - BigInt(11644473600000))));\n}\n\nfunction getUint8(view, offset) {\n\treturn view.getUint8(offset);\n}\n\nfunction getUint16(view, offset) {\n\treturn view.getUint16(offset, true);\n}\n\nfunction getUint32(view, offset) {\n\treturn view.getUint32(offset, true);\n}\n\nfunction getBigUint64(view, offset) {\n\treturn Number(view.getBigUint64(offset, true));\n}\n\nfunction setUint32(view, offset, value) {\n\tview.setUint32(offset, value, true);\n}\n\nfunction getDataView(array) {\n\treturn new DataView(array.buffer);\n}\n", "/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright\n notice, this list of conditions and the following disclaimer in\n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/* global BigInt, TransformStream, Response */\n// deno-lint-ignore-file no-this-alias\n\nimport {\n\tMAX_32_BITS,\n\tMAX_16_BITS,\n\tCOMPRESSION_METHOD_DEFLATE,\n\tCOMPRESSION_METHOD_STORE,\n\tCOMPRESSION_METHOD_AES,\n\tSPLIT_ZIP_FILE_SIGNATURE,\n\tLOCAL_FILE_HEADER_SIGNATURE,\n\tDATA_DESCRIPTOR_RECORD_SIGNATURE,\n\tCENTRAL_FILE_HEADER_SIGNATURE,\n\tEND_OF_CENTRAL_DIR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE,\n\tZIP64_END_OF_CENTRAL_DIR_SIGNATURE,\n\tEXTRAFIELD_TYPE_AES,\n\tEXTRAFIELD_TYPE_ZIP64,\n\tEXTRAFIELD_TYPE_EXTENDED_TIMESTAMP,\n\tEXTRAFIELD_TYPE_NTFS,\n\tEXTRAFIELD_TYPE_NTFS_TAG1,\n\tEXTRAFIELD_TYPE_USDZ,\n\tEND_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH,\n\tZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH,\n\tBITFLAG_ENCRYPTED,\n\tBITFLAG_DATA_DESCRIPTOR,\n\tBITFLAG_LANG_ENCODING_FLAG,\n\tFILE_ATTR_MSDOS_DIR_MASK,\n\tVERSION_DEFLATE,\n\tVERSION_ZIP64,\n\tVERSION_AES,\n\tDIRECTORY_SIGNATURE,\n\tMIN_DATE,\n\tMAX_DATE,\n\tUNDEFINED_VALUE\n} from \"./constants.js\";\nimport {\n\tgetConfiguration,\n\tgetChunkSize\n} from \"./configuration.js\";\nimport {\n\tCODEC_DEFLATE,\n\trunWorker\n} from \"./codec-pool.js\";\nimport {\n\tinitStream,\n\tinitReader,\n\tinitWriter\n} from \"./io.js\";\nimport { encodeText } from \"./util/encode-text.js\";\nimport {\n\tPROPERTY_NAME_LAST_MODIFICATION_DATE,\n\tPROPERTY_NAME_LAST_ACCESS_DATE,\n\tPROPERTY_NAME_CREATION_DATE,\n\tPROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE,\n\tPROPERTY_NAME_MS_DOS_COMPATIBLE,\n\tPROPERTY_NAME_ZIP64,\n\tEntry\n} from \"./zip-entry.js\";\n\nconst ERR_DUPLICATED_NAME = \"File already exists\";\nconst ERR_INVALID_COMMENT = \"Zip file comment exceeds 64KB\";\nconst ERR_INVALID_ENTRY_COMMENT = \"File entry comment exceeds 64KB\";\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_INVALID_EXTRAFIELD_TYPE = \"Extra field type exceeds 65535\";\nconst ERR_INVALID_EXTRAFIELD_DATA = \"Extra field data exceeds 64KB\";\nconst ERR_UNSUPPORTED_FORMAT = \"Zip64 is not supported (make sure 'keepOrder' is set to 'true')\";\n\nconst EXTRAFIELD_DATA_AES = new Uint8Array([0x07, 0x00, 0x02, 0x00, 0x41, 0x45, 0x03, 0x00, 0x00]);\n\nlet workers = 0;\nconst pendingEntries = [];\n\nclass ZipWriter {\n\n\tconstructor(writer, options = {}) {\n\t\twriter = initWriter(writer);\n\t\tconst addSplitZipSignature =\n\t\t\twriter.availableSize !== UNDEFINED_VALUE && writer.availableSize > 0 && writer.availableSize !== Infinity &&\n\t\t\twriter.maxSize !== UNDEFINED_VALUE && writer.maxSize > 0 && writer.maxSize !== Infinity;\n\t\tObject.assign(this, {\n\t\t\twriter,\n\t\t\taddSplitZipSignature,\n\t\t\toptions,\n\t\t\tconfig: getConfiguration(),\n\t\t\tfiles: new Map(),\n\t\t\tfilenames: new Set(),\n\t\t\toffset: writer.writable.size,\n\t\t\tpendingEntriesSize: 0,\n\t\t\tpendingAddFileCalls: new Set(),\n\t\t\tbufferedWrites: 0\n\t\t});\n\t}\n\n\tasync add(name = \"\", reader, options = {}) {\n\t\tconst zipWriter = this;\n\t\tconst {\n\t\t\tpendingAddFileCalls,\n\t\t\tconfig\n\t\t} = zipWriter;\n\t\tif (workers < config.maxWorkers) {\n\t\t\tworkers++;\n\t\t} else {\n\t\t\tawait new Promise(resolve => pendingEntries.push(resolve));\n\t\t}\n\t\tlet promiseAddFile;\n\t\ttry {\n\t\t\tname = name.trim();\n\t\t\tif (zipWriter.filenames.has(name)) {\n\t\t\t\tthrow new Error(ERR_DUPLICATED_NAME);\n\t\t\t}\n\t\t\tzipWriter.filenames.add(name);\n\t\t\tpromiseAddFile = addFile(zipWriter, name, reader, options);\n\t\t\tpendingAddFileCalls.add(promiseAddFile);\n\t\t\treturn await promiseAddFile;\n\t\t} catch (error) {\n\t\t\tzipWriter.filenames.delete(name);\n\t\t\tthrow error;\n\t\t} finally {\n\t\t\tpendingAddFileCalls.delete(promiseAddFile);\n\t\t\tconst pendingEntry = pendingEntries.shift();\n\t\t\tif (pendingEntry) {\n\t\t\t\tpendingEntry();\n\t\t\t} else {\n\t\t\t\tworkers--;\n\t\t\t}\n\t\t}\n\t}\n\n\tasync close(comment = new Uint8Array(), options = {}) {\n\t\tconst zipWriter = this;\n\t\tconst { pendingAddFileCalls, writer } = this;\n\t\tconst { writable } = writer;\n\t\twhile (pendingAddFileCalls.size) {\n\t\t\tawait Promise.allSettled(Array.from(pendingAddFileCalls));\n\t\t}\n\t\tawait closeFile(this, comment, options);\n\t\tconst preventClose = getOptionValue(zipWriter, options, \"preventClose\");\n\t\tif (!preventClose) {\n\t\t\tawait writable.getWriter().close();\n\t\t}\n\t\treturn writer.getData ? writer.getData() : writable;\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}\n\n\ttransform(path) {\n\t\tconst { readable, writable } = new TransformStream({\n\t\t\tflush: () => { this.zipWriter.close(); }\n\t\t});\n\t\tthis.zipWriter.add(path, readable);\n\t\treturn { readable: this.readable, writable };\n\t}\n\n\twritable(path) {\n\t\tconst { readable, writable } = new TransformStream();\n\t\tthis.zipWriter.add(path, readable);\n\t\treturn writable;\n\t}\n\n\tclose(comment = undefined, options = {}) {\n\t\treturn this.zipWriter.close(comment, options);\n\t}\n}\n\nexport {\n\tZipWriter,\n\tZipWriterStream,\n\tERR_DUPLICATED_NAME,\n\tERR_INVALID_COMMENT,\n\tERR_INVALID_ENTRY_NAME,\n\tERR_INVALID_ENTRY_COMMENT,\n\tERR_INVALID_VERSION,\n\tERR_INVALID_EXTRAFIELD_TYPE,\n\tERR_INVALID_EXTRAFIELD_DATA,\n\tERR_INVALID_ENCRYPTION_STRENGTH,\n\tERR_UNSUPPORTED_FORMAT\n};\n\nasync function addFile(zipWriter, name, reader, options) {\n\tname = name.trim();\n\tif (options.directory && (!name.endsWith(DIRECTORY_SIGNATURE))) {\n\t\tname += DIRECTORY_SIGNATURE;\n\t} else {\n\t\toptions.directory = name.endsWith(DIRECTORY_SIGNATURE);\n\t}\n\tconst encode = getOptionValue(zipWriter, options, \"encodeText\", encodeText);\n\tlet rawFilename = encode(name);\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.comment || \"\";\n\tlet rawComment = encode(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, \"version\", VERSION_DEFLATE);\n\tif (version > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_VERSION);\n\t}\n\tconst versionMadeBy = getOptionValue(zipWriter, options, \"versionMadeBy\", 20);\n\tif (versionMadeBy > MAX_16_BITS) {\n\t\tthrow new Error(ERR_INVALID_VERSION);\n\t}\n\tconst lastModDate = getOptionValue(zipWriter, options, PROPERTY_NAME_LAST_MODIFICATION_DATE, new Date());\n\tconst lastAccessDate = getOptionValue(zipWriter, options, PROPERTY_NAME_LAST_ACCESS_DATE);\n\tconst creationDate = getOptionValue(zipWriter, options, PROPERTY_NAME_CREATION_DATE);\n\tconst msDosCompatible = getOptionValue(zipWriter, options, PROPERTY_NAME_MS_DOS_COMPATIBLE, true);\n\tconst internalFileAttribute = getOptionValue(zipWriter, options, PROPERTY_NAME_INTERNAL_FILE_ATTRIBUTE, 0);\n\tconst externalFileAttribute = getOptionValue(zipWriter, options, PROPERTY_NAME_EXTERNAL_FILE_ATTRIBUTE, 0);\n\tconst password = getOptionValue(zipWriter, options, \"password\");\n\tconst rawPassword = getOptionValue(zipWriter, options, \"rawPassword\");\n\tconst encryptionStrength = getOptionValue(zipWriter, options, \"encryptionStrength\", 3);\n\tconst zipCrypto = getOptionValue(zipWriter, options, \"zipCrypto\");\n\tconst extendedTimestamp = getOptionValue(zipWriter, options, \"extendedTimestamp\", true);\n\tconst keepOrder = getOptionValue(zipWriter, options, \"keepOrder\", true);\n\tconst level = getOptionValue(zipWriter, options, \"level\");\n\tconst useWebWorkers = getOptionValue(zipWriter, options, \"useWebWorkers\");\n\tconst bufferedWrite = getOptionValue(zipWriter, options, \"bufferedWrite\");\n\tconst dataDescriptorSignature = getOptionValue(zipWriter, options, \"dataDescriptorSignature\", false);\n\tconst signal = getOptionValue(zipWriter, options, \"signal\");\n\tconst useCompressionStream = getOptionValue(zipWriter, options, \"useCompressionStream\");\n\tlet dataDescriptor = getOptionValue(zipWriter, options, \"dataDescriptor\", true);\n\tlet zip64 = getOptionValue(zipWriter, options, PROPERTY_NAME_ZIP64);\n\tif (password !== UNDEFINED_VALUE && encryptionStrength !== UNDEFINED_VALUE && (encryptionStrength < 1 || encryptionStrength > 3)) {\n\t\tthrow new Error(ERR_INVALID_ENCRYPTION_STRENGTH);\n\t}\n\tlet rawExtraField = new Uint8Array();\n\tconst { extraField } = options;\n\tif (extraField) {\n\t\tlet extraFieldSize = 0;\n\t\tlet offset = 0;\n\t\textraField.forEach(data => extraFieldSize += 4 + getLength(data));\n\t\trawExtraField = new Uint8Array(extraFieldSize);\n\t\textraField.forEach((data, type) => {\n\t\t\tif (type > MAX_16_BITS) {\n\t\t\t\tthrow new Error(ERR_INVALID_EXTRAFIELD_TYPE);\n\t\t\t}\n\t\t\tif (getLength(data) > MAX_16_BITS) {\n\t\t\t\tthrow new Error(ERR_INVALID_EXTRAFIELD_DATA);\n\t\t\t}\n\t\t\tarraySet(rawExtraField, new Uint16Array([type]), offset);\n\t\t\tarraySet(rawExtraField, new Uint16Array([getLength(data)]), offset + 2);\n\t\t\tarraySet(rawExtraField, data, offset + 4);\n\t\t\toffset += 4 + getLength(data);\n\t\t});\n\t}\n\tlet maximumCompressedSize = 0;\n\tlet maximumEntrySize = 0;\n\tlet uncompressedSize = 0;\n\tconst zip64Enabled = zip64 === true;\n\tif (reader) {\n\t\treader = initReader(reader);\n\t\tawait initStream(reader);\n\t\tif (reader.size === UNDEFINED_VALUE) {\n\t\t\tdataDescriptor = true;\n\t\t\tif (zip64 || zip64 === UNDEFINED_VALUE) {\n\t\t\t\tzip64 = true;\n\t\t\t\tuncompressedSize = maximumCompressedSize = MAX_32_BITS + 1;\n\t\t\t}\n\t\t} else {\n\t\t\tuncompressedSize = reader.size;\n\t\t\tmaximumCompressedSize = getMaximumCompressedSize(uncompressedSize);\n\t\t}\n\t}\n\tconst { diskOffset, diskNumber, maxSize } = zipWriter.writer;\n\tconst zip64UncompressedSize = zip64Enabled || uncompressedSize > MAX_32_BITS;\n\tconst zip64CompressedSize = zip64Enabled || maximumCompressedSize > MAX_32_BITS;\n\tconst zip64Offset = zip64Enabled || zipWriter.offset + zipWriter.pendingEntriesSize - diskOffset > MAX_32_BITS;\n\tconst supportZip64SplitFile = getOptionValue(zipWriter, options, \"supportZip64SplitFile\", true);\n\tconst zip64DiskNumberStart = (supportZip64SplitFile && zip64Enabled) || diskNumber + Math.ceil(zipWriter.pendingEntriesSize / maxSize) > MAX_16_BITS;\n\tif (zip64Offset || zip64UncompressedSize || zip64CompressedSize || zip64DiskNumberStart) {\n\t\tif (zip64 === false || !keepOrder) {\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\toptions = Object.assign({}, options, {\n\t\trawFilename,\n\t\trawComment,\n\t\tversion,\n\t\tversionMadeBy,\n\t\tlastModDate,\n\t\tlastAccessDate,\n\t\tcreationDate,\n\t\trawExtraField,\n\t\tzip64,\n\t\tzip64UncompressedSize,\n\t\tzip64CompressedSize,\n\t\tzip64Offset,\n\t\tzip64DiskNumberStart,\n\t\tpassword,\n\t\trawPassword,\n\t\tlevel: !useCompressionStream && (zipWriter.config.CompressionStream === UNDEFINED_VALUE && zipWriter.config.CompressionStreamNative === UNDEFINED_VALUE) ? 0 : level,\n\t\tuseWebWorkers,\n\t\tencryptionStrength,\n\t\textendedTimestamp,\n\t\tzipCrypto,\n\t\tbufferedWrite,\n\t\tkeepOrder,\n\t\tdataDescriptor,\n\t\tdataDescriptorSignature,\n\t\tsignal,\n\t\tmsDosCompatible,\n\t\tinternalFileAttribute,\n\t\texternalFileAttribute,\n\t\tuseCompressionStream\n\t});\n\tconst headerInfo = getHeaderInfo(options);\n\tconst dataDescriptorInfo = getDataDescriptorInfo(options);\n\tconst metadataSize = getLength(headerInfo.localHeaderArray, dataDescriptorInfo.dataDescriptorArray);\n\tmaximumEntrySize = metadataSize + maximumCompressedSize;\n\tif (zipWriter.options.usdz) {\n\t\tmaximumEntrySize += maximumEntrySize + 64;\n\t}\n\tzipWriter.pendingEntriesSize += maximumEntrySize;\n\tlet fileEntry;\n\ttry {\n\t\tfileEntry = await getFileEntry(zipWriter, name, reader, { headerInfo, dataDescriptorInfo, metadataSize }, options);\n\t} finally {\n\t\tzipWriter.pendingEntriesSize -= maximumEntrySize;\n\t}\n\tObject.assign(fileEntry, { name, comment, extraField });\n\treturn new Entry(fileEntry);\n}\n\nasync function getFileEntry(zipWriter, name, reader, entryInfo, options) {\n\tconst {\n\t\tfiles,\n\t\twriter\n\t} = zipWriter;\n\tconst {\n\t\tkeepOrder,\n\t\tdataDescriptor,\n\t\tsignal\n\t} = options;\n\tconst {\n\t\theaderInfo\n\t} = entryInfo;\n\tconst { usdz } = zipWriter.options;\n\tconst previousFileEntry = Array.from(files.values()).pop();\n\tlet fileEntry = {};\n\tlet bufferedWrite;\n\tlet releaseLockWriter;\n\tlet releaseLockCurrentFileEntry;\n\tlet writingBufferedEntryData;\n\tlet writingEntryData;\n\tlet fileWriter;\n\tlet blobPromise;\n\tfiles.set(name, fileEntry);\n\ttry {\n\t\tlet lockPreviousFileEntry;\n\t\tif (keepOrder) {\n\t\t\tlockPreviousFileEntry = previousFileEntry && previousFileEntry.lock;\n\t\t\trequestLockCurrentFileEntry();\n\t\t}\n\t\tif ((options.bufferedWrite || zipWriter.writerLocked || (zipWriter.bufferedWrites && keepOrder) || !dataDescriptor) && !usdz) {\n\t\t\tfileWriter = new TransformStream();\n\t\t\tblobPromise = new Response(fileWriter.readable).blob();\n\t\t\tfileWriter.writable.size = 0;\n\t\t\tbufferedWrite = true;\n\t\t\tzipWriter.bufferedWrites++;\n\t\t\tawait initStream(writer);\n\t\t} else {\n\t\t\tfileWriter = writer;\n\t\t\tawait requestLockWriter();\n\t\t}\n\t\tawait initStream(fileWriter);\n\t\tconst { writable } = writer;\n\t\tlet { diskOffset } = writer;\n\t\tif (zipWriter.addSplitZipSignature) {\n\t\t\tdelete zipWriter.addSplitZipSignature;\n\t\t\tconst signatureArray = new Uint8Array(4);\n\t\t\tconst signatureArrayView = getDataView(signatureArray);\n\t\t\tsetUint32(signatureArrayView, 0, SPLIT_ZIP_FILE_SIGNATURE);\n\t\t\tawait writeData(writable, signatureArray);\n\t\t\tzipWriter.offset += 4;\n\t\t}\n\t\tif (usdz) {\n\t\t\tappendExtraFieldUSDZ(entryInfo, zipWriter.offset - diskOffset);\n\t\t}\n\t\tif (!bufferedWrite) {\n\t\t\tawait lockPreviousFileEntry;\n\t\t\tawait skipDiskIfNeeded(writable);\n\t\t}\n\t\tconst { diskNumber } = writer;\n\t\twritingEntryData = true;\n\t\tfileEntry.diskNumberStart = diskNumber;\n\t\tfileEntry = await createFileEntry(reader, fileWriter, fileEntry, entryInfo, zipWriter.config, options);\n\t\twritingEntryData = false;\n\t\tfiles.set(name, fileEntry);\n\t\tfileEntry.filename = name;\n\t\tif (bufferedWrite) {\n\t\t\tawait fileWriter.writable.getWriter().close();\n\t\t\tlet blob = await blobPromise;\n\t\t\tawait lockPreviousFileEntry;\n\t\t\tawait requestLockWriter();\n\t\t\twritingBufferedEntryData = true;\n\t\t\tif (!dataDescriptor) {\n\t\t\t\tblob = await writeExtraHeaderInfo(fileEntry, blob, writable, options);\n\t\t\t}\n\t\t\tawait skipDiskIfNeeded(writable);\n\t\t\tfileEntry.diskNumberStart = writer.diskNumber;\n\t\t\tdiskOffset = writer.diskOffset;\n\t\t\tawait blob.stream().pipeTo(writable, { preventClose: true, preventAbort: true, signal });\n\t\t\twritable.size += blob.size;\n\t\t\twritingBufferedEntryData = false;\n\t\t}\n\t\tfileEntry.offset = zipWriter.offset - diskOffset;\n\t\tif (fileEntry.zip64) {\n\t\t\tsetZip64ExtraInfo(fileEntry, options);\n\t\t} else if (fileEntry.offset > MAX_32_BITS) {\n\t\t\tthrow new Error(ERR_UNSUPPORTED_FORMAT);\n\t\t}\n\t\tzipWriter.offset += fileEntry.size;\n\t\treturn fileEntry;\n\t} catch (error) {\n\t\tif ((bufferedWrite && writingBufferedEntryData) || (!bufferedWrite && 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 (_error) {\n\t\t\t\t\t// ignored\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (bufferedWrite) {\n\t\t\t\tzipWriter.offset += fileWriter.writable.size;\n\t\t\t} else {\n\t\t\t\tzipWriter.offset = fileWriter.writable.size;\n\t\t\t}\n\t\t}\n\t\tfiles.delete(name);\n\t\tthrow error;\n\t} finally {\n\t\tif (bufferedWrite) {\n\t\t\tzipWriter.bufferedWrites--;\n\t\t}\n\t\tif (releaseLockCurrentFileEntry) {\n\t\t\treleaseLockCurrentFileEntry();\n\t\t}\n\t\tif (releaseLockWriter) {\n\t\t\treleaseLockWriter();\n\t\t}\n\t}\n\n\tfunction requestLockCurrentFileEntry() {\n\t\tfileEntry.lock = new Promise(resolve => releaseLockCurrentFileEntry = resolve);\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(writable) {\n\t\tif (getLength(headerInfo.localHeaderArray) > writer.availableSize) {\n\t\t\twriter.availableSize = 0;\n\t\t\tawait writeData(writable, new Uint8Array());\n\t\t}\n\t}\n}\n\nasync function createFileEntry(reader, writer, { diskNumberStart, lock }, entryInfo, config, options) {\n\tconst {\n\t\theaderInfo,\n\t\tdataDescriptorInfo,\n\t\tmetadataSize\n\t} = entryInfo;\n\tconst {\n\t\tlocalHeaderArray,\n\t\theaderArray,\n\t\tlastModDate,\n\t\trawLastModDate,\n\t\tencrypted,\n\t\tcompressed,\n\t\tversion,\n\t\tcompressionMethod,\n\t\trawExtraFieldExtendedTimestamp,\n\t\textraFieldExtendedTimestampFlag,\n\t\trawExtraFieldNTFS,\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\tzip64,\n\t\tzip64UncompressedSize,\n\t\tzip64CompressedSize,\n\t\tzip64Offset,\n\t\tzip64DiskNumberStart,\n\t\tzipCrypto,\n\t\tdataDescriptor,\n\t\tdirectory,\n\t\tversionMadeBy,\n\t\trawComment,\n\t\trawExtraField,\n\t\tuseWebWorkers,\n\t\tonstart,\n\t\tonprogress,\n\t\tonend,\n\t\tsignal,\n\t\tencryptionStrength,\n\t\textendedTimestamp,\n\t\tmsDosCompatible,\n\t\tinternalFileAttribute,\n\t\texternalFileAttribute,\n\t\tuseCompressionStream\n\t} = options;\n\tconst fileEntry = {\n\t\tlock,\n\t\tversionMadeBy,\n\t\tzip64,\n\t\tdirectory: Boolean(directory),\n\t\tfilenameUTF8: true,\n\t\trawFilename,\n\t\tcommentUTF8: true,\n\t\trawComment,\n\t\trawExtraFieldExtendedTimestamp,\n\t\trawExtraFieldNTFS,\n\t\trawExtraFieldAES,\n\t\trawExtraField,\n\t\textendedTimestamp,\n\t\tmsDosCompatible,\n\t\tinternalFileAttribute,\n\t\texternalFileAttribute,\n\t\tdiskNumberStart\n\t};\n\tlet compressedSize = 0;\n\tlet uncompressedSize = 0;\n\tlet signature;\n\tconst { writable } = writer;\n\tif (reader) {\n\t\treader.chunkSize = getChunkSize(config);\n\t\tawait writeData(writable, localHeaderArray);\n\t\tconst readable = reader.readable;\n\t\tconst size = readable.size = reader.size;\n\t\tconst workerOptions = {\n\t\t\toptions: {\n\t\t\t\tcodecType: CODEC_DEFLATE,\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) & 0xFF,\n\t\t\t\tsigned: true,\n\t\t\t\tcompressed,\n\t\t\t\tencrypted,\n\t\t\t\tuseWebWorkers,\n\t\t\t\tuseCompressionStream,\n\t\t\t\ttransferStreams: false\n\t\t\t},\n\t\t\tconfig,\n\t\t\tstreamOptions: { signal, size, onstart, onprogress, onend }\n\t\t};\n\t\tconst result = await runWorker({ readable, writable }, workerOptions);\n\t\tuncompressedSize = result.inputSize;\n\t\tcompressedSize = result.outputSize;\n\t\tsignature = result.signature;\n\t\twritable.size += uncompressedSize;\n\t} else {\n\t\tawait writeData(writable, localHeaderArray);\n\t}\n\tlet rawExtraFieldZip64;\n\tif (zip64) {\n\t\tlet rawExtraFieldZip64Length = 4;\n\t\tif (zip64UncompressedSize) {\n\t\t\trawExtraFieldZip64Length += 8;\n\t\t}\n\t\tif (zip64CompressedSize) {\n\t\t\trawExtraFieldZip64Length += 8;\n\t\t}\n\t\tif (zip64Offset) {\n\t\t\trawExtraFieldZip64Length += 8;\n\t\t}\n\t\tif (zip64DiskNumberStart) {\n\t\t\trawExtraFieldZip64Length += 4;\n\t\t}\n\t\trawExtraFieldZip64 = new Uint8Array(rawExtraFieldZip64Length);\n\t} else {\n\t\trawExtraFieldZip64 = new Uint8Array();\n\t}\n\tsetEntryInfo({\n\t\tsignature,\n\t\trawExtraFieldZip64,\n\t\tcompressedSize,\n\t\tuncompressedSize,\n\t\theaderInfo,\n\t\tdataDescriptorInfo\n\t}, options);\n\tif (dataDescriptor) {\n\t\tawait writeData(writable, 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,\n\t\tsize: metadataSize + compressedSize,\n\t\tcompressionMethod,\n\t\tversion,\n\t\theaderArray,\n\t\tsignature,\n\t\trawExtraFieldZip64,\n\t\textraFieldExtendedTimestampFlag,\n\t\tzip64UncompressedSize,\n\t\tzip64CompressedSize,\n\t\tzip64Offset,\n\t\tzip64DiskNumberStart\n\t});\n\treturn fileEntry;\n}\n\nfunction getHeaderInfo(options) {\n\tconst {\n\t\trawFilename,\n\t\tlastModDate,\n\t\tlastAccessDate,\n\t\tcreationDate,\n\t\trawPassword,\n\t\tpassword,\n\t\tlevel,\n\t\tzip64,\n\t\tzipCrypto,\n\t\tdataDescriptor,\n\t\tdirectory,\n\t\trawExtraField,\n\t\tencryptionStrength,\n\t\textendedTimestamp\n\t} = options;\n\tconst compressed = level !== 0 && !directory;\n\tconst encrypted = Boolean((password && getLength(password)) || (rawPassword && getLength(rawPassword)));\n\tlet version = options.version;\n\tlet rawExtraFieldAES;\n\tif (encrypted && !zipCrypto) {\n\t\trawExtraFieldAES = new Uint8Array(getLength(EXTRAFIELD_DATA_AES) + 2);\n\t\tconst extraFieldAESView = getDataView(rawExtraFieldAES);\n\t\tsetUint16(extraFieldAESView, 0, EXTRAFIELD_TYPE_AES);\n\t\tarraySet(rawExtraFieldAES, EXTRAFIELD_DATA_AES, 2);\n\t\tsetUint8(extraFieldAESView, 8, encryptionStrength);\n\t} else {\n\t\trawExtraFieldAES = new Uint8Array();\n\t}\n\tlet rawExtraFieldNTFS;\n\tlet rawExtraFieldExtendedTimestamp;\n\tlet extraFieldExtendedTimestampFlag;\n\tif (extendedTimestamp) {\n\t\trawExtraFieldExtendedTimestamp = new Uint8Array(9 + (lastAccessDate ? 4 : 0) + (creationDate ? 4 : 0));\n\t\tconst extraFieldExtendedTimestampView = getDataView(rawExtraFieldExtendedTimestamp);\n\t\tsetUint16(extraFieldExtendedTimestampView, 0, EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP);\n\t\tsetUint16(extraFieldExtendedTimestampView, 2, getLength(rawExtraFieldExtendedTimestamp) - 4);\n\t\textraFieldExtendedTimestampFlag = 0x1 + (lastAccessDate ? 0x2 : 0) + (creationDate ? 0x4 : 0);\n\t\tsetUint8(extraFieldExtendedTimestampView, 4, extraFieldExtendedTimestampFlag);\n\t\tlet offset = 5;\n\t\tsetUint32(extraFieldExtendedTimestampView, offset, Math.floor(lastModDate.getTime() / 1000));\n\t\toffset += 4;\n\t\tif (lastAccessDate) {\n\t\t\tsetUint32(extraFieldExtendedTimestampView, offset, Math.floor(lastAccessDate.getTime() / 1000));\n\t\t\toffset += 4;\n\t\t}\n\t\tif (creationDate) {\n\t\t\tsetUint32(extraFieldExtendedTimestampView, offset, Math.floor(creationDate.getTime() / 1000));\n\t\t}\n\t\ttry {\n\t\t\trawExtraFieldNTFS = new Uint8Array(36);\n\t\t\tconst extraFieldNTFSView = getDataView(rawExtraFieldNTFS);\n\t\t\tconst lastModTimeNTFS = getTimeNTFS(lastModDate);\n\t\t\tsetUint16(extraFieldNTFSView, 0, EXTRAFIELD_TYPE_NTFS);\n\t\t\tsetUint16(extraFieldNTFSView, 2, 32);\n\t\t\tsetUint16(extraFieldNTFSView, 8, EXTRAFIELD_TYPE_NTFS_TAG1);\n\t\t\tsetUint16(extraFieldNTFSView, 10, 24);\n\t\t\tsetBigUint64(extraFieldNTFSView, 12, lastModTimeNTFS);\n\t\t\tsetBigUint64(extraFieldNTFSView, 20, getTimeNTFS(lastAccessDate) || lastModTimeNTFS);\n\t\t\tsetBigUint64(extraFieldNTFSView, 28, getTimeNTFS(creationDate) || lastModTimeNTFS);\n\t\t} catch (_error) {\n\t\t\trawExtraFieldNTFS = new Uint8Array();\n\t\t}\n\t} else {\n\t\trawExtraFieldNTFS = rawExtraFieldExtendedTimestamp = new Uint8Array();\n\t}\n\tlet bitFlag = BITFLAG_LANG_ENCODING_FLAG;\n\tif (dataDescriptor) {\n\t\tbitFlag = bitFlag | BITFLAG_DATA_DESCRIPTOR;\n\t}\n\tlet compressionMethod = COMPRESSION_METHOD_STORE;\n\tif (compressed) {\n\t\tcompressionMethod = COMPRESSION_METHOD_DEFLATE;\n\t}\n\tif (zip64) {\n\t\tversion = version > VERSION_ZIP64 ? version : VERSION_ZIP64;\n\t}\n\tif (encrypted) {\n\t\tbitFlag = bitFlag | BITFLAG_ENCRYPTED;\n\t\tif (!zipCrypto) {\n\t\t\tversion = version > VERSION_AES ? version : VERSION_AES;\n\t\t\tcompressionMethod = COMPRESSION_METHOD_AES;\n\t\t\tif (compressed) {\n\t\t\t\trawExtraFieldAES[9] = COMPRESSION_METHOD_DEFLATE;\n\t\t\t}\n\t\t}\n\t}\n\tconst headerArray = new Uint8Array(26);\n\tconst headerView = getDataView(headerArray);\n\tsetUint16(headerView, 0, version);\n\tsetUint16(headerView, 2, bitFlag);\n\tsetUint16(headerView, 4, compressionMethod);\n\tconst dateArray = new Uint32Array(1);\n\tconst dateView = getDataView(dateArray);\n\tlet lastModDateMsDos;\n\tif (lastModDate < MIN_DATE) {\n\t\tlastModDateMsDos = MIN_DATE;\n\t} else if (lastModDate > MAX_DATE) {\n\t\tlastModDateMsDos = MAX_DATE;\n\t} else {\n\t\tlastModDateMsDos = lastModDate;\n\t}\n\tsetUint16(dateView, 0, (((lastModDateMsDos.getHours() << 6) | lastModDateMsDos.getMinutes()) << 5) | lastModDateMsDos.getSeconds() / 2);\n\tsetUint16(dateView, 2, ((((lastModDateMsDos.getFullYear() - 1980) << 4) | (lastModDateMsDos.getMonth() + 1)) << 5) | lastModDateMsDos.getDate());\n\tconst rawLastModDate = dateArray[0];\n\tsetUint32(headerView, 6, rawLastModDate);\n\tsetUint16(headerView, 22, getLength(rawFilename));\n\tconst extraFieldLength = getLength(rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS, rawExtraField);\n\tsetUint16(headerView, 24, extraFieldLength);\n\tconst localHeaderArray = new Uint8Array(30 + getLength(rawFilename) + extraFieldLength);\n\tconst localHeaderView = getDataView(localHeaderArray);\n\tsetUint32(localHeaderView, 0, LOCAL_FILE_HEADER_SIGNATURE);\n\tarraySet(localHeaderArray, headerArray, 4);\n\tarraySet(localHeaderArray, rawFilename, 30);\n\tarraySet(localHeaderArray, rawExtraFieldAES, 30 + getLength(rawFilename));\n\tarraySet(localHeaderArray, rawExtraFieldExtendedTimestamp, 30 + getLength(rawFilename, rawExtraFieldAES));\n\tarraySet(localHeaderArray, rawExtraFieldNTFS, 30 + getLength(rawFilename, rawExtraFieldAES, rawExtraFieldExtendedTimestamp));\n\tarraySet(localHeaderArray, rawExtraField, 30 + getLength(rawFilename, rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS));\n\treturn {\n\t\tlocalHeaderArray,\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\textraFieldExtendedTimestampFlag,\n\t\trawExtraFieldExtendedTimestamp,\n\t\trawExtraFieldNTFS,\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 localHeaderArrayView = getDataView(localHeaderArray);\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 - 2);\n\tconst previousLocalHeaderArray = localHeaderArray;\n\theaderInfo.localHeaderArray = localHeaderArray = new Uint8Array(getLength(previousLocalHeaderArray) + extraBytesLength);\n\tarraySet(localHeaderArray, previousLocalHeaderArray);\n\tarraySet(localHeaderArray, rawExtraFieldUSDZ, getLength(previousLocalHeaderArray));\n\tlocalHeaderArrayView = getDataView(localHeaderArray);\n\tsetUint16(localHeaderArrayView, 28, extraFieldLength + extraBytesLength);\n\tentryInfo.metadataSize += extraBytesLength;\n}\n\nfunction getDataDescriptorInfo(options) {\n\tconst {\n\t\tzip64,\n\t\tdataDescriptor,\n\t\tdataDescriptorSignature\n\t} = options;\n\tlet dataDescriptorArray = new Uint8Array();\n\tlet dataDescriptorView, dataDescriptorOffset = 0;\n\tif (dataDescriptor) {\n\t\tdataDescriptorArray = new Uint8Array(zip64 ? (dataDescriptorSignature ? 24 : 20) : (dataDescriptorSignature ? 16 : 12));\n\t\tdataDescriptorView = getDataView(dataDescriptorArray);\n\t\tif (dataDescriptorSignature) {\n\t\t\tdataDescriptorOffset = 4;\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(entryInfo, options) {\n\tconst {\n\t\tsignature,\n\t\trawExtraFieldZip64,\n\t\tcompressedSize,\n\t\tuncompressedSize,\n\t\theaderInfo,\n\t\tdataDescriptorInfo\n\t} = entryInfo;\n\tconst {\n\t\theaderView,\n\t\tencrypted\n\t} = headerInfo;\n\tconst {\n\t\tdataDescriptorView,\n\t\tdataDescriptorOffset\n\t} = dataDescriptorInfo;\n\tconst {\n\t\tzip64,\n\t\tzip64UncompressedSize,\n\t\tzip64CompressedSize,\n\t\tzipCrypto,\n\t\tdataDescriptor\n\t} = options;\n\tif ((!encrypted || zipCrypto) && signature !== UNDEFINED_VALUE) {\n\t\tsetUint32(headerView, 10, signature);\n\t\tif (dataDescriptor) {\n\t\t\tsetUint32(dataDescriptorView, dataDescriptorOffset, signature);\n\t\t}\n\t}\n\tif (zip64) {\n\t\tconst rawExtraFieldZip64View = getDataView(rawExtraFieldZip64);\n\t\tsetUint16(rawExtraFieldZip64View, 0, EXTRAFIELD_TYPE_ZIP64);\n\t\tsetUint16(rawExtraFieldZip64View, 2, getLength(rawExtraFieldZip64) - 4);\n\t\tlet rawExtraFieldZip64Offset = 4;\n\t\tif (zip64UncompressedSize) {\n\t\t\tsetUint32(headerView, 18, MAX_32_BITS);\n\t\t\tsetBigUint64(rawExtraFieldZip64View, rawExtraFieldZip64Offset, BigInt(uncompressedSize));\n\t\t\trawExtraFieldZip64Offset += 8;\n\t\t}\n\t\tif (zip64CompressedSize) {\n\t\t\tsetUint32(headerView, 14, MAX_32_BITS);\n\t\t\tsetBigUint64(rawExtraFieldZip64View, rawExtraFieldZip64Offset, BigInt(compressedSize));\n\t\t}\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, 14, compressedSize);\n\t\tsetUint32(headerView, 18, 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\nasync function writeExtraHeaderInfo(fileEntry, entryData, writable, { zipCrypto }) {\n\tlet arrayBuffer;\n\tarrayBuffer = await entryData.slice(0, 26).arrayBuffer();\n\tif (arrayBuffer.byteLength != 26) {\n\t\tarrayBuffer = arrayBuffer.slice(0, 26);\n\t}\n\tconst arrayBufferView = new DataView(arrayBuffer);\n\tif (!fileEntry.encrypted || zipCrypto) {\n\t\tsetUint32(arrayBufferView, 14, fileEntry.signature);\n\t}\n\tif (fileEntry.zip64) {\n\t\tsetUint32(arrayBufferView, 18, MAX_32_BITS);\n\t\tsetUint32(arrayBufferView, 22, MAX_32_BITS);\n\t} else {\n\t\tsetUint32(arrayBufferView, 18, fileEntry.compressedSize);\n\t\tsetUint32(arrayBufferView, 22, fileEntry.uncompressedSize);\n\t}\n\tawait writeData(writable, new Uint8Array(arrayBuffer));\n\treturn entryData.slice(arrayBuffer.byteLength);\n}\n\nfunction setZip64ExtraInfo(fileEntry, options) {\n\tconst { rawExtraFieldZip64, offset, diskNumberStart } = fileEntry;\n\tconst { zip64UncompressedSize, zip64CompressedSize, zip64Offset, zip64DiskNumberStart } = options;\n\tconst rawExtraFieldZip64View = getDataView(rawExtraFieldZip64);\n\tlet rawExtraFieldZip64Offset = 4;\n\tif (zip64UncompressedSize) {\n\t\trawExtraFieldZip64Offset += 8;\n\t}\n\tif (zip64CompressedSize) {\n\t\trawExtraFieldZip64Offset += 8;\n\t}\n\tif (zip64Offset) {\n\t\tsetBigUint64(rawExtraFieldZip64View, rawExtraFieldZip64Offset, BigInt(offset));\n\t\trawExtraFieldZip64Offset += 8;\n\t}\n\tif (zip64DiskNumberStart) {\n\t\tsetUint32(rawExtraFieldZip64View, rawExtraFieldZip64Offset, diskNumberStart);\n\t}\n}\n\nasync function closeFile(zipWriter, comment, options) {\n\tconst { files, writer } = zipWriter;\n\tconst { diskOffset, writable } = writer;\n\tlet { diskNumber } = writer;\n\tlet offset = 0;\n\tlet directoryDataLength = 0;\n\tlet directoryOffset = zipWriter.offset - diskOffset;\n\tlet filesLength = files.size;\n\tfor (const [, fileEntry] of files) {\n\t\tconst {\n\t\t\trawFilename,\n\t\t\trawExtraFieldZip64,\n\t\t\trawExtraFieldAES,\n\t\t\trawComment,\n\t\t\trawExtraFieldNTFS,\n\t\t\trawExtraField,\n\t\t\textendedTimestamp,\n\t\t\textraFieldExtendedTimestampFlag,\n\t\t\tlastModDate\n\t\t} = fileEntry;\n\t\tlet rawExtraFieldTimestamp;\n\t\tif (extendedTimestamp) {\n\t\t\trawExtraFieldTimestamp = new Uint8Array(9);\n\t\t\tconst extraFieldExtendedTimestampView = getDataView(rawExtraFieldTimestamp);\n\t\t\tsetUint16(extraFieldExtendedTimestampView, 0, EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP);\n\t\t\tsetUint16(extraFieldExtendedTimestampView, 2, 5);\n\t\t\tsetUint8(extraFieldExtendedTimestampView, 4, extraFieldExtendedTimestampFlag);\n\t\t\tsetUint32(extraFieldExtendedTimestampView, 5, Math.floor(lastModDate.getTime() / 1000));\n\t\t} else {\n\t\t\trawExtraFieldTimestamp = new Uint8Array();\n\t\t}\n\t\tfileEntry.rawExtraFieldCDExtendedTimestamp = rawExtraFieldTimestamp;\n\t\tdirectoryDataLength += 46 +\n\t\t\tgetLength(\n\t\t\t\trawFilename,\n\t\t\t\trawComment,\n\t\t\t\trawExtraFieldZip64,\n\t\t\t\trawExtraFieldAES,\n\t\t\t\trawExtraFieldNTFS,\n\t\t\t\trawExtraFieldTimestamp,\n\t\t\t\trawExtraField);\n\t}\n\tconst directoryArray = new Uint8Array(directoryDataLength);\n\tconst directoryView = getDataView(directoryArray);\n\tawait initStream(writer);\n\tlet directoryDiskOffset = 0;\n\tfor (const [indexFileEntry, fileEntry] of Array.from(files.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\trawExtraFieldCDExtendedTimestamp,\n\t\t\trawExtraFieldNTFS,\n\t\t\trawExtraField,\n\t\t\trawComment,\n\t\t\tversionMadeBy,\n\t\t\theaderArray,\n\t\t\tdirectory,\n\t\t\tzip64,\n\t\t\tzip64UncompressedSize,\n\t\t\tzip64CompressedSize,\n\t\t\tzip64DiskNumberStart,\n\t\t\tzip64Offset,\n\t\t\tmsDosCompatible,\n\t\t\tinternalFileAttribute,\n\t\t\texternalFileAttribute,\n\t\t\tdiskNumberStart,\n\t\t\tuncompressedSize,\n\t\t\tcompressedSize\n\t\t} = fileEntry;\n\t\tconst extraFieldLength = getLength(rawExtraFieldZip64, rawExtraFieldAES, rawExtraFieldCDExtendedTimestamp, rawExtraFieldNTFS, rawExtraField);\n\t\tsetUint32(directoryView, offset, CENTRAL_FILE_HEADER_SIGNATURE);\n\t\tsetUint16(directoryView, offset + 4, versionMadeBy);\n\t\tconst headerView = getDataView(headerArray);\n\t\tif (!zip64UncompressedSize) {\n\t\t\tsetUint32(headerView, 18, uncompressedSize);\n\t\t}\n\t\tif (!zip64CompressedSize) {\n\t\t\tsetUint32(headerView, 14, compressedSize);\n\t\t}\n\t\tarraySet(directoryArray, headerArray, offset + 6);\n\t\tsetUint16(directoryView, offset + 30, extraFieldLength);\n\t\tsetUint16(directoryView, offset + 32, getLength(rawComment));\n\t\tsetUint16(directoryView, offset + 34, zip64 && zip64DiskNumberStart ? MAX_16_BITS : diskNumberStart);\n\t\tsetUint16(directoryView, offset + 36, internalFileAttribute);\n\t\tif (externalFileAttribute) {\n\t\t\tsetUint32(directoryView, offset + 38, externalFileAttribute);\n\t\t} else if (directory && msDosCompatible) {\n\t\t\tsetUint8(directoryView, offset + 38, FILE_ATTR_MSDOS_DIR_MASK);\n\t\t}\n\t\tsetUint32(directoryView, offset + 42, zip64 && zip64Offset ? MAX_32_BITS : fileEntryOffset);\n\t\tarraySet(directoryArray, rawFilename, offset + 46);\n\t\tarraySet(directoryArray, rawExtraFieldZip64, offset + 46 + getLength(rawFilename));\n\t\tarraySet(directoryArray, rawExtraFieldAES, offset + 46 + getLength(rawFilename, rawExtraFieldZip64));\n\t\tarraySet(directoryArray, rawExtraFieldCDExtendedTimestamp, offset + 46 + getLength(rawFilename, rawExtraFieldZip64, rawExtraFieldAES));\n\t\tarraySet(directoryArray, rawExtraFieldNTFS, offset + 46 + getLength(rawFilename, rawExtraFieldZip64, rawExtraFieldAES, rawExtraFieldCDExtendedTimestamp));\n\t\tarraySet(directoryArray, rawExtraField, offset + 46 + getLength(rawFilename, rawExtraFieldZip64, rawExtraFieldAES, rawExtraFieldCDExtendedTimestamp, rawExtraFieldNTFS));\n\t\tarraySet(directoryArray, rawComment, offset + 46 + getLength(rawFilename) + extraFieldLength);\n\t\tconst directoryEntryLength = 46 + getLength(rawFilename, rawComment) + extraFieldLength;\n\t\tif (offset - directoryDiskOffset > writer.availableSize) {\n\t\t\twriter.availableSize = 0;\n\t\t\tawait writeData(writable, directoryArray.slice(directoryDiskOffset, offset));\n\t\t\tdirectoryDiskOffset = offset;\n\t\t}\n\t\toffset += directoryEntryLength;\n\t\tif (options.onprogress) {\n\t\t\ttry {\n\t\t\t\tawait options.onprogress(indexFileEntry + 1, files.size, new Entry(fileEntry));\n\t\t\t} catch (_error) {\n\t\t\t\t// ignored\n\t\t\t}\n\t\t}\n\t}\n\tawait writeData(writable, directoryDiskOffset ? directoryArray.slice(directoryDiskOffset) : directoryArray);\n\tlet lastDiskNumber = writer.diskNumber;\n\tconst { availableSize } = writer;\n\tif (availableSize < END_OF_CENTRAL_DIR_LENGTH) {\n\t\tlastDiskNumber++;\n\t}\n\tlet zip64 = getOptionValue(zipWriter, options, \"zip64\");\n\tif (directoryOffset > MAX_32_BITS || directoryDataLength > MAX_32_BITS || filesLength > 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}\n\tconst endOfdirectoryArray = new Uint8Array(zip64 ? ZIP64_END_OF_CENTRAL_DIR_TOTAL_LENGTH : END_OF_CENTRAL_DIR_LENGTH);\n\tconst endOfdirectoryView = getDataView(endOfdirectoryArray);\n\toffset = 0;\n\tif (zip64) {\n\t\tsetUint32(endOfdirectoryView, 0, ZIP64_END_OF_CENTRAL_DIR_SIGNATURE);\n\t\tsetBigUint64(endOfdirectoryView, 4, BigInt(44));\n\t\tsetUint16(endOfdirectoryView, 12, 45);\n\t\tsetUint16(endOfdirectoryView, 14, 45);\n\t\tsetUint32(endOfdirectoryView, 16, lastDiskNumber);\n\t\tsetUint32(endOfdirectoryView, 20, diskNumber);\n\t\tsetBigUint64(endOfdirectoryView, 24, BigInt(filesLength));\n\t\tsetBigUint64(endOfdirectoryView, 32, BigInt(filesLength));\n\t\tsetBigUint64(endOfdirectoryView, 40, BigInt(directoryDataLength));\n\t\tsetBigUint64(endOfdirectoryView, 48, BigInt(directoryOffset));\n\t\tsetUint32(endOfdirectoryView, 56, ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE);\n\t\tsetBigUint64(endOfdirectoryView, 64, BigInt(directoryOffset) + BigInt(directoryDataLength));\n\t\tsetUint32(endOfdirectoryView, 72, lastDiskNumber + 1);\n\t\tconst supportZip64SplitFile = getOptionValue(zipWriter, options, \"supportZip64SplitFile\", true);\n\t\tif (supportZip64SplitFile) {\n\t\t\tlastDiskNumber = MAX_16_BITS;\n\t\t\tdiskNumber = MAX_16_BITS;\n\t\t}\n\t\tfilesLength = MAX_16_BITS;\n\t\tdirectoryOffset = MAX_32_BITS;\n\t\tdirectoryDataLength = MAX_32_BITS;\n\t\toffset += ZIP64_END_OF_CENTRAL_DIR_LENGTH + ZIP64_END_OF_CENTRAL_DIR_LOCATOR_LENGTH;\n\t}\n\tsetUint32(endOfdirectoryView, offset, END_OF_CENTRAL_DIR_SIGNATURE);\n\tsetUint16(endOfdirectoryView, offset + 4, lastDiskNumber);\n\tsetUint16(endOfdirectoryView, offset + 6, diskNumber);\n\tsetUint16(endOfdirectoryView, offset + 8, filesLength);\n\tsetUint16(endOfdirectoryView, offset + 10, filesLength);\n\tsetUint32(endOfdirectoryView, offset + 12, directoryDataLength);\n\tsetUint32(endOfdirectoryView, offset + 16, directoryOffset);\n\tconst commentLength = getLength(comment);\n\tif (commentLength) {\n\t\tif (commentLength <= MAX_16_BITS) {\n\t\t\tsetUint16(endOfdirectoryView, offset + 20, commentLength);\n\t\t} else {\n\t\t\tthrow new Error(ERR_INVALID_COMMENT);\n\t\t}\n\t}\n\tawait writeData(writable, endOfdirectoryArray);\n\tif (commentLength) {\n\t\tawait writeData(writable, comment);\n\t}\n}\n\nasync function writeData(writable, array) {\n\tconst streamWriter = writable.getWriter();\n\ttry {\n\t\tawait streamWriter.ready;\n\t\twritable.size += getLength(array);\n\t\tawait streamWriter.write(array);\n\t} finally {\n\t\tstreamWriter.releaseLock();\n\t}\n}\n\nfunction getTimeNTFS(date) {\n\tif (date) {\n\t\treturn ((BigInt(date.getTime()) + BigInt(11644473600000)) * BigInt(10000));\n\t}\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 getMaximumCompressedSize(uncompressedSize) {\n\treturn uncompressedSize + (5 * (Math.floor(uncompressedSize / 16383) + 1));\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\nfunction getDataView(array) {\n\treturn new DataView(array.buffer);\n}\n\nfunction getLength(...arrayLikes) {\n\tlet result = 0;\n\tarrayLikes.forEach(arrayLike => arrayLike && (result += arrayLike.length));\n\treturn result;\n}\n", "/*\n Copyright (c) 2022 Gildas Lormeau. All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright \n notice, this list of conditions and the following disclaimer in \n the documentation and/or other materials provided with the distribution.\n\n 3. The names of the authors may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\n INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,\n INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,\n OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport { configure } from \"./core/configuration.js\";\nimport { configureWebWorker } from \"./z-worker-inline.js\";\nimport { getMimeType } from \"./core/util/default-mime-type.js\";\nimport { initShimAsyncCodec } from \"./core/util/stream-codec-shim.js\";\nimport { terminateWorkers } from \"./core/codec-pool.js\";\n\nlet baseURL;\ntry {\n\tbaseURL = import.meta.url;\n} catch (_error) {\n\t// ignored\n}\nconfigure({ baseURL });\nconfigureWebWorker(configure);\n\nexport * from \"./core/io.js\";\nexport * from \"./core/zip-reader.js\";\nexport * from \"./core/zip-writer.js\";\nexport {\n\tconfigure,\n\tgetMimeType,\n\tinitShimAsyncCodec,\n\tterminateWorkers\n};"],
"mappings": ";;;AA4BA,IAAM,cAAc;AACpB,IAAM,cAAc;AACpB,IAAM,6BAA6B;AACnC,IAAM,2BAA2B;AACjC,IAAM,yBAAyB;AAE/B,IAAM,8BAA8B;AACpC,IAAM,2BAA2B;AACjC,IAAM,mCAAmC;AACzC,IAAM,gCAAgC;AACtC,IAAM,+BAA+B;AACrC,IAAM,qCAAqC;AAC3C,IAAM,6CAA6C;AACnD,IAAM,4BAA4B;AAClC,IAAM,0CAA0C;AAChD,IAAM,kCAAkC;AACxC,IAAM,wCAAwC,4BAA4B,0CAA0C;AAEpH,IAAM,wBAAwB;AAC9B,IAAM,sBAAsB;AAC5B,IAAM,uBAAuB;AAC7B,IAAM,4BAA4B;AAClC,IAAM,qCAAqC;AAC3C,IAAM,+BAA+B;AACrC,IAAM,kCAAkC;AACxC,IAAM,uBAAuB;AAE7B,IAAM,oBAAoB;AAC1B,IAAM,gBAAgB;AACtB,IAAM,0BAA0B;AAChC,IAAM,6BAA6B;AACnC,IAAM,2BAA2B;AAEjC,IAAM,kBAAkB;AACxB,IAAM,gBA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AACT,YAAS,OAAO,KAAK,QAAQ,CAAC,IAAI,OAAO,WAAc,KAAK,OAAO,GAAK;AAAA,EACzE;AACD;AAEA,SAASF,gBAAe,WAAW,SAAS,MAAM,cAAc;AAC/D,QAAM,SAAS,QAAQ,IAAI,MAAM,kBAAkB,UAAU,QAAQ,IAAI,IAAI,QAAQ,IAAI;AACzF,SAAO,WAAW,kBAAkB,eAAe;AACpD;AAEA,SAAS,yBAAyB,kBAAkB;AACnD,SAAO,mBAAoB,KAAK,KAAK,MAAM,mBAAmB,KAAK,IAAI;AACxE;AAEA,SAAS,SAAS,MAAM,QAAQ,OAAO;AACtC,OAAK,SAAS,QAAQ,KAAK;AAC5B;AAEA,SAAS,UAAU,MAAM,QAAQ,OAAO;AACvC,OAAK,UAAU,QAAQ,OAAO,IAAI;AACnC;AAEA,SAASE,WAAU,MAAM,QAAQ,OAAO;AACvC,OAAK,UAAU,QAAQ,OAAO,IAAI;AACnC;AAEA,SAAS,aAAa,MAAM,QAAQ,OAAO;AAC1C,OAAK,aAAa,QAAQ,OAAO,IAAI;AACtC;AAEA,SAAS,SAAS,OAAO,YAAY,QAAQ;AAC5C,QAAM,IAAI,YAAY,MAAM;AAC7B;AAEA,SAASD,aAAY,OAAO;AAC3B,SAAO,IAAI,SAAS,MAAM,MAAM;AACjC;AAEA,SAAS,aAAa,YAAY;AACjC,MAAI,SAAS;AACb,aAAW,QAAQ,eAAa,cAAc,UAAU,UAAU,OAAO;AACzE,SAAO;AACR;;;AC/nCA,IAAI;AACJ,IAAI;AACH,YAAU,YAAY;AACvB,SAAS,QAAQ;AAEjB;AACA,UAAU,EAAE,QAAQ,CAAC;AACrB,EAAmB,SAAS;",
"names": ["codec", "config", "baseURL", "maxWorkers", "CompressionStream", "DecompressionStream", "e", "codec", "hash", "e", "table", "password", "signed", "decrypt", "encrypt", "codecBytes", "createKeys", "createKeys", "CompressionStream", "DecompressionStream", "CodecStream", "CompressionStream", "error", "config", "codec", "Stream", "config", "baseURL", "value", "error", "result", "runWorker", "config", "maxWorkers", "workerData", "stream", "workerOptions", "getRequestData", "headers", "baseURL", "config", "endOfDirectoryView", "commentOffset", "commentLength", "options", "readable", "writable", "config", "runWorker", "config", "getOptionValue", "getOptionValue", "getDataView", "setUint32", "config", "runWorker", "zip64"]
}