diff --git a/js/cram/cram-bundle.js b/js/cram/cram-bundle.js index 5c1e3c4d5..f221455bf 100644 --- a/js/cram/cram-bundle.js +++ b/js/cram/cram-bundle.js @@ -1,2 +1,2 @@ /*! For license information please see cram-bundle.js.LICENSE.txt */ -export default (()=>{var e={4923:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{A(n.next(e))}catch(e){o(e)}}function a(e){try{A(n.throw(e))}catch(e){o(e)}}function A(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}A((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});const i=r(8712),o=r(5931),s=r(9747);function a(e,t){const[r,n,i,o,s,a]=t,A=r;e[A]||(e[A]=[]),e[A].push({start:n,span:i,containerStart:o,sliceStart:s,sliceBytes:a})}t.default=class{constructor(e){this.filehandle=(0,o.open)(e.url,e.path,e.filehandle)}parseIndex(){return n(this,void 0,void 0,(function*(){const e={},t=31===(r=yield this.filehandle.readFile())[0]&&139===r[1]?(0,i.unzip)(r):r;var r;if(t.length>4&&21578050===t.readUInt32LE(0))throw new s.CramMalformedError("invalid .crai index file. note: file appears to be a .bai index. this is technically legal but please open a github issue if you need support");let n=[],o="";for(const r of t)if(r>=48&&r<=57||!o&&45===r)o+=String.fromCharCode(r);else if(9===r)n.push(Number.parseInt(o,10)),o="";else if(10===r)n.push(Number.parseInt(o,10)),o="",a(e,n),n=[];else if(13!==r&&32!==r)throw new s.CramMalformedError("invalid .crai index file");return o&&n.push(Number.parseInt(o,10)),6===n.length&&a(e,n),Object.entries(e).forEach((([t,r])=>{const n=r;e[t]=n.sort(((e,t)=>e.start-t.start||e.span-t.span))})),e}))}getIndex(){return this.parseIndexP||(this.parseIndexP=this.parseIndex().catch((e=>{throw this.parseIndexP=void 0,e}))),this.parseIndexP}hasDataForReferenceSequence(e){return n(this,void 0,void 0,(function*(){return!!(yield this.getIndex())[e]}))}getEntriesForRange(e,t,r){return n(this,void 0,void 0,(function*(){const n=(yield this.getIndex())[e];if(!n)return[];const i=e=>{const n=e.start,i=e.start+e.span;return n>r?-1:i<=t?1:0},o=[];for(const e of n)0===i(e)&&o.push(e);return o}))}}},9508:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=class{constructor(e,t){this.parameters=e,this.dataType=t}}},368:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=r(9747),o=n(r(9508)),s=r(612);class a extends o.default{constructor(e,t){if(super(e,t),"int"!==this.dataType)throw new i.CramUnimplementedError(`${this.dataType} decoding not yet implemented by BETA codec`)}decode(e,t,r,n){return(0,s.getBits)(t.content,n.coreBlock,this.parameters.length)-this.parameters.offset}}t.default=a},8635:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=n(r(9508)),o=r(400);class s extends i.default{constructor(e,t,r){super(e,t),this.instantiateCodec=r}decode(e,t,r,n){const i=this._getLengthCodec().decode(e,t,r,n),o=this._getDataCodec(),s=new Uint8Array(i);for(let a=0;a{(0,o.tinyMemoize)(s,e)}))},4839:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=r(9747),o=n(r(9508)),s=r(612);class a extends o.default{decode(e,t,r,n){const{blockContentId:o}=this.parameters,s=r[o];if(!s)throw new i.CramMalformedError(`no block found with content ID ${o}`);const a=n.externalBlocks.getCursor(o);return this._decodeByteArray(s,a)}_decodeByteArray(e,t){const r=e.content,{stopByte:n}=this.parameters,i=t.bytePosition;let o=t.bytePosition;for(;r[o]!==n&&o=e.content.length)throw new a.CramBufferOverrunError("attempted to read beyond end of block. this file seems truncated.");return e.content[t.bytePosition++]}}t.default=A},8185:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=r(9747),o=n(r(9508)),s=r(612);class a extends o.default{constructor(e,t){if(super(e,t),"int"!==this.dataType)throw new i.CramUnimplementedError(`${this.dataType} decoding not yet implemented by GAMMA codec`)}decode(e,t,r,n){let i=1;for(;0===(0,s.getBits)(t.content,n.coreBlock,1);)i+=1;return((0,s.getBits)(t.content,n.coreBlock,i-1)|1<{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CramBufferOverrunError=void 0,t.getBits=function(e,t,n){let i=0;if(t.bytePosition+(7-t.bitPosition+n)/8>e.length)throw new r("read error during decoding. the file seems to be truncated.");for(let r=n;r;r--)i<<=1,i|=e[t.bytePosition]>>t.bitPosition&1,t.bitPosition-=1,t.bitPosition<0&&(t.bytePosition+=1),t.bitPosition&=7;return i};class r extends Error{}t.CramBufferOverrunError=r},4341:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=r(9747),o=n(r(9508)),s=r(612);class a extends o.default{constructor(e,t){if(super(e,t),this.codes={},this.codeBook={},this.sortedCodes=[],this.sortedValuesByBitCode=[],this.sortedBitCodes=[],this.sortedBitLengthsByBitCode=[],this.bitCodeToValue=[],!["byte","int"].includes(this.dataType))throw new TypeError(`${this.dataType} decoding not yet implemented by HUFFMAN_INT codec`);this.buildCodeBook(),this.buildCodes(),this.buildCaches(),0===this.sortedCodes[0].bitLength&&(this._decode=this._decodeZeroLengthCode)}buildCodeBook(){let e=new Array(this.parameters.numCodes);for(let t=0;te.bitLength-t.bitLength||e.symbol-t.symbol)),this.codeBook={},e.forEach((e=>{this.codeBook[e.bitLength]||(this.codeBook[e.bitLength]=[]),this.codeBook[e.bitLength].push(e.symbol)}))}buildCodes(){this.codes={};let e=0,t=-1;Object.entries(this.codeBook).forEach((([r,n])=>{const o=Number.parseInt(r,10);n.forEach((r=>{const n={bitLength:o,value:r,bitCode:0};t+=1;const s=o-e;if(t<<=s,n.bitCode=t,e+=s,function(e){let t=e-(e>>1)&1431655765;return t=(858993459&t)+(t>>2&858993459),16843009*(t+(t>>4)&252645135)>>24}(t)>o)throw new i.CramMalformedError("Symbol out of range");this.codes[r]=n}))}))}buildCaches(){this.sortedCodes=Object.values(this.codes).sort(((e,t)=>e.bitLength-t.bitLength||e.bitCode-t.bitCode)),this.sortedValuesByBitCode=this.sortedCodes.map((e=>e.value)),this.sortedBitCodes=this.sortedCodes.map((e=>e.bitCode)),this.sortedBitLengthsByBitCode=this.sortedCodes.map((e=>e.bitLength));const e=Math.max(...this.sortedBitCodes);this.bitCodeToValue=new Array(e+1).fill(-1);for(let e=0;e-1&&this.sortedBitLengthsByBitCode[r]===t)return this.sortedValuesByBitCode[r];for(let r=e;this.sortedCodes[r+1].bitLength===t&&r{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={CRAM_FLAG_PRESERVE_QUAL_SCORES:1,CRAM_FLAG_DETACHED:2,CRAM_FLAG_MATE_DOWNSTREAM:4,CRAM_FLAG_NO_SEQ:8,CRAM_FLAG_MASK:15,CRAM_M_REVERSE:1,CRAM_M_UNMAP:2,BAM_FPAIRED:1,BAM_FPROPER_PAIR:2,BAM_FUNMAP:4,BAM_FMUNMAP:8,BAM_FREVERSE:16,BAM_FMREVERSE:32,BAM_FREAD1:64,BAM_FREAD2:128,BAM_FSECONDARY:256,BAM_FQCFAIL:512,BAM_FDUP:1024,BAM_FSUPPLEMENTARY:2048,BAM_CMATCH:0,BAM_CINS:1,BAM_CDEL:2,BAM_CREF_SKIP:3,BAM_CSOFT_CLIP:4,BAM_CHARD_CLIP:5,BAM_CPAD:6,BAM_CEQUAL:7,BAM_CDIFF:8,BAM_CBACK:9,BAM_CIGAR_STR:"MIDNSHP:XB",BAM_CIGAR_SHIFT:4,BAM_CIGAR_MASK:15,BAM_CIGAR_TYPE:246183}},7219:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(6524),i=r(9747),o={BF:"int",CF:"int",RI:"int",RL:"int",AP:"int",RG:"int",MF:"int",NS:"int",NP:"int",TS:"int",NF:"int",TC:"byte",TN:"int",FN:"int",FC:"byte",FP:"int",BS:"byte",IN:"byteArray",SC:"byteArray",DL:"int",BA:"byte",BB:"byteArray",RS:"int",PD:"int",HC:"int",MQ:"int",RN:"byteArray",QS:"byte",QQ:"byteArray",TL:"int"};t.default=class{constructor(e){this.dataSeriesCodecCache={},this.tagCodecCache={},this.tagEncoding={},this.readNamesIncluded=e.preservation.RN,this.APdelta=e.preservation.AP,this.referenceRequired=!!e.preservation.RR,this.tagIdsDictionary=e.preservation.TD,this.substitutionMatrix=function(e){const t=new Array(5);for(let e=0;e<5;e+=1)t[e]=new Array(4);return t[0][e[0]>>6&3]="C",t[0][e[0]>>4&3]="G",t[0][e[0]>>2&3]="T",t[0][3&e[0]]="N",t[1][e[1]>>6&3]="A",t[1][e[1]>>4&3]="G",t[1][e[1]>>2&3]="T",t[1][3&e[1]]="N",t[2][e[2]>>6&3]="A",t[2][e[2]>>4&3]="C",t[2][e[2]>>2&3]="T",t[2][3&e[2]]="N",t[3][e[3]>>6&3]="A",t[3][e[3]>>4&3]="C",t[3][e[3]>>2&3]="G",t[3][3&e[3]]="N",t[4][e[4]>>6&3]="A",t[4][e[4]>>4&3]="C",t[4][e[4]>>2&3]="G",t[4][3&e[4]]="T",t}(e.preservation.SM),this.dataSeriesEncoding=e.dataSeriesEncoding,this.tagEncoding=e.tagEncoding}getCodecForTag(e){const t=this.tagCodecCache[e];if(t)return t;{const t=this.tagEncoding[e];if(!t)throw new Error("Error, no tag encoding");const r=(0,n.instantiateCodec)(t,"byteArray");return this.tagCodecCache[e]=r,r}}getTagNames(e){return this.tagIdsDictionary[e]}getCodecForDataSeries(e){let t=this.dataSeriesCodecCache[e];if(void 0===t){const r=this.dataSeriesEncoding[e];if(r){const s=o[e];if(!s)throw new i.CramMalformedError(`data series name ${e} not defined in file compression header`);t=(0,n.instantiateCodec)(r,s),this.dataSeriesCodecCache[e]=t}}return t}toJSON(){const e={};return Object.keys(this).forEach((t=>{t.endsWith("Cache")||(e[t]=this[t])})),e}}},78:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{A(n.next(e))}catch(e){o(e)}}function a(e){try{A(n.throw(e))}catch(e){o(e)}}function A(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}A((n=n.apply(e,t||[])).next())}))},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const o=r(8287),s=r(9747),a=r(400),A=i(r(6771)),f=i(r(7219)),h=r(3165);class l{constructor(e,t){this.file=e,this.filePosition=t}getHeader(){return this._readContainerHeader(this.filePosition)}getCompressionHeaderBlock(){return n(this,void 0,void 0,(function*(){const e=yield this.getHeader();if(!(null==e?void 0:e.numRecords))return null;const{majorVersion:t}=yield this.file.getDefinition(),r=(0,h.getSectionParsers)(t),n=yield this.getFirstBlock();if(void 0===n)return;if("COMPRESSION_HEADER"!==n.contentType)throw new s.CramMalformedError(`invalid content type ${n.contentType} in compression header block`);const i=(0,a.parseItem)(n.content,r.cramCompressionHeader.parser,0,n.contentPosition);return Object.assign(Object.assign({},n),{parsedContent:i})}))}getFirstBlock(){return n(this,void 0,void 0,(function*(){const e=yield this.getHeader();if(e)return this.file.readBlock(e._endPosition)}))}getCompressionScheme(){return n(this,void 0,void 0,(function*(){const e=yield this.getCompressionHeaderBlock();if(e)return new f.default(e.parsedContent)}))}getSlice(e,t){return new A.default(this,e,t)}_readContainerHeader(e){return n(this,void 0,void 0,(function*(){const{majorVersion:t}=yield this.file.getDefinition(),r=(0,h.getSectionParsers)(t),{cramContainerHeader1:n,cramContainerHeader2:i}=r,{size:s}=yield this.file.stat();if(e>=s)return void console.warn(`pos:${e}>=fileSize:${s} in cram container`);const A=o.Buffer.allocUnsafe(n.maxLength);yield this.file.read(A,0,n.maxLength,e);const f=(0,a.parseItem)(A,n.parser),l=(0,a.itf8Size)(f.numLandmarks);if(e+f.length>=s)return void console.warn(`container at ${e} is beyond fileSize:${s}, skipping`);const u=o.Buffer.allocUnsafe(i.maxLength(f.numLandmarks));yield this.file.read(u,0,i.maxLength(f.numLandmarks),e+f._size-l);const c=(0,a.parseItem)(u,i.parser);return this.file.validateChecksums&&void 0!==c.crc32&&(yield this.file.checkCrc32(e,f._size+c._size-l-4,c.crc32,`container header beginning at position ${e}`)),Object.assign(f,c,{_size:f._size+c._size-l,_endPosition:f._size+c._size-l+e})}))}}t.default=l,"getHeader getCompressionHeaderBlock getCompressionScheme".split(" ").forEach((e=>{(0,a.tinyMemoize)(l,e)}))},6794:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{A(n.next(e))}catch(e){o(e)}}function a(e){try{A(n.throw(e))}catch(e){o(e)}}function A(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}A((n=n.apply(e,t||[])).next())}))},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const o=r(8287),s=i(r(928)),a=i(r(7392)),A=i(r(6960)),f=i(r(235)),h=r(1307),l=r(9747),u=r(8712),c=i(r(9989)),d=r(3165),g=i(r(78)),I=r(5931),p=r(400),C=r(5417);class m{constructor(e){var t;if(this.file=(0,I.open)(e.url,e.path,e.filehandle),this.validateChecksums=!0,this.fetchReferenceSequenceCallback=e.seqFetch,this.options={checkSequenceMD5:e.checkSequenceMD5,cacheSize:null!==(t=e.cacheSize)&&void 0!==t?t:2e4},this.featureCache=new a.default({maxSize:this.options.cacheSize}),function(){const e=new Uint32Array([287454020]),t=new Uint8Array(e.buffer);return 68===t[0]?0:17===t[0]?1:2}()>0)throw new Error("Detected big-endian machine, may be unable to run")}read(e,t,r,n){return this.file.read(e,t,r,n)}stat(){return this.file.stat()}getDefinition(){return n(this,void 0,void 0,(function*(){const{maxLength:e,parser:t}=(0,d.cramFileDefinition)(),r=o.Buffer.allocUnsafe(e);yield this.file.read(r,0,e,0);const n=t(r).value;if(2!==n.majorVersion&&3!==n.majorVersion)throw new l.CramUnimplementedError(`CRAM version ${n.majorVersion} not supported`);return n}))}getSamHeader(){return n(this,void 0,void 0,(function*(){const e=yield this.getContainerById(0);if(!e)throw new l.CramMalformedError("file contains no containers");const t=yield e.getFirstBlock();if(void 0===t)return(0,C.parseHeaderText)("");const r=t.content,n=r.readInt32LE(0),i=r.toString("utf8",4,4+n);return this.header=i,(0,C.parseHeaderText)(i)}))}getHeaderText(){return n(this,void 0,void 0,(function*(){return yield this.getSamHeader(),this.header}))}getContainerById(e){return n(this,void 0,void 0,(function*(){const{majorVersion:t}=yield this.getDefinition(),r=(0,d.getSectionParsers)(t);let n=r.cramFileDefinition.maxLength;const{size:i}=yield this.file.stat(),{cramContainerHeader1:o}=r;let s;for(let t=0;t<=e;t++){if(n+o.maxLength+8>=i)return;s=this.getContainerAtPosition(n);const r=yield s.getHeader();if(!r)throw new l.CramMalformedError(`container ${e} not found in file`);if(0===t){n=r._endPosition;for(let e=0;e=i)return;const s=o.Buffer.allocUnsafe(n.maxLength);return yield this.file.read(s,0,n.maxLength,e),(0,p.parseItem)(s,n.parser,0,e)}))}_parseSection(e,t){return n(this,arguments,void 0,(function*(e,t,r=e.maxLength,n){let i;if(n)i=n;else{const{size:e}=yield this.file.stat();if(t+r>=e)return;i=o.Buffer.allocUnsafe(r),yield this.file.read(i,0,r,t)}const s=(0,p.parseItem)(i,e.parser,0,t);if(s._size!==r)throw new l.CramMalformedError(`section read error: requested size ${r} does not equal parsed size ${s._size}`);return s}))}_uncompress(e,t,r){return n(this,void 0,void 0,(function*(){if("gzip"===e)(0,u.unzip)(t).copy(r);else if("bzip2"===e){const e=f.default.array(t);let n,i=f.default.header(e),s=0;do{n=f.default.decompress(e,i),-1!==n&&(o.Buffer.from(n).copy(r,s),s+=n.length,i-=n.length)}while(-1!==n)}else if("lzma"===e){const e=new Response(new h.XzReadableStream((n=t,new ReadableStream({start(e){e.enqueue(n),e.close()}}))));o.Buffer.from(yield e.arrayBuffer()).copy(r)}else if("rans"===e)(0,c.default)(t,r);else if("rans4x16"===e)A.default.r4x16_uncompress(t,r);else if("arith"===e)A.default.arith_uncompress(t,r);else if("fqzcomp"===e)A.default.fqzcomp_uncompress(t,r);else{if("tok3"!==e)throw new l.CramUnimplementedError(`${e} decompression not yet implemented`);A.default.tok3_uncompress(t,r)}var n}))}readBlock(e){return n(this,void 0,void 0,(function*(){const{majorVersion:t}=yield this.getDefinition(),r=(0,d.getSectionParsers)(t),n=yield this.readBlockHeader(e);if(void 0===n)return;const i=n._endPosition,s=o.Buffer.allocUnsafe(n.uncompressedSize),a=Object.assign(Object.assign({},n),{_endPosition:i,contentPosition:i,content:s});if("raw"!==n.compressionMethod){const e=o.Buffer.allocUnsafe(n.compressedSize);yield this.read(e,0,n.compressedSize,i),yield this._uncompress(n.compressionMethod,e,s)}else yield this.read(s,0,n.uncompressedSize,i);if(t>=3){const t=yield this._parseSection(r.cramBlockCrc32,i+n.compressedSize);if(void 0===t)return;a.crc32=t.crc32,this.validateChecksums&&(yield this.checkCrc32(e,n._size+n.compressedSize,t.crc32,"block data")),a._endPosition=t._endPosition,a._size=a.compressedSize+r.cramBlockCrc32.maxLength}else a._endPosition=i+a.compressedSize,a._size=a.compressedSize;return a}))}}t.default=m,"getDefinition getSectionParsers getSamHeader".split(" ").forEach((e=>{(0,p.tinyMemoize)(m,e)}))},7390:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.CramRecord=void 0;var i=r(8401);Object.defineProperty(t,"CramRecord",{enumerable:!0,get:function(){return n(i).default}});var o=r(6794);Object.defineProperty(t,"default",{enumerable:!0,get:function(){return n(o).default}})},8401:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.MateFlagsDecoder=t.CramFlagsDecoder=t.BamFlagsDecoder=t.MateFlags=t.CramFlags=t.BamFlags=void 0;const i=n(r(7295)),o={a:0,A:0,c:1,C:1,g:2,G:2,t:3,T:3,n:4,N:4};function s(e){const t={};for(const[r,n]of e)t[`is${n}`]=e=>!!(e&r),t[`set${n}`]=e=>e|r;return t}t.BamFlags=[[1,"Paired"],[2,"ProperlyPaired"],[4,"SegmentUnmapped"],[8,"MateUnmapped"],[16,"ReverseComplemented"],[32,"MateReverseComplemented"],[64,"Read1"],[128,"Read2"],[256,"Secondary"],[512,"FailedQc"],[1024,"Duplicate"],[2048,"Supplementary"]],t.CramFlags=[[1,"PreservingQualityScores"],[2,"Detached"],[4,"WithMateDownstream"],[8,"DecodeSequenceAsStar"]],t.MateFlags=[[1,"OnNegativeStrand"],[2,"Unmapped"]],t.BamFlagsDecoder=s(t.BamFlags),t.CramFlagsDecoder=s(t.CramFlags),t.MateFlagsDecoder=s(t.MateFlags),t.default=class{constructor({flags:e,cramFlags:t,readLength:r,mappingQuality:n,lengthOnRef:i,qualityScores:o,mateRecordNumber:s,readBases:a,readFeatures:A,mateToUse:f,readGroupId:h,readName:l,sequenceId:u,uniqueId:c,templateSize:d,alignmentStart:g,tags:I}){this.flags=e,this.cramFlags=t,this.readLength=r,this.mappingQuality=n,this.lengthOnRef=i,this.qualityScores=o,a&&(this.readBases=a),this.readGroupId=h,this.readName=l,this.sequenceId=u,this.uniqueId=c,this.templateSize=d,this.alignmentStart=g,this.tags=I,A&&(this.readFeatures=A),f&&(this.mate={flags:f.mateFlags,readName:f.mateReadName,sequenceId:f.mateSequenceId,alignmentStart:f.mateAlignmentStart}),s&&(this.mateRecordNumber=s)}isPaired(){return!!(this.flags&i.default.BAM_FPAIRED)}isProperlyPaired(){return!!(this.flags&i.default.BAM_FPROPER_PAIR)}isSegmentUnmapped(){return!!(this.flags&i.default.BAM_FUNMAP)}isMateUnmapped(){return!!(this.flags&i.default.BAM_FMUNMAP)}isReverseComplemented(){return!!(this.flags&i.default.BAM_FREVERSE)}isMateReverseComplemented(){return!!(this.flags&i.default.BAM_FMREVERSE)}isRead1(){return!!(this.flags&i.default.BAM_FREAD1)}isRead2(){return!!(this.flags&i.default.BAM_FREAD2)}isSecondary(){return!!(this.flags&i.default.BAM_FSECONDARY)}isFailedQc(){return!!(this.flags&i.default.BAM_FQCFAIL)}isDuplicate(){return!!(this.flags&i.default.BAM_FDUP)}isSupplementary(){return!!(this.flags&i.default.BAM_FSUPPLEMENTARY)}isDetached(){return!!(this.cramFlags&i.default.CRAM_FLAG_DETACHED)}hasMateDownStream(){return!!(this.cramFlags&i.default.CRAM_FLAG_MATE_DOWNSTREAM)}isPreservingQualityScores(){return!!(this.cramFlags&i.default.CRAM_FLAG_PRESERVE_QUAL_SCORES)}isUnknownBases(){return!!(this.cramFlags&i.default.CRAM_FLAG_NO_SEQ)}getReadBases(){if(!this.readBases&&this._refRegion){const e=function(e,t){if(!e.lengthOnRef&&!e.readLength)return null;if(e.isUnknownBases())return null;const r=e.alignmentStart-t.start;if(!e.readFeatures)return t.seq.slice(r,r+(e.lengthOnRef||0)).toUpperCase();let n="",i=r,o=0;for(;n.lengththis.mate.alignmentStart&&o>0&&(o=-o),o>0?(i[0]=e,i[1]=r,i[2]=t,i[3]=n):(i[2]=e,i[3]=r,i[0]=t,i[1]=n),i.join("")}return null}addReferenceSequence(e,t){this.readFeatures&&this.readFeatures.forEach((r=>{"X"===r.code&&function(e,t,r,n){const i=n.refPos-t.start,s=t.seq.charAt(i);s&&(n.ref=s);let a=o[s];void 0===a&&(a=4);const A=r.substitutionMatrix[a][n.data];A&&(n.sub=A)}(0,e,t,r)})),!this.readBases&&e.start<=this.alignmentStart&&e.end>=this.alignmentStart+(this.lengthOnRef||this.readLength)-1&&(this._refRegion=e)}toJSON(){const e={};return Object.keys(this).forEach((t=>{t.startsWith("_")||(e[t]=this[t])})),e.readBases=this.getReadBases(),e}}},3165:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.cramFileDefinition=i,t.cramBlockHeader=o,t.cramBlockCrc32=s,t.cramTagDictionary=A,t.cramPreservationMap=f,t.isMappedSliceHeader=function(e){return"number"==typeof e.refSeqId},t.getSectionParsers=function(e){return{cramFileDefinition:i(),cramBlockHeader:o(),cramBlockCrc32:s(),cramDataSeriesEncodingMap:d(),cramTagEncodingMap:g(),cramCompressionHeader:{parser:(e,t)=>{const{value:r,offset:n}=f().parser(e,t);t=n;const{value:i,offset:o}=d().parser(e,t);t=o;const{value:s,offset:a}=g().parser(e,t);return t=a,{value:{dataSeriesEncoding:h(i),preservation:h(r),tagEncoding:h(s)},offset:t}}},cramEncoding:{parser:(e,t)=>c(e,t)},cramUnmappedSliceHeader:l(e),cramMappedSliceHeader:u(e),cramContainerHeader1:I(e),cramContainerHeader2:p(e)}};const n=r(400);function i(){return{parser:(e,t=0)=>{const r=e,n=new DataView(r.buffer,r.byteOffset,r.length);let i=0;const o=e.subarray(i,i+4).toString();i+=4;const s=n.getUint8(i);i+=1;const a=n.getUint8(i);i+=1;const A=r.subarray(i,i+20).toString().replaceAll("\0","");return i+=20,{value:{magic:o,majorVersion:s,minorVersion:a,fileId:A},offset:i}},maxLength:26}}function o(){return{parser:(e,t=0)=>{const r=e,i=new DataView(r.buffer,r.byteOffset,r.length);let o=0;const s=i.getUint8(o),a=["raw","gzip","bzip2","lzma","rans","rans4x16","arith","fqzcomp","tok3"][s];if(!a)throw new Error(`compression method number ${s} not implemented`);o+=1;const A=i.getUint8(o),f=["FILE_HEADER","COMPRESSION_HEADER","MAPPED_SLICE_HEADER","UNMAPPED_SLICE_HEADER","EXTERNAL_DATA","CORE_DATA"][A];if(!f)throw new Error(`invalid block content type id ${A}`);o+=1;const[h,l]=(0,n.parseItf8)(e,o);o+=l;const[u,c]=(0,n.parseItf8)(e,o);o+=c;const[d,g]=(0,n.parseItf8)(e,o);return o+=g,{offset:o,value:{uncompressedSize:d,compressedSize:u,contentId:h,contentType:f,compressionMethod:a}}},maxLength:17}}function s(){return{parser:(e,t)=>{const r=e,n=new DataView(r.buffer,r.byteOffset,r.length).getUint32(t,!0);return{offset:t+=4,value:{crc32:n}}},maxLength:4}}function a(e,t,r){const n=e.toString("utf8",t,r),i=[];for(let e=0;e{const[r,i]=(0,n.parseItf8)(e,t);t+=i;const o=e.subarray(t,t+r);t+=r;const s=[];let A=0,f=0;for(;fA&&s.push(a(o,A,f)),{value:{size:r,ents:s},offset:t}}}}function f(){return{parser:(e,t)=>{const r=e,i=new DataView(r.buffer,r.byteOffset,r.length),[o,s]=(0,n.parseItf8)(e,t);t+=s;const[a,f]=(0,n.parseItf8)(e,t);t+=f;const h=[];for(let r=0;r{const[i,o]=(0,n.parseItf8)(t,r);r+=o;let s=0;if(e>=3){const[e,i]=(0,n.parseLtf8)(t,r);r+=i,s=e}else if(2===e){const[e,i]=(0,n.parseItf8)(t,r);r+=i,s=e}else console.warn("recordCounter=0");const[a,A]=(0,n.parseItf8)(t,r);r+=A;const[f,h]=(0,n.parseItf8)(t,r);r+=h;const l=[];for(let e=0;e=2&&(u=[...t.subarray(r,r+16)],r+=16),{value:{recordCounter:s,md5:u,contentIds:l,numContentIds:f,numBlocks:a,numRecords:i},offset:r}},maxLength:e=>40+5*e}}function u(e){let t=0;return t+=20,t+=9,t+=15,t+=16,{parser:(t,r)=>{const[i,o]=(0,n.parseItf8)(t,r);r+=o;const[s,a]=(0,n.parseItf8)(t,r);r+=a;const[A,f]=(0,n.parseItf8)(t,r);r+=f;const[h,l]=(0,n.parseItf8)(t,r);r+=l;let u=0;if(e>=3){const[e,i]=(0,n.parseLtf8)(t,r);r+=i,u=e}else if(2===e){const[e,i]=(0,n.parseItf8)(t,r);r+=i,u=e}else console.warn("majorVersion is <2, recordCounter set to 0");const[c,d]=(0,n.parseItf8)(t,r);r+=d;const[g,I]=(0,n.parseItf8)(t,r);r+=I;const p=[];for(let e=0;e=2&&(B=[...t.subarray(r,r+16)],r+=16),{value:{md5:B,numBlocks:c,numRecords:h,numContentIds:g,refSeqSpan:A,refSeqId:i,refSeqStart:s,recordCounter:u,refBaseBlockId:C,contentIds:p},offset:r}},maxLength:e=>60+5*e}}function c(e,t){const r=e,i=new DataView(r.buffer,r.byteOffset,r.length),[o,s]=(0,n.parseItf8)(e,t);t+=s;const[a,A]=(0,n.parseItf8)(e,t);t+=A;const f={};if(0===o);else if(1===o){const[r,i]=(0,n.parseItf8)(e,t);f.blockContentId=r,t+=i}else if(2===o){const[r,i]=(0,n.parseItf8)(e,t);f.offset=r,t+=i;const[o,s]=(0,n.parseItf8)(e,t);f.M=o,t+=s}else if(3===o){const r=(0,n.parseItf8)(e,t),i=r[0];t+=r[1];const o=[];for(let r=0;r{const[r,i]=(0,n.parseItf8)(e,t);t+=i;const[o,s]=(0,n.parseItf8)(e,t);t+=s;const a=[];for(let r=0;r{const[r,i]=(0,n.parseItf8)(e,t);t+=i;const[o,s]=(0,n.parseItf8)(e,t);t+=s;const a=[];for(let r=0;r>16&255)+String.fromCharCode(r>>8&255)+String.fromCharCode(255&r),{value:s,offset:A}=c(e,t);t=A,a.push({key:o,value:s})}return{value:{mapSize:r,ents:a,mapCount:o},offset:t}}}}function I(e){let t=4;return t+=20,t+=9,t+=9,t+=10,{maxLength:52,parser:(t,r)=>{const i=t,o=new DataView(i.buffer,i.byteOffset,i.length).getInt32(r,!0);r+=4;const[s,a]=(0,n.parseItf8)(t,r);r+=a;const[A,f]=(0,n.parseItf8)(t,r);r+=f;const[h,l]=(0,n.parseItf8)(t,r);r+=l;const[u,c]=(0,n.parseItf8)(t,r);r+=c;let d,g=0;if(e>=3){const[e,i]=(0,n.parseLtf8)(t,r);g=e,r+=i}else if(2===e){const[e,i]=(0,n.parseItf8)(t,r);g=e,r+=i}else console.warn("setting recordCounter=0");if(e>1){const[e,i]=(0,n.parseLtf8)(t,r);d=e,r+=i}const[I,p]=(0,n.parseItf8)(t,r);r+=p;const[C,m]=(0,n.parseItf8)(t,r);return{value:{length:o,refSeqId:s,refSeqStart:A,alignmentSpan:h,numBlocks:I,numLandmarks:C,numBases:d,recordCounter:g,numRecords:u},offset:r+=m}}}}function p(e){return{parser:(t,r)=>{const i=t,o=new DataView(i.buffer,i.byteOffset,i.length),[s,a]=(0,n.parseItf8)(t,r);r+=a;const A=[];for(let e=0;e=3&&(f=o.getUint32(r,!0),r+=4),{value:Object.assign(Object.assign({},void 0===f?{}:{crc32:f}),{numLandmarks:s,landmarks:A}),offset:r}},maxLength:e=>5+5*e+4}}},6484:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r,A,f,h,l,u,c){let d=t("BF");const g=t("CF");if(!(0,o.isMappedSliceHeader)(A.parsedContent))throw new Error("slice header not mapped");const I=u>1&&-2===A.parsedContent.refSeqId?t("RI"):A.parsedContent.refSeqId,p=t("RL");let C=t("AP");r.APdelta&&(C+=l.lastAlignmentStart),l.lastAlignmentStart=C;const m=t("RG");let B,w,y,_;if(r.readNamesIncluded&&(B=s(t("RN"))),i.CramFlagsDecoder.isDetached(g)){const e=t("MF");let n;r.readNamesIncluded||(n=s(t("RN")),B=n);const o=t("NS"),a=t("NP");(e||o>-1)&&(w={mateFlags:e,mateSequenceId:o,mateAlignmentStart:a,mateReadName:n}),y=t("TS"),i.MateFlagsDecoder.isUnmapped(e)&&(d=i.BamFlagsDecoder.setMateUnmapped(d)),i.MateFlagsDecoder.isOnNegativeStrand(e)&&(d=i.BamFlagsDecoder.setMateReverseComplemented(d))}else i.CramFlagsDecoder.isWithMateDownstream(g)&&(_=t("NF")+c+1);const E=t("TL");if(E<0)throw new n.CramMalformedError("invalid TL index");const v={},b=r.getTagNames(E),Q=b.length;for(let t=0;t1?"SC":"IN"],X:["number","BS"],D:["number","DL"],I:["string","IN"],i:["character","BA"],b:["string","BB"],q:["numArray","QQ"],Q:["number","QS"],H:["number","HC"],P:["number","PD"],N:["number","RS"]}[t];if(!h)throw new n.CramMalformedError(`invalid read feature code "${t}"`);let l=f(h);const u={B:["number","QS"]}[t];u&&(l=[l,f(u)]),s+=i;const c=s;a+=i;const d=a;"D"===t||"N"===t?a+=l:"I"===t||"S"===t?a-=l.length:"i"===t&&(a-=1),A[e]={code:t,pos:c,refPos:d,data:l}}return A}(C,e,t,0,u)),k=p,S)for(const{code:e,data:t}of S)"D"===e||"N"===e?k+=t:"I"===e||"S"===e?k-=t.length:"i"===e&&(k-=1);if(Number.isNaN(k)&&(console.warn(`${B||`${I}:${C}`} record has invalid read features`),k=p),D=t("MQ"),i.CramFlagsDecoder.isPreservingQualityScores(g)){R=new Array(p);for(let e=0;e=0){const i=e[r.mateRecordNumber];if(!i)throw new o.CramMalformedError("intra-slice mate record not found, this file seems malformed");n.push(...t(i))}return n}(r),i=n.map((e=>e.alignmentStart)),s=n.map((e=>e.alignmentStart+e.readLength-1)),a=Math.max(...s)-Math.min(...i)+1;a>=0&&n.forEach((e=>{if(void 0!==e.templateLength)throw new o.CramMalformedError("mate pair group has some members that have template lengths already, this file seems malformed");e.templateLength=a}))}(e,0,r):function(e,t){const r=Math.min(e.alignmentStart,t.alignmentStart),n=Math.max(e.alignmentStart+e.readLength-1,t.alignmentStart+t.readLength-1)-r+1;e.templateLength=n,t.templateLength=n}(r,n)),r.mateRecordNumber=void 0}class c{constructor(e,t,r){this.container=e,this.containerPosition=t,this.sliceSize=r,this.file=e.file}getHeader(){return n(this,void 0,void 0,(function*(){const{majorVersion:e}=yield this.file.getDefinition(),t=(0,h.getSectionParsers)(e),r=yield this.container.getHeader();if(!r)throw new Error("no container header detected");const n=yield this.file.readBlock(r._endPosition+this.containerPosition);if(void 0===n)throw new Error("block header undefined");if("MAPPED_SLICE_HEADER"===n.contentType){const e=(0,s.parseItem)(n.content,t.cramMappedSliceHeader.parser,0,r._endPosition);return Object.assign(Object.assign({},n),{parsedContent:e})}if("UNMAPPED_SLICE_HEADER"===n.contentType){const e=(0,s.parseItem)(n.content,t.cramUnmappedSliceHeader.parser,0,r._endPosition);return Object.assign(Object.assign({},n),{parsedContent:e})}throw new o.CramMalformedError(`error reading slice header block, invalid content type ${n.contentType}`)}))}getBlocks(){return n(this,void 0,void 0,(function*(){const e=yield this.getHeader();let t=e._endPosition;const r=new Array(e.parsedContent.numBlocks);for(let e=0;e{"EXTERNAL_DATA"===e.contentType&&(t[e.contentId]=e)})),t}))}getBlockByContentId(e){return n(this,void 0,void 0,(function*(){return(yield this._getBlocksContentIdIndex())[e]}))}getReferenceRegion(){return n(this,void 0,void 0,(function*(){const e=(yield this.getHeader()).parsedContent;if(!(0,h.isMappedSliceHeader)(e))throw new Error("slice header not mapped");if(e.refSeqId<0)return;const t=yield this.container.getCompressionScheme();if(void 0===t)throw new Error("compression scheme undefined");if(e.refBaseBlockId>=0){const t=yield this.getBlockByContentId(e.refBaseBlockId);if(!t)throw new o.CramMalformedError("embedded reference specified, but reference block does not exist");return{seq:t.data.toString("utf8"),start:e.refSeqStart,end:e.refSeqStart+e.refSeqSpan-1,span:e.refSeqSpan}}if(t.referenceRequired||this.file.fetchReferenceSequenceCallback){if(!this.file.fetchReferenceSequenceCallback)throw new Error("reference sequence not embedded, and seqFetch callback not provided, cannot fetch reference sequence");const t=yield this.file.fetchReferenceSequenceCallback(e.refSeqId,e.refSeqStart,e.refSeqStart+e.refSeqSpan-1);if(t.length!==e.refSeqSpan)throw new o.CramArgumentError("seqFetch callback returned a reference sequence of the wrong length");return{seq:t,start:e.refSeqStart,end:e.refSeqStart+e.refSeqSpan-1,span:e.refSeqSpan}}}))}getAllRecords(){return this.getRecords((()=>!0))}_fetchRecords(){return n(this,void 0,void 0,(function*(){var e,t;const{majorVersion:r}=yield this.file.getDefinition(),n=yield this.container.getCompressionScheme();if(void 0===n)throw new Error("compression scheme undefined");const i=yield this.getHeader(),a=yield this._getBlocksContentIdIndex();if(r>1&&this.file.options.checkSequenceMD5&&(0,h.isMappedSliceHeader)(i.parsedContent)&&i.parsedContent.refSeqId>=0&&"0000000000000000"!==(null===(e=i.parsedContent.md5)||void 0===e?void 0:e.join(""))){const e=yield this.getReferenceRegion();if(e){const{seq:r,start:n,end:a}=e,A=(0,s.sequenceMD5)(r),f=null===(t=i.parsedContent.md5)||void 0===t?void 0:t.map((e=>(e<16?"0":"")+e.toString(16))).join("");if(A!==f)throw new o.CramMalformedError(`MD5 checksum reference mismatch for ref ${i.parsedContent.refSeqId} pos ${n}..${a}. recorded MD5: ${f}, calculated MD5: ${A}`)}}const c=yield this.getCoreDataBlock(),d={lastAlignmentStart:(0,h.isMappedSliceHeader)(i.parsedContent)?i.parsedContent.refSeqStart:0,coreBlock:{bitPosition:7,bytePosition:0},externalBlocks:{map:new Map,getCursor(e){let t=this.map.get(e);return void 0===t&&(t={bitPosition:7,bytePosition:0},this.map.set(e,t)),t}}},g=e=>{const t=n.getCodecForDataSeries(e);if(!t)throw new o.CramMalformedError(`no codec defined for ${e} data series`);return t.decode(this,c,a,d)},I=new Array(i.parsedContent.numRecords);for(let e=0;e=0&&u(I,e,I[e],I[t])}return I}))}getRecords(e){return n(this,void 0,void 0,(function*(){const t=this.container.filePosition+this.containerPosition;let r=this.file.featureCache.get(t.toString());r||(r=this._fetchRecords(),this.file.featureCache.set(t.toString(),r));const i=(yield r).filter(e);if(i.length&&this.file.fetchReferenceSequenceCallback){const e=yield this.getHeader();if((0,h.isMappedSliceHeader)(e.parsedContent)&&(e.parsedContent.refSeqId>=0||-2===e.parsedContent.refSeqId)){const t=e.parsedContent.refSeqId>=0?e.parsedContent.refSeqId:void 0,r=yield this.container.getCompressionScheme();if(void 0===r)throw new Error("compression scheme undefined");const o={};for(const e of i){const r=void 0!==t?t:e.sequenceId;let n=o[r];n||(n={id:r,start:e.alignmentStart,end:Number.NEGATIVE_INFINITY,seq:null},o[r]=n);const i=e.alignmentStart+(e.lengthOnRef||e.readLength)-1;i>n.end&&(n.end=i),e.alignmentStartn(this,void 0,void 0,(function*(){-1!==e.id&&e.start<=e.end&&this.file.fetchReferenceSequenceCallback&&(e.seq=yield this.file.fetchReferenceSequenceCallback(e.id,e.start,e.end))})))));for(const e of i){const n=o[void 0!==t?t:e.sequenceId];if(null==n?void 0:n.seq){const t=n.seq;e.addReferenceSequence(Object.assign(Object.assign({},n),{seq:t}),r)}}}}return i}))}}t.default=c,"getHeader getBlocks _getBlocksContentIdIndex".split(" ").forEach((e=>{(0,s.tinyMemoize)(c,e)}))},400:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.itf8Size=function(e){return-128&e?-16384&e?-2097152&e?-268435456&e?5:4:3:2:1},t.parseItf8=function(e,t){let r=t;const n=e[r];let i;if(n<128?(i=n,r+=1):n<192?(i=16383&(n<<8|e[r+1]),r+=2):n<224?(i=2097151&(n<<16|e[r+1]<<8|e[r+2]),r+=3):n<240?(i=268435455&(n<<24|e[r+1]<<16|e[r+2]<<8|e[r+3]),r+=4):(i=(15&n)<<28|e[r+1]<<20|e[r+2]<<12|e[r+3]<<4|15&e[r+4],r+=5),r>e.length)throw new s.CramBufferOverrunError("Attempted to read beyond end of buffer; this file seems truncated.");return[i,r-t]},t.parseLtf8=function(e,t){let r=t;const n=e[r];let i;if(n<128)i=n,r+=1;else if(n<192)i=16383&(e[r]<<8|e[r+1]),r+=2;else if(n<224)i=2097151&(e[r]<<16|e[r+1]<<8|e[r+2]),i=(63&n)<<16|e.readUInt16LE(r+1),r+=3;else if(n<240)i=268435455&(e[r]<<24|e[r+1]<<16|e[r+2]<<8|e[r+3]),r+=4;else if(n<248)i=(15&e[r])*Math.pow(2,32)+(e[r+1]<<24)|e[r+2]<<16|e[r+3]<<8|e[r+4],r+=5;else if(n<252)i=((7&e[r])<<8|e[r+1])*Math.pow(2,32)+(e[r+2]<<24)|e[r+3]<<16|e[r+4]<<8|e[r+5],r+=6;else if(n<254)i=((3&e[r])<<16|e[r+1]<<8|e[r+2])*Math.pow(2,32)+(e[r+3]<<24)|e[r+4]<<16|e[r+5]<<8|e[r+6],r+=7;else if(n<255){if(i=o.default.fromBytesBE(e.slice(r+1,r+8)),i.greaterThan(Number.MAX_SAFE_INTEGER)||i.lessThan(Number.MIN_SAFE_INTEGER))throw new Error("integer overflow");i=i.toNumber(),r+=8}else{if(i=o.default.fromBytesBE(e.slice(r+1,r+9)),i.greaterThan(Number.MAX_SAFE_INTEGER)||i.lessThan(Number.MIN_SAFE_INTEGER))throw new Error("integer overflow");i=i.toNumber(),r+=9}return[i,r-t]},t.parseItem=function(e,t,r=0,n=0){const{offset:i,value:o}=t(e,r);return Object.assign(Object.assign({},o),{_endPosition:i+n,_size:i-r})},t.tinyMemoize=function(e,t){const r=e.prototype[t],n=`_memo_${t}`;e.prototype[t]=function(){if(!(n in this)){const e=r.call(this);this[n]=e,Promise.resolve(e).catch((()=>{delete this[n]}))}return this[n]}},t.sequenceMD5=function(e){return(0,i.default)(e.toUpperCase().replaceAll(/[^\u0021-\u007e]/g,""))};const i=n(r(3503)),o=n(r(8570)),s=r(612)},9747:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CramArgumentError=t.CramSizeLimitError=t.CramMalformedError=t.CramUnimplementedError=t.CramError=void 0;class r extends Error{}t.CramError=r;class n extends Error{}t.CramUnimplementedError=n,t.CramMalformedError=class extends r{},t.CramSizeLimitError=class extends r{},t.CramArgumentError=class extends r{}},7806:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.IndexedCramFile=t.CraiIndex=t.CramRecord=t.CramFile=void 0;var i=r(7390);Object.defineProperty(t,"CramFile",{enumerable:!0,get:function(){return n(i).default}}),Object.defineProperty(t,"CramRecord",{enumerable:!0,get:function(){return i.CramRecord}});var o=r(4923);Object.defineProperty(t,"CraiIndex",{enumerable:!0,get:function(){return n(o).default}});var s=r(6014);Object.defineProperty(t,"IndexedCramFile",{enumerable:!0,get:function(){return n(s).default}})},6014:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{A(n.next(e))}catch(e){o(e)}}function a(e){try{A(n.throw(e))}catch(e){o(e)}}function A(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}A((n=n.apply(e,t||[])).next())}))},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const o=r(9747),s=i(r(7390));t.default=class{constructor(e){var t;if(this.cram=null!==(t=e.cram)&&void 0!==t?t:new s.default({url:e.cramUrl,path:e.cramPath,filehandle:e.cramFilehandle,seqFetch:e.seqFetch,checkSequenceMD5:e.checkSequenceMD5,cacheSize:e.cacheSize}),!(this.cram instanceof s.default))throw new Error("invalid arguments: no cramfile");this.index=e.index}getRecordsForRange(e,t,r){return n(this,arguments,void 0,(function*(e,t,r,n={}){if(n.viewAsPairs=n.viewAsPairs||!1,n.pairAcrossChr=n.pairAcrossChr||!1,n.maxInsertSize=n.maxInsertSize||2e5,"string"==typeof e)throw new o.CramUnimplementedError("string sequence names not yet supported");const i=e,s=yield this.index.getEntriesForRange(i,t,r),a=n=>n.sequenceId===e&&n.alignmentStart<=r&&void 0!==n.lengthOnRef&&n.alignmentStart+n.lengthOnRef-1>=t,A=yield Promise.all(s.map((e=>this.getRecordsInSlice(e,a))));let f=Array.prototype.concat(...A);if(n.viewAsPairs){const e={},t={};for(const r of f){const n=r.readName;if(void 0===n)throw new Error("readName undefined");const i=r.uniqueId;e[n]||(e[n]=0),e[n]+=1,t[i]=1}const r={};Object.entries(e).forEach((([e,t])=>{1===t&&(r[e]=!0)}));const o=[];for(const e of f){const t=e.readName;if(void 0===t)throw new Error("readName undefined");if(r[t]&&e.mate&&(e.mate.sequenceId===i||n.pairAcrossChr)&&Math.abs(e.alignmentStart-e.mate.alignmentStart)e.toString().localeCompare(t.toString()))).filter(((e,t,r)=>!t||e.toString()!==r[t-1].toString()));const A=[],h=[];for(const e of a){let n=this.cram.featureCache.get(e.toString());n||(n=this.getRecordsInSlice(e,(()=>!0)),this.cram.featureCache.set(e.toString(),n)),A.push(n);const i=n.then((e=>{const n=[];for(const i of e){if(void 0===i.readName)throw new Error("readName undefined");r[i.readName]&&!t[i.uniqueId]&&n.push(i)}return n}));h.push(i)}const l=yield Promise.all(h);if(l.length){const e=l.reduce(((e,t)=>e.concat(t)));f=f.concat(e)}}return f}))}getRecordsInSlice({containerStart:e,sliceStart:t,sliceBytes:r},n){return this.cram.getContainerAtPosition(e).getSlice(t,r).getRecords(n)}hasDataForReferenceSequence(e){return this.index.hasDataForReferenceSequence(e)}}},5931:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RemoteFile=t.LocalFile=void 0,t.open=function(e,t,r){if(r)return r;if(e)return new n.RemoteFile(e);if(t)return new n.LocalFile(t);throw new Error("no url, path, or filehandle provided, cannot open")};const n=r(1113);var i=r(1113);Object.defineProperty(t,"LocalFile",{enumerable:!0,get:function(){return i.LocalFile}}),Object.defineProperty(t,"RemoteFile",{enumerable:!0,get:function(){return i.RemoteFile}})},6476:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RANS_BYTE_L=t.TOTFREQ=t.TF_SHIFT=void 0,t.TF_SHIFT=12,t.TOTFREQ=4096,t.RANS_BYTE_L=1<<23},997:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r,n){let a=e.getInt(),A=e.getInt(),f=e.getInt(),h=e.getInt();const l=n.remaining(),u=-4&l;for(let i=0;i>2;let u=0,c=l,d=2*l,g=3*l,I=0,p=0,C=0,m=0;for(;u{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9747),i=r(6476);class o{constructor(){this.F=void 0,this.C=void 0}}function s(e,t,r,n){return r*(e>>n)+(e&(1<>o)+(e&(1<=128&&(t.fc[A].F&=-129,t.fc[A].F=(127&t.fc[A].F)<<8|255&e.get()),t.fc[A].C=i,s.default.symbolInit(r[A],t.fc[A].C,t.fc[A].F),t.R||(t.R=new Array(o.TOTFREQ)),t.R.fill(A,i,i+t.fc[A].F),i+=t.fc[A].F,0===n&&A+1===(255&e.getByteAt(e.position()))?(A=255&e.get(),n=255&e.get()):0!==n?(n-=1,A+=1):A=255&e.get()}while(0!==A);a(i=128&&(t[i].fc[h].F&=-129,t[i].fc[h].F=(127&t[i].fc[h].F)<<8|255&e.get()),t[i].fc[h].C=f,0===t[i].fc[h].F&&(t[i].fc[h].F=o.TOTFREQ),null==r[i][h]&&(r[i][h]=new s.default.RansDecSymbol),s.default.symbolInit(r[i][h],t[i].fc[h].C,t[i].fc[h].F),null==t[i].R&&(t[i].R=new Array(o.TOTFREQ)),t[i].R.fill(h,f,f+t[i].fc[h].F),f+=t[i].fc[h].F,a(f<=o.TOTFREQ),0===A&&h+1===(255&e.getByteAt(e.position()))?(h=255&e.get(),A=255&e.get()):0!==A?(A-=1,h+=1):h=255&e.get()}while(0!==h);0===n&&i+1===(255&e.getByteAt(e.position()))?(i=255&e.get(),n=255&e.get()):0!==n?(n-=1,i+=1):i=255&e.get()}while(0!==i)};const i=r(9747),o=r(6476),s=n(r(488));function a(e){if(!e)throw new i.CramMalformedError("assertion failed")}},9989:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r=0){if(0===e.length)return t.fill(0),t;const n=new l(e,r),u=n.get();if(0!==u&&1!==u)throw new o.CramMalformedError(`Invalid rANS order ${u}`);if(n.getInt()!==n.remaining()-h)throw new o.CramMalformedError("Incorrect input length.");const c=n.getInt(),d=new l(t||i.Buffer.allocUnsafe(c));if(d.length{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseHeaderText=function(e){const t=e.split(/\r?\n/),r=[];for(const e of t){const[t,...n]=e.split(/\t/);t&&r.push({tag:t.slice(1),data:n.map((e=>{const t=e.indexOf(":");return-1!==t?{tag:e.slice(0,t),value:e.slice(t+1)}:{tag:e,value:""}}))})}return r}},8712:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.unzip=function(e){return i.Buffer.from((0,n.inflate)(e))};const n=r(1668),i=r(8287)},635:(e,t,r)=>{var n=r(8287).Buffer;const i=r(4646),o=r(8706),s=r(9614),a=r(235),A=128;e.exports=class{decode(e){return this.stream=new o(e),this.decodeStream(this.stream)}decodeStream(e,t=0){var r=this.stream.ReadByte();16&r||(t=this.stream.ReadUint7());var n,i=t,o=1&r;if(8&r)return this.decodeStripe(this.stream,t);if(r&A&&([n,i]=this.decodePackMeta(this.stream)),32&r)var s=this.decodeCat(this.stream,i);else s=4&r?this.decodeExt(this.stream,i):64&r?o?this.decodeRLE1(this.stream,i):this.decodeRLE0(this.stream,i):o?this.decode1(this.stream,i):this.decode0(this.stream,i);return r&A&&(s=this.decodePack(s,n,t)),s}encode(e,t){if(this.stream=new o("",0,1.1*e.length+100),this.stream.WriteByte(t),16&t||this.stream.WriteUint7(e.length),8&t)return n.concat([this.stream.buf.slice(0,this.stream.pos),this.encodeStripe(this.stream,e,t>>8)]);var r,i=1&t,s=e.length;return t&A&&([r,e,s]=this.encodePack(e)),t&A&&this.stream.WriteStream(r),64&t?i?this.encodeRLE1(e,s,this.stream):this.encodeRLE0(e,s,this.stream):i?this.encode1(e,s,this.stream):this.encode0(e,s,this.stream)}decode0(e,t){var r=new n.allocUnsafe(t),o=e.ReadByte();0==o&&(o=256);var a=new s(o),A=new i(e);A.RangeStartDecode(e);for(var f=0;f=3?3:h;for(A[l].ModelEncode(r,f,u),h-=u,l=256;3==u;)u=h>=3?3:h,A[l].ModelEncode(r,f,u),l=257,h-=u}return f.RangeFinishEncode(r),r.buf.slice(0,r.pos)}decodeRLE1(e,t){var r=new n.allocUnsafe(t),o=e.ReadByte();0==o&&(o=256);for(var a=new Array(o),A=0;A=3?3:l;for(A[u].ModelEncode(r,f,c),l-=c,u=256;3==c;)c=l>=3?3:l,A[u].ModelEncode(r,f,c),u=257,l-=c}return f.RangeFinishEncode(r),r.buf.slice(0,r.pos)}decodePackMeta(e){this.nsym=e.ReadByte();for(var t=new Array(this.nsym),r=0;r>=1}}else if(this.nsym<=4)for(o=0,s=0;o>=2;else{if(!(this.nsym<=16))return e;for(o=0,s=0;o>=4}return i}packMeta(e){for(var t=new o("",0,1024),r=new Array(256),n=0;ns),n[s]=new Array(i[s]);for(var a=0,A=0;As),a[s]=this.decodeStream(e,o[s]);var A=new n.allocUnsafe(t);for(s=0;s{e.exports=class{constructor(e){this.low=0,this.range=4294967295,this.code=0,this.FFnum=0,this.carry=0,this.cache=0}RangeStartDecode(e){for(var t=0;t<5;t++)this.code=(this.code<<8)+e.ReadByte();this.code&=4294967295,this.code>>>=0}RangeGetFrequency(e){return this.range=Math.floor(this.range/e),Math.floor(this.code/this.range)}RangeDecode(e,t,r,n){for(this.code-=t*this.range,this.range*=r;this.range<1<<24;)this.range*=256,this.code=256*this.code+e.ReadByte()}RangeShiftLow(e){if(this.low<4278190080|this.carry){for(e.WriteByte(this.cache+this.carry);this.FFnum;)e.WriteByte(this.carry-1),this.FFnum--;this.cache=this.low>>>24,this.carry=0}else this.FFnum++;this.low<<=8,this.low>>>=0}RangeEncode(e,t,r,n){var i=this.low;for(this.range=Math.floor(this.range/n),this.low+=t*this.range,this.low>>>=0,this.range*=r,this.low{e.exports=class{constructor(e=256){this.total_freq=e,this.max_sym=e-1,this.S=new Array,this.F=new Array;for(var t=0;t<=this.max_sym;t++)this.S[t]=t,this.F[t]=1}ModelDecode(e,t){for(var r=t.RangeGetFrequency(this.total_freq),n=0,i=0;n+this.F[i]<=r;)n+=this.F[i++];t.RangeDecode(e,n,this.F[i],this.total_freq),this.F[i]+=16,this.total_freq+=16,this.total_freq>65519&&this.ModelRenormalise();var o=this.S[i];if(i>0&&this.F[i]>this.F[i-1]){var s=this.F[i];this.F[i]=this.F[i-1],this.F[i-1]=s,s=this.S[i],this.S[i]=this.S[i-1],this.S[i-1]=s}return o}ModelRenormalise(){this.total_freq=0;for(var e=0;e<=this.max_sym;e++)this.F[e]-=Math.floor(this.F[e]/2),this.total_freq+=this.F[e]}ModelEncode(e,t,r){for(var n=0,i=0;this.S[i]!=r;i++)n+=this.F[i];if(t.RangeEncode(e,n,this.F[i],this.total_freq),this.F[i]+=16,this.total_freq+=16,this.total_freq>65519&&this.ModelRenormalise(),r=this.S[i],i>0&&this.F[i]>this.F[i-1]){var o=this.F[i];this.F[i]=this.F[i-1],this.F[i-1]=o,o=this.S[i],this.S[i]=this.S[i-1],this.S[i-1]=o}}}},6038:(e,t,r)=>{var n=r(8287).Buffer;const i=r(8706),o=r(9614),s=r(4646);function a(e,t,r){for(var n=0,i=0,o=-1,s=new Array(1024);i>4,t.qshift=15&r,r=e.ReadByte(),t.qloc=r>>4,t.sloc=15&r,r=e.ReadByte(),t.ploc=r>>4,t.dloc=15&r,t.qmap=new Array(256),t.pflags&l)for(var n=0;n0&&t.pflags&d)a(e,t.qtab,256);else for(n=0;n<256;n++)t.qtab[n]=n;return t.ptab=new Array(1024),t.pflags&u&&a(e,t.ptab,1024),t.dtab=new Array(256),t.pflags&c&&a(e,t.dtab,256),t}function p(e,t,r,n,i,o){r.max_sel>0?i.s=n.sel.ModelDecode(e,t):i.s=0,i.x=r.stab[i.s];var s=r.params[i.x];if(s.fixed_len>=0){var a=n.len[0].ModelDecode(e,t);a|=n.len[1].ModelDecode(e,t)<<8,a|=n.len[2].ModelDecode(e,t)<<16,a|=n.len[3].ModelDecode(e,t)<<24,s.fixed_len>0&&(s.fixed_len=-a)}else a=-s.fixed_len;i.len=a,r.do_rev&&(o[i.rec]=n.rev.ModelDecode(e,t)),i.is_dup=0,s.pflags&A&&n.dup.ModelDecode(e,t)&&(i.is_dup=1),i.p=a,i.delta=0,i.qctx=0,i.prevq=0,i.rec++}function C(e,t,r){for(var n=0,i=0,o=new Array(2*r),s=0;n1?r.nparam-1:0,o=new Array(256);if(2&r)i=e.ReadByte(),a(e,o,256);else{for(var s=0;s0&&(t.sel=new o(e.max_sel+1)),t}(i),l=new s(e);l.RangeStartDecode(e);for(var u=new n.allocUnsafe(r),c={qctx:0,prevq:0,delta:0,p:0,s:0,x:0,len:0,is_dup:0,rec:0},d=0;d0&&h.dup.ModelDecode(e,l)){for(var C=0;C4),qshift:l,qloc:7,pbits:7,pshift:t[0]>128?1:0,ploc:0,dbits:l>4?0:1,dshift:3,dloc:15,sbits:0,sloc:15,do_stab:0,context:0,max_sym:A,nsym:a,do_qmap:u,do_dedup:0,fixed_len:1==t.length?1:0,do_sel:0,do_rev:0,do_pos:1,do_delta:l<=4?1:0,do_qtab:0,qbits:8+(l>4)-(0==s),sbits:1,sloc:15-(l<=4),do_stab:1,do_sel:1}]}(e,t,r,n),w=function(e,t,r,n,i,o,s){for(var a=[0,1,1,1,2,2,2,2,2,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7],g=0;g1?1:0)|(t[0].do_stab?2:0);if(e.WriteByte(I),1&I&&e.WriteByte(t.length),2&I){var p=1<0&&p--,e.WriteByte(p),C(e,s,256)}for(var m=0;m0){for(g=0;g<256;g++)n[m][g]=g;t[m].do_qtab&&C(e,n[m],256)}if(t[m].pbits>0){for(g=0;g<1024;g++)i[m][g]=Math.min((1<>t[m].pshift);C(e,i[m],1024)}if(t[m].dbits>0){for(g=0;g<256;g++)a[g]>(1<>t[m].dshift)];C(e,o[m],256)}}return e}(w,B,n,a,g,I,p);return function(e,t,r,n,i,a,A,f,h,l){var u=1<0&&u--;for(var c=t.length,d=0,g=0;g0&&m.ModelEncode(e,B,y);var _=l[y],E=r[Math.min(r.length-1,w++)];i[_].fixed_len?i[_].fixed_len>0&&(C[0].ModelEncode(e,B,255&E),C[1].ModelEncode(e,B,E>>8&255),C[2].ModelEncode(e,B,E>>16&255),C[3].ModelEncode(e,B,E>>24&255),i[_].fixed_len=-1):(C[0].ModelEncode(e,B,255&E),C[1].ModelEncode(e,B,E>>8&255),C[2].ModelEncode(e,B,E>>16&255),C[3].ModelEncode(e,B,E>>24&255)),i[_].do_dedup&&process.exit(1),g=E;var v=0,b=i[_].context,Q=0,S=0}var k=t[p++],D=a[_][k];I[b].ModelEncode(e,B,D),Q=(Q<0&&(b+=f[_][Math.min(g,1023)]<0&&(b+=h[_][Math.min(v,255)]<{"use strict";var n=r(8287).Buffer,i=r(5460),o=r(8223),s=r(635),a=r(6038),A=r(5997);e.exports={r4x8_uncompress:function(e,t){i.decode(e).copy(t,0,0)},r4x16_uncompress:function(e,t){o.decode(e).copy(t,0,0)},arith_uncompress:function(e,t){s.decode(e).copy(t,0,0)},fqzcomp_uncompress:function(e,t){var r=new Array;a.decode(e,r).copy(t,0,0)},tok3_uncompress:function(e,t){var r=A.decode(e,0,"\0");n.from(r,"binary").copy(t,0,0)}}},8706:(e,t,r)=>{var n=r(8287).Buffer;e.exports=class{constructor(e,t=0,r=0){0!=r?(this.buf=n.allocUnsafe(r),this.length=r):(this.buf=e,this.length=e.length),this.pos=t}EOF(){return this.pos>=this.length}ReadData(e){var t=this.buf.slice(this.pos,this.pos+e);return this.pos+=e,t}ReadByte(){const e=this.buf[this.pos];return this.pos++,e}ReadChar(){const e=this.buf[this.pos];return this.pos++,String.fromCharCode(e)}ReadUint16(){return this.ReadByte()|this.ReadByte()<<8}ReadUint32(){const e=this.buf.readInt32LE(this.pos);return this.pos+=4,e}ReadString(){var e="";do{var t=this.buf[this.pos++];t&&(e+=String.fromCharCode(t))}while(t);return e}ReadUint7(){var e=0;do{var t=this.ReadByte();e=e<<7|127&t}while(128&t);return e}ReadITF8(){var e=this.buf[this.pos];return this.pos++,e>=240?(e=(15&e)<<28,e+=(this.buf[this.pos+0]<<20)+(this.buf[this.pos+1]<<12)+(this.buf[this.pos+2]<<4)+(this.buf[this.pos+3]>>4),this.pos+=4):e>=224?(e=(15&e)<<24,e+=(this.buf[this.pos+0]<<16)+(this.buf[this.pos+1]<<8)+(0|this.buf[this.pos+2]),this.pos+=3):e>=192?(e=(31&e)<<16,e+=(this.buf[this.pos+0]<<8)+(0|this.buf[this.pos+1]),this.pos+=2):e>=128&&(e=(63&e)<<8,e+=this.buf[this.pos],this.pos++),e}WriteByte(e){this.buf[this.pos++]=e}WriteChar(e){this.buf[this.pos++]=e.charCodeAt(0)}WriteString(e){for(var t=0;t>8&255)}WriteUint32(e){this.buf.writeInt32LE(e,this.pos),this.pos+=4}WriteUint7(e){var t=0,r=e;do{t+=7,r>>=7}while(r>0);do{t-=7,this.WriteByte((e>>t&127)+((t>0)<<7))}while(t>0)}WriteITF8(e){e<0&&(e=1+e),e<=127?this.buf[this.pos++]=e:e<=16383?(this.buf[this.pos++]=128|Math.floor(e/256),this.buf[this.pos++]=255&e):e<131071?(this.buf[this.pos++]=192|Math.floor(e/65536),this.buf[this.pos++]=255&Math.floor(e/256),this.buf[this.pos++]=255&e):e<268435455?(this.buf[this.pos++]=224|Math.floor(e/16777216),this.buf[this.pos++]=255&Math.floor(e/65536),this.buf[this.pos++]=255&Math.floor(e/256),this.buf[this.pos++]=255&e):(this.buf[this.pos++]=240|Math.floor(e/268435456),this.buf[this.pos++]=255&Math.floor(e/1048576),this.buf[this.pos++]=255&Math.floor(e/4096),this.buf[this.pos++]=255&Math.floor(e/4),this.buf[this.pos++]=15&e)}WriteByteNeg(e){this.buf[--this.pos]=e}}},5460:(e,t,r)=>{var n=r(8287).Buffer;const i=r(8706);function o(e){return 4095&e}function s(e,t){for(var r=0;t>=e[r+1];)r++;return r}function a(e){for(var t=new Array(4096),r=0,n=0;n<4096;n++){for(;n>=e[r+1];)r++;t[n]=r}return t}function A(e,t,r){return r*(e>>12)+(4095&e)-t}function f(e,t){for(;t<1<<23;)t=(t<<8)+e.ReadByte();return t}function h(e,t){t.WriteByteNeg(e>>24&255),t.WriteByteNeg(e>>16&255),t.WriteByteNeg(e>>8&255),t.WriteByteNeg(255&e)}function l(e,t,r,n,i){return e=function(e,t,r,n){for(var i=(1<<23>>n<<8)*r;e>=i;)t.WriteByteNeg(255&e),e>>=8;return e}(e,t,n,i),(Math.floor(e/n)<0?(s--,i++):(i=e.ReadByte())==o+1&&(s=e.ReadByte()),o=i}while(0!=i);for(r[0]=0,n=0;n<=255;n++)r[n+1]=r[n]+t[n]}function c(e){for(var t=0,r=0;r<256;r++)t+=e[r];const n=4096;var i=n/t;do{var o=0,s=0,a=0;for(t=0,r=0;r<256;r++)0!=e[r]&&(o2?e[s]-=t-n:t!=n&&(i*=.99,a=1)}while(a)}function d(e,t){for(var r=0,n=0;n<256;n++)if(t[n]){if(r>0)r--;else if(e.WriteByte(n),n>0&&t[n-1]>0){for(r=n+1;r<256&&t[r];r++);r-=n+1,e.WriteByte(r)}e.WriteITF8(t[n])}e.WriteByte(0)}e.exports={decode:function(e){var t=new i(e),r=t.ReadByte(),h=(t.ReadUint32(),t.ReadUint32());return 0==r?function(e,t){var r=new Array(256),i=new Array(256);u(e,r,i);for(var s=a(i),h=new Array(4),l=0;l<4;l++)h[l]=e.ReadUint32();var c=new n.allocUnsafe(t);for(l=0;l0?(a--,o++):(o=e.ReadByte())==s+1&&(a=e.ReadByte()),s=o}while(0!=o)}(e,r,i);for(var h=new Array(256),l=0;l<256;l++)h[l]=a(i[l]);for(var c=new Array(4),d=new Array(4),g=0;g<4;g++)c[g]=e.ReadUint32(),d[g]=0;var I=new n.allocUnsafe(t),p=Math.floor(t/4);for(l=0;l=0;a--)A[a%4]=l(A[a%4],u,s[e[a]],o[e[a]],12);for(a=3;a>=0;a--)h(A[a],u);var g=r.pos;return r.buf.writeInt32LE(g-9+(u.length-u.pos),1),r.buf.writeInt32LE(t,5),n.concat([r.buf.slice(0,r.pos),u.buf.slice(u.pos,u.length)],r.pos+u.length-u.pos)}(e):function(e){const t=e.length;var r=new i("",0,198156);r.WriteByte(1),r.WriteUint32(0),r.WriteUint32(0);for(var o=new Array(256),s=new Array(256),a=new Array(256),A=0;A<256;A++)s[A]=new Array(256),a[A]=new Array(256);for(function(e,t,r){for(var n=0;n<256;n++){r[n]=0;for(var i=0;i<256;i++)t[n][i]=0}var o=0;for(n=0;n>2)]]++,t[0][e[2*(e.length>>2)]]++,t[0][e[3*(e.length>>2)]]++,r[0]+=3}(e,s,o),function(e,t){for(var r=0;r<256;r++)t[r]&&c(e[r])}(s,o),function(e,t,r){for(var n=0,i=0;i<256;i++)if(r[i]){if(n>0)n--;else if(e.WriteByte(i),i>0&&r[i-1]>0){for(n=i+1;n<256&&r[n];n++);n-=i+1,e.WriteByte(n)}d(e,t[i])}e.WriteByte(0)}(r,s,o),A=0;A<256;A++)if(o[A]){a[A][0]=0;for(var f=1;f<256;f++)a[A][f]=a[A][f-1]+s[A][f-1]}var u=new Array(4),g=new Array(4);for(f=0;f<4;f++)u[f]=1<<23,g[f]=0;var I=new i("",t,t),p=Math.floor(t/4),C=new Array(4),m=new Array(4);for(f=0;f<4;f++)C[f]=(f+1)*p-2,m[f]=e[C[f]+1];for(m[3]=e[t-1],A=t-2;A>4*p-2;A--)u[3]=l(u[3],I,a[e[A]][m[3]],s[e[A]][m[3]],12),m[3]=e[A];for(;C[0]>=0;)for(f=3;f>=0;f--){var B=e[C[f]];u[f]=l(u[f],I,a[B][m[f]],s[B][m[f]],12),m[f]=B,C[f]--}for(f=3;f>=0;f--)u[f]=l(u[f],I,a[0][m[f]],s[0][m[f]],12);for(A=3;A>=0;A--)h(u[A],I);var w=r.pos;return r.buf.writeInt32LE(w-9+(I.length-I.pos),1),r.buf.writeInt32LE(t,5),n.concat([r.buf.slice(0,r.pos),I.buf.slice(I.pos,I.length)],r.pos+I.length-I.pos)}(e)}}},8223:(e,t,r)=>{var n=r(8287).Buffer;const i=r(8706);function o(e,t){return e&(1<=e[r+1];)r++;return r}function a(e,t){for(var r=1<=e[i+1];)i++;n[o]=i}return n}function A(e,t,r,n){return r*(e>>n)+(e&(1<>24&255),t.WriteByteNeg(e>>16&255),t.WriteByteNeg(e>>8&255),t.WriteByteNeg(255&e)}function l(e,t,r,n,i){return e=function(e,t,r,n){for(var i=(1<<31-n)*r;e>=i;)t.WriteByteNeg(e>>8&255),t.WriteByteNeg(255&e),e>>=16;return e}(e,t,n,i),(Math.floor(e/n)<s),n[s]=new Array(o[s]);for(var a=0,A=0;As),a[s]=c(e,o[s]);var A=new n.allocUnsafe(t);for(s=0;s>4,h=e;if(1&c){var l=e.ReadUint7(),u=e.ReadUint7(),c=new i(e.ReadData(u));h=new i(I(c,l))}var d=new Array(256),p=new Array(256);!function(e,t,r,n){for(var i=0;i<256;i++){t[i]=new Array(256),r[i]=new Array(256);for(var o=0;o<256;o++)t[i][o]=0}var s=g(e);for(i=0;i<256;i++)if(s[i]){var a=0;for(o=0;o<256;o++)s[o]&&(a>0?a--:(t[i][o]=e.ReadUint7(),0==t[i][o]&&(a=e.ReadByte())));for(C(t[i],n),r[i][0]=0,o=0;o<256;o++)r[i][o+1]=r[i][o]+t[i][o]}}(h,d,p,r);for(var m=new Array(256),B=0;B<256;B++)m[B]=a(p[B],r);for(var w=new Array(4),y=new Array(4),_=0;_<4;_++)w[_]=e.ReadUint32(),y[_]=0;var E=new n.allocUnsafe(t),v=Math.floor(t/4);for(B=0;B>=1}else if(r<=4)for(a=0;a>=2;else if(r<=16)for(a=0;a>=4;return o}(v,B,w,m)),v}function d(e,t){var r=new i("",0,10);r.WriteByte(t);var o=1&t,s=8&t,a=32&t,A=64&t,f=128&t,c=t>>8;if(16&t||r.WriteUint7(e.length),s)return n.concat([r.buf.slice(0,r.pos),u(0,e,c)]);var d=new n.alloc(0);f&&([d,e]=function(e){for(var t=new Array(256),r=0;r<256;r++)t[r]=0;for(r=0;r0&&(o[r]=s++);if(!(s>16)){if(s<=1)var a=new n.allocUnsafe(0);else if(s<=2){a=new n.allocUnsafe(Math.ceil(e.length/8));var A=-1;for(r=0;r0&&(t[r]=A++,f.WriteByte(r));return f.WriteUint7(a.length),[f.buf.slice(0,f.pos),a]}}(e));var g=new n.alloc(0);if(A&&([g,e]=function(e){for(var t=new Array(256),r=0;r<256;r++)t[r]=0;var o=-1;for(r=0;r0&&s++;for(s||(s=1,t[0]=1),(h=new i("",0,s+1+e.length)).WriteByte(s),r=0;r<256;r++)t[r]>0&&h.WriteByte(r);var a=new n.allocUnsafe(e.length),A=0;for(r=0;r0){o=e[r];for(var f=0;r+f+1>2)]]++,t[0][e[2*(e.length>>2)]]++,t[0][e[3*(e.length>>2)]]++,r[0]+=3})(e,s,o),function(e,t){for(var r=0;r<256;r++)if(t[r]){var n=Math.ceil(Math.log2(t[r]));n>12&&(n=12),p(e[r],n)}}(s,o);var u=new i("",0,198156);!function(e,t,r){m(e,r);for(var n=0;n<256;n++)if(r[n])for(var i=0,o=0;o<256;o++)if(r[o])if(i)i--;else if(e.WriteUint7(t[n][o]),!t[n][o]){for(var s=o+1;s<256;s++)if(r[s]){if(0!=t[n][s])break;i++}e.WriteByte(i)}}(u,s,o);var c=B(u.buf.slice(0,u.pos));for(c.length4*y-2;A--)g[3]=l(g[3],w,a[e[A]][E[3]],s[e[A]][E[3]],f),E[3]=e[A];for(;_[0]>=0;)for(d=3;d>=0;d--){var v=e[_[d]];g[d]=l(g[d],w,a[v][E[d]],s[v][E[d]],f),E[d]=v,_[d]--}for(d=3;d>=0;d--)g[d]=l(g[d],w,a[0][E[d]],s[0][E[d]],f);for(A=3;A>=0;A--)h(g[A],w);return n.concat([r.buf.slice(0,r.pos),w.buf.slice(w.pos,w.length)],r.pos+w.length-w.pos)}(e);return n.concat([r.buf.slice(0,r.pos),d,g,I])}function g(e){for(var t=new Array(256),r=0;r<256;r++)t[r]=0;var n=0,i=e.ReadByte(),o=i;do{t[i]=1,n>0?(n--,i++):(i=e.ReadByte())==o+1&&(n=e.ReadByte()),o=i}while(0!=i);return t}function I(e,t){var r=new Array(256),i=new Array(256);!function(e,t,r){for(var n=0;n<256;n++)t[n]=0;var i=g(e);for(n=0;n<256;n++)i[n]>0&&(t[n]=e.ReadUint7());for(C(t,12),r[0]=0,n=0;n<=255;n++)r[n+1]=r[n]+t[n]}(e,r,i);for(var s=a(i,12),h=new Array(4),l=0;l<4;l++)h[l]=e.ReadUint32();var u=new n.allocUnsafe(t);for(l=0;l2?e[a]-=r-i:r!=i&&(o=i/r,A=1)}while(A)}function C(e,t){for(var r=0,n=0;n<256;n++)r+=e[n];if(0!=r&&r!=1<0)r--;else if(e.WriteByte(n),n>0&&t[n-1]>0){for(r=n+1;r<256&&t[r];r++);r-=n+1,e.WriteByte(r)}e.WriteByte(0)}function B(e){const t=e.length;var r=new i("",0,780),o=new Array(256);!function(e,t){for(var r=0;r<256;r++)t[r]=0;for(r=0;r12&&(s=12),p(o,s),function(e,t){m(e,t);for(var r=0;r<256;r++)t[r]&&e.WriteUint7(t[r])}(r,o),p(o,12);var a=new Array(256);a[0]=0;for(var A=1;A<256;A++)a[A]=a[A-1]+o[A-1];var f=new Array(4);for(A=0;A<4;A++)f[A]=32768;var u=new i("",1.05*t+100|0,1.05*t+100|0);for(A=t-1;A>=0;A--)f[A%4]=l(f[A%4],u,a[e[A]],o[e[A]],12);for(A=3;A>=0;A--)h(f[A],u);return n.concat([r.buf.slice(0,r.pos),u.buf.slice(u.pos,u.length)],r.pos+u.length-u.pos)}e.exports={decode:function(e){return c(new i(e),0)},encode:d}},5997:(e,t,r)=>{var n=r(8287).Buffer;const i=r(8706),o=r(8223);var s=new(r(635));function a(e,t){for(var r=e+"";r.length0&&5==t[s][0].type)&&t[s][r])switch(e[0].WriteByte(t[s][r].type),t[s][r].type){case 6:e[6].WriteUint32(t[s][r].val);break;case 5:e[5].WriteUint32(t[s][r].val);break;case 1:e[1].WriteString(t[s][r].val);break;case 2:e[2].WriteChar(t[s][r].val);break;case 7:e[7].WriteUint32(t[s][r].val);break;case 3:e[3].WriteUint32(t[s][r].val),e[4].WriteByte(t[s][r].val.length);break;case 8:case 9:e[t[s][r].type].WriteByte(t[s][r].val)}}function h(e,t,r,n){for(var i=0;i<=12;i++)if(!(e[i].pos<=0)){n.WriteByte(i+(0==i?128:0)),e[i]=e[i].buf.slice(0,e[i].pos);var o=l(e[i],r);n.WriteUint7(o.length),n.WriteData(o,o.length)}}function l(e,t){var r,n=1<<30,i=[0,1,64,65,128,129,201];for(var a in i){var A=i[a];if(!(1&A&&e.length<100||8&A&&e.length%4!=0)){try{var f=t?s.encode(e,A):o.encode(e,A)}catch(e){f=0}f&&n>f.length&&(n=f.length,r=f)}}return r}function u(e,t,r,n,i){var o=0,s=i-1;e[i]=new Array(256),t[n]?e[i][0]={type:5,val:i-t[n]}:e[i][0]={type:6,val:0==i?0:1},t[n]=i;for(var a=n.match(/([a-zA-Z0-9]{1,9})|([^a-zA-Z0-9]+)/g),A=0;A=0&&e[s][f])if(e[s][f].str==a[A])h=10,l="";else if(7==e[s][f].type||8==e[s][f].type){var u=l-e[s][f].str;r[f]++,u>=0&&u<256&&r[f]>i/2&&(h=8,l=u)}else 3!=e[s][f].type&&9!=e[s][f].type||e[s][f].str.length!=l.length||(u=l-e[s][f].str,r[f]++,u>=0&&u<256&&r[f]>i/2&&(h=9,l=u));e[i][f]={str:a[A],val:l,type:h},o{"use strict";t.byteLength=function(e){var t=a(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){var t,r,o=a(e),s=o[0],A=o[1],f=new i(function(e,t,r){return 3*(t+r)/4-r}(0,s,A)),h=0,l=A>0?s-4:s;for(r=0;r>16&255,f[h++]=t>>8&255,f[h++]=255&t;return 2===A&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,f[h++]=255&t),1===A&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,f[h++]=t>>8&255,f[h++]=255&t),f},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,o=[],s=16383,a=0,f=n-i;af?f:a+s));return 1===i?(t=e[n-1],o.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],o.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"=")),o.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0;s<64;++s)r[s]=o[s],n[o.charCodeAt(s)]=s;function a(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function A(e,t,n){for(var i,o,s=[],a=t;a>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return s.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},8287:(e,t,r)=>{"use strict";const n=r(7526),i=r(251),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=A,t.SlowBuffer=function(e){return+e!=e&&(e=0),A.alloc(+e)},t.INSPECT_MAX_BYTES=50;const s=2147483647;function a(e){if(e>s)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,A.prototype),t}function A(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return l(e)}return f(e,t,r)}function f(e,t,r){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!A.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const r=0|g(e,t);let n=a(r);const i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}(e,t);if(ArrayBuffer.isView(e))return function(e){if(j(e,Uint8Array)){const t=new Uint8Array(e);return c(t.buffer,t.byteOffset,t.byteLength)}return u(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(j(e,ArrayBuffer)||e&&j(e.buffer,ArrayBuffer))return c(e,t,r);if("undefined"!=typeof SharedArrayBuffer&&(j(e,SharedArrayBuffer)||e&&j(e.buffer,SharedArrayBuffer)))return c(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return A.from(n,t,r);const i=function(e){if(A.isBuffer(e)){const t=0|d(e.length),r=a(t);return 0===r.length||e.copy(r,0,0,t),r}return void 0!==e.length?"number"!=typeof e.length||Z(e.length)?a(0):u(e):"Buffer"===e.type&&Array.isArray(e.data)?u(e.data):void 0}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return A.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function h(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function l(e){return h(e),a(e<0?0:0|d(e))}function u(e){const t=e.length<0?0:0|d(e.length),r=a(t);for(let n=0;n=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return 0|e}function g(e,t){if(A.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||j(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return Y(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return W(e).length;default:if(i)return n?-1:Y(e).length;t=(""+t).toLowerCase(),i=!0}}function I(e,t,r){let n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return D(this,t,r);case"utf8":case"utf-8":return b(this,t,r);case"ascii":return S(this,t,r);case"latin1":case"binary":return k(this,t,r);case"base64":return v(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function p(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function C(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),Z(r=+r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=A.from(t,n)),A.isBuffer(t))return 0===t.length?-1:m(e,t,r,n,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):m(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function m(e,t,r,n,i){let o,s=1,a=e.length,A=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;s=2,a/=2,A/=2,r/=2}function f(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(i){let n=-1;for(o=r;oa&&(r=a-A),o=r;o>=0;o--){let r=!0;for(let n=0;ni&&(n=i):n=i;const o=t.length;let s;for(n>o/2&&(n=o/2),s=0;s>8,i=r%256,o.push(i),o.push(n);return o}(t,e.length-r),e,r,n)}function v(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function b(e,t,r){r=Math.min(e.length,r);const n=[];let i=t;for(;i239?4:t>223?3:t>191?2:1;if(i+s<=r){let r,n,a,A;switch(s){case 1:t<128&&(o=t);break;case 2:r=e[i+1],128==(192&r)&&(A=(31&t)<<6|63&r,A>127&&(o=A));break;case 3:r=e[i+1],n=e[i+2],128==(192&r)&&128==(192&n)&&(A=(15&t)<<12|(63&r)<<6|63&n,A>2047&&(A<55296||A>57343)&&(o=A));break;case 4:r=e[i+1],n=e[i+2],a=e[i+3],128==(192&r)&&128==(192&n)&&128==(192&a)&&(A=(15&t)<<18|(63&r)<<12|(63&n)<<6|63&a,A>65535&&A<1114112&&(o=A))}}null===o?(o=65533,s=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),i+=s}return function(e){const t=e.length;if(t<=Q)return String.fromCharCode.apply(String,e);let r="",n=0;for(;nn.length?(A.isBuffer(t)||(t=A.from(t)),t.copy(n,i)):Uint8Array.prototype.set.call(n,t,i);else{if(!A.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(n,i)}i+=t.length}return n},A.byteLength=g,A.prototype._isBuffer=!0,A.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;tr&&(e+=" ... "),""},o&&(A.prototype[o]=A.prototype.inspect),A.prototype.compare=function(e,t,r,n,i){if(j(e,Uint8Array)&&(e=A.from(e,e.offset,e.byteLength)),!A.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;let o=(i>>>=0)-(n>>>=0),s=(r>>>=0)-(t>>>=0);const a=Math.min(o,s),f=this.slice(n,i),h=e.slice(t,r);for(let e=0;e>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}const i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let o=!1;for(;;)switch(n){case"hex":return B(this,e,t,r);case"utf8":case"utf-8":return w(this,e,t,r);case"ascii":case"latin1":case"binary":return y(this,e,t,r);case"base64":return _(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},A.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const Q=4096;function S(e,t,r){let n="";r=Math.min(e.length,r);for(let i=t;in)&&(r=n);let i="";for(let n=t;nr)throw new RangeError("Trying to access beyond buffer length")}function M(e,t,r,n,i,o){if(!A.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function N(e,t,r,n,i){P(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=s,s>>=8,e[r++]=s,s>>=8,e[r++]=s,s>>=8,e[r++]=s,r}function x(e,t,r,n,i){P(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r+7]=o,o>>=8,e[r+6]=o,o>>=8,e[r+5]=o,o>>=8,e[r+4]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=s,s>>=8,e[r+2]=s,s>>=8,e[r+1]=s,s>>=8,e[r]=s,r+8}function U(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function L(e,t,r,n,o){return t=+t,r>>>=0,o||U(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function q(e,t,r,n,o){return t=+t,r>>>=0,o||U(e,0,r,8),i.write(e,t,r,n,52,8),r+8}A.prototype.slice=function(e,t){const r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t>>=0,t>>>=0,r||F(e,t,this.length);let n=this[e],i=1,o=0;for(;++o>>=0,t>>>=0,r||F(e,t,this.length);let n=this[e+--t],i=1;for(;t>0&&(i*=256);)n+=this[e+--t]*i;return n},A.prototype.readUint8=A.prototype.readUInt8=function(e,t){return e>>>=0,t||F(e,1,this.length),this[e]},A.prototype.readUint16LE=A.prototype.readUInt16LE=function(e,t){return e>>>=0,t||F(e,2,this.length),this[e]|this[e+1]<<8},A.prototype.readUint16BE=A.prototype.readUInt16BE=function(e,t){return e>>>=0,t||F(e,2,this.length),this[e]<<8|this[e+1]},A.prototype.readUint32LE=A.prototype.readUInt32LE=function(e,t){return e>>>=0,t||F(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},A.prototype.readUint32BE=A.prototype.readUInt32BE=function(e,t){return e>>>=0,t||F(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},A.prototype.readBigUInt64LE=V((function(e){H(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||G(e,this.length-8);const n=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,i=this[++e]+256*this[++e]+65536*this[++e]+r*2**24;return BigInt(n)+(BigInt(i)<>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||G(e,this.length-8);const n=t*2**24+65536*this[++e]+256*this[++e]+this[++e],i=this[++e]*2**24+65536*this[++e]+256*this[++e]+r;return(BigInt(n)<>>=0,t>>>=0,r||F(e,t,this.length);let n=this[e],i=1,o=0;for(;++o=i&&(n-=Math.pow(2,8*t)),n},A.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||F(e,t,this.length);let n=t,i=1,o=this[e+--n];for(;n>0&&(i*=256);)o+=this[e+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o},A.prototype.readInt8=function(e,t){return e>>>=0,t||F(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},A.prototype.readInt16LE=function(e,t){e>>>=0,t||F(e,2,this.length);const r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},A.prototype.readInt16BE=function(e,t){e>>>=0,t||F(e,2,this.length);const r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},A.prototype.readInt32LE=function(e,t){return e>>>=0,t||F(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},A.prototype.readInt32BE=function(e,t){return e>>>=0,t||F(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},A.prototype.readBigInt64LE=V((function(e){H(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||G(e,this.length-8);const n=this[e+4]+256*this[e+5]+65536*this[e+6]+(r<<24);return(BigInt(n)<>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||G(e,this.length-8);const n=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(n)<>>=0,t||F(e,4,this.length),i.read(this,e,!0,23,4)},A.prototype.readFloatBE=function(e,t){return e>>>=0,t||F(e,4,this.length),i.read(this,e,!1,23,4)},A.prototype.readDoubleLE=function(e,t){return e>>>=0,t||F(e,8,this.length),i.read(this,e,!0,52,8)},A.prototype.readDoubleBE=function(e,t){return e>>>=0,t||F(e,8,this.length),i.read(this,e,!1,52,8)},A.prototype.writeUintLE=A.prototype.writeUIntLE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||M(this,e,t,r,Math.pow(2,8*r)-1,0);let i=1,o=0;for(this[t]=255&e;++o>>=0,r>>>=0,n||M(this,e,t,r,Math.pow(2,8*r)-1,0);let i=r-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r},A.prototype.writeUint8=A.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,1,255,0),this[t]=255&e,t+1},A.prototype.writeUint16LE=A.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},A.prototype.writeUint16BE=A.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},A.prototype.writeUint32LE=A.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},A.prototype.writeUint32BE=A.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},A.prototype.writeBigUInt64LE=V((function(e,t=0){return N(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),A.prototype.writeBigUInt64BE=V((function(e,t=0){return x(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),A.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);M(this,e,t,r,n-1,-n)}let i=0,o=1,s=0;for(this[t]=255&e;++i>>=0,!n){const n=Math.pow(2,8*r-1);M(this,e,t,r,n-1,-n)}let i=r-1,o=1,s=0;for(this[t+i]=255&e;--i>=0&&(o*=256);)e<0&&0===s&&0!==this[t+i+1]&&(s=1),this[t+i]=(e/o|0)-s&255;return t+r},A.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},A.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},A.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},A.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},A.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},A.prototype.writeBigInt64LE=V((function(e,t=0){return N(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),A.prototype.writeBigInt64BE=V((function(e,t=0){return x(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),A.prototype.writeFloatLE=function(e,t,r){return L(this,e,t,!0,r)},A.prototype.writeFloatBE=function(e,t,r){return L(this,e,t,!1,r)},A.prototype.writeDoubleLE=function(e,t,r){return q(this,e,t,!0,r)},A.prototype.writeDoubleBE=function(e,t,r){return q(this,e,t,!1,r)},A.prototype.copy=function(e,t,r,n){if(!A.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function P(e,t,r,n,i,o){if(e>r||e3?0===t||t===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(o+1)}${n}`:`>= -(2${n} ** ${8*(o+1)-1}${n}) and < 2 ** ${8*(o+1)-1}${n}`:`>= ${t}${n} and <= ${r}${n}`,new T.ERR_OUT_OF_RANGE("value",i,e)}!function(e,t,r){H(t,"offset"),void 0!==e[t]&&void 0!==e[t+r]||G(t,e.length-(r+1))}(n,i,o)}function H(e,t){if("number"!=typeof e)throw new T.ERR_INVALID_ARG_TYPE(t,"number",e)}function G(e,t,r){if(Math.floor(e)!==e)throw H(e,r),new T.ERR_OUT_OF_RANGE(r||"offset","an integer",e);if(t<0)throw new T.ERR_BUFFER_OUT_OF_BOUNDS;throw new T.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}O("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),O("ERR_INVALID_ARG_TYPE",(function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`}),TypeError),O("ERR_OUT_OF_RANGE",(function(e,t,r){let n=`The value of "${e}" is out of range.`,i=r;return Number.isInteger(r)&&Math.abs(r)>2**32?i=z(String(r)):"bigint"==typeof r&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=z(i)),i+="n"),n+=` It must be ${t}. Received ${i}`,n}),RangeError);const J=/[^+/0-9A-Za-z-_]/g;function Y(e,t){let r;t=t||1/0;const n=e.length;let i=null;const o=[];for(let s=0;s55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function W(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(J,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function K(e,t,r,n){let i;for(i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function j(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function Z(e){return e!=e}const $=function(){const e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){const n=16*r;for(let i=0;i<16;++i)t[n+i]=e[r]+e[i]}return t}();function V(e){return"undefined"==typeof BigInt?X:e}function X(){throw new Error("BigInt not supported")}},235:e=>{var t={array:function(e){var t=0,r=0,n=[0,1,3,7,15,31,63,127,255];return function(i){for(var o=0;i>0;){var s=8-t;i>=s?(o<<=s,o|=n[s]&e[r++],t=0,i-=s):(o<<=i,o|=(e[r]&n[i]<<8-i-t)>>8-i-t,t+=i,i=0)}return o}},simple:function(e){var r,n,i=t.header(e),o=[],s=0;do{-1!=(n=t.decompress(e,i))&&(o.push(n),s+=n.byteLength)}while(-1!=n);r=new Uint8Array(s),s=0;for(var a=0;a9)throw"Not a BZIP archive";return t},decompress:function(e,t,r){for(var n=9e5,i="",o=0;o<6;o++)i+=e(8).toString(16);if("177245385090"==i)return-1;if("314159265359"!=i)throw"eek not valid bzip data";if(e(32),e(1))throw"unsupported obsolete version";var s=e(24);if(s>n)throw"Initial position larger than buffer size";var a=e(16),A=new Uint8Array(256),f=0;for(o=0;o<16;o++)if(a&1<<15-o){var h=e(16);for(g=0;g<16;g++)h&1<<15-g&&(A[f++]=16*o+g)}var l=e(3);if(l<2||l>6)throw"another error";var u=e(15);if(0==u)throw"meh";var c=[];for(o=0;o=l)throw"whoops another error";var I=c[g];c.splice(g,1),c.splice(0,0,I),d[o]=I}var p=f+2,C=[];for(g=0;g20)throw"I gave up a while ago on writing error messages";if(!e(1))break;e(1)?a--:a++}y[o]=a}for(m=B=y[0],o=1;oB?B=y[o]:y[o]=u)throw"meow i'm a kitty, that's an error";E=(w=C[d[k++]]).base.subarray(1),v=w.limit.subarray(1)}for(g=e(o=w.minLen);;){if(o>w.maxLen)throw"rawr i'm a dinosaur";if(g<=v[o])break;o++,g=g<<1|e(1)}if((g-=E[o])<0||g>=258)throw"moo i'm a cow";var F=w.permute[g];if(0!=F&&1!=F){if(Q){if(Q=0,S+a>=n)throw"Boom.";for(D[I=A[c[0]]]+=a;a--;)R[S++]=I}if(F>f)break;if(S>=n)throw"I can't think of anything. Error";I=c[o=F-1],c.splice(o,1),c.splice(0,0,I),D[I=A[I]]++,R[S++]=I}else Q||(Q=1,a=0),a+=0==F?Q:2*Q,Q<<=1}if(s<0||s>=S)throw"I'm a monkey and I'm throwing something at someone, namely you";for(g=0,o=0;o<256;o++)h=g+D[o],D[o]=g,g=h;for(o=0;o>=8,x=-1);var U,L,q,T=new Uint8Array(n),O=0;for(r||(r=1/0);S;){for(S--,L=N,N=255&(M=R[M]),M>>=8,3==x++?(U=N,q=L,N=-1):(U=1,q=N);U--;)if(T[O++]=q,! --r)return T;N!=L&&(x=0)}return T.subarray(0,O)}};e.exports=t},2151:e=>{var t={utf8:{stringToBytes:function(e){return t.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(t.bin.bytesToString(e)))}},bin:{stringToBytes:function(e){for(var t=[],r=0;r{var t,r;t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r={rotl:function(e,t){return e<>>32-t},rotr:function(e,t){return e<<32-t|e>>>t},endian:function(e){if(e.constructor==Number)return 16711935&r.rotl(e,8)|4278255360&r.rotl(e,24);for(var t=0;t0;e--)t.push(Math.floor(256*Math.random()));return t},bytesToWords:function(e){for(var t=[],r=0,n=0;r>>5]|=e[r]<<24-n%32;return t},wordsToBytes:function(e){for(var t=[],r=0;r<32*e.length;r+=8)t.push(e[r>>>5]>>>24-r%32&255);return t},bytesToHex:function(e){for(var t=[],r=0;r>>4).toString(16)),t.push((15&e[r]).toString(16));return t.join("")},hexToBytes:function(e){for(var t=[],r=0;r>>6*(3-o)&63)):r.push("=");return r.join("")},base64ToBytes:function(e){e=e.replace(/[^A-Z0-9+\/]/gi,"");for(var r=[],n=0,i=0;n>>6-2*i);return r}},e.exports=r},1113:(e,t,r)=>{"use strict";r.r(t),r.d(t,{BlobFile:()=>f,LocalFile:()=>i(),RemoteFile:()=>a,fromUrl:()=>h,open:()=>l});var n=r(3617),i=r.n(n),o=r(8287);function s(e){return("object"==typeof e&&null!==e&&"message"in e?e.message:`${e}`).replace(/\.$/,"")}class a{async getBufferFromResponse(e){const t=await e.arrayBuffer();return o.Buffer.from(t)}constructor(e,t={}){this.baseOverrides={},this.url=e;const r=t.fetch||globalThis.fetch.bind(globalThis);if(!r)throw new TypeError("no fetch function supplied, and none found in global environment");t.overrides&&(this.baseOverrides=t.overrides),this.fetchImplementation=r}async fetch(e,t){let r;try{r=await this.fetchImplementation(e,t)}catch(n){if(!`${n}`.includes("Failed to fetch"))throw new Error(`${s(n)} fetching ${e}`,{cause:n});console.warn(`generic-filehandle: refetching ${e} to attempt to work around chrome CORS header caching bug`);try{r=await this.fetchImplementation(e,{...t,cache:"reload"})}catch(t){throw new Error(`${s(t)} fetching ${e}`,{cause:t})}}return r}async read(e,t=0,r,n=0,i={}){const{headers:o={},signal:s,overrides:a={}}=i;r<1/0?o.range=`bytes=${n}-${n+r}`:r===1/0&&0!==n&&(o.range=`bytes=${n}-`);const A=await this.fetch(this.url,{...this.baseOverrides,...a,headers:{...o,...a.headers,...this.baseOverrides.headers},method:"GET",redirect:"follow",mode:"cors",signal:s});if(!A.ok)throw new Error(`HTTP ${A.status} fetching ${this.url}`);if(200===A.status&&0===n||206===A.status){const n=await this.getBufferFromResponse(A),i=n.copy(e,t,0,Math.min(r,n.length)),o=A.headers.get("content-range"),s=/\/(\d+)$/.exec(o||"");return(null==s?void 0:s[1])&&(this._stat={size:parseInt(s[1],10)}),{bytesRead:i,buffer:e}}if(200===A.status)throw new Error(`${this.url} fetch returned status 200, expected 206`);throw new Error(`HTTP ${A.status} fetching ${this.url}`)}async readFile(e={}){let t,r;"string"==typeof e?(t=e,r={}):(t=e.encoding,r=e,delete r.encoding);const{headers:n={},signal:i,overrides:o={}}=r,s=await this.fetch(this.url,{headers:n,method:"GET",redirect:"follow",mode:"cors",signal:i,...this.baseOverrides,...o});if(200!==s.status)throw new Error(`HTTP ${s.status} fetching ${this.url}`);if("utf8"===t)return s.text();if(t)throw new Error(`unsupported encoding: ${t}`);return this.getBufferFromResponse(s)}async stat(){if(!this._stat){const e=o.Buffer.allocUnsafe(10);if(await this.read(e,0,10,0),!this._stat)throw new Error(`unable to determine size of file at ${this.url}`)}return this._stat}async close(){}}function A(e){const t=new FileReader;return new Promise(((r,n)=>{t.onerror=()=>{t.abort(),n(new Error("problem reading blob"))},t.onabort=()=>{n(new Error("blob reading was aborted"))},t.onload=()=>{t.result&&"string"!=typeof t.result?r(t.result):n(new Error("unknown error reading blob"))},t.readAsArrayBuffer(e)}))}class f{constructor(e){this.blob=e,this.size=e.size}async read(e,t=0,r,n=0){if(!r)return{bytesRead:0,buffer:e};const i=n,s=i+r,a=await A(this.blob.slice(i,s)),f=o.Buffer.from(a);return{bytesRead:f.copy(e,t),buffer:f}}async readFile(e){const t="string"==typeof e?e:null==e?void 0:e.encoding;if("utf8"===t)return function(e){const t=new FileReader;return new Promise(((r,n)=>{t.onerror=()=>{t.abort(),n(new Error("problem reading blob"))},t.onabort=()=>{n(new Error("blob reading was aborted"))},t.onload=()=>{t.result&&"string"==typeof t.result?r(t.result):n(new Error("unknown error reading blob"))},t.readAsText(e)}))}(this.blob);if(t)throw new Error(`unsupported encoding: ${t}`);const r=await A(this.blob);return o.Buffer.from(r)}async stat(){return{size:this.size}}async close(){}}function h(e,t={}){return new a(e,t)}function l(e,t,r,n={}){if(void 0!==r)return r;if(void 0!==e)return h(e,n);if(void 0!==t)return new(i())(t,n);throw new Error("no url, path, or filehandle provided, cannot open")}},251:(e,t)=>{t.read=function(e,t,r,n,i){var o,s,a=8*i-n-1,A=(1<>1,h=-7,l=r?i-1:0,u=r?-1:1,c=e[t+l];for(l+=u,o=c&(1<<-h)-1,c>>=-h,h+=a;h>0;o=256*o+e[t+l],l+=u,h-=8);for(s=o&(1<<-h)-1,o>>=-h,h+=n;h>0;s=256*s+e[t+l],l+=u,h-=8);if(0===o)o=1-f;else{if(o===A)return s?NaN:1/0*(c?-1:1);s+=Math.pow(2,n),o-=f}return(c?-1:1)*s*Math.pow(2,o-n)},t.write=function(e,t,r,n,i,o){var s,a,A,f=8*o-i-1,h=(1<>1,u=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,c=n?0:o-1,d=n?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=h):(s=Math.floor(Math.log(t)/Math.LN2),t*(A=Math.pow(2,-s))<1&&(s--,A*=2),(t+=s+l>=1?u/A:u*Math.pow(2,1-l))*A>=2&&(s++,A/=2),s+l>=h?(a=0,s=h):s+l>=1?(a=(t*A-1)*Math.pow(2,i),s+=l):(a=t*Math.pow(2,l-1)*Math.pow(2,i),s=0));i>=8;e[r+c]=255&a,c+=d,a/=256,i-=8);for(s=s<0;e[r+c]=255&s,c+=d,s/=256,f-=8);e[r+c-d]|=128*g}},8570:e=>{e.exports=r;var t=null;try{t=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch(e){}function r(e,t,r){this.low=0|e,this.high=0|t,this.unsigned=!!r}function n(e){return!0===(e&&e.__isLong__)}r.prototype.__isLong__,Object.defineProperty(r.prototype,"__isLong__",{value:!0}),r.isLong=n;var i={},o={};function s(e,t){var r,n,s;return t?(s=0<=(e>>>=0)&&e<256)&&(n=o[e])?n:(r=A(e,(0|e)<0?-1:0,!0),s&&(o[e]=r),r):(s=-128<=(e|=0)&&e<128)&&(n=i[e])?n:(r=A(e,e<0?-1:0,!1),s&&(i[e]=r),r)}function a(e,t){if(isNaN(e))return t?p:I;if(t){if(e<0)return p;if(e>=c)return y}else{if(e<=-d)return _;if(e+1>=d)return w}return e<0?a(-e,t).neg():A(e%u|0,e/u|0,t)}function A(e,t,n){return new r(e,t,n)}r.fromInt=s,r.fromNumber=a,r.fromBits=A;var f=Math.pow;function h(e,t,r){if(0===e.length)throw Error("empty string");if("NaN"===e||"Infinity"===e||"+Infinity"===e||"-Infinity"===e)return I;if("number"==typeof t?(r=t,t=!1):t=!!t,(r=r||10)<2||360)throw Error("interior hyphen");if(0===n)return h(e.substring(1),t,r).neg();for(var i=a(f(r,8)),o=I,s=0;s>>0:this.low},E.toNumber=function(){return this.unsigned?(this.high>>>0)*u+(this.low>>>0):this.high*u+(this.low>>>0)},E.toString=function(e){if((e=e||10)<2||36>>0).toString(e);if((o=A).isZero())return h+s;for(;h.length<6;)h="0"+h;s=""+h+s}},E.getHighBits=function(){return this.high},E.getHighBitsUnsigned=function(){return this.high>>>0},E.getLowBits=function(){return this.low},E.getLowBitsUnsigned=function(){return this.low>>>0},E.getNumBitsAbs=function(){if(this.isNegative())return this.eq(_)?64:this.neg().getNumBitsAbs();for(var e=0!=this.high?this.high:this.low,t=31;t>0&&!(e&1<=0},E.isOdd=function(){return!(1&~this.low)},E.isEven=function(){return!(1&this.low)},E.equals=function(e){return n(e)||(e=l(e)),(this.unsigned===e.unsigned||this.high>>>31!=1||e.high>>>31!=1)&&this.high===e.high&&this.low===e.low},E.eq=E.equals,E.notEquals=function(e){return!this.eq(e)},E.neq=E.notEquals,E.ne=E.notEquals,E.lessThan=function(e){return this.comp(e)<0},E.lt=E.lessThan,E.lessThanOrEqual=function(e){return this.comp(e)<=0},E.lte=E.lessThanOrEqual,E.le=E.lessThanOrEqual,E.greaterThan=function(e){return this.comp(e)>0},E.gt=E.greaterThan,E.greaterThanOrEqual=function(e){return this.comp(e)>=0},E.gte=E.greaterThanOrEqual,E.ge=E.greaterThanOrEqual,E.compare=function(e){if(n(e)||(e=l(e)),this.eq(e))return 0;var t=this.isNegative(),r=e.isNegative();return t&&!r?-1:!t&&r?1:this.unsigned?e.high>>>0>this.high>>>0||e.high===this.high&&e.low>>>0>this.low>>>0?-1:1:this.sub(e).isNegative()?-1:1},E.comp=E.compare,E.negate=function(){return!this.unsigned&&this.eq(_)?_:this.not().add(C)},E.neg=E.negate,E.add=function(e){n(e)||(e=l(e));var t=this.high>>>16,r=65535&this.high,i=this.low>>>16,o=65535&this.low,s=e.high>>>16,a=65535&e.high,f=e.low>>>16,h=0,u=0,c=0,d=0;return c+=(d+=o+(65535&e.low))>>>16,u+=(c+=i+f)>>>16,h+=(u+=r+a)>>>16,h+=t+s,A((c&=65535)<<16|(d&=65535),(h&=65535)<<16|(u&=65535),this.unsigned)},E.subtract=function(e){return n(e)||(e=l(e)),this.add(e.neg())},E.sub=E.subtract,E.multiply=function(e){if(this.isZero())return I;if(n(e)||(e=l(e)),t)return A(t.mul(this.low,this.high,e.low,e.high),t.get_high(),this.unsigned);if(e.isZero())return I;if(this.eq(_))return e.isOdd()?_:I;if(e.eq(_))return this.isOdd()?_:I;if(this.isNegative())return e.isNegative()?this.neg().mul(e.neg()):this.neg().mul(e).neg();if(e.isNegative())return this.mul(e.neg()).neg();if(this.lt(g)&&e.lt(g))return a(this.toNumber()*e.toNumber(),this.unsigned);var r=this.high>>>16,i=65535&this.high,o=this.low>>>16,s=65535&this.low,f=e.high>>>16,h=65535&e.high,u=e.low>>>16,c=65535&e.low,d=0,p=0,C=0,m=0;return C+=(m+=s*c)>>>16,p+=(C+=o*c)>>>16,C&=65535,p+=(C+=s*u)>>>16,d+=(p+=i*c)>>>16,p&=65535,d+=(p+=o*u)>>>16,p&=65535,d+=(p+=s*h)>>>16,d+=r*c+i*u+o*h+s*f,A((C&=65535)<<16|(m&=65535),(d&=65535)<<16|(p&=65535),this.unsigned)},E.mul=E.multiply,E.divide=function(e){if(n(e)||(e=l(e)),e.isZero())throw Error("division by zero");var r,i,o;if(t)return this.unsigned||-2147483648!==this.high||-1!==e.low||-1!==e.high?A((this.unsigned?t.div_u:t.div_s)(this.low,this.high,e.low,e.high),t.get_high(),this.unsigned):this;if(this.isZero())return this.unsigned?p:I;if(this.unsigned){if(e.unsigned||(e=e.toUnsigned()),e.gt(this))return p;if(e.gt(this.shru(1)))return m;o=p}else{if(this.eq(_))return e.eq(C)||e.eq(B)?_:e.eq(_)?C:(r=this.shr(1).div(e).shl(1)).eq(I)?e.isNegative()?C:B:(i=this.sub(e.mul(r)),o=r.add(i.div(e)));if(e.eq(_))return this.unsigned?p:I;if(this.isNegative())return e.isNegative()?this.neg().div(e.neg()):this.neg().div(e).neg();if(e.isNegative())return this.div(e.neg()).neg();o=I}for(i=this;i.gte(e);){r=Math.max(1,Math.floor(i.toNumber()/e.toNumber()));for(var s=Math.ceil(Math.log(r)/Math.LN2),h=s<=48?1:f(2,s-48),u=a(r),c=u.mul(e);c.isNegative()||c.gt(i);)c=(u=a(r-=h,this.unsigned)).mul(e);u.isZero()&&(u=C),o=o.add(u),i=i.sub(c)}return o},E.div=E.divide,E.modulo=function(e){return n(e)||(e=l(e)),t?A((this.unsigned?t.rem_u:t.rem_s)(this.low,this.high,e.low,e.high),t.get_high(),this.unsigned):this.sub(this.div(e).mul(e))},E.mod=E.modulo,E.rem=E.modulo,E.not=function(){return A(~this.low,~this.high,this.unsigned)},E.and=function(e){return n(e)||(e=l(e)),A(this.low&e.low,this.high&e.high,this.unsigned)},E.or=function(e){return n(e)||(e=l(e)),A(this.low|e.low,this.high|e.high,this.unsigned)},E.xor=function(e){return n(e)||(e=l(e)),A(this.low^e.low,this.high^e.high,this.unsigned)},E.shiftLeft=function(e){return n(e)&&(e=e.toInt()),0==(e&=63)?this:e<32?A(this.low<>>32-e,this.unsigned):A(0,this.low<>>e|this.high<<32-e,this.high>>e,this.unsigned):A(this.high>>e-32,this.high>=0?0:-1,this.unsigned)},E.shr=E.shiftRight,E.shiftRightUnsigned=function(e){if(n(e)&&(e=e.toInt()),0==(e&=63))return this;var t=this.high;return e<32?A(this.low>>>e|t<<32-e,t>>>e,this.unsigned):A(32===e?t:t>>>e-32,0,this.unsigned)},E.shru=E.shiftRightUnsigned,E.shr_u=E.shiftRightUnsigned,E.toSigned=function(){return this.unsigned?A(this.low,this.high,!1):this},E.toUnsigned=function(){return this.unsigned?this:A(this.low,this.high,!0)},E.toBytes=function(e){return e?this.toBytesLE():this.toBytesBE()},E.toBytesLE=function(){var e=this.high,t=this.low;return[255&t,t>>>8&255,t>>>16&255,t>>>24,255&e,e>>>8&255,e>>>16&255,e>>>24]},E.toBytesBE=function(){var e=this.high,t=this.low;return[e>>>24,e>>>16&255,e>>>8&255,255&e,t>>>24,t>>>16&255,t>>>8&255,255&t]},r.fromBytes=function(e,t,n){return n?r.fromBytesLE(e,t):r.fromBytesBE(e,t)},r.fromBytesLE=function(e,t){return new r(e[0]|e[1]<<8|e[2]<<16|e[3]<<24,e[4]|e[5]<<8|e[6]<<16|e[7]<<24,t)},r.fromBytesBE=function(e,t){return new r(e[4]<<24|e[5]<<16|e[6]<<8|e[7],e[0]<<24|e[1]<<16|e[2]<<8|e[3],t)}},3503:(e,t,r)=>{var n,i,o,s,a;n=r(3939),i=r(2151).utf8,o=r(652),s=r(2151).bin,(a=function(e,t){e.constructor==String?e=t&&"binary"===t.encoding?s.stringToBytes(e):i.stringToBytes(e):o(e)?e=Array.prototype.slice.call(e,0):Array.isArray(e)||e.constructor===Uint8Array||(e=e.toString());for(var r=n.bytesToWords(e),A=8*e.length,f=1732584193,h=-271733879,l=-1732584194,u=271733878,c=0;c>>24)|4278255360&(r[c]<<24|r[c]>>>8);r[A>>>5]|=128<>>9<<4)]=A;var d=a._ff,g=a._gg,I=a._hh,p=a._ii;for(c=0;c>>0,h=h+m>>>0,l=l+B>>>0,u=u+w>>>0}return n.endian([f,h,l,u])})._ff=function(e,t,r,n,i,o,s){var a=e+(t&r|~t&n)+(i>>>0)+s;return(a<>>32-o)+t},a._gg=function(e,t,r,n,i,o,s){var a=e+(t&n|r&~n)+(i>>>0)+s;return(a<>>32-o)+t},a._hh=function(e,t,r,n,i,o,s){var a=e+(t^r^n)+(i>>>0)+s;return(a<>>32-o)+t},a._ii=function(e,t,r,n,i,o,s){var a=e+(r^(t|~n))+(i>>>0)+s;return(a<>>32-o)+t},a._blocksize=16,a._digestsize=16,e.exports=function(e,t){if(null==e)throw new Error("Illegal argument "+e);var r=n.wordsToBytes(a(e,t));return t&&t.asBytes?r:t&&t.asString?s.bytesToString(r):n.bytesToHex(r)}},652:e=>{function t(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}e.exports=function(e){return null!=e&&(t(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&t(e.slice(0,0))}(e)||!!e._isBuffer)}},1668:(e,t,r)=>{"use strict";var n={};(0,r(9805).assign)(n,r(3303),r(7083),r(9681)),e.exports=n},3303:(e,t,r)=>{"use strict";var n=r(8411),i=r(9805),o=r(1996),s=r(4674),a=r(4442),A=Object.prototype.toString,f=0,h=-1,l=0,u=8;function c(e){if(!(this instanceof c))return new c(e);this.options=i.assign({level:h,method:u,chunkSize:16384,windowBits:15,memLevel:8,strategy:l,to:""},e||{});var t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new a,this.strm.avail_out=0;var r=n.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(r!==f)throw new Error(s[r]);if(t.header&&n.deflateSetHeader(this.strm,t.header),t.dictionary){var d;if(d="string"==typeof t.dictionary?o.string2buf(t.dictionary):"[object ArrayBuffer]"===A.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,(r=n.deflateSetDictionary(this.strm,d))!==f)throw new Error(s[r]);this._dict_set=!0}}function d(e,t){var r=new c(t);if(r.push(e,!0),r.err)throw r.msg||s[r.err];return r.result}c.prototype.push=function(e,t){var r,s,a=this.strm,h=this.options.chunkSize;if(this.ended)return!1;s=t===~~t?t:!0===t?4:0,"string"==typeof e?a.input=o.string2buf(e):"[object ArrayBuffer]"===A.call(e)?a.input=new Uint8Array(e):a.input=e,a.next_in=0,a.avail_in=a.input.length;do{if(0===a.avail_out&&(a.output=new i.Buf8(h),a.next_out=0,a.avail_out=h),1!==(r=n.deflate(a,s))&&r!==f)return this.onEnd(r),this.ended=!0,!1;0!==a.avail_out&&(0!==a.avail_in||4!==s&&2!==s)||("string"===this.options.to?this.onData(o.buf2binstring(i.shrinkBuf(a.output,a.next_out))):this.onData(i.shrinkBuf(a.output,a.next_out)))}while((a.avail_in>0||0===a.avail_out)&&1!==r);return 4===s?(r=n.deflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===f):2!==s||(this.onEnd(f),a.avail_out=0,!0)},c.prototype.onData=function(e){this.chunks.push(e)},c.prototype.onEnd=function(e){e===f&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},t.Deflate=c,t.deflate=d,t.deflateRaw=function(e,t){return(t=t||{}).raw=!0,d(e,t)},t.gzip=function(e,t){return(t=t||{}).gzip=!0,d(e,t)}},7083:(e,t,r)=>{"use strict";var n=r(1447),i=r(9805),o=r(1996),s=r(9681),a=r(4674),A=r(4442),f=r(7414),h=Object.prototype.toString;function l(e){if(!(this instanceof l))return new l(e);this.options=i.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&(15&t.windowBits||(t.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new A,this.strm.avail_out=0;var r=n.inflateInit2(this.strm,t.windowBits);if(r!==s.Z_OK)throw new Error(a[r]);if(this.header=new f,n.inflateGetHeader(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=o.string2buf(t.dictionary):"[object ArrayBuffer]"===h.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(r=n.inflateSetDictionary(this.strm,t.dictionary))!==s.Z_OK))throw new Error(a[r])}function u(e,t){var r=new l(t);if(r.push(e,!0),r.err)throw r.msg||a[r.err];return r.result}l.prototype.push=function(e,t){var r,a,A,f,l,u=this.strm,c=this.options.chunkSize,d=this.options.dictionary,g=!1;if(this.ended)return!1;a=t===~~t?t:!0===t?s.Z_FINISH:s.Z_NO_FLUSH,"string"==typeof e?u.input=o.binstring2buf(e):"[object ArrayBuffer]"===h.call(e)?u.input=new Uint8Array(e):u.input=e,u.next_in=0,u.avail_in=u.input.length;do{if(0===u.avail_out&&(u.output=new i.Buf8(c),u.next_out=0,u.avail_out=c),(r=n.inflate(u,s.Z_NO_FLUSH))===s.Z_NEED_DICT&&d&&(r=n.inflateSetDictionary(this.strm,d)),r===s.Z_BUF_ERROR&&!0===g&&(r=s.Z_OK,g=!1),r!==s.Z_STREAM_END&&r!==s.Z_OK)return this.onEnd(r),this.ended=!0,!1;u.next_out&&(0!==u.avail_out&&r!==s.Z_STREAM_END&&(0!==u.avail_in||a!==s.Z_FINISH&&a!==s.Z_SYNC_FLUSH)||("string"===this.options.to?(A=o.utf8border(u.output,u.next_out),f=u.next_out-A,l=o.buf2string(u.output,A),u.next_out=f,u.avail_out=c-f,f&&i.arraySet(u.output,u.output,A,f,0),this.onData(l)):this.onData(i.shrinkBuf(u.output,u.next_out)))),0===u.avail_in&&0===u.avail_out&&(g=!0)}while((u.avail_in>0||0===u.avail_out)&&r!==s.Z_STREAM_END);return r===s.Z_STREAM_END&&(a=s.Z_FINISH),a===s.Z_FINISH?(r=n.inflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===s.Z_OK):a!==s.Z_SYNC_FLUSH||(this.onEnd(s.Z_OK),u.avail_out=0,!0)},l.prototype.onData=function(e){this.chunks.push(e)},l.prototype.onEnd=function(e){e===s.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},t.Inflate=l,t.inflate=u,t.inflateRaw=function(e,t){return(t=t||{}).raw=!0,u(e,t)},t.ungzip=u},9805:(e,t)=>{"use strict";var r="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;function n(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var r=t.shift();if(r){if("object"!=typeof r)throw new TypeError(r+"must be non-object");for(var i in r)n(r,i)&&(e[i]=r[i])}}return e},t.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var i={arraySet:function(e,t,r,n,i){if(t.subarray&&e.subarray)e.set(t.subarray(r,r+n),i);else for(var o=0;o{"use strict";var n=r(9805),i=!0,o=!0;try{String.fromCharCode.apply(null,[0])}catch(e){i=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){o=!1}for(var s=new n.Buf8(256),a=0;a<256;a++)s[a]=a>=252?6:a>=248?5:a>=240?4:a>=224?3:a>=192?2:1;function A(e,t){if(t<65534&&(e.subarray&&o||!e.subarray&&i))return String.fromCharCode.apply(null,n.shrinkBuf(e,t));for(var r="",s=0;s>>6,t[s++]=128|63&r):r<65536?(t[s++]=224|r>>>12,t[s++]=128|r>>>6&63,t[s++]=128|63&r):(t[s++]=240|r>>>18,t[s++]=128|r>>>12&63,t[s++]=128|r>>>6&63,t[s++]=128|63&r);return t},t.buf2binstring=function(e){return A(e,e.length)},t.binstring2buf=function(e){for(var t=new n.Buf8(e.length),r=0,i=t.length;r4)f[n++]=65533,r+=o-1;else{for(i&=2===o?31:3===o?15:7;o>1&&r1?f[n++]=65533:i<65536?f[n++]=i:(i-=65536,f[n++]=55296|i>>10&1023,f[n++]=56320|1023&i)}return A(f,n)},t.utf8border=function(e,t){var r;for((t=t||e.length)>e.length&&(t=e.length),r=t-1;r>=0&&128==(192&e[r]);)r--;return r<0||0===r?t:r+s[e[r]]>t?r:t}},3269:e=>{"use strict";e.exports=function(e,t,r,n){for(var i=65535&e,o=e>>>16&65535,s=0;0!==r;){r-=s=r>2e3?2e3:r;do{o=o+(i=i+t[n++]|0)|0}while(--s);i%=65521,o%=65521}return i|o<<16}},9681:e=>{"use strict";e.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},4823:e=>{"use strict";var t=function(){for(var e,t=[],r=0;r<256;r++){e=r;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[r]=e}return t}();e.exports=function(e,r,n,i){var o=t,s=i+n;e^=-1;for(var a=i;a>>8^o[255&(e^r[a])];return~e}},8411:(e,t,r)=>{"use strict";var n,i=r(9805),o=r(3665),s=r(3269),a=r(4823),A=r(4674),f=0,h=0,l=-2,u=2,c=8,d=286,g=30,I=19,p=2*d+1,C=15,m=3,B=258,w=B+m+1,y=42,_=103,E=113,v=666;function b(e,t){return e.msg=A[t],t}function Q(e){return(e<<1)-(e>4?9:0)}function S(e){for(var t=e.length;--t>=0;)e[t]=0}function k(e){var t=e.state,r=t.pending;r>e.avail_out&&(r=e.avail_out),0!==r&&(i.arraySet(e.output,t.pending_buf,t.pending_out,r,e.next_out),e.next_out+=r,t.pending_out+=r,e.total_out+=r,e.avail_out-=r,t.pending-=r,0===t.pending&&(t.pending_out=0))}function D(e,t){o._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,k(e.strm)}function R(e,t){e.pending_buf[e.pending++]=t}function F(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function M(e,t,r,n){var o=e.avail_in;return o>n&&(o=n),0===o?0:(e.avail_in-=o,i.arraySet(t,e.input,e.next_in,o,r),1===e.state.wrap?e.adler=s(e.adler,t,o,r):2===e.state.wrap&&(e.adler=a(e.adler,t,o,r)),e.next_in+=o,e.total_in+=o,o)}function N(e,t){var r,n,i=e.max_chain_length,o=e.strstart,s=e.prev_length,a=e.nice_match,A=e.strstart>e.w_size-w?e.strstart-(e.w_size-w):0,f=e.window,h=e.w_mask,l=e.prev,u=e.strstart+B,c=f[o+s-1],d=f[o+s];e.prev_length>=e.good_match&&(i>>=2),a>e.lookahead&&(a=e.lookahead);do{if(f[(r=t)+s]===d&&f[r+s-1]===c&&f[r]===f[o]&&f[++r]===f[o+1]){o+=2,r++;do{}while(f[++o]===f[++r]&&f[++o]===f[++r]&&f[++o]===f[++r]&&f[++o]===f[++r]&&f[++o]===f[++r]&&f[++o]===f[++r]&&f[++o]===f[++r]&&f[++o]===f[++r]&&os){if(e.match_start=t,s=n,n>=a)break;c=f[o+s-1],d=f[o+s]}}}while((t=l[t&h])>A&&0!=--i);return s<=e.lookahead?s:e.lookahead}function x(e){var t,r,n,o,s,a=e.w_size;do{if(o=e.window_size-e.lookahead-e.strstart,e.strstart>=a+(a-w)){i.arraySet(e.window,e.window,a,a,0),e.match_start-=a,e.strstart-=a,e.block_start-=a,t=r=e.hash_size;do{n=e.head[--t],e.head[t]=n>=a?n-a:0}while(--r);t=r=a;do{n=e.prev[--t],e.prev[t]=n>=a?n-a:0}while(--r);o+=a}if(0===e.strm.avail_in)break;if(r=M(e.strm,e.window,e.strstart+e.lookahead,o),e.lookahead+=r,e.lookahead+e.insert>=m)for(s=e.strstart-e.insert,e.ins_h=e.window[s],e.ins_h=(e.ins_h<=m&&(e.ins_h=(e.ins_h<=m)if(n=o._tr_tally(e,e.strstart-e.match_start,e.match_length-m),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=m){e.match_length--;do{e.strstart++,e.ins_h=(e.ins_h<=m&&(e.ins_h=(e.ins_h<4096)&&(e.match_length=m-1)),e.prev_length>=m&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-m,n=o._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-m),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=i&&(e.ins_h=(e.ins_h<15&&(a=2,n-=16),o<1||o>9||r!==c||n<8||n>15||t<0||t>9||s<0||s>4)return b(e,l);8===n&&(n=9);var A=new T;return e.state=A,A.strm=e,A.wrap=a,A.gzhead=null,A.w_bits=n,A.w_size=1<e.pending_buf_size-5&&(r=e.pending_buf_size-5);;){if(e.lookahead<=1){if(x(e),0===e.lookahead&&t===f)return 1;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var n=e.block_start+r;if((0===e.strstart||e.strstart>=n)&&(e.lookahead=e.strstart-n,e.strstart=n,D(e,!1),0===e.strm.avail_out))return 1;if(e.strstart-e.block_start>=e.w_size-w&&(D(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(D(e,!0),0===e.strm.avail_out?3:4):(e.strstart>e.block_start&&(D(e,!1),e.strm.avail_out),1)})),new q(4,4,8,4,U),new q(4,5,16,8,U),new q(4,6,32,32,U),new q(4,4,16,16,L),new q(8,16,32,32,L),new q(8,16,128,128,L),new q(8,32,128,256,L),new q(32,128,258,1024,L),new q(32,258,258,4096,L)],t.deflateInit=function(e,t){return P(e,t,c,15,8,0)},t.deflateInit2=P,t.deflateReset=z,t.deflateResetKeep=O,t.deflateSetHeader=function(e,t){return e&&e.state?2!==e.state.wrap?l:(e.state.gzhead=t,h):l},t.deflate=function(e,t){var r,i,s,A;if(!e||!e.state||t>5||t<0)return e?b(e,l):l;if(i=e.state,!e.output||!e.input&&0!==e.avail_in||i.status===v&&4!==t)return b(e,0===e.avail_out?-5:l);if(i.strm=e,r=i.last_flush,i.last_flush=t,i.status===y)if(2===i.wrap)e.adler=0,R(i,31),R(i,139),R(i,8),i.gzhead?(R(i,(i.gzhead.text?1:0)+(i.gzhead.hcrc?2:0)+(i.gzhead.extra?4:0)+(i.gzhead.name?8:0)+(i.gzhead.comment?16:0)),R(i,255&i.gzhead.time),R(i,i.gzhead.time>>8&255),R(i,i.gzhead.time>>16&255),R(i,i.gzhead.time>>24&255),R(i,9===i.level?2:i.strategy>=2||i.level<2?4:0),R(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(R(i,255&i.gzhead.extra.length),R(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(e.adler=a(e.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=69):(R(i,0),R(i,0),R(i,0),R(i,0),R(i,0),R(i,9===i.level?2:i.strategy>=2||i.level<2?4:0),R(i,3),i.status=E);else{var u=c+(i.w_bits-8<<4)<<8;u|=(i.strategy>=2||i.level<2?0:i.level<6?1:6===i.level?2:3)<<6,0!==i.strstart&&(u|=32),u+=31-u%31,i.status=E,F(i,u),0!==i.strstart&&(F(i,e.adler>>>16),F(i,65535&e.adler)),e.adler=1}if(69===i.status)if(i.gzhead.extra){for(s=i.pending;i.gzindex<(65535&i.gzhead.extra.length)&&(i.pending!==i.pending_buf_size||(i.gzhead.hcrc&&i.pending>s&&(e.adler=a(e.adler,i.pending_buf,i.pending-s,s)),k(e),s=i.pending,i.pending!==i.pending_buf_size));)R(i,255&i.gzhead.extra[i.gzindex]),i.gzindex++;i.gzhead.hcrc&&i.pending>s&&(e.adler=a(e.adler,i.pending_buf,i.pending-s,s)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=73)}else i.status=73;if(73===i.status)if(i.gzhead.name){s=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>s&&(e.adler=a(e.adler,i.pending_buf,i.pending-s,s)),k(e),s=i.pending,i.pending===i.pending_buf_size)){A=1;break}A=i.gzindexs&&(e.adler=a(e.adler,i.pending_buf,i.pending-s,s)),0===A&&(i.gzindex=0,i.status=91)}else i.status=91;if(91===i.status)if(i.gzhead.comment){s=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>s&&(e.adler=a(e.adler,i.pending_buf,i.pending-s,s)),k(e),s=i.pending,i.pending===i.pending_buf_size)){A=1;break}A=i.gzindexs&&(e.adler=a(e.adler,i.pending_buf,i.pending-s,s)),0===A&&(i.status=_)}else i.status=_;if(i.status===_&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&k(e),i.pending+2<=i.pending_buf_size&&(R(i,255&e.adler),R(i,e.adler>>8&255),e.adler=0,i.status=E)):i.status=E),0!==i.pending){if(k(e),0===e.avail_out)return i.last_flush=-1,h}else if(0===e.avail_in&&Q(t)<=Q(r)&&4!==t)return b(e,-5);if(i.status===v&&0!==e.avail_in)return b(e,-5);if(0!==e.avail_in||0!==i.lookahead||t!==f&&i.status!==v){var d=2===i.strategy?function(e,t){for(var r;;){if(0===e.lookahead&&(x(e),0===e.lookahead)){if(t===f)return 1;break}if(e.match_length=0,r=o._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,r&&(D(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(D(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(D(e,!1),0===e.strm.avail_out)?1:2}(i,t):3===i.strategy?function(e,t){for(var r,n,i,s,a=e.window;;){if(e.lookahead<=B){if(x(e),e.lookahead<=B&&t===f)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=m&&e.strstart>0&&(n=a[i=e.strstart-1])===a[++i]&&n===a[++i]&&n===a[++i]){s=e.strstart+B;do{}while(n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&ie.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=m?(r=o._tr_tally(e,1,e.match_length-m),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(r=o._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),r&&(D(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(D(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(D(e,!1),0===e.strm.avail_out)?1:2}(i,t):n[i.level].func(i,t);if(3!==d&&4!==d||(i.status=v),1===d||3===d)return 0===e.avail_out&&(i.last_flush=-1),h;if(2===d&&(1===t?o._tr_align(i):5!==t&&(o._tr_stored_block(i,0,0,!1),3===t&&(S(i.head),0===i.lookahead&&(i.strstart=0,i.block_start=0,i.insert=0))),k(e),0===e.avail_out))return i.last_flush=-1,h}return 4!==t?h:i.wrap<=0?1:(2===i.wrap?(R(i,255&e.adler),R(i,e.adler>>8&255),R(i,e.adler>>16&255),R(i,e.adler>>24&255),R(i,255&e.total_in),R(i,e.total_in>>8&255),R(i,e.total_in>>16&255),R(i,e.total_in>>24&255)):(F(i,e.adler>>>16),F(i,65535&e.adler)),k(e),i.wrap>0&&(i.wrap=-i.wrap),0!==i.pending?h:1)},t.deflateEnd=function(e){var t;return e&&e.state?(t=e.state.status)!==y&&69!==t&&73!==t&&91!==t&&t!==_&&t!==E&&t!==v?b(e,l):(e.state=null,t===E?b(e,-3):h):l},t.deflateSetDictionary=function(e,t){var r,n,o,a,A,f,u,c,d=t.length;if(!e||!e.state)return l;if(2===(a=(r=e.state).wrap)||1===a&&r.status!==y||r.lookahead)return l;for(1===a&&(e.adler=s(e.adler,t,d,0)),r.wrap=0,d>=r.w_size&&(0===a&&(S(r.head),r.strstart=0,r.block_start=0,r.insert=0),c=new i.Buf8(r.w_size),i.arraySet(c,t,d-r.w_size,r.w_size,0),t=c,d=r.w_size),A=e.avail_in,f=e.next_in,u=e.input,e.avail_in=d,e.next_in=0,e.input=t,x(r);r.lookahead>=m;){n=r.strstart,o=r.lookahead-(m-1);do{r.ins_h=(r.ins_h<{"use strict";e.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},7293:e=>{"use strict";e.exports=function(e,t){var r,n,i,o,s,a,A,f,h,l,u,c,d,g,I,p,C,m,B,w,y,_,E,v,b;r=e.state,n=e.next_in,v=e.input,i=n+(e.avail_in-5),o=e.next_out,b=e.output,s=o-(t-e.avail_out),a=o+(e.avail_out-257),A=r.dmax,f=r.wsize,h=r.whave,l=r.wnext,u=r.window,c=r.hold,d=r.bits,g=r.lencode,I=r.distcode,p=(1<>>=B=m>>>24,d-=B,0==(B=m>>>16&255))b[o++]=65535&m;else{if(!(16&B)){if(64&B){if(32&B){r.mode=12;break e}e.msg="invalid literal/length code",r.mode=30;break e}m=g[(65535&m)+(c&(1<>>=B,d-=B),d<15&&(c+=v[n++]<>>=B=m>>>24,d-=B,16&(B=m>>>16&255)){if(y=65535&m,d<(B&=15)&&(c+=v[n++]<A){e.msg="invalid distance too far back",r.mode=30;break e}if(c>>>=B,d-=B,y>(B=o-s)){if((B=y-B)>h&&r.sane){e.msg="invalid distance too far back",r.mode=30;break e}if(_=0,E=u,0===l){if(_+=f-B,B2;)b[o++]=E[_++],b[o++]=E[_++],b[o++]=E[_++],w-=3;w&&(b[o++]=E[_++],w>1&&(b[o++]=E[_++]))}else{_=o-y;do{b[o++]=b[_++],b[o++]=b[_++],b[o++]=b[_++],w-=3}while(w>2);w&&(b[o++]=b[_++],w>1&&(b[o++]=b[_++]))}break}if(64&B){e.msg="invalid distance code",r.mode=30;break e}m=I[(65535&m)+(c&(1<>3,c&=(1<<(d-=w<<3))-1,e.next_in=n,e.next_out=o,e.avail_in=n{"use strict";var n=r(9805),i=r(3269),o=r(4823),s=r(7293),a=r(1998),A=0,f=-2,h=1,l=12,u=30,c=852,d=592;function g(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function I(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new n.Buf16(320),this.work=new n.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function p(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=h,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new n.Buf32(c),t.distcode=t.distdyn=new n.Buf32(d),t.sane=1,t.back=-1,A):f}function C(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,p(e)):f}function m(e,t){var r,n;return e&&e.state?(n=e.state,t<0?(r=0,t=-t):(r=1+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?f:(null!==n.window&&n.wbits!==t&&(n.window=null),n.wrap=r,n.wbits=t,C(e))):f}function B(e,t){var r,n;return e?(n=new I,e.state=n,n.window=null,(r=m(e,t))!==A&&(e.state=null),r):f}var w,y,_=!0;function E(e){if(_){var t;for(w=new n.Buf32(512),y=new n.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(a(1,e.lens,0,288,w,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;a(2,e.lens,0,32,y,0,e.work,{bits:5}),_=!1}e.lencode=w,e.lenbits=9,e.distcode=y,e.distbits=5}function v(e,t,r,i){var o,s=e.state;return null===s.window&&(s.wsize=1<=s.wsize?(n.arraySet(s.window,t,r-s.wsize,s.wsize,0),s.wnext=0,s.whave=s.wsize):((o=s.wsize-s.wnext)>i&&(o=i),n.arraySet(s.window,t,r-i,o,s.wnext),(i-=o)?(n.arraySet(s.window,t,r-i,i,0),s.wnext=i,s.whave=s.wsize):(s.wnext+=o,s.wnext===s.wsize&&(s.wnext=0),s.whave>>8&255,r.check=o(r.check,O,2,0),B=0,w=0,r.mode=2;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&B)<<8)+(B>>8))%31){e.msg="incorrect header check",r.mode=u;break}if(8!=(15&B)){e.msg="unknown compression method",r.mode=u;break}if(w-=4,x=8+(15&(B>>>=4)),0===r.wbits)r.wbits=x;else if(x>r.wbits){e.msg="invalid window size",r.mode=u;break}r.dmax=1<>8&1),512&r.flags&&(O[0]=255&B,O[1]=B>>>8&255,r.check=o(r.check,O,2,0)),B=0,w=0,r.mode=3;case 3:for(;w<32;){if(0===C)break e;C--,B+=c[I++]<>>8&255,O[2]=B>>>16&255,O[3]=B>>>24&255,r.check=o(r.check,O,4,0)),B=0,w=0,r.mode=4;case 4:for(;w<16;){if(0===C)break e;C--,B+=c[I++]<>8),512&r.flags&&(O[0]=255&B,O[1]=B>>>8&255,r.check=o(r.check,O,2,0)),B=0,w=0,r.mode=5;case 5:if(1024&r.flags){for(;w<16;){if(0===C)break e;C--,B+=c[I++]<>>8&255,r.check=o(r.check,O,2,0)),B=0,w=0}else r.head&&(r.head.extra=null);r.mode=6;case 6:if(1024&r.flags&&((b=r.length)>C&&(b=C),b&&(r.head&&(x=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),n.arraySet(r.head.extra,c,I,b,x)),512&r.flags&&(r.check=o(r.check,c,b,I)),C-=b,I+=b,r.length-=b),r.length))break e;r.length=0,r.mode=7;case 7:if(2048&r.flags){if(0===C)break e;b=0;do{x=c[I+b++],r.head&&x&&r.length<65536&&(r.head.name+=String.fromCharCode(x))}while(x&&b>9&1,r.head.done=!0),e.adler=r.check=0,r.mode=l;break;case 10:for(;w<32;){if(0===C)break e;C--,B+=c[I++]<>>=7&w,w-=7&w,r.mode=27;break}for(;w<3;){if(0===C)break e;C--,B+=c[I++]<>>=1)){case 0:r.mode=14;break;case 1:if(E(r),r.mode=20,6===t){B>>>=2,w-=2;break e}break;case 2:r.mode=17;break;case 3:e.msg="invalid block type",r.mode=u}B>>>=2,w-=2;break;case 14:for(B>>>=7&w,w-=7&w;w<32;){if(0===C)break e;C--,B+=c[I++]<>>16^65535)){e.msg="invalid stored block lengths",r.mode=u;break}if(r.length=65535&B,B=0,w=0,r.mode=15,6===t)break e;case 15:r.mode=16;case 16:if(b=r.length){if(b>C&&(b=C),b>m&&(b=m),0===b)break e;n.arraySet(d,c,I,b,p),C-=b,I+=b,m-=b,p+=b,r.length-=b;break}r.mode=l;break;case 17:for(;w<14;){if(0===C)break e;C--,B+=c[I++]<>>=5,w-=5,r.ndist=1+(31&B),B>>>=5,w-=5,r.ncode=4+(15&B),B>>>=4,w-=4,r.nlen>286||r.ndist>30){e.msg="too many length or distance symbols",r.mode=u;break}r.have=0,r.mode=18;case 18:for(;r.have>>=3,w-=3}for(;r.have<19;)r.lens[z[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,L={bits:r.lenbits},U=a(0,r.lens,0,19,r.lencode,0,r.work,L),r.lenbits=L.bits,U){e.msg="invalid code lengths set",r.mode=u;break}r.have=0,r.mode=19;case 19:for(;r.have>>16&255,R=65535&T,!((k=T>>>24)<=w);){if(0===C)break e;C--,B+=c[I++]<>>=k,w-=k,r.lens[r.have++]=R;else{if(16===R){for(q=k+2;w>>=k,w-=k,0===r.have){e.msg="invalid bit length repeat",r.mode=u;break}x=r.lens[r.have-1],b=3+(3&B),B>>>=2,w-=2}else if(17===R){for(q=k+3;w>>=k)),B>>>=3,w-=3}else{for(q=k+7;w>>=k)),B>>>=7,w-=7}if(r.have+b>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=u;break}for(;b--;)r.lens[r.have++]=x}}if(r.mode===u)break;if(0===r.lens[256]){e.msg="invalid code -- missing end-of-block",r.mode=u;break}if(r.lenbits=9,L={bits:r.lenbits},U=a(1,r.lens,0,r.nlen,r.lencode,0,r.work,L),r.lenbits=L.bits,U){e.msg="invalid literal/lengths set",r.mode=u;break}if(r.distbits=6,r.distcode=r.distdyn,L={bits:r.distbits},U=a(2,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,L),r.distbits=L.bits,U){e.msg="invalid distances set",r.mode=u;break}if(r.mode=20,6===t)break e;case 20:r.mode=21;case 21:if(C>=6&&m>=258){e.next_out=p,e.avail_out=m,e.next_in=I,e.avail_in=C,r.hold=B,r.bits=w,s(e,_),p=e.next_out,d=e.output,m=e.avail_out,I=e.next_in,c=e.input,C=e.avail_in,B=r.hold,w=r.bits,r.mode===l&&(r.back=-1);break}for(r.back=0;D=(T=r.lencode[B&(1<>>16&255,R=65535&T,!((k=T>>>24)<=w);){if(0===C)break e;C--,B+=c[I++]<>F)])>>>16&255,R=65535&T,!(F+(k=T>>>24)<=w);){if(0===C)break e;C--,B+=c[I++]<>>=F,w-=F,r.back+=F}if(B>>>=k,w-=k,r.back+=k,r.length=R,0===D){r.mode=26;break}if(32&D){r.back=-1,r.mode=l;break}if(64&D){e.msg="invalid literal/length code",r.mode=u;break}r.extra=15&D,r.mode=22;case 22:if(r.extra){for(q=r.extra;w>>=r.extra,w-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=23;case 23:for(;D=(T=r.distcode[B&(1<>>16&255,R=65535&T,!((k=T>>>24)<=w);){if(0===C)break e;C--,B+=c[I++]<>F)])>>>16&255,R=65535&T,!(F+(k=T>>>24)<=w);){if(0===C)break e;C--,B+=c[I++]<>>=F,w-=F,r.back+=F}if(B>>>=k,w-=k,r.back+=k,64&D){e.msg="invalid distance code",r.mode=u;break}r.offset=R,r.extra=15&D,r.mode=24;case 24:if(r.extra){for(q=r.extra;w>>=r.extra,w-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){e.msg="invalid distance too far back",r.mode=u;break}r.mode=25;case 25:if(0===m)break e;if(b=_-m,r.offset>b){if((b=r.offset-b)>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=u;break}b>r.wnext?(b-=r.wnext,Q=r.wsize-b):Q=r.wnext-b,b>r.length&&(b=r.length),S=r.window}else S=d,Q=p-r.offset,b=r.length;b>m&&(b=m),m-=b,r.length-=b;do{d[p++]=S[Q++]}while(--b);0===r.length&&(r.mode=21);break;case 26:if(0===m)break e;d[p++]=r.length,m--,r.mode=21;break;case 27:if(r.wrap){for(;w<32;){if(0===C)break e;C--,B|=c[I++]<{"use strict";var n=r(9805),i=[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],o=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],s=[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,0,0],a=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];e.exports=function(e,t,r,A,f,h,l,u){var c,d,g,I,p,C,m,B,w,y=u.bits,_=0,E=0,v=0,b=0,Q=0,S=0,k=0,D=0,R=0,F=0,M=null,N=0,x=new n.Buf16(16),U=new n.Buf16(16),L=null,q=0;for(_=0;_<=15;_++)x[_]=0;for(E=0;E=1&&0===x[b];b--);if(Q>b&&(Q=b),0===b)return f[h++]=20971520,f[h++]=20971520,u.bits=1,0;for(v=1;v0&&(0===e||1!==b))return-1;for(U[1]=0,_=1;_<15;_++)U[_+1]=U[_]+x[_];for(E=0;E852||2===e&&R>592)return 1;for(;;){m=_-k,l[E]C?(B=L[q+l[E]],w=M[N+l[E]]):(B=96,w=0),c=1<<_-k,v=d=1<>k)+(d-=c)]=m<<24|B<<16|w}while(0!==d);for(c=1<<_-1;F&c;)c>>=1;if(0!==c?(F&=c-1,F+=c):F=0,E++,0==--x[_]){if(_===b)break;_=t[r+l[E]]}if(_>Q&&(F&I)!==g){for(0===k&&(k=Q),p+=v,D=1<<(S=_-k);S+k852||2===e&&R>592)return 1;f[g=F&I]=Q<<24|S<<16|p-h}}return 0!==F&&(f[p+F]=_-k<<24|64<<16),u.bits=Q,0}},4674:e=>{"use strict";e.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},3665:(e,t,r)=>{"use strict";var n=r(9805);function i(e){for(var t=e.length;--t>=0;)e[t]=0}var o=256,s=286,a=30,A=15,f=16,h=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],l=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],u=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],c=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],d=new Array(576);i(d);var g=new Array(60);i(g);var I=new Array(512);i(I);var p=new Array(256);i(p);var C=new Array(29);i(C);var m,B,w,y=new Array(a);function _(e,t,r,n,i){this.static_tree=e,this.extra_bits=t,this.extra_base=r,this.elems=n,this.max_length=i,this.has_stree=e&&e.length}function E(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function v(e){return e<256?I[e]:I[256+(e>>>7)]}function b(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function Q(e,t,r){e.bi_valid>f-r?(e.bi_buf|=t<>f-e.bi_valid,e.bi_valid+=r-f):(e.bi_buf|=t<>>=1,r<<=1}while(--t>0);return r>>>1}function D(e,t,r){var n,i,o=new Array(A+1),s=0;for(n=1;n<=A;n++)o[n]=s=s+r[n-1]<<1;for(i=0;i<=t;i++){var a=e[2*i+1];0!==a&&(e[2*i]=k(o[a]++,a))}}function R(e){var t;for(t=0;t8?b(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function M(e,t,r,n){var i=2*t,o=2*r;return e[i]>1;r>=1;r--)N(e,o,r);i=f;do{r=e.heap[1],e.heap[1]=e.heap[e.heap_len--],N(e,o,1),n=e.heap[1],e.heap[--e.heap_max]=r,e.heap[--e.heap_max]=n,o[2*i]=o[2*r]+o[2*n],e.depth[i]=(e.depth[r]>=e.depth[n]?e.depth[r]:e.depth[n])+1,o[2*r+1]=o[2*n+1]=i,e.heap[1]=i++,N(e,o,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],function(e,t){var r,n,i,o,s,a,f=t.dyn_tree,h=t.max_code,l=t.stat_desc.static_tree,u=t.stat_desc.has_stree,c=t.stat_desc.extra_bits,d=t.stat_desc.extra_base,g=t.stat_desc.max_length,I=0;for(o=0;o<=A;o++)e.bl_count[o]=0;for(f[2*e.heap[e.heap_max]+1]=0,r=e.heap_max+1;r<573;r++)(o=f[2*f[2*(n=e.heap[r])+1]+1]+1)>g&&(o=g,I++),f[2*n+1]=o,n>h||(e.bl_count[o]++,s=0,n>=d&&(s=c[n-d]),a=f[2*n],e.opt_len+=a*(o+s),u&&(e.static_len+=a*(l[2*n+1]+s)));if(0!==I){do{for(o=g-1;0===e.bl_count[o];)o--;e.bl_count[o]--,e.bl_count[o+1]+=2,e.bl_count[g]--,I-=2}while(I>0);for(o=g;0!==o;o--)for(n=e.bl_count[o];0!==n;)(i=e.heap[--r])>h||(f[2*i+1]!==o&&(e.opt_len+=(o-f[2*i+1])*f[2*i],f[2*i+1]=o),n--)}}(e,t),D(o,h,e.bl_count)}function L(e,t,r){var n,i,o=-1,s=t[1],a=0,A=7,f=4;for(0===s&&(A=138,f=3),t[2*(r+1)+1]=65535,n=0;n<=r;n++)i=s,s=t[2*(n+1)+1],++a>=7;n0?(2===e.strm.data_type&&(e.strm.data_type=function(e){var t,r=4093624447;for(t=0;t<=31;t++,r>>>=1)if(1&r&&0!==e.dyn_ltree[2*t])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(t=32;t=3&&0===e.bl_tree[2*c[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(e),i=e.opt_len+3+7>>>3,(s=e.static_len+3+7>>>3)<=i&&(i=s)):i=s=r+5,r+4<=i&&-1!==t?O(e,t,r,n):4===e.strategy||s===i?(Q(e,2+(n?1:0),3),x(e,d,g)):(Q(e,4+(n?1:0),3),function(e,t,r,n){var i;for(Q(e,t-257,5),Q(e,r-1,5),Q(e,n-4,4),i=0;i>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&r,e.last_lit++,0===t?e.dyn_ltree[2*r]++:(e.matches++,t--,e.dyn_ltree[2*(p[r]+o+1)]++,e.dyn_dtree[2*v(t)]++),e.last_lit===e.lit_bufsize-1},t._tr_align=function(e){Q(e,2,3),S(e,256,d),function(e){16===e.bi_valid?(b(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}(e)}},4442:e=>{"use strict";e.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},7392:e=>{"use strict";class t{constructor(e={}){if(!(e.maxSize&&e.maxSize>0))throw new TypeError("`maxSize` must be a number greater than 0");this.maxSize=e.maxSize,this.cache=new Map,this.oldCache=new Map,this._size=0}_set(e,t){this.cache.set(e,t),this._size++,this._size>=this.maxSize&&(this._size=0,this.oldCache=this.cache,this.cache=new Map)}get(e){if(this.cache.has(e))return this.cache.get(e);if(this.oldCache.has(e)){const t=this.oldCache.get(e);return this.oldCache.delete(e),this._set(e,t),t}}set(e,t){return this.cache.has(e)?this.cache.set(e,t):this._set(e,t),this}has(e){return this.cache.has(e)||this.oldCache.has(e)}peek(e){return this.cache.has(e)?this.cache.get(e):this.oldCache.has(e)?this.oldCache.get(e):void 0}delete(e){const t=this.cache.delete(e);return t&&this._size--,this.oldCache.delete(e)||t}clear(){this.cache.clear(),this.oldCache.clear(),this._size=0}*keys(){for(const[e]of this)yield e}*values(){for(const[,e]of this)yield e}*[Symbol.iterator](){for(const e of this.cache)yield e;for(const e of this.oldCache){const[t]=e;this.cache.has(t)||(yield e)}}get size(){let e=0;for(const t of this.oldCache.keys())this.cache.has(t)||e++;return this._size+e}}e.exports=t},1307:function(e,t,r){var n;n=e=>(()=>{"use strict";var t=[,e=>{e.exports="data:application/was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ACQf8BcSAALQAAc0ECdEHwiICAAGooAgAgAkEIdnMhAiAAQQFqIQAgAUF/aiIBDQALCyACQX9zC10DAX4BfwF+QgAhAANAQQghASAAIQIDQEIAIAJCAYN9QsKenLzd8pW2SYMgAkIBiIUhAiABQX9qIgENAAsgAKdBA3RB8JCAgABqIAI3AwAgAEIBfCIAQoACUg0ACwtLACACQn+FIQICQCABRQ0AA0AgAkL/AYMgADEAAIWnQQN0QfCQgIAAaikDACACQgiIhSECIABBAWohACABQX9qIgENAAsLIAJCf4UL1RACDH8CfgJAAkAgACgCJEUNACAAKAIAIQIMAQtBACECIABBADoAKCAAQgA3AwAgAEIANwMYIABByABqQQBB5AAQhoCAgAAaIABBrAFqQQw2AgALIAAgASgCBCIDNgIQIABBsAFqIQQgAEHgAGohBSAAQcgAaiEGIABBtgFqIQcgAEGoAWohCCABKAIQIQkCQAJAAkACQANAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIAIOCgECAAQFBgcICQoPCyABKAIAIQogACgCqAEhAiAAKAKsASELIAEoAgQhDCABKAIIIQ0MAgsgCCAAKAKoASIMakEIaiABKAIAIAEoAgQiAmogASgCCCACayICIAAoAqwBIAxrIgwgAiAMSRsiAhCHgICAABogASABKAIEIAJqNgIEQQAhDCAAQQAgACgCqAEgAmoiAiACIAAoAqwBIgtGGzYCqAEgAiALRw0RIABBATYCAAJAIARBqIiAgABBBhCEgICAAEUNAEEFIQwMEgsgB0ECQQAQjYCAgAAgACgAuAFHDRBBBiEMIActAAANESAAIAAtALcBIgI2AiAgAkEESw0RQQEgAnRBE3FFDRELIAEoAgQiDCABKAIIIg1GDQ4CQCABKAIAIgogDGotAAAiCw0AIAAgDDYCECABIAxBAWo2AgRBBiECDAwLQQAhAiAAQQA2AqgBIABBAjYCACAAIAtBAnRBBGoiCzYCrAEgACALNgJACyAIIAJqQQhqIAogDGogDSAMayIMIAsgAmsiAiAMIAJJGyICEIeAgIAAGiABIAIgASgCBGo2AgRBACEMIABBACAA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AmogBDoAAAJAIAAoAiQgACgCICICTw0AIAAgAjYCJAtBACEDAkAgACgCZCIEQQRJDQACQCAEQQlLDQAgBEF9aiEDDAELIARBemohAwsgACADNgJkDAELIAAgDiADayIONgIEIAAgBCADayIDNgIAIA0gDyAPQQV2azsBACAAIApBAXRqIg9B+ANqIQQCQAJAIANB////B00NACAJIQoMAQsgACADQQh0IgM2AgAgACAJQQFqIgo2AhAgACAOQQh0IAAoAgwgCWotAAByIg42AgQLAkACQCAOIANBC3YgBC8BACINbCIJSQ0AIAAgDiAJayIONgIEIAAgAyAJayIDNgIAIAQgDSANQQV2azsBACAPQZAEaiENAkACQCADQf///wdNDQAgCiEQDAELIAAgA0EIdCIDNgIAIAAgCkEBaiIQNgIQIAAgDkEIdCAAKAIMIApqLQAAciIONgIECwJAAkAgDiADQQt2IA0vAQAiCWwiBE8NACANIAlBgBAgCWtBBXZqOwEAIAxB2ARqIQMCQCAEQf///wdLDQAgACAEQQh0IgQ2AgAgACAQQQFqNgIQIAAgDkEIdCAAKAIMIBBqLQAAciIONgIECwJAIA4gBEELdiADLwEAIg1sIglJDQAgACAOIAlrNgIEIAAgBCAJazYCACADIA0gDUEFdms7AQAMAgsgAyANQYAQIA1rQQV2ajsBACAAIAk2AgAgAEEBNgJoIABBCUELIAAoAmRBB0kbNgJkDAMLIAAgDiAEayIONgIEIA0gCSAJQQV2azsBACAPQagEaiENAkACQCADIARrIgNB////B00NACAQIQoMAQsgACADQQh0IgM2AgAgACAQQQFqIgo2AhAgACAOQQh0IAAoAgwgEGotAAByIg42AgQLAkACQCAOIANBC3YgDS8BACIEbCIJTw0AIAAgCTYCACANIARBgBAgBGtBBXZqOwEAIAAoAlghAwwBCyAAIA4gCWsiDjYCBCANIAQgBEEFdms7AQAgD0HABGohBAJAIAMgCWsiA0H///8HSw0AIAAgA0EIdCIDNgIAIAAgCkEBajYCECAAIA5BCHQgACgCDCAKai0AAHIiDjYCBAsCQAJAIA4gA0ELdiAELwEAIg1sIglPDQA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dCIDNgIAIAAgACgCECIJQQFqNgIQIARBCHQgCSAAKAIMai0AAHIhBAsgACADQQF2IgM2AgAgACAEIANrIgRBH3UiCSANQQF0akEBaiINNgJUIAAgCSADcSAEaiIENgIEIA5Bf2oiDg0ACyAAIA1BBHQiCzYCVEEAIQ9BASEOA0AgACAOQQF0Ig5qQbwNaiENAkACQCADQf///wdNDQAgAyEKDAELIAAgA0EIdCIKNgIAIAAgACgCECIDQQFqNgIQIAAgBEEIdCADIAAoAgxqLQAAciIENgIECwJAAkAgBCAKQQt2IA0vAQAiCWwiA0kNACAAIAQgA2siBDYCBCAAIAogA2siAzYCACANIAkgCUEFdms7AQAgAEEBIA90IAtqIgs2AlQgDkEBciEODAELIAAgAzYCACANIAlBgBAgCWtBBXZqOwEACyAPQQFqIg9BBEcNAAsLAkAgASAGIAAoAlQQnoCAgAANAEEADwsgACgCICECCyACIAAoAihJDQALC0EBIQMCQCAAKAIAIgRB////B0sNACAAIARBCHQ2AgBBASEDIAAgACgCECIEQQFqNgIQIAAgACgCBEEIdCAEIAAoAgxqLQAAcjYCBAsgAwtwAQF/AkBBqN4BEICAgIAAIgJFDQAgAkE0aiABNgIAIAJBPGogADYCAAJAAkACQCAAQX9qDgIAAQILIAIgARCAgICAACIANgIYIAANASACEIKAgIAADAILIAJBADYCGCACQThqQQA2AgALIAIPC0EAC9IBAQJ/QQYhAgJAIAFBJ0sNACAAQTBqIAFBAXFBAnIgAUEBdkELanQiATYCAAJAAkAgAEE8aigCACIDRQ0AQQQhAiABIABBNGooAgBLDQIgAEEsaiABNgIAIANBAkcNACAAQThqIgMoAgAgAU8NACAAIAE2AjggACgCGBCCgICAACAAIAAoAjAQgICAgAAiATYCGCABDQBBAyECDAELQQAhAiAAQQA2AkAgAEHQAGpBAToAACAAQegAakEANgIAIABB5N0BaiEDCyADQQA2AgALIAILIwACQCAAQTxqKAIARQ0AIAAoAhgQgoCAgAALIAAQgoCAgAAL9QEBBH9BACEDAkAgACgCDCACTQ0AIAA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AAAADAAAABAAAAAUAAAAIAAAAAAAQAA/Td6WFoA"},t=>{t.exports=e}],r={};function n(e){var i=r[e];if(void 0!==i)return i.exports;var o=r[e]={exports:{}};return t[e](o,o.exports,n),o.exports}n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};return(()=>{n.r(i),n.d(i,{XzReadableStream:()=>o});var e=n(1);const t=globalThis.ReadableStream||n(2).ReadableStream;class r{constructor(e){this.exports=e.exports,this.memory=this.exports.memory,this.ptr=this.exports.create_context(),this._refresh(),this.bufSize=this.mem32[0],this.inStart=this.mem32[1]-this.ptr,this.inEnd=this.inStart+this.bufSize,this.outStart=this.mem32[4]-this.ptr}supplyInput(e){this._refresh(),this.mem8.subarray(this.inStart,this.inEnd).set(e,0),this.exports.supply_input(this.ptr,e.byteLength),this._refresh()}getNextOutput(){const e=this.exports.get_next_output(this.ptr);if(this._refresh(),0!==e&&1!==e)throw new Error(`get_next_output failed with error code ${e}`);return{outChunk:this.mem8.slice(this.outStart,this.outStart+this.mem32[5]),finished:1===e}}needsMoreInput(){return this.mem32[2]===this.mem32[3]}outputBufferIsFull(){return this.mem32[5]===this.bufSize}resetOutputBuffer(){this.outPos=this.mem32[5]=0}dispose(){this.exports.destroy_context(this.ptr),this.exports=null}_refresh(){this.memory.buffer!==this.mem8?.buffer&&(this.mem8=new Uint8Array(this.memory.buffer,this.ptr),this.mem32=new Uint32Array(this.memory.buffer,this.ptr))}}class o extends t{static _moduleInstancePromise;static _moduleInstance;static async _getModuleInstance(){const t=e.replace("data:application/wasm;base64,",""),r=Uint8Array.from(atob(t),(e=>e.charCodeAt(0))).buffer,n=await WebAssembly.instantiate(r,{});o._moduleInstance=n.instance}constructor(e){let t,n=null;const i=e.getReader();super({async start(e){o._moduleInstance||await(o._moduleInstancePromise||(o._moduleInstancePromise=o._getModuleInstance())),t=new r(o._moduleInstance)},async pull(e){if(t.needsMoreInput()){if(null===n||0===n.byteLength){const{done:e,value:t}=await i.read();e||(n=t)}const e=Math.min(t.bufSize,n.byteLength);t.supplyInput(n.subarray(0,e)),n=n.subarray(e)}const r=t.getNextOutput();e.enqueue(r.outChunk),t.resetOutputBuffer(),r.finished&&(t.dispose(),e.close())},cancel:()=>(t.dispose(),i.cancel())})}}})(),i})(),e.exports=n(r(772))},3617:()=>{},772:()=>{},928:(e,t,r)=>{const n=r(2886).default;e.exports=n,e.exports.default=n},1308:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});let r=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117];"undefined"!=typeof Int32Array&&(r=new Int32Array(r)),t.default=(e,t)=>{let n=0===t?0:~t;for(let t=0;t>>8;return~n}},2886:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=n(r(1308)),o=n(r(7327));t.default=(0,o.default)("crc-32",i.default)},4422:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(8287);t.default=(e,t)=>n.Buffer.from(e,t)},7327:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=n(r(4422));t.default=function(e,t){const r=(e,r)=>t((0,i.default)(e),r)>>>0;return r.signed=(e,r)=>t((0,i.default)(e),r),r.unsigned=r,r.model=e,r}}},t={};function r(n){var i=t[n];if(void 0!==i)return i.exports;var o=t[n]={exports:{}};return e[n].call(o.exports,o,o.exports,r),o.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n=r(7806);return n})(); \ No newline at end of file +export default (()=>{var e={4923:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{A(n.next(e))}catch(e){o(e)}}function a(e){try{A(n.throw(e))}catch(e){o(e)}}function A(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}A((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});const i=r(8712),o=r(5931),s=r(9747);function a(e,t){const[r,n,i,o,s,a]=t,A=r;e[A]||(e[A]=[]),e[A].push({start:n,span:i,containerStart:o,sliceStart:s,sliceBytes:a})}t.default=class{constructor(e){this.filehandle=(0,o.open)(e.url,e.path,e.filehandle)}parseIndex(){return n(this,void 0,void 0,(function*(){const e={},t=31===(r=yield this.filehandle.readFile())[0]&&139===r[1]?(0,i.unzip)(r):r;var r;if(t.length>4&&21578050===t.readUInt32LE(0))throw new s.CramMalformedError("invalid .crai index file. note: file appears to be a .bai index. this is technically legal but please open a github issue if you need support");let n=[],o="";for(const r of t)if(r>=48&&r<=57||!o&&45===r)o+=String.fromCharCode(r);else if(9===r)n.push(Number.parseInt(o,10)),o="";else if(10===r)n.push(Number.parseInt(o,10)),o="",a(e,n),n=[];else if(13!==r&&32!==r)throw new s.CramMalformedError("invalid .crai index file");return o&&n.push(Number.parseInt(o,10)),6===n.length&&a(e,n),Object.entries(e).forEach((([t,r])=>{const n=r;e[t]=n.sort(((e,t)=>e.start-t.start||e.span-t.span))})),e}))}getIndex(){return this.parseIndexP||(this.parseIndexP=this.parseIndex().catch((e=>{throw this.parseIndexP=void 0,e}))),this.parseIndexP}hasDataForReferenceSequence(e){return n(this,void 0,void 0,(function*(){return!!(yield this.getIndex())[e]}))}getEntriesForRange(e,t,r){return n(this,void 0,void 0,(function*(){const n=(yield this.getIndex())[e];if(!n)return[];const i=e=>{const n=e.start,i=e.start+e.span;return n>r?-1:i<=t?1:0},o=[];for(const e of n)0===i(e)&&o.push(e);return o}))}}},9508:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=class{constructor(e,t){this.parameters=e,this.dataType=t}}},368:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=r(9747),o=n(r(9508)),s=r(612);class a extends o.default{constructor(e,t){if(super(e,t),"int"!==this.dataType)throw new i.CramUnimplementedError(`${this.dataType} decoding not yet implemented by BETA codec`)}decode(e,t,r,n){return(0,s.getBits)(t.content,n.coreBlock,this.parameters.length)-this.parameters.offset}}t.default=a},8635:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=n(r(9508)),o=r(400);class s extends i.default{constructor(e,t,r){super(e,t),this.instantiateCodec=r}decode(e,t,r,n){const i=this._getLengthCodec().decode(e,t,r,n),o=this._getDataCodec(),s=new Uint8Array(i);for(let a=0;a{(0,o.tinyMemoize)(s,e)}))},4839:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=r(9747),o=n(r(9508)),s=r(612);class a extends o.default{decode(e,t,r,n){const{blockContentId:o}=this.parameters,s=r[o];if(!s)throw new i.CramMalformedError(`no block found with content ID ${o}`);const a=n.externalBlocks.getCursor(o);return this._decodeByteArray(s,a)}_decodeByteArray(e,t){const r=e.content,{stopByte:n}=this.parameters,i=t.bytePosition;let o=t.bytePosition;for(;r[o]!==n&&o=e.content.length)throw new a.CramBufferOverrunError("attempted to read beyond end of block. this file seems truncated.");return e.content[t.bytePosition++]}}t.default=A},8185:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=r(9747),o=n(r(9508)),s=r(612);class a extends o.default{constructor(e,t){if(super(e,t),"int"!==this.dataType)throw new i.CramUnimplementedError(`${this.dataType} decoding not yet implemented by GAMMA codec`)}decode(e,t,r,n){let i=1;for(;0===(0,s.getBits)(t.content,n.coreBlock,1);)i+=1;return((0,s.getBits)(t.content,n.coreBlock,i-1)|1<{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CramBufferOverrunError=void 0,t.getBits=function(e,t,n){let i=0;if(t.bytePosition+(7-t.bitPosition+n)/8>e.length)throw new r("read error during decoding. the file seems to be truncated.");for(let r=n;r;r--)i<<=1,i|=e[t.bytePosition]>>t.bitPosition&1,t.bitPosition-=1,t.bitPosition<0&&(t.bytePosition+=1),t.bitPosition&=7;return i};class r extends Error{}t.CramBufferOverrunError=r},4341:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=r(9747),o=n(r(9508)),s=r(612);class a extends o.default{constructor(e,t){if(super(e,t),this.codes={},this.codeBook={},this.sortedCodes=[],this.sortedValuesByBitCode=[],this.sortedBitCodes=[],this.sortedBitLengthsByBitCode=[],this.bitCodeToValue=[],!["byte","int"].includes(this.dataType))throw new TypeError(`${this.dataType} decoding not yet implemented by HUFFMAN_INT codec`);this.buildCodeBook(),this.buildCodes(),this.buildCaches(),0===this.sortedCodes[0].bitLength&&(this._decode=this._decodeZeroLengthCode)}buildCodeBook(){let e=new Array(this.parameters.numCodes);for(let t=0;te.bitLength-t.bitLength||e.symbol-t.symbol)),this.codeBook={},e.forEach((e=>{this.codeBook[e.bitLength]||(this.codeBook[e.bitLength]=[]),this.codeBook[e.bitLength].push(e.symbol)}))}buildCodes(){this.codes={};let e=0,t=-1;Object.entries(this.codeBook).forEach((([r,n])=>{const o=Number.parseInt(r,10);n.forEach((r=>{const n={bitLength:o,value:r,bitCode:0};t+=1;const s=o-e;if(t<<=s,n.bitCode=t,e+=s,function(e){let t=e-(e>>1)&1431655765;return t=(858993459&t)+(t>>2&858993459),16843009*(t+(t>>4)&252645135)>>24}(t)>o)throw new i.CramMalformedError("Symbol out of range");this.codes[r]=n}))}))}buildCaches(){this.sortedCodes=Object.values(this.codes).sort(((e,t)=>e.bitLength-t.bitLength||e.bitCode-t.bitCode)),this.sortedValuesByBitCode=this.sortedCodes.map((e=>e.value)),this.sortedBitCodes=this.sortedCodes.map((e=>e.bitCode)),this.sortedBitLengthsByBitCode=this.sortedCodes.map((e=>e.bitLength));const e=Math.max(...this.sortedBitCodes);this.bitCodeToValue=new Array(e+1).fill(-1);for(let e=0;e-1&&this.sortedBitLengthsByBitCode[r]===t)return this.sortedValuesByBitCode[r];for(let r=e;this.sortedCodes[r+1].bitLength===t&&r{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={CRAM_FLAG_PRESERVE_QUAL_SCORES:1,CRAM_FLAG_DETACHED:2,CRAM_FLAG_MATE_DOWNSTREAM:4,CRAM_FLAG_NO_SEQ:8,CRAM_FLAG_MASK:15,CRAM_M_REVERSE:1,CRAM_M_UNMAP:2,BAM_FPAIRED:1,BAM_FPROPER_PAIR:2,BAM_FUNMAP:4,BAM_FMUNMAP:8,BAM_FREVERSE:16,BAM_FMREVERSE:32,BAM_FREAD1:64,BAM_FREAD2:128,BAM_FSECONDARY:256,BAM_FQCFAIL:512,BAM_FDUP:1024,BAM_FSUPPLEMENTARY:2048,BAM_CMATCH:0,BAM_CINS:1,BAM_CDEL:2,BAM_CREF_SKIP:3,BAM_CSOFT_CLIP:4,BAM_CHARD_CLIP:5,BAM_CPAD:6,BAM_CEQUAL:7,BAM_CDIFF:8,BAM_CBACK:9,BAM_CIGAR_STR:"MIDNSHP:XB",BAM_CIGAR_SHIFT:4,BAM_CIGAR_MASK:15,BAM_CIGAR_TYPE:246183}},7219:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(6524),i=r(9747),o={BF:"int",CF:"int",RI:"int",RL:"int",AP:"int",RG:"int",MF:"int",NS:"int",NP:"int",TS:"int",NF:"int",TC:"byte",TN:"int",FN:"int",FC:"byte",FP:"int",BS:"byte",IN:"byteArray",SC:"byteArray",DL:"int",BA:"byte",BB:"byteArray",RS:"int",PD:"int",HC:"int",MQ:"int",RN:"byteArray",QS:"byte",QQ:"byteArray",TL:"int"};t.default=class{constructor(e){this.dataSeriesCodecCache={},this.tagCodecCache={},this.tagEncoding={},this.readNamesIncluded=e.preservation.RN,this.APdelta=e.preservation.AP,this.referenceRequired=!!e.preservation.RR,this.tagIdsDictionary=e.preservation.TD,this.substitutionMatrix=function(e){const t=new Array(5);for(let e=0;e<5;e+=1)t[e]=new Array(4);return t[0][e[0]>>6&3]="C",t[0][e[0]>>4&3]="G",t[0][e[0]>>2&3]="T",t[0][3&e[0]]="N",t[1][e[1]>>6&3]="A",t[1][e[1]>>4&3]="G",t[1][e[1]>>2&3]="T",t[1][3&e[1]]="N",t[2][e[2]>>6&3]="A",t[2][e[2]>>4&3]="C",t[2][e[2]>>2&3]="T",t[2][3&e[2]]="N",t[3][e[3]>>6&3]="A",t[3][e[3]>>4&3]="C",t[3][e[3]>>2&3]="G",t[3][3&e[3]]="N",t[4][e[4]>>6&3]="A",t[4][e[4]>>4&3]="C",t[4][e[4]>>2&3]="G",t[4][3&e[4]]="T",t}(e.preservation.SM),this.dataSeriesEncoding=e.dataSeriesEncoding,this.tagEncoding=e.tagEncoding}getCodecForTag(e){const t=this.tagCodecCache[e];if(t)return t;{const t=this.tagEncoding[e];if(!t)throw new Error("Error, no tag encoding");const r=(0,n.instantiateCodec)(t,"byteArray");return this.tagCodecCache[e]=r,r}}getTagNames(e){return this.tagIdsDictionary[e]}getCodecForDataSeries(e){let t=this.dataSeriesCodecCache[e];if(void 0===t){const r=this.dataSeriesEncoding[e];if(r){const s=o[e];if(!s)throw new i.CramMalformedError(`data series name ${e} not defined in file compression header`);t=(0,n.instantiateCodec)(r,s),this.dataSeriesCodecCache[e]=t}}return t}toJSON(){const e={};return Object.keys(this).forEach((t=>{t.endsWith("Cache")||(e[t]=this[t])})),e}}},78:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{A(n.next(e))}catch(e){o(e)}}function a(e){try{A(n.throw(e))}catch(e){o(e)}}function A(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}A((n=n.apply(e,t||[])).next())}))},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const o=r(8287),s=r(9747),a=r(400),A=i(r(6771)),f=i(r(7219)),h=r(3165);class l{constructor(e,t){this.file=e,this.filePosition=t}getHeader(){return this._readContainerHeader(this.filePosition)}getCompressionHeaderBlock(){return n(this,void 0,void 0,(function*(){const e=yield this.getHeader();if(!(null==e?void 0:e.numRecords))return null;const{majorVersion:t}=yield this.file.getDefinition(),r=(0,h.getSectionParsers)(t),n=yield this.getFirstBlock();if(void 0===n)return;if("COMPRESSION_HEADER"!==n.contentType)throw new s.CramMalformedError(`invalid content type ${n.contentType} in compression header block`);const i=(0,a.parseItem)(n.content,r.cramCompressionHeader.parser,0,n.contentPosition);return Object.assign(Object.assign({},n),{parsedContent:i})}))}getFirstBlock(){return n(this,void 0,void 0,(function*(){const e=yield this.getHeader();if(e)return this.file.readBlock(e._endPosition)}))}getCompressionScheme(){return n(this,void 0,void 0,(function*(){const e=yield this.getCompressionHeaderBlock();if(e)return new f.default(e.parsedContent)}))}getSlice(e,t){return new A.default(this,e,t)}_readContainerHeader(e){return n(this,void 0,void 0,(function*(){const{majorVersion:t}=yield this.file.getDefinition(),r=(0,h.getSectionParsers)(t),{cramContainerHeader1:n,cramContainerHeader2:i}=r,{size:s}=yield this.file.stat();if(e>=s)return void console.warn(`pos:${e}>=fileSize:${s} in cram container`);const A=o.Buffer.allocUnsafe(n.maxLength);yield this.file.read(A,0,n.maxLength,e);const f=(0,a.parseItem)(A,n.parser),l=(0,a.itf8Size)(f.numLandmarks);if(e+f.length>=s)return void console.warn(`container at ${e} is beyond fileSize:${s}, skipping`);const u=o.Buffer.allocUnsafe(i.maxLength(f.numLandmarks));yield this.file.read(u,0,i.maxLength(f.numLandmarks),e+f._size-l);const c=(0,a.parseItem)(u,i.parser);return this.file.validateChecksums&&void 0!==c.crc32&&(yield this.file.checkCrc32(e,f._size+c._size-l-4,c.crc32,`container header beginning at position ${e}`)),Object.assign(f,c,{_size:f._size+c._size-l,_endPosition:f._size+c._size-l+e})}))}}t.default=l,"getHeader getCompressionHeaderBlock getCompressionScheme".split(" ").forEach((e=>{(0,a.tinyMemoize)(l,e)}))},6794:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{A(n.next(e))}catch(e){o(e)}}function a(e){try{A(n.throw(e))}catch(e){o(e)}}function A(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}A((n=n.apply(e,t||[])).next())}))},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const o=r(8287),s=i(r(928)),a=i(r(7392)),A=i(r(6960)),f=i(r(235)),h=r(1307),l=r(9747),u=r(8712),c=i(r(9989)),d=r(3165),g=i(r(78)),I=r(5931),p=r(400),C=r(5417);class m{constructor(e){var t;if(this.file=(0,I.open)(e.url,e.path,e.filehandle),this.validateChecksums=!0,this.fetchReferenceSequenceCallback=e.seqFetch,this.options={checkSequenceMD5:e.checkSequenceMD5,cacheSize:null!==(t=e.cacheSize)&&void 0!==t?t:2e4},this.featureCache=new a.default({maxSize:this.options.cacheSize}),function(){const e=new Uint32Array([287454020]),t=new Uint8Array(e.buffer);return 68===t[0]?0:17===t[0]?1:2}()>0)throw new Error("Detected big-endian machine, may be unable to run")}read(e,t,r,n){return this.file.read(e,t,r,n)}stat(){return this.file.stat()}getDefinition(){return n(this,void 0,void 0,(function*(){const{maxLength:e,parser:t}=(0,d.cramFileDefinition)(),r=o.Buffer.allocUnsafe(e);yield this.file.read(r,0,e,0);const n=t(r).value;if(2!==n.majorVersion&&3!==n.majorVersion)throw new l.CramUnimplementedError(`CRAM version ${n.majorVersion} not supported`);return n}))}getSamHeader(){return n(this,void 0,void 0,(function*(){const e=yield this.getContainerById(0);if(!e)throw new l.CramMalformedError("file contains no containers");const t=yield e.getFirstBlock();if(void 0===t)return(0,C.parseHeaderText)("");const r=t.content,n=r.readInt32LE(0),i=r.toString("utf8",4,4+n);return this.header=i,(0,C.parseHeaderText)(i)}))}getHeaderText(){return n(this,void 0,void 0,(function*(){return yield this.getSamHeader(),this.header}))}getContainerById(e){return n(this,void 0,void 0,(function*(){const{majorVersion:t}=yield this.getDefinition(),r=(0,d.getSectionParsers)(t);let n=r.cramFileDefinition.maxLength;const{size:i}=yield this.file.stat(),{cramContainerHeader1:o}=r;let s;for(let t=0;t<=e;t++){if(n+o.maxLength+8>=i)return;s=this.getContainerAtPosition(n);const r=yield s.getHeader();if(!r)throw new l.CramMalformedError(`container ${e} not found in file`);if(0===t){n=r._endPosition;for(let e=0;e=i)return;const s=o.Buffer.allocUnsafe(n.maxLength);return yield this.file.read(s,0,n.maxLength,e),(0,p.parseItem)(s,n.parser,0,e)}))}_parseSection(e,t){return n(this,arguments,void 0,(function*(e,t,r=e.maxLength,n){let i;if(n)i=n;else{const{size:e}=yield this.file.stat();if(t+r>=e)return;i=o.Buffer.allocUnsafe(r),yield this.file.read(i,0,r,t)}const s=(0,p.parseItem)(i,e.parser,0,t);if(s._size!==r)throw new l.CramMalformedError(`section read error: requested size ${r} does not equal parsed size ${s._size}`);return s}))}_uncompress(e,t,r){return n(this,void 0,void 0,(function*(){if("gzip"===e)(0,u.unzip)(t).copy(r);else if("bzip2"===e){const e=f.default.array(t);let n,i=f.default.header(e),s=0;do{n=f.default.decompress(e,i),-1!==n&&(o.Buffer.from(n).copy(r,s),s+=n.length,i-=n.length)}while(-1!==n)}else if("lzma"===e){const e=new Response(new h.XzReadableStream((n=t,new ReadableStream({start(e){e.enqueue(n),e.close()}}))));o.Buffer.from(yield e.arrayBuffer()).copy(r)}else if("rans"===e)(0,c.default)(t,r);else if("rans4x16"===e)A.default.r4x16_uncompress(t,r);else if("arith"===e)A.default.arith_uncompress(t,r);else if("fqzcomp"===e)A.default.fqzcomp_uncompress(t,r);else{if("tok3"!==e)throw new l.CramUnimplementedError(`${e} decompression not yet implemented`);A.default.tok3_uncompress(t,r)}var n}))}readBlock(e){return n(this,void 0,void 0,(function*(){const{majorVersion:t}=yield this.getDefinition(),r=(0,d.getSectionParsers)(t),n=yield this.readBlockHeader(e);if(void 0===n)return;const i=n._endPosition,s=o.Buffer.allocUnsafe(n.uncompressedSize),a=Object.assign(Object.assign({},n),{_endPosition:i,contentPosition:i,content:s});if("raw"!==n.compressionMethod){const e=o.Buffer.allocUnsafe(n.compressedSize);yield this.read(e,0,n.compressedSize,i),yield this._uncompress(n.compressionMethod,e,s)}else yield this.read(s,0,n.uncompressedSize,i);if(t>=3){const t=yield this._parseSection(r.cramBlockCrc32,i+n.compressedSize);if(void 0===t)return;a.crc32=t.crc32,this.validateChecksums&&(yield this.checkCrc32(e,n._size+n.compressedSize,t.crc32,"block data")),a._endPosition=t._endPosition,a._size=a.compressedSize+r.cramBlockCrc32.maxLength}else a._endPosition=i+a.compressedSize,a._size=a.compressedSize;return a}))}}t.default=m,"getDefinition getSectionParsers getSamHeader".split(" ").forEach((e=>{(0,p.tinyMemoize)(m,e)}))},7390:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.CramRecord=void 0;var i=r(8401);Object.defineProperty(t,"CramRecord",{enumerable:!0,get:function(){return n(i).default}});var o=r(6794);Object.defineProperty(t,"default",{enumerable:!0,get:function(){return n(o).default}})},8401:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.MateFlagsDecoder=t.CramFlagsDecoder=t.BamFlagsDecoder=t.MateFlags=t.CramFlags=t.BamFlags=void 0;const i=n(r(7295)),o={a:0,A:0,c:1,C:1,g:2,G:2,t:3,T:3,n:4,N:4};function s(e){const t={};for(const[r,n]of e)t[`is${n}`]=e=>!!(e&r),t[`set${n}`]=e=>e|r;return t}t.BamFlags=[[1,"Paired"],[2,"ProperlyPaired"],[4,"SegmentUnmapped"],[8,"MateUnmapped"],[16,"ReverseComplemented"],[32,"MateReverseComplemented"],[64,"Read1"],[128,"Read2"],[256,"Secondary"],[512,"FailedQc"],[1024,"Duplicate"],[2048,"Supplementary"]],t.CramFlags=[[1,"PreservingQualityScores"],[2,"Detached"],[4,"WithMateDownstream"],[8,"DecodeSequenceAsStar"]],t.MateFlags=[[1,"OnNegativeStrand"],[2,"Unmapped"]],t.BamFlagsDecoder=s(t.BamFlags),t.CramFlagsDecoder=s(t.CramFlags),t.MateFlagsDecoder=s(t.MateFlags),t.default=class{constructor({flags:e,cramFlags:t,readLength:r,mappingQuality:n,lengthOnRef:i,qualityScores:o,mateRecordNumber:s,readBases:a,readFeatures:A,mateToUse:f,readGroupId:h,readName:l,sequenceId:u,uniqueId:c,templateSize:d,alignmentStart:g,tags:I}){this.flags=e,this.cramFlags=t,this.readLength=r,this.mappingQuality=n,this.lengthOnRef=i,this.qualityScores=o,a&&(this.readBases=a),this.readGroupId=h,this.readName=l,this.sequenceId=u,this.uniqueId=c,this.templateSize=d,this.alignmentStart=g,this.tags=I,A&&(this.readFeatures=A),f&&(this.mate={flags:f.mateFlags,readName:f.mateReadName,sequenceId:f.mateSequenceId,alignmentStart:f.mateAlignmentStart}),s&&(this.mateRecordNumber=s)}isPaired(){return!!(this.flags&i.default.BAM_FPAIRED)}isProperlyPaired(){return!!(this.flags&i.default.BAM_FPROPER_PAIR)}isSegmentUnmapped(){return!!(this.flags&i.default.BAM_FUNMAP)}isMateUnmapped(){return!!(this.flags&i.default.BAM_FMUNMAP)}isReverseComplemented(){return!!(this.flags&i.default.BAM_FREVERSE)}isMateReverseComplemented(){return!!(this.flags&i.default.BAM_FMREVERSE)}isRead1(){return!!(this.flags&i.default.BAM_FREAD1)}isRead2(){return!!(this.flags&i.default.BAM_FREAD2)}isSecondary(){return!!(this.flags&i.default.BAM_FSECONDARY)}isFailedQc(){return!!(this.flags&i.default.BAM_FQCFAIL)}isDuplicate(){return!!(this.flags&i.default.BAM_FDUP)}isSupplementary(){return!!(this.flags&i.default.BAM_FSUPPLEMENTARY)}isDetached(){return!!(this.cramFlags&i.default.CRAM_FLAG_DETACHED)}hasMateDownStream(){return!!(this.cramFlags&i.default.CRAM_FLAG_MATE_DOWNSTREAM)}isPreservingQualityScores(){return!!(this.cramFlags&i.default.CRAM_FLAG_PRESERVE_QUAL_SCORES)}isUnknownBases(){return!!(this.cramFlags&i.default.CRAM_FLAG_NO_SEQ)}getReadBases(){if(!this.readBases&&this._refRegion){const e=function(e,t){if(!e.lengthOnRef&&!e.readLength)return null;if(e.isUnknownBases())return null;const r=e.alignmentStart-t.start;if(!e.readFeatures)return t.seq.slice(r,r+(e.lengthOnRef||0)).toUpperCase();let n="",i=r,o=0;for(;n.lengththis.mate.alignmentStart&&o>0&&(o=-o),o>0?(i[0]=e,i[1]=r,i[2]=t,i[3]=n):(i[2]=e,i[3]=r,i[0]=t,i[1]=n),i.join("")}return null}addReferenceSequence(e,t){this.readFeatures&&this.readFeatures.forEach((r=>{"X"===r.code&&function(e,t,r,n){const i=n.refPos-t.start,s=t.seq.charAt(i);s&&(n.ref=s);let a=o[s];void 0===a&&(a=4);const A=r.substitutionMatrix[a][n.data];A&&(n.sub=A)}(0,e,t,r)})),!this.readBases&&e.start<=this.alignmentStart&&e.end>=this.alignmentStart+(this.lengthOnRef||this.readLength)-1&&(this._refRegion=e)}toJSON(){const e={};return Object.keys(this).forEach((t=>{t.startsWith("_")||(e[t]=this[t])})),e.readBases=this.getReadBases(),e}}},3165:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.cramFileDefinition=i,t.cramBlockHeader=o,t.cramBlockCrc32=s,t.cramTagDictionary=A,t.cramPreservationMap=f,t.isMappedSliceHeader=function(e){return"number"==typeof e.refSeqId},t.getSectionParsers=function(e){return{cramFileDefinition:i(),cramBlockHeader:o(),cramBlockCrc32:s(),cramDataSeriesEncodingMap:d(),cramTagEncodingMap:g(),cramCompressionHeader:{parser:(e,t)=>{const{value:r,offset:n}=f().parser(e,t);t=n;const{value:i,offset:o}=d().parser(e,t);t=o;const{value:s,offset:a}=g().parser(e,t);return t=a,{value:{dataSeriesEncoding:h(i),preservation:h(r),tagEncoding:h(s)},offset:t}}},cramEncoding:{parser:(e,t)=>c(e,t)},cramUnmappedSliceHeader:l(e),cramMappedSliceHeader:u(e),cramContainerHeader1:I(e),cramContainerHeader2:p(e)}};const n=r(400);function i(){return{parser:(e,t=0)=>{const r=e,n=new DataView(r.buffer,r.byteOffset,r.length);let i=0;const o=e.subarray(i,i+4).toString();i+=4;const s=n.getUint8(i);i+=1;const a=n.getUint8(i);i+=1;const A=r.subarray(i,i+20).toString().replaceAll("\0","");return i+=20,{value:{magic:o,majorVersion:s,minorVersion:a,fileId:A},offset:i}},maxLength:26}}function o(){return{parser:(e,t=0)=>{const r=e,i=new DataView(r.buffer,r.byteOffset,r.length);let o=0;const s=i.getUint8(o),a=["raw","gzip","bzip2","lzma","rans","rans4x16","arith","fqzcomp","tok3"][s];if(!a)throw new Error(`compression method number ${s} not implemented`);o+=1;const A=i.getUint8(o),f=["FILE_HEADER","COMPRESSION_HEADER","MAPPED_SLICE_HEADER","UNMAPPED_SLICE_HEADER","EXTERNAL_DATA","CORE_DATA"][A];if(!f)throw new Error(`invalid block content type id ${A}`);o+=1;const[h,l]=(0,n.parseItf8)(e,o);o+=l;const[u,c]=(0,n.parseItf8)(e,o);o+=c;const[d,g]=(0,n.parseItf8)(e,o);return o+=g,{offset:o,value:{uncompressedSize:d,compressedSize:u,contentId:h,contentType:f,compressionMethod:a}}},maxLength:17}}function s(){return{parser:(e,t)=>{const r=e,n=new DataView(r.buffer,r.byteOffset,r.length).getUint32(t,!0);return{offset:t+=4,value:{crc32:n}}},maxLength:4}}function a(e,t,r){const n=e.toString("utf8",t,r),i=[];for(let e=0;e{const[r,i]=(0,n.parseItf8)(e,t);t+=i;const o=e.subarray(t,t+r);t+=r;const s=[];let A=0,f=0;for(;fA&&s.push(a(o,A,f)),{value:{size:r,ents:s},offset:t}}}}function f(){return{parser:(e,t)=>{const r=e,i=new DataView(r.buffer,r.byteOffset,r.length),[o,s]=(0,n.parseItf8)(e,t);t+=s;const[a,f]=(0,n.parseItf8)(e,t);t+=f;const h=[];for(let r=0;r{const[i,o]=(0,n.parseItf8)(t,r);r+=o;let s=0;if(e>=3){const[e,i]=(0,n.parseLtf8)(t,r);r+=i,s=e}else if(2===e){const[e,i]=(0,n.parseItf8)(t,r);r+=i,s=e}else console.warn("recordCounter=0");const[a,A]=(0,n.parseItf8)(t,r);r+=A;const[f,h]=(0,n.parseItf8)(t,r);r+=h;const l=[];for(let e=0;e=2&&(u=[...t.subarray(r,r+16)],r+=16),{value:{recordCounter:s,md5:u,contentIds:l,numContentIds:f,numBlocks:a,numRecords:i},offset:r}},maxLength:e=>40+5*e}}function u(e){let t=0;return t+=20,t+=9,t+=15,t+=16,{parser:(t,r)=>{const[i,o]=(0,n.parseItf8)(t,r);r+=o;const[s,a]=(0,n.parseItf8)(t,r);r+=a;const[A,f]=(0,n.parseItf8)(t,r);r+=f;const[h,l]=(0,n.parseItf8)(t,r);r+=l;let u=0;if(e>=3){const[e,i]=(0,n.parseLtf8)(t,r);r+=i,u=e}else if(2===e){const[e,i]=(0,n.parseItf8)(t,r);r+=i,u=e}else console.warn("majorVersion is <2, recordCounter set to 0");const[c,d]=(0,n.parseItf8)(t,r);r+=d;const[g,I]=(0,n.parseItf8)(t,r);r+=I;const p=[];for(let e=0;e=2&&(B=[...t.subarray(r,r+16)],r+=16),{value:{md5:B,numBlocks:c,numRecords:h,numContentIds:g,refSeqSpan:A,refSeqId:i,refSeqStart:s,recordCounter:u,refBaseBlockId:C,contentIds:p},offset:r}},maxLength:e=>60+5*e}}function c(e,t){const r=e,i=new DataView(r.buffer,r.byteOffset,r.length),[o,s]=(0,n.parseItf8)(e,t);t+=s;const[a,A]=(0,n.parseItf8)(e,t);t+=A;const f={};if(0===o);else if(1===o){const[r,i]=(0,n.parseItf8)(e,t);f.blockContentId=r,t+=i}else if(2===o){const[r,i]=(0,n.parseItf8)(e,t);f.offset=r,t+=i;const[o,s]=(0,n.parseItf8)(e,t);f.M=o,t+=s}else if(3===o){const r=(0,n.parseItf8)(e,t),i=r[0];t+=r[1];const o=[];for(let r=0;r{const[r,i]=(0,n.parseItf8)(e,t);t+=i;const[o,s]=(0,n.parseItf8)(e,t);t+=s;const a=[];for(let r=0;r{const[r,i]=(0,n.parseItf8)(e,t);t+=i;const[o,s]=(0,n.parseItf8)(e,t);t+=s;const a=[];for(let r=0;r>16&255)+String.fromCharCode(r>>8&255)+String.fromCharCode(255&r),{value:s,offset:A}=c(e,t);t=A,a.push({key:o,value:s})}return{value:{mapSize:r,ents:a,mapCount:o},offset:t}}}}function I(e){let t=4;return t+=20,t+=9,t+=9,t+=10,{maxLength:52,parser:(t,r)=>{const i=t,o=new DataView(i.buffer,i.byteOffset,i.length).getInt32(r,!0);r+=4;const[s,a]=(0,n.parseItf8)(t,r);r+=a;const[A,f]=(0,n.parseItf8)(t,r);r+=f;const[h,l]=(0,n.parseItf8)(t,r);r+=l;const[u,c]=(0,n.parseItf8)(t,r);r+=c;let d,g=0;if(e>=3){const[e,i]=(0,n.parseLtf8)(t,r);g=e,r+=i}else if(2===e){const[e,i]=(0,n.parseItf8)(t,r);g=e,r+=i}else console.warn("setting recordCounter=0");if(e>1){const[e,i]=(0,n.parseLtf8)(t,r);d=e,r+=i}const[I,p]=(0,n.parseItf8)(t,r);r+=p;const[C,m]=(0,n.parseItf8)(t,r);return{value:{length:o,refSeqId:s,refSeqStart:A,alignmentSpan:h,numBlocks:I,numLandmarks:C,numBases:d,recordCounter:g,numRecords:u},offset:r+=m}}}}function p(e){return{parser:(t,r)=>{const i=t,o=new DataView(i.buffer,i.byteOffset,i.length),[s,a]=(0,n.parseItf8)(t,r);r+=a;const A=[];for(let e=0;e=3&&(f=o.getUint32(r,!0),r+=4),{value:Object.assign(Object.assign({},void 0===f?{}:{crc32:f}),{numLandmarks:s,landmarks:A}),offset:r}},maxLength:e=>5+5*e+4}}},6484:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r,A,f,h,l,u,c){let d=t("BF");const g=t("CF");if(!(0,o.isMappedSliceHeader)(A.parsedContent))throw new Error("slice header not mapped");const I=u>1&&-2===A.parsedContent.refSeqId?t("RI"):A.parsedContent.refSeqId,p=t("RL");let C=t("AP");r.APdelta&&(C+=l.lastAlignmentStart),l.lastAlignmentStart=C;const m=t("RG");let B,w,y,_;if(r.readNamesIncluded&&(B=s(t("RN"))),i.CramFlagsDecoder.isDetached(g)){const e=t("MF");let n;r.readNamesIncluded||(n=s(t("RN")),B=n);const o=t("NS"),a=t("NP");(e||o>-1)&&(w={mateFlags:e,mateSequenceId:o,mateAlignmentStart:a,mateReadName:n}),y=t("TS"),i.MateFlagsDecoder.isUnmapped(e)&&(d=i.BamFlagsDecoder.setMateUnmapped(d)),i.MateFlagsDecoder.isOnNegativeStrand(e)&&(d=i.BamFlagsDecoder.setMateReverseComplemented(d))}else i.CramFlagsDecoder.isWithMateDownstream(g)&&(_=t("NF")+c+1);const E=t("TL");if(E<0)throw new n.CramMalformedError("invalid TL index");const v={},b=r.getTagNames(E),Q=b.length;for(let t=0;t1?"SC":"IN"],X:["number","BS"],D:["number","DL"],I:["string","IN"],i:["character","BA"],b:["string","BB"],q:["numArray","QQ"],Q:["number","QS"],H:["number","HC"],P:["number","PD"],N:["number","RS"]}[t];if(!h)throw new n.CramMalformedError(`invalid read feature code "${t}"`);let l=f(h);const u={B:["number","QS"]}[t];u&&(l=[l,f(u)]),s+=i;const c=s;a+=i;const d=a;"D"===t||"N"===t?a+=l:"I"===t||"S"===t?a-=l.length:"i"===t&&(a-=1),A[e]={code:t,pos:c,refPos:d,data:l}}return A}(C,e,t,0,u)),k=p,S)for(const{code:e,data:t}of S)"D"===e||"N"===e?k+=t:"I"===e||"S"===e?k-=t.length:"i"===e&&(k-=1);if(Number.isNaN(k)&&(console.warn(`${B||`${I}:${C}`} record has invalid read features`),k=p),D=t("MQ"),i.CramFlagsDecoder.isPreservingQualityScores(g)){R=new Array(p);for(let e=0;e=0){const i=e[r.mateRecordNumber];if(!i)throw new o.CramMalformedError("intra-slice mate record not found, this file seems malformed");n.push(...t(i))}return n}(r),i=n.map((e=>e.alignmentStart)),s=n.map((e=>e.alignmentStart+e.readLength-1)),a=Math.max(...s)-Math.min(...i)+1;a>=0&&n.forEach((e=>{if(void 0!==e.templateLength)throw new o.CramMalformedError("mate pair group has some members that have template lengths already, this file seems malformed");e.templateLength=a}))}(e,0,r):function(e,t){const r=Math.min(e.alignmentStart,t.alignmentStart),n=Math.max(e.alignmentStart+e.readLength-1,t.alignmentStart+t.readLength-1)-r+1;e.templateLength=n,t.templateLength=n}(r,n)),r.mateRecordNumber=void 0}class c{constructor(e,t,r){this.container=e,this.containerPosition=t,this.sliceSize=r,this.file=e.file}getHeader(){return n(this,void 0,void 0,(function*(){const{majorVersion:e}=yield this.file.getDefinition(),t=(0,h.getSectionParsers)(e),r=yield this.container.getHeader();if(!r)throw new Error("no container header detected");const n=yield this.file.readBlock(r._endPosition+this.containerPosition);if(void 0===n)throw new Error("block header undefined");if("MAPPED_SLICE_HEADER"===n.contentType){const e=(0,s.parseItem)(n.content,t.cramMappedSliceHeader.parser,0,r._endPosition);return Object.assign(Object.assign({},n),{parsedContent:e})}if("UNMAPPED_SLICE_HEADER"===n.contentType){const e=(0,s.parseItem)(n.content,t.cramUnmappedSliceHeader.parser,0,r._endPosition);return Object.assign(Object.assign({},n),{parsedContent:e})}throw new o.CramMalformedError(`error reading slice header block, invalid content type ${n.contentType}`)}))}getBlocks(){return n(this,void 0,void 0,(function*(){const e=yield this.getHeader();let t=e._endPosition;const r=new Array(e.parsedContent.numBlocks);for(let e=0;e{"EXTERNAL_DATA"===e.contentType&&(t[e.contentId]=e)})),t}))}getBlockByContentId(e){return n(this,void 0,void 0,(function*(){return(yield this._getBlocksContentIdIndex())[e]}))}getReferenceRegion(){return n(this,void 0,void 0,(function*(){const e=(yield this.getHeader()).parsedContent;if(!(0,h.isMappedSliceHeader)(e))throw new Error("slice header not mapped");if(e.refSeqId<0)return;const t=yield this.container.getCompressionScheme();if(void 0===t)throw new Error("compression scheme undefined");if(e.refBaseBlockId>=0){const t=yield this.getBlockByContentId(e.refBaseBlockId);if(!t)throw new o.CramMalformedError("embedded reference specified, but reference block does not exist");return{seq:t.data.toString("utf8"),start:e.refSeqStart,end:e.refSeqStart+e.refSeqSpan-1,span:e.refSeqSpan}}if(t.referenceRequired||this.file.fetchReferenceSequenceCallback){if(!this.file.fetchReferenceSequenceCallback)throw new Error("reference sequence not embedded, and seqFetch callback not provided, cannot fetch reference sequence");const t=yield this.file.fetchReferenceSequenceCallback(e.refSeqId,e.refSeqStart,e.refSeqStart+e.refSeqSpan-1);if(t.length!==e.refSeqSpan)throw new o.CramArgumentError("seqFetch callback returned a reference sequence of the wrong length");return{seq:t,start:e.refSeqStart,end:e.refSeqStart+e.refSeqSpan-1,span:e.refSeqSpan}}}))}getAllRecords(){return this.getRecords((()=>!0))}_fetchRecords(){return n(this,void 0,void 0,(function*(){var e,t;const{majorVersion:r}=yield this.file.getDefinition(),n=yield this.container.getCompressionScheme();if(void 0===n)throw new Error("compression scheme undefined");const i=yield this.getHeader(),a=yield this._getBlocksContentIdIndex();if(r>1&&this.file.options.checkSequenceMD5&&(0,h.isMappedSliceHeader)(i.parsedContent)&&i.parsedContent.refSeqId>=0&&"0000000000000000"!==(null===(e=i.parsedContent.md5)||void 0===e?void 0:e.join(""))){const e=yield this.getReferenceRegion();if(e){const{seq:r,start:n,end:a}=e,A=(0,s.sequenceMD5)(r),f=null===(t=i.parsedContent.md5)||void 0===t?void 0:t.map((e=>(e<16?"0":"")+e.toString(16))).join("");if(A!==f)throw new o.CramMalformedError(`MD5 checksum reference mismatch for ref ${i.parsedContent.refSeqId} pos ${n}..${a}. recorded MD5: ${f}, calculated MD5: ${A}`)}}const c=yield this.getCoreDataBlock(),d={lastAlignmentStart:(0,h.isMappedSliceHeader)(i.parsedContent)?i.parsedContent.refSeqStart:0,coreBlock:{bitPosition:7,bytePosition:0},externalBlocks:{map:new Map,getCursor(e){let t=this.map.get(e);return void 0===t&&(t={bitPosition:7,bytePosition:0},this.map.set(e,t)),t}}},g=e=>{const t=n.getCodecForDataSeries(e);if(!t)throw new o.CramMalformedError(`no codec defined for ${e} data series`);return t.decode(this,c,a,d)},I=new Array(i.parsedContent.numRecords);for(let e=0;e=0&&u(I,e,I[e],I[t])}return I}))}getRecords(e){return n(this,void 0,void 0,(function*(){const t=this.container.filePosition+this.containerPosition;let r=this.file.featureCache.get(t.toString());r||(r=this._fetchRecords(),this.file.featureCache.set(t.toString(),r));const i=(yield r).filter(e);if(i.length&&this.file.fetchReferenceSequenceCallback){const e=yield this.getHeader();if((0,h.isMappedSliceHeader)(e.parsedContent)&&(e.parsedContent.refSeqId>=0||-2===e.parsedContent.refSeqId)){const t=e.parsedContent.refSeqId>=0?e.parsedContent.refSeqId:void 0,r=yield this.container.getCompressionScheme();if(void 0===r)throw new Error("compression scheme undefined");const o={};for(const e of i){const r=void 0!==t?t:e.sequenceId;let n=o[r];n||(n={id:r,start:e.alignmentStart,end:Number.NEGATIVE_INFINITY,seq:null},o[r]=n);const i=e.alignmentStart+(e.lengthOnRef||e.readLength)-1;i>n.end&&(n.end=i),e.alignmentStartn(this,void 0,void 0,(function*(){-1!==e.id&&e.start<=e.end&&this.file.fetchReferenceSequenceCallback&&(e.seq=yield this.file.fetchReferenceSequenceCallback(e.id,e.start,e.end))})))));for(const e of i){const n=o[void 0!==t?t:e.sequenceId];if(null==n?void 0:n.seq){const t=n.seq;e.addReferenceSequence(Object.assign(Object.assign({},n),{seq:t}),r)}}}}return i}))}}t.default=c,"getHeader getBlocks _getBlocksContentIdIndex".split(" ").forEach((e=>{(0,s.tinyMemoize)(c,e)}))},400:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.itf8Size=function(e){return-128&e?-16384&e?-2097152&e?-268435456&e?5:4:3:2:1},t.parseItf8=function(e,t){let r=t;const n=e[r];let i;if(n<128?(i=n,r+=1):n<192?(i=16383&(n<<8|e[r+1]),r+=2):n<224?(i=2097151&(n<<16|e[r+1]<<8|e[r+2]),r+=3):n<240?(i=268435455&(n<<24|e[r+1]<<16|e[r+2]<<8|e[r+3]),r+=4):(i=(15&n)<<28|e[r+1]<<20|e[r+2]<<12|e[r+3]<<4|15&e[r+4],r+=5),r>e.length)throw new s.CramBufferOverrunError("Attempted to read beyond end of buffer; this file seems truncated.");return[i,r-t]},t.parseLtf8=function(e,t){let r=t;const n=e[r];let i;if(n<128)i=n,r+=1;else if(n<192)i=16383&(e[r]<<8|e[r+1]),r+=2;else if(n<224)i=2097151&(e[r]<<16|e[r+1]<<8|e[r+2]),i=(63&n)<<16|e.readUInt16LE(r+1),r+=3;else if(n<240)i=268435455&(e[r]<<24|e[r+1]<<16|e[r+2]<<8|e[r+3]),r+=4;else if(n<248)i=(15&e[r])*Math.pow(2,32)+(e[r+1]<<24)|e[r+2]<<16|e[r+3]<<8|e[r+4],r+=5;else if(n<252)i=((7&e[r])<<8|e[r+1])*Math.pow(2,32)+(e[r+2]<<24)|e[r+3]<<16|e[r+4]<<8|e[r+5],r+=6;else if(n<254)i=((3&e[r])<<16|e[r+1]<<8|e[r+2])*Math.pow(2,32)+(e[r+3]<<24)|e[r+4]<<16|e[r+5]<<8|e[r+6],r+=7;else if(n<255){if(i=o.default.fromBytesBE(e.slice(r+1,r+8)),i.greaterThan(Number.MAX_SAFE_INTEGER)||i.lessThan(Number.MIN_SAFE_INTEGER))throw new Error("integer overflow");i=i.toNumber(),r+=8}else{if(i=o.default.fromBytesBE(e.slice(r+1,r+9)),i.greaterThan(Number.MAX_SAFE_INTEGER)||i.lessThan(Number.MIN_SAFE_INTEGER))throw new Error("integer overflow");i=i.toNumber(),r+=9}return[i,r-t]},t.parseItem=function(e,t,r=0,n=0){const{offset:i,value:o}=t(e,r);return Object.assign(Object.assign({},o),{_endPosition:i+n,_size:i-r})},t.tinyMemoize=function(e,t){const r=e.prototype[t],n=`_memo_${t}`;e.prototype[t]=function(){if(!(n in this)){const e=r.call(this);this[n]=e,Promise.resolve(e).catch((()=>{delete this[n]}))}return this[n]}},t.sequenceMD5=function(e){return(0,i.default)(e.toUpperCase().replaceAll(/[^\u0021-\u007e]/g,""))};const i=n(r(3503)),o=n(r(8570)),s=r(612)},9747:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CramArgumentError=t.CramSizeLimitError=t.CramMalformedError=t.CramUnimplementedError=t.CramError=void 0;class r extends Error{}t.CramError=r;class n extends Error{}t.CramUnimplementedError=n,t.CramMalformedError=class extends r{},t.CramSizeLimitError=class extends r{},t.CramArgumentError=class extends r{}},7806:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.IndexedCramFile=t.CraiIndex=t.CramRecord=t.CramFile=void 0;var i=r(7390);Object.defineProperty(t,"CramFile",{enumerable:!0,get:function(){return n(i).default}}),Object.defineProperty(t,"CramRecord",{enumerable:!0,get:function(){return i.CramRecord}});var o=r(4923);Object.defineProperty(t,"CraiIndex",{enumerable:!0,get:function(){return n(o).default}});var s=r(6014);Object.defineProperty(t,"IndexedCramFile",{enumerable:!0,get:function(){return n(s).default}})},6014:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{A(n.next(e))}catch(e){o(e)}}function a(e){try{A(n.throw(e))}catch(e){o(e)}}function A(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}A((n=n.apply(e,t||[])).next())}))},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const o=r(9747),s=i(r(7390));t.default=class{constructor(e){var t;if(this.cram=null!==(t=e.cram)&&void 0!==t?t:new s.default({url:e.cramUrl,path:e.cramPath,filehandle:e.cramFilehandle,seqFetch:e.seqFetch,checkSequenceMD5:e.checkSequenceMD5,cacheSize:e.cacheSize}),!(this.cram instanceof s.default))throw new Error("invalid arguments: no cramfile");this.index=e.index}getRecordsForRange(e,t,r){return n(this,arguments,void 0,(function*(e,t,r,n={}){if(n.viewAsPairs=n.viewAsPairs||!1,n.pairAcrossChr=n.pairAcrossChr||!1,n.maxInsertSize=n.maxInsertSize||2e5,"string"==typeof e)throw new o.CramUnimplementedError("string sequence names not yet supported");const i=e,s=yield this.index.getEntriesForRange(i,t,r),a=n=>n.sequenceId===e&&n.alignmentStart<=r&&void 0!==n.lengthOnRef&&n.alignmentStart+n.lengthOnRef-1>=t,A=yield Promise.all(s.map((e=>this.getRecordsInSlice(e,a))));let f=Array.prototype.concat(...A);if(n.viewAsPairs){const e={},t={};for(const r of f){const n=r.readName;if(void 0===n)throw new Error("readName undefined");const i=r.uniqueId;e[n]||(e[n]=0),e[n]+=1,t[i]=1}const r={};Object.entries(e).forEach((([e,t])=>{1===t&&(r[e]=!0)}));const o=[];for(const e of f){const t=e.readName;if(void 0===t)throw new Error("readName undefined");if(r[t]&&e.mate&&(e.mate.sequenceId===i||n.pairAcrossChr)&&Math.abs(e.alignmentStart-e.mate.alignmentStart)e.toString().localeCompare(t.toString()))).filter(((e,t,r)=>!t||e.toString()!==r[t-1].toString()));const A=[],h=[];for(const e of a){let n=this.cram.featureCache.get(e.toString());n||(n=this.getRecordsInSlice(e,(()=>!0)),this.cram.featureCache.set(e.toString(),n)),A.push(n);const i=n.then((e=>{const n=[];for(const i of e){if(void 0===i.readName)throw new Error("readName undefined");r[i.readName]&&!t[i.uniqueId]&&n.push(i)}return n}));h.push(i)}const l=yield Promise.all(h);if(l.length){const e=l.reduce(((e,t)=>e.concat(t)));f=f.concat(e)}}return f}))}getRecordsInSlice({containerStart:e,sliceStart:t,sliceBytes:r},n){return this.cram.getContainerAtPosition(e).getSlice(t,r).getRecords(n)}hasDataForReferenceSequence(e){return this.index.hasDataForReferenceSequence(e)}}},5931:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RemoteFile=t.LocalFile=void 0,t.open=function(e,t,r){if(r)return r;if(e)return new n.RemoteFile(e);if(t)return new n.LocalFile(t);throw new Error("no url, path, or filehandle provided, cannot open")};const n=r(1113);var i=r(1113);Object.defineProperty(t,"LocalFile",{enumerable:!0,get:function(){return i.LocalFile}}),Object.defineProperty(t,"RemoteFile",{enumerable:!0,get:function(){return i.RemoteFile}})},6476:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RANS_BYTE_L=t.TOTFREQ=t.TF_SHIFT=void 0,t.TF_SHIFT=12,t.TOTFREQ=4096,t.RANS_BYTE_L=1<<23},997:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r,n){let a=e.getInt(),A=e.getInt(),f=e.getInt(),h=e.getInt();const l=n.remaining(),u=-4&l;for(let i=0;i>2;let u=0,c=l,d=2*l,g=3*l,I=0,p=0,C=0,m=0;for(;u{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9747),i=r(6476);class o{constructor(){this.F=void 0,this.C=void 0}}function s(e,t,r,n){return r*(e>>n)+(e&(1<>o)+(e&(1<=128&&(t.fc[A].F&=-129,t.fc[A].F=(127&t.fc[A].F)<<8|255&e.get()),t.fc[A].C=i,s.default.symbolInit(r[A],t.fc[A].C,t.fc[A].F),t.R||(t.R=new Array(o.TOTFREQ)),t.R.fill(A,i,i+t.fc[A].F),i+=t.fc[A].F,0===n&&A+1===(255&e.getByteAt(e.position()))?(A=255&e.get(),n=255&e.get()):0!==n?(n-=1,A+=1):A=255&e.get()}while(0!==A);a(i=128&&(t[i].fc[h].F&=-129,t[i].fc[h].F=(127&t[i].fc[h].F)<<8|255&e.get()),t[i].fc[h].C=f,0===t[i].fc[h].F&&(t[i].fc[h].F=o.TOTFREQ),null==r[i][h]&&(r[i][h]=new s.default.RansDecSymbol),s.default.symbolInit(r[i][h],t[i].fc[h].C,t[i].fc[h].F),null==t[i].R&&(t[i].R=new Array(o.TOTFREQ)),t[i].R.fill(h,f,f+t[i].fc[h].F),f+=t[i].fc[h].F,a(f<=o.TOTFREQ),0===A&&h+1===(255&e.getByteAt(e.position()))?(h=255&e.get(),A=255&e.get()):0!==A?(A-=1,h+=1):h=255&e.get()}while(0!==h);0===n&&i+1===(255&e.getByteAt(e.position()))?(i=255&e.get(),n=255&e.get()):0!==n?(n-=1,i+=1):i=255&e.get()}while(0!==i)};const i=r(9747),o=r(6476),s=n(r(488));function a(e){if(!e)throw new i.CramMalformedError("assertion failed")}},9989:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r=0){if(0===e.length)return t.fill(0),t;const n=new l(e,r),u=n.get();if(0!==u&&1!==u)throw new o.CramMalformedError(`Invalid rANS order ${u}`);if(n.getInt()!==n.remaining()-h)throw new o.CramMalformedError("Incorrect input length.");const c=n.getInt(),d=new l(t||i.Buffer.allocUnsafe(c));if(d.length{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseHeaderText=function(e){const t=e.split(/\r?\n/),r=[];for(const e of t){const[t,...n]=e.split(/\t/);t&&r.push({tag:t.slice(1),data:n.map((e=>{const t=e.indexOf(":");return-1!==t?{tag:e.slice(0,t),value:e.slice(t+1)}:{tag:e,value:""}}))})}return r}},8712:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.unzip=function(e){return i.Buffer.from((0,n.inflate)(e))};const n=r(1668),i=r(8287)},635:(e,t,r)=>{var n=r(8287).Buffer;const i=r(4646),o=r(8706),s=r(9614),a=r(235),A=128;e.exports=class{decode(e){return this.stream=new o(e),this.decodeStream(this.stream)}decodeStream(e,t=0){var r=this.stream.ReadByte();16&r||(t=this.stream.ReadUint7());var n,i=t,o=1&r;if(8&r)return this.decodeStripe(this.stream,t);if(r&A&&([n,i]=this.decodePackMeta(this.stream)),32&r)var s=this.decodeCat(this.stream,i);else s=4&r?this.decodeExt(this.stream,i):64&r?o?this.decodeRLE1(this.stream,i):this.decodeRLE0(this.stream,i):o?this.decode1(this.stream,i):this.decode0(this.stream,i);return r&A&&(s=this.decodePack(s,n,t)),s}encode(e,t){if(this.stream=new o("",0,1.1*e.length+100),this.stream.WriteByte(t),16&t||this.stream.WriteUint7(e.length),8&t)return n.concat([this.stream.buf.slice(0,this.stream.pos),this.encodeStripe(this.stream,e,t>>8)]);var r,i=1&t,s=e.length;return t&A&&([r,e,s]=this.encodePack(e)),t&A&&this.stream.WriteStream(r),64&t?i?this.encodeRLE1(e,s,this.stream):this.encodeRLE0(e,s,this.stream):i?this.encode1(e,s,this.stream):this.encode0(e,s,this.stream)}decode0(e,t){var r=new n.allocUnsafe(t),o=e.ReadByte();0==o&&(o=256);var a=new s(o),A=new i(e);A.RangeStartDecode(e);for(var f=0;f=3?3:h;for(A[l].ModelEncode(r,f,u),h-=u,l=256;3==u;)u=h>=3?3:h,A[l].ModelEncode(r,f,u),l=257,h-=u}return f.RangeFinishEncode(r),r.buf.slice(0,r.pos)}decodeRLE1(e,t){var r=new n.allocUnsafe(t),o=e.ReadByte();0==o&&(o=256);for(var a=new Array(o),A=0;A=3?3:l;for(A[u].ModelEncode(r,f,c),l-=c,u=256;3==c;)c=l>=3?3:l,A[u].ModelEncode(r,f,c),u=257,l-=c}return f.RangeFinishEncode(r),r.buf.slice(0,r.pos)}decodePackMeta(e){this.nsym=e.ReadByte();for(var t=new Array(this.nsym),r=0;r>=1}}else if(this.nsym<=4)for(o=0,s=0;o>=2;else{if(!(this.nsym<=16))return e;for(o=0,s=0;o>=4}return i}packMeta(e){for(var t=new o("",0,1024),r=new Array(256),n=0;ns),n[s]=new Array(i[s]);for(var a=0,A=0;As),a[s]=this.decodeStream(e,o[s]);var A=new n.allocUnsafe(t);for(s=0;s{e.exports=class{constructor(e){this.low=0,this.range=4294967295,this.code=0,this.FFnum=0,this.carry=0,this.cache=0}RangeStartDecode(e){for(var t=0;t<5;t++)this.code=(this.code<<8)+e.ReadByte();this.code&=4294967295,this.code>>>=0}RangeGetFrequency(e){return this.range=Math.floor(this.range/e),Math.floor(this.code/this.range)}RangeDecode(e,t,r,n){for(this.code-=t*this.range,this.range*=r;this.range<1<<24;)this.range*=256,this.code=256*this.code+e.ReadByte()}RangeShiftLow(e){if(this.low<4278190080|this.carry){for(e.WriteByte(this.cache+this.carry);this.FFnum;)e.WriteByte(this.carry-1),this.FFnum--;this.cache=this.low>>>24,this.carry=0}else this.FFnum++;this.low<<=8,this.low>>>=0}RangeEncode(e,t,r,n){var i=this.low;for(this.range=Math.floor(this.range/n),this.low+=t*this.range,this.low>>>=0,this.range*=r,this.low{e.exports=class{constructor(e=256){this.total_freq=e,this.max_sym=e-1,this.S=new Array,this.F=new Array;for(var t=0;t<=this.max_sym;t++)this.S[t]=t,this.F[t]=1}ModelDecode(e,t){for(var r=t.RangeGetFrequency(this.total_freq),n=0,i=0;n+this.F[i]<=r;)n+=this.F[i++];t.RangeDecode(e,n,this.F[i],this.total_freq),this.F[i]+=16,this.total_freq+=16,this.total_freq>65519&&this.ModelRenormalise();var o=this.S[i];if(i>0&&this.F[i]>this.F[i-1]){var s=this.F[i];this.F[i]=this.F[i-1],this.F[i-1]=s,s=this.S[i],this.S[i]=this.S[i-1],this.S[i-1]=s}return o}ModelRenormalise(){this.total_freq=0;for(var e=0;e<=this.max_sym;e++)this.F[e]-=Math.floor(this.F[e]/2),this.total_freq+=this.F[e]}ModelEncode(e,t,r){for(var n=0,i=0;this.S[i]!=r;i++)n+=this.F[i];if(t.RangeEncode(e,n,this.F[i],this.total_freq),this.F[i]+=16,this.total_freq+=16,this.total_freq>65519&&this.ModelRenormalise(),r=this.S[i],i>0&&this.F[i]>this.F[i-1]){var o=this.F[i];this.F[i]=this.F[i-1],this.F[i-1]=o,o=this.S[i],this.S[i]=this.S[i-1],this.S[i-1]=o}}}},6038:(e,t,r)=>{var n=r(8287).Buffer;const i=r(8706),o=r(9614),s=r(4646);function a(e,t,r){for(var n=0,i=0,o=-1,s=new Array(1024);i>4,t.qshift=15&r,r=e.ReadByte(),t.qloc=r>>4,t.sloc=15&r,r=e.ReadByte(),t.ploc=r>>4,t.dloc=15&r,t.qmap=new Array(256),t.pflags&l)for(var n=0;n0&&t.pflags&d)a(e,t.qtab,256);else for(n=0;n<256;n++)t.qtab[n]=n;return t.ptab=new Array(1024),t.pflags&u&&a(e,t.ptab,1024),t.dtab=new Array(256),t.pflags&c&&a(e,t.dtab,256),t}function p(e,t,r,n,i,o){r.max_sel>0?i.s=n.sel.ModelDecode(e,t):i.s=0,i.x=r.stab[i.s];var s=r.params[i.x];if(s.fixed_len>=0){var a=n.len[0].ModelDecode(e,t);a|=n.len[1].ModelDecode(e,t)<<8,a|=n.len[2].ModelDecode(e,t)<<16,a|=n.len[3].ModelDecode(e,t)<<24,s.fixed_len>0&&(s.fixed_len=-a)}else a=-s.fixed_len;i.len=a,r.do_rev&&(o[i.rec]=n.rev.ModelDecode(e,t)),i.is_dup=0,s.pflags&A&&n.dup.ModelDecode(e,t)&&(i.is_dup=1),i.p=a,i.delta=0,i.qctx=0,i.prevq=0,i.rec++}function C(e,t,r){for(var n=0,i=0,o=new Array(2*r),s=0;n1?r.nparam-1:0,o=new Array(256);if(2&r)i=e.ReadByte(),a(e,o,256);else{for(var s=0;s0&&(t.sel=new o(e.max_sel+1)),t}(i),l=new s(e);l.RangeStartDecode(e);for(var u=new n.allocUnsafe(r),c={qctx:0,prevq:0,delta:0,p:0,s:0,x:0,len:0,is_dup:0,rec:0},d=0;d0&&h.dup.ModelDecode(e,l)){for(var C=0;C4),qshift:l,qloc:7,pbits:7,pshift:t[0]>128?1:0,ploc:0,dbits:l>4?0:1,dshift:3,dloc:15,sbits:0,sloc:15,do_stab:0,context:0,max_sym:A,nsym:a,do_qmap:u,do_dedup:0,fixed_len:1==t.length?1:0,do_sel:0,do_rev:0,do_pos:1,do_delta:l<=4?1:0,do_qtab:0,qbits:8+(l>4)-(0==s),sbits:1,sloc:15-(l<=4),do_stab:1,do_sel:1}]}(e,t,r,n),w=function(e,t,r,n,i,o,s){for(var a=[0,1,1,1,2,2,2,2,2,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7],g=0;g1?1:0)|(t[0].do_stab?2:0);if(e.WriteByte(I),1&I&&e.WriteByte(t.length),2&I){var p=1<0&&p--,e.WriteByte(p),C(e,s,256)}for(var m=0;m0){for(g=0;g<256;g++)n[m][g]=g;t[m].do_qtab&&C(e,n[m],256)}if(t[m].pbits>0){for(g=0;g<1024;g++)i[m][g]=Math.min((1<>t[m].pshift);C(e,i[m],1024)}if(t[m].dbits>0){for(g=0;g<256;g++)a[g]>(1<>t[m].dshift)];C(e,o[m],256)}}return e}(w,B,n,a,g,I,p);return function(e,t,r,n,i,a,A,f,h,l){var u=1<0&&u--;for(var c=t.length,d=0,g=0;g0&&m.ModelEncode(e,B,y);var _=l[y],E=r[Math.min(r.length-1,w++)];i[_].fixed_len?i[_].fixed_len>0&&(C[0].ModelEncode(e,B,255&E),C[1].ModelEncode(e,B,E>>8&255),C[2].ModelEncode(e,B,E>>16&255),C[3].ModelEncode(e,B,E>>24&255),i[_].fixed_len=-1):(C[0].ModelEncode(e,B,255&E),C[1].ModelEncode(e,B,E>>8&255),C[2].ModelEncode(e,B,E>>16&255),C[3].ModelEncode(e,B,E>>24&255)),i[_].do_dedup&&process.exit(1),g=E;var v=0,b=i[_].context,Q=0,S=0}var k=t[p++],D=a[_][k];I[b].ModelEncode(e,B,D),Q=(Q<0&&(b+=f[_][Math.min(g,1023)]<0&&(b+=h[_][Math.min(v,255)]<{"use strict";var n=r(8287).Buffer,i=r(5460),o=r(8223),s=r(635),a=r(6038),A=r(5997);e.exports={r4x8_uncompress:function(e,t){i.decode(e).copy(t,0,0)},r4x16_uncompress:function(e,t){o.decode(e).copy(t,0,0)},arith_uncompress:function(e,t){s.decode(e).copy(t,0,0)},fqzcomp_uncompress:function(e,t){var r=new Array;a.decode(e,r).copy(t,0,0)},tok3_uncompress:function(e,t){var r=A.decode(e,0,"\0");n.from(r,"binary").copy(t,0,0)}}},8706:(e,t,r)=>{var n=r(8287).Buffer;e.exports=class{constructor(e,t=0,r=0){0!=r?(this.buf=n.allocUnsafe(r),this.length=r):(this.buf=e,this.length=e.length),this.pos=t}EOF(){return this.pos>=this.length}ReadData(e){var t=this.buf.slice(this.pos,this.pos+e);return this.pos+=e,t}ReadByte(){const e=this.buf[this.pos];return this.pos++,e}ReadChar(){const e=this.buf[this.pos];return this.pos++,String.fromCharCode(e)}ReadUint16(){return this.ReadByte()|this.ReadByte()<<8}ReadUint32(){const e=this.buf.readInt32LE(this.pos);return this.pos+=4,e}ReadString(){var e="";do{var t=this.buf[this.pos++];t&&(e+=String.fromCharCode(t))}while(t);return e}ReadUint7(){var e=0;do{var t=this.ReadByte();e=e<<7|127&t}while(128&t);return e}ReadITF8(){var e=this.buf[this.pos];return this.pos++,e>=240?(e=(15&e)<<28,e+=(this.buf[this.pos+0]<<20)+(this.buf[this.pos+1]<<12)+(this.buf[this.pos+2]<<4)+(this.buf[this.pos+3]>>4),this.pos+=4):e>=224?(e=(15&e)<<24,e+=(this.buf[this.pos+0]<<16)+(this.buf[this.pos+1]<<8)+(0|this.buf[this.pos+2]),this.pos+=3):e>=192?(e=(31&e)<<16,e+=(this.buf[this.pos+0]<<8)+(0|this.buf[this.pos+1]),this.pos+=2):e>=128&&(e=(63&e)<<8,e+=this.buf[this.pos],this.pos++),e}WriteByte(e){this.buf[this.pos++]=e}WriteChar(e){this.buf[this.pos++]=e.charCodeAt(0)}WriteString(e){for(var t=0;t>8&255)}WriteUint32(e){this.buf.writeInt32LE(e,this.pos),this.pos+=4}WriteUint7(e){var t=0,r=e;do{t+=7,r>>=7}while(r>0);do{t-=7,this.WriteByte((e>>t&127)+((t>0)<<7))}while(t>0)}WriteITF8(e){e<0&&(e=1+e),e<=127?this.buf[this.pos++]=e:e<=16383?(this.buf[this.pos++]=128|Math.floor(e/256),this.buf[this.pos++]=255&e):e<131071?(this.buf[this.pos++]=192|Math.floor(e/65536),this.buf[this.pos++]=255&Math.floor(e/256),this.buf[this.pos++]=255&e):e<268435455?(this.buf[this.pos++]=224|Math.floor(e/16777216),this.buf[this.pos++]=255&Math.floor(e/65536),this.buf[this.pos++]=255&Math.floor(e/256),this.buf[this.pos++]=255&e):(this.buf[this.pos++]=240|Math.floor(e/268435456),this.buf[this.pos++]=255&Math.floor(e/1048576),this.buf[this.pos++]=255&Math.floor(e/4096),this.buf[this.pos++]=255&Math.floor(e/4),this.buf[this.pos++]=15&e)}WriteByteNeg(e){this.buf[--this.pos]=e}}},5460:(e,t,r)=>{var n=r(8287).Buffer;const i=r(8706);function o(e){return 4095&e}function s(e,t){for(var r=0;t>=e[r+1];)r++;return r}function a(e){for(var t=new Array(4096),r=0,n=0;n<4096;n++){for(;n>=e[r+1];)r++;t[n]=r}return t}function A(e,t,r){return r*(e>>12)+(4095&e)-t}function f(e,t){for(;t<1<<23;)t=(t<<8)+e.ReadByte();return t}function h(e,t){t.WriteByteNeg(e>>24&255),t.WriteByteNeg(e>>16&255),t.WriteByteNeg(e>>8&255),t.WriteByteNeg(255&e)}function l(e,t,r,n,i){return e=function(e,t,r,n){for(var i=(1<<23>>n<<8)*r;e>=i;)t.WriteByteNeg(255&e),e>>=8;return e}(e,t,n,i),(Math.floor(e/n)<0?(s--,i++):(i=e.ReadByte())==o+1&&(s=e.ReadByte()),o=i}while(0!=i);for(r[0]=0,n=0;n<=255;n++)r[n+1]=r[n]+t[n]}function c(e){for(var t=0,r=0;r<256;r++)t+=e[r];const n=4096;var i=n/t;do{var o=0,s=0,a=0;for(t=0,r=0;r<256;r++)0!=e[r]&&(o2?e[s]-=t-n:t!=n&&(i*=.99,a=1)}while(a)}function d(e,t){for(var r=0,n=0;n<256;n++)if(t[n]){if(r>0)r--;else if(e.WriteByte(n),n>0&&t[n-1]>0){for(r=n+1;r<256&&t[r];r++);r-=n+1,e.WriteByte(r)}e.WriteITF8(t[n])}e.WriteByte(0)}e.exports={decode:function(e){var t=new i(e),r=t.ReadByte(),h=(t.ReadUint32(),t.ReadUint32());return 0==r?function(e,t){var r=new Array(256),i=new Array(256);u(e,r,i);for(var s=a(i),h=new Array(4),l=0;l<4;l++)h[l]=e.ReadUint32();var c=new n.allocUnsafe(t);for(l=0;l0?(a--,o++):(o=e.ReadByte())==s+1&&(a=e.ReadByte()),s=o}while(0!=o)}(e,r,i);for(var h=new Array(256),l=0;l<256;l++)h[l]=a(i[l]);for(var c=new Array(4),d=new Array(4),g=0;g<4;g++)c[g]=e.ReadUint32(),d[g]=0;var I=new n.allocUnsafe(t),p=Math.floor(t/4);for(l=0;l=0;a--)A[a%4]=l(A[a%4],u,s[e[a]],o[e[a]],12);for(a=3;a>=0;a--)h(A[a],u);var g=r.pos;return r.buf.writeInt32LE(g-9+(u.length-u.pos),1),r.buf.writeInt32LE(t,5),n.concat([r.buf.slice(0,r.pos),u.buf.slice(u.pos,u.length)],r.pos+u.length-u.pos)}(e):function(e){const t=e.length;var r=new i("",0,198156);r.WriteByte(1),r.WriteUint32(0),r.WriteUint32(0);for(var o=new Array(256),s=new Array(256),a=new Array(256),A=0;A<256;A++)s[A]=new Array(256),a[A]=new Array(256);for(function(e,t,r){for(var n=0;n<256;n++){r[n]=0;for(var i=0;i<256;i++)t[n][i]=0}var o=0;for(n=0;n>2)]]++,t[0][e[2*(e.length>>2)]]++,t[0][e[3*(e.length>>2)]]++,r[0]+=3}(e,s,o),function(e,t){for(var r=0;r<256;r++)t[r]&&c(e[r])}(s,o),function(e,t,r){for(var n=0,i=0;i<256;i++)if(r[i]){if(n>0)n--;else if(e.WriteByte(i),i>0&&r[i-1]>0){for(n=i+1;n<256&&r[n];n++);n-=i+1,e.WriteByte(n)}d(e,t[i])}e.WriteByte(0)}(r,s,o),A=0;A<256;A++)if(o[A]){a[A][0]=0;for(var f=1;f<256;f++)a[A][f]=a[A][f-1]+s[A][f-1]}var u=new Array(4),g=new Array(4);for(f=0;f<4;f++)u[f]=1<<23,g[f]=0;var I=new i("",t,t),p=Math.floor(t/4),C=new Array(4),m=new Array(4);for(f=0;f<4;f++)C[f]=(f+1)*p-2,m[f]=e[C[f]+1];for(m[3]=e[t-1],A=t-2;A>4*p-2;A--)u[3]=l(u[3],I,a[e[A]][m[3]],s[e[A]][m[3]],12),m[3]=e[A];for(;C[0]>=0;)for(f=3;f>=0;f--){var B=e[C[f]];u[f]=l(u[f],I,a[B][m[f]],s[B][m[f]],12),m[f]=B,C[f]--}for(f=3;f>=0;f--)u[f]=l(u[f],I,a[0][m[f]],s[0][m[f]],12);for(A=3;A>=0;A--)h(u[A],I);var w=r.pos;return r.buf.writeInt32LE(w-9+(I.length-I.pos),1),r.buf.writeInt32LE(t,5),n.concat([r.buf.slice(0,r.pos),I.buf.slice(I.pos,I.length)],r.pos+I.length-I.pos)}(e)}}},8223:(e,t,r)=>{var n=r(8287).Buffer;const i=r(8706);function o(e,t){return e&(1<=e[r+1];)r++;return r}function a(e,t){for(var r=1<=e[i+1];)i++;n[o]=i}return n}function A(e,t,r,n){return r*(e>>n)+(e&(1<>24&255),t.WriteByteNeg(e>>16&255),t.WriteByteNeg(e>>8&255),t.WriteByteNeg(255&e)}function l(e,t,r,n,i){return e=function(e,t,r,n){for(var i=(1<<31-n)*r;e>=i;)t.WriteByteNeg(e>>8&255),t.WriteByteNeg(255&e),e>>=16;return e}(e,t,n,i),(Math.floor(e/n)<s),n[s]=new Array(o[s]);for(var a=0,A=0;As),a[s]=c(e,o[s]);var A=new n.allocUnsafe(t);for(s=0;s>4,h=e;if(1&c){var l=e.ReadUint7(),u=e.ReadUint7(),c=new i(e.ReadData(u));h=new i(I(c,l))}var d=new Array(256),p=new Array(256);!function(e,t,r,n){for(var i=0;i<256;i++){t[i]=new Array(256),r[i]=new Array(256);for(var o=0;o<256;o++)t[i][o]=0}var s=g(e);for(i=0;i<256;i++)if(s[i]){var a=0;for(o=0;o<256;o++)s[o]&&(a>0?a--:(t[i][o]=e.ReadUint7(),0==t[i][o]&&(a=e.ReadByte())));for(C(t[i],n),r[i][0]=0,o=0;o<256;o++)r[i][o+1]=r[i][o]+t[i][o]}}(h,d,p,r);for(var m=new Array(256),B=0;B<256;B++)m[B]=a(p[B],r);for(var w=new Array(4),y=new Array(4),_=0;_<4;_++)w[_]=e.ReadUint32(),y[_]=0;var E=new n.allocUnsafe(t),v=Math.floor(t/4);for(B=0;B>=1}else if(r<=4)for(a=0;a>=2;else if(r<=16)for(a=0;a>=4;return o}(v,B,w,m)),v}function d(e,t){var r=new i("",0,10);r.WriteByte(t);var o=1&t,s=8&t,a=32&t,A=64&t,f=128&t,c=t>>8;if(16&t||r.WriteUint7(e.length),s)return n.concat([r.buf.slice(0,r.pos),u(0,e,c)]);var d=new n.alloc(0);f&&([d,e]=function(e){for(var t=new Array(256),r=0;r<256;r++)t[r]=0;for(r=0;r0&&(o[r]=s++);if(!(s>16)){if(s<=1)var a=new n.allocUnsafe(0);else if(s<=2){a=new n.allocUnsafe(Math.ceil(e.length/8));var A=-1;for(r=0;r0&&(t[r]=A++,f.WriteByte(r));return f.WriteUint7(a.length),[f.buf.slice(0,f.pos),a]}}(e));var g=new n.alloc(0);if(A&&([g,e]=function(e){for(var t=new Array(256),r=0;r<256;r++)t[r]=0;var o=-1;for(r=0;r0&&s++;for(s||(s=1,t[0]=1),(h=new i("",0,s+1+e.length)).WriteByte(s),r=0;r<256;r++)t[r]>0&&h.WriteByte(r);var a=new n.allocUnsafe(e.length),A=0;for(r=0;r0){o=e[r];for(var f=0;r+f+1>2)]]++,t[0][e[2*(e.length>>2)]]++,t[0][e[3*(e.length>>2)]]++,r[0]+=3})(e,s,o),function(e,t){for(var r=0;r<256;r++)if(t[r]){var n=Math.ceil(Math.log2(t[r]));n>12&&(n=12),p(e[r],n)}}(s,o);var u=new i("",0,198156);!function(e,t,r){m(e,r);for(var n=0;n<256;n++)if(r[n])for(var i=0,o=0;o<256;o++)if(r[o])if(i)i--;else if(e.WriteUint7(t[n][o]),!t[n][o]){for(var s=o+1;s<256;s++)if(r[s]){if(0!=t[n][s])break;i++}e.WriteByte(i)}}(u,s,o);var c=B(u.buf.slice(0,u.pos));for(c.length4*y-2;A--)g[3]=l(g[3],w,a[e[A]][E[3]],s[e[A]][E[3]],f),E[3]=e[A];for(;_[0]>=0;)for(d=3;d>=0;d--){var v=e[_[d]];g[d]=l(g[d],w,a[v][E[d]],s[v][E[d]],f),E[d]=v,_[d]--}for(d=3;d>=0;d--)g[d]=l(g[d],w,a[0][E[d]],s[0][E[d]],f);for(A=3;A>=0;A--)h(g[A],w);return n.concat([r.buf.slice(0,r.pos),w.buf.slice(w.pos,w.length)],r.pos+w.length-w.pos)}(e);return n.concat([r.buf.slice(0,r.pos),d,g,I])}function g(e){for(var t=new Array(256),r=0;r<256;r++)t[r]=0;var n=0,i=e.ReadByte(),o=i;do{t[i]=1,n>0?(n--,i++):(i=e.ReadByte())==o+1&&(n=e.ReadByte()),o=i}while(0!=i);return t}function I(e,t){var r=new Array(256),i=new Array(256);!function(e,t,r){for(var n=0;n<256;n++)t[n]=0;var i=g(e);for(n=0;n<256;n++)i[n]>0&&(t[n]=e.ReadUint7());for(C(t,12),r[0]=0,n=0;n<=255;n++)r[n+1]=r[n]+t[n]}(e,r,i);for(var s=a(i,12),h=new Array(4),l=0;l<4;l++)h[l]=e.ReadUint32();var u=new n.allocUnsafe(t);for(l=0;l2?e[a]-=r-i:r!=i&&(o=i/r,A=1)}while(A)}function C(e,t){for(var r=0,n=0;n<256;n++)r+=e[n];if(0!=r&&r!=1<0)r--;else if(e.WriteByte(n),n>0&&t[n-1]>0){for(r=n+1;r<256&&t[r];r++);r-=n+1,e.WriteByte(r)}e.WriteByte(0)}function B(e){const t=e.length;var r=new i("",0,780),o=new Array(256);!function(e,t){for(var r=0;r<256;r++)t[r]=0;for(r=0;r12&&(s=12),p(o,s),function(e,t){m(e,t);for(var r=0;r<256;r++)t[r]&&e.WriteUint7(t[r])}(r,o),p(o,12);var a=new Array(256);a[0]=0;for(var A=1;A<256;A++)a[A]=a[A-1]+o[A-1];var f=new Array(4);for(A=0;A<4;A++)f[A]=32768;var u=new i("",1.05*t+100|0,1.05*t+100|0);for(A=t-1;A>=0;A--)f[A%4]=l(f[A%4],u,a[e[A]],o[e[A]],12);for(A=3;A>=0;A--)h(f[A],u);return n.concat([r.buf.slice(0,r.pos),u.buf.slice(u.pos,u.length)],r.pos+u.length-u.pos)}e.exports={decode:function(e){return c(new i(e),0)},encode:d}},5997:(e,t,r)=>{var n=r(8287).Buffer;const i=r(8706),o=r(8223);var s=new(r(635));function a(e,t){for(var r=e+"";r.length0&&5==t[s][0].type)&&t[s][r])switch(e[0].WriteByte(t[s][r].type),t[s][r].type){case 6:e[6].WriteUint32(t[s][r].val);break;case 5:e[5].WriteUint32(t[s][r].val);break;case 1:e[1].WriteString(t[s][r].val);break;case 2:e[2].WriteChar(t[s][r].val);break;case 7:e[7].WriteUint32(t[s][r].val);break;case 3:e[3].WriteUint32(t[s][r].val),e[4].WriteByte(t[s][r].val.length);break;case 8:case 9:e[t[s][r].type].WriteByte(t[s][r].val)}}function h(e,t,r,n){for(var i=0;i<=12;i++)if(!(e[i].pos<=0)){n.WriteByte(i+(0==i?128:0)),e[i]=e[i].buf.slice(0,e[i].pos);var o=l(e[i],r);n.WriteUint7(o.length),n.WriteData(o,o.length)}}function l(e,t){var r,n=1<<30,i=[0,1,64,65,128,129,201];for(var a in i){var A=i[a];if(!(1&A&&e.length<100||8&A&&e.length%4!=0)){try{var f=t?s.encode(e,A):o.encode(e,A)}catch(e){f=0}f&&n>f.length&&(n=f.length,r=f)}}return r}function u(e,t,r,n,i){var o=0,s=i-1;e[i]=new Array(256),t[n]?e[i][0]={type:5,val:i-t[n]}:e[i][0]={type:6,val:0==i?0:1},t[n]=i;for(var a=n.match(/([a-zA-Z0-9]{1,9})|([^a-zA-Z0-9]+)/g),A=0;A=0&&e[s][f])if(e[s][f].str==a[A])h=10,l="";else if(7==e[s][f].type||8==e[s][f].type){var u=l-e[s][f].str;r[f]++,u>=0&&u<256&&r[f]>i/2&&(h=8,l=u)}else 3!=e[s][f].type&&9!=e[s][f].type||e[s][f].str.length!=l.length||(u=l-e[s][f].str,r[f]++,u>=0&&u<256&&r[f]>i/2&&(h=9,l=u));e[i][f]={str:a[A],val:l,type:h},o{"use strict";t.byteLength=function(e){var t=a(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){var t,r,o=a(e),s=o[0],A=o[1],f=new i(function(e,t,r){return 3*(t+r)/4-r}(0,s,A)),h=0,l=A>0?s-4:s;for(r=0;r>16&255,f[h++]=t>>8&255,f[h++]=255&t;return 2===A&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,f[h++]=255&t),1===A&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,f[h++]=t>>8&255,f[h++]=255&t),f},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,o=[],s=16383,a=0,f=n-i;af?f:a+s));return 1===i?(t=e[n-1],o.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],o.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"=")),o.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0;s<64;++s)r[s]=o[s],n[o.charCodeAt(s)]=s;function a(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function A(e,t,n){for(var i,o,s=[],a=t;a>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return s.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},8287:(e,t,r)=>{"use strict";const n=r(7526),i=r(251),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=A,t.SlowBuffer=function(e){return+e!=e&&(e=0),A.alloc(+e)},t.INSPECT_MAX_BYTES=50;const s=2147483647;function a(e){if(e>s)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,A.prototype),t}function A(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return l(e)}return f(e,t,r)}function f(e,t,r){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!A.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const r=0|g(e,t);let n=a(r);const i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}(e,t);if(ArrayBuffer.isView(e))return function(e){if(j(e,Uint8Array)){const t=new Uint8Array(e);return c(t.buffer,t.byteOffset,t.byteLength)}return u(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(j(e,ArrayBuffer)||e&&j(e.buffer,ArrayBuffer))return c(e,t,r);if("undefined"!=typeof SharedArrayBuffer&&(j(e,SharedArrayBuffer)||e&&j(e.buffer,SharedArrayBuffer)))return c(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return A.from(n,t,r);const i=function(e){if(A.isBuffer(e)){const t=0|d(e.length),r=a(t);return 0===r.length||e.copy(r,0,0,t),r}return void 0!==e.length?"number"!=typeof e.length||Z(e.length)?a(0):u(e):"Buffer"===e.type&&Array.isArray(e.data)?u(e.data):void 0}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return A.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function h(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function l(e){return h(e),a(e<0?0:0|d(e))}function u(e){const t=e.length<0?0:0|d(e.length),r=a(t);for(let n=0;n=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return 0|e}function g(e,t){if(A.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||j(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return Y(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return W(e).length;default:if(i)return n?-1:Y(e).length;t=(""+t).toLowerCase(),i=!0}}function I(e,t,r){let n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return D(this,t,r);case"utf8":case"utf-8":return b(this,t,r);case"ascii":return S(this,t,r);case"latin1":case"binary":return k(this,t,r);case"base64":return v(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function p(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function C(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),Z(r=+r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=A.from(t,n)),A.isBuffer(t))return 0===t.length?-1:m(e,t,r,n,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):m(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function m(e,t,r,n,i){let o,s=1,a=e.length,A=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;s=2,a/=2,A/=2,r/=2}function f(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(i){let n=-1;for(o=r;oa&&(r=a-A),o=r;o>=0;o--){let r=!0;for(let n=0;ni&&(n=i):n=i;const o=t.length;let s;for(n>o/2&&(n=o/2),s=0;s>8,i=r%256,o.push(i),o.push(n);return o}(t,e.length-r),e,r,n)}function v(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function b(e,t,r){r=Math.min(e.length,r);const n=[];let i=t;for(;i239?4:t>223?3:t>191?2:1;if(i+s<=r){let r,n,a,A;switch(s){case 1:t<128&&(o=t);break;case 2:r=e[i+1],128==(192&r)&&(A=(31&t)<<6|63&r,A>127&&(o=A));break;case 3:r=e[i+1],n=e[i+2],128==(192&r)&&128==(192&n)&&(A=(15&t)<<12|(63&r)<<6|63&n,A>2047&&(A<55296||A>57343)&&(o=A));break;case 4:r=e[i+1],n=e[i+2],a=e[i+3],128==(192&r)&&128==(192&n)&&128==(192&a)&&(A=(15&t)<<18|(63&r)<<12|(63&n)<<6|63&a,A>65535&&A<1114112&&(o=A))}}null===o?(o=65533,s=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),i+=s}return function(e){const t=e.length;if(t<=Q)return String.fromCharCode.apply(String,e);let r="",n=0;for(;nn.length?(A.isBuffer(t)||(t=A.from(t)),t.copy(n,i)):Uint8Array.prototype.set.call(n,t,i);else{if(!A.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(n,i)}i+=t.length}return n},A.byteLength=g,A.prototype._isBuffer=!0,A.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;tr&&(e+=" ... "),""},o&&(A.prototype[o]=A.prototype.inspect),A.prototype.compare=function(e,t,r,n,i){if(j(e,Uint8Array)&&(e=A.from(e,e.offset,e.byteLength)),!A.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;let o=(i>>>=0)-(n>>>=0),s=(r>>>=0)-(t>>>=0);const a=Math.min(o,s),f=this.slice(n,i),h=e.slice(t,r);for(let e=0;e>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}const i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let o=!1;for(;;)switch(n){case"hex":return B(this,e,t,r);case"utf8":case"utf-8":return w(this,e,t,r);case"ascii":case"latin1":case"binary":return y(this,e,t,r);case"base64":return _(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},A.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const Q=4096;function S(e,t,r){let n="";r=Math.min(e.length,r);for(let i=t;in)&&(r=n);let i="";for(let n=t;nr)throw new RangeError("Trying to access beyond buffer length")}function M(e,t,r,n,i,o){if(!A.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function N(e,t,r,n,i){P(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=s,s>>=8,e[r++]=s,s>>=8,e[r++]=s,s>>=8,e[r++]=s,r}function x(e,t,r,n,i){P(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r+7]=o,o>>=8,e[r+6]=o,o>>=8,e[r+5]=o,o>>=8,e[r+4]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=s,s>>=8,e[r+2]=s,s>>=8,e[r+1]=s,s>>=8,e[r]=s,r+8}function U(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function L(e,t,r,n,o){return t=+t,r>>>=0,o||U(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function q(e,t,r,n,o){return t=+t,r>>>=0,o||U(e,0,r,8),i.write(e,t,r,n,52,8),r+8}A.prototype.slice=function(e,t){const r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t>>=0,t>>>=0,r||F(e,t,this.length);let n=this[e],i=1,o=0;for(;++o>>=0,t>>>=0,r||F(e,t,this.length);let n=this[e+--t],i=1;for(;t>0&&(i*=256);)n+=this[e+--t]*i;return n},A.prototype.readUint8=A.prototype.readUInt8=function(e,t){return e>>>=0,t||F(e,1,this.length),this[e]},A.prototype.readUint16LE=A.prototype.readUInt16LE=function(e,t){return e>>>=0,t||F(e,2,this.length),this[e]|this[e+1]<<8},A.prototype.readUint16BE=A.prototype.readUInt16BE=function(e,t){return e>>>=0,t||F(e,2,this.length),this[e]<<8|this[e+1]},A.prototype.readUint32LE=A.prototype.readUInt32LE=function(e,t){return e>>>=0,t||F(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},A.prototype.readUint32BE=A.prototype.readUInt32BE=function(e,t){return e>>>=0,t||F(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},A.prototype.readBigUInt64LE=V((function(e){H(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||G(e,this.length-8);const n=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,i=this[++e]+256*this[++e]+65536*this[++e]+r*2**24;return BigInt(n)+(BigInt(i)<>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||G(e,this.length-8);const n=t*2**24+65536*this[++e]+256*this[++e]+this[++e],i=this[++e]*2**24+65536*this[++e]+256*this[++e]+r;return(BigInt(n)<>>=0,t>>>=0,r||F(e,t,this.length);let n=this[e],i=1,o=0;for(;++o=i&&(n-=Math.pow(2,8*t)),n},A.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||F(e,t,this.length);let n=t,i=1,o=this[e+--n];for(;n>0&&(i*=256);)o+=this[e+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o},A.prototype.readInt8=function(e,t){return e>>>=0,t||F(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},A.prototype.readInt16LE=function(e,t){e>>>=0,t||F(e,2,this.length);const r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},A.prototype.readInt16BE=function(e,t){e>>>=0,t||F(e,2,this.length);const r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},A.prototype.readInt32LE=function(e,t){return e>>>=0,t||F(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},A.prototype.readInt32BE=function(e,t){return e>>>=0,t||F(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},A.prototype.readBigInt64LE=V((function(e){H(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||G(e,this.length-8);const n=this[e+4]+256*this[e+5]+65536*this[e+6]+(r<<24);return(BigInt(n)<>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||G(e,this.length-8);const n=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(n)<>>=0,t||F(e,4,this.length),i.read(this,e,!0,23,4)},A.prototype.readFloatBE=function(e,t){return e>>>=0,t||F(e,4,this.length),i.read(this,e,!1,23,4)},A.prototype.readDoubleLE=function(e,t){return e>>>=0,t||F(e,8,this.length),i.read(this,e,!0,52,8)},A.prototype.readDoubleBE=function(e,t){return e>>>=0,t||F(e,8,this.length),i.read(this,e,!1,52,8)},A.prototype.writeUintLE=A.prototype.writeUIntLE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||M(this,e,t,r,Math.pow(2,8*r)-1,0);let i=1,o=0;for(this[t]=255&e;++o>>=0,r>>>=0,n||M(this,e,t,r,Math.pow(2,8*r)-1,0);let i=r-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r},A.prototype.writeUint8=A.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,1,255,0),this[t]=255&e,t+1},A.prototype.writeUint16LE=A.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},A.prototype.writeUint16BE=A.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},A.prototype.writeUint32LE=A.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},A.prototype.writeUint32BE=A.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},A.prototype.writeBigUInt64LE=V((function(e,t=0){return N(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),A.prototype.writeBigUInt64BE=V((function(e,t=0){return x(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),A.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);M(this,e,t,r,n-1,-n)}let i=0,o=1,s=0;for(this[t]=255&e;++i>>=0,!n){const n=Math.pow(2,8*r-1);M(this,e,t,r,n-1,-n)}let i=r-1,o=1,s=0;for(this[t+i]=255&e;--i>=0&&(o*=256);)e<0&&0===s&&0!==this[t+i+1]&&(s=1),this[t+i]=(e/o|0)-s&255;return t+r},A.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},A.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},A.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},A.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},A.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},A.prototype.writeBigInt64LE=V((function(e,t=0){return N(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),A.prototype.writeBigInt64BE=V((function(e,t=0){return x(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),A.prototype.writeFloatLE=function(e,t,r){return L(this,e,t,!0,r)},A.prototype.writeFloatBE=function(e,t,r){return L(this,e,t,!1,r)},A.prototype.writeDoubleLE=function(e,t,r){return q(this,e,t,!0,r)},A.prototype.writeDoubleBE=function(e,t,r){return q(this,e,t,!1,r)},A.prototype.copy=function(e,t,r,n){if(!A.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function P(e,t,r,n,i,o){if(e>r||e3?0===t||t===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(o+1)}${n}`:`>= -(2${n} ** ${8*(o+1)-1}${n}) and < 2 ** ${8*(o+1)-1}${n}`:`>= ${t}${n} and <= ${r}${n}`,new T.ERR_OUT_OF_RANGE("value",i,e)}!function(e,t,r){H(t,"offset"),void 0!==e[t]&&void 0!==e[t+r]||G(t,e.length-(r+1))}(n,i,o)}function H(e,t){if("number"!=typeof e)throw new T.ERR_INVALID_ARG_TYPE(t,"number",e)}function G(e,t,r){if(Math.floor(e)!==e)throw H(e,r),new T.ERR_OUT_OF_RANGE(r||"offset","an integer",e);if(t<0)throw new T.ERR_BUFFER_OUT_OF_BOUNDS;throw new T.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}O("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),O("ERR_INVALID_ARG_TYPE",(function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`}),TypeError),O("ERR_OUT_OF_RANGE",(function(e,t,r){let n=`The value of "${e}" is out of range.`,i=r;return Number.isInteger(r)&&Math.abs(r)>2**32?i=z(String(r)):"bigint"==typeof r&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=z(i)),i+="n"),n+=` It must be ${t}. Received ${i}`,n}),RangeError);const J=/[^+/0-9A-Za-z-_]/g;function Y(e,t){let r;t=t||1/0;const n=e.length;let i=null;const o=[];for(let s=0;s55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function W(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(J,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function K(e,t,r,n){let i;for(i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function j(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function Z(e){return e!=e}const $=function(){const e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){const n=16*r;for(let i=0;i<16;++i)t[n+i]=e[r]+e[i]}return t}();function V(e){return"undefined"==typeof BigInt?X:e}function X(){throw new Error("BigInt not supported")}},235:e=>{var t={array:function(e){var t=0,r=0,n=[0,1,3,7,15,31,63,127,255];return function(i){for(var o=0;i>0;){var s=8-t;i>=s?(o<<=s,o|=n[s]&e[r++],t=0,i-=s):(o<<=i,o|=(e[r]&n[i]<<8-i-t)>>8-i-t,t+=i,i=0)}return o}},simple:function(e){var r,n,i=t.header(e),o=[],s=0;do{-1!=(n=t.decompress(e,i))&&(o.push(n),s+=n.byteLength)}while(-1!=n);r=new Uint8Array(s),s=0;for(var a=0;a9)throw"Not a BZIP archive";return t},decompress:function(e,t,r){for(var n=9e5,i="",o=0;o<6;o++)i+=e(8).toString(16);if("177245385090"==i)return-1;if("314159265359"!=i)throw"eek not valid bzip data";if(e(32),e(1))throw"unsupported obsolete version";var s=e(24);if(s>n)throw"Initial position larger than buffer size";var a=e(16),A=new Uint8Array(256),f=0;for(o=0;o<16;o++)if(a&1<<15-o){var h=e(16);for(g=0;g<16;g++)h&1<<15-g&&(A[f++]=16*o+g)}var l=e(3);if(l<2||l>6)throw"another error";var u=e(15);if(0==u)throw"meh";var c=[];for(o=0;o=l)throw"whoops another error";var I=c[g];c.splice(g,1),c.splice(0,0,I),d[o]=I}var p=f+2,C=[];for(g=0;g20)throw"I gave up a while ago on writing error messages";if(!e(1))break;e(1)?a--:a++}y[o]=a}for(m=B=y[0],o=1;oB?B=y[o]:y[o]=u)throw"meow i'm a kitty, that's an error";E=(w=C[d[k++]]).base.subarray(1),v=w.limit.subarray(1)}for(g=e(o=w.minLen);;){if(o>w.maxLen)throw"rawr i'm a dinosaur";if(g<=v[o])break;o++,g=g<<1|e(1)}if((g-=E[o])<0||g>=258)throw"moo i'm a cow";var F=w.permute[g];if(0!=F&&1!=F){if(Q){if(Q=0,S+a>=n)throw"Boom.";for(D[I=A[c[0]]]+=a;a--;)R[S++]=I}if(F>f)break;if(S>=n)throw"I can't think of anything. Error";I=c[o=F-1],c.splice(o,1),c.splice(0,0,I),D[I=A[I]]++,R[S++]=I}else Q||(Q=1,a=0),a+=0==F?Q:2*Q,Q<<=1}if(s<0||s>=S)throw"I'm a monkey and I'm throwing something at someone, namely you";for(g=0,o=0;o<256;o++)h=g+D[o],D[o]=g,g=h;for(o=0;o>=8,x=-1);var U,L,q,T=new Uint8Array(n),O=0;for(r||(r=1/0);S;){for(S--,L=N,N=255&(M=R[M]),M>>=8,3==x++?(U=N,q=L,N=-1):(U=1,q=N);U--;)if(T[O++]=q,! --r)return T;N!=L&&(x=0)}return T.subarray(0,O)}};e.exports=t},2151:e=>{var t={utf8:{stringToBytes:function(e){return t.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(t.bin.bytesToString(e)))}},bin:{stringToBytes:function(e){for(var t=[],r=0;r{var t,r;t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r={rotl:function(e,t){return e<>>32-t},rotr:function(e,t){return e<<32-t|e>>>t},endian:function(e){if(e.constructor==Number)return 16711935&r.rotl(e,8)|4278255360&r.rotl(e,24);for(var t=0;t0;e--)t.push(Math.floor(256*Math.random()));return t},bytesToWords:function(e){for(var t=[],r=0,n=0;r>>5]|=e[r]<<24-n%32;return t},wordsToBytes:function(e){for(var t=[],r=0;r<32*e.length;r+=8)t.push(e[r>>>5]>>>24-r%32&255);return t},bytesToHex:function(e){for(var t=[],r=0;r>>4).toString(16)),t.push((15&e[r]).toString(16));return t.join("")},hexToBytes:function(e){for(var t=[],r=0;r>>6*(3-o)&63)):r.push("=");return r.join("")},base64ToBytes:function(e){e=e.replace(/[^A-Z0-9+\/]/gi,"");for(var r=[],n=0,i=0;n>>6-2*i);return r}},e.exports=r},1113:(e,t,r)=>{"use strict";r.r(t),r.d(t,{BlobFile:()=>f,LocalFile:()=>i(),RemoteFile:()=>a,fromUrl:()=>h,open:()=>l});var n=r(3617),i=r.n(n),o=r(8287);function s(e){return("object"==typeof e&&null!==e&&"message"in e?e.message:`${e}`).replace(/\.$/,"")}class a{async getBufferFromResponse(e){const t=await e.arrayBuffer();return o.Buffer.from(t)}constructor(e,t={}){this.baseOverrides={},this.url=e;const r=t.fetch||globalThis.fetch.bind(globalThis);if(!r)throw new TypeError("no fetch function supplied, and none found in global environment");t.overrides&&(this.baseOverrides=t.overrides),this.fetchImplementation=r}async fetch(e,t){let r;try{r=await this.fetchImplementation(e,t)}catch(n){if(!`${n}`.includes("Failed to fetch"))throw new Error(`${s(n)} fetching ${e}`,{cause:n});console.warn(`generic-filehandle: refetching ${e} to attempt to work around chrome CORS header caching bug`);try{r=await this.fetchImplementation(e,{...t,cache:"reload"})}catch(t){throw new Error(`${s(t)} fetching ${e}`,{cause:t})}}return r}async read(e,t=0,r,n=0,i={}){const{headers:o={},signal:s,overrides:a={}}=i;r<1/0?o.range=`bytes=${n}-${n+r}`:r===1/0&&0!==n&&(o.range=`bytes=${n}-`);const A=await this.fetch(this.url,{...this.baseOverrides,...a,headers:{...o,...a.headers,...this.baseOverrides.headers},method:"GET",redirect:"follow",mode:"cors",signal:s});if(!A.ok)throw new Error(`HTTP ${A.status} fetching ${this.url}`);if(200===A.status&&0===n||206===A.status){const n=await this.getBufferFromResponse(A),i=n.copy(e,t,0,Math.min(r,n.length)),o=A.headers.get("content-range"),s=/\/(\d+)$/.exec(o||"");return(null==s?void 0:s[1])&&(this._stat={size:parseInt(s[1],10)}),{bytesRead:i,buffer:e}}if(200===A.status)throw new Error(`${this.url} fetch returned status 200, expected 206`);throw new Error(`HTTP ${A.status} fetching ${this.url}`)}async readFile(e={}){let t,r;"string"==typeof e?(t=e,r={}):(t=e.encoding,r=e,delete r.encoding);const{headers:n={},signal:i,overrides:o={}}=r,s=await this.fetch(this.url,{headers:n,method:"GET",redirect:"follow",mode:"cors",signal:i,...this.baseOverrides,...o});if(200!==s.status)throw new Error(`HTTP ${s.status} fetching ${this.url}`);if("utf8"===t)return s.text();if(t)throw new Error(`unsupported encoding: ${t}`);return this.getBufferFromResponse(s)}async stat(){if(!this._stat){const e=o.Buffer.allocUnsafe(10);if(await this.read(e,0,10,0),!this._stat)throw new Error(`unable to determine size of file at ${this.url}`)}return this._stat}async close(){}}function A(e){const t=new FileReader;return new Promise(((r,n)=>{t.onerror=()=>{t.abort(),n(new Error("problem reading blob"))},t.onabort=()=>{n(new Error("blob reading was aborted"))},t.onload=()=>{t.result&&"string"!=typeof t.result?r(t.result):n(new Error("unknown error reading blob"))},t.readAsArrayBuffer(e)}))}class f{constructor(e){this.blob=e,this.size=e.size}async read(e,t=0,r,n=0){if(!r)return{bytesRead:0,buffer:e};const i=n,s=i+r,a=await A(this.blob.slice(i,s)),f=o.Buffer.from(a);return{bytesRead:f.copy(e,t),buffer:f}}async readFile(e){const t="string"==typeof e?e:null==e?void 0:e.encoding;if("utf8"===t)return function(e){const t=new FileReader;return new Promise(((r,n)=>{t.onerror=()=>{t.abort(),n(new Error("problem reading blob"))},t.onabort=()=>{n(new Error("blob reading was aborted"))},t.onload=()=>{t.result&&"string"==typeof t.result?r(t.result):n(new Error("unknown error reading blob"))},t.readAsText(e)}))}(this.blob);if(t)throw new Error(`unsupported encoding: ${t}`);const r=await A(this.blob);return o.Buffer.from(r)}async stat(){return{size:this.size}}async close(){}}function h(e,t={}){return new a(e,t)}function l(e,t,r,n={}){if(void 0!==r)return r;if(void 0!==e)return h(e,n);if(void 0!==t)return new(i())(t,n);throw new Error("no url, path, or filehandle provided, cannot open")}},251:(e,t)=>{t.read=function(e,t,r,n,i){var o,s,a=8*i-n-1,A=(1<>1,h=-7,l=r?i-1:0,u=r?-1:1,c=e[t+l];for(l+=u,o=c&(1<<-h)-1,c>>=-h,h+=a;h>0;o=256*o+e[t+l],l+=u,h-=8);for(s=o&(1<<-h)-1,o>>=-h,h+=n;h>0;s=256*s+e[t+l],l+=u,h-=8);if(0===o)o=1-f;else{if(o===A)return s?NaN:1/0*(c?-1:1);s+=Math.pow(2,n),o-=f}return(c?-1:1)*s*Math.pow(2,o-n)},t.write=function(e,t,r,n,i,o){var s,a,A,f=8*o-i-1,h=(1<>1,u=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,c=n?0:o-1,d=n?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=h):(s=Math.floor(Math.log(t)/Math.LN2),t*(A=Math.pow(2,-s))<1&&(s--,A*=2),(t+=s+l>=1?u/A:u*Math.pow(2,1-l))*A>=2&&(s++,A/=2),s+l>=h?(a=0,s=h):s+l>=1?(a=(t*A-1)*Math.pow(2,i),s+=l):(a=t*Math.pow(2,l-1)*Math.pow(2,i),s=0));i>=8;e[r+c]=255&a,c+=d,a/=256,i-=8);for(s=s<0;e[r+c]=255&s,c+=d,s/=256,f-=8);e[r+c-d]|=128*g}},8570:e=>{e.exports=r;var t=null;try{t=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch(e){}function r(e,t,r){this.low=0|e,this.high=0|t,this.unsigned=!!r}function n(e){return!0===(e&&e.__isLong__)}r.prototype.__isLong__,Object.defineProperty(r.prototype,"__isLong__",{value:!0}),r.isLong=n;var i={},o={};function s(e,t){var r,n,s;return t?(s=0<=(e>>>=0)&&e<256)&&(n=o[e])?n:(r=A(e,(0|e)<0?-1:0,!0),s&&(o[e]=r),r):(s=-128<=(e|=0)&&e<128)&&(n=i[e])?n:(r=A(e,e<0?-1:0,!1),s&&(i[e]=r),r)}function a(e,t){if(isNaN(e))return t?p:I;if(t){if(e<0)return p;if(e>=c)return y}else{if(e<=-d)return _;if(e+1>=d)return w}return e<0?a(-e,t).neg():A(e%u|0,e/u|0,t)}function A(e,t,n){return new r(e,t,n)}r.fromInt=s,r.fromNumber=a,r.fromBits=A;var f=Math.pow;function h(e,t,r){if(0===e.length)throw Error("empty string");if("NaN"===e||"Infinity"===e||"+Infinity"===e||"-Infinity"===e)return I;if("number"==typeof t?(r=t,t=!1):t=!!t,(r=r||10)<2||360)throw Error("interior hyphen");if(0===n)return h(e.substring(1),t,r).neg();for(var i=a(f(r,8)),o=I,s=0;s>>0:this.low},E.toNumber=function(){return this.unsigned?(this.high>>>0)*u+(this.low>>>0):this.high*u+(this.low>>>0)},E.toString=function(e){if((e=e||10)<2||36>>0).toString(e);if((o=A).isZero())return h+s;for(;h.length<6;)h="0"+h;s=""+h+s}},E.getHighBits=function(){return this.high},E.getHighBitsUnsigned=function(){return this.high>>>0},E.getLowBits=function(){return this.low},E.getLowBitsUnsigned=function(){return this.low>>>0},E.getNumBitsAbs=function(){if(this.isNegative())return this.eq(_)?64:this.neg().getNumBitsAbs();for(var e=0!=this.high?this.high:this.low,t=31;t>0&&!(e&1<=0},E.isOdd=function(){return!(1&~this.low)},E.isEven=function(){return!(1&this.low)},E.equals=function(e){return n(e)||(e=l(e)),(this.unsigned===e.unsigned||this.high>>>31!=1||e.high>>>31!=1)&&this.high===e.high&&this.low===e.low},E.eq=E.equals,E.notEquals=function(e){return!this.eq(e)},E.neq=E.notEquals,E.ne=E.notEquals,E.lessThan=function(e){return this.comp(e)<0},E.lt=E.lessThan,E.lessThanOrEqual=function(e){return this.comp(e)<=0},E.lte=E.lessThanOrEqual,E.le=E.lessThanOrEqual,E.greaterThan=function(e){return this.comp(e)>0},E.gt=E.greaterThan,E.greaterThanOrEqual=function(e){return this.comp(e)>=0},E.gte=E.greaterThanOrEqual,E.ge=E.greaterThanOrEqual,E.compare=function(e){if(n(e)||(e=l(e)),this.eq(e))return 0;var t=this.isNegative(),r=e.isNegative();return t&&!r?-1:!t&&r?1:this.unsigned?e.high>>>0>this.high>>>0||e.high===this.high&&e.low>>>0>this.low>>>0?-1:1:this.sub(e).isNegative()?-1:1},E.comp=E.compare,E.negate=function(){return!this.unsigned&&this.eq(_)?_:this.not().add(C)},E.neg=E.negate,E.add=function(e){n(e)||(e=l(e));var t=this.high>>>16,r=65535&this.high,i=this.low>>>16,o=65535&this.low,s=e.high>>>16,a=65535&e.high,f=e.low>>>16,h=0,u=0,c=0,d=0;return c+=(d+=o+(65535&e.low))>>>16,u+=(c+=i+f)>>>16,h+=(u+=r+a)>>>16,h+=t+s,A((c&=65535)<<16|(d&=65535),(h&=65535)<<16|(u&=65535),this.unsigned)},E.subtract=function(e){return n(e)||(e=l(e)),this.add(e.neg())},E.sub=E.subtract,E.multiply=function(e){if(this.isZero())return I;if(n(e)||(e=l(e)),t)return A(t.mul(this.low,this.high,e.low,e.high),t.get_high(),this.unsigned);if(e.isZero())return I;if(this.eq(_))return e.isOdd()?_:I;if(e.eq(_))return this.isOdd()?_:I;if(this.isNegative())return e.isNegative()?this.neg().mul(e.neg()):this.neg().mul(e).neg();if(e.isNegative())return this.mul(e.neg()).neg();if(this.lt(g)&&e.lt(g))return a(this.toNumber()*e.toNumber(),this.unsigned);var r=this.high>>>16,i=65535&this.high,o=this.low>>>16,s=65535&this.low,f=e.high>>>16,h=65535&e.high,u=e.low>>>16,c=65535&e.low,d=0,p=0,C=0,m=0;return C+=(m+=s*c)>>>16,p+=(C+=o*c)>>>16,C&=65535,p+=(C+=s*u)>>>16,d+=(p+=i*c)>>>16,p&=65535,d+=(p+=o*u)>>>16,p&=65535,d+=(p+=s*h)>>>16,d+=r*c+i*u+o*h+s*f,A((C&=65535)<<16|(m&=65535),(d&=65535)<<16|(p&=65535),this.unsigned)},E.mul=E.multiply,E.divide=function(e){if(n(e)||(e=l(e)),e.isZero())throw Error("division by zero");var r,i,o;if(t)return this.unsigned||-2147483648!==this.high||-1!==e.low||-1!==e.high?A((this.unsigned?t.div_u:t.div_s)(this.low,this.high,e.low,e.high),t.get_high(),this.unsigned):this;if(this.isZero())return this.unsigned?p:I;if(this.unsigned){if(e.unsigned||(e=e.toUnsigned()),e.gt(this))return p;if(e.gt(this.shru(1)))return m;o=p}else{if(this.eq(_))return e.eq(C)||e.eq(B)?_:e.eq(_)?C:(r=this.shr(1).div(e).shl(1)).eq(I)?e.isNegative()?C:B:(i=this.sub(e.mul(r)),o=r.add(i.div(e)));if(e.eq(_))return this.unsigned?p:I;if(this.isNegative())return e.isNegative()?this.neg().div(e.neg()):this.neg().div(e).neg();if(e.isNegative())return this.div(e.neg()).neg();o=I}for(i=this;i.gte(e);){r=Math.max(1,Math.floor(i.toNumber()/e.toNumber()));for(var s=Math.ceil(Math.log(r)/Math.LN2),h=s<=48?1:f(2,s-48),u=a(r),c=u.mul(e);c.isNegative()||c.gt(i);)c=(u=a(r-=h,this.unsigned)).mul(e);u.isZero()&&(u=C),o=o.add(u),i=i.sub(c)}return o},E.div=E.divide,E.modulo=function(e){return n(e)||(e=l(e)),t?A((this.unsigned?t.rem_u:t.rem_s)(this.low,this.high,e.low,e.high),t.get_high(),this.unsigned):this.sub(this.div(e).mul(e))},E.mod=E.modulo,E.rem=E.modulo,E.not=function(){return A(~this.low,~this.high,this.unsigned)},E.and=function(e){return n(e)||(e=l(e)),A(this.low&e.low,this.high&e.high,this.unsigned)},E.or=function(e){return n(e)||(e=l(e)),A(this.low|e.low,this.high|e.high,this.unsigned)},E.xor=function(e){return n(e)||(e=l(e)),A(this.low^e.low,this.high^e.high,this.unsigned)},E.shiftLeft=function(e){return n(e)&&(e=e.toInt()),0==(e&=63)?this:e<32?A(this.low<>>32-e,this.unsigned):A(0,this.low<>>e|this.high<<32-e,this.high>>e,this.unsigned):A(this.high>>e-32,this.high>=0?0:-1,this.unsigned)},E.shr=E.shiftRight,E.shiftRightUnsigned=function(e){if(n(e)&&(e=e.toInt()),0==(e&=63))return this;var t=this.high;return e<32?A(this.low>>>e|t<<32-e,t>>>e,this.unsigned):A(32===e?t:t>>>e-32,0,this.unsigned)},E.shru=E.shiftRightUnsigned,E.shr_u=E.shiftRightUnsigned,E.toSigned=function(){return this.unsigned?A(this.low,this.high,!1):this},E.toUnsigned=function(){return this.unsigned?this:A(this.low,this.high,!0)},E.toBytes=function(e){return e?this.toBytesLE():this.toBytesBE()},E.toBytesLE=function(){var e=this.high,t=this.low;return[255&t,t>>>8&255,t>>>16&255,t>>>24,255&e,e>>>8&255,e>>>16&255,e>>>24]},E.toBytesBE=function(){var e=this.high,t=this.low;return[e>>>24,e>>>16&255,e>>>8&255,255&e,t>>>24,t>>>16&255,t>>>8&255,255&t]},r.fromBytes=function(e,t,n){return n?r.fromBytesLE(e,t):r.fromBytesBE(e,t)},r.fromBytesLE=function(e,t){return new r(e[0]|e[1]<<8|e[2]<<16|e[3]<<24,e[4]|e[5]<<8|e[6]<<16|e[7]<<24,t)},r.fromBytesBE=function(e,t){return new r(e[4]<<24|e[5]<<16|e[6]<<8|e[7],e[0]<<24|e[1]<<16|e[2]<<8|e[3],t)}},3503:(e,t,r)=>{var n,i,o,s,a;n=r(3939),i=r(2151).utf8,o=r(652),s=r(2151).bin,(a=function(e,t){e.constructor==String?e=t&&"binary"===t.encoding?s.stringToBytes(e):i.stringToBytes(e):o(e)?e=Array.prototype.slice.call(e,0):Array.isArray(e)||e.constructor===Uint8Array||(e=e.toString());for(var r=n.bytesToWords(e),A=8*e.length,f=1732584193,h=-271733879,l=-1732584194,u=271733878,c=0;c>>24)|4278255360&(r[c]<<24|r[c]>>>8);r[A>>>5]|=128<>>9<<4)]=A;var d=a._ff,g=a._gg,I=a._hh,p=a._ii;for(c=0;c>>0,h=h+m>>>0,l=l+B>>>0,u=u+w>>>0}return n.endian([f,h,l,u])})._ff=function(e,t,r,n,i,o,s){var a=e+(t&r|~t&n)+(i>>>0)+s;return(a<>>32-o)+t},a._gg=function(e,t,r,n,i,o,s){var a=e+(t&n|r&~n)+(i>>>0)+s;return(a<>>32-o)+t},a._hh=function(e,t,r,n,i,o,s){var a=e+(t^r^n)+(i>>>0)+s;return(a<>>32-o)+t},a._ii=function(e,t,r,n,i,o,s){var a=e+(r^(t|~n))+(i>>>0)+s;return(a<>>32-o)+t},a._blocksize=16,a._digestsize=16,e.exports=function(e,t){if(null==e)throw new Error("Illegal argument "+e);var r=n.wordsToBytes(a(e,t));return t&&t.asBytes?r:t&&t.asString?s.bytesToString(r):n.bytesToHex(r)}},652:e=>{function t(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}e.exports=function(e){return null!=e&&(t(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&t(e.slice(0,0))}(e)||!!e._isBuffer)}},1668:(e,t,r)=>{"use strict";var n={};(0,r(9805).assign)(n,r(3303),r(7083),r(9681)),e.exports=n},3303:(e,t,r)=>{"use strict";var n=r(8411),i=r(9805),o=r(1996),s=r(4674),a=r(4442),A=Object.prototype.toString,f=0,h=-1,l=0,u=8;function c(e){if(!(this instanceof c))return new c(e);this.options=i.assign({level:h,method:u,chunkSize:16384,windowBits:15,memLevel:8,strategy:l,to:""},e||{});var t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new a,this.strm.avail_out=0;var r=n.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(r!==f)throw new Error(s[r]);if(t.header&&n.deflateSetHeader(this.strm,t.header),t.dictionary){var d;if(d="string"==typeof t.dictionary?o.string2buf(t.dictionary):"[object ArrayBuffer]"===A.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,(r=n.deflateSetDictionary(this.strm,d))!==f)throw new Error(s[r]);this._dict_set=!0}}function d(e,t){var r=new c(t);if(r.push(e,!0),r.err)throw r.msg||s[r.err];return r.result}c.prototype.push=function(e,t){var r,s,a=this.strm,h=this.options.chunkSize;if(this.ended)return!1;s=t===~~t?t:!0===t?4:0,"string"==typeof e?a.input=o.string2buf(e):"[object ArrayBuffer]"===A.call(e)?a.input=new Uint8Array(e):a.input=e,a.next_in=0,a.avail_in=a.input.length;do{if(0===a.avail_out&&(a.output=new i.Buf8(h),a.next_out=0,a.avail_out=h),1!==(r=n.deflate(a,s))&&r!==f)return this.onEnd(r),this.ended=!0,!1;0!==a.avail_out&&(0!==a.avail_in||4!==s&&2!==s)||("string"===this.options.to?this.onData(o.buf2binstring(i.shrinkBuf(a.output,a.next_out))):this.onData(i.shrinkBuf(a.output,a.next_out)))}while((a.avail_in>0||0===a.avail_out)&&1!==r);return 4===s?(r=n.deflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===f):2!==s||(this.onEnd(f),a.avail_out=0,!0)},c.prototype.onData=function(e){this.chunks.push(e)},c.prototype.onEnd=function(e){e===f&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},t.Deflate=c,t.deflate=d,t.deflateRaw=function(e,t){return(t=t||{}).raw=!0,d(e,t)},t.gzip=function(e,t){return(t=t||{}).gzip=!0,d(e,t)}},7083:(e,t,r)=>{"use strict";var n=r(1447),i=r(9805),o=r(1996),s=r(9681),a=r(4674),A=r(4442),f=r(7414),h=Object.prototype.toString;function l(e){if(!(this instanceof l))return new l(e);this.options=i.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&(15&t.windowBits||(t.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new A,this.strm.avail_out=0;var r=n.inflateInit2(this.strm,t.windowBits);if(r!==s.Z_OK)throw new Error(a[r]);if(this.header=new f,n.inflateGetHeader(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=o.string2buf(t.dictionary):"[object ArrayBuffer]"===h.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(r=n.inflateSetDictionary(this.strm,t.dictionary))!==s.Z_OK))throw new Error(a[r])}function u(e,t){var r=new l(t);if(r.push(e,!0),r.err)throw r.msg||a[r.err];return r.result}l.prototype.push=function(e,t){var r,a,A,f,l,u=this.strm,c=this.options.chunkSize,d=this.options.dictionary,g=!1;if(this.ended)return!1;a=t===~~t?t:!0===t?s.Z_FINISH:s.Z_NO_FLUSH,"string"==typeof e?u.input=o.binstring2buf(e):"[object ArrayBuffer]"===h.call(e)?u.input=new Uint8Array(e):u.input=e,u.next_in=0,u.avail_in=u.input.length;do{if(0===u.avail_out&&(u.output=new i.Buf8(c),u.next_out=0,u.avail_out=c),(r=n.inflate(u,s.Z_NO_FLUSH))===s.Z_NEED_DICT&&d&&(r=n.inflateSetDictionary(this.strm,d)),r===s.Z_BUF_ERROR&&!0===g&&(r=s.Z_OK,g=!1),r!==s.Z_STREAM_END&&r!==s.Z_OK)return this.onEnd(r),this.ended=!0,!1;u.next_out&&(0!==u.avail_out&&r!==s.Z_STREAM_END&&(0!==u.avail_in||a!==s.Z_FINISH&&a!==s.Z_SYNC_FLUSH)||("string"===this.options.to?(A=o.utf8border(u.output,u.next_out),f=u.next_out-A,l=o.buf2string(u.output,A),u.next_out=f,u.avail_out=c-f,f&&i.arraySet(u.output,u.output,A,f,0),this.onData(l)):this.onData(i.shrinkBuf(u.output,u.next_out)))),0===u.avail_in&&0===u.avail_out&&(g=!0)}while((u.avail_in>0||0===u.avail_out)&&r!==s.Z_STREAM_END);return r===s.Z_STREAM_END&&(a=s.Z_FINISH),a===s.Z_FINISH?(r=n.inflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===s.Z_OK):a!==s.Z_SYNC_FLUSH||(this.onEnd(s.Z_OK),u.avail_out=0,!0)},l.prototype.onData=function(e){this.chunks.push(e)},l.prototype.onEnd=function(e){e===s.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},t.Inflate=l,t.inflate=u,t.inflateRaw=function(e,t){return(t=t||{}).raw=!0,u(e,t)},t.ungzip=u},9805:(e,t)=>{"use strict";var r="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;function n(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var r=t.shift();if(r){if("object"!=typeof r)throw new TypeError(r+"must be non-object");for(var i in r)n(r,i)&&(e[i]=r[i])}}return e},t.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var i={arraySet:function(e,t,r,n,i){if(t.subarray&&e.subarray)e.set(t.subarray(r,r+n),i);else for(var o=0;o{"use strict";var n=r(9805),i=!0,o=!0;try{String.fromCharCode.apply(null,[0])}catch(e){i=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){o=!1}for(var s=new n.Buf8(256),a=0;a<256;a++)s[a]=a>=252?6:a>=248?5:a>=240?4:a>=224?3:a>=192?2:1;function A(e,t){if(t<65534&&(e.subarray&&o||!e.subarray&&i))return String.fromCharCode.apply(null,n.shrinkBuf(e,t));for(var r="",s=0;s>>6,t[s++]=128|63&r):r<65536?(t[s++]=224|r>>>12,t[s++]=128|r>>>6&63,t[s++]=128|63&r):(t[s++]=240|r>>>18,t[s++]=128|r>>>12&63,t[s++]=128|r>>>6&63,t[s++]=128|63&r);return t},t.buf2binstring=function(e){return A(e,e.length)},t.binstring2buf=function(e){for(var t=new n.Buf8(e.length),r=0,i=t.length;r4)f[n++]=65533,r+=o-1;else{for(i&=2===o?31:3===o?15:7;o>1&&r1?f[n++]=65533:i<65536?f[n++]=i:(i-=65536,f[n++]=55296|i>>10&1023,f[n++]=56320|1023&i)}return A(f,n)},t.utf8border=function(e,t){var r;for((t=t||e.length)>e.length&&(t=e.length),r=t-1;r>=0&&128==(192&e[r]);)r--;return r<0||0===r?t:r+s[e[r]]>t?r:t}},3269:e=>{"use strict";e.exports=function(e,t,r,n){for(var i=65535&e,o=e>>>16&65535,s=0;0!==r;){r-=s=r>2e3?2e3:r;do{o=o+(i=i+t[n++]|0)|0}while(--s);i%=65521,o%=65521}return i|o<<16}},9681:e=>{"use strict";e.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},4823:e=>{"use strict";var t=function(){for(var e,t=[],r=0;r<256;r++){e=r;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[r]=e}return t}();e.exports=function(e,r,n,i){var o=t,s=i+n;e^=-1;for(var a=i;a>>8^o[255&(e^r[a])];return~e}},8411:(e,t,r)=>{"use strict";var n,i=r(9805),o=r(3665),s=r(3269),a=r(4823),A=r(4674),f=0,h=0,l=-2,u=2,c=8,d=286,g=30,I=19,p=2*d+1,C=15,m=3,B=258,w=B+m+1,y=42,_=103,E=113,v=666;function b(e,t){return e.msg=A[t],t}function Q(e){return(e<<1)-(e>4?9:0)}function S(e){for(var t=e.length;--t>=0;)e[t]=0}function k(e){var t=e.state,r=t.pending;r>e.avail_out&&(r=e.avail_out),0!==r&&(i.arraySet(e.output,t.pending_buf,t.pending_out,r,e.next_out),e.next_out+=r,t.pending_out+=r,e.total_out+=r,e.avail_out-=r,t.pending-=r,0===t.pending&&(t.pending_out=0))}function D(e,t){o._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,k(e.strm)}function R(e,t){e.pending_buf[e.pending++]=t}function F(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function M(e,t,r,n){var o=e.avail_in;return o>n&&(o=n),0===o?0:(e.avail_in-=o,i.arraySet(t,e.input,e.next_in,o,r),1===e.state.wrap?e.adler=s(e.adler,t,o,r):2===e.state.wrap&&(e.adler=a(e.adler,t,o,r)),e.next_in+=o,e.total_in+=o,o)}function N(e,t){var r,n,i=e.max_chain_length,o=e.strstart,s=e.prev_length,a=e.nice_match,A=e.strstart>e.w_size-w?e.strstart-(e.w_size-w):0,f=e.window,h=e.w_mask,l=e.prev,u=e.strstart+B,c=f[o+s-1],d=f[o+s];e.prev_length>=e.good_match&&(i>>=2),a>e.lookahead&&(a=e.lookahead);do{if(f[(r=t)+s]===d&&f[r+s-1]===c&&f[r]===f[o]&&f[++r]===f[o+1]){o+=2,r++;do{}while(f[++o]===f[++r]&&f[++o]===f[++r]&&f[++o]===f[++r]&&f[++o]===f[++r]&&f[++o]===f[++r]&&f[++o]===f[++r]&&f[++o]===f[++r]&&f[++o]===f[++r]&&os){if(e.match_start=t,s=n,n>=a)break;c=f[o+s-1],d=f[o+s]}}}while((t=l[t&h])>A&&0!=--i);return s<=e.lookahead?s:e.lookahead}function x(e){var t,r,n,o,s,a=e.w_size;do{if(o=e.window_size-e.lookahead-e.strstart,e.strstart>=a+(a-w)){i.arraySet(e.window,e.window,a,a,0),e.match_start-=a,e.strstart-=a,e.block_start-=a,t=r=e.hash_size;do{n=e.head[--t],e.head[t]=n>=a?n-a:0}while(--r);t=r=a;do{n=e.prev[--t],e.prev[t]=n>=a?n-a:0}while(--r);o+=a}if(0===e.strm.avail_in)break;if(r=M(e.strm,e.window,e.strstart+e.lookahead,o),e.lookahead+=r,e.lookahead+e.insert>=m)for(s=e.strstart-e.insert,e.ins_h=e.window[s],e.ins_h=(e.ins_h<=m&&(e.ins_h=(e.ins_h<=m)if(n=o._tr_tally(e,e.strstart-e.match_start,e.match_length-m),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=m){e.match_length--;do{e.strstart++,e.ins_h=(e.ins_h<=m&&(e.ins_h=(e.ins_h<4096)&&(e.match_length=m-1)),e.prev_length>=m&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-m,n=o._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-m),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=i&&(e.ins_h=(e.ins_h<15&&(a=2,n-=16),o<1||o>9||r!==c||n<8||n>15||t<0||t>9||s<0||s>4)return b(e,l);8===n&&(n=9);var A=new T;return e.state=A,A.strm=e,A.wrap=a,A.gzhead=null,A.w_bits=n,A.w_size=1<e.pending_buf_size-5&&(r=e.pending_buf_size-5);;){if(e.lookahead<=1){if(x(e),0===e.lookahead&&t===f)return 1;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var n=e.block_start+r;if((0===e.strstart||e.strstart>=n)&&(e.lookahead=e.strstart-n,e.strstart=n,D(e,!1),0===e.strm.avail_out))return 1;if(e.strstart-e.block_start>=e.w_size-w&&(D(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(D(e,!0),0===e.strm.avail_out?3:4):(e.strstart>e.block_start&&(D(e,!1),e.strm.avail_out),1)})),new q(4,4,8,4,U),new q(4,5,16,8,U),new q(4,6,32,32,U),new q(4,4,16,16,L),new q(8,16,32,32,L),new q(8,16,128,128,L),new q(8,32,128,256,L),new q(32,128,258,1024,L),new q(32,258,258,4096,L)],t.deflateInit=function(e,t){return P(e,t,c,15,8,0)},t.deflateInit2=P,t.deflateReset=z,t.deflateResetKeep=O,t.deflateSetHeader=function(e,t){return e&&e.state?2!==e.state.wrap?l:(e.state.gzhead=t,h):l},t.deflate=function(e,t){var r,i,s,A;if(!e||!e.state||t>5||t<0)return e?b(e,l):l;if(i=e.state,!e.output||!e.input&&0!==e.avail_in||i.status===v&&4!==t)return b(e,0===e.avail_out?-5:l);if(i.strm=e,r=i.last_flush,i.last_flush=t,i.status===y)if(2===i.wrap)e.adler=0,R(i,31),R(i,139),R(i,8),i.gzhead?(R(i,(i.gzhead.text?1:0)+(i.gzhead.hcrc?2:0)+(i.gzhead.extra?4:0)+(i.gzhead.name?8:0)+(i.gzhead.comment?16:0)),R(i,255&i.gzhead.time),R(i,i.gzhead.time>>8&255),R(i,i.gzhead.time>>16&255),R(i,i.gzhead.time>>24&255),R(i,9===i.level?2:i.strategy>=2||i.level<2?4:0),R(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(R(i,255&i.gzhead.extra.length),R(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(e.adler=a(e.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=69):(R(i,0),R(i,0),R(i,0),R(i,0),R(i,0),R(i,9===i.level?2:i.strategy>=2||i.level<2?4:0),R(i,3),i.status=E);else{var u=c+(i.w_bits-8<<4)<<8;u|=(i.strategy>=2||i.level<2?0:i.level<6?1:6===i.level?2:3)<<6,0!==i.strstart&&(u|=32),u+=31-u%31,i.status=E,F(i,u),0!==i.strstart&&(F(i,e.adler>>>16),F(i,65535&e.adler)),e.adler=1}if(69===i.status)if(i.gzhead.extra){for(s=i.pending;i.gzindex<(65535&i.gzhead.extra.length)&&(i.pending!==i.pending_buf_size||(i.gzhead.hcrc&&i.pending>s&&(e.adler=a(e.adler,i.pending_buf,i.pending-s,s)),k(e),s=i.pending,i.pending!==i.pending_buf_size));)R(i,255&i.gzhead.extra[i.gzindex]),i.gzindex++;i.gzhead.hcrc&&i.pending>s&&(e.adler=a(e.adler,i.pending_buf,i.pending-s,s)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=73)}else i.status=73;if(73===i.status)if(i.gzhead.name){s=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>s&&(e.adler=a(e.adler,i.pending_buf,i.pending-s,s)),k(e),s=i.pending,i.pending===i.pending_buf_size)){A=1;break}A=i.gzindexs&&(e.adler=a(e.adler,i.pending_buf,i.pending-s,s)),0===A&&(i.gzindex=0,i.status=91)}else i.status=91;if(91===i.status)if(i.gzhead.comment){s=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>s&&(e.adler=a(e.adler,i.pending_buf,i.pending-s,s)),k(e),s=i.pending,i.pending===i.pending_buf_size)){A=1;break}A=i.gzindexs&&(e.adler=a(e.adler,i.pending_buf,i.pending-s,s)),0===A&&(i.status=_)}else i.status=_;if(i.status===_&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&k(e),i.pending+2<=i.pending_buf_size&&(R(i,255&e.adler),R(i,e.adler>>8&255),e.adler=0,i.status=E)):i.status=E),0!==i.pending){if(k(e),0===e.avail_out)return i.last_flush=-1,h}else if(0===e.avail_in&&Q(t)<=Q(r)&&4!==t)return b(e,-5);if(i.status===v&&0!==e.avail_in)return b(e,-5);if(0!==e.avail_in||0!==i.lookahead||t!==f&&i.status!==v){var d=2===i.strategy?function(e,t){for(var r;;){if(0===e.lookahead&&(x(e),0===e.lookahead)){if(t===f)return 1;break}if(e.match_length=0,r=o._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,r&&(D(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(D(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(D(e,!1),0===e.strm.avail_out)?1:2}(i,t):3===i.strategy?function(e,t){for(var r,n,i,s,a=e.window;;){if(e.lookahead<=B){if(x(e),e.lookahead<=B&&t===f)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=m&&e.strstart>0&&(n=a[i=e.strstart-1])===a[++i]&&n===a[++i]&&n===a[++i]){s=e.strstart+B;do{}while(n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&ie.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=m?(r=o._tr_tally(e,1,e.match_length-m),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(r=o._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),r&&(D(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(D(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(D(e,!1),0===e.strm.avail_out)?1:2}(i,t):n[i.level].func(i,t);if(3!==d&&4!==d||(i.status=v),1===d||3===d)return 0===e.avail_out&&(i.last_flush=-1),h;if(2===d&&(1===t?o._tr_align(i):5!==t&&(o._tr_stored_block(i,0,0,!1),3===t&&(S(i.head),0===i.lookahead&&(i.strstart=0,i.block_start=0,i.insert=0))),k(e),0===e.avail_out))return i.last_flush=-1,h}return 4!==t?h:i.wrap<=0?1:(2===i.wrap?(R(i,255&e.adler),R(i,e.adler>>8&255),R(i,e.adler>>16&255),R(i,e.adler>>24&255),R(i,255&e.total_in),R(i,e.total_in>>8&255),R(i,e.total_in>>16&255),R(i,e.total_in>>24&255)):(F(i,e.adler>>>16),F(i,65535&e.adler)),k(e),i.wrap>0&&(i.wrap=-i.wrap),0!==i.pending?h:1)},t.deflateEnd=function(e){var t;return e&&e.state?(t=e.state.status)!==y&&69!==t&&73!==t&&91!==t&&t!==_&&t!==E&&t!==v?b(e,l):(e.state=null,t===E?b(e,-3):h):l},t.deflateSetDictionary=function(e,t){var r,n,o,a,A,f,u,c,d=t.length;if(!e||!e.state)return l;if(2===(a=(r=e.state).wrap)||1===a&&r.status!==y||r.lookahead)return l;for(1===a&&(e.adler=s(e.adler,t,d,0)),r.wrap=0,d>=r.w_size&&(0===a&&(S(r.head),r.strstart=0,r.block_start=0,r.insert=0),c=new i.Buf8(r.w_size),i.arraySet(c,t,d-r.w_size,r.w_size,0),t=c,d=r.w_size),A=e.avail_in,f=e.next_in,u=e.input,e.avail_in=d,e.next_in=0,e.input=t,x(r);r.lookahead>=m;){n=r.strstart,o=r.lookahead-(m-1);do{r.ins_h=(r.ins_h<{"use strict";e.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},7293:e=>{"use strict";e.exports=function(e,t){var r,n,i,o,s,a,A,f,h,l,u,c,d,g,I,p,C,m,B,w,y,_,E,v,b;r=e.state,n=e.next_in,v=e.input,i=n+(e.avail_in-5),o=e.next_out,b=e.output,s=o-(t-e.avail_out),a=o+(e.avail_out-257),A=r.dmax,f=r.wsize,h=r.whave,l=r.wnext,u=r.window,c=r.hold,d=r.bits,g=r.lencode,I=r.distcode,p=(1<>>=B=m>>>24,d-=B,0==(B=m>>>16&255))b[o++]=65535&m;else{if(!(16&B)){if(64&B){if(32&B){r.mode=12;break e}e.msg="invalid literal/length code",r.mode=30;break e}m=g[(65535&m)+(c&(1<>>=B,d-=B),d<15&&(c+=v[n++]<>>=B=m>>>24,d-=B,16&(B=m>>>16&255)){if(y=65535&m,d<(B&=15)&&(c+=v[n++]<A){e.msg="invalid distance too far back",r.mode=30;break e}if(c>>>=B,d-=B,y>(B=o-s)){if((B=y-B)>h&&r.sane){e.msg="invalid distance too far back",r.mode=30;break e}if(_=0,E=u,0===l){if(_+=f-B,B2;)b[o++]=E[_++],b[o++]=E[_++],b[o++]=E[_++],w-=3;w&&(b[o++]=E[_++],w>1&&(b[o++]=E[_++]))}else{_=o-y;do{b[o++]=b[_++],b[o++]=b[_++],b[o++]=b[_++],w-=3}while(w>2);w&&(b[o++]=b[_++],w>1&&(b[o++]=b[_++]))}break}if(64&B){e.msg="invalid distance code",r.mode=30;break e}m=I[(65535&m)+(c&(1<>3,c&=(1<<(d-=w<<3))-1,e.next_in=n,e.next_out=o,e.avail_in=n{"use strict";var n=r(9805),i=r(3269),o=r(4823),s=r(7293),a=r(1998),A=0,f=-2,h=1,l=12,u=30,c=852,d=592;function g(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function I(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new n.Buf16(320),this.work=new n.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function p(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=h,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new n.Buf32(c),t.distcode=t.distdyn=new n.Buf32(d),t.sane=1,t.back=-1,A):f}function C(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,p(e)):f}function m(e,t){var r,n;return e&&e.state?(n=e.state,t<0?(r=0,t=-t):(r=1+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?f:(null!==n.window&&n.wbits!==t&&(n.window=null),n.wrap=r,n.wbits=t,C(e))):f}function B(e,t){var r,n;return e?(n=new I,e.state=n,n.window=null,(r=m(e,t))!==A&&(e.state=null),r):f}var w,y,_=!0;function E(e){if(_){var t;for(w=new n.Buf32(512),y=new n.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(a(1,e.lens,0,288,w,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;a(2,e.lens,0,32,y,0,e.work,{bits:5}),_=!1}e.lencode=w,e.lenbits=9,e.distcode=y,e.distbits=5}function v(e,t,r,i){var o,s=e.state;return null===s.window&&(s.wsize=1<=s.wsize?(n.arraySet(s.window,t,r-s.wsize,s.wsize,0),s.wnext=0,s.whave=s.wsize):((o=s.wsize-s.wnext)>i&&(o=i),n.arraySet(s.window,t,r-i,o,s.wnext),(i-=o)?(n.arraySet(s.window,t,r-i,i,0),s.wnext=i,s.whave=s.wsize):(s.wnext+=o,s.wnext===s.wsize&&(s.wnext=0),s.whave>>8&255,r.check=o(r.check,O,2,0),B=0,w=0,r.mode=2;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&B)<<8)+(B>>8))%31){e.msg="incorrect header check",r.mode=u;break}if(8!=(15&B)){e.msg="unknown compression method",r.mode=u;break}if(w-=4,x=8+(15&(B>>>=4)),0===r.wbits)r.wbits=x;else if(x>r.wbits){e.msg="invalid window size",r.mode=u;break}r.dmax=1<>8&1),512&r.flags&&(O[0]=255&B,O[1]=B>>>8&255,r.check=o(r.check,O,2,0)),B=0,w=0,r.mode=3;case 3:for(;w<32;){if(0===C)break e;C--,B+=c[I++]<>>8&255,O[2]=B>>>16&255,O[3]=B>>>24&255,r.check=o(r.check,O,4,0)),B=0,w=0,r.mode=4;case 4:for(;w<16;){if(0===C)break e;C--,B+=c[I++]<>8),512&r.flags&&(O[0]=255&B,O[1]=B>>>8&255,r.check=o(r.check,O,2,0)),B=0,w=0,r.mode=5;case 5:if(1024&r.flags){for(;w<16;){if(0===C)break e;C--,B+=c[I++]<>>8&255,r.check=o(r.check,O,2,0)),B=0,w=0}else r.head&&(r.head.extra=null);r.mode=6;case 6:if(1024&r.flags&&((b=r.length)>C&&(b=C),b&&(r.head&&(x=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),n.arraySet(r.head.extra,c,I,b,x)),512&r.flags&&(r.check=o(r.check,c,b,I)),C-=b,I+=b,r.length-=b),r.length))break e;r.length=0,r.mode=7;case 7:if(2048&r.flags){if(0===C)break e;b=0;do{x=c[I+b++],r.head&&x&&r.length<65536&&(r.head.name+=String.fromCharCode(x))}while(x&&b>9&1,r.head.done=!0),e.adler=r.check=0,r.mode=l;break;case 10:for(;w<32;){if(0===C)break e;C--,B+=c[I++]<>>=7&w,w-=7&w,r.mode=27;break}for(;w<3;){if(0===C)break e;C--,B+=c[I++]<>>=1)){case 0:r.mode=14;break;case 1:if(E(r),r.mode=20,6===t){B>>>=2,w-=2;break e}break;case 2:r.mode=17;break;case 3:e.msg="invalid block type",r.mode=u}B>>>=2,w-=2;break;case 14:for(B>>>=7&w,w-=7&w;w<32;){if(0===C)break e;C--,B+=c[I++]<>>16^65535)){e.msg="invalid stored block lengths",r.mode=u;break}if(r.length=65535&B,B=0,w=0,r.mode=15,6===t)break e;case 15:r.mode=16;case 16:if(b=r.length){if(b>C&&(b=C),b>m&&(b=m),0===b)break e;n.arraySet(d,c,I,b,p),C-=b,I+=b,m-=b,p+=b,r.length-=b;break}r.mode=l;break;case 17:for(;w<14;){if(0===C)break e;C--,B+=c[I++]<>>=5,w-=5,r.ndist=1+(31&B),B>>>=5,w-=5,r.ncode=4+(15&B),B>>>=4,w-=4,r.nlen>286||r.ndist>30){e.msg="too many length or distance symbols",r.mode=u;break}r.have=0,r.mode=18;case 18:for(;r.have>>=3,w-=3}for(;r.have<19;)r.lens[z[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,L={bits:r.lenbits},U=a(0,r.lens,0,19,r.lencode,0,r.work,L),r.lenbits=L.bits,U){e.msg="invalid code lengths set",r.mode=u;break}r.have=0,r.mode=19;case 19:for(;r.have>>16&255,R=65535&T,!((k=T>>>24)<=w);){if(0===C)break e;C--,B+=c[I++]<>>=k,w-=k,r.lens[r.have++]=R;else{if(16===R){for(q=k+2;w>>=k,w-=k,0===r.have){e.msg="invalid bit length repeat",r.mode=u;break}x=r.lens[r.have-1],b=3+(3&B),B>>>=2,w-=2}else if(17===R){for(q=k+3;w>>=k)),B>>>=3,w-=3}else{for(q=k+7;w>>=k)),B>>>=7,w-=7}if(r.have+b>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=u;break}for(;b--;)r.lens[r.have++]=x}}if(r.mode===u)break;if(0===r.lens[256]){e.msg="invalid code -- missing end-of-block",r.mode=u;break}if(r.lenbits=9,L={bits:r.lenbits},U=a(1,r.lens,0,r.nlen,r.lencode,0,r.work,L),r.lenbits=L.bits,U){e.msg="invalid literal/lengths set",r.mode=u;break}if(r.distbits=6,r.distcode=r.distdyn,L={bits:r.distbits},U=a(2,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,L),r.distbits=L.bits,U){e.msg="invalid distances set",r.mode=u;break}if(r.mode=20,6===t)break e;case 20:r.mode=21;case 21:if(C>=6&&m>=258){e.next_out=p,e.avail_out=m,e.next_in=I,e.avail_in=C,r.hold=B,r.bits=w,s(e,_),p=e.next_out,d=e.output,m=e.avail_out,I=e.next_in,c=e.input,C=e.avail_in,B=r.hold,w=r.bits,r.mode===l&&(r.back=-1);break}for(r.back=0;D=(T=r.lencode[B&(1<>>16&255,R=65535&T,!((k=T>>>24)<=w);){if(0===C)break e;C--,B+=c[I++]<>F)])>>>16&255,R=65535&T,!(F+(k=T>>>24)<=w);){if(0===C)break e;C--,B+=c[I++]<>>=F,w-=F,r.back+=F}if(B>>>=k,w-=k,r.back+=k,r.length=R,0===D){r.mode=26;break}if(32&D){r.back=-1,r.mode=l;break}if(64&D){e.msg="invalid literal/length code",r.mode=u;break}r.extra=15&D,r.mode=22;case 22:if(r.extra){for(q=r.extra;w>>=r.extra,w-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=23;case 23:for(;D=(T=r.distcode[B&(1<>>16&255,R=65535&T,!((k=T>>>24)<=w);){if(0===C)break e;C--,B+=c[I++]<>F)])>>>16&255,R=65535&T,!(F+(k=T>>>24)<=w);){if(0===C)break e;C--,B+=c[I++]<>>=F,w-=F,r.back+=F}if(B>>>=k,w-=k,r.back+=k,64&D){e.msg="invalid distance code",r.mode=u;break}r.offset=R,r.extra=15&D,r.mode=24;case 24:if(r.extra){for(q=r.extra;w>>=r.extra,w-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){e.msg="invalid distance too far back",r.mode=u;break}r.mode=25;case 25:if(0===m)break e;if(b=_-m,r.offset>b){if((b=r.offset-b)>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=u;break}b>r.wnext?(b-=r.wnext,Q=r.wsize-b):Q=r.wnext-b,b>r.length&&(b=r.length),S=r.window}else S=d,Q=p-r.offset,b=r.length;b>m&&(b=m),m-=b,r.length-=b;do{d[p++]=S[Q++]}while(--b);0===r.length&&(r.mode=21);break;case 26:if(0===m)break e;d[p++]=r.length,m--,r.mode=21;break;case 27:if(r.wrap){for(;w<32;){if(0===C)break e;C--,B|=c[I++]<{"use strict";var n=r(9805),i=[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],o=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],s=[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,0,0],a=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];e.exports=function(e,t,r,A,f,h,l,u){var c,d,g,I,p,C,m,B,w,y=u.bits,_=0,E=0,v=0,b=0,Q=0,S=0,k=0,D=0,R=0,F=0,M=null,N=0,x=new n.Buf16(16),U=new n.Buf16(16),L=null,q=0;for(_=0;_<=15;_++)x[_]=0;for(E=0;E=1&&0===x[b];b--);if(Q>b&&(Q=b),0===b)return f[h++]=20971520,f[h++]=20971520,u.bits=1,0;for(v=1;v0&&(0===e||1!==b))return-1;for(U[1]=0,_=1;_<15;_++)U[_+1]=U[_]+x[_];for(E=0;E852||2===e&&R>592)return 1;for(;;){m=_-k,l[E]C?(B=L[q+l[E]],w=M[N+l[E]]):(B=96,w=0),c=1<<_-k,v=d=1<>k)+(d-=c)]=m<<24|B<<16|w}while(0!==d);for(c=1<<_-1;F&c;)c>>=1;if(0!==c?(F&=c-1,F+=c):F=0,E++,0==--x[_]){if(_===b)break;_=t[r+l[E]]}if(_>Q&&(F&I)!==g){for(0===k&&(k=Q),p+=v,D=1<<(S=_-k);S+k852||2===e&&R>592)return 1;f[g=F&I]=Q<<24|S<<16|p-h}}return 0!==F&&(f[p+F]=_-k<<24|64<<16),u.bits=Q,0}},4674:e=>{"use strict";e.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},3665:(e,t,r)=>{"use strict";var n=r(9805);function i(e){for(var t=e.length;--t>=0;)e[t]=0}var o=256,s=286,a=30,A=15,f=16,h=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],l=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],u=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],c=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],d=new Array(576);i(d);var g=new Array(60);i(g);var I=new Array(512);i(I);var p=new Array(256);i(p);var C=new Array(29);i(C);var m,B,w,y=new Array(a);function _(e,t,r,n,i){this.static_tree=e,this.extra_bits=t,this.extra_base=r,this.elems=n,this.max_length=i,this.has_stree=e&&e.length}function E(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function v(e){return e<256?I[e]:I[256+(e>>>7)]}function b(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function Q(e,t,r){e.bi_valid>f-r?(e.bi_buf|=t<>f-e.bi_valid,e.bi_valid+=r-f):(e.bi_buf|=t<>>=1,r<<=1}while(--t>0);return r>>>1}function D(e,t,r){var n,i,o=new Array(A+1),s=0;for(n=1;n<=A;n++)o[n]=s=s+r[n-1]<<1;for(i=0;i<=t;i++){var a=e[2*i+1];0!==a&&(e[2*i]=k(o[a]++,a))}}function R(e){var t;for(t=0;t8?b(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function M(e,t,r,n){var i=2*t,o=2*r;return e[i]>1;r>=1;r--)N(e,o,r);i=f;do{r=e.heap[1],e.heap[1]=e.heap[e.heap_len--],N(e,o,1),n=e.heap[1],e.heap[--e.heap_max]=r,e.heap[--e.heap_max]=n,o[2*i]=o[2*r]+o[2*n],e.depth[i]=(e.depth[r]>=e.depth[n]?e.depth[r]:e.depth[n])+1,o[2*r+1]=o[2*n+1]=i,e.heap[1]=i++,N(e,o,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],function(e,t){var r,n,i,o,s,a,f=t.dyn_tree,h=t.max_code,l=t.stat_desc.static_tree,u=t.stat_desc.has_stree,c=t.stat_desc.extra_bits,d=t.stat_desc.extra_base,g=t.stat_desc.max_length,I=0;for(o=0;o<=A;o++)e.bl_count[o]=0;for(f[2*e.heap[e.heap_max]+1]=0,r=e.heap_max+1;r<573;r++)(o=f[2*f[2*(n=e.heap[r])+1]+1]+1)>g&&(o=g,I++),f[2*n+1]=o,n>h||(e.bl_count[o]++,s=0,n>=d&&(s=c[n-d]),a=f[2*n],e.opt_len+=a*(o+s),u&&(e.static_len+=a*(l[2*n+1]+s)));if(0!==I){do{for(o=g-1;0===e.bl_count[o];)o--;e.bl_count[o]--,e.bl_count[o+1]+=2,e.bl_count[g]--,I-=2}while(I>0);for(o=g;0!==o;o--)for(n=e.bl_count[o];0!==n;)(i=e.heap[--r])>h||(f[2*i+1]!==o&&(e.opt_len+=(o-f[2*i+1])*f[2*i],f[2*i+1]=o),n--)}}(e,t),D(o,h,e.bl_count)}function L(e,t,r){var n,i,o=-1,s=t[1],a=0,A=7,f=4;for(0===s&&(A=138,f=3),t[2*(r+1)+1]=65535,n=0;n<=r;n++)i=s,s=t[2*(n+1)+1],++a>=7;n0?(2===e.strm.data_type&&(e.strm.data_type=function(e){var t,r=4093624447;for(t=0;t<=31;t++,r>>>=1)if(1&r&&0!==e.dyn_ltree[2*t])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(t=32;t=3&&0===e.bl_tree[2*c[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(e),i=e.opt_len+3+7>>>3,(s=e.static_len+3+7>>>3)<=i&&(i=s)):i=s=r+5,r+4<=i&&-1!==t?O(e,t,r,n):4===e.strategy||s===i?(Q(e,2+(n?1:0),3),x(e,d,g)):(Q(e,4+(n?1:0),3),function(e,t,r,n){var i;for(Q(e,t-257,5),Q(e,r-1,5),Q(e,n-4,4),i=0;i>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&r,e.last_lit++,0===t?e.dyn_ltree[2*r]++:(e.matches++,t--,e.dyn_ltree[2*(p[r]+o+1)]++,e.dyn_dtree[2*v(t)]++),e.last_lit===e.lit_bufsize-1},t._tr_align=function(e){Q(e,2,3),S(e,256,d),function(e){16===e.bi_valid?(b(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}(e)}},4442:e=>{"use strict";e.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},7392:e=>{"use strict";class t{constructor(e={}){if(!(e.maxSize&&e.maxSize>0))throw new TypeError("`maxSize` must be a number greater than 0");this.maxSize=e.maxSize,this.cache=new Map,this.oldCache=new Map,this._size=0}_set(e,t){this.cache.set(e,t),this._size++,this._size>=this.maxSize&&(this._size=0,this.oldCache=this.cache,this.cache=new Map)}get(e){if(this.cache.has(e))return this.cache.get(e);if(this.oldCache.has(e)){const t=this.oldCache.get(e);return this.oldCache.delete(e),this._set(e,t),t}}set(e,t){return this.cache.has(e)?this.cache.set(e,t):this._set(e,t),this}has(e){return this.cache.has(e)||this.oldCache.has(e)}peek(e){return this.cache.has(e)?this.cache.get(e):this.oldCache.has(e)?this.oldCache.get(e):void 0}delete(e){const t=this.cache.delete(e);return t&&this._size--,this.oldCache.delete(e)||t}clear(){this.cache.clear(),this.oldCache.clear(),this._size=0}*keys(){for(const[e]of this)yield e}*values(){for(const[,e]of this)yield e}*[Symbol.iterator](){for(const e of this.cache)yield e;for(const e of this.oldCache){const[t]=e;this.cache.has(t)||(yield e)}}get size(){let e=0;for(const t of this.oldCache.keys())this.cache.has(t)||e++;return this._size+e}}e.exports=t},1307:function(e,t,r){var n;n=e=>(()=>{"use strict";var t=[,e=>{e.exports="data:application/wasm;base64,AGFzbQEAAAABOApgAX8Bf2ABfwBgAABgA39/fwF/YAABf2ACf38AYAN/f34BfmACf38Bf2AEf39/fwF/YAN/f38AAyEgAAABAgMDAwMEAQUAAgMCBgcIBwUDAAMHAQcABwcBAwkFAwEAAgYIAX8BQfCgBAsHTgUGbWVtb3J5AgAOY3JlYXRlX2NvbnRleHQACA9kZXN0cm95X2NvbnRleHQACQxzdXBwbHlfaW5wdXQACg9nZXRfbmV4dF9vdXRwdXQACwqNYCDfAgEFf0EAIQECQCAAQQdqIgJBEEkNAEEBIQEgAkEDdiIDQQJGDQBBAiEBIAJBIEkNAEEDIQEgA0EERg0AQQQhASACQTBJDQBBBSEBIANBBkYNAEEGIQEgAkHIAEkNAEEHIQEgAkHYAEkNAEEIIQEgAkGIAUkNAEEJIQEgAkGIAkkNACAAEIGAgIAAIgBBCGpBACAAGw8LAkACQCABQQJ0QcCIgIAAaiIEKAIAIgANAEEAIQACQAJAQQAoAuSIgIAAIgJFDQBBACACKAIANgLkiICAAAwBC0EAEIGAgIAAIgJFDQILIAJBgIB8cSIAIAJBCHZB/wFxIgJyIAE6AAAgAkEIdCAAckGAAmohAEEAIQJBACABQQJ0QYCIgIAAaigCACIDayEFIAMhAQNAIAAgBWoiACACNgIAIAAhAiABIANqIgFBgQJJDQALIAQgADYCAAsgBCAAKAIANgIACyAAC+4HAQd/AkACQAJAAkACQEEALQC0iICAAEUNAEEAQQA6ALSIgIAAQQAoArCIgIAAIgFFDQFBsIiAgAAhAgNAAkACQCABQQhqIgMgASgCBCIEaiIFQQh2Qf8BcSIGDQAg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ACAAKAIcEJiAgIAAIAAQgoCAgAALFgAgAEEMaiABNgIAIABBCGpBADYCAAsbACAAKAIcIABBBGogAEEMaigCAEUQloCAgAALVAEDf0EAIQADQEEIIQEgACECA0BBACACQQFxa0GghuLtfnEgAkEBdnMhAiABQX9qIgENAAsgAEECdEHwiICAAGogAjYCACAAQQFqIgBBgAJHDQALC0oAIAJBf3MhAgJAIAFFDQADQCACQf8BcSAALQAAc0ECdEHwiICAAGooAgAgAkEIdnMhAiAAQQFqIQAgAUF/aiIBDQALCyACQX9zC10DAX4BfwF+QgAhAANAQQghASAAIQIDQEIAIAJCAYN9QsKenLzd8pW2SYMgAkIBiIUhAiABQX9qIgENAAsgAKdBA3RB8JCAgABqIAI3AwAgAEIBfCIAQoACUg0ACwtLACACQn+FIQICQCABRQ0AA0AgAkL/AYMgADEAAIWnQQN0QfCQgIAAaikDACACQgiIhSECIABBAWohACABQX9qIgENAAsLIAJCf4UL1RACDH8CfgJAAkAgACgCJEUNACAAKAIAIQIMAQtBACECIABBADoAKCAAQgA3AwAgAEIANwMYIABByABqQQBB5AAQhoCAgAAaIABBrAFqQQw2AgALIAAgASgCBCIDNgIQIABBsAFqIQQgAEHgAGohBSAAQcgAaiEGIABBtgFqIQcgAEGoAWohCCABKAIQIQkCQAJAAkACQANAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIAIOCgECAAQFBgcICQoPCyABKAIAIQogACgCqAEhAiAAKAKsASELIAEoAgQhDCABKAIIIQ0MAgsgCCAAKAKoASIMakEIaiABKAIAIAEoAgQiAmogASgCCCACayICIAAoAqwBIAxrIgwgAiAMSRsiAhCHgICAABogASABKAIEIAJqNgIEQQAhDCAAQQAgACgCqAEgAmoiAiACIAAoAqwBIgtGGzYCqAEgAiALRw0RIABBATYCAAJAIARBqIiAgABBBhCEgICAAEUNAEEFIQwMEgsgB0ECQQAQjYCAgAAgACgAuAFHDRBBBiEMIActAAANESAAIAAtALcBIgI2AiAgAkEESw0RQQEgAnRBE3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FqIgM2AhAgACAOQQh0IAAoAgwgCWotAAByIg42AgQgAyEJCwJAAkAgDiALQQt2IA8vAQAiCmwiA08iEg0AIAAgAzYCACAKQYAQIAprQQV2aiEKDAELIAAgDiADayIONgIEIAAgCyADayIDNgIAIAogCkEFdmshCkEAIQ0LIA8gCjsBACANIBFzIQ0gBEEBdCASciIEQYACSQ0ACwsgACACQQFqNgIgIAAoAhggAmogBDoAAAJAIAAoAiQgACgCICICTw0AIAAgAjYCJAtBACEDAkAgACgCZCIEQQRJDQACQCAEQQlLDQAgBEF9aiEDDAELIARBemohAwsgACADNgJkDAELIAAgDiADayIONgIEIAAgBCADayIDNgIAIA0gDyAPQQV2azsBACAAIApBAXRqIg9B+ANqIQQCQAJAIANB////B00NACAJIQoMAQsgACADQQh0IgM2AgAgACAJQQFqIgo2AhAgACAOQQh0IAAoAgwgCWotAAByIg42AgQLAkACQCAOIANBC3YgBC8BACINbCIJSQ0AIAAgDiAJayIONgIEIAAgAyAJayIDNgIAIAQgDSANQQV2azsBACAPQZAEaiENAkACQCADQf///wdNDQAgCiEQDAELIAAgA0EIdCIDNgIAIAAgCkEBaiIQNgIQIAAgDkEIdCAAKAIMIApqLQAAciIONgIECwJAAkAgDiADQQt2IA0vAQAiCWwiBE8NACANIAlBgBAgCWtBBXZqOwEAIAxB2ARqIQMCQCAEQf///wdLDQAgACAEQQh0IgQ2AgAgACAQQQFqNgIQIAAgDkEIdCAAKAIMIBBqLQAAciIONgIECwJAIA4gBEELdiADLwEAIg1sIglJDQAgACAOIAlrNgIEIAAgBCAJazYCACADIA0gDUEFdms7AQAMAgsgAyANQYAQIA1rQQV2ajsBACAAIAk2AgAgAEEBNgJoIABBCUELIAAoAmRBB0kbNgJkDAMLIAAgDiAEayIONgIEIA0gCSAJQQV2azsBACAPQagEaiENAkACQCADIARrIgNB////B00NACAQIQoMAQsgACADQQh0IgM2AgAgACAQQQFqIgo2AhAgACAOQQh0IAAoAgwgEGotAAByIg42AgQLAkACQCAOIANBC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AEQQh0IAUgACgCDGotAAByIgQ2AgQLAkACQCAEIAJBC3YgAy8BACIGbCIFSQ0AIAAgBCAFayIENgIEIAAgAiAFayIFNgIAIAMgBiAGQQV2azsBACABQQFyIQEMAQsgACAFNgIAIAMgBkGAECAGa0EFdmo7AQALIAEgCEkNAAsgAEHoAGogASAIayAJajYCAAsLNQEAQYAICy4IAAAAEAAAABgAAAAgAAAAKAAAADAAAABAAAAAUAAAAIAAAAAAAQAA/Td6WFoA"},t=>{t.exports=e}],r={};function n(e){var i=r[e];if(void 0!==i)return i.exports;var o=r[e]={exports:{}};return t[e](o,o.exports,n),o.exports}n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};return(()=>{n.r(i),n.d(i,{XzReadableStream:()=>o});var e=n(1);const t=globalThis.ReadableStream||n(2).ReadableStream;class r{constructor(e){this.exports=e.exports,this.memory=this.exports.memory,this.ptr=this.exports.create_context(),this._refresh(),this.bufSize=this.mem32[0],this.inStart=this.mem32[1]-this.ptr,this.inEnd=this.inStart+this.bufSize,this.outStart=this.mem32[4]-this.ptr}supplyInput(e){this._refresh(),this.mem8.subarray(this.inStart,this.inEnd).set(e,0),this.exports.supply_input(this.ptr,e.byteLength),this._refresh()}getNextOutput(){const e=this.exports.get_next_output(this.ptr);if(this._refresh(),0!==e&&1!==e)throw new Error(`get_next_output failed with error code ${e}`);return{outChunk:this.mem8.slice(this.outStart,this.outStart+this.mem32[5]),finished:1===e}}needsMoreInput(){return this.mem32[2]===this.mem32[3]}outputBufferIsFull(){return this.mem32[5]===this.bufSize}resetOutputBuffer(){this.outPos=this.mem32[5]=0}dispose(){this.exports.destroy_context(this.ptr),this.exports=null}_refresh(){this.memory.buffer!==this.mem8?.buffer&&(this.mem8=new Uint8Array(this.memory.buffer,this.ptr),this.mem32=new Uint32Array(this.memory.buffer,this.ptr))}}class o extends t{static _moduleInstancePromise;static _moduleInstance;static async _getModuleInstance(){const t=e.replace("data:application/wasm;base64,",""),r=Uint8Array.from(atob(t),(e=>e.charCodeAt(0))).buffer,n=await WebAssembly.instantiate(r,{});o._moduleInstance=n.instance}constructor(e){let t,n=null;const i=e.getReader();super({async start(e){o._moduleInstance||await(o._moduleInstancePromise||(o._moduleInstancePromise=o._getModuleInstance())),t=new r(o._moduleInstance)},async pull(e){if(t.needsMoreInput()){if(null===n||0===n.byteLength){const{done:e,value:t}=await i.read();e||(n=t)}const e=Math.min(t.bufSize,n.byteLength);t.supplyInput(n.subarray(0,e)),n=n.subarray(e)}const r=t.getNextOutput();e.enqueue(r.outChunk),t.resetOutputBuffer(),r.finished&&(t.dispose(),e.close())},cancel:()=>(t.dispose(),i.cancel())})}}})(),i})(),e.exports=n(r(772))},3617:()=>{},772:()=>{},928:(e,t,r)=>{const n=r(2886).default;e.exports=n,e.exports.default=n},1308:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});let r=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117];"undefined"!=typeof Int32Array&&(r=new Int32Array(r)),t.default=(e,t)=>{let n=0===t?0:~t;for(let t=0;t>>8;return~n}},2886:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=n(r(1308)),o=n(r(7327));t.default=(0,o.default)("crc-32",i.default)},4422:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(8287);t.default=(e,t)=>n.Buffer.from(e,t)},7327:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=n(r(4422));t.default=function(e,t){const r=(e,r)=>t((0,i.default)(e),r)>>>0;return r.signed=(e,r)=>t((0,i.default)(e),r),r.unsigned=r,r.model=e,r}}},t={};function r(n){var i=t[n];if(void 0!==i)return i.exports;var o=t[n]={exports:{}};return e[n].call(o.exports,o,o.exports,r),o.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n=r(7806);return n})(); \ No newline at end of file