PageSourceSearch

https://xota.ai/_next/static/chunks/4665.fa3e0f8362154009.js

js xota.ai collected 2026-10-05 15:59:58 UTC 491,107 bytes, 2 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4665],{35951:function(e,t){"use strict";function r(e){if(Array.isArray(e)){let t=[],n=0;for(let i=0;i<e.length;i++){let o=r(e[i]);t.push(o),n+=o.length}return f(o(n,192),...t)}let t=m(e);return 1===t.length&&t[0]<128?t:f(o(t.length,128),t)}function n(e,t,r){if(r>e.length)throw Error("invalid RLP (safeSlice): end slice of Uint8Array out-of-bounds");return e.slice(t,r)}function i(e){if(0===e[0])throw Error("invalid RLP: extra zeros");return u(c(e))}function o(e,t){if(e<56)return Uint8Array.from([e+t]);let r=d(e),n=d(t+55+r.length/2);return Uint8Array.from(l(n+r))}function a(e,t=!1){if(null==e||0===e.length)return Uint8Array.from([]);let r=function e(t){let r,o,a,s,c;let u=[],l=t[0];if(l<=127)return{data:t.slice(0,1),remainder:t.slice(1)};if(l<=183){if(r=l-127,a=128===l?Uint8Array.from([]):n(t,1,r),2===r&&a[0]<128)throw Error("invalid RLP encoding: invalid prefix, single byte < 0x80 are not prefixed");return{data:a,remainder:t.slice(r)}}if(l<=191){if(o=l-182,t.length-1<o)throw Error("invalid RLP: not enough bytes for string length");if((r=i(n(t,1,o)))<=55)throw Error("invalid RLP: expected string length to be greater than 55");return{data:a=n(t,o,r+o),remainder:t.slice(r+o)}}if(l<=247){for(s=n(t,1,r=l-191);s.length;)c=e(s),u.push(c.data),s=c.remainder;return{data:u,remainder:t.slice(r)}}{if((r=i(n(t,1,o=l-246)))<56)throw Error("invalid RLP: encoded list too short");let a=o+r;if(a>t.length)throw Error("invalid RLP: total length is larger than the data");for(s=n(t,o,a);s.length;)c=e(s),u.push(c.data),s=c.remainder;return{data:u,remainder:t.slice(a)}}}(m(e));if(t)return r;if(0!==r.remainder.length)throw Error("invalid RLP: remainder must be zero");return r.data}Object.defineProperty(t,"__esModule",{value:!0}),t.RLP=t.utils=t.decode=t.encode=void 0,t.encode=r,t.decode=a;let s=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function c(e){let t="";for(let r=0;r<e.length;r++)t+=s[e[r]];return t}function u(e){let t=Number.parseInt(e,16);if(Number.isNaN(t))throw Error("Invalid byte sequence");return t}function l(e){if("string"!=typeof e)throw TypeError("hexToBytes: expected string, got "+typeof e);if(e.length%2)throw Error("hexToBytes: received invalid unpadded hex");let t=new Uint8Array(e.length/2);for(let r=0;r<t.length;r++){let n=2*r;t[r]=u(e.slice(n,n+2))}return t}function f(...e){if(1===e.length)return e[0];let t=new Uint8Array(e.reduce((e,t)=>e+t.length,0));for(let r=0,n=0;r<e.length;r++){let i=e[r];t.set(i,n),n+=i.length}return t}function h(e){return new TextEncoder().encode(e)}function d(e){if(e<0)throw Error("Invalid integer as argument, must be unsigned!");let t=e.toString(16);return t.length%2?`0${t}`:t}function p(e){return e.length>=2&&"0"===e[0]&&"x"===e[1]}function m(e){if(e instanceof Uint8Array)return e;if("string"==typeof e){if(p(e)){var t;return l((t="string"!=typeof e?e:p(e)?e.slice(2):e).length%2?`0${t}`:t)}return h(e)}if("number"==typeof e||"bigint"==typeof e)return e?l(d(e)):Uint8Array.from([]);if(null==e)return Uint8Array.from([]);throw Error("toBytes: received unsupported type "+typeof e)}t.utils={bytesToHex:c,concatBytes:f,hexToBytes:l,utf8ToBytes:h},t.RLP={encode:r,decode:a}},14938:function(e,t,r){"use strict";var n=r(82957).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.accountBodyToRLP=t.accountBodyToSlim=t.accountBodyFromSlim=t.isZeroAddress=t.zeroAddress=t.importPublic=t.privateToAddress=t.privateToPublic=t.publicToAddress=t.pubToAddress=t.isValidPublic=t.isValidPrivate=t.generateAddress2=t.generateAddress=t.isValidChecksumAddress=t.toChecksumAddress=t.isValidAddress=t.Account=void 0;let i=r(35951),o=r(82041),a=r(42475),s=r(41301),c=r(2461),u=r(63917),l=r(55510),f=r(14365),h=BigInt(0);class d{constructor(e=h,t=h,r=u.KECCAK256_RLP,n=u.KECCAK256_NULL){this.nonce=e,this.balance=t,this.storageRoot=r,this.codeHash=n,this._validate()}static fromAccountData(e){let{nonce:t,balance:r,storageRoot:n,codeHash:i}=e;return new d(void 0!==t?(0,c.bufferToBigInt)((0,c.toBuffer)(t)):void 0,void 0!==r?(0,c.bufferToBigInt)((0,c.toBuffer)(r)):void 0,void 0!==n?(0,c.toBuffer)(n):void 0,void 0!==i?(0,c.toBuffer)(i):void 0)}static fromRlpSerializedAccount(e){let t=(0,c.arrToBufArr)(i.RLP.decode(Uint8Array.from(e)));if(!Array.isArray(t))throw Error("Invalid serialized account input. Must be array");return this.fromValuesArray(t)}static fromValuesArray(e){let[t,r,n,i]=e;return new d((0,c.bufferToBigInt)(t),(0,c.bufferToBigInt)(r),n,i)}_validate(){if(this.nonce<h)throw Error("nonce must be greater than zero");if(this.balance<h)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,c.bigIntToUnpaddedBuffer)(this.nonce),(0,c.bigIntToUnpaddedBuffer)(this.balance),this.storageRoot,this.co
1deHash]}serialize(){return n.from(i.RLP.encode((0,c.bufArrToArr)(this.raw())))}isContract(){return!this.codeHash.equals(u.KECCAK256_NULL)}isEmpty(){return this.balance===h&&this.nonce===h&&this.codeHash.equals(u.KECCAK256_NULL)}}function p(e){let[t,r,n,i]=e;return[t,r,0===(0,c.arrToBufArr)(n).length?u.KECCAK256_RLP:n,0===(0,c.arrToBufArr)(i).length?u.KECCAK256_NULL:i]}t.Account=d,t.isValidAddress=function(e){try{(0,l.assertIsString)(e)}catch(e){return!1}return/^0x[0-9a-fA-F]{40}$/.test(e)},t.toChecksumAddress=function(e,t){(0,l.assertIsHexString)(e);let r=(0,f.stripHexPrefix)(e).toLowerCase(),i="";void 0!==t&&(i=(0,c.bufferToBigInt)((0,c.toBuffer)(t)).toString()+"0x");let a=n.from(i+r,"utf8"),u=(0,s.bytesToHex)((0,o.keccak256)(a)),h="0x";for(let e=0;e<r.length;e++)parseInt(u[e],16)>=8?h+=r[e].toUpperCase():h+=r[e];return h},t.isValidChecksumAddress=function(e,r){return(0,t.isValidAddress)(e)&&(0,t.toChecksumAddress)(e,r)===e},t.generateAddress=function(e,t){return((0,l.assertIsBuffer)(e),(0,l.assertIsBuffer)(t),(0,c.bufferToBigInt)(t)===BigInt(0))?n.from((0,o.keccak256)(i.RLP.encode((0,c.bufArrToArr)([e,null])))).slice(-20):n.from((0,o.keccak256)(i.RLP.encode((0,c.bufArrToArr)([e,t])))).slice(-20)},t.generateAddress2=function(e,t,r){if((0,l.assertIsBuffer)(e),(0,l.assertIsBuffer)(t),(0,l.assertIsBuffer)(r),20!==e.length)throw Error("Expected from to be of length 20");if(32!==t.length)throw Error("Expected salt to be of length 32");let i=(0,o.keccak256)(n.concat([n.from("ff","hex"),e,t,(0,o.keccak256)(r)]));return(0,c.toBuffer)(i).slice(-20)},t.isValidPrivate=function(e){return a.secp256k1.utils.isValidPrivateKey(e)},t.isValidPublic=function(e,t=!1){if((0,l.assertIsBuffer)(e),64===e.length)try{return a.secp256k1.ProjectivePoint.fromHex(n.concat([n.from([4]),e])),!0}catch(e){return!1}if(!t)return!1;try{return a.secp256k1.ProjectivePoint.fromHex(e),!0}catch(e){return!1}},t.pubToAddress=function(e,t=!1){if((0,l.assertIsBuffer)(e),t&&64!==e.length&&(e=n.from(a.secp256k1.ProjectivePoint.fromHex(e).toRawBytes(!1).slice(1))),64!==e.length)throw Error("Expected pubKey to be of length 64");return n.from((0,o.keccak256)(e)).slice(-20)},t.publicToAddress=t.pubToAddress,t.privateToPublic=function(e){return(0,l.assertIsBuffer)(e),n.from(a.secp256k1.ProjectivePoint.fromPrivateKey(e).toRawBytes(!1).slice(1))},t.privateToAddress=function(e){return(0,t.publicToAddress)((0,t.privateToPublic)(e))},t.importPublic=function(e){return(0,l.assertIsBuffer)(e),64!==e.length&&(e=n.from(a.secp256k1.ProjectivePoint.fromHex(e).toRawBytes(!1).slice(1))),e},t.zeroAddress=function(){let e=(0,c.zeros)(20);return(0,c.bufferToHex)(e)},t.isZeroAddress=function(e){try{(0,l.assertIsString)(e)}catch(e){return!1}return(0,t.zeroAddress)()===e},t.accountBodyFromSlim=p;let m=new Uint8Array(0);t.accountBodyToSlim=function(e){let[t,r,n,i]=e;return[t,r,(0,c.arrToBufArr)(n).equals(u.KECCAK256_RLP)?m:n,(0,c.arrToBufArr)(i).equals(u.KECCAK256_NULL)?m:i]},t.accountBodyToRLP=function(e,t=!0){let r=t?p(e):e;return(0,c.arrToBufArr)(i.RLP.encode(r))}},82118:function(e,t,r){"use strict";var n=r(82957).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.Address=void 0;let i=r(14938),o=r(2461);class a{constructor(e){if(20!==e.length)throw Error("Invalid address length");this.buf=e}static zero(){return new a((0,o.zeros)(20))}static fromString(e){if(!(0,i.isValidAddress)(e))throw Error("Invalid address");return new a((0,o.toBuffer)(e))}static fromPublicKey(e){if(!n.isBuffer(e))throw Error("Public key should be Buffer");return new a((0,i.pubToAddress)(e))}static fromPrivateKey(e){if(!n.isBuffer(e))throw Error("Private key should be Buffer");return new a((0,i.privateToAddress)(e))}static generate(e,t){if("bigint"!=typeof t)throw Error("Expected nonce to be a bigint");return new a((0,i.generateAddress)(e.buf,(0,o.bigIntToBuffer)(t)))}static generate2(e,t,r){if(!n.isBuffer(t))throw Error("Expected salt to be a Buffer");if(!n.isBuffer(r))throw Error("Expected initCode to be a Buffer");return new a((0,i.generateAddress2)(e.buf,t,r))}equals(e){return this.buf.equals(e.buf)}isZero(){return this.equals(a.zero())}isPrecompileOrSystemAddress(){let e=(0,o.bufferToBigInt)(this.buf),t=BigInt(0),r=BigInt("0xffff");return e>=t&&e<=r}toString(){return"0x"+this.buf.toString("hex")}toBuffer(){return n.from(this.buf)}}t.Address=a},35439:function(e,t,r){"use strict";
1Object.defineProperty(t,"__esModule",{value:!0}),t.AsyncEventEmitter=void 0;let n=r(55445);async function i(e,t,r){let n;for await(let i of t)try{i.length<2?i.call(e,r):await new Promise((t,n)=>{i.call(e,r,e=>{e?n(e):t()})})}catch(e){n=e}if(n)throw n}class o extends n.EventEmitter{emit(e,...t){let[r,n]=t,o=this._events[e]??[];return void 0===n&&"function"==typeof r&&(n=r,r=void 0),("newListener"===e||"removeListener"===e)&&(r={event:r,fn:n},n=void 0),i(this,(o=Array.isArray(o)?o:[o]).slice(),r).then(n).catch(n),this.listenerCount(e)>0}once(e,t){let r;let n=this;if("function"!=typeof t)throw TypeError("listener must be a function");return r=t.length>=2?function(i,o){n.removeListener(e,r),t(i,o)}:function(i){n.removeListener(e,r),t(i,r)},n.on(e,r),n}first(e,t){let r=this._events[e]??[];if("function"!=typeof t)throw TypeError("listener must be a function");return Array.isArray(r)||(this._events[e]=r=[r]),r.unshift(t),this}before(e,t,r){return this.beforeOrAfter(e,t,r)}after(e,t,r){return this.beforeOrAfter(e,t,r,"after")}beforeOrAfter(e,t,r,n){let i,o,a=this._events[e]??[],s="after"===n?1:0;if("function"!=typeof r)throw TypeError("listener must be a function");if("function"!=typeof t)throw TypeError("target must be a function");for(Array.isArray(a)||(this._events[e]=a=[a]),o=a.length,i=a.length;i--;)if(a[i]===t){o=i+s;break}return a.splice(o,0,r),this}on(e,t){return super.on(e,t)}addListener(e,t){return super.addListener(e,t)}prependListener(e,t){return super.prependListener(e,t)}prependOnceListener(e,t){return super.prependOnceListener(e,t)}removeAllListeners(e){return super.removeAllListeners(e)}removeListener(e,t){return super.removeListener(e,t)}eventNames(){return super.eventNames()}listeners(e){return super.listeners(e)}listenerCount(e){return super.listenerCount(e)}getMaxListeners(){return super.getMaxListeners()}setMaxListeners(e){return super.setMaxListeners(e)}}t.AsyncEventEmitter=o},2461:function(e,t,r){"use strict";var n=r(82957).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.intToUnpaddedBuffer=t.bigIntToUnpaddedBuffer=t.bigIntToHex=t.bufArrToArr=t.arrToBufArr=t.validateNoLeadingZeroes=t.baToJSON=t.toUtf8=t.short=t.addHexPrefix=t.toUnsigned=t.fromSigned=t.bufferToInt=t.bigIntToBuffer=t.bufferToBigInt=t.bufferToHex=t.toBuffer=t.unpadHexString=t.unpadArray=t.unpadBuffer=t.setLengthRight=t.setLengthLeft=t.zeros=t.intToBuffer=t.intToHex=void 0;let i=r(55510),o=r(14365);t.intToHex=function(e){if(!Number.isSafeInteger(e)||e<0)throw Error(`Received an invalid integer type: ${e}`);return`0x${e.toString(16)}`},t.intToBuffer=function(e){let r=(0,t.intToHex)(e);return n.from((0,o.padToEven)(r.slice(2)),"hex")},t.zeros=function(e){return n.allocUnsafe(e).fill(0)};let a=function(e,r,n){let i=(0,t.zeros)(r);return n?e.length<r?(e.copy(i),i):e.slice(0,r):e.length<r?(e.copy(i,r-e.length),i):e.slice(-r)};t.setLengthLeft=function(e,t){return(0,i.assertIsBuffer)(e),a(e,t,!1)},t.setLengthRight=function(e,t){return(0,i.assertIsBuffer)(e),a(e,t,!0)};let s=function(e){let t=e[0];for(;e.length>0&&"0"===t.toString();)t=(e=e.slice(1))[0];return e};function c(e){let r=(0,t.bufferToHex)(e);return"0x"===r?BigInt(0):BigInt(r)}function u(e){return(0,t.toBuffer)("0x"+e.toString(16))}t.unpadBuffer=function(e){return(0,i.assertIsBuffer)(e),s(e)},t.unpadArray=function(e){return(0,i.assertIsArray)(e),s(e)},t.unpadHexString=function(e){return(0,i.assertIsHexString)(e),"0x"+s(e=(0,o.stripHexPrefix)(e))},t.toBuffer=function(e){if(null==e)return n.allocUnsafe(0);if(n.isBuffer(e)||Array.isArray(e)||e instanceof Uint8Array)return n.from(e);if("string"==typeof e){if(!(0,o.isHexString)(e))throw Error(`Cannot convert string to buffer. toBuffer only supports 0x-prefixed hex strings and this string was given: ${e}`);return n.from((0,o.padToEven)((0,o.stripHexPrefix)(e)),"hex")}if("number"==typeof e)return(0,t.intToBuffer)(e);if("bigint"==typeof e){if(e<BigInt(0))throw Error(`Cannot convert negative bigint to buffer. Given: ${e}`);let t=e.toString(16);return t.length%2&&(t="0"+t),n.from(t,"hex")}if(e.toArray)return n.from(e.toArray());if(e.toBuffer)return n.from(e.toBuffer());throw Error("invalid type")},t.bufferToHex=function(e){return"0x"+(e=(0,t.toBuffer)(e)).toString("hex")},t.bufferToBigInt=c,t.bigIntToBuffer=u,t.bufferToInt=function(e){let t=Number(c(e));if(!Number.isSafeInteger(t))throw Error("Number exceeds 53 bits");return t},t.fromSigned=function(e){return BigInt.asIntN(256,c(e))},t.toUnsigned=function(e){return u(BigInt.asUintN(256,e))},t.addHexPrefix=function(e){return"string"!=typeof e?e:(0,o.isHexPrefixed)(e)?e:"0x"+e},t.short=function(e,t=50){let r=n.isBuffer(e)?e.toString("hex"):e;return r.length<=t?r:r.slice(0,t)+"…"},t.toUtf8=function(e){if((e=(0,o.stripHexPrefix)(e)).length%2!=0)throw Error("Invalid non-even hex string input for toUtf8() provided");return n.from(e.replace(/^(00)+|(00)+$/g,""),"hex").toString("utf8")},t.baToJSON=function(e){if(n.isBuffer(e))return`0x${e.toString("hex")}`;if(e instanceof Array){let r=[];for(let n=0;n<e.length;n++)r.push((0,t.baToJSON)(e[n]));return r}},t.validateNoLeadingZeroes=function(e){for(let[t,r]of Object.entries(e))if(void 0!==r&&r.length>0&&0===r[0])throw Error(`${t} cannot have leading zeroes, received: ${r.toString("hex")}`)},t.arrToBufArr=function e(t){return Array.isArray(t)?t.map(t=>e(t)):n.from(t)},t.bufArrToArr=function e(t){return Array.isArray(t)?t.map(t=>e(t)):Uint8Array.from(t??[])},t.bigIntToHex=e=>"0x"+e.toString(16),t.bigIntToUnpaddedBuffer=function(e){return(0,t.unpadBuffer)(u(e))},t.intToUnpaddedBuffer=function(e){return(0,t.unpadBuffer)((0,t.intToBuffer)(e))}},63917:function(e,t,r){"use strict";
1Object.defineProperty(t,"__esModule",{value:!0}),t.MAX_WITHDRAWALS_PER_PAYLOAD=t.RLP_EMPTY_STRING=t.KECCAK256_RLP=t.KECCAK256_RLP_S=t.KECCAK256_RLP_ARRAY=t.KECCAK256_RLP_ARRAY_S=t.KECCAK256_NULL=t.KECCAK256_NULL_S=t.TWO_POW256=t.SECP256K1_ORDER_DIV_2=t.SECP256K1_ORDER=t.MAX_INTEGER_BIGINT=t.MAX_INTEGER=t.MAX_UINT64=void 0;let n=r(82957),i=r(42475);t.MAX_UINT64=BigInt("0xffffffffffffffff"),t.MAX_INTEGER=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),t.MAX_INTEGER_BIGINT=BigInt("115792089237316195423570985008687907853269984665640564039457584007913129639935"),t.SECP256K1_ORDER=i.secp256k1.CURVE.n,t.SECP256K1_ORDER_DIV_2=i.secp256k1.CURVE.n/BigInt(2),t.TWO_POW256=BigInt("0x10000000000000000000000000000000000000000000000000000000000000000"),t.KECCAK256_NULL_S="c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",t.KECCAK256_NULL=n.Buffer.from(t.KECCAK256_NULL_S,"hex"),t.KECCAK256_RLP_ARRAY_S="1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",t.KECCAK256_RLP_ARRAY=n.Buffer.from(t.KECCAK256_RLP_ARRAY_S,"hex"),t.KECCAK256_RLP_S="56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",t.KECCAK256_RLP=n.Buffer.from(t.KECCAK256_RLP_S,"hex"),t.RLP_EMPTY_STRING=n.Buffer.from([128]),t.MAX_WITHDRAWALS_PER_PAYLOAD=16},8577:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.compactBytesToNibbles=t.bytesToNibbles=t.nibblesToCompactBytes=t.nibblesToBytes=t.hasTerminator=void 0,t.hasTerminator=e=>e.length>0&&16===e[e.length-1],t.nibblesToBytes=(e,t)=>{for(let r=0,n=0;n<e.length;r+=1,n+=2)t[r]=e[n]<<4|e[n+1]},t.nibblesToCompactBytes=e=>{let r=0;(0,t.hasTerminator)(e)&&(r=1,e=e.subarray(0,e.length-1));let n=new Uint8Array(e.length/2+1);return n[0]=r<<5,(1&e.length)==1&&(n[0]|=16,n[0]|=e[0],e=e.subarray(1)),(0,t.nibblesToBytes)(e,n.subarray(1)),n},t.bytesToNibbles=e=>{let t=2*e.length+1,r=new Uint8Array(t);for(let t=0;t<e.length;t++){let n=e[t];r[2*t]=n/16,r[2*t+1]=n%16}return r[t-1]=16,r},t.compactBytesToNibbles=e=>{if(0===e.length)return e;let r=(0,t.bytesToNibbles)(e);r[0]<2&&(r=r.subarray(0,r.length-1));let n=2-(1&r[0]);return r.subarray(n)}},55510:function(e,t,r){"use strict";var n=r(82957).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.assertIsString=t.assertIsArray=t.assertIsBuffer=t.assertIsHexString=void 0;let i=r(14365);t.assertIsHexString=function(e){if(!(0,i.isHexString)(e))throw Error(`This method only supports 0x-prefixed hex strings but input was: ${e}`)},t.assertIsBuffer=function(e){if(!n.isBuffer(e))throw Error(`This method only supports Buffer but input was: ${e}`)},t.assertIsArray=function(e){if(!Array.isArray(e))throw Error(`This method only supports number arrays but input was: ${e}`)},t.assertIsString=function(e){if("string"!=typeof e)throw Error(`This method only supports strings but input was: ${e}`)}},26621:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.toAscii=t.stripHexPrefix=t.padToEven=t.isHexString=t.isHexPrefixed=t.getKeys=t.getBinarySize=t.fromUtf8=t.fromAscii=t.arrayContainsArray=void 0,i(r(63917),t),i(r(48878),t),i(r(14938),t),i(r(82118),t),i(r(25369),t),i(r(36741),t),i(r(2461),t),i(r(57352),t),i(r(8577),t),i(r(35439),t);var o=r(14365);Object.defineProperty(t,"arrayContainsArray",{enumerable:!0,get:function(){return o.arrayContainsArray}}),Object.defineProperty(t,"fromAscii",{enumerable:!0,get:function(){return o.fromAscii}}),Object.defineProperty(t,"fromUtf8",{enumerable:!0,get:function(){return o.fromUtf8}}),Object.defineProperty(t,"getBinarySize",{enumerable:!0,get:function(){return o.getBinarySize}}),Object.defineProperty(t,"getKeys",{enumerable:!0,get:function(){return o.getKeys}}),Object.defineProperty(t,"isHexPrefixed",{enumerable:!0,get:function(){return o.isHexPrefixed}}),Object.defineProperty(t,"isHexString",{enumerable:!0,get:function(){return o.isHexString}}),Object.defineProperty(t,"padToEven",{enumerable:!0,get:function(){return o.padToEven}}),Object.defineProperty(t,"stripHexPrefix",{enumerable:!0,get:function(){return o.stripHexPrefix}}),Object.defineProperty(t,"toAscii",{enumerable:!0,get:function(){return o.toAscii}}),i(r(91760),t),i(r(72668),t)},14365:function(e,t,r){"use strict";var n=r(82957).Buffer;function i(e){if("string"!=typeof e)throw Error(`[isHexPrefixed] input must be type 'string', received type ${typeof e}`);return"0"===e[0]&&"x"===e[1]}function o(e){let t=e;if("string"!=typeof t)throw Error(`[padToEven] value must be type 'string', received ${typeof t}`);return t.length%2&&(t=`0${t}`),t}
1Object.defineProperty(t,"__esModule",{value:!0}),t.isHexString=t.getKeys=t.fromAscii=t.fromUtf8=t.toAscii=t.arrayContainsArray=t.getBinarySize=t.padToEven=t.stripHexPrefix=t.isHexPrefixed=void 0,t.isHexPrefixed=i,t.stripHexPrefix=e=>{if("string"!=typeof e)throw Error(`[stripHexPrefix] input must be type 'string', received ${typeof e}`);return i(e)?e.slice(2):e},t.padToEven=o,t.getBinarySize=function(e){if("string"!=typeof e)throw Error(`[getBinarySize] method requires input type 'string', received ${typeof e}`);return n.byteLength(e,"utf8")},t.arrayContainsArray=function(e,t,r){if(!0!==Array.isArray(e))throw Error(`[arrayContainsArray] method requires input 'superset' to be an array, got type '${typeof e}'`);if(!0!==Array.isArray(t))throw Error(`[arrayContainsArray] method requires input 'subset' to be an array, got type '${typeof t}'`);return t[!0===r?"some":"every"](t=>e.indexOf(t)>=0)},t.toAscii=function(e){let t="",r=0,n=e.length;for("0x"===e.substring(0,2)&&(r=2);r<n;r+=2)t+=String.fromCharCode(parseInt(e.substr(r,2),16));return t},t.fromUtf8=function(e){let t=n.from(e,"utf8");return`0x${o(t.toString("hex")).replace(/^0+|0+$/g,"")}`},t.fromAscii=function(e){let t="";for(let r=0;r<e.length;r++){let n=e.charCodeAt(r).toString(16);t+=n.length<2?`0${n}`:n}return`0x${t}`},t.getKeys=function(e,t,r){if(!Array.isArray(e))throw Error(`[getKeys] method expects input 'params' to be an array, got ${typeof e}`);if("string"!=typeof t)throw Error(`[getKeys] method expects input 'key' to be type 'string', got ${typeof e}`);let n=[];for(let i=0;i<e.length;i++){let o=e[i][t];if(!0!==r||o){if("string"!=typeof o)throw Error(`invalid abi - expected type 'string', received ${typeof o}`)}else o="";n.push(o)}return n},t.isHexString=function(e,t){return"string"==typeof e&&!!e.match(/^0x[0-9A-Fa-f]*$/)&&(void 0===t||!(t>0)||e.length===2+2*t)}},91760:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Lock=void 0;class r{constructor(){this.permits=1,this.promiseResolverQueue=[]}async acquire(){return this.permits>0?(this.permits-=1,Promise.resolve(!0)):new Promise(e=>this.promiseResolverQueue.push(e))}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 e=this.promiseResolverQueue.shift();e&&e(!0)}}}t.Lock=r},72668:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getProvider=t.fetchFromProvider=void 0;let n=r(35079),i=async(e,t)=>(await (0,n.default)(e,{headers:{"content-type":"application/json"},type:"json",data:{method:t.method,params:t.params,jsonrpc:"2.0",id:1}})).result;t.fetchFromProvider=i,t.getProvider=e=>{if("string"==typeof e)return e;if(e?.connection?.url!==void 0)return e.connection.url;throw Error("Must provide valid provider URL or Web3Provider")}},36741:function(e,t,r){"use strict";var n=r(82957).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.hashPersonalMessage=t.isValidSignature=t.fromRpcSig=t.toCompactSig=t.toRpcSig=t.ecrecover=t.ecsign=void 0;let i=r(82041),o=r(42475),a=r(2461),s=r(63917),c=r(55510);function u(e,t){return e===BigInt(0)||e===BigInt(1)?e:void 0===t?e-BigInt(27):e-(t*BigInt(2)+BigInt(35))}function l(e){return e===BigInt(0)||e===BigInt(1)}t.ecsign=function(e,t,r){let i=o.secp256k1.sign(e,t),a=i.toCompactRawBytes();return{r:n.from(a.slice(0,32)),s:n.from(a.slice(32,64)),v:void 0===r?BigInt(i.recovery+27):BigInt(i.recovery+35)+BigInt(r)*BigInt(2)}},t.ecrecover=function(e,t,r,i,s){let c=n.concat([(0,a.setLengthLeft)(r,32),(0,a.setLengthLeft)(i,32)],64),f=u(t,s);if(!l(f))throw Error("Invalid signature v value");let h=o.secp256k1.Signature.fromCompact(c).addRecoveryBit(Number(f)).recoverPublicKey(e);return n.from(h.toRawBytes(!1).slice(1))},t.toRpcSig=function(e,t,r,i){if(!l(u(e,i)))throw Error("Invalid signature v value");return(0,a.bufferToHex)(n.concat([(0,a.setLengthLeft)(t,32),(0,a.setLengthLeft)(r,32),(0,a.toBuffer)(e)]))},t.toCompactSig=function(e,t,r,i){if(!l(u(e,i)))throw Error("Invalid signature v value");let o=r;return(e>BigInt(28)&&e%BigInt(2)===BigInt(1)||e===BigInt(1)||e===BigInt(28))&&(o=n.from(r),o[0]|=128),(0,a.bufferToHex)(n.concat([(0,a.setLengthLeft)(t,32),(0,a.setLengthLeft)(o,32)]))},t.fromRpcSig=function(e){let t,r,n;let i=(0,a.toBuffer)(e);if(i.length>=65)t=i.slice(0,32),r=i.slice(32,64),n=(0,a.bufferToBigInt)(i.slice(64));else if(64===i.length)t=i.slice(0,32),r=i.slice(32,64),n=BigInt((0,a.bufferToInt)(i.slice(32,33))>>7),r[0]&=127;else throw Error("Invalid signature length");return n<27&&(n+=BigInt(27)),{v:n,r:t,s:r}},t.isValidSignature=function(e,t,r,n=!0,i){if(32!==t.length||32!==r.length||!l(u(e,i)))return!1;let o=(0,a.bufferToBigInt)(t),c=(0,a.bufferToBigInt)(r);return o!==BigInt(0)&&!(o>=s.SECP256K1_ORDER)&&c!==BigInt(0)&&!(c>=s.SECP256K1_ORDER)&&(!n||!(c>=s.SECP256K1_ORDER_DIV_2))},t.hashPersonalMessage=function(e){(0,c.assertIsBuffer)(e);let t=n.from(`\u0019Ethereum Signed Message:
2${e.length}`,"utf-8");return n.from((0,i.keccak256)(n.concat([t,e])))}},57352:function(e,t,r){"use strict";var n,i;
2Object.defineProperty(t,"__esModule",{value:!0}),t.toType=t.TypeOutput=void 0;let o=r(2461),a=r(14365);(i=n=t.TypeOutput||(t.TypeOutput={}))[i.Number=0]="Number",i[i.BigInt=1]="BigInt",i[i.Buffer=2]="Buffer",i[i.PrefixedHexString=3]="PrefixedHexString",t.toType=function(e,t){if(null===e)return null;if(void 0===e)return;if("string"!=typeof e||(0,a.isHexString)(e)){if("number"==typeof e&&!Number.isSafeInteger(e))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: ${e}`);let r=(0,o.toBuffer)(e);switch(t){case n.Buffer:return r;case n.BigInt:return(0,o.bufferToBigInt)(r);case n.Number:{let e=(0,o.bufferToBigInt)(r);if(e>BigInt(Number.MAX_SAFE_INTEGER))throw Error("The provided number is greater than MAX_SAFE_INTEGER (please use an alternative output type)");return Number(e)}case n.PrefixedHexString:return(0,o.bufferToHex)(r);default:throw Error("unknown outputType")}}},48878:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GWEI_TO_WEI=void 0,t.GWEI_TO_WEI=BigInt(1e9)},25369:function(e,t,r){"use strict";var n=r(82957).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.Withdrawal=void 0;let i=r(82118),o=r(2461),a=r(57352);class s{constructor(e,t,r,n){this.index=e,this.validatorIndex=t,this.address=r,this.amount=n}static fromWithdrawalData(e){let{index:t,validatorIndex:r,address:n,amount:o}=e,c=(0,a.toType)(t,a.TypeOutput.BigInt);return new s(c,(0,a.toType)(r,a.TypeOutput.BigInt),new i.Address((0,a.toType)(n,a.TypeOutput.Buffer)),(0,a.toType)(o,a.TypeOutput.BigInt))}static fromValuesArray(e){if(4!==e.length)throw Error(`Invalid withdrawalArray length expected=4 actual=${e.length}`);let[t,r,n,i]=e;return s.fromWithdrawalData({index:t,validatorIndex:r,address:n,amount:i})}static toBufferArray(e){let{index:t,validatorIndex:r,address:o,amount:s}=e;return[(0,a.toType)(t,a.TypeOutput.BigInt)===BigInt(0)?n.alloc(0):(0,a.toType)(t,a.TypeOutput.Buffer),(0,a.toType)(r,a.TypeOutput.BigInt)===BigInt(0)?n.alloc(0):(0,a.toType)(r,a.TypeOutput.Buffer),o instanceof i.Address?o.buf:(0,a.toType)(o,a.TypeOutput.Buffer),(0,a.toType)(s,a.TypeOutput.BigInt)===BigInt(0)?n.alloc(0):(0,a.toType)(s,a.TypeOutput.Buffer)]}raw(){return s.toBufferArray(this)}toValue(){return{index:this.index,validatorIndex:this.validatorIndex,address:this.address.buf,amount:this.amount}}toJSON(){return{index:(0,o.bigIntToHex)(this.index),validatorIndex:(0,o.bigIntToHex)(this.validatorIndex),address:"0x"+this.address.buf.toString("hex"),amount:(0,o.bigIntToHex)(this.amount)}}}t.Withdrawal=s},96604:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decodeSingle=t.decode=t.encodePacked=t.encodeSingle=t.encode=void 0;let n=r(94269),i=r(89977),o=r(52086);t.encode=(e,t,r,n)=>{try{return(0,o.pack)({types:e,values:t,packed:r,tight:n})}catch(e){if(e instanceof i.ParserError)throw new i.ParserError(`Unable to encode value: ${e.message}`,e);throw new i.ParserError(`An unexpected error occurred: ${(0,i.getErrorMessage)(e)}`,e)}},t.encodeSingle=(e,r)=>(0,t.encode)([e],[r]),t.encodePacked=(e,r,n)=>(0,t.encode)(e,r,!0,n),t.decode=(e,t)=>{let r=(0,n.createBytes)(t);try{return(0,o.unpack)(e,r)}catch(e){if(e instanceof i.ParserError)throw new i.ParserError(`Unable to decode value: ${e.message}`,e);throw new i.ParserError(`An unexpected error occurred: ${(0,i.getErrorMessage)(e)}`,e)}},t.decodeSingle=(e,r)=>{let o=(0,t.decode)([e],r);return(0,n.assert)(1===o.length,new i.ParserError("Decoded value array has unexpected length.")),o[0]}},89977:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ParserError=t.getErrorStack=t.getErrorMessage=void 0;let n=r(94269);t.getErrorMessage=e=>"string"==typeof e?e:e instanceof Error||(0,n.isObject)(e)&&(0,n.hasProperty)(e,"message")&&"string"==typeof e.message?e.message:"Unknown error.",t.getErrorStack=e=>{if(e instanceof Error)return e.stack};class i extends Error{constructor(e,r){super(e),this.name="ParserError";let n=(0,t.getErrorStack)(r);n&&(this.stack=n)}}t.ParserError=i},61690:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);
2(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(96604),t),i(r(89977),t),i(r(14083),t)},80482:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.iterate=void 0;let n=r(94269),i=function*(e,t=32){for(let r=0;r<e.length;r+=t){let i=e=>{(0,n.assert)(e>=0,"Cannot skip a negative number of bytes."),(0,n.assert)(e%t==0,"Length must be a multiple of the size."),r+=e},o=e.subarray(r);yield{skip:i,value:o}}return{skip:()=>void 0,value:new Uint8Array}};t.iterate=i},52086:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.unpack=t.pack=t.isDynamicParser=t.getParser=void 0;let n=r(94269),i=r(89977),o=r(80482),a=r(93595),s=r(39362);t.getParser=e=>{let t={address:a.address,array:a.array,bool:a.bool,bytes:a.bytes,fixedBytes:a.fixedBytes,function:a.fn,number:a.number,string:a.string,tuple:a.tuple},r=t[e];if(r)return r;let n=Object.values(t).find(t=>t.isType(e));if(n)return n;throw new i.ParserError(`The type "${e}" is not supported.`)},t.isDynamicParser=(e,t)=>{let{isDynamic:r}=e;return"function"==typeof r?r(t):r},t.pack=({types:e,values:r,packed:o=!1,tight:a=!1,arrayPacked:c=!1,byteArray:u=new Uint8Array})=>{(0,n.assert)(e.length===r.length,new i.ParserError(`The number of types (${e.length}) does not match the number of values (${r.length}).`));let{staticBuffer:l,dynamicBuffer:f,pointers:h}=e.reduce(({staticBuffer:e,dynamicBuffer:i,pointers:s},u,l)=>{let f=(0,t.getParser)(u),h=r[l];return o||c||!(0,t.isDynamicParser)(f,u)?{staticBuffer:f.encode({buffer:e,value:h,type:u,packed:o,tight:a}),dynamicBuffer:i,pointers:s}:{staticBuffer:(0,n.concatBytes)([e,new Uint8Array(32)]),dynamicBuffer:f.encode({buffer:i,value:h,type:u,packed:o,tight:a}),pointers:[...s,{position:e.length,pointer:i.length}]}},{staticBuffer:new Uint8Array,dynamicBuffer:new Uint8Array,pointers:[]});(0,n.assert)(!o&&!c||0===f.length,new i.ParserError("Invalid pack state."));let d=l.length,p=h.reduce((e,{pointer:t,position:r})=>{let i=(0,s.padStart)((0,n.numberToBytes)(d+t));return(0,s.set)(e,i,r)},l);return(0,n.concatBytes)([u,p,f])},t.unpack=(e,r)=>{let a=(0,o.iterate)(r);return e.map(e=>{let{value:{value:o,skip:s},done:c}=a.next();(0,n.assert)(!c,new i.ParserError(`The encoded value is invalid for the provided types. Reached end of buffer while attempting to parse "${e}".`));let u=(0,t.getParser)(e);if((0,t.isDynamicParser)(u,e)){let t=(0,n.bytesToNumber)(o.subarray(0,32)),i=r.subarray(t);return u.decode({type:e,value:i,skip:s})}return u.decode({type:e,value:o,skip:s})})}},22200:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.address=t.getAddress=void 0;let n=r(94269),i=r(89977),o=r(39362);t.getAddress=e=>{let t=(0,n.createBytes)(e);return(0,n.assert)(t.length<=20,new i.ParserError(`Invalid address value. Expected address to be 20 bytes long, but received ${t.length} bytes.`)),(0,o.padStart)(t,20)},t.address={isDynamic:!1,isType:e=>"address"===e,getByteLength:()=>32,encode({buffer:e,value:r,packed:i}){let a=(0,t.getAddress)(r);if(i)return(0,n.concatBytes)([e,a]);let s=(0,o.padStart)(a);return(0,n.concatBytes)([e,s])},decode:({value:e})=>(0,n.add0x)((0,n.bytesToHex)(e.slice(12,32)))}},40987:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.array=t.getTupleType=t.getArrayType=t.isArrayType=void 0;let n=r(94269),i=r(89977),o=r(52086),a=r(39362),s=r(87550),c=r(55247),u=/^(?<type>.*)\[(?<length>\d*?)\]$/u;t.isArrayType=e=>u.test(e),t.getArrayType=e=>{let t=e.match(u);return(0,n.assert)(t?.groups?.type,new i.ParserError(`Invalid array type. Expected an array type, but received "${e}".`)),[t.groups.type,t.groups.length?parseInt(t.groups.length,10):void 0]},t.getTupleType=(e,t)=>`(${Array(t).fill(e).join(",")})`,t.array={isDynamic(e){let[r,n]=(0,t.getArrayType)(e);return void 0===n||(0,o.isDynamicParser)((0,o.getParser)(r),r)},isType:e=>(0,t.isArrayType)(e),getByteLength(e){(0,n.assert)((0,t.isArrayType)(e),new i.ParserError(`Expected an array type, but received "${e}".`));let[r,a]=(0,t.getArrayType)(e);return(0,o.isDynamicParser)(this,e)||void 0===a?32:c.tuple.getByteLength((0,t.getTupleType)(r,a))},encode({type:e,buffer:r,value:u,packed:l,tight:f}){let[h,d]=(0,t.getArrayType)(e);if((0,n.assert)(!l||!(0,t.isArrayType)(h),new i.ParserError("Cannot pack nested arrays.")),l&&(0,o.isDynamicParser)((0,o.getParser)(h),h))return(0,o.pack)({types:Array(u.length).fill(h),values:u,byteArray:r,packed:l,arrayPacked:!0,tight:f});if(d)return(0,n.assert)(d===u.length,new i.ParserError(`Array length does not match type length. Expected a length of ${d}, but received ${u.length}.`)),c.tuple.encode({type:(0,t.getTupleType)(h,d),buffer:r,value:u,packed:s.fixedBytes.isType(h)&&f,tight:f});if(l)return(0,o.pack)({types:Array(u.length).fill(h),values:u,byteArray:r,packed:s.fixedBytes.isType(h)&&f,arrayPacked:!0,tight:f});let p=(0,a.padStart)((0,n.numberToBytes)(u.length));return(0,o.pack)({types:Array(u.length).fill(h),values:u,byteArray:(0,n.concatBytes)([r,p]),packed:l,tight:f})},decode({type:e,value:r,...a}){let[s,u]=(0,t.getArrayType)(e);if(u){let e=c.tuple.decode({type:(0,t.getTupleType)(s,u),value:r,...a});return(0,n.assert)(e.length===u,new i.ParserError(`Array length does not match type length. Expected a length of ${u}, but received ${e.length}.`)),e}let l=(0,n.bytesToNumber)(r.subarray(0,32));return(0,o.unpack)(Array(l).fill(s),r.subarray(32))}}},17923:function(e,t,r){"use strict";
2Object.defineProperty(t,"__esModule",{value:!0}),t.bool=t.getBooleanValue=void 0;let n=r(94269),i=r(59367),o=r(89977),a=r(31150),s=(0,i.coerce)((0,i.boolean)(),(0,i.union)([(0,i.literal)("true"),(0,i.literal)("false")]),e=>"true"===e);t.getBooleanValue=e=>{try{if((0,i.create)(e,s))return BigInt(1);return BigInt(0)}catch{throw new o.ParserError(`Invalid boolean value. Expected a boolean literal, or the string "true" or "false", but received "${e}".`)}},t.bool={isDynamic:!1,isType:e=>"bool"===e,getByteLength:()=>32,encode({buffer:e,value:r,packed:i,tight:o}){let s=(0,t.getBooleanValue)(r);return i?(0,n.concatBytes)([e,(0,n.bigIntToBytes)(s)]):a.number.encode({type:"uint256",buffer:e,value:s,packed:i,tight:o})},decode:e=>a.number.decode({...e,type:"uint256"})===BigInt(1)}},89134:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bytes=void 0;let n=r(94269),i=r(39362);t.bytes={isDynamic:!0,isType:e=>"bytes"===e,getByteLength:()=>32,encode({buffer:e,value:t,packed:r}){let o=(0,n.createBytes)(t);if(r)return(0,n.concatBytes)([e,o]);let a=32*Math.ceil(o.byteLength/32);return(0,n.concatBytes)([e,(0,i.padStart)((0,n.numberToBytes)(o.byteLength)),(0,i.padEnd)(o,a)])},decode({value:e}){let t=e.subarray(0,32),r=(0,n.bytesToNumber)(t);return e.slice(32,32+r)}}},87550:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fixedBytes=t.getByteLength=void 0;let n=r(94269),i=r(89977),o=r(39362),a=/^bytes([0-9]{1,2})$/u;t.getByteLength=e=>{let t=e.match(a)?.[1];(0,n.assert)(t,`Invalid byte length. Expected a number between 1 and 32, but received "${e}".`);let r=Number(t);return(0,n.assert)(r>0&&r<=32,new i.ParserError(`Invalid byte length. Expected a number between 1 and 32, but received "${e}".`)),r},t.fixedBytes={isDynamic:!1,isType:e=>a.test(e),getByteLength:()=>32,encode({type:e,buffer:r,value:a,packed:s}){let c=(0,t.getByteLength)(e),u=(0,n.createBytes)(a);return((0,n.assert)(u.length<=c,new i.ParserError(`Expected a value of length ${c}, but received a value of length ${u.length}.`)),s)?(0,n.concatBytes)([r,(0,o.padEnd)(u,c)]):(0,n.concatBytes)([r,(0,o.padEnd)(u)])},decode({type:e,value:r}){let n=(0,t.getByteLength)(e);return r.slice(0,n)}}},24957:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fn=t.getFunction=void 0;let n=r(94269),i=r(59367),o=r(89977),a=r(87550),s=(0,i.coerce)((0,i.object)({address:n.StrictHexStruct,selector:n.StrictHexStruct}),(0,i.union)([n.StrictHexStruct,(0,i.instance)(Uint8Array)]),e=>{let t=(0,n.createBytes)(e);return(0,n.assert)(24===t.length,new o.ParserError(`Invalid Solidity function. Expected function to be 24 bytes long, but received ${t.length} bytes.`)),{address:(0,n.bytesToHex)(t.subarray(0,20)),selector:(0,n.bytesToHex)(t.subarray(20,24))}});t.getFunction=e=>{let t=(0,i.create)(e,s);return(0,n.concatBytes)([(0,n.hexToBytes)(t.address),(0,n.hexToBytes)(t.selector)])},t.fn={isDynamic:!1,isType:e=>"function"===e,getByteLength:()=>32,encode({buffer:e,value:r,packed:n,tight:i}){let o=(0,t.getFunction)(r);return a.fixedBytes.encode({type:"bytes24",buffer:e,value:o,packed:n,tight:i})},decode:({value:e})=>({address:(0,n.bytesToHex)(e.slice(0,20)),selector:(0,n.bytesToHex)(e.slice(20,24))})}},93595:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(22200),t),i(r(40987),t),i(r(17923),t),i(r(89134),t),i(r(87550),t),i(r(24957),t),i(r(31150),t),i(r(77987),t),i(r(58575),t),i(r(55247),t)},31150:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.number=t.getBigInt=t.assertNumberLength=t.getLength=t.isSigned=void 0;let n=r(94269),i=r(89977),o=r(39362),a=/^u?int(?<length>[0-9]*)?$/u;t.isSigned=e=>!e.startsWith("u"),t.getLength=e=>{if("int"===e||"uint"===e)return 256;let t=e.match(a);(0,n.assert)(t?.groups?.length,new i.ParserError(`Invalid number type. Expected a number type, but received "${e}".`));let r=parseInt(t.groups.length,10);return(0,n.assert)(r>=8&&r<=256,new i.ParserError(`Invalid number length. Expected a number between 8 and 256, but received "${e}".`)),(0,n.assert)(r%8==0,new i.ParserError(`Invalid number length. Expected a multiple of 8, but received "${e}".`)),r},t.assertNumberLength=(e,r)=>{let o=(0,t.getLength)(r),a=BigInt(2)**BigInt(o-((0,t.isSigned)(r)?1:0))-BigInt(1);if((0,t.isSigned)(r)){(0,n.assert)(e>=-(a+BigInt(1))&&e<=a,new i.ParserError(`Number "${e}" is out of range for type "${r}".`));return}(0,n.assert)(e<=a,new i.ParserError(`Number "${e}" is out of range for type "${r}".`))},t.getBigInt=e=>{try{return(0,n.createBigInt)(e)}catch{throw new i.ParserError(`Invalid number. Expected a valid number value, but received "${e}".`)}},t.number={isDynamic:!1,isType:e=>a.test(e),getByteLength:()=>32,encode({type:e,buffer:r,value:i,packed:a}){let s=(0,t.getBigInt)(i);if((0,t.assertNumberLength)(s,e),(0,t.isSigned)(e)){if(a){let i=(0,t.getLength)(e)/8;
2return(0,n.concatBytes)([r,(0,n.signedBigIntToBytes)(s,i)])}return(0,n.concatBytes)([r,(0,o.padStart)((0,n.signedBigIntToBytes)(s,32))])}if(a){let i=(0,t.getLength)(e)/8;return(0,n.concatBytes)([r,(0,o.padStart)((0,n.bigIntToBytes)(s),i)])}return(0,n.concatBytes)([r,(0,o.padStart)((0,n.bigIntToBytes)(s))])},decode({type:e,value:r}){let i=r.subarray(0,32);if((0,t.isSigned)(e)){let r=(0,n.bytesToSignedBigInt)(i);return(0,t.assertNumberLength)(r,e),r}let o=(0,n.bytesToBigInt)(i);return(0,t.assertNumberLength)(o,e),o}}},77987:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},58575:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.string=void 0;let n=r(94269),i=r(89134);t.string={isDynamic:!0,isType:e=>"string"===e,getByteLength:()=>32,encode:({buffer:e,value:t,packed:r,tight:o})=>i.bytes.encode({type:"bytes",buffer:e,value:(0,n.stringToBytes)(t),packed:r,tight:o}),decode:e=>(0,n.bytesToString)(i.bytes.decode(e))}},55247:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.tuple=t.getTupleElements=void 0;let n=r(94269),i=r(89977),o=r(52086),a=/^\((.+)\)$/u,s=e=>a.test(e);t.getTupleElements=e=>{(0,n.assert)(e.startsWith("(")&&e.endsWith(")"),new i.ParserError(`Invalid tuple type. Expected tuple type, but received "${e}".`));let t=[],r="",o=0;for(let n=1;n<e.length-1;n++){let i=e[n];","===i&&0===o?(t.push(r.trim()),r=""):(r+=i,"("===i?o+=1:")"===i&&(o-=1))}return r.trim()&&t.push(r.trim()),t},t.tuple={isDynamic:e=>(0,t.getTupleElements)(e).some(e=>{let t=(0,o.getParser)(e);return(0,o.isDynamicParser)(t,e)}),isType:e=>s(e),getByteLength(e){return(0,o.isDynamicParser)(this,e)?32:(0,t.getTupleElements)(e).reduce((e,t)=>e+(0,o.getParser)(t).getByteLength(t),0)},encode({type:e,buffer:r,value:n,packed:i,tight:a}){let s=(0,t.getTupleElements)(e);return(0,o.pack)({types:s,values:n,byteArray:r,packed:i,tight:a})},decode({type:e,value:r,skip:n}){let i=(0,t.getTupleElements)(e);return n(this.getByteLength(e)-32),(0,o.unpack)(i,r)}}},3050:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},14083:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(3050),t)},20193:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.padEnd=t.padStart=t.set=void 0;let n=r(94269),i=32;t.set=(e,t,r)=>(0,n.concatBytes)([e.subarray(0,r),t,e.subarray(r+t.length)]),t.padStart=(e,t=i)=>{let r=new Uint8Array(Math.max(t-e.length,0)).fill(0);return(0,n.concatBytes)([r,e])},t.padEnd=(e,t=i)=>{let r=new Uint8Array(Math.max(t-e.length,0)).fill(0);return(0,n.concatBytes)([e,r])}},39362:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(20193),t)},57721:function(e,t,r){"use strict";var n=r(82957).Buffer,i=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}
2),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&i(t,e,r);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.getEncryptionPublicKey=t.decryptSafely=t.decrypt=t.encryptSafely=t.encrypt=void 0;let s=r(25291),c=a(r(75807)),u=r(17651);function l({publicKey:e,data:t,version:r}){if((0,u.isNullish)(e))throw Error("Missing publicKey parameter");if((0,u.isNullish)(t))throw Error("Missing data parameter");if((0,u.isNullish)(r))throw Error("Missing version parameter");if("x25519-xsalsa20-poly1305"===r){let r;if("string"!=typeof t)throw Error("Message data must be given as a string");let n=c.box.keyPair();try{r=s.base64.decode(e)}catch(e){throw Error("Bad public key")}let i=s.utf8.decode(t),o=c.randomBytes(c.box.nonceLength),a=c.box(i,o,r,n.secretKey);return{version:"x25519-xsalsa20-poly1305",nonce:s.base64.encode(o),ephemPublicKey:s.base64.encode(n.publicKey),ciphertext:s.base64.encode(a)}}throw Error("Encryption type/version not supported")}function f({encryptedData:e,privateKey:t}){if((0,u.isNullish)(e))throw Error("Missing encryptedData parameter");if((0,u.isNullish)(t))throw Error("Missing privateKey parameter");if("x25519-xsalsa20-poly1305"===e.version){let r=n.from(t,"hex"),i=c.box.keyPair.fromSecretKey(r).secretKey,o=s.base64.decode(e.nonce),a=s.base64.decode(e.ciphertext),u=s.base64.decode(e.ephemPublicKey),l=c.box.open(a,o,u,i);try{if(!l)throw Error();let e=s.utf8.encode(l);if(!e)throw Error();return e}catch(e){if(e&&"string"==typeof e.message&&e.message.length)throw Error(`Decryption failed: ${e.message}`);throw Error("Decryption failed.")}}throw Error("Encryption type/version not supported.")}t.encrypt=l,t.encryptSafely=function({publicKey:e,data:t,version:r}){if((0,u.isNullish)(e))throw Error("Missing publicKey parameter");if((0,u.isNullish)(t))throw Error("Missing data parameter");if((0,u.isNullish)(r))throw Error("Missing version parameter");if("object"==typeof t&&t&&"toJSON"in t)throw Error("Cannot encrypt with toJSON property.  Please remove toJSON property");let i={data:t,padding:""},o=n.byteLength(JSON.stringify(i),"utf-8")%2048,a=0;return o>0&&(a=2048-o-16),i.padding="0".repeat(a),l({publicKey:e,data:JSON.stringify(i),version:r})},t.decrypt=f,t.decryptSafely=function({encryptedData:e,privateKey:t}){if((0,u.isNullish)(e))throw Error("Missing encryptedData parameter");if((0,u.isNullish)(t))throw Error("Missing privateKey parameter");return JSON.parse(f({encryptedData:e,privateKey:t})).data},t.getEncryptionPublicKey=function(e){let t=n.from(e,"hex"),r=c.box.keyPair.fromSecretKey(t).publicKey;return s.base64.encode(r)}},39978:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.normalize=t.concatSig=void 0,i(r(93027),t),i(r(56777),t),i(r(57721),t);var o=r(17651);Object.defineProperty(t,"concatSig",{enumerable:!0,get:function(){return o.concatSig}}),Object.defineProperty(t,"normalize",{enumerable:!0,get:function(){return o.normalize}})},93027:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.extractPublicKey=t.recoverPersonalSignature=t.personalSign=void 0;let n=r(26621),i=r(17651);function o(e,t){let r=(0,n.hashPersonalMessage)((0,i.legacyToBuffer)(e));return(0,i.recoverPublicKey)(r,t)}t.personalSign=function({privateKey:e,data:t}){if((0,i.isNullish)(t))throw Error("Missing data parameter");if((0,i.isNullish)(e))throw Error("Missing privateKey parameter");let r=(0,i.legacyToBuffer)(t),o=(0,n.hashPersonalMessage)(r),a=(0,n.ecsign)(o,e);return(0,i.concatSig)((0,n.toBuffer)(a.v),a.r,a.s)},t.recoverPersonalSignature=function({data:e,signature:t}){if((0,i.isNullish)(e))throw Error("Missing data parameter");if((0,i.isNullish)(t))throw Error("Missing signature parameter");let r=o(e,t),a=(0,n.publicToAddress)(r);return(0,n.bufferToHex)(a)},t.extractPublicKey=function({data:e,signature:t}){if((0,i.isNullish)(e))throw Error("Missing data parameter");if((0,i.isNullish)(t))throw Error("Missing signature parameter");let r=o(e,t);return`0x${r.toString("hex")}`}},56777:function(e,t,r){"use strict";var n,i;
2Object.defineProperty(t,"__esModule",{value:!0}),t.recoverTypedSignature=t.signTypedData=t.typedSignatureHash=t.TypedDataUtils=t.TYPED_MESSAGE_SCHEMA=t.SignTypedDataVersion=void 0;let o=r(26621),a=r(61690),s=r(93595),c=r(39362),u=r(94269),l=r(82041),f=r(17651);function h(e,t){if(Object.keys(n).includes(e)){if(t&&!t.includes(e))throw Error(`SignTypedDataVersion not allowed: '${e}'. Allowed versions are: ${t.join(", ")}`)}else throw Error(`Invalid version: '${e}'`)}function d(e,t){(0,u.assert)(null!==t,`Unable to encode value: Invalid number. Expected a valid number value, but received "${t}".`);let r=BigInt(t),n=(0,s.getLength)(e),i=BigInt(2)**BigInt(n)-BigInt(1);return(0,u.assert)(r>=-i&&r<=i,`Unable to encode value: Number "${t}" is out of range for type "${e}".`),r}function p(e,t,r,i){h(i,[n.V3,n.V4]);let s=["bytes32"],f=[b(e,r)];for(let m of r[e]){if(i===n.V3&&void 0===t[m.name])continue;let[e,g]=function e(t,r,i,s,f){if(h(f,[n.V3,n.V4]),void 0!==t[i])return["bytes32",f===n.V4&&null==s?"0x0000000000000000000000000000000000000000000000000000000000000000":(0,o.arrToBufArr)((0,l.keccak256)(p(i,s,t,f)))];if("function"===i)throw Error('Unsupported or invalid type: "function"');if(void 0===s)throw Error(`missing value for field ${r} of type ${i}`);if("address"===i){if("number"==typeof s)return["address",(0,c.padStart)((0,u.numberToBytes)(s),20)];if((0,u.isStrictHexString)(s))return["address",(0,u.add0x)(s)];if("string"==typeof s)return["address",(function(e){let t=BigInt(0);for(let r=0;r<e.length;r++){let n=BigInt(e.charCodeAt(r)-48);t*=BigInt(10),n>=49?t+=n-BigInt(49)+BigInt(10):n>=17?t+=n-BigInt(17)+BigInt(10):t+=n}return(0,c.padStart)((0,u.bigIntToBytes)(t),20)})(s).subarray(0,20)]}if("bool"===i)return["bool",!!s];if("bytes"===i)return"number"==typeof s?s=(0,u.numberToBytes)(s):(0,u.isStrictHexString)(s)||"0x"===s?s=(0,u.hexToBytes)(s):"string"==typeof s&&(s=(0,u.stringToBytes)(s)),["bytes32",(0,o.arrToBufArr)((0,l.keccak256)(s))];if(i.startsWith("bytes")&&"bytes"!==i&&!i.includes("["))return"number"==typeof s?s<0?["bytes32",new Uint8Array(32)]:["bytes32",(0,u.bigIntToBytes)(BigInt(s))]:(0,u.isStrictHexString)(s)?["bytes32",(0,u.hexToBytes)(s)]:["bytes32",s];if(i.startsWith("int")&&!i.includes("[")){let e=d(i,s);return e>=BigInt(0)?["uint256",e]:["int256",e]}if("string"===i)return s="number"==typeof s?(0,u.numberToBytes)(s):(0,u.stringToBytes)(null!=s?s:""),["bytes32",(0,o.arrToBufArr)((0,l.keccak256)(s))];if(i.endsWith("]")){if(f===n.V3)throw Error("Arrays are unimplemented in encodeData; use V4 extension");let c=i.slice(0,i.lastIndexOf("[")),u=s.map(n=>e(t,r,c,n,f));return["bytes32",(0,o.arrToBufArr)((0,l.keccak256)((0,a.encode)(u.map(([e])=>e),u.map(([,e])=>e))))]}return[i,s]}(r,m.name,m.type,t[m.name],i);s.push(e),f.push(g)}return(0,o.arrToBufArr)((0,a.encode)(s,f))}function m(e,t){let r="",n=g(e,t);for(let i of(n.delete(e),[e,...Array.from(n).sort()])){if(!t[i])throw Error(`No type definition specified: ${i}`);r+=`${i}(${t[i].map(({name:e,type:t})=>`${t} ${e}`).join(",")})`}return r}function g(e,t,r=new Set){if("string"!=typeof e)throw Error(`Invalid findTypeDependencies input ${JSON.stringify(e)}`);let n=e.match(/^\w*/u);if([e]=n,r.has(e)||void 0===t[e])return r;for(let n of(r.add(e),t[e]))g(n.type,t,r);return r}function y(e,t,r,i){h(i,[n.V3,n.V4]);let a=p(e,t,r,i),s=(0,l.keccak256)(a);return(0,o.arrToBufArr)(s)}function b(e,t){let r=(0,u.stringToBytes)(m(e,t));return(0,o.arrToBufArr)((0,l.keccak256)(r))}function v(e){let r={};for(let n in t.TYPED_MESSAGE_SCHEMA.properties)e[n]&&(r[n]=e[n]);return"types"in r&&(r.types=Object.assign({EIP712Domain:[]},r.types)),r}function E(e,t){h(t,[n.V3,n.V4]);let r=v(e),{domain:i}=r;return y("EIP712Domain",i,{EIP712Domain:r.types.EIP712Domain},t)}function w(e){let t=Error("Expect argument to be non-empty array");if("object"!=typeof e||!("length"in e)||!e.length)throw t;let r=e.map(({name:e,type:t,value:r})=>{if("address[]"===t)return{name:e,type:"bytes32[]",value:r.map(e=>"number"==typeof e?(0,c.padStart)((0,u.numberToBytes)(e),32):(0,u.isStrictHexString)(e)?(0,c.padStart)((0,u.hexToBytes)(e).subarray(0,32),32):e instanceof Uint8Array?(0,c.padStart)(e.subarray(0,32),32):e)};if(t.startsWith("int")&&(0,s.isArrayType)(t)){let[n,i]=(0,s.getArrayType)(t);return{name:e,type:`bytes32[${null!=i?i:""}]`,value:r.map(e=>{if("string"==typeof e||"number"==typeof e||"bigint"==typeof e){let t=d(n,e);if(t>=BigInt(0))return(0,c.padStart)((0,u.bigIntToBytes)(t),32);let r=BigInt.asIntN((0,s.getLength)(n),t);return(0,u.signedBigIntToBytes)(r,32)}return e})}}return{name:e,type:t,value:function e(t,r){if((0,s.isArrayType)(t)&&Array.isArray(r)){let[n]=(0,s.getArrayType)(t);return r.map(t=>e(n,t))}if("address"===t){if("number"==typeof r)return(0,c.padStart)((0,u.numberToBytes)(r),20);if((0,u.isStrictHexString)(r))return(0,c.padStart)((0,u.hexToBytes)(r).subarray(0,20),20);if(r instanceof Uint8Array)return(0,c.padStart)(r.subarray(0,20),20)}if("bool"===t)return!!r;if(t.startsWith("bytes")&&"bytes"!==t){let e=(0,s.getByteLength)(t);if("number"==typeof r)return r<0?new Uint8Array:(0,u.numberToBytes)(r).subarray(0,e);if((0,u.isStrictHexString)(r))return(0,u.hexToBytes)(r).subarray(0,e);if(r instanceof Uint8Array)return r.subarray(0,e)}return t.startsWith("uint")&&"number"==typeof r?Math.abs(r):t.startsWith("int")&&"number"==typeof r?BigInt.asIntN((0,s.getLength)(t),BigInt(r)):r}(t,r)}}),n=r.map(e=>"bytes"!==e.type?e.value:(0,f.legacyToBuffer)(e.value)),i=r.map(e=>{if("function"===e.type)throw Error('Unsupported or invalid type: "function"');return e.type}),h=e.map(e=>{if(!e.name)throw t;return`${e.type} ${e.name}`});return(0,o.arrToBufArr)((0,l.keccak256)((0,a.encodePacked)(["bytes32","bytes32"],[(0,l.keccak256)((0,a.encodePacked)(["string[]"],[h],!0)),(0,l.keccak256)((0,a.encodePacked)(i,n,!0))])))}(i=n=t.SignTypedDataVersion||(t.SignTypedDataVersion={})).V1="V1",i.V3="V3",i.V4="V4",t.TYPED_MESSAGE_SCHEMA={type:"object",properties:{types:{type:"object",additionalProperties:{type:"array",items:{type:"object",properties:{name:{type:"string"},type:{type:"string"}},required:["name","type"]}}},primaryType:{type:"string"},domain:{type:"object"},message:{type:"object"}},required:["types","primaryType","domain","message"]},t.TypedDataUtils={encodeData:p,encodeType:m,findTypeDependencies:g,hashStruct:y,hashType:b,sanitizeData:v,eip712Hash:function(e,t){h(t,[n.V3,n.V4]);let r=v(e),i=[(0,u.hexToBytes)("1901")];return i.push(E(e,t)),"EIP712Domain"!==r.primaryType&&i.push(y(r.primaryType,r.message,r.types,t)),(0,o.arrToBufArr)((0,l.keccak256)((0,u.concatBytes)(i)))},eip712DomainHash:E},t.typedSignatureHash=function(e){let t=w(e);return(0,u.bytesToHex)(t)},t.signTypedData=function({privateKey:e,data:r,version:i}){if(h(i),(0,f.isNullish)(r))throw Error("Missing data parameter");if((0,f.isNullish)(e))throw Error("Missing private key parameter");let a=i===n.V1?w(r):t.TypedDataUtils.eip712Hash(r,i),s=(0,o.ecsign)(a,e);return(0,f.concatSig)((0,o.arrToBufArr)((0,u.bigIntToBytes)(s.v)),s.r,s.s)},t.recoverTypedSignature=function({data:e,signature:r,version:i}){if(h(i),(0,f.isNullish)(e))throw Error("Missing data parameter");if((0,f.isNullish)(r))throw Error("Missing signature parameter");let a=i===n.V1?w(e):t.TypedDataUtils.eip712Hash(e,i),s=(0,f.recoverPublicKey)(a,r),c=(0,o.publicToAddress)(s);return(0,u.bytesToHex)(c)}},17651:function(e,t,r){"use strict";var n=r(82957).Buffer;
2Object.defineProperty(t,"__esModule",{value:!0}),t.normalize=t.recoverPublicKey=t.concatSig=t.legacyToBuffer=t.isNullish=t.padWithZeroes=void 0;let i=r(26621),o=r(94269);function a(e,t){if(""!==e&&!/^[a-f0-9]+$/iu.test(e))throw Error(`Expected an unprefixed hex string. Received: ${e}`);if(t<0)throw Error(`Expected a non-negative integer target length. Received: ${t}`);return String.prototype.padStart.call(e,t,"0")}function s(e){return null==e}t.padWithZeroes=a,t.isNullish=s,t.legacyToBuffer=function(e){return"string"!=typeof e||(0,i.isHexString)(e)?(0,i.toBuffer)(e):n.from(e)},t.concatSig=function(e,t,r){let n=(0,i.fromSigned)(t),s=(0,i.fromSigned)(r),c=(0,i.bufferToInt)(e),u=a((0,i.toUnsigned)(n).toString("hex"),64),l=a((0,i.toUnsigned)(s).toString("hex"),64),f=(0,o.remove0x)((0,o.numberToHex)(c));return(0,o.add0x)(u.concat(l,f))},t.recoverPublicKey=function(e,t){let r=(0,i.fromRpcSig)(t);return(0,i.ecrecover)(e,r.v,r.r,r.s)},t.normalize=function(e){if(!s(e)){if("number"==typeof e){if(e<0)return"0x";let t=(0,o.numberToBytes)(e);e=(0,o.bytesToHex)(t)}if("string"!=typeof e){let t="eth-sig-util.normalize() requires hex string or integer input.";throw Error(t+=` received ${typeof e}: ${e}`)}return(0,o.add0x)(e.toLowerCase())}}},20632:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createCurve=t.getHash=void 0;let n=r(26530),i=r(28772),o=r(47814);function a(e){return{hash:e,hmac:(t,...r)=>(0,n.hmac)(e,t,(0,i.concatBytes)(...r)),randomBytes:i.randomBytes}}t.getHash=a,t.createCurve=function(e,t){let r=t=>(0,o.weierstrass)({...e,...a(t)});return Object.freeze({...r(t),create:r})}},12316:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateBasic=t.wNAF=void 0;let n=r(1241),i=r(36170),o=BigInt(0),a=BigInt(1);t.wNAF=function(e,t){let r=(e,t)=>{let r=t.negate();return e?r:t},n=e=>({windows:Math.ceil(t/e)+1,windowSize:2**(e-1)});return{constTimeNegate:r,unsafeLadder(t,r){let n=e.ZERO,i=t;for(;r>o;)r&a&&(n=n.add(i)),i=i.double(),r>>=a;return n},precomputeWindow(e,t){let{windows:r,windowSize:i}=n(t),o=[],a=e,s=a;for(let e=0;e<r;e++){s=a,o.push(s);for(let e=1;e<i;e++)s=s.add(a),o.push(s);a=s.double()}return o},wNAF(t,i,o){let{windows:s,windowSize:c}=n(t),u=e.ZERO,l=e.BASE,f=BigInt(2**t-1),h=2**t,d=BigInt(t);for(let e=0;e<s;e++){let t=e*c,n=Number(o&f);o>>=d,n>c&&(n-=h,o+=a);let s=t+Math.abs(n)-1,p=e%2!=0,m=n<0;0===n?l=l.add(r(p,i[t])):u=u.add(r(m,i[s]))}return{p:u,f:l}},wNAFCached(e,t,r,n){let i=e._WINDOW_SIZE||1,o=t.get(e);return o||(o=this.precomputeWindow(e,i),1!==i&&t.set(e,n(o))),this.wNAF(i,o,r)}}},t.validateBasic=function(e){return(0,n.validateField)(e.Fp),(0,i.validateObject)(e,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...(0,n.nLength)(e.n,e.nBitLength),...e,p:e.Fp.ORDER})}},19651:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createHasher=t.isogenyMap=t.hash_to_field=t.expand_message_xof=t.expand_message_xmd=void 0;let n=r(1241),i=r(36170),o=i.bytesToNumberBE;function a(e,t){if(e<0||e>=1<<8*t)throw Error(`bad I2OSP call: value=${e} length=${t}`);let r=Array.from({length:t}).fill(0);for(let n=t-1;n>=0;n--)r[n]=255&e,e>>>=8;return new Uint8Array(r)}function s(e){if(!Number.isSafeInteger(e))throw Error("number expected")}function c(e,t,r,n){(0,i.abytes)(e),(0,i.abytes)(t),s(r),t.length>255&&(t=n((0,i.concatBytes)((0,i.utf8ToBytes)("H2C-OVERSIZE-DST-"),t)));let{outputLen:o,blockLen:c}=n,u=Math.ceil(r/o);if(u>255)throw Error("Invalid xmd length");let l=(0,i.concatBytes)(t,a(t.length,1)),f=a(0,c),h=a(r,2),d=Array(u),p=n((0,i.concatBytes)(f,e,h,a(0,1),l));d[0]=n((0,i.concatBytes)(p,a(1,1),l));for(let e=1;e<=u;e++){let t=[function(e,t){let r=new Uint8Array(e.length);for(let n=0;n<e.length;n++)r[n]=e[n]^t[n];return r}(p,d[e-1]),a(e+1,1),l];d[e]=n((0,i.concatBytes)(...t))}return(0,i.concatBytes)(...d).slice(0,r)}function u(e,t,r,n,o){if((0,i.abytes)(e),(0,i.abytes)(t),s(r),t.length>255&&(t=o.create({dkLen:Math.ceil(2*n/8)}).update((0,i.utf8ToBytes)("H2C-OVERSIZE-DST-")).update(t).digest()),r>65535||t.length>255)throw Error("expand_message_xof: invalid lenInBytes");return o.create({dkLen:r}).update(e).update(a(r,2)).update(t).update(a(t.length,1)).digest()}function l(e,t,r){let a;(0,i.validateObject)(r,{DST:"stringOrUint8Array",p:"bigint",m:"isSafeInteger",k:"isSafeInteger",hash:"hash"});let{p:l,k:f,m:h,hash:d,expand:p,DST:m}=r;(0,i.abytes)(e),s(t);let g="string"==typeof m?(0,i.utf8ToBytes)(m):m,y=Math.ceil((l.toString(2).length+f)/8),b=t*h*y;if("xmd"===p)a=c(e,g,b,d);else if("xof"===p)a=u(e,g,b,f,d);else if("_internal_pass"===p)a=e;else throw Error('expand must be "xmd" or "xof"');let v=Array(t);for(let e=0;e<t;e++){let t=Array(h);for(let r=0;r<h;r++){let i=y*(r+e*h),s=a.subarray(i,i+y);t[r]=(0,n.mod)(o(s),l)}v[e]=t}return v}t.expand_message_xmd=c,t.expand_message_xof=u,t.hash_to_field=l,t.isogenyMap=function(e,t){let r=t.map(e=>Array.from(e).reverse());return(t,n)=>{let[i,o,a,s]=r.map(r=>r.reduce((r,n)=>e.add(e.mul(r,t),n)));return t=e.div(i,o),n=e.mul(n,e.div(a,s)),{x:t,y:n}}},t.createHasher=function(e,t,r){if("function"!=typeof t)throw Error("mapToCurve() must be defined");return{hashToCurve(n,i){let o=l(n,2,{...r,DST:r.DST,...i}),a=e.fromAffine(t(o[0])),s=e.fromAffine(t(o[1])),c=a.add(s).clearCofactor();return c.assertValidity(),c},encodeToCurve(n,i){let o=l(n,1,{...r,DST:r.encodeDST,...i}),a=e.fromAffine(t(o[0])).clearCofactor();return a.assertValidity(),a}}}},1241:function(e,t,r){"use strict";
2Object.defineProperty(t,"__esModule",{value:!0}),t.mapHashToField=t.getMinHashLength=t.getFieldBytesLength=t.hashToPrivateScalar=t.FpSqrtEven=t.FpSqrtOdd=t.Field=t.nLength=t.FpIsSquare=t.FpDiv=t.FpInvertBatch=t.FpPow=t.validateField=t.isNegativeLE=t.FpSqrt=t.tonelliShanks=t.invert=t.pow2=t.pow=t.mod=void 0;let n=r(36170),i=BigInt(0),o=BigInt(1),a=BigInt(2),s=BigInt(3),c=BigInt(4),u=BigInt(5),l=BigInt(8);function f(e,t){let r=e%t;return r>=i?r:t+r}function h(e,t,r){if(r<=i||t<i)throw Error("Expected power/modulo > 0");if(r===o)return i;let n=o;for(;t>i;)t&o&&(n=n*e%r),e=e*e%r,t>>=o;return n}function d(e,t){if(e===i||t<=i)throw Error(`invert: expected positive integers, got n=${e} mod=${t}`);let r=f(e,t),n=t,a=i,s=o,c=o,u=i;for(;r!==i;){let e=n/r,t=n%r,i=a-c*e,o=s-u*e;n=r,r=t,a=c,s=u,c=i,u=o}if(n!==o)throw Error("invert: does not exist");return f(a,t)}function p(e){let t,r,n;let s=(e-o)/a;for(t=e-o,r=0;t%a===i;t/=a,r++);for(n=a;n<e&&h(n,s,e)!==e-o;n++);if(1===r){let t=(e+o)/c;return function(e,r){let n=e.pow(r,t);if(!e.eql(e.sqr(n),r))throw Error("Cannot find square root");return n}}let u=(t+o)/a;return function(e,i){if(e.pow(i,s)===e.neg(e.ONE))throw Error("Cannot find square root");let a=r,c=e.pow(e.mul(e.ONE,n),t),l=e.pow(i,u),f=e.pow(i,t);for(;!e.eql(f,e.ONE);){if(e.eql(f,e.ZERO))return e.ZERO;let t=1;for(let r=e.sqr(f);t<a&&!e.eql(r,e.ONE);t++)r=e.sqr(r);let r=e.pow(c,o<<BigInt(a-t-1));c=e.sqr(r),l=e.mul(l,r),f=e.mul(f,c),a=t}return l}}function m(e){if(e%c===s){let t=(e+o)/c;return function(e,r){let n=e.pow(r,t);if(!e.eql(e.sqr(n),r))throw Error("Cannot find square root");return n}}if(e%l===u){let t=(e-u)/l;return function(e,r){let n=e.mul(r,a),i=e.pow(n,t),o=e.mul(r,i),s=e.mul(e.mul(o,a),i),c=e.mul(o,e.sub(s,e.ONE));if(!e.eql(e.sqr(c),r))throw Error("Cannot find square root");return c}}return p(e)}BigInt(9),BigInt(16),t.mod=f,t.pow=h,t.pow2=function(e,t,r){let n=e;for(;t-- >i;)n*=n,n%=r;return n},t.invert=d,t.tonelliShanks=p,t.FpSqrt=m,t.isNegativeLE=(e,t)=>(f(e,t)&o)===o;let g=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function y(e,t,r){if(r<i)throw Error("Expected power > 0");if(r===i)return e.ONE;if(r===o)return t;let n=e.ONE,a=t;for(;r>i;)r&o&&(n=e.mul(n,a)),a=e.sqr(a),r>>=o;return n}function b(e,t){let r=Array(t.length),n=t.reduce((t,n,i)=>e.is0(n)?t:(r[i]=t,e.mul(t,n)),e.ONE),i=e.inv(n);return t.reduceRight((t,n,i)=>e.is0(n)?t:(r[i]=e.mul(t,r[i]),e.mul(t,n)),i),r}function v(e,t){let r=void 0!==t?t:e.toString(2).length;return{nBitLength:r,nByteLength:Math.ceil(r/8)}}function E(e){if("bigint"!=typeof e)throw Error("field order must be bigint");return Math.ceil(e.toString(2).length/8)}function w(e){let t=E(e);return t+Math.ceil(t/2)}t.validateField=function(e){let t=g.reduce((e,t)=>(e[t]="function",e),{ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"});return(0,n.validateObject)(e,t)},t.FpPow=y,t.FpInvertBatch=b,t.FpDiv=function(e,t,r){return e.mul(t,"bigint"==typeof r?d(r,e.ORDER):e.inv(r))},t.FpIsSquare=function(e){let t=(e.ORDER-o)/a;return r=>{let n=e.pow(r,t);return e.eql(n,e.ZERO)||e.eql(n,e.ONE)}},t.nLength=v,t.Field=function(e,t,r=!1,a={}){if(e<=i)throw Error(`Expected Field ORDER > 0, got ${e}`);let{nBitLength:s,nByteLength:c}=v(e,t);if(c>2048)throw Error("Field lengths over 2048 bytes are not supported");let u=m(e),l=Object.freeze({ORDER:e,BITS:s,BYTES:c,MASK:(0,n.bitMask)(s),ZERO:i,ONE:o,create:t=>f(t,e),isValid:t=>{if("bigint"!=typeof t)throw Error(`Invalid field element: expected bigint, got ${typeof t}`);return i<=t&&t<e},is0:e=>e===i,isOdd:e=>(e&o)===o,neg:t=>f(-t,e),eql:(e,t)=>e===t,sqr:t=>f(t*t,e),add:(t,r)=>f(t+r,e),sub:(t,r)=>f(t-r,e),mul:(t,r)=>f(t*r,e),pow:(e,t)=>y(l,e,t),div:(t,r)=>f(t*d(r,e),e),sqrN:e=>e*e,addN:(e,t)=>e+t,subN:(e,t)=>e-t,mulN:(e,t)=>e*t,inv:t=>d(t,e),sqrt:a.sqrt||(e=>u(l,e)),invertBatch:e=>b(l,e),cmov:(e,t,r)=>r?t:e,toBytes:e=>r?(0,n.numberToBytesLE)(e,c):(0,n.numberToBytesBE)(e,c),fromBytes:e=>{if(e.length!==c)throw Error(`Fp.fromBytes: expected ${c}, got ${e.length}`);return r?(0,n.bytesToNumberLE)(e):(0,n.bytesToNumberBE)(e)}});return Object.freeze(l)},t.FpSqrtOdd=function(e,t){if(!e.isOdd)throw Error("Field doesn't have isOdd");let r=e.sqrt(t);return e.isOdd(r)?r:e.neg(r)},t.FpSqrtEven=function(e,t){if(!e.isOdd)throw Error("Field doesn't have isOdd");let r=e.sqrt(t);return e.isOdd(r)?e.neg(r):r},t.hashToPrivateScalar=function(e,t,r=!1){let i=(e=(0,n.ensureBytes)("privateHash",e)).length,a=v(t).nByteLength+8;if(a<24||i<a||i>1024)throw Error(`hashToPrivateScalar: expected ${a}-1024 bytes of input, got ${i}`);return f(r?(0,n.bytesToNumberLE)(e):(0,n.bytesToNumberBE)(e),t-o)+o},t.getFieldBytesLength=E,t.getMinHashLength=w,t.mapHashToField=function(e,t,r=!1){let i=e.length,a=E(t),s=w(t);if(i<16||i<s||i>1024)throw Error(`expected ${s}-1024 bytes of input, got ${i}`);let c=f(r?(0,n.bytesToNumberBE)(e):(0,n.bytesToNumberLE)(e),t-o)+o;return r?(0,n.numberToBytesLE)(c,a):(0,n.numberToBytesBE)(c,a)}},36170:function(e,t){"use strict";
2Object.defineProperty(t,"__esModule",{value:!0}),t.validateObject=t.createHmacDrbg=t.bitMask=t.bitSet=t.bitGet=t.bitLen=t.utf8ToBytes=t.equalBytes=t.concatBytes=t.ensureBytes=t.numberToVarBytesBE=t.numberToBytesLE=t.numberToBytesBE=t.bytesToNumberLE=t.bytesToNumberBE=t.hexToBytes=t.hexToNumber=t.numberToHexUnpadded=t.bytesToHex=t.abytes=t.isBytes=void 0;let r=BigInt(0),n=BigInt(1),i=BigInt(2);function o(e){return e instanceof Uint8Array||null!=e&&"object"==typeof e&&"Uint8Array"===e.constructor.name}function a(e){if(!o(e))throw Error("Uint8Array expected")}t.isBytes=o,t.abytes=a;let s=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function c(e){a(e);let t="";for(let r=0;r<e.length;r++)t+=s[e[r]];return t}function u(e){let t=e.toString(16);return 1&t.length?`0${t}`:t}function l(e){if("string"!=typeof e)throw Error("hex string expected, got "+typeof e);return BigInt(""===e?"0":`0x${e}`)}t.bytesToHex=c,t.numberToHexUnpadded=u,t.hexToNumber=l;let f={_0:48,_9:57,_A:65,_F:70,_a:97,_f:102};function h(e){return e>=f._0&&e<=f._9?e-f._0:e>=f._A&&e<=f._F?e-(f._A-10):e>=f._a&&e<=f._f?e-(f._a-10):void 0}function d(e){if("string"!=typeof e)throw Error("hex string expected, got "+typeof e);let t=e.length,r=t/2;if(t%2)throw Error("padded hex string expected, got unpadded hex of length "+t);let n=new Uint8Array(r);for(let t=0,i=0;t<r;t++,i+=2){let r=h(e.charCodeAt(i)),o=h(e.charCodeAt(i+1));if(void 0===r||void 0===o)throw Error('hex string expected, got non-hex character "'+(e[i]+e[i+1])+'" at index '+i);n[t]=16*r+o}return n}function p(e,t){return d(e.toString(16).padStart(2*t,"0"))}function m(...e){let t=0;for(let r=0;r<e.length;r++){let n=e[r];a(n),t+=n.length}let r=new Uint8Array(t);for(let t=0,n=0;t<e.length;t++){let i=e[t];r.set(i,n),n+=i.length}return r}t.hexToBytes=d,t.bytesToNumberBE=function(e){return l(c(e))},t.bytesToNumberLE=function(e){return a(e),l(c(Uint8Array.from(e).reverse()))},t.numberToBytesBE=p,t.numberToBytesLE=function(e,t){return p(e,t).reverse()},t.numberToVarBytesBE=function(e){return d(u(e))},t.ensureBytes=function(e,t,r){let n;if("string"==typeof t)try{n=d(t)}catch(r){throw Error(`${e} must be valid hex string, got "${t}". Cause: ${r}`)}else if(o(t))n=Uint8Array.from(t);else throw Error(`${e} must be hex string or Uint8Array`);let i=n.length;if("number"==typeof r&&i!==r)throw Error(`${e} expected ${r} bytes, got ${i}`);return n},t.concatBytes=m,t.equalBytes=function(e,t){if(e.length!==t.length)return!1;let r=0;for(let n=0;n<e.length;n++)r|=e[n]^t[n];return 0===r},t.utf8ToBytes=function(e){if("string"!=typeof e)throw Error(`utf8ToBytes expected string, got ${typeof e}`);return new Uint8Array(new TextEncoder().encode(e))},t.bitLen=function(e){let t;for(t=0;e>r;e>>=n,t+=1);return t},t.bitGet=function(e,t){return e>>BigInt(t)&n},t.bitSet=function(e,t,i){return e|(i?n:r)<<BigInt(t)},t.bitMask=e=>(i<<BigInt(e-1))-n;let g=e=>new Uint8Array(e),y=e=>Uint8Array.from(e);t.createHmacDrbg=function(e,t,r){if("number"!=typeof e||e<2)throw Error("hashLen must be a number");if("number"!=typeof t||t<2)throw Error("qByteLen must be a number");if("function"!=typeof r)throw Error("hmacFn must be a function");let n=g(e),i=g(e),o=0,a=()=>{n.fill(1),i.fill(0),o=0},s=(...e)=>r(i,n,...e),c=(e=g())=>{i=s(y([0]),e),n=s(),0!==e.length&&(i=s(y([1]),e),n=s())},u=()=>{if(o++>=1e3)throw Error("drbg: tried 1000 values");let e=0,r=[];for(;e<t;){let t=(n=s()).slice();r.push(t),e+=n.length}return m(...r)};return(e,t)=>{let r;for(a(),c(e);!(r=t(u()));)c();return a(),r}};let b={bigint:e=>"bigint"==typeof e,function:e=>"function"==typeof e,boolean:e=>"boolean"==typeof e,string:e=>"string"==typeof e,stringOrUint8Array:e=>"string"==typeof e||o(e),isSafeInteger:e=>Number.isSafeInteger(e),array:e=>Array.isArray(e),field:(e,t)=>t.Fp.isValid(e),hash:e=>"function"==typeof e&&Number.isSafeInteger(e.outputLen)};t.validateObject=function(e,t,r={}){let n=(t,r,n)=>{let i=b[r];if("function"!=typeof i)throw Error(`Invalid validator "${r}", expected function`);let o=e[t];if((!n||void 0!==o)&&!i(o,e))throw Error(`Invalid param ${String(t)}=${o} (${typeof o}), expected ${r}`)};for(let[e,r]of Object.entries(t))n(e,r,!1);for(let[e,t]of Object.entries(r))n(e,t,!0);return e}},47814:function(e,t,r){"use strict";
2Object.defineProperty(t,"__esModule",{value:!0}),t.mapToCurveSimpleSWU=t.SWUFpSqrtRatio=t.weierstrass=t.weierstrassPoints=t.DER=void 0;let n=r(1241),i=r(36170),o=r(36170),a=r(12316),{bytesToNumberBE:s,hexToBytes:c}=i;t.DER={Err:class extends Error{constructor(e=""){super(e)}},_parseInt(e){let{Err:r}=t.DER;if(e.length<2||2!==e[0])throw new r("Invalid signature integer tag");let n=e[1],i=e.subarray(2,n+2);if(!n||i.length!==n)throw new r("Invalid signature integer: wrong length");if(128&i[0])throw new r("Invalid signature integer: negative");if(0===i[0]&&!(128&i[1]))throw new r("Invalid signature integer: unnecessary leading zero");return{d:s(i),l:e.subarray(n+2)}},toSig(e){let{Err:r}=t.DER,n="string"==typeof e?c(e):e;i.abytes(n);let o=n.length;if(o<2||48!=n[0])throw new r("Invalid signature tag");if(n[1]!==o-2)throw new r("Invalid signature: incorrect length");let{d:a,l:s}=t.DER._parseInt(n.subarray(2)),{d:u,l:l}=t.DER._parseInt(s);if(l.length)throw new r("Invalid signature: left bytes after parsing");return{r:a,s:u}},hexFromSig(e){let t=e=>8&Number.parseInt(e[0],16)?"00"+e:e,r=e=>{let t=e.toString(16);return 1&t.length?`0${t}`:t},n=t(r(e.s)),i=t(r(e.r)),o=n.length/2,a=i.length/2,s=r(o),c=r(a);return`30${r(a+o+4)}02${c}${i}02${s}${n}`}};let u=BigInt(0),l=BigInt(1),f=BigInt(2),h=BigInt(3),d=BigInt(4);function p(e){let t=function(e){let t=(0,a.validateBasic)(e);i.validateObject(t,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});let{endo:r,Fp:n,a:o}=t;if(r){if(!n.eql(o,n.ZERO))throw Error("Endomorphism can only be defined for Koblitz curves that have a=0");if("object"!=typeof r||"bigint"!=typeof r.beta||"function"!=typeof r.splitScalar)throw Error("Expected endomorphism with beta: bigint and splitScalar: function")}return Object.freeze({...t})}(e),{Fp:r}=t,s=t.toBytes||((e,t,n)=>{let o=t.toAffine();return i.concatBytes(Uint8Array.from([4]),r.toBytes(o.x),r.toBytes(o.y))}),c=t.fromBytes||(e=>{let t=e.subarray(1);return{x:r.fromBytes(t.subarray(0,r.BYTES)),y:r.fromBytes(t.subarray(r.BYTES,2*r.BYTES))}});function f(e){let{a:n,b:i}=t,o=r.sqr(e),a=r.mul(o,e);return r.add(r.add(a,r.mul(e,n)),i)}if(!r.eql(r.sqr(t.Gy),f(t.Gx)))throw Error("bad generator point: equation left != right");function d(e){return"bigint"==typeof e&&u<e&&e<t.n}function p(e){if(!d(e))throw Error("Expected valid bigint: 0 < bigint < curve.n")}function m(e){let r;let{allowedPrivateKeyLengths:a,nByteLength:s,wrapPrivateKey:c,n:u}=t;if(a&&"bigint"!=typeof e){if(i.isBytes(e)&&(e=i.bytesToHex(e)),"string"!=typeof e||!a.includes(e.length))throw Error("Invalid key");e=e.padStart(2*s,"0")}try{r="bigint"==typeof e?e:i.bytesToNumberBE((0,o.ensureBytes)("private key",e,s))}catch(t){throw Error(`private key must be ${s} bytes, hex or bigint, not ${typeof e}`)}return c&&(r=n.mod(r,u)),p(r),r}let g=new Map;function y(e){if(!(e instanceof b))throw Error("ProjectivePoint expected")}class b{constructor(e,t,n){if(this.px=e,this.py=t,this.pz=n,null==e||!r.isValid(e))throw Error("x required");if(null==t||!r.isValid(t))throw Error("y required");if(null==n||!r.isValid(n))throw Error("z required")}static fromAffine(e){let{x:t,y:n}=e||{};if(!e||!r.isValid(t)||!r.isValid(n))throw Error("invalid affine point");if(e instanceof b)throw Error("projective point not allowed");let i=e=>r.eql(e,r.ZERO);return i(t)&&i(n)?b.ZERO:new b(t,n,r.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(e){let t=r.invertBatch(e.map(e=>e.pz));return e.map((e,r)=>e.toAffine(t[r])).map(b.fromAffine)}static fromHex(e){let t=b.fromAffine(c((0,o.ensureBytes)("pointHex",e)));return t.assertValidity(),t}static fromPrivateKey(e){return b.BASE.multiply(m(e))}_setWindowSize(e){this._WINDOW_SIZE=e,g.delete(this)}assertValidity(){if(this.is0()){if(t.allowInfinityPoint&&!r.is0(this.py))return;throw Error("bad point: ZERO")}let{x:e,y:n}=this.toAffine();if(!r.isValid(e)||!r.isValid(n))throw Error("bad point: x or y not FE");let i=r.sqr(n),o=f(e);if(!r.eql(i,o))throw Error("bad point: equation left != right");
2if(!this.isTorsionFree())throw Error("bad point: not in prime-order subgroup")}hasEvenY(){let{y:e}=this.toAffine();if(r.isOdd)return!r.isOdd(e);throw Error("Field doesn't support isOdd")}equals(e){y(e);let{px:t,py:n,pz:i}=this,{px:o,py:a,pz:s}=e,c=r.eql(r.mul(t,s),r.mul(o,i)),u=r.eql(r.mul(n,s),r.mul(a,i));return c&&u}negate(){return new b(this.px,r.neg(this.py),this.pz)}double(){let{a:e,b:n}=t,i=r.mul(n,h),{px:o,py:a,pz:s}=this,c=r.ZERO,u=r.ZERO,l=r.ZERO,f=r.mul(o,o),d=r.mul(a,a),p=r.mul(s,s),m=r.mul(o,a);return m=r.add(m,m),l=r.mul(o,s),l=r.add(l,l),c=r.mul(e,l),u=r.mul(i,p),u=r.add(c,u),c=r.sub(d,u),u=r.add(d,u),u=r.mul(c,u),c=r.mul(m,c),l=r.mul(i,l),p=r.mul(e,p),m=r.sub(f,p),m=r.mul(e,m),m=r.add(m,l),l=r.add(f,f),f=r.add(l,f),f=r.add(f,p),f=r.mul(f,m),u=r.add(u,f),p=r.mul(a,s),p=r.add(p,p),f=r.mul(p,m),c=r.sub(c,f),l=r.mul(p,d),l=r.add(l,l),new b(c,u,l=r.add(l,l))}add(e){y(e);let{px:n,py:i,pz:o}=this,{px:a,py:s,pz:c}=e,u=r.ZERO,l=r.ZERO,f=r.ZERO,d=t.a,p=r.mul(t.b,h),m=r.mul(n,a),g=r.mul(i,s),v=r.mul(o,c),E=r.add(n,i),w=r.add(a,s);E=r.mul(E,w),w=r.add(m,g),E=r.sub(E,w),w=r.add(n,o);let _=r.add(a,c);return w=r.mul(w,_),_=r.add(m,v),w=r.sub(w,_),_=r.add(i,o),u=r.add(s,c),_=r.mul(_,u),u=r.add(g,v),_=r.sub(_,u),f=r.mul(d,w),u=r.mul(p,v),f=r.add(u,f),u=r.sub(g,f),f=r.add(g,f),l=r.mul(u,f),g=r.add(m,m),g=r.add(g,m),v=r.mul(d,v),w=r.mul(p,w),g=r.add(g,v),v=r.sub(m,v),v=r.mul(d,v),w=r.add(w,v),m=r.mul(g,w),l=r.add(l,m),m=r.mul(_,w),u=r.mul(E,u),u=r.sub(u,m),m=r.mul(E,g),f=r.mul(_,f),new b(u,l,f=r.add(f,m))}subtract(e){return this.add(e.negate())}is0(){return this.equals(b.ZERO)}wNAF(e){return E.wNAFCached(this,g,e,e=>{let t=r.invertBatch(e.map(e=>e.pz));return e.map((e,r)=>e.toAffine(t[r])).map(b.fromAffine)})}multiplyUnsafe(e){let n=b.ZERO;if(e===u)return n;if(p(e),e===l)return this;let{endo:i}=t;if(!i)return E.unsafeLadder(this,e);let{k1neg:o,k1:a,k2neg:s,k2:c}=i.splitScalar(e),f=n,h=n,d=this;for(;a>u||c>u;)a&l&&(f=f.add(d)),c&l&&(h=h.add(d)),d=d.double(),a>>=l,c>>=l;return o&&(f=f.negate()),s&&(h=h.negate()),h=new b(r.mul(h.px,i.beta),h.py,h.pz),f.add(h)}multiply(e){let n,i;p(e);let{endo:o}=t;if(o){let{k1neg:t,k1:a,k2neg:s,k2:c}=o.splitScalar(e),{p:u,f:l}=this.wNAF(a),{p:f,f:h}=this.wNAF(c);u=E.constTimeNegate(t,u),f=E.constTimeNegate(s,f),f=new b(r.mul(f.px,o.beta),f.py,f.pz),n=u.add(f),i=l.add(h)}else{let{p:t,f:r}=this.wNAF(e);n=t,i=r}return b.normalizeZ([n,i])[0]}multiplyAndAddUnsafe(e,t,r){let n=b.BASE,i=(e,t)=>t!==u&&t!==l&&e.equals(n)?e.multiply(t):e.multiplyUnsafe(t),o=i(this,t).add(i(e,r));return o.is0()?void 0:o}toAffine(e){let{px:t,py:n,pz:i}=this,o=this.is0();null==e&&(e=o?r.ONE:r.inv(i));let a=r.mul(t,e),s=r.mul(n,e),c=r.mul(i,e);if(o)return{x:r.ZERO,y:r.ZERO};if(!r.eql(c,r.ONE))throw Error("invZ was invalid");return{x:a,y:s}}isTorsionFree(){let{h:e,isTorsionFree:r}=t;if(e===l)return!0;if(r)return r(b,this);throw Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){let{h:e,clearCofactor:r}=t;return e===l?this:r?r(b,this):this.multiplyUnsafe(t.h)}toRawBytes(e=!0){return this.assertValidity(),s(b,this,e)}toHex(e=!0){return i.bytesToHex(this.toRawBytes(e))}}b.BASE=new b(t.Gx,t.Gy,r.ONE),b.ZERO=new b(r.ZERO,r.ONE,r.ZERO);let v=t.nBitLength,E=(0,a.wNAF)(b,t.endo?Math.ceil(v/2):v);return{CURVE:t,ProjectivePoint:b,normPrivateKeyToScalar:m,weierstrassEquation:f,isWithinCurveOrder:d}}function m(e,t){let r=e.ORDER,n=u;for(let e=r-l;e%f===u;e/=f)n+=l;let i=n,o=f<<i-l-l,a=o*f,s=(r-l)/a,c=(s-l)/f,p=a-l,m=e.pow(t,s),g=e.pow(t,(s+l)/f),y=(t,r)=>{let n=m,a=e.pow(r,p),s=e.sqr(a);s=e.mul(s,r);let u=e.mul(t,s);u=e.pow(u,c),u=e.mul(u,a),a=e.mul(u,r),s=e.mul(u,t);let h=e.mul(s,a);u=e.pow(h,o);let d=e.eql(u,e.ONE);a=e.mul(s,g),u=e.mul(h,n),s=e.cmov(a,s,d),h=e.cmov(u,h,d);for(let t=i;t>l;t--){let r=t-f;r=f<<r-l;let i=e.pow(h,r),o=e.eql(i,e.ONE);a=e.mul(s,n),n=e.mul(n,n),i=e.mul(h,n),s=e.cmov(a,s,o),h=e.cmov(i,h,o)}return{isValid:d,value:s}};if(e.ORDER%d===h){let r=(e.ORDER-h)/d,n=e.sqrt(e.neg(t));y=(t,i)=>{let o=e.sqr(i),a=e.mul(t,i);o=e.mul(o,a);let s=e.pow(o,r);s=e.mul(s,a);let c=e.mul(s,n),u=e.mul(e.sqr(s),i),l=e.eql(u,t),f=e.cmov(c,s,l);return{isValid:l,value:f}}}return y}t.weierstrassPoints=p,t.weierstrass=function(e){let r=function(e){let t=(0,a.validateBasic)(e);return i.validateObject(t,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...t})}(e),{Fp:s,n:c}=r,f=s.BYTES+1,h=2*s.BYTES+1;function d(e){return n.mod(e,c)}function m(e){return n.invert(e,c)}let{ProjectivePoint:g,normPrivateKeyToScalar:y,weierstrassEquation:b,isWithinCurveOrder:v}=p({...r,toBytes(e,t,r){let n=t.toAffine(),o=s.toBytes(n.x),a=i.concatBytes;return r?a(Uint8Array.from([t.hasEvenY()?2:3]),o):a(Uint8Array.from([4]),o,s.toBytes(n.y))},fromBytes(e){let t=e.length,r=e[0],n=e.subarray(1);if(t===f&&(2===r||3===r)){let e;let t=i.bytesToNumberBE(n);if(!(u<t&&t<s.ORDER))throw Error("Point is not on curve");let o=b(t);try{e=s.sqrt(o)}catch(e){throw Error("Point is not on curve"+(e instanceof Error?": "+e.message:""))}return(1&r)==1!=((e&l)===l)&&(e=s.neg(e)),{x:t,y:e}}if(t===h&&4===r)return{x:s.fromBytes(n.subarray(0,s.BYTES)),y:s.fromBytes(n.subarray(s.BYTES,2*s.BYTES))};throw Error(`Point of length ${t}
2 was invalid. Expected ${f} compressed bytes or ${h} uncompressed bytes`)}}),E=e=>i.bytesToHex(i.numberToBytesBE(e,r.nByteLength)),w=(e,t,r)=>i.bytesToNumberBE(e.slice(t,r));class _{constructor(e,t,r){this.r=e,this.s=t,this.recovery=r,this.assertValidity()}static fromCompact(e){let t=r.nByteLength;return new _(w(e=(0,o.ensureBytes)("compactSignature",e,2*t),0,t),w(e,t,2*t))}static fromDER(e){let{r,s:n}=t.DER.toSig((0,o.ensureBytes)("DER",e));return new _(r,n)}assertValidity(){if(!v(this.r))throw Error("r must be 0 < r < CURVE.n");if(!v(this.s))throw Error("s must be 0 < s < CURVE.n")}addRecoveryBit(e){return new _(this.r,this.s,e)}recoverPublicKey(e){let{r:t,s:n,recovery:i}=this,a=A((0,o.ensureBytes)("msgHash",e));if(null==i||![0,1,2,3].includes(i))throw Error("recovery id invalid");let c=2===i||3===i?t+r.n:t;if(c>=s.ORDER)throw Error("recovery id 2 or 3 invalid");let u=(1&i)==0?"02":"03",l=g.fromHex(u+E(c)),f=m(c),h=d(-a*f),p=d(n*f),y=g.BASE.multiplyAndAddUnsafe(l,h,p);if(!y)throw Error("point at infinify");return y.assertValidity(),y}hasHighS(){return this.s>c>>l}normalizeS(){return this.hasHighS()?new _(this.r,d(-this.s),this.recovery):this}toDERRawBytes(){return i.hexToBytes(this.toDERHex())}toDERHex(){return t.DER.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return i.hexToBytes(this.toCompactHex())}toCompactHex(){return E(this.r)+E(this.s)}}function x(e){let t=i.isBytes(e),r="string"==typeof e,n=(t||r)&&e.length;return t?n===f||n===h:r?n===2*f||n===2*h:e instanceof g}let S=r.bits2int||function(e){let t=i.bytesToNumberBE(e),n=8*e.length-r.nBitLength;return n>0?t>>BigInt(n):t},A=r.bits2int_modN||function(e){return d(S(e))},P=i.bitMask(r.nBitLength);function I(e){if("bigint"!=typeof e)throw Error("bigint expected");if(!(u<=e&&e<P))throw Error(`bigint expected < 2^${r.nBitLength}`);return i.numberToBytesBE(e,r.nByteLength)}let k={lowS:r.lowS,prehash:!1},T={lowS:r.lowS,prehash:!1};return g.BASE._setWindowSize(8),{CURVE:r,getPublicKey:function(e,t=!0){return g.fromPrivateKey(e).toRawBytes(t)},getSharedSecret:function(e,t,r=!0){if(x(e))throw Error("first arg must be private key");if(!x(t))throw Error("second arg must be public key");return g.fromHex(t).multiply(y(e)).toRawBytes(r)},sign:function(e,t,n=k){let{seed:a,k2sig:f}=function(e,t,n=k){if(["recovered","canonical"].some(e=>e in n))throw Error("sign() legacy options not supported");let{hash:a,randomBytes:f}=r,{lowS:h,prehash:p,extraEntropy:b}=n;null==h&&(h=!0),e=(0,o.ensureBytes)("msgHash",e),p&&(e=(0,o.ensureBytes)("prehashed msgHash",a(e)));let E=A(e),w=y(t),x=[I(w),I(E)];if(null!=b&&!1!==b){let e=!0===b?f(s.BYTES):b;x.push((0,o.ensureBytes)("extraEntropy",e))}return{seed:i.concatBytes(...x),k2sig:function(e){let t=S(e);if(!v(t))return;let r=m(t),n=g.BASE.multiply(t).toAffine(),i=d(n.x);if(i===u)return;let o=d(r*d(E+i*w));if(o===u)return;let a=(n.x===i?0:2)|Number(n.y&l),s=o;if(h&&o>c>>l)s=o>c>>l?d(-o):o,a^=1;return new _(i,s,a)}}}(e,t,n);return i.createHmacDrbg(r.hash.outputLen,r.nByteLength,r.hmac)(a,f)},verify:function(e,n,a,s=T){let c,u;if(n=(0,o.ensureBytes)("msgHash",n),a=(0,o.ensureBytes)("publicKey",a),"strict"in s)throw Error("options.strict was renamed to lowS");let{lowS:l,prehash:f}=s;try{if("string"==typeof e||i.isBytes(e))try{u=_.fromDER(e)}catch(r){if(!(r instanceof t.DER.Err))throw r;u=_.fromCompact(e)}else if("object"==typeof e&&"bigint"==typeof e.r&&"bigint"==typeof e.s){let{r:t,s:r}=e;u=new _(t,r)}else throw Error("PARSE");c=g.fromHex(a)}catch(e){if("PARSE"===e.message)throw Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(l&&u.hasHighS())return!1;f&&(n=r.hash(n));let{r:h,s:p}=u,y=A(n),b=m(p),v=d(y*b),E=d(h*b),w=g.BASE.multiplyAndAddUnsafe(c,v,E)?.toAffine();return!!w&&d(w.x)===h},ProjectivePoint:g,Signature:_,utils:{isValidPrivateKey(e){try{return y(e),!0}catch(e){return!1}},normPrivateKeyToScalar:y,randomPrivateKey:()=>{let e=n.getMinHashLength(r.n);return n.mapHashToField(r.randomBytes(e),r.n)},precompute:(e=8,t=g.BASE)=>(t._setWindowSize(e),t.multiply(BigInt(3)),t)}}},t.SWUFpSqrtRatio=m,t.mapToCurveSimpleSWU=function(e,t){if(n.validateField(e),!e.isValid(t.A)||!e.isValid(t.B)||!e.isValid(t.Z))throw Error("mapToCurveSimpleSWU: invali
2d opts");let r=m(e,t.Z);if(!e.isOdd)throw Error("Fp.isOdd is not implemented!");return n=>{let i,o,a,s,c,u,l,f;i=e.sqr(n),i=e.mul(i,t.Z),o=e.sqr(i),o=e.add(o,i),a=e.add(o,e.ONE),a=e.mul(a,t.B),s=e.cmov(t.Z,e.neg(o),!e.eql(o,e.ZERO)),s=e.mul(s,t.A),o=e.sqr(a),u=e.sqr(s),c=e.mul(u,t.A),o=e.add(o,c),o=e.mul(o,a),u=e.mul(u,s),c=e.mul(u,t.B),o=e.add(o,c),l=e.mul(i,a);let{isValid:h,value:d}=r(o,u);f=e.mul(i,n),f=e.mul(f,d),l=e.cmov(l,a,h),f=e.cmov(f,d,h);let p=e.isOdd(n)===e.isOdd(f);return f=e.cmov(e.neg(f),f,p),{x:l=e.div(l,s),y:f}}}},89984:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.encodeToCurve=t.hashToCurve=t.schnorr=t.secp256k1=void 0;let n=r(89470),i=r(28772),o=r(1241),a=r(47814),s=r(36170),c=r(19651),u=r(20632),l=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),f=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),h=BigInt(1),d=BigInt(2),p=(e,t)=>(e+t/d)/t;function m(e){let t=BigInt(3),r=BigInt(6),n=BigInt(11),i=BigInt(22),a=BigInt(23),s=BigInt(44),c=BigInt(88),u=e*e*e%l,f=u*u*e%l,h=(0,o.pow2)(f,t,l)*f%l,p=(0,o.pow2)(h,t,l)*f%l,m=(0,o.pow2)(p,d,l)*u%l,y=(0,o.pow2)(m,n,l)*m%l,b=(0,o.pow2)(y,i,l)*y%l,v=(0,o.pow2)(b,s,l)*b%l,E=(0,o.pow2)(v,c,l)*v%l,w=(0,o.pow2)(E,s,l)*b%l,_=(0,o.pow2)(w,t,l)*f%l,x=(0,o.pow2)(_,a,l)*y%l,S=(0,o.pow2)(x,r,l)*u%l,A=(0,o.pow2)(S,d,l);if(!g.eql(g.sqr(A),e))throw Error("Cannot find square root");return A}let g=(0,o.Field)(l,void 0,void 0,{sqrt:m});t.secp256k1=(0,u.createCurve)({a:BigInt(0),b:BigInt(7),Fp:g,n:f,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:e=>{let t=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),r=-h*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),n=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),i=BigInt("0x100000000000000000000000000000000"),a=p(t*e,f),s=p(-r*e,f),c=(0,o.mod)(e-a*t-s*n,f),u=(0,o.mod)(-a*r-s*t,f),l=c>i,d=u>i;if(l&&(c=f-c),d&&(u=f-u),c>i||u>i)throw Error("splitScalar: Endomorphism failed, k="+e);return{k1neg:l,k1:c,k2neg:d,k2:u}}}},n.sha256);let y=BigInt(0),b=e=>"bigint"==typeof e&&y<e&&e<l,v=e=>"bigint"==typeof e&&y<e&&e<f,E={};function w(e,...t){let r=E[e];if(void 0===r){let t=(0,n.sha256)(Uint8Array.from(e,e=>e.charCodeAt(0)));r=(0,s.concatBytes)(t,t),E[e]=r}return(0,n.sha256)((0,s.concatBytes)(r,...t))}let _=e=>e.toRawBytes(!0).slice(1),x=e=>(0,s.numberToBytesBE)(e,32),S=e=>(0,o.mod)(e,l),A=e=>(0,o.mod)(e,f),P=t.secp256k1.ProjectivePoint,I=(e,t,r)=>P.BASE.multiplyAndAddUnsafe(e,t,r);function k(e){let r=t.secp256k1.utils.normPrivateKeyToScalar(e),n=P.fromPrivateKey(r);return{scalar:n.hasEvenY()?r:A(-r),bytes:_(n)}}function T(e){if(!b(e))throw Error("bad x: need 0 < x < p");let t=S(e*e),r=m(S(t*e+BigInt(7)));r%d!==y&&(r=S(-r));let n=new P(e,r,h);return n.assertValidity(),n}function R(...e){return A((0,s.bytesToNumberBE)(w("BIP0340/challenge",...e)))}function B(e,t,r){let n=(0,s.ensureBytes)("signature",e,64),i=(0,s.ensureBytes)("message",t),o=(0,s.ensureBytes)("publicKey",r,32);try{let e=T((0,s.bytesToNumberBE)(o)),t=(0,s.bytesToNumberBE)(n.subarray(0,32));if(!b(t))return!1;let r=(0,s.bytesToNumberBE)(n.subarray(32,64));if(!v(r))return!1;let a=R(x(t),_(e),i),c=I(e,r,A(-a));if(!c||!c.hasEvenY()||c.toAffine().x!==t)return!1;return!0}catch(e){return!1}}t.schnorr={getPublicKey:function(e){return k(e).bytes},sign:function(e,t,r=(0,i.randomBytes)(32)){let n=(0,s.ensureBytes)("message",e),{bytes:o,scalar:a}=k(t),c=(0,s.ensureBytes)("auxRand",r,32),u=x(a^(0,s.bytesToNumberBE)(w("BIP0340/aux",c))),l=w("BIP0340/nonce",u,o,n),f=A((0,s.bytesToNumberBE)(l));if(f===y)throw Error("sign failed: k is zero");let{bytes:h,scalar:d}=k(f),p=R(h,o,n),m=new Uint8Array(64);if(m.set(h,0),m.set(x(A(d+p*a)),32),!B(m,n,o))throw Error("sign: Invalid signature produced");return m},verify:B,utils:{randomPrivateKey:t.secp256k1.utils.randomPrivateKey,lift_x:T,pointToBytes:_,numberToBytesBE:s.numberToBytesBE,bytesToNumberBE:s.bytesToNumberBE,taggedHash:w,mod:o.mod}};let O=(0,c.isogenyMap)(g,[["0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa8c7","0x7d3d4c80bc321d5b9f315cea7fd44c5d595d2fc0bf63b92dfff1044f17c6581","0x534c328d23f234e6e2a4
213deca25caece4506144037c40314ecbd0b53d9dd262","0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa88c"],["0xd35771193d94918a9ca34ccbb7b640dd86cd409542f8487d9fe6b745781eb49b","0xedadc6f64383dc1df7c4b2d51b54225406d36b641f5e41bbc52a56612a8c6d14","0x0000000000000000000000000000000000000000000000000000000000000001"],["0x4bda12f684bda12f684bda12f684bda12f684bda12f684bda12f684b8e38e23c","0xc75e0c32d5cb7c0fa9d0a54b12a0a6d5647ab046d686da6fdffc90fc201d71a3","0x29a6194691f91a73715209ef6512e576722830a201be2018a765e85a9ecee931","0x2f684bda12f684bda12f684bda12f684bda12f684bda12f684bda12f38e38d84"],["0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffff93b","0x7a06534bb8bdb49fd5e9e6632722c2989467c1bfc8e8d978dfb425d2685c2573","0x6484aa716545ca2cf3a70c3fa8fe337e0a3d21162f0d6299a7bf8192bfd2a76f","0x0000000000000000000000000000000000000000000000000000000000000001"]].map(e=>e.map(e=>BigInt(e)))),C=(0,a.mapToCurveSimpleSWU)(g,{A:BigInt("0x3f8731abdd661adca08a5558f0f5d272e953d363cb6f0e5d405447c01a444533"),B:BigInt("1771"),Z:g.create(BigInt("-11"))}),N=(0,c.createHasher)(t.secp256k1.ProjectivePoint,e=>{let{x:t,y:r}=C(g.create(e[0]));return O(t,r)},{DST:"secp256k1_XMD:SHA-256_SSWU_RO_",encodeDST:"secp256k1_XMD:SHA-256_SSWU_NU_",p:g.ORDER,m:1,k:128,expand:"xmd",hash:n.sha256});t.hashToCurve=N.hashToCurve,t.encodeToCurve=N.encodeToCurve},11993:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HashMD=t.Maj=t.Chi=void 0;let n=r(48444),i=r(28772);t.Chi=(e,t,r)=>e&t^~e&r,t.Maj=(e,t,r)=>e&t^e&r^t&r;class o extends i.Hash{constructor(e,t,r,n){super(),this.blockLen=e,this.outputLen=t,this.padOffset=r,this.isLE=n,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=(0,i.createView)(this.buffer)}update(e){(0,n.exists)(this);let{view:t,buffer:r,blockLen:o}=this,a=(e=(0,i.toBytes)(e)).length;for(let n=0;n<a;){let s=Math.min(o-this.pos,a-n);if(s===o){let t=(0,i.createView)(e);for(;o<=a-n;n+=o)this.process(t,n);continue}r.set(e.subarray(n,n+s),this.pos),this.pos+=s,n+=s,this.pos===o&&(this.process(t,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){(0,n.exists)(this),(0,n.output)(e,this),this.finished=!0;let{buffer:t,view:r,blockLen:o,isLE:a}=this,{pos:s}=this;t[s++]=128,this.buffer.subarray(s).fill(0),this.padOffset>o-s&&(this.process(r,0),s=0);for(let e=s;e<o;e++)t[e]=0;!function(e,t,r,n){if("function"==typeof e.setBigUint64)return e.setBigUint64(t,r,n);let i=BigInt(32),o=BigInt(4294967295),a=Number(r>>i&o),s=Number(r&o),c=n?4:0,u=n?0:4;e.setUint32(t+c,a,n),e.setUint32(t+u,s,n)}(r,o-8,BigInt(8*this.length),a),this.process(r,0);let c=(0,i.createView)(e),u=this.outputLen;if(u%4)throw Error("_sha2: outputLen should be aligned to 32bit");let l=u/4,f=this.get();if(l>f.length)throw Error("_sha2: outputLen bigger than state");for(let e=0;e<l;e++)c.setUint32(4*e,f[e],a)}digest(){let{buffer:e,outputLen:t}=this;this.digestInto(e);let r=e.slice(0,t);return this.destroy(),r}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());let{blockLen:t,buffer:r,length:n,finished:i,destroyed:o,pos:a}=this;return e.length=n,e.pos=a,e.finished=i,e.destroyed=o,n%t&&e.buffer.set(r),e}}t.HashMD=o},26530:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hmac=t.HMAC=void 0;let n=r(48444),i=r(28772);class o extends i.Hash{constructor(e,t){super(),this.finished=!1,this.destroyed=!1,(0,n.hash)(e);let r=(0,i.toBytes)(t);if(this.iHash=e.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 o=this.blockLen,a=new Uint8Array(o);a.set(r.length>o?e.create().update(r).digest():r);for(let e=0;e<a.length;e++)a[e]^=54;this.iHash.update(a),this.oHash=e.create();for(let e=0;e<a.length;e++)a[e]^=106;this.oHash.update(a),a.fill(0)}update(e){return(0,n.exists)(this),this.iHash.update(e),this}digestInto(e){(0,n.exists)(this),(0,n.bytes)(e,this.outputLen),this.finished=!0,this.iHash.digestInto(e),this.oHash.update(e),this.oHash.digestInto(e),this.destroy()}digest(){let e=new Uint8Array(this.oHash.outputLen);return this.digestInto(e),e}_cloneInto(e){e||(e=Object.create(Object.getPrototypeOf(this),{}));let{oHash:t,iHash:r,finished:n,destroyed:i,blockLen:o,outputLen:a}=this;return e.finished=n,e.destroyed=i,e.blockLen=o,e.outputLen=a,e.oHash=t._cloneInto(e.oHash),e.iHash=r._cloneInto(e.iHash),e}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}t.HMAC=o,t.hmac=(e,t,r)=>new o(e,t).update(r).digest(),t.hmac.create=(e,t)=>
2new o(e,t)},89470:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sha224=t.sha256=void 0;let n=r(11993),i=r(28772),o=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,2756734187,3204031479,3329325298]),a=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),s=new Uint32Array(64);class c extends n.HashMD{constructor(){super(64,32,8,!1),this.A=0|a[0],this.B=0|a[1],this.C=0|a[2],this.D=0|a[3],this.E=0|a[4],this.F=0|a[5],this.G=0|a[6],this.H=0|a[7]}get(){let{A:e,B:t,C:r,D:n,E:i,F:o,G:a,H:s}=this;return[e,t,r,n,i,o,a,s]}set(e,t,r,n,i,o,a,s){this.A=0|e,this.B=0|t,this.C=0|r,this.D=0|n,this.E=0|i,this.F=0|o,this.G=0|a,this.H=0|s}process(e,t){for(let r=0;r<16;r++,t+=4)s[r]=e.getUint32(t,!1);for(let e=16;e<64;e++){let t=s[e-15],r=s[e-2],n=(0,i.rotr)(t,7)^(0,i.rotr)(t,18)^t>>>3,o=(0,i.rotr)(r,17)^(0,i.rotr)(r,19)^r>>>10;s[e]=o+s[e-7]+n+s[e-16]|0}let{A:r,B:a,C:c,D:u,E:l,F:f,G:h,H:d}=this;for(let e=0;e<64;e++){let t=d+((0,i.rotr)(l,6)^(0,i.rotr)(l,11)^(0,i.rotr)(l,25))+(0,n.Chi)(l,f,h)+o[e]+s[e]|0,p=((0,i.rotr)(r,2)^(0,i.rotr)(r,13)^(0,i.rotr)(r,22))+(0,n.Maj)(r,a,c)|0;d=h,h=f,f=l,l=u+t|0,u=c,c=a,a=r,r=t+p|0}r=r+this.A|0,a=a+this.B|0,c=c+this.C|0,u=u+this.D|0,l=l+this.E|0,f=f+this.F|0,h=h+this.G|0,d=d+this.H|0,this.set(r,a,c,u,l,f,h,d)}roundClean(){s.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}class u extends c{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}}t.sha256=(0,i.wrapConstructor)(()=>new c),t.sha224=(0,i.wrapConstructor)(()=>new u)},25291:function(e,t){"use strict";function r(e){return e instanceof Uint8Array||null!=e&&"object"==typeof e&&"Uint8Array"===e.constructor.name}function n(...e){let t=e=>e,r=(e,t)=>r=>e(t(r));return{encode:e.map(e=>e.encode).reduceRight(r,t),decode:e.map(e=>e.decode).reduce(r,t)}}function i(e){return{encode:t=>{if(!Array.isArray(t)||t.length&&"number"!=typeof t[0])throw Error("alphabet.encode input should be an array of numbers");return t.map(t=>{if(t<0||t>=e.length)throw Error(`Digit index outside alphabet: ${t} (alphabet: ${e.length})`);return e[t]})},decode:t=>{if(!Array.isArray(t)||t.length&&"string"!=typeof t[0])throw Error("alphabet.decode input should be array of strings");return t.map(t=>{if("string"!=typeof t)throw Error(`alphabet.decode: not string element=${t}`);let r=e.indexOf(t);if(-1===r)throw Error(`Unknown letter: "${t}". Allowed: ${e}`);return r})}}}function o(e=""){if("string"!=typeof e)throw Error("join separator should be string");return{encode:t=>{if(!Array.isArray(t)||t.length&&"string"!=typeof t[0])throw Error("join.encode input should be array of strings");for(let e of t)if("string"!=typeof e)throw Error(`join.encode: non-string input=${e}`);return t.join(e)},decode:t=>{if("string"!=typeof t)throw Error("join.decode input should be string");return t.split(e)}}}function a(e,t="="){if("string"!=typeof t)throw Error("padding chr should be string");return{encode(r){if(!Array.isArray(r)||r.length&&"string"!=typeof r[0])throw Error("padding.encode input should be array of strings");for(let e of r)if("string"!=typeof e)throw Error(`padding.encode: non-string input=${e}`);for(;r.length*e%8;)r.push(t);return r},decode(r){if(!Array.isArray(r)||r.length&&"string"!=typeof r[0])throw Error("padding.encode input should be array of strings");for(let e of r)if("string"!=typeof e)throw Error(`padding.decode: non-string input=${e}`);let n=r.length;if(n*e%8)throw Error("Invalid padding: string should have whole number of bytes");for(;n>0&&r[n-1]===t;n--)if(!((n-1)*e%8))throw Error("Invalid padding: string has too much padding");return r.slice(0,n)}}}function s(e){if("function"!=typeof e)throw Error("normalize fn should be function");return{encode:e=>e,decode:t=>e(t)}}function c(e,t,r){if(t<2)throw Error(`convertRadix: wrong from=${t}, base cannot be less than 2`);if(r<2)throw Error(`convertRadix: wrong to=${r}, base cannot be less than 2`);if(!Array.isArray(e))throw Error("convertRadix: data should be array");if(!e.length)return[];let n=0,i=[],o=Array.from(e);
2for(o.forEach(e=>{if(e<0||e>=t)throw Error(`Wrong integer: ${e}`)});;){let e=0,a=!0;for(let i=n;i<o.length;i++){let s=o[i],c=t*e+s;if(!Number.isSafeInteger(c)||t*e/t!==e||c-s!=t*e)throw Error("convertRadix: carry overflow");e=c%r;let u=Math.floor(c/r);if(o[i]=u,!Number.isSafeInteger(u)||u*r+e!==c)throw Error("convertRadix: carry overflow");a&&(u?a=!1:n=i)}if(i.push(e),a)break}for(let t=0;t<e.length-1&&0===e[t];t++)i.push(0);return i.reverse()}Object.defineProperty(t,"__esModule",{value:!0}),t.bytes=t.stringToBytes=t.str=t.bytesToString=t.hex=t.utf8=t.bech32m=t.bech32=t.base58check=t.createBase58check=t.base58xmr=t.base58xrp=t.base58flickr=t.base58=t.base64urlnopad=t.base64url=t.base64nopad=t.base64=t.base32crockford=t.base32hexnopad=t.base32hex=t.base32nopad=t.base32=t.base16=t.utils=t.assertNumber=void 0,t.assertNumber=function(e){if(!Number.isSafeInteger(e))throw Error(`Wrong integer: ${e}`)};let u=(e,t)=>t?u(t,e%t):e,l=(e,t)=>e+(t-u(e,t));function f(e,t,r,n){if(!Array.isArray(e))throw Error("convertRadix2: data should be array");if(t<=0||t>32)throw Error(`convertRadix2: wrong from=${t}`);if(r<=0||r>32)throw Error(`convertRadix2: wrong to=${r}`);if(l(t,r)>32)throw Error(`convertRadix2: carry overflow from=${t} to=${r} carryBits=${l(t,r)}`);let i=0,o=0,a=2**r-1,s=[];for(let n of e){if(n>=2**t)throw Error(`convertRadix2: invalid data word=${n} from=${t}`);if(i=i<<t|n,o+t>32)throw Error(`convertRadix2: carry overflow pos=${o} from=${t}`);for(o+=t;o>=r;o-=r)s.push((i>>o-r&a)>>>0);i&=2**o-1}if(i=i<<r-o&a,!n&&o>=t)throw Error("Excess padding");if(!n&&i)throw Error(`Non-zero padding: ${i}`);return n&&o>0&&s.push(i>>>0),s}function h(e){return{encode:t=>{if(!r(t))throw Error("radix.encode input should be Uint8Array");return c(Array.from(t),256,e)},decode:t=>{if(!Array.isArray(t)||t.length&&"number"!=typeof t[0])throw Error("radix.decode input should be array of numbers");return Uint8Array.from(c(t,e,256))}}}function d(e,t=!1){if(e<=0||e>32)throw Error("radix2: bits should be in (0..32]");if(l(8,e)>32||l(e,8)>32)throw Error("radix2: carry overflow");return{encode:n=>{if(!r(n))throw Error("radix2.encode input should be Uint8Array");return f(Array.from(n),8,e,!t)},decode:r=>{if(!Array.isArray(r)||r.length&&"number"!=typeof r[0])throw Error("radix2.decode input should be array of numbers");return Uint8Array.from(f(r,e,8,t))}}}function p(e){if("function"!=typeof e)throw Error("unsafeWrapper fn should be function");return function(...t){try{return e.apply(null,t)}catch(e){}}}function m(e,t){if("function"!=typeof t)throw Error("checksum fn should be function");return{encode(n){if(!r(n))throw Error("checksum.encode: input should be Uint8Array");let i=t(n).slice(0,e),o=new Uint8Array(n.length+e);return o.set(n),o.set(i,n.length),o},decode(n){if(!r(n))throw Error("checksum.decode: input should be Uint8Array");let i=n.slice(0,-e),o=t(i).slice(0,e),a=n.slice(-e);for(let t=0;t<e;t++)if(o[t]!==a[t])throw Error("Invalid checksum");return i}}}t.utils={alphabet:i,chain:n,checksum:m,convertRadix:c,convertRadix2:f,radix:h,radix2:d,join:o,padding:a},t.base16=n(d(4),i("0123456789ABCDEF"),o("")),t.base32=n(d(5),i("ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"),a(5),o("")),t.base32nopad=n(d(5),i("ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"),o("")),t.base32hex=n(d(5),i("0123456789ABCDEFGHIJKLMNOPQRSTUV"),a(5),o("")),t.base32hexnopad=n(d(5),i("0123456789ABCDEFGHIJKLMNOPQRSTUV"),o("")),t.base32crockford=n(d(5),i("0123456789ABCDEFGHJKMNPQRSTVWXYZ"),o(""),s(e=>e.toUpperCase().replace(/O/g,"0").replace(/[IL]/g,"1"))),t.base64=n(d(6),i("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"),a(6),o("")),t.base64nopad=n(d(6),i("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"),o("")),t.base64url=n(d(6),i("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"),a(6),o("")),t.base64urlnopad=n(d(6),i("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"),o(""));let g=e=>n(h(58),i(e),o(""));t.base58=g("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"),t.base58flickr=g("123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"),t.base58xrp=g("rpshnaf39wBUDNEGHJKLM4PQRST7VWXYZ2bcdeCg65jkm8oFqi1tuvAxyz");let y=[0,2,3,5,6,7,9,10,11];t.base58xmr={encode(e){let r="";for(let n=0;n<e.length;n+=8){let i=e.subarray(n,n+8);r+=t.base58.encode(i).padStart(y[i.length],"1")}return r},decode(e){let r=[];for(let n=0;n<e.length;n+=11){let i=e.slice(n,n+11),o=y.indexOf(i.length),a=t.base58.decode(i);for(let e=0;e<a.length-o;e++)if(0!==a[e])throw Error("base58xmr: wrong padding");r=r.concat(Array.from(a.slice(a.length-o)))}return Uint8Array.from(r)}},t.createBase58check=e=>n(m(4,t=>e(e(t))),t.base58),t.base58check=t.createBase58check;
2let b=n(i("qpzry9x8gf2tvdw0s3jn54khce6mua7l"),o("")),v=[996825010,642813549,513874426,1027748829,705979059];function E(e){let t=e>>25,r=(33554431&e)<<5;for(let e=0;e<v.length;e++)(t>>e&1)==1&&(r^=v[e]);return r}function w(e,t,r=1){let n=e.length,i=1;for(let t=0;t<n;t++){let r=e.charCodeAt(t);if(r<33||r>126)throw Error(`Invalid prefix (${e})`);i=E(i)^r>>5}i=E(i);for(let t=0;t<n;t++)i=E(i)^31&e.charCodeAt(t);for(let e of t)i=E(i)^e;for(let e=0;e<6;e++)i=E(i);return i^=r,b.encode(f([i%1073741824],30,5,!1))}function _(e){let t="bech32"===e?1:734539939,r=d(5),n=r.decode,i=r.encode,o=p(n);function a(e,r=90){if("string"!=typeof e)throw Error(`bech32.decode input should be string, not ${typeof e}`);if(e.length<8||!1!==r&&e.length>r)throw TypeError(`Wrong string length: ${e.length} (${e}). Expected (8..${r})`);let n=e.toLowerCase();if(e!==n&&e!==e.toUpperCase())throw Error("String must be lowercase or uppercase");let i=n.lastIndexOf("1");if(0===i||-1===i)throw Error('Letter "1" must be present between prefix and data only');let o=n.slice(0,i),a=n.slice(i+1);if(a.length<6)throw Error("Data must be at least 6 characters long");let s=b.decode(a).slice(0,-6),c=w(o,s,t);if(!a.endsWith(c))throw Error(`Invalid checksum in ${e}: expected "${c}"`);return{prefix:o,words:s}}let s=p(a);return{encode:function(e,r,n=90){if("string"!=typeof e)throw Error(`bech32.encode prefix should be string, not ${typeof e}`);if(!Array.isArray(r)||r.length&&"number"!=typeof r[0])throw Error(`bech32.encode words should be array of numbers, not ${typeof r}`);if(0===e.length)throw TypeError(`Invalid prefix length ${e.length}`);let i=e.length+7+r.length;if(!1!==n&&i>n)throw TypeError(`Length ${i} exceeds limit ${n}`);let o=e.toLowerCase(),a=w(o,r,t);return`${o}1${b.encode(r)}${a}`},decode:a,decodeToBytes:function(e){let{prefix:t,words:r}=a(e,!1);return{prefix:t,words:r,bytes:n(r)}},decodeUnsafe:s,fromWords:n,fromWordsUnsafe:o,toWords:i}}t.bech32=_("bech32"),t.bech32m=_("bech32m"),t.utf8={encode:e=>new TextDecoder().decode(e),decode:e=>new TextEncoder().encode(e)},t.hex=n(d(4),i("0123456789abcdef"),o(""),s(e=>{if("string"!=typeof e||e.length%2)throw TypeError(`hex.decode: expected string, got ${typeof e} with length ${e.length}`);return e.toLowerCase()}));let x={utf8:t.utf8,hex:t.hex,base16:t.base16,base32:t.base32,base64:t.base64,base64url:t.base64url,base58:t.base58,base58xmr:t.base58xmr},S="Invalid encoding type. Available types: utf8, hex, base16, base32, base64, base64url, base58, base58xmr";t.bytesToString=(e,t)=>{if("string"!=typeof e||!x.hasOwnProperty(e))throw TypeError(S);if(!r(t))throw TypeError("bytesToString() expects Uint8Array");return x[e].encode(t)},t.str=t.bytesToString,t.stringToBytes=(e,t)=>{if(!x.hasOwnProperty(e))throw TypeError(S);if("string"!=typeof t)throw TypeError("stringToBytes() expects string");return x[e].decode(t)},t.bytes=t.stringToBytes},94665:function(e,t,r){"use strict";r.d(t,{EthereumPrivateKeyProvider:function(){return t0},G2:function(){return tB}});var n,i,o,a,s,c,u,l,f,h,d,p,m,g,y,b,v,E,w,_,x,S,A,P,I=r(31686),k=r(56127),T=r(5845),R=r(91785),B=r(22764),O=r(53248),C=r(78687),N=r(55037);function L(e,t,r){if(r>e.length)throw Error("invalid RLP (safeSlice): end slice of Uint8Array out-of-bounds");return e.slice(t,r)}function F(e){if(0===e[0])throw Error("invalid RLP: extra zeros");return $(function(e){let t="";for(let r=0;r<e.length;r++)t+=D[e[r]];return t}(e))}function M(e,t){if(e<56)return Uint8Array.from([e+t]);let r=H(e),n=H(t+55+r.length/2);return Uint8Array.from(j(n+r))}let D=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function $(e){let t=Number.parseInt(e,16);if(Number.isNaN(t))throw Error("Invalid byte sequence");return t}function j(e){if("string"!=typeof e)throw TypeError("hexToBytes: expected string, got "+typeof e);if(e.length%2)throw Error("hexToBytes: received invalid unpadded hex");let t=new Uint8Array(e.length/2);for(let r=0;r<t.length;r++){let n=2*r;t[r]=$(e.slice(n,n+2))}return t}function U(...e){if(1===e.length)return e[0];let t=new Uint8Array(e.reduce((e,t)=>e+t.length,0));for(let r=0,n=0;r<e.length;r++){let i=e[r];t.set(i,n),n+=i.length}return t}function H(e){if(e<0)throw Error("Invalid integer as argument, must be unsigned!");let t=e.toString(16);return t.length%2?`0${t}`:t}function z(e){return e.length>=2&&"0"===e[0]&&"x"===e[1]}function G(e){if(e instanceof Uint8Array)return e;if("string"==typeof e){var t;return z(e)?j((t="string"!=typeof e?e:z(e)?e.slice(2):e).length%2?`0${t}`:t):new TextEncoder().encode(e)}if("number"==typeof e||"bigint"==typeof e)return e?j(H(e)):Uint8Array.from([]);if(null==e)return Uint8Array.from([]);throw Error("toBytes: received unsupported type "+typeof e)}let Z={encode:function e(t){if(Array.isArray(t)){let r=[],n=0;for(let i=0;i<t.length;i++){let o=e(t[i]);r.push(o),n+=o.length}return U(M(n,192),...r)}let r=G(t);return 1===r.length&&r[0]<128?r:U(M(r.length,128),r)},decode:function(e,t=!1){if(null==e||0===e.length)return Uint8Array.from([]);let r=function e(t){let r,n,i,o,a;let s=[],c=t[0];if(c<=127)return{data:t.slice(0,1),remainder:t.subarray(1)};if(c<=183){if(r=c-127,i=128===c?Uint8Array.from([]):L(t,1,r),2===r&&i[0]<128)throw Error("invalid RLP encoding: invalid prefix, single byte < 0x80 are not prefixed");return{data:i,remainder:t.subarray(r)}}
2if(c<=191){if(n=c-182,t.length-1<n)throw Error("invalid RLP: not enough bytes for string length");if((r=F(L(t,1,n)))<=55)throw Error("invalid RLP: expected string length to be greater than 55");return{data:i=L(t,n,r+n),remainder:t.subarray(r+n)}}if(c<=247){for(o=L(t,1,r=c-191);o.length;)a=e(o),s.push(a.data),o=a.remainder;return{data:s,remainder:t.subarray(r)}}{if((r=F(L(t,1,n=c-246)))<56)throw Error("invalid RLP: encoded list too short");let i=n+r;if(i>t.length)throw Error("invalid RLP: total length is larger than the data");for(o=L(t,n,i);o.length;)a=e(o),s.push(a.data),o=a.remainder;return{data:s,remainder:t.subarray(i)}}}(G(e));if(t)return{data:r.data,remainder:r.remainder.slice()};if(0!==r.remainder.length)throw Error("invalid RLP: remainder must be zero");return r.data}};var q=r(71629),V=r(13744);function K(e){if("string"!=typeof e)throw Error(`[isHexPrefixed] input must be type 'string', received type ${typeof e}`);return"0"===e[0]&&"x"===e[1]}let W=e=>{if("string"!=typeof e)throw Error(`[stripHexPrefix] input must be type 'string', received ${typeof e}`);return K(e)?e.slice(2):e};function J(e){let t=e;if("string"!=typeof t)throw Error(`[padToEven] value must be type 'string', received ${typeof t}`);return t.length%2&&(t=`0${t}`),t}function Y(e,t){return"string"==typeof e&&!!e.match(/^0x[0-9A-Fa-f]*$/)&&(void 0===t||!(t>0)||e.length===2+2*t)}let X=function(e){if(!(e instanceof Uint8Array))throw Error(`This method only supports Uint8Array but input was: ${e}`)},Q=function(e){if("string"!=typeof e)throw Error(`This method only supports strings but input was: ${e}`)},ee=BigInt(0),et={},er={};for(let e=0;e<16;e++){let t=e,r=16*e,n=e.toString(16).toLowerCase();er[n]=t,er[n.toUpperCase()]=t,et[n]=r,et[n.toUpperCase()]=r}function en(e){let t=e.length,r=new Uint8Array(t/2);for(let n=0;n<t;n+=2)r[n/2]=et[e[n]]+er[e[n+1]];return r}let ei=e=>{if("0x"!==e.slice(0,2))return en(J(e));throw Error("hex string is prefixed with 0x, should be unprefixed")},eo=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0")),ea=e=>{let t="0x";if(void 0===e||0===e.length)return t;for(let r of e)t+=eo[r];return t},es=[];for(let e=0;e<=65535;e++)es[e]=BigInt(e);let ec=(e,t=!1)=>{t&&e.reverse();let r=ea(e);return"0x"===r?ee:4===r.length?es[e[0]]:6===r.length?es[256*e[0]+e[1]]:BigInt(r)},eu=e=>{if("string"!=typeof e)throw Error(`hex argument type ${typeof e} must be of type string`);if(!/^0x[0-9a-fA-F]*$/.test(e))throw Error(`Input must be a 0x-prefixed hexadecimal string, got ${e}`);return(e=e.slice(2)).length%2!=0&&(e=J(e)),en(e)},el=e=>{if(!Number.isSafeInteger(e)||e<0)throw Error(`Received an invalid integer type: ${e}`);return`0x${e.toString(16)}`},ef=e=>eu(el(e)),eh=(e,t=!1)=>{let r=eb("0x"+J(e.toString(16)));return t?r.reverse():r},ed=e=>new Uint8Array(e),ep=(e,t,r)=>r?e.length<t?new Uint8Array([...e,...ed(t-e.length)]):e.subarray(0,t):e.length<t?new Uint8Array([...ed(t-e.length),...e]):e.subarray(-t),em=(e,t)=>(X(e),ep(e,t,!1)),eg=e=>{let t=e[0];for(;e.length>0&&"0"===t.toString();)t=(e=e.slice(1))[0];return e},ey=e=>(X(e),eg(e)),eb=e=>{if(null==e)return new Uint8Array;
2if(Array.isArray(e)||e instanceof Uint8Array)return Uint8Array.from(e);if("string"==typeof e){if(!Y(e))throw Error(`Cannot convert string to Uint8Array. toBytes only supports 0x-prefixed hex strings and this string was given: ${e}`);return eu(e)}if("number"==typeof e)return ef(e);if("bigint"==typeof e){if(e<ee)throw Error(`Cannot convert negative bigint to Uint8Array. Given: ${e}`);let t=e.toString(16);return t.length%2&&(t="0"+t),ei(t)}if(void 0!==e.toBytes)return e.toBytes();throw Error("invalid type")},ev=e=>"string"!=typeof e?e:K(e)?e:"0x"+e,eE=e=>{for(let[t,r]of Object.entries(e))if(void 0!==r&&r.length>0&&0===r[0])throw Error(`${t} cannot have leading zeroes, received: ${ea(r)}`)},ew=e=>"0x"+e.toString(16),e_=e=>ey(eh(e)),ex=(...e)=>{if(1===e.length)return e[0];let t=new Uint8Array(e.reduce((e,t)=>e+t.length,0));for(let r=0,n=0;r<e.length;r++){let i=e[r];t.set(i,n),n+=i.length}return t},eS=BigInt("0xffffffffffffffff"),eA=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");BigInt("115792089237316195423570985008687907853269984665640564039457584007913129639935"),q.kA.CURVE.n;let eP=q.kA.CURVE.n/BigInt(2);BigInt("0x10000000000000000000000000000000000000000000000000000000000000000"),eu("0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470"),eu("0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347"),eu("0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"),Uint8Array.from([128]),BigInt(-1);let eI=BigInt(0),ek=BigInt(1),eT=BigInt(2);BigInt(3),BigInt(7);let eR=BigInt(8),eB=BigInt(27);BigInt(28),BigInt(31),BigInt(32),BigInt(64),BigInt(128),BigInt(255),BigInt(256),BigInt(96),BigInt(100),BigInt(160),BigInt(224),BigInt(7922816251426434e13),BigInt(1461501637330903e33),BigInt(2695994666715064e52),BigInt(1e9);var eO=r(17507);let eC=function(e){try{Q(e)}catch(e){return!1}return/^0x[0-9a-fA-F]{40}$/.test(e)},eN=function(e,t,r){if(X(e),X(t),X(r),20!==e.length)throw Error("Expected from to be of length 20");if(32!==t.length)throw Error("Expected salt to be of length 32");return(0,eO.wn)(ex(eu("0xff"),e,t,(0,eO.wn)(r))).subarray(-20)},eL=function(e,t=!1){if(X(e),t&&64!==e.length&&(e=q.kA.ProjectivePoint.fromHex(e).toRawBytes(!1).slice(1)),64!==e.length)throw Error("Expected pubKey to be of length 64");return(0,eO.wn)(e).subarray(-20)},eF=function(e){return eL((X(e),q.kA.ProjectivePoint.fromPrivateKey(e).toRawBytes(!1).slice(1)))};new Uint8Array(0);class eM{constructor(e){if(20!==e.length)throw Error("Invalid address length");this.bytes=e}static zero(){return new eM(ed(20))}static fromString(e){if(!eC(e))throw Error("Invalid address");return new eM(eb(e))}static fromPublicKey(e){if(!(e instanceof Uint8Array))throw Error("Public key should be Uint8Array");return new eM(eL(e))}static fromPrivateKey(e){if(!(e instanceof Uint8Array))throw Error("Private key should be Uint8Array");return new eM(eF(e))}static generate(e,t){var r,n;if("bigint"!=typeof t)throw Error("Expected nonce to be a bigint");return new eM((r=e.bytes,n=eh(t),(X(r),X(n),ec(n)===eI)?(0,eO.wn)(Z.encode([r,Uint8Array.from([])])).subarray(-20):(0,eO.wn)(Z.encode([r,n])).subarray(-20)))}static generate2(e,t,r){if(!(t instanceof Uint8Array))throw Error("Expected salt to be a Uint8Array");if(!(r instanceof Uint8Array))throw Error("Expected initCode to be a Uint8Array");return new eM(eN(e.bytes,t,r))}equals(e){return(0,V.hD)(this.bytes,e.bytes)}isZero(){return this.equals(eM.zero())}isPrecompileOrSystemAddress(){let e=ec(this.bytes),t=BigInt("0xffff");return e>=eI&&e<=t}toString(){return ea(this.bytes)}toBytes(){return new Uint8Array(this.bytes)}}function eD(e,t){if(null===e)return null;if(void 0===e)return;if("string"!=typeof e||Y(e)){if("number"==typeof e&&!Number.isSafeInteger(e))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: ${e}`);let r=eb(e);switch(t){case y.Uint8Array:return r;case y.BigInt:return ec(r);case y.Number:{let e=ec(r);if(e>BigInt(Number.MAX_SAFE_INTEGER))throw Error("The provided number is greater than MAX_SAFE_INTEGER (please use an alternative output type)");return Number(e)}case y.PrefixedHexString:return ea(r);default:throw Error("unknown outputType")}}(n=m||(m={})).String="string",n.Bytes="view",n.Number="number",(i=g||(g={})).String="string",i.Bytes="view",i.JSON="json",(o=y||(y={}))[o.Number=0]="Number",o[o.BigInt=1]="BigInt",o[o.Uint8Array=2]="Uint8Array",o[o.PrefixedHexString=3]="PrefixedHexString";let e$=function(e,t,r,n,i){let o=ex(em(r,32),em(n,32)),a=t===eI||t===ek?t:void 0===i?t-eB:t-(i*eT+BigInt(35));if(!(a===eI||a===ek))throw Error("Invalid signature v value");return q.kA.Signature.fromCompact(o).addRecoveryBit(Number(a)).recoverPublicKey(e).toRawBytes(!1).slice(1)};var ej=r(55445),eU=r(59782);let eH=e=>{let t=(0,V.iY)(e),r=t.byteLength;if(0===r)throw Error("invalid blob data");if(r>262143)throw Error("blob data is too large");let n=Math.ceil(r/131072),i=function(e,t){let r=new Uint8Array(131072*t).fill(0);return r.set(e),r[e.byteLength]=128,r}(t,n),o=[];for(let e=0;e<n;e++){let t=function(e){let t=new Uint8Array(131072);for(let r=0;r<4096;r++){let n=new Uint8Array(32);n.set(e.subarray(31*r,(r+1)*31),0),t.set(n,32*r)}return t}(i.subarray(131072*e,(e+1)*131072));o.push(t)}return o},ez=(e,t)=>{let r=[];for(let n of t)r.push(e.blobToKzgCommitment(n));return r},eG=(e,t,r)=>t.map((t,n)=>e.computeBlobKzgProof(t,r[n])),eZ=(e,t)=>{let r=new Uint8Array(32);return r.set([t],0),r.set((0,eU.J)(e).subarray(1),1),r},eq=e=>{let t=[];for(let r of e)t.push(eZ(r,1));return t},eV=async(e,t)=>{let r=JSON.stringify({method:t.method,params:t.params,jsonrpc:"2.0",id:1}),n=await fetch(e,{headers:{"content-type":"application/json"},method:"POST",body:r});if(!n.ok)throw Error(`JSONRpcError: ${JSON.stringify({method:t.method,status:n.status,message:await n.text().catch(()=>"Could not parse error message likely because of a network error")},null,2)}`);return(await n.json()).result},eK=e=>{if("string"==typeof e)return e;if("object"==typeof e&&void 0!==e._getConnection)return e._getConnection().url;
2throw Error("Must provide valid provider URL or Web3Provider")},eW={mainnet:{name:"mainnet",chainId:1,networkId:1,defaultHardfork:"shanghai",consensus:{type:"pow",algorithm:"ethash",ethash:{}},comment:"The Ethereum main chain",url:"https://ethstats.net/",genesis:{gasLimit:5e3,difficulty:17179869184,nonce:"0x0000000000000042",extraData:"0x11bbe8db4e347b4e8c937c1c8370e4b5ed33adb3db69cbdb7a38e1e50b1b82fa"},hardforks:[{name:"chainstart",block:0,forkHash:"0xfc64ec04"},{name:"homestead",block:115e4,forkHash:"0x97c2c34c"},{name:"dao",block:192e4,forkHash:"0x91d1f948"},{name:"tangerineWhistle",block:2463e3,forkHash:"0x7a64da13"},{name:"spuriousDragon",block:2675e3,forkHash:"0x3edd5b10"},{name:"byzantium",block:437e4,forkHash:"0xa00bc324"},{name:"constantinople",block:728e4,forkHash:"0x668db0af"},{name:"petersburg",block:728e4,forkHash:"0x668db0af"},{name:"istanbul",block:9069e3,forkHash:"0x879d6e30"},{name:"muirGlacier",block:92e5,forkHash:"0xe029e991"},{name:"berlin",block:12244e3,forkHash:"0x0eb440f6"},{name:"london",block:12965e3,forkHash:"0xb715077d"},{name:"arrowGlacier",block:13773e3,forkHash:"0x20c327fc"},{name:"grayGlacier",block:1505e4,forkHash:"0xf0afd0e3"},{name:"paris",ttd:"58750000000000000000000",block:15537394,forkHash:"0xf0afd0e3"},{name:"mergeForkIdTransition",block:null,forkHash:null},{name:"shanghai",block:null,timestamp:"1681338455",forkHash:"0xdce96c2d"},{name:"cancun",block:null,timestamp:"1710338135",forkHash:"0x9f3d2254"}],bootstrapNodes:[{ip:"18.138.108.67",port:30303,id:"d860a01f9722d78051619d1e2351aba3f43f943f6f00718d1b9baa4101932a1f5011f16bb2b1bb35db20d6fe28fa0bf09636d26a87d31de9ec6203eeedb1f666",location:"ap-southeast-1-001",comment:"bootnode-aws-ap-southeast-1-001"},{ip:"3.209.45.79",port:30303,id:"22a8232c3abc76a16ae9d6c3b164f98775fe226f0917b0ca871128a74a8e9630b458460865bab457221f1d448dd9791d24c4e5d88786180ac185df813a68d4de",location:"us-east-1-001",comment:"bootnode-aws-us-east-1-001"},{ip:"65.108.70.101",port:30303,id:"2b252ab6a1d0f971d9722cb839a42cb81db019ba44c08754628ab4a823487071b5695317c8ccd085219c3a03af063495b2f1da8d18218da2d6a82981b45e6ffc",location:"eu-west-1-001",comment:"bootnode-hetzner-hel"},{ip:"157.90.35.166",port:30303,id:"4aeb4ab6c14b23e2c4cfdce879c04b0748a20d8e9b59e25ded2a08143e265c6c25936e74cbc8e641e3312ca288673d91f2f93f8e277de3cfa444ecdaaf982052",location:"eu-central-1-001",comment:"bootnode-hetzner-fsn"}],dnsNetworks:["enrtree://AKA3AM6LPBYEUDMVNU3BSVQJ5AD45Y7YPOHJLEF6W26QOE4VTUDPE@all.mainnet.ethdisco.net"]},goerli:{name:"goerli",chainId:5,networkId:5,defaultHardfork:"shanghai",consensus:{type:"poa",algorithm:"clique",clique:{period:15,epoch:3e4}},comment:"Cross-client PoA test network",url:"https://github.com/goerli/testnet",genesis:{timestamp:"0x5c51a607",gasLimit:10485760,difficulty:1,nonce:"0x0000000000000000",extraData:"0x22466c6578692069732061207468696e6722202d204166726900000000000000e0a2bd4258d2768837baa26a28fe71dc079f84c70000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"},hardforks:[{name:"chainstart",block:0,forkHash:"0xa3f5ab08"},{name:"homestead",block:0,forkHash:"0xa3f5ab08"},{name:"tangerineWhistle",block:0,forkHash:"0xa3f5ab08"},{name:"spuriousDragon",block:0,forkHash:"0xa3f5ab08"},{name:"byzantium",block:0,forkHash:"0xa3f5ab08"},{name:"constantinople",block:0,forkHash:"0xa3f5ab08"},{name:"petersburg",block:0,forkHash:"0xa3f5ab08"},{name:"istanbul",block:1561651,forkHash:"0xc25efa5c"},{name:"berlin",block:4460644,forkHash:"0x757a1c47"},{name:"london",block:5062605,forkHash:"0xb8c6299d"},{name:"paris",ttd:"10790000",block:7382819,forkHash:"0xb8c6299d"},{name:"mergeForkIdTransition",block:null,forkHash:null},{name:"shanghai",block:null,timestamp:"1678832736",forkHash:"0xf9843abf"},{name:"cancun",block:null,timestamp:"1705473120",forkHash:"0x70cc14e2"}],bootstrapNodes:[{ip:"51.141.78.53",port:30303,id:"011f758e6552d105183b1761c5e2dea0111bc20fd5f6422bc7f91e0fabbec9a6595caf6239b37feb773dddd3f87240d99d859431891e4a642cf2a0a9e6cbb98a",location:"",comment:"Upstream bootnode 1"},{ip:"13.93.54.137",port:30303,id:"176b9417f511d05b6b2cf3e34b756cf0a7096b3094572a8f6ef4cdcb9d1f9d00683bf0f83347eebdf3b81c3521c2332086d9592802230bf528eaf606a1d9677b",location:"",comment:"Upstream bootnode 2"},{ip:"94.237.54.114",port:30313,id:"46add44b9f13965f7b9875ac6b85f016f341012d84f975377573800a863526f4da19ae2c620ec73d11591fa9510e992ecc03ad0751f53cc02f7c7ed6d55c7291",location:"",comment:"Upstream bootnode 3"},{ip:"18.218.250.66",port:30313,id:"b5948a2d3e9d486c4d75bf32713221c2bd6cf86463302339299bd227dc2e276cd5a1c7ca4f43a0e9122fe9af884efed563bd2a1fd28661f3b5f5ad7bf1de5949",location:"",comment:"Upstream bootnode 4"},{ip:"3.11.147.67",port:30303,id:"a61215641fb8714a373c80edbfa0ea8878243193f57c96eeb44d0bc019ef295abd4e044fd619bfc4c59731a73fb79afe84e9ab6da0c743ceb479cbb6d263fa91",location:"",comment:"Ethereum Foundation bootnode"},{ip:"51.15.116.226",port:30303,id:"a869b02cec167211fb4815a82941db2e7ed2936fd90e78619c53eb17753fcf0207463e3419c264e2a1dd8786de0df7e68cf99571ab8aeb7c4e51367ef186b1dd",location:"",comment:"Goerli Initiative bootnode"},{ip:"51.15.119.157",port:30303,id:"807b37ee4816ecf407e9112224494b74dd5933625f655962d892f2f0f02d7fbbb3e2a94cf87a96609526f30c998fd71e93e2f53015c558ffc8b03eceaf30ee33",location:"",comment:"Goerli Initiative bootnode"},{ip:"51.15.119.157",port:40303,id:"a59e33ccd2b3e52d578f1fbd70c6f9babda2650f0760d6ff3b37742fdcdfdb3defba5d56d315b40c46b70198c7621e63ffa3f987389c7118634b0fefbbdfa7fd",location:"",comment:"Goerli Initiative bootnode"}],dnsNetworks:["enrtree://AKA3AM6LPBYEUDMVNU3BSVQJ5AD45Y7YPOHJLEF6W26QOE4VTUDPE@all.goerli.ethdisco.net"]},sepolia:{name:"sepolia",chainId:11155111,networkId:11155111,defaultHardfork:"shanghai",consensus:{type:"pow",algorithm:"ethash",ethash:{}},comment:"PoW test network to replace Ropsten",url:"https://github.com/ethereum/go-ethereum/pull/23730",genesis:{timestamp:"0x6159af19",gasLim
2it:3e7,difficulty:131072,nonce:"0x0000000000000000",extraData:"0x5365706f6c69612c20417468656e732c204174746963612c2047726565636521"},hardforks:[{name:"chainstart",block:0,forkHash:"0xfe3366e7"},{name:"homestead",block:0,forkHash:"0xfe3366e7"},{name:"tangerineWhistle",block:0,forkHash:"0xfe3366e7"},{name:"spuriousDragon",block:0,forkHash:"0xfe3366e7"},{name:"byzantium",block:0,forkHash:"0xfe3366e7"},{name:"constantinople",block:0,forkHash:"0xfe3366e7"},{name:"petersburg",block:0,forkHash:"0xfe3366e7"},{name:"istanbul",block:0,forkHash:"0xfe3366e7"},{name:"muirGlacier",block:0,forkHash:"0xfe3366e7"},{name:"berlin",block:0,forkHash:"0xfe3366e7"},{name:"london",block:0,forkHash:"0xfe3366e7"},{name:"paris",ttd:"17000000000000000",block:1450409,forkHash:"0xfe3366e7"},{name:"mergeForkIdTransition",block:1735371,forkHash:"0xb96cbd13"},{name:"shanghai",block:null,timestamp:"1677557088",forkHash:"0xf7f9bc08"},{name:"cancun",block:null,timestamp:"1706655072",forkHash:"0x88cf81d9"}],bootstrapNodes:[{ip:"18.168.182.86",port:30303,id:"9246d00bc8fd1742e5ad2428b80fc4dc45d786283e05ef6edbd9002cbc335d40998444732fbe921cb88e1d2c73d1b1de53bae6a2237996e9bfe14f871baf7066",location:"",comment:"geth"},{ip:"52.14.151.177",port:30303,id:"ec66ddcf1a974950bd4c782789a7e04f8aa7110a72569b6e65fcd51e937e74eed303b1ea734e4d19cfaec9fbff9b6ee65bf31dcb50ba79acce9dd63a6aca61c7",location:"",comment:"besu"},{ip:"165.22.196.173",port:30303,id:"ce970ad2e9daa9e14593de84a8b49da3d54ccfdf83cbc4fe519cb8b36b5918ed4eab087dedd4a62479b8d50756b492d5f762367c8d20329a7854ec01547568a6",location:"",comment:"EF"},{ip:"65.108.95.67",port:30303,id:"075503b13ed736244896efcde2a992ec0b451357d46cb7a8132c0384721742597fc8f0d91bbb40bb52e7d6e66728d36a1fda09176294e4a30cfac55dcce26bc6",location:"",comment:"lodestar"}],dnsNetworks:["enrtree://AKA3AM6LPBYEUDMVNU3BSVQJ5AD45Y7YPOHJLEF6W26QOE4VTUDPE@all.sepolia.ethdisco.net"]},holesky:{name:"holesky",chainId:17e3,networkId:17e3,defaultHardfork:"paris",consensus:{type:"pos",algorithm:"casper"},comment:"PoS test network to replace Goerli",url:"https://github.com/eth-clients/holesky/",genesis:{baseFeePerGas:"0x3B9ACA00",difficulty:"0x01",extraData:"0x",gasLimit:"0x17D7840",nonce:"0x0000000000001234",timestamp:"0x65156994"},hardforks:[{name:"chainstart",block:0,forkHash:"0xc61a6098"},{name:"homestead",block:0,forkHash:"0xc61a6098"},{name:"tangerineWhistle",block:0,forkHash:"0xc61a6098"},{name:"spuriousDragon",block:0,forkHash:"0xc61a6098"},{name:"byzantium",block:0,forkHash:"0xc61a6098"},{name:"constantinople",block:0,forkHash:"0xc61a6098"},{name:"petersburg",block:0,forkHash:"0xc61a6098"},{name:"istanbul",block:0,forkHash:"0xc61a6098"},{name:"muirGlacier",block:0,forkHash:"0xc61a6098"},{name:"berlin",block:0,forkHash:"0xc61a6098"},{name:"london",block:0,forkHash:"0xc61a6098"},{name:"paris",ttd:"0",block:0,forkHash:"0xc61a6098"},{name:"mergeForkIdTransition",block:0,forkHash:"0xc61a6098"},{name:"shanghai",block:null,timestamp:"1696000704",forkHash:"0xfd4f016b"},{name:"cancun",block:null,timestamp:"1707305664",forkHash:"0x9b192ad0"}],bootstrapNodes:[{ip:"146.190.13.128",port:30303,id:"ac906289e4b7f12df423d654c5a962b6ebe5b3a74cc9e06292a85221f9a64a6f1cfdd6b714ed6dacef51578f92b34c60ee91e9ede9c7f8fadc4d347326d95e2b",location:"",comment:"bootnode 1"},{ip:"178.128.136.233",port:30303,id:"a3435a0155a3e837c02f5e7f5662a2f1fbc25b48e4dc232016e1c51b544cb5b4510ef633ea3278c0e970fa8ad8141e2d4d0f9f95456c537ff05fdf9b31c15072",location:"",comment:"bootnode 2"}],dnsNetworks:["enrtree://AKA3AM6LPBYEUDMVNU3BSVQJ5AD45Y7YPOHJLEF6W26QOE4VTUDPE@all.holesky.ethdisco.net"]},kaustinen:{name:"kaustinen",chainId:69420,networkId:69420,defaultHardfork:"prague",consensus:{type:"pos",algorithm:"casper"},comment:"Verkle kaustinen testnet 2 (likely temporary, do not hard-wire into production code)",url:"https://github.com/eth-clients/kaustinen/",genesis:{difficulty:"0x01",extraData:"0x",gasLimit:"0x17D7840",nonce:"0x0000000000001234",timestamp:"0x65608a64"},hardforks:[{name:"chainstart",block:0},{name:"homestead",block:0},{name:"tangerineWhistle",block:0},{name:"spuriousDragon",block:0},{name:"byzantium",block:0},{name:"constantinople",block:0},{name:"petersburg",block:0},{name:"istanbul",block:0},{name:"berlin",block:0},{name:"london",block:0},{name:"paris",ttd:"0",block:0}
2,{name:"mergeForkIdTransition",block:0},{name:"shanghai",block:null,timestamp:"0"},{name:"prague",block:null,timestamp:"1700825700"}],bootstrapNodes:[],dnsNetworks:[]}},eJ=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117];"undefined"!=typeof Int32Array&&(eJ=new Int32Array(eJ));let eY=(e,t)=>{let r=0===t?0:-1^~~t;for(let t=0;t<e.length;t++)r=eJ[(r^e[t])&255]^r>>>8;return -1^r},eX=(e,t)=>eY(e,t)>>>0;(a=b||(b={}))[a.Mainnet=1]="Mainnet",a[a.Goerli=5]="Goerli",a[a.Sepolia=11155111]="Sepolia",a[a.Holesky=17e3]="Holesky",a[a.Kaustinen=69420]="Kaustinen",b.Mainnet,eu("0xd7f8974fb5ac78d9ac099b9ad5018bedc2ce0a72dad1827a1709da30580f0544"),b.Goerli,eu("0x5d6cded585e73c4e322c30c2f782a336316f17dd85a4863b9d838d2d4b8b3008"),b.Sepolia,eu("0x5eb6e371a698b8d68f665192350ffcecbbbf322916f4b51bd79bb6887da3f494"),b.Holesky,eu("0x69d8c9d72f6fa4ad42d4702b433707212f90db395eb54dc20bc85de253788783"),b.Kaustinen,eu("0x5e8519756841faf0b2c28951c451b61a4b407b70a5ce5b57992f4bec973173ff"),(s=v||(v={})).Chainstart="chainstart",s.Homestead="homestead",s.Dao="dao",s.TangerineWhistle="tangerineWhistle",s.SpuriousDragon="spuriousDragon",s.Byzantium="byzantium",s.Constantinople="constantinople",s.Petersburg="petersburg",s.Istanbul="istanbul",s.MuirGlacier="muirGlacier",s.Berlin="berlin",s.London="london",s.ArrowGlacier="arrowGlacier",s.GrayGlacier="grayGlacier",s.MergeForkIdTransition="mergeForkIdTransition",s.Paris="paris",s.Shanghai="shanghai",s.Cancun="cancun",s.Prague="prague",(c=E||(E={})).ProofOfStake="pos",c.ProofOfWork="pow",c.ProofOfAuthority="poa",(u=w||(w={})).Ethash="ethash",u.Clique="clique",u.Casper="casper",(l=_||(_={}
2)).PolygonMainnet="polygon-mainnet",l.PolygonMumbai="polygon-mumbai",l.ArbitrumOne="arbitrum-one",l.xDaiChain="x-dai-chain",l.OptimisticKovan="optimistic-kovan",l.OptimisticEthereum="optimistic-ethereum",(f=x||(x={})).Stagnant="stagnant",f.Draft="draft",f.Review="review",f.Final="final";let eQ={1153:{comment:"Transient storage opcodes",url:"https://eips.ethereum.org/EIPS/eip-1153",status:x.Review,minimumHardfork:v.Chainstart,requiredEIPs:[],gasPrices:{tstore:{v:100,d:"Base fee of the TSTORE opcode"},tload:{v:100,d:"Base fee of the TLOAD opcode"}}},1559:{comment:"Fee market change for ETH 1.0 chain",url:"https://eips.ethereum.org/EIPS/eip-1559",status:x.Final,minimumHardfork:v.Berlin,requiredEIPs:[2930],gasConfig:{baseFeeMaxChangeDenominator:{v:8,d:"Maximum base fee change denominator"},elasticityMultiplier:{v:2,d:"Maximum block gas target elasticity"},initialBaseFee:{v:1e9,d:"Initial base fee on first EIP1559 block"}}},2315:{comment:"Simple subroutines for the EVM",url:"https://eips.ethereum.org/EIPS/eip-2315",status:x.Draft,minimumHardfork:v.Istanbul,requiredEIPs:[],gasPrices:{beginsub:{v:2,d:"Base fee of the BEGINSUB opcode"},returnsub:{v:5,d:"Base fee of the RETURNSUB opcode"},jumpsub:{v:10,d:"Base fee of the JUMPSUB opcode"}}},2565:{comment:"ModExp gas cost",url:"https://eips.ethereum.org/EIPS/eip-2565",status:x.Final,minimumHardfork:v.Byzantium,requiredEIPs:[],gasPrices:{modexpGquaddivisor:{v:3,d:"Gquaddivisor from modexp precompile for gas calculation"}}},2718:{comment:"Typed Transaction Envelope",url:"https://eips.ethereum.org/EIPS/eip-2718",status:x.Final,minimumHardfork:v.Chainstart,requiredEIPs:[]},2929:{comment:"Gas cost increases for state access opcodes",url:"https://eips.ethereum.org/EIPS/eip-2929",status:x.Final,minimumHardfork:v.Chainstart,requiredEIPs:[],gasPrices:{coldsload:{v:2100,d:"Gas cost of the first read of storage from a given location (per transaction)"},coldaccountaccess:{v:2600,d:"Gas cost of the first read of a given address (per transaction)"},warmstorageread:{v:100,d:"Gas cost of reading storage locations which have already loaded 'cold'"},sstoreCleanGasEIP2200:{v:2900,d:"Once per SSTORE operation from clean non-zero to something else"},sstoreNoopGasEIP2200:{v:100,d:"Once per SSTORE operation if the value doesn't change"},sstoreDirtyGasEIP2200:{v:100,d:"Once per SSTORE operation if a dirty value is changed"},sstoreInitRefundEIP2200:{v:19900,d:"Once per SSTORE operation for resetting to the original zero value"},sstoreCleanRefundEIP2200:{v:4900,d:"Once per SSTORE operation for resetting to the original non-zero value"},call:{v:0,d:"Base fee of the CALL opcode"},callcode:{v:0,d:"Base fee of the CALLCODE opcode"},delegatecall:{v:0,d:"Base fee of the DELEGATECALL opcode"},staticcall:{v:0,d:"Base fee of the STATICCALL opcode"},balance:{v:0,d:"Base fee of the BALANCE opcode"},extcodesize:{v:0,d:"Base fee of the EXTCODESIZE opcode"},extcodecopy:{v:0,d:"Base fee of the EXTCODECOPY opcode"},extcodehash:{v:0,d:"Base fee of the EXTCODEHASH opcode"},sload:{v:0,d:"Base fee of the SLOAD opcode"},sstore:{v:0,d:"Base fee of the SSTORE opcode"}}},2930:{comment:"Optional access lists",url:"https://eips.ethereum.org/EIPS/eip-2930",status:x.Final,minimumHardfork:v.Istanbul,requiredEIPs:[2718,2929],gasPrices:{accessListStorageKeyCost:{v:1900,d:"Gas cost per storage key in an Access List transaction"},accessListAddressCost:{v:2400,d:"Gas cost per storage key in an Access List transaction"}}},2935:{comment:"Save historical block hashes in state (Verkle related usage, UNSTABLE)",url:"https://github.com/gballet/EIPs/pull/3/commits/2e9ac09a142b0d9fb4db0b8d4609f92e5d9990c5",status:x.Draft,minimumHardfork:v.Chainstart,requiredEIPs:[],vm:{historyStorageAddress:{v:BigInt("0xfffffffffffffffffffffffffffffffffffffffe"),d:"The address where the historical blockhashes are stored"},historyServeWindow:{v:BigInt(256),d:"The amount of blocks to be served by the historical blockhash contract"}}},3074:{comment:"AUTH and AUTHCALL opcodes",url:"https://eips.ethereum.org/EIPS/eip-3074",status:x.Review,minimumHardfork:v.London,requiredEIPs:[],gasPrices:{auth:{v:3100,d:"Gas cost of the AUTH opcode"},authcall:{v:0,d:"Gas cost of the AUTHCALL opcode"},authcallValueTransfer:{v:6700,d:"Paid for CALL when the value transfer is non-zero"}}},3198:{comment:"BASEFEE opcode",url:"https://eips.ethereum.org/EIPS/eip-3198",status:x.Final,minimumHardfork:v.London,requiredEIPs:[],gasPrices:{basefee:{v:2,d:"Gas cost of the BASEFEE opcode"}}},3529:{comment:"Reduction in refunds",url:"https://eips.ethereum.org/EIPS/eip-3529",status:x.Final,minimumHardfork:v.Berlin,requiredEIPs:[2929],gasConfig:{maxRefundQuotient:{v:5,d:"Maximum refund quotient; max tx refund is min(tx.gasUsed/maxRefundQuotient, tx.gasRefund)"}},gasPrices:{selfdestructRefund:{v:0,d:"Refunded following a selfdestruct operation"},sstoreClearRefundEIP2200:{v:4800,d:"Once per SSTORE operation for clearing an originally existing storage slot"}}},3540:{comment:"EVM Object Format (EOF) v1",url:"https://eips.ethereum.org/EIPS/eip-3540",status:x.Review,minimumHardfork:v.London,requiredEIPs:[3541]},3541:{comment:"Reject new contracts starting with the 0xEF byte",url:"https://eips.ethereum.org/EIPS/eip-3541",status:x.Final,minimumHardfork:v.Berlin,requiredEIPs:[]},3554:{comment:"Difficulty Bomb Delay to December 1st 2021",url:"https://eips.ethereum.org/EIPS/eip-3554",status:x.Final,minimumHardfork:v.MuirGlacier,requiredEIPs:[],pow:{difficultyBombDelay:{v:95e5,d:"the amount of blocks to delay the difficulty bomb with"}}},3607:{comment:"Reject transactions from senders with deployed code",url:"https://eips.ethereum.org/EIPS/eip-3607",status:x.Final,minimumHardfork:v.Chainstart,requiredEIPs:[]},3651:{comment:"Warm COINBASE",url:"https://eips.ethereum.org/EIPS/eip-3651",status:x.Review,minimumHardfork:v.London,requiredEIPs:[2929]},3670:{comment:"EOF - Code Validation",url:"https://eips.ethereum.org/EIPS/eip-3670",status:"Review",minimumHardfork:v.London,requiredEIPs:[3540],gasConfig:{},gasPrices:{},vm:{},pow:{}},3675:{comment:"Upgrade consensus to Proof-of-Stake",url:"https://eips.ethereum.org/EIPS/eip-3675",status:x.Final,minimumHardfork:v.London,requiredEIPs:[]},3855:{comment:"PUSH0 instruction",url:"https://eips.ethereum.org/EIPS/eip-3855",status:x.Review,minimumHardfork:v.Chainstart,requiredEIPs:[],gasPrices:{push0:{v:2,d:"Base fee of the PUSH0 opcode"}}},3860:{comment:"Limit and meter initcode",url:"https://eips.ethereum.org/EIPS/eip-3860",status:x.Review,minimumHardfork:v.SpuriousDragon,requiredEIPs:[],gasPrices:{initCodeWordCost:{v:2,d:"Gas to pay for each word (32 bytes) of initcode when creating a contract"}},vm:{maxInitCodeSize:{v:49152,d:"Maximum length of initialization code when creating a contract"}}},4345:{comment:"Difficulty Bomb Delay to June 2022",url:"https://eips.ethereum.org/EIPS/eip-4345",status:x.Final,minimumHardfork:v.London,requiredEIPs:[],pow:{difficultyBombDelay:{v:107e5,d:"the amount of blocks to delay the difficulty bomb with"}}},4399:{comment:"Supplant DIFFICULTY opcode with PREVRANDAO",url:"https://eips.ethereum.org/EIPS/eip-4399",status:x.Review,minimumHardfork:v.London,requiredEIPs:[],gasPrices:{prevrandao:{v:2,d:"Base fee of the PREVRANDAO opcode (previously DIFFICULTY)"}}},4788:{comment:"Beacon block root in the EVM",url:"https://eips.ethereum.org/EIPS/eip-4788",status:x.Draft,minimumHardfork:v.Cancun,requiredEIPs:[],gasPrices:{},vm:{historicalRootsLength:{v:8191,d:"The modulo parameter of the beaconroot ring buffer in the beaconroot statefull precompile"}}},4844:{comment:"Shard Blob Transactions",url:"https://eips.ethereum.org/EIPS/eip-4844",status:x.Draft,minimumHardfork:v.Paris,requiredEIPs:[1559,2718,2930,4895],gasConfig:{blobGasPerBlob:{v:131072,d:"The base fee for blob gas per blob"},targetBlobGasPerBlock:{v:393216,d:"The target blob gas consumed per block"},maxblobGasPerBlock:{v:786432,d:"The max blob gas allowable per block"},blobGasPriceUpdateFraction:{v:3338477,d:"The denominator used in the exponential when calculating a blob gas price"}},gasPrices:{simpleGasPerBlob:{v:12e3,d:"The basic gas fee for each blob"},minBlobGasPrice:{v:1,d:"The minimum fee per blob gas"},kzgPointEvaluationGasPrecompilePrice:{v:5e4,d:"The fee associated with the point evaluation precompile"},blobhash:{v:3,d:"Base fee of the BLOBHASH opcode"}},sharding:{blobCommitmentVersionKzg:{v:1,d:"The number indicated a versioned hash is a KZG commitment"},fieldElementsPerBlob:{v:4096,d:"The number of field elements allowed per blob"}}},4895:{comment:"Beacon chain push withdrawals as operations",url:"https://eips.ethereum.org/EIPS/eip-4895",status:x.Review,minimumHardfork:v.Paris,requiredEIPs:[]},5133:{comment:"Delaying Difficulty Bomb to mid-September 2022",url:"https://eips.ethereum.org/EIPS/eip-5133",status:x.Draft,minimumHardfork:v.GrayGlacier,requiredEIPs:[],pow:{difficultyBombDelay:{v:114e5,d:"the amount of blocks to delay the difficulty bomb with"}}},5656:{comment:"MCOPY - Memory copying instruction",url:"https://eips.ethereum.org/EIPS/eip-5656",status:x.Draft,minimumHardfork:v.Shanghai,requiredEIPs:[],gasPrices:{mcopy:{v:3,d:"Base fee of the MCOPY opcode"}}},6780:{comment:"SELFDESTRUCT only in same transaction",url:"https://eips.ethereum.org/EIPS/eip-6780",status:x.Draft,minimumHardfork:v.London,requiredEIPs:[]},6800:{comment:"Ethereum state using a unified verkle tree (experimental)",url:"https://github.com/ethereum/EIPs/pull/6800",status:x.Draft,minimumHardfork:v.London,requiredEIPs:[]},7516:{comment:"BLOBBASEFEE opcode",url:"https://eips.ethereum.org/EIPS/eip-7516",status:x.Draft,minimumHardfork:v.Paris,requiredEIPs:[4844],gasPrices:{blobbasefee:{v:2,d:"Gas cost of the BLOBBASEFEE opcode"}}}};(h=S||(S={})).Draft="draft",h.Review="review",h.Final="final";let e0={chainstart:{name:"chainstart",comment:"Start of the Ethereum main chain",url:"",status:S.Final,gasConfig:{minGasLimit:{v:5e3,d:"Minimum the gas limit may ever be"},gasLimitBoundDivisor:{v:1024,d:"The bound divisor of the gas limit, used in update calculations"},maxRefundQuotient:{v:2,d:"Maximum refund quotient; max tx refund is min(tx.gasUsed/maxRefundQuotient, tx.gasRefund)"}},gasPrices:{base:{v:2,d:"Gas base cost, used e.g. for ChainID opcode (Istanbul)"},exp:{v:10,d:"Base fee of the EXP opcode"},expByte:{v:10,d:"Times ceil(log256(exponent)) for the EXP instruction"},keccak256:{v:30,d:"Base fee of the SHA3 opcode"}
2,keccak256Word:{v:6,d:"Once per word of the SHA3 operation's data"},sload:{v:50,d:"Base fee of the SLOAD opcode"},sstoreSet:{v:2e4,d:"Once per SSTORE operation if the zeroness changes from zero"},sstoreReset:{v:5e3,d:"Once per SSTORE operation if the zeroness does not change from zero"},sstoreRefund:{v:15e3,d:"Once per SSTORE operation if the zeroness changes to zero"},jumpdest:{v:1,d:"Base fee of the JUMPDEST opcode"},log:{v:375,d:"Base fee of the LOG opcode"},logData:{v:8,d:"Per byte in a LOG* operation's data"},logTopic:{v:375,d:"Multiplied by the * of the LOG*, per LOG transaction. e.g. LOG0 incurs 0 * c_txLogTopicGas, LOG4 incurs 4 * c_txLogTopicGas"},create:{v:32e3,d:"Base fee of the CREATE opcode"},call:{v:40,d:"Base fee of the CALL opcode"},callStipend:{v:2300,d:"Free gas given at beginning of call"},callValueTransfer:{v:9e3,d:"Paid for CALL when the value transfor is non-zero"},callNewAccount:{v:25e3,d:"Paid for CALL when the destination address didn't exist prior"},selfdestructRefund:{v:24e3,d:"Refunded following a selfdestruct operation"},memory:{v:3,d:"Times the address of the (highest referenced byte in memory + 1). NOTE: referencing happens on read, write and in instructions such as RETURN and CALL"},quadCoeffDiv:{v:512,d:"Divisor for the quadratic particle of the memory cost equation"},createData:{v:200,d:""},tx:{v:21e3,d:"Per transaction. NOTE: Not payable on data of calls between transactions"},txCreation:{v:32e3,d:"The cost of creating a contract via tx"},txDataZero:{v:4,d:"Per byte of data attached to a transaction that equals zero. NOTE: Not payable on data of calls between transactions"},txDataNonZero:{v:68,d:"Per byte of data attached to a transaction that is not equal to zero. NOTE: Not payable on data of calls between transactions"},copy:{v:3,d:"Multiplied by the number of 32-byte words that are copied (round up) for any *COPY operation and added"},ecRecover:{v:3e3,d:""},sha256:{v:60,d:""},sha256Word:{v:12,d:""},ripemd160:{v:600,d:""},ripemd160Word:{v:120,d:""},identity:{v:15,d:""},identityWord:{v:3,d:""},stop:{v:0,d:"Base fee of the STOP opcode"},add:{v:3,d:"Base fee of the ADD opcode"},mul:{v:5,d:"Base fee of the MUL opcode"},sub:{v:3,d:"Base fee of the SUB opcode"},div:{v:5,d:"Base fee of the DIV opcode"},sdiv:{v:5,d:"Base fee of the SDIV opcode"},mod:{v:5,d:"Base fee of the MOD opcode"},smod:{v:5,d:"Base fee of the SMOD opcode"},addmod:{v:8,d:"Base fee of the ADDMOD opcode"},mulmod:{v:8,d:"Base fee of the MULMOD opcode"},signextend:{v:5,d:"Base fee of the SIGNEXTEND opcode"},lt:{v:3,d:"Base fee of the LT opcode"},gt:{v:3,d:"Base fee of the GT opcode"},slt:{v:3,d:"Base fee of the SLT opcode"},sgt:{v:3,d:"Base fee of the SGT opcode"},eq:{v:3,d:"Base fee of the EQ opcode"},iszero:{v:3,d:"Base fee of the ISZERO opcode"},and:{v:3,d:"Base fee of the AND opcode"},or:{v:3,d:"Base fee of the OR opcode"},xor:{v:3,d:"Base fee of the XOR opcode"},not:{v:3,d:"Base fee of the NOT opcode"},byte:{v:3,d:"Base fee of the BYTE opcode"},address:{v:2,d:"Base fee of the ADDRESS opcode"},balance:{v:20,d:"Base fee of the BALANCE opcode"},origin:{v:2,d:"Base fee of the ORIGIN opcode"},caller:{v:2,d:"Base fee of the CALLER opcode"},callvalue:{v:2,d:"Base fee of the CALLVALUE opcode"},calldataload:{v:3,d:"Base fee of the CALLDATALOAD opcode"},calldatasize:{v:2,d:"Base fee of the CALLDATASIZE opcode"},calldatacopy:{v:3,d:"Base fee of the CALLDATACOPY opcode"},codesize:{v:2,d:"Base fee of the CODESIZE opcode"},codecopy:{v:3,d:"Base fee of the CODECOPY opcode"},gasprice:{v:2,d:"Base fee of the GASPRICE opcode"},extcodesize:{v:20,d:"Base fee of the EXTCODESIZE opcode"},extcodecopy:{v:20,d:"Base fee of the EXTCODECOPY opcode"},blockhash:{v:20,d:"Base fee of the BLOCKHASH opcode"},coinbase:{v:2,d:"Base fee of the COINBASE opcode"},timestamp:{v:2,d:"Base fee of the TIMESTAMP opcode"},number:{v:2,d:"Base fee of the NUMBER opcode"},difficulty:{v:2,d:"Base fee of the DIFFICULTY opcode"},gaslimit:{v:2,d:"Base fee of the GASLIMIT opcode"},pop:{v:2,d:"Base fee of the POP opcode"},mload:{v:3,d:"Base fee of the MLOAD opcode"},mstore:{v:3,d:"Base fee of the MSTORE opcode"},mstore8:{v:3,d:"Base fee of the MSTORE8 opcode"},sstore:{v:0,d:"Base fee of the SSTORE opcode"},jump:{v:8,d:"Base fee of the JUMP opcode"},jumpi:{v:10,d:"Base fee of the JUMPI opcode"},pc:{v:2,d:"Base fee of the PC opcode"},msize:{v:2,d:"Base fee of the MSIZE opcode"},gas:{v:2,d:"Base fee of the GAS opcode"},push:{v:3,d:"Base fee of the PUSH opcode"},dup:{v:3,d:"Base fee of the DUP opcode"},swap:{v:3,d:"Base fee of the SWAP opcode"},callcode:{v:40,d:"Base fee of the CALLCODE opcode"},return:{v:0,d:"Base fee of the RETURN opcode"},invalid:{v:0,d:"Base fee of the INVALID opcode"},selfdestruct:{v:0,d:"Base fee of the SELFDESTRUCT opcode"}},vm:{stackLimit:{v:1024,d:"Maximum size of VM stack allowed"},callCreateDepth:{v:1024,d:"Maximum depth of call/create stack"},maxExtraDataSize:{v:32,d:"Maximum size extra data may be after Genesis"}},pow:{minimumDifficulty:{v:131072,d:"The minimum that the difficulty may ever be"},difficultyBoundDivisor:{v:2048,d:"The bound divisor of the difficulty, used in the update calculations"},durationLimit:{v:13,d:"The decision boundary on the blocktime duration used to determine whether difficulty should go up or not"},epochDuration:{v:3e4,d:"Duration between proof-of-work epochs"},timebombPeriod:{v:1e5,d:"Exponential difficulty timebomb period"},minerReward:{v:BigInt("5000000000000000000"),d:"the amount a miner get rewarded for mining a block"},difficultyBombDelay:{v:0,d:"the amount of blocks to delay the difficulty bomb with"}}},homestead:{name:"homestead",comment:"Homestead hardfork with protocol and network changes",url:"https://eips.ethereum.org/EIPS/eip-606",status:S.Final,gasPrices:{delegatecall:{v:40,d:"Base fee of the DELEGATECALL opcode"}}},dao:{name:"dao",comment:"DAO rescue hardfork",url:"https://eips.ethereum.org/EIPS/eip-779",status:S.Final},tangerineWhistle:{name:"tangerineWhistle",comment:"Hardfork with gas cost changes for IO-heavy operations",url:"https://eips.ethereum.org/EIPS/eip-608",status:S.Final,gasPrices:{sload:{v:200,d:"Once per SLOAD operation"},call:{v:700,d:"Once per CALL operation & message call transaction"},extcodesize:{v:700,d:"Base fee of the EXTCODESIZE opcode"},extcodecopy:{v:700,d:"Base fee of the EXTCODECOPY opcode"},balance:{v:400,d:"Base fee of the BALANCE opcode"},delegatecall:{v:700,d:"Base fee of the DELEGATECALL opcode"},callcode:{v:700,d:"Base fee of the CALLCODE opcode"},selfdestruct:{v:5e3,d:"Base fee of the SELFDESTRUCT opcode"}}},spuriousDragon:{name:"spuriousDragon",comment:"HF with EIPs for simple replay attack protection, EXP cost increase, state trie clearing, contract code size limit",url:"https://eips.ethereum.org/EIPS/eip-607",status:S.Final,gasPrices:{expByte:{v:50,d:"Times ceil(log256(exponent)) for the EXP instruction"}},vm:{maxCodeSize:{v:24576,d:"Maximum length of contract code"}}},byzantium:{name:"byzantium",comment:"Hardfork with new precompiles, instructions and other protocol changes",url:"https://eips.ethereum.org/EIPS/eip-609",status:S.Final,gasPrices:{modexpGquaddivisor:{v:20,d:"Gquaddivisor from modexp precompile for gas calculation"},ecAdd:{v:500,d:"Gas costs for curve addition precompile"},ecMul:{v:4e4,d:"Gas costs for curve multiplication precompile"},ecPairing:{v:1e5,d:"Base gas costs for curve pairing precompile"},ecPairingWord:{v:8e4,d:"Gas costs regarding curve pairing precompile input length"},revert:{v:0,d:"Base fee of the REVERT opcode"},staticcall:{v:700,d:"Base fee of the STATICCALL opcode"},returndatasize:{v:2,d:"Base fee of the RETURNDATASIZE opcode"},returndatacopy:{v:3,d:"Base fee of the RETURNDATACOPY opcode"}},pow:{minerReward:{v:BigInt("3000000000000000000"),d:"the amount a miner get rewarded for mining a block"},difficultyBombDelay:{v:3e6,d:"the amount of blocks to delay the difficulty bomb with"}}},constantinople:{name:"constantinople",comment:"Postponed hardfork including EIP-1283 (SSTORE gas metering changes)",url:"https://eips.ethereum.org/EIPS/eip-1013",status:S.Final,gasPrices:{netSstoreNoopGas:{v:200,d:"Once per SSTORE operation if the value doesn't change"},netSstoreInitGas:{v:2e4,d:"Once per SSTORE operation from clean zero"},netSstoreCleanGas:{v:5e3,d:"Once per SSTORE operation from clean non-zero"},netSstoreDirtyGas:{v:200,d:"Once per SSTORE operation from dirty"},netSstoreClearRefund:{v:15e3,d:"Once per SSTORE operation for clearing an originally existing storage slot"},netSstoreResetRefund:{v:4800,d:"Once per SSTORE operation for resetting to the original non-zero value"},netSstoreResetClearRefund:{v:19800,d:"Once per SSTORE operation for resetting to the original zero value"},shl:{v:3,d:"Base fee of the SHL opcode"},shr:{v:3,d:"Base fee of the SHR opcode"},sar:{v:3,d:"Base fee of the SAR opcode"},extcodehash:{v:400,d:"Base fee of the EXTCODEHASH opcode"},create2:{v:32e3,d:"Base fee of the CREATE2 opcode"}},pow:{minerReward:{v:BigInt("2000000000000000000"),d:"The amount a miner gets rewarded for mining a block"},difficultyBombDelay:{v:5e6,d:"the amount of blocks to delay the difficulty bomb with"}}},petersburg:{name:"petersburg",comment:"Aka constantinopleFix, removes EIP-1283, activate together with or after constantinople",url:"https://eips.ethereum.org/EIPS/eip-1716",status:S.Final,gasPrices:{netSstoreNoopGas:{v:null,d:"Removed along EIP-1283"},netSstoreInitGas:{v:null,d:"Removed along EIP-1283"},netSstoreCleanGas:{v:null,d:"Removed along EIP-1283"},netSstoreDirtyGas:{v:null,d:"Removed along EIP-1283"},netSstoreClearRefund:{v:null,d:"Removed along EIP-1283"},netSstoreResetRefund:{v:null,d:"Removed along EIP-1283"},netSstoreResetClearRefund:{v:null,d:"Removed along EIP-1283"}}},istanbul:{name:"istanbul",comment:"HF targeted for December 2019 following the Constantinople/Petersburg HF",url:"https://eips.ethereum.org/EIPS/eip-1679",status:S.Final,gasConfig:{},gasPrices:{blake2Round:{v:1,d:"Gas cost per round for the Blake2 F precompile"},ecAdd:{v:150,d:"Gas costs for curve addition precompile"},ecMul:{v:6e3,d:"Gas costs for curve multiplication precompile"},ecPairing:{v:45e3,d:"Base gas costs for curve pairing precompile"},ecPairingWord:{v:34e3,d:"Gas costs regarding curve pairing precompile input length"},txDataNonZero:{v:16,d:"Per byte of data attached to a transaction that is not equal to zero. NOTE: Not payable on data of calls between transactions"},sstoreSentryGasEIP2200:{v:2300,d:"Minimum gas required to be present for an SSTORE call, not consumed"}
2,sstoreNoopGasEIP2200:{v:800,d:"Once per SSTORE operation if the value doesn't change"},sstoreDirtyGasEIP2200:{v:800,d:"Once per SSTORE operation if a dirty value is changed"},sstoreInitGasEIP2200:{v:2e4,d:"Once per SSTORE operation from clean zero to non-zero"},sstoreInitRefundEIP2200:{v:19200,d:"Once per SSTORE operation for resetting to the original zero value"},sstoreCleanGasEIP2200:{v:5e3,d:"Once per SSTORE operation from clean non-zero to something else"},sstoreCleanRefundEIP2200:{v:4200,d:"Once per SSTORE operation for resetting to the original non-zero value"},sstoreClearRefundEIP2200:{v:15e3,d:"Once per SSTORE operation for clearing an originally existing storage slot"},balance:{v:700,d:"Base fee of the BALANCE opcode"},extcodehash:{v:700,d:"Base fee of the EXTCODEHASH opcode"},chainid:{v:2,d:"Base fee of the CHAINID opcode"},selfbalance:{v:5,d:"Base fee of the SELFBALANCE opcode"},sload:{v:800,d:"Base fee of the SLOAD opcode"}}},muirGlacier:{name:"muirGlacier",comment:"HF to delay the difficulty bomb",url:"https://eips.ethereum.org/EIPS/eip-2384",status:S.Final,pow:{difficultyBombDelay:{v:9e6,d:"the amount of blocks to delay the difficulty bomb with"}}},berlin:{name:"berlin",comment:"HF targeted for July 2020 following the Muir Glacier HF",url:"https://eips.ethereum.org/EIPS/eip-2070",status:S.Final,eips:[2565,2929,2718,2930]},london:{name:"london",comment:"HF targeted for July 2021 following the Berlin fork",url:"https://github.com/ethereum/eth1.0-specs/blob/master/network-upgrades/mainnet-upgrades/london.md",status:S.Final,eips:[1559,3198,3529,3541]},arrowGlacier:{name:"arrowGlacier",comment:"HF to delay the difficulty bomb",url:"https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/arrow-glacier.md",status:S.Final,eips:[4345]},grayGlacier:{name:"grayGlacier",comment:"Delaying the difficulty bomb to Mid September 2022",url:"https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/gray-glacier.md",status:S.Final,eips:[5133]},paris:{name:"paris",comment:"Hardfork to upgrade the consensus mechanism to Proof-of-Stake",url:"https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/merge.md",status:S.Final,consensus:{type:"pos",algorithm:"casper",casper:{}},eips:[3675,4399]},mergeForkIdTransition:{name:"mergeForkIdTransition",comment:"Pre-merge hardfork to fork off non-upgraded clients",url:"https://eips.ethereum.org/EIPS/eip-3675",status:S.Final,eips:[]},shanghai:{name:"shanghai",comment:"Next feature hardfork after the merge hardfork having withdrawals, warm coinbase, push0, limit/meter initcode",url:"https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/shanghai.md",status:S.Final,eips:[3651,3855,3860,4895]},cancun:{name:"cancun",comment:"Next feature hardfork after shanghai, includes proto-danksharding EIP 4844 blobs (still WIP hence not for production use), transient storage opcodes, parent beacon block root availability in EVM, selfdestruct only in same transaction, and blob base fee opcode",url:"https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/cancun.md",status:S.Final,eips:[1153,4844,4788,5656,6780,7516]},prague:{name:"prague",comment:"Next feature hardfork after cancun, internally used for verkle testing/implementation (incomplete/experimental)",url:"https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/prague.md",status:S.Draft,eips:[6800]}};class e1{constructor(e){this._eips=[],this._paramsCache={},this._activatedEIPsCache=[],this.events=new ej.EventEmitter,this._customChains=e.customChains??[],this._chainParams=this.setChain(e.chain),this.DEFAULT_HARDFORK=this._chainParams.defaultHardfork??v.Shanghai,this.HARDFORK_CHANGES=this.hardforks().map(e=>[e.name,e0[e.name]??(this._chainParams.customHardforks&&this._chainParams.customHardforks[e.name])]),this._hardfork=this.DEFAULT_HARDFORK,void 0!==e.hardfork&&this.setHardfork(e.hardfork),e.eips&&this.setEIPs(e.eips),this.customCrypto=e.customCrypto??{},0===Object.keys(this._paramsCache).length&&(this._buildParamsCache(),this._buildActivatedEIPsCache())}static custom(e,t={}){let r=t.baseChain??"mainnet",n={...e1._getChainParams(r)};if(n.name="custom-chain","string"!=typeof e)return new e1({chain:{...n,...e},...t});if(e===_.PolygonMainnet)return e1.custom({name:_.PolygonMainnet,chainId:137,networkId:137},t);if(e===_.PolygonMumbai)return e1.custom({name:_.PolygonMumbai,chainId:80001,networkId:80001},t);if(e===_.ArbitrumOne)return e1.custom({name:_.ArbitrumOne,chainId:42161,networkId:42161},t);if(e===_.xDaiChain)return e1.custom({name:_.xDaiChain,chainId:100,networkId:100},t);if(e===_.OptimisticKovan)return e1.custom({name:_.OptimisticKovan,chainId:69,networkId:69},{hardfork:v.Berlin,...t});if(e===_.OptimisticEthereum)return e1.custom({name:_.OptimisticEthereum,chainId:10,networkId:10},{hardfork:v.Berlin,...t});throw Error(`Custom chain ${e} not supported`)}static fromGethGenesis(e,{chain:t,eips:r,genesisHash:n,hardfork:i,mergeFor
2kIdPostMerge:o,customCrypto:a}){let s=function(e,t,r){try{let n=["config","difficulty","gasLimit","nonce","alloc"];if(n.some(t=>!(t in e))){let t=n.filter(t=>!(t in e));throw Error(`Invalid format, expected geth genesis field "${t}" missing`)}return void 0!==t&&(e.name=t),function(e,t=!0){let{name:r,config:n,difficulty:i,mixHash:o,gasLimit:a,coinbase:s,baseFeePerGas:c,excessBlobGas:u}=e,{extraData:l,timestamp:f,nonce:h}=e,d=Number(f),{chainId:p}=n;if(""===l&&(l="0x"),K(f)||(f=el(parseInt(f))),18!==h.length){var m;h=(m=h)&&"0x0"!==m?K(m)?"0x"+W(m).padStart(16,"0"):"0x"+m.padStart(16,"0"):"0x0000000000000000"}if(n.eip155Block!==n.eip158Block)throw Error("EIP155 block number must equal EIP 158 block number since both are part of SpuriousDragon hardfork and the client only supports activating the full hardfork");let g={name:r,chainId:p,networkId:p,genesis:{timestamp:f,gasLimit:a,difficulty:i,nonce:h,extraData:l,mixHash:o,coinbase:s,baseFeePerGas:c,excessBlobGas:u},hardfork:void 0,hardforks:[],bootstrapNodes:[],consensus:void 0!==n.clique?{type:"poa",algorithm:"clique",clique:{period:n.clique.period??n.clique.blockperiodseconds,epoch:n.clique.epoch??n.clique.epochlength}}:{type:"pow",algorithm:"ethash",ethash:{}}},y={[v.Homestead]:{name:"homesteadBlock"},[v.Dao]:{name:"daoForkBlock"},[v.TangerineWhistle]:{name:"eip150Block"},[v.SpuriousDragon]:{name:"eip155Block"},[v.Byzantium]:{name:"byzantiumBlock"},[v.Constantinople]:{name:"constantinopleBlock"},[v.Petersburg]:{name:"petersburgBlock"},[v.Istanbul]:{name:"istanbulBlock"},[v.MuirGlacier]:{name:"muirGlacierBlock"},[v.Berlin]:{name:"berlinBlock"},[v.London]:{name:"londonBlock"},[v.MergeForkIdTransition]:{name:"mergeForkBlock",postMerge:t},[v.Shanghai]:{name:"shanghaiTime",postMerge:!0,isTimestamp:!0},[v.Cancun]:{name:"cancunTime",postMerge:!0,isTimestamp:!0},[v.Prague]:{name:"pragueTime",postMerge:!0,isTimestamp:!0}},b=Object.keys(y).reduce((e,t)=>(e[y[t].name]=t,e),{}),E=Object.keys(n).filter(e=>void 0!==b[e]&&void 0!==n[e]&&null!==n[e]);for(let e of(g.hardforks=E.map(e=>({name:b[e],block:!0===y[b[e]].isTimestamp||"number"!=typeof n[e]?null:n[e],timestamp:!0===y[b[e]].isTimestamp&&"number"==typeof n[e]?n[e]:void 0})).filter(e=>null!==e.block||void 0!==e.timestamp),g.hardforks.sort(function(e,t){return(e.block??1/0)-(t.block??1/0)}),g.hardforks.sort(function(e,t){return(e.timestamp??0)-(t.timestamp??0)}),g.hardforks))e.timestamp===d&&(e.timestamp=0);if(void 0!==n.terminalTotalDifficulty){let e={name:v.Paris,ttd:n.terminalTotalDifficulty,block:null},t=g.hardforks.findIndex(e=>y[e.name]?.postMerge===!0);-1!==t?g.hardforks.splice(t,0,e):g.hardforks.push(e)}let w=g.hardforks.length>0?g.hardforks.slice(-1)[0]:void 0;return g.hardfork=w?.name,g.hardforks.unshift({name:v.Chainstart,block:0}),g}(e,r)}catch(e){throw Error(`Error parsing parameters file: ${e.message}`)}}(e,t,o),c=new e1({chain:s.name??"custom",customChains:[s],eips:r,hardfork:i??s.hardfork,customCrypto:a});return void 0!==n&&c.setForkHashes(n),c}static isSupportedChainId(e){return!!this.getInitializedChains().names[e.toString()]}static _getChainParams(e,t){let r=this.getInitializedChains(t);if("number"==typeof e||"bigint"==typeof e){if(e=e.toString(),r.names[e]){let t=r.names[e];return r[t]}throw Error(`Chain with ID ${e} not supported`)}if(void 0!==r[e])return r[e];throw Error(`Chain with name ${e} not supported`)}setChain(e){if("number"==typeof e||"bigint"==typeof e||"string"==typeof e)this._chainParams=e1._getChainParams(e,this._customChains);else if("object"==typeof e){if(this._customChains.length>0)throw Error("Chain must be a string, number, or bigint when initialized with customChains passed in");for(let t of["networkId","genesis","hardforks","bootstrapNodes"])if(!(t in e))throw Error(`Missing required chain parameter: ${t}`);this._chainParams=e}else throw Error("Wrong input format");for(let e of this.hardforks())if(void 0===e.block)throw Error("Hardfork cannot have undefined block number");return this._chainParams}setHardfork(e){let t=!1;for(let r of this.HARDFORK_CHANGES)r[0]===e&&(this._hardfork!==e&&(this._hardfork=e,this._buildParamsCache(),this._buildActivatedEIPsCache(),this.events.emit("hardforkChanged",e)),t=!0);if(!t)throw Error(`Hardfork with name ${e} not supported`)}getHardforkBy(e){let t=eD(e.blockNumber,y.BigInt),r=eD(e.td,y.BigInt),n=eD(e.timestamp,y.BigInt),i=this.hardforks().filter(e=>null!==e.block||null!==e.ttd&&void 0!==e.ttd||void 0!==e.timestamp),o=i.findIndex(e=>null!==e.ttd&&void 0!==e.ttd);if(i.slice(o+1).findIndex(e=>null!==e.ttd&&void 0!==e.ttd)>=0)throw Error("More than one merge hardforks found with ttd specified");let a=i.findIndex(e=>void 0!==t&&null!==e.block&&BigInt(e.block)>t||void 0!==n&&void 0!==e.timestamp&&BigInt(e.timestamp)>n);if(-1===a)a=i.length;
2else if(0===a)throw Error("Must have at least one hardfork at block 0");if(void 0===n){let e=i.slice(0,a).reverse().findIndex(e=>null!==e.block||void 0!==e.ttd);a-=e}if(null===i[a-=1].block&&void 0===i[a].timestamp)(null==r||BigInt(i[a].ttd)>r)&&(a-=1);else if(o>=0&&null!=r){if(a>=o&&BigInt(i[o].ttd)>r)throw Error("Maximum HF determined by total difficulty is lower than the block number HF");if(a<o&&BigInt(i[o].ttd)<r)throw Error("HF determined by block number is lower than the minimum total difficulty HF")}let s=a;for(;a<i.length-1&&i[a].block===i[a+1].block&&i[a].timestamp===i[a+1].timestamp;a++);if(void 0!==n){if(i.slice(0,s).reduce((e,t)=>Math.max(Number(t.timestamp??"0"),e),0)>n)throw Error("Maximum HF determined by timestamp is lower than the block number/ttd HF");if(i.slice(a+1).reduce((e,t)=>Math.min(Number(t.timestamp??n),e),Number(n))<n)throw Error("Maximum HF determined by block number/ttd is lower than timestamp HF")}return i[a].name}setHardforkBy(e){let t=this.getHardforkBy(e);return this.setHardfork(t),t}_getHardfork(e){for(let t of this.hardforks())if(t.name===e)return t;return null}setEIPs(e=[]){for(let t of e){if(!(t in eQ))throw Error(`${t} not supported`);let e=this.gteHardfork(eQ[t].minimumHardfork);if(!e)throw Error(`${t} cannot be activated on hardfork ${this.hardfork()}, minimumHardfork: ${e}`)}for(let t of(this._eips=e,this._buildParamsCache(),this._buildActivatedEIPsCache(),e))if(void 0!==eQ[t].requiredEIPs){for(let r of eQ[t].requiredEIPs)if(!(e.includes(r)||this.isActivatedEIP(r)))throw Error(`${t} requires EIP ${r}, but is not included in the EIP list`)}}_mergeWithParamsCache(e){this._paramsCache.gasConfig={...this._paramsCache.gasConfig,...e.gasConfig},this._paramsCache.gasPrices={...this._paramsCache.gasPrices,...e.gasPrices},this._paramsCache.pow={...this._paramsCache.pow,...e.pow},this._paramsCache.sharding={...this._paramsCache.sharding,...e.sharding},this._paramsCache.vm={...this._paramsCache.vm,...e.vm}}_buildParamsCache(){this._paramsCache={};let e=this.hardfork();for(let t of this.HARDFORK_CHANGES){if("eips"in t[1])for(let e of t[1].eips){if(!(e in eQ))throw Error(`${e} not supported`);this._mergeWithParamsCache(eQ[e])}else this._mergeWithParamsCache(t[1]);if(t[0]===e)break}for(let e of this._eips){if(!(e in eQ))throw Error(`${e} not supported`);this._mergeWithParamsCache(eQ[e])}}_buildActivatedEIPsCache(){for(let e of(this._activatedEIPsCache=[],this.HARDFORK_CHANGES)){let t=e[1];this.gteHardfork(t.name)&&"eips"in t&&(this._activatedEIPsCache=this._activatedEIPsCache.concat(t.eips))}this._activatedEIPsCache=this._activatedEIPsCache.concat(this._eips)}param(e,t){let r=null;return void 0!==this._paramsCache[e]&&void 0!==this._paramsCache[e][t]&&(r=this._paramsCache[e][t].v),BigInt(r??0)}paramByHardfork(e,t,r){let n=null;for(let i of this.HARDFORK_CHANGES){if("eips"in i[1])for(let r of i[1].eips){let i=this.paramByEIP(e,t,r);n="bigint"==typeof i?i:n}else void 0!==i[1][e]&&void 0!==i[1][e][t]&&(n=i[1][e][t].v);if(i[0]===r)break}return BigInt(n??0)}paramByEIP(e,t,r){if(!(r in eQ))throw Error(`${r} not supported`);let n=eQ[r];if(e in n&&void 0!==n[e][t])return BigInt(n[e][t].v)}paramByBlock(e,t,r,n,i){let o=this.getHardforkBy({blockNumber:r,td:n,timestamp:i});return this.paramByHardfork(e,t,o)}isActivatedEIP(e){return!!this._activatedEIPsCache.includes(e)}hardforkIsActiveOnBlock(e,t){t=eD(t,y.BigInt),e=e??this._hardfork;let r=this.hardforkBlock(e);return"bigint"==typeof r&&r!==eI&&t>=r}activeOnBlock(e){return this.hardforkIsActiveOnBlock(null,e)}hardforkGteHardfork(e,t){e=e??this._hardfork;let r=this.hardforks(),n=-1,i=-1,o=0;for(let a of r)a.name===e&&(n=o),a.name===t&&(i=o),o+=1;return n>=i&&-1!==i}gteHardfork(e){return this.hardforkGteHardfork(null,e)}hardforkBlock(e){e=e??this._hardfork;let t=this._getHardfork(e)?.block;return null==t?null:BigInt(t)}hardforkTimestamp(e){e=e??this._hardfork;let t=this._getHardfork(e)?.timestamp;return null==t?null:BigInt(t)}eipBlock(e){for(let t of this.HARDFORK_CHANGES){let r=t[1];if("eips"in r&&r.eips.includes(e))return this.hardforkBlock(t[0])}return null}eipTimestamp(e){for(let t of this.HARDFORK_CHANGES){let r=t[1];if("eips"in r&&r.eips.includes(e))return this.hardforkTimestamp(t[0])}return null}hardforkTTD(e){e=e??this._hardfork;let t=this._getHardfork(e)?.ttd;return null==t?null:BigInt(t)}nextHardforkBlockOrTimestamp(e){e=e??this._hardfork;let t=this.hardforks(),r=t.findIndex(t=>t.name===e);if(e===v.Paris&&(r-=1),r<0)return null;let n=t[r].timestamp??t[r].block;n=null!=n?Number(n):null;let i=t.slice(r+1).find(e=>{let t=e.timestamp??e.block;return t=null!=t?Number(t):null,e.name!==v.Paris&&null!=t&&t!==n});if(void 0===i)return null;let o=i.timestamp??i.block;return null==o?null:BigInt(o)}_calcForkHash(e,t){let r=new Uint8Array(0),n=0;for(let t of this.hardforks()){let{block:i,timestamp:o,name:a}=t,s=o??i;if("number"==typeof(s=null!==s?Number(s):null)&&0!==s&&s!==n&&a!==v.Paris&&(r=ex(r,eu("0x"+s.toString(16).padStart(16,"0"))),n=s),t.name===e)break}return ea(ef(eX(ex(t,r))>>>0))}forkHash(e,t){e=e??this._hardfork;let r=this._getHardfork(e);if(null===r||r?.block===null&&r?.timestamp===void 0&&r?.ttd===void 0)throw Error("No fork hash calculation possible for future hardfork");if(r?.forkHash!==null&&r?.forkHash!==void 0)return r.forkHash;if(!t)throw Error("genesisHash required for forkHash calculation");return this._calcForkHash(e,t)}hardforkForForkHash(e){let t=this.hardforks().filter(t=>t.forkHash===e);return t.length>=1?t[t.length-1]:null}setForkHashes(e){for(let t of this.hardforks()){let r=t.timestamp??t.block;(null===t.forkHash||void 0===t.forkHash)&&(null!=r||void 0!==t.ttd)&&(t.forkHash=this.forkHash(t.name,e))}}genesis(){return this._chainParams.genesis}hardforks(){let e=this._chainParams.hardforks;return void 0!==this._chainParams.customHardforks&&this._chainParams.customHardforks,e}bootstrapNodes(){return this._chainParams.bootstrapNodes}dnsNetworks(){return this._chainParams.dnsNetworks}hardfork(){return this._hardfork}chainId(){return BigInt(this._chainParams.chainId)}chainName(){return this._chainParams.name}networkId(){return BigInt(this._chainParams.networkId)}eips(){return this._eips}consensusType(){let e;let t=this.hardfork();for(let r of this.HARDFORK_CHANGES)if("consensus"in r[1]&&(e=r[1].consensus.type),r[0]===t)break;return e??this._chainParams.consensus.type}consensusAlgorithm(){let e;let t=this.hardfork();for(let r of this.HARDFORK_CHANGES)if("consensus"in r[1]&&(e=r[1].consensus.algorithm),r[0]===t)break;return e??this._chainParams.consensus.algorithm}consensusConfig(){let e;let t=this.hardfork();for(let r of this.HARDFORK_CHANGES){if("consensus"in r[1]){let t=r[1],n=t.consensus.algorithm;e=t.consensus[n]}if(r[0]===t)break}return e??this._chainParams.consensus[this.consensusAlgorithm()]??{}}copy(){let e=Object.assign(Object.create(Object.getPrototypeOf(this)),this);return e.events=new ej.EventEmitter,e}static getInitializedChains(e){let t={};for(let[e,r]of Object.entries(b))t[r]=e.toLowerCase();let r={...eW};if(e)for(let n of e){let{name:e}=n;t[n.chainId.toString()]=e,r[e]=n}return r.names=t,r}}(d=A||(A={}))[d.EIP155ReplayProtection=155]="EIP155ReplayProtection",d[d.EIP1559FeeMarket=1559]="EIP1559FeeMarket",d[d.EIP2718TypedTransaction=2718]="EIP2718TypedTransaction",d[d.EIP2930AccessLists=2930]="EIP2930AccessLists",(p=P||(P={}))[p.Legacy=0]="Legacy",p[p.AccessListEIP2930=1]="AccessListEIP2930",p[p.FeeMarketEIP1559=2]="FeeMarketEIP1559",p[p.BlobEIP4844=3]="BlobEIP4844";class e2{static getAccessListData(e){let t,r;if(0===e.length||Array.isArray(e[0])){r=e??[];let n=[];for(let e=0;e<r.length;e++){let t=r[e],i=ea(t[0]),o=[];for(let e=0;e<t[1].length;e++)o.push(ea(t[1][e]));let a={address:i,storageKeys:o};n.push(a)}t=n}else{t=e;let n=[];for(let t=0;t<e.length;t++){let r=e[t],i=eu(r.address),o=[];for(let e=0;e<r.storageKeys.length;e++)o.push(eu(r.storageKeys[e]));n.push([i,o])}r=n}return{AccessListJSON:t,accessList:r}}static verifyAccessList(e){for(let t=0;t<e.length;t++){let r=e[t],n=r[0],i=r[1];if(void 0!==r[2])throw Error("Access list item cannot have 3 elements. It c
2an only have an address, and an array of storage slots.");if(20!==n.length)throw Error("Invalid EIP-2930 transaction: address length should be 20 bytes");for(let e=0;e<i.length;e++)if(32!==i[e].length)throw Error("Invalid EIP-2930 transaction: storage slot length should be 32 bytes")}}static getAccessListJSON(e){let t=[];for(let r=0;r<e.length;r++){let n=e[r],i={address:ea(em(n[0],20)),storageKeys:[]},o=n[1];for(let e=0;e<o.length;e++){let t=o[e];i.storageKeys.push(ea(em(t,32)))}t.push(i)}return t}static getDataFeeEIP2930(e,t){let r=t.param("gasPrices","accessListStorageKeyCost"),n=t.param("gasPrices","accessListAddressCost"),i=0;for(let t=0;t<e.length;t++)i+=e[t][1].length;return e.length*Number(n)+i*Number(r)}}function e5(e){return eu("0x"+e.toString(16).padStart(2,"0"))}class e3{constructor(e,t){this.cache={hash:void 0,dataFee:void 0,senderPubKey:void 0},this.activeCapabilities=[],this.DEFAULT_CHAIN=b.Mainnet;let{nonce:r,gasLimit:n,to:i,value:o,data:a,v:s,r:c,s:u,type:l}=e;this._type=Number(ec(eb(l))),this.txOptions=t;let f=eb(""===i?"0x":i),h=eb(""===s?"0x":s),d=eb(""===c?"0x":c),p=eb(""===u?"0x":u);this.nonce=ec(eb(""===r?"0x":r)),this.gasLimit=ec(eb(""===n?"0x":n)),this.to=f.length>0?new eM(f):void 0,this.value=ec(eb(""===o?"0x":o)),this.data=eb(""===a?"0x":a),this.v=h.length>0?ec(h):void 0,this.r=d.length>0?ec(d):void 0,this.s=p.length>0?ec(p):void 0,this._validateCannotExceedMaxInteger({value:this.value,r:this.r,s:this.s}),this._validateCannotExceedMaxInteger({gasLimit:this.gasLimit},64),this._validateCannotExceedMaxInteger({nonce:this.nonce},64,!0);let m=void 0===this.to||null===this.to,g=t.allowUnlimitedInitCodeSize??!1,y=t.common??this._getCommon();m&&y.isActivatedEIP(3860)&&!1===g&&function(e,t){let r=e.param("vm","maxInitCodeSize");if(r&&BigInt(t)>r)throw Error(`the initcode size of this transaction is too large: it is ${t} while the max is ${e.param("vm","maxInitCodeSize")}`)}(y,this.data.length)}get type(){return this._type}supports(e){return this.activeCapabilities.includes(e)}getValidationErrors(){let e=[];return this.isSigned()&&!this.verifySignature()&&e.push("Invalid Signature"),this.getBaseFee()>this.gasLimit&&e.push(`gasLimit is too low. given ${this.gasLimit}, need at least ${this.getBaseFee()}`),e}isValid(){return 0===this.getValidationErrors().length}getBaseFee(){let e=this.common.param("gasPrices","tx"),t=this.getDataFee();if(e&&(t+=e),this.common.gteHardfork("homestead")&&this.toCreationAddress()){let e=this.common.param("gasPrices","txCreation");e&&(t+=e)}return t}getDataFee(){let e=this.common.param("gasPrices","txDataZero"),t=this.common.param("gasPrices","txDataNonZero"),r=eI;for(let n=0;n<this.data.length;n++)0===this.data[n]?r+=e:r+=t;if((void 0===this.to||null===this.to)&&this.common.isActivatedEIP(3860)){let e=BigInt(Math.ceil(this.data.length/32));r+=this.common.param("gasPrices","initCodeWordCost")*e}return r}toCreationAddress(){return void 0===this.to||0===this.to.bytes.length}isSigned(){let{v:e,r:t,s:r}=this;return void 0!==e&&void 0!==t&&void 0!==r}verifySignature(){try{let e=this.getSenderPublicKey();return 0!==ey(e).length}catch(e){return!1}}getSenderAddress(){return new eM(eL(this.getSenderPublicKey()))}sign(e){if(32!==e.length)throw Error(this._errorMsg("Private key must be 32 bytes in length."));let t=!1;this.type===P.Legacy&&this.common.gteHardfork("spuriousDragon")&&!this.supports(A.EIP155ReplayProtection)&&(this.activeCapabilities.push(A.EIP155ReplayProtection),t=!0);let r=this.getHashedMessageToSign(),{v:n,r:i,s:o}=(this.common.customCrypto?.ecsign??function(e,t,r){let n=q.kA.sign(e,t),i=n.toCompactRawBytes();return{r:i.slice(0,32),s:i.slice(32,64),v:void 0===r?BigInt(n.recovery+27):BigInt(n.recovery+35)+BigInt(r)*eT}})(r,e),a=this.addSignature(n,i,o,!0);if(t){let e=this.activeCapabilities.indexOf(A.EIP155ReplayProtection);e>-1&&this.activeCapabilities.splice(e,1)}return a}toJSON(){return{type:ew(BigInt(this.type)),nonce:ew(this.nonce),gasLimit:ew(this.gasLimit),to:void 0!==this.to?this.to.toString():void 0,value:ew(this.value),data:ea(this.data),v:void 0!==this.v?ew(this.v):void 0,r:void 0!==this.r?ew(this.r):void 0,s:void 0!==this.s?ew(this.s):void 0}}_getCommon(e,t){if(void 0===t)return e?.copy()??new e1({chain:this.DEFAULT_CHAIN});{let r=ec(eb(t));if(e){if(e.chainId()!==r)throw Error(this._errorMsg(`The chain ID does not match the chain ID of Common. Got: ${r}, expected: ${e.chainId}`));return e.copy()}return e1.isSupportedChainId(r)?new e1({chain:r}):e1.custom({name:"custom-chain",networkId:r,chainId:r},{baseChain:this.DEFAULT_CHAIN})}}_validateCannotExceedMaxInteger(e,t=256,r=!1){for(let[n,i]of Object.entries(e))switch(t){case 64:if(r){if(void 0!==i&&i>=eS)throw Error(this._errorMsg(`${n} cannot equal or exceed MAX_UINT64 (2^64-1), given ${i}`))}else if(void 0!==i&&i>eS)throw Error(this._errorMsg(`${n} cannot exceed MAX_UINT64 (2^64-1), given ${i}`));break;case 256:if(r){if(void 0!==i&&i>=eA)throw Error(this._errorMsg(`${n} cannot equal or exceed MAX_INTEGER (2^256-1), given ${i}`))}else if(void 0!==i&&i>eA)throw Error(this._errorMsg(`${n} cannot exceed MAX_INTEGER (2^256-1), given ${i}`));break;default:throw Error(this._errorMsg("unimplemented bits value"))}}static _validateNotArray(e){let t=["nonce","gasPrice","gasLimit","to","value","data","v","r","s","type","baseFee","maxFeePerGas","chainId"];for(let[r,n]of Object.entries(e))if(t.includes(r)&&Array.isArray(n))throw Error(`${r} cannot be an array`)}_getSharedErrorPostfix(){let e="";try{e=this.isSigned()?ea(this.hash()):"not available (unsigned)"}catch(t){e="error"}let t="";try{t=this.isSigned().toString()}catch(t){e="error"}let r="";try{r=this.common.hardfork()}catch(e){r="error"}return`tx type=${this.type} hash=${e} nonce=${this.nonce} value=${this.value} signed=${t} hf=${r}`}}function e6(e,t){let r=e.maxPriorityFeePerGas,n=e.maxFeePerGas-t;return e.gasLimit*((r<n?r:n)+t)+e.value}function e8(e,t){if(void 0===t||t>e.maxFeePerGas)throw Error("Tx cannot pay baseFee");let r=e.maxFeePerGas-t;return e.maxPriorityFeePerGas<r?e.maxPriorityFeePerGas:r}function e4(e,t){return`${t} (${e.errorStr()})`}
2function e9(e,t){if(e.cache.dataFee&&e.cache.dataFee.hardfork===e.common.hardfork())return e.cache.dataFee.value;let r=e3.prototype.getDataFee.bind(e)()+(t??0n);return Object.isFrozen(e)&&(e.cache.dataFee={value:r,hardfork:e.common.hardfork()}),r}function e7(e){if(!e.isSigned())throw Error(e4(e,"Cannot call hash method if transaction is not signed"));let t=e.common.customCrypto.keccak256??eO.wn;return Object.isFrozen(e)?(e.cache.hash||(e.cache.hash=t(e.serialize())),e.cache.hash):t(e.serialize())}function te(e){let{s:t}=e;if(e.common.gteHardfork("homestead")&&void 0!==t&&t>eP)throw Error(e4(e,"Invalid Signature: s-values greater than secp256k1n/2 are considered invalid"))}function tt(e){if(void 0!==e.cache.senderPubKey)return e.cache.senderPubKey;let t=e.getMessageToVerifySignature(),{v:r,r:n,s:i}=e;te(e);try{let o=(e.common.customCrypto.ecrecover??e$)(t,r,e_(n),e_(i),e.supports(A.EIP155ReplayProtection)?e.common.chainId():void 0);return Object.isFrozen(e)&&(e.cache.senderPubKey=o),o}catch(t){throw Error(e4(e,"Invalid Signature"))}}function tr(e,t){if(void 0!==t&&t>e)throw Error("Tx cannot pay baseFee");return void 0===t?e:e-t}function tn(e){return(e.common.customCrypto.keccak256??eO.wn)(e.getMessageToSign())}function ti(e,t){return ex(e5(e.type),Z.encode(t??e.raw()))}function to(e){let{v:t}=e;if(void 0!==t&&t!==eI&&t!==ek)throw Error(e4(e,"The y-parity of the transaction should either be 0 or 1"))}function ta(e){return e9(e,BigInt(e2.getDataFeeEIP2930(e.accessList,e.common)))}class ts extends e3{constructor(e,t={}){super({...e,type:P.FeeMarketEIP1559},t);let{chainId:r,accessList:n,maxFeePerGas:i,maxPriorityFeePerGas:o}=e;if(this.common=this._getCommon(t.common,r),this.chainId=this.common.chainId(),!1===this.common.isActivatedEIP(1559))throw Error("EIP-1559 not enabled on Common");this.activeCapabilities=this.activeCapabilities.concat([1559,2718,2930]);let a=e2.getAccessListData(n??[]);if(this.accessList=a.accessList,this.AccessListJSON=a.AccessListJSON,e2.verifyAccessList(this.accessList),this.maxFeePerGas=ec(eb(""===i?"0x":i)),this.maxPriorityFeePerGas=ec(eb(""===o?"0x":o)),this._validateCannotExceedMaxInteger({maxFeePerGas:this.maxFeePerGas,maxPriorityFeePerGas:this.maxPriorityFeePerGas}),e3._validateNotArray(e),this.gasLimit*this.maxFeePerGas>eA)throw Error(this._errorMsg("gasLimit * maxFeePerGas cannot exceed MAX_INTEGER (2^256-1)"));if(this.maxFeePerGas<this.maxPriorityFeePerGas)throw Error(this._errorMsg("maxFeePerGas cannot be less than maxPriorityFeePerGas (The total must be the larger of the two)"));to(this),te(this),(t?.freeze??!0)&&Object.freeze(this)}static fromTxData(e,t={}){return new ts(e,t)}static fromSerializedTx(e,t={}){if(!1===(0,V.hD)(e.subarray(0,1),e5(P.FeeMarketEIP1559)))throw Error(`Invalid serialized tx input: not an EIP-1559 transaction (wrong tx type, expected: ${P.FeeMarketEIP1559}, received: ${ea(e.subarray(0,1))}`);let r=Z.decode(e.subarray(1));if(!Array.isArray(r))throw Error("Invalid serialized tx input: must be array");return ts.fromValuesArray(r,t)}static fromValuesArray(e,t={}){if(9!==e.length&&12!==e.length)throw Error("Invalid EIP-1559 transaction. Only expecting 9 values (for unsigned tx) or 12 values (for signed tx).");let[r,n,i,o,a,s,c,u,l,f,h,d]=e;return this._validateNotArray({chainId:r,v:f}),eE({nonce:n,maxPriorityFeePerGas:i,maxFeePerGas:o,gasLimit:a,value:c,v:f,r:h,s:d}),new ts({chainId:ec(r),nonce:n,maxPriorityFeePerGas:i,maxFeePerGas:o,gasLimit:a,to:s,value:c,data:u,accessList:l??[],v:void 0!==f?ec(f):void 0,r:h,s:d},t)}getDataFee(){return ta(this)}getEffectivePriorityFee(e){return e8(this,e)}getUpfrontCost(e=eI){return e6(this,e)}raw(){return[e_(this.chainId),e_(this.nonce),e_(this.maxPriorityFeePerGas),e_(this.maxFeePerGas),e_(this.gasLimit),void 0!==this.to?this.to.bytes:new Uint8Array(0),e_(this.value),this.data,this.accessList,void 0!==this.v?e_(this.v):new Uint8Array(0),void 0!==this.r?e_(this.r):new Uint8Array(0),void 0!==this.s?e_(this.s):new Uint8Array(0)]}serialize(){return ti(this)}getMessageToSign(){return ti(this,this.raw().slice(0,9))}getHashedMessageToSign(){return tn(this)}hash(){return e7(this)}getMessageToVerifySignature(){return this.getHashedMessageToSign()}getSenderPublicKey(){return tt(this)}addSignature(e,t,r,n=!1){t=eb(t),r=eb(r);let i={...this.txOptions,common:this.common};return ts.fromTxData({chainId:this.chainId,nonce:this.nonce,maxPriorityFeePerGas:this.maxPriorityFeePerGas,maxFeePerGas:this.maxFeePerGas,gasLimit:this.gasLimit,to:this.to,value:this.value,data:this.data,accessList:this.accessList,v:n?e-eB:e,r:ec(t),s:ec(r)},i)}toJSON(){let e=e2.getAccessListJSON(this.accessList);return{...super.toJSON(),chainId:ew(this.chainId),maxPriorityFeePerGas:ew(this.maxPriorityFeePerGas),maxFeePerGas:ew(this.maxFeePerGas),accessList:e}}errorStr(){return this._getSharedErrorPostfix()+` maxFeePerGas=${this.maxFeePerGas} maxPriorityFeePerGas=${this.maxPriorityFeePerGas}`}_errorMsg(e){return e4(this,e)}}
2class tc extends e3{constructor(e,t={}){super({...e,type:P.AccessListEIP2930},t);let{chainId:r,accessList:n,gasPrice:i}=e;if(this.common=this._getCommon(t.common,r),this.chainId=this.common.chainId(),!this.common.isActivatedEIP(2930))throw Error("EIP-2930 not enabled on Common");this.activeCapabilities=this.activeCapabilities.concat([2718,2930]);let o=e2.getAccessListData(n??[]);if(this.accessList=o.accessList,this.AccessListJSON=o.AccessListJSON,e2.verifyAccessList(this.accessList),this.gasPrice=ec(eb(""===i?"0x":i)),this._validateCannotExceedMaxInteger({gasPrice:this.gasPrice}),e3._validateNotArray(e),this.gasPrice*this.gasLimit>eA)throw Error(this._errorMsg("gasLimit * gasPrice cannot exceed MAX_INTEGER"));to(this),te(this),(t?.freeze??!0)&&Object.freeze(this)}static fromTxData(e,t={}){return new tc(e,t)}static fromSerializedTx(e,t={}){if(!1===(0,V.hD)(e.subarray(0,1),e5(P.AccessListEIP2930)))throw Error(`Invalid serialized tx input: not an EIP-2930 transaction (wrong tx type, expected: ${P.AccessListEIP2930}, received: ${ea(e.subarray(0,1))}`);let r=Z.decode(Uint8Array.from(e.subarray(1)));if(!Array.isArray(r))throw Error("Invalid serialized tx input: must be array");return tc.fromValuesArray(r,t)}static fromValuesArray(e,t={}){if(8!==e.length&&11!==e.length)throw Error("Invalid EIP-2930 transaction. Only expecting 8 values (for unsigned tx) or 11 values (for signed tx).");let[r,n,i,o,a,s,c,u,l,f,h]=e;return this._validateNotArray({chainId:r,v:l}),eE({nonce:n,gasPrice:i,gasLimit:o,value:s,v:l,r:f,s:h}),new tc({chainId:ec(r),nonce:n,gasPrice:i,gasLimit:o,to:a,value:s,data:c,accessList:u??[],v:void 0!==l?ec(l):void 0,r:f,s:h},t)}getEffectivePriorityFee(e){return tr(this.gasPrice,e)}getDataFee(){return ta(this)}getUpfrontCost(){return this.gasLimit*this.gasPrice+this.value}raw(){return[e_(this.chainId),e_(this.nonce),e_(this.gasPrice),e_(this.gasLimit),void 0!==this.to?this.to.bytes:new Uint8Array(0),e_(this.value),this.data,this.accessList,void 0!==this.v?e_(this.v):new Uint8Array(0),void 0!==this.r?e_(this.r):new Uint8Array(0),void 0!==this.s?e_(this.s):new Uint8Array(0)]}serialize(){return ti(this)}getMessageToSign(){return ti(this,this.raw().slice(0,8))}getHashedMessageToSign(){return tn(this)}hash(){return e7(this)}getMessageToVerifySignature(){return this.getHashedMessageToSign()}getSenderPublicKey(){return tt(this)}addSignature(e,t,r,n=!1){t=eb(t),r=eb(r);let i={...this.txOptions,common:this.common};return tc.fromTxData({chainId:this.chainId,nonce:this.nonce,gasPrice:this.gasPrice,gasLimit:this.gasLimit,to:this.to,value:this.value,data:this.data,accessList:this.accessList,v:n?e-eB:e,r:ec(t),s:ec(r)},i)}toJSON(){let e=e2.getAccessListJSON(this.accessList);return{...super.toJSON(),chainId:ew(this.chainId),gasPrice:ew(this.gasPrice),accessList:e}}errorStr(){return this._getSharedErrorPostfix()+` gasPrice=${this.gasPrice} accessListCount=${this.accessList?.length??0}`}_errorMsg(e){return e4(this,e)}}let tu=(e,t,r,n,i,o)=>{let a;if(!(e.length===t.length&&t.length===r.length))throw Error("Number of blobVersionedHashes, blobs, and commitments not all equal");if(0===e.length)throw Error("Invalid transaction with empty blobs");try{a=o.verifyBlobKzgProofBatch(t,r,n)}catch(e){throw Error(`KZG verification of blobs fail with error=${e}`)}if(!a)throw Error("KZG proof cannot be verified from blobs/commitments");for(let t=0;t<e.length;t++){let n=eZ(r[t],i);if(!(0,V.hD)(n,e[t]))throw Error(`commitment for blob at index ${t} does not match versionedHash`)}};class tl extends e3{constructor(e,t={}){super({...e,type:P.BlobEIP4844},t);let{chainId:r,accessList:n,maxFeePerGas:i,maxPriorityFeePerGas:o,maxFeePerBlobGas:a}=e;if(this.common=this._getCommon(t.common,r),this.chainId=this.common.chainId(),!1===this.common.isActivatedEIP(1559))throw Error("EIP-1559 not enabled on Common");if(!1===this.common.isActivatedEIP(4844))throw Error("EIP-4844 not enabled on Common");this.activeCapabilities=this.activeCapabilities.concat([1559,2718,2930]);let s=e2.getAccessListData(n??[]);if(this.accessList=s.accessList,this.AccessListJSON=s.AccessListJSON,e2.verifyAccessList(this.accessList),this.maxFeePerGas=ec(eb(""===i?"0x":i)),this.maxPriorityFeePerGas=ec(eb(""===o?"0x":o)),this._val
2idateCannotExceedMaxInteger({maxFeePerGas:this.maxFeePerGas,maxPriorityFeePerGas:this.maxPriorityFeePerGas}),e3._validateNotArray(e),this.gasLimit*this.maxFeePerGas>eA)throw Error(this._errorMsg("gasLimit * maxFeePerGas cannot exceed MAX_INTEGER (2^256-1)"));if(this.maxFeePerGas<this.maxPriorityFeePerGas)throw Error(this._errorMsg("maxFeePerGas cannot be less than maxPriorityFeePerGas (The total must be the larger of the two)"));for(let t of(this.maxFeePerBlobGas=ec(eb((a??"")===""?"0x":a)),this.blobVersionedHashes=(e.blobVersionedHashes??[]).map(e=>eb(e)),to(this),te(this),this.blobVersionedHashes)){if(32!==t.length)throw Error(this._errorMsg("versioned hash is invalid length"));if(BigInt(t[0])!==this.common.param("sharding","blobCommitmentVersionKzg"))throw Error(this._errorMsg("versioned hash does not start with KZG commitment version"))}if(this.blobVersionedHashes.length>6)throw Error(this._errorMsg("tx can contain at most 6 blobs"));if(0===this.blobVersionedHashes.length)throw Error(this._errorMsg("tx should contain at least one blob"));if(void 0===this.to)throw Error(this._errorMsg('tx should have a "to" field and cannot be used to create contracts'));this.blobs=e.blobs?.map(e=>eb(e)),this.kzgCommitments=e.kzgCommitments?.map(e=>eb(e)),this.kzgProofs=e.kzgProofs?.map(e=>eb(e)),(t?.freeze??!0)&&Object.freeze(this)}static fromTxData(e,t){if(t?.common?.customCrypto?.kzg===void 0)throw Error("A common object with customCrypto.kzg initialized required to instantiate a 4844 blob tx");let r=t.common.customCrypto.kzg;if(void 0!==e.blobsData){if(void 0!==e.blobs)throw Error("cannot have both raw blobs data and encoded blobs in constructor");if(void 0!==e.kzgCommitments)throw Error("cannot have both raw blobs data and KZG commitments in constructor");if(void 0!==e.blobVersionedHashes)throw Error("cannot have both raw blobs data and versioned hashes in constructor");if(void 0!==e.kzgProofs)throw Error("cannot have both raw blobs data and KZG proofs in constructor");e.blobs=eH(e.blobsData.reduce((e,t)=>e+t)),e.kzgCommitments=ez(r,e.blobs),e.blobVersionedHashes=eq(e.kzgCommitments),e.kzgProofs=eG(r,e.blobs,e.kzgCommitments)}return new tl(e,t)}getEffectivePriorityFee(e){return e8(this,e)}static minimalFromNetworkWrapper(e,t){if(t?.common?.customCrypto?.kzg===void 0)throw Error("A common object with customCrypto.kzg initialized required to instantiate a 4844 blob tx");return tl.fromTxData({...e,blobs:void 0,kzgCommitments:void 0,kzgProofs:void 0},t)}static fromSerializedTx(e,t={}){if(t.common?.customCrypto?.kzg===void 0)throw Error("A common object with customCrypto.kzg initialized required to instantiate a 4844 blob tx");
2if(!1===(0,V.hD)(e.subarray(0,1),e5(P.BlobEIP4844)))throw Error(`Invalid serialized tx input: not an EIP-4844 transaction (wrong tx type, expected: ${P.BlobEIP4844}, received: ${ea(e.subarray(0,1))}`);let r=Z.decode(e.subarray(1));if(!Array.isArray(r))throw Error("Invalid serialized tx input: must be array");return tl.fromValuesArray(r,t)}static fromValuesArray(e,t={}){if(t.common?.customCrypto?.kzg===void 0)throw Error("A common object with customCrypto.kzg initialized required to instantiate a 4844 blob tx");if(11!==e.length&&14!==e.length)throw Error("Invalid EIP-4844 transaction. Only expecting 11 values (for unsigned tx) or 14 values (for signed tx).");let[r,n,i,o,a,s,c,u,l,f,h,d,p,m]=e;return this._validateNotArray({chainId:r,v:d}),eE({nonce:n,maxPriorityFeePerGas:i,maxFeePerGas:o,gasLimit:a,value:c,maxFeePerBlobGas:f,v:d,r:p,s:m}),new tl({chainId:ec(r),nonce:n,maxPriorityFeePerGas:i,maxFeePerGas:o,gasLimit:a,to:s,value:c,data:u,accessList:l??[],maxFeePerBlobGas:f,blobVersionedHashes:h,v:void 0!==d?ec(d):void 0,r:p,s:m},t)}static fromSerializedBlobTxNetworkWrapper(e,t){if(!t||!t.common)throw Error("common instance required to validate versioned hashes");if(t.common?.customCrypto?.kzg===void 0)throw Error("A common object with customCrypto.kzg initialized required to instantiate a 4844 blob tx");
2if(!1===(0,V.hD)(e.subarray(0,1),e5(P.BlobEIP4844)))throw Error(`Invalid serialized tx input: not an EIP-4844 transaction (wrong tx type, expected: ${P.BlobEIP4844}, received: ${ea(e.subarray(0,1))}`);let r=Z.decode(e.subarray(1));if(4!==r.length)throw Error("Expected 4 values in the deserialized network transaction");let[n,i,o,a]=r,s=tl.fromValuesArray(n,{...t,freeze:!1});if(void 0===s.to)throw Error("BlobEIP4844Transaction can not be send without a valid `to`");let c=Number(t.common.param("sharding","blobCommitmentVersionKzg"));return tu(s.blobVersionedHashes,i,o,a,c,t.common.customCrypto.kzg),s.blobs=i,s.kzgCommitments=o,s.kzgProofs=a,(t?.freeze??!0)&&Object.freeze(s),s}getDataFee(){return ta(this)}getUpfrontCost(e=eI){return e6(this,e)}raw(){return[e_(this.chainId),e_(this.nonce),e_(this.maxPriorityFeePerGas),e_(this.maxFeePerGas),e_(this.gasLimit),void 0!==this.to?this.to.bytes:new Uint8Array(0),e_(this.value),this.data,this.accessList,e_(this.maxFeePerBlobGas),this.blobVersionedHashes,void 0!==this.v?e_(this.v):new Uint8Array(0),void 0!==this.r?e_(this.r):new Uint8Array(0),void 0!==this.s?e_(this.s):new Uint8Array(0)]}serialize(){return ti(this)}serializeNetworkWrapper(){if(void 0===this.blobs||void 0===this.kzgCommitments||void 0===this.kzgProofs)throw Error("cannot serialize network wrapper without blobs, KZG commitments and KZG proofs provided");return ti(this,[this.raw(),this.blobs,this.kzgCommitments,this.kzgProofs])}getMessageToSign(){return ti(this,this.raw().slice(0,11))}getHashedMessageToSign(){return tn(this)}hash(){return e7(this)}getMessageToVerifySignature(){return this.getHashedMessageToSign()}getSenderPublicKey(){return tt(this)}toJSON(){let e=e2.getAccessListJSON(this.accessList);return{...super.toJSON(),chainId:ew(this.chainId),maxPriorityFeePerGas:ew(this.maxPriorityFeePerGas),maxFeePerGas:ew(this.maxFeePerGas),accessList:e,maxFeePerBlobGas:ew(this.maxFeePerBlobGas),blobVersionedHashes:this.blobVersionedHashes.map(e=>ea(e))}}addSignature(e,t,r,n=!1){t=eb(t),r=eb(r);let i={...this.txOptions,common:this.common};return tl.fromTxData({chainId:this.chainId,nonce:this.nonce,maxPriorityFeePerGas:this.maxPriorityFeePerGas,maxFeePerGas:this.maxFeePerGas,gasLimit:this.gasLimit,to:this.to,value:this.value,data:this.data,accessList:this.accessList,v:n?e-eB:e,r:ec(t),s:ec(r),maxFeePerBlobGas:this.maxFeePerBlobGas,blobVersionedHashes:this.blobVersionedHashes,blobs:this.blobs,kzgCommitments:this.kzgCommitments,kzgProofs:this.kzgProofs},i)}errorStr(){return this._getSharedErrorPostfix()+` maxFeePerGas=${this.maxFeePerGas} maxPriorityFeePerGas=${this.maxPriorityFeePerGas}`}_errorMsg(e){return e4(this,e)}numBlobs(){return this.blobVersionedHashes.length}}function tf(e,t){let r=Number(e),n=2*Number(t);return r===n+35||r===n+36}class th extends e3{constructor(e,t={}){if(super({...e,type:P.Legacy},t),this.common=this._validateTxV(this.v,t.common),this.keccakFunction=this.common.customCrypto.keccak256??eO.wn,this.gasPrice=ec(eb(""===e.gasPrice?"0x":e.gasPrice)),this.gasPrice*this.gasLimit>eA)throw Error(this._errorMsg("gas limit * gasPrice cannot exceed MAX_INTEGER (2^256-1)"));this._validateCannotExceedMaxInteger({gasPrice:this.gasPrice}),e3._validateNotArray(e),this.common.gteHardfork("spuriousDragon")&&(this.isSigned()?tf(this.v,this.common.chainId())&&this.activeCapabilities.push(A.EIP155ReplayProtection):this.activeCapabilities.push(A.EIP155ReplayProtection)),(t?.freeze??!0)&&Object.freeze(this)}static fromTxData(e,t={}){return new th(e,t)}static fromSerializedTx(e,t={}){let r=Z.decode(e);if(!Array.isArray(r))throw Error("Invalid serialized tx input. Must be array");return this.fromValuesArray(r,t)}static fromValuesArray(e,t={}){if(6!==e.length&&9!==e.length)throw Error("Invalid transaction. Only expecting 6 values (for unsigned tx) or 9 values (for signed tx).");let[r,n,i,o,a,s,c,u,l]=e;return eE({nonce:r,gasPrice:n,gasLimit:i,value:a,v:c,r:u,s:l}),new th({nonce:r,gasPrice:n,gasLimit:i,to:o,value:a,data:s,v:c,r:u,s:l},t)}getEffectivePriorityFee(e){return tr(this.gasPrice,e)}raw(){return[e_(this.nonce),e_(this.gasPrice),e_(this.gasLimit),void 0!==this.to?this.to.bytes:new Uint8Array(0),e_(this.value),this.data,void 0!==this.v?e_(this.v):new Uint8Array(0),void 0!==this.r?e_(this.r):new Uint8Array(0),void 0!==this.s?e_(this.s):new Uint8Array(0)]}serialize(){return Z.encode(this.raw())}getMessageToSign(){let e=[e_(this.nonce),e_(this.gasPrice),e_(this.gasLimit),void 0!==this.to?this.to.bytes:new Uint8Array(0),e_(this.value),this.data];
2return this.supports(A.EIP155ReplayProtection)&&(e.push(e_(this.common.chainId())),e.push(ey(eb(0))),e.push(ey(eb(0)))),e}getHashedMessageToSign(){let e=this.getMessageToSign();return this.keccakFunction(Z.encode(e))}getDataFee(){return e9(this)}getUpfrontCost(){return this.gasLimit*this.gasPrice+this.value}hash(){return e7(this)}getMessageToVerifySignature(){if(!this.isSigned())throw Error(this._errorMsg("This transaction is not signed"));return this.getHashedMessageToSign()}getSenderPublicKey(){return tt(this)}addSignature(e,t,r,n=!1){t=eb(t),r=eb(r),n&&this.supports(A.EIP155ReplayProtection)&&(e+=this.common.chainId()*eT+eR);let i={...this.txOptions,common:this.common};return th.fromTxData({nonce:this.nonce,gasPrice:this.gasPrice,gasLimit:this.gasLimit,to:this.to,value:this.value,data:this.data,v:e,r:ec(t),s:ec(r)},i)}toJSON(){return{...super.toJSON(),gasPrice:ew(this.gasPrice)}}_validateTxV(e,t){let r;let n=void 0!==e?Number(e):void 0;if(void 0!==n&&n<37&&27!==n&&28!==n)throw Error(`Legacy txs need either v = 27/28 or v >= 37 (EIP-155 replay protection), got v = ${n}`);if(void 0!==n&&0!==n&&(!t||t.gteHardfork("spuriousDragon"))&&27!==n&&28!==n){if(t){if(!tf(BigInt(n),t.chainId()))throw Error(`Incompatible EIP155-based V ${n} and chain id ${t.chainId()}. See the Common parameter of the Transaction constructor to set the chain id.`)}else{let e;e=(n-35)%2==0?35:36,r=BigInt(n-e)/eT}}return this._getCommon(t,r)}errorStr(){return this._getSharedErrorPostfix()+` gasPrice=${this.gasPrice}`}_errorMsg(e){return e4(this,e)}}let td=e=>{let t=Object.assign({},e);
2return t.gasLimit=eD(t.gasLimit??t.gas,y.BigInt),t.data=void 0===t.data?t.input:t.data,t.gasPrice=void 0!==t.gasPrice?BigInt(t.gasPrice):void 0,t.value=void 0!==t.value?BigInt(t.value):void 0,t.to=null!==t.to&&void 0!==t.to?em(eb(t.to),20):null,t.v="0x0"===t.v?"0x":t.v,t.r="0x0"===t.r?"0x":t.r,t.s="0x0"===t.s?"0x":t.s,("0x"!==t.v||"0x"!==t.r||"0x"!==t.s)&&(t.v=eD(t.v,y.BigInt)),t};class tp{constructor(){}static fromTxData(e,t={}){if(!("type"in e)||void 0===e.type||Number(ec(eb(e.type)))===P.Legacy)return th.fromTxData(e,t);if(Number(ec(eb(e.type)))===P.AccessListEIP2930)return tc.fromTxData(e,t);if(Number(ec(eb(e.type)))===P.FeeMarketEIP1559)return ts.fromTxData(e,t);if(Number(ec(eb(e.type)))===P.BlobEIP4844)return tl.fromTxData(e,t);throw Error(`Tx instantiation with type ${e?.type} not supported`)}static fromSerializedData(e,t={}){if(!(e[0]<=127))return th.fromSerializedTx(e,t);switch(e[0]){case P.AccessListEIP2930:return tc.fromSerializedTx(e,t);case P.FeeMarketEIP1559:return ts.fromSerializedTx(e,t);case P.BlobEIP4844:return tl.fromSerializedTx(e,t);default:throw Error(`TypedTransaction with ID ${e[0]} unknown`)}}static fromBlockBodyData(e,t={}){if(e instanceof Uint8Array)return this.fromSerializedData(e,t);if(Array.isArray(e))return th.fromValuesArray(e,t);throw Error("Cannot decode transaction: unknown type input")}static async fromJsonRpcProvider(e,t,r){let n=eK(e),i=await eV(n,{method:"eth_getTransactionByHash",params:[t]});if(null===i)throw Error("No data returned from provider");return tp.fromRPC(i,r)}static async fromRPC(e,t={}){return tp.fromTxData(td(e),t)}}var tm=r(39978),tg=r(75114),ty=r(69894),tb=r.n(ty),tv=r(67552),tE=r(68651),tw=r(44373),t_=r.n(tw),tx=r(82957).Buffer;function tS(e){return 42===e.length}function tA(e){let{getAccounts:t,getPrivateKey:r,processTransaction:n,processSignTransaction:i,processEthSignMessage:o,processTypedMessage:a,processTypedMessageV3:s,processTypedMessageV4:c,processPersonalMessage:u,processEncryptionPublicKey:l,processDecryptMessage:f}=e;return(0,R.UZ)([(0,R.v0)({eth_syncing:!1}),function(e){let{getAccounts:t,getPrivateKey:r,processDecryptMessage:n,processEncryptionPublicKey:i,processEthSignMessage:o,processPersonalMessage:a,processTransaction:s,processSignTransaction:c,processTypedMessage:u,processTypedMessageV3:l,processTypedMessageV4:f}=e;if(!t)throw Error("opts.getAccounts is required");async function h(e,r){if("string"==typeof e&&e.length>0){let n=(await t(r)).map(e=>e.toLowerCase()),i=e.toLowerCase();if(n.includes(i))return i}throw T.PY.invalidParams({message:"Invalid parameters: must provide an Ethereum address."})}async function d(e,r){r.result=await t(e)}async function p(e,r){let n=await t(e);r.result=n[0]||null}async function m(e,t){if(!s)throw T.PY.methodNotSupported();let r=e.params[0]||{from:""};r.from=await h(r.from,e),t.result=await s(r,e)}async function g(e,t){if(!c)throw T.PY.methodNotSupported();let r=e.params[0]||{from:""};r.from=await h(r.from,e),t.result=await c(r,e)}async function y(e,t){if(!o)throw T.PY.methodNotSupported();let r=await h(e.params[0],e),n=e.params[1],i=e.params[2]||{},a=(0,I.Z)((0,I.Z)({},i),{},{from:r,data:n});t.result=await o(a,e)}async function b(e,t){if(!u)throw T.PY.methodNotSupported();let r=e.params[0],n=await h(e.params[1],e),i=e.params[2]||{},o=(0,I.Z)((0,I.Z)({},i),{},{from:n,data:r});t.result=await u(o,e,"V1")}async function v(e,t){if(!l)throw T.PY.methodNotSupported();let r=await h(e.params[0],e),n=e.params[1];t.result=await l({data:n,from:r,version:"V3"},e,"V3")}async function E(e,t){if(!f)throw T.PY.methodNotSupported();let r=await h(e.params[0],e),n=e.params[1];t.result=await f({data:n,from:r,version:"V4"},e,"V4")}async function w(e,t){let r,n;if(!a)throw T.PY.methodNotSupported();let i=e.params[0],o=e.params[1],s=e.params[2]||{};if(tS(i)&&!tS(o)){let e="The eth_personalSign method requires params ordered ";e+="[message, address]. This was previously handled incorrectly, and has been corrected automatically. Please switch this param order for smooth behavior in the future.",t.warning=e,r=i,n=o}else n=i,r=o;r=await h(r,e);let c=(0,I.Z)((0,I.Z)({},s),{},{from:r,data:n});t.result=await a(c,e)}async function _(e,t){if(!i)throw T.PY.methodNotSupported();let r=await h(e.params[0],e);t.result=await i(r,e)}async function x(e,t){if(!n)throw T.PY.methodNotSupported();let r=e.params[0],i=await h(e.params[1],e),o=e.params[2]||{},a=(0,I.Z)((0,I.Z)({},o),{},{from:i,data:r});t.result=n(a,e)}async function S(e,t){if(!r)throw T.PY.methodNotSupported();t.result=r(e)}return(0,R.v0)({eth_accounts:(0,R.Pk)(d),eth_private_key:(0,R.Pk)(S),private_key:(0,R.Pk)(S),eth_coinbase:(0,R.Pk)(p),eth_sendTransaction:(0,R.Pk)(m),eth_signTransaction:(0,R.Pk)(g),eth_sign:(0,R.Pk)(y),eth_signTypedData:(0,R.Pk)(b),eth_signTypedData_v3:(0,R.Pk)(v),eth_signTypedData_v4:(0,R.Pk)(E),personal_sign:(0,R.Pk)(w),eth_getEncryptionPublicKey:(0,R.Pk)(_),eth_decrypt:(0,R.Pk)(x)})}({getAccounts:t,getPrivateKey:r,processTransaction:n,processEthSignMessage:o,processSignTransaction:i,processTypedMessage:a,processTypedMessageV3:s,processTypedMessageV4:c,processPersonalMessage:u,processEncryptionPublicKey:l,processDecryptMessage:f})])}function tP(e){let{addChain:t,switchChain:r}=e;async function n(e,r){var n;let i=null!==(n=e.params)&&void 0!==n&&n.length?e.params[0]:void 0;
2if(!i)throw T.PY.invalidParams("Missing chain params");if(!i.chainId)throw T.PY.invalidParams("Missing chainId in chainParams");if(!i.rpcUrls||0===i.rpcUrls.length)throw T.PY.invalidParams("Missing rpcUrls in chainParams");if(!i.nativeCurrency)throw T.PY.invalidParams("Missing nativeCurrency in chainParams");r.result=await t(i)}async function i(e,t){var n;let i=null!==(n=e.params)&&void 0!==n&&n.length?e.params[0]:void 0;if(!i)throw T.PY.invalidParams("Missing chainId");t.result=await r(i)}return(0,R.v0)({wallet_addEthereumChain:(0,R.Pk)(n),wallet_switchEthereumChain:(0,R.Pk)(i)})}function tI(e){let{chainId:t,rpcTarget:r}=e,n=(0,N.v$)({rpcTarget:r});return{networkMiddleware:(0,R.UZ)([(e,r,n,i)=>"eth_chainId"===e.method?(r.result=t,i()):n(),(t,r,n,i)=>"eth_provider_config"===t.method?(r.result=e,i()):n(),n]),fetchMiddleware:n}}async function tk(e){if(e.session.length){let t=e.session.keys.length-1;return e.session.get(e.session.keys[t])}return null}async function tT(e,t,r,n){let i=await tk(e);if(!i)throw T.gK.disconnected();return e.request({topic:i.topic,chainId:`eip155:${t}`,request:{method:r,params:n}})}async function tR(e){let t=await tk(e);if(!t)throw T.gK.disconnected();let r=(0,B.guN)(t.namespaces);if(r&&r.length)return[...new Set(r.map(e=>(0,B.cwA)(e).address))];throw Error("Failed to get accounts")}
2class tB extends C.Zk{constructor(e){let{config:t,state:r,connector:n}=e;super({config:{chainConfig:(0,I.Z)((0,I.Z)({},t.chainConfig),{},{chainNamespace:O.EN.EIP155}),skipLookupNetwork:!!t.skipLookupNetwork},state:(0,I.Z)((0,I.Z)({},r||{}),{},{chainId:"loading",accounts:[]})}),(0,k.Z)(this,"connector",null),this.connector=n||null}async enable(){if(!this.connector)throw T.gK.custom({message:"Connector is not initialized, pass wallet connect connector in constructor",code:4902});return await this.setupProvider(this.connector),this._providerEngineProxy.request({method:"eth_accounts"})}async setupProvider(e){this.onConnectorStateUpdate(e),await this.setupEngine(e)}async switchChain(e){let{chainId:t}=e;if(!this.connector)throw T.gK.custom({message:"Connector is not initialized, pass wallet connect connector in constructor",code:4902});let r=this.getChainConfig(t);this.configure({chainConfig:r}),await this.setupEngine(this.connector),this.lookupNetwork(this.connector)}async addChain(e){super.addChain(e)}async lookupNetwork(e){let t=this.config.chainConfig.chainId;return this.update({chainId:t}),this.emit("chainChanged",t),this.emit("connect",{chainId:t}),this.config.chainConfig.chainId}async setupEngine(e){let{chainId:t}=this.config.chainConfig,r=function(e){let{connector:t,chainId:r}=e;return{getPrivateKey:async()=>{throw T.PY.methodNotSupported()},getAccounts:async e=>tR(t),processTransaction:async(e,n)=>await tT(t,r,"eth_sendTransaction",[e]),processSignTransaction:async(e,n)=>await tT(t,r,"eth_signTransaction",[e]),processEthSignMessage:async(e,n)=>await tT(t,r,"eth_sign",[e.from,e.data]),processPersonalMessage:async(e,n)=>await tT(t,r,"personal_sign",[e.from,e.data]),processTypedMessage:async(e,n)=>await tT(t,r,"eth_signTypedData",[e.data,e.from]),processTypedMessageV3:async e=>await tT(t,r,"eth_signTypedData_v3",[e.from,e.data]),processTypedMessageV4:async e=>await tT(t,r,"eth_signTypedData_v4",[e.from,e.data]),processEncryptionPublicKey:async e=>{throw T.PY.methodNotSupported()},processDecryptMessage:e=>{throw T.PY.methodNotSupported()}}}({connector:e,chainId:parseInt(t,16)}),n=await tR(e);this.update({accounts:n||[]});let i=tA(r),o=this.getChainSwitchMiddleware(),a=new R.eI,{networkMiddleware:s}=tI(this.config.chainConfig);a.push(i),a.push(o),a.push(s);let c=(0,R.Xj)(a);this.updateProviderEngineProxy(c)}getChainSwitchMiddleware(){return tP({addChain:async e=>{let{chainId:t,chainName:r,rpcUrls:n,blockExplorerUrls:i,nativeCurrency:o}=e;this.addChain({chainNamespace:O.EN.EIP155,chainId:t,ticker:(null==o?void 0:o.symbol)||"ETH",tickerName:(null==o?void 0:o.name)||"Ether",displayName:r,rpcTarget:n[0],blockExplorer:(null==i?void 0:i[0])||"",decimals:(null==o?void 0:o.decimals)||18})},switchChain:async e=>{let{chainId:t}=e;await this.switchChain({chainId:t})}})}connectedTopic(){var e,t;if(!this.connector)throw O.RM.notConnectedError("Wallet connect connector is not connected");if(null!==(e=this.connector)&&void 0!==e&&null!==(e=e.session)&&void 0!==e&&e.length){let e=this.connector.session.keys.length-1;return null===(t=this.connector.session.get(this.connector.session.keys[e]))||void 0===t?void 0:t.topic}}checkIfChainIdAllowed(e){if(!this.connector||!this.connectedTopic())return!1;let t=this.connector.session.get(this.connectedTopic()),r=(0,B.uVI)(t.namespaces),n=!1;for(let t of r)if(Number.parseInt((0,B.DQe)(t).reference,10)===Number.parseInt(e,10)){n=!0;break}return n}checkIfAccountAllowed(e){if(!this.connector||!this.connectedTopic())return!1;let t=this.connector.session.get(this.connectedTopic()),r=(0,B.guN)(t.namespaces),n=!1;for(let t of r){var i;if((null===(i=(0,B.cwA)(t).address)||void 0===i?void 0:i.toLowerCase())===(null==e?void 0:e.toLowerCase())){n=!0;break}}return n}async onConnectorStateUpdate(e){e.events.on("session_event",async t=>{if(O.cM.debug("session_event data",t),!this.provider)throw O.RM.notConnectedError("Wallet connect connector is not connected");let{event:r}=t.params,{name:n,data:i}=r||{};if("accountsChanged"===n&&null!=i&&i.length&&this.state.accounts[0]!==i[0]&&this.checkIfAccountAllowed(i[0])&&(this.update({accounts:i}
2),this.emit("accountsChanged",i)),"chainChanged"===r.name){let{chainId:t,rpcUrl:r}=i,n=`0x${t.toString(16)}`;if(!this.checkIfChainIdAllowed(n))return;if(n&&this.state.chainId!==n){let t=(0,O.h2)(O.EN.EIP155,n)||{};this.configure({chainConfig:(0,I.Z)((0,I.Z)({},t),{},{chainId:n,rpcTarget:r,chainNamespace:O.EN.EIP155})}),await this.setupEngine(e)}}})}}(0,k.Z)(tB,"getProviderInstance",async e=>{let t=new tB({config:{chainConfig:e.chainConfig,skipLookupNetwork:e.skipLookupNetwork}});return await t.setupProvider(e.connector),t});let tO=new tE.Z("1e18"),tC=new tE.Z("1e9"),tN=new tE.Z("1"),tL={hex:e=>"string"==typeof e?new tE.Z(W(e),16):new tE.Z(e,16),dec:e=>new tE.Z(e,10)},tF={WEI:e=>e.div(tO),GWEI:e=>e.div(tC),ETH:e=>e.div(tN)},tM={WEI:e=>e.times(tO).dp(0,tE.Z.ROUND_HALF_UP),GWEI:e=>e.times(tC).dp(9,tE.Z.ROUND_HALF_UP),ETH:e=>e.times(tN).dp(9,tE.Z.ROUND_HALF_UP)},tD={hex:e=>e.toString(16),dec:e=>new tE.Z(e).toString(10)},t$=e=>{let{value:t,fromNumericBase:r,fromDenomination:n,toNumericBase:i,toDenomination:o,numberOfDecimals:a}=e,s=tL[r](t);return n&&(s=tF[n](s)),o&&(s=tM[o](s)),a&&(s=s.dp(a,tE.Z.ROUND_HALF_DOWN)),i&&(s=tD[i](s)),s},tj=(e,t)=>{let{fromNumericBase:r="hex",toNumericBase:n,fromDenomination:i,toDenomination:o,numberOfDecimals:a}=t;return t$({fromNumericBase:r,toNumericBase:n,fromDenomination:i,toDenomination:o,numberOfDecimals:a,value:e||"0"})};function tU(e){return tj(e,{fromNumericBase:"dec",toNumericBase:"hex",fromDenomination:"GWEI",toDenomination:"WEI"})}function tH(e){return tj(e,{fromNumericBase:"hex",toNumericBase:"dec",fromDenomination:"WEI",toDenomination:"GWEI"})}function tz(e){return tH(tU(e)).toString()}async function tG(e){let t=await (0,tg.U2)(e);return(0,I.Z)((0,I.Z)({},t),{},{estimatedBaseFee:tz(t.estimatedBaseFee),low:(0,I.Z)((0,I.Z)({},t.low),{},{suggestedMaxPriorityFeePerGas:tz(t.low.suggestedMaxPriorityFeePerGas),suggestedMaxFeePerGas:tz(t.low.suggestedMaxFeePerGas)}),medium:(0,I.Z)((0,I.Z)({},t.medium),{},{suggestedMaxPriorityFeePerGas:tz(t.medium.suggestedMaxPriorityFeePerGas),suggestedMaxFeePerGas:tz(t.medium.suggestedMaxFeePerGas)}),high:(0,I.Z)((0,I.Z)({},t.high),{},{suggestedMaxPriorityFeePerGas:tz(t.high.suggestedMaxPriorityFeePerGas),suggestedMaxFeePerGas:tz(t.high.suggestedMaxFeePerGas)})})}async function tZ(e){let t=await (0,tg.U2)(e,{referrer:e,referrerPolicy:"no-referrer-when-downgrade",method:"GET",mode:"cors"});return{low:t.SafeGasPrice,medium:t.ProposeGasPrice,high:t.FastGasPrice}}let tq=(e,t)=>{try{tb().ok(e&&"object"==typeof e,"Params must be an object."),tb().ok("data"in e,'Params must include a "data" field.'),tb().ok("from"in e,'Params must include a "from" field.'),tb().ok("string"==typeof e.from&&eC(e.from),'"from" field must be a valid, lowercase, hexadecimal Ethereum address string.');let n=null,i=null;switch(e.version){case tm.SignTypedDataVersion.V1:"string"==typeof e.data?tb().doesNotThrow(()=>{n=JSON.parse(e.data)},'"data" must be a valid JSON string.'):n=e.data,tb().ok(Array.isArray(n),"params.data must be an array."),tb().doesNotThrow(()=>{(0,tm.typedSignatureHash)(n)},"Signing data must be valid EIP-712 typed data.");break;case tm.SignTypedDataVersion.V3:case tm.SignTypedDataVersion.V4:{var r;"string"==typeof e.data?tb().doesNotThrow(()=>{n=JSON.parse(e.data)},'"data" must be a valid JSON string.'):n=e.data;let o=n;
2tb().ok(o.primaryType in o.types,`Primary type of "${o.primaryType}" has no type definition.`);let a=tv.validate(o,tm.TYPED_MESSAGE_SCHEMA.properties);tb().strictEqual(a.errors.length,0,"Signing data must conform to EIP-712 schema. See https://git.io/fNtcx."),(i=null===(r=o.domain)||void 0===r?void 0:r.chainId)&&(tb().ok(!Number.isNaN(t),`Cannot sign messages for chainId "${i}", because Web3Auth is switching networks.`),"string"==typeof i&&(i=Number.parseInt(i,(0,O.H2)(i)?16:10)),tb().strictEqual(i,t,`Provided chainId "${i}" must match the active chainId "${t}"`));break}default:tb().fail(`Unknown typed data version "${e.version}"`)}}catch(e){throw T.PY.invalidInput({message:null==e?void 0:e.message})}};async function tV(e,t,r){let n=await r.formatTransaction(e),i=await r.getCommonConfiguration(),o=tp.fromTxData(n,{common:i}).sign(tx.from(t,"hex")).serialize();return tx.from(o)}function tK(e){return ev(e.toString(16))}function tW(e){return t_().isBN(e)?e:new(t_())(W(e),16)}let tJ={LEGACY:"0x0",FEE_MARKET:"0x2"},tY={SENT_ETHER:"sentEther",CONTRACT_INTERACTION:"contractInteraction",DEPLOY_CONTRACT:"contractDeployment"},tX={FEE_MARKET:"fee-market",LEGACY:"legacy",ETH_GASPRICE:"eth_gasPrice"};class tQ{constructor(e){let{getProviderEngineProxy:t}=e;(0,k.Z)(this,"API_SUPPORTED_CHAINIDS",new Set(["0x1","0x5","0x13881","0xa4b1","0xa86a","0x2105","0x38","0xfa","0xa","0x89"])),(0,k.Z)(this,"chainConfig",null),(0,k.Z)(this,"getProviderEngineProxy",void 0),(0,k.Z)(this,"isEIP1559Compatible",!1),this.getProviderEngineProxy=t}get providerProxy(){return this.getProviderEngineProxy()}
2async init(){this.chainConfig=await this.providerProxy.request({method:"eth_provider_config"}),this.isEIP1559Compatible=await this.getEIP1559Compatibility()}async getCommonConfiguration(){if(!this.chainConfig)throw Error("Chain config not initialized");let{displayName:e,chainId:t}=this.chainConfig,r=this.isEIP1559Compatible?v.Paris:v.Berlin,n={name:e,chainId:"loading"===t?0:Number.parseInt(t,16),networkId:"loading"===t?0:Number.parseInt(t,16),defaultHardfork:r};return e1.custom(n)}async formatTransaction(e){if(!this.chainConfig)throw Error("Chain config not initialized");let t=(0,I.Z)({},e);if(void 0===t.nonce&&(t.nonce=await this.providerProxy.request({method:"eth_getTransactionCount",params:[e.from,"latest"]})),!this.isEIP1559Compatible&&t.gasPrice){if(t.maxFeePerGas&&delete t.maxFeePerGas,t.maxPriorityFeePerGas&&delete t.maxPriorityFeePerGas,!t.gasLimit){if(t.gas)t.gasLimit=t.gas;else{let e=await this.getDefaultGasLimit(t);e&&(t.gasLimit=e)}}return t}if(!t.gasLimit){if(t.gas)t.gasLimit=t.gas;else{let e=await this.getDefaultGasLimit(t);e&&(t.gasLimit=e)}}let{gasPrice:r,maxFeePerGas:n,maxPriorityFeePerGas:i}=await this.getDefaultGasFees(t);if(this.isEIP1559Compatible){if(!t.gasPrice||t.maxFeePerGas||t.maxPriorityFeePerGas)n&&!t.maxFeePerGas&&(t.maxFeePerGas=n),i&&!t.maxPriorityFeePerGas&&(t.maxPriorityFeePerGas=i),r&&!t.maxFeePerGas&&(t.maxFeePerGas=r),t.maxFeePerGas&&!t.maxPriorityFeePerGas&&(t.maxPriorityFeePerGas=t.maxFeePerGas);else{var o,a;t.maxFeePerGas=t.gasPrice,o="string"==typeof i?W(i):i,a="string"==typeof t.gasPrice?W(t.gasPrice):t.gasPrice,t.maxPriorityFeePerGas=(null==o||null==a?null:new tE.O(o,10).lt(a,10))?i:t.gasPrice}delete t.gasPrice}else delete t.maxPriorityFeePerGas,delete t.maxFeePerGas;return!r||t.gasPrice||t.maxPriorityFeePerGas||t.maxFeePerGas||(t.gasPrice=r),t.type=this.isEIP1559Compatible?tJ.FEE_MARKET:tJ.LEGACY,t.chainId=this.chainConfig.chainId,t}async fetchEthGasPriceEstimate(){return{gasPrice:tH(await this.providerProxy.request({method:"eth_gasPrice",params:[]})).toString()}}async fetchGasEstimatesViaEthFeeHistory(){let e=await this.providerProxy.request({method:"eth_feeHistory",params:[10,"latest",[10,50,95]]}),t=e.baseFeePerGas[e.baseFeePerGas.length-1],r=e.reward.reduce((e,t)=>({slow:e.slow.plus(new tE.Z(t[0],16)),average:e.average.plus(new tE.Z(t[1],16)),fast:e.fast.plus(new tE.Z(t[2],16))}),{slow:new tE.Z(0),average:new tE.Z(0),fast:new tE.Z(0)});return{estimatedBaseFee:tH(t).toString(),high:{maxWaitTimeEstimate:3e4,minWaitTimeEstimate:15e3,suggestedMaxFeePerGas:tH(r.fast.plus(t).toString(16)).toString(),suggestedMaxPriorityFeePerGas:tH(r.fast.toString(16)).toString()},medium:{maxWaitTimeEstimate:45e3,minWaitTimeEstimate:15e3,suggestedMaxFeePerGas:tH(r.average.plus(t).toString(16)).toString(),suggestedMaxPriorityFeePerGas:tH(r.average.toString(16)).toString()},low:{maxWaitTimeEstimate:6e4,minWaitTimeEstimate:15e3,suggestedMaxFeePerGas:tH(r.slow.plus(t).toString(16)).toString(),suggestedMaxPriorityFeePerGas:tH(r.slow.toString(16)).toString()}}}async getEIP1559Compatibility(){let e=await this.providerProxy.request({method:"eth_getBlockByNumber",params:["latest",!1]});return!!(e&&void 0!==e.baseFeePerGas)}async fetchGasFeeEstimateData(){let e;if(!this.chainConfig)throw Error("Chain config not initialized");let t="0x1"===this.chainConfig.chainId,r=Number.parseInt(this.chainConfig.chainId,16);try{if(this.isEIP1559Compatible){let t;try{if(this.API_SUPPORTED_CHAINIDS.has(this.chainConfig.chainId))t=await tG("https://gas-api.metaswap.codefi.network/networks/<chain_id>/suggestedGasFees".replace("<chain_id>",`${r}`));else throw Error("Chain id not supported by api")}catch(e){t=await this.fetchGasEstimatesViaEthFeeHistory()}e={gasFeeEstimates:t,gasEstimateType:tX.FEE_MARKET}}else if(t)e={gasFeeEstimates:await tZ("https://gas-api.metaswap.codefi.network/networks/<chain_id>/gasPrices".replace("<chain_id>",`${r}`)),gasEstimateType:tX.LEGACY};else throw Error("Main gas fee/price estimation failed. Use fallback")}catch(t){try{e={gasFeeEstimates:await this.fetchEthGasPriceEstimate(),gasEstimateType:tX.ETH_GASPRICE}}catch(e){throw Error(`Gas fee/price estimation failed. Message: ${e.message}`)}}return e}async getDefaultGasFees(e){if(!this.isEIP1559Compatible&&e.gasPrice||this.isEIP1559Compatible&&e.maxFeePerGas&&e.maxPriorityFeePerGas)return{};try{let{gasFeeEstimates:e,gasEstimateType:t}=await this.fetchGasFeeEstimateData();if(this.isEIP1559Compatible&&t===tX.FEE_MARKET){let{medium:{suggestedMaxPriorityFeePerGas:t,suggestedMaxFeePerGas:r}={}}=e;if(t&&r)return{maxFeePerGas:ev(tU(r)),maxPriorityFeePerGas:ev(tU(t))}}else if(t===tX.LEGACY)return{gasPrice:ev(tU(e.medium))};else if(t===tX.ETH_GASPRICE)return{gasPrice:ev(tU(e.gasPrice))}}catch(e){O.cM.error(e)}let{gasPrice:t}=await this.fetchEthGasPriceEstimate();return{gasPrice:ev(tU(t))}}async estimateTxGas(e){let t=(0,I.Z)({},e);return delete t.gasPrice,delete t.maxFeePerGas,delete t.maxPriorityFeePerGas,await this.providerProxy.request({method:"eth_estimateGas",params:[t]})}async analyzeGasUsage(e){let t=await this.providerProxy.request({method:"eth_getBlockByNumber",params:["latest",!1]}),r=tK(function(e,t,r){let n=new(t_())(19),i=new(t_())(20);return e.mul(n).div(i)}(tW(t.gasLimit),0,0));try{r=await this.estimateTxGas(e)}catch(e){O.cM.warn(e)}return{blockGasLimit:t.gasLimit,estimatedGasHex:r}}addGasBuffer(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1.5,n=tW(e),i=tW(t).muln(.9),o=n.muln(r);return n.gt(i)?tK(n):o.lt(i)?tK(o):tK(i)}async determineTransactionCategory(e){let t;let{data:r,to:n}=e,i="";if(r&&!n)t=tY.DEPLOY_CONTRACT;else{try{i=await this.providerProxy.request({method:"eth_getCode",params:[n,"latest"]})}catch(e){O.cM.warn(e)}t=i&&"0x"!==i&&"0x0"!==i?tY.CONTRACT_INTERACTION:tY.SENT_ETHER}return{transactionCategory:t,code:i}}async getDefaultGasLimit(e){let{transactionCategory:t}=await this.determineTransactionCategory((0,I.Z)({},e));if(e.gas)return e.gas;if(e.to&&t===tY.SENT_ETHER){if(e.data)throw Error("TxGasUtil - Trying to call a function on a non-contract address");return ev("5208")}let{blockGasLimit:r,estimatedGasHex:n}=await this.analyzeGasUsage(e);return this.addGasBuffer(ev(n),r)}}
2class t0 extends C.Zk{constructor(e){let{config:t,state:r}=e;super({config:{chainConfig:(0,I.Z)((0,I.Z)({},t.chainConfig),{},{chainNamespace:O.EN.EIP155})},state:r})}async enable(){if(!this.state.privateKey)throw T.gK.custom({message:"Private key is not found in state, plz pass it in constructor state param",code:4902});return await this.setupProvider(this.state.privateKey),this._providerEngineProxy.request({method:"eth_accounts"})}async setupProvider(e){let t=new tQ({getProviderEngineProxy:this.getProviderEngineProxy.bind(this)}),r=tA(function(e){let{txFormatter:t,privKey:r,getProviderEngineProxy:n}=e;return{getAccounts:async e=>[`0x${tx.from(eF(tx.from(r,"hex"))).toString("hex")}`],getPrivateKey:async e=>r,processTransaction:async(e,i)=>{let o=n();if(!o)throw T.gK.custom({message:"Provider is not initialized",code:4902});e.input&&!e.data&&(e.data=e.input);let a=await tV(e,r,t);return await o.request({method:"eth_sendRawTransaction",params:["0x".concat(a.toString("hex"))]})},processSignTransaction:async(e,i)=>{if(!n())throw T.gK.custom({message:"Provider is not initialized",code:4902});e.input&&!e.data&&(e.data=e.input);let o=await tV(e,r,t);return`0x${o.toString("hex")}`},processEthSignMessage:async(e,t)=>(0,N.l)(r,e.data),processPersonalMessage:async(e,t)=>{let n=tx.from(r,"hex");return(0,tm.personalSign)({privateKey:n,data:e.data})},processTypedMessage:async(e,t)=>{O.cM.debug("processTypedMessage",e);let i=tx.from(r,"hex"),o=n();if(!o)throw T.gK.custom({message:"Provider is not initialized",code:4902});let a=await o.request({method:"eth_chainId"}),s=Number.parseInt(a,(0,O.H2)(a)?16:10),c=(0,I.Z)((0,I.Z)({},e),{},{version:tm.SignTypedDataVersion.V1});tq(c,s);let u="string"==typeof c.data?JSON.parse(c.data):c.data;return(0,tm.signTypedData)({privateKey:i,data:u,version:tm.SignTypedDataVersion.V1})},processTypedMessageV3:async(e,t)=>{O.cM.debug("processTypedMessageV3",e);let i=tx.from(r,"hex"),o=n();if(!o)throw T.gK.custom({message:"Provider is not initialized",code:4902});let a=await o.request({method:"eth_chainId"});tq(e,Number.parseInt(a,(0,O.H2)(a)?16:10));let s="string"==typeof e.data?JSON.parse(e.data):e.data;return(0,tm.signTypedData)({privateKey:i,data:s,version:tm.SignTypedDataVersion.V3})},processTypedMessageV4:async(e,t)=>{O.cM.debug("processTypedMessageV4",e);let i=tx.from(r,"hex"),o=n();if(!o)throw T.gK.custom({message:"Provider is not initialized",code:4902});let a=await o.request({method:"eth_chainId"});tq(e,Number.parseInt(a,(0,O.H2)(a)?16:10));let s="string"==typeof e.data?JSON.parse(e.data):e.data;return(0,tm.signTypedData)({privateKey:i,data:s,version:tm.SignTypedDataVersion.V4})},processEncryptionPublicKey:async(e,t)=>(O.cM.info("processEncryptionPublicKey",e),(0,tm.getEncryptionPublicKey)(r)),processDecryptMessage:(e,t)=>{O.cM.info("processDecryptMessage",e);let n=W(e.data),i=tx.from(n,"hex");return(0,tm.decrypt)({encryptedData:JSON.parse(i.toString("utf8")),privateKey:r})}}}({txFormatter:t,privKey:e,getProviderEngineProxy:this.getProviderEngineProxy.bind(this)})),n=this.getChainSwitchMiddleware(),i=new R.eI,{networkMiddleware:o}=tI(this.config.chainConfig);i.push(r),i.push(n),i.push(this.getAccountMiddleware()),i.push(o);let a=(0,R.Xj)(i);this.updateProviderEngineProxy(a),await t.init(),await this.lookupNetwork()}async updateAccount(e){if(!this._providerEngineProxy)throw T.gK.custom({message:"Provider is not initialized",code:4902});await this._providerEngineProxy.request({method:"eth_private_key"})!==e.privateKey&&(await this.setupProvider(e.privateKey),this.emit("accountsChanged",{accounts:await this._providerEngineProxy.request({method:"eth_accounts"})}))}async switchChain(e){if(!this._providerEngineProxy)throw T.gK.custom({message:"Provider is not initialized",code:4902});let t=this.getChainConfig(e.chainId);this.update({chainId:"loading"}),this.configure({chainConfig:t});let r=await this._providerEngineProxy.request({method:"eth_private_key"});await this.setupProvider(r)}async lookupNetwork(){if(!this._providerEngineProxy)throw T.gK.custom({message:"Provider is not initialized",code:4902});let{chainId:e}=this.config.chainConfig;
2if(!e)throw T.PY.invalidParams("chainId is required while lookupNetwork");let t=await this._providerEngineProxy.request({method:"net_version",params:[]});if(parseInt(e,16)!==parseInt(t,10))throw T.gK.chainDisconnected(`Invalid network, net_version is: ${t}`);return this.state.chainId!==e&&(this.emit("chainChanged",e),this.emit("connect",{chainId:e})),this.update({chainId:e}),t}getChainSwitchMiddleware(){return tP({addChain:async e=>{let{chainId:t,chainName:r,rpcUrls:n,blockExplorerUrls:i,nativeCurrency:o}=e;this.addChain({chainNamespace:O.EN.EIP155,chainId:t,ticker:(null==o?void 0:o.symbol)||"ETH",tickerName:(null==o?void 0:o.name)||"Ether",displayName:r,rpcTarget:n[0],blockExplorer:(null==i?void 0:i[0])||"",decimals:(null==o?void 0:o.decimals)||18})},switchChain:async e=>{let{chainId:t}=e;await this.switchChain({chainId:t})}})}getAccountMiddleware(){return function(e){let{updatePrivatekey:t}=e;async function r(e,r){var n;let i=null!==(n=e.params)&&void 0!==n&&n.length?e.params[0]:void 0;if(!(null!=i&&i.privateKey))throw T.PY.invalidParams("Missing privateKey");r.result=await t(i)}return(0,R.v0)({wallet_updateAccount:(0,R.Pk)(r)})}({updatePrivatekey:async e=>{let{privateKey:t}=e;await this.updateAccount({privateKey:t})}})}}(0,k.Z)(t0,"getProviderInstance",async e=>{let t=new t0({config:{chainConfig:e.chainConfig}});return await t.setupProvider(e.privKey),t})},69894:function(e,t,r){"use strict";var n,i,o,a=r(25566);function s(e){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var c=r(61769).codes,u=c.ERR_AMBIGUOUS_ARGUMENT,l=c.ERR_INVALID_ARG_TYPE,f=c.ERR_INVALID_ARG_VALUE,h=c.ERR_INVALID_RETURN_VALUE,d=c.ERR_MISSING_ARGS,p=r(85768),m=r(85508).inspect,g=r(85508).types,y=g.isPromise,b=g.isRegExp,v=r(86705)(),E=r(22550)(),w=r(23837)("RegExp.prototype.test");function _(){var e=r(21751);i=e.isDeepEqual,o=e.isDeepStrictEqual}var x=!1,S=e.exports=k,A={};function P(e){if(e.message instanceof Error)throw e.message;throw new p(e)}function I(e,t,r,n){if(!r){var i=!1;if(0===t)i=!0,n="No value argument passed to `assert.ok()`";else if(n instanceof Error)throw n;var o=new p({actual:r,expected:!0,message:n,operator:"==",stackStartFn:e});throw o.generatedMessage=i,o}}function k(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];I.apply(void 0,[k,t.length].concat(t))}S.fail=function e(t,r,n,i,o){var s,c=arguments.length;if(0===c?s="Failed":1===c?(n=t,t=void 0):(!1===x&&(x=!0,(a.emitWarning?a.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===c&&(i="!=")),n instanceof Error)throw n;var u={actual:t,expected:r,operator:void 0===i?"fail":i,stackStartFn:o||e};void 0!==n&&(u.message=n);var l=new p(u);throw s&&(l.message=s,l.generatedMessage=!0),l},S.AssertionError=p,S.ok=k,S.equal=function e(t,r,n){if(arguments.length<2)throw new d("actual","expected");t!=r&&P({actual:t,expected:r,message:n,operator:"==",stackStartFn:e})},S.notEqual=function e(t,r,n){if(arguments.length<2)throw new d("actual","expected");t==r&&P({actual:t,expected:r,message:n,operator:"!=",stackStartFn:e})},S.deepEqual=function e(t,r,n){if(arguments.length<2)throw new d("actual","expected");void 0===i&&_(),i(t,r)||P({actual:t,expected:r,message:n,operator:"deepEqual",stackStartFn:e})},S.notDeepEqual=function e(t,r,n){if(arguments.length<2)throw new d("actual","expected");void 0===i&&_(),i(t,r)&&P({actual:t,expected:r,message:n,operator:"notDeepEqual",stackStartFn:e})},S.deepStrictEqual=function e(t,r,n){if(arguments.length<2)throw new d("actual","expected");void 0===i&&_(),o(t,r)||P({actual:t,expected:r,message:n,operator:"deepStrictEqual",stackStartFn:e})},S.notDeepStrictEqual=function e(t,r,n){if(arguments.length<2)throw new d("actual","expected");void 0===i&&_(),o(t,r)&&P({actual:t,expected:r,message:n,operator:"notDeepStrictEqual",stackStartFn:e})},S.strictEqual=function e(t,r,n){if(arguments.length<2)throw new d("actual","expected");E(t,r)||P({actual:t,expected:r,message:n,operator:"strictEqual",stackStartFn:e})},S.notStrictEqual=function e(t,r,n){if(arguments.length<2)throw new d("actual","expected");
2E(t,r)&&P({actual:t,expected:r,message:n,operator:"notStrictEqual",stackStartFn:e})};var T=(Object.defineProperty(n=function e(t,r,n){var i=this;(function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")})(this,e),r.forEach(function(e){e in t&&(void 0!==n&&"string"==typeof n[e]&&b(t[e])&&w(t[e],n[e])?i[e]=n[e]:i[e]=t[e])})},"prototype",{writable:!1}),n);function R(e,t,r,n){if("function"!=typeof t){if(b(t))return w(t,e);if(2==arguments.length)throw new l("expected",["Function","RegExp"],t);if("object"!==s(e)||null===e){var a=new p({actual:e,expected:t,message:r,operator:"deepStrictEqual",stackStartFn:n});throw a.operator=n.name,a}var c=Object.keys(t);if(t instanceof Error)c.push("name","message");else if(0===c.length)throw new f("error",t,"may not be an empty object");return void 0===i&&_(),c.forEach(function(i){"string"==typeof e[i]&&b(t[i])&&w(t[i],e[i])||function(e,t,r,n,i,a){if(!(r in e)||!o(e[r],t[r])){if(!n){var s=new p({actual:new T(e,i),expected:new T(t,i,e),operator:"deepStrictEqual",stackStartFn:a});throw s.actual=e,s.expected=t,s.operator=a.name,s}P({actual:e,expected:t,message:n,operator:a.name,stackStartFn:a})}}(e,t,i,r,c,n)}),!0}return void 0!==t.prototype&&e instanceof t||!Error.isPrototypeOf(t)&&!0===t.call({},e)}function B(e){if("function"!=typeof e)throw new l("fn","Function",e);try{e()}catch(e){return e}return A}function O(e){return y(e)||null!==e&&"object"===s(e)&&"function"==typeof e.then&&"function"==typeof e.catch}function C(e){return Promise.resolve().then(function(){var t;if("function"==typeof e){if(!O(t=e()))throw new h("instance of Promise","promiseFn",t)}else if(O(e))t=e;else throw new l("promiseFn",["Function","Promise"],e);return Promise.resolve().then(function(){return t}).then(function(){return A}).catch(function(e){return e})})}function N(e,t,r,n){if("string"==typeof r){if(4==arguments.length)throw new l("error",["Object","Error","Function","RegExp"],r);if("object"===s(t)&&null!==t){if(t.message===r)throw new u("error/message",'The error message "'.concat(t.message,'" is identical to the message.'))}else if(t===r)throw new u("error/message",'The error "'.concat(t,'" is identical to the message.'));n=r,r=void 0}else if(null!=r&&"object"!==s(r)&&"function"!=typeof r)throw new l("error",["Object","Error","Function","RegExp"],r);if(t===A){var i="";r&&r.name&&(i+=" (".concat(r.name,")")),i+=n?": ".concat(n):".";var o="rejects"===e.name?"rejection":"exception";P({actual:void 0,expected:r,operator:e.name,message:"Missing expected ".concat(o).concat(i),stackStartFn:e})}if(r&&!R(t,r,n,e))throw t}function L(e,t,r,n){if(t!==A){if("string"==typeof r&&(n=r,r=void 0),!r||R(t,r)){var i=n?": ".concat(n):".",o="doesNotReject"===e.name?"rejection":"exception";P({actual:t,expected:r,operator:e.name,message:"Got unwanted ".concat(o).concat(i,"\n")+'Actual message: "'.concat(t&&t.message,'"'),stackStartFn:e})}throw t}}function F(e,t,r,n,i){if(!b(t))throw new l("regexp","RegExp",t);var o="match"===i;if("string"!=typeof e||w(t,e)!==o){if(r instanceof Error)throw r;var a=!r;r=r||("string"!=typeof e?'The "string" argument must be of type string. Received type '+"".concat(s(e)," (").concat(m(e),")"):(o?"The input did not match the regular expression ":"The input was expected to not match the regular expression ")+"".concat(m(t),". Input:\n\n").concat(m(e),"\n"));var c=new p({actual:e,expected:t,message:r,operator:i,stackStartFn:n});throw c.generatedMessage=a,c}}S.throws=function e(t){for(var r=arguments.length,n=Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];N.apply(void 0,[e,B(t)].concat(n))},S.rejects=function e(t){for(var r=arguments.length,n=Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return C(t).then(function(t){return N.apply(void 0,[e,t].concat(n))})},S.doesNotThrow=function e(t){for(var r=arguments.length,n=Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];L.apply(void 0,[e,B(t)].concat(n))},S.doesNotReject=function e(t){for(var r=arguments.length,n=Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return C(t).then(function(t){return L.apply(void 0,[e,t].concat(n))})},S.ifError=function e(t){if(null!=t){var r="ifError got unwanted exception: ";"object"===s(t)&&"string"==typeof t.message?0===t.message.length&&t.constructor?r+=t.constructor.name:r+=t.message:r+=m(t);var n=new p({actual:t,expected:null,operator:"ifError",message:r,stackStartFn:e}),i=t.stack;
2if("string"==typeof i){var o=i.split("\n");o.shift();for(var a=n.stack.split("\n"),c=0;c<o.length;c++){var u=a.indexOf(o[c]);if(-1!==u){a=a.slice(0,u);break}}n.stack="".concat(a.join("\n"),"\n").concat(o.join("\n"))}throw n}},S.match=function e(t,r,n){F(t,r,n,e,"match")},S.doesNotMatch=function e(t,r,n){F(t,r,n,e,"doesNotMatch")},S.strict=v(function e(){for(var t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];I.apply(void 0,[e,r.length].concat(r))},S,{equal:S.strictEqual,deepEqual:S.deepStrictEqual,notEqual:S.notStrictEqual,notDeepEqual:S.notDeepStrictEqual}),S.strict.strict=S.strict},85768:function(e,t,r){"use strict";var n=r(25566);function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function o(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?i(Object(r),!0).forEach(function(t){var n,i;n=t,i=r[t],(n=a(n))in e?Object.defineProperty(e,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[n]=i}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function a(e){var t=function(e,t){if("object"!==p(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==p(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===p(t)?t:String(t)}function s(e,t){if(t&&("object"===p(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");return c(e)}function c(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function u(e){var t="function"==typeof Map?new Map:void 0;return(u=function(e){if(null===e||-1===Function.toString.call(e).indexOf("[native code]"))return e;if("function"!=typeof e)throw TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return l(e,arguments,d(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),h(r,e)})(e)}function l(e,t,r){return(l=f()?Reflect.construct.bind():function(e,t,r){var n=[null];n.push.apply(n,t);var i=new(Function.bind.apply(e,n));return r&&h(i,r.prototype),i}).apply(null,arguments)}function f(){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(e){return!1}}function h(e,t){return(h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function d(e){return(d=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function p(e){return(p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var m=r(85508).inspect,g=r(61769).codes.ERR_INVALID_ARG_TYPE;function y(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}var b="",v="",E="",w="",_={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 x(e){var t=Object.keys(e),r=Object.create(Object.getPrototypeOf(e));return t.forEach(function(t){r[t]=e[t]}),Object.defineProperty(r,"message",{value:e.message}),r}function S(e){return m(e,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}var A=function(e,t){!function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&h(e,t)}(l,e);var r,i,u=(r=f(),function(){var e,t=d(l);return e=r?Reflect.construct(t,arguments,d(this).constructor):t.apply(this,arguments),s(this,e)});function l(e){if(!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,l),"object"!==p(e)||null===e)throw new g("options","Object",e);var t,r=e.message,i=e.operator,o=e.stackStartFn,a=e.actual,f=e.expected,h=Error.stackTraceLimit;if(Error.stackTraceLimit=0,null!=r)t=u.call(this,String(r));else if(n.stderr&&n.stderr.isTTY&&(n.stderr&&n.stderr.getColorDepth&&1!==n.stderr.getColorDepth()?(b="\x1b[34m",v="\x1b[32m",w="\x1b[39m",E="\x1b[31m"):(b="",v="",w="",E="")),"object"===p(a)&&null!==a&&"object"===p(f)&&null!==f&&"stack"in a&&a instanceof Error&&"stack"in f&&f instanceof Error&&(a=x(a),f=x(f)),"deepStrictEqual"===i||"strictEqual"===i)t=u.call(this,function(e,t,r){var i="",o="",a=0,s="",c=!1,u=S(e),l=u.split("\n"),f=S(t).split("\n"),h=0,d="";if("strictEqual"===r&&"object"===p(e)&&"object"===p(t)&&null!==e&&null!==t&&(r="strictEqualObject"),1===l.length&&1===f.length&&l[0]!==f[0]){var m=l[0].length+f[0].length;if(m<=10){if(("object"!==p(e)||null===e)&&("object"!==p(t)||null===t)&&(0!==e||0!==t))return"".concat(_[r],"\n\n")+"".concat(l[0]," !== ").concat(f[0],"\n")}else if("strictEqualObject"!==r&&m<(n.stderr&&n.stderr.isTTY?n.stderr.columns:80)){for(;l[0][h]===f[0][h];)h++;h>2&&(d="\n  ".concat(function(e,t){if(t=Math.floor(t),0==e.length||0==t)return"";var r=e.length*t;for(t=Math.floor(Math.log(t)/Math.log(2));t;)e+=e,t--;return e+e.substring(0,r-e.length)}(" ",h),"^"),h=0)}}for(var g=l[l.length-1],x=f[f.length-1];g===x&&(h++<2?s="\n  ".concat(g).concat(s):i=g,l.pop(),f.pop(),0!==l.length&&0!==f.length);)g=l[l.length-1],x=f[f.length-1];var A=Math.max(l.length,f.length);if(0===A){var P=u.split("\n");if(P.length>30)for(P[26]="".concat(b,"...").concat(w);P.length>27;)P.pop();return"".concat(_.notIdentical,"\n\n").concat(P.join("\n"),"\n")}h>
vendor: 1,137 bytes, line 2
23&&(s="\n".concat(b,"...").concat(w).concat(s),c=!0),""!==i&&(s="\n  ".concat(i).concat(s),i="");var I=0,k=_[r]+"\n".concat(v,"+ actual").concat(w," ").concat(E,"- expected").concat(w),T=" ".concat(b,"...").concat(w," Lines skipped");for(h=0;h<A;h++){var R=h-a;if(l.length<h+1)R>1&&h>2&&(R>4?(o+="\n".concat(b,"...").concat(w),c=!0):R>3&&(o+="\n  ".concat(f[h-2]),I++),o+="\n  ".concat(f[h-1]),I++),a=h,i+="\n".concat(E,"-").concat(w," ").concat(f[h]),I++;else if(f.length<h+1)R>1&&h>2&&(R>4?(o+="\n".concat(b,"...").concat(w),c=!0):R>3&&(o+="\n  ".concat(l[h-2]),I++),o+="\n  ".concat(l[h-1]),I++),a=h,o+="\n".concat(v,"+").concat(w," ").concat(l[h]),I++;else{var B=f[h],O=l[h],C=O!==B&&(!y(O,",")||O.slice(0,-1)!==B);C&&y(B,",")&&B.slice(0,-1)===O&&(C=!1,O+=","),C?(R>1&&h>2&&(R>4?(o+="\n".concat(b,"...").concat(w),c=!0):R>3&&(o+="\n  ".concat(l[h-2]),I++),o+="\n  ".concat(l[h-1]),I++),a=h,o+="\n".concat(v,"+").concat(w," ").concat(O),i+="\n".concat(E,"-").concat(w," ").concat(B),I+=2):(o+=i,i="",(1===R||0===h)&&(o+="\n  ".concat(O),I++))}if(I>20&&h<A-2)return"".concat(k).concat(T,"\n").concat(o,"\n").concat(b,"...").concat(w).c
2oncat(i,"\n")+"".concat(b,"...").concat(w)}return"".concat(k).concat(c?T:"","\n").concat(o).concat(i).concat(s).concat(d)}(a,f,i));else if("notDeepStrictEqual"===i||"notStrictEqual"===i){var d=_[i],m=S(a).split("\n");if("notStrictEqual"===i&&"object"===p(a)&&null!==a&&(d=_.notStrictEqualObject),m.length>30)for(m[26]="".concat(b,"...").concat(w);m.length>27;)m.pop();t=1===m.length?u.call(this,"".concat(d," ").concat(m[0])):u.call(this,"".concat(d,"\n\n").concat(m.join("\n"),"\n"))}else{var A=S(a),P="",I=_[i];"notDeepEqual"===i||"notEqual"===i?(A="".concat(_[i],"\n\n").concat(A)).length>1024&&(A="".concat(A.slice(0,1021),"...")):(P="".concat(S(f)),A.length>512&&(A="".concat(A.slice(0,509),"...")),P.length>512&&(P="".concat(P.slice(0,509),"...")),"deepEqual"===i||"equal"===i?A="".concat(I,"\n\n").concat(A,"\n\nshould equal\n\n"):P=" ".concat(i," ").concat(P)),t=u.call(this,"".concat(A).concat(P))}return Error.stackTraceLimit=h,t.generatedMessage=!r,Object.defineProperty(c(t),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),t.code="ERR_ASSERTION",t.actual=a,t.expected=f,t.operator=i,Error.captureStackTrace&&Error.captureStackTrace(c(t),o),t.stack,t.name="AssertionError",s(t)}return i=[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:t,value:function(e,t){return m(this,o(o({},t),{},{customInspect:!1,depth:0}))}}],function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,a(n.key),n)}}(l.prototype,i),Object.defineProperty(l,"prototype",{writable:!1}),l}(u(Error),m.custom);e.exports=A},61769:function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){return(i=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var a,s,c={};function u(e,t,r){r||(r=Error);var a=function(r){!function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&i(e,t)}(c,r);var a,s=(a=function(){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(e){return!1}}(),function(){var e,t=o(c);return e=a?Reflect.construct(t,arguments,o(this).constructor):t.apply(this,arguments),function(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function c(r,n,i){var o;return!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,c),(o=s.call(this,"string"==typeof t?t:t(r,n,i))).code=e,o}return Object.defineProperty(c,"prototype",{writable:!1}),c}(r);c[e]=a}function l(e,t){if(!Array.isArray(e))return"of ".concat(t," ").concat(String(e));var r=e.length;return(e=e.map(function(e){return String(e)}),r>2)?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:2===r?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}u("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),u("ERR_INVALID_ARG_TYPE",function(e,t,i){if((void 0===a&&(a=r(69894)),a("string"==typeof e,"'name' must be a string"),"string"==typeof t&&(o="not ",t.substr(0,o.length)===o))?(f="must not be",t=t.replace(/^not /,"")):f="must be",s=" argument",(void 0===c||c>e.length)&&(c=e.length),e.substring(c-s.length,c)===s)h="The ".concat(e," ").concat(f," ").concat(l(t,"type"));else{var o,s,c,u,f,h,d=("number"!=typeof u&&(u=0),u+1>e.length||-1===e.indexOf(".",u))?"argument":"property";h='The "'.concat(e,'" ').concat(d," ").concat(f," ").concat(l(t,"type"))}return h+". Received type ".concat(n(i))},TypeError),u("ERR_INVALID_ARG_VALUE",function(e,t){var n=arguments.length>
22&&void 0!==arguments[2]?arguments[2]:"is invalid";void 0===s&&(s=r(85508));var i=s.inspect(t);return i.length>128&&(i="".concat(i.slice(0,128),"...")),"The argument '".concat(e,"' ").concat(n,". Received ").concat(i)},TypeError,RangeError),u("ERR_INVALID_RETURN_VALUE",function(e,t,r){var i;return i=r&&r.constructor&&r.constructor.name?"instance of ".concat(r.constructor.name):"type ".concat(n(r)),"Expected ".concat(e,' to be returned from the "').concat(t,'"')+" function but got ".concat(i,".")},TypeError),u("ERR_MISSING_ARGS",function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];void 0===a&&(a=r(69894)),a(t.length>0,"At least one arg needs to be specified");var i="The ",o=t.length;switch(t=t.map(function(e){return'"'.concat(e,'"')}),o){case 1:i+="".concat(t[0]," argument");break;case 2:i+="".concat(t[0]," and ").concat(t[1]," arguments");break;default:i+=t.slice(0,o-1).join(", ")+", and ".concat(t[o-1]," arguments")}return"".concat(i," must be specified")},TypeError),e.exports.codes=c},21751:function(e,t,r){"use strict";function n(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,a,s=[],c=!0,u=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=o.call(r)).done)&&(s.push(n.value),s.length!==t);c=!0);}catch(e){u=!0,i=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return i(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return i(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var a=void 0!==/a/g.flags,s=function(e){var t=[];return e.forEach(function(e){return t.push(e)}),t},c=function(e){var t=[];return e.forEach(function(e,r){return t.push([r,e])}),t},u=Object.is?Object.is:r(60466),l=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols:function(){return[]},f=Number.isNaN?Number.isNaN:r(30664);function h(e){return e.call.bind(e)}var d=h(Object.prototype.hasOwnProperty),p=h(Object.prototype.propertyIsEnumerable),m=h(Object.prototype.toString),g=r(85508).types,y=g.isAnyArrayBuffer,b=g.isArrayBufferView,v=g.isDate,E=g.isMap,w=g.isRegExp,_=g.isSet,x=g.isNativeError,S=g.isBoxedPrimitive,A=g.isNumberObject,P=g.isStringObject,I=g.isBooleanObject,k=g.isBigIntObject,T=g.isSymbolObject,R=g.isFloat32Array,B=g.isFloat64Array;function O(e){if(0===e.length||e.length>10)return!0;for(var t=0;t<e.length;t++){var r=e.charCodeAt(t);if(r<48||r>57)return!0}return 10===e.length&&e>=4294967296}function C(e){return Object.keys(e).filter(O).concat(l(e).filter(Object.prototype.propertyIsEnumerable.bind(e)))}function N(e,t){if(e===t)return 0;for(var r=e.length,n=t.length,i=0,o=Math.min(r,n);i<o;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:n<r?1:0}var L=void 0;function F(e,t,r,n){if(e===t)return 0!==e||!r||u(e,t);if(r){if("object"!==o(e))return"number"==typeof e&&f(e)&&f(t);if("object"!==o(t)||null===e||null===t||Object.getPrototypeOf(e)!==Object.getPrototypeOf(t))return!1}else{if(null===e||"object"!==o(e))return(null===t||"object"!==o(t))&&e==t;if(null===t||"object"!==o(t))return!1}var i=m(e);if(i!==m(t))return!1;if(Array.isArray(e)){if(e.length!==t.length)return!1;var s=C(e,L),c=C(t,L);return s.length===c.length&&D(e,t,r,n,1,s)}if("[object Object]"===i&&(!E(e)&&E(t)||!_(e)&&_(t)))return!1;if(v(e)){if(!v(t)||Date.prototype.getTime.call(e)!==Date.prototype.getTime.call(t))return!1}else if(w(e)){if(!w(t)||(a?e.source!==t.source||e.flags!==t.flags:RegExp.prototype.toString.call(e)!==RegExp.prototype.toString.call(t)))return!1}else if(x(e)||e instanceof Error){if(e.message!==t.message||e.name!==t.name)return!1}else if(b(e)){if(!r&&(R(e)||B(e))){if(!function(e,t){if(e.byteLength!==t.byteLength)return!1;for(var r=0;r<e.byteLength;r++)if(e[r]!==t[r])return!1;return!0}(e,t))return!1}else if(e.byteLength!==t.byteLength||0!==N(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength)))return!1;var l=C(e,L),h=C(t,L);
2return l.length===h.length&&D(e,t,r,n,0,l)}else if(_(e))return!!_(t)&&e.size===t.size&&D(e,t,r,n,2);else if(E(e))return!!E(t)&&e.size===t.size&&D(e,t,r,n,3);else if(y(e)){if(e.byteLength!==t.byteLength||0!==N(new Uint8Array(e),new Uint8Array(t)))return!1}else if(S(e)&&(A(e)?!(A(t)&&u(Number.prototype.valueOf.call(e),Number.prototype.valueOf.call(t))):P(e)?!P(t)||String.prototype.valueOf.call(e)!==String.prototype.valueOf.call(t):I(e)?!I(t)||Boolean.prototype.valueOf.call(e)!==Boolean.prototype.valueOf.call(t):k(e)?!k(t)||BigInt.prototype.valueOf.call(e)!==BigInt.prototype.valueOf.call(t):!T(t)||Symbol.prototype.valueOf.call(e)!==Symbol.prototype.valueOf.call(t)))return!1;return D(e,t,r,n,0)}function M(e,t){return t.filter(function(t){return p(e,t)})}function D(e,t,r,i,a,u){if(5==arguments.length){u=Object.keys(e);var f=Object.keys(t);if(u.length!==f.length)return!1}for(var h=0;h<u.length;h++)if(!d(t,u[h]))return!1;if(r&&5==arguments.length){var m=l(e);if(0!==m.length){var g=0;for(h=0;h<m.length;h++){var y=m[h];if(p(e,y)){if(!p(t,y))return!1;u.push(y),g++}else if(p(t,y))return!1}var b=l(t);if(m.length!==b.length&&M(t,b).length!==g)return!1}else{var v=l(t);if(0!==v.length&&0!==M(t,v).length)return!1}}if(0===u.length&&(0===a||1===a&&0===e.length||0===e.size))return!0;if(void 0===i)i={val1:new Map,val2:new Map,position:0};else{var E=i.val1.get(e);if(void 0!==E){var w=i.val2.get(t);if(void 0!==w)return E===w}i.position++}i.val1.set(e,i.position),i.val2.set(t,i.position);var _=function(e,t,r,i,a,u){var l=0;if(2===u){if(!function(e,t,r,n){for(var i=null,a=s(e),c=0;c<a.length;c++){var u=a[c];if("object"===o(u)&&null!==u)null===i&&(i=new Set),i.add(u);else if(!t.has(u)){if(r||!function(e,t,r){var n=j(r);return null!=n?n:t.has(n)&&!e.has(n)}(e,t,u))return!1;null===i&&(i=new Set),i.add(u)}}if(null!==i){for(var l=s(t),f=0;f<l.length;f++){var h=l[f];if("object"===o(h)&&null!==h){if(!$(i,h,r,n))return!1}else if(!r&&!e.has(h)&&!$(i,h,r,n))return!1}return 0===i.size}return!0}(e,t,r,a))return!1}else if(3===u){if(!function(e,t,r,i){for(var a=null,s=c(e),u=0;u<s.length;u++){var l=n(s[u],2),f=l[0],h=l[1];if("object"===o(f)&&null!==f)null===a&&(a=new Set),a.add(f);else{var d=t.get(f);if(void 0===d&&!t.has(f)||!F(h,d,r,i)){if(r||!function(e,t,r,n,i){var o=j(r);if(null!=o)return o;var a=t.get(o);return!!((void 0!==a||t.has(o))&&F(n,a,!1,i))&&!e.has(o)&&F(n,a,!1,i)}(e,t,f,h,i))return!1;null===a&&(a=new Set),a.add(f)}}}if(null!==a){for(var p=c(t),m=0;m<p.length;m++){var g=n(p[m],2),y=g[0],b=g[1];if("object"===o(y)&&null!==y){if(!U(a,e,y,b,r,i))return!1}else if(!r&&(!e.has(y)||!F(e.get(y),b,!1,i))&&!U(a,e,y,b,!1,i))return!1}return 0===a.size}return!0}(e,t,r,a))return!1}else if(1===u)for(;l<e.length;l++)if(d(e,l)){if(!d(t,l)||!F(e[l],t[l],r,a))return!1}else{if(d(t,l))return!1;for(var f=Object.keys(e);l<f.length;l++){var h=f[l];if(!d(t,h)||!F(e[h],t[h],r,a))return!1}if(f.length!==Object.keys(t).length)return!1;return!0}for(l=0;l<i.length;l++){var p=i[l];if(!F(e[p],t[p],r,a))return!1}return!0}(e,t,r,u,i,a);return i.val1.delete(e),i.val2.delete(t),_}function $(e,t,r,n){for(var i=s(e),o=0;o<i.length;o++){var a=i[o];if(F(t,a,r,n))return e.delete(a),!0}return!1}function j(e){switch(o(e)){case"undefined":return null;case"object":return;case"symbol":return!1;case"string":e=+e;case"number":if(f(e))return!1}return!0}function U(e,t,r,n,i,o){for(var a=s(e),c=0;c<a.length;c++){var u=a[c];if(F(r,u,i,o)&&F(n,t.get(u),i,o))return e.delete(u),!0}return!1}e.exports={isDeepEqual:function(e,t){return F(e,t,!1)},isDeepStrictEqual:function(e,t){return F(e,t,!0)}}},53733:function(e,t,r){"use strict";var n=r(62122),i="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),o=Object.prototype.toString,a=Array.prototype.concat,s=r(33832),c=r(40927)(),u=function(e,t,r,n){if(t in e){if(!0===n){if(e[t]===r)return}else if(!("function"==typeof n&&"[object Function]"===o.call(n))||!n())return}c?s(e,t,r,!0):s(e,t,r)},l=function(e,t){var r=arguments.length>2?arguments[2]:{},o=n(t);i&&(o=a.call(o,Object.getOwnPropertySymbols(t)));for(var s=0;s<o.length;s+=1)u(e,o[s],t[o[s]],r[o[s]])};
2l.supportsDescriptors=!!c,e.exports=l},82041:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.keccak512=t.keccak384=t.keccak256=t.keccak224=void 0;let n=r(32517),i=r(41301);t.keccak224=(0,i.wrapHash)(n.keccak_224),t.keccak256=(()=>{let e=(0,i.wrapHash)(n.keccak_256);return e.create=n.keccak_256.create,e})(),t.keccak384=(0,i.wrapHash)(n.keccak_384),t.keccak512=(0,i.wrapHash)(n.keccak_512)},42475:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.secp256k1=void 0;var n=r(89984);Object.defineProperty(t,"secp256k1",{enumerable:!0,get:function(){return n.secp256k1}})},41301:function(e,t,r){"use strict";e=r.nmd(e);var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.crypto=t.wrapHash=t.equalsBytes=t.hexToBytes=t.bytesToUtf8=t.utf8ToBytes=t.createView=t.concatBytes=t.toHex=t.bytesToHex=t.assertBytes=t.assertBool=void 0;let i=n(r(48444)),o=r(28772),a=i.default.bool;t.assertBool=a;let s=i.default.bytes;t.assertBytes=s;var c=r(28772);Object.defineProperty(t,"bytesToHex",{enumerable:!0,get:function(){return c.bytesToHex}}),Object.defineProperty(t,"toHex",{enumerable:!0,get:function(){return c.bytesToHex}}),Object.defineProperty(t,"concatBytes",{enumerable:!0,get:function(){return c.concatBytes}}),Object.defineProperty(t,"createView",{enumerable:!0,get:function(){return c.createView}}),Object.defineProperty(t,"utf8ToBytes",{enumerable:!0,get:function(){return c.utf8ToBytes}}),t.bytesToUtf8=function(e){if(!(e instanceof Uint8Array))throw TypeError(`bytesToUtf8 expected Uint8Array, got ${typeof e}`);return new TextDecoder().decode(e)},t.hexToBytes=function(e){let t=e.startsWith("0x")?e.substring(2):e;return(0,o.hexToBytes)(t)},t.equalsBytes=function(e,t){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0},t.wrapHash=function(e){return t=>(i.default.bytes(t),e(t))},t.crypto=(()=>{let t="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0,r="function"==typeof e.require&&e.require.bind(e);return{node:r&&!t?r("crypto"):void 0,web:t}})()},81263:function(e){"use strict";e.exports=function(e){return e!=e}},30664:function(e,t,r){"use strict";var n=r(72884),i=r(53733),o=r(81263),a=r(88150),s=r(19882),c=n(a(),Number);i(c,{getPolyfill:a,implementation:o,shim:s}),e.exports=c},88150:function(e,t,r){"use strict";var n=r(81263);e.exports=function(){return Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN("a")?Number.isNaN:n}},19882:function(e,t,r){"use strict";var n=r(53733),i=r(88150);e.exports=function(){var e=i();return n(Number,{isNaN:e},{isNaN:function(){return Number.isNaN!==e}}),e}},40082:function(e,t,r){"use strict";var n=r(16329),i=n.ValidatorResult,o=n.SchemaError,a={};a.ignoreProperties={id:!0,default:!0,description:!0,title:!0,additionalItems:!0,then:!0,else:!0,$schema:!0,$ref:!0,extends:!0};var s=a.validators={};function c(e,t,r,n,i){var o=t.throwError,a=t.throwAll;t.throwError=!1,t.throwAll=!1;var s=this.validateSchema(e,i,t,r);return t.throwError=o,t.throwAll=a,!s.valid&&n instanceof Function&&n(s),s.valid}function u(e,t){if(Object.hasOwnProperty.call(e,t))return e[t];if(t in e){for(;e=Object.getPrototypeOf(e);)if(Object.propertyIsEnumerable.call(e,t))return e[t]}}function l(e,t,r,n,i,o){if(this.types.object(e)&&(!t.properties||void 0===t.properties[i])){if(!1===t.additionalProperties)o.addError({name:"additionalProperties",argument:i,message:"is not allowed to have the additional property "+JSON.stringify(i)});else{var a=t.additionalProperties||{};"function"==typeof r.preValidateProperty&&r.preValidateProperty(e,i,a,r,n);var s=this.validateSchema(e[i],a,r,n.makeChild(a,i));s.instance!==o.instance[i]&&(o.instance[i]=s.instance),o.importErrors(s)}}}s.type=function(e,t,r,n){if(void 0===e)return null;var o=new i(e,t,r,n),a=Array.isArray(t.type)?t.type:[t.type];if(!a.some(this.testType.bind(this,e,t,r,n))){var s=a.map(function(e){if(e){var t=e.$id||e.id;return t?"<"+t+">":e+""}});o.addError({name:"type",argument:s,message:"is not of a type(s) "+s})}return o},s.anyOf=function(e,t,r,n){if(void 0===e)return null;var a=new i(e,t,r,n),s=new i(e,t,r,n);if(!Array.isArray(t.anyOf))throw new o("anyOf must be an array");if(!t.anyOf.some(c.bind(this,e,r,n,function(e){s.importErrors(e)}))){var u=t.anyOf.map(function(e,t){var r=e.$id||e.id;return r?"<"+r+">":e.title&&JSON.stringify(e.title)||e.$ref&&"<"+e.$ref+">"||"[subschema "+t+"]"});r.nestedErrors&&a.importErrors(s),a.addError({name:"anyOf",argument:u,message:"is not any of "+u.join(",")})}return a},s.allOf=function(e,t,r,n){if(void 0===e)return null;if(!Array.isArray(t.allOf))throw new o("allOf must be an array");var a=new i(e,t,r,n),s=this;return t.allOf.forEach(function(t,i){var o=s.validateSchema(e,t,r,n);
2if(!o.valid){var c=t.$id||t.id||t.title&&JSON.stringify(t.title)||t.$ref&&"<"+t.$ref+">"||"[subschema "+i+"]";a.addError({name:"allOf",argument:{id:c,length:o.errors.length,valid:o},message:"does not match allOf schema "+c+" with "+o.errors.length+" error[s]:"}),a.importErrors(o)}}),a},s.oneOf=function(e,t,r,n){if(void 0===e)return null;if(!Array.isArray(t.oneOf))throw new o("oneOf must be an array");var a=new i(e,t,r,n),s=new i(e,t,r,n),u=t.oneOf.filter(c.bind(this,e,r,n,function(e){s.importErrors(e)})).length,l=t.oneOf.map(function(e,t){return e.$id||e.id||e.title&&JSON.stringify(e.title)||e.$ref&&"<"+e.$ref+">"||"[subschema "+t+"]"});return 1!==u&&(r.nestedErrors&&a.importErrors(s),a.addError({name:"oneOf",argument:l,message:"is not exactly one from "+l.join(",")})),a},s.if=function(e,t,r,o){if(void 0===e)return null;if(!n.isSchema(t.if))throw Error('Expected "if" keyword to be a schema');var a,s=c.call(this,e,r,o,null,t.if),u=new i(e,t,r,o);if(s){if(void 0===t.then)return;if(!n.isSchema(t.then))throw Error('Expected "then" keyword to be a schema');a=this.validateSchema(e,t.then,r,o.makeChild(t.then)),u.importErrors(a)}else{if(void 0===t.else)return;if(!n.isSchema(t.else))throw Error('Expected "else" keyword to be a schema');a=this.validateSchema(e,t.else,r,o.makeChild(t.else)),u.importErrors(a)}return u},s.propertyNames=function(e,t,r,a){if(this.types.object(e)){var s=new i(e,t,r,a),c=void 0!==t.propertyNames?t.propertyNames:{};if(!n.isSchema(c))throw new o('Expected "propertyNames" to be a schema (object or boolean)');for(var l in e)if(void 0!==u(e,l)){var f=this.validateSchema(l,c,r,a.makeChild(c));s.importErrors(f)}return s}},s.properties=function(e,t,r,n){if(this.types.object(e)){var a=new i(e,t,r,n),s=t.properties||{};for(var c in s){var l=s[c];if(void 0!==l){if(null===l)throw new o('Unexpected null, expected schema in "properties"');"function"==typeof r.preValidateProperty&&r.preValidateProperty(e,c,l,r,n);var f=u(e,c),h=this.validateSchema(f,l,r,n.makeChild(l,c));h.instance!==a.instance[c]&&(a.instance[c]=h.instance),a.importErrors(h)}}return a}},s.patternProperties=function(e,t,r,n){if(this.types.object(e)){var a=new i(e,t,r,n),s=t.patternProperties||{};for(var c in e){var u=!0;for(var f in s){var h=s[f];if(void 0!==h){if(null===h)throw new o('Unexpected null, expected schema in "patternProperties"');try{var d=RegExp(f,"u")}catch(e){d=new RegExp(f)}if(d.test(c)){u=!1,"function"==typeof r.preValidateProperty&&r.preValidateProperty(e,c,h,r,n);var p=this.validateSchema(e[c],h,r,n.makeChild(h,c));p.instance!==a.instance[c]&&(a.instance[c]=p.instance),a.importErrors(p)}}}u&&l.call(this,e,t,r,n,c,a)}return a}},s.additionalProperties=function(e,t,r,n){if(this.types.object(e)){if(t.patternProperties)return null;var o=new i(e,t,r,n);for(var a in e)l.call(this,e,t,r,n,a,o);return o}},s.minProperties=function(e,t,r,n){if(this.types.object(e)){var o=new i(e,t,r,n);return Object.keys(e).length>=t.minProperties||o.addError({name:"minProperties",argument:t.minProperties,message:"does not meet minimum property length of "+t.minProperties}),o}},s.maxProperties=function(e,t,r,n){if(this.types.object(e)){var o=new i(e,t,r,n);return Object.keys(e).length<=t.maxProperties||o.addError({name:"maxProperties",argument:t.maxProperties,message:"does not meet maximum property length of "+t.maxProperties}),o}},s.items=function(e,t,r,n){var o=this;if(this.types.array(e)&&void 0!==t.items){var a=new i(e,t,r,n);return e.every(function(e,i){if(Array.isArray(t.items))var s=void 0===t.items[i]?t.additionalItems:t.items[i];else var s=t.items;if(void 0===s)return!0;if(!1===s)return a.addError({name:"items",message:"additionalItems not permitted"}),!1;var c=o.validateSchema(e,s,r,n.makeChild(s,i));return c.instance!==a.instance[i]&&(a.instance[i]=c.instance),a.importErrors(c),!0}),a}},s.contains=function(e,t,r,o){var a=this;if(this.types.array(e)&&void 0!==t.contains){if(!n.isSchema(t.contains))throw Error('Expected "contains" keyword to be a schema');var s=new i(e,t,r,o);return!1===e.some(function(e,n){return 0===a.validateSchema(e,t.contains,r,o.makeChild(t.contains,n)).errors.length})&&s.addError({name:"contains",argument:t.contains,message:"must contain an item matching given sc
2hema"}),s}},s.minimum=function(e,t,r,n){if(this.types.number(e)){var o=new i(e,t,r,n);return t.exclusiveMinimum&&!0===t.exclusiveMinimum?e>t.minimum||o.addError({name:"minimum",argument:t.minimum,message:"must be greater than "+t.minimum}):e>=t.minimum||o.addError({name:"minimum",argument:t.minimum,message:"must be greater than or equal to "+t.minimum}),o}},s.maximum=function(e,t,r,n){if(this.types.number(e)){var o=new i(e,t,r,n);return t.exclusiveMaximum&&!0===t.exclusiveMaximum?e<t.maximum||o.addError({name:"maximum",argument:t.maximum,message:"must be less than "+t.maximum}):e<=t.maximum||o.addError({name:"maximum",argument:t.maximum,message:"must be less than or equal to "+t.maximum}),o}},s.exclusiveMinimum=function(e,t,r,n){if("boolean"!=typeof t.exclusiveMinimum&&this.types.number(e)){var o=new i(e,t,r,n);return e>t.exclusiveMinimum||o.addError({name:"exclusiveMinimum",argument:t.exclusiveMinimum,message:"must be strictly greater than "+t.exclusiveMinimum}),o}},s.exclusiveMaximum=function(e,t,r,n){if("boolean"!=typeof t.exclusiveMaximum&&this.types.number(e)){var o=new i(e,t,r,n);return e<t.exclusiveMaximum||o.addError({name:"exclusiveMaximum",argument:t.exclusiveMaximum,message:"must be strictly less than "+t.exclusiveMaximum}),o}};var f=function(e,t,r,a,s,c){if(this.types.number(e)){var u=t[s];if(0==u)throw new o(s+" cannot be zero");var l=new i(e,t,r,a),f=Math.pow(10,Math.max(n.getDecimalPlaces(e),n.getDecimalPlaces(u)));return Math.round(e*f)%Math.round(u*f)!=0&&l.addError({name:s,argument:u,message:c+JSON.stringify(u)}),l}};function h(e,t,r){var i,o=r.length;for(i=t+1;i<o;i++)if(n.deepCompareStrict(e,r[i]))return!1;return!0}s.multipleOf=function(e,t,r,n){return f.call(this,e,t,r,n,"multipleOf","is not a multiple of (divisible by) ")},s.divisibleBy=function(e,t,r,n){return f.call(this,e,t,r,n,"divisibleBy","is not divisible by (multiple of) ")},s.required=function(e,t,r,n){var o=new i(e,t,r,n);return void 0===e&&!0===t.required?o.addError({name:"required",message:"is required"}):this.types.object(e)&&Array.isArray(t.required)&&t.required.forEach(function(t){void 0===u(e,t)&&o.addError({name:"required",argument:t,message:"requires property "+JSON.stringify(t)})}),o},s.pattern=function(e,t,r,n){if(this.types.string(e)){var o=new i(e,t,r,n),a=t.pattern;try{var s=RegExp(a,"u")}catch(e){s=new RegExp(a)}return e.match(s)||o.addError({name:"pattern",argument:t.pattern,message:"does not match pattern "+JSON.stringify(t.pattern.toString())}),o}},s.format=function(e,t,r,o){if(void 0!==e){var a=new i(e,t,r,o);return a.disableFormat||n.isFormat(e,t.format,this)||a.addError({name:"format",argument:t.format,message:"does not conform to the "+JSON.stringify(t.format)+" format"}),a}},s.minLength=function(e,t,r,n){if(this.types.string(e)){var o=new i(e,t,r,n),a=e.match(/[\uDC00-\uDFFF]/g);return e.length-(a?a.length:0)>=t.minLength||o.addError({name:"minLength",argument:t.minLength,message:"does not meet minimum length of "+t.minLength}),o}},s.maxLength=function(e,t,r,n){if(this.types.string(e)){var o=new i(e,t,r,n),a=e.match(/[\uDC00-\uDFFF]/g);return e.length-(a?a.length:0)<=t.maxLength||o.addError({name:"maxLength",argument:t.maxLength,message:"does not meet maximum length of "+t.maxLength}),o}},s.minItems=function(e,t,r,n){if(this.types.array(e)){var o=new i(e,t,r,n);return e.length>=t.minItems||o.addError({name:"minItems",argument:t.minItems,message:"does not meet minimum length of "+t.minItems}),o}},s.maxItems=function(e,t,r,n){if(this.types.array(e)){var o=new i(e,t,r,n);return e.length<=t.maxItems||o.addError({name:"maxItems",argument:t.maxItems,message:"does not meet maximum length of "+t.maxItems}),o}},s.uniqueItems=function(e,t,r,n){if(!0===t.uniqueItems&&this.types.array(e)){var o=new i(e,t,r,n);return e.every(h)||o.addError({name:"uniqueItems",message:"contains duplicate item"}),o}},s.dependencies=function(e,t,r,n){if(this.types.object(e)){var o=new i(e,t,r,n);for(var a in t.dependencies)if(void 0!==e[a]){var s=t.dependencies[a],c=n.makeChild(s,a);if("string"==typeof s&&(s=[s]),Array.isArray(s))s.forEach(function(t){void 0===e[t]&&o.addError({name:"dependencies",argument:c.propertyPath,message:"property "+t+" not found, required by "+c.propertyPath})});else{var u=this.validateSchema(e,s,r,c);o.instance!==u.instance&&(o.instance=u.instance),u&&u.errors.length&&(o.addError({name:"dependencies",argument:c.propertyPath,message:"does not meet dependency required by "+c.propertyPath}),o.importErrors(u))}}return o}},s.enum=function(e,t,r,a){if(void 0===e)return null;if(!Array.isArray(t.enum))throw new o("enum expects an array",t);var s=new i(e,t,r,a);return t.enum.some(n.deepCompareStrict.bind(null,e))||s.addError({name:"enum",argument:t.enum,message:"is not one of enum values: "+t.enum.map(String).join(",")}),s},s.const=function(e,t,r,o){if(void 0===e)return null;var a=new i(e,t,r,o);return n.deepCompareStrict(t.const,e)||a.addError({name:"const",argument:t.const,message:"does not exactly match expected constant: "+t.const}),a},s.not=s.disallow=function(e,t,r,n){var o=this;if(void 0===e)return null;var a=new i(e,t,r,n),s=t.not||t.disallow;
2return s?(Array.isArray(s)||(s=[s]),s.forEach(function(i){if(o.testType(e,t,r,n,i)){var s=i&&(i.$id||i.id)||i;a.addError({name:"not",argument:s,message:"is of prohibited type "+s})}}),a):null},e.exports=a},16329:function(e,t,r){"use strict";var n=r(93813),i=t.ValidationError=function(e,t,r,n,i,o){if(Array.isArray(n)?(this.path=n,this.property=n.reduce(function(e,t){return e+f(t)},"instance")):void 0!==n&&(this.property=n),e&&(this.message=e),r){var a=r.$id||r.id;this.schema=a||r}void 0!==t&&(this.instance=t),this.name=i,this.argument=o,this.stack=this.toString()};i.prototype.toString=function(){return this.property+" "+this.message};var o=t.ValidatorResult=function(e,t,r,n){this.instance=e,this.schema=t,this.options=r,this.path=n.path,this.propertyPath=n.propertyPath,this.errors=[],this.throwError=r&&r.throwError,this.throwFirst=r&&r.throwFirst,this.throwAll=r&&r.throwAll,this.disableFormat=r&&!0===r.disableFormat};function a(e,t){return t+": "+e.toString()+"\n"}function s(e){Error.captureStackTrace&&Error.captureStackTrace(this,s),this.instance=e.instance,this.schema=e.schema,this.options=e.options,this.errors=e.errors}o.prototype.addError=function(e){var t;if("string"==typeof e)t=new i(e,this.instance,this.schema,this.path);else{if(!e)throw Error("Missing error detail");if(!e.message)throw Error("Missing error message");if(!e.name)throw Error("Missing validator type");t=new i(e.message,this.instance,this.schema,this.path,e.name,e.argument)}if(this.errors.push(t),this.throwFirst)throw new s(this);if(this.throwError)throw t;return t},o.prototype.importErrors=function(e){"string"==typeof e||e&&e.validatorType?this.addError(e):e&&e.errors&&(this.errors=this.errors.concat(e.errors))},o.prototype.toString=function(e){return this.errors.map(a).join("")},Object.defineProperty(o.prototype,"valid",{get:function(){return!this.errors.length}}),e.exports.ValidatorResultError=s,s.prototype=Error(),s.prototype.constructor=s,s.prototype.name="Validation Error";var c=t.SchemaError=function e(t,r){this.message=t,this.schema=r,Error.call(this,t),Error.captureStackTrace(this,e)};c.prototype=Object.create(Error.prototype,{constructor:{value:c,enumerable:!1},name:{value:"SchemaError",enumerable:!1}});var u=t.SchemaContext=function(e,t,r,n,i){this.schema=e,this.options=t,Array.isArray(r)?(this.path=r,this.propertyPath=r.reduce(function(e,t){return e+f(t)},"instance")):this.propertyPath=r,this.base=n,this.schemas=i};u.prototype.resolve=function(e){return n.resolve(this.base,e)},u.prototype.makeChild=function(e,t){var r=void 0===t?this.path:this.path.concat([t]),i=e.$id||e.id,o=n.resolve(this.base,i||""),a=new u(e,this.options,r,o,Object.create(this.schemas));return i&&!a.schemas[o]&&(a.schemas[o]=e),a};var l=t.FORMAT_REGEXPS={"date-time":/^\d{4}-(?:0[0-9]{1}|1[0-2]{1})-(3[01]|0[1-9]|[12][0-9])[tT ](2[0-4]|[01][0-9]):([0-5][0-9]):(60|[0-5][0-9])(\.\d+)?([zZ]|[+-]([0-5][0-9]):(60|[0-5][0-9]))$/,date:/^\d{4}-(?:0[0-9]{1}|1[0-2]{1})-(3[01]|0[1-9]|[12][0-9])$/,time:/^(2[0-4]|[01][0-9]):([0-5][0-9]):(60|[0-5][0-9])$/,duration:/P(T\d+(H(\d+M(\d+S)?)?|M(\d+S)?|S)|\d+(D|M(\d+D)?|Y(\d+M(\d+D)?)?)(T\d+(H(\d+M(\d+S)?)?|M(\d+S)?|S))?|\d+W)/i,email:/^(?:[\w\!\#\$\%\&\'\*\+\-\/\=\?\^\`\{\|\}\~]+\.)*[\w\!\#\$\%\&\'\*\+\-\/\=\?\^\`\{\|\}\~]+@(?:(?:(?:[a-zA-Z0-9](?:[a-zA-Z0-9\-](?!\.)){0,61}[a-zA-Z0-9]?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9\-](?!$)){0,61}[a-zA-Z0-9]?)|(?:\[(?:(?:[01]?\d{1,2}|2[0-4]\d|25[0-5])\.){3}(?:[01]?\d{1,2}|2[0-4]\d|25[0-5])\]))$/,"idn-email":/^("(?:[!#-\[\]-\u{10FFFF}]|\\[\t -\u{10FFFF}])*"|[!#-'*+\-/-9=?A-Z\^-\u{10FFFF}](?:\.?[!#-'*+\-/-9=?A-Z\^-\u{10FFFF}])*)@([!#-'*+\-/-9=?A-Z\^-\u{10FFFF}](?:\.?[!#-'*+\-/-9=?A-Z\^-\u{10FFFF}])*|\[[!-Z\^-\u{10FFFF}]*\])$/u,"ip-address":/^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/,ipv6:/^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/,uri:/^[a-zA-Z][a-zA-Z0-9+.-]*:[^\s]*$/,"uri-reference":/^(((([A-Za-z][+\-.0-9A-Za-z]*(:%[0-9A-Fa-f]{2}|:[!$&-.0-;=?-Z_a-z~]|[/?])|\?)(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~])*|([A-Za-z][+\-.0-9A-Za-z]*:?)?)|([A-Za-z][+\-.0-9A-Za-z]*:)?\/((%[0-9A-Fa-f]{2}|\/((%[0-9A-Fa-f]{2}|[!$&-.0-9;
2=A-Z_a-z~])+|(\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~]+)?|[.0-:A-Fa-f]+)\])?)(:\d*)?[/?]|[!$&-.0-;=?-Z_a-z~])(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~])*|(\/((%[0-9A-Fa-f]{2}|[!$&-.0-9;=A-Z_a-z~])+|(\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~]+)?|[.0-:A-Fa-f]+)\])?)(:\d*)?)?))#(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~])*|(([A-Za-z][+\-.0-9A-Za-z]*)?%[0-9A-Fa-f]{2}|[!$&-.0-9;=@_~]|[A-Za-z][+\-.0-9A-Za-z]*[!$&-*,;=@_~])(%[0-9A-Fa-f]{2}|[!$&-.0-9;=@-Z_a-z~])*((([/?](%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~])*)?#|[/?])(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~])*)?|([A-Za-z][+\-.0-9A-Za-z]*(:%[0-9A-Fa-f]{2}|:[!$&-.0-;=?-Z_a-z~]|[/?])|\?)(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~])*|([A-Za-z][+\-.0-9A-Za-z]*:)?\/((%[0-9A-Fa-f]{2}|\/((%[0-9A-Fa-f]{2}|[!$&-.0-9;=A-Z_a-z~])+|(\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~]+)?|[.0-:A-Fa-f]+)\])?)(:\d*)?[/?]|[!$&-.0-;=?-Z_a-z~])(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~])*|\/((%[0-9A-Fa-f]{2}|[!$&-.0-9;=A-Z_a-z~])+(:\d*)?|(\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~]+)?|[.0-:A-Fa-f]+)\])?:\d*|\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~]+)?|[.0-:A-Fa-f]+)\])?)?|[A-Za-z][+\-.0-9A-Za-z]*:?)?$/,iri:/^[a-zA-Z][a-zA-Z0-9+.-]*:[^\s]*$/,"iri-reference":/^(((([A-Za-z][+\-.0-9A-Za-z]*(:%[0-9A-Fa-f]{2}|:[!$&-.0-;=?-Z_a-z~-\u{10FFFF}]|[/?])|\?)(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~-\u{10FFFF}])*|([A-Za-z][+\-.0-9A-Za-z]*:?)?)|([A-Za-z][+\-.0-9A-Za-z]*:)?\/((%[0-9A-Fa-f]{2}|\/((%[0-9A-Fa-f]{2}|[!$&-.0-9;=A-Z_a-z~-\u{10FFFF}])+|(\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~-\u{10FFFF}]+)?|[.0-:A-Fa-f]+)\])?)(:\d*)?[/?]|[!$&-.0-;=?-Z_a-z~-\u{10FFFF}])(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~-\u{10FFFF}])*|(\/((%[0-9A-Fa-f]{2}|[!$&-.0-9;=A-Z_a-z~-\u{10FFFF}])+|(\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~-\u{10FFFF}]+)?|[.0-:A-Fa-f]+)\])?)(:\d*)?)?))#(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~-\u{10FFFF}])*|(([A-Za-z][+\-.0-9A-Za-z]*)?%[0-9A-Fa-f]{2}|[!$&-.0-9;=@_~-\u{10FFFF}]|[A-Za-z][+\-.0-9A-Za-z]*[!$&-*,;=@_~-\u{10FFFF}])(%[0-9A-Fa-f]{2}|[!$&-.0-9;=@-Z_a-z~-\u{10FFFF}])*((([/?](%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~-\u{10FFFF}])*)?#|[/?])(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~-\u{10FFFF}])*)?|([A-Za-z][+\-.0-9A-Za-z]*(:%[0-9A-Fa-f]{2}|:[!$&-.0-;=?-Z_a-z~-\u{10FFFF}]|[/?])|\?)(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~-\u{10FFFF}])*|([A-Za-z][+\-.0-9A-Za-z]*:)?\/((%[0-9A-Fa-f]{2}|\/((%[0-9A-Fa-f]{2}|[!$&-.0-9;=A-Z_a-z~-\u{10FFFF}])+|(\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~-\u{10FFFF}]+)?|[.0-:A-Fa-f]+)\])?)(:\d*)?[/?]|[!$&-.0-;=?-Z_a-z~-\u{10FFFF}])(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~-\u{10FFFF}])*|\/((%[0-9A-Fa-f]{2}|[!$&-.0-9;=A-Z_a-z~-\u{10FFFF}])+(:\d*)?|(\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~-\u{10FFFF}]+)?|[.0-:A-Fa-f]+)\])?:\d*|\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~-\u{10FFFF}]+)?|[.0-:A-Fa-f]+)\])?)?|[A-Za-z][+\-.0-9A-Za-z]*:?)?$/u,uuid:/^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$/i,"uri-template":/(%[0-9a-f]{2}|[!#$&(-;=?@\[\]_a-z~]|\{[!#&+,./;=?@|]?(%[0-9a-f]{2}|[0-9_a-z])(\.?(%[0-9a-f]{2}|[0-9_a-z]))*(:[1-9]\d{0,3}|\*)?(,(%[0-9a-f]{2}|[0-9_a-z])(\.?(%[0-9a-f]{2}|[0-9_a-z]))*(:[1-9]\d{0,3}|\*)?)*\})*/iu,"json-pointer":/^(\/([\x00-\x2e0-@\[-}\x7f]|~[01])*)*$/iu,"relative-json-pointer":/^\d+(#|(\/([\x00-\x2e0-@\[-}\x7f]|~[01])*)*)$/iu,hostname:/^(?=.{1,255}$)[0-9A-Za-z](?:(?:[0-9A-Za-z]|-){0,61}[0-9A-Za-z])?(?:\.[0-9A-Za-z](?:(?:[0-9A-Za-z]|-){0,61}[0-9A-Za-z])?)*\.?$/,"host-name":/^(?=.{1,255}$)[0-9A-Za-z](?:(?:[0-9A-Za-z]|-){0,61}[0-9A-Za-z])?(?:\.[0-9A-Za-z](?:(?:[0-9A-Za-z]|-){0,61}[0-9A-Za-z])?)*\.?$/,"utc-millisec":function(e){return"string"==typeof e&&parseFloat(e)===parseInt(e,10)&&!isNaN(e)},regex:function(e){var t=!0;try{new RegExp(e)}catch(e){t=!1}return t},style:/[\r\n\t ]*[^\r\n\t ][^:]*:[\r\n\t ]*[^\r\n\t ;]*[\r\n\t ]*;?/,color:/^(#?([0-9A-Fa-f]{3}){1,2}\b|aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow|(rgb\(\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*\))|(rgb\(\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*\)))$/,phone:/^\+(?:[0-9] ?){6,14}[0-9]$/,alpha:/^[a-zA-Z]+$/,alphanumeric:/^[a-zA-Z0-9]+$/};l.regexp=l.regex,l.pattern=l.regex,l.ipv4=l["ip-address"],t.isFormat=function(e,t,r){if("string"==typeof e&&void 0!==l[t]){if(l[t]instanceof RegExp)return l[t].test(e);
2if("function"==typeof l[t])return l[t](e)}else if(r&&r.customFormats&&"function"==typeof r.customFormats[t])return r.customFormats[t](e);return!0};var f=t.makeSuffix=function(e){return(e=e.toString()).match(/[.\s\[\]]/)||e.match(/^[\d]/)?e.match(/^\d+$/)?"["+e+"]":"["+JSON.stringify(e)+"]":"."+e};function h(e,t,r,n){"object"==typeof r?t[n]=m(e[n],r):-1===e.indexOf(r)&&t.push(r)}function d(e,t,r){t[r]=e[r]}function p(e,t,r,n){"object"==typeof t[n]&&t[n]&&e[n]?r[n]=m(e[n],t[n]):r[n]=t[n]}function m(e,t){var r=Array.isArray(t),n=r&&[]||{};return r?(e=e||[],n=n.concat(e),t.forEach(h.bind(null,e,n))):(e&&"object"==typeof e&&Object.keys(e).forEach(d.bind(null,e,n)),Object.keys(t).forEach(p.bind(null,e,t,n))),n}function g(e){return"/"+encodeURIComponent(e).replace(/~/g,"%7E")}t.deepCompareStrict=function e(t,r){if(typeof t!=typeof r)return!1;if(Array.isArray(t))return!!Array.isArray(r)&&t.length===r.length&&t.every(function(n,i){return e(t[i],r[i])});if("object"==typeof t){if(!t||!r)return t===r;var n=Object.keys(t),i=Object.keys(r);return n.length===i.length&&n.every(function(n){return e(t[n],r[n])})}return t===r},e.exports.deepMerge=m,t.objectGetPath=function(e,t){for(var r,n=t.split("/").slice(1);"string"==typeof(r=n.shift());){var i=decodeURIComponent(r.replace(/~0/,"~").replace(/~1/g,"/"));if(!(i in e))return;e=e[i]}return e},t.encodePath=function(e){return e.map(g).join("")},t.getDecimalPlaces=function(e){var t=0;if(isNaN(e))return t;"number"!=typeof e&&(e=Number(e));var r=e.toString().split("e");if(2===r.length){if("-"!==r[1][0])return t;t=Number(r[1].slice(1))}var n=r[0].split(".");return 2===n.length&&(t+=n[1].length),t},t.isSchema=function(e){return"object"==typeof e&&e||"boolean"==typeof e}},67552:function(e,t,r){"use strict";var n=e.exports.Validator=r(8283);e.exports.ValidatorResult=r(16329).ValidatorResult,e.exports.ValidatorResultError=r(16329).ValidatorResultError,e.exports.ValidationError=r(16329).ValidationError,e.exports.SchemaError=r(16329).SchemaError,e.exports.SchemaScanResult=r(91684).SchemaScanResult,e.exports.scan=r(91684).scan,e.exports.validate=function(e,t,r){return new n().validate(e,t,r)}},91684:function(e,t,r){"use strict";var n=r(93813),i=r(16329);function o(e,t){this.id=e,this.ref=t}e.exports.SchemaScanResult=o,e.exports.scan=function(e,t){function r(e,t){if(t&&"object"==typeof t){if(t.$ref){var o=n.resolve(e,t.$ref);u[o]=u[o]?u[o]+1:0;return}var l=t.$id||t.id,f=l?n.resolve(e,l):e;if(f){if(0>f.indexOf("#")&&(f+="#"),c[f]){if(!i.deepCompareStrict(c[f],t))throw Error("Schema <"+f+"> already exists with different definition");return c[f]}c[f]=t,"#"==f[f.length-1]&&(c[f.substring(0,f.length-1)]=t)}a(f+"/items",Array.isArray(t.items)?t.items:[t.items]),a(f+"/extends",Array.isArray(t.extends)?t.extends:[t.extends]),r(f+"/additionalItems",t.additionalItems),s(f+"/properties",t.properties),r(f+"/additionalProperties",t.additionalProperties),s(f+"/definitions",t.definitions),s(f+"/patternProperties",t.patternProperties),s(f+"/dependencies",t.dependencies),a(f+"/disallow",t.disallow),a(f+"/allOf",t.allOf),a(f+"/anyOf",t.anyOf),a(f+"/oneOf",t.oneOf),r(f+"/not",t.not)}}function a(e,t){if(Array.isArray(t))for(var n=0;n<t.length;n++)r(e+"/"+n,t[n])}function s(e,t){if(t&&"object"==typeof t)for(var n in t)r(e+"/"+n,t[n])}var c={},u={};return r(e,t),new o(c,u)}},8283:function(e,t,r){"use strict";var n=r(93813),i=r(40082),o=r(16329),a=r(91684).scan,s=o.ValidatorResult,c=o.ValidatorResultError,u=o.SchemaError,l=o.SchemaContext,f=function e(){this.customFormats=Object.create(e.prototype.customFormats),this.schemas={},this.unresolvedRefs=[],this.types=Object.create(d),this.attributes=Object.create(i.validators)};function h(e){var t="string"==typeof e?e:e.$ref;return"string"==typeof t&&t}f.prototype.customFormats={},f.prototype.schemas=null,f.prototype.types=null,f.prototype.attributes=null,f.prototype.unresolvedRefs=null,f.prototype.addSchema=function(e,t){var r=this;if(!e)return null;var n=a(t||"/",e),i=t||e.$id||e.id;for(var o in n.id)this.schemas[o]=n.id[o];for(var o in n.ref)this.unresolvedRefs.push(o);return this.unresolvedRefs=this.unresolvedRefs.filter(function(e){return void 0===r.schemas[e]}),this.schemas[i]},f.prototype.addSubSchemaArray=function(e,t){if(Array.isArray(t))for(var r=0;r<t.length;r++)this.addSubSchema(e,t[r])},f.prototype.addSubSchemaObject=function(e,t){if(t&&"object"==typeof t)for(var r in t)this.addSubSchema(e,t[r])},f.prototype.setSchemas=function(e){this.schemas=e},f.prototype.getSchema=function(e){return this.schemas[e]},f.prototype.validate=function(e,t,r,i){if("boolean"!=typeof t&&"object"!=typeof t||null===t)throw new u("Expected `schema` to be an object or boolean");r||(r={});var o=t.$id||t.id,f=n.resolve(r.base||"/",o||"");if(!i){(i=new l(t,r,[],f,Object.create(this.schemas))).schemas[f]||(i.schemas[f]=t);var h=a(f,t);for(var d in h.id){var p=h.id[d];i.schemas[d]=p}}if(r.required&&void 0===e){var m=new s(e,t,r,i);return m.addError("is required, but is undefined"),m}var m=this.validateSchema(e,t,r,i);if(m){if(r.throwAll&&m.errors.length)throw new c(m)}else throw Error("Result undefined");return m},f.prototype.validateSchema=function(e,t,r,n){var a=new s(e,t,r,n);if("boolean"==typeof t)!0===t?t={}:!1===t&&(t={type:[]});else if(!t)throw Error("schema is undefined");if(t.extends){if(Array.isArray(t.extends)){var c={schema:t,ctx:n};t.extends.forEach(this.schemaTraverser.bind(this,c)),t=c.schema,c.schema=null,c.ctx=null,c=null}else t=o.deepMerge(t,this.superResolve(t.extends,n))}var f=h(t);
2if(f){var d=this.resolve(t,f,n),p=new l(d.subschema,r,n.path,d.switchSchema,n.schemas);return this.validateSchema(e,d.subschema,r,p)}var m=r&&r.skipAttributes||[];for(var g in t)if(!i.ignoreProperties[g]&&0>m.indexOf(g)){var y=null,b=this.attributes[g];if(b)y=b.call(this,e,t,r,n);else if(!1===r.allowUnknownAttributes)throw new u("Unsupported attribute: "+g,t);y&&a.importErrors(y)}if("function"==typeof r.rewrite){var v=r.rewrite.call(this,e,t,r,n);a.instance=v}return a},f.prototype.schemaTraverser=function(e,t){e.schema=o.deepMerge(e.schema,this.superResolve(t,e.ctx))},f.prototype.superResolve=function(e,t){var r=h(e);return r?this.resolve(e,r,t).subschema:e},f.prototype.resolve=function(e,t,r){if(t=r.resolve(t),r.schemas[t])return{subschema:r.schemas[t],switchSchema:t};var i=n.parse(t),a=i&&i.hash,s=a&&a.length&&t.substr(0,t.length-a.length);if(!s||!r.schemas[s])throw new u("no such schema <"+t+">",e);var c=o.objectGetPath(r.schemas[s],a.substr(1));if(void 0===c)throw new u("no such schema "+a+" located in <"+s+">",e);return{subschema:c,switchSchema:t}},f.prototype.testType=function(e,t,r,n,i){if(void 0!==i){if(null===i)throw new u('Unexpected null in "type" keyword');if("function"==typeof this.types[i])return this.types[i].call(this,e);if(i&&"object"==typeof i){var o=this.validateSchema(e,i,r,n);return void 0===o||!(o&&o.errors.length)}return!0}};var d=f.prototype.types={};d.string=function(e){return"string"==typeof e},d.number=function(e){return"number"==typeof e&&isFinite(e)},d.integer=function(e){return"number"==typeof e&&e%1==0},d.boolean=function(e){return"boolean"==typeof e},d.array=function(e){return Array.isArray(e)},d.null=function(e){return null===e},d.date=function(e){return e instanceof Date},d.any=function(e){return!0},d.object=function(e){return e&&"object"==typeof e&&!Array.isArray(e)&&!(e instanceof Date)},e.exports=f},35079:function(e,t,r){"use strict";var n=r(82957).Buffer,i=r(25566);Object.defineProperty(t,"__esModule",{value:!0}),t.InvalidStatusCodeError=t.InvalidCertError=void 0;let o=Object.freeze({redirect:!0,expectStatusCode:200,headers:{},full:!1,keepAlive:!0,cors:!1,referrer:!1,sslAllowSelfSigned:!1,_redirectCount:0});class a extends Error{constructor(e,t){super(e),this.fingerprint256=t}}t.InvalidCertError=a;class s extends Error{constructor(e){super(`Request Failed. Status Code: ${e}`),this.statusCode=e}}function c(e,t){if(!t||"text"===t||"json"===t)try{let r=new TextDecoder("utf8",{fatal:!0}).decode(e);if("text"===t)return r;try{return JSON.parse(r)}catch(e){if("json"===t)throw e;return r}}catch(e){if("text"===t||"json"===t)throw e}return e}t.InvalidStatusCodeError=s;let u={},l=new Set(["Accept","Accept-Language","Content-Language","Content-Type"].map(e=>e.toLowerCase())),f=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(e=>e.toLowerCase()));async function h(e,t){let r={...o,...t},n=new Headers;"json"===r.type&&n.set("Content-Type","application/json");let i=new URL(e);if(i.username){let e=btoa(`${i.username}:${i.password}`);n.set("Authorization",`Basic ${e}`),i.username="",i.password=""}for(let t in e=""+i,r.headers){let e=t.toLowerCase();(l.has(e)||r.cors&&!f.has(e))&&n.set(t,r.headers[t])}let a={headers:n,redirect:r.redirect?"follow":"manual"};r.referrer||(a.referrerPolicy="no-referrer"),r.cors&&(a.mode="cors"),r.data&&(r.method||(a.method="POST"),a.body="json"===r.type?JSON.stringify(r.data):r.data);let u=await fetch(e,a);if(r.expectStatusCode&&u.status!==r.expectStatusCode)throw new s(u.status);let h=c(new Uint8Array(await u.arrayBuffer()),r.type);return r.full?{headers:Object.fromEntries(u.headers.entries()),status:u.status,body:h}:h}let d=!!("object"==typeof i&&i.versions&&i.versions.node&&i.versions.v8);t.default=function(e,t){return(d?function e(t,i){let l={...o,...i},f=r(12251),h=r(51983),d=r(64581),{promisify:p}=r(85508),{resolve:m}=r(93813),g=!!/^https/.test(t),y={method:l.method||"GET",headers:{"Accept-Encoding":"gzip, deflate, br"}},b=e=>e.replace(/:| /g,"").toLowerCase();if(l.keepAlive){let e=[g,g&&l.sslPinnedCertificates?.map(e=>b(e)).sort()].join();y.agent=u[e]||(u[e]=new(g?h:f).Agent({keepAlive:!0,keepAliveMsecs:3e4,maxFreeSockets:1024,maxCachedSessions:1024}))}"json"===l.type&&(y.headers["Content-Type"]="application/json"),l.data&&(l.method||(y.method="POST"),y.body="json"===l.type?JSON.stringify(l.data):l.data),y.headers={...y.headers,...l.headers},l.sslAllowSelfSigned&&(y.rejectUnauthorized=!1);let v=async r=>{let i=r.statusCode;if(l.redirect&&300<=i&&i<400&&r.headers.location){if(10==l._redirectCount)throw Error("Request failed. Too much redirects.");return l._redirectCount+=1,await e(m(t,r.headers.location),l)}if(l.expectStatusCode&&i!==l.expectStatusCode)throw r.resume(),new s(i);let o=[];for await(let e of r)o.push(e);let a=n.concat(o),u=r.headers["content-encoding"];"br"===u&&(a=await p(d.brotliDecompress)(a)),("gzip"===u||"deflate"===u)&&(a=await p(d.unzip)(a));let f=c(a,l.type);return l.full?{headers:r.headers,status:i,body:f}:f};return new Promise((r,n)=>{let i=async r=>{if(r&&"DEPTH_ZERO_SELF_SIGNED_CERT"===r.code)try{await e(t,{...l,sslAllowSelfSigned:!0,sslPinnedCertificates:[]})}catch(e){e&&e.fingerprint256&&(r=new a(`Self-signed SSL certificate: ${e.fingerprint256}`,e.fingerprint256))}n(r)},o=(g?h:f).request(t,y,e=>{e.on("error",i),(async()=>{try{r(await v(e))}catch(e){n(e)}})()});o.on("error",i);let s=l.sslPinnedCertificates?.map(e=>b(e)),c=e=>{let t=b(e.getPeerCertificate()?.fingerprint256||"");if(!(!t&&e.isSessionReused())&&!s.includes(t))return o.emit("error",new a(`Invalid SSL certificate: ${t} Expected: ${s}`,t)),o.abort()};l.sslPinnedCertificates&&o.on("socket",e=>{e.listeners("secureConnect").map(e=>(e.name||"").replace("bound ","")).includes("mfetchSecureConnect")||e.on("secureConnect",c.bind(null,e))}),l.keepAlive&&o.setNoDelay(!0),y.body&&o.write(y.body),o.end()})}:h)(e,t)}},86705:function(e){"use strict";e.exports=function(){return Object.assign}},64581:function(e,t,r){var n=r(82957).Buffer,i=r(25566);!function(){"use strict";var t={742:function(e,t,r){var o=r(491),a=r(562),s=r(450),c=r(324),u=r(320);for(var l in u)t[l]=u[l];function f(e){if("number"!=typeof e||e<t.DEFLATE||e>t.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=e,this.strategy=0,this.windowBits=0,this.write_in_progress=!1,this.pending_close=!1,this.gzip_id_bytes_read=0}t.NONE=0,t.DEFLATE=1,t.INFLATE=2,t.GZIP=3,t.GUNZIP=4,t.DEFLATERAW=5,t.INFLATERAW=6,t.UNZIP=7,f.prototype.close=function(){if(this.write_in_progress){this.pending_close=!0;return}this.pending_close=!1,o(this.init_done,"close before init"),o(this.mode<=t.UNZIP),this.mode===t.DEFLATE||this.mode===t.GZIP||this.mode===t.DEFLATERAW?s.deflateEnd(this.strm):(this.mode===t.INFLATE||this.mode===t.GUNZIP||this.mode===t.INFLATERAW||this.mode===t.UNZIP)&&c.inflateEnd(this.strm),this.mode=t.NONE,this.dictionary=null},f.prototype.write=function(e,t,r,n,i,o,a){return this._write(!0,e,t,r,n,i,o,a)},f.prototype.writeSync=function(e,t,r,n,i,o,a){return this._write(!1,e,t,r,n,i,o,a)},f.prototype._write=function(e,r,a,s,c,u,l,f){if(o.equal(arguments.length,8),o(this.init_done,"write before init"),o(this.mode!==t.NONE,"already finalized"),o.equal(!1,this.write_in_progress,"write already in progress"),o.equal(!1,this.pending_close,"close is pending"),this.write_in_progress=!0,o.equal(!1,void 0===r,"must provide flush value"),this.write_in_progress=!0,r!==t.Z_NO_FLUSH&&r!==t.Z_PARTIAL_FLUSH&&r!==t.Z_SYNC_FLUSH&&r!==t.Z_FULL_FLUSH&&r!==t.Z_FINISH&&r!==t.Z_BLOCK)throw Error("Invalid flush value");if(null==a&&(a=n.alloc(0),c=0,s=0),this.strm.avail_in=c,this.strm.input=a,this.strm.next_in=s,this.strm.avail_out=f,this.strm.output=u,this.strm.next_out=l,this.flush=r,!e)return(this._process(),this._checkError())?this._afterSync():void 0;var h=this;return i.nextTick(function(){h._process(),h._after()}),this},f.prototype._afterSync=function(){var e=this.strm.avail_out,t=this.strm.avail_in;return this.write_in_progress=!1,[t,e]},f.prototype._process=function(){var e=null;switch(this.mode){case t.DEFLATE:case t.GZIP:case t.DEFLATERAW:this.err=s.deflate(this.strm,this.flush);break;case t.UNZIP:switch(this.strm.avail_in>0&&(e=this.strm.next_in),this.gzip_id_bytes_read){case 0:if(null===e)break;if(31===this.strm.input[e]){if(this.gzip_id_bytes_read=1,e++,1===this.strm.avail_in)break}else{this.mode=t.INFLATE;break}case 1:if(null===e)break;139===this.strm.input[e]?(this.gzip_id_bytes_read=2,this.mode=t.GUNZIP):this.mode=t.INFLATE;break;default:throw Error("invalid number of gzip magic number bytes read")}case t.INFLATE:case t.GUNZIP:case t.INFLATERAW:for(this.err=c.inflate(this.strm,this.flush),this.err===t.Z_NEED_DICT&&this.dictionary&&(this.err=c.inflateSetDictionary(this.strm,this.dictionary),this.err===t.Z_OK?this.err=c.inflate(this.strm,this.flush):this.err===t.Z_DATA_ERROR&&(this.err=t.Z_NEED_DICT));this.strm.avail_in>0&&this.mode===t.GUNZIP&&this.err===t.Z_STREAM_END&&0!==this.strm.next_in[0];)this.reset(),this.err=c.inflate(this.strm,this.flush);break;default:throw Error("Unknown mode "+this.mode)}}
2,f.prototype._checkError=function(){switch(this.err){case t.Z_OK:case t.Z_BUF_ERROR:if(0!==this.strm.avail_out&&this.flush===t.Z_FINISH)return this._error("unexpected end of file"),!1;break;case t.Z_STREAM_END:break;case t.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},f.prototype._after=function(){if(this._checkError()){var e=this.strm.avail_out,t=this.strm.avail_in;this.write_in_progress=!1,this.callback(t,e),this.pending_close&&this.close()}},f.prototype._error=function(e){this.strm.msg&&(e=this.strm.msg),this.onerror(e,this.err),this.write_in_progress=!1,this.pending_close&&this.close()},f.prototype.init=function(e,r,n,i,a){o(4==arguments.length||5==arguments.length,"init(windowBits, level, memLevel, strategy, [dictionary])"),o(e>=8&&e<=15,"invalid windowBits"),o(r>=-1&&r<=9,"invalid compression level"),o(n>=1&&n<=9,"invalid memlevel"),o(i===t.Z_FILTERED||i===t.Z_HUFFMAN_ONLY||i===t.Z_RLE||i===t.Z_FIXED||i===t.Z_DEFAULT_STRATEGY,"invalid strategy"),this._init(r,e,n,i,a),this._setDictionary()},f.prototype.params=function(){throw Error("deflateParams Not supported")},f.prototype.reset=function(){this._reset(),this._setDictionary()},f.prototype._init=function(e,r,n,i,o){switch(this.level=e,this.windowBits=r,this.memLevel=n,this.strategy=i,this.flush=t.Z_NO_FLUSH,this.err=t.Z_OK,(this.mode===t.GZIP||this.mode===t.GUNZIP)&&(this.windowBits+=16),this.mode===t.UNZIP&&(this.windowBits+=32),(this.mode===t.DEFLATERAW||this.mode===t.INFLATERAW)&&(this.windowBits=-1*this.windowBits),this.strm=new a,this.mode){case t.DEFLATE:case t.GZIP:case t.DEFLATERAW:this.err=s.deflateInit2(this.strm,this.level,t.Z_DEFLATED,this.windowBits,this.memLevel,this.strategy);break;case t.INFLATE:case t.GUNZIP:case t.INFLATERAW:case t.UNZIP:this.err=c.inflateInit2(this.strm,this.windowBits);break;default:throw Error("Unknown mode "+this.mode)}this.err!==t.Z_OK&&this._error("Init error"),this.dictionary=o,this.write_in_progress=!1,this.init_done=!0},f.prototype._setDictionary=function(){if(null!=this.dictionary){switch(this.err=t.Z_OK,this.mode){case t.DEFLATE:case t.DEFLATERAW:this.err=s.deflateSetDictionary(this.strm,this.dictionary)}this.err!==t.Z_OK&&this._error("Failed to set dictionary")}},f.prototype._reset=function(){switch(this.err=t.Z_OK,this.mode){case t.DEFLATE:case t.DEFLATERAW:case t.GZIP:this.err=s.deflateReset(this.strm);break;case t.INFLATE:case t.INFLATERAW:case t.GUNZIP:this.err=c.inflateReset(this.strm)}this.err!==t.Z_OK&&this._error("Failed to reset stream")},t.Zlib=f},23:function(e,t,r){var n=r(300).Buffer,o=r(781).Transform,a=r(742),s=r(837),c=r(491).ok,u=r(300).kMaxLength,l="Cannot create final Buffer. It would be larger than 0x"+u.toString(16)+" bytes";a.Z_MIN_WINDOWBITS=8,a.Z_MAX_WINDOWBITS=15,a.Z_DEFAULT_WINDOWBITS=15,a.Z_MIN_CHUNK=64,a.Z_MAX_CHUNK=1/0,a.Z_DEFAULT_CHUNK=16384,a.Z_MIN_MEMLEVEL=1,a.Z_MAX_MEMLEVEL=9,a.Z_DEFAULT_MEMLEVEL=8,a.Z_MIN_LEVEL=-1,a.Z_MAX_LEVEL=9,a.Z_DEFAULT_LEVEL=a.Z_DEFAULT_COMPRESSION;for(var f=Object.keys(a),h=0;h<f.length;h++){var d=f[h];d.match(/^Z/)&&Object.defineProperty(t,d,{enumerable:!0,value:a[d],writable:!1})}for(var p={Z_OK:a.Z_OK,Z_STREAM_END:a.Z_STREAM_END,Z_NEED_DICT:a.Z_NEED_DICT,Z_ERRNO:a.Z_ERRNO,Z_STREAM_ERROR:a.Z_STREAM_ERROR,Z_DATA_ERROR:a.Z_DATA_ERROR,Z_MEM_ERROR:a.Z_MEM_ERROR,Z_BUF_ER
2ROR:a.Z_BUF_ERROR,Z_VERSION_ERROR:a.Z_VERSION_ERROR},m=Object.keys(p),g=0;g<m.length;g++){var y=m[g];p[p[y]]=y}function b(e,t,r){var i=[],o=0;function a(){for(var t;null!==(t=e.read());)i.push(t),o+=t.length;e.once("readable",a)}function s(){var t,a=null;o>=u?a=RangeError(l):t=n.concat(i,o),i=[],e.close(),r(a,t)}e.on("error",function(t){e.removeListener("end",s),e.removeListener("readable",a),r(t)}),e.on("end",s),e.end(t),a()}function v(e,t){if("string"==typeof t&&(t=n.from(t)),!n.isBuffer(t))throw TypeError("Not a string or buffer");var r=e._finishFlushFlag;return e._processChunk(t,r)}function E(e){if(!(this instanceof E))return new E(e);k.call(this,e,a.DEFLATE)}function w(e){if(!(this instanceof w))return new w(e);k.call(this,e,a.INFLATE)}function _(e){if(!(this instanceof _))return new _(e);k.call(this,e,a.GZIP)}function x(e){if(!(this instanceof x))return new x(e);k.call(this,e,a.GUNZIP)}function S(e){if(!(this instanceof S))return new S(e);k.call(this,e,a.DEFLATERAW)}function A(e){if(!(this instanceof A))return new A(e);k.call(this,e,a.INFLATERAW)}function P(e){if(!(this instanceof P))return new P(e);k.call(this,e,a.UNZIP)}function I(e){return e===a.Z_NO_FLUSH||e===a.Z_PARTIAL_FLUSH||e===a.Z_SYNC_FLUSH||e===a.Z_FULL_FLUSH||e===a.Z_FINISH||e===a.Z_BLOCK}function k(e,r){var i=this;if(this._opts=e=e||{},this._chunkSize=e.chunkSize||t.Z_DEFAULT_CHUNK,o.call(this,e),e.flush&&!I(e.flush))throw Error("Invalid flush flag: "+e.flush);if(e.finishFlush&&!I(e.finishFlush))throw Error("Invalid flush flag: "+e.finishFlush);if(this._flushFlag=e.flush||a.Z_NO_FLUSH,this._finishFlushFlag=void 0!==e.finishFlush?e.finishFlush:a.Z_FINISH,e.chunkSize&&(e.chunkSize<t.Z_MIN_CHUNK||e.chunkSize>t.Z_MAX_CHUNK))throw Error("Invalid chunk size: "+e.chunkSize);if(e.windowBits&&(e.windowBits<t.Z_MIN_WINDOWBITS||e.windowBits>t.Z_MAX_WINDOWBITS))throw Error("Invalid windowBits: "+e.windowBits);if(e.level&&(e.level<t.Z_MIN_LEVEL||e.level>t.Z_MAX_LEVEL))throw Error("Invalid compression level: "+e.level);if(e.memLevel&&(e.memLevel<t.Z_MIN_MEMLEVEL||e.memLevel>t.Z_MAX_MEMLEVEL))throw Error("Invalid memLevel: "+e.memLevel);if(e.strategy&&e.strategy!=t.Z_FILTERED&&e.strategy!=t.Z_HUFFMAN_ONLY&&e.strategy!=t.Z_RLE&&e.strategy!=t.Z_FIXED&&e.strategy!=t.Z_DEFAULT_STRATEGY)throw Error("Invalid strategy: "+e.strategy);if(e.dictionary&&!n.isBuffer(e.dictionary))throw Error("Invalid dictionary: it should be a Buffer instance");this._handle=new a.Zlib(r);var s=this;this._hadError=!1,this._handle.onerror=function(e,r){T(s),s._hadError=!0;var n=Error(e);n.errno=r,n.code=t.codes[r],s.emit("error",n)};var c=t.Z_DEFAULT_COMPRESSION;"number"==typeof e.level&&(c=e.level);var u=t.Z_DEFAULT_STRATEGY;"number"==typeof e.strategy&&(u=e.strategy),this._handle.init(e.windowBits||t.Z_DEFAULT_WINDOWBITS,c,e.memLevel||t.Z_DEFAULT_MEMLEVEL,u,e.dictionary),this._buffer=n.allocUnsafe(this._chunkSize),this._offset=0,this._level=c,this._strategy=u,this.once("end",this.close),Object.defineProperty(this,"_closed",{get:function(){return!i._handle},configurable:!0,enumerable:!0})}function T(e,t){t&&i.nextTick(t),e._handle&&(e._handle.close(),e._handle=null)}function R(e){e.emit("close")}Object.defineProperty(t,"codes",{enumerable:!0,value:Object.freeze(p),writable:!1}),t.Deflate=E,t.Inflate=w,t.Gzip=_,t.Gunzip=x,t.DeflateRaw=S,t.InflateRaw=A,t.Unzip=P,t.createDeflate=function(e){return new E(e)},t.createInflate=function(e){return new w(e)},t.createDeflateRaw=function(e){return new S(e)},t.createInflateRaw=function(e){return new A(e)},t.createGzip=function(e){return new _(e)},t.createGunzip=function(e){return new x(e)},t.createUnzip=function(e){return new P(e)},t.deflate=function(e,t,r){return"function"==typeof t&&(r=t,t={}),b(new E(t),e,r)},t.deflateSync=function(e,t){return v(new E(t),e)},t.gzip=function(e,t,r){return"function"==typeof t&&(r=t,t={}),b(new _(t),e,r)},t.gzipSync=function(e,t){return v(new _(t),e)},t.deflateRaw=function(e,t,r){return"function"==typeof t&&(r=t,t={}),b(new S(t),e,r)},t.deflateRawSync=function(e,t){return v(new S(t),e)},t.unzip=function(e,t,r){return"function"==typeof t&&(r=t,t={}),b(new P(t),e,r)},t.unzipSync=function(e,t){return v(new P(t),e)},t.inflate=function(e,t,r){return"function"==typeof t&&(r=t,t={}),b(new w(t),e,r)},t.inflateSync=function(e,t){return v(new w(t),e)},t.gunzip=function(e,t,r){return"function"==typeof t&&(r=t,t={}),b(new x(t),e,r)},t.gunzipSync=function(e,t){return v(new x(t),e)},t.inflateRaw=function(e,t,r){return"function"==typeof t&&(r=t,t={}),b(new A(t),e,r)},t.inflateRawSync=function(e,t){return v(new A(t),e)},s.inherits(k,o),k.prototype.params=function(e,r,n){if(e<t.Z_MIN_LEVEL||e>t.Z_MAX_LEVEL)throw RangeError("Invalid compression level: "+e);if(r!=t.Z_FILTERED&&r!=t.Z_HUFFMAN_ONLY&&r!=t.Z_RLE&&r!=t.Z_FIXED&&r!=t.Z_DEFAULT_STRATEGY)throw TypeError("Invalid strategy: "+r);if(this._level!==e||this._strategy!==r){var o=this;this.flush(a.Z_SYNC_FLUSH,function(){c(o._handle,"zlib binding closed"),o._handle.params(e,r),!o._hadError&&(o._level=e,o._strategy=r,n&&n())})}else i.nextTick(n)},k.prototype.reset=function(){return c(this._handle,"zlib binding closed"),this._handle.reset()},k.prototype._flush=function(e){this._transform(n.alloc(0),"",e)},k.prototype.flush=function(e,t){var r=this,o=this._writableState;"function"!=typeof e&&(void 0!==e||t)||(t=e,e=a.Z_FULL_FLUSH),o.ended?t&&i.nextTick(t):o.ending?t&&this.once("end",t):o.needDrain?t&&this.once("drain",function(){return r.flush(e,t)}):(this._flushFlag=e,this.write(n.alloc(0),"",t))},k.prototype.close=function(e){T(this,e),i.nextTick(R,this)},k.prototype._transform=function(e,t,r){var i,o=this._writableState,s=(o.ending||o.ended)&&(!e||o.length===e.length);return null===e||n.isBuffer(e)?this._handle?void(s?i=this._finishFlushFlag:(i=this._flushFlag,e.length>=o.length&&(this._flushFlag=this._opts.flush||a.Z_NO_FLUSH)),this._processChunk(e,i,r)):r(Error("zlib binding closed")):r(Error("invalid input"))},k.prototype._processChunk=function(e,t,r){var i=e&&e.length,o=this._chunkSize-this._offset,a=0,s=this,f="function"==typeof r;if(!f){var h,d=[],p=0;this.on("error",function(e){h=e}),c(this._handle,"zlib binding closed");do var m=this._handle.writeSync(t,e,a,i,this._buffer,this._offset,o);while(!this._hadError&&b(m[0],m[1]));if(this._hadError)throw h;if(p>=u)throw T(this),RangeError(l);var g=n.concat(d,p);return T(this),g}c(this._handle,"zlib binding closed");var y=this._handle.write(t,e,a,i,this._buffer,this._offset,o);function b(u,l){if(this&&(this.buffer=null,this.callback=null),!s._hadError){var h=o-l;if(c(h>=0,"have should not go down"),h>0){var m=s._buffer.slice(s._offset,s._offset+h);s._offset+=h,f?s.push(m):(d.push(m),p+=m.length)}if((0===l||s._offset>=s._chunkSize)&&(o=s._chunkSize,s._offset=0,s._buffer=n.allocUnsafe(s._chunkSize)),0===l){if(a+=i-u,i=u,!f)return!0;var g=s._handle.write(t,e,a,i,s._buffer,s._offset,s._chunkSize);return g.callback=b,void(g.buffer=e)}if(!f)return!1;r()}}y.buffer=e,y.callback=b},s.inherits(E,k),s.inherits(w,k),s.inherits(_,k),s.inherits(x,k),s.inherits(S,k),s.inherits(A,k),s.inherits(P,k)},380:function(e,t){var r="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;t.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1
2);t.length;){var r=t.shift();if(r){if("object"!=typeof r)throw TypeError(r+"must be non-object");for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}}return e},t.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var n={arraySet:function(e,t,r,n,i){if(t.subarray&&e.subarray){e.set(t.subarray(r,r+n),i);return}for(var o=0;o<n;o++)e[i+o]=t[r+o]},flattenChunks:function(e){var t,r,n,i,o,a;for(t=0,n=0,r=e.length;t<r;t++)n+=e[t].length;for(t=0,a=new Uint8Array(n),i=0,r=e.length;t<r;t++)o=e[t],a.set(o,i),i+=o.length;return a}},i={arraySet:function(e,t,r,n,i){for(var o=0;o<n;o++)e[i+o]=t[r+o]},flattenChunks:function(e){return[].concat.apply([],e)}};t.setTyped=function(e){e?(t.Buf8=Uint8Array,t.Buf16=Uint16Array,t.Buf32=Int32Array,t.assign(t,n)):(t.Buf8=Array,t.Buf16=Array,t.Buf32=Array,t.assign(t,i))},t.setTyped(r)},496:function(e){e.exports=function(e,t,r,n){for(var i=65535&e|0,o=e>>>16&65535|0,a=0;0!==r;){a=r>2e3?2e3:r,r-=a;do o=o+(i=i+t[n++]|0)|0;while(--a);i%=65521,o%=65521}return i|o<<16|0}},320:function(e){e.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},307:function(e){var t=function(){for(var e,t=[],r=0;r<256;r++){e=r;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[r]=e}return t}();e.exports=function(e,r,n,i){var o=i+n;e^=-1;for(var a=i;a<o;a++)e=e>>>8^t[(e^r[a])&255];return -1^e}},450:function(e,t,r){var n,i=r(380),o=r(842),a=r(496),s=r(307),c=r(31);function u(e,t){return e.msg=c[t],t}function l(e){return(e<<1)-(e>4?9:0)}function f(e){for(var t=e.length;--t>=0;)e[t]=0}function h(e){var t=e.state,r=t.pending;r>e.avail_out&&(r=e.avail_out),0!==r&&(i.arraySet(e.output,t.pending_buf,t.pending_out,r,e.next_out),e.next_out+=r,t.pending_out+=r,e.total_out+=r,e.avail_out-=r,t.pending-=r,0===t.pending&&(t.pending_out=0))}function d(e,t){o._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,h(e.strm)}function p(e,t){e.pending_buf[e.pending++]=t}function m(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function g(e,t){var r,n,i=e.max_chain_length,o=e.strstart,a=e.prev_length,s=e.nice_match,c=e.strstart>e.w_size-262?e.strstart-(e.w_size-262):0,u=e.window,l=e.w_mask,f=e.prev,h=e.strstart+258,d=u[o+a-1],p=u[o+a];e.prev_length>=e.good_match&&(i>>=2),s>e.lookahead&&(s=e.lookahead);do{if(u[(r=t)+a]!==p||u[r+a-1]!==d||u[r]!==u[o]||u[++r]!==u[o+1])continue;o+=2,r++;do;while(u[++o]===u[++r]&&u[++o]===u[++r]&&u[++o]===u[++r]&&u[++o]===u[++r]&&u[++o]===u[++r]&&u[++o]===u[++r]&&u[++o]===u[++r]&&u[++o]===u[++r]&&o<h);if(n=258-(h-o),o=h-258,n>a){if(e.match_start=t,a=n,n>=s)break;d=u[o+a-1],p=u[o+a]}}while((t=f[t&l])>c&&0!=--i);return a<=e.lookahead?a:e.lookahead}function y(e){var t,r,n,o,c,u=e.w_size;do{if(o=e.window_size-e.lookahead-e.strstart,e.strstart>=u+(u-262)){i.arraySet(e.window,e.window,u,u,0),e.match_start-=u,e.strstart-=u,e.block_start-=u,t=r=e.hash_size;do n=e.head[--t],e.head[t]=n>=u?n-u:0;while(--r);t=r=u;do n=e.prev[--t],e.prev[t]=n>=u?n-u:0;while(--r);o+=u}if(0===e.strm.avail_in)break;if(r=function(e,t,r,n){var o=e.avail_in;return(o>n&&(o=n),0===o)?0:(e.avail_in-=o,i.arraySet(t,e.input,e.next_in,o,r),1===e.state.wrap?e.adler=a(e.adler,t,o,r):2===e.state.wrap&&(e.adler=s(e.adler,t,o,r)),e.next_in+=o,e.total_in+=o,o)}(e.strm,e.window,e.strstart+e.lookahead,o),e.lookahead+=r,e.lookahead+e.insert>=3)for(c=e.strstart-e.insert,e.ins_h=e.window[c],e.ins_h=(e.ins_h<<e.hash_shift^e.window[c+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[c+3-1])&e.hash_mask,e.prev[c&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=c,c++,e.insert--,!(e.lookahead+e.insert<3)););}while(e.lookahead<262&&0!==e.strm.avail_in)}function b(e,t){for(var r,n;;){if(e.lookahead<262){if(y(e),e.lookahead<262&&0===t)return 1;if(0===e.lookahead)break}if(r=0,e.lookahead>=3&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==r&&e.strstart-r<=e.w_size-262&&(e.match_length=g(e,r)),e.match_length>=3){if(n=o._tr_tally(e,e.strstart-e.match_start,e.match_length-3),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=3){e.match_length--;do e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart;while(0!=--e.match_length);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+1])&e.hash_mask}
2else n=o._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(n&&(d(e,!1),0===e.strm.avail_out))return 1}return(e.insert=e.strstart<2?e.strstart:2,4===t)?(d(e,!0),0===e.strm.avail_out)?3:4:e.last_lit&&(d(e,!1),0===e.strm.avail_out)?1:2}function v(e,t){for(var r,n,i;;){if(e.lookahead<262){if(y(e),e.lookahead<262&&0===t)return 1;if(0===e.lookahead)break}if(r=0,e.lookahead>=3&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=2,0!==r&&e.prev_length<e.max_lazy_match&&e.strstart-r<=e.w_size-262&&(e.match_length=g(e,r),e.match_length<=5&&(1===e.strategy||3===e.match_length&&e.strstart-e.match_start>4096)&&(e.match_length=2)),e.prev_length>=3&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-3,n=o._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=i&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart);while(0!=--e.prev_length);if(e.match_available=0,e.match_length=2,e.strstart++,n&&(d(e,!1),0===e.strm.avail_out))return 1}else if(e.match_available){if((n=o._tr_tally(e,0,e.window[e.strstart-1]))&&d(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return 1}else e.match_available=1,e.strstart++,e.lookahead--}return(e.match_available&&(n=o._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<2?e.strstart:2,4===t)?(d(e,!0),0===e.strm.avail_out)?3:4:e.last_lit&&(d(e,!1),0===e.strm.avail_out)?1:2}function E(e,t,r,n,i){this.good_length=e,this.max_lazy=t,this.nice_length=r,this.max_chain=n,this.func=i}function w(){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 i.Buf16(1146),this.dyn_dtree=new i.Buf16(122),this.bl_tree=new i.Buf16(78),f(this.dyn_ltree),f(this.dyn_dtree),f(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new i.Buf16(16),this.heap=new i.Buf16(573),f(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new i.Buf16(573),f(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 _(e){var t;return e&&e.state?(e.total_in=e.total_out=0,e.data_type=2,(t=e.state).pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?42:113,e.adler=2===t.wrap?0:1,t.last_flush=0,o._tr_init(t),0):u(e,-2)}function x(e){var t,r=_(e);return 0===r&&((t=e.state).window_size=2*t.w_size,f(t.head),t.max_lazy_match=n[t.level].max_lazy,t.good_match=n[t.level].good_length,t.nice_match=n[t.level].nice_length,t.max_chain_length=n[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),r}function S(e,t,r,n,o,a){if(!e)return -2;var s=1;if(-1===t&&(t=6),n<0?(s=0,n=-n):n>15&&(s=2,n-=16),o<1||o>9||8!==r||n<8||n>15||t<0||t>9||a<0||a>4)return u(e,-2);8===n&&(n=9);var c=new w;return e.state=c,c.strm=e,c.wrap=s,c.gzhead=null,c.w_bits=n,c.w_size=1<<c.w_bits,c.w_mask=c.w_size-1,c.hash_bits=o+7,c.hash_size=1<<c.hash_bits,c.hash_mask=c.hash_size-1,c.hash_shift=~~((c.hash_bits+3-1)/3),c.window=new i.Buf8(2*c.w_size),c.head=new i.Buf16(c.hash_size),c.prev=new i.Buf16(c.w_size),c.lit_bufsize=1<<o+6,c.pending_buf_size=4*c.lit_bufsize,c.pending_buf=new i.Buf8(c.pending_buf_size),c.d_buf=1*c.lit_bufsize,c.l_buf=3*c.lit_bufsize,c.level=t,c.strategy=a,c.method=r,x(e)}n=[new E(0,0,0,0,function(e,t){var r=65535;for(65535>e.pending_buf_size-5&&(r=e.pending_buf_size-5);;){if(e.lookahead<=1){if(y(e),0===e.lookahead&&0===t)return 1;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var n=e.block_start+r;if((0===e.strstart||e.strstart>=n)&&(e.lookahead=e.strstart-n,e.strstart=n,d(e,!1),0===e.strm.avail_out)||e.strstart-e.block_start>=e.w_size-262&&(d(e,!1),0===e.strm.avail_out))return 1}return(e.insert=0,4===t)?(d(e,!0),0===e.strm.avail_out)?3:4:(e.strstart>e.block_start&&(d(e,!1),e.strm.avail_out),1)}),new E(4,4,8,4,b),new E(4,5,16,8,b),new E(4,6,32,32,b),new E(4,4,16,16,v),new E(8,16,32,32,v),new E(8,16,128,128,v),new E(8,32,128,256,v),new E(32,128,258,1024,v),new E(32,258,258,4096,v)],t.deflateInit=function(e,t){return S(e,t,8,15,8,0)},t.deflateInit2=S,t.deflateReset=x,t.deflateResetKeep=_,t.deflateSetHeader=function(e,t){return e&&e.state&&2===e.state.wrap?(e.state.gzhead=t,0):-2},t.deflate=function(e,t){if(!e||!e.state||t>5||t<0)return e?u(e,-2):-2;if(i=e.state,!e.output||!e.input&&0!==e.avail_in||666===i.status&&4!==t)return u(e,0===e.avail_out?-5:-2);if(i.strm=e,r=i.last_flush,i.last_flush=t,42===i.status){if(2===i.wrap)e.adler=0,p(i,31),p(i,139),p(i,8),i.gzhead?(p(i,(i.gzhead.text?1:0)+(i.gzhead.hcrc?2:0)+(i.gzhead.extra?4:0)+(i.gzhead.name?8:0)+(i.gzhead.comment?16:0)),p(i,255&i.gzhead.time),p(i,i.gzhead.time>>8&255),p(i,i.gzhead.time>>16&255),p(i,i.gzhead.time>>24&255),p(i,9===i.level?2:i.strategy>=2||i.level<2?4:0),p(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(p(i,255&i.gzhead.extra.length),p(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(e.adler=s(e.adler,i.pending_buf,i.pending,0)),i.gz
vendor: 5,179 bytes, line 2
2index=0,i.status=69):(p(i,0),p(i,0),p(i,0),p(i,0),p(i,0),p(i,9===i.level?2:i.strategy>=2||i.level<2?4:0),p(i,3),i.status=113);else{var r,i,a,c,g=8+(i.w_bits-8<<4)<<8;g|=(i.strategy>=2||i.level<2?0:i.level<6?1:6===i.level?2:3)<<6,0!==i.strstart&&(g|=32),g+=31-g%31,i.status=113,m(i,g),0!==i.strstart&&(m(i,e.adler>>>16),m(i,65535&e.adler)),e.adler=1}}if(69===i.status){if(i.gzhead.extra){for(a=i.pending;i.gzindex<(65535&i.gzhead.extra.length)&&(i.pending!==i.pending_buf_size||(i.gzhead.hcrc&&i.pending>a&&(e.adler=s(e.adler,i.pending_buf,i.pending-a,a)),h(e),a=i.pending,i.pending!==i.pending_buf_size));)p(i,255&i.gzhead.extra[i.gzindex]),i.gzindex++;i.gzhead.hcrc&&i.pending>a&&(e.adler=s(e.adler,i.pending_buf,i.pending-a,a)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=73)}else i.status=73}if(73===i.status){if(i.gzhead.name){a=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>a&&(e.adler=s(e.adler,i.pending_buf,i.pending-a,a)),h(e),a=i.pending,i.pending===i.pending_buf_size)){c=1;break}c=i.gzindex<i.gzhead.name.length?255&i.gzhead.name.charCodeAt(i.gzindex++):0,p(i,c)}while(0!==c);i.gzhead.hcrc&&i.pending>a&&(e.adler=s(e.adler,i.pending_buf,i.pending-a,a)),0===c&&(i.gzindex=0,i.status=91)}else i.status=91}if(91===i.status){if(i.gzhead.comment){a=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>a&&(e.adler=s(e.adler,i.pending_buf,i.pending-a,a)),h(e),a=i.pending,i.pending===i.pending_buf_size)){c=1;break}c=i.gzindex<i.gzhead.comment.length?255&i.gzhead.comment.charCodeAt(i.gzindex++):0,p(i,c)}while(0!==c);i.gzhead.hcrc&&i.pending>a&&(e.adler=s(e.adler,i.pending_buf,i.pending-a,a)),0===c&&(i.status=103)}else i.status=103}if(103===i.status&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&h(e),i.pending+2<=i.pending_buf_size&&(p(i,255&e.adler),p(i,e.adler>>8&255),e.adler=0,i.status=113)):i.status=113),0!==i.pending){if(h(e),0===e.avail_out)return i.last_flush=-1,0}else if(0===e.avail_in&&l(t)<=l(r)&&4!==t)return u(e,-5);if(666===i.status&&0!==e.avail_in)return u(e,-5);if(0!==e.avail_in||0!==i.lookahead||0!==t&&666!==i.status){var b=2===i.strategy?function(e,t){for(var r;;){if(0===e.lookahead&&(y(e),0===e.lookahead)){if(0===t)return 1;break}if(e.match_length=0,r=o._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,r&&(d(e,!1),0===e.strm.avail_out))return 1}return(e.insert=0,4===t)?(d(e,!0),0===e.strm.avail_out)?3:4:e.last_lit&&(d(e,!1),0===e.strm.avail_out)?1:2}(i,t):3===i.strategy?function(e,t){for(var r,n,i,a,s=e.window;;){if(e.lookahead<=258){if(y(e),e.lookahead<=258&&0===t)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=3&&e.strstart>0&&(n=s[i=e.strstart-1])===s[++i]&&n===s[++i]&&n===s[++i]){a=e.strstart+258;do;while(n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&i<a);e.match_length=258-(a-i),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=3?(r=o._tr_tally(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(r=o._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),r&&(d(e,!1),0===e.strm.avail_out))return 1}return(e.insert=0,4===t)?(d(e,!0),0===e.strm.avail_out)?3:4:e.last_lit&&(d(e,!1),0===e.strm.avail_out)?1:2}(i,t):n[i.level].func(i,t);if((3===b||4===b)&&(i.status=666),1===b||3===b)return 0===e.avail_out&&(i.last_flush=-1),0;if(2===b&&(1===t?o._tr_align(i):5!==t&&(o._tr_stored_block(i,0,0,!1),3===t&&(f(i.head),0===i.lookahead&&(i.strstart=0,i.block_start=0,i.insert=0))),h(e),0===e.avail_out))return i.last_flush=-1,0}return 4!==t?0:i.wrap<=0?1:(2===i.wrap?(p(i,255&e.adler),p(i,e.adler>>8&255),p(i,e.adler>>16&255),p(i,e.adler>>24&255),p(i,255&e.total_in),p(i,e.total_in>>8&255),p(i,e.total_in>>16&255),p(i,e.total_in>>24&255)):(m(i,e.adler>>>16),m(i,65535&e.adler)),h(e),i.wrap>0&&(i.wrap=-i.wrap),0!==i.pending?0:1)},t.deflateEnd=function(e){var t;return e&&e.state?42!==(t=e.state.status)&&69!==t&&73!==t&&91!==t&&103!==t&&113!==t&&666!==t?u(e,-2):(e.state=null,113===t?u(e,-3):0):-2},t.deflateSetDictionary=function(e,t){var r,n,o,s,c,u,l,h,d=t.length;if(!e||!e.state||2===(s=(r=e.state).wrap)||1===s&&42!==r.status||r.lookahead)return -2;for(1===s&&(e.adler=a(e.adler,t,d,0)),r.wrap=0,d>=r.w_size&&(0===s&&(f(r.head),r.strstart=0,r.block_start=0,r.insert=0),h=new i.Buf8(r.w_size),i.arraySet(h,t,d-r.w_size,r.w_size,0),t=h,d=r.w_size),c=e.avail_in,u=e.next_in,l=e.input,e.avail_in=d,e.next_in=0,e.input=t,y(r);r.lookahead>=3;){n=r.strstart,o=r.lookahead-2;do r.ins_h=(r.ins_h<<r.hash_shift^r.window[n+3-1])&r.hash_mask,r.prev[n&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=n,n++;while(--o);r.strstart=n,r.lookahead=2,y(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=2,r.match_available=0,e.next_in=u,e.input=l,e.avail_in=c,r.wrap=s,0},t.deflateInfo="pako deflate (from Nodeca project)"},333:function(e){e.exports=function(e,t){var r,n,i,o,a,s,c,u,l,f,h,d,p,m,g,y,b,v,E,w,_,x,S,A,P;r=e.state,n=e.next_in,A=e.input,i=n+(e.avail_in-5),o=e.next_out,P=e.output,a=o-(t-e.avail_out),s=o+(e.avail_out-257),c=r.dmax,u=r.wsize,l=r.
2whave,f=r.wnext,h=r.window,d=r.hold,p=r.bits,m=r.lencode,g=r.distcode,y=(1<<r.lenbits)-1,b=(1<<r.distbits)-1;e:do for(p<15&&(d+=A[n++]<<p,p+=8,d+=A[n++]<<p,p+=8),v=m[d&y];;){if(d>>>=E=v>>>24,p-=E,0==(E=v>>>16&255))P[o++]=65535&v;else if(16&E)for(w=65535&v,(E&=15)&&(p<E&&(d+=A[n++]<<p,p+=8),w+=d&(1<<E)-1,d>>>=E,p-=E),p<15&&(d+=A[n++]<<p,p+=8,d+=A[n++]<<p,p+=8),v=g[d&b];;){if(d>>>=E=v>>>24,p-=E,16&(E=v>>>16&255)){if(_=65535&v,p<(E&=15)&&(d+=A[n++]<<p,(p+=8)<E&&(d+=A[n++]<<p,p+=8)),(_+=d&(1<<E)-1)>c){e.msg="invalid distance too far back",r.mode=30;break e}if(d>>>=E,p-=E,_>(E=o-a)){if((E=_-E)>l&&r.sane){e.msg="invalid distance too far back",r.mode=30;break e}if(x=0,S=h,0===f){if(x+=u-E,E<w){w-=E;do P[o++]=h[x++];while(--E);x=o-_,S=P}}else if(f<E){if(x+=u+f-E,(E-=f)<w){w-=E;do P[o++]=h[x++];while(--E);if(x=0,f<w){w-=E=f;do P[o++]=h[x++];while(--E);x=o-_,S=P}}}else if(x+=f-E,E<w){w-=E;do P[o++]=h[x++];while(--E);x=o-_,S=P}for(;w>2;)P[o++]=S[x++],P[o++]=S[x++],P[o++]=S[x++],w-=3;w&&(P[o++]=S[x++],w>1&&(P[o++]=S[x++]))}else{x=o-_;do P[o++]=P[x++],P[o++]=P[x++],P[o++]=P[x++],w-=3;while(w>2);w&&(P[o++]=P[x++],w>1&&(P[o++]=P[x++]))}}else if((64&E)==0){v=g[(65535&v)+(d&(1<<E)-1)];continue}else{e.msg="invalid distance code",r.mode=30;break e}break}else if((64&E)==0){v=m[(65535&v)+(d&(1<<E)-1)];continue}else if(32&E){r.mode=12;break e}else{e.msg="invalid literal/length code",r.mode=30;break e}break}while(n<i&&o<s);n-=w=p>>3,p-=w<<3,d&=(1<<p)-1,e.next_in=n,e.next_out=o,e.avail_in=n<i?5+(i-n):5-(n-i),e.avail_out=o<s?257+(s-o):257-(o-s),r.hold=d,r.bits=p}},324:function(e,t,r){var n,i,o=r(380),a=r(496),s=r(307),c=r(333),u=r(19);function l(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function f(){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 o.Buf16(320),this.work=new o.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function h(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=1,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new o.Buf32(852),t.distcode=t.distdyn=new o.Buf32(592),t.sane=1,t.back=-1,0):-2}function d(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,h(e)):-2}function p(e,t){var r,n;return e&&e.state?(n=e.state,t<0?(r=0,t=-t):(r=(t>>4)+1,t<48&&(t&=15)),t&&(t<8||t>15))?-2:(null!==n.window&&n.wbits!==t&&(n.window=null),n.wrap=r,n.wbits=t,d(e)):-2}function m(e,t){var r,n;return e?(n=new f,e.state=n,n.window=null,0!==(r=p(e,t))&&(e.state=null),r):-2}var g=!0;function y(e,t,r,n){var i,a=e.state;return null===a.window&&(a.wsize=1<<a.wbits,a.wnext=0,a.whave=0,a.window=new o.Buf8(a.wsize)),n>=a.wsize?(o.arraySet(a.window,t,r-a.wsize,a.wsize,0),a.wnext=0,a.whave=a.wsize):((i=a.wsize-a.wnext)>n&&(i=n),o.arraySet(a.window,t,r-n,i,a.wnext),(n-=i)?(o.arraySet(a.window,t,r-n,n,0),a.wnext=n,a.whave=a.wsize):(a.wnext+=i,a.wnext===a.wsize&&(a.wnext=0),a.whave<a.wsize&&(a.whave+=i))),0}t.inflateReset=d,t.inflateReset2=p,t.inflateResetKeep=h,t.inflateInit=function(e){return m(e,15)},t.inflateInit2=m,t.inflate=function(e,t){var r,f,h,d,p,m,b,v,E,w,_,x,S,A,P,I,k,T,R,B,O,C,N,L,F=0,M=new o.Buf8(4),D=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&0!==e.avail_in)return -2;12===(r=e.state).mode&&(r.mode=13),p=e.next_out,h=e.output,b=e.avail_out,d=e.next_in,f=e.input,m=e.avail_in,v=r.hold,E=r.bits,w=m,_=b,C=0;e:for(;;)switch(r.mode){case 1:if(0===r.wrap){r.mode=13;break}for(;E<16;){if(0===m)break e;m--,v+=f[d++]<<E,E+=8}if(2&r.wrap&&35615===v){r.check=0,M[0]=255&v,M[1]=v>>>8&255,r.check=s(r.check,M,2,0),v=0,E=0,r.mode=2;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&v)<<8)+(v>>8))%31){e.msg="incorrect header check",r.mode=30;break}if((15&v)!=8){e.msg="unknown compression method",r.mode=30;break}if(v>>>=4,E-=4,O=(15&v)+8,0===r.wbits)r.wbits=O;else if(O>r.wbits){e.msg="invalid window size",r.mode=30;break}r.dmax=1<<O,e.adler=r.check=1,r.mode=512&v?10:12,v=0,E=0;break;case 2:for(;E<16;){if(0===m)break e;m--,v+=f[d++]<<E,E+=8}if(r.flags=v,(255&r.flags)!=8){e.msg="unknown compression method",r.mode=30;break}if(57344&r.flags){e.msg="unknown header flags set",r.mode=30;break}r.head&&(r.head.text=v>>8&1),512&r.flags&&(M[0]=255&v,M[1]=v>>>8&255,r.check=s(r.check,M,2,0)),v=0,E=0,r.mode=3;case 3:for(;E<32;){if(0===m)break e;m--,v+=f[d++]<<E,E+=8}r.head&&(r.head.time=v),512&r.flags&&(M[0]=255&v,M[1]=v>>>8&255,M[2]=v>>>16&255,M[3]=v>>>24&255,r.check=s(r.check,M,4,0)),v=0,E=0,r.mode=4;case 4:for(;E<16;){if(0===m)break e;m--,v+=f[d++]<<E,E+=8}r.head&&(r.head.xflags=255&v,r.head.os=v>>8),512&r.flags&&(M[0]=255&v,M[1]=v>>>8&255,r.check=s(r.check,M,2,0)),v=0,E=0,r.mode=5;case 5:if(1024&r.flags){for(;E<16;){if(0===m)break e;m--,v+=f[d++]<<E,E+=8}r.length=v,r.head&&(r.head.extra_len=v),512&r.flags&&(M[0]=255&v,M[1]=v>>>8&255,r.check=s(r.check,M,2,0)),v=0,E=0}else r.head&&(r.head.extra=null);r.mode=6;case 6:if(1024&r.flags&&((x=r.length)>m&&(x=m),x&&(r.head&&(O=r.head.extra_len-r.length,r.head.extra||(r.head.extra=Array(r.head.extra_len)),o.arraySet(r.head.extra,f,d,x,O)),512&r.flags&&(r.check=s(r.check,f,x,d)),m-=x,d+=x,r.length-=x),r.length))break e;r.length=0,r.mode=7;case 7:if(2048&r.flags){if(0===m)break e;x=0;do O=f[d+x++],r.head&&O&&r.length<65536&&(r.head.name+=String.fromCharCode(O));while(O&&x<m);if(512&r.flags&&(r.check=s(r.check,f,x,d)),m-=x,d+=x,O)break e}else r.head&&(r.head.name=null);r.length=0,r.mode=8;case 8:if(4096&r.flags){if(0===m)break e;x=0;do O=f[d+x++],r.head&&O&&r.length<65536&&(r.head.comment+=String.fromCharCode(O));while(O&&x<m);if(512&r.flags&&(r.check=s(r.check,f,x,d)),m-=x,d+=x,O)break e}else r.head&&(r.head.comment=null);r.mode=9;case 9:if(512&r.flags){for(;E<16;){if(0===m)break e;m--,v+=f[d++]<<E,E+=8}if(v!==(65535&r.check)){e.msg="header crc mismatch",r.mode=30;break}v=0,E=0}r.head&&(r.head.hcrc=r.flags>>9&1,r.head.done=!0),e.adler=r.check=0,r.mode=12;break;case 10:for(;E<32;){if(0===m)break e;m--,v+=f[d++]<<E,E+=8}e.adler=r.check=l(v),v=0,E=0,r.mode=11;case 11:if(0===r.havedict)return e.next_out=p,e.avail_out=b,e.next_in=d,e.avail_in=m,r.hold=v,r.bits=E,2;e.adler=r.check=1,r.mode=12;case 12:if(5===t||6===t)break e;case 13:if(r.last){v>>>=7&E,E-=7&E,r.mode=27;break}for(;E<3;){if(0===m)break e;m--,v+=f[d++]<<E,E+=8}switch(r.last=1&v,E-=1,3&(v>>>=1)){case 0:r.mode=14;break;case 1:if(function(e){if(g){var t;for(n=new o.Buf32(512),i=new o.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(u(1,e.lens,0,288,n,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;u(2,e.lens,0,32,i,0,e.work,{bits:5}),g=!1}
vendor: 3,886 bytes, line 2
2e.lencode=n,e.lenbits=9,e.distcode=i,e.distbits=5}(r),r.mode=20,6===t){v>>>=2,E-=2;break e}break;case 2:r.mode=17;break;case 3:e.msg="invalid block type",r.mode=30}v>>>=2,E-=2;break;case 14:for(v>>>=7&E,E-=7&E;E<32;){if(0===m)break e;m--,v+=f[d++]<<E,E+=8}if((65535&v)!=(v>>>16^65535)){e.msg="invalid stored block lengths",r.mode=30;break}if(r.length=65535&v,v=0,E=0,r.mode=15,6===t)break e;case 15:r.mode=16;case 16:if(x=r.length){if(x>m&&(x=m),x>b&&(x=b),0===x)break e;o.arraySet(h,f,d,x,p),m-=x,d+=x,b-=x,p+=x,r.length-=x;break}r.mode=12;break;case 17:for(;E<14;){if(0===m)break e;m--,v+=f[d++]<<E,E+=8}if(r.nlen=(31&v)+257,v>>>=5,E-=5,r.ndist=(31&v)+1,v>>>=5,E-=5,r.ncode=(15&v)+4,v>>>=4,E-=4,r.nlen>286||r.ndist>30){e.msg="too many length or distance symbols",r.mode=30;break}r.have=0,r.mode=18;case 18:for(;r.have<r.ncode;){for(;E<3;){if(0===m)break e;m--,v+=f[d++]<<E,E+=8}r.lens[D[r.have++]]=7&v,v>>>=3,E-=3}for(;r.have<19;)r.lens[D[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,N={bits:r.lenbits},C=u(0,r.lens,0,19,r.lencode,0,r.work,N),r.lenbits=N.bits,C){e.msg="invalid code lengths set",r.mode=30;break}r.have=0,r.mode=19;case 19:for(;r.have<r.nlen+r.ndist;){for(;P=(F=r.lencode[v&(1<<r.lenbits)-1])>>>24,I=F>>>16&255,k=65535&F,!(P<=E);){if(0===m)break e;m--,v+=f[d++]<<E,E+=8}if(k<16)v>>>=P,E-=P,r.lens[r.have++]=k;else{if(16===k){for(L=P+2;E<L;){if(0===m)break e;m--,v+=f[d++]<<E,E+=8}if(v>>>=P,E-=P,0===r.have){e.msg="invalid bit length repeat",r.mode=30;break}O=r.lens[r.have-1],x=3+(3&v),v>>>=2,E-=2}else if(17===k){for(L=P+3;E<L;){if(0===m)break e;m--,v+=f[d++]<<E,E+=8}v>>>=P,E-=P,O=0,x=3+(7&v),v>>>=3,E-=3}else{for(L=P+7;E<L;){if(0===m)break e;m--,v+=f[d++]<<E,E+=8}v>>>=P,E-=P,O=0,x=11+(127&v),v>>>=7,E-=7}if(r.have+x>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=30;break}for(;x--;)r.lens[r.have++]=O}}if(30===r.mode)break;if(0===r.lens[256]){e.msg="invalid code -- missing end-of-block",r.mode=30;break}if(r.lenbits=9,N={bits:r.lenbits},C=u(1,r.lens,0,r.nlen,r.lencode,0,r.work,N),r.lenbits=N.bits,C){e.msg="invalid literal/lengths set",r.mode=30;break}if(r.distbits=6,r.distcode=r.distdyn,N={bits:r.distbits},C=u(2,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,N),r.distbits=N.bits,C){e.msg="invalid distances set",r.mode=30;break}if(r.mode=20,6===t)break e;case 20:r.mode=21;case 21:if(m>=6&&b>=258){e.next_out=p,e.avail_out=b,e.next_in=d,e.avail_in=m,r.hold=v,r.bits=E,c(e,_),p=e.next_out,h=e.output,b=e.avail_out,d=e.next_in,f=e.input,m=e.avail_in,v=r.hold,E=r.bits,12===r.mode&&(r.back=-1);break}for(r.back=0;P=(F=r.lencode[v&(1<<r.lenbits)-1])>>>24,I=F>>>16&255,k=65535&F,!(P<=E);){if(0===m)break e;m--,v+=f[d++]<<E,E+=8}if(I&&(240&I)==0){for(T=P,R=I,B=k;P=(F=r.lencode[B+((v&(1<<T+R)-1)>>T)])>>>24,I=F>>>16&255,k=65535&F,!(T+P<=E);){if(0===m)break e;m--,v+=f[d++]<<E,E+=8}v>>>=T,E-=T,r.back+=T}if(v>>>=P,E-=P,r.back+=P,r.length=k,0===I){r.mode=26;break}if(32&I){r.back=-1,r.mode=12;break}if(64&I){e.msg="invalid literal/length code",r.mode=30;break}r.extra=15&I,r.mode=22;case 22:if(r.extra){for(L=r.extra;E<L;){if(0===m)break e;m--,v+=f[d++]<<E,E+=8}r.length+=v&(1<<r.extra)-1,v>>>=r.extra,E-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=23;case 23:for(;P=(F=r.distcode[v&(1<<r.distbits)-1])>>>24,I=F>>>16&255,k=65535&F,!(P<=E);){if(0===m)break e;m--,v+=f[d++]<<E,E+=8}if((240&I)==0){for(T=P,R=I,B=k;P=(F=r.distcode[B+((v&(1<<T+R)-1)>>T)])>>>24,I=F>>>16&255,k=65535&F,!(T+P<=E);){if(0===m)break e;m--,v+=f[d++]<<E,E+=8}v>>>=T,E-=T,r.back+=T}if(v>>>=P,E-=P,r.back+=P,64&I){e.msg="invalid distance code",r.mode=30;break}r.offset=k,r.extra=15&I,r.mode=24;case 24:if(r.extra){for(L=r.extra;E<L;){if(0===m)break e;m--,v+=f[d++]<<E,E+=8}r.offset+=v&(1<<r.extra)-1,v>>>=r.extra,E-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){e.msg="invalid distance too far back",r.mode=30;break}r.mode=25;case 25:if(0===b)break e;if(x=_-b,r.offset>x){if((x=r.offset-x)>
2r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=30;break}x>r.wnext?(x-=r.wnext,S=r.wsize-x):S=r.wnext-x,x>r.length&&(x=r.length),A=r.window}else A=h,S=p-r.offset,x=r.length;x>b&&(x=b),b-=x,r.length-=x;do h[p++]=A[S++];while(--x);0===r.length&&(r.mode=21);break;case 26:if(0===b)break e;h[p++]=r.length,b--,r.mode=21;break;case 27:if(r.wrap){for(;E<32;){if(0===m)break e;m--,v|=f[d++]<<E,E+=8}if(_-=b,e.total_out+=_,r.total+=_,_&&(e.adler=r.check=r.flags?s(r.check,h,_,p-_):a(r.check,h,_,p-_)),_=b,(r.flags?v:l(v))!==r.check){e.msg="incorrect data check",r.mode=30;break}v=0,E=0}r.mode=28;case 28:if(r.wrap&&r.flags){for(;E<32;){if(0===m)break e;m--,v+=f[d++]<<E,E+=8}if(v!==(4294967295&r.total)){e.msg="incorrect length check",r.mode=30;break}v=0,E=0}r.mode=29;case 29:C=1;break e;case 30:C=-3;break e;case 31:return -4;default:return -2}return(e.next_out=p,e.avail_out=b,e.next_in=d,e.avail_in=m,r.hold=v,r.bits=E,(r.wsize||_!==e.avail_out&&r.mode<30&&(r.mode<27||4!==t))&&y(e,e.output,e.next_out,_-e.avail_out))?(r.mode=31,-4):(w-=e.avail_in,_-=e.avail_out,e.total_in+=w,e.total_out+=_,r.total+=_,r.wrap&&_&&(e.adler=r.check=r.flags?s(r.check,h,_,e.next_out-_):a(r.check,h,_,e.next_out-_)),e.data_type=r.bits+(r.last?64:0)+(12===r.mode?128:0)+(20===r.mode||15===r.mode?256:0),(0===w&&0===_||4===t)&&0===C&&(C=-5),C)},t.inflateEnd=function(e){if(!e||!e.state)return -2;var t=e.state;return t.window&&(t.window=null),e.state=null,0},t.inflateGetHeader=function(e,t){var r;return e&&e.state&&(2&(r=e.state).wrap)!=0?(r.head=t,t.done=!1,0):-2},t.inflateSetDictionary=function(e,t){var r,n=t.length;return e&&e.state&&(0===(r=e.state).wrap||11===r.mode)?11===r.mode&&a(1,t,n,0)!==r.check?-3:y(e,t,n,n)?(r.mode=31,-4):(r.havedict=1,0):-2},t.inflateInfo="pako inflate (from Nodeca project)"},19:function(e,t,r){var n=r(380),i=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],o=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],a=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],s=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];e.exports=function(e,t,r,c,u,l,f,h){var d,p,m,g,y,b,v,E,w,_=h.bits,x=0,S=0,A=0,P=0,I=0,k=0,T=0,R=0,B=0,O=0,C=null,N=0,L=new n.Buf16(16),F=new n.Buf16(16),M=null,D=0;for(x=0;x<=15;x++)L[x]=0;for(S=0;S<c;S++)L[t[r+S]]++;for(P=15,I=_;P>=1&&0===L[P];P--);if(I>P&&(I=P),0===P)return u[l++]=20971520,u[l++]=20971520,h.bits=1,0;for(A=1;A<P&&0===L[A];A++);for(I<A&&(I=A),R=1,x=1;x<=15;x++)if(R<<=1,(R-=L[x])<0)return -1;if(R>0&&(0===e||1!==P))return -1;for(x=1,F[1]=0;x<15;x++)F[x+1]=F[x]+L[x];for(S=0;S<c;S++)0!==t[r+S]&&(f[F[t[r+S]]++]=S);if(0===e?(C=M=f,b=19):1===e?(C=i,N-=257,M=o,D-=257,b=256):(C=a,M=s,b=-1),O=0,S=0,x=A,y=l,k=I,T=0,m=-1,g=(B=1<<I)-1,1===e&&B>852||2===e&&B>592)return 1;for(;;){v=x-T,f[S]<b?(E=0,w=f[S]):f[S]>b?(E=M[D+f[S]],w=C[N+f[S]]):(E=96,w=0),d=1<<x-T,A=p=1<<k;do u[y+(O>>T)+(p-=d)]=v<<24|E<<16|w|0;while(0!==p);for(d=1<<x-1;O&d;)d>>=1;if(0!==d?(O&=d-1,O+=d):O=0,S++,0==--L[x]){if(x===P)break;x=t[r+f[S]]}if(x>I&&(O&g)!==m){for(0===T&&(T=I),y+=A,R=1<<(k=x-T);k+T<P&&!((R-=L[k+T])<=0);)k++,R<<=1;if(B+=1<<k,1===e&&B>852||2===e&&B>592)return 1;u[m=O&g]=I<<24|k<<16|y-l|0}}return 0!==O&&(u[y+O]=x-T<<24|4194304),h.bits=I,0}},31:function(e){e.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},842:function(e,t,r){var n,i,o,a=r(380);function s(e){for(var t=e.length;--t>=0;)e[t]=0}var c=[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],u=[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],l=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],f=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],h=Array(576);s(h);var d=Array(60);s(d);var p=Array(512);s(p);var m=Array(256);s(m);var g=Array(29);s(g);var y=Array(30);function b(e,t,r,n,i){this.static_tree=e,this.extra_bits=t,this.extra_base=r,this.elems=n,this.max_length=i,this.has_stree=e&&e.length}function v(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function E(e){return e<256?p[e]:p[256+(e>>>7)]}
2function w(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function _(e,t,r){e.bi_valid>16-r?(e.bi_buf|=t<<e.bi_valid&65535,w(e,e.bi_buf),e.bi_buf=t>>16-e.bi_valid,e.bi_valid+=r-16):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=r)}function x(e,t,r){_(e,r[2*t],r[2*t+1])}function S(e,t){var r=0;do r|=1&e,e>>>=1,r<<=1;while(--t>0);return r>>>1}function A(e,t,r){var n,i,o=Array(16),a=0;for(n=1;n<=15;n++)o[n]=a=a+r[n-1]<<1;for(i=0;i<=t;i++){var s=e[2*i+1];0!==s&&(e[2*i]=S(o[s]++,s))}}function P(e){var t;for(t=0;t<286;t++)e.dyn_ltree[2*t]=0;for(t=0;t<30;t++)e.dyn_dtree[2*t]=0;for(t=0;t<19;t++)e.bl_tree[2*t]=0;e.dyn_ltree[512]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function I(e){e.bi_valid>8?w(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function k(e,t,r,n){var i=2*t,o=2*r;return e[i]<e[o]||e[i]===e[o]&&n[t]<=n[r]}function T(e,t,r){for(var n=e.heap[r],i=r<<1;i<=e.heap_len&&(i<e.heap_len&&k(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!k(t,n,e.heap[i],e.depth));)e.heap[r]=e.heap[i],r=i,i<<=1;e.heap[r]=n}function R(e,t,r){var n,i,o,a,s=0;if(0!==e.last_lit)do n=e.pending_buf[e.d_buf+2*s]<<8|e.pending_buf[e.d_buf+2*s+1],i=e.pending_buf[e.l_buf+s],s++,0===n?x(e,i,t):(x(e,(o=m[i])+256+1,t),0!==(a=c[o])&&_(e,i-=g[o],a),x(e,o=E(--n),r),0!==(a=u[o])&&_(e,n-=y[o],a));while(s<e.last_lit);x(e,256,t)}function B(e,t){var r,n,i,o=t.dyn_tree,a=t.stat_desc.static_tree,s=t.stat_desc.has_stree,c=t.stat_desc.elems,u=-1;for(r=0,e.heap_len=0,e.heap_max=573;r<c;r++)0!==o[2*r]?(e.heap[++e.heap_len]=u=r,e.depth[r]=0):o[2*r+1]=0;for(;e.heap_len<2;)o[2*(i=e.heap[++e.heap_len]=u<2?++u:0)]=1,e.depth[i]=0,e.opt_len--,s&&(e.static_len-=a[2*i+1]);for(t.max_code=u,r=e.heap_len>>1;r>=1;r--)T(e,o,r);i=c;do r=e.heap[1],e.heap[1]=e.heap[e.heap_len--],T(e,o,1),n=e.heap[1],e.heap[--e.heap_max]=r,e.heap[--e.heap_max]=n,o[2*i]=o[2*r]+o[2*n],e.depth[i]=(e.depth[r]>=e.depth[n]?e.depth[r]:e.depth[n])+1,o[2*r+1]=o[2*n+1]=i,e.heap[1]=i++,T(e,o,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],function(e,t){var r,n,i,o,a,s,c=t.dyn_tree,u=t.max_code,l=t.stat_desc.static_tree,f=t.stat_desc.has_stree,h=t.stat_desc.extra_bits,d=t.stat_desc.extra_base,p=t.stat_desc.max_length,m=0;for(o=0;o<=15;o++)e.bl_count[o]=0;for(c[2*e.heap[e.heap_max]+1]=0,r=e.heap_max+1;r<573;r++)(o=c[2*c[2*(n=e.heap[r])+1]+1]+1)>p&&(o=p,m++),c[2*n+1]=o,!(n>u)&&(e.bl_count[o]++,a=0,n>=d&&(a=h[n-d]),s=c[2*n],e.opt_len+=s*(o+a),f&&(e.static_len+=s*(l[2*n+1]+a)));if(0!==m){do{for(o=p-1;0===e.bl_count[o];)o--;e.bl_count[o]--,e.bl_count[o+1]+=2,e.bl_count[p]--,m-=2}while(m>0);for(o=p;0!==o;o--)for(n=e.bl_count[o];0!==n;)!((i=e.heap[--r])>u)&&(c[2*i+1]!==o&&(e.opt_len+=(o-c[2*i+1])*c[2*i],c[2*i+1]=o),n--)}}(e,t),A(o,u,e.bl_count)}function O(e,t,r){var n,i,o=-1,a=t[1],s=0,c=7,u=4;for(0===a&&(c=138,u=3),t[(r+1)*2+1]=65535,n=0;n<=r;n++)i=a,a=t[(n+1)*2+1],++s<c&&i===a||(s<u?e.bl_tree[2*i]+=s:0!==i?(i!==o&&e.bl_tree[2*i]++,e.bl_tree[32]++):s<=10?e.bl_tree[34]++:e.bl_tree[36]++,s=0,o=i,0===a?(c=138,u=3):i===a?(c=6,u=3):(c=7,u=4))}function C(e,t,r){var n,i,o=-1,a=t[1],s=0,c=7,u=4;for(0===a&&(c=138,u=3),n=0;n<=r;n++)if(i=a,a=t[(n+1)*2+1],!(++s<c)||i!==a){if(s<u)do x(e,i,e.bl_tree);while(0!=--s);else 0!==i?(i!==o&&(x(e,i,e.bl_tree),s--),x(e,16,e.bl_tree),_(e,s-3,2)):s<=10?(x(e,17,e.bl_tree),_(e,s-3,3)):(x(e,18,e.bl_tree),_(e,s-11,7));s=0,o=i,0===a?(c=138,u=3):i===a?(c=6,u=3):(c=7,u=4)}}s(y);var N=!1;function L(e,t,r,n){_(e,0+(n?1:0),3),I(e),w(e,r),w(e,~r),a.arraySet(e.pending_buf,e.window,t,r,e.pending),e.pending+=r}t._tr_init=function(e){N||(function(){var e,t,r,a,s,f=Array(16);for(a=0,r=0;a<28;a++)for(e=0,g[a]=r;e<1<<c[a];e++)m[r++]=a;for(m[r-1]=a,s=0,a=0;a<16;a++)for(e=0,y[a]=s;e<1<<u[a];e++)p[s++]=a;for(s>>=7;a<30;a++)for(e=0,y[a]=s<<7;e<1<<u[a]-7;e++)p[256+s++]=a;for(t=0;t<=15;t++)f[t]=0;for(e=0;e<=143;)h[2*e+1]=8,e++,f[8]++;for(;e<=255;)h[2*e+1]=9,e++,f[9]++;for(;e<=279;)h[2*e+1]=7,e++,f[7]++;for(;e<=287;)h[2*e+1]=8,e++,f[8]++;for(A(h,287,f),e=0;e<30;e++)d[2*e+1]=5,d[2*e]=S(e,5);n=new b(h,c,257,286,15),i=new b(d,u,0,30,15),o=new b([],l,0,19,7)}(),N=!0),e.l_desc=new v(e.dyn_ltree,n),e.d_desc=new v(e.dyn_dtree,i),e.bl_desc=new v(e.bl_tree,o),e.bi_buf=0,e.bi_valid=0,P(e)},t._tr_stored_block=L,t._tr_flush_block=function(e,t,r,n){var i,o,a=0;e.level>0?(2===e.strm.data_type&&(e.strm.data_type=function(e){var t,r=4093624447;for(t=0;t<=31;t++,r>>>=1)if(1&r&&0!==e.dyn_ltree[2*t])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(t=32;t<256;t++)if(0!==e.dyn_ltree[2*t])return 1;return 0}(e)),B(e,e.l_desc),B(e,e.d_desc),a=function(e){var t;for(O(e,e.dyn_ltree,e.l_desc.max_code),O(e,e.dyn_dtree,e.d_desc.max_code),B(e,e.bl_desc),t=18;t>=3&&0===e.bl_tree[2*f[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(e),i=e.opt_len+3+7>>>3,(o=e.static_len+3+7>>>3)<=i&&(i=o)):i=o=r+5,r+4<=i&&-1!==t?L(e,t,r,n):4===e.strategy||o===i?(_(e,2+(n?1:0),3),R(e,h,d)):(_(e,4+(n?1:0),3),function(e,t,r,n){var i;for(_(e,t-257,5),_(e,r-1,5),_(e,n-4,4),i=0;i<n;i++)_(e,e.bl_tree[2*f[i]+1],3);C(e,e.dyn_ltree,t-1),C(e,e.dyn_dtree,r-1)}(e,e.l_desc.max_code+1,e.d_desc.max_code+1,a+1),R(e,e.dyn_ltree,e.dyn_dtree)),P(e),n&&I(e)},t._tr_tally=function(e,t,r){return e.pending_buf[e.d_buf+2*e.last_lit]=t>>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&r,e.last_lit++,0===t?e.dyn_ltree[2*r]++:(e.matches++,t--,e.dyn_ltree[(m[r]+256+1)*2]++,e.dyn_dtree[2*E(t)]++),e.last_lit===e.lit_bufsize-1},t._tr_align=function(e){_(e,2,3),x(e,256,h),16===e.bi_valid?(w(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}},562:function(e){e.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},491:function(e){e.exports=r(69894)},300:function(e){e.exports=r(82957)},781:function(e){e.exports=r(97501)},837:function(e){e.exports=r(85508)}},o={};function a(e){var r=o[e];
2if(void 0!==r)return r.exports;var n=o[e]={exports:{}},i=!0;try{t[e](n,n.exports,a),i=!1}finally{i&&delete o[e]}return n.exports}a.ab="//";var s=a(23);e.exports=s}()},51983:function(e,t,r){!function(){var t={528:function(e,t,r){var n=r(685),i=r(310),o=e.exports;for(var a in n)n.hasOwnProperty(a)&&(o[a]=n[a]);function s(e){if("string"==typeof e&&(e=i.parse(e)),e.protocol||(e.protocol="https:"),"https:"!==e.protocol)throw Error('Protocol "'+e.protocol+'" not supported. Expected "https:"');return e}o.request=function(e,t){return e=s(e),n.request.call(this,e,t)},o.get=function(e,t){return e=s(e),n.get.call(this,e,t)}},685:function(e){"use strict";e.exports=r(12251)},310:function(e){"use strict";e.exports=r(93813)}},n={};function i(e){var r=n[e];if(void 0!==r)return r.exports;var o=n[e]={exports:{}},a=!0;try{t[e](o,o.exports,i),a=!1}finally{a&&delete n[e]}return o.exports}i.ab="//";var o=i(528);e.exports=o}()},93813:function(e,t,r){!function(){var t={452:function(e){"use strict";e.exports=r(85605)}},n={};function i(e){var r=n[e];if(void 0!==r)return r.exports;var o=n[e]={exports:{}},a=!0;try{t[e](o,o.exports,i),a=!1}finally{a&&delete n[e]}return o.exports}i.ab="//";var o={};!function(){var e,t=(e=i(452))&&"object"==typeof e&&"default"in e?e.default:e,r=/https?|ftp|gopher|file/;function n(e){"string"==typeof e&&(e=y(e));var n,i,o,a,s,c,u,l,f,h=(i=(n=e).auth,o=n.hostname,a=n.protocol||"",s=n.pathname||"",c=n.hash||"",u=n.query||"",l=!1,i=i?encodeURIComponent(i).replace(/%3A/i,":")+"@":"",n.host?l=i+n.host:o&&(l=i+(~o.indexOf(":")?"["+o+"]":o),n.port&&(l+=":"+n.port)),u&&"object"==typeof u&&(u=t.encode(u)),f=n.search||u&&"?"+u||"",a&&":"!==a.substr(-1)&&(a+=":"),n.slashes||(!a||r.test(a))&&!1!==l?(l="//"+(l||""),s&&"/"!==s[0]&&(s="/"+s)):l||(l=""),c&&"#"!==c[0]&&(c="#"+c),f&&"?"!==f[0]&&(f="?"+f),{protocol:a,host:l,pathname:s=s.replace(/[?#]/g,encodeURIComponent),search:f=f.replace("#","%23"),hash:c});return""+h.protocol+h.host+h.pathname+h.search+h.hash}var a="http://",s=a+"w.w",c=/^([a-z0-9.+-]*:\/\/\/)([a-z0-9.+-]:\/*)?/i,u=/https?|ftp|gopher|file/;function l(e,t){var r="string"==typeof e?y(e):e;e="object"==typeof e?n(e):e;var i=y(t),o="";r.protocol&&!r.slashes&&(o=r.protocol,e=e.replace(r.protocol,""),o+="/"===t[0]||"/"===e[0]?"/":""),o&&i.protocol&&(o="",i.slashes||(o=i.protocol,t=t.replace(i.protocol,"")));var l=e.match(c);l&&!i.protocol&&(e=e.substr((o=l[1]+(l[2]||"")).length),/^\/\/[^/]/.test(t)&&(o=o.slice(0,-1)));var f=new URL(e,s+"/"),h=new URL(t,f).toString().replace(s,""),d=i.protocol||r.protocol;return d+=r.slashes||i.slashes?"//":"",!o&&d?h=h.replace(a,d):o&&(h=h.replace(a,"")),u.test(h)||~t.indexOf(".")||"/"===e.slice(-1)||"/"===t.slice(-1)||"/"!==h.slice(-1)||(h=h.slice(0,-1)),o&&(h=o+("/"===h[0]?h.substr(1):h)),h}function f(){}f.prototype.parse=y,f.prototype.format=n,f.prototype.resolve=l,f.prototype.resolveObject=l;var h=/^https?|ftp|gopher|file/,d=/^(.*?)([#?].*)/,p=/^([a-z0-9.+-]*:)(\/{0,3})(.*)/i,m=/^([a-z0-9.+-]*:)?\/\/\/*/i,g=/^([a-z0-9.+-]*:)(\/{0,2})\[(.*)\]$/i;function y(e,r,i){if(void 0===r&&(r=!1),void 0===i&&(i=!1),e&&"object"==typeof e&&e instanceof f)return e;var o=(e=e.trim()).match(d);e=o?o[1].replace(/\\/g,"/")+o[2]:e.replace(/\\/g,"/"),g.test(e)&&"/"!==e.slice(-1)&&(e+="/");var a=!/(^javascript)/.test(e)&&e.match(p),c=m.test(e),u="";a&&(h.test(a[1])||(u=a[1].toLowerCase(),e=""+a[2]+a[3]),a[2]||(c=!1,h.test(a[1])?(u=a[1],e=""+a[3]):e="//"+a[3]),3!==a[2].length&&1!==a[2].length||(u=a[1],e="/"+a[3]));var l,y=(o?o[1]:e).match(/^https?:\/\/[^/]+(:[0-9]+)(?=\/|$)/),b=y&&y[1],v=new f,E="",w="";try{l=new URL(e)}catch(t){E=t,u||i||!/^\/\//.test(e)||/^\/\/.+[@.]/.test(e)||(w="/",e=e.substr(1));try{l=new URL(e,s)}catch(e){return v.protocol=u,v.href=u,v}}v.slashes=c&&!w,v.host="w.w"===l.host?"":l.host,v.hostname="w.w"===l.hostname?"":l.hostname.replace(/(\[|\])/g,""),v.protocol=E?u||null:l.protocol,v.search=l.search.replace(/\\/g,"%5C"),v.hash=l.hash.replace(/\\/g,"%5C");var _=e.split("#");!v.search&&~_[0].indexOf("?")&&(v.search="?"),v.hash||""!==_[1]||(v.hash="#"),v.query=r?t.decode(l.search.substr(1)):v.search.substr(1),v.pathname=w+(a?l.pathname.replace(/['^|`]/g,function(e){return"%"+e.charCodeAt().toString(16).toUpperCase()}).replace(/((?:%[0-9A-F]{2})+)/g,function(e,t){try{return decodeURIComponent(t).split("").map(function(e){var t=e.charCodeAt();return t>256||/^[a-z0-9]$/i.test(e)?e:"%"+t.toString(16).toUpperCase()}).join("")}catch(e){return t}}):l.pathname),"about:"===v.protocol&&"blank"===v.pathname&&(v.protocol="",v.pathname=""),E&&"/"!==e[0]&&(v.pathname=v.pathname.substr(1)),u&&!h.test(u)&&"/"!==e.slice(-1)&&"/"===v.pathname&&(v.pathname=""),v.path=v.pathname+v.search,v.auth=[l.username,l.password].map(decodeURIComponent).filter(
2Boolean).join(":"),v.port=l.port,b&&!v.host.endsWith(b)&&(v.host+=b,v.port=b.slice(1)),v.href=w?""+v.pathname+v.search+v.hash:n(v);var x=/^(file)/.test(v.href)?["host","hostname"]:[];return Object.keys(v).forEach(function(e){~x.indexOf(e)||(v[e]=v[e]||null)}),v}o.parse=y,o.format=n,o.resolve=l,o.resolveObject=function(e,t){return y(l(e,t))},o.Url=f}(),e.exports=o}()},85605:function(e){!function(){"use strict";var t={815:function(e){e.exports=function(e,r,n,i){r=r||"&",n=n||"=";var o={};if("string"!=typeof e||0===e.length)return o;var a=/\+/g;e=e.split(r);var s=1e3;i&&"number"==typeof i.maxKeys&&(s=i.maxKeys);var c=e.length;s>0&&c>s&&(c=s);for(var u=0;u<c;++u){var l,f,h,d,p=e[u].replace(a,"%20"),m=p.indexOf(n);(m>=0?(l=p.substr(0,m),f=p.substr(m+1)):(l=p,f=""),h=decodeURIComponent(l),d=decodeURIComponent(f),Object.prototype.hasOwnProperty.call(o,h))?t(o[h])?o[h].push(d):o[h]=[o[h],d]:o[h]=d}return o};var t=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},577:function(e){var t=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,o,a,s){return(o=o||"&",a=a||"=",null===e&&(e=void 0),"object"==typeof e)?n(i(e),function(i){var s=encodeURIComponent(t(i))+a;return r(e[i])?n(e[i],function(e){return s+encodeURIComponent(t(e))}).join(o):s+encodeURIComponent(t(e[i]))}).join(o):s?encodeURIComponent(t(s))+a+encodeURIComponent(t(e)):""};var r=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function n(e,t){if(e.map)return e.map(t);for(var r=[],n=0;n<e.length;n++)r.push(t(e[n],n));return r}var i=Object.keys||function(e){var t=[];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.push(r);return t}}},r={};function n(e){var i=r[e];if(void 0!==i)return i.exports;var o=r[e]={exports:{}},a=!0;try{t[e](o,o.exports,n),a=!1}finally{a&&delete r[e]}return o.exports}n.ab="//";var i={};i.decode=i.parse=n(815),i.encode=i.stringify=n(577),e.exports=i}()},12251:function(e,t,r){var n=r(25566),i=r(82957).Buffer;!function(){var t={523:function(e){e.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(e){"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},646:function(e){"use strict";let t={};function r(e,r,n){n||(n=Error);class i extends n{constructor(e,t,n){super("string"==typeof r?r:r(e,t,n))}}i.prototype.name=n.name,i.prototype.code=e,t[e]=i}function n(e,t){if(!Array.isArray(e))return`of ${t} ${String(e)}`;{let r=e.length;return(e=e.map(e=>String(e)),r>2)?`one of ${t} ${e.slice(0,r-1).join(", ")}, or `+e[r-1]:2===r?`one of ${t} ${e[0]} or ${e[1]}`:`of ${t} ${e[0]}`}}r("ERR_INVALID_OPT_VALUE",function(e,t){return'The value "'+t+'" is invali
2d for option "'+e+'"'},TypeError),r("ERR_INVALID_ARG_TYPE",function(e,t,r){var i,o,a,s;let c,u;if("string"==typeof t&&(i="not ",t.substr(0,i.length)===i)?(c="must not be",t=t.replace(/^not /,"")):c="must be",o=" argument",(void 0===a||a>e.length)&&(a=e.length),e.substring(a-o.length,a)===o)u=`The ${e} ${c} ${n(t,"type")}`;else{let r=("number"!=typeof s&&(s=0),s+1>e.length||-1===e.indexOf(".",s))?"argument":"property";u=`The "${e}" ${r} ${c} ${n(t,"type")}`}return u+`. Received type ${typeof r}`},TypeError),r("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),r("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"}),r("ERR_STREAM_PREMATURE_CLOSE","Premature close"),r("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"}),r("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),r("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),r("ERR_STREAM_WRITE_AFTER_END","write after end"),r("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),r("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError),r("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.q=t},403:function(e,t,r){"use strict";var i=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};e.exports=l;var o=r(709),a=r(337);r(782)(l,o);for(var s=i(a.prototype),c=0;c<s.length;c++){var u=s[c];l.prototype[u]||(l.prototype[u]=a.prototype[u])}function l(e){if(!(this instanceof l))return new l(e);o.call(this,e),a.call(this,e),this.allowHalfOpen=!0,e&&(!1===e.readable&&(this.readable=!1),!1===e.writable&&(this.writable=!1),!1===e.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",f)))}function f(){this._writableState.ended||n.nextTick(h,this)}function h(e){e.end()}Object.defineProperty(l.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(l.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(l.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(l.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&this._readableState.destroyed&&this._writableState.destroyed},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}})},889:function(e,t,r){"use strict";e.exports=i;var n=r(170);function i(e){if(!(this instanceof i))return new i(e);n.call(this,e)}r(782)(i,n),i.prototype._transform=function(e,t,r){r(null,e)}},709:function(e,t,i){"use strict";e.exports=P,P.ReadableState=A,i(361).EventEmitter;var o,a,s,c,u,l=function(e,t){return e.listeners(t).length},f=i(678),h=i(300).Buffer,d=r.g.Uint8Array||function(){},p=i(837);a=p&&p.debuglog?p.debuglog("stream"):function(){};var m=i(379),g=i(25),y=i(776).getHighWaterMark,b=i(646).q,v=b.ERR_INVALID_ARG_TYPE,E=b.ERR_STREAM_PUSH_AFTER_EOF,w=b.ERR_METHOD_NOT_IMPLEMENTED,_=b.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;i(782)(P,f);var x=g.errorOrDestroy,S=["error","close","destroy","pause","resume"];function A(e,t,r){o=o||i(403),e=e||{},"boolean"!=typeof r&&(r=t instanceof o),this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=y(this,e,"readableHighWaterMark",r),this.buffer=new m,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!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(s||(s=i(704).s),this.decoder=new s(e.encoding),this.encoding=e.encoding)}function P(e){if(o=o||i(403),!(this instanceof P))return new P(e);var t=this instanceof o;this._readableState=new A(e,this,t),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),f.call(this)}function I(e,t,r,n,i){a("readableAddChunk",t);var o,s,c,u,l,f=e._readableState;if(null===t)f.reading=!1,function(e,t){if(a("onEofChunk"),!t.ended){if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.sync?R(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,B(e)))}}(e,f);else{if(i||(o=f,s=t,h.isBuffer(s)||s instanceof d||"string"==typeof s||void 0===s||o.objectMode||(c=new v("chunk",["string","Buffer","Uint8Array"],s)),l=c),l)x(e,l);else if(f.objectMode||t&&t.length>0){if("string"==typeof t||f.objectMode||Object.getPrototypeOf(t)===h.prototype||(u=t,t=h.from(u)),n)f.endEmitted?x(e,new _):k(e,f,t,!0);else if(f.ended)x(e,new E);else{if(f.destroyed)return!1;f.reading=!1,f.decoder&&!r?(t=f.decoder.write(t),f.objectMode||0!==t.length?k(e,f,t,!1):O(e,f)):k(e,f,t,!1)}}else n||(f.reading=!1,O(e,f))}return!f.ended&&(f.length<f.highWaterMark||0===f.length)}function k(e,t,r,n){t.flowing&&0===t.length&&!t.sync?(t.awaitDrain=0,e.emit("data",r)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&R(e)),O(e,t)}function T(e,t){if(e<=0||0===t.length&&t.ended)return 0;if(t.objectMode)return 1;if(e!=e)return t.flowing&&t.length?t.buffer.head.data.length:t.length;if(e>t.highWaterMark){var r;t.highWaterMark=((r=e)>=1073741824?r=1073741824:(r--,r|=r>>>1,r|=r>>>2,r|=r>>>4,r|=r>>>8,r|=r>>>16,r++),r)}return e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0)}function R(e){var t=e._readableState;a("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(a("emitReadable",t.flowing),t.emittedReadable=!0,n.nextTick(B,e))}function B(e){var t=e._readableState;a("emitReadable_",t.destroyed,t.length,t.ended),!t.destroyed&&(t.length||t.ended)&&(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,M(e)}function O(e,t){t.readingMore||(t.readingMore=!0,n.nextTick(C,e,t))}function C(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&0===t.length);){var r=t.length;if(a("maybeReadMore read 0"),e.read(0),r===t.length)break}t.readingMore=!1}function N(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function L(e){a("readable nexttick read 0"),e.read(0)}function F(e,t){a("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),M(e),t.flowing&&!t.reading&&e.read(0)}function M(e){var t=e._readableState;for(a("flow",t.flowing);t.flowing&&null!==e.read(););}function D(e,t){var r;return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r)}function $(e){var t=e._readableState;a("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,n.nextTick(j,t,e))}function j(e,t){if(a("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}function U(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return -1}Object.defineProperty(P.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),P.prototype.destroy=g.destroy,P.prototype._undestroy=g.undestroy,P.prototype._destroy=function(e,t){t(e)},P.prototype.push=function(e,t){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof e&&((t=t||n.defaultEncoding)!==n.encoding&&(e=h.from(e,t),t=""),r=!0),I(this,e,t,!1,r)},P.prototype.unshift=function(e){return I(this,e,null,!0,!1)},P.prototype.isPaused=function(){return!1===this._readableState.flowing},P.prototype.setEncoding=function(e){s||(s=i(704).s);var t=new s(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;
2for(var r=this._readableState.buffer.head,n="";null!==r;)n+=t.write(r.data),r=r.next;return this._readableState.buffer.clear(),""!==n&&this._readableState.buffer.push(n),this._readableState.length=n.length,this},P.prototype.read=function(e){a("read",e),e=parseInt(e,10);var t,r=this._readableState,n=e;if(0!==e&&(r.emittedReadable=!1),0===e&&r.needReadable&&((0!==r.highWaterMark?r.length>=r.highWaterMark:r.length>0)||r.ended))return a("read: emitReadable",r.length,r.ended),0===r.length&&r.ended?$(this):R(this),null;if(0===(e=T(e,r))&&r.ended)return 0===r.length&&$(this),null;var i=r.needReadable;return a("need readable",i),(0===r.length||r.length-e<r.highWaterMark)&&a("length less than watermark",i=!0),r.ended||r.reading?a("reading or ended",i=!1):i&&(a("do read"),r.reading=!0,r.sync=!0,0===r.length&&(r.needReadable=!0),this._read(r.highWaterMark),r.sync=!1,r.reading||(e=T(n,r))),null===(t=e>0?D(e,r):null)?(r.needReadable=r.length<=r.highWaterMark,e=0):(r.length-=e,r.awaitDrain=0),0===r.length&&(r.ended||(r.needReadable=!0),n!==e&&r.ended&&$(this)),null!==t&&this.emit("data",t),t},P.prototype._read=function(e){x(this,new w("_read()"))},P.prototype.pipe=function(e,t){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=e;break;case 1:i.pipes=[i.pipes,e];break;default:i.pipes.push(e)}i.pipesCount+=1,a("pipe count=%d opts=%j",i.pipesCount,t);var o=t&&!1===t.end||e===n.stdout||e===n.stderr?m:s;function s(){a("onend"),e.end()}i.endEmitted?n.nextTick(o):r.once("end",o),e.on("unpipe",function t(n,o){a("onunpipe"),n===r&&o&&!1===o.hasUnpiped&&(o.hasUnpiped=!0,a("cleanup"),e.removeListener("close",d),e.removeListener("finish",p),e.removeListener("drain",c),e.removeListener("error",h),e.removeListener("unpipe",t),r.removeListener("end",s),r.removeListener("end",m),r.removeListener("data",f),u=!0,i.awaitDrain&&(!e._writableState||e._writableState.needDrain)&&c())});var c=function(){var e=r._readableState;a("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&l(r,"data")&&(e.flowing=!0,M(r))};e.on("drain",c);var u=!1;function f(t){a("ondata");var n=e.write(t);a("dest.write",n),!1===n&&((1===i.pipesCount&&i.pipes===e||i.pipesCount>1&&-1!==U(i.pipes,e))&&!u&&(a("false write response, pause",i.awaitDrain),i.awaitDrain++),r.pause())}function h(t){a("onerror",t),m(),e.removeListener("error",h),0===l(e,"error")&&x(e,t)}function d(){e.removeListener("finish",p),m()}function p(){a("onfinish"),e.removeListener("close",d),m()}function m(){a("unpipe"),r.unpipe(e)}return r.on("data",f),function(e,t,r){if("function"==typeof e.prependListener)return e.prepe
vendor: 5,530 bytes, line 2
2ndListener(t,r);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",h),e.once("close",d),e.once("finish",p),e.emit("pipe",r),i.flowing||(a("pipe resume"),r.resume()),e},P.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o<i;o++)n[o].emit("unpipe",this,{hasUnpiped:!1});return this}var a=U(t.pipes,e);return -1===a||(t.pipes.splice(a,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r)),this},P.prototype.on=function(e,t){var r=f.prototype.on.call(this,e,t),i=this._readableState;return"data"===e?(i.readableListening=this.listenerCount("readable")>0,!1!==i.flowing&&this.resume()):"readable"!==e||i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,a("on readable",i.length,i.reading),i.length?R(this):i.reading||n.nextTick(L,this)),r},P.prototype.addListener=P.prototype.on,P.prototype.removeListener=function(e,t){var r=f.prototype.removeListener.call(this,e,t);return"readable"===e&&n.nextTick(N,this),r},P.prototype.removeAllListeners=function(e){var t=f.prototype.removeAllListeners.apply(this,arguments);return("readable"===e||void 0===e)&&n.nextTick(N,this),t},P.prototype.resume=function(){var e=this._readableState;return e.flowing||(a("resume"),e.flowing=!e.readableListening,e.resumeScheduled||(e.resumeScheduled=!0,n.nextTick(F,this,e))),e.paused=!1,this},P.prototype.pause=function(){return a("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(a("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},P.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var i in e.on("end",function(){if(a("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)}),e.on("data",function(i){a("wrapped data"),r.decoder&&(i=r.decoder.write(i)),(!r.objectMode||null!=i)&&(r.objectMode||i&&i.length)&&(t.push(i)||(n=!0,e.pause()))}),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var o=0;o<S.length;o++)e.on(S[o],this.emit.bind(this,S[o]));return this._read=function(t){a("wrapped _read",t),n&&(n=!1,e.resume())},this},"function"==typeof Symbol&&(P.prototype[Symbol.asyncIterator]=function(){return void 0===c&&(c=i(871)),c(this)}),Object.defineProperty(P.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(P.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(P.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),P._fromList=D,Object.defineProperty(P.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(P.from=function(e,t){return void 0===u&&(u=i(727)),u(P,e,t)})},170:function(e,t,r){"use strict";e.exports=l;var n=r(646).q,i=n.ERR_METHOD_NOT_IMPLEMENTED,o=n.ERR_MULTIPLE_CALLBACK,a=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,s=n.ERR_TRANSFORM_WITH_LENGTH_0,c=r(403);function u(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(null===n)return this.emit("error",new o);r.writechunk=null,r.writecb=null,null!=t&&this.push(t),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function l(e){if(!(this instanceof l))return new l(e);c.call(this,e),this._transformState={afterTransform:u.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",f)}function f(){var e=this;"function"!=typeof this._flush||this._readableState.destroyed?h(this,null,null):this._flush(function(t,r){h(e,t,r)})}function h(e,t,r){if(t)return e.emit("error",t);if(null!=r&&e.push(r),e._writableState.length)throw new s;if(e._transformState.transforming)throw new a;return e.push(null)}r(782)(l,c),l.prototype.push=function(e,t){return this._transformState.needTransform=!1,c.prototype.push.call(this,e,t)},l.prototype._transform=function(e,t,r){r(new i("_transform()"))},l.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},l.prototype._read=function(e){var t=this._transformState;null===t.writechunk||t.transforming?t.needTransform=!0:(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform))},l.prototype._destroy=function(e,t){c.prototype._destroy.call(this,e,function(e){t(e)})}},337:function(e,t,i){"use strict";function o(e){var t=this;this.next=null,this.entry=null,this.finish=function(){(function(e,t,r){var n=e.entry;for(e.entry=null;n;){var i=n.callback;t.pendingcb--,i(void 0),n=n.next}t.corkedRequestsFree.next=e})(t,e)}}
2e.exports=P,P.WritableState=A;var a,s,c={deprecate:i(769)},u=i(678),l=i(300).Buffer,f=r.g.Uint8Array||function(){},h=i(25),d=i(776).getHighWaterMark,p=i(646).q,m=p.ERR_INVALID_ARG_TYPE,g=p.ERR_METHOD_NOT_IMPLEMENTED,y=p.ERR_MULTIPLE_CALLBACK,b=p.ERR_STREAM_CANNOT_PIPE,v=p.ERR_STREAM_DESTROYED,E=p.ERR_STREAM_NULL_VALUES,w=p.ERR_STREAM_WRITE_AFTER_END,_=p.ERR_UNKNOWN_ENCODING,x=h.errorOrDestroy;function S(){}function A(e,t,r){a=a||i(403),e=e||{},"boolean"!=typeof r&&(r=t instanceof a),this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=d(this,e,"writableHighWaterMark",r),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var s=!1===e.decodeStrings;this.decodeStrings=!s,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){(function(e,t){var r=e._writableState,i=r.sync,o=r.writecb;if("function"!=typeof o)throw new y;if(r.writing=!1,r.writecb=null,r.length-=r.writelen,r.writelen=0,t)--r.pendingcb,i?(n.nextTick(o,t),n.nextTick(O,e,r),e._writableState.errorEmitted=!0,x(e,t)):(o(t),e._writableState.errorEmitted=!0,x(e,t),O(e,r));else{var a=R(r)||e.destroyed;a||r.corked||r.bufferProcessing||!r.bufferedRequest||T(e,r),i?n.nextTick(k,e,r,a,o):k(e,r,a,o)}})(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new o(this)}function P(e){var t=this instanceof(a=a||i(403));if(!t&&!s.call(P,this))return new P(e);this._writableState=new A(e,this,t),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),u.call(this)}function I(e,t,r,n,i,o,a){t.writelen=n,t.writecb=a,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new v("write")):r?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function k(e,t,r,n){r||0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain")),t.pendingcb--,n(),O(e,t)}function T(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=Array(t.bufferedRequestCount),i=t.corkedRequestsFree;i.entry=r;for(var a=0,s=!0;r;)n[a]=r,r.isBuf||(s=!1),r=r.next,a+=1;n.allBuffers=s,I(e,t,!0,t.length,n,"",i.finish),t.pendingcb++,t.lastBufferedRequest=null,i.next?(t.corkedRequestsFree=i.next,i.next=null):t.corkedRequestsFree=new o(t),t.bufferedRequestCount=0}else{for(;r;){var c=r.chunk,u=r.encoding,l=r.callback,f=t.objectMode?1:c.length;if(I(e,t,!1,f,c,u,l),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function R(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function B(e,t){e._final(function(r){t.pendingcb--,r&&x(e,r),t.prefinished=!0,e.emit("prefinish"),O(e,t)})}function O(e,t){var r=R(t);if(r&&(t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.pendingcb++,t.finalCalled=!0,n.nextTick(B,e,t))),0===t.pendingcb&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var i=e._readableState;(!i||i.autoDestroy&&i.endEmitted)&&e.destroy()}return r}i(782)(P,u),A.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(A.prototype,"buffer",{get:c.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(s=Function.prototype[Symbol.hasInstance],Object.defineProperty(P,Symbol.hasInstance,{value:function(e){return!!s.call(this,e)||this===P&&e&&e._writableState instanceof A}})):s=function(e){return e instanceof this},P.prototype.pipe=function(){x(this,new b)},P.prototype.write=function(e,t,r){var i,o,a,s,c,u,h,d=this._writableState,p=!1,g=!d.objectMode&&(i=e,l.isBuffer(i)||i instanceof f);return g&&!l.isBuffer(e)&&(o=e,e=l.from(o)),("function"==typeof t&&(r=t,t=null),g?t="buffer":t||(t=d.defaultEncoding),"function"!=typeof r&&(r=S),d.ending)?(a=r,x(this,s=new w),n.nextTick(a,s)):(g||(c=e,u=r,null===c?h=new E:"string"==typeof c||d.objectMode||(h=new m("chunk",["string","Buffer"],c)),!h||(x(this,h),n.nextTick(u,h),0)))&&(d.pendingcb++,p=function(e,t,r,n,i,o){if(!r){var a,s,c=(a=n,s=i,t.objectMode||!1===t.decodeStrings||"string"!=typeof a||(a=l.from(a,s)),a);n!==c&&(r=!0,i="buffer",n=c)}var u=t.objectMode?1:n.length;t.length+=u;var f=t.length<t.highWaterMark;if(f||(t.needDrain=!0),t.writing||t.corked){var h=t.lastBufferedRequest;t.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:o,next:null},h?h.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else I(e,t,!1,u,n,i,o);return f}(this,d,g,e,t,r)),p},P.prototype.cork=function(){this._writableState.corked++},P.prototype.uncork=function(){var e=this._writableState;!e.corked||(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||T(this,e))},P.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new _(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(P.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(P.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),P.prototype._write=function(e,t,r){r(new g("_write()"))},P.prototype._writev=null,P.prototype.end=function(e,t,r){var i,o=this._writableState;return"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),o.corked&&(o.corked=1,this.uncork()),o.ending||(i=r,o.ending=!0,O(this,o),i&&(o.finished?n.nextTick(i):this.once("finish",i)),o.ended=!0,this.writable=!1),this},Object.defineProperty(P.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(P.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),P.prototype.destroy=h.destroy,P.prototype._undestroy=h.undestroy,P.prototype._destroy=function(e,t){t(e)}},871:function(e,t,r){"use strict";function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var o,a=r(698),s=Symbol("lastResolve"),c=Symbol("lastReject"),u=Symbol("error"),l=Symbol("ended"),f=Symbol("lastPromise"),h=Symbol("handlePromise"),d=Symbol("stream");function p(e,t){return{value:e,done:t}}function m(e){var t=e[s];if(null!==t){var r=e[d].read();null!==r&&(e[f]=null,e[s]=null,e[c]=null,t(p(r,!1)))}}function g(e){n.nextTick(m,e)}var y=Object.getPrototypeOf(function(){}),b=Object.setPrototypeOf((i(o={get stream(){return this[d]},next:function(){var e,t,r=this,i=this[u];if(null!==i)return Promise.reject(i);if(this[l])return Promise.resolve(p(void 0,!0));if(this[d].destroyed)return new Promise(function(e,t){n.nextTick(function(){r[u]?t(r[u]):e(p(void 0,!0))})});var o=this[f];if(o)t=new Promise((e=this,function(t,r){o.then(function(){if(e[l]){t(p(void 0,!0));return}e[h](t,r)},r)}));else{var a=this[d].read();if(null!==a)return Promise.resolve(p(a,!1));t=new Promise(this[h])}return this[f]=t,t}},Symbol.asyncIterator,function(){return this}),i(o,"return",function(){var e=this;return new Promise(function(t,r){e[d].destroy(null,function(e){if(e){r(e);return}t(p(void 0,!0))})})}),o),y);e.exports=function(e){var t,r=Object.create(b,(i(t={},d,{value:e,writable:!0}),i(t,s,{value:null,writable:!0}),i(t,c,{value:null,writable:!0}),i(t,u,{value:null,writable:!0}),i(t,l,{value:e._readableState.endEmitted,writable:!0}),i(t,h,{value:function(e,t){var n=r[d].read();n?(r[f]=null,r[s]=null,r[c]=null,e(p(n,!1))):(r[s]=e,r[c]=t)},writable:!0}),t));return r[f]=null,a(e,function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=r[c];null!==t&&(r[f]=null,r[s]=null,r[c]=null,t(e)),r[u]=e;return}var n=r[s];null!==n&&(r[f]=null,r[s]=null,r[c]=null,n(p(void 0,!0))),r[l]=!0}
2),e.on("readable",g.bind(null,r)),r}},379:function(e,t,r){"use strict";function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}var i=r(300).Buffer,o=r(837).inspect,a=o&&o.custom||"inspect";e.exports=function(){var e;function t(){!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,t),this.head=null,this.tail=null,this.length=0}return e=[{key:"push",value:function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r}},{key:"concat",value:function(e){if(0===this.length)return i.alloc(0);for(var t,r,n=i.allocUnsafe(e>>>0),o=this.head,a=0;o;)t=o.data,r=a,i.prototype.copy.call(t,n,r),a+=o.data.length,o=o.next;return n}},{key:"consume",value:function(e,t){var r;return e<this.head.data.length?(r=this.head.data.slice(0,e),this.head.data=this.head.data.slice(e)):r=e===this.head.data.length?this.shift():t?this._getString(e):this._getBuffer(e),r}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(e){var t=this.head,r=1,n=t.data;for(e-=n.length;t=t.next;){var i=t.data,o=e>i.length?i.length:e;if(o===i.length?n+=i:n+=i.slice(0,e),0==(e-=o)){o===i.length?(++r,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=i.slice(o));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(e){var t=i.allocUnsafe(e),r=this.head,n=1;for(r.data.copy(t),e-=r.data.length;r=r.next;){var o=r.data,a=e>o.length?o.length:e;if(o.copy(t,t.length-e,0,a),0==(e-=a)){a===o.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=o.slice(a));break}++n}return this.length-=n,t}},{key:a,value:function(e,t){return o(this,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?n(Object(r),!0).forEach(function(t){var n;n=r[t],t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}({},t,{depth:0,customInspect:!1}))}}],function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}(t.prototype,e),t}()},25:function(e){"use strict";function t(e,t){i(e,t),r(e)}function r(e){(!e._writableState||e._writableState.emitClose)&&(!e._readableState||e._readableState.emitClose)&&e.emit("close")}function i(e,t){e.emit("error",t)}e.exports={destroy:function(e,o){var a=this,s=this._readableState&&this._readableState.destroyed,c=this._writableState&&this._writableState.destroyed;return s||c?o?o(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,n.nextTick(i,this,e)):n.nextTick(i,this,e)):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(e){!o&&e?a._writableState?a._writableState.errorEmitted?n.nextTick(r,a):(a._writableState.errorEmitted=!0,n.nextTick(t,a,e)):n.nextTick(t,a,e):o?(n.nextTick(r,a),o(e)):n.nextTick(r,a)})),this},undestroy:function(){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)},errorOrDestroy:function(e,t){var r=e._readableState,n=e._writableState;r&&r.autoDestroy||n&&n.autoDestroy?e.destroy(t):e.emit("error",t)}}},698:function(e,t,r){"use strict";
2var n=r(646).q.ERR_STREAM_PREMATURE_CLOSE;function i(){}e.exports=function e(t,r,o){if("function"==typeof r)return e(t,null,r);r||(r={}),a=o||i,s=!1,o=function(){if(!s){s=!0;for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];a.apply(this,t)}};var a,s,c=r.readable||!1!==r.readable&&t.readable,u=r.writable||!1!==r.writable&&t.writable,l=function(){t.writable||h()},f=t._writableState&&t._writableState.finished,h=function(){u=!1,f=!0,c||o.call(t)},d=t._readableState&&t._readableState.endEmitted,p=function(){c=!1,d=!0,u||o.call(t)},m=function(e){o.call(t,e)},g=function(){var e;return c&&!d?(t._readableState&&t._readableState.ended||(e=new n),o.call(t,e)):u&&!f?(t._writableState&&t._writableState.ended||(e=new n),o.call(t,e)):void 0},y=function(){t.req.on("finish",h)};return t.setHeader&&"function"==typeof t.abort?(t.on("complete",h),t.on("abort",g),t.req?y():t.on("request",y)):u&&!t._writableState&&(t.on("end",l),t.on("close",l)),t.on("end",p),t.on("finish",h),!1!==r.error&&t.on("error",m),t.on("close",g),function(){t.removeListener("complete",h),t.removeListener("abort",g),t.removeListener("request",y),t.req&&t.req.removeListener("finish",h),t.removeListener("end",l),t.removeListener("close",l),t.removeListener("finish",h),t.removeListener("end",p),t.removeListener("error",m),t.removeListener("close",g)}}},727:function(e,t,r){"use strict";function n(e,t,r,n,i,o,a){try{var s=e[o](a),c=s.value}catch(e){r(e);return}s.done?t(c):Promise.resolve(c).then(n,i)}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}var o=r(646).q.ERR_INVALID_ARG_TYPE;e.exports=function(e,t,r){if(t&&"function"==typeof t.next)a=t;else if(t&&t[Symbol.asyncIterator])a=t[Symbol.asyncIterator]();else if(t&&t[Symbol.iterator])a=t[Symbol.iterator]();else throw new o("iterable",["Iterable"],t);var a,s=new e(function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?i(Object(r),!0).forEach(function(t){var n;n=r[t],t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}({objectMode:!0},r)),c=!1;function u(){return l.apply(this,arguments)}function l(){var e;return e=function*(){try{var e=yield a.next(),t=e.value;e.done?s.push(null):s.push((yield t))?u():c=!1}catch(e){s.destroy(e)}},(l=function(){var t=this,r=arguments;return new Promise(function(i,o){var a=e.apply(t,r);function s(e){n(a,i,o,s,c,"next",e)}function c(e){n(a,i,o,s,c,"throw",e)}s(void 0)})}).apply(this,arguments)}return s._read=function(){c||(c=!0,u())},s}},442:function(e,t,r){"use strict";var n,i=r(646).q,o=i.ERR_MISSING_ARGS,a=i.ERR_STREAM_DESTROYED;function s(e){if(e)throw e}function c(e){e()}function u(e,t){return e.pipe(t)}e.exports=function(){for(var e,t,i=arguments.length,l=Array(i),f=0;f<i;f++)l[f]=arguments[f];var h=(e=l).length&&"function"==typeof e[e.length-1]?e.pop():s;if(Array.isArray(l[0])&&(l=l[0]),l.length<2)throw new o("streams");var d=l.map(function(e,i){var o,s,u,f,p,m,g=i<l.length-1;return o=i>0,u=s=function(e){t||(t=e),e&&d.forEach(c),g||(d.forEach(c),h(t))},f=!1,s=function(){f||(f=!0,u.apply(void 0,arguments))},p=!1,e.on("close",function(){p=!0}),void 0===n&&(n=r(698)),n(e,{readable:g,writable:o},function(e){if(e)return s(e);p=!0,s()}),m=!1,function(t){if(!p&&!m){if(m=!0,e.setHeader&&"function"==typeof e.abort)return e.abort();if("function"==typeof e.destroy)return e.destroy();s(t||new a("pipe"))}}});return l.reduce(u)}},776:function(e,t,r){"use strict";var n=r(646).q.ERR_INVALID_OPT_VALUE;e.exports={getHighWaterMark:function(e,t,r,i){var o=null!=t.highWaterMark?t.highWaterMark:i?t[r]:null;if(null!=o){if(!(isFinite(o)&&Math.floor(o)===o)||o<0)throw new n(i?r:"highWaterMark",o);return Math.floor(o)}return e.objectMode?16:16384}}},678:function(e,t,r){e.exports=r(781)},726:function(e,t,r){var i=r(781);"disable"===n.env.READABLE_STREAM&&i?(e.exports=i.Readable,Object.assign(e.exports,i),e.exports.Stream=i):((t=e.exp
2orts=r(709)).Stream=i||t,t.Readable=t,t.Writable=r(337),t.Duplex=r(403),t.Transform=r(170),t.PassThrough=r(889),t.finished=r(698),t.pipeline=r(442))},55:function(e,t,r){var n=r(300),i=n.Buffer;function o(e,t){for(var r in e)t[r]=e[r]}function a(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=n:(o(n,t),t.Buffer=a),a.prototype=Object.create(i.prototype),o(i,a),a.from=function(e,t,r){if("number"==typeof e)throw TypeError("Argument must not be a number");return i(e,t,r)},a.alloc=function(e,t,r){if("number"!=typeof e)throw TypeError("Argument must be a number");var n=i(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},a.allocUnsafe=function(e){if("number"!=typeof e)throw TypeError("Argument must be a number");return i(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw TypeError("Argument must be a number");return n.SlowBuffer(e)}},813:function(e,t,n){var i=n(450),o=n(254),a=n(911),s=n(523),c=n(310);t.request=function(e,t){e="string"==typeof e?c.parse(e):a(e);var n=-1===r.g.location.protocol.search(/^https?:$/)?"http:":"",o=e.protocol||n,s=e.hostname||e.host,u=e.port,l=e.path||"/";s&&-1!==s.indexOf(":")&&(s="["+s+"]"),e.url=(s?o+"//"+s:"")+(u?":"+u:"")+l,e.method=(e.method||"GET").toUpperCase(),e.headers=e.headers||{};var f=new i(e);return t&&f.on("response",t),f},t.get=function(e,r){var n=t.request(e,r);return n.end(),n},t.ClientRequest=i,t.IncomingMessage=o.IncomingMessage,t.Agent=function(){},t.Agent.defaultMaxSockets=4,t.globalAgent=new t.Agent,t.STATUS_CODES=s,t.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(e,t){var n;function i(){if(void 0!==n)return n;if(r.g.XMLHttpRequest){n=new r.g.XMLHttpRequest;try{n.open("GET",r.g.XDomainRequest?"/":"https://example.com")}catch(e){n=null}}else n=null;return n}function o(e){var t=i();if(!t)return!1;try{return t.responseType=e,t.responseType===e}catch(e){}return!1}function a(e){return"function"==typeof e}t.fetch=a(r.g.fetch)&&a(r.g.ReadableStream),t.writableStream=a(r.g.WritableStream),t.abortController=a(r.g.AbortController),t.arraybuffer=t.fetch||o("arraybuffer"),t.msstream=!t.fetch&&o("ms-stream"),t.mozchunkedarraybuffer=!t.fetch&&o("moz-chunked-arraybuffer"),t.overrideMimeType=t.fetch||!!i()&&a(i().overrideMimeType),n=null},450:function(e,t,o){var a=o(301),s=o(782),c=o(254),u=o(726),l=c.IncomingMessage,f=c.readyStates,h=e.exports=function(e){var t,r,n,o=this;u.Writable.call(o),o._opts=e,o._body=[],o._headers={},e.auth&&o.setHeader("Authorization","Basic "+i.from(e.auth).toString("base64")),Object.keys(e.headers).forEach(function(t){o.setHeader(t,e.headers[t])});var s=!0;if("disable-fetch"===e.mode||"requestTimeout"in e&&!a.abortController)s=!1,n=!0;else if("prefer-streaming"===e.mode)n=!1;else if("allow-wrong-content-type"===e.mode)n=!a.overrideMimeType;else if(e.mode&&"default"!==e.mode&&"prefer-fast"!==e.mode)throw Error("Invalid value for opts.mode");else n=!0;o._mode=(t=n,r=s,a.fetch&&r?"fetch":a.mozchunkedarraybuffer?"moz-chunked-arraybuffer":a.msstream?"ms-stream":a.arraybuffer&&t?"arraybuffer":"text"),o._fetchTimer=null,o.on("finish",function(){o._onFinish()})};s(h,u.Writable),h.prototype.setHeader=function(e,t){var r=e.toLowerCase();-1===d.indexOf(r)&&(this._headers[r]={name:e,value:t})},h.prototype.getHeader=function(e){var t=this._headers[e.toLowerCase()];return t?t.value:null},h.prototype.removeHeader=function(e){delete this._headers[e.toLowerCase()]},h.prototype._onFinish=function(){var e=this;if(!e._destroyed){var t=e._opts,i=e._headers,o=null;"GET"!==t.method&&"HEAD"!==t.method&&(o=new Blob(e._body,{type:(i["content-type"]||{}).value||""}));var s=[];
2if(Object.keys(i).forEach(function(e){var t=i[e].name,r=i[e].value;Array.isArray(r)?r.forEach(function(e){s.push([t,e])}):s.push([t,r])}),"fetch"===e._mode){var c=null;if(a.abortController){var u=new AbortController;c=u.signal,e._fetchAbortController=u,"requestTimeout"in t&&0!==t.requestTimeout&&(e._fetchTimer=r.g.setTimeout(function(){e.emit("requestTimeout"),e._fetchAbortController&&e._fetchAbortController.abort()},t.requestTimeout))}r.g.fetch(e._opts.url,{method:e._opts.method,headers:s,body:o||void 0,mode:"cors",credentials:t.withCredentials?"include":"same-origin",signal:c}).then(function(t){e._fetchResponse=t,e._connect()},function(t){r.g.clearTimeout(e._fetchTimer),e._destroyed||e.emit("error",t)})}else{var l=e._xhr=new r.g.XMLHttpRequest;try{l.open(e._opts.method,e._opts.url,!0)}catch(t){n.nextTick(function(){e.emit("error",t)});return}"responseType"in l&&(l.responseType=e._mode),"withCredentials"in l&&(l.withCredentials=!!t.withCredentials),"text"===e._mode&&"overrideMimeType"in l&&l.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in t&&(l.timeout=t.requestTimeout,l.ontimeout=function(){e.emit("requestTimeout")}),s.forEach(function(e){l.setRequestHeader(e[0],e[1])}),e._response=null,l.onreadystatechange=function(){switch(l.readyState){case f.LOADING:case f.DONE:e._onXHRProgress()}},"moz-chunked-arraybuffer"===e._mode&&(l.onprogress=function(){e._onXHRProgress()}),l.onerror=function(){e._destroyed||e.emit("error",Error("XHR error"))};try{l.send(o)}catch(t){n.nextTick(function(){e.emit("error",t)});return}}}},h.prototype._onXHRProgress=function(){(function(e){try{var t=e.status;return null!==t&&0!==t}catch(e){return!1}})(this._xhr)&&!this._destroyed&&(this._response||this._connect(),this._response._onXHRProgress())},h.prototype._connect=function(){var e=this;e._destroyed||(e._response=new l(e._xhr,e._fetchResponse,e._mode,e._fetchTimer),e._response.on("error",function(t){e.emit("error",t)}),e.emit("response",e._response))},h.prototype._write=function(e,t,r){this._body.push(e),r()},h.prototype.abort=h.prototype.destroy=function(){this._destroyed=!0,r.g.clearTimeout(this._fetchTimer),this._response&&(this._response._destroyed=!0),this._xhr?this._xhr.abort():this._fetchAbortController&&this._fetchAbortController.abort()},h.prototype.end=function(e,t,r){"function"==typeof e&&(r=e,e=void 0),u.Writable.prototype.end.call(this,e,t,r)},h.prototype.flushHeaders=function(){},h.prototype.setTimeout=function(){},h.prototype.setNoDelay=function(){},h.prototype.setSocketKeepAlive=function(){};var d=["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(e,t,o){var a=o(301),s=o(782),c=o(726),u=t.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},l=t.IncomingMessage=function(e,t,o,s){var u=this;if(c.Readable.call(u),u._mode=o,u.headers={},u.rawHeaders=[],u.trailers={},u.rawTrailers=[],u.on("end",function(){n.nextTick(function(){u.emit("close")})}),"fetch"===o){if(u._fetchResponse=t,u.url=t.url,u.statusCode=t.status,u.statusMessage=t.statusText,t.headers.forEach(function(e,t){u.headers[t.toLowerCase()]=e,u.rawHeaders.push(t,e)}),a.writableStream){var l=new WritableStream({write:function(e){return new Promise(function(t,r){u._destroyed?r():u.push(i.from(e))?t():u._resumeFetch=t})},close:function(){r.g.clearTimeout(s),u._destroyed||u.push(null)},abort:function(e){u._destroyed||u.emit("error",e)}});try{t.body.pipeTo(l).catch(function(e){r.g.clearTimeout(s),u._destroyed||u.emit("error",e)});return}catch(e){}}var f=t.body.getReader();!function e(){f.read().then(function(t){if(!u._destroyed){if(t.done){r.g.clearTimeout(s),u.push(null);return}u.push(i.from(t.value)),e()}}).catch(function(e){r.g.clearTimeout(s),u._destroyed||u.emit("error",e)})}()}else if(u._xhr=e,u._pos=0,u.url=e.responseURL,u.statusCode=e.status,u.statusMessage=e.statusText,e.getAllResponseHeaders().split(/\r?\n/).forEac
2h(function(e){var t=e.match(/^([^:]+):\s*(.*)/);if(t){var r=t[1].toLowerCase();"set-cookie"===r?(void 0===u.headers[r]&&(u.headers[r]=[]),u.headers[r].push(t[2])):void 0!==u.headers[r]?u.headers[r]+=", "+t[2]:u.headers[r]=t[2],u.rawHeaders.push(t[1],t[2])}}),u._charset="x-user-defined",!a.overrideMimeType){var h=u.rawHeaders["mime-type"];if(h){var d=h.match(/;\s*charset=([^;])(;|$)/);d&&(u._charset=d[1].toLowerCase())}u._charset||(u._charset="utf-8")}};s(l,c.Readable),l.prototype._read=function(){var e=this._resumeFetch;e&&(this._resumeFetch=null,e())},l.prototype._onXHRProgress=function(){var e=this,t=e._xhr,n=null;switch(e._mode){case"text":if((n=t.responseText).length>e._pos){var o=n.substr(e._pos);if("x-user-defined"===e._charset){for(var a=i.alloc(o.length),s=0;s<o.length;s++)a[s]=255&o.charCodeAt(s);e.push(a)}else e.push(o,e._charset);e._pos=n.length}break;case"arraybuffer":if(t.readyState!==u.DONE||!t.response)break;n=t.response,e.push(i.from(new Uint8Array(n)));break;case"moz-chunked-arraybuffer":if(n=t.response,t.readyState!==u.LOADING||!n)break;e.push(i.from(new Uint8Array(n)));break;case"ms-stream":if(n=t.response,t.readyState!==u.LOADING)break;var c=new r.g.MSStreamReader;c.onprogress=function(){c.result.byteLength>e._pos&&(e.push(i.from(new Uint8Array(c.result.slice(e._pos)))),e._pos=c.result.byteLength)},c.onload=function(){e.push(null)},c.readAsArrayBuffer(n)}e._xhr.readyState===u.DONE&&"ms-stream"!==e._mode&&e.push(null)}},704:function(e,t,r){"use strict";var n=r(55).Buffer,i=n.isEncoding||function(e){switch((e=""+e)&&e.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 o(e){var t;switch(this.encoding=function(e){var t=function(e){var t;if(!e)return"utf8";for(;;)switch(e){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 e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(n.isEncoding===i||!i(e)))throw Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=c,this.end=u,t=4;break;case"utf8":this.fillLast=s,t=4;break;case"base64":this.text=l,this.end=f,t=3;break;default:this.write=h,this.end=d;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function a(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function s(e){var t=this.lastTotal-this.lastNeed,r=function(e,t,r){if((192&t[0])!=128)return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if((192&t[1])!=128)return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&(192&t[2])!=128)return e.lastNeed=2,"�"}}(this,e,0);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):void(e.copy(this.lastChar,t,0,e.length),this.lastNeed-=e.length)}function c(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function u(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function l(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function f(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function h(e){return e.toString(this.encoding)}function d(e){return e&&e.length?this.write(e):""}t.s=o,o.prototype.write=function(e){var t,r;if(0===e.length)return"";if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""},o.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},o.prototype.text=function(e,t){var r=function(e,t,r){var n=t.length-1;if(n<r)return 0;var i=a(t[n]);return i>=0?(i>0&&(e.lastNeed=i-1),i):--n<r||-2===i?0:(i=a(t[n]))>=0?(i>0&&(e.lastNeed=i-2),i):--n<r||-2===i?0:(i=a(t[n]))>=0?(i>0&&(2===i?i=0:e.lastNeed=i-3),i):0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},o.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},769:function(e){e.exports=function(e,r){if(t("noDeprecation"))return e;var n=!1;
2return function(){if(!n){if(t("throwDeprecation"))throw Error(r);t("traceDeprecation")?console.trace(r):console.warn(r),n=!0}return e.apply(this,arguments)}};function t(e){try{if(!r.g.localStorage)return!1}catch(e){return!1}var t=r.g.localStorage[e];return null!=t&&"true"===String(t).toLowerCase()}},911:function(e){e.exports=function(){for(var e={},r=0;r<arguments.length;r++){var n=arguments[r];for(var i in n)t.call(n,i)&&(e[i]=n[i])}return e};var t=Object.prototype.hasOwnProperty},300:function(e){"use strict";e.exports=r(82957)},361:function(e){"use strict";e.exports=r(55445)},781:function(e){"use strict";e.exports=r(97501)},310:function(e){"use strict";e.exports=r(93813)},837:function(e){"use strict";e.exports=r(85508)}},o={};function a(e){var r=o[e];if(void 0!==r)return r.exports;var n=o[e]={exports:{}},i=!0;try{t[e](n,n.exports,a),i=!1}finally{i&&delete o[e]}return n.exports}a.ab="//";var s=a(813);e.exports=s}()},98015:function(e){"use strict";var t=function(e){return e!=e};e.exports=function(e,r){return 0===e&&0===r?1/e==1/r:!!(e===r||t(e)&&t(r))}},60466:function(e,t,r){"use strict";var n=r(53733),i=r(72884),o=r(98015),a=r(22550),s=r(38317),c=i(a(),Object);n(c,{getPolyfill:a,implementation:o,shim:s}),e.exports=c},22550:function(e,t,r){"use strict";var n=r(98015);e.exports=function(){return"function"==typeof Object.is?Object.is:n}},38317:function(e,t,r){"use strict";var n=r(22550),i=r(53733);e.exports=function(){var e=n();return i(Object,{is:e},{is:function(){return Object.is!==e}}),e}},76346:function(e,t,r){"use strict";let{ErrorWithCause:n}=r(54170),{findCauseByReference:i,getErrorCause:o,messageWithCauses:a,stackWithCauses:s}=r(91430);e.exports={ErrorWithCause:n,findCauseByReference:i,getErrorCause:o,stackWithCauses:s,messageWithCauses:a}},54170:function(e){"use strict";class t extends Error{constructor(e,{cause:r}={}){super(e),this.name=t.name,r&&(this.cause=r),this.message=e}}e.exports={ErrorWithCause:t}},91430:function(e){"use strict";let t=e=>{if(e&&"object"==typeof e&&"cause"in e){if("function"!=typeof e.cause)return e.cause instanceof Error?e.cause:void 0;{let t=e.cause();return t instanceof Error?t:void 0}}},r=(e,n)=>{if(!(e instanceof Error))return"";let i=e.stack||"";if(n.has(e))return i+"\ncauses have become circular...";let o=t(e);return o?(n.add(e),i+"\ncaused by: "+r(o,n)):i},n=(e,r,i)=>{if(!(e instanceof Error))return"";let o=i?"":e.message||"";if(r.has(e))return o+": ...";let a=t(e);if(!a)return o;{r.add(e);let t="cause"in e&&"function"==typeof e.cause;return o+(t?"":": ")+n(a,r,t)}};e.exports={findCauseByReference:(e,r)=>{if(!e||!r||!(e instanceof Error)||!(r.prototype instanceof Error)&&r!==Error)return;let n=new Set,i=e;for(;i&&!n.has(i);){if(n.add(i),i instanceof r)return i;i=t(i)}},getErrorCause:t,stackWithCauses:e=>r(e,new Set),messageWithCauses:e=>n(e,new Set)}},98365:function(e,t,r){let n=Symbol("SemVer ANY");class i{static get ANY(){return n}constructor(e,t){if(t=o(t),e instanceof i){if(!!t.loose===e.loose)return e;e=e.value}u("comparator",e=e.trim().split(/\s+/).join(" "),t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===n?this.value="":this.value=this.operator+this.semver.version,u("comp",this)}parse(e){let t=this.options.loose?a[s.COMPARATORLOOSE]:a[s.COMPARATOR],r=e.match(t);if(!r)throw TypeError(`Invalid comparator: ${e}`);this.operator=void 0!==r[1]?r[1]:"","="===this.operator&&(this.operator=""),r[2]?this.semver=new l(r[2],this.options.loose):this.semver=n}toString(){return this.value}test(e){if(u("Comparator.test",e,this.options.loose),this.semver===n||e===n)return!0;if("string"==typeof e)try{e=new l(e,this.options)}catch(e){return!1}return c(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof i))throw TypeError("a Comparator is required");return""===this.operator?""===this.value||new f(e.value,t).test(this.value):""===e.operator?""===e.value||new f(this.value,t).test(e.semver):!((t=o(t)).includePrerelease&&("<0.0.0-0"===this.value||"<0.0.0-0"===e.value)||!t.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0")))&&!!(this.operator.startsWith(">")&&e.operator.startsWith(">")||this.operator.startsWith("<")&&e.operator.startsWith("<")||this.semver.version===e.semver.version&&this.operator.includes("=")&&e.operator.includes("=")||c(this.semver,"<",e.semver,t)&&this.operator.startsWith(">")&&e.operator.startsWith("<")||c(this.semver,">",e.semver,t)&&this.operator.startsWith("<")&&e.operator.startsWith(">"))}}e.exports=i;
2let o=r(56573),{safeRe:a,t:s}=r(61834),c=r(74526),u=r(37481),l=r(61269),f=r(96308)},96308:function(e,t,r){let n=/\s+/g;class i{constructor(e,t){if(t=a(t),e instanceof i){if(!!t.loose===e.loose&&!!t.includePrerelease===e.includePrerelease)return e;return new i(e.raw,t)}if(e instanceof s)return this.raw=e.value,this.set=[[e]],this.formatted=void 0,this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e.trim().replace(n," "),this.set=this.raw.split("||").map(e=>this.parseRange(e.trim())).filter(e=>e.length),!this.set.length)throw TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let e=this.set[0];if(this.set=this.set.filter(e=>!y(e[0])),0===this.set.length)this.set=[e];else if(this.set.length>1){for(let e of this.set)if(1===e.length&&b(e[0])){this.set=[e];break}}}this.formatted=void 0}get range(){if(void 0===this.formatted){this.formatted="";for(let e=0;e<this.set.length;e++){e>0&&(this.formatted+="||");let t=this.set[e];for(let e=0;e<t.length;e++)e>0&&(this.formatted+=" "),this.formatted+=t[e].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){let t=((this.options.includePrerelease&&m)|(this.options.loose&&g))+":"+e,r=o.get(t);if(r)return r;let n=this.options.loose,i=n?l[f.HYPHENRANGELOOSE]:l[f.HYPHENRANGE];c("hyphen replace",e=e.replace(i,R(this.options.includePrerelease))),c("comparator trim",e=e.replace(l[f.COMPARATORTRIM],h)),c("tilde trim",e=e.replace(l[f.TILDETRIM],d)),c("caret trim",e=e.replace(l[f.CARETTRIM],p));let a=e.split(" ").map(e=>E(e,this.options)).join(" ").split(/\s+/).map(e=>T(e,this.options));n&&(a=a.filter(e=>(c("loose invalid filter",e,this.options),!!e.match(l[f.COMPARATORLOOSE])))),c("range list",a);let u=new Map;for(let e of a.map(e=>new s(e,this.options))){if(y(e))return[e];u.set(e.value,e)}u.size>1&&u.has("")&&u.delete("");let b=[...u.values()];return o.set(t,b),b}intersects(e,t){if(!(e instanceof i))throw TypeError("a Range is required");return this.set.some(r=>v(r,t)&&e.set.some(e=>v(e,t)&&r.every(r=>e.every(e=>r.intersects(e,t)))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new u(e,this.options)}catch(e){return!1}for(let t=0;t<this.set.length;t++)if(B(this.set[t],e,this.options))return!0;return!1}}e.exports=i;let o=new(r(88911)),a=r(56573),s=r(98365),c=r(37481),u=r(61269),{safeRe:l,t:f,comparatorTrimReplace:h,tildeTrimReplace:d,caretTrimReplace:p}=r(61834),{FLAG_INCLUDE_PRERELEASE:m,FLAG_LOOSE:g}=r(52310),y=e=>"<0.0.0-0"===e.value,b=e=>""===e.value,v=(e,t)=>{let r=!0,n=e.slice(),i=n.pop();for(;r&&n.length;)r=n.every(e=>i.intersects(e,t)),i=n.pop();return r},E=(e,t)=>(c("comp",e,t),c("caret",e=S(e,t)),c("tildes",e=_(e,t)),c("xrange",e=P(e,t)),c("stars",e=k(e,t)),e),w=e=>!e||"x"===e.toLowerCase()||"*"===e,_=(e,t)=>e.trim().split(/\s+/).map(e=>x(e,t)).join(" "),x=(e,t)=>{let r=t.loose?l[f.TILDELOOSE]:l[f.TILDE];return e.replace(r,(t,r,n,i,o)=>{let a;return c("tilde",e,t,r,n,i,o),w(r)?a="":w(n)?a=`>=${r}.0.0 <${+r+1}.0.0-0`:w(i)?a=`>=${r}.${n}.0 <${r}.${+n+1}.0-0`:o?(c("replaceTilde pr",o),a=`>=${r}.${n}.${i}-${o} <${r}.${+n+1}.0-0`):a=`>=${r}.${n}.${i} <${r}.${+n+1}.0-0`,c("tilde return",a),a})},S=(e,t)=>e.trim().split(/\s+/).map(e=>A(e,t)).join(" "),A=(e,t)=>{c("caret",e,t);let r=t.loose?l[f.CARETLOOSE]:l[f.CARET],n=t.includePrerelease?"-0":"";return e.replace(r,(t,r,i,o,a)=>{let s;return c("caret",e,t,r,i,o,a),w(r)?s="":w(i)?s=`>=${r}.0.0${n} <${+r+1}.0.0-0`:w(o)?s="0"===r?`>=${r}.${i}.0${n} <${r}.${+i+1}.0-0`:`>=${r}.${i}.0${n} <${+r+1}.0.0-0`:a?(c("replaceCaret pr",a),s="0"===r?"0"===i?`>=${r}.${i}.${o}-${a} <${r}.${i}.${+o+1}-0`:`>=${r}.${i}.${o}-${a} <${r}.${+i+1}.0-0`:`>=${r}.${i}.${o}-${a} <${+r+1}.0.0-0`):(c("no pr"),s="0"===r?"0"===i?`>=${r}.${i}.${o}${n} <${r}.${i}.${+o+1}-0`:`>=${r}.${i}.${o}${n} <${r}.${+i+1}.0-0`:`>=${r}.${i}.${o} <${+r+1}.0.0-0`),c("caret return",s),s})},P=(e,t)=>(c("replaceXRanges",e,t),e.split(/\s+/).map(e=>I(e,t)).join(" ")),I=(e,t)=>{e=e.trim();let r=t.loose?l[f.XRANGELOOSE]:l[f.XRANGE];return e.replace(r,(r,n,i,o,a,s)=>{c("xRange",e,r,n,i,o,a,s);let u=w(i),l=u||w(o),f=l||w(a);return"="===n&&f&&(n=""),s=t.includePrerelease?"-0":"",u?r=">"===n||"<"===n?"<0.0.0-0":"*":n&&f?(l&&(o=0),a=0,">"===n?(n=">=",l?(i=+i+1,o=0):o=+o+1,a=0):"<="===n&&(n="<",l?i=+i+1:o=+o+1),"<"===n&&(s="-0"),r=`${n+i}.${o}.${a}${s}`):l?r=`>=${i}.0.0${s} <${+i+1}.0.0-0`:f&&(r=`>=${i}.${o}.0${s} <${i}.${+o+1}.0-0`),c("xRange return",r),r})},k=(e,t)=>(c("replaceStars",e,t),e.trim().replace(l[f.STAR],"")),T=(e,t)=>
2(c("replaceGTE0",e,t),e.trim().replace(l[t.includePrerelease?f.GTE0PRE:f.GTE0],"")),R=e=>(t,r,n,i,o,a,s,c,u,l,f,h)=>(r=w(n)?"":w(i)?`>=${n}.0.0${e?"-0":""}`:w(o)?`>=${n}.${i}.0${e?"-0":""}`:a?`>=${r}`:`>=${r}${e?"-0":""}`,c=w(u)?"":w(l)?`<${+u+1}.0.0-0`:w(f)?`<${u}.${+l+1}.0-0`:h?`<=${u}.${l}.${f}-${h}`:e?`<${u}.${l}.${+f+1}-0`:`<=${c}`,`${r} ${c}`.trim()),B=(e,t,r)=>{for(let r=0;r<e.length;r++)if(!e[r].test(t))return!1;if(t.prerelease.length&&!r.includePrerelease){for(let r=0;r<e.length;r++)if(c(e[r].semver),e[r].semver!==s.ANY&&e[r].semver.prerelease.length>0){let n=e[r].semver;if(n.major===t.major&&n.minor===t.minor&&n.patch===t.patch)return!0}return!1}return!0}},61269:function(e,t,r){let n=r(37481),{MAX_LENGTH:i,MAX_SAFE_INTEGER:o}=r(52310),{safeRe:a,t:s}=r(61834),c=r(56573),{compareIdentifiers:u}=r(13751);class l{constructor(e,t){if(t=c(t),e instanceof l){if(!!t.loose===e.loose&&!!t.includePrerelease===e.includePrerelease)return e;e=e.version}else if("string"!=typeof e)throw TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>i)throw TypeError(`version is longer than ${i} characters`);n("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;let r=e.trim().match(t.loose?a[s.LOOSE]:a[s.FULL]);if(!r)throw TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>o||this.major<0)throw TypeError("Invalid major version");if(this.minor>o||this.minor<0)throw TypeError("Invalid minor version");if(this.patch>o||this.patch<0)throw TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map(e=>{if(/^[0-9]+$/.test(e)){let t=+e;if(t>=0&&t<o)return t}return e}):this.prerelease=[],this.build=r[5]?r[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(e){if(n("SemVer.compare",this.version,this.options,e),!(e instanceof l)){if("string"==typeof e&&e===this.version)return 0;e=new l(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof l||(e=new l(e,this.options)),u(this.major,e.major)||u(this.minor,e.minor)||u(this.patch,e.patch)}comparePre(e){if(e instanceof l||(e=new l(e,this.options)),this.prerelease.length&&!e.prerelease.length)return -1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{let r=this.prerelease[t],i=e.prerelease[t];if(n("prerelease compare",t,r,i),void 0===r&&void 0===i)return 0;if(void 0===i)return 1;if(void 0===r)return -1;if(r===i)continue;else return u(r,i)}while(++t)}compareBuild(e){e instanceof l||(e=new l(e,this.options));let t=0;do{let r=this.build[t],i=e.build[t];if(n("build compare",t,r,i),void 0===r&&void 0===i)return 0;if(void 0===i)return 1;if(void 0===r)return -1;if(r===i)continue;else return u(r,i)}while(++t)}inc(e,t,r){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t,r);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t,r);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t,r),this.inc("pre",t,r);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t,r),this.inc("pre",t,r);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 e=Number(r)?1:0;if(!t&&!1===r)throw Error("invalid increment argument: identifier is empty");if(0===this.prerelease.length)this.prerelease=[e];else{let n=this.prerelease.length;for(;--n>=0;)"number"==typeof this.prerelease[n]&&(this.prerelease[n]++,n=-2);
2if(-1===n){if(t===this.prerelease.join(".")&&!1===r)throw Error("invalid increment argument: identifier already exists");this.prerelease.push(e)}}if(t){let n=[t,e];!1===r&&(n=[t]),0===u(this.prerelease[0],t)?isNaN(this.prerelease[1])&&(this.prerelease=n):this.prerelease=n}break}default:throw Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}e.exports=l},74423:function(e,t,r){let n=r(86472);e.exports=(e,t)=>{let r=n(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null}},74526:function(e,t,r){let n=r(84429),i=r(54084),o=r(91877),a=r(54159),s=r(1749),c=r(74063);e.exports=(e,t,r,u)=>{switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e===r;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e!==r;case"":case"=":case"==":return n(e,r,u);case"!=":return i(e,r,u);case">":return o(e,r,u);case">=":return a(e,r,u);case"<":return s(e,r,u);case"<=":return c(e,r,u);default:throw TypeError(`Invalid operator: ${t}`)}}},6028:function(e,t,r){let n=r(61269),i=r(86472),{safeRe:o,t:a}=r(61834);e.exports=(e,t)=>{if(e instanceof n)return e;if("number"==typeof e&&(e=String(e)),"string"!=typeof e)return null;let r=null;if((t=t||{}).rtl){let n;let i=t.includePrerelease?o[a.COERCERTLFULL]:o[a.COERCERTL];for(;(n=i.exec(e))&&(!r||r.index+r[0].length!==e.length);)r&&n.index+n[0].length===r.index+r[0].length||(r=n),i.lastIndex=n.index+n[1].length+n[2].length;i.lastIndex=-1}else r=e.match(t.includePrerelease?o[a.COERCEFULL]:o[a.COERCE]);if(null===r)return null;let s=r[2],c=r[3]||"0",u=r[4]||"0",l=t.includePrerelease&&r[5]?`-${r[5]}`:"",f=t.includePrerelease&&r[6]?`+${r[6]}`:"";return i(`${s}.${c}.${u}${l}${f}`,t)}},17337:function(e,t,r){let n=r(61269);e.exports=(e,t,r)=>{let i=new n(e,r),o=new n(t,r);return i.compare(o)||i.compareBuild(o)}},78754:function(e,t,r){let n=r(75625);e.exports=(e,t)=>n(e,t,!0)},75625:function(e,t,r){let n=r(61269);e.exports=(e,t,r)=>new n(e,r).compare(new n(t,r))},42921:function(e,t,r){let n=r(86472);e.exports=(e,t)=>{let r=n(e,null,!0),i=n(t,null,!0),o=r.compare(i);if(0===o)return null;let a=o>0,s=a?r:i,c=a?i:r,u=!!s.prerelease.length;if(c.prerelease.length&&!u)return c.patch||c.minor?s.patch?"patch":s.minor?"minor":"major":"major";let l=u?"pre":"";return r.major!==i.major?l+"major":r.minor!==i.minor?l+"minor":r.patch!==i.patch?l+"patch":"prerelease"}},84429:function(e,t,r){let n=r(75625);e.exports=(e,t,r)=>0===n(e,t,r)},91877:function(e,t,r){let n=r(75625);e.exports=(e,t,r)=>n(e,t,r)>0},54159:function(e,t,r){let n=r(75625);e.exports=(e,t,r)=>n(e,t,r)>=0},60827:function(e,t,r){let n=r(61269);e.exports=(e,t,r,i,o)=>{"string"==typeof r&&(o=i,i=r,r=void 0);try{return new n(e instanceof n?e.version:e,r).inc(t,i,o).version}catch(e){return null}}},1749:function(e,t,r){let n=r(75625);e.exports=(e,t,r)=>0>n(e,t,r)},74063:function(e,t,r){let n=r(75625);e.exports=(e,t,r)=>0>=n(e,t,r)},87176:function(e,t,r){let n=r(61269);e.exports=(e,t)=>new n(e,t).major},38161:function(e,t,r){let n=r(61269);e.exports=(e,t)=>new n(e,t).minor},54084:function(e,t,r){let n=r(75625);e.exports=(e,t,r)=>0!==n(e,t,r)},86472:function(e,t,r){let n=r(61269);e.exports=(e,t,r=!1)=>{if(e instanceof n)return e;try{return new n(e,t)}catch(e){if(!r)return null;throw e}}},35516:function(e,t,r){let n=r(61269);e.exports=(e,t)=>new n(e,t).patch},95936:function(e,t,r){let n=r(86472);e.exports=(e,t)=>{let r=n(e,t);return r&&r.prerelease.length?r.prerelease:null}},723:function(e,t,r){let n=r(75625);e.exports=(e,t,r)=>n(t,e,r)},27415:function(e,t,r){let n=r(17337);e.exports=(e,t)=>e.sort((e,r)=>n(r,e,t))},60875:function(e,t,r){let n=r(96308);e.exports=(e,t,r)=>{try{t=new n(t,r)}catch(e){return!1}return t.test(e)}},63535:function(e,t,r){let n=r(17337);e.exports=(e,t)=>e.sort((e,r)=>n(e,r,t))},24121:function(e,t,r){let n=r(86472);e.exports=(e,t)=>{let r=n(e,t);return r?r.version:null}},67374:function(e,t,r){let n=r(61834),i=r(52310),o=r(61269),a=r(13751),s=r(86472),c=r(24121),u=r(74423),l=r(60827),f=r(42921),h=r(87176),d=r(38161),p=r(35516),m=r(95936),g=r(75625),y=r(723),b=r(78754),v=r(17337),E=r(63535),w=r(27415),_=r(91877),x=r(1749),S=r(84429),A=r(54084),P=r(54159),I=r(74063),k=r(74526
2),T=r(6028),R=r(98365),B=r(96308),O=r(60875),C=r(72705),N=r(96018),L=r(75899),F=r(36977),M=r(93274),D=r(55040),$=r(96953),j=r(18123),U=r(61679),H=r(72298),z=r(67411);e.exports={parse:s,valid:c,clean:u,inc:l,diff:f,major:h,minor:d,patch:p,prerelease:m,compare:g,rcompare:y,compareLoose:b,compareBuild:v,sort:E,rsort:w,gt:_,lt:x,eq:S,neq:A,gte:P,lte:I,cmp:k,coerce:T,Comparator:R,Range:B,satisfies:O,toComparators:C,maxSatisfying:N,minSatisfying:L,minVersion:F,validRange:M,outside:D,gtr:$,ltr:j,intersects:U,simplifyRange:H,subset:z,SemVer:o,re:n.re,src:n.src,tokens:n.t,SEMVER_SPEC_VERSION:i.SEMVER_SPEC_VERSION,RELEASE_TYPES:i.RELEASE_TYPES,compareIdentifiers:a.compareIdentifiers,rcompareIdentifiers:a.rcompareIdentifiers}},52310:function(e){let t=Number.MAX_SAFE_INTEGER||9007199254740991;e.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:t,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}},37481:function(e,t,r){var n=r(25566);let i="object"==typeof n&&n.env&&n.env.NODE_DEBUG&&/\bsemver\b/i.test(n.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};e.exports=i},13751:function(e){let t=/^[0-9]+$/,r=(e,r)=>{let n=t.test(e),i=t.test(r);return n&&i&&(e=+e,r=+r),e===r?0:n&&!i?-1:i&&!n?1:e<r?-1:1};e.exports={compareIdentifiers:r,rcompareIdentifiers:(e,t)=>r(t,e)}},88911:function(e){class t{constructor(){this.max=1e3,this.map=new Map}get(e){let t=this.map.get(e);if(void 0!==t)return this.map.delete(e),this.map.set(e,t),t}delete(e){return this.map.delete(e)}set(e,t){if(!this.delete(e)&&void 0!==t){if(this.map.size>=this.max){let e=this.map.keys().next().value;this.delete(e)}this.map.set(e,t)}return this}}e.exports=t},56573:function(e){let t=Object.freeze({loose:!0}),r=Object.freeze({});e.exports=e=>e?"object"!=typeof e?t:e:r},61834:function(e,t,r){let{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:i,MAX_LENGTH:o}=r(52310),a=r(37481),s=(t=e.exports={}).re=[],c=t.safeRe=[],u=t.src=[],l=t.t={},f=0,h="[a-zA-Z0-9-]",d=[["\\s",1],["\\d",o],[h,i]],p=e=>{for(let[t,r]of d)e=e.split(`${t}*`).join(`${t}{0,${r}}`).split(`${t}+`).join(`${t}{1,${r}}`);return e},m=(e,t,r)=>{let n=p(t),i=f++;a(e,i,t),l[e]=i,u[i]=t,s[i]=new RegExp(t,r?"g":void 0),c[i]=new RegExp(n,r?"g":void 0)};m("NUMERICIDENTIFIER","0|[1-9]\\d*"),m("NUMERICIDENTIFIERLOOSE","\\d+"),m("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${h}*`),m("MAINVERSION",`(${u[l.NUMERICIDENTIFIER]})\\.(${u[l.NUMERICIDENTIFIER]})\\.(${u[l.NUMERICIDENTIFIER]})`),m("MAINVERSIONLOOSE",`(${u[l.NUMERICIDENTIFIERLOOSE]})\\.(${u[l.NUMERICIDENTIFIERLOOSE]})\\.(${u[l.NUMERICIDENTIFIERLOOSE]})`),m("PRERELEASEIDENTIFIER",`(?:${u[l.NUMERICIDENTIFIER]}|${u[l.NONNUMERICIDENTIFIER]})`),m("PRERELEASEIDENTIFIERLOOSE",`(?:${u[l.NUMERICIDENTIFIERLOOSE]}|${u[l.NONNUMERICIDENTIFIER]})`),m("PRERELEASE",`(?:-(${u[l.PRERELEASEIDENTIFIER]}(?:\\.${u[l.PRERELEASEIDENTIFIER]})*))`),m("PRERELEASELOOSE",`(?:-?(${u[l.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${u[l.PRERELEASEIDENTIFIERLOOSE]})*))`),m("BUILDIDENTIFIER",`${h}+`),m("BUILD",`(?:\\+(${u[l.BUILDIDENTIFIER]}(?:\\.${u[l.BUILDIDENTIFIER]})*))`),m("FULLPLAIN",`v?${u[l.MAINVERSION]}${u[l.PRERELEASE]}?${u[l.BUILD]}?`),m("FULL",`^${u[l.FULLPLAIN]}$`),m("LOOSEPLAIN",`[v=\\s]*${u[l.MAINVERSIONLOOSE]}${u[l.PRERELEASELOOSE]}?${u[l.BUILD]}?`),m("LOOSE",`^${u[l.LOOSEPLAIN]}$`),m("GTLT","((?:<|>)?=?)"),m("XRANGEIDENTIFIERLOOSE",`${u[l.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),m("XRANGEIDENTIFIER",`${u[l.NUMERICIDENTIFIER]}|x|X|\\*`),m("XRANGEPLAIN",`[v=\\s]*(${u[l.XRANGEIDENTIFIER]})(?:\\.(${u[l.XRANGEIDENTIFIER]})(?:\\.(${u[l.XRANGEIDENTIFIER]})(?:${u[l.PRERELEASE]})?${u[l.BUILD]}?)?)?`),m("XRANGEPLAINLOOSE",`[v=\\s]*(${u[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${u[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${u[l.XRANGEIDENTIFIERLOOSE]})(?:${u[l.PRERELEASELOOSE]})?${u[l.BUILD]}?)?)?`),m("XRANGE",`^${u[l.GTLT]}\\s*${u[l.XRANGEPLAIN]}$`),m("XRANGELOOSE",`^${u[l.GTLT]}\\s*${u[l.XRANGEPLAINLOOSE]}$`),m("COERCEPLAIN",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?`),m("COERCE",`${u[l.COERCEPLAIN]}(?:$|[^\\d])`),m("COERCEFULL",u[l.COERCEPLAIN]+`(?:${u[l.PRERELEASE]})?`+`(?:${u[l.BUILD]})?`+"(?:$|[^\\d])"),m("COERCERTL",u[l.COERCE],!0),m("COERCERTLFULL",u[l.COERCEFULL],!0),m("LONETILDE","(?:~>?)"),m("TILDETRIM",`(\\s*)${u[l.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",m("TILDE",`^${u[l.LONETILDE]}${u[l.XRANGEPLAIN]}$`),m("TILDELOOSE",`^${u[l.LONETILDE]}${u[l.XRANGEPLAINLOOSE]}$`),m("LONECARET","(?:\\^)"),m("CARETTRIM",`(\\s*)${u[l.LONECARET]}
2\\s+`,!0),t.caretTrimReplace="$1^",m("CARET",`^${u[l.LONECARET]}${u[l.XRANGEPLAIN]}$`),m("CARETLOOSE",`^${u[l.LONECARET]}${u[l.XRANGEPLAINLOOSE]}$`),m("COMPARATORLOOSE",`^${u[l.GTLT]}\\s*(${u[l.LOOSEPLAIN]})$|^$`),m("COMPARATOR",`^${u[l.GTLT]}\\s*(${u[l.FULLPLAIN]})$|^$`),m("COMPARATORTRIM",`(\\s*)${u[l.GTLT]}\\s*(${u[l.LOOSEPLAIN]}|${u[l.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",m("HYPHENRANGE",`^\\s*(${u[l.XRANGEPLAIN]})\\s+-\\s+(${u[l.XRANGEPLAIN]})\\s*$`),m("HYPHENRANGELOOSE",`^\\s*(${u[l.XRANGEPLAINLOOSE]})\\s+-\\s+(${u[l.XRANGEPLAINLOOSE]})\\s*$`),m("STAR","(<|>)?=?\\s*\\*"),m("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),m("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")},96953:function(e,t,r){let n=r(55040);e.exports=(e,t,r)=>n(e,t,">",r)},61679:function(e,t,r){let n=r(96308);e.exports=(e,t,r)=>(e=new n(e,r),t=new n(t,r),e.intersects(t,r))},18123:function(e,t,r){let n=r(55040);e.exports=(e,t,r)=>n(e,t,"<",r)},96018:function(e,t,r){let n=r(61269),i=r(96308);e.exports=(e,t,r)=>{let o=null,a=null,s=null;try{s=new i(t,r)}catch(e){return null}return e.forEach(e=>{s.test(e)&&(!o||-1===a.compare(e))&&(a=new n(o=e,r))}),o}},75899:function(e,t,r){let n=r(61269),i=r(96308);e.exports=(e,t,r)=>{let o=null,a=null,s=null;try{s=new i(t,r)}catch(e){return null}return e.forEach(e=>{s.test(e)&&(!o||1===a.compare(e))&&(a=new n(o=e,r))}),o}},36977:function(e,t,r){let n=r(61269),i=r(96308),o=r(91877);e.exports=(e,t)=>{e=new i(e,t);let r=new n("0.0.0");if(e.test(r)||(r=new n("0.0.0-0"),e.test(r)))return r;r=null;for(let t=0;t<e.set.length;++t){let i=e.set[t],a=null;i.forEach(e=>{let t=new n(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":(!a||o(t,a))&&(a=t);break;case"<":case"<=":break;default:throw Error(`Unexpected operation: ${e.operator}`)}}),a&&(!r||o(r,a))&&(r=a)}return r&&e.test(r)?r:null}},55040:function(e,t,r){let n=r(61269),i=r(98365),{ANY:o}=i,a=r(96308),s=r(60875),c=r(91877),u=r(1749),l=r(74063),f=r(54159);e.exports=(e,t,r,h)=>{let d,p,m,g,y;switch(e=new n(e,h),t=new a(t,h),r){case">":d=c,p=l,m=u,g=">",y=">=";break;case"<":d=u,p=f,m=c,g="<",y="<=";break;default:throw TypeError('Must provide a hilo val of "<" or ">"')}if(s(e,t,h))return!1;for(let r=0;r<t.set.length;++r){let n=t.set[r],a=null,s=null;if(n.forEach(e=>{e.semver===o&&(e=new i(">=0.0.0")),a=a||e,s=s||e,d(e.semver,a.semver,h)?a=e:m(e.semver,s.semver,h)&&(s=e)}),a.operator===g||a.operator===y||(!s.operator||s.operator===g)&&p(e,s.semver)||s.operator===y&&m(e,s.semver))return!1}return!0}},72298:function(e,t,r){let n=r(60875),i=r(75625);e.exports=(e,t,r)=>{let o=[],a=null,s=null,c=e.sort((e,t)=>i(e,t,r));for(let e of c)n(e,t,r)?(s=e,a||(a=e)):(s&&o.push([a,s]),s=null,a=null);a&&o.push([a,null]);let u=[];for(let[e,t]of o)e===t?u.push(e):t||e!==c[0]?t?e===c[0]?u.push(`<=${t}`):u.push(`${e} - ${t}`):u.push(`>=${e}`):u.push("*");let l=u.join(" || "),f="string"==typeof t.raw?t.raw:String(t);return l.length<f.length?l:t}},67411:function(e,t,r){let n=r(96308),i=r(98365),{ANY:o}=i,a=r(60875),s=r(75625),c=[new i(">=0.0.0-0")],u=[new i(">=0.0.0")],l=(e,t,r)=>{let n,i,l,d,p,m,g;if(e===t)return!0;if(1===e.length&&e[0].semver===o){if(1===t.length&&t[0].semver===o)return!0;e=r.includePrerelease?c:u}if(1===t.length&&t[0].semver===o){if(r.includePrerelease)return!0;t=u}let y=new Set;for(let t of e)">"===t.operator||">="===t.operator?n=f(n,t,r):"<"===t.operator||"<="===t.operator?i=h(i,t,r):y.add(t.semver);if(y.size>1||n&&i&&((l=s(n.semver,i.semver,r))>0||0===l&&(">="!==n.operator||"<="!==i.operator)))return null;for(let e of y){if(n&&!a(e,String(n),r)||i&&!a(e,String(i),r))return null;for(let n of t)if(!a(e,String(n),r))return!1;return!0}let b=!!i&&!r.includePrerelease&&!!i.semver.prerelease.length&&i.semver,v=!!n&&!r.includePrerelease&&!!n.semver.prerelease.length&&n.semver;for(let e of(b&&1===b.prerelease.length&&"<"===i.operator&&0===b.prerelease[0]&&(b=!1),t)){if(g=g||">"===e.operator||">="===e.operator,m=m||"<"===e.operator||"<="===e.operator,n){if(v&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===v.major&&e.semver.minor===v.minor&&e.semver.patch===v.patch&&(v=!1),">"===e.operator||">="===e.operator){if((d=f(n,e,r))===e&&d!==n)return!1}else if(">="===n.operator&&!a(n.semver,String(e),r))return!1}if(i){if(b&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===b.major&&e.semver.minor===b.minor&&e.semver.patch===b.patch&&(b=!1),"<"===e.operator||"<="===e.operator){if((
2p=h(i,e,r))===e&&p!==i)return!1}else if("<="===i.operator&&!a(i.semver,String(e),r))return!1}if(!e.operator&&(i||n)&&0!==l)return!1}return(!n||!m||!!i||0===l)&&(!i||!g||!!n||0===l)&&!v&&!b},f=(e,t,r)=>{if(!e)return t;let n=s(e.semver,t.semver,r);return n>0?e:n<0?t:">"===t.operator&&">="===e.operator?t:e},h=(e,t,r)=>{if(!e)return t;let n=s(e.semver,t.semver,r);return n<0?e:n>0?t:"<"===t.operator&&"<="===e.operator?t:e};e.exports=(e,t,r={})=>{if(e===t)return!0;e=new n(e,r),t=new n(t,r);let i=!1;t:for(let n of e.set){for(let e of t.set){let t=l(n,e,r);if(i=i||null!==t,t)continue t}if(i)return!1}return!0}},72705:function(e,t,r){let n=r(96308);e.exports=(e,t)=>new n(e,t).set.map(e=>e.map(e=>e.value).join(" ").trim().split(" "))},93274:function(e,t,r){let n=r(96308);e.exports=(e,t)=>{try{return new n(e,t).range||"*"}catch(e){return null}}},75807:function(e,t,r){!function(e){"use strict";var t,n=function(e){var t,r=new Float64Array(16);if(e)for(t=0;t<e.length;t++)r[t]=e[t];return r},i=function(){throw Error("no PRNG")},o=new Uint8Array(16),a=new Uint8Array(32);a[0]=9;var s=n(),c=n([1]),u=n([56129,1]),l=n([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),f=n([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),h=n([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),d=n([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),p=n([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function m(e,t,r,n){e[t]=r>>24&255,e[t+1]=r>>16&255,e[t+2]=r>>8&255,e[t+3]=255&r,e[t+4]=n>>24&255,e[t+5]=n>>16&255,e[t+6]=n>>8&255,e[t+7]=255&n}function g(e,t,r,n,i){var o,a=0;for(o=0;o<i;o++)a|=e[t+o]^r[n+o];return(1&a-1>>>8)-1}function y(e,t,r,n){return g(e,t,r,n,16)}function b(e,t,r,n){return g(e,t,r,n,32)}function v(e,t,r,n){!function(e,t,r,n){for(var i,o=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,a=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,s=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,c=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,u=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,l=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,f=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,h=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,d=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,p=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,m=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,g=255&r[16]|(255&r[17])<<8|(255&r[18])<<16|(255&r[19])<<24,y=255&r[20]|(255&r[21])<<8|(255&r[22])<<16|(255&r[23])<<24,b=255&r[24]|(255&r[25])<<8|(255&r[26])<<16|(255&r[27])<<24,v=255&r[28]|(255&r[29])<<8|(255&r[30])<<16|(255&r[31])<<24,E=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,w=o,_=a,x=s,S=c,A=u,P=l,I=f,k=h,T=d,R=p,B=m,O=g,C=y,N=b,L=v,F=E,M=0;M<20;M+=2)A^=(i=w+C|0)<<7|i>>>25,T^=(i=A+w|0)<<9|i>>>23,C^=(i=T+A|0)<<13|i>>>19,w^=(i=C+T|0)<<18|i>>>14,R^=(i=P+_|0)<<7|i>>>25,N^=(i=R+P|0)<<9|i>>>23,_^=(i=N+R|0)<<13|i>>>19,P^=(i=_+N|0)<<18|i>>>14,L^=(i=B+I|0)<<7|i>>>25,x^=(i=L+B|0)<<9|i>>>23,I^=(i=x+L|0)<<13|i>>>19,B^=(i=I+x|0)<<18|i>>>14,S^=(i=F+O|0)<<7|i>>>25,k^=(i=S+F|0)<<9|i>>>23,O^=(i=k+S|0)<<13|i>>>19,F^=(i=O+k|0)<<18|i>>>14,_^=(i=w+S|0)<<7|i>>>25,x^=(i=_+w|0)<<9|i>>>23,S^=(i=x+_|0)<<13|i>>>19,w^=(i=S+x|0)<<18|i>>>14,I^=(i=P+A|0)<<7|i>>>25,k^=(i=I+P|0)<<9|i>>>23,A^=(i=k+I|0)<<13|i>>>19,P^=(i=A+k|0)<<18|i>>>14,O^=(i=B+R|0)<<7|i>>>25,T^=(i=O+B|0)<<9|i>>>23,R^=(i=T+O|0)<<13|i>>>19,B^=(i=R+T|0)<<18|i>>>14,C^=(i=F+L|0)<<7|i>>>25,N^=(i=C+F|0)<<9|i>>>23,L^=(i=N+C|0)<<13|i>>>19,F^=(i=L+N|0)<<18|i>>>14;w=w+o|0,_=_+a|0,x=x+s|0,S=S+c|0,A=A+u|0,P=P+l|0,I=I+f|0,k=k+h|0,T=T+d|0,R=R+p|0,B=B+m|0,O=O+g|0,C=C+y|0,N=N+b|0,L=L+v|0,F=F+E|0,e[0]=w>>>0&255,e[1]=w>>>8&255,e[2]=w>>>16&255,e[3]=w>>>24&255,e[4]=_>>>0&255,e[5]=_>>>8&255,e[6]=_>>>16&255,e[7]=_>>>24&255,e[8]=x>>>0&255,e[9]=x>>>8&255,e[10]=x>>>16&255,e[11]=x>>>24&255,e[12]=S>>>0&255,e[13]=S>>>8&255,e[14]=S>>>16&255,e[15]=S>>>24&255,e[16]=A>>>0&255,e[17]=A>>>8&255,e[18]=A>>>16&255,e[19]=A>>>24&255,e[20]=P>>>0&255,e[21]=P>>>8&255,e[22]=P>>>16&255,e[23]=P>>>24&255,e[24]=I>>>0&255,e[25]=I>>>8&255,e[26]=I>>>16&255,e[27]=I>>>24&255,e[28]=k>>>0&255,e[29]=k>>>8&255,e[30]=k>>>16&255,e[31]=k>>>24&255,e[32]=T>>>0&255,e[33]=T>>>8&255,e[34]=T>>>16&255,e[35]=T>>>24&255,e[36]=R>>>0&255,e[37]=R>>>8&255,e[38]=R>>>16&255,e[39]=R>>>24&255,e[40]=B>>>0&255,e[41]=B>>>8&255,e[42]=B>>>16&255,e[43]=B>>>24&255,e[44]=O>>>0&255,e[45]=O>>>8&255,e[46]=O>>>16&255,e[47]=O>>>24&255,e[48]=C>>>0&255,e[49]=C>>>8&255,e[50]=C>>>16&255,e[51]=C>>>24&255,e[52]=N>>>0&255,e[53]=N>>>8&255,e[54]=N>>>16&255,e[55]=N>>>24&255,e[56]=L>>>0&255,e[57]=L>>>8&255,e[58]=L>>>16&255,e[59]=L>>>24&255,e[60]=F>>>0&255,e[61]=F>>>8&255,e[62]=F>>>16&255,e[63]=F>>>24&255}(e,t,r,n)}function E(e,t,r,n){!function(e,t,r,n){for(var i,o=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,a=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,s=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,c=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,u=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,l=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,f=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,h=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,d=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,p=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,m=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,g=255&r[16]|(255&r[17])<<8|(255&r[18])<<16|(255&r[19])<<24,y=255&r[20]|(255&r[21])<<8|(255&r[22])<<16|(255&r[23])<<24,b=255&r[24]|(255&r[25])<<8|(255&r[26])<<16|(255&r[27])<<24,v=255&r[28]|(255&r[29])<<8|(255&r[30])<<16|(255&r[31])<<24,E=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,w=o,_=a,x=s,S=c,A=u,P=l,I=f,k=h,T=d,R=p,B=m,O=g,C=y,N=b,L=v,F=E,M=0;M<20;M+=2)A^=(i=w+C|0)<<7|i>>>25,T^=(i=A+w|0)<<9|i>>>23,C^=(i=T+A|0)<<13|i>>>19,w^=(i=C+T|0)<<18|i>>>14,R^=(i=P+_|0)<<7|i>>>25,N^=(i=R+P|0)<<9|i>>>23,_^=(i=N+R|0)<<13|i>>>19,P^=(i=_+N|0)<<18|i>>>14,L^=(i=B+I|0)<<7|i>>>25,x^=(i=L+B|0)<<9|i>>>23,I^=(i=x+L|0)<<13|i>>>19,B^=(i=I+x|0)<<18|i>>>14,S^=(i=F+O|0)<<7|i>>>25,k^=(i=S+F|0)<<9|i>>>23,O^=(i=k+S|0)<<13|i>>>19,F^=(i=O+k|0)<<18|i>>>14,_^=(i=w+S|0)<<7|i>>>25,x^=(i=_+w|0)<<9|i>>>23,S^=(i=x+_|0)<<13|i>>>19,w^=(i=S+x|0)<<18|i>>>14,I^=(i=P+A|0)<<7|i>>>25,k^=(i=I+P|0)<<9|i>>>23,A^=(i=k+I|0)<<13|i>>>19,P^=(i=A+k|0)<<18|i>>>14,O^=(i=B+R|0)<<7|i>>>25,T^=(i=O+B|0)<<9|i>>>23,R^=(i=T+O|0)<<13|i>>>19,B^=(i=R+T|0)<<18|i>>>14,C^=(i=F+L|0)<<7|i>>>25,N^=(i=C+F|0)<<9|i>>>23,L^=(i=N+C|0)<<13|i>>>19,F^=(i=L+N|0)<<18|i>>>14;e[0]=w>>>0&255,e[1]=w>>>8&255,e[2]=w>>>16&255,e[3]=w>>>24&255,e[4]=P>>>0&255,e[5]=P>>>8&255,e[6]=P>>>16&255,e[7]=P>>>24&255,e[8]=B>>>0&255,e[9]=B>>>8&255,e[10]=B>>>16&255,e[11]=B>>>24&255,e[12]=F>>>0&255,e[13]=F>>>8&255,e[14]=F>>>16&255,e[15]=F>>>24&255,e[16]=I>>>0&255,e[17]=I>>>8&255,e[18]=I>>>16&255,e[19]=I>>>24&255,e[20]=k>>>0&255,e[21]=k>>>8&255,e[22]=k>>>16&255,e[23]=k>>>24&255,e[24]=T>>>0&255,e[25]=T>>>8&255,e[26]=T>>>16&255,e[27]=T>>>24&255,e[28]=R>>>0&255,e[29]=R>>>8&255,e[30]=R>>>16&255,e[31]=R>>>24&255}(e,t,r,n)}var w=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]);function _(e,t,r,n,i,o,a){var s,c,u=new Uint8Array(16),l=new Uint8Array(64);for(c=0;c<16;c++)u[c]=0;for(c=0;c<8;c++)u[c]=o[c];for(;i>=64;){for(v(l,u,a,w),c=0;c<64;c++)e[t+c]=r[n+c]^l[c];for(c=8,s=1;c<16;c++)s=s+(255&u[c])|0,u[c]=255&s,s>>>=8;i-=64,t+=64,n+=64}if(i>0)for(v(l,u,a,w),c=0;c<i;c++)e[t+c]=r[n+c]^l[c];return 0}function x(e,t,r,n,i){var o,a,s=new Uint8Array(16),c=new Uint8Array(64);for(a=0;a<16;a++)s[a]=0;for(a=0;a<8;a++)s[a]=n[a];for(;r>=64;){for(v(c,s,i,w),a=0;a<64;a++)e[t+a]=c[a];for(a=8,o=1;a<16;a++)o=o+(255&s[a])|0,s[a]=255&o,o>>>=8;r-=64,t+=64}if(r>0)for(v(c,s,i,w),a=0;a<r;a++)e[t+a]=c[a];return 0}function S(e,t,r,n,i){var o=new Uint8Array(32);E(o,n,i,w);for(var a=new Uint8Array(8),s=0;s<8;s++)a[s]=n[s+16];return x(e,t,r,a,o)}function A(e,t,r,n,i,o,a){var s=new Uint8Array(32);E(s,o,a,w);for(var c=new Uint8Array(8),u=0;u<8;u++)c[u]=o[u+16];return _(e,t,r,n,i,c,s)}var P=function(e){var t,r,n,i,o,a,s,c;this.buffer=new Uint8Array(16),this.r=new Uint16Array(10),this.h=new Uint16Array(10),this.pad=new Uint16Array(8),this.leftover=0,this.fin=0,t=255&e[0]|(255&e[1])<<8,this.r[0]=8191&t,r=255&e[2]|(255&e[3])<<8,this.r[1]=(t>>>13|r<<3)&8191,n=255&e[4]|(255&e[5])<<8,this.r[2]=(r>>>10|n<<6)&7939,i=255&e[6]|(255&e[7])<<8,this.r[3]=(n>>>7|i<<9)&8191,o=255&e[8]|(255&e[9])<<8,this.r[4]=(i>>>4|o<<12)&255,this.r[5]=o>>>1&8190,a=255&e[10]|(255&e[11])<<8,this.r[6]=(o>>>14|a<<2)&8191,s=255&e[12]|(255&e[13])<<8,this.r[7]=(a>>>11|s<<5)&8065,c=255&e[14]|(255&e[15])<<8,this.r[8]=(s>>>8|c<<8)&8191,this.r[9]=c>>>5&127,this.pad[0]=255&e[16]|(255&e[17])<<8,this.pad[1]=255&e[18]|(255&e[19])<<8,this.pad[2]=255&e[20]|(255&e[21])<<8,this.pad[3]=255&e[22]|(255&e[23])<<8,this.pad[4]=255&e[24]|(255&e[25])<<8,this.pad[5]=255&e[26]|(255&e[27])<<8,this.pad[6]=255&e[28]|(255&e[29])<<8,this.pad[7]=255&e[30]|(255&e[31])<<8};function I(e,t,r,n,i,o){var a=new P(o);return a.update(r,n,i),a.finish(e,t),0}function k(e,t,r,n,i,o){var a=new Uint8Array(16);return I(a,0,r,n,i,o),y(e,t,a,0)}function T(e,t,r,n,i){var o;if(r<32)return -1;for(A(e,0,t,0,r,n,i),I(e,16,e,32,r-32,e),o=0;o<16;o++)e[o]=0;return 0}function R(e,t,r,n,i){var o,a=new Uint8Array(32);if(r<32||(S(a,0,32,n,i),0!==k(t,16,t,32,r-32,a)))return -1;for(A(e,0,t,0,r,n,i),o=0;o<32;o++)e[o]=0;return 0}function B(e,t){var r;for(r=0;r<16;r++)e[r]=0|t[r]}function O(e){var t,r,n=1;for(t=0;t<16;t++)n=Math.floor((r=e[t]+n+65535)/65536),e[t]=r-65536*n;e[0]+=n-1+37*(n-1)}function C(e,t,r){for(var n,i=~(r-1),o=0;o<16;
2o++)n=i&(e[o]^t[o]),e[o]^=n,t[o]^=n}function N(e,t){var r,i,o,a=n(),s=n();for(r=0;r<16;r++)s[r]=t[r];for(O(s),O(s),O(s),i=0;i<2;i++){for(r=1,a[0]=s[0]-65517;r<15;r++)a[r]=s[r]-65535-(a[r-1]>>16&1),a[r-1]&=65535;a[15]=s[15]-32767-(a[14]>>16&1),o=a[15]>>16&1,a[14]&=65535,C(s,a,1-o)}for(r=0;r<16;r++)e[2*r]=255&s[r],e[2*r+1]=s[r]>>8}function L(e,t){var r=new Uint8Array(32),n=new Uint8Array(32);return N(r,e),N(n,t),b(r,0,n,0)}function F(e){var t=new Uint8Array(32);return N(t,e),1&t[0]}function M(e,t){var r;for(r=0;r<16;r++)e[r]=t[2*r]+(t[2*r+1]<<8);e[15]&=32767}function D(e,t,r){for(var n=0;n<16;n++)e[n]=t[n]+r[n]}function $(e,t,r){for(var n=0;n<16;n++)e[n]=t[n]-r[n]}function j(e,t,r){var n,i,o=0,a=0,s=0,c=0,u=0,l=0,f=0,h=0,d=0,p=0,m=0,g=0,y=0,b=0,v=0,E=0,w=0,_=0,x=0,S=0,A=0,P=0,I=0,k=0,T=0,R=0,B=0,O=0,C=0,N=0,L=0,F=r[0],M=r[1],D=r[2],$=r[3],j=r[4],U=r[5],H=r[6],z=r[7],G=r[8],Z=r[9],q=r[10],V=r[11],K=r[12],W=r[13],J=r[14],Y=r[15];o+=(n=t[0])*F,a+=n*M,s+=n*D,c+=n*$,u+=n*j,l+=n*U,f+=n*H,h+=n*z,d+=n*G,p+=n*Z,m+=n*q,g+=n*V,y+=n*K,b+=n*W,v+=n*J,E+=n*Y,a+=(n=t[1])*F,s+=n*M,c+=n*D,u+=n*$,l+=n*j,f+=n*U,h+=n*H,d+=n*z,p+=n*G,m+=n*Z,g+=n*q,y+=n*V,b+=n*K,v+=n*W,E+=n*J,w+=n*Y,s+=(n=t[2])*F,c+=n*M,u+=n*D,l+=n*$,f+=n*j,h+=n*U,d+=n*H,p+=n*z,m+=n*G,g+=n*Z,y+=n*q,b+=n*V,v+=n*K,E+=n*W,w+=n*J,_+=n*Y,c+=(n=t[3])*F,u+=n*M,l+=n*D,f+=n*$,h+=n*j,d+=n*U,p+=n*H,m+=n*z,g+=n*G,y+=n*Z,b+=n*q,v+=n*V,E+=n*K,w+=n*W,_+=n*J,x+=n*Y,u+=(n=t[4])*F,l+=n*M,f+=n*D,h+=n*$,d+=n*j,p+=n*U,m+=n*H,g+=n*z,y+=n*G,b+=n*Z,v+=n*q,E+=n*V,w+=n*K,_+=n*W,x+=n*J,S+=n*Y,l+=(n=t[5])*F,f+=n*M,h+=n*D,d+=n*$,p+=n*j,m+=n*U,g+=n*H,y+=n*z,b+=n*G,v+=n*Z,E+=n*q,w+=n*V,_+=n*K,x+=n*W,S+=n*J,A+=n*Y,f+=(n=t[6])*F,h+=n*M,d+=n*D,p+=n*$,m+=n*j,g+=n*U,y+=n*H,b+=n*z,v+=n*G,E+=n*Z,w+=n*q,_+=n*V,x+=n*K,S+=n*W,A+=n*J,P+=n*Y,h+=(n=t[7])*F,d+=n*M,p+=n*D,m+=n*$,g+=n*j,y+=n*U,b+=n*H,v+=n*z,E+=n*G,w+=n*Z,_+=n*q,x+=n*V,S+=n*K,A+=n*W,P+=n*J,I+=n*Y,d+=(n=t[8])*F,p+=n*M,m+=n*D,g+=n*$,y+=n*j,b+=n*U,v+=n*H,E+=n*z,w+=n*G,_+=n*Z,x+=n*q,S+=n*V,A+=n*K,P+=n*W,I+=n*J,k+=n*Y,p+=(n=t[9])*F,m+=n*M,g+=n*D,y+=n*$,b+=n*j,v+=n*U,E+=n*H,w+=n*z,_+=n*G,x+=n*Z,S+=n*q,A+=n*V,P+=n*K,I+=n*W,k+=n*J,T+=n*Y,m+=(n=t[10])*F,g+=n*M,y+=n*D,b+=n*$,v+=n*j,E+=n*U,w+=n*H,_+=n*z,x+=n*G,S+=n*Z,A+=n*q,P+=n*V,I+=n*K,k+=n*W,T+=n*J,R+=n*Y,g+=(n=t[11])*F,y+=n*M,b+=n*D,v+=n*$,E+=n*j,w+=n*U,_+=n*H,x+=n*z,S+=n*G,A+=n*Z,P+=n*q,I+=n*V,k+=n*K,T+=n*W,R+=n*J,B+=n*Y,y+=(n=t[12])*F,b+=n*M,v+=n*D,E+=n*$,w+=n*j,_+=n*U,x+=n*H,S+=n*z,A+=n*G,P+=n*Z,I+=n*q,k+=n*V,T+=n*K,R+=n*W,B+=n*J,O+=n*Y,b+=(n=t[13])*F,v+=n*M,E+=n*D,w+=n*$,_+=n*j,x+=n*U,S+=n*H,A+=n*z,P+=n*G,I+=n*Z,k+=n*q,T+=n*V,R+=n*K,B+=n*W,O+=n*J,C+=n*Y,v+=(n=t[14])*F,E+=n*M,w+=n*D,_+=n*$,x+=n*j,S+=n*U,A+=n*H,P+=n*z,I+=n*G,k+=n*Z,T+=n*q,R+=n*V,B+=n*K,O+=n*W,C+=n*J,N+=n*Y,E+=(n=t[15])*F,w+=n*M,_+=n*D,x+=n*$,S+=n*j,A+=n*U,P+=n*H,I+=n*z,k+=n*G,T+=n*Z,R+=n*q,B+=n*V,O+=n*K,C+=n*W,N+=n*J,L+=n*Y,o+=38*w,a+=38*_,s+=38*x,c+=38*S,u+=38*A,l+=38*P,f+=38*I,h+=38*k,d+=38*T,p+=38*R,m+=38*B,g+=38*O,y+=38*C,b+=38*N,v+=38*L,i=Math.floor((n=o+(i=1)+65535)/65536),o=n-65536*i,i=Math.floor((n=a+i+65535)/65536),a=n-65536*i,i=Math.floor((n=s+i+65535)/65536),s=n-65536*i,i=Math.floor((n=c+i+65535)/65536),c=n-65536*i,i=Math.floor((n=u+i+65535)/65536),u=n-65536*i,i=Math.floor((n=l+i+65535)/65536),l=n-65536*i,i=Math.floor((n=f+i+65535)/65536),f=n-65536*i,i=Math.floor((n=h+i+65535)/65536),h=n-65536*i,i=Math.floor((n=d+i+65535)/65536),d=n-65536*i,i=Math.floor((n=p+i+65535)/65536),p=n-65536*i,i=Math.floor((n=m+i+65535)/65536),m=n-65536*i,i=Math.floor((n=g+i+65535)/65536),g=n-65536*i,i=Math.floor((n=y+i+65535)/65536),y=n-65536*i,i=Math.floor((n=b+i+65535)/65536),b=n-65536*i,i=Math.floor((n=v+i+65535)/65536),v=n-65536*i,i=Math.floor((n=E+i+65535)/65536),E=n-65536*i,o+=i-1+37*(i-1),i=Math.floor((n=o+(i=1)+65535)/65536),o=n-65536*i,i=Math.floor((n=a+i+65535)/65536),a=n-65536*i,i=Math.floor((n=s+i+65535)/65536),s=n-65536*i,i=Math.floor((n=c+i+65535)/65536),c=n-65536*i,i=Math.floor((n=u+i+65535)/65536),u=n-65536*i,i=Math.floor((n=l+i+65535)/65536),l=n-65536*i,i=Math.floor((n=f+i+65535)/65536),f=n-65536*i,i=Math.floor((n=h+i+65535)/65536),h=n-65536*i,i=Math.floor((n=d+i+65535)/65536),d=n-65536*i,i=Math.floor((n=p+i+65535)/65536),p=n-65536*i,i=Math.floor((n=m+i+65535)/65536),m=n-65536*i,i=Math.floor((n=g+i+65535)/65536),g=n-65536*i,i=Math.floor((n=y+i+65535)/65536),y=n-65536*i,i=Math.floor((n=b+i+65535)/65536),b=n-65536*i,i=Math.floor((n=v+i+65535)/65536),v=n-6
25536*i,i=Math.floor((n=E+i+65535)/65536),E=n-65536*i,o+=i-1+37*(i-1),e[0]=o,e[1]=a,e[2]=s,e[3]=c,e[4]=u,e[5]=l,e[6]=f,e[7]=h,e[8]=d,e[9]=p,e[10]=m,e[11]=g,e[12]=y,e[13]=b,e[14]=v,e[15]=E}function U(e,t){j(e,t,t)}function H(e,t){var r,i=n();for(r=0;r<16;r++)i[r]=t[r];for(r=253;r>=0;r--)U(i,i),2!==r&&4!==r&&j(i,i,t);for(r=0;r<16;r++)e[r]=i[r]}function z(e,t){var r,i=n();for(r=0;r<16;r++)i[r]=t[r];for(r=250;r>=0;r--)U(i,i),1!==r&&j(i,i,t);for(r=0;r<16;r++)e[r]=i[r]}function G(e,t,r){var i,o,a=new Uint8Array(32),s=new Float64Array(80),c=n(),l=n(),f=n(),h=n(),d=n(),p=n();for(o=0;o<31;o++)a[o]=t[o];for(a[31]=127&t[31]|64,a[0]&=248,M(s,r),o=0;o<16;o++)l[o]=s[o],h[o]=c[o]=f[o]=0;for(o=254,c[0]=h[0]=1;o>=0;--o)C(c,l,i=a[o>>>3]>>>(7&o)&1),C(f,h,i),D(d,c,f),$(c,c,f),D(f,l,h),$(l,l,h),U(h,d),U(p,c),j(c,f,c),j(f,l,d),D(d,c,f),$(c,c,f),U(l,c),$(f,h,p),j(c,f,u),D(c,c,h),j(f,f,c),j(c,h,p),j(h,l,s),U(l,d),C(c,l,i),C(f,h,i);for(o=0;o<16;o++)s[o+16]=c[o],s[o+32]=f[o],s[o+48]=l[o],s[o+64]=h[o];var m=s.subarray(32),g=s.subarray(16);return H(m,m),j(g,g,m),N(e,g),0}function Z(e,t){return G(e,t,a)}function q(e,t){return i(t,32),Z(e,t)}function V(e,t,r){var n=new Uint8Array(32);return G(n,r,t),E(e,o,n,w)}P.prototype.blocks=function(e,t,r){for(var n,i,o,a,s,c,u,l,f,h,d,p,m,g,y,b,v,E,w,_=this.fin?0:2048,x=this.h[0],S=this.h[1],A=this.h[2],P=this.h[3],I=this.h[4],k=this.h[5],T=this.h[6],R=this.h[7],B=this.h[8],O=this.h[9],C=this.r[0],N=this.r[1],L=this.r[2],F=this.r[3],M=this.r[4],D=this.r[5],$=this.r[6],j=this.r[7],U=this.r[8],H=this.r[9];r>=16;)x+=8191&(n=255&e[t+0]|(255&e[t+1])<<8),S+=(n>>>13|(i=255&e[t+2]|(255&e[t+3])<<8)<<3)&8191,A+=(i>>>10|(o=255&e[t+4]|(255&e[t+5])<<8)<<6)&8191,P+=(o>>>7|(a=255&e[t+6]|(255&e[t+7])<<8)<<9)&8191,I+=(a>>>4|(s=255&e[t+8]|(255&e[t+9])<<8)<<12)&8191,k+=s>>>1&8191,T+=(s>>>14|(c=255&e[t+10]|(255&e[t+11])<<8)<<2)&8191,R+=(c>>>11|(u=255&e[t+12]|(255&e[t+13])<<8)<<5)&8191,B+=(u>>>8|(l=255&e[t+14]|(255&e[t+15])<<8)<<8)&8191,O+=l>>>5|_,f=(h=(f=0)+x*C+5*H*S+5*U*A+5*j*P+5*$*I)>>>13,h&=8191,h+=5*D*k+5*M*T+5*F*R+5*L*B+5*N*O,f+=h>>>13,h&=8191,f=(d=f+x*N+S*C+5*H*A+5*U*P+5*j*I)>>>13,d&=8191,d+=5*$*k+5*D*T+5*M*R+5*F*B+5*L*O,f+=d>>>13,d&=8191,f=(p=f+x*L+S*N+A*C+5*H*P+5*U*I)>>>13,p&=8191,p+=5*j*k+5*$*T+5*D*R+5*M*B+5*F*O,f+=p>>>13,p&=8191,f=(m=f+x*F+S*L+A*N+P*C+5*H*I)>>>13,m&=8191,m+=5*U*k+5*j*T+5*$*R+5*D*B+5*M*O,f+=m>>>13,m&=8191,f=(g=f+x*M+S*F+A*L+P*N+I*C)>>>13,g&=8191,g+=5*H*k+5*U*T+5*j*R+5*$*B+5*D*O,f+=g>>>13,g&=8191,f=(y=f+x*D+S*M+A*F+P*L+I*N)>>>13,y&=8191,y+=k*C+5*H*T+5*U*R+5*j*B+5*$*O,f+=y>>>13,y&=8191,f=(b=f+x*$+S*D+A*M+P*F+I*L)>>>13,b&=8191,b+=k*N+T*C+5*H*R+5*U*B+5*j*O,f+=b>>>13,b&=8191,f=(v=f+x*j+S*$+A*D+P*M+I*F)>>>13,v&=8191,v+=k*L+T*N+R*C+5*H*B+5*U*O,f+=v>>>13,v&=8191,f=(E=f+x*U+S*j+A*$+P*D+I*M)>>>13,E&=8191,E+=k*F+T*L+R*N+B*C+5*H*O,f+=E>>>13,E&=8191,f=(w=f+x*H+S*U+A*j+P*$+I*D)>>>13,w&=8191,w+=k*M+T*F+R*L+B*N+O*C,f+=w>>>13,w&=8191,h=8191&(f=(f=(f<<2)+f|0)+h|0),f>>>=13,d+=f,x=h,S=d,A=p,P=m,I=g,k=y,T=b,R=v,B=E,O=w,t+=16,r-=16;this.h[0]=x,this.h[1]=S,this.h[2]=A,this.h[3]=P,this.h[4]=I,this.h[5]=k,this.h[6]=T,this.h[7]=R,this.h[8]=B,this.h[9]=O},P.prototype.finish=function(e,t){var r,n,i,o,a=new Uint16Array(10);if(this.leftover){for(o=this.leftover,this.buffer[o++]=1;o<16;o++)this.buffer[o]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(r=this.h[1]>>>13,this.h[1]&=8191,o=2;o<10;o++)this.h[o]+=r,r=this.h[o]>>>13,this.h[o]&=8191;for(this.h[0]+=5*r,r=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=r,r=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=r,a[0]=this.h[0]+5,r=a[0]>>>13,a[0]&=8191,o=1;o<10;o++)a[o]=this.h[o]+r,r=a[o]>>>13,a[o]&=8191;for(a[9]-=8192,n=(1^r)-1,o=0;o<10;o++)a[o]&=n;for(o=0,n=~n;o<10;o++)this.h[o]=this.h[o]&n|a[o];for(o=1,this.h[0]=(this.h[0]|this.h[1]<<13)&65535,this.h[1]=(this.h[1]>>>3|this.h[2]<<10)&65535,this.h[2]=(this.h[2]>>>6|this.h[3]<<7)&65535,this.h[3]=(this.h[3]>>>9|this.h[4]<<4)&65535,this.h[4]=(this.h[4]>>>12|this.h[5]<<1|this.h[6]<<14)&65535,this.h[5]=(this.h[6]>>>2|this.h[7]<<11)&65535,this.h[6]=(this.h[7]>>>5|this.h[8]<<8)&65535,this.h[7]=(this.h[8]>
2>>8|this.h[9]<<5)&65535,i=this.h[0]+this.pad[0],this.h[0]=65535&i;o<8;o++)i=(this.h[o]+this.pad[o]|0)+(i>>>16)|0,this.h[o]=65535&i;e[t+0]=this.h[0]>>>0&255,e[t+1]=this.h[0]>>>8&255,e[t+2]=this.h[1]>>>0&255,e[t+3]=this.h[1]>>>8&255,e[t+4]=this.h[2]>>>0&255,e[t+5]=this.h[2]>>>8&255,e[t+6]=this.h[3]>>>0&255,e[t+7]=this.h[3]>>>8&255,e[t+8]=this.h[4]>>>0&255,e[t+9]=this.h[4]>>>8&255,e[t+10]=this.h[5]>>>0&255,e[t+11]=this.h[5]>>>8&255,e[t+12]=this.h[6]>>>0&255,e[t+13]=this.h[6]>>>8&255,e[t+14]=this.h[7]>>>0&255,e[t+15]=this.h[7]>>>8&255},P.prototype.update=function(e,t,r){var n,i;if(this.leftover){for((i=16-this.leftover)>r&&(i=r),n=0;n<i;n++)this.buffer[this.leftover+n]=e[t+n];if(r-=i,t+=i,this.leftover+=i,this.leftover<16)return;this.blocks(this.buffer,0,16),this.leftover=0}if(r>=16&&(i=r-r%16,this.blocks(e,t,i),t+=i,r-=i),r){for(n=0;n<r;n++)this.buffer[this.leftover+n]=e[t+n];this.leftover+=r}};var K=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,
21126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function W(e,t,r,n){for(var i,o,a,s,c,u,l,f,h,d,p,m,g,y,b,v,E,w,_,x,S,A,P,I,k,T,R=new Int32Array(16),B=new Int32Array(16),O=e[0],C=e[1],N=e[2],L=e[3],F=e[4],M=e[5],D=e[6],$=e[7],j=t[0],U=t[1],H=t[2],z=t[3],G=t[4],Z=t[5],q=t[6],V=t[7],W=0;n>=128;){for(_=0;_<16;_++)x=8*_+W,R[_]=r[x+0]<<24|r[x+1]<<16|r[x+2]<<8|r[x+3],B[_]=r[x+4]<<24|r[x+5]<<16|r[x+6]<<8|r[x+7];for(_=0;_<80;_++)if(i=O,o=C,a=N,s=L,c=F,u=M,l=D,f=$,h=j,d=U,p=H,m=z,g=G,y=Z,b=q,v=V,S=$,P=65535&(A=V),I=A>>>16,k=65535&S,T=S>>>16,S=(F>>>14|G<<18)^(F>>>18|G<<14)^(G>>>9|F<<23),P+=65535&(A=(G>>>14|F<<18)^(G>>>18|F<<14)^(F>>>9|G<<23)),I+=A>>>16,k+=65535&S,T+=S>>>16,S=F&M^~F&D,P+=65535&(A=G&Z^~G&q),I+=A>>>16,k+=65535&S,T+=S>>>16,S=K[2*_],P+=65535&(A=K[2*_+1]),I+=A>>>16,k+=65535&S,T+=S>>>16,S=R[_%16],P+=65535&(A=B[_%16]),I+=A>>>16,k+=65535&S,T+=S>>>16,I+=P>>>16,k+=I>>>16,T+=k>>>16,E=65535&k|T<<16,w=65535&P|I<<16,S=E,P=65535&(A=w),I=A>>>16,k=65535&S,T=S>>>16,S=(O>>>28|j<<4)^(j>>>2|O<<30)^(j>>>7|O<<25),P+=65535&(A=(j>>>28|O<<4)^(O>>>2|j<<30)^(O>>>7|j<<25)),I+=A>>>16,k+=65535&S,T+=S>>>16,S=O&C^O&N^C&N,P+=65535&(A=j&U^j&H^U&H),I+=A>>>16,k+=65535&S,T+=S>>>16,I+=P>>>16,k+=I>>>16,T+=k>>>16,f=65535&k|T<<16,v=65535&P|I<<16,S=s,P=65535&(A=m),I=A>>>16,k=65535&S,T=S>>>16,S=E,P+=65535&(A=w),I+=A>>>16,k+=65535&S,T+=S>>>16,I+=P>>>16,k+=I>>>16,T+=k>>>16,s=65535&k|T<<16,m=65535&P|I<<16,C=i,N=o,L=a,F=s,M=c,D=u,$=l,O=f,U=h,H=d,z=p,G=m,Z=g,q=y,V=b,j=v,_%16==15)for(x=0;x<16;x++)S=R[x],P=65535&(A=B[x]),I=A>>>16,k=65535&S,T=S>>>16,S=R[(x+9)%16],P+=65535&(A=B[(x+9)%16]),I+=A>>>16,k+=65535&S,T+=S>>>16,S=((E=R[(x+1)%16])>>>1|(w=B[(x+1)%16])<<31)^(E>>>8|w<<24)^E>>>7,P+=65535&(A=(w>>>1|E<<31)^(w>>>8|E<<24)^(w>>>7|E<<25)),I+=A>>>16,k+=65535&S,T+=S>>>16,S=((E=R[(x+14)%16])>>>19|(w=B[(x+14)%16])<<13)^(w>>>29|E<<3)^E>>>6,P+=65535&(A=(w>>>19|E<<13)^(E>>>29|w<<3)^(w>>>6|E<<26)),I+=A>>>16,k+=65535&S,T+=S>>>16,I+=P>>>16,k+=I>>>16,T+=k>>>16,R[x]=65535&k|T<<16,B[x]=65535&P|I<<16;S=O,P=65535&(A=j),I=A>>>16,k=65535&S,T=S>>>16,S=e[0],P+=65535&(A=t[0]),I+=A>>>16,k+=65535&S,T+=S>>>16,I+=P>>>16,k+=I>>>16,T+=k>>>16,e[0]=O=65535&k|T<<16,t[0]=j=65535&P|I<<16,S=C,P=65535&(A=U),I=A>>>16,k=65535&S,T=S>>>16,S=e[1],P+=65535&(A=t[1]),I+=A>>>16,k+=65535&S,T+=S>>>16,I+=P>>>16,k+=I>>>16,T+=k>>>16,e[1]=C=65535&k|T<<16,t[1]=U=65535&P|I<<16,S=N,P=65535&(A=H),I=A>>>16,k=65535&S,T=S>>>16,S=e[2],P+=65535&(A=t[2]),I+=A>>>16,k+=65535&S,T+=S>>>16,I+=P>>>16,k+=I>>>16,T+=k>>>16,e[2]=N=65535&k|T<<16,t[2]=H=65535&P|I<<16,S=L,P=65535&(A=z),I=A>>>16,k=65535&S,T=S>>>16,S=e[3],P+=65535&(A=t[3]),I+=A>>>16,k+=65535&S,T+=S>>>16,I+=P>>>16,k+=I>>>16,T+=k>>>16,e[3]=L=65535&k|T<<16,t[3]=z=65535&P|I<<16,S=F,P=65535&(A=G),I=A>>>16,k=65535&S,T=S>>>16,S=e[4],P+=65535&(A=t[4]),I+=A>>>16,k+=65535&S,T+=S>>>16,I+=P>>>16,k+=I>>>16,T+=k>>>16,e[4]=F=65535&k|T<<16,t[4]=G=65535&P|I<<16,S=M,P=65535&(A=Z),I=A>>>16,k=65535&S,T=S>>>16,S=e[5],P+=65535&(A=t[5]),I+=A>>>16,k+=65535&S,T+=S>>>16,I+=P>>>16,k+=I>>>16,T+=k>>>16,e[5]=M=65535&k|T<<16,t[5]=Z=65535&P|I<<16,S=D,P=65535&(A=q),I=A>>>16,k=65535&S,T=S>>>16,S=e[6],P+=65535&(A=t[6]),I+=A>>>16,k+=65535&S,T+=S>>>16,I+=P>>>16,k+=I>>>16,T+=k>>>16,e[6]=D=65535&k|T<<16,t[6]=q=65535&P|I<<16,S=$,P=65535&(A=V),I=A>>>16,k=65535&S,T=S>>>16,S=e[7],P+=65535&(A=t[7]),I+=A>>>16,k+=65535&S,T+=S>>>16,I+=P>>>16,k+=I>>>16,T+=k>>>16,e[7]=$=65535&k|T<<16,t[7]=V=65535&P|I<<16,W+=128,n-=128}return n}function J(e,t,r){var n,i=new Int32Array(8),o=new Int32Array(8),a=new Uint8Array(256),s=r;for(i[0]=1779033703,i[1]=3144134277,i[2]=1013904242,i[3]=2773480762,i[4]=1359893119,i[5]=2600822924,i[6]=528734635,i[7]=1541459225,o[0]=4089235720,o[1]=2227873595,o[2]=4271175723,o[3]=1595750129,o[4]=2917565137,o[5]=725511199,o[6]=4215389547,o[7]=327033209,W(i,o,t,r),r%=128,n=0;n<r;n++)a[n]=t[s-r+n];for(a[r]=128,a[(r=256-128*(r<112?1:0))-9]=0,m(a,r-8,s/536870912|0,s<<3),W(i,o,a,r),n=0;n<8;n++)m(e,8*n,i[n],o[n]);return 0}function Y(e,t){var r=n(),i=n(),o=n(),a=n(),s=n(),c=n(),u=n(),l=n(),h=n();$(r,e[1],e[0]),$(h,t[1],t[0]),j(r,r,h),D(i,e[0],e[1]),D(h,t[0],t[1]),j(i,i,h),j(o,e[3],t[3]),j(o,o,f),j(a,e[2],t[2]),D(a,a,a),$(s,i,r),$(c,a,o),D(u,a,o),D(l,i,r),j(e[0],s,c),j(e[1],l,u),j(e[2],u,c),j(e[3],s,l)}function X(e,t,r){var n;for(n=0;n<4;n++)C(e[n],t[n],r)}function Q(e,t){var r=n(),i=n(),o=n();H(o,t[2]),j(r,t[0],o),j(i,t[1],o),N(e,i),e[31]^=F(r)<<7}function ee(e,t,r){var n,i;for(B(e[0],s),B(e[1],c),B(e[2],c),B(e[3],s),i=255;i>=0;--i)X(e,t,n=r[i/8|0]>>(7&i)&1),Y(t,e),Y(e,e),X(e,t,n)}function et(e,t){var r=[n(),n(),n(),n()];B(r[0],h),B(r[1],d),B(r[2],c),j(r[3],h,d),ee(e,r,t)}function er(e,t,r){var o,a=new Uint8Array(64),s=[n(),n(),n(),n()];for(r||i(t,32),J(a,t,32),a[0]&=248,a[31]&=127,a[31]|=64,et(s,a),Q(e,s),o=0;o<32;o++)t[o+32]=e[o];return 0}var en=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function ei(e,t){var r,n,i,o;for(n=63;n>=32;--n){for(r=0,i=n-32,o=n-12;i<o;++i)t[i]+=r-16*t[n]*en[i-(n-32)],r=Math.floor((t[i]+128)/256),t[i]-=256*r;t[i]+=r,t[n]=0}for(i=0,r=0;i<32;i++)t[i]+=r-(t[31]>>4)*en[i],r=t[i]>>8,t[i]&=255;for(i=0;i<32;i++)t[i]-=r*en[i];for(n=0;n<32;n++)t[n+1]+=t[n]>>8,e[n]=255&t[n]}function eo(e){var t,r=new Float64Array(64);for(t=0;t<64;t++)r[t]=e[t];for(t=0;t<64;t++)e[t]=0;ei(e,r)}function ea(e,t,r,i){var o,a,s=new Uint8Array(64),c=new Uint8Array(64),u=new Uint8Array(64),l=new Float64Array(64),f=[n(),n(),n(),n()];for(J(s,i,32),s[0]&=248,s[31]&=127,s[31]|=64,o=0;o<r;o++)e[64+o]=t[o];for(o=0;o<32;o++)e[32+o]=s[32+o];for(J(u,e.subarray(32),r+32),eo(u),et(f,u),Q(e,f),o=32;o<64;o++)e[o]=i[o];for(J(c,e,r+64),eo(c),o=0;o<64;o++)l[o]=0;for(o=0;o<32;o++)l[o]=u[o];for(o=0;o<32;o++)for(a=0;a<32;a++)l[o+a]+=c[o]*s[a];return ei(e.subarray(32),l),r+64}function es(e,t,r,i){var o,a,u,f,h,d,m,g,y=new Uint8Array(32),v=new Uint8Array(64),E=[n(),n(),n(),n()],w=[n(),n(),n(),n()];
2if(r<64||(o=n(),a=n(),u=n(),f=n(),h=n(),d=n(),m=n(),(B(w[2],c),M(w[1],i),U(u,w[1]),j(f,u,l),$(u,u,w[2]),D(f,w[2],f),U(h,f),U(d,h),j(m,d,h),j(o,m,u),j(o,o,f),z(o,o),j(o,o,u),j(o,o,f),j(o,o,f),j(w[0],o,f),U(a,w[0]),j(a,a,f),L(a,u)&&j(w[0],w[0],p),U(a,w[0]),j(a,a,f),L(a,u))?-1:(F(w[0])===i[31]>>7&&$(w[0],s,w[0]),j(w[3],w[0],w[1]),0)))return -1;for(g=0;g<r;g++)e[g]=t[g];for(g=0;g<32;g++)e[g+32]=i[g];if(J(v,e,r),eo(v),ee(E,w,v),et(w,t.subarray(32)),Y(E,w),Q(y,E),r-=64,b(t,0,y,0)){for(g=0;g<r;g++)e[g]=0;return -1}for(g=0;g<r;g++)e[g]=t[g+64];return r}function ec(e,t){if(32!==e.length)throw Error("bad key size");if(24!==t.length)throw Error("bad nonce size")}function eu(){for(var e=0;e<arguments.length;e++)if(!(arguments[e]instanceof Uint8Array))throw TypeError("unexpected type, use Uint8Array")}function el(e){for(var t=0;t<e.length;t++)e[t]=0}e.lowlevel={crypto_core_hsalsa20:E,crypto_stream_xor:A,crypto_stream:S,crypto_stream_salsa20_xor:_,crypto_stream_salsa20:x,crypto_onetimeauth:I,crypto_onetimeauth_verify:k,crypto_verify_16:y,crypto_verify_32:b,crypto_secretbox:T,crypto_secretbox_open:R,crypto_scalarmult:G,crypto_scalarmult_base:Z,crypto_box_beforenm:V,crypto_box_afternm:T,crypto_box:function(e,t,r,n,i,o){var a=new Uint8Array(32);return V(a,i,o),T(e,t,r,n,a)},crypto_box_open:function(e,t,r,n,i,o){var a=new Uint8Array(32);return V(a,i,o),R(e,t,r,n,a)},crypto_box_keypair:q,crypto_hash:J,crypto_sign:ea,crypto_sign_keypair:er,crypto_sign_open:es,crypto_secretbox_KEYBYTES:32,crypto_secretbox_NONCEBYTES:24,crypto_secretbox_ZEROBYTES:32,crypto_secretbox_BOXZEROBYTES:16,crypto_scalarmult_BYTES:32,crypto_scalarmult_SCALARBYTES:32,crypto_box_PUBLICKEYBYTES:32,crypto_box_SECRETKEYBYTES:32,crypto_box_BEFORENMBYTES:32,crypto_box_NONCEBYTES:24,crypto_box_ZEROBYTES:32,crypto_box_BOXZEROBYTES:16,crypto_sign_BYTES:64,crypto_sign_PUBLICKEYBYTES:32,crypto_sign_SECRETKEYBYTES:64,crypto_sign_SEEDBYTES:32,crypto_hash_BYTES:64,gf:n,D:l,L:en,pack25519:N,unpack25519:M,M:j,A:D,S:U,Z:$,pow2523:z,add:Y,set25519:B,modL:ei,scalarmult:ee,scalarbase:et},e.randomBytes=function(e){var t=new Uint8Array(e);return i(t,e),t},e.secretbox=function(e,t,r){eu(e,t,r),ec(r,t);for(var n=new Uint8Array(32+e.length),i=new Uint8Array(n.length),o=0;o<e.length;o++)n[o+32]=e[o];return T(i,n,n.length,t,r),i.subarray(16)},e.secretbox.open=function(e,t,r){eu(e,t,r),ec(r,t);for(var n=new Uint8Array(16+e.length),i=new Uint8Array(n.length),o=0;o<e.length;o++)n[o+16]=e[o];return n.length<32||0!==R(i,n,n.length,t,r)?null:i.subarray(32)},e.secretbox.keyLength=32,e.secretbox.nonceLength=24,e.secretbox.overheadLength=16,e.scalarMult=function(e,t){if(eu(e,t),32!==e.length)throw Error("bad n size");if(32!==t.length)throw Error("bad p size");var r=new Uint8Array(32);return G(r,e,t),r},e.scalarMult.base=function(e){if(eu(e),32!==e.length)throw Error("bad n size");var t=new Uint8Array(32);return Z(t,e),t},e.scalarMult.scalarLength=32,e.scalarMult.groupElementLength=32,e.box=function(t,r,n,i){var o=e.box.before(n,i);return e.secretbox(t,r,o)},e.box.before=function(e,t){eu(e,t),function(e,t){if(32!==e.length)throw Error("bad public key size");if(32!==t.length)throw Error("bad secret key size")}(e,t);var r=new Uint8Array(32);return V(r,e,t),r},e.box.after=e.secretbox,e.box.open=function(t,r,n,i){var o=e.box.before(n,i);return e.secretbox.open(t,r,o)},e.box.open.after=e.secretbox.open,e.box.keyPair=function(){var e=new Uint8Array(32),t=new Uint8Array(32);return q(e,t),{publicKey:e,secretKey:t}},e.box.keyPair.fromSecretKey=function(e){if(eu(e),32!==e.length)throw Error("bad secret key size");var t=new Uint8Array(32);return Z(t,e),{publicKey:t,secretKey:new Uint8Array(e)}},e.box.publicKeyLength=32,e.box.secretKeyLength=32,e.box.sharedKeyLength=32,e.box.nonceLength=24,e.box.overheadLength=e.secretbox.overheadLength,e.sign=function(e,t){if(eu(e,t),64!==t.length)throw Error("bad secret key size");var r=new Uint8Array(64+e.length);return ea(r,e,e.length,t),r},e.sign.open=function(e,t){if(eu(e,t),32!==t.length)throw Error("bad public key size");var r=new Uint8Array(e.length),n=es(r,e,e.length,t);if(n<0)return null;for(var i=new Uint8Array(n),o=0;o<i.length;o++)i[o]=r[o];return i},e.sign.detached=function(t,r){for(var n=e.sign(t,r),i=new Uint8Array(64),o=0;o<i.length;o++)i[o]=n[o];return i},e.sign.detached.verify=function(e,t,r){if(eu(e,t,r),64!==t.length)throw Error("bad signature size");if(32!==r.length)throw Error("bad public key size");var n,i=new Uint8Array(64+e.length),o=new Uint8Array(64+e.length);for(n=0;n<64;n++)i[n]=t[n];for(n=0;n<e.length;n++)i[n+64]=e[n];return es(o,i,i.length,r)>=0},e.sign.keyPair=function(){var e=new Uint8Array(32),t=new Uint8Array(64);return er(e,t),{publicKey:e,secretKey:t}},e.sign.keyPair.fromSecretKey=function(e){if(eu(e),64!==e.length)throw Error("bad secret key size");for(var t=new Uint8Array(32),r=0;r<t.length;r++)t[r]=e[32+r];return{publicKey:t,secretKey:new Uint8Array(e)}},e.sign.keyPair.fromSeed=function(e){if(eu(e),32!==e.length)throw Error("bad seed size");for(var t=new Uint8Array(32),r=new Uint8Array(64),n=0;n<32;n++)r[n]=e[n];return er(t,r,!0),{publicKey:t,secretKey:r}},e.sign.publicKeyLength=32,e.sign.secretKeyLength=64,e.sign.seedLength=32,e.sign.signatureLength=64,e.hash=function(e){eu(e);var t=new Uint8Array(64);return J(t,e,e.length),t},e.hash.hashLength=64,e.verify=function(e,t){return eu(e,t),0!==e.length&&0!==t.length&&e.length===t.length&&0===g(e,0,t,0,e.length)},e.setPRNG=function(e){i=e},(t="undefined"!=typeof self?self.crypto||self.msCrypto:null)&&t.getRandomValues?e.setPRNG(function(e,r){var n,i=new Uint8Array(r);for(n=0;n<r;n+=65536)t.getRandomValues(i.subarray(n,n+Math.min(r-n,65536)));for(n=0;n<r;n++)e[n]=i[n];el(i)}):(t=r(55024))&&t.randomBytes&&e.setPRNG(function(e,r){var n,i=t.randomBytes(r);for(n=0;n<r;n++)e[n]=i[n];el(i)})}(e.exports?e.exports:self.nacl=self.nacl||{})},24258:function(e,t){"use strict";
2Object.defineProperty(t,"__esModule",{value:!0}),t.StructError=void 0;class r extends TypeError{constructor(e,t){let r;let{message:n,explanation:i,...o}=e,{path:a}=e,s=0===a.length?n:`At path: ${a.join(".")} -- ${n}`;super(i??s),null!=i&&(this.cause=s),Object.assign(this,o),this.name=this.constructor.name,this.failures=()=>r??(r=[e,...t()])}}t.StructError=r},12776:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(24258),t),i(r(72561),t),i(r(19043),t),i(r(87450),t),i(r(93272),t),i(r(74597),t)},72561:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validate=t.is=t.mask=t.create=t.assert=t.Struct=void 0;let n=r(24258),i=r(40629);class o{constructor(e){let{type:t,schema:r,validator:n,refiner:o,coercer:a=e=>e,entries:s=function*(){}}=e;this.type=t,this.schema=r,this.entries=s,this.coercer=a,n?this.validator=(e,t)=>{let r=n(e,t);return(0,i.toFailures)(r,t,this,e)}:this.validator=()=>[],o?this.refiner=(e,t)=>{let r=o(e,t);return(0,i.toFailures)(r,t,this,e)}:this.refiner=()=>[]}assert(e,t){return a(e,this,t)}create(e,t){return s(e,this,t)}is(e){return u(e,this)}mask(e,t){return c(e,this,t)}validate(e,t={}){return l(e,this,t)}}function a(e,t,r){let n=l(e,t,{message:r});if(n[0])throw n[0]}function s(e,t,r){let n=l(e,t,{coerce:!0,message:r});if(!n[0])return n[1];throw n[0]}function c(e,t,r){let n=l(e,t,{coerce:!0,mask:!0,message:r});if(!n[0])return n[1];throw n[0]}function u(e,t){return!l(e,t)[0]}function l(e,t,r={}){let o=(0,i.run)(e,t,r),a=(0,i.shiftIterator)(o);return a[0]?[new n.StructError(a[0],function*(){for(let e of o)e[0]&&(yield e[0])}),void 0]:[void 0,a[1]]}t.Struct=o,t.assert=a,t.create=s,t.mask=c,t.is=u,t.validate=l},19043:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.trimmed=t.defaulted=t.coerce=void 0;let n=r(72561),i=r(40629),o=r(93272);function a(e,t,r){return new n.Struct({...e,coercer:(i,o)=>(0,n.is)(i,t)?e.coercer(r(i,o),o):e.coercer(i,o)})}t.coerce=a,t.defaulted=function(e,t,r={}){return a(e,(0,o.unknown)(),e=>{let n="function"==typeof t?t():t;if(void 0===e)return n;if(!r.strict&&(0,i.isPlainObject)(e)&&(0,i.isPlainObject)(n)){let t={...e},r=!1;for(let e in n)void 0===t[e]&&(t[e]=n[e],r=!0);if(r)return t}return e})},t.trimmed=function(e){return a(e,(0,o.string)(),e=>e.trim())}},87450:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.refine=t.size=t.pattern=t.nonempty=t.min=t.max=t.empty=void 0;let n=r(72561),i=r(40629);function o(e){return e instanceof Map||e instanceof Set?e.size:e.length}function a(e,t,r){return new n.Struct({...e,*refiner(n,o){yield*e.refiner(n,o);let a=r(n,o);for(let r of(0,i.toFailures)(a,o,e,n))yield{...r,refinement:t}}})}t.empty=function(e){return a(e,"empty",t=>{let r=o(t);return 0===r||`Expected an empty ${e.type} but received one with a size of \`${r}\``})},t.max=function(e,t,r={}){let{exclusive:n}=r;return a(e,"max",r=>n?r<t:r<=t||`Expected a ${e.type} less than ${n?"":"or equal to "}${t} but received \`${r}\``)},t.min=function(e,t,r={}){let{exclusive:n}=r;return a(e,"min",r=>n?r>t:r>=t||`Expected a ${e.type} greater than ${n?"":"or equal to "}${t} but received \`${r}\``)},t.nonempty=function(e){return a(e,"nonempty",t=>o(t)>0||`Expected a nonempty ${e.type} but received an empty one`)},t.pattern=function(e,t){return a(e,"pattern",r=>t.test(r)||`Expected a ${e.type} matching \`/${t.source}/\` but received "${r}"`)},t.size=function(e,t,r=t){let n=`Expected a ${e.type}`,i=t===r?`of \`${t}\``:`between \`${t}\` and \`${r}\``;return a(e,"size",e=>{if("number"==typeof e||e instanceof Date)return t<=e&&e<=r||`${n} ${i} but received \`${e}\``;if(e instanceof Map||e instanceof Set){let{size:o}=e;return t<=o&&o<=r||`${n} with a size ${i} but received one with a size of \`${o}\``}let{length:o}=e;return t<=o&&o<=r||`${n} with a length ${i} but received one with a length of \`${o}\``})},t.refine=a},93272:function(e,t,r){"use strict";
2Object.defineProperty(t,"__esModule",{value:!0}),t.unknown=t.union=t.type=t.tuple=t.string=t.set=t.regexp=t.record=t.optional=t.object=t.number=t.nullable=t.never=t.map=t.literal=t.intersection=t.integer=t.instance=t.func=t.enums=t.date=t.boolean=t.bigint=t.array=t.any=void 0;let n=r(72561),i=r(40629),o=r(74597);function a(){return(0,o.define)("never",()=>!1)}t.any=function(){return(0,o.define)("any",()=>!0)},t.array=function(e){return new n.Struct({type:"array",schema:e,*entries(t){if(e&&Array.isArray(t))for(let[r,n]of t.entries())yield[r,n,e]},coercer:e=>Array.isArray(e)?e.slice():e,validator:e=>Array.isArray(e)||`Expected an array value, but received: ${(0,i.print)(e)}`})},t.bigint=function(){return(0,o.define)("bigint",e=>"bigint"==typeof e)},t.boolean=function(){return(0,o.define)("boolean",e=>"boolean"==typeof e)},t.date=function(){return(0,o.define)("date",e=>e instanceof Date&&!isNaN(e.getTime())||`Expected a valid \`Date\` object, but received: ${(0,i.print)(e)}`)},t.enums=function(e){let t={},r=e.map(e=>(0,i.print)(e)).join();for(let r of e)t[r]=r;return new n.Struct({type:"enums",schema:t,validator:t=>e.includes(t)||`Expected one of \`${r}\`, but received: ${(0,i.print)(t)}`})},t.func=function(){return(0,o.define)("func",e=>"function"==typeof e||`Expected a function, but received: ${(0,i.print)(e)}`)},t.instance=function(e){return(0,o.define)("instance",t=>t instanceof e||`Expected a \`${e.name}\` instance, but received: ${(0,i.print)(t)}`)},t.integer=function(){return(0,o.define)("integer",e=>"number"==typeof e&&!isNaN(e)&&Number.isInteger(e)||`Expected an integer, but received: ${(0,i.print)(e)}`)},t.intersection=function(e){return new n.Struct({type:"intersection",schema:null,*entries(t,r){for(let{entries:n}of e)yield*n(t,r)},*validator(t,r){for(let{validator:n}of e)yield*n(t,r)},*refiner(t,r){for(let{refiner:n}of e)yield*n(t,r)}})},t.literal=function(e){let t=(0,i.print)(e),r=typeof e;return new n.Struct({type:"literal",schema:"string"===r||"number"===r||"boolean"===r?e:null,validator:r=>r===e||`Expected the literal \`${t}\`, but received: ${(0,i.print)(r)}`})},t.map=function(e,t){return new n.Struct({type:"map",schema:null,*entries(r){if(e&&t&&r instanceof Map)for(let[n,i]of r.entries())yield[n,n,e],yield[n,i,t]},coercer:e=>e instanceof Map?new Map(e):e,validator:e=>e instanceof Map||`Expected a \`Map\` object, but received: ${(0,i.print)(e)}`})},t.never=a,t.nullable=function(e){return new n.Struct({...e,validator:(t,r)=>null===t||e.validator(t,r),refiner:(t,r)=>null===t||e.refiner(t,r)})},t.number=function(){return(0,o.define)("number",e=>"number"==typeof e&&!isNaN(e)||`Expected a number, but received: ${(0,i.print)(e)}`)},t.object=function(e){let t=e?Object.keys(e):[],r=a();return new n.Struct({type:"object",schema:e??null,*entries(n){if(e&&(0,i.isObject)(n)){let i=new Set(Object.keys(n));for(let r of t)i.delete(r),yield[r,n[r],e[r]];for(let e of i)yield[e,n[e],r]}},validator:e=>(0,i.isObject)(e)||`Expected an object, but received: ${(0,i.print)(e)}`,coercer:e=>(0,i.isObject)(e)?{...e}:e})},t.optional=function(e){return new n.Struct({...e,validator:(t,r)=>void 0===t||e.validator(t,r),refiner:(t,r)=>void 0===t||e.refiner(t,r)})},t.record=function(e,t){return new n.Struct({type:"record",schema:null,*entries(r){if((0,i.isObject)(r))for(let n in r){let i=r[n];yield[n,n,e],yield[n,i,t]}},validator:e=>(0,i.isObject)(e)||`Expected an object, but received: ${(0,i.print)(e)}`})},t.regexp=function(){return(0,o.define)("regexp",e=>e instanceof RegExp)},t.set=function(e){return new n.Struct({type:"set",schema:null,*entries(t){if(e&&t instanceof Set)for(let r of t)yield[r,r,e]},coercer:e=>e instanceof Set?new Set(e):e,validator:e=>e instanceof Set||`Expected a \`Set\` object, but received: ${(0,i.print)(e)}`})},t.string=function(){return(0,o.define)("string",e=>"string"==typeof e||`Expected a string, but received: ${(0,i.print)(e)}`)},t.tuple=function(e){let t=a();return new n.Struct({type:"tuple",schema:null,*entries(r){if(Array.isArray(r)){let n=Math.max(e.length,r.length);for(let i=0;i<n;i++)yield[i,r[i],e[i]||t]}},validator:e=>Array.isArray(e)||`Expected an array, but received: ${(0,i.print)(e)}`})},t.type=function(e){let t=Object.keys(e);return new n.Struct({type:"type",schema:e,*entries(r){if((0,i.isObject)(r))for(let n of t)yield[n,r[n],e[n]]},validator:e=>(0,i.isObject)(e)||`Expected an object, but received: ${(0,i.print)(e)}`,coercer:e=>(0,i.isObject)(e)?{...e}:e})},t.union=function(e){let t=e.map(e=>e.type).join(" | ");return new n.Struct({type:"union",schema:null,coercer(t){for(let r of e){let[e,n]=r.validate(t,{coerce:!0});if(!e)return n}return t},validator(r,n){let o=[];for(let t of e){let[...e]=(0,i.run)(r,t,n),[a]=e;if(!a?.[0])return[];for(let[t]of e)t&&o.push(t)}return[`Expected the value to satisfy a union of \`${t}\`, but received: ${(0,i.print)(r)}`,...o]}})},t.unknown=function(){return(0,o.define)("unknown",()=>!0)}},74597:function(e,t,r){"use strict";
2Object.defineProperty(t,"__esModule",{value:!0}),t.pick=t.partial=t.omit=t.lazy=t.dynamic=t.deprecated=t.define=t.assign=void 0;let n=r(72561),i=r(93272);t.assign=function(...e){let t=e[0]?.type==="type",r=Object.assign({},...e.map(({schema:e})=>e));return t?(0,i.type)(r):(0,i.object)(r)},t.define=function(e,t){return new n.Struct({type:e,schema:null,validator:t})},t.deprecated=function(e,t){return new n.Struct({...e,refiner:(t,r)=>void 0===t||e.refiner(t,r),validator:(r,n)=>void 0===r||(t(r,n),e.validator(r,n))})},t.dynamic=function(e){return new n.Struct({type:"dynamic",schema:null,*entries(t,r){let n=e(t,r);yield*n.entries(t,r)},validator:(t,r)=>e(t,r).validator(t,r),coercer:(t,r)=>e(t,r).coercer(t,r),refiner:(t,r)=>e(t,r).refiner(t,r)})},t.lazy=function(e){let t;return new n.Struct({type:"lazy",schema:null,*entries(r,n){t??(t=e()),yield*t.entries(r,n)},validator:(r,n)=>(t??(t=e()),t.validator(r,n)),coercer:(r,n)=>(t??(t=e()),t.coercer(r,n)),refiner:(r,n)=>(t??(t=e()),t.refiner(r,n))})},t.omit=function(e,t){let{schema:r}=e,n={...r};for(let e of t)delete n[e];return"type"===e.type?(0,i.type)(n):(0,i.object)(n)},t.partial=function(e){let t=e instanceof n.Struct,r=t?{...e.schema}:{...e};for(let e in r)r[e]=(0,i.optional)(r[e]);return t&&"type"===e.type?(0,i.type)(r):(0,i.object)(r)},t.pick=function(e,t){let{schema:r}=e,n={};for(let e of t)n[e]=r[e];return"type"===e.type?(0,i.type)(n):(0,i.object)(n)}},40629:function(e,t){"use strict";function r(e){return"object"==typeof e&&null!==e}function n(e){return"symbol"==typeof e?e.toString():"string"==typeof e?JSON.stringify(e):`${e}`}function i(e,t,r,i){if(!0===e)return;!1===e?e={}:"string"==typeof e&&(e={message:e});let{path:o,branch:a}=t,{type:s}=r,{refinement:c,message:u=`Expected a value of type \`${s}\`${c?` with refinement \`${c}\``:""}, but received: \`${n(i)}\``}=e;return{value:i,type:s,refinement:c,key:o[o.length-1],path:o,branch:a,...e,message:u}}Object.defineProperty(t,"__esModule",{value:!0}),t.run=t.toFailures=t.toFailure=t.shiftIterator=t.print=t.isPlainObject=t.isObject=void 0,t.isObject=r,t.isPlainObject=function(e){if("[object Object]"!==Object.prototype.toString.call(e))return!1;let t=Object.getPrototypeOf(e);return null===t||t===Object.prototype},t.print=n,t.shiftIterator=function(e){let{done:t,value:r}=e.next();return t?void 0:r},t.toFailure=i,t.toFailures=function*(e,t,n,o){var a;for(let s of(r(a=e)&&"function"==typeof a[Symbol.iterator]||(e=[e]),e)){let e=i(s,t,n,o);e&&(yield e)}},t.run=function* e(t,n,i={}){let{path:o=[],branch:a=[t],coerce:s=!1,mask:c=!1}=i,u={path:o,branch:a};if(s&&(t=n.coercer(t,u),c&&"type"!==n.type&&r(n.schema)&&r(t)&&!Array.isArray(t)))for(let e in t)void 0===n.schema[e]&&delete t[e];let l="valid";for(let e of n.validator(t,u))e.explanation=i.message,l="not_valid",yield[e,void 0];for(let[f,h,d]of n.entries(t,u))for(let n of e(h,d,{path:void 0===f?o:[...o,f],branch:void 0===f?a:[...a,h],coerce:s,mask:c,message:i.message}))n[0]?(l=null===n[0].refinement||void 0===n[0].refinement?"not_valid":"not_refined",yield[n[0],void 0]):s&&(h=n[1],void 0===f?t=h:t instanceof Map?t.set(f,h):t instanceof Set?t.add(h):r(t)&&(void 0!==h||f in t)&&(t[f]=h));if("not_valid"!==l)for(let e of n.refiner(t,u))e.explanation=i.message,l="not_refined",yield[e,void 0];"valid"===l&&(yield[void 0,t])}},88236:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assertExhaustive=t.assertStruct=t.assert=t.AssertionError=void 0;let n=r(12776),i=r(17243);function o(e,t){return"string"==typeof e?.prototype?.constructor?.name?new e({message:t}):e({message:t})}class a extends Error{constructor(e){super(e.message),this.code="ERR_ASSERTION"}}t.AssertionError=a,t.assert=function(e,t="Assertion failed.",r=a){if(!e){if(t instanceof Error)throw t;throw o(r,t)}},t.assertStruct=function(e,t,r="Assertion failed",s=a){try{(0,n.assert)(e,t)}catch(e){throw o(s,`${r}: ${(0,i.getErrorMessage)(e).replace(/\.$/u,"")}.`)}},t.assertExhaustive=function(e){throw Error("Invalid branch reached. Should be detected during compilation.")}},27086:function(e,t,r){"use strict";
2Object.defineProperty(t,"__esModule",{value:!0}),t.base64=void 0;let n=r(12776),i=r(88236);t.base64=(e,t={})=>{let r,o;let a=t.paddingRequired??!1,s=t.characterSet??"base64";return"base64"===s?r=String.raw`[A-Za-z0-9+\/]`:((0,i.assert)("base64url"===s),r=String.raw`[-_A-Za-z0-9]`),o=a?RegExp(`^(?:${r}{4})*(?:${r}{3}=|${r}{2}==)?$`,"u"):RegExp(`^(?:${r}{4})*(?:${r}{2,3}|${r}{3}=|${r}{2}==)?$`,"u"),(0,n.pattern)(e,o)}},59471:function(e,t,r){"use strict";var n=r(82957).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.createDataView=t.concatBytes=t.valueToBytes=t.base64ToBytes=t.stringToBytes=t.numberToBytes=t.signedBigIntToBytes=t.bigIntToBytes=t.hexToBytes=t.bytesToBase64=t.bytesToString=t.bytesToNumber=t.bytesToSignedBigInt=t.bytesToBigInt=t.bytesToHex=t.assertIsBytes=t.isBytes=void 0;let i=r(25291),o=r(88236),a=r(34948),s=function(){let e=[];return()=>{if(0===e.length)for(let t=0;t<256;t++)e.push(t.toString(16).padStart(2,"0"));return e}}();function c(e){return e instanceof Uint8Array}function u(e){(0,o.assert)(c(e),"Value must be a Uint8Array.")}function l(e){if(u(e),0===e.length)return"0x";let t=s(),r=Array(e.length);for(let n=0;n<e.length;n++)r[n]=t[e[n]];return(0,a.add0x)(r.join(""))}function f(e){return u(e),BigInt(l(e))}function h(e){if(e?.toLowerCase?.()==="0x")return new Uint8Array;(0,a.assertIsHexString)(e);let t=(0,a.remove0x)(e).toLowerCase(),r=t.length%2==0?t:`0${t}`,n=new Uint8Array(r.length/2);for(let e=0;e<n.length;e++){let t=r.charCodeAt(2*e),i=r.charCodeAt(2*e+1),o=t-(t<58?48:87),a=i-(i<58?48:87);n[e]=16*o+a}return n}function d(e){return(0,o.assert)("bigint"==typeof e,"Value must be a bigint."),(0,o.assert)(e>=BigInt(0),"Value must be a non-negative bigint."),h(e.toString(16))}function p(e){return(0,o.assert)("number"==typeof e,"Value must be a number."),(0,o.assert)(e>=0,"Value must be a non-negative number."),(0,o.assert)(Number.isSafeInteger(e),"Value is not a safe integer. Use `bigIntToBytes` instead."),h(e.toString(16))}function m(e){return(0,o.assert)("string"==typeof e,"Value must be a string."),new TextEncoder().encode(e)}function g(e){if("bigint"==typeof e)return d(e);if("number"==typeof e)return p(e);if("string"==typeof e)return e.startsWith("0x")?h(e):m(e);if(c(e))return e;throw TypeError(`Unsupported value type: "${typeof e}".`)}t.isBytes=c,t.assertIsBytes=u,t.bytesToHex=l,t.bytesToBigInt=f,t.bytesToSignedBigInt=function(e){u(e);let t=BigInt(0);for(let r of e)t=(t<<BigInt(8))+BigInt(r);return BigInt.asIntN(8*e.length,t)},t.bytesToNumber=function(e){u(e);let t=f(e);return(0,o.assert)(t<=BigInt(Number.MAX_SAFE_INTEGER),"Number is not a safe integer. Use `bytesToBigInt` instead."),Number(t)},t.bytesToString=function(e){return u(e),new TextDecoder().decode(e)},t.bytesToBase64=function(e){return u(e),i.base64.encode(e)},t.hexToBytes=h,t.bigIntToBytes=d,t.signedBigIntToBytes=function(e,t){(0,o.assert)("bigint"==typeof e,"Value must be a bigint."),(0,o.assert)("number"==typeof t,"Byte length must be a number."),(0,o.assert)(t>0,"Byte length must be greater than 0."),(0,o.assert)(function(e,t){(0,o.assert)(t>0);let r=e>>BigInt(31);return!((~e&r)+(e&~r)>>BigInt(8*t+-1))}(e,t),"Byte length is too small to represent the given value.");let r=e,n=new Uint8Array(t);for(let e=0;e<n.length;e++)n[e]=Number(BigInt.asUintN(8,r)),r>>=BigInt(8);return n.reverse()},t.numberToBytes=p,t.stringToBytes=m,t.base64ToBytes=function(e){return(0,o.assert)("string"==typeof e,"Value must be a string."),i.base64.decode(e)},t.valueToBytes=g,t.concatBytes=function(e){let t=Array(e.length),r=0;for(let n=0;n<e.length;n++){let i=g(e[n]);t[n]=i,r+=i.length}let n=new Uint8Array(r);for(let e=0,r=0;e<t.length;e++)n.set(t[e],r),r+=t[e].length;return n},t.createDataView=function(e){return void 0!==n&&e instanceof n?new DataView(e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength)):new DataView(e.buffer,e.byteOffset,e.byteLength)}},75919:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toCaipChainId=t.parseCaipAccountId=t.parseCaipChainId=t.isCaipAccountAddress=t.isCaipAccountId=t.isCaipReference=t.isCaipNamespace=t.isCaipChainId=t.KnownCaipNamespace=t.CaipAccountAddressStruct=t.CaipAccountIdStruct=t.CaipReferenceStruct=t.CaipNamespaceStruct=t.CaipChainIdStruct=t.CAIP_ACCOUNT_ADDRESS_REGEX=t.CAIP_ACCOUNT_ID_REGEX=t.CAIP_REFERENCE_REGEX=t.CAIP_NAMESPACE_REGEX=t.CAIP_CHAIN_ID_REGEX=void 0;let n=r(12776);function i(e){return(0,n.is)(e,t.CaipNamespaceStruct)}function o(e){return(0,n.is)(e,t.CaipReferenceStruct)}t.CAIP_CHAIN_ID_REGEX=/^(?<namespace>[-a-z0-9]{3,8}):(?<reference>[-_a-zA-Z0-9]{1,32})$/u,t.CAIP_NAMESPACE_REGEX=/^[-a-z0-9]{3,8}$/u,t.CAIP_REFERENCE_REGEX=/^[-_a-zA-Z0-9]{1,32}$/u,t.CAIP_ACCOUNT_ID_REGEX=/^(?<chainId>(?<namespace>[-a-z0-9]{3,8}):(?<reference>[-_a-zA-Z0-9]{1,32})):(?<accountAddress>[-.%a-zA-Z0-9]{1,128})$/u,t.CAIP_ACCOUNT_ADDRESS_REGEX=/^[-.%a-zA-Z0-9]{1,128}$/u,t.CaipChainIdStruct=(0,n.pattern)((0,n.string)(),t.CAIP_CHAIN_ID_REGEX),t.CaipNamespaceStruct=(0,n.pattern)((0,n.string)(),t.CAIP_NAMESPACE_REGEX),t.CaipReferenceStruct=(0,n.pattern)((0,n.string)(),t.CAIP_REFERENCE_REGEX),t.CaipAccountIdStruct=(0,n.pattern)((0,n.string)(),t.CAIP_ACCOUNT_ID_REGEX),t.CaipAccountAddressStruct=(0,n.pattern)((0,n.string)(),t.CAIP_ACCOUNT_ADDRESS_REGEX),(t.KnownCaipNamespace||(t.KnownCaipNamespace={})).Eip155="eip155",t.isCaipChainId=function(e){return(0,n.is)(e,t.CaipChainIdStruct)},t.isCaipNamespace=i,t.isCaipReference=o,t.isCaipAccountId=function(e){return(0,n.is)(e,t.CaipAccountIdStruct)},t.isCaipAccountAddress=function(e){return(0,n.is)(e,t.CaipAccountAddressStruct)},t.parseCaipChainId=function(e){let r=t.CAIP_CHAIN_ID_REGEX.exec(e);if(!r?.groups)throw Error("Invalid CAIP chain ID.");return{namespace:r.groups.namespace,reference:r.groups.reference}},t.parseCaipAccountId=function(e){let r=t.CAIP_ACCOUNT_ID_REGEX.exec(e);if(!r?.groups)throw Error("Invalid CAIP account ID.");return{address:r.groups.accountAddress,chainId:r.groups.chainId,chain:{namespace:r.groups.namespace,reference:r.groups.reference}}},t.toCaipChainId=function(e,r){if(!i(e))throw Error(`Invalid "namespace", must match: ${t.CAIP_NAMESPACE_REGEX.toString()}`);if(!o(r))throw Error(`Invalid "reference", must match: ${t.CAIP_REFERENCE_REGEX.toString()}`);return`${e}:${r}`}},69942:function(e,t,r){"use strict";
2Object.defineProperty(t,"__esModule",{value:!0}),t.ChecksumStruct=void 0;let n=r(12776),i=r(27086);t.ChecksumStruct=(0,n.size)((0,i.base64)((0,n.string)(),{paddingRequired:!0}),44,44)},18907:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createHex=t.createBytes=t.createBigInt=t.createNumber=void 0;let n=r(12776),i=r(88236),o=r(59471),a=r(34948),s=(0,n.union)([(0,n.number)(),(0,n.bigint)(),(0,n.string)(),a.StrictHexStruct]),c=(0,n.coerce)((0,n.number)(),s,Number),u=(0,n.coerce)((0,n.bigint)(),s,BigInt);(0,n.union)([a.StrictHexStruct,(0,n.instance)(Uint8Array)]);let l=(0,n.coerce)((0,n.instance)(Uint8Array),(0,n.union)([a.StrictHexStruct]),o.hexToBytes),f=(0,n.coerce)(a.StrictHexStruct,(0,n.instance)(Uint8Array),o.bytesToHex);t.createNumber=function(e){try{let t=(0,n.create)(e,c);return(0,i.assert)(Number.isFinite(t),`Expected a number-like value, got "${e}".`),t}catch(t){if(t instanceof n.StructError)throw Error(`Expected a number-like value, got "${e}".`);throw t}},t.createBigInt=function(e){try{return(0,n.create)(e,u)}catch(e){if(e instanceof n.StructError)throw Error(`Expected a number-like value, got "${String(e.value)}".`);throw e}},t.createBytes=function(e){if("string"==typeof e&&"0x"===e.toLowerCase())return new Uint8Array;try{return(0,n.create)(e,l)}catch(e){if(e instanceof n.StructError)throw Error(`Expected a bytes-like value, got "${String(e.value)}".`);throw e}},t.createHex=function(e){if(e instanceof Uint8Array&&0===e.length||"string"==typeof e&&"0x"===e.toLowerCase())return"0x";try{return(0,n.create)(e,f)}catch(e){if(e instanceof n.StructError)throw Error(`Expected a bytes-like value, got "${String(e.value)}".`);throw e}}},29454:function(e,t){"use strict";var r,n,i=this&&this.__classPrivateFieldGet||function(e,t,r,n){if("a"===r&&!n)throw TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)},o=this&&this.__classPrivateFieldSet||function(e,t,r,n,i){if("m"===n)throw TypeError("Private method is not writable");if("a"===n&&!i)throw TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?i.call(e,r):i?i.value=r:t.set(e,r),r};Object.defineProperty(t,"__esModule",{value:!0}),t.FrozenSet=t.FrozenMap=void 0;class a{get size(){return i(this,r,"f").size}[(r=new WeakMap,Symbol.iterator)](){return i(this,r,"f")[Symbol.iterator]()}constructor(e){r.set(this,void 0),o(this,r,new Map(e),"f"),Object.freeze(this)}entries(){return i(this,r,"f").entries()}forEach(e,t){return i(this,r,"f").forEach((r,n,i)=>e.call(t,r,n,this))}get(e){return i(this,r,"f").get(e)}has(e){return i(this,r,"f").has(e)}keys(){return i(this,r,"f").keys()}values(){return i(this,r,"f").values()}toString(){return`FrozenMap(${this.size}) {${this.size>0?` ${[...this.entries()].map(([e,t])=>`${String(e)} => ${String(t)}`).join(", ")} `:""}}`}}t.FrozenMap=a;class s{get size(){return i(this,n,"f").size}[(n=new WeakMap,Symbol.iterator)](){return i(this,n,"f")[Symbol.iterator]()}constructor(e){n.set(this,void 0),o(this,n,new Set(e),"f"),Object.freeze(this)}entries(){return i(this,n,"f").entries()}forEach(e,t){return i(this,n,"f").forEach((r,n,i)=>e.call(t,r,n,this))}has(e){return i(this,n,"f").has(e)}keys(){return i(this,n,"f").keys()}values(){return i(this,n,"f").values()}toString(){return`FrozenSet(${this.size}) {${this.size>0?` ${[...this.values()].map(e=>String(e)).join(", ")} `:""}}`}}t.FrozenSet=s,Object.freeze(a),Object.freeze(a.prototype),Object.freeze(s),Object.freeze(s.prototype)},40762:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},17243:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.wrapError=t.getErrorMessage=t.isErrorWithStack=t.isErrorWithMessage=t.isErrorWithCode=void 0;let n=r(76346),i=r(15263);function o(e){return"object"==typeof e&&null!==e&&"code"in e}function a(e){return"object"==typeof e&&null!==e&&"message"in e}t.isErrorWithCode=o,t.isErrorWithMessage=a,t.isErrorWithStack=function(e){return"object"==typeof e&&null!==e&&"stack"in e},t.getErrorMessage=function(e){return a(e)&&"string"==typeof e.message?e.message:(0,i.isNullOrUndefined)(e)?"":String(e)},t.wrapError=function(e,t){if(e instanceof Error||(0,i.isObject)(e)&&"Error"===e.constructor.name){let r;return r=2===Error.length?Error(t,{cause:e}):new n.ErrorWithCause(t,{cause:e}),o(e)&&(r.code=e.code),r}return t.length>0?Error(`${String(e)}: ${t}`):Error(String(e))}},34948:function(e,t,r){"use strict";
2Object.defineProperty(t,"__esModule",{value:!0}),t.remove0x=t.add0x=t.isValidChecksumAddress=t.getChecksumAddress=t.isValidHexAddress=t.assertIsStrictHexString=t.assertIsHexString=t.isStrictHexString=t.isHexString=t.HexChecksumAddressStruct=t.HexAddressStruct=t.StrictHexStruct=t.HexStruct=void 0;let n=r(12776),i=r(32517),o=r(88236),a=r(59471);function s(e){return(0,n.is)(e,t.HexStruct)}function c(e){return(0,n.is)(e,t.StrictHexStruct)}function u(e){(0,o.assert)((0,n.is)(e,t.HexChecksumAddressStruct),"Invalid hex address.");let r=f(e.toLowerCase()),s=f((0,a.bytesToHex)((0,i.keccak_256)(r)));return`0x${r.split("").map((e,t)=>{let r=s[t];return(0,o.assert)((0,n.is)(r,(0,n.string)()),"Hash shorter than address."),parseInt(r,16)>7?e.toUpperCase():e}).join("")}`}function l(e){return!!(0,n.is)(e,t.HexChecksumAddressStruct)&&u(e)===e}function f(e){return e.startsWith("0x")||e.startsWith("0X")?e.substring(2):e}t.HexStruct=(0,n.pattern)((0,n.string)(),/^(?:0x)?[0-9a-f]+$/iu),t.StrictHexStruct=(0,n.pattern)((0,n.string)(),/^0x[0-9a-f]+$/iu),t.HexAddressStruct=(0,n.pattern)((0,n.string)(),/^0x[0-9a-f]{40}$/u),t.HexChecksumAddressStruct=(0,n.pattern)((0,n.string)(),/^0x[0-9a-fA-F]{40}$/u),t.isHexString=s,t.isStrictHexString=c,t.assertIsHexString=function(e){(0,o.assert)(s(e),"Value must be a hexadecimal string.")},t.assertIsStrictHexString=function(e){(0,o.assert)(c(e),'Value must be a hexadecimal string, starting with "0x".')},t.isValidHexAddress=function(e){return(0,n.is)(e,t.HexAddressStruct)||l(e)},t.getChecksumAddress=u,t.isValidChecksumAddress=l,t.add0x=function(e){return e.startsWith("0x")?e:e.startsWith("0X")?`0x${e.substring(2)}`:`0x${e}`},t.remove0x=f},94269:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(88236),t),i(r(27086),t),i(r(59471),t),i(r(75919),t),i(r(69942),t),i(r(18907),t),i(r(29454),t),i(r(40762),t),i(r(17243),t),i(r(34948),t),i(r(52762),t),i(r(81186),t),i(r(2831),t),i(r(15263),t),i(r(38752),t),i(r(80044),t),i(r(81473),t),i(r(24552),t),i(r(47725),t),i(r(49276),t)},52762:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getJsonRpcIdValidator=t.assertIsJsonRpcError=t.isJsonRpcError=t.assertIsJsonRpcFailure=t.isJsonRpcFailure=t.assertIsJsonRpcSuccess=t.isJsonRpcSuccess=t.assertIsJsonRpcResponse=t.isJsonRpcResponse=t.assertIsPendingJsonRpcResponse=t.isPendingJsonRpcResponse=t.JsonRpcResponseStruct=t.JsonRpcFailureStruct=t.JsonRpcSuccessStruct=t.PendingJsonRpcResponseStruct=t.assertIsJsonRpcRequest=t.isJsonRpcRequest=t.assertIsJsonRpcNotification=t.isJsonRpcNotification=t.JsonRpcNotificationStruct=t.JsonRpcRequestStruct=t.JsonRpcParamsStruct=t.JsonRpcErrorStruct=t.JsonRpcIdStruct=t.JsonRpcVersionStruct=t.jsonrpc2=t.getJsonSize=t.getSafeJson=t.isValidJson=t.JsonStruct=t.UnsafeJsonStruct=t.exactOptional=t.object=void 0;let n=r(12776),i=r(88236),o=r(15263);function a({path:e,branch:t}){let r=e[e.length-1];return(0,o.hasProperty)(t[t.length-2],r)}function s(e){return new n.Struct({...e,type:`optional ${e.type}`,validator:(t,r)=>!a(r)||e.validator(t,r),refiner:(t,r)=>!a(r)||e.refiner(t,r)})}function c(e){return(0,n.create)(e,t.JsonStruct)}t.object=e=>(0,n.object)(e),t.exactOptional=s,t.UnsafeJsonStruct=(0,n.union)([(0,n.literal)(null),(0,n.boolean)(),(0,n.define)("finite number",e=>(0,n.is)(e,(0,n.number)())&&Number.isFinite(e)),(0,n.string)(),(0,n.array)((0,n.lazy)(()=>t.UnsafeJsonStruct)),(0,n.record)((0,n.string)(),(0,n.lazy)(()=>t.UnsafeJsonStruct))]),t.JsonStruct=(0,n.coerce)(t.UnsafeJsonStruct,(0,n.any)(),e=>((0,i.assertStruct)(e,t.UnsafeJsonStruct),JSON.parse(JSON.stringify(e,(e,t)=>{if("__proto__"!==e&&"constructor"!==e)return t})))),t.isValidJson=function(e){try{return c(e),!0}catch{return!1}},t.getSafeJson=c,t.getJsonSize=function(e){(0,i.assertStruct)(e,t.JsonStruct,"Invalid JSON value");let r=JSON.stringify(e);return new TextEncoder().encode(r).byteLength}
2,t.jsonrpc2="2.0",t.JsonRpcVersionStruct=(0,n.literal)(t.jsonrpc2),t.JsonRpcIdStruct=(0,n.nullable)((0,n.union)([(0,n.number)(),(0,n.string)()])),t.JsonRpcErrorStruct=(0,t.object)({code:(0,n.integer)(),message:(0,n.string)(),data:s(t.JsonStruct),stack:s((0,n.string)())}),t.JsonRpcParamsStruct=(0,n.union)([(0,n.record)((0,n.string)(),t.JsonStruct),(0,n.array)(t.JsonStruct)]),t.JsonRpcRequestStruct=(0,t.object)({id:t.JsonRpcIdStruct,jsonrpc:t.JsonRpcVersionStruct,method:(0,n.string)(),params:s(t.JsonRpcParamsStruct)}),t.JsonRpcNotificationStruct=(0,t.object)({jsonrpc:t.JsonRpcVersionStruct,method:(0,n.string)(),params:s(t.JsonRpcParamsStruct)}),t.isJsonRpcNotification=function(e){return(0,n.is)(e,t.JsonRpcNotificationStruct)},t.assertIsJsonRpcNotification=function(e,r){(0,i.assertStruct)(e,t.JsonRpcNotificationStruct,"Invalid JSON-RPC notification",r)},t.isJsonRpcRequest=function(e){return(0,n.is)(e,t.JsonRpcRequestStruct)},t.assertIsJsonRpcRequest=function(e,r){(0,i.assertStruct)(e,t.JsonRpcRequestStruct,"Invalid JSON-RPC request",r)},t.PendingJsonRpcResponseStruct=(0,n.object)({id:t.JsonRpcIdStruct,jsonrpc:t.JsonRpcVersionStruct,result:(0,n.optional)((0,n.unknown)()),error:(0,n.optional)(t.JsonRpcErrorStruct)}),t.JsonRpcSuccessStruct=(0,t.object)({id:t.JsonRpcIdStruct,jsonrpc:t.JsonRpcVersionStruct,result:t.JsonStruct}),t.JsonRpcFailureStruct=(0,t.object)({id:t.JsonRpcIdStruct,jsonrpc:t.JsonRpcVersionStruct,error:t.JsonRpcErrorStruct}),t.JsonRpcResponseStruct=(0,n.union)([t.JsonRpcSuccessStruct,t.JsonRpcFailureStruct]),t.isPendingJsonRpcResponse=function(e){return(0,n.is)(e,t.PendingJsonRpcResponseStruct)},t.assertIsPendingJsonRpcResponse=function(e,r){(0,i.assertStruct)(e,t.PendingJsonRpcResponseStruct,"Invalid pending JSON-RPC response",r)},t.isJsonRpcResponse=function(e){return(0,n.is)(e,t.JsonRpcResponseStruct)},t.assertIsJsonRpcResponse=function(e,r){(0,i.assertStruct)(e,t.JsonRpcResponseStruct,"Invalid JSON-RPC response",r)},t.isJsonRpcSuccess=function(e){return(0,n.is)(e,t.JsonRpcSuccessStruct)},t.assertIsJsonRpcSuccess=function(e,r){(0,i.assertStruct)(e,t.JsonRpcSuccessStruct,"Invalid JSON-RPC success response",r)},t.isJsonRpcFailure=function(e){return(0,n.is)(e,t.JsonRpcFailureStruct)},t.assertIsJsonRpcFailure=function(e,r){(0,i.assertStruct)(e,t.JsonRpcFailureStruct,"Invalid JSON-RPC failure response",r)},t.isJsonRpcError=function(e){return(0,n.is)(e,t.JsonRpcErrorStruct)},t.assertIsJsonRpcError=function(e,r){(0,i.assertStruct)(e,t.JsonRpcErrorStruct,"Invalid JSON-RPC error",r)},t.getJsonRpcIdValidator=function(e){let{permitEmptyString:t,permitFractions:r,permitNull:n}={permitEmptyString:!0,permitFractions:!1,permitNull:!0,...e};return e=>!!("number"==typeof e&&(r||Number.isInteger(e))||"string"==typeof e&&(t||e.length>0)||n&&null===e)}},81186:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},2831:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.createModuleLogger=t.createProjectLogger=void 0;let i=(0,n(r(31464)).default)("metamask");t.createProjectLogger=function(e){return i.extend(e)},t.createModuleLogger=function(e,t){return e.extend(t)}},15263:function(e,t){"use strict";var r;function n(e){return 127>=e.charCodeAt(0)}Object.defineProperty(t,"__esModule",{value:!0}),t.calculateNumberSize=t.calculateStringSize=t.isASCII=t.isPlainObject=t.ESCAPE_CHARACTERS_REGEXP=t.JsonSize=t.getKnownPropertyNames=t.hasProperty=t.isObject=t.isNullOrUndefined=t.isNonEmptyArray=void 0,t.isNonEmptyArray=function(e){return Array.isArray(e)&&e.length>0},t.isNullOrUndefined=function(e){return null==e},t.isObject=function(e){return!!e&&"object"==typeof e&&!Array.isArray(e)},t.hasProperty=(e,t)=>Object.hasOwnProperty.call(e,t),t.getKnownPropertyNames=function(e){return Object.getOwnPropertyNames(e)},(r=t.JsonSize||(t.JsonSize={}))[r.Null=4]="Null",r[r.Comma=1]="Comma",r[r.Wrapper=1]="Wrapper",r[r.True=4]="True",r[r.False=5]="False",r[r.Quote=1]="Quote",r[r.Colon=1]="Colon",r[r.Date=24]="Date",t.ESCAPE_CHARACTERS_REGEXP=/"|\\|\n|\r|\t/gu,t.isPlainObject=function(e){if("object"!=typeof e||null===e)return!1;try{let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}catch(e){return!1}},t.isASCII=n,t.calculateStringSize=function(e){return e.split("").reduce((e,t)=>
2n(t)?e+1:e+2,0)+(e.match(t.ESCAPE_CHARACTERS_REGEXP)??[]).length},t.calculateNumberSize=function(e){return e.toString().length}},38752:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hexToBigInt=t.hexToNumber=t.bigIntToHex=t.numberToHex=void 0;let n=r(88236),i=r(34948);t.numberToHex=e=>((0,n.assert)("number"==typeof e,"Value must be a number."),(0,n.assert)(e>=0,"Value must be a non-negative number."),(0,n.assert)(Number.isSafeInteger(e),"Value is not a safe integer. Use `bigIntToHex` instead."),(0,i.add0x)(e.toString(16))),t.bigIntToHex=e=>((0,n.assert)("bigint"==typeof e,"Value must be a bigint."),(0,n.assert)(e>=0,"Value must be a non-negative bigint."),(0,i.add0x)(e.toString(16))),t.hexToNumber=e=>{(0,i.assertIsHexString)(e);let t=parseInt(e,16);return(0,n.assert)(Number.isSafeInteger(t),"Value is not a safe integer. Use `hexToBigInt` instead."),t},t.hexToBigInt=e=>((0,i.assertIsHexString)(e),BigInt((0,i.add0x)(e)))},80044:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},81473:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createDeferredPromise=void 0,t.createDeferredPromise=function({suppressUnhandledRejection:e=!1}={}){let t,r;let n=new Promise((e,n)=>{t=e,r=n});return e&&n.catch(e=>{}),{promise:n,resolve:t,reject:r}}},24552:function(e,t){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.timeSince=t.inMilliseconds=t.Duration=void 0,(r=t.Duration||(t.Duration={}))[r.Millisecond=1]="Millisecond",r[r.Second=1e3]="Second",r[r.Minute=6e4]="Minute",r[r.Hour=36e5]="Hour",r[r.Day=864e5]="Day",r[r.Week=6048e5]="Week",r[r.Year=31536e6]="Year";let n=e=>Number.isInteger(e)&&e>=0,i=(e,t)=>{if(!n(e))throw Error(`"${t}" must be a non-negative integer. Received: "${e}".`)};t.inMilliseconds=function(e,t){return i(e,"count"),e*t},t.timeSince=function(e){return i(e,"timestamp"),Date.now()-e}},47725:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},49276:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.satisfiesVersionRange=t.gtRange=t.gtVersion=t.assertIsSemVerRange=t.assertIsSemVerVersion=t.isValidSemVerRange=t.isValidSemVerVersion=t.VersionRangeStruct=t.VersionStruct=void 0;let n=r(12776),i=r(67374),o=r(88236);t.VersionStruct=(0,n.refine)((0,n.string)(),"Version",e=>null!==(0,i.valid)(e)||`Expected SemVer version, got "${e}"`),t.VersionRangeStruct=(0,n.refine)((0,n.string)(),"Version range",e=>null!==(0,i.validRange)(e)||`Expected SemVer range, got "${e}"`),t.isValidSemVerVersion=function(e){return(0,n.is)(e,t.VersionStruct)},t.isValidSemVerRange=function(e){return(0,n.is)(e,t.VersionRangeStruct)},t.assertIsSemVerVersion=function(e){(0,o.assertStruct)(e,t.VersionStruct)},t.assertIsSemVerRange=function(e){(0,o.assertStruct)(e,t.VersionRangeStruct)},t.gtVersion=function(e,t){return(0,i.gt)(e,t)},t.gtRange=function(e,t){return(0,i.gtr)(e,t)},t.satisfiesVersionRange=function(e,t){return(0,i.satisfies)(e,t,{includePrerelease:!0})}}}]);

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.