@recoilpay/intent-widget 0.1.0

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 (112) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +89 -0
  3. package/dist/chunks/add-6QI4IE74.js +15 -0
  4. package/dist/chunks/all-wallets-THC5DP7W.js +6 -0
  5. package/dist/chunks/app-store-FS2F7VYK.js +17 -0
  6. package/dist/chunks/apple-C2QR6WKS.js +18 -0
  7. package/dist/chunks/arrow-bottom-AW5LWHGC.js +8 -0
  8. package/dist/chunks/arrow-bottom-circle-3L4ACEWX.js +11 -0
  9. package/dist/chunks/arrow-left-OKHNGLQ4.js +8 -0
  10. package/dist/chunks/arrow-right-V4EYTZ5E.js +8 -0
  11. package/dist/chunks/arrow-top-XLD7PH65.js +8 -0
  12. package/dist/chunks/bank-DT5OX7C2.js +14 -0
  13. package/dist/chunks/basic-2ESEHJO2.js +2133 -0
  14. package/dist/chunks/browser-HWASO4BM.js +14 -0
  15. package/dist/chunks/card-AWLNHRWK.js +14 -0
  16. package/dist/chunks/ccip-7WYWVY5O.js +29 -0
  17. package/dist/chunks/ccip-CJPBHIYN.js +1 -0
  18. package/dist/chunks/ccip-P2XLZ2Q3.js +1 -0
  19. package/dist/chunks/ccip-TDNDQCYX.js +1 -0
  20. package/dist/chunks/checkmark-CFJVGYKN.js +11 -0
  21. package/dist/chunks/checkmark-bold-KYZGMQZC.js +8 -0
  22. package/dist/chunks/chevron-bottom-UFI5ZQCD.js +8 -0
  23. package/dist/chunks/chevron-left-IXZPWY6V.js +8 -0
  24. package/dist/chunks/chevron-right-YBXAUXMQ.js +8 -0
  25. package/dist/chunks/chevron-top-XGVJAAGN.js +8 -0
  26. package/dist/chunks/chrome-store-V7ZFZ4HF.js +61 -0
  27. package/dist/chunks/chunk-6XSLLSJX.js +1 -0
  28. package/dist/chunks/chunk-BFNNKT2C.js +20 -0
  29. package/dist/chunks/chunk-EZRXHJOM.js +9 -0
  30. package/dist/chunks/chunk-F7HZCPX2.js +1 -0
  31. package/dist/chunks/chunk-FK7PQ7YB.js +6 -0
  32. package/dist/chunks/chunk-FL3MRXUD.js +6 -0
  33. package/dist/chunks/chunk-FYS4NW6G.js +1 -0
  34. package/dist/chunks/chunk-GPOI2YA7.js +886 -0
  35. package/dist/chunks/chunk-H5GR6EPA.js +394 -0
  36. package/dist/chunks/chunk-JYRWMYZ2.js +36 -0
  37. package/dist/chunks/chunk-LQZA24C3.js +37 -0
  38. package/dist/chunks/chunk-MYICIF4X.js +6 -0
  39. package/dist/chunks/chunk-MYQCVH5Z.js +1 -0
  40. package/dist/chunks/chunk-OKQEFB6X.js +28 -0
  41. package/dist/chunks/chunk-QOQKSUB7.js +29 -0
  42. package/dist/chunks/chunk-WYVJ6QLD.js +29 -0
  43. package/dist/chunks/chunk-Z3OIWTR5.js +1 -0
  44. package/dist/chunks/clock-5HKMPIUO.js +8 -0
  45. package/dist/chunks/close-7Q5B2HQ4.js +8 -0
  46. package/dist/chunks/coinPlaceholder-3K6ZUCBB.js +8 -0
  47. package/dist/chunks/compass-W74LSHT5.js +8 -0
  48. package/dist/chunks/copy-6Q4PP5RG.js +15 -0
  49. package/dist/chunks/core-52H33BRG.js +15 -0
  50. package/dist/chunks/cursor-HIA7HILJ.js +3 -0
  51. package/dist/chunks/cursor-transparent-3QFUBR2Y.js +12 -0
  52. package/dist/chunks/desktop-AQ4JHUBR.js +9 -0
  53. package/dist/chunks/disconnect-DAKWOTZ3.js +8 -0
  54. package/dist/chunks/discord-5FRZ3W43.js +17 -0
  55. package/dist/chunks/etherscan-JBY3FG5R.js +6 -0
  56. package/dist/chunks/exclamation-triangle-3RG2YEHW.js +4 -0
  57. package/dist/chunks/extension-KJD6T6D2.js +8 -0
  58. package/dist/chunks/external-link-4TRP536K.js +8 -0
  59. package/dist/chunks/facebook-IYUAR5JX.js +26 -0
  60. package/dist/chunks/farcaster-32VRU3TK.js +12 -0
  61. package/dist/chunks/filters-XZ2LOG4T.js +8 -0
  62. package/dist/chunks/github-4DWZB2US.js +18 -0
  63. package/dist/chunks/google-7JIWLIDN.js +18 -0
  64. package/dist/chunks/help-circle-YBXI5V2B.js +12 -0
  65. package/dist/chunks/id-RY6NX47S.js +12 -0
  66. package/dist/chunks/image-TFG7VUHL.js +4 -0
  67. package/dist/chunks/index.es-SEE33E5T.js +15 -0
  68. package/dist/chunks/info-OGTYPPEO.js +3 -0
  69. package/dist/chunks/info-circle-KH5E4LQP.js +12 -0
  70. package/dist/chunks/lightbulb-U33OSZ3X.js +3 -0
  71. package/dist/chunks/mail-RCAHKDDA.js +8 -0
  72. package/dist/chunks/mine.wasm-DWLXBUXQ.js +1 -0
  73. package/dist/chunks/mobile-RMRLWRK2.js +9 -0
  74. package/dist/chunks/more-QN5BQZLT.js +11 -0
  75. package/dist/chunks/native-ESI6QOB3.js +1 -0
  76. package/dist/chunks/native-FKR3QBFJ.js +1 -0
  77. package/dist/chunks/native-J6GYQGMC.js +1 -0
  78. package/dist/chunks/native-YYHLKJS6.js +1 -0
  79. package/dist/chunks/network-placeholder-7TZ4FX3A.js +14 -0
  80. package/dist/chunks/nftPlaceholder-5A4AUYE2.js +8 -0
  81. package/dist/chunks/off-NW3B3Z3Q.js +8 -0
  82. package/dist/chunks/play-store-NST7OJXU.js +32 -0
  83. package/dist/chunks/plus-ZJXOSK2O.js +13 -0
  84. package/dist/chunks/qr-code-KDG2JZZK.js +6 -0
  85. package/dist/chunks/recycle-horizontal-3X37MC7E.js +9 -0
  86. package/dist/chunks/refresh-GL7N6ZKZ.js +8 -0
  87. package/dist/chunks/reown-logo-EXAEIT6H.js +12 -0
  88. package/dist/chunks/search-EDSER3WT.js +8 -0
  89. package/dist/chunks/secp256k1-6A42G7KH.js +11 -0
  90. package/dist/chunks/secp256k1-ACZE2VHK.js +10 -0
  91. package/dist/chunks/secp256k1-AHJALKHB.js +11 -0
  92. package/dist/chunks/secp256k1-Z3G34S2I.js +11 -0
  93. package/dist/chunks/send-G6RI7LIU.js +15 -0
  94. package/dist/chunks/swapHorizontal-PS74G3QM.js +8 -0
  95. package/dist/chunks/swapHorizontalBold-UXWIWNWD.js +8 -0
  96. package/dist/chunks/swapHorizontalMedium-RJ2OQ4TF.js +16 -0
  97. package/dist/chunks/swapHorizontalRoundedBold-7IWPKFFP.js +8 -0
  98. package/dist/chunks/swapVertical-BQ25C2TX.js +8 -0
  99. package/dist/chunks/telegram-D2ONVLTF.js +16 -0
  100. package/dist/chunks/three-dots-WTLTFKLX.js +5 -0
  101. package/dist/chunks/twitch-YCCDDY6J.js +18 -0
  102. package/dist/chunks/twitterIcon-W26URVWN.js +6 -0
  103. package/dist/chunks/verify-4BN2QIGK.js +8 -0
  104. package/dist/chunks/verify-filled-PMCOH3ZN.js +8 -0
  105. package/dist/chunks/w3m-modal-RWMJ7KYJ.js +642 -0
  106. package/dist/chunks/wallet-2P4SEUMP.js +8 -0
  107. package/dist/chunks/wallet-placeholder-V5RSTMZ2.js +14 -0
  108. package/dist/chunks/walletconnect-VJ2EPWKZ.js +30 -0
  109. package/dist/chunks/warning-circle-HB2VR6PY.js +12 -0
  110. package/dist/chunks/x-T5WBAOG3.js +12 -0
  111. package/dist/recoilpay-intent-widget.js +925 -0
  112. package/package.json +55 -0
