@dcl/blog-site 0.3.0 → 0.3.1-24103023146.commit-2dbaf97

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 (161) hide show
  1. package/assets/{QueryClientProvider-DVt1z-lo.js → QueryClientProvider-CaylTeJU.js} +1 -1
  2. package/assets/{SignInRedirect-DQ2EXIlf.js → SignInRedirect-Cq5V2cbN.js} +5 -5
  3. package/assets/{X-_bf2yze4.js → X-Duht4Iz6.js} +1 -1
  4. package/assets/{__federation_expose_App-DpSY-Y9d.js → __federation_expose_App-MABV9ejQ.js} +1 -1
  5. package/assets/{__federation_fn_import-D82-s3kA.js → __federation_fn_import-BOkD8n2P.js} +1 -1
  6. package/assets/__federation_shared_@dcl/{hooks-35itWugh.js → hooks-BWESDPD3.js} +3 -3
  7. package/assets/__federation_shared_@emotion/react-BQUlnVL8.js +1 -0
  8. package/assets/__federation_shared_@emotion/{styled-CER0OT-8.js → styled-CDI3vXYZ.js} +1 -1
  9. package/assets/{__federation_shared_decentraland-ui2-qV0BHWTj.js → __federation_shared_decentraland-ui2-Dkip0j-u.js} +4 -4
  10. package/assets/{__federation_shared_react-redux-7pAtHZvO.js → __federation_shared_react-redux-Cz6uJTZg.js} +1 -1
  11. package/assets/{__federation_shared_react-router-dom-DM3U0-DJ.js → __federation_shared_react-router-dom-CC-GCyPC.js} +1 -1
  12. package/assets/{__federation_shared_viem-B7de3aIh.js → __federation_shared_viem-N4jx8tpP.js} +1 -1
  13. package/assets/{__federation_shared_wagmi-B-FL62eC.js → __federation_shared_wagmi-T79wv6wS.js} +1 -1
  14. package/assets/{add-D95ShjVd.js → add-2qvA7EiO.js} +1 -1
  15. package/assets/{all-wallets-BY6r5fcR.js → all-wallets-lXjoBtOu.js} +1 -1
  16. package/assets/{app-store-SmbPBgEb.js → app-store-DYHc9uss.js} +1 -1
  17. package/assets/{apple-D8pqe3de.js → apple-trBstREI.js} +1 -1
  18. package/assets/{arrow-bottom-DQy0lFo0.js → arrow-bottom-BWqJWXR-.js} +1 -1
  19. package/assets/{arrow-bottom-circle-OyHlN-U-.js → arrow-bottom-circle-YjuLILdA.js} +1 -1
  20. package/assets/{arrow-left-CXPqeZRE.js → arrow-left-DhtuQend.js} +1 -1
  21. package/assets/{arrow-right-BI45gebZ.js → arrow-right-BvYZ2BiR.js} +1 -1
  22. package/assets/{arrow-top-BxYGxPQg.js → arrow-top-D28-F_Hg.js} +1 -1
  23. package/assets/{auto-track-IXpT7xap.js → auto-track-D9PR_g0H.js} +1 -1
  24. package/assets/{bank-DvWpLZQG.js → bank-DdnPzesM.js} +1 -1
  25. package/assets/{basic-DENnvNSD.js → basic-DmnKpYra.js} +1 -1
  26. package/assets/{biconomy-GzbQEJRq.js → biconomy-BuodyWlH.js} +1 -1
  27. package/assets/{browser-COUlM8GK.js → browser-WTqp-RH-.js} +1 -1
  28. package/assets/{card-DCZ4hxW7.js → card-CUcjOncu.js} +1 -1
  29. package/assets/{ccip-DGW5U0-8.js → ccip-BBJ3I8Xu.js} +1 -1
  30. package/assets/{checkmark-C3MmlUGU.js → checkmark-B0wthWje.js} +1 -1
  31. package/assets/{checkmark-bold-BZz12uQW.js → checkmark-bold-D3rJPOXJ.js} +1 -1
  32. package/assets/{chevron-bottom-BITHvcvn.js → chevron-bottom-BdzTSFY2.js} +1 -1
  33. package/assets/{chevron-left-DLcgw6J3.js → chevron-left-C8bbhNcl.js} +1 -1
  34. package/assets/{chevron-right-CgvlwKH_.js → chevron-right-CCJu7F9K.js} +1 -1
  35. package/assets/{chevron-top-E2kQk6Yb.js → chevron-top-CbTESKuW.js} +1 -1
  36. package/assets/{chrome-store-IGBWJmfs.js → chrome-store-DxK9ysyk.js} +1 -1
  37. package/assets/{clock-Dnnqv_UX.js → clock-B1B6mod1.js} +1 -1
  38. package/assets/{close-h_pw4dRD.js → close-CA_w2TX7.js} +1 -1
  39. package/assets/{coinPlaceholder-CpzdwguN.js → coinPlaceholder-DDHUZdwM.js} +1 -1
  40. package/assets/{compass-CLIqD2Io.js → compass-Dwx8PkuI.js} +1 -1
  41. package/assets/{controller-DOHoljGI.js → controller-1R1nrCkG.js} +2 -2
  42. package/assets/{copy-56eIYa9K.js → copy-R0gnZxuz.js} +1 -1
  43. package/assets/{core-iy2F1EJT.js → core-9XBuvaBL.js} +3 -3
  44. package/assets/{createBundlerClient-Cb3DWn31.js → createBundlerClient-LPapq7hJ.js} +1 -1
  45. package/assets/{createClient-BJ5w543s.js → createClient-BLcyKw9o.js} +1 -1
  46. package/assets/{cursor-DHAIalN2.js → cursor-buHR4MvG.js} +1 -1
  47. package/assets/{cursor-transparent-USINvuuv.js → cursor-transparent-BlSFN96v.js} +1 -1
  48. package/assets/{decimals-CVjZGYo0.js → decimals-Bnh8vaOd.js} +1 -1
  49. package/assets/{decimals-DIZDmdnI.js → decimals-DKeocaSS.js} +1 -1
  50. package/assets/{desktop-Ck9zNNDL.js → desktop-iLJ0yrPC.js} +1 -1
  51. package/assets/{detectExtension-DQNsMd7m.js → detectExtension-gGfjMoDV.js} +1 -1
  52. package/assets/{disconnect-B6rD3ARw.js → disconnect-DmWVYzi9.js} +1 -1
  53. package/assets/{discord-QyDy6H2Z.js → discord-CdcA1Vi7.js} +1 -1
  54. package/assets/{emotion-react.browser.esm-BHtRLI5r.js → emotion-react.browser.esm-F9fz9FEy.js} +1 -1
  55. package/assets/{emotion-use-insertion-effect-with-fallbacks.browser.esm-DxyPSsfO.js → emotion-use-insertion-effect-with-fallbacks.browser.esm-Sg-5vT-t.js} +1 -1
  56. package/assets/{encode-JOmK-dAM.js → encode-CKwvXR_N.js} +2 -2
  57. package/assets/{engine-Cr6ElJJw.js → engine-DlI24UVK.js} +1 -1
  58. package/assets/{estimate-gas-CMPxVjuF.js → estimate-gas-BG6-Kqmv.js} +3 -3
  59. package/assets/{estimate-l1-fee-B90S_dRF.js → estimate-l1-fee-BgFRrIc9.js} +1 -1
  60. package/assets/{eth_getStorageAt-BzWA0XEw.js → eth_getStorageAt-D61Vetgg.js} +1 -1
  61. package/assets/{etherscan-BSyc5b_s.js → etherscan-GfR_ppjR.js} +1 -1
  62. package/assets/{exclamation-triangle-Cbq68j9M.js → exclamation-triangle-8iGJjWy8.js} +1 -1
  63. package/assets/{extension-Ef7aJ2Fj.js → extension-D6ggRkmW.js} +1 -1
  64. package/assets/{external-link-bVFEWzQf.js → external-link-DEfu-xG1.js} +1 -1
  65. package/assets/{extractIPFS-kNuMOSPp.js → extractIPFS-BmrxUMAw.js} +1 -1
  66. package/assets/{facebook-KWDQXnqW.js → facebook-CKEn1wyA.js} +1 -1
  67. package/assets/{farcaster-OZKU6ag9.js → farcaster-BjW81SyT.js} +1 -1
  68. package/assets/{fee-data-BCMgs11D.js → fee-data-B6rXatSB.js} +1 -1
  69. package/assets/{fetchTokenMetadata-BPHUGga-.js → fetchTokenMetadata-C3xqQZKk.js} +2 -2
  70. package/assets/{filters-hVFxrfbM.js → filters-DXEYimKv.js} +1 -1
  71. package/assets/{get-ecosystem-wallet-info-mPW-S8xG.js → get-ecosystem-wallet-info-DTdvgTlD.js} +1 -1
  72. package/assets/{getBalance-B1iUU342.js → getBalance-BhvXyjxq.js} +1 -1
  73. package/assets/{getInstalledModules-BnNuIBJw.js → getInstalledModules-Diize_Jb.js} +1 -1
  74. package/assets/{getNFT-BPxN7Ctt.js → getNFT-CT5tK0Ef.js} +1 -1
  75. package/assets/{getNFT-DF0DVjz_.js → getNFT-DrIJlzTC.js} +2 -2
  76. package/assets/{github-BzQnkFuN.js → github-BJf_xM2L.js} +1 -1
  77. package/assets/{google-Gdkba30S.js → google-C2-k3hmM.js} +1 -1
  78. package/assets/{help-circle-CzuLd4UT.js → help-circle-DhiNMkUL.js} +1 -1
  79. package/assets/{id--DiZoCMN.js → id-D03_zXaW.js} +1 -1
  80. package/assets/{image-S2doqbWs.js → image-j5GaEWNQ.js} +1 -1
  81. package/assets/{in-app-wallet-calls-C1SY2oWN.js → in-app-wallet-calls-DeGARlNz.js} +1 -1
  82. package/assets/{index-ww85HWCV.js → index-5ciQHCfO.js} +1 -1
  83. package/assets/{index-b9i0Ibxp.js → index-Bd_zGIWs.js} +2 -2
  84. package/assets/index-BjzJcZq6.js +1 -1
  85. package/assets/{index-D7VWCQbE.js → index-BozJS3za.js} +1 -1
  86. package/assets/{index-f2LDpGwT.js → index-CUrz5-ZQ.js} +3 -3
  87. package/assets/{index-CfDhCkmV.js → index-CZdqu4HH.js} +1 -1
  88. package/assets/{index-CwwTvCG6.js → index-D4ZoaFaW.js} +1 -1
  89. package/assets/{index-CgkAqmHX.js → index-DDgA9b7k.js} +1 -1
  90. package/assets/{index-1ERaFZsE.js → index-DQ85yNMU.js} +1 -1
  91. package/assets/{index-CH2z5aZN.js → index-DT6Vj6dy.js} +2 -2
  92. package/assets/index-Dy0yjznp.js +1 -1
  93. package/assets/{index-C52TjtZ8.js → index-L3jxSgGB.js} +1 -1
  94. package/assets/index-Tsk25L8E.js +1 -0
  95. package/assets/{index-Dg2V4ned.js → index-jI5uKA2-.js} +1 -1
  96. package/assets/{index-T692f3s9.js → index-uTf7Q5m-.js} +1 -1
  97. package/assets/{index.es-CzqZMQ08.js → index.es-CAWfybMT.js} +3 -3
  98. package/assets/{index.es-D_Iyl52g.js → index.es-vTDnK87g.js} +1 -1
  99. package/assets/{info-DEpm9K4l.js → info-DYDmmmBF.js} +1 -1
  100. package/assets/{info-circle-BFBSJV6L.js → info-circle-CcOS1QbV.js} +1 -1
  101. package/assets/jsx-runtime-DncYoG30.js +1 -1
  102. package/assets/{lightbulb-GZWMuOVt.js → lightbulb-Byuz2x7E.js} +1 -1
  103. package/assets/{localBatchGatewayRequest-Df9EBRM7.js → localBatchGatewayRequest-BOvl6QMW.js} +1 -1
  104. package/assets/{mail-CUdb6dNj.js → mail-Dmlstk1E.js} +1 -1
  105. package/assets/{mobile-BeQz2cn_.js → mobile-BHFF9Tp-.js} +1 -1
  106. package/assets/{more-TsN-CR-t.js → more-Uov13zHU.js} +1 -1
  107. package/assets/{network-placeholder-DwFC6B_7.js → network-placeholder-DPsAlG2a.js} +1 -1
  108. package/assets/{nftPlaceholder-CiT4A3-l.js → nftPlaceholder-CKa3uzSG.js} +1 -1
  109. package/assets/{off-CUv-83kc.js → off-BvxFNTc7.js} +1 -1
  110. package/assets/{openzeppelin-BBJIIsPB.js → openzeppelin-BmJC0lXu.js} +1 -1
  111. package/assets/{ownerOf-DYtTCeNU.js → ownerOf-CaDY4Qro.js} +1 -1
  112. package/assets/{parseNft-Buclbv5Y.js → parseNft-CwTDpy0g.js} +2 -2
  113. package/assets/{play-store-RQqRTPUT.js → play-store-COAN7GVZ.js} +1 -1
  114. package/assets/{plus-C7MITUNH.js → plus-YCFIwODs.js} +1 -1
  115. package/assets/preload-helper-CO43ckIt.js +1 -0
  116. package/assets/{qr-code-CpEPSAYR.js → qr-code-CQNjoP1_.js} +1 -1
  117. package/assets/{qr-overlay-DryFOQCX.js → qr-overlay-C8VtIF-5.js} +1 -1
  118. package/assets/{recycle-horizontal-B1QKxNTd.js → recycle-horizontal-BXBBKttg.js} +1 -1
  119. package/assets/{refresh-DdqLkUQx.js → refresh-DGzlkz4z.js} +1 -1
  120. package/assets/remoteEntry.js +1 -1
  121. package/assets/{reown-logo-_t3NoThE.js → reown-logo-41ZwC8Wb.js} +1 -1
  122. package/assets/{resolveImplementation--gaCsV-s.js → resolveImplementation-DM6BHeji.js} +1 -1
  123. package/assets/{search-B8WbQmvE.js → search-DkZZHruy.js} +1 -1
  124. package/assets/{secp256k1-DtCHzlC3.js → secp256k1-CmqR8ec3.js} +1 -1
  125. package/assets/{send-BFNT_o0R.js → send-DY97Hjge.js} +1 -1
  126. package/assets/{send-batch-transaction-ZanhTs8a.js → send-batch-transaction-BLPmGB9M.js} +1 -1
  127. package/assets/{send-eip712-transaction-CxRy-sD1.js → send-eip712-transaction-t91PBSUH.js} +2 -2
  128. package/assets/{send-gasless-transaction-Iz8ZLiHO.js → send-gasless-transaction-DRbTPij5.js} +2 -2
  129. package/assets/{serializeTransaction-BufQeOel.js → serializeTransaction-DePWMgRx.js} +1 -1
  130. package/assets/{session-proposal-BD47nRI-.js → session-proposal-BPk-6kBm.js} +1 -1
  131. package/assets/{session-request-TkgpbjLp.js → session-request-mTPTFyu8.js} +2 -2
  132. package/assets/{signing-TLGj9K79.js → signing-fd2Rp8P0.js} +3 -3
  133. package/assets/{swapHorizontal-BiFAMUuS.js → swapHorizontal-4B3kHTpA.js} +1 -1
  134. package/assets/{swapHorizontalBold-CP3dUSZb.js → swapHorizontalBold-CLCm8M1r.js} +1 -1
  135. package/assets/{swapHorizontalMedium-BRNlkDrO.js → swapHorizontalMedium-pth8maKg.js} +1 -1
  136. package/assets/{swapHorizontalRoundedBold-CHqEVcBs.js → swapHorizontalRoundedBold-D9RueXfE.js} +1 -1
  137. package/assets/{swapVertical-Du0QoNAI.js → swapVertical-DgFWMAab.js} +1 -1
  138. package/assets/{telegram-DQef1ILU.js → telegram-CRzvpklN.js} +1 -1
  139. package/assets/{thirdweb-E-fErz2x.js → thirdweb-BDeAJ4oX.js} +3 -3
  140. package/assets/{three-dots-ByXtSGCV.js → three-dots-CAGpqs78.js} +1 -1
  141. package/assets/{totalSupply-DNIfxfBv.js → totalSupply-BOyOYvTD.js} +1 -1
  142. package/assets/{twitch-DIxDFqku.js → twitch-C0_LdJeE.js} +1 -1
  143. package/assets/{twitterIcon-B-SNXvpz.js → twitterIcon-BA_gSMJq.js} +1 -1
  144. package/assets/{uid-Bq9ktEE-.js → uid-QS91sMSf.js} +3 -3
  145. package/assets/{verify-BT-sFhiZ.js → verify-Doijrccq.js} +1 -1
  146. package/assets/{verify-filled-DUDJcSxD.js → verify-filled-Dzvol2nT.js} +1 -1
  147. package/assets/{w3m-modal-Ck71GkBa.js → w3m-modal-XdpZEDU9.js} +1 -1
  148. package/assets/{wait-for-tx-receipt-C5afrCK7.js → wait-for-tx-receipt-tKiSk-wy.js} +1 -1
  149. package/assets/{wallet-DiXkPY80.js → wallet-aBFrt0kW.js} +1 -1
  150. package/assets/{wallet-placeholder-DHuJakoz.js → wallet-placeholder-CLPfteFW.js} +1 -1
  151. package/assets/{walletconnect-LtvddLlL.js → walletconnect-RkdjesgD.js} +1 -1
  152. package/assets/{wallets-BmZ-KVbp.js → wallets-z86vtyeQ.js} +5 -5
  153. package/assets/{warning-circle-DEf5ta8Y.js → warning-circle-C3Uif538.js} +1 -1
  154. package/assets/{web-connector-6KYcG8gr.js → web-connector-Cf7r9kv3.js} +3 -3
  155. package/assets/{webSocket-2Mm3WVrI.js → webSocket-C9MEjwL1.js} +1 -1
  156. package/assets/{x-Cl1yAHbN.js → x-DMVfcf_O.js} +1 -1
  157. package/index.html +17 -17
  158. package/package.json +3 -3
  159. package/assets/__federation_shared_@emotion/react-LISJiiTk.js +0 -1
  160. package/assets/index-DIxygMtO.js +0 -1
  161. package/assets/preload-helper-BokH5fd6.js +0 -1
@@ -1,4 +1,4 @@
1
- import{w as l}from"./core-iy2F1EJT.js";const o=l`<svg fill="none" viewBox="0 0 14 15">
1
+ import{w as l}from"./core-9XBuvaBL.js";const o=l`<svg fill="none" viewBox="0 0 14 15">
2
2
  <path
3
3
  fill="currentColor"
4
4
  fill-rule="evenodd"
