PageSourceSearch

https://auth.xtoscorm.com/static/js/5048.f1fa2474.chunk.js

js xtoscorm.com collected 2026-09-24 10:19:16 UTC 217,231 bytes, 1 lines download raw bytes

1(self.webpackChunkweb=self.webpackChunkweb||[]).push([[5048],{32428:function(e,t,r){"use strict";var n=r(89728).default,a=r(56690).default,o=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}: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)||o(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0});var s=r(9111),u=n((function e(){var t=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];a(this,e),this.allowedOrigins=null,this.callbacks=new Map,this.debugMode=!1,this.isValidMessage=function(e){var r=e.origin,n=e.data,a=!n,o=e.source===window.parent,i=("undefined"!==typeof n.version&&parseInt(n.version.split(".")[0]))>=1,s=!0;return Array.isArray(t.allowedOrigins)&&(s=void 0!==t.allowedOrigins.find((function(e){return e.test(r)}))),!a&&o&&i&&s},this.logIncomingMessage=function(e){console.info("Safe Apps SDK v1: A message was received from origin ".concat(e.origin,". "),e.data)},this.onParentMessage=function(e){t.isValidMessage(e)&&(t.debugMode&&t.logIncomingMessage(e),t.handleIncomingMessage(e.data))},this.handleIncomingMessage=function(e){var r=e.id,n=t.callbacks.get(r);n&&(n(e),t.callbacks.delete(r))},this.send=function(e,r){var n=s.MessageFormatter.makeRequest(e,r);if("undefined"===typeof window)throw new Error("Window doesn't exist");return window.parent.postMessage(n,"*"),new Promise((function(e,r){t.callbacks.set(n.id,(function(t){t.success?e(t):r(new Error(t.error))}))}))},this.allowedOrigins=r,this.debugMode=n,window.addEventListener("message",this.onParentMessage)}));t.default=u,i(r(6225),t)},9111:function(e,t,r){"use strict";var n=r(89728).default,a=r(56690).default;Object.defineProperty(t,"__esModule",{value:!0}),t.MessageFormatter=void 0;var o=r(19570),i=r(85166),s=n((function e(){a(this,e)}));t.MessageFormatter=s,s.makeRequest=function(e,t){return{id:(0,i.generateRequestId)(),method:e,params:t,env:{sdkVersion:(0,o.getSDKVersion)()}}},s.makeResponse=function(e,t,r){return{id:e,success:!0,version:r,data:t}},s.makeErrorResponse=function(e,t,r){return{id:e,success:!1,error:t,version:r}}},6225:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Methods=void 0,function(e){e.sendTransactions="sendTransactions",e.rpcCall="rpcCall",e.getChainInfo="getChainInfo",e.getSafeInfo="getSafeInfo",e.getTxBySafeTxHash="getTxBySafeTxHash",e.getSafeBalances="getSafeBalances",e.signMessage="signMessage"}(t.Methods||(t.Methods={}))},85166:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.generateRequestId=void 0;var r=function(e){return e.toString(16).padStart(2,"0")};t.generateRequestId=function(){return"undefined"!==typeof window?function(e){var t=new Uint8Array((e||40)/2);return window.crypto.getRandomValues(t),Array.from(t,r).join("")}(10):(new Date).getTime().toString(36)}},85024:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RPC_CALLS=void 0,t.RPC_CALLS={eth_call:"eth_call",eth_gasPrice:"eth_gasPrice",eth_getLogs:"eth_getLogs",eth_getBalance:"eth_getBalance",eth_getCode:"eth_getCode",eth_getBlockByHash:"eth_getBlockByHash",eth_getBlockByNumber:"eth_getBlockByNumber",eth_getStorageAt:"eth_getStorageAt",eth_getTransactionByHash:"eth_getTransactionByHash",eth_getTransactionReceipt:"eth_getTransactionReceipt",eth_getTransactionCount:"eth_getTransactionCount",eth_estimateGas:"eth_estimateGas"}},16320:function(e,t,r){"use strict";var n=r(17061).default,a=r(17156).default,o=r(56690).default,i=r(89728).default;Object.defineProperty(t,"__esModule",{value:!0}),t.Eth=void 0;var s=r(85024),u=r(6225),c={defaultBlockParam:function(){return arguments.length>0&&void 0!==arguments[0]?arguments[0]:"latest"},returnFullTxObjectParam:function(){return arguments.length>0&&void 0!==arguments[0]&&arguments[0]},blockNumberToHex:function(e){return Number.isInteger(e)?"0x".concat(e.toString(16)):e}},l=function(){function e(t){var r=this;o(this,e),this.communicator=t,this.call=this.buildRequest({call:s.RPC_CALLS.eth_call,formatters:[null,c.defaultBlockParam]}),this.getBalance=this.buildRequest({call:s.RPC_CALLS.eth_getBalance,formatters:[null,c.defaultBlockParam]}),this.getCode=this.buildRequest({call:s.RPC_CALLS.eth_getCode,formatters:[null,c.defaultBlockParam]}
1),this.getStorageAt=this.buildRequest({call:s.RPC_CALLS.eth_getStorageAt,formatters:[null,c.blockNumberToHex,c.defaultBlockParam]}),this.getPastLogs=this.buildRequest({call:s.RPC_CALLS.eth_getLogs}),this.getBlockByHash=this.buildRequest({call:s.RPC_CALLS.eth_getBlockByHash,formatters:[null,c.returnFullTxObjectParam]}),this.getBlockByNumber=this.buildRequest({call:s.RPC_CALLS.eth_getBlockByNumber,formatters:[c.blockNumberToHex,c.returnFullTxObjectParam]}),this.getTransactionByHash=this.buildRequest({call:s.RPC_CALLS.eth_getTransactionByHash}),this.getTransactionReceipt=this.buildRequest({call:s.RPC_CALLS.eth_getTransactionReceipt}),this.getTransactionCount=this.buildRequest({call:s.RPC_CALLS.eth_getTransactionCount,formatters:[null,c.defaultBlockParam]}),this.getGasPrice=this.buildRequest({call:s.RPC_CALLS.eth_gasPrice}),this.getEstimateGas=function(e){return r.buildRequest({call:s.RPC_CALLS.eth_estimateGas})([e])}}return i(e,[{key:"buildRequest",value:function(e){var t=this,r=e.call,o=e.formatters;return function(){var e=a(n().mark((function e(a){var i,s;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o&&Array.isArray(a)&&o.forEach((function(e,t){e&&(a[t]=e(a[t]))})),i={call:r,params:a||[]},e.next=4,t.communicator.send(u.Methods.rpcCall,i);case 4:return s=e.sent,e.abrupt("return",s.data);case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()}}]),e}();t.Eth=l},45048:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),a=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getSDKVersion=void 0;var i=o(r(66258));t.default=i.default,a(r(66258),t),a(r(60502),t),a(r(6225),t),a(r(9111),t);var s=r(19570);Object.defineProperty(t,"getSDKVersion",{enumerable:!0,get:function(){return s.getSDKVersion}})},742:function(e,t,r){"use strict";var n=r(17061).default,a=r(17156).default,o=r(56690).default,i=r(89728).default;Object.defineProperty(t,"__esModule",{value:!0}),t.Safe=void 0;var s=r(95122),u=r(73888),c=r(6225),l=r(85024),f=function(){function e(t){o(this,e),this.communicator=t}return i(e,[{key:"getChainInfo",value:function(){var e=a(n().mark((function e(){var t;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.communicator.send(c.Methods.getChainInfo,void 0);case 2:return t=e.sent,e.abrupt("return",t.data);case 4:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"getInfo",value:function(){var e=a(n().mark((function e(){var t;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.communicator.send(c.Methods.getSafeInfo,void 0);case 2:return t=e.sent,e.abrupt("return",t.data);case 4:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"experimental_getBalances",value:function(){var e=a(n().mark((function e(){var t,r,a,o=arguments;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=(o.length>0&&void 0!==o[0]?o[0]:{}).currency,r=void 0===t?"usd":t,e.next=3,this.communicator.send(c.Methods.getSafeBalances,{currency:r});case 3:return a=e.sent,e.abrupt("return",a.data);case 5:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"check1271Signature",value:function(){var e=a(n().mark((function e(t){var r,a,o,i,s,f=arguments;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=f.length>1&&void 0!==f[1]?f[1]:"0x",e.next=3,this.getInfo();case 3:return a=e.sent,o=u.EIP_1271_INTERFACE.encodeFunctionData("isValidSignature",[t,r]),i={call:l.RPC_CALLS.eth_call,params:[{to:a.safeAddress,data:o},"latest"]},e.prev=6,e.next=9,this.communicator.send(c.Methods.rpcCall,i);case 9:return s=e.sent,e.abrupt("return",s.data.slice(0,10).toLowerCase()===u.MAGIC_VALUE);case 13:return e.prev=13,e.t0=e.catch(6),e.abrupt("return",!1);case 16:case"end":return e.stop()}}),e,this,[[6,13]])})));return function(t){return e.apply(this,arguments)}}()},{key:"check1271SignatureBytes",value:function(){var e=a(n().mark((function e(t){var r,a,o,i,f,h,d=arguments;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=d.length>1&&void 0!==d[1]?d[1]:"0x",e.next=3,this.getInfo();case 3:return a=e.sent,o=s.ethers.utils.arrayify(t),i=u.EIP_1271_BYTES_INTERFACE.encodeFunctionData("isValidSignature",[o,r]),f={call:l.RPC_CALLS.eth_call,params:[{to:a.safeAddress,data:i},"latest"]},e.prev=7,e.next=10,this.communicator.send(c.Methods.rpcCall,f);case 10:return h=e.sent,e.abrupt("return",h.data.slice(0,10).toLowerCase()===u.MAGIC_VALUE_BYTES);case 14:return e.prev=14,e.t0=e.catch(7),e.abrupt("return",!1);case 17:case"end":return e.stop()}}),e,this,[[7,14]])}
1)));return function(t){return e.apply(this,arguments)}}()},{key:"calculateMessageHash",value:function(e){return s.ethers.utils.hashMessage(e)}},{key:"isMessageSigned",value:function(){var e=a(n().mark((function e(t){var r,a,o,i=arguments;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=i.length>1&&void 0!==i[1]?i[1]:"0x",a=this.calculateMessageHash(t),e.next=4,this.isMessageHashSigned(a,r);case 4:return o=e.sent,e.abrupt("return",o);case 6:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"isMessageHashSigned",value:function(){var e=a(n().mark((function e(t){var r,a,o,i,s,u=arguments;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=u.length>1&&void 0!==u[1]?u[1]:"0x",a=[this.check1271Signature.bind(this),this.check1271SignatureBytes.bind(this)],o=0,i=a;case 3:if(!(o<i.length)){e.next=13;break}return s=i[o],e.next=7,s(t,r);case 7:if(!e.sent){e.next=10;break}return e.abrupt("return",!0);case 10:o++,e.next=3;break;case 13:return e.abrupt("return",!1);case 14:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()}]),e}();t.Safe=f},73888:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MAGIC_VALUE_BYTES=t.MAGIC_VALUE=t.EIP_1271_BYTES_INTERFACE=t.EIP_1271_INTERFACE=void 0;var n=r(95122);t.MAGIC_VALUE="0x1626ba7e";t.MAGIC_VALUE_BYTES="0x20c13b0b";var a=new n.ethers.utils.Interface(["function isValidSignature(bytes32 _dataHash, bytes calldata _signature) external view"]);t.EIP_1271_INTERFACE=a;var o=new n.ethers.utils.Interface(["function isValidSignature(bytes calldata _data, bytes calldata _signature) public view"]);t.EIP_1271_BYTES_INTERFACE=o},66258:function(e,t,r){"use strict";var n=r(89728).default,a=r(56690).default,o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=o(r(32428)),s=r(21063),u=r(16320),c=r(742),l=n((function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};a(this,e);var r=t.whitelistedDomains,n=void 0===r?null:r,o=t.debug,l=void 0!==o&&o;this.communicator=new i.default(n,l),this.eth=new u.Eth(this.communicator),this.txs=new s.TXs(this.communicator),this.safe=new c.Safe(this.communicator)}));t.default=l},21063:function(e,t,r){"use strict";var n=r(17061).default,a=r(17156).default,o=r(56690).default,i=r(89728).default;Object.defineProperty(t,"__esModule",{value:!0}),t.TXs=void 0;var s=r(6225),u=function(){function e(t){o(this,e),this.communicator=t}return i(e,[{key:"getBySafeTxHash",value:function(){var e=a(n().mark((function e(t){var r;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=2;break}throw new Error("Invalid safeTxHash");case 2:return e.next=4,this.communicator.send(s.Methods.getTxBySafeTxHash,{safeTxHash:t});case 4:return r=e.sent,e.abrupt("return",r.data);case 6:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"signMessage",value:function(){var e=a(n().mark((function e(t){var r,a;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r={message:t},e.next=3,this.communicator.send(s.Methods.signMessage,r);case 3:return a=e.sent,e.abrupt("return",a.data);case 5:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"send",value:function(){var e=a(n().mark((function e(t){var r,a,o,i;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.txs,a=t.params,r&&r.length){e.next=3;break}throw new Error("No transactions were passed");case 3:return o={txs:r,params:a},e.next=6,this.communicator.send(s.Methods.sendTransactions,o);case 6:return i=e.sent,e.abrupt("return",i.data);case 8:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()}]),e}();t.TXs=u},26755:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TransferDirection=t.TransactionStatus=t.TokenType=t.Operation=void 0;var n=r(38268);Object.defineProperty(t,"Operation",{enumerable:!0,get:function(){return n.Operation}}),Object.defineProperty(t,"TokenType",{enumerable:!0,get:function(){return n.TokenType}}),Object.defineProperty(t,"TransactionStatus",{enumerable:!0,get:function(){return n.TransactionStatus}}),Object.defineProperty(t,"TransferDirection",{enumerable:!0,get:function(){return n.TransferDirection}})},60502:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),a=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};
1Object.defineProperty(t,"__esModule",{value:!0}),a(r(28568),t),a(r(81068),t),a(r(26755),t),a(r(77691),t)},77691:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});r(6225)},81068:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},28568:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},19570: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.getSDKVersion=void 0;var a=n(r(72010));t.getSDKVersion=function(){return a.default.version.slice(0,5)}},95122:function(e,t,r){"use strict";r.r(t),r.d(t,{BaseContract:function(){return M},BigNumber:function(){return E.O$},Contract:function(){return j},ContractFactory:function(){return z},FixedNumber:function(){return te},Signer:function(){return k.E},VoidSigner:function(){return k.b},Wallet:function(){return vt},Wordlist:function(){return me},constants:function(){return n},errors:function(){return P.jK},ethers:function(){return s},getDefaultProvider:function(){return An},logger:function(){return sa},providers:function(){return a},utils:function(){return i},version:function(){return ia},wordlists:function(){return ke}});var n={};r.r(n),r.d(n,{AddressZero:function(){return bt.d},EtherSymbol:function(){return wt},HashZero:function(){return kt.R},MaxInt256:function(){return yt.PS},MaxUint256:function(){return yt.Bz},MinInt256:function(){return yt.$B},NegativeOne:function(){return yt.tL},One:function(){return yt.fh},Two:function(){return yt.Py},WeiPerEther:function(){return yt.Ce},Zero:function(){return yt._Y}});var a={};r.r(a),r.d(a,{AlchemyProvider:function(){return Or},AlchemyWebSocketProvider:function(){return Rr},AnkrProvider:function(){return Zr},BaseProvider:function(){return ar},CloudflareProvider:function(){return Gr},EtherscanProvider:function(){return Wr},FallbackProvider:function(){return ln},Formatter:function(){return Ct},InfuraProvider:function(){return vn},InfuraWebSocketProvider:function(){return pn},IpcProvider:function(){return fn},JsonRpcBatchProvider:function(){return mn},JsonRpcProvider:function(){return br},JsonRpcSigner:function(){return vr},NodesmithProvider:function(){return bn},PocketProvider:function(){return wn},Provider:function(){return y.zt},Resolver:function(){return tr},StaticJsonRpcProvider:function(){return Ar},UrlJsonRpcProvider:function(){return Nr},Web3Provider:function(){return Tn},WebSocketProvider:function(){return _r},getDefaultProvider:function(){return An},getNetwork:function(){return Et.H},isCommunityResourcable:function(){return Rt},isCommunityResource:function(){return Ot},showThrottleMessage:function(){return It}});var o={};r.r(o),r.d(o,{decode:function(){return xt.J},encode:function(){return xt.c}});var i={};r.r(i),r.d(i,{AbiCoder:function(){return Nn.R},ConstructorFragment:function(){return Sn.Xg},ErrorFragment:function(){return Sn.IC},EventFragment:function(){return Sn.QV},FormatTypes:function(){return Sn.pc},Fragment:function(){return Sn.HY},FunctionFragment:function(){return Sn.YW},HDNode:function(){return Re},Indexed:function(){return b.Hk},Interface:function(){return b.vU},LogDescription:function(){return b.CC},Logger:function(){return P.Yd},ParamType:function(){return Sn._R},RLP:function(){return Gn},SigningKey:function(){return he.Et},SupportedAlgorithm:function(){return de.p},TransactionDescription:function(){return b.vk},TransactionTypes:function(){return T.em},UnicodeNormalizationForm:function(){return oe.Uj},Utf8ErrorFuncs:function(){return oe.te},Utf8ErrorReason:function(){return oe.Uw},_TypedDataEncoder:function(){return ue.E},_fetchData:function(){return Tt.MY},_toEscapedUtf8String:function(){return oe.U$},accessListify:function(){return T.z7},arrayify:function(){return x.lE},base58:function(){return ce.eU},base64:function(){return o},checkProperties:function(){return _.uj},checkResultErrors:function(){return g.BR},commify:function(){return ta},computeAddress:function(){return T.db},computeHmac:function(){return le.Gy},computePublicKey:function(){return he.VW},concat:function(){return x.zo},deepCopy:function(){return _.p$},defaultAbiCoder:function(){return Nn.$},defaultPath:function(){return Ce},defineReadOnly:function(){return _.zG},dnsEncode:function(){return _t.Kn},entropyToMnemonic:function(){return Ie},fetchJson:function(){return Tt.rd},formatBytes32String:function(){return Jn},formatEther:function(){return aa},formatUnits:function(){return ra},getAccountPath:function(){return Ze},getAddress:function(){return w.Kn},getContractAddress:function(){return w.CR},getCreate2Address:function(){return w.hB},getIcapAddress:function(){return w.vU},getJsonWalletAddress:function(){return lt},getStatic:function(){return _.tu},hashMessage:function(){return se},hexConcat:function(){return x.xs},hexDataLength:function(){return x.E1},hexDataSlice:function(){return x.p3},hexStripZeros:function(){return x.Ou},hexValue:function(){return x.$P},hexZeroPad:function(){return x.$m},hexlify:function(){return x.Dv},id:function(){return pe.id},isAddress:function(){return w.UJ},isBytes:function(){return x._t},isBytesLike:function(){return x.Zq},isHexString:function(){return x.A7},isValidMnemonic:function(){return De},isValidName:function(){return _t.r1},joinSignature:function(){return x.gV},keccak256:function(){return ae.w},mnemonicToEntropy:function(){return Be},mnemonicToSeed:function(){return Oe},namehash:function(){return _t.VM},nameprep:function(){return $n},parseBytes32String:function(){return Xn},parseEther:function(){return oa},parseTransaction:function(){return T.Qc},parseUnits:function(){return na},poll:function(){return Tt.$l},randomBytes:function(){return Ue},recoverAddress:function(){return T.RJ},recoverPublicKey:function(){return he.LO},resolveProperties:function(){return _.mE},ripemd160:function(){return le.bP},serializeTransaction:function(){return T.qC},sha256:function(){return le.JQ},sha512:function(){return le.o},shallowCopy:function(){return _.DC},shuffled:function(){return qr},solidityKeccak256:function(){return Ln},solidityPack:function(){return Zn},soliditySha256:function(){return Fn},splitSignature:function(){return x.N}
1,stripZeros:function(){return x.G1},toUtf8Bytes:function(){return oe.Y0},toUtf8CodePoints:function(){return oe.XL},toUtf8String:function(){return oe.ZN},verifyMessage:function(){return mt},verifyTypedData:function(){return gt},zeroPad:function(){return x.Bu}});var s={};r.r(s),r.d(s,{BaseContract:function(){return M},BigNumber:function(){return E.O$},Contract:function(){return j},ContractFactory:function(){return z},FixedNumber:function(){return te},Signer:function(){return k.E},VoidSigner:function(){return k.b},Wallet:function(){return vt},Wordlist:function(){return me},constants:function(){return n},errors:function(){return P.jK},getDefaultProvider:function(){return An},logger:function(){return sa},providers:function(){return a},utils:function(){return i},version:function(){return ia},wordlists:function(){return ke}});var u=r(93433),c=r(97326),l=r(11752),f=r(61120),h=r(60136),d=r(29388),p=r(15671),v=r(43144),m=r(74165),g=r(62),b=r(99456),y=r(15157),k=r(72388),w=r(28552),E=r(19560),x=r(52009),_=r(54812),T=r(65958),P=r(2735),A=function(e,t,r,n){return new(r||(r=Promise))((function(a,o){function i(e){try{u(n.next(e))}catch(t){o(t)}}function s(e){try{u(n.throw(e))}catch(t){o(t)}}function u(e){var t;e.done?a(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,s)}u((n=n.apply(e,t||[])).next())}))},N=new P.Yd("contracts/5.7.0"),S={chainId:!0,data:!0,from:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0,customData:!0,ccipReadEnabled:!0};function C(e,t){return A(this,void 0,void 0,(0,m.Z)().mark((function r(){var n,a;return(0,m.Z)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,t;case 2:return"string"!==typeof(n=r.sent)&&N.throwArgumentError("invalid address or ENS name","name",n),r.prev=4,r.abrupt("return",(0,w.Kn)(n));case 8:r.prev=8,r.t0=r.catch(4);case 10:return e||N.throwError("a provider or signer is needed to resolve ENS names",P.Yd.errors.UNSUPPORTED_OPERATION,{operation:"resolveName"}),r.next=13,e.resolveName(n);case 13:return null==(a=r.sent)&&N.throwArgumentError("resolver or addr is not configured for ENS name","name",n),r.abrupt("return",a);case 16:case"end":return r.stop()}}),r,null,[[4,8]])})))}function R(e,t,r){return A(this,void 0,void 0,(0,m.Z)().mark((function n(){return(0,m.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!Array.isArray(r)){n.next=4;break}return n.next=3,Promise.all(r.map((function(r,n){return R(e,Array.isArray(t)?t[n]:t[r.name],r)})));case 3:case 7:case 11:case 17:return n.abrupt("return",n.sent);case 4:if("address"!==r.type){n.next=8;break}return n.next=7,C(e,t);case 8:if("tuple"!==r.type){n.next=12;break}return n.next=11,R(e,t,r.components);case 12:if("array"!==r.baseType){n.next=18;break}if(Array.isArray(t)){n.next=15;break}return n.abrupt("return",Promise.reject(N.makeError("invalid value for array",P.Yd.errors.INVALID_ARGUMENT,{argument:"value",value:t})));case 15:return n.next=17,Promise.all(t.map((function(t){return R(e,t,r.arrayChildren)})));case 18:return n.abrupt("return",t);case 19:case"end":return n.stop()}}),n)})))}function O(e,t,r){return A(this,void 0,void 0,(0,m.Z)().mark((function n(){var a,o,i,s,u,c,l,f,h,d,p=this;return(0,m.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return a={},r.length===t.inputs.length+1&&"object"===typeof r[r.length-1]&&(a=(0,_.DC)(r.pop())),N.checkArgumentCount(r.length,t.input
1s.length,"passed to contract"),e.signer?a.from?a.from=(0,_.mE)({override:C(e.signer,a.from),signer:e.signer.getAddress()}).then((function(e){return A(p,void 0,void 0,(0,m.Z)().mark((function t(){return(0,m.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(0,w.Kn)(e.signer)!==e.override&&N.throwError("Contract with a Signer cannot override from",P.Yd.errors.UNSUPPORTED_OPERATION,{operation:"overrides.from"}),t.abrupt("return",e.override);case 2:case"end":return t.stop()}}),t)})))})):a.from=e.signer.getAddress():a.from&&(a.from=C(e.provider,a.from)),n.next=6,(0,_.mE)({args:R(e.signer||e.provider,r,t.inputs),address:e.resolvedAddress,overrides:(0,_.mE)(a)||{}});case 6:if(o=n.sent,i=e.interface.encodeFunctionData(t,o.args),s={data:i,to:o.address},null!=(u=o.overrides).nonce&&(s.nonce=E.O$.from(u.nonce).toNumber()),null!=u.gasLimit&&(s.gasLimit=E.O$.from(u.gasLimit)),null!=u.gasPrice&&(s.gasPrice=E.O$.from(u.gasPrice)),null!=u.maxFeePerGas&&(s.maxFeePerGas=E.O$.from(u.maxFeePerGas)),null!=u.maxPriorityFeePerGas&&(s.maxPriorityFeePerGas=E.O$.from(u.maxPriorityFeePerGas)),null!=u.from&&(s.from=u.from),null!=u.type&&(s.type=u.type),null!=u.accessList&&(s.accessList=(0,T.z7)(u.accessList)),null==s.gasLimit&&null!=t.gas){for(c=21e3,l=(0,x.lE)(i),f=0;f<l.length;f++)c+=4,l[f]&&(c+=64);s.gasLimit=E.O$.from(t.gas).add(c)}return u.value&&((h=E.O$.from(u.value)).isZero()||t.payable||N.throwError("non-payable method cannot override value",P.Yd.errors.UNSUPPORTED_OPERATION,{operation:"overrides.value",value:a.value}),s.value=h),u.customData&&(s.customData=(0,_.DC)(u.customData)),u.ccipReadEnabled&&(s.ccipReadEnabled=!!u.ccipReadEnabled),delete a.nonce,delete a.gasLimit,delete a.gasPrice,delete a.from,delete a.value,delete a.type,delete a.accessList,delete a.maxFeePerGas,delete a.maxPriorityFeePerGas,delete a.customData,delete a.ccipReadEnabled,(d=Object.keys(a).filter((function(e){return null!=a[e]}))).length&&N.throwError("cannot override ".concat(d.map((function(e){return JSON.stringify(e)})).join(",")),P.Yd.errors.UNSUPPORTED_OPERATION,{operation:"overrides",overrides:d}),n.abrupt("return",s);case 36:case"end":return n.stop()}}),n)})))}function B(e,t){var r=t.wait.bind(t);t.wait=function(t){return r(t).then((function(t){return t.events=t.logs.map((function(r){var n=(0,_.p$)(r),a=null;try{a=e.interface.parseLog(r)}catch(o){}return a&&(n.args=a.args,n.decode=function(t,r){return e.interface.decodeEventLog(a.eventFragment,t,r)},n.event=a.name,n.eventSignature=a.signature),n.removeListener=function(){return e.provider},n.getBlock=function(){return e.provider.getBlock(t.blockHash)},n.getTransaction=function(){return e.provider.getTransaction(t.transactionHash)},n.getTransactionReceipt=function(){return Promise.resolve(t)},n})),t}))}}function I(e,t,r){var n=e.signer||e.provider;return function(){for(var a=arguments.length,o=new Array(a),i=0;i<a;i++)o[i]=arguments[i];return A(this,void 0,void 0,(0,m.Z)().mark((function a(){var i,s,u,c,l;return(0,m.Z)().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:if(i=void 0,o.length!==t.inputs.length+1||"object"!==typeof o[o.length-1]){a.next=9;break}if(null==(s=(0,_.DC)(o.pop())).blockTag){a.next=7;break}return a.next=6,s.blockTag;case 6:i=a.sent;case 7:delete s.blockTag,o.push(s);case 9:if(null==e.deployTransaction){a.next=12;break}return a.next=12,e._deployed(i);case 12:return a.next=14,O(e,t,o);case 14:return u=a.sent,a.next=17,n.call(u,i);case 17:return c=a.sent,a.prev=18,l=e.interface.decodeFunctionResult(t,c),r&&1===t.outputs.length&&(l=l[0]),a.abrupt("return",l);case 24:throw a.prev=24,a.t0=a.catch(18),a.t0.code===P.Yd.errors.CALL_EXCEPTION&&(a.t0.address=e.address,a.t0.args=o,a.t0.transaction=u),a.t0;case 28:case"end":return a.stop()}}),a,null,[[18,24]])})))}}function D(e,t,r){return t.constant?I(e,t,r):function(e,t){return function(){for(var r=arguments.length,n=new Array(r),a=0;a<r;a++)n[a]=arguments[a];return A(this,void 0,void 0,(0,m.Z)().mark((function r(){var a,o;return(0,m.Z)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(e.signer||N.throwError("sending a transaction requires a signer",P.Yd.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction"}),null==e.deployTransaction){r.next=4;break}return r.next=4,e._deployed();case 4:return r.next=6,O(e,t,n);case 6:return a=r.sent,r.next=9,e.signer.sendTransaction(a);case 9:return o=r.sent,B(e,o),r.abrupt("return",o);case 12:case"end":return r.stop()}}),r)})))}}(e,t)}function Z(e){return!e.address||null!=e.topics&&0!==e.topics.length?(e.address||"*")+"@"+(e.topics?e.topics.map((function(e){return Array.isArray(e)?e.join("|"):e})).join(":"):""):"*"}var L=function(){function e(t,r){(0,p.Z)(this,e),(0,_.zG)(this,"tag",t),(0,_.zG)(this,"filter",r),this._listeners=[]}return(0,v.Z)(e,[{key:"addListener",value:function(e,t){this._listeners.push({listener:e,once:t})}},{key:"removeListener",value:function(e){var t=!1;this._listeners=this._listeners.filter((function(r){return!(!t&&r.listener===e)||(t=!0,!1)}))}},{key:"removeAllListeners",value:function(){this._listeners=[]}},{key:"listeners",value:function(){return this._listeners.map((function(e){return e.listener}))}},{key:"listenerCount",value:function(){return this._listeners.length}},{key:"run",value:function(e){var t=this,r=this.listenerCount();return this._listeners=this._listeners.filter((function(r){var n=e.slice();return setTimeout((function(){r.listener.apply(t,n)}),0),!r.once})),r}},{key:"prepareEvent",value:function(e){}},{key:"getEmit",value:function(e){return[e]}}]),e}(),F=function(e){(0,h.Z)(r,e);var t=(0,d.Z)(r);function r(){return(0,p.Z)(this,r),t.call(this,"error",null)}return(0,v.Z)(r)}(L),G=function(e){(0,h.Z)(r,e);var t=(0,d.Z)(r);function r(e,n,a,o){var i;(0,p.Z)(this,r);var s={address:e},u=n.getEventTopic(a);return o?(u!==o[0]&&N.throwArgumentError("topic mismatch","topics",o),s.topics=o.slice()):s.topics=[u],i=t.call(this,Z(s),s),(0,_.zG)((0,c.Z)(i),"address",e),(0,_.zG)((0,c.Z)(i),"interface",n
1),(0,_.zG)((0,c.Z)(i),"fragment",a),i}return(0,v.Z)(r,[{key:"prepareEvent",value:function(e){var t=this;(0,l.Z)((0,f.Z)(r.prototype),"prepareEvent",this).call(this,e),e.event=this.fragment.name,e.eventSignature=this.fragment.format(),e.decode=function(e,r){return t.interface.decodeEventLog(t.fragment,e,r)};try{e.args=this.interface.decodeEventLog(this.fragment,e.data,e.topics)}catch(n){e.args=null,e.decodeError=n}}},{key:"getEmit",value:function(e){var t=(0,g.BR)(e.args);if(t.length)throw t[0].error;var r=(e.args||[]).slice();return r.push(e),r}}]),r}(L),U=function(e){(0,h.Z)(r,e);var t=(0,d.Z)(r);function r(e,n){var a;return(0,p.Z)(this,r),a=t.call(this,"*",{address:e}),(0,_.zG)((0,c.Z)(a),"address",e),(0,_.zG)((0,c.Z)(a),"interface",n),a}return(0,v.Z)(r,[{key:"prepareEvent",value:function(e){var t=this;(0,l.Z)((0,f.Z)(r.prototype),"prepareEvent",this).call(this,e);try{var n=this.interface.parseLog(e);e.event=n.name,e.eventSignature=n.signature,e.decode=function(e,r){return t.interface.decodeEventLog(n.eventFragment,e,r)},e.args=n.args}catch(a){}}}]),r}(L),M=function(){function e(t,r,n){var a=this;(0,p.Z)(this,e),(0,_.zG)(this,"interface",(0,_.tu)(this instanceof e?this.constructor:void 0,"getInterface")(r)),null==n?((0,_.zG)(this,"provider",null),(0,_.zG)(this,"signer",null)):k.E.isSigner(n)?((0,_.zG)(this,"provider",n.provider||null),(0,_.zG)(this,"signer",n)):y.zt.isProvider(n)?((0,_.zG)(this,"provider",n),(0,_.zG)(this,"signer",null)):N.throwArgumentError("invalid signer or provider","signerOrProvider",n),(0,_.zG)(this,"callStatic",{}),(0,_.zG)(this,"estimateGas",{}),(0,_.zG)(this,"functions",{}),(0,_.zG)(this,"populateTransaction",{}),(0,_.zG)(this,"filters",{});var o={};if(Object.keys(this.interface.events).forEach((function(e){var t=a.interface.events[e];(0,_.zG)(a.filters,e,(function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return{address:a.address,topics:a.interface.encodeFilterTopics(t,r)}})),o[t.name]||(o[t.name]=[]),o[t.name].push(e)})),Object.keys(o).forEach((function(e){var t=o[e];1===t.length?(0,_.zG)(a.filters,e,a.filters[t[0]]):N.warn("Duplicate definition of ".concat(e," (").concat(t.join(", "),")"))})),(0,_.zG)(this,"_runningEvents",{}),(0,_.zG)(this,"_wrappedEmits",{}),null==t&&N.throwArgumentError("invalid contract address or ENS name","addressOrName",t),(0,_.zG)(this,"address",t),this.provider)(0,_.zG)(this,"resolvedAddress",C(this.provider,t));else try{(0,_.zG)(this,"resolvedAddress",Promise.resolve((0,w.Kn)(t)))}catch(u){N.throwError("provider is required to use ENS name as contract address",P.Yd.errors.UNSUPPORTED_OPERATION,{operation:"new Contract"})}this.resolvedAddress.catch((function(e){}));var i={},s={};Object.keys(this.interface.functions).forEach((function(e){var t=a.interface.functions[e];if(s[e])N.warn("Duplicate ABI entry for ".concat(JSON.stringify(e)));else{s[e]=!0;var r=t.name;i["%".concat(r)]||(i["%".concat(r)]=[]),i["%".concat(r)].push(e),null==a[e]&&(0,_.zG)(a,e,D(a,t,!0)),null==a.functions[e]&&(0,_.zG)(a.functions,e,D(a,t,!1)),null==a.callStatic[e]&&(0,_.zG)(a.callStatic,e,I(a,t,!0)),null==a.populateTransaction[e]&&(0,_.zG)(a.populateTransaction,e,function(e,t){return function(){for(var r=arguments.length,n=new Array(r),a=0;a<r;a++)n[a]=arguments[a];return O(e,t,n)}}(a,t)),null==a.estimateGas[e]&&(0,_.zG)(a.estimateGas,e,function(e,t){var r=e.signer||e.provider;return function(){for(var n=arguments.length,a=new Array(n),o=0;o<n;o++)a[o]=arguments[o];return A(this,void 0,void 0,(0,m.Z)().mark((function n(){var o;return(0,m.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return r||N.throwError("estimate require a provider or signer",P.Yd.errors.UNSUPPORTED_OPERATION,{operation:"estimateGas"}),n.next=3,O(e,t,a);case 3:return o=n.sent,n.next=6,r.estimateGas(o);case 6:return n.abrupt("return",n.sent);case 7:case"end":return n.stop()}}),n)})))}}(a,t))}}
1)),Object.keys(i).forEach((function(e){var t=i[e];if(!(t.length>1)){e=e.substring(1);var r=t[0];try{null==a[e]&&(0,_.zG)(a,e,a[r])}catch(n){}null==a.functions[e]&&(0,_.zG)(a.functions,e,a.functions[r]),null==a.callStatic[e]&&(0,_.zG)(a.callStatic,e,a.callStatic[r]),null==a.populateTransaction[e]&&(0,_.zG)(a.populateTransaction,e,a.populateTransaction[r]),null==a.estimateGas[e]&&(0,_.zG)(a.estimateGas,e,a.estimateGas[r])}}))}return(0,v.Z)(e,[{key:"deployed",value:function(){return this._deployed()}},{key:"_deployed",value:function(e){var t=this;return this._deployedPromise||(this.deployTransaction?this._deployedPromise=this.deployTransaction.wait().then((function(){return t})):this._deployedPromise=this.provider.getCode(this.address,e).then((function(e){return"0x"===e&&N.throwError("contract not deployed",P.Yd.errors.UNSUPPORTED_OPERATION,{contractAddress:t.address,operation:"getDeployed"}),t}))),this._deployedPromise}},{key:"fallback",value:function(e){var t=this;this.signer||N.throwError("sending a transactions require a signer",P.Yd.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction(fallback)"});var r=(0,_.DC)(e||{});return["from","to"].forEach((function(e){null!=r[e]&&N.throwError("cannot override "+e,P.Yd.errors.UNSUPPORTED_OPERATION,{operation:e})})),r.to=this.resolvedAddress,this.deployed().then((function(){return t.signer.sendTransaction(r)}))}},{key:"connect",value:function(e){"string"===typeof e&&(e=new k.b(e,this.provider));var t=new this.constructor(this.address,this.interface,e);return this.deployTransaction&&(0,_.zG)(t,"deployTransaction",this.deployTransaction),t}},{key:"attach",value:function(e){return new this.constructor(e,this.interface,this.signer||this.provider)}},{key:"_normalizeRunningEvent",value:function(e){return this._runningEvents[e.tag]?this._runningEvents[e.tag]:e}},{key:"_getRunningEvent",value:function(e){if("string"===typeof e){if("error"===e)return this._normalizeRunningEvent(new F);if("event"===e)return this._normalizeRunningEvent(new L("event",null));
1if("*"===e)return this._normalizeRunningEvent(new U(this.address,this.interface));var t=this.interface.getEvent(e);return this._normalizeRunningEvent(new G(this.address,this.interface,t))}if(e.topics&&e.topics.length>0){try{var r=e.topics[0];if("string"!==typeof r)throw new Error("invalid topic");var n=this.interface.getEvent(r);return this._normalizeRunningEvent(new G(this.address,this.interface,n,e.topics))}catch(o){}var a={address:this.address,topics:e.topics};return this._normalizeRunningEvent(new L(Z(a),a))}return this._normalizeRunningEvent(new U(this.address,this.interface))}},{key:"_checkRunningEvents",value:function(e){if(0===e.listenerCount()){delete this._runningEvents[e.tag];var t=this._wrappedEmits[e.tag];t&&e.filter&&(this.provider.off(e.filter,t),delete this._wrappedEmits[e.tag])}}},{key:"_wrapEvent",value:function(e,t,r){var n=this,a=(0,_.p$)(t);return a.removeListener=function(){r&&(e.removeListener(r),n._checkRunningEvents(e))},a.getBlock=function(){return n.provider.getBlock(t.blockHash)},a.getTransaction=function(){return n.provider.getTransaction(t.transactionHash)},a.getTransactionReceipt=function(){return n.provider.getTransactionReceipt(t.transactionHash)},e.prepareEvent(a),a}},{key:"_addEventListener",value:function(e,t,r){var n=this;if(this.provider||N.throwError("events require a provider or a signer with a provider",P.Yd.errors.UNSUPPORTED_OPERATION,{operation:"once"}),e.addListener(t,r),this._runningEvents[e.tag]=e,!this._wrappedEmits[e.tag]){var a=function(r){var a=n._wrapEvent(e,r,t);if(null==a.decodeError)try{var o=e.getEmit(a);n.emit.apply(n,[e.filter].concat((0,u.Z)(o)))}catch(i){a.decodeError=i.error}null!=e.filter&&n.emit("event",a),null!=a.decodeError&&n.emit("error",a.decodeError,a)};this._wrappedEmits[e.tag]=a,null!=e.filter&&this.provider.on(e.filter,a)}}},{key:"queryFilter",value:function(e,t,r){var n=this,a=this._getRunningEvent(e),o=(0,_.DC)(a.filter);return"string"===typeof t&&(0,x.A7)(t,32)?(null!=r&&N.throwArgumentError("cannot specify toBlock with blockhash","toBlock",r),o.blockHash=t):(o.fromBlock=null!=t?t:0,o.toBlock=null!=r?r:"latest"),this.provider.getLogs(o).then((function(e){return e.map((function(e){return n._wrapEvent(a,e,null)}))}))}},{key:"on",value:function(e,t){return this._addEventListener(this._getRunningEvent(e),t,!1),this}},{key:"once",value:function(e,t){return this._addEventListener(this._getRunningEvent(e),t,!0),this}},{key:"emit",value:function(e){if(!this.provider)return!1;for(var t=this._getRunningEvent(e),r=arguments.length,n=new Array(r>1?r-1:0),a=1;a<r;a++)n[a-1]=arguments[a];var o=t.run(n)>0;return this._checkRunningEvents(t),o}},{key:"listenerCount",value:function(e){var t=this;return this.provider?null==e?Object.keys(this._runningEvents).reduce((function(e,r){return e+t._runningEvents[r].listenerCount()}),0):this._getRunningEvent(e).listenerCount():0}},{key:"listeners",value:function(e){if(!this.provider)return[];if(null==e){var t=[];for(var r in this._runningEvents)this._runningEvents[r].listeners().forEach((function(e){t.push(e)}));return t}return this._getRunningEvent(e).listeners()}},{key:"removeAllListeners",value:function(e){if(!this.provider)return this;if(null==e){for(var t in this._runningEvents){var r=this._runningEvents[t];r.removeAllListeners(),this._checkRunningEvents(r)}return this}var n=this._getRunningEvent(e);return n.removeAllListeners(),this._checkRunningEvents(n),this}},{key:"off",value:function(e,t){if(!this.provider)return this;var r=this._getRunningEvent(e);return r.removeListener(t),this._checkRunningEvents(r),this}},{key:"removeListener",value:function(e,t){return this.off(e,t)}}],[{key:"getContractAddress",value:function(e){return(0,w.CR)(e)}},{key:"getInterface",value:function(e){return b.vU.isInterface(e)?e:new b.vU(e)}},{key:"isIndexed",value:function(e){return b.Hk.isIndexed(e)}}]),e}(),j=function(e){(0,h.Z)(r,e);var t=(0,d.Z)(r);function r(){return(0,p.Z)(this,r),t.apply(this,arguments)}return(0,v.Z)(r)}(M),z=function(){function e(t,r,n){(0,p.Z)(this,e);var a=null;"0x"!==(a="string"===typeof r?r:(0,x._t)(r)?(0,x.Dv)(r):r&&"string"===typeof r.object?r.object:"!").substring(0,2)&&(a="0x"+a),(!(0,x.A7)(a)||a.length%2)&&N.throwArgumentError("invalid bytecode","bytecode",r),n&&!k.E.isSigner(n)&&N.throwArgumentError("invalid signer","signer",n),(0,_.zG)(this,"bytecode",a),(0,_.zG)(this,"interface",(0,_.tu)(this instanceof e?this.constructor:void 0,"getInterface")(t)),(0,_.zG)(this,"signer",n||null)}return(0,v.Z)(e,[{key:"getDeployTransaction",value:function(){for(var e={},t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];if(r.length===this.interface.deploy.inputs.length+1&&"object"===typeof r[r.length-1])for(var a in e=(0,_.DC)(r.pop())
1)if(!S[a])throw new Error("unknown transaction override "+a);(["data","from","to"].forEach((function(t){null!=e[t]&&N.throwError("cannot override "+t,P.Yd.errors.UNSUPPORTED_OPERATION,{operation:t})})),e.value)&&(E.O$.from(e.value).isZero()||this.interface.deploy.payable||N.throwError("non-payable constructor cannot override value",P.Yd.errors.UNSUPPORTED_OPERATION,{operation:"overrides.value",value:e.value}));return N.checkArgumentCount(r.length,this.interface.deploy.inputs.length," in Contract constructor"),e.data=(0,x.Dv)((0,x.zo)([this.bytecode,this.interface.encodeDeploy(r)])),e}},{key:"deploy",value:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return A(this,void 0,void 0,(0,m.Z)().mark((function e(){var r,n,a,o,i,s;return(0,m.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r={},t.length===this.interface.deploy.inputs.length+1&&(r=t.pop()),N.checkArgumentCount(t.length,this.interface.deploy.inputs.length," in Contract constructor"),e.next=5,R(this.signer,t,this.interface.deploy.inputs);case 5:return(n=e.sent).push(r),a=this.getDeployTransaction.apply(this,(0,u.Z)(n)),e.next=10,this.signer.sendTransaction(a);case 10:return o=e.sent,i=(0,_.tu)(this.constructor,"getContractAddress")(o),B(s=(0,_.tu)(this.constructor,"getContract")(i,this.interface,this.signer),o),(0,_.zG)(s,"deployTransaction",o),e.abrupt("return",s);case 16:case"end":return e.stop()}}),e,this)})))}},{key:"attach",value:function(e){return this.constructor.getContract(e,this.interface,this.signer)}},{key:"connect",value:function(e){return new this.constructor(this.interface,this.bytecode,e)}}],[{key:"fromSolidity",value:function(e,t){null==e&&N.throwError("missing compiler output",P.Yd.errors.MISSING_ARGUMENT,{argument:"compilerOutput"}),"string"===typeof e&&(e=JSON.parse(e));var r=e.abi,n=null;return e.bytecode?n=e.bytecode:e.evm&&e.evm.bytecode&&(n=e.evm.bytecode),new this(r,n,t)}},{key:"getInterface",value:function(e){return j.getInterface(e)}},{key:"getContractAddress",value:function(e){return(0,w.CR)(e)}},{key:"getContract",value:function(e,t,r){return new j(e,t,r)}}]),e}(),K=r(44227),H=new P.Yd(K.i),Y={},W=E.O$.from(0),q=E.O$.from(-1);function V(e,t,r,n){var a={fault:t,operation:r};return void 0!==n&&(a.value=n),H.throwError(e,P.Yd.errors.NUMERIC_FAULT,a)}for(var $="0";$.length<256;)$+=$;function J(e){if("number"!==typeof e)try{e=E.O$.from(e).toNumber()}catch(t){}return"number"===typeof e&&e>=0&&e<=256&&!(e%1)?"1"+$.substring(0,e):H.throwArgumentError("invalid decimal size","decimals",e)}function X(e,t){null==t&&(t=0);var r=J(t),n=(e=E.O$.from(e)).lt(W);n&&(e=e.mul(q));for(var a=e.mod(r).toString();a.length<r.length-1;)a="0"+a;a=a.match(/^([0-9]*[1-9]|0)(0*)/)[1];var o=e.div(r).toString();return e=1===r.length?o:o+"."+a,n&&(e="-"+e),e}function Q(e,t){null==t&&(t=0);var r=J(t);"string"===typeof e&&e.match(/^-?[0-9.]+$/)||H.throwArgumentError("invalid decimal value","value",e);var n="-"===e.substring(0,1);n&&(e=e.substring(1)),"."===e&&H.throwArgumentError("missing value","value",e);var a=e.split(".");a.length>2&&H.throwArgumentError("too many decimal points","value",e);var o=a[0],i=a[1];for(o||(o="0"),i||(i="0");"0"===i[i.length-1];)i=i.substring(0,i.length-1);for(i.length>r.length-1&&V("fractional component exceeds decimals","underflow","parseFixed"),""===i&&(i="0");i.length<r.length-1;)i+="0";var s=E.O$.from(o),u=E.O$.from(i),c=s.mul(r).add(u);return n&&(c=c.mul(q)),c}var ee=function(){function e(t,r,n,a){(0,p.Z)(this,e),t!==Y&&H.throwError("cannot use FixedFormat constructor; use FixedFormat.from",P.Yd.errors.UNSUPPORTED_OPERATION,{operation:"new FixedFormat"}),this.signed=r,this.width=n,this.decimals=a,this.name=(r?"":"u")+"fixed"+String(n)+"x"+String(a),this._multiplier=J(a),Object.freeze(this)}return(0,v.Z)(e,null,[{key:"from",value:function(t){if(t instanceof e)return t;"number"===typeof t&&(t="fixed128x".concat(t));var r=!0,n=128,a=18;if("string"===typeof t)if("fixed"===t);else if("ufixed"===t)r=!1;else{var o=t.match(/^(u?)fixed([0-9]+)x([0-9]+)$/);o||H.throwArgumentError("invalid fixed format","format",t),r="u"!==o[1],n=parseInt(o[2]),a=parseInt(o[3])}else if(t){var i=function(e,r,n){return null==t[e]?n:(typeof t[e]!==r&&H.throwArgumentError("invalid fixed format ("+e+" not "+r+")","format."+e,t[e]),t[e])};r=i("signed","boolean",r),n=i("width","number",n),a=i("decimals","number",a)}return n%8&&H.throwArgumentError("invalid fixed format width (not byte aligned)","format.width",n),a>80&&H.throwArgumentError("invalid fixed format (decimals too large)","format.decimals",a),new e(Y,r,n,a)}}]),e}(),te=function(){function e(t,r,n,a){(0,p.Z)(this,e),t!==Y&&H.throwError("cannot use FixedNumber constructor; use FixedNumber.from",P.Yd.errors.UNSUPPORTED_OPERATION,{operation:"new FixedFormat"}),this.format=a,this._hex=r,this._value=n,this._isFixedNumber=!0,Object.freeze(this)}return(0,v.Z)(e,[{key:"_checkFormat",value:function(e){this.format.name!==e.format.name&&H.throwArgumentError("incompatible format; use fixedNumber.toFormat","other",e)}},{key:"addUnsafe",value:function(t){this._checkFormat(t);var r=Q(this._value,this.format.decimals),n=Q(t._value,t.format.decimals);return e.fromValue(r.add(n),this.format.decimals,this.format)}},{key:"subUnsafe",value:function(t){this._checkFormat(t);var r=Q(this._value,this.format.decimals),n=Q(t._value,t.format.decimals);return e.fromValue(r.sub(n),this.format.decimals,this.format)}},{key:"mulUnsafe",value:function(t){this._checkFormat(t);var r=Q(this._value,this.format.decimals),n=Q(t._value,t.format.decimals);return e.fromValue(r.mul(n).div(this.format._multiplier),this.format.decimals,this.format)}},{key:"divUnsafe",value:function(t){this._checkFormat(t);var r=Q(this._value,this.format.decimals),n=Q(t._value,t.format.decimals);return e.fromValue(r.mul(this.format._multiplier).div(n),this.format.decimals,this.format)}},{key:"floor",value:function(){var t=this.toString().split(".");1===t.length&&t.push("0");var r=e.from(t[0],this.format),n=!t[1].match(/^(0*)$/);return this.isNegative()&&n&&(r=r.subUnsafe(re.toFormat(r.format))),r}},{key:"ceiling",value:function(){var t=this.toString().split(".");1===t.length&&t.push("0");var r=e.from(t[0],this.format),n=!t[1].match(/^(0*)$/);return!this.isNegative()&&n&&(r=r.addUnsafe(re.toFormat(r.format))),r}}
1,{key:"round",value:function(t){null==t&&(t=0);var r=this.toString().split(".");if(1===r.length&&r.push("0"),(t<0||t>80||t%1)&&H.throwArgumentError("invalid decimal count","decimals",t),r[1].length<=t)return this;var n=e.from("1"+$.substring(0,t),this.format),a=ne.toFormat(this.format);return this.mulUnsafe(n).addUnsafe(a).floor().divUnsafe(n)}},{key:"isZero",value:function(){return"0.0"===this._value||"0"===this._value}},{key:"isNegative",value:function(){return"-"===this._value[0]}},{key:"toString",value:function(){return this._value}},{key:"toHexString",value:function(e){if(null==e)return this._hex;e%8&&H.throwArgumentError("invalid byte width","width",e);var t=E.O$.from(this._hex).fromTwos(this.format.width).toTwos(e).toHexString();return(0,x.$m)(t,e/8)}},{key:"toUnsafeFloat",value:function(){return parseFloat(this.toString())}},{key:"toFormat",value:function(t){return e.fromString(this._value,t)}}],[{key:"fromValue",value:function(t,r,n){return null!=n||null==r||(0,E.Zm)(r)||(n=r,r=null),null==r&&(r=0),null==n&&(n="fixed"),e.fromString(X(t,r),ee.from(n))}},{key:"fromString",value:function(t,r){null==r&&(r="fixed");var n=ee.from(r),a=Q(t,n.decimals);!n.signed&&a.lt(W)&&V("unsigned value cannot be negative","overflow","value",t);var o=null;n.signed?o=a.toTwos(n.width).toHexString():(o=a.toHexString(),o=(0,x.$m)(o,n.width/8));var i=X(a,n.decimals);return new e(Y,o,i,n)}},{key:"fromBytes",value:function(t,r){null==r&&(r="fixed");var n=ee.from(r);if((0,x.lE)(t).length>n.width/8)throw new Error("overflow");var a=E.O$.from(t);n.signed&&(a=a.fromTwos(n.width));var o=a.toTwos((n.signed?0:1)+n.width).toHexString(),i=X(a,n.decimals);return new e(Y,o,i,n)}},{key:"from",value:function(t,r){if("string"===typeof t)return e.fromString(t,r);if((0,x._t)(t))return e.fromBytes(t,r);try{return e.fromValue(t,0,r)}catch(n){if(n.code!==P.Yd.errors.INVALID_ARGUMENT)throw n}return H.throwArgumentError("invalid FixedNumber value","value",t)}},{key:"isFixedNumber",value:function(e){return!(!e||!e._isFixedNumber)}}]),e}(),re=te.from(1),ne=te.from("0.5"),ae=r(11291),oe=r(91953),ie="\x19Ethereum Signed Message:\n";function se(e){return"string"===typeof e&&(e=(0,oe.Y0)(e)),(0,ae.w)((0,x.zo)([(0,oe.Y0)(ie),(0,oe.Y0)(String(e.length)),e]))}var ue=r(26454),ce=r(44247),le=r(43984);function fe(e,t,r,n,a){var o;e=(0,x.lE)(e),t=(0,x.lE)(t);var i,s,u=1,c=new Uint8Array(n),l=new Uint8Array(t.length+4);l.set(t);for(var f=1;f<=u;f++){l[t.length]=f>>24&255,l[t.length+1]=f>>16&255,l[t.length+2]=f>>8&255,l[t.length+3]=255&f;var h=(0,x.lE)((0,le.Gy)(a,e,l));o||(o=h.length,s=new Uint8Array(o),i=n-((u=Math.ceil(n/o))-1)*o),s.set(h);for(var d=1;d<r;d++){h=(0,x.lE)((0,le.Gy)(a,e,h));for(var p=0;p<o;p++)s[p]^=h[p]}var v=(f-1)*o,m=f===u?i:o;c.set((0,x.lE)(s).slice(0,m),v)}return(0,x.Dv)(c)}var he=r(64760),de=r(8427),pe=r(93358),ve=new P.Yd("wordlists/5.7.0"),me=function(){function e(t){(0,p.Z)(this,e),ve.checkAbstract(this instanceof e?this.constructor:void 0,e),(0,_.zG)(this,"locale",t)}return(0,v.Z)(e,[{key:"split",value:function(e){return e.toLowerCase().split(/ +/g)}},{key:"join",value:function(e){return e.join(" ")}}],[{key:"check",value:function(e){for(var t=[],r=0;r<2048;r++){var n=e.getWord(r);if(r!==e.getWordIndex(n))return"0x";t.push(n)}return(0,pe.id)(t.join("\n")+"\n")}},{key:"register",value:function(e,t){t||(t=e.locale)}}]),e}(),ge=null;function be(e){if(null==ge&&(ge="AbandonAbilityAbleAboutAboveAbsentAbsorbAbstractAbsurdAbuseAccessAccidentAccountAccuseAchieveAcidAcousticAcquireAcrossActActionActorActressActualAdaptAddAddictAddressAdjustAdmitAdultAdvanceAdviceAerobicAffairAffordAfraidAgainAgeAgentAgreeAheadAimAirAirportAisleAlarmAlbumAlcoholAlertAlienAllAlleyAllowAlmostAloneAlphaAlreadyAlsoAlterAlwaysAmateurAmazingAmongAmountAmusedAnalystAnchorAncientAngerAngleAngryAnimalAnkleAnnounceAnnualAnotherAnswerAntennaAntiqueAnxietyAnyApartApologyAppearAppleApproveAprilArchArcticAreaArenaArgueArmArmedArmorArmyAroundArrangeArrestArriveArrowArtArtefactArtistArtworkAskAspectAssaultAssetAssistAssumeAsthmaAthleteAtomAttackAttendAttitudeAttractAuctionAuditAugustAuntAuthorAutoAutumnAverageAvocadoAvoidAwakeAwareAwayAwesomeAwfulAwkwardAxisBabyBachelorBaconBadgeBagBalanceBalconyBallBambooBananaBannerBarBarelyBargainBarrelBaseBasicBasketBattleBeachBeanBeautyBecauseBecomeBeefBeforeBeginBehaveBehindBelieveBelowBeltBenchBenefitBestBetrayBetterBetweenBeyondBicycleBidBikeBindBiologyBirdBirthBitterBlackBladeBlameBlanketBlastBleakBlessBlindBloodBlossomBlouseBlueBlurBlushBoardBoatBodyBoilBombBoneBonusBookBoostBorderBoringBorrowBossBottomBounceBoxBoyBracketBrainBrandBrassBraveBreadBreezeBrickBridgeBriefBrightBringBriskBroccoliBrokenBronzeBroomBrotherBrownBrushBubbleBuddyBudgetBuffaloBuildBulbBulkBulletBundleBunkerBurdenBurgerBurstBusBusinessBusyButterBuyerBuzzCabbageCabinCableCactusCageCakeCallCalmCameraCampCanCanalCancelCandyCannonCanoeCanvasCanyonCapableCapitalCaptainCarCarbonCardCargoCarpetCarryCartCaseCashCasinoCastleCasualCatCatalogCat
1chCategoryCattleCaughtCauseCautionCaveCeilingCeleryCementCensusCenturyCerealCertainChairChalkChampionChangeChaosChapterChargeChaseChatCheapCheckCheeseChefCherryChestChickenChiefChildChimneyChoiceChooseChronicChuckleChunkChurnCigarCinnamonCircleCitizenCityCivilClaimClapClarifyClawClayCleanClerkCleverClickClientCliffClimbClinicClipClockClogCloseClothCloudClownClubClumpClusterClutchCoachCoastCoconutCodeCoffeeCoilCoinCollectColorColumnCombineComeComfortComicCommonCompanyConcertConductConfirmCongressConnectConsiderControlConvinceCookCoolCopperCopyCoralCoreCornCorrectCostCottonCouchCountryCoupleCourseCousinCoverCoyoteCrackCradleCraftCramCraneCrashCraterCrawlCrazyCreamCreditCreekCrewCricketCrimeCrispCriticCropCrossCrouchCrowdCrucialCruelCruiseCrumbleCrunchCrushCryCrystalCubeCultureCupCupboardCuriousCurrentCurtainCurveCushionCustomCuteCycleDadDamageDampDanceDangerDaringDashDaughterDawnDayDealDebateDebrisDecadeDecemberDecideDeclineDecorateDecreaseDeerDefenseDefineDefyDegreeDelayDeliverDemandDemiseDenialDentistDenyDepartDependDepositDepthDeputyDeriveDescribeDesertDesignDeskDespairDestroyDetailDetectDevelopDeviceDevoteDiagramDialDiamondDiaryDiceDieselDietDifferDigitalDignityDilemmaDinnerDinosaurDirectDirtDisagreeDiscoverDiseaseDishDismissDisorderDisplayDistanceDivertDivideDivorceDizzyDoctorDocumentDogDollDolphinDomainDonateDonkeyDonorDoorDoseDoubleDoveDraftDragonDramaDrasticDrawDreamDressDriftDrillDrinkDripDriveDropDrumDryDuckDumbDuneDuringDustDutchDutyDwarfDynamicEagerEagleEarlyEarnEarthEasilyEastEasyEchoEcologyEconomyEdgeEditEducateEffortEggEightEitherElbowElderElectricElegantElementElephantElevatorEliteElseEmbarkEmbodyEmbraceEmergeEmotionEmployEmpowerEmptyEnableEnactEndEndlessEndorseEnemyEnergyEnforceEngageEngineEnhanceEnjoyEnlistEnoughEnrichEnrollEnsureEnterEntireEntryEnvelopeEpisodeEqualEquipEraEraseErodeErosionErrorEruptEscapeEssayEssenceEstateEternalEthicsEvidenceEvilEvokeEvolveExactExampleExcessExchangeExciteExcludeExcuseExecuteExerciseExhaustExhibitExileExistExitExoticExpandExpectExpireExplainExposeExpressExtendExtraEyeEyebrowFabricFaceFacultyFadeFaintFaithFallFalseFameFamilyFamousFanFancyFantasyFarmFashionFatFatalFatherFatigueFaultFavoriteFeatureFebruaryFederalFeeFeedFeelFemaleFenceFestivalFetchFeverFewFiberFictionFieldFigureFileFilmFilterFinalFindFineFingerFinishFireFirmFirstFiscalFishFitFitnessFixFlagFlameFlashFlatFlavorFleeFlightFlipFloatFlockFloorFlowerFluidFlushFlyFoamFocusFogFoilFoldFollowFoodFootForceForestForgetForkFortuneForumForwardFossilFosterFoundFoxFragileFrameFrequentFreshFriendFringeFrogFrontFrostFrownFrozenFruitFuelFunFunnyFurnaceFuryFutureGadgetGainGalaxyGalleryGameGapGarageGarbageGardenGarlicGarmentGasGaspGateGatherGaugeGazeGeneralGeniusGenreGentleGenuineGestureGhostGiantGiftGiggleGingerGiraffeGirlGiveGladGlanceGlareGlassGlideGlimpseGlobeGloomGloryGloveGlowGlueGoatGoddessGoldGoodGooseGorillaGospelGossipGovernGownGrabGraceGrainGrantGrapeGrassGravityGreatGreenGridGriefGritGroceryGroupGrowGruntGuardGuessGuideGuiltGuitarGunGymHabitHairHalfHammerHamsterHandHappyHarborHardHarshHarvestHatHaveHawkHazardHeadHealthHeartHeavyHedgehogHeightHelloHelmetHelpHenHeroHiddenHighHillHintHipHireHistoryHobbyHockeyHoldHoleHolidayHollowHomeHoneyHoodHopeHornHorrorHorseHospitalHostHotelHourHoverHubHugeHumanHumbleHumorHundredHungryHuntHurdleHurryHurtHusbandHybridIceIconIdeaIdentifyIdleIgnoreIllIllegalIllnessImageImitateImmenseImmuneImpactImposeImproveImpulseInchIncludeIncomeIncreaseIndexIndicateIndoorIndustryInfantInflictInformInhaleInheritInitialInjectInjuryInmateInnerInnocentInputInquiryInsaneInsectInsideInspireInstallIntactInterestIntoInvestInviteInvolveIronIslandIsolateIssueItemIvoryJacketJaguarJarJazzJealousJeansJellyJewelJobJoinJokeJourneyJoyJudgeJuiceJumpJungleJuniorJunkJustKangarooKeenKeepKetchupKeyKickKidKidneyKindKingdomKissKitKitchenKiteKittenKiwiKneeKnifeKnockKnowLabLabelLaborLadderLadyLakeLampLanguageLaptopLargeLaterLatinLaughLaundryLavaLawLawnLawsuitLayerLazyLeaderLeafLearnLeaveLectureLeftLegLegalLegendLeisureLemonLendLengthLensLeopardLessonLetterLevelLiarLibertyLibraryLicenseLifeLiftLightLikeLimbLimitLinkLionLiquidListLittleLiveLizardLoadLoanLobster
1LocalLockLogicLonelyLongLoopLotteryLoudLoungeLoveLoyalLuckyLuggageLumberLunarLunchLuxuryLyricsMachineMadMagicMagnetMaidMailMainMajorMakeMammalManManageMandateMangoMansionManualMapleMarbleMarchMarginMarineMarketMarriageMaskMassMasterMatchMaterialMathMatrixMatterMaximumMazeMeadowMeanMeasureMeatMechanicMedalMediaMelodyMeltMemberMemoryMentionMenuMercyMergeMeritMerryMeshMessageMetalMethodMiddleMidnightMilkMillionMimicMindMinimumMinorMinuteMiracleMirrorMiseryMissMistakeMixMixedMixtureMobileModelModifyMomMomentMonitorMonkeyMonsterMonthMoonMoralMoreMorningMosquitoMotherMotionMotorMountainMouseMoveMovieMuchMuffinMuleMultiplyMuscleMuseumMushroomMusicMustMutualMyselfMysteryMythNaiveNameNapkinNarrowNastyNationNatureNearNeckNeedNegativeNeglectNeitherNephewNerveNestNetNetworkNeutralNeverNewsNextNiceNightNobleNoiseNomineeNoodleNormalNorthNoseNotableNoteNothingNoticeNovelNowNuclearNumberNurseNutOakObeyObjectObligeObscureObserveObtainObviousOccurOceanOctoberOdorOffOfferOfficeOftenOilOkayOldOliveOlympicOmitOnceOneOnionOnlineOnlyOpenOperaOpinionOpposeOptionOrangeOrbitOrchardOrderOrdinaryOrganOrientOriginalOrphanOstrichOtherOutdoorOuterOutputOutsideOvalOvenOverOwnOwnerOxygenOysterOzonePactPaddlePagePairPalacePalmPandaPanelPanicPantherPaperParadeParentParkParrotPartyPassPatchPathPatientPatrolPatternPausePavePaymentPeacePeanutPearPeasantPelicanPenPenaltyPencilPeoplePepperPerfectPermitPersonPetPhonePhotoPhrasePhysicalPianoPicnicPicturePiecePigPigeonPillPilotPinkPioneerPipePistolPitchPizzaPlacePlanetPlasticPlatePlayPleasePledgePluckPlugPlungePoemPoetPointPolarPolePolicePondPonyPoolPopularPortionPositionPossiblePostPotatoPotteryPovertyPowderPowerPracticePraisePredictPreferPreparePresentPrettyPreventPricePridePrimaryPrintPriorityPrisonPrivatePrizeProblemProcessProduceProfitProgramProjectPromoteProofPropertyProsperProtectProudProvidePublicPuddingPullPulpPulsePumpkinPunchPupilPuppyPurchasePurityPurposePursePushPutPuzzlePyramidQualityQuantumQuarterQuestionQuickQuitQuizQuoteRabbitRaccoonRaceRackRadarRadioRailRainRaiseRallyRampRanchRandomRangeRapidRareRateRatherRavenRawRazorReadyRealReasonRebelRebuildRecallReceiveRecipeRecordRecycleReduceReflectReformRefuseRegionRegretRegularRejectRelaxReleaseReliefRelyRemainRememberRemindRemoveRenderRenewRentReopenRepairRepeatReplaceReportRequireRescueResembleResistResourceResponseResultRetireRetreatReturnReunionRevealReviewRewardRhythmRibRibbonRiceRichRideRidgeRifleRightRigidRingRiotRippleRiskRitualRivalRiverRoadRoastRobotRobustRocketRomanceRoofRookieRoomRoseRotateRoughRoundRouteRoyalRubberRudeRugRuleRunRunwayRuralSadSaddleSadnessSafeSailSaladSalmonSalonSaltSaluteSameSampleSandSatisfySatoshiSauceSausageSaveSayScaleScanScareScatterSceneSchemeSchoolScienceScissorsScorpionScoutScrapScreenScriptScrubSeaSearchSeasonSeatSecondSecretSectionSecuritySeedSeekSegmentSelectSellSeminarSeniorSenseSentenceSeriesServiceSessionSettleSetupSevenShadowShaftShallowShareShedShellSheriffShieldShiftShineShipShiverShockShoeShootShopShortShoulderShoveShrimpShrugShuffleShySiblingSickSideSiegeSightSignSilentSilkSillySilverSimilarSimpleSinceSingSirenSisterSituateSixSizeSkateSketchSkiSkillSkinSkirtSkullSlabSlamSleepSlenderSliceSlideSlightSlimSloganSlotSlowSlushSmallSmartSmileSmokeSmoothSnackSnakeSnapSniffSnowSoapSoccerSocialSockSodaSoftSolarSoldierSolidSolutionSolveSomeoneSongSoonSorrySortSoulSoundSoupSourceSouthSpaceSpareSpatialSpawnSpeakSpecialSpeedSpellSpendSphereSpiceSpiderSpikeSpinSpiritSplitSpoilSponsorSpoonSportSpotSpraySpreadSpringSpySquareSqueezeSquirrelStableStadiumStaffStageStairsStampStandStartStateStaySteakSteelStemStepStereoStickStillStingStockStomachStoneStoolStoryStoveStrategyStreetStrikeStrongStruggleStudentStuffStumbleStyleSubjectSubmitSubwaySuccessSuchSuddenSufferSugarSuggestSuitSummerSunSunnySunsetSuperSupplySupremeSureSurfaceSurgeSurpriseSurroundSurveySuspectSustainSwallowSwampSwapSwarmSwearSweetSwiftSwimSwingSwitchSwordSymbolSymptomSyrupSystemTableTackleTagTailTalentTalkTankTapeTargetTaskTasteTattooTaxiTeachTeamTellTenTenantTennisTentTermTestTextThankThatThemeThe
1nTheoryThereTheyThingThisThoughtThreeThriveThrowThumbThunderTicketTideTigerTiltTimberTimeTinyTipTiredTissueTitleToastTobaccoTodayToddlerToeTogetherToiletTokenTomatoTomorrowToneTongueTonightToolToothTopTopicToppleTorchTornadoTortoiseTossTotalTouristTowardTowerTownToyTrackTradeTrafficTragicTrainTransferTrapTrashTravelTrayTreatTreeTrendTrialTribeTrickTriggerTrimTripTrophyTroubleTruckTrueTrulyTrumpetTrustTruthTryTubeTuitionTumbleTunaTunnelTurkeyTurnTurtleTwelveTwentyTwiceTwinTwistTwoTypeTypicalUglyUmbrellaUnableUnawareUncleUncoverUnderUndoUnfairUnfoldUnhappyUniformUniqueUnitUniverseUnknownUnlockUntilUnusualUnveilUpdateUpgradeUpholdUponUpperUpsetUrbanUrgeUsageUseUsedUsefulUselessUsualUtilityVacantVacuumVagueValidValleyValveVanVanishVaporVariousVastVaultVehicleVelvetVendorVentureVenueVerbVerifyVersionVeryVesselVeteranViableVibrantViciousVictoryVideoViewVillageVintageViolinVirtualVirusVisaVisitVisualVitalVividVocalVoiceVoidVolcanoVolumeVoteVoyageWageWagonWaitWalkWallWalnutWantWarfareWarmWarriorWashWaspWasteWaterWaveWayWealthWeaponWearWeaselWeatherWebWeddingWeekendWeirdWelcomeWestWetWhaleWhatWheatWheelWhenWhereWhipWhisperWideWidthWifeWildWillWinWindowWineWingWinkWinnerWinterWireWisdomWiseWishWitnessWolfWomanWonderWoodWoolWordWorkWorldWorryWorthWrapWreckWrestleWristWriteWrongYardYearYellowYouYoungYouthZebraZeroZoneZoo".replace(/([A-Z])/g," $1").toLowerCase().substring(1).split(" "),"0x3c8acc1e7b08d8e76f9fda015ef48dc8c710a73cb7e0f77b2c18a9b5a7adde60"!==me.check(e)))throw ge=null,new Error("BIP39 Wordlist for en (English) FAILED")}var ye=new(function(e){(0,h.Z)(r,e);var t=(0,d.Z)(r);function r(){return(0,p.Z)(this,r),t.call(this,"en")}return(0,v.Z)(r,[{key:"getWord",value:function(e){return be(this),ge[e]}},{key:"getWordIndex",value:function(e){return be(this),ge.indexOf(e)}}]),r}(me));me.register(ye);var ke={en:ye},we=new P.Yd("hdnode/5.7.0"),Ee=E.O$.from("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),xe=(0,oe.Y0)("Bitcoin seed"),_e=2147483648;function Te(e){return(1<<e)-1<<8-e}function Pe(e){return(0,x.$m)((0,x.Dv)(e),32)}function Ae(e){return ce.eU.encode((0,x.zo)([e,(0,x.p3)((0,le.JQ)((0,le.JQ)(e)),0,4)]))}function Ne(e){if(null==e)return ke.en;if("string"===typeof e){var t=ke[e];return null==t&&we.throwArgumentError("unknown locale","wordlist",e),t}return e}var Se={},Ce="m/44'/60'/0'/0/0",Re=function(){function e(t,r,n,a,o,i,s,u){if((0,p.Z)(this,e),t!==Se)throw new Error("HDNode constructor cannot be called directly");if(r){var c=new he.Et(r);(0,_.zG)(this,"privateKey",c.privateKey),(0,_.zG)(this,"publicKey",c.compressedPublicKey)}else(0,_.zG)(this,"privateKey",null),(0,_.zG)(this,"publicKey",(0,x.Dv)(n));(0,_.zG)(this,"parentFingerprint",a),(0,_.zG)(this,"fingerprint",(0,x.p3)((0,le.bP)((0,le.JQ)(this.publicKey)),0,4)),(0,_.zG)(this,"address",(0,T.db)(this.publicKey)),(0,_.zG)(this,"chainCode",o),(0,_.zG)(this,"index",i),(0,_.zG)(this,"depth",s),null==u?((0,_.zG)(this,"mnemonic",null),(0,_.zG)(this,"path",null)):"string"===typeof u?((0,_.zG)(this,"mnemonic",null),(0,_.zG)(this,"path",u)):((0,_.zG)(this,"mnemonic",u),(0,_.zG)(this,"path",u.path))}return(0,v.Z)(e,[{key:"extendedKey",get:function(){if(this.depth>=256)throw new Error("Depth too large!");return Ae((0,x.zo)([null!=this.privateKey?"0x0488ADE4":"0x0488B21E",(0,x.Dv)(this.depth),this.parentFingerprint,(0,x.$m)((0,x.Dv)(this.index),4),this.chainCode,null!=this.privateKey?(0,x.zo)(["0x00",this.privateKey]):this.publicKey]))}},{key:"neuter",value:function(){return new e(Se,null,this.publicKey,this.parentFingerprint,this.chainCode,this.index,this.depth,this.path)}},{key:"_derive",value:function(t){if(t>4294967295)throw new Error("invalid index - "+String(t));var r=this.path;r&&(r+="/"+(t&~_e));var n=new Uint8Array(37);if(t&_e){if(!this.privateKey)throw new Error("cannot derive child of neutered node");n.set((0,x.lE)(this.privateKey),1),r&&(r+="'")}else n.set((0,x.lE)(this.publicKey));for(var a=24;a>=0;a-=8)n[33+(a>>3)]=t>>24-a&255;var o=(0,x.lE)((0,le.Gy)(de.p.sha512,this.chainCode,n)),i=o.slice(0,32),s=o.slice(32),u=null,c=null;this.privateKey?u=Pe(E.O$.from(i).add(this.privateKey).mod(Ee)):c=new he.Et((0,x.Dv)(i))._addPoint(this.publicKey);var l=r,f=this.mnemonic;return f&&(l=Object.freeze({phrase:f.phrase,path:r,locale:f.locale||"en"})),new e(Se,u,c,this.fingerprint,Pe(s),t,this.depth+1,l)}},{key:"derivePath",value:function(e){var t=e.split("/");if(0===t.length||"m"===t[0]&&0!==this.depth)throw new Error("invalid path - "+e);"m"===t[0]&&t.shift();for(var r=this,n=0;n<t.length;n++){var a=t[n];if(a.match(/^[0-9]+'$/)){var o=parseInt(a.substring(0,a.length-1));if(o>=_e)throw new Error("invalid path index - "+a);r=r._derive(_e+o)}else{if(!a.match(/^[0-9]+$/))throw new Error("invalid path component - "+a);var i=parseInt(a);if(i>=_e)throw new Error("invalid path index - "+a);r=r._derive(i)}}return r}}],[{key:"_fromSeed",value:function(t,r){var n=(0,x.lE)(t);if(n.length<16||n.length>64)throw new Error("invalid seed");var a=(0,x.lE)((0,le.Gy)(de.p.sha512,xe,n));return new e(Se,Pe(a.slice(0,32)),null,"0x00000000",Pe(a.slice(32)),0,0,r)}},{key:"fromMnemonic",value:function(t,r,n){return t=Ie(Be(t,n=Ne(n)),n),e._fromSeed(Oe(t,r),{phrase:t,path:"m",locale:n.locale})}},{key:"fromSeed",value:function(t){return e._fromSeed(t,null)}},{key:"fromExtendedKey",value:function(t){var r=ce.eU.decode(t);82===r.length&&Ae(r.slice(0,78))===t||we.throwArgumentError("invalid extended key","extendedKey","[REDACTED]");var n=r[4],a=(0,x.Dv)(r.slice(5,9)),o=parseInt((0,x.Dv)(r.slice(9,13)).substring(2),16),i=(0,x.Dv)(r.slice(13,45)),s=r.slice(45,78);switch((0,x.Dv)(r.slice(0,4))){case"0x0488b21e":case"0x043587cf":return new e(Se,null,(0,x.Dv)(s),a,i,o,n,null);case"0x0488ade4":case"0x04358394 ":if(0!==s[0])break;return new e(Se,(0,x.Dv)(s.slice(1)),null,a,i,o,n,null)}return we.throwArgumentError("invalid extended key","extendedKey","[REDACTED]")}}]),e}();function Oe(e,t){t||(t="");var r=(0,oe.Y0)("mnemonic"+t,oe.Uj.NFKD);return fe((0,oe.Y0)(e,oe.Uj.NFKD),r,2048,64,"sha512")}function Be(e,t){t=Ne(t),we.checkNormalize();var r=t.split(e);
1if(r.length%3!==0)throw new Error("invalid mnemonic");for(var n=(0,x.lE)(new Uint8Array(Math.ceil(11*r.length/8))),a=0,o=0;o<r.length;o++){var i=t.getWordIndex(r[o].normalize("NFKD"));if(-1===i)throw new Error("invalid mnemonic");for(var s=0;s<11;s++)i&1<<10-s&&(n[a>>3]|=1<<7-a%8),a++}var u=32*r.length/3,c=Te(r.length/3);if(((0,x.lE)((0,le.JQ)(n.slice(0,u/8)))[0]&c)!==(n[n.length-1]&c))throw new Error("invalid checksum");return(0,x.Dv)(n.slice(0,u/8))}function Ie(e,t){if(t=Ne(t),(e=(0,x.lE)(e)).length%4!==0||e.length<16||e.length>32)throw new Error("invalid entropy");for(var r=[0],n=11,a=0;a<e.length;a++)n>8?(r[r.length-1]<<=8,r[r.length-1]|=e[a],n-=8):(r[r.length-1]<<=n,r[r.length-1]|=e[a]>>8-n,r.push(e[a]&(1<<8-n)-1),n+=3);var o=e.length/4,i=(0,x.lE)((0,le.JQ)(e))[0]&Te(o);return r[r.length-1]<<=o,r[r.length-1]|=i>>8-o,t.join(r.map((function(e){return t.getWord(e)})))}function De(e,t){try{return Be(e,t),!0}catch(r){}return!1}function Ze(e){return("number"!==typeof e||e<0||e>=_e||e%1)&&we.throwArgumentError("invalid account index","index",e),"m/44'/60'/".concat(e,"'/0/0")}var Le=new P.Yd("random/5.7.0");var Fe=function(){if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof r.g)return r.g;throw new Error("unable to locate global object")}(),Ge=Fe.crypto||Fe.msCrypto;function Ue(e){(e<=0||e>1024||e%1||e!=e)&&Le.throwArgumentError("invalid length","length",e);var t=new Uint8Array(e);return Ge.getRandomValues(t),(0,x.lE)(t)}Ge&&Ge.getRandomValues||(Le.warn("WARNING: Missing strong random number source"),Ge={getRandomValues:function(e){return Le.throwError("no secure random source avaialble",P.Yd.errors.UNSUPPORTED_OPERATION,{operation:"crypto.getRandomValues"})}});var Me=r(37532),je=r.n(Me),ze=r(46125),Ke=r.n(ze);function He(e){return"string"===typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),(0,x.lE)(e)}function Ye(e,t){for(e=String(e);e.length<t;)e="0"+e;return e}function We(e){return"string"===typeof e?(0,oe.Y0)(e,oe.Uj.NFKC):(0,x.lE)(e)}function qe(e,t){for(var r=e,n=t.toLowerCase().split("/"),a=0;a<n.length;a++){var o=null;for(var i in r)if(i.toLowerCase()===n[a]){o=r[i];break}if(null===o)return null;r=o}return r}function Ve(e){var t=(0,x.lE)(e);t[6]=15&t[6]|64,t[8]=63&t[8]|128;var r=(0,x.Dv)(t);return[r.substring(2,10),r.substring(10,14),r.substring(14,18),r.substring(18,22),r.substring(22,34)].join("-")}var $e="json-wallets/5.7.0",Je=function(e,t,r,n){return new(r||(r=Promise))((function(a,o){function i(e){try{u(n.next(e))}catch(t){o(t)}}function s(e){try{u(n.throw(e))}catch(t){o(t)}}function u(e){var t;e.done?a(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,s)}u((n=n.apply(e,t||[])).next())}))},Xe=new P.Yd($e);function Qe(e){return null!=e&&e.mnemonic&&e.mnemonic.phrase}var et=function(e){(0,h.Z)(r,e);var t=(0,d.Z)(r);function r(){return(0,p.Z)(this,r),t.apply(this,arguments)}return(0,v.Z)(r,[{key:"isKeystoreAccount",value:function(e){return!(!e||!e._isKeystoreAccount)}}]),r}(_.dk);function tt(e,t){var r=He(qe(e,"crypto/ciphertext"));if((0,x.Dv)((0,ae.w)((0,x.zo)([t.slice(16,32),r]))).substring(2)!==qe(e,"crypto/mac").toLowerCase())throw new Error("invalid password");var n=function(e,t,r){if("aes-128-ctr"===qe(e,"crypto/cipher")){var n=He(qe(e,"crypto/cipherparams/iv")),a=new(je().Counter)(n),o=new(je().ModeOfOperation.ctr)(t,a);return(0,x.lE)(o.decrypt(r))}return null}(e,t.slice(0,16),r);n||Xe.throwError("unsupported cipher",P.Yd.errors.UNSUPPORTED_OPERATION,{operation:"decrypt"});var a=t.slice(32,64),o=(0,T.db)(n);if(e.address){var i=e.address.toLowerCase();if("0x"!==i.substring(0,2)&&(i="0x"+i),(0,w.Kn)(i)!==o)throw new Error("address mismatch")}var s={_isKeystoreAccount:!0,address:o,privateKey:(0,x.Dv)(n)};if("0.1"===qe(e,"x-ethers/version")){var u=He(qe(e,"x-ethers/mnemonicCiphertext")),c=He(qe(e,"x-ethers/mnemonicCounter")),l=new(je().Counter)(c),f=new(je().ModeOfOperation.ctr)(a,l),h=qe(e,"x-ethers/path")||Ce,d=qe(e,"x-ethers/locale")||"en",p=(0,x.lE)(f.decrypt(u));try{var v=Ie(p,d),m=Re.fromMnemonic(v,null,d).derivePath(h);if(m.privateKey!=s.privateKey)throw new Error("mnemonic mismatch");s.mnemonic=m.mnemonic}catch(g){if(g.code!==P.Yd.errors.INVALID_ARGUMENT||"wordlist"!==g.argument)throw g}}return new et(s)}function rt(e,t,r,n,a){return(0,x.lE)(fe(e,t,r,n,a))}function nt(e,t,r,n,a){return Promise.resolve(rt(e,t,r,n,a))}function at(e,t,r,n,a){var o=We(t),i=qe(e,"crypto/kdf");if(i&&"string"===typeof i){var s=function(e,t){return Xe.throwArgumentError("invalid key-derivation function parameters",e,t)};if("scrypt"===i.toLowerCase()){var u=He(qe(e,"crypto/kdfparams/salt")),c=parseInt(qe(e,"crypto/kdfparams/n")),l=parseInt(qe(e,"crypto/kdfparams/r")),f=parseInt(qe(e,"crypto/kdfparams/p"));c&&l&&f||s("kdf",i),0!==(c&c-1)&&s("N",c);var h=parseInt(qe(e,"crypto/kdfparams/dklen"));return 32!==h&&s("dklen",h),n(o,u,c,l,f,64,a)}if("pbkdf2"===i.toLowerCase()){var d=He(qe(e,"crypto/kdfparams/salt")),p=null,v=qe(e,"crypto/kdfparams/prf");
1"hmac-sha256"===v?p="sha256":"hmac-sha512"===v?p="sha512":s("prf",v);var m=parseInt(qe(e,"crypto/kdfparams/c")),g=parseInt(qe(e,"crypto/kdfparams/dklen"));return 32!==g&&s("dklen",g),r(o,d,m,g,p)}}return Xe.throwArgumentError("unsupported key-derivation function","kdf",i)}var ot=new P.Yd($e),it=function(e){(0,h.Z)(r,e);var t=(0,d.Z)(r);function r(){return(0,p.Z)(this,r),t.apply(this,arguments)}return(0,v.Z)(r,[{key:"isCrowdsaleAccount",value:function(e){return!(!e||!e._isCrowdsaleAccount)}}]),r}(_.dk);function st(e,t){var r=JSON.parse(e);t=We(t);var n=(0,w.Kn)(qe(r,"ethaddr")),a=He(qe(r,"encseed"));a&&a.length%16===0||ot.throwArgumentError("invalid encseed","json",e);for(var o=(0,x.lE)(fe(t,t,2e3,32,"sha256")).slice(0,16),i=a.slice(0,16),s=a.slice(16),u=new(je().ModeOfOperation.cbc)(o,i),c=je().padding.pkcs7.strip((0,x.lE)(u.decrypt(s))),l="",f=0;f<c.length;f++)l+=String.fromCharCode(c[f]);var h=(0,oe.Y0)(l),d=(0,ae.w)(h);return new it({_isCrowdsaleAccount:!0,address:n,privateKey:d})}function ut(e){var t=null;try{t=JSON.parse(e)}catch(r){return!1}return t.encseed&&t.ethaddr}function ct(e){var t=null;try{t=JSON.parse(e)}catch(r){return!1}return!(!t.version||parseInt(t.version)!==t.version||3!==parseInt(t.version))}function lt(e){if(ut(e))try{return(0,w.Kn)(JSON.parse(e).ethaddr)}catch(t){return null}if(ct(e))try{return(0,w.Kn)(JSON.parse(e).address)}catch(t){return null}return null}function ft(e,t,r){if(ut(e)){r&&r(0);var n=st(e,t);return r&&r(1),Promise.resolve(n)}return ct(e)?function(e,t,r){return Je(this,void 0,void 0,(0,m.Z)().mark((function n(){var a,o;return(0,m.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return a=JSON.parse(e),n.next=3,at(a,t,nt,Ke().scrypt,r);case 3:return o=n.sent,n.abrupt("return",tt(a,o));case 5:case"end":return n.stop()}}),n)})))}(e,t,r):Promise.reject(new Error("invalid JSON wallet"))}function ht(e,t){if(ut(e))return st(e,t);if(ct(e))return function(e,t){var r=JSON.parse(e);return tt(r,at(r,t,rt,Ke().syncScrypt))}(e,t);throw new Error("invalid JSON wallet")}var dt=function(e,t,r,n){return new(r||(r=Promise))((function(a,o){function i(e){try{u(n.next(e))}catch(t){o(t)}}function s(e){try{u(n.throw(e))}catch(t){o(t)}}function u(e){var t;e.done?a(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,s)}u((n=n.apply(e,t||[])).next())}))},pt=new P.Yd("wallet/5.7.0");var vt=function(e){(0,h.Z)(r,e);var t=(0,d.Z)(r);function r(e,n){var a,o;if((0,p.Z)(this,r),a=t.call(this),null!=(o=e)&&(0,x.A7)(o.privateKey,32)&&null!=o.address){var i=new he.Et(e.privateKey);if((0,_.zG)((0,c.Z)(a),"_signingKey",(function(){return i})),(0,_.zG)((0,c.Z)(a),"address",(0,T.db)(a.publicKey)),a.address!==(0,w.Kn)(e.address)&&pt.throwArgumentError("privateKey/address mismatch","privateKey","[REDACTED]"),function(e){var t=e.mnemonic;return t&&t.phrase}(e)){var s=e.mnemonic;(0,_.zG)((0,c.Z)(a),"_mnemonic",(function(){return{phrase:s.phrase,path:s.path||Ce,locale:s.locale||"en"}}));var u=a.mnemonic,l=Re.fromMnemonic(u.phrase,null,u.locale).derivePath(u.path);(0,T.db)(l.privateKey)!==a.address&&pt.throwArgumentError("mnemonic/address mismatch","privateKey","[REDACTED]")}else(0,_.zG)((0,c.Z)(a),"_mnemonic",(function(){return null}))}else{if(he.Et.isSigningKey(e))"secp256k1"!==e.curve&&pt.throwArgumentError("unsupported curve; must be secp256k1","privateKey","[REDACTED]"),(0,_.zG)((0,c.Z)(a),"_signingKey",(function(){return e}));else{"string"===typeof e&&e.match(/^[0-9a-f]*$/i)&&64===e.length&&(e="0x"+e);var f=new he.Et(e);(0,_.zG)((0,c.Z)(a),"_signingKey",(function(){return f}))}(0,_.zG)((0,c.Z)(a),"_mnemonic",(function(){return null})),(0,_.zG)((0,c.Z)(a),"address",(0,T.db)(a.publicKey))}return n&&!y.zt.isProvider(n)&&pt.throwArgumentError("invalid provider","provider",n),(0,_.zG)((0,c.Z)(a),"provider",n||null),a}return(0,v.Z)(r,[{key:"mnemonic",get:function(){return this._mnemonic()}},{key:"privateKey",get:function(){return this._signingKey().privateKey}},{key:"publicKey",get:function(){return this._signingKey().publicKey}},{key:"getAddress",value:function(){return Promise.resolve(this.address)}},{key:"connect",value:function(e){return new r(this,e)}},{key:"signTransaction",value:function(e){var t=this;return(0,_.mE)(e).then((function(r){null!=r.from&&((0,w.Kn)(r.from)!==t.address&&pt.throwArgumentError("transaction from address mismatch","transaction.from",e.from),delete r.from);
1var n=t._signingKey().signDigest((0,ae.w)((0,T.qC)(r)));return(0,T.qC)(r,n)}))}},{key:"signMessage",value:function(e){return dt(this,void 0,void 0,(0,m.Z)().mark((function t(){return(0,m.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",(0,x.gV)(this._signingKey().signDigest(se(e))));case 1:case"end":return t.stop()}}),t,this)})))}},{key:"_signTypedData",value:function(e,t,r){return dt(this,void 0,void 0,(0,m.Z)().mark((function n(){var a,o=this;return(0,m.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,ue.E.resolveNames(e,t,r,(function(e){return null==o.provider&&pt.throwError("cannot resolve ENS names without a provider",P.Yd.errors.UNSUPPORTED_OPERATION,{operation:"resolveName",value:e}),o.provider.resolveName(e)}));case 2:return a=n.sent,n.abrupt("return",(0,x.gV)(this._signingKey().signDigest(ue.E.hash(a.domain,t,a.value))));case 4:case"end":return n.stop()}}),n,this)})))}},{key:"encrypt",value:function(e,t,r){if("function"!==typeof t||r||(r=t,t={}),r&&"function"!==typeof r)throw new Error("invalid callback");return t||(t={}),function(e,t,r,n){try{if((0,w.Kn)(e.address)!==(0,T.db)(e.privateKey))throw new Error("address/privateKey mismatch");if(Qe(e)){var a=e.mnemonic;if(Re.fromMnemonic(a.phrase,null,a.locale).derivePath(a.path||Ce).privateKey!=e.privateKey)throw new Error("mnemonic mismatch")}}catch(b){return Promise.reject(b)}"function"!==typeof r||n||(n=r,r={}),r||(r={});var o=(0,x.lE)(e.privateKey),i=We(t),s=null,u=null,c=null;if(Qe(e)){var l=e.mnemonic;s=(0,x.lE)(Be(l.phrase,l.locale||"en")),u=l.path||Ce,c=l.locale||"en"}var f=r.client;f||(f="ethers.js");var h=null;h=r.salt?(0,x.lE)(r.salt):Ue(32);var d=null;if(r.iv){if(16!==(d=(0,x.lE)(r.iv)).length)throw new Error("invalid iv")}else d=Ue(16);var p=null;if(r.uuid){if(16!==(p=(0,x.lE)(r.uuid)).length)throw new Error("invalid uuid")}else p=Ue(16);var v=1<<17,m=8,g=1;return r.scrypt&&(r.scrypt.N&&(v=r.scrypt.N),r.scrypt.r&&(m=r.scrypt.r),r.scrypt.p&&(g=r.scrypt.p)),Ke().scrypt(i,h,v,m,g,64,n).then((function(t){var r=(t=(0,x.lE)(t)).slice(0,16),n=t.slice(16,32),a=t.slice(32,64),i=new(je().Counter)(d),l=new(je().ModeOfOperation.ctr)(r,i),b=(0,x.lE)(l.encrypt(o)),y=(0,ae.w)((0,x.zo)([n,b])),k={address:e.address.substring(2).toLowerCase(),id:Ve(p),version:3,crypto:{cipher:"aes-128-ctr",cipherparams:{iv:(0,x.Dv)(d).substring(2)},ciphertext:(0,x.Dv)(b).substring(2),kdf:"scrypt",kdfparams:{salt:(0,x.Dv)(h).substring(2),n:v,dklen:32,p:g,r:m},mac:y.substring(2)}};if(s){var w=Ue(16),E=new(je().Counter)(w),_=new(je().ModeOfOperation.ctr)(a,E),T=(0,x.lE)(_.encrypt(s)),P=new Date,A=P.getUTCFullYear()+"-"+Ye(P.getUTCMonth()+1,2)+"-"+Ye(P.getUTCDate(),2)+"T"+Ye(P.getUTCHours(),2)+"-"+Ye(P.getUTCMinutes(),2)+"-"+Ye(P.getUTCSeconds(),2)+".0Z";k["x-ethers"]={client:f,gethFilename:"UTC--"+A+"--"+k.address,mnemonicCounter:(0,x.Dv)(w).substring(2),mnemonicCiphertext:(0,x.Dv)(T).substring(2),path:u,locale:c,version:"0.1"}}return JSON.stringify(k)}))}(this,e,t,r)}}],[{key:"createRandom",value:function(e){var t=Ue(16);e||(e={}),e.extraEntropy&&(t=(0,x.lE)((0,x.p3)((0,ae.w)((0,x.zo)([t,e.extraEntropy])),0,16)));var n=Ie(t,e.locale);return r.fromMnemonic(n,e.path,e.locale)}},{key:"fromEncryptedJson",value:function(e,t,n){return ft(e,t,n).then((function(e){return new r(e)}))}},{key:"fromEncryptedJsonSync",value:function(e,t){return new r(ht(e,t))}},{key:"fromMnemonic",value:function(e,t,n){return t||(t=Ce),new r(Re.fromMnemonic(e,null,n).derivePath(t))}}]),r}(k.E);function mt(e,t){return(0,T.RJ)(se(e),t)}function gt(e,t,r,n){return(0,T.RJ)(ue.E.hash(e,t,r),n)}var bt=r(81895),yt=r(6321),kt=r(44160),wt="\u039e",Et=r(88133),xt=r(48853),_t=r(68565),Tt=r(28786),Pt=r(65109),At=r.n(Pt),Nt="providers/5.7.2",St=new P.Yd(Nt),Ct=function(){function e(){(0,p.Z)(this,e),this.formats=this.getDefaultFormats()}return(0,v.Z)(e,[{key:"getDefaultFormats",value:function(){var t=this,r={},n=this.address.bind(this),a=this.bigNumber.bind(this),o=this.blockTag.bind(this),i=this.data.bind(this),s=this.hash.bind(this),u=this.hex.bind(this),c=this.number.bind(this),l=this.type.bind(this);return r.transaction={hash:s,type:l,accessList:e.allowNull(this.accessList.bind(this),null),blockHash:e.allowNull(s,null),blockNumber:e.allowNull(c,null),transactionIndex:e.allowNull(c,null),
1confirmations:e.allowNull(c,null),from:n,gasPrice:e.allowNull(a),maxPriorityFeePerGas:e.allowNull(a),maxFeePerGas:e.allowNull(a),gasLimit:a,to:e.allowNull(n,null),value:a,nonce:c,data:i,r:e.allowNull(this.uint256),s:e.allowNull(this.uint256),v:e.allowNull(c),creates:e.allowNull(n,null),raw:e.allowNull(i)},r.transactionRequest={from:e.allowNull(n),nonce:e.allowNull(c),gasLimit:e.allowNull(a),gasPrice:e.allowNull(a),maxPriorityFeePerGas:e.allowNull(a),maxFeePerGas:e.allowNull(a),to:e.allowNull(n),value:e.allowNull(a),data:e.allowNull((function(e){return t.data(e,!0)})),type:e.allowNull(c),accessList:e.allowNull(this.accessList.bind(this),null)},r.receiptLog={transactionIndex:c,blockNumber:c,transactionHash:s,address:n,topics:e.arrayOf(s),data:i,logIndex:c,blockHash:s},r.receipt={to:e.allowNull(this.address,null),from:e.allowNull(this.address,null),contractAddress:e.allowNull(n,null),transactionIndex:c,root:e.allowNull(u),gasUsed:a,logsBloom:e.allowNull(i),blockHash:s,transactionHash:s,logs:e.arrayOf(this.receiptLog.bind(this)),blockNumber:c,confirmations:e.allowNull(c,null),cumulativeGasUsed:a,effectiveGasPrice:e.allowNull(a),status:e.allowNull(c),type:l},r.block={hash:e.allowNull(s),parentHash:s,number:c,timestamp:c,nonce:e.allowNull(u),difficulty:this.difficulty.bind(this),gasLimit:a,gasUsed:a,miner:e.allowNull(n),extraData:i,transactions:e.allowNull(e.arrayOf(s)),baseFeePerGas:e.allowNull(a)},r.blockWithTransactions=(0,_.DC)(r.block),r.blockWithTransactions.transactions=e.allowNull(e.arrayOf(this.transactionResponse.bind(this))),r.filter={fromBlock:e.allowNull(o,void 0),toBlock:e.allowNull(o,void 0),blockHash:e.allowNull(s,void 0),address:e.allowNull(n,void 0),topics:e.allowNull(this.topics.bind(this),void 0)},r.filterLog={blockNumber:e.allowNull(c),blockHash:e.allowNull(s),transactionIndex:c,removed:e.allowNull(this.boolean.bind(this)),address:n,data:e.allowFalsish(i,"0x"),topics:e.arrayOf(s),transactionHash:s,logIndex:c},r}},{key:"accessList",value:function(e){return(0,T.z7)(e||[])}},{key:"number",value:function(e){return"0x"===e?0:E.O$.from(e).toNumber()}},{key:"type",value:function(e){return"0x"===e||null==e?0:E.O$.from(e).toNumber()}},{key:"bigNumber",value:function(e){return E.O$.from(e)}},{key:"boolean",value:function(e){if("boolean"===typeof e)return e;if("string"===typeof e){if("true"===(e=e.toLowerCase()))return!0;if("false"===e)return!1}throw new Error("invalid boolean - "+e)}},{key:"hex",value:function(e,t){return"string"===typeof e&&(t||"0x"===e.substring(0,2)||(e="0x"+e),(0,x.A7)(e))?e.toLowerCase():St.throwArgumentError("invalid hash","value",e)}},{key:"data",value:function(e,t){var r=this.hex(e,t);if(r.length%2!==0)throw new Error("invalid data; odd-length - "+e);return r}},{key:"address",value:function(e){return(0,w.Kn)(e)}},{key:"callAddress",value:function(e){if(!(0,x.A7)(e,32))return null;var t=(0,w.Kn)((0,x.p3)(e,12));return t===bt.d?null:t}},{key:"contractAddress",value:function(e){return(0,w.CR)(e)}},{key:"blockTag",value:function(e){if(null==e)return"latest";if("earliest"===e)return"0x0";switch(e){case"earliest":return"0x0";case"latest":case"pending":case"safe":case"finalized":return e}if("number"===typeof e||(0,x.A7)(e))return(0,x.$P)(e);throw new Error("invalid blockTag")}},{key:"hash",value:function(e,t){var r=this.hex(e,t);return 32!==(0,x.E1)(r)?St.throwArgumentError("invalid hash","value",e):r}},{key:"difficulty",value:function(e){if(null==e)return null;var t=E.O$.from(e);try{return t.toNumber()}catch(r){}return null}},{key:"uint256",value:function(e){if(!(0,x.A7)(e))throw new Error("invalid uint256");return(0,x.$m)(e,32)}},{key:"_block",value:function(t,r){null!=t.author&&null==t.miner&&(t.miner=t.author);var n=null!=t._difficulty?t._difficulty:t.difficulty,a=e.check(r,t);return a._difficulty=null==n?null:E.O$.from(n),a}},{key:"block",value:function(e){return this._block(e,this.formats.block)}},{key:"blockWithTransactions",value:function(e){return this._block(e,this.formats.blockWithTransactions)}},{key:"transactionRequest",value:function(t){return e.check(this.formats.transactionRequest,t)}},{key:"transactionResponse",value:function(t){null!=t.gas&&null==t.gasLimit&&(t.gasLimit=t.gas),t.to&&E.O$.from(t.to).isZero()&&(t.to="0x0000000000000000000000000000000000000000"),null!=t.input&&null==t.data&&(t.data=t.input),null==t.to&&null==t.creates&&(t.creates=this.contractAddress(t)),1!==t.type&&2!==t.type||null!=t.accessList||(t.accessList=[]);var r=e.check(this.formats.transaction,t);if(null!=t.chainId){var n=t.chainId;(0,x.A7)(n)&&(n=E.O$.from(n).toNumber()),r.chainId=n}else{var a=t.networkId;null==a&&null==r.v&&(a=t.chainId),(0,x.A7)(a)&&(a=E.O$.from(a).toNumber()),"number"!==typeof a&&null!=r.v&&((a=(r.v-35)/2)<0&&(a=0),a=parseInt(a)),"number"!==typeof a&&(a=0),r.chainId=a}return r.blockHash&&"x"===r.blockHash.replace(/0/g,"")&&(r.blockHash=null),r}},{key:"transaction",value:function(e){return(0,T.Qc)(e)}},{key:"receiptLog",value:function(t){return e.check(this.formats.receiptLog,t)}},{key:"receipt",value:function(t){var r=e.check(this.formats.receipt,t);if(null!=r.root)if(r.root.length<=4){var n=E.O$.from(r.root).toNumber();0===n||1===n?(null!=r.status&&r.status!==n&&St.throwArgumentError("alt-root-status/status mismatch","value",{root:r.root,status:r.status}),r.status=n,delete r.root):St.throwArgumentError("invalid alt-root-status","value.root",r.root)}else 66!==r.root.length&&St.throwArgumentError("invalid root hash","value.root",r.root);return null!=r.status&&(r.byzantium=!0),r}},{key:"topics",value:function(e){var t=this;return Array.isArray(e)?e.map((function(e){return t.topics(e)})):null!=e?this.hash(e,!0):null}},{key:"filter",value:function(t){return e.check(this.formats.filter,t)}},{key:"filterLog",value:function(t){return e.check(this.formats.filterLog,t)}}],[{key:"check",value:function(e,t){var r={};for(var n in e)try{var a=e[n](t[n]);void 0!==a&&(r[n]=a)}catch(o){throw o.checkKey=n,o.checkValue=t[n],o}return r}},{key:"allowNull",value:function(e,t){return function(r){return null==r?t:e(r)}}},{key:"allowFalsish",value:function(e,t){return function(r){return r?e(r):t}}},{key:"arrayOf",value:function(e){return function(t){if(!Array.isArray(t))throw new Error("not an array");var r=[];return t.forEach((function(t){r.push(e(t))})),r}}}]),e}();function Rt(e){return e&&"function"===typeof e.isCommunityResource}function Ot(e){return Rt(e)&&e.isCommunityResource()}var Bt=!1;function It(){Bt||(Bt=!0,console.log("========= NOTICE ========="),console.log("Request-Rate Exceeded  (this message will not be repeated)"),console.log(""),console.log("The default API keys for each service are provided as a highly-throttled,"),console.log("community resource for low-traffic projects and early prototyping."),console.log(""),console.log("While your application will continue to function, we highly recommended"),console.log("signing up for your own API keys to improve performance, increase your"),console.log("request rate/limit and enable other perks, such as metrics and advanced APIs."),console.log(""),console.log("For more details: https://docs.ethers.io/api-keys/"),console.log("=========================="))}var Dt=function(e,t,r,n){return new(r||(r=Promise))((function(a,o){function i(e){try{u(n.next(e))}catch(t){o(t)}}function s(e){try{u(n.throw(e))}catch(t){o(t)}}function u(e){var t;e.done?a(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,s)}u((n=n.apply(e,t||[])).next())}))},Zt=new P.Yd(Nt);function Lt(e){return null==e?"null":(32!==(0,x.E1)(e)&&Zt.throwArgumentError("invalid topic","topic",e),e.toLowerCase())}function Ft(e){for(e=e.slice();e.length>0&&null==e[e.length-1];)e.pop();return e.map((function(e){if(Array.isArray(e)){var t={};e.forEach((function(e){t[Lt(e)]=!0}));var r=Object.keys(t);return r.sort(),r.join("|")}return Lt(e)})).join("&")}function Gt(e){if("string"===typeof e){if(e=e.toLowerCase(),32===(0,x.E1)(e))return"tx:"+e;if(-1===e.indexOf(":"))return e}else{if(Array.isArray(e))return"filter:*:"+Ft(e);
1if(y.Sg.isForkEvent(e))throw Zt.warn("not implemented"),new Error("not implemented");if(e&&"object"===typeof e)return"filter:"+(e.address||"*")+":"+Ft(e.topics||[])}throw new Error("invalid event - "+e)}function Ut(){return(new Date).getTime()}function Mt(e){return new Promise((function(t){setTimeout(t,e)}))}var jt=["block","network","pending","poll"],zt=function(){function e(t,r,n){(0,p.Z)(this,e),(0,_.zG)(this,"tag",t),(0,_.zG)(this,"listener",r),(0,_.zG)(this,"once",n),this._lastBlockNumber=-2,this._inflight=!1}return(0,v.Z)(e,[{key:"event",get:function(){switch(this.type){case"tx":return this.hash;case"filter":return this.filter}return this.tag}},{key:"type",get:function(){return this.tag.split(":")[0]}},{key:"hash",get:function(){var e=this.tag.split(":");return"tx"!==e[0]?null:e[1]}},{key:"filter",get:function(){var e=this.tag.split(":");if("filter"!==e[0])return null;var t,r=e[1],n=""===(t=e[2])?[]:t.split(/&/g).map((function(e){if(""===e)return[];var t=e.split("|").map((function(e){return"null"===e?null:e}));return 1===t.length?t[0]:t})),a={};return n.length>0&&(a.topics=n),r&&"*"!==r&&(a.address=r),a}},{key:"pollable",value:function(){return this.tag.indexOf(":")>=0||jt.indexOf(this.tag)>=0}}]),e}(),Kt={0:{symbol:"btc",p2pkh:0,p2sh:5,prefix:"bc"},2:{symbol:"ltc",p2pkh:48,p2sh:50,prefix:"ltc"},3:{symbol:"doge",p2pkh:30,p2sh:22},60:{symbol:"eth",ilk:"eth"},61:{symbol:"etc",ilk:"eth"},700:{symbol:"xdai",ilk:"eth"}};function Ht(e){return(0,x.$m)(E.O$.from(e).toHexString(),32)}function Yt(e){return ce.eU.encode((0,x.zo)([e,(0,x.p3)((0,le.JQ)((0,le.JQ)(e)),0,4)]))}var Wt=new RegExp("^(ipfs)://(.*)$","i"),qt=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),Wt,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];function Vt(e,t){try{return(0,oe.ZN)($t(e,t))}catch(r){}return null}function $t(e,t){if("0x"===e)return null;var r=E.O$.from((0,x.p3)(e,t,t+32)).toNumber(),n=E.O$.from((0,x.p3)(e,r,r+32)).toNumber();return(0,x.p3)(e,r+32,r+32+n)}function Jt(e){return e.match(/^ipfs:\/\/ipfs\//i)?e=e.substring(12):e.match(/^ipfs:\/\//i)?e=e.substring(7):Zt.throwArgumentError("unsupported IPFS format","link",e),"https://gateway.ipfs.io/ipfs/".concat(e)}function Xt(e){var t=(0,x.lE)(e);if(t.length>32)throw new Error("internal; should not happen");var r=new Uint8Array(32);return r.set(t,32-t.length),r}function Qt(e){if(e.length%32===0)return e;var t=new Uint8Array(32*Math.ceil(e.length/32));return t.set(e),t}function er(e){for(var t=[],r=0,n=0;n<e.length;n++)t.push(null),r+=32;for(var a=0;a<e.length;a++){var o=(0,x.lE)(e[a]);t[a]=Xt(r),t.push(Xt(o.length)),t.push(Qt(o)),r+=32+32*Math.ceil(o.length/32)}return(0,x.xs)(t)}var tr=function(){function e(t,r,n,a){(0,p.Z)(this,e),(0,_.zG)(this,"provider",t),(0,_.zG)(this,"name",n),(0,_.zG)(this,"address",t.formatter.address(r)),(0,_.zG)(this,"_resolvedAddress",a)}return(0,v.Z)(e,[{key:"supportsWildcard",value:function(){var e=this;return this._supportsEip2544||(this._supportsEip2544=this.provider.call({to:this.address,data:"0x01ffc9a79061b92300000000000000000000000000000000000000000000000000000000"}).then((function(e){return E.O$.from(e).eq(1)})).catch((function(t){if(t.code===P.Yd.errors.CALL_EXCEPTION)return!1;throw e._supportsEip2544=null,t}))),this._supportsEip2544}},{key:"_fetch",value:function(e,t){return Dt(this,void 0,void 0,(0,m.Z)().mark((function r(){var n,a,o;return(0,m.Z)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return n={to:this.address,ccipReadEnabled:!0,data:(0,x.xs)([e,(0,_t.VM)(this.name),t||"0x"])},a=!1,r.next=4,this.supportsWildcard();case 4:if(!r.sent){r.next=7;break}a=!0,n.data=(0,x.xs)(["0x9061b923",er([(0,_t.Kn)(this.name),n.data])]);case 7:return r.prev=7,r.next=10,this.provider.call(n);case 10:return o=r.sent,(0,x.lE)(o).length%32===4&&Zt.throwError("resolver threw error",P.Yd.errors.CALL_EXCEPTION,{transaction:n,data:o}),a&&(o=$t(o,0)),r.abrupt("return",o);case 16:if(r.prev=16,r.t0=r.catch(7),r.t0.code!==P.Yd.errors.CALL_EXCEPTION){r.next=20;break}return r.abrupt("return",null);case 20:throw r.t0;case 21:case"end":return r.stop()}}),r,this,[[7,16]])})))}},{key:"_fetchBytes",value:function(e,t){return Dt(this,void 0,void 0,(0,m.Z)().mark((function r(){var n;return(0,m.Z)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,this._fetch(e,t);case 2:if(null==(n=r.sent)){r.next=5;break}return r.abrupt("return",$t(n,0));case 5:return r.abrupt("return",null);case 6:case"end":return r.stop()}}),r,this)})))}},{key:"_getAddress",value:function(e,t){var r=Kt[String(e)];if(null==r&&Zt.throwError("unsupported coin type: ".concat(e),P.Yd.errors.UNSUPPORTED_OPERATION,{operation:"getAddress(".concat(e,")")}),"eth"===r.ilk)return this.provider.formatter.address(t);var n=(0,x.lE)(t);if(null!=r.p2pkh){var a=t.match(/^0x76a9([0-9a-f][0-9a-f])([0-9a-f]*)88ac$/);if(a){var o=parseInt(a[1],16);if(a[2].length===2*o&&o>=1&&o<=75)return Yt((0,x.zo)([[r.p2pkh],"0x"+a[2]]))}}if(null!=r.p2sh){var i=t.match(/^0xa9([0-9a-f][0-9a-f])([0-9a-f]*)87$/);if(i){var s=parseInt(i[1],16);if(i[2].length===2*s&&s>=1&&s<=75)return Yt((0,x.zo)([[r.p2sh],"0x"+i[2]]))}}if(null!=r.prefix){var u=n[1],c=n[0];if(0===c?20!==u&&32!==u&&(c=-1):c=-1,c>=0&&n.length===2+u&&u>=1&&u<=75){var l=At().toWords(n.slice(2));return l.unshift(c),At().encode(r.prefix,l)}}return null}},{key:"getAddress",value:function(e){return Dt(this,void 0,void 0,(0,m.Z)().mark((function t(){var r,n,a;return(0,m.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(null==e&&(e=60),60!==e){t.next=16;break}return t.prev=2,t.next=5,this._fetch("0x3b3b57de");case 5:if("0x"!==(r=t.sent)&&r!==kt.R){t.next=8;break}return t.abrupt("return",null);case 8:return t.abrupt("return",this.provider.formatter.callAddress(r));case 11:if(t.prev=11,t.t0=t.catch(2),t.t0.code!==P.Yd.errors.CALL_EXCEPTION){t.next=15;break}return t.abrupt("return",null);case 15:throw t.t0;case 16:return t.next=18,this._fetchBytes("0xf1cb7e06",Ht(e));case 18:if(null!=(n=t.sent)&&"0x"!==n){t.next=21;break}return t.abrupt("return",null);case 21:return null==(a=this._getAddress(e,n))&&Zt.throwError("invalid or unsupported coin data",P.Yd.errors.UNSUPPORTED_OPERATION,{operation:"getAddress(".concat(e,")"),coinType:e,data:n}),t.abrupt("return",a);case 24:case"end":return t.stop()}}),t,this,[[2,11]])})))}},{key:"getAvatar",value:function(){return Dt(this,void 0,void 0,(0,m.Z)().mark((function e(){var t,r,n,a,o,i,s,u,c,l,f,h,d,p,v,g;return(0,m.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=[{type:"name",content:this.name}],e.prev=1,e.next=4,this.getText("avatar");case 4:if(null!=(r=e.sent)){e.next=7;break}return e.abrupt("return",null);case 7:n=0;case 8:if(!(n<qt.length)){e.next=91;break}if(null!=(a=r.match(qt[n]))){e.next=12;break}return e.abrupt("continue",88);case 12:o=a[1].toLowerCase(),e.t0=o,e.next="https"===e.t0?16:"data"===e.t0?18:"ipfs"===e.t0?20:"erc721"===e.t0||"erc1155"===e.t0?22:88;break;case 16:return t.push({type:"url",content:r}),e.abrupt("return",{linkage:t,url:r});case 18:return t.push({type:"data",content:r}),e.abrupt("return",{linkage:t,url:r});case 20:return t.push({type:"ipfs",content:r}),e.abrupt("return",{linkage:t,url:Jt(r)});case 22:if(i="erc721"===o?"0xc87b56dd":"0x0e89341c",t.push({type:o,content:r}),e.t1=this._resolvedAddress,e.t1){e.next=29;break}return e.next=28,this.getAddress();case 28:e.t1=e.sent;case 29:if(s=e.t1,2===(u=(a[2]||"").split("/")).length){e.next=33;break}return e.abrupt("return",null);case 33:return e.next=35,this.provider.formatter.address(u[0]);case 35:if(c=e.sent,l=(0,x.$m)(E.O$.from(u[1]).toHexString(),32),"erc721"!==o){e.next=48;break}return e.t2=this.provider.formatter,e.next=41,this.provider.call({to:c,data:(0,x.xs)(["0x6352211e",l])});case 41:if(e.t3=e.sent,f=e.t2.callAddress.call(e.t2,e.t3),s===f){e.next=45;break}return e.abrupt("return",null);case 45:t.push({type:"owner",content:f}),e.next=57;break;case 48:if("erc1155"!==o){e.next=57;break}return e.t4=E.O$,e.next=52,this.provider.call({to:c,data:(0,x.xs)(["0x00fdd58e",(0,x.$m)(s,32),l])});case 52:if(e.t5=e.sent,!(h=e.t4.from.call(e.t4,e.t5)).isZero()){e.next=56;break}return e.abrupt("return",null);case 56:t.push({type:"balance",content:h.toString()});case 57:return d={to:this.provider.formatter.address(u[0]),data:(0,x.xs)([i,l])},e.t6=Vt,e.next=61,this.provider.call(d);case 61:if(e.t7=e.sent,null!=(p=(0,e.t6)(e.t7,0))){e.next=65;break}return e.abrupt("return",null);case 65:return t.push({type:"metadata-url-base",content:p}),"erc1155"===o&&(p=p.replace("{id}",l.substring(2)),t.push({type:"metadata-url-expanded",content:p})),p.match(/^ipfs:/i)&&(p=Jt(p)),t.push({type:"metadata-url",content:p}),e.next=71,(0,Tt.rd)(p);case 71:if(v=e.sent){e.next=74;break}return e.abrupt("return",null);case 74:if(t.push({type:"metadata",content:JSON.stringify(v)}),"string"===typeof(g=v.image)){e.next=78;break}return e.abrupt("return",null);
1case 78:if(!g.match(/^(https:\/\/|data:)/i)){e.next=81;break}e.next=86;break;case 81:if(null!=g.match(Wt)){e.next=84;break}return e.abrupt("return",null);case 84:t.push({type:"url-ipfs",content:g}),g=Jt(g);case 86:return t.push({type:"url",content:g}),e.abrupt("return",{linkage:t,url:g});case 88:n++,e.next=8;break;case 91:e.next=95;break;case 93:e.prev=93,e.t8=e.catch(1);case 95:return e.abrupt("return",null);case 96:case"end":return e.stop()}}),e,this,[[1,93]])})))}},{key:"getContentHash",value:function(){return Dt(this,void 0,void 0,(0,m.Z)().mark((function e(){var t,r,n,a,o,i,s,u,c;return(0,m.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._fetchBytes("0xbc1c58d1");case 2:if(null!=(t=e.sent)&&"0x"!==t){e.next=5;break}return e.abrupt("return",null);case 5:if(!(r=t.match(/^0xe3010170(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/))){e.next=10;break}if(n=parseInt(r[3],16),r[4].length!==2*n){e.next=10;break}return e.abrupt("return","ipfs://"+ce.eU.encode("0x"+r[1]));case 10:if(!(a=t.match(/^0xe5010172(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/))){e.next=15;break}if(o=parseInt(a[3],16),a[4].length!==2*o){e.next=15;break}return e.abrupt("return","ipns://"+ce.eU.encode("0x"+a[1]));case 15:if(!(i=t.match(/^0xe40101fa011b20([0-9a-f]*)$/))){e.next=19;break}if(64!==i[1].length){e.next=19;break}return e.abrupt("return","bzz://"+i[1]);case 19:if(!(s=t.match(/^0x90b2c605([0-9a-f]*)$/))){e.next=25;break}if(68!==s[1].length){e.next=25;break}return u={"=":"","+":"-","/":"_"},c=(0,xt.c)("0x"+s[1]).replace(/[=+\/]/g,(function(e){return u[e]})),e.abrupt("return","sia://"+c);case 25:return e.abrupt("return",Zt.throwError("invalid or unsupported content hash data",P.Yd.errors.UNSUPPORTED_OPERATION,{operation:"getContentHash()",data:t}));case 26:case"end":return e.stop()}}),e,this)})))}},{key:"getText",value:function(e){return Dt(this,void 0,void 0,(0,m.Z)().mark((function t(){var r,n;return(0,m.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=(0,oe.Y0)(e),(r=(0,x.zo)([Ht(64),Ht(r.length),r])).length%32!==0&&(r=(0,x.zo)([r,(0,x.$m)("0x",32-e.length%32)])),t.next=5,this._fetchBytes("0x59d1d43c",(0,x.Dv)(r));case 5:if(null!=(n=t.sent)&&"0x"!==n){t.next=8;break}return t.abrupt("return",null);case 8:return t.abrupt("return",(0,oe.ZN)(n));case 9:case"end":return t.stop()}}),t,this)})))}}]),e}(),rr=null,nr=1,ar=function(e){(0,h.Z)(r,e);var t=(0,d.Z)(r);function r(e){var n;if((0,p.Z)(this,r),(n=t.call(this))._events=[],n._emitted={block:-2},n.disableCcipRead=!1,n.formatter=(this instanceof r?this.constructor:void 0).getFormatter(),(0,_.zG)((0,c.Z)(n),"anyNetwork","any"===e),n.anyNetwork&&(e=n.detectNetwork()),e instanceof Promise)n._networkPromise=e,e.catch((function(e){})),n._ready().catch((function(e){}));else{var a=(0,_.tu)(this instanceof r?this.constructor:void 0,"getNetwork")(e);a?((0,_.zG)((0,c.Z)(n),"_network",a),n.emit("network",a,null)):Zt.throwArgumentError("invalid network","network",e)}return n._maxInternalBlockNumber=-1024,n._lastBlockNumber=-2,n._maxFilterBlockRange=10,n._pollingInterval=4e3,n._fastQueryDate=0,n}return(0,v.Z)(r,[{key:"_ready",value:function(){return Dt(this,void 0,void 0,(0,m.Z)().mark((function e(){var t;return(0,m.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null!=this._network){e.next=17;break}if(t=null,!this._networkPromise){e.next=11;break}return e.prev=3,e.next=6,this._networkPromise;case 6:t=e.sent,e.next=11;break;case 9:e.prev=9,e.t0=e.catch(3);case 11:if(null!=t){e.next=15;break}return e.next=14,this.detectNetwork();case 14:t=e.sent;case 15:t||Zt.throwError("no network detected",P.Yd.errors.UNKNOWN_ERROR,{}),null==this._network&&(this.anyNetwork?this._network=t:(0,_.zG)(this,"_network",t),this.emit("network",t,null));case 17:return e.abrupt("return",this._network);case 18:case"end":return e.stop()}}),e,this,[[3,9]])})))}},{key:"ready",get:function(){var e=this;return(0,Tt.$l)((function(){return e._ready().then((function(e){return e}),(function(e){if(e.code!==P.Yd.errors.NETWORK_ERROR||"noNetwork"!==e.event)throw e}))}))}},{key:"ccipReadFetch",value:function(e,t,r){return Dt(this,void 0,void 0,(0,m.Z)().mark((function n(){var a,o,i,s,u,c,l,f,h;return(0,m.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!this.disableCcipRead&&0!==r.length){n.next=2;break}return n.abrupt("return",null);case 2:a=e.to.toLowerCase(),o=t.toLowerCase(),i=[],s=0;case 6:if(!(s<r.length)){n.next=22;break}return u=r[s],c=u.replace("{sender}",a).replace("{data}",o),l=u.indexOf("{data}")>=0?null:JSON.stringify({data:o,sender:a}),n.next=12,(0,Tt.rd)({url:c,errorPassThrough:!0},l,(function(e,t){return e.status=t.statusCode,e}));case 12:if(!(f=n.sent).data){n.next=15;break}return n.abrupt("return",f.data);case 15:if(h=f.message||"unknown error",!(f.status>=400&&f.status<500)){n.next=18;break}return n.abrupt("return",Zt.throwError("response not found during CCIP fetch: ".concat(h),P.Yd.errors.SERVER_ERROR,{url:u,errorMessage:h}));case 18:i.push(h);case 19:s++,n.next=6;break;case 22:return n.abrupt("return",Zt.throwError("error encountered during CCIP fetch: ".concat(i.map((function(e){return JSON.stringify(e)})).join(", ")),P.Yd.errors.SERVER_ERROR,{urls:r,errorMessages:i}));case 23:case"end":return n.stop()}}),n,this)})))}},{key:"_getInternalBlockNumber",value:function(e){return Dt(this,void 0,void 0,(0,m.Z)().mark((function t(){var r,n,a,o,i=this;return(0,m.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this._ready();case 2:if(!(e>0)){t.next=20;break}case 3:if(!this._internalBlockNumber){t.next=20;break}return r=this._internalBlockNumber,t.prev=5,t.next=8,r;case 8:if(n=t.sent,!(Ut()-n.respTime<=e)){t.next=11;break}return t.abrupt("return",n.blockNumber);case 11:return t.abrupt("break",20);case 14:if(t.prev=14,t.t0=t.catch(5),this._internalBlockNumber!==r){t.next=18;break}return t.abrupt("break",20);case 18:t.next=3;break;
1case 20:return a=Ut(),o=(0,_.mE)({blockNumber:this.perform("getBlockNumber",{}),networkError:this.getNetwork().then((function(e){return null}),(function(e){return e}))}).then((function(e){var t=e.blockNumber,r=e.networkError;if(r)throw i._internalBlockNumber===o&&(i._internalBlockNumber=null),r;var n=Ut();return(t=E.O$.from(t).toNumber())<i._maxInternalBlockNumber&&(t=i._maxInternalBlockNumber),i._maxInternalBlockNumber=t,i._setFastBlockNumber(t),{blockNumber:t,reqTime:a,respTime:n}})),this._internalBlockNumber=o,o.catch((function(e){i._internalBlockNumber===o&&(i._internalBlockNumber=null)})),t.next=26,o;case 26:return t.abrupt("return",t.sent.blockNumber);case 27:case"end":return t.stop()}}),t,this,[[5,14]])})))}},{key:"poll",value:function(){return Dt(this,void 0,void 0,(0,m.Z)().mark((function e(){var t,r,n,a,o=this;return(0,m.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=nr++,r=[],n=null,e.prev=3,e.next=6,this._getInternalBlockNumber(100+this.pollingInterval/2);case 6:n=e.sent,e.next=13;break;case 9:return e.prev=9,e.t0=e.catch(3),this.emit("error",e.t0),e.abrupt("return");case 13:if(this._setFastBlockNumber(n),this.emit("poll",t,n),n!==this._lastBlockNumber){e.next=18;break}return this.emit("didPoll",t),e.abrupt("return");case 18:if(-2===this._emitted.block&&(this._emitted.block=n-1),Math.abs(this._emitted.block-n)>1e3)Zt.warn("network block skew detected; skipping block events (emitted=".concat(this._emitted.block," blockNumber").concat(n,")")),this.emit("error",Zt.makeError("network block skew detected",P.Yd.errors.NETWORK_ERROR,{blockNumber:n,event:"blockSkew",previousBlockNumber:this._emitted.block})),this.emit("block",n);else for(a=this._emitted.block+1;a<=n;a++)this.emit("block",a);return this._emitted.block!==n&&(this._emitted.block=n,Object.keys(this._emitted).forEach((function(e){if("block"!==e){var t=o._emitted[e];"pending"!==t&&n-t>12&&delete o._emitted[e]}}))),-2===this._lastBlockNumber&&(this._lastBlockNumber=n-1),this._events.forEach((function(e){switch(e.type){case"tx":var t=e.hash,a=o.getTransactionReceipt(t).then((function(e){return e&&null!=e.blockNumber?(o._emitted["t:"+t]=e.blockNumber,o.emit(t,e),null):null})).catch((function(e){o.emit("error",e)}));r.push(a);break;case"filter":if(!e._inflight){e._inflight=!0,-2===e._lastBlockNumber&&(e._lastBlockNumber=n-1);var i=e.filter;i.fromBlock=e._lastBlockNumber+1,i.toBlock=n;var s=i.toBlock-o._maxFilterBlockRange;s>i.fromBlock&&(i.fromBlock=s),i.fromBlock<0&&(i.fromBlock=0);var u=o.getLogs(i).then((function(t){e._inflight=!1,0!==t.length&&t.forEach((function(t){t.blockNumber>e._lastBlockNumber&&(e._lastBlockNumber=t.blockNumber),o._emitted["b:"+t.blockHash]=t.blockNumber,o._emitted["t:"+t.transactionHash]=t.blockNumber,o.emit(i,t)}))})).catch((function(t){o.emit("error",t),e._inflight=!1}));r.push(u)}}})),this._lastBlockNumber=n,Promise.all(r).then((function(){o.emit("didPoll",t)})).catch((function(e){o.emit("error",e)})),e.abrupt("return");case 26:case"end":return e.stop()}}),e,this,[[3,9]])})))}},{key:"resetEventsBlock",value:function(e){this._lastBlockNumber=e-1,this.polling&&this.poll()}},{key:"network",get:function(){return this._network}},{key:"detectNetwork",value:function(){return Dt(this,void 0,void 0,(0,m.Z)().mark((function e(){return(0,m.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Zt.throwError("provider does not support network detection",P.Yd.errors.UNSUPPORTED_OPERATION,{operation:"provider.detectNetwork"}));case 1:case"end":return e.stop()}}),e)})))}},{key:"getNetwork",value:function(){return Dt(this,void 0,void 0,(0,m.Z)().mark((function e(){var t,r,n;return(0,m.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._ready();case 2:return t=e.sent,e.next=5,this.detectNetwork();case 5:if(r=e.sent,t.chainId===r.chainId){e.next=23;break}if(!this.anyNetwork){e.next=20;break}return this._network=r,this._lastBlockNumber=-2,this._fastBlockNumber=null,this._fastBlockNumberPromise=null,this._fastQueryDate=0,this._emitted.block=-2,this._maxInternalBlockNumber=-1024,this._internalBlockNumber=null,this.emit
1("network",r,t),e.next=19,Mt(0);case 19:return e.abrupt("return",this._network);case 20:throw n=Zt.makeError("underlying network changed",P.Yd.errors.NETWORK_ERROR,{event:"changed",network:t,detectedNetwork:r}),this.emit("error",n),n;case 23:return e.abrupt("return",t);case 24:case"end":return e.stop()}}),e,this)})))}},{key:"blockNumber",get:function(){var e=this;return this._getInternalBlockNumber(100+this.pollingInterval/2).then((function(t){e._setFastBlockNumber(t)}),(function(e){})),null!=this._fastBlockNumber?this._fastBlockNumber:-1}},{key:"polling",get:function(){return null!=this._poller},set:function(e){var t=this;e&&!this._poller?(this._poller=setInterval((function(){t.poll()}),this.pollingInterval),this._bootstrapPoll||(this._bootstrapPoll=setTimeout((function(){t.poll(),t._bootstrapPoll=setTimeout((function(){t._poller||t.poll(),t._bootstrapPoll=null}),t.pollingInterval)}),0))):!e&&this._poller&&(clearInterval(this._poller),this._poller=null)}},{key:"pollingInterval",get:function(){return this._pollingInterval},set:function(e){var t=this;if("number"!==typeof e||e<=0||parseInt(String(e))!=e)throw new Error("invalid polling interval");this._pollingInterval=e,this._poller&&(clearInterval(this._poller),this._poller=setInterval((function(){t.poll()}),this._pollingInterval))}},{key:"_getFastBlockNumber",value:function(){var e=this,t=Ut();return t-this._fastQueryDate>2*this._pollingInterval&&(this._fastQueryDate=t,this._fastBlockNumberPromise=this.getBlockNumber().then((function(t){return(null==e._fastBlockNumber||t>e._fastBlockNumber)&&(e._fastBlockNumber=t),e._fastBlockNumber}))),this._fastBlockNumberPromise}},{key:"_setFastBlockNumber",value:function(e){null!=this._fastBlockNumber&&e<this._fastBlockNumber||(this._fastQueryDate=Ut(),(null==this._fastBlockNumber||e>this._fastBlockNumber)&&(this._fastBlockNumber=e,this._fastBlockNumberPromise=Promise.resolve(e)))}},{key:"waitForTransaction",value:function(e,t,r){return Dt(this,void 0,void 0,(0,m.Z)().mark((function n(){return(0,m.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",this._waitForTransaction(e,null==t?1:t,r||0,null));case 1:case"end":return n.stop()}}),n,this)})))}},{key:"_waitForTransaction",value:function(e,t,r,n){return Dt(this,void 0,void 0,(0,m.Z)().mark((function a(){var o,i=this;return(0,m.Z)().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,this.getTransactionReceipt(e);case 2:if(!(((o=a.sent)?o.confirmations:0)>=t)){a.next=5;break}return a.abrupt("return",o);case 5:return a.abrupt("return",new Promise((function(a,o){var s=[],u=!1,c=function(){return!!u||(u=!0,s.forEach((function(e){e()})),!1)},l=function(e){e.confirmations<t||c()||a(e)};if(i.on(e,l),s.push((function(){i.removeListener(e,l)})),n){var f=n.startBlock,h=null,d=function r(a){return Dt(i,void 0,void 0,(0,m.Z)().mark((function i(){var s=this;return(0,m.Z)().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:if(!u){i.next=2;break}return i.abrupt("return");case 2:return i.next=4,Mt(1e3);case 4:this.getTransactionCount(n.from).then((function(i){return Dt(s,void 0,void 0,(0,m.Z)().mark((function s(){var l,d,p,v,g,b;return(0,m.Z)().wrap((function(s){for(;;)switch(s.prev=s.next){case 0:if(!u){s.next=2;break}return s.abrupt("return");case 2:if(!(i<=n.nonce)){s.next=6;break}f=a,s.next=41;break;case 6:return s.next=8,this.getTransaction(e);case 8:if(!(l=s.sent)||null==l.blockNumber){s.next=11;break}return s.abrupt("return");case 11:null==h&&(h=f-3)<n.startBlock&&(h=n.startBlock);case 12:if(!(h<=a)){s.next=41;break}if(!u){s.next=15;break}return s.abrupt("return");case 15:return s.next=17,this.getBlockWithTransactions(h);case 17:d=s.sent,p=0;case 19:if(!(p<d.transactions.length)){s.next=38;break}if((v=d.transactions[p]).hash!==e){s.next=23;break}return s.abrupt("return");case 23:if(v.from!==n.from||v.nonce!==n.nonce){s.next=35;break}if(!u){s.next=26;break}return s.abrupt("return");case 26:return s.next=28,this.waitForTransaction(v.hash,t);case 28:if(g=s.sent,!c()){s.next=31;break}return s.abrupt("return");case 31:return b="replaced",v.data===n.data&&v.to===n.to&&v.value.eq(n.value)?b="repriced":"0x"===v.data&&v.from===v.to&&v.value.isZero()&&(b="cancelled"),o(Zt.makeError("transaction was replaced",P.Yd.errors.TRANSACTION_REPLACED,{cancelled:"replaced"===b||"cancelled"===b,reason:b,replacement:this._wrapTransaction(v),hash:e,receipt:g})),s.abrupt("return");case 35:p++,s.next=19;break;case 38:h++,s.next=12;break;case 41:if(!u){s.next=43;break}return s.abrupt("return");case 43:this.once("block",r);case 44:case"end":return s.stop()}}),s,this)})))}),(function(e){u||s.once("block",r)}));case 5:case"end":return i.stop()}}),i,this)})))};if(u)return;i.once("block",d),s.push((function(){i.removeListener("block",d)}))}if("number"===typeof r&&r>0){var p=setTimeout((function(){c()||o(Zt.makeError("timeout exceeded",P.Yd.errors.TIMEOUT,{timeout:r}))}),r);p.unref&&p.unref(),s.push((function(){clearTimeout(p)}))}})));case 6:case"end":return a.stop()}}),a,this)})))}},{key:"getBlockNumber",value:function(){return Dt(this,void 0,void 0,(0,m.Z)().mark((function e(){return(0,m.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this._getInternalBlockNumber(0));case 1:case"end":return e.stop()}}),e,this)})))}},{key:"getGasPrice",value:function(){return Dt(this,void 0,void 0,(0,m.Z)().mark((function e(){var t;return(0,m.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getNetwork();case 2:return e.next=4,this.perform("getGasPrice",{});case 4:return t=e.sent,e.prev=5,e.abrupt("return",E.O$.from(t));case 9:return e.prev=9,e.t0=e.catch(5),e.abrupt("return",Zt.throwError("bad result from backend",P.Yd.errors.SERVER_ERROR,{method:"getGasPrice",result:t,error:e.t0}));case 12:case"end":return e.stop()}}),e,this,[[5,9]])})))}},{key:"getBalance",value:function(e,t){return Dt(this,void 0,void 0,(0,m.Z)().mark((function r(){var n,a;return(0,m.Z)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,this.getNetwork();case 2:return r.next=4,(0,_.mE)({address:this._getAddress(e),blockTag:this._getBlockTag(t)});
1case 4:return n=r.sent,r.next=7,this.perform("getBalance",n);case 7:return a=r.sent,r.prev=8,r.abrupt("return",E.O$.from(a));case 12:return r.prev=12,r.t0=r.catch(8),r.abrupt("return",Zt.throwError("bad result from backend",P.Yd.errors.SERVER_ERROR,{method:"getBalance",params:n,result:a,error:r.t0}));case 15:case"end":return r.stop()}}),r,this,[[8,12]])})))}},{key:"getTransactionCount",value:function(e,t){return Dt(this,void 0,void 0,(0,m.Z)().mark((function r(){var n,a;return(0,m.Z)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,this.getNetwork();case 2:return r.next=4,(0,_.mE)({address:this._getAddress(e),blockTag:this._getBlockTag(t)});case 4:return n=r.sent,r.next=7,this.perform("getTransactionCount",n);case 7:return a=r.sent,r.prev=8,r.abrupt("return",E.O$.from(a).toNumber());case 12:return r.prev=12,r.t0=r.catch(8),r.abrupt("return",Zt.throwError("bad result from backend",P.Yd.errors.SERVER_ERROR,{method:"getTransactionCount",params:n,result:a,error:r.t0}));case 15:case"end":return r.stop()}}),r,this,[[8,12]])})))}},{key:"getCode",value:function(e,t){return Dt(this,void 0,void 0,(0,m.Z)().mark((function r(){var n,a;return(0,m.Z)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,this.getNetwork();case 2:return r.next=4,(0,_.mE)({address:this._getAddress(e),blockTag:this._getBlockTag(t)});case 4:return n=r.sent,r.next=7,this.perform("getCode",n);case 7:return a=r.sent,r.prev=8,r.abrupt("return",(0,x.Dv)(a));case 12:return r.prev=12,r.t0=r.catch(8),r.abrupt("return",Zt.throwError("bad result from backend",P.Yd.errors.SERVER_ERROR,{method:"getCode",params:n,result:a,error:r.t0}));case 15:case"end":return r.stop()}}),r,this,[[8,12]])})))}},{key:"getStorageAt",value:function(e,t,r){return Dt(this,void 0,void 0,(0,m.Z)().mark((function n(){var a,o;return(0,m.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,this.getNetwork();case 2:return n.next=4,(0,_.mE)({address:this._getAddress(e),blockTag:this._getBlockTag(r),position:Promise.resolve(t).then((function(e){return(0,x.$P)(e)}))});case 4:return a=n.sent,n.next=7,this.perform("getStorageAt",a);case 7:return o=n.sent,n.prev=8,n.abrupt("return",(0,x.Dv)(o));case 12:return n.prev=12,n.t0=n.catch(8),n.abrupt("return",Zt.throwError("bad result from backend",P.Yd.errors.SERVER_ERROR,{method:"getStorageAt",params:a,result:o,error:n.t0}));case 15:case"end":return n.stop()}}),n,this,[[8,12]])})))}},{key:"_wrapTransaction",value:function(e,t,r){var n=this;if(null!=t&&32!==(0,x.E1)(t))throw new Error("invalid response - sendTransaction");var a=e;return null!=t&&e.hash!==t&&Zt.throwError("Transaction hash mismatch from Provider.sendTransaction.",P.Yd.errors.UNKNOWN_ERROR,{expectedHash:e.hash,returnedHash:t}),a.wait=function(t,a){return Dt(n,void 0,void 0,(0,m.Z)().mark((function n(){var o,i;return(0,m.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return null==t&&(t=1),null==a&&(a=0),o=void 0,0!==t&&null!=r&&(o={data:e.data,from:e.from,nonce:e.nonce,to:e.to,value:e.value,startBlock:r}),n.next=6,this._waitForTransaction(e.hash,t,a,o);case 6:if(null!=(i=n.sent)||0!==t){n.next=9;break}return n.abrupt("return",null);case 9:return this._emitted["t:"+e.hash]=i.blockNumber,0===i.status&&Zt.throwError("transaction failed",P.Yd.errors.CALL_EXCEPTION,{transactionHash:e.hash,transaction:e,receipt:i}),n.abrupt("return",i);case 12:case"end":return n.stop()}}),n,this)})))},a}},{key:"sendTransaction",value:function(e){return Dt(this,void 0,void 0,(0,m.Z)().mark((function t(){var r,n,a,o;return(0,m.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getNetwork();case 2:return t.next=4,Promise.resolve(e).then((function(e){return(0,x.Dv)(e)}));case 4:return r=t.sent,null==(n=this.formatter.transaction(e)).confirmations&&(n.confirmations=0),t.next=9,this._getInternalBlockNumber(100+2*this.pollingInterval);case 9:return a=t.sent,t.prev=10,t.next=13,this.perform("sendTransaction",{signedTransaction:r});case 13:return o=t.sent,t.abrupt("return",this._wrapTransaction(n,o,a));case 17:throw t.prev=17,t.t0=t.catch(10),t.t0.transaction=n,t.t0.transactionHash=n.hash,t.t0;case 22:case"end":return t.stop()}}),t,this,[[10,17]])})))}},{key:"_getTransactionRequest",value:function(e){return Dt(this,void 0,void 0,(0,m.Z)().mark((function t(){var r,n,a=this;return(0,m.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e;case 2:return r=t.sent,n={},["from","to"].forEach((function(e){null!=r[e]&&(n[e]=Promise.resolve(r[e]).then((function(e){return e?a._getAddress(e):null})))})),["gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","value"].forEach((function(e){null!=r[e]&&(n[e]=Promise.resolve(r[e]).then((function(e){return e?E.O$.from(e):null})))})),["type"].forEach((function(e){null!=r[e]&&(n[e]=Promise.resolve(r[e]).then((function(e){return null!=e?e:null})))})),r.accessList&&(n.accessList=this.formatter.accessList(r.accessList)),["data"].forEach((function(e){null!=r[e]&&(n[e]=Promise.resolve(r[e]).then((function(e){return e?(0,x.Dv)(e):null})))})),t.t0=this.formatter,t.next=12,(0,_.mE)(n);case 12:return t.t1=t.sent,t.abrupt("return",t.t0.transactionRequest.call(t.t0,t.t1));case 14:case"end":return t.stop()}}),t,this)})))}},{key:"_getFilter",value:function(e){return Dt(this,void 0,void 0,(0,m.Z)().mark((function t(){var r,n=this;return(0,m.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e;case 2:return e=t.sent,r={},null!=e.address&&(r.address=this._getAddress(e.address)),["blockHash","topics"].forEach((function(t){null!=e[t]&&(r[t]=e[t])})),["fromBlock","toBlock"].forEach((function(t){null!=e[t]&&(r[t]=n._getBlockTag(e[t]))})),t.t0=this.formatter,t.next=10,(0,_.mE)(r);case 10:return t.t1=t.sent,t.abrupt("return",t.t0.filter.call(t.t0,t.t1));case 12:case"end":return t.stop()}}),t,this)})))}},{key:"_call",value:function(e,t,r){return Dt(this,void 0,void 0,(0,m.Z)().mark((function n(){var a,o,i,s,u,c,l,f,h,d,p,v,g,b,y;return(0,m.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return r>=10&&Zt.throwError("CCIP read exceeded maximum redirections",P.Yd.errors.SERVER_ERROR,{redirects:r,transaction:e}),a=e.to,n.next=4,this.perform("call",{transaction:e,blockTag:t});case 4:if(o=n.sent,!(r>=0&&"latest"===t&&null!=a&&"0x556f1830"===o.substring(0,10)&&(0,x.E1)(o)%32===4)){n.next=31;break}for(n.prev=6,i=(0,x.p3)(o,4),s=(0,x.p3)(i,0,32),E.O$.from(s).eq(a)||Zt.throwError("CCIP Read sender did not match",P.Yd.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:e,data:o}),u=[],c=E.O$.from((0,x.p3)(i,32,64)).toNumber(),l=E.O$.from((0,x.p3)(i,c,c+32)).toNumber(),f=(0,x.p3)(i,c+32),h=0;h<l;h++)null==(d=Vt(f,32*h))&&Zt.throwError("CCIP Read contained corrupt URL string",P.Yd.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:e,data:o}),u.push(d);return p=$t(i,64),E.O$.from((0,x.p3)(i,100,128)).isZero()||Zt.throwError("CCIP Read callback selector included junk",P.Yd.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:e,data:o}),v=(0,x.p3)(i,96,100),g=$t(i,128),n.next=21,this.ccipReadFetch(e,p,u);case 21:return null==(b=n.sent)&&Zt.throwError("CCIP Read disabled or provided no URLs",P.Yd.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:e,data:o}),y={to:a,data:(0,x.xs)([v,er([b,g])])},n.abrupt("return",this._call(y,t,r+1));case 27:if(n.prev=27,n.t0=n.catch(6),n.t0.code!==P.Yd.errors.SERVER_ERROR){n.next=31;break}throw n.t0;case 31:return n.prev=31,n.abrupt("return",(0,x.Dv)(o));case 35:return n.prev=35,n.t1=n.catch(31),n.abrupt("return",Zt.throwError("bad result from backend",P.Yd.errors.SERVER_ERROR,{method:"call",params:{transaction:e,blockTag:t},result:o,error:n.t1}));case 38:case"end":return n.stop()}}),n,this,[[6,27],[31,35]])})))}},{key:"call",value:function(e,t){return Dt(this,void 0,void 0,(0,m.Z)().mark((function r(){var n;return(0,m.Z)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,this.getNetwork();case 2:return r.next=4,(0,_.mE)({transaction:this._getTransactionRequest(e),blockTag:this._getBlockTag(t),ccipReadEnabled:Promise.resolve(e.cci
1pReadEnabled)});case 4:return n=r.sent,r.abrupt("return",this._call(n.transaction,n.blockTag,n.ccipReadEnabled?0:-1));case 6:case"end":return r.stop()}}),r,this)})))}},{key:"estimateGas",value:function(e){return Dt(this,void 0,void 0,(0,m.Z)().mark((function t(){var r,n;return(0,m.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getNetwork();case 2:return t.next=4,(0,_.mE)({transaction:this._getTransactionRequest(e)});case 4:return r=t.sent,t.next=7,this.perform("estimateGas",r);case 7:return n=t.sent,t.prev=8,t.abrupt("return",E.O$.from(n));case 12:return t.prev=12,t.t0=t.catch(8),t.abrupt("return",Zt.throwError("bad result from backend",P.Yd.errors.SERVER_ERROR,{method:"estimateGas",params:r,result:n,error:t.t0}));case 15:case"end":return t.stop()}}),t,this,[[8,12]])})))}},{key:"_getAddress",value:function(e){return Dt(this,void 0,void 0,(0,m.Z)().mark((function t(){var r;return(0,m.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e;case 2:return"string"!==typeof(e=t.sent)&&Zt.throwArgumentError("invalid address or ENS name","name",e),t.next=6,this.resolveName(e);case 6:return null==(r=t.sent)&&Zt.throwError("ENS name not configured",P.Yd.errors.UNSUPPORTED_OPERATION,{operation:"resolveName(".concat(JSON.stringify(e),")")}),t.abrupt("return",r);case 9:case"end":return t.stop()}}),t,this)})))}},{key:"_getBlock",value:function(e,t){return Dt(this,void 0,void 0,(0,m.Z)().mark((function r(){var n,a,o=this;return(0,m.Z)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,this.getNetwork();case 2:return r.next=4,e;case 4:if(e=r.sent,n=-128,a={includeTransactions:!!t},!(0,x.A7)(e,32)){r.next=11;break}a.blockHash=e,r.next=21;break;case 11:return r.prev=11,r.next=14,this._getBlockTag(e);case 14:a.blockTag=r.sent,(0,x.A7)(a.blockTag)&&(n=parseInt(a.blockTag.substring(2),16)),r.next=21;break;case 18:r.prev=18,r.t0=r.catch(11),Zt.throwArgumentError("invalid block hash or block tag","blockHashOrBlockTag",e);case 21:return r.abrupt("return",(0,Tt.$l)((function(){return Dt(o,void 0,void 0,(0,m.Z)().mark((function e(){var r,o,i,s,u,c,l=this;return(0,m.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.perform("getBlock",a);case 2:if(null!=(r=e.sent)){e.next=11;break}if(null==a.blockHash){e.next=7;break}if(null!=this._emitted["b:"+a.blockHash]){e.next=7;break}return e.abrupt("return",null);case 7:if(null==a.blockTag){e.next=10;break}if(!(n>this._emitted.block)){e.next=10;break}return e.abrupt("return",null);case 10:return e.abrupt("return",void 0);case 11:if(!t){e.next=34;break}o=null,i=0;case 14:if(!(i<r.transactions.length)){e.next=31;break}if(null!=(s=r.transactions[i]).blockNumber){e.next=20;break}s.confirmations=0,e.next=28;break;case 20:if(null!=s.confirmations){e.next=28;break}if(null!=o){e.next=25;break}return e.next=24,this._getInternalBlockNumber(100+2*this.pollingInterval);case 24:o=e.sent;case 25:(u=o-s.blockNumber+1)<=0&&(u=1),s.confirmations=u;case 28:i++,e.next=14;break;case 31:return(c=this.formatter.blockWithTransactions(r)).transactions=c.transactions.map((function(e){return l._wrapTransaction(e)})),e.abrupt("return",c);case 34:return e.abrupt("return",this.formatter.block(r));case 35:case"end":return e.stop()}}),e,this)})))}),{oncePoll:this}));case 22:case"end":return r.stop()}}),r,this,[[11,18]])})))}},{key:"getBlock",value:function(e){return this._getBlock(e,!1)}},{key:"getBlockWithTransactions",value:function(e){return this._getBlock(e,!0)}},{key:"getTransaction",value:function(e){return Dt(this,void 0,void 0,(0,m.Z)().mark((function t(){var r,n=this;return(0,m.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getNetwork();case 2:return t.next=4,e;case 4:return e=t.sent,r={transactionHash:this.formatter.hash(e,!0)},t.abrupt("return",(0,Tt.$l)((function(){return Dt(n,void 0,void 0,(0,m.Z)().mark((function t(){var n,a,o,i;return(0,m.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.perform("getTransaction",r);case 2:if(null!=(n=t.sent)){t.next=7;break}if(null!=this._emitted["t:"+e]){t.next=6;break}return t.abrupt("return",null);case 6:return t.abrupt("return",void 0);case 7:if(null!=(a=this.formatter.transactionResponse(n)).blockNumber){t.next=12;break}a.confirmations=0,t.next=19;break;
1case 12:if(null!=a.confirmations){t.next=19;break}return t.next=15,this._getInternalBlockNumber(100+2*this.pollingInterval);case 15:o=t.sent,(i=o-a.blockNumber+1)<=0&&(i=1),a.confirmations=i;case 19:return t.abrupt("return",this._wrapTransaction(a));case 20:case"end":return t.stop()}}),t,this)})))}),{oncePoll:this}));case 7:case"end":return t.stop()}}),t,this)})))}},{key:"getTransactionReceipt",value:function(e){return Dt(this,void 0,void 0,(0,m.Z)().mark((function t(){var r,n=this;return(0,m.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getNetwork();case 2:return t.next=4,e;case 4:return e=t.sent,r={transactionHash:this.formatter.hash(e,!0)},t.abrupt("return",(0,Tt.$l)((function(){return Dt(n,void 0,void 0,(0,m.Z)().mark((function t(){var n,a,o,i;return(0,m.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.perform("getTransactionReceipt",r);case 2:if(null!=(n=t.sent)){t.next=7;break}if(null!=this._emitted["t:"+e]){t.next=6;break}return t.abrupt("return",null);case 6:return t.abrupt("return",void 0);case 7:if(null!=n.blockHash){t.next=9;break}return t.abrupt("return",void 0);case 9:if(null!=(a=this.formatter.receipt(n)).blockNumber){t.next=14;break}a.confirmations=0,t.next=21;break;case 14:if(null!=a.confirmations){t.next=21;break}return t.next=17,this._getInternalBlockNumber(100+2*this.pollingInterval);case 17:o=t.sent,(i=o-a.blockNumber+1)<=0&&(i=1),a.confirmations=i;case 21:return t.abrupt("return",a);case 22:case"end":return t.stop()}}),t,this)})))}),{oncePoll:this}));case 7:case"end":return t.stop()}}),t,this)})))}},{key:"getLogs",value:function(e){return Dt(this,void 0,void 0,(0,m.Z)().mark((function t(){var r,n;return(0,m.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getNetwork();case 2:return t.next=4,(0,_.mE)({filter:this._getFilter(e)});case 4:return r=t.sent,t.next=7,this.perform("getLogs",r);case 7:return(n=t.sent).forEach((function(e){null==e.removed&&(e.removed=!1)})),t.abrupt("return",Ct.arrayOf(this.formatter.filterLog.bind(this.formatter))(n));case 10:case"end":return t.stop()}}),t,this)})))}},{key:"getEtherPrice",value:function(){return Dt(this,void 0,void 0,(0,m.Z)().mark((function e(){return(0,m.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getNetwork();case 2:return e.abrupt("return",this.perform("getEtherPrice",{}));case 3:case"end":return e.stop()}}),e,this)})))}},{key:"_getBlockTag",value:function(e){return Dt(this,void 0,void 0,(0,m.Z)().mark((function t(){var r;return(0,m.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e;case 2:if(!("number"===typeof(e=t.sent)&&e<0)){t.next=11;break}return e%1&&Zt.throwArgumentError("invalid BlockTag","blockTag",e),t.next=7,this._getInternalBlockNumber(100+2*this.pollingInterval);case 7:return r=t.sent,(r+=e)<0&&(r=0),t.abrupt("return",this.formatter.blockTag(r));case 11:return t.abrupt("return",this.formatter.blockTag(e));case 12:case"end":return t.stop()}}),t,this)})))}},{key:"getResolver",value:function(e){return Dt(this,void 0,void 0,(0,m.Z)().mark((function t(){var r,n,a;return(0,m.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=e;case 1:if(""!==r&&"."!==r){t.next=4;break}return t.abrupt("return",null);case 4:if("eth"===e||"eth"!==r){t.next=6;break}return t.abrupt("return",null);case 6:return t.next=8,this._getResolver(r,"getResolver");case 8:if(null==(n=t.sent)){t.next=19;break}if(a=new tr(this,n,e),t.t0=r!==e,!t.t0){t.next=16;break}return t.next=15,a.supportsWildcard();case 15:t.t0=!t.sent;case 16:if(!t.t0){t.next=18;break}return t.abrupt("return",null);case 18:return t.abrupt("return",a);case 19:r=r.split(".").slice(1).join("."),t.next=1;break;case 22:case"end":return t.stop()}}),t,this)})))}},{key:"_getResolver",value:function(e,t){return Dt(this,void 0,void 0,(0,m.Z)().mark((function r(){var n,a;return(0,m.Z)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return null==t&&(t="ENS"),r.next=3,this.getNetwork();case 3:return(n=r.sent).ensAddress||Zt.throwError("network does not support ENS",P.Yd.errors.UNSUPPORTED_OPERATION,{operation:t,network:n.name}),r.prev=5,r.next=8,this.call({to:n.ensAddress,data:"0x0178b8bf"+(0,_t.VM)(e).substring(2)});case 8:return a=r.sent,r.abrupt("return",this.formatter.callAddress(a));case 12:r.prev=12,r.t0=r.catch(5);case 14:return r.abrupt("return",null);case 15:case"end":return r.stop()}}),r,this,[[5,12]])})))}},{key:"resolveName",value:function(e){return Dt(this,void 0,void 0,(0,m.Z)().mark((function t(){var r;return(0,m.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e;case 2:return e=t.sent,t.prev=3,t.abrupt("return",Promise.resolve(this.formatter.address(e)));case 7:if(t.prev=7,t.t0=t.catch(3),!(0,x.A7)(e)){t.next=11;break}throw t.t0;case 11:return"string"!==typeof e&&Zt.throwArgumentError("invalid ENS name","name",e),t.next=14,this.getResolver(e);case 14:if(r=t.sent){t.next=17;break}return t.abrupt("return",null);case 17:return t.next=19,r.getAddress();case 19:return t.abrupt("return",t.sent);case 20:case"end":return t.stop()}}),t,this,[[3,7]])})))}},{key:"lookupAddress",value:function(e){return Dt(this,void 0,void 0,(0,m.Z)().mark((function t(){var r,n,a;return(0,m.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e;case 2:return e=t.sent,e=this.formatter.address(e),r=e.substring(2).toLowerCase()+".addr.reverse",t.next=7,this._getResolver(r,"lookupAddress");case 7:if(null!=(n=t.sent)){t.next=10;break}return t.abrupt("return",null);case 10:return t.t0=Vt,t.next=13,this.call({to:n,data:"0x691f3431"+(0,_t.VM)(r).substring(2)});case 13:return t.t1=t.sent,a=(0,t.t0)(t.t1,0),t.next=17,this.resolveName(a);case 17:if(t.sent==e){t.next=20;break}return t.abrupt("return",null);case 20:return t.abrupt("return",a);case 21:case"end":return t.stop()}}),t,this)})))}},{key:"getAvatar",value:function(e){return Dt(this,void 0,void 0,(0,m.Z)().mark((function t(){var r,n,a,o,i,s,u;return(0,m.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=null,!(0,x.A7)(e)){t.next=40;break}return n=this.formatter.address(e),a=n.substring(2).toLowerCase()+".addr.reverse",t.next=6,this._getResolver(a,"getAvatar");case 6:if(o=t.sent){t.next=9;break}return t.abrupt("return",null);case 9:return r=new tr(this,o,a),t.prev=10,t.next=13,r.getAvatar();case 13:if(!(i=t.sent)){t.next=16;break}return t.abrupt("return",i.url);case 16:t.next=22;break;case 18:if(t.prev=18,t.t0=t.catch(10),t.t0.code===P.Yd.errors.CALL_EXCEPTION){t.next=22;break}throw t.t0;case 22:return t.prev=22,t.t1=Vt,t.next=26,this.call({to:o,data:"0x691f3431"+(0,_t.VM)(a).substring(2)});case 26:return t.t2=t.sent,s=(0,t.t1)(t.t2,0),t.next=30,this.getResolver(s);case 30:r=t.sent,t.next=38;break;case 33:if(t.prev=33,t.t3=t.catch(22),t.t3.code===P.Yd.errors.CALL_EXCEPTION){t.next=37;break}throw t.t3;case 37:return t.abrupt("return",null);
1case 38:t.next=45;break;case 40:return t.next=42,this.getResolver(e);case 42:if(r=t.sent){t.next=45;break}return t.abrupt("return",null);case 45:return t.next=47,r.getAvatar();case 47:if(null!=(u=t.sent)){t.next=50;break}return t.abrupt("return",null);case 50:return t.abrupt("return",u.url);case 51:case"end":return t.stop()}}),t,this,[[10,18],[22,33]])})))}},{key:"perform",value:function(e,t){return Zt.throwError(e+" not implemented",P.Yd.errors.NOT_IMPLEMENTED,{operation:e})}},{key:"_startEvent",value:function(e){this.polling=this._events.filter((function(e){return e.pollable()})).length>0}},{key:"_stopEvent",value:function(e){this.polling=this._events.filter((function(e){return e.pollable()})).length>0}},{key:"_addEventListener",value:function(e,t,r){var n=new zt(Gt(e),t,r);return this._events.push(n),this._startEvent(n),this}},{key:"on",value:function(e,t){return this._addEventListener(e,t,!1)}},{key:"once",value:function(e,t){return this._addEventListener(e,t,!0)}},{key:"emit",value:function(e){for(var t=this,r=arguments.length,n=new Array(r>1?r-1:0),a=1;a<r;a++)n[a-1]=arguments[a];var o=!1,i=[],s=Gt(e);return this._events=this._events.filter((function(e){return e.tag!==s||(setTimeout((function(){e.listener.apply(t,n)}),0),o=!0,!e.once||(i.push(e),!1))})),i.forEach((function(e){t._stopEvent(e)})),o}},{key:"listenerCount",value:function(e){if(!e)return this._events.length;var t=Gt(e);return this._events.filter((function(e){return e.tag===t})).length}},{key:"listeners",value:function(e){if(null==e)return this._events.map((function(e){return e.listener}));var t=Gt(e);return this._events.filter((function(e){return e.tag===t})).map((function(e){return e.listener}))}},{key:"off",value:function(e,t){var r=this;if(null==t)return this.removeAllListeners(e);var n=[],a=!1,o=Gt(e);return this._events=this._events.filter((function(e){return e.tag!==o||e.listener!=t||(!!a||(a=!0,n.push(e),!1))})),n.forEach((function(e){r._stopEvent(e)})),this}},{key:"removeAllListeners",value:function(e){var t=this,r=[];if(null==e)r=this._events,this._events=[];else{var n=Gt(e);this._events=this._events.filter((function(e){return e.tag!==n||(r.push(e),!1)}))}return r.forEach((function(e){t._stopEvent(e)})),this}}],[{key:"getFormatter",value:function(){return null==rr&&(rr=new Ct),rr}},{key:"getNetwork",value:function(e){return(0,Et.H)(null==e?"homestead":e)}}]),r}(y.zt),or=r(82963),ir=function(e,t,r,n){return new(r||(r=Promise))((function(a,o){function i(e){try{u(n.next(e))}catch(t){o(t)}}function s(e){try{u(n.throw(e))}catch(t){o(t)}}function u(e){var t;e.done?a(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,s)}u((n=n.apply(e,t||[])).next())}))},sr=new P.Yd(Nt),ur=["call","estimateGas"];function cr(e,t){if(null==e)return null;if("string"===typeof e.message&&e.message.match("reverted")){var r=(0,x.A7)(e.data)?e.data:null;if(!t||r)return{message:e.message,data:r}}if("object"===typeof e){for(var n in e){var a=cr(e[n],t);if(a)return a}return null}if("string"===typeof e)try{return cr(JSON.parse(e),t)}catch(o){}return null}function lr(e,t,r){var n=r.transaction||r.signedTransaction;if("call"===e){var a=cr(t,!0);if(a)return a.data;sr.throwError("missing revert data in call exception; Transaction reverted without a reason string",P.Yd.errors.CALL_EXCEPTION,{data:"0x",transaction:n,error:t})}if("estimateGas"===e){var o=cr(t.body,!1);null==o&&(o=cr(t,!1)),o&&sr.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",P.Yd.errors.UNPREDICTABLE_GAS_LIMIT,{reason:o.message,method:e,transaction:n,error:t})}var i=t.message;throw t.code===P.Yd.errors.SERVER_ERROR&&t.error&&"string"===typeof t.error.message?i=t.error.message:"string"===typeof t.body?i=t.body:"string"===typeof t.responseText&&(i=t.responseText),(i=(i||"").toLowerCase()).match(/insufficient funds|base fee exceeds gas limit|InsufficientFunds/i)&&sr.throwError("insufficient funds for intrinsic transaction cost",P.Yd.errors.INSUFFICIENT_FUNDS,{error:t,method:e,transaction:n}),i.match(/nonce (is )?too low/i)&&sr.throwError("nonce has already been used",P.Yd.errors.NONCE_EXPIRED,{error:t,method:e,transaction:n}),i.match(/replacement transaction underpriced|transaction gas price.*too low/i)&&sr.throwError("replacement fee too low",P.Yd.errors.REPLACEMENT_UNDERPRICED,{error:t,method:e,transaction:n}),i.match(/only replay-protected/i)&&sr.throwError("legacy pre-eip-155 transactions not supported",P.Yd.errors.UNSUPPORTED_OPERATION,{error:t,method:e,transaction:n}),ur.indexOf(e)>=0&&i.match(/gas required exceeds allowance|always failing transaction|execution reverted|revert/)&&sr.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",P.Yd.errors.UNPREDICTABLE_GAS_LIMIT,{error:t,method:e,transaction:n}),t}function fr(e){return new Promise((function(t){setTimeout(t,e)}))}function hr(e){if(e.error){var t=new Error(e.error.message);throw t.code=e.error.code,t.data=e.error.data,t}return e.result}function dr(e){return e?e.toLowerCase():e}var pr={},vr=function(e){(0,h.Z)(r,e);var t=(0,d.Z)(r);function r(e,n,a){var o;if((0,p.Z)(this,r),o=t.call(this),e!==pr)throw new Error("do not call the JsonRpcSigner constructor directly; use provider.getSigner");return(0,_.zG)((0,c.Z)(o),"provider",n),null==a&&(a=0),"string"===typeof a?((0,_.zG)((0,c.Z)(o),"_address",o.provider.formatter.address(a)),(0,_.zG)((0,c.Z)(o),"_index",null)):"number"===typeof a?((0,_.zG)((0,c.Z)(o),"_index",a),(0,_.zG)((0,c.Z)(o),"_address",null)):sr.throwArgumentError("invalid address or index","addressOrIndex",a),o}
1return(0,v.Z)(r,[{key:"connect",value:function(e){return sr.throwError("cannot alter JSON-RPC Signer connection",P.Yd.errors.UNSUPPORTED_OPERATION,{operation:"connect"})}},{key:"connectUnchecked",value:function(){return new mr(pr,this.provider,this._address||this._index)}},{key:"getAddress",value:function(){var e=this;return this._address?Promise.resolve(this._address):this.provider.send("eth_accounts",[]).then((function(t){return t.length<=e._index&&sr.throwError("unknown account #"+e._index,P.Yd.errors.UNSUPPORTED_OPERATION,{operation:"getAddress"}),e.provider.formatter.address(t[e._index])}))}},{key:"sendUncheckedTransaction",value:function(e){var t=this;e=(0,_.DC)(e);var r=this.getAddress().then((function(e){return e&&(e=e.toLowerCase()),e}));if(null==e.gasLimit){var n=(0,_.DC)(e);n.from=r,e.gasLimit=this.provider.estimateGas(n)}return null!=e.to&&(e.to=Promise.resolve(e.to).then((function(e){return ir(t,void 0,void 0,(0,m.Z)().mark((function t(){var r;return(0,m.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(null!=e){t.next=2;break}return t.abrupt("return",null);case 2:return t.next=4,this.provider.resolveName(e);case 4:return null==(r=t.sent)&&sr.throwArgumentError("provided ENS name resolves to null","tx.to",e),t.abrupt("return",r);case 7:case"end":return t.stop()}}),t,this)})))}))),(0,_.mE)({tx:(0,_.mE)(e),sender:r}).then((function(r){var n=r.tx,a=r.sender;null!=n.from?n.from.toLowerCase()!==a&&sr.throwArgumentError("from address mismatch","transaction",e):n.from=a;var o=t.provider.constructor.hexlifyTransaction(n,{from:!0});return t.provider.send("eth_sendTransaction",[o]).then((function(e){return e}),(function(e){return"string"===typeof e.message&&e.message.match(/user denied/i)&&sr.throwError("user rejected transaction",P.Yd.errors.ACTION_REJECTED,{action:"sendTransaction",transaction:n}),lr("sendTransaction",e,o)}))}))}},{key:"signTransaction",value:function(e){return sr.throwError("signing transactions is unsupported",P.Yd.errors.UNSUPPORTED_OPERATION,{operation:"signTransaction"})}},{key:"sendTransaction",value:function(e){return ir(this,void 0,void 0,(0,m.Z)().mark((function t(){var r,n,a=this;return(0,m.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.provider._getInternalBlockNumber(100+2*this.provider.pollingInterval);case 2:return r=t.sent,t.next=5,this.sendUncheckedTransaction(e);case 5:return n=t.sent,t.prev=6,t.next=9,(0,Tt.$l)((function(){return ir(a,void 0,void 0,(0,m.Z)().mark((function e(){var t;return(0,m.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.provider.getTransaction(n);case 2:if(null!==(t=e.sent)){e.next=5;break}return e.abrupt("return",void 0);case 5:return e.abrupt("return",this.provider._wrapTransaction(t,n,r));case 6:case"end":return e.stop()}}),e,this)})))}),{oncePoll:this.provider});case 9:return t.abrupt("return",t.sent);case 12:throw t.prev=12,t.t0=t.catch(6),t.t0.transactionHash=n,t.t0;case 16:case"end":return t.stop()}}),t,this,[[6,12]])})))}},{key:"signMessage",value:function(e){return ir(this,void 0,void 0,(0,m.Z)().mark((function t(){var r,n;return(0,m.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r="string"===typeof e?(0,oe.Y0)(e):e,t.next=3,this.getAddress();case 3:return n=t.sent,t.prev=4,t.next=7,this.provider.send("personal_sign",[(0,x.Dv)(r),n.toLowerCase()]);case 7:return t.abrupt("return",t.sent);case 10:throw t.prev=10,t.t0=t.catch(4),"string"===typeof t.t0.message&&t.t0.message.match(/user denied/i)&&sr.throwError("user rejected signing",P.Yd.errors.ACTION_REJECTED,{action:"signMessage",from:n,messageData:e}),t.t0;case 14:case"end":return t.stop()}}),t,this,[[4,10]])})))}},{key:"_legacySignMessage",value:function(e){return ir(this,void 0,void 0,(0,m.Z)().mark((function t(){var r,n;return(0,m.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r="string"===typeof e?(0,oe.Y0)(e):e,t.next=3,this.getAddress();case 3:return n=t.sent,t.prev=4,t.next=7,this.provider.send("eth_sign",[n.toLowerCase(),(0,x.Dv)(r)]);case 7:return t.abrupt("return",t.sent);case 10:throw t.prev=10,t.t0=t.catch(4),"string"===typeof t.t0.message&&t.t0.message.match(/user denied/i)&&sr.throwError("user rejected signing",P.Yd.errors.ACTION_REJECTED,{action:"_legacySignMessage",from:n,messageData:e}),t.t0;case 14:case"end":return t.stop()}}),t,this,[[4,10]])})))}},{key:"_signTypedData",value:function(e,t,r){return ir(this,void 0,void 0,(0,m.Z)().mark((function n(){var a,o,i=this;return(0,m.Z)().wrap((function(n){for(;;
1)switch(n.prev=n.next){case 0:return n.next=2,ue.E.resolveNames(e,t,r,(function(e){return i.provider.resolveName(e)}));case 2:return a=n.sent,n.next=5,this.getAddress();case 5:return o=n.sent,n.prev=6,n.next=9,this.provider.send("eth_signTypedData_v4",[o.toLowerCase(),JSON.stringify(ue.E.getPayload(a.domain,t,a.value))]);case 9:return n.abrupt("return",n.sent);case 12:throw n.prev=12,n.t0=n.catch(6),"string"===typeof n.t0.message&&n.t0.message.match(/user denied/i)&&sr.throwError("user rejected signing",P.Yd.errors.ACTION_REJECTED,{action:"_signTypedData",from:o,messageData:{domain:a.domain,types:t,value:a.value}}),n.t0;case 16:case"end":return n.stop()}}),n,this,[[6,12]])})))}},{key:"unlock",value:function(e){return ir(this,void 0,void 0,(0,m.Z)().mark((function t(){var r,n;return(0,m.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=this.provider,t.next=3,this.getAddress();case 3:return n=t.sent,t.abrupt("return",r.send("personal_unlockAccount",[n.toLowerCase(),e,null]));case 5:case"end":return t.stop()}}),t,this)})))}}]),r}(k.E),mr=function(e){(0,h.Z)(r,e);var t=(0,d.Z)(r);function r(){return(0,p.Z)(this,r),t.apply(this,arguments)}return(0,v.Z)(r,[{key:"sendTransaction",value:function(e){var t=this;return this.sendUncheckedTransaction(e).then((function(e){return{hash:e,nonce:null,gasLimit:null,gasPrice:null,data:null,value:null,chainId:null,confirmations:0,from:null,wait:function(r){return t.provider.waitForTransaction(e,r)}}}))}}]),r}(vr),gr={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0},br=function(e){(0,h.Z)(r,e);var t=(0,d.Z)(r);function r(e,n){var a;(0,p.Z)(this,r);var o=n;return null==o&&(o=new Promise((function(e,t){setTimeout((function(){a.detectNetwork().then((function(t){e(t)}),(function(e){t(e)}))}),0)}))),a=t.call(this,o),e||(e=(0,_.tu)(a.constructor,"defaultUrl")()),"string"===typeof e?(0,_.zG)((0,c.Z)(a),"connection",Object.freeze({url:e})):(0,_.zG)((0,c.Z)(a),"connection",Object.freeze((0,_.DC)(e))),a._nextId=42,a}return(0,v.Z)(r,[{key:"_cache",get:function(){return null==this._eventLoopCache&&(this._eventLoopCache={}),this._eventLoopCache}},{key:"detectNetwork",value:function(){var e=this;return this._cache.detectNetwork||(this._cache.detectNetwork=this._uncachedDetectNetwork(),setTimeout((function(){e._cache.detectNetwork=null}),0)),this._cache.detectNetwork}},{key:"_uncachedDetectNetwork",value:function(){return ir(this,void 0,void 0,(0,m.Z)().mark((function e(){var t,r;return(0,m.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fr(0);case 2:return t=null,e.prev=3,e.next=6,this.send("eth_chainId",[]);case 6:t=e.sent,e.next=19;break;case 9:return e.prev=9,e.t0=e.catch(3),e.prev=11,e.next=14,this.send("net_version",[]);case 14:t=e.sent,e.next=19;break;case 17:e.prev=17,e.t1=e.catch(11);case 19:if(null==t){e.next=28;break}return r=(0,_.tu)(this.constructor,"getNetwork"),e.prev=21,e.abrupt("return",r(E.O$.from(t).toNumber()));case 25:return e.prev=25,e.t2=e.catch(21),e.abrupt("return",sr.throwError("could not detect network",P.Yd.errors.NETWORK_ERROR,{chainId:t,event:"invalidNetwork",serverError:e.t2}));case 28:return e.abrupt("return",sr.throwError("could not detect network",P.Yd.errors.NETWORK_ERROR,{event:"noNetwork"}));case 29:case"end":return e.stop()}}),e,this,[[3,9],[11,17],[21,25]])})))}},{key:"getSigner",value:function(e){return new vr(pr,this,e)}},{key:"getUncheckedSigner",value:function(e){return this.getSigner(e).connectUnchecked()}},{key:"listAccounts",value:function(){var e=this;return this.send("eth_accounts",[]).then((function(t){return t.map((function(t){return e.formatter.address(t)}))}))}},{key:"send",value:function(e,t){var r=this,n={method:e,params:t,id:this._nextId++,jsonrpc:"2.0"};this.emit("debug",{action:"request",request:(0,_.p$)(n),provider:this});var a=["eth_chainId","eth_blockNumber"].indexOf(e)>=0;if(a&&this._cache[e])return this._cache[e];var o=(0,Tt.rd)(this.connection,JSON.stringify(n),hr).then((function(e){return r.emit("debug",{action:"response",request:n,response:e,provider:r}),e}),(function(e){throw r.emit("debug",{action:"response",error:e,request:n,provider:r}),e}));return a&&(this._cache[e]=o,setTimeout((function(){r._cache[e]=null}),0)),o}},{key:"prepareRequest",value:function(e,t){switch(e){case"getBlockNumber":return["eth_blockNumber",[]];case"getGasPrice":return["eth_gasPrice",[]];case"getBalance":return["eth_getBalance",[dr(t.address),t.blockTag]];case"getTransactionCount":return["eth_getTransactionCount",[dr(t.address),t.blockTag]];case"getCode":return["eth_getCode",[dr(t.address),t.blockTag]];case"getStorageAt":return["eth_getStorageAt",[dr(t.address),(0,x.$m)(t.position,32),t.blockTag]];case"sendTransaction":return["eth_sendRawTransaction",[t.signedTransaction]];case"getBlock":return t.blockTag?["eth_getBlockByNumber",[t.blockTag,!!t.includeTransactions]]:t.blockHash?["eth_getBlockByHash",[t.blockHash,!!t.includeTransactions]]:null;case"getTransaction":return["eth_getTransactionByHash",[t.transactionHash]];case"getTransactionReceipt":return["eth_getTransactionReceipt",[t.transactionHash]];case"call":return["eth_call",[(0,_.tu)(this.constructor,"hexlifyTransaction")(t.transaction,{from:!0}),t.blockTag]];case"estimateGas":return["eth_estimateGas",[(0,_.tu)(this.constructor,"hexlifyTransaction")(t.transaction,{from:!0})]];case"getLogs":return t.filter&&null!=t.filter.address&&(t.filter.address=dr(t.filter.address)),["eth_getLogs",[t.filter]]}return null}},{key:"perform",value:function(e,t){return ir(this,void 0,void 0,(0,m.Z)().mark((function r(){var n,a,o;return(0,m.Z)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if("call"!==e&&"estimateGas"!==e){r.next=8;break}if(!(n=t.transaction)||null==n.type||!E.O$.from(n.type).isZero()){r.next=8;break}if(null!=n.maxFeePerGas||null!=n.maxPriorityFeePerGas){r.next=8;break}return r.next=6,this.getFeeData();case 6:null==(a=r.sent).maxFeePerGas&&null==a.maxPriorityFeePerGas&&((t=(0,_.DC)(t)).transaction=(0,_.DC)(n),delete t.transaction.type);case 8:return null==(o=this.prepareRequest(e,t))&&sr.throwError(e+" not implemented",P.Yd.errors.NOT_IMPLEMENT
1ED,{operation:e}),r.prev=10,r.next=13,this.send(o[0],o[1]);case 13:return r.abrupt("return",r.sent);case 16:return r.prev=16,r.t0=r.catch(10),r.abrupt("return",lr(e,r.t0,t));case 19:case"end":return r.stop()}}),r,this,[[10,16]])})))}},{key:"_startEvent",value:function(e){"pending"===e.tag&&this._startPending(),(0,l.Z)((0,f.Z)(r.prototype),"_startEvent",this).call(this,e)}},{key:"_startPending",value:function(){if(null==this._pendingFilter){var e=this,t=this.send("eth_newPendingTransactionFilter",[]);this._pendingFilter=t,t.then((function(r){return function n(){e.send("eth_getFilterChanges",[r]).then((function(r){if(e._pendingFilter!=t)return null;var n=Promise.resolve();return r.forEach((function(t){e._emitted["t:"+t.toLowerCase()]="pending",n=n.then((function(){return e.getTransaction(t).then((function(t){return e.emit("pending",t),null}))}))})),n.then((function(){return fr(1e3)}))})).then((function(){if(e._pendingFilter==t)return setTimeout((function(){n()}),0),null;e.send("eth_uninstallFilter",[r])})).catch((function(e){}))}(),r})).catch((function(e){}))}}},{key:"_stopEvent",value:function(e){"pending"===e.tag&&0===this.listenerCount("pending")&&(this._pendingFilter=null),(0,l.Z)((0,f.Z)(r.prototype),"_stopEvent",this).call(this,e)}}],[{key:"defaultUrl",value:function(){return"http://localhost:8545"}},{key:"hexlifyTransaction",value:function(e,t){var r=(0,_.DC)(gr);if(t)for(var n in t)t[n]&&(r[n]=!0);(0,_.uj)(e,r);var a={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach((function(t){if(null!=e[t]){var r=(0,x.$P)(E.O$.from(e[t]));"gasLimit"===t&&(t="gas"),a[t]=r}})),["from","to","data"].forEach((function(t){null!=e[t]&&(a[t]=(0,x.Dv)(e[t]))})),e.accessList&&(a.accessList=(0,T.z7)(e.accessList)),a}}]),r}(ar),yr=null;try{if(null==(yr=WebSocket))throw new Error("inject please")}catch(ca){var kr=new P.Yd(Nt);yr=function(){kr.throwError("WebSockets not supported in this environment",P.Yd.errors.UNSUPPORTED_OPERATION,{operation:"new WebSocket()"})}}var wr=function(e,t,r,n){return new(r||(r=Promise))((function(a,o){function i(e){try{u(n.next(e))}catch(t){o(t)}}function s(e){try{u(n.throw(e))}catch(t){o(t)}}function u(e){var t;e.done?a(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,s)}u((n=n.apply(e,t||[])).next())}))},Er=new P.Yd(Nt),xr=1,_r=function(e){(0,h.Z)(r,e);var t=(0,d.Z)(r);function r(e,n){var a,o;(0,p.Z)(this,r),"any"===n&&Er.throwError("WebSocketProvider does not support 'any' network yet",P.Yd.errors.UNSUPPORTED_OPERATION,{operation:"network:any"}),(o="string"===typeof e?t.call(this,e,n):t.call(this,"_websocket",n))._pollingInterval=-1,o._wsReady=!1,"string"===typeof e?(0,_.zG)((0,c.Z)(o),"_websocket",new yr(o.connection.url)):(0,_.zG)((0,c.Z)(o),"_websocket",e),(0,_.zG)((0,c.Z)(o),"_requests",{}),(0,_.zG)((0,c.Z)(o),"_subs",{}),(0,_.zG)((0,c.Z)(o),"_subIds",{}),(0,_.zG)((0,c.Z)(o),"_detectNetwork",(0,l.Z)((a=(0,c.Z)(o),(0,f.Z)(r.prototype)),"detectNetwork",a).call(a)),o.websocket.onopen=function(){o._wsReady=!0,Object.keys(o._requests).forEach((function(e){o.websocket.send(o._requests[e].payload)}))},o.websocket.onmessage=function(e){var t=e.data,r=JSON.parse(t);if(null!=r.id){var n=String(r.id),a=o._requests[n];if(delete o._requests[n],void 0!==r.result)a.callback(null,r.result),o.emit("debug",{action:"response",request:JSON.parse(a.payload),response:r.result,provider:(0,c.Z)(o)});else{var i=null;r.error?(i=new Error(r.error.message||"unknown error"),(0,_.zG)(i,"code",r.error.code||null),(0,_.zG)(i,"response",t)):i=new Error("unknown error"),a.callback(i,void 0),o.emit("debug",{action:"response",error:i,request:JSON.parse(a.payload),provider:(0,c.Z)(o)})}}else if("eth_subscription"===r.method){var s=o._subs[r.params.subscription];s&&s.processFunc(r.params.result)}else console.warn("this should not happen")};var i=setInterval((function(){o.emit("poll")}),1e3);return i.unref&&i.unref(),(0,or.Z)(o)}return(0,v.Z)(r,[{key:"websocket",get:function(){return this._websocket}},{key:"detectNetwork",value:function(){return this._detectNetwork}},{key:"pollingInterval",get:function(){return 0},set:function(e){Er.throwError("cannot set polling interval on WebSocketProvider",P.Yd.errors.UNSUPPORTED_OPERATION,{operation:"setPollingInterval"})}},{key:"resetEventsBlock",value:function(e){Er.throwError("cannot reset events block on WebSocketProvider",P.Yd.errors.UNSUPPORTED_OPERATION,{operation:"resetEventBlock"})}},{key:"poll",value:function(){return wr(this,void 0,void 0,(0,m.Z)().mark((function e(){return(0,m.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",null);case 1:case"end":return e.stop()}}),e)})))}},{key:"polling",set:function(e){e&&Er.throwError("cannot set polling on WebSocketProvider",P.Yd.errors.UNSUPPORTED_OPERATION,{operation:"setPolling"})}},{key:"send",value:function(e,t){var r=this,n=xr++;return new Promise((function(a,o){var i=JSON.stringify({method:e,params:t,id:n,jsonrpc:"2.0"});r.emit("debug",{action:"request",request:JSON.parse(i),provider:r}),r._requests[String(n)]={callback:function(e,t){return e?o(e):a(t)},payload:i},r._wsReady&&r.websocket.send(i)}))}},{key:"_subscribe",value:function(e,t,r){return wr(this,void 0,void 0,(0,m.Z)().mark((function n(){var a,o,i=this;return(0,m.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return null==(a=this._subIds[e])&&(a=Promise.all(t).then((function(e){return i.send("eth_subscribe",e)})),this._subIds[e]=a),n.next=4,a;
1case 4:o=n.sent,this._subs[o]={tag:e,processFunc:r};case 6:case"end":return n.stop()}}),n,this)})))}},{key:"_startEvent",value:function(e){var t=this;switch(e.type){case"block":this._subscribe("block",["newHeads"],(function(e){var r=E.O$.from(e.number).toNumber();t._emitted.block=r,t.emit("block",r)}));break;case"pending":this._subscribe("pending",["newPendingTransactions"],(function(e){t.emit("pending",e)}));break;case"filter":this._subscribe(e.tag,["logs",this._getFilter(e.filter)],(function(r){null==r.removed&&(r.removed=!1),t.emit(e.filter,t.formatter.filterLog(r))}));break;case"tx":var r=function(e){var r=e.hash;t.getTransactionReceipt(r).then((function(e){e&&t.emit(r,e)}))};r(e),this._subscribe("tx",["newHeads"],(function(e){t._events.filter((function(e){return"tx"===e.type})).forEach(r)}));break;case"debug":case"poll":case"willPoll":case"didPoll":case"error":break;default:console.log("unhandled:",e)}}},{key:"_stopEvent",value:function(e){var t=this,r=e.tag;if("tx"===e.type){if(this._events.filter((function(e){return"tx"===e.type})).length)return;r="tx"}else if(this.listenerCount(e.event))return;var n=this._subIds[r];n&&(delete this._subIds[r],n.then((function(e){t._subs[e]&&(delete t._subs[e],t.send("eth_unsubscribe",[e]))})))}},{key:"destroy",value:function(){return wr(this,void 0,void 0,(0,m.Z)().mark((function e(){var t=this;return(0,m.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.websocket.readyState!==yr.CONNECTING){e.next=3;break}return e.next=3,new Promise((function(e){t.websocket.onopen=function(){e(!0)},t.websocket.onerror=function(){e(!1)}}));case 3:this.websocket.close(1e3);case 4:case"end":return e.stop()}}),e,this)})))}}],[{key:"defaultUrl",value:function(){return"ws://localhost:8546"}}]),r}(br),Tr=function(e,t,r,n){return new(r||(r=Promise))((function(a,o){function i(e){try{u(n.next(e))}catch(t){o(t)}}function s(e){try{u(n.throw(e))}catch(t){o(t)}}function u(e){var t;e.done?a(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,s)}u((n=n.apply(e,t||[])).next())}))},Pr=new P.Yd(Nt),Ar=function(e){(0,h.Z)(r,e);var t=(0,d.Z)(r);function r(){return(0,p.Z)(this,r),t.apply(this,arguments)}return(0,v.Z)(r,[{key:"detectNetwork",value:function(){var e=this,t=Object.create(null,{detectNetwork:{get:function(){return(0,l.Z)((0,f.Z)(r.prototype),"detectNetwork",e)}}});return Tr(this,void 0,void 0,(0,m.Z)().mark((function e(){var r;return(0,m.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null!=(r=this.network)){e.next=7;break}return e.next=4,t.detectNetwork.call(this);case 4:(r=e.sent)||Pr.throwError("no network detected",P.Yd.errors.UNKNOWN_ERROR,{}),null==this._network&&((0,_.zG)(this,"_network",r),this.emit("network",r,null));case 7:return e.abrupt("return",r);case 8:case"end":return e.stop()}}),e,this)})))}}]),r}(br),Nr=function(e){(0,h.Z)(r,e);var t=(0,d.Z)(r);function r(e,n){var a;(0,p.Z)(this,r),Pr.checkAbstract(this instanceof r?this.constructor:void 0,r),e=(0,_.tu)(this instanceof r?this.constructor:void 0,"getNetwork")(e),n=(0,_.tu)(this instanceof r?this.constructor:void 0,"getApiKey")(n);var o=(0,_.tu)(this instanceof r?this.constructor:void 0,"getUrl")(e,n);return a=t.call(this,o,e),"string"===typeof n?(0,_.zG)((0,c.Z)(a),"apiKey",n):null!=n&&Object.keys(n).forEach((function(e){(0,_.zG)((0,c.Z)(a),e,n[e])})),a}return(0,v.Z)(r,[{key:"_startPending",value:function(){Pr.warn("WARNING: API provider does not support pending filters")}},{key:"isCommunityResource",value:function(){return!1}},{key:"getSigner",value:function(e){return Pr.throwError("API provider does not support signing",P.Yd.errors.UNSUPPORTED_OPERATION,{operation:"getSigner"})}},{key:"listAccounts",value:function(){return Promise.resolve([])}}],[{key:"getApiKey",value:function(e){return e}},{key:"getUrl",value:function(e,t){return Pr.throwError("not implemented; sub-classes must override getUrl",P.Yd.errors.NOT_IMPLEMENTED,{operation:"getUrl"})}}]),r}(Ar),Sr=new P.Yd(Nt),Cr="_gg7wSSi0KMBsdKnGVfHDueq6xMB9EkC",Rr=function(e){(0,h.Z)(r,e);var t=(0,d.Z)(r);function r(e,n){var a;(0,p.Z)(this,r);var o=new Or(e,n),i=o.connection.url.replace(/^http/i,"ws").replace(".alchemyapi.",".ws.alchemyapi.");return a=t.call(this,i,o.network),(0,_.zG)((0,c.Z)(a),"apiKey",o.apiKey),a}return(0,v.Z)(r,[{key:"isCommunityResource",value:function(){return this.apiKey===Cr}}]),r}(_r),Or=function(e){(0,h.Z)(r,e);var t=(0,d.Z)(r);function r(){return(0,p.Z)(this,r),t.apply(this,arguments)}return(0,v.Z)(r,[{key:"isCommunityResource",value:function(){return this.apiKey===Cr}}],[{key:"getWebSocketProvider",value:function(e,t){return new Rr(e,t)}},{key:"getApiKey",value:function(e){return null==e?Cr:(e&&"string"!==typeof e&&Sr.throwArgumentError("invalid apiKey","apiKey",e),e)}},{key:"getUrl",value:function(e,t){var r=null;switch(e.name){case"homestead":r="eth-mainnet.alchemyapi.io/v2/";break;case"goerli":r="eth-goerli.g.alchemy.com/v2/";break;case"matic":r="polygon-mainnet.g.alchemy.com/v2/";break;case"maticmum":r="polygon-mumbai.g.alchemy.com/v2/";break;case"arbitrum":r="arb-mainnet.g.alchemy.com/v2/";break;
1case"arbitrum-goerli":r="arb-goerli.g.alchemy.com/v2/";break;case"optimism":r="opt-mainnet.g.alchemy.com/v2/";break;case"optimism-goerli":r="opt-goerli.g.alchemy.com/v2/";break;default:Sr.throwArgumentError("unsupported network","network",arguments[0])}return{allowGzip:!0,url:"https://"+r+t,throttleCallback:function(e,r){return t===Cr&&It(),Promise.resolve(!0)}}}}]),r}(Nr),Br=new P.Yd(Nt),Ir="9f7d929b018cdffb338517efa06f58359e86ff1ffd350bc889738523659e7972";function Dr(e){switch(e){case"homestead":return"rpc.ankr.com/eth/";case"ropsten":return"rpc.ankr.com/eth_ropsten/";case"rinkeby":return"rpc.ankr.com/eth_rinkeby/";case"goerli":return"rpc.ankr.com/eth_goerli/";case"matic":return"rpc.ankr.com/polygon/";case"arbitrum":return"rpc.ankr.com/arbitrum/"}return Br.throwArgumentError("unsupported network","name",e)}var Zr=function(e){(0,h.Z)(r,e);var t=(0,d.Z)(r);function r(){return(0,p.Z)(this,r),t.apply(this,arguments)}return(0,v.Z)(r,[{key:"isCommunityResource",value:function(){return this.apiKey===Ir}}],[{key:"getApiKey",value:function(e){return null==e?Ir:e}},{key:"getUrl",value:function(e,t){null==t&&(t=Ir);var r={allowGzip:!0,url:"https://"+Dr(e.name)+t,throttleCallback:function(e,r){return t.apiKey===Ir&&It(),Promise.resolve(!0)}};return null!=t.projectSecret&&(r.user="",r.password=t.projectSecret),r}}]),r}(Nr),Lr=function(e,t,r,n){return new(r||(r=Promise))((function(a,o){function i(e){try{u(n.next(e))}catch(t){o(t)}}function s(e){try{u(n.throw(e))}catch(t){o(t)}}function u(e){var t;e.done?a(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,s)}u((n=n.apply(e,t||[])).next())}))},Fr=new P.Yd(Nt),Gr=function(e){(0,h.Z)(r,e);var t=(0,d.Z)(r);function r(){return(0,p.Z)(this,r),t.apply(this,arguments)}return(0,v.Z)(r,[{key:"perform",value:function(e,t){var n=this,a=Object.create(null,{perform:{get:function(){return(0,l.Z)((0,f.Z)(r.prototype),"perform",n)}}});return Lr(this,void 0,void 0,(0,m.Z)().mark((function r(){var n;return(0,m.Z)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if("getBlockNumber"!==e){r.next=5;break}return r.next=3,a.perform.call(this,"getBlock",{blockTag:"latest"});case 3:return n=r.sent,r.abrupt("return",n.number);case 5:return r.abrupt("return",a.perform.call(this,e,t));case 6:case"end":return r.stop()}}),r,this)})))}}],[{key:"getApiKey",value:function(e){return null!=e&&Fr.throwArgumentError("apiKey not supported for cloudflare","apiKey",e),null}},{key:"getUrl",value:function(e,t){var r=null;if("homestead"===e.name)r="https://cloudflare-eth.com/";else Fr.throwArgumentError("unsupported network","network",arguments[0]);return r}}]),r}(Nr),Ur=function(e,t,r,n){return new(r||(r=Promise))((function(a,o){function i(e){try{u(n.next(e))}catch(t){o(t)}}function s(e){try{u(n.throw(e))}catch(t){o(t)}}function u(e){var t;e.done?a(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,s)}u((n=n.apply(e,t||[])).next())}))},Mr=new P.Yd(Nt);function jr(e){var t={};for(var r in e)if(null!=e[r]){var n=e[r];"type"===r&&0===n||(n={type:!0,gasLimit:!0,gasPrice:!0,maxFeePerGs:!0,maxPriorityFeePerGas:!0,nonce:!0,value:!0}[r]?(0,x.$P)((0,x.Dv)(n)):"accessList"===r?"["+(0,T.z7)(n).map((function(e){return'{address:"'.concat(e.address,'",storageKeys:["').concat(e.storageKeys.join('","'),'"]}')})).join(",")+"]":(0,x.Dv)(n),t[r]=n)}return t}function zr(e){if(0==e.status&&("No records found"===e.message||"No transactions found"===e.message))return e.result;if(1!=e.status||"string"!==typeof e.message||!e.message.match(/^OK/)){var t=new Error("invalid response");throw t.result=JSON.stringify(e),(e.result||"").toLowerCase().indexOf("rate limit")>=0&&(t.throttleRetry=!0),t}return e.result}function Kr(e){if(e&&0==e.status&&"NOTOK"==e.message&&(e.result||"").toLowerCase().indexOf("rate limit")>=0){var t=new Error("throttled response");throw t.result=JSON.stringify(e),t.throttleRetry=!0,t}if("2.0"!=e.jsonrpc){var r=new Error("invalid response");throw r.result=JSON.stringify(e),r}if(e.error){var n=new Error(e.error.message||"unknown error");throw e.error.code&&(n.code=e.error.code),e.error.data&&(n.data=e.error.data),n}return e.result}function Hr(e){if("pending"===e)throw new Error("pending not supported");return"latest"===e?e:parseInt(e.substring(2),16)}function Yr(e,t,r){if("call"===e&&t.code===P.Yd.errors.SERVER_ERROR){var n=t.error;if(n&&(n.message.match(/reverted/i)||n.message.match(/VM execution error/i))){var a=n.data;
1if(a&&(a="0x"+a.replace(/^.*0x/i,"")),(0,x.A7)(a))return a;Mr.throwError("missing revert data in call exception",P.Yd.errors.CALL_EXCEPTION,{error:t,data:"0x"})}}var o=t.message;throw t.code===P.Yd.errors.SERVER_ERROR&&(t.error&&"string"===typeof t.error.message?o=t.error.message:"string"===typeof t.body?o=t.body:"string"===typeof t.responseText&&(o=t.responseText)),(o=(o||"").toLowerCase()).match(/insufficient funds/)&&Mr.throwError("insufficient funds for intrinsic transaction cost",P.Yd.errors.INSUFFICIENT_FUNDS,{error:t,method:e,transaction:r}),o.match(/same hash was already imported|transaction nonce is too low|nonce too low/)&&Mr.throwError("nonce has already been used",P.Yd.errors.NONCE_EXPIRED,{error:t,method:e,transaction:r}),o.match(/another transaction with same nonce/)&&Mr.throwError("replacement fee too low",P.Yd.errors.REPLACEMENT_UNDERPRICED,{error:t,method:e,transaction:r}),o.match(/execution failed due to an exception|execution reverted/)&&Mr.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",P.Yd.errors.UNPREDICTABLE_GAS_LIMIT,{error:t,method:e,transaction:r}),t}var Wr=function(e){(0,h.Z)(r,e);var t=(0,d.Z)(r);function r(e,n){var a;return(0,p.Z)(this,r),a=t.call(this,e),(0,_.zG)((0,c.Z)(a),"baseUrl",a.getBaseUrl()),(0,_.zG)((0,c.Z)(a),"apiKey",n||null),a}return(0,v.Z)(r,[{key:"getBaseUrl",value:function(){switch(this.network?this.network.name:"invalid"){case"homestead":return"https://api.etherscan.io";case"goerli":return"https://api-goerli.etherscan.io";case"sepolia":return"https://api-sepolia.etherscan.io";case"matic":return"https://api.polygonscan.com";case"maticmum":return"https://api-testnet.polygonscan.com";case"arbitrum":return"https://api.arbiscan.io";case"arbitrum-goerli":return"https://api-goerli.arbiscan.io";case"optimism":return"https://api-optimistic.etherscan.io";case"optimism-goerli":return"https://api-goerli-optimistic.etherscan.io"}return Mr.throwArgumentError("unsupported network","network",this.network.name)}},{key:"getUrl",value:function(e,t){var r=Object.keys(t).reduce((function(e,r){var n=t[r];return null!=n&&(e+="&".concat(r,"=").concat(n)),e}),""),n=this.apiKey?"&apikey=".concat(this.apiKey):"";return"".concat(this.baseUrl,"/api?module=").concat(e).concat(r).concat(n)}},{key:"getPostUrl",value:function(){return"".concat(this.baseUrl,"/api")}},{key:"getPostData",value:function(e,t){return t.module=e,t.apikey=this.apiKey,t}},{key:"fetch",value:function(e,t,r){return Ur(this,void 0,void 0,(0,m.Z)().mark((function n(){var a,o,i,s,u,c,l=this;return(0,m.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return a=r?this.getPostUrl():this.getUrl(e,t),o=r?this.getPostData(e,t):null,i="proxy"===e?Kr:zr,this.emit("debug",{action:"request",request:a,provider:this}),s={url:a,throttleSlotInterval:1e3,throttleCallback:function(e,t){return l.isCommunityResource()&&It(),Promise.resolve(!0)}},u=null,o&&(s.headers={"content-type":"application/x-www-form-urlencoded; charset=UTF-8"},u=Object.keys(o).map((function(e){return"".concat(e,"=").concat(o[e])})).join("&")),n.next=9,(0,Tt.rd)(s,u,i||Kr);case 9:return c=n.sent,this.emit("debug",{action:"response",request:a,response:(0,_.p$)(c),provider:this}),n.abrupt("return",c);case 12:case"end":return n.stop()}}),n,this)})))}},{key:"detectNetwork",value:function(){return Ur(this,void 0,void 0,(0,m.Z)().mark((function e(){return(0,m.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.network);case 1:case"end":return e.stop()}}),e,this)})))}},{key:"perform",value:function(e,t){var n=this,a=Object.create(null,{perform:{get:function(){return(0,l.Z)((0,f.Z)(r.prototype),"perform",n)}}});return Ur(this,void 0,void 0,(0,m.Z)().mark((function r(){var n,o,i,s,u,c,l,f,h;return(0,m.Z)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:r.t0=e,r.next="getBlockNumber"===r.t0?3:"getGasPrice"===r.t0?4:"getBalance"===r.t0?5:"getTransactionCount"===r.t0?6:"getCode"===r.t0?7:"getStorageAt"===r.t0?8:"sendTransaction"===r.t0?9:"getBlock"===r.t0?10:"getTransaction"===r.t0?13:"getTransactionReceipt"===r.t0?14:"call"===r.t0?15:"estimateGas"===r.t0?29:"getLogs"===r.t0?41:"getEtherPrice"===r.t0?65:72;break;case 3:return r.abrupt("return",this.fetch("proxy",{action:"eth_blockNumber"}));case 4:return r.abrupt("return",this.fetch("proxy",{action:"eth_gasPrice"}));case 5:return r.abrupt("return",this.fetch("account",{action:"balance",address:t.address,tag:t.blockTag}));case 6:return r.abrupt("return",this.fetch("proxy",{action:"eth_getTransactionCount",address:t.address,tag:t.blockTag}));case 7:return r.abrupt("return",this.fetch("proxy",{action:"eth_getCode",address:t.address,tag:t.blockTag}));case 8:return r.abrupt("return",this.fetch("proxy",{action:"eth_getStorageAt",address:t.address,position:t.position,tag:t.blockTag}));case 9:return r.abrupt("return",this.fetch("proxy",{action:"eth_sendRawTransaction",hex:t.signedTransaction},!0).catch((function(e){return Yr("sendTransaction",e,t.signedTransaction)})));case 10:if(!t.blockTag){r.next=12;break}return r.abrupt("return",this.fetch("proxy",{action:"eth_getBlockByNumber",tag:t.blockTag,boolean:t.includeTransactions?"true":"false"}));case 12:throw new Error("getBlock by blockHash not implemented");case 13:return r.abrupt("return",this.fetch("proxy",{action:"eth_getTransactionByHash",txhash:t.transactionHash}));case 14:return r.abrupt("return",this.fetch("proxy",{action:"eth_getTransactionReceipt",txhash:t.transactionHash}));case 15:if("latest"===t.blockTag){r.next=17;break}throw new Error("EtherscanProvider does not support blockTag for call");case 17:return(n=jr(t.transaction)).module="proxy",n.action="eth_call",r.prev=20,r.next=23,this.fetch("proxy",n,!0);case 23:return r.abrupt("return",r.sent);case 26:return r.prev=26,r.t1=r.catch(20),r.abrupt("return",Yr("call",r.t1,t.transaction));case 29:return(o=jr(t.transaction)).module="proxy",o.action="eth_estimateGas",r.prev=32,r.next=35,this.fetch("proxy",o,!0);case 35:return r.abrupt("return",r.sent);case 38:return r.prev=38,r.t2=r.catch(32),r.abrupt("return",Yr("estimateGas",r.t2,t.transaction));case 41:return i={action:"getLogs"},t.filter.fromBlock&&(i.fromBlock=Hr(t.filter.fromBlock)),t.filter.toBlock&&(i.toBlock=Hr(t.filter.toBlock)),t.filter.address&&(i.address=t.filter.address),t.filter.topics&&t.filter.topics.length>0&&(t.filter.topics.length>1&&Mr.throwError("unsupported topic count",P.Yd.errors.UNSUPPORTED_OPERATION,{topics:t.filter.topics}),1===t.filter.topics.length&&("string"===typeof(s=t.filter.topics[0])&&66===s.length||Mr.throwError("unsupported topic format",P.Yd.errors.UNSUPPORTED_OPERATION,{topic0:s}),i.topic0=s)),r.next=48,this.fetch("logs",i);case 48:u=r.sent,c={},l=0;case 51:if(!(l<u.length)){r.next=64;break}if(null==(f=u[l]).blockHash){r.next=55;break}return r.abrupt("continue",61);case 55:if(null!=c[f.blockNumber]){r.next=60;break}return r.next=58,this.getBlock(f.blockNumber);
1case 58:(h=r.sent)&&(c[f.blockNumber]=h.hash);case 60:f.blockHash=c[f.blockNumber];case 61:l++,r.next=51;break;case 64:return r.abrupt("return",u);case 65:if("homestead"===this.network.name){r.next=67;break}return r.abrupt("return",0);case 67:return r.t3=parseFloat,r.next=70,this.fetch("stats",{action:"ethprice"});case 70:return r.t4=r.sent.ethusd,r.abrupt("return",(0,r.t3)(r.t4));case 72:return r.abrupt("break",73);case 73:return r.abrupt("return",a.perform.call(this,e,t));case 74:case"end":return r.stop()}}),r,this,[[20,26],[32,38]])})))}},{key:"getHistory",value:function(e,t,r){return Ur(this,void 0,void 0,(0,m.Z)().mark((function n(){var a,o,i=this;return(0,m.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,this.resolveName(e);case 2:return n.t0=n.sent,n.t1=null==t?0:t,n.t2=null==r?99999999:r,a={action:"txlist",address:n.t0,startblock:n.t1,endblock:n.t2,sort:"asc"},n.next=8,this.fetch("account",a);case 8:return o=n.sent,n.abrupt("return",o.map((function(e){["contractAddress","to"].forEach((function(t){""==e[t]&&delete e[t]})),null==e.creates&&null!=e.contractAddress&&(e.creates=e.contractAddress);var t=i.formatter.transactionResponse(e);return e.timeStamp&&(t.timestamp=parseInt(e.timeStamp)),t})));case 10:case"end":return n.stop()}}),n,this)})))}},{key:"isCommunityResource",value:function(){return null==this.apiKey}}]),r}(ar);function qr(e){for(var t=(e=e.slice()).length-1;t>0;t--){var r=Math.floor(Math.random()*(t+1)),n=e[t];e[t]=e[r],e[r]=n}return e}var Vr=function(e,t,r,n){return new(r||(r=Promise))((function(a,o){function i(e){try{u(n.next(e))}catch(t){o(t)}}function s(e){try{u(n.throw(e))}catch(t){o(t)}}function u(e){var t;e.done?a(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,s)}u((n=n.apply(e,t||[])).next())}))},$r=new P.Yd(Nt);function Jr(){return(new Date).getTime()}function Xr(e){for(var t=null,r=0;r<e.length;r++){var n=e[r];if(null==n)return null;t?t.name===n.name&&t.chainId===n.chainId&&(t.ensAddress===n.ensAddress||null==t.ensAddress&&null==n.ensAddress)||$r.throwArgumentError("provider mismatch","networks",e):t=n}return t}function Qr(e,t){e=e.slice().sort();var r=Math.floor(e.length/2);if(e.length%2)return e[r];var n=e[r-1],a=e[r];return null!=t&&Math.abs(n-a)>t?null:(n+a)/2}function en(e){if(null===e)return"null";if("number"===typeof e||"boolean"===typeof e)return JSON.stringify(e);if("string"===typeof e)return e;if(E.O$.isBigNumber(e))return e.toString();if(Array.isArray(e))return JSON.stringify(e.map((function(e){return en(e)})));if("object"===typeof e){var t=Object.keys(e);return t.sort(),"{"+t.map((function(t){var r=e[t];return r="function"===typeof r?"[function]":en(r),JSON.stringify(t)+":"+r})).join(",")+"}"}throw new Error("unknown value type: "+typeof e)}var tn=1;function rn(e){var t=null,r=null,n=new Promise((function(n){t=function(){r&&(clearTimeout(r),r=null),n()},r=setTimeout(t,e)}));return{cancel:t,getPromise:function(){return n},wait:function(e){return n=n.then(e)}}}var nn=[P.Yd.errors.CALL_EXCEPTION,P.Yd.errors.INSUFFICIENT_FUNDS,P.Yd.errors.NONCE_EXPIRED,P.Yd.errors.REPLACEMENT_UNDERPRICED,P.Yd.errors.UNPREDICTABLE_GAS_LIMIT],an=["address","args","errorArgs","errorSignature","method","transaction"];function on(e,t){var r={weight:e.weight};return Object.defineProperty(r,"provider",{get:function(){return e.provider}}),e.start&&(r.start=e.start),t&&(r.duration=t-e.start),e.done&&(e.error?r.error=e.error:r.result=e.result||null),r}function sn(e,t,r){var n=en;switch(t){case"getBlockNumber":return function(t){var r=t.map((function(e){return e.result})),n=Qr(t.map((function(e){return e.result})),2);if(null!=n)return n=Math.ceil(n),r.indexOf(n+1)>=0&&n++,n>=e._highestBlockNumber&&(e._highestBlockNumber=n),e._highestBlockNumber};case"getGasPrice":return function(e){var t=e.map((function(e){return e.result}));return t.sort(),t[Math.floor(t.length/2)]};case"getEtherPrice":return function(e){return Qr(e.map((function(e){return e.result})))};case"getBalance":case"getTransactionCount":case"getCode":case"getStorageAt":case"call":case"estimateGas":case"getLogs":break;case"getTransaction":case"getTransactionReceipt":n=function(e){return null==e?null:((e=(0,_.DC)(e)).confirmations=-1,en(e))};break;case"getBlock":n=r.includeTransactions?function(e){return null==e?null:((e=(0,_.DC)(e)).transactions=e.transactions.map((function(e){return(e=(0,_.DC)(e)).confirmations=-1,e})),en(e))}:function(e){return null==e?null:en(e)};break;default:throw new Error("unknown method: "+t)}return function(e,t){return function(r){var n={};r.forEach((function(t){var r=e(t.result);n[r]||(n[r]={count:0,result:t.result}),n[r].count++}));for(var a=Object.keys(n),o=0;o<a.length;o++){var i=n[a[o]];if(i.count>=t)return i.result}}}(n,e.quorum)}function un(e,t){return Vr(this,void 0,void 0,(0,m.Z)().mark((function r(){var n;return(0,m.Z)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(!(null!=(n=e.provider).blockNumber&&n.blockNumber>=t||-1===t)){r.next=3;break}return r.abrupt("return",n);case 3:return r.abrupt("return",(0,Tt.$l)((function(){return new Promise((function(r,a){setTimeout((function(){return n.blockNumber>=t?r(n):e.cancelled?r(null):r(void 0)}),0)}))}),{oncePoll:n}));case 4:case"end":return r.stop()}}),r)})))}function cn(e,t,r,n){return Vr(this,void 0,void 0,(0,m.Z)().mark((function a(){var o,i;return(0,m.Z)().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:o=e.provider,a.t0=r,a.next="getBlockNumber"===a.t0||"getGasPrice"===a.t0?4:"getEtherPrice"===a.t0?5:"getBalance"===a.t0||"getTransactionCount"===a.t0||"getCode"===a.t0?8:"getStorageAt"===a.t0?13:"getBlock"===a.t0?18:"call"===a.t0||"estimateGas"===a.t0?23:"getTransaction"===a.t0||"getTransactionReceipt"===a.t0?3
10:"getLogs"===a.t0?31:37;break;case 4:return a.abrupt("return",o[r]());case 5:if(!o.getEtherPrice){a.next=7;break}return a.abrupt("return",o.getEtherPrice());case 7:return a.abrupt("break",37);case 8:if(!n.blockTag||!(0,x.A7)(n.blockTag)){a.next=12;break}return a.next=11,un(e,t);case 11:o=a.sent;case 12:return a.abrupt("return",o[r](n.address,n.blockTag||"latest"));case 13:if(!n.blockTag||!(0,x.A7)(n.blockTag)){a.next=17;break}return a.next=16,un(e,t);case 16:o=a.sent;case 17:return a.abrupt("return",o.getStorageAt(n.address,n.position,n.blockTag||"latest"));case 18:if(!n.blockTag||!(0,x.A7)(n.blockTag)){a.next=22;break}return a.next=21,un(e,t);case 21:o=a.sent;case 22:return a.abrupt("return",o[n.includeTransactions?"getBlockWithTransactions":"getBlock"](n.blockTag||n.blockHash));case 23:if(!n.blockTag||!(0,x.A7)(n.blockTag)){a.next=27;break}return a.next=26,un(e,t);case 26:o=a.sent;case 27:if("call"!==r||!n.blockTag){a.next=29;break}return a.abrupt("return",o[r](n.transaction,n.blockTag));case 29:return a.abrupt("return",o[r](n.transaction));case 30:return a.abrupt("return",o[r](n.transactionHash));case 31:if(!((i=n.filter).fromBlock&&(0,x.A7)(i.fromBlock)||i.toBlock&&(0,x.A7)(i.toBlock))){a.next=36;break}return a.next=35,un(e,t);case 35:o=a.sent;case 36:return a.abrupt("return",o.getLogs(i));case 37:return a.abrupt("return",$r.throwError("unknown method error",P.Yd.errors.UNKNOWN_ERROR,{method:r,params:n}));case 38:case"end":return a.stop()}}),a)})))}var ln=function(e){(0,h.Z)(r,e);var t=(0,d.Z)(r);function r(e,n){var a;(0,p.Z)(this,r),0===e.length&&$r.throwArgumentError("missing providers","providers",e);var o=e.map((function(e,t){if(y.zt.isProvider(e)){var r=Ot(e)?2e3:750;return Object.freeze({provider:e,weight:1,stallTimeout:r,priority:1})}var n=(0,_.DC)(e);null==n.priority&&(n.priority=1),null==n.stallTimeout&&(n.stallTimeout=Ot(e)?2e3:750),null==n.weight&&(n.weight=1);var a=n.weight;return(a%1||a>512||a<1)&&$r.throwArgumentError("invalid weight; must be integer in [1, 512]","providers[".concat(t,"].weight"),a),Object.freeze(n)})),i=o.reduce((function(e,t){return e+t.weight}),0);null==n?n=i/2:n>i&&$r.throwArgumentError("quorum will always fail; larger than total weight","quorum",n);var s=Xr(o.map((function(e){return e.provider.network})));return null==s&&(s=new Promise((function(e,t){setTimeout((function(){a.detectNetwork().then(e,t)}),0)}))),a=t.call(this,s),(0,_.zG)((0,c.Z)(a),"providerConfigs",Object.freeze(o)),(0,_.zG)((0,c.Z)(a),"quorum",n),a._highestBlockNumber=-1,a}return(0,v.Z)(r,[{key:"detectNetwork",value:function(){return Vr(this,void 0,void 0,(0,m.Z)().mark((function e(){var t;return(0,m.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all(this.providerConfigs.map((function(e){return e.provider.getNetwork()})));case 2:return t=e.sent,e.abrupt("return",Xr(t));case 4:case"end":return e.stop()}}),e,this)})))}},{key:"perform",value:function(e,t){return Vr(this,void 0,void 0,(0,m.Z)().mark((function r(){var n,a,o,i,s,u,c,l,f,h,d=this;return(0,m.Z)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if("sendTransaction"!==e){r.next=13;break}return r.next=3,Promise.all(this.providerConfigs.map((function(e){return e.provider.sendTransaction(t.signedTransaction).then((function(e){return e.hash}),(function(e){return e}))})));case 3:n=r.sent,a=0;case 5:if(!(a<n.length)){r.next=12;break}if("string"!==typeof(o=n[a])){r.next=9;break}return r.abrupt("return",o);case 9:a++,r.next=5;break;case 12:throw n[0];case 13:if(-1!==this._highestBlockNumber||"getBlockNumber"===e){r.next=16;break}return r.next=16,this.getBlockNumber();case 16:i=sn(this,e,t),(s=qr(this.providerConfigs.map(_.DC))).sort((function(e,t){return e.priority-t.priority})),u=this._highestBlockNumber,c=0,l=!0,f=(0,m.Z)().mark((function r(){var n,a,o,f,h,p,v;return(0,m.Z)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:n=Jr(),a=s.filter((function(e){return e.runner&&n-e.start<e.stallTimeout})).reduce((function(e,t){return e+t.weight}),0),o=(0,m.Z)().mark((function r(){var n,o;return(0,m.Z)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:n=s[c++],o=tn++,n.start=Jr(),n.staller=rn(n.stallTimeout),n.staller.wait((function(){n.staller=null})),n.runner=cn(n,u,e,t).then((function(r){n.done=!0,n.result=r,d.listenerCount("debug")&&d.emit("debug",{action:"request",rid:o,backend:on(n,Jr()),request:{method:e,params:(0,_.p$)(t)},provider:d})}),(function(r){n.done=!0,n.error=r,d.listenerCount("debug")&&d.emit("debug",{action:"request",rid:o,backend:on(n,Jr()),request:{method:e,params:(0,_.p$)(t)},provider:d})})),d.listenerCount("debug")&&d.emit("debug",{action:"request",rid:o,backend:on(n,null),request:{method:e,params:(0,_.p$)(t)},provider:d}),a+=n.weight;case 8:case"end":return r.stop()}}),r)}));case 3:if(!(a<d.quorum&&c<s.length)){r.next=7;break}return r.delegateYield(o(),"t0",5);case 5:r.next=3;break;
1case 7:if(f=[],s.forEach((function(e){!e.done&&e.runner&&(f.push(e.runner),e.staller&&f.push(e.staller.getPromise()))})),!f.length){r.next=12;break}return r.next=12,Promise.race(f);case 12:if(!((h=s.filter((function(e){return e.done&&null==e.error}))).length>=d.quorum)){r.next=22;break}if(void 0===(p=i(h))){r.next=18;break}return s.forEach((function(e){e.staller&&e.staller.cancel(),e.cancelled=!0})),r.abrupt("return",{v:p});case 18:if(l){r.next=21;break}return r.next=21,rn(100).getPromise();case 21:l=!1;case 22:if(v=s.reduce((function(e,t){if(!t.done||null==t.error)return e;var r=t.error.code;return nn.indexOf(r)>=0&&(e[r]||(e[r]={error:t.error,weight:0}),e[r].weight+=t.weight),e}),{}),Object.keys(v).forEach((function(e){var t=v[e];if(!(t.weight<d.quorum)){s.forEach((function(e){e.staller&&e.staller.cancel(),e.cancelled=!0}));var r=t.error,n={};an.forEach((function(e){null!=r[e]&&(n[e]=r[e])})),$r.throwError(r.reason||r.message,e,n)}})),0!==s.filter((function(e){return!e.done})).length){r.next=26;break}return r.abrupt("return","break");case 26:case"end":return r.stop()}}),r)}));case 23:return r.delegateYield(f(),"t0",25);case 25:if("break"!==(h=r.t0)){r.next=28;break}return r.abrupt("break",32);case 28:if("object"!==typeof h){r.next=30;break}return r.abrupt("return",h.v);case 30:r.next=23;break;case 32:return s.forEach((function(e){e.staller&&e.staller.cancel(),e.cancelled=!0})),r.abrupt("return",$r.throwError("failed to meet quorum",P.Yd.errors.SERVER_ERROR,{method:e,params:t,results:s.map((function(e){return on(e)})),provider:this}));case 34:case"end":return r.stop()}}),r,this)})))}}]),r}(ar),fn=null,hn=new P.Yd(Nt),dn="84842078b09946638c03157f83405213",pn=function(e){(0,h.Z)(r,e);var t=(0,d.Z)(r);function r(e,n){var a;(0,p.Z)(this,r);var o=new vn(e,n),i=o.connection;i.password&&hn.throwError("INFURA WebSocket project secrets unsupported",P.Yd.errors.UNSUPPORTED_OPERATION,{operation:"InfuraProvider.getWebSocketProvider()"});var s=i.url.replace(/^http/i,"ws").replace("/v3/","/ws/v3/");return a=t.call(this,s,e),(0,_.zG)((0,c.Z)(a),"apiKey",o.projectId),(0,_.zG)((0,c.Z)(a),"projectId",o.projectId),(0,_.zG)((0,c.Z)(a),"projectSecret",o.projectSecret),a}return(0,v.Z)(r,[{key:"isCommunityResource",value:function(){return this.projectId===dn}}]),r}(_r),vn=function(e){(0,h.Z)(r,e);var t=(0,d.Z)(r);function r(){return(0,p.Z)(this,r),t.apply(this,arguments)}return(0,v.Z)(r,[{key:"isCommunityResource",value:function(){return this.projectId===dn}}],[{key:"getWebSocketProvider",value:function(e,t){return new pn(e,t)}},{key:"getApiKey",value:function(e){var t={apiKey:dn,projectId:dn,projectSecret:null};return null==e||("string"===typeof e?t.projectId=e:null!=e.projectSecret?(hn.assertArgument("string"===typeof e.projectId,"projectSecret requires a projectId","projectId",e.projectId),hn.assertArgument("string"===typeof e.projectSecret,"invalid projectSecret","projectSecret","[REDACTED]"),t.projectId=e.projectId,t.projectSecret=e.projectSecret):e.projectId&&(t.projectId=e.projectId),t.apiKey=t.projectId),t}},{key:"getUrl",value:function(e,t){var r=null;switch(e?e.name:"unknown"){case"homestead":r="mainnet.infura.io";break;case"goerli":r="goerli.infura.io";break;case"sepolia":r="sepolia.infura.io";break;case"matic":r="polygon-mainnet.infura.io";break;case"maticmum":r="polygon-mumbai.infura.io";break;case"optimism":r="optimism-mainnet.infura.io";break;case"optimism-goerli":r="optimism-goerli.infura.io";break;case"arbitrum":r="arbitrum-mainnet.infura.io";break;case"arbitrum-goerli":r="arbitrum-goerli.infura.io";break;default:hn.throwError("unsupported network",P.Yd.errors.INVALID_ARGUMENT,{argument:"network",value:e})}var n={allowGzip:!0,url:"https://"+r+"/v3/"+t.projectId,throttleCallback:function(e,r){return t.projectId===dn&&It(),Promise.resolve(!0)}};return null!=t.projectSecret&&(n.user="",n.password=t.projectSecret),n}}]),r}(Nr),mn=function(e){(0,h.Z)(r,e);var t=(0,d.Z)(r);function r(){return(0,p.Z)(this,r),t.apply(this,arguments)}return(0,v.Z)(r,[{key:"send",value:function(e,t){var r=this,n={method:e,params:t,id:this._nextId++,jsonrpc:"2.0"};
1null==this._pendingBatch&&(this._pendingBatch=[]);var a={request:n,resolve:null,reject:null},o=new Promise((function(e,t){a.resolve=e,a.reject=t}));return this._pendingBatch.push(a),this._pendingBatchAggregator||(this._pendingBatchAggregator=setTimeout((function(){var e=r._pendingBatch;r._pendingBatch=null,r._pendingBatchAggregator=null;var t=e.map((function(e){return e.request}));return r.emit("debug",{action:"requestBatch",request:(0,_.p$)(t),provider:r}),(0,Tt.rd)(r.connection,JSON.stringify(t)).then((function(n){r.emit("debug",{action:"response",request:t,response:n,provider:r}),e.forEach((function(e,t){var r=n[t];if(r.error){var a=new Error(r.error.message);a.code=r.error.code,a.data=r.error.data,e.reject(a)}else e.resolve(r.result)}))}),(function(n){r.emit("debug",{action:"response",error:n,request:t,provider:r}),e.forEach((function(e){e.reject(n)}))}))}),10)),o}}]),r}(br),gn=new P.Yd(Nt),bn=function(e){(0,h.Z)(r,e);var t=(0,d.Z)(r);function r(){return(0,p.Z)(this,r),t.apply(this,arguments)}return(0,v.Z)(r,null,[{key:"getApiKey",value:function(e){return e&&"string"!==typeof e&&gn.throwArgumentError("invalid apiKey","apiKey",e),e||"ETHERS_JS_SHARED"}},{key:"getUrl",value:function(e,t){gn.warn("NodeSmith will be discontinued on 2019-12-20; please migrate to another platform.");var r=null;switch(e.name){case"homestead":r="https://ethereum.api.nodesmith.io/v1/mainnet/jsonrpc";break;case"ropsten":r="https://ethereum.api.nodesmith.io/v1/ropsten/jsonrpc";break;case"rinkeby":r="https://ethereum.api.nodesmith.io/v1/rinkeby/jsonrpc";break;case"goerli":r="https://ethereum.api.nodesmith.io/v1/goerli/jsonrpc";break;case"kovan":r="https://ethereum.api.nodesmith.io/v1/kovan/jsonrpc";break;default:gn.throwArgumentError("unsupported network","network",arguments[0])}return r+"?apiKey="+t}}]),r}(Nr),yn=new P.Yd(Nt),kn="62e1ad51b37b8e00394bda3b",wn=function(e){(0,h.Z)(r,e);var t=(0,d.Z)(r);function r(){return(0,p.Z)(this,r),t.apply(this,arguments)}return(0,v.Z)(r,[{key:"isCommunityResource",value:function(){return this.applicationId===kn}}],[{key:"getApiKey",value:function(e){var t={applicationId:null,loadBalancer:!0,applicationSecretKey:null};return null==e?t.applicationId=kn:"string"===typeof e?t.applicationId=e:null!=e.applicationSecretKey?(t.applicationId=e.applicationId,t.applicationSecretKey=e.applicationSecretKey):e.applicationId?t.applicationId=e.applicationId:yn.throwArgumentError("unsupported PocketProvider apiKey","apiKey",e),t}},{key:"getUrl",value:function(e,t){var r=null;switch(e?e.name:"unknown"){case"goerli":r="eth-goerli.gateway.pokt.network";break;case"homestead":r="eth-mainnet.gateway.pokt.network";break;case"kovan":r="poa-kovan.gateway.pokt.network";break;case"matic":r="poly-mainnet.gateway.pokt.network";break;case"maticmum":r="polygon-mumbai-rpc.gateway.pokt.network";break;case"rinkeby":r="eth-rinkeby.gateway.pokt.network";break;case"ropsten":r="eth-ropsten.gateway.pokt.network";break;default:yn.throwError("unsupported network",P.Yd.errors.INVALID_ARGUMENT,{argument:"network",value:e})}var n={headers:{},url:"https://".concat(r,"/v1/lb/").concat(t.applicationId)};return null!=t.applicationSecretKey&&(n.user="",n.password=t.applicationSecretKey),n}}]),r}(Nr),En=new P.Yd(Nt),xn=1;function _n(e,t){var r="Web3LegacyFetcher";return function(e,n){var a=this,o={method:e,params:n,id:xn++,jsonrpc:"2.0"};return new Promise((function(e,n){a.emit("debug",{action:"request",fetcher:r,request:(0,_.p$)(o),provider:a}),t(o,(function(t,i){if(t)return a.emit("debug",{action:"response",fetcher:r,error:t,request:o,provider:a}),n(t);if(a.emit("debug",{action:"response",fetcher:r,request:o,response:i,provider:a}),i.error){var s=new Error(i.error.message);return s.code=i.error.code,s.data=i.error.data,n(s)}e(i.result)}))}))}}var Tn=function(e){(0,h.Z)(r,e);var t=(0,d.Z)(r);function r(e,n){var a;(0,p.Z)(this,r),null==e&&En.throwArgumentError("missing provider","provider",e);var o=null,i=null,s=null;return"function"===typeof e?(o="unknown:",i=e):(!(o=e.host||e.path||"")&&e.isMetaMask&&(o="metamask"),s=e,e.request?(""===o&&(o="eip-1193:"),i=function(e){return function(t,r){var n=this;null==r&&(r=[]);var a={method:t,params:r};
1return this.emit("debug",{action:"request",fetcher:"Eip1193Fetcher",request:(0,_.p$)(a),provider:this}),e.request(a).then((function(e){return n.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:a,response:e,provider:n}),e}),(function(e){throw n.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:a,error:e,provider:n}),e}))}}(e)):e.sendAsync?i=_n(0,e.sendAsync.bind(e)):e.send?i=_n(0,e.send.bind(e)):En.throwArgumentError("unsupported provider","provider",e),o||(o="unknown:")),a=t.call(this,o,n),(0,_.zG)((0,c.Z)(a),"jsonRpcFetchFunc",i),(0,_.zG)((0,c.Z)(a),"provider",s),a}return(0,v.Z)(r,[{key:"send",value:function(e,t){return this.jsonRpcFetchFunc(e,t)}}]),r}(br),Pn=new P.Yd(Nt);function An(e,t){if(null==e&&(e="homestead"),"string"===typeof e){var r=e.match(/^(ws|http)s?:/i);if(r)switch(r[1].toLowerCase()){case"http":case"https":return new br(e);case"ws":case"wss":return new _r(e);default:Pn.throwArgumentError("unsupported URL scheme","network",e)}}var n=(0,Et.H)(e);return n&&n._defaultProvider||Pn.throwError("unsupported getDefaultProvider network",P.Yd.errors.NETWORK_ERROR,{operation:"getDefaultProvider",network:e}),n._defaultProvider({FallbackProvider:ln,AlchemyProvider:Or,AnkrProvider:Zr,CloudflareProvider:Gr,EtherscanProvider:Wr,InfuraProvider:vn,JsonRpcProvider:br,NodesmithProvider:bn,PocketProvider:wn,Web3Provider:Tn,IpcProvider:fn},t)}var Nn=r(86388),Sn=r(7550),Cn=new RegExp("^bytes([0-9]+)$"),Rn=new RegExp("^(u?int)([0-9]*)$"),On=new RegExp("^(.*)\\[([0-9]*)\\]$"),Bn="0000000000000000000000000000000000000000000000000000000000000000",In=new P.Yd("solidity/5.7.0");function Dn(e,t,r){switch(e){case"address":return r?(0,x.Bu)(t,32):(0,x.lE)(t);case"string":return(0,oe.Y0)(t);case"bytes":return(0,x.lE)(t);case"bool":return t=t?"0x01":"0x00",r?(0,x.Bu)(t,32):(0,x.lE)(t)}var n=e.match(Rn);if(n){var a=parseInt(n[2]||"256");return(n[2]&&String(a)!==n[2]||a%8!==0||0===a||a>256)&&In.throwArgumentError("invalid number type","type",e),r&&(a=256),t=E.O$.from(t).toTwos(a),(0,x.Bu)(t,a/8)}if(n=e.match(Cn)){var o=parseInt(n[1]);return(String(o)!==n[1]||0===o||o>32)&&In.throwArgumentError("invalid bytes type","type",e),(0,x.lE)(t).byteLength!==o&&In.throwArgumentError("invalid value for ".concat(e),"value",t),r?(0,x.lE)((t+Bn).substring(0,66)):t}if((n=e.match(On))&&Array.isArray(t)){var i=n[1];parseInt(n[2]||String(t.length))!=t.length&&In.throwArgumentError("invalid array length for ".concat(e),"value",t);var s=[];return t.forEach((function(e){s.push(Dn(i,e,!0))})),(0,x.zo)(s)}return In.throwArgumentError("invalid type","type",e)}function Zn(e,t){e.length!=t.length&&In.throwArgumentError("wrong number of values; expected ${ types.length }","values",t);var r=[];return e.forEach((function(e,n){r.push(Dn(e,t[n]))})),(0,x.Dv)((0,x.zo)(r))}function Ln(e,t){return(0,ae.w)(Zn(e,t))}function Fn(e,t){return(0,le.JQ)(Zn(e,t))}var Gn=r(80807);function Un(e,t){t||(t=function(e){return[parseInt(e,16)]});var r=0,n={};return e.split(",").forEach((function(e){var a=e.split(":");r+=parseInt(a[0],16),n[r]=t(a[1])})),n}function Mn(e){var t=0;return e.split(",").map((function(e){var r=e.split("-");return 1===r.length?r[1]="0":""===r[1]&&(r[1]="1"),{l:t+parseInt(r[0],16),h:t=parseInt(r[1],16)}}))}function jn(e,t){for(var r=0,n=0;n<t.length;n++){var a=t[n];if(e>=(r+=a.l)&&e<=r+a.h&&(e-r)%(a.d||1)===0){if(a.e&&-1!==a.e.indexOf(e-r))continue;return a}}return null}var zn=Mn("221,13-1b,5f-,40-10,51-f,11-3,3-3,2-2,2-4,8,2,15,2d,28-8,88,48,27-,3-5,11-20,27-,8,28,3-5,12,18,b-a,1c-4,6-16,2-d,2-2,2,1b-4,17-9,8f-,10,f,1f-2,1c-34,33-14e,4,36-,13-,6-2,1a-f,4,9-,3-,17,8,2-2,5-,2,8-,3-,4-8,2-3,3,6-,16-6,2-,7-3,3-,17,8,3,3,3-,2,6-3,3-,4-a,5,2-6,10-b,4,8,2,4,17,8,3,6-,b,4,4-,2-e,2-4,b-10,4,9-,3-,17,8,3-,5-,9-2,3-,4-7,3-3,3,4-3,c-10,3,7-2,4,5-2,3,2,3-2,3-2,4-2,9,4-3,6-2,4,5-8,2-e,d-d,4,9,4,18,b,6-3,8,4,5-6,3-8,3-3,b-11,3,9,4,18,b,6-3,8,4,5-6,3-6,2,3-3,b-11,3,9,4,18,11-3,7-,4,5-8,2-7,3-3,b-11,3,13-2,19,a,2-,8-2,2-3,7,2,9-11,4-b,3b-3,1e-24,3,2-,3,2-,2-5,5,8,4,2,2-,3,e,4-,6,2,7-,b-,3-21,49,23-5,1c-3,9,25,10-,2-2f,23,6,3,8-2,5-5,1b-45,27-9,2a-,2-3,5b-4,45-4,53-5,8,40,2,5-,8,2,5-,28,2,5-,20,2,5-,8,2,5-,8,8,18,20,2,5-,8,28,14-5,1d-22,56-b,277-8,1e-2,52-e,e,8-a,18-8,15-b,e,4,3-b,5e-2,b-15,10,b-5,59-7,2b-555,9d-3,5b-5,17-,7-,27-,7-,9,2,2,2,20-,36,10,f-,7,14-,4,a,54-3,2-6,6-5,9-,1c-10,13-1d,1c-14,3c-,10-6,32-b,240-30,28-18,c-14,a0,
1115-,3,66-,b-76,5,5-,1d,24,2,5-2,2,8-,35-2,19,f-10,1d-3,311-37f,1b,5a-b,d7-19,d-3,41,57-,68-4,29-3,5f,29-37,2e-2,25-c,2c-2,4e-3,30,78-3,64-,20,19b7-49,51a7-59,48e-2,38-738,2ba5-5b,222f-,3c-94,8-b,6-4,1b,6,2,3,3,6d-20,16e-f,41-,37-7,2e-2,11-f,5-b,18-,b,14,5-3,6,88-,2,bf-2,7-,7-,7-,4-2,8,8-9,8-2ff,20,5-b,1c-b4,27-,27-cbb1,f7-9,28-2,b5-221,56,48,3-,2-,3-,5,d,2,5,3,42,5-,9,8,1d,5,6,2-2,8,153-3,123-3,33-27fd,a6da-5128,21f-5df,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3,2-1d,61-ff7d"),Kn="ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff".split(",").map((function(e){return parseInt(e,16)})),Hn=[{h:25,s:32,l:65},{h:30,s:32,e:[23],l:127},{h:54,s:1,e:[48],l:64,d:2},{h:14,s:1,l:57,d:2},{h:44,s:1,l:17,d:2},{h:10,s:1,e:[2,6,8],l:61,d:2},{h:16,s:1,l:68,d:2},{h:84,s:1,e:[18,24,66],l:19,d:2},{h:26,s:32,e:[17],l:435},{h:22,s:1,l:71,d:2},{h:15,s:80,l:40},{h:31,s:32,l:16},{h:32,s:1,l:80,d:2},{h:52,s:1,l:42,d:2},{h:12,s:1,l:55,d:2},{h:40,s:1,e:[38],l:15,d:2},{h:14,s:1,l:48,d:2},{h:37,s:48,l:49},{h:148,s:1,l:6351,d:2},{h:88,s:1,l:160,d:2},{h:15,s:16,l:704},{h:25,s:26,l:854},{h:25,s:32,l:55915},{h:37,s:40,l:1247},{h:25,s:-119711,l:53248},{h:25,s:-119763,l:52},{h:25,s:-119815,l:52},{h:25,s:-119867,e:[1,4,5,7,8,11,12,17],l:52},{h:25,s:-119919,l:52},{h:24,s:-119971,e:[2,7,8,17],l:52},{h:24,s:-120023,e:[2,7,13,15,16,17],l:52},{h:25,s:-120075,l:52},{h:25,s:-120127,l:52},{h:25,s:-120179,l:52},{h:25,s:-120231,l:52},{h:25,s:-120283,l:52},{h:25,s:-120335,l:52},{h:24,s:-119543,e:[17],l:56},{h:24,s:-119601,e:[17],l:58},{h:24,s:-119659,e:[17],l:58},{h:24,s:-119717,e:[17],l:58},{h:24,s:-119775,e:[17],l:58}],Yn=Un("b5:3bc,c3:ff,7:73,2:253,5:254,3:256,1:257,5:259,1:25b,3:260,1:263,2:269,1:268,5:26f,1:272,2:275,7:280,3:283,5:288,3:28a,1:28b,5:292,3f:195,1:1bf,29:19e,125:3b9,8b:3b2,1:3b8,1:3c5,3:3c6,1:3c0,1a:3ba,1:3c1,1:3c3,2:3b8,1:3b5,1bc9:3b9,1c:1f76,1:1f77,f:1f7a,1:1f7b,d:1f78,1:1f79,1:1f7c,1:1f7d,107:63,5:25b,4:68,1:68,1:68,3:69,1:69,1:6c,3:6e,4:70,1:71,1:72,1:72,1:72,7:7a,2:3c9,2:7a,2:6b,1:e5,1:62,1:63,3:65,1:66,2:6d,b:3b3,1:3c0,6:64,1b574:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3"),Wn=Un("179:1,2:1,2:1,5:1,2:1,a:4f,a:1,8:1,2:1,2:1,3:1,5:1,3:1,4:1,2:1,3:1,4:1,8:2,1:1,2:2,1:1,2:2,27:2,195:26,2:25,1:25,1:25,2:40,2:3f,1:3f,33:1,11:-6,1:-9,1ac7:-3a,6d:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,b:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,c:-8,2:-8,2:-8,2:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,49:-8,1:-8,1:-4a,1:-4a,d:-56,1:-56,1:-56,1:-56,d:-8,1:-8,f:-8,1:-8,3:-7"),qn=Un("df:00730073,51:00690307,19:02BC006E,a7:006A030C,18a:002003B9,16:03B903080301,20:03C503080301,1d7:05650582,190f:00680331,1:00740308,1:0077030A,1:0079030A,1:006102BE,b6:03C50313,2:03C503130300,2:03C503130301,2:03C503130342,2a:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,3:1F7003B9,1:03B103B9,1:03AC03B9,2:03B10342,1:03B1034203B9,5:03B103B9,6:1F7403B9,1:03B703B9,1:03AE03B9,2:03B70342,1:03B7034203B9,5:03B703B9,6:03B903080300,1:03B903080301,3:03B90342,1:03B903080342,b:03C503080300,1:03C503080301,1:03C10313,2:03C50342,1:03C503080342,b:1F7C03B9,1:03C903B9,1:03CE03B9,2:03C90342,1:03C9034203B9,5:03C903B9,ac:00720073,5b:00B00063,6:00B00066,d:006E006F,a:0073006D,1:00740065006C,1:0074006D,124f:006800700061,2:00610075,2:006F0076,b:00700061,1:006E0061,1:03BC0061,1:006D0061,1:006B0061,1:006B0062,1:006D0062,1:00670062,3:00700066,1:006E0066,1:03BC0066,4:0068007A,1:006B0068007A,1:006D0068007A,1:00670068007A,1:00740068007A,15:00700061,1:006B00700061,1:006D00700061,1:006700700061,8:00700076,1:006E0076,1:03BC0076,1:006D0076,1:006B0076,1:006D0076,1:00700077,1:006E0077,1:03BC0077,1:006D0077,1:006B0077,1:006D0077,1:006B03C9,1:006D03C9,2:00620071,3:00632215006B0067,1:0063006F002E,1:00640062,1:00670079,2:00680070,2:006B006B,1:006B006D,9:00700068,2:00700070006D,1:00700072,2:00730076,1:00770062,c723:00660066,1:00660069,1:0066006C,1:006600660069,1:00660066006C,1:00730074,1:00730074,d:05740576,1:05740565,1:0574056B,1:057E0576,1:0574056D",(function(e){if(e.length%4!==0)throw new Error("bad data");for(var t=[],r=0;r<e.length;r+=4)t.push(parseInt(e.substring(r,r+4),16));return t})),Vn=Mn("80-20,2a0-,39c,32,f71,18e,7f2-f,19-7,30-4,7-5,f81-b,5,a800-20ff,4d1-1f,110,fa-6,d174-7,2e84-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,2,1f-5f,ff7f-20001");function $n(e){if(e.match(/^[a-z0-9-]*$/i)&&e.length<=59)return e.toLowerCase();var t,r=(0,oe.XL)(e);t=r.map((function(e){if(Kn.indexOf(e)>=0)return[];if(e>=65024&&e<=65039)return[];var t=function(e){var t=jn(e,Hn);if(t)return[e+t.s];var r=Yn[e];if(r)return r;var n=Wn[e];return n?[e+n[0]]:qn[e]||null}(e);return t||[e]})),r=t.reduce((function(e,t){return t.forEach((function(t){e.push(t)})),e}
1),[]),(r=(0,oe.XL)((0,oe.uu)(r),oe.Uj.NFKC)).forEach((function(e){if(jn(e,Vn))throw new Error("STRINGPREP_CONTAINS_PROHIBITED")})),r.forEach((function(e){if(jn(e,zn))throw new Error("STRINGPREP_CONTAINS_UNASSIGNED")}));var n=(0,oe.uu)(r);if("-"===n.substring(0,1)||"--"===n.substring(2,4)||"-"===n.substring(n.length-1))throw new Error("invalid hyphen");return n}function Jn(e){var t=(0,oe.Y0)(e);if(t.length>31)throw new Error("bytes32 string must be less than 32 bytes");return(0,x.Dv)((0,x.zo)([t,kt.R]).slice(0,32))}function Xn(e){var t=(0,x.lE)(e);if(32!==t.length)throw new Error("invalid bytes32 - not 32 bytes long");if(0!==t[31])throw new Error("invalid bytes32 string - no null terminator");for(var r=31;0===t[r-1];)r--;return(0,oe.ZN)(t.slice(0,r))}var Qn=new P.Yd("units/5.7.0"),ea=["wei","kwei","mwei","gwei","szabo","finney","ether"];function ta(e){var t=String(e).split(".");(t.length>2||!t[0].match(/^-?[0-9]*$/)||t[1]&&!t[1].match(/^[0-9]*$/)||"."===e||"-."===e)&&Qn.throwArgumentError("invalid value","value",e);var r=t[0],n="";for("-"===r.substring(0,1)&&(n="-",r=r.substring(1));"0"===r.substring(0,1);)r=r.substring(1);""===r&&(r="0");var a="";for(2===t.length&&(a="."+(t[1]||"0"));a.length>2&&"0"===a[a.length-1];)a=a.substring(0,a.length-1);for(var o=[];r.length;){if(r.length<=3){o.unshift(r);break}var i=r.length-3;o.unshift(r.substring(i)),r=r.substring(0,i)}return n+o.join(",")+a}function ra(e,t){if("string"===typeof t){var r=ea.indexOf(t);-1!==r&&(t=3*r)}return X(e,null!=t?t:18)}function na(e,t){if("string"!==typeof e&&Qn.throwArgumentError("value must be a string","value",e),"string"===typeof t){var r=ea.indexOf(t);-1!==r&&(t=3*r)}return Q(e,null!=t?t:18)}function aa(e){return ra(e,18)}function oa(e){return na(e,18)}var ia="ethers/5.7.2",sa=new P.Yd(ia);try{var ua=window;null==ua._ethers&&(ua._ethers=s)}catch(ca){}},38268:function(e){e.exports=function(){var e={98:function(e,t){var r="undefined"!=typeof self?self:this,n=function(){function e(){this.fetch=!1,this.DOMException=r.DOMException}return e.prototype=r,new e}();!function(e){!function(t){var r="URLSearchParams"in e,n="Symbol"in e&&"iterator"in Symbol,a="FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),o="FormData"in e,i="ArrayBuffer"in e;if(i)var s=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],u=ArrayBuffer.isView||function(e){return e&&s.indexOf(Object.prototype.toString.call(e))>-1};function c(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function l(e){return"string"!=typeof e&&(e=String(e)),e}function f(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return n&&(t[Symbol.iterator]=function(){return t}),t}function h(e){this.map={},e instanceof h?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function d(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function p(e){return new Promise((function(t,r){e.onload=function(){t(e.result)},e.onerror=function(){r(e.error)}}))}function v(e){var t=new FileReader,r=p(t);return t.readAsArrayBuffer(e),r}function m(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function g(){return this.bodyUsed=!1,this._initBody=function(e){var t;this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:a&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:o&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:r&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():i&&a&&(t=e)&&DataView.prototype.isPrototypeOf(t)?(this._bodyArrayBuffer=m(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):i&&(ArrayBuffer.prototype.isPrototypeOf(e)||u(e))?this._bodyArrayBuffer=m(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):r&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},a&&(this.blob=function(){var e=d(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?d(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(v)}),this.text=function(){var e,t,r,n=d(this);if(n)return n;if(this._bodyBlob)return e=this._bodyBlob,r=p(t=new FileReader),t.readAsText(e),r;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),r=new Array(t.length),n=0;n<t.length;n++)r[n]=String.fromCharCode(t[n]);return r.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},o&&(this.formData=function(){return this.text().then(k)}),this.json=function(){return this.text().then(JSON.parse)},this}h.prototype.append=function(e,t){e=c(e),t=l(t);var r=this.map[e];this.map[e]=r?r+", "+t:t},h.prototype.delete=function(e){delete this.map[c(e)]},h.prototype.get=function(e){return e=c(e),this.has(e)?this.map[e]:null},h.prototype.has=function(e){return this.map.hasOwnProperty(c(e))},h.prototype.set=function(e,t){this.map[c(e)]=l(t)},h.prototype.forEach=function(e,t){for(var r in this.map)this.map.hasOwnProperty(r)&&e.call(t,this.map[r],r,this)},h.prototype.keys=function(){var e=[];return this.forEach((function(t,r){e.push(r)})),f(e)},h.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),f(e)},h.prototype.entries=function(){var e=[];return this.forEach((function(t,r){e.push([r,t])})),f(e)},n&&(h.prototype[Symbol.iterator]=h.prototype.entries);var b=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function y(e,t){var r,n,a=(t=t||{}).body;if(e instanceof y){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new h(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,a||null==e._bodyInit||(a=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",!t.headers&&this.headers||(this.headers=new h(t.headers)),this.method=(n=(r=t.method||this.method||"GET").toUpperCase(),b.indexOf(n)>-1?n:r),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&a)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(a)}function k(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var r=e.split("="),n=r.shift().replace(/\+/g," "),a=r.join("=").replace(/\+/g," ");t.append(decodeURIComponent(n),decodeURIComponent(a))}})),t}function w(e,t){t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new h(t.headers),this.url=t.url||"",this._initBody(e)}y.prototype.clone=function(){return new y(this,{body:this._bodyInit})},g.call(y.prototype),g.call(w.prototype),w.prototype.clone=function(){return new w(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new h(this.headers),url:this.url})},w.error=function(){var e=new w(null,{status:0,statusText:""});return e.type="error",e};var E=[301,302,303,307,308];w.redirect=function(e,t){if(-1===E.indexOf(t))throw new RangeError("Invalid status code");return new w(null,{status:t,headers:{location:e}})},t.DOMException=e.DOMException;try{new t.DOMException}catch(e){t.DOMException=function(e,t){this.message=e,this.name=t;var r=Error(e);this.stack=r.stack},t.DOMException.prototype=Object.create(Error.prototype),t.DOMException.prototype.constructor=t.DOMException}function x(e,r){return new Promise((function(n,o){var i=new y(e,r);if(i.signal&&i.signal.aborted)return o(new t.DOMException("Aborted","AbortError"));var s=new XMLHttpRequest;function u(){s.abort()}s.onload=function(){var e,t,r={status:s.status,statusText:s.statusText,headers:(e=s.getAllResponseHeaders()||"",t=new h,e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEac
1h((function(e){var r=e.split(":"),n=r.shift().trim();if(n){var a=r.join(":").trim();t.append(n,a)}})),t)};r.url="responseURL"in s?s.responseURL:r.headers.get("X-Request-URL");var a="response"in s?s.response:s.responseText;n(new w(a,r))},s.onerror=function(){o(new TypeError("Network request failed"))},s.ontimeout=function(){o(new TypeError("Network request failed"))},s.onabort=function(){o(new t.DOMException("Aborted","AbortError"))},s.open(i.method,i.url,!0),"include"===i.credentials?s.withCredentials=!0:"omit"===i.credentials&&(s.withCredentials=!1),"responseType"in s&&a&&(s.responseType="blob"),i.headers.forEach((function(e,t){s.setRequestHeader(t,e)})),i.signal&&(i.signal.addEventListener("abort",u),s.onreadystatechange=function(){4===s.readyState&&i.signal.removeEventListener("abort",u)}),s.send(void 0===i._bodyInit?null:i._bodyInit)}))}x.polyfill=!0,e.fetch||(e.fetch=x,e.Headers=h,e.Request=y,e.Response=w),t.Headers=h,t.Request=y,t.Response=w,t.fetch=x,Object.defineProperty(t,"__esModule",{value:!0})}({})}(n),n.fetch.ponyfill=!0,delete n.fetch.polyfill;var a=n;(t=a.fetch).default=a.fetch,t.fetch=a.fetch,t.Headers=a.Headers,t.Request=a.Request,t.Response=a.Response,e.exports=t}},t={};function r(n){var a=t[n];if(void 0!==a)return a.exports;var o=t[n]={exports:{}};return e[n].call(o.exports,o,o.exports,r),o.exports}r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,{a:t}),t},r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};return function(){"use strict";r.r(n),r.d(n,{FEATURES:function(){return l},GAS_PRICE_TYPE:function(){return c},LabelValue:function(){return s},Operation:function(){return t},RPC_AUTHENTICATION:function(){return u}
1,SafeAppAccessPolicyTypes:function(){return e},TokenType:function(){return f},TransactionStatus:function(){return a},TransactionTokenType:function(){return i},TransferDirection:function(){return o},getBalances:function(){return g},getChainConfig:function(){return A},getChainsConfig:function(){return P},getCollectibles:function(){return k},getDecodedData:function(){return C},getFiatCurrencies:function(){return b},getMasterCopies:function(){return S},getOwnedSafes:function(){return y},getSafeApps:function(){return N},getSafeInfo:function(){return m},getTransactionDetails:function(){return x},getTransactionHistory:function(){return w},getTransactionQueue:function(){return E},postSafeGasEstimation:function(){return _},proposeTransaction:function(){return T}});var e,t,a,o,i,s,u,c,l,f,h=r(98),d=r.n(h);function p(e,t){return r=this,n=void 0,o=function(){var r,n,a,o,i;return function(e,t){var r,n,a,o,i={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;i;)try{if(r=1,n&&(a=2&o[0]?n.return:o[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,o[1])).done)return a;switch(n=0,a&&(o=[2&o[0],a.value]),o[0]){case 0:case 1:a=o;break;case 4:return i.label++,{value:o[1],done:!1};case 5:i.label++,n=o[1],o=[0];continue;case 7:o=i.ops.pop(),i.trys.pop();continue;default:if(!((a=(a=i.trys).length>0&&a[a.length-1])||6!==o[0]&&2!==o[0])){i=0;continue}if(3===o[0]&&(!a||o[1]>a[0]&&o[1]<a[3])){i.label=o[1];break}if(6===o[0]&&i.label<a[1]){i.label=a[1],a=o;break}if(a&&i.label<a[2]){i.label=a[2],i.ops.push(o);break}a[2]&&i.ops.pop(),i.trys.pop();continue}o=t.call(e,i)}catch(e){o=[6,e],n=0}finally{r=a=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}(this,(function(s){switch(s.label){case 0:return null!=t&&(r={method:"POST",body:"string"==typeof t?t:JSON.stringify(t),headers:{"Content-Type":"application/json"}}),[4,d()(e,r)];case 1:return[4,(n=s.sent()).json()];case 2:if(a=s.sent(),!n.ok){o="";try{o=(i=a).code+": "+i.message}catch(e){o=n.statusText}throw new Error(o)}return[2,a]}}))},new((a=void 0)||(a=Promise))((function(e,t){function i(e){try{u(o.next(e))}catch(e){t(e)}}function s(e){try{u(o.throw(e))}catch(e){t(e)}}function u(t){var r;t.done?e(t.value):(r=t.value,r instanceof a?r:new a((function(e){e(r)}))).then(i,s)}u((o=o.apply(r,n||[])).next())}));var r,n,a,o}function v(e,t,r,n){if(n)return p(n);var a=r;return p(""+e+function(e,t){return t?Object.keys(t).reduce((function(e,r){return function(e,t,r){return e.replace(new RegExp("\\{"+t+"\\}","g"),r)}(e,r,String(t[r]))}),e):e}(t,null==a?void 0:a.path)+function(e){if(!e)return"";var t=new URLSearchParams;Object.keys(e).forEach((function(r){null!=e[r]&&t.append(r,String(e[r]))}));var r=t.toString();return r?"?"+r:""}(null==a?void 0:a.query),null==a?void 0:a.body)}function m(e,t,r){return v(e,"/v1/chains/{chainId}/safes/{address}",{path:{chainId:t,address:r}})}function g(e,t,r,n,a){return void 0===n&&(n="usd"),void 0===a&&(a={}),v(e,"/v1/chains/{chainId}/safes/{address}/balances/{currency}",{path:{chainId:t,address:r,currency:n},query:a})}function b(e){return v(e,"/v1/balances/supported-fiat-codes")}function y(e,t,r){return v(e,"/v1/chains/{chainId}/owners/{address}/safes",{path:{chainId:t,address:r}})}function k(e,t,r,n){return void 0===n&&(n={}),v(e,"/v1/chains/{chainId}/safes/{address}/collectibles",{path:{chainId:t,address:r},query:n})}function w(e,t,r,n){return v(e,"/v1/chains/{chainId}/safes/{safe_address}/transactions/history",{path:{chainId:t,safe_address:r},query:{}},n)}function E(e,t,r,n){return v(e,"/v1/chains/{chainId}/safes/{safe_address}/transactions/queued",{path:{chainId:t,safe_address:r},query:{}},n)}function x(e,t,r){return v(e,"/v1/chains/{chainId}/transactions/{transactionId}",{path:{chainId:t,transactionId:r}})}function _(e,t,r,n){return v(e,"/v2/chains/{chainId}/safes/{safe_address}/multisig-transactions/estimations",{path:{chainId:t,safe_address:r},body:n})}function T(e,t,r,n){return v(e,"/v1/chains/{chainId}/transactions/{safe_address}/propose",{path:{chainId:t,safe_address:r},body:n})}function P(e,t){return v(e,"/v1/chains",{query:t})}function A(e,t){return v(e,"/v1/chains/{chainId}",{path:{chainId:t}})}function N(e,t,r){return void 0===r&&(r={}),v(e,"/v1/chains/{chainId}/safe-apps",{path:{chainId:t},query:r})}function S(e,t){return v(e,"/v1/chains/{chainId}/about/master-copies",{path:{chainId:t}})}function C(e,t,r){return v(e,"/v1/chains/{chainId}/data-decoder",{path:{chainId:t},body:{data:r}})}!function(e){e.NoRestrictions="NO_RESTRICTIONS",e.DomainAllowlist="DOMAIN_ALLOWLIST"}(e||(e={})),function(e){e[e.CALL=0]="CALL",e[e.DELEGATE=1]="DELEGATE"}(t||(t={})),function(e){e.AWAITING_CONFIRMATIONS="AWAITING_CONFIRMATIONS",e.AWAITING_EXECUTION="AWAITING_EXECUTION",e.CANCELLED="CANCELLED",e.FAILED="FAILED",e.SUCCESS="SUCCESS",e.PENDING="PENDING",e.WILL_BE_REPLACED="WILL_BE_REPLACED"}(a||(a={}
1)),function(e){e.INCOMING="INCOMING",e.OUTGOING="OUTGOING",e.UNKNOWN="UNKNOWN"}(o||(o={})),function(e){e.ERC20="ERC20",e.ERC721="ERC721",e.NATIVE_COIN="NATIVE_COIN"}(i||(i={})),function(e){e.Queued="Queued",e.Next="Next"}(s||(s={})),function(e){e.API_KEY_PATH="API_KEY_PATH",e.NO_AUTHENTICATION="NO_AUTHENTICATION",e.UNKNOWN="UNKNOWN"}(u||(u={})),function(e){e.ORACLE="ORACLE",e.FIXED="FIXED",e.UNKNOWN="UNKNOWN"}(c||(c={})),function(e){e.ERC721="ERC721",e.SAFE_APPS="SAFE_APPS",e.CONTRACT_INTERACTION="CONTRACT_INTERACTION",e.DOMAIN_LOOKUP="DOMAIN_LOOKUP",e.SPENDING_LIMIT="SPENDING_LIMIT",e.EIP1559="EIP1559",e.SAFE_TX_GAS_OPTIONAL="SAFE_TX_GAS_OPTIONAL"}(l||(l={})),function(e){e.ERC20="ERC20",e.ERC721="ERC721",e.NATIVE_TOKEN="NATIVE_TOKEN"}(f||(f={}))}(),n}()},72010:function(e){"use strict";e.exports=JSON.parse('{"name":"@gnosis.pm/safe-apps-sdk","version":"6.3.0","description":"SDK developed to integrate third-party apps with Safe app.","main":"dist/src/index.js","typings":"dist/src/index.d.ts","_files":["dist/**/*","README.md"],"keywords":["Gnosis","sdk","apps"],"scripts":{"test":"jest","format-dist":"sed -i \'s/\\"files\\":/\\"_files\\":/\' dist/package.json","build":"yarn rimraf dist && tsc && yarn format-dist","lint":"tslint -p tsconfig.json"},"author":"Gnosis (https://gnosis.io)","license":"MIT","dependencies":{"@gnosis.pm/safe-react-gateway-sdk":"^2.8.5","ethers":"^5.4.7"},"devDependencies":{"rimraf":"^3.0.2"},"repository":{"type":"git","url":"git+https://github.com/gnosis/safe-apps-sdk.git"},"bugs":{"url":"https://github.com/gnosis/safe-apps-sdk/issues"},"homepage":"https://github.com/gnosis/safe-apps-sdk#readme","publishConfig":{"access":"public"}}')}}]);

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.