@@ -0,0 +1,14 @@
1
+ import{f as l}from"./chunk-OKQEFB6X.js";import"./chunk-MYQCVH5Z.js";var a=l`<svg fill="none" viewBox="0 0 20 20">
2
+ <path
3
+ fill="currentColor"
4
+ fill-rule="evenodd"
5
+ d="M4 6.4a1 1 0 0 1-.46.89 6.98 6.98 0 0 0 .38 6.18A7 7 0 0 0 16.46 7.3a1 1 0 0 1-.47-.92 7 7 0 0 0-12 .03Zm-2.02-.5a9 9 0 1 1 16.03 8.2A9 9 0 0 1 1.98 5.9Z"
6
+ clip-rule="evenodd"
7
+ />
8
+ <path
9
+ fill="currentColor"
10
+ fill-rule="evenodd"
11
+ d="M6.03 8.63c-1.46-.3-2.72-.75-3.6-1.35l-.02-.01-.14-.11a1 1 0 0 1 1.2-1.6l.1.08c.6.4 1.52.74 2.69 1 .16-.99.39-1.88.67-2.65.3-.79.68-1.5 1.15-2.02A2.58 2.58 0 0 1 9.99 1c.8 0 1.45.44 1.92.97.47.52.84 1.23 1.14 2.02.29.77.52 1.66.68 2.64a8 8 0 0 0 2.7-1l.26-.18h.48a1 1 0 0 1 .12 2c-.86.51-2.01.91-3.34 1.18a22.24 22.24 0 0 1-.03 3.19c1.45.29 2.7.73 3.58 1.31a1 1 0 0 1-1.1 1.68c-.6-.4-1.56-.76-2.75-1-.15.8-.36 1.55-.6 2.2-.3.79-.67 1.5-1.14 2.02-.47.53-1.12.97-1.92.97-.8 0-1.45-.44-1.91-.97a6.51 6.51 0 0 1-1.15-2.02c-.24-.65-.44-1.4-.6-2.2-1.18.24-2.13.6-2.73.99a1 1 0 1 1-1.1-1.67c.88-.58 2.12-1.03 3.57-1.31a22.03 22.03 0 0 1-.04-3.2Zm2.2-1.7c.15-.86.34-1.61.58-2.24.24-.65.51-1.12.76-1.4.25-.28.4-.29.42-.29.03 0 .17.01.42.3.25.27.52.74.77 1.4.23.62.43 1.37.57 2.22a19.96 19.96 0 0 1-3.52 0Zm-.18 4.6a20.1 20.1 0 0 1-.03-2.62 21.95 21.95 0 0 0 3.94 0 20.4 20.4 0 0 1-.03 2.63 21.97 21.97 0 0 0-3.88 0Zm.27 2c.13.66.3 1.26.49 1.78.24.65.51 1.12.76 1.4.25.28.4.29.42.29.03 0 .17-.01.42-.3.25-.27.52-.74.77-1.4.19-.5.36-1.1.49-1.78a20.03 20.03 0 0 0-3.35 0Z"
12
+ clip-rule="evenodd"
13
+ />
14
+ </svg>`;export{a as browserSvg};
@@ -0,0 +1,14 @@
1
+ import{f as C}from"./chunk-OKQEFB6X.js";import"./chunk-MYQCVH5Z.js";var l=C`<svg
2
+ xmlns="http://www.w3.org/2000/svg"
3
+ width="12"
4
+ height="13"
5
+ viewBox="0 0 12 13"
6
+ fill="none"
7
+ >
8
+ <path
9
+ fill-rule="evenodd"
10
+ clip-rule="evenodd"
11
+ d="M4.16072 2C4.17367 2 4.18665 2 4.19968 2L7.83857 2C8.36772 1.99998 8.82398 1.99996 9.19518 2.04018C9.5895 2.0829 9.97577 2.17811 10.3221 2.42971C10.5131 2.56849 10.6811 2.73647 10.8198 2.92749C11.0714 3.27379 11.1666 3.66007 11.2094 4.0544C11.2496 4.42561 11.2496 4.88188 11.2495 5.41105V7.58896C11.2496 8.11812 11.2496 8.57439 11.2094 8.94561C11.1666 9.33994 11.0714 9.72621 10.8198 10.0725C10.6811 10.2635 10.5131 10.4315 10.3221 10.5703C9.97577 10.8219 9.5895 10.9171 9.19518 10.9598C8.82398 11 8.36772 11 7.83856 11H4.16073C3.63157 11 3.17531 11 2.80411 10.9598C2.40979 10.9171 2.02352 10.8219 1.67722 10.5703C1.48621 10.4315 1.31824 10.2635 1.17946 10.0725C0.927858 9.72621 0.832652 9.33994 0.78993 8.94561C0.749713 8.5744 0.749733 8.11813 0.749757 7.58896L0.749758 5.45C0.749758 5.43697 0.749758 5.42399 0.749757 5.41104C0.749733 4.88188 0.749713 4.42561 0.78993 4.0544C0.832652 3.66007 0.927858 3.27379 1.17946 2.92749C1.31824 2.73647 1.48621 2.56849 1.67722 2.42971C2.02352 2.17811 2.40979 2.0829 2.80411 2.04018C3.17531 1.99996 3.63157 1.99998 4.16072 2ZM2.96567 3.53145C2.69897 3.56034 2.60687 3.60837 2.55888 3.64324C2.49521 3.6895 2.43922 3.74549 2.39296 3.80916C2.35809 3.85715 2.31007 3.94926 2.28117 4.21597C2.26629 4.35335 2.25844 4.51311 2.25431 4.70832H9.74498C9.74085 4.51311 9.733 4.35335 9.71812 4.21597C9.68922 3.94926 9.6412 3.85715 9.60633 3.80916C9.56007 3.74549 9.50408 3.6895 9.44041 3.64324C9.39242 3.60837 9.30031 3.56034 9.03362 3.53145C8.75288 3.50103 8.37876 3.5 7.79961 3.5H4.19968C3.62053 3.5 3.24641 3.50103 2.96567 3.53145ZM9.74956 6.20832H2.24973V7.55C2.24973 8.12917 2.25076 8.5033 2.28117 8.78404C2.31007 9.05074 2.35809 9.14285 2.39296 9.19084C2.43922 9.25451 2.49521 9.31051 2.55888 9.35677C2.60687 9.39163 2.69897 9.43966 2.96567 9.46856C3.24641 9.49897 3.62053 9.5 4.19968 9.5H7.79961C8.37876 9.5 8.75288 9.49897 9.03362 9.46856C9.30032 9.43966 9.39242 9.39163 9.44041 9.35677C9.50408 9.31051 9.56007 9.25451 9.60633 9.19084C9.6412 9.14285 9.68922 9.05075 9.71812 8.78404C9.74854 8.5033 9.74956 8.12917 9.74956 7.55V6.20832ZM6.74963 8C6.74963 7.58579 7.08541 7.25 7.49961 7.25H8.2496C8.6638 7.25 8.99958 7.58579 8.99958 8C8.99958 8.41422 8.6638 8.75 8.2496 8.75H7.49961C7.08541 8.75 6.74963 8.41422 6.74963 8Z"
12
+ fill="currentColor"
13
+ /></svg
14
+ >`;export{l as cardSvg};
@@ -0,0 +1,29 @@
1
+ import{a as Tt,b as an,d as Bt,e as un,f as cn,i as kt,j as Ot,k as pn,m as dn,n as fn,o as ln}from"./chunk-FL3MRXUD.js";import"./chunk-MYQCVH5Z.js";var mn="1.0.8";var x=class e extends Error{constructor(t,n={}){let r=n.cause instanceof e?n.cause.details:n.cause?.message?n.cause.message:n.details,o=n.cause instanceof e&&n.cause.docsPath||n.docsPath,i=[t||"An error occurred.","",...n.metaMessages?[...n.metaMessages,""]:[],...o?[`Docs: https://abitype.dev${o}`]:[],...r?[`Details: ${r}`]:[],`Version: abitype@${mn}`].join(`
2
+ `);super(i),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiTypeError"}),n.cause&&(this.cause=n.cause),this.details=r,this.docsPath=o,this.metaMessages=n.metaMessages,this.shortMessage=t}};function v(e,t){return e.exec(t)?.groups}var zt=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,Ct=/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/,Me=/^\(.+?\).*?$/;var yn=/^tuple(?<array>(\[(\d*)\])*)$/;function Ee(e){let t=e.type;if(yn.test(e.type)&&"components"in e){t="(";let n=e.components.length;for(let o=0;o<n;o++){let i=e.components[o];t+=Ee(i),o<n-1&&(t+=", ")}let r=v(yn,e.type);return t+=`)${r?.array??""}`,Ee({...e,type:t})}return"indexed"in e&&e.indexed&&(t=`${t} indexed`),e.name?`${t} ${e.name}`:t}function V(e){let t="",n=e.length;for(let r=0;r<n;r++){let o=e[r];t+=Ee(o),r!==n-1&&(t+=", ")}return t}function Rt(e){return e.type==="function"?`function ${e.name}(${V(e.inputs)})${e.stateMutability&&e.stateMutability!=="nonpayable"?` ${e.stateMutability}`:""}${e.outputs?.length?` returns (${V(e.outputs)})`:""}`:e.type==="event"?`event ${e.name}(${V(e.inputs)})`:e.type==="error"?`error ${e.name}(${V(e.inputs)})`:e.type==="constructor"?`constructor(${V(e.inputs)})${e.stateMutability==="payable"?" payable":""}`:e.type==="fallback"?`fallback() external${e.stateMutability==="payable"?" payable":""}`:"receive() external payable"}var bn=/^error (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;function hn(e){return bn.test(e)}function xn(e){return v(bn,e)}var gn=/^event (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;function wn(e){return gn.test(e)}function vn(e){return v(gn,e)}var $n=/^function (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)(?: (?<scope>external|public{1}))?(?: (?<stateMutability>pure|view|nonpayable|payable{1}))?(?: returns\s?\((?<returns>.*?)\))?$/;function An(e){return $n.test(e)}function Pn(e){return v($n,e)}var In=/^struct (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*) \{(?<properties>.*?)\}$/;function Te(e){return In.test(e)}function Sn(e){return v(In,e)}var Mn=/^constructor\((?<parameters>.*?)\)(?:\s(?<stateMutability>payable{1}))?$/;function En(e){return Mn.test(e)}function Tn(e){return v(Mn,e)}var Bn=/^fallback\(\) external(?:\s(?<stateMutability>payable{1}))?$/;function kn(e){return Bn.test(e)}function On(e){return v(Bn,e)}var Kr=/^receive\(\) external payable$/;function zn(e){return Kr.test(e)}var Cn=new Set(["indexed"]),Be=new Set(["calldata","memory","storage"]);var ke=class extends x{constructor({type:t}){super("Unknown type.",{metaMessages:[`Type "${t}" is not a valid ABI type. Perhaps you forgot to include a struct signature?`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownTypeError"})}},Oe=class extends x{constructor({type:t}){super("Unknown type.",{metaMessages:[`Type "${t}" is not a valid ABI type.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSolidityTypeError"})}};var ze=class extends x{constructor({param:t}){super("Invalid ABI parameter.",{details:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParameterError"})}},Ce=class extends x{constructor({param:t,name:n}){super("Invalid ABI parameter.",{details:t,metaMessages:[`"${n}" is a protected Solidity keyword. More info: https://docs.soliditylang.org/en/latest/cheatsheet.html`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SolidityProtectedKeywordError"})}},Re=class extends x{constructor({param:t,type:n,modifier:r}){super("Invalid ABI parameter.",{details:t,metaMessages:[`Modifier "${r}" not allowed${n?` in "${n}" type`:""}.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidModifierError"})}},je=class extends x{constructor({param:t,type:n,modifier:r}){super("Invalid ABI parameter.",{details:t,metaMessages:[`Modifier "${r}" not allowed${n?` in "${n}" type`:""}.`,`Data location can only be specified for array, struct, or mapping types, but "${r}" was given.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidFunctionModifierError"})}},Ue=class extends x{constructor({abiParameter:t}){super("Invalid ABI parameter.",{details:JSON.stringify(t,null,2),metaMessages:["ABI parameter type is invalid."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiTypeParameterError"})}};var E=class extends x{constructor({signature:t,type:n}){super(`Invalid ${n} signature.`,{details:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidSignatureError"})}},Fe=class extends x{constructor({signature:t}){super("Unknown signature.",{details:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSignatureError"})}},Le=class extends x{constructor({signature:t}){super("Invalid struct signature.",{details:t,metaMessages:["No properties exist."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidStructSignatureError"})}};var De=class extends x{constructor({type:t}){super("Circular reference detected.",{metaMessages:[`Struct "${t}" is a circular reference.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"CircularReferenceError"})}};var Ne=class extends x{constructor({current:t,depth:n}){super("Unbalanced parentheses.",{metaMessages:[`"${t.trim()}" has too many ${n>0?"opening":"closing"} parentheses.`],details:`Depth "${n}"`}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParenthesisError"})}};function Rn(e,t,n){let r="";if(n)for(let o of Object.entries(n)){if(!o)continue;let i="";for(let s of o[1])i+=`[${s.type}${s.name?`:${s.name}`:""}]`;r+=`(${o[0]}{${i}})`}return t?`${t}:${e}${r}`:e}var He=new Map([["address",{type:"address"}],["bool",{type:"bool"}],["bytes",{type:"bytes"}],["bytes32",{type:"bytes32"}],["int",{type:"int256"}],["int256",{type:"int256"}],["string",{type:"string"}],["uint",{type:"uint256"}],["uint8",{type:"uint8"}],["uint16",{type:"uint16"}],["uint24",{type:"uint24"}],["uint32",{type:"uint32"}],["uint64",{type:"uint64"}],["uint96",{type:"uint96"}],["uint112",{type:"uint112"}],["uint160",{type:"uint160"}],["uint192",{type:"uint192"}],["uint256",{type:"uint256"}],["address owner",{type:"address",name:"owner"}],["address to",{type:"address",name:"to"}],["bool approved",{type:"bool",name:"approved"}],["bytes _data",{type:"bytes",name:"_data"}],["bytes data",{type:"bytes",name:"data"}],["bytes signature",{type:"bytes",name:"signature"}],["bytes32 hash",{type:"bytes32",name:"hash"}],["bytes32 r",{type:"bytes32",name:"r"}],["bytes32 root",{type:"bytes32",name:"root"}],["bytes32 s",{type:"bytes32",name:"s"}],["string name",{type:"string",name:"name"}],["string symbol",{type:"string",name:"symbol"}],["string tokenURI",{type:"string",name:"tokenURI"}],["uint tokenId",{type:"uint256",name:"tokenId"}],["uint8 v",{type:"uint8",name:"v"}],["uint256 balance",{type:"uint256",name:"balance"}],["uint256 tokenId",{type:"uint256",name:"tokenId"}],["uint256 value",{type:"uint256",name:"value"}],["event:address indexed from",{type:"address",name:"from",indexed:!0}],["event:address indexed to",{type:"address",name:"to",indexed:!0}],["event:uint indexed tokenId",{type:"uint256",name:"tokenId",indexed:!0}],["event:uint256 indexed tokenId",{type:"uint256",name:"tokenId",indexed:!0}]]);function jn(e,t={}){if(An(e))return Xr(e,t);if(wn(e))return Jr(e,t);if(hn(e))return Yr(e,t);if(En(e))return qr(e,t);if(kn(e))return Qr(e);if(zn(e))return{type:"receive",stateMutability:"payable"};throw new Fe({signature:e})}function Xr(e,t={}){let n=Pn(e);if(!n)throw new E({signature:e,type:"function"});let r=S(n.parameters),o=[],i=r.length;for(let a=0;a<i;a++)o.push(R(r[a],{modifiers:Be,structs:t,type:"function"}));let s=[];if(n.returns){let a=S(n.returns),c=a.length;for(let p=0;p<c;p++)s.push(R(a[p],{modifiers:Be,structs:t,type:"function"}))}return{name:n.name,type:"function",stateMutability:n.stateMutability??"nonpayable",inputs:o,outputs:s}}function Jr(e,t={}){let n=vn(e);if(!n)throw new E({signature:e,type:"event"});let r=S(n.parameters),o=[],i=r.length;for(let s=0;s<i;s++)o.push(R(r[s],{modifiers:Cn,structs:t,type:"event"}));return{name:n.name,type:"event",inputs:o}}function Yr(e,t={}){let n=xn(e);if(!n)throw new E({signature:e,type:"error"});let r=S(n.parameters),o=[],i=r.length;for(let s=0;s<i;s++)o.push(R(r[s],{structs:t,type:"error"}));return{name:n.name,type:"error",inputs:o}}function qr(e,t={}){let n=Tn(e);if(!n)throw new E({signature:e,type:"constructor"});let r=S(n.parameters),o=[],i=r.length;for(let s=0;s<i;s++)o.push(R(r[s],{structs:t,type:"constructor"}));return{type:"constructor",stateMutability:n.stateMutability??"nonpayable",inputs:o}}function Qr(e){let t=On(e);if(!t)throw new E({signature:e,type:"fallback"});return{type:"fallback",stateMutability:t.stateMutability??"nonpayable"}}var eo=/^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,to=/^\((?<type>.+?)\)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,no=/^u?int$/;function R(e,t){let n=Rn(e,t?.type,t?.structs);if(He.has(n))return He.get(n);let r=Me.test(e),o=v(r?to:eo,e);if(!o)throw new ze({param:e});if(o.name&&oo(o.name))throw new Ce({param:e,name:o.name});let i=o.name?{name:o.name}:{},s=o.modifier==="indexed"?{indexed:!0}:{},a=t?.structs??{},c,p={};if(r){c="tuple";let l=S(o.type),m=[],f=l.length;for(let b=0;b<f;b++)m.push(R(l[b],{structs:a}));p={components:m}}else if(o.type in a)c="tuple",p={components:a[o.type]};else if(no.test(o.type))c=`${o.type}256`;else if(c=o.type,t?.type!=="struct"&&!jt(c))throw new Oe({type:c});if(o.modifier){if(!t?.modifiers?.has?.(o.modifier))throw new Re({param:e,type:t?.type,modifier:o.modifier});if(Be.has(o.modifier)&&!so(c,!!o.array))throw new je({param:e,type:t?.type,modifier:o.modifier})}let d={type:`${c}${o.array??""}`,...i,...s,...p};return He.set(n,d),d}function S(e,t=[],n="",r=0){let o=e.trim().length;for(let i=0;i<o;i++){let s=e[i],a=e.slice(i+1);switch(s){case",":return r===0?S(a,[...t,n.trim()]):S(a,t,`${n}${s}`,r);case"(":return S(a,t,`${n}${s}`,r+1);case")":return S(a,t,`${n}${s}`,r-1);default:return S(a,t,`${n}${s}`,r)}}if(n==="")return t;if(r!==0)throw new Ne({current:n,depth:r});return t.push(n.trim()),t}function jt(e){return e==="address"||e==="bool"||e==="function"||e==="string"||zt.test(e)||Ct.test(e)}var ro=/^(?:after|alias|anonymous|apply|auto|byte|calldata|case|catch|constant|copyof|default|defined|error|event|external|false|final|function|immutable|implements|in|indexed|inline|internal|let|mapping|match|memory|mutable|null|of|override|partial|private|promise|public|pure|reference|relocatable|return|returns|sizeof|static|storage|struct|super|supports|switch|this|true|try|typedef|typeof|var|view|virtual)$/;function oo(e){return e==="address"||e==="bool"||e==="function"||e==="string"||e==="tuple"||zt.test(e)||Ct.test(e)||ro.test(e)}function so(e,t){return t||e==="bytes"||e==="string"||e==="tuple"}function Un(e){let t={},n=e.length;for(let s=0;s<n;s++){let a=e[s];if(!Te(a))continue;let c=Sn(a);if(!c)throw new E({signature:a,type:"struct"});let p=c.properties.split(";"),d=[],l=p.length;for(let m=0;m<l;m++){let b=p[m].trim();if(!b)continue;let w=R(b,{type:"struct"});d.push(w)}if(!d.length)throw new Le({signature:a});t[c.name]=d}let r={},o=Object.entries(t),i=o.length;for(let s=0;s<i;s++){let[a,c]=o[s];r[a]=Fn(c,t)}return r}var io=/^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*)(?<array>(?:\[\d*?\])+?)?$/;function Fn(e,t,n=new Set){let r=[],o=e.length;for(let i=0;i<o;i++){let s=e[i];if(Me.test(s.type))r.push(s);else{let c=v(io,s.type);if(!c?.type)throw new Ue({abiParameter:s});let{array:p,type:d}=c;if(d in t){if(n.has(d))throw new De({type:d});r.push({...s,type:`tuple${p??""}`,components:Fn(t[d]??[],t,new Set([...n,d]))})}else if(jt(d))r.push(s);else throw new ke({type:d})}}return r}function _e(e){let t=Un(e),n=[],r=e.length;for(let o=0;o<r;o++){let i=e[o];Te(i)||n.push(jn(i,t))}return n}function W(e){return typeof e=="string"?{address:e,type:"json-rpc"}:e}var Ut=[{inputs:[{components:[{name:"target",type:"address"},{name:"allowFailure",type:"bool"},{name:"callData",type:"bytes"}],name:"calls",type:"tuple[]"}],name:"aggregate3",outputs:[{components:[{name:"success",type:"bool"},{name:"returnData",type:"bytes"}],name:"returnData",type:"tuple[]"}],stateMutability:"view",type:"function"}],Ln=[{inputs:[],name:"ResolverNotFound",type:"error"},{inputs:[],name:"ResolverWildcardNotSupported",type:"error"},{inputs:[],name:"ResolverNotContract",type:"error"},{inputs:[{name:"returnData",type:"bytes"}],name:"ResolverError",type:"error"},{inputs:[{components:[{name:"status",type:"uint16"},{name:"message",type:"string"}],name:"errors",type:"tuple[]"}],name:"HttpError",type:"error"}],Ks=[...Ln,{name:"resolve",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes"},{name:"data",type:"bytes"}],outputs:[{name:"",type:"bytes"},{name:"address",type:"address"}]},{name:"resolve",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes"},{name:"data",type:"bytes"},{name:"gateways",type:"string[]"}],outputs:[{name:"",type:"bytes"},{name:"address",type:"address"}]}],Xs=[...Ln,{name:"reverse",type:"function",stateMutability:"view",inputs:[{type:"bytes",name:"reverseName"}],outputs:[{type:"string",name:"resolvedName"},{type:"address",name:"resolvedAddress"},{type:"address",name:"reverseResolver"},{type:"address",name:"resolver"}]},{name:"reverse",type:"function",stateMutability:"view",inputs:[{type:"bytes",name:"reverseName"},{type:"string[]",name:"gateways"}],outputs:[{type:"string",name:"resolvedName"},{type:"address",name:"resolvedAddress"},{type:"address",name:"reverseResolver"},{type:"address",name:"resolver"}]}];var Dn="0x82ad56cb";var Nn="0x608060405234801561001057600080fd5b5060405161018e38038061018e83398101604081905261002f91610124565b6000808351602085016000f59050803b61004857600080fd5b6000808351602085016000855af16040513d6000823e81610067573d81fd5b3d81f35b634e487b7160e01b600052604160045260246000fd5b600082601f83011261009257600080fd5b81516001600160401b038111156100ab576100ab61006b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156100d9576100d961006b565b6040528181528382016020018510156100f157600080fd5b60005b82811015610110576020818601810151838301820152016100f4565b506000918101602001919091529392505050565b6000806040838503121561013757600080fd5b82516001600160401b0381111561014d57600080fd5b61015985828601610081565b602085015190935090506001600160401b0381111561017757600080fd5b61018385828601610081565b915050925092905056fe",Hn="0x608060405234801561001057600080fd5b506040516102c03803806102c083398101604081905261002f916101e6565b836001600160a01b03163b6000036100e457600080836001600160a01b03168360405161005c9190610270565b6000604051808303816000865af19150503d8060008114610099576040519150601f19603f3d011682016040523d82523d6000602084013e61009e565b606091505b50915091508115806100b857506001600160a01b0386163b155b156100e1578060405163101bb98d60e01b81526004016100d8919061028c565b60405180910390fd5b50505b6000808451602086016000885af16040513d6000823e81610103573d81fd5b3d81f35b80516001600160a01b038116811461011e57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561015457818101518382015260200161013c565b50506000910152565b600082601f83011261016e57600080fd5b81516001600160401b0381111561018757610187610123565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101b5576101b5610123565b6040528181528382016020018510156101cd57600080fd5b6101de826020830160208701610139565b949350505050565b600080600080608085870312156101fc57600080fd5b61020585610107565b60208601519094506001600160401b0381111561022157600080fd5b61022d8782880161015d565b93505061023c60408601610107565b60608601519092506001600160401b0381111561025857600080fd5b6102648782880161015d565b91505092959194509250565b60008251610282818460208701610139565b9190910192915050565b60208152600082518060208401526102ab816040850160208701610139565b601f01601f1916919091016040019291505056fe";var Ft="2.23.2";var Lt={getDocsUrl:({docsBaseUrl:e,docsPath:t="",docsSlug:n})=>t?`${e??"https://viem.sh"}${t}${n?`#${n}`:""}`:void 0,version:`viem@${Ft}`};var u=class e extends Error{constructor(t,n={}){let r=n.cause instanceof e?n.cause.details:n.cause?.message?n.cause.message:n.details,o=n.cause instanceof e&&n.cause.docsPath||n.docsPath,i=Lt.getDocsUrl?.({...n,docsPath:o}),s=[t||"An error occurred.","",...n.metaMessages?[...n.metaMessages,""]:[],...i?[`Docs: ${i}`]:[],...r?[`Details: ${r}`]:[],...Lt.version?[`Version: ${Lt.version}`]:[]].join(`
3
+ `);super(s,n.cause?{cause:n.cause}:void 0),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),this.details=r,this.docsPath=o,this.metaMessages=n.metaMessages,this.name=n.name??this.name,this.shortMessage=t,this.version=Ft}walk(t){return _n(this,t)}};function _n(e,t){return t?.(e)?e:e&&typeof e=="object"&&"cause"in e&&e.cause!==void 0?_n(e.cause,t):t?null:e}var N=class extends u{constructor({blockNumber:t,chain:n,contract:r}){super(`Chain "${n.name}" does not support contract "${r.name}".`,{metaMessages:["This could be due to any of the following:",...t&&r.blockCreated&&r.blockCreated>t?[`- The contract "${r.name}" was not deployed until block ${r.blockCreated} (current block ${t}).`]:[`- The chain does not have the contract "${r.name}" configured.`]],name:"ChainDoesNotSupportContract"})}};var fe=class extends u{constructor(){super("No chain was provided to the Client.",{name:"ClientChainNotConfiguredError"})}};var Gn={inputs:[{name:"message",type:"string"}],name:"Error",type:"error"},Vn={inputs:[{name:"reason",type:"uint256"}],name:"Panic",type:"error"};function H(e,{includeName:t=!1}={}){if(e.type!=="function"&&e.type!=="event"&&e.type!=="error")throw new Ve(e.type);return`${e.name}(${Ge(e.inputs,{includeName:t})})`}function Ge(e,{includeName:t=!1}={}){return e?e.map(n=>ao(n,{includeName:t})).join(t?", ":","):""}function ao(e,{includeName:t}){return e.type.startsWith("tuple")?`(${Ge(e.components,{includeName:t})})${e.type.slice(5)}`:e.type+(t&&e.name?` ${e.name}`:"")}function A(e,{strict:t=!0}={}){return!e||typeof e!="string"?!1:t?/^0x[0-9a-fA-F]*$/.test(e):e.startsWith("0x")}function h(e){return A(e,{strict:!1})?Math.ceil((e.length-2)/2):e.length}var We=class extends u{constructor({docsPath:t}){super(["A constructor was not found on the ABI.","Make sure you are using the correct ABI and that the constructor exists on it."].join(`
4
+ `),{docsPath:t,name:"AbiConstructorNotFoundError"})}},le=class extends u{constructor({docsPath:t}){super(["Constructor arguments were provided (`args`), but a constructor parameters (`inputs`) were not found on the ABI.","Make sure you are using the correct ABI, and that the `inputs` attribute on the constructor exists."].join(`
5
+ `),{docsPath:t,name:"AbiConstructorParamsNotFoundError"})}};var Ze=class extends u{constructor({data:t,params:n,size:r}){super([`Data size of ${r} bytes is too small for given parameters.`].join(`
6
+ `),{metaMessages:[`Params: (${Ge(n,{includeName:!0})})`,`Data: ${t} (${r} bytes)`],name:"AbiDecodingDataSizeTooSmallError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"params",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"size",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=t,this.params=n,this.size=r}},Z=class extends u{constructor(){super('Cannot decode zero data ("0x") with ABI parameters.',{name:"AbiDecodingZeroDataError"})}},Ke=class extends u{constructor({expectedLength:t,givenLength:n,type:r}){super([`ABI encoding array length mismatch for type ${r}.`,`Expected length: ${t}`,`Given length: ${n}`].join(`
7
+ `),{name:"AbiEncodingArrayLengthMismatchError"})}},Xe=class extends u{constructor({expectedSize:t,value:n}){super(`Size of bytes "${n}" (bytes${h(n)}) does not match expected size (bytes${t}).`,{name:"AbiEncodingBytesSizeMismatchError"})}},Je=class extends u{constructor({expectedLength:t,givenLength:n}){super(["ABI encoding params/values length mismatch.",`Expected length (params): ${t}`,`Given length (values): ${n}`].join(`
8
+ `),{name:"AbiEncodingLengthMismatchError"})}};var Ye=class extends u{constructor(t,{docsPath:n}){super([`Encoded error signature "${t}" not found on ABI.`,"Make sure you are using the correct ABI and that the error exists on it.",`You can look up the decoded signature here: https://openchain.xyz/signatures?query=${t}.`].join(`
9
+ `),{docsPath:n,name:"AbiErrorSignatureNotFoundError"}),Object.defineProperty(this,"signature",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.signature=t}};var j=class extends u{constructor(t,{docsPath:n}={}){super([`Function ${t?`"${t}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the function exists on it."].join(`
10
+ `),{docsPath:n,name:"AbiFunctionNotFoundError"})}},qe=class extends u{constructor(t,{docsPath:n}){super([`Function "${t}" does not contain any \`outputs\` on ABI.`,"Cannot decode function result without knowing what the parameter types are.","Make sure you are using the correct ABI and that the function exists on it."].join(`
11
+ `),{docsPath:n,name:"AbiFunctionOutputsNotFoundError"})}};var Qe=class extends u{constructor(t,n){super("Found ambiguous types in overloaded ABI items.",{metaMessages:[`\`${t.type}\` in \`${H(t.abiItem)}\`, and`,`\`${n.type}\` in \`${H(n.abiItem)}\``,"","These types encode differently and cannot be distinguished at runtime.","Remove one of the ambiguous items in the ABI."],name:"AbiItemAmbiguityError"})}};var et=class extends u{constructor(t,{docsPath:n}){super([`Type "${t}" is not a valid encoding type.`,"Please provide a valid ABI type."].join(`
12
+ `),{docsPath:n,name:"InvalidAbiEncodingType"})}},tt=class extends u{constructor(t,{docsPath:n}){super([`Type "${t}" is not a valid decoding type.`,"Please provide a valid ABI type."].join(`
13
+ `),{docsPath:n,name:"InvalidAbiDecodingType"})}},nt=class extends u{constructor(t){super([`Value "${t}" is not a valid array.`].join(`
14
+ `),{name:"InvalidArrayError"})}},Ve=class extends u{constructor(t){super([`"${t}" is not a valid definition type.`,'Valid types: "function", "event", "error"'].join(`
15
+ `),{name:"InvalidDefinitionTypeError"})}};var me=class extends u{constructor({offset:t,position:n,size:r}){super(`Slice ${n==="start"?"starting":"ending"} at offset "${t}" is out-of-bounds (size: ${r}).`,{name:"SliceOffsetOutOfBoundsError"})}},ye=class extends u{constructor({size:t,targetSize:n,type:r}){super(`${r.charAt(0).toUpperCase()}${r.slice(1).toLowerCase()} size (${t}) exceeds padding size (${n}).`,{name:"SizeExceedsPaddingSizeError"})}},be=class extends u{constructor({size:t,targetSize:n,type:r}){super(`${r.charAt(0).toUpperCase()}${r.slice(1).toLowerCase()} is expected to be ${n} ${r} long, but is ${t} ${r} long.`,{name:"InvalidBytesLengthError"})}};function _(e,t,n,{strict:r}={}){return A(e,{strict:!1})?uo(e,t,n,{strict:r}):Dt(e,t,n,{strict:r})}function Wn(e,t){if(typeof t=="number"&&t>0&&t>h(e)-1)throw new me({offset:t,position:"start",size:h(e)})}function Zn(e,t,n){if(typeof t=="number"&&typeof n=="number"&&h(e)!==n-t)throw new me({offset:n,position:"end",size:h(e)})}function Dt(e,t,n,{strict:r}={}){Wn(e,t);let o=e.slice(t,n);return r&&Zn(o,t,n),o}function uo(e,t,n,{strict:r}={}){Wn(e,t);let o=`0x${e.replace("0x","").slice((t??0)*2,(n??e.length)*2)}`;return r&&Zn(o,t,n),o}function U(e,{dir:t,size:n=32}={}){return typeof e=="string"?B(e,{dir:t,size:n}):co(e,{dir:t,size:n})}function B(e,{dir:t,size:n=32}={}){if(n===null)return e;let r=e.replace("0x","");if(r.length>n*2)throw new ye({size:Math.ceil(r.length/2),targetSize:n,type:"hex"});return`0x${r[t==="right"?"padEnd":"padStart"](n*2,"0")}`}function co(e,{dir:t,size:n=32}={}){if(n===null)return e;if(e.length>n)throw new ye({size:e.length,targetSize:n,type:"bytes"});let r=new Uint8Array(n);for(let o=0;o<n;o++){let i=t==="right";r[i?o:n-o-1]=e[i?o:e.length-o-1]}return r}var K=class extends u{constructor({max:t,min:n,signed:r,size:o,value:i}){super(`Number "${i}" is not in safe ${o?`${o*8}-bit ${r?"signed":"unsigned"} `:""}integer range ${t?`(${n} to ${t})`:`(above ${n})`}`,{name:"IntegerOutOfRangeError"})}},rt=class extends u{constructor(t){super(`Bytes value "${t}" is not a valid boolean. The bytes array must contain a single byte of either a 0 or 1 value.`,{name:"InvalidBytesBooleanError"})}};var ot=class extends u{constructor({givenSize:t,maxSize:n}){super(`Size cannot exceed ${n} bytes. Given size: ${t} bytes.`,{name:"SizeOverflowError"})}};function he(e,{dir:t="left"}={}){let n=typeof e=="string"?e.replace("0x",""):e,r=0;for(let o=0;o<n.length-1&&n[t==="left"?o:n.length-o-1].toString()==="0";o++)r++;return n=t==="left"?n.slice(r):n.slice(0,n.length-r),typeof e=="string"?(n.length===1&&t==="right"&&(n=`${n}0`),`0x${n.length%2===1?`0${n}`:n}`):n}function $(e,{size:t}){if(h(e)>t)throw new ot({givenSize:h(e),maxSize:t})}function Nt(e,t={}){let{signed:n}=t;t.size&&$(e,{size:t.size});let r=BigInt(e);if(!n)return r;let o=(e.length-2)/2,i=(1n<<BigInt(o)*8n-1n)-1n;return r<=i?r:r-BigInt(`0x${"f".padStart(o*2,"f")}`)-1n}function Kn(e,t={}){return Number(Nt(e,t))}var po=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function Xn(e,t={}){return typeof e=="number"||typeof e=="bigint"?y(e,t):typeof e=="string"?_t(e,t):typeof e=="boolean"?Ht(e,t):P(e,t)}function Ht(e,t={}){let n=`0x${Number(e)}`;return typeof t.size=="number"?($(n,{size:t.size}),U(n,{size:t.size})):n}function P(e,t={}){let n="";for(let o=0;o<e.length;o++)n+=po[e[o]];let r=`0x${n}`;return typeof t.size=="number"?($(r,{size:t.size}),U(r,{dir:"right",size:t.size})):r}function y(e,t={}){let{signed:n,size:r}=t,o=BigInt(e),i;r?n?i=(1n<<BigInt(r)*8n-1n)-1n:i=2n**(BigInt(r)*8n)-1n:typeof e=="number"&&(i=BigInt(Number.MAX_SAFE_INTEGER));let s=typeof i=="bigint"&&n?-i-1n:0;if(i&&o>i||o<s){let c=typeof e=="bigint"?"n":"";throw new K({max:i?`${i}${c}`:void 0,min:`${s}${c}`,signed:n,size:r,value:`${e}${c}`})}let a=`0x${(n&&o<0?(1n<<BigInt(r*8))+BigInt(o):o).toString(16)}`;return r?U(a,{size:r}):a}var fo=new TextEncoder;function _t(e,t={}){let n=fo.encode(e);return P(n,t)}var lo=new TextEncoder;function st(e,t={}){return typeof e=="number"||typeof e=="bigint"?yo(e,t):typeof e=="boolean"?mo(e,t):A(e)?it(e,t):Gt(e,t)}function mo(e,t={}){let n=new Uint8Array(1);return n[0]=Number(e),typeof t.size=="number"?($(n,{size:t.size}),U(n,{size:t.size})):n}var k={zero:48,nine:57,A:65,F:70,a:97,f:102};function Jn(e){if(e>=k.zero&&e<=k.nine)return e-k.zero;if(e>=k.A&&e<=k.F)return e-(k.A-10);if(e>=k.a&&e<=k.f)return e-(k.a-10)}function it(e,t={}){let n=e;t.size&&($(n,{size:t.size}),n=U(n,{dir:"right",size:t.size}));let r=n.slice(2);r.length%2&&(r=`0${r}`);let o=r.length/2,i=new Uint8Array(o);for(let s=0,a=0;s<o;s++){let c=Jn(r.charCodeAt(a++)),p=Jn(r.charCodeAt(a++));if(c===void 0||p===void 0)throw new u(`Invalid byte sequence ("${r[a-2]}${r[a-1]}" in "${r}").`);i[s]=c*16+p}return i}function yo(e,t){let n=y(e,t);return it(n)}function Gt(e,t={}){let n=lo.encode(e);return typeof t.size=="number"?($(n,{size:t.size}),U(n,{dir:"right",size:t.size})):n}var at=BigInt(4294967295),Yn=BigInt(32);function bo(e,t=!1){return t?{h:Number(e&at),l:Number(e>>Yn&at)}:{h:Number(e>>Yn&at)|0,l:Number(e&at)|0}}function qn(e,t=!1){let n=new Uint32Array(e.length),r=new Uint32Array(e.length);for(let o=0;o<e.length;o++){let{h:i,l:s}=bo(e[o],t);[n[o],r[o]]=[i,s]}return[n,r]}var Qn=(e,t,n)=>e<<n|t>>>32-n,er=(e,t,n)=>t<<n|e>>>32-n,tr=(e,t,n)=>t<<n-32|e>>>64-n,nr=(e,t,n)=>e<<n-32|t>>>64-n;var sr=[],ir=[],ar=[],ho=BigInt(0),xe=BigInt(1),xo=BigInt(2),go=BigInt(7),wo=BigInt(256),vo=BigInt(113);for(let e=0,t=xe,n=1,r=0;e<24;e++){[n,r]=[r,(2*n+3*r)%5],sr.push(2*(5*r+n)),ir.push((e+1)*(e+2)/2%64);let o=ho;for(let i=0;i<7;i++)t=(t<<xe^(t>>go)*vo)%wo,t&xo&&(o^=xe<<(xe<<BigInt(i))-xe);ar.push(o)}var[$o,Ao]=qn(ar,!0),rr=(e,t,n)=>n>32?tr(e,t,n):Qn(e,t,n),or=(e,t,n)=>n>32?nr(e,t,n):er(e,t,n);function Po(e,t=24){let n=new Uint32Array(10);for(let r=24-t;r<24;r++){for(let s=0;s<10;s++)n[s]=e[s]^e[s+10]^e[s+20]^e[s+30]^e[s+40];for(let s=0;s<10;s+=2){let a=(s+8)%10,c=(s+2)%10,p=n[c],d=n[c+1],l=rr(p,d,1)^n[a],m=or(p,d,1)^n[a+1];for(let f=0;f<50;f+=10)e[s+f]^=l,e[s+f+1]^=m}let o=e[2],i=e[3];for(let s=0;s<24;s++){let a=ir[s],c=rr(o,i,a),p=or(o,i,a),d=sr[s];o=e[d],i=e[d+1],e[d]=c,e[d+1]=p}for(let s=0;s<50;s+=10){for(let a=0;a<10;a++)n[a]=e[s+a];for(let a=0;a<10;a++)e[s+a]^=~n[(a+2)%10]&n[(a+4)%10]}e[0]^=$o[r],e[1]^=Ao[r]}n.fill(0)}var ut=class e extends dn{constructor(t,n,r,o=!1,i=24){if(super(),this.blockLen=t,this.suffix=n,this.outputLen=r,this.enableXOF=o,this.rounds=i,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,Tt(r),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=cn(this.state)}keccak(){kt||Ot(this.state32),Po(this.state32,this.rounds),kt||Ot(this.state32),this.posOut=0,this.pos=0}update(t){Bt(this);let{blockLen:n,state:r}=this;t=pn(t);let o=t.length;for(let i=0;i<o;){let s=Math.min(n-this.pos,o-i);for(let a=0;a<s;a++)r[this.pos++]^=t[i++];this.pos===n&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;let{state:t,suffix:n,pos:r,blockLen:o}=this;t[r]^=n,(n&128)!==0&&r===o-1&&this.keccak(),t[o-1]^=128,this.keccak()}writeInto(t){Bt(this,!1),an(t),this.finish();let n=this.state,{blockLen:r}=this;for(let o=0,i=t.length;o<i;){this.posOut>=r&&this.keccak();let s=Math.min(r-this.posOut,i-o);t.set(n.subarray(this.posOut,this.posOut+s),o),this.posOut+=s,o+=s}return t}xofInto(t){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(t)}xof(t){return Tt(t),this.xofInto(new Uint8Array(t))}digestInto(t){if(un(t,this),this.finished)throw new Error("digest() was already called");return this.writeInto(t),this.destroy(),t}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(t){let{blockLen:n,suffix:r,outputLen:o,rounds:i,enableXOF:s}=this;return t||(t=new e(n,r,o,s,i)),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=i,t.suffix=r,t.outputLen=o,t.enableXOF=s,t.destroyed=this.destroyed,t}},F=(e,t,n)=>fn(()=>new ut(t,e,n)),_i=F(6,144,224/8),Gi=F(6,136,256/8),Vi=F(6,104,384/8),Wi=F(6,72,512/8),Zi=F(1,144,224/8),ur=F(1,136,256/8),Ki=F(1,104,384/8),Xi=F(1,72,512/8),cr=(e,t,n)=>ln((r={})=>new ut(t,e,r.dkLen===void 0?n:r.dkLen,!0)),Ji=cr(31,168,128/8),Yi=cr(31,136,256/8);function ct(e,t){let n=t||"hex",r=ur(A(e,{strict:!1})?st(e):e);return n==="bytes"?r:Xn(r)}var Io=e=>ct(st(e));function pr(e){return Io(e)}function dr(e){let t=!0,n="",r=0,o="",i=!1;for(let s=0;s<e.length;s++){let a=e[s];if(["(",")",","].includes(a)&&(t=!0),a==="("&&r++,a===")"&&r--,!!t){if(r===0){if(a===" "&&["event","function",""].includes(o))o="";else if(o+=a,a===")"){i=!0;break}continue}if(a===" "){e[s-1]!==","&&n!==","&&n!==",("&&(n="",t=!1);continue}o+=a,n+=a}}if(!i)throw new u("Unable to normalize signature.");return o}var fr=e=>{let t=typeof e=="string"?e:Rt(e);return dr(t)};function pt(e){return pr(fr(e))}var X=e=>_(pt(e),0,4);var I=class extends u{constructor({address:t}){super(`Address "${t}" is invalid.`,{metaMessages:["- Address must be a hex value of 20 bytes (40 hex characters).","- Address must match its checksum counterpart."],name:"InvalidAddressError"})}};var J=class extends Map{constructor(t){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=t}get(t){let n=super.get(t);return super.has(t)&&n!==void 0&&(this.delete(t),super.set(t,n)),n}set(t,n){if(super.set(t,n),this.maxSize&&this.size>this.maxSize){let r=this.keys().next().value;r&&this.delete(r)}return this}};var So=/^0x[a-fA-F0-9]{40}$/,Vt=new J(8192);function g(e,t){let{strict:n=!0}=t??{},r=`${e}.${n}`;if(Vt.has(r))return Vt.get(r);let o=So.test(e)?e.toLowerCase()===e?!0:n?dt(e)===e:!0:!1;return Vt.set(r,o),o}var Wt=new J(8192);function dt(e,t){if(Wt.has(`${e}.${t}`))return Wt.get(`${e}.${t}`);let n=t?`${t}${e.toLowerCase()}`:e.substring(2).toLowerCase(),r=ct(Gt(n),"bytes"),o=(t?n.substring(`${t}0x`.length):n).split("");for(let s=0;s<40;s+=2)r[s>>1]>>4>=8&&o[s]&&(o[s]=o[s].toUpperCase()),(r[s>>1]&15)>=8&&o[s+1]&&(o[s+1]=o[s+1].toUpperCase());let i=`0x${o.join("")}`;return Wt.set(`${e}.${t}`,i),i}var ge=class extends u{constructor({offset:t}){super(`Offset \`${t}\` cannot be negative.`,{name:"NegativeOffsetError"})}},ft=class extends u{constructor({length:t,position:n}){super(`Position \`${n}\` is out of bounds (\`0 < position < ${t}\`).`,{name:"PositionOutOfBoundsError"})}},lt=class extends u{constructor({count:t,limit:n}){super(`Recursive read limit of \`${n}\` exceeded (recursive read count: \`${t}\`).`,{name:"RecursiveReadLimitExceededError"})}};var Mo={bytes:new Uint8Array,dataView:new DataView(new ArrayBuffer(0)),position:0,positionReadCount:new Map,recursiveReadCount:0,recursiveReadLimit:Number.POSITIVE_INFINITY,assertReadLimit(){if(this.recursiveReadCount>=this.recursiveReadLimit)throw new lt({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(e){if(e<0||e>this.bytes.length-1)throw new ft({length:this.bytes.length,position:e})},decrementPosition(e){if(e<0)throw new ge({offset:e});let t=this.position-e;this.assertPosition(t),this.position=t},getReadCount(e){return this.positionReadCount.get(e||this.position)||0},incrementPosition(e){if(e<0)throw new ge({offset:e});let t=this.position+e;this.assertPosition(t),this.position=t},inspectByte(e){let t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectBytes(e,t){let n=t??this.position;return this.assertPosition(n+e-1),this.bytes.subarray(n,n+e)},inspectUint8(e){let t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectUint16(e){let t=e??this.position;return this.assertPosition(t+1),this.dataView.getUint16(t)},inspectUint24(e){let t=e??this.position;return this.assertPosition(t+2),(this.dataView.getUint16(t)<<8)+this.dataView.getUint8(t+2)},inspectUint32(e){let t=e??this.position;return this.assertPosition(t+3),this.dataView.getUint32(t)},pushByte(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushBytes(e){this.assertPosition(this.position+e.length-1),this.bytes.set(e,this.position),this.position+=e.length},pushUint8(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushUint16(e){this.assertPosition(this.position+1),this.dataView.setUint16(this.position,e),this.position+=2},pushUint24(e){this.assertPosition(this.position+2),this.dataView.setUint16(this.position,e>>8),this.dataView.setUint8(this.position+2,e&255),this.position+=3},pushUint32(e){this.assertPosition(this.position+3),this.dataView.setUint32(this.position,e),this.position+=4},readByte(){this.assertReadLimit(),this._touch();let e=this.inspectByte();return this.position++,e},readBytes(e,t){this.assertReadLimit(),this._touch();let n=this.inspectBytes(e);return this.position+=t??e,n},readUint8(){this.assertReadLimit(),this._touch();let e=this.inspectUint8();return this.position+=1,e},readUint16(){this.assertReadLimit(),this._touch();let e=this.inspectUint16();return this.position+=2,e},readUint24(){this.assertReadLimit(),this._touch();let e=this.inspectUint24();return this.position+=3,e},readUint32(){this.assertReadLimit(),this._touch();let e=this.inspectUint32();return this.position+=4,e},get remaining(){return this.bytes.length-this.position},setPosition(e){let t=this.position;return this.assertPosition(e),this.position=e,()=>this.position=t},_touch(){if(this.recursiveReadLimit===Number.POSITIVE_INFINITY)return;let e=this.getReadCount();this.positionReadCount.set(this.position,e+1),e>0&&this.recursiveReadCount++}};function lr(e,{recursiveReadLimit:t=8192}={}){let n=Object.create(Mo);return n.bytes=e,n.dataView=new DataView(e.buffer,e.byteOffset,e.byteLength),n.positionReadCount=new Map,n.recursiveReadLimit=t,n}function mr(e,t={}){typeof t.size<"u"&&$(e,{size:t.size});let n=P(e,t);return Nt(n,t)}function yr(e,t={}){let n=e;if(typeof t.size<"u"&&($(n,{size:t.size}),n=he(n)),n.length>1||n[0]>1)throw new rt(n);return!!n[0]}function T(e,t={}){typeof t.size<"u"&&$(e,{size:t.size});let n=P(e,t);return Kn(n,t)}function br(e,t={}){let n=e;return typeof t.size<"u"&&($(n,{size:t.size}),n=he(n,{dir:"right"})),new TextDecoder().decode(n)}function O(e){return typeof e[0]=="string"?we(e):Eo(e)}function Eo(e){let t=0;for(let o of e)t+=o.length;let n=new Uint8Array(t),r=0;for(let o of e)n.set(o,r),r+=o.length;return n}function we(e){return`0x${e.reduce((t,n)=>t+n.replace("0x",""),"")}`}var hr=/^(u?int)(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/;function Y(e,t){if(e.length!==t.length)throw new Je({expectedLength:e.length,givenLength:t.length});let n=To({params:e,values:t}),r=Kt(n);return r.length===0?"0x":r}function To({params:e,values:t}){let n=[];for(let r=0;r<e.length;r++)n.push(Zt({param:e[r],value:t[r]}));return n}function Zt({param:e,value:t}){let n=mt(e.type);if(n){let[r,o]=n;return ko(t,{length:r,param:{...e,type:o}})}if(e.type==="tuple")return jo(t,{param:e});if(e.type==="address")return Bo(t);if(e.type==="bool")return zo(t);if(e.type.startsWith("uint")||e.type.startsWith("int")){let r=e.type.startsWith("int"),[,,o="256"]=hr.exec(e.type)??[];return Co(t,{signed:r,size:Number(o)})}if(e.type.startsWith("bytes"))return Oo(t,{param:e});if(e.type==="string")return Ro(t);throw new et(e.type,{docsPath:"/docs/contract/encodeAbiParameters"})}function Kt(e){let t=0;for(let i=0;i<e.length;i++){let{dynamic:s,encoded:a}=e[i];s?t+=32:t+=h(a)}let n=[],r=[],o=0;for(let i=0;i<e.length;i++){let{dynamic:s,encoded:a}=e[i];s?(n.push(y(t+o,{size:32})),r.push(a),o+=h(a)):n.push(a)}return O([...n,...r])}function Bo(e){if(!g(e))throw new I({address:e});return{dynamic:!1,encoded:B(e.toLowerCase())}}function ko(e,{length:t,param:n}){let r=t===null;if(!Array.isArray(e))throw new nt(e);if(!r&&e.length!==t)throw new Ke({expectedLength:t,givenLength:e.length,type:`${n.type}[${t}]`});let o=!1,i=[];for(let s=0;s<e.length;s++){let a=Zt({param:n,value:e[s]});a.dynamic&&(o=!0),i.push(a)}if(r||o){let s=Kt(i);if(r){let a=y(i.length,{size:32});return{dynamic:!0,encoded:i.length>0?O([a,s]):a}}if(o)return{dynamic:!0,encoded:s}}return{dynamic:!1,encoded:O(i.map(({encoded:s})=>s))}}function Oo(e,{param:t}){let[,n]=t.type.split("bytes"),r=h(e);if(!n){let o=e;return r%32!==0&&(o=B(o,{dir:"right",size:Math.ceil((e.length-2)/2/32)*32})),{dynamic:!0,encoded:O([B(y(r,{size:32})),o])}}if(r!==Number.parseInt(n))throw new Xe({expectedSize:Number.parseInt(n),value:e});return{dynamic:!1,encoded:B(e,{dir:"right"})}}function zo(e){if(typeof e!="boolean")throw new u(`Invalid boolean value: "${e}" (type: ${typeof e}). Expected: \`true\` or \`false\`.`);return{dynamic:!1,encoded:B(Ht(e))}}function Co(e,{signed:t,size:n=256}){if(typeof n=="number"){let r=2n**(BigInt(n)-(t?1n:0n))-1n,o=t?-r-1n:0n;if(e>r||e<o)throw new K({max:r.toString(),min:o.toString(),signed:t,size:n/8,value:e.toString()})}return{dynamic:!1,encoded:y(e,{size:32,signed:t})}}function Ro(e){let t=_t(e),n=Math.ceil(h(t)/32),r=[];for(let o=0;o<n;o++)r.push(B(_(t,o*32,(o+1)*32),{dir:"right"}));return{dynamic:!0,encoded:O([B(y(h(t),{size:32})),...r])}}function jo(e,{param:t}){let n=!1,r=[];for(let o=0;o<t.components.length;o++){let i=t.components[o],s=Array.isArray(e)?o:i.name,a=Zt({param:i,value:e[s]});r.push(a),a.dynamic&&(n=!0)}return{dynamic:n,encoded:n?Kt(r):O(r.map(({encoded:o})=>o))}}function mt(e){let t=e.match(/^(.*)\[(\d+)?\]$/);return t?[t[2]?Number(t[2]):null,t[1]]:void 0}function yt(e,t){let n=typeof t=="string"?it(t):t,r=lr(n);if(h(n)===0&&e.length>0)throw new Z;if(h(t)&&h(t)<32)throw new Ze({data:typeof t=="string"?t:P(t),params:e,size:h(t)});let o=0,i=[];for(let s=0;s<e.length;++s){let a=e[s];r.setPosition(o);let[c,p]=q(r,a,{staticPosition:0});o+=p,i.push(c)}return i}function q(e,t,{staticPosition:n}){let r=mt(t.type);if(r){let[o,i]=r;return Fo(e,{...t,type:i},{length:o,staticPosition:n})}if(t.type==="tuple")return Ho(e,t,{staticPosition:n});if(t.type==="address")return Uo(e);if(t.type==="bool")return Lo(e);if(t.type.startsWith("bytes"))return Do(e,t,{staticPosition:n});if(t.type.startsWith("uint")||t.type.startsWith("int"))return No(e,t);if(t.type==="string")return _o(e,{staticPosition:n});throw new tt(t.type,{docsPath:"/docs/contract/decodeAbiParameters"})}var xr=32,Xt=32;function Uo(e){let t=e.readBytes(32);return[dt(P(Dt(t,-20))),32]}function Fo(e,t,{length:n,staticPosition:r}){if(!n){let s=T(e.readBytes(Xt)),a=r+s,c=a+xr;e.setPosition(a);let p=T(e.readBytes(xr)),d=ve(t),l=0,m=[];for(let f=0;f<p;++f){e.setPosition(c+(d?f*32:l));let[b,w]=q(e,t,{staticPosition:c});l+=w,m.push(b)}return e.setPosition(r+32),[m,32]}if(ve(t)){let s=T(e.readBytes(Xt)),a=r+s,c=[];for(let p=0;p<n;++p){e.setPosition(a+p*32);let[d]=q(e,t,{staticPosition:a});c.push(d)}return e.setPosition(r+32),[c,32]}let o=0,i=[];for(let s=0;s<n;++s){let[a,c]=q(e,t,{staticPosition:r+o});o+=c,i.push(a)}return[i,o]}function Lo(e){return[yr(e.readBytes(32),{size:32}),32]}function Do(e,t,{staticPosition:n}){let[r,o]=t.type.split("bytes");if(!o){let s=T(e.readBytes(32));e.setPosition(n+s);let a=T(e.readBytes(32));if(a===0)return e.setPosition(n+32),["0x",32];let c=e.readBytes(a);return e.setPosition(n+32),[P(c),32]}return[P(e.readBytes(Number.parseInt(o),32)),32]}function No(e,t){let n=t.type.startsWith("int"),r=Number.parseInt(t.type.split("int")[1]||"256"),o=e.readBytes(32);return[r>48?mr(o,{signed:n}):T(o,{signed:n}),32]}function Ho(e,t,{staticPosition:n}){let r=t.components.length===0||t.components.some(({name:s})=>!s),o=r?[]:{},i=0;if(ve(t)){let s=T(e.readBytes(Xt)),a=n+s;for(let c=0;c<t.components.length;++c){let p=t.components[c];e.setPosition(a+i);let[d,l]=q(e,p,{staticPosition:a});i+=l,o[r?c:p?.name]=d}return e.setPosition(n+32),[o,32]}for(let s=0;s<t.components.length;++s){let a=t.components[s],[c,p]=q(e,a,{staticPosition:n});o[r?s:a?.name]=c,i+=p}return[o,i]}function _o(e,{staticPosition:t}){let n=T(e.readBytes(32)),r=t+n;e.setPosition(r);let o=T(e.readBytes(32));if(o===0)return e.setPosition(t+32),["",32];let i=e.readBytes(o,32),s=br(he(i));return e.setPosition(t+32),[s,32]}function ve(e){let{type:t}=e;if(t==="string"||t==="bytes"||t.endsWith("[]"))return!0;if(t==="tuple")return e.components?.some(ve);let n=mt(e.type);return!!(n&&ve({...e,type:n[1]}))}function gr(e){let{abi:t,data:n}=e,r=_(n,0,4);if(r==="0x")throw new Z;let i=[...t||[],Gn,Vn].find(s=>s.type==="error"&&r===X(H(s)));if(!i)throw new Ye(r,{docsPath:"/docs/contract/decodeErrorResult"});return{abiItem:i,args:"inputs"in i&&i.inputs&&i.inputs.length>0?yt(i.inputs,_(n,4)):void 0,errorName:i.name}}var Q=(e,t,n)=>JSON.stringify(e,(r,o)=>{let i=typeof o=="bigint"?o.toString():o;return typeof t=="function"?t(r,i):i},n);var wr=pt;function bt(e){let{abi:t,args:n=[],name:r}=e,o=A(r,{strict:!1}),i=t.filter(a=>o?a.type==="function"?X(a)===r:a.type==="event"?wr(a)===r:!1:"name"in a&&a.name===r);if(i.length===0)return;if(i.length===1)return i[0];let s;for(let a of i){if(!("inputs"in a))continue;if(!n||n.length===0){if(!a.inputs||a.inputs.length===0)return a;continue}if(!a.inputs||a.inputs.length===0||a.inputs.length!==n.length)continue;if(n.every((p,d)=>{let l="inputs"in a&&a.inputs[d];return l?Jt(p,l):!1})){if(s&&"inputs"in s&&s.inputs){let p=vr(a.inputs,s.inputs,n);if(p)throw new Qe({abiItem:a,type:p[0]},{abiItem:s,type:p[1]})}s=a}}return s||i[0]}function Jt(e,t){let n=typeof e,r=t.type;switch(r){case"address":return g(e,{strict:!1});case"bool":return n==="boolean";case"function":return n==="string";case"string":return n==="string";default:return r==="tuple"&&"components"in t?Object.values(t.components).every((o,i)=>Jt(Object.values(e)[i],o)):/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/.test(r)?n==="number"||n==="bigint":/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(r)?n==="string"||e instanceof Uint8Array:/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(r)?Array.isArray(e)&&e.every(o=>Jt(o,{...t,type:r.replace(/(\[[0-9]{0,}\])$/,"")})):!1}}function vr(e,t,n){for(let r in e){let o=e[r],i=t[r];if(o.type==="tuple"&&i.type==="tuple"&&"components"in o&&"components"in i)return vr(o.components,i.components,n[r]);let s=[o.type,i.type];if(s.includes("address")&&s.includes("bytes20")?!0:s.includes("address")&&s.includes("string")?g(n[r],{strict:!1}):s.includes("address")&&s.includes("bytes")?g(n[r],{strict:!1}):!1)return s}}var $r={gwei:9,wei:18},Ar={ether:-9,wei:9};function ht(e,t){let n=e.toString(),r=n.startsWith("-");r&&(n=n.slice(1)),n=n.padStart(t,"0");let[o,i]=[n.slice(0,n.length-t),n.slice(n.length-t)];return i=i.replace(/(0+)$/,""),`${r?"-":""}${o||"0"}${i?`.${i}`:""}`}function Pr(e,t="wei"){return ht(e,$r[t])}function z(e,t="wei"){return ht(e,Ar[t])}var xt=class extends u{constructor({address:t}){super(`State for account "${t}" is set multiple times.`,{name:"AccountStateConflictError"})}},gt=class extends u{constructor(){super("state and stateDiff are set on the same account.",{name:"StateAssignmentConflictError"})}};function Ir(e){return e.reduce((t,{slot:n,value:r})=>`${t} ${n}: ${r}
16
+ `,"")}function Sr(e){return e.reduce((t,{address:n,...r})=>{let o=`${t} ${n}:
17
+ `;return r.nonce&&(o+=` nonce: ${r.nonce}
18
+ `),r.balance&&(o+=` balance: ${r.balance}
19
+ `),r.code&&(o+=` code: ${r.code}
20
+ `),r.state&&(o+=` state:
21
+ `,o+=Ir(r.state)),r.stateDiff&&(o+=` stateDiff:
22
+ `,o+=Ir(r.stateDiff)),o},` State Override:
23
+ `).slice(0,-1)}function Mr(e){let t=Object.entries(e).map(([r,o])=>o===void 0||o===!1?null:[r,o]).filter(Boolean),n=t.reduce((r,[o])=>Math.max(r,o.length),0);return t.map(([r,o])=>` ${`${r}:`.padEnd(n+1)} ${o}`).join(`
24
+ `)}var wt=class extends u{constructor(){super(["Cannot specify both a `gasPrice` and a `maxFeePerGas`/`maxPriorityFeePerGas`.","Use `maxFeePerGas`/`maxPriorityFeePerGas` for EIP-1559 compatible networks, and `gasPrice` for others."].join(`
25
+ `),{name:"FeeConflictError"})}};var $e=e=>e;var vt=class extends u{constructor(t,{account:n,docsPath:r,chain:o,data:i,gas:s,gasPrice:a,maxFeePerGas:c,maxPriorityFeePerGas:p,nonce:d,to:l,value:m,stateOverride:f}){let b=n?W(n):void 0,w=Mr({from:b?.address,to:l,value:typeof m<"u"&&`${Pr(m)} ${o?.nativeCurrency?.symbol||"ETH"}`,data:i,gas:s,gasPrice:typeof a<"u"&&`${z(a)} gwei`,maxFeePerGas:typeof c<"u"&&`${z(c)} gwei`,maxPriorityFeePerGas:typeof p<"u"&&`${z(p)} gwei`,nonce:d});f&&(w+=`
26
+ ${Sr(f)}`),super(t.shortMessage,{cause:t,docsPath:r,metaMessages:[...t.metaMessages?[...t.metaMessages," "]:[],"Raw Call Arguments:",w].filter(Boolean),name:"CallExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=t}};var $t=class extends u{constructor({factory:t}){super(`Deployment for counterfactual contract call failed${t?` for factory "${t}".`:""}`,{metaMessages:["Please ensure:","- The `factory` is a valid contract deployment factory (ie. Create2 Factory, ERC-4337 Factory, etc).","- The `factoryData` is a valid encoded function call for contract deployment function on the factory."],name:"CounterfactualDeploymentFailedError"})}},At=class extends u{constructor({data:t,message:n}){super(n||"",{name:"RawContractError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:3}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=t}};var Yt="/docs/contract/decodeFunctionResult";function Er(e){let{abi:t,args:n,functionName:r,data:o}=e,i=t[0];if(r){let a=bt({abi:t,args:n,name:r});if(!a)throw new j(r,{docsPath:Yt});i=a}if(i.type!=="function")throw new j(void 0,{docsPath:Yt});if(!i.outputs)throw new qe(i.name,{docsPath:Yt});let s=yt(i.outputs,o);if(s&&s.length>1)return s;if(s&&s.length===1)return s[0]}var qt="/docs/contract/encodeDeployData";function Qt(e){let{abi:t,args:n,bytecode:r}=e;if(!n||n.length===0)return r;let o=t.find(s=>"type"in s&&s.type==="constructor");if(!o)throw new We({docsPath:qt});if(!("inputs"in o))throw new le({docsPath:qt});if(!o.inputs||o.inputs.length===0)throw new le({docsPath:qt});let i=Y(o.inputs,n);return we([r,i])}var Tr="/docs/contract/encodeFunctionData";function Br(e){let{abi:t,args:n,functionName:r}=e,o=t[0];if(r){let i=bt({abi:t,args:n,name:r});if(!i)throw new j(r,{docsPath:Tr});o=i}if(o.type!=="function")throw new j(void 0,{docsPath:Tr});return{abi:[o],functionName:X(H(o))}}function kr(e){let{args:t}=e,{abi:n,functionName:r}=e.abi.length===1&&e.functionName?.startsWith("0x")?e:Br(e),o=n[0],i=r,s="inputs"in o&&o.inputs?Y(o.inputs,t??[]):void 0;return we([i,s??"0x"])}function Or({blockNumber:e,chain:t,contract:n}){let r=t?.contracts?.[n];if(!r)throw new N({chain:t,contract:{name:n}});if(e&&r.blockCreated&&r.blockCreated>e)throw new N({blockNumber:e,chain:t,contract:{name:n,blockCreated:r.blockCreated}});return r.address}var C=class extends u{constructor({cause:t,message:n}={}){let r=n?.replace("execution reverted: ","")?.replace("execution reverted","");super(`Execution reverted ${r?`with reason: ${r}`:"for an unknown reason"}.`,{cause:t,name:"ExecutionRevertedError"})}};Object.defineProperty(C,"code",{enumerable:!0,configurable:!0,writable:!0,value:3});Object.defineProperty(C,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/execution reverted/});var L=class extends u{constructor({cause:t,maxFeePerGas:n}={}){super(`The fee cap (\`maxFeePerGas\`${n?` = ${z(n)} gwei`:""}) cannot be higher than the maximum allowed value (2^256-1).`,{cause:t,name:"FeeCapTooHighError"})}};Object.defineProperty(L,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas higher than 2\^256-1|fee cap higher than 2\^256-1/});var ee=class extends u{constructor({cause:t,maxFeePerGas:n}={}){super(`The fee cap (\`maxFeePerGas\`${n?` = ${z(n)}`:""} gwei) cannot be lower than the block base fee.`,{cause:t,name:"FeeCapTooLowError"})}};Object.defineProperty(ee,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas less than block base fee|fee cap less than block base fee|transaction is outdated/});var te=class extends u{constructor({cause:t,nonce:n}={}){super(`Nonce provided for the transaction ${n?`(${n}) `:""}is higher than the next one expected.`,{cause:t,name:"NonceTooHighError"})}};Object.defineProperty(te,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too high/});var ne=class extends u{constructor({cause:t,nonce:n}={}){super([`Nonce provided for the transaction ${n?`(${n}) `:""}is lower than the current nonce of the account.`,"Try increasing the nonce or find the latest nonce with `getTransactionCount`."].join(`
27
+ `),{cause:t,name:"NonceTooLowError"})}};Object.defineProperty(ne,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too low|transaction already imported|already known/});var re=class extends u{constructor({cause:t,nonce:n}={}){super(`Nonce provided for the transaction ${n?`(${n}) `:""}exceeds the maximum allowed nonce.`,{cause:t,name:"NonceMaxValueError"})}};Object.defineProperty(re,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce has max value/});var oe=class extends u{constructor({cause:t}={}){super(["The total cost (gas * gas fee + value) of executing this transaction exceeds the balance of the account."].join(`
28
+ `),{cause:t,metaMessages:["This error could arise when the account does not have enough funds to:"," - pay for the total gas fee,"," - pay for the value to send."," ","The cost of the transaction is calculated as `gas * gas fee + value`, where:"," - `gas` is the amount of gas needed for transaction to execute,"," - `gas fee` is the gas fee,"," - `value` is the amount of ether to send to the recipient."],name:"InsufficientFundsError"})}};Object.defineProperty(oe,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/insufficient funds|exceeds transaction sender account balance/});var se=class extends u{constructor({cause:t,gas:n}={}){super(`The amount of gas ${n?`(${n}) `:""}provided for the transaction exceeds the limit allowed for the block.`,{cause:t,name:"IntrinsicGasTooHighError"})}};Object.defineProperty(se,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too high|gas limit reached/});var ie=class extends u{constructor({cause:t,gas:n}={}){super(`The amount of gas ${n?`(${n}) `:""}provided for the transaction is too low.`,{cause:t,name:"IntrinsicGasTooLowError"})}};Object.defineProperty(ie,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too low/});var ae=class extends u{constructor({cause:t}){super("The transaction type is not supported for this chain.",{cause:t,name:"TransactionTypeNotSupportedError"})}};Object.defineProperty(ae,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/transaction type not valid/});var D=class extends u{constructor({cause:t,maxPriorityFeePerGas:n,maxFeePerGas:r}={}){super([`The provided tip (\`maxPriorityFeePerGas\`${n?` = ${z(n)} gwei`:""}) cannot be higher than the fee cap (\`maxFeePerGas\`${r?` = ${z(r)} gwei`:""}).`].join(`
29
+ `),{cause:t,name:"TipAboveFeeCapError"})}};Object.defineProperty(D,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max priority fee per gas higher than max fee per gas|tip higher than fee cap/});var ue=class extends u{constructor({cause:t}){super(`An error occurred while executing: ${t?.shortMessage}`,{cause:t,name:"UnknownNodeError"})}};var Ae=class extends u{constructor({body:t,cause:n,details:r,headers:o,status:i,url:s}){super("HTTP request failed.",{cause:n,details:r,metaMessages:[i&&`Status: ${i}`,`URL: ${$e(s)}`,t&&`Request body: ${Q(t)}`].filter(Boolean),name:"HttpRequestError"}),Object.defineProperty(this,"body",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"headers",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"status",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"url",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.body=t,this.headers=o,this.status=i,this.url=s}};function zr(e,t){let n=(e.details||"").toLowerCase(),r=e instanceof u?e.walk(o=>o?.code===C.code):e;return r instanceof u?new C({cause:e,message:r.details}):C.nodeMessage.test(n)?new C({cause:e,message:e.details}):L.nodeMessage.test(n)?new L({cause:e,maxFeePerGas:t?.maxFeePerGas}):ee.nodeMessage.test(n)?new ee({cause:e,maxFeePerGas:t?.maxFeePerGas}):te.nodeMessage.test(n)?new te({cause:e,nonce:t?.nonce}):ne.nodeMessage.test(n)?new ne({cause:e,nonce:t?.nonce}):re.nodeMessage.test(n)?new re({cause:e,nonce:t?.nonce}):oe.nodeMessage.test(n)?new oe({cause:e}):se.nodeMessage.test(n)?new se({cause:e,gas:t?.gas}):ie.nodeMessage.test(n)?new ie({cause:e,gas:t?.gas}):ae.nodeMessage.test(n)?new ae({cause:e}):D.nodeMessage.test(n)?new D({cause:e,maxFeePerGas:t?.maxFeePerGas,maxPriorityFeePerGas:t?.maxPriorityFeePerGas}):new ue({cause:e})}function Cr(e,{docsPath:t,...n}){let r=(()=>{let o=zr(e,n);return o instanceof ue?e:o})();return new vt(r,{docsPath:t,...n})}function Rr(e,{format:t}){if(!t)return{};let n={};function r(i){let s=Object.keys(i);for(let a of s)a in e&&(n[a]=e[a]),i[a]&&typeof i[a]=="object"&&!Array.isArray(i[a])&&r(i[a])}let o=t(e||{});return r(o),n}var Go={legacy:"0x0",eip2930:"0x1",eip1559:"0x2",eip4844:"0x3",eip7702:"0x4"};function jr(e){let t={};return typeof e.authorizationList<"u"&&(t.authorizationList=Vo(e.authorizationList)),typeof e.accessList<"u"&&(t.accessList=e.accessList),typeof e.blobVersionedHashes<"u"&&(t.blobVersionedHashes=e.blobVersionedHashes),typeof e.blobs<"u"&&(typeof e.blobs[0]!="string"?t.blobs=e.blobs.map(n=>P(n)):t.blobs=e.blobs),typeof e.data<"u"&&(t.data=e.data),typeof e.from<"u"&&(t.from=e.from),typeof e.gas<"u"&&(t.gas=y(e.gas)),typeof e.gasPrice<"u"&&(t.gasPrice=y(e.gasPrice)),typeof e.maxFeePerBlobGas<"u"&&(t.maxFeePerBlobGas=y(e.maxFeePerBlobGas)),typeof e.maxFeePerGas<"u"&&(t.maxFeePerGas=y(e.maxFeePerGas)),typeof e.maxPriorityFeePerGas<"u"&&(t.maxPriorityFeePerGas=y(e.maxPriorityFeePerGas)),typeof e.nonce<"u"&&(t.nonce=y(e.nonce)),typeof e.to<"u"&&(t.to=e.to),typeof e.type<"u"&&(t.type=Go[e.type]),typeof e.value<"u"&&(t.value=y(e.value)),t}function Vo(e){return e.map(t=>({address:t.contractAddress,r:t.r,s:t.s,chainId:y(t.chainId),nonce:y(t.nonce),...typeof t.yParity<"u"?{yParity:y(t.yParity)}:{},...typeof t.v<"u"&&typeof t.yParity>"u"?{v:y(t.v)}:{}}))}function Ur(){let e=()=>{},t=()=>{};return{promise:new Promise((r,o)=>{e=r,t=o}),resolve:e,reject:t}}var en=new Map;function Fr({fn:e,id:t,shouldSplitBatch:n,wait:r=0,sort:o}){let i=async()=>{let d=c();s();let l=d.map(({args:m})=>m);l.length!==0&&e(l).then(m=>{o&&Array.isArray(m)&&m.sort(o);for(let f=0;f<d.length;f++){let{resolve:b}=d[f];b?.([m[f],m])}}).catch(m=>{for(let f=0;f<d.length;f++){let{reject:b}=d[f];b?.(m)}})},s=()=>en.delete(t),a=()=>c().map(({args:d})=>d),c=()=>en.get(t)||[],p=d=>en.set(t,[...c(),d]);return{flush:s,async schedule(d){let{promise:l,resolve:m,reject:f}=Ur();return n?.([...a(),d])&&i(),c().length>0?(p({args:d,resolve:m,reject:f}),l):(p({args:d,resolve:m,reject:f}),setTimeout(i,r),l)}}}function Lr(e){if(!(!e||e.length===0))return e.reduce((t,{slot:n,value:r})=>{if(n.length!==66)throw new be({size:n.length,targetSize:66,type:"hex"});if(r.length!==66)throw new be({size:r.length,targetSize:66,type:"hex"});return t[n]=r,t},{})}function Wo(e){let{balance:t,nonce:n,state:r,stateDiff:o,code:i}=e,s={};if(i!==void 0&&(s.code=i),t!==void 0&&(s.balance=y(t)),n!==void 0&&(s.nonce=y(n)),r!==void 0&&(s.state=Lr(r)),o!==void 0){if(s.state)throw new gt;s.stateDiff=Lr(o)}return s}function Dr(e){if(!e)return;let t={};for(let{address:n,...r}of e){if(!g(n,{strict:!1}))throw new I({address:n});if(t[n])throw new xt({address:n});t[n]=Wo(r)}return t}var Rc=2n**(8n-1n)-1n,jc=2n**(16n-1n)-1n,Uc=2n**(24n-1n)-1n,Fc=2n**(32n-1n)-1n,Lc=2n**(40n-1n)-1n,Dc=2n**(48n-1n)-1n,Nc=2n**(56n-1n)-1n,Hc=2n**(64n-1n)-1n,_c=2n**(72n-1n)-1n,Gc=2n**(80n-1n)-1n,Vc=2n**(88n-1n)-1n,Wc=2n**(96n-1n)-1n,Zc=2n**(104n-1n)-1n,Kc=2n**(112n-1n)-1n,Xc=2n**(120n-1n)-1n,Jc=2n**(128n-1n)-1n,Yc=2n**(136n-1n)-1n,qc=2n**(144n-1n)-1n,Qc=2n**(152n-1n)-1n,ep=2n**(160n-1n)-1n,tp=2n**(168n-1n)-1n,np=2n**(176n-1n)-1n,rp=2n**(184n-1n)-1n,op=2n**(192n-1n)-1n,sp=2n**(200n-1n)-1n,ip=2n**(208n-1n)-1n,ap=2n**(216n-1n)-1n,up=2n**(224n-1n)-1n,cp=2n**(232n-1n)-1n,pp=2n**(240n-1n)-1n,dp=2n**(248n-1n)-1n,fp=2n**(256n-1n)-1n,lp=-(2n**(8n-1n)),mp=-(2n**(16n-1n)),yp=-(2n**(24n-1n)),bp=-(2n**(32n-1n)),hp=-(2n**(40n-1n)),xp=-(2n**(48n-1n)),gp=-(2n**(56n-1n)),wp=-(2n**(64n-1n)),vp=-(2n**(72n-1n)),$p=-(2n**(80n-1n)),Ap=-(2n**(88n-1n)),Pp=-(2n**(96n-1n)),Ip=-(2n**(104n-1n)),Sp=-(2n**(112n-1n)),Mp=-(2n**(120n-1n)),Ep=-(2n**(128n-1n)),Tp=-(2n**(136n-1n)),Bp=-(2n**(144n-1n)),kp=-(2n**(152n-1n)),Op=-(2n**(160n-1n)),zp=-(2n**(168n-1n)),Cp=-(2n**(176n-1n)),Rp=-(2n**(184n-1n)),jp=-(2n**(192n-1n)),Up=-(2n**(200n-1n)),Fp=-(2n**(208n-1n)),Lp=-(2n**(216n-1n)),Dp=-(2n**(224n-1n)),Np=-(2n**(232n-1n)),Hp=-(2n**(240n-1n)),_p=-(2n**(248n-1n)),Gp=-(2n**(256n-1n)),Vp=2n**8n-1n,Wp=2n**16n-1n,Zp=2n**24n-1n,Kp=2n**32n-1n,Xp=2n**40n-1n,Jp=2n**48n-1n,Yp=2n**56n-1n,qp=2n**64n-1n,Qp=2n**72n-1n,e0=2n**80n-1n,t0=2n**88n-1n,n0=2n**96n-1n,r0=2n**104n-1n,o0=2n**112n-1n,s0=2n**120n-1n,i0=2n**128n-1n,a0=2n**136n-1n,u0=2n**144n-1n,c0=2n**152n-1n,p0=2n**160n-1n,d0=2n**168n-1n,f0=2n**176n-1n,l0=2n**184n-1n,m0=2n**192n-1n,y0=2n**200n-1n,b0=2n**208n-1n,h0=2n**216n-1n,x0=2n**224n-1n,g0=2n**232n-1n,w0=2n**240n-1n,v0=2n**248n-1n,Nr=2n**256n-1n;function Hr(e){let{account:t,gasPrice:n,maxFeePerGas:r,maxPriorityFeePerGas:o,to:i}=e,s=t?W(t):void 0;if(s&&!g(s.address))throw new I({address:s.address});if(i&&!g(i))throw new I({address:i});if(typeof n<"u"&&(typeof r<"u"||typeof o<"u"))throw new wt;if(r&&r>Nr)throw new L({maxFeePerGas:r});if(o&&r&&o>r)throw new D({maxFeePerGas:r,maxPriorityFeePerGas:o})}async function _r(e,t){let{account:n=e.account,batch:r=!!e.batch?.multicall,blockNumber:o,blockTag:i="latest",accessList:s,blobs:a,code:c,data:p,factory:d,factoryData:l,gas:m,gasPrice:f,maxFeePerBlobGas:b,maxFeePerGas:w,maxPriorityFeePerGas:ce,nonce:pe,to:M,value:Pe,stateOverride:Vr,...Wr}=t,tn=n?W(n):void 0;if(c&&(d||l))throw new u("Cannot provide both `code` & `factory`/`factoryData` as parameters.");if(c&&M)throw new u("Cannot provide both `code` & `to` as parameters.");let nn=c&&p,rn=d&&l&&M&&p,on=nn||rn,Zr=nn?Xo({code:c,data:p}):rn?Jo({data:p,factory:d,factoryData:l,to:M}):p;try{Hr(t);let G=(o?y(o):void 0)||i,de=Dr(Vr),Ie=e.chain?.formatters?.transactionRequest?.format,Se=(Ie||jr)({...Rr(Wr,{format:Ie}),from:tn?.address,accessList:s,blobs:a,data:Zr,gas:m,gasPrice:f,maxFeePerBlobGas:b,maxFeePerGas:w,maxPriorityFeePerGas:ce,nonce:pe,to:on?void 0:M,value:Pe});if(r&&Zo({request:Se})&&!de)try{return await Ko(e,{...Se,blockNumber:o,blockTag:i})}catch(Et){if(!(Et instanceof fe)&&!(Et instanceof N))throw Et}let sn=await e.request({method:"eth_call",params:de?[Se,G,de]:[Se,G]});return sn==="0x"?{data:void 0}:{data:sn}}catch(Mt){let G=Yo(Mt),{offchainLookup:de,offchainLookupSignature:Ie}=await import("./ccip-7WYWVY5O.js");if(e.ccipRead!==!1&&G?.slice(0,10)===Ie&&M)return{data:await de(e,{data:G,to:M})};throw on&&G?.slice(0,10)==="0x101bb98d"?new $t({factory:d}):Cr(Mt,{...t,account:tn,chain:e.chain})}}function Zo({request:e}){let{data:t,to:n,...r}=e;return!(!t||t.startsWith(Dn)||!n||Object.values(r).filter(o=>typeof o<"u").length>0)}async function Ko(e,t){let{batchSize:n=1024,wait:r=0}=typeof e.batch?.multicall=="object"?e.batch.multicall:{},{blockNumber:o,blockTag:i="latest",data:s,multicallAddress:a,to:c}=t,p=a;if(!p){if(!e.chain)throw new fe;p=Or({blockNumber:o,chain:e.chain,contract:"multicall3"})}let l=(o?y(o):void 0)||i,{schedule:m}=Fr({id:`${e.uid}.${l}`,wait:r,shouldSplitBatch(w){return w.reduce((pe,{data:M})=>pe+(M.length-2),0)>n*2},fn:async w=>{let ce=w.map(Pe=>({allowFailure:!0,callData:Pe.data,target:Pe.to})),pe=kr({abi:Ut,args:[ce],functionName:"aggregate3"}),M=await e.request({method:"eth_call",params:[{data:pe,to:p},l]});return Er({abi:Ut,args:[ce],functionName:"aggregate3",data:M||"0x"})}}),[{returnData:f,success:b}]=await m({data:s,to:c});if(!b)throw new At({data:f});return f==="0x"?{data:void 0}:{data:f}}function Xo(e){let{code:t,data:n}=e;return Qt({abi:_e(["constructor(bytes, bytes)"]),bytecode:Nn,args:[t,n]})}function Jo(e){let{data:t,factory:n,factoryData:r,to:o}=e;return Qt({abi:_e(["constructor(address, bytes, address, bytes)"]),bytecode:Hn,args:[o,t,n,r]})}function Yo(e){if(!(e instanceof u))return;let t=e.walk();return typeof t?.data=="object"?t.data?.data:t.data}var Pt=class extends u{constructor({callbackSelector:t,cause:n,data:r,extraData:o,sender:i,urls:s}){super(n.shortMessage||"An error occurred while fetching for an offchain result.",{cause:n,metaMessages:[...n.metaMessages||[],n.metaMessages?.length?"":[],"Offchain Gateway Call:",s&&[" Gateway URL(s):",...s.map(a=>` ${$e(a)}`)],` Sender: ${i}`,` Data: ${r}`,` Callback selector: ${t}`,` Extra data: ${o}`].flat(),name:"OffchainLookupError"})}},It=class extends u{constructor({result:t,url:n}){super("Offchain gateway response is malformed. Response data must be a hex value.",{metaMessages:[`Gateway URL: ${$e(n)}`,`Response: ${Q(t)}`],name:"OffchainLookupResponseMalformedError"})}},St=class extends u{constructor({sender:t,to:n}){super("Reverted sender address does not match target contract address (`to`).",{metaMessages:[`Contract address: ${n}`,`OffchainLookup sender address: ${t}`],name:"OffchainLookupSenderMismatchError"})}};function Gr(e,t){if(!g(e,{strict:!1}))throw new I({address:e});if(!g(t,{strict:!1}))throw new I({address:t});return e.toLowerCase()===t.toLowerCase()}var fd="0x556f1830",qo={name:"OffchainLookup",type:"error",inputs:[{name:"sender",type:"address"},{name:"urls",type:"string[]"},{name:"callData",type:"bytes"},{name:"callbackFunction",type:"bytes4"},{name:"extraData",type:"bytes"}]};async function ld(e,{blockNumber:t,blockTag:n,data:r,to:o}){let{args:i}=gr({data:r,abi:[qo]}),[s,a,c,p,d]=i,{ccipRead:l}=e,m=l&&typeof l?.request=="function"?l.request:Qo;try{if(!Gr(o,s))throw new St({sender:s,to:o});let f=await m({data:c,sender:s,urls:a}),{data:b}=await _r(e,{blockNumber:t,blockTag:n,data:O([p,Y([{type:"bytes"},{type:"bytes"}],[f,d])]),to:o});return b}catch(f){throw new Pt({callbackSelector:p,cause:f,data:r,extraData:d,sender:s,urls:a})}}async function Qo({data:e,sender:t,urls:n}){let r=new Error("An unknown error occurred.");for(let o=0;o<n.length;o++){let i=n[o],s=i.includes("{data}")?"GET":"POST",a=s==="POST"?{data:e,sender:t}:void 0,c=s==="POST"?{"Content-Type":"application/json"}:{};try{let p=await fetch(i.replace("{sender}",t).replace("{data}",e),{body:JSON.stringify(a),headers:c,method:s}),d;if(p.headers.get("Content-Type")?.startsWith("application/json")?d=(await p.json()).data:d=await p.text(),!p.ok){r=new Ae({body:a,details:d?.error?Q(d.error):p.statusText,headers:p.headers,status:p.status,url:i});continue}if(!A(d)){r=new It({result:d,url:i});continue}return d}catch(p){r=new Ae({body:a,details:p.message,url:i})}}throw r}export{Qo as ccipRequest,ld as offchainLookup,qo as offchainLookupAbiItem,fd as offchainLookupSignature};
@@ -0,0 +1 @@
1
+ import{Ra as a,Sa as b,Ta as c,Ua as d}from"./chunk-JYRWMYZ2.js";import"./chunk-EZRXHJOM.js";import"./chunk-MYQCVH5Z.js";export{d as ccipRequest,c as offchainLookup,b as offchainLookupAbiItem,a as offchainLookupSignature};
@@ -0,0 +1 @@
1
+ import{g as a,h as b,i as c,j as d}from"./chunk-QOQKSUB7.js";import"./chunk-MYICIF4X.js";import"./chunk-MYQCVH5Z.js";export{d as ccipRequest,c as offchainLookup,b as offchainLookupAbiItem,a as offchainLookupSignature};
@@ -0,0 +1 @@
1
+ import{g as a,h as b,i as c,j as d}from"./chunk-WYVJ6QLD.js";import"./chunk-FK7PQ7YB.js";import"./chunk-MYQCVH5Z.js";export{d as ccipRequest,c as offchainLookup,b as offchainLookupAbiItem,a as offchainLookupSignature};
@@ -0,0 +1,11 @@
1
+ import{f as e}from"./chunk-OKQEFB6X.js";import"./chunk-MYQCVH5Z.js";var o=e`<svg
2
+ width="28"
3
+ height="28"
4
+ viewBox="0 0 28 28" fill="none" xmlns="http://www.w3.org/2000/svg">
5
+ <path
6
+ fill-rule="evenodd"
7
+ clip-rule="evenodd"
8
+ d="M25.5297 4.92733C26.1221 5.4242 26.1996 6.30724 25.7027 6.89966L12.2836 22.8997C12.0316 23.2001 11.6652 23.3811 11.2735 23.3986C10.8817 23.4161 10.5006 23.2686 10.2228 22.9919L2.38218 15.1815C1.83439 14.6358 1.83268 13.7494 2.37835 13.2016C2.92403 12.6538 3.81046 12.6521 4.35825 13.1978L11.1183 19.9317L23.5573 5.10036C24.0542 4.50794 24.9372 4.43047 25.5297 4.92733Z"
9
+ fill="currentColor"/>
10
+ </svg>
11
+ `;export{o as checkmarkSvg};
@@ -0,0 +1,8 @@
1
+ import{f as e}from"./chunk-OKQEFB6X.js";import"./chunk-MYQCVH5Z.js";var o=e`<svg fill="none" viewBox="0 0 14 14">
2
+ <path
3
+ fill="currentColor"
4
+ fill-rule="evenodd"
5
+ d="M12.9576 2.23383C13.3807 2.58873 13.4361 3.21947 13.0812 3.64263L6.37159 11.6426C6.19161 11.8572 5.92989 11.9865 5.65009 11.999C5.3703 12.0115 5.09808 11.9062 4.89965 11.7085L0.979321 7.80331C0.588042 7.41354 0.586817 6.78038 0.976585 6.3891C1.36635 5.99782 1.99952 5.99659 2.3908 6.38636L5.53928 9.52268L11.5488 2.35742C11.9037 1.93426 12.5344 1.87893 12.9576 2.23383Z"
6
+ clip-rule="evenodd"
7
+ />
8
+ </svg>`;export{o as checkmarkBoldSvg};
@@ -0,0 +1,8 @@
1
+ import{f as o}from"./chunk-OKQEFB6X.js";import"./chunk-MYQCVH5Z.js";var e=o`<svg fill="none" viewBox="0 0 16 16">
2
+ <path
3
+ fill="currentColor"
4
+ fill-rule="evenodd"
5
+ d="M1.46 4.96a1 1 0 0 1 1.41 0L8 10.09l5.13-5.13a1 1 0 1 1 1.41 1.41l-5.83 5.84a1 1 0 0 1-1.42 0L1.46 6.37a1 1 0 0 1 0-1.41Z"
6
+ clip-rule="evenodd"
7
+ />
8
+ </svg>`;export{e as chevronBottomSvg};
@@ -0,0 +1,8 @@
1
+ import{f as e}from"./chunk-OKQEFB6X.js";import"./chunk-MYQCVH5Z.js";var o=e`<svg fill="none" viewBox="0 0 16 16">
2
+ <path
3
+ fill="currentColor"
4
+ fill-rule="evenodd"
5
+ d="M11.04 1.46a1 1 0 0 1 0 1.41L5.91 8l5.13 5.13a1 1 0 1 1-1.41 1.41L3.79 8.71a1 1 0 0 1 0-1.42l5.84-5.83a1 1 0 0 1 1.41 0Z"
6
+ clip-rule="evenodd"
7
+ />
8
+ </svg>`;export{o as chevronLeftSvg};
@@ -0,0 +1,8 @@
1
+ import{f as l}from"./chunk-OKQEFB6X.js";import"./chunk-MYQCVH5Z.js";var o=l`<svg fill="none" viewBox="0 0 16 16">
2
+ <path
3
+ fill="currentColor"
4
+ fill-rule="evenodd"
5
+ d="M4.96 14.54a1 1 0 0 1 0-1.41L10.09 8 4.96 2.87a1 1 0 0 1 1.41-1.41l5.84 5.83a1 1 0 0 1 0 1.42l-5.84 5.83a1 1 0 0 1-1.41 0Z"
6
+ clip-rule="evenodd"
7
+ />
8
+ </svg>`;export{o as chevronRightSvg};
@@ -0,0 +1,8 @@
1
+ import{f as l}from"./chunk-OKQEFB6X.js";import"./chunk-MYQCVH5Z.js";var e=l`<svg fill="none" viewBox="0 0 16 16">
2
+ <path
3
+ fill="currentColor"
4
+ fill-rule="evenodd"
5
+ d="M14.54 11.04a1 1 0 0 1-1.41 0L8 5.92l-5.13 5.12a1 1 0 1 1-1.41-1.41l5.83-5.84a1 1 0 0 1 1.42 0l5.83 5.84a1 1 0 0 1 0 1.41Z"
6
+ clip-rule="evenodd"
7
+ />
8
+ </svg>`;export{e as chevronTopSvg};
@@ -0,0 +1,61 @@
1
+ import{f as t}from"./chunk-OKQEFB6X.js";import"./chunk-MYQCVH5Z.js";var o=t`<svg width="36" height="36" fill="none">
2
+ <path
3
+ fill="#fff"
4
+ fill-opacity=".05"
5
+ d="M0 14.94c0-5.55 0-8.326 1.182-10.4a9 9 0 0 1 3.359-3.358C6.614 0 9.389 0 14.94 0h6.12c5.55 0 8.326 0 10.4 1.182a9 9 0 0 1 3.358 3.359C36 6.614 36 9.389 36 14.94v6.12c0 5.55 0 8.326-1.182 10.4a9 9 0 0 1-3.359 3.358C29.386 36 26.611 36 21.06 36h-6.12c-5.55 0-8.326 0-10.4-1.182a9 9 0 0 1-3.358-3.359C0 29.386 0 26.611 0 21.06v-6.12Z"
6
+ />
7
+ <path
8
+ stroke="#fff"
9
+ stroke-opacity=".05"
10
+ d="M14.94.5h6.12c2.785 0 4.84 0 6.46.146 1.612.144 2.743.43 3.691.97a8.5 8.5 0 0 1 3.172 3.173c.541.948.826 2.08.971 3.692.145 1.62.146 3.675.146 6.459v6.12c0 2.785 0 4.84-.146 6.46-.145 1.612-.43 2.743-.97 3.691a8.5 8.5 0 0 1-3.173 3.172c-.948.541-2.08.826-3.692.971-1.62.145-3.674.146-6.459.146h-6.12c-2.784 0-4.84 0-6.46-.146-1.612-.145-2.743-.43-3.691-.97a8.5 8.5 0 0 1-3.172-3.173c-.541-.948-.827-2.08-.971-3.692C.5 25.9.5 23.845.5 21.06v-6.12c0-2.784 0-4.84.146-6.46.144-1.612.43-2.743.97-3.691A8.5 8.5 0 0 1 4.79 1.617C5.737 1.076 6.869.79 8.48.646 10.1.5 12.156.5 14.94.5Z"
11
+ />
12
+ <path
13
+ fill="url(#a)"
14
+ d="M17.998 10.8h12.469a14.397 14.397 0 0 0-24.938.001l6.234 10.798.006-.001a7.19 7.19 0 0 1 6.23-10.799Z"
15
+ />
16
+ <path
17
+ fill="url(#b)"
18
+ d="m24.237 21.598-6.234 10.798A14.397 14.397 0 0 0 30.47 10.798H18.002l-.002.006a7.191 7.191 0 0 1 6.237 10.794Z"
19
+ />
20
+ <path
21
+ fill="url(#c)"
22
+ d="M11.765 21.601 5.531 10.803A14.396 14.396 0 0 0 18.001 32.4l6.235-10.798-.004-.004a7.19 7.19 0 0 1-12.466.004Z"
23
+ />
24
+ <path fill="#fff" d="M18 25.2a7.2 7.2 0 1 0 0-14.4 7.2 7.2 0 0 0 0 14.4Z" />
25
+ <path fill="#1A73E8" d="M18 23.7a5.7 5.7 0 1 0 0-11.4 5.7 5.7 0 0 0 0 11.4Z" />
26
+ <defs>
27
+ <linearGradient
28
+ id="a"
29
+ x1="6.294"
30
+ x2="41.1"
31
+ y1="5.995"
32
+ y2="5.995"
33
+ gradientUnits="userSpaceOnUse"
34
+ >
35
+ <stop stop-color="#D93025" />
36
+ <stop offset="1" stop-color="#EA4335" />
37
+ </linearGradient>
38
+ <linearGradient
39
+ id="b"
40
+ x1="20.953"
41
+ x2="37.194"
42
+ y1="32.143"
43
+ y2="2.701"
44
+ gradientUnits="userSpaceOnUse"
45
+ >
46
+ <stop stop-color="#FCC934" />
47
+ <stop offset="1" stop-color="#FBBC04" />
48
+ </linearGradient>
49
+ <linearGradient
50
+ id="c"
51
+ x1="25.873"
52
+ x2="9.632"
53
+ y1="31.2"
54
+ y2="1.759"
55
+ gradientUnits="userSpaceOnUse"
56
+ >
57
+ <stop stop-color="#1E8E3E" />
58
+ <stop offset="1" stop-color="#34A853" />
59
+ </linearGradient>
60
+ </defs>
61
+ </svg>`;export{o as chromeStoreSvg};
@@ -0,0 +1 @@
1
+ import{c as u,i as b,j as k,l as y,w as S,y as C,z as t}from"./chunk-Z3OIWTR5.js";import{g as m,h as T,i as n,o as s,s as i,u as h}from"./chunk-JYRWMYZ2.js";var D=t({id:421614,name:"Arbitrum Sepolia",blockTime:250,nativeCurrency:{name:"Arbitrum Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia-rollup.arbitrum.io/rpc"]}},blockExplorers:{default:{name:"Arbiscan",url:"https://sepolia.arbiscan.io",apiUrl:"https://api-sepolia.arbiscan.io/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:81930}},testnet:!0});var v={gasPriceOracle:{address:"0x420000000000000000000000000000000000000F"},l1Block:{address:"0x4200000000000000000000000000000000000015"},l2CrossDomainMessenger:{address:"0x4200000000000000000000000000000000000007"},l2Erc721Bridge:{address:"0x4200000000000000000000000000000000000014"},l2StandardBridge:{address:"0x4200000000000000000000000000000000000010"},l2ToL1MessagePasser:{address:"0x4200000000000000000000000000000000000016"}};var g={block:y({format(o){return{transactions:o.transactions?.map(r=>{if(typeof r=="string")return r;let p=b(r);return p.typeHex==="0x7e"&&(p.isSystemTx=r.isSystemTx,p.mint=r.mint?m(r.mint):void 0,p.sourceHash=r.sourceHash,p.type="deposit"),p}),stateRoot:o.stateRoot}}}),transaction:k({format(o){let e={};return o.type==="0x7e"&&(e.isSystemTx=o.isSystemTx,e.mint=o.mint?m(o.mint):void 0,e.sourceHash=o.sourceHash,e.type="deposit"),e}}),transactionReceipt:S({format(o){return{...o.depositNonce?{depositNonce:m(o.depositNonce)}:{},...o.depositReceiptVersion?{depositReceiptVersion:T(o.depositReceiptVersion)}:{},l1GasPrice:o.l1GasPrice?m(o.l1GasPrice):null,l1GasUsed:o.l1GasUsed?m(o.l1GasUsed):null,l1Fee:o.l1Fee?m(o.l1Fee):null,l1FeeScalar:o.l1FeeScalar?Number(o.l1FeeScalar):null}}})};function N(o,e){return P(o)?F(o):C(o,e)}var z={transaction:N};function F(o){j(o);let{sourceHash:e,data:r,from:p,gas:l,isSystemTx:E,mint:c,to:M,value:d}=o,B=[e,p,M??"0x",c?n(c):"0x",d?n(d):"0x",l?n(l):"0x",E?"0x1":"0x",r??"0x"];return h(["0x7e",u(B)])}function P(o){return o.type==="deposit"||typeof o.sourceHash<"u"}function j(o){let{from:e,to:r}=o;if(e&&!i(e))throw new s({address:e});if(r&&!i(r))throw new s({address:r})}var a={blockTime:2e3,contracts:v,formatters:g,serializers:z};var f=11155111,w=t({...a,id:84532,network:"base-sepolia",name:"Base Sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia.base.org"]}},blockExplorers:{default:{name:"Basescan",url:"https://sepolia.basescan.org",apiUrl:"https://api-sepolia.basescan.org/api"}},contracts:{...a.contracts,disputeGameFactory:{[f]:{address:"0xd6E6dBf4F7EA0ac412fD8b65ED297e64BB7a06E1"}},l2OutputOracle:{[f]:{address:"0x84457ca9D0163FbC4bbfe4Dfbb20ba46e48DF254"}},portal:{[f]:{address:"0x49f53e41452c74589e85ca1677426ba426459e85",blockCreated:4446677}},l1StandardBridge:{[f]:{address:"0xfd0Bf71F60660E2f608ed56e1659C450eB113120",blockCreated:4446677}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1059647}},testnet:!0,sourceId:f}),H=t({...w,experimental_preconfirmationTime:200,rpcUrls:{default:{http:["https://sepolia-preconf.base.org"]}}});var x=11155111,A=t({...a,id:11155420,name:"OP Sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia.optimism.io"]}},blockExplorers:{default:{name:"Blockscout",url:"https://optimism-sepolia.blockscout.com",apiUrl:"https://optimism-sepolia.blockscout.com/api"}},contracts:{...a.contracts,disputeGameFactory:{[x]:{address:"0x05F9613aDB30026FFd634f38e5C4dFd30a197Fa1"}},l2OutputOracle:{[x]:{address:"0x90E9c4f8a994a250F6aEfd61CAFb4F2e895D458F"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1620204},portal:{[x]:{address:"0x16Fc5058F25648194471939df75CF27A2fdC48BC"}},l1StandardBridge:{[x]:{address:"0xFBb0621E0B23b5478B630BD55a5f21f67730B0F1"}}},testnet:!0,sourceId:x});var G=t({id:80002,name:"Polygon Amoy",nativeCurrency:{name:"POL",symbol:"POL",decimals:18},rpcUrls:{default:{http:["https://polygon-amoy.drpc.org"]}},blockExplorers:{default:{name:"PolygonScan",url:"https://amoy.polygonscan.com",apiUrl:"https://api.etherscan.io/v2/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:3127388}},testnet:!0});var L=t({id:11155111,name:"Sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://11155111.rpc.thirdweb.com"]}},blockExplorers:{default:{name:"Etherscan",url:"https://sepolia.etherscan.io",apiUrl:"https://api-sepolia.etherscan.io/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:751532},ensUniversalResolver:{address:"0xeeeeeeee14d718c2b47d9923deab1335e144eeee",blockCreated:8928790}},testnet:!0});export{D as a,w as b,A as c,G as d,L as e};
@@ -0,0 +1,20 @@
1
+ import{a as Yt,b as M,c as Le,d as R,e as U,f as Zt}from"./chunk-MYQCVH5Z.js";var Se=M((wn,Ae)=>{"use strict";var k=typeof Reflect=="object"?Reflect:null,Ze=k&&typeof k.apply=="function"?k.apply:function(t,r,n){return Function.prototype.apply.call(t,r,n)},ne;k&&typeof k.ownKeys=="function"?ne=k.ownKeys:Object.getOwnPropertySymbols?ne=function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:ne=function(t){return Object.getOwnPropertyNames(t)};function Qt(e){console&&console.warn&&console.warn(e)}var et=Number.isNaN||function(t){return t!==t};function g(){g.init.call(this)}Ae.exports=g;Ae.exports.once=nr;g.EventEmitter=g;g.prototype._events=void 0;g.prototype._eventsCount=0;g.prototype._maxListeners=void 0;var Qe=10;function oe(e){if(typeof e!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}Object.defineProperty(g,"defaultMaxListeners",{enumerable:!0,get:function(){return Qe},set:function(e){if(typeof e!="number"||e<0||et(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");Qe=e}});g.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0};g.prototype.setMaxListeners=function(t){if(typeof t!="number"||t<0||et(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this};function tt(e){return e._maxListeners===void 0?g.defaultMaxListeners:e._maxListeners}g.prototype.getMaxListeners=function(){return tt(this)};g.prototype.emit=function(t){for(var r=[],n=1;n<arguments.length;n++)r.push(arguments[n]);var o=t==="error",i=this._events;if(i!==void 0)o=o&&i.error===void 0;else if(!o)return!1;if(o){var a;if(r.length>0&&(a=r[0]),a instanceof Error)throw a;var h=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw h.context=a,h}var c=i[t];if(c===void 0)return!1;if(typeof c=="function")Ze(c,this,r);else for(var u=c.length,p=st(c,u),n=0;n<u;++n)Ze(p[n],this,r);return!0};function rt(e,t,r,n){var o,i,a;if(oe(r),i=e._events,i===void 0?(i=e._events=Object.create(null),e._eventsCount=0):(i.newListener!==void 0&&(e.emit("newListener",t,r.listener?r.listener:r),i=e._events),a=i[t]),a===void 0)a=i[t]=r,++e._eventsCount;else if(typeof a=="function"?a=i[t]=n?[r,a]:[a,r]:n?a.unshift(r):a.push(r),o=tt(e),o>0&&a.length>o&&!a.warned){a.warned=!0;var h=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");h.name="MaxListenersExceededWarning",h.emitter=e,h.type=t,h.count=a.length,Qt(h)}return e}g.prototype.addListener=function(t,r){return rt(this,t,r,!1)};g.prototype.on=g.prototype.addListener;g.prototype.prependListener=function(t,r){return rt(this,t,r,!0)};function er(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function nt(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},o=er.bind(n);return o.listener=r,n.wrapFn=o,o}g.prototype.once=function(t,r){return oe(r),this.on(t,nt(this,t,r)),this};g.prototype.prependOnceListener=function(t,r){return oe(r),this.prependListener(t,nt(this,t,r)),this};g.prototype.removeListener=function(t,r){var n,o,i,a,h;if(oe(r),o=this._events,o===void 0)return this;if(n=o[t],n===void 0)return this;if(n===r||n.listener===r)--this._eventsCount===0?this._events=Object.create(null):(delete o[t],o.removeListener&&this.emit("removeListener",t,n.listener||r));else if(typeof n!="function"){for(i=-1,a=n.length-1;a>=0;a--)if(n[a]===r||n[a].listener===r){h=n[a].listener,i=a;break}if(i<0)return this;i===0?n.shift():tr(n,i),n.length===1&&(o[t]=n[0]),o.removeListener!==void 0&&this.emit("removeListener",t,h||r)}return this};g.prototype.off=g.prototype.removeListener;g.prototype.removeAllListeners=function(t){var r,n,o;if(n=this._events,n===void 0)return this;if(n.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):n[t]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete n[t]),this;if(arguments.length===0){var i=Object.keys(n),a;for(o=0;o<i.length;++o)a=i[o],a!=="removeListener"&&this.removeAllListeners(a);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(r=n[t],typeof r=="function")this.removeListener(t,r);else if(r!==void 0)for(o=r.length-1;o>=0;o--)this.removeListener(t,r[o]);return this};function ot(e,t,r){var n=e._events;if(n===void 0)return[];var o=n[t];return o===void 0?[]:typeof o=="function"?r?[o.listener||o]:[o]:r?rr(o):st(o,o.length)}g.prototype.listeners=function(t){return ot(this,t,!0)};g.prototype.rawListeners=function(t){return ot(this,t,!1)};g.listenerCount=function(e,t){return typeof e.listenerCount=="function"?e.listenerCount(t):it.call(e,t)};g.prototype.listenerCount=it;function it(e){var t=this._events;if(t!==void 0){var r=t[e];if(typeof r=="function")return 1;if(r!==void 0)return r.length}return 0}g.prototype.eventNames=function(){return this._eventsCount>0?ne(this._events):[]};function st(e,t){for(var r=new Array(t),n=0;n<t;++n)r[n]=e[n];return r}function tr(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}function rr(e){for(var t=new Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}function nr(e,t){return new Promise(function(r,n){function o(a){e.removeListener(t,i),n(a)}function i(){typeof e.removeListener=="function"&&e.removeListener("error",o),r([].slice.call(arguments))}at(e,t,i,{once:!0}),t!=="error"&&or(e,o,{once:!0})})}function or(e,t,r){typeof e.on=="function"&&at(e,"error",t,r)}function at(e,t,r,n){if(typeof e.on=="function")n.once?e.once(t,r):e.on(t,r);else if(typeof e.addEventListener=="function")e.addEventListener(t,function o(i){n.once&&e.removeEventListener(t,o),r(i)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e)}});var ct=M((_n,ft)=>{"use strict";function ir(e){try{return JSON.stringify(e)}catch{return'"[Circular]"'}}ft.exports=sr;function sr(e,t,r){var n=r&&r.stringify||ir,o=1;if(typeof e=="object"&&e!==null){var i=t.length+o;if(i===1)return e;var a=new Array(i);a[0]=n(e);for(var h=1;h<i;h++)a[h]=n(t[h]);return a.join(" ")}if(typeof e!="string")return e;var c=t.length;if(c===0)return e;for(var u="",p=1-o,l=-1,b=e&&e.length||0,d=0;d<b;){if(e.charCodeAt(d)===37&&d+1<b){switch(l=l>-1?l:0,e.charCodeAt(d+1)){case 100:case 102:if(p>=c||t[p]==null)break;l<d&&(u+=e.slice(l,d)),u+=Number(t[p]),l=d+2,d++;break;case 105:if(p>=c||t[p]==null)break;l<d&&(u+=e.slice(l,d)),u+=Math.floor(Number(t[p])),l=d+2,d++;break;case 79:case 111:case 106:if(p>=c||t[p]===void 0)break;l<d&&(u+=e.slice(l,d));var w=typeof t[p];if(w==="string"){u+="'"+t[p]+"'",l=d+2,d++;break}if(w==="function"){u+=t[p].name||"<anonymous>",l=d+2,d++;break}u+=n(t[p]),l=d+2,d++;break;case 115:if(p>=c)break;l<d&&(u+=e.slice(l,d)),u+=String(t[p]),l=d+2,d++;break;case 37:l<d&&(u+=e.slice(l,d)),u+="%",l=d+2,d++,p--;break}++p}++d}return l===-1?e:(l<b&&(u+=e.slice(l)),u)}});var Ce=M((En,dt)=>{"use strict";var ut=ct();dt.exports=S;var $=vr().console||{},ar={mapHttpRequest:ie,mapHttpResponse:ie,wrapRequestSerializer:Te,wrapResponseSerializer:Te,wrapErrorSerializer:Te,req:ie,res:ie,err:hr};function fr(e,t){return Array.isArray(e)?e.filter(function(n){return n!=="!stdSerializers.err"}):e===!0?Object.keys(t):!1}function S(e){e=e||{},e.browser=e.browser||{};let t=e.browser.transmit;if(t&&typeof t.send!="function")throw Error("pino: transmit option must have a send function");let r=e.browser.write||$;e.browser.write&&(e.browser.asObject=!0);let n=e.serializers||{},o=fr(e.browser.serialize,n),i=e.browser.serialize;Array.isArray(e.browser.serialize)&&e.browser.serialize.indexOf("!stdSerializers.err")>-1&&(i=!1);let a=["error","fatal","warn","info","debug","trace"];typeof r=="function"&&(r.error=r.fatal=r.warn=r.info=r.debug=r.trace=r),e.enabled===!1&&(e.level="silent");let h=e.level||"info",c=Object.create(r);c.log||(c.log=G),Object.defineProperty(c,"levelVal",{get:p}),Object.defineProperty(c,"level",{get:l,set:b});let u={transmit:t,serialize:o,asObject:e.browser.asObject,levels:a,timestamp:dr(e)};c.levels=S.levels,c.level=h,c.setMaxListeners=c.getMaxListeners=c.emit=c.addListener=c.on=c.prependListener=c.once=c.prependOnceListener=c.removeListener=c.removeAllListeners=c.listeners=c.listenerCount=c.eventNames=c.write=c.flush=G,c.serializers=n,c._serialize=o,c._stdErrSerialize=i,c.child=d,t&&(c._logEvent=Pe());function p(){return this.level==="silent"?1/0:this.levels.values[this.level]}function l(){return this._level}function b(w){if(w!=="silent"&&!this.levels.values[w])throw Error("unknown level "+w);this._level=w,V(u,c,"error","log"),V(u,c,"fatal","error"),V(u,c,"warn","error"),V(u,c,"info","log"),V(u,c,"debug","log"),V(u,c,"trace","log")}function d(w,P){if(!w)throw new Error("missing bindings for child Pino");P=P||{},o&&w.serializers&&(P.serializers=w.serializers);let ee=P.serializers;if(o&&ee){var D=Object.assign({},n,ee),q=e.browser.serialize===!0?Object.keys(D):o;delete w.serializers,se([w],q,D,this._stdErrSerialize)}function te(A){this._childLevel=(A._childLevel|0)+1,this.error=F(A,w,"error"),this.fatal=F(A,w,"fatal"),this.warn=F(A,w,"warn"),this.info=F(A,w,"info"),this.debug=F(A,w,"debug"),this.trace=F(A,w,"trace"),D&&(this.serializers=D,this._serialize=q),t&&(this._logEvent=Pe([].concat(A._logEvent.bindings,w)))}return te.prototype=this,new te(this)}return c}S.levels={values:{fatal:60,error:50,warn:40,info:30,debug:20,trace:10},labels:{10:"trace",20:"debug",30:"info",40:"warn",50:"error",60:"fatal"}};S.stdSerializers=ar;S.stdTimeFunctions=Object.assign({},{nullTime:lt,epochTime:ht,unixTime:pr,isoTime:yr});function V(e,t,r,n){let o=Object.getPrototypeOf(t);t[r]=t.levelVal>t.levels.values[r]?G:o[r]?o[r]:$[r]||$[n]||G,cr(e,t,r)}function cr(e,t,r){!e.transmit&&t[r]===G||(t[r]=(function(n){return function(){let i=e.timestamp(),a=new Array(arguments.length),h=Object.getPrototypeOf&&Object.getPrototypeOf(this)===$?$:this;for(var c=0;c<a.length;c++)a[c]=arguments[c];if(e.serialize&&!e.asObject&&se(a,this._serialize,this.serializers,this._stdErrSerialize),e.asObject?n.call(h,ur(this,r,a,i)):n.apply(h,a),e.transmit){let u=e.transmit.level||t.level,p=S.levels.values[u],l=S.levels.values[r];if(l<p)return;lr(this,{ts:i,methodLevel:r,methodValue:l,transmitLevel:u,transmitValue:S.levels.values[e.transmit.level||t.level],send:e.transmit.send,val:t.levelVal},a)}}})(t[r]))}function ur(e,t,r,n){e._serialize&&se(r,e._serialize,e.serializers,e._stdErrSerialize);let o=r.slice(),i=o[0],a={};n&&(a.time=n),a.level=S.levels.values[t];let h=(e._childLevel|0)+1;if(h<1&&(h=1),i!==null&&typeof i=="object"){for(;h--&&typeof o[0]=="object";)Object.assign(a,o.shift());i=o.length?ut(o.shift(),o):void 0}else typeof i=="string"&&(i=ut(o.shift(),o));return i!==void 0&&(a.msg=i),a}function se(e,t,r,n){for(let o in e)if(n&&e[o]instanceof Error)e[o]=S.stdSerializers.err(e[o]);else if(typeof e[o]=="object"&&!Array.isArray(e[o]))for(let i in e[o])t&&t.indexOf(i)>-1&&i in r&&(e[o][i]=r[i](e[o][i]))}function F(e,t,r){return function(){let n=new Array(1+arguments.length);n[0]=t;for(var o=1;o<n.length;o++)n[o]=arguments[o-1];return e[r].apply(this,n)}}function lr(e,t,r){let n=t.send,o=t.ts,i=t.methodLevel,a=t.methodValue,h=t.val,c=e._logEvent.bindings;se(r,e._serialize||Object.keys(e.serializers),e.serializers,e._stdErrSerialize===void 0?!0:e._stdErrSerialize),e._logEvent.ts=o,e._logEvent.messages=r.filter(function(u){return c.indexOf(u)===-1}),e._logEvent.level.label=i,e._logEvent.level.value=a,n(i,e._logEvent,h),e._logEvent=Pe(c)}function Pe(e){return{ts:0,messages:[],bindings:e||[],level:{label:"",value:0}}}function hr(e){let t={type:e.constructor.name,msg:e.message,stack:e.stack};for(let r in e)t[r]===void 0&&(t[r]=e[r]);return t}function dr(e){return typeof e.timestamp=="function"?e.timestamp:e.timestamp===!1?lt:ht}function ie(){return{}}function Te(e){return e}function G(){}function lt(){return!1}function ht(){return Date.now()}function pr(){return Math.round(Date.now()/1e3)}function yr(){return new Date(Date.now()).toISOString()}function vr(){function e(t){return typeof t<"u"&&t}try{return typeof globalThis<"u"||Object.defineProperty(Object.prototype,"globalThis",{get:function(){return delete Object.prototype.globalThis,this.globalThis=this},configurable:!0}),globalThis}catch{return e(self)||e(window)||e(this)||{}}}});var Rt={};Le(Rt,{__assign:()=>Je,__asyncDelegator:()=>Gr,__asyncGenerator:()=>$r,__asyncValues:()=>Wr,__await:()=>Y,__awaiter:()=>kr,__classPrivateFieldGet:()=>Zr,__classPrivateFieldSet:()=>Qr,__createBinding:()=>Fr,__decorate:()=>zr,__exportStar:()=>Jr,__extends:()=>Nr,__generator:()=>Vr,__importDefault:()=>Yr,__importStar:()=>Kr,__makeTemplateObject:()=>Xr,__metadata:()=>Ur,__param:()=>Mr,__read:()=>Ot,__rest:()=>Dr,__spread:()=>Hr,__spreadArrays:()=>qr,__values:()=>He});function Nr(e,t){Fe(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}function Dr(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function zr(e,t,r,n){var o=arguments.length,i=o<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var h=e.length-1;h>=0;h--)(a=e[h])&&(i=(o<3?a(i):o>3?a(t,r,i):a(t,r))||i);return o>3&&i&&Object.defineProperty(t,r,i),i}function Mr(e,t){return function(r,n){t(r,n,e)}}function Ur(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}function kr(e,t,r,n){function o(i){return i instanceof r?i:new r(function(a){a(i)})}return new(r||(r=Promise))(function(i,a){function h(p){try{u(n.next(p))}catch(l){a(l)}}function c(p){try{u(n.throw(p))}catch(l){a(l)}}function u(p){p.done?i(p.value):o(p.value).then(h,c)}u((n=n.apply(e,t||[])).next())})}function Vr(e,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,o,i,a;return a={next:h(0),throw:h(1),return:h(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function h(u){return function(p){return c([u,p])}}function c(u){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,o&&(i=u[0]&2?o.return:u[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,u[1])).done)return i;switch(o=0,i&&(u=[u[0]&2,i.value]),u[0]){case 0:case 1:i=u;break;case 4:return r.label++,{value:u[1],done:!1};case 5:r.label++,o=u[1],u=[0];continue;case 7:u=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!i||u[1]>i[0]&&u[1]<i[3])){r.label=u[1];break}if(u[0]===6&&r.label<i[1]){r.label=i[1],i=u;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(u);break}i[2]&&r.ops.pop(),r.trys.pop();continue}u=t.call(e,r)}catch(p){u=[6,p],o=0}finally{n=i=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}function Fr(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}function Jr(e,t){for(var r in e)r!=="default"&&!t.hasOwnProperty(r)&&(t[r]=e[r])}function He(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Ot(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=n.next()).done;)i.push(o.value)}catch(h){a={error:h}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return i}function Hr(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(Ot(arguments[t]));return e}function qr(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;for(var n=Array(e),o=0,t=0;t<r;t++)for(var i=arguments[t],a=0,h=i.length;a<h;a++,o++)n[o]=i[a];return n}function Y(e){return this instanceof Y?(this.v=e,this):new Y(e)}function $r(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r.apply(e,t||[]),o,i=[];return o={},a("next"),a("throw"),a("return"),o[Symbol.asyncIterator]=function(){return this},o;function a(b){n[b]&&(o[b]=function(d){return new Promise(function(w,P){i.push([b,d,w,P])>1||h(b,d)})})}function h(b,d){try{c(n[b](d))}catch(w){l(i[0][3],w)}}function c(b){b.value instanceof Y?Promise.resolve(b.value.v).then(u,p):l(i[0][2],b)}function u(b){h("next",b)}function p(b){h("throw",b)}function l(b,d){b(d),i.shift(),i.length&&h(i[0][0],i[0][1])}}function Gr(e){var t,r;return t={},n("next"),n("throw",function(o){throw o}),n("return"),t[Symbol.iterator]=function(){return this},t;function n(o,i){t[o]=e[o]?function(a){return(r=!r)?{value:Y(e[o](a)),done:o==="return"}:i?i(a):a}:i}}function Wr(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],r;return t?t.call(e):(e=typeof He=="function"?He(e):e[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(i){r[i]=e[i]&&function(a){return new Promise(function(h,c){a=e[i](a),o(h,c,a.done,a.value)})}}function o(i,a,h,c){Promise.resolve(c).then(function(u){i({value:u,done:h})},a)}}function Xr(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function Kr(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function Yr(e){return e&&e.__esModule?e:{default:e}}function Zr(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function Qr(e,t,r){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,r),r}var Fe,Je,xt=Yt(()=>{"use strict";Fe=function(e,t){return Fe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var o in n)n.hasOwnProperty(o)&&(r[o]=n[o])},Fe(e,t)};Je=function(){return Je=Object.assign||function(t){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},Je.apply(this,arguments)}});var At=M(B=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0});B.isBrowserCryptoAvailable=B.getSubtleCrypto=B.getBrowerCrypto=void 0;function qe(){return globalThis?.crypto||globalThis?.msCrypto||{}}B.getBrowerCrypto=qe;function Lt(){let e=qe();return e.subtle||e.webkitSubtle}B.getSubtleCrypto=Lt;function en(){return!!qe()&&!!Lt()}B.isBrowserCryptoAvailable=en});var Pt=M(I=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0});I.isBrowser=I.isNode=I.isReactNative=void 0;function St(){return typeof document>"u"&&typeof navigator<"u"&&navigator.product==="ReactNative"}I.isReactNative=St;function Tt(){return typeof process<"u"&&typeof process.versions<"u"&&typeof process.versions.node<"u"}I.isNode=Tt;function tn(){return!St()&&!Tt()}I.isBrowser=tn});var $e=M(ve=>{"use strict";Object.defineProperty(ve,"__esModule",{value:!0});var Ct=(xt(),Zt(Rt));Ct.__exportStar(At(),ve);Ct.__exportStar(Pt(),ve)});var Ut=M((N,Mt)=>{"use strict";var Ee=typeof globalThis<"u"&&globalThis||typeof self<"u"&&self||typeof globalThis<"u"&&globalThis,Oe=(function(){function e(){this.fetch=!1,this.DOMException=Ee.DOMException}return e.prototype=Ee,new e})();(function(e){var t=(function(r){var n=typeof e<"u"&&e||typeof self<"u"&&self||typeof e<"u"&&e||{},o={searchParams:"URLSearchParams"in n,iterable:"Symbol"in n&&"iterator"in Symbol,blob:"FileReader"in n&&"Blob"in n&&(function(){try{return new Blob,!0}catch{return!1}})(),formData:"FormData"in n,arrayBuffer:"ArrayBuffer"in n};function i(s){return s&&DataView.prototype.isPrototypeOf(s)}if(o.arrayBuffer)var a=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],h=ArrayBuffer.isView||function(s){return s&&a.indexOf(Object.prototype.toString.call(s))>-1};function c(s){if(typeof s!="string"&&(s=String(s)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(s)||s==="")throw new TypeError('Invalid character in header field name: "'+s+'"');return s.toLowerCase()}function u(s){return typeof s!="string"&&(s=String(s)),s}function p(s){var f={next:function(){var y=s.shift();return{done:y===void 0,value:y}}};return o.iterable&&(f[Symbol.iterator]=function(){return f}),f}function l(s){this.map={},s instanceof l?s.forEach(function(f,y){this.append(y,f)},this):Array.isArray(s)?s.forEach(function(f){if(f.length!=2)throw new TypeError("Headers constructor: expected name/value pair to be length 2, found"+f.length);this.append(f[0],f[1])},this):s&&Object.getOwnPropertyNames(s).forEach(function(f){this.append(f,s[f])},this)}l.prototype.append=function(s,f){s=c(s),f=u(f);var y=this.map[s];this.map[s]=y?y+", "+f:f},l.prototype.delete=function(s){delete this.map[c(s)]},l.prototype.get=function(s){return s=c(s),this.has(s)?this.map[s]:null},l.prototype.has=function(s){return this.map.hasOwnProperty(c(s))},l.prototype.set=function(s,f){this.map[c(s)]=u(f)},l.prototype.forEach=function(s,f){for(var y in this.map)this.map.hasOwnProperty(y)&&s.call(f,this.map[y],y,this)},l.prototype.keys=function(){var s=[];return this.forEach(function(f,y){s.push(y)}),p(s)},l.prototype.values=function(){var s=[];return this.forEach(function(f){s.push(f)}),p(s)},l.prototype.entries=function(){var s=[];return this.forEach(function(f,y){s.push([y,f])}),p(s)},o.iterable&&(l.prototype[Symbol.iterator]=l.prototype.entries);function b(s){if(!s._noBody){if(s.bodyUsed)return Promise.reject(new TypeError("Already read"));s.bodyUsed=!0}}function d(s){return new Promise(function(f,y){s.onload=function(){f(s.result)},s.onerror=function(){y(s.error)}})}function w(s){var f=new FileReader,y=d(f);return f.readAsArrayBuffer(s),y}function P(s){var f=new FileReader,y=d(f),m=/charset=([A-Za-z0-9_-]+)/.exec(s.type),_=m?m[1]:"utf-8";return f.readAsText(s,_),y}function ee(s){for(var f=new Uint8Array(s),y=new Array(f.length),m=0;m<f.length;m++)y[m]=String.fromCharCode(f[m]);return y.join("")}function D(s){if(s.slice)return s.slice(0);var f=new Uint8Array(s.byteLength);return f.set(new Uint8Array(s)),f.buffer}function q(){return this.bodyUsed=!1,this._initBody=function(s){this.bodyUsed=this.bodyUsed,this._bodyInit=s,s?typeof s=="string"?this._bodyText=s:o.blob&&Blob.prototype.isPrototypeOf(s)?this._bodyBlob=s:o.formData&&FormData.prototype.isPrototypeOf(s)?this._bodyFormData=s:o.searchParams&&URLSearchParams.prototype.isPrototypeOf(s)?this._bodyText=s.toString():o.arrayBuffer&&o.blob&&i(s)?(this._bodyArrayBuffer=D(s.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):o.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(s)||h(s))?this._bodyArrayBuffer=D(s):this._bodyText=s=Object.prototype.toString.call(s):(this._noBody=!0,this._bodyText=""),this.headers.get("content-type")||(typeof s=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):o.searchParams&&URLSearchParams.prototype.isPrototypeOf(s)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},o.blob&&(this.blob=function(){var s=b(this);if(s)return s;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))}),this.arrayBuffer=function(){if(this._bodyArrayBuffer){var s=b(this);return s||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}else{if(o.blob)return this.blob().then(w);throw new Error("could not read as ArrayBuffer")}},this.text=function(){var s=b(this);if(s)return s;if(this._bodyBlob)return P(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(ee(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},o.formData&&(this.formData=function(){return this.text().then(Wt)}),this.json=function(){return this.text().then(JSON.parse)},this}var te=["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"];function A(s){var f=s.toUpperCase();return te.indexOf(f)>-1?f:s}function C(s,f){if(!(this instanceof C))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');f=f||{};var y=f.body;if(s instanceof C){if(s.bodyUsed)throw new TypeError("Already read");this.url=s.url,this.credentials=s.credentials,f.headers||(this.headers=new l(s.headers)),this.method=s.method,this.mode=s.mode,this.signal=s.signal,!y&&s._bodyInit!=null&&(y=s._bodyInit,s.bodyUsed=!0)}else this.url=String(s);if(this.credentials=f.credentials||this.credentials||"same-origin",(f.headers||!this.headers)&&(this.headers=new l(f.headers)),this.method=A(f.method||this.method||"GET"),this.mode=f.mode||this.mode||null,this.signal=f.signal||this.signal||(function(){if("AbortController"in n){var v=new AbortController;return v.signal}})(),this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&y)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(y),(this.method==="GET"||this.method==="HEAD")&&(f.cache==="no-store"||f.cache==="no-cache")){var m=/([?&])_=[^&]*/;if(m.test(this.url))this.url=this.url.replace(m,"$1_="+new Date().getTime());else{var _=/\?/;this.url+=(_.test(this.url)?"&":"?")+"_="+new Date().getTime()}}}C.prototype.clone=function(){return new C(this,{body:this._bodyInit})};function Wt(s){var f=new FormData;return s.trim().split("&").forEach(function(y){if(y){var m=y.split("="),_=m.shift().replace(/\+/g," "),v=m.join("=").replace(/\+/g," ");f.append(decodeURIComponent(_),decodeURIComponent(v))}}),f}function Xt(s){var f=new l,y=s.replace(/\r?\n[\t ]+/g," ");return y.split("\r").map(function(m){return m.indexOf(`
2
+ `)===0?m.substr(1,m.length):m}).forEach(function(m){var _=m.split(":"),v=_.shift().trim();if(v){var re=_.join(":").trim();try{f.append(v,re)}catch(xe){console.warn("Response "+xe.message)}}}),f}q.call(C.prototype);function L(s,f){if(!(this instanceof L))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');if(f||(f={}),this.type="default",this.status=f.status===void 0?200:f.status,this.status<200||this.status>599)throw new RangeError("Failed to construct 'Response': The status provided (0) is outside the range [200, 599].");this.ok=this.status>=200&&this.status<300,this.statusText=f.statusText===void 0?"":""+f.statusText,this.headers=new l(f.headers),this.url=f.url||"",this._initBody(s)}q.call(L.prototype),L.prototype.clone=function(){return new L(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new l(this.headers),url:this.url})},L.error=function(){var s=new L(null,{status:200,statusText:""});return s.ok=!1,s.status=0,s.type="error",s};var Kt=[301,302,303,307,308];L.redirect=function(s,f){if(Kt.indexOf(f)===-1)throw new RangeError("Invalid status code");return new L(null,{status:f,headers:{location:s}})},r.DOMException=n.DOMException;try{new r.DOMException}catch{r.DOMException=function(f,y){this.message=f,this.name=y;var m=Error(f);this.stack=m.stack},r.DOMException.prototype=Object.create(Error.prototype),r.DOMException.prototype.constructor=r.DOMException}function Re(s,f){return new Promise(function(y,m){var _=new C(s,f);if(_.signal&&_.signal.aborted)return m(new r.DOMException("Aborted","AbortError"));var v=new XMLHttpRequest;function re(){v.abort()}v.onload=function(){var E={statusText:v.statusText,headers:Xt(v.getAllResponseHeaders()||"")};_.url.indexOf("file://")===0&&(v.status<200||v.status>599)?E.status=200:E.status=v.status,E.url="responseURL"in v?v.responseURL:E.headers.get("X-Request-URL");var z="response"in v?v.response:v.responseText;setTimeout(function(){y(new L(z,E))},0)},v.onerror=function(){setTimeout(function(){m(new TypeError("Network request failed"))},0)},v.ontimeout=function(){setTimeout(function(){m(new TypeError("Network request timed out"))},0)},v.onabort=function(){setTimeout(function(){m(new r.DOMException("Aborted","AbortError"))},0)};function xe(E){try{return E===""&&n.location.href?n.location.href:E}catch{return E}}if(v.open(_.method,xe(_.url),!0),_.credentials==="include"?v.withCredentials=!0:_.credentials==="omit"&&(v.withCredentials=!1),"responseType"in v&&(o.blob?v.responseType="blob":o.arrayBuffer&&(v.responseType="arraybuffer")),f&&typeof f.headers=="object"&&!(f.headers instanceof l||n.Headers&&f.headers instanceof n.Headers)){var Ye=[];Object.getOwnPropertyNames(f.headers).forEach(function(E){Ye.push(c(E)),v.setRequestHeader(E,u(f.headers[E]))}),_.headers.forEach(function(E,z){Ye.indexOf(z)===-1&&v.setRequestHeader(z,E)})}else _.headers.forEach(function(E,z){v.setRequestHeader(z,E)});_.signal&&(_.signal.addEventListener("abort",re),v.onreadystatechange=function(){v.readyState===4&&_.signal.removeEventListener("abort",re)}),v.send(typeof _._bodyInit>"u"?null:_._bodyInit)})}return Re.polyfill=!0,n.fetch||(n.fetch=Re,n.Headers=l,n.Request=C,n.Response=L),r.Headers=l,r.Request=C,r.Response=L,r.fetch=Re,Object.defineProperty(r,"__esModule",{value:!0}),r})({})})(Oe);Oe.fetch.ponyfill=!0;delete Oe.fetch.polyfill;var H=Ee.fetch?Ee:Oe;N=H.fetch;N.default=H.fetch;N.fetch=H.fetch;N.Headers=H.Headers;N.Request=H.Request;N.Response=H.Response;Mt.exports=N});var T=U(Ce()),br=U(Ce());var gr=e=>JSON.stringify(e,(t,r)=>typeof r=="bigint"?r.toString()+"n":r),mr=e=>{let t=/([\[:])?(\d{17,}|(?:[9](?:[1-9]07199254740991|0[1-9]7199254740991|00[8-9]199254740991|007[2-9]99254740991|007199[3-9]54740991|0071992[6-9]4740991|00719925[5-9]740991|007199254[8-9]40991|0071992547[5-9]0991|00719925474[1-9]991|00719925474099[2-9])))([,\}\]])/g,r=e.replace(t,'$1"$2n"$3');return JSON.parse(r,(n,o)=>typeof o=="string"&&o.match(/^\d+n$/)?BigInt(o.substring(0,o.length-1)):o)};function pt(e){if(typeof e!="string")throw new Error(`Cannot safe json parse value of type ${typeof e}`);try{return mr(e)}catch{return e}}function J(e){return typeof e=="string"?e:gr(e)||""}var wr={level:"info"},W="custom_context",Ne=1e3*1024,je=class{constructor(t){this.nodeValue=t,this.sizeInBytes=new TextEncoder().encode(this.nodeValue).length,this.next=null}get value(){return this.nodeValue}get size(){return this.sizeInBytes}},ae=class{constructor(t){this.head=null,this.tail=null,this.lengthInNodes=0,this.maxSizeInBytes=t,this.sizeInBytes=0}append(t){let r=new je(t);if(r.size>this.maxSizeInBytes)throw new Error(`[LinkedList] Value too big to insert into list: ${t} with size ${r.size}`);for(;this.size+r.size>this.maxSizeInBytes;)this.shift();this.head?(this.tail&&(this.tail.next=r),this.tail=r):(this.head=r,this.tail=r),this.lengthInNodes++,this.sizeInBytes+=r.size}shift(){if(!this.head)return;let t=this.head;this.head=this.head.next,this.head||(this.tail=null),this.lengthInNodes--,this.sizeInBytes-=t.size}toArray(){let t=[],r=this.head;for(;r!==null;)t.push(r.value),r=r.next;return t}get length(){return this.lengthInNodes}get size(){return this.sizeInBytes}toOrderedArray(){return Array.from(this)}[Symbol.iterator](){let t=this.head;return{next:()=>{if(!t)return{done:!0,value:null};let r=t.value;return t=t.next,{done:!1,value:r}}}}},fe=class{constructor(t,r=Ne){this.level=t??"error",this.levelValue=T.levels.values[this.level],this.MAX_LOG_SIZE_IN_BYTES=r,this.logs=new ae(this.MAX_LOG_SIZE_IN_BYTES)}forwardToConsole(t,r){r===T.levels.values.error?console.error(t):r===T.levels.values.warn?console.warn(t):r===T.levels.values.debug?console.debug(t):r===T.levels.values.trace?console.trace(t):console.log(t)}appendToLogs(t){this.logs.append(J({timestamp:new Date().toISOString(),log:t}));let r=typeof t=="string"?JSON.parse(t).level:t.level;r>=this.levelValue&&this.forwardToConsole(t,r)}getLogs(){return this.logs}clearLogs(){this.logs=new ae(this.MAX_LOG_SIZE_IN_BYTES)}getLogArray(){return Array.from(this.logs)}logsToBlob(t){let r=this.getLogArray();return r.push(J({extraMetadata:t})),new Blob(r,{type:"application/json"})}},Be=class{constructor(t,r=Ne){this.baseChunkLogger=new fe(t,r)}write(t){this.baseChunkLogger.appendToLogs(t)}getLogs(){return this.baseChunkLogger.getLogs()}clearLogs(){this.baseChunkLogger.clearLogs()}getLogArray(){return this.baseChunkLogger.getLogArray()}logsToBlob(t){return this.baseChunkLogger.logsToBlob(t)}downloadLogsBlobInBrowser(t){let r=URL.createObjectURL(this.logsToBlob(t)),n=document.createElement("a");n.href=r,n.download=`walletconnect-logs-${new Date().toISOString()}.txt`,document.body.appendChild(n),n.click(),document.body.removeChild(n),URL.revokeObjectURL(r)}},Ie=class{constructor(t,r=Ne){this.baseChunkLogger=new fe(t,r)}write(t){this.baseChunkLogger.appendToLogs(t)}getLogs(){return this.baseChunkLogger.getLogs()}clearLogs(){this.baseChunkLogger.clearLogs()}getLogArray(){return this.baseChunkLogger.getLogArray()}logsToBlob(t){return this.baseChunkLogger.logsToBlob(t)}},_r=Object.defineProperty,Er=Object.defineProperties,Or=Object.getOwnPropertyDescriptors,yt=Object.getOwnPropertySymbols,Rr=Object.prototype.hasOwnProperty,xr=Object.prototype.propertyIsEnumerable,vt=(e,t,r)=>t in e?_r(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ce=(e,t)=>{for(var r in t||(t={}))Rr.call(t,r)&&vt(e,r,t[r]);if(yt)for(var r of yt(t))xr.call(t,r)&&vt(e,r,t[r]);return e},ue=(e,t)=>Er(e,Or(t));function xn(e){return ue(ce({},e),{level:e?.level||wr.level})}function Lr(e,t=W){return e[t]||""}function Ar(e,t,r=W){return e[r]=t,e}function Sr(e,t=W){let r="";return typeof e.bindings>"u"?r=Lr(e,t):r=e.bindings().context||"",r}function Tr(e,t,r=W){let n=Sr(e,r);return n.trim()?`${n}/${t}`:t}function Ln(e,t,r=W){let n=Tr(e,t,r),o=e.child({context:n});return Ar(o,n,r)}function Pr(e){var t,r;let n=new Be((t=e.opts)==null?void 0:t.level,e.maxSizeInBytes);return{logger:(0,T.default)(ue(ce({},e.opts),{level:"trace",browser:ue(ce({},(r=e.opts)==null?void 0:r.browser),{write:o=>n.write(o)})})),chunkLoggerController:n}}function Cr(e){var t;let r=new Ie((t=e.opts)==null?void 0:t.level,e.maxSizeInBytes);return{logger:(0,T.default)(ue(ce({},e.opts),{level:"trace"}),r),chunkLoggerController:r}}function An(e){return typeof e.loggerOverride<"u"&&typeof e.loggerOverride!="string"?{logger:e.loggerOverride,chunkLoggerController:null}:typeof window<"u"?Pr(e):Cr(e)}var gt="PARSE_ERROR",mt="INVALID_REQUEST",bt="METHOD_NOT_FOUND",wt="INVALID_PARAMS",le="INTERNAL_ERROR",X="SERVER_ERROR",De=[-32700,-32600,-32601,-32602,-32603],he=[-32e3,-32099],j={[gt]:{code:-32700,message:"Parse error"},[mt]:{code:-32600,message:"Invalid Request"},[bt]:{code:-32601,message:"Method not found"},[wt]:{code:-32602,message:"Invalid params"},[le]:{code:-32603,message:"Internal error"},[X]:{code:-32e3,message:"Server error"}},K=X;function jr(e){return e<=he[0]&&e>=he[1]}function de(e){return De.includes(e)}function _t(e){return typeof e=="number"}function pe(e){return Object.keys(j).includes(e)?j[e]:j[K]}function ye(e){let t=Object.values(j).find(r=>r.code===e);return t||j[K]}function Br(e){if(typeof e.error.code>"u")return{valid:!1,error:"Missing code for JSON-RPC error"};if(typeof e.error.message>"u")return{valid:!1,error:"Missing message for JSON-RPC error"};if(!_t(e.error.code))return{valid:!1,error:`Invalid error code type for JSON-RPC: ${e.error.code}`};if(de(e.error.code)){let t=ye(e.error.code);if(t.message!==j[K].message&&e.error.message===t.message)return{valid:!1,error:`Invalid error code message for JSON-RPC: ${e.error.code}`}}return{valid:!0}}function ze(e,t,r){return e.message.includes("getaddrinfo ENOTFOUND")||e.message.includes("connect ECONNREFUSED")?new Error(`Unavailable ${r} RPC url at ${t}`):e}function Me(e=3){let t=Date.now()*Math.pow(10,e),r=Math.floor(Math.random()*Math.pow(10,e));return t+r}function Ue(e=6){return BigInt(Me(e))}function ke(e,t,r){return{id:r||Me(),jsonrpc:"2.0",method:e,params:t}}function Ir(e,t){return{id:e,jsonrpc:"2.0",result:t}}function Ve(e,t,r){return{id:e,jsonrpc:"2.0",error:Et(t,r)}}function Et(e,t){return typeof e>"u"?pe(le):(typeof e=="string"&&(e=Object.assign(Object.assign({},pe(X)),{message:e})),typeof t<"u"&&(e.data=t),de(e.code)&&(e=ye(e.code)),e)}var x={};Le(x,{DEFAULT_ERROR:()=>K,IBaseJsonRpcProvider:()=>be,IEvents:()=>Z,IJsonRpcConnection:()=>Ge,IJsonRpcProvider:()=>Q,INTERNAL_ERROR:()=>le,INVALID_PARAMS:()=>wt,INVALID_REQUEST:()=>mt,METHOD_NOT_FOUND:()=>bt,PARSE_ERROR:()=>gt,RESERVED_ERROR_CODES:()=>De,SERVER_ERROR:()=>X,SERVER_ERROR_CODE_RANGE:()=>he,STANDARD_ERROR_MAP:()=>j,formatErrorMessage:()=>Et,formatJsonRpcError:()=>Ve,formatJsonRpcRequest:()=>ke,formatJsonRpcResult:()=>Ir,getBigIntRpcId:()=>Ue,getError:()=>pe,getErrorByCode:()=>ye,isHttpUrl:()=>we,isJsonRpcError:()=>_e,isJsonRpcPayload:()=>We,isJsonRpcRequest:()=>ln,isJsonRpcResponse:()=>Xe,isJsonRpcResult:()=>Nt,isJsonRpcValidationInvalid:()=>hn,isLocalhostUrl:()=>un,isNodeJs:()=>Bt,isReservedErrorCode:()=>de,isServerErrorCode:()=>jr,isValidDefaultRoute:()=>ge,isValidErrorCode:()=>_t,isValidLeadingWildcardRoute:()=>nn,isValidRoute:()=>rn,isValidTrailingWildcardRoute:()=>on,isValidWildcardRoute:()=>me,isWsUrl:()=>cn,parseConnectionError:()=>ze,payloadId:()=>Me,validateJsonRpcError:()=>Br});var O={};Le(O,{isNodeJs:()=>Bt});var jt=U($e());R(O,U($e()));var Bt=jt.isNode;R(x,O);function rn(e){return e.includes("*")?me(e):!/\W/g.test(e)}function ge(e){return e==="*"}function me(e){return ge(e)?!0:!(!e.includes("*")||e.split("*").length!==2||e.split("*").filter(t=>t.trim()==="").length!==1)}function nn(e){return!ge(e)&&me(e)&&!e.split("*")[0].trim()}function on(e){return!ge(e)&&me(e)&&!e.split("*")[1].trim()}var Z=class{},Ge=class extends Z{constructor(t){super()}},be=class extends Z{constructor(){super()}},Q=class extends be{constructor(t){super()}};var sn="^https?:",an="^wss?:";function fn(e){let t=e.match(new RegExp(/^\w+:/,"gi"));if(!(!t||!t.length))return t[0]}function It(e,t){let r=fn(e);return typeof r>"u"?!1:new RegExp(t).test(r)}function we(e){return It(e,sn)}function cn(e){return It(e,an)}function un(e){return new RegExp("wss?://localhost(:d{2,5})?").test(e)}function We(e){return typeof e=="object"&&"id"in e&&"jsonrpc"in e&&e.jsonrpc==="2.0"}function ln(e){return We(e)&&"method"in e}function Xe(e){return We(e)&&(Nt(e)||_e(e))}function Nt(e){return"result"in e}function _e(e){return"error"in e}function hn(e){return"error"in e&&e.valid===!1}var zt=U(Se());var Dt=class extends Q{constructor(t){super(t),this.events=new zt.EventEmitter,this.hasRegisteredEventListeners=!1,this.connection=this.setConnection(t),this.connection.connected&&this.registerEventListeners()}async connect(t=this.connection){await this.open(t)}async disconnect(){await this.close()}on(t,r){this.events.on(t,r)}once(t,r){this.events.once(t,r)}off(t,r){this.events.off(t,r)}removeListener(t,r){this.events.removeListener(t,r)}async request(t,r){return this.requestStrict(ke(t.method,t.params||[],t.id||Ue().toString()),r)}async requestStrict(t,r){return new Promise(async(n,o)=>{if(!this.connection.connected)try{await this.open()}catch(i){o(i)}this.events.on(`${t.id}`,i=>{_e(i)?o(i.error):n(i.result)});try{await this.connection.send(t,r)}catch(i){o(i)}})}setConnection(t=this.connection){return t}onPayload(t){this.events.emit("payload",t),Xe(t)?this.events.emit(`${t.id}`,t):this.events.emit("message",{type:t.method,data:t.params})}onClose(t){t&&t.code===3e3&&this.events.emit("error",new Error(`WebSocket connection closed abnormally with code: ${t.code} ${t.reason?`(${t.reason})`:""}`)),this.events.emit("disconnect")}async open(t=this.connection){this.connection===t&&this.connection.connected||(this.connection.connected&&this.close(),typeof t=="string"&&(await this.connection.open(t),t=this.connection),this.connection=this.setConnection(t),await this.connection.open(),this.registerEventListeners(),this.events.emit("connect"))}async close(){await this.connection.close()}registerEventListeners(){this.hasRegisteredEventListeners||(this.connection.on("payload",t=>this.onPayload(t)),this.connection.on("close",t=>this.onClose(t)),this.connection.on("error",t=>this.events.emit("error",t)),this.connection.on("register_error",t=>this.onClose()),this.hasRegisteredEventListeners=!0)}};var Gt=U(Se()),Ke=U(Ut());var dn=Object.defineProperty,pn=Object.defineProperties,yn=Object.getOwnPropertyDescriptors,kt=Object.getOwnPropertySymbols,vn=Object.prototype.hasOwnProperty,gn=Object.prototype.propertyIsEnumerable,Vt=(e,t,r)=>t in e?dn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Ft=(e,t)=>{for(var r in t||(t={}))vn.call(t,r)&&Vt(e,r,t[r]);if(kt)for(var r of kt(t))gn.call(t,r)&&Vt(e,r,t[r]);return e},Jt=(e,t)=>pn(e,yn(t)),mn={Accept:"application/json","Content-Type":"application/json"},bn="POST",Ht={headers:mn,method:bn},qt=10,$t=class{constructor(t,r=!1){if(this.url=t,this.disableProviderPing=r,this.events=new Gt.EventEmitter,this.isAvailable=!1,this.registering=!1,!we(t))throw new Error(`Provided URL is not compatible with HTTP connection: ${t}`);this.url=t,this.disableProviderPing=r}get connected(){return this.isAvailable}get connecting(){return this.registering}on(t,r){this.events.on(t,r)}once(t,r){this.events.once(t,r)}off(t,r){this.events.off(t,r)}removeListener(t,r){this.events.removeListener(t,r)}async open(t=this.url){await this.register(t)}async close(){if(!this.isAvailable)throw new Error("Connection already closed");this.onClose()}async send(t){this.isAvailable||await this.register();try{let r=J(t),n=await(await(0,Ke.default)(this.url,Jt(Ft({},Ht),{body:r}))).json();this.onPayload({data:n})}catch(r){this.onError(t.id,r)}}async register(t=this.url){if(!we(t))throw new Error(`Provided URL is not compatible with HTTP connection: ${t}`);if(this.registering){let r=this.events.getMaxListeners();return(this.events.listenerCount("register_error")>=r||this.events.listenerCount("open")>=r)&&this.events.setMaxListeners(r+1),new Promise((n,o)=>{this.events.once("register_error",i=>{this.resetMaxListeners(),o(i)}),this.events.once("open",()=>{if(this.resetMaxListeners(),typeof this.isAvailable>"u")return o(new Error("HTTP connection is missing or invalid"));n()})})}this.url=t,this.registering=!0;try{if(!this.disableProviderPing){let r=J({id:1,jsonrpc:"2.0",method:"test",params:[]});await(0,Ke.default)(t,Jt(Ft({},Ht),{body:r}))}this.onOpen()}catch(r){let n=this.parseError(r);throw this.events.emit("register_error",n),this.onClose(),n}}onOpen(){this.isAvailable=!0,this.registering=!1,this.events.emit("open")}onClose(){this.isAvailable=!1,this.registering=!1,this.events.emit("close")}onPayload(t){if(typeof t.data>"u")return;let r=typeof t.data=="string"?pt(t.data):t.data;this.events.emit("payload",r)}onError(t,r){let n=this.parseError(r),o=n.message||n.toString(),i=Ve(t,o);this.events.emit("payload",i)}parseError(t,r=this.url){return ze(t,r,"HTTP")}resetMaxListeners(){this.events.getMaxListeners()>qt&&this.events.setMaxListeners(qt)}};export{Se as a,pt as b,J as c,br as d,xn as e,Sr as f,Ln as g,An as h,ze as i,Me as j,Ue as k,ke as l,Ir as m,Ve as n,cn as o,un as p,ln as q,Xe as r,Nt as s,_e as t,x as u,Dt as v,$t as w};
3
+ /*! Bundled license information:
4
+
5
+ tslib/tslib.es6.js:
6
+ (*! *****************************************************************************
7
+ Copyright (c) Microsoft Corporation.
8
+
9
+ Permission to use, copy, modify, and/or distribute this software for any
10
+ purpose with or without fee is hereby granted.
11
+
12
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
13
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
14
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
15
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
16
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
17
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
18
+ PERFORMANCE OF THIS SOFTWARE.
19
+ ***************************************************************************** *)
20
+ */
@@ -0,0 +1,9 @@
1
+ var a=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;function O(t){return t instanceof Uint8Array||ArrayBuffer.isView(t)&&t.constructor.name==="Uint8Array"}function B(t){if(!Number.isSafeInteger(t)||t<0)throw new Error("positive integer expected, got "+t)}function x(t,...e){if(!O(t))throw new Error("Uint8Array expected");if(e.length>0&&!e.includes(t.length))throw new Error("Uint8Array expected of length "+e+", got length="+t.length)}function P(t){if(typeof t!="function"||typeof t.create!="function")throw new Error("Hash should be wrapped by utils.createHasher");B(t.outputLen),B(t.blockLen)}function q(t,e=!0){if(t.destroyed)throw new Error("Hash instance has been destroyed");if(e&&t.finished)throw new Error("Hash#digest() has already been called")}function J(t,e){x(t);let n=e.outputLen;if(t.length<n)throw new Error("digestInto() expects output buffer of length at least "+n)}function Q(t){return new Uint32Array(t.buffer,t.byteOffset,Math.floor(t.byteLength/4))}function Y(...t){for(let e=0;e<t.length;e++)t[e].fill(0)}function Z(t){return new DataView(t.buffer,t.byteOffset,t.byteLength)}function $(t,e){return t<<32-e|t>>>e}var N=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function v(t){return t<<24&4278190080|t<<8&16711680|t>>>8&65280|t>>>24&255}function V(t){for(let e=0;e<t.length;e++)t[e]=v(t[e]);return t}var tt=N?t=>t:V;function F(t){if(typeof t!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(t))}function j(t){return typeof t=="string"&&(t=F(t)),x(t),t}function et(...t){let e=0;for(let r=0;r<t.length;r++){let o=t[r];x(o),e+=o.length}let n=new Uint8Array(e);for(let r=0,o=0;r<t.length;r++){let i=t[r];n.set(i,o),o+=i.length}return n}var E=class{};function nt(t){let e=r=>t().update(j(r)).digest(),n=t();return e.outputLen=n.outputLen,e.blockLen=n.blockLen,e.create=()=>t(),e}function rt(t=32){if(a&&typeof a.getRandomValues=="function")return a.getRandomValues(new Uint8Array(t));if(a&&typeof a.randomBytes=="function")return Uint8Array.from(a.randomBytes(t));throw new Error("crypto.getRandomValues must be defined")}var b=BigInt(0),h=BigInt(1);function m(t){return t instanceof Uint8Array||ArrayBuffer.isView(t)&&t.constructor.name==="Uint8Array"}function A(t){if(!m(t))throw new Error("Uint8Array expected")}function it(t,e){if(typeof e!="boolean")throw new Error(t+" boolean expected, got "+e)}function ft(t){let e=t.toString(16);return e.length&1?"0"+e:e}function L(t){if(typeof t!="string")throw new Error("hex string expected, got "+typeof t);return t===""?b:BigInt("0x"+t)}var S=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",D=Array.from({length:256},(t,e)=>e.toString(16).padStart(2,"0"));function T(t){if(A(t),S)return t.toHex();let e="";for(let n=0;n<t.length;n++)e+=D[t[n]];return e}var s={_0:48,_9:57,A:65,F:70,a:97,f:102};function U(t){if(t>=s._0&&t<=s._9)return t-s._0;if(t>=s.A&&t<=s.F)return t-(s.A-10);if(t>=s.a&&t<=s.f)return t-(s.a-10)}function I(t){if(typeof t!="string")throw new Error("hex string expected, got "+typeof t);if(S)return Uint8Array.fromHex(t);let e=t.length,n=e/2;if(e%2)throw new Error("hex string expected, got unpadded hex of length "+e);let r=new Uint8Array(n);for(let o=0,i=0;o<n;o++,i+=2){let u=U(t.charCodeAt(i)),f=U(t.charCodeAt(i+1));if(u===void 0||f===void 0){let p=t[i]+t[i+1];throw new Error('hex string expected, got non-hex character "'+p+'" at index '+i)}r[o]=u*16+f}return r}function ct(t){return L(T(t))}function ut(t){return A(t),L(T(Uint8Array.from(t).reverse()))}function R(t,e){return I(t.toString(16).padStart(e*2,"0"))}function st(t,e){return R(t,e).reverse()}function pt(t,e,n){let r;if(typeof e=="string")try{r=I(e)}catch(i){throw new Error(t+" must be hex string or Uint8Array, cause: "+i)}else if(m(e))r=Uint8Array.from(e);else throw new Error(t+" must be hex string or Uint8Array");let o=r.length;if(typeof n=="number"&&o!==n)throw new Error(t+" of length "+n+" expected, got "+o);return r}function C(...t){let e=0;for(let r=0;r<t.length;r++){let o=t[r];A(o),e+=o.length}let n=new Uint8Array(e);for(let r=0,o=0;r<t.length;r++){let i=t[r];n.set(i,o),o+=i.length}return n}function at(t){if(typeof t!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(t))}var y=t=>typeof t=="bigint"&&b<=t;function M(t,e,n){return y(t)&&y(e)&&y(n)&&e<=t&&t<n}function lt(t,e,n,r){if(!M(e,n,r))throw new Error("expected valid "+t+": "+n+" <= n < "+r+", got "+e)}function gt(t){let e;for(e=0;t>b;t>>=h,e+=1);return e}var dt=t=>(h<<BigInt(t))-h,w=t=>new Uint8Array(t),H=t=>Uint8Array.from(t);function xt(t,e,n){if(typeof t!="number"||t<2)throw new Error("hashLen must be a number");if(typeof e!="number"||e<2)throw new Error("qByteLen must be a number");if(typeof n!="function")throw new Error("hmacFn must be a function");let r=w(t),o=w(t),i=0,u=()=>{r.fill(1),o.fill(0),i=0},f=(...c)=>n(o,r,...c),p=(c=w(0))=>{o=f(H([0]),c),r=f(),c.length!==0&&(o=f(H([1]),c),r=f())},k=()=>{if(i++>=1e3)throw new Error("drbg: tried 1000 values");let c=0,l=[];for(;c<e;){r=f();let g=r.slice();l.push(g),c+=r.length}return C(...l)};return(c,l)=>{u(),p(c);let g;for(;!(g=l(k()));)p();return u(),g}}var W={bigint:t=>typeof t=="bigint",function:t=>typeof t=="function",boolean:t=>typeof t=="boolean",string:t=>typeof t=="string",stringOrUint8Array:t=>typeof t=="string"||m(t),isSafeInteger:t=>Number.isSafeInteger(t),array:t=>Array.isArray(t),field:(t,e)=>e.Fp.isValid(t),hash:t=>typeof t=="function"&&Number.isSafeInteger(t.outputLen)};function yt(t,e,n={}){let r=(o,i,u)=>{let f=W[i];if(typeof f!="function")throw new Error("invalid validator function");let p=t[o];if(!(u&&p===void 0)&&!f(p,t))throw new Error("param "+String(o)+" is invalid. Expected "+i+", got "+p)};for(let[o,i]of Object.entries(e))r(o,i,!1);for(let[o,i]of Object.entries(n))r(o,i,!0);return t}function wt(t){let e=new WeakMap;return(n,...r)=>{let o=e.get(n);if(o!==void 0)return o;let i=t(n,...r);return e.set(n,i),i}}var d=BigInt(4294967295),_=BigInt(32);function X(t,e=!1){return e?{h:Number(t&d),l:Number(t>>_&d)}:{h:Number(t>>_&d)|0,l:Number(t&d)|0}}function bt(t,e=!1){let n=t.length,r=new Uint32Array(n),o=new Uint32Array(n);for(let i=0;i<n;i++){let{h:u,l:f}=X(t[i],e);[r[i],o[i]]=[u,f]}return[r,o]}var mt=(t,e,n)=>t<<n|e>>>32-n,At=(t,e,n)=>e<<n|t>>>32-n,Bt=(t,e,n)=>e<<n-32|t>>>64-n,Et=(t,e,n)=>t<<n-32|e>>>64-n;export{bt as a,mt as b,At as c,Bt as d,Et as e,B as f,x as g,P as h,q as i,J as j,Q as k,Y as l,Z as m,$ as n,tt as o,j as p,et as q,E as r,nt as s,rt as t,m as u,A as v,it as w,ft as x,T as y,I as z,ct as A,ut as B,R as C,st as D,pt as E,C as F,at as G,M as H,lt as I,gt as J,dt as K,xt as L,yt as M,wt as N};
2
+ /*! Bundled license information:
3
+
4
+ @noble/hashes/esm/utils.js:
5
+ (*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) *)
6
+
7
+ @noble/curves/esm/abstract/utils.js:
8
+ (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)
9
+ */
@@ -0,0 +1 @@
1
+ import{g as _,i as C,j as L,l as H,m as A,n as b,p as D,r as E,s as F}from"./chunk-EZRXHJOM.js";function y(r,t,c,s){if(typeof r.setBigUint64=="function")return r.setBigUint64(t,c,s);let h=BigInt(32),a=BigInt(4294967295),e=Number(c>>h&a),x=Number(c&a),f=s?4:0,o=s?0:4;r.setUint32(t+f,e,s),r.setUint32(t+o,x,s)}function G(r,t,c){return r&t^~r&c}function U(r,t,c){return r&t^r&c^t&c}var B=class extends E{constructor(t,c,s,h){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=t,this.outputLen=c,this.padOffset=s,this.isLE=h,this.buffer=new Uint8Array(t),this.view=A(this.buffer)}update(t){C(this),t=D(t),_(t);let{view:c,buffer:s,blockLen:h}=this,a=t.length;for(let e=0;e<a;){let x=Math.min(h-this.pos,a-e);if(x===h){let f=A(t);for(;h<=a-e;e+=h)this.process(f,e);continue}s.set(t.subarray(e,e+x),this.pos),this.pos+=x,e+=x,this.pos===h&&(this.process(c,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){C(this),L(t,this),this.finished=!0;let{buffer:c,view:s,blockLen:h,isLE:a}=this,{pos:e}=this;c[e++]=128,H(this.buffer.subarray(e)),this.padOffset>h-e&&(this.process(s,0),e=0);for(let i=e;i<h;i++)c[i]=0;y(s,h-8,BigInt(this.length*8),a),this.process(s,0);let x=A(t),f=this.outputLen;if(f%4)throw new Error("_sha2: outputLen should be aligned to 32bit");let o=f/4,d=this.get();if(o>d.length)throw new Error("_sha2: outputLen bigger than state");for(let i=0;i<o;i++)x.setUint32(4*i,d[i],a)}digest(){let{buffer:t,outputLen:c}=this;this.digestInto(t);let s=t.slice(0,c);return this.destroy(),s}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());let{blockLen:c,buffer:s,length:h,finished:a,destroyed:e,pos:x}=this;return t.destroyed=e,t.finished=a,t.length=h,t.pos=x,h%c&&t.buffer.set(s),t}clone(){return this._cloneInto()}},n=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]);var I=Uint32Array.from([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),l=new Uint32Array(64),m=class extends B{constructor(t=32){super(64,t,8,!1),this.A=n[0]|0,this.B=n[1]|0,this.C=n[2]|0,this.D=n[3]|0,this.E=n[4]|0,this.F=n[5]|0,this.G=n[6]|0,this.H=n[7]|0}get(){let{A:t,B:c,C:s,D:h,E:a,F:e,G:x,H:f}=this;return[t,c,s,h,a,e,x,f]}set(t,c,s,h,a,e,x,f){this.A=t|0,this.B=c|0,this.C=s|0,this.D=h|0,this.E=a|0,this.F=e|0,this.G=x|0,this.H=f|0}process(t,c){for(let i=0;i<16;i++,c+=4)l[i]=t.getUint32(c,!1);for(let i=16;i<64;i++){let p=l[i-15],u=l[i-2],S=b(p,7)^b(p,18)^p>>>3,g=b(u,17)^b(u,19)^u>>>10;l[i]=g+l[i-7]+S+l[i-16]|0}let{A:s,B:h,C:a,D:e,E:x,F:f,G:o,H:d}=this;for(let i=0;i<64;i++){let p=b(x,6)^b(x,11)^b(x,25),u=d+p+G(x,f,o)+I[i]+l[i]|0,g=(b(s,2)^b(s,13)^b(s,22))+U(s,h,a)|0;d=o,o=f,f=x,x=e+u|0,e=a,a=h,h=s,s=u+g|0}s=s+this.A|0,h=h+this.B|0,a=a+this.C|0,e=e+this.D|0,x=x+this.E|0,f=f+this.F|0,o=o+this.G|0,d=d+this.H|0,this.set(s,h,a,e,x,f,o,d)}roundClean(){H(l)}destroy(){this.set(0,0,0,0,0,0,0,0),H(this.buffer)}};var j=F(()=>new m);export{j as a};
@@ -0,0 +1,6 @@
1
+ var i=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;function c(t){if(!Number.isSafeInteger(t)||t<0)throw new Error("positive integer expected, got "+t)}function a(t){return t instanceof Uint8Array||ArrayBuffer.isView(t)&&t.constructor.name==="Uint8Array"}function f(t,...e){if(!a(t))throw new Error("Uint8Array expected");if(e.length>0&&!e.includes(t.length))throw new Error("Uint8Array expected of length "+e+", got length="+t.length)}function g(t){if(typeof t!="function"||typeof t.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");c(t.outputLen),c(t.blockLen)}function w(t,e=!0){if(t.destroyed)throw new Error("Hash instance has been destroyed");if(e&&t.finished)throw new Error("Hash#digest() has already been called")}function x(t,e){f(t);let r=e.outputLen;if(t.length<r)throw new Error("digestInto() expects output buffer of length at least "+r)}function A(t){return new Uint32Array(t.buffer,t.byteOffset,Math.floor(t.byteLength/4))}function L(t){return new DataView(t.buffer,t.byteOffset,t.byteLength)}function E(t,e){return t<<32-e|t>>>e}var B=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function l(t){return t<<24&4278190080|t<<8&16711680|t>>>8&65280|t>>>24&255}function U(t){for(let e=0;e<t.length;e++)t[e]=l(t[e])}function y(t){if(typeof t!="string")throw new Error("utf8ToBytes expected string, got "+typeof t);return new Uint8Array(new TextEncoder().encode(t))}function p(t){return typeof t=="string"&&(t=y(t)),f(t),t}function O(...t){let e=0;for(let n=0;n<t.length;n++){let o=t[n];f(o),e+=o.length}let r=new Uint8Array(e);for(let n=0,o=0;n<t.length;n++){let u=t[n];r.set(u,o),o+=u.length}return r}var s=class{clone(){return this._cloneInto()}};function T(t){let e=n=>t().update(p(n)).digest(),r=t();return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=()=>t(),e}function k(t){let e=(n,o)=>t(o).update(p(n)).digest(),r=t({});return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=n=>t(n),e}function S(t=32){if(i&&typeof i.getRandomValues=="function")return i.getRandomValues(new Uint8Array(t));if(i&&typeof i.randomBytes=="function")return i.randomBytes(t);throw new Error("crypto.getRandomValues must be defined")}export{c as a,f as b,g as c,w as d,x as e,A as f,L as g,E as h,B as i,U as j,p as k,O as l,s as m,T as n,k as o,S as p};
2
+ /*! Bundled license information:
3
+
4
+ @noble/hashes/esm/utils.js:
5
+ (*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) *)
6
+ */
@@ -0,0 +1,6 @@
1
+ var i=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;function c(t){if(!Number.isSafeInteger(t)||t<0)throw new Error("positive integer expected, got "+t)}function a(t){return t instanceof Uint8Array||ArrayBuffer.isView(t)&&t.constructor.name==="Uint8Array"}function f(t,...e){if(!a(t))throw new Error("Uint8Array expected");if(e.length>0&&!e.includes(t.length))throw new Error("Uint8Array expected of length "+e+", got length="+t.length)}function g(t){if(typeof t!="function"||typeof t.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");c(t.outputLen),c(t.blockLen)}function w(t,e=!0){if(t.destroyed)throw new Error("Hash instance has been destroyed");if(e&&t.finished)throw new Error("Hash#digest() has already been called")}function x(t,e){f(t);let r=e.outputLen;if(t.length<r)throw new Error("digestInto() expects output buffer of length at least "+r)}function A(t){return new Uint32Array(t.buffer,t.byteOffset,Math.floor(t.byteLength/4))}function L(t){return new DataView(t.buffer,t.byteOffset,t.byteLength)}function E(t,e){return t<<32-e|t>>>e}var B=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function l(t){return t<<24&4278190080|t<<8&16711680|t>>>8&65280|t>>>24&255}function U(t){for(let e=0;e<t.length;e++)t[e]=l(t[e])}function y(t){if(typeof t!="string")throw new Error("utf8ToBytes expected string, got "+typeof t);return new Uint8Array(new TextEncoder().encode(t))}function p(t){return typeof t=="string"&&(t=y(t)),f(t),t}function O(...t){let e=0;for(let n=0;n<t.length;n++){let o=t[n];f(o),e+=o.length}let r=new Uint8Array(e);for(let n=0,o=0;n<t.length;n++){let u=t[n];r.set(u,o),o+=u.length}return r}var s=class{clone(){return this._cloneInto()}};function T(t){let e=n=>t().update(p(n)).digest(),r=t();return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=()=>t(),e}function k(t){let e=(n,o)=>t(o).update(p(n)).digest(),r=t({});return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=n=>t(n),e}function S(t=32){if(i&&typeof i.getRandomValues=="function")return i.getRandomValues(new Uint8Array(t));if(i&&typeof i.randomBytes=="function")return i.randomBytes(t);throw new Error("crypto.getRandomValues must be defined")}export{c as a,f as b,g as c,w as d,x as e,A as f,L as g,E as h,B as i,U as j,p as k,O as l,s as m,T as n,k as o,S as p};
2
+ /*! Bundled license information:
3
+
4
+ @noble/hashes/esm/utils.js:
5
+ (*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) *)
6
+ */