1"use strict";(self["webpackChunkping_wallet"]=self["webpackChunkping_wallet"]||[]).push([[4339],{16441:function(t,r,e){e.d(r,{lE:function(){return h},zo:function(){return f},xs:function(){return w},E1:function(){return E},p3:function(){return y},$m:function(){return A},Dv:function(){return v},_t:function(){return l},Zq:function(){return c},A7:function(){return p},gV:function(){return _},N:function(){return N},G1:function(){return d},Bu:function(){return g}});var n=e(1581);const i="bytes/5.7.0",o=new n.Yd(i);function s(t){return!!t.toHexString}function a(t){return t.slice||(t.slice=function(){const r=Array.prototype.slice.call(arguments);return a(new Uint8Array(Array.prototype.slice.apply(t,r)))}),t}function c(t){return p(t)&&!(t.length%2)||l(t)}function u(t){return"number"===typeof t&&t==t&&t%1===0}function l(t){if(null==t)return!1;if(t.constructor===Uint8Array)return!0;if("string"===typeof t)return!1;if(!u(t.length)||t.length<0)return!1;for(let r=0;r<t.length;r++){const e=t[r];if(!u(e)||e<0||e>=256)return!1}return!0}function h(t,r){if(r||(r={}),"number"===typeof t){o.checkSafeUint53(t,"invalid arrayify value");const r=[];while(t)r.unshift(255&t),t=parseInt(String(t/256));return 0===r.length&&r.push(0),a(new Uint8Array(r))}if(r.allowMissingPrefix&&"string"===typeof t&&"0x"!==t.substring(0,2)&&(t="0x"+t),s(t)&&(t=t.toHexString()),p(t)){let e=t.substring(2);e.length%2&&("left"===r.hexPad?e="0"+e:"right"===r.hexPad?e+="0":o.throwArgumentError("hex data is odd-length","value",t));const n=[];for(let t=0;t<e.length;t+=2)n.push(parseInt(e.substring(t,t+2),16));return a(new Uint8Array(n))}return l(t)?a(new Uint8Array(t)):o.throwArgumentError("invalid arrayify value","value",t)}function f(t){const r=t.map((t=>h(t))),e=r.reduce(((t,r)=>t+r.length),0),n=new Uint8Array(e);return r.reduce(((t,r)=>(n.set(r,t),t+r.length)),0),a(n)}function d(t){let r=h(t);if(0===r.length)return r;let e=0;while(e<r.length&&0===r[e])e++;return e&&(r=r.slice(e)),r}function g(t,r){t=h(t),t.length>r&&o.throwArgumentError("value out of range","value",arguments[0]);const e=new Uint8Array(r);return e.set(t,r-t.length),a(e)}function p(t,r){return!("string"!==typeof t||!t.match(/^0x[0-9A-Fa-f]*$/))&&(!r||t.length===2+2*r)}
1const m="0123456789abcdef";function v(t,r){if(r||(r={}),"number"===typeof t){o.checkSafeUint53(t,"invalid hexlify value");let r="";while(t)r=m[15&t]+r,t=Math.floor(t/16);return r.length?(r.length%2&&(r="0"+r),"0x"+r):"0x00"}if("bigint"===typeof t)return t=t.toString(16),t.length%2?"0x0"+t:"0x"+t;if(r.allowMissingPrefix&&"string"===typeof t&&"0x"!==t.substring(0,2)&&(t="0x"+t),s(t))return t.toHexString();if(p(t))return t.length%2&&("left"===r.hexPad?t="0x0"+t.substring(2):"right"===r.hexPad?t+="0":o.throwArgumentError("hex data is odd-length","value",t)),t.toLowerCase();if(l(t)){let r="0x";for(let e=0;e<t.length;e++){let n=t[e];r+=m[(240&n)>>4]+m[15&n]}return r}return o.throwArgumentError("invalid hexlify value","value",t)}function E(t){if("string"!==typeof t)t=v(t);else if(!p(t)||t.length%2)return null;return(t.length-2)/2}function y(t,r,e){return"string"!==typeof t?t=v(t):(!p(t)||t.length%2)&&o.throwArgumentError("invalid hexData","value",t),r=2+2*r,null!=e?"0x"+t.substring(r,2+2*e):"0x"+t.substring(r)}function w(t){let r="0x";return t.forEach((t=>{r+=v(t).substring(2)})),r}function A(t,r){"string"!==typeof t?t=v(t):p(t)||o.throwArgumentError("invalid hex string","value",t),t.length>2*r+2&&o.throwArgumentError("value out of range","value",arguments[1]);while(t.length<2*r+2)t="0x0"+t.substring(2);return t}function N(t){const r={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(c(t)){let e=h(t);64===e.length?(r.v=27+(e[32]>>7),e[32]&=127,r.r=v(e.slice(0,32)),r.s=v(e.slice(32,64))):65===e.length?(r.r=v(e.slice(0,32)),r.s=v(e.slice(32,64)),r.v=e[64]):o.throwArgumentError("invalid signature string","signature",t),r.v<27&&(0===r.v||1===r.v?r.v+=27:o.throwArgumentError("signature invalid v byte","signature",t)),r.recoveryParam=1-r.v%2,r.recoveryParam&&(e[32]|=128),r._vs=v(e.slice(32,64))}else{if(r.r=t.r,r.s=t.s,r.v=t.v,r.recoveryParam=t.recoveryParam,r._vs=t._vs,null!=r._vs){const e=g(h(r._vs),32);r._vs=v(e);const n=e[0]>=128?1:0;null==r.recoveryParam?r.recoveryParam=n:r.recoveryParam!==n&&o.throwArgumentError("signature recoveryParam mismatch _vs","signature",t),e[0]&=127;const i=v(e);null==r.s?r.s=i:r.s!==i&&o.throwArgumentError("signature v mismatch _vs","signature",t)}if(null==r.recoveryParam)null==r.v?o.throwArgumentError("signature missing v and recoveryParam","signature",t):0===r.v||1===r.v?r.recoveryParam=r.v:r.recoveryParam=1-r.v%2;else if(null==r.v)r.v=27+r.recoveryParam;else{const e=0===r.v||1===r.v?r.v:1-r.v%2;r.recoveryParam!==e&&o.throwArgumentError("signature recoveryParam mismatch v","signature",t)}null!=r.r&&p(r.r)?r.r=A(r.r,32):o.throwArgumentError("signature missing or invalid r","signature",t),null!=r.s&&p(r.s)?r.s=A(r.s,32):o.throwArgumentError("signature missing or invalid s","signature",t);const e=h(r.s);e[0]>=128&&o.throwArgumentError("signature s out of range","signature",t),r.recoveryParam&&(e[0]|=128);const n=v(e);r._vs&&(p(r._vs)||o.throwArgumentError("signature invalid _vs","signature",t),r._vs=A(r._vs,32)),null==r._vs?r._vs=n:r._vs!==n&&o.throwArgumentError("signature _vs mismatch v and s","signature",t)}return r.yParityAndS=r._vs,r.compact=r.r+r.yParityAndS.substring(2),r}function _(t){return t=N(t),v(f([t.r,t.s,t.recoveryParam?"0x1c":"0x1b"]))}},21046:function(t,r,e){e.d(r,{Bz:function(){return a},_Y:function(){return o},fh:function(){return s},tL:function(){return i}});var n=e(6731);const i=n.O$.from(-1),o=n.O$.from(0),s=n.O$.from(1),a=n.O$.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff")},64146:function(t,r,e){e.d(r,{lV:function(){return D}});var n=e(61184),i=e(53651),o=e(81556),s=e(48088),a=e(19485),c=e(6731),u=e(16441),l=e(6881),h=e(83875),f=e(1581);const d="contracts/5.7.0";var g=function(t,r,e,n){function i(t){return t instanceof e?t:new e((function(r){r(t)}))}return new(e||(e=Promise))((function(e,o){function s(t){try{c(n.next(t))}catch(r){o(r)}}function a(t){try{c(n["throw"](t))}catch(r){o(r)}}function c(t){t.done?e(t.value):i(t.value).then(s,a)}c((n=n.apply(t,r||[])).next())}))};const p=new f.Yd(d),m={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 v(t,r){return g(this,void 0,void 0,(function*(){const e=yield r;"string"!==typeof e&&p.throwArgumentError("invalid address or ENS name","name",e);try{return(0,a.Kn)(e)}catch(i){}t||p.throwError("a provider or signer is needed to resolve ENS names",f.Yd.errors.UNSUPPORTED_OPERATION,{operation:"resolveName"});const n=yield t.resolveName(e);return null==n&&p.throwArgumentError("resolver or addr is not configured for ENS name","name",e),n}))}function E(t,r,e){return g(this,void 0,void 0,(function*(){return Array.isArray(e)?yield Promise.all(e.map(((e,n)=>E(t,Array.isArray(r)?r[n]:r[e.name],e)))):"address"===e.type?yield v(t,r):"tuple"===e.type?yield E(t,r,e.components):"array"===e.baseType?Array.isArray(r)?yield Promise.all(r.map((r=>E(t,r,e.arrayChildren)))):Promise.reject(p.makeError("invalid value for array",f.Yd.errors.INVALID_ARGUMENT,{argument:"value",value:r})):r}))}function y(t,r,e){return g(this,void 0,void 0,(function*(){let n={};e.length===r.inputs.length+1&&"object"===typeof e[e.length-1]&&(n=(0,l.DC)(e.pop())),p.checkArgumentCount(e.length,r.inputs.length,"passed to contract"),t.signer?n.from?n.from=(0,l.mE)({override:v(t.signer,n.from),signer:t.signer.getAddress()}).then((t=>g(this,void 0,void 0,(function*(){return(0,a.Kn)(t.signer)!==t.override&&p.throwError("Contract with a Signer cannot override from",f.Yd.errors.UNSUPPORTED_OPERATION,{operation:"overrides.from"}),t.override})))):n.from=t.signer.getAddress():n.from&&(n.from=v(t.provider,n.from));
1const i=yield(0,l.mE)({args:E(t.signer||t.provider,e,r.inputs),address:t.resolvedAddress,overrides:(0,l.mE)(n)||{}}),o=t.interface.encodeFunctionData(r,i.args),s={data:o,to:i.address},d=i.overrides;if(null!=d.nonce&&(s.nonce=c.O$.from(d.nonce).toNumber()),null!=d.gasLimit&&(s.gasLimit=c.O$.from(d.gasLimit)),null!=d.gasPrice&&(s.gasPrice=c.O$.from(d.gasPrice)),null!=d.maxFeePerGas&&(s.maxFeePerGas=c.O$.from(d.maxFeePerGas)),null!=d.maxPriorityFeePerGas&&(s.maxPriorityFeePerGas=c.O$.from(d.maxPriorityFeePerGas)),null!=d.from&&(s.from=d.from),null!=d.type&&(s.type=d.type),null!=d.accessList&&(s.accessList=(0,h.z7)(d.accessList)),null==s.gasLimit&&null!=r.gas){let t=21e3;const e=(0,u.lE)(o);for(let r=0;r<e.length;r++)t+=4,e[r]&&(t+=64);s.gasLimit=c.O$.from(r.gas).add(t)}if(d.value){const t=c.O$.from(d.value);t.isZero()||r.payable||p.throwError("non-payable method cannot override value",f.Yd.errors.UNSUPPORTED_OPERATION,{operation:"overrides.value",value:n.value}),s.value=t}d.customData&&(s.customData=(0,l.DC)(d.customData)),d.ccipReadEnabled&&(s.ccipReadEnabled=!!d.ccipReadEnabled),delete n.nonce,delete n.gasLimit,delete n.gasPrice,delete n.from,delete n.value,delete n.type,delete n.accessList,delete n.maxFeePerGas,delete n.maxPriorityFeePerGas,delete n.customData,delete n.ccipReadEnabled;const m=Object.keys(n).filter((t=>null!=n[t]));return m.length&&p.throwError(`cannot override ${m.map((t=>JSON.stringify(t))).join(",")}`,f.Yd.errors.UNSUPPORTED_OPERATION,{operation:"overrides",overrides:m}),s}))}function w(t,r){return function(...e){return y(t,r,e)}}function A(t,r){const e=t.signer||t.provider;return function(...n){return g(this,void 0,void 0,(function*(){e||p.throwError("estimate require a provider or signer",f.Yd.errors.UNSUPPORTED_OPERATION,{operation:"estimateGas"});const i=yield y(t,r,n);return yield e.estimateGas(i)}))}}function N(t,r){const e=r.wait.bind(r);r.wait=r=>e(r).then((r=>(r.events=r.logs.map((e=>{let n=(0,l.p$)(e),i=null;try{i=t.interface.parseLog(e)}catch(o){}return i&&(n.args=i.args,n.decode=(r,e)=>t.interface.decodeEventLog(i.eventFragment,r,e),n.event=i.name,n.eventSignature=i.signature),n.removeListener=()=>t.provider,n.getBlock=()=>t.provider.getBlock(r.blockHash),n.getTransaction=()=>t.provider.getTransaction(r.transactionHash),n.getTransactionReceipt=()=>Promise.resolve(r),n})),r)))}function _(t,r,e){const n=t.signer||t.provider;return function(...i){return g(this,void 0,void 0,(function*(){let o;if(i.length===r.inputs.length+1&&"object"===typeof i[i.length-1]){const t=(0,l.DC)(i.pop());null!=t.blockTag&&(o=yield t.blockTag),delete t.blockTag,i.push(t)}null!=t.deployTransaction&&(yield t._deployed(o));const s=yield y(t,r,i),a=yield n.call(s,o);try{let n=t.interface.decodeFunctionResult(r,a);return e&&1===r.outputs.length&&(n=n[0]),n}catch(c){throw c.code===f.Yd.errors.CALL_EXCEPTION&&(c.address=t.address,c.args=i,c.transaction=s),c}}))}}function O(t,r){return function(...e){return g(this,void 0,void 0,(function*(){t.signer||p.throwError("sending a transaction requires a signer",f.Yd.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction"}),null!=t.deployTransaction&&(yield t._deployed());const n=yield y(t,r,e),i=yield t.signer.sendTransaction(n);return N(t,i),i}))}}function R(t,r,e){return r.constant?_(t,r,e):O(t,r)}function b(t){return!t.address||null!=t.topics&&0!==t.topics.length?(t.address||"*")+"@"+(t.topics?t.topics.map((t=>Array.isArray(t)?t.join("|"):t)).join(":"):""):"*"}class P{constructor(t,r){(0,l.zG)(this,"tag",t),(0,l.zG)(this,"filter",r),this._listeners=[]}addListener(t,r){this._listeners.push({listener:t,once:r})}removeListener(t){let r=!1;this._listeners=this._listeners.filter((e=>!(!r&&e.listener===t)||(r=!0,!1)))}removeAllListeners(){this._listeners=[]}listeners(){return this._listeners.map((t=>t.listener))}listenerCount(){return this._listeners.length}run(t){const r=this.listenerCount();return this._listeners=this._listeners.filter((r=>{const e=t.slice();return setTimeout((()=>{r.listener.apply(this,e)}),0),!r.once})),r}prepareEvent(t){}getEmit(t){return[t]}}class x extends P{constructor(){super("error",null)}}class T extends P{constructor(t,r,e,n){const i={address:t};let o=r.getEventTopic(e);n?(o!==n[0]&&p.throwArgumentError("topic mismatch","topics",n),i.topics=n.slice()):i.topics=[o],super(b(i),i),(0,l.zG)(this,"address",t),(0,l.zG)(this,"interface",r),
1(0,l.zG)(this,"fragment",e)}prepareEvent(t){super.prepareEvent(t),t.event=this.fragment.name,t.eventSignature=this.fragment.format(),t.decode=(t,r)=>this.interface.decodeEventLog(this.fragment,t,r);try{t.args=this.interface.decodeEventLog(this.fragment,t.data,t.topics)}catch(r){t.args=null,t.decodeError=r}}getEmit(t){const r=(0,n.BR)(t.args);if(r.length)throw r[0].error;const e=(t.args||[]).slice();return e.push(t),e}}class C extends P{constructor(t,r){super("*",{address:t}),(0,l.zG)(this,"address",t),(0,l.zG)(this,"interface",r)}prepareEvent(t){super.prepareEvent(t);try{const r=this.interface.parseLog(t);t.event=r.name,t.eventSignature=r.signature,t.decode=(t,e)=>this.interface.decodeEventLog(r.eventFragment,t,e),t.args=r.args}catch(r){}}}class I{constructor(t,r,e){(0,l.zG)(this,"interface",(0,l.tu)(new.target,"getInterface")(r)),null==e?((0,l.zG)(this,"provider",null),(0,l.zG)(this,"signer",null)):s.E.isSigner(e)?((0,l.zG)(this,"provider",e.provider||null),(0,l.zG)(this,"signer",e)):o.zt.isProvider(e)?((0,l.zG)(this,"provider",e),(0,l.zG)(this,"signer",null)):p.throwArgumentError("invalid signer or provider","signerOrProvider",e),(0,l.zG)(this,"callStatic",{}),(0,l.zG)(this,"estimateGas",{}),(0,l.zG)(this,"functions",{}),(0,l.zG)(this,"populateTransaction",{}),(0,l.zG)(this,"filters",{});{const t={};Object.keys(this.interface.events).forEach((r=>{const e=this.interface.events[r];(0,l.zG)(this.filters,r,((...t)=>({address:this.address,topics:this.interface.encodeFilterTopics(e,t)}))),t[e.name]||(t[e.name]=[]),t[e.name].push(r)})),Object.keys(t).forEach((r=>{const e=t[r];1===e.length?(0,l.zG)(this.filters,r,this.filters[e[0]]):p.warn(`Duplicate definition of ${r} (${e.join(", ")})`)}))}if((0,l.zG)(this,"_runningEvents",{}),(0,l.zG)(this,"_wrappedEmits",{}),null==t&&p.throwArgumentError("invalid contract address or ENS name","addressOrName",t),(0,l.zG)(this,"address",t),this.provider)(0,l.zG)(this,"resolvedAddress",v(this.provider,t));else try{(0,l.zG)(this,"resolvedAddress",Promise.resolve((0,a.Kn)(t)))}catch(c){p.throwError("provider is required to use ENS name as contract address",f.Yd.errors.UNSUPPORTED_OPERATION,{operation:"new Contract"})}this.resolvedAddress.catch((t=>{}));const n={},i={};Object.keys(this.interface.functions).forEach((t=>{const r=this.interface.functions[t];if(i[t])p.warn(`Duplicate ABI entry for ${JSON.stringify(t)}`);else{i[t]=!0;{const e=r.name;n[`%${e}`]||(n[`%${e}`]=[]),n[`%${e}`].push(t)}null==this[t]&&(0,l.zG)(this,t,R(this,r,!0)),null==this.functions[t]&&(0,l.zG)(this.functions,t,R(this,r,!1)),null==this.callStatic[t]&&(0,l.zG)(this.callStatic,t,_(this,r,!0)),null==this.populateTransaction[t]&&(0,l.zG)(this.populateTransaction,t,w(this,r)),null==this.estimateGas[t]&&(0,l.zG)(this.estimateGas,t,A(this,r))}})),Object.keys(n).forEach((t=>{const r=n[t];if(r.length>1)return;t=t.substring(1);const e=r[0];try{null==this[t]&&(0,l.zG)(this,t,this[e])}catch(i){}null==this.functions[t]&&(0,l.zG)(this.functions,t,this.functions[e]),null==this.callStatic[t]&&(0,l.zG)(this.callStatic,t,this.callStatic[e]),null==this.populateTransaction[t]&&(0,l.zG)(this.populateTransaction,t,this.populateTransaction[e]),null==this.estimateGas[t]&&(0,l.zG)(this.estimateGas,t,this.estimateGas[e])}))}static getContractAddress(t){return(0,a.CR)(t)}static getInterface(t){return i.vU.isInterface(t)?t:new i.vU(t)}deployed(){return this._deployed()}_deployed(t){return this._deployedPromise||(this.deployTransaction?this._deployedPromise=this.deployTransaction.wait().then((()=>this)):this._deployedPromise=this.provider.getCode(this.address,t).then((t=>("0x"===t&&p.throwError("contract not deployed",f.Yd.errors.UNSUPPORTED_OPERATION,{contractAddress:this.address,operation:"getDeployed"}),this)))),this._deployedPromise}fallback(t){this.signer||p.throwError("sending a transactions require a signer",f.Yd.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction(fallback)"});const r=(0,l.DC)(t||{});return["from","to"].forEach((function(t){null!=r[t]&&p.throwError("cannot override "+t,f.Yd.errors.UNSUPPORTED_OPERATION,{operation:t})})),r.to=this.resolvedAddress,this.deployed().then((()=>this.signer.sendTransaction(r)))}connect(t){"string"===typeof t&&(t=new s.b(t,this.provider));const r=new this.constructor(this.address,this.interface,t);return this.deployTransaction&&(0,l.zG)(r,"deployTransaction",this.deployTransaction),r}attach(t){return new this.constructor(t,this.interface,this.signer||this.provider)}static isIndexed(t){return i.Hk.isIndexed(t)}_normalizeRunningEvent(t){return this._runningEvents[t.tag]?this._runningEvents[t.tag]:t}_getRunningEvent(t){if("string"===typeof t){if("error"===t)return this._normalizeRunningEvent(new x);if("event"===t)return this._normalizeRunningEvent(new P("event",null));if("*"===t)return this._normalizeRunningEvent(new C(this.address,this.interface));const r=this.interface.getEvent(t);return this._normalizeRunningEvent(new T(this.address,this.interface,r))}if(t.topics&&t.topics.length>0){try{const r=t.topics[0];if("string"!==typeof r)throw new Error("invalid topic");const e=this.interface.getEvent(r);return this._normalizeRunningEvent(new T(this.address,this.interface,e,t.topics))}catch(r){}const e={address:this.address,topics:t.topics};return this._normalizeRunningEvent(new P(b(e),e))}return this._normalizeRunningEvent(new C(this.address,this.interface))}_checkRunningEvents(t){if(0===t.listenerCount()){delete this._runningEvents[t.tag];const r=this._wrappedEmits[t.tag];r&&t.filter&&(this.provider.off(t.filter,r),delete this._wrappedEmits[t.tag])}}_wrapEvent(t,r,e){const n=(0,l.p$)(r);return n.removeListener=()=>{e&&(t.removeListener(e),this._checkRunningEvents(t))},n.getBlock=()=>this.provider.getBlock(r.blockHash),n.getTransaction=()=>this.provider.getTransaction(r.transactionHash),n.getTransactionReceipt=()=>this.provider.getTransactionReceipt(r.transactionHash),t.prepareEvent(n),n}_addEventListener(t,r,e){if(this.provider||p.throwError("events require a provider or a signer with a provider",f.Yd.errors.UNSUPPORTED_OPERATION,{operation:"once"}),t.addListener(r,e),this._runningEvents[t.tag]=t,!this._wrappedEmits[t.tag]){const e=e=>{let n=this._wrapEvent(t,e,r);
1if(null==n.decodeError)try{const r=t.getEmit(n);this.emit(t.filter,...r)}catch(i){n.decodeError=i.error}null!=t.filter&&this.emit("event",n),null!=n.decodeError&&this.emit("error",n.decodeError,n)};this._wrappedEmits[t.tag]=e,null!=t.filter&&this.provider.on(t.filter,e)}}queryFilter(t,r,e){const n=this._getRunningEvent(t),i=(0,l.DC)(n.filter);return"string"===typeof r&&(0,u.A7)(r,32)?(null!=e&&p.throwArgumentError("cannot specify toBlock with blockhash","toBlock",e),i.blockHash=r):(i.fromBlock=null!=r?r:0,i.toBlock=null!=e?e:"latest"),this.provider.getLogs(i).then((t=>t.map((t=>this._wrapEvent(n,t,null)))))}on(t,r){return this._addEventListener(this._getRunningEvent(t),r,!1),this}once(t,r){return this._addEventListener(this._getRunningEvent(t),r,!0),this}emit(t,...r){if(!this.provider)return!1;const e=this._getRunningEvent(t),n=e.run(r)>0;return this._checkRunningEvents(e),n}listenerCount(t){return this.provider?null==t?Object.keys(this._runningEvents).reduce(((t,r)=>t+this._runningEvents[r].listenerCount()),0):this._getRunningEvent(t).listenerCount():0}listeners(t){if(!this.provider)return[];if(null==t){const t=[];for(let r in this._runningEvents)this._runningEvents[r].listeners().forEach((r=>{t.push(r)}));return t}return this._getRunningEvent(t).listeners()}removeAllListeners(t){if(!this.provider)return this;if(null==t){for(const t in this._runningEvents){const r=this._runningEvents[t];r.removeAllListeners(),this._checkRunningEvents(r)}return this}const r=this._getRunningEvent(t);return r.removeAllListeners(),this._checkRunningEvents(r),this}off(t,r){if(!this.provider)return this;const e=this._getRunningEvent(t);return e.removeListener(r),this._checkRunningEvents(e),this}removeListener(t,r){return this.off(t,r)}}class U extends I{}class D{constructor(t,r,e){let n=null;n="string"===typeof r?r:(0,u._t)(r)?(0,u.Dv)(r):r&&"string"===typeof r.object?r.object:"!","0x"!==n.substring(0,2)&&(n="0x"+n),(!(0,u.A7)(n)||n.length%2)&&p.throwArgumentError("invalid bytecode","bytecode",r),e&&!s.E.isSigner(e)&&p.throwArgumentError("invalid signer","signer",e),(0,l.zG)(this,"bytecode",n),(0,l.zG)(this,"interface",(0,l.tu)(new.target,"getInterface")(t)),(0,l.zG)(this,"signer",e||null)}getDeployTransaction(...t){let r={};if(t.length===this.interface.deploy.inputs.length+1&&"object"===typeof t[t.length-1]){r=(0,l.DC)(t.pop());for(const t in r)if(!m[t])throw new Error("unknown transaction override "+t)}if(["data","from","to"].forEach((t=>{null!=r[t]&&p.throwError("cannot override "+t,f.Yd.errors.UNSUPPORTED_OPERATION,{operation:t})})),r.value){const t=c.O$.from(r.value);t.isZero()||this.interface.deploy.payable||p.throwError("non-payable constructor cannot override value",f.Yd.errors.UNSUPPORTED_OPERATION,{operation:"overrides.value",value:r.value})}return p.checkArgumentCount(t.length,this.interface.deploy.inputs.length," in Contract constructor"),r.data=(0,u.Dv)((0,u.zo)([this.bytecode,this.interface.encodeDeploy(t)])),r}deploy(...t){return g(this,void 0,void 0,(function*(){let r={};t.length===this.interface.deploy.inputs.length+1&&(r=t.pop()),p.checkArgumentCount(t.length,this.interface.deploy.inputs.length," in Contract constructor");const e=yield E(this.signer,t,this.interface.deploy.inputs);e.push(r);const n=this.getDeployTransaction(...e),i=yield this.signer.sendTransaction(n),o=(0,l.tu)(this.constructor,"getContractAddress")(i),s=(0,l.tu)(this.constructor,"getContract")(o,this.interface,this.signer);return N(s,i),(0,l.zG)(s,"deployTransaction",i),s}))}attach(t){return this.constructor.getContract(t,this.interface,this.signer)}connect(t){return new this.constructor(this.interface,this.bytecode,t)}static fromSolidity(t,r){null==t&&p.throwError("missing compiler output",f.Yd.errors.MISSING_ARGUMENT,{argument:"compilerOutput"}),"string"===typeof t&&(t=JSON.parse(t));const e=t.abi;let n=null;return t.bytecode?n=t.bytecode:t.evm&&t.evm.bytecode&&(n=t.evm.bytecode),new this(e,n,r)}static getInterface(t){return U.getInterface(t)}static getContractAddress(t){return(0,a.CR)(t)}static getContract(t,r,e){return new U(t,r,e)}}},32046:function(t,r,e){e.d(r,{id:function(){return o}});var n=e(38197),i=e(29251);function o(t){return(0,n.w)((0,i.Y0)(t))}},93684:function(t,r,e){e.d(r,{r:function(){return a}});var n=e(16441),i=e(38197),o=e(29251);const s="�Ethereum Signed Message:\n";function a(t){return"string"===typeof t&&(t=(0,o.Y0)(t)),(0,i.w)((0,n.zo)([(0,o.Y0)(s),(0,o.Y0)(String(t.length)),t]))}},73392:function(t,r,e){e.d(r,{E:function(){return P}});var n=e(19485),i=e(6731),o=e(16441),s=e(38197),a=e(6881),c=e(1581);const u="hash/5.7.0";var l=e(32046),h=function(t,r,e,n){function i(t){return t instanceof e?t:new e((function(r){r(t)}))}return new(e||(e=Promise))((function(e,o){function s(t){try{c(n.next(t))}catch(r){o(r)}}function a(t){try{c(n["throw"](t))}catch(r){o(r)}}function c(t){t.done?e(t.value):i(t.value).then(s,a)}c((n=n.apply(t,r||[])).next())}))};const f=new c.Yd(u),d=new Uint8Array(32);d.fill(0);const g=i.O$.from(-1),p=i.O$.from(0),m=i.O$.from(1),v=i.O$.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function E(t){const r=(0,o.lE)(t),e=r.length%32;return e?(0,o.xs)([r,d.slice(e)]):(0,o.Dv)(r)}const y=(0,o.$m)(m.toHexString(),32),w=(0,o.$m)(p.toHexString(),32),A={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},N=["name","version","chainId","verifyingContract","salt"];function _(t){return function(r){return"string"!==typeof r&&f.throwArgumentError(`invalid domain value for ${JSON.stringify(t)}`,`domain.${t}`,r),r}}
1const O={name:_("name"),version:_("version"),chainId:function(t){try{return i.O$.from(t).toString()}catch(r){}return f.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",t)},verifyingContract:function(t){try{return(0,n.Kn)(t).toLowerCase()}catch(r){}return f.throwArgumentError('invalid domain value "verifyingContract"',"domain.verifyingContract",t)},salt:function(t){try{const r=(0,o.lE)(t);if(32!==r.length)throw new Error("bad length");return(0,o.Dv)(r)}catch(r){}return f.throwArgumentError('invalid domain value "salt"',"domain.salt",t)}};function R(t){{const r=t.match(/^(u?)int(\d*)$/);if(r){const e=""===r[1],n=parseInt(r[2]||"256");(n%8!==0||n>256||r[2]&&r[2]!==String(n))&&f.throwArgumentError("invalid numeric width","type",t);const s=v.mask(e?n-1:n),a=e?s.add(m).mul(g):p;return function(r){const e=i.O$.from(r);return(e.lt(a)||e.gt(s))&&f.throwArgumentError(`value out-of-bounds for ${t}`,"value",r),(0,o.$m)(e.toTwos(256).toHexString(),32)}}}{const r=t.match(/^bytes(\d+)$/);if(r){const e=parseInt(r[1]);return(0===e||e>32||r[1]!==String(e))&&f.throwArgumentError("invalid bytes width","type",t),function(r){const n=(0,o.lE)(r);return n.length!==e&&f.throwArgumentError(`invalid length for ${t}`,"value",r),E(r)}}}switch(t){case"address":return function(t){return(0,o.$m)((0,n.Kn)(t),32)};case"bool":return function(t){return t?y:w};case"bytes":return function(t){return(0,s.w)(t)};case"string":return function(t){return(0,l.id)(t)}}return null}function b(t,r){return`${t}(${r.map((({name:t,type:r})=>r+" "+t)).join(",")})`}class P{constructor(t){(0,a.zG)(this,"types",Object.freeze((0,a.p$)(t))),(0,a.zG)(this,"_encoderCache",{}),(0,a.zG)(this,"_types",{});const r={},e={},n={};Object.keys(t).forEach((t=>{r[t]={},e[t]=[],n[t]={}}));for(const s in t){const n={};t[s].forEach((i=>{n[i.name]&&f.throwArgumentError(`duplicate variable name ${JSON.stringify(i.name)} in ${JSON.stringify(s)}`,"types",t),n[i.name]=!0;const o=i.type.match(/^([^\x5b]*)(\x5b|$)/)[1];o===s&&f.throwArgumentError(`circular type reference to ${JSON.stringify(o)}`,"types",t);const a=R(o);a||(e[o]||f.throwArgumentError(`unknown type ${JSON.stringify(o)}`,"types",t),e[o].push(s),r[s][o]=!0)}))}const i=Object.keys(e).filter((t=>0===e[t].length));function o(i,s){s[i]&&f.throwArgumentError(`circular type reference to ${JSON.stringify(i)}`,"types",t),s[i]=!0,Object.keys(r[i]).forEach((t=>{e[t]&&(o(t,s),Object.keys(s).forEach((r=>{n[r][t]=!0})))})),delete s[i]}0===i.length?f.throwArgumentError("missing primary type","types",t):i.length>1&&f.throwArgumentError(`ambiguous primary types or unused types: ${i.map((t=>JSON.stringify(t))).join(", ")}`,"types",t),(0,a.zG)(this,"primaryType",i[0]),o(this.primaryType,{});for(const s in n){const r=Object.keys(n[s]);r.sort(),this._types[s]=b(s,t[s])+r.map((r=>b(r,t[r]))).join("")}}getEncoder(t){let r=this._encoderCache[t];return r||(r=this._encoderCache[t]=this._getEncoder(t)),r}_getEncoder(t){{const r=R(t);if(r)return r}const r=t.match(/^(.*)(\x5b(\d*)\x5d)$/);if(r){const t=r[1],e=this.getEncoder(t),n=parseInt(r[3]);return r=>{n>=0&&r.length!==n&&f.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",r);let i=r.map(e);return this._types[t]&&(i=i.map(s.w)),(0,s.w)((0,o.xs)(i))}}const e=this.types[t];if(e){const r=(0,l.id)(this._types[t]);return t=>{const n=e.map((({name:r,type:e})=>{const n=this.getEncoder(e)(t[r]);return this._types[e]?(0,s.w)(n):n}));return n.unshift(r),(0,o.xs)(n)}}return f.throwArgumentError(`unknown type: ${t}`,"type",t)}encodeType(t){const r=this._types[t];return r||f.throwArgumentError(`unknown type: ${JSON.stringify(t)}`,"name",t),r}encodeData(t,r){return this.getEncoder(t)(r)}hashStruct(t,r){return(0,s.w)(this.encodeData(t,r))}encode(t){return this.encodeData(this.primaryType,t)}hash(t){return this.hashStruct(this.primaryType,t)}_visit(t,r,e){{const n=R(t);if(n)return e(t,r)}const n=t.match(/^(.*)(\x5b(\d*)\x5d)$/);if(n){const t=n[1],i=parseInt(n[3]);return i>=0&&r.length!==i&&f.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",r),r.map((r=>this._visit(t,r,e)))}const i=this.types[t];return i?i.reduce(((t,{name:n,type:i})=>(t[n]=this._visit(i,r[n],e),t)),{}):f.throwArgumentError(`unknown type: ${t}`,"type",t)}visit(t,r){return this._visit(this.primaryType,t,r)}static from(t){return new P(t)}static getPrimaryType(t){return P.from(t).primaryType}static hashStruct(t,r,e){return P.from(r).hashStruct(t,e)}static hashDomain(t){const r=[];for(const e in t){const n=A[e];n||f.throwArgumentError(`invalid typed-data domain key: ${JSON.stringify(e)}`,"domain",t),r.push({name:e,type:n})}return r.sort(((t,r)=>N.indexOf(t.name)-N.indexOf(r.name))),P.hashStruct("EIP712Domain",{EIP712Domain:r},t)}static encode(t,r,e){return(0,o.xs)(["0x1901",P.hashDomain(t),P.from(r).hash(e)])}static hash(t,r,e){return(0,s.w)(P.encode(t,r,e))}static resolveNames(t,r,e,n){return h(this,void 0,void 0,(function*(){t=(0,a.DC)(t);const i={};t.verifyingContract&&!(0,o.A7)(t.verifyingContract,20)&&(i[t.verifyingContract]="0x");const s=P.from(r);s.visit(e,((t,r)=>("address"!==t||(0,o.A7)(r,20)||(i[r]="0x"),r)));for(const t in i)i[t]=yield n(t);return t.verifyingContract&&i[t.verifyingContract]&&(t.verifyingContract=i[t.verifyingContract]),e=s.visit(e,((t,r)=>"address"===t&&i[r]?i[r]:r)),{domain:t,value:e}}))}static getPayload(t,r,e){P.hashDomain(t);const n={},s=[];
1N.forEach((r=>{const e=t[r];null!=e&&(n[r]=O[r](e),s.push({name:r,type:A[r]}))}));const c=P.from(r),u=(0,a.DC)(r);return u.EIP712Domain?f.throwArgumentError("types must not contain EIP712Domain type","types.EIP712Domain",r):u.EIP712Domain=s,c.encode(e),{types:u,domain:n,primaryType:c.primaryType,message:c.visit(e,((t,r)=>{if(t.match(/^bytes(\d*)/))return(0,o.Dv)((0,o.lE)(r));if(t.match(/^u?int/))return i.O$.from(r).toString();switch(t){case"address":return r.toLowerCase();case"bool":return!!r;case"string":return"string"!==typeof r&&f.throwArgumentError("invalid string","value",r),r}return f.throwArgumentError("unsupported type","type",t)}))}}}},84178:function(t,r,e){e.d(r,{m$:function(){return P},cD:function(){return b},JJ:function(){return C},oy:function(){return T}});var n=e(57727),i=e(16441),o=e(6731),s=e(29251),a=e(85306),c=e(6881),u=e(67669),l=e(2006),h=e(21261),f=e(83875),d=e(44684),g=e(1581);const p="hdnode/5.7.0",m=new g.Yd(p),v=o.O$.from("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),E=(0,s.Y0)("Bitcoin seed"),y=2147483648;function w(t){return(1<<t)-1<<8-t}function A(t){return(1<<t)-1}function N(t){return(0,i.$m)((0,i.Dv)(t),32)}function _(t){return n.eU.encode((0,i.zo)([t,(0,i.p3)((0,l.JQ)((0,l.JQ)(t)),0,4)]))}function O(t){if(null==t)return d.E.en;if("string"===typeof t){const r=d.E[t];return null==r&&m.throwArgumentError("unknown locale","wordlist",t),r}return t}const R={},b="m/44'/60'/0'/0/0";class P{constructor(t,r,e,n,o,s,a,h){if(t!==R)throw new Error("HDNode constructor cannot be called directly");if(r){const t=new u.Et(r);(0,c.zG)(this,"privateKey",t.privateKey),(0,c.zG)(this,"publicKey",t.compressedPublicKey)}else(0,c.zG)(this,"privateKey",null),(0,c.zG)(this,"publicKey",(0,i.Dv)(e));(0,c.zG)(this,"parentFingerprint",n),(0,c.zG)(this,"fingerprint",(0,i.p3)((0,l.bP)((0,l.JQ)(this.publicKey)),0,4)),(0,c.zG)(this,"address",(0,f.db)(this.publicKey)),(0,c.zG)(this,"chainCode",o),(0,c.zG)(this,"index",s),(0,c.zG)(this,"depth",a),null==h?((0,c.zG)(this,"mnemonic",null),(0,c.zG)(this,"path",null)):"string"===typeof h?((0,c.zG)(this,"mnemonic",null),(0,c.zG)(this,"path",h)):((0,c.zG)(this,"mnemonic",h),(0,c.zG)(this,"path",h.path))}get extendedKey(){if(this.depth>=256)throw new Error("Depth too large!");return _((0,i.zo)([null!=this.privateKey?"0x0488ADE4":"0x0488B21E",(0,i.Dv)(this.depth),this.parentFingerprint,(0,i.$m)((0,i.Dv)(this.index),4),this.chainCode,null!=this.privateKey?(0,i.zo)(["0x00",this.privateKey]):this.publicKey]))}neuter(){return new P(R,null,this.publicKey,this.parentFingerprint,this.chainCode,this.index,this.depth,this.path)}_derive(t){if(t>4294967295)throw new Error("invalid index - "+String(t));let r=this.path;r&&(r+="/"+(t&~y));const e=new Uint8Array(37);if(t&y){if(!this.privateKey)throw new Error("cannot derive child of neutered node");e.set((0,i.lE)(this.privateKey),1),r&&(r+="'")}else e.set((0,i.lE)(this.publicKey));for(let i=24;i>=0;i-=8)e[33+(i>>3)]=t>>24-i&255;const n=(0,i.lE)((0,l.Gy)(h.p.sha512,this.chainCode,e)),s=n.slice(0,32),a=n.slice(32);let c=null,f=null;if(this.privateKey)c=N(o.O$.from(s).add(this.privateKey).mod(v));else{const t=new u.Et((0,i.Dv)(s));f=t._addPoint(this.publicKey)}let d=r;const g=this.mnemonic;return g&&(d=Object.freeze({phrase:g.phrase,path:r,locale:g.locale||"en"})),new P(R,c,f,this.fingerprint,N(a),t,this.depth+1,d)}derivePath(t){const r=t.split("/");if(0===r.length||"m"===r[0]&&0!==this.depth)throw new Error("invalid path - "+t);"m"===r[0]&&r.shift();let e=this;for(let n=0;n<r.length;n++){const t=r[n];if(t.match(/^[0-9]+'$/)){const r=parseInt(t.substring(0,t.length-1));if(r>=y)throw new Error("invalid path index - "+t);e=e._derive(y+r)}else{if(!t.match(/^[0-9]+$/))throw new Error("invalid path component - "+t);{const r=parseInt(t);if(r>=y)throw new Error("invalid path index - "+t);e=e._derive(r)}}}return e}static _fromSeed(t,r){const e=(0,i.lE)(t);if(e.length<16||e.length>64)throw new Error("invalid seed");const n=(0,i.lE)((0,l.Gy)(h.p.sha512,E,e));return new P(R,N(n.slice(0,32)),null,"0x00000000",N(n.slice(32)),0,0,r)}static fromMnemonic(t,r,e){return e=O(e),t=C(T(t,e),e),P._fromSeed(x(t,r),{phrase:t,path:"m",locale:e.locale})}static fromSeed(t){return P._fromSeed(t,null)}static fromExtendedKey(t){const r=n.eU.decode(t);82===r.length&&_(r.slice(0,78))===t||m.throwArgumentError("invalid extended key","extendedKey","[REDACTED]");const e=r[4],o=(0,i.Dv)(r.slice(5,9)),s=parseInt((0,i.Dv)(r.slice(9,13)).substring(2),16),a=(0,i.Dv)(r.slice(13,45)),c=r.slice(45,78);switch((0,i.Dv)(r.slice(0,4))){case"0x0488b21e":case"0x043587cf":return new P(R,null,(0,i.Dv)(c),o,a,s,e,null);case"0x0488ade4":case"0x04358394 ":if(0!==c[0])break;return new P(R,(0,i.Dv)(c.slice(1)),null,o,a,s,e,null)}return m.throwArgumentError("invalid extended key","extendedKey","[REDACTED]")}}function x(t,r){r||(r="");const e=(0,s.Y0)("mnemonic"+r,s.Uj.NFKD);
1return(0,a.n)((0,s.Y0)(t,s.Uj.NFKD),e,2048,64,"sha512")}function T(t,r){r=O(r),m.checkNormalize();const e=r.split(t);if(e.length%3!==0)throw new Error("invalid mnemonic");const n=(0,i.lE)(new Uint8Array(Math.ceil(11*e.length/8)));let o=0;for(let i=0;i<e.length;i++){let t=r.getWordIndex(e[i].normalize("NFKD"));if(-1===t)throw new Error("invalid mnemonic");for(let r=0;r<11;r++)t&1<<10-r&&(n[o>>3]|=1<<7-o%8),o++}const s=32*e.length/3,a=e.length/3,c=w(a),u=(0,i.lE)((0,l.JQ)(n.slice(0,s/8)))[0]&c;if(u!==(n[n.length-1]&c))throw new Error("invalid checksum");return(0,i.Dv)(n.slice(0,s/8))}function C(t,r){if(r=O(r),t=(0,i.lE)(t),t.length%4!==0||t.length<16||t.length>32)throw new Error("invalid entropy");const e=[0];let n=11;for(let i=0;i<t.length;i++)n>8?(e[e.length-1]<<=8,e[e.length-1]|=t[i],n-=8):(e[e.length-1]<<=n,e[e.length-1]|=t[i]>>8-n,e.push(t[i]&A(8-n)),n+=3);const o=t.length/4,s=(0,i.lE)((0,l.JQ)(t))[0]&w(o);return e[e.length-1]<<=o,e[e.length-1]|=s>>8-o,r.join(e.map((t=>r.getWord(t))))}},29816:function(t,r,e){e.d(r,{i:function(){return n}});const n="json-wallets/5.7.0"},45659:function(t,r,e){e.d(r,{w:function(){return w},qz:function(){return A}});var n=e(78826),i=e.n(n),o=e(19485),s=e(16441),a=e(38197),c=e(85306),u=e(29251),l=e(6881),h=e(1581),f=e(29816),d=e(97013);const g=new h.Yd(f.i);class p extends l.dk{isCrowdsaleAccount(t){return!(!t||!t._isCrowdsaleAccount)}}function m(t,r){const e=JSON.parse(t);r=(0,d.Ij)(r);const n=(0,o.Kn)((0,d.gx)(e,"ethaddr")),l=(0,d.p3)((0,d.gx)(e,"encseed"));l&&l.length%16===0||g.throwArgumentError("invalid encseed","json",t);const h=(0,s.lE)((0,c.n)(r,r,2e3,32,"sha256")).slice(0,16),f=l.slice(0,16),m=l.slice(16),v=new(i().ModeOfOperation.cbc)(h,f),E=i().padding.pkcs7.strip((0,s.lE)(v.decrypt(m)));let y="";for(let i=0;i<E.length;i++)y+=String.fromCharCode(E[i]);const w=(0,u.Y0)(y),A=(0,a.w)(w);return new p({_isCrowdsaleAccount:!0,address:n,privateKey:A})}function v(t){let r=null;try{r=JSON.parse(t)}catch(e){return!1}return r.encseed&&r.ethaddr}function E(t){let r=null;try{r=JSON.parse(t)}catch(e){return!1}return!(!r.version||parseInt(r.version)!==r.version||3!==parseInt(r.version))}var y=e(81964);function w(t,r,e){if(v(t)){e&&e(0);const n=m(t,r);return e&&e(1),Promise.resolve(n)}return E(t)?(0,y.pe)(t,r,e):Promise.reject(new Error("invalid JSON wallet"))}function A(t,r){if(v(t))return m(t,r);if(E(t))return(0,y.hb)(t,r);throw new Error("invalid JSON wallet")}},81964:function(t,r,e){e.d(r,{HI:function(){return T},hb:function(){return P},pe:function(){return x}});var n=e(78826),i=e.n(n),o=e(17635),s=e.n(o),a=e(19485),c=e(16441),u=e(84178),l=e(38197),h=e(85306),f=e(5634),d=e(6881),g=e(83875),p=e(97013),m=e(1581),v=e(29816),E=function(t,r,e,n){function i(t){return t instanceof e?t:new e((function(r){r(t)}))}return new(e||(e=Promise))((function(e,o){function s(t){try{c(n.next(t))}catch(r){o(r)}}function a(t){try{c(n["throw"](t))}catch(r){o(r)}}function c(t){t.done?e(t.value):i(t.value).then(s,a)}c((n=n.apply(t,r||[])).next())}))};const y=new m.Yd(v.i);function w(t){return null!=t&&t.mnemonic&&t.mnemonic.phrase}class A extends d.dk{isKeystoreAccount(t){return!(!t||!t._isKeystoreAccount)}}function N(t,r,e){const n=(0,p.gx)(t,"crypto/cipher");if("aes-128-ctr"===n){const n=(0,p.p3)((0,p.gx)(t,"crypto/cipherparams/iv")),o=new(i().Counter)(n),s=new(i().ModeOfOperation.ctr)(r,o);return(0,c.lE)(s.decrypt(e))}return null}function _(t,r){const e=(0,p.p3)((0,p.gx)(t,"crypto/ciphertext")),n=(0,c.Dv)((0,l.w)((0,c.zo)([r.slice(16,32),e]))).substring(2);if(n!==(0,p.gx)(t,"crypto/mac").toLowerCase())throw new Error("invalid password");const o=N(t,r.slice(0,16),e);o||y.throwError("unsupported cipher",m.Yd.errors.UNSUPPORTED_OPERATION,{operation:"decrypt"});const s=r.slice(32,64),h=(0,g.db)(o);if(t.address){let r=t.address.toLowerCase();if("0x"!==r.substring(0,2)&&(r="0x"+r),(0,a.Kn)(r)!==h)throw new Error("address mismatch")}const f={_isKeystoreAccount:!0,address:h,privateKey:(0,c.Dv)(o)};if("0.1"===(0,p.gx)(t,"x-ethers/version")){const r=(0,p.p3)((0,p.gx)(t,"x-ethers/mnemonicCiphertext")),e=(0,p.p3)((0,p.gx)(t,"x-ethers/mnemonicCounter")),n=new(i().Counter)(e),o=new(i().ModeOfOperation.ctr)(s,n),a=(0,p.gx)(t,"x-ethers/path")||u.cD,l=(0,p.gx)(t,"x-ethers/locale")||"en",h=(0,c.lE)(o.decrypt(r));try{const t=(0,u.JJ)(h,l),r=u.m$.fromMnemonic(t,null,l).derivePath(a);if(r.privateKey!=f.privateKey)throw new Error("mnemonic mismatch");f.mnemonic=r.mnemonic}catch(d){if(d.code!==m.Yd.errors.INVALID_ARGUMENT||"wordlist"!==d.argument)throw d}}return new A(f)}function O(t,r,e,n,i){return(0,c.lE)((0,h.n)(t,r,e,n,i))}function R(t,r,e,n,i){return Promise.resolve(O(t,r,e,n,i))}function b(t,r,e,n,i){const o=(0,p.Ij)(r),s=(0,p.gx)(t,"crypto/kdf");if(s&&"string"===typeof s){const r=function(t,r){return y.throwArgumentError("invalid key-derivation function parameters",t,r)};if("scrypt"===s.toLowerCase()){const e=(0,p.p3)((0,p.gx)(t,"crypto/kdfparams/salt")),a=parseInt((0,p.gx)(t,"crypto/kdfparams/n")),c=parseInt((0,p.gx)(t,"crypto/kdfparams/r")),u=parseInt((0,p.gx)(t,"crypto/kdfparams/p"));a&&c&&u||r("kdf",s),0!==(a&a-1)&&r("N",a);const l=parseInt((0,p.gx)(t,"crypto/kdfparams/dklen"));return 32!==l&&r("dklen",l),n(o,e,a,c,u,64,i)}if("pbkdf2"===s.toLowerCase()){const n=(0,p.p3)((0,p.gx)(t,"crypto/kdfparams/salt"));let i=null;const s=(0,p.gx)(t,"crypto/kdfparams/prf");
1"hmac-sha256"===s?i="sha256":"hmac-sha512"===s?i="sha512":r("prf",s);const a=parseInt((0,p.gx)(t,"crypto/kdfparams/c")),c=parseInt((0,p.gx)(t,"crypto/kdfparams/dklen"));return 32!==c&&r("dklen",c),e(o,n,a,c,i)}}return y.throwArgumentError("unsupported key-derivation function","kdf",s)}function P(t,r){const e=JSON.parse(t),n=b(e,r,O,s().syncScrypt);return _(e,n)}function x(t,r,e){return E(this,void 0,void 0,(function*(){const n=JSON.parse(t),i=yield b(n,r,R,s().scrypt,e);return _(n,i)}))}function T(t,r,e,n){try{if((0,a.Kn)(t.address)!==(0,g.db)(t.privateKey))throw new Error("address/privateKey mismatch");if(w(t)){const r=t.mnemonic,e=u.m$.fromMnemonic(r.phrase,null,r.locale).derivePath(r.path||u.cD);if(e.privateKey!=t.privateKey)throw new Error("mnemonic mismatch")}}catch(b){return Promise.reject(b)}"function"!==typeof e||n||(n=e,e={}),e||(e={});const o=(0,c.lE)(t.privateKey),h=(0,p.Ij)(r);let d=null,m=null,v=null;if(w(t)){const r=t.mnemonic;d=(0,c.lE)((0,u.oy)(r.phrase,r.locale||"en")),m=r.path||u.cD,v=r.locale||"en"}let E=e.client;E||(E="ethers.js");let y=null;y=e.salt?(0,c.lE)(e.salt):(0,f.O)(32);let A=null;if(e.iv){if(A=(0,c.lE)(e.iv),16!==A.length)throw new Error("invalid iv")}else A=(0,f.O)(16);let N=null;if(e.uuid){if(N=(0,c.lE)(e.uuid),16!==N.length)throw new Error("invalid uuid")}else N=(0,f.O)(16);let _=1<<17,O=8,R=1;return e.scrypt&&(e.scrypt.N&&(_=e.scrypt.N),e.scrypt.r&&(O=e.scrypt.r),e.scrypt.p&&(R=e.scrypt.p)),s().scrypt(h,y,_,O,R,64,n).then((r=>{r=(0,c.lE)(r);const e=r.slice(0,16),n=r.slice(16,32),s=r.slice(32,64),a=new(i().Counter)(A),u=new(i().ModeOfOperation.ctr)(e,a),h=(0,c.lE)(u.encrypt(o)),g=(0,l.w)((0,c.zo)([n,h])),w={address:t.address.substring(2).toLowerCase(),id:(0,p.EH)(N),version:3,crypto:{cipher:"aes-128-ctr",cipherparams:{iv:(0,c.Dv)(A).substring(2)},ciphertext:(0,c.Dv)(h).substring(2),kdf:"scrypt",kdfparams:{salt:(0,c.Dv)(y).substring(2),n:_,dklen:32,p:R,r:O},mac:g.substring(2)}};if(d){const t=(0,f.O)(16),r=new(i().Counter)(t),e=new(i().ModeOfOperation.ctr)(s,r),n=(0,c.lE)(e.encrypt(d)),o=new Date,a=o.getUTCFullYear()+"-"+(0,p.VP)(o.getUTCMonth()+1,2)+"-"+(0,p.VP)(o.getUTCDate(),2)+"T"+(0,p.VP)(o.getUTCHours(),2)+"-"+(0,p.VP)(o.getUTCMinutes(),2)+"-"+(0,p.VP)(o.getUTCSeconds(),2)+".0Z";w["x-ethers"]={client:E,gethFilename:"UTC--"+a+"--"+w.address,mnemonicCounter:(0,c.Dv)(t).substring(2),mnemonicCiphertext:(0,c.Dv)(n).substring(2),path:m,locale:v,version:"0.1"}}return JSON.stringify(w)}))}},97013:function(t,r,e){e.d(r,{EH:function(){return u},Ij:function(){return a},VP:function(){return s},gx:function(){return c},p3:function(){return o}});var n=e(16441),i=e(29251);function o(t){return"string"===typeof t&&"0x"!==t.substring(0,2)&&(t="0x"+t),(0,n.lE)(t)}function s(t,r){t=String(t);while(t.length<r)t="0"+t;return t}function a(t){return"string"===typeof t?(0,i.Y0)(t,i.Uj.NFKC):(0,n.lE)(t)}function c(t,r){let e=t;const n=r.toLowerCase().split("/");for(let i=0;i<n.length;i++){let t=null;for(const r in e)if(r.toLowerCase()===n[i]){t=e[r];break}if(null===t)return null;e=t}return e}function u(t){const r=(0,n.lE)(t);r[6]=15&r[6]|64,r[8]=63&r[8]|128;const e=(0,n.Dv)(r);return[e.substring(2,10),e.substring(10,14),e.substring(14,18),e.substring(18,22),e.substring(22,34)].join("-")}},38197:function(t,r,e){e.d(r,{w:function(){return s}});var n=e(91094),i=e.n(n),o=e(16441);function s(t){return"0x"+i().keccak_256((0,o.lE)(t))}},1581:function(t,r,e){e.d(r,{Yd:function(){return p}});const n="logger/5.7.0";var i=e(25108);let o=!1,s=!1;const a={debug:1,default:2,info:2,warning:3,error:4,off:5};let c=a["default"],u=null;function l(){try{const t=[];if(["NFD","NFC","NFKD","NFKC"].forEach((r=>{try{if("test"!=="test".normalize(r))throw new Error("bad normalize")}catch(e){t.push(r)}})),t.length)throw new Error("missing "+t.join(", "));if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw new Error("broken implementation")}catch(t){return t.message}return null}const h=l();var f,d;(function(t){t["DEBUG"]="DEBUG",t["INFO"]="INFO",t["WARNING"]="WARNING",t["ERROR"]="ERROR",t["OFF"]="OFF"})(f||(f={})),function(t){t["UNKNOWN_ERROR"]="UNKNOWN_ERROR",t["NOT_IMPLEMENT
1ED"]="NOT_IMPLEMENTED",t["UNSUPPORTED_OPERATION"]="UNSUPPORTED_OPERATION",t["NETWORK_ERROR"]="NETWORK_ERROR",t["SERVER_ERROR"]="SERVER_ERROR",t["TIMEOUT"]="TIMEOUT",t["BUFFER_OVERRUN"]="BUFFER_OVERRUN",t["NUMERIC_FAULT"]="NUMERIC_FAULT",t["MISSING_NEW"]="MISSING_NEW",t["INVALID_ARGUMENT"]="INVALID_ARGUMENT",t["MISSING_ARGUMENT"]="MISSING_ARGUMENT",t["UNEXPECTED_ARGUMENT"]="UNEXPECTED_ARGUMENT",t["CALL_EXCEPTION"]="CALL_EXCEPTION",t["INSUFFICIENT_FUNDS"]="INSUFFICIENT_FUNDS",t["NONCE_EXPIRED"]="NONCE_EXPIRED",t["REPLACEMENT_UNDERPRICED"]="REPLACEMENT_UNDERPRICED",t["UNPREDICTABLE_GAS_LIMIT"]="UNPREDICTABLE_GAS_LIMIT",t["TRANSACTION_REPLACED"]="TRANSACTION_REPLACED",t["ACTION_REJECTED"]="ACTION_REJECTED"}(d||(d={}));const g="0123456789abcdef";class p{constructor(t){Object.defineProperty(this,"version",{enumerable:!0,value:t,writable:!1})}_log(t,r){const e=t.toLowerCase();null==a[e]&&this.throwArgumentError("invalid log level name","logLevel",t),c>a[e]||i.log.apply(i,r)}debug(...t){this._log(p.levels.DEBUG,t)}info(...t){this._log(p.levels.INFO,t)}warn(...t){this._log(p.levels.WARNING,t)}makeError(t,r,e){if(s)return this.makeError("censored error",r,{});r||(r=p.errors.UNKNOWN_ERROR),e||(e={});const n=[];Object.keys(e).forEach((t=>{const r=e[t];try{if(r instanceof Uint8Array){let e="";for(let t=0;t<r.length;t++)e+=g[r[t]>>4],e+=g[15&r[t]];n.push(t+"=Uint8Array(0x"+e+")")}else n.push(t+"="+JSON.stringify(r))}catch(a){n.push(t+"="+JSON.stringify(e[t].toString()))}})),n.push(`code=${r}`),n.push(`version=${this.version}`);const i=t;let o="";switch(r){case d.NUMERIC_FAULT:{o="NUMERIC_FAULT";const r=t;switch(r){case"overflow":case"underflow":case"division-by-zero":o+="-"+r;break;case"negative-power":case"negative-width":o+="-unsupported";break;case"unbound-bitwise-result":o+="-unbound-result";break}break}case d.CALL_EXCEPTION:case d.INSUFFICIENT_FUNDS:case d.MISSING_NEW:case d.NONCE_EXPIRED:case d.REPLACEMENT_UNDERPRICED:case d.TRANSACTION_REPLACED:case d.UNPREDICTABLE_GAS_LIMIT:o=r;break}o&&(t+=" [ See: https://links.ethers.org/v5-errors-"+o+" ]"),n.length&&(t+=" ("+n.join(", ")+")");const a=new Error(t);return a.reason=i,a.code=r,Object.keys(e).forEach((function(t){a[t]=e[t]})),a}throwError(t,r,e){throw this.makeError(t,r,e)}throwArgumentError(t,r,e){return this.throwError(t,p.errors.INVALID_ARGUMENT,{argument:r,value:e})}assert(t,r,e,n){t||this.throwError(r,e,n)}assertArgument(t,r,e,n){t||this.throwArgumentError(r,e,n)}checkNormalize(t){null==t&&(t="platform missing String.prototype.normalize"),h&&this.throwError("platform missing String.prototype.normalize",p.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:h})}checkSafeUint53(t,r){"number"===typeof t&&(null==r&&(r="value not safe"),(t<0||t>=9007199254740991)&&this.throwError(r,p.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:t}),t%1&&this.throwError(r,p.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:t}))}checkArgumentCount(t,r,e){e=e?": "+e:"",t<r&&this.throwError("missing argument"+e,p.errors.MISSING_ARGUMENT,{count:t,expectedCount:r}),t>r&&this.throwError("too many arguments"+e,p.errors.UNEXPECTED_ARGUMENT,{count:t,expectedCount:r})}checkNew(t,r){t!==Object&&null!=t||this.throwError("missing new",p.errors.MISSING_NEW,{name:r.name})}checkAbstract(t,r){t===r?this.throwError("cannot instantiate abstract class "+JSON.stringify(r.name)+" directly; use a sub-class",p.errors.UNSUPPORTED_OPERATION,{name:t.name,operation:"new"}):t!==Object&&null!=t||this.throwError("missing new",p.errors.MISSING_NEW,{name:r.name})}static globalLogger(){return u||(u=new p(n)),u}static setCensorship(t,r){if(!t&&r&&this.globalLogger().throwError("cannot permanently disable censorship",p.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),o){if(!t)return;this.globalLogger().throwError("error censorship permanent",p.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}s=!!t,o=!!r}static setLogLevel(t){const r=a[t.toLowerCase()];null!=r?c=r:p.globalLogger().warn("invalid log level - "+t)}static from(t){return new p(t)}}p.errors=d,p.levels=f},85306:function(t,r,e){e.d(r,{n:function(){return o}});var n=e(16441),i=e(2006);function o(t,r,e,o,s){let a;t=(0,n.lE)(t),r=(0,n.lE)(r);let c=1;const u=new Uint8Array(o),l=new Uint8Array(r.length+4);let h,f;l.set(r);for(let d=1;d<=c;d++){l[r.length]=d>>24&255,l[r.length+1]=d>>16&255,l[r.length+2]=d>>8&255,l[r.length+3]=255&d;let g=(0,n.lE)((0,i.Gy)(s,t,l));a||(a=g.length,f=new Uint8Array(a),c=Math.ceil(o/a),h=o-(c-1)*a),f.set(g);for(let r=1;r<e;r++){g=(0,n.lE)((0,i.Gy)(s,t,g));for(let t=0;t<a;t++)f[t]^=g[t]}const p=(d-1)*a,m=d===c?h:a;u.set((0,n.lE)(f).slice(0,m),p)}return(0,n.Dv)(u)}},6881:function(t,r,e){e.d(r,{dk:function(){return m},uj:function(){return l},p$:function(){return p},zG:function(){return a},tu:function(){return c},mE:function(){return u},DC:function(){return h}});var n=e(1581);const i="properties/5.7.0";var o=function(t,r,e,n){function i(t){return t instanceof e?t:new e((function(r){r(t)}))}return new(e||(e=Promise))((function(e,o){function s(t){try{c(n.next(t))}catch(r){o(r)}}function a(t){try{c(n["throw"](t))}catch(r){o(r)}}function c(t){t.done?e(t.value):i(t.value).then(s,a)}c((n=n.apply(t,r||[])).next())}))};const s=new n.Yd(i);function a(t,r,e){Object.defineProperty(t,r,{enumerable:!0,value:e,writable:!1})}function c(t,r){for(let e=0;e<32;e++){if(t[r])return t[r];if(!t.prototype||"object"!==typeof t.prototype)break;t=Object.getPrototypeOf(t.prototype).constructor}return null}function u(t){return o(this,void 0,void 0,(function*(){const r=Object.keys(t).map((r=>{const e=t[r];return Promise.resolve(e).then((t=>({key:r,value:t})))})),e=yield Promise.all(r);return e.reduce(((t,r)=>(t[r.key]=r.value,t)),{})}))}function l(t,r){t&&"object"===typeof t||s.throwArgumentError("invalid object","object",t),Object.keys(t).forEach((e=>{r[e]||s.throwArgumentError("invalid object key - "+e,"transaction:"+e,t)}))}function h(t){const r={};for(const e in t)r[e]=t[e];return r}const f={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function d(t){if(void 0===t||null===t||f[typeof t])return!0;
1if(Array.isArray(t)||"object"===typeof t){if(!Object.isFrozen(t))return!1;const e=Object.keys(t);for(let n=0;n<e.length;n++){let i=null;try{i=t[e[n]]}catch(r){continue}if(!d(i))return!1}return!0}return s.throwArgumentError("Cannot deepCopy "+typeof t,"object",t)}function g(t){if(d(t))return t;if(Array.isArray(t))return Object.freeze(t.map((t=>p(t))));if("object"===typeof t){const r={};for(const e in t){const n=t[e];void 0!==n&&a(r,e,p(n))}return r}return s.throwArgumentError("Cannot deepCopy "+typeof t,"object",t)}function p(t){return g(t)}class m{constructor(t){for(const r in t)this[r]=p(t[r])}}},5634:function(t,r,e){e.d(r,{O:function(){return l}});var n=e(16441),i=e(1581);const o="random/5.7.0",s=new i.Yd(o);function a(){if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof e.g)return e.g;throw new Error("unable to locate global object")}const c=a();let u=c.crypto||c.msCrypto;function l(t){(t<=0||t>1024||t%1||t!=t)&&s.throwArgumentError("invalid length","length",t);const r=new Uint8Array(t);return u.getRandomValues(r),(0,n.lE)(r)}u&&u.getRandomValues||(s.warn("WARNING: Missing strong random number source"),u={getRandomValues:function(t){return s.throwError("no secure random source avaialble",i.Yd.errors.UNSUPPORTED_OPERATION,{operation:"crypto.getRandomValues"})}})},59052:function(t,r,e){e.d(r,{J:function(){return d},c:function(){return l}});var n=e(16441),i=e(1581);const o="rlp/5.7.0",s=new i.Yd(o);function a(t){const r=[];while(t)r.unshift(255&t),t>>=8;return r}function c(t,r,e){let n=0;for(let i=0;i<e;i++)n=256*n+t[r+i];return n}function u(t){if(Array.isArray(t)){let r=[];if(t.forEach((function(t){r=r.concat(u(t))})),r.length<=55)return r.unshift(192+r.length),r;const e=a(r.length);return e.unshift(247+e.length),e.concat(r)}(0,n.Zq)(t)||s.throwArgumentError("RLP object must be BytesLike","object",t);const r=Array.prototype.slice.call((0,n.lE)(t));if(1===r.length&&r[0]<=127)return r;if(r.length<=55)return r.unshift(128+r.length),r;const e=a(r.length);return e.unshift(183+e.length),e.concat(r)}function l(t){return(0,n.Dv)(u(t))}function h(t,r,e,n){const o=[];while(e<r+1+n){const a=f(t,e);o.push(a.result),e+=a.consumed,e>r+1+n&&s.throwError("child data too short",i.Yd.errors.BUFFER_OVERRUN,{})}return{consumed:1+n,result:o}}function f(t,r){if(0===t.length&&s.throwError("data too short",i.Yd.errors.BUFFER_OVERRUN,{}),t[r]>=248){const e=t[r]-247;r+1+e>t.length&&s.throwError("data short segment too short",i.Yd.errors.BUFFER_OVERRUN,{});const n=c(t,r+1,e);return r+1+e+n>t.length&&s.throwError("data long segment too short",i.Yd.errors.BUFFER_OVERRUN,{}),h(t,r,r+1+e,e+n)}if(t[r]>=192){const e=t[r]-192;return r+1+e>t.length&&s.throwError("data array too short",i.Yd.errors.BUFFER_OVERRUN,{}),h(t,r,r+1,e)}if(t[r]>=184){const e=t[r]-183;r+1+e>t.length&&s.throwError("data array too short",i.Yd.errors.BUFFER_OVERRUN,{});const o=c(t,r+1,e);r+1+e+o>t.length&&s.throwError("data array too short",i.Yd.errors.BUFFER_OVERRUN,{});const a=(0,n.Dv)(t.slice(r+1+e,r+1+e+o));return{consumed:1+e+o,result:a}}if(t[r]>=128){const e=t[r]-128;r+1+e>t.length&&s.throwError("data too short",i.Yd.errors.BUFFER_OVERRUN,{});const o=(0,n.Dv)(t.slice(r+1,r+1+e));return{consumed:1+e,result:o}}return{consumed:1,result:(0,n.Dv)(t[r])}}function d(t){const r=(0,n.lE)(t),e=f(r,0);return e.consumed!==r.length&&s.throwArgumentError("invalid rlp data","data",t),e.result}},2006:function(t,r,e){e.d(r,{Gy:function(){return f},bP:function(){return l},JQ:function(){return h}});var n=e(33715),i=e.n(n),o=e(16441),s=e(21261),a=e(1581);const c="sha2/5.7.0",u=new a.Yd(c);function l(t){return"0x"+i().ripemd160().update((0,o.lE)(t)).digest("hex")}function h(t){return"0x"+i().sha256().update((0,o.lE)(t)).digest("hex")}function f(t,r,e){return s.p[t]||u.throwError("unsupported algorithm "+t,a.Yd.errors.UNSUPPORTED_OPERATION,{operation:"hmac",algorithm:t}),"0x"+i().hmac(i()[t],(0,o.lE)(r)).update((0,o.lE)(e)).digest("hex")}},21261:function(t,r,e){var n;e.d(r,{p:function(){return n}}),function(t){t["sha256"]="sha256",t["sha512"]="sha512"}(n||(n={}))}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.