@dodoex/wallet-web3 0.0.43-beta.0 → 0.0.43-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. package/dist/{DefaultJsonRpcProvider-16b86457.js → DefaultJsonRpcProvider-48aec187.js} +1 -1
  2. package/dist/__node-resolve_empty-59fa3c56.js +1 -0
  3. package/dist/{blocto-e35c2bce.js → blocto-478b3978.js} +1 -1
  4. package/dist/{bn-bea96c1e.js → bn-efc414a2.js} +1 -1
  5. package/dist/{browser-ponyfill-f45b0187.js → browser-ponyfill-bc327969.js} +1 -1
  6. package/dist/cjs/{DefaultJsonRpcProvider-a4216c2c.cjs → DefaultJsonRpcProvider-55c338f0.cjs} +1 -1
  7. package/dist/cjs/{__node-resolve_empty-112a35f0.cjs → __node-resolve_empty-fd72eb2c.cjs} +1 -1
  8. package/dist/cjs/{blocto-6ce92a3c.cjs → blocto-965564db.cjs} +1 -1
  9. package/dist/cjs/{bn-4b6ace70.cjs → bn-d506e85d.cjs} +1 -1
  10. package/dist/cjs/{browser-ponyfill-3d00f58c.cjs → browser-ponyfill-323d988f.cjs} +1 -1
  11. package/dist/cjs/{draggabilly-a516601d.cjs → draggabilly-79573f3a.cjs} +1 -1
  12. package/dist/cjs/{ethers-79a8b64c.cjs → ethers-1ba31973.cjs} +1 -1
  13. package/dist/cjs/{id-aaf275ac.cjs → id-1118c8d9.cjs} +1 -1
  14. package/dist/cjs/{index-d132f04d.cjs → index-0122b1eb.cjs} +1 -1
  15. package/dist/cjs/{index-3a818183.cjs → index-0ce04635.cjs} +2 -2
  16. package/dist/cjs/{index-9e7c30e4.cjs → index-285c5389.cjs} +1 -1
  17. package/dist/cjs/{index-8908828b.cjs → index-3c74ed4c.cjs} +1 -1
  18. package/dist/cjs/{index-710e2e08.cjs → index-4d414966.cjs} +1 -1
  19. package/dist/cjs/{index-687606ef.cjs → index-58465208.cjs} +1 -1
  20. package/dist/cjs/{index-b508044f.cjs → index-685f72cf.cjs} +1 -1
  21. package/dist/cjs/{index-2b8f986d.cjs → index-99521957.cjs} +1 -1
  22. package/dist/cjs/{index-bb7b2a27.cjs → index-ac9f2e8f.cjs} +1 -1
  23. package/dist/cjs/{index-dfdc6c5b.cjs → index-ae56e5a3.cjs} +2 -2
  24. package/dist/cjs/{index-812ee091.cjs → index-dc6a6c03.cjs} +1 -1
  25. package/dist/cjs/index.cjs +1 -1
  26. package/dist/cjs/{index.es-a09533e6.cjs → index.es-6fd28bfe.cjs} +1 -1
  27. package/dist/cjs/{interface-401abdcd.cjs → interface-22e176bf.cjs} +1 -1
  28. package/dist/cjs/{lib-typedarrays-500eafc3.cjs → lib-typedarrays-4ea60734.cjs} +1 -1
  29. package/dist/cjs/{portis-4b600385.cjs → portis-5a7056fa.cjs} +1 -1
  30. package/dist/cjs/{provider-2af2c824.cjs → provider-d22e1228.cjs} +1 -1
  31. package/dist/cjs/{rainbow-56978b05.cjs → rainbow-54c01ab2.cjs} +1 -1
  32. package/dist/cjs/{sha224-d64bb467.cjs → sha224-75e384f0.cjs} +1 -1
  33. package/dist/cjs/{sha256-5e38dae7.cjs → sha256-ab07124e.cjs} +1 -1
  34. package/dist/cjs/{uAuth-7692d87b.cjs → uAuth-b9d43d2e.cjs} +1 -1
  35. package/dist/cjs/{walletConnect-9bf75169.cjs → walletConnect-398a4c97.cjs} +1 -1
  36. package/dist/cjs/{walletLink-2a1920a6.cjs → walletLink-6199ae38.cjs} +2 -2
  37. package/dist/{draggabilly-411a2bfc.js → draggabilly-830dc949.js} +1 -1
  38. package/dist/{ethers-cb195952.js → ethers-1d40d86b.js} +1 -1
  39. package/dist/{id-44a7ba96.js → id-62e12510.js} +1 -1
  40. package/dist/{index-272625f0.js → index-02350ba2.js} +1 -1
  41. package/dist/{index-d8a60005.js → index-115f7417.js} +1 -1
  42. package/dist/{index-764c794e.js → index-11a0760f.js} +1 -1
  43. package/dist/{index-df576275.js → index-37f47216.js} +1 -1
  44. package/dist/{index-32a0a636.js → index-3c4637f0.js} +1 -1
  45. package/dist/{index-849b2e9b.js → index-6e901e7d.js} +1 -1
  46. package/dist/{index-64864a90.js → index-a33c0bc7.js} +2 -2
  47. package/dist/{index-79d77b05.js → index-acc28a9b.js} +1 -1
  48. package/dist/index-b32df058.js +1 -0
  49. package/dist/{index-5bf4cdf3.js → index-b659401e.js} +1 -1
  50. package/dist/{index-c4b7e014.js → index-bcc0fefa.js} +1 -1
  51. package/dist/{index.es-1a5925ce.js → index.es-d4badfa1.js} +1 -1
  52. package/dist/index.js +1 -1
  53. package/dist/{interface-c0409fdc.js → interface-c16329c9.js} +1 -1
  54. package/dist/{lib-typedarrays-89645c3c.js → lib-typedarrays-f90f59e3.js} +1 -1
  55. package/dist/{portis-e32a848b.js → portis-a86b0a05.js} +1 -1
  56. package/dist/{provider-84d6204f.js → provider-e4a0ed94.js} +1 -1
  57. package/dist/{rainbow-33e0f4ed.js → rainbow-3df70217.js} +1 -1
  58. package/dist/{sha224-87032d02.js → sha224-57921047.js} +1 -1
  59. package/dist/{sha256-e81cf2ba.js → sha256-5bd230f1.js} +1 -1
  60. package/dist/{uAuth-c2738d4a.js → uAuth-2e999ea5.js} +1 -1
  61. package/dist/walletConnect-565fd3db.js +1 -0
  62. package/dist/walletLink-df58109a.js +3 -0
  63. package/package.json +1 -1
  64. package/dist/__node-resolve_empty-69a251b7.js +0 -1
  65. package/dist/index-bacb8b7a.js +0 -1
  66. package/dist/walletConnect-8deba348.js +0 -1
  67. package/dist/walletLink-a7c249e1.js +0 -3
