1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[784],{5507:function(t,n){"use strict";function encode(t){if(Array.isArray(t)){let n=[],i=0;for(let s=0;s<t.length;s++){let p=encode(t[s]);n.push(p),i+=p.length}return concatBytes(encodeLength(i,192),...n)}let n=toBytes(t);return 1===n.length&&n[0]<128?n:concatBytes(encodeLength(n.length,128),n)}function safeSlice(t,n,i){if(i>t.length)throw Error("invalid RLP (safeSlice): end slice of Uint8Array out-of-bounds");return t.slice(n,i)}function decodeLength(t){if(0===t[0])throw Error("invalid RLP: extra zeros");return parseHexByte(bytesToHex(t))}function encodeLength(t,n){if(t<56)return Uint8Array.from([t+n]);let i=numberToHex(t),s=i.length/2,p=numberToHex(n+55+s);return Uint8Array.from(hexToBytes(p+i))}function decode(t,n=!1){if(null==t||0===t.length)return Uint8Array.from([]);let i=toBytes(t),s=_decode(i);if(n)return s;if(0!==s.remainder.length)throw Error("invalid RLP: remainder must be zero");return s.data}function _decode(t){let n,i,s,p,b;let g=[],y=t[0];if(y<=127)return{data:t.slice(0,1),remainder:t.slice(1)};if(y<=183){if(n=y-127,s=128===y?Uint8Array.from([]):safeSlice(t,1,n),2===n&&s[0]<128)throw Error("invalid RLP encoding: invalid prefix, single byte < 0x80 are not prefixed");return{data:s,remainder:t.slice(n)}}if(y<=191){if(i=y-182,t.length-1<i)throw Error("invalid RLP: not enough bytes for string length");if((n=decodeLength(safeSlice(t,1,i)))<=55)throw Error("invalid RLP: expected string length to be greater than 55");return{data:s=safeSlice(t,i,n+i),remainder:t.slice(n+i)}}if(y<=247){for(p=safeSlice(t,1,n=y-191);p.length;)b=_decode(p),g.push(b.data),p=b.remainder;return{data:g,remainder:t.slice(n)}}{if((n=decodeLength(safeSlice(t,1,i=y-246)))<56)throw Error("invalid RLP: encoded list too short");let s=i+n;if(s>t.length)throw Error("invalid RLP: total length is larger than the data");for(p=safeSlice(t,i,s);p.length;)b=_decode(p),g.push(b.data),p=b.remainder;return{data:g,remainder:t.slice(s)}}}Object.defineProperty(n,"__esModule",{value:!0}),n.RLP=n.utils=n.decode=n.encode=void 0,n.encode=encode,n.decode=decode;let i=Array.from({length:256},(t,n)=>n.toString(16).padStart(2,"0"));function bytesToHex(t){let n="";for(let s=0;s<t.length;s++)n+=i[t[s]];return n}function parseHexByte(t){let n=Number.parseInt(t,16);if(Number.isNaN(n))throw Error("Invalid byte sequence");return n}function hexToBytes(t){if("string"!=typeof t)throw TypeError("hexToBytes: expected string, got "+typeof t);if(t.length%2)throw Error("hexToBytes: received invalid unpadded hex");let n=new Uint8Array(t.length/2);for(let i=0;i<n.length;i++){let s=2*i;n[i]=parseHexByte(t.slice(s,s+2))}return n}function concatBytes(...t){if(1===t.length)return t[0];let n=t.reduce((t,n)=>t+n.length,0),i=new Uint8Array(n);for(let n=0,s=0;n<t.length;n++){let p=t[n];i.set(p,s),s+=p.length}return i}function utf8ToBytes(t){return new TextEncoder().encode(t)}function numberToHex(t){if(t<0)throw Error("Invalid integer as argument, must be unsigned!");let n=t.toString(16);return n.length%2?`0${n}`:n}function padToEven(t){return t.length%2?`0${t}`:t}function isHexPrefixed(t){return t.length>=2&&"0"===t[0]&&"x"===t[1]}function stripHexPrefix(t){return"string"!=typeof t?t:isHexPrefixed(t)?t.slice(2):t}function toBytes(t){if(t instanceof Uint8Array)return t;if("string"==typeof t)return isHexPrefixed(t)?hexToBytes(padToEven(stripHexPrefix(t))):utf8ToBytes(t);if("number"==typeof t||"bigint"==typeof t)return t?hexToBytes(numberToHex(t)):Uint8Array.from([]);if(null==t)return Uint8Array.from([]);throw Error("toBytes: received unsupported type "+typeof t)}n.utils={bytesToHex,concatBytes,hexToBytes,utf8ToBytes},n.RLP={encode,decode}},78e3:function(t,n,i){"use strict";var s=i(48764).Buffer;Object.defineProperty(n,"__esModule",{value:!0}),n.accountBodyToRLP=n.accountBodyToSlim=n.accountBodyFromSlim=n.isZeroAddress=n.zeroAddress=n.importPublic=n.privateToAddress=n.privateToPublic=n.publicToAddress=n.pubToAddress=n.isValidPublic=n.isValidPrivate=n.generateAddress2=n.generateAddress=n.isValidChecksumAddress=n.toChecksumAddress=n.isValidAddress=n.Account=void 0;let p=i(5507),b=i(82192),g=i(95053),y=i(58040),m=i(38289),_=i(66219),v=i(38480),w=i(24712),S=BigInt(0);let Account=class Account{constructor(t=S,n=S,i=_.KECCAK256_RLP,s=_.KECCAK256_NULL){this.nonce=t,this.balance=n,this.storageRoot=i,this.codeHash=s,this._val
1idate()}static fromAccountData(t){let{nonce:n,balance:i,storageRoot:s,codeHash:p}=t;return new Account(void 0!==n?(0,m.bufferToBigInt)((0,m.toBuffer)(n)):void 0,void 0!==i?(0,m.bufferToBigInt)((0,m.toBuffer)(i)):void 0,void 0!==s?(0,m.toBuffer)(s):void 0,void 0!==p?(0,m.toBuffer)(p):void 0)}static fromRlpSerializedAccount(t){let n=(0,m.arrToBufArr)(p.RLP.decode(Uint8Array.from(t)));if(!Array.isArray(n))throw Error("Invalid serialized account input. Must be array");return this.fromValuesArray(n)}static fromValuesArray(t){let[n,i,s,p]=t;return new Account((0,m.bufferToBigInt)(n),(0,m.bufferToBigInt)(i),s,p)}_validate(){if(this.nonce<S)throw Error("nonce must be greater than zero");if(this.balance<S)throw Error("balance must be greater than zero");if(32!==this.storageRoot.length)throw Error("storageRoot must have a length of 32");if(32!==this.codeHash.length)throw Error("codeHash must have a length of 32")}raw(){return[(0,m.bigIntToUnpaddedBuffer)(this.nonce),(0,m.bigIntToUnpaddedBuffer)(this.balance),this.storageRoot,this.codeHash]}serialize(){return s.from(p.RLP.encode((0,m.bufArrToArr)(this.raw())))}isContract(){return!this.codeHash.equals(_.KECCAK256_NULL)}isEmpty(){return this.balance===S&&this.nonce===S&&this.codeHash.equals(_.KECCAK256_NULL)}};function accountBodyFromSlim(t){let[n,i,s,p]=t;return[n,i,0===(0,m.arrToBufArr)(s).length?_.KECCAK256_RLP:s,0===(0,m.arrToBufArr)(p).length?_.KECCAK256_NULL:p]}n.Account=Account,n.isValidAddress=function(t){try{(0,v.assertIsString)(t)}catch(t){return!1}return/^0x[0-9a-fA-F]{40}$/.test(t)},n.toChecksumAddress=function(t,n){(0,v.assertIsHexString)(t);let i=(0,w.stripHexPrefix)(t).toLowerCase(),p="";if(void 0!==n){let t=(0,m.bufferToBigInt)((0,m.toBuffer)(n));p=t.toString()+"0x"}let g=s.from(p+i,"utf8"),_=(0,y.bytesToHex)((0,b.keccak256)(g)),S="0x";for(let t=0;t<i.length;t++)parseInt(_[t],16)>=8?S+=i[t].toUpperCase():S+=i[t];return S},n.isValidChecksumAddress=function(t,i){return(0,n.isValidAddress)(t)&&(0,n.toChecksumAddress)(t,i)===t},n.generateAddress=function(t,n){return((0,v.assertIsBuffer)(t),(0,v.assertIsBuffer)(n),(0,m.bufferToBigInt)(n)===BigInt(0))?s.from((0,b.keccak256)(p.RLP.encode((0,m.bufArrToArr)([t,null])))).slice(-20):s.from((0,b.keccak256)(p.RLP.encode((0,m.bufArrToArr)([t,n])))).slice(-20)},n.generateAddress2=function(t,n,i){if((0,v.assertIsBuffer)(t),(0,v.assertIsBuffer)(n),(0,v.assertIsBuffer)(i),20!==t.length)throw Error("Expected from to be of length 20");if(32!==n.length)throw Error("Expected salt to be of length 32");let p=(0,b.keccak256)(s.concat([s.from("ff","hex"),t,n,(0,b.keccak256)(i)]));return(0,m.toBuffer)(p).slice(-20)},n.isValidPrivate=function(t){return g.secp256k1.utils.isValidPrivateKey(t)},n.isValidPublic=function(t,n=!1){if((0,v.assertIsBuffer)(t),64===t.length)try{return g.secp256k1.ProjectivePoint.fromHex(s.concat([s.from([4]),t])),!0}catch(t){return!1}if(!n)return!1;try{return g.secp256k1.ProjectivePoint.fromHex(t),!0}catch(t){return!1}},n.pubToAddress=function(t,n=!1){if((0,v.assertIsBuffer)(t),n&&64!==t.length&&(t=s.from(g.secp256k1.ProjectivePoint.fromHex(t).toRawBytes(!1).slice(1))),64!==t.length)throw Error("Expected pubKey to be of length 64");return s.from((0,b.keccak256)(t)).slice(-20)},n.publicToAddress=n.pubToAddress,n.privateToPublic=function(t){return(0,v.assertIsBuffer)(t),s.from(g.secp256k1.ProjectivePoint.fromPrivateKey(t).toRawBytes(!1).slice(1))},n.privateToAddress=function(t){return(0,n.publicToAddress)((0,n.privateToPublic)(t))},n.importPublic=function(t){return(0,v.assertIsBuffer)(t),64!==t.length&&(t=s.from(g.secp256k1.ProjectivePoint.fromHex(t).toRawBytes(!1).slice(1))),t},n.zeroAddress=function(){let t=(0,m.zeros)(20);return(0,m.bufferToHex)(t)},n.isZeroAddress=function(t){try{(0,v.assertIsString)(t)}catch(t){return!1}let i=(0,n.zeroAddress)();return i===t},n.accountBodyFromSlim=accountBodyFromSlim;let R=new Uint8Array(0);function accountBodyToSlim(t){let[n,i,s,p]=t;return[n,i,(0,m.arrToBufArr)(s).equals(_.KECCAK256_RLP)?R:s,(0,m.arrToBufArr)(p).equals(_.KECCAK256_NULL)?R:p]}function accountBodyToRLP(t,n=!0){let i=n?accountBodyFromSlim(t):t;return(0,m.arrToBufArr)(p.RLP.encode(i))}n.accountBodyToSlim=accountBodyToSlim,n.accountBodyToRLP=accountBodyToRLP},13415:function(t,n,i){"use strict";var s=i(48764).Buffer;Object.defineProperty(n,"__esModule",{value:!0}),n.Address=void 0;let p=i(78e3),b=i(38289);let Address=class Address{constructor(t){if(20!==t.length)throw Error("Invalid address length");this.buf=t}static zero(){return new Address((0,b.zeros)(20))}static fromString(t){if(!(0,p.isValidAddress)(t))throw Error("Invalid address");return new Address((0,b.toBuffer)(t))}static fromPublicKey(t){if(!s.isBuffer(t))throw Error("Public key should be Buffer");let n=(0,p.pubToAddress)(t);return new Address(n)}static fromPrivateKey(t){if(!s.isBuffer(t))throw Error("Private key should be Buffer");let n=(0,p.privateToAddress)(t);return new Address(n)}static generate(t,n){if("bigint"!=typeof n)throw Error("Expected nonce to be a bigint");return new Address((0,p.generateAddress)(t.buf,(0,b.bigIntToBuffer)(n)))}static generate2(t,n,i){if(!s.isBuffer(n))throw Error("Expected salt to be a Buffer");if(!s.isBuffer(i))throw Error("Expected initCode to be a Buffer");return new Address((0,p.generateAddress2)(t.buf,n,i))}equals(t){return this.buf.equals(t.buf)}isZero(){return this.equals(Address.zero())}isPrecompileOrSystemAddress(){let t=(0,b.bufferToBigInt)(this.buf),n=BigInt(0),i=BigInt("0xffff");return t>=n&&t<=i}toString(){return"0x"+this.buf.toString("hex")}toBuffer(){return s.from(this.buf)}};n.Address=Address},67285:function(t,n,i){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.AsyncEventEmitter=void 0;let s=i(17187);async function runInSeries(t,n,i){let s;for await(let p of n)try{p.length<2?p.call(t,i):await new Promise((n,s)=>{p.call(t,i,t=>{t?s(t):n()})})}catch(t){s=t}if(s)throw s}let AsyncEventEmitter=class AsyncEventEmitter extends s.EventEmitter{emit(t,...n){let[i,s]=n,p=this._events[t]??[];return void 0===s&&"function"==typeof i&&(s=i,i=void 0),("newListener"===t||"removeListener"===t)&&(i={event:i,fn:s},s=void 0),runInSeries(this,(p=Array.isArray(p)?p:[p]).slice(),i).then(s).catch(s),this.listenerCount(t)>0}once(t,n){let i;let s=this;if("function"!=typeof n)throw TypeError("listener must be a function");return i=n.length>=2?function(p,b){s.removeListener(t,i),n(p,b)}:function(p){s.removeListener(t,i),n(p,i)},s.on(t,i),s}first(t,n){let i=this._events[t]??[];
1if("function"!=typeof n)throw TypeError("listener must be a function");return Array.isArray(i)||(this._events[t]=i=[i]),i.unshift(n),this}before(t,n,i){return this.beforeOrAfter(t,n,i)}after(t,n,i){return this.beforeOrAfter(t,n,i,"after")}beforeOrAfter(t,n,i,s){let p,b,g=this._events[t]??[],y="after"===s?1:0;if("function"!=typeof i)throw TypeError("listener must be a function");if("function"!=typeof n)throw TypeError("target must be a function");for(Array.isArray(g)||(this._events[t]=g=[g]),b=g.length,p=g.length;p--;)if(g[p]===n){b=p+y;break}return g.splice(b,0,i),this}on(t,n){return super.on(t,n)}addListener(t,n){return super.addListener(t,n)}prependListener(t,n){return super.prependListener(t,n)}prependOnceListener(t,n){return super.prependOnceListener(t,n)}removeAllListeners(t){return super.removeAllListeners(t)}removeListener(t,n){return super.removeListener(t,n)}eventNames(){return super.eventNames()}listeners(t){return super.listeners(t)}listenerCount(t){return super.listenerCount(t)}getMaxListeners(){return super.getMaxListeners()}setMaxListeners(t){return super.setMaxListeners(t)}};n.AsyncEventEmitter=AsyncEventEmitter},38289:function(t,n,i){"use strict";var s=i(48764).Buffer;Object.defineProperty(n,"__esModule",{value:!0}),n.intToUnpaddedBuffer=n.bigIntToUnpaddedBuffer=n.bigIntToHex=n.bufArrToArr=n.arrToBufArr=n.validateNoLeadingZeroes=n.baToJSON=n.toUtf8=n.short=n.addHexPrefix=n.toUnsigned=n.fromSigned=n.bufferToInt=n.bigIntToBuffer=n.bufferToBigInt=n.bufferToHex=n.toBuffer=n.unpadHexString=n.unpadArray=n.unpadBuffer=n.setLengthRight=n.setLengthLeft=n.zeros=n.intToBuffer=n.intToHex=void 0;let p=i(38480),b=i(24712);n.intToHex=function(t){if(!Number.isSafeInteger(t)||t<0)throw Error(`Received an invalid integer type: ${t}`);return`0x${t.toString(16)}`},n.intToBuffer=function(t){let i=(0,n.intToHex)(t);return s.from((0,b.padToEven)(i.slice(2)),"hex")},n.zeros=function(t){return s.allocUnsafe(t).fill(0)};let setLength=function(t,i,s){let p=(0,n.zeros)(i);return s?t.length<i?(t.copy(p),p):t.slice(0,i):t.length<i?(t.copy(p,i-t.length),p):t.slice(-i)};
1n.setLengthLeft=function(t,n){return(0,p.assertIsBuffer)(t),setLength(t,n,!1)},n.setLengthRight=function(t,n){return(0,p.assertIsBuffer)(t),setLength(t,n,!0)};let stripZeros=function(t){let n=t[0];for(;t.length>0&&"0"===n.toString();)n=(t=t.slice(1))[0];return t};function bufferToBigInt(t){let i=(0,n.bufferToHex)(t);return"0x"===i?BigInt(0):BigInt(i)}function bigIntToBuffer(t){return(0,n.toBuffer)("0x"+t.toString(16))}function short(t,n=50){let i=s.isBuffer(t)?t.toString("hex"):t;return i.length<=n?i:i.slice(0,n)+"â¦"}function arrToBufArr(t){return Array.isArray(t)?t.map(t=>arrToBufArr(t)):s.from(t)}function bufArrToArr(t){return Array.isArray(t)?t.map(t=>bufArrToArr(t)):Uint8Array.from(t??[])}function bigIntToUnpaddedBuffer(t){return(0,n.unpadBuffer)(bigIntToBuffer(t))}function intToUnpaddedBuffer(t){return(0,n.unpadBuffer)((0,n.intToBuffer)(t))}n.unpadBuffer=function(t){return(0,p.assertIsBuffer)(t),stripZeros(t)},n.unpadArray=function(t){return(0,p.assertIsArray)(t),stripZeros(t)},n.unpadHexString=function(t){return(0,p.assertIsHexString)(t),"0x"+stripZeros(t=(0,b.stripHexPrefix)(t))},n.toBuffer=function(t){if(null==t)return s.allocUnsafe(0);if(s.isBuffer(t)||Array.isArray(t)||t instanceof Uint8Array)return s.from(t);if("string"==typeof t){if(!(0,b.isHexString)(t))throw Error(`Cannot convert string to buffer. toBuffer only supports 0x-prefixed hex strings and this string was given: ${t}`);return s.from((0,b.padToEven)((0,b.stripHexPrefix)(t)),"hex")}if("number"==typeof t)return(0,n.intToBuffer)(t);if("bigint"==typeof t){if(t<BigInt(0))throw Error(`Cannot convert negative bigint to buffer. Given: ${t}`);let n=t.toString(16);return n.length%2&&(n="0"+n),s.from(n,"hex")}if(t.toArray)return s.from(t.toArray());if(t.toBuffer)return s.from(t.toBuffer());throw Error("invalid type")},n.bufferToHex=function(t){return"0x"+(t=(0,n.toBuffer)(t)).toString("hex")},n.bufferToBigInt=bufferToBigInt,n.bigIntToBuffer=bigIntToBuffer,n.bufferToInt=function(t){let n=Number(bufferToBigInt(t));if(!Number.isSafeInteger(n))throw Error("Number exceeds 53 bits");return n},n.fromSigned=function(t){return BigInt.asIntN(256,bufferToBigInt(t))},n.toUnsigned=function(t){return bigIntToBuffer(BigInt.asUintN(256,t))},n.addHexPrefix=function(t){return"string"!=typeof t?t:(0,b.isHexPrefixed)(t)?t:"0x"+t},n.short=short,n.toUtf8=function(t){if((t=(0,b.stripHexPrefix)(t)).length%2!=0)throw Error("Invalid non-even hex string input for toUtf8() provided");let n=s.from(t.replace(/^(00)+|(00)+$/g,""),"hex");return n.toString("utf8")},n.baToJSON=function(t){if(s.isBuffer(t))return`0x${t.toString("hex")}`;if(t instanceof Array){let i=[];for(let s=0;s<t.length;s++)i.push((0,n.baToJSON)(t[s]));return i}},n.validateNoLeadingZeroes=function(t){for(let[n,i]of Object.entries(t))if(void 0!==i&&i.length>0&&0===i[0])throw Error(`${n} cannot have leading zeroes, received: ${i.toString("hex")}`)},n.arrToBufArr=arrToBufArr,n.bufArrToArr=bufArrToArr,n.bigIntToHex=t=>"0x"+t.toString(16),n.bigIntToUnpaddedBuffer=bigIntToUnpaddedBuffer,n.intToUnpaddedBuffer=intToUnpaddedBuffer},66219:function(t,n,i){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.MAX_WITHDRAWALS_PER_PAYLOAD=n.RLP_EMPTY_STRING=n.KECCAK256_RLP=n.KECCAK256_RLP_S=n.KECCAK256_RLP_ARRAY=n.KECCAK256_RLP_ARRAY_S=n.KECCAK256_NULL=n.KECCAK256_NULL_S=n.TWO_POW256=n.SECP256K1_ORDER_DIV_2=n.SECP256K1_ORDER=n.MAX_INTEGER_BIGINT=n.MAX_INTEGER=n.MAX_UINT64=void 0;let s=i(48764),p=i(95053);n.MAX_UINT64=BigInt("0xffffffffffffffff"),n.MAX_INTEGER=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),n.MAX_INTEGER_BIGINT=BigInt("115792089237316195423570985008687907853269984665640564039457584007913129639935"),n.SECP256K1_ORDER=p.secp256k1.CURVE.n,n.SECP256K1_ORDER_DIV_2=p.secp256k1.CURVE.n/BigInt(2),n.TWO_POW256=BigInt("0x10000000000000000000000000000000000000000000000000000000000000000"),n.KECCAK256_NULL_S="c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",n.KECCAK256_NULL=s.Buffer.from(n.KECCAK256_NULL_S,"hex"),n.KECCAK256_RLP_ARRAY_S="1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",n.KECCAK256_RLP_ARRAY=s.Buffer.from(n.KECCAK256_RLP_ARRAY_S,"hex"),n.KECCAK256_RLP_S="56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",n.KECCAK256_RLP=s.Buffer.from(n.KECCAK256_RLP_S,"hex"),n.RLP_EMPTY_STRING=s.Buffer.from([128]),n.MAX_WITHDRAWALS_PER_PAYLOAD=16},33791:function(t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.compactBytesToNibbles=n.bytesToNibbles=n.nibblesToCompactBytes=n.nibblesToBytes=n.hasTerminator=void 0,n.hasTerminator=t=>t.length>0&&16===t[t.length-1],n.nibblesToBytes=(t,n)=>{for(let i=0,s=0;s<t.length;
1i+=1,s+=2)n[i]=t[s]<<4|t[s+1]},n.nibblesToCompactBytes=t=>{let i=0;(0,n.hasTerminator)(t)&&(i=1,t=t.subarray(0,t.length-1));let s=new Uint8Array(t.length/2+1);return s[0]=i<<5,(1&t.length)==1&&(s[0]|=16,s[0]|=t[0],t=t.subarray(1)),(0,n.nibblesToBytes)(t,s.subarray(1)),s},n.bytesToNibbles=t=>{let n=2*t.length+1,i=new Uint8Array(n);for(let n=0;n<t.length;n++){let s=t[n];i[2*n]=s/16,i[2*n+1]=s%16}return i[n-1]=16,i},n.compactBytesToNibbles=t=>{if(0===t.length)return t;let i=(0,n.bytesToNibbles)(t);i[0]<2&&(i=i.subarray(0,i.length-1));let s=2-(1&i[0]);return i.subarray(s)}},38480:function(t,n,i){"use strict";var s=i(48764).Buffer;Object.defineProperty(n,"__esModule",{value:!0}),n.assertIsString=n.assertIsArray=n.assertIsBuffer=n.assertIsHexString=void 0;let p=i(24712);n.assertIsHexString=function(t){if(!(0,p.isHexString)(t)){let n=`This method only supports 0x-prefixed hex strings but input was: ${t}`;throw Error(n)}},n.assertIsBuffer=function(t){if(!s.isBuffer(t)){let n=`This method only supports Buffer but input was: ${t}`;throw Error(n)}},n.assertIsArray=function(t){if(!Array.isArray(t)){let n=`This method only supports number arrays but input was: ${t}`;throw Error(n)}},n.assertIsString=function(t){if("string"!=typeof t){let n=`This method only supports strings but input was: ${t}`;throw Error(n)}}},92730:function(t,n,i){"use strict";var s=this&&this.__createBinding||(Object.create?function(t,n,i,s){void 0===s&&(s=i);var p=Object.getOwnPropertyDescriptor(n,i);(!p||("get"in p?!n.__esModule:p.writable||p.configurable))&&(p={enumerable:!0,get:function(){return n[i]}}),Object.defineProperty(t,s,p)}:function(t,n,i,s){void 0===s&&(s=i),t[s]=n[i]}),p=this&&this.__exportStar||function(t,n){for(var i in t)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||s(n,t,i)};Object.defineProperty(n,"__esModule",{value:!0}),n.toAscii=n.stripHexPrefix=n.padToEven=n.isHexString=n.isHexPrefixed=n.getKeys=n.getBinarySize=n.fromUtf8=n.fromAscii=n.arrayContainsArray=void 0,p(i(66219),n),p(i(4554),n),p(i(78e3),n),p(i(13415),n),p(i(44683),n),p(i(85026),n),p(i(38289),n),p(i(21200),n),p(i(33791),n),p(i(67285),n);var b=i(24712);Object.defineProperty(n,"arrayContainsArray",{enumerable:!0,get:function(){return b.arrayContainsArray}}),Object.defineProperty(n,"fromAscii",{enumerable:!0,get:function(){return b.fromAscii}}),Object.defineProperty(n,"fromUtf8",{enumerable:!0,get:function(){return b.fromUtf8}}),Object.defineProperty(n,"getBinarySize",{enumerable:!0,get:function(){return b.getBinarySize}}),Object.defineProperty(n,"getKeys",{enumerable:!0,get:function(){return b.getKeys}}),Object.defineProperty(n,"isHexPrefixed",{enumerable:!0,get:function(){return b.isHexPrefixed}}),Object.defineProperty(n,"isHexString",{enumerable:!0,get:function(){return b.isHexString}}),Object.defineProperty(n,"padToEven",{enumerable:!0,get:function(){return b.padToEven}}),Object.defineProperty(n,"stripHexPrefix",{enumerable:!0,get:function(){return b.stripHexPrefix}}),Object.defineProperty(n,"toAscii",{enumerable:!0,get:function(){return b.toAscii}}),p(i(43543),n),p(i(10438),n)},24712:function(t,n,i){"use strict";var s=i(48764).Buffer;function isHexPrefixed(t){if("string"!=typeof t)throw Error(`[isHexPrefixed] input must be type 'string', received type ${typeof t}`);return"0"===t[0]&&"x"===t[1]}function padToEven(t){let n=t;if("string"!=typeof n)throw Error(`[padToEven] value must be type 'string', received ${typeof n}`);return n.length%2&&(n=`0${n}`),n}function getBinarySize(t){if("string"!=typeof t)throw Error(`[getBinarySize] method requires input type 'string', received ${typeof t}`);return s.byteLength(t,"utf8")}function arrayContainsArray(t,n,i){if(!0!==Array.isArray(t))throw Error(`[arrayContainsArray] method requires input 'superset' to be an array, got type '${typeof t}'`);if(!0!==Array.isArray(n))throw Error(`[arrayContainsArray] method requires input 'subset' to be an array, got type '${typeof n}'`);return n[!0===i?"some":"every"](n=>t.indexOf(n)>=0)}function toAscii(t){let n="",i=0,s=t.length;for("0x"===t.substring(0,2)&&(i=2);i<s;i+=2){let s=parseInt(t.substr(i,2),16);n+=String.fromCharCode(s)}return n}function fromUtf8(t){let n=s.from(t,"utf8");return`0x${padToEven(n.toString("hex")).replace(/^0+|0+$/g,"")}`}function fromAscii(t){let n="";for(let i=0;i<t.length;i++){let s=t.charCodeAt(i),p=s.toString(16);n+=p.length<2?`0${p}`:p}return`0x${n}`}function getKeys(t,n,i){if(!Array.isArray(t))throw Error(`[getKeys] method expects input 'params' to be an array, got ${typeof t}`);if("string"!=typeof n)throw Error(`[getKeys] method expects input 'ke
1y' to be type 'string', got ${typeof t}`);let s=[];for(let p=0;p<t.length;p++){let b=t[p][n];if(!0!==i||b){if("string"!=typeof b)throw Error(`invalid abi - expected type 'string', received ${typeof b}`)}else b="";s.push(b)}return s}function isHexString(t,n){return"string"==typeof t&&!!t.match(/^0x[0-9A-Fa-f]*$/)&&(void 0===n||!(n>0)||t.length===2+2*n)}Object.defineProperty(n,"__esModule",{value:!0}),n.isHexString=n.getKeys=n.fromAscii=n.fromUtf8=n.toAscii=n.arrayContainsArray=n.getBinarySize=n.padToEven=n.stripHexPrefix=n.isHexPrefixed=void 0,n.isHexPrefixed=isHexPrefixed,n.stripHexPrefix=t=>{if("string"!=typeof t)throw Error(`[stripHexPrefix] input must be type 'string', received ${typeof t}`);return isHexPrefixed(t)?t.slice(2):t},n.padToEven=padToEven,n.getBinarySize=getBinarySize,n.arrayContainsArray=arrayContainsArray,n.toAscii=toAscii,n.fromUtf8=fromUtf8,n.fromAscii=fromAscii,n.getKeys=getKeys,n.isHexString=isHexString},43543:function(t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Lock=void 0;let Lock=class Lock{constructor(){this.permits=1,this.promiseResolverQueue=[]}async acquire(){return this.permits>0?(this.permits-=1,Promise.resolve(!0)):new Promise(t=>this.promiseResolverQueue.push(t))}release(){if(this.permits+=1,this.permits>1&&this.promiseResolverQueue.length>0)console.warn("Lock.permits should never be > 0 when there is someone waiting.");else if(1===this.permits&&this.promiseResolverQueue.length>0){this.permits-=1;let t=this.promiseResolverQueue.shift();t&&t(!0)}}};n.Lock=Lock},10438:function(t,n,i){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getProvider=n.fetchFromProvider=void 0;let s=i(64898),fetchFromProvider=async(t,n)=>{let i=await (0,s.default)(t,{headers:{"content-type":"application/json"},type:"json",data:{method:n.method,params:n.params,jsonrpc:"2.0",id:1}});return i.result};n.fetchFromProvider=fetchFromProvider,n.getProvider=t=>{if("string"==typeof t)return t;if(t?.connection?.url!==void 0)return t.connection.url;throw Error("Must provide valid provider URL or Web3Provider")}},85026:function(t,n,i){"use strict";var s=i(48764).Buffer;Object.defineProperty(n,"__esModule",{value:!0}),n.hashPersonalMessage=n.isValidSignature=n.fromRpcSig=n.toCompactSig=n.toRpcSig=n.ecrecover=n.ecsign=void 0;let p=i(82192),b=i(95053),g=i(38289),y=i(66219),m=i(38480);function ecsign(t,n,i){let p=b.secp256k1.sign(t,n),g=p.toCompactRawBytes(),y=s.from(g.slice(0,32)),m=s.from(g.slice(32,64)),_=void 0===i?BigInt(p.recovery+27):BigInt(p.recovery+35)+BigInt(i)*BigInt(2);return{r:y,s:m,v:_}}function calculateSigRecovery(t,n){return t===BigInt(0)||t===BigInt(1)?t:void 0===n?t-BigInt(27):t-(n*BigInt(2)+BigInt(35))}function isValidSigRecovery(t){return t===BigInt(0)||t===BigInt(1)}n.ecsign=ecsign,n.ecrecover=function(t,n,i,p,y){let m=s.concat([(0,g.setLengthLeft)(i,32),(0,g.setLengthLeft)(p,32)],64),_=calculateSigRecovery(n,y);if(!isValidSigRecovery(_))throw Error("Invalid signature v value");let v=b.secp256k1.Signature.fromCompact(m).addRecoveryBit(Number(_)),w=v.recoverPublicKey(t);return s.from(w.toRawBytes(!1).slice(1))},n.toRpcSig=function(t,n,i,p){let b=calculateSigRecovery(t,p);if(!isValidSigRecovery(b))throw Error("Invalid signature v value");return(0,g.bufferToHex)(s.concat([(0,g.setLengthLeft)(n,32),(0,g.setLengthLeft)(i,32),(0,g.toBuffer)(t)]))},n.toCompactSig=function(t,n,i,p){let b=calculateSigRecovery(t,p);if(!isValidSigRecovery(b))throw Error("Invalid signature v value");let y=i;return(t>BigInt(28)&&t%BigInt(2)===BigInt(1)||t===BigInt(1)||t===BigInt(28))&&(y=s.from(i),y[0]|=128),(0,g.bufferToHex)(s.concat([(0,g.setLengthLeft)(n,32),(0,g.setLengthLeft)(y,32)]))},n.fromRpcSig=function(t){let n,i,s;let p=(0,g.toBuffer)(t);if(p.length>=65)n=p.slice(0,32),i=p.slice(32,64),s=(0,g.bufferToBigInt)(p.slice(64));else if(64===p.length)n=p.slice(0,32),i=p.slice(32,64),s=BigInt((0,g.bufferToInt)(p.slice(32,33))>>7),i[0]&=127;else throw Error("Invalid signature length");return s<27&&(s+=BigInt(27)),{v:s,r:n,s:i}},n.isValidSignature=function(t,n,i,s=!0,p){if(32!==n.length||32!==i.length||!isValidSigRecovery(calculateSigRecovery(t,p)))return!1;let b=(0,g.bufferToBigInt)(n),m=(0,g.bufferToBigInt)(i);return b!==BigInt(0)&&!(b>=y.SECP256K1_ORDER)&&m!==BigInt(0)&&!(m>=y.SECP256K1_ORDER)&&(!s||!(m>=y.SECP256K1_ORDER_DIV_2))},n.hashPersonalMessage=function(t){(0,m.assertIsBuffer)(t);let n=s.from(`\u0019Ethereum Signed Message: 2${t.length}`,"utf-8");return s.from((0,p.keccak256)(s.concat([n,t])))}},21200:function(t,n,i){"use strict";var s,p;Object.defineProperty(n,"__esModule",{value:!0}),n.toType=n.TypeOutput=void 0;let b=i(38289),g=i(24712);function toType(t,n){if(null===t)return null;if(void 0===t)return;if("string"!=typeof t||(0,g.isHexString)(t)){if("number"==typeof t&&!Number.isSafeInteger(t))throw Error("The provided number is greater than MAX_SAFE_INTEGER (please use an alternative input type)")}else throw Error(`A string must be provided with a 0x-prefix, given: ${t}`);let i=(0,b.toBuffer)(t);switch(n){case s.Buffer:return i;case s.BigInt:return(0,b.bufferToBigInt)(i);case s.Number:{let t=(0,b.bufferToBigInt)(i);if(t>BigInt(Number.MAX_SAFE_INTEGER))throw Error("The provided number is greater than MAX_SAFE_INTEGER (please use an alternative output type)");return Number(t)}case s.PrefixedHexString:return(0,b.bufferToHex)(i);default:throw Error("unknown outputType")}}(p=s=n.TypeOutput||(n.TypeOutput={}))[p.Number=0]="Number",p[p.BigInt=1]="BigInt",p[p.Buffer=2]="Buffer",p[p.PrefixedHexString=3]="PrefixedHexString",n.toType=toType},4554:function(t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}
2),n.GWEI_TO_WEI=void 0,n.GWEI_TO_WEI=BigInt(1e9)},44683:function(t,n,i){"use strict";var s=i(48764).Buffer;Object.defineProperty(n,"__esModule",{value:!0}),n.Withdrawal=void 0;let p=i(13415),b=i(38289),g=i(21200);let Withdrawal=class Withdrawal{constructor(t,n,i,s){this.index=t,this.validatorIndex=n,this.address=i,this.amount=s}static fromWithdrawalData(t){let{index:n,validatorIndex:i,address:s,amount:b}=t,y=(0,g.toType)(n,g.TypeOutput.BigInt),m=(0,g.toType)(i,g.TypeOutput.BigInt),_=new p.Address((0,g.toType)(s,g.TypeOutput.Buffer)),v=(0,g.toType)(b,g.TypeOutput.BigInt);return new Withdrawal(y,m,_,v)}static fromValuesArray(t){if(4!==t.length)throw Error(`Invalid withdrawalArray length expected=4 actual=${t.length}`);let[n,i,s,p]=t;return Withdrawal.fromWithdrawalData({index:n,validatorIndex:i,address:s,amount:p})}static toBufferArray(t){let n;let{index:i,validatorIndex:b,address:y,amount:m}=t,_=(0,g.toType)(i,g.TypeOutput.BigInt)===BigInt(0)?s.alloc(0):(0,g.toType)(i,g.TypeOutput.Buffer),v=(0,g.toType)(b,g.TypeOutput.BigInt)===BigInt(0)?s.alloc(0):(0,g.toType)(b,g.TypeOutput.Buffer);n=y instanceof p.Address?y.buf:(0,g.toType)(y,g.TypeOutput.Buffer);let w=(0,g.toType)(m,g.TypeOutput.BigInt)===BigInt(0)?s.alloc(0):(0,g.toType)(m,g.TypeOutput.Buffer);return[_,v,n,w]}raw(){return Withdrawal.toBufferArray(this)}toValue(){return{index:this.index,validatorIndex:this.validatorIndex,address:this.address.buf,amount:this.amount}}toJSON(){return{index:(0,b.bigIntToHex)(this.index),validatorIndex:(0,b.bigIntToHex)(this.validatorIndex),address:"0x"+this.address.buf.toString("hex"),amount:(0,b.bigIntToHex)(this.amount)}}};n.Withdrawal=Withdrawal},34320:function(t,n,i){"use strict";var s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(n,"__esModule",{value:!0}),n.EthereumProviderError=n.JsonRpcError=void 0;let p=i(42451),b=s(i(4445)),g=i(88164);let JsonRpcError=class JsonRpcError extends Error{constructor(t,n,i){if(!Number.isInteger(t))throw Error('"code" must be an integer.');if(!n||"string"!=typeof n)throw Error('"message" must be a non-empty string.');super(n),this.code=t,void 0!==i&&(this.data=i)}serialize(){let t={code:this.code,message:this.message};return void 0!==this.data&&(t.data=this.data,(0,p.isPlainObject)(this.data)&&(t.data.cause=(0,g.serializeCause)(this.data.cause))),this.stack&&(t.stack=this.stack),t}toString(){return(0,b.default)(this.serialize(),stringifyReplacer,2)}};n.JsonRpcError=JsonRpcError;let EthereumProviderError=class EthereumProviderError extends JsonRpcError{constructor(t,n,i){if(!isValidEthProviderCode(t))throw Error('"code" must be an integer such that: 1000 <= code <= 4999');super(t,n,i)}};function isValidEthProviderCode(t){return Number.isInteger(t)&&t>=1e3&&t<=4999}function stringifyReplacer(t,n){if("[Circular]"!==n)return n}n.EthereumProviderError=EthereumProviderError},90537:function(t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.errorValues=n.errorCodes=void 0,n.errorCodes={rpc:{invalidInput:-32e3,resourceNotFound:-32001,resourceUnavailable:-32002,transactionRejected:-32003,methodNotSupported:-32004,limitExceeded:-32005,parse:-32700,invalidRequest:-32600,methodNotFound:-32601,invalidParams:-32602,internal:-32603},provider:{userRejectedRequest:4001,unauthorized:4100,unsupportedMethod:4200,disconnected:4900,chainDisconnected:4901}},n.errorValues={"-32700":{standard:"JSON RPC 2.0",message:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."},"-32600":{standard:"JSON RPC 2.0",message:"The JSON sent is not a valid Request object."},"-32601":{standard:"JSON RPC 2.0",message:"The method does not exist / is not available."},"-32602":{standard:"JSON RPC 2.0",message:"Invalid method parameter(s)."},"-32603":{standard:"JSON RPC 2.0",message:"Internal JSON-RPC error."},"-32000":{standard:"EIP-1474",message:"Invalid input."},"-32001":{standard:"EIP-1474",message:"Resource not found."},"-32002":{standard:"EIP-1474",message:"Resource unavailable."},"-32003":{standard:"EIP-1474",message:"Transaction rejected."},"-32004":{standard:"EIP-1474",message:"Method not supported."},"-32005":{standard:"EIP-1474",message:"Request limit exceeded."},4001:{standard:"EIP-1193",message:"User rejected the request."},4100:{standard:"EIP-1193",message:"The requested account and/or method has not been authorized by the user."},4200:{standard:"EIP-1193",message:"The requested method is not supported by this Ethereum provider."},4900:{standard:"EIP-1193",message:"The provider is disconnected from all chains."},4901:{standard:"EIP-1193",message:"The provider is disconnected from the specified chain."}}},62546:function(t,n,i){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.providerErrors=n.rpcErrors=void 0;let s=i(34320),p=i(90537),b=i(88164);function getJsonRpcError(t,n){let[i,p]=parseOpts(n);return new s.JsonRpcError(t,i??(0,b.getMessageFromCode)(t),p)}function getEthProviderError(t,n){let[i,p]=parseOpts(n);return new s.EthereumProviderError(t,i??(0,b.getMessageFromCode)(t),p)}function parseOpts(t){if(t){if("string"==typeof t)return[t];if("object"==typeof t&&!Array.isArray(t)){let{message:n,data:i}=t;
2if(n&&"string"!=typeof n)throw Error("Must specify string message.");return[n??void 0,i]}}return[]}n.rpcErrors={parse:t=>getJsonRpcError(p.errorCodes.rpc.parse,t),invalidRequest:t=>getJsonRpcError(p.errorCodes.rpc.invalidRequest,t),invalidParams:t=>getJsonRpcError(p.errorCodes.rpc.invalidParams,t),methodNotFound:t=>getJsonRpcError(p.errorCodes.rpc.methodNotFound,t),internal:t=>getJsonRpcError(p.errorCodes.rpc.internal,t),server:t=>{if(!t||"object"!=typeof t||Array.isArray(t))throw Error("Ethereum RPC Server errors must provide single object argument.");let{code:n}=t;if(!Number.isInteger(n)||n>-32005||n<-32099)throw Error('"code" must be an integer such that: -32099 <= code <= -32005');return getJsonRpcError(n,t)},invalidInput:t=>getJsonRpcError(p.errorCodes.rpc.invalidInput,t),resourceNotFound:t=>getJsonRpcError(p.errorCodes.rpc.resourceNotFound,t),resourceUnavailable:t=>getJsonRpcError(p.errorCodes.rpc.resourceUnavailable,t),transactionRejected:t=>getJsonRpcError(p.errorCodes.rpc.transactionRejected,t),methodNotSupported:t=>getJsonRpcError(p.errorCodes.rpc.methodNotSupported,t),limitExceeded:t=>getJsonRpcError(p.errorCodes.rpc.limitExceeded,t)},n.providerErrors={userRejectedRequest:t=>getEthProviderError(p.errorCodes.provider.userRejectedRequest,t),unauthorized:t=>getEthProviderError(p.errorCodes.provider.unauthorized,t),unsupportedMethod:t=>getEthProviderError(p.errorCodes.provider.unsupportedMethod,t),disconnected:t=>getEthProviderError(p.errorCodes.provider.disconnected,t),chainDisconnected:t=>getEthProviderError(p.errorCodes.provider.chainDisconnected,t),custom:t=>{if(!t||"object"!=typeof t||Array.isArray(t))throw Error("Ethereum Provider custom errors must provide single object argument.");let{code:n,message:i,data:p}=t;if(!i||"string"!=typeof i)throw Error('"message" must be a nonempty string');return new s.EthereumProviderError(n,i,p)}}},39428:function(t,n,i){"use strict";i(34320),i(88164),i(62546),i(90537)},88164:function(t,n,i){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.serializeCause=n.serializeError=n.isValidCode=n.getMessageFromCode=n.JSON_RPC_SERVER_ERROR_MESSAGE=void 0;let s=i(42451),p=i(90537),b=p.errorCodes.rpc.internal,g={code:b,message:getMessageFromCode(b)};function getMessageFromCode(t,i="Unspecified error message. This is a bug, please report it."){if(isValidCode(t)){let i=t.toString();
2if((0,s.hasProperty)(p.errorValues,i))return p.errorValues[i].message;if(isJsonRpcServerError(t))return n.JSON_RPC_SERVER_ERROR_MESSAGE}return i}function isValidCode(t){return Number.isInteger(t)}function serializeError(t,{fallbackError:n=g,shouldIncludeStack:i=!0}={}){if(!(0,s.isJsonRpcError)(n))throw Error("Must provide fallback error with integer number code and string message.");let p=buildError(t,n);return i||delete p.stack,p}function buildError(t,n){if(t&&"object"==typeof t&&"serialize"in t&&"function"==typeof t.serialize)return t.serialize();if((0,s.isJsonRpcError)(t))return t;let i=serializeCause(t),p={...n,data:{cause:i}};return p}function isJsonRpcServerError(t){return t>=-32099&&t<=-32e3}function serializeCause(t){return Array.isArray(t)?t.map(t=>(0,s.isValidJson)(t)?t:(0,s.isObject)(t)?serializeObject(t):null):(0,s.isObject)(t)?serializeObject(t):(0,s.isValidJson)(t)?t:null}function serializeObject(t){return Object.getOwnPropertyNames(t).reduce((n,i)=>{let p=t[i];return(0,s.isValidJson)(p)&&(n[i]=p),n},{})}n.JSON_RPC_SERVER_ERROR_MESSAGE="Unspecified server error.",n.getMessageFromCode=getMessageFromCode,n.isValidCode=isValidCode,n.serializeError=serializeError,n.serializeCause=serializeCause},31422:function(t,n,i){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.assertExhaustive=n.assertStruct=n.assert=n.AssertionError=void 0;let s=i(11821);function isErrorWithMessage(t){return"object"==typeof t&&null!==t&&"message"in t}function isConstructable(t){var n,i;return"string"==typeof(null===(i=null===(n=null==t?void 0:t.prototype)||void 0===n?void 0:n.constructor)||void 0===i?void 0:i.name)}function getErrorMessage(t){let n=isErrorWithMessage(t)?t.message:String(t);return n.endsWith(".")?n.slice(0,-1):n}function getError(t,n){return isConstructable(t)?new t({message:n}):t({message:n})}let AssertionError=class AssertionError extends Error{constructor(t){super(t.message),this.code="ERR_ASSERTION"}};function assert(t,n="Assertion failed.",i=AssertionError){if(!t){if(n instanceof Error)throw n;throw getError(i,n)}}function assertStruct(t,n,i="Assertion failed",p=AssertionError){try{(0,s.assert)(t,n)}catch(t){throw getError(p,`${i}: ${getErrorMessage(t)}.`)}}function assertExhaustive(t){throw Error("Invalid branch reached. Should be detected during compilation.")}n.AssertionError=AssertionError,n.assert=assert,n.assertStruct=assertStruct,n.assertExhaustive=assertExhaustive},47207:function(t,n,i){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.base64=void 0;let s=i(11821),p=i(31422);n.base64=(t,n={})=>{var i,b;let g,y;let m=null!==(i=n.paddingRequired)&&void 0!==i&&i,_=null!==(b=n.characterSet)&&void 0!==b?b:"base64";return"base64"===_?g=String.raw`[A-Za-z0-9+\/]`:((0,p.assert)("base64url"===_),g=String.raw`[-_A-Za-z0-9]`),y=m?RegExp(`^(?:${g}{4})*(?:${g}{3}=|${g}{2}==)?$`,"u"):RegExp(`^(?:${g}{4})*(?:${g}{2,3}|${g}{3}=|${g}{2}==)?$`,"u"),(0,s.pattern)(t,y)}},8476:function(t,n,i){"use strict";var s=i(48764).Buffer;Object.defineProperty(n,"__esModule",{value:!0}),n.createDataView=n.concatBytes=n.valueToBytes=n.stringToBytes=n.numberToBytes=n.signedBigIntToBytes=n.bigIntToBytes=n.hexToBytes=n.bytesToString=n.bytesToNumber=n.bytesToSignedBigInt=n.bytesToBigInt=n.bytesToHex=n.assertIsBytes=n.isBytes=void 0;let p=i(31422),b=i(62009);function getPrecomputedHexValuesBuilder(){let t=[];return()=>{if(0===t.length)for(let n=0;n<256;n++)t.push(n.toString(16).padStart(2,"0"));return t}}let g=getPrecomputedHexValuesBuilder();function isBytes(t){return t instanceof Uint8Array}function assertIsBytes(t){(0,p.assert)(isBytes(t),"Value must be a Uint8Array.")}function bytesToHex(t){if(assertIsBytes(t),0===t.length)return"0x";let n=g(),i=Array(t.length);for(let s=0;s<t.length;s++)i[s]=n[t[s]];return(0,b.add0x)(i.join(""))}function bytesToBigInt(t){assertIsBytes(t);let n=bytesToHex(t);return BigInt(n)}function bytesToSignedBigInt(t){assertIsBytes(t);let n=BigInt(0);for(let i of t)n=(n<<BigInt(8))+BigInt(i);return BigInt.asIntN(8*t.length,n)}function bytesToNumber(t){assertIsBytes(t);let n=bytesToBigInt(t);return(0,p.assert)(n<=BigInt(Number.MAX_SAFE_INTEGER),"Number is not a safe integer. Use `bytesToBigInt` instead."),Number(n)}function bytesToString(t){return assertIsBytes(t),new TextDecoder().decode(t)}function hexToBytes(t){var n;if((null===(n=null==t?void 0:t.toLowerCase)||void 0===n?void 0:n.call(t))==="0x")return new Uint8Array;(0,b.assertIsHexString)(t);let i=(0,b.remove0x)(t).toLowerCase(),s=i.length%2==0?i:`0${i}`,p=new Uint8Array(s.length/2);for(let t=0;t<p.length;t++){let n=s.charCodeAt(2*t),i=s.charCodeAt(2*t+1),b=n-(n<58?48:87),g=i-(i<58?48:87);p[t]=16*b+g}return p}function bigIntToBytes(t){(0,p.assert)("bigint"==typeof t,"Value must be a bigint."),(0,p.assert)(t>=BigInt(0),"Value must be a non-negative bigint.");let n=t.toString(16);return hexToBytes(n)}function bigIntFits(t,n){(0,p.assert)(n>0);let i=t>>BigInt(31);return!((~t&i)+(t&~i)>>BigInt(8*n+-1))}function signedBigIntToBytes(t,n){(0,p.assert)("bigint"==typeof t,"Value must be a bigint."),(0,p.assert)("number"==typeof n,"Byte length must be a number."),(0,p.assert)(n>0,"Byte length must be greater than 0."),(0,p.assert)(bigIntFits(t,n),"Byte length is too small to represent the given value.");let i=t,s=new Uint8Array(n);for(let t=0;t<s.length;t++)s[t]=Number(BigInt.asUintN(8,i)),i>>=BigInt(8);return s.reverse()}function numberToBytes(t){(0,p.assert)("number"==typeof t,"Value must be a number."),(0,p.assert)(t>=0,"Value must be a non-negative number."),(0,p.assert)(Number.isSafeInteger(t),"Value is not a safe integer. Use `bigIntToBytes` instead.");let n=t.toString(16);return hexToBytes(n)}function stringToBytes(t){return(0,p.assert)("string"==typeof t,"Value must be a string."),new TextEncoder().encode(t)}function valueToBytes(t){if("bigint"==typeof t)return bigIntToBytes(t);if("number"==typeof t)return numberToBytes(t);if("string"==typeof t)return t.startsWith("0x")?hexToBytes(t):stringToBytes(t);if(isBytes(t))return t;throw TypeError(`Unsupported value type: "${typeof t}".`)}function concatBytes(t){let n=Array(t.length),i=0;for(let s=0;s<t.length;s++){let p=valueToBytes(t[s]);n[s]=p,i+=p.length}let s=new Uint8Array(i);for(let t=0,i=0;t<n.length;t++)s.set(n[t],i),i+=n[t].length;return s}function createDataView(t){if(void 0!==s&&t instanceof s){let n=t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength);return new DataView(n)}return new DataView(t.buffer,t.byteOffset,t.byteLength)}n.isBytes=isBytes,n.assertIsBytes=assertIsBytes,n.bytesToHex=bytesToHex,n.bytesToBigInt=bytesToBigInt,n.bytesToSignedBigInt=bytesToSignedBigInt,n.bytesToNumber=bytesToNumber,n.bytesToString=bytesToString,n.hexToBytes=hexToBytes,n.bigIntToBytes=bigIntToBytes,n.signedBigIntToBytes=signedBigIntToBytes,n.numberToBytes=numberToBytes,n.stringToBytes=stringToBytes,n.valueToBytes=valueToBytes,n.concatBytes=concatBytes,n.createDataView=createDataView},85013:function(t,n,i){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.ChecksumStruct=void 0;let s=i(11821),p=i(47207);n.ChecksumStruct=(0,s.size)((0,p.base64)((0,s.string)(),{paddingRequired:!0}),44,44)},73557:function(t,n,i){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.createHex=n.createBytes=n.createBigInt=n.createNumber=void 0;let s=i(11821),p=i(31422),b=i(8476),g=i(62009),y=(0,s.union)([(0,s.number)(),(0,s.bigint)(),(0,s.string)(),g.StrictHexStruct]),m=(0,s.c
2oerce)((0,s.number)(),y,Number),_=(0,s.coerce)((0,s.bigint)(),y,BigInt);(0,s.union)([g.StrictHexStruct,(0,s.instance)(Uint8Array)]);let v=(0,s.coerce)((0,s.instance)(Uint8Array),(0,s.union)([g.StrictHexStruct]),b.hexToBytes),w=(0,s.coerce)(g.StrictHexStruct,(0,s.instance)(Uint8Array),b.bytesToHex);function createNumber(t){try{let n=(0,s.create)(t,m);return(0,p.assert)(Number.isFinite(n),`Expected a number-like value, got "${t}".`),n}catch(n){if(n instanceof s.StructError)throw Error(`Expected a number-like value, got "${t}".`);throw n}}function createBigInt(t){try{return(0,s.create)(t,_)}catch(t){if(t instanceof s.StructError)throw Error(`Expected a number-like value, got "${String(t.value)}".`);throw t}}function createBytes(t){if("string"==typeof t&&"0x"===t.toLowerCase())return new Uint8Array;try{return(0,s.create)(t,v)}catch(t){if(t instanceof s.StructError)throw Error(`Expected a bytes-like value, got "${String(t.value)}".`);throw t}}function createHex(t){if(t instanceof Uint8Array&&0===t.length||"string"==typeof t&&"0x"===t.toLowerCase())return"0x";try{return(0,s.create)(t,w)}catch(t){if(t instanceof s.StructError)throw Error(`Expected a bytes-like value, got "${String(t.value)}".`);throw t}}n.createNumber=createNumber,n.createBigInt=createBigInt,n.createBytes=createBytes,n.createHex=createHex},94283:function(t,n){"use strict";var i,s,p=this&&this.__classPrivateFieldSet||function(t,n,i,s,p){if("m"===s)throw TypeError("Private method is not writable");if("a"===s&&!p)throw TypeError("Private accessor was defined without a setter");if("function"==typeof n?t!==n||!p:!n.has(t))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?p.call(t,i):p?p.value=i:n.set(t,i),i},b=this&&this.__classPrivateFieldGet||function(t,n,i,s){if("a"===i&&!s)throw TypeError("Private accessor was defined without a getter");if("function"==typeof n?t!==n||!s:!n.has(t))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?s:"a"===i?s.call(t):s?s.value:n.get(t)};Object.defineProperty(n,"__esModule",{value:!0}),n.FrozenSet=n.FrozenMap=void 0;let FrozenMap=class FrozenMap{constructor(t){i.set(this,void 0),p(this,i,new Map(t),"f"),Object.freeze(this)}get size(){return b(this,i,"f").size}[(i=new WeakMap,Symbol.iterator)](){return b(this,i,"f")[Symbol.iterator]()}entries(){return b(this,i,"f").entries()}forEach(t,n){return b(this,i,"f").forEach((i,s,p)=>t.call(n,i,s,this))}get(t){return b(this,i,"f").get(t)}has(t){return b(this,i,"f").has(t)}keys(){return b(this,i,"f").keys()}values(){return b(this,i,"f").values()}toString(){return`FrozenMap(${this.size}) {${this.size>0?` ${[...this.entries()].map(([t,n])=>`${String(t)} => ${String(n)}`).join(", ")} `:""}}`}};n.FrozenMap=FrozenMap;let FrozenSet=class FrozenSet{constructor(t){s.set(this,void 0),p(this,s,new Set(t),"f"),Object.freeze(this)}get size(){return b(this,s,"f").size}[(s=new WeakMap,Symbol.iterator)](){return b(this,s,"f")[Symbol.iterator]()}entries(){return b(this,s,"f").entries()}forEach(t,n){return b(this,s,"f").forEach((i,s,p)=>t.call(n,i,s,this))}has(t){return b(this,s,"f").has(t)}keys(){return b(this,s,"f").keys()}values(){return b(this,s,"f").values()}toString(){return`FrozenSet(${this.size}) {${this.size>0?` ${[...this.values()].map(t=>String(t)).join(", ")} `:""}}`}};n.FrozenSet=FrozenSet,Object.freeze(FrozenMap),Object.freeze(FrozenMap.prototype),Object.freeze(FrozenSet),Object.freeze(FrozenSet.prototype)},25345:function(t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0})},62009:function(t,n,i){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.remove0x=n.add0x=n.assertIsStrictHexString=n.assertIsHexString=n.isStrictHexString=n.isHexString=n.StrictHexStruct=n.HexStruct=void 0;let s=i(11821),p=i(31422);function isHexString(t){return(0,s.is)(t,n.HexStruct)}function isStrictHexString(t){return(0,s.is)(t,n.StrictHexStruct)}function assertIsHexString(t){(0,p.assert)(isHexString(t),"Value must be a hexadecimal string.")}function assertIsStrictHexString(t){(0,p.assert)(isStrictHexString(t),'Value must be a hexadecimal string, starting with "0x".')}function add0x(t){return t.startsWith("0x")?t:t.startsWith("0X")?`0x${t.substring(2)}`:`0x${t}`}function remove0x(t){return t.startsWith("0x")||t.startsWith("0X")?t.substring(2):t}n.HexStruct=(0,s.pattern)((0,s.string)(),/^(?:0x)?[0-9a-f]+$/iu),n.StrictHexStruct=(0,s.pattern)((0,s.string)(),/^0x[0-9a-f]+$/iu),n.isHexString=isHexString,n.isStrictHexString=isStrictHexString,n.assertIsHexString=assertIsHexString,n.assertIsStrictHexString=assertIsStrictHexString,n.add0x=add0x,n.remove0x=remove0x},42451:function(t,n,i){"use strict";var s=this&&this.__createBinding||(Object.create?function(t,n,i,s){void 0===s&&(s=i);var p=Object.getOwnPropertyDescriptor(n,i);(!p||("get"in p?!n.__esModule:p.writable||p.configurable))&&(p={enumerable:!0,get:function(){return n[i]}}),Object.defineProperty(t,s,p)}:function(t,n,i,s){void 0===s&&(s=i),t[s]=n[i]}),p=this&&this.__exportStar||function(t,n){for(var i in t)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||s(n,t,i)};Object.defineProperty(n,"__esModule",{value:!0}),p(i(31422),n),p(i(47207),n),p(i(8476),n),p(i(85013),n),p(i(73557),n),p(i(94283),n),p(i(25345),n),p(i(62009),n),p(i(22497),n),p(i(23732),n),p(i(20160),n),p(i(66215),n),p(i(89679),n),p(i(99108),n),p(i(97772),n),p(i(17749),n),p(i(88426),n)},22497:function(t,n,i){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getJsonRpcIdValidator=n.assertIsJsonRpcError=n.isJsonRpcError=n.assertIsJsonRpcFailure=n.isJsonRpcFailure=n.assertIsJsonRpcSuccess=n.isJsonRpcSuccess=n.assertIsJsonRpcResponse=n.isJsonRpcResponse=n.assertIsPendingJsonRpcResponse=n.isPendingJsonRpcResponse=n.JsonRpcResponseStruct=n.JsonRpcFailureStruct=n.JsonRpcSuccessStruct=n.PendingJsonRpcResponseStruct=n.assertIsJsonRpcRequest=n.isJsonRpcRequest=n.assertIsJsonRpcNotification=n.isJsonRpcNotification=n.JsonRpcNotificationStruct=n.JsonRpcRequestStruct=n.JsonRpcParamsStruct=n.JsonRpcErrorStruct=n.JsonRpcIdStruct=n.JsonRpcVersionStru
2ct=n.jsonrpc2=n.getJsonSize=n.isValidJson=n.JsonStruct=n.UnsafeJsonStruct=void 0;let s=i(11821),p=i(31422);function isValidJson(t){return(0,s.is)(t,n.JsonStruct)}function getJsonSize(t){(0,p.assertStruct)(t,n.JsonStruct,"Invalid JSON value");let i=JSON.stringify(t);return new TextEncoder().encode(i).byteLength}function isJsonRpcNotification(t){return(0,s.is)(t,n.JsonRpcNotificationStruct)}function assertIsJsonRpcNotification(t,i){(0,p.assertStruct)(t,n.JsonRpcNotificationStruct,"Invalid JSON-RPC notification",i)}function isJsonRpcRequest(t){return(0,s.is)(t,n.JsonRpcRequestStruct)}function assertIsJsonRpcRequest(t,i){(0,p.assertStruct)(t,n.JsonRpcRequestStruct,"Invalid JSON-RPC request",i)}function isPendingJsonRpcResponse(t){return(0,s.is)(t,n.PendingJsonRpcResponseStruct)}function assertIsPendingJsonRpcResponse(t,i){(0,p.assertStruct)(t,n.PendingJsonRpcResponseStruct,"Invalid pending JSON-RPC response",i)}function isJsonRpcResponse(t){return(0,s.is)(t,n.JsonRpcResponseStruct)}function assertIsJsonRpcResponse(t,i){(0,p.assertStruct)(t,n.JsonRpcResponseStruct,"Invalid JSON-RPC response",i)}function isJsonRpcSuccess(t){return(0,s.is)(t,n.JsonRpcSuccessStruct)}function assertIsJsonRpcSuccess(t,i){(0,p.assertStruct)(t,n.JsonRpcSuccessStruct,"Invalid JSON-RPC success response",i)}function isJsonRpcFailure(t){return(0,s.is)(t,n.JsonRpcFailureStruct)}function assertIsJsonRpcFailure(t,i){(0,p.assertStruct)(t,n.JsonRpcFailureStruct,"Invalid JSON-RPC failure response",i)}function isJsonRpcError(t){return(0,s.is)(t,n.JsonRpcErrorStruct)}function assertIsJsonRpcError(t,i){(0,p.assertStruct)(t,n.JsonRpcErrorStruct,"Invalid JSON-RPC error",i)}function getJsonRpcIdValidator(t){let{permitEmptyString:n,permitFractions:i,permitNull:s}=Object.assign({permitEmptyString:!0,permitFractions:!1,permitNull:!0},t);return t=>!!("number"==typeof t&&(i||Number.isInteger(t))||"string"==typeof t&&(n||t.length>0)||s&&null===t)}n.UnsafeJsonStruct=(0,s.union)([(0,s.literal)(null),(0,s.boolean)(),(0,s.define)("finite number",t=>(0,s.is)(t,(0,s.number)())&&Number.isFinite(t)),(0,s.string)(),(0,s.array)((0,s.lazy)(()=>n.UnsafeJsonStruct)),(0,s.record)((0,s.string)(),(0,s.lazy)(()=>n.UnsafeJsonStruct))]),n.JsonStruct=(0,s.define)("Json",(t,i)=>{function checkStruct(t,n){let s=n.validator(t,i),p=[...s];return!(p.length>0)||p}try{let i=checkStruct(t,n.UnsafeJsonStruct);if(!0!==i)return i;return checkStruct(JSON.parse(JSON.stringify(t)),n.UnsafeJsonStruct)}catch(t){if(t instanceof RangeError)return"Circular reference detected";return!1}}),n.isValidJson=isValidJson,n.getJsonSize=getJsonSize,n.jsonrpc2="2.0",n.JsonRpcVersionStruct=(0,s.literal)(n.jsonrpc2),n.JsonRpcIdStruct=(0,s.nullable)((0,s.union)([(0,s.number)(),(0,s.string)()])),n.JsonRpcErrorStruct=(0,s.object)({code:(0,s.integer)(),message:(0,s.string)(),data:(0,s.optional)(n.JsonStruct),stack:(0,s.optional)((0,s.string)())}),n.JsonRpcParamsStruct=(0,s.optional)((0,s.union)([(0,s.record)((0,s.string)(),n.JsonStruct),(0,s.array)(n.JsonStruct)])),n.JsonRpcRequestStruct=(0,s.object)({id:n.JsonRpcIdStruct,jsonrpc:n.JsonRpcVersionStruct,method:(0,s.string)(),params:n.JsonRpcParamsStruct}),n.JsonRpcNotificationStruct=(0,s.omit)(n.JsonRpcRequestStruct,["id"]),n.isJsonRpcNotification=isJsonRpcNotification,n.assertIsJsonRpcNotification=assertIsJsonRpcNotification,n.isJsonRpcRequest=isJsonRpcRequest,n.assertIsJsonRpcRequest=assertIsJsonRpcRequest,n.PendingJsonRpcResponseStruct=(0,s.object)({id:n.JsonRpcIdStruct,jsonrpc:n.JsonRpcVersionStruct,result:(0,s.optional)((0,s.unknown)()),error:(0,s.optional)(n.JsonRpcErrorStruct)}),n.JsonRpcSuccessStruct=(0,s.object)({id:n.JsonRpcIdStruct,jsonrpc:n.JsonRpcVersionStruct,result:n.JsonStruct}),n.JsonRpcFailureStruct=(0,s.object)({id:n.JsonRpcIdStruct,jsonrpc:n.JsonRpcVersionStruct,error:n.JsonRpcErrorStruct}),n.JsonRpcResponseStruct=(0,s.union)([n.JsonRpcSuccessStruct,n.JsonRpcFailureStruct]),n.isPendingJsonRpcResponse=isPendingJsonRpcResponse,n.assertIsPendingJsonRpcResponse=assertIsPendingJsonRpcResponse,n.isJsonRpcResponse=isJsonRpcResponse,n.assertIsJsonRpcResponse=assertIsJsonRpcResponse,n.isJsonRpcSuccess=isJsonRpcSuccess,n.assertIsJsonRpcSuccess=assertIsJsonRpcSuccess,n.isJsonRpcFailure=isJsonRpcFailure,n.assertIsJsonRpcFailure=assertIsJsonRpcFailure,n.isJsonRpcError=isJsonRpcError,n.assertIsJsonRpcError=assertIsJsonRpcError,n.getJsonRpcIdValidator=getJsonRpcIdValidator},23732:function(t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0})},20160:function(t,n,i){"use strict";var s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(n,"__esModule",{value:!0}),n.createModuleLogger=n.createProjectLogger=void 0;let p=s(i(11227)),b=(0,p.default)("metamask");function createProjectLogger(t){return b.extend(t)}function createModuleLogger(t,n){return t.extend(n)}n.createProjectLogger=createProjectLogger,n.createModuleLogger=createModuleLogger},66215:function(t,n){"use strict";var i;function isNonEmptyArray(t){return Array.isArray(t)&&t.length>0}function isNullOrUndefined(t){return null==t}function isObject(t){return!!t&&"object"==typeof t&&!Array.isArray(t)}function isPlainObject(t){if("object"!=typeof t||null===t)return!1;try{let n=t;for(;null!==Object.getPrototypeOf(n);)n=Object.getPrototypeOf(n);return Object.getPrototypeOf(t)===n}catch(t){return!1}}function isASCII(t){return 127>=t.charCodeAt(0)}function calculateStringSize(t){var i;let s=t.split("").reduce((t,n)=>isASCII(n)?t+1:t+2,0);return s+(null!==(i=t.match(n.ESCAPE_CHARACTERS_REGEXP))&&void 0!==i?i:[]).length}function calculateNumberSize(t){return t.toString().length}Object.defineProperty(n,"__esModule",{value:!0}),n.calculateNumberSize=n.calculateStringSize=n.isASCII=n.isPlainObject=n.ESCAPE_CHARACTERS_REGEXP=n.JsonSize=n.hasProperty=n.isObject=n.isNullOrUndefined=n.isNonEmptyArray=void 0,n.isNonEmptyArray=isNonEmptyArray,n.isNullOrUndefined=isNullOrUndefined,n.isObject=isObject,n.hasProperty=(t,n)=>Object.hasOwnProperty.call(t,n),(i=n.JsonSize||(n.JsonSize={}))[i.Null=4]="Null",i[i.Comma=1]="Comma",i[i.Wrapper=1]="Wrapper",i[i.True=4]="True",i[i.False=5]="False",i[i.Quote=1]="Quote",i[i.Colon=1]="Colon",i[i.Date=24]="Date",n.ESCAPE_CHARACTERS_REGEXP=/"|\\|\n|\r|\t/gu,n.isPlainObject=isPlainObject,n.isASCII=isASCII,n.calculateStringSize=calculateStringSize,n.calculateNumberSize=calculateNumberSize},89679:function(t,n,i){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.hexToBigInt=n.hexToNumber=n.bigIntToHex=n.numberToHex=void 0;let s=i(31422),p=i(62009);n.numberToHex=t=>((0,s.assert)("number"==typeof t,"Value must be a number."),(0,s.assert)(t>=0,"Value must be a non-negative number."),(0,s.assert)(Number.isSafeInteger(t),"Value is not a safe integer. Use `bigIntToHex` instead."),(0,p.add0x)(t.toString(16))),n.bigIntToHex=t=>((0,s.assert)("bigint"==typeof t,"Value must be a bigint."),(0,s.assert)(t>=0,"Value must be a non-negative bigint."),(0,p.add0x)(t.toString(16))),n.hexToNumber=t=>{(0,p.assertIsHexString)(t);let n=parseInt(t,16);return(0,s.assert)(Number.isSafeInteger(n),"Value is not a safe integer. Use `hexToBigInt` instead."),n},n.hexToBigInt=t=>((0,p.assertIsHexString)(t),BigInt((0,p.add0x)(t)))},99108:function(t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0})},97772:function(t,n){"use strict";var i;Object.defineProperty(n,"__esModule",{value:!0}),n.timeSince=n.inMilliseconds=n.Duration=void 0,(i=n.Duration||(n.Duration={}))[i.Millisecond=1]="Millisecond",i[i.Second=1e3]="Second",i[i.Minute=6e4]="Minute",i[i.Hour=36e5]="Hour",i[i.Day=864e5]="Day",i[i.Week=6048e5]="Week",i[i.Year=31536e6]="Year";let isNonNegativeInteger=t=>Number.isInteger(t)&&t>=0,assertIsNonNegativeInteger=(t,n)=>{if(!isNonNegativeInteger(t))throw Error(`"${n}" must be a non-negative integer. Received: "${t}".`)};function inMilliseconds(t,n){return assertIsNonNegativeInteger(t,"count"),t*n}function timeSince(t){return assertIsNonNegativeInteger(t,"timestamp"),Date.now()-t}n.inMilliseconds=inMilliseconds,n.timeSince=timeSince},17749:function(t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0})},88426:function(t,n,i){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.satisfiesVersionRange=n.gtRange=n.gtVersion=n.assertIsSemVerRange=n.assertIsSemVerVersion=n.isValidSemVerRange=n.isValidSemVerVersion=n.VersionRangeStruct=n.VersionStru
2ct=void 0;let s=i(81249),p=i(11821),b=i(31422);function isValidSemVerVersion(t){return(0,p.is)(t,n.VersionStruct)}function isValidSemVerRange(t){return(0,p.is)(t,n.VersionRangeStruct)}function assertIsSemVerVersion(t){(0,b.assertStruct)(t,n.VersionStruct)}function assertIsSemVerRange(t){(0,b.assertStruct)(t,n.VersionRangeStruct)}function gtVersion(t,n){return(0,s.gt)(t,n)}function gtRange(t,n){return(0,s.gtr)(t,n)}function satisfiesVersionRange(t,n){return(0,s.satisfies)(t,n,{includePrerelease:!0})}n.VersionStruct=(0,p.refine)((0,p.string)(),"Version",t=>null!==(0,s.valid)(t)||`Expected SemVer version, got "${t}"`),n.VersionRangeStruct=(0,p.refine)((0,p.string)(),"Version range",t=>null!==(0,s.validRange)(t)||`Expected SemVer range, got "${t}"`),n.isValidSemVerVersion=isValidSemVerVersion,n.isValidSemVerRange=isValidSemVerRange,n.assertIsSemVerVersion=assertIsSemVerVersion,n.assertIsSemVerRange=assertIsSemVerRange,n.gtVersion=gtVersion,n.gtRange=gtRange,n.satisfiesVersionRange=satisfiesVersionRange},27320:function(t,n){"use strict";function number(t){if(!Number.isSafeInteger(t)||t<0)throw Error(`positive integer expected, not ${t}`)}function bool(t){if("boolean"!=typeof t)throw Error(`boolean expected, not ${t}`)}function isBytes(t){return t instanceof Uint8Array||null!=t&&"object"==typeof t&&"Uint8Array"===t.constructor.name}function bytes(t,...n){if(!isBytes(t))throw Error("Uint8Array expected");if(n.length>0&&!n.includes(t.length))throw Error(`Uint8Array expected of length ${n}, not of length=${t.length}`)}function hash(t){if("function"!=typeof t||"function"!=typeof t.create)throw Error("Hash should be wrapped by utils.wrapConstructor");number(t.outputLen),number(t.blockLen)}function exists(t,n=!0){if(t.destroyed)throw Error("Hash instance has been destroyed");if(n&&t.finished)throw Error("Hash#digest() has already been called")}function output(t,n){bytes(t);let i=n.outputLen;if(t.length<i)throw Error(`digestInto() expects output buffer of length at least ${i}`)}Object.defineProperty(n,"__esModule",{value:!0}),n.output=n.exists=n.hash=n.bytes=n.bool=n.number=n.isBytes=void 0,n.number=number,n.bool=bool,n.isBytes=isBytes,n.bytes=bytes,n.hash=hash,n.exists=exists,n.output=output,n.default={number,bool,bytes,hash,exists,output}},75457:function(t,n,i){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.HashMD=n.Maj=n.Chi=void 0;let s=i(27320),p=i(98089);function setBigUint64(t,n,i,s){if("function"==typeof t.setBigUint64)return t.setBigUint64(n,i,s);let p=BigInt(32),b=BigInt(4294967295),g=Number(i>>p&b),y=Number(i&b),m=s?4:0,_=s?0:4;t.setUint32(n+m,g,s),t.setUint32(n+_,y,s)}n.Chi=(t,n,i)=>t&n^~t&i,n.Maj=(t,n,i)=>t&n^t&i^n&i;let HashMD=class HashMD extends p.Hash{constructor(t,n,i,s){super(),this.blockLen=t,this.outputLen=n,this.padOffset=i,this.isLE=s,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(t),this.view=(0,p.createView)(this.buffer)}update(t){(0,s.exists)(this);let{view:n,buffer:i,blockLen:b}=this;t=(0,p.toBytes)(t);let g=t.length;for(let s=0;s<g;){let y=Math.min(b-this.pos,g-s);if(y===b){let n=(0,p.createView)(t);for(;b<=g-s;s+=b)this.process(n,s);continue}i.set(t.subarray(s,s+y),this.pos),this.pos+=y,s+=y,this.pos===b&&(this.process(n,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){(0,s.exists)(this),(0,s.output)(t,this),this.finished=!0;let{buffer:n,view:i,blockLen:b,isLE:g}=this,{pos:y}=this;n[y++]=128,this.buffer.subarray(y).fill(0),this.padOffset>b-y&&(this.process(i,0),y=0);for(let t=y;t<b;t++)n[t]=0;setBigUint64(i,b-8,BigInt(8*this.length),g),this.process(i,0);let m=(0,p.createView)(t),_=this.outputLen;if(_%4)throw Error("_sha2: outputLen should be aligned to 32bit");let v=_/4,w=this.get();if(v>w.length)throw Error("_sha2: outputLen bigger than state");for(let t=0;t<v;t++)m.setUint32(4*t,w[t],g)}digest(){let{buffer:t,outputLen:n}=this;this.digestInto(t);let i=t.slice(0,n);return this.destroy(),i}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());let{blockLen:n,buffer:i,length:s,finished:p,destroyed:b,pos:g}=this;
2return t.length=s,t.pos=g,t.finished=p,t.destroyed=b,s%n&&t.buffer.set(i),t}};n.HashMD=HashMD},6873:function(t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.add5L=n.add5H=n.add4H=n.add4L=n.add3H=n.add3L=n.add=n.rotlBL=n.rotlBH=n.rotlSL=n.rotlSH=n.rotr32L=n.rotr32H=n.rotrBL=n.rotrBH=n.rotrSL=n.rotrSH=n.shrSL=n.shrSH=n.toBig=n.split=n.fromBig=void 0;let i=BigInt(4294967296-1),s=BigInt(32);function fromBig(t,n=!1){return n?{h:Number(t&i),l:Number(t>>s&i)}:{h:0|Number(t>>s&i),l:0|Number(t&i)}}function split(t,n=!1){let i=new Uint32Array(t.length),s=new Uint32Array(t.length);for(let p=0;p<t.length;p++){let{h:b,l:g}=fromBig(t[p],n);[i[p],s[p]]=[b,g]}return[i,s]}n.fromBig=fromBig,n.split=split;let toBig=(t,n)=>BigInt(t>>>0)<<s|BigInt(n>>>0);n.toBig=toBig;let shrSH=(t,n,i)=>t>>>i;n.shrSH=shrSH;let shrSL=(t,n,i)=>t<<32-i|n>>>i;n.shrSL=shrSL;let rotrSH=(t,n,i)=>t>>>i|n<<32-i;n.rotrSH=rotrSH;let rotrSL=(t,n,i)=>t<<32-i|n>>>i;n.rotrSL=rotrSL;let rotrBH=(t,n,i)=>t<<64-i|n>>>i-32;n.rotrBH=rotrBH;let rotrBL=(t,n,i)=>t>>>i-32|n<<64-i;n.rotrBL=rotrBL;let rotr32H=(t,n)=>n;n.rotr32H=rotr32H;let rotr32L=(t,n)=>t;n.rotr32L=rotr32L;let rotlSH=(t,n,i)=>t<<i|n>>>32-i;n.rotlSH=rotlSH;let rotlSL=(t,n,i)=>n<<i|t>>>32-i;n.rotlSL=rotlSL;let rotlBH=(t,n,i)=>n<<i-32|t>>>64-i;n.rotlBH=rotlBH;let rotlBL=(t,n,i)=>t<<i-32|n>>>64-i;function add(t,n,i,s){let p=(n>>>0)+(s>>>0);return{h:t+i+(p/4294967296|0)|0,l:0|p}}n.rotlBL=rotlBL,n.add=add;let add3L=(t,n,i)=>(t>>>0)+(n>>>0)+(i>>>0);n.add3L=add3L;let add3H=(t,n,i,s)=>n+i+s+(t/4294967296|0)|0;n.add3H=add3H;let add4L=(t,n,i,s)=>(t>>>0)+(n>>>0)+(i>>>0)+(s>>>0);n.add4L=add4L;let add4H=(t,n,i,s,p)=>n+i+s+p+(t/4294967296|0)|0;n.add4H=add4H;let add5L=(t,n,i,s,p)=>(t>>>0)+(n>>>0)+(i>>>0)+(s>>>0)+(p>>>0);n.add5L=add5L;let add5H=(t,n,i,s,p,b)=>n+i+s+p+b+(t/4294967296|0)|0;n.add5H=add5H,n.default={fromBig,split,toBig,shrSH,shrSL,rotrSH,rotrSL,rotrBH,rotrBL,rotr32H,rotr32L,rotlSH,rotlSL,rotlBH,rotlBL,add,add3L,add3H,add4L,add4H,add5H,add5L}},31945:function(t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.crypto=void 0,n.crypto="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0},79569:function(t,n,i){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.hmac=n.HMAC=void 0;let s=i(27320),p=i(98089);let HMAC=class HMAC extends p.Hash{constructor(t,n){super(),this.finished=!1,this.destroyed=!1,(0,s.hash)(t);let i=(0,p.toBytes)(n);if(this.iHash=t.create(),"function"!=typeof this.iHash.update)throw Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;let b=this.blockLen,g=new Uint8Array(b);g.set(i.length>b?t.create().update(i).digest():i);for(let t=0;t<g.length;t++)g[t]^=54;this.iHash.update(g),this.oHash=t.create();for(let t=0;t<g.length;t++)g[t]^=106;this.oHash.update(g),g.fill(0)}update(t){return(0,s.exists)(this),this.iHash.update(t),this}digestInto(t){(0,s.exists)(this),(0,s.bytes)(t,this.outputLen),this.finished=!0,this.iHash.digestInto(t),this.oHash.update(t),this.oHash.digestInto(t),this.destroy()}digest(){let t=new Uint8Array(this.oHash.outputLen);return this.digestInto(t),t}_cloneInto(t){t||(t=Object.create(Object.getPrototypeOf(this),{}));let{oHash:n,iHash:i,finished:s,destroyed:p,blockLen:b,outputLen:g}=this;return t.finished=s,t.destroyed=p,t.blockLen=b,t.outputLen=g,t.oHash=n._cloneInto(t.oHash),t.iHash=i._cloneInto(t.iHash),t}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}};n.HMAC=HMAC,n.hmac=(t,n,i)=>new HMAC(t,n).update(i).digest(),n.hmac.create=(t,n)=>new HMAC(t,n)},23061:function(t,n,i){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.sha224=n.sha256=void 0;let s=i(75457),p=i(98089),b=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756
2734187,3204031479,3329325298]),g=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),y=new Uint32Array(64);let SHA256=class SHA256 extends s.HashMD{constructor(){super(64,32,8,!1),this.A=0|g[0],this.B=0|g[1],this.C=0|g[2],this.D=0|g[3],this.E=0|g[4],this.F=0|g[5],this.G=0|g[6],this.H=0|g[7]}get(){let{A:t,B:n,C:i,D:s,E:p,F:b,G:g,H:y}=this;return[t,n,i,s,p,b,g,y]}set(t,n,i,s,p,b,g,y){this.A=0|t,this.B=0|n,this.C=0|i,this.D=0|s,this.E=0|p,this.F=0|b,this.G=0|g,this.H=0|y}process(t,n){for(let i=0;i<16;i++,n+=4)y[i]=t.getUint32(n,!1);for(let t=16;t<64;t++){let n=y[t-15],i=y[t-2],s=(0,p.rotr)(n,7)^(0,p.rotr)(n,18)^n>>>3,b=(0,p.rotr)(i,17)^(0,p.rotr)(i,19)^i>>>10;y[t]=b+y[t-7]+s+y[t-16]|0}let{A:i,B:g,C:m,D:_,E:v,F:w,G:S,H:R}=this;for(let t=0;t<64;t++){let n=(0,p.rotr)(v,6)^(0,p.rotr)(v,11)^(0,p.rotr)(v,25),T=R+n+(0,s.Chi)(v,w,S)+b[t]+y[t]|0,x=(0,p.rotr)(i,2)^(0,p.rotr)(i,13)^(0,p.rotr)(i,22),A=x+(0,s.Maj)(i,g,m)|0;R=S,S=w,w=v,v=_+T|0,_=m,m=g,g=i,i=T+A|0}i=i+this.A|0,g=g+this.B|0,m=m+this.C|0,_=_+this.D|0,v=v+this.E|0,w=w+this.F|0,S=S+this.G|0,R=R+this.H|0,this.set(i,g,m,_,v,w,S,R)}roundClean(){y.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}};let SHA224=class SHA224 extends SHA256{constructor(){super(),this.A=-1056596264,this.B=914150663,this.C=812702999,this.D=-150054599,this.E=-4191439,this.F=1750603025,this.G=1694076839,this.H=-1090891868,this.outputLen=28}};n.sha256=(0,p.wrapConstructor)(()=>new SHA256),n.sha224=(0,p.wrapConstructor)(()=>new SHA224)},85426:function(t,n,i){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.shake256=n.shake128=n.keccak_512=n.keccak_384=n.keccak_256=n.keccak_224=n.sha3_512=n.sha3_384=n.sha3_256=n.sha3_224=n.Keccak=n.keccakP=void 0;let s=i(27320),p=i(6873),b=i(98089),g=[],y=[],m=[],_=BigInt(0),v=BigInt(1),w=BigInt(2),S=BigInt(7),R=BigInt(256),T=BigInt(113);for(let t=0,n=v,i=1,s=0;t<24;t++){[i,s]=[s,(2*i+3*s)%5],g.push(2*(5*s+i)),y.push((t+1)*(t+2)/2%64);let p=_;for(let t=0;t<7;t++)(n=(n<<v^(n>>S)*T)%R)&w&&(p^=v<<(v<<BigInt(t))-v);m.push(p)}let[x,A]=(0,p.split)(m,!0),rotlH=(t,n,i)=>i>32?(0,p.rotlBH)(t,n,i):(0,p.rotlSH)(t,n,i),rotlL=(t,n,i)=>i>32?(0,p.rotlBL)(t,n,i):(0,p.rotlSL)(t,n,i);function keccakP(t,n=24){let i=new Uint32Array(10);for(let s=24-n;s<24;s++){for(let n=0;n<10;n++)i[n]=t[n]^t[n+10]^t[n+20]^t[n+30]^t[n+40];for(let n=0;n<10;n+=2){let s=(n+8)%10,p=(n+2)%10,b=i[p],g=i[p+1],y=rotlH(b,g,1)^i[s],m=rotlL(b,g,1)^i[s+1];for(let i=0;i<50;i+=10)t[n+i]^=y,t[n+i+1]^=m}let n=t[2],p=t[3];for(let i=0;i<24;i++){let s=y[i],b=rotlH(n,p,s),m=rotlL(n,p,s),_=g[i];n=t[_],p=t[_+1],t[_]=b,t[_+1]=m}for(let n=0;n<50;n+=10){for(let s=0;s<10;s++)i[s]=t[n+s];for(let s=0;s<10;s++)t[n+s]^=~i[(s+2)%10]&i[(s+4)%10]}t[0]^=x[s],t[1]^=A[s]}i.fill(0)}n.keccakP=keccakP;let Keccak=class Keccak extends b.Hash{constructor(t,n,i,p=!1,g=24){if(super(),this.blockLen=t,this.suffix=n,this.outputLen=i,this.enableXOF=p,this.rounds=g,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,(0,s.number)(i),0>=this.blockLen||this.blockLen>=200)throw Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=(0,b.u32)(this.state)}keccak(){b.isLE||(0,b.byteSwap32)(this.state32),keccakP(this.state32,this.rounds),b.isLE||(0,b.byteSwap32)(this.state32),this.posOut=0,this.pos=0}update(t){(0,s.exists)(this);let{blockLen:n,state:i}=this;t=(0,b.toBytes)(t);let p=t.length;for(let s=0;s<p;){let b=Math.min(n-this.pos,p-s);for(let n=0;n<b;n++)i[this.pos++]^=t[s++];this.pos===n&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;let{state:t,suffix:n,pos:i,blockLen:s}=this;t[i]^=n,(128&n)!=0&&i===s-1&&this.keccak(),t[s-1]^=128,this.keccak()}writeInto(t){(0,s.exists)(this,!1),(0,s.bytes)(t),this.finish();let n=this.state,{blockLen:i}=this;for(let s=0,p=t.length;s<p;){this.posOut>=i&&this.keccak();let b=Math.min(i-this.posOut,p-s);t.set(n.subarray(this.posOut,this.posOut+b),s),this.posOut+=b,s+=b}return t}xofInto(t){if(!this.enableXOF)throw Error("XOF is not possible for this instance");return this.writeInto(t)}xof(t){return(0,s.number)(t),this.xofInto(new Uint8Array(t))}digestInto(t){if((0,s.output)(t,this),this.finished)throw Error("digest() was already called");return this.writeInto(t),this.destroy(),t}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(t){let{blockLen:n,suffix:i,outputLen:s,rounds:p,enableXOF:b}=this;return t||(t=new Keccak(n,i,s,b,p)),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=p,t.suffix=i,t.outputLen=s,t.enableXOF=b,t.destroyed=this.destroyed,t}};n.Keccak=Keccak;let gen=(t,n,i)=>(0,b.wrapConstructor)(()=>new Keccak(n,t,i));n.sha3_224=gen(6,144,28),n.sha3_256=gen(6,136,32),n.sha3_384=gen(6,104,48),n.sha3_512=gen(6,72,64),n.keccak_224=gen(1,144,28),n.keccak_256=gen(1,136,32),n.keccak_384=gen(1,104,48),n.keccak_512=gen(1,72,64);let genShake=(t,n,i)=>(0,b.wrapXOFConstructorWithOpts)((s={})=>new Keccak(n,t,void 0===s.dkLen?i:s.dkLen,!0));n.shake128=genShake(31,168,16),n.shake256=genShake(31,136,32)},98089:function(t,n,i){"use strict";/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */Object.defineProperty(n,"__esModule",{value:!0}),n.randomBytes=n.wrapXOFConstructorWithOpts=n.wrapConstructorWithOpts=n.wrapConstructor=n.checkOpts=n.Hash=n.concatBytes=n.toBytes=n.utf8ToBytes=n.asyncLoop=n.nextTick=n.hexToBytes=n.bytesToHex=n.byteSwap32=n.byteSwapIfBE=n.byteSwap=n.isLE=n.rotl=n.rotr=n.createView=n.u32=n.u8=n.isBytes=void 0;let s=i(31945),p=i(27320);function isBytes(t){return t instanceof Uint8Array||null!=t&&"object"==typeof t&&"Uint8Array"===t.constructor.name}function byteSwap32(t){for(let i=0;i<t.length;i++)t[i]=(0,n.byteSwap)(t[i])}n.isBytes=isBytes,n.u8=t=>new Uint8Array(t.buffer,t.byteOffset,t.byteLength),n.u32=t=>new Uint32Array(t.buffer,t.byteOffset,Math.floor(t.byteLength/4)),n.createView=t=>new DataView(t.buffer,t.byteOffset,t.byteLength),n.rotr=(t,n)=>t<<32-n|t>>>n,n.rotl=(t,n)=>t<<n|t>>>32-n>>>0,n.isLE=68===new Uint8Array(new Uint32Array([287454020]).buffer)[0],n.byteSwap=t=>t<<24&4278190080|t<<8&16711680|t>>>8&65280|t>>>24&255,n.byteSwapIfBE=n.isLE?t=>t:t=>(0,n.byteSwap)(t),n.byteSwap32=byteSwap32;let b=Array.from({length:256},(t,n)=>n.toString(16).padStart(2,"0"));function bytesToHex(t){(0,p.bytes)(t);let n="";for(let i=0;i<t.length;i++)n+=b[t[i]];return n}n.bytesToHex=bytesToHex;let g={_0:48,_9:57,_A:65,_F:70,_a:97,_f:102};function asciiToBase16(t){return t>=g._0&&t<=g._9?t-g._0:t>=g._A&&t<=g._F?t-(g._A-10):t>=g._a&&t<=g._f?t-(g._a-10):void 0}function hexToBytes(t){if("string"!=typeof t)throw Error("hex string expected, got "+typeof t);let n=t.length,i=n/2;if(n%2)throw Error("padded hex string expected, got unpadded hex of length "+n);let s=new Uint8Array(i);for(let n=0,p=0;n<i;n++,p+=2){let i=asciiToBase16(t.charCodeAt(p)),b=asciiToBase16(t.charCodeAt(p+1));if(void 0===i||void 0===b){let n=t[p]+t[p+1];throw Error('hex string expected, got non-hex character "'+n+'" at index '+p)}s[n]=16*i+b}return s}n.hexToBytes=hexToBytes;let nextTick=async()=>{};async function asyncLoop(t,i,s){let p=Date.now();for(let b=0;b<t;b++){s(b);let t=Date.now()-p;t>=0&&t<i||(await (0,n.nextTick)(),p+=t)}}function utf8ToBytes(t){if("string"!=typeof t)throw Error(`utf8ToBytes expected string, got ${typeof t}`);return new Uint8Array(new TextEncoder().encode(t))}function toBytes(t){return"string"==typeof t&&(t=utf8ToBytes(t)),(0,p.bytes)(t),t}function concatBytes(...t){let n=0;for(let i=0;i<t.length;i++){let s=t[i];(0,p.bytes)(s),n+=s.length}let i=new Uint8Array(n);for(let n=0,s=0;n<t.length;n++){let p=t[n];
2i.set(p,s),s+=p.length}return i}n.nextTick=nextTick,n.asyncLoop=asyncLoop,n.utf8ToBytes=utf8ToBytes,n.toBytes=toBytes,n.concatBytes=concatBytes;let Hash=class Hash{clone(){return this._cloneInto()}};n.Hash=Hash;let y={}.toString;function checkOpts(t,n){if(void 0!==n&&"[object Object]"!==y.call(n))throw Error("Options should be object or undefined");let i=Object.assign(t,n);return i}function wrapConstructor(t){let hashC=n=>t().update(toBytes(n)).digest(),n=t();return hashC.outputLen=n.outputLen,hashC.blockLen=n.blockLen,hashC.create=()=>t(),hashC}function wrapConstructorWithOpts(t){let hashC=(n,i)=>t(i).update(toBytes(n)).digest(),n=t({});return hashC.outputLen=n.outputLen,hashC.blockLen=n.blockLen,hashC.create=n=>t(n),hashC}function wrapXOFConstructorWithOpts(t){let hashC=(n,i)=>t(i).update(toBytes(n)).digest(),n=t({});return hashC.outputLen=n.outputLen,hashC.blockLen=n.blockLen,hashC.create=n=>t(n),hashC}function randomBytes(t=32){if(s.crypto&&"function"==typeof s.crypto.getRandomValues)return s.crypto.getRandomValues(new Uint8Array(t));throw Error("crypto.getRandomValues must be defined")}n.checkOpts=checkOpts,n.wrapConstructor=wrapConstructor,n.wrapConstructorWithOpts=wrapConstructorWithOpts,n.wrapXOFConstructorWithOpts=wrapXOFConstructorWithOpts,n.randomBytes=randomBytes},68251:function(t,n,i){"use strict";let s;let{SymbolDispose:p}=i(7850),{AbortError:b,codes:g}=i(64545),{isNodeStream:y,isWebStream:m,kControllerErrorFunction:_}=i(40937),v=i(94813),{ERR_INVALID_ARG_TYPE:w}=g,validateAbortSignal=(t,n)=>{if("object"!=typeof t||!("aborted"in t))throw new w(n,"AbortSignal",t)};t.exports.addAbortSignal=function(n,i){if(validateAbortSignal(n,"signal"),!y(i)&&!m(i))throw new w("stream",["ReadableStream","WritableStream","Stream"],i);return t.exports.addAbortSignalNoValidate(n,i)},t.exports.addAbortSignalNoValidate=function(t,n){if("object"!=typeof t||!("aborted"in t))return n;let g=y(n)?()=>{n.destroy(new b(void 0,{cause:t.reason}))}:()=>{n[_](new b(void 0,{cause:t.reason}))};if(t.aborted)g();else{s=s||i(73847).addAbortListener;let b=s(t,g);v(n,b[p])}return n}},35106:function(t,n,i){"use strict";let{StringPrototypeSlice:s,SymbolIterator:p,TypedArrayPrototypeSet:b,Uint8Array:g}=i(7850),{Buffer:y}=i(48764),{inspect:m}=i(73847);t.exports=class{constructor(){this.head=null,this.tail=null,this.length=0}push(t){let n={data:t,next:null};this.length>0?this.tail.next=n:this.head=n,this.tail=n,++this.length}unshift(t){let n={data:t,next:this.head};0===this.length&&(this.tail=n),this.head=n,++this.length}shift(){if(0===this.length)return;let t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}clear(){this.head=this.tail=null,this.length=0}join(t){if(0===this.length)return"";let n=this.head,i=""+n.data;for(;null!==(n=n.next);)i+=t+n.data;return i}concat(t){if(0===this.length)return y.alloc(0);let n=y.allocUnsafe(t>>>0),i=this.head,s=0;for(;i;)b(n,i.data,s),s+=i.data.length,i=i.next;return n}consume(t,n){let i=this.head.data;if(t<i.length){let n=i.slice(0,t);return this.head.data=i.slice(t),n}return t===i.length?this.shift():n?this._getString(t):this._getBuffer(t)}first(){return this.head.data}*[p](){for(let t=this.head;t;t=t.next)yield t.data}_getString(t){let n="",i=this.head,p=0;do{let b=i.data;if(t>b.length)n+=b,t-=b.length;else{t===b.length?(n+=b,++p,i.next?this.head=i.next:this.head=this.tail=null):(n+=s(b,0,t),this.head=i,i.data=s(b,t));break}++p}while(null!==(i=i.next));return this.length-=p,n}_getBuffer(t){let n=y.allocUnsafe(t),i=t,s=this.head,p=0;do{let y=s.data;if(t>y.length)b(n,y,i-t),t-=y.length;else{t===y.length?(b(n,y,i-t),++p,s.next?this.head=s.next:this.head=this.tail=null):(b(n,new g(y.buffer,y.byteOffset,t),i-t),this.head=s,s.data=y.slice(t));break}++p}while(null!==(s=s.next));return this.length-=p,n}[Symbol.for("nodejs.util.inspect.custom")](t,n){return m(this,{...n,depth:0,customInspect:!1})}}},61983:function(t,n,i){"use strict";let{pipeline:s}=i(38122),p=i(39884),{destroyer:b}=i(72179),{isNodeStream:g,isReadable:y,isWritable:m,isWebStream:_,isTransformStream:v,isWritableStream:w,isReadableStream:S}=i(40937),{AbortError:R,codes:{ERR_INVALID_ARG_VALUE:T,ERR_MISSING_ARGS:x}}=i(64545),A=i(94813);t.exports=function(...t){let n,i,k,O,P;if(0===t.length)throw new x("streams");if(1===t.length)return p.from(t[0]);let C=[...t];if("function"==typeof t[0]&&(t[0]=p.from(t[0])),"function"==typeof t[t.length-1]){let n=t.length-1;t[n]=p.from(t[n])}for(let n=0;n<t.length;++n)if(g(t[n])||_(t[n])){if(n<t.length-1&&!(y(t[n])||S(t[n])||v(t[n])))throw new T(`streams[${n}]`,C[n],"must be readable");if(n>0&&!(m(t[n])||w(t[n])||v(t[n])))throw new T(`streams[${n}]`,C[n],"must be writable")}function onfinished(t){let n=O;O=null,n?n(t):t?P.destroy(t):M||N||P.destroy()}let I=t[0],L=s(t,onfinished),N=!!(m(I)||w(I)||v(I)),M=!!(y(L)||S(L)||v(L));if(P=new p({writableObjectMode:!!(null!=I&&I.writableObjectMode),readableObjectMode:!!(null!=L&&L.readableObjectMode),writable:N,readable:M}),N){if(g(I))P._write=function(t,i,s){I.write(t,i)?s():n=s},P._final=function(t){I.end(),i=t},I.on("drain",function(){if(n){let t=n;n=null,t()}});else if(_(I)){let t=v(I)?I.writable:I,n=t.getWriter();P._write=async function(t,i,s){try{await n.ready,n.write(t).catch(()=>{}),s()}catch(t){s(t)}},P._final=async function(t){try{await n.ready,n.close().catch(()=>{}),i=t}catch(n){t(n)}}}let t=v(L)?L.readable:L;A(t,()=>{if(i){let t=i;i=null,t()}})}if(M){if(g(L))L.on("readable",function(){if(k){let t=k;k=null,t()}}),L.on("end",function(){P.push(null)}),P._read=function(){for(;;){let t=L.read();if(null===t){k=P._read;return}if(!P.push(t))return}};else if(_(L)){let t=v(L)?L.readable:L,n=t.getReader();P._read=async function(){for(;;)try{let{value:t,done:i}=await n.read();if(!P.push(t))return;if(i){P.push(null);return}}catch{return}}}}return P._destroy=function(t,s){t||null===O||(t=new R),k=null,n=null,i=null,null===O?s(t):(O=s,g(L)&&b(L,t))},P}},72179:function(t,n,i){"use strict";let s=i(34155),{aggregateTwoErrors:p,codes:{ERR_MULTIPLE_CALLBACK:b},AbortError:g}=i(64545),{Symbol:y}=i(7850),{kIsDestroyed:m,isDestroyed:_,isFinished:v,isServerRequest:w}=i(40937),S=y("kDestroy"),R=y("kConstruct");function checkError(t,n,i){t&&(t.stack,n&&!n.errored&&(n.errored=t),i&&!i.errored&&(i.errored=t))}function destroy(t,n){let i=this._readableState,s=this._writableState,b=s||i;return null!=s&&s.destroyed||null!=i&&i.destroyed?"function"==typeof n&&n():(checkError(t,s,i),s&&(s.destroyed=!0),i&&(i.destroyed=!0),b.constructed?_destroy(this,t,n):this.once(S,function(i){_destroy(this,p(i,t),n)})),this}function _destroy(t,n,i){let p=!1;function onDestroy(n){if(p)return;p=!0;let b=t._readableState,g=t._writableState;checkError(n,g,b),g&&(g.closed=!0),b&&(b.closed=!0),"function"==typeof i&&i(n),n?s.nextTick(emitErrorCloseNT,t,n):s.nextTick(emitCloseNT,t)}try{t._destroy(n||null,onDestroy)}catch(t){onDestroy(t)}}function emitErrorCloseNT(t,n){emitErrorNT(t,n),emitCloseNT(t)}function emitCloseNT(t){let n=t._readableState,i=t._writableState;i&&(i.closeEmitted=!0),n&&(n.closeEmitted=!0),(null!=i&&i.emitClose||null!=n&&n.emitClose)&&t.emit("close")}function emitErrorNT(t,n){let i=t._readableState,s=t._writableState;null!=s&&s.errorEmitted||null!=i&&i.errorEmitted||(s&&(s.errorEmitted=!0),i&&(i.errorEmitted=!0),t.emit("error",n))}function undestroy(){let t=this._readableState,n=this._writableState;t&&(t.constructed=!0,t.closed=!1,t.closeEmitted=!1,t.destroyed=!1,t.errored=null,t.errorEmitted=!1,t.reading=!1,t.ended=!1===t.readable,t.endEmitted=!1===t.readable),n&&(n.constructed=!0,n.destroyed=!1,n.closed=!1,n.closeEmitted=!1,n.errored=null,n.errorEmitted=!1,n.finalCalled=!1,n.prefinished=!1,n.ended=!1===n.writable,n.ending=!1===n.writable,n.finished=!1===n.writable)}function errorOrDestroy(t,n,i){let p=t._readableState,b=t._writableState;if(null!=b&&b.destroyed||null!=p&&p.destroyed)return this;null!=p&&p.autoDestroy||null!=b&&b.autoDestroy?t.destroy(n):n&&(n.stack,b&&!b.errored&&(b.errored=n),p&&!p.errored&&(p.errored=n),i?s.nextTick(emitErrorNT,t,n):emitErrorNT(t,n))}function construct(t,n){if("function"!=typeof t._construct)return;let i=t._readableState,p=t._writableState;i&&(i.constructed=!1),p&&(p.constructed=!1),t.once(R,n),t.listenerCount(R)>1||s.nextTick(constructNT,t)}function constructNT(t){let n=!1;function onConstruct(i){if(n){errorOrDestroy(t,null!=i?i:new b);return}n=!0;let p=t._readableState,g=t._writableState,y=g||p;p&&(p.constructed=!0),g&&(g.constructed=!0),y.destroyed?t.emit(S,i):i?errorOrDestroy(t,i,!0):s.nextTick(emitConstructNT,t)}try{t._construct(t=>{s.nextTick(onConstruct,t)})}catch(t){s.nextTick(onConstruct,t)}}function emitConstructNT(t){t.emit(R)}function isRequest(t){return(null==t?void 0:t.setHeader)&&"function"==typeof t.abort}function emitCloseLegacy(t){t.emit("close")}function emitErrorCloseLegacy(t,n){t.emit("error",n),s.nextTick(emitCloseLegacy,t)}function destroyer(t,n){!(!t||_(t))&&(n||v(t)||(n=new g),w(t)?(t.socket=null,t.destroy(n)):isRequest(t)?t.abort():isRequest(t.req)?t.req.abort():"function"==typeof t.destroy?t.destroy(n):"function"==typeof t.close?t.close():n?s.nextTick(emitErrorCloseLegacy,t,n):s.nextTick(emitCloseLegacy,t),t.destroyed||(t[m]=!0))}t.exports={construct,destroyer,destroy,undestroy,errorOrDestroy}},39884:function(t,n,i){"use strict";let s,p;let{ObjectDefineProperties:b,ObjectGetOwnPropertyDescriptor:g,ObjectKeys:y,ObjectSetPrototypeOf:m}=i(7850);t.exports=Duplex;let _=i(23415),v=i(14882);m(Duplex.prototype,_.prototype),m(Duplex,_);{let t=y(v.prototype);for(let n=0;n<t.length;n++){let i=t[n];Duplex.prototype[i]||(Duplex.prototype[i]=v.prototype[i])}}function Duplex(t){if(!(this instanceof Duplex))return new Duplex(t);_.call(this,t),v.call(this,t),t?(this.allowHalfOpen=!1!==t.allowHalfOpen,!1===t.readable&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),!1===t.writable&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)):this.allowHalfOpen=!0}function lazyWebStreams(){return void 0===s&&(s={}),s}b(Duplex.prototype,{writable:{__proto__:null,...g(v.prototype,"writable")},writableHighWaterMark:{__proto__:null,...g(v.prototype,"writableHighWaterMark")},writableObjectMode:{__proto__:null,...g(v.prototype,"writableObjectMode")},writableBuffer:{__proto__:null,...g(v.prototype,"writableBuffer")},writableLength:{__proto__:null,...g(v.prototype,"writableLength")},writableFinished:{__proto__:null,...g(v.prototype,"writableFinished")},writableCorked:{__proto__:null,...g(v.prototype,"writableCorked")},writableEnded:{__proto__:null,...g(v.prototype,"writableEnded")},writableNeedDrain:{__proto__:null,...g(v.prototype,"writableNeedDrain")},destroyed:{__proto__:null,get(){return void 0!==this._readableState&&void 0!==this._writableState&&this._readableState.destroyed&&this._writableState.destroyed},set(t){this._readableState&&this._writableState&&(this._readableState.destroyed=t,this._writableState.destroyed=t)}}}),Duplex.fromWeb=function(t,n){return lazyWebStreams().newStreamDuplexFromReadableWritablePair(t,n)},Duplex.toWeb=function(t){return lazyWebStreams().newReadableWritablePairFromDuplex(t)},Duplex.from=function(t){return p||(p=i(38894)),p(t,"body")}},38894:function(t,n,i){"use strict";let s=i(34155),p=i(48764),{isReadable:b,isWritable:g,isIterable:y,isNodeStream
2:m,isReadableNodeStream:_,isWritableNodeStream:v,isDuplexNodeStream:w,isReadableStream:S,isWritableStream:R}=i(40937),T=i(94813),{AbortError:x,codes:{ERR_INVALID_ARG_TYPE:A,ERR_INVALID_RETURN_VALUE:k}}=i(64545),{destroyer:O}=i(72179),P=i(39884),C=i(23415),I=i(14882),{createDeferredPromise:L}=i(73847),N=i(3206),M=globalThis.Blob||p.Blob,B=void 0!==M?function(t){return t instanceof M}:function(t){return!1},j=globalThis.AbortController||i(28599).AbortController,{FunctionPrototypeCall:D}=i(7850);let Duplexify=class Duplexify extends P{constructor(t){super(t),(null==t?void 0:t.readable)===!1&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),(null==t?void 0:t.writable)===!1&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)}};function fromAsyncGen(t){let{promise:n,resolve:i}=L(),p=new j,b=p.signal,g=t(async function*(){for(;;){let t=n;n=null;let{chunk:p,done:g,cb:y}=await t;if(s.nextTick(y),g)return;if(b.aborted)throw new x(void 0,{cause:b.reason});({promise:n,resolve:i}=L()),yield p}}(),{signal:b});return{value:g,write(t,n,s){let p=i;i=null,p({chunk:t,done:!1,cb:s})},final(t){let n=i;i=null,n({done:!0,cb:t})},destroy(t,n){p.abort(),n(t)}}}function _duplexify(t){let n,i,s,p,y;let m=t.readable&&"function"!=typeof t.readable.read?C.wrap(t.readable):t.readable,_=t.writable,v=!!b(m),w=!!g(_);function onfinished(t){let n=p;p=null,n?n(t):t&&y.destroy(t)}return y=new Duplexify({readableObjectMode:!!(null!=m&&m.readableObjectMode),writableObjectMode:!!(null!=_&&_.writableObjectMode),readable:v,writable:w}),w&&(T(_,t=>{w=!1,t&&O(m,t),onfinished(t)}),y._write=function(t,i,s){_.write(t,i)?s():n=s},y._final=function(t){_.end(),i=t},_.on("drain",function(){if(n){let t=n;n=null,t()}}),_.on("finish",function(){if(i){let t=i;i=null,t()}})),v&&(T(m,t=>{v=!1,t&&O(m,t),onfinished(t)}),m.on("readable",function(){if(s){let t=s;s=null,t()}}),m.on("end",function(){y.push(null)}),y._read=function(){for(;;){let t=m.read();if(null===t){s=y._read;return}if(!y.push(t))return}}),y._destroy=function(t,b){t||null===p||(t=new x),s=null,n=null,i=null,null===p?b(t):(p=b,O(_,t),O(m,t))},y}t.exports=function duplexify(t,n){if(w(t))return t;if(_(t))return _duplexify({readable:t});if(v(t))return _duplexify({writable:t});if(m(t))return _duplexify({writable:!1,readable:!1});if(S(t))return _duplexify({readable:C.fromWeb(t)});if(R(t))return _duplexify({writable:I.fromWeb(t)});if("function"==typeof t){let{value:i,write:p,final:b,destroy:g}=fromAsyncGen(t);if(y(i))return N(Duplexify,i,{objectMode:!0,write:p,final:b,destroy:g});let m=null==i?void 0:i.then;if("function"==typeof m){let t;let n=D(m,i,t=>{if(null!=t)throw new k("nully","body",t)},n=>{O(t,n)});return t=new Duplexify({objectMode:!0,readable:!1,write:p,final(t){b(async()=>{try{await n,s.nextTick(t,null)}catch(n){s.nextTick(t,n)}})},destroy:g})}throw new k("Iterable, AsyncIterable or AsyncFunction",n,i)}if(B(t))return duplexify(t.arrayBuffer());if(y(t))return N(Duplexify,t,{objectMode:!0,writable:!1});if(S(null==t?void 0:t.readable)&&R(null==t?void 0:t.writable))return Duplexify.fromWeb(t);if("object"==typeof(null==t?void 0:t.writable)||"object"==typeof(null==t?void 0:t.readable)){let n=null!=t&&t.readable?_(null==t?void 0:t.readable)?null==t?void 0:t.readable:duplexify(t.readable):void 0,i=null!=t&&t.writable?v(null==t?void 0:t.writable)?null==t?void 0:t.writable:duplexify(t.writable):void 0;return _duplexify({readable:n,writable:i})}let i=null==t?void 0:t.then;if("function"==typeof i){let n;return D(i,t,t=>{null!=t&&n.push(t),n.push(null)},t=>{O(n,t)}),n=new Duplexify({objectMode:!0,writable:!1,read(){}})}throw new A(n,["Blob","ReadableStream","WritableStream","Stream","Iterable","AsyncIterable","Function","{ readable, writable } pair","Promise"],t)}},94813:function(t,n,i){let s;"use strict";let p=i(34155),{AbortError:b,codes:g}=i(64545),{ERR_INVALID_ARG_TYPE:y,ERR_STREAM_PREMATURE_CLOSE:m}=g,{kEmptyObject:_,once:v}=i(73847),{validateAbortSignal:w,validateFunction:S,validateObject:R,validateBoolean:T}=i(68188),{Promise:x,PromisePrototypeThen:A,SymbolDispose:k}
2=i(7850),{isClosed:O,isReadable:P,isReadableNodeStream:C,isReadableStream:I,isReadableFinished:L,isReadableErrored:N,isWritable:M,isWritableNodeStream:B,isWritableStream:j,isWritableFinished:D,isWritableErrored:F,isNodeStream:W,willEmitClose:q,kIsClosedPromise:U}=i(40937);function isRequest(t){return t.setHeader&&"function"==typeof t.abort}let nop=()=>{};function eos(t,n,g){var T,x;if(2==arguments.length?(g=n,n=_):null==n?n=_:R(n,"options"),S(g,"callback"),w(n.signal,"options.signal"),g=v(g),I(t)||j(t))return eosWeb(t,n,g);if(!W(t))throw new y("stream",["ReadableStream","WritableStream","Stream"],t);let A=null!==(T=n.readable)&&void 0!==T?T:C(t),U=null!==(x=n.writable)&&void 0!==x?x:B(t),$=t._writableState,H=t._readableState,onlegacyfinish=()=>{t.writable||onfinish()},z=q(t)&&C(t)===A&&B(t)===U,V=D(t,!1),onfinish=()=>{V=!0,t.destroyed&&(z=!1),z&&(!t.readable||A)||A&&!G||g.call(t)},G=L(t,!1),onend=()=>{G=!0,t.destroyed&&(z=!1),z&&(!t.writable||U)||U&&!V||g.call(t)},onerror=n=>{g.call(t,n)},Z=O(t),onclose=()=>{Z=!0;let n=F(t)||N(t);return n&&"boolean"!=typeof n?g.call(t,n):A&&!G&&C(t,!0)&&!L(t,!1)||U&&!V&&!D(t,!1)?g.call(t,new m):void g.call(t)},onclosed=()=>{Z=!0;let n=F(t)||N(t);if(n&&"boolean"!=typeof n)return g.call(t,n);g.call(t)},onrequest=()=>{t.req.on("finish",onfinish)};isRequest(t)?(t.on("complete",onfinish),z||t.on("abort",onclose),t.req?onrequest():t.on("request",onrequest)):U&&!$&&(t.on("end",onlegacyfinish),t.on("close",onlegacyfinish)),z||"boolean"!=typeof t.aborted||t.on("aborted",onclose),t.on("end",onend),t.on("finish",onfinish),!1!==n.error&&t.on("error",onerror),t.on("close",onclose),Z?p.nextTick(onclose):null!=$&&$.errorEmitted||null!=H&&H.errorEmitted?z||p.nextTick(onclosed):!A&&(!z||P(t))&&(V||!1===M(t))?p.nextTick(onclosed):!U&&(!z||M(t))&&(G||!1===P(t))?p.nextTick(onclosed):H&&t.req&&t.aborted&&p.nextTick(onclosed);let cleanup=()=>{g=nop,t.removeListener("aborted",onclose),t.removeListener("complete",onfinish),t.removeListener("abort",onclose),t.removeListener("request",onrequest),t.req&&t.req.removeListener("finish",onfinish),t.removeListener("end",onlegacyfinish),t.removeListener("close",onlegacyfinish),t.removeListener("finish",onfinish),t.removeListener("end",onend),t.removeListener("error",onerror),t.removeListener("close",onclose)};if(n.signal&&!Z){let abort=()=>{let i=g;cleanup(),i.call(t,new b(void 0,{cause:n.signal.reason}))};if(n.signal.aborted)p.nextTick(abort);else{s=s||i(73847).addAbortListener;let p=s(n.signal,abort),b=g;g=v((...n)=>{p[k](),b.apply(t,n)})}}return cleanup}function eosWeb(t,n,g){let y=!1,m=nop;if(n.signal){if(m=()=>{y=!0,g.call(t,new b(void 0,{cause:n.signal.reason}))},n.signal.aborted)p.nextTick(m);else{s=s||i(73847).addAbortListener;let p=s(n.signal,m),b=g;g=v((...n)=>{p[k](),b.apply(t,n)})}}let resolverFn=(...n)=>{y||p.nextTick(()=>g.apply(t,n))};return A(t[U].promise,resolverFn,resolverFn),nop}function finished(t,n){var i;let s=!1;return null===n&&(n=_),null!==(i=n)&&void 0!==i&&i.cleanup&&(T(n.cleanup,"cleanup"),s=n.cleanup),new x((i,p)=>{let b=eos(t,n,t=>{s&&b(),t?p(t):i()})})}t.exports=eos,t.exports.finished=finished},3206:function(t,n,i){"use strict";let s=i(34155),{PromisePrototypeThen:p,SymbolAsyncIterator:b,SymbolIterator:g}=i(7850),{Buffer:y}=i(48764),{ERR_INVALID_ARG_TYPE:m,ERR_STREAM_NULL_VALUES:_}=i(64545).codes;function from(t,n,i){let v,w;if("string"==typeof n||n instanceof y)return new t({objectMode:!0,...i,read(){this.push(n),this.push(null)}});if(n&&n[b])w=!0,v=n[b]();else if(n&&n[g])w=!1,v=n[g]();else throw new m("iterable",["Iterable"],n);let S=new t({objectMode:!0,highWaterMark:1,...i}),R=!1;async function close(t){let n=null!=t,i="function"==typeof v.throw;if(n&&i){let{value:n,done:i}=await v.throw(t);if(await n,i)return}if("function"==typeof v.return){let{value:t}=await v.return();await t}}async function next(){for(;;){try{let{value:t,done:n}=w?await v.next():v.next();if(n)S.push(null);else{let n=t&&"function"==typeof t.then?await t:t;if(null===n)throw R=!1,new _;if(S.push(n))continue;R=!1}}catch(t){S.destroy(t)}break}}return S._read=function(){R||(R=!0,next())},S._destroy=function(t,n){p(close(t),()=>s.nextTick(n,t),i=>s.nextTick(n,i||t))},S}t.exports=from},44007:function(t,n,i){"use strict";let{ArrayIsArray:s,ObjectSetPrototypeOf:p}=i(7850),{EventEmitter:b}=i(17187);function Stream(t){b.call(this,t)}function prependListener(t,n,i){if("function"==typeof t.prependListener)return t.prependListener(n,i);t._events&&t._events[n]?s(t._events[n])?t._events[n].unshift(i):t._events[n]=[i,t._events[n]]:t.on(n,i)}p(Stream.prototype,b.prototype),p(Stream,b),Stream.prototype.pipe=function(t,n){let i=this;function ondata(n){t.writable&&!1===t.write(n)&&i.pause&&i.pause()}function ondrain(){i.readable&&i.resume&&i.resume()}i.on("data",ondata),t.on("drain",ondrain),t._isStdio||n&&!1===n.end||(i.on("end",onend),i.on("close",onclose));let s=!1;function onend(){s||(s=!0,t.end())}function onclose(){s||(s=!0,"function"==typeof t.destroy&&t.destroy())}function onerror(t){cleanup(),0===b.listenerCount(this,"error")&&this.emit
2("error",t)}function cleanup(){i.removeListener("data",ondata),t.removeListener("drain",ondrain),i.removeListener("end",onend),i.removeListener("close",onclose),i.removeListener("error",onerror),t.removeListener("error",onerror),i.removeListener("end",cleanup),i.removeListener("close",cleanup),t.removeListener("close",cleanup)}return prependListener(i,"error",onerror),prependListener(t,"error",onerror),i.on("end",cleanup),i.on("close",cleanup),t.on("close",cleanup),t.emit("pipe",i),t},t.exports={Stream,prependListener}},46942:function(t,n,i){"use strict";let s=globalThis.AbortController||i(28599).AbortController,{codes:{ERR_INVALID_ARG_VALUE:p,ERR_INVALID_ARG_TYPE:b,ERR_MISSING_ARGS:g,ERR_OUT_OF_RANGE:y},AbortError:m}=i(64545),{validateAbortSignal:_,validateInteger:v,validateObject:w}=i(68188),S=i(7850).Symbol("kWeak"),R=i(7850).Symbol("kResistStopPropagation"),{finished:T}=i(94813),x=i(61983),{addAbortSignalNoValidate:A}=i(68251),{isWritable:k,isNodeStream:O}=i(40937),{deprecate:P}=i(73847),{ArrayPrototypePush:C,Boolean:I,MathFloor:L,Number:N,NumberIsNaN:M,Promise:B,PromiseReject:j,PromiseResolve:D,PromisePrototypeThen:F,Symbol:W}=i(7850),q=W("kEmpty"),U=W("kEof");function compose(t,n){if(null!=n&&w(n,"options"),(null==n?void 0:n.signal)!=null&&_(n.signal,"options.signal"),O(t)&&!k(t))throw new p("stream",t,"must be writable");let i=x(this,t);return null!=n&&n.signal&&A(n.signal,i),i}
2function map(t,n){if("function"!=typeof t)throw new b("fn",["Function","AsyncFunction"],t);null!=n&&w(n,"options"),(null==n?void 0:n.signal)!=null&&_(n.signal,"options.signal");let s=1;(null==n?void 0:n.concurrency)!=null&&(s=L(n.concurrency));let p=s-1;return(null==n?void 0:n.highWaterMark)!=null&&(p=L(n.highWaterMark)),v(s,"options.concurrency",1),v(p,"options.highWaterMark",0),p+=s,(async function*(){let b,g;let y=i(73847).AbortSignalAny([null==n?void 0:n.signal].filter(I)),_=this,v=[],w={signal:y},S=!1,R=0;function onCatch(){S=!0,afterItemProcessed()}function afterItemProcessed(){R-=1,maybeResume()}function maybeResume(){g&&!S&&R<s&&v.length<p&&(g(),g=null)}(async function(){try{for await(let n of _){if(S)return;if(y.aborted)throw new m;try{if((n=t(n,w))===q)continue;n=D(n)}catch(t){n=j(t)}R+=1,F(n,afterItemProcessed,onCatch),v.push(n),b&&(b(),b=null),!S&&(v.length>=p||R>=s)&&await new B(t=>{g=t})}v.push(U)}catch(n){let t=j(n);F(t,afterItemProcessed,onCatch),v.push(t)}finally{S=!0,b&&(b(),b=null)}})();try{for(;;){for(;v.length>0;){let t=await v[0];if(t===U)return;if(y.aborted)throw new m;t!==q&&(yield t),v.shift(),maybeResume()}await new B(t=>{b=t})}}finally{S=!0,g&&(g(),g=null)}}).call(this)}function asIndexedPairs(t){return null!=t&&w(t,"options"),(null==t?void 0:t.signal)!=null&&_(t.signal,"options.signal"),(async function*(){let n=0;for await(let s of this){var i;if(null!=t&&null!==(i=t.signal)&&void 0!==i&&i.aborted)throw new m({cause:t.signal.reason});yield[n++,s]}}).call(this)}async function some(t,n){for await(let i of filter.call(this,t,n))return!0;return!1}async function every(t,n){if("function"!=typeof t)throw new b("fn",["Fu
2nction","AsyncFunction"],t);return!await some.call(this,async(...n)=>!await t(...n),n)}async function find(t,n){for await(let i of filter.call(this,t,n))return i}async function forEach(t,n){if("function"!=typeof t)throw new b("fn",["Function","AsyncFunction"],t);async function forEachFn(n,i){return await t(n,i),q}for await(let t of map.call(this,forEachFn,n));}function filter(t,n){if("function"!=typeof t)throw new b("fn",["Function","AsyncFunction"],t);async function filterFn(n,i){return await t(n,i)?n:q}return map.call(this,filterFn,n)}let ReduceAwareErrMissingArgs=class ReduceAwareErrMissingArgs extends g{constructor(){super("reduce"),this.message="Reduce of an empty stream requires an initial value"}};async function reduce(t,n,i){var p,g;if("function"!=typeof t)throw new b("reducer",["Function","AsyncFunction"],t);null!=i&&w(i,"options"),(null==i?void 0:i.signal)!=null&&_(i.signal,"options.signal");let y=arguments.length>1;if(null!=i&&null!==(p=i.signal)&&void 0!==p&&p.aborted){let t=new m(void 0,{cause:i.signal.reason});throw this.once("error",()=>{}),await T(this.destroy(t)),t}let v=new s,x=v.signal;null!=i&&i.signal&&i.signal.addEventListener("abort",()=>v.abort(),{once:!0,[S]:this,[R]:!0});let A=!1;try{for await(let s of this){if(A=!0,null!=i&&null!==(g=i.signal)&&void 0!==g&&g.aborted)throw new m;y?n=await t(n,s,{signal:x}):(n=s,y=!0)}if(!A&&!y)throw new ReduceAwareErrMissingArgs}finally{v.abort()}return n}async function toArray(t){null!=t&&w(t,"options"),(null==t?void 0:t.signal)!=null&&_(t.signal,"options.signal");let n=[];for await(let s of this){var i;if(null!=t&&null!==(i=t.signal)&&void 0!==i&&i.aborted)throw new m(void 0,{cause:t.signal.reason});C(n,s)}return n}function flatMap(t,n){let i=map.call(this,t,n);return(async function*(){for await(let t of i)yield*t}).call(this)}function toIntegerOrInfinity(t){if(M(t=N(t)))return 0;if(t<0)throw new y("number",">= 0",t);return t}function drop(t,n){return null!=n&&w(n,"options"),(null==n?void 0:n.signal)!=null&&_(n.signal,"options.signal"),t=toIntegerOrInfinity(t),(async function*(){var i,s;if(null!=n&&null!==(i=n.signal)&&void 0!==i&&i.aborted)throw new m;for await(let i of this){if(null!=n&&null!==(s=n.signal)&&void 0!==s&&s.aborted)throw new m;t--<=0&&(yield i)}}).call(this)}function take(t,n){return null!=n&&w(n,"options"),(null==n?void 0:n.signal)!=null&&_(n.signal,"options.signal"),t=toIntegerOrInfinity(t),(async function*(){var i,s;if(null!=n&&null!==(i=n.signal)&&void 0!==i&&i.aborted)throw new m;for await(let i of this){if(null!=n&&null!==(s=n.signal)&&void 0!==s&&s.aborted)throw new m;if(t-- >0&&(yield i),t<=0)return}}).call(this)}t.exports.streamReturningOperators={asIndexedPairs:P(asIndexedPairs,"readable.asIndexedPairs will be removed in a future version."),drop,filter,flatMap,map,take,compose},t.exports.promiseReturningOperators={every,forEach,reduce,toArray,some,find}},482:function(t,n,i){"use strict";let{ObjectSetPrototypeOf:s}=i(7850);t.exports=PassThrough;let p=i(61569);function PassThrough(t){if(!(this instanceof PassThrough))return new PassThrough(t);p.call(this,t)}s(PassThrough.prototype,p.prototype),s(PassThrough,p),PassThrough.prototype._transform=function(t,n,i){i(null,t)}},38122:function(t,n,i){let s,p,b;"use strict";let g=i(34155),{ArrayIsArray:y,Promise:m,SymbolAsyncIterator:_,SymbolDispose:v}=i(7850),w=i(94813),{once:S}=i(73847),R=i(72179),T=i(39884),{aggregateTwoErrors:x,codes:{ERR_INVALID_ARG_TYPE:A,ERR_INVALID_RETURN_VALUE:k,ERR_MISSING_ARGS:O,ERR_STREAM_DESTROYED:P,ERR_STREAM_PREMATURE_CLOSE:C},AbortError:I}=i(64545),{validateFunction:L,validateAbortSignal:N}=i(68188),{isIterable:M,isReadable:B,isReadableNodeStream:j,isNodeStream:D,isTransformStream:F,isWebStream:W,isReadableStream:q,isReadableFinished:U}=i(40937),$=globalThis.AbortController||i(28599).AbortController;function destroyer(t,n,i){let s=!1;t.on("close",()=>{s=!0});let p=w(t,{readable:n,writable:i},t=>{s=!t});return{destroy:n=>{s||(s=!0,R.destroyer(t,n||new P("pipe")))},cleanup:p}}function popCallback(t){return L(t[t.length-1],"streams[stream.length - 1]"),t.pop()}function makeAsyncIterable(t){if(M(t))return t;if(j(t))return fromReadable(t);throw new A("val",["Readable","Iterable","AsyncIterable"],t)}async function*fromReadable(t){p||(p=i(23415)),yield*p.prototype[_].call(t)}async function pumpToNode(t,n,i,{end:s}){let p;let b=null,resume=t=>{if(t&&(p=t),b){let t=b;b=null,t()}},wait=()=>new m((t,n)=>{p?n(p):b=()=>{p?n(p):t()}});n.on("drain",resume);let g=w(n,{readable:!1},resume);try{for await(let i of(n.writableNeedDrain&&await wait(),t))n.write(i)||await wait();s&&(n.end(),await wait()),i()}catch(t){i(p!==t?x(p,t):t)}finally{g(),n.off("drain",resume)}}async function pumpToWeb(t,n,i,{end:s}){F(n)&&(n=n.writable);let p=n.getWriter();try{for await(let n of t)await p.ready,p.write(n).catch(()=>{});await p.ready,s&&await p.close(),i()}catch(t){try{await p.abort(t),i(t)}catch(t){i(t)}}}function pipeline(...t){return pipelineImpl(t,S(popCallback(t)))}function pipelineImpl(t,n,p){let m,_,w,S;if(1===t.length&&y(t[0])&&(t=t[0]),t.length<2)throw new O("streams");let R=new $,x=R.signal,P=null==p?void 0:p.signal,C=[];function abort(){finishImpl(new I)}N(P,"options.signal"),b=b||i(73847).addAbortListener,P&&(m=b(P,abort));let L=[],U=0;function finish(t){finishImpl(t,0==--U)}function finishImpl(t,i){var s;if(t&&(!_||"ERR_STREAM_PREMATURE_CLOSE"===_.code)&&(_=t),_||i){for(;L.length;)L.shift()(_);
2null===(s=m)||void 0===s||s[v](),R.abort(),i&&(_||C.forEach(t=>t()),g.nextTick(n,_,w))}}for(let n=0;n<t.length;n++){let b=t[n],y=n<t.length-1,m=n>0,_=y||(null==p?void 0:p.end)!==!1,v=n===t.length-1;if(D(b)){if(_){let{destroy:t,cleanup:n}=destroyer(b,y,m);L.push(t),B(b)&&v&&C.push(n)}function onError(t){t&&"AbortError"!==t.name&&"ERR_STREAM_PREMATURE_CLOSE"!==t.code&&finish(t)}b.on("error",onError),B(b)&&v&&C.push(()=>{b.removeListener("error",onError)})}if(0===n){if("function"==typeof b){if(!M(S=b({signal:x})))throw new k("Iterable, AsyncIterable or Stream","source",S)}else S=M(b)||j(b)||F(b)?b:T.from(b)}else if("function"==typeof b){var H,z;if(S=b(S=F(S)?makeAsyncIterable(null===(H=S)||void 0===H?void 0:H.readable):makeAsyncIterable(S),{signal:x}),y){if(!M(S,!0))throw new k("AsyncIterable",`transform[${n-1}]`,S)}else{s||(s=i(482));let t=new s({objectMode:!0}),n=null===(z=S)||void 0===z?void 0:z.then;if("function"==typeof n)U++,n.call(S,n=>{w=n,null!=n&&t.write(n),_&&t.end(),g.nextTick(finish)},n=>{t.destroy(n),g.nextTick(finish,n)});else if(M(S,!0))U++,pumpToNode(S,t,finish,{end:_});else if(q(S)||F(S)){let n=S.readable||S;U++,pumpToNode(n,t,finish,{end:_})}else throw new k("AsyncIterable or Promise","destination",S);S=t;let{destroy:p,cleanup:b}=destroyer(S,!1,!0);L.push(p),v&&C.push(b)}}else if(D(b)){if(j(S)){U+=2;let t=pipe(S,b,finish,{end:_});B(b)&&v&&C.push(t)}else if(F(S)||q(S)){let t=S.readable||S;U++,pumpToNode(t,b,finish,{end:_})}else if(M(S))U++,pumpToNode(S,b,finish,{end:_});else throw new A("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],S);S=b}else if(W(b)){if(j(S))U++,pumpToWeb(makeAsyncIterable(S),b,finish,{end:_});else if(q(S)||M(S))U++,pumpToWeb(S,b,finish,{end:_});else if(F(S))U++,pumpToWeb(S.readable,b,finish,{end:_});else throw new A("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],S);S=b}else S=T.from(b)}return(null!=x&&x.aborted||null!=P&&P.aborted)&&g.nextTick(abort),S}function pipe(t,n,i,{end:s}){let p=!1;if(n.on("close",()=>{p||i(new C)}),t.pipe(n,{end:!1}),s){function endFn(){p=!0,n.end()}U(t)?g.nextTick(endFn):t.once("end",endFn)}else i();return w(t,{readable:!0,writable:!1},n=>{let s=t._readableState;n&&"ERR_STREAM_PREMATURE_CLOSE"===n.code&&s&&s.ended&&!s.errored&&!s.errorEmitted?t.once("end",i).once("error",i):i(n)}),w(n,{readable:!1,writable:!0},i)}t.exports={pipelineImpl,pipeline}},23415:function(t,n,i){let s;"use strict";let p=i(34155),{ArrayPrototypeIndexOf:b,NumberIsInteger:g,NumberIsNaN:y,NumberParseInt:m,ObjectDefineProperties:_,ObjectKeys:v,ObjectSetPrototypeOf:w,Promise:S,SafeSet:R,SymbolAsyncDispose:T,SymbolAsyncIterator:x,Symbol:A}=i(7850);t.exports=Readable,Readable.ReadableState=ReadableState;let{EventEmitter:k}=i(17187),{Stream:O,prependListener:P}=i(44007),{Buffer:C}=i(48764),{addAbortSignal:I}=i(68251),L=i(94813),N=i(73847).debuglog("stream",t=>{N=t}),M=i(35106),B=i(72179),{getHighWaterMark:j,getDefaultHighWaterMark:D}=i(86238),{aggregateTwoErrors:F,codes:{ERR_INVALID_ARG_TYPE:W,ERR_METHOD_NOT_IMPLEMENTED:q,ERR_OUT_OF_RANGE:U,ERR_STREAM_PUSH_AFTER_EOF:$,ERR_STREAM_UNSHIFT_AFTER_END_EVENT:H},AbortError:z}=i(64545),{validateObject:V}=i(68188),G=A("kPaused"),{StringDecoder:Z}=i(32553),J=i(3206);w(Readable.prototype,O.prototype),w(Readable,O);let nop=()=>{},{errorOrDestroy:K}=B;function makeBitMapDescriptor(t){return{enumerable:!1,get(){return(this.state&t)!=0},set(n){n?this.state|=t:this.state&=~t}}}function ReadableState(t,n,s){"boolean"!=typeof s&&(s=n instanceof i(39884)),this.state=6192,t&&t.objectMode&&(this.state|=1),s&&t&&t.readableObjectMode&&(this.state|=1),this.highWaterMark=t?j(this,t,"readableHighWaterMark",s):D(!1),this.buffer=new M,this.length=0,this.pipes=[],this.flowing=null,this[G]=null,t&&!1===t.emitClose&&(this.state&=-2049),t&&!1===t.autoDestroy&&(this.state&=-4097),this.errored=null,this.defaultEncoding=t&&t.defaultEncoding||"utf8",this.awaitDrainWriters=null,this.decoder=null,this.encoding=null,t&&t.encoding&&(this.decoder=new Z(t.encoding),this.encoding=t.encoding)}function Readable(t){if(!(this instanceof Readable))return new Readable(t);let n=this instanceof i(39884);this._readableState=new ReadableState(t,this,n),t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.construct&&(this._construct=t.construct),t.signal&&!n&&I(t.signal,this)),O.call(this,t),B.construct(this,()=>{this._readableState.needReadable&&maybeReadMore(this,this._readableState)})}function readableAddChunk(t,n,i,s){let p;N("readableAddChunk",n);let b=t._readableState;if((1&b.state)==0&&("string"==typeof n?(i=i||b.defaultEncoding,b.encoding!==i&&(s&&b.encoding?n=C.from(n,i).toString(b.encoding):(n=C.from(n,i),i=""))):n instanceof C?i="":O._isUint8Array(n)?(n=O._uint8ArrayToBuffer(n),i=""):null!=n&&(p=new W("chunk",["string","Buffer","Uint8Array"],n))),p)K(t,p);else if(null===n)b.state&=-9,onEofChunk(t,b);else if((1&b.state)!=0||n&&n.length>0){if(s){if((4&b.state)!=0)K(t,new H);else{if(b.destroyed||b.errored)return!1;addChunk(t,b,n,!0)}}else if(b.ended)K(t,new $);else{if(b.destroyed||b.errored)return!1;b.state&=-9,b.decoder&&!i?(n=b.decoder.write(n),b.objectMode||0!==n.length?addChunk(t,b,n,!1):maybeReadMore(t,b)):addChunk(t,b,n,!1)}}else s||(b.state&=-9,maybeReadMore(t,b));return!b.ended&&(b.length<b.highWaterMark||0===b.length)}function addChunk(t,n,i,s){n.flowing&&0===n.length&&!n.sync&&t.listenerCount("data")>0?((65536&n.state)!=0?n.awaitDrainWriters.clear():n.awaitDrainWriters=null,n.dataEmitted=!0,t.emit("data",i)):(n.length+=n.objectMode?1:i.length,s?n.buffer.unshift(i):n.buffer.push(i),(64&n.state)!=0&&emitReadable(t)),maybeReadMore(t,n)}function computeNewHighWaterMark(t){if(t>1073741824)throw new U("size","<= 1GiB",t);return t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,++t}
2function howMuchToRead(t,n){return t<=0||0===n.length&&n.ended?0:(1&n.state)!=0?1:y(t)?n.flowing&&n.length?n.buffer.first().length:n.length:t<=n.length?t:n.ended?n.length:0}function onEofChunk(t,n){if(N("onEofChunk"),!n.ended){if(n.decoder){let t=n.decoder.end();t&&t.length&&(n.buffer.push(t),n.length+=n.objectMode?1:t.length)}n.ended=!0,n.sync?emitReadable(t):(n.needReadable=!1,n.emittedReadable=!0,emitReadable_(t))}}function emitReadable(t){let n=t._readableState;N("emitReadable",n.needReadable,n.emittedReadable),n.needReadable=!1,n.emittedReadable||(N("emitReadable",n.flowing),n.emittedReadable=!0,p.nextTick(emitReadable_,t))}function emitReadable_(t){let n=t._readableState;N("emitReadable_",n.destroyed,n.length,n.ended),!n.destroyed&&!n.errored&&(n.length||n.ended)&&(t.emit("readable"),n.emittedReadable=!1),n.needReadable=!n.flowing&&!n.ended&&n.length<=n.highWaterMark,flow(t)}function maybeReadMore(t,n){!n.readingMore&&n.constructed&&(n.readingMore=!0,p.nextTick(maybeReadMore_,t,n))}function maybeReadMore_(t,n){for(;!n.reading&&!n.ended&&(n.length<n.highWaterMark||n.flowing&&0===n.length);){let i=n.length;if(N("maybeReadMore read 0"),t.read(0),i===n.length)break}n.readingMore=!1}function pipeOnDrain(t,n){return function(){let i=t._readableState;i.awaitDrainWriters===n?(N("pipeOnDrain",1),i.awaitDrainWriters=null):i.multiAwaitDrain&&(N("pipeOnDrain",i.awaitDrainWriters.size),i.awaitDrainWriters.delete(n)),(!i.awaitDrainWriters||0===i.awaitDrainWriters.size)&&t.listenerCount("data")&&t.resume()}}function updateReadableListening(t){let n=t._readableState;n.readableListening=t.listenerCount("readable")>0,n.resumeScheduled&&!1===n[G]?n.flowing=!0:t.listenerCount("data")>0?t.resume():n.readableListening||(n.flowing=null)}function nReadingNextTick(t){N("readable nexttick read 0"),t.read(0)}function resume(t,n){n.resumeScheduled||(n.resumeScheduled=!0,p.nextTick(resume_,t,n))}function resume_(t,n){N("resume",n.reading),n.reading||t.read(0),n.resumeScheduled=!1,t.emit("resume"),flow(t),n.flowing&&!n.reading&&t.read(0)}function flow(t){let n=t._readableState;for(N("flow",n.flowing);n.flowing&&null!==t.read(););}function streamToAsyncIterator(t,n){"function"!=typeof t.read&&(t=Readable.wrap(t,{objectMode:!0}));let i=createAsyncIterator(t,n);return i.stream=t,i}async function*createAsyncIterator(t,n){let i,s=nop;function next(n){this===t?(s(),s=nop):s=n}t.on("readable",next);let p=L(t,{writable:!1},t=>{i=t?F(i,t):null,s(),s=nop});try{for(;;){let n=t.destroyed?null:t.read();if(null!==n)yield n;else if(i)throw i;else{if(null===i)return;await new S(next)}}}catch(t){throw i=F(i,t)}finally{(i||(null==n?void 0:n.destroyOnReturn)!==!1)&&(void 0===i||t._readableState.autoDestroy)?B.destroyer(t,null):(t.off("readable",next),p())}}function fromList(t,n){let i;return 0===n.length?null:(n.objectMode?i=n.buffer.shift():!t||t>=n.length?(i=n.decoder?n.buffer.join(""):1===n.buffer.length?n.buffer.first():n.buffer.concat(n.length),n.buffer.clear()):i=n.buffer.consume(t,n.decoder),i)}function endReadable(t){let n=t._readableState;N("endReadable",n.endEmitted),n.endEmitted||(n.ended=!0,p.nextTick(endReadableNT,n,t))}function endReadableNT(t,n){if(N("endReadableNT",t.endEmitted,t.length),!t.errored&&!t.closeEmitted&&!t.endEmitted&&0===t.length){if(t.endEmitted=!0,n.emit("end"),n.writable&&!1===n.allowHalfOpen)p.nextTick(endWritableNT,n);else if(t.autoDestroy){let t=n._writableState,i=!t||t.autoDestroy&&(t.finished||!1===t.writable);i&&n.destroy()}}}function endWritableNT(t){let n=t.writable&&!t.writableEnded&&!t.destroyed;n&&t.end()}function lazyWebStreams(){return void 0===s&&(s={}),s}_(ReadableState.prototype,{objectMode:makeBitMapDescriptor(1),ended:makeBitMapDescriptor(2),endEmitted:makeBitMapDescriptor(4),reading:makeBitMapDescriptor(8),constructed:makeBitMapDescriptor(16),sync:makeBitMapDescriptor(32),needReadable:makeBitMapDescriptor(64),emittedReadable:makeBitMapDescriptor(128),readableListening:makeBitMapDescriptor(256),resumeScheduled:makeBitMapDescriptor(512),errorEmitted:makeBitMapDescriptor(1024),emitClose:makeBitMapDescriptor(2048),autoDestroy:makeBitMapDescriptor(4096),destroyed:makeBitMapDescriptor(8192),closed:makeBitMapDescriptor(16384),closeEmitted:makeBitMapDescriptor(32768),multiAwaitDrain:makeBitMapDescriptor(65536),readingMore:makeBitMapDescriptor(131072),dataEmitted:makeBitMapDescriptor(262144)}),Readable.prototype.destroy=B.destroy,Readable.prototype._undestroy=B.undestroy,Readable.prototype._destroy=function(t,n){n(t)},Readable.prototype[k.captureRejectionSymbol]=function(t){this.destroy(t)},Readable.prototype[T]=function(){let t;return this.destroyed||(t=this.readableEnded?null:new z,this.destroy(t)),new S((n,i)=>L(this,s=>s&&s!==t?i(s):n(null)))},Readable.prototype.push=function(t,n){return readableAddChunk(this,t,n,!1)},Readable.prototype.unshift=function(t,n){return readableAddChunk(this,t,n,!0)},Readable.prototype.isPaused=function(){let t=this._readableState;return!0===t[G]||!1===t.flowing},Readable.prototype.setEncoding=function(t){let n=new Z(t);this._readableState.decoder=n,this._readableState.encoding=this._readableState.decoder.encoding;let i=this._readableState.buffer,s="";for(let t of i)s+=n.write(t);return i.clear(),""!==s&&i.push(s),this._readableState.length=s.length,this},Readable.prototype.read=function(t){let n;N("read",t),void 0===t?t=NaN:g(t)||(t=m(t,10));let i=this._readableState,s=t;if(t>i.highWaterMark&&(i.highWaterMark=computeNewHighWaterMark(t)),0!==t&&(i.state&=-129),
20===t&&i.needReadable&&((0!==i.highWaterMark?i.length>=i.highWaterMark:i.length>0)||i.ended))return N("read: emitReadable",i.length,i.ended),0===i.length&&i.ended?endReadable(this):emitReadable(this),null;if(0===(t=howMuchToRead(t,i))&&i.ended)return 0===i.length&&endReadable(this),null;let p=(64&i.state)!=0;if(N("need readable",p),(0===i.length||i.length-t<i.highWaterMark)&&N("length less than watermark",p=!0),i.ended||i.reading||i.destroyed||i.errored||!i.constructed)N("reading, ended or constructing",p=!1);else if(p){N("do read"),i.state|=40,0===i.length&&(i.state|=64);try{this._read(i.highWaterMark)}catch(t){K(this,t)}i.state&=-33,i.reading||(t=howMuchToRead(s,i))}return null===(n=t>0?fromList(t,i):null)?(i.needReadable=i.length<=i.highWaterMark,t=0):(i.length-=t,i.multiAwaitDrain?i.awaitDrainWriters.clear():i.awaitDrainWriters=null),0===i.length&&(i.ended||(i.needReadable=!0),s!==t&&i.ended&&endReadable(this)),null===n||i.errorEmitted||i.closeEmitted||(i.dataEmitted=!0,this.emit("data",n)),n},Readable.prototype._read=function(t){throw new q("_read()")},Readable.prototype.pipe=function(t,n){let i;let s=this,b=this._readableState;1!==b.pipes.length||b.multiAwaitDrain||(b.multiAwaitDrain=!0,b.awaitDrainWriters=new R(b.awaitDrainWriters?[b.awaitDrainWriters]:[])),b.pipes.push(t),N("pipe count=%d opts=%j",b.pipes.length,n);let g=(!n||!1!==n.end)&&t!==p.stdout&&t!==p.stderr,y=g?onend:unpipe;function onunpipe(t,n){N("onunpipe"),t===s&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,cleanup())}function onend(){N("onend"),t.end()}b.endEmitted?p.nextTick(y):s.once("end",y),t.on("unpipe",onunpipe);let m=!1;function cleanup(){N("cleanup"),t.removeListener("close",onclose),t.removeListener("finish",onfinish),i&&t.removeListener("drain",i),t.removeListener("error",onerror),t.removeListener("unpipe",onunpipe),s.removeListener("end",onend),s.removeListener("end",unpipe),s.removeListener("data",ondata),m=!0,i&&b.awaitDrainWriters&&(!t._writableState||t._writableState.needDrain)&&i()}function pause(){m||(1===b.pipes.length&&b.pipes[0]===t?(N("false write response, pause",0),b.awaitDrainWriters=t,b.multiAwaitDrain=!1):b.pipes.length>1&&b.pipes.includes(t)&&(N("false write response, pause",b.awaitDrainWriters.size),b.awaitDrainWriters.add(t)),s.pause()),i||(i=pipeOnDrain(s,t),t.on("drain",i))}function ondata(n){N("ondata");let i=t.write(n);N("dest.write",i),!1===i&&pause()}function onerror(n){if(N("onerror",n),unpipe(),t.removeListener("error",onerror),0===t.listenerCount("error")){let i=t._writableState||t._readableState;i&&!i.errorEmitted?K(t,n):t.emit("error",n)}}function onclose(){t.removeListener("finish",onfinish),unpipe()}function onfinish(){N("onfinish"),t.removeListener("close",onclose),unpipe()}function unpipe(){N("unpipe"),s.unpipe(t)}return s.on("data",ondata),P(t,"error",onerror),t.once("close",onclose),t.once("finish",onfinish),t.emit("pipe",s),!0===t.writableNeedDrain?pause():b.flowing||(N("pipe resume"),s.resume()),t},Readable.prototype.unpipe=function(t){let n=this._readableState;if(0===n.pipes.length)return this;if(!t){let t=n.pipes;n.pipes=[],this.pause();for(let n=0;n<t.length;n++)t[n].emit("unpipe",this,{hasUnpiped:!1});return this}let i=b(n.pipes,t);return -1===i||(n.pipes.splice(i,1),0===n.pipes.length&&this.pause(),t.emit("unpipe",this,{hasUnpiped:!1})),this},Readable.prototype.on=function(t,n){let i=O.prototype.on.call(this,t,n),s=this._readableState;return"data"===t?(s.readableListening=this.listenerCount("readable")>0,!1!==s.flowing&&this.resume()):"readable"!==t||s.endEmitted||s.readableListening||(s.readableListening=s.needReadable=!0,s.flowing=!1,s.emittedReadable=!1,N("on readable",s.length,s.reading),s.length?emitReadable(this):s.reading||p.nextTick(nReadingNextTick,this)),i},Readable.prototype.addListener=Readable.prototype.on,Readable.prototype.removeListener=function(t,n){let i=O.prototype.removeListener.call(this,t,n);return"readable"===t&&p.nextTick(updateReadableListening,this),i},Readable.prototype.off=Readable.prototype.removeListener,Readable.prototype.removeAllListeners=function(t){let n=O.prototype.removeAllListeners.apply(this,arguments);return("readable"===t||void 0===t)&&p.nextTick(updateReadableListening,this),n},Readable.prototype.resume=function(){let t=this._readableState;return t.flowing||(N("resume"),t.flowing=!t.readableListening,resume(this,t)),t[G]=!1,this},Readable.prototype.pause=function(){return N("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(N("pause"),this._readableState.flowing=!1,this.emit
2("pause")),this._readableState[G]=!0,this},Readable.prototype.wrap=function(t){let n=!1;t.on("data",i=>{!this.push(i)&&t.pause&&(n=!0,t.pause())}),t.on("end",()=>{this.push(null)}),t.on("error",t=>{K(this,t)}),t.on("close",()=>{this.destroy()}),t.on("destroy",()=>{this.destroy()}),this._read=()=>{n&&t.resume&&(n=!1,t.resume())};let i=v(t);for(let n=1;n<i.length;n++){let s=i[n];void 0===this[s]&&"function"==typeof t[s]&&(this[s]=t[s].bind(t))}return this},Readable.prototype[x]=function(){return streamToAsyncIterator(this)},Readable.prototype.iterator=function(t){return void 0!==t&&V(t,"options"),streamToAsyncIterator(this,t)},_(Readable.prototype,{readable:{__proto__:null,get(){let t=this._readableState;return!!t&&!1!==t.readable&&!t.destroyed&&!t.errorEmitted&&!t.endEmitted},set(t){this._readableState&&(this._readableState.readable=!!t)}},readableDidRead:{__proto__:null,enumerable:!1,get:function(){return this._readableState.dataEmitted}},readableAborted:{__proto__:null,enumerable:!1,get:function(){return!!(!1!==this._readableState.readable&&(this._readableState.destroyed||this._readableState.errored)&&!this._readableState.endEmitted)}},readableHighWaterMark:{__proto__:null,enumerable:!1,get:function(){return this._readableState.highWaterMark}},readableBuffer:{__proto__:null,enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}},readableFlowing:{__proto__:null,enumerable:!1,get:function(){return this._readableState.flowing},set:function(t){this._readableState&&(this._readableState.flowing=t)}},readableLength:{__proto__:null,enumerable:!1,get(){return this._readableState.length}},readableObjectMode:{__proto__:null,enumerable:!1,get(){return!!this._readableState&&this._readableState.objectMode}},readableEncoding:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.encoding:null}},errored:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.errored:null}},closed:{__proto__:null,get(){return!!this._readableState&&this._readableState.closed}},destroyed:{__proto__:null,enumerable:!1,get(){return!!this._readableState&&this._readableState.destroyed},set(t){this._readableState&&(this._readableState.destroyed=t)}},readableEnded:{__proto__:null,enumerable:!1,get(){return!!this._readableState&&this._readableState.endEmitted}}}),_(ReadableState.prototype,{pipesCount:{__proto__:null,get(){return this.pipes.length}},paused:{__proto__:null,get(){return!1!==this[G]},set(t){this[G]=!!t}}}),Readable._fromList=fromList,Readable.from=function(t,n){return J(Readable,t,n)},Readable.fromWeb=function(t,n){return lazyWebStreams().newStreamReadableFromReadableStream(t,n)},Readable.toWeb=function(t,n){return lazyWebStreams().newReadableStreamFromStreamReadable(t,n)},Readable.wrap=function(t,n){var i,s;return new Readable({objectMode:null===(i=null!==(s=t.readableObjectMode)&&void 0!==s?s:t.objectMode)||void 0===i||i,...n,destroy(n,i){B.destroyer(t,n),i(n)}}).wrap(t)}},86238:function(t,n,i){"use strict";let{MathFloor:s,NumberIsInteger:p}=i(7850),{validateInteger:b}=i(68188),{ERR_INVALID_ARG_VALUE:g}=i(64545).codes,y=16384,m=16;function highWaterMarkFrom(t,n,i){return null!=t.highWaterMark?t.highWaterMark:n?t[i]:null}function getDefaultHighWaterMark(t){return t?m:y}function setDefaultHighWaterMark(t,n){b(n,"value",0),t?m=n:y=n}function getHighWaterMark(t,n,i,b){let y=highWaterMarkFrom(n,b,i);if(null!=y){if(!p(y)||y<0){let t=b?`options.${i}`:"options.highWaterMark";throw new g(t,y)}return s(y)}return getDefaultHighWaterMark(t.objectMode)}t.exports={getHighWaterMark,getDefaultHighWaterMark,setDefaultHighWaterMark}},61569:function(t,n,i){"use strict";let{ObjectSetPrototypeOf:s,Symbol:p}=i(7850);t.exports=Transform;let{ERR_METHOD_NOT_IMPLEMENTED:b}=i(64545).codes,g=i(39884),{getHighWaterMark:y}=i(86238);s(Transform.prototype,g.prototype),s(Transform,g);let m=p("kCallback");function Transform(t){if(!(this instanceof Transform))return new Transform(t);let n=t?y(this,t,"readableHighWaterMark",!0):null;0===n&&(t={...t,highWaterMark:null,readableHighWaterMark:n,writableHighWaterMark:t.writableHighWaterMark||0}),g.call(this,t),this._readableState.sync=!1,this[m]=null,t&&("function"==typeof t.transform&&(this._transform=t.transform),"function"==typeof t.flush&&(this._flush=t.flush)),this.on("prefinish",prefinish)}function final(t){"function"!=typeof this._flush||this.destroyed?(this.push(null),t&&t()):this._flush((n,i)=>{if(n){t?t(n):this.destroy(n);return}null!=i&&this.push(i),this.push(null),t&&t()})}function prefinish(){this._final!==final&&final.call(this)}Transform.prototype._final=final,Transform.prototype._transform=function(t,n,i){throw new b("_transform()")},Transform.prototype._write=function(t,n,i){let s=this._readableState,p=this._writableState,b=s.length;this._transform(t,n,(t,n)=>{if(t){i(t);return}null!=n&&this.push(n),p.ended||b===s.length||s.length<s.highWaterMark?i():this[m]=i})},Transform.prototype._read=function(){if(this[m]){let t=this[m];this[m]=null,t()}}},40937:function(t,n,i){"use strict";let{SymbolAsyncIterator:s,SymbolIterator:p,SymbolFor:b}=i(7850),g=b("nodejs.stream.destroyed"),y=b("nodejs.stream.errored"),m=b("nodejs.stream.readable"),_=b("nodejs.stream.writable"),v=b("nodejs.stream.disturbed"),w=b("nodejs.webstream.isClosedPromise"),S=b("nodejs.webstream.controllerErrorFunction");function isReadableNodeStream(t,n=!1){var i;return!!(t&&"function"==typeof t.pipe&&"function"==typeof t.on&&(!n||"function"==typeof t.pause&&"function"==typeof t.resume)&&(!t._writableState||(null===(i=t._readableState)||void 0===i?void 0:i.readable)!==!1)&&(!t._writableState||t._readableState))}function isWritableNodeStream(t){var n;return!!(t&&"function"==typeof t.write&&"function"==typeof t.on&&(!t._readableState||(null===(n=t._writableState)||void 0===n?void 0:n.writable)!==!1))}function isDuplexNodeStream(t){return!!(t&&"function"==typeof t.pipe&&t._readableState&&"function"==typeof t.on&&"function"==typeof t.write)}function isNodeStream(t){return t&&(t._readableState||t._writableState||"function"==typeof t.write&&"function"==typeof t.on||"function"==typeof t.pipe&&"function"==typeof t.on)}function isReadableStream(t){return!!(t&&!isNodeStream(t)&&"function"==typeof t.pipeThrough&&"function"==typeof t.getReader&&"function"==typeof t.cancel)}function isWritableStream(t){return!!(t&&!isNodeStream(t)&&"function"==typeof t.getWriter&&"function"==typeof t.abort)}function isTransformStream(t){return!!(t&&!isNodeStream(t)&&"object"==typeof t.readable&&"object"==typeof t.writable)}function isWebStream(t){return isReadableStream(t)||isWritableStream(t)||isTransformStream(t)}function isIterable(t,n){return null!=t&&(!0===n?"function"==typeof t[s]:!1===n?"function"==typeof t[p]:"function"==typeof t[s]||"function"==typeof t[p])}function isDestroyed(t){if(!isNodeStream(t))return null;let n=t._writableState,i=t._readableState,s=n||i;return!!(t.destroyed||t[g]||null!=s&&s.destroyed)}function isWritableEnded(t){if(!isWritableNodeStream(t))return null;if(!0===t.writableEnded)return!0;let n=t._writableState;return(null==n||!n.errored)&&("boolean"!=typeof(null==n?void 0:n.ended)?null:n.ended)}function isWritableFinished(t,n){if(!isWritableNodeStream(t))return null;if(!0===t.writableFinished)return!0;let i=t._writableState;return(null==i||!i.errored)&&("boolean"!=typeof(null==i?void 0:i.finished)?null:!!(i.finished||!1===n&&!0===i.ended&&0===i.length))}function isReadableEnded(t){if(!isReadableNodeStream(t))return null;if(!0===t.readableEnded)return!0;let n=t._readableState;return!!n&&!n.errored&&("boolean"!=typeof(null==n?void 0:n.ended)?null:n.ended)}function isReadableFinished(t,n){if(!isReadableNodeStream(t))return null;let i=t._readableState;return(null==i||!i.errored)&&("boolean"!=typeof(null==i?void 0:i.endEmitted)?null:!!(i.endEmitted||!1===n&&!0===i.ended&&0===i.length))}function isReadable(t){return t&&null!=t[m]?t[m]:"boolean"!=typeof(null==t?void 0:t.readable)?null:!isDestroyed(t)&&isReadableNodeStream(t)&&t.readable&&!isReadableFinished(t)}function isWritable(t){return t&&null!=t[_]?t[_]:"boolean"!=typeof(null==t?void 0:t.writable)?null:!isDestroyed(t)&&isWritableNodeStream(t)&&t.writable&&!isWritableEnded(t)}function isFinished(t,n){return isNodeStream(t)?!!isDestroyed(t)||!((null==n?void 0:n.readable)!==!1&&isReadable(t)||(null==n?void 0:n.writable)!==!1&&isWritable(t)):null}function isWritableErrored(t){var n,i;return isNodeStream(t)?t.writableErrored?t.writableErrored:null!==(n=null===(i=t._writableState)||void 0===i?void 0:i.errored)&&void 0!==n?n:null:null}function isReadableErrored(t){var n,i;return isNodeStream(t)?t.readableErrored?t.readableErrored:null!==(n=null===(i=t._readableState)||void 0===i?void 0:i.errored)&&void 0!==n?n:null:null}function isClosed(t){if(!isNodeStream(t))return null;if("boolean"==typeof t.closed)return t.closed;let n=t._writableState,i=t._readableState;return"boolean"==typeof(null==n?void 0:n.closed)||"boolean"==typeof(null==i?void 0:i.closed)?(null==n?void 0:n.closed)||(null==i?void 0:i.closed):"boolean"==typeof t._closed&&isOutgoingMessage(t)?t._closed:null}function isOutgoingMessage(t){return"boolean"==typeof t._closed&&"boolean"==typeof t._defaultKeepAlive&&"boolean"==typeof t._removedConnection&&"boolean"==typeof t._removedContLen}function isServerResponse(t){return"boolean"==typeof t._sent100&&isOutgoingMessage(t)}
2function isServerRequest(t){var n;return"boolean"==typeof t._consuming&&"boolean"==typeof t._dumped&&(null===(n=t.req)||void 0===n?void 0:n.upgradeOrConnect)===void 0}function willEmitClose(t){if(!isNodeStream(t))return null;let n=t._writableState,i=t._readableState,s=n||i;return!s&&isServerResponse(t)||!!(s&&s.autoDestroy&&s.emitClose&&!1===s.closed)}function isDisturbed(t){var n;return!!(t&&(null!==(n=t[v])&&void 0!==n?n:t.readableDidRead||t.readableAborted))}function isErrored(t){var n,i,s,p,b,g,m,_,v,w;return!!(t&&(null!==(n=null!==(i=null!==(s=null!==(p=null!==(b=null!==(g=t[y])&&void 0!==g?g:t.readableErrored)&&void 0!==b?b:t.writableErrored)&&void 0!==p?p:null===(m=t._readableState)||void 0===m?void 0:m.errorEmitted)&&void 0!==s?s:null===(_=t._writableState)||void 0===_?void 0:_.errorEmitted)&&void 0!==i?i:null===(v=t._readableState)||void 0===v?void 0:v.errored)&&void 0!==n?n:null===(w=t._writableState)||void 0===w?void 0:w.errored))}t.exports={isDestroyed,kIsDestroyed:g,isDisturbed,kIsDisturbed:v,isErrored,kIsErrored:y,isReadable,kIsReadable:m,kIsClosedPromise:w,kControllerErrorFunction:S,kIsWritable:_,isClosed,isDuplexNodeStream,isFinished,isIterable,isReadableNodeStream,isReadableStream,isReadableEnded,isReadableFinished,isReadableErrored,isNodeStream,isWebStream,isWritable,isWritableNodeStream,isWritableStream,isWritableEnded,isWritableFinished,isWritableErrored,isServerRequest,isServerResponse,willEmitClose,isTransformStream}},14882:function(t,n,i){let s;"use strict";let p=i(34155),{ArrayPrototypeSlice:b,Error:g,FunctionPrototypeSymbolHasInstance:y,ObjectDefineProperty:m,ObjectDefineProperties:_,ObjectSetPrototypeOf:v,StringPrototypeToLowerCase:w,Symbol:S,SymbolHasInstance:R}=i(7850);t.exports=Writable,Writable.WritableState=WritableState;let{EventEmitter:T}=i(17187),x=i(44007).Stream,{Buffer:A}=i(48764),k=i(72179),{addAbortSignal:O}=i(68251),{getHighWaterMark:P,getDefaultHighWaterMark:C}=i(86238),{ERR_INVALID_ARG_TYPE:I,ERR_METHOD_NOT_IMPLEMENTED:L,ERR_MULTIPLE_CALLBACK:N,ERR_STREAM_CANNOT_PIPE:M,ERR_STREAM_DESTROYED:B,ERR_STREAM_ALREADY_FINISHED:j,ERR_STREAM_NULL_VALUES:D,ERR_STREAM_WRITE_AFTER_END:F,ERR_UNKNOWN_ENCODING:W}=i(64545).codes,{errorOrDestroy:q}=k;function nop(){}v(Writable.prototype,x.prototype),v(Writable,x);let U=S("kOnFinished");function WritableState(t,n,s){"boolean"!=typeof s&&(s=n instanceof i(39884)),this.objectMode=!!(t&&t.objectMode),s&&(this.objectMode=this.objectMode||!!(t&&t.writableObjectMode)),this.highWaterMark=t?P(this,t,"writableHighWaterMark",s):C(!1),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;let p=!!(t&&!1===t.decodeStrings);this.decodeStrings=!p,this.defaultEncoding=t&&t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=onwrite.bind(void 0,n),this.writecb=null,this.writelen=0,this.afterWriteTickInfo=null,resetBuffer(this),this.pendingcb=0,this.constructed=!0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!t||!1!==t.emitClose,this.autoDestroy=!t||!1!==t.autoDestroy,this.errored=null,this.closed=!1,this.closeEmitted=!1,this[U]=[]}function resetBuffer(t){t.buffered=[],t.bufferedIndex=0,t.allBuffers=!0,t.allNoop=!0}function Writable(t){let n=this instanceof i(39884);if(!n&&!y(Writable,this))return new Writable(t);this._writableState=new WritableState(t,this,n),t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final),"function"==typeof t.construct&&(this._construct=t.construct),t.signal&&O(t.signal,this)),x.call(this,t),k.construct(this,()=>{let t=this._writableState;t.writing||clearBuffer(this,t),finishMaybe(this,t)})}function _write(t,n,i,s){let b;let g=t._writableState;if("function"==typeof i)s=i,i=g.defaultEncoding;else{if(i){if("buffer"!==i&&!A.isEncoding(i))throw new W(i)}else i=g.defaultEncoding;"function"!=typeof s&&(s=nop)}if(null===n)throw new D;if(!g.objectMode){if("string"==typeof n)!1!==g.decodeStrings&&(n=A.from(n,i),i="buffer");else if(n instanceof A)i="buffer";else if(x._isUint8Array(n))n=x._uint8ArrayToBuffer(n),i="buffer";else throw new I("chunk",["string","Buffer","Uint8Array"],n)}return(g.ending?b=new F:g.destroyed&&(b=new B("write")),b)?(p.nextTick(s,b),q(t,b,!0),b):(g.pendingcb++,writeOrBuffer(t,g,n,i,s))}function writeOrBuffer(t,n,i,s,p){let b=n.objectMode?1:i.length;n.length+=b;let g=n.length<n.highWaterMark;return g||(n.needDrain=!0),n.writing||n.corked||n.errored||!n.constructed?(n.buffered.push({chunk:i,encoding:s,callback:p}),n.allBuffers&&"buffer"!==s&&(n.allBuffers=!1),n.allNoop&&p!==nop&&(n.allNoop=!1)):(n.writelen=b,n.writecb=p,n.writing=!0,n.sync=!0,t._write(i,s,n.onwrite),n.sync=!1),g&&!n.errored&&!n.destroyed}function doWrite(t,n,i,s,p,b,g){n.writelen=s,n.writecb=g,n.writing=!0,n.sync=!0,n.destroyed?n.onwrite(new B("write")):i?t._writev(p,n.onwrite):t._write(p,b,n.onwrite),n.sync=!1}function onwriteError(t,n,i,s){--n.pendingcb,s(i),errorBuffer(n),q(t,i)}function onwrite(t,n){let i=t._writableState,s=i.sync,b=i.writecb;if("function"!=typeof b){q(t,new N);return}i.writing=!1,i.writecb=null,i.length-=i.writelen,i.writelen=0,n?(n.stack,i.errored||(i.errored=n),t._readableState&&!t._readableState.errored&&(t._readableState.errored=n),s?p.nextTick(onwriteError,t,i,n,b):onwriteError(t,i,n,b)):(i.buffered.length>i.bufferedIndex&&clearBuffer(t,i),s?null!==i.afterWriteTickInfo&&i.afterWriteTickInfo.cb===b?i.afterWriteTickInfo.count++:(i.afterWriteTickInfo={count:1,cb:b,stream
2:t,state:i},p.nextTick(afterWriteTick,i.afterWriteTickInfo)):afterWrite(t,i,1,b))}function afterWriteTick({stream:t,state:n,count:i,cb:s}){return n.afterWriteTickInfo=null,afterWrite(t,n,i,s)}function afterWrite(t,n,i,s){let p=!n.ending&&!t.destroyed&&0===n.length&&n.needDrain;for(p&&(n.needDrain=!1,t.emit("drain"));i-- >0;)n.pendingcb--,s();n.destroyed&&errorBuffer(n),finishMaybe(t,n)}function errorBuffer(t){var n,i;if(t.writing)return;for(let i=t.bufferedIndex;i<t.buffered.length;++i){let{chunk:s,callback:p}=t.buffered[i],b=t.objectMode?1:s.length;t.length-=b,p(null!==(n=t.errored)&&void 0!==n?n:new B("write"))}let s=t[U].splice(0);for(let n=0;n<s.length;n++)s[n](null!==(i=t.errored)&&void 0!==i?i:new B("end"));resetBuffer(t)}function clearBuffer(t,n){if(n.corked||n.bufferProcessing||n.destroyed||!n.constructed)return;let{buffered:i,bufferedIndex:s,objectMode:p}=n,g=i.length-s;if(!g)return;let y=s;if(n.bufferProcessing=!0,g>1&&t._writev){n.pendingcb-=g-1;let s=n.allNoop?nop:t=>{for(let n=y;n<i.length;++n)i[n].callback(t)},p=n.allNoop&&0===y?i:b(i,y);p.allBuffers=n.allBuffers,doWrite(t,n,!0,n.length,p,"",s),resetBuffer(n)}else{do{let{chunk:s,encoding:b,callback:g}=i[y];i[y++]=null;let m=p?1:s.length;doWrite(t,n,!1,m,s,b,g)}while(y<i.length&&!n.writing);y===i.length?resetBuffer(n):y>256?(i.splice(0,y),n.bufferedIndex=0):n.bufferedIndex=y}n.bufferProcessing=!1}
2function needFinish(t){return t.ending&&!t.destroyed&&t.constructed&&0===t.length&&!t.errored&&0===t.buffered.length&&!t.finished&&!t.writing&&!t.errorEmitted&&!t.closeEmitted}function callFinal(t,n){let i=!1;function onFinish(s){if(i){q(t,null!=s?s:N());return}if(i=!0,n.pendingcb--,s){let i=n[U].splice(0);for(let t=0;t<i.length;t++)i[t](s);q(t,s,n.sync)}else needFinish(n)&&(n.prefinished=!0,t.emit("prefinish"),n.pendingcb++,p.nextTick(finish,t,n))}n.sync=!0,n.pendingcb++;try{t._final(onFinish)}catch(t){onFinish(t)}n.sync=!1}function prefinish(t,n){n.prefinished||n.finalCalled||("function"!=typeof t._final||n.destroyed?(n.prefinished=!0,t.emit("prefinish")):(n.finalCalled=!0,callFinal(t,n)))}function finishMaybe(t,n,i){needFinish(n)&&(prefinish(t,n),0===n.pendingcb&&(i?(n.pendingcb++,p.nextTick((t,n)=>{needFinish(n)?finish(t,n):n.pendingcb--},t,n)):needFinish(n)&&(n.pendingcb++,finish(t,n))))}function finish(t,n){n.pendingcb--,n.finished=!0;let i=n[U].splice(0);for(let t=0;t<i.length;t++)i[t]();if(t.emit("finish"),n.autoDestroy){let n=t._readableState,i=!n||n.autoDestroy&&(n.endEmitted||!1===n.readable);i&&t.destroy()}}WritableState.prototype.getBuffer=function(){return b(this.buffered,this.bufferedIndex)},m(WritableState.prototype,"bufferedRequestCount",{__proto__:null,get(){return this.buffered.length-this.bufferedIndex}}),m(Writable,R,{__proto__:null,value:function(t){return!!y(this,t)||this===Writable&&t&&t._writableState instanceof WritableState}}),Writable.prototype.pipe=function(){q(this,new M)},Writable.prototype.write=function(t,n,i){return!0===_write(this,t,n,i)},Writable.prototype.cork=function(){this._writableState.corked++},Writable.prototype.uncork=function(){let t=this._writableState;t.corked&&(t.corked--,t.writing||clearBuffer(this,t))},Writable.prototype.setDefaultEncoding=function(t){if("string"==typeof t&&(t=w(t)),!A.isEncoding(t))throw new W(t);return this._writableState.defaultEncoding=t,this},Writable.prototype._write=function(t,n,i){if(this._writev)this._writev([{chunk:t,encoding:n}],i);else throw new L("_write()")},Writable.prototype._writev=null,Writable.prototype.end=function(t,n,i){let s;let b=this._writableState;if("function"==typeof t?(i=t,t=null,n=null):"function"==typeof n&&(i=n,n=null),null!=t){let i=_write(this,t,n);i instanceof g&&(s=i)}return b.corked&&(b.corked=1,this.uncork()),s||(b.errored||b.ending?b.finished?s=new j("end"):b.destroyed&&(s=new B("end")):(b.ending=!0,finishMaybe(this,b,!0),b.ended=!0)),"function"==typeof i&&(s||b.finished?p.nextTick(i,s):b[U].push(i)),this},_(Writable.prototype,{closed:{__proto__:null,get(){return!!this._writableState&&this._writableState.closed}},destroyed:{__proto__:null,get(){return!!this._writableState&&this._writableState.destroyed},set(t){this._writableState&&(this._writableState.destroyed=t)}},writable:{__proto__:null,get(){let t=this._writableState;return!!t&&!1!==t.writable&&!t.destroyed&&!t.errored&&!t.ending&&!t.ended},set(t){this._writableState&&(this._writableState.writable=!!t)}},writableFinished:{__proto__:null,get(){return!!this._writableState&&this._writableState.finished}},writableObjectMode:{__proto__:null,get(){return!!this._writableState&&this._writableState.objectMode}},writableBuffer:{__proto__:null,get(){return this._writableState&&this._writableState.getBuffer()}},writableEnded:{__proto__:null,get(){return!!this._writableState&&this._writableState.ending}},writableNeedDrain:{__proto__:null,get(){let t=this._writableState;return!!t&&!t.destroyed&&!t.ending&&t.needDrain}},writableHighWaterMark:{__proto__:null,get(){return this._writableState&&this._writableState.highWaterMark}},writableCorked:{__proto__:null,get(){return this._writableState?this._writableState.corked:0}},writableLength:{__proto__:null,get(){return this._writableState&&this._writableState.length}},errored:{__proto__:null,enumerable:!1,get(){return this._writableState?this._writableState.errored:null}},writableAborted:{__proto__:null,enumerable:!1,get:function(){return!!(!1!==this._writableState.writable&&(this._writableState.destroyed||this._writableState.errored)&&!this._writableState.finished)}}});let $=k.destroy;function lazyWebStreams(){return void 0===s&&(s={}),s}Writable.prototype.destroy=function(t,n){let i=this._writableState;return!i.destroyed&&(i.bufferedIndex<i.buffered.length||i[U].length)&&p.nextTick(errorBuffer,i),$.call(this,t,n),this},Writable.prototype._undestroy=k.undestroy,Writable.prototype._destroy=function(t,n){n(t)},Writable.prototype[T.captureRejectionSymbol]=function(t){this.destroy(t)},Writable.fromWeb=function(t,n){return lazyWebStreams().newStreamWritableFromWritableStream(t,n)},Writable.toWeb=function(t){return lazyWebStreams().newWritableStreamFromStreamWritable(t)}},68188:function(t,n,i){"use strict";let{ArrayIsArray:s,ArrayPrototypeIncludes:p,ArrayPrototypeJoin:b,ArrayPrototypeMap:g,NumberIsInteger:y,NumberIsNaN:m,NumberMAX_SAFE_INTEGER:_,NumberMIN_SAFE_INTEGER:v,NumberParseInt:w,ObjectPrototypeHasOwnProperty:S,RegExpPrototypeExec:R,String:T,StringPrototypeToUpperCase:x,StringPrototypeTrim:A}=i(7850),{hideStackFrames:k,codes:{ERR_SOCKET_BAD_PORT:O,ERR_INVALID_ARG_TYPE:P,ERR_INVALID_ARG_VALUE:C,ERR_OUT_OF_RANGE:I,ERR_
2UNKNOWN_SIGNAL:L}}=i(64545),{normalizeEncoding:N}=i(73847),{isAsyncFunction:M,isArrayBufferView:B}=i(73847).types,j={};function isInt32(t){return t===(0|t)}function isUint32(t){return t===t>>>0}let D=/^[0-7]+$/;function parseFileMode(t,n,i){if(void 0===t&&(t=i),"string"==typeof t){if(null===R(D,t))throw new C(n,t,"must be a 32-bit unsigned integer or an octal string");t=w(t,8)}return q(t,n),t}let F=k((t,n,i=v,s=_)=>{if("number"!=typeof t)throw new P(n,"number",t);if(!y(t))throw new I(n,"an integer",t);if(t<i||t>s)throw new I(n,`>= ${i} && <= ${s}`,t)}),W=k((t,n,i=-2147483648,s=2147483647)=>{if("number"!=typeof t)throw new P(n,"number",t);if(!y(t))throw new I(n,"an integer",t);if(t<i||t>s)throw new I(n,`>= ${i} && <= ${s}`,t)}),q=k((t,n,i=!1)=>{if("number"!=typeof t)throw new P(n,"number",t);if(!y(t))throw new I(n,"an integer",t);let s=i?1:0;if(t<s||t>4294967295)throw new I(n,`>= ${s} && <= 4294967295`,t)});function validateString(t,n){if("string"!=typeof t)throw new P(n,"string",t)}function validateNumber(t,n,i,s){if("number"!=typeof t)throw new P(n,"number",t);if(null!=i&&t<i||null!=s&&t>s||(null!=i||null!=s)&&m(t))throw new I(n,`${null!=i?`>= ${i}`:""}${null!=i&&null!=s?" && ":""}${null!=s?`<= ${s}`:""}`,t)}let U=k((t,n,i)=>{if(!p(i,t)){let s=b(g(i,t=>"string"==typeof t?`'${t}'`:T(t)),", ");throw new C(n,t,"must be one of: "+s)}});function validateBoolean(t,n){if("boolean"!=typeof t)throw new P(n,"boolean",t)}function getOwnPropertyValueOrDefault(t,n,i){return null!=t&&S(t,n)?t[n]:i}let $=k((t,n,i=null)=>{let p=getOwnPropertyValueOrDefault(i,"allowArray",!1),b=getOwnPropertyValueOrDefault(i,"allowFunction",!1),g=getOwnPropertyValueOrDefault(i,"nullable",!1);if(!g&&null===t||!p&&s(t)||"object"!=typeof t&&(!b||"function"!=typeof t))throw new P(n,"Object",t)}),H=k((t,n)=>{if(null!=t&&"object"!=typeof t&&"function"!=typeof t)throw new P(n,"a dictionary",t)}),z=k((t,n,i=0)=>{if(!s(t))throw new P(n,"Array",t);if(t.length<i){let s=`must be longer than ${i}`;throw new C(n,t,s)}});function validateStringArray(t,n){z(t,n);for(let i=0;i<t.length;i++)validateString(t[i],`${n}[${i}]`)}function validateBooleanArray(t,n){z(t,n);for(let i=0;i<t.length;i++)validateBoolean(t[i],`${n}[${i}]`)}function validateAbortSignalArray(t,n){z(t,n);for(let i=0;i<t.length;i++){let s=t[i],p=`${n}[${i}]`;if(null==s)throw new P(p,"AbortSignal",s);G(s,p)}}function validateSignalName(t,n="signal"){if(validateString(t,n),void 0===j[t]){if(void 0!==j[x(t)])throw new L(t+" (signals must use all capital letters)");throw new L(t)}}let V=k((t,n="buffer")=>{if(!B(t))throw new P(n,["Buffer","TypedArray","DataView"],t)});function validateEncoding(t,n){let i=N(n),s=t.length;if("hex"===i&&s%2!=0)throw new C("encoding",n,`is invalid for data of length ${s}`)}function validatePort(t,n="Port",i=!0){if("number"!=typeof t&&"string"!=typeof t||"string"==typeof t&&0===A(t).length||+t!=+t>>>0||t>65535||0===t&&!i)throw new O(n,t,i);return 0|t}let G=k((t,n)=>{if(void 0!==t&&(null===t||"object"!=typeof t||!("aborted"in t)))throw new P(n,"AbortSignal",t)}),Z=k((t,n)=>{if("function"!=typeof t)throw new P(n,"Function",t)}),J=k((t,n)=>{if("function"!=typeof t||M(t))throw new P(n,"Function",t)}),K=k((t,n)=>{if(void 0!==t)throw new P(n,"undefined",t)});function validateUnion(t,n,i){if(!p(i,t))throw new P(n,`('${b(i,"|")}')`,t)}let Y=/^(?:<[^>]*>)(?:\s*;\s*[^;"\s]+(?:=(")?[^;"\s]*\1)?)*$/;function validateLinkHeaderFormat(t,n){if(void 0===t||!R(Y,t))throw new C(n,t,'must be an array or string of format "</styles.css>; rel=preload; as=style"')}function validateLinkHeaderValue(t){if("string"==typeof t)return validateLinkHeaderFormat(t,"hints"),t;if(s(t)){let n=t.length,i="";if(0===n)return i;for(let s=0;s<n;s++){let p=t[s];validateLinkHeaderFormat(p,"hints"),i+=p,s!==n-1&&(i+=", ")}return i}throw new C("hints",t,'must be an array or string of format "</styles.css>; rel=preload; as=style"')}t.exports={isInt32,isUint32,parseFileMode,validateArray:z,validateStringArray,validateBooleanArray,validateAbortSignalArray,validateBoolean,validateBuffer:V,validateDictionary:H,validateEncoding,validateFunction:Z,validateInt32:W,validateInteger:F,validateNumber,validateObject:$,validateOneOf:U,validatePlainFunction:J,validatePort,validateSignalName,validateString,validateUint32:q,validateUndef
2ined:K,validateUnion,validateAbortSignal:G,validateLinkHeaderValue}},74597:function(t,n,i){"use strict";let s=i(70725),p=i(3429),b=s.Readable.destroy;t.exports=s.Readable,t.exports._uint8ArrayToBuffer=s._uint8ArrayToBuffer,t.exports._isUint8Array=s._isUint8Array,t.exports.isDisturbed=s.isDisturbed,t.exports.isErrored=s.isErrored,t.exports.isReadable=s.isReadable,t.exports.Readable=s.Readable,t.exports.Writable=s.Writable,t.exports.Duplex=s.Duplex,t.exports.Transform=s.Transform,t.exports.PassThrough=s.PassThrough,t.exports.addAbortSignal=s.addAbortSignal,t.exports.finished=s.finished,t.exports.destroy=s.destroy,t.exports.destroy=b,t.exports.pipeline=s.pipeline,t.exports.compose=s.compose,Object.defineProperty(s,"promises",{configurable:!0,enumerable:!0,get:()=>p}),t.exports.Stream=s.Stream,t.exports.default=t.exports},64545:function(t,n,i){"use strict";let{format:s,inspect:p,AggregateError:b}=i(73847),g=globalThis.AggregateError||b,y=Symbol("kIsNodeError"),m=["string","function","number","object","Function","Object","boolean","bigint","symbol"],_=/^([A-Z][a-z0-9]*)+$/,v={};function assert(t,n){if(!t)throw new v.ERR_INTERNAL_ASSERTION(n)}function addNumericalSeparator(t){let n="",i=t.length,s="-"===t[0]?1:0;for(;i>=s+4;i-=3)n=`_${t.slice(i-3,i)}${n}`;return`${t.slice(0,i)}${n}`}function getMessage(t,n,i){if("function"==typeof n)return assert(n.length<=i.length,`Code: ${t}; The provided arguments length (${i.length}) does not match the required ones (${n.length}).`),n(...i);let p=(n.match(/%[dfijoOs]/g)||[]).length;return(assert(p===i.length,`Code: ${t}; The provided arguments length (${i.length}) does not match the required ones (${p}).`),0===i.length)?n:s(n,...i)}function E(t,n,i){i||(i=Error);let NodeError=class NodeError extends i{constructor(...i){super(getMessage(t,n,i))}toString(){return`${this.name} [${t}]: ${this.message}`}};Object.defineProperties(NodeError.prototype,{name:{value:i.name,writable:!0,enumerable:!1,configurable:!0},toString:{value(){return`${this.name} [${t}]: ${this.message}`},writable:!0,enumerable:!1,configurable:!0}}),NodeError.prototype.code=t,NodeError.prototype[y]=!0,v[t]=NodeError}function hideStackFrames(t){let n="__node_internal_"+t.name;return Object.defineProperty(t,"name",{value:n}),t}function aggregateTwoErrors(t,n){if(t&&n&&t!==n){if(Array.isArray(n.errors))return n.errors.push(t),n;let i=new g([n,t],n.message);return i.code=n.code,i}return t||n}let AbortError=class AbortError extends Error{constructor(t="The operation was aborted",n){if(void 0!==n&&"object"!=typeof n)throw new v.ERR_INVALID_ARG_TYPE("options","Object",n);super(t,n),this.code="ABORT_ERR",this.name="AbortError"}};E("ERR_ASSERTION","%s",Error),E("ERR_INVALID_ARG_TYPE",(t,n,i)=>{assert("string"==typeof t,"'name' must be a string"),Array.isArray(n)||(n=[n]);let s="The ";t.endsWith(" argument")?s+=`${t} `:s+=`"${t}" ${t.includes(".")?"property":"argument"} `,s+="must be ";let b=[],g=[],y=[];for(let t of n)assert("string"==typeof t,"All expected entries have to be of type string"),m.includes(t)?b.push(t.toLowerCase()):_.test(t)?g.push(t):(assert("object"!==t,'The value "object" should be written as "Object"'),y.push(t));if(g.length>0){let t=b.indexOf("object");-1!==t&&(b.splice(b,t,1),g.push("Object"))}if(b.length>0){switch(b.length){case 1:s+=`of type ${b[0]}`;break;case 2:s+=`one of type ${b[0]} or ${b[1]}`;break;default:{let t=b.pop();s+=`one of type ${b.join(", ")}, or ${t}`}}(g.length>0||y.length>0)&&(s+=" or ")}if(g.length>0){switch(g.length){case 1:s+=`an instance of ${g[0]}`;break;case 2:s+=`an instance of ${g[0]} or ${g[1]}`;break;default:{let t=g.pop();s+=`an instance of ${g.join(", ")}, or ${t}`}}y.length>0&&(s+=" or ")}switch(y.length){case 0:break;case 1:y[0].toLowerCase()!==y[0]&&(s+="an "),s+=`${y[0]}`;break;case 2:s+=`one of ${y[0]} or ${y[1]}`;break;default:{let t=y.pop();s+=`one of ${y.join(", ")}, or ${t}`}}if(null==i)s+=`. Received ${i}`;else if("function"==typeof i&&i.name)s+=`. Received function ${i.name}`;else if("object"==typeof i){var v;if(null!==(v=i.constructor)&&void 0!==v&&v.name)s+=`. Received an instance of ${i.constructor.name}`;else{let t=p(i,{depth:-1});s+=`. Received ${t}`}}else{let t=p(i,{colors:!1});t.length>25&&(t=`${t.slice(0,25)}...`),s+=`. Received type ${typeof i} (${t})`}return s}
2,TypeError),E("ERR_INVALID_ARG_VALUE",(t,n,i="is invalid")=>{let s=p(n);s.length>128&&(s=s.slice(0,128)+"...");let b=t.includes(".")?"property":"argument";return`The ${b} '${t}' ${i}. Received ${s}`},TypeError),E("ERR_INVALID_RETURN_VALUE",(t,n,i)=>{var s;let p=null!=i&&null!==(s=i.constructor)&&void 0!==s&&s.name?`instance of ${i.constructor.name}`:`type ${typeof i}`;return`Expected ${t} to be returned from the "${n}" function but got ${p}.`},TypeError),E("ERR_MISSING_ARGS",(...t)=>{let n;assert(t.length>0,"At least one arg needs to be specified");let i=t.length;switch(t=(Array.isArray(t)?t:[t]).map(t=>`"${t}"`).join(" or "),i){case 1:n+=`The ${t[0]} argument`;break;case 2:n+=`The ${t[0]} and ${t[1]} arguments`;break;default:{let i=t.pop();n+=`The ${t.join(", ")}, and ${i} arguments`}}return`${n} must be specified`},TypeError),E("ERR_OUT_OF_RANGE",(t,n,i)=>{let s;return assert(n,'Missing "range" argument'),Number.isInteger(i)&&Math.abs(i)>4294967296?s=addNumericalSeparator(String(i)):"bigint"==typeof i?(s=String(i),(i>2n**32n||i<-(2n**32n))&&(s=addNumericalSeparator(s)),s+="n"):s=p(i),`The value of "${t}" is out of range. It must be ${n}. Received ${s}`},RangeError),E("ERR_MULTIPLE_CALLBACK","Callback called multiple times",Error),E("ERR_METHOD_NOT_IMPLEMENTED","The %s method is not implemented",Error),E("ERR_STREAM_ALREADY_FINISHED","Cannot call %s after a stream was finished",Error),E("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable",Error),E("ERR_STREAM_DESTROYED","Cannot call %s after a stream was destroyed",Error),E("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),E("ERR_STREAM_PREMATURE_CLOSE","Premature close",Error),E("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF",Error),E("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event",Error),E("ERR_STREAM_WRITE_AFTER_END","write after end",Error),E("ERR_UNKNOWN_ENCODING","Unknown encoding: %s",TypeError),t.exp
2orts={AbortError,aggregateTwoErrors:hideStackFrames(aggregateTwoErrors),hideStackFrames,codes:v}},7850:function(t){"use strict";t.exports={ArrayIsArray:t=>Array.isArray(t),ArrayPrototypeIncludes:(t,n)=>t.includes(n),ArrayPrototypeIndexOf:(t,n)=>t.indexOf(n),ArrayPrototypeJoin:(t,n)=>t.join(n),ArrayPrototypeMap:(t,n)=>t.map(n),ArrayPrototypePop:(t,n)=>t.pop(n),ArrayPrototypePush:(t,n)=>t.push(n),ArrayPrototypeSlice:(t,n,i)=>t.slice(n,i),Error,FunctionPrototypeCall:(t,n,...i)=>t.call(n,...i),FunctionPrototypeSymbolHasInstance:(t,n)=>Function.prototype[Symbol.hasInstance].call(t,n),MathFloor:Math.floor,Number,NumberIsInteger:Number.isInteger,NumberIsNaN:Number.isNaN,NumberMAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER,NumberMIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER,NumberParseInt:Number.parseInt,ObjectDefineProperties:(t,n)=>Object.defineProperties(t,n),ObjectDefineProperty:(t,n,i)=>Object.defineProperty(t,n,i),ObjectGetOwnPropertyDescriptor:(t,n)=>Object.getOwnPropertyDescriptor(t,n),ObjectKeys:t=>Object.keys(t),ObjectSetPrototypeOf:(t,n)=>Object.setPrototypeOf(t,n),Promise,PromisePrototypeCatch:(t,n)=>t.catch(n),PromisePrototypeThen:(t,n,i)=>t.then(n,i),PromiseReject:t=>Promise.reject(t),PromiseResolve:t=>Promise.resolve(t),ReflectApply:Reflect.apply,RegExpPrototypeTest:(t,n)=>t.test(n),SafeSet:Set,String,StringPrototypeSlice:(t,n,i)=>t.slice(n,i),StringPrototypeToLowerCase:t=>t.toLowerCase(),StringPrototypeToUpperCase:t=>t.toUpperCase(),StringPrototypeTrim:t=>t.trim(),Symbol,SymbolFor:Symbol.for,SymbolAsyncIterator:Symbol.asyncIterator,SymbolHasInstance:Symbol.hasInstance,SymbolIterator:Symbol.iterator,SymbolDispose:Symbol.dispose||Symbol("Symbol.dispose"),SymbolAsyncDispose:Symbol.asyncDispose||Symbol("Symbol.asyncDispose"),TypedArrayPrototypeSet:(t,n,i)=>t.set(n,i),Boolean:Boolean,Uint8Array}},73847:function(t,n,i){"use strict";let s=i(48764),{kResistStopPropagation:p,SymbolDispose:b}=i(7850),g=globalThis.AbortSignal||i(28599).AbortSignal,y=globalThis.AbortController||i(28599).AbortController,m=Object.getPrototypeOf(async function(){}).constructor,_=globalThis.Blob||s.Blob,validateAbortSignal=(t,n)=>{if(void 0!==t&&(null===t||"object"!=typeof t||!("aborted"in t)))throw new ER
2R_INVALID_ARG_TYPE(n,"AbortSignal",t)},validateFunction=(t,n)=>{if("function"!=typeof t)throw new ERR_INVALID_ARG_TYPE(n,"Function",t)};let AggregateError=class AggregateError extends Error{constructor(t){if(!Array.isArray(t))throw TypeError(`Expected input to be an Array, got ${typeof t}`);let n="";for(let i=0;i<t.length;i++)n+=` ${t[i].stack} 3`;super(n),this.name="AggregateError",this.errors=t}};t.exports={AggregateError,kEmptyObject:Object.freeze({}),once(t){let n=!1;return function(...i){n||(n=!0,t.apply(this,i))}},createDeferredPromise:function(){let t,n;let i=new Promise((i,s)=>{t=i,n=s});return{promise:i,resolve:t,reject:n}},promisify:t=>new Promise((n,i)=>{t((t,...s)=>t?i(t):n(...s))}),debuglog:()=>function(){},format:(t,...n)=>t.replace(/%([sdifj])/g,function(...[t,i]){let s=n.shift();if("f"===i)return s.toFixed(6);if("j"===i)return JSON.stringify(s);if("s"!==i||"object"!=typeof s)return s.toString();{let t=s.constructor!==Object?s.constructor.name:"";return`${t} {}`.trim()}}),inspect(t){switch(typeof t){case"string":if(t.includes("'")){if(!t.includes('"'))return`"${t}"`;if(!t.includes("`")&&!t.includes("${"))return`\`${t}\``}return`'${t}'`;case"number":if(isNaN(t))return"NaN";if(Object.is(t,-0))return String(t);return t;case"bigint":return`${String(t)}n`;case"boolean":case"undefined":return String(t);case"object":return"{}"}},types:{isAsyncFunction:t=>t instanceof m,isArrayBufferView:t=>ArrayBuffer.isView(t)},isBlob:void 0!==_?function(t){return t instanceof _}:function(t){return!1},deprecate:(t,n)=>t,addAbortListener:i(17187).addAbortListener||function(t,n){let i;
3if(void 0===t)throw new ERR_INVALID_ARG_TYPE("signal","AbortSignal",t);return validateAbortSignal(t,"signal"),validateFunction(n,"listener"),t.aborted?queueMicrotask(()=>n()):(t.addEventListener("abort",n,{__proto__:null,once:!0,[p]:!0}),i=()=>{t.removeEventListener("abort",n)}),{__proto__:null,[b](){var t;null===(t=i)||void 0===t||t()}}},AbortSignalAny:g.any||function(t){if(1===t.length)return t[0];let n=new y,abort=()=>n.abort();return t.forEach(t=>{validateAbortSignal(t,"signals"),t.addEventListener("abort",abort,{once:!0})}),n.signal.addEventListener("abort",()=>{t.forEach(t=>t.removeEventListener("abort",abort))},{once:!0}),n.signal}},t.exports.promisify.custom=Symbol.for("nodejs.util.promisify.custom")},70725:function(t,n,i){"use strict";let{Buffer:s}=i(48764),{ObjectDefineProperty:p,ObjectKeys:b,ReflectApply:g}=i(7850),{promisify:{custom:y}}=i(73847),{streamReturningOperators:m,promiseReturningOperators:_}=i(46942),{codes:{ERR_ILLEGAL_CONSTRUCTOR:v}}=i(64545),w=i(61983),{setDefaultHighWaterMark:S,getDefaultHighWaterMark:R}=i(86238),{pipeline:T}=i(38122),{destroyer:x}=i(72179),A=i(94813),k=i(3429),O=i(40937),P=t.exports=i(44007).Stream;for(let t of(P.isDestroyed=O.isDestroyed,P.isDisturbed=O.isDisturbed,P.isErrored=O.isErrored,P.isReadable=O.isReadable,P.isWritable=O.isWritable,P.Readable=i(23415),b(m))){let n=m[t];function fn(...t){if(new.target)throw v();return P.Readable.from(g(n,this,t))}p(fn,"name",{__proto__:null,value:n.name}),p(fn,"length",{__proto__:null,value:n.length}),p(P.Readable.prototype,t,{__proto__:null,value:fn,enumerable:!1,configurable:!0,writable:!0})}for(let t of b(_)){let n=_[t];function fn(...t){if(new.target)throw v();return g(n,this,t)}p(fn,"name",{__proto__:null,value:n.name}),p(fn,"length",{__proto__:null,value:n.length}),p(P.Readable.prototype,t,{__proto__:null,value:fn,enumerable:!1,configurable:!0,writable:!0})}P.Writable=i(14882),P.Duplex=i(39884),P.Transform=i(61569),P.PassThrough=i(482),P.pipeline=T;let{addAbortSignal:C}=i(68251);P.addAbortSignal=C,P.finished=A,P.destroy=x,P.compose=w,P.setDefaultHighWaterMark=S,P.getDefaultHighWaterMark=R,p(P,"promises",{__proto__:null,configurable:!0,enumerable:!0,get:()=>k}),p(T,y,{__proto__:null,enumerable:!0,get:()=>k.pipeline}),p(A,y,{__proto__:null,enumerable:!0,get:()=>k.finished}),P.Stream=P,P._isUint8Array=function(t){return t instanceof Uint8Array},P._uint8ArrayToBuffer=function(t){return s.from(t.buffer,t.byteOffset,t.byteLength)}},3429:function(t,n,i){"use strict";let{ArrayPrototypePop:s,Promise:p}=i(7850),{isIterable:b,isNodeStream:g,isWebStream:y}=i(40937),{pipelineImpl:m}=i(38122),{finished:_}=i(94813);function pipeline(...t){return new p((n,i)=>{let p,_;let v=t[t.length-1];if(v&&"object"==typeof v&&!g(v)&&!b(v)&&!y(v)){let n=s(t);p=n.signal,_=n.end}m(t,(t,s)=>{t?i(t):n(s)},{signal:p,end:_})})}i(70725),t.exports={finished:_,pipeline}},94784:function(t,n,i){"use strict";i.r(n),i.d(n,{BUTTON_POSITION:function(){return Z},LOGIN_PROVIDER:function(){return J},PAYMENT_PROVIDER:function(){return V},TORUS_BUILD_ENV:function(){return G},TorusInPageProvider:function(){return TorusInPageProvider},default:function(){return Torus}});var s,p,b=i(81180),g=i(99161);i(74597);var y=i(17187),m=i(4445),_=i.n(m);i(39428);var v=i(12840),w=i.n(v),S=i(30778),R=i.n(S),T=i(74286),x=i.n(T);Symbol("IGNORE_SUBSTREAM");var A=i(79826),k=i(23420),O=i.n(k);i(92730),i(70794);var P=i(2043),C=i.n(P);i(72378);let I=C().getLogger("http-helpers");I.setLevel(P.levels.INFO),i(51206),i(96486),i(48764).Buffer,O()();let L={IFRAME_STATUS:"iframe_status",CREATE_WINDOW:"create_window",CLOSE_WINDOW:"close_window",USER_LOGGED_IN:"user_logged_in",USER_LOGGED_OUT:"user_logged_out"},N={LOGOUT:"logout",WALLET_INSTANCE_ID:"wallet_instance_id",USER_INFO:"user_info",SET_PROVIDER:"set_provider",TOPUP:"topup",IFRAME_STATUS:"iframe_status",OPENED_WINDOW:"opened_window",CLOSED_WINDOW:"closed_window",GET_PROVIDER_STATE:"get_provider_state"},M={GET_PROVIDER_STATE:"wallet_get_provider_state"},B={ACCOUNTS_CHANGED:"wallet_accounts_changed",CHAIN_CHANGED:"wallet_chain_changed",UNLOCK_STATE_CHANGED:"wallet_unlock_state_changed"};function baseControllers_esm_createLoggerMiddleware(t){return function(n,i,s){s(s=>{i.error&&C().warn("Error in RPC response:\n",i),n.isTorusInternal||(C().info(`RPC (${t.origin}):`,n,"->",i),s())})}}(s=p||(p={})).approved="approved",s.cancelled="cancelled",s.confirmed="confirmed",s.failed="failed",s.finalized="finalized",s.processed="processed",s.rejected="rejected",s.signed="signed",s.submitted="submitted",s.unapproved="unapproved",s.dropped="dropped",s.expired="expired";var j=i(88473),D=i(61798),F=i.n(D);i(45772),i(95811),i(48764).Buffer;let openloginUtils_esm_randomId=()=>F()(32).toString("hex");function openloginJrpc_esm_noop(){}let openloginJrpc_esm_BasePostMessageStream=class openloginJrpc_esm_BasePostMessageStream extends j.Duplex{constructor(t){let{name:n,target:i,targetWindow:s=window,targetOrigin:p="*"}=t;if(super({objectMode:!0}),(0,b.Z)(this,"_init",void 0),(0,b.Z)(this,"_haveSyn",void 0),(0,b.Z)(this,"_name",void 0),(0,b.Z)(this,"_target",void 0),(0,b.Z)(this,"_targetWindow",void 0),(0,b.Z)(this,"_targetOrigin",void 0),(0,b.Z)(this,"_onMessage",void 0),(0,b.Z)(this,"_synIntervalId",void 0),!n||!i)throw Error("Invalid input.");this._init=!1,this._haveSyn=!1,this._name=n,this._target=i,this._targetWindow=s,this._targetOrigin=p,this._onMessage=this.onMessage.bind(this),this._synIntervalId=null,window.addEventListener("message",this._onMessage,!1),this._handShake()}_break(){this.cork(),this._write("BRK",null,openloginJrpc_esm_noop),this._haveSyn=!1,this._init=!1}_handShake(){this._write("SYN",null,openloginJrpc_esm_noop),this.cork()}_onData(t){if(this._init){if("BRK"===t)this._break();else try{this.push(t)}
3catch(t){this.emit("error",t)}}else"SYN"===t?(this._haveSyn=!0,this._write("ACK",null,openloginJrpc_esm_noop)):"ACK"===t&&(this._init=!0,this._haveSyn||this._write("ACK",null,openloginJrpc_esm_noop),this.uncork())}_postMessage(t){let n=this._targetOrigin;this._targetWindow.postMessage({target:this._target,data:t},n)}onMessage(t){let n=t.data;("*"===this._targetOrigin||t.origin===this._targetOrigin)&&t.source===this._targetWindow&&"object"==typeof n&&n.target===this._name&&n.data&&this._onData(n.data)}_read(){}_write(t,n,i){this._postMessage(t),i()}_destroy(){window.removeEventListener("message",this._onMessage,!1)}};function openloginJrpc_esm_safeApply(t,n,i){try{Reflect.apply(t,n,i)}catch(t){setTimeout(()=>{throw t})}}function openloginJrpc_esm_arrayClone(t){let n=t.length,i=Array(n);for(let s=0;s<n;s+=1)i[s]=t[s];return i}let dist_openloginJrpc_esm_SafeEventEmitter=class dist_openloginJrpc_esm_SafeEventEmitter extends y.EventEmitter{emit(t){let n="error"===t,i=this._events;if(void 0!==i)n=n&&void 0===i.error;else if(!n)return!1;for(var s=arguments.length,p=Array(s>1?s-1:0),b=1;b<s;b++)p[b-1]=arguments[b];if(n){let t;if(p.length>0&&([t]=p),t instanceof Error)throw t;let n=Error(`Unhandled error.${t?` (${t.message})`:""}`);throw n.context=t,n}let g=i[t];if(void 0===g)return!1;if("function"==typeof g)openloginJrpc_esm_safeApply(g,this,p);else{let t=g.length,n=openloginJrpc_esm_arrayClone(g);for(let i=0;i<t;i+=1)openloginJrpc_esm_safeApply(n[i],this,p)}return!0}};let openloginJrpc_esm_SerializableError=class openloginJrpc_esm_SerializableError extends Error{constructor(t){let{code:n,message:i,data:s}=t;if(!Number.isInteger(n))throw Error("code must be an integer");if(!i||"string"!=typeof i)throw Error("message must be string");super(i),(0,b.Z)(this,"code",void 0),(0,b.Z)(this,"data",void 0),this.code=n,void 0!==s&&(this.data=s)}toString(){return _()({code:this.code,message:this.message,data:this.data,stack:this.stack})}};let openloginJrpc_esm_getRpcPromiseCallback=function(t,n){let i=!(arguments.length>2)||void 0===arguments[2]||arguments[2];return(s,p)=>{s||p.error?n(s||p.error):!i||Array.isArray(p)?t(p):t(p.result)}};function openloginJrpc_esm_createStreamMiddleware(){let t={};function readNoop(){return!1}let n=new dist_openloginJrpc_esm_SafeEventEmitter;function processResponse(n){let i=t[n.id];if(!i)throw Error(`StreamMiddleware - Unknown response id "${n.id}"`);delete t[n.id],Object.assign(i.res,n),setTimeout(i.end)}function processNotification(t){n.emit("notification",t)}function processMessage(t,n,i){let s;try{let n=!t.id;n?processNotification(t):processResponse(t)}catch(t){s=t}i(s)}let i=new j.Duplex({objectMode:!0,read:readNoop,write:processMessage});return{events:n,middleware:(n,s,p,b)=>{i.push(n),t[n.id]={req:n,res:s,next:p,end:b}},stream:i}}function openloginJrpc_esm_createIdRemapMiddleware(){return(t,n,i,s)=>{let p=t.id,b=openloginUtils_esm_randomId();t.id=b,n.id=b,i(i=>{t.id=p,n.id=p,i()})}}function openloginJrpc_esm_ownKeys$1(t,n){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);n&&(s=s.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),i.push.apply(i,s)}return i}function openloginJrpc_esm_objectSpread$1(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?openloginJrpc_esm_ownKeys$1(Object(i),!0).forEach(function(n){(0,b.Z)(t,n,i[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):openloginJrpc_esm_ownKeys$1(Object(i)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(i,n))})}return t}let dist_openloginJrpc_esm_JRPCEngine=class dist_openloginJrpc_esm_JRPCEngine extends dist_openloginJrpc_esm_SafeEventEmitter{constructor(){super(),(0,b.Z)(this,"_middleware",void 0),this._middleware=[]}static async _runAllMiddleware(t,n,i){let s=[],p=null,b=!1;for(let g of i)if([p,b]=await dist_openloginJrpc_esm_JRPCEngine._runMiddleware(t,n,g,s),b)break;return[p,b,s.reverse()]}static _runMiddleware(t,n,i,s){return new Promise(p=>{let end=t=>{let i=t||n.error;i&&(n.error=(0,A.Xy)(i)),p([i,!0])};try{i(t,n,t=>{n.error?end(n.error):(t&&("function"!=typeof t&&end(new openloginJrpc_esm_SerializableError({code:-32603,message:"JRPCEngine: 'next' return handlers must be functions"})),s.push(t)),p([null,!1]))},end)}catch(t){end(t)}})}static async _runReturnHandlers(t){for(let n of t)await new Promise((t,i)=>{n(n=>n?i(n):t())})}static _checkForCompletion(t,n,i){if(!("result"in n)&&!("error"in n))throw new openloginJrpc_esm_SerializableError({code:-32603,message:"Response has no error or result for request"});if(!i)throw new openloginJrpc_esm_SerializableError({code:-32603,message:"Nothing ended request"})}push(t){this._middleware.push(t)}handle(t,n){if(n&&"function"!=typeof n)throw Error('"callback" must be a function if provided.');return Array.isArray(t)?n?this._handleBatch(t,n):this._handleBatch(t):n?this._handle(t,n):this._promiseHandle(t)}asMiddleware(){return async(t,n,i,s)=>{try{let[p,b,g]=await dist_openloginJrpc_esm_JRPCEngine._runAllMiddleware(t,n,this._middleware);
3if(b)return await dist_openloginJrpc_esm_JRPCEngine._runReturnHandlers(g),s(p);return i(async t=>{try{await dist_openloginJrpc_esm_JRPCEngine._runReturnHandlers(g)}catch(n){return t(n)}return t()})}catch(t){return s(t)}}}async _handleBatch(t,n){try{let i=await Promise.all(t.map(this._promiseHandle.bind(this)));if(n)return n(null,i);return i}catch(t){if(n)return n(t);throw t}}_promiseHandle(t){return new Promise(n=>{this._handle(t,(t,i)=>{n(i)})})}async _handle(t,n){if(!t||Array.isArray(t)||"object"!=typeof t){let t=new openloginJrpc_esm_SerializableError({code:-32603,message:"request must be plain object"});return n(t,{id:void 0,jsonrpc:"2.0",error:t})}if("string"!=typeof t.method){let i=new openloginJrpc_esm_SerializableError({code:-32603,message:"method must be string"});return n(i,{id:t.id,jsonrpc:"2.0",error:i})}let i=openloginJrpc_esm_objectSpread$1({},t),s={id:i.id,jsonrpc:i.jsonrpc},p=null;try{await this._processRequest(i,s)}catch(t){p=t}return p&&(delete s.result,s.error||(s.error=(0,A.Xy)(p))),n(p,s)}async _processRequest(t,n){let[i,s,p]=await dist_openloginJrpc_esm_JRPCEngine._runAllMiddleware(t,n,this._middleware);if(dist_openloginJrpc_esm_JRPCEngine._checkForCompletion(t,n,s),await dist_openloginJrpc_esm_JRPCEngine._runReturnHandlers(p),i)throw i}};let openloginJrpc_esm_Substream=class openloginJrpc_esm_Substream extends j.Duplex{constructor(t){let{parent:n,name:i}=t;super({objectMode:!0}),(0,b.Z)(this,"_parent",void 0),(0,b.Z)(this,"_name",void 0),this._parent=n,this._name=i}_read(){}_write(t,n,i){this._parent.push({name:this._name,data:t}),i()}};function openloginJrpc_esm_ownKeys(t,n){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);n&&(s=s.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),i.push.apply(i,s)}return i}function openloginJrpc_esm_objectSpread(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?openloginJrpc_esm_ownKeys(Object(i),!0).forEach(function(n){(0,b.Z)(t,n,i[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):openloginJrpc_esm_ownKeys(Object(i)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(i,n))})}return t}let W=Symbol("IGNORE_SUBSTREAM");let openloginJrpc_esm_ObjectMultiplex=class openloginJrpc_esm_ObjectMultiplex extends j.Duplex{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super(openloginJrpc_esm_objectSpread(openloginJrpc_esm_objectSpread({},t),{},{objectMode:!0})),(0,b.Z)(this,"_substreams",void 0),(0,b.Z)(this,"getStream",void 0),this._substreams={}}createStream(t){if(!t)throw Error("ObjectMultiplex - name must not be empty");if(this._substreams[t])throw Error(`ObjectMultiplex - Substream for name "${t}" already exists`);let n=new openloginJrpc_esm_Substream({parent:this,name:t});return this._substreams[t]=n,openloginJrpc_esm_anyStreamEnd(this,t=>n.destroy(t||void 0)),n}ignoreStream(t){if(!t)throw Error("ObjectMultiplex - name must not be empty");if(this._substreams[t])throw Error(`ObjectMultiplex - Substream for name "${t}" already exists`);this._substreams[t]=W}_read(){}_write(t,n,i){let{name:s,data:p}=t;if(!s)return window.console.warn(`ObjectMultiplex - malformed chunk without name "${t}"`),i();let b=this._substreams[s];return b?b!==W&&b.push(p):window.console.warn(`ObjectMultiplex - orphaned data for stream "${s}"`),i()}};function openloginJrpc_esm_anyStreamEnd(t,n){let i=R()(n);w()(t,{readable:!1},i),w()(t,{writable:!1},i)}var q=i(24970),U=i(64063),$=i.n(U),H=i(48764).Buffer,z={errors:{disconnected:()=>"Torus: Lost connection to Torus.",permanentlyDisconnected:()=>"Torus: Disconnected from iframe. Page reload required.",unsupportedSync:t=>`Torus: The Torus Ethereum provider does not support synchronous methods like ${t} without a callback parameter.`,invalidDuplexStream:()=>"Must provide a Node.js-style duplex stream.",invalidOptions:t=>`Invalid options. Received: { maxEventListeners: ${t}}`,invalidRequestArgs:()=>"Expected a single, non-array, object argument.",invalidRequestMethod:()=>
3"'args.method' must be a non-empty string.",invalidRequestParams:()=>"'args.params' must be an object or array if provided.",invalidLoggerObject:()=>"'args.logger' must be an object if provided.",invalidLoggerMethod:t=>`'args.logger' must include required method '${t}'.`},info:{connected:t=>`Torus: Connected to chain with ID "${t}".`}};let V={MOONPAY:"moonpay",WYRE:"wyre",RAMPNETWORK:"rampnetwork",XANPOOL:"xanpool",MERCURYO:"mercuryo",TRANSAK:"transak"},G={PRODUCTION:"production",DEVELOPMENT:"development",TESTING:"testing"},Z={BOTTOM_LEFT:"bottom-left",TOP_LEFT:"top-left",BOTTOM_RIGHT:"bottom-right",TOP_RIGHT:"top-right"},J={GOOGLE:"google",FACEBOOK:"facebook",REDDIT:"reddit",DISCORD:"discord",TWITCH:"twitch",APPLE:"apple",LINE:"line",GITHUB:"github",KAKAO:"kakao",LINKEDIN:"linkedin",TWITTER:"twitter",WEIBO:"weibo",WECHAT:"wechat",EMAIL_PASSWORDLESS:"email_passwordless"};var K={supportedVerifierList:[J.GOOGLE,J.REDDIT,J.DISCORD],api:"https://api.tor.us",translations:{en:{embed:{continue:"Continue",actionRequired:"Authorization required",pendingAction:"Click continue to proceed with your request in a popup",cookiesRequired:"Cookies Required",enableCookies:"Please enable cookies in your browser preferences to access Torus",clickHere:"More Info"}},de:{embed:{continue:"Fortsetzen",actionRequired:"Autorisierung erforderlich",pendingAction:"Klicken Sie in einem Popup auf Weiter, um mit Ihrer Anfrage fortzufahren",cookiesRequired:"Cookies ben\xf6tigt",enableCookies:"Bitte aktivieren Sie Cookies in Ihren Browsereinstellungen, um auf Torus zuzugreifen",clickHere:"Mehr Info"}},ja:{embed:{continue:"ç¶ç¶ãã",actionRequired:"èªè¨¼ãå¿ è¦ã§ã",pendingAction:"ç¶è¡ãã¯ãªãã¯ãã¦ããããã¢ããã§ãªã¯ã¨ã¹ããç¶è¡ãã¾ã",cookiesRequired:"å¿ è¦ãªã¯ããã¼",enableCookies:"Torusã«ã¢ã¯ã»ã¹ããã«ã¯ããã©ã¦ã¶ã®è¨å®ã§Cookieãæå¹ã«ãã¦ãã ããã",clickHere:"詳ããã¯"}},ko:{embed:{continue:"ê³ìíë¤",actionRequired:"ì¹ì¸ íì",pendingAction:"íì ìì ìì²ì ì§ííë ¤ë©´ ê³ìì í´ë¦íììì¤.",cookiesRequired:"ì¿ í¤ íì",enableCookies:"ë¸ë¼ì°ì íê²½ ì¤ì ìì ì¿ í¤ë¥¼ íì±ííì¬ Torusì ì¡ì¸ì¤íììì¤.",clickHere:"ë ë§ì ì ë³´"}},zh:{embed:{continue:"ç»§ç»",actionRequired:"éè¦ææ",pendingAction:"åå»ç»§ç»ä»¥å¨å¼¹åºçªå£ä¸ç»§ç»æ¨ç请æ±",cookiesRequired:"å¿ å¡«Cookie",enableCookies:"è¯·å¨æ¨çæµè§å¨é¦é项ä¸å¯ç¨cookie以访é®Torusã",clickHere:"æ´å¤ä¿¡æ¯"}}},prodTorusUrl:"",localStorageKeyPrefix:"torus-"},Y=C().getLogger("solana-embed");function solanaEmbed_esm_createErrorMiddleware(){return(t,n,i)=>{"string"==typeof t.method&&t.method||(n.error=A.Sy.rpc.invalidRequest({message:"The request 'method' must be a non-empty string.",data:t})),i(t=>{let{error:i}=n;return i&&Y.error(`Torus - RPC Error: ${i.message}`,i),t()})}}function logStreamDisconnectWarning(t,n,i){let s=`Torus: Lost connection to "${t}".`;n?.stack&&(s+=` 4${n.stack}`),Y.warn(s),i&&i.listenerCount("error")>0&&i.emit("error",s)}let getWindowId=()=>Math.random().toString(36).slice(2),getTorusUrl=async t=>{let n,i;switch(t){case"testing":n="https://solana-testing.tor.us",i="debug";break;case"development":n="http://localhost:8080",i="debug";break;default:n="https://solana.tor.us",i="error"}return{torusUrl:n,logLevel:i}},getUserLanguage=()=>{let t=window.navigator.language||"en-US",n=t.split("-");return Object.prototype.hasOwnProperty.call(K.translations,n[0])?n[0]:"en"},X={height:660,width:375},Q={height:740,width:1315},ee={height:700,width:1200},et={height:600,width:400};function storageAvailable(t){let n;try{n=window[t];let i="__storage_test__";return n.setItem(i,i),n.removeItem(i),!0}catch(t){return t&&(22===t.code||1014===t.code||"QuotaExceededError"===t.name||"NS_ERROR_DOM_QUOTA_REACHED"===t.name)&&n&&0!==n.length}}function solanaEmbed_esm_getPopupFeatures(t){let{width:n,height:i}=t,s=void 0!==window.screenLeft?window.screenLeft:window.screenX,p=void 0!==window.screenTop?window.screenTop:window.screenY,b=window.innerWidth?window.innerWidth:document.documentElement.clientWidth?document.documentElement.clientWidth:window.screen.width,g=window.innerHeight?window.innerHeight:document.documentElement.clientHeight?document.documentElement.clientHeight:window.screen.height,y=`titlebar=0,toolbar=0,status=0,location=0,menubar=0,height=${i/1},width=${n/1},top=${Math.abs((g-i)/2/1+p)},left=${Math.abs((b-n)/2/1+s)}`;return y}let BaseProvider=class BaseProvider extends dist_openloginJrpc_esm_SafeEventEmitter{constructor(t,n){let{maxEventListeners:i=100,jsonRpcStreamName:s="provider"}=n;if(super(),(0,b.Z)(this,"isTorus",void 0),(0,b.Z)(this,"_rpcEngine",void 0),(0,b.Z)(this,"jsonRpcConnectionEvents",void 0),(0,b.Z)(this,"_state",void 0),!(0,q.duplex)(t))throw Error(z.errors.invalidDuplexStream());this.isTorus=!0,this.setMaxListeners(i),this._handleConnect=this._handleConnect.bind(this),this._handleDisconnect=this._handleDisconnect.bind(this),this._handleStreamDisconnect=this._handleStreamDisconnect.bind(this),this._rpcRequest=this._rpcRequest.bind(this),this._initializeState=this._initializeState.bind(this),this.request=this.request.bind(this),this.sendAsync=this.sendAsync.bind(this);let p=new openloginJrpc_esm_ObjectMultiplex;x()(t,p,t,this._handleStreamDisconnect.bind(this,"Torus")),p.ignoreStream("phishing");let g=openloginJrpc_esm_createStreamMiddleware();x()(g.stream,p.createStream(s),g.stream,this._handleStreamDisconnect.bind(this,"Torus RpcProvider"));let y=new dist_openloginJrpc_esm_JRPCEngine;y.push(openloginJrpc_esm_createIdRemapMiddleware()),y.push(solanaEmbed_esm_createErrorMiddleware()),y.push(baseControllers_esm_createLoggerMiddleware({origin:location.origin})),y.push(g.middleware),this._rpcEngine=y,this.jsonRpcConnectionEvents=g.events}async request(t){if(!t||"object"!=typeof t||Array.isArray(t))throw A.Sy.rpc.invalidRequest({message:z.errors.invalidRequestArgs(),data:t});let{method:n,params:i}=t;if("string"!=typeof n||0===n.length)throw A.Sy.rpc.invalidRequest({message:z.errors.invalidRequestMethod(),data:t});if(void 0!==i&&!Array.isArray(i)&&("object"!=typeof i||null===i))throw A.Sy.rpc.invalidRequest({message:z.errors.invalidRequestParam
4s(),data:t});return new Promise((t,s)=>{this._rpcRequest({method:n,params:i},openloginJrpc_esm_getRpcPromiseCallback(t,s))})}send(t,n){this._rpcRequest(t,n)}sendAsync(t){return new Promise((n,i)=>{this._rpcRequest(t,openloginJrpc_esm_getRpcPromiseCallback(n,i))})}_handleStreamDisconnect(t,n){logStreamDisconnectWarning(t,n,this),this._handleDisconnect(!1,n?n.message:void 0)}};let handleEvent=function(t,n,i){for(var s=arguments.length,p=Array(s>3?s-3:0),b=3;b<s;b++)p[b-3]=arguments[b];let handlerWrapper=()=>{i(...p),t.removeEventListener(n,handlerWrapper)};t.addEventListener(n,handlerWrapper)};async function documentReady(){return new Promise(t=>{"loading"!==document.readyState?t():handleEvent(document,"DOMContentLoaded",t)})}let htmlToElement=t=>{let n=window.document.createElement("template"),i=t.trim();return n.innerHTML=i,n.content.firstChild};function isLegacyTransactionInstance(t){return void 0===t.version}let solanaEmbed_esm_PopupHandler=class solanaEmbed_esm_PopupHandler extends dist_openloginJrpc_esm_SafeEventEmitter{constructor(t){let{url:n,target:i,features:s}=t;super(),(0,b.Z)(this,"url",void 0),(0,b.Z)(this,"target",void 0),(0,b.Z)(this,"features",void 0),(0,b.Z)(this,"window",void 0),(0,b.Z)(this,"windowTimer",void 0),(0,b.Z)(this,"iClosedWindow",void 0),this.url=n,this.target=i||"_blank",this.features=s||solanaEmbed_esm_getPopupFeatures(ee),this.window=void 0,this.windowTimer=void 0,this.iClosedWindow=!1,this._setupTimer()}_setupTimer(){this.windowTimer=Number(setInterval(()=>{this.window&&this.window.closed&&(clearInterval(this.windowTimer),this.iClosedWindow||this.emit("close"),this.iClosedWindow=!1,this.window=void 0),void 0===this.window&&clearInterval(this.windowTimer)},500))}open(){return this.window=window.open(this.url.href,this.target,this.features),this.window?.focus&&this.window.focus(),Promise.resolve()}close(){this.iClosedWindow=!0,this.window&&this.window.close()}redirect(t){t?window.location.replace(this.url.href):window.location.href=this.url.href}};function solanaEmbed_esm_ownKeys$2(t,n){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);n&&(s=s.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),i.push.apply(i,s)}return i}function solanaEmbed_esm_objectSpread$2(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?solanaEmbed_esm_ownKeys$2(Object(i),!0).forEach(function(n){(0,b.Z)(t,n,i[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):solanaEmbed_esm_ownKeys$2(Object(i)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(i,n))})}return t}let TorusCommunicationProvider=class TorusCommunicationProvider extends BaseProvider{constructor(t,n){let{maxEventListeners:i=100,jsonRpcStreamName:s="provider"}=n;super(t,{maxEventListeners:i,jsonRpcStreamName:s}),(0,b.Z)(this,"embedTranslations",void 0),(0,b.Z)(this,"torusUrl",void 0),(0,b.Z)(this,"dappStorageKey",void 0),(0,b.Z)(this,"windowRefs",void 0),(0,b.Z)(this,"tryWindowHandle",void 0),(0,b.Z)(this,"torusAlertContainer",void 0),(0,b.Z)(this,"torusIframe",void 0),this._state=solanaEmbed_esm_objectSpread$2({},TorusCommunicationProvider._defaultState),this.torusUrl="",this.dappStorageKey="";let p=K.translations[getUserLanguage()];this.embedTranslations=p.embed,this.windowRefs={},this.on("connect",()=>{this._state.isConnected=!0}),this.jsonRpcConnectionEvents.on("notification",t=>{let{method:n,params:i}=t;if(n===L.IFRAME_STATUS){let{isFullScreen:t,rid:n}=i;this._displayIframe({isFull:t,rid:n})}else if(n===L.CREATE_WINDOW){let{windowId:t,url:n}=i;this._createPopupBlockAlert(t,n)}else if(n===L.CLOSE_WINDOW)this._handleCloseWindow(i);else if(n===L.USER_LOGGED_IN){let{currentLoginProvider:t}=i;this._state.isLoggedIn=!0,this._state.currentLoginProvider=t}else n===L.USER_LOGGED_OUT&&(this._state.isLoggedIn=!1,this._state.currentLoginProvider=null,this._displayIframe())})}get isLoggedIn(){return this._state.isLoggedIn}get isIFrameFullScreen(){return this._state.isIFrameFullScreen}isConnected(){return this._state.isConnected}async _initializeState(t){try{let{torusUrl:n,dappStorageKey:i,torusAlertContainer:s,torusIframe:p}=t;this.torusUrl=n,this.dappStorageKey=i,this.torusAlertContainer=s,this.torusIframe=p,this.torusIframe.addEventListener("load",()=>{this._state.isIFrameFullScreen||this._displayIframe()});let{currentLoginProvider:b,isLoggedIn:g}=await this.request({method:N.GET_PROVIDER_STATE,params:[]});this._handleConnect(b,g)}catch(t){Y.error("Torus: Failed to get initial state. Please report this bug.",t)}finally{Y.info("initialized communication state"),this._state.initialized=!0,this.emit
4("_initialized")}}_handleWindow(t){let{url:n,target:i,features:s}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},p=new URL(n||`${this.torusUrl}/redirect?windowId=${t}`);this.dappStorageKey&&(p.hash?p.hash+=`&dappStorageKey=${this.dappStorageKey}`:p.hash=`#dappStorageKey=${this.dappStorageKey}`);let b=new solanaEmbed_esm_PopupHandler({url:p,target:i,features:s});if(b.open(),!b.window){this._createPopupBlockAlert(t,p.href);return}this.windowRefs[t]=b,this.request({method:N.OPENED_WINDOW,params:{windowId:t}}),b.once("close",()=>{delete this.windowRefs[t],this.request({method:N.CLOSED_WINDOW,params:{windowId:t}})})}_displayIframe(){let{isFull:t=!1,rid:n=""}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i={};if(t)i.display="block",i.width="100%",i.height="100%",i.top="0px",i.right="0px",i.left="0px",i.bottom="0px";else switch(i.display=this._state.torusWidgetVisibility?"block":"none",i.height="70px",i.width="70px",this._state.buttonPosition){case Z.TOP_LEFT:i.top="0px",i.left="0px",i.right="auto",i.bottom="auto";break;case Z.TOP_RIGHT:i.top="0px",i.right="0px",i.left="auto",i.bottom="auto";break;case Z.BOTTOM_RIGHT:i.bottom="0px",i.right="0px",i.top="auto",i.left="auto";break;case Z.BOTTOM_LEFT:default:i.bottom="0px",i.left="0px",i.top="auto",i.right="auto"}Object.assign(this.torusIframe.style,i),this._state.isIFrameFullScreen=t,this.request({method:N.IFRAME_STATUS,params:{isIFrameFullScreen:t,rid:n}})}hideTorusButton(){this._state.torusWidgetVisibility=!1,this._displayIframe()}showTorusButton(){this._state.torusWidgetVisibility=!0,this._displayIframe()}_rpcRequest(t,n){Array.isArray(t)||t.jsonrpc||(t.jsonrpc="2.0"),this.tryWindowHandle(t,n)}_handleConnect(t,n){this._state.isConnected||(this._state.isConnected=!0,this.emit("connect",{currentLoginProvider:t,isLoggedIn:n}),Y.debug(z.info.connected(t)))}_handleDisconnect(t,n){if(this._state.isConnected||!this._state.isPermanentlyDisconnected&&!t){let i;this._state.isConnected=!1,t?(i=new A.Cg(1013,n||z.errors.disconnected()),Y.debug(i)):(i=new A.Cg(1011,n||z.errors.permanentlyDisconnected()),Y.error(i),this._state.currentLoginProvider=null,this._state.isLoggedIn=!1,this._state.torusWidgetVisibility=!1,this._state.isIFrameFullScreen=!1,this._state.isPermanentlyDisconnected=!0),this.emit("disconnect",i)}}_handleCloseWindow(t){let{windowId:n}=t;this.windowRefs[n]&&(this.windowRefs[n].close(),delete this.windowRefs[n])}async _createPopupBlockAlert(t,n){let i=this.getLogoUrl(),s=htmlToElement(`<div id="torusAlert" class="torus-alert--v2"><div id="torusAlert__logo"><img src="${i}" /></div><div><h1 id="torusAlert__title">${this.embedTranslations.actionRequired}</h1><p id="torusAlert__desc">${this.embedTranslations.pendingAction}</p></div></div>`),p=htmlToElement(`<div><a id="torusAlert__btn">${this.embedTranslations.continue}</a></div>`),b=htmlToElement('<div id="torusAlert__btn-container"></div>');b.appendChild(p),s.appendChild(b),await documentReady(),(()=>{this.torusAlertContainer.appendChild(s)})(),(()=>{p.addEventListener("click",()=>{this._handleWindow(t,{url:n,target:"_blank",features:solanaEmbed_esm_getPopupFeatures(et)}),s.remove(),0===this.torusAlertContainer.children.length&&(this.torusAlertContainer.style.display="none")})})(),this.torusAlertContainer.style.display="block"}getLogoUrl(){let t=`${this.torusUrl}/images/torus_icon-blue.svg`;return t}};function solanaEmbed_esm_ownKeys$1(t,n){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);n&&(s=s.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),i.push.apply(i,s)}return i}function solanaEmbed_esm_objectSpread$1(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?solanaEmbed_esm_ownKeys$1(Object(i),!0).forEach(function(n){(0,b.Z)(t,n,i[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):solanaEmbed_esm_ownKeys$1(Object(i)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(i,n))})}return t}(0,b.Z)(TorusCommunicationProvider,"_defaultState",{buttonPosition:"bottom-left",currentLoginProvider:null,isIFrameFullScreen:!1,hasEmittedConnection:!1,torusWidgetVisibility:!1,initialized:!1,isLoggedIn:!1,isPermanentlyDisconnected:!1,isConnected:!1});let TorusInPageProvider=class TorusInPageProvider extends BaseProvider{constructor(t,n){let{maxEventListeners:i=100,jsonRpcStreamName:s="provider"}=n;
4super(t,{maxEventListeners:i,jsonRpcStreamName:s}),(0,b.Z)(this,"chainId",void 0),(0,b.Z)(this,"selectedAddress",void 0),(0,b.Z)(this,"tryWindowHandle",void 0),this._state=solanaEmbed_esm_objectSpread$1({},TorusInPageProvider._defaultState),this.selectedAddress=null,this.chainId=null,this._handleAccountsChanged=this._handleAccountsChanged.bind(this),this._handleChainChanged=this._handleChainChanged.bind(this),this._handleUnlockStateChanged=this._handleUnlockStateChanged.bind(this),this.on("connect",()=>{this._state.isConnected=!0}),this.jsonRpcConnectionEvents.on("notification",t=>{let{method:n,params:i}=t;n===B.ACCOUNTS_CHANGED?this._handleAccountsChanged(i):n===B.UNLOCK_STATE_CHANGED?this._handleUnlockStateChanged(i):n===B.CHAIN_CHANGED&&this._handleChainChanged(i)})}isConnected(){return this._state.isConnected}async _initializeState(){try{let{accounts:t,chainId:n,isUnlocked:i}=await this.request({method:M.GET_PROVIDER_STATE,params:[]});this.emit("connect",{chainId:n}),this._handleChainChanged({chainId:n}),this._handleUnlockStateChanged({accounts:t,isUnlocked:i}),this._handleAccountsChanged(t)}catch(t){Y.error("Torus: Failed to get initial state. Please report this bug.",t)}finally{Y.info("initialized provider state"),this._state.initialized=!0,this.emit("_initialized")}}_rpcRequest(t,n){let i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],s=n;if(!Array.isArray(t)){if(t.jsonrpc||(t.jsonrpc="2.0"),"solana_accounts"===t.method||"solana_requestAccounts"===t.method)s=(s,p)=>{this._handleAccountsChanged(p.result||[],"solana_accounts"===t.method,i),n(s,p)};else if("wallet_getProviderState"===t.method){this._rpcEngine.handle(t,s);return}}this.tryWindowHandle(t,s)}_handleConnect(t){this._state.isConnected||(this._state.isConnected=!0,this.emit("connect",{chainId:t}),Y.debug(z.info.connected(t)))}_handleDisconnect(t,n){if(this._state.isConnected||!this._state.isPermanentlyDisconnected&&!t){let i;this._state.isConnected=!1,t?(i=new A.Cg(1013,n||z.errors.disconnected()),Y.debug(i)):(i=new A.Cg(1011,n||z.errors.permanentlyDisconnected()),Y.error(i),this.chainId=null,this._state.accounts=null,this.selectedAddress=null,this._state.isUnlocked=!1,this._state.isPermanentlyDisconnected=!0),this.emit("disconnect",i)}}_handleAccountsChanged(t){let n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],s=t;for(let n of(Array.isArray(s)||(Y.error("Torus: Received non-array accounts parameter. Please report this bug.",s),s=[]),t))if("string"!=typeof n){Y.error("Torus: Received non-string account. Please report this bug.",t),s=[];break}$()(this._state.accounts,s)||(n&&Array.isArray(this._state.accounts)&&this._state.accounts.length>0&&!i&&Y.error('Torus: "solana_accounts" unexpectedly updated accounts. Please report this bug.',s),this._state.accounts=s,this.emit("accountsChanged",s)),this.selectedAddress!==s[0]&&(this.selectedAddress=s[0]||null)}_handleChainChanged(){let{chainId:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!t){Y.error("Torus: Received invalid network parameters. Please report this bug.",{chainId:t});return}"loading"===t?this._handleDisconnect(!0):(this._handleConnect(t),t!==this.chainId&&(this.chainId=t,this._state.initialized&&this.emit("chainChanged",this.chainId)))}_handleUnlockStateChanged(){let{accounts:t,isUnlocked:n}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if("boolean"!=typeof n){Y.error("Torus: Received invalid isUnlocked parameter. Please report this bug.",{isUnlocked:n});return}n!==this._state.isUnlocked&&(this._state.isUnlocked=n,this._handleAccountsChanged(t||[]))}};function imgExists(t){return new Promise((n,i)=>{try{let i=document.createElement("img");i.onload=()=>n(!0),i.onerror=()=>n(!1),i.src=t}catch(t){i(t)}})}(0,b.Z)(TorusInPageProvider,"_defaultState",{accounts:null,isConnected:!1,isUnlocked:!1,initialized:!1,isPermanentlyDisconnected:!1,hasEmittedConnection:!1});let getSiteName=t=>{let{document:n}=t,i=n.querySelector('head > meta[property="og:site_name"]');if(i)return i.content;let s=n.querySelector('head > meta[name="title"]');return s?s.content:n.title&&n.title.length>0?n.title:t.location.hostname};async function getSiteIcon(t){try{let{document:n}=t,i=n.querySelector('head > link[rel="shortcut icon"]');if(i&&await imgExists(i.href)||(i=Array.from(n.querySelectorAll('head > link[rel="icon"]')).find(t=>!!t.href))&&await imgExists(i.href))return i.href;return""}catch(t){return""}}let getSiteMetadata=async()=>({name:getSiteName(window),icon:await getSiteIcon(window)});function solanaEmbed_esm_ownKeys(t,n){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);n&&(s=s.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),i.push.apply(i,s)}return i}function solanaEmbed_esm_objectSpread(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};
4n%2?solanaEmbed_esm_ownKeys(Object(i),!0).forEach(function(n){(0,b.Z)(t,n,i[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):solanaEmbed_esm_ownKeys(Object(i)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(i,n))})}return t}let er=["send_transaction","sign_transaction","sign_all_transactions","sign_message","connect"],en=[N.SET_PROVIDER],ei=storageAvailable("localStorage");!async function(){try{if("undefined"==typeof document)return;let t=document.createElement("link"),{torusUrl:n}=await getTorusUrl("production");t.href=`${n}/frame`,t.crossOrigin="anonymous",t.type="text/html",t.rel="prefetch",t.relList&&t.relList.supports&&t.relList.supports("prefetch")&&document.head.appendChild(t)}catch(t){Y.warn(t)}}();let Torus=class Torus{constructor(){let{modalZIndex:t=99999}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,b.Z)(this,"isInitialized",void 0),(0,b.Z)(this,"torusAlert",void 0),(0,b.Z)(this,"modalZIndex",void 0),(0,b.Z)(this,"alertZIndex",void 0),(0,b.Z)(this,"requestedLoginProvider",void 0),(0,b.Z)(this,"provider",void 0),(0,b.Z)(this,"communicationProvider",void 0),(0,b.Z)(this,"dappStorageKey",void 0),(0,b.Z)(this,"isTopupHidden",!1),(0,b.Z)(this,"torusAlertContainer",void 0),(0,b.Z)(this,"torusUrl",void 0),(0,b.Z)(this,"torusIframe",void 0),(0,b.Z)(this,"styleLink",void 0),this.torusUrl="",this.isInitialized=!1,this.requestedLoginProvider=null,this.modalZIndex=t,this.alertZIndex=t+1e3,this.dappStorageKey=""}get isLoggedIn(){return!!this.communicationProvider&&this.communicationProvider.isLoggedIn}
4async init(){let{buildEnv:t=G.PRODUCTION,enableLogging:n=!1,network:i,showTorusButton:s=!1,useLocalStorage:p=!1,buttonPosition:b=Z.BOTTOM_LEFT,apiKey:g="torus-default",extraParams:y={},whiteLabel:m}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(this.isInitialized)throw Error("Already initialized");let{torusUrl:_,logLevel:v}=await getTorusUrl(t);Y.enableAll(),Y.info(_,"url loaded"),Y.info("Solana Embed Version :0.3.4"),this.torusUrl=_,Y.setDefaultLevel(v),n?Y.enableAll():Y.disableAll();let w=this.handleDappStorageKey(p),S=new URL(_);S.pathname.endsWith("/")?S.pathname+="frame":S.pathname+="/frame";let R=new URLSearchParams;w&&R.append("dappStorageKey",w),R.append("origin",window.location.origin),S.hash=R.toString(),this.torusIframe=htmlToElement(`<iframe 5 id="torusIframe" 6 class="torusIframe" 7 src="${S.href}" 8 style="display: none; position: fixed; top: 0; right: 0; width: 100%; 9 height: 100%; border: none; border-radius: 0; z-index: ${this.modalZIndex.toString()}" 10 ></iframe>`),this.torusAlertContainer=htmlToElement(`<div id="torusAlertContainer" style="display:none; z-index: ${this.alertZIndex.toString()}"></div>`),this.styleLink=htmlToElement(`<link href="${_}/css/widget.css" rel="stylesheet" type="text/css">`);let handleSetup=async()=>new Promise((t,n)=>{try{window.document.head.appendChild(this.styleLink),window.document.body.appendChild(this.torusIframe),window.document.body.appendChild(this.torusAlertContainer),this.torusIframe.addEventListener("load",async()=>{let n=await getSiteMetadata();this.torusIframe.contentWindow.postMessage({buttonPosition:b,apiKey:g,network:i,dappMetadata:n,extraParams:y,whiteLabel:m},S.origin),await this._setupWeb3({torusUrl:_}),s&&this.showTorusButton(),m?.topupHide?this.isTopupHidden=m.topupHide:this.hideTorusButton(),this.isInitialized=!0,window.torus=this,t()})}catch(t){n(t)}});await documentReady(),await handleSetup()}async login(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!this.isInitialized)throw Error("Call init() first");try{this.requestedLoginProvider=t.loginProvider||null,this.requestedLoginProvider||this.communicationProvider._displayIframe({isFull:!0});let n=await new Promise((n,i)=>{this.provider._rpcRequest({method:"solana_requestAccounts",params:[this.requestedLoginProvider,t.login_hint]},openloginJrpc_esm_getRpcPromiseCallback(n,i))});if(Array.isArray(n)&&n.length>0)return n;throw Error("Login failed")}catch(t){throw Y.error("login failed",t),t}finally{this.communicationProvider.isIFrameFullScreen&&this.communicationProvider._displayIframe()}}async loginWithPrivateKey(t){if(!this.isInitialized)throw Error("Call init() first");let{privateKey:n,userInfo:i}=t,{success:s}=await this.communicationProvider.request({method:"login_with_private_key",params:{privateKey:n,userInfo:i}});if(!s)throw Error("Login Failed")}async logout(){if(!this.communicationProvider.isLoggedIn)throw Error("Not logged in");await this.communicationProvider.request({method:N.LOGOUT,params:[]}),this.requestedLoginProvider=null}async cleanUp(){this.communicationProvider.isLoggedIn&&await this.logout(),this.clearInit()}clearInit(){function isElement(t){return t instanceof Element||t instanceof Document}isElement(this.styleLink)&&window.document.body.contains(this.styleLink)&&(this.styleLink.remove(),this.styleLink=void 0),isElement(this.torusIframe)&&window.document.body.contains(this.torusIframe)&&(this.torusIframe.remove(),this.torusIframe=void 0),isElement(this.torusAlertContainer)&&window.document.body.contains(this.torusAlertContainer)&&(this.torusAlert=void 0,this.torusAlertContainer.remove(),this.torusAlertContainer=void 0),this.isInitialized=!1}hideTorusButton(){this.communicationProvider.hideTorusButton()}showTorusButton(){this.communicationProvider.showTorusButton()}async setProvider(t){await this.communicationProvider.request({method:N.SET_PROVIDER,params:solanaEmbed_esm_objectSpread({},t)})}async showWallet(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=await this.communicationProvider.request({method:N.WALLET_INSTANCE_ID,params:[]}),s=t?`/${t}`:"",p=new URL(`${this.torusUrl}/wallet${s}`);
10p.searchParams.append("instanceId",i),Object.keys(n).forEach(t=>{p.searchParams.append(t,n[t])}),this.dappStorageKey&&(p.hash=`#dappStorageKey=${this.dappStorageKey}`);let b=new solanaEmbed_esm_PopupHandler({url:p,features:solanaEmbed_esm_getPopupFeatures(Q)});b.open()}async getUserInfo(){let t=await this.communicationProvider.request({method:N.USER_INFO,params:[]});return t}async initiateTopup(t,n){if(!this.isInitialized)throw Error("Torus is not initialized");let i=getWindowId();this.communicationProvider._handleWindow(i);let s=await this.communicationProvider.request({method:N.TOPUP,params:{provider:t,params:n,windowId:i}});return s}async getAccounts(){let t=await this.provider.request({method:"getAccounts",params:[]});return t}async sendTransaction(t){let n=isLegacyTransactionInstance(t),i=n?t.serialize({requireAllSignatures:!1}).toString("hex"):H.from(t.serialize()).toString("hex"),s=await this.provider.request({method:"send_transaction",params:{message:i,isLegacyTransaction:n}});return s}async signAndSendTransaction(t,n){let i=isLegacyTransactionInstance(t),s=i?t.serialize({requireAllSignatures:!1}).toString("hex"):H.from(t.serialize()).toString("hex"),p=await this.provider.request({method:"send_transaction",params:{message:s,options:n,isLegacyTransaction:i}});return{signature:p}}async signTransaction(t){let n=isLegacyTransactionInstance(t),i=n?t.serializeMessage().toString("hex"):H.from(t.message.serialize()).toString("hex"),s=await this.provider.request({method:"sign_transaction",params:{message:i,messageOnly:!0,isLegacyTransaction:n}}),p=JSON.parse(s),b={publicKey:new g.PublicKey(p.publicKey),signature:H.from(p.signature,"hex")};return t.addSignature(b.publicKey,b.signature),t}async signAllTransactions(t){let n;let i=t.map(t=>(n=isLegacyTransactionInstance(t))?t.serializeMessage().toString("hex"):H.from(t.message.serialize()).toString("hex")),s=await this.provider.request({method:"sign_all_transactions",params:{message:i,messageOnly:!0,isLegacyTransaction:n}}),p=s.map(t=>{let n=JSON.parse(t);return{publicKey:new g.PublicKey(n.publicKey),signature:H.from(n.signature,"hex")}});return t.forEach((t,n)=>(t.addSignature(p[n].publicKey,p[n].signature),t)),t}async signMessage(t){let n=await this.provider.request({method:"sign_message",params:{data:t}});return n}async getGaslessPublicKey(){let t=await this.provider.request({method:"get_gasless_public_key",params:[]});return t}handleDappStorageKey(t){let n=`${K.localStorageKeyPrefix}${window.location.hostname}`,i="";if(ei&&t){let t=window.localStorage.getItem(n);if(t)i=t;else{let t=`torus-app-${getWindowId()}`;window.localStorage.setItem(n,t),i=t}}return this.dappStorageKey=i,i}async _setupWeb3(t){Y.info("setupWeb3 running");let n=new openloginJrpc_esm_BasePostMessageStream({name:"embed_torus",target:"iframe_torus",targetWindow:this.torusIframe.contentWindow}),i=new openloginJrpc_esm_BasePostMessageStream({name:"embed_communication",target:"iframe_communication",targetWindow:this.torusIframe.contentWindow}),s=new TorusInPageProvider(n,{}),p=new TorusCommunicationProvider(i,{});s.tryWindowHandle=(t,n)=>{if(!Array.isArray(t)&&er.includes(t.method)){if(!this.communicationProvider.isLoggedIn)throw Error("User Not Logged In");let n=getWindowId();p._handleWindow(n,{target:"_blank",features:solanaEmbed_esm_getPopupFeatures(et)}),t.windowId=n}s._rpcEngine.handle(t,n)},p.tryWindowHandle=(t,n)=>{if(!Array.isArray(t)&&en.includes(t.method)){let n=getWindowId();p._handleWindow(n,{target:"_blank",features:solanaEmbed_esm_getPopupFeatures(X)}),t.params.windowId=n}p._rpcEngine.handle(t,n)};let detectAccountRequestPrototypeModifier=t=>{let n=s[t],i=this;s[t]=function(t,s){let{method:p,params:b=[]}=t;if("solana_requestAccounts"===p){if(!s)return i.login({loginProvider:b[0]});i.login({loginProvider:b[0]}).then(t=>s(null,t)).catch(t=>s(t))}return n.apply(this,[t,s])}};detectAccountRequestPrototypeModifier("request"),detectAccountRequestPrototypeModifier("sendAsync"),detectAccountRequestPrototypeModifier("send");let b=new Proxy(s,{deleteProperty:()=>!0}),g=new Proxy(p,{deleteProperty:()=>!0});this.provider=b,this.communicationProvider=g,await Promise.all([s._initializeState(),p._initializeState(solanaEmbed_esm_objectSpread(solanaEmbed_esm_objectSpread({},t),{},{dappStorageKey:this.dappStorageKey,torusAlertContainer:this.torusAlertContainer,torusIframe:this.torusIframe}))]),Y.debug("Torus - injected provider")}}},28599:function(t){"use strict";let{AbortController:n,AbortSignal:i}="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0;
10t.exports=n,t.exports.AbortSignal=i,t.exports.default=n},69282:function(t,n,i){"use strict";var s,p,b=i(34155);function _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function _defineProperties(t,n){for(var i=0;i<n.length;i++){var s=n[i];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(t,_toPropertyKey(s.key),s)}}function _createClass(t,n,i){return n&&_defineProperties(t.prototype,n),i&&_defineProperties(t,i),Object.defineProperty(t,"prototype",{writable:!1}),t}function _toPropertyKey(t){var n=_toPrimitive(t,"string");return"symbol"===_typeof(n)?n:String(n)}function _toPrimitive(t,n){if("object"!==_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var s=i.call(t,n||"default");if("object"!==_typeof(s))return s;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(t)}function _classCallCheck(t,n){if(!(t instanceof n))throw TypeError("Cannot call a class as a function")}var g=i(62136).codes,y=g.ERR_AMBIGUOUS_ARGUMENT,m=g.ERR_INVALID_ARG_TYPE,_=g.ERR_INVALID_ARG_VALUE,v=g.ERR_INVALID_RETURN_VALUE,w=g.ERR_MISSING_ARGS,S=i(25961),R=i(89539).inspect,T=i(89539).types,x=T.isPromise,A=T.isRegExp,k=i(38399)(),O=i(75624)(),P=i(21924)("RegExp.prototype.test");function lazyLoadComparison(){var t=i(19158);s=t.isDeepEqual,p=t.isDeepStrictEqual}var C=!1,I=t.exports=ok,L={};function innerFail(t){if(t.message instanceof Error)throw t.message;throw new S(t)}function fail(t,n,i,s,p){var g,y=arguments.length;if(0===y?g="Failed":1===y?(i=t,t=void 0):(!1===C&&(C=!0,(b.emitWarning?b.emitWarning:console.warn.bind(console))("assert.fail() with more than one argument is deprecated. Please use assert.strictEqual() instead or only pass a message.","DeprecationWarning","DEP0094")),2===y&&(s="!=")),i instanceof Error)throw i;var m={actual:t,expected:n,operator:void 0===s?"fail":s,stackStartFn:p||fail};void 0!==i&&(m.message=i);var _=new S(m);throw g&&(_.message=g,_.generatedMessage=!0),_}function innerOk(t,n,i,s){if(!i){var p=!1;if(0===n)p=!0,s="No value argument passed to `assert.ok()`";else if(s instanceof Error)throw s;var b=new S({actual:i,expected:!0,message:s,operator:"==",stackStartFn:t});throw b.generatedMessage=p,b}}function ok(){for(var t=arguments.length,n=Array(t),i=0;i<t;i++)n[i]=arguments[i];innerOk.apply(void 0,[ok,n.length].concat(n))}function notDeepStrictEqual(t,n,i){if(arguments.length<2)throw new w("actual","expected");void 0===s&&lazyLoadComparison(),p(t,n)&&innerFail({actual:t,expected:n,message:i,operator:"notDeepStrictEqual",stackStartFn:notDeepStrictEqual})}I.fail=fail,I.AssertionError=S,I.ok=ok,I.equal=function equal(t,n,i){if(arguments.length<2)throw new w("actual","expected");t!=n&&innerFail({actual:t,expected:n,message:i,operator:"==",stackStartFn:equal})},I.notEqual=function notEqual(t,n,i){if(arguments.length<2)throw new w("actual","expected");t==n&&innerFail({actual:t,expected:n,message:i,operator:"!=",stackStartFn:notEqual})},I.deepEqual=function deepEqual(t,n,i){if(arguments.length<2)throw new w("actual","expected");void 0===s&&lazyLoadComparison(),s(t,n)||innerFail({actual:t,expected:n,message:i,operator:"deepEqual",stackStartFn:deepEqual})},I.notDeepEqual=function notDeepEqual(t,n,i){if(arguments.length<2)throw new w("actual","expected");void 0===s&&lazyLoadComparison(),s(t,n)&&innerFail({actual:t,expected:n,message:i,operator:"notDeepEqual",stackStartFn:notDeepEqual})},I.deepStrictEqual=function deepStrictEqual(t,n,i){if(arguments.length<2)throw new w("actual","expected");void 0===s&&lazyLoadComparison(),p(t,n)||innerFail({actual:t,expected:n,message:i,operator:"deepStrictEqual",stackStartFn:deepStrictEqual})},I.notDeepStrictEqual=notDeepStrictEqual,I.strictEqual=function strictEqual(t,n,i){if(arguments.length<2)throw new w("actual","expected");O(t,n)||innerFail({actual:t,expected:n,message:i,operator:"strictEqual",stackStartFn:strictEqual})}
vendor: 4,974 bytes, line 10
10,I.notStrictEqual=function notStrictEqual(t,n,i){if(arguments.length<2)throw new w("actual","expected");O(t,n)&&innerFail({actual:t,expected:n,message:i,operator:"notStrictEqual",stackStartFn:notStrictEqual})};var N=_createClass(function Comparison(t,n,i){var s=this;_classCallCheck(this,Comparison),n.forEach(function(n){n in t&&(void 0!==i&&"string"==typeof i[n]&&A(t[n])&&P(t[n],i[n])?s[n]=i[n]:s[n]=t[n])})});function compareExceptionKey(t,n,i,s,b,g){if(!(i in t)||!p(t[i],n[i])){if(!s){var y=new S({actual:new N(t,b),expected:new N(n,b,t),operator:"deepStrictEqual",stackStartFn:g});throw y.actual=t,y.expected=n,y.operator=g.name,y}innerFail({actual:t,expected:n,message:s,operator:g.name,stackStartFn:g})}}function expectedException(t,n,i,p){if("function"!=typeof n){if(A(n))return P(n,t);if(2==arguments.length)throw new m("expected",["Function","RegExp"],n);if("object"!==_typeof(t)||null===t){var b=new S({actual:t,expected:n,message:i,operator:"deepStrictEqual",stackStartFn:p});throw b.operator=p.name,b}var g=Object.keys(n);if(n instanceof Error)g.push("name","message");else if(0===g.length)throw new _("error",n,"may not be an empty object");return void 0===s&&lazyLoadComparison(),g.forEach(function(s){"string"==typeof t[s]&&A(n[s])&&P(n[s],t[s])||compareExceptionKey(t,n,s,i,g,p)}),!0}return void 0!==n.prototype&&t instanceof n||!Error.isPrototypeOf(n)&&!0===n.call({},t)}function getActual(t){if("function"!=typeof t)throw new m("fn","Function",t);try{t()}catch(t){return t}return L}function checkIsPromise(t){return x(t)||null!==t&&"object"===_typeof(t)&&"function"==typeof t.then&&"function"==typeof t.catch}function waitForActual(t){return Promise.resolve().then(function(){var n;if("function"==typeof t){if(!checkIsPromise(n=t()))throw new v("instance of Promise","promiseFn",n)}else if(checkIsPromise(t))n=t;else throw new m("promiseFn",["Function","Promise"],t);return Promise.resolve().then(function(){return n}).then(function(){return L}).catch(function(t){return t})})}function expectsError(t,n,i,s){if("string"==typeof i){if(4==arguments.length)throw new m("error",["Object","Error","Function","RegExp"],i);if("object"===_typeof(n)&&null!==n){if(n.message===i)throw new y("error/message",'The error message "'.concat(n.message,'" is identical to the message.'))}else if(n===i)throw new y("error/message",'The error "'.concat(n,'" is identical to the message.'));s=i,i=void 0}else if(null!=i&&"object"!==_typeof(i)&&"function"!=typeof i)throw new m("error",["Object","Error","Function","RegExp"],i);if(n===L){var p="";i&&i.name&&(p+=" (".concat(i.name,")")),p+=s?": ".concat(s):".";var b="rejects"===t.name?"rejection":"exception";innerFail({actual:void 0,expected:i,operator:t.name,message:"Missing expected ".concat(b).concat(p),stackStartFn:t})}if(i&&!expectedException(n,i,s,t))throw n}function expectsNoError(t,n,i,s){if(n!==L){if("string"==typeof i&&(s=i,i=void 0),!i||expectedException(n,i)){var p=s?": ".concat(s):".",b="doesNotReject"===t.name?"rejection":"exception";innerFail({actual:n,expected:i,operator:t.name,message:"Got unwanted ".concat(b).concat(p,"\n")+'Actual message: "'.concat(n&&n.message,'"'),stackStartFn:t})}throw n}}function internalMatch(t,n,i,s,p){if(!A(n))throw new m("regexp","RegExp",n);var b="match"===p;if("string"!=typeof t||P(n,t)!==b){if(i instanceof Error)throw i;var g=!i;i=i||("string"!=typeof t?'The "string" argument must be of type string. Received type '+"".concat(_typeof(t)," (").concat(R(t),")"):(b?"The input did not match the regular expression ":"The input was expected to not match the regular expression ")+"".concat(R(n),". Input:\n\n").concat(R(t),"\n"));var y=new S({actual:t,expected:n,message:i,operator:p,stackStartFn:s});throw y.generatedMessage=g,y}}function strict(){for(var t=arguments.length,n=Array(t),i=0;i<t;i++)n[i]=arguments[i];innerOk.apply(void 0,[strict,n.length].concat(n))}I.throws=function throws(t){for(var n=arguments.length,i=Array(n>1?n-1:0),s=1;s<n;s++)i[s-1]=arguments[s];expectsError.apply(void 0,[throws,getActual(t)].concat(i))},I.rejects=function rejects(t){for(var n=arguments.length,i=Array(n>1?n-1:0),s=1;s<n;s++)i[s-1]=arguments[s];return waitForActual(t).then(function(t){return expectsError.apply(void 0,[rejects,t].concat(i))})},I.doesNotThrow=function doesNotThrow(t){for(var n=arguments.length,i=Array(n>1?n-1:0),s=1;s<n;s++)i[s-1]=arguments[s];expectsNoError.apply(void 0,[doesNotThrow,getActual(t)].concat(i))},I.doesNotReject=function doesNotReject(t){for(var n=arguments.length,i=Array(n>1?n-1:0),s=1;s<n;s++)i[s-1]=arguments[s];return waitForActual(t).then(function(t){return expectsNoError.apply(void 0,[doesNotReject,t].concat(i))})},I.ifError=function ifError(t){if(null!=t){var n="ifError got unwanted exception: ";"object"===_typeof(t)&&"string"==typeof t.message?0===t.message.length&&t.constructor?n+=t.constructor.name:n+=t.message:n+=R(t);var i=new S({actual:t,expected:null,operator:"ifError",message:n,stackStartFn:ifError}),s=t.stack;
10if("string"==typeof s){var p=s.split("\n");p.shift();for(var b=i.stack.split("\n"),g=0;g<p.length;g++){var y=b.indexOf(p[g]);if(-1!==y){b=b.slice(0,y);break}}i.stack="".concat(b.join("\n"),"\n").concat(p.join("\n"))}throw i}},I.match=function match(t,n,i){internalMatch(t,n,i,match,"match")},I.doesNotMatch=function doesNotMatch(t,n,i){internalMatch(t,n,i,doesNotMatch,"doesNotMatch")},I.strict=k(strict,I,{equal:I.strictEqual,deepEqual:I.deepStrictEqual,notEqual:I.notStrictEqual,notDeepEqual:I.notDeepStrictEqual}),I.strict.strict=I.strict},25961:function(t,n,i){"use strict";var s=i(34155);function ownKeys(t,n){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);n&&(s=s.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),i.push.apply(i,s)}return i}function _objectSpread(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?ownKeys(Object(i),!0).forEach(function(n){_defineProperty(t,n,i[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):ownKeys(Object(i)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(i,n))})}return t}function _defineProperty(t,n,i){return(n=_toPropertyKey(n))in t?Object.defineProperty(t,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[n]=i,t}function _classCallCheck(t,n){if(!(t instanceof n))throw TypeError("Cannot call a class as a function")}function _defineProperties(t,n){for(var i=0;i<n.length;i++){var s=n[i];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(t,_toPropertyKey(s.key),s)}}function _createClass(t,n,i){return n&&_defineProperties(t.prototype,n),i&&_defineProperties(t,i),Object.defineProperty(t,"prototype",{writable:!1}),t}function _toPropertyKey(t){var n=_toPrimitive(t,"string");return"symbol"===_typeof(n)?n:String(n)}function _toPrimitive(t,n){if("object"!==_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var s=i.call(t,n||"default");if("object"!==_typeof(s))return s;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(t)}function _inherits(t,n){if("function"!=typeof n&&null!==n)throw TypeError("Super expression must either be null or a function");t.prototype=Object.create(n&&n.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),n&&_setPrototypeOf(t,n)}function _createSuper(t){var n=_isNativeReflectConstruct();return function(){var i,s=_getPrototypeOf(t);if(n){var p=_getPrototypeOf(this).constructor;i=Reflect.construct(s,arguments,p)}else i=s.apply(this,arguments);return _possibleConstructorReturn(this,i)}}function _possibleConstructorReturn(t,n){if(n&&("object"===_typeof(n)||"function"==typeof n))return n;if(void 0!==n)throw TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(t)}function _assertThisInitialized(t){if(void 0===t)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function _wrapNativeSuper(t){var n="function"==typeof Map?new Map:void 0;return(_wrapNativeSuper=function(t){if(null===t||!_isNativeFunction(t))return t;if("function"!=typeof t)throw TypeError("Super expression must either be null or a function");if(void 0!==n){if(n.has(t))return n.get(t);n.set(t,Wrapper)}function Wrapper(){return _construct(t,arguments,_getPrototypeOf(this).constructor)}return Wrapper.prototype=Object.create(t.prototype,{constructor:{value:Wrapper,enumerable:!1,writable:!0,configurable:!0}}),_setPrototypeOf(Wrapper,t)})(t)}function _construct(t,n,i){return(_construct=_isNativeReflectConstruct()?Reflect.construct.bind():function(t,n,i){var s=[null];s.push.apply(s,n);var p=new(Function.bind.apply(t,s));return i&&_setPrototypeOf(p,i.prototype),p}).apply(null,arguments)}function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}function _isNativeFunction(t){return -1!==Function.toString.call(t).indexOf("[native code]")}function _setPrototypeOf(t,n){return(_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,n){return t.__proto__=n,t})(t,n)}function _getPrototypeOf(t){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var p=i(89539).inspect,b=i(62136).codes.ERR_INVALID_ARG_TYPE;function endsWith(t,n,i){return(void 0===i||i>t.length)&&(i=t.length),t.substring(i-n.length,i)===n}function repeat(t,n){if(n=Math.floor(n),0==t.length||0==n)return"";var i=t.length*n;for(n=Math.floor(Math.log(n)/Math.log(2));n;)t+=t,n--;return t+t.substring(0,i-t.length)}var g="",y="",m="",_="",v={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"};function copyError(t){var n=Object.keys(t),i=Object.create(Object.getPrototypeOf(t));
10return n.forEach(function(n){i[n]=t[n]}),Object.defineProperty(i,"message",{value:t.message}),i}function inspectValue(t){return p(t,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function createErrDiff(t,n,i){var p="",b="",w=0,S="",R=!1,T=inspectValue(t),x=T.split("\n"),A=inspectValue(n).split("\n"),k=0,O="";if("strictEqual"===i&&"object"===_typeof(t)&&"object"===_typeof(n)&&null!==t&&null!==n&&(i="strictEqualObject"),1===x.length&&1===A.length&&x[0]!==A[0]){var P=x[0].length+A[0].length;if(P<=10){if(("object"!==_typeof(t)||null===t)&&("object"!==_typeof(n)||null===n)&&(0!==t||0!==n))return"".concat(v[i],"\n\n")+"".concat(x[0]," !== ").concat(A[0],"\n")}else if("strictEqualObject"!==i&&P<(s.stderr&&s.stderr.isTTY?s.stderr.columns:80)){for(;x[0][k]===A[0][k];)k++;k>2&&(O="\n ".concat(repeat(" ",k),"^"),k=0)}}for(var C=x[x.length-1],I=A[A.length-1];C===I&&(k++<2?S="\n ".concat(C).concat(S):p=C,x.pop(),A.pop(),0!==x.length&&0!==A.length);)C=x[x.length-1],I=A[A.length-1];var L=Math.max(x.length,A.length);if(0===L){var N=T.split("\n");if(N.length>30)for(N[26]="".concat(g,"...").concat(_);N.length>27;)N.pop();return"".concat(v.notIdentical,"\n\n").concat(N.join("\n"),"\n")}k>3&&(S="\n".concat(g,"...").concat(_).concat(S),R=!0),""!==p&&(S="\n ".concat(p).concat(S),p="");var M=0,B=v[i]+"\n".concat(y,"+ actual").concat(_," ").concat(m,"- expected").concat(_),j=" ".concat(g,"...").concat(_," Lines skipped");for(k=0;k<L;k++){var D=k-w;if(x.length<k+1)D>1&&k>2&&(D>4?(b+="\n".concat(g,"...").concat(_),R=!0):D>3&&(b+="\n ".concat(A[k-2]),M++),b+="\n ".concat(A[k-1]),M++),w=k,p+="\n".concat(m,"-").concat(_," ").concat(A[k]),M++;else if(A.length<k+1)D>1&&k>2&&(D>4?(b+="\n".concat(g,"...").concat(_),R=!0):D>3&&(b+="\n ".concat(x[k-2]),M++),b+="\n ".concat(x[k-1]),M++),w=k,b+="\n".concat(y,"+").concat(_," ").concat(x[k]),M++;else{var F=A[k],W=x[k],q=W!==F&&(!endsWith(W,",")||W.slice(0,-1)!==F);q&&endsWith(F,",")&&F.slice(0,-1)===W&&(q=!1,W+=","),q?(D>1&&k>2&&(D>4?(b+="\n".concat(g,"...").concat(_),R=!0):D>3&&(b+="\n ".concat(x[k-2]),M++),b+="\n ".concat(x[k-1]),M++),w=k,b+="\n".concat(y,"+").concat(_," ").concat(W),p+="\n".concat(m,"-").concat(_," ").concat(F),M+=2):(b+=p,p="",(1===D||0===k)&&(b+="\n ".concat(W),M++))}if(M>20&&k<L-2)return"".concat(B).concat(j,"\n").concat(b,"\n").concat(g,"...").concat(_).concat(p,"\n")+"".concat(g,"...").concat(_)}return"".concat(B).concat(R?j:"","\n").concat(b).concat(p).concat(S).concat(O)}var w=function(t,n){_inherits(AssertionError,t);var i=_createSuper(AssertionError);function AssertionError(t){if(_classCallCheck(this,AssertionError),"object"!==_typeof(t)||null===t)throw new b("options","Object",t);var n,p=t.message,w=t.operator,S=t.stackStartFn,R=t.actual,T=t.expected,x=Error.stackTraceLimit;if(Error.stackTraceLimit=0,null!=p)n=i.call(this,String(p));else if(s.stderr&&s.stderr.isTTY&&(s.stderr&&s.stderr.getColorDepth&&1!==s.stderr.getColorDepth()?(g="\x1b[34m",y="\x1b[32m",_="\x1b[39m",m="\x1b[31m"):(g="",y="",_="",m="")),"object"===_typeof(R)&&null!==R&&"object"===_typeof(T)&&null!==T&&"stack"in R&&R instanceof Error&&"stack"in T&&T instanceof Error&&(R=copyError(R),T=copyError(T)),"deepStrictEqual"===w||"strictEqual"===w)n=i.call(this,createErrDiff(R,T,w));else if("notDeepStrictEqual"===w||"notStrictEqual"===w){var A=v[w],k=inspectValue(R).split("\n");if("notStrictEqual"===w&&"object"===_typeof(R)&&null!==R&&(A=v.notStrictEqualObject),k.length>30)for(k[26]="".concat(g,"...").concat(_);k.length>27;)k.pop();n=1===k.length?i.call(this,"".concat(A," ").concat(k[0])):i.call(this,"".concat(A,"\n\n").concat(k.join("\n"),"\n"))}else{var O=inspectValue(R),P="",C=v[w];"notDeepEqual"===w||"notEqual"===w?(O="".concat(v[w],"\n\n").concat(O)).length>1024&&(O="".concat(O.slice(0,1021),"...")):(P="".concat(inspectValue(T)),O.length>512&&(O="".concat(O.slice(0,509),"...")),P.length>512&&(P="".concat(P.slice(0,509),"...")),"deepEqual"===w||"equal"===w?O="".concat(C,"\n\n").concat(O,"\n\nshould equal\n\n"):P=" ".concat(w," ").concat(P)),n=i.call(this,"".concat(O).concat(P))}return Error.stackTraceLimit=x,n.generatedMessage=!p,Object.defineProperty(_assertThisInitialized(n),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),n.code="ERR_ASSERTION",n.actual=R,n.expected=T,n.operator=w,Error.captureStackTrace&&Error.captureStackTrace(_assertThisInitialized(n),S),n.stack,n.name="AssertionError",_possibleConstructorReturn(n)}return _createClass(AssertionError,[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:n,value:function(t,n){return p(this,_objectSpread(_objectSpread({},n),{},{customInspect:!1,depth:0}))}}]),AssertionError}(_wrapNativeSuper(Error),p.custom);t.exports=w},62136:function(t,n,i){"use strict";function _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function _defineProperties(t,n){for(var i=0;i<n.length;i++){var s=n[i];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(t,_toPropertyKey(s.key),s)}}function _createClass(t,n,i){return n&&_defineProperties(t.prototype,n),i&&_defineProperties(t,i),Object.defineProperty(t,"prototype",{writable:!1}),t}function _toPropertyKey(t){var n=_toPrimitive(t,"string");return"symbol"===_typeof(n)?n:String(n)}function _toPrimitive(t,n){if("object"!==_typeof(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var s=i.call(t,n||"default");if("object"!==_typeof(s))return s;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(t)}function _classCallCheck(t,n){if(!(t instanceof n))throw TypeError("Cannot call a class as a function")}function _inherits(t,n){if("function"!=typeof n&&null!==n)throw TypeError("Super expression must either be null or a function");t.prototype=Object.create(n&&n.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),n&&_setPrototypeOf(t,n)}function _setPrototypeOf(t,n){return(_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,n){return t.__proto__=n,t})(t,n)}function _createSuper(t){var n=_isNativeReflectConstruct();return function(){var i,s=_getPrototypeOf(t);if(n){var p=_getPrototypeOf(this).constructor;i=Reflect.construct(s,arguments,p)}else i=s.apply(this,arguments);return _possibleConstructorReturn(this,i)}}function _possibleConstructorReturn(t,n){if(n&&("object"===_typeof(n)||"function"==typeof n))return n;if(void 0!==n)throw TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(t)}function _assertThisInitialized(t){if(void 0===t)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}function _getPrototypeOf(t){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var s,p,b={};
10function createErrorType(t,n,i){function getMessage(t,i,s){return"string"==typeof n?n:n(t,i,s)}i||(i=Error);var s=function(n){_inherits(NodeError,n);var i=_createSuper(NodeError);function NodeError(n,s,p){var b;return _classCallCheck(this,NodeError),(b=i.call(this,getMessage(n,s,p))).code=t,b}return _createClass(NodeError)}(i);b[t]=s}function oneOf(t,n){if(!Array.isArray(t))return"of ".concat(n," ").concat(String(t));var i=t.length;return(t=t.map(function(t){return String(t)}),i>2)?"one of ".concat(n," ").concat(t.slice(0,i-1).join(", "),", or ")+t[i-1]:2===i?"one of ".concat(n," ").concat(t[0]," or ").concat(t[1]):"of ".concat(n," ").concat(t[0])}function startsWith(t,n,i){return t.substr(!i||i<0?0:+i,n.length)===n}function endsWith(t,n,i){return(void 0===i||i>t.length)&&(i=t.length),t.substring(i-n.length,i)===n}function includes(t,n,i){return"number"!=typeof i&&(i=0),!(i+n.length>t.length)&&-1!==t.indexOf(n,i)}createErrorType("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),createErrorType("ERR_INVALID_ARG_TYPE",function(t,n,p){if(void 0===s&&(s=i(69282)),s("string"==typeof t,"'name' must be a string"),"string"==typeof n&&startsWith(n,"not ")?(b="must not be",n=n.replace(/^not /,"")):b="must be",endsWith(t," argument"))g="The ".concat(t," ").concat(b," ").concat(oneOf(n,"type"));else{var b,g,y=includes(t,".")?"property":"argument";g='The "'.concat(t,'" ').concat(y," ").concat(b," ").concat(oneOf(n,"type"))}return g+". Received type ".concat(_typeof(p))},TypeError),createErrorType("ERR_INVALID_ARG_VALUE",function(t,n){var s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"is invalid";void 0===p&&(p=i(89539));var b=p.inspect(n);return b.length>128&&(b="".concat(b.slice(0,128),"...")),"The argument '".concat(t,"' ").concat(s,". Received ").concat(b)},TypeError,RangeError),createErrorType("ERR_INVALID_RETURN_VALUE",function(t,n,i){var s;return s=i&&i.constructor&&i.constructor.name?"instance of ".concat(i.constructor.name):"type ".concat(_typeof(i)),"Expected ".concat(t,' to be returned from the "').concat(n,'"')+" function but got ".concat(s,".")},TypeError),createErrorType("ERR_MISSING_ARGS",function(){for(var t=arguments.length,n=Array(t),p=0;p<t;p++)n[p]=arguments[p];void 0===s&&(s=i(69282)),s(n.length>0,"At least one arg needs to be specified");var b="The ",g=n.length;switch(n=n.map(function(t){return'"'.concat(t,'"')}),g){case 1:b+="".concat(n[0]," argument");break;case 2:b+="".concat(n[0]," and ").concat(n[1]," arguments");break;default:b+=n.slice(0,g-1).join(", ")+", and ".concat(n[g-1]," arguments")}return"".concat(b," must be specified")}
10,TypeError),t.exports.codes=b},19158:function(t,n,i){"use strict";function _slicedToArray(t,n){return _arrayWithHoles(t)||_iterableToArrayLimit(t,n)||_unsupportedIterableToArray(t,n)||_nonIterableRest()}function _nonIterableRest(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(t,n){if(t){if("string"==typeof t)return _arrayLikeToArray(t,n);var i=Object.prototype.toString.call(t).slice(8,-1);if("Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i)return Array.from(t);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return _arrayLikeToArray(t,n)}}function _arrayLikeToArray(t,n){(null==n||n>t.length)&&(n=t.length);for(var i=0,s=Array(n);i<n;i++)s[i]=t[i];return s}function _iterableToArrayLimit(t,n){var i=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=i){var s,p,b,g,y=[],m=!0,_=!1;try{if(b=(i=i.call(t)).next,0===n){if(Object(i)!==i)return;m=!1}else for(;!(m=(s=b.call(i)).done)&&(y.push(s.value),y.length!==n);m=!0);}catch(t){_=!0,p=t}finally{try{if(!m&&null!=i.return&&(g=i.return(),Object(g)!==g))return}finally{if(_)throw p}}return y}}function _arrayWithHoles(t){if(Array.isArray(t))return t}function _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var s=void 0!==/a/g.flags,arrayFromSet=function(t){var n=[];return t.forEach(function(t){return n.push(t)}),n},arrayFromMap=function(t){var n=[];return t.forEach(function(t,i){return n.push([i,t])}),n},p=Object.is?Object.is:i(20609),b=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols:function(){return[]},g=Number.isNaN?Number.isNaN:i(20360);function uncurryThis(t){return t.call.bind(t)}var y=uncurryThis(Object.prototype.hasOwnProperty),m=uncurryThis(Object.prototype.propertyIsEnumerable),_=uncurryThis(Object.prototype.toString),v=i(89539).types,w=v.isAnyArrayBuffer,S=v.isArrayBufferView,R=v.isDate,T=v.isMap,x=v.isRegExp,A=v.isSet,k=v.isNativeError,O=v.isBoxedPrimitive,P=v.isNumberObject,C=v.isStringObject,I=v.isBooleanObject,L=v.isBigIntObject,N=v.isSymbolObject,M=v.isFloat32Array,B=v.isFloat64Array;function isNonIndex(t){if(0===t.length||t.length>10)return!0;for(var n=0;n<t.length;n++){var i=t.charCodeAt(n);if(i<48||i>57)return!0}return 10===t.length&&t>=4294967296}function getOwnNonIndexProperties(t){return Object.keys(t).filter(isNonIndex).concat(b(t).filter(Object.prototype.propertyIsEnumerable.bind(t)))}/*! 11 * The buffer module from node.js, for the browser. 12 * 13 * @author Feross Aboukhadijeh <[email protected]> <http://feross.org> 14 * @license MIT 15 */function compare(t,n){if(t===n)return 0;for(var i=t.length,s=n.length,p=0,b=Math.min(i,s);p<b;++p)if(t[p]!==n[p]){i=t[p],s=n[p];break}return i<s?-1:s<i?1:0}var j=void 0;function areSimilarRegExps(t,n){return s?t.source===n.source&&t.flags===n.flags:RegExp.prototype.toString.call(t)===RegExp.prototype.toString.call(n)}function areSimilarFloatArrays(t,n){if(t.byteLength!==n.byteLength)return!1;for(var i=0;i<t.byteLength;i++)if(t[i]!==n[i])return!1;return!0}function areSimilarTypedArrays(t,n){return t.byteLength===n.byteLength&&0===compare(new Uint8Array(t.buffer,t.byteOffset,t.byteLength),new Uint8Array(n.buffer,n.byteOffset,n.byteLength))}function areEqualArrayBuffers(t,n){return t.byteLength===n.byteLength&&0===compare(new Uint8Array(t),new Uint8Array(n))}function isEqualBoxedPrimitive(t,n){return P(t)?P(n)&&p(Number.prototype.valueOf.call(t),Number.prototype.valueOf.call(n)):C(t)?C(n)&&String.prototype.valueOf.call(t)===String.prototype.valueOf.call(n):I(t)?I(n)&&Boolean.prototype.valueOf.call(t)===Boolean.prototype.valueOf.call(n):L(t)?L(n)&&BigInt.prototype.valueOf.call(t)===BigInt.prototype.valueOf.call(n):N(n)&&Symbol.prototype.valueOf.call(t)===Symbol.prototype.valueOf.call(n)}function innerDeepEqual(t,n,i,s){if(t===n)return 0!==t||!i||p(t,n);if(i){if("object"!==_typeof(t))return"number"==typeof t&&g(t)&&g(n);if("object"!==_typeof(n)||null===t||null===n||Object.getPrototypeOf(t)!==Object.getPrototypeOf(n))return!1}else{if(null===t||"object"!==_typeof(t))return(null===n||"object"!==_typeof(n))&&t==n;if(null===n||"object"!==_typeof(n))return!1}var b=_(t);if(b!==_(n))return!1;if(Array.isArray(t)){if(t.length!==n.length)return!1;var y=getOwnNonIndexProperties(t,j),m=getOwnNonIndexProperties(n,j);return y.length===m.length&&keyCheck(t,n,i,s,1,y)}if("[object Object]"===b&&(!T(t)&&T(n)||!A(t)&&A(n)))return!1;if(R(t)){if(!R(n)||Date.prototype.getTime.call(t)!==Date.prototype.getTime.call(n))return!1}else if(x(t)){if(!x(n)||!areSimilarRegExps(t,n))return!1}else if(k(t)||t instanceof Error){if(t.message!==n.message||t.name!==n.name)return!1}else if(S(t)){if(!i&&(M(t)||B(t))){if(!areSimilarFloatArrays(t,n))return!1}else if(!areSimilarTypedArrays(t,n))return!1;var v=getOwnNonIndexProperties(t,j),P=getOwnNonIndexProperties(n,j);return v.length===P.length&&keyCheck(t,n,i,s,0,v)}else if(A(t))return!!A(n)&&t.size===n.size&&keyCheck(t,n,i,s,2);else if(T(t))return!!T(n)&&t.size===n.size&&keyCheck(t,n,i,s,3);else if(w(t)){if(!areEqualArrayBuffers(t,n))return!1}else if(O(t)&&!isEqualBoxedPrimitive(t,n))return!1;return keyCheck(t,n,i,s,0)}function getEnumerables(t,n){return n.filter(function(n){return m(t,n)})}function keyCheck(t,n,i,s,p,g){if(5==arguments.length){g=Object.keys(t);var _=Object.keys(n);if(g.length!==_.length)return!1}for(var v=0;v<g.length;v++)if(!y(n,g[v]))return!1;if(i&&5==arguments.length){var w=b(t);if(0!==w.length){var S=0;for(v=0;v<w.length;v++){var R=w[v];if(m(t,R)){if(!m(n,R))return!1;g.push(R),S++}else if(m(n,R))return!1}var T=b(n);if(w.length!==T.length&&getEnumerables(n,T).length!==S)return!1}else{var x=b(n);if(0!==x.length&&0!==getEnumerables(n,x).length)return!1}}if(0===g.length&&(0===p||1===p&&0===t.length||0===t.size))return!0;
15if(void 0===s)s={val1:new Map,val2:new Map,position:0};else{var A=s.val1.get(t);if(void 0!==A){var k=s.val2.get(n);if(void 0!==k)return A===k}s.position++}s.val1.set(t,s.position),s.val2.set(n,s.position);var O=objEquiv(t,n,i,g,s,p);return s.val1.delete(t),s.val2.delete(n),O}function setHasEqualElement(t,n,i,s){for(var p=arrayFromSet(t),b=0;b<p.length;b++){var g=p[b];if(innerDeepEqual(n,g,i,s))return t.delete(g),!0}return!1}function findLooseMatchingPrimitives(t){switch(_typeof(t)){case"undefined":return null;case"object":return;case"symbol":return!1;case"string":t=+t;case"number":if(g(t))return!1}return!0}function setMightHaveLoosePrim(t,n,i){var s=findLooseMatchingPrimitives(i);return null!=s?s:n.has(s)&&!t.has(s)}function mapMightHaveLoosePrim(t,n,i,s,p){var b=findLooseMatchingPrimitives(i);if(null!=b)return b;var g=n.get(b);return!!((void 0!==g||n.has(b))&&innerDeepEqual(s,g,!1,p))&&!t.has(b)&&innerDeepEqual(s,g,!1,p)}function setEquiv(t,n,i,s){for(var p=null,b=arrayFromSet(t),g=0;g<b.length;g++){var y=b[g];if("object"===_typeof(y)&&null!==y)null===p&&(p=new Set),p.add(y);else if(!n.has(y)){if(i||!setMightHaveLoosePrim(t,n,y))return!1;null===p&&(p=new Set),p.add(y)}}if(null!==p){for(var m=arrayFromSet(n),_=0;_<m.length;_++){var v=m[_];if("object"===_typeof(v)&&null!==v){if(!setHasEqualElement(p,v,i,s))return!1}else if(!i&&!t.has(v)&&!setHasEqualElement(p,v,i,s))return!1}return 0===p.size}return!0}function mapHasEqualEntry(t,n,i,s,p,b){for(var g=arrayFromSet(t),y=0;y<g.length;y++){var m=g[y];if(innerDeepEqual(i,m,p,b)&&innerDeepEqual(s,n.get(m),p,b))return t.delete(m),!0}return!1}function mapEquiv(t,n,i,s){for(var p=null,b=arrayFromMap(t),g=0;g<b.length;g++){var y=_slicedToArray(b[g],2),m=y[0],_=y[1];if("object"===_typeof(m)&&null!==m)null===p&&(p=new Set),p.add(m);else{var v=n.get(m);if(void 0===v&&!n.has(m)||!innerDeepEqual(_,v,i,s)){if(i||!mapMightHaveLoosePrim(t,n,m,_,s))return!1;null===p&&(p=new Set),p.add(m)}}}if(null!==p){for(var w=arrayFromMap(n),S=0;S<w.length;S++){var R=_slicedToArray(w[S],2),T=R[0],x=R[1];if("object"===_typeof(T)&&null!==T){if(!mapHasEqualEntry(p,t,T,x,i,s))return!1}else if(!i&&(!t.has(T)||!innerDeepEqual(t.get(T),x,!1,s))&&!mapHasEqualEntry(p,t,T,x,!1,s))return!1}return 0===p.size}return!0}function objEquiv(t,n,i,s,p,b){var g=0;if(2===b){if(!setEquiv(t,n,i,p))return!1}else if(3===b){if(!mapEquiv(t,n,i,p))return!1}else if(1===b)for(;g<t.length;g++)if(y(t,g)){if(!y(n,g)||!innerDeepEqual(t[g],n[g],i,p))return!1}else{if(y(n,g))return!1;for(var m=Object.keys(t);g<m.length;g++){var _=m[g];if(!y(n,_)||!innerDeepEqual(t[_],n[_],i,p))return!1}if(m.length!==Object.keys(n).length)return!1;return!0}for(g=0;g<s.length;g++){var v=s[g];if(!innerDeepEqual(t[v],n[v],i,p))return!1}return!0}function isDeepEqual(t,n){return innerDeepEqual(t,n,!1)}function isDeepStrictEqual(t,n){return innerDeepEqual(t,n,!0)}t.exports={isDeepEqual:isDeepEqual,isDeepStrictEqual:isDeepStrictEqual}},82240:function(t,n,i){"use strict";var s=i(48764).Buffer,p=i(31518);function encode(t,n){return(void 0===n&&(n="utf8"),s.isBuffer(t))?fromBase64(t.toString("base64")):fromBase64(s.from(t,n).toString("base64"))}function decode(t,n){return void 0===n&&(n="utf8"),s.from(toBase64(t),"base64").toString(n)}function toBase64(t){return t=t.toString(),p.default(t).replace(/\-/g,"+").replace(/_/g,"/")}function fromBase64(t){return t.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function toBuffer(t){return s.from(toBase64(t),"base64")}var b=encode;b.encode=encode,b.decode=decode,b.toBase64=toBase64,b.fromBase64=fromBase64,b.toBuffer=toBuffer,n.default=b},31518:function(t,n,i){"use strict";var s=i(48764).Buffer;function padString(t){var n=t.length,i=n%4;if(!i)return t;var p=n,b=4-i,g=n+b,y=s.alloc(g);for(y.write(t);b--;)y.write("=",p++);return y.toString()}Object.defineProperty(n,"__esModule",{value:!0}),n.default=padString},45772:function(t,n,i){t.exports=i(82240).default,t.exports.default=t.exports},51206:function(t){t.exports=function(t){var n={};function r(i){if(n[i])return n[i].exports;var s=n[i]={i:i,l:!1,exports:{}};return t[i].call(s.exports,s,s.exports,r),s.l=!0,s.exports}return r.m=t,r.c=n,r.d=function(t,n,i){r.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:i})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}
15),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,n){if(1&n&&(t=r(t)),8&n||4&n&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(r.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var s in t)r.d(i,s,(function(n){return t[n]}).bind(null,s));return i},r.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(n,"a",n),n},r.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},r.p="",r(r.s=90)}({17:function(t,n,i){"use strict";n.__esModule=!0,n.default=void 0;var s=i(18),p=function(){function e(){}return e.getFirstMatch=function(t,n){var i=n.match(t);return i&&i.length>0&&i[1]||""},e.getSecondMatch=function(t,n){var i=n.match(t);return i&&i.length>1&&i[2]||""},e.matchAndReturnConst=function(t,n,i){if(t.test(n))return i},e.getWindowsVersionName=function(t){switch(t){case"NT":return"NT";case"XP":case"NT 5.1":return"XP";case"NT 5.0":return"2000";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}},e.getMacOSVersionName=function(t){var n=t.split(".").splice(0,2).map(function(t){return parseInt(t,10)||0});if(n.push(0),10===n[0])switch(n[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}},e.getAndroidVersionName=function(t){var n=t.split(".").splice(0,2).map(function(t){return parseInt(t,10)||0});if(n.push(0),!(1===n[0]&&n[1]<5))return 1===n[0]&&n[1]<6?"Cupcake":1===n[0]&&n[1]>=6?"Donut":2===n[0]&&n[1]<2?"Eclair":2===n[0]&&2===n[1]?"Froyo":2===n[0]&&n[1]>2?"Gingerbread":3===n[0]?"Honeycomb":4===n[0]&&n[1]<1?"Ice Cream Sandwich":4===n[0]&&n[1]<4?"Jelly Bean":4===n[0]&&n[1]>=4?"KitKat":5===n[0]?"Lollipop":6===n[0]?"Marshmallow":7===n[0]?"Nougat":8===n[0]?"Oreo":9===n[0]?"Pie":void 0},e.getVersionPrecision=function(t){return t.split(".").length},e.compareVersions=function(t,n,i){void 0===i&&(i=!1);var s=e.getVersionPrecision(t),p=e.getVersionPrecision(n),b=Math.max(s,p),g=0,y=e.map([t,n],function(t){var n=b-e.getVersionPrecision(t),i=t+Array(n+1).join(".0");return e.map(i.split("."),function(t){return Array(20-t.length).join("0")+t}).reverse()});for(i&&(g=b-Math.min(s,p)),b-=1;b>=g;){if(y[0][b]>y[1][b])return 1;if(y[0][b]===y[1][b]){if(b===g)return 0;b-=1}else if(y[0][b]<y[1][b])return -1}},e.map=function(t,n){var i,s=[];if(Array.prototype.map)return Array.prototype.map.call(t,n);for(i=0;i<t.length;i+=1)s.push(n(t[i]));return s},e.find=function(t,n){var i,s;if(Array.prototype.find)return Array.prototype.find.call(t,n);for(i=0,s=t.length;i<s;i+=1){var p=t[i];if(n(p,i))return p}},e.assign=function(t){for(var n,i,s=arguments.length,p=Array(s>1?s-1:0),b=1;b<s;b++)p[b-1]=arguments[b];if(Object.assign)return Object.assign.apply(Object,[t].concat(p));for(n=0,i=p.length;n<i;n+=1)(function(){var i=p[n];
15"object"==typeof i&&null!==i&&Object.keys(i).forEach(function(n){t[n]=i[n]})})();return t},e.getBrowserAlias=function(t){return s.BROWSER_ALIASES_MAP[t]},e.getBrowserTypeByAlias=function(t){return s.BROWSER_MAP[t]||""},e}();n.default=p,t.exports=n.default},18:function(t,n,i){"use strict";n.__esModule=!0,n.ENGINE_MAP=n.OS_MAP=n.PLATFORMS_MAP=n.BROWSER_MAP=n.BROWSER_ALIASES_MAP=void 0,n.BROWSER_ALIASES_MAP={"Amazon Silk":"amazon_silk","Android Browser":"android",Bada:"bada",BlackBerry:"blackberry",Chrome:"chrome",Chromium:"chromium",Electron:"electron",Epiphany:"epiphany",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot","Internet Explorer":"ie","K-Meleon":"k_meleon",Maxthon:"maxthon","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver",Opera:"opera","Opera Coast":"opera_coast",PhantomJS:"phantomjs",Puffin:"puffin",QupZilla:"qupzilla",QQ:"qq",QQLite:"qqlite",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SeaMonkey:"seamonkey",Sleipnir:"sleipnir",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat","Yandex Browser":"yandex",Roku:"roku"},n.BROWSER_MAP={amazon_silk:"Amazon Silk",android:"Android Browser",bada:"Bada",blackberry:"BlackBerry",chrome:"Chrome",chromium:"Chromium",electron:"Electron",epiphany:"Epiphany",firefox:"Firefox",focus:"Focus",generic:"Generic",googlebot:"Googlebot",google_search:"Google Search",ie:"Internet Explorer",k_meleon:"K-Meleon",maxthon:"Maxthon",edge:"Microsoft Edge",mz:"MZ Browser",naver:"NAVER Whale Browser",opera:"Opera",opera_coast:"Opera Coast",phantomjs:"PhantomJS",puffin:"Puffin",qupzilla:"QupZilla",qq:"QQ Browser",qqlite:"QQ Browser Lite",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",sleipnir:"Sleipnir",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yandex:"Yandex Browser"},n.PLATFORMS_MAP={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv"},n.OS_MAP={WindowsPhone:"Windows Phone",Windows:"Windows",MacOS:"macOS",iOS:"iOS",Android:"Android",WebOS:"WebOS",BlackBerry:"BlackBerry",Bada:"Bada",Tizen:"Tizen",Linux:"Linux",ChromeOS:"Chrome OS",PlayStation4:"PlayStation 4",Roku:"Roku"},n.ENGINE_MAP={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"}},90:function(t,n,i){"use strict";n.__esModule=!0,n.default=void 0;var s,p=(s=i(91))&&s.__esModule?s:{default:s},b=i(18);function a(t,n){for(var i=0;i<n.length;i++){var s=n[i];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(t,s.key,s)}}var g=function(){function e(){}return e.getParser=function(t,n){if(void 0===n&&(n=!1),"string"!=typeof t)throw Error("UserAgent should be a string");return new p.default(t,n)},e.parse=function(t){return new p.default(t).getResult()},a(e,[{key:"BROWSER_MAP",get:function(){return b.BROWSER_MAP}},{key:"ENGINE_MAP",get:function(){return b.ENGINE_MAP}},{key:"OS_MAP",get:function(){return b.OS_MAP}},{key:"PLATFORMS_MAP",get:function(){return b.PLATFORMS_MAP}}]),e}();n.default=g,t.exports=n.default},91:function(t,n,i){"use strict";n.__esModule=!0,n.default=void 0;var s=u(i(92)),p=u(i(93)),b=u(i(94)),g=u(i(95)),y=u(i(17));function u(t){return t&&t.__esModule?t:{default:t}}var m=function(){function e(t,n){if(void 0===n&&(n=!1),null==t||""===t)throw Error("UserAgent parameter can't be empty");this._ua=t,this.parsedResult={},!0!==n&&this.parse()}var t=e.prototype;return t.getUA=function(){return this._ua},t.test=function(t){return t.test(this._ua)},t.parseBrowser=function(){var t=this;this.parsedResult.browser={};var n=y.default.find(s.default,function(n){if("function"==typeof n.test)return n.test(t);if(n.test instanceof Array)return n.test.some(function(n){return t.test(n)});throw Error("Browser's test function is not valid")});return n&&(this.parsedResult.browser=n.describe(this.getUA())),this.parsedResult.browser},t.getBrowser=function(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()},t.getBrowserName=function(t){return t?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""},t.getBrowserVersion=function(){return this.getBrowser().version},t.getOS=function(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()},t.parseOS=function(){var t=this;this.parsedResult.os={};var n=y.default.find(p.default,function(n){if("function"==typeof n.test)return n.test(t);if(n.test instanceof Array)return n.test.some(function(n){return t.test(n)});
vendor: 5,667 bytes, line 15
15throw Error("Browser's test function is not valid")});return n&&(this.parsedResult.os=n.describe(this.getUA())),this.parsedResult.os},t.getOSName=function(t){var n=this.getOS().name;return t?String(n).toLowerCase()||"":n||""},t.getOSVersion=function(){return this.getOS().version},t.getPlatform=function(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()},t.getPlatformType=function(t){void 0===t&&(t=!1);var n=this.getPlatform().type;return t?String(n).toLowerCase()||"":n||""},t.parsePlatform=function(){var t=this;this.parsedResult.platform={};var n=y.default.find(b.default,function(n){if("function"==typeof n.test)return n.test(t);if(n.test instanceof Array)return n.test.some(function(n){return t.test(n)});throw Error("Browser's test function is not valid")});return n&&(this.parsedResult.platform=n.describe(this.getUA())),this.parsedResult.platform},t.getEngine=function(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()},t.getEngineName=function(t){return t?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""},t.parseEngine=function(){var t=this;this.parsedResult.engine={};var n=y.default.find(g.default,function(n){if("function"==typeof n.test)return n.test(t);if(n.test instanceof Array)return n.test.some(function(n){return t.test(n)});throw Error("Browser's test function is not valid")});return n&&(this.parsedResult.engine=n.describe(this.getUA())),this.parsedResult.engine},t.parse=function(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this},t.getResult=function(){return y.default.assign({},this.parsedResult)},t.satisfies=function(t){var n=this,i={},s=0,p={},b=0;if(Object.keys(t).forEach(function(n){var g=t[n];"string"==typeof g?(p[n]=g,b+=1):"object"==typeof g&&(i[n]=g,s+=1)}),s>0){var g=Object.keys(i),m=y.default.find(g,function(t){return n.isOS(t)});if(m){var _=this.satisfies(i[m]);if(void 0!==_)return _}var v=y.default.find(g,function(t){return n.isPlatform(t)});if(v){var w=this.satisfies(i[v]);if(void 0!==w)return w}}if(b>0){var S=Object.keys(p),R=y.default.find(S,function(t){return n.isBrowser(t,!0)});if(void 0!==R)return this.compareVersion(p[R])}},t.isBrowser=function(t,n){void 0===n&&(n=!1);var i=this.getBrowserName().toLowerCase(),s=t.toLowerCase(),p=y.default.getBrowserTypeByAlias(s);return n&&p&&(s=p.toLowerCase()),s===i},t.compareVersion=function(t){var n=[0],i=t,s=!1,p=this.getBrowserVersion();if("string"==typeof p)return">"===t[0]||"<"===t[0]?(i=t.substr(1),"="===t[1]?(s=!0,i=t.substr(2)):n=[],">"===t[0]?n.push(1):n.push(-1)):"="===t[0]?i=t.substr(1):"~"===t[0]&&(s=!0,i=t.substr(1)),n.indexOf(y.default.compareVersions(p,i,s))>-1},t.isOS=function(t){return this.getOSName(!0)===String(t).toLowerCase()},t.isPlatform=function(t){return this.getPlatformType(!0)===String(t).toLowerCase()},t.isEngine=function(t){return this.getEngineName(!0)===String(t).toLowerCase()},t.is=function(t,n){return void 0===n&&(n=!1),this.isBrowser(t,n)||this.isOS(t)||this.isPlatform(t)},t.some=function(t){var n=this;return void 0===t&&(t=[]),t.some(function(t){return n.is(t)})},e}();n.default=m,t.exports=n.default},92:function(t,n,i){"use strict";n.__esModule=!0,n.default=void 0;var s,p=(s=i(17))&&s.__esModule?s:{default:s},b=/version\/(\d+(\.?_?\d+)+)/i,g=[{test:[/googlebot/i],describe:function(t){var n={name:"Googlebot"},i=p.default.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,t)||p.default.getFirstMatch(b,t);return i&&(n.version=i),n}},{test:[/opera/i],describe:function(t){var n={name:"Opera"},i=p.default.getFirstMatch(b,t)||p.default.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,t);return i&&(n.version=i),n}},{test:[/opr\/|opios/i],describe:function(t){var n={name:"Opera"},i=p.default.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,t)||p.default.getFirstMatch(b,t);return i&&(n.version=i),n}},{test:[/SamsungBrowser/i],describe:function(t){var n={name:"Samsung Internet for Android"},i=p.default.getFirstMatch(b,t)||p.default.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,t);return i&&(n.version=i),n}},{test:[/Whale/i],describe:function(t){var n={name:"NAVER Whale Browser"},i=p.default.getFirstMatch(b,t)||p.default.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,t);return i&&(n.version=i),n}},{test:[/MZBrowser/i],describe:function(t){var n={name:"MZ Browser"},i=p.default.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,t)||p.default.getFirstMatch(b,t);return i&&(n.version=i),n}},{test:[/focus/i],describe:function(t){var n={name:"Focus"},i=p.default.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,t)||p.default.getFirstMatch(b,t);return i&&(n.version=i),n}},{test:[/swing/i],describe:function(t){var n={name:"Swing"},i=p.default.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,t)||p.default.getFirstMatch(b,t);return i&&(n.version=i),n}},{test:[/coast/i],describe:function(t){var n={name:"Opera Coast"},i=p.default.getFirstMatch(b,t)||p.default.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,t);return i&&(n.version=i),n}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe:function(t){var n={name:"Opera Touch"},i=p.default.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,t)||p.default.getFirstMatch(b,t);return i&&(n.version=i),n}},{test:[/yabrowser/i],describe:function(t){var n={name:"Yandex Browser"},i=p.default.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,t)||p.default.getFirstMatch(b,t);return i&&(n.version=i),n}},{test:[/ucbrowser/i],describe:function(t){var n={name:"UC Browser"},i=p.default.getFirstMatch(b,t)||p.default.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,t);return i&&(n.version=i),n}},{test:[/Maxthon|mxios/i],describe:function(t){var n={name:"Maxthon"}
vendor: 7,818 bytes, line 15
15,i=p.default.getFirstMatch(b,t)||p.default.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,t);return i&&(n.version=i),n}},{test:[/epiphany/i],describe:function(t){var n={name:"Epiphany"},i=p.default.getFirstMatch(b,t)||p.default.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,t);return i&&(n.version=i),n}},{test:[/puffin/i],describe:function(t){var n={name:"Puffin"},i=p.default.getFirstMatch(b,t)||p.default.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,t);return i&&(n.version=i),n}},{test:[/sleipnir/i],describe:function(t){var n={name:"Sleipnir"},i=p.default.getFirstMatch(b,t)||p.default.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,t);return i&&(n.version=i),n}},{test:[/k-meleon/i],describe:function(t){var n={name:"K-Meleon"},i=p.default.getFirstMatch(b,t)||p.default.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,t);return i&&(n.version=i),n}},{test:[/micromessenger/i],describe:function(t){var n={name:"WeChat"},i=p.default.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,t)||p.default.getFirstMatch(b,t);return i&&(n.version=i),n}},{test:[/qqbrowser/i],describe:function(t){var n={name:/qqbrowserlite/i.test(t)?"QQ Browser Lite":"QQ Browser"},i=p.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,t)||p.default.getFirstMatch(b,t);return i&&(n.version=i),n}},{test:[/msie|trident/i],describe:function(t){var n={name:"Internet Explorer"},i=p.default.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,t);return i&&(n.version=i),n}},{test:[/\sedg\//i],describe:function(t){var n={name:"Microsoft Edge"},i=p.default.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,t);return i&&(n.version=i),n}},{test:[/edg([ea]|ios)/i],describe:function(t){var n={name:"Microsoft Edge"},i=p.default.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,t);return i&&(n.version=i),n}},{test:[/vivaldi/i],describe:function(t){var n={name:"Vivaldi"},i=p.default.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,t);return i&&(n.version=i),n}},{test:[/seamonkey/i],describe:function(t){var n={name:"SeaMonkey"},i=p.default.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,t);return i&&(n.version=i),n}},{test:[/sailfish/i],describe:function(t){var n={name:"Sailfish"},i=p.default.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,t);return i&&(n.version=i),n}},{test:[/silk/i],describe:function(t){var n={name:"Amazon Silk"},i=p.default.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,t);return i&&(n.version=i),n}},{test:[/phantom/i],describe:function(t){var n={name:"PhantomJS"},i=p.default.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,t);return i&&(n.version=i),n}},{test:[/slimerjs/i],describe:function(t){var n={name:"SlimerJS"},i=p.default.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,t);return i&&(n.version=i),n}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(t){var n={name:"BlackBerry"},i=p.default.getFirstMatch(b,t)||p.default.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,t);return i&&(n.version=i),n}},{test:[/(web|hpw)[o0]s/i],describe:function(t){var n={name:"WebOS Browser"},i=p.default.getFirstMatch(b,t)||p.default.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,t);return i&&(n.version=i),n}},{test:[/bada/i],describe:function(t){var n={name:"Bada"},i=p.default.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,t);return i&&(n.version=i),n}},{test:[/tizen/i],describe:function(t){var n={name:"Tizen"},i=p.default.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,t)||p.default.getFirstMatch(b,t);return i&&(n.version=i),n}},{test:[/qupzilla/i],describe:function(t){var n={name:"QupZilla"},i=p.default.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,t)||p.default.getFirstMatch(b,t);return i&&(n.version=i),n}},{test:[/firefox|iceweasel|fxios/i],describe:function(t){var n={name:"Firefox"},i=p.default.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,t);return i&&(n.version=i),n}},{test:[/electron/i],describe:function(t){var n={name:"Electron"},i=p.default.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,t);return i&&(n.version=i),n}},{test:[/MiuiBrowser/i],describe:function(t){var n={name:"Miui"},i=p.default.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,t);return i&&(n.version=i),n}},{test:[/chromium/i],describe:function(t){var n={name:"Chromium"},i=p.default.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,t)||p.default.getFirstMatch(b,t);return i&&(n.version=i),n}},{test:[/chrome|crios|crmo/i],describe:function(t){var n={name:"Chrome"},i=p.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,t);return i&&(n.version=i),n}},{test:[/GSA/i],describe:function(t){var n={name:"Google Search"},i=p.default.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,t);return i&&(n.version=i),n}},{test:function(t){var n=!t.test(/like android/i),i=t.test(/android/i);return n&&i},describe:function(t){var n={name:"Android Browser"},i=p.default.getFirstMatch(b,t);return i&&(n.version=i),n}},{test:[/playstation 4/i],describe:function(t){var n={name:"PlayStation 4"},i=p.default.getFirstMatch(b,t);return i&&(n.version=i),n}},{test:[/safari|applewebkit/i],describe:function(t){var n={name:"Safari"},i=p.default.getFirstMatch(b,t);return i&&(n.version=i),n}},{test:[/.*/i],describe:function(t){var n=-1!==t.search("\\(")?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:p.default.getFirstMatch(n,t),version:p.default.getSecondMatch(n,t)}}}];n.default=g,t.exports=n.default},93:function(t,n,i){"use strict";n.__esModule=!0,n.default=void 0;var s,p=(s=i(17))&&s.__esModule?s:{default:s},b=i(18),g=[{test:[/Roku\/DVP/],describe:function(t){var n=p.default.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,t);return{name:b.OS_MAP.Roku,version:n}}},{test:[/windows phone/i],describe:function(t){var n=p.default.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,t);return{name:b.OS_MAP.WindowsPhone,version:n}}},{test:[/windows /i],describe:function(t){var n=p.default.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,t),i=p.default.getWindowsVersionName(n);return{name:b.OS_MAP.Windows,version:n,versionName:i}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(t){var n={name:b.OS_MAP.iOS},i=p.default.getSecondMatch(/(Version\/)(\d[\d.]+)/,t);return i&&(n.version=i),n}},{test:[/macintosh/i],describe:function(t){var n=p.default.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,t).replace(/[_\s]/g,"."),i=p.default.getMacOSVersionName(n),s={name:b.OS_MAP.MacOS,version:n};return i&&(s.versionName=i),s}},{test:[/(ipod|iphone|ipad)/i],describe:function(t){var n=p.default.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,t).replace(/[_\s]/g,".");return{name:b.OS_MAP.iOS,version:n}}},{test:function(t){var n=!t.test(/like android/i),i=t.test(/android/i);return n&&i},describe:function(t){var n=p.default.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,t),i=p.default.getAndroidVersionName(n),s={name:b.OS_MAP.Android,version:n};return i&&(s.versionName=i),s}},{test:[/(web|hpw)[o0]s/i],describe:function(t){var n=p.default.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,t),i={name:b.OS_MAP.WebOS};return n&&n.length&&(i.version=n),i}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(t){var n=p.default.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,t)||p.default.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,t)||p.default.getFirstMatch(/\bbb(\d+)/i,t);return{name:b.OS_MAP.BlackBerry,version:n}}},{test:[/bada/i],describe:function(t){var n=p.default.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,t);return{name:b.OS_MAP.Bada,version:n}}},{test:[/tizen/i],describe:function(t){var n=p.default.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,t);return{name:b.OS_MAP.Tizen,version:n}}},{test:[/linux/i],describe:function(){return{name:b.OS_MAP.Linux}}},{test:[/CrOS/],describe:function(){return{name:b.OS_MAP.ChromeOS}}},{test:[/PlayStation 4/],describe:function(t){var n=p.default.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,t);
vendor: 1,884 bytes, line 15
15return{name:b.OS_MAP.PlayStation4,version:n}}}];n.default=g,t.exports=n.default},94:function(t,n,i){"use strict";n.__esModule=!0,n.default=void 0;var s,p=(s=i(17))&&s.__esModule?s:{default:s},b=i(18),g=[{test:[/googlebot/i],describe:function(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe:function(t){var n=p.default.getFirstMatch(/(can-l01)/i,t)&&"Nova",i={type:b.PLATFORMS_MAP.mobile,vendor:"Huawei"};return n&&(i.model=n),i}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:function(){return{type:b.PLATFORMS_MAP.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe:function(){return{type:b.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(){return{type:b.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe:function(){return{type:b.PLATFORMS_MAP.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe:function(){return{type:b.PLATFORMS_MAP.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe:function(){return{type:b.PLATFORMS_MAP.tablet}}},{test:function(t){var n=t.test(/ipod|iphone/i),i=t.test(/like (ipod|iphone)/i);return n&&!i},describe:function(t){var n=p.default.getFirstMatch(/(ipod|iphone)/i,t);return{type:b.PLATFORMS_MAP.mobile,vendor:"Apple",model:n}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:function(){return{type:b.PLATFORMS_MAP.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe:function(){return{type:b.PLATFORMS_MAP.mobile}}},{test:function(t){return"blackberry"===t.getBrowserName(!0)},describe:function(){return{type:b.PLATFORMS_MAP.mobile,vendor:"BlackBerry"}}},{test:function(t){return"bada"===t.getBrowserName(!0)},describe:function(){return{type:b.PLATFORMS_MAP.mobile}}},{test:function(t){return"windows phone"===t.getBrowserName()},describe:function(){return{type:b.PLATFORMS_MAP.mobile,vendor:"Microsoft"}}}
15,{test:function(t){var n=Number(String(t.getOSVersion()).split(".")[0]);return"android"===t.getOSName(!0)&&n>=3},describe:function(){return{type:b.PLATFORMS_MAP.tablet}}},{test:function(t){return"android"===t.getOSName(!0)},describe:function(){return{type:b.PLATFORMS_MAP.mobile}}},{test:function(t){return"macos"===t.getOSName(!0)},describe:function(){return{type:b.PLATFORMS_MAP.desktop,vendor:"Apple"}}},{test:function(t){return"windows"===t.getOSName(!0)},describe:function(){return{type:b.PLATFORMS_MAP.desktop}}},{test:function(t){return"linux"===t.getOSName(!0)},describe:function(){return{type:b.PLATFORMS_MAP.desktop}}},{test:function(t){return"playstation 4"===t.getOSName(!0)},describe:function(){return{type:b.PLATFORMS_MAP.tv}}},{test:function(t){return"roku"===t.getOSName(!0)},describe:function(){return{type:b.PLATFORMS_MAP.tv}}}];n.default=g,t.exports=n.default},95:function(t,n,i){"use strict";n.__esModule=!0,n.default=void 0;var s,p=(s=i(17))&&s.__esModule?s:{default:s},b=i(18),g=[{test:function(t){return"microsoft edge"===t.getBrowserName(!0)},describe:function(t){if(/\sedg\//i.test(t))return{name:b.ENGINE_MAP.Blink};var n=p.default.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,t);return{name:b.ENGINE_MAP.EdgeHTML,version:n}}},{test:[/trident/i],describe:function(t){var n={name:b.ENGINE_MAP.Trident},i=p.default.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,t);return i&&(n.version=i),n}},{test:function(t){return t.test(/presto/i)},describe:function(t){var n={name:b.ENGINE_MAP.Presto},i=p.default.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,t);return i&&(n.version=i),n}},{test:function(t){var n=t.test(/gecko/i),i=t.test(/like gecko/i);return n&&!i},describe:function(t){var n={name:b.ENGINE_MAP.Gecko},i=p.default.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,t);return i&&(n.version=i),n}},{test:[/(apple)?webkit\/537\.36/i],describe:function(){return{name:b.ENGINE_MAP.Blink}}},{test:[/(apple)?webkit/i],describe:function(t){var n={name:b.ENGINE_MAP.WebKit},i=p.default.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,t);return i&&(n.version=i),n}}];n.default=g,t.exports=n.default}})},11227:function(t,n,i){let s;var p=i(34155);function useColors(){let t;return"undefined"!=typeof window&&!!window.process&&("renderer"===window.process.type||!!window.process.__nwjs)||!("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&(t=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(t[1],10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))}function formatArgs(n){if(n[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+n[0]+(this.useColors?"%c ":" ")+"+"+t.exports.humanize(this.diff),!this.useColors)return;let i="color: "+this.color;n.splice(1,0,i,"color: inherit");let s=0,p=0;n[0].replace(/%[a-zA-Z%]/g,t=>{"%%"!==t&&(s++,"%c"===t&&(p=s))}),n.splice(p,0,i)}function save(t){try{t?n.storage.setItem("debug",t):n.storage.removeItem("debug")}catch(t){}}function load(){let t;try{t=n.storage.getItem("debug")}catch(t){}return!t&&void 0!==p&&"env"in p&&(t=p.env.DEBUG),t}function localstorage(){try{return localStorage}catch(t){}}n.formatArgs=formatArgs,n.save=save,n.load=load,n.useColors=useColors,n.storage=localstorage(),n.destroy=(s=!1,()=>{s||(s=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}),n.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#F
15F6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],n.log=console.debug||console.log||(()=>{}),t.exports=i(82447)(n);let{formatters:b}=t.exports;b.j=function(t){try{return JSON.stringify(t)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}},82447:function(t,n,i){function setup(t){function selectColor(t){let n=0;for(let i=0;i<t.length;i++)n=(n<<5)-n+t.charCodeAt(i)|0;return createDebug.colors[Math.abs(n)%createDebug.colors.length]}function createDebug(t){let n,i,s;let p=null;function debug(...t){if(!debug.enabled)return;let i=debug,s=Number(new Date),p=s-(n||s);i.diff=p,i.prev=n,i.curr=s,n=s,t[0]=createDebug.coerce(t[0]),"string"!=typeof t[0]&&t.unshift("%O");let b=0;t[0]=t[0].replace(/%([a-zA-Z%])/g,(n,s)=>{if("%%"===n)return"%";b++;let p=createDebug.formatters[s];if("function"==typeof p){let s=t[b];n=p.call(i,s),t.splice(b,1),b--}return n}),createDebug.formatArgs.call(i,t);let g=i.log||createDebug.log;g.apply(i,t)}return debug.namespace=t,debug.useColors=createDebug.useColors(),debug.color=createDebug.selectColor(t),debug.extend=extend,debug.destroy=createDebug.destroy,Object.defineProperty(debug,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==p?p:(i!==createDebug.namespaces&&(i=createDebug.namespaces,s=createDebug.enabled(t)),s),set
15:t=>{p=t}}),"function"==typeof createDebug.init&&createDebug.init(debug),debug}function extend(t,n){let i=createDebug(this.namespace+(void 0===n?":":n)+t);return i.log=this.log,i}function enable(t){let n;createDebug.save(t),createDebug.namespaces=t,createDebug.names=[],createDebug.skips=[];let i=("string"==typeof t?t:"").split(/[\s,]+/),s=i.length;for(n=0;n<s;n++)i[n]&&("-"===(t=i[n].replace(/\*/g,".*?"))[0]?createDebug.skips.push(RegExp("^"+t.slice(1)+"$")):createDebug.names.push(RegExp("^"+t+"$")))}function disable(){let t=[...createDebug.names.map(toNamespace),...createDebug.skips.map(toNamespace).map(t=>"-"+t)].join(",");return createDebug.enable(""),t}function enabled(t){let n,i;if("*"===t[t.length-1])return!0;for(n=0,i=createDebug.skips.length;n<i;n++)if(createDebug.skips[n].test(t))return!1;for(n=0,i=createDebug.names.length;n<i;n++)if(createDebug.names[n].test(t))return!0;return!1}function toNamespace(t){return t.toString().substring(2,t.toString().length-2).replace(/\.\*\?$/,"*")}function coerce(t){return t instanceof Error?t.stack||t.message:t}function destroy(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return createDebug.debug=createDebug,createDebug.default=createDebug,createDebug.coerce=coerce,createDebug.disable=disable,createDebug.enable=enable,createDebug.enabled=enabled,createDebug.humanize=i(57824),createDebug.destroy=destroy,Object.keys(t).forEach(n=>{createDebug[n]=t[n]}),createDebug.names=[],createDebug.skips=[],createDebug.formatters={},createDebug.selectColor=selectColor,createDebug.enable(createDebug.load()),createDebug}t.exports=setup},4289:function(t,n,i){"use strict";var s=i(82215),p="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),b=Object.prototype.toString,g=Array.prototype.concat,y=i(12296),m=i(31044)(),defineProperty=function(t,n,i,s){if(n in t){if(!0===s){if(t[n]===i)return}else if(!("function"==typeof s&&"[object Function]"===b.call(s))||!s())return}m?y(t,n,i,!0):y(t,n,i)},defineProperties=function(t,n){var i=arguments.length>2?arguments[2]:{},b=s(n);p&&(b=g.call(b,Object.getOwnPropertySymbols(n)));for(var y=0;y<b.length;y+=1)defineProperty(t,b[y],n[b[y]],i[b[y]])};defineProperties.supportsDescriptors=!!m,t.exports=defineProperties},12840:function(t,n,i){var s=i(34155),p=i(30778),noop=function(){},eos=function(t,n,i){if("function"==typeof n)return eos(t,null,n);n||(n={}),i=p(i||noop);var b=t._writableState,g=t._readableState,y=n.readable||!1!==n.readable&&t.readable,m=n.writable||!1!==n.writable&&t.writable,_=!1,onlegacyfinish=function(){t.writable||onfinish()},onfinish=function(){m=!1,y||i.call(t)},onend=function(){y=!1,m||i.call(t)},onexit=function(n){i.call(t,n?Error("exited with error code: "+n):null)},onerror=function(n){i.call(t,n)},onclose=function(){s.nextTick(onclosenexttick)},onclosenexttick=function(){if(!_&&(y&&!(g&&g.ended&&!g.destroyed)||m&&!(b&&b.ended&&!b.destroyed)))return i.call(t,Error("premature close"))},onrequest=function(){t.req.on("finish",onfinish)};return t.setHeader&&"function"==typeof t.abort?(t.on("complete",onfinish),t.on("abort",onclose),t.req?onrequest():t.on("request",onrequest)):m&&!b&&(t.on("end",onlegacyfinish),t.on("close",onlegacyfinish)),t.stdio&&Array.isArray(t.stdio)&&3===t.stdio.length&&t.on("exit",onexit),t.on("end",onend),t.on("finish",onfinish),!1!==n.error&&t.on("error",onerror),t.on("close",onclose),function(){_=!0,t.removeListener("complete",onfinish),t.removeListener("abort",onclose),t.removeListener("request",onrequest),t.req&&t.req.removeListener("finish",onfinish),t.removeListener("end",onlegacyfinish),t.removeListener("close",onlegacyfinish),t.removeListener("finish",onfinish),t.removeListener("exit",onexit),t.removeListener("end",onend),t.removeListener("error",onerror),t.removeListener("close",onclose)}};t.exports=eos},12294:function(t,n,i){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.EthereumProviderError=n.EthereumRpcError=void 0;let s=i(4445);let EthereumRpcError=class EthereumRpcError extends Error{constructor(t,n,i){if(!Number.isInteger(t))throw Error('"code" must be an integer.');if(!n||"string"!=typeof n)throw Error('"message" must be a nonempty string.');super(n),this.code=t,void 0!==i&&(this.data=i)}serialize(){let t={code:this.code,message:this.message};return void 0!==this.data&&(t.data=this.data),this.stack&&(t.stack=this.stack),t}toString(){return s.default(this.serialize(),stringifyReplacer,2)}};n.EthereumRpcError=EthereumRpcError;
15let EthereumProviderError=class EthereumProviderError extends EthereumRpcError{constructor(t,n,i){if(!isValidEthProviderCode(t))throw Error('"code" must be an integer such that: 1000 <= code <= 4999');super(t,n,i)}};function isValidEthProviderCode(t){return Number.isInteger(t)&&t>=1e3&&t<=4999}function stringifyReplacer(t,n){if("[Circular]"!==n)return n}n.EthereumProviderError=EthereumProviderError},92662:function(t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.errorValues=n.errorCodes=void 0,n.errorCodes={rpc:{invalidInput:-32e3,resourceNotFound:-32001,resourceUnavailable:-32002,transactionRejected:-32003,methodNotSupported:-32004,limitExceeded:-32005,parse:-32700,invalidRequest:-32600,methodNotFound:-32601,invalidParams:-32602,internal:-32603},provider:{userRejectedRequest:4001,unauthorized:4100,unsupportedMethod:4200,disconnected:4900,chainDisconnected:4901}},n.errorValues={"-32700":{standard:"JSON RPC 2.0",message:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."},"-32600":{standard:"JSON RPC 2.0",message:"The JSON sent is not a valid Request object."},"-32601":{standard:"JSON RPC 2.0",message:"The method does not exist / is not available."},"-32602":{standard:"JSON RPC 2.0",message:"Invalid method parameter(s)."},"-32603":{standard:"JSON RPC 2.0",message:"Internal JSON-RPC error."},"-32000":{standard:"EIP-1474",message:"Invalid input."},"-32001":{standard:"EIP-1474",message:"Resource not found."},"-32002":{standard:"EIP-1474",message:"Resource unavailable."},"-32003":{standard:"EIP-1474",message:"Transaction rejected."},"-32004":{standard:"EIP-1474",message:"Method not supported."},"-32005":{standard:"EIP-1474",message:"Request limit exceeded."},4001:{standard:"EIP-1193",message:"User rejected the request."},4100:{standard:"EIP-1193",message:"The requested account and/or method has not been authorized by the user."},4200:{standard:"EIP-1193",message:"The requested method is not supported by this Ethereum provider."},4900:{standard:"EIP-1193",message:"The provider is disconnected from all chains."},4901:{standard:"EIP-1193",message:"The provider is disconnected from the specified chain."}}},68797:function(t,n,i){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.ethErrors=void 0;let s=i(12294),p=i(68753),b=i(92662);function getEthJsonRpcError(t,n){let[i,b]=parseOpts(n);return new s.EthereumRpcError(t,i||p.getMessageFromCode(t),b)}function getEthProviderError(t,n){let[i,b]=parseOpts(n);return new s.EthereumProviderError(t,i||p.getMessageFromCode(t),b)}function parseOpts(t){if(t){if("string"==typeof t)return[t];if("object"==typeof t&&!Array.isArray(t)){let{message:n,data:i}=t;if(n&&"string"!=typeof n)throw Error("Must specify string message.");return[n||void 0,i]}}return[]}n.ethErrors={rpc:{parse:t=>getEthJsonRpcError(b.errorCodes.rpc.parse,t),invalidRequest:t=>getEthJsonRpcError(b.errorCodes.rpc.invalidRequest,t),invalidParams:t=>getEthJsonRpcError(b.errorCodes.rpc.invalidParams,t),methodNotFound:t=>getEthJsonRpcError(b.errorCodes.rpc.methodNotFound,t),internal:t=>getEthJsonRpcError(b.errorCodes.rpc.internal,t),server:t=>{if(!t||"object"!=typeof t||Array.isArray(t))throw Error("Ethereum RPC Server errors must provide single object argument.");let{code:n}=t;if(!Number.isInteger(n)||n>-32005||n<-32099)throw Error('"code" must be an integer such that: -32099 <= code
15<= -32005');return getEthJsonRpcError(n,t)},invalidInput:t=>getEthJsonRpcError(b.errorCodes.rpc.invalidInput,t),resourceNotFound:t=>getEthJsonRpcError(b.errorCodes.rpc.resourceNotFound,t),resourceUnavailable:t=>getEthJsonRpcError(b.errorCodes.rpc.resourceUnavailable,t),transactionRejected:t=>getEthJsonRpcError(b.errorCodes.rpc.transactionRejected,t),methodNotSupported:t=>getEthJsonRpcError(b.errorCodes.rpc.methodNotSupported,t),limitExceeded:t=>getEthJsonRpcError(b.errorCodes.rpc.limitExceeded,t)},provider:{userRejectedRequest:t=>getEthProviderError(b.errorCodes.provider.userRejectedRequest,t),unauthorized:t=>getEthProviderError(b.errorCodes.provider.unauthorized,t),unsupportedMethod:t=>getEthProviderError(b.errorCodes.provider.unsupportedMethod,t),disconnected:t=>getEthProviderError(b.errorCodes.provider.disconnected,t),chainDisconnected:t=>getEthProviderError(b.errorCodes.provider.chainDisconnected,t),custom:t=>{if(!t||"object"!=typeof t||Array.isArray(t))throw Error("Ethereum Provider custom errors must provide single object argument.");let{code:n,message:i,data:p}=t;if(!i||"string"!=typeof i)throw Error('"message" must be a nonempty string');return new s.EthereumProviderError(n,i,p)}}}},79826:function(t,n,i){"use strict";n.Xy=n.Cg=n.Sy=void 0;let s=i(12294);Object.defineProperty(n,"Cg",{enumerable:!0,get:function(){return s.EthereumRpcError}});let p=i(68753);Object.defineProperty(n,"Xy",{enumerable:!0,get:function(){return p.serializeError}});let b=i(68797);Object.defineProperty(n,"Sy",{enumerable:!0,get:function(){return b.ethErrors}}),i(92662)},68753:function(t,n,i){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.serializeError=n.isValidCode=n.getMessageFromCode=n.JSON_RPC_SERVER_ERROR_MESSAGE=void 0;let s=i(92662),p=i(12294),b=s.errorCodes.rpc.internal,g={code:b,message:getMessageFromCode(b)};function getMessageFromCode(t,i="Unspecified error message. This is a bug, please report it."){if(Number.isInteger(t)){let i=t.toString();if(hasKey(s.errorValues,i))return s.errorValues[i].message;if(t>=-32099&&t<=-32e3)return n.JSON_RPC_SERVER_ERROR_MESSAGE}return i}function isValidCode(t){if(!Number.isInteger(t))return!1;let n=t.toString();return!!(s.errorValues[n]||t>=-32099&&t<=-32e3)}function serializeError(t,{fallbackError:n=g,shouldIncludeStack:i=!1}={}){if(!n||!Number.isInteger(n.code)||"string"!=typeof n.message)throw Error("Must provide fallback error with integer number code and string message.");if(t instanceof p.EthereumRpcError)return t.serialize();let s={};if(t&&"object"==typeof t&&!Array.isArray(t)&&hasKey(t,"code")&&isValidCode(t.code))s.code=t.code,t.message&&"string"==typeof t.message?(s.message=t.message,hasKey(t,"data")&&(s.data=t.data)):(s.message=getMessageFromCode(s.code),s.data={originalError:assignOriginalError(t)});else{s.code=n.code;let i=null==t?void 0:t.message;s.message=i&&"string"==typeof i?i:n.message,s.data={originalError:assignOriginalError(t)}}let b=null==t?void 0:t.stack;return i&&t&&b&&"string"==typeof b&&(s.stack=b),s}function assignOriginalError(t){return t&&"object"==typeof t&&!Array.isArray(t)?Object.assign({},t):t}function hasKey(t,n){return Object.prototype.hasOwnProperty.call(t,n)}n.JSON_RPC_SERVER_ERROR_MESSAGE="Unspecified server error.",n.getMessageFromCode=getMessageFromCode,n.isValidCode=isValidCode,n.serializeError=serializeError},82192:function(t,n,i){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.keccak512=n.keccak384=n.keccak256=n.keccak224=void 0;let s=i(85426),p=i(58040);n.keccak224=(0,p.wrapHash)(s.keccak_224),n.keccak256=(()=>{let t=(0,p.wrapHash)(s.keccak_256);return t.create=s.keccak_256.create,t})(),n.keccak384=(0,p.wrapHash)(s.keccak_384),n.keccak512=(0,p.wrapHash)(s.keccak_512)},37270:function(t,n,i){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getHash=getHash,n.createCurve=createCurve;/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */let s=i(79569),p=i(98089),b=i(70409);function getHash(t){return{hash:t,hmac:(n,...i)=>(0,s.hmac)(t,n,(0,p.concatBytes)(...i)),randomBytes:p.randomBytes}}function createCurve(t,n){let create=n=>(0,b.weierstrass)({...t,...getHash(n)});return Object.freeze({...create(n),create})}},46061:function(t,n,i){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.wNAF=wNAF,n.validateBasic=validateBasic;/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */let s=i(66998),p=i(4870),b=BigInt(0),g=BigInt(1);function wNAF(t,n){let constTimeNegate=(t,n)=>{let i=n.negate();return t?i:n},opts=t=>({windows:Math.ceil(n/t)+1,windowSize:2**(t-1)});return{constTimeNegate,unsafeLadder(n,i){let s=t.ZERO,p=n;for(;i>b;)i&g&&(s=s.add(p)),p=p.double(),i>>=g;return s},precomputeWindow(t,n){let{windows:i,windowSize:s}=opts(n),p=[],b=t,g=b;for(let t=0;t<i;t++){g=b,p.push(g);for(let t=1;t<s;t++)g=g.add(b),p.push(g);b=g.double()}return p},wNAF(n,i,s){let{windows:p,windowSize:b}
15=opts(n),y=t.ZERO,m=t.BASE,_=BigInt(2**n-1),v=2**n,w=BigInt(n);for(let t=0;t<p;t++){let n=t*b,p=Number(s&_);s>>=w,p>b&&(p-=v,s+=g);let S=n+Math.abs(p)-1,R=t%2!=0,T=p<0;0===p?m=m.add(constTimeNegate(R,i[n])):y=y.add(constTimeNegate(T,i[S]))}return{p:y,f:m}},wNAFCached(t,n,i,s){let p=t._WINDOW_SIZE||1,b=n.get(t);return b||(b=this.precomputeWindow(t,p),1!==p&&n.set(t,s(b))),this.wNAF(p,b,i)}}}function validateBasic(t){return(0,s.validateField)(t.Fp),(0,p.validateObject)(t,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...(0,s.nLength)(t.n,t.nBitLength),...t,p:t.Fp.ORDER})}},31315:function(t,n,i){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.expand_message_xmd=expand_message_xmd,n.expand_message_xof=expand_message_xof,n.hash_to_field=hash_to_field,n.isogenyMap=isogenyMap,n.createHasher=createHasher;let s=i(66998),p=i(4870),b=p.bytesToNumberBE;function i2osp(t,n){if(t<0||t>=1<<8*n)throw Error(`bad I2OSP call: value=${t} length=${n}`);let i=Array.from({length:n}).fill(0);for(let s=n-1;s>=0;s--)i[s]=255&t,t>>>=8;return new Uint8Array(i)}function strxor(t,n){let i=new Uint8Array(t.length);for(let s=0;s<t.length;s++)i[s]=t[s]^n[s];return i}function anum(t){if(!Number.isSafeInteger(t))throw Error("number expected")}function expand_message_xmd(t,n,i,s){(0,p.abytes)(t),(0,p.abytes)(n),anum(i),n.length>255&&(n=s((0,p.concatBytes)((0,p.utf8ToBytes)("H2C-OVERSIZE-DST-"),n)));let{outputLen:b,blockLen:g}=s,y=Math.ceil(i/b);if(y>255)throw Error("Invalid xmd length");let m=(0,p.concatBytes)(n,i2osp(n.length,1)),_=i2osp(0,g),v=i2osp(i,2),w=Array(y),S=s((0,p.concatBytes)(_,t,v,i2osp(0,1),m));w[0]=s((0,p.concatBytes)(S,i2osp(1,1),m));for(let t=1;t<=y;t++){let n=[strxor(S,w[t-1]),i2osp(t+1,1),m];w[t]=s((0,p.concatBytes)(...n))}let R=(0,p.concatBytes)(...w);return R.slice(0,i)}function expand_message_xof(t,n,i,s,b){if((0,p.abytes)(t),(0,p.abytes)(n),anum(i),n.length>255&&(n=b.create({dkLen:Math.ceil(2*s/8)}).update((0,p.utf8ToBytes)("H2C-OVERSIZE-DST-")).update(n).digest()),i>65535||n.length>255)throw Error("expand_message_xof: invalid lenInBytes");return b.create({dkLen:i}).update(t).update(i2osp(i,2)).update(n).update(i2osp(n.length,1)).digest()}function hash_to_field(t,n,i){let g;(0,p.validateObject)(i,{DST:"stringOrUint8Array",p:"bigint",m:"isSafeInteger",k:"isSafeInteger",hash:"hash"});let{p:y,k:m,m:_,hash:v,expand:w,DST:S}=i;(0,p.abytes)(t),anum(n);let R="string"==typeof S?(0,p.utf8ToBytes)(S):S,T=y.toString(2).length,x=Math.ceil((T+m)/8),A=n*_*x;if("xmd"===w)g=expand_message_xmd(t,R,A,v);else if("xof"===w)g=expand_message_xof(t,R,A,m,v);else if("_internal_pass"===w)g=t;else throw Error('expand must be "xmd" or "xof"');let k=Array(n);for(let t=0;t<n;t++){let n=Array(_);for(let i=0;i<_;i++){let p=x*(i+t*_),m=g.subarray(p,p+x);n[i]=(0,s.mod)(b(m),y)}k[t]=n}return k}function isogenyMap(t,n){let i=n.map(t=>Array.from(t).reverse());return(n,s)=>{let[p,b,g,y]=i.map(i=>i.reduce((i,s)=>t.add(t.mul(i,n),s)));return n=t.div(p,b),s=t.mul(s,t.div(g,y)),{x:n,y:s}}}function createHasher(t,n,i){if("function"!=typeof n)throw Error("mapToCurve() must be defined");return{hashToCurve(s,p){let b=hash_to_field(s,2,{...i,DST:i.DST,...p}),g=t.fromAffine(n(b[0])),y=t.fromAffine(n(b[1])),m=g.add(y).clearCofactor();return m.assertValidity(),m},encodeToCurve(s,p){let b=hash_to_field(s,1,{...i,DST:i.encodeDST,...p}),g=t.fromAffine(n(b[0])).clearCofactor();return g.assertValidity(),g},mapToCurve(i){if(!Array.isArray(i))throw Error("mapToCurve: expected array of bigints");for(let t of i)if("bigint"!=typeof t)throw Error(`mapToCurve: expected array of bigints, got ${t} in array`);let s=t.fromAffine(n(i)).clearCofactor();return s.assertValidity(),s}}}},66998:function(t,n,i){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.isNegativeLE=void 0,n.mod=mod,n.pow=pow,n.pow2=pow2,n.invert=invert,n.tonelliShanks=tonelliShanks,n.FpSqrt=FpSqrt,n.validateField=validateField,n.FpPow=FpPow,n.FpInvertBatch=FpInvertBatch,n.FpDiv=FpDiv,n.FpIsSquare=FpIsSquare,n.nLength=nLength,n.Field=Field,n.FpSqrtOdd=FpSqrtOdd,n.FpSqrtEven=FpSqrtEven,n.hashToPrivateScalar=hashToPrivateScalar,n.getFieldBytesLength=getFieldBytesLength,n.getMinHashLength=getMinHashLength,n.mapHashToField=mapHashToField;/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */let s=i(4870),p=BigInt(0),b=BigInt(1),g=BigInt(2),y=BigInt(3),m=BigInt(4),_=BigInt(5),v=BigInt(8);function mod(t,n){let i=t%n;return i>=p?i:n+i}function pow(t,n,i){if(i<=p||n<p)throw Error("Expected power/modulo > 0");if(i===b)return p;let s=b;for(;n>p;)n&b&&(s=s*t%i),t=t*t%i,n>>=b;return s}function pow2(t,n,i){let s=t;for(;n-- >p;)s*=s,s%=i;return s}function invert(t,n){if(t===p||n<=p)throw Error(`invert: expected positive integers, got n=${t} mod=${n}`);let i=mod(t,n),s=n,g=p,y=b,m=b,_=p;for(;i!==p;){let t=s/i,n=s%i,p=g-m*t,b=y-_*t;s=i,i=n,g=m,y=_,m=p,_=b}let v=s;if(v!==b)throw Error("invert: does not exist");return mod(g,n)}function tonelliShanks(t){let n,i,s;let y=(t-b)/g;for(n=t-b,i=0;n%g===p;n/=g,i++);for(s=g;s<t&&pow(s,y,t)!==t-b;s++);if(1===i){let n=(t+b)/m;return function(t,i){let s=t.pow(i,n);if(!t.eql(t.sqr(s),i))throw Error("Cannot find square root");return s}}let _=(n+b)/g;return function(t,p){if(t.pow(p,y)===t.neg(t.ONE))throw Error("Cannot find square root");let g=i,m=t.pow(t.mul(t.ONE,s),n),v=t.pow(p,_),w=t.pow(p,n);for(;!t.eql(w,t.ONE);){if(t.eql(w,t.ZERO))return t.ZERO;let n=1;for(let i=t.sqr(w);n<g&&!t.eql(i,t.ONE);n++)i=t.sqr(i);let i=t.pow(m,b<<BigInt(g-n-1));m=t.sqr(i),v=t.mul(v,i),w=t.mul(w,m),g=n}return v}}function FpSqrt(t){if(t%m===y){let n=(t+b)/m;return function(t,i){let s=t.pow(i,n);if(!t.eql(t.sqr(s),i))throw Error("Cannot find square root");return s}}if(t%v===_){let n=(t-_)/v;return function(t,i){let s=t.mul(i,g),p=t.pow(s,n),b=t.mul(i,p),y=t.mul(t.mul(b,g),p),m=t.mul(b,t.sub(y,t.ONE));if(!t.eql(t.sqr(m),i))throw Error("Cannot find square root");return m}}return tonelliShanks(t)}BigInt(9),BigInt(16),n.isNegativeLE=(t,n)=>(mod(t,n)&b)===b;let w=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function validateField(t){let n=w.reduce((t,n)=>(t[n]="function",t),{ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"});return(0,s.validateObject)(t,n)}function FpPow(t,n,i){if(i<p)throw Error("Expected power > 0");if(i===p)return t.ONE;if(i===b)return n;let s=t.ONE,g=n;for(;i>p;)i&b&&(s=t.mul(s,g)),g=t.sqr(g),i>>=b;return s}function FpInvertBatch(t,n){let i=Array(n.length),s=n.reduce((n,s,p)=>t.is0(s)?n:(i[p]=n,t.mul(n,s)),t.ONE),p=t.inv(s);return n.reduceRight((n,s,p)=>t.is0(s)?n:(i[p]=t.mul(n,i[p]),t.mul(n,s)),p),i}function FpDiv(t,n,i){return t.mul(n,"bigint"==typeof i?invert(i,t.ORDER):t.inv(i))}function FpIsSquare(t){let n=(t.ORDER-b)/g;return i=>{let s=t.pow(i,n);return t.eql(s,t.ZERO)||t.eql(s,t.ONE)}}function nLength(t,n){let i=void 0!==n?n:t.toString(2).length;return{nBitLength:i,nByteLength:Math.ceil(i/8)}}function Field(t,n,i=!1,g={}){if(t<=p)throw Error(`Expected Field ORDER > 0, got ${t}`);let{nBitLength:y,nByteLength:m}=nLength(t,n);if(m>2048)throw Error("Field lengths over 2048 bytes are not supported");let _=FpSqrt(t),v=Object.freeze({ORDER:t,BITS:y,BYTES:m,MASK:(0,s.bitMask)(y),ZERO:p,ONE:b,create:n=>mod(n,t),isValid:n=>{if("bigint"!=typeof n)throw Error(`Invalid field element: expected bigint, got ${typeof n}`);return p<=n&&n<t},is0:t=>t===p,isOdd:t=>(t&b)===b,neg:n=>
15mod(-n,t),eql:(t,n)=>t===n,sqr:n=>mod(n*n,t),add:(n,i)=>mod(n+i,t),sub:(n,i)=>mod(n-i,t),mul:(n,i)=>mod(n*i,t),pow:(t,n)=>FpPow(v,t,n),div:(n,i)=>mod(n*invert(i,t),t),sqrN:t=>t*t,addN:(t,n)=>t+n,subN:(t,n)=>t-n,mulN:(t,n)=>t*n,inv:n=>invert(n,t),sqrt:g.sqrt||(t=>_(v,t)),invertBatch:t=>FpInvertBatch(v,t),cmov:(t,n,i)=>i?n:t,toBytes:t=>i?(0,s.numberToBytesLE)(t,m):(0,s.numberToBytesBE)(t,m),fromBytes:t=>{if(t.length!==m)throw Error(`Fp.fromBytes: expected ${m}, got ${t.length}`);return i?(0,s.bytesToNumberLE)(t):(0,s.bytesToNumberBE)(t)}});return Object.freeze(v)}function FpSqrtOdd(t,n){if(!t.isOdd)throw Error("Field doesn't have isOdd");let i=t.sqrt(n);return t.isOdd(i)?i:t.neg(i)}function FpSqrtEven(t,n){if(!t.isOdd)throw Error("Field doesn't have isOdd");let i=t.sqrt(n);return t.isOdd(i)?t.neg(i):i}function hashToPrivateScalar(t,n,i=!1){t=(0,s.ensureBytes)("privateHash",t);let p=t.length,g=nLength(n).nByteLength+8;if(g<24||p<g||p>1024)throw Error(`hashToPrivateScalar: expected ${g}-1024 bytes of input, got ${p}`);let y=i?(0,s.bytesToNumberLE)(t):(0,s.bytesToNumberBE)(t);return mod(y,n-b)+b}function getFieldBytesLength(t){if("bigint"!=typeof t)throw Error("field order must be bigint");let n=t.toString(2).length;return Math.ceil(n/8)}function getMinHashLength(t){let n=getFieldBytesLength(t);return n+Math.ceil(n/2)}function mapHashToField(t,n,i=!1){let p=t.length,g=getFieldBytesLength(n),y=getMinHashLength(n);if(p<16||p<y||p>1024)throw Error(`expected ${y}-1024 bytes of input, got ${p}`);let m=i?(0,s.bytesToNumberBE)(t):(0,s.bytesToNumberLE)(t),_=mod(m,n-b)+b;return i?(0,s.numberToBytesLE)(_,g):(0,s.numberToBytesBE)(_,g)}},4870:function(t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.bitMask=void 0,n.isBytes=isBytes,n.abytes=abytes,n.bytesToHex=bytesToHex,n.numberToHexUnpadded=numberToHexUnpadded,n.hexToNumber=hexToNumber,n.hexToBytes=hexToBytes,n.bytesToNumberBE=bytesToNumberBE,n.bytesToNumberLE=bytesToNumberLE,n.numberToBytesBE=numberToBytesBE,n.numberToBytesLE=numberToBytesLE,n.numberToVarBytesBE=numberToVarBytesBE,n.ensureBytes=ensureBytes,n.concatBytes=concatBytes,n.equalBytes=equalBytes,n.utf8ToBytes=utf8ToBytes,n.bitLen=bitLen,n.bitGet=bitGet,n.bitSet=bitSet,n.createHmacDrbg=createHmacDrbg,n.validateObject=validateObject;/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */let i=BigInt(0),s=BigInt(1),p=BigInt(2);function isBytes(t){return t instanceof Uint8Array||null!=t&&"object"==typeof t&&"Uint8Array"===t.constructor.name}function abytes(t){if(!isBytes(t))throw Error("Uint8Array expected")}let b=Array.from({length:256},(t,n)=>n.toString(16).padStart(2,"0"));function bytesToHex(t){abytes(t);let n="";for(let i=0;i<t.length;i++)n+=b[t[i]];return n}function numberToHexUnpadded(t){let n=t.toString(16);return 1&n.length?`0${n}`:n}function hexToNumber(t){if("string"!=typeof t)throw Error("hex string expected, got "+typeof t);return BigInt(""===t?"0":`0x${t}`)}let g={_0:48,_9:57,_A:65,_F:70,_a:97,_f:102};function asciiToBase16(t){return t>=g._0&&t<=g._9?t-g._0:t>=g._A&&t<=g._F?t-(g._A-10):t>=g._a&&t<=g._f?t-(g._a-10):void 0}function hexToBytes(t){if("string"!=typeof t)throw Error("hex string expected, got "+typeof t);let n=t.length,i=n/2;if(n%2)throw Error("padded hex string expected, got unpadded hex of length "+n);let s=new Uint8Array(i);for(let n=0,p=0;n<i;n++,p+=2){let i=asciiToBase16(t.charCodeAt(p)),b=asciiToBase16(t.charCodeAt(p+1));if(void 0===i||void 0===b){let n=t[p]+t[p+1];throw Error('hex string expected, got non-hex character "'+n+'" at index '+p)}s[n]=16*i+b}return s}function bytesToNumberBE(t){return hexToNumber(bytesToHex(t))}function bytesToNumberLE(t){return abytes(t),hexToNumber(bytesToHex(Uint8Array.from(t).reverse()))}function numberToBytesBE(t,n){return hexToBytes(t.toString(16).padStart(2*n,"0"))}function numberToBytesLE(t,n){return numberToBytesBE(t,n).reverse()}function numberToVarBytesBE(t){return hexToBytes(numberToHexUnpadded(t))}function ensureBytes(t,n,i){let s;if("string"==typeof n)try{s=hexToBytes(n)}catch(i){throw Error(`${t} must be valid hex string, got "${n}". Cause: ${i}`)}else if(isBytes(n))s=Uint8Array.from(n);else throw Error(`${t} must be hex string or Uint8Array`);let p=s.length;if("number"==typeof i&&p!==i)throw Error(`${t} expected ${i} bytes, got ${p}`);return s}function concatBytes(...t){let n=0;for(let i=0;i<t.length;i++){let s=t[i];abytes(s),n+=s.length}let i=new Uint8Array(n);for(let n=0,s=0;n<t.length;n++){let p=t[n];
15i.set(p,s),s+=p.length}return i}function equalBytes(t,n){if(t.length!==n.length)return!1;let i=0;for(let s=0;s<t.length;s++)i|=t[s]^n[s];return 0===i}function utf8ToBytes(t){if("string"!=typeof t)throw Error(`utf8ToBytes expected string, got ${typeof t}`);return new Uint8Array(new TextEncoder().encode(t))}function bitLen(t){let n;for(n=0;t>i;t>>=s,n+=1);return n}function bitGet(t,n){return t>>BigInt(n)&s}function bitSet(t,n,p){return t|(p?s:i)<<BigInt(n)}n.bitMask=t=>(p<<BigInt(t-1))-s;let u8n=t=>new Uint8Array(t),u8fr=t=>Uint8Array.from(t);function createHmacDrbg(t,n,i){if("number"!=typeof t||t<2)throw Error("hashLen must be a number");if("number"!=typeof n||n<2)throw Error("qByteLen must be a number");if("function"!=typeof i)throw Error("hmacFn must be a function");let s=u8n(t),p=u8n(t),b=0,reset=()=>{s.fill(1),p.fill(0),b=0},h=(...t)=>i(p,s,...t),reseed=(t=u8n())=>{p=h(u8fr([0]),t),s=h(),0!==t.length&&(p=h(u8fr([1]),t),s=h())},gen=()=>{if(b++>=1e3)throw Error("drbg: tried 1000 values");let t=0,i=[];for(;t<n;){s=h();let n=s.slice();i.push(n),t+=s.length}return concatBytes(...i)};return(t,n)=>{let i;for(reset(),reseed(t);!(i=n(gen()));)reseed();return reset(),i}}let y={bigint:t=>"bigint"==typeof t,function:t=>"function"==typeof t,boolean:t=>"boolean"==typeof t,string:t=>"string"==typeof t,stringOrUint8Array:t=>"string"==typeof t||isBytes(t),isSafeInteger:t=>Number.isSafeInteger(t),array:t=>Array.isArray(t),field:(t,n)=>n.Fp.isValid(t),hash:t=>"function"==typeof t&&Number.isSafeInteger(t.outputLen)};function validateObject(t,n,i={}){let checkField=(n,i,s)=>{let p=y[i];if("function"!=typeof p)throw Error(`Invalid validator "${i}", expected function`);let b=t[n];if((!s||void 0!==b)&&!p(b,t))throw Error(`Invalid param ${String(n)}=${b} (${typeof b}), expected ${i}`)};for(let[t,i]of Object.entries(n))checkField(t,i,!1);for(let[t,n]of Object.entries(i))checkField(t,n,!0);return t}},70409:function(t,n,i){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.DER=void 0,n.weierstrassPoints=weierstrassPoints,n.weierstrass=weierstrass,n.SWUFpSqrtRatio=SWUFpSqrtRatio,n.mapToCurveSimpleSWU=mapToCurveSimpleSWU;/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */let s=i(46061),p=i(66998),b=i(4870),g=i(4870);function validatePointOpts(t){let n=(0,s.validateBasic)(t);b.validateObject(n,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});let{endo:i,Fp:p,a:g}=n;if(i){if(!p.eql(g,p.ZERO))throw Error("Endomorphism can only be defined for Koblitz curves that have a=0");if("object"!=typeof i||"bigint"!=typeof i.beta||"function"!=typeof i.splitScalar)throw Error("Expected endomorphism with beta: bigint and splitScalar: function")}return Object.freeze({...n})}let{bytesToNumberBE:y,hexToBytes:m}=b;n.DER={Err:class extends Error{constructor(t=""){super(t)}},_parseInt(t){let{Err:i}=n.DER;if(t.length<2||2!==t[0])throw new i("Invalid signature integer tag");let s=t[1],p=t.subarray(2,s+2);if(!s||p.length!==s)throw new i("Invalid signature integer: wrong length");if(128&p[0])throw new i("Invalid signature integer: negative");if(0===p[0]&&!(128&p[1]))throw new i("Invalid signature integer: unnecessary leading zero");return{d:y(p),l:t.subarray(s+2)}},toSig(t){let{Err:i}=n.DER,s="string"==typeof t?m(t):t;b.abytes(s);let p=s.length;if(p<2||48!=s[0])throw new i("Invalid signature tag");if(s[1]!==p-2)throw new i("Invalid signature: incorrect length");let{d:g,l:y}=n.DER._parseInt(s.subarray(2)),{d:_,l:v}=n.DER._parseInt(y);if(v.length)throw new i("Invalid signature: left bytes after parsing");return{r:g,s:_}},hexFromSig(t){let slice=t=>8&Number.parseInt(t[0],16)?"00"+t:t,h=t=>{let n=t.toString(16);return 1&n.length?`0${n}`:n},n=slice(h(t.s)),i=slice(h(t.r)),s=n.length/2,p=i.length/2,b=h(s),g=h(p);return`30${h(p+s+4)}02${g}${i}02${b}${n}`}};let _=BigInt(0),v=BigInt(1),w=BigInt(2),S=BigInt(3),R=BigInt(4);function weierstrassPoints(t){let n=validatePointOpts(t),{Fp:i}=n,y=n.toBytes||((t,n,s)=>{let p=n.toAffine();return b.concatBytes(Uint8Array.from([4]),i.toBytes(p.x),i.toBytes(p.y))}),m=n.fromBytes||(t=>{let n=t.subarray(1),s=i.fromBytes(n.subarray(0,i.BYTES)),p=i.fromBytes(n.subarray(i.BYTES,2*i.BYTES));return{x:s,y:p}});function weierstrassEquation(t){let{a:s,b:p}=n,b=i.sqr(t),g=i.mul(b,t);return i.add(i.add(g,i.mul(t,s)),p)}if(!i.eql(i.sqr(n.Gy),weierstrassEquation(n.Gx)))throw Error("bad generator point: equation left != right");function isWithinCurveOrder(t){return"bigint"==typeof t&&_<t&&t<n.n}function assertGE(t){if(!isWithinCurveOrder(t))throw Error("Expected valid bigint: 0 < bigint < curve.n")}function normPrivateKeyToScalar(t){let i;let{allowedPrivateKeyLengths:s,nByteLength:y,wrapPrivateKey:m,n:_}=n;if(s&&"bigint"!=typeof t){if(b.isBytes(t)&&(t=b.bytesToHex(t)),"string"!=typeof t||!s.includes(t.length))throw Error("Invalid key");t=t.padStart(2*y,"0")}try{i="bigint"==typeof t?t:b.bytesToNumberBE((0,g.ensureBytes)("private key",t,y))}catch(n){throw Error(`private key must be ${y} bytes, hex or bigint, not ${typeof t}`)}return m&&(i=p.mod(i,_)),assertGE(i),i}let w=new Map;function assertPrjPoint(t){if(!(t instanceof Point))throw Error("ProjectivePoint expected")}let Point=class Point{constructor(t,n,s){if(this.px=t,this.py=n,this.pz=s,null==t||!i.isValid(t))throw Error("x required");if(null==n||!i.isValid(n))throw Error("y required");if(null==s||!i.isValid(s))throw Error("z required")}static fromAffine(t){let{x:n,y:s}=t||{};if(!t||!i.isValid(n)||!i.isValid(s))throw Error("invalid affine point");if(t instanceof Point)throw Error("projective point not allowed");let is0=t=>i.eql(t,i.ZERO);return is0(n)&&is0(s)?Point.ZERO:new Point(n,s,i.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(t){let n=i.invertBatch(t.map(t=>t.pz));return t.map((t,i)=>t.toAffine(n[i])).map(Point.fromAffine)}static fromHex(t){let n=Point.fromAffine(m((0,g.ensureBytes)("pointHex",t)));return n.assertValidity(),n}static fromPrivateKey(t){return Point.BASE.multiply(normPrivateKeyToScalar(t))}_setWindowSize(t){this._WINDOW_SIZE=t,w.delete(this)}
15assertValidity(){if(this.is0()){if(n.allowInfinityPoint&&!i.is0(this.py))return;throw Error("bad point: ZERO")}let{x:t,y:s}=this.toAffine();if(!i.isValid(t)||!i.isValid(s))throw Error("bad point: x or y not FE");let p=i.sqr(s),b=weierstrassEquation(t);if(!i.eql(p,b))throw Error("bad point: equation left != right");if(!this.isTorsionFree())throw Error("bad point: not in prime-order subgroup")}hasEvenY(){let{y:t}=this.toAffine();if(i.isOdd)return!i.isOdd(t);throw Error("Field doesn't support isOdd")}equals(t){assertPrjPoint(t);let{px:n,py:s,pz:p}=this,{px:b,py:g,pz:y}=t,m=i.eql(i.mul(n,y),i.mul(b,p)),_=i.eql(i.mul(s,y),i.mul(g,p));return m&&_}negate(){return new Point(this.px,i.neg(this.py),this.pz)}double(){let{a:t,b:s}=n,p=i.mul(s,S),{px:b,py:g,pz:y}=this,m=i.ZERO,_=i.ZERO,v=i.ZERO,w=i.mul(b,b),R=i.mul(g,g),T=i.mul(y,y),x=i.mul(b,g);return x=i.add(x,x),v=i.mul(b,y),v=i.add(v,v),m=i.mul(t,v),_=i.mul(p,T),_=i.add(m,_),m=i.sub(R,_),_=i.add(R,_),_=i.mul(m,_),m=i.mul(x,m),v=i.mul(p,v),T=i.mul(t,T),x=i.sub(w,T),x=i.mul(t,x),x=i.add(x,v),v=i.add(w,w),w=i.add(v,w),w=i.add(w,T),w=i.mul(w,x),_=i.add(_,w),T=i.mul(g,y),T=i.add(T,T),w=i.mul(T,x),m=i.sub(m,w),v=i.mul(T,R),v=i.add(v,v),new Point(m,_,v=i.add(v,v))}add(t){assertPrjPoint(t);let{px:s,py:p,pz:b}=this,{px:g,py:y,pz:m}=t,_=i.ZERO,v=i.ZERO,w=i.ZERO,R=n.a,T=i.mul(n.b,S),x=i.mul(s,g),A=i.mul(p,y),k=i.mul(b,m),O=i.add(s,p),P=i.add(g,y
15);O=i.mul(O,P),P=i.add(x,A),O=i.sub(O,P),P=i.add(s,b);let C=i.add(g,m);return P=i.mul(P,C),C=i.add(x,k),P=i.sub(P,C),C=i.add(p,b),_=i.add(y,m),C=i.mul(C,_),_=i.add(A,k),C=i.sub(C,_),w=i.mul(R,P),_=i.mul(T,k),w=i.add(_,w),_=i.sub(A,w),w=i.add(A,w),v=i.mul(_,w),A=i.add(x,x),A=i.add(A,x),k=i.mul(R,k),P=i.mul(T,P),A=i.add(A,k),k=i.sub(x,k),k=i.mul(R,k),P=i.add(P,k),x=i.mul(A,P),v=i.add(v,x),x=i.mul(C,P),_=i.mul(O,_),_=i.sub(_,x),x=i.mul(O,A),w=i.mul(C,w),new Point(_,v,w=i.add(w,x))}subtract(t){return this.add(t.negate())}is0(){return this.equals(Point.ZERO)}wNAF(t){return T.wNAFCached(this,w,t,t=>{let n=i.invertBatch(t.map(t=>t.pz));return t.map((t,i)=>t.toAffine(n[i])).map(Point.fromAffine)})}multiplyUnsafe(t){let s=Point.ZERO;if(t===_)return s;if(assertGE(t),t===v)return this;let{endo:p}=n;if(!p)return T.unsafeLadder(this,t);let{k1neg:b,k1:g,k2neg:y,k2:m}=p.splitScalar(t),w=s,S=s,R=this;for(;g>_||m>_;)g&v&&(w=w.add(R)),m&v&&(S=S.add(R)),R=R.double(),g>>=v,m>>=v;return b&&(w=w.negate()),y&&(S=S.negate()),S=new Point(i.mul(S.px,p.beta),S.py,S.pz),w.add(S)}multiply(t){let s,p;assertGE(t);let{endo:b}=n;if(b){let{k1neg:n,k1:g,k2neg:y,k2:m}=b.splitScalar(t),{p:_,f:v}=this.wNAF(g),{p:w,f:S}=this.wNAF(m);_=T.constTimeNegate(n,_),w=T.constTimeNegate(y,w),w=new Point(i.mul(w.px,b.beta),w.py,w.pz),s=_.add(w),p=v.add(S)}else{let{p:n,f:i}=this.wNAF(t);s=n,p=i}return Point.normalizeZ([s,p])[0]}multiplyAndAddUnsafe(t,n,i){let s=Point.BASE,mul=(t,n)=>n!==_&&n!==v&&t.equals(s)?t.multiply(n):t.multiplyUnsafe(n),p=mul(this,n).add(mul(t,i));return p.is0()?void 0:p}toAffine(t){let{px:n,py:s,pz:p}=this,b=this.is0();null==t&&(t=b?i.ONE:i.inv(p));let g=i.mul(n,t),y=i.mul(s,t),m=i.mul(p,t);if(b)return{x:i.ZERO,y:i.ZERO};if(!i.eql(m,i.ONE))throw Error("invZ was invalid");return{x:g,y:y}}isTorsionFree(){let{h:t,isTorsionFree:i}=n;if(t===v)return!0;if(i)return i(Point,this);throw Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){let{h:t,clearCofactor:i}=n;return t===v?this:i?i(Point,this):this.multiplyUnsafe(n.h)}toRawBytes(t=!0){return this.assertValidity(),y(Point,this,t)}toHex(t=!0){return b.bytesToHex(this.toRawBytes(t))}};Point.BASE=new Point(n.Gx,n.Gy,i.ONE),Point.ZERO=new Point(i.ZERO,i.ONE,i.ZERO);let R=n.nBitLength,T=(0,s.wNAF)(Point,n.endo?Math.ceil(R/2):R);return{CURVE:n,ProjectivePoint:Point,normPrivateKeyToScalar,weierstrassEquation,isWithinCurveOrder}}function validateOpts(t){let n=(0,s.validateBasic)(t);return b.validateObject(n,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...n})}function weierstrass(t){let i=validateOpts(t),{Fp:s,n:y}=i,m=s.BYTES+1,w=2*s.BYTES+1;function isValidFieldElement(t){return _<t&&t<s.ORDER}function modN(t){return p.mod(t,y)}function invN(t){return p.invert(t,y)}let{ProjectivePoint:S,normPrivateKeyToScalar:R,weierstrassEquation:T,isWithinCurveOrder:x}=weierstrassPoints({...i,toBytes(t,n,i){let p=n.toAffine(),g=s.toBytes(p.x),y=b.concatBytes;return i?y(Uint8Array.from([n.hasEvenY()?2:3]),g):y(Uint8Array.from([4]),g,s.toBytes(p.y))},fromBytes(t){let n=t.length,i=t[0],p=t.subarray(1);if(n===m&&(2===i||3===i)){let t;let n=b.bytesToNumberBE(p);if(!isValidFieldElement(n))throw Error("Point is not on curve");let g=T(n);try{t=s.sqrt(g)}catch(n){let t=n instanceof Error?": "+n.message:"";throw Error("Point is not on curve"+t)}let y=(t&v)===v;return(1&i)==1!==y&&(t=s.neg(t)),{x:n,y:t}}if(n===w&&4===i){let t=s.fromBytes(p.subarray(0,s.BYTES)),n=s.fromBytes(p.subarray(s.BYTES,2*s.BYTES));return{x:t,y:n}}throw Error(`Point of length ${n} was invalid. Expected ${m} compressed bytes or ${w} uncompressed bytes`)}}),numToNByteStr=t=>b.bytesToHex(b.numberToBytesBE(t,i.nByteLength));function isBiggerThanHalfOrder(t){let n=y>>v;return t>n}function normalizeS(t){return isBiggerThanHalfOrder(t)?modN(-t):t}let slcNum=(t,n,i)=>b.bytesToNumberBE(t.slice(n,i));let Signature=class Signature{constructor(t,n,i){this.r=t,this.s=n,this.recovery=i,this.assertValidity()}static fromCompact(t){let n=i.nByteLength;return new Signature(slcNum(t=(0,g.ensureBytes)("compactSignature",t,2*n),0,n),slcNum(t,n,2*n))}
15static fromDER(t){let{r:i,s}=n.DER.toSig((0,g.ensureBytes)("DER",t));return new Signature(i,s)}assertValidity(){if(!x(this.r))throw Error("r must be 0 < r < CURVE.n");if(!x(this.s))throw Error("s must be 0 < s < CURVE.n")}addRecoveryBit(t){return new Signature(this.r,this.s,t)}recoverPublicKey(t){let{r:n,s:p,recovery:b}=this,y=k((0,g.ensureBytes)("msgHash",t));if(null==b||![0,1,2,3].includes(b))throw Error("recovery id invalid");let m=2===b||3===b?n+i.n:n;if(m>=s.ORDER)throw Error("recovery id 2 or 3 invalid");let _=(1&b)==0?"02":"03",v=S.fromHex(_+numToNByteStr(m)),w=invN(m),R=modN(-y*w),T=modN(p*w),x=S.BASE.multiplyAndAddUnsafe(v,R,T);if(!x)throw Error("point at infinify");return x.assertValidity(),x}hasHighS(){return isBiggerThanHalfOrder(this.s)}normalizeS(){return this.hasHighS()?new Signature(this.r,modN(-this.s),this.recovery):this}toDERRawBytes(){return b.hexToBytes(this.toDERHex())}toDERHex(){return n.DER.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return b.hexToBytes(this.toCompactHex())}toCompactHex(){return numToNByteStr(this.r)+numToNByteStr(this.s)}};function getPublicKey(t,n=!0){return S.fromPrivateKey(t).toRawBytes(n)}function isProbPub(t){let n=b.isBytes(t),i="string"==typeof t,s=(n||i)&&t.length;return n?s===m||s===w:i?s===2*m||s===2*w:t instanceof S}function getSharedSecret(t,n,i=!0){if(isProbPub(t))throw Error("first arg must be private key");if(!isProbPub(n))throw Error("second arg must be public key");let s=S.fromHex(n);return s.multiply(R(t)).toRawBytes(i)}let A=i.bits2int||function(t){let n=b.bytesToNumberBE(t),s=8*t.length-i.nBitLength;return s>0?n>>BigInt(s):n},k=i.bits2int_modN||function(t){return modN(A(t))},O=b.bitMask(i.nBitLength);function int2octets(t){if("bigint"!=typeof t)throw Error("bigint expected");if(!(_<=t&&t<O))throw Error(`bigint expected < 2^${i.nBitLength}`);return b.numberToBytesBE(t,i.nByteLength)}function prepSig(t,n,p=P){if(["recovered","canonical"].some(t=>t in p))throw Error("sign() legacy options not supported");let{hash:y,randomBytes:m}=i,{lowS:w,prehash:T,extraEntropy:O}=p;null==w&&(w=!0),t=(0,g.ensureBytes)("msgHash",t),T&&(t=(0,g.ensureBytes)("prehashed msgHash",y(t)));let C=k(t),I=R(n),L=[int2octets(I),int2octets(C)];if(null!=O&&!1!==O){let t=!0===O?m(s.BYTES):O;L.push((0,g.ensureBytes)("extraEntropy",t))}let N=b.concatBytes(...L);return{seed:N,k2sig:function(t){let n=A(t);if(!x(n))return;let i=invN(n),s=S.BASE.multiply(n).toAffine(),p=modN(s.x);if(p===_)return;let b=modN(i*modN(C+p*I));if(b===_)return;let g=(s.x===p?0:2)|Number(s.y&v),y=b;return w&&isBiggerThanHalfOrder(b)&&(y=normalizeS(b),g^=1),new Signature(p,y,g)}}}let P={lowS:i.lowS,prehash:!1},C={lowS:i.lowS,prehash:!1};function sign(t,n,s=P){let{seed:p,k2sig:g}=prepSig(t,n,s),y=b.createHmacDrbg(i.hash.outputLen,i.nByteLength,i.hmac);return y(p,g)}function verify(t,s,p,y=C){let m,_;if(s=(0,g.ensureBytes)("msgHash",s),p=(0,g.ensureBytes)("publicKey",p),"strict"in y)throw Error("options.strict was renamed to lowS");let{lowS:v,prehash:w}=y;try{if("string"==typeof t||b.isBytes(t))try{_=Signature.fromDER(t)}catch(i){if(!(i instanceof n.DER.Err))throw i;_=Signature.fromCompact(t)}else if("object"==typeof t&&"bigint"==typeof t.r&&"bigint"==typeof t.s){let{r:n,s:i}=t;_=new Signature(n,i)}else throw Error("PARSE");m=S.fromHex(p)}catch(t){if("PARSE"===t.message)throw Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(v&&_.hasHighS())return!1;w&&(s=i.hash(s));let{r:R,s:T}=_,x=k(s),A=invN(T),O=modN(x*A),P=modN(R*A),I=S.BASE.multiplyAndAddUnsafe(m,O,P)?.toAffine();if(!I)return!1;let L=modN(I.x);return L===R}return S.BASE._setWindowSize(8),{CURVE:i,getPublicKey,getSharedSecret,sign,verify,ProjectivePoint:S,Signature,utils:{isValidPrivateKey(t){try{return R(t),!0}catch(t){return!1}},normPrivateKeyToScalar:R,randomPrivateKey:()=>{let t=p.getMinHashLength(i.n);return p.mapHashToField(i.randomBytes(t),i.n)},precompute:(t=8,n=S.BASE)=>(n._setWindowSize(t),n.multiply(BigInt(3)),n)}}}function SWUFpSqrtRatio(t,n){let i=t.ORDER,s=_;for(let t=i-v;t%w===_;t/=w)s+=v;let p=s,b=w<<p-v-v,g=b*w,y=(i-v)/g,m=(y-v)/w,T=g-v,x=t.pow(n,y),A=t.pow(n,(y+v)/w),sqrtRatio=(n,i)=>{let s=x,g=t.pow(i,T),y=t.sqr(g);y=t.mul(y,i);let _=t.mul(n,y);_=t.pow(_,m),_=t.mul(_,g),g=t.mul(_,i),y=t.mul(_,n);let S=t.mul(y,g);_=t.pow(S,b);let R=t.eql(_,t.ONE);g=t.mul(y,A),_=t.mul(S,s),y=t.cmov(g,y,R),S=t.cmov(_,S,R);for(let n=p;n>v;n--){let i=n-w;i=w<<i-v;let p=t.pow(S,i),b=t.eql(p,t.ONE);g=t.mul(y,s),s=t.mul(s,s),p=t.mul(S,s),y=t.cmov(g,y,b),S=t.cmov(p,S,b)}return{isValid:R,value:y}};if(t.ORDER%R===S){let i=(t.ORDER-S)/R,s=t.sqrt(t.neg(n));sqrtRatio=(n,p)=>{let b=t.sqr(p),g=t.mul(n,p);b=t.mul(b,g);let y=t.pow(b,i);y=t.mul(y,g);let m=t.mul(y,s),_=t.mul(t.sqr(y),p),v=t.eql(_,n),w=t.cmov(m,y,v);return{isValid:v,value:w}}}return sqrtRatio}
15function mapToCurveSimpleSWU(t,n){if(p.validateField(t),!t.isValid(n.A)||!t.isValid(n.B)||!t.isValid(n.Z))throw Error("mapToCurveSimpleSWU: invalid opts");let i=SWUFpSqrtRatio(t,n.Z);if(!t.isOdd)throw Error("Fp.isOdd is not implemented!");return s=>{let p,b,g,y,m,_,v,w;p=t.sqr(s),p=t.mul(p,n.Z),b=t.sqr(p),b=t.add(b,p),g=t.add(b,t.ONE),g=t.mul(g,n.B),y=t.cmov(n.Z,t.neg(b),!t.eql(b,t.ZERO)),y=t.mul(y,n.A),b=t.sqr(g),_=t.sqr(y),m=t.mul(_,n.A),b=t.add(b,m),b=t.mul(b,g),_=t.mul(_,y),m=t.mul(_,n.B),b=t.add(b,m),v=t.mul(p,g);let{isValid:S,value:R}=i(b,_);w=t.mul(p,s),w=t.mul(w,R),v=t.cmov(v,g,S),w=t.cmov(w,R,S);let T=t.isOdd(s)===t.isOdd(w);return w=t.cmov(t.neg(w),w,T),{x:v=t.div(v,y),y:w}}}},70041:function(t,n,i){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.encodeToCurve=n.hashToCurve=n.schnorr=n.secp256k1=void 0;/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */let s=i(23061),p=i(98089),b=i(37270),g=i(31315),y=i(66998),m=i(4870),_=i(70409),v=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),w=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),S=BigInt(1),R=BigInt(2),divNearest=(t,n)=>(t+n/R)/n;function sqrtMod(t){let n=BigInt(3),i=BigInt(6),s=BigInt(11),p=BigInt(22),b=BigInt(23),g=BigInt(44),m=BigInt(88),_=t*t*t%v,w=_*_*t%v,S=(0,y.pow2)(w,n,v)*w%v,x=(0,y.pow2)(S,n,v)*w%v,A=(0,y.pow2)(x,R,v)*_%v,k=(0,y.pow2)(A,s,v)*A%v,O=(0,y.pow2)(k,p,v)*k%v,P=(0,y.pow2)(O,g,v)*O%v,C=(0,y.pow2)(P,m,v)*P%v,I=(0,y.pow2)(C,g,v)*O%v,L=(0,y.pow2)(I,n,v)*w%v,N=(0,y.pow2)(L,b,v)*k%v,M=(0,y.pow2)(N,i,v)*_%v,B=(0,y.pow2)(M,R,v);if(!T.eql(T.sqr(B),t))throw Error("Cannot find square root");return B}let T=(0,y.Field)(v,void 0,void 0,{sqrt:sqrtMod});n.secp256k1=(0,b.createCurve)({a:BigInt(0),b:BigInt(7),Fp:T,n:w,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:t=>{let n=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),i=-S*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),s=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),p=BigInt("0x100000000000000000000000000000000"),b=divNearest(n*t,w),g=divNearest(-i*t,w),m=(0,y.mod)(t-b*n-g*s,w),_=(0,y.mod)(-b*i-g*n,w),v=m>p,R=_>p;if(v&&(m=w-m),R&&(_=w-_),m>p||_>p)throw Error("splitScalar: Endomorphism failed, k="+t);return{k1neg:v,k1:m,k2neg:R,k2:_}}}},s.sha256);let x=BigInt(0),fe=t=>"bigint"==typeof t&&x<t&&t<v,ge=t=>"bigint"==typeof t&&x<t&&t<w,A={};function taggedHash(t,...n){let i=A[t];if(void 0===i){let n=(0,s.sha256)(Uint8Array.from(t,t=>t.charCodeAt(0)));i=(0,m.concatBytes)(n,n),A[t]=i}return(0,s.sha256)((0,m.concatBytes)(i,...n))}let pointToBytes=t=>t.toRawBytes(!0).slice(1),numTo32b=t=>(0,m.numberToBytesBE)(t,32),modP=t=>(0,y.mod)(t,v),modN=t=>(0,y.mod)(t,w),k=n.secp256k1.ProjectivePoint,GmulAdd=(t,n,i)=>k.BASE.multiplyAndAddUnsafe(t,n,i);function schnorrGetExtPubKey(t){let i=n.secp256k1.utils.normPrivateKeyToScalar(t),s=k.fromPrivateKey(i),p=s.hasEvenY()?i:modN(-i);return{scalar:p,bytes:pointToBytes(s)}}function lift_x(t){if(!fe(t))throw Error("bad x: need 0 < x < p");let n=modP(t*t),i=modP(n*t+BigInt(7)),s=sqrtMod(i);s%R!==x&&(s=modP(-s));let p=new k(t,s,S);return p.assertValidity(),p}function challenge(...t){return modN((0,m.bytesToNumberBE)(taggedHash("BIP0340/challenge",...t)))}function schnorrGetPublicKey(t){return schnorrGetExtPubKey(t).bytes}function schnorrSign(t,n,i=(0,p.randomBytes)(32)){let s=(0,m.ensureBytes)("message",t),{bytes:b,scalar:g}=schnorrGetExtPubKey(n),y=(0,m.ensureBytes)("auxRand",i,32),_=numTo32b(g^(0,m.bytesToNumberBE)(taggedHash("BIP0340/aux",y))),v=taggedHash("BIP0340/nonce",_,b,s),w=modN((0,m.bytesToNumberBE)(v));if(w===x)throw Error("sign failed: k is zero");let{bytes:S,scalar:R}=schnorrGetExtPubKey(w),T=challenge(S,b,s),A=new Uint8Array(64);if(A.set(S,0),A.set(numTo32b(modN(R+T*g)),32),!schnorrVerify(A,s,b))throw Error("sign: Invalid signature produced");return A}
15function schnorrVerify(t,n,i){let s=(0,m.ensureBytes)("signature",t,64),p=(0,m.ensureBytes)("message",n),b=(0,m.ensureBytes)("publicKey",i,32);try{let t=lift_x((0,m.bytesToNumberBE)(b)),n=(0,m.bytesToNumberBE)(s.subarray(0,32));if(!fe(n))return!1;let i=(0,m.bytesToNumberBE)(s.subarray(32,64));if(!ge(i))return!1;let g=challenge(numTo32b(n),pointToBytes(t),p),y=GmulAdd(t,i,modN(-g));if(!y||!y.hasEvenY()||y.toAffine().x!==n)return!1;return!0}catch(t){return!1}}n.schnorr={getPublicKey:schnorrGetPublicKey,sign:schnorrSign,verify:schnorrVerify,utils:{randomPrivateKey:n.secp256k1.utils.randomPrivateKey,lift_x,pointToBytes,numberToBytesBE:m.numberToBytesBE,bytesToNumberBE:m.bytesToNumberBE,taggedHash,mod:y.mod}};let O=(0,g.isogenyMap)(T,[["0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa8c7","0x7d3d4c80bc321d5b9f315cea7fd44c5d595d2fc0bf63b92dfff1044f17c6581","0x534c328d23f234e6e2a413deca25caece4506144037c40314ecbd0b53d9dd262","0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa88c"],["0xd35771193d94918a9ca34ccbb7b640dd86cd409542f8487d9fe6b745781eb49b","0xedadc6f64383dc1df7c4b2d51b54225406d36b641f5e41bbc52a56612a8c6d14","0x0000000000000000000000000000000000000000000000000000000000000001"],["0x4bda12f684bda12f684bda12f684bda12f684bda12f684bda12f684b8e38e23c","0xc75e0c32d5cb7c0fa9d0a54b12a0a6d5647ab046d686da6fdffc90fc201d71a3","0x29a6194691f91a73715209ef6512e576722830a201be2018a765e85a9ecee931","0x2f684bda12f684bda12f684bda12f684bda12f684bda12f684bda12f38e38d84"],["0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffff93b","0x7a06534bb8bdb49fd5e9e6632722c2989467c1bfc8e8d978dfb425d2685c2573","0x6484aa716545ca2cf3a70c3fa8fe337e0a3d21162f0d6299a7bf8192bfd2a76f","0x0000000000000000000000000000000000000000000000000000000000000001"]].map(t=>t.map(t=>BigInt(t)))),P=(0,_.mapToCurveSimpleSWU)(T,{A:BigInt("0x3f8731abdd661adca08a5558f0f5d272e953d363cb6f0e5d405447c01a444533"),B:BigInt("1771"),Z:T.create(BigInt("-11"))}),C=(0,g.createHasher)(n.secp256k1.ProjectivePoint,t=>{let{x:n,y:i}=P(T.create(t[0]));return O(n,i)},{DST:"secp256k1_XMD:SHA-256_SSWU_RO_",encodeDST:"secp256k1_XMD:SHA-256_SSWU_NU_",p:T.ORDER,m:1,k:128,expand:"xmd",hash:s.sha256});n.hashToCurve=C.hashToCurve,n.encodeToCurve=C.encodeToCurve},95053:function(t,n,i){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.secp256k1=void 0;var s=i(70041);Object.defineProperty(n,"secp256k1",{enumerable:!0,get:function(){return s.secp256k1}})},58040:function(t,n,i){"use strict";t=i.nmd(t);var s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(n,"__esModule",{value:!0}),n.crypto=n.utf8ToBytes=n.createView=n.concatBytes=n.toHex=n.bytesToHex=n.assertBytes=n.assertBool=void 0,n.bytesToUtf8=bytesToUtf8,n.hexToBytes=hexToBytes,n.equalsBytes=equalsBytes,n.wrapHash=wrapHash;let p=s(i(27320)),b=i(98089),g=p.default.bool;n.assertBool=g;let y=p.default.bytes;n.assertBytes=y;var m=i(98089);function bytesToUtf8(t){if(!(t instanceof Uint8Array))throw TypeError(`bytesToUtf8 expected Uint8Array, got ${typeof t}`);return new TextDecoder().decode(t)}function hexToBytes(t){let n=t.startsWith("0x")?t.substring(2):t;return(0,b.hexToBytes)(n)}function equalsBytes(t,n){if(t.length!==n.length)return!1;for(let i=0;i<t.length;i++)if(t[i]!==n[i])return!1;return!0}function wrapHash(t){return n=>(p.default.bytes(n),t(n))}Object.defineProperty(n,"bytesToHex",{enumerable:!0,get:function(){return m.bytesToHex}}),Object.defineProperty(n,"toHex",{enumerable:!0,get:function(){return m.bytesToHex}}),Object.defineProperty(n,"concatBytes",{enumerable:!0,get:function(){return m.concatBytes}}),Object.defineProperty(n,"createView",{enumerable:!0,get:function(){return m.createView}}),Object.defineProperty(n,"utf8ToBytes",{enumerable:!0,get:function(){return m.utf8ToBytes}}),n.crypto=(()=>{let n="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0,i="function"==typeof t.require&&t.require.bind(t);return{node:i&&!n?i("crypto"):void 0,web:n}})()},17187:function(t){"use strict";var n,i="object"==typeof Reflect?Reflect:null,s=i&&"function"==typeof i.apply?i.apply:function(t,n,i){return Function.prototype.apply.call(t,n,i)};function ProcessEmitWarning(t){console&&console.warn&&console.warn(t)}n=i&&"function"==typeof i.ownKeys?i.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};var p=Number.isNaN||function(t){return t!=t};function EventEmitter(){EventEmitter.init.call(this)}t.exports=EventEmitter,t.exports.once=once,EventEmitter.EventEmitter=EventEmitter,EventEmitter.prototype._events=void 0,EventEmitter.prototype._eventsCount=0,EventEmitter.prototype._maxListeners=void 0;var b=10;function checkListener(t){if("function"!=typeof t)throw TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}function _getMaxListeners(t){return void 0===t._maxListeners?EventEmitter.defaultMaxListeners:t._maxListeners}function _addListener(t,n,i,s){if(checkListener(i),void 0===(b=t._events)?(b=t._events=Object.create(null),t._eventsCount=0):(void 0!==b.newListener&&(t.emit("newListener",n,i.listener?i.listener:i),b=t._events),g=b[n]),void 0===g)g=b[n]=i,++t._eventsCount;else if("function"==typeof g?g=b[n]=s?[i,g]:[g,i]:s?g.unshift(i):g.push(i),(p=_getMaxListeners(t))>0&&g.length>
15p&&!g.warned){g.warned=!0;var p,b,g,y=Error("Possible EventEmitter memory leak detected. "+g.length+" "+String(n)+" listeners added. Use emitter.setMaxListeners() to increase limit");y.name="MaxListenersExceededWarning",y.emitter=t,y.type=n,y.count=g.length,ProcessEmitWarning(y)}return t}function onceWrapper(){if(!this.fired)return(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0==arguments.length)?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function _onceWrap(t,n,i){var s={fired:!1,wrapFn:void 0,target:t,type:n,listener:i},p=onceWrapper.bind(s);return p.listener=i,s.wrapFn=p,p}function _listeners(t,n,i){var s=t._events;if(void 0===s)return[];var p=s[n];return void 0===p?[]:"function"==typeof p?i?[p.listener||p]:[p]:i?unwrapListeners(p):arrayClone(p,p.length)}function listenerCount(t){var n=this._events;if(void 0!==n){var i=n[t];if("function"==typeof i)return 1;if(void 0!==i)return i.length}return 0}function arrayClone(t,n){for(var i=Array(n),s=0;s<n;++s)i[s]=t[s];return i}function spliceOne(t,n){for(;n+1<t.length;n++)t[n]=t[n+1];t.pop()}function unwrapListeners(t){for(var n=Array(t.length),i=0;i<n.length;++i)n[i]=t[i].listener||t[i];return n}function once(t,n){return new Promise(function(i,s){function errorListener(i){t.removeListener(n,resolver),s(i)}function resolver(){"function"==typeof t.removeListener&&t.removeListener("error",errorListener),i([].slice.call(arguments))}eventTargetAgnosticAddListener(t,n,resolver,{once:!0}),"error"!==n&&addErrorHandlerIfEventEmitter(t,errorListener,{once:!0})})}function addErrorHandlerIfEventEmitter(t,n,i){"function"==typeof t.on&&eventTargetAgnosticAddListener(t,"error",n,i)}function eventTargetAgnosticAddListener(t,n,i,s){if("function"==typeof t.on)s.once?t.once(n,i):t.on(n,i);else if("function"==typeof t.addEventListener)t.addEventListener(n,function wrapListener(p){s.once&&t.removeEventListener(n,wrapListener),i(p)});else throw TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof t)}Object.defineProperty(EventEmitter,"defaultMaxListeners",{enumerable:!0,get:function(){return b},set:function(t){if("number"!=typeof t||t<0||p(t))throw RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");b=t}}),EventEmitter.init=function(){(void 0===this._events||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},EventEmitter.prototype.setMaxListeners=function(t){if("number"!=typeof t||t<0||p(t))throw RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this},EventEmitter.prototype.getMaxListeners=function(){return _getMaxListeners(this)},EventEmitter.prototype.emit=function(t){for(var n=[],i=1;i<arguments.length;i++)n.push(arguments[i]);var p="error"===t,b=this._events;if(void 0!==b)p=p&&void 0===b.error;else if(!p)return!1;if(p){if(n.length>0&&(g=n[0]),g instanceof Error)throw g;var g,y=Error("Unhandled error."+(g?" ("+g.message+")":""));throw y.context=g,y}var m=b[t];if(void 0===m)return!1;if("function"==typeof m)s(m,this,n);else for(var _=m.length,v=arrayClone(m,_),i=0;i<_;++i)s(v[i],this,n);return!0},EventEmitter.prototype.addListener=function(t,n){return _addListener(this,t,n,!1)},EventEmitter.prototype.on=EventEmitter.prototype.addListener,EventEmitter.prototype.prependListener=function(t,n){return _addListener(this,t,n,!0)},EventEmitter.prototype.once=function(t,n){return checkListener(n),this.on(t,_onceWrap(this,t,n)),this},EventEmitter.prototype.prependOnceListener=function(t,n){return checkListener(n),this.prependListener(t,_onceWrap(this,t,n)),this},EventEmitter.prototype.removeListener=function(t,n){var i,s,p,b,g;if(checkListener(n),void 0===(s=this._events)||void 0===(i=s[t]))return this;if(i===n||i.listener===n)0==--this._eventsCount?this._events=Object.create(null):(delete s[t],s.removeListener&&this.emit("removeListener",t,i.listener||n));else if("function"!=typeof i){for(p=-1,b=i.length-1;b>=0;b--)if(i[b]===n||i[b].listener===n){g=i[b].listener,p=b;break}if(p<0)return this;0===p?i.shift():spliceOne(i,p),1===i.length&&(s[t]=i[0]),void 0!==s.removeListener&&this.emit
15("removeListener",t,g||n)}return this},EventEmitter.prototype.off=EventEmitter.prototype.removeListener,EventEmitter.prototype.removeAllListeners=function(t){var n,i,s;if(void 0===(i=this._events))return this;if(void 0===i.removeListener)return 0==arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==i[t]&&(0==--this._eventsCount?this._events=Object.create(null):delete i[t]),this;if(0==arguments.length){var p,b=Object.keys(i);for(s=0;s<b.length;++s)"removeListener"!==(p=b[s])&&this.removeAllListeners(p);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(n=i[t]))this.removeListener(t,n);else if(void 0!==n)for(s=n.length-1;s>=0;s--)this.removeListener(t,n[s]);return this},EventEmitter.prototype.listeners=function(t){return _listeners(this,t,!0)},EventEmitter.prototype.rawListeners=function(t){return _listeners(this,t,!1)},EventEmitter.listenerCount=function(t,n){return"function"==typeof t.listenerCount?t.listenerCount(n):listenerCount.call(t,n)},EventEmitter.prototype.listenerCount=listenerCount,EventEmitter.prototype.eventNames=function(){return this._eventsCount>0?n(this._events):[]}},64063:function(t){"use strict";t.exports=function equal(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){if(t.constructor!==n.constructor)return!1;if(Array.isArray(t)){if((i=t.length)!=n.length)return!1;for(s=i;0!=s--;)if(!equal(t[s],n[s]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if((i=(p=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(s=i;0!=s--;)if(!Object.prototype.hasOwnProperty.call(n,p[s]))return!1;for(s=i;0!=s--;){var i,s,p,b=p[s];if(!equal(t[b],n[b]))return!1}return!0}return t!=t&&n!=n}},4445:function(t){t.exports=stringify,stringify.default=stringify,stringify.stable=deterministicStringify,stringify.stableStringify=deterministicStringify;var n="[...]",i="[Circular]",s=[],p=[];function defaultOptions(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function stringify(t,n,i,b){void 0===b&&(b=defaultOptions()),decirc(t,"",0,[],void 0,0,b);try{g=0===p.length?JSON.stringify(t,n,i):JSON.stringify(t,replaceGetterValues(n),i)}catch(t){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==s.length;){var g,y=s.pop();4===y.length?Object.defineProperty(y[0],y[1],y[3]):y[0][y[1]]=y[2]}}return g}function setReplace(t,n,i,b){var g=Object.getOwnPropertyDescriptor(b,i);void 0!==g.get?g.configurable?(Object.defineProperty(b,i,{value:t}),s.push([b,i,n,g])):p.push([n,i,t]):(b[i]=t,s.push([b,i,n]))}function decirc(t,s,p,b,g,y,m){if(y+=1,"object"==typeof t&&null!==t){for(_=0;_<b.length;_++)if(b[_]===t){setReplace(i,t,s,g);return}if(void 0!==m.depthLimit&&y>m.depthLimit||void 0!==m.edgesLimit&&p+1>m.edgesLimit){setReplace(n,t,s,g);return}if(b.push(t),Array.isArray(t))for(_=0;_<t.length;_++)decirc(t[_],_,_,b,t,y,m);else{var _,v=Object.keys(t);for(_=0;_<v.length;_++){var w=v[_];decirc(t[w],w,_,b,t,y,m)}}b.pop()}}function compareFunction(t,n){return t<n?-1:t>n?1:0}function deterministicStringify(t,n,i,b){void 0===b&&(b=defaultOptions());var g,y=deterministicDecirc(t,"",0,[],void 0,0,b)||t;try{g=0===p.length?JSON.stringify(y,n,i):JSON.stringify(y,replaceGetterValues(n),i)}catch(t){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==s.length;){var m=s.pop();4===m.length?Object.defineProperty(m[0],m[1],m[3]):m[0][m[1]]=m[2]}}return g}function deterministicDecirc(t,p,b,g,y,m,_){if(m+=1,"object"==typeof t&&null!==t){for(v=0;v<g.length;v++)if(g[v]===t){setReplace(i,t,p,y);return}try{if("function"==typeof t.toJSON)return}catch(t){return}if(void 0!==_.depthLimit&&m>_.depthLimit||void 0!==_.edgesLimit&&b+1>_.edgesLimit){setReplace(n,t,p,y);return}if(g.push(t),Array.isArray(t))for(v=0;v<t.length;v++)deterministicDecirc(t[v],v,v,g,t,m,_);else{var v,w={},S=Object.keys(t).sort(compareFunction);for(v=0;v<S.length;v++){var R=S[v];deterministicDecirc(t[R],R,v,g,t,m,_),w[R]=t[R]}if(void 0===y)return w;s.push([y,p,t]),y[p]=w}g.pop()}}function replaceGetterValues(t){return t=void 0!==t?t:function(t,n){return n}
15,function(n,i){if(p.length>0)for(var s=0;s<p.length;s++){var b=p[s];if(b[1]===n&&b[0]===i){i=b[2],p.splice(s,1);break}}return t.call(this,n,i)}}},98611:function(t){"use strict";t.exports=function(t){return t!=t}},20360:function(t,n,i){"use strict";var s=i(55559),p=i(4289),b=i(98611),g=i(29415),y=i(23194),m=s(g(),Number);p(m,{getPolyfill:g,implementation:b,shim:y}),t.exports=m},29415:function(t,n,i){"use strict";var s=i(98611);t.exports=function(){return Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN("a")?Number.isNaN:s}},23194:function(t,n,i){"use strict";var s=i(4289),p=i(29415);t.exports=function(){var t=p();return s(Number,{isNaN:t},{isNaN:function(){return Number.isNaN!==t}}),t}},24970:function(t){"use strict";let isStream=t=>null!==t&&"object"==typeof t&&"function"==typeof t.pipe;isStream.writable=t=>isStream(t)&&!1!==t.writable&&"function"==typeof t._write&&"object"==typeof t._writableState,isStream.readable=t=>isStream(t)&&!1!==t.readable&&"function"==typeof t._read&&"object"==typeof t._readableState,isStream.duplex=t=>isStream.writable(t)&&isStream.readable(t),isStream.transform=t=>isStream.duplex(t)&&"function"==typeof t._transform,t.exports=isStream},23420:function(t){t.exports=IdIterator;function IdIterator(t){var n=(t=t||{}).max||Number.MAX_SAFE_INTEGER,i=void 0!==t.start?t.start:Math.floor(Math.random()*n);return function(){return i%=n,i++}}},95811:function(t,n,i){t.exports=i(26066)(i(79653))},26066:function(t,n,i){let s=i(37016),p=i(5675);t.exports=function(t){let n=s(t),i=p(t);return function(t,s){let p="string"==typeof t?t.toLowerCase():t;switch(p){case"keccak224":return new n(1152,448,null,224,s);case"keccak256":return new n(1088,512,null,256,s);case"keccak384":return new n(832,768,null,384,s);case"keccak512":return new n(576,1024,null,512,s);case"sha3-224":return new n(1152,448,6,224,s);case"sha3-256":return new n(1088,512,6,256,s);case"sha3-384":return new n(832,768,6,384,s);case"sha3-512":return new n(576,1024,6,512,s);case"shake128":return new i(1344,256,31,s);case"shake256":return new i(1088,512,31,s);default:throw Error("Invald algorithm: "+t)}}}},37016:function(t,n,i){var s=i(48764).Buffer;let{Transform:p}=i(88473);t.exports=t=>class Keccak extends p{constructor(n,i,s,p,b){super(b),this._rate=n,this._capacity=i,this._delimitedSuffix=s,this._hashBitLength=p,this._options=b,this._state=new t,this._state.initialize(n,i),this._finalized=!1}_transform(t,n,i){let s=null;try{this.update(t,n)}catch(t){s=t}i(s)}_flush(t){let n=null;try{this.push(this.digest())}catch(t){n=t}t(n)}update(t,n){if(!s.isBuffer(t)&&"string"!=typeof t)throw TypeError("Data must be a string or a buffer");if(this._finalized)throw Error("Digest already called");return s.isBuffer(t)||(t=s.from(t,n)),this._state.absorb(t),this}digest(t){if(this._finalized)throw Error("Digest already called");this._finalized=!0,this._delimitedSuffix&&this._state.absorbLastFewBits(this._delimitedSuffix);let n=this._state.squeeze(this._hashBitLength/8);return void 0!==t&&(n=n.toString(t)),this._resetState(),n}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){let t=new Keccak(this._rate,this._capacity,this._delimitedSuffix,this._hashBitLength,this._options);return this._state.copy(t._state),t._finalized=this._finalized,t}}},5675:function(t,n,i){var s=i(48764).Buffer;let{Transform:p}=i(88473);t.exports=t=>class Shake extends p{constructor(n,i,s,p){super(p),this._rate=n,this._capacity=i,this._delimitedSuffix=s,this._options=p,this._state=new t,this._state.initialize(n,i),this._finalized=!1}_transform(t,n,i){let s=null;try{this.update(t,n)}catch(t){s=t}i(s)}_flush(){}_read(t){this.push(this.squeeze(t))}update(t,n){if(!s.isBuffer(t)&&"string"!=typeof t)throw TypeError("Data must be a string or a buffer");if(this._finalized)throw Error("Squeeze already called");return s.isBuffer(t)||(t=s.from(t,n)),this._state.absorb(t),this}squeeze(t,n){this._finalized||(this._finalized=!0,this._state.absorbLastFewBits(this._delimitedSuffix));let i=this._state.squeeze(t);return void 0!==n&&(i=i.toString(n)),i}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){let t=new Shake(this._rate,this._capacity,this._delimitedSuffix,this._options);return this._state.copy(t._state),t._finalized=this._finalized,t}}},34040:function(t,n){let i=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648];n.p1600=function(t){for(let n=0;n<24;++n){let s=t[0]^t[10]^t[20]^t[30]^t[40],p=t[1]^t[11]^t[21]^t[31]^t[41],b=t[2]^t[12]^t[22]^t[32]^t[42],g=t[3]^t[13]^t[23]^t[33]^t[43],y=t[4]^t[14]^t[24]^t[34]^t[44],m=t[5]^t[15]^t[25]^t[35]^t[45],_=t[6]^t[16]^t[26]^t[3
156]^t[46],v=t[7]^t[17]^t[27]^t[37]^t[47],w=t[8]^t[18]^t[28]^t[38]^t[48],S=t[9]^t[19]^t[29]^t[39]^t[49],R=w^(b<<1|g>>>31),T=S^(g<<1|b>>>31),x=t[0]^R,A=t[1]^T,k=t[10]^R,O=t[11]^T,P=t[20]^R,C=t[21]^T,I=t[30]^R,L=t[31]^T,N=t[40]^R,M=t[41]^T;R=s^(y<<1|m>>>31),T=p^(m<<1|y>>>31);let B=t[2]^R,j=t[3]^T,D=t[12]^R,F=t[13]^T,W=t[22]^R,q=t[23]^T,U=t[32]^R,$=t[33]^T,H=t[42]^R,z=t[43]^T;R=b^(_<<1|v>>>31),T=g^(v<<1|_>>>31);let V=t[4]^R,G=t[5]^T,Z=t[14]^R,J=t[15]^T,K=t[24]^R,Y=t[25]^T,X=t[34]^R,Q=t[35]^T,ee=t[44]^R,et=t[45]^T;R=y^(w<<1|S>>>31),T=m^(S<<1|w>>>31);let er=t[6]^R,en=t[7]^T,ei=t[16]^R,eo=t[17]^T,ea=t[26]^R,es=t[27]^T,el=t[36]^R,eu=t[37]^T,ec=t[46]^R,ed=t[47]^T;R=_^(s<<1|p>>>31),T=v^(p<<1|s>>>31);let ef=t[8]^R,eh=t[9]^T,ep=t[18]^R,eb=t[19]^T,eg=t[28]^R,ey=t[29]^T,em=t[38]^R,e_=t[39]^T,ev=t[48]^R,ew=t[49]^T,eE=O<<4|k>>>28,eS=k<<4|O>>>28,eR=P<<3|C>>>29,eT=C<<3|P>>>29,ex=L<<9|I>>>23,eA=I<<9|L>>>23,ek=N<<18|M>>>14,eO=M<<18|N>>>14,eP=B<<1|j>>>31,eC=j<<1|B>>>31,eI=F<<12|D>>>20,eL=D<<12|F>>>20,eN=W<<10|q>>>22,eM=q<<10|W>>>22,eB=$<<13|U>>>19,ej=U<<13|$>>>19,eD=H<<2|z>>>30,eF=z<<2|H>>>30,eW=G<<30|V>>>2,eU=V<<30|G>>>2,e$=Z<<6|J>>>26,eH=J<<6|Z>>>26,ez=Y<<11|K>>>21,eV=K<<11|Y>>>21,eG=X<<15|Q>>>17,eZ=Q<<15|X>>>17,eJ=et<<29|ee>>>3,eK=ee<<29|et>>>3,eY=er<<28|en>>>4,eX=en<<28|er>>>4,eQ=eo<<23|ei>>>9,e0=ei<<23|eo>>>9,e1=ea<<25|es>>>7,e2=es<<25|ea>>>7,e3=el<<21|eu>>>11,e8=eu<<21|el>>>11,e4=ed<<24|ec>>>8,e6=ec<<24|ed>>>8,e5=ef<<27|eh>>>5,e7=eh<<27|ef>>>5,e9=ep<<20|eb>>>12,te=eb<<20|ep>>>12,tt=ey<<7|eg>>>25,tr=eg<<7|ey>>>25,tn=em<<8|e_>>>24,ti=e_<<8|em>>>24,to=ev<<14|ew>>>18,ta=ew<<14|ev>>>18;t[0]=x^~eI&ez,t[1]=A^~eL&eV,t[10]=eY^~e9&eR,t[11]=eX^~te&eT,t[20]=eP^~e$&e1,t[21]=eC^~eH&e2,t[30]=e5^~eE&eN,t[31]=e7^~eS&eM,t[40]=eW^~eQ&tt,t[41]=eU^~e0&tr,t[2]=eI^~ez&e3,t[3]=eL^~eV&e8,t[12]=e9^~eR&eB,t[13]=te^~eT&ej,t[22]=e$^~e1&tn,t[23]=eH^~e2&ti,t[32]=eE^~eN&eG,t[33]=eS^~eM&eZ,t[42]=eQ^~tt&ex,t[43]=e0^~tr&eA,t[4]=ez^~e3&to,t[5]=eV^~e8&ta,t[14]=eR^~eB&eJ,t[15]=eT^~ej&eK,t[24]=e1^~tn&ek,t[25]=e2^~ti&eO,t[34]=eN^~eG&e4,t[35]=eM^~eZ&e6,t[44]=tt^~ex&eD,t[45]=tr^~eA&eF,t[6]=e3^~to&x,t[7]=e8^~ta&A,t[16]=eB^~eJ&eY,t[17]=ej^~eK&eX,t[26]=tn^~ek&eP,t[27]=ti^~eO&eC,t[36]=eG^~e4&e5,t[37]=eZ^~e6&e7,t[46]=ex^~eD&eW,t[47]=eA^~eF&eU,t[8]=to^~x&eI,t[9]=ta^~A&eL,t[18]=eJ^~eY&e9,t[19]=eK^~eX&te,t[28]=ek^~eP&e$,t[29]=eO^~eC&eH,t[38]=e4^~e5&eE,t[39]=e6^~e7&eS,t[48]=eD^~eW&eQ,t[49]=eF^~eU&e0,t[0]^=i[2*n],t[1]^=i[2*n+1]}}},79653:function(t,n,i){var s=i(48764).Buffer;let p=i(34040);function Keccak(){this.state=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.blockSize=null,this.count=0,this.squeezing=!1}Keccak.prototype.initialize=function(t,n){for(let t=0;t<50;++t)this.state[t]=0;this.blockSize=t/8,this.count=0,this.squeezing=!1},Keccak.prototype.absorb=function(t){for(let n=0;n<t.length;++n)this.state[~~(this.count/4)]^=t[n]<<8*(this.count%4),this.count+=1,this.count===this.blockSize&&(p.p1600(this.state),this.count=0)},Keccak.prototype.absorbLastFewBits=function(t){this.state[~~(this.count/4)]^=t<<8*(this.count%4),(128&t)!=0&&this.count===this.blockSize-1&&p.p1600(this.state),this.state[~~((this.blockSize-1)/4)]^=128<<8*((this.blockSize-1)%4),p.p1600(this.state),this.count=0,this.squeezing=!0},Keccak.prototype.squeeze=function(t){this.squeezing||this.absorbLastFewBits(1);let n=s.alloc(t);for(let i=0;i<t;++i)n[i]=this.state[~~(this.count/4)]>>>8*(this.count%4)&255,this.count+=1,this.count===this.blockSize&&(p.p1600(this.state),this.count=0);return n},Keccak.prototype.copy=function(t){for(let n=0;n<50;++n)t.state[n]=this.state[n];t.blockSize=this.blockSize,t.count=this.count,t.squeezing=this.squeezing},t.exports=Keccak},72378:function(t,n,i){t=i.nmd(t);var s,p="__lodash_hash_undefined__",b="[object Arguments]",g="[object Function]",y="[object Object]",m=/^\[object .+?Constructor\]$/,_=/^(?:0|[1-9]\d*)$/,v={};v["[object Float32Array]"]=v["[object Float64Array]"]=v["[object Int8Array]"]=v["[object Int16Array]"]=v["[object Int32Array]"]=v["[object Uint8Array]"]=v["[object Uint8ClampedArray]"]=v["[object Uint16Array]"]=v["[object Uint32Array]"]=!0,v[b]=v["[object Array]"]=v["[object ArrayBuffer]"]=v["[object Boolean]"]=v["[object DataView]"]=v["[object Date]"]=v["[object Error]"]=v[g]=v["[object Map]"]=v["[object Number]"]=v[y]=v["[object RegExp]"]=v["[object Set]"]=v["[object String]"]=v["[object WeakMap]"]=!1;var w="object"==typeof i.g&&i.g&&i.g.Object===Object&&i.g,S="object"==typeof self&&self&&self.Object===Object&&self,R=w||S||Function("return this")(),T=n&&!n.nodeType&&n,x=T&&t&&!t.nodeType&&t,A=x&&x.exports===T,k=A&&w.process,O=function(){try{var t=x&&x.require&&x.require("util").t
vendor: 5,043 bytes, line 15
15ypes;if(t)return t;return k&&k.binding&&k.binding("util")}catch(t){}}(),P=O&&O.isTypedArray;function apply(t,n,i){switch(i.length){case 0:return t.call(n);case 1:return t.call(n,i[0]);case 2:return t.call(n,i[0],i[1]);case 3:return t.call(n,i[0],i[1],i[2])}return t.apply(n,i)}function baseTimes(t,n){for(var i=-1,s=Array(t);++i<t;)s[i]=n(i);return s}function baseUnary(t){return function(n){return t(n)}}function getValue(t,n){return null==t?void 0:t[n]}function overArg(t,n){return function(i){return t(n(i))}}var C=Array.prototype,I=Function.prototype,L=Object.prototype,N=R["__core-js_shared__"],M=I.toString,B=L.hasOwnProperty,j=(s=/[^.]+$/.exec(N&&N.keys&&N.keys.IE_PROTO||""))?"Symbol(src)_1."+s:"",D=L.toString,F=M.call(Object),W=RegExp("^"+M.call(B).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),q=A?R.Buffer:void 0,U=R.Symbol,$=R.Uint8Array,H=q?q.allocUnsafe:void 0,z=overArg(Object.getPrototypeOf,Object),V=Object.create,G=L.propertyIsEnumerable,Z=C.splice,J=U?U.toStringTag:void 0,K=function(){try{var t=getNative(Object,"defineProperty");return t({},"",{}),t}catch(t){}}(),Y=q?q.isBuffer:void 0,X=Math.max,Q=Date.now,ee=getNative(R,"Map"),et=getNative(Object,"create"),er=function(){function object(){}return function(t){if(!isObject(t))return{};if(V)return V(t);object.prototype=t;var n=new object;return object.prototype=void 0,n}}();function Hash(t){var n=-1,i=null==t?0:t.length;for(this.clear();++n<i;){var s=t[n];this.set(s[0],s[1])}}function hashClear(){this.__data__=et?et(null):{},this.size=0}function hashDelete(t){var n=this.has(t)&&delete this.__data__[t];return this.size-=n?1:0,n}function hashGet(t){var n=this.__data__;if(et){var i=n[t];return i===p?void 0:i}return B.call(n,t)?n[t]:void 0}function hashHas(t){var n=this.__data__;return et?void 0!==n[t]:B.call(n,t)}function hashSet(t,n){var i=this.__data__;return this.size+=this.has(t)?0:1,i[t]=et&&void 0===n?p:n,this}function ListCache(t){var n=-1,i=null==t?0:t.length;for(this.clear();++n<i;){var s=t[n];this.set(s[0],s[1])}}function listCacheClear(){this.__data__=[],this.size=0}function listCacheDelete(t){var n=this.__data__,i=assocIndexOf(n,t);return!(i<0)&&(i==n.length-1?n.pop():Z.call(n,i,1),--this.size,!0)}function listCacheGet(t){var n=this.__data__,i=assocIndexOf(n,t);return i<0?void 0:n[i][1]}function listCacheHas(t){return assocIndexOf(this.__data__,t)>-1}function listCacheSet(t,n){var i=this.__data__,s=assocIndexOf(i,t);return s<0?(++this.size,i.push([t,n])):i[s][1]=n,this}function MapCache(t){var n=-1,i=null==t?0:t.length;for(this.clear();++n<i;){var s=t[n];this.set(s[0],s[1])}}function mapCacheClear(){this.size=0,this.__data__={hash:new Hash,map:new(ee||ListCache),string:new Hash}}function mapCacheDelete(t){var n=getMapData(this,t).delete(t);return this.size-=n?1:0,n}function mapCacheGet(t){return getMapData(this,t).get(t)}function mapCacheHas(t){return getMapData(this,t).has(t)}function mapCacheSet(t,n){var i=getMapData(this,t),s=i.size;return i.set(t,n),this.size+=i.size==s?0:1,this}function Stack(t){var n=this.__data__=new ListCache(t);this.size=n.size}function stackClear(){this.__data__=new ListCache,this.size=0}function stackDelete(t){var n=this.__data__,i=n.delete(t);return this.size=n.size,i}function stackGet(t){return this.__data__.get(t)}function stackHas(t){return this.__data__.has(t)}function stackSet(t,n){var i=this.__data__;if(i instanceof ListCache){var s=i.__data__;if(!ee||s.length<199)return s.push([t,n]),this.size=++i.size,this;i=this.__data__=new MapCache(s)}return i.set(t,n),this.size=i.size,this}function arrayLikeKeys(t,n){var i=ea(t),s=!i&&eo(t),p=!i&&!s&&es(t),b=!i&&!s&&!p&&el(t),g=i||s||p||b,y=g?baseTimes(t.length,String):[],m=y.length;for(var _ in t)(n||B.call(t,_))&&!(g&&("length"==_||p&&("offset"==_||"parent"==_)||b&&("buffer"==_||"byteLength"==_||"byteOffset"==_)||isIndex(_,m)))&&y.push(_);return y}function assignMergeValue(t,n,i){(void 0===i||eq(t[n],i))&&(void 0!==i||n in t)||baseAssignValue(t,n,i)}function assignValue(t,n,i){var s=t[n];B.call(t,n)&&eq(s,i)&&(void 0!==i||n in t)||baseAssignValue(t,n,i)}function assocIndexOf(t,n){for(var i=t.length;i--;)if(eq(t[i][0],n))return i;return -1}function baseAssignValue(t,n,i){"__proto__"==n&&K?K(t,n,{configurable:!0,enumerable:!0,value:i,writable:!0}):t[n]=i}Hash.prototype.clear=hashClear,Hash.prototype.delete=hashDelete,Hash.prototype.get=hashGet,Hash.prototype.has=hashHas,Hash.prototype.set=hashSet,ListCache.prototype.clear=listCacheClear,ListCache.prototype.delete=listCacheDelete,ListCache.prototype.get=listCacheGet,ListCache.prototype.has=listCacheHas,ListCache.prototype.set=listCacheSet,MapCache.prototype.clear=mapCacheClear,MapCache.prototype.delete=mapCacheDelete,MapCache.prototype.get=mapCacheGet,MapCache.prototype.has=mapCacheHas,MapCache.prototype.set=mapCacheSet,Stack.prototype.clear=stackClear,Stack.prototype.delete=stackDelete,Stack.prototype.get=stackGet,Stack.prototype.has=stackHas,Stack.prototype.set=stackSet;var en=createBaseFor();
15function baseGetTag(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":J&&J in Object(t)?getRawTag(t):objectToString(t)}function baseIsArguments(t){return isObjectLike(t)&&baseGetTag(t)==b}function baseIsNative(t){return!(!isObject(t)||isMasked(t))&&(isFunction(t)?W:m).test(toSource(t))}function baseIsTypedArray(t){return isObjectLike(t)&&isLength(t.length)&&!!v[baseGetTag(t)]}function baseKeysIn(t){if(!isObject(t))return nativeKeysIn(t);var n=isPrototype(t),i=[];for(var s in t)"constructor"==s&&(n||!B.call(t,s))||i.push(s);return i}function baseMerge(t,n,i,s,p){t!==n&&en(n,function(b,g){if(p||(p=new Stack),isObject(b))baseMergeDeep(t,n,g,i,baseMerge,s,p);else{var y=s?s(safeGet(t,g),b,g+"",t,n,p):void 0;void 0===y&&(y=b),assignMergeValue(t,g,y)}},keysIn)}function baseMergeDeep(t,n,i,s,p,b,g){var y=safeGet(t,i),m=safeGet(n,i),_=g.get(m);if(_){assignMergeValue(t,i,_);return}var v=b?b(y,m,i+"",t,n,g):void 0,w=void 0===v;if(w){var S=ea(m),R=!S&&es(m),T=!S&&!R&&el(m);v=m,S||R||T?ea(y)?v=y:isArrayLikeObject(y)?v=copyArray(y):R?(w=!1,v=cloneBuffer(m,!0)):T?(w=!1,v=cloneTypedArray(m,!0)):v=[]:isPlainObject(m)||eo(m)?(v=y,eo(y)?v=toPlainObject(y):(!isObject(y)||isFunction(y))&&(v=initCloneObject(m))):w=!1}w&&(g.set(m,v),p(v,m,s,b,g),g.delete(m)),assignMergeValue(t,i,v)}function baseRest(t,n){return ei(overRest(t,n,identity),t+"")}function cloneBuffer(t,n){if(n)return t.slice();var i=t.length,s=H?H(i):new t.constructor(i);return t.copy(s),s}function cloneArrayBuffer(t){var n=new t.constructor(t.byteLength);return new $(n).set(new $(t)),n}function cloneTypedArray(t,n){var i=n?cloneArrayBuffer(t.buffer):t.buffer;return new t.constructor(i,t.byteOffset,t.length)}function copyArray(t,n){var i=-1,s=t.length;for(n||(n=Array(s));++i<s;)n[i]=t[i];return n}function copyObject(t,n,i,s){var p=!i;i||(i={});for(var b=-1,g=n.length;++b<g;){var y=n[b],m=s?s(i[y],t[y],y,i,t):void 0;void 0===m&&(m=t[y]),p?baseAssignValue(i,y,m):assignValue(i,y,m)}return i}function createAssigner(t){return baseRest(function(n,i){var s=-1,p=i.length,b=p>1?i[p-1]:void 0,g=p>2?i[2]:void 0;for(b=t.length>3&&"function"==typeof b?(p--,b):void 0,g&&isIterateeCall(i[0],i[1],g)&&(b=p<3?void 0:b,p=1),n=Object(n);++s<p;){var y=i[s];y&&t(n,y,s,b)}return n})}function createBaseFor(t){return function(n,i,s){for(var p=-1,b=Object(n),g=s(n),y=g.length;y--;){var m=g[t?y:++p];if(!1===i(b[m],m,b))break}return n}}function getMapData(t,n){var i=t.__data__;return isKeyable(n)?i["string"==typeof n?"string":"hash"]:i.map}function getNative(t,n){var i=getValue(t,n);return baseIsNative(i)?i:void 0}function getRawTag(t){var n=B.call(t,J),i=t[J];try{t[J]=void 0;var s=!0}catch(t){}var p=D.call(t);return s&&(n?t[J]=i:delete t[J]),p}function initCloneObject(t){return"function"!=typeof t.constructor||isPrototype(t)?{}:er(z(t))}function isIndex(t,n){var i=typeof t;return!!(n=null==n?9007199254740991:n)&&("number"==i||"symbol"!=i&&_.test(t))&&t>-1&&t%1==0&&t<n}function isIterateeCall(t,n,i){if(!isObject(i))return!1;var s=typeof n;return("number"==s?!!(isArrayLike(i)&&isIndex(n,i.length)):"string"==s&&n in i)&&eq(i[n],t)}function isKeyable(t){var n=typeof t;return"string"==n||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==t:null===t}function isMasked(t){return!!j&&j in t}function isPrototype(t){var n=t&&t.constructor;return t===("function"==typeof n&&n.prototype||L)}function nativeKeysIn(t){var n=[];if(null!=t)for(var i in Object(t))n.push(i);return n}function objectToString(t){return D.call(t)}function overRest(t,n,i){return n=X(void 0===n?t.length-1:n,0),function(){for(var s=arguments,p=-1,b=X(s.length-n,0),g=Array(b);++p<b;)g[p]=s[n+p];p=-1;for(var y=Array(n+1);++p<n;)y[p]=s[p];return y[n]=i(g),apply(t,this,y)}}function safeGet(t,n){if(("constructor"!==n||"function"!=typeof t[n])&&"__proto__"!=n)return t[n]}var ei=shortOut(K?function(t,n){return K(t,"toString",{configurable:!0,enumerable:!1,value:constant(n),writable:!0})}:identity);function shortOut(t){var n=0,i=0;return function(){var s=Q(),p=16-(s-i);if(i=s,p>0){if(++n>=800)return arguments[0]}else n=0;return t.apply(void 0,arguments)}}function toSource(t){if(null!=t){try{return M.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function eq(t,n){return t===n||t!=t&&n!=n}var eo=baseIsArguments(function(){return arguments}())?baseIsArguments:function(t){return isObjectLike(t)&&B.call(t,"callee")&&!G.call(t,"callee")},ea=Array.isArray;function isArrayLike(t){return null!=t&&isLength(t.length)&&!isFunction(t)}function isArrayLikeObject(t){return isObjectLike(t)&&isArrayLike(t)}var es=Y||stubFalse;function isFunction(t){if(!isObject(t))return!1;var n=baseGetTag(t);return n==g||"[object GeneratorFunction]"==n||"[object AsyncFunction]"==n||"[object Proxy]"==n}function isLength(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}function isObject(t){var n=typeof t;return null!=t&&("object"==n||"function"==n)}function isObjectLike(t){return null!=t&&"object"==typeof t}function isPlainObject(t){if(!isObjectLike(t)||baseGetTag(t)!=y)return!1;var n=z(t);if(null===n)return!0;var i=B.call(n,"constructor")&&n.constructor;return"function"==typeof i&&i instanceof i&&M.call(i)==F}var el=P?baseUnary(P):baseIsTypedArray;function toPlainObject(t){return copyObject(t,keysIn(t))}function keysIn(t){return isArrayLike(t)?arrayLikeKeys(t,!0):baseKeysIn(t)}var eu=createAssigner(function(t,n,i){baseMerge(t,n,i)});function constant(t){return function(){return t}}function identity(t){return t}function stubFalse(){return!1}t.exports=eu},2043:function(t,n,i){var s,p;void 0!==(p="function"==typeof(s=function(){"use strict";var noop=function(){},t="undefined",n=typeof window!==t&&typeof window.navigator!==t&&/Trident\/|MSIE /.test(window.navigator.userAgent),i=["trace","debug","info","warn","error"],s={},p=null;function bindMethod(t,n){var i=t[n];if("function"==typeof i.bind)return i.bind(t);try{return Function.prototype.bind.call(i,t)}catch(n){return function(){return Function.prototype.apply.apply(i,[t,arguments])}}}function traceForIE(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function realMethod(i){return"debug"===i&&(i="log"),typeof console!==t&&("trace"===i&&n?traceForIE:void 0!==console[i]?bindMethod(console,i):void 0!==console.log?bindMethod(console,"log"):noop)}function replaceLoggingMethods(){for(var n=this.getLevel(),s=0;s<i.length;s++){var p=i[s];this[p]=s<n?noop:this.methodFactory(p,n,this.name)}if(this.log=this.debug,typeof console===t&&n<this.levels.SILENT)return"No console available for logging"}function enableLoggingWhenConsoleArrives(n){return function(){typeof console!==t&&(replaceLoggingMethods.call(this),this[n].apply(this,arguments))}}function defaultMethodFactory(t,n,i){return realMethod(t)||enableLoggingWhenConsoleArrives.apply(this,arguments)}function Logger(n,b){var g,y,m,_=this,v="loglevel";function persistLevelIfPossible(n){var s=(i[n]||"silent").toUpperCase();if(typeof window!==t&&v){try{window.localStorage[v]=s;return}catch(t){}try{window.document.cookie=encodeURIComponent(v)+"="+s+";"}catch(t){}}}function getPersistedLevel(){var n;if(typeof window!==t&&v){try{n=window.localStorage[v]}catch(t){}if(typeof n===t)try{var i=window.document.cookie,s=encodeURIComponent(v),p=i.indexOf(s+"=");-1!==p&&(n=/^([^;]+)/.exec(i.slice(p+s.length+1))[1])}catch(t){}return void 0===_.levels[n]&&(n=void 0),n}}function clearPersistedLevel(){if(typeof window!==t&&v){try{window.localStorage.removeItem(v)}catch(t){}try{window.document.cookie=encodeURIComponent(v)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch(t){}}}function normalizeLevel(t){var n=t;if("string"==typeof n&&void 0!==_.levels[n.toUpperCase()]&&(n=_.levels[n.toUpperCase()]),"number"==typeof n&&n>=0&&n<=_.levels.SILENT)return n;
15throw TypeError("log.setLevel() called with invalid level: "+t)}"string"==typeof n?v+=":"+n:"symbol"==typeof n&&(v=void 0),_.name=n,_.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},_.methodFactory=b||defaultMethodFactory,_.getLevel=function(){return null!=m?m:null!=y?y:g},_.setLevel=function(t,n){return m=normalizeLevel(t),!1!==n&&persistLevelIfPossible(m),replaceLoggingMethods.call(_)},_.setDefaultLevel=function(t){y=normalizeLevel(t),getPersistedLevel()||_.setLevel(t,!1)},_.resetLevel=function(){m=null,clearPersistedLevel(),replaceLoggingMethods.call(_)},_.enableAll=function(t){_.setLevel(_.levels.TRACE,t)},_.disableAll=function(t){_.setLevel(_.levels.SILENT,t)},_.rebuild=function(){if(p!==_&&(g=normalizeLevel(p.getLevel())),replaceLoggingMethods.call(_),p===_)for(var t in s)s[t].rebuild()},g=normalizeLevel(p?p.getLevel():"WARN");var w=getPersistedLevel();null!=w&&(m=normalizeLevel(w)),replaceLoggingMethods.call(_)}(p=new Logger).getLogger=function(t){if("symbol"!=typeof t&&"string"!=typeof t||""===t)throw TypeError("You must supply a name when creating a logger.");var n=s[t];return n||(n=s[t]=new Logger(t,p.methodFactory)),n};var b=typeof window!==t?window.log:void 0;return p.noConflict=function(){return typeof window!==t&&window.log===p&&(window.log=b),p},p.getLoggers=function(){return s},p.default=p,p})?s.call(n,i,n,t):s)&&(t.exports=p)},64898:function(t,n,i){"use strict";var s=i(48764).Buffer,p=i(34155);Object.defineProperty(n,"__esModule",{value:!0}),n.InvalidStatusCodeError=n.InvalidCertError=void 0;let b=Object.freeze({redirect:!0,expectStatusCode:200,headers:{},full:!1,keepAlive:!0,cors:!1,referrer:!1,sslAllowSelfSigned:!1,_redirectCount:0});let InvalidCertError=class InvalidCertError extends Error{constructor(t,n){super(t),this.fingerprint256=n}};n.InvalidCertError=InvalidCertError;let InvalidStatusCodeError=class InvalidStatusCodeError extends Error{constructor(t){super(`Request Failed. Status Code: ${t}`),this.statusCode=t}};function detectType(t,n){if(!n||"text"===n||"json"===n)try{let i=new TextDecoder("utf8",{fatal:!0}).decode(t);if("text"===n)return i;try{return JSON.parse(i)}catch(t){if("json"===n)throw t;return i}}catch(t){if("text"===n||"json"===n)throw t}return t}n.InvalidStatusCodeError=InvalidStatusCodeError;let g={};function fetchNode(t,n){let p={...b,...n},y=i(22321),m=i(78428),_=i(47715),{promisify:v}=i(89539),{resolve:w}=i(11987),S=!!/^https/.test(t),R={method:p.method||"GET",headers:{"Accept-Encoding":"gzip, deflate, br"}},compactFP=t=>t.replace(/:| /g,"").toLowerCase();if(p.keepAlive){let t=[S,S&&p.sslPinnedCertificates?.map(t=>compactFP(t)).sort()].join();R.agent=g[t]||(g[t]=new(S?m:y).Agent({keepAlive:!0,keepAliveMsecs:3e4,maxFreeSockets:1024,maxCachedSessions:1024}))}"json"===p.type&&(R.headers["Content-Type"]="application/json"),p.data&&(p.method||(R.method="POST"),R.body="json"===p.type?JSON.stringify(p.data):p.data),R.headers={...R.headers,...p.headers},p.sslAllowSelfSigned&&(R.rejectUnauthorized=!1);let handleRes=async n=>{let i=n.statusCode;if(p.redirect&&300<=i&&i<400&&n.headers.location){if(10==p._redirectCount)throw Error("Request failed. Too much redirects.");return p._redirectCount+=1,await fetchNode(w(t,n.headers.location),p)}if(p.expectStatusCode&&i!==p.expectStatusCode)throw n.resume(),new InvalidStatusCodeError(i);let b=[];for await(let t of n)b.push(t);let g=s.concat(b),y=n.headers["content-encoding"];"br"===y&&(g=await v(_.brotliDecompress)(g)),("gzip"===y||"deflate"===y)&&(g=await v(_.unzip)(g));let m=detectType(g,p.type);return p.full?{headers:n.headers,status:i,body:m}:m};return new Promise((n,i)=>{let handleError=async n=>{if(n&&"DEPTH_ZERO_SELF_SIGNED_CERT"===n.code)try{await fetchNode(t,{...p,sslAllowSelfSigned:!0,sslPinnedCertificates:[]})}catch(t){t&&t.fingerprint256&&(n=new InvalidCertError(`Self-signed SSL certificate: ${t.fingerprint256}`,t.fingerprint256))}i(n)},s=(S?m:y).request(t,R,t=>{t.on("error",handleError),(async()=>{try{n(await handleRes(t))}catch(t){i(t)}})()});s.on("error",handleError);let b=p.sslPinnedCertificates?.map(t=>compactFP(t)),mfetchSecureConnect=t=>{let n=compactFP(t.getPeerCertificate()?.fingerprint256||"");if(!(!n&&t.isSessionReused())&&!b.includes(n))return s.emit("error",new InvalidCertError(`Invalid SSL certificate: ${n} Expected: ${b}`,n)),s.abort()};p.sslPinnedCertificates&&s.on("socket",t=>{let n=t.listeners("secureConnect").map(t=>(t.name||"").replace("bound ","")).includes("mfetchSecureConnect");n||t.on("secureConnect",mfetchSecureConnect.bind(null,t))}),p.keepAlive&&s.setNoDelay(!0),R.body&&s.write(R.body),s.end()})}let y=new Set(["Accept","Accept-Language","Content-Language","Content-Type"].map(t=>t.toLowerCase())),m=new Set(["Accept-Charset","Accept-Encoding","Access-Control-Request-Headers","Access-Control-Request-Method","Connection","Content-Length","Cookie","Cookie2","Date","DNT","Expect","Host","Keep-Alive","Origin","Referer","TE","Trailer","Transfer-Encoding","Upgrade","Via"].map(t=>t.toLowerCase()));async function fetchBrowser(t,n){let i={...b,...n},s=new Headers;
15"json"===i.type&&s.set("Content-Type","application/json");let p=new URL(t);if(p.username){let t=btoa(`${p.username}:${p.password}`);s.set("Authorization",`Basic ${t}`),p.username="",p.password=""}for(let n in t=""+p,i.headers){let t=n.toLowerCase();(y.has(t)||i.cors&&!m.has(t))&&s.set(n,i.headers[n])}let g={headers:s,redirect:i.redirect?"follow":"manual"};i.referrer||(g.referrerPolicy="no-referrer"),i.cors&&(g.mode="cors"),i.data&&(i.method||(g.method="POST"),g.body="json"===i.type?JSON.stringify(i.data):i.data);let _=await fetch(t,g);if(i.expectStatusCode&&_.status!==i.expectStatusCode)throw new InvalidStatusCodeError(_.status);let v=detectType(new Uint8Array(await _.arrayBuffer()),i.type);return i.full?{headers:Object.fromEntries(_.headers.entries()),status:_.status,body:v}:v}let _=!!("object"==typeof p&&p.versions&&p.versions.node&&p.versions.v8);function fetchUrl(t,n){return(_?fetchNode:fetchBrowser)(t,n)}n.default=fetchUrl},57824:function(t){function parse(t){if(!((t=String(t)).length>100)){var n=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(n){var i=parseFloat(n[1]);switch((n[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*i;case"weeks":case"week":case"w":return 6048e5*i;case"days":case"day":case"d":return 864e5*i;case"hours":case"hour":case"hrs":case"hr":case"h":return 36e5*i;case"minutes":case"minute":case"mins":case"min":case"m":return 6e4*i;case"seconds":case"second":case"secs":case"sec":case"s":return 1e3*i;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return i;default:return}}}}function fmtShort(t){var n=Math.abs(t);return n>=864e5?Math.round(t/864e5)+"d":n>=36e5?Math.round(t/36e5)+"h":n>=6e4?Math.round(t/6e4)+"m":n>=1e3?Math.round(t/1e3)+"s":t+"ms"}function fmtLong(t){var n=Math.abs(t);return n>=864e5?plural(t,n,864e5,"day"):n>=36e5?plural(t,n,36e5,"hour"):n>=6e4?plural(t,n,6e4,"minute"):n>=1e3?plural(t,n,1e3,"second"):t+" ms"}function plural(t,n,i,s){return Math.round(t/i)+" "+s+(n>=1.5*i?"s":"")}t.exports=function(t,n){n=n||{};var i=typeof t;if("string"===i&&t.length>0)return parse(t);if("number"===i&&isFinite(t))return n.long?fmtLong(t):fmtShort(t);throw Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))}},38399:function(t){"use strict";t.exports=function(){return Object.assign}},47715:function(t,n,i){var s=i(48764).Buffer,p=i(34155);!function(){"use strict";var n={742:function(t,n,i){var b=i(491),g=i(562),y=i(450),m=i(324),_=i(320);for(var v in _)n[v]=_[v];function Zlib(t){if("number"!=typeof t||t<n.DEFLATE||t>n.UNZIP)throw TypeError("Bad argument");this.dictionary=null,this.err=0,this.flush=0,this.init_done=!1,this.level=0,this.memLevel=0,this.mode=t,this.strategy=0,this.windowBits=0,this.write_in_progress=!1,this.pending_close=!1,this.gzip_id_bytes_read=0}n.NONE=0,n.DEFLATE=1,n.INFLATE=2,n.GZIP=3,n.GUNZIP=4,n.DEFLATERAW=5,n.INFLATERAW=6,n.UNZIP=7,Zlib.prototype.close=function(){if(this.write_in_progress){this.pending_close=!0;return}this.pending_close=!1,b(this.init_done,"close before init"),b(this.mode<=n.UNZIP),this.mode===n.DEFLATE||this.mode===n.GZIP||this.mode===n.DEFLATERAW?y.deflateEnd(this.strm):(this.mode===n.INFLATE||this.mode===n.GUNZIP||this.mode===n.INFLATERAW||this.mode===n.UNZIP)&&m.inflateEnd(this.strm),this.mode=n.NONE,this.dictionary=null},Zlib.prototype.write=function(t,n,i,s,p,b,g){return this._write(!0,t,n,i,s,p,b,g)},Zlib.prototype.writeSync=function(t,n,i,s,p,b,g){return this._write(!1,t,n,i,s,p,b,g)},Zlib.prototype._write=function(t,i,g,y,m,_,v,w){if(b.equal(arguments.length,8),b(this.init_done,"write before init"),b(this.mode!==n.NONE,"already finalized"),b.equal(!1,this.write_in_progress,"write already in progress"),b.equal(!1,this.pending_close,"close is pending"),this.write_in_progress=!0,b.equal(!1,void 0===i,"must provide flush value"),this.write_in_progress=!0,i!==n.Z_NO_FLUSH&&i!==n.Z_PARTIAL_FLUSH&&i!==n.Z_SYNC_FLUSH&&i!==n.Z_FULL_FLUSH&&i!==n.Z_FINISH&&i!==n.Z_BLOCK)throw Error("Invalid flush value");if(null==g&&(g=s.alloc(0),m=0,y=0),this.strm.avail_in=m,this.strm.input=g,this.strm.next_in=y,this.strm.avail_out=w,this.strm.output=_,this.strm.next_out=v,this.flush=i,!t)return(this._process(),this._checkError())?this._afterSync():void 0;var S=this;return p.nextTick(function(){S._process(),S._after()}),this},Zlib.prototype._afterSync=function(){var t=this.strm.avail_out,n=this.strm.avail_in;return this.write_in_progress=!1,[n,t]},Zlib.prototype._process=function(){var t=null;switch(this.mode){case n.DEFLATE:case n.GZIP:case n.DEFLATERAW:this.err=y.deflate(this.strm,this.flush);break;case n.UNZIP:switch(this.strm.avail_in>0&&(t=this.strm.next_in),this.gzip_id_bytes_read){case 0:if(null===t)break;
15if(31===this.strm.input[t]){if(this.gzip_id_bytes_read=1,t++,1===this.strm.avail_in)break}else{this.mode=n.INFLATE;break}case 1:if(null===t)break;139===this.strm.input[t]?(this.gzip_id_bytes_read=2,this.mode=n.GUNZIP):this.mode=n.INFLATE;break;default:throw Error("invalid number of gzip magic number bytes read")}case n.INFLATE:case n.GUNZIP:case n.INFLATERAW:for(this.err=m.inflate(this.strm,this.flush),this.err===n.Z_NEED_DICT&&this.dictionary&&(this.err=m.inflateSetDictionary(this.strm,this.dictionary),this.err===n.Z_OK?this.err=m.inflate(this.strm,this.flush):this.err===n.Z_DATA_ERROR&&(this.err=n.Z_NEED_DICT));this.strm.avail_in>0&&this.mode===n.GUNZIP&&this.err===n.Z_STREAM_END&&0!==this.strm.next_in[0];)this.reset(),this.err=m.inflate(this.strm,this.flush);break;default:throw Error("Unknown mode "+this.mode)}},Zlib.prototype._checkError=function(){switch(this.err){case n.Z_OK:case n.Z_BUF_ERROR:if(0!==this.strm.avail_out&&this.flush===n.Z_FINISH)return this._error("unexpected end of file"),!1;break;case n.Z_STREAM_END:break;case n.Z_NEED_DICT:return null==this.dictionary?this._error("Missing dictionary"):this._error("Bad dictionary"),!1;default:return this._error("Zlib error"),!1}return!0},Zlib.prototype._after=function(){if(this._checkError()){var t=this.strm.avail_out,n=this.strm.avail_in;this.write_in_progress=!1,this.callback(n,t),this.pending_close&&this.close()}},Zlib.prototype._error=function(t){this.strm.msg&&(t=this.strm.msg),this.onerror(t,this.err),this.write_in_progress=!1,this.pending_close&&this.close()},Zlib.prototype.init=function(t,i,s,p,g){b(4==arguments.length||5==arguments.length,"init(windowBits, level, memLevel, strategy, [dictionary])"),b(t>=8&&t<=15,"invalid windowBits"),b(i>=-1&&i<=9,"invalid compression level"),b(s>=1&&s<=9,"invalid memlevel"),b(p===n.Z_FILTERED||p===n.Z_HUFFMAN_ONLY||p===n.Z_RLE||p===n.Z_FIXED||p===n.Z_DEFAULT_STRATEGY,"invalid strategy"),this._init(i,t,s,p,g),this._setDictionary()},Zlib.prototype.params=function(){throw Error("deflateParams Not supported")},Zlib.prototype.reset=function(){this._reset(),this._setDictionary()},Zlib.prototype._init=function(t,i,s,p,b){switch(this.level=t,this.windowBits=i,this.memLevel=s,this.strategy=p,this.flush=n.Z_NO_FLUSH,this.err=n.Z_OK,(this.mode===n.GZIP||this.mode===n.GUNZIP)&&(this.windowBits+=16),this.mode===n.UNZIP&&(this.windowBits+=32),(this.mode===n.DEFLATERAW||this.mode===n.INFLATERAW)&&(this.windowBits=-1*this.windowBits),this.strm=new g,this.mode){case n.DEFLATE:case n.GZIP:case n.DEFLATERAW:this.err=y.deflateInit2(this.strm,this.level,n.Z_DEFLATED,this.windowBits,this.memLevel,this.strategy);break;case n.INFLATE:case n.GUNZIP:case n.INFLATERAW:case n.UNZIP:this.err=m.inflateInit2(this.strm,this.windowBits);break;default:throw Error("Unknown mode "+this.mode)}this.err!==n.Z_OK&&this._error("Init error"),this.dictionary=b,this.write_in_progress=!1,this.init_done=!0},Zlib.prototype._setDictionary=function(){if(null!=this.dictionary){switch(this.err=n.Z_OK,this.mode){case n.DEFLATE:case n.DEFLATERAW:this.err=y.deflateSetDictionary(this.strm,this.dictionary)}this.err!==n.Z_OK&&this._error("Failed to set dictionary")}},Zlib.prototype._reset=function(){switch(this.err=n.Z_OK,this.mode){case n.DEFLATE:case n.DEFLATERAW:case n.GZIP:this.err=y.deflateReset(this.strm);break;case n.INFLATE:case n.INFLATERAW:case n.GUNZIP:this.err=m.inflateReset(this.strm)}this.err!==n.Z_OK&&this._error("Failed to reset stream")},n.Zlib=Zlib},23:function(t,n,i){var s=i(300).Buffer,b=i(781).Transform,g=i(742),y=i(837),m=i(491).ok,_=i(300).kMaxLength,v="Cannot create final Buffer. It would be larger than 0x"+_.toString(16)+" bytes";g.Z_MIN_WINDOWBITS=8,g.Z_MAX_WINDOWBITS=15,g.Z_DEFAULT_WINDOWBITS=15,g.Z_MIN_CHUNK=64,g.Z_MAX_CHUNK=1/0,g.Z_DEFAULT_CHUNK=16384,g.Z_MIN_MEMLEVEL=1,g.Z_MAX_MEMLEVEL=9,g.Z_DEFAULT_MEMLEVEL=8,g.Z_MIN_LEVEL=-1,g.Z_MAX_LEVEL=9,g.Z_DEFAULT_LEVEL=g.Z_DEFAULT_COMPRESSION;for(var w=Object.keys(g),S=0;S<w.length;S++){var R=w[S];R.match(/^Z/)&&Object.defineProperty(n,R,{enumerable:!0,value:g[R],writable:!1})}for(var T={Z_OK:g.Z_OK,Z_STREAM_END:g.Z_STREAM_END,Z_NEED_DICT:g.Z_NEED_DICT,Z_ERRNO:g.Z_ERRNO,Z_STREAM_ERROR:g.Z_STREAM_ERROR,Z_DATA_ERROR:g.Z_DATA_ERROR,Z_MEM_ERROR:g.Z_MEM_ERROR,Z_BUF_ER
15ROR:g.Z_BUF_ERROR,Z_VERSION_ERROR:g.Z_VERSION_ERROR},x=Object.keys(T),A=0;A<x.length;A++){var k=x[A];T[T[k]]=k}function zlibBuffer(t,n,i){var p=[],b=0;function flow(){for(var n;null!==(n=t.read());)p.push(n),b+=n.length;t.once("readable",flow)}function onError(n){t.removeListener("end",onEnd),t.removeListener("readable",flow),i(n)}function onEnd(){var n,g=null;b>=_?g=RangeError(v):n=s.concat(p,b),p=[],t.close(),i(g,n)}t.on("error",onError),t.on("end",onEnd),t.end(n),flow()}function zlibBufferSync(t,n){if("string"==typeof n&&(n=s.from(n)),!s.isBuffer(n))throw TypeError("Not a string or buffer");var i=t._finishFlushFlag;return t._processChunk(n,i)}function Deflate(t){if(!(this instanceof Deflate))return new Deflate(t);Zlib.call(this,t,g.DEFLATE)}function Inflate(t){if(!(this instanceof Inflate))return new Inflate(t);Zlib.call(this,t,g.INFLATE)}function Gzip(t){if(!(this instanceof Gzip))return new Gzip(t);Zlib.call(this,t,g.GZIP)}function Gunzip(t){if(!(this instanceof Gunzip))return new Gunzip(t);Zlib.call(this,t,g.GUNZIP)}function DeflateRaw(t){if(!(this instanceof DeflateRaw))return new DeflateRaw(t);Zlib.call(this,t,g.DEFLATERAW)}function InflateRaw(t){if(!(this instanceof InflateRaw))return new InflateRaw(t);Zlib.call(this,t,g.INFLATERAW)}function Unzip(t){if(!(this instanceof Unzip))return new Unzip(t);Zlib.call(this,t,g.UNZIP)}function isValidFlushFlag(t){return t===g.Z_NO_FLUSH||t===g.Z_PARTIAL_FLUSH||t===g.Z_SYNC_FLUSH||t===g.Z_FULL_FLUSH||t===g.Z_FINISH||t===g.Z_BLOCK}function Zlib(t,i){var p=this;if(this._opts=t=t||{},this._chunkSize=t.chunkSize||n.Z_DEFAULT_CHUNK,b.call(this,t),t.flush&&!isValidFlushFlag(t.flush))throw Error("Invalid flush flag: "+t.flush);if(t.finishFlush&&!isValidFlushFlag(t.finishFlush))throw Error("Invalid flush flag: "+t.finishFlush);if(this._flushFlag=t.flush||g.Z_NO_FLUSH,this._finishFlushFlag=void 0!==t.finishFlush?t.finishFlush:g.Z_FINISH,t.chunkSize&&(t.chunkSize<n.Z_MIN_CHUNK||t.chunkSize>n.Z_MAX_CHUNK))throw Error("Invalid chunk size: "+t.chunkSize);if(t.windowBits&&(t.windowBits<n.Z_MIN_WINDOWBITS||t.windowBits>n.Z_MAX_WINDOWBITS))throw Error("Invalid windowBits: "+t.windowBits);if(t.level&&(t.level<n.Z_MIN_LEVEL||t.level>n.Z_MAX_LEVEL))throw Error("Invalid compression level: "+t.level);if(t.memLevel&&(t.memLevel<n.Z_MIN_MEMLEVEL||t.memLevel>n.Z_MAX_MEMLEVEL))throw Error("Invalid memLevel: "+t.memLevel);if(t.strategy&&t.strategy!=n.Z_FILTERED&&t.strategy!=n.Z_HUFFMAN_ONLY&&t.strategy!=n.Z_RLE&&t.strategy!=n.Z_FIXED&&t.strategy!=n.Z_DEFAULT_STRATEGY)throw Error("Invalid strategy: "+t.strategy);if(t.dictionary&&!s.isBuffer(t.dictionary))throw Error("Invalid dictionary: it should be a Buffer instance");this._handle=new g.Zlib(i);var y=this;this._hadError=!1,this._handle.onerror=function(t,i){_close(y),y._hadError=!0;var s=Error(t);s.errno=i,s.code=n.codes[i],y.emit("error",s)};var m=n.Z_DEFAULT_COMPRESSION;"number"==typeof t.level&&(m=t.level);var _=n.Z_DEFAULT_STRATEGY;"number"==typeof t.strategy&&(_=t.strategy),this._handle.init(t.windowBits||n.Z_DEFAULT_WINDOWBITS,m,t.memLevel||n.Z_DEFAULT_MEMLEVEL,_,t.dictionary),this._buffer=s.allocUnsafe(this._chunkSize),this._offset=0,this._level=m,this._strategy=_,this.once("end",this.close),Object.defineProperty(this,"_closed",{get:function(){return!p._handle},configurable:!0,enumerable:!0})}function _close(t,n){n&&p.nextTick(n),t._handle&&(t._handle.close(),t._handle=null)}function emitCloseNT(t){t.emit("close")}Object.defineProperty(n,"codes",{enumerable:!0,value:Object.freeze(T),writable:!1}),n.Deflate=Deflate,n.Inflate=Inflate,n.Gzip=Gzip,n.Gunzip=Gunzip,n.DeflateRaw=DeflateRaw,n.InflateRaw=InflateRaw,n.Unzip=Unzip,n.createDeflate=function(t){return new Deflate(t)},n.createInflate=function(t){return new Inflate(t)},n.createDeflateRaw=function(t){return new DeflateRaw(t)},n.createInflateRaw=function(t){return new InflateRaw(t)},n.createGzip=function(t){return new Gzip(t)},n.createGunzip=function(t){return new Gunzip(t)},n.createUnzip=function(t){return new Unzip(t)},n.deflate=function(t,n,i){return"function"==typeof n&&(i=n,n={}),zlibBuffer(new Deflate(n),t,i)},n.deflateSync=function(t,n){return zlibBufferSync(new Deflate(n),t)},n.gzip=function(t,n,i){return"function"==typeof n&&(i=n,n={}),zlibBuffer(new Gzip(n),t,i)},n.gzipSync=function(t,n){return zlibBufferSync(new Gzip(n),t)},n.deflateRaw=function(t,n,i){return"function"==typeof n&&(i=n,n={}),zlibBuffer(new DeflateRaw(n),t,i)},n.deflateRawSync=function(t,n){return zlibBufferSync(new DeflateRaw(n),t)},n.unzip=function(t,n,i){return"function"==typeof n&&(i=n,n={}),zlibBuffer(new Unzip(n),t,i)},n.unzipSync=function(t,n){return zlibBufferSync(new Unzip(n),t)},n.inflate=function(t,n,i){return"function"==typeof n&&(i=n,n={}),zlibBuffer(new Inflate(n),t,i)},n.inflateSync=function(t,n){return zlibBufferSync(new Inflate(n),t)},n.gunzip=function(t,n,i){return"function"==typeof n&&(i=n,n={}),zlibBuffer(new Gunzip(n),t,i)},n.gunzipSync=function(t,n){return zlibBufferSync(new Gunzip(n),t)},n.inflateRaw=function(t,n,i){return"function"==typeof n&&(i=n,n={}),zlibBuffer(new InflateRaw(n),t,i)},n.inflateRawSync=function(t,n){return zlibBufferSync(new InflateRaw(n),t)},y.inherits(Zlib,b),Zlib.prototype.params=function(t,i,s){if(t<n.Z_MIN_LEVEL||t>n.Z_MAX_LEVEL)throw RangeError("Invalid compression level: "+t);if(i!=n.Z_FILTERED&&i!=n.Z_HUFFMAN_ONLY&&i!=n.Z_RLE&&i!=n.Z_FIXED&&i!=n.Z_DEFAULT_STRATEGY)throw TypeError("Invalid strategy: "+i);if(this._level!==t||this._strategy!==i){var b=this;this.flush(g.Z_SYNC_FLUSH,function(){m(b._handle,"zlib binding closed"),b._handle.params(t,i),!b._hadError&&(b._level=t,b._strategy=i,s&&s())})}else p.nextTick(s)},Zlib.prototype.reset=function(){return m(this._handle,"zlib binding closed"),this._handle.reset()},Zlib.prototype._flush=function(t){this._transform(s.alloc(0),"",t)},Zlib.prototype.flush=function(t,n){var i=this,b=this._writableState;"function"!=typeof t&&(void 0!==t||n)||(n=t,t=g.Z_FULL_FLUSH),b.ended?n&&p.nextTick(n):b.ending?n&&this.once("end",n):b.needDrain?n&&this.once("drain",function(){return i.flush(t,n)}):(this._flushFlag=t,this.write(s.alloc(0),"",n))}
15,Zlib.prototype.close=function(t){_close(this,t),p.nextTick(emitCloseNT,this)},Zlib.prototype._transform=function(t,n,i){var p,b=this._writableState,y=(b.ending||b.ended)&&(!t||b.length===t.length);return null===t||s.isBuffer(t)?this._handle?void(y?p=this._finishFlushFlag:(p=this._flushFlag,t.length>=b.length&&(this._flushFlag=this._opts.flush||g.Z_NO_FLUSH)),this._processChunk(t,p,i)):i(Error("zlib binding closed")):i(Error("invalid input"))},Zlib.prototype._processChunk=function(t,n,i){var p=t&&t.length,b=this._chunkSize-this._offset,g=0,y=this,w="function"==typeof i;if(!w){var S,R=[],T=0;this.on("error",function(t){S=t}),m(this._handle,"zlib binding closed");do var x=this._handle.writeSync(n,t,g,p,this._buffer,this._offset,b);while(!this._hadError&&callback(x[0],x[1]));if(this._hadError)throw S;if(T>=_)throw _close(this),RangeError(v);var A=s.concat(R,T);return _close(this),A}m(this._handle,"zlib binding closed");var k=this._handle.write(n,t,g,p,this._buffer,this._offset,b);function callback(_,v){if(this&&(this.buffer=null,this.callback=null),!y._hadError){var S=b-v;if(m(S>=0,"have should not go down"),S>0){var x=y._buffer.slice(y._offset,y._offset+S);y._offset+=S,w?y.push(x):(R.push(x),T+=x.length)}if((0===v||y._offset>=y._chunkSize)&&(b=y._chunkSize,y._offset=0,y._buffer=s.allocUnsafe(y._chunkSize)),0===v){if(g+=p-_,p=_,!w)return!0;var A=y._handle.write(n,t,g,p,y._buffer,y._offset,y._chunkSize);return A.callback=callback,void(A.buffer=t)}if(!w)return!1;i()}}k.buffer=t,k.callback=callback},y.inherits(Deflate,Zlib),y.inherits(Inflate,Zlib),y.inherits(Gzip,Zlib),y.inherits(Gunzip,Zlib),y.inherits(DeflateRaw,Zlib),y.inherits(InflateRaw,Zlib),y.inherits(Unzip,Zlib)},380:function(t,n){var i="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;function _has(t,n){return Object.prototype.hasOwnProperty.call(t,n)}n.assign=function(t){for(var n=Array.prototype.slice.call(arguments,1);n.length;){var i=n.shift();if(i){if("object"!=typeof i)throw TypeError(i+"must be non-object");for(var s in i)_has(i,s)&&(t[s]=i[s])}}return t},n.shrinkBuf=function(t,n){return t.length===n?t:t.subarray?t.subarray(0,n):(t.length=n,t)};var s={arraySet:function(t,n,i,s,p){if(n.subarray&&t.subarray){t.set(n.subarray(i,i+s),p);return}for(var b=0;b<s;b++)t[p+b]=n[i+b]},flattenChunks:function(t){var n,i,s,p,b,g;for(n=0,s=0,i=t.length;n<i;n++)s+=t[n].length;for(n=0,g=new Uint8Array(s),p=0,i=t.length;n<i;n++)b=t[n],g.set(b,p),p+=b.length;return g}},p={arraySet:function(t,n,i,s,p){for(var b=0;b<s;b++)t[p+b]=n[i+b]},flattenChunks:function(t){return[].concat.apply([],t)}};n.setTyped=function(t){t?(n.Buf8=Uint8Array,n.Buf16=Uint16Array,n.Buf32=Int32Array,n.assign(n,s)):(n.Buf8=Array,n.Buf16=Array,n.Buf32=Array,n.assign(n,p))},n.setTyped(i)},496:function(t){function adler32(t,n,i,s){for(var p=65535&t|0,b=t>>>16&65535|0,g=0;0!==i;){g=i>2e3?2e3:i,i-=g;do b=b+(p=p+n[s++]|0)|0;while(--g);p%=65521,b%=65521}return p|b<<16|0}t.exports=adler32},320:function(t){t.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},307:function(t){var n=function(){for(var t,n=[],i=0;i<256;i++){t=i;for(var s=0;s<8;s++)t=1&t?3988292384^t>>>1:t>>>1;n[i]=t}return n}();function crc32(t,i,s,p){var b=p+s;t^=-1;for(var g=p;g<b;g++)t=t>>>8^n[(t^i[g])&255];return -1^t}t.exports=crc32},450:function(t,n,i){var s,p=i(380),b=i(842),g=i(496),y=i(307),m=i(31);function err(t,n){return t.msg=m[n],n}function rank(t){return(t<<1)-(t>4?9:0)}function zero(t){for(var n=t.length;--n>=0;)t[n]=0}function flush_pending(t){var n=t.state,i=n.pending;i>t.avail_out&&(i=t.avail_out),0!==i&&(p.arraySet(t.output,n.pending_buf,n.pending_out,i,t.next_out),t.next_out+=i,n.pending_out+=i,t.total_out+=i,t.avail_out-=i,n.pending-=i,0===n.pending&&(n.pending_out=0))}function flush_block_only(t,n){b._tr_flush_block(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,n),t.block_start=t.strstart,flush_pending(t.strm)}function put_byte(t,n){t.pending_buf[t.pending++]=n}function putShortMSB(t,n){t.pending_buf[t.pending++]=n>>>8&255,t.pending_buf[t.pending++]=255&n}function read_buf(t,n,i,s){var b=t.avail_in;return(b>s&&(b=s),0===b)?0:(t.avail_in-=b,p.arraySet(n,t.input,t.next_in,b,i),1===t.state.wrap?t.adler=g(t.adler,n,b,i):2===t.state.wrap&&(t.adler=y(t.adler,n,b,i)),t.next_in+=b,t.total_in+=b,b)}function longest_match(t,n){var i,s,p=t.max_chain_length,b=t.strstart,g=t.prev_length,y=t.nice_match,m=t.strstart>t.w_size-262?t.strstart-(t.w_size-262):0,_=t.window,v=t.w_mask,w=t.prev,S=t.strstart+258,R=_[b+g-1],T=_[b+g];t.prev_length>=t.good_match&&(p>>=2),y>t.lookahead&&(y=t.lookahead);
15do{if(_[(i=n)+g]!==T||_[i+g-1]!==R||_[i]!==_[b]||_[++i]!==_[b+1])continue;b+=2,i++;do;while(_[++b]===_[++i]&&_[++b]===_[++i]&&_[++b]===_[++i]&&_[++b]===_[++i]&&_[++b]===_[++i]&&_[++b]===_[++i]&&_[++b]===_[++i]&&_[++b]===_[++i]&&b<S);if(s=258-(S-b),b=S-258,s>g){if(t.match_start=n,g=s,s>=y)break;R=_[b+g-1],T=_[b+g]}}while((n=w[n&v])>m&&0!=--p);return g<=t.lookahead?g:t.lookahead}function fill_window(t){var n,i,s,b,g,y=t.w_size;do{if(b=t.window_size-t.lookahead-t.strstart,t.strstart>=y+(y-262)){p.arraySet(t.window,t.window,y,y,0),t.match_start-=y,t.strstart-=y,t.block_start-=y,n=i=t.hash_size;do s=t.head[--n],t.head[n]=s>=y?s-y:0;while(--i);n=i=y;do s=t.prev[--n],t.prev[n]=s>=y?s-y:0;while(--i);b+=y}if(0===t.strm.avail_in)break;if(i=read_buf(t.strm,t.window,t.strstart+t.lookahead,b),t.lookahead+=i,t.lookahead+t.insert>=3)for(g=t.strstart-t.insert,t.ins_h=t.window[g],t.ins_h=(t.ins_h<<t.hash_shift^t.window[g+1])&t.hash_mask;t.insert&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[g+3-1])&t.hash_mask,t.prev[g&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=g,g++,t.insert--,!(t.lookahead+t.insert<3)););}while(t.lookahead<262&&0!==t.strm.avail_in)}function deflate_fast(t,n){for(var i,s;;){if(t.lookahead<262){if(fill_window(t),t.lookahead<262&&0===n)return 1;if(0===t.lookahead)break}if(i=0,t.lookahead>=3&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+3-1])&t.hash_mask,i=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==i&&t.strstart-i<=t.w_size-262&&(t.match_length=longest_match(t,i)),t.match_length>=3){if(s=b._tr_tally(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){t.match_length--;do t.strstart++,t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+3-1])&t.hash_mask,i=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart;while(0!=--t.match_length);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+1])&t.hash_mask}else s=b._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(s&&(flush_block_only(t,!1),0===t.strm.avail_out))return 1}return(t.insert=t.strstart<2?t.strstart:2,4===n)?(flush_block_only(t,!0),0===t.strm.avail_out)?3:4:t.last_lit&&(flush_block_only(t,!1),0===t.strm.avail_out)?1:2}function deflate_slow(t,n){for(var i,s,p;;){if(t.lookahead<262){if(fill_window(t),t.lookahead<262&&0===n)return 1;if(0===t.lookahead)break}if(i=0,t.lookahead>=3&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+3-1])&t.hash_mask,i=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=2,0!==i&&t.prev_length<t.max_lazy_match&&t.strstart-i<=t.w_size-262&&(t.match_length=longest_match(t,i),t.match_length<=5&&(1===t.strategy||3===t.match_length&&t.strstart-t.match_start>4096)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){p=t.strstart+t.lookahead-3,s=b._tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;do++t.strstart<=p&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+3-1])&t.hash_mask,i=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart);while(0!=--t.prev_length);if(t.match_available=0,t.match_length=2,t.strstart++,s&&(flush_block_only(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if((s=b._tr_tally(t,0,t.window[t.strstart-1]))&&flush_block_only(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return 1}else t.match_available=1,t.strstart++,t.lookahead--}return(t.match_available&&(s=b._tr_tally(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,4===n)?(flush_block_only(t,!0),0===t.strm.avail_out)?3:4:t.last_lit&&(flush_block_only(t,!1),0===t.strm.avail_out)?1:2}function deflate_rle(t,n){for(var i,s,p,g,y=t.window;;){if(t.lookahead<=258){if(fill_window(t),t.lookahead<=258&&0===n)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&t.strstart>0&&(s=y[p=t.strstart-1])===y[++p]&&s===y[++p]&&s===y[++p]){g=t.strstart+258;do;while(s===y[++p]&&s===y[++p]&&s===y[++p]&&s===y[++p]&&s===y[++p]&&s===y[++p]&&s===y[++p]&&s===y[++p]&&p<g);t.match_length=258-(g-p),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(i=b._tr_tally(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(i=b._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),i&&(flush_block_only(t,!1),0===t.strm.avail_out))return 1}return(t.insert=0,4===n)?(flush_block_only(t,!0),0===t.strm.avail_out)?3:4:t.last_lit&&(flush_block_only(t,!1),0===t.strm.avail_out)?1:2}function deflate_huff(t,n){for(var i;;){if(0===t.lookahead&&(fill_window(t),0===t.lookahead)){if(0===n)return 1;break}if(t.match_length=0,i=b._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,i&&(flush_block_only(t,!1),0===t.strm.avail_out))return 1}return(t.insert=0,4===n)?(flush_block_only(t,!0),0===t.strm.avail_out)?3:4:t.last_lit&&(flush_block_only(t,!1),0===t.strm.avail_out)?1:2}function Config(t,n,i,s,p){this.good_length=t,this.max_lazy=n,this.nice_length=i,this.max_chain=s,this.func=p}function lm_init(t){t.window_size=2*t.w_size,zero(t.head),t.max_lazy_match=s[t.level].max_lazy,t.good_match=s[t.level].good_length,t.nice_match=s[t.level].nice_length,t.max_chain_length=s[t.level].max_chain,t.strstart=0,t.block_start=0,t.lookahead=0,t.insert=0,t.match_length=t.prev_length=2,t.match_available=0,t.ins_h=0}function DeflateState(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=8,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new p.Buf16(1146),this.dyn_dtree=new p.Buf16(122),this.bl_tree=new p.Buf16(78),zero(this.dyn_ltree),zero(this.dyn_dtree),zero(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new p.Buf16(16),this.heap=new p.Buf16(573),zero(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new p.Buf16(573),zero(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function deflateResetKeep(t){var n;return t&&t.state?(t.total_in=t.total_out=0,t.data_type=2,(n=t.state).pending=0,n.pending_out=0,n.wrap<0&&(n.wrap=-n.wrap),n.status=n.wrap?42:113,t.adler=2===n.wrap?0:1,n.last_flush=0,b._tr_init(n),0):err(t,-2)}function deflateReset(t){var n=deflateResetKeep(t);return 0===n&&lm_init(t.state),n}function deflateSetHeader(t,n){return t&&t.state&&2===t.state.wrap?(t.state.gzhead=n,0):-2}function deflateInit2(t,n,i,s,b,g){if(!t)return -2;var y=1;if(-1===n&&(n=6),s<0?(y=0,s=-s):s>15&&(y=2,s-=16),b<1||b>9||8!==i||s<8||s>15||n<0||n>9||g<0||g>4)return err(t,-2);8===s&&(s=9);var m=new DeflateState;return t.state=m,m.strm=t,m.wrap=y,m.gzhead=null,m.w_bits=s,m.w_size=1<<m.w_bits,m.w_mask=m.w_size-1,m.hash_bits=b+7,m.hash_size=1<<m.hash_bits,m.hash_mask=m.hash_size-1,m.hash_shift=~~((m.hash_bits+3-1)/3),m.window=new p.Buf8(2*m.w_size),m.head=new p.Buf16(m.hash_size),m.prev=new p.Buf16(m.w_size),m.lit_bufsize=1<<b+6,m.pending_buf_size=4*m.lit_bufsize,m.pen
vendor: 5,097 bytes, line 15
15ding_buf=new p.Buf8(m.pending_buf_size),m.d_buf=1*m.lit_bufsize,m.l_buf=3*m.lit_bufsize,m.level=n,m.strategy=g,m.method=i,deflateReset(t)}function deflateInit(t,n){return deflateInit2(t,n,8,15,8,0)}function deflate(t,n){if(!t||!t.state||n>5||n<0)return t?err(t,-2):-2;if(p=t.state,!t.output||!t.input&&0!==t.avail_in||666===p.status&&4!==n)return err(t,0===t.avail_out?-5:-2);if(p.strm=t,i=p.last_flush,p.last_flush=n,42===p.status){if(2===p.wrap)t.adler=0,put_byte(p,31),put_byte(p,139),put_byte(p,8),p.gzhead?(put_byte(p,(p.gzhead.text?1:0)+(p.gzhead.hcrc?2:0)+(p.gzhead.extra?4:0)+(p.gzhead.name?8:0)+(p.gzhead.comment?16:0)),put_byte(p,255&p.gzhead.time),put_byte(p,p.gzhead.time>>8&255),put_byte(p,p.gzhead.time>>16&255),put_byte(p,p.gzhead.time>>24&255),put_byte(p,9===p.level?2:p.strategy>=2||p.level<2?4:0),put_byte(p,255&p.gzhead.os),p.gzhead.extra&&p.gzhead.extra.length&&(put_byte(p,255&p.gzhead.extra.length),put_byte(p,p.gzhead.extra.length>>8&255)),p.gzhead.hcrc&&(t.adler=y(t.adler,p.pending_buf,p.pending,0)),p.gzindex=0,p.status=69):(put_byte(p,0),put_byte(p,0),put_byte(p,0),put_byte(p,0),put_byte(p,0),put_byte(p,9===p.level?2:p.strategy>=2||p.level<2?4:0),put_byte(p,3),p.status=113);else{var i,p,g,m,_=8+(p.w_bits-8<<4)<<8;_|=(p.strategy>=2||p.level<2?0:p.level<6?1:6===p.level?2:3)<<6,0!==p.strstart&&(_|=32),_+=31-_%31,p.status=113,putShortMSB(p,_),0!==p.strstart&&(putShortMSB(p,t.adler>>>16),putShortMSB(p,65535&t.adler)),t.adler=1}}if(69===p.status){if(p.gzhead.extra){for(g=p.pending;p.gzindex<(65535&p.gzhead.extra.length)&&(p.pending!==p.pending_buf_size||(p.gzhead.hcrc&&p.pending>g&&(t.adler=y(t.adler,p.pending_buf,p.pending-g,g)),flush_pending(t),g=p.pending,p.pending!==p.pending_buf_size));)put_byte(p,255&p.gzhead.extra[p.gzindex]),p.gzindex++;p.gzhead.hcrc&&p.pending>g&&(t.adler=y(t.adler,p.pending_buf,p.pending-g,g)),p.gzindex===p.gzhead.extra.length&&(p.gzindex=0,p.status=73)}else p.status=73}if(73===p.status){if(p.gzhead.name){g=p.pending;do{if(p.pending===p.pending_buf_size&&(p.gzhead.hcrc&&p.pending>g&&(t.adler=y(t.adler,p.pending_buf,p.pending-g,g)),flush_pending(t),g=p.pending,p.pending===p.pending_buf_size)){m=1;break}m=p.gzindex<p.gzhead.name.length?255&p.gzhead.name.charCodeAt(p.gzindex++):0,put_byte(p,m)}while(0!==m);p.gzhead.hcrc&&p.pending>g&&(t.adler=y(t.adler,p.pending_buf,p.pending-g,g)),0===m&&(p.gzindex=0,p.status=91)}else p.status=91}if(91===p.status){if(p.gzhead.comment){g=p.pending;do{if(p.pending===p.pending_buf_size&&(p.gzhead.hcrc&&p.pending>g&&(t.adler=y(t.adler,p.pending_buf,p.pending-g,g)),flush_pending(t),g=p.pending,p.pending===p.pending_buf_size)){m=1;break}m=p.gzindex<p.gzhead.comment.length?255&p.gzhead.comment.charCodeAt(p.gzindex++):0,put_byte(p,m)}while(0!==m);p.gzhead.hcrc&&p.pending>g&&(t.adler=y(t.adler,p.pending_buf,p.pending-g,g)),0===m&&(p.status=103)}else p.status=103}if(103===p.status&&(p.gzhead.hcrc?(p.pending+2>p.pending_buf_size&&flush_pending(t),p.pending+2<=p.pending_buf_size&&(put_byte(p,255&t.adler),put_byte(p,t.adler>>8&255),t.adler=0,p.status=113)):p.status=113),0!==p.pending){if(flush_pending(t),0===t.avail_out)return p.last_flush=-1,0}else if(0===t.avail_in&&rank(n)<=rank(i)&&4!==n)return err(t,-5);if(666===p.status&&0!==t.avail_in)return err(t,-5);if(0!==t.avail_in||0!==p.lookahead||0!==n&&666!==p.status){var v=2===p.strategy?deflate_huff(p,n):3===p.strategy?deflate_rle(p,n):s[p.level].func(p,n);if((3===v||4===v)&&(p.status=666),1===v||3===v)return 0===t.avail_out&&(p.last_flush=-1),0;if(2===v&&(1===n?b._tr_align(p):5!==n&&(b._tr_stored_block(p,0,0,!1),3===n&&(zero(p.head),0===p.lookahead&&(p.strstart=0,p.block_start=0,p.insert=0))),flush_pending(t),0===t.avail_out))return p.last_flush=-1,0}return 4!==n?0:p.wrap<=0?1:(2===p.wrap?(put_byte(p,255&t.adler),put_byte(p,t.adler>>8&255),put_byte(p,t.adler>>16&255),put_byte(p,t.adler>>24&255),put_byte(p,255&t.total_in),put_byte(p,t.total_in>>8&255),put_byte(p,t.total_in>>16&255),put_byte(p,t.total_in>>24&255)):(putShortMSB(p,t.adler>>>16),putShortMSB(p,65535&t.adler)),flush_pending(t),p.wrap>0&&(p.wrap=-p.wrap),0!==p.pending?0:1)}function deflateEnd(t){var n;return t&&t.state?42!==(n=t.state.status)&&69!==n&&73!==n&&91!==n&&103!==n&&113!==n&&666!==n?err(t,-2):(t.state=null,113===n?err(t,-3):0):-2}function deflateSetDictionary(t,n){var i,s,b,y,m,_,v,w,S=n.length;if(!t||!t.state||2===(y=(i=t.state).wrap)||1===y&&42!==i.status||i.lookahead)return -2;for(1===y&&(t.adler=g(t.adler,n,S,0)),i.wrap=0,S>=i.w_size&&(0===y&&(zero(i.head),i.strstart=0,i.block_start=0,i.insert=0),w=new p.Buf8(i.w_size),p.arraySet(w,n,S-i.w_size,i.w_size,0),n=w,S=i.w_size),m=t.avail_in,_=t.next_in,v=t.input,t.avail_in=S,t.next_in=0,t.input=n,fill_window(i);i.lookahead>=3;){s=i.strstart,b=i.lookahead-2;do i.ins_h=(i.ins_h<<i.hash_shift^i.window[s+3-1])&i.hash_mask,i.prev[s&i.w_mask]=i.head[i.ins_h],i.head[i.ins_h]=s,s++;while(--b);i.strstart=s,i.lookahead=2,fill_window(i)}return i.strstart+=i.lookahead,i.block_start=i.strstart,i.insert=i.lookahead,i.lookahead=0,i.match_length=i.prev_length=2,i.match_available=0,t.next_in=_,t.input
15=v,t.avail_in=m,i.wrap=y,0}s=[new Config(0,0,0,0,function(t,n){var i=65535;for(65535>t.pending_buf_size-5&&(i=t.pending_buf_size-5);;){if(t.lookahead<=1){if(fill_window(t),0===t.lookahead&&0===n)return 1;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var s=t.block_start+i;if((0===t.strstart||t.strstart>=s)&&(t.lookahead=t.strstart-s,t.strstart=s,flush_block_only(t,!1),0===t.strm.avail_out)||t.strstart-t.block_start>=t.w_size-262&&(flush_block_only(t,!1),0===t.strm.avail_out))return 1}return(t.insert=0,4===n)?(flush_block_only(t,!0),0===t.strm.avail_out)?3:4:(t.strstart>t.block_start&&(flush_block_only(t,!1),t.strm.avail_out),1)}),new Config(4,4,8,4,deflate_fast),new Config(4,5,16,8,deflate_fast),new Config(4,6,32,32,deflate_fast),new Config(4,4,16,16,deflate_slow),new Config(8,16,32,32,deflate_slow),new Config(8,16,128,128,deflate_slow),new Config(8,32,128,256,deflate_slow),new Config(32,128,258,1024,deflate_slow),new Config(32,258,258,4096,deflate_slow)],n.deflateInit=deflateInit,n.deflateInit2=deflateInit2,n.deflateReset=deflateReset,n.deflateResetKeep=deflateResetKeep,n.deflateSetHeader=deflateSetHeader,n.deflate=deflate,n.deflateEnd=deflateEnd,n.deflateSetDictionary=deflateSetDictionary,n.deflateInfo="pako deflate (from Nodeca project)"},333:function(t){t.exports=function(t,n){var i,s,p,b,g,y,m,_,v,w,S,R,T,x,A,k,O,P,C,I,L,N,M,B,j;i=t.state,s=t.next_in,B=t.input,p=s+(t.avail_in-5),b=t.next_out,j=t.output,g=b-(n-t.avail_out),y=b+(t.avail_out-257),m=i.dmax,_=i.wsize,v=i.whave,w=i.wnext,S=i.window,R=i.hold,T=i.bits,x=i.lencode,A=i.distcode,k=(1<<i.lenbits)-1,O=(1<<i.distbits)-1;e:do for(T<15&&(R+=B[s++]<<T,T+=8,R+=B[s++]<<T,T+=8),P=x[R&k];;){if(R>>>=C=P>>>24,T-=C,0==(C=P>>>16&255))j[b++]=65535&P;else if(16&C)for(I=65535&P,(C&=15)&&(T<C&&(R+=B[s++]<<T,T+=8),I+=R&(1<<C)-1,R>>>=C,T-=C),T<15&&(R+=B[s++]<<T,T+=8,R+=B[s++]<<T,T+=8),P=A[R&O];;){if(R>>>=C=P>>>24,T-=C,16&(C=P>>>16&255)){if(L=65535&P,T<(C&=15)&&(R+=B[s++]<<T,(T+=8)<C&&(R+=B[s++]<<T,T+=8)),(L+=R&(1<<C)-1)>m){t.msg="invalid distance too far back",i.mode=30;break e}if(R>>>=C,T-=C,L>(C=b-g)){if((C=L-C)>v&&i.sane){t.msg="invalid distance too far back",i.mode=30;break e}if(N=0,M=S,0===w){if(N+=_-C,C<I){I-=C;do j[b++]=S[N++];while(--C);N=b-L,M=j}}else if(w<C){if(N+=_+w-C,(C-=w)<I){I-=C;do j[b++]=S[N++];while(--C);if(N=0,w<I){I-=C=w;do j[b++]=S[N++];while(--C);N=b-L,M=j}}}else if(N+=w-C,C<I){I-=C;do j[b++]=S[N++];while(--C);N=b-L,M=j}for(;I>2;)j[b++]=M[N++],j[b++]=M[N++],j[b++]=M[N++],I-=3;I&&(j[b++]=M[N++],I>1&&(j[b++]=M[N++]))}else{N=b-L;do j[b++]=j[N++],j[b++]=j[N++],j[b++]=j[N++],I-=3;while(I>2);I&&(j[b++]=j[N++],I>1&&(j[b++]=j[N++]))}}else if((64&C)==0){P=A[(65535&P)+(R&(1<<C)-1)];continue}else{t.msg="invalid distance code",i.mode=30;break e}break}else if((64&C)==0){P=x[(65535&P)+(R&(1<<C)-1)];continue}else if(32&C){i.mode=12;break e}else{t.msg="invalid literal/length code",i.mode=30;break e}break}while(s<p&&b<y);s-=I=T>>3,T-=I<<3,R&=(1<<T)-1,t.next_in=s,t.next_out=b,t.avail_in=s<p?5+(p-s):5-(s-p),t.avail_out=b<y?257+(y-b):257-(b-y),i.hold=R,i.bits=T}},324:function(t,n,i){var s,p,b=i(380),g=i(496),y=i(307),m=i(333),_=i(19);function zswap32(t){return(t>>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24)}function InflateState(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new b.Buf16(320),this.work=new b.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function inflateResetKeep(t){var n;return t&&t.state?(n=t.state,t.total_in=t.total_out=n.total=0,t.msg="",n.wrap&&(t.adler=1&n.wrap),n.mode=1,n.last=0,n.havedict=0,n.dmax=32768,n.head=null,n.hold=0,n.bits=0,n.lencode=n.lendyn=new b.Buf32(852),n.distcode=n.distdyn=new b.Buf32(592),n.sane=1,n.back=-1,0):-2}function inflateReset(t){var n;return t&&t.state?((n=t.state).wsize=0,n.whave=0,n.wnext=0,inflateResetKeep(t)):-2}function inflateReset2(t,n){var i,s;return t&&t.state?(s=t.state,n<0?(i=0,n=-n):(i=(n>>4)+1,n<48&&(n&=15)),n&&(n<8||n>15))?-2:(null!==s.window&&s.wbits!==n&&(s.window=null),s.wrap=i,s.wbits=n,inflateReset(t)):-2}function inflateInit2(t,n){var i,s;return t?(s=new InflateState,t.state=s,s.window=null,0!==(i=inflateReset2(t,n))&&(t.state=null),i):-2}function inflateInit(t){return inflateInit2(t,15)}var v=!0;function fixedtables(t){if(v){var n;for(s=new b.Buf32(512),p=new b.Buf32(32),n=0;n<144;)t.lens[n++]=8;for(;n<256;)t.lens[n++]=9;for(;n<280;)t.lens[n++]=7;for(;n<288;)t.lens[n++]=8;for(_(1,t.lens,0,288,s,0,t.work,{bits:9}),n=0;n<32;)t.lens[n++]=5;_(2,t.lens,0,32,p,0,t.work,{bits:5}),v=!1}t.lencode=s,t.lenbits=9,t.distcode=p,t.distbits=5}function updatewindow(t,n,i,s){var p,g=t.state;return null===g.window&&(g.wsize=1<<g.wbits,g.wnext=0,g.whave=0,g.window=new b.Buf8(g.wsize)),s>=g.wsize?(b.arraySet(g.window,n,i-g.wsize,g.wsize,0),g.wnext=0,g.whave=g.wsize):((p=g.wsize-g.wnext)>s&&(p=s),b.arraySet(g.window,n,i-s,p,g.wnext),(s-=p)?(b.arraySet(g.window,n,i-s,s,0),g.wnext=s,g.whave=g.wsize):(g.wnext+=p,g.wnext===g.wsize&&(g.wnext=0),g.whave<g.wsize&&(g.whave+=p))),0}function inflate(t,n){var i,s,p,v,w,S,R,T,x,A,k,O,P,C,I,L,N,M,B,j,D,F,W,q,U=0,$=new b.Buf8(4),H=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!t||!t.state||!t.output||!t.input&&0!==t.avail_in)return -2;12===(i=t.state).mode&&(i.mode=13),w=t.next_out,p=t.output,R=t.avail_out,v=t.next_in,s=t.input,S=t.avail_in,T=i.hold,x=i.bits,A=S,k=R,F=0;e:for(;;)switch(i.mode){case 1:if(0===i.wrap){i.mode=13;break}for(;x<16;){if(0===S)break e;S--,T+=s[v++]<<x,x+=8}if(2&i.wrap&&35615===T){i.check=0,$[0]=255&T,$[1]=T>>>8&255,i.check=y(i.check,$,2,0),T=0,x=0,i.mode=2;break}if(i.flags=0,i.head&&(i.head.done=!1),!(1&i.wrap)||(((255&T)<<8)+(T>>8))%31){t.msg="incorrect header check",i.mode=30;break}if((15&T)!=8){t.msg="unknown compression method",i.mode=30;break}if(T>>>=4,x-=4,D=(15&T)+8,0===i.wbits)i.wbits=D;else if(D>i.wbits){t.msg="invalid window size",i.mode=30;break}i.dmax=1<<D,t.adler=i.check=1,i.mode=512&T?10:12,T=0,x=0;break;case 2:for(;x<16;){if(0===S)break e;S--,T+=s[v++]<<x,x+=8}if(i.flags=T,(255&i.flags)!=8){t.msg="unknown compression method",i.mode=30;break}if(57344&i.flags){t.msg="unknown header flags set",i.mode=30;break}i.head&&(i.head.text=T>>8&1),512&i.flags&&($[0]=255&T,$[1]=T>>>8&255,i.check=y(i.check,$,2,0)),T=0,x=0,i.mode=3;case 3:for(;x<32;){if(0===S)break e;S--,T+=s[v++]<<x,x+=8}i.head&&(i.head.time=T),512&i.flags&&($[0]=255&T,$[1]=T>>>8&255,$[2]=T>>>16&255,$[3]=T>>>24&255,i.check=y(i.check,$,4,0)),T=0,x=0,i.mode=4;case 4:for(;x<16;){if(0===S)break e;S--,T+=s[v++]<<x,x+=8}i.head&&(i.head.xflags=255&T,i.head.os=T>>8),512&i.flags&&($[0]=255&T,$[1]=T>>>8&255,i.check=y(i.check,$,2,0)),T=0,x=0,i.mode=5;case 5:if(1024&i.flags){for(;x<16;){if(0===S)break e;S--,T+=s[v++]<<x,x+=8}i.length=T,i.head&&(i.head.extra_len=T),512&i.flags&&($[0]=255&T,$[1]=T>>>8&255,i.check=y(i.check,$,2,0)),T=0,x=0}else i.head&&(i.head.extra=null);i.mode=6;case 6:if(1024&i.flags&&((O=i.length)>S&&(O=S),O&&(i.head&&(D=i.head.extra_len-i.length,i.head.extra||(i.head.extra=Array(i.head.extra_len)),b.arraySet(i.head.extra,s,v,O,D)),512&i.flags&&(i.check=y(i.check,s,O,v)),S-=O,v+=O,i.length-=O),i.length))break e;i.length=0,i.mode=7;case 7:if(2048&i.flags){if(0===S)break e;O=0;do D=s[v+O++],i.head&&D&&i.length<65536&&(i.head.name+=String.fromCharCode(D));while(D&&O<S);if(512&i.flags&&(i.check=y(i.check,s,O,v)),S-=O,v+=O,D)break e}else i.head&&(i.head.name=null);i.length=0,i.mode=8;case 8:if(4096&i.flags){if(0===S)break e;O=0;do D=s[v+O++],i.head&&D&&i.length<65536&&(i.head.comment+=String.fromCharCode(D));while(D&&O<S);if(512&i.flags&&(i.check=y(i.check,s,O,v)),S-=O,v+=O,D)break e}else i.head&&(i.head.comment=null);i.mode=9;case 9:if(512&i.flags){for(;x<16;){if(0===S)break e;S--,T+=s[v++]<<x,x+=8}if(T!==(65535&i.check)){t.msg="header crc mismatch",i.mode=30;break}T=0,x=0}i.head&&(i.head.hcrc=i.flags>>9&1,i.head.done=!0),t.adler=i.check=0,i.mode=12;break;case 10:for(;x<32;){if(0===S)break e;S--,T+=s[v++]<<x,x+=8}t.adler=i.check=zswap32(T),T=0,x=0,i.mode=11;case 11:if(0===i.havedict)return t.next_out=w,t.avail_out=R,t.next_in=v,t.avail_in=S,i.hold=T,i.bits=x,2;t.adler=i.check=1,i.mode=12;case 12:if(5===n||6===n)break e;case 13:if(i.last){T>>>=7&x,x-=7&x,i.mode=27;break}for(;x<3;){if(0===S)break e;S--,T+=s[v++]<<x,x+=8}switch(i.last=1&T,x-=1,3&(T>>>=1)){case 0:i.mode=14;break;case 1:if(fixedtables(i),i.mode=20,6===n){T>>>=2,x-=2;break e}break;case 2:i.mode=17;break;case 3:t.msg="invalid block type",i.mode=30}T>>>=2,x-=2;break;case 14:for(T>>>=7&x,x-=7&x;x<32;){if(0===S)break e;S--,T+=s[v++]<<x,x+=8}if((65535&T)!=(T>>>16^65535)){t.msg="invalid stored block lengths",i.mode=30;break}if(i.length=65535&T,T=0,x=0,i.mode=15,6===n)break e;case 15:i.mode=16;case 16:if(O=i.length){if(O>S&&(O=S),O>R&&(O=R),0===O)break e;b.arraySet(p,s,v,O,w),S-=O,v+=O,R-=O,w+=O,i.length-=O;break}i.mode=12;break;case 17:for(;x<14;){if(0===S)break e;S--,T+=s[v++]<<x,x+=8}if(i.nlen=(31&T)+257,T>>>=5,x-=5,i.ndist=(31&T)+1,T>>>=5,x-=5,i.ncode=(15&T)+4,T>>>=4,x-=4,i.nlen>286||i.ndist>30){t.msg="too many length or distance symbols",i.mode=30;break}i.have=0,i.mode=18;case 18:for(;i.have<i.ncode;){for(;x<3;){if(0===S)break e;S--,T+=s[v++]<<x,x+=8}i.lens[H[i.have++]]=7&T,T>>>=3,x-=3}for(;i.have<19;)i.lens[H[i.have++]]=0;if(i.lencode=i.lendyn,i.lenbits=7,W={bits:i.lenbits},F=_(0,i.lens,0,19,i.lencode,0,i.work,W),i.lenbits=W.bits,F){t.msg="invalid code lengths set",i.mode=30;break}i.have=0,i.mode=19;case 19:for(;i.have<i.nlen+i.ndist;){for(;I=(U=i.lencode[T&(1<<i.lenbits)-1])>>>24,L=U>>>16&255,N=65535&U,!(I<=x);){if(0===S)break e;S--,T+=s[v++]<<x,x+=8}if(N<16)T>>>=I,x-=I,i.lens[i.have++]=N;else{if(16===N){for(q=I+2;x<q;){if(0===S)break e;S--,T+=s[v++]<<x,x+=8}if(T>>>=I,x-=I,0===i.have){t.msg="invalid bit length repeat",i.mode=30;break}D=i.lens[i.have-1],O=3+(3&T),T>>>=2,x-=2}else if(17===N){for(q=I+3;x<q;){if(0===S)break e;S--,T+=s[v++]<<x,x+=8}T>>>=I,x-=I,D=0,O=3+(7&T),T>>>=3,x-=3}
15else{for(q=I+7;x<q;){if(0===S)break e;S--,T+=s[v++]<<x,x+=8}T>>>=I,x-=I,D=0,O=11+(127&T),T>>>=7,x-=7}if(i.have+O>i.nlen+i.ndist){t.msg="invalid bit length repeat",i.mode=30;break}for(;O--;)i.lens[i.have++]=D}}if(30===i.mode)break;if(0===i.lens[256]){t.msg="invalid code -- missing end-of-block",i.mode=30;break}if(i.lenbits=9,W={bits:i.lenbits},F=_(1,i.lens,0,i.nlen,i.lencode,0,i.work,W),i.lenbits=W.bits,F){t.msg="invalid literal/lengths set",i.mode=30;break}if(i.distbits=6,i.distcode=i.distdyn,W={bits:i.distbits},F=_(2,i.lens,i.nlen,i.ndist,i.distcode,0,i.work,W),i.distbits=W.bits,F){t.msg="invalid distances set",i.mode=30;break}if(i.mode=20,6===n)break e;case 20:i.mode=21;case 21:if(S>=6&&R>=258){t.next_out=w,t.avail_out=R,t.next_in=v,t.avail_in=S,i.hold=T,i.bits=x,m(t,k),w=t.next_out,p=t.output,R=t.avail_out,v=t.next_in,s=t.input,S=t.avail_in,T=i.hold,x=i.bits,12===i.mode&&(i.back=-1);break}for(i.back=0;I=(U=i.lencode[T&(1<<i.lenbits)-1])>>>24,L=U>>>16&255,N=65535&U,!(I<=x);){if(0===S)break e;S--,T+=s[v++]<<x,x+=8}if(L&&(240&L)==0){for(M=I,B=L,j=N;I=(U=i.lencode[j+((T&(1<<M+B)-1)>>M)])>>>24,L=U>>>16&255,N=65535&U,!(M+I<=x);){if(0===S)break e;S--,T+=s[v++]<<x,x+=8}T>>>=M,x-=M,i.back+=M}if(T>>>=I,x-=I,i.back+=I,i.length=N,0===L){i.mode=26;break}if(32&L){i.back=-1,i.mode=12;break}if(64&L){t.msg="invalid literal/length code",i.mode=30;break}i.extra=15&L,i.mode=22;case 22:if(i.extra){for(q=i.extra;x<q;){if(0===S)break e;S--,T+=s[v++]<<x,x+=8}i.length+=T&(1<<i.extra)-1,T>>>=i.extra,x-=i.extra,i.back+=i.extra}i.was=i.length,i.mode=23;case 23:for(;I=(U=i.distcode[T&(1<<i.distbits)-1])>>>24,L=U>>>16&255,N=65535&U,!(I<=x);){if(0===S)break e;S--,T+=s[v++]<<x,x+=8}if((240&L)==0){for(M=I,B=L,j=N;I=(U=i.distcode[j+((T&(1<<M+B)-1)>>M)])>>>24,L=U>>>16&255,N=65535&U,!(M+I<=x);){if(0===S)break e;S--,T+=s[v++]<<x,x+=8}T>>>=M,x-=M,i.back+=M}if(T>>>=I,x-=I,i.back+=I,64&L){t.msg="invalid distance code",i.mode=30;break}i.offset=N,i.extra=15&L,i.mode=24;case 24:if(i.extra){for(q=i.extra;x<q;){if(0===S)break e;S--,T+=s[v++]<<x,x+=8}i.offset+=T&(1<<i.extra)-1,T>>>=i.extra,x-=i.extra,i.back+=i.extra}if(i.offset>i.dmax){t.msg="invalid distance too far back",i.mode=30;break}i.mode=25;case 25:if(0===R)break e;if(O=k-R,i.offset>O){if((O=i.offset-O)>i.whave&&i.sane){t.msg="invalid distance too far back",i.mode=30;break}O>i.wnext?(O-=i.wnext,P=i.wsize-O):P=i.wnext-O,O>i.length&&(O=i.length),C=i.window}else C=p,P=w-i.offset,O=i.length;O>R&&(O=R),R-=O,i.length-=O;do p[w++]=C[P++];while(--O);0===i.length&&(i.mode=21);break;case 26:if(0===R)break e;p[w++]=i.length,R--,i.mode=21;break;case 27:if(i.wrap){for(;x<32;){if(0===S)break e;S--,T|=s[v++]<<x,x+=8}if(k-=R,t.total_out+=k,i.total+=k,k&&(t.adler=i.check=i.flags?y(i.check,p,k,w-k):g(i.check,p,k,w-k)),k=R,(i.flags?T:zswap32(T))!==i.check){t.msg="incorrect data check",i.mode=30;break}T=0,x=0}i.mode=28;case 28:if(i.wrap&&i.flags){for(;x<32;){if(0===S)break e;S--,T+=s[v++]<<x,x+=8}if(T!==(4294967295&i.total)){t.msg="incorrect length check",i.mode=30;break}T=0,x=0}i.mode=29;case 29:F=1;break e;case 30:F=-3;break e;case 31:return -4;default:return -2}return(t.next_out=w,t.avail_out=R,t.next_in=v,t.avail_in=S,i.hold=T,i.bits=x,(i.wsize||k!==t.avail_out&&i.mode<30&&(i.mode<27||4!==n))&&updatewindow(t,t.output,t.next_out,k-t.avail_out))?(i.mode=31,-4):(A-=t.avail_in,k-=t.avail_out,t.total_in+=A,t.total_out+=k,i.total+=k,i.wrap&&k&&(t.adler=i.check=i.flags?y(i.check,p,k,t.next_out-k):g(i.check,p,k,t.next_out-k)),t.data_type=i.bits+(i.last?64:0)+(12===i.mode?128:0)+(20===i.mode||15===i.mode?256:0),(0===A&&0===k||4===n)&&0===F&&(F=-5),F)}function inflateEnd(t){if(!t||!t.state)return -2;var n=t.state;return n.window&&(n.window=null),t.state=null,0}function inflateGetHeader(t,n){var i;return t&&t.state&&(2&(i=t.state).wrap)!=0?(i.head=n,n.done=!1,0):-2}function inflateSetDictionary(t,n){var i,s=n.length;return t&&t.state&&(0===(i=t.state).wrap||11===i.mode)?11===i.mode&&g(1,n,s,0)!==i.check?-3:updatewindow(t,n,s,s)?(i.mode=31,-4):(i.havedict=1,0):-2}n.inflateReset=inflateReset,n.inflateReset2=inflateReset2,n.inflateResetKeep=inflateResetKeep,n.inflateInit=inflateInit,n.inflateInit2=inflateInit2,n.inflate=inflate,n.inflateEnd=inflateEnd,n.inflateGetHeader=inflateGetHeader,n.inflateSetDictionary=inflateSetDictionary,n.inflateInfo="pako inflate (from Nodeca project)"},19:function(t,n,i){var s=i(380),p=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],b=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],g=[
151,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],y=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];t.exports=function(t,n,i,m,_,v,w,S){var R,T,x,A,k,O,P,C,I,L=S.bits,N=0,M=0,B=0,j=0,D=0,F=0,W=0,q=0,U=0,$=0,H=null,z=0,V=new s.Buf16(16),G=new s.Buf16(16),Z=null,J=0;for(N=0;N<=15;N++)V[N]=0;for(M=0;M<m;M++)V[n[i+M]]++;for(j=15,D=L;j>=1&&0===V[j];j--);if(D>j&&(D=j),0===j)return _[v++]=20971520,_[v++]=20971520,S.bits=1,0;for(B=1;B<j&&0===V[B];B++);for(D<B&&(D=B),q=1,N=1;N<=15;N++)if(q<<=1,(q-=V[N])<0)return -1;if(q>0&&(0===t||1!==j))return -1;for(N=1,G[1]=0;N<15;N++)G[N+1]=G[N]+V[N];for(M=0;M<m;M++)0!==n[i+M]&&(w[G[n[i+M]]++]=M);if(0===t?(H=Z=w,O=19):1===t?(H=p,z-=257,Z=b,J-=257,O=256):(H=g,Z=y,O=-1),$=0,M=0,N=B,k=v,F=D,W=0,x=-1,A=(U=1<<D)-1,1===t&&U>852||2===t&&U>592)return 1;for(;;){P=N-W,w[M]<O?(C=0,I=w[M]):w[M]>O?(C=Z[J+w[M]],I=H[z+w[M]]):(C=96,I=0),R=1<<N-W,B=T=1<<F;do _[k+($>>W)+(T-=R)]=P<<24|C<<16|I|0;while(0!==T);for(R=1<<N-1;$&R;)R>>=1;if(0!==R?($&=R-1,$+=R):$=0,M++,0==--V[N]){if(N===j)break;N=n[i+w[M]]}if(N>D&&($&A)!==x){for(0===W&&(W=D),k+=B,q=1<<(F=N-W);F+W<j&&!((q-=V[F+W])<=0);)F++,q<<=1;if(U+=1<<F,1===t&&U>852||2===t&&U>592)return 1;_[x=$&A]=D<<24|F<<16|k-v|0}}return 0!==$&&(_[k+$]=N-W<<24|4194304),S.bits=D,0}},31:function(t){t.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},842:function(t,n,i){var s,p,b,g=i(380);function zero(t){for(var n=t.length;--n>=0;)t[n]=0}var y=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],m=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],_=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],v=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],w=Array(576);zero(w);var S=Array(60);zero(S);var R=Array(512);zero(R);var T=Array(256);zero(T);var x=Array(29);zero(x);var A=Array(30);function StaticTreeDesc(t,n,i,s,p){this.static_tree=t,this.extra_bits=n,this.extra_base=i,this.elems=s,this.max_length=p,this.has_stree=t&&t.length}function TreeDesc(t,n){this.dyn_tree=t,this.max_code=0,this.stat_desc=n}function d_code(t){return t<256?R[t]:R[256+(t>>>7)]}function put_short(t,n){t.pending_buf[t.pending++]=255&n,t.pending_buf[t.pending++]=n>>>8&255}function send_bits(t,n,i){t.bi_valid>16-i?(t.bi_buf|=n<<t.bi_valid&65535,put_short(t,t.bi_buf),t.bi_buf=n>>16-t.bi_valid,t.bi_valid+=i-16):(t.bi_buf|=n<<t.bi_valid&65535,t.bi_valid+=i)}function send_code(t,n,i){send_bits(t,i[2*n],i[2*n+1])}function bi_reverse(t,n){var i=0;do i|=1&t,t>>>=1,i<<=1;while(--n>0);return i>>>1}function bi_flush(t){16===t.bi_valid?(put_short(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}function gen_bitlen(t,n){var i,s,p,b,g,y,m=n.dyn_tree,_=n.max_code,v=n.stat_desc.static_tree,w=n.stat_desc.has_stree,S=n.stat_desc.extra_bits,R=n.stat_desc.extra_base,T=n.stat_desc.max_length,x=0;for(b=0;b<=15;b++)t.bl_count[b]=0;for(m[2*t.heap[t.heap_max]+1]=0,i=t.heap_max+1;i<573;i++)(b=m[2*m[2*(s=t.heap[i])+1]+1]+1)>T&&(b=T,x++),m[2*s+1]=b,!(s>_)&&(t.bl_count[b]++,g=0,s>=R&&(g=S[s-R]),y=m[2*s],t.opt_len+=y*(b+g),w&&(t.static_len+=y*(v[2*s+1]+g)));if(0!==x){do{for(b=T-1;0===t.bl_count[b];)b--;t.bl_count[b]--,t.bl_count[b+1]+=2,t.bl_count[T]--,x-=2}while(x>0);for(b=T;0!==b;b--)for(s=t.bl_count[b];0!==s;)!((p=t.heap[--i])>_)&&(m[2*p+1]!==b&&(t.opt_len+=(b-m[2*p+1])*m[2*p],m[2*p+1]=b),s--)}}function gen_codes(t,n,i){var s,p,b=Array(16),g=0;for(s=1;s<=15;s++)b[s]=g=g+i[s-1]<<1;for(p=0;p<=n;p++){var y=t[2*p+1];0!==y&&(t[2*p]=bi_reverse(b[y]++,y))}}function tr_static_init(){var t,n,i,g,v,k=Array(16);for(g=0,i=0;g<28;g++)for(t=0,x[g]=i;t<1<<y[g];t++)T[i++]=g;for(T[i-1]=g,v=0,g=0;g<16;g++)for(t=0,A[g]=v;t<1<<m[g];t++)R[v++]=g;for(v>>=7;g<30;g++)for(t=0,A[g]=v<<7;t<1<<m[g]-7;t++)R[256+v++]=g;for(n=0;n<=15;n++)k[n]=0;for(t=0;t<=143;)w[2*t+1]=8,t++,k[8]++;for(;t<=255;)w[2*t+1]=9,t++,k[9]++;for(;t<=279;)w[2*t+1]=7,t++,k[7]++;for(;t<=287;)w[2*t+1]=8,t++,k[8]++;for(gen_codes(w,287,k),t=0;t<30;t++)S[2*t+1]=5,S[2*t]=bi_reverse(t,5);s=new StaticTreeDesc(w,y,257,286,15),p=new StaticTreeDesc(S,m,0,30,15),b=new StaticTreeDesc([],_,0,19,7)}function init_block(t){var n;for(n=0;n<286;n++)t.dyn_ltree[2*n]=0;for(n=0;n<30;n++)t.dyn_dtree[2*n]=0;for(n=0;n<19;n++)t.bl_tree[2*n]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.last_lit=t.matches=0}function bi_windup(t){t.bi_valid>8?put_short(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0}function copy_block(t,n,i,s){bi_windup(t),s&&(put_short(t,i),put_short(t,~i)),g.arraySet(t.pending_buf,t.window,n,i,t.pending),t.pending+=i}function smaller(t,n,i,s){var p=2*n,b=2*i;return t[p]<t[b]||t[p]===t[b]&&s[n]<=s[i]}function pqdownheap(t,n,i){for(var s=t.heap[i],p=i<<1;p<=t.heap_len&&(p<t.heap_len&&smaller(n,t.heap[p+1],t.heap[p],t.depth)&&p++,!smaller(n,s,t.heap[p],t.depth));)t.heap[i]=t.heap[p],i=p,p<<=1;t.heap[i]=s}function compress_block(t,n,i){var s,p,b,g,_=0;
15if(0!==t.last_lit)do s=t.pending_buf[t.d_buf+2*_]<<8|t.pending_buf[t.d_buf+2*_+1],p=t.pending_buf[t.l_buf+_],_++,0===s?send_code(t,p,n):(send_code(t,(b=T[p])+256+1,n),0!==(g=y[b])&&send_bits(t,p-=x[b],g),send_code(t,b=d_code(--s),i),0!==(g=m[b])&&send_bits(t,s-=A[b],g));while(_<t.last_lit);send_code(t,256,n)}function build_tree(t,n){var i,s,p,b=n.dyn_tree,g=n.stat_desc.static_tree,y=n.stat_desc.has_stree,m=n.stat_desc.elems,_=-1;for(i=0,t.heap_len=0,t.heap_max=573;i<m;i++)0!==b[2*i]?(t.heap[++t.heap_len]=_=i,t.depth[i]=0):b[2*i+1]=0;for(;t.heap_len<2;)b[2*(p=t.heap[++t.heap_len]=_<2?++_:0)]=1,t.depth[p]=0,t.opt_len--,y&&(t.static_len-=g[2*p+1]);for(n.max_code=_,i=t.heap_len>>1;i>=1;i--)pqdownheap(t,b,i);p=m;do i=t.heap[1],t.heap[1]=t.heap[t.heap_len--],pqdownheap(t,b,1),s=t.heap[1],t.heap[--t.heap_max]=i,t.heap[--t.heap_max]=s,b[2*p]=b[2*i]+b[2*s],t.depth[p]=(t.depth[i]>=t.depth[s]?t.depth[i]:t.depth[s])+1,b[2*i+1]=b[2*s+1]=p,t.heap[1]=p++,pqdownheap(t,b,1);while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],gen_bitlen(t,n),gen_codes(b,_,t.bl_count)}function scan_tree(t,n,i){var s,p,b=-1,g=n[1],y=0,m=7,_=4;for(0===g&&(m=138,_=3),n[(i+1)*2+1]=65535,s=0;s<=i;s++)p=g,g=n[(s+1)*2+1],++y<m&&p===g||(y<_?t.bl_tree[2*p]+=y:0!==p?(p!==b&&t.bl_tree[2*p]++,t.bl_tree[32]++):y<=10?t.bl_tree[34]++:t.bl_tree[36]++,y=0,b=p,0===g?(m=138,_=3):p===g?(m=6,_=3):(m=7,_=4))}function send_tree(t,n,i){var s,p,b=-1,g=n[1],y=0,m=7,_=4;for(0===g&&(m=138,_=3),s=0;s<=i;s++)if(p=g,g=n[(s+1)*2+1],!(++y<m)||p!==g){if(y<_)do send_code(t,p,t.bl_tree);while(0!=--y);else 0!==p?(p!==b&&(send_code(t,p,t.bl_tree),y--),send_code(t,16,t.bl_tree),send_bits(t,y-3,2)):y<=10?(send_code(t,17,t.bl_tree),send_bits(t,y-3,3)):(send_code(t,18,t.bl_tree),send_bits(t,y-11,7));y=0,b=p,0===g?(m=138,_=3):p===g?(m=6,_=3):(m=7,_=4)}}function build_bl_tree(t){var n;for(scan_tree(t,t.dyn_ltree,t.l_desc.max_code),scan_tree(t,t.dyn_dtree,t.d_desc.max_code),build_tree(t,t.bl_desc),n=18;n>=3&&0===t.bl_tree[2*v[n]+1];n--);return t.opt_len+=3*(n+1)+5+5+4,n}function send_all_trees(t,n,i,s){var p;for(send_bits(t,n-257,5),send_bits(t,i-1,5),send_bits(t,s-4,4),p=0;p<s;p++)send_bits(t,t.bl_tree[2*v[p]+1],3);send_tree(t,t.dyn_ltree,n-1),send_tree(t,t.dyn_dtree,i-1)}function detect_data_type(t){var n,i=4093624447;for(n=0;n<=31;n++,i>>>=1)if(1&i&&0!==t.dyn_ltree[2*n])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(n=32;n<256;n++)if(0!==t.dyn_ltree[2*n])return 1;return 0}zero(A);var k=!1;function _tr_init(t){k||(tr_static_init(),k=!0),t.l_desc=new TreeDesc(t.dyn_ltree,s),t.d_desc=new TreeDesc(t.dyn_dtree,p),t.bl_desc=new TreeDesc(t.bl_tree,b),t.bi_buf=0,t.bi_valid=0,init_block(t)}function _tr_stored_block(t,n,i,s){send_bits(t,0+(s?1:0),3),copy_block(t,n,i,!0)}function _tr_align(t){send_bits(t,2,3),send_code(t,256,w),bi_flush(t)}function _tr_flush_block(t,n,i,s){var p,b,g=0;t.level>0?(2===t.strm.data_type&&(t.strm.data_type=detect_data_type(t)),build_tree(t,t.l_desc),build_tree(t,t.d_desc),g=build_bl_tree(t),p=t.opt_len+3+7>>>3,(b=t.static_len+3+7>>>3)<=p&&(p=b)):p=b=i+5,i+4<=p&&-1!==n?_tr_stored_block(t,n,i,s):4===t.strategy||b===p?(send_bits(t,2+(s?1:0),3),compress_block(t,w,S)):(send_bits(t,4+(s?1:0),3),send_all_trees(t,t.l_desc.max_code+1,t.d_desc.max_code+1,g+1),compress_block(t,t.dyn_ltree,t.dyn_dtree)),init_block(t),s&&bi_windup(t)}function _tr_tally(t,n,i){return t.pending_buf[t.d_buf+2*t.last_lit]=n>>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&n,t.pending_buf[t.l_buf+t.last_lit]=255&i,t.last_lit++,0===n?t.dyn_ltree[2*i]++:(t.matches++,n--,t.dyn_ltree[(T[i]+256+1)*2]++,t.dyn_dtree[2*d_code(n)]++),t.last_lit===t.lit_bufsize-1}n._tr_init=_tr_init,n._tr_stored_block=_tr_stored_block,n._tr_flush_block=_tr_flush_block,n._tr_tally=_tr_tally,n._tr_align=_tr_align},562:function(t){function ZStream(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}t.exports=ZStream},491:function(t){t.exports=i(69282)},300:function(t){t.exports=i(48764)},781:function(t){t.exports=i(79681)},837:function(t){t.exports=i(89539)}},b={};function __nccwpck_require__(t){var i=b[t];if(void 0!==i)return i.exports;var s=b[t]={exports:{}},p=!0;try{n[t](s,s.exports,__nccwpck_require__),p=!1}finally{p&&delete b[t]}return s.exports}__nccwpck_require__.ab="//";var g=__nccwpck_require__(23);t.exports=g}()},78428:function(t,n,i){!function(){var n={528:function(t,n,i){var s=i(685),p=i(310),b=t.exports;for(var g in s)s.hasOwnProperty(g)&&(b[g]=s[g]);function validateParams(t){if("string"==typeof t&&(t=p.parse(t)),t.protocol||(t.protocol="https:"),"https:"!==t.protocol)throw Error('Protocol "'+t.protocol+'" not supported. Expected "https:"');return t}b.request=function(t,n){return t=validateParams(t),s.request.call(this,t,n)},b.get=function(t,n){return t=validateParams(t),s.get.call(this,t,n)}},685:function(t){"use strict";
15t.exports=i(22321)},310:function(t){"use strict";t.exports=i(11987)}},s={};function __nccwpck_require__(t){var i=s[t];if(void 0!==i)return i.exports;var p=s[t]={exports:{}},b=!0;try{n[t](p,p.exports,__nccwpck_require__),b=!1}finally{b&&delete s[t]}return p.exports}__nccwpck_require__.ab="//";var p=__nccwpck_require__(528);t.exports=p}()},11987:function(t,n,i){!function(){var n={452:function(t){"use strict";t.exports=i(97334)}},s={};function __nccwpck_require__(t){var i=s[t];if(void 0!==i)return i.exports;var p=s[t]={exports:{}},b=!0;try{n[t](p,p.exports,__nccwpck_require__),b=!1}finally{b&&delete s[t]}return p.exports}__nccwpck_require__.ab="//";var p={};!function(){var t,n=(t=__nccwpck_require__(452))&&"object"==typeof t&&"default"in t?t.default:t,i=/https?|ftp|gopher|file/;function r(t){"string"==typeof t&&(t=d(t));var s,p,b,g,y,m,_,v,w,S=(p=(s=t).auth,b=s.hostname,g=s.protocol||"",y=s.pathname||"",m=s.hash||"",_=s.query||"",v=!1,p=p?encodeURIComponent(p).replace(/%3A/i,":")+"@":"",s.host?v=p+s.host:b&&(v=p+(~b.indexOf(":")?"["+b+"]":b),s.port&&(v+=":"+s.port)),_&&"object"==typeof _&&(_=n.encode(_)),w=s.search||_&&"?"+_||"",g&&":"!==g.substr(-1)&&(g+=":"),s.slashes||(!g||i.test(g))&&!1!==v?(v="//"+(v||""),y&&"/"!==y[0]&&(y="/"+y)):v||(v=""),m&&"#"!==m[0]&&(m="#"+m),w&&"?"!==w[0]&&(w="?"+w),{protocol:g,host:v,pathname:y=y.replace(/[?#]/g,encodeURIComponent),search:w=w.replace("#","%23"),hash:m});return""+S.protocol+S.host+S.pathname+S.search+S.hash}var s="http://",b=s+"w.w",g=/^([a-z0-9.+-]*:\/\/\/)([a-z0-9.+-]:\/*)?/i,y=/https?|ftp|gopher|file/;function h(t,n){var i="string"==typeof t?d(t):t;t="object"==typeof t?r(t):t;var p=d(n),m="";i.protocol&&!i.slashes&&(m=i.protocol,t=t.replace(i.protocol,""),m+="/"===n[0]||"/"===t[0]?"/":""),m&&p.protocol&&(m="",p.slashes||(m=p.protocol,n=n.replace(p.protocol,"")));var _=t.match(g);_&&!p.protocol&&(t=t.substr((m=_[1]+(_[2]||"")).length),/^\/\/[^/]/.test(n)&&(m=m.slice(0,-1)));var v=new URL(t,b+"/"),w=new URL(n,v).toString().replace(b,""),S=p.protocol||i.protocol;return S+=i.slashes||p.slashes?"//":"",!m&&S?w=w.replace(s,S):m&&(w=w.replace(s,"")),y.test(w)||~n.indexOf(".")||"/"===t.slice(-1)||"/"===n.slice(-1)||"/"!==w.slice(-1)||(w=w.slice(0,-1)),m&&(w=m+("/"===w[0]?w.substr(1):w)),w}function l(){}l.prototype.parse=d,l.prototype.format=r,l.prototype.resolve=h,l.prototype.resolveObject=h;var m=/^https?|ftp|gopher|file/,_=/^(.*?)([#?].*)/,v=/^([a-z0-9.+-]*:)(\/{0,3})(.*)/i,w=/^([a-z0-9.+-]*:)?\/\/\/*/i,S=/^([a-z0-9.+-]*:)(\/{0,2})\[(.*)\]$/i;function d(t,i,s){if(void 0===i&&(i=!1),void 0===s&&(s=!1),t&&"object"==typeof t&&t instanceof l)return t;var p=(t=t.trim()).match(_);t=p?p[1].replace(/\\/g,"/")+p[2]:t.replace(/\\/g,"/"),S.test(t)&&"/"!==t.slice(-1)&&(t+="/");var g=!/(^javascript)/.test(t)&&t.match(v),y=w.test(t),R="";g&&(m.test(g[1])||(R=g[1].toLowerCase(),t=""+g[2]+g[3]),g[2]||(y=!1,m.test(g[1])?(R=g[1],t=""+g[3]):t="//"+g[3]),3!==g[2].length&&1!==g[2].length||(R=g[1],t="/"+g[3]));var T,x=(p?p[1]:t).match(/^https?:\/\/[^/]+(:[0-9]+)(?=\/|$)/),A=x&&x[1],k=new l,O="",P="";try{T=new URL(t)}catch(n){O=n,R||s||!/^\/\//.test(t)||/^\/\/.+[@.]/.test(t)||(P="/",t=t.substr(1));try{T=new URL(t,b)}catch(t){return k.protocol=R,k.href=R,k}}k.slashes=y&&!P,k.host="w.w"===T.host?"":T.host,k.hostname="w.w"===T.hostname?"":T.hostname.replace(/(\[|\])/g,""),k.protocol=O?R||null:T.protocol,k.search=T.search.replace(/\\/g,"%5C"),k.hash=T.hash.replace(/\\/g,"%5C");var C=t.split("#");!k.search&&~C[0].indexOf("?")&&(k.search="?"),k.hash||""!==C[1]||(k.hash="#"),k.query=i?n.decode(T.search.substr(1)):k.search.substr(1),k.pathname=P+(g?T.pathname.replace(/['^|`]/g,function(t){return"%"+t.charCodeAt().toString(16).toUpperCase()}).replace(/((?:%[0-9A-F]{2})+)/g,function(t,n){try{return decodeURIComponent(n).split("").map(function(t){var n=t.charCodeAt();return n>256||/^[a-z0-9]$/i.test(t)?t:"%"+n.toString(16).toUpperCase()}).join("")}catch(t){return n}}):T.pathname),"about:"===k.protocol&&"blank"===k.pathname&&(k.protocol="",k.pathname=""),O&&"/"!==t[0]&&(k.pathname=k.pathname.substr(1)),R&&!m.test(R)&&"/"!==t.slice(-1)&&"/"===k.pathname&&(k.pathname=""),k.path=k.pathname+k.search,k.auth=[T.username,T.password].map(decodeURIComponent).filter(
15Boolean).join(":"),k.port=T.port,A&&!k.host.endsWith(A)&&(k.host+=A,k.port=A.slice(1)),k.href=P?""+k.pathname+k.search+k.hash:r(k);var I=/^(file)/.test(k.href)?["host","hostname"]:[];return Object.keys(k).forEach(function(t){~I.indexOf(t)||(k[t]=k[t]||null)}),k}p.parse=d,p.format=r,p.resolve=h,p.resolveObject=function(t,n){return d(h(t,n))},p.Url=l}(),t.exports=p}()},97334:function(t){!function(){"use strict";var n={815:function(t){function hasOwnProperty(t,n){return Object.prototype.hasOwnProperty.call(t,n)}t.exports=function(t,i,s,p){i=i||"&",s=s||"=";var b={};if("string"!=typeof t||0===t.length)return b;var g=/\+/g;t=t.split(i);var y=1e3;p&&"number"==typeof p.maxKeys&&(y=p.maxKeys);var m=t.length;y>0&&m>y&&(m=y);for(var _=0;_<m;++_){var v,w,S,R,T=t[_].replace(g,"%20"),x=T.indexOf(s);x>=0?(v=T.substr(0,x),w=T.substr(x+1)):(v=T,w=""),S=decodeURIComponent(v),R=decodeURIComponent(w),hasOwnProperty(b,S)?n(b[S])?b[S].push(R):b[S]=[b[S],R]:b[S]=R}return b};var n=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)}},577:function(t){var stringifyPrimitive=function(t){switch(typeof t){case"string":return t;case"boolean":return t?"true":"false";case"number":return isFinite(t)?t:"";default:return""}};t.exports=function(t,s,p,b){return(s=s||"&",p=p||"=",null===t&&(t=void 0),"object"==typeof t)?map(i(t),function(i){var b=encodeURIComponent(stringifyPrimitive(i))+p;return n(t[i])?map(t[i],function(t){return b+encodeURIComponent(stringifyPrimitive(t))}).join(s):b+encodeURIComponent(stringifyPrimitive(t[i]))}).join(s):b?encodeURIComponent(stringifyPrimitive(b))+p+encodeURIComponent(stringifyPrimitive(t)):""};var n=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function map(t,n){if(t.map)return t.map(n);for(var i=[],s=0;s<t.length;s++)i.push(n(t[s],s));return i}var i=Object.keys||function(t){var n=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&n.push(i);return n}}},i={};function __nccwpck_require__(t){var s=i[t];if(void 0!==s)return s.exports;var p=i[t]={exports:{}},b=!0;try{n[t](p,p.exports,__nccwpck_require__),b=!1}finally{b&&delete i[t]}return p.exports}__nccwpck_require__.ab="//";var s={};s.decode=s.parse=__nccwpck_require__(815),s.encode=s.stringify=__nccwpck_require__(577),t.exports=s}()},79681:function(t,n,i){var s=i(34155);!function(){var n={782:function(t){"function"==typeof Object.create?t.exports=function(t,n){n&&(t.super_=n,t.prototype=Object.create(n.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(t,n){if(n){t.super_=n;var TempCtor=function(){};TempCtor.prototype=n.prototype,t.prototype=new TempCtor,t.prototype.constructor=t}}},646:function(t){"use strict";let n={};function createErrorType(t,i,s){function getMessage(t,n,s){return"string"==typeof i?i:i(t,n,s)}s||(s=Error);let NodeError=class NodeError extends s{constructor(t,n,i){super(getMessage(t,n,i))}};NodeError.prototype.name=s.name,NodeError.prototype.code=t,n[t]=NodeError}function oneOf(t,n){if(!Array.isArray(t))return`of ${n} ${String(t)}`;{let i=t.length;return(t=t.map(t=>String(t)),i>2)?`one of ${n} ${t.slice(0,i-1).join(", ")}, or `+t[i-1]:2===i?`one of ${n} ${t[0]} or ${t[1]}`:`of ${n} ${t[0]}`}}function startsWith(t,n,i){return t.substr(!i||i<0?0:+i,n.length)===n}function endsWith(t,n,i){return(void 0===i||i>t.length)&&(i=t.length),t.substring(i-n.length,i)===n}function includes(t,n,i){return"number"!=typeof i&&(i=0),!(i+n.length>t.length)&&-1!==t.indexOf(n,i)}createErrorType("ERR_INVALID_OPT_VALUE",function(t,n){return'The value "'+n+'" is invalid for option "'+t+'"'},TypeError),createErrorType("ERR_INVALID_ARG_TYPE",function(t,n,i){let s,p;if("string"==typeof n&&startsWith(n,"not ")?(s="must not be",n=n.replace(/^not /,"")):s="must be",endsWith(t," argument"))p=`The ${t} ${s} ${oneOf(n,"type")}`;else{let i=includes(t,".")?"property":"argument";p=`The "${t}" ${i} ${s} ${oneOf(n,"type")}`}return p+`. Received type ${typeof i}`},TypeError),createErrorType("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),createErrorType("ERR_METHOD_NOT_IMPLEMENT
15ED",function(t){return"The "+t+" method is not implemented"}),createErrorType("ERR_STREAM_PREMATURE_CLOSE","Premature close"),createErrorType("ERR_STREAM_DESTROYED",function(t){return"Cannot call "+t+" after a stream was destroyed"}),createErrorType("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),createErrorType("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),createErrorType("ERR_STREAM_WRITE_AFTER_END","write after end"),createErrorType("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),createErrorType("ERR_UNKNOWN_ENCODING",function(t){return"Unknown encoding: "+t},TypeError),createErrorType("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),t.exports.q=n},403:function(t,n,i){"use strict";var p=Object.keys||function(t){var n=[];for(var i in t)n.push(i);return n};t.exports=Duplex;var b=i(709),g=i(337);i(782)(Duplex,b);for(var y=p(g.prototype),m=0;m<y.length;m++){var _=y[m];Duplex.prototype[_]||(Duplex.prototype[_]=g.prototype[_])}function Duplex(t){if(!(this instanceof Duplex))return new Duplex(t);b.call(this,t),g.call(this,t),this.allowHalfOpen=!0,t&&(!1===t.readable&&(this.readable=!1),!1===t.writable&&(this.writable=!1),!1===t.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",onend)))}function onend(){this._writableState.ended||s.nextTick(onEndNT,this)}function onEndNT(t){t.end()}Object.defineProperty(Duplex.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(Duplex.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(Duplex.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(Duplex.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&this._readableState.destroyed&&this._writableState.destroyed},set:function(t){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=t,this._writableState.destroyed=t)}})},889:function(t,n,i){"use strict";t.exports=PassThrough;var s=i(170);function PassThrough(t){if(!(this instanceof PassThrough))return new PassThrough(t);s.call(this,t)}i(782)(PassThrough,s),PassThrough.prototype._transform=function(t,n,i){i(null,t)}},709:function(t,n,p){"use strict";t.exports=Readable,Readable.ReadableState=ReadableState,p(361).EventEmitter;var b,g,y,m,_,a=function(t,n){return t.listeners(n).length},v=p(678),w=p(300).Buffer,S=i.g.Uint8Array||function(){};function _uint8ArrayToBuffer(t){return w.from(t)}function _isUint8Array(t){return w.isBuffer(t)||t instanceof S}var R=p(837);g=R&&R.debuglog?R.debuglog("stream"):function(){};var T=p(379),x=p(25),A=p(776).getHighWaterMark,k=p(646).q,O=k.ERR_INVALID_ARG_TYPE,P=k.ERR_STREAM_PUSH_AFTER_EOF,C=k.ERR_METHOD_NOT_IMPLEMENTED,I=k.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;p(782)(Readable,v);var L=x.errorOrDestroy,N=["error","close","destroy","pause","resume"];function prependListener(t,n,i){if("function"==typeof t.prependListener)return t.prependListener(n,i);t._events&&t._events[n]?Array.isArray(t._events[n])?t._events[n].unshift(i):t._events[n]=[i,t._events[n]]:t.on(n,i)}function ReadableState(t,n,i){b=b||p(403),t=t||{},"boolean"!=typeof i&&(i=n instanceof b),this.objectMode=!!t.objectMode,i&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=A(this,t,"readableHighWaterMark",i),this.buffer=new T,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(y||(y=p(704).s),this.decoder=new y(t.encoding),this.encoding=t.encoding)}function Readable(t){if(b=b||p(403),!(this instanceof Readable))return new Readable(t);var n=this instanceof b;this._readableState=new ReadableState(t,this,n),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),v.call(this)}function readableAddChunk(t,n,i,s,p){g("readableAddChunk",n);var b,y=t._readableState;
vendor: 9,252 bytes, line 15
15if(null===n)y.reading=!1,onEofChunk(t,y);else if(p||(b=chunkInvalid(y,n)),b)L(t,b);else if(y.objectMode||n&&n.length>0){if("string"==typeof n||y.objectMode||Object.getPrototypeOf(n)===w.prototype||(n=_uint8ArrayToBuffer(n)),s)y.endEmitted?L(t,new I):addChunk(t,y,n,!0);else if(y.ended)L(t,new P);else{if(y.destroyed)return!1;y.reading=!1,y.decoder&&!i?(n=y.decoder.write(n),y.objectMode||0!==n.length?addChunk(t,y,n,!1):maybeReadMore(t,y)):addChunk(t,y,n,!1)}}else s||(y.reading=!1,maybeReadMore(t,y));return!y.ended&&(y.length<y.highWaterMark||0===y.length)}function addChunk(t,n,i,s){n.flowing&&0===n.length&&!n.sync?(n.awaitDrain=0,t.emit("data",i)):(n.length+=n.objectMode?1:i.length,s?n.buffer.unshift(i):n.buffer.push(i),n.needReadable&&emitReadable(t)),maybeReadMore(t,n)}function chunkInvalid(t,n){var i;return _isUint8Array(n)||"string"==typeof n||void 0===n||t.objectMode||(i=new O("chunk",["string","Buffer","Uint8Array"],n)),i}function computeNewHighWaterMark(t){return t>=1073741824?t=1073741824:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}function howMuchToRead(t,n){return t<=0||0===n.length&&n.ended?0:n.objectMode?1:t!=t?n.flowing&&n.length?n.buffer.head.data.length:n.length:(t>n.highWaterMark&&(n.highWaterMark=computeNewHighWaterMark(t)),t<=n.length)?t:n.ended?n.length:(n.needReadable=!0,0)}function onEofChunk(t,n){if(g("onEofChunk"),!n.ended){if(n.decoder){var i=n.decoder.end();i&&i.length&&(n.buffer.push(i),n.length+=n.objectMode?1:i.length)}n.ended=!0,n.sync?emitReadable(t):(n.needReadable=!1,n.emittedReadable||(n.emittedReadable=!0,emitReadable_(t)))}}function emitReadable(t){var n=t._readableState;g("emitReadable",n.needReadable,n.emittedReadable),n.needReadable=!1,n.emittedReadable||(g("emitReadable",n.flowing),n.emittedReadable=!0,s.nextTick(emitReadable_,t))}function emitReadable_(t){var n=t._readableState;g("emitReadable_",n.destroyed,n.length,n.ended),!n.destroyed&&(n.length||n.ended)&&(t.emit("readable"),n.emittedReadable=!1),n.needReadable=!n.flowing&&!n.ended&&n.length<=n.highWaterMark,flow(t)}function maybeReadMore(t,n){n.readingMore||(n.readingMore=!0,s.nextTick(maybeReadMore_,t,n))}function maybeReadMore_(t,n){for(;!n.reading&&!n.ended&&(n.length<n.highWaterMark||n.flowing&&0===n.length);){var i=n.length;if(g("maybeReadMore read 0"),t.read(0),i===n.length)break}n.readingMore=!1}function pipeOnDrain(t){return function(){var n=t._readableState;g("pipeOnDrain",n.awaitDrain),n.awaitDrain&&n.awaitDrain--,0===n.awaitDrain&&a(t,"data")&&(n.flowing=!0,flow(t))}}function updateReadableListening(t){var n=t._readableState;n.readableListening=t.listenerCount("readable")>0,n.resumeScheduled&&!n.paused?n.flowing=!0:t.listenerCount("data")>0&&t.resume()}function nReadingNextTick(t){g("readable nexttick read 0"),t.read(0)}function resume(t,n){n.resumeScheduled||(n.resumeScheduled=!0,s.nextTick(resume_,t,n))}function resume_(t,n){g("resume",n.reading),n.reading||t.read(0),n.resumeScheduled=!1,t.emit("resume"),flow(t),n.flowing&&!n.reading&&t.read(0)}function flow(t){var n=t._readableState;for(g("flow",n.flowing);n.flowing&&null!==t.read(););}function fromList(t,n){var i;return 0===n.length?null:(n.objectMode?i=n.buffer.shift():!t||t>=n.length?(i=n.decoder?n.buffer.join(""):1===n.buffer.length?n.buffer.first():n.buffer.concat(n.length),n.buffer.clear()):i=n.buffer.consume(t,n.decoder),i)}function endReadable(t){var n=t._readableState;g("endReadable",n.endEmitted),n.endEmitted||(n.ended=!0,s.nextTick(endReadableNT,n,t))}function endReadableNT(t,n){if(g("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&0===t.length&&(t.endEmitted=!0,n.readable=!1,n.emit("end"),t.autoDestroy)){var i=n._writableState;(!i||i.autoDestroy&&i.finished)&&n.destroy()}}function indexOf(t,n){for(var i=0,s=t.length;i<s;i++)if(t[i]===n)return i;return -1}Object.defineProperty(Readable.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}}),Readable.prototype.destroy=x.destroy,Readable.prototype._undestroy=x.undestroy,Readable.prototype._destroy=function(t,n){n(t)},Readable.prototype.push=function(t,n){var i,s=this._readableState;return s.objectMode?i=!0:"string"==typeof t&&((n=n||s.defaultEncoding)!==s.encoding&&(t=w.from(t,n),n=""),i=!0),readableAddChunk(this,t,n,!1,i)},Readable.prototype.unshift=function(t){return readableAddChunk(this,t,null,!0,!1)},Readable.prototype.isPaused=function(){return!1===this._readableState.flowing},Readable.prototype.setEncoding=function(t){y||(y=p(704).s);var n=new y(t);this._readableState.decoder=n,this._readableState.encoding=this._readableState.decoder.encoding;for(var i=this._readableState.buffer.head,s="";null!==i;)s+=n.write(i.data),i=i.next;return this._readableState.buffer.clear(),""!==s&&this._readableState.buffer.push(s),this._readableState.length=s.length,this},Readable.prototype.read=function(t){g("read",t),t=parseInt(t,10);var n,i=this._readableState,s=t;if(0!==t&&(i.emittedReadable=!1),0===t&&i.needReadable&&((0!==i.highWaterMark?i.length>=i.highWaterMark:i.length>0)||i.ended))return g("read: emitReadable",i.length,i.ended),0===i.length&&i.ended?endReadable(this):emitReadable(this),null;if(0===(t=howMuchToRead(t,i))&&i.ended)return 0===i.length&&endReadable(this),null;var p=i.needReadable;return g("need readable",p),(0===i.length||i.length-t<i.highWaterMark)&&g("length less than watermark",p=!0),i.ended||i.reading?g("reading or ended",p=!1):p&&(g("do read"),i.reading=!0,i.sync=!0,0===i.length&&(i.needReadable=!0),this._read(i.highWaterMark),i.sync=!1,i.reading||(t=howMuchToRead(s,i))),null===(n=t>0?fromList(t,i):null)?(i.needReadable=i.length<=i.highWaterMark,t=0):(i.length-=t,i.awaitDrain=0),0===i.length&&(i.ended||(i.needReadable=!0),s!==t&&i.ended&&endReadable(this)),null!==n&&this.emit("data",n),n},Readable.prototype._read=function(t){L(this,new C("_read()"))},Readable.prototype.pipe=function(t,n){var i=this,p=this._readableState;switch(p.pipesCount){case 0:p.pipes=t;break;case 1:p.pipes=[p.pipes,t];break;default:p.pipes.push(t)}p.pipesCount+=1,g("pipe count=%d opts=%j",p.pipesCount,n);var b=n&&!1===n.end||t===s.stdout||t===s.stderr?unpipe:onend;function onunpipe(t,n){g("onunpipe"),t===i&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,cleanup())}function onend(){g("onend"),t.end()}p.endEmitted?s.nextTick(b):i.once("end",b),t.on("unpipe",onunpipe);var y=pipeOnDrain(i);t.on("drain",y);var m=!1;function cleanup(){g("cleanup"),t.removeListener("close",onclose),t.removeListener("finish",onfinish),t.removeListener("drain",y),t.removeListener("error",onerror),t.removeListener("unpipe",onunpipe),i.removeListener("end",onend),i.removeListener("end",unpipe),i.removeListener("data",ondata),m=!0,p.awaitDrain&&(!t._writableState||t._writableState.needDrain)&&y()}function ondata(n){g("ondata");var s=t.write(n);g("dest.write",s),!1===s&&((1===p.pipesCount&&p.pipes===t||p.pipesCount>1&&-1!==indexOf(p.pipes,t))&&!m&&(g("false write response, pause",p.awaitDrain),p.awaitDrain++),i.pause())}function onerror(n){g("onerror",n),unpipe(),t.removeListener("error",onerror),0===a(t,"error")&&L(t,n)}function onclose(){t.removeListener("finish",onfinish),unpipe()}function onfinish(){g("onfinish"),t.removeListener("close",onclose),unpipe()}function unpipe(){g("unpipe"),i.unpipe(t)}return i.on("data",ondata),prependListener(t,"error",onerror),t.once("close",onclose),t.once("finish",onfinish),t.emit("pipe",i),p.flowing||(g("pipe resume"),i.resume()),t},Readable.prototype.unpipe=function(t){var n=this._readableState,i={hasUnpiped:!1};if(0===n.pipesCount)return this;if(1===n.pipesCount)return t&&t!==n.pipes||(t||(t=n.pipes),n.pipes=null,n.pipesCount=0,n.flowing=!1,t&&t.emit("unpipe",this,i)),this;if(!t){var s=n.pipes,p=n.pipesCount;n.pipes=null,n.pipesCount=0,n.flowing=!1;for(var b=0;b<p;b++)s[b].emit("unpipe",this,{hasUnpiped:!1});return this}var g=indexOf(n.pipes,t);return -1===g||(n.pipes.splice(g,1),n.pipesCount-=1,1===n.pipesCount&&(n.pipes=n.pipes[0]),t.emit("unpipe",this,i)),this},Readable.prototype.on=function(t,n){var i=v.prototype.on.call(this,t,n),p=this._readableState;return"data"===t?(p.readableListening=this.listenerCount("readable")>0,!1!==p.flowing&&this.resume()):"readable"!==t||p.endEmitted||p.readableListening||(p.readableListening=p.needReadable=!0,p.flowing=!1,p.emittedReadable=!1,g("on readable",p.length,p.reading),p.length?emitReadable(this):p.reading||s.nextTick(nReadingNextTick,this)),i},Readable.prototype.addListener=Readable.prototype.on,Readable.prototype.removeListener=function(t,n){var i=v.prototype.removeListener.call(this,t,n);return"readable"===t&&s.nextTick(updateReadableListening,this),i},Readable.prototype.removeAllListeners=function(t){var n=v.prototype.removeAllListeners.apply(this,arguments);return("readable"===t||void 0===t)&&s.nextTick(updateReadableListening,this),n},Readable.prototype.resume=function(){var t=this._readableState;return t.flowing||(g("resume"),t.flowing=!t.readableListening,resume(this,t)),t.paused=!1,this},Readable.prototype.pause=function(){return g("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(g("pause"),this._readableState.flowing=!1,this.emit
vendor: 4,097 bytes, line 15
15("pause")),this._readableState.paused=!0,this},Readable.prototype.wrap=function(t){var n=this,i=this._readableState,s=!1;for(var p in t.on("end",function(){if(g("wrapped end"),i.decoder&&!i.ended){var t=i.decoder.end();t&&t.length&&n.push(t)}n.push(null)}),t.on("data",function(p){g("wrapped data"),i.decoder&&(p=i.decoder.write(p)),(!i.objectMode||null!=p)&&(i.objectMode||p&&p.length)&&(n.push(p)||(s=!0,t.pause()))}),t)void 0===this[p]&&"function"==typeof t[p]&&(this[p]=function(n){return function(){return t[n].apply(t,arguments)}}(p));for(var b=0;b<N.length;b++)t.on(N[b],this.emit.bind(this,N[b]));return this._read=function(n){g("wrapped _read",n),s&&(s=!1,t.resume())},this},"function"==typeof Symbol&&(Readable.prototype[Symbol.asyncIterator]=function(){return void 0===m&&(m=p(871)),m(this)}),Object.defineProperty(Readable.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(Readable.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(Readable.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(t){this._readableState&&(this._readableState.flowing=t)}}),Readable._fromList=fromList,Object.defineProperty(Readable.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(Readable.from=function(t,n){return void 0===_&&(_=p(727)),_(Readable,t,n)})},170:function(t,n,i){"use strict";t.exports=Transform;var s=i(646).q,p=s.ERR_METHOD_NOT_IMPLEMENTED,b=s.ERR_MULTIPLE_CALLBACK,g=s.ERR_TRANSFORM_ALREADY_TRANSFORMING,y=s.ERR_TRANSFORM_WITH_LENGTH_0,m=i(403);function afterTransform(t,n){var i=this._transformState;i.transforming=!1;var s=i.writecb;if(null===s)return this.emit("error",new b);i.writechunk=null,i.writecb=null,null!=n&&this.push(n),s(t);var p=this._readableState;p.reading=!1,(p.needReadable||p.length<p.highWaterMark)&&this._read(p.highWaterMark)}function Transform(t){if(!(this instanceof Transform))return new Transform(t);m.call(this,t),this._transformState={afterTransform:afterTransform.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&("function"==typeof t.transform&&(this._transform=t.transform),"function"==typeof t.flush&&(this._flush=t.flush)),this.on("prefinish",prefinish)}function prefinish(){var t=this;"function"!=typeof this._flush||this._readableState.destroyed?done(this,null,null):this._flush(function(n,i){done(t,n,i)})}function done(t,n,i){if(n)return t.emit("error",n);if(null!=i&&t.push(i),t._writableState.length)throw new y;if(t._transformState.transforming)throw new g;return t.push(null)}i(782)(Transform,m),Transform.prototype.push=function(t,n){return this._transformState.needTransform=!1,m.prototype.push.call(this,t,n)},Transform.prototype._transform=function(t,n,i){i(new p("_transform()"))},Transform.prototype._write=function(t,n,i){var s=this._transformState;if(s.writecb=i,s.writechunk=t,s.writeencoding=n,!s.transforming){var p=this._readableState;(s.needTransform||p.needReadable||p.length<p.highWaterMark)&&this._read(p.highWaterMark)}},Transform.prototype._read=function(t){var n=this._transformState;null===n.writechunk||n.transforming?n.needTransform=!0:(n.transforming=!0,this._transform(n.writechunk,n.writeencoding,n.afterTransform))},Transform.prototype._destroy=function(t,n){m.prototype._destroy.call(this,t,function(t){n(t)})}},337:function(t,n,p){"use strict";function CorkedRequest(t){var n=this;this.next=null,this.entry=null,this.finish=function(){onCorkedFinish(n,t)}}t.exports=Writable,Writable.WritableState=WritableState;var b,g,y={deprecate:p(769)},m=p(678),_=p(300).Buffer,v=i.g.Uint8Array||function(){};function _uint8ArrayToBuffer(t){return _.from(t)}function _isUint8Array(t){return _.isBuffer(t)||t instanceof v}var w=p(25),S=p(776).getHighWaterMark,R=p(646).q,T=R.ERR_INVALID_ARG_TYPE,x=R.ERR_METHOD_NOT_IMPLEMENT
vendor: 5,822 bytes, line 15
15ED,A=R.ERR_MULTIPLE_CALLBACK,k=R.ERR_STREAM_CANNOT_PIPE,O=R.ERR_STREAM_DESTROYED,P=R.ERR_STREAM_NULL_VALUES,C=R.ERR_STREAM_WRITE_AFTER_END,I=R.ERR_UNKNOWN_ENCODING,L=w.errorOrDestroy;function nop(){}function WritableState(t,n,i){b=b||p(403),t=t||{},"boolean"!=typeof i&&(i=n instanceof b),this.objectMode=!!t.objectMode,i&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=S(this,t,"writableHighWaterMark",i),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var s=!1===t.decodeStrings;this.decodeStrings=!s,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){onwrite(n,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new CorkedRequest(this)}function Writable(t){var n=this instanceof(b=b||p(403));if(!n&&!g.call(Writable,this))return new Writable(t);this._writableState=new WritableState(t,this,n),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),m.call(this)}function writeAfterEnd(t,n){var i=new C;L(t,i),s.nextTick(n,i)}function validChunk(t,n,i,p){var b;return null===i?b=new P:"string"==typeof i||n.objectMode||(b=new T("chunk",["string","Buffer"],i)),!b||(L(t,b),s.nextTick(p,b),!1)}function decodeChunk(t,n,i){return t.objectMode||!1===t.decodeStrings||"string"!=typeof n||(n=_.from(n,i)),n}function writeOrBuffer(t,n,i,s,p,b){if(!i){var g=decodeChunk(n,s,p);s!==g&&(i=!0,p="buffer",s=g)}var y=n.objectMode?1:s.length;n.length+=y;var m=n.length<n.highWaterMark;if(m||(n.needDrain=!0),n.writing||n.corked){var _=n.lastBufferedRequest;n.lastBufferedRequest={chunk:s,encoding:p,isBuf:i,callback:b,next:null},_?_.next=n.lastBufferedRequest:n.bufferedRequest=n.lastBufferedRequest,n.bufferedRequestCount+=1}else doWrite(t,n,!1,y,s,p,b);return m}function doWrite(t,n,i,s,p,b,g){n.writelen=s,n.writecb=g,n.writing=!0,n.sync=!0,n.destroyed?n.onwrite(new O("write")):i?t._writev(p,n.onwrite):t._write(p,b,n.onwrite),n.sync=!1}function onwriteError(t,n,i,p,b){--n.pendingcb,i?(s.nextTick(b,p),s.nextTick(finishMaybe,t,n),t._writableState.errorEmitted=!0,L(t,p)):(b(p),t._writableState.errorEmitted=!0,L(t,p),finishMaybe(t,n))}function onwriteStateUpdate(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}function onwrite(t,n){var i=t._writableState,p=i.sync,b=i.writecb;if("function"!=typeof b)throw new A;if(onwriteStateUpdate(i),n)onwriteError(t,i,p,n,b);else{var g=needFinish(i)||t.destroyed;g||i.corked||i.bufferProcessing||!i.bufferedRequest||clearBuffer(t,i),p?s.nextTick(afterWrite,t,i,g,b):afterWrite(t,i,g,b)}}function afterWrite(t,n,i,s){i||onwriteDrain(t,n),n.pendingcb--,s(),finishMaybe(t,n)}function onwriteDrain(t,n){0===n.length&&n.needDrain&&(n.needDrain=!1,t.emit("drain"))}function clearBuffer(t,n){n.bufferProcessing=!0;var i=n.bufferedRequest;if(t._writev&&i&&i.next){var s=Array(n.bufferedRequestCount),p=n.corkedRequestsFree;p.entry=i;for(var b=0,g=!0;i;)s[b]=i,i.isBuf||(g=!1),i=i.next,b+=1;s.allBuffers=g,doWrite(t,n,!0,n.length,s,"",p.finish),n.pendingcb++,n.lastBufferedRequest=null,p.next?(n.corkedRequestsFree=p.next,p.next=null):n.corkedRequestsFree=new CorkedRequest(n),n.bufferedRequestCount=0}else{for(;i;){var y=i.chunk,m=i.encoding,_=i.callback,v=n.objectMode?1:y.length;if(doWrite(t,n,!1,v,y,m,_),i=i.next,n.bufferedRequestCount--,n.writing)break}null===i&&(n.lastBufferedRequest=null)}n.bufferedRequest=i,n.bufferProcessing=!1}function needFinish(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function callFinal(t,n){t._final(function(i){n.pendingcb--,i&&L(t,i),n.prefinished=!0,t.emit("prefinish"),finishMaybe(t,n)})}function prefinish(t,n){n.prefinished||n.finalCalled||("function"!=typeof t._final||n.destroyed?(n.prefinished=!0,t.emit("prefinish")):(n.pendingcb++,n.finalCalled=!0,s.nextTick(callFinal,t,n)))}function finishMaybe(t,n){var i=needFinish(n);if(i&&(prefinish(t,n),0===n.pendingcb&&(n.finished=!0,t.emit("finish"),n.autoDestroy))){var s=t._readableState;(!s||s.autoDestroy&&s.endEmitted)&&t.destroy()}return i}function endWritable(t,n,i){n.ending=!0,finishMaybe(t,n),i&&(n.finished?s.nextTick(i):t.once("finish",i)),n.ended=!0,t.writable=!1}function onCorkedFinish(t,n,i){var s=t.entry;for(t.entry=null;s;){var p=s.callback;n.pendingcb--,p(i),s=s.next}n.corkedRequestsFree.next=t}p(782)(Writable,m),WritableState.prototype.getBuffer=function(){for(var t=this.bufferedRequest,n=[];t;)n.push(t),t=t.next;return n},function(){try{Object.defineProperty(WritableState.prototype,"buffer",{get:y.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(g=Function.prototype[Symbol.hasInstance],Object.defineProperty(Writable,Symbol.hasInstance,{value:function(t){return!!g.call(this,t)||this===Writable&&t&&t._writableState instanceof WritableState}})):g=function(t){return t instanceof this},Writable.prototype.pipe=function(){L(this,new k)},Writable.prototype.write=function(t,n,i){var s=this._writableState,p=!1,b=!s.objectMode&&_isUint8Array(t);return b&&!_.isBuffer(t)&&(t=_uint8ArrayToBuffer(t)),"function"==typeof n&&(i=n,n=null),b?n="buffer":n||(n=s.defaultEncoding),"function"!=typeof i&&(i=nop),s.ending?writeAfterEnd(this,i):(b||val
15idChunk(this,s,t,i))&&(s.pendingcb++,p=writeOrBuffer(this,s,b,t,n,i)),p},Writable.prototype.cork=function(){this._writableState.corked++},Writable.prototype.uncork=function(){var t=this._writableState;!t.corked||(t.corked--,t.writing||t.corked||t.bufferProcessing||!t.bufferedRequest||clearBuffer(this,t))},Writable.prototype.setDefaultEncoding=function(t){if("string"==typeof t&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new I(t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(Writable.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(Writable.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Writable.prototype._write=function(t,n,i){i(new x("_write()"))},Writable.prototype._writev=null,Writable.prototype.end=function(t,n,i){var s=this._writableState;return"function"==typeof t?(i=t,t=null,n=null):"function"==typeof n&&(i=n,n=null),null!=t&&this.write(t,n),s.corked&&(s.corked=1,this.uncork()),s.ending||endWritable(this,s,i),this},Object.defineProperty(Writable.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(Writable.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),Writable.prototype.destroy=w.destroy,Writable.prototype._undestroy=w.undestroy,Writable.prototype._destroy=function(t,n){n(t)}},871:function(t,n,i){"use strict";function _defineProperty(t,n,i){return n in t?Object.defineProperty(t,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[n]=i,t}var p,b=i(698),g=Symbol("lastResolve"),y=Symbol("lastReject"),m=Symbol("error"),_=Symbol("ended"),v=Symbol("lastPromise"),w=Symbol("handlePromise"),S=Symbol("stream");function createIterResult(t,n){return{value:t,done:n}}function readAndResolve(t){var n=t[g];if(null!==n){var i=t[S].read();null!==i&&(t[v]=null,t[g]=null,t[y]=null,n(createIterResult(i,!1)))}}function onReadable(t){s.nextTick(readAndResolve,t)}function wrapForNext(t,n){return function(i,s){t.then(function(){if(n[_]){i(createIterResult(void 0,!0));return}n[w](i,s)},s)}}var R=Object.getPrototypeOf(function(){}),T=Object.setPrototypeOf((_defineProperty(p={get stream(){return this[S]},next:function(){var t,n=this,i=this[m];if(null!==i)return Promise.reject(i);if(this[_])return Promise.resolve(createIterResult(void 0,!0));if(this[S].destroyed)return new Promise(function(t,i){s.nextTick(function(){n[m]?i(n[m]):t(createIterResult(void 0,!0))})});var p=this[v];if(p)t=new Promise(wrapForNext(p,this));else{var b=this[S].read();if(null!==b)return Promise.resolve(createIterResult(b,!1));t=new Promise(this[w])}return this[v]=t,t}},Symbol.asyncIterator,function(){return this}),_defineProperty(p,"return",function(){var t=this;return new Promise(function(n,i){t[S].destroy(null,function(t){if(t){i(t);return}n(createIterResult(void 0,!0))})})}),p),R);t.exports=function(t){var n,i=Object.create(T,(_defineProperty(n={},S,{value:t,writable:!0}),_defineProperty(n,g,{value:null,writable:!0}),_defineProperty(n,y,{value:null,writable:!0}),_defineProperty(n,m,{value:null,writable:!0}),_defineProperty(n,_,{value:t._readableState.endEmitted,writable:!0}),_defineProperty(n,w,{value:function(t,n){var s=i[S].read();s?(i[v]=null,i[g]=null,i[y]=null,t(createIterResult(s,!1))):(i[g]=t,i[y]=n)},writable:!0}),n));return i[v]=null,b(t,function(t){if(t&&"ERR_STREAM_PREMATURE_CLOSE"!==t.code){var n=i[y];null!==n&&(i[v]=null,i[g]=null,i[y]=null,n(t)),i[m]=t;return}var s=i[g];null!==s&&(i[v]=null,i[g]=null,i[y]=null,s(createIterResult(void 0,!0))),i[_]=!0}),t.on("readable",onReadable.bind(null,i)),i}},379:function(t,n,i){"use strict";function ownKeys(t,n){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);n&&(s=s.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),i.push.apply(i,s)}return i}function _objectSpread(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};
15n%2?ownKeys(Object(i),!0).forEach(function(n){_defineProperty(t,n,i[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):ownKeys(Object(i)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(i,n))})}return t}function _defineProperty(t,n,i){return n in t?Object.defineProperty(t,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[n]=i,t}function _classCallCheck(t,n){if(!(t instanceof n))throw TypeError("Cannot call a class as a function")}function _defineProperties(t,n){for(var i=0;i<n.length;i++){var s=n[i];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(t,s.key,s)}}function _createClass(t,n,i){return n&&_defineProperties(t.prototype,n),i&&_defineProperties(t,i),t}var s=i(300).Buffer,p=i(837).inspect,b=p&&p.custom||"inspect";function copyBuffer(t,n,i){s.prototype.copy.call(t,n,i)}t.exports=function(){function BufferList(){_classCallCheck(this,BufferList),this.head=null,this.tail=null,this.length=0}return _createClass(BufferList,[{key:"push",value:function(t){var n={data:t,next:null};this.length>0?this.tail.next=n:this.head=n,this.tail=n,++this.length}},{key:"unshift",value:function(t){var n={data:t,next:this.head};0===this.length&&(this.tail=n),this.head=n,++this.length}},{key:"shift",value:function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(t){if(0===this.length)return"";for(var n=this.head,i=""+n.data;n=n.next;)i+=t+n.data;return i}},{key:"concat",value:function(t){if(0===this.length)return s.alloc(0);for(var n=s.allocUnsafe(t>>>0),i=this.head,p=0;i;)copyBuffer(i.data,n,p),p+=i.data.length,i=i.next;return n}},{key:"consume",value:function(t,n){var i;return t<this.head.data.length?(i=this.head.data.slice(0,t),this.head.data=this.head.data.slice(t)):i=t===this.head.data.length?this.shift():n?this._getString(t):this._getBuffer(t),i}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(t){var n=this.head,i=1,s=n.data;for(t-=s.length;n=n.next;){var p=n.data,b=t>p.length?p.length:t;if(b===p.length?s+=p:s+=p.slice(0,t),0==(t-=b)){b===p.length?(++i,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=p.slice(b));break}++i}return this.length-=i,s}},{key:"_getBuffer",value:function(t){var n=s.allocUnsafe(t),i=this.head,p=1;for(i.data.copy(n),t-=i.data.length;i=i.next;){var b=i.data,g=t>b.length?b.length:t;if(b.copy(n,n.length-t,0,g),0==(t-=g)){g===b.length?(++p,i.next?this.head=i.next:this.head=this.tail=null):(this.head=i,i.data=b.slice(g));break}++p}return this.length-=p,n}},{key:b,value:function(t,n){return p(this,_objectSpread({},n,{depth:0,customInspect:!1}))}}]),BufferList}()},25:function(t){"use strict";function destroy(t,n){var i=this,p=this._readableState&&this._readableState.destroyed,b=this._writableState&&this._writableState.destroyed;return p||b?n?n(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,s.nextTick(emitErrorNT,this,t)):s.nextTick(emitErrorNT,this,t)):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(t){!n&&t?i._writableState?i._writableState.errorEmitted?s.nextTick(emitCloseNT,i):(i._writableState.errorEmitted=!0,s.nextTick(emitErrorAndCloseNT,i,t)):s.nextTick(emitErrorAndCloseNT,i,t):n?(s.nextTick(emitCloseNT,i),n(t)):s.nextTick(emitCloseNT,i)})),this}function emitErrorAndCloseNT(t,n){emitErrorNT(t,n),emitCloseNT(t)}function emitCloseNT(t){(!t._writableState||t._writableState.emitClose)&&(!t._readableState||t._readableState.emitClose)&&t.emit("close")}function undestroy(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function emitErrorNT(t,n){t.emit("error",n)}function errorOrDestroy(t,n){var i=t._readableState,s=t._writableState;i&&i.autoDestroy||s&&s.autoDestroy?t.destroy(n):t.emit("error",n)}
15t.exports={destroy:destroy,undestroy:undestroy,errorOrDestroy:errorOrDestroy}},698:function(t,n,i){"use strict";var s=i(646).q.ERR_STREAM_PREMATURE_CLOSE;function once(t){var n=!1;return function(){if(!n){n=!0;for(var i=arguments.length,s=Array(i),p=0;p<i;p++)s[p]=arguments[p];t.apply(this,s)}}}function noop(){}function isRequest(t){return t.setHeader&&"function"==typeof t.abort}function eos(t,n,i){if("function"==typeof n)return eos(t,null,n);n||(n={}),i=once(i||noop);var p=n.readable||!1!==n.readable&&t.readable,b=n.writable||!1!==n.writable&&t.writable,o=function(){t.writable||f()},g=t._writableState&&t._writableState.finished,f=function(){b=!1,g=!0,p||i.call(t)},y=t._readableState&&t._readableState.endEmitted,u=function(){p=!1,y=!0,b||i.call(t)},d=function(n){i.call(t,n)},c=function(){var n;return p&&!y?(t._readableState&&t._readableState.ended||(n=new s),i.call(t,n)):b&&!g?(t._writableState&&t._writableState.ended||(n=new s),i.call(t,n)):void 0},h=function(){t.req.on("finish",f)};return isRequest(t)?(t.on("complete",f),t.on("abort",c),t.req?h():t.on("request",h)):b&&!t._writableState&&(t.on("end",o),t.on("close",o)),t.on("end",u),t.on("finish",f),!1!==n.error&&t.on("error",d),t.on("close",c),function(){t.removeListener("complete",f),t.removeListener("abort",c),t.removeListener("request",h),t.req&&t.req.removeListener("finish",f),t.removeListener("end",o),t.removeListener("close",o),t.removeListener("finish",f),t.removeListener("end",u),t.removeListener("error",d),t.removeListener("close",c)}}t.exports=eos},727:function(t,n,i){"use strict";function asyncGeneratorStep(t,n,i,s,p,b,g){try{var y=t[b](g),m=y.value}catch(t){i(t);return}y.done?n(m):Promise.resolve(m).then(s,p)}function _asyncToGenerator(t){return function(){var n=this,i=arguments;return new Promise(function(s,p){var b=t.apply(n,i);function _next(t){asyncGeneratorStep(b,s,p,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(b,s,p,_next,_throw,"throw",t)}_next(void 0)})}}function ownKeys(t,n){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);n&&(s=s.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),i.push.apply(i,s)}return i}function _objectSpread(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?ownKeys(Object(i),!0).forEach(function(n){_defineProperty(t,n,i[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):ownKeys(Object(i)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(i,n))})}return t}function _defineProperty(t,n,i){return n in t?Object.defineProperty(t,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[n]=i,t}var s=i(646).q.ERR_INVALID_ARG_TYPE;function from(t,n,i){if(n&&"function"==typeof n.next)p=n;else if(n&&n[Symbol.asyncIterator])p=n[Symbol.asyncIterator]();else if(n&&n[Symbol.iterator])p=n[Symbol.iterator]();else throw new s("iterable",["Iterable"],n);var p,b=new t(_objectSpread({objectMode:!0},i)),g=!1;function next(){return _next2.apply(this,arguments)}function _next2(){return(_next2=_asyncToGenerator(function*(){try{var t=yield p.next(),n=t.value;t.done?b.push(null):b.push((yield n))?next():g=!1}catch(t){b.destroy(t)}})).apply(this,arguments)}return b._read=function(){g||(g=!0,next())},b}t.exports=from},442:function(t,n,i){"use strict";function once(t){var n=!1;return function(){n||(n=!0,t.apply(void 0,arguments))}}var s,p=i(646).q,b=p.ERR_MISSING_ARGS,g=p.ERR_STREAM_DESTROYED;function noop(t){if(t)throw t}function isRequest(t){return t.setHeader&&"function"==typeof t.abort}function destroyer(t,n,p,b){b=once(b);var y=!1;t.on("close",function(){y=!0}),void 0===s&&(s=i(698)),s(t,{readable:n,writable:p},function(t){if(t)return b(t);y=!0,b()});var m=!1;return function(n){if(!y&&!m){if(m=!0,isRequest(t))return t.abort();if("function"==typeof t.destroy)return t.destroy();b(n||new g("pipe"))}}}function call(t){t()}function pipe(t,n){return t.pipe(n)}function popCallback(t){return t.length&&"function"==typeof t[t.length-1]?t.pop():noop}function pipeline(){for(var t,n=arguments.length,i=Array(n),s=0;s<n;s++)i[s]=arguments[s];var p=popCallback(i);if(Array.isArray(i[0])&&(i=i[0]),i.length<2)throw new b("streams");var g=i.map(function(n,s){var b=s<i.length-1;return destroyer(n,b,s>0,function(n){t||(t=n),n&&g.forEach(call),b||(g.forEach(call),p(t))})});return i.reduce(pipe)}t.exports=pipeline},776:function(t,n,i){"use strict";
15var s=i(646).q.ERR_INVALID_OPT_VALUE;function highWaterMarkFrom(t,n,i){return null!=t.highWaterMark?t.highWaterMark:n?t[i]:null}function getHighWaterMark(t,n,i,p){var b=highWaterMarkFrom(n,p,i);if(null!=b){if(!(isFinite(b)&&Math.floor(b)===b)||b<0)throw new s(p?i:"highWaterMark",b);return Math.floor(b)}return t.objectMode?16:16384}t.exports={getHighWaterMark:getHighWaterMark}},678:function(t,n,i){t.exports=i(781)},55:function(t,n,i){var s=i(300),p=s.Buffer;function copyProps(t,n){for(var i in t)n[i]=t[i]}function SafeBuffer(t,n,i){return p(t,n,i)}p.from&&p.alloc&&p.allocUnsafe&&p.allocUnsafeSlow?t.exports=s:(copyProps(s,n),n.Buffer=SafeBuffer),SafeBuffer.prototype=Object.create(p.prototype),copyProps(p,SafeBuffer),SafeBuffer.from=function(t,n,i){if("number"==typeof t)throw TypeError("Argument must not be a number");return p(t,n,i)},SafeBuffer.alloc=function(t,n,i){if("number"!=typeof t)throw TypeError("Argument must be a number");var s=p(t);return void 0!==n?"string"==typeof i?s.fill(n,i):s.fill(n):s.fill(0),s},SafeBuffer.allocUnsafe=function(t){if("number"!=typeof t)throw TypeError("Argument must be a number");return p(t)},SafeBuffer.allocUnsafeSlow=function(t){if("number"!=typeof t)throw TypeError("Argument must be a number");return s.SlowBuffer(t)}},173:function(t,n,i){t.exports=Stream;var s=i(361).EventEmitter;function Stream(){s.call(this)}i(782)(Stream,s),Stream.Readable=i(709),Stream.Writable=i(337),Stream.Duplex=i(403),Stream.Transform=i(170),Stream.PassThrough=i(889),Stream.finished=i(698),Stream.pipeline=i(442),Stream.Stream=Stream,Stream.prototype.pipe=function(t,n){var i=this;function ondata(n){t.writable&&!1===t.write(n)&&i.pause&&i.pause()}function ondrain(){i.readable&&i.resume&&i.resume()}i.on("data",ondata),t.on("drain",ondrain),t._isStdio||n&&!1===n.end||(i.on("end",onend),i.on("close",onclose));var p=!1;function onend(){p||(p=!0,t.end())}function onclose(){p||(p=!0,"function"==typeof t.destroy&&t.destroy())}function onerror(t){if(cleanup(),0===s.listenerCount(this,"error"))throw t}function cleanup(){i.removeListener("data",ondata),t.removeListener("drain",ondrain),i.removeListener("end",onend),i.removeListener("close",onclose),i.removeListener("error",onerror),t.removeListener("error",onerror),i.removeListener("end",cleanup),i.removeListener("close",cleanup),t.removeListener("close",cleanup)}return i.on("error",onerror),t.on("error",onerror),i.on("end",cleanup),i.on("close",cleanup),t.on("close",cleanup),t.emit("pipe",i),t}},704:function(t,n,i){"use strict";var s=i(55).Buffer,p=s.isEncoding||function(t){switch((t=""+t)&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function _normalizeEncoding(t){var n;if(!t)return"utf8";for(;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(n)return;t=(""+t).toLowerCase(),n=!0}}function normalizeEncoding(t){var n=_normalizeEncoding(t);if("string"!=typeof n&&(s.isEncoding===p||!p(t)))throw Error("Unknown encoding: "+t);return n||t}function StringDecoder(t){var n;switch(this.encoding=normalizeEncoding(t),this.encoding){case"utf16le":this.text=utf16Text,this.end=utf16End,n=4;break;case"utf8":this.fillLast=utf8FillLast,n=4;break;case"base64":this.text=base64Text,this.end=base64End,n=3;break;default:this.write=simpleWrite,this.end=simpleEnd;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=s.allocUnsafe(n)}function utf8CheckByte(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function utf8CheckIncomplete(t,n,i){var s=n.length-1;if(s<i)return 0;var p=utf8CheckByte(n[s]);return p>=0?(p>0&&(t.lastNeed=p-1),p):--s<i||-2===p?0:(p=utf8CheckByte(n[s]))>=0?(p>0&&(t.lastNeed=p-2),p):--s<i||-2===p?0:(p=utf8CheckByte(n[s]))>=0?(p>0&&(2===p?p=0:t.lastNeed=p-3),p):0}function utf8CheckExtraBytes(t,n,i){if((192&n[0])!=128)return t.lastNeed=0,"�";if(t.lastNeed>1&&n.length>1){if((192&n[1])!=128)return t.lastNeed=1,"�";if(t.lastNeed>2&&n.length>2&&(192&n[2])!=128)return t.lastNeed=2,"�"}}function utf8FillLast(t){var n=this.lastTotal-this.lastNeed,i=utf8CheckExtraBytes(this,t,n);return void 0!==i?i:this.lastNeed<=t.length?(t.copy(this.lastChar,n,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):void(t.copy(this.lastChar,n,0,t.length),this.lastNeed-=t.length)}function utf8Text(t,n){var i=utf8CheckIncomplete(this,t,n);if(!this.lastNeed)return t.toString("utf8",n);this.lastTotal=i;var s=t.length-(i-this.lastNeed);return t.copy(this.lastChar,0,s),t.toString("utf8",n,s)}function utf8End(t){var n=t&&t.length?this.write(t):"";return this.lastNeed?n+"�":n}function utf16Text(t,n){if((t.length-n)%2==0){var i=t.toString("utf16le",n);if(i){var s=i.charCodeAt(i.length-1);if(s>=55296&&s<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],i.slice(0,-1)}return i}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",n,t.length-1)}function utf16End(t){var n=t&&t.length?this.write(t):"";if(this.lastNeed){var i=this.lastTotal-this.lastNeed;return n+this.lastChar.toString("utf16le",0,i)}return n}function base64Text(t,n){var i=(t.length-n)%3;return 0===i?t.toString("base64",n):(this.lastNeed=3-i,this.lastTotal=3,1===i?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",n,t.length-i))}function base64End(t){var n=t&&t.length?this.write(t):"";return this.lastNeed?n+this.lastChar.toString("base64",0,3-this.lastNeed):n}function simpleWrite(t){return t.toString(this.encoding)}function simpleEnd(t){return t&&t.length?this.write(t):""}n.s=StringDecoder,StringDecoder.prototype.write=function(t){var n,i;if(0===t.length)return"";if(this.lastNeed){if(void 0===(n=this.fillLast(t)))return"";i=this.lastNeed,this.lastNeed=0}else i=0;return i<t.length?n?n+this.text(t,i):this.text(t,i):n||""},StringDecoder.prototype.end=utf8End,StringDecoder.prototype.text=utf8Text,StringDecoder.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length}},769:function(t){function deprecate(t,n){if(config("noDeprecation"))return t;var i=!1;return function(){if(!i){if(config("throwDeprecation"))throw Error(n);config("traceDeprecation")?console.trace(n):console.warn(n),i=!0}return t.apply(this,arguments)}}function config(t){try{if(!i.g.localStorage)return!1}catch(t){return!1}var n=i.g.localStorage[t];return null!=n&&"true"===String(n).toLowerCase()}t.exports=deprecate},300:function(t){"use strict";
15t.exports=i(48764)},361:function(t){"use strict";t.exports=i(17187)},781:function(t){"use strict";t.exports=i(17187).EventEmitter},837:function(t){"use strict";t.exports=i(89539)}},p={};function __nccwpck_require__(t){var i=p[t];if(void 0!==i)return i.exports;var s=p[t]={exports:{}},b=!0;try{n[t](s,s.exports,__nccwpck_require__),b=!1}finally{b&&delete p[t]}return s.exports}__nccwpck_require__.ab="//";var b=__nccwpck_require__(173);t.exports=b}()},22321:function(t,n,i){var s=i(34155),p=i(48764).Buffer;!function(){var n={523:function(t){t.exports={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}},782:function(t){"function"==typeof Object.create?t.exports=function(t,n){n&&(t.super_=n,t.prototype=Object.create(n.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(t,n){if(n){t.super_=n;var TempCtor=function(){};TempCtor.prototype=n.prototype,t.prototype=new TempCtor,t.prototype.constructor=t}}},646:function(t){"use strict";let n={};function createErrorType(t,i,s){function getMessage(t,n,s){return"string"==typeof i?i:i(t,n,s)}s||(s=Error);let NodeError=class NodeError extends s{constructor(t,n,i){super(getMessage(t,n,i))}};NodeError.prototype.name=s.name,NodeError.prototype.code=t,n[t]=NodeError}function oneOf(t,n){if(!Array.isArray(t))return`of ${n} ${String(t)}`;{let i=t.length;return(t=t.map(t=>String(t)),i>2)?`one of ${n} ${t.slice(0,i-1).join(", ")}, or `+t[i-1]:2===i?`one of ${n} ${t[0]} or ${t[1]}`:`of ${n} ${t[0]}`}}function startsWith(t,n,i){return t.substr(!i||i<0?0:+i,n.length)===n}function endsWith(t,n,i){return(void 0===i||i>t.length)&&(i=t.length),t.substring(i-n.length,i)===n}function includes(t,n,i){return"number"!=typeof i&&(i=0),!(i+n.length>t.length)&&-1!==t.indexOf(n,i)}createErrorType("ERR_INVALID_OPT_VALUE",function(t,n){return'The value "'+n+'" is invalid for option "'+t+'"'},TypeError),createErrorType("ERR_INVALID_ARG_TYPE",function(t,n,i){let s,p;if("string"==typeof n&&startsWith(n,"not ")?(s="must not be",n=n.replace(/^not /,"")):s="must be",endsWith(t," argument"))p=`The ${t} ${s} ${oneOf(n,"type")}`;else{let i=includes(t,".")?"property":"argument";p=`The "${t}" ${i} ${s} ${oneOf(n,"type")}`}return p+`. Received type ${typeof i}`},TypeError),createErrorType("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),createErrorType("ERR_METHOD_NOT_IMPLEMENTED",function(t){return"The "+t+" method is not implemented"}),createErrorType("ERR_STREAM_PREMATURE_CLOSE","Premature close"),createErrorType("ERR_STREAM_DESTROYED",function(t){return"Cannot call "+t+" after a stream was destroyed"}),createErrorType("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),createErrorType("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),createErrorType("ERR_STREAM_WRITE_AFTER_END","write after end"),createErrorType("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),createErrorType("ERR_UNKNOWN_ENCODING",function(t){return"Unknown encoding: "+t},TypeError),createErrorType("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),t.exports.q=n},403:function(t,n,i){"use strict";var p=Object.keys||function(t){var n=[];for(var i in t)n.push(i);return n};t.exports=Duplex;var b=i(709),g=i(337);i(782)(Duplex,b);for(var y=p(g.prototype),m=0;m<y.length;m++){var _=y[m];Duplex.prototype[_]||(Duplex.prototype[_]=g.prototype[_])}function Duplex(t){if(!(this instanceof Duplex))return new Duplex(t);b.call(this,t),g.call(this,t),this.allowHalfOpen=!0,t&&(!1===t.readable&&(this.readable=!1),!1===t.writable&&(this.writable=!1),!1===t.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",onend)))}function onend(){this._writableState.ended||s.nextTick(onEndNT,this)}function onEndNT(t){t.end()}Object.defineProperty(Duplex.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(Duplex.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(Duplex.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(Duplex.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&this._readableState.destroyed&&this._writableState.destroyed},set:function(t){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=t,this._writableState.destroyed=t)}})},889:function(t,n,i){"use strict";
15t.exports=PassThrough;var s=i(170);function PassThrough(t){if(!(this instanceof PassThrough))return new PassThrough(t);s.call(this,t)}i(782)(PassThrough,s),PassThrough.prototype._transform=function(t,n,i){i(null,t)}},709:function(t,n,p){"use strict";t.exports=Readable,Readable.ReadableState=ReadableState,p(361).EventEmitter;var b,g,y,m,_,a=function(t,n){return t.listeners(n).length},v=p(678),w=p(300).Buffer,S=i.g.Uint8Array||function(){};function _uint8ArrayToBuffer(t){return w.from(t)}function _isUint8Array(t){return w.isBuffer(t)||t instanceof S}var R=p(837);g=R&&R.debuglog?R.debuglog("stream"):function(){};var T=p(379),x=p(25),A=p(776).getHighWaterMark,k=p(646).q,O=k.ERR_INVALID_ARG_TYPE,P=k.ERR_STREAM_PUSH_AFTER_EOF,C=k.ERR_METHOD_NOT_IMPLEMENTED,I=k.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;p(782)(Readable,v);var L=x.errorOrDestroy,N=["error","close","destroy","pause","resume"];function prependListener(t,n,i){if("function"==typeof t.prependListener)return t.prependListener(n,i);t._events&&t._events[n]?Array.isArray(t._events[n])?t._events[n].unshift(i):t._events[n]=[i,t._events[n]]:t.on(n,i)}function ReadableState(t,n,i){b=b||p(403),t=t||{},"boolean"!=typeof i&&(i=n instanceof b),this.objectMode=!!t.objectMode,i&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=A(this,t,"readableHighWaterMark",i),this.buffer=new T,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(y||(y=p(704).s),this.decoder=new y(t.encoding),this.encoding=t.encoding)}function Readable(t){if(b=b||p(403),!(this instanceof Readable))return new Readable(t);var n=this instanceof b;this._readableState=new ReadableState(t,this,n),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),v.call(this)}function readableAddChunk(t,n,i,s,p){g("readableAddChunk",n);var b,y=t._readableState;if(null===n)y.reading=!1,onEofChunk(t,y);else if(p||(b=chunkInvalid(y,n)),b)L(t,b);else if(y.objectMode||n&&n.length>0){if("string"==typeof n||y.objectMode||Object.getPrototypeOf(n)===w.prototype||(n=_uint8ArrayToBuffer(n)),s)y.endEmitted?L(t,new I):addChunk(t,y,n,!0);else if(y.ended)L(t,new P);else{if(y.destroyed)return!1;y.reading=!1,y.decoder&&!i?(n=y.decoder.write(n),y.objectMode||0!==n.length?addChunk(t,y,n,!1):maybeReadMore(t,y)):addChunk(t,y,n,!1)}}else s||(y.reading=!1,maybeReadMore(t,y));return!y.ended&&(y.length<y.highWaterMark||0===y.length)}function addChunk(t,n,i,s){n.flowing&&0===n.length&&!n.sync?(n.awaitDrain=0,t.emit("data",i)):(n.length+=n.objectMode?1:i.length,s?n.buffer.unshift(i):n.buffer.push(i),n.needReadable&&emitReadable(t)),maybeReadMore(t,n)}function chunkInvalid(t,n){var i;return _isUint8Array(n)||"string"==typeof n||void 0===n||t.objectMode||(i=new O("chunk",["string","Buffer","Uint8Array"],n)),i}function computeNewHighWaterMark(t){return t>=1073741824?t=1073741824:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}function howMuchToRead(t,n){return t<=0||0===n.length&&n.ended?0:n.objectMode?1:t!=t?n.flowing&&n.length?n.buffer.head.data.length:n.length:(t>n.highWaterMark&&(n.highWaterMark=computeNewHighWaterMark(t)),t<=n.length)?t:n.ended?n.length:(n.needReadable=!0,0)}function onEofChunk(t,n){if(g("onEofChunk"),!n.ended){if(n.decoder){var i=n.decoder.end();i&&i.length&&(n.buffer.push(i),n.length+=n.objectMode?1:i.length)}n.ended=!0,n.sync?emitReadable(t):(n.needReadable=!1,n.emittedReadable||(n.emittedReadable=!0,emitReadable_(t)))}}function emitReadable(t){var n=t._readableState;g("emitReadable",n.needReadable,n.emittedReadable),n.needReadable=!1,n.emittedReadable||(g("emitReadable",n.flowing),n.emittedReadable=!0,s.nextTick(emitReadable_,t))}function emitReadable_(t){var n=t._readableState;g("emitReadable_",n.destroyed,n.length,n.ended),!n.destroyed&&(n.length||n.ended)&&(t.emit("readable"),n.emittedReadable=!1),n.needReadable=!n.flowing&&!n.ended&&n.length<=n.highWaterMark,flow(t)}function maybeReadMore(t,n){n.readingMore||(n.readingMore=!0,s.nextTick(maybeReadMore_,t,n))}function maybeReadMore_(t,n){for(;!n.reading&&!n.ended&&(n.length<n.highWaterMark||n.flowing&&0===n.length);){var i=n.length;
vendor: 3,242 bytes, line 15
15if(g("maybeReadMore read 0"),t.read(0),i===n.length)break}n.readingMore=!1}function pipeOnDrain(t){return function(){var n=t._readableState;g("pipeOnDrain",n.awaitDrain),n.awaitDrain&&n.awaitDrain--,0===n.awaitDrain&&a(t,"data")&&(n.flowing=!0,flow(t))}}function updateReadableListening(t){var n=t._readableState;n.readableListening=t.listenerCount("readable")>0,n.resumeScheduled&&!n.paused?n.flowing=!0:t.listenerCount("data")>0&&t.resume()}function nReadingNextTick(t){g("readable nexttick read 0"),t.read(0)}function resume(t,n){n.resumeScheduled||(n.resumeScheduled=!0,s.nextTick(resume_,t,n))}function resume_(t,n){g("resume",n.reading),n.reading||t.read(0),n.resumeScheduled=!1,t.emit("resume"),flow(t),n.flowing&&!n.reading&&t.read(0)}function flow(t){var n=t._readableState;for(g("flow",n.flowing);n.flowing&&null!==t.read(););}function fromList(t,n){var i;return 0===n.length?null:(n.objectMode?i=n.buffer.shift():!t||t>=n.length?(i=n.decoder?n.buffer.join(""):1===n.buffer.length?n.buffer.first():n.buffer.concat(n.length),n.buffer.clear()):i=n.buffer.consume(t,n.decoder),i)}function endReadable(t){var n=t._readableState;g("endReadable",n.endEmitted),n.endEmitted||(n.ended=!0,s.nextTick(endReadableNT,n,t))}function endReadableNT(t,n){if(g("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&0===t.length&&(t.endEmitted=!0,n.readable=!1,n.emit("end"),t.autoDestroy)){var i=n._writableState;(!i||i.autoDestroy&&i.finished)&&n.destroy()}}function indexOf(t,n){for(var i=0,s=t.length;i<s;i++)if(t[i]===n)return i;return -1}Object.defineProperty(Readable.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}}),Readable.prototype.destroy=x.destroy,Readable.prototype._undestroy=x.undestroy,Readable.prototype._destroy=function(t,n){n(t)},Readable.prototype.push=function(t,n){var i,s=this._readableState;return s.objectMode?i=!0:"string"==typeof t&&((n=n||s.defaultEncoding)!==s.encoding&&(t=w.from(t,n),n=""),i=!0),readableAddChunk(this,t,n,!1,i)},Readable.prototype.unshift=function(t){return readableAddChunk(this,t,null,!0,!1)},Readable.prototype.isPaused=function(){return!1===this._readableState.flowing},Readable.prototype.setEncoding=function(t){y||(y=p(704).s);var n=new y(t);this._readableState.decoder=n,this._readableState.encoding=this._readableState.decoder.encoding;for(var i=this._readableState.buffer.head,s="";null!==i;)s+=n.write(i.data),i=i.next;return this._readableState.buffer.clear(),""!==s&&this._readableState.buffer.push(s),this._readableState.length=s.length,this},Readable.prototype.read=function(t){g("read",t),t=parseInt(t,10);var n,i=this._readableState,s=t;if(0!==t&&(i.emittedReadable=!1),0===t&&i.needReadable&&((0!==i.highWaterMark?i.length>=i.highWaterMark:i.length>0)||i.ended))return g("read: emitReadable",i.length,i.ended),0===i.length&&i.ended?endReadable(this):emitReadable(this),null;if(0===(t=howMuchToRead(t,i))&&i.ended)return 0===i.length&&endReadable(this),null;var p=i.needReadable;return g("need readable",p),(0===i.length||i.length-t<i.highWaterMark)&&g("length less than watermark",p=!0),i.ended||i.reading?g("reading or ended",p=!1):p&&(g
vendor: 5,313 bytes, line 15
15("do read"),i.reading=!0,i.sync=!0,0===i.length&&(i.needReadable=!0),this._read(i.highWaterMark),i.sync=!1,i.reading||(t=howMuchToRead(s,i))),null===(n=t>0?fromList(t,i):null)?(i.needReadable=i.length<=i.highWaterMark,t=0):(i.length-=t,i.awaitDrain=0),0===i.length&&(i.ended||(i.needReadable=!0),s!==t&&i.ended&&endReadable(this)),null!==n&&this.emit("data",n),n},Readable.prototype._read=function(t){L(this,new C("_read()"))},Readable.prototype.pipe=function(t,n){var i=this,p=this._readableState;switch(p.pipesCount){case 0:p.pipes=t;break;case 1:p.pipes=[p.pipes,t];break;default:p.pipes.push(t)}p.pipesCount+=1,g("pipe count=%d opts=%j",p.pipesCount,n);var b=n&&!1===n.end||t===s.stdout||t===s.stderr?unpipe:onend;function onunpipe(t,n){g("onunpipe"),t===i&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,cleanup())}function onend(){g("onend"),t.end()}p.endEmitted?s.nextTick(b):i.once("end",b),t.on("unpipe",onunpipe);var y=pipeOnDrain(i);t.on("drain",y);var m=!1;function cleanup(){g("cleanup"),t.removeListener("close",onclose),t.removeListener("finish",onfinish),t.removeListener("drain",y),t.removeListener("error",onerror),t.removeListener("unpipe",onunpipe),i.removeListener("end",onend),i.removeListener("end",unpipe),i.removeListener("data",ondata),m=!0,p.awaitDrain&&(!t._writableState||t._writableState.needDrain)&&y()}function ondata(n){g("ondata");var s=t.write(n);g("dest.write",s),!1===s&&((1===p.pipesCount&&p.pipes===t||p.pipesCount>1&&-1!==indexOf(p.pipes,t))&&!m&&(g("false write response, pause",p.awaitDrain),p.awaitDrain++),i.pause())}function onerror(n){g("onerror",n),unpipe(),t.removeListener("error",onerror),0===a(t,"error")&&L(t,n)}function onclose(){t.removeListener("finish",onfinish),unpipe()}function onfinish(){g("onfinish"),t.removeListener("close",onclose),unpipe()}function unpipe(){g("unpipe"),i.unpipe(t)}return i.on("data",ondata),prependListener(t,"error",onerror),t.once("close",onclose),t.once("finish",onfinish),t.emit("pipe",i),p.flowing||(g("pipe resume"),i.resume()),t},Readable.prototype.unpipe=function(t){var n=this._readableState,i={hasUnpiped:!1};if(0===n.pipesCount)return this;if(1===n.pipesCount)return t&&t!==n.pipes||(t||(t=n.pipes),n.pipes=null,n.pipesCount=0,n.flowing=!1,t&&t.emit("unpipe",this,i)),this;if(!t){var s=n.pipes,p=n.pipesCount;n.pipes=null,n.pipesCount=0,n.flowing=!1;for(var b=0;b<p;b++)s[b].emit("unpipe",this,{hasUnpiped:!1});return this}var g=indexOf(n.pipes,t);return -1===g||(n.pipes.splice(g,1),n.pipesCount-=1,1===n.pipesCount&&(n.pipes=n.pipes[0]),t.emit("unpipe",this,i)),this},Readable.prototype.on=function(t,n){var i=v.prototype.on.call(this,t,n),p=this._readableState;return"data"===t?(p.readableListening=this.listenerCount("readable")>0,!1!==p.flowing&&this.resume()):"readable"!==t||p.endEmitted||p.readableListening||(p.readableListening=p.needReadable=!0,p.flowing=!1,p.emittedReadable=!1,g("on readable",p.length,p.reading),p.length?emitReadable(this):p.reading||s.nextTick(nReadingNextTick,this)),i},Readable.prototype.addListener=Readable.prototype.on,Readable.prototype.removeListener=function(t,n){var i=v.prototype.removeListener.call(this,t,n);return"readable"===t&&s.nextTick(updateReadableListening,this),i},Readable.prototype.removeAllListeners=function(t){var n=v.prototype.removeAllListeners.apply(this,arguments);return("readable"===t||void 0===t)&&s.nextTick(updateReadableListening,this),n},Readable.prototype.resume=function(){var t=this._readableState;return t.flowing||(g("resume"),t.flowing=!t.readableListening,resume(this,t)),t.paused=!1,this},Readable.prototype.pause=function(){return g("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(g("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},Readable.prototype.wrap=function(t){var n=this,i=this._readableState,s=!1;for(var p in t.on("end",function(){if(g("wrapped end"),i.decoder&&!i.ended){var t=i.decoder.end();t&&t.length&&n.push(t)}n.push(null)}),t.on("data",function(p){g("wrapped data"),i.decoder&&(p=i.decoder.write(p)),(!i.objectMode||null!=p)&&(i.objectMode||p&&p.length)&&(n.push(p)||(s=!0,t.pause()))}),t)void 0===this[p]&&"function"==typeof t[p]&&(this[p]=function(n){return function(){return t[n].apply(t,arguments)}}(p));for(var b=0;b<N.length;b++)t.on(N[b],this.emit.bind(this,N[b]));return this._read=function(n){g("wrapped _read",n),s&&(s=!1,t.resume())},this},"function"==typeof Symbol&&(Readable.prototype[Symbol.asyncIterator]=function(){return void 0===m&&(m=p(871)),m(this)}),Object.defineProperty(Readable.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(Readable.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(Readable.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(t){this._readableState&&(this._readableState.flowing=t)}}),Readable._fromList=fromList,Object.defineProperty(Readable.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(Readable.from=function(t,n){return void 0===_&&(_=p(727)),_(Readable,t,n)})},170:function(t,n,i){"use strict";
vendor: 5,013 bytes, line 15
15t.exports=Transform;var s=i(646).q,p=s.ERR_METHOD_NOT_IMPLEMENTED,b=s.ERR_MULTIPLE_CALLBACK,g=s.ERR_TRANSFORM_ALREADY_TRANSFORMING,y=s.ERR_TRANSFORM_WITH_LENGTH_0,m=i(403);function afterTransform(t,n){var i=this._transformState;i.transforming=!1;var s=i.writecb;if(null===s)return this.emit("error",new b);i.writechunk=null,i.writecb=null,null!=n&&this.push(n),s(t);var p=this._readableState;p.reading=!1,(p.needReadable||p.length<p.highWaterMark)&&this._read(p.highWaterMark)}function Transform(t){if(!(this instanceof Transform))return new Transform(t);m.call(this,t),this._transformState={afterTransform:afterTransform.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&("function"==typeof t.transform&&(this._transform=t.transform),"function"==typeof t.flush&&(this._flush=t.flush)),this.on("prefinish",prefinish)}function prefinish(){var t=this;"function"!=typeof this._flush||this._readableState.destroyed?done(this,null,null):this._flush(function(n,i){done(t,n,i)})}function done(t,n,i){if(n)return t.emit("error",n);if(null!=i&&t.push(i),t._writableState.length)throw new y;if(t._transformState.transforming)throw new g;return t.push(null)}i(782)(Transform,m),Transform.prototype.push=function(t,n){return this._transformState.needTransform=!1,m.prototype.push.call(this,t,n)},Transform.prototype._transform=function(t,n,i){i(new p("_transform()"))},Transform.prototype._write=function(t,n,i){var s=this._transformState;if(s.writecb=i,s.writechunk=t,s.writeencoding=n,!s.transforming){var p=this._readableState;(s.needTransform||p.needReadable||p.length<p.highWaterMark)&&this._read(p.highWaterMark)}},Transform.prototype._read=function(t){var n=this._transformState;null===n.writechunk||n.transforming?n.needTransform=!0:(n.transforming=!0,this._transform(n.writechunk,n.writeencoding,n.afterTransform))},Transform.prototype._destroy=function(t,n){m.prototype._destroy.call(this,t,function(t){n(t)})}},337:function(t,n,p){"use strict";function CorkedRequest(t){var n=this;this.next=null,this.entry=null,this.finish=function(){onCorkedFinish(n,t)}}t.exports=Writable,Writable.WritableState=WritableState;var b,g,y={deprecate:p(769)},m=p(678),_=p(300).Buffer,v=i.g.Uint8Array||function(){};function _uint8ArrayToBuffer(t){return _.from(t)}function _isUint8Array(t){return _.isBuffer(t)||t instanceof v}var w=p(25),S=p(776).getHighWaterMark,R=p(646).q,T=R.ERR_INVALID_ARG_TYPE,x=R.ERR_METHOD_NOT_IMPLEMENTED,A=R.ERR_MULTIPLE_CALLBACK,k=R.ERR_STREAM_CANNOT_PIPE,O=R.ERR_STREAM_DESTROYED,P=R.ERR_STREAM_NULL_VALUES,C=R.ERR_STREAM_WRITE_AFTER_END,I=R.ERR_UNKNOWN_ENCODING,L=w.errorOrDestroy;function nop(){}function WritableState(t,n,i){b=b||p(403),t=t||{},"boolean"!=typeof i&&(i=n instanceof b),this.objectMode=!!t.objectMode,i&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=S(this,t,"writableHighWaterMark",i),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var s=!1===t.decodeStrings;this.decodeStrings=!s,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){onwrite(n,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new CorkedRequest(this)}function Writable(t){var n=this instanceof(b=b||p(403));if(!n&&!g.call(Writable,this))return new Writable(t);this._writableState=new WritableState(t,this,n),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),m.call(this)}function writeAfterEnd(t,n){var i=new C;L(t,i),s.nextTick(n,i)}function validChunk(t,n,i,p){var b;return null===i?b=new P:"string"==typeof i||n.objectMode||(b=new T("chunk",["string","Buffer"],i)),!b||(L(t,b),s.nextTick(p,b),!1)}function decodeChunk(t,n,i){return t.objectMode||!1===t.decodeStrings||"string"!=typeof n||(n=_.from(n,i)),n}function writeOrBuffer(t,n,i,s,p,b){if(!i){var g=decodeChunk(n,s,p);s!==g&&(i=!0,p="buffer",s=g)}var y=n.objectMode?1:s.length;n.length+=y;var m=n.length<n.highWaterMark;if(m||(n.needDrain=!0),n.writing||n.corked){var _=n.lastBufferedRequest;n.lastBufferedRequest={chunk:s,encoding:p,isBuf:i,callback:b,next:null},_?_.next=n.lastBufferedRequest:n.bufferedRequest=n.lastBufferedRequest,n.bufferedRequestCount+=1}else doWrite(t,n,!1,y,s,p,b);return m}function doWrite(t,n,i,s,p,b,g){n.writelen=s,n.writecb=g,n.writing=!0,n.sync=!0,n.destroyed?n.onwrite(new O("write")):i?t._writev(p,n.onwrite):t._write(p,b,n.onwrite),n.sync=!1}function onwriteError(t,n,i,p,b){--n.pendingcb,i?(s.nextTick(b,p),s.nextTick(finishM
vendor: 7,623 bytes, line 15
15aybe,t,n),t._writableState.errorEmitted=!0,L(t,p)):(b(p),t._writableState.errorEmitted=!0,L(t,p),finishMaybe(t,n))}function onwriteStateUpdate(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}function onwrite(t,n){var i=t._writableState,p=i.sync,b=i.writecb;if("function"!=typeof b)throw new A;if(onwriteStateUpdate(i),n)onwriteError(t,i,p,n,b);else{var g=needFinish(i)||t.destroyed;g||i.corked||i.bufferProcessing||!i.bufferedRequest||clearBuffer(t,i),p?s.nextTick(afterWrite,t,i,g,b):afterWrite(t,i,g,b)}}function afterWrite(t,n,i,s){i||onwriteDrain(t,n),n.pendingcb--,s(),finishMaybe(t,n)}function onwriteDrain(t,n){0===n.length&&n.needDrain&&(n.needDrain=!1,t.emit("drain"))}function clearBuffer(t,n){n.bufferProcessing=!0;var i=n.bufferedRequest;if(t._writev&&i&&i.next){var s=Array(n.bufferedRequestCount),p=n.corkedRequestsFree;p.entry=i;for(var b=0,g=!0;i;)s[b]=i,i.isBuf||(g=!1),i=i.next,b+=1;s.allBuffers=g,doWrite(t,n,!0,n.length,s,"",p.finish),n.pendingcb++,n.lastBufferedRequest=null,p.next?(n.corkedRequestsFree=p.next,p.next=null):n.corkedRequestsFree=new CorkedRequest(n),n.bufferedRequestCount=0}else{for(;i;){var y=i.chunk,m=i.encoding,_=i.callback,v=n.objectMode?1:y.length;if(doWrite(t,n,!1,v,y,m,_),i=i.next,n.bufferedRequestCount--,n.writing)break}null===i&&(n.lastBufferedRequest=null)}n.bufferedRequest=i,n.bufferProcessing=!1}function needFinish(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function callFinal(t,n){t._final(function(i){n.pendingcb--,i&&L(t,i),n.prefinished=!0,t.emit("prefinish"),finishMaybe(t,n)})}function prefinish(t,n){n.prefinished||n.finalCalled||("function"!=typeof t._final||n.destroyed?(n.prefinished=!0,t.emit("prefinish")):(n.pendingcb++,n.finalCalled=!0,s.nextTick(callFinal,t,n)))}function finishMaybe(t,n){var i=needFinish(n);if(i&&(prefinish(t,n),0===n.pendingcb&&(n.finished=!0,t.emit("finish"),n.autoDestroy))){var s=t._readableState;(!s||s.autoDestroy&&s.endEmitted)&&t.destroy()}return i}function endWritable(t,n,i){n.ending=!0,finishMaybe(t,n),i&&(n.finished?s.nextTick(i):t.once("finish",i)),n.ended=!0,t.writable=!1}function onCorkedFinish(t,n,i){var s=t.entry;for(t.entry=null;s;){var p=s.callback;n.pendingcb--,p(i),s=s.next}n.corkedRequestsFree.next=t}p(782)(Writable,m),WritableState.prototype.getBuffer=function(){for(var t=this.bufferedRequest,n=[];t;)n.push(t),t=t.next;return n},function(){try{Object.defineProperty(WritableState.prototype,"buffer",{get:y.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(g=Function.prototype[Symbol.hasInstance],Object.defineProperty(Writable,Symbol.hasInstance,{value:function(t){return!!g.call(this,t)||this===Writable&&t&&t._writableState instanceof WritableState}})):g=function(t){return t instanceof this},Writable.prototype.pipe=function(){L(this,new k)},Writable.prototype.write=function(t,n,i){var s=this._writableState,p=!1,b=!s.objectMode&&_isUint8Array(t);return b&&!_.isBuffer(t)&&(t=_uint8ArrayToBuffer(t)),"function"==typeof n&&(i=n,n=null),b?n="buffer":n||(n=s.defaultEncoding),"function"!=typeof i&&(i=nop),s.ending?writeAfterEnd(this,i):(b||validChunk(this,s,t,i))&&(s.pendingcb++,p=writeOrBuffer(this,s,b,t,n,i)),p},Writable.prototype.cork=function(){this._writableState.corked++},Writable.prototype.uncork=function(){var t=this._writableState;!t.corked||(t.corked--,t.writing||t.corked||t.bufferProcessing||!t.bufferedRequest||clearBuffer(this,t))},Writable.prototype.setDefaultEncoding=function(t){if("string"==typeof t&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new I(t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(Writable.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(Writable.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Writable.prototype._write=function(t,n,i){i(new x("_write()"))},Writable.prototype._writev=null,Writable.prototype.end=function(t,n,i){var s=this._writableState;return"function"==typeof t?(i=t,t=null,n=null):"function"==typeof n&&(i=n,n=null),null!=t&&this.write(t,n),s.corked&&(s.corked=1,this.uncork()),s.ending||endWritable(this,s,i),this},Object.defineProperty(Writable.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(Writable.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),Writable.prototype.destroy=w.destroy,Writable.prototype._undestroy=w.undestroy,Writable.prototype._destroy=function(t,n){n(t)}},871:function(t,n,i){"use strict";function _defineProperty(t,n,i){return n in t?Object.defineProperty(t,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[n]=i,t}var p,b=i(698),g=Symbol("lastResolve"),y=Symbol("lastReject"),m=Symbol("error"),_=Symbol("ended"),v=Symbol("lastPromise"),w=Symbol("handlePromise"),S=Symbol("stream");function createIterResult(t,n){return{value:t,done:n}}function readAndResolve(t){var n=t[g];if(null!==n){var i=t[S].read();null!==i&&(t[v]=null,t[g]=null,t[y]=null,n(createIterResult(i,!1)))}}function onReadable(t){s.nextTick(readAndResolve,t)}function wrapForNext(t,n){return function(i,s){t.then(function(){if(n[_]){i(createIterResult(void 0,!0));return}n[w](i,s)},s)}}var R=Object.getPrototypeOf(function(){}),T=Object.setPrototypeOf((_defineProperty(p={get stream(){return this[S]},next:function(){var t,n=this,i=this[m];if(null!==i)return Promise.reject(i);if(this[_])return Promise.resolve(createIterResult(void 0,!0));if(this[S].destroyed)return new Promise(function(t,i){s.nextTick(function(){n[m]?i(n[m]):t(createIterResult(void 0,!0))})});var p=this[v];if(p)t=new Promise(wrapForNext(p,this));else{var b=this[S].read();if(null!==b)return Promise.resolve(createIterResult(b,!1));t=new Promise(this[w])}return this[v]=t,t}},Symbol.asyncIterator,function(){return this}),_defineProperty(p,"return",function(){var t=this;return new Promise(function(n,i){t[S].destroy(null,function(t){if(t){i(t);return}n(createIterResult(void 0,!0))})})}),p),R);t.exports=function(t){var n,i=Object.create(T,(_defineProperty(n={},S,{value:t,writable:!0}),_defineProperty(n,g,{value:null,writable:!0}),_defineProperty(n,y,{value:null,writable:!0}),_defineProperty(n,m,{value:null,writable:!0}),_defineProperty(n,_,{value:t._readableState.endEmitted,writable:!0}),_defineProperty(n,w,{value:function(t,n){var s=i[S].read();s?(i[v]=null,i[g]=null,i[y]=null,t(createIterResult(s,!1))):(i[g]=t,i[y]=n)},writable:!0}),n));return i[v]=null,b(t,function(t){if(t&&"ERR_STREAM_PREMATURE_CLOSE"!==t.code){var n=i[y];null!==n&&(i[v]=null,i[g]=null,i[y]=null,n(t)),i[m]=t;return}var s=i[g];null!==s&&(i[v]=null,i[g]=null,i[y]=null,s(createIterResult(void 0,!0))),i[_]=!0}),t.on("readable",onReadable.bind(null,i)),i}},379:function(t,n,i){"use strict";function ownKeys(t,n){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);n&&(s=s.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),i.push.apply(i,s)}return i}function _objectSpread(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};
15n%2?ownKeys(Object(i),!0).forEach(function(n){_defineProperty(t,n,i[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):ownKeys(Object(i)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(i,n))})}return t}function _defineProperty(t,n,i){return n in t?Object.defineProperty(t,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[n]=i,t}function _classCallCheck(t,n){if(!(t instanceof n))throw TypeError("Cannot call a class as a function")}function _defineProperties(t,n){for(var i=0;i<n.length;i++){var s=n[i];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(t,s.key,s)}}function _createClass(t,n,i){return n&&_defineProperties(t.prototype,n),i&&_defineProperties(t,i),t}var s=i(300).Buffer,p=i(837).inspect,b=p&&p.custom||"inspect";function copyBuffer(t,n,i){s.prototype.copy.call(t,n,i)}t.exports=function(){function BufferList(){_classCallCheck(this,BufferList),this.head=null,this.tail=null,this.length=0}return _createClass(BufferList,[{key:"push",value:function(t){var n={data:t,next:null};this.length>0?this.tail.next=n:this.head=n,this.tail=n,++this.length}},{key:"unshift",value:function(t){var n={data:t,next:this.head};0===this.length&&(this.tail=n),this.head=n,++this.length}},{key:"shift",value:function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(t){if(0===this.length)return"";for(var n=this.head,i=""+n.data;n=n.next;)i+=t+n.data;return i}},{key:"concat",value:function(t){if(0===this.length)return s.alloc(0);for(var n=s.allocUnsafe(t>>>0),i=this.head,p=0;i;)copyBuffer(i.data,n,p),p+=i.data.length,i=i.next;return n}},{key:"consume",value:function(t,n){var i;return t<this.head.data.length?(i=this.head.data.slice(0,t),this.head.data=this.head.data.slice(t)):i=t===this.head.data.length?this.shift():n?this._getString(t):this._getBuffer(t),i}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(t){var n=this.head,i=1,s=n.data;for(t-=s.length;n=n.next;){var p=n.data,b=t>p.length?p.length:t;if(b===p.length?s+=p:s+=p.slice(0,t),0==(t-=b)){b===p.length?(++i,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=p.slice(b));break}++i}return this.length-=i,s}},{key:"_getBuffer",value:function(t){var n=s.allocUnsafe(t),i=this.head,p=1;for(i.data.copy(n),t-=i.data.length;i=i.next;){var b=i.data,g=t>b.length?b.length:t;if(b.copy(n,n.length-t,0,g),0==(t-=g)){g===b.length?(++p,i.next?this.head=i.next:this.head=this.tail=null):(this.head=i,i.data=b.slice(g));break}++p}return this.length-=p,n}},{key:b,value:function(t,n){return p(this,_objectSpread({},n,{depth:0,customInspect:!1}))}}]),BufferList}()},25:function(t){"use strict";function destroy(t,n){var i=this,p=this._readableState&&this._readableState.destroyed,b=this._writableState&&this._writableState.destroyed;return p||b?n?n(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,s.nextTick(emitErrorNT,this,t)):s.nextTick(emitErrorNT,this,t)):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(t){!n&&t?i._writableState?i._writableState.errorEmitted?s.nextTick(emitCloseNT,i):(i._writableState.errorEmitted=!0,s.nextTick(emitErrorAndCloseNT,i,t)):s.nextTick(emitErrorAndCloseNT,i,t):n?(s.nextTick(emitCloseNT,i),n(t)):s.nextTick(emitCloseNT,i)})),this}function emitErrorAndCloseNT(t,n){emitErrorNT(t,n),emitCloseNT(t)}function emitCloseNT(t){(!t._writableState||t._writableState.emitClose)&&(!t._readableState||t._readableState.emitClose)&&t.emit("close")}function undestroy(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function emitErrorNT(t,n){t.emit("error",n)}function errorOrDestroy(t,n){var i=t._readableState,s=t._writableState;i&&i.autoDestroy||s&&s.autoDestroy?t.destroy(n):t.emit("error",n)}
15t.exports={destroy:destroy,undestroy:undestroy,errorOrDestroy:errorOrDestroy}},698:function(t,n,i){"use strict";var s=i(646).q.ERR_STREAM_PREMATURE_CLOSE;function once(t){var n=!1;return function(){if(!n){n=!0;for(var i=arguments.length,s=Array(i),p=0;p<i;p++)s[p]=arguments[p];t.apply(this,s)}}}function noop(){}function isRequest(t){return t.setHeader&&"function"==typeof t.abort}function eos(t,n,i){if("function"==typeof n)return eos(t,null,n);n||(n={}),i=once(i||noop);var p=n.readable||!1!==n.readable&&t.readable,b=n.writable||!1!==n.writable&&t.writable,o=function(){t.writable||f()},g=t._writableState&&t._writableState.finished,f=function(){b=!1,g=!0,p||i.call(t)},y=t._readableState&&t._readableState.endEmitted,u=function(){p=!1,y=!0,b||i.call(t)},d=function(n){i.call(t,n)},c=function(){var n;return p&&!y?(t._readableState&&t._readableState.ended||(n=new s),i.call(t,n)):b&&!g?(t._writableState&&t._writableState.ended||(n=new s),i.call(t,n)):void 0},h=function(){t.req.on("finish",f)};return isRequest(t)?(t.on("complete",f),t.on("abort",c),t.req?h():t.on("request",h)):b&&!t._writableState&&(t.on("end",o),t.on("close",o)),t.on("end",u),t.on("finish",f),!1!==n.error&&t.on("error",d),t.on("close",c),function(){t.removeListener("complete",f),t.removeListener("abort",c),t.removeListener("request",h),t.req&&t.req.removeListener("finish",f),t.removeListener("end",o),t.removeListener("close",o),t.removeListener("finish",f),t.removeListener("end",u),t.removeListener("error",d),t.removeListener("close",c)}}t.exports=eos},727:function(t,n,i){"use strict";function asyncGeneratorStep(t,n,i,s,p,b,g){try{var y=t[b](g),m=y.value}catch(t){i(t);return}y.done?n(m):Promise.resolve(m).then(s,p)}function _asyncToGenerator(t){return function(){var n=this,i=arguments;return new Promise(function(s,p){var b=t.apply(n,i);function _next(t){asyncGeneratorStep(b,s,p,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(b,s,p,_next,_throw,"throw",t)}_next(void 0)})}}function ownKeys(t,n){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);n&&(s=s.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),i.push.apply(i,s)}return i}function _objectSpread(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?ownKeys(Object(i),!0).forEach(function(n){_defineProperty(t,n,i[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):ownKeys(Object(i)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(i,n))})}return t}function _defineProperty(t,n,i){return n in t?Object.defineProperty(t,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[n]=i,t}var s=i(646).q.ERR_INVALID_ARG_TYPE;function from(t,n,i){if(n&&"function"==typeof n.next)p=n;else if(n&&n[Symbol.asyncIterator])p=n[Symbol.asyncIterator]();else if(n&&n[Symbol.iterator])p=n[Symbol.iterator]();else throw new s("iterable",["Iterable"],n);var p,b=new t(_objectSpread({objectMode:!0},i)),g=!1;function next(){return _next2.apply(this,arguments)}function _next2(){return(_next2=_asyncToGenerator(function*(){try{var t=yield p.next(),n=t.value;t.done?b.push(null):b.push((yield n))?next():g=!1}catch(t){b.destroy(t)}})).apply(this,arguments)}return b._read=function(){g||(g=!0,next())},b}t.exports=from},442:function(t,n,i){"use strict";function once(t){var n=!1;return function(){n||(n=!0,t.apply(void 0,arguments))}}var s,p=i(646).q,b=p.ERR_MISSING_ARGS,g=p.ERR_STREAM_DESTROYED;function noop(t){if(t)throw t}function isRequest(t){return t.setHeader&&"function"==typeof t.abort}function destroyer(t,n,p,b){b=once(b);var y=!1;t.on("close",function(){y=!0}),void 0===s&&(s=i(698)),s(t,{readable:n,writable:p},function(t){if(t)return b(t);y=!0,b()});var m=!1;return function(n){if(!y&&!m){if(m=!0,isRequest(t))return t.abort();if("function"==typeof t.destroy)return t.destroy();b(n||new g("pipe"))}}}function call(t){t()}function pipe(t,n){return t.pipe(n)}function popCallback(t){return t.length&&"function"==typeof t[t.length-1]?t.pop():noop}function pipeline(){for(var t,n=arguments.length,i=Array(n),s=0;s<n;s++)i[s]=arguments[s];var p=popCallback(i);if(Array.isArray(i[0])&&(i=i[0]),i.length<2)throw new b("streams");var g=i.map(function(n,s){var b=s<i.length-1;return destroyer(n,b,s>0,function(n){t||(t=n),n&&g.forEach(call),b||(g.forEach(call),p(t))})});return i.reduce(pipe)}t.exports=pipeline},776:function(t,n,i){"use strict";
15var s=i(646).q.ERR_INVALID_OPT_VALUE;function highWaterMarkFrom(t,n,i){return null!=t.highWaterMark?t.highWaterMark:n?t[i]:null}function getHighWaterMark(t,n,i,p){var b=highWaterMarkFrom(n,p,i);if(null!=b){if(!(isFinite(b)&&Math.floor(b)===b)||b<0)throw new s(p?i:"highWaterMark",b);return Math.floor(b)}return t.objectMode?16:16384}t.exports={getHighWaterMark:getHighWaterMark}},678:function(t,n,i){t.exports=i(781)},726:function(t,n,i){var p=i(781);"disable"===s.env.READABLE_STREAM&&p?(t.exports=p.Readable,Object.assign(t.exports,p),t.exports.Stream=p):((n=t.exports=i(709)).Stream=p||n,n.Readable=n,n.Writable=i(337),n.Duplex=i(403),n.Transform=i(170),n.PassThrough=i(889),n.finished=i(698),n.pipeline=i(442))},55:function(t,n,i){var s=i(300),p=s.Buffer;function copyProps(t,n){for(var i in t)n[i]=t[i]}function SafeBuffer(t,n,i){return p(t,n,i)}p.from&&p.alloc&&p.allocUnsafe&&p.allocUnsafeSlow?t.exports=s:(copyProps(s,n),n.Buffer=SafeBuffer),SafeBuffer.prototype=Object.create(p.prototype),copyProps(p,SafeBuffer),SafeBuffer.from=function(t,n,i){if("number"==typeof t)throw TypeError("Argument must not be a number");return p(t,n,i)},SafeBuffer.alloc=function(t,n,i){if("number"!=typeof t)throw TypeError("Argument must be a number");var s=p(t);return void 0!==n?"string"==typeof i?s.fill(n,i):s.fill(n):s.fill(0),s},SafeBuffer.allocUnsafe=function(t){if("number"!=typeof t)throw TypeError("Argument must be a number");return p(t)},SafeBuffer.allocUnsafeSlow=function(t){if("number"!=typeof t)throw TypeError("Argument must be a number");return s.SlowBuffer(t)}},813:function(t,n,s){var p=s(450),b=s(254),g=s(911),y=s(523),m=s(310);n.request=function(t,n){t="string"==typeof t?m.parse(t):g(t);var s=-1===i.g.location.protocol.search(/^https?:$/)?"http:":"",b=t.protocol||s,y=t.hostname||t.host,_=t.port,v=t.path||"/";y&&-1!==y.indexOf(":")&&(y="["+y+"]"),t.url=(y?b+"//"+y:"")+(_?":"+_:"")+v,t.method=(t.method||"GET").toUpperCase(),t.headers=t.headers||{};var w=new p(t);return n&&w.on("response",n),w},n.get=function(t,i){var s=n.request(t,i);return s.end(),s},n.ClientRequest=p,n.IncomingMessage=b.IncomingMessage,n.Agent=function(){},n.Agent.defaultMaxSockets=4,n.globalAgent=new n.Agent,n.STATUS_CODES=y,n.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]},301:function(t,n){var s;function getXHR(){if(void 0!==s)return s;if(i.g.XMLHttpRequest){s=new i.g.XMLHttpRequest;try{s.open("GET",i.g.XDomainRequest?"/":"https://example.com")}catch(t){s=null}}else s=null;return s}
15function checkTypeSupport(t){var n=getXHR();if(!n)return!1;try{return n.responseType=t,n.responseType===t}catch(t){}return!1}function isFunction(t){return"function"==typeof t}n.fetch=isFunction(i.g.fetch)&&isFunction(i.g.ReadableStream),n.writableStream=isFunction(i.g.WritableStream),n.abortController=isFunction(i.g.AbortController),n.arraybuffer=n.fetch||checkTypeSupport("arraybuffer"),n.msstream=!n.fetch&&checkTypeSupport("ms-stream"),n.mozchunkedarraybuffer=!n.fetch&&checkTypeSupport("moz-chunked-arraybuffer"),n.overrideMimeType=n.fetch||!!getXHR()&&isFunction(getXHR().overrideMimeType),s=null},450:function(t,n,b){var g=b(301),y=b(782),m=b(254),_=b(726),v=m.IncomingMessage,w=m.readyStates;function decideMode(t,n){return g.fetch&&n?"fetch":g.mozchunkedarraybuffer?"moz-chunked-arraybuffer":g.msstream?"ms-stream":g.arraybuffer&&t?"arraybuffer":"text"}var S=t.exports=function(t){var n,i=this;_.Writable.call(i),i._opts=t,i._body=[],i._headers={},t.auth&&i.setHeader("Authorization","Basic "+p.from(t.auth).toString("base64")),Object.keys(t.headers).forEach(function(n){i.setHeader(n,t.headers[n])});var s=!0;if("disable-fetch"===t.mode||"requestTimeout"in t&&!g.abortController)s=!1,n=!0;else if("prefer-streaming"===t.mode)n=!1;else if("allow-wrong-content-type"===t.mode)n=!g.overrideMimeType;else if(t.mode&&"default"!==t.mode&&"prefer-fast"!==t.mode)throw Error("Invalid value for opts.mode");else n=!0;i._mode=decideMode(n,s),i._fetchTimer=null,i.on("finish",function(){i._onFinish()})};function statusValid(t){try{var n=t.status;return null!==n&&0!==n}catch(t){return!1}}y(S,_.Writable),S.prototype.setHeader=function(t,n){var i=t.toLowerCase();-1===R.indexOf(i)&&(this._headers[i]={name:t,value:n})},S.prototype.getHeader=function(t){var n=this._headers[t.toLowerCase()];return n?n.value:null},S.prototype.removeHeader=function(t){delete this._headers[t.toLowerCase()]},S.prototype._onFinish=function(){var t=this;if(!t._destroyed){var n=t._opts,p=t._headers,b=null;"GET"!==n.method&&"HEAD"!==n.method&&(b=new Blob(t._body,{type:(p["content-type"]||{}).value||""}));var y=[];if(Object.keys(p).forEach(function(t){var n=p[t].name,i=p[t].value;Array.isArray(i)?i.forEach(function(t){y.push([n,t])}):y.push([n,i])}),"fetch"===t._mode){var m=null;if(g.abortController){var _=new AbortController;m=_.signal,t._fetchAbortController=_,"requestTimeout"in n&&0!==n.requestTimeout&&(t._fetchTimer=i.g.setTimeout(function(){t.emit("requestTimeout"),t._fetchAbortController&&t._fetchAbortController.abort()},n.requestTimeout))}i.g.fetch(t._opts.url,{method:t._opts.method,headers:y,body:b||void 0,mode:"cors",credentials:n.withCredentials?"include":"same-origin",signal:m}).then(function(n){t._fetchResponse=n,t._connect()},function(n){i.g.clearTimeout(t._fetchTimer),t._destroyed||t.emit("error",n)})}else{var v=t._xhr=new i.g.XMLHttpRequest;try{v.open(t._opts.method,t._opts.url,!0)}catch(n){s.nextTick(function(){t.emit("error",n)});return}"responseType"in v&&(v.responseType=t._mode),"withCredentials"in v&&(v.withCredentials=!!n.withCredentials),"text"===t._mode&&"overrideMimeType"in v&&v.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in n&&(v.timeout=n.requestTimeout,v.ontimeout=function(){t.emit("requestTimeout")}),y.forEach(function(t){v.setRequestHeader(t[0],t[1])}),t._response=null,v.onreadystatechange=function(){switch(v.readyState){case w.LOADING:case w.DONE:t._onXHRProgress()}},"moz-chunked-arraybuffer"===t._mode&&(v.onprogress=function(){t._onXHRProgress()}),v.onerror=function(){t._destroyed||t.emit("error",Error("XHR error"))};try{v.send(b)}catch(n){s.nextTick(function(){t.emit("error",n)});return}}}},S.prototype._onXHRProgress=function(){statusValid(this._xhr)&&!this._destroyed&&(this._response||this._connect(),this._response._onXHRProgress())},S.prototype._connect=function(){var t=this;t._destroyed||(t._response=new v(t._xhr,t._fetchResponse,t._mode,t._fetchTimer),t._response.on("error",function(n){t.emit("error",n)}),t.emit("response",t._response))},S.prototype._write=function(t,n,i){this._body.push(t),i()},S.prototype.abort=S.prototype.destroy=function(){this._destroyed=!0,i.g.clearTimeout(this._fetchTimer),this._response&&(this._response._destroyed=!0),this._xhr?this._xhr.abort():this._fetchAbortController&&this._fetchAbortController.abort()},S.prototype.end=function(t,n,i){"function"==typeof t&&(i=t,t=void 0),_.Writable.prototype.end.call(this,t,n,i)},S.prototype.flushHeaders=function(){},S.prototype.setTimeout=function(){}
15,S.prototype.setNoDelay=function(){},S.prototype.setSocketKeepAlive=function(){};var R=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","via"]},254:function(t,n,b){var g=b(301),y=b(782),m=b(726),_=n.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},v=n.IncomingMessage=function(t,n,b,y){var _=this;if(m.Readable.call(_),_._mode=b,_.headers={},_.rawHeaders=[],_.trailers={},_.rawTrailers=[],_.on("end",function(){s.nextTick(function(){_.emit("close")})}),"fetch"===b){if(_._fetchResponse=n,_.url=n.url,_.statusCode=n.status,_.statusMessage=n.statusText,n.headers.forEach(function(t,n){_.headers[n.toLowerCase()]=t,_.rawHeaders.push(n,t)}),g.writableStream){var v=new WritableStream({write:function(t){return new Promise(function(n,i){_._destroyed?i():_.push(p.from(t))?n():_._resumeFetch=n})},close:function(){i.g.clearTimeout(y),_._destroyed||_.push(null)},abort:function(t){_._destroyed||_.emit("error",t)}});try{n.body.pipeTo(v).catch(function(t){i.g.clearTimeout(y),_._destroyed||_.emit("error",t)});return}catch(t){}}var w=n.body.getReader();function read(){w.read().then(function(t){if(!_._destroyed){if(t.done){i.g.clearTimeout(y),_.push(null);return}_.push(p.from(t.value)),read()}}).catch(function(t){i.g.clearTimeout(y),_._destroyed||_.emit("error",t)})}read()}else if(_._xhr=t,_._pos=0,_.url=t.responseURL,_.statusCode=t.status,_.statusMessage=t.statusText,t.getAllResponseHeaders().split(/\r?\n/).forEach(function(t){var n=t.match(/^([^:]+):\s*(.*)/);if(n){var i=n[1].toLowerCase();"set-cookie"===i?(void 0===_.headers[i]&&(_.headers[i]=[]),_.headers[i].push(n[2])):void 0!==_.headers[i]?_.headers[i]+=", "+n[2]:_.headers[i]=n[2],_.rawHeaders.push(n[1],n[2])}}),_._charset="x-user-defined",!g.overrideMimeType){var S=_.rawHeaders["mime-type"];if(S){var R=S.match(/;\s*charset=([^;])(;|$)/);R&&(_._charset=R[1].toLowerCase())}_._charset||(_._charset="utf-8")}};y(v,m.Readable),v.prototype._read=function(){var t=this._resumeFetch;t&&(this._resumeFetch=null,t())},v.prototype._onXHRProgress=function(){var t=this,n=t._xhr,s=null;switch(t._mode){case"text":if((s=n.responseText).length>t._pos){var b=s.substr(t._pos);if("x-user-defined"===t._charset){for(var g=p.alloc(b.length),y=0;y<b.length;y++)g[y]=255&b.charCodeAt(y);t.push(g)}else t.push(b,t._charset);t._pos=s.length}break;case"arraybuffer":if(n.readyState!==_.DONE||!n.response)break;s=n.response,t.push(p.from(new Uint8Array(s)));break;case"moz-chunked-arraybuffer":if(s=n.response,n.readyState!==_.LOADING||!s)break;t.push(p.from(new Uint8Array(s)));break;case"ms-stream":if(s=n.response,n.readyState!==_.LOADING)break;var m=new i.g.MSStreamReader;m.onprogress=function(){m.result.byteLength>t._pos&&(t.push(p.from(new Uint8Array(m.result.slice(t._pos)))),t._pos=m.result.byteLength)},m.onload=function(){t.push(null)},m.readAsArrayBuffer(s)}t._xhr.readyState===_.DONE&&"ms-stream"!==t._mode&&t.push(null)}},704:function(t,n,i){"use strict";var s=i(55).Buffer,p=s.isEncoding||function(t){switch((t=""+t)&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function _normalizeEncoding(t){var n;if(!t)return"utf8";for(;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(n)return;t=(""+t).toLowerCase(),n=!0}}function normalizeEncoding(t){var n=_normalizeEncoding(t);if("string"!=typeof n&&(s.isEncoding===p||!p(t)))throw Error("Unknown encoding: "+t);return n||t}function StringDecoder(t){var n;switch(this.encoding=normalizeEncoding(t),this.encoding){case"utf16le":this.text=utf16Text,this.end=utf16End,n=4;break;case"utf8":this.fillLast=utf8FillLast,n=4;break;case"base64":this.text=base64Text,this.end=base64End,n=3;break;default:this.write=simpleWrite,this.end=simpleEnd;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=s.allocUnsafe(n)}function utf8CheckByte(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function utf8CheckIncomplete(t,n,i){var s=n.length-1;if(s<i)return 0;var p=utf8CheckByte(n[s]);return p>=0?(p>0&&(t.lastNeed=p-1),p):--s<i||-2===p?0:(p=utf8CheckByte(n[s]))>=0?(p>0&&(t.lastNeed=p-2),p):--s<i||-2===p?0:(p=utf8CheckByte(n[s]))>=0?(p>0&&(2===p?p=0:t.lastNeed=p-3),p):0}function utf8CheckExtraBytes(t,n,i){if((192&n[0])!=128)return t.lastNeed=0,"�";if(t.lastNeed>1&&n.length>1){if((192&n[1])!=128)return t.lastNeed=1,"�";if(t.lastNeed>2&&n.length>2&&(192&n[2])!=128)return t.lastNeed=2,"�"}}function utf8FillLast(t){var n=this.lastTotal-this.lastNeed,i=utf8CheckExtraBytes(this,t,n);return void 0!==i?i:this.lastNeed<=t.length?(t.copy(this.lastChar,n,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):void(t.copy(this.lastChar,n,0,t.length),this.lastNeed-=t.length)}function utf8Text(t,n){var i=utf8CheckIncomplete(this,t,n);if(!this.lastNeed)return t.toString("utf8",n);this.lastTotal=i;var s=t.length-(i-this.lastNeed);return t.copy(this.lastChar,0,s),t.toString("utf8",n,s)}function utf8End(t){var n=t&&t.length?this.write(t):"";return this.lastNeed?n+"�":n}function utf16Text(t,n){if((t.length-n)%2==0){var i=t.toString("utf16le",n);if(i){var s=i.charCodeAt(i.length-1);if(s>=55296&&s<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],i.slice(0,-1)}return i}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",n,t.length-1)}function utf16End(t){var n=t&&t.length?this.write(t):"";if(this.lastNeed){var i=this.lastTotal-this.lastNeed;return n+this.lastChar.toString("utf16le",0,i)}return n}function base64Text(t,n){var i=(t.length-n)%3;return 0===i?t.toString("base64",n):(this.lastNeed=3-i,this.lastTotal=3,1===i?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",n,t.length-i))}function base64End(t){var n=t&&t.length?this.write(t):"";return this.lastNeed?n+this.lastChar.toString("base64",0,3-this.lastNeed):n}function simpleWrite(t){return t.toString(this.encoding)}function simpleEnd(t){return t&&t.length?this.write(t):""}n.s=StringDecoder,StringDecoder.prototype.write=function(t){var n,i;if(0===t.length)return"";if(this.lastNeed){if(void 0===(n=this.fillLast(t)))return"";i=this.lastNeed,this.lastNeed=0}else i=0;return i<t.length?n?n+this.text(t,i):this.text(t,i):n||""},StringDecoder.prototype.end=utf8End,StringDecoder.prototype.text=utf8Text,StringDecoder.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length}},769:function(t){function deprecate(t,n){if(config("noDeprecation"))return t;var i=!1;return function(){if(!i){if(config("throwDeprecation"))throw Error(n);config("traceDeprecation")?console.trace(n):console.warn(n),i=!0}return t.apply(this,arguments)}}function config(t){try{if(!i.g.localStorage)return!1}catch(t){return!1}var n=i.g.localStorage[t];return null!=n&&"true"===String(n).toLowerCase()}t.exports=deprecate},911:function(t){t.exports=extend;var n=Object.prototype.hasOwnProperty;function extend(){for(var t={},i=0;i<arguments.length;i++){var s=arguments[i];for(var p in s)n.call(s,p)&&(t[p]=s[p])}return t}},300:function(t){"use strict";
15t.exports=i(48764)},361:function(t){"use strict";t.exports=i(17187)},781:function(t){"use strict";t.exports=i(79681)},310:function(t){"use strict";t.exports=i(11987)},837:function(t){"use strict";t.exports=i(89539)}},b={};function __nccwpck_require__(t){var i=b[t];if(void 0!==i)return i.exports;var s=b[t]={exports:{}},p=!0;try{n[t](s,s.exports,__nccwpck_require__),p=!1}finally{p&&delete b[t]}return s.exports}__nccwpck_require__.ab="//";var g=__nccwpck_require__(813);t.exports=g}()},24244:function(t){"use strict";var numberIsNaN=function(t){return t!=t};t.exports=function(t,n){return 0===t&&0===n?1/t==1/n:!!(t===n||numberIsNaN(t)&&numberIsNaN(n))}},20609:function(t,n,i){"use strict";var s=i(4289),p=i(55559),b=i(24244),g=i(75624),y=i(52281),m=p(g(),Object);s(m,{getPolyfill:g,implementation:b,shim:y}),t.exports=m},75624:function(t,n,i){"use strict";var s=i(24244);t.exports=function(){return"function"==typeof Object.is?Object.is:s}},52281:function(t,n,i){"use strict";var s=i(75624),p=i(4289);t.exports=function(){var t=s();return p(Object,{is:t},{is:function(){return Object.is!==t}}),t}},18987:function(t,n,i){"use strict";var s;if(!Object.keys){var p=Object.prototype.hasOwnProperty,b=Object.prototype.toString,g=i(21414),y=Object.prototype.propertyIsEnumerable,m=!y.call({toString:null},"toString"),_=y.call(function(){},"prototype"),v=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],equalsConstructorPrototype=function(t){var n=t.constructor;return n&&n.prototype===t},w={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},S=function(){if("undefined"==typeof window)return!1;for(var t in window)try{if(!w["$"+t]&&p.call(window,t)&&null!==window[t]&&"object"==typeof window[t])try{equalsConstructorPrototype(window[t])}catch(t){return!0}}catch(t){return!0}return!1}(),equalsConstructorPrototypeIfNotBuggy=function(t){if("undefined"==typeof window||!S)return equalsConstructorPrototype(t);try{return equalsConstructorPrototype(t)}catch(t){return!1}};s=function(t){var n=null!==t&&"object"==typeof t,i="[object Function]"===b.call(t),s=g(t),y=n&&"[object String]"===b.call(t),w=[];if(!n&&!i&&!s)throw TypeError("Object.keys called on a non-object");var S=_&&i;if(y&&t.length>0&&!p.call(t,0))for(var R=0;R<t.length;++R)w.push(String(R));if(s&&t.length>0)for(var T=0;T<t.length;++T)w.push(String(T));else for(var x in t)!(S&&"prototype"===x)&&p.call(t,x)&&w.push(String(x));if(m)for(var A=equalsConstructorPrototypeIfNotBuggy(t),k=0;k<v.length;++k)!(A&&"constructor"===v[k])&&p.call(t,v[k])&&w.push(v[k]);return w}}t.exports=s},82215:function(t,n,i){"use strict";var s=Array.prototype.slice,p=i(21414),b=Object.keys,g=b?function(t){return b(t)}:i(18987),y=Object.keys;g.shim=function(){return Object.keys?!function(){var t=Object.keys(arguments);return t&&t.length===arguments.length}(1,2)&&(Object.keys=function(t){return p(t)?y(s.call(t)):y(t)}):Object.keys=g,Object.keys||g},t.exports=g},21414:function(t){"use strict";var n=Object.prototype.toString;t.exports=function(t){var i=n.call(t),s="[object Arguments]"===i;return s||(s="[object Array]"!==i&&null!==t&&"object"==typeof t&&"number"==typeof t.length&&t.length>=0&&"[object Function]"===n.call(t.callee)),s}},30778:function(t,n,i){var s=i(52479);function once(t){var f=function(){return f.called?f.value:(f.called=!0,f.value=t.apply(this,arguments))};return f.called=!1,f}function onceStrict(t){var f=function(){if(f.called)throw Error(f.onceError);return f.called=!0,f.value=t.apply(this,arguments)},n=t.name||"Function wrapped with `once`";return f.onceError=n+" shouldn't be called more than once",f.called=!1,f}t.exports=s(once),t.exports.strict=s(onceStrict),once.proto=once(function(){Object.defineProperty(Function.prototype,"once",{value:function(){return once(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return onceStrict(this)},configurable:!0})})},74286:function(t,n,i){var s,p=i(34155),b=i(30778),g=i(12840);try{s=i(71156)}catch(t){}var noop=function(){},y=/^v?\.0/.test(p.version),isFn=function(t){return"function"==typeof t},destroyer=function(t,n,i,p){p=b(p);var m=!1;t.on("close",function(){m=!0}),g(t,{readable:n,writable:i},function(t){if(t)return p(t);m=!0,p()});var _=!1;return function(n){if(!m&&!_){if(_=!0,y&&s&&(t instanceof(s.ReadStream||noop)||t instanceof(s.WriteStream||noop))&&isFn(t.close))return t.close(noop);if(t.setHeader&&isFn(t.abort))return t.abort();if(isFn(t.destroy))return t.destroy();p(n||Error("stream was destroyed"))}}},call=function(t){t()},pipe=function(t,n){return t.pipe(n)};t.exports=function(){var t,n=Array.prototype.slice.call(arguments),i=isFn(n[n.length-1]||noop)&&n.pop()||noop;if(Array.isArray(n[0])&&(n=n[0]),n.length<2)throw Error("pump requires two streams per minimum");var s=n.map(function(p,b){var g=b<n.length-1;return destroyer(p,g,b>
150,function(n){t||(t=n),n&&s.forEach(call),g||(s.forEach(call),i(t))})});return n.reduce(pipe)}},61798:function(t,n,i){"use strict";var s=i(34155);function oldBrowser(){throw Error("Secure random number generation is not supported by this browser.\nUse Chrome, Firefox or Internet Explorer 11")}var p=i(89509).Buffer,b=i.g.crypto||i.g.msCrypto;function randomBytes(t,n){if(t>4294967295)throw RangeError("requested too many random bytes");var i=p.allocUnsafe(t);if(t>0){if(t>65536)for(var g=0;g<t;g+=65536)b.getRandomValues(i.slice(g,g+65536));else b.getRandomValues(i)}return"function"==typeof n?s.nextTick(function(){n(null,i)}):i}b&&b.getRandomValues?t.exports=randomBytes:t.exports=oldBrowser},94281:function(t){"use strict";function _inheritsLoose(t,n){t.prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n}var n={};function createErrorType(t,i,s){function getMessage(t,n,s){return"string"==typeof i?i:i(t,n,s)}s||(s=Error);var p=function(t){function NodeError(n,i,s){return t.call(this,getMessage(n,i,s))||this}return _inheritsLoose(NodeError,t),NodeError}(s);p.prototype.name=s.name,p.prototype.code=t,n[t]=p}function oneOf(t,n){if(!Array.isArray(t))return"of ".concat(n," ").concat(String(t));var i=t.length;return(t=t.map(function(t){return String(t)}),i>2)?"one of ".concat(n," ").concat(t.slice(0,i-1).join(", "),", or ")+t[i-1]:2===i?"one of ".concat(n," ").concat(t[0]," or ").concat(t[1]):"of ".concat(n," ").concat(t[0])}function startsWith(t,n,i){return t.substr(!i||i<0?0:+i,n.length)===n}function endsWith(t,n,i){return(void 0===i||i>t.length)&&(i=t.length),t.substring(i-n.length,i)===n}function includes(t,n,i){return"number"!=typeof i&&(i=0),!(i+n.length>t.length)&&-1!==t.indexOf(n,i)}createErrorType("ERR_INVALID_OPT_VALUE",function(t,n){return'The value "'+n+'" is invalid for option "'+t+'"'},TypeError),createErrorType("ERR_INVALID_ARG_TYPE",function(t,n,i){if("string"==typeof n&&startsWith(n,"not ")?(s="must not be",n=n.replace(/^not /,"")):s="must be",endsWith(t," argument"))p="The ".concat(t," ").concat(s," ").concat(oneOf(n,"type"));else{var s,p,b=includes(t,".")?"property":"argument";p='The "'.concat(t,'" ').concat(b," ").concat(s," ").concat(oneOf(n,"type"))}return p+". Received type ".concat(typeof i)},TypeError),createErrorType("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),createErrorType("ERR_METHOD_NOT_IMPLEMENTED",function(t){return"The "+t+" method is not implemented"}),createErrorType("ERR_STREAM_PREMATURE_CLOSE","Premature close"),createErrorType("ERR_STREAM_DESTROYED",function(t){return"Cannot call "+t+" after a stream was destroyed"}),createErrorType("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),createErrorType("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),createErrorType("ERR_STREAM_WRITE_AFTER_END","write after end"),createErrorType("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),createErrorType("ERR_UNKNOWN_ENCODING",function(t){return"Unknown encoding: "+t},TypeError),createErrorType("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),t.exports.q=n},56753:function(t,n,i){"use strict";var s=i(34155),p=Object.keys||function(t){var n=[];for(var i in t)n.push(i);return n};t.exports=Duplex;var b=i(79481),g=i(64229);i(35717)(Duplex,b);for(var y=p(g.prototype),m=0;m<y.length;m++){var _=y[m];Duplex.prototype[_]||(Duplex.prototype[_]=g.prototype[_])}function Duplex(t){if(!(this instanceof Duplex))return new Duplex(t);b.call(this,t),g.call(this,t),this.allowHalfOpen=!0,t&&(!1===t.readable&&(this.readable=!1),!1===t.writable&&(this.writable=!1),!1===t.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",onend)))}function onend(){this._writableState.ended||s.nextTick(onEndNT,this)}function onEndNT(t){t.end()}Object.defineProperty(Duplex.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(Duplex.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(Duplex.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(Duplex.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&this._readableState.destroyed&&this._writableState.destroyed},set:function(t){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=t,this._writableState.destroyed=t)}})},82725:function(t,n,i){"use strict";
15t.exports=PassThrough;var s=i(74605);function PassThrough(t){if(!(this instanceof PassThrough))return new PassThrough(t);s.call(this,t)}i(35717)(PassThrough,s),PassThrough.prototype._transform=function(t,n,i){i(null,t)}},79481:function(t,n,i){"use strict";var s,p,b,g,y,m=i(34155);t.exports=Readable,Readable.ReadableState=ReadableState,i(17187).EventEmitter;var EElistenerCount=function(t,n){return t.listeners(n).length},_=i(22503),v=i(48764).Buffer,w=(void 0!==i.g?i.g:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};function _uint8ArrayToBuffer(t){return v.from(t)}function _isUint8Array(t){return v.isBuffer(t)||t instanceof w}var S=i(94616);p=S&&S.debuglog?S.debuglog("stream"):function(){};var R=i(57327),T=i(61195),x=i(82457).getHighWaterMark,A=i(94281).q,k=A.ERR_INVALID_ARG_TYPE,O=A.ERR_STREAM_PUSH_AFTER_EOF,P=A.ERR_METHOD_NOT_IMPLEMENTED,C=A.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;i(35717)(Readable,_);var I=T.errorOrDestroy,L=["error","close","destroy","pause","resume"];function prependListener(t,n,i){if("function"==typeof t.prependListener)return t.prependListener(n,i);t._events&&t._events[n]?Array.isArray(t._events[n])?t._events[n].unshift(i):t._events[n]=[i,t._events[n]]:t.on(n,i)}function ReadableState(t,n,p){s=s||i(56753),t=t||{},"boolean"!=typeof p&&(p=n instanceof s),this.objectMode=!!t.objectMode,p&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=x(this,t,"readableHighWaterMark",p),this.buffer=new R,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(b||(b=i(32553).StringDecoder),this.decoder=new b(t.encoding),this.encoding=t.encoding)}function Readable(t){if(s=s||i(56753),!(this instanceof Readable))return new Readable(t);var n=this instanceof s;this._readableState=new ReadableState(t,this,n),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),_.call(this)}function readableAddChunk(t,n,i,s,b){p("readableAddChunk",n);var g,y=t._readableState;if(null===n)y.reading=!1,onEofChunk(t,y);else if(b||(g=chunkInvalid(y,n)),g)I(t,g);else if(y.objectMode||n&&n.length>0){if("string"==typeof n||y.objectMode||Object.getPrototypeOf(n)===v.prototype||(n=_uint8ArrayToBuffer(n)),s)y.endEmitted?I(t,new C):addChunk(t,y,n,!0);else if(y.ended)I(t,new O);else{if(y.destroyed)return!1;y.reading=!1,y.decoder&&!i?(n=y.decoder.write(n),y.objectMode||0!==n.length?addChunk(t,y,n,!1):maybeReadMore(t,y)):addChunk(t,y,n,!1)}}else s||(y.reading=!1,maybeReadMore(t,y));return!y.ended&&(y.length<y.highWaterMark||0===y.length)}function addChunk(t,n,i,s){n.flowing&&0===n.length&&!n.sync?(n.awaitDrain=0,t.emit("data",i)):(n.length+=n.objectMode?1:i.length,s?n.buffer.unshift(i):n.buffer.push(i),n.needReadable&&emitReadable(t)),maybeReadMore(t,n)}function chunkInvalid(t,n){var i;return _isUint8Array(n)||"string"==typeof n||void 0===n||t.objectMode||(i=new k("chunk",["string","Buffer","Uint8Array"],n)),i}function computeNewHighWaterMark(t){return t>=1073741824?t=1073741824:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}function howMuchToRead(t,n){return t<=0||0===n.length&&n.ended?0:n.objectMode?1:t!=t?n.flowing&&n.length?n.buffer.head.data.length:n.length:(t>n.highWaterMark&&(n.highWaterMark=computeNewHighWaterMark(t)),t<=n.length)?t:n.ended?n.length:(n.needReadable=!0,0)}function onEofChunk(t,n){if(p("onEofChunk"),!n.ended){if(n.decoder){var i=n.decoder.end();i&&i.length&&(n.buffer.push(i),n.length+=n.objectMode?1:i.length)}n.ended=!0,n.sync?emitReadable(t):(n.needReadable=!1,n.emittedReadable||(n.emittedReadable=!0,emitReadable_(t)))}}function emitReadable(t){var n=t._readableState;p("emitReadable",n.needReadable,n.emittedReadable),n.needReadable=!1,n.emittedReadable||(p("emitReadable",n.flowing),n.emittedReadable=!0,m.nextTick(emitReadable_,t))}function emitReadable_(t){var n=t._readableState;p("emitReadable_",n.destroyed,n.length,n.ended),!n.destroyed&&(n.length||n.ended)&&(t.emit("readable"),n.emittedReadable=!1),n.needReadable=!n.flowing&&!n.ended&&n.length<=n.highWaterMark,flow(t)}function maybeReadMore(t,n){n.readingMore||(n.readingMore=!0,m.nextTick(maybeReadMore_,t,n))}function maybeReadMore_(t,n){for(;!n.reading&&!n.ended&&(n.length<n.highWaterMark||n.flowing&&0===n.length);){var i=n.length;if(p("maybeReadMore read 0"),t.read(0),i===n.length)break}n.readingMore=!1}function pipeOnDrain(t){return function(){var n=t._readableState;p("pipeOnDrain",n.awaitDrain),n.awaitDrain&&n.awaitDrain--,0===n.awaitDrain&&EElistenerCount(t,"data")&&(n.flowing=!0,flow(t))}}function updateReadableListening(t){var n=t._readableState;n.readableListening=t.listenerCount("readable")>0,n.resumeScheduled&&!n.paused?n.flowing=!0:t.listenerCount("data")>0&&t.resume()}function nReadingNextTick(t){p("readable nexttick read 0"),t.read(0)}function resume(t,n){n.resumeScheduled||(n.resumeScheduled=!0,m.nextTick(resume_,t,n))}function resume_(t,n){p("resume",n.reading),n.reading||t.read(0),n.resumeScheduled=!1,t.emit("resume"),flow(t),n.flowing&&!n.reading&&t.read(0)}function flow(t){var n=t._readableState;for(p("flow",n.flowing);n.flowing&&null!==t.read(););}function fromList(t,n){var i;return 0===n.length?null:(n.objectMode?i=n.buffer.shift():!t||t>=n.length?(i=n.decoder?n.buffer.join(""):1===n.buffer.length?n.buffer.first():n.buffer.concat(n.length),n.buffer.clear()):i=n.buffer.consume(t,n.decoder),i)}function endReadable(t){var n=t._readableState;p("endReadable",n.endEmitted),n.endEmitted||(n.ended=!0,m.nextTick(endReadableNT,n,t))}function endReadableNT(t,n){if(p("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&0===t.length&&(t.endEmitted=!0,n.readable=!1,n.emit("end"),t.autoDestroy)){var i=n._writableState;(!i||i.autoDestroy&&i.finished)&&n.destroy()}}function indexOf(t,n){for(var i=0,s=t.length;i<s;i++)if(t[i]===n)return i;return -1}Object.defineProperty(Readable.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}}),Readable.prototype.destroy=T.destroy,Readable.prototype._undestroy=T.undestroy,Readable.prototype._destroy=function(t,n){n(t)},Readable.prototype.push=function(t,n){var i,s=this._readableState;return s.objectMode?i=!0:"string"==typeof t&&((n=n||s.defaultEncoding)!==s.encoding&&(t=v.from(t,n),n=""),i=!0),readableAddChunk(this,t,n,!1,i)},Readable.prototype.unshift=function(t){return readableAddChunk(this,t,null,!0,!1)},Readable.prototype.isPaused=function(){return!1===this._readableState.flowing},Readable.prototype.setEncoding=function(t){b||(b=i(32553).StringDecoder);var n=new b(t);this._readableState.decoder=n,this._readableState.encoding=this._readableState.decoder.encoding;
vendor: 4,561 bytes, line 15
15for(var s=this._readableState.buffer.head,p="";null!==s;)p+=n.write(s.data),s=s.next;return this._readableState.buffer.clear(),""!==p&&this._readableState.buffer.push(p),this._readableState.length=p.length,this},Readable.prototype.read=function(t){p("read",t),t=parseInt(t,10);var n,i=this._readableState,s=t;if(0!==t&&(i.emittedReadable=!1),0===t&&i.needReadable&&((0!==i.highWaterMark?i.length>=i.highWaterMark:i.length>0)||i.ended))return p("read: emitReadable",i.length,i.ended),0===i.length&&i.ended?endReadable(this):emitReadable(this),null;if(0===(t=howMuchToRead(t,i))&&i.ended)return 0===i.length&&endReadable(this),null;var b=i.needReadable;return p("need readable",b),(0===i.length||i.length-t<i.highWaterMark)&&p("length less than watermark",b=!0),i.ended||i.reading?p("reading or ended",b=!1):b&&(p("do read"),i.reading=!0,i.sync=!0,0===i.length&&(i.needReadable=!0),this._read(i.highWaterMark),i.sync=!1,i.reading||(t=howMuchToRead(s,i))),null===(n=t>0?fromList(t,i):null)?(i.needReadable=i.length<=i.highWaterMark,t=0):(i.length-=t,i.awaitDrain=0),0===i.length&&(i.ended||(i.needReadable=!0),s!==t&&i.ended&&endReadable(this)),null!==n&&this.emit("data",n),n},Readable.prototype._read=function(t){I(this,new P("_read()"))},Readable.prototype.pipe=function(t,n){var i=this,s=this._readableState;switch(s.pipesCount){case 0:s.pipes=t;break;case 1:s.pipes=[s.pipes,t];break;default:s.pipes.push(t)}s.pipesCount+=1,p("pipe count=%d opts=%j",s.pipesCount,n);var b=n&&!1===n.end||t===m.stdout||t===m.stderr?unpipe:onend;function onunpipe(t,n){p("onunpipe"),t===i&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,cleanup())}function onend(){p("onend"),t.end()}s.endEmitted?m.nextTick(b):i.once("end",b),t.on("unpipe",onunpipe);var g=pipeOnDrain(i);t.on("drain",g);var y=!1;function cleanup(){p("cleanup"),t.removeListener("close",onclose),t.removeListener("finish",onfinish),t.removeListener("drain",g),t.removeListener("error",onerror),t.removeListener("unpipe",onunpipe),i.removeListener("end",onend),i.removeListener("end",unpipe),i.removeListener("data",ondata),y=!0,s.awaitDrain&&(!t._writableState||t._writableState.needDrain)&&g()}function ondata(n){p("ondata");var b=t.write(n);p("dest.write",b),!1===b&&((1===s.pipesCount&&s.pipes===t||s.pipesCount>1&&-1!==indexOf(s.pipes,t))&&!y&&(p("false write response, pause",s.awaitDrain),s.awaitDrain++),i.pause())}function onerror(n){p("onerror",n),unpipe(),t.removeListener("error",onerror),0===EElistenerCount(t,"error")&&I(t,n)}function onclose(){t.removeListener("finish",onfinish),unpipe()}function onfinish(){p("onfinish"),t.removeListener("close",onclose),unpipe()}function unpipe(){p("unpipe"),i.unpipe(t)}return i.on("data",ondata),prependListener(t,"error",onerror),t.once("close",onclose),t.once("finish",onfinish),t.emit("pipe",i),s.flowing||(p("pipe resume"),i.resume()),t},Readable.prototype.unpipe=function(t){var n=this._readableState,i={hasUnpiped:!1};if(0===n.pipesCount)return this;if(1===n.pipesCount)return t&&t!==n.pipes||(t||(t=n.pipes),n.pipes=null,n.pipesCount=0,n.flowing=!1,t&&t.emit("unpipe",this,i)),this;if(!t){var s=n.pipes,p=n.pipesCount;n.pipes=null,n.pipesCount=0,n.flowing=!1;for(var b=0;b<p;b++)s[b].emit("unpipe",this,{hasUnpiped:!1});return this}var g=indexOf(n.pipes,t);return -1===g||(n.pipes.splice(g,1),n.pipesCount-=1,1===n.pipesCount&&(n.pipes=n.pipes[0]),t.emit("unpipe",this,i)),this},Readable.prototype.on=function(t,n){var i=_.prototype.on.call(this,t,n),s=this._readableState;return"data"===t?(s.readableListening=this.listenerCount("readable")>0,!1!==s.flowing&&this.resume()):"readable"!==t||s.endEmitted||s.readableListening||(s.readableListening=s.needReadable=!0,s.flowing=!1,s.emittedReadable=!1,p("on readable",s.length,s.reading),s.length?emitReadable(this):s.reading||m.nextTick(nReadingNextTick,this)),i},Readable.prototype.addListener=Readable.prototype.on,Readable.prototype.removeListener=function(t,n){var i=_.prototype.removeListener.call(this,t,n);return"readable"===t&&m.nextTick(updateReadableListening,this),i},Readable.prototype.removeAllListeners=function(t){var n=_.prototype.removeAllListeners.apply(this,arguments);return("readable"===t||void 0===t)&&m.nextTick(updateReadableListening,this),n},Readable.prototype.resume=function(){var t=this._readableState;return t.flowing||(p("resume"),t.flowing=!t.readableListening,resume(this,t)),t.paused=!1,this},Readable.prototype.pause=function(){return p("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(p("pause"),this._readableState.flowing=!1,this.emit
vendor: 4,221 bytes, line 15
15("pause")),this._readableState.paused=!0,this},Readable.prototype.wrap=function(t){var n=this,i=this._readableState,s=!1;for(var b in t.on("end",function(){if(p("wrapped end"),i.decoder&&!i.ended){var t=i.decoder.end();t&&t.length&&n.push(t)}n.push(null)}),t.on("data",function(b){p("wrapped data"),i.decoder&&(b=i.decoder.write(b)),(!i.objectMode||null!=b)&&(i.objectMode||b&&b.length)&&(n.push(b)||(s=!0,t.pause()))}),t)void 0===this[b]&&"function"==typeof t[b]&&(this[b]=function(n){return function(){return t[n].apply(t,arguments)}}(b));for(var g=0;g<L.length;g++)t.on(L[g],this.emit.bind(this,L[g]));return this._read=function(n){p("wrapped _read",n),s&&(s=!1,t.resume())},this},"function"==typeof Symbol&&(Readable.prototype[Symbol.asyncIterator]=function(){return void 0===g&&(g=i(45850)),g(this)}),Object.defineProperty(Readable.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(Readable.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(Readable.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(t){this._readableState&&(this._readableState.flowing=t)}}),Readable._fromList=fromList,Object.defineProperty(Readable.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(Readable.from=function(t,n){return void 0===y&&(y=i(15167)),y(Readable,t,n)})},74605:function(t,n,i){"use strict";t.exports=Transform;var s=i(94281).q,p=s.ERR_METHOD_NOT_IMPLEMENTED,b=s.ERR_MULTIPLE_CALLBACK,g=s.ERR_TRANSFORM_ALREADY_TRANSFORMING,y=s.ERR_TRANSFORM_WITH_LENGTH_0,m=i(56753);function afterTransform(t,n){var i=this._transformState;i.transforming=!1;var s=i.writecb;if(null===s)return this.emit("error",new b);i.writechunk=null,i.writecb=null,null!=n&&this.push(n),s(t);var p=this._readableState;p.reading=!1,(p.needReadable||p.length<p.highWaterMark)&&this._read(p.highWaterMark)}function Transform(t){if(!(this instanceof Transform))return new Transform(t);m.call(this,t),this._transformState={afterTransform:afterTransform.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&("function"==typeof t.transform&&(this._transform=t.transform),"function"==typeof t.flush&&(this._flush=t.flush)),this.on("prefinish",prefinish)}function prefinish(){var t=this;"function"!=typeof this._flush||this._readableState.destroyed?done(this,null,null):this._flush(function(n,i){done(t,n,i)})}function done(t,n,i){if(n)return t.emit("error",n);if(null!=i&&t.push(i),t._writableState.length)throw new y;if(t._transformState.transforming)throw new g;return t.push(null)}i(35717)(Transform,m),Transform.prototype.push=function(t,n){return this._transformState.needTransform=!1,m.prototype.push.call(this,t,n)},Transform.prototype._transform=function(t,n,i){i(new p("_transform()"))},Transform.prototype._write=function(t,n,i){var s=this._transformState;if(s.writecb=i,s.writechunk=t,s.writeencoding=n,!s.transforming){var p=this._readableState;(s.needTransform||p.needReadable||p.length<p.highWaterMark)&&this._read(p.highWaterMark)}},Transform.prototype._read=function(t){var n=this._transformState;null===n.writechunk||n.transforming?n.needTransform=!0:(n.transforming=!0,this._transform(n.writechunk,n.writeencoding,n.afterTransform))},Transform.prototype._destroy=function(t,n){m.prototype._destroy.call(this,t,function(t){n(t)})}},64229:function(t,n,i){"use strict";var s,p,b=i(34155);function CorkedRequest(t){var n=this;this.next=null,this.entry=null,this.finish=function(){onCorkedFinish(n,t)}}t.exports=Writable,Writable.WritableState=WritableState;var g={deprecate:i(94927)},y=i(22503),m=i(48764).Buffer,_=(void 0!==i.g?i.g:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};function _uint8ArrayToBuffer(t){return m.from(t)}function _isUint8Array(t){return m.isBuffer(t)||t instanceof _}var v=i(61195),w=i(82457).getHighWaterMark,S=i(94281).q,R=S.ERR_INVALID_ARG_TYPE,T=S.ERR_METHOD_NOT_IMPLEMENT
vendor: 4,771 bytes, line 15
15ED,x=S.ERR_MULTIPLE_CALLBACK,A=S.ERR_STREAM_CANNOT_PIPE,k=S.ERR_STREAM_DESTROYED,O=S.ERR_STREAM_NULL_VALUES,P=S.ERR_STREAM_WRITE_AFTER_END,C=S.ERR_UNKNOWN_ENCODING,I=v.errorOrDestroy;function nop(){}function WritableState(t,n,p){s=s||i(56753),t=t||{},"boolean"!=typeof p&&(p=n instanceof s),this.objectMode=!!t.objectMode,p&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=w(this,t,"writableHighWaterMark",p),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var b=!1===t.decodeStrings;this.decodeStrings=!b,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){onwrite(n,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new CorkedRequest(this)}function Writable(t){var n=this instanceof(s=s||i(56753));if(!n&&!p.call(Writable,this))return new Writable(t);this._writableState=new WritableState(t,this,n),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),y.call(this)}function writeAfterEnd(t,n){var i=new P;I(t,i),b.nextTick(n,i)}function validChunk(t,n,i,s){var p;return null===i?p=new O:"string"==typeof i||n.objectMode||(p=new R("chunk",["string","Buffer"],i)),!p||(I(t,p),b.nextTick(s,p),!1)}function decodeChunk(t,n,i){return t.objectMode||!1===t.decodeStrings||"string"!=typeof n||(n=m.from(n,i)),n}function writeOrBuffer(t,n,i,s,p,b){if(!i){var g=decodeChunk(n,s,p);s!==g&&(i=!0,p="buffer",s=g)}var y=n.objectMode?1:s.length;n.length+=y;var m=n.length<n.highWaterMark;if(m||(n.needDrain=!0),n.writing||n.corked){var _=n.lastBufferedRequest;n.lastBufferedRequest={chunk:s,encoding:p,isBuf:i,callback:b,next:null},_?_.next=n.lastBufferedRequest:n.bufferedRequest=n.lastBufferedRequest,n.bufferedRequestCount+=1}else doWrite(t,n,!1,y,s,p,b);return m}function doWrite(t,n,i,s,p,b,g){n.writelen=s,n.writecb=g,n.writing=!0,n.sync=!0,n.destroyed?n.onwrite(new k("write")):i?t._writev(p,n.onwrite):t._write(p,b,n.onwrite),n.sync=!1}function onwriteError(t,n,i,s,p){--n.pendingcb,i?(b.nextTick(p,s),b.nextTick(finishMaybe,t,n),t._writableState.errorEmitted=!0,I(t,s)):(p(s),t._writableState.errorEmitted=!0,I(t,s),finishMaybe(t,n))}function onwriteStateUpdate(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}function onwrite(t,n){var i=t._writableState,s=i.sync,p=i.writecb;if("function"!=typeof p)throw new x;if(onwriteStateUpdate(i),n)onwriteError(t,i,s,n,p);else{var g=needFinish(i)||t.destroyed;g||i.corked||i.bufferProcessing||!i.bufferedRequest||clearBuffer(t,i),s?b.nextTick(afterWrite,t,i,g,p):afterWrite(t,i,g,p)}}function afterWrite(t,n,i,s){i||onwriteDrain(t,n),n.pendingcb--,s(),finishMaybe(t,n)}function onwriteDrain(t,n){0===n.length&&n.needDrain&&(n.needDrain=!1,t.emit("drain"))}function clearBuffer(t,n){n.bufferProcessing=!0;var i=n.bufferedRequest;if(t._writev&&i&&i.next){var s=Array(n.bufferedRequestCount),p=n.corkedRequestsFree;p.entry=i;for(var b=0,g=!0;i;)s[b]=i,i.isBuf||(g=!1),i=i.next,b+=1;s.allBuffers=g,doWrite(t,n,!0,n.length,s,"",p.finish),n.pendingcb++,n.lastBufferedRequest=null,p.next?(n.corkedRequestsFree=p.next,p.next=null):n.corkedRequestsFree=new CorkedRequest(n),n.bufferedRequestCount=0}else{for(;i;){var y=i.chunk,m=i.encoding,_=i.callback,v=n.objectMode?1:y.length;if(doWrite(t,n,!1,v,y,m,_),i=i.next,n.bufferedRequestCount--,n.writing)break}null===i&&(n.lastBufferedRequest=null)}n.bufferedRequest=i,n.bufferProcessing=!1}function needFinish(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function callFinal(t,n){t._final(function(i){n.pendingcb--,i&&I(t,i),n.prefinished=!0,t.emit("prefinish"),finishMaybe(t,n)})}function prefinish(t,n){n.prefinished||n.finalCalled||("function"!=typeof t._final||n.destroyed?(n.prefinished=!0,t.emit("prefinish")):(n.pendingcb++,n.finalCalled=!0,b.nextTick(callFinal,t,n)))}function finishMaybe(t,n){var i=needFinish(n);if(i&&(prefinish(t,n),0===n.pendingcb&&(n.finished=!0,t.emit("finish"),n.autoDestroy))){var s=t._readableState;(!s||s.autoDestroy&&s.endEmitted)&&t.destroy()}return i}function endWritable(t,n,i){n.ending=!0,finishMaybe(t,n),i&&(n.finished?b.nextTick(i):t.once("finish",i)),n.ended=!0,t.writable=!1}function onCorkedFinish(t,n,i){var s=t.entry;for(t.entry=null;s;){var p=s.callback;n.pendingcb--,p(i),s=s.next}n.corkedRequestsFree.next=t}
15i(35717)(Writable,y),WritableState.prototype.getBuffer=function(){for(var t=this.bufferedRequest,n=[];t;)n.push(t),t=t.next;return n},function(){try{Object.defineProperty(WritableState.prototype,"buffer",{get:g.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(p=Function.prototype[Symbol.hasInstance],Object.defineProperty(Writable,Symbol.hasInstance,{value:function(t){return!!p.call(this,t)||this===Writable&&t&&t._writableState instanceof WritableState}})):p=function(t){return t instanceof this},Writable.prototype.pipe=function(){I(this,new A)},Writable.prototype.write=function(t,n,i){var s=this._writableState,p=!1,b=!s.objectMode&&_isUint8Array(t);return b&&!m.isBuffer(t)&&(t=_uint8ArrayToBuffer(t)),"function"==typeof n&&(i=n,n=null),b?n="buffer":n||(n=s.defaultEncoding),"function"!=typeof i&&(i=nop),s.ending?writeAfterEnd(this,i):(b||validChunk(this,s,t,i))&&(s.pendingcb++,p=writeOrBuffer(this,s,b,t,n,i)),p},Writable.prototype.cork=function(){this._writableState.corked++},Writable.prototype.uncork=function(){var t=this._writableState;!t.corked||(t.corked--,t.writing||t.corked||t.bufferProcessing||!t.bufferedRequest||clearBuffer(this,t))},Writable.prototype.setDefaultEncoding=function(t){if("string"==typeof t&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new C(t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(Writable.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(Writable.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Writable.prototype._write=function(t,n,i){i(new T("_write()"))},Writable.prototype._writev=null,Writable.prototype.end=function(t,n,i){var s=this._writableState;return"function"==typeof t?(i=t,t=null,n=null):"function"==typeof n&&(i=n,n=null),null!=t&&this.write(t,n),s.corked&&(s.corked=1,this.uncork()),s.ending||endWritable(this,s,i),this},Object.defineProperty(Writable.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(Writable.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),Writable.prototype.destroy=v.destroy,Writable.prototype._undestroy=v.undestroy,Writable.prototype._destroy=function(t,n){n(t)}},45850:function(t,n,i){"use strict";var s,p=i(34155);function _defineProperty(t,n,i){return(n=_toPropertyKey(n))in t?Object.defineProperty(t,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[n]=i,t}function _toPropertyKey(t){var n=_toPrimitive(t,"string");return"symbol"==typeof n?n:String(n)}function _toPrimitive(t,n){if("object"!=typeof t||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var s=i.call(t,n||"default");if("object"!=typeof s)return s;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(t)}var b=i(8610),g=Symbol("lastResolve"),y=Symbol("lastReject"),m=Symbol("error"),_=Symbol("ended"),v=Symbol("lastPromise"),w=Symbol("handlePromise"),S=Symbol("stream");function createIterResult(t,n){return{value:t,done:n}}function readAndResolve(t){var n=t[g];if(null!==n){var i=t[S].read();null!==i&&(t[v]=null,t[g]=null,t[y]=null,n(createIterResult(i,!1)))}}function onReadable(t){p.nextTick(readAndResolve,t)}function wrapForNext(t,n){return function(i,s){t.then(function(){if(n[_]){i(createIterResult(void 0,!0));return}n[w](i,s)},s)}}var R=Object.getPrototypeOf(function(){}),T=Object.setPrototypeOf((_defineProperty(s={get stream(){return this[S]},next:function(){var t,n=this,i=this[m];if(null!==i)return Promise.reject(i);if(this[_])return Promise.resolve(createIterResult(void 0,!0));if(this[S].destroyed)return new Promise(function(t,i){p.nextTick(function(){n[m]?i(n[m]):t(createIterResult(void 0,!0))})});var s=this[v];
15if(s)t=new Promise(wrapForNext(s,this));else{var b=this[S].read();if(null!==b)return Promise.resolve(createIterResult(b,!1));t=new Promise(this[w])}return this[v]=t,t}},Symbol.asyncIterator,function(){return this}),_defineProperty(s,"return",function(){var t=this;return new Promise(function(n,i){t[S].destroy(null,function(t){if(t){i(t);return}n(createIterResult(void 0,!0))})})}),s),R);t.exports=function(t){var n,i=Object.create(T,(_defineProperty(n={},S,{value:t,writable:!0}),_defineProperty(n,g,{value:null,writable:!0}),_defineProperty(n,y,{value:null,writable:!0}),_defineProperty(n,m,{value:null,writable:!0}),_defineProperty(n,_,{value:t._readableState.endEmitted,writable:!0}),_defineProperty(n,w,{value:function(t,n){var s=i[S].read();s?(i[v]=null,i[g]=null,i[y]=null,t(createIterResult(s,!1))):(i[g]=t,i[y]=n)},writable:!0}),n));return i[v]=null,b(t,function(t){if(t&&"ERR_STREAM_PREMATURE_CLOSE"!==t.code){var n=i[y];null!==n&&(i[v]=null,i[g]=null,i[y]=null,n(t)),i[m]=t;return}var s=i[g];null!==s&&(i[v]=null,i[g]=null,i[y]=null,s(createIterResult(void 0,!0))),i[_]=!0}),t.on("readable",onReadable.bind(null,i)),i}},57327:function(t,n,i){"use strict";function ownKeys(t,n){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);n&&(s=s.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),i.push.apply(i,s)}return i}function _objectSpread(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?ownKeys(Object(i),!0).forEach(function(n){_defineProperty(t,n,i[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):ownKeys(Object(i)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(i,n))})}return t}function _defineProperty(t,n,i){return(n=_toPropertyKey(n))in t?Object.defineProperty(t,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[n]=i,t}function _classCallCheck(t,n){if(!(t instanceof n))throw TypeError("Cannot call a class as a function")}function _defineProperties(t,n){for(var i=0;i<n.length;i++){var s=n[i];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(t,_toPropertyKey(s.key),s)}}function _createClass(t,n,i){return n&&_defineProperties(t.prototype,n),i&&_defineProperties(t,i),Object.defineProperty(t,"prototype",{writable:!1}),t}function _toPropertyKey(t){var n=_toPrimitive(t,"string");return"symbol"==typeof n?n:String(n)}function _toPrimitive(t,n){if("object"!=typeof t||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var s=i.call(t,n||"default");if("object"!=typeof s)return s;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(t)}var s=i(48764).Buffer,p=i(52361).inspect,b=p&&p.custom||"inspect";function copyBuffer(t,n,i){s.prototype.copy.call(t,n,i)}t.exports=function(){function BufferList(){_classCallCheck(this,BufferList),this.head=null,this.tail=null,this.length=0}return _createClass(BufferList,[{key:"push",value:function(t){var n={data:t,next:null};this.length>0?this.tail.next=n:this.head=n,this.tail=n,++this.length}},{key:"unshift",value:function(t){var n={data:t,next:this.head};0===this.length&&(this.tail=n),this.head=n,++this.length}},{key:"shift",value:function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(t){if(0===this.length)return"";for(var n=this.head,i=""+n.data;n=n.next;)i+=t+n.data;return i}},{key:"concat",value:function(t){if(0===this.length)return s.alloc(0);for(var n=s.allocUnsafe(t>>>0),i=this.head,p=0;i;)copyBuffer(i.data,n,p),p+=i.data.length,i=i.next;return n}},{key:"consume",value:function(t,n){var i;return t<this.head.data.length?(i=this.head.data.slice(0,t),this.head.data=this.head.data.slice(t)):i=t===this.head.data.length?this.shift():n?this._getString(t):this._getBuffer(t),i}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(t){var n=this.head,i=1,s=n.data;for(t-=s.length;n=n.next;){var p=n.data,b=t>p.length?p.length:t;if(b===p.length?s+=p:s+=p.slice(0,t),0==(t-=b)){b===p.length?(++i,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=p.slice(b));break}++i}return this.length-=i,s}},{key:"_getBuffer",value:function(t){var n=s.allocUnsafe(t),i=this.head,p=1;for(i.data.copy(n),t-=i.data.length;i=i.next;){var b=i.data,g=t>b.length?b.length:t;if(b.copy(n,n.length-t,0,g),0==(t-=g)){g===b.length?(++p,i.next?this.head=i.next:this.head=this.tail=null):(this.head=i,i.data=b.slice(g));break}++p}return this.length-=p,n}},{key:b,value:function(t,n){return p(this,_objectSpread(_objectSpread({},n),{},{depth:0,customInspect:!1}))}}]),BufferList}()},61195:function(t,n,i){"use strict";var s=i(34155);function destroy(t,n){var i=this,p=this._readableState&&this._readableState.destroyed,b=this._writableState&&this._writableState.destroyed;return p||b?n?n(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,s.nextTick(emitErrorNT,this,t)):s.nextTick(emitErrorNT,this,t)):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(t){!n&&t?i._writableState?i._writableState.errorEmitted?s.nextTick(emitCloseNT,i):(i._writableState.errorEmitted=!0,s.nextTick(emitErrorAndCloseNT,i,t)):s.nextTick(emitErrorAndCloseNT,i,t):n?(s.nextTick(emitCloseNT,i),n(t)):s.nextTick(emitCloseNT,i)})),this}function emitErrorAndCloseNT(t,n){emitErrorNT(t,n),emitCloseNT(t)}function emitCloseNT(t){(!t._writableState||t._writableState.emitClose)&&(!t._readableState||t._readableState.emitClose)&&t.emit("close")}function undestroy(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function emitErrorNT(t,n){t.emit("error",n)}function errorOrDestroy(t,n){var i=t._readableState,s=t._writableState;i&&i.autoDestroy||s&&s.autoDestroy?t.destroy(n):t.emit("error",n)}
15t.exports={destroy:destroy,undestroy:undestroy,errorOrDestroy:errorOrDestroy}},8610:function(t,n,i){"use strict";var s=i(94281).q.ERR_STREAM_PREMATURE_CLOSE;function once(t){var n=!1;return function(){if(!n){n=!0;for(var i=arguments.length,s=Array(i),p=0;p<i;p++)s[p]=arguments[p];t.apply(this,s)}}}function noop(){}function isRequest(t){return t.setHeader&&"function"==typeof t.abort}function eos(t,n,i){if("function"==typeof n)return eos(t,null,n);n||(n={}),i=once(i||noop);var p=n.readable||!1!==n.readable&&t.readable,b=n.writable||!1!==n.writable&&t.writable,onlegacyfinish=function(){t.writable||onfinish()},g=t._writableState&&t._writableState.finished,onfinish=function(){b=!1,g=!0,p||i.call(t)},y=t._readableState&&t._readableState.endEmitted,onend=function(){p=!1,y=!0,b||i.call(t)},onerror=function(n){i.call(t,n)},onclose=function(){var n;return p&&!y?(t._readableState&&t._readableState.ended||(n=new s),i.call(t,n)):b&&!g?(t._writableState&&t._writableState.ended||(n=new s),i.call(t,n)):void 0},onrequest=function(){t.req.on("finish",onfinish)};return isRequest(t)?(t.on("complete",onfinish),t.on("abort",onclose),t.req?onrequest():t.on("request",onrequest)):b&&!t._writableState&&(t.on("end",onlegacyfinish),t.on("close",onlegacyfinish)),t.on("end",onend),t.on("finish",onfinish),!1!==n.error&&t.on("error",onerror),t.on("close",onclose),function(){t.removeListener("complete",onfinish),t.removeListener("abort",onclose),t.removeListener("request",onrequest),t.req&&t.req.removeListener("finish",onfinish),t.removeListener("end",onlegacyfinish),t.removeListener("close",onlegacyfinish),t.removeListener("finish",onfinish),t.removeListener("end",onend),t.removeListener("error",onerror),t.removeListener("close",onclose)}}t.exports=eos},15167:function(t){t.exports=function(){throw Error("Readable.from is not available in the browser")}},59946:function(t,n,i){"use strict";function once(t){var n=!1;return function(){n||(n=!0,t.apply(void 0,arguments))}}var s,p=i(94281).q,b=p.ERR_MISSING_ARGS,g=p.ERR_STREAM_DESTROYED;function noop(t){if(t)throw t}function isRequest(t){return t.setHeader&&"function"==typeof t.abort}function destroyer(t,n,p,b){b=once(b);var y=!1;t.on("close",function(){y=!0}),void 0===s&&(s=i(8610)),s(t,{readable:n,writable:p},function(t){if(t)return b(t);y=!0,b()});var m=!1;return function(n){if(!y&&!m){if(m=!0,isRequest(t))return t.abort();if("function"==typeof t.destroy)return t.destroy();b(n||new g("pipe"))}}}function call(t){t()}function pipe(t,n){return t.pipe(n)}function popCallback(t){return t.length&&"function"==typeof t[t.length-1]?t.pop():noop}function pipeline(){for(var t,n=arguments.length,i=Array(n),s=0;s<n;s++)i[s]=arguments[s];var p=popCallback(i);if(Array.isArray(i[0])&&(i=i[0]),i.length<2)throw new b("streams");var g=i.map(function(n,s){var b=s<i.length-1;return destroyer(n,b,s>0,function(n){t||(t=n),n&&g.forEach(call),b||(g.forEach(call),p(t))})});return i.reduce(pipe)}t.exports=pipeline},82457:function(t,n,i){"use strict";var s=i(94281).q.ERR_INVALID_OPT_VALUE;function highWaterMarkFrom(t,n,i){return null!=t.highWaterMark?t.highWaterMark:n?t[i]:null}function getHighWaterMark(t,n,i,p){var b=highWaterMarkFrom(n,p,i);if(null!=b){if(!(isFinite(b)&&Math.floor(b)===b)||b<0)throw new s(p?i:"highWaterMark",b);return Math.floor(b)}return t.objectMode?16:16384}t.exports={getHighWaterMark:getHighWaterMark}},22503:function(t,n,i){t.exports=i(17187).EventEmitter},88473:function(t,n,i){(n=t.exports=i(79481)).Stream=n,n.Readable=n,n.Writable=i(64229),n.Duplex=i(56753),n.Transform=i(74605),n.PassThrough=i(82725),n.finished=i(8610),n.pipeline=i(59946)},22257:function(t,n,i){let s=Symbol("SemVer ANY");let Comparator=class Comparator{static get ANY(){return s}constructor(t,n){if(n=p(n),t instanceof Comparator){if(!!n.loose===t.loose)return t;t=t.value}m("comparator",t=t.trim().split(/\s+/).join(" "),n),this.options=n,this.loose=!!n.loose,this.parse(t),this.semver===s?this.value="":this.value=this.operator+this.semver.version,m("comp",this)}parse(t){let n=this.options.loose?b[g.COMPARATORLOOSE]:b[g.COMPARATOR],i=t.match(n);if(!i)throw TypeError(`Invalid comparator: ${t}`);this.operator=void 0!==i[1]?i[1]:"","="===this.operator&&(this.operator=""),i[2]?this.semver=new _(i[2],this.options.loose):this.semver=s}toString(){return this.value}test(t){if(m("Comparator.test",t,this.options.loose),this.semver===s||t===s)return!0;
15if("string"==typeof t)try{t=new _(t,this.options)}catch(t){return!1}return y(t,this.operator,this.semver,this.options)}intersects(t,n){if(!(t instanceof Comparator))throw TypeError("a Comparator is required");return""===this.operator?""===this.value||new v(t.value,n).test(this.value):""===t.operator?""===t.value||new v(this.value,n).test(t.semver):!((n=p(n)).includePrerelease&&("<0.0.0-0"===this.value||"<0.0.0-0"===t.value)||!n.includePrerelease&&(this.value.startsWith("<0.0.0")||t.value.startsWith("<0.0.0")))&&!!(this.operator.startsWith(">")&&t.operator.startsWith(">")||this.operator.startsWith("<")&&t.operator.startsWith("<")||this.semver.version===t.semver.version&&this.operator.includes("=")&&t.operator.includes("=")||y(this.semver,"<",t.semver,n)&&this.operator.startsWith(">")&&t.operator.startsWith("<")||y(this.semver,">",t.semver,n)&&this.operator.startsWith("<")&&t.operator.startsWith(">"))}};t.exports=Comparator;let p=i(12893),{safeRe:b,t:g}=i(55765),y=i(7539),m=i(74225),_=i(26376),v=i(66902)},66902:function(t,n,i){let Range=class Range{constructor(t,n){if(n=b(n),t instanceof Range){if(!!n.loose===t.loose&&!!n.includePrerelease===t.includePrerelease)return t;return new Range(t.raw,n)}if(t instanceof g)return this.raw=t.value,this.set=[[t]],this.format(),this;if(this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease,this.raw=t.trim().split(/\s+/).join(" "),this.set=this.raw.split("||").map(t=>this.parseRange(t.trim())).filter(t=>t.length),!this.set.length)throw TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let t=this.set[0];if(this.set=this.set.filter(t=>!isNullSet(t[0])),0===this.set.length)this.set=[t];else if(this.set.length>1){for(let t of this.set)if(1===t.length&&isAny(t[0])){this.set=[t];break}}}this.format()}format(){return this.range=this.set.map(t=>t.join(" ").trim()).join("||").trim(),this.range}toString(){return this.range}parseRange(t){let n=(this.options.includePrerelease&&T)|(this.options.loose&&x),i=n+":"+t,s=p.get(i);if(s)return s;let b=this.options.loose,m=b?_[v.HYPHENRANGELOOSE]:_[v.HYPHENRANGE];y("hyphen replace",t=t.replace(m,hyphenReplace(this.options.includePrerelease))),y("comparator trim",t=t.replace(_[v.COMPARATORTRIM],w)),y("tilde trim",t=t.replace(_[v.TILDETRIM],S)),y("caret trim",t=t.replace(_[v.CARETTRIM],R));let A=t.split(" ").map(t=>parseComparator(t,this.options)).join(" ").split(/\s+/).map(t=>replaceGTE0(t,this.options));b&&(A=A.filter(t=>(y("loose invalid filter",t,this.options),!!t.match(_[v.COMPARATORLOOSE])))),y("range list",A);let k=new Map,O=A.map(t=>new g(t,this.options));for(let t of O){if(isNullSet(t))return[t];k.set(t.value,t)}k.size>1&&k.has("")&&k.delete("");let P=[...k.values()];return p.set(i,P),P}intersects(t,n){if(!(t instanceof Range))throw TypeError("a Range is required");return this.set.some(i=>isSatisfiable(i,n)&&t.set.some(t=>isSatisfiable(t,n)&&i.every(i=>t.every(t=>i.intersects(t,n)))))}test(t){if(!t)return!1;if("string"==typeof t)try{t=new m(t,this.options)}catch(t){return!1}for(let n=0;n<this.set.length;n++)if(testSet(this.set[n],t,this.options))return!0;return!1}};t.exports=Range;let s=i(96062),p=new s({max:1e3}),b=i(12893),g=i(22257),y=i(74225),m=i(26376),{safeRe:_,t:v,comparatorTrimReplace:w,tildeTrimReplace:S,caretTrimReplace:R}=i(55765),{FLAG_INCLUDE_PRERELEASE:T,FLAG_LOOSE:x}=i(83295),isNullSet=t=>"<0.0.0-0"===t.value,isAny=t=>""===t.value,isSatisfiable=(t,n)=>{let i=!0,s=t.slice(),p=s.pop();for(;i&&s.length;)i=s.every(t=>p.intersects(t,n)),p=s.pop();return i},parseComparator=(t,n)=>(y("comp",t,n),y("caret",t=replaceCarets(t,n)),y("tildes",t=replaceTildes(t,n)),y("xrange",t=replaceXRanges(t,n)),y("stars",t=replaceStars(t,n)),t),isX=t=>!t||"x"===t.toLowerCase()||"*"===t,replaceTildes=(t,n)=>t.trim().split(/\s+/).map(t=>replaceTilde(t,n)).join(" "),replaceTilde=(t,n)=>{let i=n.loose?_[v.TILDELOOSE]:_[v.TILDE];return t.replace(i,(n,i,s,p,b)=>{let g;return y("tilde",t,n,i,s,p,b),isX(i)?g="":isX(s)?g=`>=${i}.0.0 <${+i+1}.0.0-0`:isX(p)?g=`>=${i}.${s}.0 <${i}.${+s+1}.0-0`:b?(y("replaceTilde pr",b),g=`>=${i}.${s}.${p}-${b} <${i}.${+s+1}.0-0`):g=`>=${i}.${s}.${p} <${i}.${+s+1}.0-0`,y("tilde return",g),g})},replaceCarets=(t,n)=>t.trim().split(/\s+/).map(t=>replaceCaret(t,n)).join(" "),replaceCaret=(t,n)=>{y("caret",t,n);let i=n.loose?_[v.CARETLOOSE]:_[v.CARET],s=n.includePrerelease?"-0":"";return t.replace(i,(n,i,p,b,g)=>{let m;return y("caret",t,n,i,p,b,g),isX(i)?m="":isX(p)?m=`>=${i}.0.0${s} <${+i+1}.0.0-0`:isX(b)?m="0"===i?`>=${i}.${p}.0${s} <${i}.${+p+1}.0-0`:`>=${i}.${p}.0${s} <${+i+1}.0.0-0`:g?(y("replaceCaret pr",g),m="0"===i?"0"===p?`>=${i}.${p}.${b}-${g} <${i}.${p}.${+b+1}-0`:`>=${i}.${p}.${b}-${g} <${i}.${+p+1}.0-0`:`>=${i}.${p}.${b}-${g} <${+i+1}.0.0-0`):(y("no pr"),m="0"===i?"0"===p?`>=${i}.${p}.${b}${s} <${i}.${p}.${+b+1}-0`:`>=${i}.${p}.${b}${s} <${i}.${+p+1}.0-0`:`>=${i}.${p}.${b} <${+i+1}.0.0-0`),y("caret return",m),m})},replaceXRanges=(t,n)=>(y("replaceXRanges",t,n),t.split(/\s+/).map(t=>replaceXRange(t,n)).join(" ")),replaceXRange=(t,n)=>{t=t.trim();let i=n.loose?_[v.XRANGELOOSE]:_[v.XRANGE];return t.replace(i,(i,s,p,b,g,m)=>{y("xRange",t,i,s,p,b,g,m);let _=isX(p),v=_||isX(b),w=v||isX(g);return"="===s&&w&&(s=""),m=n.includePrerelease?"-0":"",_?i=">"===s||"<"===s?"<0.0.0-0":"*":s&&w?(v&&(b=0),g=0,">"===s?(s=">=",v?(p=+p+1,b=0):b=+b+1,g=0):"<="===s&&(s="<",v?p=+p+1:b=+b+1),"<"===s&&(m="-0"),i=`${s+p}.${b}.${g}${m}`):v?i=`>=${p}.0.0${m} <${+p+1}.0.0-0`:w&&(i=`>=${p}.${b}.0${m} <${p}.${+b+1}.0-0`),y("xRange return",i),i})},replaceStars=(t,n)=>(y("replaceStars",t,n),t.trim().replace(_[v.STAR],"")),replaceGTE0=(t,n)=>(y("replaceGTE0",t,n),t.trim().replace(_[n.includePrerelease?v.GTE0PRE:v.GTE0],"")),hyphenReplace=t=>(n,i,s,p,b,g,y,m,_,v,w,S,R)=>
15(i=isX(s)?"":isX(p)?`>=${s}.0.0${t?"-0":""}`:isX(b)?`>=${s}.${p}.0${t?"-0":""}`:g?`>=${i}`:`>=${i}${t?"-0":""}`,m=isX(_)?"":isX(v)?`<${+_+1}.0.0-0`:isX(w)?`<${_}.${+v+1}.0-0`:S?`<=${_}.${v}.${w}-${S}`:t?`<${_}.${v}.${+w+1}-0`:`<=${m}`,`${i} ${m}`.trim()),testSet=(t,n,i)=>{for(let i=0;i<t.length;i++)if(!t[i].test(n))return!1;if(n.prerelease.length&&!i.includePrerelease){for(let i=0;i<t.length;i++)if(y(t[i].semver),t[i].semver!==g.ANY&&t[i].semver.prerelease.length>0){let s=t[i].semver;if(s.major===n.major&&s.minor===n.minor&&s.patch===n.patch)return!0}return!1}return!0}},26376:function(t,n,i){let s=i(74225),{MAX_LENGTH:p,MAX_SAFE_INTEGER:b}=i(83295),{safeRe:g,t:y}=i(55765),m=i(12893),{compareIdentifiers:_}=i(86742);let SemVer=class SemVer{constructor(t,n){if(n=m(n),t instanceof SemVer){if(!!n.loose===t.loose&&!!n.includePrerelease===t.includePrerelease)return t;t=t.version}else if("string"!=typeof t)throw TypeError(`Invalid version. Must be a string. Got type "${typeof t}".`);if(t.length>p)throw TypeError(`version is longer than ${p} characters`);s("SemVer",t,n),this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease;let i=t.trim().match(n.loose?g[y.LOOSE]:g[y.FULL]);if(!i)throw TypeError(`Invalid Version: ${t}`);if(this.raw=t,this.major=+i[1],this.minor=+i[2],this.patch=+i[3],this.major>b||this.major<0)throw TypeError("Invalid major version");if(this.minor>b||this.minor<0)throw TypeError("Invalid minor version");if(this.patch>b||this.patch<0)throw TypeError("Invalid patch version");i[4]?this.prerelease=i[4].split(".").map(t=>{if(/^[0-9]+$/.test(t)){let n=+t;if(n>=0&&n<b)return n}return t}):this.prerelease=[],this.build=i[5]?i[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(t){if(s("SemVer.compare",this.version,this.options,t),!(t instanceof SemVer)){if("string"==typeof t&&t===this.version)return 0;t=new SemVer(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}compareMain(t){return t instanceof SemVer||(t=new SemVer(t,this.options)),_(this.major,t.major)||_(this.minor,t.minor)||_(this.patch,t.patch)}comparePre(t){if(t instanceof SemVer||(t=new SemVer(t,this.options)),this.prerelease.length&&!t.prerelease.length)return -1;if(!this.prerelease.length&&t.prerelease.length)return 1;if(!this.prerelease.length&&!t.prerelease.length)return 0;let n=0;do{let i=this.prerelease[n],p=t.prerelease[n];if(s("prerelease compare",n,i,p),void 0===i&&void 0===p)return 0;if(void 0===p)return 1;if(void 0===i)return -1;if(i===p)continue;else return _(i,p)}while(++n)}compareBuild(t){t instanceof SemVer||(t=new SemVer(t,this.options));let n=0;do{let i=this.build[n],p=t.build[n];if(s("prerelease compare",n,i,p),void 0===i&&void 0===p)return 0;if(void 0===p)return 1;if(void 0===i)return -1;if(i===p)continue;else return _(i,p)}while(++n)}inc(t,n,i){switch(t){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",n,i);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",n,i);break;case"prepatch":this.prerelease.length=0,this.inc("patch",n,i),this.inc("pre",n,i);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",n,i),this.inc("pre",n,i);break;case"major":(0!==this.minor||0!==this.patch||0===this.prerelease.length)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(0!==this.patch||0===this.prerelease.length)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":{let t=Number(i)?1:0;if(!n&&!1===i)throw Error("invalid increment argument: identifier is empty");if(0===this.prerelease.length)this.prerelease=[t];else{let s=this.prerelease.length;for(;--s>=0;)"number"==typeof this.prerelease[s]&&(this.prerelease[s]++,s=-2);if(-1===s){if(n===this.prerelease.join(".")&&!1===i)throw Error("invalid increment argument: identifier already exists");this.prerelease.push(t)}}if(n){let s=[n,t];!1===i&&(s=[n]),0===_(this.prerelease[0],n)?isNaN(this.prerelease[1])&&(this.prerelease=s):this.prerelease=s}break}default:throw Error(`invalid increment argument: ${t}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};t.exports=SemVer},13507:function(t,n,i){let s=i(33959);t.exports=(t,n)=>{let i=s(t.trim().replace(/^[=v]+/,""),n);return i?i.version:null}},7539:function(t,n,i){let s=i(58718),p=i(81194),b=i(71312),g=i(25903),y=i(21544),m=i(12056);t.exports=(t,n,i,_)=>{switch(n){case"===":return"object"==typeof t&&(t=t.version),"object"==typeof i&&(i=i.version),t===i;case"!==":return"object"==typeof t&&(t=t.version),"object"==typeof i&&(i=i.version),t!==i;case"":case"=":case"==":return s(t,i,_);case"!=":return p(t,i,_);case">":return b(t,i,_);case">
15=":return g(t,i,_);case"<":return y(t,i,_);case"<=":return m(t,i,_);default:throw TypeError(`Invalid operator: ${n}`)}}},99038:function(t,n,i){let s=i(26376),p=i(33959),{safeRe:b,t:g}=i(55765);t.exports=(t,n)=>{if(t instanceof s)return t;if("number"==typeof t&&(t=String(t)),"string"!=typeof t)return null;let i=null;if((n=n||{}).rtl){let s;let p=n.includePrerelease?b[g.COERCERTLFULL]:b[g.COERCERTL];for(;(s=p.exec(t))&&(!i||i.index+i[0].length!==t.length);)i&&s.index+s[0].length===i.index+i[0].length||(i=s),p.lastIndex=s.index+s[1].length+s[2].length;p.lastIndex=-1}else i=t.match(n.includePrerelease?b[g.COERCEFULL]:b[g.COERCE]);if(null===i)return null;let y=i[2],m=i[3]||"0",_=i[4]||"0",v=n.includePrerelease&&i[5]?`-${i[5]}`:"",w=n.includePrerelease&&i[6]?`+${i[6]}`:"";return p(`${y}.${m}.${_}${v}${w}`,n)}},88880:function(t,n,i){let s=i(26376);t.exports=(t,n,i)=>{let p=new s(t,i),b=new s(n,i);return p.compare(b)||p.compareBuild(b)}},27880:function(t,n,i){let s=i(46269);t.exports=(t,n)=>s(t,n,!0)},46269:function(t,n,i){let s=i(26376);t.exports=(t,n,i)=>new s(t,i).compare(new s(n,i))},62378:function(t,n,i){let s=i(33959);t.exports=(t,n)=>{let i=s(t,null,!0),p=s(n,null,!0),b=i.compare(p);if(0===b)return null;let g=b>0,y=g?i:p,m=g?p:i,_=!!y.prerelease.length,v=!!m.prerelease.length;if(v&&!_)return m.patch||m.minor?y.patch?"patch":y.minor?"minor":"major":"major";let w=_?"pre":"";return i.major!==p.major?w+"major":i.minor!==p.minor?w+"minor":i.patch!==p.patch?w+"patch":"prerelease"}},58718:function(t,n,i){let s=i(46269);t.exports=(t,n,i)=>0===s(t,n,i)},71312:function(t,n,i){let s=i(46269);t.exports=(t,n,i)=>s(t,n,i)>0},25903:function(t,n,i){let s=i(46269);t.exports=(t,n,i)=>s(t,n,i)>=0},20253:function(t,n,i){let s=i(26376);t.exports=(t,n,i,p,b)=>{"string"==typeof i&&(b=p,p=i,i=void 0);try{return new s(t instanceof s?t.version:t,i).inc(n,p,b).version}catch(t){return null}}},21544:function(t,n,i){let s=i(46269);t.exports=(t,n,i)=>0>s(t,n,i)},12056:function(t,n,i){let s=i(46269);t.exports=(t,n,i)=>0>=s(t,n,i)},38679:function(t,n,i){let s=i(26376);t.exports=(t,n)=>new s(t,n).major},87789:function(t,n,i){let s=i(26376);t.exports=(t,n)=>new s(t,n).minor},81194:function(t,n,i){let s=i(46269);t.exports=(t,n,i)=>0!==s(t,n,i)},33959:function(t,n,i){let s=i(26376);t.exports=(t,n,i=!1)=>{if(t instanceof s)return t;try{return new s(t,n)}catch(t){if(!i)return null;throw t}}},52358:function(t,n,i){let s=i(26376);t.exports=(t,n)=>new s(t,n).patch},57559:function(t,n,i){let s=i(33959);t.exports=(t,n)=>{let i=s(t,n);return i&&i.prerelease.length?i.prerelease:null}},79795:function(t,n,i){let s=i(46269);t.exports=(t,n,i)=>s(n,t,i)},63657:function(t,n,i){let s=i(88880);t.exports=(t,n)=>t.sort((t,i)=>s(i,t,n))},45712:function(t,n,i){let s=i(66902);t.exports=(t,n,i)=>{try{n=new s(n,i)}catch(t){return!1}return n.test(t)}},21100:function(t,n,i){let s=i(88880);t.exports=(t,n)=>t.sort((t,i)=>s(t,i,n))},76397:function(t,n,i){let s=i(33959);t.exports=(t,n)=>{let i=s(t,n);return i?i.version:null}},81249:function(t,n,i){let s=i(55765),p=i(83295),b=i(26376),g=i(86742),y=i(33959),m=i(76397),_=i(13507),v=i(20253),w=i(62378),S=i(38679),R=i(87789),T=i(52358),x=i(57559),A=i(46269),k=i(79795),O=i(27880),P=i(88880),C=i(21100),I=i(63657),L=i(71312),N=i(21544),M=i(58718),B=i(81194),j=i(25903),D=i(12056),F=i(7539),W=i(99038),q=i(22257),U=i(66902),$=i(45712),H=i(51042),z=i(85775),V=i(71657),G=i(95316),Z=i(89042),J=i(6826),K=i(97606),Y=i(50032),X=i(82937),Q=i(17908),ee=i(50799);t.exports={parse:y,valid:m,clean:_,inc:v,diff:w,major:S,minor:R,patch:T,prerelease:x,compare:A,rcompare:k,compareLoose:O,compareBuild:P,sort:C,rsort:I,gt:L,lt:N,eq:M,neq:B,gte:j,lte:D,cmp:F,coerce:W,Comparator:q,Range:U,satisfies:$,toComparators:H,maxSatisfying:z,minSatisfying:V,minVersion:G,validRange:Z,outside:J,gtr:K,ltr:Y,intersects:X,simplifyRange:Q,subset:ee,SemVer:b,re:s.re,src:s.src,tokens:s.t,SEMVER_SPEC_VERSION:p.SEMVER_SPEC_VERSION,RELEASE_TYPES:p.RELEASE_TYPES,compareIdentifiers:g.compareIdentifiers,rcompareIdentifiers:g.rcompareIdentifiers}},83295:function(t){let n=Number.MAX_SAFE_INTEGER||9007199254740991;
15t.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:n,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}},74225:function(t,n,i){var s=i(34155);let p="object"==typeof s&&s.env&&s.env.NODE_DEBUG&&/\bsemver\b/i.test(s.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};t.exports=p},86742:function(t){let n=/^[0-9]+$/,compareIdentifiers=(t,i)=>{let s=n.test(t),p=n.test(i);return s&&p&&(t=+t,i=+i),t===i?0:s&&!p?-1:p&&!s?1:t<i?-1:1};t.exports={compareIdentifiers,rcompareIdentifiers:(t,n)=>compareIdentifiers(n,t)}},12893:function(t){let n=Object.freeze({loose:!0}),i=Object.freeze({});t.exports=t=>t?"object"!=typeof t?n:t:i},55765:function(t,n,i){let{MAX_SAFE_COMPONENT_LENGTH:s,MAX_SAFE_BUILD_LENGTH:p,MAX_LENGTH:b}=i(83295),g=i(74225);n=t.exports={};let y=n.re=[],m=n.safeRe=[],_=n.src=[],v=n.t={},w=0,S="[a-zA-Z0-9-]",R=[["\\s",1],["\\d",b],[S,p]],makeSafeRegex=t=>{for(let[n,i]of R)t=t.split(`${n}*`).join(`${n}{0,${i}}`).split(`${n}+`).join(`${n}{1,${i}}`);return t},createToken=(t,n,i)=>{let s=makeSafeRegex(n),p=w++;g(t,p,n),v[t]=p,_[p]=n,y[p]=new RegExp(n,i?"g":void 0),m[p]=new RegExp(s,i?"g":void 0)};createToken("NUMERICIDENTIFIER","0|[1-9]\\d*"),createToken("NUMERICIDENTIFIERLOOSE","\\d+"),createToken("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${S}*`),createToken("MAINVERSION",`(${_[v.NUMERICIDENTIFIER]})\\.(${_[v.NUMERICIDENTIFIER]})\\.(${_[v.NUMERICIDENTIFIER]})`),createToken("MAINVERSIONLOOSE",`(${_[v.NUMERICIDENTIFIERLOOSE]})\\.(${_[v.NUMERICIDENTIFIERLOOSE]})\\.(${_[v.NUMERICIDENTIFIERLOOSE]})`),createToken("PRERELEASEIDENTIFIER",`(?:${_[v.NUMERICIDENTIFIER]}|${_[v.NONNUMERICIDENTIFIER]})`),createToken("PRERELEASEIDENTIFIERLOOSE",`(?:${_[v.NUMERICIDENTIFIERLOOSE]}|${_[v.NONNUMERICIDENTIFIER]})`),createToken("PRERELEASE",`(?:-(${_[v.PRERELEASEIDENTIFIER]}(?:\\.${_[v.PRERELEASEIDENTIFIER]})*))`),createToken("PRERELEASELOOSE",`(?:-?(${_[v.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${_[v.PRERELEASEIDENTIFIERLOOSE]})*))`),createToken("BUILDIDENTIFIER",`${S}+`),createToken("BUILD",`(?:\\+(${_[v.BUILDIDENTIFIER]}(?:\\.${_[v.BUILDIDENTIFIER]})*))`),createToken("FULLPLAIN",`v?${_[v.MAINVERSION]}${_[v.PRERELEASE]}?${_[v.BUILD]}?`),createToken("FULL",`^${_[v.FULLPLAIN]}$`),createToken("LOOSEPLAIN",`[v=\\s]*${_[v.MAINVERSIONLOOSE]}${_[v.PRERELEASELOOSE]}?${_[v.BUILD]}?`),createToken("LOOSE",`^${_[v.LOOSEPLAIN]}$`),createToken("GTLT","((?:<|>)?=?)"),createToken("XRANGEIDENTIFIERLOOSE",`${_[v.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),createToken("XRANGEIDENTIFIER",`${_[v.NUMERICIDENTIFIER]}|x|X|\\*`),createToken("XRANGEPLAIN",`[v=\\s]*(${_[v.XRANGEIDENTIFIER]})(?:\\.(${_[v.XRANGEIDENTIFIER]})(?:\\.(${_[v.XRANGEIDENTIFIER]})(?:${_[v.PRERELEASE]})?${_[v.BUILD]}?)?)?`),createToken("XRANGEPLAINLOOSE",`[v=\\s]*(${_[v.XRANGEIDENTIFIERLOOSE]})(?:\\.(${_[v.XRANGEIDENTIFIERLOOSE]})(?:\\.(${_[v.XRANGEIDENTIFIERLOOSE]})(?:${_[v.PRERELEASELOOSE]})?${_[v.BUILD]}?)?)?`),createToken("XRANGE",`^${_[v.GTLT]}\\s*${_[v.XRANGEPLAIN]}$`),createToken("XRANGELOOSE",`^${_[v.GTLT]}\\s*${_[v.XRANGEPLAINLOOSE]}$`),createToken("COERCEPLAIN",`(^|[^\\d])(\\d{1,${s}})(?:\\.(\\d{1,${s}}))?(?:\\.(\\d{1,${s}}))?`),createToken("COERCE",`${_[v.COERCEPLAIN]}(?:$|[^\\d])`),createToken("COERCEFULL",_[v.COERCEPLAIN]+`(?:${_[v.PRERELEASE]})?`+`(?:${_[v.BUILD]})?`+"(?:$|[^\\d])"),createToken("COERCERTL",_[v.COERCE],!0),createToken("COERCERTLFULL",_[v.COERCEFULL],!0),createToken("LONETILDE","(?:~>?)"),createToken("TILDETRIM",`(\\s*)${_[v.LONETILDE]}\\s+`,!0),n.tildeTrimReplace="$1~",createToken("TILDE",`^${_[v.LONETILDE]}${_[v.XRANGEPLAIN]}$`),createToken("TILDELOOSE",`^${_[v.LONETILDE]}${_[v.XRANGEPLAINLOOSE]}$`),createToken("LONECARET","(?:\\^)"),createToken("CARETTRIM",`(\\s*)${_[v.LONECARET]}\\s+`,!0),n.caretTrimReplace="$1^",createToken("CARET",`^${_[v.LONECARET]}${_[v.XRANGEPLAIN]}$`),createToken("CARETLOOSE",`^${_[v.LONECARET]}${_[v.XRANGEPLAINLOOSE]}$`),createToken("COMPARATORLOOSE",`^${_[v.GTLT]}\\s*(${_[v.LOOSEPLAIN]})$|^$`),createToken("COMPARATOR",`^${_[v.GTLT]}\\s*(${_[v.FULLPLAIN]})$|^$`),createToken("COMPARATORTRIM",`(\\s*)${_[v.GTLT]}\\s*(${_[v.LOOSEPLAIN]}|${_[v.XRANGEPLAIN]})`,!0),n.comparatorTrimReplace="$1$2$3",createToken("HYPHENRANGE",`^\\s*(${_[v.XRANGEPLAIN]})\\s+-\\s+(${_[v.XRANGEPLAIN]})\\s*$`),createToken("HYPHENRANGELOOSE",`^\\s*(${_[v.XRANGEPLAINLOOSE]}
15)\\s+-\\s+(${_[v.XRANGEPLAINLOOSE]})\\s*$`),createToken("STAR","(<|>)?=?\\s*\\*"),createToken("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),createToken("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")},96062:function(t,n,i){"use strict";let s=i(34411),p=Symbol("max"),b=Symbol("length"),g=Symbol("lengthCalculator"),y=Symbol("allowStale"),m=Symbol("maxAge"),_=Symbol("dispose"),v=Symbol("noDisposeOnSet"),w=Symbol("lruList"),S=Symbol("cache"),R=Symbol("updateAgeOnGet"),naiveLength=()=>1;let LRUCache=class LRUCache{constructor(t){if("number"==typeof t&&(t={max:t}),t||(t={}),t.max&&("number"!=typeof t.max||t.max<0))throw TypeError("max must be a non-negative number");this[p]=t.max||1/0;let n=t.length||naiveLength;if(this[g]="function"!=typeof n?naiveLength:n,this[y]=t.stale||!1,t.maxAge&&"number"!=typeof t.maxAge)throw TypeError("maxAge must be a number");this[m]=t.maxAge||0,this[_]=t.dispose,this[v]=t.noDisposeOnSet||!1,this[R]=t.updateAgeOnGet||!1,this.reset()}set max(t){if("number"!=typeof t||t<0)throw TypeError("max must be a non-negative number");this[p]=t||1/0,trim(this)}get max(){return this[p]}set allowStale(t){this[y]=!!t}get allowStale(){return this[y]}set maxAge(t){if("number"!=typeof t)throw TypeError("maxAge must be a non-negative number");this[m]=t,trim(this)}get maxAge(){return this[m]}set lengthCalculator(t){"function"!=typeof t&&(t=naiveLength),t!==this[g]&&(this[g]=t,this[b]=0,this[w].forEach(t=>{t.length=this[g](t.value,t.key),this[b]+=t.length})),trim(this)}get lengthCalculator(){return this[g]}get length(){return this[b]}get itemCount(){return this[w].length}rforEach(t,n){n=n||this;for(let i=this[w].tail;null!==i;){let s=i.prev;forEachStep(this,t,i,n),i=s}}forEach(t,n){n=n||this;for(let i=this[w].head;null!==i;){let s=i.next;forEachStep(this,t,i,n),i=s}}keys(){return this[w].toArray().map(t=>t.key)}values(){return this[w].toArray().map(t=>t.value)}reset(){this[_]&&this[w]&&this[w].length&&this[w].forEach(t=>this[_](t.key,t.value)),this[S]=new Map,this[w]=new s,this[b]=0}dump(){return this[w].map(t=>!isStale(this,t)&&{k:t.key,v:t.value,e:t.now+(t.maxAge||0)}).toArray().filter(t=>t)}dumpLru(){return this[w]}set(t,n,i){if((i=i||this[m])&&"number"!=typeof i)throw TypeError("maxAge must be a number");let s=i?Date.now():0,y=this[g](n,t);if(this[S].has(t)){if(y>this[p])return del(this,this[S].get(t)),!1;let g=this[S].get(t),m=g.value;return this[_]&&!this[v]&&this[_](t,m.value),m.now=s,m.maxAge=i,m.value=n,this[b]+=y-m.length,m.length=y,this.get(t),trim(this),!0}let R=new Entry(t,n,y,s,i);return R.length>this[p]?(this[_]&&this[_](t,n),!1):(this[b]+=R.length,this[w].unshift(R),this[S].set(t,this[w].head),trim(this),!0)}has(t){if(!this[S].has(t))return!1;let n=this[S].get(t).value;return!isStale(this,n)}get(t){return get(this,t,!0)}peek(t){return get(this,t,!1)}pop(){let t=this[w].tail;return t?(del(this,t),t.value):null}del(t){del(this,this[S].get(t))}load(t){this.reset();let n=Date.now();for(let i=t.length-1;i>=0;i--){let s=t[i],p=s.e||0;if(0===p)this.set(s.k,s.v);else{let t=p-n;t>0&&this.set(s.k,s.v,t)}}}prune(){this[S].forEach((t,n)=>get(this,n,!1))}};let get=(t,n,i)=>{let s=t[S].get(n);if(s){let n=s.value;if(isStale(t,n)){if(del(t,s),!t[y])return}else i&&(t[R]&&(s.value.now=Date.now()),t[w].unshiftNode(s));return n.value}},isStale=(t,n)=>{if(!n||!n.maxAge&&!t[m])return!1;let i=Date.now()-n.now;return n.maxAge?i>n.maxAge:t[m]&&i>t[m]},trim=t=>{if(t[b]>t[p])for(let n=t[w].tail;t[b]>t[p]&&null!==n;){let i=n.prev;del(t,n),n=i}},del=(t,n)=>{if(n){let i=n.value;t[_]&&t[_](i.key,i.value),t[b]-=i.length,t[S].delete(i.key),t[w].removeNode(n)}};let Entry=class Entry{constructor(t,n,i,s,p){this.key=t,this.value=n,this.length=i,this.now=s,this.maxAge=p||0}};let forEachStep=(t,n,i,s)=>{let p=i.value;isStale(t,p)&&(del(t,i),t[y]||(p=void 0)),p&&n.call(s,p.value,p.key,t)};t.exports=LRUCache},97606:function(t,n,i){let s=i(6826);t.exports=(t,n,i)=>s(t,n,">",i)},82937:function(t,n,i){let s=i(66902);t.exports=(t,n,i)=>(t=new s(t,i),n=new s(n,i),t.intersects(n,i))},50032:function(t,n,i){let s=i(6826);t.exports=(t,n,i)=>s(t,n,"<",i)},85775:function(t,n,i){let s=i(26376),p=i(66902);t.exports=(t,n,i)=>{let b=null,g=null,y=null;try{y=new p(n,i)}catch(t){return null}return t.forEach(t=>{y.test(t)&&(!b||-1===g.compare(t))&&(g=new s(b=t,i))}),b}},71657:function(t,n,i){let s=i(26376),p=i(66902);t.exports=(t,n,i)=>{let b=null,g=null,y=null;try{y=new p(n,i)}catch(t){return null}return t.forEach(t=>{y.test(t)&&(!b||1===g.compare(t))&&(g=new s(b=t,i))}),b}},95316:function(t,n,i){let s=i(26376),p=i(66902),b=i(71312);t.exports=(t,n)=>{t=new p(t,n);let i=new s("0.0.0");if(t.test(i)||(i=new s("0.0.0-0"),t.test(i)))return i;i=null;for(let n=0;n<t.set.length;++n){let p=t.set[n],g=null;p.forEach(t=>{let n=new s(t.semver.version);switch(t.operator){case">":0===n.prerelease.length?n.patch++:n.prerelease.push(0),n.raw=n.format();case"":case">=":(!g||b(n,g))&&(g=n);break;case"<":case"<=":break;default:throw Error(`Unexpected operation: ${t.operator}`)}}),g&&(!i||b(i,g))&&(i=g)}return i&&t.test(i)?i:null}},6826:function(t,n,i){let s=i(26376),p=i(22257),{ANY:b}=p,g=i(66902),y=i(45712),m=i(71312),_=i(21544),v=i(12056),w=i(25903);t.exports=(t,n,i,S)=>{let R,T,x,A,k;switch(t=new s(t,S),n=new g(n,S),i){case">":R=m,T=v,x=_,A=">",k=">=";break;case"<":R=_,T=w,x=m,A="<",k="<=";break;default:throw TypeError('Must provide a hilo val of "<" or ">"')}if(y(t,n,S))return!1;for(let i=0;i<n.set.length;++i){let s=n.set[i],g=null,y=null;if(s.forEach(t=>{t.semver===b&&(t=new p(">=0.0.0")),g=g||t,y=y||t,R(t.semver,g.semver,S)?g=t:x(t.semver,y.semver,S)&&(y=t)}),g.operator===A||g.operator===k||(!y.operator||y.operator===A)&&T(t,y.semver)||y.operator===k&&x(t,y.semver))return!1}return!0}},17908:function(t,n,i){let s=i(45712),p=i(46269);t.exports=(t,n,i)=>{let b=[],g=null,y=null,m=t.sort((t,n)=>p(t,n,i));for(let t of m){let p=s(t,n,i);p?(y=t,g||(g=t)):(y&&b.push([g,y]),y=null,g=null)}g&&b.push([g,null]);let _=[];for(let[t,n]of b)t===n?_.push(t):n||t!==m[0]?n?t===m[0]?_.push(`<=${n}`):_.push(`${t} - ${n}`):_.push(`>=${t}`):_.push("*");let v=_.join(" || "),w="string"==typeof n.raw?n.raw:String(n);return v.length<w.length?v:n}},50799:function(t,n,i){let s=i(66902),p=i(22257),{ANY:b}=p,g=i(45712),y=i(46269),m=[new p(">=0.0.0-0")],_=[new p(">=0.0.0")],simpleSubset=(t,n,i)=>{let s,p,v,w,S,R,T;if(t===n)return!0;
15if(1===t.length&&t[0].semver===b){if(1===n.length&&n[0].semver===b)return!0;t=i.includePrerelease?m:_}if(1===n.length&&n[0].semver===b){if(i.includePrerelease)return!0;n=_}let x=new Set;for(let n of t)">"===n.operator||">="===n.operator?s=higherGT(s,n,i):"<"===n.operator||"<="===n.operator?p=lowerLT(p,n,i):x.add(n.semver);if(x.size>1||s&&p&&((v=y(s.semver,p.semver,i))>0||0===v&&(">="!==s.operator||"<="!==p.operator)))return null;for(let t of x){if(s&&!g(t,String(s),i)||p&&!g(t,String(p),i))return null;for(let s of n)if(!g(t,String(s),i))return!1;return!0}let A=!!p&&!i.includePrerelease&&!!p.semver.prerelease.length&&p.semver,k=!!s&&!i.includePrerelease&&!!s.semver.prerelease.length&&s.semver;for(let t of(A&&1===A.prerelease.length&&"<"===p.operator&&0===A.prerelease[0]&&(A=!1),n)){if(T=T||">"===t.operator||">="===t.operator,R=R||"<"===t.operator||"<="===t.operator,s){if(k&&t.semver.prerelease&&t.semver.prerelease.length&&t.semver.major===k.major&&t.semver.minor===k.minor&&t.semver.patch===k.patch&&(k=!1),">"===t.operator||">="===t.operator){if((w=higherGT(s,t,i))===t&&w!==s)return!1}else if(">="===s.operator&&!g(s.semver,String(t),i))return!1}if(p){if(A&&t.semver.prerelease&&t.semver.prerelease.length&&t.semver.major===A.major&&t.semver.minor===A.minor&&t.semver.patch===A.patch&&(A=!1),"<"===t.operator||"<="===t.operator){if((S=lowerLT(p,t,i))===t&&S!==p)return!1}else if("<="===p.operator&&!g(p.semver,String(t),i))return!1}if(!t.operator&&(p||s)&&0!==v)return!1}return(!s||!R||!!p||0===v)&&(!p||!T||!!s||0===v)&&!k&&!A},higherGT=(t,n,i)=>{if(!t)return n;let s=y(t.semver,n.semver,i);return s>0?t:s<0?n:">"===n.operator&&">="===t.operator?n:t},lowerLT=(t,n,i)=>{if(!t)return n;let s=y(t.semver,n.semver,i);return s<0?t:s>0?n:"<"===n.operator&&"<="===t.operator?n:t};t.exports=(t,n,i={})=>{if(t===n)return!0;t=new s(t,i),n=new s(n,i);let p=!1;t:for(let s of t.set){for(let t of n.set){let n=simpleSubset(s,t,i);if(p=p||null!==n,n)continue t}if(p)return!1}return!0}},51042:function(t,n,i){let s=i(66902);t.exports=(t,n)=>new s(t,n).set.map(t=>t.map(t=>t.value).join(" ").trim().split(" "))},89042:function(t,n,i){let s=i(66902);t.exports=(t,n)=>{try{return new s(t,n).range||"*"}catch(t){return null}}},32553:function(t,n,i){"use strict";var s=i(89509).Buffer,p=s.isEncoding||function(t){switch((t=""+t)&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function _normalizeEncoding(t){var n;if(!t)return"utf8";for(;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(n)return;t=(""+t).toLowerCase(),n=!0}}function normalizeEncoding(t){var n=_normalizeEncoding(t);if("string"!=typeof n&&(s.isEncoding===p||!p(t)))throw Error("Unknown encoding: "+t);return n||t}function StringDecoder(t){var n;switch(this.encoding=normalizeEncoding(t),this.encoding){case"utf16le":this.text=utf16Text,this.end=utf16End,n=4;break;case"utf8":this.fillLast=utf8FillLast,n=4;break;case"base64":this.text=base64Text,this.end=base64End,n=3;break;default:this.write=simpleWrite,this.end=simpleEnd;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=s.allocUnsafe(n)}function utf8CheckByte(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function utf8CheckIncomplete(t,n,i){var s=n.length-1;if(s<i)return 0;var p=utf8CheckByte(n[s]);return p>=0?(p>0&&(t.lastNeed=p-1),p):--s<i||-2===p?0:(p=utf8CheckByte(n[s]))>=0?(p>0&&(t.lastNeed=p-2),p):--s<i||-2===p?0:(p=utf8CheckByte(n[s]))>=0?(p>0&&(2===p?p=0:t.lastNeed=p-3),p):0}function utf8CheckExtraBytes(t,n,i){if((192&n[0])!=128)return t.lastNeed=0,"�";if(t.lastNeed>1&&n.length>1){if((192&n[1])!=128)return t.lastNeed=1,"�";if(t.lastNeed>2&&n.length>2&&(192&n[2])!=128)return t.lastNeed=2,"�"}}function utf8FillLast(t){var n=this.lastTotal-this.lastNeed,i=utf8CheckExtraBytes(this,t,n);return void 0!==i?i:this.lastNeed<=t.length?(t.copy(this.lastChar,n,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):void(t.copy(this.lastChar,n,0,t.length),this.lastNeed-=t.length)}function utf8Text(t,n){var i=utf8CheckIncomplete(this,t,n);if(!this.lastNeed)return t.toString("utf8",n);this.lastTotal=i;var s=t.length-(i-this.lastNeed);return t.copy(this.lastChar,0,s),t.toString("utf8",n,s)}function utf8End(t){var n=t&&t.length?this.write(t):"";return this.lastNeed?n+"�":n}function utf16Text(t,n){if((t.length-n)%2==0){var i=t.toString("utf16le",n);if(i){var s=i.charCodeAt(i.length-1);if(s>=55296&&s<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],i.slice(0,-1)}return i}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",n,t.length-1)}function utf16End(t){var n=t&&t.length?this.write(t):"";if(this.lastNeed){var i=this.lastTotal-this.lastNeed;return n+this.lastChar.toString("utf16le",0,i)}return n}function base64Text(t,n){var i=(t.length-n)%3;return 0===i?t.toString("base64",n):(this.lastNeed=3-i,this.lastTotal=3,1===i?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",n,t.length-i))}function base64End(t){var n=t&&t.length?this.write(t):"";return this.lastNeed?n+this.lastChar.toString("base64",0,3-this.lastNeed):n}function simpleWrite(t){return t.toString(this.encoding)}function simpleEnd(t){return t&&t.length?this.write(t):""}n.StringDecoder=StringDecoder,StringDecoder.prototype.write=function(t){var n,i;if(0===t.length)return"";if(this.lastNeed){if(void 0===(n=this.fillLast(t)))return"";i=this.lastNeed,this.lastNeed=0}else i=0;return i<t.length?n?n+this.text(t,i):this.text(t,i):n||""},StringDecoder.prototype.end=utf8End,StringDecoder.prototype.text=utf8Text,StringDecoder.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length}},94927:function(t,n,i){function deprecate(t,n){if(config("noDeprecation"))return t;var i=!1;return function(){if(!i){if(config("throwDeprecation"))throw Error(n);config("traceDeprecation")?console.trace(n):console.warn(n),i=!0}return t.apply(this,arguments)}}function config(t){try{if(!i.g.localStorage)return!1}catch(t){return!1}var n=i.g.localStorage[t];return null!=n&&"true"===String(n).toLowerCase()}t.exports=deprecate},52479:function(t){t.exports=wrappy;function wrappy(t,n){if(t&&n)return wrappy(t)(n);if("function"!=typeof t)throw TypeError("need wrapper function");return Object.keys(t).forEach(function(n){wrapper[n]=t[n]}),wrapper;function wrapper(){for(var n=Array(arguments.length),i=0;i<n.length;i++)n[i]=arguments[i];var s=t.apply(this,n),p=n[n.length-1];
15return"function"==typeof s&&s!==p&&Object.keys(p).forEach(function(t){s[t]=p[t]}),s}}},49602:function(t){"use strict";t.exports=function(t){t.prototype[Symbol.iterator]=function*(){for(let t=this.head;t;t=t.next)yield t.value}}},34411:function(t,n,i){"use strict";function Yallist(t){var n=this;if(n instanceof Yallist||(n=new Yallist),n.tail=null,n.head=null,n.length=0,t&&"function"==typeof t.forEach)t.forEach(function(t){n.push(t)});else if(arguments.length>0)for(var i=0,s=arguments.length;i<s;i++)n.push(arguments[i]);return n}function insert(t,n,i){var s=n===t.head?new Node(i,null,n,t):new Node(i,n,n.next,t);return null===s.next&&(t.tail=s),null===s.prev&&(t.head=s),t.length++,s}function push(t,n){t.tail=new Node(n,t.tail,null,t),t.head||(t.head=t.tail),t.length++}function unshift(t,n){t.head=new Node(n,null,t.head,t),t.tail||(t.tail=t.head),t.length++}function Node(t,n,i,s){if(!(this instanceof Node))return new Node(t,n,i,s);this.list=s,this.value=t,n?(n.next=this,this.prev=n):this.prev=null,i?(i.prev=this,this.next=i):this.next=null}t.exports=Yallist,Yallist.Node=Node,Yallist.create=Yallist,Yallist.prototype.removeNode=function(t){if(t.list!==this)throw Error("removing node which does not belong to this list");var n=t.next,i=t.prev;return n&&(n.prev=i),i&&(i.next=n),t===this.head&&(this.head=n),t===this.tail&&(this.tail=i),t.list.length--,t.next=null,t.prev=null,t.list=null,n},Yallist.prototype.unshiftNode=function(t){if(t!==this.head){t.list&&t.list.removeNode(t);var n=this.head;t.list=this,t.next=n,n&&(n.prev=t),this.head=t,this.tail||(this.tail=t),this.length++}},Yallist.prototype.pushNode=function(t){if(t!==this.tail){t.list&&t.list.removeNode(t);var n=this.tail;t.list=this,t.prev=n,n&&(n.next=t),this.tail=t,this.head||(this.head=t),this.length++}},Yallist.prototype.push=function(){for(var t=0,n=arguments.length;t<n;t++)push(this,arguments[t]);return this.length},Yallist.prototype.unshift=function(){for(var t=0,n=arguments.length;t<n;t++)unshift(this,arguments[t]);return this.length},Yallist.prototype.pop=function(){if(this.tail){var t=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,t}},Yallist.prototype.shift=function(){if(this.head){var t=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,t}},Yallist.prototype.forEach=function(t,n){n=n||this;for(var i=this.head,s=0;null!==i;s++)t.call(n,i.value,s,this),i=i.next},Yallist.prototype.forEachReverse=function(t,n){n=n||this;for(var i=this.tail,s=this.length-1;null!==i;s--)t.call(n,i.value,s,this),i=i.prev},Yallist.prototype.get=function(t){for(var n=0,i=this.head;null!==i&&n<t;n++)i=i.next;if(n===t&&null!==i)return i.value},Yallist.prototype.getReverse=function(t){for(var n=0,i=this.tail;null!==i&&n<t;n++)i=i.prev;if(n===t&&null!==i)return i.value},Yallist.prototype.map=function(t,n){n=n||this;for(var i=new Yallist,s=this.head;null!==s;)i.push(t.call(n,s.value,this)),s=s.next;return i},Yallist.prototype.mapReverse=function(t,n){n=n||this;for(var i=new Yallist,s=this.tail;null!==s;)i.push(t.call(n,s.value,this)),s=s.prev;return i},Yallist.prototype.reduce=function(t,n){var i,s=this.head;if(arguments.length>1)i=n;else if(this.head)s=this.head.next,i=this.head.value;else throw TypeError("Reduce of empty list with no initial value");for(var p=0;null!==s;p++)i=t(i,s.value,p),s=s.next;return i},Yallist.prototype.reduceReverse=function(t,n){var i,s=this.tail;if(arguments.length>1)i=n;else if(this.tail)s=this.tail.prev,i=this.tail.value;else throw TypeError("Reduce of empty list with no initial value");for(var p=this.length-1;null!==s;p--)i=t(i,s.value,p),s=s.prev;return i},Yallist.prototype.toArray=function(){for(var t=Array(this.length),n=0,i=this.head;null!==i;n++)t[n]=i.value,i=i.next;return t},Yallist.prototype.toArrayReverse=function(){for(var t=Array(this.length),n=0,i=this.tail;null!==i;n++)t[n]=i.value,i=i.prev;return t},Yallist.prototype.slice=function(t,n){(n=n||this.length)<0&&(n+=this.length),(t=t||0)<0&&(t+=this.length);var i=new Yallist;if(n<t||n<0)return i;t<0&&(t=0),n>this.length&&(n=this.length);for(var s=0,p=this.head;null!==p&&s<t;s++)p=p.next;for(;null!==p&&s<n;s++,p=p.next)i.push(p.value);return i},Yallist.prototype.sliceReverse=function(t,n){(n=n||this.length)<0&&(n+=this.length),(t=t||0)<0&&(t+=this.length);var i=new Yallist;if(n<t||n<0)return i;t<0&&(t=0),n>this.length&&(n=this.length);for(var s=this.length,p=this.tail;null!==p&&s>n;s--)p=p.prev;
15for(;null!==p&&s>t;s--,p=p.prev)i.push(p.value);return i},Yallist.prototype.splice=function(t,n,...i){t>this.length&&(t=this.length-1),t<0&&(t=this.length+t);for(var s=0,p=this.head;null!==p&&s<t;s++)p=p.next;for(var b=[],s=0;p&&s<n;s++)b.push(p.value),p=this.removeNode(p);null===p&&(p=this.tail),p!==this.head&&p!==this.tail&&(p=p.prev);for(var s=0;s<i.length;s++)p=insert(this,p,i[s]);return b},Yallist.prototype.reverse=function(){for(var t=this.head,n=this.tail,i=t;null!==i;i=i.prev){var s=i.prev;i.prev=i.next,i.next=s}return this.head=n,this.tail=t,this};try{i(49602)(Yallist)}catch(t){}},81180:function(t,n,i){"use strict";function _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function toPrimitive(t,n){if("object"!=_typeof(t)||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var s=i.call(t,n||"default");if("object"!=_typeof(s))return s;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(t)}function toPropertyKey(t){var n=toPrimitive(t,"string");return"symbol"==_typeof(n)?n:n+""}function _defineProperty(t,n,i){return(n=toPropertyKey(n))in t?Object.defineProperty(t,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[n]=i,t}i.d(n,{Z:function(){return _defineProperty}})},11821:function(t,n,i){"use strict";i.r(n),i.d(n,{Struct:function(){return Struct},StructError:function(){return StructError},any:function(){return any},array:function(){return array},assert:function(){return assert},assign:function(){return assign},bigint:function(){return bigint},boolean:function(){return boolean},coerce:function(){return coerce},create:function(){return create},date:function(){return date},defaulted:function(){return defaulted},define:function(){return define},deprecated:function(){return deprecated},dynamic:function(){return dynamic},empty:function(){return empty},enums:function(){return enums},func:function(){return func},instance:function(){return instance},integer:function(){return integer},intersection:function(){return intersection},is:function(){return is},lazy:function(){return lazy},literal:function(){return literal},map:function(){return map},mask:function(){return mask},max:function(){return max},min:function(){return min},never:function(){return never},nonempty:function(){return nonempty},nullable:function(){return nullable},number:function(){return number},object:function(){return object},omit:function(){return omit},optional:function(){return optional},partial:function(){return partial},pattern:function(){return pattern},pick:function(){return pick},record:function(){return record},refine:function(){return refine},regexp:function(){return regexp},set:function(){return set},size:function(){return size},string:function(){return string},struct:function(){return struct},trimmed:function(){return trimmed},tuple:function(){return tuple},type:function(){return type},union:function(){return union},unknown:function(){return unknown},validate:function(){return validate}});let StructError=class StructError extends TypeError{constructor(t,n){let i;let{message:s,explanation:p,...b}=t,{path:g}=t,y=0===g.length?s:`At path: ${g.join(".")} -- ${s}`;super(p??y),null!=p&&(this.cause=y),Object.assign(this,b),this.name=this.constructor.name,this.failures=()=>i??(i=[t,...n()])}};function isIterable(t){return isObject(t)&&"function"==typeof t[Symbol.iterator]}function isObject(t){return"object"==typeof t&&null!=t}function isPlainObject(t){if("[object Object]"!==Object.prototype.toString.call(t))return!1;let n=Object.getPrototypeOf(t);return null===n||n===Object.prototype}function print(t){return"symbol"==typeof t?t.toString():"string"==typeof t?JSON.stringify(t):`${t}`}function shiftIterator(t){let{done:n,value:i}=t.next();return n?void 0:i}function toFailure(t,n,i,s){if(!0===t)return;!1===t?t={}:"string"==typeof t&&(t={message:t});let{path:p,branch:b}=n,{type:g}=i,{refinement:y,message:m=`Expected a value of type \`${g}\`${y?` with refinement \`${y}\``:""}, but received: \`${print(s)}\``}=t;return{value:s,type:g,refinement:y,key:p[p.length-1],path:p,branch:b,...t,message:m}}
15function*toFailures(t,n,i,s){for(let p of(isIterable(t)||(t=[t]),t)){let t=toFailure(p,n,i,s);t&&(yield t)}}function*run(t,n,i={}){let{path:s=[],branch:p=[t],coerce:b=!1,mask:g=!1}=i,y={path:s,branch:p};if(b&&(t=n.coercer(t,y),g&&"type"!==n.type&&isObject(n.schema)&&isObject(t)&&!Array.isArray(t)))for(let i in t)void 0===n.schema[i]&&delete t[i];let m="valid";for(let s of n.validator(t,y))s.explanation=i.message,m="not_valid",yield[s,void 0];for(let[_,v,w]of n.entries(t,y)){let n=run(v,w,{path:void 0===_?s:[...s,_],branch:void 0===_?p:[...p,v],coerce:b,mask:g,message:i.message});for(let i of n)i[0]?(m=null!=i[0].refinement?"not_refined":"not_valid",yield[i[0],void 0]):b&&(v=i[1],void 0===_?t=v:t instanceof Map?t.set(_,v):t instanceof Set?t.add(v):isObject(t)&&(void 0!==v||_ in t)&&(t[_]=v))}if("not_valid"!==m)for(let s of n.refiner(t,y))s.explanation=i.message,m="not_refined",yield[s,void 0];"valid"===m&&(yield[void 0,t])}let Struct=class Struct{constructor(t){let{type:n,schema:i,validator:s,refiner:p,coercer:b=t=>t,entries:g=function*(){}}=t;this.type=n,this.schema=i,this.entries=g,this.coercer=b,s?this.validator=(t,n)=>{let i=s(t,n);return toFailures(i,n,this,t)}:this.validator=()=>[],p?this.refiner=(t,n)=>{let i=p(t,n);return toFailures(i,n,this,t)}:this.refiner=()=>[]}assert(t,n){return assert(t,this,n)}create(t,n){return create(t,this,n)}is(t){return is(t,this)}mask(t,n){return mask(t,this,n)}validate(t,n={}){return validate(t,this,n)}};function assert(t,n,i){let s=validate(t,n,{message:i});if(s[0])throw s[0]}function create(t,n,i){let s=validate(t,n,{coerce:!0,message:i});if(!s[0])return s[1];throw s[0]}function mask(t,n,i){let s=validate(t,n,{coerce:!0,mask:!0,message:i});if(!s[0])return s[1];throw s[0]}function is(t,n){let i=validate(t,n);return!i[0]}function validate(t,n,i={}){let s=run(t,n,i),p=shiftIterator(s);if(p[0]){let t=new StructError(p[0],function*(){for(let t of s)t[0]&&(yield t[0])});return[t,void 0]}{let t=p[1];return[void 0,t]}}function assign(...t){let n="type"===t[0].type,i=t.map(t=>t.schema),s=Object.assign({},...i);return n?type(s):object(s)}function define(t,n){return new Struct({type:t,schema:null,validator:n})}function deprecated(t,n){return new Struct({...t,refiner:(n,i)=>void 0===n||t.refiner(n,i),validator:(i,s)=>void 0===i||(n(i,s),t.validator(i,s))})}function dynamic(t){return new Struct({type:"dynamic",schema:null,*entries(n,i){let s=t(n,i);yield*s.entries(n,i)},validator(n,i){let s=t(n,i);return s.validator(n,i)},coercer(n,i){let s=t(n,i);return s.coercer(n,i)},refiner(n,i){let s=t(n,i);return s.refiner(n,i)}})}function lazy(t){let n;return new Struct({type:"lazy",schema:null,*entries(i,s){n??(n=t()),yield*n.entries(i,s)},validator:(i,s)=>(n??(n=t()),n.validator(i,s)),coercer:(i,s)=>(n??(n=t()),n.coercer(i,s)),refiner:(i,s)=>(n??(n=t()),n.refiner(i,s))})}function omit(t,n){let{schema:i}=t,s={...i};for(let t of n)delete s[t];return"type"===t.type?type(s):object(s)}function partial(t){let n=t instanceof Struct,i=n?{...t.schema}:{...t};for(let t in i)i[t]=optional(i[t]);return n&&"type"===t.type?type(i):object(i)}function pick(t,n){let{schema:i}=t,s={};for(let t of n)s[t]=i[t];return"type"===t.type?type(s):object(s)}function struct(t,n){return console.warn("[email protected] - The `struct` helper has been renamed to `define`."),define(t,n)}function any(){return define("any",()=>!0)}function array(t){return new Struct({type:"array",schema:t,*entries(n){if(t&&Array.isArray(n))for(let[i,s]of n.entries())yield[i,s,t]},coercer:t=>Array.isArray(t)?t.slice():t,validator:t=>Array.isArray(t)||`Expected an array value, but received: ${print(t)}`})}function bigint(){return define("bigint",t=>"bigint"==typeof t)}function boolean(){return define("boolean",t=>"boolean"==typeof t)}function date(){return define("date",t=>t instanceof Date&&!isNaN(t.getTime())||`Expected a valid \`Date\` object, but received: ${print(t)}`)}function enums(t){let n={},i=t.map(t=>print(t)).join();for(let i of t)n[i]=i;return new Struct({type:"enums",schema:n,validator:n=>t.includes(n)||`Expected one of \`${i}\`, but received: ${print(n)}`})}function func(){return define("func",t=>"function"==typeof t||`Expected a function, but received: ${print(t)}`)}function instance(t){return define("instance",n=>n instanceof t||`Expected a \`${t.name}\` instance, but received: ${print(n)}`)}function integer(){return define("integer",t=>
15"number"==typeof t&&!isNaN(t)&&Number.isInteger(t)||`Expected an integer, but received: ${print(t)}`)}function intersection(t){return new Struct({type:"intersection",schema:null,*entries(n,i){for(let s of t)yield*s.entries(n,i)},*validator(n,i){for(let s of t)yield*s.validator(n,i)},*refiner(n,i){for(let s of t)yield*s.refiner(n,i)}})}function literal(t){let n=print(t),i=typeof t;return new Struct({type:"literal",schema:"string"===i||"number"===i||"boolean"===i?t:null,validator:i=>i===t||`Expected the literal \`${n}\`, but received: ${print(i)}`})}function map(t,n){return new Struct({type:"map",schema:null,*entries(i){if(t&&n&&i instanceof Map)for(let[s,p]of i.entries())yield[s,s,t],yield[s,p,n]},coercer:t=>t instanceof Map?new Map(t):t,validator:t=>t instanceof Map||`Expected a \`Map\` object, but received: ${print(t)}`})}function never(){return define("never",()=>!1)}function nullable(t){return new Struct({...t,validator:(n,i)=>null===n||t.validator(n,i),refiner:(n,i)=>null===n||t.refiner(n,i)})}function number(){return define("number",t=>"number"==typeof t&&!isNaN(t)||`Expected a number, but received: ${print(t)}`)}function object(t){let n=t?Object.keys(t):[],i=never();return new Struct({type:"object",schema:t||null,*entries(s){if(t&&isObject(s)){let p=new Set(Object.keys(s));for(let i of n)p.delete(i),yield[i,s[i],t[i]];for(let t of p)yield[t,s[t],i]}},validator:t=>isObject(t)||`Expected an object, but received: ${print(t)}`,coercer:t=>isObject(t)?{...t}:t})}function optional(t){return new Struct({...t,validator:(n,i)=>void 0===n||t.validator(n,i),refiner:(n,i)=>void 0===n||t.refiner(n,i)})}function record(t,n){return new Struct({type:"record",schema:null,*entries(i){if(isObject(i))for(let s in i){let p=i[s];yield[s,s,t],yield[s,p,n]}},validator:t=>isObject(t)||`Expected an object, but received: ${print(t)}`})}function regexp(){return define("regexp",t=>t instanceof RegExp)}function set(t){return new Struct({type:"set",schema:null,*entries(n){if(t&&n instanceof Set)for(let i of n)yield[i,i,t]},coercer:t=>t instanceof Set?new Set(t):t,validator:t=>t instanceof Set||`Expected a \`Set\` object, but received: ${print(t)}`})}function string(){return define("string",t=>"string"==typeof t||`Expected a string, but received: ${print(t)}`)}function tuple(t){let n=never();return new Struct({type:"tuple",schema:null,*entries(i){if(Array.isArray(i)){let s=Math.max(t.length,i.length);for(let p=0;p<s;p++)yield[p,i[p],t[p]||n]}},validator:t=>Array.isArray(t)||`Expected an array, but received: ${print(t)}`})}function type(t){let n=Object.keys(t);return new Struct({type:"type",schema:t,*entries(i){if(isObject(i))for(let s of n)yield[s,i[s],t[s]]},validator:t=>isObject(t)||`Expected an object, but received: ${print(t)}`,coercer:t=>isObject(t)?{...t}:t})}function union(t){let n=t.map(t=>t.type).join(" | ");return new Struct({type:"union",schema:null,coercer(n){for(let i of t){let[t,s]=i.validate(n,{coerce:!0});if(!t)return s}return n},validator(i,s){let p=[];for(let n of t){let[...t]=run(i,n,s),[b]=t;if(!b[0])return[];for(let[n]of t)n&&p.push(n)}return[`Expected the value to satisfy a union of \`${n}\`, but received: ${print(i)}`,...p]}})}function unknown(){return define("unknown",()=>!0)}function coerce(t,n,i){return new Struct({...t,coercer:(s,p)=>is(s,n)?t.coercer(i(s,p),p):t.coercer(s,p)})}function defaulted(t,n,i={}){return coerce(t,unknown(),t=>{let s="function"==typeof n?n():n;if(void 0===t)return s;if(!i.strict&&isPlainObject(t)&&isPlainObject(s)){let n={...t},i=!1;for(let t in s)void 0===n[t]&&(n[t]=s[t],i=!0);if(i)return n}return t})}function trimmed(t){return coerce(t,string(),t=>t.trim())}function empty(t){return refine(t,"empty",n=>{let i=getSize(n);return 0===i||`Expected an empty ${t.type} but received one with a size of \`${i}\``})}function getSize(t){return t instanceof Map||t instanceof Set?t.size:t.length}function max(t,n,i={}){let{exclusive:s}=i;return refine(t,"max",i=>s?i<n:i<=n||`Expected a ${t.type} less than ${s?"":"or equal to "}${n} but received \`${i}\``)}function min(t,n,i={}){let{exclusive:s}=i;return refine(t,"min",i=>s?i>n:i>=n||`Expected a ${t.type} greater than ${s?"":"or equal to "}${n} but received \`${i}\``)}function nonempty(t){return refine(t,"nonempty",n=>{let i=getSize(n);return i>0||`Expected a nonempty ${t.type} but received an empty one`})}
15function pattern(t,n){return refine(t,"pattern",i=>n.test(i)||`Expected a ${t.type} matching \`/${n.source}/\` but received "${i}"`)}function size(t,n,i=n){let s=`Expected a ${t.type}`,p=n===i?`of \`${n}\``:`between \`${n}\` and \`${i}\``;return refine(t,"size",t=>{if("number"==typeof t||t instanceof Date)return n<=t&&t<=i||`${s} ${p} but received \`${t}\``;if(t instanceof Map||t instanceof Set){let{size:b}=t;return n<=b&&b<=i||`${s} with a size ${p} but received one with a size of \`${b}\``}{let{length:b}=t;return n<=b&&b<=i||`${s} with a length ${p} but received one with a length of \`${b}\``}})}function refine(t,n,i){return new Struct({...t,*refiner(s,p){yield*t.refiner(s,p);let b=i(s,p),g=toFailures(b,p,t,s);for(let t of g)yield{...t,refinement:n}}})}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.