@@ -1 +1 @@
1
- import{b as _,h as L}from"./estimate-gas-CMPxVjuF.js";const V="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz",U=V.length,M=V.charAt(0),z=Math.log(256)/Math.log(U);function F(t){if(!(t instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(t.length===0)return"";let e=0,i=0,n=0;const s=t.length;for(;n!==s&&t[n]===0;)n++,e++;const c=(s-n)*z+1>>>0,a=new Uint8Array(c);for(;n!==s;){let d=t[n]||0,w=0;for(let h=c-1;(d!==0||w<i)&&h!==-1;h--,w++)d+=256*(a[h]||0)>>>0,a[h]=d%U>>>0,d=d/U>>>0;if(d!==0)throw new Error("Non-zero carry");i=w,n++}let l=c-i;for(;l!==c&&a[l]===0;)l++;let u=M.repeat(e);for(;l<c;++l)u+=V.charAt(a[l]||0);return u}let o,E,r=0,j={},b,N;const D=0;let C=0,S,R,I;const $={mapsAsObjects:!0,useRecords:!1};function v(t){let e;if(t<16&&(e=T(t)))return e;if(t>64&&decoder)return decoder.decode(o.subarray(r,r+=t));const i=r+t,n=[];for(e="";r<i;){const s=o[r++];if(!(s&128))n.push(s);else if((s&224)===192){const c=o[r++]&63;n.push((s&31)<<6|c)}else if((s&240)===224){const c=o[r++]&63,a=o[r++]&63;n.push((s&31)<<12|c<<6|a)}else if((s&248)===240){const c=o[r++]&63,a=o[r++]&63,l=o[r++]&63;let u=(s&7)<<18|c<<12|a<<6|l;u>65535&&(u-=65536,n.push(u>>>10&1023|55296),u=56320|u&1023),n.push(u)}else n.push(s);n.length>=4096&&(e+=x.apply(String,n),n.length=0)}return n.length>0&&(e+=x.apply(String,n)),e}class O{constructor(){Object.assign(this,$)}decodeKey(e){return e}decode(e,i=-1){E=i>-1?i:e.length,r=0,C=0,N=null,S=null,o=e;try{I=e.dataView||(e.dataView=new DataView(e.buffer,e.byteOffset,e.byteLength))}catch(n){throw o=null,e instanceof Uint8Array?n:new Error(`Source must be a Uint8Array or Buffer but was a ${e&&typeof e=="object"?e.constructor.name:typeof e}`)}return this instanceof O?(j=this,this.sharedValues&&(this.pack?new Array(this.maxPrivatePackedValues||16).concat(this.sharedValues):this.sharedValues),(!b||b.length>0)&&(b=[])):(j=$,(!b||b.length>0)&&(b=[])),H()}}function H(){try{const t=g();if(S){if(r>=S.postBundlePosition){const e=new Error("Unexpected bundle position");throw e.incomplete=!0,e}r=S.postBundlePosition,S=null}if(r===E)b=null,o=null,R&&(R=null);else if(r>E){const e=new Error("Unexpected end of CBOR data");throw e.incomplete=!0,e}else throw new Error("Data read, but end of buffer not reached");return t}catch(t){throw q(),(t instanceof RangeError||t.message.startsWith("Unexpected end of buffer"))&&(t.incomplete=!0),t}}function g(){let t=o[r++];const e=t>>5;if(t=t&31,t>23)switch(t){case 24:t=o[r++];break;default:throw new Error(`Unknown token ${t}`)}switch(e){case 0:return t;case 1:return~t;case 2:return W(t);case 3:if(C>=r)return N.slice(r-D,(r+=t)-D);if(C===0&&E<140&&t<32){const i=t<16?T(t):K(t);if(i!==null)return i}return v(t);case 4:{const i=new Array(t);for(let n=0;n<t;n++)i[n]=g();return i}case 5:{const i={};for(let n=0;n<t;n++)i[J(g())]=g();return i}default:if(Number.isNaN(t)){const i=new Error("Unexpected end of CBOR data");throw i.incomplete=!0,i}throw new Error(`Unknown CBOR token ${t}`)}}function J(t){if(typeof t=="string")return t==="__proto__"?"__proto_":t;if(typeof t!="object")return t.toString();throw new Error(`Invalid property name type ${typeof t}`)}const x=String.fromCharCode;function K(t){const e=r,i=new Array(t);for(let n=0;n<t;n++){const s=o[r++];if((s&128)>0){r=e;return}i[n]=s}return x.apply(String,i)}function T(t){if(t<4){if(t<2){if(t===0)return"";const k=o[r++];if((k&128)>1){r-=1;return}return x(k)}const f=o[r++],p=o[r++];if((f&128)>0||(p&128)>0){r-=2;return}if(t<3)return x(f,p);const y=o[r++];if((y&128)>0){r-=3;return}return x(f,p,y)}const e=o[r++],i=o[r++],n=o[r++],s=o[r++];if((e&128)>0||(i&128)>0||(n&128)>0||(s&128)>0){r-=4;return}if(t<6){if(t===4)return x(e,i,n,s);const f=o[r++];if((f&128)>0){r-=5;return}return x(e,i,n,s,f)}if(t<8){const f=o[r++],p=o[r++];if((f&128)>0||(p&128)>0){r-=6;return}if(t<7)return x(e,i,n,s,f,p);const y=o[r++];if((y&128)>0){r-=7;return}return x(e,i,n,s,f,p,y)}const c=o[r++],a=o[r++],l=o[r++],u=o[r++];if((c&128)>0||(a&128)>0||(l&128)>0||(u&128)>0){r-=8;return}if(t<10){if(t===8)return x(e,i,n,s,c,a,l,u);const f=o[r++];if((f&128)>0){r-=9;return}return x(e,i,n,s,c,a,l,u,f)}if(t<12){const f=o[r++],p=o[r++];if((f&128)>0||(p&128)>0){r-=10;return}if(t<11)return x(e,i,n,s,c,a,l,u,f,p);const y=o[r++];if((y&128)>0){r-=11;return}return x(e,i,n,s,c,a,l,u,f,p,y)}const d=o[r++],w=o[r++],h=o[r++],m=o[r++];if((d&128)>0||(w&128)>0||(h&128)>0||(m&128)>0){r-=12;return}if(t<14){if(t===12)return x(e,i,n,s,c,a,l,u,d,w,h,m);const f=o[r++];if((f&128)>0){r-=13;return}return x(e,i,n,s,c,a,l,u,d,w,h,m,f)}const A=o[r++],B=o[r++];if((A&128)>0||(B&128)>0){r-=14;return}if(t<15)return x(e,i,n,s,c,a,l,u,d,w,h,m,A,B);const P=o[r++];if((P&128)>0){r-=15;return}return x(e,i,n,s,c,a,l,u,d,w,h,m,A,B,P)}function W(t){return j.copyBuffers?Uint8Array.prototype.slice.call(o,r,r+=t):o.subarray(r,r+=t)}function q(){o=null,R=null,b=null}const G=new Array(147);for(let t=0;t<256;t++)G[t]=+`1e${Math.floor(45.15-t*.30103)}`;const Q=new O,X=Q.decode;function Y(t){return _(t,{strict:!1})?t:`0x${t}`}function tt(t){const e=L(Y(t)),i=e[e.length-2]*256+e[e.length-1],n=e.length-2-i;if(n<0||n>e.length)return;const s=e.slice(n,-2),c=X(s);if("ipfs"in c)return`ipfs://${F(c.ipfs)}`}export{tt as extractIPFSUri};
1
+ import{b as _,h as L}from"./estimate-gas-BG6-Kqmv.js";const V="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz",U=V.length,M=V.charAt(0),z=Math.log(256)/Math.log(U);function F(t){if(!(t instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(t.length===0)return"";let e=0,i=0,n=0;const s=t.length;for(;n!==s&&t[n]===0;)n++,e++;const c=(s-n)*z+1>>>0,a=new Uint8Array(c);for(;n!==s;){let d=t[n]||0,w=0;for(let h=c-1;(d!==0||w<i)&&h!==-1;h--,w++)d+=256*(a[h]||0)>>>0,a[h]=d%U>>>0,d=d/U>>>0;if(d!==0)throw new Error("Non-zero carry");i=w,n++}let l=c-i;for(;l!==c&&a[l]===0;)l++;let u=M.repeat(e);for(;l<c;++l)u+=V.charAt(a[l]||0);return u}let o,E,r=0,j={},b,N;const D=0;let C=0,S,R,I;const $={mapsAsObjects:!0,useRecords:!1};function v(t){let e;if(t<16&&(e=T(t)))return e;if(t>64&&decoder)return decoder.decode(o.subarray(r,r+=t));const i=r+t,n=[];for(e="";r<i;){const s=o[r++];if(!(s&128))n.push(s);else if((s&224)===192){const c=o[r++]&63;n.push((s&31)<<6|c)}else if((s&240)===224){const c=o[r++]&63,a=o[r++]&63;n.push((s&31)<<12|c<<6|a)}else if((s&248)===240){const c=o[r++]&63,a=o[r++]&63,l=o[r++]&63;let u=(s&7)<<18|c<<12|a<<6|l;u>65535&&(u-=65536,n.push(u>>>10&1023|55296),u=56320|u&1023),n.push(u)}else n.push(s);n.length>=4096&&(e+=x.apply(String,n),n.length=0)}return n.length>0&&(e+=x.apply(String,n)),e}class O{constructor(){Object.assign(this,$)}decodeKey(e){return e}decode(e,i=-1){E=i>-1?i:e.length,r=0,C=0,N=null,S=null,o=e;try{I=e.dataView||(e.dataView=new DataView(e.buffer,e.byteOffset,e.byteLength))}catch(n){throw o=null,e instanceof Uint8Array?n:new Error(`Source must be a Uint8Array or Buffer but was a ${e&&typeof e=="object"?e.constructor.name:typeof e}`)}return this instanceof O?(j=this,this.sharedValues&&(this.pack?new Array(this.maxPrivatePackedValues||16).concat(this.sharedValues):this.sharedValues),(!b||b.length>0)&&(b=[])):(j=$,(!b||b.length>0)&&(b=[])),H()}}function H(){try{const t=g();if(S){if(r>=S.postBundlePosition){const e=new Error("Unexpected bundle position");throw e.incomplete=!0,e}r=S.postBundlePosition,S=null}if(r===E)b=null,o=null,R&&(R=null);else if(r>E){const e=new Error("Unexpected end of CBOR data");throw e.incomplete=!0,e}else throw new Error("Data read, but end of buffer not reached");return t}catch(t){throw q(),(t instanceof RangeError||t.message.startsWith("Unexpected end of buffer"))&&(t.incomplete=!0),t}}function g(){let t=o[r++];const e=t>>5;if(t=t&31,t>23)switch(t){case 24:t=o[r++];break;default:throw new Error(`Unknown token ${t}`)}switch(e){case 0:return t;case 1:return~t;case 2:return W(t);case 3:if(C>=r)return N.slice(r-D,(r+=t)-D);if(C===0&&E<140&&t<32){const i=t<16?T(t):K(t);if(i!==null)return i}return v(t);case 4:{const i=new Array(t);for(let n=0;n<t;n++)i[n]=g();return i}case 5:{const i={};for(let n=0;n<t;n++)i[J(g())]=g();return i}default:if(Number.isNaN(t)){const i=new Error("Unexpected end of CBOR data");throw i.incomplete=!0,i}throw new Error(`Unknown CBOR token ${t}`)}}function J(t){if(typeof t=="string")return t==="__proto__"?"__proto_":t;if(typeof t!="object")return t.toString();throw new Error(`Invalid property name type ${typeof t}`)}const x=String.fromCharCode;function K(t){const e=r,i=new Array(t);for(let n=0;n<t;n++){const s=o[r++];if((s&128)>0){r=e;return}i[n]=s}return x.apply(String,i)}function T(t){if(t<4){if(t<2){if(t===0)return"";const k=o[r++];if((k&128)>1){r-=1;return}return x(k)}const f=o[r++],p=o[r++];if((f&128)>0||(p&128)>0){r-=2;return}if(t<3)return x(f,p);const y=o[r++];if((y&128)>0){r-=3;return}return x(f,p,y)}const e=o[r++],i=o[r++],n=o[r++],s=o[r++];if((e&128)>0||(i&128)>0||(n&128)>0||(s&128)>0){r-=4;return}if(t<6){if(t===4)return x(e,i,n,s);const f=o[r++];if((f&128)>0){r-=5;return}return x(e,i,n,s,f)}if(t<8){const f=o[r++],p=o[r++];if((f&128)>0||(p&128)>0){r-=6;return}if(t<7)return x(e,i,n,s,f,p);const y=o[r++];if((y&128)>0){r-=7;return}return x(e,i,n,s,f,p,y)}const c=o[r++],a=o[r++],l=o[r++],u=o[r++];if((c&128)>0||(a&128)>0||(l&128)>0||(u&128)>0){r-=8;return}if(t<10){if(t===8)return x(e,i,n,s,c,a,l,u);const f=o[r++];if((f&128)>0){r-=9;return}return x(e,i,n,s,c,a,l,u,f)}if(t<12){const f=o[r++],p=o[r++];if((f&128)>0||(p&128)>0){r-=10;return}if(t<11)return x(e,i,n,s,c,a,l,u,f,p);const y=o[r++];if((y&128)>0){r-=11;return}return x(e,i,n,s,c,a,l,u,f,p,y)}const d=o[r++],w=o[r++],h=o[r++],m=o[r++];if((d&128)>0||(w&128)>0||(h&128)>0||(m&128)>0){r-=12;return}if(t<14){if(t===12)return x(e,i,n,s,c,a,l,u,d,w,h,m);const f=o[r++];if((f&128)>0){r-=13;return}return x(e,i,n,s,c,a,l,u,d,w,h,m,f)}const A=o[r++],B=o[r++];if((A&128)>0||(B&128)>0){r-=14;return}if(t<15)return x(e,i,n,s,c,a,l,u,d,w,h,m,A,B);const P=o[r++];if((P&128)>0){r-=15;return}return x(e,i,n,s,c,a,l,u,d,w,h,m,A,B,P)}function W(t){return j.copyBuffers?Uint8Array.prototype.slice.call(o,r,r+=t):o.subarray(r,r+=t)}function q(){o=null,R=null,b=null}const G=new Array(147);for(let t=0;t<256;t++)G[t]=+`1e${Math.floor(45.15-t*.30103)}`;const Q=new O,X=Q.decode;function Y(t){return _(t,{strict:!1})?t:`0x${t}`}function tt(t){const e=L(Y(t)),i=e[e.length-2]*256+e[e.length-1],n=e.length-2-i;if(n<0||n>e.length)return;const s=e.slice(n,-2),c=X(s);if("ipfs"in c)return`ipfs://${F(c.ipfs)}`}export{tt as extractIPFSUri};
@@ -1,4 +1,4 @@
1
- import{w as l}from"./core-iy2F1EJT.js";const f=l`<svg fill="none" viewBox="0 0 40 40">
1
+ import{w as l}from"./core-9XBuvaBL.js";const f=l`<svg fill="none" viewBox="0 0 40 40">
2
2
  <g clip-path="url(#a)">
3
3
  <g clip-path="url(#b)">
4
4
  <circle cx="20" cy="19.89" r="20" fill="#1877F2" />
@@ -1,4 +1,4 @@
1
- import{w as h}from"./core-iy2F1EJT.js";const a=h`<svg style="border-radius: 9999px; overflow: hidden;" fill="none" viewBox="0 0 1000 1000">
1
+ import{w as h}from"./core-9XBuvaBL.js";const a=h`<svg style="border-radius: 9999px; overflow: hidden;" fill="none" viewBox="0 0 1000 1000">
2
2
  <rect width="1000" height="1000" rx="9999" ry="9999" fill="#855DCD"/>
3
3
  <path fill="#855DCD" d="M0 0h1000v1000H0V0Z" />
4
4
  <path
@@ -1 +1 @@
1
- import{importShared as p}from"./__federation_fn_import-D82-s3kA.js";import{n as x,h as y}from"./hex-B0Rx0hII.js";import{getRpcClient as m}from"./rpc-ti0b0r_u.js";import{r as u,a as f}from"./op-gas-fee-reducer-CfxMcvXl.js";const{formatBlock:G}=await p("viem");async function b(t,e){const n=e.blockTag??"latest",r=e.includeTransactions??!1,a=e.blockNumber!==void 0?x(e.blockNumber):void 0,i=await t({method:"eth_getBlockByNumber",params:[a||n,r]});if(!i)throw new Error("Block not found");return G(i)}async function h(t){const e=await t({method:"eth_maxPriorityFeePerGas"});return y(e)}function F(t,e){const n=t.toString(),r=n[0]==="-"?"-":"",i=(r?n.slice(1):n).padStart(e+1,"0"),c=i.length-e,l=i.slice(0,c)||"0";let s=i.slice(c);for(let o=s.length-1;o>=0;o--){if(s[o]!=="0"){s=s.slice(0,o+1);break}o===0&&(s="")}return`${r}${l}${s?`.${s}`:""}`}function _(t){return F(t,18)}function P(t,e){t.includes("e")&&(t=Number(t).toFixed(e));let[n,r=""]=t.split(".");const a=n.startsWith("-")?"-":"";if(a&&(n=n.slice(1)),r=r.padEnd(e,"0"),e===0)r[0]&&Number.parseInt(r[0])>=5&&(n=(BigInt(n)+1n).toString()),r="";else if(r.length>e){const i=r[e];i&&Number.parseInt(i,10)>=5?(r=(BigInt(r.substring(0,e))+1n).toString().padStart(e,"0"),r.length>e&&(n=(BigInt(n)+1n).toString(),r=r.substring(r.length-e))):r=r.substring(0,e)}return BigInt(`${a}${n}${r}`)}function w(t){return P(t,18)}function I(t){return P(t,9)}const M=Object.freeze(Object.defineProperty({__proto__:null,fromGwei:I,toEther:_,toTokens:F,toUnits:P,toWei:w},Symbol.toStringTag,{value:"Module"}));async function S(t){const e=await t({method:"eth_gasPrice"});return y(e)}async function g(t){const{client:e,chain:n,percentMultiplier:r}=t,a=m({chain:n,client:e}),i=await S(a),c=r?i/BigInt(100)*BigInt(r):0n;return i+c}const B=[78600,2040,248,9372,841,842,2016,9768,2442,1942999413,1952959480,994873017,19011,40875,1511670449,5464,2020,2021,98866,1417429182];async function T(t){const[e,n,r,a]=await Promise.all([u(t.maxFeePerGas),u(t.maxPriorityFeePerGas),u(t.gasPrice),u(t.type)]);if(e!==void 0&&n!==void 0)return{maxFeePerGas:e,maxPriorityFeePerGas:n};if(typeof r=="bigint")return{gasPrice:r};const i=await d(t.client,t.chain,a==="legacy"?"legacy":"eip1559");return t.chain.experimental?.increaseZeroByteCount?i.gasPrice?{gasPrice:f(i.gasPrice)}:{maxFeePerGas:e??f(i.maxFeePerGas??0n),maxPriorityFeePerGas:n??f(i.maxPriorityFeePerGas??0n)}:i.gasPrice!==void 0?i:{maxFeePerGas:e??i.maxFeePerGas,maxPriorityFeePerGas:n??i.maxPriorityFeePerGas}}async function d(t,e,n){if((n??e.feeType)==="legacy"||B.includes(e.id))return{gasPrice:await g({chain:e,client:t,percentMultiplier:10})};const a=await k(t,e);return a.maxFeePerGas!==null&&a.maxPriorityFeePerGas!==null?{maxFeePerGas:a.maxFeePerGas,maxPriorityFeePerGas:a.maxPriorityFeePerGas}:{gasPrice:await g({chain:e,client:t,percentMultiplier:10})}}async function k(t,e,n=10){let r=null,a=null;const i=m({chain:e,client:t}),[c,l]=await Promise.all([b(i,{blockTag:"latest"}),h(i).catch(()=>null)]),s=c?.baseFeePerGas,o=e.id;return o===220||o===1220?{maxFeePerGas:null,maxPriorityFeePerGas:null}:(o===80002||o===137?a=await C(o):l!==null&&(a=l),a==null||s==null?{maxFeePerGas:null,maxPriorityFeePerGas:null}:(a=N(a,n),r=s*2n+a,(o===42220||o===44787||o===62320)&&(a=r),{maxFeePerGas:r,maxPriorityFeePerGas:a}))}function N(t,e=10){const n=t/BigInt(100)*BigInt(e);return t+n}function v(t){switch(t){case 137:return"https://gasstation.polygon.technology/v2";case 80002:return"https://gasstation.polygon.technology/amoy"}}const O=31n;async function C(t){const e=v(t);try{const r=(await(await fetch(e)).json()).fast.maxPriorityFee;if(r>0){const a=Number.parseFloat(r).toFixed(9);return P(a,9)}}catch(n){console.error("failed to fetch gas",n)}return O}const R=Object.freeze(Object.defineProperty({__proto__:null,getDefaultGasOverrides:d,getGasOverridesForTransaction:T},Symbol.toStringTag,{value:"Module"}));export{P as a,w as b,_ as c,b as d,S as e,h as f,d as g,I as h,g as i,T as j,R as k,F as t,M as u};
1
+ import{importShared as p}from"./__federation_fn_import-BOkD8n2P.js";import{n as x,h as y}from"./hex-B0Rx0hII.js";import{getRpcClient as m}from"./rpc-ti0b0r_u.js";import{r as u,a as f}from"./op-gas-fee-reducer-CfxMcvXl.js";const{formatBlock:G}=await p("viem");async function b(t,e){const n=e.blockTag??"latest",r=e.includeTransactions??!1,a=e.blockNumber!==void 0?x(e.blockNumber):void 0,i=await t({method:"eth_getBlockByNumber",params:[a||n,r]});if(!i)throw new Error("Block not found");return G(i)}async function h(t){const e=await t({method:"eth_maxPriorityFeePerGas"});return y(e)}function F(t,e){const n=t.toString(),r=n[0]==="-"?"-":"",i=(r?n.slice(1):n).padStart(e+1,"0"),c=i.length-e,l=i.slice(0,c)||"0";let s=i.slice(c);for(let o=s.length-1;o>=0;o--){if(s[o]!=="0"){s=s.slice(0,o+1);break}o===0&&(s="")}return`${r}${l}${s?`.${s}`:""}`}function _(t){return F(t,18)}function P(t,e){t.includes("e")&&(t=Number(t).toFixed(e));let[n,r=""]=t.split(".");const a=n.startsWith("-")?"-":"";if(a&&(n=n.slice(1)),r=r.padEnd(e,"0"),e===0)r[0]&&Number.parseInt(r[0])>=5&&(n=(BigInt(n)+1n).toString()),r="";else if(r.length>e){const i=r[e];i&&Number.parseInt(i,10)>=5?(r=(BigInt(r.substring(0,e))+1n).toString().padStart(e,"0"),r.length>e&&(n=(BigInt(n)+1n).toString(),r=r.substring(r.length-e))):r=r.substring(0,e)}return BigInt(`${a}${n}${r}`)}function w(t){return P(t,18)}function I(t){return P(t,9)}const M=Object.freeze(Object.defineProperty({__proto__:null,fromGwei:I,toEther:_,toTokens:F,toUnits:P,toWei:w},Symbol.toStringTag,{value:"Module"}));async function S(t){const e=await t({method:"eth_gasPrice"});return y(e)}async function g(t){const{client:e,chain:n,percentMultiplier:r}=t,a=m({chain:n,client:e}),i=await S(a),c=r?i/BigInt(100)*BigInt(r):0n;return i+c}const B=[78600,2040,248,9372,841,842,2016,9768,2442,1942999413,1952959480,994873017,19011,40875,1511670449,5464,2020,2021,98866,1417429182];async function T(t){const[e,n,r,a]=await Promise.all([u(t.maxFeePerGas),u(t.maxPriorityFeePerGas),u(t.gasPrice),u(t.type)]);if(e!==void 0&&n!==void 0)return{maxFeePerGas:e,maxPriorityFeePerGas:n};if(typeof r=="bigint")return{gasPrice:r};const i=await d(t.client,t.chain,a==="legacy"?"legacy":"eip1559");return t.chain.experimental?.increaseZeroByteCount?i.gasPrice?{gasPrice:f(i.gasPrice)}:{maxFeePerGas:e??f(i.maxFeePerGas??0n),maxPriorityFeePerGas:n??f(i.maxPriorityFeePerGas??0n)}:i.gasPrice!==void 0?i:{maxFeePerGas:e??i.maxFeePerGas,maxPriorityFeePerGas:n??i.maxPriorityFeePerGas}}async function d(t,e,n){if((n??e.feeType)==="legacy"||B.includes(e.id))return{gasPrice:await g({chain:e,client:t,percentMultiplier:10})};const a=await k(t,e);return a.maxFeePerGas!==null&&a.maxPriorityFeePerGas!==null?{maxFeePerGas:a.maxFeePerGas,maxPriorityFeePerGas:a.maxPriorityFeePerGas}:{gasPrice:await g({chain:e,client:t,percentMultiplier:10})}}async function k(t,e,n=10){let r=null,a=null;const i=m({chain:e,client:t}),[c,l]=await Promise.all([b(i,{blockTag:"latest"}),h(i).catch(()=>null)]),s=c?.baseFeePerGas,o=e.id;return o===220||o===1220?{maxFeePerGas:null,maxPriorityFeePerGas:null}:(o===80002||o===137?a=await C(o):l!==null&&(a=l),a==null||s==null?{maxFeePerGas:null,maxPriorityFeePerGas:null}:(a=N(a,n),r=s*2n+a,(o===42220||o===44787||o===62320)&&(a=r),{maxFeePerGas:r,maxPriorityFeePerGas:a}))}function N(t,e=10){const n=t/BigInt(100)*BigInt(e);return t+n}function v(t){switch(t){case 137:return"https://gasstation.polygon.technology/v2";case 80002:return"https://gasstation.polygon.technology/amoy"}}const O=31n;async function C(t){const e=v(t);try{const r=(await(await fetch(e)).json()).fast.maxPriorityFee;if(r>0){const a=Number.parseFloat(r).toFixed(9);return P(a,9)}}catch(n){console.error("failed to fetch gas",n)}return O}const R=Object.freeze(Object.defineProperty({__proto__:null,getDefaultGasOverrides:d,getGasOverridesForTransaction:T},Symbol.toStringTag,{value:"Module"}));export{P as a,w as b,_ as c,b as d,S as e,h as f,d as g,I as h,g as i,T as j,R as k,F as t,M as u};
@@ -1,2 +1,2 @@
1
- const __vite__fileDeps=["assets/estimate-gas-CMPxVjuF.js","assets/preload-helper-BokH5fd6.js","assets/__federation_fn_import-D82-s3kA.js","assets/hex-B0Rx0hII.js","assets/op-gas-fee-reducer-CfxMcvXl.js","assets/withCache-DYumIHzL.js","assets/json-BHzNJmTy.js"],__vite__mapDeps=i=>i.map(i=>__vite__fileDeps[i]);
2
- import{_ as c}from"./preload-helper-BokH5fd6.js";import{a as s}from"./uint8-array-DZKEMhA1.js";import{n as d}from"./hex-B0Rx0hII.js";const f="data:application/json;base64";function u(r){return!!r.toLowerCase().startsWith(f)}function l(r){const a=r.indexOf(","),o=r.slice(a+1);return s(o)}const h="data:application/json;utf-8";function w(r){return!!r.toLowerCase().startsWith(h)}function m(r){const a=r.indexOf(","),o=r.slice(a+1);try{return decodeURIComponent(o)}catch{return o}}async function y(r){const{client:a,tokenId:o,tokenUri:e}=r;if(u(e))try{return JSON.parse(l(e))}catch(t){throw console.error("Failed to fetch base64 encoded NFT",{tokenId:o,tokenUri:e},t),t}if(w(e))try{return JSON.parse(m(e))}catch(t){throw console.error("Failed to fetch utf8 encoded NFT",{tokenId:o,tokenUri:e},t),t}const{download:n}=await c(async()=>{const{download:t}=await import("./estimate-gas-CMPxVjuF.js").then(i=>i.F);return{download:t}},__vite__mapDeps([0,1,2,3,4,5,6]));try{if(!e.includes("{id}"))return await(await n({client:a,uri:e})).json()}catch(t){throw console.error("Failed to fetch non-dynamic NFT",{tokenId:o,tokenUri:e},t),t}try{try{return await(await n({client:a,uri:e.replace("{id}",d(o,{size:32}).slice(2))})).json()}catch{return await(await n({client:a,uri:e.replace("{id}",o.toString())})).json()}}catch(t){throw console.error("Failed to fetch dynamic NFT",{tokenId:o,tokenUri:e},t),t}}export{y as f};
1
+ const __vite__fileDeps=["assets/estimate-gas-BG6-Kqmv.js","assets/preload-helper-CO43ckIt.js","assets/__federation_fn_import-BOkD8n2P.js","assets/hex-B0Rx0hII.js","assets/op-gas-fee-reducer-CfxMcvXl.js","assets/withCache-DYumIHzL.js","assets/json-BHzNJmTy.js"],__vite__mapDeps=i=>i.map(i=>__vite__fileDeps[i]);
2
+ import{_ as c}from"./preload-helper-CO43ckIt.js";import{a as s}from"./uint8-array-DZKEMhA1.js";import{n as d}from"./hex-B0Rx0hII.js";const f="data:application/json;base64";function u(r){return!!r.toLowerCase().startsWith(f)}function l(r){const a=r.indexOf(","),o=r.slice(a+1);return s(o)}const h="data:application/json;utf-8";function w(r){return!!r.toLowerCase().startsWith(h)}function m(r){const a=r.indexOf(","),o=r.slice(a+1);try{return decodeURIComponent(o)}catch{return o}}async function y(r){const{client:a,tokenId:o,tokenUri:e}=r;if(u(e))try{return JSON.parse(l(e))}catch(t){throw console.error("Failed to fetch base64 encoded NFT",{tokenId:o,tokenUri:e},t),t}if(w(e))try{return JSON.parse(m(e))}catch(t){throw console.error("Failed to fetch utf8 encoded NFT",{tokenId:o,tokenUri:e},t),t}const{download:n}=await c(async()=>{const{download:t}=await import("./estimate-gas-BG6-Kqmv.js").then(i=>i.F);return{download:t}},__vite__mapDeps([0,1,2,3,4,5,6]));try{if(!e.includes("{id}"))return await(await n({client:a,uri:e})).json()}catch(t){throw console.error("Failed to fetch non-dynamic NFT",{tokenId:o,tokenUri:e},t),t}try{try{return await(await n({client:a,uri:e.replace("{id}",d(o,{size:32}).slice(2))})).json()}catch{return await(await n({client:a,uri:e.replace("{id}",o.toString())})).json()}}catch(t){throw console.error("Failed to fetch dynamic NFT",{tokenId:o,tokenUri:e},t),t}}export{y as f};
@@ -1,4 +1,4 @@
1
- import{w as e}from"./core-iy2F1EJT.js";const a=e`<svg fill="none" viewBox="0 0 16 16">
1
+ import{w as e}from"./core-9XBuvaBL.js";const a=e`<svg fill="none" viewBox="0 0 16 16">
2
2
  <path
3
3
  fill="currentColor"
4
4
  fill-rule="evenodd"
@@ -1 +1 @@
1
- import{g as e}from"./wallets-BmZ-KVbp.js";async function u(n){const l=await e(n);return{app:{android:null,browser:null,chrome:null,edge:null,firefox:null,ios:null,linux:null,mac:null,opera:null,safari:null,windows:null},desktop:{native:null,universal:null},homepage:l.homepage||"",id:n,image_id:l.imageUrl||"",mobile:{native:null,universal:null},name:l.name,rdns:null}}export{u as getEcosystemWalletInfo};
1
+ import{g as e}from"./wallets-z86vtyeQ.js";async function u(n){const l=await e(n);return{app:{android:null,browser:null,chrome:null,edge:null,firefox:null,ios:null,linux:null,mac:null,opera:null,safari:null,windows:null},desktop:{native:null,universal:null},homepage:l.homepage||"",id:n,image_id:l.imageUrl||"",mobile:{native:null,universal:null},name:l.name,rdns:null}}export{u as getEcosystemWalletInfo};
@@ -1,2 +1,2 @@
1
1
  const __vite__fileDeps=["assets/utils-CozXUO91.js","assets/withCache-DYumIHzL.js"],__vite__mapDeps=i=>i.map(i=>__vite__fileDeps[i]);
2
- import{t as Ce}from"./fee-data-BCMgs11D.js";import{importShared as X}from"./__federation_fn_import-D82-s3kA.js";import{r as K,i as Te}from"./signing-TLGj9K79.js";import{_ as Ne}from"./preload-helper-BokH5fd6.js";import{w as ve}from"./withCache-DYumIHzL.js";import{d as Oe}from"./decimals-DIZDmdnI.js";const{decodeAbiParameters:wt}=await X("viem"),Se="0x70a08231",Ae=[{name:"_address",type:"address"}],Ze=[{type:"uint256"}];async function Re(s){return K({contract:s.contract,method:[Se,Ae,Ze],params:[s.address]})}var g;(function(s){s.assertEqual=a=>{};function e(a){}s.assertIs=e;function t(a){throw new Error}s.assertNever=t,s.arrayToEnum=a=>{const n={};for(const i of a)n[i]=i;return n},s.getValidEnumValues=a=>{const n=s.objectKeys(a).filter(d=>typeof a[a[d]]!="number"),i={};for(const d of n)i[d]=a[d];return s.objectValues(i)},s.objectValues=a=>s.objectKeys(a).map(function(n){return a[n]}),s.objectKeys=typeof Object.keys=="function"?a=>Object.keys(a):a=>{const n=[];for(const i in a)Object.prototype.hasOwnProperty.call(a,i)&&n.push(i);return n},s.find=(a,n)=>{for(const i of a)if(n(i))return i},s.isInteger=typeof Number.isInteger=="function"?a=>Number.isInteger(a):a=>typeof a=="number"&&Number.isFinite(a)&&Math.floor(a)===a;function r(a,n=" | "){return a.map(i=>typeof i=="string"?`'${i}'`:i).join(n)}s.joinValues=r,s.jsonStringifyReplacer=(a,n)=>typeof n=="bigint"?n.toString():n})(g||(g={}));var te;(function(s){s.mergeShapes=(e,t)=>({...e,...t})})(te||(te={}));const u=g.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),T=s=>{switch(typeof s){case"undefined":return u.undefined;case"string":return u.string;case"number":return Number.isNaN(s)?u.nan:u.number;case"boolean":return u.boolean;case"function":return u.function;case"bigint":return u.bigint;case"symbol":return u.symbol;case"object":return Array.isArray(s)?u.array:s===null?u.null:s.then&&typeof s.then=="function"&&s.catch&&typeof s.catch=="function"?u.promise:typeof Map<"u"&&s instanceof Map?u.map:typeof Set<"u"&&s instanceof Set?u.set:typeof Date<"u"&&s instanceof Date?u.date:u.object;default:return u.unknown}},o=g.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class C extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}format(e){const t=e||function(n){return n.message},r={_errors:[]},a=n=>{for(const i of n.issues)if(i.code==="invalid_union")i.unionErrors.map(a);else if(i.code==="invalid_return_type")a(i.returnTypeError);else if(i.code==="invalid_arguments")a(i.argumentsError);else if(i.path.length===0)r._errors.push(t(i));else{let d=r,h=0;for(;h<i.path.length;){const f=i.path[h];h===i.path.length-1?(d[f]=d[f]||{_errors:[]},d[f]._errors.push(t(i))):d[f]=d[f]||{_errors:[]},d=d[f],h++}}};return a(this),r}static assert(e){if(!(e instanceof C))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,g.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=t=>t.message){const t={},r=[];for(const a of this.issues)if(a.path.length>0){const n=a.path[0];t[n]=t[n]||[],t[n].push(e(a))}else r.push(e(a));return{formErrors:r,fieldErrors:t}}get formErrors(){return this.flatten()}}C.create=s=>new C(s);const Y=(s,e)=>{let t;switch(s.code){case o.invalid_type:s.received===u.undefined?t="Required":t=`Expected ${s.expected}, received ${s.received}`;break;case o.invalid_literal:t=`Invalid literal value, expected ${JSON.stringify(s.expected,g.jsonStringifyReplacer)}`;break;case o.unrecognized_keys:t=`Unrecognized key(s) in object: ${g.joinValues(s.keys,", ")}`;break;case o.invalid_union:t="Invalid input";break;case o.invalid_union_discriminator:t=`Invalid discriminator value. Expected ${g.joinValues(s.options)}`;break;case o.invalid_enum_value:t=`Invalid enum value. Expected ${g.joinValues(s.options)}, received '${s.received}'`;break;case o.invalid_arguments:t="Invalid function arguments";break;case o.invalid_return_type:t="Invalid function return type";break;case o.invalid_date:t="Invalid date";break;case o.invalid_string:typeof s.validation=="object"?"includes"in s.validation?(t=`Invalid input: must include "${s.validation.includes}"`,typeof s.validation.position=="number"&&(t=`${t} at one or more positions greater than or equal to ${s.validation.position}`)):"startsWith"in s.validation?t=`Invalid input: must start with "${s.validation.startsWith}"`:"endsWith"in s.validation?t=`Invalid input: must end with "${s.validation.endsWith}"`:g.assertNever(s.validation):s.validation!=="regex"?t=`Invalid ${s.validation}`:t="Invalid";break;case o.too_small:s.type==="array"?t=`Array must contain ${s.exact?"exactly":s.inclusive?"at least":"more than"} ${s.minimum} element(s)`:s.type==="string"?t=`String must contain ${s.exact?"exactly":s.inclusive?"at least":"over"} ${s.minimum} character(s)`:s.type==="number"?t=`Number must be ${s.exact?"exactly equal to ":s.inclusive?"greater than or equal to ":"greater than "}${s.minimum}`:s.type==="bigint"?t=`Number must be ${s.exact?"exactly equal to ":s.inclusive?"greater than or equal to ":"greater than "}${s.minimum}`:s.type==="date"?t=`Date must be ${s.exact?"exactly equal to ":s.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(s.minimum))}`:t="Invalid input";break;case o.too_big:s.type==="array"?t=`Array must contain ${s.exact?"exactly":s.inclusive?"at most":"less than"} ${s.maximum} element(s)`:s.type==="string"?t=`String must contain ${s.exact?"exactly":s.inclusive?"at most":"under"} ${s.maximum} character(s)`:s.type==="number"?t=`Number must be ${s.exact?"exactly":s.inclusive?"less than or equal to":"less than"} ${s.maximum}`:s.type==="bigint"?t=`BigInt must be ${s.exact?"exactly":s.inclusive?"less than or equal to":"less than"} ${s.maximum}`:s.type==="date"?t=`Date must be ${s.exact?"exactly":s.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(s.maximum))}`:t="Invalid input";break;case o.custom:t="Invalid input";break;case o.invalid_intersection_types:t="Intersection results could not be merged";break;case o.not_multiple_of:t=`Number must be a multiple of ${s.multipleOf}`;break;case o.not_finite:t="Number must be finite";break;default:t=e.defaultError,g.assertNever(s)}return{message:t}};let Ie=Y;function Ee(){return Ie}const je=s=>{const{data:e,path:t,errorMaps:r,issueData:a}=s,n=[...t,...a.path||[]],i={...a,path:n};if(a.message!==void 0)return{...a,path:n,message:a.message};let d="";const h=r.filter(f=>!!f).slice().reverse();for(const f of h)d=f(i,{data:e,defaultError:d}).message;return{...a,path:n,message:d}};function c(s,e){const t=Ee(),r=je({issueData:e,data:s.data,path:s.path,errorMaps:[s.common.contextualErrorMap,s.schemaErrorMap,t,t===Y?void 0:Y].filter(a=>!!a)});s.common.issues.push(r)}class k{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,t){const r=[];for(const a of t){if(a.status==="aborted")return m;a.status==="dirty"&&e.dirty(),r.push(a.value)}return{status:e.value,value:r}}static async mergeObjectAsync(e,t){const r=[];for(const a of t){const n=await a.key,i=await a.value;r.push({key:n,value:i})}return k.mergeObjectSync(e,r)}static mergeObjectSync(e,t){const r={};for(const a of t){const{key:n,value:i}=a;if(n.status==="aborted"||i.status==="aborted")return m;n.status==="dirty"&&e.dirty(),i.status==="dirty"&&e.dirty(),n.value!=="__proto__"&&(typeof i.value<"u"||a.alwaysSet)&&(r[n.value]=i.value)}return{status:e.value,value:r}}}const m=Object.freeze({status:"aborted"}),M=s=>({status:"dirty",value:s}),b=s=>({status:"valid",value:s}),se=s=>s.status==="aborted",re=s=>s.status==="dirty",I=s=>s.status==="valid",D=s=>typeof Promise<"u"&&s instanceof Promise;var l;(function(s){s.errToObj=e=>typeof e=="string"?{message:e}:e||{},s.toString=e=>typeof e=="string"?e:e?.message})(l||(l={}));class S{constructor(e,t,r,a){this._cachedPath=[],this.parent=e,this.data=t,this._path=r,this._key=a}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const ae=(s,e)=>{if(I(e))return{success:!0,data:e.value};if(!s.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const t=new C(s.common.issues);return this._error=t,this._error}}};function _(s){if(!s)return{};const{errorMap:e,invalid_type_error:t,required_error:r,description:a}=s;if(e&&(t||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:a}:{errorMap:(i,d)=>{const{message:h}=s;return i.code==="invalid_enum_value"?{message:h??d.defaultError}:typeof d.data>"u"?{message:h??r??d.defaultError}:i.code!=="invalid_type"?{message:d.defaultError}:{message:h??t??d.defaultError}},description:a}}class y{get description(){return this._def.description}_getType(e){return T(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:T(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new k,ctx:{common:e.parent.common,data:e.data,parsedType:T(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(D(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const r=this.safeParse(e,t);if(r.success)return r.data;throw r.error}safeParse(e,t){const r={common:{issues:[],async:t?.async??!1,contextualErrorMap:t?.errorMap},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:T(e)},a=this._parseSync({data:e,path:r.path,parent:r});return ae(r,a)}"~validate"(e){const t={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:T(e)};if(!this["~standard"].async)try{const r=this._parseSync({data:e,path:[],parent:t});return I(r)?{value:r.value}:{issues:t.common.issues}}catch(r){r?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(r=>I(r)?{value:r.value}:{issues:t.common.issues})}async parseAsync(e,t){const r=await this.safeParseAsync(e,t);if(r.success)return r.data;throw r.error}async safeParseAsync(e,t){const r={common:{issues:[],contextualErrorMap:t?.errorMap,async:!0},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:T(e)},a=this._parse({data:e,path:r.path,parent:r}),n=await(D(a)?a:Promise.resolve(a));return ae(r,n)}refine(e,t){const r=a=>typeof t=="string"||typeof t>"u"?{message:t}:typeof t=="function"?t(a):t;return this._refinement((a,n)=>{const i=e(a),d=()=>n.addIssue({code:o.custom,...r(a)});return typeof Promise<"u"&&i instanceof Promise?i.then(h=>h?!0:(d(),!1)):i?!0:(d(),!1)})}refinement(e,t){return this._refinement((r,a)=>e(r)?!0:(a.addIssue(typeof t=="function"?t(r,a):t),!1))}_refinement(e){return new $({schema:this,typeName:p.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:t=>this["~validate"](t)}}optional(){return O.create(this,this._def)}nullable(){return P.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return w.create(this)}promise(){return W.create(this,this._def)}or(e){return F.create([this,e],this._def)}and(e){return B.create(this,e,this._def)}transform(e){return new $({..._(this._def),schema:this,typeName:p.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t=typeof e=="function"?e:()=>e;return new J({..._(this._def),innerType:this,defaultValue:t,typeName:p.ZodDefault})}brand(){return new rt({typeName:p.ZodBranded,type:this,..._(this._def)})}catch(e){const t=typeof e=="function"?e:()=>e;return new G({..._(this._def),innerType:this,catchValue:t,typeName:p.ZodCatch})}describe(e){const t=this.constructor;return new t({...this._def,description:e})}pipe(e){return ee.create(this,e)}readonly(){return Q.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const $e=/^c[^\s-]{8,}$/i,Pe=/^[0-9a-z]+$/,Ve=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Me=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Le=/^[a-z0-9_-]{21}$/i,ze=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,De=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Ue=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Fe="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let q;const Be=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,We=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,qe=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,Ye=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,He=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Je=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,xe="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",Ge=new RegExp(`^${xe}$`);function ke(s){let e="[0-5]\\d";s.precision?e=`${e}\\.\\d{${s.precision}}`:s.precision==null&&(e=`${e}(\\.\\d+)?`);const t=s.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${t}`}function Qe(s){return new RegExp(`^${ke(s)}$`)}function Xe(s){let e=`${xe}T${ke(s)}`;const t=[];return t.push(s.local?"Z?":"Z"),s.offset&&t.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${t.join("|")})`,new RegExp(`^${e}$`)}function Ke(s,e){return!!((e==="v4"||!e)&&Be.test(s)||(e==="v6"||!e)&&qe.test(s))}function et(s,e){if(!ze.test(s))return!1;try{const[t]=s.split(".");if(!t)return!1;const r=t.replace(/-/g,"+").replace(/_/g,"/").padEnd(t.length+(4-t.length%4)%4,"="),a=JSON.parse(atob(r));return!(typeof a!="object"||a===null||"typ"in a&&a?.typ!=="JWT"||!a.alg||e&&a.alg!==e)}catch{return!1}}function tt(s,e){return!!((e==="v4"||!e)&&We.test(s)||(e==="v6"||!e)&&Ye.test(s))}class N extends y{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==u.string){const n=this._getOrReturnCtx(e);return c(n,{code:o.invalid_type,expected:u.string,received:n.parsedType}),m}const r=new k;let a;for(const n of this._def.checks)if(n.kind==="min")e.data.length<n.value&&(a=this._getOrReturnCtx(e,a),c(a,{code:o.too_small,minimum:n.value,type:"string",inclusive:!0,exact:!1,message:n.message}),r.dirty());else if(n.kind==="max")e.data.length>n.value&&(a=this._getOrReturnCtx(e,a),c(a,{code:o.too_big,maximum:n.value,type:"string",inclusive:!0,exact:!1,message:n.message}),r.dirty());else if(n.kind==="length"){const i=e.data.length>n.value,d=e.data.length<n.value;(i||d)&&(a=this._getOrReturnCtx(e,a),i?c(a,{code:o.too_big,maximum:n.value,type:"string",inclusive:!0,exact:!0,message:n.message}):d&&c(a,{code:o.too_small,minimum:n.value,type:"string",inclusive:!0,exact:!0,message:n.message}),r.dirty())}else if(n.kind==="email")Ue.test(e.data)||(a=this._getOrReturnCtx(e,a),c(a,{validation:"email",code:o.invalid_string,message:n.message}),r.dirty());else if(n.kind==="emoji")q||(q=new RegExp(Fe,"u")),q.test(e.data)||(a=this._getOrReturnCtx(e,a),c(a,{validation:"emoji",code:o.invalid_string,message:n.message}),r.dirty());else if(n.kind==="uuid")Me.test(e.data)||(a=this._getOrReturnCtx(e,a),c(a,{validation:"uuid",code:o.invalid_string,message:n.message}),r.dirty());else if(n.kind==="nanoid")Le.test(e.data)||(a=this._getOrReturnCtx(e,a),c(a,{validation:"nanoid",code:o.invalid_string,message:n.message}),r.dirty());else if(n.kind==="cuid")$e.test(e.data)||(a=this._getOrReturnCtx(e,a),c(a,{validation:"cuid",code:o.invalid_string,message:n.message}),r.dirty());else if(n.kind==="cuid2")Pe.test(e.data)||(a=this._getOrReturnCtx(e,a),c(a,{validation:"cuid2",code:o.invalid_string,message:n.message}),r.dirty());else if(n.kind==="ulid")Ve.test(e.data)||(a=this._getOrReturnCtx(e,a),c(a,{validation:"ulid",code:o.invalid_string,message:n.message}),r.dirty());else if(n.kind==="url")try{new URL(e.data)}catch{a=this._getOrReturnCtx(e,a),c(a,{validation:"url",code:o.invalid_string,message:n.message}),r.dirty()}else n.kind==="regex"?(n.regex.lastIndex=0,n.regex.test(e.data)||(a=this._getOrReturnCtx(e,a),c(a,{validation:"regex",code:o.invalid_string,message:n.message}),r.dirty())):n.kind==="trim"?e.data=e.data.trim():n.kind==="includes"?e.data.includes(n.value,n.position)||(a=this._getOrReturnCtx(e,a),c(a,{code:o.invalid_string,validation:{includes:n.value,position:n.position},message:n.message}),r.dirty()):n.kind==="toLowerCase"?e.data=e.data.toLowerCase():n.kind==="toUpperCase"?e.data=e.data.toUpperCase():n.kind==="startsWith"?e.data.startsWith(n.value)||(a=this._getOrReturnCtx(e,a),c(a,{code:o.invalid_string,validation:{startsWith:n.value},message:n.message}),r.dirty()):n.kind==="endsWith"?e.data.endsWith(n.value)||(a=this._getOrReturnCtx(e,a),c(a,{code:o.invalid_string,validation:{endsWith:n.value},message:n.message}),r.dirty()):n.kind==="datetime"?Xe(n).test(e.data)||(a=this._getOrReturnCtx(e,a),c(a,{code:o.invalid_string,validation:"datetime",message:n.message}),r.dirty()):n.kind==="date"?Ge.test(e.data)||(a=this._getOrReturnCtx(e,a),c(a,{code:o.invalid_string,validation:"date",message:n.message}),r.dirty()):n.kind==="time"?Qe(n).test(e.data)||(a=this._getOrReturnCtx(e,a),c(a,{code:o.invalid_string,validation:"time",message:n.message}),r.dirty()):n.kind==="duration"?De.test(e.data)||(a=this._getOrReturnCtx(e,a),c(a,{validation:"duration",code:o.invalid_string,message:n.message}),r.dirty()):n.kind==="ip"?Ke(e.data,n.version)||(a=this._getOrReturnCtx(e,a),c(a,{validation:"ip",code:o.invalid_string,message:n.message}),r.dirty()):n.kind==="jwt"?et(e.data,n.alg)||(a=this._getOrReturnCtx(e,a),c(a,{validation:"jwt",code:o.invalid_string,message:n.message}),r.dirty()):n.kind==="cidr"?tt(e.data,n.version)||(a=this._getOrReturnCtx(e,a),c(a,{validation:"cidr",code:o.invalid_string,message:n.message}),r.dirty()):n.kind==="base64"?He.test(e.data)||(a=this._getOrReturnCtx(e,a),c(a,{validation:"base64",code:o.invalid_string,message:n.message}),r.dirty()):n.kind==="base64url"?Je.test(e.data)||(a=this._getOrReturnCtx(e,a),c(a,{validation:"base64url",code:o.invalid_string,message:n.message}),r.dirty()):g.assertNever(n);return{status:r.value,value:e.data}}_regex(e,t,r){return this.refinement(a=>e.test(a),{validation:t,code:o.invalid_string,...l.errToObj(r)})}_addCheck(e){return new N({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...l.errToObj(e)})}url(e){return this._addCheck({kind:"url",...l.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...l.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...l.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...l.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...l.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...l.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...l.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...l.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...l.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...l.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...l.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...l.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof e?.precision>"u"?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...l.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof e?.precision>"u"?null:e?.precision,...l.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...l.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...l.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t?.position,...l.errToObj(t?.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...l.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...l.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...l.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...l.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...l.errToObj(t)})}nonempty(e){return this.min(1,l.errToObj(e))}trim(){return new N({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new N({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new N({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}}N.create=s=>new N({checks:[],typeName:p.ZodString,coerce:s?.coerce??!1,..._(s)});function st(s,e){const t=(s.toString().split(".")[1]||"").length,r=(e.toString().split(".")[1]||"").length,a=t>r?t:r,n=Number.parseInt(s.toFixed(a).replace(".","")),i=Number.parseInt(e.toFixed(a).replace(".",""));return n%i/10**a}class E extends y{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==u.number){const n=this._getOrReturnCtx(e);return c(n,{code:o.invalid_type,expected:u.number,received:n.parsedType}),m}let r;const a=new k;for(const n of this._def.checks)n.kind==="int"?g.isInteger(e.data)||(r=this._getOrReturnCtx(e,r),c(r,{code:o.invalid_type,expected:"integer",received:"float",message:n.message}),a.dirty()):n.kind==="min"?(n.inclusive?e.data<n.value:e.data<=n.value)&&(r=this._getOrReturnCtx(e,r),c(r,{code:o.too_small,minimum:n.value,type:"number",inclusive:n.inclusive,exact:!1,message:n.message}),a.dirty()):n.kind==="max"?(n.inclusive?e.data>n.value:e.data>=n.value)&&(r=this._getOrReturnCtx(e,r),c(r,{code:o.too_big,maximum:n.value,type:"number",inclusive:n.inclusive,exact:!1,message:n.message}),a.dirty()):n.kind==="multipleOf"?st(e.data,n.value)!==0&&(r=this._getOrReturnCtx(e,r),c(r,{code:o.not_multiple_of,multipleOf:n.value,message:n.message}),a.dirty()):n.kind==="finite"?Number.isFinite(e.data)||(r=this._getOrReturnCtx(e,r),c(r,{code:o.not_finite,message:n.message}),a.dirty()):g.assertNever(n);return{status:a.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,l.toString(t))}gt(e,t){return this.setLimit("min",e,!1,l.toString(t))}lte(e,t){return this.setLimit("max",e,!0,l.toString(t))}lt(e,t){return this.setLimit("max",e,!1,l.toString(t))}setLimit(e,t,r,a){return new E({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:l.toString(a)}]})}_addCheck(e){return new E({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:l.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:l.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:l.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:l.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:l.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:l.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:l.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:l.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:l.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&g.isInteger(e.value))}get isFinite(){let e=null,t=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(t===null||r.value>t)&&(t=r.value):r.kind==="max"&&(e===null||r.value<e)&&(e=r.value)}return Number.isFinite(t)&&Number.isFinite(e)}}E.create=s=>new E({checks:[],typeName:p.ZodNumber,coerce:s?.coerce||!1,..._(s)});class L extends y{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==u.bigint)return this._getInvalidInput(e);let r;const a=new k;for(const n of this._def.checks)n.kind==="min"?(n.inclusive?e.data<n.value:e.data<=n.value)&&(r=this._getOrReturnCtx(e,r),c(r,{code:o.too_small,type:"bigint",minimum:n.value,inclusive:n.inclusive,message:n.message}),a.dirty()):n.kind==="max"?(n.inclusive?e.data>n.value:e.data>=n.value)&&(r=this._getOrReturnCtx(e,r),c(r,{code:o.too_big,type:"bigint",maximum:n.value,inclusive:n.inclusive,message:n.message}),a.dirty()):n.kind==="multipleOf"?e.data%n.value!==BigInt(0)&&(r=this._getOrReturnCtx(e,r),c(r,{code:o.not_multiple_of,multipleOf:n.value,message:n.message}),a.dirty()):g.assertNever(n);return{status:a.value,value:e.data}}_getInvalidInput(e){const t=this._getOrReturnCtx(e);return c(t,{code:o.invalid_type,expected:u.bigint,received:t.parsedType}),m}gte(e,t){return this.setLimit("min",e,!0,l.toString(t))}gt(e,t){return this.setLimit("min",e,!1,l.toString(t))}lte(e,t){return this.setLimit("max",e,!0,l.toString(t))}lt(e,t){return this.setLimit("max",e,!1,l.toString(t))}setLimit(e,t,r,a){return new L({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:l.toString(a)}]})}_addCheck(e){return new L({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:l.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:l.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:l.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:l.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:l.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}}L.create=s=>new L({checks:[],typeName:p.ZodBigInt,coerce:s?.coerce??!1,..._(s)});class ne extends y{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==u.boolean){const r=this._getOrReturnCtx(e);return c(r,{code:o.invalid_type,expected:u.boolean,received:r.parsedType}),m}return b(e.data)}}ne.create=s=>new ne({typeName:p.ZodBoolean,coerce:s?.coerce||!1,..._(s)});class U extends y{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==u.date){const n=this._getOrReturnCtx(e);return c(n,{code:o.invalid_type,expected:u.date,received:n.parsedType}),m}if(Number.isNaN(e.data.getTime())){const n=this._getOrReturnCtx(e);return c(n,{code:o.invalid_date}),m}const r=new k;let a;for(const n of this._def.checks)n.kind==="min"?e.data.getTime()<n.value&&(a=this._getOrReturnCtx(e,a),c(a,{code:o.too_small,message:n.message,inclusive:!0,exact:!1,minimum:n.value,type:"date"}),r.dirty()):n.kind==="max"?e.data.getTime()>n.value&&(a=this._getOrReturnCtx(e,a),c(a,{code:o.too_big,message:n.message,inclusive:!0,exact:!1,maximum:n.value,type:"date"}),r.dirty()):g.assertNever(n);return{status:r.value,value:new Date(e.data.getTime())}}_addCheck(e){return new U({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:l.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:l.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e!=null?new Date(e):null}}U.create=s=>new U({checks:[],coerce:s?.coerce||!1,typeName:p.ZodDate,..._(s)});class ie extends y{_parse(e){if(this._getType(e)!==u.symbol){const r=this._getOrReturnCtx(e);return c(r,{code:o.invalid_type,expected:u.symbol,received:r.parsedType}),m}return b(e.data)}}ie.create=s=>new ie({typeName:p.ZodSymbol,..._(s)});class de extends y{_parse(e){if(this._getType(e)!==u.undefined){const r=this._getOrReturnCtx(e);return c(r,{code:o.invalid_type,expected:u.undefined,received:r.parsedType}),m}return b(e.data)}}de.create=s=>new de({typeName:p.ZodUndefined,..._(s)});class oe extends y{_parse(e){if(this._getType(e)!==u.null){const r=this._getOrReturnCtx(e);return c(r,{code:o.invalid_type,expected:u.null,received:r.parsedType}),m}return b(e.data)}}oe.create=s=>new oe({typeName:p.ZodNull,..._(s)});class ce extends y{constructor(){super(...arguments),this._any=!0}_parse(e){return b(e.data)}}ce.create=s=>new ce({typeName:p.ZodAny,..._(s)});class ue extends y{constructor(){super(...arguments),this._unknown=!0}_parse(e){return b(e.data)}}ue.create=s=>new ue({typeName:p.ZodUnknown,..._(s)});class A extends y{_parse(e){const t=this._getOrReturnCtx(e);return c(t,{code:o.invalid_type,expected:u.never,received:t.parsedType}),m}}A.create=s=>new A({typeName:p.ZodNever,..._(s)});class le extends y{_parse(e){if(this._getType(e)!==u.undefined){const r=this._getOrReturnCtx(e);return c(r,{code:o.invalid_type,expected:u.void,received:r.parsedType}),m}return b(e.data)}}le.create=s=>new le({typeName:p.ZodVoid,..._(s)});class w extends y{_parse(e){const{ctx:t,status:r}=this._processInputParams(e),a=this._def;if(t.parsedType!==u.array)return c(t,{code:o.invalid_type,expected:u.array,received:t.parsedType}),m;if(a.exactLength!==null){const i=t.data.length>a.exactLength.value,d=t.data.length<a.exactLength.value;(i||d)&&(c(t,{code:i?o.too_big:o.too_small,minimum:d?a.exactLength.value:void 0,maximum:i?a.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:a.exactLength.message}),r.dirty())}if(a.minLength!==null&&t.data.length<a.minLength.value&&(c(t,{code:o.too_small,minimum:a.minLength.value,type:"array",inclusive:!0,exact:!1,message:a.minLength.message}),r.dirty()),a.maxLength!==null&&t.data.length>a.maxLength.value&&(c(t,{code:o.too_big,maximum:a.maxLength.value,type:"array",inclusive:!0,exact:!1,message:a.maxLength.message}),r.dirty()),t.common.async)return Promise.all([...t.data].map((i,d)=>a.type._parseAsync(new S(t,i,t.path,d)))).then(i=>k.mergeArray(r,i));const n=[...t.data].map((i,d)=>a.type._parseSync(new S(t,i,t.path,d)));return k.mergeArray(r,n)}get element(){return this._def.type}min(e,t){return new w({...this._def,minLength:{value:e,message:l.toString(t)}})}max(e,t){return new w({...this._def,maxLength:{value:e,message:l.toString(t)}})}length(e,t){return new w({...this._def,exactLength:{value:e,message:l.toString(t)}})}nonempty(e){return this.min(1,e)}}w.create=(s,e)=>new w({type:s,minLength:null,maxLength:null,exactLength:null,typeName:p.ZodArray,..._(e)});function R(s){if(s instanceof x){const e={};for(const t in s.shape){const r=s.shape[t];e[t]=O.create(R(r))}return new x({...s._def,shape:()=>e})}else return s instanceof w?new w({...s._def,type:R(s.element)}):s instanceof O?O.create(R(s.unwrap())):s instanceof P?P.create(R(s.unwrap())):s instanceof Z?Z.create(s.items.map(e=>R(e))):s}class x extends y{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),t=g.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}_parse(e){if(this._getType(e)!==u.object){const f=this._getOrReturnCtx(e);return c(f,{code:o.invalid_type,expected:u.object,received:f.parsedType}),m}const{status:r,ctx:a}=this._processInputParams(e),{shape:n,keys:i}=this._getCached(),d=[];if(!(this._def.catchall instanceof A&&this._def.unknownKeys==="strip"))for(const f in a.data)i.includes(f)||d.push(f);const h=[];for(const f of i){const v=n[f],V=a.data[f];h.push({key:{status:"valid",value:f},value:v._parse(new S(a,V,a.path,f)),alwaysSet:f in a.data})}if(this._def.catchall instanceof A){const f=this._def.unknownKeys;if(f==="passthrough")for(const v of d)h.push({key:{status:"valid",value:v},value:{status:"valid",value:a.data[v]}});else if(f==="strict")d.length>0&&(c(a,{code:o.unrecognized_keys,keys:d}),r.dirty());else if(f!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const f=this._def.catchall;for(const v of d){const V=a.data[v];h.push({key:{status:"valid",value:v},value:f._parse(new S(a,V,a.path,v)),alwaysSet:v in a.data})}}return a.common.async?Promise.resolve().then(async()=>{const f=[];for(const v of h){const V=await v.key,we=await v.value;f.push({key:V,value:we,alwaysSet:v.alwaysSet})}return f}).then(f=>k.mergeObjectSync(r,f)):k.mergeObjectSync(r,h)}get shape(){return this._def.shape()}strict(e){return l.errToObj,new x({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(t,r)=>{const a=this._def.errorMap?.(t,r).message??r.defaultError;return t.code==="unrecognized_keys"?{message:l.errToObj(e).message??a}:{message:a}}}:{}})}strip(){return new x({...this._def,unknownKeys:"strip"})}passthrough(){return new x({...this._def,unknownKeys:"passthrough"})}extend(e){return new x({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new x({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:p.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new x({...this._def,catchall:e})}pick(e){const t={};for(const r of g.objectKeys(e))e[r]&&this.shape[r]&&(t[r]=this.shape[r]);return new x({...this._def,shape:()=>t})}omit(e){const t={};for(const r of g.objectKeys(this.shape))e[r]||(t[r]=this.shape[r]);return new x({...this._def,shape:()=>t})}deepPartial(){return R(this)}partial(e){const t={};for(const r of g.objectKeys(this.shape)){const a=this.shape[r];e&&!e[r]?t[r]=a:t[r]=a.optional()}return new x({...this._def,shape:()=>t})}required(e){const t={};for(const r of g.objectKeys(this.shape))if(e&&!e[r])t[r]=this.shape[r];else{let n=this.shape[r];for(;n instanceof O;)n=n._def.innerType;t[r]=n}return new x({...this._def,shape:()=>t})}keyof(){return be(g.objectKeys(this.shape))}}x.create=(s,e)=>new x({shape:()=>s,unknownKeys:"strip",catchall:A.create(),typeName:p.ZodObject,..._(e)});x.strictCreate=(s,e)=>new x({shape:()=>s,unknownKeys:"strict",catchall:A.create(),typeName:p.ZodObject,..._(e)});x.lazycreate=(s,e)=>new x({shape:s,unknownKeys:"strip",catchall:A.create(),typeName:p.ZodObject,..._(e)});class F extends y{_parse(e){const{ctx:t}=this._processInputParams(e),r=this._def.options;function a(n){for(const d of n)if(d.result.status==="valid")return d.result;for(const d of n)if(d.result.status==="dirty")return t.common.issues.push(...d.ctx.common.issues),d.result;const i=n.map(d=>new C(d.ctx.common.issues));return c(t,{code:o.invalid_union,unionErrors:i}),m}if(t.common.async)return Promise.all(r.map(async n=>{const i={...t,common:{...t.common,issues:[]},parent:null};return{result:await n._parseAsync({data:t.data,path:t.path,parent:i}),ctx:i}})).then(a);{let n;const i=[];for(const h of r){const f={...t,common:{...t.common,issues:[]},parent:null},v=h._parseSync({data:t.data,path:t.path,parent:f});if(v.status==="valid")return v;v.status==="dirty"&&!n&&(n={result:v,ctx:f}),f.common.issues.length&&i.push(f.common.issues)}if(n)return t.common.issues.push(...n.ctx.common.issues),n.result;const d=i.map(h=>new C(h));return c(t,{code:o.invalid_union,unionErrors:d}),m}}get options(){return this._def.options}}F.create=(s,e)=>new F({options:s,typeName:p.ZodUnion,..._(e)});function H(s,e){const t=T(s),r=T(e);if(s===e)return{valid:!0,data:s};if(t===u.object&&r===u.object){const a=g.objectKeys(e),n=g.objectKeys(s).filter(d=>a.indexOf(d)!==-1),i={...s,...e};for(const d of n){const h=H(s[d],e[d]);if(!h.valid)return{valid:!1};i[d]=h.data}return{valid:!0,data:i}}else if(t===u.array&&r===u.array){if(s.length!==e.length)return{valid:!1};const a=[];for(let n=0;n<s.length;n++){const i=s[n],d=e[n],h=H(i,d);if(!h.valid)return{valid:!1};a.push(h.data)}return{valid:!0,data:a}}else return t===u.date&&r===u.date&&+s==+e?{valid:!0,data:s}:{valid:!1}}class B extends y{_parse(e){const{status:t,ctx:r}=this._processInputParams(e),a=(n,i)=>{if(se(n)||se(i))return m;const d=H(n.value,i.value);return d.valid?((re(n)||re(i))&&t.dirty(),{status:t.value,value:d.data}):(c(r,{code:o.invalid_intersection_types}),m)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([n,i])=>a(n,i)):a(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}B.create=(s,e,t)=>new B({left:s,right:e,typeName:p.ZodIntersection,..._(t)});class Z extends y{_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==u.array)return c(r,{code:o.invalid_type,expected:u.array,received:r.parsedType}),m;if(r.data.length<this._def.items.length)return c(r,{code:o.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),m;!this._def.rest&&r.data.length>this._def.items.length&&(c(r,{code:o.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const n=[...r.data].map((i,d)=>{const h=this._def.items[d]||this._def.rest;return h?h._parse(new S(r,i,r.path,d)):null}).filter(i=>!!i);return r.common.async?Promise.all(n).then(i=>k.mergeArray(t,i)):k.mergeArray(t,n)}get items(){return this._def.items}rest(e){return new Z({...this._def,rest:e})}}Z.create=(s,e)=>{if(!Array.isArray(s))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Z({items:s,typeName:p.ZodTuple,rest:null,..._(e)})};class he extends y{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==u.map)return c(r,{code:o.invalid_type,expected:u.map,received:r.parsedType}),m;const a=this._def.keyType,n=this._def.valueType,i=[...r.data.entries()].map(([d,h],f)=>({key:a._parse(new S(r,d,r.path,[f,"key"])),value:n._parse(new S(r,h,r.path,[f,"value"]))}));if(r.common.async){const d=new Map;return Promise.resolve().then(async()=>{for(const h of i){const f=await h.key,v=await h.value;if(f.status==="aborted"||v.status==="aborted")return m;(f.status==="dirty"||v.status==="dirty")&&t.dirty(),d.set(f.value,v.value)}return{status:t.value,value:d}})}else{const d=new Map;for(const h of i){const f=h.key,v=h.value;if(f.status==="aborted"||v.status==="aborted")return m;(f.status==="dirty"||v.status==="dirty")&&t.dirty(),d.set(f.value,v.value)}return{status:t.value,value:d}}}}he.create=(s,e,t)=>new he({valueType:e,keyType:s,typeName:p.ZodMap,..._(t)});class z extends y{_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==u.set)return c(r,{code:o.invalid_type,expected:u.set,received:r.parsedType}),m;const a=this._def;a.minSize!==null&&r.data.size<a.minSize.value&&(c(r,{code:o.too_small,minimum:a.minSize.value,type:"set",inclusive:!0,exact:!1,message:a.minSize.message}),t.dirty()),a.maxSize!==null&&r.data.size>a.maxSize.value&&(c(r,{code:o.too_big,maximum:a.maxSize.value,type:"set",inclusive:!0,exact:!1,message:a.maxSize.message}),t.dirty());const n=this._def.valueType;function i(h){const f=new Set;for(const v of h){if(v.status==="aborted")return m;v.status==="dirty"&&t.dirty(),f.add(v.value)}return{status:t.value,value:f}}const d=[...r.data.values()].map((h,f)=>n._parse(new S(r,h,r.path,f)));return r.common.async?Promise.all(d).then(h=>i(h)):i(d)}min(e,t){return new z({...this._def,minSize:{value:e,message:l.toString(t)}})}max(e,t){return new z({...this._def,maxSize:{value:e,message:l.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}z.create=(s,e)=>new z({valueType:s,minSize:null,maxSize:null,typeName:p.ZodSet,..._(e)});class fe extends y{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}fe.create=(s,e)=>new fe({getter:s,typeName:p.ZodLazy,..._(e)});class me extends y{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return c(t,{received:t.data,code:o.invalid_literal,expected:this._def.value}),m}return{status:"valid",value:e.data}}get value(){return this._def.value}}me.create=(s,e)=>new me({value:s,typeName:p.ZodLiteral,..._(e)});function be(s,e){return new j({values:s,typeName:p.ZodEnum,..._(e)})}class j extends y{_parse(e){if(typeof e.data!="string"){const t=this._getOrReturnCtx(e),r=this._def.values;return c(t,{expected:g.joinValues(r),received:t.parsedType,code:o.invalid_type}),m}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){const t=this._getOrReturnCtx(e),r=this._def.values;return c(t,{received:t.data,code:o.invalid_enum_value,options:r}),m}return b(e.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return j.create(e,{...this._def,...t})}exclude(e,t=this._def){return j.create(this.options.filter(r=>!e.includes(r)),{...this._def,...t})}}j.create=be;class pe extends y{_parse(e){const t=g.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==u.string&&r.parsedType!==u.number){const a=g.objectValues(t);return c(r,{expected:g.joinValues(a),received:r.parsedType,code:o.invalid_type}),m}if(this._cache||(this._cache=new Set(g.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){const a=g.objectValues(t);return c(r,{received:r.data,code:o.invalid_enum_value,options:a}),m}return b(e.data)}get enum(){return this._def.values}}pe.create=(s,e)=>new pe({values:s,typeName:p.ZodNativeEnum,..._(e)});class W extends y{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==u.promise&&t.common.async===!1)return c(t,{code:o.invalid_type,expected:u.promise,received:t.parsedType}),m;const r=t.parsedType===u.promise?t.data:Promise.resolve(t.data);return b(r.then(a=>this._def.type.parseAsync(a,{path:t.path,errorMap:t.common.contextualErrorMap})))}}W.create=(s,e)=>new W({type:s,typeName:p.ZodPromise,..._(e)});class $ extends y{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===p.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:r}=this._processInputParams(e),a=this._def.effect||null,n={addIssue:i=>{c(r,i),i.fatal?t.abort():t.dirty()},get path(){return r.path}};if(n.addIssue=n.addIssue.bind(n),a.type==="preprocess"){const i=a.transform(r.data,n);if(r.common.async)return Promise.resolve(i).then(async d=>{if(t.value==="aborted")return m;const h=await this._def.schema._parseAsync({data:d,path:r.path,parent:r});return h.status==="aborted"?m:h.status==="dirty"||t.value==="dirty"?M(h.value):h});{if(t.value==="aborted")return m;const d=this._def.schema._parseSync({data:i,path:r.path,parent:r});return d.status==="aborted"?m:d.status==="dirty"||t.value==="dirty"?M(d.value):d}}if(a.type==="refinement"){const i=d=>{const h=a.refinement(d,n);if(r.common.async)return Promise.resolve(h);if(h instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return d};if(r.common.async===!1){const d=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return d.status==="aborted"?m:(d.status==="dirty"&&t.dirty(),i(d.value),{status:t.value,value:d.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(d=>d.status==="aborted"?m:(d.status==="dirty"&&t.dirty(),i(d.value).then(()=>({status:t.value,value:d.value}))))}if(a.type==="transform")if(r.common.async===!1){const i=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!I(i))return m;const d=a.transform(i.value,n);if(d instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:d}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(i=>I(i)?Promise.resolve(a.transform(i.value,n)).then(d=>({status:t.value,value:d})):m);g.assertNever(a)}}$.create=(s,e,t)=>new $({schema:s,typeName:p.ZodEffects,effect:e,..._(t)});$.createWithPreprocess=(s,e,t)=>new $({schema:e,effect:{type:"preprocess",transform:s},typeName:p.ZodEffects,..._(t)});class O extends y{_parse(e){return this._getType(e)===u.undefined?b(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}O.create=(s,e)=>new O({innerType:s,typeName:p.ZodOptional,..._(e)});class P extends y{_parse(e){return this._getType(e)===u.null?b(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}P.create=(s,e)=>new P({innerType:s,typeName:p.ZodNullable,..._(e)});class J extends y{_parse(e){const{ctx:t}=this._processInputParams(e);let r=t.data;return t.parsedType===u.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}J.create=(s,e)=>new J({innerType:s,typeName:p.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,..._(e)});class G extends y{_parse(e){const{ctx:t}=this._processInputParams(e),r={...t,common:{...t.common,issues:[]}},a=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return D(a)?a.then(n=>({status:"valid",value:n.status==="valid"?n.value:this._def.catchValue({get error(){return new C(r.common.issues)},input:r.data})})):{status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new C(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}G.create=(s,e)=>new G({innerType:s,typeName:p.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,..._(e)});class _e extends y{_parse(e){if(this._getType(e)!==u.nan){const r=this._getOrReturnCtx(e);return c(r,{code:o.invalid_type,expected:u.nan,received:r.parsedType}),m}return{status:"valid",value:e.data}}}_e.create=s=>new _e({typeName:p.ZodNaN,..._(s)});class rt extends y{_parse(e){const{ctx:t}=this._processInputParams(e),r=t.data;return this._def.type._parse({data:r,path:t.path,parent:t})}unwrap(){return this._def.type}}class ee extends y{_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.common.async)return(async()=>{const n=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return n.status==="aborted"?m:n.status==="dirty"?(t.dirty(),M(n.value)):this._def.out._parseAsync({data:n.value,path:r.path,parent:r})})();{const a=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?m:a.status==="dirty"?(t.dirty(),{status:"dirty",value:a.value}):this._def.out._parseSync({data:a.value,path:r.path,parent:r})}}static create(e,t){return new ee({in:e,out:t,typeName:p.ZodPipeline})}}class Q extends y{_parse(e){const t=this._def.innerType._parse(e),r=a=>(I(a)&&(a.value=Object.freeze(a.value)),a);return D(t)?t.then(a=>r(a)):r(t)}unwrap(){return this._def.innerType}}Q.create=(s,e)=>new Q({innerType:s,typeName:p.ZodReadonly,..._(e)});var p;(function(s){s.ZodString="ZodString",s.ZodNumber="ZodNumber",s.ZodNaN="ZodNaN",s.ZodBigInt="ZodBigInt",s.ZodBoolean="ZodBoolean",s.ZodDate="ZodDate",s.ZodSymbol="ZodSymbol",s.ZodUndefined="ZodUndefined",s.ZodNull="ZodNull",s.ZodAny="ZodAny",s.ZodUnknown="ZodUnknown",s.ZodNever="ZodNever",s.ZodVoid="ZodVoid",s.ZodArray="ZodArray",s.ZodObject="ZodObject",s.ZodUnion="ZodUnion",s.ZodDiscriminatedUnion="ZodDiscriminatedUnion",s.ZodIntersection="ZodIntersection",s.ZodTuple="ZodTuple",s.ZodRecord="ZodRecord",s.ZodMap="ZodMap",s.ZodSet="ZodSet",s.ZodFunction="ZodFunction",s.ZodLazy="ZodLazy",s.ZodLiteral="ZodLiteral",s.ZodEnum="ZodEnum",s.ZodEffects="ZodEffects",s.ZodNativeEnum="ZodNativeEnum",s.ZodOptional="ZodOptional",s.ZodNullable="ZodNullable",s.ZodDefault="ZodDefault",s.ZodCatch="ZodCatch",s.ZodPromise="ZodPromise",s.ZodBranded="ZodBranded",s.ZodPipeline="ZodPipeline",s.ZodReadonly="ZodReadonly"})(p||(p={}));const ye=N.create,at=E.create;A.create;w.create;const nt=x.create;F.create;B.create;Z.create;j.create;W.create;O.create;P.create;const{decodeAbiParameters:Ct}=await X("viem"),it="0x06fdde03",dt=[],ot=[{type:"string"}];async function ct(s){return K({contract:s.contract,method:[it,dt,ot],params:[]})}async function ut(s){return ve(()=>ct(s),{cacheKey:`${s.contract.chain.id}:${s.contract.address}:name`,cacheTime:Number.POSITIVE_INFINITY})}const{decodeAbiParameters:Tt}=await X("viem"),lt="0x95d89b41",ht=[],ft=[{type:"string"}];async function mt(s){return K({contract:s.contract,method:[lt,ht,ft],params:[]})}async function pt(s){return ve(()=>mt(s),{cacheKey:`${s.contract.chain.id}:${s.contract.address}:symbol`,cacheTime:Number.POSITIVE_INFINITY})}const ge=nt({name:ye().default("Ether"),symbol:ye().default("ETH"),decimals:at().default(18)}).default({name:"Ether",symbol:"ETH",decimals:18});async function _t(s){if(Te(s.contract.address)){if(!s.contract.chain.nativeCurrency||!s.contract.chain.nativeCurrency.name||!s.contract.chain.nativeCurrency.symbol||!s.contract.chain.nativeCurrency.decimals)try{const{getChainMetadata:e}=await Ne(async()=>{const{getChainMetadata:r}=await import("./utils-CozXUO91.js");return{getChainMetadata:r}},__vite__mapDeps([0,1])),t=await e(s.contract.chain);return ge.parse({...t.nativeCurrency,...s.contract.chain.nativeCurrency})}catch{}return ge.parse(s.contract.chain.nativeCurrency)}try{const[e,t,r]=await Promise.all([ut(s).catch(()=>""),pt(s),Oe(s)]);return{decimals:r,name:e,symbol:t}}catch(e){throw new Error(`Invalid currency token: ${e}`)}}async function Nt(s){const[e,t]=await Promise.all([Re(s),_t(s)]);return{...t,chainId:s.contract.chain.id,displayValue:Ce(e,t.decimals),tokenAddress:s.contract.address,value:e}}export{Nt as getBalance};
2
+ import{t as Ce}from"./fee-data-B6rXatSB.js";import{importShared as X}from"./__federation_fn_import-BOkD8n2P.js";import{r as K,i as Te}from"./signing-fd2Rp8P0.js";import{_ as Ne}from"./preload-helper-CO43ckIt.js";import{w as ve}from"./withCache-DYumIHzL.js";import{d as Oe}from"./decimals-DKeocaSS.js";const{decodeAbiParameters:wt}=await X("viem"),Se="0x70a08231",Ae=[{name:"_address",type:"address"}],Ze=[{type:"uint256"}];async function Re(s){return K({contract:s.contract,method:[Se,Ae,Ze],params:[s.address]})}var g;(function(s){s.assertEqual=a=>{};function e(a){}s.assertIs=e;function t(a){throw new Error}s.assertNever=t,s.arrayToEnum=a=>{const n={};for(const i of a)n[i]=i;return n},s.getValidEnumValues=a=>{const n=s.objectKeys(a).filter(d=>typeof a[a[d]]!="number"),i={};for(const d of n)i[d]=a[d];return s.objectValues(i)},s.objectValues=a=>s.objectKeys(a).map(function(n){return a[n]}),s.objectKeys=typeof Object.keys=="function"?a=>Object.keys(a):a=>{const n=[];for(const i in a)Object.prototype.hasOwnProperty.call(a,i)&&n.push(i);return n},s.find=(a,n)=>{for(const i of a)if(n(i))return i},s.isInteger=typeof Number.isInteger=="function"?a=>Number.isInteger(a):a=>typeof a=="number"&&Number.isFinite(a)&&Math.floor(a)===a;function r(a,n=" | "){return a.map(i=>typeof i=="string"?`'${i}'`:i).join(n)}s.joinValues=r,s.jsonStringifyReplacer=(a,n)=>typeof n=="bigint"?n.toString():n})(g||(g={}));var te;(function(s){s.mergeShapes=(e,t)=>({...e,...t})})(te||(te={}));const u=g.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),T=s=>{switch(typeof s){case"undefined":return u.undefined;case"string":return u.string;case"number":return Number.isNaN(s)?u.nan:u.number;case"boolean":return u.boolean;case"function":return u.function;case"bigint":return u.bigint;case"symbol":return u.symbol;case"object":return Array.isArray(s)?u.array:s===null?u.null:s.then&&typeof s.then=="function"&&s.catch&&typeof s.catch=="function"?u.promise:typeof Map<"u"&&s instanceof Map?u.map:typeof Set<"u"&&s instanceof Set?u.set:typeof Date<"u"&&s instanceof Date?u.date:u.object;default:return u.unknown}},o=g.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class C extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}format(e){const t=e||function(n){return n.message},r={_errors:[]},a=n=>{for(const i of n.issues)if(i.code==="invalid_union")i.unionErrors.map(a);else if(i.code==="invalid_return_type")a(i.returnTypeError);else if(i.code==="invalid_arguments")a(i.argumentsError);else if(i.path.length===0)r._errors.push(t(i));else{let d=r,h=0;for(;h<i.path.length;){const f=i.path[h];h===i.path.length-1?(d[f]=d[f]||{_errors:[]},d[f]._errors.push(t(i))):d[f]=d[f]||{_errors:[]},d=d[f],h++}}};return a(this),r}static assert(e){if(!(e instanceof C))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,g.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=t=>t.message){const t={},r=[];for(const a of this.issues)if(a.path.length>0){const n=a.path[0];t[n]=t[n]||[],t[n].push(e(a))}else r.push(e(a));return{formErrors:r,fieldErrors:t}}get formErrors(){return this.flatten()}}C.create=s=>new C(s);const Y=(s,e)=>{let t;switch(s.code){case o.invalid_type:s.received===u.undefined?t="Required":t=`Expected ${s.expected}, received ${s.received}`;break;case o.invalid_literal:t=`Invalid literal value, expected ${JSON.stringify(s.expected,g.jsonStringifyReplacer)}`;break;case o.unrecognized_keys:t=`Unrecognized key(s) in object: ${g.joinValues(s.keys,", ")}`;break;case o.invalid_union:t="Invalid input";break;case o.invalid_union_discriminator:t=`Invalid discriminator value. Expected ${g.joinValues(s.options)}`;break;case o.invalid_enum_value:t=`Invalid enum value. Expected ${g.joinValues(s.options)}, received '${s.received}'`;break;case o.invalid_arguments:t="Invalid function arguments";break;case o.invalid_return_type:t="Invalid function return type";break;case o.invalid_date:t="Invalid date";break;case o.invalid_string:typeof s.validation=="object"?"includes"in s.validation?(t=`Invalid input: must include "${s.validation.includes}"`,typeof s.validation.position=="number"&&(t=`${t} at one or more positions greater than or equal to ${s.validation.position}`)):"startsWith"in s.validation?t=`Invalid input: must start with "${s.validation.startsWith}"`:"endsWith"in s.validation?t=`Invalid input: must end with "${s.validation.endsWith}"`:g.assertNever(s.validation):s.validation!=="regex"?t=`Invalid ${s.validation}`:t="Invalid";break;case o.too_small:s.type==="array"?t=`Array must contain ${s.exact?"exactly":s.inclusive?"at least":"more than"} ${s.minimum} element(s)`:s.type==="string"?t=`String must contain ${s.exact?"exactly":s.inclusive?"at least":"over"} ${s.minimum} character(s)`:s.type==="number"?t=`Number must be ${s.exact?"exactly equal to ":s.inclusive?"greater than or equal to ":"greater than "}${s.minimum}`:s.type==="bigint"?t=`Number must be ${s.exact?"exactly equal to ":s.inclusive?"greater than or equal to ":"greater than "}${s.minimum}`:s.type==="date"?t=`Date must be ${s.exact?"exactly equal to ":s.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(s.minimum))}`:t="Invalid input";break;case o.too_big:s.type==="array"?t=`Array must contain ${s.exact?"exactly":s.inclusive?"at most":"less than"} ${s.maximum} element(s)`:s.type==="string"?t=`String must contain ${s.exact?"exactly":s.inclusive?"at most":"under"} ${s.maximum} character(s)`:s.type==="number"?t=`Number must be ${s.exact?"exactly":s.inclusive?"less than or equal to":"less than"} ${s.maximum}`:s.type==="bigint"?t=`BigInt must be ${s.exact?"exactly":s.inclusive?"less than or equal to":"less than"} ${s.maximum}`:s.type==="date"?t=`Date must be ${s.exact?"exactly":s.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(s.maximum))}`:t="Invalid input";break;case o.custom:t="Invalid input";break;case o.invalid_intersection_types:t="Intersection results could not be merged";break;case o.not_multiple_of:t=`Number must be a multiple of ${s.multipleOf}`;break;case o.not_finite:t="Number must be finite";break;default:t=e.defaultError,g.assertNever(s)}return{message:t}};let Ie=Y;function Ee(){return Ie}const je=s=>{const{data:e,path:t,errorMaps:r,issueData:a}=s,n=[...t,...a.path||[]],i={...a,path:n};if(a.message!==void 0)return{...a,path:n,message:a.message};let d="";const h=r.filter(f=>!!f).slice().reverse();for(const f of h)d=f(i,{data:e,defaultError:d}).message;return{...a,path:n,message:d}};function c(s,e){const t=Ee(),r=je({issueData:e,data:s.data,path:s.path,errorMaps:[s.common.contextualErrorMap,s.schemaErrorMap,t,t===Y?void 0:Y].filter(a=>!!a)});s.common.issues.push(r)}class k{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,t){const r=[];for(const a of t){if(a.status==="aborted")return m;a.status==="dirty"&&e.dirty(),r.push(a.value)}return{status:e.value,value:r}}static async mergeObjectAsync(e,t){const r=[];for(const a of t){const n=await a.key,i=await a.value;r.push({key:n,value:i})}return k.mergeObjectSync(e,r)}static mergeObjectSync(e,t){const r={};for(const a of t){const{key:n,value:i}=a;if(n.status==="aborted"||i.status==="aborted")return m;n.status==="dirty"&&e.dirty(),i.status==="dirty"&&e.dirty(),n.value!=="__proto__"&&(typeof i.value<"u"||a.alwaysSet)&&(r[n.value]=i.value)}return{status:e.value,value:r}}}const m=Object.freeze({status:"aborted"}),M=s=>({status:"dirty",value:s}),b=s=>({status:"valid",value:s}),se=s=>s.status==="aborted",re=s=>s.status==="dirty",I=s=>s.status==="valid",D=s=>typeof Promise<"u"&&s instanceof Promise;var l;(function(s){s.errToObj=e=>typeof e=="string"?{message:e}:e||{},s.toString=e=>typeof e=="string"?e:e?.message})(l||(l={}));class S{constructor(e,t,r,a){this._cachedPath=[],this.parent=e,this.data=t,this._path=r,this._key=a}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const ae=(s,e)=>{if(I(e))return{success:!0,data:e.value};if(!s.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const t=new C(s.common.issues);return this._error=t,this._error}}};function _(s){if(!s)return{};const{errorMap:e,invalid_type_error:t,required_error:r,description:a}=s;if(e&&(t||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:a}:{errorMap:(i,d)=>{const{message:h}=s;return i.code==="invalid_enum_value"?{message:h??d.defaultError}:typeof d.data>"u"?{message:h??r??d.defaultError}:i.code!=="invalid_type"?{message:d.defaultError}:{message:h??t??d.defaultError}},description:a}}class y{get description(){return this._def.description}_getType(e){return T(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:T(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new k,ctx:{common:e.parent.common,data:e.data,parsedType:T(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(D(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const r=this.safeParse(e,t);if(r.success)return r.data;throw r.error}safeParse(e,t){const r={common:{issues:[],async:t?.async??!1,contextualErrorMap:t?.errorMap},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:T(e)},a=this._parseSync({data:e,path:r.path,parent:r});return ae(r,a)}"~validate"(e){const t={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:T(e)};if(!this["~standard"].async)try{const r=this._parseSync({data:e,path:[],parent:t});return I(r)?{value:r.value}:{issues:t.common.issues}}catch(r){r?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(r=>I(r)?{value:r.value}:{issues:t.common.issues})}async parseAsync(e,t){const r=await this.safeParseAsync(e,t);if(r.success)return r.data;throw r.error}async safeParseAsync(e,t){const r={common:{issues:[],contextualErrorMap:t?.errorMap,async:!0},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:T(e)},a=this._parse({data:e,path:r.path,parent:r}),n=await(D(a)?a:Promise.resolve(a));return ae(r,n)}refine(e,t){const r=a=>typeof t=="string"||typeof t>"u"?{message:t}:typeof t=="function"?t(a):t;return this._refinement((a,n)=>{const i=e(a),d=()=>n.addIssue({code:o.custom,...r(a)});return typeof Promise<"u"&&i instanceof Promise?i.then(h=>h?!0:(d(),!1)):i?!0:(d(),!1)})}refinement(e,t){return this._refinement((r,a)=>e(r)?!0:(a.addIssue(typeof t=="function"?t(r,a):t),!1))}_refinement(e){return new $({schema:this,typeName:p.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:t=>this["~validate"](t)}}optional(){return O.create(this,this._def)}nullable(){return P.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return w.create(this)}promise(){return W.create(this,this._def)}or(e){return F.create([this,e],this._def)}and(e){return B.create(this,e,this._def)}transform(e){return new $({..._(this._def),schema:this,typeName:p.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t=typeof e=="function"?e:()=>e;return new J({..._(this._def),innerType:this,defaultValue:t,typeName:p.ZodDefault})}brand(){return new rt({typeName:p.ZodBranded,type:this,..._(this._def)})}catch(e){const t=typeof e=="function"?e:()=>e;return new G({..._(this._def),innerType:this,catchValue:t,typeName:p.ZodCatch})}describe(e){const t=this.constructor;return new t({...this._def,description:e})}pipe(e){return ee.create(this,e)}readonly(){return Q.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const $e=/^c[^\s-]{8,}$/i,Pe=/^[0-9a-z]+$/,Ve=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Me=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Le=/^[a-z0-9_-]{21}$/i,ze=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,De=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Ue=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Fe="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let q;const Be=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,We=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,qe=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,Ye=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,He=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Je=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,xe="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",Ge=new RegExp(`^${xe}$`);function ke(s){let e="[0-5]\\d";s.precision?e=`${e}\\.\\d{${s.precision}}`:s.precision==null&&(e=`${e}(\\.\\d+)?`);const t=s.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${t}`}function Qe(s){return new RegExp(`^${ke(s)}$`)}function Xe(s){let e=`${xe}T${ke(s)}`;const t=[];return t.push(s.local?"Z?":"Z"),s.offset&&t.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${t.join("|")})`,new RegExp(`^${e}$`)}function Ke(s,e){return!!((e==="v4"||!e)&&Be.test(s)||(e==="v6"||!e)&&qe.test(s))}function et(s,e){if(!ze.test(s))return!1;try{const[t]=s.split(".");if(!t)return!1;const r=t.replace(/-/g,"+").replace(/_/g,"/").padEnd(t.length+(4-t.length%4)%4,"="),a=JSON.parse(atob(r));return!(typeof a!="object"||a===null||"typ"in a&&a?.typ!=="JWT"||!a.alg||e&&a.alg!==e)}catch{return!1}}function tt(s,e){return!!((e==="v4"||!e)&&We.test(s)||(e==="v6"||!e)&&Ye.test(s))}class N extends y{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==u.string){const n=this._getOrReturnCtx(e);return c(n,{code:o.invalid_type,expected:u.string,received:n.parsedType}),m}const r=new k;let a;for(const n of this._def.checks)if(n.kind==="min")e.data.length<n.value&&(a=this._getOrReturnCtx(e,a),c(a,{code:o.too_small,minimum:n.value,type:"string",inclusive:!0,exact:!1,message:n.message}),r.dirty());else if(n.kind==="max")e.data.length>n.value&&(a=this._getOrReturnCtx(e,a),c(a,{code:o.too_big,maximum:n.value,type:"string",inclusive:!0,exact:!1,message:n.message}),r.dirty());else if(n.kind==="length"){const i=e.data.length>n.value,d=e.data.length<n.value;(i||d)&&(a=this._getOrReturnCtx(e,a),i?c(a,{code:o.too_big,maximum:n.value,type:"string",inclusive:!0,exact:!0,message:n.message}):d&&c(a,{code:o.too_small,minimum:n.value,type:"string",inclusive:!0,exact:!0,message:n.message}),r.dirty())}else if(n.kind==="email")Ue.test(e.data)||(a=this._getOrReturnCtx(e,a),c(a,{validation:"email",code:o.invalid_string,message:n.message}),r.dirty());else if(n.kind==="emoji")q||(q=new RegExp(Fe,"u")),q.test(e.data)||(a=this._getOrReturnCtx(e,a),c(a,{validation:"emoji",code:o.invalid_string,message:n.message}),r.dirty());else if(n.kind==="uuid")Me.test(e.data)||(a=this._getOrReturnCtx(e,a),c(a,{validation:"uuid",code:o.invalid_string,message:n.message}),r.dirty());else if(n.kind==="nanoid")Le.test(e.data)||(a=this._getOrReturnCtx(e,a),c(a,{validation:"nanoid",code:o.invalid_string,message:n.message}),r.dirty());else if(n.kind==="cuid")$e.test(e.data)||(a=this._getOrReturnCtx(e,a),c(a,{validation:"cuid",code:o.invalid_string,message:n.message}),r.dirty());else if(n.kind==="cuid2")Pe.test(e.data)||(a=this._getOrReturnCtx(e,a),c(a,{validation:"cuid2",code:o.invalid_string,message:n.message}),r.dirty());else if(n.kind==="ulid")Ve.test(e.data)||(a=this._getOrReturnCtx(e,a),c(a,{validation:"ulid",code:o.invalid_string,message:n.message}),r.dirty());else if(n.kind==="url")try{new URL(e.data)}catch{a=this._getOrReturnCtx(e,a),c(a,{validation:"url",code:o.invalid_string,message:n.message}),r.dirty()}else n.kind==="regex"?(n.regex.lastIndex=0,n.regex.test(e.data)||(a=this._getOrReturnCtx(e,a),c(a,{validation:"regex",code:o.invalid_string,message:n.message}),r.dirty())):n.kind==="trim"?e.data=e.data.trim():n.kind==="includes"?e.data.includes(n.value,n.position)||(a=this._getOrReturnCtx(e,a),c(a,{code:o.invalid_string,validation:{includes:n.value,position:n.position},message:n.message}),r.dirty()):n.kind==="toLowerCase"?e.data=e.data.toLowerCase():n.kind==="toUpperCase"?e.data=e.data.toUpperCase():n.kind==="startsWith"?e.data.startsWith(n.value)||(a=this._getOrReturnCtx(e,a),c(a,{code:o.invalid_string,validation:{startsWith:n.value},message:n.message}),r.dirty()):n.kind==="endsWith"?e.data.endsWith(n.value)||(a=this._getOrReturnCtx(e,a),c(a,{code:o.invalid_string,validation:{endsWith:n.value},message:n.message}),r.dirty()):n.kind==="datetime"?Xe(n).test(e.data)||(a=this._getOrReturnCtx(e,a),c(a,{code:o.invalid_string,validation:"datetime",message:n.message}),r.dirty()):n.kind==="date"?Ge.test(e.data)||(a=this._getOrReturnCtx(e,a),c(a,{code:o.invalid_string,validation:"date",message:n.message}),r.dirty()):n.kind==="time"?Qe(n).test(e.data)||(a=this._getOrReturnCtx(e,a),c(a,{code:o.invalid_string,validation:"time",message:n.message}),r.dirty()):n.kind==="duration"?De.test(e.data)||(a=this._getOrReturnCtx(e,a),c(a,{validation:"duration",code:o.invalid_string,message:n.message}),r.dirty()):n.kind==="ip"?Ke(e.data,n.version)||(a=this._getOrReturnCtx(e,a),c(a,{validation:"ip",code:o.invalid_string,message:n.message}),r.dirty()):n.kind==="jwt"?et(e.data,n.alg)||(a=this._getOrReturnCtx(e,a),c(a,{validation:"jwt",code:o.invalid_string,message:n.message}),r.dirty()):n.kind==="cidr"?tt(e.data,n.version)||(a=this._getOrReturnCtx(e,a),c(a,{validation:"cidr",code:o.invalid_string,message:n.message}),r.dirty()):n.kind==="base64"?He.test(e.data)||(a=this._getOrReturnCtx(e,a),c(a,{validation:"base64",code:o.invalid_string,message:n.message}),r.dirty()):n.kind==="base64url"?Je.test(e.data)||(a=this._getOrReturnCtx(e,a),c(a,{validation:"base64url",code:o.invalid_string,message:n.message}),r.dirty()):g.assertNever(n);return{status:r.value,value:e.data}}_regex(e,t,r){return this.refinement(a=>e.test(a),{validation:t,code:o.invalid_string,...l.errToObj(r)})}_addCheck(e){return new N({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...l.errToObj(e)})}url(e){return this._addCheck({kind:"url",...l.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...l.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...l.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...l.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...l.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...l.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...l.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...l.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...l.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...l.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...l.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...l.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof e?.precision>"u"?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...l.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof e?.precision>"u"?null:e?.precision,...l.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...l.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...l.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t?.position,...l.errToObj(t?.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...l.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...l.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...l.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...l.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...l.errToObj(t)})}nonempty(e){return this.min(1,l.errToObj(e))}trim(){return new N({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new N({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new N({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}}N.create=s=>new N({checks:[],typeName:p.ZodString,coerce:s?.coerce??!1,..._(s)});function st(s,e){const t=(s.toString().split(".")[1]||"").length,r=(e.toString().split(".")[1]||"").length,a=t>r?t:r,n=Number.parseInt(s.toFixed(a).replace(".","")),i=Number.parseInt(e.toFixed(a).replace(".",""));return n%i/10**a}class E extends y{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==u.number){const n=this._getOrReturnCtx(e);return c(n,{code:o.invalid_type,expected:u.number,received:n.parsedType}),m}let r;const a=new k;for(const n of this._def.checks)n.kind==="int"?g.isInteger(e.data)||(r=this._getOrReturnCtx(e,r),c(r,{code:o.invalid_type,expected:"integer",received:"float",message:n.message}),a.dirty()):n.kind==="min"?(n.inclusive?e.data<n.value:e.data<=n.value)&&(r=this._getOrReturnCtx(e,r),c(r,{code:o.too_small,minimum:n.value,type:"number",inclusive:n.inclusive,exact:!1,message:n.message}),a.dirty()):n.kind==="max"?(n.inclusive?e.data>n.value:e.data>=n.value)&&(r=this._getOrReturnCtx(e,r),c(r,{code:o.too_big,maximum:n.value,type:"number",inclusive:n.inclusive,exact:!1,message:n.message}),a.dirty()):n.kind==="multipleOf"?st(e.data,n.value)!==0&&(r=this._getOrReturnCtx(e,r),c(r,{code:o.not_multiple_of,multipleOf:n.value,message:n.message}),a.dirty()):n.kind==="finite"?Number.isFinite(e.data)||(r=this._getOrReturnCtx(e,r),c(r,{code:o.not_finite,message:n.message}),a.dirty()):g.assertNever(n);return{status:a.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,l.toString(t))}gt(e,t){return this.setLimit("min",e,!1,l.toString(t))}lte(e,t){return this.setLimit("max",e,!0,l.toString(t))}lt(e,t){return this.setLimit("max",e,!1,l.toString(t))}setLimit(e,t,r,a){return new E({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:l.toString(a)}]})}_addCheck(e){return new E({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:l.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:l.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:l.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:l.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:l.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:l.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:l.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:l.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:l.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&g.isInteger(e.value))}get isFinite(){let e=null,t=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(t===null||r.value>t)&&(t=r.value):r.kind==="max"&&(e===null||r.value<e)&&(e=r.value)}return Number.isFinite(t)&&Number.isFinite(e)}}E.create=s=>new E({checks:[],typeName:p.ZodNumber,coerce:s?.coerce||!1,..._(s)});class L extends y{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==u.bigint)return this._getInvalidInput(e);let r;const a=new k;for(const n of this._def.checks)n.kind==="min"?(n.inclusive?e.data<n.value:e.data<=n.value)&&(r=this._getOrReturnCtx(e,r),c(r,{code:o.too_small,type:"bigint",minimum:n.value,inclusive:n.inclusive,message:n.message}),a.dirty()):n.kind==="max"?(n.inclusive?e.data>n.value:e.data>=n.value)&&(r=this._getOrReturnCtx(e,r),c(r,{code:o.too_big,type:"bigint",maximum:n.value,inclusive:n.inclusive,message:n.message}),a.dirty()):n.kind==="multipleOf"?e.data%n.value!==BigInt(0)&&(r=this._getOrReturnCtx(e,r),c(r,{code:o.not_multiple_of,multipleOf:n.value,message:n.message}),a.dirty()):g.assertNever(n);return{status:a.value,value:e.data}}_getInvalidInput(e){const t=this._getOrReturnCtx(e);return c(t,{code:o.invalid_type,expected:u.bigint,received:t.parsedType}),m}gte(e,t){return this.setLimit("min",e,!0,l.toString(t))}gt(e,t){return this.setLimit("min",e,!1,l.toString(t))}lte(e,t){return this.setLimit("max",e,!0,l.toString(t))}lt(e,t){return this.setLimit("max",e,!1,l.toString(t))}setLimit(e,t,r,a){return new L({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:l.toString(a)}]})}_addCheck(e){return new L({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:l.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:l.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:l.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:l.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:l.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}}L.create=s=>new L({checks:[],typeName:p.ZodBigInt,coerce:s?.coerce??!1,..._(s)});class ne extends y{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==u.boolean){const r=this._getOrReturnCtx(e);return c(r,{code:o.invalid_type,expected:u.boolean,received:r.parsedType}),m}return b(e.data)}}ne.create=s=>new ne({typeName:p.ZodBoolean,coerce:s?.coerce||!1,..._(s)});class U extends y{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==u.date){const n=this._getOrReturnCtx(e);return c(n,{code:o.invalid_type,expected:u.date,received:n.parsedType}),m}if(Number.isNaN(e.data.getTime())){const n=this._getOrReturnCtx(e);return c(n,{code:o.invalid_date}),m}const r=new k;let a;for(const n of this._def.checks)n.kind==="min"?e.data.getTime()<n.value&&(a=this._getOrReturnCtx(e,a),c(a,{code:o.too_small,message:n.message,inclusive:!0,exact:!1,minimum:n.value,type:"date"}),r.dirty()):n.kind==="max"?e.data.getTime()>n.value&&(a=this._getOrReturnCtx(e,a),c(a,{code:o.too_big,message:n.message,inclusive:!0,exact:!1,maximum:n.value,type:"date"}),r.dirty()):g.assertNever(n);return{status:r.value,value:new Date(e.data.getTime())}}_addCheck(e){return new U({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:l.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:l.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e!=null?new Date(e):null}}U.create=s=>new U({checks:[],coerce:s?.coerce||!1,typeName:p.ZodDate,..._(s)});class ie extends y{_parse(e){if(this._getType(e)!==u.symbol){const r=this._getOrReturnCtx(e);return c(r,{code:o.invalid_type,expected:u.symbol,received:r.parsedType}),m}return b(e.data)}}ie.create=s=>new ie({typeName:p.ZodSymbol,..._(s)});class de extends y{_parse(e){if(this._getType(e)!==u.undefined){const r=this._getOrReturnCtx(e);return c(r,{code:o.invalid_type,expected:u.undefined,received:r.parsedType}),m}return b(e.data)}}de.create=s=>new de({typeName:p.ZodUndefined,..._(s)});class oe extends y{_parse(e){if(this._getType(e)!==u.null){const r=this._getOrReturnCtx(e);return c(r,{code:o.invalid_type,expected:u.null,received:r.parsedType}),m}return b(e.data)}}oe.create=s=>new oe({typeName:p.ZodNull,..._(s)});class ce extends y{constructor(){super(...arguments),this._any=!0}_parse(e){return b(e.data)}}ce.create=s=>new ce({typeName:p.ZodAny,..._(s)});class ue extends y{constructor(){super(...arguments),this._unknown=!0}_parse(e){return b(e.data)}}ue.create=s=>new ue({typeName:p.ZodUnknown,..._(s)});class A extends y{_parse(e){const t=this._getOrReturnCtx(e);return c(t,{code:o.invalid_type,expected:u.never,received:t.parsedType}),m}}A.create=s=>new A({typeName:p.ZodNever,..._(s)});class le extends y{_parse(e){if(this._getType(e)!==u.undefined){const r=this._getOrReturnCtx(e);return c(r,{code:o.invalid_type,expected:u.void,received:r.parsedType}),m}return b(e.data)}}le.create=s=>new le({typeName:p.ZodVoid,..._(s)});class w extends y{_parse(e){const{ctx:t,status:r}=this._processInputParams(e),a=this._def;if(t.parsedType!==u.array)return c(t,{code:o.invalid_type,expected:u.array,received:t.parsedType}),m;if(a.exactLength!==null){const i=t.data.length>a.exactLength.value,d=t.data.length<a.exactLength.value;(i||d)&&(c(t,{code:i?o.too_big:o.too_small,minimum:d?a.exactLength.value:void 0,maximum:i?a.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:a.exactLength.message}),r.dirty())}if(a.minLength!==null&&t.data.length<a.minLength.value&&(c(t,{code:o.too_small,minimum:a.minLength.value,type:"array",inclusive:!0,exact:!1,message:a.minLength.message}),r.dirty()),a.maxLength!==null&&t.data.length>a.maxLength.value&&(c(t,{code:o.too_big,maximum:a.maxLength.value,type:"array",inclusive:!0,exact:!1,message:a.maxLength.message}),r.dirty()),t.common.async)return Promise.all([...t.data].map((i,d)=>a.type._parseAsync(new S(t,i,t.path,d)))).then(i=>k.mergeArray(r,i));const n=[...t.data].map((i,d)=>a.type._parseSync(new S(t,i,t.path,d)));return k.mergeArray(r,n)}get element(){return this._def.type}min(e,t){return new w({...this._def,minLength:{value:e,message:l.toString(t)}})}max(e,t){return new w({...this._def,maxLength:{value:e,message:l.toString(t)}})}length(e,t){return new w({...this._def,exactLength:{value:e,message:l.toString(t)}})}nonempty(e){return this.min(1,e)}}w.create=(s,e)=>new w({type:s,minLength:null,maxLength:null,exactLength:null,typeName:p.ZodArray,..._(e)});function R(s){if(s instanceof x){const e={};for(const t in s.shape){const r=s.shape[t];e[t]=O.create(R(r))}return new x({...s._def,shape:()=>e})}else return s instanceof w?new w({...s._def,type:R(s.element)}):s instanceof O?O.create(R(s.unwrap())):s instanceof P?P.create(R(s.unwrap())):s instanceof Z?Z.create(s.items.map(e=>R(e))):s}class x extends y{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),t=g.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}_parse(e){if(this._getType(e)!==u.object){const f=this._getOrReturnCtx(e);return c(f,{code:o.invalid_type,expected:u.object,received:f.parsedType}),m}const{status:r,ctx:a}=this._processInputParams(e),{shape:n,keys:i}=this._getCached(),d=[];if(!(this._def.catchall instanceof A&&this._def.unknownKeys==="strip"))for(const f in a.data)i.includes(f)||d.push(f);const h=[];for(const f of i){const v=n[f],V=a.data[f];h.push({key:{status:"valid",value:f},value:v._parse(new S(a,V,a.path,f)),alwaysSet:f in a.data})}if(this._def.catchall instanceof A){const f=this._def.unknownKeys;if(f==="passthrough")for(const v of d)h.push({key:{status:"valid",value:v},value:{status:"valid",value:a.data[v]}});else if(f==="strict")d.length>0&&(c(a,{code:o.unrecognized_keys,keys:d}),r.dirty());else if(f!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const f=this._def.catchall;for(const v of d){const V=a.data[v];h.push({key:{status:"valid",value:v},value:f._parse(new S(a,V,a.path,v)),alwaysSet:v in a.data})}}return a.common.async?Promise.resolve().then(async()=>{const f=[];for(const v of h){const V=await v.key,we=await v.value;f.push({key:V,value:we,alwaysSet:v.alwaysSet})}return f}).then(f=>k.mergeObjectSync(r,f)):k.mergeObjectSync(r,h)}get shape(){return this._def.shape()}strict(e){return l.errToObj,new x({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(t,r)=>{const a=this._def.errorMap?.(t,r).message??r.defaultError;return t.code==="unrecognized_keys"?{message:l.errToObj(e).message??a}:{message:a}}}:{}})}strip(){return new x({...this._def,unknownKeys:"strip"})}passthrough(){return new x({...this._def,unknownKeys:"passthrough"})}extend(e){return new x({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new x({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:p.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new x({...this._def,catchall:e})}pick(e){const t={};for(const r of g.objectKeys(e))e[r]&&this.shape[r]&&(t[r]=this.shape[r]);return new x({...this._def,shape:()=>t})}omit(e){const t={};for(const r of g.objectKeys(this.shape))e[r]||(t[r]=this.shape[r]);return new x({...this._def,shape:()=>t})}deepPartial(){return R(this)}partial(e){const t={};for(const r of g.objectKeys(this.shape)){const a=this.shape[r];e&&!e[r]?t[r]=a:t[r]=a.optional()}return new x({...this._def,shape:()=>t})}required(e){const t={};for(const r of g.objectKeys(this.shape))if(e&&!e[r])t[r]=this.shape[r];else{let n=this.shape[r];for(;n instanceof O;)n=n._def.innerType;t[r]=n}return new x({...this._def,shape:()=>t})}keyof(){return be(g.objectKeys(this.shape))}}x.create=(s,e)=>new x({shape:()=>s,unknownKeys:"strip",catchall:A.create(),typeName:p.ZodObject,..._(e)});x.strictCreate=(s,e)=>new x({shape:()=>s,unknownKeys:"strict",catchall:A.create(),typeName:p.ZodObject,..._(e)});x.lazycreate=(s,e)=>new x({shape:s,unknownKeys:"strip",catchall:A.create(),typeName:p.ZodObject,..._(e)});class F extends y{_parse(e){const{ctx:t}=this._processInputParams(e),r=this._def.options;function a(n){for(const d of n)if(d.result.status==="valid")return d.result;for(const d of n)if(d.result.status==="dirty")return t.common.issues.push(...d.ctx.common.issues),d.result;const i=n.map(d=>new C(d.ctx.common.issues));return c(t,{code:o.invalid_union,unionErrors:i}),m}if(t.common.async)return Promise.all(r.map(async n=>{const i={...t,common:{...t.common,issues:[]},parent:null};return{result:await n._parseAsync({data:t.data,path:t.path,parent:i}),ctx:i}})).then(a);{let n;const i=[];for(const h of r){const f={...t,common:{...t.common,issues:[]},parent:null},v=h._parseSync({data:t.data,path:t.path,parent:f});if(v.status==="valid")return v;v.status==="dirty"&&!n&&(n={result:v,ctx:f}),f.common.issues.length&&i.push(f.common.issues)}if(n)return t.common.issues.push(...n.ctx.common.issues),n.result;const d=i.map(h=>new C(h));return c(t,{code:o.invalid_union,unionErrors:d}),m}}get options(){return this._def.options}}F.create=(s,e)=>new F({options:s,typeName:p.ZodUnion,..._(e)});function H(s,e){const t=T(s),r=T(e);if(s===e)return{valid:!0,data:s};if(t===u.object&&r===u.object){const a=g.objectKeys(e),n=g.objectKeys(s).filter(d=>a.indexOf(d)!==-1),i={...s,...e};for(const d of n){const h=H(s[d],e[d]);if(!h.valid)return{valid:!1};i[d]=h.data}return{valid:!0,data:i}}else if(t===u.array&&r===u.array){if(s.length!==e.length)return{valid:!1};const a=[];for(let n=0;n<s.length;n++){const i=s[n],d=e[n],h=H(i,d);if(!h.valid)return{valid:!1};a.push(h.data)}return{valid:!0,data:a}}else return t===u.date&&r===u.date&&+s==+e?{valid:!0,data:s}:{valid:!1}}class B extends y{_parse(e){const{status:t,ctx:r}=this._processInputParams(e),a=(n,i)=>{if(se(n)||se(i))return m;const d=H(n.value,i.value);return d.valid?((re(n)||re(i))&&t.dirty(),{status:t.value,value:d.data}):(c(r,{code:o.invalid_intersection_types}),m)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([n,i])=>a(n,i)):a(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}B.create=(s,e,t)=>new B({left:s,right:e,typeName:p.ZodIntersection,..._(t)});class Z extends y{_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==u.array)return c(r,{code:o.invalid_type,expected:u.array,received:r.parsedType}),m;if(r.data.length<this._def.items.length)return c(r,{code:o.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),m;!this._def.rest&&r.data.length>this._def.items.length&&(c(r,{code:o.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const n=[...r.data].map((i,d)=>{const h=this._def.items[d]||this._def.rest;return h?h._parse(new S(r,i,r.path,d)):null}).filter(i=>!!i);return r.common.async?Promise.all(n).then(i=>k.mergeArray(t,i)):k.mergeArray(t,n)}get items(){return this._def.items}rest(e){return new Z({...this._def,rest:e})}}Z.create=(s,e)=>{if(!Array.isArray(s))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Z({items:s,typeName:p.ZodTuple,rest:null,..._(e)})};class he extends y{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==u.map)return c(r,{code:o.invalid_type,expected:u.map,received:r.parsedType}),m;const a=this._def.keyType,n=this._def.valueType,i=[...r.data.entries()].map(([d,h],f)=>({key:a._parse(new S(r,d,r.path,[f,"key"])),value:n._parse(new S(r,h,r.path,[f,"value"]))}));if(r.common.async){const d=new Map;return Promise.resolve().then(async()=>{for(const h of i){const f=await h.key,v=await h.value;if(f.status==="aborted"||v.status==="aborted")return m;(f.status==="dirty"||v.status==="dirty")&&t.dirty(),d.set(f.value,v.value)}return{status:t.value,value:d}})}else{const d=new Map;for(const h of i){const f=h.key,v=h.value;if(f.status==="aborted"||v.status==="aborted")return m;(f.status==="dirty"||v.status==="dirty")&&t.dirty(),d.set(f.value,v.value)}return{status:t.value,value:d}}}}he.create=(s,e,t)=>new he({valueType:e,keyType:s,typeName:p.ZodMap,..._(t)});class z extends y{_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==u.set)return c(r,{code:o.invalid_type,expected:u.set,received:r.parsedType}),m;const a=this._def;a.minSize!==null&&r.data.size<a.minSize.value&&(c(r,{code:o.too_small,minimum:a.minSize.value,type:"set",inclusive:!0,exact:!1,message:a.minSize.message}),t.dirty()),a.maxSize!==null&&r.data.size>a.maxSize.value&&(c(r,{code:o.too_big,maximum:a.maxSize.value,type:"set",inclusive:!0,exact:!1,message:a.maxSize.message}),t.dirty());const n=this._def.valueType;function i(h){const f=new Set;for(const v of h){if(v.status==="aborted")return m;v.status==="dirty"&&t.dirty(),f.add(v.value)}return{status:t.value,value:f}}const d=[...r.data.values()].map((h,f)=>n._parse(new S(r,h,r.path,f)));return r.common.async?Promise.all(d).then(h=>i(h)):i(d)}min(e,t){return new z({...this._def,minSize:{value:e,message:l.toString(t)}})}max(e,t){return new z({...this._def,maxSize:{value:e,message:l.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}z.create=(s,e)=>new z({valueType:s,minSize:null,maxSize:null,typeName:p.ZodSet,..._(e)});class fe extends y{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}fe.create=(s,e)=>new fe({getter:s,typeName:p.ZodLazy,..._(e)});class me extends y{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return c(t,{received:t.data,code:o.invalid_literal,expected:this._def.value}),m}return{status:"valid",value:e.data}}get value(){return this._def.value}}me.create=(s,e)=>new me({value:s,typeName:p.ZodLiteral,..._(e)});function be(s,e){return new j({values:s,typeName:p.ZodEnum,..._(e)})}class j extends y{_parse(e){if(typeof e.data!="string"){const t=this._getOrReturnCtx(e),r=this._def.values;return c(t,{expected:g.joinValues(r),received:t.parsedType,code:o.invalid_type}),m}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){const t=this._getOrReturnCtx(e),r=this._def.values;return c(t,{received:t.data,code:o.invalid_enum_value,options:r}),m}return b(e.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return j.create(e,{...this._def,...t})}exclude(e,t=this._def){return j.create(this.options.filter(r=>!e.includes(r)),{...this._def,...t})}}j.create=be;class pe extends y{_parse(e){const t=g.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==u.string&&r.parsedType!==u.number){const a=g.objectValues(t);return c(r,{expected:g.joinValues(a),received:r.parsedType,code:o.invalid_type}),m}if(this._cache||(this._cache=new Set(g.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){const a=g.objectValues(t);return c(r,{received:r.data,code:o.invalid_enum_value,options:a}),m}return b(e.data)}get enum(){return this._def.values}}pe.create=(s,e)=>new pe({values:s,typeName:p.ZodNativeEnum,..._(e)});class W extends y{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==u.promise&&t.common.async===!1)return c(t,{code:o.invalid_type,expected:u.promise,received:t.parsedType}),m;const r=t.parsedType===u.promise?t.data:Promise.resolve(t.data);return b(r.then(a=>this._def.type.parseAsync(a,{path:t.path,errorMap:t.common.contextualErrorMap})))}}W.create=(s,e)=>new W({type:s,typeName:p.ZodPromise,..._(e)});class $ extends y{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===p.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:r}=this._processInputParams(e),a=this._def.effect||null,n={addIssue:i=>{c(r,i),i.fatal?t.abort():t.dirty()},get path(){return r.path}};if(n.addIssue=n.addIssue.bind(n),a.type==="preprocess"){const i=a.transform(r.data,n);if(r.common.async)return Promise.resolve(i).then(async d=>{if(t.value==="aborted")return m;const h=await this._def.schema._parseAsync({data:d,path:r.path,parent:r});return h.status==="aborted"?m:h.status==="dirty"||t.value==="dirty"?M(h.value):h});{if(t.value==="aborted")return m;const d=this._def.schema._parseSync({data:i,path:r.path,parent:r});return d.status==="aborted"?m:d.status==="dirty"||t.value==="dirty"?M(d.value):d}}if(a.type==="refinement"){const i=d=>{const h=a.refinement(d,n);if(r.common.async)return Promise.resolve(h);if(h instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return d};if(r.common.async===!1){const d=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return d.status==="aborted"?m:(d.status==="dirty"&&t.dirty(),i(d.value),{status:t.value,value:d.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(d=>d.status==="aborted"?m:(d.status==="dirty"&&t.dirty(),i(d.value).then(()=>({status:t.value,value:d.value}))))}if(a.type==="transform")if(r.common.async===!1){const i=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!I(i))return m;const d=a.transform(i.value,n);if(d instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:d}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(i=>I(i)?Promise.resolve(a.transform(i.value,n)).then(d=>({status:t.value,value:d})):m);g.assertNever(a)}}$.create=(s,e,t)=>new $({schema:s,typeName:p.ZodEffects,effect:e,..._(t)});$.createWithPreprocess=(s,e,t)=>new $({schema:e,effect:{type:"preprocess",transform:s},typeName:p.ZodEffects,..._(t)});class O extends y{_parse(e){return this._getType(e)===u.undefined?b(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}O.create=(s,e)=>new O({innerType:s,typeName:p.ZodOptional,..._(e)});class P extends y{_parse(e){return this._getType(e)===u.null?b(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}P.create=(s,e)=>new P({innerType:s,typeName:p.ZodNullable,..._(e)});class J extends y{_parse(e){const{ctx:t}=this._processInputParams(e);let r=t.data;return t.parsedType===u.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}J.create=(s,e)=>new J({innerType:s,typeName:p.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,..._(e)});class G extends y{_parse(e){const{ctx:t}=this._processInputParams(e),r={...t,common:{...t.common,issues:[]}},a=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return D(a)?a.then(n=>({status:"valid",value:n.status==="valid"?n.value:this._def.catchValue({get error(){return new C(r.common.issues)},input:r.data})})):{status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new C(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}G.create=(s,e)=>new G({innerType:s,typeName:p.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,..._(e)});class _e extends y{_parse(e){if(this._getType(e)!==u.nan){const r=this._getOrReturnCtx(e);return c(r,{code:o.invalid_type,expected:u.nan,received:r.parsedType}),m}return{status:"valid",value:e.data}}}_e.create=s=>new _e({typeName:p.ZodNaN,..._(s)});class rt extends y{_parse(e){const{ctx:t}=this._processInputParams(e),r=t.data;return this._def.type._parse({data:r,path:t.path,parent:t})}unwrap(){return this._def.type}}class ee extends y{_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.common.async)return(async()=>{const n=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return n.status==="aborted"?m:n.status==="dirty"?(t.dirty(),M(n.value)):this._def.out._parseAsync({data:n.value,path:r.path,parent:r})})();{const a=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?m:a.status==="dirty"?(t.dirty(),{status:"dirty",value:a.value}):this._def.out._parseSync({data:a.value,path:r.path,parent:r})}}static create(e,t){return new ee({in:e,out:t,typeName:p.ZodPipeline})}}class Q extends y{_parse(e){const t=this._def.innerType._parse(e),r=a=>(I(a)&&(a.value=Object.freeze(a.value)),a);return D(t)?t.then(a=>r(a)):r(t)}unwrap(){return this._def.innerType}}Q.create=(s,e)=>new Q({innerType:s,typeName:p.ZodReadonly,..._(e)});var p;(function(s){s.ZodString="ZodString",s.ZodNumber="ZodNumber",s.ZodNaN="ZodNaN",s.ZodBigInt="ZodBigInt",s.ZodBoolean="ZodBoolean",s.ZodDate="ZodDate",s.ZodSymbol="ZodSymbol",s.ZodUndefined="ZodUndefined",s.ZodNull="ZodNull",s.ZodAny="ZodAny",s.ZodUnknown="ZodUnknown",s.ZodNever="ZodNever",s.ZodVoid="ZodVoid",s.ZodArray="ZodArray",s.ZodObject="ZodObject",s.ZodUnion="ZodUnion",s.ZodDiscriminatedUnion="ZodDiscriminatedUnion",s.ZodIntersection="ZodIntersection",s.ZodTuple="ZodTuple",s.ZodRecord="ZodRecord",s.ZodMap="ZodMap",s.ZodSet="ZodSet",s.ZodFunction="ZodFunction",s.ZodLazy="ZodLazy",s.ZodLiteral="ZodLiteral",s.ZodEnum="ZodEnum",s.ZodEffects="ZodEffects",s.ZodNativeEnum="ZodNativeEnum",s.ZodOptional="ZodOptional",s.ZodNullable="ZodNullable",s.ZodDefault="ZodDefault",s.ZodCatch="ZodCatch",s.ZodPromise="ZodPromise",s.ZodBranded="ZodBranded",s.ZodPipeline="ZodPipeline",s.ZodReadonly="ZodReadonly"})(p||(p={}));const ye=N.create,at=E.create;A.create;w.create;const nt=x.create;F.create;B.create;Z.create;j.create;W.create;O.create;P.create;const{decodeAbiParameters:Ct}=await X("viem"),it="0x06fdde03",dt=[],ot=[{type:"string"}];async function ct(s){return K({contract:s.contract,method:[it,dt,ot],params:[]})}async function ut(s){return ve(()=>ct(s),{cacheKey:`${s.contract.chain.id}:${s.contract.address}:name`,cacheTime:Number.POSITIVE_INFINITY})}const{decodeAbiParameters:Tt}=await X("viem"),lt="0x95d89b41",ht=[],ft=[{type:"string"}];async function mt(s){return K({contract:s.contract,method:[lt,ht,ft],params:[]})}async function pt(s){return ve(()=>mt(s),{cacheKey:`${s.contract.chain.id}:${s.contract.address}:symbol`,cacheTime:Number.POSITIVE_INFINITY})}const ge=nt({name:ye().default("Ether"),symbol:ye().default("ETH"),decimals:at().default(18)}).default({name:"Ether",symbol:"ETH",decimals:18});async function _t(s){if(Te(s.contract.address)){if(!s.contract.chain.nativeCurrency||!s.contract.chain.nativeCurrency.name||!s.contract.chain.nativeCurrency.symbol||!s.contract.chain.nativeCurrency.decimals)try{const{getChainMetadata:e}=await Ne(async()=>{const{getChainMetadata:r}=await import("./utils-CozXUO91.js");return{getChainMetadata:r}},__vite__mapDeps([0,1])),t=await e(s.contract.chain);return ge.parse({...t.nativeCurrency,...s.contract.chain.nativeCurrency})}catch{}return ge.parse(s.contract.chain.nativeCurrency)}try{const[e,t,r]=await Promise.all([ut(s).catch(()=>""),pt(s),Oe(s)]);return{decimals:r,name:e,symbol:t}}catch(e){throw new Error(`Invalid currency token: ${e}`)}}async function Nt(s){const[e,t]=await Promise.all([Re(s),_t(s)]);return{...t,chainId:s.contract.chain.id,displayValue:Ce(e,t.decimals),tokenAddress:s.contract.address,value:e}}export{Nt as getBalance};
@@ -1 +1 @@
1
- import{importShared as a}from"./__federation_fn_import-D82-s3kA.js";import{r as s}from"./signing-TLGj9K79.js";import{d as r}from"./detectExtension-DQNsMd7m.js";const{decodeAbiParameters:c}=await a("viem"),n="0x3e429396",o=[],t=[{components:[{name:"implementation",type:"address"},{components:[{name:"registerInstallationCallback",type:"bool"},{name:"requiredInterfaces",type:"bytes4[]"},{name:"supportedInterfaces",type:"bytes4[]"},{components:[{name:"selector",type:"bytes4"}],name:"callbackFunctions",type:"tuple[]"},{components:[{name:"selector",type:"bytes4"},{name:"permissionBits",type:"uint256"}],name:"fallbackFunctions",type:"tuple[]"}],name:"config",type:"tuple"}],type:"tuple[]"}];function i(e){return r({availableSelectors:e,method:[n,o,t]})}function d(e){return c(t,e)[0]}async function u(e){return s({contract:e.contract,method:[n,o,t],params:[]})}export{n as FN_SELECTOR,d as decodeGetInstalledModulesResult,u as getInstalledModules,i as isGetInstalledModulesSupported};
1
+ import{importShared as a}from"./__federation_fn_import-BOkD8n2P.js";import{r as s}from"./signing-fd2Rp8P0.js";import{d as r}from"./detectExtension-gGfjMoDV.js";const{decodeAbiParameters:c}=await a("viem"),n="0x3e429396",o=[],t=[{components:[{name:"implementation",type:"address"},{components:[{name:"registerInstallationCallback",type:"bool"},{name:"requiredInterfaces",type:"bytes4[]"},{name:"supportedInterfaces",type:"bytes4[]"},{components:[{name:"selector",type:"bytes4"}],name:"callbackFunctions",type:"tuple[]"},{components:[{name:"selector",type:"bytes4"},{name:"permissionBits",type:"uint256"}],name:"fallbackFunctions",type:"tuple[]"}],name:"config",type:"tuple"}],type:"tuple[]"}];function i(e){return r({availableSelectors:e,method:[n,o,t]})}function d(e){return c(t,e)[0]}async function u(e){return s({contract:e.contract,method:[n,o,t],params:[]})}export{n as FN_SELECTOR,d as decodeGetInstalledModulesResult,u as getInstalledModules,i as isGetInstalledModulesSupported};
@@ -1 +1 @@
1
- import{g as a}from"./thirdweb-E-fErz2x.js";import{f as d}from"./fetchTokenMetadata-BPHUGga-.js";import{parseNFT as o}from"./parseNft-Buclbv5Y.js";import{totalSupply as i}from"./totalSupply-DNIfxfBv.js";import{importShared as u}from"./__federation_fn_import-D82-s3kA.js";import{r as m}from"./signing-TLGj9K79.js";const{decodeAbiParameters:g}=await u("viem"),I="0x0e89341c",f=[{name:"tokenId",type:"uint256"}],k=[{type:"string"}];async function h(t){return m({contract:t.contract,method:[I,f,k],params:[t.tokenId]})}async function C(t){const{useIndexer:r=!0}=t;if(r)try{return await s(t)}catch{return await e(t)}return await e(t)}async function s(t){const r=await a({chain:t.contract.chain,client:t.contract.client,contractAddress:t.contract.address,tokenId:t.tokenId});return r||e(t)}async function e(t){const[r,n]=await Promise.all([h({contract:t.contract,tokenId:t.tokenId}),i({contract:t.contract,id:t.tokenId}).catch(()=>0n)]);return o(await d({client:t.contract.client,tokenId:t.tokenId,tokenUri:r}).then(c=>c||{id:t.tokenId,type:"ERC1155",uri:r}).catch(()=>({id:t.tokenId,type:"ERC1155",uri:r})),{chainId:t.contract.chain.id,owner:null,supply:n,tokenAddress:t.contract.address,tokenId:t.tokenId,tokenUri:r,type:"ERC1155"})}export{C as getNFT};
1
+ import{g as a}from"./thirdweb-BDeAJ4oX.js";import{f as d}from"./fetchTokenMetadata-C3xqQZKk.js";import{parseNFT as o}from"./parseNft-CwTDpy0g.js";import{totalSupply as i}from"./totalSupply-BOyOYvTD.js";import{importShared as u}from"./__federation_fn_import-BOkD8n2P.js";import{r as m}from"./signing-fd2Rp8P0.js";const{decodeAbiParameters:g}=await u("viem"),I="0x0e89341c",f=[{name:"tokenId",type:"uint256"}],k=[{type:"string"}];async function h(t){return m({contract:t.contract,method:[I,f,k],params:[t.tokenId]})}async function C(t){const{useIndexer:r=!0}=t;if(r)try{return await s(t)}catch{return await e(t)}return await e(t)}async function s(t){const r=await a({chain:t.contract.chain,client:t.contract.client,contractAddress:t.contract.address,tokenId:t.tokenId});return r||e(t)}async function e(t){const[r,n]=await Promise.all([h({contract:t.contract,tokenId:t.tokenId}),i({contract:t.contract,id:t.tokenId}).catch(()=>0n)]);return o(await d({client:t.contract.client,tokenId:t.tokenId,tokenUri:r}).then(c=>c||{id:t.tokenId,type:"ERC1155",uri:r}).catch(()=>({id:t.tokenId,type:"ERC1155",uri:r})),{chainId:t.contract.chain.id,owner:null,supply:n,tokenAddress:t.contract.address,tokenId:t.tokenId,tokenUri:r,type:"ERC1155"})}export{C as getNFT};
@@ -1,2 +1,2 @@
1
- const __vite__fileDeps=["assets/ownerOf-DYtTCeNU.js","assets/__federation_fn_import-D82-s3kA.js","assets/signing-TLGj9K79.js","assets/hex-B0Rx0hII.js","assets/withCache-DYumIHzL.js","assets/preload-helper-BokH5fd6.js","assets/fee-data-BCMgs11D.js","assets/rpc-ti0b0r_u.js","assets/utils-CozXUO91.js","assets/json-BHzNJmTy.js","assets/op-gas-fee-reducer-CfxMcvXl.js","assets/estimate-gas-CMPxVjuF.js","assets/encode-JOmK-dAM.js","assets/detectExtension-DQNsMd7m.js"],__vite__mapDeps=i=>i.map(i=>__vite__fileDeps[i]);
2
- import{_ as u}from"./preload-helper-BokH5fd6.js";import{f as m}from"./fetchTokenMetadata-BPHUGga-.js";import{parseNFT as d}from"./parseNft-Buclbv5Y.js";import{importShared as i}from"./__federation_fn_import-D82-s3kA.js";import{r as o}from"./signing-TLGj9K79.js";import{g as s}from"./thirdweb-E-fErz2x.js";const{decodeAbiParameters:x}=await i("viem"),f="0xc87b56dd",h=[{name:"_tokenId",type:"uint256"}],y=[{type:"string"}];async function I(t){return o({contract:t.contract,method:[f,h,y],params:[t.tokenId]})}const{decodeAbiParameters:C}=await i("viem"),k="0x4f6ccce7",l=[{name:"_index",type:"uint256"}],_=[{type:"uint256"}];async function T(t){return o({contract:t.contract,method:[k,l,_],params:[t.index]})}async function O(t){const{useIndexer:e=!0}=t;if(e)try{return await w(t)}catch{return await n(t)}return await n(t)}async function w(t){const e=await s({chain:t.contract.chain,client:t.contract.client,contractAddress:t.contract.address,includeOwners:t.includeOwner,tokenId:t.tokenId});return e||n(t)}async function n(t){let e=t.tokenId;if(t.tokenByIndex)try{e=await T({contract:t.contract,index:t.tokenId})}catch{}const[r,a]=await Promise.all([I({contract:t.contract,tokenId:e}).catch(()=>null),t.includeOwner?u(()=>import("./ownerOf-DYtTCeNU.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13])).then(c=>c.ownerOf({contract:t.contract,tokenId:e})).catch(()=>null):null]);return r?.trim()?d(await m({client:t.contract.client,tokenId:e,tokenUri:r}).then(c=>c||{id:e,type:"ERC721",uri:r}).catch(()=>({id:e,type:"ERC721",uri:r})),{chainId:t.contract.chain.id,owner:a,tokenAddress:t.contract.address,tokenId:e,tokenUri:r,type:"ERC721"}):d({id:e,type:"ERC721",uri:""},{chainId:t.contract.chain.id,owner:a,tokenAddress:t.contract.address,tokenId:e,tokenUri:"",type:"ERC721"})}export{O as getNFT};
1
+ const __vite__fileDeps=["assets/ownerOf-CaDY4Qro.js","assets/__federation_fn_import-BOkD8n2P.js","assets/signing-fd2Rp8P0.js","assets/hex-B0Rx0hII.js","assets/withCache-DYumIHzL.js","assets/preload-helper-CO43ckIt.js","assets/fee-data-B6rXatSB.js","assets/rpc-ti0b0r_u.js","assets/utils-CozXUO91.js","assets/json-BHzNJmTy.js","assets/op-gas-fee-reducer-CfxMcvXl.js","assets/estimate-gas-BG6-Kqmv.js","assets/encode-CKwvXR_N.js","assets/detectExtension-gGfjMoDV.js"],__vite__mapDeps=i=>i.map(i=>__vite__fileDeps[i]);
2
+ import{_ as u}from"./preload-helper-CO43ckIt.js";import{f as m}from"./fetchTokenMetadata-C3xqQZKk.js";import{parseNFT as d}from"./parseNft-CwTDpy0g.js";import{importShared as i}from"./__federation_fn_import-BOkD8n2P.js";import{r as o}from"./signing-fd2Rp8P0.js";import{g as s}from"./thirdweb-BDeAJ4oX.js";const{decodeAbiParameters:x}=await i("viem"),f="0xc87b56dd",h=[{name:"_tokenId",type:"uint256"}],y=[{type:"string"}];async function I(t){return o({contract:t.contract,method:[f,h,y],params:[t.tokenId]})}const{decodeAbiParameters:C}=await i("viem"),k="0x4f6ccce7",l=[{name:"_index",type:"uint256"}],_=[{type:"uint256"}];async function T(t){return o({contract:t.contract,method:[k,l,_],params:[t.index]})}async function O(t){const{useIndexer:e=!0}=t;if(e)try{return await w(t)}catch{return await n(t)}return await n(t)}async function w(t){const e=await s({chain:t.contract.chain,client:t.contract.client,contractAddress:t.contract.address,includeOwners:t.includeOwner,tokenId:t.tokenId});return e||n(t)}async function n(t){let e=t.tokenId;if(t.tokenByIndex)try{e=await T({contract:t.contract,index:t.tokenId})}catch{}const[r,a]=await Promise.all([I({contract:t.contract,tokenId:e}).catch(()=>null),t.includeOwner?u(()=>import("./ownerOf-CaDY4Qro.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13])).then(c=>c.ownerOf({contract:t.contract,tokenId:e})).catch(()=>null):null]);return r?.trim()?d(await m({client:t.contract.client,tokenId:e,tokenUri:r}).then(c=>c||{id:e,type:"ERC721",uri:r}).catch(()=>({id:e,type:"ERC721",uri:r})),{chainId:t.contract.chain.id,owner:a,tokenAddress:t.contract.address,tokenId:e,tokenUri:r,type:"ERC721"}):d({id:e,type:"ERC721",uri:""},{chainId:t.contract.chain.id,owner:a,tokenAddress:t.contract.address,tokenId:e,tokenUri:"",type:"ERC721"})}export{O as getNFT};
@@ -1,4 +1,4 @@
1
- import{w as l}from"./core-iy2F1EJT.js";const c=l`<svg fill="none" viewBox="0 0 40 40">
1
+ import{w as l}from"./core-9XBuvaBL.js";const c=l`<svg fill="none" viewBox="0 0 40 40">
2
2
  <g clip-path="url(#a)">
3
3
  <g clip-path="url(#b)">
4
4
  <circle cx="20" cy="19.89" r="20" fill="#1B1F23" />
@@ -1,4 +1,4 @@
1
- import{w as l}from"./core-iy2F1EJT.js";const o=l`<svg fill="none" viewBox="0 0 40 40">
1
+ import{w as l}from"./core-9XBuvaBL.js";const o=l`<svg fill="none" viewBox="0 0 40 40">
2
2
  <path
3
3
  fill="#4285F4"
4
4
  d="M32.74 20.3c0-.93-.08-1.81-.24-2.66H20.26v5.03h7a6 6 0 0 1-2.62 3.91v3.28h4.22c2.46-2.27 3.88-5.6 3.88-9.56Z"
@@ -1,4 +1,4 @@
1
- import{w as l}from"./core-iy2F1EJT.js";const o=l`<svg fill="none" viewBox="0 0 16 16">
1
+ import{w as l}from"./core-9XBuvaBL.js";const o=l`<svg fill="none" viewBox="0 0 16 16">
2
2
  <path
3
3
  fill="currentColor"
4
4
  d="M8.51 5.66a.83.83 0 0 0-.57-.2.83.83 0 0 0-.52.28.8.8 0 0 0-.25.52 1 1 0 0 1-2 0c0-.75.34-1.43.81-1.91a2.75 2.75 0 0 1 4.78 1.92c0 1.24-.8 1.86-1.25 2.2l-.04.03c-.47.36-.5.43-.5.65a1 1 0 1 1-2 0c0-1.25.8-1.86 1.24-2.2l.04-.04c.47-.36.5-.43.5-.65 0-.3-.1-.49-.24-.6ZM9.12 11.87a1.13 1.13 0 1 1-2.25 0 1.13 1.13 0 0 1 2.25 0Z"
@@ -1,4 +1,4 @@
1
- import{w as c}from"./core-iy2F1EJT.js";const v=c`<svg
1
+ import{w as c}from"./core-9XBuvaBL.js";const v=c`<svg
2
2
  xmlns="http://www.w3.org/2000/svg"
3
3
  width="28"
4
4
  height="28"
@@ -1,4 +1,4 @@
1
- import{w as C}from"./core-iy2F1EJT.js";const l=C`<svg width="14" height="14" viewBox="0 0 14 14" fill="none">
1
+ import{w as C}from"./core-9XBuvaBL.js";const l=C`<svg width="14" height="14" viewBox="0 0 14 14" fill="none">
2
2
  <path d="M4.98926 3.73932C4.2989 3.73932 3.73926 4.29896 3.73926 4.98932C3.73926 5.67968 4.2989 6.23932 4.98926 6.23932C5.67962 6.23932 6.23926 5.67968 6.23926 4.98932C6.23926 4.29896 5.67962 3.73932 4.98926 3.73932Z" fill="currentColor"/>
3
3
  <path fill-rule="evenodd" clip-rule="evenodd" d="M7.60497 0.500001H6.39504C5.41068 0.499977 4.59185 0.499958 3.93178 0.571471C3.24075 0.64634 2.60613 0.809093 2.04581 1.21619C1.72745 1.44749 1.44749 1.72745 1.21619 2.04581C0.809093 2.60613 0.64634 3.24075 0.571471 3.93178C0.499958 4.59185 0.499977 5.41065 0.500001 6.39501V7.57815C0.499998 8.37476 0.499995 9.05726 0.534869 9.62725C0.570123 10.2034 0.644114 10.7419 0.828442 11.2302C0.925651 11.4877 1.05235 11.7287 1.21619 11.9542C1.44749 12.2726 1.72745 12.5525 2.04581 12.7838C2.60613 13.1909 3.24075 13.3537 3.93178 13.4285C4.59185 13.5001 5.41066 13.5 6.39503 13.5H7.60496C8.58933 13.5 9.40815 13.5001 10.0682 13.4285C10.7593 13.3537 11.3939 13.1909 11.9542 12.7838C12.2726 12.5525 12.5525 12.2726 12.7838 11.9542C13.1909 11.3939 13.3537 10.7593 13.4285 10.0682C13.5 9.40816 13.5 8.58935 13.5 7.60497V6.39505C13.5 5.41068 13.5 4.59185 13.4285 3.93178C13.3537 3.24075 13.1909 2.60613 12.7838 2.04581C12.5525 1.72745 12.2726 1.44749 11.9542 1.21619C11.3939 0.809093 10.7593 0.64634 10.0682 0.571471C9.40816 0.499958 8.58933 0.499977 7.60497 0.500001ZM3.22138 2.83422C3.38394 2.71612 3.62634 2.61627 4.14721 2.55984C4.68679 2.50138 5.39655 2.5 6.45 2.5H7.55C8.60345 2.5 9.31322 2.50138 9.8528 2.55984C10.3737 2.61627 10.6161 2.71612 10.7786 2.83422C10.9272 2.94216 11.0578 3.07281 11.1658 3.22138C11.2839 3.38394 11.3837 3.62634 11.4402 4.14721C11.4986 4.68679 11.5 5.39655 11.5 6.45V6.49703C10.9674 6.11617 10.386 5.84936 9.74213 5.81948C8.40536 5.75745 7.3556 6.73051 6.40509 7.84229C6.33236 7.92737 6.27406 7.98735 6.22971 8.02911L6.1919 8.00514L6.17483 7.99427C6.09523 7.94353 5.98115 7.87083 5.85596 7.80302C5.56887 7.64752 5.18012 7.4921 4.68105 7.4921C4.66697 7.4921 4.6529 7.49239 4.63884 7.49299C3.79163 7.52878 3.09922 8.1106 2.62901 8.55472C2.58751 8.59392 2.54594 8.6339 2.50435 8.6745C2.50011 8.34653 2.5 7.97569 2.5 7.55V6.45C2.5 5.39655 2.50138 4.68679 2.55984 4.14721C2.61627 3.62634 2.71612 3.38394 2.83422 3.22138C2.94216 3.07281 3.07281 2.94216 3.22138 2.83422ZM10.3703 8.14825C10.6798 8.37526 11.043 8.71839 11.4832 9.20889C11.4744 9.44992 11.4608 9.662 11.4402 9.8528C11.3837 10.3737 11.2839 10.6161 11.1658 10.7786C11.0578 10.9272 10.9272 11.0578 10.7786 11.1658C10.6161 11.2839 10.3737 11.3837 9.8528 11.4402C9.31322 11.4986 8.60345 11.5 7.55 11.5H6.45C5.39655 11.5 4.68679 11.4986 4.14721 11.4402C3.62634 11.3837 3.38394 11.2839 3.22138 11.1658C3.15484 11.1174 3.0919 11.0645 3.03298 11.0075C3.10126 10.9356 3.16806 10.8649 3.23317 10.7959L3.29772 10.7276C3.55763 10.4525 3.78639 10.2126 4.00232 10.0087C4.22016 9.80294 4.39412 9.66364 4.53524 9.57742C4.63352 9.51738 4.69022 9.49897 4.71275 9.49345C4.76387 9.49804 4.81803 9.51537 4.90343 9.56162C4.96409 9.59447 5.02355 9.63225 5.11802 9.69238L5.12363 9.69595C5.20522 9.74789 5.32771 9.82587 5.46078 9.89278C5.76529 10.0459 6.21427 10.186 6.74977 10.0158C7.21485 9.86796 7.59367 9.52979 7.92525 9.14195C8.91377 7.98571 9.38267 7.80495 9.64941 7.81733C9.7858 7.82366 10.0101 7.884 10.3703 8.14825Z" fill="currentColor"/>
4
4
  </svg>`;export{l as imageSvg};
@@ -1 +1 @@
1
- import{e as h}from"./wait-for-tx-receipt-C5afrCK7.js";import{getRpcClient as p}from"./rpc-ti0b0r_u.js";import{s as m,a as f}from"./send-batch-transaction-ZanhTs8a.js";import{L as b}from"./withCache-DYumIHzL.js";import{r as g}from"./wallets-BmZ-KVbp.js";const u=new b(1e3);async function S(i){const{account:n,calls:l}=i,o=l.map(a=>({...a,chain:i.chain})),t=[],c=g(65);if(u.set(c,t),n.sendBatchTransaction){const a=await m({account:n,transactions:o});t.push(a.transactionHash),u.set(c,t)}else for(const a of o){const r=await f({account:n,transaction:a});t.push(r.transactionHash),u.set(c,t)}return c}async function T(i){const{chain:n,client:l,id:o}=i,t=u.get(o);if(!t)throw new Error("Failed to get calls status, unknown bundle id");const c=p({chain:n,client:l});let a="success";const r=await Promise.all(t.map(d=>h(c,{hash:d}).then(s=>({blockHash:s.blockHash,blockNumber:s.blockNumber,gasUsed:s.gasUsed,logs:s.logs.map(e=>({address:e.address,data:e.data,topics:e.topics})),status:s.status,transactionHash:s.transactionHash})).catch(()=>(a="pending",null))));return{atomic:!1,chainId:n.id,id:o,receipts:r.filter(d=>d!==null),status:a,statusCode:200,version:"2.0.0"}}async function y(i){const{chain:n,client:l,id:o}=i,t=u.get(o);if(!t)throw new Error("Failed to get calls status, unknown bundle id");const c=p({chain:n,client:l});let a=200;const r=[];for(const d of t)try{const s=await h(c,{hash:d});r.push({blockHash:s.blockHash,blockNumber:`0x${s.blockNumber.toString(16)}`,gasUsed:`0x${s.gasUsed.toString(16)}`,logs:s.logs.map(e=>({address:e.address,data:e.data,topics:e.topics})),status:s.status==="success"?"0x1":"0x0",transactionHash:s.transactionHash})}catch{a=100}return{atomic:!1,chainId:`0x${n.id.toString(16)}`,id:o,receipts:r,status:a,version:"2.0.0"}}export{T as inAppWalletGetCallsStatus,y as inAppWalletGetCallsStatusRaw,S as inAppWalletSendCalls};
1
+ import{e as h}from"./wait-for-tx-receipt-tKiSk-wy.js";import{getRpcClient as p}from"./rpc-ti0b0r_u.js";import{s as m,a as f}from"./send-batch-transaction-BLPmGB9M.js";import{L as b}from"./withCache-DYumIHzL.js";import{r as g}from"./wallets-z86vtyeQ.js";const u=new b(1e3);async function S(i){const{account:n,calls:l}=i,o=l.map(a=>({...a,chain:i.chain})),t=[],c=g(65);if(u.set(c,t),n.sendBatchTransaction){const a=await m({account:n,transactions:o});t.push(a.transactionHash),u.set(c,t)}else for(const a of o){const r=await f({account:n,transaction:a});t.push(r.transactionHash),u.set(c,t)}return c}async function T(i){const{chain:n,client:l,id:o}=i,t=u.get(o);if(!t)throw new Error("Failed to get calls status, unknown bundle id");const c=p({chain:n,client:l});let a="success";const r=await Promise.all(t.map(d=>h(c,{hash:d}).then(s=>({blockHash:s.blockHash,blockNumber:s.blockNumber,gasUsed:s.gasUsed,logs:s.logs.map(e=>({address:e.address,data:e.data,topics:e.topics})),status:s.status,transactionHash:s.transactionHash})).catch(()=>(a="pending",null))));return{atomic:!1,chainId:n.id,id:o,receipts:r.filter(d=>d!==null),status:a,statusCode:200,version:"2.0.0"}}async function y(i){const{chain:n,client:l,id:o}=i,t=u.get(o);if(!t)throw new Error("Failed to get calls status, unknown bundle id");const c=p({chain:n,client:l});let a=200;const r=[];for(const d of t)try{const s=await h(c,{hash:d});r.push({blockHash:s.blockHash,blockNumber:`0x${s.blockNumber.toString(16)}`,gasUsed:`0x${s.gasUsed.toString(16)}`,logs:s.logs.map(e=>({address:e.address,data:e.data,topics:e.topics})),status:s.status==="success"?"0x1":"0x0",transactionHash:s.transactionHash})}catch{a=100}return{atomic:!1,chainId:`0x${n.id.toString(16)}`,id:o,receipts:r,status:a,version:"2.0.0"}}export{T as inAppWalletGetCallsStatus,y as inAppWalletGetCallsStatusRaw,S as inAppWalletSendCalls};
@@ -1,4 +1,4 @@
1
- import{l as H,m as V,n as A,B as I,o as ue,h as Ie,q as Z,i as U,S as Ca,v as ke,g as Pe,w as Qn,x as q,I as ku,y as Fe,z as Na,A as Cu,C as Tt,p as Un,D as Fo,E as Nu,f as Ru,F as Nn,e as ts,H as Mu,G as Ou,t as zu,a as _o,b as Fu,j as _u,J as Lu,K as Uu,k as Dt,L as ju}from"./utils-C7urdXtO.js";import{M as rb,N as sb,O as ob,P as ab,Q as ib,R as cb,T as ub,U as db,V as fb}from"./utils-C7urdXtO.js";import{i as Q,I as de,k as J,c as Ra,g as Ce,p as qu,L as er,a as Du}from"./publicKeyToAddress-CxEKPAKT.js";import{_ as zs}from"./preload-helper-BokH5fd6.js";import{s as Gu,a as tr,H as Hu,b as Vu}from"./sha256-DYtpy1Qz.js";import{c as pb,d as hb,e as mb,f as yb,g as bb,h as gb,i as wb,j as xb,k as vb,l as Eb,n as Pb,o as Ib,p as Ab,q as Tb,r as $b,t as Bb,u as Sb,v as kb,w as Cb,x as Nb,y as Rb,z as Mb,A as Ob,B as zb,C as Fb,D as _b,E as Lb,F as Ub,G as jb,I as qb,J as Db,K as Gb,L as Hb,M as Vb,N as Wb,O as Zb,P as Yb,Q as Kb,R as Jb,m as Xb,S as Qb,T as e6,U as t6,V as n6,W as r6,X as s6,Y as o6,Z as a6,_ as i6,$ as c6,a0 as u6,a1 as d6,a2 as f6,a3 as l6,a4 as p6,a5 as h6,a6 as m6,a7 as y6,a8 as b6,a9 as g6,aa as w6,ab as x6,ac as v6,ad as E6,ae as P6,af as I6,ag as A6,ah as T6,ai as $6,aj as B6,ak as S6,al as k6,am as C6,an as N6,ao as R6,ap as M6,aq as O6,ar as z6,as as F6,at as _6,au as L6,av as U6,aw as j6,ax as q6,ay as D6,az as G6,aA as H6,aB as V6,aC as W6,aD as Z6,aE as Y6,aF as K6,aG as J6,aH as X6,aI as Q6}from"./sha256-DYtpy1Qz.js";import{E as t5}from"./estimate-gas-CMPxVjuF.js";function nr(e,t){return({exclude:n,format:r})=>({exclude:n,format:(s,o)=>{const a=t(s,o);if(n)for(const i of n)delete a[i];return{...a,...r(s,o)}},type:e})}const Ma={"0x0":"legacy","0x1":"eip2930","0x2":"eip1559","0x3":"eip4844","0x4":"eip7702"};function Fs(e,t){const n={...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,chainId:e.chainId?H(e.chainId):void 0,gas:e.gas?BigInt(e.gas):void 0,gasPrice:e.gasPrice?BigInt(e.gasPrice):void 0,maxFeePerBlobGas:e.maxFeePerBlobGas?BigInt(e.maxFeePerBlobGas):void 0,maxFeePerGas:e.maxFeePerGas?BigInt(e.maxFeePerGas):void 0,maxPriorityFeePerGas:e.maxPriorityFeePerGas?BigInt(e.maxPriorityFeePerGas):void 0,nonce:e.nonce?H(e.nonce):void 0,to:e.to?e.to:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,type:e.type?Ma[e.type]:void 0,typeHex:e.type?e.type:void 0,value:e.value?BigInt(e.value):void 0,v:e.v?BigInt(e.v):void 0};return e.authorizationList&&(n.authorizationList=Wu(e.authorizationList)),n.yParity=(()=>{if(e.yParity)return Number(e.yParity);if(typeof n.v=="bigint"){if(n.v===0n||n.v===27n)return 0;if(n.v===1n||n.v===28n)return 1;if(n.v>=35n)return n.v%2n===0n?1:0}})(),n.type==="legacy"&&(delete n.accessList,delete n.maxFeePerBlobGas,delete n.maxFeePerGas,delete n.maxPriorityFeePerGas,delete n.yParity),n.type==="eip2930"&&(delete n.maxFeePerBlobGas,delete n.maxFeePerGas,delete n.maxPriorityFeePerGas),n.type==="eip1559"&&delete n.maxFeePerBlobGas,n}const Wm=nr("transaction",Fs);function Wu(e){return e.map(t=>({address:t.address,chainId:Number(t.chainId),nonce:Number(t.nonce),r:t.r,s:t.s,yParity:Number(t.yParity)}))}function _s(e,t){const n=(e.transactions??[]).map(r=>typeof r=="string"?r:Fs(r));return{...e,baseFeePerGas:e.baseFeePerGas?BigInt(e.baseFeePerGas):null,blobGasUsed:e.blobGasUsed?BigInt(e.blobGasUsed):void 0,difficulty:e.difficulty?BigInt(e.difficulty):void 0,excessBlobGas:e.excessBlobGas?BigInt(e.excessBlobGas):void 0,gasLimit:e.gasLimit?BigInt(e.gasLimit):void 0,gasUsed:e.gasUsed?BigInt(e.gasUsed):void 0,hash:e.hash?e.hash:null,logsBloom:e.logsBloom?e.logsBloom:null,nonce:e.nonce?e.nonce:null,number:e.number?BigInt(e.number):null,size:e.size?BigInt(e.size):void 0,timestamp:e.timestamp?BigInt(e.timestamp):void 0,transactions:n,totalDifficulty:e.totalDifficulty?BigInt(e.totalDifficulty):null}}const Zm=nr("block",_s);function Le(e,{args:t,eventName:n}={}){return{...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,logIndex:e.logIndex?Number(e.logIndex):null,transactionHash:e.transactionHash?e.transactionHash:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,...n?{args:t,eventName:n}:{}}}const Oa={"0x0":"reverted","0x1":"success"};function Ls(e,t){const n={...e,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,contractAddress:e.contractAddress?e.contractAddress:null,cumulativeGasUsed:e.cumulativeGasUsed?BigInt(e.cumulativeGasUsed):null,effectiveGasPrice:e.effectiveGasPrice?BigInt(e.effectiveGasPrice):null,gasUsed:e.gasUsed?BigInt(e.gasUsed):null,logs:e.logs?e.logs.map(r=>Le(r)):null,to:e.to?e.to:null,transactionIndex:e.transactionIndex?H(e.transactionIndex):null,status:e.status?Oa[e.status]:null,type:e.type?Ma[e.type]||e.type:null};return e.blobGasPrice&&(n.blobGasPrice=BigInt(e.blobGasPrice)),e.blobGasUsed&&(n.blobGasUsed=BigInt(e.blobGasUsed)),n}const Ym=nr("transactionReceipt",Ls),Zu={legacy:"0x0",eip2930:"0x1",eip1559:"0x2",eip4844:"0x3",eip7702:"0x4"};function je(e,t){const n={};return typeof e.authorizationList<"u"&&(n.authorizationList=Yu(e.authorizationList)),typeof e.accessList<"u"&&(n.accessList=e.accessList),typeof e.blobVersionedHashes<"u"&&(n.blobVersionedHashes=e.blobVersionedHashes),typeof e.blobs<"u"&&(typeof e.blobs[0]!="string"?n.blobs=e.blobs.map(r=>V(r)):n.blobs=e.blobs),typeof e.data<"u"&&(n.data=e.data),e.account&&(n.from=e.account.address),typeof e.from<"u"&&(n.from=e.from),typeof e.gas<"u"&&(n.gas=A(e.gas)),typeof e.gasPrice<"u"&&(n.gasPrice=A(e.gasPrice)),typeof e.maxFeePerBlobGas<"u"&&(n.maxFeePerBlobGas=A(e.maxFeePerBlobGas)),typeof e.maxFeePerGas<"u"&&(n.maxFeePerGas=A(e.maxFeePerGas)),typeof e.maxPriorityFeePerGas<"u"&&(n.maxPriorityFeePerGas=A(e.maxPriorityFeePerGas)),typeof e.nonce<"u"&&(n.nonce=A(e.nonce)),typeof e.to<"u"&&(n.to=e.to),typeof e.type<"u"&&(n.type=Zu[e.type]),typeof e.value<"u"&&(n.value=A(e.value)),n}const Km=nr("transactionRequest",je);function Yu(e){return e.map(t=>({address:t.address,r:t.r?A(BigInt(t.r)):t.r,s:t.s?A(BigInt(t.s)):t.s,chainId:A(t.chainId),nonce:A(t.nonce),...typeof t.yParity<"u"?{yParity:A(t.yParity)}:{},...typeof t.v<"u"&&typeof t.yParity>"u"?{v:A(t.v)}:{}}))}function fe(e){return typeof e[0]=="string"?ye(e):Ku(e)}function Ku(e){let t=0;for(const s of e)t+=s.length;const n=new Uint8Array(t);let r=0;for(const s of e)n.set(s,r),r+=s.length;return n}function ye(e){return`0x${e.reduce((t,n)=>t+n.replace("0x",""),"")}`}let Lo=class extends I{constructor({offset:t}){super(`Offset \`${t}\` cannot be negative.`,{name:"NegativeOffsetError"})}},za=class extends I{constructor({length:t,position:n}){super(`Position \`${n}\` is out of bounds (\`0 < position < ${t}\`).`,{name:"PositionOutOfBoundsError"})}},Ju=class extends I{constructor({count:t,limit:n}){super(`Recursive read limit of \`${n}\` exceeded (recursive read count: \`${t}\`).`,{name:"RecursiveReadLimitExceededError"})}};const Xu={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 Ju({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(e){if(e<0||e>this.bytes.length-1)throw new za({length:this.bytes.length,position:e})},decrementPosition(e){if(e<0)throw new Lo({offset:e});const 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 Lo({offset:e});const t=this.position+e;this.assertPosition(t),this.position=t},inspectByte(e){const t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectBytes(e,t){const n=t??this.position;return this.assertPosition(n+e-1),this.bytes.subarray(n,n+e)},inspectUint8(e){const t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectUint16(e){const t=e??this.position;return this.assertPosition(t+1),this.dataView.getUint16(t)},inspectUint24(e){const t=e??this.position;return this.assertPosition(t+2),(this.dataView.getUint16(t)<<8)+this.dataView.getUint8(t+2)},inspectUint32(e){const 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();const e=this.inspectByte();return this.position++,e},readBytes(e,t){this.assertReadLimit(),this._touch();const n=this.inspectBytes(e);return this.position+=t??e,n},readUint8(){this.assertReadLimit(),this._touch();const e=this.inspectUint8();return this.position+=1,e},readUint16(){this.assertReadLimit(),this._touch();const e=this.inspectUint16();return this.position+=2,e},readUint24(){this.assertReadLimit(),this._touch();const e=this.inspectUint24();return this.position+=3,e},readUint32(){this.assertReadLimit(),this._touch();const e=this.inspectUint32();return this.position+=4,e},get remaining(){return this.bytes.length-this.position},setPosition(e){const t=this.position;return this.assertPosition(e),this.position=e,()=>this.position=t},_touch(){if(this.recursiveReadLimit===Number.POSITIVE_INFINITY)return;const e=this.getReadCount();this.positionReadCount.set(this.position,e+1),e>0&&this.recursiveReadCount++}};function $t(e,{recursiveReadLimit:t=8192}={}){const n=Object.create(Xu);return n.bytes=e,n.dataView=new DataView(e.buffer,e.byteOffset,e.byteLength),n.positionReadCount=new Map,n.recursiveReadLimit=t,n}function Ne(e,t="hex"){const n=Fa(e),r=$t(new Uint8Array(n.length));return n.encode(r),t==="hex"?V(r.bytes):r.bytes}function ey(e,t="bytes"){return Ne(e,t)}function ty(e,t="hex"){return Ne(e,t)}function Fa(e){return Array.isArray(e)?Qu(e.map(t=>Fa(t))):e0(e)}function Qu(e){const t=e.reduce((s,o)=>s+o.length,0),n=_a(t);return{length:t<=55?1+t:1+n+t,encode(s){t<=55?s.pushByte(192+t):(s.pushByte(247+n),n===1?s.pushUint8(t):n===2?s.pushUint16(t):n===3?s.pushUint24(t):s.pushUint32(t));for(const{encode:o}of e)o(s)}}}function e0(e){const t=typeof e=="string"?ue(e):e,n=_a(t.length);return{length:t.length===1&&t[0]<128?1:t.length<=55?1+t.length:1+n+t.length,encode(s){t.length===1&&t[0]<128?s.pushBytes(t):t.length<=55?(s.pushByte(128+t.length),s.pushBytes(t)):(s.pushByte(183+n),n===1?s.pushUint8(t.length):n===2?s.pushUint16(t.length):n===3?s.pushUint24(t.length):s.pushUint32(t.length),s.pushBytes(t))}}}function _a(e){if(e<2**8)return 1;if(e<2**16)return 2;if(e<2**24)return 3;if(e<2**32)return 4;throw new I("Length is too large.")}const La={gwei:9,wei:18},Ua={ether:-9,wei:9},ny={ether:-18,gwei:-9};function ja(e,t){let n=e.toString();const r=n.startsWith("-");r&&(n=n.slice(1)),n=n.padStart(t,"0");let[s,o]=[n.slice(0,n.length-t),n.slice(n.length-t)];return o=o.replace(/(0+)$/,""),`${r?"-":""}${s||"0"}${o?`.${o}`:""}`}function Us(e,t="wei"){return ja(e,La[t])}function ce(e,t="wei"){return ja(e,Ua[t])}function mn(e){const t=Object.entries(e).map(([r,s])=>s===void 0||s===!1?null:[r,s]).filter(Boolean),n=t.reduce((r,[s])=>Math.max(r,s.length),0);return t.map(([r,s])=>` ${`${r}:`.padEnd(n+1)} ${s}`).join(`
1
+ import{l as H,m as V,n as A,B as I,o as ue,h as Ie,q as Z,i as U,S as Ca,v as ke,g as Pe,w as Qn,x as q,I as ku,y as Fe,z as Na,A as Cu,C as Tt,p as Un,D as Fo,E as Nu,f as Ru,F as Nn,e as ts,H as Mu,G as Ou,t as zu,a as _o,b as Fu,j as _u,J as Lu,K as Uu,k as Dt,L as ju}from"./utils-C7urdXtO.js";import{M as rb,N as sb,O as ob,P as ab,Q as ib,R as cb,T as ub,U as db,V as fb}from"./utils-C7urdXtO.js";import{i as Q,I as de,k as J,c as Ra,g as Ce,p as qu,L as er,a as Du}from"./publicKeyToAddress-CxEKPAKT.js";import{_ as zs}from"./preload-helper-CO43ckIt.js";import{s as Gu,a as tr,H as Hu,b as Vu}from"./sha256-DYtpy1Qz.js";import{c as pb,d as hb,e as mb,f as yb,g as bb,h as gb,i as wb,j as xb,k as vb,l as Eb,n as Pb,o as Ib,p as Ab,q as Tb,r as $b,t as Bb,u as Sb,v as kb,w as Cb,x as Nb,y as Rb,z as Mb,A as Ob,B as zb,C as Fb,D as _b,E as Lb,F as Ub,G as jb,I as qb,J as Db,K as Gb,L as Hb,M as Vb,N as Wb,O as Zb,P as Yb,Q as Kb,R as Jb,m as Xb,S as Qb,T as e6,U as t6,V as n6,W as r6,X as s6,Y as o6,Z as a6,_ as i6,$ as c6,a0 as u6,a1 as d6,a2 as f6,a3 as l6,a4 as p6,a5 as h6,a6 as m6,a7 as y6,a8 as b6,a9 as g6,aa as w6,ab as x6,ac as v6,ad as E6,ae as P6,af as I6,ag as A6,ah as T6,ai as $6,aj as B6,ak as S6,al as k6,am as C6,an as N6,ao as R6,ap as M6,aq as O6,ar as z6,as as F6,at as _6,au as L6,av as U6,aw as j6,ax as q6,ay as D6,az as G6,aA as H6,aB as V6,aC as W6,aD as Z6,aE as Y6,aF as K6,aG as J6,aH as X6,aI as Q6}from"./sha256-DYtpy1Qz.js";import{E as t5}from"./estimate-gas-BG6-Kqmv.js";function nr(e,t){return({exclude:n,format:r})=>({exclude:n,format:(s,o)=>{const a=t(s,o);if(n)for(const i of n)delete a[i];return{...a,...r(s,o)}},type:e})}const Ma={"0x0":"legacy","0x1":"eip2930","0x2":"eip1559","0x3":"eip4844","0x4":"eip7702"};function Fs(e,t){const n={...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,chainId:e.chainId?H(e.chainId):void 0,gas:e.gas?BigInt(e.gas):void 0,gasPrice:e.gasPrice?BigInt(e.gasPrice):void 0,maxFeePerBlobGas:e.maxFeePerBlobGas?BigInt(e.maxFeePerBlobGas):void 0,maxFeePerGas:e.maxFeePerGas?BigInt(e.maxFeePerGas):void 0,maxPriorityFeePerGas:e.maxPriorityFeePerGas?BigInt(e.maxPriorityFeePerGas):void 0,nonce:e.nonce?H(e.nonce):void 0,to:e.to?e.to:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,type:e.type?Ma[e.type]:void 0,typeHex:e.type?e.type:void 0,value:e.value?BigInt(e.value):void 0,v:e.v?BigInt(e.v):void 0};return e.authorizationList&&(n.authorizationList=Wu(e.authorizationList)),n.yParity=(()=>{if(e.yParity)return Number(e.yParity);if(typeof n.v=="bigint"){if(n.v===0n||n.v===27n)return 0;if(n.v===1n||n.v===28n)return 1;if(n.v>=35n)return n.v%2n===0n?1:0}})(),n.type==="legacy"&&(delete n.accessList,delete n.maxFeePerBlobGas,delete n.maxFeePerGas,delete n.maxPriorityFeePerGas,delete n.yParity),n.type==="eip2930"&&(delete n.maxFeePerBlobGas,delete n.maxFeePerGas,delete n.maxPriorityFeePerGas),n.type==="eip1559"&&delete n.maxFeePerBlobGas,n}const Wm=nr("transaction",Fs);function Wu(e){return e.map(t=>({address:t.address,chainId:Number(t.chainId),nonce:Number(t.nonce),r:t.r,s:t.s,yParity:Number(t.yParity)}))}function _s(e,t){const n=(e.transactions??[]).map(r=>typeof r=="string"?r:Fs(r));return{...e,baseFeePerGas:e.baseFeePerGas?BigInt(e.baseFeePerGas):null,blobGasUsed:e.blobGasUsed?BigInt(e.blobGasUsed):void 0,difficulty:e.difficulty?BigInt(e.difficulty):void 0,excessBlobGas:e.excessBlobGas?BigInt(e.excessBlobGas):void 0,gasLimit:e.gasLimit?BigInt(e.gasLimit):void 0,gasUsed:e.gasUsed?BigInt(e.gasUsed):void 0,hash:e.hash?e.hash:null,logsBloom:e.logsBloom?e.logsBloom:null,nonce:e.nonce?e.nonce:null,number:e.number?BigInt(e.number):null,size:e.size?BigInt(e.size):void 0,timestamp:e.timestamp?BigInt(e.timestamp):void 0,transactions:n,totalDifficulty:e.totalDifficulty?BigInt(e.totalDifficulty):null}}const Zm=nr("block",_s);function Le(e,{args:t,eventName:n}={}){return{...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,logIndex:e.logIndex?Number(e.logIndex):null,transactionHash:e.transactionHash?e.transactionHash:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,...n?{args:t,eventName:n}:{}}}const Oa={"0x0":"reverted","0x1":"success"};function Ls(e,t){const n={...e,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,contractAddress:e.contractAddress?e.contractAddress:null,cumulativeGasUsed:e.cumulativeGasUsed?BigInt(e.cumulativeGasUsed):null,effectiveGasPrice:e.effectiveGasPrice?BigInt(e.effectiveGasPrice):null,gasUsed:e.gasUsed?BigInt(e.gasUsed):null,logs:e.logs?e.logs.map(r=>Le(r)):null,to:e.to?e.to:null,transactionIndex:e.transactionIndex?H(e.transactionIndex):null,status:e.status?Oa[e.status]:null,type:e.type?Ma[e.type]||e.type:null};return e.blobGasPrice&&(n.blobGasPrice=BigInt(e.blobGasPrice)),e.blobGasUsed&&(n.blobGasUsed=BigInt(e.blobGasUsed)),n}const Ym=nr("transactionReceipt",Ls),Zu={legacy:"0x0",eip2930:"0x1",eip1559:"0x2",eip4844:"0x3",eip7702:"0x4"};function je(e,t){const n={};return typeof e.authorizationList<"u"&&(n.authorizationList=Yu(e.authorizationList)),typeof e.accessList<"u"&&(n.accessList=e.accessList),typeof e.blobVersionedHashes<"u"&&(n.blobVersionedHashes=e.blobVersionedHashes),typeof e.blobs<"u"&&(typeof e.blobs[0]!="string"?n.blobs=e.blobs.map(r=>V(r)):n.blobs=e.blobs),typeof e.data<"u"&&(n.data=e.data),e.account&&(n.from=e.account.address),typeof e.from<"u"&&(n.from=e.from),typeof e.gas<"u"&&(n.gas=A(e.gas)),typeof e.gasPrice<"u"&&(n.gasPrice=A(e.gasPrice)),typeof e.maxFeePerBlobGas<"u"&&(n.maxFeePerBlobGas=A(e.maxFeePerBlobGas)),typeof e.maxFeePerGas<"u"&&(n.maxFeePerGas=A(e.maxFeePerGas)),typeof e.maxPriorityFeePerGas<"u"&&(n.maxPriorityFeePerGas=A(e.maxPriorityFeePerGas)),typeof e.nonce<"u"&&(n.nonce=A(e.nonce)),typeof e.to<"u"&&(n.to=e.to),typeof e.type<"u"&&(n.type=Zu[e.type]),typeof e.value<"u"&&(n.value=A(e.value)),n}const Km=nr("transactionRequest",je);function Yu(e){return e.map(t=>({address:t.address,r:t.r?A(BigInt(t.r)):t.r,s:t.s?A(BigInt(t.s)):t.s,chainId:A(t.chainId),nonce:A(t.nonce),...typeof t.yParity<"u"?{yParity:A(t.yParity)}:{},...typeof t.v<"u"&&typeof t.yParity>"u"?{v:A(t.v)}:{}}))}function fe(e){return typeof e[0]=="string"?ye(e):Ku(e)}function Ku(e){let t=0;for(const s of e)t+=s.length;const n=new Uint8Array(t);let r=0;for(const s of e)n.set(s,r),r+=s.length;return n}function ye(e){return`0x${e.reduce((t,n)=>t+n.replace("0x",""),"")}`}let Lo=class extends I{constructor({offset:t}){super(`Offset \`${t}\` cannot be negative.`,{name:"NegativeOffsetError"})}},za=class extends I{constructor({length:t,position:n}){super(`Position \`${n}\` is out of bounds (\`0 < position < ${t}\`).`,{name:"PositionOutOfBoundsError"})}},Ju=class extends I{constructor({count:t,limit:n}){super(`Recursive read limit of \`${n}\` exceeded (recursive read count: \`${t}\`).`,{name:"RecursiveReadLimitExceededError"})}};const Xu={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 Ju({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(e){if(e<0||e>this.bytes.length-1)throw new za({length:this.bytes.length,position:e})},decrementPosition(e){if(e<0)throw new Lo({offset:e});const 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 Lo({offset:e});const t=this.position+e;this.assertPosition(t),this.position=t},inspectByte(e){const t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectBytes(e,t){const n=t??this.position;return this.assertPosition(n+e-1),this.bytes.subarray(n,n+e)},inspectUint8(e){const t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectUint16(e){const t=e??this.position;return this.assertPosition(t+1),this.dataView.getUint16(t)},inspectUint24(e){const t=e??this.position;return this.assertPosition(t+2),(this.dataView.getUint16(t)<<8)+this.dataView.getUint8(t+2)},inspectUint32(e){const 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();const e=this.inspectByte();return this.position++,e},readBytes(e,t){this.assertReadLimit(),this._touch();const n=this.inspectBytes(e);return this.position+=t??e,n},readUint8(){this.assertReadLimit(),this._touch();const e=this.inspectUint8();return this.position+=1,e},readUint16(){this.assertReadLimit(),this._touch();const e=this.inspectUint16();return this.position+=2,e},readUint24(){this.assertReadLimit(),this._touch();const e=this.inspectUint24();return this.position+=3,e},readUint32(){this.assertReadLimit(),this._touch();const e=this.inspectUint32();return this.position+=4,e},get remaining(){return this.bytes.length-this.position},setPosition(e){const t=this.position;return this.assertPosition(e),this.position=e,()=>this.position=t},_touch(){if(this.recursiveReadLimit===Number.POSITIVE_INFINITY)return;const e=this.getReadCount();this.positionReadCount.set(this.position,e+1),e>0&&this.recursiveReadCount++}};function $t(e,{recursiveReadLimit:t=8192}={}){const n=Object.create(Xu);return n.bytes=e,n.dataView=new DataView(e.buffer,e.byteOffset,e.byteLength),n.positionReadCount=new Map,n.recursiveReadLimit=t,n}function Ne(e,t="hex"){const n=Fa(e),r=$t(new Uint8Array(n.length));return n.encode(r),t==="hex"?V(r.bytes):r.bytes}function ey(e,t="bytes"){return Ne(e,t)}function ty(e,t="hex"){return Ne(e,t)}function Fa(e){return Array.isArray(e)?Qu(e.map(t=>Fa(t))):e0(e)}function Qu(e){const t=e.reduce((s,o)=>s+o.length,0),n=_a(t);return{length:t<=55?1+t:1+n+t,encode(s){t<=55?s.pushByte(192+t):(s.pushByte(247+n),n===1?s.pushUint8(t):n===2?s.pushUint16(t):n===3?s.pushUint24(t):s.pushUint32(t));for(const{encode:o}of e)o(s)}}}function e0(e){const t=typeof e=="string"?ue(e):e,n=_a(t.length);return{length:t.length===1&&t[0]<128?1:t.length<=55?1+t.length:1+n+t.length,encode(s){t.length===1&&t[0]<128?s.pushBytes(t):t.length<=55?(s.pushByte(128+t.length),s.pushBytes(t)):(s.pushByte(183+n),n===1?s.pushUint8(t.length):n===2?s.pushUint16(t.length):n===3?s.pushUint24(t.length):s.pushUint32(t.length),s.pushBytes(t))}}}function _a(e){if(e<2**8)return 1;if(e<2**16)return 2;if(e<2**24)return 3;if(e<2**32)return 4;throw new I("Length is too large.")}const La={gwei:9,wei:18},Ua={ether:-9,wei:9},ny={ether:-18,gwei:-9};function ja(e,t){let n=e.toString();const r=n.startsWith("-");r&&(n=n.slice(1)),n=n.padStart(t,"0");let[s,o]=[n.slice(0,n.length-t),n.slice(n.length-t)];return o=o.replace(/(0+)$/,""),`${r?"-":""}${s||"0"}${o?`.${o}`:""}`}function Us(e,t="wei"){return ja(e,La[t])}function ce(e,t="wei"){return ja(e,Ua[t])}function mn(e){const t=Object.entries(e).map(([r,s])=>s===void 0||s===!1?null:[r,s]).filter(Boolean),n=t.reduce((r,[s])=>Math.max(r,s.length),0);return t.map(([r,s])=>` ${`${r}:`.padEnd(n+1)} ${s}`).join(`
2
2
  `)}class t0 extends I{constructor(){super(["Cannot specify both a `gasPrice` and a `maxFeePerGas`/`maxPriorityFeePerGas`.","Use `maxFeePerGas`/`maxPriorityFeePerGas` for EIP-1559 compatible networks, and `gasPrice` for others."].join(`
3
3
  `),{name:"FeeConflictError"})}}class qa extends I{constructor({v:t}){super(`Invalid \`v\` value "${t}". Expected 27 or 28.`,{name:"InvalidLegacyVError"})}}class n0 extends I{constructor({transaction:t}){super("Cannot infer a transaction type from provided transaction.",{metaMessages:["Provided Transaction:","{",mn(t),"}","","To infer the type, either provide:","- a `type` to the Transaction, or","- an EIP-1559 Transaction with `maxFeePerGas`, or","- an EIP-2930 Transaction with `gasPrice` & `accessList`, or","- an EIP-4844 Transaction with `blobs`, `blobVersionedHashes`, `sidecars`, or","- an EIP-7702 Transaction with `authorizationList`, or","- a Legacy Transaction with `gasPrice`"],name:"InvalidSerializableTransactionError"})}}class r0 extends I{constructor({serializedType:t}){super(`Serialized transaction type "${t}" is invalid.`,{name:"InvalidSerializedTransactionType"}),Object.defineProperty(this,"serializedType",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.serializedType=t}}class yn extends I{constructor({attributes:t,serializedTransaction:n,type:r}){const s=Object.entries(t).map(([o,a])=>typeof a>"u"?o:void 0).filter(Boolean);super(`Invalid serialized transaction of type "${r}" was provided.`,{metaMessages:[`Serialized Transaction: "${n}"`,s.length>0?`Missing Attributes: ${s.join(", ")}`:""].filter(Boolean),name:"InvalidSerializedTransactionError"}),Object.defineProperty(this,"serializedTransaction",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"type",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.serializedTransaction=n,this.type=r}}class s0 extends I{constructor({storageKey:t}){super(`Size for storage key "${t}" is invalid. Expected 32 bytes. Got ${Math.floor((t.length-2)/2)} bytes.`,{name:"InvalidStorageKeySizeError"})}}class o0 extends I{constructor(t,{account:n,docsPath:r,chain:s,data:o,gas:a,gasPrice:i,maxFeePerGas:c,maxPriorityFeePerGas:u,nonce:d,to:l,value:f}){const p=mn({chain:s&&`${s?.name} (id: ${s?.id})`,from:n?.address,to:l,value:typeof f<"u"&&`${Us(f)} ${s?.nativeCurrency?.symbol||"ETH"}`,data:o,gas:a,gasPrice:typeof i<"u"&&`${ce(i)} gwei`,maxFeePerGas:typeof c<"u"&&`${ce(c)} gwei`,maxPriorityFeePerGas:typeof u<"u"&&`${ce(u)} gwei`,nonce:d});super(t.shortMessage,{cause:t,docsPath:r,metaMessages:[...t.metaMessages?[...t.metaMessages," "]:[],"Request Arguments:",p].filter(Boolean),name:"TransactionExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=t}}class Da extends I{constructor({blockHash:t,blockNumber:n,blockTag:r,hash:s,index:o}){let a="Transaction";r&&o!==void 0&&(a=`Transaction at block time "${r}" at index "${o}"`),t&&o!==void 0&&(a=`Transaction at block hash "${t}" at index "${o}"`),n&&o!==void 0&&(a=`Transaction at block number "${n}" at index "${o}"`),s&&(a=`Transaction with hash "${s}"`),super(`${a} could not be found.`,{name:"TransactionNotFoundError"})}}class Ga extends I{constructor({hash:t}){super(`Transaction receipt with hash "${t}" could not be found. The Transaction may not be processed on a block yet.`,{name:"TransactionReceiptNotFoundError"})}}class Ha extends I{constructor({receipt:t}){super(`Transaction with hash "${t.transactionHash}" reverted.`,{metaMessages:['The receipt marked the transaction as "reverted". This could mean that the function on the contract you are trying to call threw an error.'," ","You can attempt to extract the revert reason by:","- calling the `simulateContract` or `simulateCalls` Action with the `abi` and `functionName` of the contract","- using the `call` Action with raw `data`"],name:"TransactionReceiptRevertedError"}),Object.defineProperty(this,"receipt",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.receipt=t}}class a0 extends I{constructor({hash:t}){super(`Timed out while waiting for transaction with hash "${t}" to be confirmed.`,{name:"WaitForTransactionReceiptTimeoutError"})}}function i0(e){if(!e||e.length===0)return[];const t=[];for(const n of e){const{chainId:r,nonce:s,...o}=n,a=n.address;t.push([r?Ie(r):"0x",a,s?Ie(s):"0x",...gn({},o)])}return t}function js(e){const{kzg:t}=e,n=e.to??(typeof e.blobs[0]=="string"?"hex":"bytes"),r=typeof e.blobs[0]=="string"?e.blobs.map(o=>ue(o)):e.blobs,s=[];for(const o of r)s.push(Uint8Array.from(t.blobToKzgCommitment(o)));return n==="bytes"?s:s.map(o=>V(o))}function qs(e){const{kzg:t}=e,n=e.to??(typeof e.blobs[0]=="string"?"hex":"bytes"),r=typeof e.blobs[0]=="string"?e.blobs.map(a=>ue(a)):e.blobs,s=typeof e.commitments[0]=="string"?e.commitments.map(a=>ue(a)):e.commitments,o=[];for(let a=0;a<r.length;a++){const i=r[a],c=s[a];o.push(Uint8Array.from(t.computeBlobKzgProof(i,c)))}return n==="bytes"?o:o.map(a=>V(a))}function Va(e){const{commitment:t,version:n=1}=e,r=e.to??(typeof t=="string"?"hex":"bytes"),s=Gu(t,"bytes");return s.set([n],0),r==="bytes"?s:V(s)}function Wa(e){const{commitments:t,version:n}=e,r=e.to??(typeof t[0]=="string"?"hex":"bytes"),s=[];for(const o of t)s.push(Va({commitment:o,to:r,version:n}));return s}const Uo=6,Za=32,Ds=4096,Ya=Za*Ds,jo=Ya*Uo-1-1*Ds*Uo,Ka=1;class c0 extends I{constructor({maxSize:t,size:n}){super("Blob size is too large.",{metaMessages:[`Max: ${t} bytes`,`Given: ${n} bytes`],name:"BlobSizeTooLargeError"})}}class Ja extends I{constructor(){super("Blob data must not be empty.",{name:"EmptyBlobError"})}}class u0 extends I{constructor({hash:t,size:n}){super(`Versioned hash "${t}" size is invalid.`,{metaMessages:["Expected: 32",`Received: ${n}`],name:"InvalidVersionedHashSizeError"})}}class d0 extends I{constructor({hash:t,version:n}){super(`Versioned hash "${t}" version is invalid.`,{metaMessages:[`Expected: ${Ka}`,`Received: ${n}`],name:"InvalidVersionedHashVersionError"})}}function f0(e){const t=e.to??(typeof e.data=="string"?"hex":"bytes"),n=typeof e.data=="string"?ue(e.data):e.data,r=Z(n);if(!r)throw new Ja;if(r>jo)throw new c0({maxSize:jo,size:r});const s=[];let o=!0,a=0;for(;o;){const i=$t(new Uint8Array(Ya));let c=0;for(;c<Ds;){const u=n.slice(a,a+(Za-1));if(i.pushByte(0),i.pushBytes(u),u.length<31){i.pushByte(128),o=!1;break}c++,a+=31}s.push(i)}return t==="bytes"?s.map(i=>i.bytes):s.map(i=>V(i.bytes))}function Gs(e){const{data:t,kzg:n,to:r}=e,s=e.blobs??f0({data:t,to:r}),o=e.commitments??js({blobs:s,kzg:n,to:r}),a=e.proofs??qs({blobs:s,commitments:o,kzg:n,to:r}),i=[];for(let c=0;c<s.length;c++)i.push({blob:s[c],commitment:o[c],proof:a[c]});return i}class ns extends I{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"})}}class l0 extends I{constructor({chain:t,currentChainId:n}){super(`The current chain of the wallet (id: ${n}) does not match the target chain for the transaction (id: ${t.id} – ${t.name}).`,{metaMessages:[`Current Chain ID: ${n}`,`Expected Chain ID: ${t.id} – ${t.name}`],name:"ChainMismatchError"})}}class p0 extends I{constructor(){super(["No chain was provided to the request.","Please provide a chain with the `chain` argument on the Action, or by supplying a `chain` to WalletClient."].join(`
4
4
  `),{name:"ChainNotFoundError"})}}class Xa extends I{constructor(){super("No chain was provided to the Client.",{name:"ClientChainNotConfiguredError"})}}class rr extends I{constructor({chainId:t}){super(typeof t=="number"?`Chain ID "${t}" is invalid.`:"Chain ID is invalid.",{name:"InvalidChainIdError"})}}class Je extends I{constructor({cause:t,message:n}={}){const 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(Je,"code",{enumerable:!0,configurable:!0,writable:!0,value:3});Object.defineProperty(Je,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/execution reverted/});class st extends I{constructor({cause:t,maxFeePerGas:n}={}){super(`The fee cap (\`maxFeePerGas\`${n?` = ${ce(n)} gwei`:""}) cannot be higher than the maximum allowed value (2^256-1).`,{cause:t,name:"FeeCapTooHighError"})}}Object.defineProperty(st,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas higher than 2\^256-1|fee cap higher than 2\^256-1/});class rs extends I{constructor({cause:t,maxFeePerGas:n}={}){super(`The fee cap (\`maxFeePerGas\`${n?` = ${ce(n)}`:""} gwei) cannot be lower than the block base fee.`,{cause:t,name:"FeeCapTooLowError"})}}Object.defineProperty(rs,"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/});class ss extends I{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(ss,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too high/});class os extends I{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(`