@@ -1 +1 @@
1
- "use strict";var t=require("@ethersproject/address"),e=require("@ethersproject/bytes"),r=require("./id-aaf275ac.cjs"),n=require("./index-3a818183.cjs"),a=require("@ethersproject/properties"),s=require("@ethersproject/constants");const i="abi/5.7.0",o=new r.Logger(i),u={};let c={calldata:!0,memory:!0,storage:!0},l={calldata:!0,memory:!0};function h(t,e){if("bytes"===t||"string"===t){if(c[e])return!0}else if("address"===t){if("payable"===e)return!0}else if((t.indexOf("[")>=0||"tuple"===t)&&l[e])return!0;return(c[e]||"payable"===e)&&o.throwArgumentError("invalid modifier","name",e),!1}function m(t,e){for(let r in e)a.defineReadOnly(t,r,e[r])}const d=Object.freeze({sighash:"sighash",minimal:"minimal",full:"full",json:"json"}),p=new RegExp(/^(.*)\[([0-9]*)\]$/);class g{constructor(t,e){t!==u&&o.throwError("use fromString",r.Logger.errors.UNSUPPORTED_OPERATION,{operation:"new ParamType()"}),m(this,e);let n=this.type.match(p);m(this,n?{arrayLength:parseInt(n[2]||"-1"),arrayChildren:g.fromObject({type:n[1],components:this.components}),baseType:"array"}:{arrayLength:null,arrayChildren:null,baseType:null!=this.components?"tuple":this.type}),this._isParamType=!0,Object.freeze(this)}format(t){if(t||(t=d.sighash),d[t]||o.throwArgumentError("invalid format type","format",t),t===d.json){let e={type:"tuple"===this.baseType?"tuple":this.type,name:this.name||void 0};return"boolean"==typeof this.indexed&&(e.indexed=this.indexed),this.components&&(e.components=this.components.map((e=>JSON.parse(e.format(t))))),JSON.stringify(e)}let e="";return"array"===this.baseType?(e+=this.arrayChildren.format(t),e+="["+(this.arrayLength<0?"":String(this.arrayLength))+"]"):"tuple"===this.baseType?(t!==d.sighash&&(e+=this.type),e+="("+this.components.map((e=>e.format(t))).join(t===d.full?", ":",")+")"):e+=this.type,t!==d.sighash&&(!0===this.indexed&&(e+=" indexed"),t===d.full&&this.name&&(e+=" "+this.name)),e}static from(t,e){return"string"==typeof t?g.fromString(t,e):g.fromObject(t)}static fromObject(t){return g.isParamType(t)?t:new g(u,{name:t.name||null,type:S(t.type),indexed:null==t.indexed?null:!!t.indexed,components:t.components?t.components.map(g.fromObject):null})}static fromString(t,e){return r=function(t,e){let r=t;function n(e){o.throwArgumentError(`unexpected character at position ${e}`,"param",t)}function a(t){let r={type:"",name:"",parent:t,state:{allowType:!0}};return e&&(r.indexed=!1),r}t=t.replace(/\s/g," ");let s={type:"",name:"",state:{allowType:!0}},i=s;for(let r=0;r<t.length;r++){let s=t[r];switch(s){case"(":i.state.allowType&&""===i.type?i.type="tuple":i.state.allowParams||n(r),i.state.allowType=!1,i.type=S(i.type),i.components=[a(i)],i=i.components[0];break;case")":delete i.state,"indexed"===i.name&&(e||n(r),i.indexed=!0,i.name=""),h(i.type,i.name)&&(i.name=""),i.type=S(i.type);let t=i;i=i.parent,i||n(r),delete t.parent,i.state.allowParams=!1,i.state.allowName=!0,i.state.allowArray=!0;break;case",":delete i.state,"indexed"===i.name&&(e||n(r),i.indexed=!0,i.name=""),h(i.type,i.name)&&(i.name=""),i.type=S(i.type);let o=a(i.parent);i.parent.components.push(o),delete i.parent,i=o;break;case" ":i.state.allowType&&""!==i.type&&(i.type=S(i.type),delete i.state.allowType,i.state.allowName=!0,i.state.allowParams=!0),i.state.allowName&&""!==i.name&&("indexed"===i.name?(e||n(r),i.indexed&&n(r),i.indexed=!0,i.name=""):h(i.type,i.name)?i.name="":i.state.allowName=!1);break;case"[":i.state.allowArray||n(r),i.type+=s,i.state.allowArray=!1,i.state.allowName=!1,i.state.readArray=!0;break;case"]":i.state.readArray||n(r),i.type+=s,i.state.readArray=!1,i.state.allowArray=!0,i.state.allowName=!0;break;default:i.state.allowType?(i.type+=s,i.state.allowParams=!0,i.state.allowArray=!0):i.state.allowName?(i.name+=s,delete i.state.allowArray):i.state.readArray?i.type+=s:n(r)}}return i.parent&&o.throwArgumentError("unexpected eof","param",t),delete s.state,"indexed"===i.name?(e||n(r.length-7),i.indexed&&n(r.length-7),i.indexed=!0,i.name=""):h(i.type,i.name)&&(i.name=""),s.type=S(s.type),s}(t,!!e),g.fromObject({name:r.name,type:r.type,indexed:r.indexed,components:r.components});var r}static isParamType(t){return!(null==t||!t._isParamType)}}function f(t,e){return function(t){t=t.trim();let e=[],r="",n=0;for(let a=0;a<t.length;a++){let s=t[a];","===s&&0===n?(e.push(r),r=""):(r+=s,"("===s?n++:")"===s&&(n--,-1===n&&o.throwArgumentError("unbalanced parenthesis","value",t)))}r&&e.push(r);return e}(t).map((t=>g.fromString(t,e)))}class y{constructor(t,e){t!==u&&o.throwError("use a static from method",r.Logger.errors.UNSUPPORTED_OPERATION,{operation:"new Fragment()"}),m(this,e),this._isFragment=!0,Object.freeze(this)}static from(t){return y.isFragment(t)?t:"string"==typeof t?y.fromString(t):y.fromObject(t)}static fromObject(t){if(y.isFragment(t))return t;switch(t.type){case"function":return x.fromObject(t);case"event":return b.fromObject(t);case"constructor":return _.fromObject(t);case"error":return O.fromObject(t);case"fallback":case"receive":return null}return o.throwArgumentError("invalid fragment object","value",t)}static fromString(t){return"event"===(t=(t=(t=t.replace(/\s/g," ")).replace(/\(/g," (").replace(/\)/g,") ").replace(/\s+/g," ")).trim()).split(" ")[0]?b.fromString(t.substring(5).trim()):"function"===t.split(" ")[0]?x.fromString(t.substring(8).trim()):"constructor"===t.split("(")[0].trim()?_.fromString(t.trim()):"error"===t.split(" ")[0]?O.fromString(t.substring(5).trim()):o.throwArgumentError("unsupported fragment","value",t)}static isFragment(t){return!(!t||!t._isFragment)}}class b extends y{format(t){if(t||(t=d.sighash),d[t]||o.throwArgumentError("invalid format type","format",t),t===d.json)return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map((e=>JSON.parse(e.format(t))))});let e="";return t!==d.sighash&&(e+="event "),e+=this.name+"("+this.inputs.map((e=>e.format(t))).join(t===d.full?", ":",")+") ",t!==d.sighash&&this.anonymous&&(e+="anonymous "),e.trim()}static from(t){return"string"==typeof t?b.fromString(t):b.fromObject(t)}static fromObject(t){if(b.isEventFragment(t))return t;"event"!==t.type&&o.throwArgumentError("invalid event object","value",t);const e={name:j(t.name),anonymous:t.anonymous,inputs:t.inputs?t.inputs.map(g.fromObject):[],type:"event"};return new b(u,e)}static fromString(t){let e=t.match(F);e||o.throwArgumentError("invalid event string","value",t);let r=!1;return e[3].split(" ").forEach((t=>{switch(t.trim()){case"anonymous":r=!0;break;case"":break;default:o.warn("unknown modifier: "+t)}})),b.fromObject({name:e[1].trim(),anonymous:r,inputs:f(e[2],!0),type:"event"})}static isEventFragment(t){return t&&t._isFragment&&"event"===t.type}}function w(t,e){e.gas=null;let n=t.split("@");return 1!==n.length?(n.length>2&&o.throwArgumentError("invalid human-readable ABI signature","value",t),n[1].match(/^[0-9]+$/)||o.throwArgumentError("invalid human-readable ABI signature gas","value",t),e.gas=r.BigNumber.from(n[1]),n[0]):t}function E(t,e){e.constant=!1,e.payable=!1,e.stateMutability="nonpayable",t.split(" ").forEach((t=>{switch(t.trim()){case"constant":e.constant=!0;break;case"payable":e.payable=!0,e.stateMutability="payable";break;case"nonpayable":e.payable=!1,e.stateMutability="nonpayable";break;case"pure":e.constant=!0,e.stateMutability="pure";break;case"view":e.constant=!0,e.stateMutability="view";break;case"external":case"public":case"":break;default:console.log("unknown modifier: "+t)}}))}function v(t){let e={constant:!1,payable:!0,stateMutability:"payable"};return null!=t.stateMutability?(e.stateMutability=t.stateMutability,e.constant="view"===e.stateMutability||"pure"===e.stateMutability,null!=t.constant&&!!t.constant!==e.constant&&o.throwArgumentError("cannot have constant function with mutability "+e.stateMutability,"value",t),e.payable="payable"===e.stateMutability,null!=t.payable&&!!t.payable!==e.payable&&o.throwArgumentError("cannot have payable function with mutability "+e.stateMutability,"value",t)):null!=t.payable?(e.payable=!!t.payable,null!=t.constant||e.payable||"constructor"===t.type||o.throwArgumentError("unable to determine stateMutability","value",t),e.constant=!!t.constant,e.constant?e.stateMutability="view":e.stateMutability=e.payable?"payable":"nonpayable",e.payable&&e.constant&&o.throwArgumentError("cannot have constant payable function","value",t)):null!=t.constant?(e.constant=!!t.constant,e.payable=!e.constant,e.stateMutability=e.constant?"view":"payable"):"constructor"!==t.type&&o.throwArgumentError("unable to determine stateMutability","value",t),e}class _ extends y{format(t){if(t||(t=d.sighash),d[t]||o.throwArgumentError("invalid format type","format",t),t===d.json)return JSON.stringify({type:"constructor",stateMutability:"nonpayable"!==this.stateMutability?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map((e=>JSON.parse(e.format(t))))});t===d.sighash&&o.throwError("cannot format a constructor for sighash",r.Logger.errors.UNSUPPORTED_OPERATION,{operation:"format(sighash)"});let e="constructor("+this.inputs.map((e=>e.format(t))).join(t===d.full?", ":",")+") ";return this.stateMutability&&"nonpayable"!==this.stateMutability&&(e+=this.stateMutability+" "),e.trim()}static from(t){return"string"==typeof t?_.fromString(t):_.fromObject(t)}static fromObject(t){if(_.isConstructorFragment(t))return t;"constructor"!==t.type&&o.throwArgumentError("invalid constructor object","value",t);let e=v(t);e.constant&&o.throwArgumentError("constructor cannot be constant","value",t);const n={name:null,type:t.type,inputs:t.inputs?t.inputs.map(g.fromObject):[],payable:e.payable,stateMutability:e.stateMutability,gas:t.gas?r.BigNumber.from(t.gas):null};return new _(u,n)}static fromString(t){let e={type:"constructor"},r=(t=w(t,e)).match(F);return r&&"constructor"===r[1].trim()||o.throwArgumentError("invalid constructor string","value",t),e.inputs=f(r[2].trim(),!1),E(r[3].trim(),e),_.fromObject(e)}static isConstructorFragment(t){return t&&t._isFragment&&"constructor"===t.type}}class x extends _{format(t){if(t||(t=d.sighash),d[t]||o.throwArgumentError("invalid format type","format",t),t===d.json)return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:"nonpayable"!==this.stateMutability?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map((e=>JSON.parse(e.format(t)))),outputs:this.outputs.map((e=>JSON.parse(e.format(t))))});let e="";return t!==d.sighash&&(e+="function "),e+=this.name+"("+this.inputs.map((e=>e.format(t))).join(t===d.full?", ":",")+") ",t!==d.sighash&&(this.stateMutability?"nonpayable"!==this.stateMutability&&(e+=this.stateMutability+" "):this.constant&&(e+="view "),this.outputs&&this.outputs.length&&(e+="returns ("+this.outputs.map((e=>e.format(t))).join(", ")+") "),null!=this.gas&&(e+="@"+this.gas.toString()+" ")),e.trim()}static from(t){return"string"==typeof t?x.fromString(t):x.fromObject(t)}static fromObject(t){if(x.isFunctionFragment(t))return t;"function"!==t.type&&o.throwArgumentError("invalid function object","value",t);let e=v(t);const n={type:t.type,name:j(t.name),constant:e.constant,inputs:t.inputs?t.inputs.map(g.fromObject):[],outputs:t.outputs?t.outputs.map(g.fromObject):[],payable:e.payable,stateMutability:e.stateMutability,gas:t.gas?r.BigNumber.from(t.gas):null};return new x(u,n)}static fromString(t){let e={type:"function"},r=(t=w(t,e)).split(" returns ");r.length>2&&o.throwArgumentError("invalid function string","value",t);let n=r[0].match(F);if(n||o.throwArgumentError("invalid function signature","value",t),e.name=n[1].trim(),e.name&&j(e.name),e.inputs=f(n[2],!1),E(n[3].trim(),e),r.length>1){let n=r[1].match(F);""==n[1].trim()&&""==n[3].trim()||o.throwArgumentError("unexpected tokens","value",t),e.outputs=f(n[2],!1)}else e.outputs=[];return x.fromObject(e)}static isFunctionFragment(t){return t&&t._isFragment&&"function"===t.type}}function A(t){const e=t.format();return"Error(string)"!==e&&"Panic(uint256)"!==e||o.throwArgumentError(`cannot specify user defined ${e} error`,"fragment",t),t}class O extends y{format(t){if(t||(t=d.sighash),d[t]||o.throwArgumentError("invalid format type","format",t),t===d.json)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map((e=>JSON.parse(e.format(t))))});let e="";return t!==d.sighash&&(e+="error "),e+=this.name+"("+this.inputs.map((e=>e.format(t))).join(t===d.full?", ":",")+") ",e.trim()}static from(t){return"string"==typeof t?O.fromString(t):O.fromObject(t)}static fromObject(t){if(O.isErrorFragment(t))return t;"error"!==t.type&&o.throwArgumentError("invalid error object","value",t);const e={type:t.type,name:j(t.name),inputs:t.inputs?t.inputs.map(g.fromObject):[]};return A(new O(u,e))}static fromString(t){let e={type:"error"},r=t.match(F);return r||o.throwArgumentError("invalid error signature","value",t),e.name=r[1].trim(),e.name&&j(e.name),e.inputs=f(r[2],!1),A(O.fromObject(e))}static isErrorFragment(t){return t&&t._isFragment&&"error"===t.type}}function S(t){return t.match(/^uint($|[^1-9])/)?t="uint256"+t.substring(4):t.match(/^int($|[^1-9])/)&&(t="int256"+t.substring(3)),t}const N=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function j(t){return t&&t.match(N)||o.throwArgumentError(`invalid identifier "${t}"`,"value",t),t}const F=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$");const R=new r.Logger(i);class T{constructor(t,e,r,n){this.name=t,this.type=e,this.localName=r,this.dynamic=n}_throwError(t,e){R.throwArgumentError(t,this.localName,e)}}class L{constructor(t){a.defineReadOnly(this,"wordSize",t||32),this._data=[],this._dataLength=0,this._padding=new Uint8Array(t)}get data(){return e.hexConcat(this._data)}get length(){return this._dataLength}_writeData(t){return this._data.push(t),this._dataLength+=t.length,t.length}appendWriter(t){return this._writeData(e.concat(t._data))}writeBytes(t){let r=e.arrayify(t);const n=r.length%this.wordSize;return n&&(r=e.concat([r,this._padding.slice(n)])),this._writeData(r)}_getValue(t){let n=e.arrayify(r.BigNumber.from(t));return n.length>this.wordSize&&R.throwError("value out-of-bounds",r.Logger.errors.BUFFER_OVERRUN,{length:this.wordSize,offset:n.length}),n.length%this.wordSize&&(n=e.concat([this._padding.slice(n.length%this.wordSize),n])),n}writeValue(t){return this._writeData(this._getValue(t))}writeUpdatableValue(){const t=this._data.length;return this._data.push(this._padding),this._dataLength+=this.wordSize,e=>{this._data[t]=this._getValue(e)}}}class M{constructor(t,r,n,s){a.defineReadOnly(this,"_data",e.arrayify(t)),a.defineReadOnly(this,"wordSize",r||32),a.defineReadOnly(this,"_coerceFunc",n),a.defineReadOnly(this,"allowLoose",s),this._offset=0}get data(){return e.hexlify(this._data)}get consumed(){return this._offset}static coerce(t,e){let r=t.match("^u?int([0-9]+)$");return r&&parseInt(r[1])<=48&&(e=e.toNumber()),e}coerce(t,e){return this._coerceFunc?this._coerceFunc(t,e):M.coerce(t,e)}_peekBytes(t,e,n){let a=Math.ceil(e/this.wordSize)*this.wordSize;return this._offset+a>this._data.length&&(this.allowLoose&&n&&this._offset+e<=this._data.length?a=e:R.throwError("data out-of-bounds",r.Logger.errors.BUFFER_OVERRUN,{length:this._data.length,offset:this._offset+a})),this._data.slice(this._offset,this._offset+a)}subReader(t){return new M(this._data.slice(this._offset+t),this.wordSize,this._coerceFunc,this.allowLoose)}readBytes(t,e){let r=this._peekBytes(0,t,!!e);return this._offset+=r.length,r.slice(0,t)}readValue(){return r.BigNumber.from(this.readBytes(this.wordSize))}}class V extends T{constructor(t){super("address","address",t,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,r){try{r=t.getAddress(r)}catch(t){this._throwError(t.message,r)}return e.writeValue(r)}decode(r){return t.getAddress(e.hexZeroPad(r.readValue().toHexString(),20))}}class C extends T{constructor(t){super(t.name,t.type,void 0,t.dynamic),this.coder=t}defaultValue(){return this.coder.defaultValue()}encode(t,e){return this.coder.encode(t,e)}decode(t){return this.coder.decode(t)}}const z=new r.Logger(i);function k(t,e,n){let a=null;if(Array.isArray(n))a=n;else if(n&&"object"==typeof n){let t={};a=e.map((e=>{const a=e.localName;return a||z.throwError("cannot encode object for signature with missing names",r.Logger.errors.INVALID_ARGUMENT,{argument:"values",coder:e,value:n}),t[a]&&z.throwError("cannot encode object for signature with duplicate names",r.Logger.errors.INVALID_ARGUMENT,{argument:"values",coder:e,value:n}),t[a]=!0,n[a]}))}else z.throwArgumentError("invalid tuple value","tuple",n);e.length!==a.length&&z.throwArgumentError("types/value length mismatch","tuple",n);let s=new L(t.wordSize),i=new L(t.wordSize),o=[];e.forEach(((t,e)=>{let r=a[e];if(t.dynamic){let e=i.length;t.encode(i,r);let n=s.writeUpdatableValue();o.push((t=>{n(t+e)}))}else t.encode(s,r)})),o.forEach((t=>{t(s.length)}));let u=t.appendWriter(s);return u+=t.appendWriter(i),u}function P(t,e){let n=[],a=t.subReader(0);e.forEach((e=>{let s=null;if(e.dynamic){let n=t.readValue(),i=a.subReader(n.toNumber());try{s=e.decode(i)}catch(t){if(t.code===r.Logger.errors.BUFFER_OVERRUN)throw t;s=t,s.baseType=e.name,s.name=e.localName,s.type=e.type}}else try{s=e.decode(t)}catch(t){if(t.code===r.Logger.errors.BUFFER_OVERRUN)throw t;s=t,s.baseType=e.name,s.name=e.localName,s.type=e.type}null!=s&&n.push(s)}));const s=e.reduce(((t,e)=>{const r=e.localName;return r&&(t[r]||(t[r]=0),t[r]++),t}),{});e.forEach(((t,e)=>{let r=t.localName;if(!r||1!==s[r])return;if("length"===r&&(r="_length"),null!=n[r])return;const a=n[e];a instanceof Error?Object.defineProperty(n,r,{enumerable:!0,get:()=>{throw a}}):n[r]=a}));for(let t=0;t<n.length;t++){const e=n[t];e instanceof Error&&Object.defineProperty(n,t,{enumerable:!0,get:()=>{throw e}})}return Object.freeze(n)}class B extends T{constructor(t,e,r){super("array",t.type+"["+(e>=0?e:"")+"]",r,-1===e||t.dynamic),this.coder=t,this.length=e}defaultValue(){const t=this.coder.defaultValue(),e=[];for(let r=0;r<this.length;r++)e.push(t);return e}encode(t,e){Array.isArray(e)||this._throwError("expected array value",e);let r=this.length;-1===r&&(r=e.length,t.writeValue(e.length)),z.checkArgumentCount(e.length,r,"coder array"+(this.localName?" "+this.localName:""));let n=[];for(let t=0;t<e.length;t++)n.push(this.coder);return k(t,n,e)}decode(t){let e=this.length;-1===e&&(e=t.readValue().toNumber(),32*e>t._data.length&&z.throwError("insufficient data length",r.Logger.errors.BUFFER_OVERRUN,{length:t._data.length,count:e}));let n=[];for(let t=0;t<e;t++)n.push(new C(this.coder));return t.coerce(this.name,P(t,n))}}class I extends T{constructor(t){super("bool","bool",t,!1)}defaultValue(){return!1}encode(t,e){return t.writeValue(e?1:0)}decode(t){return t.coerce(this.type,!t.readValue().isZero())}}class U extends T{constructor(t,e){super(t,t,e,!0)}defaultValue(){return"0x"}encode(t,r){r=e.arrayify(r);let n=t.writeValue(r.length);return n+=t.writeBytes(r),n}decode(t){return t.readBytes(t.readValue().toNumber(),!0)}}class D extends U{constructor(t){super("bytes",t)}decode(t){return t.coerce(this.name,e.hexlify(super.decode(t)))}}class $ extends T{constructor(t,e){let r="bytes"+String(t);super(r,r,e,!1),this.size=t}defaultValue(){return"0x0000000000000000000000000000000000000000000000000000000000000000".substring(0,2+2*this.size)}encode(t,r){let n=e.arrayify(r);return n.length!==this.size&&this._throwError("incorrect data length",r),t.writeBytes(n)}decode(t){return t.coerce(this.name,e.hexlify(t.readBytes(this.size)))}}class J extends T{constructor(t){super("null","",t,!1)}defaultValue(){return null}encode(t,e){return null!=e&&this._throwError("not null",e),t.writeBytes([])}decode(t){return t.readBytes(0),t.coerce(this.name,null)}}class W extends T{constructor(t,e,r){const n=(e?"int":"uint")+8*t;super(n,n,r,!1),this.size=t,this.signed=e}defaultValue(){return 0}encode(t,e){let n=r.BigNumber.from(e),a=s.MaxUint256.mask(8*t.wordSize);if(this.signed){let t=a.mask(8*this.size-1);(n.gt(t)||n.lt(t.add(s.One).mul(s.NegativeOne)))&&this._throwError("value out-of-bounds",e)}else(n.lt(s.Zero)||n.gt(a.mask(8*this.size)))&&this._throwError("value out-of-bounds",e);return n=n.toTwos(8*this.size).mask(8*this.size),this.signed&&(n=n.fromTwos(8*this.size).toTwos(8*t.wordSize)),t.writeValue(n)}decode(t){let e=t.readValue().mask(8*this.size);return this.signed&&(e=e.fromTwos(8*this.size)),t.coerce(this.name,e)}}class q extends U{constructor(t){super("string",t)}defaultValue(){return""}encode(t,e){return super.encode(t,r.toUtf8Bytes(e))}decode(t){return r.toUtf8String(super.decode(t))}}class H extends T{constructor(t,e){let r=!1;const n=[];t.forEach((t=>{t.dynamic&&(r=!0),n.push(t.type)}));super("tuple","tuple("+n.join(",")+")",e,r),this.coders=t}defaultValue(){const t=[];this.coders.forEach((e=>{t.push(e.defaultValue())}));const e=this.coders.reduce(((t,e)=>{const r=e.localName;return r&&(t[r]||(t[r]=0),t[r]++),t}),{});return this.coders.forEach(((r,n)=>{let a=r.localName;a&&1===e[a]&&("length"===a&&(a="_length"),null==t[a]&&(t[a]=t[n]))})),Object.freeze(t)}encode(t,e){return k(t,this.coders,e)}decode(t){return t.coerce(this.name,P(t,this.coders))}}const Z=new r.Logger(i),G=new RegExp(/^bytes([0-9]*)$/),X=new RegExp(/^(u?int)([0-9]*)$/);class K{constructor(t){a.defineReadOnly(this,"coerceFunc",t||null)}_getCoder(t){switch(t.baseType){case"address":return new V(t.name);case"bool":return new I(t.name);case"string":return new q(t.name);case"bytes":return new D(t.name);case"array":return new B(this._getCoder(t.arrayChildren),t.arrayLength,t.name);case"tuple":return new H((t.components||[]).map((t=>this._getCoder(t))),t.name);case"":return new J(t.name)}let e=t.type.match(X);if(e){let r=parseInt(e[2]||"256");return(0===r||r>256||r%8!=0)&&Z.throwArgumentError("invalid "+e[1]+" bit length","param",t),new W(r/8,"int"===e[1],t.name)}if(e=t.type.match(G),e){let r=parseInt(e[1]);return(0===r||r>32)&&Z.throwArgumentError("invalid bytes length","param",t),new $(r,t.name)}return Z.throwArgumentError("invalid type","type",t.type)}_getWordSize(){return 32}_getReader(t,e){return new M(t,this._getWordSize(),this.coerceFunc,e)}_getWriter(){return new L(this._getWordSize())}getDefaultValue(t){const e=t.map((t=>this._getCoder(g.from(t))));return new H(e,"_").defaultValue()}encode(t,e){t.length!==e.length&&Z.throwError("types/values length mismatch",r.Logger.errors.INVALID_ARGUMENT,{count:{types:t.length,values:e.length},value:{types:t,values:e}});const n=t.map((t=>this._getCoder(g.from(t)))),a=new H(n,"_"),s=this._getWriter();return a.encode(s,e),s.data}decode(t,r,n){const a=t.map((t=>this._getCoder(g.from(t))));return new H(a,"_").decode(this._getReader(e.arrayify(r),n))}}const Q=new K,Y=new r.Logger(i);class tt extends a.Description{}class et extends a.Description{}class rt extends a.Description{}class nt extends a.Description{static isIndexed(t){return!(!t||!t._isIndexed)}}const at={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:!0},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"]}};function st(t,e){const r=new Error(`deferred error during ABI decoding triggered accessing ${t}`);return r.error=e,r}exports.AbiCoder=K,exports.ConstructorFragment=_,exports.ErrorFragment=O,exports.EventFragment=b,exports.FormatTypes=d,exports.Fragment=y,exports.FunctionFragment=x,exports.Indexed=nt,exports.Interface=class{constructor(t){let e=[];e="string"==typeof t?JSON.parse(t):t,a.defineReadOnly(this,"fragments",e.map((t=>y.from(t))).filter((t=>null!=t))),a.defineReadOnly(this,"_abiCoder",a.getStatic(new.target,"getAbiCoder")()),a.defineReadOnly(this,"functions",{}),a.defineReadOnly(this,"errors",{}),a.defineReadOnly(this,"events",{}),a.defineReadOnly(this,"structs",{}),this.fragments.forEach((t=>{let e=null;switch(t.type){case"constructor":return this.deploy?void Y.warn("duplicate definition - constructor"):void a.defineReadOnly(this,"deploy",t);case"function":e=this.functions;break;case"event":e=this.events;break;case"error":e=this.errors;break;default:return}let r=t.format();e[r]?Y.warn("duplicate definition - "+r):e[r]=t})),this.deploy||a.defineReadOnly(this,"deploy",_.from({payable:!1,type:"constructor"})),a.defineReadOnly(this,"_isInterface",!0)}format(t){t||(t=d.full),t===d.sighash&&Y.throwArgumentError("interface does not support formatting sighash","format",t);const e=this.fragments.map((e=>e.format(t)));return t===d.json?JSON.stringify(e.map((t=>JSON.parse(t)))):e}static getAbiCoder(){return Q}static getAddress(e){return t.getAddress(e)}static getSighash(t){return e.hexDataSlice(r.id(t.format()),0,4)}static getEventTopic(t){return r.id(t.format())}getFunction(t){if(e.isHexString(t)){for(const e in this.functions)if(t===this.getSighash(e))return this.functions[e];Y.throwArgumentError("no matching function","sighash",t)}if(-1===t.indexOf("(")){const e=t.trim(),r=Object.keys(this.functions).filter((t=>t.split("(")[0]===e));return 0===r.length?Y.throwArgumentError("no matching function","name",e):r.length>1&&Y.throwArgumentError("multiple matching functions","name",e),this.functions[r[0]]}const r=this.functions[x.fromString(t).format()];return r||Y.throwArgumentError("no matching function","signature",t),r}getEvent(t){if(e.isHexString(t)){const e=t.toLowerCase();for(const t in this.events)if(e===this.getEventTopic(t))return this.events[t];Y.throwArgumentError("no matching event","topichash",e)}if(-1===t.indexOf("(")){const e=t.trim(),r=Object.keys(this.events).filter((t=>t.split("(")[0]===e));return 0===r.length?Y.throwArgumentError("no matching event","name",e):r.length>1&&Y.throwArgumentError("multiple matching events","name",e),this.events[r[0]]}const r=this.events[b.fromString(t).format()];return r||Y.throwArgumentError("no matching event","signature",t),r}getError(t){if(e.isHexString(t)){const e=a.getStatic(this.constructor,"getSighash");for(const r in this.errors){if(t===e(this.errors[r]))return this.errors[r]}Y.throwArgumentError("no matching error","sighash",t)}if(-1===t.indexOf("(")){const e=t.trim(),r=Object.keys(this.errors).filter((t=>t.split("(")[0]===e));return 0===r.length?Y.throwArgumentError("no matching error","name",e):r.length>1&&Y.throwArgumentError("multiple matching errors","name",e),this.errors[r[0]]}const r=this.errors[x.fromString(t).format()];return r||Y.throwArgumentError("no matching error","signature",t),r}getSighash(t){if("string"==typeof t)try{t=this.getFunction(t)}catch(e){try{t=this.getError(t)}catch(t){throw e}}return a.getStatic(this.constructor,"getSighash")(t)}getEventTopic(t){return"string"==typeof t&&(t=this.getEvent(t)),a.getStatic(this.constructor,"getEventTopic")(t)}_decodeParams(t,e){return this._abiCoder.decode(t,e)}_encodeParams(t,e){return this._abiCoder.encode(t,e)}encodeDeploy(t){return this._encodeParams(this.deploy.inputs,t||[])}decodeErrorResult(t,r){"string"==typeof t&&(t=this.getError(t));const n=e.arrayify(r);return e.hexlify(n.slice(0,4))!==this.getSighash(t)&&Y.throwArgumentError(`data signature does not match error ${t.name}.`,"data",e.hexlify(n)),this._decodeParams(t.inputs,n.slice(4))}encodeErrorResult(t,r){return"string"==typeof t&&(t=this.getError(t)),e.hexlify(e.concat([this.getSighash(t),this._encodeParams(t.inputs,r||[])]))}decodeFunctionData(t,r){"string"==typeof t&&(t=this.getFunction(t));const n=e.arrayify(r);return e.hexlify(n.slice(0,4))!==this.getSighash(t)&&Y.throwArgumentError(`data signature does not match function ${t.name}.`,"data",e.hexlify(n)),this._decodeParams(t.inputs,n.slice(4))}encodeFunctionData(t,r){return"string"==typeof t&&(t=this.getFunction(t)),e.hexlify(e.concat([this.getSighash(t),this._encodeParams(t.inputs,r||[])]))}decodeFunctionResult(t,n){"string"==typeof t&&(t=this.getFunction(t));let a=e.arrayify(n),s=null,i="",o=null,u=null,c=null;switch(a.length%this._abiCoder._getWordSize()){case 0:try{return this._abiCoder.decode(t.outputs,a)}catch(t){}break;case 4:{const t=e.hexlify(a.slice(0,4)),r=at[t];if(r)o=this._abiCoder.decode(r.inputs,a.slice(4)),u=r.name,c=r.signature,r.reason&&(s=o[0]),"Error"===u?i=`; VM Exception while processing transaction: reverted with reason string ${JSON.stringify(o[0])}`:"Panic"===u&&(i=`; VM Exception while processing transaction: reverted with panic code ${o[0]}`);else try{const e=this.getError(t);o=this._abiCoder.decode(e.inputs,a.slice(4)),u=e.name,c=e.format()}catch(t){}break}}return Y.throwError("call revert exception"+i,r.Logger.errors.CALL_EXCEPTION,{method:t.format(),data:e.hexlify(n),errorArgs:o,errorName:u,errorSignature:c,reason:s})}encodeFunctionResult(t,r){return"string"==typeof t&&(t=this.getFunction(t)),e.hexlify(this._abiCoder.encode(t.outputs,r||[]))}encodeFilterTopics(t,a){"string"==typeof t&&(t=this.getEvent(t)),a.length>t.inputs.length&&Y.throwError("too many arguments for "+t.format(),r.Logger.errors.UNEXPECTED_ARGUMENT,{argument:"values",value:a});let s=[];t.anonymous||s.push(this.getEventTopic(t));const i=(t,a)=>"string"===t.type?r.id(a):"bytes"===t.type?n.keccak256(e.hexlify(a)):("bool"===t.type&&"boolean"==typeof a&&(a=a?"0x01":"0x00"),t.type.match(/^u?int/)&&(a=r.BigNumber.from(a).toHexString()),"address"===t.type&&this._abiCoder.encode(["address"],[a]),e.hexZeroPad(e.hexlify(a),32));for(a.forEach(((e,r)=>{let n=t.inputs[r];n.indexed?null==e?s.push(null):"array"===n.baseType||"tuple"===n.baseType?Y.throwArgumentError("filtering with tuples or arrays not supported","contract."+n.name,e):Array.isArray(e)?s.push(e.map((t=>i(n,t)))):s.push(i(n,e)):null!=e&&Y.throwArgumentError("cannot filter non-indexed parameters; must be null","contract."+n.name,e)}));s.length&&null===s[s.length-1];)s.pop();return s}encodeEventLog(t,e){"string"==typeof t&&(t=this.getEvent(t));const a=[],s=[],i=[];return t.anonymous||a.push(this.getEventTopic(t)),e.length!==t.inputs.length&&Y.throwArgumentError("event arguments/values mismatch","values",e),t.inputs.forEach(((t,o)=>{const u=e[o];if(t.indexed)if("string"===t.type)a.push(r.id(u));else if("bytes"===t.type)a.push(n.keccak256(u));else{if("tuple"===t.baseType||"array"===t.baseType)throw new Error("not implemented");a.push(this._abiCoder.encode([t.type],[u]))}else s.push(t),i.push(u)})),{data:this._abiCoder.encode(s,i),topics:a}}decodeEventLog(t,n,a){if("string"==typeof t&&(t=this.getEvent(t)),null!=a&&!t.anonymous){let n=this.getEventTopic(t);e.isHexString(a[0],32)&&a[0].toLowerCase()===n||Y.throwError("fragment/topic mismatch",r.Logger.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:n,value:a[0]}),a=a.slice(1)}let s=[],i=[],o=[];t.inputs.forEach(((t,e)=>{t.indexed?"string"===t.type||"bytes"===t.type||"tuple"===t.baseType||"array"===t.baseType?(s.push(g.fromObject({type:"bytes32",name:t.name})),o.push(!0)):(s.push(t),o.push(!1)):(i.push(t),o.push(!1))}));let u=null!=a?this._abiCoder.decode(s,e.concat(a)):null,c=this._abiCoder.decode(i,n,!0),l=[],h=0,m=0;t.inputs.forEach(((t,e)=>{if(t.indexed)if(null==u)l[e]=new nt({_isIndexed:!0,hash:null});else if(o[e])l[e]=new nt({_isIndexed:!0,hash:u[m++]});else try{l[e]=u[m++]}catch(t){l[e]=t}else try{l[e]=c[h++]}catch(t){l[e]=t}if(t.name&&null==l[t.name]){const r=l[e];r instanceof Error?Object.defineProperty(l,t.name,{enumerable:!0,get:()=>{throw st(`property ${JSON.stringify(t.name)}`,r)}}):l[t.name]=r}}));for(let t=0;t<l.length;t++){const e=l[t];e instanceof Error&&Object.defineProperty(l,t,{enumerable:!0,get:()=>{throw st(`index ${t}`,e)}})}return Object.freeze(l)}parseTransaction(t){let e=this.getFunction(t.data.substring(0,10).toLowerCase());return e?new et({args:this._abiCoder.decode(e.inputs,"0x"+t.data.substring(10)),functionFragment:e,name:e.name,signature:e.format(),sighash:this.getSighash(e),value:r.BigNumber.from(t.value||"0")}):null}parseLog(t){let e=this.getEvent(t.topics[0]);return!e||e.anonymous?null:new tt({eventFragment:e,name:e.name,signature:e.format(),topic:this.getEventTopic(e),args:this.decodeEventLog(e,t.data,t.topics)})}parseError(t){const r=e.hexlify(t);let n=this.getError(r.substring(0,10).toLowerCase());return n?new rt({args:this._abiCoder.decode(n.inputs,"0x"+r.substring(10)),errorFragment:n,name:n.name,signature:n.format(),sighash:this.getSighash(n)}):null}static isInterface(t){return!(!t||!t._isInterface)}},exports.LogDescription=tt,exports.ParamType=g,exports.TransactionDescription=et,exports.checkResultErrors=function(t){const e=[],r=function(t,n){if(Array.isArray(n))for(let a in n){const s=t.slice();s.push(a);try{r(s,n[a])}catch(t){e.push({path:s,error:t})}}};return r([],t),e},exports.defaultAbiCoder=Q;
1
+ "use strict";var t=require("@ethersproject/address"),e=require("@ethersproject/bytes"),r=require("./id-1118c8d9.cjs"),n=require("./index-0ce04635.cjs"),a=require("@ethersproject/properties"),s=require("@ethersproject/constants");const i="abi/5.7.0",o=new r.Logger(i),u={};let c={calldata:!0,memory:!0,storage:!0},l={calldata:!0,memory:!0};function h(t,e){if("bytes"===t||"string"===t){if(c[e])return!0}else if("address"===t){if("payable"===e)return!0}else if((t.indexOf("[")>=0||"tuple"===t)&&l[e])return!0;return(c[e]||"payable"===e)&&o.throwArgumentError("invalid modifier","name",e),!1}function m(t,e){for(let r in e)a.defineReadOnly(t,r,e[r])}const d=Object.freeze({sighash:"sighash",minimal:"minimal",full:"full",json:"json"}),p=new RegExp(/^(.*)\[([0-9]*)\]$/);class g{constructor(t,e){t!==u&&o.throwError("use fromString",r.Logger.errors.UNSUPPORTED_OPERATION,{operation:"new ParamType()"}),m(this,e);let n=this.type.match(p);m(this,n?{arrayLength:parseInt(n[2]||"-1"),arrayChildren:g.fromObject({type:n[1],components:this.components}),baseType:"array"}:{arrayLength:null,arrayChildren:null,baseType:null!=this.components?"tuple":this.type}),this._isParamType=!0,Object.freeze(this)}format(t){if(t||(t=d.sighash),d[t]||o.throwArgumentError("invalid format type","format",t),t===d.json){let e={type:"tuple"===this.baseType?"tuple":this.type,name:this.name||void 0};return"boolean"==typeof this.indexed&&(e.indexed=this.indexed),this.components&&(e.components=this.components.map((e=>JSON.parse(e.format(t))))),JSON.stringify(e)}let e="";return"array"===this.baseType?(e+=this.arrayChildren.format(t),e+="["+(this.arrayLength<0?"":String(this.arrayLength))+"]"):"tuple"===this.baseType?(t!==d.sighash&&(e+=this.type),e+="("+this.components.map((e=>e.format(t))).join(t===d.full?", ":",")+")"):e+=this.type,t!==d.sighash&&(!0===this.indexed&&(e+=" indexed"),t===d.full&&this.name&&(e+=" "+this.name)),e}static from(t,e){return"string"==typeof t?g.fromString(t,e):g.fromObject(t)}static fromObject(t){return g.isParamType(t)?t:new g(u,{name:t.name||null,type:S(t.type),indexed:null==t.indexed?null:!!t.indexed,components:t.components?t.components.map(g.fromObject):null})}static fromString(t,e){return r=function(t,e){let r=t;function n(e){o.throwArgumentError(`unexpected character at position ${e}`,"param",t)}function a(t){let r={type:"",name:"",parent:t,state:{allowType:!0}};return e&&(r.indexed=!1),r}t=t.replace(/\s/g," ");let s={type:"",name:"",state:{allowType:!0}},i=s;for(let r=0;r<t.length;r++){let s=t[r];switch(s){case"(":i.state.allowType&&""===i.type?i.type="tuple":i.state.allowParams||n(r),i.state.allowType=!1,i.type=S(i.type),i.components=[a(i)],i=i.components[0];break;case")":delete i.state,"indexed"===i.name&&(e||n(r),i.indexed=!0,i.name=""),h(i.type,i.name)&&(i.name=""),i.type=S(i.type);let t=i;i=i.parent,i||n(r),delete t.parent,i.state.allowParams=!1,i.state.allowName=!0,i.state.allowArray=!0;break;case",":delete i.state,"indexed"===i.name&&(e||n(r),i.indexed=!0,i.name=""),h(i.type,i.name)&&(i.name=""),i.type=S(i.type);let o=a(i.parent);i.parent.components.push(o),delete i.parent,i=o;break;case" ":i.state.allowType&&""!==i.type&&(i.type=S(i.type),delete i.state.allowType,i.state.allowName=!0,i.state.allowParams=!0),i.state.allowName&&""!==i.name&&("indexed"===i.name?(e||n(r),i.indexed&&n(r),i.indexed=!0,i.name=""):h(i.type,i.name)?i.name="":i.state.allowName=!1);break;case"[":i.state.allowArray||n(r),i.type+=s,i.state.allowArray=!1,i.state.allowName=!1,i.state.readArray=!0;break;case"]":i.state.readArray||n(r),i.type+=s,i.state.readArray=!1,i.state.allowArray=!0,i.state.allowName=!0;break;default:i.state.allowType?(i.type+=s,i.state.allowParams=!0,i.state.allowArray=!0):i.state.allowName?(i.name+=s,delete i.state.allowArray):i.state.readArray?i.type+=s:n(r)}}return i.parent&&o.throwArgumentError("unexpected eof","param",t),delete s.state,"indexed"===i.name?(e||n(r.length-7),i.indexed&&n(r.length-7),i.indexed=!0,i.name=""):h(i.type,i.name)&&(i.name=""),s.type=S(s.type),s}(t,!!e),g.fromObject({name:r.name,type:r.type,indexed:r.indexed,components:r.components});var r}static isParamType(t){return!(null==t||!t._isParamType)}}function f(t,e){return function(t){t=t.trim();let e=[],r="",n=0;for(let a=0;a<t.length;a++){let s=t[a];","===s&&0===n?(e.push(r),r=""):(r+=s,"("===s?n++:")"===s&&(n--,-1===n&&o.throwArgumentError("unbalanced parenthesis","value",t)))}r&&e.push(r);return e}(t).map((t=>g.fromString(t,e)))}class y{constructor(t,e){t!==u&&o.throwError("use a static from method",r.Logger.errors.UNSUPPORTED_OPERATION,{operation:"new Fragment()"}),m(this,e),this._isFragment=!0,Object.freeze(this)}static from(t){return y.isFragment(t)?t:"string"==typeof t?y.fromString(t):y.fromObject(t)}static fromObject(t){if(y.isFragment(t))return t;switch(t.type){case"function":return x.fromObject(t);case"event":return b.fromObject(t);case"constructor":return _.fromObject(t);case"error":return O.fromObject(t);case"fallback":case"receive":return null}return o.throwArgumentError("invalid fragment object","value",t)}static fromString(t){return"event"===(t=(t=(t=t.replace(/\s/g," ")).replace(/\(/g," (").replace(/\)/g,") ").replace(/\s+/g," ")).trim()).split(" ")[0]?b.fromString(t.substring(5).trim()):"function"===t.split(" ")[0]?x.fromString(t.substring(8).trim()):"constructor"===t.split("(")[0].trim()?_.fromString(t.trim()):"error"===t.split(" ")[0]?O.fromString(t.substring(5).trim()):o.throwArgumentError("unsupported fragment","value",t)}static isFragment(t){return!(!t||!t._isFragment)}}class b extends y{format(t){if(t||(t=d.sighash),d[t]||o.throwArgumentError("invalid format type","format",t),t===d.json)return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map((e=>JSON.parse(e.format(t))))});let e="";return t!==d.sighash&&(e+="event "),e+=this.name+"("+this.inputs.map((e=>e.format(t))).join(t===d.full?", ":",")+") ",t!==d.sighash&&this.anonymous&&(e+="anonymous "),e.trim()}static from(t){return"string"==typeof t?b.fromString(t):b.fromObject(t)}static fromObject(t){if(b.isEventFragment(t))return t;"event"!==t.type&&o.throwArgumentError("invalid event object","value",t);const e={name:j(t.name),anonymous:t.anonymous,inputs:t.inputs?t.inputs.map(g.fromObject):[],type:"event"};return new b(u,e)}static fromString(t){let e=t.match(F);e||o.throwArgumentError("invalid event string","value",t);let r=!1;return e[3].split(" ").forEach((t=>{switch(t.trim()){case"anonymous":r=!0;break;case"":break;default:o.warn("unknown modifier: "+t)}})),b.fromObject({name:e[1].trim(),anonymous:r,inputs:f(e[2],!0),type:"event"})}static isEventFragment(t){return t&&t._isFragment&&"event"===t.type}}function w(t,e){e.gas=null;let n=t.split("@");return 1!==n.length?(n.length>2&&o.throwArgumentError("invalid human-readable ABI signature","value",t),n[1].match(/^[0-9]+$/)||o.throwArgumentError("invalid human-readable ABI signature gas","value",t),e.gas=r.BigNumber.from(n[1]),n[0]):t}function E(t,e){e.constant=!1,e.payable=!1,e.stateMutability="nonpayable",t.split(" ").forEach((t=>{switch(t.trim()){case"constant":e.constant=!0;break;case"payable":e.payable=!0,e.stateMutability="payable";break;case"nonpayable":e.payable=!1,e.stateMutability="nonpayable";break;case"pure":e.constant=!0,e.stateMutability="pure";break;case"view":e.constant=!0,e.stateMutability="view";break;case"external":case"public":case"":break;default:console.log("unknown modifier: "+t)}}))}function v(t){let e={constant:!1,payable:!0,stateMutability:"payable"};return null!=t.stateMutability?(e.stateMutability=t.stateMutability,e.constant="view"===e.stateMutability||"pure"===e.stateMutability,null!=t.constant&&!!t.constant!==e.constant&&o.throwArgumentError("cannot have constant function with mutability "+e.stateMutability,"value",t),e.payable="payable"===e.stateMutability,null!=t.payable&&!!t.payable!==e.payable&&o.throwArgumentError("cannot have payable function with mutability "+e.stateMutability,"value",t)):null!=t.payable?(e.payable=!!t.payable,null!=t.constant||e.payable||"constructor"===t.type||o.throwArgumentError("unable to determine stateMutability","value",t),e.constant=!!t.constant,e.constant?e.stateMutability="view":e.stateMutability=e.payable?"payable":"nonpayable",e.payable&&e.constant&&o.throwArgumentError("cannot have constant payable function","value",t)):null!=t.constant?(e.constant=!!t.constant,e.payable=!e.constant,e.stateMutability=e.constant?"view":"payable"):"constructor"!==t.type&&o.throwArgumentError("unable to determine stateMutability","value",t),e}class _ extends y{format(t){if(t||(t=d.sighash),d[t]||o.throwArgumentError("invalid format type","format",t),t===d.json)return JSON.stringify({type:"constructor",stateMutability:"nonpayable"!==this.stateMutability?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map((e=>JSON.parse(e.format(t))))});t===d.sighash&&o.throwError("cannot format a constructor for sighash",r.Logger.errors.UNSUPPORTED_OPERATION,{operation:"format(sighash)"});let e="constructor("+this.inputs.map((e=>e.format(t))).join(t===d.full?", ":",")+") ";return this.stateMutability&&"nonpayable"!==this.stateMutability&&(e+=this.stateMutability+" "),e.trim()}static from(t){return"string"==typeof t?_.fromString(t):_.fromObject(t)}static fromObject(t){if(_.isConstructorFragment(t))return t;"constructor"!==t.type&&o.throwArgumentError("invalid constructor object","value",t);let e=v(t);e.constant&&o.throwArgumentError("constructor cannot be constant","value",t);const n={name:null,type:t.type,inputs:t.inputs?t.inputs.map(g.fromObject):[],payable:e.payable,stateMutability:e.stateMutability,gas:t.gas?r.BigNumber.from(t.gas):null};return new _(u,n)}static fromString(t){let e={type:"constructor"},r=(t=w(t,e)).match(F);return r&&"constructor"===r[1].trim()||o.throwArgumentError("invalid constructor string","value",t),e.inputs=f(r[2].trim(),!1),E(r[3].trim(),e),_.fromObject(e)}static isConstructorFragment(t){return t&&t._isFragment&&"constructor"===t.type}}class x extends _{format(t){if(t||(t=d.sighash),d[t]||o.throwArgumentError("invalid format type","format",t),t===d.json)return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:"nonpayable"!==this.stateMutability?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map((e=>JSON.parse(e.format(t)))),outputs:this.outputs.map((e=>JSON.parse(e.format(t))))});let e="";return t!==d.sighash&&(e+="function "),e+=this.name+"("+this.inputs.map((e=>e.format(t))).join(t===d.full?", ":",")+") ",t!==d.sighash&&(this.stateMutability?"nonpayable"!==this.stateMutability&&(e+=this.stateMutability+" "):this.constant&&(e+="view "),this.outputs&&this.outputs.length&&(e+="returns ("+this.outputs.map((e=>e.format(t))).join(", ")+") "),null!=this.gas&&(e+="@"+this.gas.toString()+" ")),e.trim()}static from(t){return"string"==typeof t?x.fromString(t):x.fromObject(t)}static fromObject(t){if(x.isFunctionFragment(t))return t;"function"!==t.type&&o.throwArgumentError("invalid function object","value",t);let e=v(t);const n={type:t.type,name:j(t.name),constant:e.constant,inputs:t.inputs?t.inputs.map(g.fromObject):[],outputs:t.outputs?t.outputs.map(g.fromObject):[],payable:e.payable,stateMutability:e.stateMutability,gas:t.gas?r.BigNumber.from(t.gas):null};return new x(u,n)}static fromString(t){let e={type:"function"},r=(t=w(t,e)).split(" returns ");r.length>2&&o.throwArgumentError("invalid function string","value",t);let n=r[0].match(F);if(n||o.throwArgumentError("invalid function signature","value",t),e.name=n[1].trim(),e.name&&j(e.name),e.inputs=f(n[2],!1),E(n[3].trim(),e),r.length>1){let n=r[1].match(F);""==n[1].trim()&&""==n[3].trim()||o.throwArgumentError("unexpected tokens","value",t),e.outputs=f(n[2],!1)}else e.outputs=[];return x.fromObject(e)}static isFunctionFragment(t){return t&&t._isFragment&&"function"===t.type}}function A(t){const e=t.format();return"Error(string)"!==e&&"Panic(uint256)"!==e||o.throwArgumentError(`cannot specify user defined ${e} error`,"fragment",t),t}class O extends y{format(t){if(t||(t=d.sighash),d[t]||o.throwArgumentError("invalid format type","format",t),t===d.json)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map((e=>JSON.parse(e.format(t))))});let e="";return t!==d.sighash&&(e+="error "),e+=this.name+"("+this.inputs.map((e=>e.format(t))).join(t===d.full?", ":",")+") ",e.trim()}static from(t){return"string"==typeof t?O.fromString(t):O.fromObject(t)}static fromObject(t){if(O.isErrorFragment(t))return t;"error"!==t.type&&o.throwArgumentError("invalid error object","value",t);const e={type:t.type,name:j(t.name),inputs:t.inputs?t.inputs.map(g.fromObject):[]};return A(new O(u,e))}static fromString(t){let e={type:"error"},r=t.match(F);return r||o.throwArgumentError("invalid error signature","value",t),e.name=r[1].trim(),e.name&&j(e.name),e.inputs=f(r[2],!1),A(O.fromObject(e))}static isErrorFragment(t){return t&&t._isFragment&&"error"===t.type}}function S(t){return t.match(/^uint($|[^1-9])/)?t="uint256"+t.substring(4):t.match(/^int($|[^1-9])/)&&(t="int256"+t.substring(3)),t}const N=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function j(t){return t&&t.match(N)||o.throwArgumentError(`invalid identifier "${t}"`,"value",t),t}const F=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$");const R=new r.Logger(i);class T{constructor(t,e,r,n){this.name=t,this.type=e,this.localName=r,this.dynamic=n}_throwError(t,e){R.throwArgumentError(t,this.localName,e)}}class L{constructor(t){a.defineReadOnly(this,"wordSize",t||32),this._data=[],this._dataLength=0,this._padding=new Uint8Array(t)}get data(){return e.hexConcat(this._data)}get length(){return this._dataLength}_writeData(t){return this._data.push(t),this._dataLength+=t.length,t.length}appendWriter(t){return this._writeData(e.concat(t._data))}writeBytes(t){let r=e.arrayify(t);const n=r.length%this.wordSize;return n&&(r=e.concat([r,this._padding.slice(n)])),this._writeData(r)}_getValue(t){let n=e.arrayify(r.BigNumber.from(t));return n.length>this.wordSize&&R.throwError("value out-of-bounds",r.Logger.errors.BUFFER_OVERRUN,{length:this.wordSize,offset:n.length}),n.length%this.wordSize&&(n=e.concat([this._padding.slice(n.length%this.wordSize),n])),n}writeValue(t){return this._writeData(this._getValue(t))}writeUpdatableValue(){const t=this._data.length;return this._data.push(this._padding),this._dataLength+=this.wordSize,e=>{this._data[t]=this._getValue(e)}}}class M{constructor(t,r,n,s){a.defineReadOnly(this,"_data",e.arrayify(t)),a.defineReadOnly(this,"wordSize",r||32),a.defineReadOnly(this,"_coerceFunc",n),a.defineReadOnly(this,"allowLoose",s),this._offset=0}get data(){return e.hexlify(this._data)}get consumed(){return this._offset}static coerce(t,e){let r=t.match("^u?int([0-9]+)$");return r&&parseInt(r[1])<=48&&(e=e.toNumber()),e}coerce(t,e){return this._coerceFunc?this._coerceFunc(t,e):M.coerce(t,e)}_peekBytes(t,e,n){let a=Math.ceil(e/this.wordSize)*this.wordSize;return this._offset+a>this._data.length&&(this.allowLoose&&n&&this._offset+e<=this._data.length?a=e:R.throwError("data out-of-bounds",r.Logger.errors.BUFFER_OVERRUN,{length:this._data.length,offset:this._offset+a})),this._data.slice(this._offset,this._offset+a)}subReader(t){return new M(this._data.slice(this._offset+t),this.wordSize,this._coerceFunc,this.allowLoose)}readBytes(t,e){let r=this._peekBytes(0,t,!!e);return this._offset+=r.length,r.slice(0,t)}readValue(){return r.BigNumber.from(this.readBytes(this.wordSize))}}class V extends T{constructor(t){super("address","address",t,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,r){try{r=t.getAddress(r)}catch(t){this._throwError(t.message,r)}return e.writeValue(r)}decode(r){return t.getAddress(e.hexZeroPad(r.readValue().toHexString(),20))}}class C extends T{constructor(t){super(t.name,t.type,void 0,t.dynamic),this.coder=t}defaultValue(){return this.coder.defaultValue()}encode(t,e){return this.coder.encode(t,e)}decode(t){return this.coder.decode(t)}}const z=new r.Logger(i);function k(t,e,n){let a=null;if(Array.isArray(n))a=n;else if(n&&"object"==typeof n){let t={};a=e.map((e=>{const a=e.localName;return a||z.throwError("cannot encode object for signature with missing names",r.Logger.errors.INVALID_ARGUMENT,{argument:"values",coder:e,value:n}),t[a]&&z.throwError("cannot encode object for signature with duplicate names",r.Logger.errors.INVALID_ARGUMENT,{argument:"values",coder:e,value:n}),t[a]=!0,n[a]}))}else z.throwArgumentError("invalid tuple value","tuple",n);e.length!==a.length&&z.throwArgumentError("types/value length mismatch","tuple",n);let s=new L(t.wordSize),i=new L(t.wordSize),o=[];e.forEach(((t,e)=>{let r=a[e];if(t.dynamic){let e=i.length;t.encode(i,r);let n=s.writeUpdatableValue();o.push((t=>{n(t+e)}))}else t.encode(s,r)})),o.forEach((t=>{t(s.length)}));let u=t.appendWriter(s);return u+=t.appendWriter(i),u}function P(t,e){let n=[],a=t.subReader(0);e.forEach((e=>{let s=null;if(e.dynamic){let n=t.readValue(),i=a.subReader(n.toNumber());try{s=e.decode(i)}catch(t){if(t.code===r.Logger.errors.BUFFER_OVERRUN)throw t;s=t,s.baseType=e.name,s.name=e.localName,s.type=e.type}}else try{s=e.decode(t)}catch(t){if(t.code===r.Logger.errors.BUFFER_OVERRUN)throw t;s=t,s.baseType=e.name,s.name=e.localName,s.type=e.type}null!=s&&n.push(s)}));const s=e.reduce(((t,e)=>{const r=e.localName;return r&&(t[r]||(t[r]=0),t[r]++),t}),{});e.forEach(((t,e)=>{let r=t.localName;if(!r||1!==s[r])return;if("length"===r&&(r="_length"),null!=n[r])return;const a=n[e];a instanceof Error?Object.defineProperty(n,r,{enumerable:!0,get:()=>{throw a}}):n[r]=a}));for(let t=0;t<n.length;t++){const e=n[t];e instanceof Error&&Object.defineProperty(n,t,{enumerable:!0,get:()=>{throw e}})}return Object.freeze(n)}class B extends T{constructor(t,e,r){super("array",t.type+"["+(e>=0?e:"")+"]",r,-1===e||t.dynamic),this.coder=t,this.length=e}defaultValue(){const t=this.coder.defaultValue(),e=[];for(let r=0;r<this.length;r++)e.push(t);return e}encode(t,e){Array.isArray(e)||this._throwError("expected array value",e);let r=this.length;-1===r&&(r=e.length,t.writeValue(e.length)),z.checkArgumentCount(e.length,r,"coder array"+(this.localName?" "+this.localName:""));let n=[];for(let t=0;t<e.length;t++)n.push(this.coder);return k(t,n,e)}decode(t){let e=this.length;-1===e&&(e=t.readValue().toNumber(),32*e>t._data.length&&z.throwError("insufficient data length",r.Logger.errors.BUFFER_OVERRUN,{length:t._data.length,count:e}));let n=[];for(let t=0;t<e;t++)n.push(new C(this.coder));return t.coerce(this.name,P(t,n))}}class I extends T{constructor(t){super("bool","bool",t,!1)}defaultValue(){return!1}encode(t,e){return t.writeValue(e?1:0)}decode(t){return t.coerce(this.type,!t.readValue().isZero())}}class U extends T{constructor(t,e){super(t,t,e,!0)}defaultValue(){return"0x"}encode(t,r){r=e.arrayify(r);let n=t.writeValue(r.length);return n+=t.writeBytes(r),n}decode(t){return t.readBytes(t.readValue().toNumber(),!0)}}class D extends U{constructor(t){super("bytes",t)}decode(t){return t.coerce(this.name,e.hexlify(super.decode(t)))}}class $ extends T{constructor(t,e){let r="bytes"+String(t);super(r,r,e,!1),this.size=t}defaultValue(){return"0x0000000000000000000000000000000000000000000000000000000000000000".substring(0,2+2*this.size)}encode(t,r){let n=e.arrayify(r);return n.length!==this.size&&this._throwError("incorrect data length",r),t.writeBytes(n)}decode(t){return t.coerce(this.name,e.hexlify(t.readBytes(this.size)))}}class J extends T{constructor(t){super("null","",t,!1)}defaultValue(){return null}encode(t,e){return null!=e&&this._throwError("not null",e),t.writeBytes([])}decode(t){return t.readBytes(0),t.coerce(this.name,null)}}class W extends T{constructor(t,e,r){const n=(e?"int":"uint")+8*t;super(n,n,r,!1),this.size=t,this.signed=e}defaultValue(){return 0}encode(t,e){let n=r.BigNumber.from(e),a=s.MaxUint256.mask(8*t.wordSize);if(this.signed){let t=a.mask(8*this.size-1);(n.gt(t)||n.lt(t.add(s.One).mul(s.NegativeOne)))&&this._throwError("value out-of-bounds",e)}else(n.lt(s.Zero)||n.gt(a.mask(8*this.size)))&&this._throwError("value out-of-bounds",e);return n=n.toTwos(8*this.size).mask(8*this.size),this.signed&&(n=n.fromTwos(8*this.size).toTwos(8*t.wordSize)),t.writeValue(n)}decode(t){let e=t.readValue().mask(8*this.size);return this.signed&&(e=e.fromTwos(8*this.size)),t.coerce(this.name,e)}}class q extends U{constructor(t){super("string",t)}defaultValue(){return""}encode(t,e){return super.encode(t,r.toUtf8Bytes(e))}decode(t){return r.toUtf8String(super.decode(t))}}class H extends T{constructor(t,e){let r=!1;const n=[];t.forEach((t=>{t.dynamic&&(r=!0),n.push(t.type)}));super("tuple","tuple("+n.join(",")+")",e,r),this.coders=t}defaultValue(){const t=[];this.coders.forEach((e=>{t.push(e.defaultValue())}));const e=this.coders.reduce(((t,e)=>{const r=e.localName;return r&&(t[r]||(t[r]=0),t[r]++),t}),{});return this.coders.forEach(((r,n)=>{let a=r.localName;a&&1===e[a]&&("length"===a&&(a="_length"),null==t[a]&&(t[a]=t[n]))})),Object.freeze(t)}encode(t,e){return k(t,this.coders,e)}decode(t){return t.coerce(this.name,P(t,this.coders))}}const Z=new r.Logger(i),G=new RegExp(/^bytes([0-9]*)$/),X=new RegExp(/^(u?int)([0-9]*)$/);class K{constructor(t){a.defineReadOnly(this,"coerceFunc",t||null)}_getCoder(t){switch(t.baseType){case"address":return new V(t.name);case"bool":return new I(t.name);case"string":return new q(t.name);case"bytes":return new D(t.name);case"array":return new B(this._getCoder(t.arrayChildren),t.arrayLength,t.name);case"tuple":return new H((t.components||[]).map((t=>this._getCoder(t))),t.name);case"":return new J(t.name)}let e=t.type.match(X);if(e){let r=parseInt(e[2]||"256");return(0===r||r>256||r%8!=0)&&Z.throwArgumentError("invalid "+e[1]+" bit length","param",t),new W(r/8,"int"===e[1],t.name)}if(e=t.type.match(G),e){let r=parseInt(e[1]);return(0===r||r>32)&&Z.throwArgumentError("invalid bytes length","param",t),new $(r,t.name)}return Z.throwArgumentError("invalid type","type",t.type)}_getWordSize(){return 32}_getReader(t,e){return new M(t,this._getWordSize(),this.coerceFunc,e)}_getWriter(){return new L(this._getWordSize())}getDefaultValue(t){const e=t.map((t=>this._getCoder(g.from(t))));return new H(e,"_").defaultValue()}encode(t,e){t.length!==e.length&&Z.throwError("types/values length mismatch",r.Logger.errors.INVALID_ARGUMENT,{count:{types:t.length,values:e.length},value:{types:t,values:e}});const n=t.map((t=>this._getCoder(g.from(t)))),a=new H(n,"_"),s=this._getWriter();return a.encode(s,e),s.data}decode(t,r,n){const a=t.map((t=>this._getCoder(g.from(t))));return new H(a,"_").decode(this._getReader(e.arrayify(r),n))}}const Q=new K,Y=new r.Logger(i);class tt extends a.Description{}class et extends a.Description{}class rt extends a.Description{}class nt extends a.Description{static isIndexed(t){return!(!t||!t._isIndexed)}}const at={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:!0},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"]}};function st(t,e){const r=new Error(`deferred error during ABI decoding triggered accessing ${t}`);return r.error=e,r}exports.AbiCoder=K,exports.ConstructorFragment=_,exports.ErrorFragment=O,exports.EventFragment=b,exports.FormatTypes=d,exports.Fragment=y,exports.FunctionFragment=x,exports.Indexed=nt,exports.Interface=class{constructor(t){let e=[];e="string"==typeof t?JSON.parse(t):t,a.defineReadOnly(this,"fragments",e.map((t=>y.from(t))).filter((t=>null!=t))),a.defineReadOnly(this,"_abiCoder",a.getStatic(new.target,"getAbiCoder")()),a.defineReadOnly(this,"functions",{}),a.defineReadOnly(this,"errors",{}),a.defineReadOnly(this,"events",{}),a.defineReadOnly(this,"structs",{}),this.fragments.forEach((t=>{let e=null;switch(t.type){case"constructor":return this.deploy?void Y.warn("duplicate definition - constructor"):void a.defineReadOnly(this,"deploy",t);case"function":e=this.functions;break;case"event":e=this.events;break;case"error":e=this.errors;break;default:return}let r=t.format();e[r]?Y.warn("duplicate definition - "+r):e[r]=t})),this.deploy||a.defineReadOnly(this,"deploy",_.from({payable:!1,type:"constructor"})),a.defineReadOnly(this,"_isInterface",!0)}format(t){t||(t=d.full),t===d.sighash&&Y.throwArgumentError("interface does not support formatting sighash","format",t);const e=this.fragments.map((e=>e.format(t)));return t===d.json?JSON.stringify(e.map((t=>JSON.parse(t)))):e}static getAbiCoder(){return Q}static getAddress(e){return t.getAddress(e)}static getSighash(t){return e.hexDataSlice(r.id(t.format()),0,4)}static getEventTopic(t){return r.id(t.format())}getFunction(t){if(e.isHexString(t)){for(const e in this.functions)if(t===this.getSighash(e))return this.functions[e];Y.throwArgumentError("no matching function","sighash",t)}if(-1===t.indexOf("(")){const e=t.trim(),r=Object.keys(this.functions).filter((t=>t.split("(")[0]===e));return 0===r.length?Y.throwArgumentError("no matching function","name",e):r.length>1&&Y.throwArgumentError("multiple matching functions","name",e),this.functions[r[0]]}const r=this.functions[x.fromString(t).format()];return r||Y.throwArgumentError("no matching function","signature",t),r}getEvent(t){if(e.isHexString(t)){const e=t.toLowerCase();for(const t in this.events)if(e===this.getEventTopic(t))return this.events[t];Y.throwArgumentError("no matching event","topichash",e)}if(-1===t.indexOf("(")){const e=t.trim(),r=Object.keys(this.events).filter((t=>t.split("(")[0]===e));return 0===r.length?Y.throwArgumentError("no matching event","name",e):r.length>1&&Y.throwArgumentError("multiple matching events","name",e),this.events[r[0]]}const r=this.events[b.fromString(t).format()];return r||Y.throwArgumentError("no matching event","signature",t),r}getError(t){if(e.isHexString(t)){const e=a.getStatic(this.constructor,"getSighash");for(const r in this.errors){if(t===e(this.errors[r]))return this.errors[r]}Y.throwArgumentError("no matching error","sighash",t)}if(-1===t.indexOf("(")){const e=t.trim(),r=Object.keys(this.errors).filter((t=>t.split("(")[0]===e));return 0===r.length?Y.throwArgumentError("no matching error","name",e):r.length>1&&Y.throwArgumentError("multiple matching errors","name",e),this.errors[r[0]]}const r=this.errors[x.fromString(t).format()];return r||Y.throwArgumentError("no matching error","signature",t),r}getSighash(t){if("string"==typeof t)try{t=this.getFunction(t)}catch(e){try{t=this.getError(t)}catch(t){throw e}}return a.getStatic(this.constructor,"getSighash")(t)}getEventTopic(t){return"string"==typeof t&&(t=this.getEvent(t)),a.getStatic(this.constructor,"getEventTopic")(t)}_decodeParams(t,e){return this._abiCoder.decode(t,e)}_encodeParams(t,e){return this._abiCoder.encode(t,e)}encodeDeploy(t){return this._encodeParams(this.deploy.inputs,t||[])}decodeErrorResult(t,r){"string"==typeof t&&(t=this.getError(t));const n=e.arrayify(r);return e.hexlify(n.slice(0,4))!==this.getSighash(t)&&Y.throwArgumentError(`data signature does not match error ${t.name}.`,"data",e.hexlify(n)),this._decodeParams(t.inputs,n.slice(4))}encodeErrorResult(t,r){return"string"==typeof t&&(t=this.getError(t)),e.hexlify(e.concat([this.getSighash(t),this._encodeParams(t.inputs,r||[])]))}decodeFunctionData(t,r){"string"==typeof t&&(t=this.getFunction(t));const n=e.arrayify(r);return e.hexlify(n.slice(0,4))!==this.getSighash(t)&&Y.throwArgumentError(`data signature does not match function ${t.name}.`,"data",e.hexlify(n)),this._decodeParams(t.inputs,n.slice(4))}encodeFunctionData(t,r){return"string"==typeof t&&(t=this.getFunction(t)),e.hexlify(e.concat([this.getSighash(t),this._encodeParams(t.inputs,r||[])]))}decodeFunctionResult(t,n){"string"==typeof t&&(t=this.getFunction(t));let a=e.arrayify(n),s=null,i="",o=null,u=null,c=null;switch(a.length%this._abiCoder._getWordSize()){case 0:try{return this._abiCoder.decode(t.outputs,a)}catch(t){}break;case 4:{const t=e.hexlify(a.slice(0,4)),r=at[t];if(r)o=this._abiCoder.decode(r.inputs,a.slice(4)),u=r.name,c=r.signature,r.reason&&(s=o[0]),"Error"===u?i=`; VM Exception while processing transaction: reverted with reason string ${JSON.stringify(o[0])}`:"Panic"===u&&(i=`; VM Exception while processing transaction: reverted with panic code ${o[0]}`);else try{const e=this.getError(t);o=this._abiCoder.decode(e.inputs,a.slice(4)),u=e.name,c=e.format()}catch(t){}break}}return Y.throwError("call revert exception"+i,r.Logger.errors.CALL_EXCEPTION,{method:t.format(),data:e.hexlify(n),errorArgs:o,errorName:u,errorSignature:c,reason:s})}encodeFunctionResult(t,r){return"string"==typeof t&&(t=this.getFunction(t)),e.hexlify(this._abiCoder.encode(t.outputs,r||[]))}encodeFilterTopics(t,a){"string"==typeof t&&(t=this.getEvent(t)),a.length>t.inputs.length&&Y.throwError("too many arguments for "+t.format(),r.Logger.errors.UNEXPECTED_ARGUMENT,{argument:"values",value:a});let s=[];t.anonymous||s.push(this.getEventTopic(t));const i=(t,a)=>"string"===t.type?r.id(a):"bytes"===t.type?n.keccak256(e.hexlify(a)):("bool"===t.type&&"boolean"==typeof a&&(a=a?"0x01":"0x00"),t.type.match(/^u?int/)&&(a=r.BigNumber.from(a).toHexString()),"address"===t.type&&this._abiCoder.encode(["address"],[a]),e.hexZeroPad(e.hexlify(a),32));for(a.forEach(((e,r)=>{let n=t.inputs[r];n.indexed?null==e?s.push(null):"array"===n.baseType||"tuple"===n.baseType?Y.throwArgumentError("filtering with tuples or arrays not supported","contract."+n.name,e):Array.isArray(e)?s.push(e.map((t=>i(n,t)))):s.push(i(n,e)):null!=e&&Y.throwArgumentError("cannot filter non-indexed parameters; must be null","contract."+n.name,e)}));s.length&&null===s[s.length-1];)s.pop();return s}encodeEventLog(t,e){"string"==typeof t&&(t=this.getEvent(t));const a=[],s=[],i=[];return t.anonymous||a.push(this.getEventTopic(t)),e.length!==t.inputs.length&&Y.throwArgumentError("event arguments/values mismatch","values",e),t.inputs.forEach(((t,o)=>{const u=e[o];if(t.indexed)if("string"===t.type)a.push(r.id(u));else if("bytes"===t.type)a.push(n.keccak256(u));else{if("tuple"===t.baseType||"array"===t.baseType)throw new Error("not implemented");a.push(this._abiCoder.encode([t.type],[u]))}else s.push(t),i.push(u)})),{data:this._abiCoder.encode(s,i),topics:a}}decodeEventLog(t,n,a){if("string"==typeof t&&(t=this.getEvent(t)),null!=a&&!t.anonymous){let n=this.getEventTopic(t);e.isHexString(a[0],32)&&a[0].toLowerCase()===n||Y.throwError("fragment/topic mismatch",r.Logger.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:n,value:a[0]}),a=a.slice(1)}let s=[],i=[],o=[];t.inputs.forEach(((t,e)=>{t.indexed?"string"===t.type||"bytes"===t.type||"tuple"===t.baseType||"array"===t.baseType?(s.push(g.fromObject({type:"bytes32",name:t.name})),o.push(!0)):(s.push(t),o.push(!1)):(i.push(t),o.push(!1))}));let u=null!=a?this._abiCoder.decode(s,e.concat(a)):null,c=this._abiCoder.decode(i,n,!0),l=[],h=0,m=0;t.inputs.forEach(((t,e)=>{if(t.indexed)if(null==u)l[e]=new nt({_isIndexed:!0,hash:null});else if(o[e])l[e]=new nt({_isIndexed:!0,hash:u[m++]});else try{l[e]=u[m++]}catch(t){l[e]=t}else try{l[e]=c[h++]}catch(t){l[e]=t}if(t.name&&null==l[t.name]){const r=l[e];r instanceof Error?Object.defineProperty(l,t.name,{enumerable:!0,get:()=>{throw st(`property ${JSON.stringify(t.name)}`,r)}}):l[t.name]=r}}));for(let t=0;t<l.length;t++){const e=l[t];e instanceof Error&&Object.defineProperty(l,t,{enumerable:!0,get:()=>{throw st(`index ${t}`,e)}})}return Object.freeze(l)}parseTransaction(t){let e=this.getFunction(t.data.substring(0,10).toLowerCase());return e?new et({args:this._abiCoder.decode(e.inputs,"0x"+t.data.substring(10)),functionFragment:e,name:e.name,signature:e.format(),sighash:this.getSighash(e),value:r.BigNumber.from(t.value||"0")}):null}parseLog(t){let e=this.getEvent(t.topics[0]);return!e||e.anonymous?null:new tt({eventFragment:e,name:e.name,signature:e.format(),topic:this.getEventTopic(e),args:this.decodeEventLog(e,t.data,t.topics)})}parseError(t){const r=e.hexlify(t);let n=this.getError(r.substring(0,10).toLowerCase());return n?new rt({args:this._abiCoder.decode(n.inputs,"0x"+r.substring(10)),errorFragment:n,name:n.name,signature:n.format(),sighash:this.getSighash(n)}):null}static isInterface(t){return!(!t||!t._isInterface)}},exports.LogDescription=tt,exports.ParamType=g,exports.TransactionDescription=et,exports.checkResultErrors=function(t){const e=[],r=function(t,n){if(Array.isArray(n))for(let a in n){const s=t.slice();s.push(a);try{r(s,n[a])}catch(t){e.push({path:s,error:t})}}};return r([],t),e},exports.defaultAbiCoder=Q;
@@ -1 +1 @@
1
- "use strict";var r,t,e=require("./index-3a818183.cjs"),o=require("./sha256-5e38dae7.cjs"),i={exports:{}},n={exports:{}};function a(){return r||(r=1,t=n,e.commonjsGlobal,t.exports=(l=o.requireCore(),s=(a=l).lib,h=s.Base,f=s.WordArray,(c=a.x64={}).Word=h.extend({init:function(r,t){this.high=r,this.low=t}}),c.WordArray=h.extend({init:function(r,t){r=this.words=r||[],this.sigBytes=t!=i?t:8*r.length},toX32:function(){for(var r=this.words,t=r.length,e=[],o=0;o<t;o++){var i=r[o];e.push(i.high),e.push(i.low)}return f.create(e,this.sigBytes)},clone:function(){for(var r=h.clone.call(this),t=r.words=this.words.slice(0),e=t.length,o=0;o<e;o++)t[o]=t[o].clone();return r}}),l)),n.exports;var t,i,a,s,h,f,c,l}var s,h={exports:{}};exports.requireLibTypedarrays=function(){return s||(s=1,r=h,e.commonjsGlobal,r.exports=(t=o.requireCore(),function(){if("function"==typeof ArrayBuffer){var r=t.lib.WordArray,e=r.init,o=r.init=function(r){if(r instanceof ArrayBuffer&&(r=new Uint8Array(r)),(r instanceof Int8Array||"undefined"!=typeof Uint8ClampedArray&&r instanceof Uint8ClampedArray||r instanceof Int16Array||r instanceof Uint16Array||r instanceof Int32Array||r instanceof Uint32Array||r instanceof Float32Array||r instanceof Float64Array)&&(r=new Uint8Array(r.buffer,r.byteOffset,r.byteLength)),r instanceof Uint8Array){for(var t=r.byteLength,o=[],i=0;i<t;i++)o[i>>>2]|=r[i]<<24-i%4*8;e.call(this,o,t)}else e.apply(this,arguments)};o.prototype=r}}(),t.lib.WordArray)),h.exports;var r,t},exports.requireSha3=function(){return t||(t=1,r=i,e.commonjsGlobal,r.exports=(n=o.requireCore(),a(),function(r){var t=n,e=t.lib,o=e.WordArray,i=e.Hasher,a=t.x64.Word,s=t.algo,h=[],f=[],c=[];!function(){for(var r=1,t=0,e=0;e<24;e++){h[r+5*t]=(e+1)*(e+2)/2%64;var o=(2*r+3*t)%5;r=t%5,t=o}for(r=0;r<5;r++)for(t=0;t<5;t++)f[r+5*t]=t+(2*r+3*t)%5*5;for(var i=1,n=0;n<24;n++){for(var s=0,l=0,u=0;u<7;u++){if(1&i){var v=(1<<u)-1;v<32?l^=1<<v:s^=1<<v-32}128&i?i=i<<1^113:i<<=1}c[n]=a.create(s,l)}}();var l=[];!function(){for(var r=0;r<25;r++)l[r]=a.create()}();var u=s.SHA3=i.extend({cfg:i.cfg.extend({outputLength:512}),_doReset:function(){for(var r=this._state=[],t=0;t<25;t++)r[t]=new a.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(r,t){for(var e=this._state,o=this.blockSize/2,i=0;i<o;i++){var n=r[t+2*i],a=r[t+2*i+1];n=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8),a=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),(U=e[i]).high^=a,U.low^=n}for(var s=0;s<24;s++){for(var u=0;u<5;u++){for(var v=0,g=0,y=0;y<5;y++)v^=(U=e[u+5*y]).high,g^=U.low;var p=l[u];p.high=v,p.low=g}for(u=0;u<5;u++){var w=l[(u+4)%5],d=l[(u+1)%5],A=d.high,x=d.low;for(v=w.high^(A<<1|x>>>31),g=w.low^(x<<1|A>>>31),y=0;y<5;y++)(U=e[u+5*y]).high^=v,U.low^=g}for(var b=1;b<25;b++){var _=(U=e[b]).high,m=U.low,B=h[b];B<32?(v=_<<B|m>>>32-B,g=m<<B|_>>>32-B):(v=m<<B-32|_>>>64-B,g=_<<B-32|m>>>64-B);var H=l[f[b]];H.high=v,H.low=g}var q=l[0],S=e[0];for(q.high=S.high,q.low=S.low,u=0;u<5;u++)for(y=0;y<5;y++){var U=e[b=u+5*y],W=l[b],C=l[(u+1)%5+5*y],L=l[(u+2)%5+5*y];U.high=W.high^~C.high&L.high,U.low=W.low^~C.low&L.low}U=e[0];var j=c[s];U.high^=j.high,U.low^=j.low}},_doFinalize:function(){var t=this._data,e=t.words;this._nDataBytes;var i=8*t.sigBytes,n=32*this.blockSize;e[i>>>5]|=1<<24-i%32,e[(r.ceil((i+1)/n)*n>>>5)-1]|=128,t.sigBytes=4*e.length,this._process();for(var a=this._state,s=this.cfg.outputLength/8,h=s/8,f=[],c=0;c<h;c++){var l=a[c],u=l.high,v=l.low;u=16711935&(u<<8|u>>>24)|4278255360&(u<<24|u>>>8),v=16711935&(v<<8|v>>>24)|4278255360&(v<<24|v>>>8),f.push(v),f.push(u)}return new o.init(f,s)},clone:function(){for(var r=i.clone.call(this),t=r._state=this._state.slice(0),e=0;e<25;e++)t[e]=t[e].clone();return r}});t.SHA3=i._createHelper(u),t.HmacSHA3=i._createHmacHelper(u)}(Math),n.SHA3)),i.exports;var r,n},exports.requireX64Core=a;
1
+ "use strict";var r,t,e=require("./index-0ce04635.cjs"),o=require("./sha256-ab07124e.cjs"),i={exports:{}},n={exports:{}};function a(){return r||(r=1,t=n,e.commonjsGlobal,t.exports=(l=o.requireCore(),s=(a=l).lib,h=s.Base,f=s.WordArray,(c=a.x64={}).Word=h.extend({init:function(r,t){this.high=r,this.low=t}}),c.WordArray=h.extend({init:function(r,t){r=this.words=r||[],this.sigBytes=t!=i?t:8*r.length},toX32:function(){for(var r=this.words,t=r.length,e=[],o=0;o<t;o++){var i=r[o];e.push(i.high),e.push(i.low)}return f.create(e,this.sigBytes)},clone:function(){for(var r=h.clone.call(this),t=r.words=this.words.slice(0),e=t.length,o=0;o<e;o++)t[o]=t[o].clone();return r}}),l)),n.exports;var t,i,a,s,h,f,c,l}var s,h={exports:{}};exports.requireLibTypedarrays=function(){return s||(s=1,r=h,e.commonjsGlobal,r.exports=(t=o.requireCore(),function(){if("function"==typeof ArrayBuffer){var r=t.lib.WordArray,e=r.init,o=r.init=function(r){if(r instanceof ArrayBuffer&&(r=new Uint8Array(r)),(r instanceof Int8Array||"undefined"!=typeof Uint8ClampedArray&&r instanceof Uint8ClampedArray||r instanceof Int16Array||r instanceof Uint16Array||r instanceof Int32Array||r instanceof Uint32Array||r instanceof Float32Array||r instanceof Float64Array)&&(r=new Uint8Array(r.buffer,r.byteOffset,r.byteLength)),r instanceof Uint8Array){for(var t=r.byteLength,o=[],i=0;i<t;i++)o[i>>>2]|=r[i]<<24-i%4*8;e.call(this,o,t)}else e.apply(this,arguments)};o.prototype=r}}(),t.lib.WordArray)),h.exports;var r,t},exports.requireSha3=function(){return t||(t=1,r=i,e.commonjsGlobal,r.exports=(n=o.requireCore(),a(),function(r){var t=n,e=t.lib,o=e.WordArray,i=e.Hasher,a=t.x64.Word,s=t.algo,h=[],f=[],c=[];!function(){for(var r=1,t=0,e=0;e<24;e++){h[r+5*t]=(e+1)*(e+2)/2%64;var o=(2*r+3*t)%5;r=t%5,t=o}for(r=0;r<5;r++)for(t=0;t<5;t++)f[r+5*t]=t+(2*r+3*t)%5*5;for(var i=1,n=0;n<24;n++){for(var s=0,l=0,u=0;u<7;u++){if(1&i){var v=(1<<u)-1;v<32?l^=1<<v:s^=1<<v-32}128&i?i=i<<1^113:i<<=1}c[n]=a.create(s,l)}}();var l=[];!function(){for(var r=0;r<25;r++)l[r]=a.create()}();var u=s.SHA3=i.extend({cfg:i.cfg.extend({outputLength:512}),_doReset:function(){for(var r=this._state=[],t=0;t<25;t++)r[t]=new a.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(r,t){for(var e=this._state,o=this.blockSize/2,i=0;i<o;i++){var n=r[t+2*i],a=r[t+2*i+1];n=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8),a=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),(U=e[i]).high^=a,U.low^=n}for(var s=0;s<24;s++){for(var u=0;u<5;u++){for(var v=0,g=0,y=0;y<5;y++)v^=(U=e[u+5*y]).high,g^=U.low;var p=l[u];p.high=v,p.low=g}for(u=0;u<5;u++){var w=l[(u+4)%5],d=l[(u+1)%5],A=d.high,x=d.low;for(v=w.high^(A<<1|x>>>31),g=w.low^(x<<1|A>>>31),y=0;y<5;y++)(U=e[u+5*y]).high^=v,U.low^=g}for(var b=1;b<25;b++){var _=(U=e[b]).high,m=U.low,B=h[b];B<32?(v=_<<B|m>>>32-B,g=m<<B|_>>>32-B):(v=m<<B-32|_>>>64-B,g=_<<B-32|m>>>64-B);var H=l[f[b]];H.high=v,H.low=g}var q=l[0],S=e[0];for(q.high=S.high,q.low=S.low,u=0;u<5;u++)for(y=0;y<5;y++){var U=e[b=u+5*y],W=l[b],C=l[(u+1)%5+5*y],L=l[(u+2)%5+5*y];U.high=W.high^~C.high&L.high,U.low=W.low^~C.low&L.low}U=e[0];var j=c[s];U.high^=j.high,U.low^=j.low}},_doFinalize:function(){var t=this._data,e=t.words;this._nDataBytes;var i=8*t.sigBytes,n=32*this.blockSize;e[i>>>5]|=1<<24-i%32,e[(r.ceil((i+1)/n)*n>>>5)-1]|=128,t.sigBytes=4*e.length,this._process();for(var a=this._state,s=this.cfg.outputLength/8,h=s/8,f=[],c=0;c<h;c++){var l=a[c],u=l.high,v=l.low;u=16711935&(u<<8|u>>>24)|4278255360&(u<<24|u>>>8),v=16711935&(v<<8|v>>>24)|4278255360&(v<<24|v>>>8),f.push(v),f.push(u)}return new o.init(f,s)},clone:function(){for(var r=i.clone.call(this),t=r._state=this._state.slice(0),e=0;e<25;e++)t[e]=t[e].clone();return r}});t.SHA3=i._createHelper(u),t.HmacSHA3=i._createHmacHelper(u)}(Math),n.SHA3)),i.exports;var r,n},exports.requireX64Core=a;
@@ -1,4 +1,4 @@
1
- "use strict";var e=require("./index-3a818183.cjs");require("@ethersproject/providers"),require("zustand"),require("events"),require("@ethersproject/address"),require("@ethersproject/constants"),require("@ethersproject/contracts"),require("@ethersproject/properties"),require("@ethersproject/transactions"),require("@ethersproject/bytes");var t,r={exports:{}};t=r,e.commonjsGlobal,t.exports=function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=262)}([function(e,t){"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},function(e,t,r){(function(e){
1
+ "use strict";var e=require("./index-0ce04635.cjs");require("@ethersproject/providers"),require("zustand"),require("events"),require("@ethersproject/address"),require("@ethersproject/constants"),require("@ethersproject/contracts"),require("@ethersproject/properties"),require("@ethersproject/transactions"),require("@ethersproject/bytes");var t,r={exports:{}};t=r,e.commonjsGlobal,t.exports=function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=262)}([function(e,t){"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},function(e,t,r){(function(e){
2
2
  /*!
3
3
  * The buffer module from node.js, for the browser.
4
4
  *
@@ -1 +1 @@
1
- "use strict";var e=require("./index-3a818183.cjs");require("@ethersproject/providers"),require("zustand"),require("events"),require("@ethersproject/address"),require("@ethersproject/constants"),require("@ethersproject/contracts"),require("@ethersproject/properties"),require("@ethersproject/transactions"),require("@ethersproject/bytes");const t="dapp-inpage-integration",i="openblock-content-integration",n=["https://cocoswap.com","https://app.openocean.finance"],s=["https://oec.cocoswap.com"];class o{constructor(){console.log("start initialize openblockinpage provider"),this.callBackList={},this.eventListener={},this.isMetaMask=!0,this.isOpenBlock=!0,this.chainId=null,this.networkVersion=null,this.selectedAddress=null,this.request=this.request.bind(this),this.send=this.send.bind(this),this.sendAsync=this.sendAsync.bind(this),this.on=this.on.bind(this),this.isConnected=this.isConnected.bind(this),this.enable=this.enable.bind(this),this._metamask=this._getExperimentalApi(),this._initInpageListener(),this.getProviderData()}getProviderData(){var t;return e.__awaiter(this,void 0,void 0,(function*(){const e=yield this.request("metamask_getProviderState");this.chainId=null==e?void 0:e.chainId,this.networkVersion=null==e?void 0:e.networkVersion,this.selectedAddress=null===(t=null==e?void 0:e.accounts)||void 0===t?void 0:t[0]}))}request(t){return e.__awaiter(this,void 0,void 0,(function*(){if("eth_requestAccounts"===t.method){const e=yield this._hookRequest("eth_accounts");if(e.length)return new Promise((t=>t(e)))}return this._hookRequest(t)}))}send(...t){return e.__awaiter(this,void 0,void 0,(function*(){if("function"!=typeof t[1])return"string"==typeof t[0]?this.request({method:t[0],params:t[1]}):1===t.length?this.request(t):void 0;this.sendAsync(t[0],t[1])}))}sendAsync(...t){return e.__awaiter(this,void 0,void 0,(function*(){const e={method:t[0].method,params:t[0].params},i=t[0].id;this.request(e).then((e=>{t[1](null,{id:i,jsonrpc:"2.0",result:e})})).catch((e=>{t[1](null,{id:i,jsonrpc:"2.0",error:e})}))}))}isConnected(){return!0}enable(){return e.__awaiter(this,void 0,void 0,(function*(){const e=yield this._hookRequest("eth_accounts");return e.length?new Promise((t=>t(e))):this.request({method:"eth_requestAccounts"})}))}on(e,t){"string"==typeof e&&"function"==typeof t&&(this.eventListener[e]&&this.eventListener[e].length>5||(this.eventListener[e]?(this.eventListener[e].push(t),this.eventListener[e]=Array.from(new Set(this.eventListener[e]))):this.eventListener[e]||(this.eventListener=Object.assign(Object.assign({},this.eventListener),{[e]:[t]})),this._registerEvent(e)))}removeListener(){}_initInpageListener(){window.addEventListener("message",(e=>{var i,n,s;if(e.data.target!==t)return;const o=null===(s=null===(n=null===(i=e.data)||void 0===i?void 0:i.value)||void 0===n?void 0:n.data)||void 0===s?void 0:s.mark;o&&("call_method"===o.type?this._handleNormalMethod(o,e):"register_event"===o.type&&this._handleEventMethod(o,e))}),!1)}_handleNormalMethod(e,t){var i,n,s,o,r;(null===(i=t.data.value.data)||void 0===i?void 0:i.error)?null===(n=this.callBackList[e.id])||void 0===n||n.reject(null===(s=t.data.value.data)||void 0===s?void 0:s.error):null===(o=this.callBackList[e.id])||void 0===o||o.resolve(null===(r=t.data.value.data)||void 0===r?void 0:r.result),delete this.callBackList[e.id]}_handleEventMethod(e,t){var i,o,r,a,d,h,l;const c=null===(a=null===(r=null===(o=null===(i=t.data)||void 0===i?void 0:i.value)||void 0===o?void 0:o.data)||void 0===r?void 0:r.mark)||void 0===a?void 0:a.eventName,u=null===(l=null===(h=null===(d=t.data)||void 0===d?void 0:d.value)||void 0===h?void 0:h.data)||void 0===l?void 0:l.params;if(c){const e=this.eventListener[c];if(!e)return void("https://app.openocean.finance"===window.location.origin&&window.location.reload());e.forEach((e=>{"chainChanged"===c&&(this.chainId=u,this.networkVersion=Number(u)),s.includes(window.location.origin)&&"chainChanged"===c||(n.includes(window.location.origin)?window.location.reload():e(u))}))}}_hookRequest(e){return new Promise(((n,s)=>{const o=(()=>{function e(){return(65536*(1+Math.random())|0).toString(16).substring(1)}return e()+e()+e()+e()+e()+e()+e()+e()})();"string"==typeof e&&(e={method:e}),e=Object.assign(Object.assign({},e),{mark:{id:o,method:e.method,type:"call_method"}}),window.parent.postMessage({from:t,target:i,data:e},"*"),this.callBackList[o]={resolve:n,reject:s}}))}_registerEvent(e){const n={mark:{eventName:e,type:"register_event"},eventName:e};window.parent.postMessage({from:t,target:i,data:n},"*")}_getExperimentalApi(){return new Proxy({isUnlocked:()=>new Promise((e=>e(!0)))},{get:(e,t,...i)=>Reflect.get(e,t,...i)})}}exports.default=function(){var e;if(null===(e=window.obethereum)||void 0===e?void 0:e.isOpenBlock)return window.obethereum;let t=new o;t=new Proxy(t,{deleteProperty:()=>!0});try{Object.defineProperty(window,"obethereum",{set(e){console.log("set ethereum",e)},get:()=>t})}catch(e){console.log("initializeProvider error",e),window.obethereum=t}return window.web3=Object.assign({},window.web3),window.web3.currentProvider=t,window.dispatchEvent(new Event("ethereum#initialized")),t};
1
+ "use strict";var e=require("./index-0ce04635.cjs");require("@ethersproject/providers"),require("zustand"),require("events"),require("@ethersproject/address"),require("@ethersproject/constants"),require("@ethersproject/contracts"),require("@ethersproject/properties"),require("@ethersproject/transactions"),require("@ethersproject/bytes");const t="dapp-inpage-integration",i="openblock-content-integration",n=["https://cocoswap.com","https://app.openocean.finance"],s=["https://oec.cocoswap.com"];class o{constructor(){console.log("start initialize openblockinpage provider"),this.callBackList={},this.eventListener={},this.isMetaMask=!0,this.isOpenBlock=!0,this.chainId=null,this.networkVersion=null,this.selectedAddress=null,this.request=this.request.bind(this),this.send=this.send.bind(this),this.sendAsync=this.sendAsync.bind(this),this.on=this.on.bind(this),this.isConnected=this.isConnected.bind(this),this.enable=this.enable.bind(this),this._metamask=this._getExperimentalApi(),this._initInpageListener(),this.getProviderData()}getProviderData(){var t;return e.__awaiter(this,void 0,void 0,(function*(){const e=yield this.request("metamask_getProviderState");this.chainId=null==e?void 0:e.chainId,this.networkVersion=null==e?void 0:e.networkVersion,this.selectedAddress=null===(t=null==e?void 0:e.accounts)||void 0===t?void 0:t[0]}))}request(t){return e.__awaiter(this,void 0,void 0,(function*(){if("eth_requestAccounts"===t.method){const e=yield this._hookRequest("eth_accounts");if(e.length)return new Promise((t=>t(e)))}return this._hookRequest(t)}))}send(...t){return e.__awaiter(this,void 0,void 0,(function*(){if("function"!=typeof t[1])return"string"==typeof t[0]?this.request({method:t[0],params:t[1]}):1===t.length?this.request(t):void 0;this.sendAsync(t[0],t[1])}))}sendAsync(...t){return e.__awaiter(this,void 0,void 0,(function*(){const e={method:t[0].method,params:t[0].params},i=t[0].id;this.request(e).then((e=>{t[1](null,{id:i,jsonrpc:"2.0",result:e})})).catch((e=>{t[1](null,{id:i,jsonrpc:"2.0",error:e})}))}))}isConnected(){return!0}enable(){return e.__awaiter(this,void 0,void 0,(function*(){const e=yield this._hookRequest("eth_accounts");return e.length?new Promise((t=>t(e))):this.request({method:"eth_requestAccounts"})}))}on(e,t){"string"==typeof e&&"function"==typeof t&&(this.eventListener[e]&&this.eventListener[e].length>5||(this.eventListener[e]?(this.eventListener[e].push(t),this.eventListener[e]=Array.from(new Set(this.eventListener[e]))):this.eventListener[e]||(this.eventListener=Object.assign(Object.assign({},this.eventListener),{[e]:[t]})),this._registerEvent(e)))}removeListener(){}_initInpageListener(){window.addEventListener("message",(e=>{var i,n,s;if(e.data.target!==t)return;const o=null===(s=null===(n=null===(i=e.data)||void 0===i?void 0:i.value)||void 0===n?void 0:n.data)||void 0===s?void 0:s.mark;o&&("call_method"===o.type?this._handleNormalMethod(o,e):"register_event"===o.type&&this._handleEventMethod(o,e))}),!1)}_handleNormalMethod(e,t){var i,n,s,o,r;(null===(i=t.data.value.data)||void 0===i?void 0:i.error)?null===(n=this.callBackList[e.id])||void 0===n||n.reject(null===(s=t.data.value.data)||void 0===s?void 0:s.error):null===(o=this.callBackList[e.id])||void 0===o||o.resolve(null===(r=t.data.value.data)||void 0===r?void 0:r.result),delete this.callBackList[e.id]}_handleEventMethod(e,t){var i,o,r,a,d,h,l;const c=null===(a=null===(r=null===(o=null===(i=t.data)||void 0===i?void 0:i.value)||void 0===o?void 0:o.data)||void 0===r?void 0:r.mark)||void 0===a?void 0:a.eventName,u=null===(l=null===(h=null===(d=t.data)||void 0===d?void 0:d.value)||void 0===h?void 0:h.data)||void 0===l?void 0:l.params;if(c){const e=this.eventListener[c];if(!e)return void("https://app.openocean.finance"===window.location.origin&&window.location.reload());e.forEach((e=>{"chainChanged"===c&&(this.chainId=u,this.networkVersion=Number(u)),s.includes(window.location.origin)&&"chainChanged"===c||(n.includes(window.location.origin)?window.location.reload():e(u))}))}}_hookRequest(e){return new Promise(((n,s)=>{const o=(()=>{function e(){return(65536*(1+Math.random())|0).toString(16).substring(1)}return e()+e()+e()+e()+e()+e()+e()+e()})();"string"==typeof e&&(e={method:e}),e=Object.assign(Object.assign({},e),{mark:{id:o,method:e.method,type:"call_method"}}),window.parent.postMessage({from:t,target:i,data:e},"*"),this.callBackList[o]={resolve:n,reject:s}}))}_registerEvent(e){const n={mark:{eventName:e,type:"register_event"},eventName:e};window.parent.postMessage({from:t,target:i,data:n},"*")}_getExperimentalApi(){return new Proxy({isUnlocked:()=>new Promise((e=>e(!0)))},{get:(e,t,...i)=>Reflect.get(e,t,...i)})}}exports.default=function(){var e;if(null===(e=window.obethereum)||void 0===e?void 0:e.isOpenBlock)return window.obethereum;let t=new o;t=new Proxy(t,{deleteProperty:()=>!0});try{Object.defineProperty(window,"obethereum",{set(e){console.log("set ethereum",e)},get:()=>t})}catch(e){console.log("initializeProvider error",e),window.obethereum=t}return window.web3=Object.assign({},window.web3),window.web3.currentProvider=t,window.dispatchEvent(new Event("ethereum#initialized")),t};
@@ -1 +1 @@
1
- "use strict";var e=require("./index-3a818183.cjs"),r=require("./index.es-a09533e6.cjs");require("@ethersproject/address"),require("@ethersproject/providers"),require("zustand"),require("events"),require("@ethersproject/constants"),require("@ethersproject/contracts"),require("@ethersproject/properties"),require("@ethersproject/transactions"),require("@ethersproject/bytes"),require("./_commonjs-dynamic-modules-f09a98c7.cjs"),require("./__node-resolve_empty-112a35f0.cjs"),require("./browser-ponyfill-3d00f58c.cjs"),exports.default=function({chainId:o,rpcUrl:n,rpc:t,walletConnectParams:i,darkMode:c},s){return e.__awaiter(this,void 0,void 0,(function*(){let a,d,u="wss://relay.walletconnect.com",l=!0;i&&(u=i.bridge||u,l=void 0!==i.qrcode?i.qrcode:l,i.infuraId,d=i.qrModalOptions||void 0),t?a=t:o&&n&&(a={[o]:n});const p=e.getIsMobile(),h=yield r.EthereumProvider.init({projectId:"59e050d1f27ed617e65bb9637c9498d6",chains:o?[o]:[],showQrModal:!p,rpcMap:a,qrModalOptions:Object.assign({themeMode:c?"dark":"light"},d)});return h.on("display_uri",(e=>{(null==d?void 0:d.openCallback)&&d.openCallback(e)})),h.on("connect",s.connect),h.on("disconnect",(e=>{s.disconnect(e),s.accountsChanged([])})),h.on("accountsChanged",s.accountsChanged),h.on("chainChanged",s.chainChanged),h.on("message",(({type:e,data:r})=>s.message(e,r))),new Promise((r=>e.__awaiter(this,void 0,void 0,(function*(){p?(h.once("display_uri",(o=>{let n=o;e.getIsIOS()&&(n=`rainbow://wc?uri=${encodeURIComponent(o)}&connector=rainbowkit`),window.location.href=n,r(e.convertWeb3Provider(h))})),h.enable()):(yield h.enable(),r(e.convertWeb3Provider(h)))}))))}))};
1
+ "use strict";var e=require("./index-0ce04635.cjs"),r=require("./index.es-6fd28bfe.cjs");require("@ethersproject/address"),require("@ethersproject/providers"),require("zustand"),require("events"),require("@ethersproject/constants"),require("@ethersproject/contracts"),require("@ethersproject/properties"),require("@ethersproject/transactions"),require("@ethersproject/bytes"),require("./_commonjs-dynamic-modules-f09a98c7.cjs"),require("./__node-resolve_empty-fd72eb2c.cjs"),require("./browser-ponyfill-323d988f.cjs"),exports.default=function({chainId:o,rpcUrl:n,rpc:t,walletConnectParams:i,darkMode:c},s){return e.__awaiter(this,void 0,void 0,(function*(){let a,d,u="wss://relay.walletconnect.com",l=!0;i&&(u=i.bridge||u,l=void 0!==i.qrcode?i.qrcode:l,i.infuraId,d=i.qrModalOptions||void 0),t?a=t:o&&n&&(a={[o]:n});const p=e.getIsMobile(),h=yield r.EthereumProvider.init({projectId:"59e050d1f27ed617e65bb9637c9498d6",chains:o?[o]:[],showQrModal:!p,rpcMap:a,qrModalOptions:Object.assign({themeMode:c?"dark":"light"},d)});return h.on("display_uri",(e=>{(null==d?void 0:d.openCallback)&&d.openCallback(e)})),h.on("connect",s.connect),h.on("disconnect",(e=>{s.disconnect(e),s.accountsChanged([])})),h.on("accountsChanged",s.accountsChanged),h.on("chainChanged",s.chainChanged),h.on("message",(({type:e,data:r})=>s.message(e,r))),new Promise((r=>e.__awaiter(this,void 0,void 0,(function*(){p?(h.once("display_uri",(o=>{let n=o;e.getIsIOS()&&(n=`rainbow://wc?uri=${encodeURIComponent(o)}&connector=rainbowkit`),window.location.href=n,r(e.convertWeb3Provider(h))})),h.enable()):(yield h.enable(),r(e.convertWeb3Provider(h)))}))))}))};
@@ -1 +1 @@
1
- "use strict";var e,r=require("./index-3a818183.cjs"),i=require("./sha256-5e38dae7.cjs"),a={exports:{}};exports.requireSha224=function(){return e||(e=1,t=a,r.commonjsGlobal,t.exports=(l=i.requireCore(),i.requireSha256(),s=(o=l).lib.WordArray,n=o.algo,c=n.SHA256,u=n.SHA224=c.extend({_doReset:function(){this._hash=new s.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var e=c._doFinalize.call(this);return e.sigBytes-=4,e}}),o.SHA224=c._createHelper(u),o.HmacSHA224=c._createHmacHelper(u),l.SHA224)),a.exports;var t,o,s,n,c,u,l};
1
+ "use strict";var e,r=require("./index-0ce04635.cjs"),i=require("./sha256-ab07124e.cjs"),t={exports:{}};exports.requireSha224=function(){return e||(e=1,a=t,r.commonjsGlobal,a.exports=(l=i.requireCore(),i.requireSha256(),s=(o=l).lib.WordArray,n=o.algo,c=n.SHA256,u=n.SHA224=c.extend({_doReset:function(){this._hash=new s.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var e=c._doFinalize.call(this);return e.sigBytes-=4,e}}),o.SHA224=c._createHelper(u),o.HmacSHA224=c._createHmacHelper(u),l.SHA224)),t.exports;var a,o,s,n,c,u,l};
@@ -1 +1 @@
1
- "use strict";var t,n=require("./index-3a818183.cjs"),e=require("./_commonjs-dynamic-modules-f09a98c7.cjs"),r=require("./__node-resolve_empty-112a35f0.cjs"),i={exports:{}};function o(){return t||(t=1,o=i,n.commonjsGlobal,o.exports=(s=s||function(t,i){var o;if("undefined"!=typeof window&&window.crypto&&(o=window.crypto),"undefined"!=typeof self&&self.crypto&&(o=self.crypto),"undefined"!=typeof globalThis&&globalThis.crypto&&(o=globalThis.crypto),!o&&"undefined"!=typeof window&&window.msCrypto&&(o=window.msCrypto),!o&&void 0!==n.commonjsGlobal&&n.commonjsGlobal.crypto&&(o=n.commonjsGlobal.crypto),!o&&"function"==typeof e.commonjsRequire)try{o=r.require$$1}catch(t){}var s=function(){if(o){if("function"==typeof o.getRandomValues)try{return o.getRandomValues(new Uint32Array(1))[0]}catch(t){}if("function"==typeof o.randomBytes)try{return o.randomBytes(4).readInt32LE()}catch(t){}}throw new Error("Native crypto module could not be used to get secure random number.")},a=Object.create||function(){function t(){}return function(n){var e;return t.prototype=n,e=new t,t.prototype=null,e}}(),c={},u=c.lib={},f=u.Base={extend:function(t){var n=a(this);return t&&n.mixIn(t),n.hasOwnProperty("init")&&this.init!==n.init||(n.init=function(){n.$super.init.apply(this,arguments)}),n.init.prototype=n,n.$super=this,n},create:function(){var t=this.extend();return t.init.apply(t,arguments),t},init:function(){},mixIn:function(t){for(var n in t)t.hasOwnProperty(n)&&(this[n]=t[n]);t.hasOwnProperty("toString")&&(this.toString=t.toString)},clone:function(){return this.init.prototype.extend(this)}},h=u.WordArray=f.extend({init:function(t,n){t=this.words=t||[],this.sigBytes=n!=i?n:4*t.length},toString:function(t){return(t||p).stringify(this)},concat:function(t){var n=this.words,e=t.words,r=this.sigBytes,i=t.sigBytes;if(this.clamp(),r%4)for(var o=0;o<i;o++){var s=e[o>>>2]>>>24-o%4*8&255;n[r+o>>>2]|=s<<24-(r+o)%4*8}else for(var a=0;a<i;a+=4)n[r+a>>>2]=e[a>>>2];return this.sigBytes+=i,this},clamp:function(){var n=this.words,e=this.sigBytes;n[e>>>2]&=4294967295<<32-e%4*8,n.length=t.ceil(e/4)},clone:function(){var t=f.clone.call(this);return t.words=this.words.slice(0),t},random:function(t){for(var n=[],e=0;e<t;e+=4)n.push(s());return new h.init(n,t)}}),l=c.enc={},p=l.Hex={stringify:function(t){for(var n=t.words,e=t.sigBytes,r=[],i=0;i<e;i++){var o=n[i>>>2]>>>24-i%4*8&255;r.push((o>>>4).toString(16)),r.push((15&o).toString(16))}return r.join("")},parse:function(t){for(var n=t.length,e=[],r=0;r<n;r+=2)e[r>>>3]|=parseInt(t.substr(r,2),16)<<24-r%8*4;return new h.init(e,n/2)}},d=l.Latin1={stringify:function(t){for(var n=t.words,e=t.sigBytes,r=[],i=0;i<e;i++){var o=n[i>>>2]>>>24-i%4*8&255;r.push(String.fromCharCode(o))}return r.join("")},parse:function(t){for(var n=t.length,e=[],r=0;r<n;r++)e[r>>>2]|=(255&t.charCodeAt(r))<<24-r%4*8;return new h.init(e,n)}},y=l.Utf8={stringify:function(t){try{return decodeURIComponent(escape(d.stringify(t)))}catch(t){throw new Error("Malformed UTF-8 data")}},parse:function(t){return d.parse(unescape(encodeURIComponent(t)))}},m=u.BufferedBlockAlgorithm=f.extend({reset:function(){this._data=new h.init,this._nDataBytes=0},_append:function(t){"string"==typeof t&&(t=y.parse(t)),this._data.concat(t),this._nDataBytes+=t.sigBytes},_process:function(n){var e,r=this._data,i=r.words,o=r.sigBytes,s=this.blockSize,a=o/(4*s),c=(a=n?t.ceil(a):t.max((0|a)-this._minBufferSize,0))*s,u=t.min(4*c,o);if(c){for(var f=0;f<c;f+=s)this._doProcessBlock(i,f);e=i.splice(0,c),r.sigBytes-=u}return new h.init(e,u)},clone:function(){var t=f.clone.call(this);return t._data=this._data.clone(),t},_minBufferSize:0});u.Hasher=m.extend({cfg:f.extend(),init:function(t){this.cfg=this.cfg.extend(t),this.reset()},reset:function(){m.reset.call(this),this._doReset()},update:function(t){return this._append(t),this._process(),this},finalize:function(t){return t&&this._append(t),this._doFinalize()},blockSize:16,_createHelper:function(t){return function(n,e){return new t.init(e).finalize(n)}},_createHmacHelper:function(t){return function(n,e){return new g.HMAC.init(t,e).finalize(n)}}});var g=c.algo={};return c}(Math),s)),i.exports;var o,s}var s,a={exports:{}};exports.requireCore=o,exports.requireSha256=function(){return s||(s=1,t=a,n.commonjsGlobal,t.exports=(e=o(),function(t){var n=e,r=n.lib,i=r.WordArray,o=r.Hasher,s=n.algo,a=[],c=[];!function(){function n(n){for(var e=t.sqrt(n),r=2;r<=e;r++)if(!(n%r))return!1;return!0}function e(t){return 4294967296*(t-(0|t))|0}for(var r=2,i=0;i<64;)n(r)&&(i<8&&(a[i]=e(t.pow(r,.5))),c[i]=e(t.pow(r,1/3)),i++),r++}();var u=[],f=s.SHA256=o.extend({_doReset:function(){this._hash=new i.init(a.slice(0))},_doProcessBlock:function(t,n){for(var e=this._hash.words,r=e[0],i=e[1],o=e[2],s=e[3],a=e[4],f=e[5],h=e[6],l=e[7],p=0;p<64;p++){if(p<16)u[p]=0|t[n+p];else{var d=u[p-15],y=(d<<25|d>>>7)^(d<<14|d>>>18)^d>>>3,m=u[p-2],g=(m<<15|m>>>17)^(m<<13|m>>>19)^m>>>10;u[p]=y+u[p-7]+g+u[p-16]}var w=r&i^r&o^i&o,v=(r<<30|r>>>2)^(r<<19|r>>>13)^(r<<10|r>>>22),_=l+((a<<26|a>>>6)^(a<<21|a>>>11)^(a<<7|a>>>25))+(a&f^~a&h)+c[p]+u[p];l=h,h=f,f=a,a=s+_|0,s=o,o=i,i=r,r=_+(v+w)|0}e[0]=e[0]+r|0,e[1]=e[1]+i|0,e[2]=e[2]+o|0,e[3]=e[3]+s|0,e[4]=e[4]+a|0,e[5]=e[5]+f|0,e[6]=e[6]+h|0,e[7]=e[7]+l|0},_doFinalize:function(){var n=this._data,e=n.words,r=8*this._nDataBytes,i=8*n.sigBytes;return e[i>>>5]|=128<<24-i%32,e[14+(i+64>>>9<<4)]=t.floor(r/4294967296),e[15+(i+64>>>9<<4)]=r,n.sigBytes=4*e.length,this._process(),this._hash},clone:function(){var t=o.clone.call(this);return t._hash=this._hash.clone(),t}});n.SHA256=o._createHelper(f),n.HmacSHA256=o._createHmacHelper(f)}(Math),e.SHA256)),a.exports;var t,e};
1
+ "use strict";var t,n=require("./index-0ce04635.cjs"),e=require("./_commonjs-dynamic-modules-f09a98c7.cjs"),r=require("./__node-resolve_empty-fd72eb2c.cjs"),i={exports:{}};function o(){return t||(t=1,o=i,n.commonjsGlobal,o.exports=(s=s||function(t,i){var o;if("undefined"!=typeof window&&window.crypto&&(o=window.crypto),"undefined"!=typeof self&&self.crypto&&(o=self.crypto),"undefined"!=typeof globalThis&&globalThis.crypto&&(o=globalThis.crypto),!o&&"undefined"!=typeof window&&window.msCrypto&&(o=window.msCrypto),!o&&void 0!==n.commonjsGlobal&&n.commonjsGlobal.crypto&&(o=n.commonjsGlobal.crypto),!o&&"function"==typeof e.commonjsRequire)try{o=r.require$$1}catch(t){}var s=function(){if(o){if("function"==typeof o.getRandomValues)try{return o.getRandomValues(new Uint32Array(1))[0]}catch(t){}if("function"==typeof o.randomBytes)try{return o.randomBytes(4).readInt32LE()}catch(t){}}throw new Error("Native crypto module could not be used to get secure random number.")},a=Object.create||function(){function t(){}return function(n){var e;return t.prototype=n,e=new t,t.prototype=null,e}}(),c={},u=c.lib={},f=u.Base={extend:function(t){var n=a(this);return t&&n.mixIn(t),n.hasOwnProperty("init")&&this.init!==n.init||(n.init=function(){n.$super.init.apply(this,arguments)}),n.init.prototype=n,n.$super=this,n},create:function(){var t=this.extend();return t.init.apply(t,arguments),t},init:function(){},mixIn:function(t){for(var n in t)t.hasOwnProperty(n)&&(this[n]=t[n]);t.hasOwnProperty("toString")&&(this.toString=t.toString)},clone:function(){return this.init.prototype.extend(this)}},h=u.WordArray=f.extend({init:function(t,n){t=this.words=t||[],this.sigBytes=n!=i?n:4*t.length},toString:function(t){return(t||p).stringify(this)},concat:function(t){var n=this.words,e=t.words,r=this.sigBytes,i=t.sigBytes;if(this.clamp(),r%4)for(var o=0;o<i;o++){var s=e[o>>>2]>>>24-o%4*8&255;n[r+o>>>2]|=s<<24-(r+o)%4*8}else for(var a=0;a<i;a+=4)n[r+a>>>2]=e[a>>>2];return this.sigBytes+=i,this},clamp:function(){var n=this.words,e=this.sigBytes;n[e>>>2]&=4294967295<<32-e%4*8,n.length=t.ceil(e/4)},clone:function(){var t=f.clone.call(this);return t.words=this.words.slice(0),t},random:function(t){for(var n=[],e=0;e<t;e+=4)n.push(s());return new h.init(n,t)}}),l=c.enc={},p=l.Hex={stringify:function(t){for(var n=t.words,e=t.sigBytes,r=[],i=0;i<e;i++){var o=n[i>>>2]>>>24-i%4*8&255;r.push((o>>>4).toString(16)),r.push((15&o).toString(16))}return r.join("")},parse:function(t){for(var n=t.length,e=[],r=0;r<n;r+=2)e[r>>>3]|=parseInt(t.substr(r,2),16)<<24-r%8*4;return new h.init(e,n/2)}},d=l.Latin1={stringify:function(t){for(var n=t.words,e=t.sigBytes,r=[],i=0;i<e;i++){var o=n[i>>>2]>>>24-i%4*8&255;r.push(String.fromCharCode(o))}return r.join("")},parse:function(t){for(var n=t.length,e=[],r=0;r<n;r++)e[r>>>2]|=(255&t.charCodeAt(r))<<24-r%4*8;return new h.init(e,n)}},y=l.Utf8={stringify:function(t){try{return decodeURIComponent(escape(d.stringify(t)))}catch(t){throw new Error("Malformed UTF-8 data")}},parse:function(t){return d.parse(unescape(encodeURIComponent(t)))}},m=u.BufferedBlockAlgorithm=f.extend({reset:function(){this._data=new h.init,this._nDataBytes=0},_append:function(t){"string"==typeof t&&(t=y.parse(t)),this._data.concat(t),this._nDataBytes+=t.sigBytes},_process:function(n){var e,r=this._data,i=r.words,o=r.sigBytes,s=this.blockSize,a=o/(4*s),c=(a=n?t.ceil(a):t.max((0|a)-this._minBufferSize,0))*s,u=t.min(4*c,o);if(c){for(var f=0;f<c;f+=s)this._doProcessBlock(i,f);e=i.splice(0,c),r.sigBytes-=u}return new h.init(e,u)},clone:function(){var t=f.clone.call(this);return t._data=this._data.clone(),t},_minBufferSize:0});u.Hasher=m.extend({cfg:f.extend(),init:function(t){this.cfg=this.cfg.extend(t),this.reset()},reset:function(){m.reset.call(this),this._doReset()},update:function(t){return this._append(t),this._process(),this},finalize:function(t){return t&&this._append(t),this._doFinalize()},blockSize:16,_createHelper:function(t){return function(n,e){return new t.init(e).finalize(n)}},_createHmacHelper:function(t){return function(n,e){return new g.HMAC.init(t,e).finalize(n)}}});var g=c.algo={};return c}(Math),s)),i.exports;var o,s}var s,a={exports:{}};exports.requireCore=o,exports.requireSha256=function(){return s||(s=1,t=a,n.commonjsGlobal,t.exports=(e=o(),function(t){var n=e,r=n.lib,i=r.WordArray,o=r.Hasher,s=n.algo,a=[],c=[];!function(){function n(n){for(var e=t.sqrt(n),r=2;r<=e;r++)if(!(n%r))return!1;return!0}function e(t){return 4294967296*(t-(0|t))|0}for(var r=2,i=0;i<64;)n(r)&&(i<8&&(a[i]=e(t.pow(r,.5))),c[i]=e(t.pow(r,1/3)),i++),r++}();var u=[],f=s.SHA256=o.extend({_doReset:function(){this._hash=new i.init(a.slice(0))},_doProcessBlock:function(t,n){for(var e=this._hash.words,r=e[0],i=e[1],o=e[2],s=e[3],a=e[4],f=e[5],h=e[6],l=e[7],p=0;p<64;p++){if(p<16)u[p]=0|t[n+p];else{var d=u[p-15],y=(d<<25|d>>>7)^(d<<14|d>>>18)^d>>>3,m=u[p-2],g=(m<<15|m>>>17)^(m<<13|m>>>19)^m>>>10;u[p]=y+u[p-7]+g+u[p-16]}var w=r&i^r&o^i&o,v=(r<<30|r>>>2)^(r<<19|r>>>13)^(r<<10|r>>>22),_=l+((a<<26|a>>>6)^(a<<21|a>>>11)^(a<<7|a>>>25))+(a&f^~a&h)+c[p]+u[p];l=h,h=f,f=a,a=s+_|0,s=o,o=i,i=r,r=_+(v+w)|0}e[0]=e[0]+r|0,e[1]=e[1]+i|0,e[2]=e[2]+o|0,e[3]=e[3]+s|0,e[4]=e[4]+a|0,e[5]=e[5]+f|0,e[6]=e[6]+h|0,e[7]=e[7]+l|0},_doFinalize:function(){var n=this._data,e=n.words,r=8*this._nDataBytes,i=8*n.sigBytes;return e[i>>>5]|=128<<24-i%32,e[14+(i+64>>>9<<4)]=t.floor(r/4294967296),e[15+(i+64>>>9<<4)]=r,n.sigBytes=4*e.length,this._process(),this._hash},clone:function(){var t=o.clone.call(this);return t._hash=this._hash.clone(),t}});n.SHA256=o._createHelper(f),n.HmacSHA256=o._createHmacHelper(f)}(Math),e.SHA256)),a.exports;var t,e};