-
Notifications
You must be signed in to change notification settings - Fork 31
/
17539.5b2b1479.iframe.bundle.js
7 lines (7 loc) · 143 KB
/
17539.5b2b1479.iframe.bundle.js
1
2
3
4
5
6
7
(globalThis.webpackChunkmetamask_crx=globalThis.webpackChunkmetamask_crx||[]).push([[17539],{"./node_modules/@keystonehq/alias-sampling/dist/esm/index.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{default:()=>__WEBPACK_DEFAULT_EXPORT__});var precomputeAlias=function(p,n){var sum=p.reduce(function(acc,val){if(val<0)throw Error("Probability must be a positive: p["+p.indexOf(val)+"]="+val);return acc+val},0);if(0===sum)throw Error("Probability sum must be greater than zero.");for(var scaledProbabilities=p.map(function(prob){return prob*n/sum}),aliasData={prob:Array(n),alias:Array(n)},small=[],large=[],i=n-1;i>=0;i--)scaledProbabilities[i]<1?small.push(i):large.push(i);for(;small.length>0&&large.length>0;){var less=small.pop(),more=large.pop();aliasData.prob[less]=scaledProbabilities[less],aliasData.alias[less]=more,scaledProbabilities[more]=scaledProbabilities[more]+scaledProbabilities[less]-1,scaledProbabilities[more]<1?small.push(more):large.push(more)}for(;large.length>0;)aliasData.prob[large.pop()]=1;for(;small.length>0;)aliasData.prob[small.pop()]=1;return aliasData},draw=function(aliasData,outcomes,rng){var c=Math.floor(rng()*aliasData.prob.length);return outcomes[rng()<aliasData.prob[c]?c:aliasData.alias[c]]},next=function(aliasData,outcomes,rng,numOfSamples){if(void 0===numOfSamples&&(numOfSamples=1),1===numOfSamples)return draw(aliasData,outcomes,rng);for(var samples=[],i=0;i<numOfSamples;i++)samples.push(draw(aliasData,outcomes,rng));return samples};let __WEBPACK_DEFAULT_EXPORT__=function(probabilities,outcomes,rng){if(void 0===rng&&(rng=Math.random),!Array.isArray(probabilities))throw Error("Probabilities must be an array.");if(0===probabilities.length)throw Error("Probabilities array must not be empty.");var n=probabilities.length,indexedOutcomes=null!=outcomes?outcomes:Array.from({length:n},function(_,i){return i}),aliasData=precomputeAlias(probabilities,n);return{next:function(numOfSamples){return void 0===numOfSamples&&(numOfSamples=1),next(aliasData,indexedOutcomes,rng,numOfSamples)}}}},"./node_modules/@ngraveio/bc-ur/dist/bytewords.js":function(__unused_webpack_module,exports,__webpack_require__){"use strict";var STYLES,STYLES1,Buffer=__webpack_require__("./node_modules/buffer/index.js").Buffer,__importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0});let assert_1=__importDefault(__webpack_require__("./node_modules/assert/build/assert.js")),utils_1=__webpack_require__("./node_modules/@ngraveio/bc-ur/dist/utils.js"),bytewordsLookUpTable=[];(STYLES=STYLES1||(STYLES1={})).STANDARD="standard",STYLES.URI="uri",STYLES.MINIMAL="minimal";let getWord=index=>"ableacidalsoapexaquaarchatomauntawayaxisbackbaldbarnbeltbetabiasbluebodybragbrewbulbbuzzcalmcashcatschefcityclawcodecolacookcostcruxcurlcuspcyandarkdatadaysdelidicedietdoordowndrawdropdrumdulldutyeacheasyechoedgeepicevenexamexiteyesfactfairfernfigsfilmfishfizzflapflewfluxfoxyfreefrogfuelfundgalagamegeargemsgiftgirlglowgoodgraygrimgurugushgyrohalfhanghardhawkheathelphighhillholyhopehornhutsicedideaidleinchinkyintoirisironitemjadejazzjoinjoltjowljudojugsjumpjunkjurykeepkenokeptkeyskickkilnkingkitekiwiknoblamblavalazyleaflegsliarlimplionlistlogoloudloveluaulucklungmainmanymathmazememomenumeowmildmintmissmonknailnavyneednewsnextnoonnotenumbobeyoboeomitonyxopenovalowlspaidpartpeckplaypluspoempoolposepuffpumapurrquadquizraceramprealredorichroadrockroofrubyruinrunsrustsafesagascarsetssilkskewslotsoapsolosongstubsurfswantacotasktaxitenttiedtimetinytoiltombtoystriptunatwinuglyundouniturgeuservastveryvetovialvibeviewvisavoidvowswallwandwarmwaspwavewaxywebswhatwhenwhizwolfworkyankyawnyellyogayurtzapszerozestzinczonezoom".slice(4*index,4*index+4),getMinimalWord=index=>{let byteword=getWord(index);return`${byteword[0]}${byteword[3]}`},addCRC=string=>{let crc=utils_1.getCRCHex(Buffer.from(string,"hex"));return`${string}${crc}`},encodeWithSeparator=(word,separator)=>{let crcAppendedWord=addCRC(word);return Buffer.from(crcAppendedWord,"hex").reduce((result,w)=>[...result,getWord(w)],[]).join(separator)},encodeMinimal=word=>{let crcAppendedWord=addCRC(word);return Buffer.from(crcAppendedWord,"hex").reduce((result,w)=>result+getMinimalWord(w),"")},decodeWord=(word,wordLength)=>{if(assert_1.default(word.length===wordLength,"Invalid Bytewords: word.length does not match wordLength provided"),0===bytewordsLookUpTable.length){bytewordsLookUpTable=[...Array(676)].map(()=>-1);for(let i=0;i<256;i++){let byteword=getWord(i),x=byteword[0].charCodeAt(0)-97;bytewordsLookUpTable[(byteword[3].charCodeAt(0)-97)*26+x]=i}}let x=word[0].toLowerCase().charCodeAt(0)-97,y=word[4==wordLength?3:1].toLowerCase().charCodeAt(0)-97;assert_1.default(0<=x&&x<26&&0<=y&&y<26,"Invalid Bytewords: invalid word");let value=bytewordsLookUpTable[26*y+x];if(assert_1.default(-1!==value,"Invalid Bytewords: value not in lookup table"),4==wordLength){let byteword=getWord(value),c1=word[1].toLowerCase(),c2=word[2].toLowerCase();assert_1.default(c1===byteword[1]&&c2===byteword[2],"Invalid Bytewords: invalid middle letters of word")}return Buffer.from([value]).toString("hex")},_decode=(string,separator,wordLength)=>{let decodedString=(4==wordLength?string.split(separator):utils_1.partition(string,2)).map(word=>decodeWord(word,wordLength)).join("");assert_1.default(decodedString.length>=5,"Invalid Bytewords: invalid decoded string length");let[body,bodyChecksum]=utils_1.split(Buffer.from(decodedString,"hex"),4),checksum=utils_1.getCRCHex(body);return assert_1.default(checksum===bodyChecksum.toString("hex"),"Invalid Checksum"),body.toString("hex")},decode=(string,style=STYLES1.MINIMAL)=>{switch(style){case STYLES1.STANDARD:return _decode(string," ",4);case STYLES1.URI:return _decode(string,"-",4);case STYLES1.MINIMAL:return _decode(string,"",2);default:throw Error(`Invalid style ${style}`)}},encode=(string,style=STYLES1.MINIMAL)=>{switch(style){case STYLES1.STANDARD:return encodeWithSeparator(string," ");case STYLES1.URI:return encodeWithSeparator(string,"-");case STYLES1.MINIMAL:return encodeMinimal(string);default:throw Error(`Invalid style ${style}`)}};exports.default={decode,encode,STYLES:STYLES1}},"./node_modules/@ngraveio/bc-ur/dist/cbor.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";var Buffer=__webpack_require__("./node_modules/buffer/index.js").Buffer;Object.defineProperty(exports,"__esModule",{value:!0}),exports.cborDecode=exports.cborEncode=void 0;let cbor=__webpack_require__("./node_modules/cbor-sync/main.js");exports.cborEncode=data=>cbor.encode(data),exports.cborDecode=data=>cbor.decode(Buffer.isBuffer(data)?data:Buffer.from(data,"hex"))},"./node_modules/@ngraveio/bc-ur/dist/errors.js":(__unused_webpack_module,exports)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.InvalidChecksumError=exports.InvalidSequenceComponentError=exports.InvalidTypeError=exports.InvalidPathLengthError=exports.InvalidSchemeError=void 0,exports.InvalidSchemeError=class extends Error{constructor(){super("Invalid Scheme"),this.name="InvalidSchemeError"}},exports.InvalidPathLengthError=class extends Error{constructor(){super("Invalid Path"),this.name="InvalidPathLengthError"}},exports.InvalidTypeError=class extends Error{constructor(){super("Invalid Type"),this.name="InvalidTypeError"}},exports.InvalidSequenceComponentError=class extends Error{constructor(){super("Invalid Sequence Component"),this.name="InvalidSequenceComponentError"}},exports.InvalidChecksumError=class extends Error{constructor(){super("Invalid Checksum"),this.name="InvalidChecksumError"}}},"./node_modules/@ngraveio/bc-ur/dist/fountainDecoder.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";var Buffer=__webpack_require__("./node_modules/buffer/index.js").Buffer;Object.defineProperty(exports,"__esModule",{value:!0}),exports.FountainDecoderPart=void 0;let utils_1=__webpack_require__("./node_modules/@ngraveio/bc-ur/dist/utils.js"),fountainUtils_1=__webpack_require__("./node_modules/@ngraveio/bc-ur/dist/fountainUtils.js"),errors_1=__webpack_require__("./node_modules/@ngraveio/bc-ur/dist/errors.js");class FountainDecoderPart{constructor(_indexes,_fragment){this._indexes=_indexes,this._fragment=_fragment}get indexes(){return this._indexes}get fragment(){return this._fragment}static fromEncoderPart(encoderPart){return new FountainDecoderPart(fountainUtils_1.chooseFragments(encoderPart.seqNum,encoderPart.seqLength,encoderPart.checksum),encoderPart.fragment)}isSimple(){return 1===this.indexes.length}}exports.FountainDecoderPart=FountainDecoderPart;class FountainDecoder{constructor(){this.result=void 0,this.expectedMessageLength=0,this.expectedChecksum=0,this.expectedFragmentLength=0,this.processedPartsCount=0,this.expectedPartIndexes=[],this.lastPartIndexes=[],this.queuedParts=[],this.receivedPartIndexes=[],this.mixedParts=[],this.simpleParts=[]}validatePart(part){if(0===this.expectedPartIndexes.length)[...Array(part.seqLength)].forEach((_,index)=>this.expectedPartIndexes.push(index)),this.expectedMessageLength=part.messageLength,this.expectedChecksum=part.checksum,this.expectedFragmentLength=part.fragment.length;else if(this.expectedPartIndexes.length!==part.seqLength||this.expectedMessageLength!==part.messageLength||this.expectedChecksum!==part.checksum||this.expectedFragmentLength!==part.fragment.length)return!1;return!0}reducePartByPart(a,b){return utils_1.arrayContains(a.indexes,b.indexes)?new FountainDecoderPart(utils_1.setDifference(a.indexes,b.indexes),utils_1.bufferXOR(a.fragment,b.fragment)):a}reduceMixedBy(part){let newMixed=[];this.mixedParts.map(({value:mixedPart})=>this.reducePartByPart(mixedPart,part)).forEach(reducedPart=>{reducedPart.isSimple()?this.queuedParts.push(reducedPart):newMixed.push({key:reducedPart.indexes,value:reducedPart})}),this.mixedParts=newMixed}processSimplePart(part){let fragmentIndex=part.indexes[0];if(!this.receivedPartIndexes.includes(fragmentIndex)){if(this.simpleParts.push({key:part.indexes,value:part}),this.receivedPartIndexes.push(fragmentIndex),utils_1.arraysEqual(this.receivedPartIndexes,this.expectedPartIndexes)){let sortedParts=this.simpleParts.map(({value})=>value).sort((a,b)=>a.indexes[0]-b.indexes[0]),message=FountainDecoder.joinFragments(sortedParts.map(part=>part.fragment),this.expectedMessageLength);utils_1.getCRC(message)===this.expectedChecksum?this.result=message:this.error=new errors_1.InvalidChecksumError}else this.reduceMixedBy(part)}}processMixedPart(part){if(this.mixedParts.some(({key:indexes})=>utils_1.arraysEqual(indexes,part.indexes)))return;let p2=this.simpleParts.reduce((acc,{value:p})=>this.reducePartByPart(acc,p),part);(p2=this.mixedParts.reduce((acc,{value:p})=>this.reducePartByPart(acc,p),p2)).isSimple()?this.queuedParts.push(p2):(this.reduceMixedBy(p2),this.mixedParts.push({key:p2.indexes,value:p2}))}processQueuedItem(){if(0===this.queuedParts.length)return;let part=this.queuedParts.shift();part.isSimple()?this.processSimplePart(part):this.processMixedPart(part)}receivePart(encoderPart){if(this.isComplete()||!this.validatePart(encoderPart))return!1;let decoderPart=FountainDecoderPart.fromEncoderPart(encoderPart);for(this.lastPartIndexes=decoderPart.indexes,this.queuedParts.push(decoderPart);!this.isComplete()&&this.queuedParts.length>0;)this.processQueuedItem();return this.processedPartsCount+=1,!0}isComplete(){return!!(void 0!==this.result&&this.result.length>0)}isSuccess(){return!!(void 0===this.error&&this.isComplete())}resultMessage(){return this.isSuccess()?this.result:Buffer.from([])}isFailure(){return void 0!==this.error}resultError(){return this.error?this.error.message:""}expectedPartCount(){return this.expectedPartIndexes.length}getExpectedPartIndexes(){return[...this.expectedPartIndexes]}getReceivedPartIndexes(){return[...this.receivedPartIndexes]}getLastPartIndexes(){return[...this.lastPartIndexes]}estimatedPercentComplete(){if(this.isComplete())return 1;let expectedPartCount=this.expectedPartCount();return 0===expectedPartCount?0:Math.min(.99,this.processedPartsCount/(1.75*expectedPartCount))}getProgress(){if(this.isComplete())return 1;let expectedPartCount=this.expectedPartCount();return 0===expectedPartCount?0:this.receivedPartIndexes.length/expectedPartCount}}exports.default=FountainDecoder,FountainDecoder.joinFragments=(fragments,messageLength)=>Buffer.concat(fragments).slice(0,messageLength)},"./node_modules/@ngraveio/bc-ur/dist/fountainEncoder.js":function(__unused_webpack_module,exports,__webpack_require__){"use strict";var Buffer=__webpack_require__("./node_modules/buffer/index.js").Buffer,__importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.FountainEncoderPart=void 0;let assert_1=__importDefault(__webpack_require__("./node_modules/assert/build/assert.js")),utils_1=__webpack_require__("./node_modules/@ngraveio/bc-ur/dist/utils.js"),fountainUtils_1=__webpack_require__("./node_modules/@ngraveio/bc-ur/dist/fountainUtils.js"),cbor_1=__webpack_require__("./node_modules/@ngraveio/bc-ur/dist/cbor.js");class FountainEncoderPart{constructor(_seqNum,_seqLength,_messageLength,_checksum,_fragment){this._seqNum=_seqNum,this._seqLength=_seqLength,this._messageLength=_messageLength,this._checksum=_checksum,this._fragment=_fragment}get messageLength(){return this._messageLength}get fragment(){return this._fragment}get seqNum(){return this._seqNum}get seqLength(){return this._seqLength}get checksum(){return this._checksum}cbor(){let result=cbor_1.cborEncode([this._seqNum,this._seqLength,this._messageLength,this._checksum,this._fragment]);return Buffer.from(result)}description(){return`seqNum:${this._seqNum}, seqLen:${this._seqLength}, messageLen:${this._messageLength}, checksum:${this._checksum}, data:${this._fragment.toString("hex")}`}static fromCBOR(cborPayload){let[seqNum,seqLength,messageLength,checksum,fragment]=cbor_1.cborDecode(cborPayload);return assert_1.default("number"==typeof seqNum),assert_1.default("number"==typeof seqLength),assert_1.default("number"==typeof messageLength),assert_1.default("number"==typeof checksum),assert_1.default(Buffer.isBuffer(fragment)&&fragment.length>0),new FountainEncoderPart(seqNum,seqLength,messageLength,checksum,Buffer.from(fragment))}}exports.FountainEncoderPart=FountainEncoderPart;class FountainEncoder{constructor(message,maxFragmentLength=100,firstSeqNum=0,minFragmentLength=10){let fragmentLength=FountainEncoder.findNominalFragmentLength(message.length,minFragmentLength,maxFragmentLength);this._messageLength=message.length,this._fragments=FountainEncoder.partitionMessage(message,fragmentLength),this.fragmentLength=fragmentLength,this.seqNum=utils_1.toUint32(firstSeqNum),this.checksum=utils_1.getCRC(message)}get fragmentsLength(){return this._fragments.length}get fragments(){return this._fragments}get messageLength(){return this._messageLength}isComplete(){return this.seqNum>=this._fragments.length}isSinglePart(){return 1===this._fragments.length}seqLength(){return this._fragments.length}mix(indexes){return indexes.reduce((result,index)=>utils_1.bufferXOR(this._fragments[index],result),Buffer.alloc(this.fragmentLength,0))}nextPart(){this.seqNum=utils_1.toUint32(this.seqNum+1);let indexes=fountainUtils_1.chooseFragments(this.seqNum,this._fragments.length,this.checksum),mixed=this.mix(indexes);return new FountainEncoderPart(this.seqNum,this._fragments.length,this._messageLength,this.checksum,mixed)}static findNominalFragmentLength(messageLength,minFragmentLength,maxFragmentLength){assert_1.default(messageLength>0),assert_1.default(minFragmentLength>0),assert_1.default(maxFragmentLength>=minFragmentLength);let maxFragmentCount=Math.ceil(messageLength/minFragmentLength),fragmentLength=0;for(let fragmentCount=1;fragmentCount<=maxFragmentCount&&!((fragmentLength=Math.ceil(messageLength/fragmentCount))<=maxFragmentLength);fragmentCount++);return fragmentLength}static partitionMessage(message,fragmentLength){let fragment,remaining=Buffer.from(message),_fragments=[];for(;remaining.length>0;)[fragment,remaining]=utils_1.split(remaining,-fragmentLength),_fragments.push(fragment=Buffer.alloc(fragmentLength,0).fill(fragment,0,fragment.length));return _fragments}}exports.default=FountainEncoder},"./node_modules/@ngraveio/bc-ur/dist/fountainUtils.js":function(__unused_webpack_module,exports,__webpack_require__){"use strict";var Buffer=__webpack_require__("./node_modules/buffer/index.js").Buffer,__importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.chooseFragments=exports.shuffle=exports.chooseDegree=void 0;let utils_1=__webpack_require__("./node_modules/@ngraveio/bc-ur/dist/utils.js"),xoshiro_1=__importDefault(__webpack_require__("./node_modules/@ngraveio/bc-ur/dist/xoshiro.js")),alias_sampling_1=__importDefault(__webpack_require__("./node_modules/@keystonehq/alias-sampling/dist/esm/index.js"));exports.chooseDegree=(seqLenth,rng)=>{let degreeProbabilities=[...Array(seqLenth)].map((_,index)=>1/(index+1));return alias_sampling_1.default(degreeProbabilities,void 0,rng.nextDouble).next()+1},exports.shuffle=(items,rng)=>{let remaining=[...items],result=[];for(;remaining.length>0;){let index=rng.nextInt(0,remaining.length-1),item=remaining[index];remaining.splice(index,1),result.push(item)}return result},exports.chooseFragments=(seqNum,seqLength,checksum)=>{if(seqNum<=seqLength)return[seqNum-1];{let seed=Buffer.concat([utils_1.intToBytes(seqNum),utils_1.intToBytes(checksum)]),rng=new xoshiro_1.default(seed),degree=exports.chooseDegree(seqLength,rng),indexes=[...Array(seqLength)].map((_,index)=>index);return exports.shuffle(indexes,rng).slice(0,degree)}}},"./node_modules/@ngraveio/bc-ur/dist/index.js":function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.URDecoder=exports.UREncoder=exports.UR=void 0;let ur_1=__importDefault(__webpack_require__("./node_modules/@ngraveio/bc-ur/dist/ur.js"));exports.UR=ur_1.default;let urEncoder_1=__importDefault(__webpack_require__("./node_modules/@ngraveio/bc-ur/dist/urEncoder.js"));exports.UREncoder=urEncoder_1.default;let urDecoder_1=__importDefault(__webpack_require__("./node_modules/@ngraveio/bc-ur/dist/urDecoder.js"));exports.URDecoder=urDecoder_1.default},"./node_modules/@ngraveio/bc-ur/dist/ur.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";var Buffer=__webpack_require__("./node_modules/buffer/index.js").Buffer;Object.defineProperty(exports,"__esModule",{value:!0});let errors_1=__webpack_require__("./node_modules/@ngraveio/bc-ur/dist/errors.js"),utils_1=__webpack_require__("./node_modules/@ngraveio/bc-ur/dist/utils.js"),cbor_1=__webpack_require__("./node_modules/@ngraveio/bc-ur/dist/cbor.js");class UR{constructor(_cborPayload,_type="bytes"){if(this._cborPayload=_cborPayload,this._type=_type,!utils_1.isURType(this._type))throw new errors_1.InvalidTypeError}static fromBuffer(buf){return new UR(cbor_1.cborEncode(buf))}static from(value,encoding){return UR.fromBuffer(Buffer.from(value,encoding))}decodeCBOR(){return cbor_1.cborDecode(this._cborPayload)}get type(){return this._type}get cbor(){return this._cborPayload}equals(ur2){return this.type===ur2.type&&this.cbor.equals(ur2.cbor)}}exports.default=UR},"./node_modules/@ngraveio/bc-ur/dist/urDecoder.js":function(__unused_webpack_module,exports,__webpack_require__){"use strict";var Buffer=__webpack_require__("./node_modules/buffer/index.js").Buffer,__importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0});let fountainDecoder_1=__importDefault(__webpack_require__("./node_modules/@ngraveio/bc-ur/dist/fountainDecoder.js")),bytewords_1=__importDefault(__webpack_require__("./node_modules/@ngraveio/bc-ur/dist/bytewords.js")),assert_1=__importDefault(__webpack_require__("./node_modules/assert/build/assert.js")),utils_1=__webpack_require__("./node_modules/@ngraveio/bc-ur/dist/utils.js"),errors_1=__webpack_require__("./node_modules/@ngraveio/bc-ur/dist/errors.js"),ur_1=__importDefault(__webpack_require__("./node_modules/@ngraveio/bc-ur/dist/ur.js")),fountainEncoder_1=__webpack_require__("./node_modules/@ngraveio/bc-ur/dist/fountainEncoder.js");class URDecoder{constructor(fountainDecoder=new fountainDecoder_1.default,type="bytes"){this.fountainDecoder=fountainDecoder,this.type=type,assert_1.default(utils_1.isURType(type),"Invalid UR type"),this.expected_type=""}static decodeBody(type,message){let cbor=bytewords_1.default.decode(message,bytewords_1.default.STYLES.MINIMAL);return new ur_1.default(Buffer.from(cbor,"hex"),type)}validatePart(type){return this.expected_type?this.expected_type===type:!!utils_1.isURType(type)&&(this.expected_type=type,!0)}static decode(message){let[type,components]=this.parse(message);if(0===components.length)throw new errors_1.InvalidPathLengthError;let body=components[0];return URDecoder.decodeBody(type,body)}static parse(message){let lowercase=message.toLowerCase();if("ur:"!==lowercase.slice(0,3))throw new errors_1.InvalidSchemeError;let components=lowercase.slice(3).split("/"),type=components[0];if(components.length<2)throw new errors_1.InvalidPathLengthError;if(!utils_1.isURType(type))throw new errors_1.InvalidTypeError;return[type,components.slice(1)]}static parseSequenceComponent(s){let components=s.split("-");if(2!==components.length)throw new errors_1.InvalidSequenceComponentError;let seqNum=utils_1.toUint32(Number(components[0])),seqLength=Number(components[1]);if(seqNum<1||seqLength<1)throw new errors_1.InvalidSequenceComponentError;return[seqNum,seqLength]}receivePart(s){if(void 0!==this.result)return!1;let[type,components]=URDecoder.parse(s);if(!this.validatePart(type))return!1;if(1===components.length)return this.result=URDecoder.decodeBody(type,components[0]),!0;if(2!==components.length)throw new errors_1.InvalidPathLengthError;let[seq,fragment]=components,[seqNum,seqLength]=URDecoder.parseSequenceComponent(seq),cbor=bytewords_1.default.decode(fragment,bytewords_1.default.STYLES.MINIMAL),part=fountainEncoder_1.FountainEncoderPart.fromCBOR(cbor);return!!(seqNum===part.seqNum&&seqLength===part.seqLength&&this.fountainDecoder.receivePart(part))&&(this.fountainDecoder.isSuccess()?this.result=new ur_1.default(this.fountainDecoder.resultMessage(),type):this.fountainDecoder.isFailure()&&(this.error=new errors_1.InvalidSchemeError),!0)}resultUR(){return this.result?this.result:new ur_1.default(Buffer.from([]))}isComplete(){return this.result&&this.result.cbor.length>0}isSuccess(){return!this.error&&this.isComplete()}isError(){return void 0!==this.error}resultError(){return this.error?this.error.message:""}expectedPartCount(){return this.fountainDecoder.expectedPartCount()}expectedPartIndexes(){return this.fountainDecoder.getExpectedPartIndexes()}receivedPartIndexes(){return this.fountainDecoder.getReceivedPartIndexes()}lastPartIndexes(){return this.fountainDecoder.getLastPartIndexes()}estimatedPercentComplete(){return this.fountainDecoder.estimatedPercentComplete()}getProgress(){return this.fountainDecoder.getProgress()}}exports.default=URDecoder},"./node_modules/@ngraveio/bc-ur/dist/urEncoder.js":function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0});let fountainEncoder_1=__importDefault(__webpack_require__("./node_modules/@ngraveio/bc-ur/dist/fountainEncoder.js")),bytewords_1=__importDefault(__webpack_require__("./node_modules/@ngraveio/bc-ur/dist/bytewords.js"));class UREncoder{constructor(_ur,maxFragmentLength,firstSeqNum,minFragmentLength){this.ur=_ur,this.fountainEncoder=new fountainEncoder_1.default(_ur.cbor,maxFragmentLength,firstSeqNum,minFragmentLength)}get fragmentsLength(){return this.fountainEncoder.fragmentsLength}get fragments(){return this.fountainEncoder.fragments}get messageLength(){return this.fountainEncoder.messageLength}get cbor(){return this.ur.cbor}encodeWhole(){return[...Array(this.fragmentsLength)].map(()=>this.nextPart())}nextPart(){let part=this.fountainEncoder.nextPart();return this.fountainEncoder.isSinglePart()?UREncoder.encodeSinglePart(this.ur):UREncoder.encodePart(this.ur.type,part)}static encodeUri(scheme,pathComponents){return[scheme,pathComponents.join("/")].join(":")}static encodeUR(pathComponents){return UREncoder.encodeUri("ur",pathComponents)}static encodePart(type,part){let seq=`${part.seqNum}-${part.seqLength}`,body=bytewords_1.default.encode(part.cbor().toString("hex"),bytewords_1.default.STYLES.MINIMAL);return UREncoder.encodeUR([type,seq,body])}static encodeSinglePart(ur){let body=bytewords_1.default.encode(ur.cbor.toString("hex"),bytewords_1.default.STYLES.MINIMAL);return UREncoder.encodeUR([ur.type,body])}}exports.default=UREncoder},"./node_modules/@ngraveio/bc-ur/dist/utils.js":function(__unused_webpack_module,exports,__webpack_require__){"use strict";var Buffer=__webpack_require__("./node_modules/buffer/index.js").Buffer,__importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.bufferXOR=exports.setDifference=exports.arrayContains=exports.arraysEqual=exports.hasPrefix=exports.isURType=exports.intToBytes=exports.toUint32=exports.getCRCHex=exports.getCRC=exports.split=exports.partition=exports.sha256Hash=void 0;let sha_js_1=__importDefault(__webpack_require__("./node_modules/sha.js/index.js")),crc_1=__webpack_require__("./node_modules/crc/index.js");exports.sha256Hash=data=>sha_js_1.default("sha256").update(data).digest(),exports.partition=(s,n)=>s.match(RegExp(".{1,"+n+"}","g"))||[s],exports.split=(s,length)=>[s.slice(0,-length),s.slice(-length)],exports.getCRC=message=>crc_1.crc32(message),exports.getCRCHex=message=>crc_1.crc32(message).toString(16).padStart(8,"0"),exports.toUint32=number=>number>>>0,exports.intToBytes=num=>{let arr=new ArrayBuffer(4);return new DataView(arr).setUint32(0,num,!1),Buffer.from(arr)},exports.isURType=type=>type.split("").every((_,index)=>{let c=type.charCodeAt(index);return 97<=c&&c<=122||48<=c&&c<=57||45===c}),exports.hasPrefix=(s,prefix)=>0===s.indexOf(prefix),exports.arraysEqual=(ar1,ar2)=>ar1.length===ar2.length&&ar1.every(el=>ar2.includes(el)),exports.arrayContains=(ar1,ar2)=>ar2.every(v=>ar1.includes(v)),exports.setDifference=(ar1,ar2)=>ar1.filter(x=>0>ar2.indexOf(x)),exports.bufferXOR=(a,b)=>{let length=Math.max(a.length,b.length),buffer=Buffer.allocUnsafe(length);for(let i=0;i<length;++i)buffer[i]=a[i]^b[i];return buffer}},"./node_modules/@ngraveio/bc-ur/dist/xoshiro.js":function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0});let utils_1=__webpack_require__("./node_modules/@ngraveio/bc-ur/dist/utils.js"),bignumber_js_1=__importDefault(__webpack_require__("./node_modules/@ngraveio/bc-ur/node_modules/bignumber.js/bignumber.js")),jsbi_1=__importDefault(__webpack_require__("./node_modules/jsbi/dist/jsbi-umd.js")),rotl=(x,k)=>jsbi_1.default.bitwiseXor(jsbi_1.default.asUintN(64,jsbi_1.default.leftShift(x,jsbi_1.default.BigInt(k))),jsbi_1.default.BigInt(jsbi_1.default.asUintN(64,jsbi_1.default.signedRightShift(x,jsbi_1.default.subtract(jsbi_1.default.BigInt(64),jsbi_1.default.BigInt(k))))));exports.default=class{constructor(seed){this.next=()=>new bignumber_js_1.default(this.roll().toString()),this.nextDouble=()=>new bignumber_js_1.default(this.roll().toString()).div(18446744073709552e3),this.nextInt=(low,high)=>Math.floor(this.nextDouble().toNumber()*(high-low+1)+low),this.nextByte=()=>this.nextInt(0,255),this.nextData=count=>[...Array(count)].map(()=>this.nextByte());let digest=utils_1.sha256Hash(seed);this.s=[jsbi_1.default.BigInt(0),jsbi_1.default.BigInt(0),jsbi_1.default.BigInt(0),jsbi_1.default.BigInt(0)],this.setS(digest)}setS(digest){for(let i=0;i<4;i++){let o=8*i,v=jsbi_1.default.BigInt(0);for(let n=0;n<8;n++)v=jsbi_1.default.asUintN(64,jsbi_1.default.leftShift(v,jsbi_1.default.BigInt(8))),v=jsbi_1.default.asUintN(64,jsbi_1.default.bitwiseOr(v,jsbi_1.default.BigInt(digest[o+n])));this.s[i]=jsbi_1.default.asUintN(64,v)}}roll(){let result=jsbi_1.default.asUintN(64,jsbi_1.default.multiply(rotl(jsbi_1.default.asUintN(64,jsbi_1.default.multiply(this.s[1],jsbi_1.default.BigInt(5))),7),jsbi_1.default.BigInt(9))),t=jsbi_1.default.asUintN(64,jsbi_1.default.leftShift(this.s[1],jsbi_1.default.BigInt(17)));return this.s[2]=jsbi_1.default.asUintN(64,jsbi_1.default.bitwiseXor(this.s[2],jsbi_1.default.BigInt(this.s[0]))),this.s[3]=jsbi_1.default.asUintN(64,jsbi_1.default.bitwiseXor(this.s[3],jsbi_1.default.BigInt(this.s[1]))),this.s[1]=jsbi_1.default.asUintN(64,jsbi_1.default.bitwiseXor(this.s[1],jsbi_1.default.BigInt(this.s[2]))),this.s[0]=jsbi_1.default.asUintN(64,jsbi_1.default.bitwiseXor(this.s[0],jsbi_1.default.BigInt(this.s[3]))),this.s[2]=jsbi_1.default.asUintN(64,jsbi_1.default.bitwiseXor(this.s[2],jsbi_1.default.BigInt(t))),this.s[3]=jsbi_1.default.asUintN(64,rotl(this.s[3],45)),result}}},"./node_modules/@ngraveio/bc-ur/node_modules/bignumber.js/bignumber.js":function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_RESULT__;!function(globalObject){"use strict";var BigNumber,isNumeric=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,mathceil=Math.ceil,mathfloor=Math.floor,bignumberError="[BigNumber Error] ",tooManyDigits=bignumberError+"Number primitive has more than 15 significant digits: ",POWS_TEN=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13];function clone(configObject){var random53bitInt,basePrefix,dotAfter,dotBefore,isInfinityOrNaN,whitespaceOrPlus,div,convertBase,parseNumeric,P=BigNumber.prototype={constructor:BigNumber,toString:null,valueOf:null},ONE=new BigNumber(1),DECIMAL_PLACES=20,ROUNDING_MODE=4,TO_EXP_NEG=-7,TO_EXP_POS=21,MIN_EXP=-1e7,MAX_EXP=1e7,CRYPTO=!1,MODULO_MODE=1,POW_PRECISION=0,FORMAT={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},ALPHABET="0123456789abcdefghijklmnopqrstuvwxyz",alphabetHasNormalDecimalDigits=!0;function BigNumber(v,b){var alphabet,c,caseChanged,e,i,isNum,len,str,x=this;if(!(x instanceof BigNumber))return new BigNumber(v,b);if(null==b){if(v&&!0===v._isBigNumber){x.s=v.s,!v.c||v.e>MAX_EXP?x.c=x.e=null:v.e<MIN_EXP?x.c=[x.e=0]:(x.e=v.e,x.c=v.c.slice());return}if((isNum="number"==typeof v)&&0*v==0){if(x.s=1/v<0?(v=-v,-1):1,v===~~v){for(e=0,i=v;i>=10;i/=10,e++);e>MAX_EXP?x.c=x.e=null:(x.e=e,x.c=[v]);return}str=String(v)}else{if(!isNumeric.test(str=String(v)))return parseNumeric(x,str,isNum);x.s=45==str.charCodeAt(0)?(str=str.slice(1),-1):1}(e=str.indexOf("."))>-1&&(str=str.replace(".","")),(i=str.search(/e/i))>0?(e<0&&(e=i),e+=+str.slice(i+1),str=str.substring(0,i)):e<0&&(e=str.length)}else{if(intCheck(b,2,ALPHABET.length,"Base"),10==b&&alphabetHasNormalDecimalDigits)return round(x=new BigNumber(v),DECIMAL_PLACES+x.e+1,ROUNDING_MODE);if(str=String(v),isNum="number"==typeof v){if(0*v!=0)return parseNumeric(x,str,isNum,b);if(x.s=1/v<0?(str=str.slice(1),-1):1,BigNumber.DEBUG&&str.replace(/^0\.0*|\./,"").length>15)throw Error(tooManyDigits+v)}else x.s=45===str.charCodeAt(0)?(str=str.slice(1),-1):1;for(alphabet=ALPHABET.slice(0,b),e=i=0,len=str.length;i<len;i++)if(0>alphabet.indexOf(c=str.charAt(i))){if("."==c){if(i>e){e=len;continue}}else if(!caseChanged&&(str==str.toUpperCase()&&(str=str.toLowerCase())||str==str.toLowerCase()&&(str=str.toUpperCase()))){caseChanged=!0,i=-1,e=0;continue}return parseNumeric(x,String(v),isNum,b)}isNum=!1,(e=(str=convertBase(str,b,10,x.s)).indexOf("."))>-1?str=str.replace(".",""):e=str.length}for(i=0;48===str.charCodeAt(i);i++);for(len=str.length;48===str.charCodeAt(--len););if(str=str.slice(i,++len)){if(len-=i,isNum&&BigNumber.DEBUG&&len>15&&(v>9007199254740991||v!==mathfloor(v)))throw Error(tooManyDigits+x.s*v);if((e=e-i-1)>MAX_EXP)x.c=x.e=null;else if(e<MIN_EXP)x.c=[x.e=0];else{if(x.e=e,x.c=[],i=(e+1)%14,e<0&&(i+=14),i<len){for(i&&x.c.push(+str.slice(0,i)),len-=14;i<len;)x.c.push(+str.slice(i,i+=14));i=14-(str=str.slice(i)).length}else i-=len;for(;i--;str+="0");x.c.push(+str)}}else x.c=[x.e=0]}function format(n,i,rm,id){var c0,e,ne,len,str;if(null==rm?rm=ROUNDING_MODE:intCheck(rm,0,8),!n.c)return n.toString();if(c0=n.c[0],ne=n.e,null==i)str=coeffToString(n.c),str=1==id||2==id&&(ne<=TO_EXP_NEG||ne>=TO_EXP_POS)?toExponential(str,ne):toFixedPoint(str,ne,"0");else if(e=(n=round(new BigNumber(n),i,rm)).e,len=(str=coeffToString(n.c)).length,1==id||2==id&&(i<=e||e<=TO_EXP_NEG)){for(;len<i;str+="0",len++);str=toExponential(str,e)}else if(i-=ne,str=toFixedPoint(str,e,"0"),e+1>len){if(--i>0)for(str+=".";i--;str+="0");}else if((i+=e-len)>0)for(e+1==len&&(str+=".");i--;str+="0");return n.s<0&&c0?"-"+str:str}function maxOrMin(args,n){for(var k,y,i=1,x=new BigNumber(args[0]);i<args.length;i++)(y=new BigNumber(args[i])).s&&(k=compare(x,y))!==n&&(0!==k||x.s!==n)||(x=y);return x}function normalise(n,c,e){for(var i=1,j=c.length;!c[--j];c.pop());for(j=c[0];j>=10;j/=10,i++);return(e=i+14*e-1)>MAX_EXP?n.c=n.e=null:e<MIN_EXP?n.c=[n.e=0]:(n.e=e,n.c=c),n}function round(x,sd,rm,r){var d,i,j,k,n,ni,rd,xc=x.c;if(xc){out:{for(d=1,k=xc[0];k>=10;k/=10,d++);if((i=sd-d)<0)i+=14,j=sd,rd=mathfloor((n=xc[ni=0])/POWS_TEN[d-j-1]%10);else if((ni=mathceil((i+1)/14))>=xc.length){if(r){for(;xc.length<=ni;xc.push(0));n=rd=0,d=1,i%=14,j=i-14+1}else break out}else{for(d=1,n=k=xc[ni];k>=10;k/=10,d++);i%=14,rd=(j=i-14+d)<0?0:mathfloor(n/POWS_TEN[d-j-1]%10)}if(r=r||sd<0||null!=xc[ni+1]||(j<0?n:n%POWS_TEN[d-j-1]),r=rm<4?(rd||r)&&(0==rm||rm==(x.s<0?3:2)):rd>5||5==rd&&(4==rm||r||6==rm&&(i>0?j>0?n/POWS_TEN[d-j]:0:xc[ni-1])%10&1||rm==(x.s<0?8:7)),sd<1||!xc[0])return xc.length=0,r?(sd-=x.e+1,xc[0]=POWS_TEN[(14-sd%14)%14],x.e=-sd||0):xc[0]=x.e=0,x;if(0==i?(xc.length=ni,k=1,ni--):(xc.length=ni+1,k=POWS_TEN[14-i],xc[ni]=j>0?mathfloor(n/POWS_TEN[d-j]%POWS_TEN[j])*k:0),r)for(;;){if(0==ni){for(i=1,j=xc[0];j>=10;j/=10,i++);for(j=xc[0]+=k,k=1;j>=10;j/=10,k++);i!=k&&(x.e++,1e14==xc[0]&&(xc[0]=1));break}if(xc[ni]+=k,1e14!=xc[ni])break;xc[ni--]=0,k=1}for(i=xc.length;0===xc[--i];xc.pop());}x.e>MAX_EXP?x.c=x.e=null:x.e<MIN_EXP&&(x.c=[x.e=0])}return x}function valueOf(n){var str,e=n.e;return null===e?n.toString():(str=coeffToString(n.c),str=e<=TO_EXP_NEG||e>=TO_EXP_POS?toExponential(str,e):toFixedPoint(str,e,"0"),n.s<0?"-"+str:str)}return BigNumber.clone=clone,BigNumber.ROUND_UP=0,BigNumber.ROUND_DOWN=1,BigNumber.ROUND_CEIL=2,BigNumber.ROUND_FLOOR=3,BigNumber.ROUND_HALF_UP=4,BigNumber.ROUND_HALF_DOWN=5,BigNumber.ROUND_HALF_EVEN=6,BigNumber.ROUND_HALF_CEIL=7,BigNumber.ROUND_HALF_FLOOR=8,BigNumber.EUCLID=9,BigNumber.config=BigNumber.set=function(obj){var p,v;if(null!=obj){if("object"==typeof obj){if(obj.hasOwnProperty(p="DECIMAL_PLACES")&&(intCheck(v=obj[p],0,1e9,p),DECIMAL_PLACES=v),obj.hasOwnProperty(p="ROUNDING_MODE")&&(intCheck(v=obj[p],0,8,p),ROUNDING_MODE=v),obj.hasOwnProperty(p="EXPONENTIAL_AT")&&((v=obj[p])&&v.pop?(intCheck(v[0],-1e9,0,p),intCheck(v[1],0,1e9,p),TO_EXP_NEG=v[0],TO_EXP_POS=v[1]):(intCheck(v,-1e9,1e9,p),TO_EXP_NEG=-(TO_EXP_POS=v<0?-v:v))),obj.hasOwnProperty(p="RANGE")){if((v=obj[p])&&v.pop)intCheck(v[0],-1e9,-1,p),intCheck(v[1],1,1e9,p),MIN_EXP=v[0],MAX_EXP=v[1];else if(intCheck(v,-1e9,1e9,p),v)MIN_EXP=-(MAX_EXP=v<0?-v:v);else throw Error(bignumberError+p+" cannot be zero: "+v)}if(obj.hasOwnProperty(p="CRYPTO")){if(!!(v=obj[p])===v){if(v){if("undefined"!=typeof crypto&&crypto&&(crypto.getRandomValues||crypto.randomBytes))CRYPTO=v;else throw CRYPTO=!v,Error(bignumberError+"crypto unavailable")}else CRYPTO=v}else throw Error(bignumberError+p+" not true or false: "+v)}if(obj.hasOwnProperty(p="MODULO_MODE")&&(intCheck(v=obj[p],0,9,p),MODULO_MODE=v),obj.hasOwnProperty(p="POW_PRECISION")&&(intCheck(v=obj[p],0,1e9,p),POW_PRECISION=v),obj.hasOwnProperty(p="FORMAT")){if("object"==typeof(v=obj[p]))FORMAT=v;else throw Error(bignumberError+p+" not an object: "+v)}if(obj.hasOwnProperty(p="ALPHABET")){if("string"!=typeof(v=obj[p])||/^.?$|[+\-.\s]|(.).*\1/.test(v))throw Error(bignumberError+p+" invalid: "+v);alphabetHasNormalDecimalDigits="0123456789"==v.slice(0,10),ALPHABET=v}}else throw Error(bignumberError+"Object expected: "+obj)}return{DECIMAL_PLACES:DECIMAL_PLACES,ROUNDING_MODE:ROUNDING_MODE,EXPONENTIAL_AT:[TO_EXP_NEG,TO_EXP_POS],RANGE:[MIN_EXP,MAX_EXP],CRYPTO:CRYPTO,MODULO_MODE:MODULO_MODE,POW_PRECISION:POW_PRECISION,FORMAT:FORMAT,ALPHABET:ALPHABET}},BigNumber.isBigNumber=function(v){if(!v||!0!==v._isBigNumber)return!1;if(!BigNumber.DEBUG)return!0;var i,n,c=v.c,e=v.e,s=v.s;out:if("[object Array]"==({}).toString.call(c)){if((1===s||-1===s)&&e>=-1e9&&e<=1e9&&e===mathfloor(e)){if(0===c[0]){if(0===e&&1===c.length)return!0;break out}if((i=(e+1)%14)<1&&(i+=14),String(c[0]).length==i){for(i=0;i<c.length;i++)if((n=c[i])<0||n>=1e14||n!==mathfloor(n))break out;if(0!==n)return!0}}}else if(null===c&&null===e&&(null===s||1===s||-1===s))return!0;throw Error(bignumberError+"Invalid BigNumber: "+v)},BigNumber.maximum=BigNumber.max=function(){return maxOrMin(arguments,-1)},BigNumber.minimum=BigNumber.min=function(){return maxOrMin(arguments,1)},BigNumber.random=(random53bitInt=9007199254740992*Math.random()&2097151?function(){return mathfloor(9007199254740992*Math.random())}:function(){return(1073741824*Math.random()|0)*8388608+(8388608*Math.random()|0)},function(dp){var a,b,e,k,v,i=0,c=[],rand=new BigNumber(ONE);if(null==dp?dp=DECIMAL_PLACES:intCheck(dp,0,1e9),k=mathceil(dp/14),CRYPTO){if(crypto.getRandomValues){for(a=crypto.getRandomValues(new Uint32Array(k*=2));i<k;)(v=131072*a[i]+(a[i+1]>>>11))>=9e15?(b=crypto.getRandomValues(new Uint32Array(2)),a[i]=b[0],a[i+1]=b[1]):(c.push(v%1e14),i+=2);i=k/2}else if(crypto.randomBytes){for(a=crypto.randomBytes(k*=7);i<k;)(v=(31&a[i])*281474976710656+1099511627776*a[i+1]+4294967296*a[i+2]+16777216*a[i+3]+(a[i+4]<<16)+(a[i+5]<<8)+a[i+6])>=9e15?crypto.randomBytes(7).copy(a,i):(c.push(v%1e14),i+=7);i=k/7}else throw CRYPTO=!1,Error(bignumberError+"crypto unavailable")}if(!CRYPTO)for(;i<k;)(v=random53bitInt())<9e15&&(c[i++]=v%1e14);for(k=c[--i],dp%=14,k&&dp&&(v=POWS_TEN[14-dp],c[i]=mathfloor(k/v)*v);0===c[i];c.pop(),i--);if(i<0)c=[e=0];else{for(e=-1;0===c[0];c.splice(0,1),e-=14);for(i=1,v=c[0];v>=10;v/=10,i++);i<14&&(e-=14-i)}return rand.e=e,rand.c=c,rand}),BigNumber.sum=function(){for(var i=1,args=arguments,sum=new BigNumber(args[0]);i<args.length;)sum=sum.plus(args[i++]);return sum},convertBase=function(){var decimal="0123456789";function toBaseOut(str,baseIn,baseOut,alphabet){for(var j,arrL,arr=[0],i=0,len=str.length;i<len;){for(arrL=arr.length;arrL--;arr[arrL]*=baseIn);for(arr[0]+=alphabet.indexOf(str.charAt(i++)),j=0;j<arr.length;j++)arr[j]>baseOut-1&&(null==arr[j+1]&&(arr[j+1]=0),arr[j+1]+=arr[j]/baseOut|0,arr[j]%=baseOut)}return arr.reverse()}return function(str,baseIn,baseOut,sign,callerIsToString){var alphabet,d,e,k,r,x,xc,y,i=str.indexOf("."),dp=DECIMAL_PLACES,rm=ROUNDING_MODE;for(i>=0&&(k=POW_PRECISION,POW_PRECISION=0,str=str.replace(".",""),x=(y=new BigNumber(baseIn)).pow(str.length-i),POW_PRECISION=k,y.c=toBaseOut(toFixedPoint(coeffToString(x.c),x.e,"0"),10,baseOut,decimal),y.e=y.c.length),e=k=(xc=toBaseOut(str,baseIn,baseOut,callerIsToString?(alphabet=ALPHABET,decimal):(alphabet=decimal,ALPHABET))).length;0==xc[--k];xc.pop());if(!xc[0])return alphabet.charAt(0);if(i<0?--e:(x.c=xc,x.e=e,x.s=sign,xc=(x=div(x,y,dp,rm,baseOut)).c,r=x.r,e=x.e),i=xc[d=e+dp+1],k=baseOut/2,r=r||d<0||null!=xc[d+1],r=rm<4?(null!=i||r)&&(0==rm||rm==(x.s<0?3:2)):i>k||i==k&&(4==rm||r||6==rm&&1&xc[d-1]||rm==(x.s<0?8:7)),d<1||!xc[0])str=r?toFixedPoint(alphabet.charAt(1),-dp,alphabet.charAt(0)):alphabet.charAt(0);else{if(xc.length=d,r)for(--baseOut;++xc[--d]>baseOut;)xc[d]=0,d||(++e,xc=[1].concat(xc));for(k=xc.length;!xc[--k];);for(i=0,str="";i<=k;str+=alphabet.charAt(xc[i++]));str=toFixedPoint(str,e,alphabet.charAt(0))}return str}}(),div=function(){function multiply(x,k,base){var m,temp,xlo,xhi,carry=0,i=x.length,klo=k%1e7,khi=k/1e7|0;for(x=x.slice();i--;)m=khi*(xlo=x[i]%1e7)+(xhi=x[i]/1e7|0)*klo,carry=((temp=klo*xlo+m%1e7*1e7+carry)/base|0)+(m/1e7|0)+khi*xhi,x[i]=temp%base;return carry&&(x=[carry].concat(x)),x}function compare(a,b,aL,bL){var i,cmp;if(aL!=bL)cmp=aL>bL?1:-1;else for(i=cmp=0;i<aL;i++)if(a[i]!=b[i]){cmp=a[i]>b[i]?1:-1;break}return cmp}function subtract(a,b,aL,base){for(var i=0;aL--;)a[aL]-=i,i=a[aL]<b[aL]?1:0,a[aL]=i*base+a[aL]-b[aL];for(;!a[0]&&a.length>1;a.splice(0,1));}return function(x,y,dp,rm,base){var cmp,e,i,more,n,prod,prodL,q,qc,rem,remL,rem0,xi,xL,yc0,yL,yz,s=x.s==y.s?1:-1,xc=x.c,yc=y.c;if(!xc||!xc[0]||!yc||!yc[0])return new BigNumber(x.s&&y.s&&(xc?!yc||xc[0]!=yc[0]:yc)?xc&&0==xc[0]||!yc?0*s:s/0:NaN);for(qc=(q=new BigNumber(s)).c=[],s=dp+(e=x.e-y.e)+1,base||(base=1e14,e=bitFloor(x.e/14)-bitFloor(y.e/14),s=s/14|0),i=0;yc[i]==(xc[i]||0);i++);if(yc[i]>(xc[i]||0)&&e--,s<0)qc.push(1),more=!0;else{for(xL=xc.length,yL=yc.length,i=0,s+=2,(n=mathfloor(base/(yc[0]+1)))>1&&(yc=multiply(yc,n,base),xc=multiply(xc,n,base),yL=yc.length,xL=xc.length),xi=yL,remL=(rem=xc.slice(0,yL)).length;remL<yL;rem[remL++]=0);yz=[0].concat(yz=yc.slice()),yc0=yc[0],yc[1]>=base/2&&yc0++;do{if(n=0,(cmp=compare(yc,rem,yL,remL))<0){if(rem0=rem[0],yL!=remL&&(rem0=rem0*base+(rem[1]||0)),(n=mathfloor(rem0/yc0))>1)for(n>=base&&(n=base-1),prodL=(prod=multiply(yc,n,base)).length,remL=rem.length;1==compare(prod,rem,prodL,remL);)n--,subtract(prod,yL<prodL?yz:yc,prodL,base),prodL=prod.length,cmp=1;else 0==n&&(cmp=n=1),prodL=(prod=yc.slice()).length;if(prodL<remL&&(prod=[0].concat(prod)),subtract(rem,prod,remL,base),remL=rem.length,-1==cmp)for(;1>compare(yc,rem,yL,remL);)n++,subtract(rem,yL<remL?yz:yc,remL,base),remL=rem.length}else 0===cmp&&(n++,rem=[0]);qc[i++]=n,rem[0]?rem[remL++]=xc[xi]||0:(rem=[xc[xi]],remL=1)}while((xi++<xL||null!=rem[0])&&s--)more=null!=rem[0],qc[0]||qc.splice(0,1)}if(1e14==base){for(i=1,s=qc[0];s>=10;s/=10,i++);round(q,dp+(q.e=i+14*e-1)+1,rm,more)}else q.e=e,q.r=+more;return q}}(),basePrefix=/^(-?)0([xbo])(?=\w[\w.]*$)/i,dotAfter=/^([^.]+)\.$/,dotBefore=/^\.([^.]+)$/,isInfinityOrNaN=/^-?(Infinity|NaN)$/,whitespaceOrPlus=/^\s*\+(?=[\w.])|^\s+|\s+$/g,parseNumeric=function(x,str,isNum,b){var base,s=isNum?str:str.replace(whitespaceOrPlus,"");if(isInfinityOrNaN.test(s))x.s=isNaN(s)?null:s<0?-1:1;else{if(!isNum&&(s=s.replace(basePrefix,function(m,p1,p2){return base="x"==(p2=p2.toLowerCase())?16:"b"==p2?2:8,b&&b!=base?m:p1}),b&&(base=b,s=s.replace(dotAfter,"$1").replace(dotBefore,"0.$1")),str!=s))return new BigNumber(s,base);if(BigNumber.DEBUG)throw Error(bignumberError+"Not a"+(b?" base "+b:"")+" number: "+str);x.s=null}x.c=x.e=null},P.absoluteValue=P.abs=function(){var x=new BigNumber(this);return x.s<0&&(x.s=1),x},P.comparedTo=function(y,b){return compare(this,new BigNumber(y,b))},P.decimalPlaces=P.dp=function(dp,rm){var c,n,v;if(null!=dp)return intCheck(dp,0,1e9),null==rm?rm=ROUNDING_MODE:intCheck(rm,0,8),round(new BigNumber(this),dp+this.e+1,rm);if(!(c=this.c))return null;if(n=((v=c.length-1)-bitFloor(this.e/14))*14,v=c[v])for(;v%10==0;v/=10,n--);return n<0&&(n=0),n},P.dividedBy=P.div=function(y,b){return div(this,new BigNumber(y,b),DECIMAL_PLACES,ROUNDING_MODE)},P.dividedToIntegerBy=P.idiv=function(y,b){return div(this,new BigNumber(y,b),0,1)},P.exponentiatedBy=P.pow=function(n,m){var half,isModExp,i,k,more,nIsBig,nIsNeg,nIsOdd,y,x=this;if((n=new BigNumber(n)).c&&!n.isInteger())throw Error(bignumberError+"Exponent not an integer: "+valueOf(n));if(null!=m&&(m=new BigNumber(m)),nIsBig=n.e>14,!x.c||!x.c[0]||1==x.c[0]&&!x.e&&1==x.c.length||!n.c||!n.c[0])return y=new BigNumber(Math.pow(+valueOf(x),nIsBig?n.s*(2-isOdd(n)):+valueOf(n))),m?y.mod(m):y;if(nIsNeg=n.s<0,m){if(m.c?!m.c[0]:!m.s)return new BigNumber(NaN);(isModExp=!nIsNeg&&x.isInteger()&&m.isInteger())&&(x=x.mod(m))}else{if(n.e>9&&(x.e>0||x.e<-1||(0==x.e?x.c[0]>1||nIsBig&&x.c[1]>=24e7:x.c[0]<8e13||nIsBig&&x.c[0]<=9999975e7)))return k=x.s<0&&isOdd(n)?-0:0,x.e>-1&&(k=1/k),new BigNumber(nIsNeg?1/k:k);POW_PRECISION&&(k=mathceil(POW_PRECISION/14+2))}for(nIsBig?(half=new BigNumber(.5),nIsNeg&&(n.s=1),nIsOdd=isOdd(n)):nIsOdd=(i=Math.abs(+valueOf(n)))%2,y=new BigNumber(ONE);;){if(nIsOdd){if(!(y=y.times(x)).c)break;k?y.c.length>k&&(y.c.length=k):isModExp&&(y=y.mod(m))}if(i){if(0===(i=mathfloor(i/2)))break;nIsOdd=i%2}else if(round(n=n.times(half),n.e+1,1),n.e>14)nIsOdd=isOdd(n);else{if(0==(i=+valueOf(n)))break;nIsOdd=i%2}x=x.times(x),k?x.c&&x.c.length>k&&(x.c.length=k):isModExp&&(x=x.mod(m))}return isModExp?y:(nIsNeg&&(y=ONE.div(y)),m?y.mod(m):k?round(y,POW_PRECISION,ROUNDING_MODE,more):y)},P.integerValue=function(rm){var n=new BigNumber(this);return null==rm?rm=ROUNDING_MODE:intCheck(rm,0,8),round(n,n.e+1,rm)},P.isEqualTo=P.eq=function(y,b){return 0===compare(this,new BigNumber(y,b))},P.isFinite=function(){return!!this.c},P.isGreaterThan=P.gt=function(y,b){return compare(this,new BigNumber(y,b))>0},P.isGreaterThanOrEqualTo=P.gte=function(y,b){return 1===(b=compare(this,new BigNumber(y,b)))||0===b},P.isInteger=function(){return!!this.c&&bitFloor(this.e/14)>this.c.length-2},P.isLessThan=P.lt=function(y,b){return 0>compare(this,new BigNumber(y,b))},P.isLessThanOrEqualTo=P.lte=function(y,b){return -1===(b=compare(this,new BigNumber(y,b)))||0===b},P.isNaN=function(){return!this.s},P.isNegative=function(){return this.s<0},P.isPositive=function(){return this.s>0},P.isZero=function(){return!!this.c&&0==this.c[0]},P.minus=function(y,b){var i,j,t,xLTy,a=this.s;if(b=(y=new BigNumber(y,b)).s,!a||!b)return new BigNumber(NaN);if(a!=b)return y.s=-b,this.plus(y);var xe=this.e/14,ye=y.e/14,xc=this.c,yc=y.c;if(!xe||!ye){if(!xc||!yc)return xc?(y.s=-b,y):new BigNumber(yc?this:NaN);if(!xc[0]||!yc[0])return yc[0]?(y.s=-b,y):new BigNumber(xc[0]?this:3==ROUNDING_MODE?-0:0)}if(xe=bitFloor(xe),ye=bitFloor(ye),xc=xc.slice(),a=xe-ye){for((xLTy=a<0)?(a=-a,t=xc):(ye=xe,t=yc),t.reverse(),b=a;b--;t.push(0));t.reverse()}else for(j=(xLTy=(a=xc.length)<(b=yc.length))?a:b,a=b=0;b<j;b++)if(xc[b]!=yc[b]){xLTy=xc[b]<yc[b];break}if(xLTy&&(t=xc,xc=yc,yc=t,y.s=-y.s),(b=(j=yc.length)-(i=xc.length))>0)for(;b--;xc[i++]=0);for(b=1e14-1;j>a;){if(xc[--j]<yc[j]){for(i=j;i&&!xc[--i];xc[i]=b);--xc[i],xc[j]+=1e14}xc[j]-=yc[j]}for(;0==xc[0];xc.splice(0,1),--ye);return xc[0]?normalise(y,xc,ye):(y.s=3==ROUNDING_MODE?-1:1,y.c=[y.e=0],y)},P.modulo=P.mod=function(y,b){var q,s;return(y=new BigNumber(y,b),this.c&&y.s&&(!y.c||y.c[0]))?y.c&&(!this.c||this.c[0])?(9==MODULO_MODE?(s=y.s,y.s=1,q=div(this,y,0,3),y.s=s,q.s*=s):q=div(this,y,0,MODULO_MODE),(y=this.minus(q.times(y))).c[0]||1!=MODULO_MODE||(y.s=this.s),y):new BigNumber(this):new BigNumber(NaN)},P.multipliedBy=P.times=function(y,b){var c,e,i,j,k,m,xcL,xlo,xhi,ycL,ylo,yhi,zc,xc=this.c,yc=(y=new BigNumber(y,b)).c;if(!xc||!yc||!xc[0]||!yc[0])return this.s&&y.s&&(!xc||xc[0]||yc)&&(!yc||yc[0]||xc)?(y.s*=this.s,xc&&yc?(y.c=[0],y.e=0):y.c=y.e=null):y.c=y.e=y.s=null,y;for(e=bitFloor(this.e/14)+bitFloor(y.e/14),y.s*=this.s,(xcL=xc.length)<(ycL=yc.length)&&(zc=xc,xc=yc,yc=zc,i=xcL,xcL=ycL,ycL=i),i=xcL+ycL,zc=[];i--;zc.push(0));for(i=ycL;--i>=0;){for(c=0,ylo=yc[i]%1e7,yhi=yc[i]/1e7|0,j=i+(k=xcL);j>i;)m=yhi*(xlo=xc[--k]%1e7)+(xhi=xc[k]/1e7|0)*ylo,c=((xlo=ylo*xlo+m%1e7*1e7+zc[j]+c)/1e14|0)+(m/1e7|0)+yhi*xhi,zc[j--]=xlo%1e14;zc[j]=c}return c?++e:zc.splice(0,1),normalise(y,zc,e)},P.negated=function(){var x=new BigNumber(this);return x.s=-x.s||null,x},P.plus=function(y,b){var t,a=this.s;if(b=(y=new BigNumber(y,b)).s,!a||!b)return new BigNumber(NaN);if(a!=b)return y.s=-b,this.minus(y);var xe=this.e/14,ye=y.e/14,xc=this.c,yc=y.c;if(!xe||!ye){if(!xc||!yc)return new BigNumber(a/0);if(!xc[0]||!yc[0])return yc[0]?y:new BigNumber(xc[0]?this:0*a)}if(xe=bitFloor(xe),ye=bitFloor(ye),xc=xc.slice(),a=xe-ye){for(a>0?(ye=xe,t=yc):(a=-a,t=xc),t.reverse();a--;t.push(0));t.reverse()}for((a=xc.length)-(b=yc.length)<0&&(t=yc,yc=xc,xc=t,b=a),a=0;b;)a=(xc[--b]=xc[b]+yc[b]+a)/1e14|0,xc[b]=1e14===xc[b]?0:xc[b]%1e14;return a&&(xc=[a].concat(xc),++ye),normalise(y,xc,ye)},P.precision=P.sd=function(sd,rm){var c,n,v;if(null!=sd&&!!sd!==sd)return intCheck(sd,1,1e9),null==rm?rm=ROUNDING_MODE:intCheck(rm,0,8),round(new BigNumber(this),sd,rm);if(!(c=this.c))return null;if(n=14*(v=c.length-1)+1,v=c[v]){for(;v%10==0;v/=10,n--);for(v=c[0];v>=10;v/=10,n++);}return sd&&this.e+1>n&&(n=this.e+1),n},P.shiftedBy=function(k){return intCheck(k,-9007199254740991,9007199254740991),this.times("1e"+k)},P.squareRoot=P.sqrt=function(){var m,n,r,rep,t,c=this.c,s=this.s,e=this.e,dp=DECIMAL_PLACES+4,half=new BigNumber("0.5");if(1!==s||!c||!c[0])return new BigNumber(!s||s<0&&(!c||c[0])?NaN:c?this:1/0);if(0==(s=Math.sqrt(+valueOf(this)))||s==1/0?(((n=coeffToString(c)).length+e)%2==0&&(n+="0"),s=Math.sqrt(+n),e=bitFloor((e+1)/2)-(e<0||e%2),r=new BigNumber(n=s==1/0?"5e"+e:(n=s.toExponential()).slice(0,n.indexOf("e")+1)+e)):r=new BigNumber(s+""),r.c[0]){for((s=(e=r.e)+dp)<3&&(s=0);;)if(t=r,r=half.times(t.plus(div(this,t,dp,1))),coeffToString(t.c).slice(0,s)===(n=coeffToString(r.c)).slice(0,s)){if(r.e<e&&--s,"9999"!=(n=n.slice(s-3,s+1))&&(rep||"4999"!=n)){+n&&(+n.slice(1)||"5"!=n.charAt(0))||(round(r,r.e+DECIMAL_PLACES+2,1),m=!r.times(r).eq(this));break}if(!rep&&(round(t,t.e+DECIMAL_PLACES+2,0),t.times(t).eq(this))){r=t;break}dp+=4,s+=4,rep=1}}return round(r,r.e+DECIMAL_PLACES+1,ROUNDING_MODE,m)},P.toExponential=function(dp,rm){return null!=dp&&(intCheck(dp,0,1e9),dp++),format(this,dp,rm,1)},P.toFixed=function(dp,rm){return null!=dp&&(intCheck(dp,0,1e9),dp=dp+this.e+1),format(this,dp,rm)},P.toFormat=function(dp,rm,format){var str;if(null==format)null!=dp&&rm&&"object"==typeof rm?(format=rm,rm=null):dp&&"object"==typeof dp?(format=dp,dp=rm=null):format=FORMAT;else if("object"!=typeof format)throw Error(bignumberError+"Argument not an object: "+format);if(str=this.toFixed(dp,rm),this.c){var i,arr=str.split("."),g1=+format.groupSize,g2=+format.secondaryGroupSize,groupSeparator=format.groupSeparator||"",intPart=arr[0],fractionPart=arr[1],isNeg=this.s<0,intDigits=isNeg?intPart.slice(1):intPart,len=intDigits.length;if(g2&&(i=g1,g1=g2,g2=i,len-=i),g1>0&&len>0){for(i=len%g1||g1,intPart=intDigits.substr(0,i);i<len;i+=g1)intPart+=groupSeparator+intDigits.substr(i,g1);g2>0&&(intPart+=groupSeparator+intDigits.slice(i)),isNeg&&(intPart="-"+intPart)}str=fractionPart?intPart+(format.decimalSeparator||"")+((g2=+format.fractionGroupSize)?fractionPart.replace(RegExp("\\d{"+g2+"}\\B","g"),"$&"+(format.fractionGroupSeparator||"")):fractionPart):intPart}return(format.prefix||"")+str+(format.suffix||"")},P.toFraction=function(md){var d,d0,d1,d2,e,exp,n,n0,n1,q,r,s,xc=this.c;if(null!=md&&(!(n=new BigNumber(md)).isInteger()&&(n.c||1!==n.s)||n.lt(ONE)))throw Error(bignumberError+"Argument "+(n.isInteger()?"out of range: ":"not an integer: ")+valueOf(n));if(!xc)return new BigNumber(this);for(d=new BigNumber(ONE),n1=d0=new BigNumber(ONE),d1=n0=new BigNumber(ONE),s=coeffToString(xc),e=d.e=s.length-this.e-1,d.c[0]=POWS_TEN[(exp=e%14)<0?14+exp:exp],md=!md||n.comparedTo(d)>0?e>0?d:n1:n,exp=MAX_EXP,MAX_EXP=1/0,n=new BigNumber(s),n0.c[0]=0;q=div(n,d,0,1),1!=(d2=d0.plus(q.times(d1))).comparedTo(md);)d0=d1,d1=d2,n1=n0.plus(q.times(d2=n1)),n0=d2,d=n.minus(q.times(d2=d)),n=d2;return d2=div(md.minus(d0),d1,0,1),n0=n0.plus(d2.times(n1)),d0=d0.plus(d2.times(d1)),n0.s=n1.s=this.s,e*=2,r=1>div(n1,d1,e,ROUNDING_MODE).minus(this).abs().comparedTo(div(n0,d0,e,ROUNDING_MODE).minus(this).abs())?[n1,d1]:[n0,d0],MAX_EXP=exp,r},P.toNumber=function(){return+valueOf(this)},P.toPrecision=function(sd,rm){return null!=sd&&intCheck(sd,1,1e9),format(this,sd,rm,2)},P.toString=function(b){var str,n=this,s=n.s,e=n.e;return null===e?s?(str="Infinity",s<0&&(str="-"+str)):str="NaN":(null==b?str=e<=TO_EXP_NEG||e>=TO_EXP_POS?toExponential(coeffToString(n.c),e):toFixedPoint(coeffToString(n.c),e,"0"):10===b&&alphabetHasNormalDecimalDigits?str=toFixedPoint(coeffToString((n=round(new BigNumber(n),DECIMAL_PLACES+e+1,ROUNDING_MODE)).c),n.e,"0"):(intCheck(b,2,ALPHABET.length,"Base"),str=convertBase(toFixedPoint(coeffToString(n.c),e,"0"),10,b,s,!0)),s<0&&n.c[0]&&(str="-"+str)),str},P.valueOf=P.toJSON=function(){return valueOf(this)},P._isBigNumber=!0,null!=configObject&&BigNumber.set(configObject),BigNumber}function bitFloor(n){var i=0|n;return n>0||n===i?i:i-1}function coeffToString(a){for(var s,z,i=1,j=a.length,r=a[0]+"";i<j;){for(z=14-(s=a[i++]+"").length;z--;s="0"+s);r+=s}for(j=r.length;48===r.charCodeAt(--j););return r.slice(0,j+1||1)}function compare(x,y){var a,b,xc=x.c,yc=y.c,i=x.s,j=y.s,k=x.e,l=y.e;if(!i||!j)return null;if(a=xc&&!xc[0],b=yc&&!yc[0],a||b)return a?b?0:-j:i;if(i!=j)return i;if(a=i<0,b=k==l,!xc||!yc)return b?0:!xc^a?1:-1;if(!b)return k>l^a?1:-1;for(i=0,j=(k=xc.length)<(l=yc.length)?k:l;i<j;i++)if(xc[i]!=yc[i])return xc[i]>yc[i]^a?1:-1;return k==l?0:k>l^a?1:-1}function intCheck(n,min,max,name){if(n<min||n>max||n!==mathfloor(n))throw Error(bignumberError+(name||"Argument")+("number"==typeof n?n<min||n>max?" out of range: ":" not an integer: ":" not a primitive number: ")+String(n))}function isOdd(n){var k=n.c.length-1;return bitFloor(n.e/14)==k&&n.c[k]%2!=0}function toExponential(str,e){return(str.length>1?str.charAt(0)+"."+str.slice(1):str)+(e<0?"e":"e+")+e}function toFixedPoint(str,e,z){var len,zs;if(e<0){for(zs=z+".";++e;zs+=z);str=zs+str}else if(len=str.length,++e>len){for(zs=z,e-=len;--e;zs+=z);str+=zs}else e<len&&(str=str.slice(0,e)+"."+str.slice(e));return str}(BigNumber=clone()).default=BigNumber.BigNumber=BigNumber,void 0!==(__WEBPACK_AMD_DEFINE_RESULT__=(function(){return BigNumber}).call(exports,__webpack_require__,exports,module))&&(module.exports=__WEBPACK_AMD_DEFINE_RESULT__)}(0)},"./node_modules/cbor-sync/main.js":function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_FACTORY__,__WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__,Buffer=__webpack_require__("./node_modules/buffer/index.js").Buffer;__WEBPACK_AMD_DEFINE_ARRAY__=[],void 0!==(__WEBPACK_AMD_DEFINE_RESULT__="function"==typeof(__WEBPACK_AMD_DEFINE_FACTORY__=function(){var CBOR=function(){function BinaryHex(hex){this.$hex=hex}BinaryHex.prototype={length:function(){return this.$hex.length/2},toString:function(format){if(!format||"hex"===format||16===format)return this.$hex;if("utf-8"===format){for(var encoded="",i=0;i<this.$hex.length;i+=2)encoded+="%"+this.$hex.substring(i,i+2);return decodeURIComponent(encoded)}if("latin"===format){for(var encoded=[],i=0;i<this.$hex.length;i+=2)encoded.push(parseInt(this.$hex.substring(i,i+2),16));return String.fromCharCode.apply(String,encoded)}throw Error("Unrecognised format: "+format)}},BinaryHex.fromLatinString=function(latinString){for(var hex="",i=0;i<latinString.length;i++){var pair=latinString.charCodeAt(i).toString(16);1===pair.length&&(pair="0"+pair),hex+=pair}return new BinaryHex(hex)},BinaryHex.fromUtf8String=function(utf8String){for(var encoded=encodeURIComponent(utf8String),hex="",i=0;i<encoded.length;i++)if("%"===encoded.charAt(i))hex+=encoded.substring(i+1,i+3),i+=2;else{var hexPair=encoded.charCodeAt(i).toString(16);hexPair.length<2&&(hexPair="0"+hexPair),hex+=hexPair}return new BinaryHex(hex)};var semanticEncoders=[],semanticDecoders={},notImplemented=function(label){return function(){throw Error(label+" not implemented")}};function Reader(){}function Writer(){}function readHeaderRaw(reader){var firstByte=reader.readByte();return{type:firstByte>>5,value:31&firstByte}}function valueFromHeader(header,reader){var value=header.value;return value<24?value:24==value?reader.readByte():25==value?reader.readUint16():26==value?reader.readUint32():27==value?reader.readUint64():31==value?null:void notImplemented("Additional info: "+value)()}function writeHeaderRaw(type,value,writer){writer.writeByte(type<<5|value)}function writeHeader(type,value,writer){var firstByte=type<<5;value<24?writer.writeByte(firstByte|value):value<256?(writer.writeByte(24|firstByte),writer.writeByte(value)):value<65536?(writer.writeByte(25|firstByte),writer.writeUint16(value)):value<4294967296?(writer.writeByte(26|firstByte),writer.writeUint32(value)):(writer.writeByte(27|firstByte),writer.writeUint64(value))}Reader.prototype={peekByte:notImplemented("peekByte"),readByte:notImplemented("readByte"),readChunk:notImplemented("readChunk"),readFloat16:function(){var half=this.readUint16(),exponent=(32767&half)>>10,mantissa=1023&half,negative=32768½if(31===exponent)return 0===mantissa?negative?-1/0:1/0:NaN;var magnitude=exponent?Math.pow(2,exponent-25)*(1024+mantissa):5960464477539063e-23*mantissa;return negative?-magnitude:magnitude},readFloat32:function(){var intValue=this.readUint32(),exponent=(2147483647&intValue)>>23,mantissa=8388607&intValue,negative=2147483648&intValue;if(255===exponent)return 0===mantissa?negative?-1/0:1/0:NaN;var magnitude=exponent?Math.pow(2,exponent-23-127)*(8388608+mantissa):1401298464324817e-60*mantissa;return negative?-magnitude:magnitude},readFloat64:function(){var int1=this.readUint32(),int2=this.readUint32(),exponent=int1>>20&2047,mantissa=(1048575&int1)*4294967296+int2,negative=2147483648&int1;if(2047===exponent)return 0===mantissa?negative?-1/0:1/0:NaN;var magnitude=exponent?Math.pow(2,exponent-52-1023)*(4503599627370496+mantissa):5e-324*mantissa;return negative?-magnitude:magnitude},readUint16:function(){return 256*this.readByte()+this.readByte()},readUint32:function(){return 65536*this.readUint16()+this.readUint16()},readUint64:function(){return 4294967296*this.readUint32()+this.readUint32()}},Writer.prototype={writeByte:notImplemented("writeByte"),result:notImplemented("result"),writeFloat16:notImplemented("writeFloat16"),writeFloat32:notImplemented("writeFloat32"),writeFloat64:notImplemented("writeFloat64"),writeUint16:function(value){this.writeByte(value>>8&255),this.writeByte(255&value)},writeUint32:function(value){this.writeUint16(value>>16&65535),this.writeUint16(65535&value)},writeUint64:function(value){if(value>=9007199254740992||value<=-9007199254740992)throw Error("Cannot encode Uint64 of: "+value+" magnitude to big (floating point errors)");this.writeUint32(Math.floor(value/4294967296)),this.writeUint32(value%4294967296)},writeString:notImplemented("writeString"),canWriteBinary:function(chunk){return!1},writeBinary:notImplemented("writeChunk")};var stopCode=Error();function decodeReader(reader){var header=readHeaderRaw(reader);switch(header.type){case 0:return valueFromHeader(header,reader);case 1:return -1-valueFromHeader(header,reader);case 2:return reader.readChunk(valueFromHeader(header,reader));case 3:return reader.readChunk(valueFromHeader(header,reader)).toString("utf-8");case 4:case 5:var item,arrayLength=valueFromHeader(header,reader),result=[];if(null!==arrayLength){5===header.type&&(arrayLength*=2);for(var i=0;i<arrayLength;i++)result[i]=decodeReader(reader)}else for(;(item=decodeReader(reader))!==stopCode;)result.push(item);if(5!==header.type)return result;for(var objResult={},i=0;i<result.length;i+=2)objResult[result[i]]=result[i+1];return objResult;case 6:var decoder=semanticDecoders[valueFromHeader(header,reader)],result=decodeReader(reader);return decoder?decoder(result):result;case 7:if(25===header.value)return reader.readFloat16();if(26===header.value)return reader.readFloat32();if(27===header.value)return reader.readFloat64();switch(valueFromHeader(header,reader)){case 20:return!1;case 21:return!0;case 22:return null;case 23:return;case null:return stopCode;default:throw Error("Unknown fixed value: "+header.value)}default:throw Error("Unsupported header: "+JSON.stringify(header))}throw Error("not implemented yet")}function encodeWriter(data,writer){for(var i=0;i<semanticEncoders.length;i++){var replacement=semanticEncoders[i].fn(data);if(void 0!==replacement)return writeHeader(6,semanticEncoders[i].tag,writer),encodeWriter(replacement,writer)}if(data&&"function"==typeof data.toCBOR&&(data=data.toCBOR()),!1===data)writeHeader(7,20,writer);else if(!0===data)writeHeader(7,21,writer);else if(null===data)writeHeader(7,22,writer);else if(void 0===data)writeHeader(7,23,writer);else if("number"==typeof data)Math.floor(data)===data&&data<9007199254740992&&data>-9007199254740992?data<0?writeHeader(1,-1-data,writer):writeHeader(0,data,writer):(writeHeaderRaw(7,27,writer),writer.writeFloat64(data));else if("string"==typeof data)writer.writeString(data,function(length){writeHeader(3,length,writer)});else if(writer.canWriteBinary(data))writer.writeBinary(data,function(length){writeHeader(2,length,writer)});else if("object"==typeof data){if(api.config.useToJSON&&"function"==typeof data.toJSON&&(data=data.toJSON()),Array.isArray(data)){writeHeader(4,data.length,writer);for(var i=0;i<data.length;i++)encodeWriter(data[i],writer)}else{var keys=Object.keys(data);writeHeader(5,keys.length,writer);for(var i=0;i<keys.length;i++)encodeWriter(keys[i],writer),encodeWriter(data[keys[i]],writer)}}else throw Error("CBOR encoding not supported: "+data)}var readerFunctions=[],writerFunctions=[],api={config:{useToJSON:!0},addWriter:function(format,writerFunction){"string"==typeof format?writerFunctions.push(function(f){if(format===f)return writerFunction(f)}):writerFunctions.push(format)},addReader:function(format,readerFunction){"string"==typeof format?readerFunctions.push(function(data,f){if(format===f)return readerFunction(data,f)}):readerFunctions.push(format)},encode:function(data,format){for(var i=0;i<writerFunctions.length;i++){var writer=(0,writerFunctions[i])(format);if(writer)return encodeWriter(data,writer),writer.result()}throw Error("Unsupported output format: "+format)},decode:function(data,format){for(var i=0;i<readerFunctions.length;i++){var reader=(0,readerFunctions[i])(data,format);if(reader)return decodeReader(reader)}throw Error("Unsupported input format: "+format)},addSemanticEncode:function(tag,fn){if("number"!=typeof tag||tag%1!=0||tag<0)throw Error("Tag must be a positive integer");return semanticEncoders.push({tag:tag,fn:fn}),this},addSemanticDecode:function(tag,fn){if("number"!=typeof tag||tag%1!=0||tag<0)throw Error("Tag must be a positive integer");return semanticDecoders[tag]=fn,this},Reader:Reader,Writer:Writer};function BufferReader(buffer){this.buffer=buffer,this.pos=0}function BufferWriter(stringFormat){this.byteLength=0,this.defaultBufferLength=16384,this.latestBuffer=Buffer.alloc(this.defaultBufferLength),this.latestBufferOffset=0,this.completeBuffers=[],this.stringFormat=stringFormat}function HexReader(hex){this.hex=hex,this.pos=0}function HexWriter(finalFormat){this.$hex="",this.finalFormat=finalFormat||"hex"}return BufferReader.prototype=Object.create(Reader.prototype),BufferReader.prototype.peekByte=function(){return this.buffer[this.pos]},BufferReader.prototype.readByte=function(){return this.buffer[this.pos++]},BufferReader.prototype.readUint16=function(){var result=this.buffer.readUInt16BE(this.pos);return this.pos+=2,result},BufferReader.prototype.readUint32=function(){var result=this.buffer.readUInt32BE(this.pos);return this.pos+=4,result},BufferReader.prototype.readFloat32=function(){var result=this.buffer.readFloatBE(this.pos);return this.pos+=4,result},BufferReader.prototype.readFloat64=function(){var result=this.buffer.readDoubleBE(this.pos);return this.pos+=8,result},BufferReader.prototype.readChunk=function(length){var result=Buffer.alloc(length);return this.buffer.copy(result,0,this.pos,this.pos+=length),result},BufferWriter.prototype=Object.create(Writer.prototype),BufferWriter.prototype.writeByte=function(value){this.latestBuffer[this.latestBufferOffset++]=value,this.latestBufferOffset>=this.latestBuffer.length&&(this.completeBuffers.push(this.latestBuffer),this.latestBuffer=Buffer.alloc(this.defaultBufferLength),this.latestBufferOffset=0),this.byteLength++},BufferWriter.prototype.writeFloat32=function(value){var buffer=Buffer.alloc(4);buffer.writeFloatBE(value,0),this.writeBuffer(buffer)},BufferWriter.prototype.writeFloat64=function(value){var buffer=Buffer.alloc(8);buffer.writeDoubleBE(value,0),this.writeBuffer(buffer)},BufferWriter.prototype.writeString=function(string,lengthFunc){var buffer=Buffer.from(string,"utf-8");lengthFunc(buffer.length),this.writeBuffer(buffer)},BufferWriter.prototype.canWriteBinary=function(data){return data instanceof Buffer},BufferWriter.prototype.writeBinary=function(buffer,lengthFunc){lengthFunc(buffer.length),this.writeBuffer(buffer)},BufferWriter.prototype.writeBuffer=function(chunk){if(!(chunk instanceof Buffer))throw TypeError("BufferWriter only accepts Buffers");this.latestBufferOffset?this.latestBuffer.length-this.latestBufferOffset>=chunk.length?(chunk.copy(this.latestBuffer,this.latestBufferOffset),this.latestBufferOffset+=chunk.length,this.latestBufferOffset>=this.latestBuffer.length&&(this.completeBuffers.push(this.latestBuffer),this.latestBuffer=Buffer.alloc(this.defaultBufferLength),this.latestBufferOffset=0)):(this.completeBuffers.push(this.latestBuffer.slice(0,this.latestBufferOffset)),this.completeBuffers.push(chunk),this.latestBuffer=Buffer.alloc(this.defaultBufferLength),this.latestBufferOffset=0):this.completeBuffers.push(chunk),this.byteLength+=chunk.length},BufferWriter.prototype.result=function(){for(var result=Buffer.alloc(this.byteLength),offset=0,i=0;i<this.completeBuffers.length;i++){var buffer=this.completeBuffers[i];buffer.copy(result,offset,0,buffer.length),offset+=buffer.length}return(this.latestBufferOffset&&this.latestBuffer.copy(result,offset,0,this.latestBufferOffset),this.stringFormat)?result.toString(this.stringFormat):result},"function"==typeof Buffer&&(api.addReader(function(data,format){return data instanceof Buffer?new BufferReader(data):"hex"===format||"base64"===format?new BufferReader(Buffer.from(data,format)):void 0}),api.addWriter(function(format){return format&&"buffer"!==format?"hex"===format||"base64"===format?new BufferWriter(format):void 0:new BufferWriter})),HexReader.prototype=Object.create(Reader.prototype),HexReader.prototype.peekByte=function(){return parseInt(this.hex.substring(this.pos,2),16)},HexReader.prototype.readByte=function(){var pair=this.hex.substring(this.pos,this.pos+2);return this.pos+=2,parseInt(pair,16)},HexReader.prototype.readChunk=function(length){var hex=this.hex.substring(this.pos,this.pos+2*length);return(this.pos+=2*length,"function"==typeof Buffer)?Buffer.from(hex,"hex"):new BinaryHex(hex)},HexWriter.prototype=Object.create(Writer.prototype),HexWriter.prototype.writeByte=function(value){if(value<0||value>255)throw Error("Byte value out of range: "+value);var hex=value.toString(16);1==hex.length&&(hex="0"+hex),this.$hex+=hex},HexWriter.prototype.canWriteBinary=function(chunk){return chunk instanceof BinaryHex||"function"==typeof Buffer&&chunk instanceof Buffer},HexWriter.prototype.writeBinary=function(chunk,lengthFunction){if(chunk instanceof BinaryHex)lengthFunction(chunk.length()),this.$hex+=chunk.$hex;else if("function"==typeof Buffer&&chunk instanceof Buffer)lengthFunction(chunk.length),this.$hex+=chunk.toString("hex");else throw TypeError("HexWriter only accepts BinaryHex or Buffers")},HexWriter.prototype.result=function(){return"buffer"===this.finalFormat&&"function"==typeof Buffer?Buffer.from(this.$hex,"hex"):new BinaryHex(this.$hex).toString(this.finalFormat)},HexWriter.prototype.writeString=function(string,lengthFunction){var buffer=BinaryHex.fromUtf8String(string);lengthFunction(buffer.length()),this.$hex+=buffer.$hex},api.addReader(function(data,format){return data instanceof BinaryHex||data.$hex?new HexReader(data.$hex):"hex"===format?new HexReader(data):void 0}),api.addWriter(function(format){if("hex"===format)return new HexWriter}),api}();return CBOR.addSemanticEncode(0,function(data){if(data instanceof Date)return data.toISOString()}).addSemanticDecode(0,function(isoString){return new Date(isoString)}).addSemanticDecode(1,function(isoString){return new Date(isoString)}),CBOR})?__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports,__WEBPACK_AMD_DEFINE_ARRAY__):__WEBPACK_AMD_DEFINE_FACTORY__)&&(module.exports=__WEBPACK_AMD_DEFINE_RESULT__)},"./node_modules/crc/index.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{crc1:()=>crc_crc1,crc16:()=>crc_crc16,crc16ccitt:()=>crc_crc16ccitt,crc16kermit:()=>crc_crc16kermit,crc16modbus:()=>crc_crc16modbus,crc16xmodem:()=>crc_crc16xmodem,crc24:()=>crc_crc24,crc32:()=>crc_crc32,crc8:()=>crc_crc8,crc81wire:()=>crc_crc81wire,crcjam:()=>crc_crcjam,default:()=>crc});var buffer=__webpack_require__("./node_modules/crc/node_modules/buffer/index.js");let createBuffer=buffer.hp.from&&buffer.hp.alloc&&buffer.hp.allocUnsafe&&buffer.hp.allocUnsafeSlow?buffer.hp.from:val=>new buffer.hp(val);function define_crc(model,calc){let fn=(buf,previous)=>calc(buf,previous)>>>0;return fn.signed=calc,fn.unsigned=fn,fn.model=model,fn}let crc_crc1=define_crc("crc1",function(buf,previous){buffer.hp.isBuffer(buf)||(buf=createBuffer(buf));let crc=~~previous,accum=0;for(let index=0;index<buf.length;index++)accum+=buf[index];return(crc+=accum%256)%256}),TABLE=[0,7,14,9,28,27,18,21,56,63,54,49,36,35,42,45,112,119,126,121,108,107,98,101,72,79,70,65,84,83,90,93,224,231,238,233,252,251,242,245,216,223,214,209,196,195,202,205,144,151,158,153,140,139,130,133,168,175,166,161,180,179,186,189,199,192,201,206,219,220,213,210,255,248,241,246,227,228,237,234,183,176,185,190,171,172,165,162,143,136,129,134,147,148,157,154,39,32,41,46,59,60,53,50,31,24,17,22,3,4,13,10,87,80,89,94,75,76,69,66,111,104,97,102,115,116,125,122,137,142,135,128,149,146,155,156,177,182,191,184,173,170,163,164,249,254,247,240,229,226,235,236,193,198,207,200,221,218,211,212,105,110,103,96,117,114,123,124,81,86,95,88,77,74,67,68,25,30,23,16,5,2,11,12,33,38,47,40,61,58,51,52,78,73,64,71,82,85,92,91,118,113,120,127,106,109,100,99,62,57,48,55,34,37,44,43,6,1,8,15,26,29,20,19,174,169,160,167,178,181,188,187,150,145,152,159,138,141,132,131,222,217,208,215,194,197,204,203,230,225,232,239,250,253,244,243];"undefined"!=typeof Int32Array&&(TABLE=new Int32Array(TABLE));let crc_crc8=define_crc("crc-8",function(buf,previous){buffer.hp.isBuffer(buf)||(buf=createBuffer(buf));let crc=~~previous;for(let index=0;index<buf.length;index++)crc=255&TABLE[(crc^buf[index])&255];return crc}),crc81wire_TABLE=[0,94,188,226,97,63,221,131,194,156,126,32,163,253,31,65,157,195,33,127,252,162,64,30,95,1,227,189,62,96,130,220,35,125,159,193,66,28,254,160,225,191,93,3,128,222,60,98,190,224,2,92,223,129,99,61,124,34,192,158,29,67,161,255,70,24,250,164,39,121,155,197,132,218,56,102,229,187,89,7,219,133,103,57,186,228,6,88,25,71,165,251,120,38,196,154,101,59,217,135,4,90,184,230,167,249,27,69,198,152,122,36,248,166,68,26,153,199,37,123,58,100,134,216,91,5,231,185,140,210,48,110,237,179,81,15,78,16,242,172,47,113,147,205,17,79,173,243,112,46,204,146,211,141,111,49,178,236,14,80,175,241,19,77,206,144,114,44,109,51,209,143,12,82,176,238,50,108,142,208,83,13,239,177,240,174,76,18,145,207,45,115,202,148,118,40,171,245,23,73,8,86,180,234,105,55,213,139,87,9,235,181,54,104,138,212,149,203,41,119,244,170,72,22,233,183,85,11,136,214,52,106,43,117,151,201,74,20,246,168,116,42,200,150,21,75,169,247,182,232,10,84,215,137,107,53];"undefined"!=typeof Int32Array&&(crc81wire_TABLE=new Int32Array(crc81wire_TABLE));let crc_crc81wire=define_crc("dallas-1-wire",function(buf,previous){buffer.hp.isBuffer(buf)||(buf=createBuffer(buf));let crc=~~previous;for(let index=0;index<buf.length;index++)crc=255&crc81wire_TABLE[(crc^buf[index])&255];return crc}),crc16_TABLE=[0,49345,49537,320,49921,960,640,49729,50689,1728,1920,51009,1280,50625,50305,1088,52225,3264,3456,52545,3840,53185,52865,3648,2560,51905,52097,2880,51457,2496,2176,51265,55297,6336,6528,55617,6912,56257,55937,6720,7680,57025,57217,8e3,56577,7616,7296,56385,5120,54465,54657,5440,55041,6080,5760,54849,53761,4800,4992,54081,4352,53697,53377,4160,61441,12480,12672,61761,13056,62401,62081,12864,13824,63169,63361,14144,62721,13760,13440,62529,15360,64705,64897,15680,65281,16320,16e3,65089,64001,15040,15232,64321,14592,63937,63617,14400,10240,59585,59777,10560,60161,11200,10880,59969,60929,11968,12160,61249,11520,60865,60545,11328,58369,9408,9600,58689,9984,59329,59009,9792,8704,58049,58241,9024,57601,8640,8320,57409,40961,24768,24960,41281,25344,41921,41601,25152,26112,42689,42881,26432,42241,26048,25728,42049,27648,44225,44417,27968,44801,28608,28288,44609,43521,27328,27520,43841,26880,43457,43137,26688,30720,47297,47489,31040,47873,31680,31360,47681,48641,32448,32640,48961,32e3,48577,48257,31808,46081,29888,30080,46401,30464,47041,46721,30272,29184,45761,45953,29504,45313,29120,28800,45121,20480,37057,37249,20800,37633,21440,21120,37441,38401,22208,22400,38721,21760,38337,38017,21568,39937,23744,23936,40257,24320,40897,40577,24128,23040,39617,39809,23360,39169,22976,22656,38977,34817,18624,18816,35137,19200,35777,35457,19008,19968,36545,36737,20288,36097,19904,19584,35905,17408,33985,34177,17728,34561,18368,18048,34369,33281,17088,17280,33601,16640,33217,32897,16448];"undefined"!=typeof Int32Array&&(crc16_TABLE=new Int32Array(crc16_TABLE));let crc_crc16=define_crc("crc-16",function(buf,previous){buffer.hp.isBuffer(buf)||(buf=createBuffer(buf));let crc=~~previous;for(let index=0;index<buf.length;index++)crc=(crc16_TABLE[(crc^buf[index])&255]^crc>>8)&65535;return crc}),crc16ccitt_TABLE=[0,4129,8258,12387,16516,20645,24774,28903,33032,37161,41290,45419,49548,53677,57806,61935,4657,528,12915,8786,21173,17044,29431,25302,37689,33560,45947,41818,54205,50076,62463,58334,9314,13379,1056,5121,25830,29895,17572,21637,42346,46411,34088,38153,58862,62927,50604,54669,13907,9842,5649,1584,30423,26358,22165,18100,46939,42874,38681,34616,63455,59390,55197,51132,18628,22757,26758,30887,2112,6241,10242,14371,51660,55789,59790,63919,35144,39273,43274,47403,23285,19156,31415,27286,6769,2640,14899,10770,56317,52188,64447,60318,39801,35672,47931,43802,27814,31879,19684,23749,11298,15363,3168,7233,60846,64911,52716,56781,44330,48395,36200,40265,32407,28342,24277,20212,15891,11826,7761,3696,65439,61374,57309,53244,48923,44858,40793,36728,37256,33193,45514,41451,53516,49453,61774,57711,4224,161,12482,8419,20484,16421,28742,24679,33721,37784,41979,46042,49981,54044,58239,62302,689,4752,8947,13010,16949,21012,25207,29270,46570,42443,38312,34185,62830,58703,54572,50445,13538,9411,5280,1153,29798,25671,21540,17413,42971,47098,34713,38840,59231,63358,50973,55100,9939,14066,1681,5808,26199,30326,17941,22068,55628,51565,63758,59695,39368,35305,47498,43435,22596,18533,30726,26663,6336,2273,14466,10403,52093,56156,60223,64286,35833,39896,43963,48026,19061,23124,27191,31254,2801,6864,10931,14994,64814,60687,56684,52557,48554,44427,40424,36297,31782,27655,23652,19525,15522,11395,7392,3265,61215,65342,53085,57212,44955,49082,36825,40952,28183,32310,20053,24180,11923,16050,3793,7920];"undefined"!=typeof Int32Array&&(crc16ccitt_TABLE=new Int32Array(crc16ccitt_TABLE));let crc_crc16ccitt=define_crc("ccitt",function(buf,previous){buffer.hp.isBuffer(buf)||(buf=createBuffer(buf));let crc=void 0!==previous?~~previous:65535;for(let index=0;index<buf.length;index++)crc=(crc16ccitt_TABLE[(crc>>8^buf[index])&255]^crc<<8)&65535;return crc}),crc16modbus_TABLE=[0,49345,49537,320,49921,960,640,49729,50689,1728,1920,51009,1280,50625,50305,1088,52225,3264,3456,52545,3840,53185,52865,3648,2560,51905,52097,2880,51457,2496,2176,51265,55297,6336,6528,55617,6912,56257,55937,6720,7680,57025,57217,8e3,56577,7616,7296,56385,5120,54465,54657,5440,55041,6080,5760,54849,53761,4800,4992,54081,4352,53697,53377,4160,61441,12480,12672,61761,13056,62401,62081,12864,13824,63169,63361,14144,62721,13760,13440,62529,15360,64705,64897,15680,65281,16320,16e3,65089,64001,15040,15232,64321,14592,63937,63617,14400,10240,59585,59777,10560,60161,11200,10880,59969,60929,11968,12160,61249,11520,60865,60545,11328,58369,9408,9600,58689,9984,59329,59009,9792,8704,58049,58241,9024,57601,8640,8320,57409,40961,24768,24960,41281,25344,41921,41601,25152,26112,42689,42881,26432,42241,26048,25728,42049,27648,44225,44417,27968,44801,28608,28288,44609,43521,27328,27520,43841,26880,43457,43137,26688,30720,47297,47489,31040,47873,31680,31360,47681,48641,32448,32640,48961,32e3,48577,48257,31808,46081,29888,30080,46401,30464,47041,46721,30272,29184,45761,45953,29504,45313,29120,28800,45121,20480,37057,37249,20800,37633,21440,21120,37441,38401,22208,22400,38721,21760,38337,38017,21568,39937,23744,23936,40257,24320,40897,40577,24128,23040,39617,39809,23360,39169,22976,22656,38977,34817,18624,18816,35137,19200,35777,35457,19008,19968,36545,36737,20288,36097,19904,19584,35905,17408,33985,34177,17728,34561,18368,18048,34369,33281,17088,17280,33601,16640,33217,32897,16448];"undefined"!=typeof Int32Array&&(crc16modbus_TABLE=new Int32Array(crc16modbus_TABLE));let crc_crc16modbus=define_crc("crc-16-modbus",function(buf,previous){buffer.hp.isBuffer(buf)||(buf=createBuffer(buf));let crc=void 0!==previous?~~previous:65535;for(let index=0;index<buf.length;index++)crc=(crc16modbus_TABLE[(crc^buf[index])&255]^crc>>8)&65535;return crc}),crc_crc16xmodem=define_crc("xmodem",function(buf,previous){buffer.hp.isBuffer(buf)||(buf=createBuffer(buf));let crc=void 0!==previous?~~previous:0;for(let index=0;index<buf.length;index++){let byte=buf[index],code=crc>>>8&255;code^=255&byte,code^=code>>>4,crc=crc<<8&65535^code^(code=code<<5&65535)^(code=code<<7&65535)}return crc}),crc16kermit_TABLE=[0,4489,8978,12955,17956,22445,25910,29887,35912,40385,44890,48851,51820,56293,59774,63735,4225,264,13203,8730,22181,18220,30135,25662,40137,36160,49115,44626,56045,52068,63999,59510,8450,12427,528,5017,26406,30383,17460,21949,44362,48323,36440,40913,60270,64231,51324,55797,12675,8202,4753,792,30631,26158,21685,17724,48587,44098,40665,36688,64495,60006,55549,51572,16900,21389,24854,28831,1056,5545,10034,14011,52812,57285,60766,64727,34920,39393,43898,47859,21125,17164,29079,24606,5281,1320,14259,9786,57037,53060,64991,60502,39145,35168,48123,43634,25350,29327,16404,20893,9506,13483,1584,6073,61262,65223,52316,56789,43370,47331,35448,39921,29575,25102,20629,16668,13731,9258,5809,1848,65487,60998,56541,52564,47595,43106,39673,35696,33800,38273,42778,46739,49708,54181,57662,61623,2112,6601,11090,15067,20068,24557,28022,31999,38025,34048,47003,42514,53933,49956,61887,57398,6337,2376,15315,10842,24293,20332,32247,27774,42250,46211,34328,38801,58158,62119,49212,53685,10562,14539,2640,7129,28518,32495,19572,24061,46475,41986,38553,34576,62383,57894,53437,49460,14787,10314,6865,2904,32743,28270,23797,19836,50700,55173,58654,62615,32808,37281,41786,45747,19012,23501,26966,30943,3168,7657,12146,16123,54925,50948,62879,58390,37033,33056,46011,41522,23237,19276,31191,26718,7393,3432,16371,11898,59150,63111,50204,54677,41258,45219,33336,37809,27462,31439,18516,23005,11618,15595,3696,8185,63375,58886,54429,50452,45483,40994,37561,33584,31687,27214,22741,18780,15843,11370,7921,3960];"undefined"!=typeof Int32Array&&(crc16kermit_TABLE=new Int32Array(crc16kermit_TABLE));let crc_crc16kermit=define_crc("kermit",function(buf,previous){buffer.hp.isBuffer(buf)||(buf=createBuffer(buf));let crc=void 0!==previous?~~previous:0;for(let index=0;index<buf.length;index++)crc=(crc16kermit_TABLE[(crc^buf[index])&255]^crc>>8)&65535;return crc}),crc24_TABLE=[0,8801531,9098509,825846,9692897,1419802,1651692,10452759,10584377,2608578,2839604,11344079,3303384,11807523,12104405,4128302,12930697,4391538,5217156,13227903,5679208,13690003,14450021,5910942,6606768,14844747,15604413,6837830,16197969,7431594,8256604,16494759,840169,9084178,8783076,18463,10434312,1670131,1434117,9678590,11358416,2825259,2590173,10602790,4109873,12122826,11821884,3289031,13213536,5231515,4409965,12912278,5929345,14431610,13675660,5693559,6823513,15618722,14863188,6588335,16513208,8238147,7417269,16212302,1680338,10481449,9664223,1391140,9061683,788936,36926,8838341,12067563,4091408,3340262,11844381,2868234,11372785,10555655,2579964,14478683,5939616,5650518,13661357,5180346,13190977,12967607,4428364,8219746,16457881,16234863,7468436,15633027,6866552,6578062,14816117,1405499,9649856,10463030,1698765,8819930,55329,803287,9047340,11858690,3325945,4072975,12086004,2561507,10574104,11387118,2853909,13647026,5664841,5958079,14460228,4446803,12949160,13176670,5194661,7454091,16249200,16476294,8201341,14834538,6559633,6852199,15647388,3360676,11864927,12161705,4185682,10527045,2551230,2782280,11286707,9619101,1346150,1577872,10379115,73852,8875143,9172337,899466,16124205,7357910,8182816,16421083,6680524,14918455,15678145,6911546,5736468,13747439,14507289,5968354,12873461,4334094,5159928,13170435,4167245,12180150,11879232,3346363,11301036,2767959,2532769,10545498,10360692,1596303,1360505,9604738,913813,9157998,8856728,92259,16439492,8164415,7343561,16138546,6897189,15692510,14936872,6662099,5986813,14488838,13733104,5750795,13156124,5174247,4352529,12855018,2810998,11315341,10498427,2522496,12124823,4148844,3397530,11901793,9135439,862644,110658,8912057,1606574,10407765,9590435,1317464,15706879,6940164,6651890,14889737,8145950,16384229,16161043,7394792,5123014,13133629,12910283,4370992,14535975,5997020,5707818,13718737,2504095,10516836,11329682,2796649,11916158,3383173,4130419,12143240,8893606,129117,876971,9121104,1331783,9576124,10389322,1625009,14908182,6633453,6925851,15721184,7380471,16175372,16402682,8127489,4389423,12891860,13119266,5137369,13704398,5722165,6015427,14517560];"undefined"!=typeof Int32Array&&(crc24_TABLE=new Int32Array(crc24_TABLE));let crc_crc24=define_crc("crc-24",function(buf,previous){buffer.hp.isBuffer(buf)||(buf=createBuffer(buf));let crc=void 0!==previous?~~previous:11994318;for(let index=0;index<buf.length;index++)crc=(crc24_TABLE[(crc>>16^buf[index])&255]^crc<<8)&16777215;return crc}),crc32_TABLE=[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&&(crc32_TABLE=new Int32Array(crc32_TABLE));let crc_crc32=define_crc("crc-32",function(buf,previous){buffer.hp.isBuffer(buf)||(buf=createBuffer(buf));let crc=0===previous?0:-1^~~previous;for(let index=0;index<buf.length;index++)crc=crc32_TABLE[(crc^buf[index])&255]^crc>>>8;return -1^crc}),crcjam_TABLE=[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&&(crcjam_TABLE=new Int32Array(crcjam_TABLE));let crc_crcjam=define_crc("jam",function(buf,previous=-1){buffer.hp.isBuffer(buf)||(buf=createBuffer(buf));let crc=0===previous?0:~~previous;for(let index=0;index<buf.length;index++)crc=crcjam_TABLE[(crc^buf[index])&255]^crc>>>8;return crc}),crc={crc1:crc_crc1,crc8:crc_crc8,crc81wire:crc_crc81wire,crc16:crc_crc16,crc16ccitt:crc_crc16ccitt,crc16modbus:crc_crc16modbus,crc16xmodem:crc_crc16xmodem,crc16kermit:crc_crc16kermit,crc24:crc_crc24,crc32:crc_crc32,crcjam:crc_crcjam}},"./node_modules/crc/node_modules/buffer/index.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
*/var base64=__webpack_require__("./node_modules/base64-js/index.js"),ieee754=__webpack_require__("./node_modules/ieee754/index.js"),customInspectSymbol="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;function typedArraySupport(){try{var arr=new Uint8Array(1),proto={foo:function(){return 42}};return Object.setPrototypeOf(proto,Uint8Array.prototype),Object.setPrototypeOf(arr,proto),42===arr.foo()}catch(e){return!1}}function createBuffer(length){if(length>2147483647)throw RangeError('The value "'+length+'" is invalid for option "size"');var buf=new Uint8Array(length);return Object.setPrototypeOf(buf,Buffer.prototype),buf}function Buffer(arg,encodingOrOffset,length){if("number"==typeof arg){if("string"==typeof encodingOrOffset)throw TypeError('The "string" argument must be of type string. Received type number');return allocUnsafe(arg)}return from(arg,encodingOrOffset,length)}function from(value,encodingOrOffset,length){if("string"==typeof value)return fromString(value,encodingOrOffset);if(ArrayBuffer.isView(value))return fromArrayView(value);if(null==value)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof value);if(isInstance(value,ArrayBuffer)||value&&isInstance(value.buffer,ArrayBuffer)||"undefined"!=typeof SharedArrayBuffer&&(isInstance(value,SharedArrayBuffer)||value&&isInstance(value.buffer,SharedArrayBuffer)))return fromArrayBuffer(value,encodingOrOffset,length);if("number"==typeof value)throw TypeError('The "value" argument must not be of type number. Received type number');var valueOf=value.valueOf&&value.valueOf();if(null!=valueOf&&valueOf!==value)return Buffer.from(valueOf,encodingOrOffset,length);var b=fromObject(value);if(b)return b;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof value[Symbol.toPrimitive])return Buffer.from(value[Symbol.toPrimitive]("string"),encodingOrOffset,length);throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof value)}function assertSize(size){if("number"!=typeof size)throw TypeError('"size" argument must be of type number');if(size<0)throw RangeError('The value "'+size+'" is invalid for option "size"')}function alloc(size,fill,encoding){return(assertSize(size),size<=0)?createBuffer(size):void 0!==fill?"string"==typeof encoding?createBuffer(size).fill(fill,encoding):createBuffer(size).fill(fill):createBuffer(size)}function allocUnsafe(size){return assertSize(size),createBuffer(size<0?0:0|checked(size))}function fromString(string,encoding){if(("string"!=typeof encoding||""===encoding)&&(encoding="utf8"),!Buffer.isEncoding(encoding))throw TypeError("Unknown encoding: "+encoding);var length=0|byteLength(string,encoding),buf=createBuffer(length),actual=buf.write(string,encoding);return actual!==length&&(buf=buf.slice(0,actual)),buf}function fromArrayLike(array){for(var length=array.length<0?0:0|checked(array.length),buf=createBuffer(length),i=0;i<length;i+=1)buf[i]=255&array[i];return buf}function fromArrayView(arrayView){if(isInstance(arrayView,Uint8Array)){var copy=new Uint8Array(arrayView);return fromArrayBuffer(copy.buffer,copy.byteOffset,copy.byteLength)}return fromArrayLike(arrayView)}function fromArrayBuffer(array,byteOffset,length){var buf;if(byteOffset<0||array.byteLength<byteOffset)throw RangeError('"offset" is outside of buffer bounds');if(array.byteLength<byteOffset+(length||0))throw RangeError('"length" is outside of buffer bounds');return Object.setPrototypeOf(buf=void 0===byteOffset&&void 0===length?new Uint8Array(array):void 0===length?new Uint8Array(array,byteOffset):new Uint8Array(array,byteOffset,length),Buffer.prototype),buf}function fromObject(obj){if(Buffer.isBuffer(obj)){var obj1,len=0|checked(obj.length),buf=createBuffer(len);return 0===buf.length||obj.copy(buf,0,0,len),buf}return void 0!==obj.length?"number"!=typeof obj.length||(obj1=obj.length)!=obj1?createBuffer(0):fromArrayLike(obj):"Buffer"===obj.type&&Array.isArray(obj.data)?fromArrayLike(obj.data):void 0}function checked(length){if(length>=2147483647)throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x7fffffff bytes");return 0|length}function byteLength(string,encoding){if(Buffer.isBuffer(string))return string.length;if(ArrayBuffer.isView(string)||isInstance(string,ArrayBuffer))return string.byteLength;if("string"!=typeof string)throw TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof string);var len=string.length,mustMatch=arguments.length>2&&!0===arguments[2];if(!mustMatch&&0===len)return 0;for(var loweredCase=!1;;)switch(encoding){case"ascii":case"latin1":case"binary":return len;case"utf8":case"utf-8":return utf8ToBytes(string).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*len;case"hex":return len>>>1;case"base64":return base64ToBytes(string).length;default:if(loweredCase)return mustMatch?-1:utf8ToBytes(string).length;encoding=(""+encoding).toLowerCase(),loweredCase=!0}}function slowToString(encoding,start,end){var loweredCase=!1;if((void 0===start||start<0)&&(start=0),start>this.length||((void 0===end||end>this.length)&&(end=this.length),end<=0||(end>>>=0)<=(start>>>=0)))return"";for(encoding||(encoding="utf8");;)switch(encoding){case"hex":return hexSlice(this,start,end);case"utf8":case"utf-8":return utf8Slice(this,start,end);case"ascii":return asciiSlice(this,start,end);case"latin1":case"binary":return latin1Slice(this,start,end);case"base64":return base64Slice(this,start,end);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return utf16leSlice(this,start,end);default:if(loweredCase)throw TypeError("Unknown encoding: "+encoding);encoding=(encoding+"").toLowerCase(),loweredCase=!0}}function swap(b,n,m){var i=b[n];b[n]=b[m],b[m]=i}function bidirectionalIndexOf(buffer,val,byteOffset,encoding,dir){var obj;if(0===buffer.length)return -1;if("string"==typeof byteOffset?(encoding=byteOffset,byteOffset=0):byteOffset>2147483647?byteOffset=2147483647:byteOffset<-2147483648&&(byteOffset=-2147483648),(obj=byteOffset=+byteOffset)!=obj&&(byteOffset=dir?0:buffer.length-1),byteOffset<0&&(byteOffset=buffer.length+byteOffset),byteOffset>=buffer.length){if(dir)return -1;byteOffset=buffer.length-1}else if(byteOffset<0){if(!dir)return -1;byteOffset=0}if("string"==typeof val&&(val=Buffer.from(val,encoding)),Buffer.isBuffer(val))return 0===val.length?-1:arrayIndexOf(buffer,val,byteOffset,encoding,dir);if("number"==typeof val)return(val&=255,"function"==typeof Uint8Array.prototype.indexOf)?dir?Uint8Array.prototype.indexOf.call(buffer,val,byteOffset):Uint8Array.prototype.lastIndexOf.call(buffer,val,byteOffset):arrayIndexOf(buffer,[val],byteOffset,encoding,dir);throw TypeError("val must be string, number or Buffer")}function arrayIndexOf(arr,val,byteOffset,encoding,dir){var i,indexSize=1,arrLength=arr.length,valLength=val.length;if(void 0!==encoding&&("ucs2"===(encoding=String(encoding).toLowerCase())||"ucs-2"===encoding||"utf16le"===encoding||"utf-16le"===encoding)){if(arr.length<2||val.length<2)return -1;indexSize=2,arrLength/=2,valLength/=2,byteOffset/=2}function read(buf,i){return 1===indexSize?buf[i]:buf.readUInt16BE(i*indexSize)}if(dir){var foundIndex=-1;for(i=byteOffset;i<arrLength;i++)if(read(arr,i)===read(val,-1===foundIndex?0:i-foundIndex)){if(-1===foundIndex&&(foundIndex=i),i-foundIndex+1===valLength)return foundIndex*indexSize}else -1!==foundIndex&&(i-=i-foundIndex),foundIndex=-1}else for(byteOffset+valLength>arrLength&&(byteOffset=arrLength-valLength),i=byteOffset;i>=0;i--){for(var found=!0,j=0;j<valLength;j++)if(read(arr,i+j)!==read(val,j)){found=!1;break}if(found)return i}return -1}function hexWrite(buf,string,offset,length){offset=Number(offset)||0;var remaining=buf.length-offset;length?(length=Number(length))>remaining&&(length=remaining):length=remaining;var strLen=string.length;length>strLen/2&&(length=strLen/2);for(var i=0;i<length;++i){var parsed=parseInt(string.substr(2*i,2),16);if(parsed!=parsed)break;buf[offset+i]=parsed}return i}function utf8Write(buf,string,offset,length){return blitBuffer(utf8ToBytes(string,buf.length-offset),buf,offset,length)}function asciiWrite(buf,string,offset,length){return blitBuffer(asciiToBytes(string),buf,offset,length)}function base64Write(buf,string,offset,length){return blitBuffer(base64ToBytes(string),buf,offset,length)}function ucs2Write(buf,string,offset,length){return blitBuffer(utf16leToBytes(string,buf.length-offset),buf,offset,length)}function base64Slice(buf,start,end){return 0===start&&end===buf.length?base64.fromByteArray(buf):base64.fromByteArray(buf.slice(start,end))}function utf8Slice(buf,start,end){end=Math.min(buf.length,end);for(var res=[],i=start;i<end;){var secondByte,thirdByte,fourthByte,tempCodePoint,firstByte=buf[i],codePoint=null,bytesPerSequence=firstByte>239?4:firstByte>223?3:firstByte>191?2:1;if(i+bytesPerSequence<=end)switch(bytesPerSequence){case 1:firstByte<128&&(codePoint=firstByte);break;case 2:(192&(secondByte=buf[i+1]))==128&&(tempCodePoint=(31&firstByte)<<6|63&secondByte)>127&&(codePoint=tempCodePoint);break;case 3:secondByte=buf[i+1],thirdByte=buf[i+2],(192&secondByte)==128&&(192&thirdByte)==128&&(tempCodePoint=(15&firstByte)<<12|(63&secondByte)<<6|63&thirdByte)>2047&&(tempCodePoint<55296||tempCodePoint>57343)&&(codePoint=tempCodePoint);break;case 4:secondByte=buf[i+1],thirdByte=buf[i+2],fourthByte=buf[i+3],(192&secondByte)==128&&(192&thirdByte)==128&&(192&fourthByte)==128&&(tempCodePoint=(15&firstByte)<<18|(63&secondByte)<<12|(63&thirdByte)<<6|63&fourthByte)>65535&&tempCodePoint<1114112&&(codePoint=tempCodePoint)}null===codePoint?(codePoint=65533,bytesPerSequence=1):codePoint>65535&&(codePoint-=65536,res.push(codePoint>>>10&1023|55296),codePoint=56320|1023&codePoint),res.push(codePoint),i+=bytesPerSequence}return decodeCodePointsArray(res)}function decodeCodePointsArray(codePoints){var len=codePoints.length;if(len<=4096)return String.fromCharCode.apply(String,codePoints);for(var res="",i=0;i<len;)res+=String.fromCharCode.apply(String,codePoints.slice(i,i+=4096));return res}function asciiSlice(buf,start,end){var ret="";end=Math.min(buf.length,end);for(var i=start;i<end;++i)ret+=String.fromCharCode(127&buf[i]);return ret}function latin1Slice(buf,start,end){var ret="";end=Math.min(buf.length,end);for(var i=start;i<end;++i)ret+=String.fromCharCode(buf[i]);return ret}function hexSlice(buf,start,end){var len=buf.length;(!start||start<0)&&(start=0),(!end||end<0||end>len)&&(end=len);for(var out="",i=start;i<end;++i)out+=hexSliceLookupTable[buf[i]];return out}function utf16leSlice(buf,start,end){for(var bytes=buf.slice(start,end),res="",i=0;i<bytes.length-1;i+=2)res+=String.fromCharCode(bytes[i]+256*bytes[i+1]);return res}function checkOffset(offset,ext,length){if(offset%1!=0||offset<0)throw RangeError("offset is not uint");if(offset+ext>length)throw RangeError("Trying to access beyond buffer length")}function checkInt(buf,value,offset,ext,max,min){if(!Buffer.isBuffer(buf))throw TypeError('"buffer" argument must be a Buffer instance');if(value>max||value<min)throw RangeError('"value" argument is out of bounds');if(offset+ext>buf.length)throw RangeError("Index out of range")}function checkIEEE754(buf,value,offset,ext,max,min){if(offset+ext>buf.length||offset<0)throw RangeError("Index out of range")}function writeFloat(buf,value,offset,littleEndian,noAssert){return value=+value,offset>>>=0,noAssert||checkIEEE754(buf,value,offset,4,34028234663852886e22,-34028234663852886e22),ieee754.write(buf,value,offset,littleEndian,23,4),offset+4}function writeDouble(buf,value,offset,littleEndian,noAssert){return value=+value,offset>>>=0,noAssert||checkIEEE754(buf,value,offset,8,17976931348623157e292,-17976931348623157e292),ieee754.write(buf,value,offset,littleEndian,52,8),offset+8}exports.hp=Buffer,exports.IS=50,Buffer.TYPED_ARRAY_SUPPORT=typedArraySupport(),Buffer.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(Buffer.prototype,"parent",{enumerable:!0,get:function(){if(Buffer.isBuffer(this))return this.buffer}}),Object.defineProperty(Buffer.prototype,"offset",{enumerable:!0,get:function(){if(Buffer.isBuffer(this))return this.byteOffset}}),Buffer.poolSize=8192,Buffer.from=function(value,encodingOrOffset,length){return from(value,encodingOrOffset,length)},Object.setPrototypeOf(Buffer.prototype,Uint8Array.prototype),Object.setPrototypeOf(Buffer,Uint8Array),Buffer.alloc=function(size,fill,encoding){return alloc(size,fill,encoding)},Buffer.allocUnsafe=function(size){return allocUnsafe(size)},Buffer.allocUnsafeSlow=function(size){return allocUnsafe(size)},Buffer.isBuffer=function isBuffer(b){return null!=b&&!0===b._isBuffer&&b!==Buffer.prototype},Buffer.compare=function compare(a,b){if(isInstance(a,Uint8Array)&&(a=Buffer.from(a,a.offset,a.byteLength)),isInstance(b,Uint8Array)&&(b=Buffer.from(b,b.offset,b.byteLength)),!Buffer.isBuffer(a)||!Buffer.isBuffer(b))throw TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(a===b)return 0;for(var x=a.length,y=b.length,i=0,len=Math.min(x,y);i<len;++i)if(a[i]!==b[i]){x=a[i],y=b[i];break}return x<y?-1:y<x?1:0},Buffer.isEncoding=function isEncoding(encoding){switch(String(encoding).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},Buffer.concat=function concat(list,length){if(!Array.isArray(list))throw TypeError('"list" argument must be an Array of Buffers');if(0===list.length)return Buffer.alloc(0);if(void 0===length)for(i=0,length=0;i<list.length;++i)length+=list[i].length;var i,buffer=Buffer.allocUnsafe(length),pos=0;for(i=0;i<list.length;++i){var buf=list[i];if(isInstance(buf,Uint8Array))pos+buf.length>buffer.length?Buffer.from(buf).copy(buffer,pos):Uint8Array.prototype.set.call(buffer,buf,pos);else if(Buffer.isBuffer(buf))buf.copy(buffer,pos);else throw TypeError('"list" argument must be an Array of Buffers');pos+=buf.length}return buffer},Buffer.byteLength=byteLength,Buffer.prototype._isBuffer=!0,Buffer.prototype.swap16=function swap16(){var len=this.length;if(len%2!=0)throw RangeError("Buffer size must be a multiple of 16-bits");for(var i=0;i<len;i+=2)swap(this,i,i+1);return this},Buffer.prototype.swap32=function swap32(){var len=this.length;if(len%4!=0)throw RangeError("Buffer size must be a multiple of 32-bits");for(var i=0;i<len;i+=4)swap(this,i,i+3),swap(this,i+1,i+2);return this},Buffer.prototype.swap64=function swap64(){var len=this.length;if(len%8!=0)throw RangeError("Buffer size must be a multiple of 64-bits");for(var i=0;i<len;i+=8)swap(this,i,i+7),swap(this,i+1,i+6),swap(this,i+2,i+5),swap(this,i+3,i+4);return this},Buffer.prototype.toString=function toString(){var length=this.length;return 0===length?"":0==arguments.length?utf8Slice(this,0,length):slowToString.apply(this,arguments)},Buffer.prototype.toLocaleString=Buffer.prototype.toString,Buffer.prototype.equals=function equals(b){if(!Buffer.isBuffer(b))throw TypeError("Argument must be a Buffer");return this===b||0===Buffer.compare(this,b)},Buffer.prototype.inspect=function inspect(){var str="",max=exports.IS;return str=this.toString("hex",0,max).replace(/(.{2})/g,"$1 ").trim(),this.length>max&&(str+=" ... "),"<Buffer "+str+">"},customInspectSymbol&&(Buffer.prototype[customInspectSymbol]=Buffer.prototype.inspect),Buffer.prototype.compare=function compare(target,start,end,thisStart,thisEnd){if(isInstance(target,Uint8Array)&&(target=Buffer.from(target,target.offset,target.byteLength)),!Buffer.isBuffer(target))throw TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof target);if(void 0===start&&(start=0),void 0===end&&(end=target?target.length:0),void 0===thisStart&&(thisStart=0),void 0===thisEnd&&(thisEnd=this.length),start<0||end>target.length||thisStart<0||thisEnd>this.length)throw RangeError("out of range index");if(thisStart>=thisEnd&&start>=end)return 0;if(thisStart>=thisEnd)return -1;if(start>=end)return 1;if(start>>>=0,end>>>=0,thisStart>>>=0,thisEnd>>>=0,this===target)return 0;for(var x=thisEnd-thisStart,y=end-start,len=Math.min(x,y),thisCopy=this.slice(thisStart,thisEnd),targetCopy=target.slice(start,end),i=0;i<len;++i)if(thisCopy[i]!==targetCopy[i]){x=thisCopy[i],y=targetCopy[i];break}return x<y?-1:y<x?1:0},Buffer.prototype.includes=function includes(val,byteOffset,encoding){return -1!==this.indexOf(val,byteOffset,encoding)},Buffer.prototype.indexOf=function indexOf(val,byteOffset,encoding){return bidirectionalIndexOf(this,val,byteOffset,encoding,!0)},Buffer.prototype.lastIndexOf=function lastIndexOf(val,byteOffset,encoding){return bidirectionalIndexOf(this,val,byteOffset,encoding,!1)},Buffer.prototype.write=function write(string,offset,length,encoding){if(void 0===offset)encoding="utf8",length=this.length,offset=0;else if(void 0===length&&"string"==typeof offset)encoding=offset,length=this.length,offset=0;else if(isFinite(offset))offset>>>=0,isFinite(length)?(length>>>=0,void 0===encoding&&(encoding="utf8")):(encoding=length,length=void 0);else throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var remaining=this.length-offset;if((void 0===length||length>remaining)&&(length=remaining),string.length>0&&(length<0||offset<0)||offset>this.length)throw RangeError("Attempt to write outside buffer bounds");encoding||(encoding="utf8");for(var loweredCase=!1;;)switch(encoding){case"hex":return hexWrite(this,string,offset,length);case"utf8":case"utf-8":return utf8Write(this,string,offset,length);case"ascii":case"latin1":case"binary":return asciiWrite(this,string,offset,length);case"base64":return base64Write(this,string,offset,length);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ucs2Write(this,string,offset,length);default:if(loweredCase)throw TypeError("Unknown encoding: "+encoding);encoding=(""+encoding).toLowerCase(),loweredCase=!0}},Buffer.prototype.toJSON=function toJSON(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},Buffer.prototype.slice=function slice(start,end){var len=this.length;start=~~start,end=void 0===end?len:~~end,start<0?(start+=len)<0&&(start=0):start>len&&(start=len),end<0?(end+=len)<0&&(end=0):end>len&&(end=len),end<start&&(end=start);var newBuf=this.subarray(start,end);return Object.setPrototypeOf(newBuf,Buffer.prototype),newBuf},Buffer.prototype.readUintLE=Buffer.prototype.readUIntLE=function readUIntLE(offset,byteLength,noAssert){offset>>>=0,byteLength>>>=0,noAssert||checkOffset(offset,byteLength,this.length);for(var val=this[offset],mul=1,i=0;++i<byteLength&&(mul*=256);)val+=this[offset+i]*mul;return val},Buffer.prototype.readUintBE=Buffer.prototype.readUIntBE=function readUIntBE(offset,byteLength,noAssert){offset>>>=0,byteLength>>>=0,noAssert||checkOffset(offset,byteLength,this.length);for(var val=this[offset+--byteLength],mul=1;byteLength>0&&(mul*=256);)val+=this[offset+--byteLength]*mul;return val},Buffer.prototype.readUint8=Buffer.prototype.readUInt8=function readUInt8(offset,noAssert){return offset>>>=0,noAssert||checkOffset(offset,1,this.length),this[offset]},Buffer.prototype.readUint16LE=Buffer.prototype.readUInt16LE=function readUInt16LE(offset,noAssert){return offset>>>=0,noAssert||checkOffset(offset,2,this.length),this[offset]|this[offset+1]<<8},Buffer.prototype.readUint16BE=Buffer.prototype.readUInt16BE=function readUInt16BE(offset,noAssert){return offset>>>=0,noAssert||checkOffset(offset,2,this.length),this[offset]<<8|this[offset+1]},Buffer.prototype.readUint32LE=Buffer.prototype.readUInt32LE=function readUInt32LE(offset,noAssert){return offset>>>=0,noAssert||checkOffset(offset,4,this.length),(this[offset]|this[offset+1]<<8|this[offset+2]<<16)+16777216*this[offset+3]},Buffer.prototype.readUint32BE=Buffer.prototype.readUInt32BE=function readUInt32BE(offset,noAssert){return offset>>>=0,noAssert||checkOffset(offset,4,this.length),16777216*this[offset]+(this[offset+1]<<16|this[offset+2]<<8|this[offset+3])},Buffer.prototype.readIntLE=function readIntLE(offset,byteLength,noAssert){offset>>>=0,byteLength>>>=0,noAssert||checkOffset(offset,byteLength,this.length);for(var val=this[offset],mul=1,i=0;++i<byteLength&&(mul*=256);)val+=this[offset+i]*mul;return val>=(mul*=128)&&(val-=Math.pow(2,8*byteLength)),val},Buffer.prototype.readIntBE=function readIntBE(offset,byteLength,noAssert){offset>>>=0,byteLength>>>=0,noAssert||checkOffset(offset,byteLength,this.length);for(var i=byteLength,mul=1,val=this[offset+--i];i>0&&(mul*=256);)val+=this[offset+--i]*mul;return val>=(mul*=128)&&(val-=Math.pow(2,8*byteLength)),val},Buffer.prototype.readInt8=function readInt8(offset,noAssert){return(offset>>>=0,noAssert||checkOffset(offset,1,this.length),128&this[offset])?-((255-this[offset]+1)*1):this[offset]},Buffer.prototype.readInt16LE=function readInt16LE(offset,noAssert){offset>>>=0,noAssert||checkOffset(offset,2,this.length);var val=this[offset]|this[offset+1]<<8;return 32768&val?4294901760|val:val},Buffer.prototype.readInt16BE=function readInt16BE(offset,noAssert){offset>>>=0,noAssert||checkOffset(offset,2,this.length);var val=this[offset+1]|this[offset]<<8;return 32768&val?4294901760|val:val},Buffer.prototype.readInt32LE=function readInt32LE(offset,noAssert){return offset>>>=0,noAssert||checkOffset(offset,4,this.length),this[offset]|this[offset+1]<<8|this[offset+2]<<16|this[offset+3]<<24},Buffer.prototype.readInt32BE=function readInt32BE(offset,noAssert){return offset>>>=0,noAssert||checkOffset(offset,4,this.length),this[offset]<<24|this[offset+1]<<16|this[offset+2]<<8|this[offset+3]},Buffer.prototype.readFloatLE=function readFloatLE(offset,noAssert){return offset>>>=0,noAssert||checkOffset(offset,4,this.length),ieee754.read(this,offset,!0,23,4)},Buffer.prototype.readFloatBE=function readFloatBE(offset,noAssert){return offset>>>=0,noAssert||checkOffset(offset,4,this.length),ieee754.read(this,offset,!1,23,4)},Buffer.prototype.readDoubleLE=function readDoubleLE(offset,noAssert){return offset>>>=0,noAssert||checkOffset(offset,8,this.length),ieee754.read(this,offset,!0,52,8)},Buffer.prototype.readDoubleBE=function readDoubleBE(offset,noAssert){return offset>>>=0,noAssert||checkOffset(offset,8,this.length),ieee754.read(this,offset,!1,52,8)},Buffer.prototype.writeUintLE=Buffer.prototype.writeUIntLE=function writeUIntLE(value,offset,byteLength,noAssert){if(value=+value,offset>>>=0,byteLength>>>=0,!noAssert){var maxBytes=Math.pow(2,8*byteLength)-1;checkInt(this,value,offset,byteLength,maxBytes,0)}var mul=1,i=0;for(this[offset]=255&value;++i<byteLength&&(mul*=256);)this[offset+i]=value/mul&255;return offset+byteLength},Buffer.prototype.writeUintBE=Buffer.prototype.writeUIntBE=function writeUIntBE(value,offset,byteLength,noAssert){if(value=+value,offset>>>=0,byteLength>>>=0,!noAssert){var maxBytes=Math.pow(2,8*byteLength)-1;checkInt(this,value,offset,byteLength,maxBytes,0)}var i=byteLength-1,mul=1;for(this[offset+i]=255&value;--i>=0&&(mul*=256);)this[offset+i]=value/mul&255;return offset+byteLength},Buffer.prototype.writeUint8=Buffer.prototype.writeUInt8=function writeUInt8(value,offset,noAssert){return value=+value,offset>>>=0,noAssert||checkInt(this,value,offset,1,255,0),this[offset]=255&value,offset+1},Buffer.prototype.writeUint16LE=Buffer.prototype.writeUInt16LE=function writeUInt16LE(value,offset,noAssert){return value=+value,offset>>>=0,noAssert||checkInt(this,value,offset,2,65535,0),this[offset]=255&value,this[offset+1]=value>>>8,offset+2},Buffer.prototype.writeUint16BE=Buffer.prototype.writeUInt16BE=function writeUInt16BE(value,offset,noAssert){return value=+value,offset>>>=0,noAssert||checkInt(this,value,offset,2,65535,0),this[offset]=value>>>8,this[offset+1]=255&value,offset+2},Buffer.prototype.writeUint32LE=Buffer.prototype.writeUInt32LE=function writeUInt32LE(value,offset,noAssert){return value=+value,offset>>>=0,noAssert||checkInt(this,value,offset,4,4294967295,0),this[offset+3]=value>>>24,this[offset+2]=value>>>16,this[offset+1]=value>>>8,this[offset]=255&value,offset+4},Buffer.prototype.writeUint32BE=Buffer.prototype.writeUInt32BE=function writeUInt32BE(value,offset,noAssert){return value=+value,offset>>>=0,noAssert||checkInt(this,value,offset,4,4294967295,0),this[offset]=value>>>24,this[offset+1]=value>>>16,this[offset+2]=value>>>8,this[offset+3]=255&value,offset+4},Buffer.prototype.writeIntLE=function writeIntLE(value,offset,byteLength,noAssert){if(value=+value,offset>>>=0,!noAssert){var limit=Math.pow(2,8*byteLength-1);checkInt(this,value,offset,byteLength,limit-1,-limit)}var i=0,mul=1,sub=0;for(this[offset]=255&value;++i<byteLength&&(mul*=256);)value<0&&0===sub&&0!==this[offset+i-1]&&(sub=1),this[offset+i]=(value/mul>>0)-sub&255;return offset+byteLength},Buffer.prototype.writeIntBE=function writeIntBE(value,offset,byteLength,noAssert){if(value=+value,offset>>>=0,!noAssert){var limit=Math.pow(2,8*byteLength-1);checkInt(this,value,offset,byteLength,limit-1,-limit)}var i=byteLength-1,mul=1,sub=0;for(this[offset+i]=255&value;--i>=0&&(mul*=256);)value<0&&0===sub&&0!==this[offset+i+1]&&(sub=1),this[offset+i]=(value/mul>>0)-sub&255;return offset+byteLength},Buffer.prototype.writeInt8=function writeInt8(value,offset,noAssert){return value=+value,offset>>>=0,noAssert||checkInt(this,value,offset,1,127,-128),value<0&&(value=255+value+1),this[offset]=255&value,offset+1},Buffer.prototype.writeInt16LE=function writeInt16LE(value,offset,noAssert){return value=+value,offset>>>=0,noAssert||checkInt(this,value,offset,2,32767,-32768),this[offset]=255&value,this[offset+1]=value>>>8,offset+2},Buffer.prototype.writeInt16BE=function writeInt16BE(value,offset,noAssert){return value=+value,offset>>>=0,noAssert||checkInt(this,value,offset,2,32767,-32768),this[offset]=value>>>8,this[offset+1]=255&value,offset+2},Buffer.prototype.writeInt32LE=function writeInt32LE(value,offset,noAssert){return value=+value,offset>>>=0,noAssert||checkInt(this,value,offset,4,2147483647,-2147483648),this[offset]=255&value,this[offset+1]=value>>>8,this[offset+2]=value>>>16,this[offset+3]=value>>>24,offset+4},Buffer.prototype.writeInt32BE=function writeInt32BE(value,offset,noAssert){return value=+value,offset>>>=0,noAssert||checkInt(this,value,offset,4,2147483647,-2147483648),value<0&&(value=4294967295+value+1),this[offset]=value>>>24,this[offset+1]=value>>>16,this[offset+2]=value>>>8,this[offset+3]=255&value,offset+4},Buffer.prototype.writeFloatLE=function writeFloatLE(value,offset,noAssert){return writeFloat(this,value,offset,!0,noAssert)},Buffer.prototype.writeFloatBE=function writeFloatBE(value,offset,noAssert){return writeFloat(this,value,offset,!1,noAssert)},Buffer.prototype.writeDoubleLE=function writeDoubleLE(value,offset,noAssert){return writeDouble(this,value,offset,!0,noAssert)},Buffer.prototype.writeDoubleBE=function writeDoubleBE(value,offset,noAssert){return writeDouble(this,value,offset,!1,noAssert)},Buffer.prototype.copy=function copy(target,targetStart,start,end){if(!Buffer.isBuffer(target))throw TypeError("argument should be a Buffer");if(start||(start=0),end||0===end||(end=this.length),targetStart>=target.length&&(targetStart=target.length),targetStart||(targetStart=0),end>0&&end<start&&(end=start),end===start||0===target.length||0===this.length)return 0;if(targetStart<0)throw RangeError("targetStart out of bounds");if(start<0||start>=this.length)throw RangeError("Index out of range");if(end<0)throw RangeError("sourceEnd out of bounds");end>this.length&&(end=this.length),target.length-targetStart<end-start&&(end=target.length-targetStart+start);var len=end-start;return this===target&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(targetStart,start,end):Uint8Array.prototype.set.call(target,this.subarray(start,end),targetStart),len},Buffer.prototype.fill=function fill(val,start,end,encoding){if("string"==typeof val){if("string"==typeof start?(encoding=start,start=0,end=this.length):"string"==typeof end&&(encoding=end,end=this.length),void 0!==encoding&&"string"!=typeof encoding)throw TypeError("encoding must be a string");if("string"==typeof encoding&&!Buffer.isEncoding(encoding))throw TypeError("Unknown encoding: "+encoding);if(1===val.length){var i,code=val.charCodeAt(0);("utf8"===encoding&&code<128||"latin1"===encoding)&&(val=code)}}else"number"==typeof val?val&=255:"boolean"==typeof val&&(val=Number(val));if(start<0||this.length<start||this.length<end)throw RangeError("Out of range index");if(end<=start)return this;if(start>>>=0,end=void 0===end?this.length:end>>>0,val||(val=0),"number"==typeof val)for(i=start;i<end;++i)this[i]=val;else{var bytes=Buffer.isBuffer(val)?val:Buffer.from(val,encoding),len=bytes.length;if(0===len)throw TypeError('The value "'+val+'" is invalid for argument "value"');for(i=0;i<end-start;++i)this[i+start]=bytes[i%len]}return this};var INVALID_BASE64_RE=/[^+/0-9A-Za-z-_]/g;function base64clean(str){if((str=(str=str.split("=")[0]).trim().replace(INVALID_BASE64_RE,"")).length<2)return"";for(;str.length%4!=0;)str+="=";return str}function utf8ToBytes(string,units){units=units||1/0;for(var codePoint,length=string.length,leadSurrogate=null,bytes=[],i=0;i<length;++i){if((codePoint=string.charCodeAt(i))>55295&&codePoint<57344){if(!leadSurrogate){if(codePoint>56319||i+1===length){(units-=3)>-1&&bytes.push(239,191,189);continue}leadSurrogate=codePoint;continue}if(codePoint<56320){(units-=3)>-1&&bytes.push(239,191,189),leadSurrogate=codePoint;continue}codePoint=(leadSurrogate-55296<<10|codePoint-56320)+65536}else leadSurrogate&&(units-=3)>-1&&bytes.push(239,191,189);if(leadSurrogate=null,codePoint<128){if((units-=1)<0)break;bytes.push(codePoint)}else if(codePoint<2048){if((units-=2)<0)break;bytes.push(codePoint>>6|192,63&codePoint|128)}else if(codePoint<65536){if((units-=3)<0)break;bytes.push(codePoint>>12|224,codePoint>>6&63|128,63&codePoint|128)}else if(codePoint<1114112){if((units-=4)<0)break;bytes.push(codePoint>>18|240,codePoint>>12&63|128,codePoint>>6&63|128,63&codePoint|128)}else throw Error("Invalid code point")}return bytes}function asciiToBytes(str){for(var byteArray=[],i=0;i<str.length;++i)byteArray.push(255&str.charCodeAt(i));return byteArray}function utf16leToBytes(str,units){for(var c,hi,byteArray=[],i=0;i<str.length&&!((units-=2)<0);++i)hi=(c=str.charCodeAt(i))>>8,byteArray.push(c%256),byteArray.push(hi);return byteArray}function base64ToBytes(str){return base64.toByteArray(base64clean(str))}function blitBuffer(src,dst,offset,length){for(var i=0;i<length&&!(i+offset>=dst.length)&&!(i>=src.length);++i)dst[i+offset]=src[i];return i}function isInstance(obj,type){return obj instanceof type||null!=obj&&null!=obj.constructor&&null!=obj.constructor.name&&obj.constructor.name===type.name}var hexSliceLookupTable=function(){for(var alphabet="0123456789abcdef",table=Array(256),i=0;i<16;++i)for(var i16=16*i,j=0;j<16;++j)table[i16+j]=alphabet[i]+alphabet[j];return table}()},"./node_modules/jsbi/dist/jsbi-umd.js":function(module){var _;_=function(){"use strict";var i=Math.imul,_=Math.clz32,t=Math.abs,e=Math.max,g=Math.floor;class o extends Array{constructor(i,_){if(super(i),this.sign=_,i>o.__kMaxLength)throw RangeError("Maximum BigInt size exceeded")}static BigInt(i){var _=Number.isFinite;if("number"==typeof i){if(0===i)return o.__zero();if(o.__isOneDigitInt(i))return 0>i?o.__oneDigit(-i,!0):o.__oneDigit(i,!1);if(!_(i)||g(i)!==i)throw RangeError("The number "+i+" cannot be converted to BigInt because it is not an integer");return o.__fromDouble(i)}if("string"==typeof i){let _=o.__fromString(i);if(null===_)throw SyntaxError("Cannot convert "+i+" to a BigInt");return _}if("boolean"==typeof i)return!0===i?o.__oneDigit(1,!1):o.__zero();if("object"==typeof i){if(i.constructor===o)return i;let _=o.__toPrimitive(i);return o.BigInt(_)}throw TypeError("Cannot convert "+i+" to a BigInt")}toDebugString(){let i=["BigInt["];for(let _ of this)i.push((_?(_>>>0).toString(16):_)+", ");return i.push("]"),i.join("")}toString(i=10){if(2>i||36<i)throw RangeError("toString() radix argument must be between 2 and 36");return 0===this.length?"0":0==(i&i-1)?o.__toStringBasePowerOfTwo(this,i):o.__toStringGeneric(this,i,!1)}static toNumber(i){let _=i.length;if(0===_)return 0;if(1===_){let _=i.__unsignedDigit(0);return i.sign?-_:_}let t=i.__digit(_-1),e=o.__clz30(t),n=30*_-e;if(1024<n)return i.sign?-1/0:1/0;let g=n-1,s=t,l=_-1,r=e+3,a=32===r?0:s<<r;a>>>=12;let u=r-12,d=12<=r?0:s<<20+r,h=20+r;for(0<u&&0<l&&(l--,a|=(s=i.__digit(l))>>>30-u,d=s<<u+2,h=u+2);0<h&&0<l;)l--,s=i.__digit(l),d|=30<=h?s<<h-30:s>>>30-h,h-=30;let m=o.__decideRounding(i,h,l,s);if((1===m||0===m&&1==(1&d))&&0==(d=d+1>>>0)&&0!=++a>>>20&&(a=0,1023<++g))return i.sign?-1/0:1/0;let b=i.sign?-2147483648:0;return g=g+1023<<20,o.__kBitConversionInts[1]=b|g|a,o.__kBitConversionInts[0]=d,o.__kBitConversionDouble[0]}static unaryMinus(i){if(0===i.length)return i;let _=i.__copy();return _.sign=!i.sign,_}static bitwiseNot(i){return i.sign?o.__absoluteSubOne(i).__trim():o.__absoluteAddOne(i,!0)}static exponentiate(i,_){if(_.sign)throw RangeError("Exponent must be positive");if(0===_.length)return o.__oneDigit(1,!1);if(0===i.length)return i;if(1===i.length&&1===i.__digit(0))return i.sign&&0==(1&_.__digit(0))?o.unaryMinus(i):i;if(1<_.length)throw RangeError("BigInt too big");let t=_.__unsignedDigit(0);if(1===t)return i;if(t>=o.__kMaxLengthBits)throw RangeError("BigInt too big");if(1===i.length&&2===i.__digit(0)){let _=1+(0|t/30),n=new o(_,i.sign&&0!=(1&t));n.__initializeDigits();let g=1<<t%30;return n.__setDigit(_-1,g),n}let e=null,n=i;for(0!=(1&t)&&(e=i),t>>=1;0!==t;t>>=1)n=o.multiply(n,n),0!=(1&t)&&(e=null===e?n:o.multiply(e,n));return e}static multiply(_,t){if(0===_.length)return _;if(0===t.length)return t;let i=_.length+t.length;30<=_.__clzmsd()+t.__clzmsd()&&i--;let e=new o(i,_.sign!==t.sign);e.__initializeDigits();for(let n=0;n<_.length;n++)o.__multiplyAccumulate(t,_.__digit(n),e,n);return e.__trim()}static divide(i,_){let n;if(0===_.length)throw RangeError("Division by zero");if(0>o.__absoluteCompare(i,_))return o.__zero();let t=i.sign!==_.sign,e=_.__unsignedDigit(0);if(1===_.length&&32767>=e){if(1===e)return t===i.sign?i:o.unaryMinus(i);n=o.__absoluteDivSmall(i,e,null)}else n=o.__absoluteDivLarge(i,_,!0,!1);return n.sign=t,n.__trim()}static remainder(i,_){if(0===_.length)throw RangeError("Division by zero");if(0>o.__absoluteCompare(i,_))return i;let t=_.__unsignedDigit(0);if(1===_.length&&32767>=t){if(1===t)return o.__zero();let _=o.__absoluteModSmall(i,t);return 0===_?o.__zero():o.__oneDigit(_,i.sign)}let e=o.__absoluteDivLarge(i,_,!1,!0);return e.sign=i.sign,e.__trim()}static add(i,_){let t=i.sign;return t===_.sign?o.__absoluteAdd(i,_,t):0<=o.__absoluteCompare(i,_)?o.__absoluteSub(i,_,t):o.__absoluteSub(_,i,!t)}static subtract(i,_){let t=i.sign;return t===_.sign?0<=o.__absoluteCompare(i,_)?o.__absoluteSub(i,_,t):o.__absoluteSub(_,i,!t):o.__absoluteAdd(i,_,t)}static leftShift(i,_){return 0===_.length||0===i.length?i:_.sign?o.__rightShiftByAbsolute(i,_):o.__leftShiftByAbsolute(i,_)}static signedRightShift(i,_){return 0===_.length||0===i.length?i:_.sign?o.__leftShiftByAbsolute(i,_):o.__rightShiftByAbsolute(i,_)}static unsignedRightShift(){throw TypeError("BigInts have no unsigned right shift; use >> instead")}static lessThan(i,_){return 0>o.__compareToBigInt(i,_)}static lessThanOrEqual(i,_){return 0>=o.__compareToBigInt(i,_)}static greaterThan(i,_){return 0<o.__compareToBigInt(i,_)}static greaterThanOrEqual(i,_){return 0<=o.__compareToBigInt(i,_)}static equal(_,t){if(_.sign!==t.sign||_.length!==t.length)return!1;for(let e=0;e<_.length;e++)if(_.__digit(e)!==t.__digit(e))return!1;return!0}static notEqual(i,_){return!o.equal(i,_)}static bitwiseAnd(i,_){if(!i.sign&&!_.sign)return o.__absoluteAnd(i,_).__trim();if(i.sign&&_.sign){let t=e(i.length,_.length)+1,n=o.__absoluteSubOne(i,t),g=o.__absoluteSubOne(_);return n=o.__absoluteOr(n,g,n),o.__absoluteAddOne(n,!0,n).__trim()}return i.sign&&([i,_]=[_,i]),o.__absoluteAndNot(i,o.__absoluteSubOne(_)).__trim()}static bitwiseXor(i,_){if(!i.sign&&!_.sign)return o.__absoluteXor(i,_).__trim();if(i.sign&&_.sign){let t=e(i.length,_.length),n=o.__absoluteSubOne(i,t),g=o.__absoluteSubOne(_);return o.__absoluteXor(n,g,n).__trim()}let t=e(i.length,_.length)+1;i.sign&&([i,_]=[_,i]);let n=o.__absoluteSubOne(_,t);return n=o.__absoluteXor(n,i,n),o.__absoluteAddOne(n,!0,n).__trim()}static bitwiseOr(i,_){let t=e(i.length,_.length);if(!i.sign&&!_.sign)return o.__absoluteOr(i,_).__trim();if(i.sign&&_.sign){let e=o.__absoluteSubOne(i,t),n=o.__absoluteSubOne(_);return e=o.__absoluteAnd(e,n,e),o.__absoluteAddOne(e,!0,e).__trim()}i.sign&&([i,_]=[_,i]);let n=o.__absoluteSubOne(_,t);return n=o.__absoluteAndNot(n,i,n),o.__absoluteAddOne(n,!0,n).__trim()}static asIntN(_,t){if(0===t.length)return t;if(0>(_=g(_)))throw RangeError("Invalid value: not (convertible to) a safe integer");if(0===_)return o.__zero();if(_>=o.__kMaxLengthBits)return t;let e=0|(_+29)/30;if(t.length<e)return t;let s=t.__unsignedDigit(e-1),l=1<<(_-1)%30;if(t.length===e&&s<l)return t;if((s&l)!==l)return o.__truncateToNBits(_,t);if(!t.sign)return o.__truncateAndSubFromPowerOfTwo(_,t,!0);if(0==(s&l-1)){for(let n=e-2;0<=n;n--)if(0!==t.__digit(n))return o.__truncateAndSubFromPowerOfTwo(_,t,!1);return t.length===e&&s===l?t:o.__truncateToNBits(_,t)}return o.__truncateAndSubFromPowerOfTwo(_,t,!1)}static asUintN(i,_){if(0===_.length)return _;if(0>(i=g(i)))throw RangeError("Invalid value: not (convertible to) a safe integer");if(0===i)return o.__zero();if(_.sign){if(i>o.__kMaxLengthBits)throw RangeError("BigInt too big");return o.__truncateAndSubFromPowerOfTwo(i,_,!1)}if(i>=o.__kMaxLengthBits)return _;let t=0|(i+29)/30;if(_.length<t)return _;let e=i%30;return _.length==t&&(0===e||0==_.__digit(t-1)>>>e)?_:o.__truncateToNBits(i,_)}static ADD(i,_){if(i=o.__toPrimitive(i),_=o.__toPrimitive(_),"string"==typeof i)return"string"!=typeof _&&(_=_.toString()),i+_;if("string"==typeof _)return i.toString()+_;if(i=o.__toNumeric(i),_=o.__toNumeric(_),o.__isBigInt(i)&&o.__isBigInt(_))return o.add(i,_);if("number"==typeof i&&"number"==typeof _)return i+_;throw TypeError("Cannot mix BigInt and other types, use explicit conversions")}static LT(i,_){return o.__compare(i,_,0)}static LE(i,_){return o.__compare(i,_,1)}static GT(i,_){return o.__compare(i,_,2)}static GE(i,_){return o.__compare(i,_,3)}static EQ(i,_){for(;;){if(o.__isBigInt(i))return o.__isBigInt(_)?o.equal(i,_):o.EQ(_,i);if("number"==typeof i){if(o.__isBigInt(_))return o.__equalToNumber(_,i);if("object"!=typeof _)return i==_;_=o.__toPrimitive(_)}else if("string"==typeof i){if(o.__isBigInt(_))return null!==(i=o.__fromString(i))&&o.equal(i,_);if("object"!=typeof _)return i==_;_=o.__toPrimitive(_)}else if("boolean"==typeof i){if(o.__isBigInt(_))return o.__equalToNumber(_,+i);if("object"!=typeof _)return i==_;_=o.__toPrimitive(_)}else if("symbol"==typeof i){if(o.__isBigInt(_))return!1;if("object"!=typeof _)return i==_;_=o.__toPrimitive(_)}else{if("object"!=typeof i||"object"==typeof _&&_.constructor!==o)return i==_;i=o.__toPrimitive(i)}}}static NE(i,_){return!o.EQ(i,_)}static __zero(){return new o(0,!1)}static __oneDigit(i,_){let t=new o(1,_);return t.__setDigit(0,i),t}__copy(){let _=new o(this.length,this.sign);for(let t=0;t<this.length;t++)_[t]=this[t];return _}__trim(){let i=this.length,_=this[i-1];for(;0===_;)_=this[--i-1],this.pop();return 0===i&&(this.sign=!1),this}__initializeDigits(){for(let _=0;_<this.length;_++)this[_]=0}static __decideRounding(i,_,t,e){let n;if(0<_)return -1;if(0>_)n=-_-1;else{if(0===t)return -1;t--,e=i.__digit(t),n=29}let g=1<<n;if(0==(e&g))return -1;if(g-=1,0!=(e&g))return 1;for(;0<t;)if(t--,0!==i.__digit(t))return 1;return 0}static __fromDouble(i){o.__kBitConversionDouble[0]=i;let t=(2047&o.__kBitConversionInts[1]>>>20)-1023,e=(0|t/30)+1,n=new o(e,0>i),g=1048575&o.__kBitConversionInts[1]|1048576,s=o.__kBitConversionInts[0],r=t%30,a,u=0;if(20>r){let i=20-r;u=i+32,a=g>>>i,g=g<<32-i|s>>>i,s<<=32-i}else if(20===r)u=32,a=g,g=s,s=0;else{let i=r-20;u=32-i,a=g<<i|s>>>32-i,g=s<<i,s=0}n.__setDigit(e-1,a);for(let _=e-2;0<=_;_--)0<u?(u-=30,a=g>>>2,g=g<<30|s>>>2,s<<=30):a=0,n.__setDigit(_,a);return n.__trim()}static __isWhitespace(i){return!!(13>=i&&9<=i)||(159>=i?32==i:131071>=i?160==i||5760==i:196607>=i?10>=(i&=131071)||40==i||41==i||47==i||95==i||4096==i:65279==i)}static __fromString(i,_=0){let t=0,e=i.length,n=0;if(0===e)return o.__zero();let g=i.charCodeAt(n);for(;o.__isWhitespace(g);){if(++n===e)return o.__zero();g=i.charCodeAt(n)}if(43===g){if(++n===e)return null;g=i.charCodeAt(n),t=1}else if(45===g){if(++n===e)return null;g=i.charCodeAt(n),t=-1}if(0===_){if(_=10,48===g){if(++n===e)return o.__zero();if(88===(g=i.charCodeAt(n))||120===g){if(_=16,++n===e)return null;g=i.charCodeAt(n)}else if(79===g||111===g){if(_=8,++n===e)return null;g=i.charCodeAt(n)}else if(66===g||98===g){if(_=2,++n===e)return null;g=i.charCodeAt(n)}}}else if(16===_&&48===g){if(++n===e)return o.__zero();if(88===(g=i.charCodeAt(n))||120===g){if(++n===e)return null;g=i.charCodeAt(n)}}if(0!=t&&10!==_)return null;for(;48===g;){if(++n===e)return o.__zero();g=i.charCodeAt(n)}let s=e-n,l=o.__kMaxBitsPerChar[_],r=o.__kBitsPerCharTableMultiplier-1;if(s>1073741824/l)return null;let a=l*s+r>>>o.__kBitsPerCharTableShift,u=new o(0|(a+29)/30,!1),h=10>_?_:10,b=10<_?_-10:0;if(0==(_&_-1)){l>>=o.__kBitsPerCharTableShift;let _=[],t=[],s=!1;do{let o=0,r=0;for(;;){let _;if(g-48>>>0<h)_=g-48;else if((32|g)-97>>>0<b)_=(32|g)-87;else{s=!0;break}if(r+=l,o=o<<l|_,++n===e){s=!0;break}if(g=i.charCodeAt(n),30<r+l)break}_.push(o),t.push(r)}while(!s)o.__fillFromParts(u,_,t)}else{u.__initializeDigits();let t=!1,s=0;do{let a=0,D=1;for(;;){let o;if(g-48>>>0<h)o=g-48;else if((32|g)-97>>>0<b)o=(32|g)-87;else{t=!0;break}let l=D*_;if(1073741823<l)break;if(D=l,a=a*_+o,s++,++n===e){t=!0;break}g=i.charCodeAt(n)}let c=0|(l*s+(r=30*o.__kBitsPerCharTableMultiplier-1)>>>o.__kBitsPerCharTableShift)/30;u.__inplaceMultiplyAdd(D,a,c)}while(!t)}if(n!==e){if(!o.__isWhitespace(g))return null;for(n++;n<e;n++)if(g=i.charCodeAt(n),!o.__isWhitespace(g))return null}return u.sign=-1==t,u.__trim()}static __fillFromParts(_,t,e){let n=0,g=0,o=0;for(let s=t.length-1;0<=s;s--){let i=t[s],l=e[s];g|=i<<o,30===(o+=l)?(_.__setDigit(n++,g),o=0,g=0):30<o&&(_.__setDigit(n++,1073741823&g),o-=30,g=i>>>l-o)}if(0!==g){if(n>=_.length)throw Error("implementation bug");_.__setDigit(n++,g)}for(;n<_.length;n++)_.__setDigit(n,0)}static __toStringBasePowerOfTwo(_,i){let t=_.length,e=i-1,n=e=(15&(e=(51&(e=(85&e>>>1)+(85&e))>>>2)+(51&e))>>>4)+(15&e),g=i-1,s=_.__digit(t-1),r=0|(30*t-o.__clz30(s)+n-1)/n;if(_.sign&&r++,268435456<r)throw Error("string too long");let a=Array(r),u=r-1,d=0,h=0;for(let e=0;e<t-1;e++){let i=_.__digit(e),t=(d|i<<h)&g;a[u--]=o.__kConversionChars[t];let s=n-h;for(d=i>>>s,h=30-s;h>=n;)a[u--]=o.__kConversionChars[d&g],d>>>=n,h-=n}let m=(d|s<<h)&g;for(a[u--]=o.__kConversionChars[m],d=s>>>n-h;0!==d;)a[u--]=o.__kConversionChars[d&g],d>>>=n;if(_.sign&&(a[u--]="-"),-1!=u)throw Error("implementation bug");return a.join("")}static __toStringGeneric(_,i,t){let u,d;let e=_.length;if(0===e)return"";if(1===e){let e=_.__unsignedDigit(0).toString(i);return!1===t&&_.sign&&(e="-"+e),e}let n=30*e-o.__clz30(_.__digit(e-1)),s=o.__kMaxBitsPerChar[i]-1,l=n*o.__kBitsPerCharTableMultiplier;l+=s-1;let r=(l=0|l/s)+1>>1,a=o.exponentiate(o.__oneDigit(i,!1),o.__oneDigit(r,!1)),h=a.__unsignedDigit(0);if(1===a.length&&32767>=h){(u=new o(_.length,!1)).__initializeDigits();let t=0;for(let e=2*_.length-1;0<=e;e--){let i=t<<15|_.__halfDigit(e);u.__setHalfDigit(e,0|i/h),t=0|i%h}d=t.toString(i)}else{let t=o.__absoluteDivLarge(_,a,!0,!0);u=t.quotient;let e=t.remainder.__trim();d=o.__toStringGeneric(e,i,!0)}u.__trim();let m=o.__toStringGeneric(u,i,!0);for(;d.length<r;)d="0"+d;return!1===t&&_.sign&&(m="-"+m),m+d}static __unequalSign(i){return i?-1:1}static __absoluteGreater(i){return i?-1:1}static __absoluteLess(i){return i?1:-1}static __compareToBigInt(i,_){let t=i.sign;if(t!==_.sign)return o.__unequalSign(t);let e=o.__absoluteCompare(i,_);return 0<e?o.__absoluteGreater(t):0>e?o.__absoluteLess(t):0}static __compareToNumber(i,_){if(o.__isOneDigitInt(_)){let e=i.sign,n=0>_;if(e!==n)return o.__unequalSign(e);if(0===i.length){if(n)throw Error("implementation bug");return 0===_?0:-1}if(1<i.length)return o.__absoluteGreater(e);let g=t(_),s=i.__unsignedDigit(0);return s>g?o.__absoluteGreater(e):s<g?o.__absoluteLess(e):0}return o.__compareToDouble(i,_)}static __compareToDouble(i,_){if(_!=_)return _;if(_===1/0)return -1;if(_===-1/0)return 1;let t=i.sign;if(t!==0>_)return o.__unequalSign(t);if(0===_)throw Error("implementation bug: should be handled elsewhere");if(0===i.length)return -1;o.__kBitConversionDouble[0]=_;let e=2047&o.__kBitConversionInts[1]>>>20;if(2047==e)throw Error("implementation bug: handled elsewhere");let n=e-1023;if(0>n)return o.__absoluteGreater(t);let g=i.length,s=i.__digit(g-1),l=o.__clz30(s),r=30*g-l,a=n+1;if(r<a)return o.__absoluteLess(t);if(r>a)return o.__absoluteGreater(t);let u=1048576|1048575&o.__kBitConversionInts[1],d=o.__kBitConversionInts[0],m=29-l;if(m!==(0|(r-1)%30))throw Error("implementation bug");let b,D=0;if(20>m){let i=20-m;D=i+32,b=u>>>i,u=u<<32-i|d>>>i,d<<=32-i}else if(20===m)D=32,b=u,u=d,d=0;else{let i=m-20;D=32-i,b=u<<i|d>>>32-i,u=d<<i,d=0}if((s>>>=0)>(b>>>=0))return o.__absoluteGreater(t);if(s<b)return o.__absoluteLess(t);for(let e=g-2;0<=e;e--){0<D?(D-=30,b=u>>>2,u=u<<30|d>>>2,d<<=30):b=0;let _=i.__unsignedDigit(e);if(_>b)return o.__absoluteGreater(t);if(_<b)return o.__absoluteLess(t)}if(0!==u||0!==d){if(0===D)throw Error("implementation bug");return o.__absoluteLess(t)}return 0}static __equalToNumber(i,_){return o.__isOneDigitInt(_)?0===_?0===i.length:1===i.length&&i.sign===0>_&&i.__unsignedDigit(0)===t(_):0===o.__compareToDouble(i,_)}static __comparisonResultToBool(i,_){return 0===_?0>i:1===_?0>=i:2===_?0<i:3===_?0<=i:void 0}static __compare(i,_,t){if(i=o.__toPrimitive(i),_=o.__toPrimitive(_),"string"==typeof i&&"string"==typeof _)switch(t){case 0:return i<_;case 1:return i<=_;case 2:return i>_;case 3:return i>=_}if(o.__isBigInt(i)&&"string"==typeof _)return null!==(_=o.__fromString(_))&&o.__comparisonResultToBool(o.__compareToBigInt(i,_),t);if("string"==typeof i&&o.__isBigInt(_))return null!==(i=o.__fromString(i))&&o.__comparisonResultToBool(o.__compareToBigInt(i,_),t);if(i=o.__toNumeric(i),_=o.__toNumeric(_),o.__isBigInt(i)){if(o.__isBigInt(_))return o.__comparisonResultToBool(o.__compareToBigInt(i,_),t);if("number"!=typeof _)throw Error("implementation bug");return o.__comparisonResultToBool(o.__compareToNumber(i,_),t)}if("number"!=typeof i)throw Error("implementation bug");if(o.__isBigInt(_))return o.__comparisonResultToBool(o.__compareToNumber(_,i),2^t);if("number"!=typeof _)throw Error("implementation bug");return 0===t?i<_:1===t?i<=_:2===t?i>_:3===t?i>=_:void 0}__clzmsd(){return o.__clz30(this.__digit(this.length-1))}static __absoluteAdd(_,t,e){if(_.length<t.length)return o.__absoluteAdd(t,_,e);if(0===_.length)return _;if(0===t.length)return _.sign===e?_:o.unaryMinus(_);let n=_.length;(0===_.__clzmsd()||t.length===_.length&&0===t.__clzmsd())&&n++;let g=new o(n,e),s=0,l=0;for(;l<t.length;l++){let i=_.__digit(l)+t.__digit(l)+s;s=i>>>30,g.__setDigit(l,1073741823&i)}for(;l<_.length;l++){let i=_.__digit(l)+s;s=i>>>30,g.__setDigit(l,1073741823&i)}return l<g.length&&g.__setDigit(l,s),g.__trim()}static __absoluteSub(_,t,e){if(0===_.length)return _;if(0===t.length)return _.sign===e?_:o.unaryMinus(_);let n=new o(_.length,e),g=0,s=0;for(;s<t.length;s++){let i=_.__digit(s)-t.__digit(s)-g;g=1&i>>>30,n.__setDigit(s,1073741823&i)}for(;s<_.length;s++){let i=_.__digit(s)-g;g=1&i>>>30,n.__setDigit(s,1073741823&i)}return n.__trim()}static __absoluteAddOne(_,i,t=null){let e=_.length;null===t?t=new o(e,i):t.sign=i;let n=1;for(let g=0;g<e;g++){let i=_.__digit(g)+n;n=i>>>30,t.__setDigit(g,1073741823&i)}return 0!=n&&t.__setDigitGrow(e,1),t}static __absoluteSubOne(_,t){let e=_.length,n=new o(t=t||e,!1),g=1;for(let o=0;o<e;o++){let i=_.__digit(o)-g;g=1&i>>>30,n.__setDigit(o,1073741823&i)}if(0!=g)throw Error("implementation bug");for(let g=e;g<t;g++)n.__setDigit(g,0);return n}static __absoluteAnd(_,t,e=null){let n=_.length,g=t.length,s=g;if(n<g){s=n;let i=_,e=n;_=t,n=g,t=i,g=e}let l=s;null===e?e=new o(l,!1):l=e.length;let r=0;for(;r<s;r++)e.__setDigit(r,_.__digit(r)&t.__digit(r));for(;r<l;r++)e.__setDigit(r,0);return e}static __absoluteAndNot(_,t,e=null){let n=_.length,g=t.length,s=g;n<g&&(s=n);let l=n;null===e?e=new o(l,!1):l=e.length;let r=0;for(;r<s;r++)e.__setDigit(r,_.__digit(r)&~t.__digit(r));for(;r<n;r++)e.__setDigit(r,_.__digit(r));for(;r<l;r++)e.__setDigit(r,0);return e}static __absoluteOr(_,t,e=null){let n=_.length,g=t.length,s=g;if(n<g){s=n;let i=_,e=n;_=t,n=g,t=i,g=e}let l=n;null===e?e=new o(l,!1):l=e.length;let r=0;for(;r<s;r++)e.__setDigit(r,_.__digit(r)|t.__digit(r));for(;r<n;r++)e.__setDigit(r,_.__digit(r));for(;r<l;r++)e.__setDigit(r,0);return e}static __absoluteXor(_,t,e=null){let n=_.length,g=t.length,s=g;if(n<g){s=n;let i=_,e=n;_=t,n=g,t=i,g=e}let l=n;null===e?e=new o(l,!1):l=e.length;let r=0;for(;r<s;r++)e.__setDigit(r,_.__digit(r)^t.__digit(r));for(;r<n;r++)e.__setDigit(r,_.__digit(r));for(;r<l;r++)e.__setDigit(r,0);return e}static __absoluteCompare(_,t){let e=_.length-t.length;if(0!=e)return e;let n=_.length-1;for(;0<=n&&_.__digit(n)===t.__digit(n);)n--;return 0>n?0:_.__unsignedDigit(n)>t.__unsignedDigit(n)?1:-1}static __multiplyAccumulate(_,t,e,n){if(0===t)return;let g=32767&t,s=t>>>15,l=0,r=0;for(let a,u=0;u<_.length;u++,n++){a=e.__digit(n);let i=_.__digit(u),t=32767&i,d=i>>>15,h=o.__imul(t,g),m=o.__imul(t,s),b=o.__imul(d,g),D=o.__imul(d,s);a+=r+h+l,l=a>>>30,a&=1073741823,a+=((32767&m)<<15)+((32767&b)<<15),l+=a>>>30,r=D+(m>>>15)+(b>>>15),e.__setDigit(n,1073741823&a)}for(;0!=l||0!==r;n++){let i=e.__digit(n);i+=l+r,r=0,l=i>>>30,e.__setDigit(n,1073741823&i)}}static __internalMultiplyAdd(_,t,e,g,s){let l=e,a=0;for(let n=0;n<g;n++){let i=_.__digit(n),e=o.__imul(32767&i,t),g=o.__imul(i>>>15,t),u=e+((32767&g)<<15)+a+l;l=u>>>30,a=g>>>15,s.__setDigit(n,1073741823&u)}if(s.length>g)for(s.__setDigit(g++,l+a);g<s.length;)s.__setDigit(g++,0);else if(0!==l+a)throw Error("implementation bug")}__inplaceMultiplyAdd(i,_,t){t>this.length&&(t=this.length);let e=32767&i,n=i>>>15,g=0,s=_;for(let l=0;l<t;l++){let i=this.__digit(l),_=32767&i,t=i>>>15,r=o.__imul(_,e),a=o.__imul(_,n),u=o.__imul(t,e),d=o.__imul(t,n),h=s+r+g;g=h>>>30,h&=1073741823,h+=((32767&a)<<15)+((32767&u)<<15),g+=h>>>30,s=d+(a>>>15)+(u>>>15),this.__setDigit(l,1073741823&h)}if(0!=g||0!==s)throw Error("implementation bug")}static __absoluteDivSmall(_,t,e=null){null===e&&(e=new o(_.length,!1));let n=0;for(let g,o=2*_.length-1;0<=o;o-=2){let i=0|(g=(n<<15|_.__halfDigit(o))>>>0)/t,s=0|(g=((n=0|g%t)<<15|_.__halfDigit(o-1))>>>0)/t;n=0|g%t,e.__setDigit(o>>>1,i<<15|s)}return e}static __absoluteModSmall(_,t){let e=0;for(let n=2*_.length-1;0<=n;n--)e=0|((e<<15|_.__halfDigit(n))>>>0)%t;return e}static __absoluteDivLarge(i,_,t,e){let g=_.__halfDigitLength(),n=_.length,s=i.__halfDigitLength()-g,l=null;t&&(l=new o(s+2>>>1,!1)).__initializeDigits();let r=new o(g+2>>>1,!1);r.__initializeDigits();let a=o.__clz15(_.__halfDigit(g-1));0<a&&(_=o.__specialLeftShift(_,a,0));let d=o.__specialLeftShift(i,a,1),u=_.__halfDigit(g-1),h=0;for(let a,m=s;0<=m;m--){a=32767;let i=d.__halfDigit(m+g);if(i!==u){let t=(i<<15|d.__halfDigit(m+g-1))>>>0;a=0|t/u;let e=0|t%u,n=_.__halfDigit(g-2),s=d.__halfDigit(m+g-2);for(;o.__imul(a,n)>>>0>(e<<16|s)>>>0&&(a--,!(32767<(e+=u))););}o.__internalMultiplyAdd(_,a,0,n,r);let e=d.__inplaceSub(r,m,g+1);0!==e&&(e=d.__inplaceAdd(_,m,g),d.__setHalfDigit(m+g,32767&d.__halfDigit(m+g)+e),a--),t&&(1&m?h=a<<15:l.__setDigit(m>>>1,h|a))}if(e)return d.__inplaceRightShift(a),t?{quotient:l,remainder:d}:d;if(t)return l;throw Error("unreachable")}static __clz15(i){return o.__clz30(i)-15}__inplaceAdd(_,t,e){let n=0;for(let g=0;g<e;g++){let i=this.__halfDigit(t+g)+_.__halfDigit(g)+n;n=i>>>15,this.__setHalfDigit(t+g,32767&i)}return n}__inplaceSub(_,t,e){let n=0;if(1&t){t>>=1;let g=this.__digit(t),o=32767&g,s=0;for(;s<e-1>>>1;s++){let i=_.__digit(s),e=(g>>>15)-(32767&i)-n;n=1&e>>>15,this.__setDigit(t+s,(32767&e)<<15|32767&o),n=1&(o=(32767&(g=this.__digit(t+s+1)))-(i>>>15)-n)>>>15}let i=_.__digit(s),l=(g>>>15)-(32767&i)-n;if(n=1&l>>>15,this.__setDigit(t+s,(32767&l)<<15|32767&o),t+s+1>=this.length)throw RangeError("out of bounds");0==(1&e)&&(n=1&(o=(32767&(g=this.__digit(t+s+1)))-(i>>>15)-n)>>>15,this.__setDigit(t+_.length,1073709056&g|32767&o))}else{t>>=1;let g=0;for(;g<_.length-1;g++){let i=this.__digit(t+g),e=_.__digit(g),o=(32767&i)-(32767&e)-n,s=(i>>>15)-(e>>>15)-(n=1&o>>>15);n=1&s>>>15,this.__setDigit(t+g,(32767&s)<<15|32767&o)}let i=this.__digit(t+g),o=_.__digit(g),s=(32767&i)-(32767&o)-n;n=1&s>>>15;let l=0;0==(1&e)&&(n=1&(l=(i>>>15)-(o>>>15)-n)>>>15),this.__setDigit(t+g,(32767&l)<<15|32767&s)}return n}__inplaceRightShift(_){if(0===_)return;let t=this.__digit(0)>>>_,e=this.length-1;for(let n=0;n<e;n++){let i=this.__digit(n+1);this.__setDigit(n,1073741823&i<<30-_|t),t=i>>>_}this.__setDigit(e,t)}static __specialLeftShift(_,t,e){let g=_.length,n=new o(g+e,!1);if(0===t){for(let t=0;t<g;t++)n.__setDigit(t,_.__digit(t));return 0<e&&n.__setDigit(g,0),n}let s=0;for(let o=0;o<g;o++){let i=_.__digit(o);n.__setDigit(o,1073741823&i<<t|s),s=i>>>30-t}return 0<e&&n.__setDigit(g,s),n}static __leftShiftByAbsolute(_,i){let t=o.__toShiftAmount(i);if(0>t)throw RangeError("BigInt too big");let e=0|t/30,n=t%30,g=_.length,s=0!==n&&0!=_.__digit(g-1)>>>30-n,l=g+e+(s?1:0),r=new o(l,_.sign);if(0===n){let t=0;for(;t<e;t++)r.__setDigit(t,0);for(;t<l;t++)r.__setDigit(t,_.__digit(t-e))}else{let t=0;for(let _=0;_<e;_++)r.__setDigit(_,0);for(let o=0;o<g;o++){let i=_.__digit(o);r.__setDigit(o+e,1073741823&i<<n|t),t=i>>>30-n}if(s)r.__setDigit(g+e,t);else if(0!==t)throw Error("implementation bug")}return r.__trim()}static __rightShiftByAbsolute(_,i){let t=_.length,e=_.sign,n=o.__toShiftAmount(i);if(0>n)return o.__rightShiftByMaximum(e);let g=0|n/30,s=n%30,l=t-g;if(0>=l)return o.__rightShiftByMaximum(e);let r=!1;if(e){if(0!=(_.__digit(g)&(1<<s)-1))r=!0;else for(let t=0;t<g;t++)if(0!==_.__digit(t)){r=!0;break}}r&&0===s&&0==~_.__digit(t-1)&&l++;let a=new o(l,e);if(0===s){a.__setDigit(l-1,0);for(let e=g;e<t;e++)a.__setDigit(e-g,_.__digit(e))}else{let e=_.__digit(g)>>>s,n=t-g-1;for(let t=0;t<n;t++){let i=_.__digit(t+g+1);a.__setDigit(t,1073741823&i<<30-s|e),e=i>>>s}a.__setDigit(n,e)}return r&&(a=o.__absoluteAddOne(a,!0,a)),a.__trim()}static __rightShiftByMaximum(i){return i?o.__oneDigit(1,!0):o.__zero()}static __toShiftAmount(i){if(1<i.length)return -1;let _=i.__unsignedDigit(0);return _>o.__kMaxLengthBits?-1:_}static __toPrimitive(i,_="default"){if("object"!=typeof i||i.constructor===o)return i;if("undefined"!=typeof Symbol&&"symbol"==typeof Symbol.toPrimitive){let t=i[Symbol.toPrimitive];if(t){let i=t(_);if("object"!=typeof i)return i;throw TypeError("Cannot convert object to primitive value")}}let t=i.valueOf;if(t){let _=t.call(i);if("object"!=typeof _)return _}let e=i.toString;if(e){let _=e.call(i);if("object"!=typeof _)return _}throw TypeError("Cannot convert object to primitive value")}static __toNumeric(i){return o.__isBigInt(i)?i:+i}static __isBigInt(i){return"object"==typeof i&&null!==i&&i.constructor===o}static __truncateToNBits(i,_){let t=0|(i+29)/30,e=new o(t,_.sign),n=t-1;for(let t=0;t<n;t++)e.__setDigit(t,_.__digit(t));let g=_.__digit(n);if(0!=i%30){let _=32-i%30;g=g<<_>>>_}return e.__setDigit(n,g),e.__trim()}static __truncateAndSubFromPowerOfTwo(_,t,e){let h;var n=Math.min;let g=0|(_+29)/30,s=new o(g,e),l=0,r=g-1,a=0;for(let i=n(r,t.length);l<i;l++){let i=0-t.__digit(l)-a;a=1&i>>>30,s.__setDigit(l,1073741823&i)}for(;l<r;l++)s.__setDigit(l,0|1073741823&-a);let u=r<t.length?t.__digit(r):0,d=_%30;if(0==d)h=0-u-a&1073741823;else{let i=32-d;u=u<<i>>>i;let _=1<<32-i;h=_-u-a&_-1}return s.__setDigit(r,h),s.__trim()}__digit(_){return this[_]}__unsignedDigit(_){return this[_]>>>0}__setDigit(_,i){this[_]=0|i}__setDigitGrow(_,i){this[_]=0|i}__halfDigitLength(){let i=this.length;return 32767>=this.__unsignedDigit(i-1)?2*i-1:2*i}__halfDigit(_){return 32767&this[_>>>1]>>>15*(1&_)}__setHalfDigit(_,i){let t=_>>>1,e=this.__digit(t);this.__setDigit(t,1&_?32767&e|i<<15:1073709056&e|32767&i)}static __digitPow(i,_){let t=1;for(;0<_;)1&_&&(t*=i),_>>>=1,i*=i;return t}static __isOneDigitInt(i){return(1073741823&i)===i}}return o.__kMaxLength=33554432,o.__kMaxLengthBits=o.__kMaxLength<<5,o.__kMaxBitsPerChar=[0,0,32,51,64,75,83,90,96,102,107,111,115,119,122,126,128,131,134,136,139,141,143,145,147,149,151,153,154,156,158,159,160,162,163,165,166],o.__kBitsPerCharTableShift=5,o.__kBitsPerCharTableMultiplier=1<<o.__kBitsPerCharTableShift,o.__kConversionChars=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"],o.__kBitConversionBuffer=new ArrayBuffer(8),o.__kBitConversionDouble=new Float64Array(o.__kBitConversionBuffer),o.__kBitConversionInts=new Int32Array(o.__kBitConversionBuffer),o.__clz30=_?function(i){return _(i)-2}:function(i){var _=Math.LN2,t=Math.log;return 0===i?30:0|29-(0|t(i>>>0)/_)},o.__imul=i||function(i,_){return 0|i*_},o},module.exports=_()}}]);
//# sourceMappingURL=17539.5b2b1479.iframe.bundle.js.map