@dcl/blog-site 0.2.2-23649734878.commit-de1a383 → 0.2.2

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 (147) hide show
  1. package/assets/{add-zf09jsz8.js → add-Dnkf3E3Q.js} +1 -1
  2. package/assets/{all-wallets-tVLLlnWi.js → all-wallets-C5N9p7Oh.js} +1 -1
  3. package/assets/{app-store-C64E-ygN.js → app-store-C9FH4_zP.js} +1 -1
  4. package/assets/{apple-B11br0RG.js → apple-Dm5w1W69.js} +1 -1
  5. package/assets/{arrow-bottom-DifqQKT2.js → arrow-bottom-CXaxVEeb.js} +1 -1
  6. package/assets/{arrow-bottom-circle-BYISwBN-.js → arrow-bottom-circle-Bgw9yiHN.js} +1 -1
  7. package/assets/{arrow-left-DTR_KHWL.js → arrow-left-pgI3hg3C.js} +1 -1
  8. package/assets/{arrow-right-DU6_D0VV.js → arrow-right-CyKp2yFa.js} +1 -1
  9. package/assets/{arrow-top-B_CgJVlG.js → arrow-top-B2waxVPx.js} +1 -1
  10. package/assets/{auto-track-BxXPoe4g.js → auto-track-BvFI9h3i.js} +1 -1
  11. package/assets/{bank-q4oLVSZ1.js → bank-qNUWniDB.js} +1 -1
  12. package/assets/{basic-CGdBHVeA.js → basic-DJvhbg9L.js} +1 -1
  13. package/assets/{biconomy-6NHz5Iqa.js → biconomy-DZsFbmF0.js} +1 -1
  14. package/assets/{browser-BH_NdFte.js → browser-Du0KKb8R.js} +1 -1
  15. package/assets/{card-CU8Sx8aZ.js → card-BpDAuOwe.js} +1 -1
  16. package/assets/{ccip-BfmMG-TS.js → ccip-CpLmER95.js} +1 -1
  17. package/assets/{checkmark-bold-yZPChLqH.js → checkmark-bold-BYtPga6u.js} +1 -1
  18. package/assets/{checkmark-CJQv14xB.js → checkmark-srdyV91l.js} +1 -1
  19. package/assets/{chevron-bottom-DTs-26Eq.js → chevron-bottom-C2aa3E9i.js} +1 -1
  20. package/assets/{chevron-left-CWQcI0TP.js → chevron-left-jGoftk_A.js} +1 -1
  21. package/assets/{chevron-right-zjZwGM3P.js → chevron-right-Dt6SfcNy.js} +1 -1
  22. package/assets/{chevron-top-DiPqYm2O.js → chevron-top-CBCgyIVe.js} +1 -1
  23. package/assets/{chrome-store-uudWD7dl.js → chrome-store-D-UYtj15.js} +1 -1
  24. package/assets/{clock-BtHKgq8x.js → clock-BGyfn2Ix.js} +1 -1
  25. package/assets/{close-C0UXp_W-.js → close-BQpWkcd5.js} +1 -1
  26. package/assets/{coinPlaceholder-4wrqCYAs.js → coinPlaceholder-o1yCmFLN.js} +1 -1
  27. package/assets/{compass-DfOzkjuQ.js → compass-BrX88OdU.js} +1 -1
  28. package/assets/{controller-zOLBxAda.js → controller-BW9fJMCh.js} +2 -2
  29. package/assets/{copy-BDn55LjS.js → copy-CGKLgPMf.js} +1 -1
  30. package/assets/{core-FalccOZQ.js → core-f4taWsy5.js} +4 -4
  31. package/assets/{createBundlerClient-ceEjCqsz.js → createBundlerClient-r1Kofl9Y.js} +1 -1
  32. package/assets/cursor-l_ly71I2.js +3 -0
  33. package/assets/{cursor-transparent-B0-Mw3Y1.js → cursor-transparent--gaS-5ET.js} +1 -1
  34. package/assets/{decimals-BBBuCBiH.js → decimals-BB5yEnWu.js} +1 -1
  35. package/assets/{decimals-DrdfxUxV.js → decimals-D7yTLBH-.js} +1 -1
  36. package/assets/{desktop-Cm0fPOoG.js → desktop-D3dzP-FX.js} +1 -1
  37. package/assets/{detectExtension-CTJS_83C.js → detectExtension-BOyq5ueD.js} +1 -1
  38. package/assets/{disconnect-BuA91iia.js → disconnect-CsHX0nla.js} +1 -1
  39. package/assets/{discord-CEAkeZ_H.js → discord-TnXCJHRv.js} +1 -1
  40. package/assets/{engine-1bZj5J3h.js → engine-COatTZhI.js} +1 -1
  41. package/assets/{estimate-l1-fee-C9trXYSy.js → estimate-l1-fee-gm3XrWSf.js} +1 -1
  42. package/assets/eth_estimateGas-A6ba-Fl3.js +1 -0
  43. package/assets/{eth_getStorageAt-D6adTFW0.js → eth_getStorageAt-DiqyV3Wq.js} +1 -1
  44. package/assets/{eth_getTransactionCount-BIhOSWd4.js → eth_getTransactionCount-CF50onAO.js} +1 -1
  45. package/assets/{etherscan-WCjozDmo.js → etherscan-BNOTAlpJ.js} +1 -1
  46. package/assets/{events-BSf9wyey.js → events-CjOrSHaz.js} +1 -1
  47. package/assets/{exclamation-triangle-CXoNKPez.js → exclamation-triangle-3cTnBFEz.js} +1 -1
  48. package/assets/{extension-BszEBTVU.js → extension-C7i3kBcJ.js} +1 -1
  49. package/assets/{external-link-Dd_ZWmsS.js → external-link-C6RRSRES.js} +1 -1
  50. package/assets/{extractIPFS-GqdL13gj.js → extractIPFS-BchHnCEN.js} +1 -1
  51. package/assets/{facebook-4SsNdpO8.js → facebook-BtRXxuTh.js} +1 -1
  52. package/assets/{farcaster-ayvvFuu8.js → farcaster-DuvCkOsj.js} +1 -1
  53. package/assets/{fetchTokenMetadata-BVwYMovl.js → fetchTokenMetadata-ClRC5ORW.js} +2 -2
  54. package/assets/{filters-CaJPoSbo.js → filters-q4uY0GXA.js} +1 -1
  55. package/assets/{get-ecosystem-wallet-info-Q0K86GGt.js → get-ecosystem-wallet-info-C2CJ_2OU.js} +1 -1
  56. package/assets/{getBalance-B57AUVbe.js → getBalance-DGuxWuYL.js} +1 -1
  57. package/assets/{getInstalledModules-CAje9rp8.js → getInstalledModules-A3tAP18V.js} +1 -1
  58. package/assets/{getNFT-CpvjLK0Y.js → getNFT-C7cllYFm.js} +1 -1
  59. package/assets/{getNFT-Bb-t59ds.js → getNFT-CQKD7QHk.js} +2 -2
  60. package/assets/{github-Agge6OPm.js → github-DdvkoPeB.js} +1 -1
  61. package/assets/{google-BCp2rRpD.js → google-d4Ql9qix.js} +1 -1
  62. package/assets/{hashTypedData-621x-e3F.js → hashTypedData-7WNMs5EV.js} +1 -1
  63. package/assets/{help-circle-BglhVJJg.js → help-circle-BY_Weu8t.js} +1 -1
  64. package/assets/{id-DJWOh1yx.js → id-BJNb6vOI.js} +1 -1
  65. package/assets/{image-XVP-TFUR.js → image-DIsXNsXJ.js} +1 -1
  66. package/assets/{in-app-wallet-calls-C4soc9zT.js → in-app-wallet-calls-CIRR0eJZ.js} +1 -1
  67. package/assets/{index-DoKNVID8.js → index-BNdVKnva.js} +2 -2
  68. package/assets/{index-Dw1-bBaI.js → index-BtvcwkC4.js} +1 -1
  69. package/assets/{index-D4HP5DQC.js → index-C3CMrfih.js} +1 -1
  70. package/assets/{index-CecZD-vJ.js → index-C8ynIJrk.js} +3 -3
  71. package/assets/{index-DSxj-vNU.js → index-Ca6sys5l.js} +1 -1
  72. package/assets/index-CvqvWWYJ.js +2 -0
  73. package/assets/{index-CmTH1mn1.js → index-CxA55UWl.js} +1 -1
  74. package/assets/{index-VloZUDIL.js → index-D-W42D03.js} +8 -8
  75. package/assets/{index-Mb-EqEoD.js → index-DC9TKWAz.js} +1 -1
  76. package/assets/{index-LCDpDH8Q.js → index-DFfsl0Io.js} +1 -1
  77. package/assets/{index-DlDkzdhK.js → index-DN2JqH-l.js} +6 -6
  78. package/assets/{index-CUn0wuu2.js → index-DfqIHbWG.js} +2 -2
  79. package/assets/{index-X1qL-0B0.js → index-pQ6ZXw4u.js} +1 -1
  80. package/assets/{index-BAkdueH0.js → index-qMD90g0X.js} +1 -1
  81. package/assets/{index.es-DqGsvA8g.js → index.es-B2O4h03u.js} +4 -4
  82. package/assets/{index.es-vOkXvnBD.js → index.es-BEAksKXY.js} +1 -1
  83. package/assets/{index.es-ClZCnaxS.js → index.es-Dxxm_SKC.js} +1 -1
  84. package/assets/{index.es-B3ObrDkW.js → index.es-MXG0VeeZ.js} +1 -1
  85. package/assets/{index.umd-CrjosV4X.js → index.umd-DvfMpbcY.js} +1 -1
  86. package/assets/{info-Ce-k8YeY.js → info-BvPgRaaJ.js} +1 -1
  87. package/assets/{info-circle-DWKsUP7S.js → info-circle-sWcom9RD.js} +1 -1
  88. package/assets/{lightbulb-WJ_BxNVb.js → lightbulb-HJchniSu.js} +1 -1
  89. package/assets/{localBatchGatewayRequest-DbABcKyV.js → localBatchGatewayRequest-CHeIulW5.js} +1 -1
  90. package/assets/{mail-KoHfgvFC.js → mail-DlRijJmV.js} +1 -1
  91. package/assets/{mobile-DgiOcfZl.js → mobile-CoiDw6cg.js} +1 -1
  92. package/assets/{more-DQ2sX7uC.js → more-LUiRL6x4.js} +1 -1
  93. package/assets/{network-placeholder-J46GlKpA.js → network-placeholder-Cj3jgVfo.js} +1 -1
  94. package/assets/{nftPlaceholder-DJzkRgNi.js → nftPlaceholder-LkhQmGFs.js} +1 -1
  95. package/assets/{off-Bx4KjNoN.js → off-BCDn43Xl.js} +1 -1
  96. package/assets/{openzeppelin-CDBEZ0A6.js → openzeppelin-_xpy9vRo.js} +1 -1
  97. package/assets/{ownerOf-H_15UHmZ.js → ownerOf-ClSM4brX.js} +1 -1
  98. package/assets/{parseNft-C-gFG5mL.js → parseNft-BmEusGKu.js} +2 -2
  99. package/assets/{play-store-DnrAN_Zk.js → play-store-DBit2AoS.js} +1 -1
  100. package/assets/{plus-CG21jVu3.js → plus-CZe-WgSN.js} +1 -1
  101. package/assets/{qr-code-DCN5HoIC.js → qr-code-BhW7ZXY-.js} +1 -1
  102. package/assets/{qr-overlay-DZM2US31.js → qr-overlay-DsRPQv6v.js} +1 -1
  103. package/assets/{recycle-horizontal-pV5cKVIC.js → recycle-horizontal-DBnWoDRV.js} +1 -1
  104. package/assets/{refresh-DDAlbnMR.js → refresh-qvocxvcf.js} +1 -1
  105. package/assets/{reown-logo-BgBTRPqh.js → reown-logo-C-45v-AJ.js} +1 -1
  106. package/assets/{resolveImplementation--0Bj03XB.js → resolveImplementation-BssH7H5b.js} +1 -1
  107. package/assets/{rpc-BMTq3WxT.js → rpc-DMtarHL0.js} +1 -1
  108. package/assets/{search-F5Kt2PDD.js → search-CAzZVrZw.js} +1 -1
  109. package/assets/{secp256k1-HF3nQqZj.js → secp256k1-C_4ya0Qz.js} +1 -1
  110. package/assets/{secp256k1-DTovG4r4.js → secp256k1-CnKxz2gu.js} +1 -1
  111. package/assets/{secp256k1-D0j47cev.js → secp256k1-oGq0B4P7.js} +1 -1
  112. package/assets/{send-1sOEDYYV.js → send-DI2x4DfJ.js} +1 -1
  113. package/assets/{send-batch-transaction-DexqN5g2.js → send-batch-transaction-DfUNUZ4Z.js} +1 -1
  114. package/assets/{send-eip712-transaction-CzOG_yjy.js → send-eip712-transaction-Ro5QmOlW.js} +2 -2
  115. package/assets/{send-gasless-transaction-BerY-rcr.js → send-gasless-transaction-B-Uu5KdW.js} +2 -2
  116. package/assets/{session-proposal-BxP6Eg-Q.js → session-proposal-CRjqbz7W.js} +1 -1
  117. package/assets/{session-request-BmUVvzLs.js → session-request-BI3BlMfs.js} +2 -2
  118. package/assets/{sha256-CBZo01eO.js → sha256-ChRob2fv.js} +1 -1
  119. package/assets/{signing-CQ15XHyj.js → signing-B1K_Jdsm.js} +4 -4
  120. package/assets/{swapHorizontal-DwtkaBY9.js → swapHorizontal-eTjjU7d8.js} +1 -1
  121. package/assets/{swapHorizontalBold-DjH3VBED.js → swapHorizontalBold-B86nJTAP.js} +1 -1
  122. package/assets/{swapHorizontalMedium-B8m-zSxH.js → swapHorizontalMedium-CNT7ELrN.js} +1 -1
  123. package/assets/{swapHorizontalRoundedBold-CcKr4oU5.js → swapHorizontalRoundedBold-R_inXmIh.js} +1 -1
  124. package/assets/{swapVertical-Vhgw_9G1.js → swapVertical-DBChOUj8.js} +1 -1
  125. package/assets/{telegram-CItwttXQ.js → telegram-DjYbgHgS.js} +1 -1
  126. package/assets/{thirdweb-BEvIP-fy.js → thirdweb-0Fl_ECmE.js} +3 -3
  127. package/assets/{three-dots-DcElkEG2.js → three-dots-VoULPGrI.js} +1 -1
  128. package/assets/{totalSupply-DYVdetcS.js → totalSupply-ClM38QOc.js} +1 -1
  129. package/assets/{twitch-DIYf-ntg.js → twitch-ETBgqGHE.js} +1 -1
  130. package/assets/{twitterIcon-xMs4TJuA.js → twitterIcon-N584dzfh.js} +1 -1
  131. package/assets/{verify-CJQEOvVE.js → verify-Dp4bztGk.js} +1 -1
  132. package/assets/{verify-filled-Dm46z2W0.js → verify-filled-B7WhO3Kn.js} +1 -1
  133. package/assets/{w3m-modal-ime9_H71.js → w3m-modal-BmEHfmEu.js} +1 -1
  134. package/assets/{wait-for-tx-receipt-BWZbdlKf.js → wait-for-tx-receipt-pc2BJc62.js} +1 -1
  135. package/assets/{wallet-placeholder-lVvJajkJ.js → wallet-placeholder-B2e9Wl_u.js} +1 -1
  136. package/assets/{wallet-DsKK0DZZ.js → wallet-tXSvlbUa.js} +1 -1
  137. package/assets/{walletconnect-BzBoiyAH.js → walletconnect-D70wSjLs.js} +1 -1
  138. package/assets/{wallets-CCAGQYIy.js → wallets-Dj6CY1yi.js} +6 -6
  139. package/assets/{warning-circle-DPKmaE0h.js → warning-circle-CsTkZ4Rl.js} +1 -1
  140. package/assets/{web-connector-BiJHWbvm.js → web-connector-CiZO9RvI.js} +3 -3
  141. package/assets/{x-DEpEErGT.js → x-DwOCQuex.js} +1 -1
  142. package/index.html +3 -3
  143. package/package.json +2 -2
  144. package/assets/cursor-BQJeaiqW.js +0 -3
  145. package/assets/eth_estimateGas-DylIsdQK.js +0 -1
  146. package/assets/index-DX_PNZlK.js +0 -2
  147. package/dcl-blog-site-0.2.2-23649734878.commit-de1a383.tgz +0 -0
@@ -1,4 +1,4 @@
1
- import{w as h}from"./core-FalccOZQ.js";import"./index-DlDkzdhK.js";import"./events-BSf9wyey.js";import"./index.es-B3ObrDkW.js";import"./index-nibyPLVP.js";import"./index.es-vOkXvnBD.js";const o=h`<svg style="border-radius: 9999px; overflow: hidden;" fill="none" viewBox="0 0 1000 1000">
1
+ import{w as h}from"./core-f4taWsy5.js";import"./index-DN2JqH-l.js";import"./events-CjOrSHaz.js";import"./index.es-MXG0VeeZ.js";import"./index-nibyPLVP.js";import"./index.es-BEAksKXY.js";const o=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,2 +1,2 @@
1
- const __vite__fileDeps=["assets/signing-CQ15XHyj.js","assets/utils-B3vUvlNq.js","assets/index-DlDkzdhK.js"],__vite__mapDeps=i=>i.map(i=>__vite__fileDeps[i]);
2
- import{g as c}from"./index-DlDkzdhK.js";import{b as s}from"./uint8-array-CjVHUazS.js";import{p as d}from"./signing-CQ15XHyj.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("./signing-CQ15XHyj.js").then(i=>i.cX);return{download:t}},__vite__mapDeps([0,1,2]));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/signing-B1K_Jdsm.js","assets/utils-B3vUvlNq.js","assets/index-DN2JqH-l.js"],__vite__mapDeps=i=>i.map(i=>__vite__fileDeps[i]);
2
+ import{g as c}from"./index-DN2JqH-l.js";import{b as s}from"./uint8-array-CjVHUazS.js";import{p as d}from"./signing-B1K_Jdsm.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("./signing-B1K_Jdsm.js").then(i=>i.cX);return{download:t}},__vite__mapDeps([0,1,2]));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 o}from"./core-FalccOZQ.js";import"./index-DlDkzdhK.js";import"./events-BSf9wyey.js";import"./index.es-B3ObrDkW.js";import"./index-nibyPLVP.js";import"./index.es-vOkXvnBD.js";const m=o`<svg fill="none" viewBox="0 0 16 16">
1
+ import{w as o}from"./core-f4taWsy5.js";import"./index-DN2JqH-l.js";import"./events-CjOrSHaz.js";import"./index.es-MXG0VeeZ.js";import"./index-nibyPLVP.js";import"./index.es-BEAksKXY.js";const m=o`<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 o}from"./wallets-CCAGQYIy.js";import"./signing-CQ15XHyj.js";import"./utils-B3vUvlNq.js";import"./index-DlDkzdhK.js";import"./hashTypedData-621x-e3F.js";import"./events-BSf9wyey.js";import"./index.es-B3ObrDkW.js";import"./index-nibyPLVP.js";import"./ethereum-Bb-GI0c-.js";async function d(n){const l=await o(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{d as getEcosystemWalletInfo};
1
+ import{g as o}from"./wallets-Dj6CY1yi.js";import"./signing-B1K_Jdsm.js";import"./utils-B3vUvlNq.js";import"./index-DN2JqH-l.js";import"./hashTypedData-7WNMs5EV.js";import"./events-CjOrSHaz.js";import"./index.es-MXG0VeeZ.js";import"./index-nibyPLVP.js";import"./ethereum-Bb-GI0c-.js";async function d(n){const l=await o(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{d as getEcosystemWalletInfo};
@@ -1 +1 @@
1
- import{am as X,cT as we,J as Te}from"./signing-CQ15XHyj.js";import{g as Ce}from"./index-DlDkzdhK.js";import{w as ge}from"./utils-B3vUvlNq.js";import{d as Ne}from"./decimals-BBBuCBiH.js";const Oe="0x70a08231",Se=[{name:"_address",type:"address"}],Ae=[{type:"uint256"}];async function Ze(r){return X({contract:r.contract,method:[Oe,Se,Ae],params:[r.address]})}var g;(function(r){r.assertEqual=a=>{};function e(a){}r.assertIs=e;function t(a){throw new Error}r.assertNever=t,r.arrayToEnum=a=>{const n={};for(const i of a)n[i]=i;return n},r.getValidEnumValues=a=>{const n=r.objectKeys(a).filter(d=>typeof a[a[d]]!="number"),i={};for(const d of n)i[d]=a[d];return r.objectValues(i)},r.objectValues=a=>r.objectKeys(a).map(function(n){return a[n]}),r.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},r.find=(a,n)=>{for(const i of a)if(n(i))return i},r.isInteger=typeof Number.isInteger=="function"?a=>Number.isInteger(a):a=>typeof a=="number"&&Number.isFinite(a)&&Math.floor(a)===a;function s(a,n=" | "){return a.map(i=>typeof i=="string"?`'${i}'`:i).join(n)}r.joinValues=s,r.jsonStringifyReplacer=(a,n)=>typeof n=="bigint"?n.toString():n})(g||(g={}));var ee;(function(r){r.mergeShapes=(e,t)=>({...e,...t})})(ee||(ee={}));const u=g.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),C=r=>{switch(typeof r){case"undefined":return u.undefined;case"string":return u.string;case"number":return Number.isNaN(r)?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(r)?u.array:r===null?u.null:r.then&&typeof r.then=="function"&&r.catch&&typeof r.catch=="function"?u.promise:typeof Map<"u"&&r instanceof Map?u.map:typeof Set<"u"&&r instanceof Set?u.set:typeof Date<"u"&&r instanceof Date?u.date:u.object;default:return u.unknown}},c=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 T extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=s=>{this.issues=[...this.issues,s]},this.addIssues=(s=[])=>{this.issues=[...this.issues,...s]};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},s={_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)s._errors.push(t(i));else{let d=s,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),s}static assert(e){if(!(e instanceof T))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={},s=[];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 s.push(e(a));return{formErrors:s,fieldErrors:t}}get formErrors(){return this.flatten()}}T.create=r=>new T(r);const J=(r,e)=>{let t;switch(r.code){case c.invalid_type:r.received===u.undefined?t="Required":t=`Expected ${r.expected}, received ${r.received}`;break;case c.invalid_literal:t=`Invalid literal value, expected ${JSON.stringify(r.expected,g.jsonStringifyReplacer)}`;break;case c.unrecognized_keys:t=`Unrecognized key(s) in object: ${g.joinValues(r.keys,", ")}`;break;case c.invalid_union:t="Invalid input";break;case c.invalid_union_discriminator:t=`Invalid discriminator value. Expected ${g.joinValues(r.options)}`;break;case c.invalid_enum_value:t=`Invalid enum value. Expected ${g.joinValues(r.options)}, received '${r.received}'`;break;case c.invalid_arguments:t="Invalid function arguments";break;case c.invalid_return_type:t="Invalid function return type";break;case c.invalid_date:t="Invalid date";break;case c.invalid_string:typeof r.validation=="object"?"includes"in r.validation?(t=`Invalid input: must include "${r.validation.includes}"`,typeof r.validation.position=="number"&&(t=`${t} at one or more positions greater than or equal to ${r.validation.position}`)):"startsWith"in r.validation?t=`Invalid input: must start with "${r.validation.startsWith}"`:"endsWith"in r.validation?t=`Invalid input: must end with "${r.validation.endsWith}"`:g.assertNever(r.validation):r.validation!=="regex"?t=`Invalid ${r.validation}`:t="Invalid";break;case c.too_small:r.type==="array"?t=`Array must contain ${r.exact?"exactly":r.inclusive?"at least":"more than"} ${r.minimum} element(s)`:r.type==="string"?t=`String must contain ${r.exact?"exactly":r.inclusive?"at least":"over"} ${r.minimum} character(s)`:r.type==="number"?t=`Number must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${r.minimum}`:r.type==="bigint"?t=`Number must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${r.minimum}`:r.type==="date"?t=`Date must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(r.minimum))}`:t="Invalid input";break;case c.too_big:r.type==="array"?t=`Array must contain ${r.exact?"exactly":r.inclusive?"at most":"less than"} ${r.maximum} element(s)`:r.type==="string"?t=`String must contain ${r.exact?"exactly":r.inclusive?"at most":"under"} ${r.maximum} character(s)`:r.type==="number"?t=`Number must be ${r.exact?"exactly":r.inclusive?"less than or equal to":"less than"} ${r.maximum}`:r.type==="bigint"?t=`BigInt must be ${r.exact?"exactly":r.inclusive?"less than or equal to":"less than"} ${r.maximum}`:r.type==="date"?t=`Date must be ${r.exact?"exactly":r.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(r.maximum))}`:t="Invalid input";break;case c.custom:t="Invalid input";break;case c.invalid_intersection_types:t="Intersection results could not be merged";break;case c.not_multiple_of:t=`Number must be a multiple of ${r.multipleOf}`;break;case c.not_finite:t="Number must be finite";break;default:t=e.defaultError,g.assertNever(r)}return{message:t}};let Re=J;function Ie(){return Re}const Ee=r=>{const{data:e,path:t,errorMaps:s,issueData:a}=r,n=[...t,...a.path||[]],i={...a,path:n};if(a.message!==void 0)return{...a,path:n,message:a.message};let d="";const h=s.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 o(r,e){const t=Ie(),s=Ee({issueData:e,data:r.data,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,t,t===J?void 0:J].filter(a=>!!a)});r.common.issues.push(s)}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 s=[];for(const a of t){if(a.status==="aborted")return m;a.status==="dirty"&&e.dirty(),s.push(a.value)}return{status:e.value,value:s}}static async mergeObjectAsync(e,t){const s=[];for(const a of t){const n=await a.key,i=await a.value;s.push({key:n,value:i})}return k.mergeObjectSync(e,s)}static mergeObjectSync(e,t){const s={};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)&&(s[n.value]=i.value)}return{status:e.value,value:s}}}const m=Object.freeze({status:"aborted"}),M=r=>({status:"dirty",value:r}),b=r=>({status:"valid",value:r}),te=r=>r.status==="aborted",re=r=>r.status==="dirty",I=r=>r.status==="valid",D=r=>typeof Promise<"u"&&r instanceof Promise;var l;(function(r){r.errToObj=e=>typeof e=="string"?{message:e}:e||{},r.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(l||(l={}));class S{constructor(e,t,s,a){this._cachedPath=[],this.parent=e,this.data=t,this._path=s,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 se=(r,e)=>{if(I(e))return{success:!0,data:e.value};if(!r.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 T(r.common.issues);return this._error=t,this._error}}};function _(r){if(!r)return{};const{errorMap:e,invalid_type_error:t,required_error:s,description:a}=r;if(e&&(t||s))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}=r;return i.code==="invalid_enum_value"?{message:h??d.defaultError}:typeof d.data>"u"?{message:h??s??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 C(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:C(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:C(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 s=this.safeParse(e,t);if(s.success)return s.data;throw s.error}safeParse(e,t){const s={common:{issues:[],async:(t==null?void 0:t.async)??!1,contextualErrorMap:t==null?void 0:t.errorMap},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:C(e)},a=this._parseSync({data:e,path:s.path,parent:s});return se(s,a)}"~validate"(e){var s,a;const t={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:C(e)};if(!this["~standard"].async)try{const n=this._parseSync({data:e,path:[],parent:t});return I(n)?{value:n.value}:{issues:t.common.issues}}catch(n){(a=(s=n==null?void 0:n.message)==null?void 0:s.toLowerCase())!=null&&a.includes("encountered")&&(this["~standard"].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(n=>I(n)?{value:n.value}:{issues:t.common.issues})}async parseAsync(e,t){const s=await this.safeParseAsync(e,t);if(s.success)return s.data;throw s.error}async safeParseAsync(e,t){const s={common:{issues:[],contextualErrorMap:t==null?void 0:t.errorMap,async:!0},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:C(e)},a=this._parse({data:e,path:s.path,parent:s}),n=await(D(a)?a:Promise.resolve(a));return se(s,n)}refine(e,t){const s=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:c.custom,...s(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((s,a)=>e(s)?!0:(a.addIssue(typeof t=="function"?t(s,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 V.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 H({..._(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 K.create(this,e)}readonly(){return Q.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const je=/^c[^\s-]{8,}$/i,$e=/^[0-9a-z]+$/,Ve=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Pe=/^[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,Me=/^[a-z0-9_-]{21}$/i,Le=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,ze=/^[-+]?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)?)??$/,De=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Ue="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let q;const Fe=/^(?:(?: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])$/,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])\/(3[0-2]|[12]?[0-9])$/,We=/^(([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]))$/,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]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Je=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Ye=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,ve="((\\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])))",He=new RegExp(`^${ve}$`);function xe(r){let e="[0-5]\\d";r.precision?e=`${e}\\.\\d{${r.precision}}`:r.precision==null&&(e=`${e}(\\.\\d+)?`);const t=r.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${t}`}function Ge(r){return new RegExp(`^${xe(r)}$`)}function Qe(r){let e=`${ve}T${xe(r)}`;const t=[];return t.push(r.local?"Z?":"Z"),r.offset&&t.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${t.join("|")})`,new RegExp(`^${e}$`)}function Xe(r,e){return!!((e==="v4"||!e)&&Fe.test(r)||(e==="v6"||!e)&&We.test(r))}function Ke(r,e){if(!Le.test(r))return!1;try{const[t]=r.split(".");if(!t)return!1;const s=t.replace(/-/g,"+").replace(/_/g,"/").padEnd(t.length+(4-t.length%4)%4,"="),a=JSON.parse(atob(s));return!(typeof a!="object"||a===null||"typ"in a&&(a==null?void 0:a.typ)!=="JWT"||!a.alg||e&&a.alg!==e)}catch{return!1}}function et(r,e){return!!((e==="v4"||!e)&&Be.test(r)||(e==="v6"||!e)&&qe.test(r))}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 o(n,{code:c.invalid_type,expected:u.string,received:n.parsedType}),m}const s=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),o(a,{code:c.too_small,minimum:n.value,type:"string",inclusive:!0,exact:!1,message:n.message}),s.dirty());else if(n.kind==="max")e.data.length>n.value&&(a=this._getOrReturnCtx(e,a),o(a,{code:c.too_big,maximum:n.value,type:"string",inclusive:!0,exact:!1,message:n.message}),s.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?o(a,{code:c.too_big,maximum:n.value,type:"string",inclusive:!0,exact:!0,message:n.message}):d&&o(a,{code:c.too_small,minimum:n.value,type:"string",inclusive:!0,exact:!0,message:n.message}),s.dirty())}else if(n.kind==="email")De.test(e.data)||(a=this._getOrReturnCtx(e,a),o(a,{validation:"email",code:c.invalid_string,message:n.message}),s.dirty());else if(n.kind==="emoji")q||(q=new RegExp(Ue,"u")),q.test(e.data)||(a=this._getOrReturnCtx(e,a),o(a,{validation:"emoji",code:c.invalid_string,message:n.message}),s.dirty());else if(n.kind==="uuid")Pe.test(e.data)||(a=this._getOrReturnCtx(e,a),o(a,{validation:"uuid",code:c.invalid_string,message:n.message}),s.dirty());else if(n.kind==="nanoid")Me.test(e.data)||(a=this._getOrReturnCtx(e,a),o(a,{validation:"nanoid",code:c.invalid_string,message:n.message}),s.dirty());else if(n.kind==="cuid")je.test(e.data)||(a=this._getOrReturnCtx(e,a),o(a,{validation:"cuid",code:c.invalid_string,message:n.message}),s.dirty());else if(n.kind==="cuid2")$e.test(e.data)||(a=this._getOrReturnCtx(e,a),o(a,{validation:"cuid2",code:c.invalid_string,message:n.message}),s.dirty());else if(n.kind==="ulid")Ve.test(e.data)||(a=this._getOrReturnCtx(e,a),o(a,{validation:"ulid",code:c.invalid_string,message:n.message}),s.dirty());else if(n.kind==="url")try{new URL(e.data)}catch{a=this._getOrReturnCtx(e,a),o(a,{validation:"url",code:c.invalid_string,message:n.message}),s.dirty()}else n.kind==="regex"?(n.regex.lastIndex=0,n.regex.test(e.data)||(a=this._getOrReturnCtx(e,a),o(a,{validation:"regex",code:c.invalid_string,message:n.message}),s.dirty())):n.kind==="trim"?e.data=e.data.trim():n.kind==="includes"?e.data.includes(n.value,n.position)||(a=this._getOrReturnCtx(e,a),o(a,{code:c.invalid_string,validation:{includes:n.value,position:n.position},message:n.message}),s.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),o(a,{code:c.invalid_string,validation:{startsWith:n.value},message:n.message}),s.dirty()):n.kind==="endsWith"?e.data.endsWith(n.value)||(a=this._getOrReturnCtx(e,a),o(a,{code:c.invalid_string,validation:{endsWith:n.value},message:n.message}),s.dirty()):n.kind==="datetime"?Qe(n).test(e.data)||(a=this._getOrReturnCtx(e,a),o(a,{code:c.invalid_string,validation:"datetime",message:n.message}),s.dirty()):n.kind==="date"?He.test(e.data)||(a=this._getOrReturnCtx(e,a),o(a,{code:c.invalid_string,validation:"date",message:n.message}),s.dirty()):n.kind==="time"?Ge(n).test(e.data)||(a=this._getOrReturnCtx(e,a),o(a,{code:c.invalid_string,validation:"time",message:n.message}),s.dirty()):n.kind==="duration"?ze.test(e.data)||(a=this._getOrReturnCtx(e,a),o(a,{validation:"duration",code:c.invalid_string,message:n.message}),s.dirty()):n.kind==="ip"?Xe(e.data,n.version)||(a=this._getOrReturnCtx(e,a),o(a,{validation:"ip",code:c.invalid_string,message:n.message}),s.dirty()):n.kind==="jwt"?Ke(e.data,n.alg)||(a=this._getOrReturnCtx(e,a),o(a,{validation:"jwt",code:c.invalid_string,message:n.message}),s.dirty()):n.kind==="cidr"?et(e.data,n.version)||(a=this._getOrReturnCtx(e,a),o(a,{validation:"cidr",code:c.invalid_string,message:n.message}),s.dirty()):n.kind==="base64"?Je.test(e.data)||(a=this._getOrReturnCtx(e,a),o(a,{validation:"base64",code:c.invalid_string,message:n.message}),s.dirty()):n.kind==="base64url"?Ye.test(e.data)||(a=this._getOrReturnCtx(e,a),o(a,{validation:"base64url",code:c.invalid_string,message:n.message}),s.dirty()):g.assertNever(n);return{status:s.value,value:e.data}}_regex(e,t,s){return this.refinement(a=>e.test(a),{validation:t,code:c.invalid_string,...l.errToObj(s)})}_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==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(e==null?void 0:e.offset)??!1,local:(e==null?void 0:e.local)??!1,...l.errToObj(e==null?void 0: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==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,...l.errToObj(e==null?void 0: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==null?void 0:t.position,...l.errToObj(t==null?void 0: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=r=>new N({checks:[],typeName:p.ZodString,coerce:(r==null?void 0:r.coerce)??!1,..._(r)});function tt(r,e){const t=(r.toString().split(".")[1]||"").length,s=(e.toString().split(".")[1]||"").length,a=t>s?t:s,n=Number.parseInt(r.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 o(n,{code:c.invalid_type,expected:u.number,received:n.parsedType}),m}let s;const a=new k;for(const n of this._def.checks)n.kind==="int"?g.isInteger(e.data)||(s=this._getOrReturnCtx(e,s),o(s,{code:c.invalid_type,expected:"integer",received:"float",message:n.message}),a.dirty()):n.kind==="min"?(n.inclusive?e.data<n.value:e.data<=n.value)&&(s=this._getOrReturnCtx(e,s),o(s,{code:c.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)&&(s=this._getOrReturnCtx(e,s),o(s,{code:c.too_big,maximum:n.value,type:"number",inclusive:n.inclusive,exact:!1,message:n.message}),a.dirty()):n.kind==="multipleOf"?tt(e.data,n.value)!==0&&(s=this._getOrReturnCtx(e,s),o(s,{code:c.not_multiple_of,multipleOf:n.value,message:n.message}),a.dirty()):n.kind==="finite"?Number.isFinite(e.data)||(s=this._getOrReturnCtx(e,s),o(s,{code:c.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,s,a){return new E({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:s,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 s of this._def.checks){if(s.kind==="finite"||s.kind==="int"||s.kind==="multipleOf")return!0;s.kind==="min"?(t===null||s.value>t)&&(t=s.value):s.kind==="max"&&(e===null||s.value<e)&&(e=s.value)}return Number.isFinite(t)&&Number.isFinite(e)}}E.create=r=>new E({checks:[],typeName:p.ZodNumber,coerce:(r==null?void 0:r.coerce)||!1,..._(r)});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 s;const a=new k;for(const n of this._def.checks)n.kind==="min"?(n.inclusive?e.data<n.value:e.data<=n.value)&&(s=this._getOrReturnCtx(e,s),o(s,{code:c.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)&&(s=this._getOrReturnCtx(e,s),o(s,{code:c.too_big,type:"bigint",maximum:n.value,inclusive:n.inclusive,message:n.message}),a.dirty()):n.kind==="multipleOf"?e.data%n.value!==BigInt(0)&&(s=this._getOrReturnCtx(e,s),o(s,{code:c.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 o(t,{code:c.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,s,a){return new L({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:s,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=r=>new L({checks:[],typeName:p.ZodBigInt,coerce:(r==null?void 0:r.coerce)??!1,..._(r)});class ae extends y{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==u.boolean){const s=this._getOrReturnCtx(e);return o(s,{code:c.invalid_type,expected:u.boolean,received:s.parsedType}),m}return b(e.data)}}ae.create=r=>new ae({typeName:p.ZodBoolean,coerce:(r==null?void 0:r.coerce)||!1,..._(r)});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 o(n,{code:c.invalid_type,expected:u.date,received:n.parsedType}),m}if(Number.isNaN(e.data.getTime())){const n=this._getOrReturnCtx(e);return o(n,{code:c.invalid_date}),m}const s=new k;let a;for(const n of this._def.checks)n.kind==="min"?e.data.getTime()<n.value&&(a=this._getOrReturnCtx(e,a),o(a,{code:c.too_small,message:n.message,inclusive:!0,exact:!1,minimum:n.value,type:"date"}),s.dirty()):n.kind==="max"?e.data.getTime()>n.value&&(a=this._getOrReturnCtx(e,a),o(a,{code:c.too_big,message:n.message,inclusive:!0,exact:!1,maximum:n.value,type:"date"}),s.dirty()):g.assertNever(n);return{status:s.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=r=>new U({checks:[],coerce:(r==null?void 0:r.coerce)||!1,typeName:p.ZodDate,..._(r)});class ne extends y{_parse(e){if(this._getType(e)!==u.symbol){const s=this._getOrReturnCtx(e);return o(s,{code:c.invalid_type,expected:u.symbol,received:s.parsedType}),m}return b(e.data)}}ne.create=r=>new ne({typeName:p.ZodSymbol,..._(r)});class ie extends y{_parse(e){if(this._getType(e)!==u.undefined){const s=this._getOrReturnCtx(e);return o(s,{code:c.invalid_type,expected:u.undefined,received:s.parsedType}),m}return b(e.data)}}ie.create=r=>new ie({typeName:p.ZodUndefined,..._(r)});class de extends y{_parse(e){if(this._getType(e)!==u.null){const s=this._getOrReturnCtx(e);return o(s,{code:c.invalid_type,expected:u.null,received:s.parsedType}),m}return b(e.data)}}de.create=r=>new de({typeName:p.ZodNull,..._(r)});class ce extends y{constructor(){super(...arguments),this._any=!0}_parse(e){return b(e.data)}}ce.create=r=>new ce({typeName:p.ZodAny,..._(r)});class oe extends y{constructor(){super(...arguments),this._unknown=!0}_parse(e){return b(e.data)}}oe.create=r=>new oe({typeName:p.ZodUnknown,..._(r)});class A extends y{_parse(e){const t=this._getOrReturnCtx(e);return o(t,{code:c.invalid_type,expected:u.never,received:t.parsedType}),m}}A.create=r=>new A({typeName:p.ZodNever,..._(r)});class ue extends y{_parse(e){if(this._getType(e)!==u.undefined){const s=this._getOrReturnCtx(e);return o(s,{code:c.invalid_type,expected:u.void,received:s.parsedType}),m}return b(e.data)}}ue.create=r=>new ue({typeName:p.ZodVoid,..._(r)});class w extends y{_parse(e){const{ctx:t,status:s}=this._processInputParams(e),a=this._def;if(t.parsedType!==u.array)return o(t,{code:c.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)&&(o(t,{code:i?c.too_big:c.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}),s.dirty())}if(a.minLength!==null&&t.data.length<a.minLength.value&&(o(t,{code:c.too_small,minimum:a.minLength.value,type:"array",inclusive:!0,exact:!1,message:a.minLength.message}),s.dirty()),a.maxLength!==null&&t.data.length>a.maxLength.value&&(o(t,{code:c.too_big,maximum:a.maxLength.value,type:"array",inclusive:!0,exact:!1,message:a.maxLength.message}),s.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(s,i));const n=[...t.data].map((i,d)=>a.type._parseSync(new S(t,i,t.path,d)));return k.mergeArray(s,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=(r,e)=>new w({type:r,minLength:null,maxLength:null,exactLength:null,typeName:p.ZodArray,..._(e)});function R(r){if(r instanceof x){const e={};for(const t in r.shape){const s=r.shape[t];e[t]=O.create(R(s))}return new x({...r._def,shape:()=>e})}else return r instanceof w?new w({...r._def,type:R(r.element)}):r instanceof O?O.create(R(r.unwrap())):r instanceof V?V.create(R(r.unwrap())):r instanceof Z?Z.create(r.items.map(e=>R(e))):r}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 o(f,{code:c.invalid_type,expected:u.object,received:f.parsedType}),m}const{status:s,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],P=a.data[f];h.push({key:{status:"valid",value:f},value:v._parse(new S(a,P,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&&(o(a,{code:c.unrecognized_keys,keys:d}),s.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 P=a.data[v];h.push({key:{status:"valid",value:v},value:f._parse(new S(a,P,a.path,v)),alwaysSet:v in a.data})}}return a.common.async?Promise.resolve().then(async()=>{const f=[];for(const v of h){const P=await v.key,be=await v.value;f.push({key:P,value:be,alwaysSet:v.alwaysSet})}return f}).then(f=>k.mergeObjectSync(s,f)):k.mergeObjectSync(s,h)}get shape(){return this._def.shape()}strict(e){return l.errToObj,new x({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(t,s)=>{var n,i;const a=((i=(n=this._def).errorMap)==null?void 0:i.call(n,t,s).message)??s.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 s of g.objectKeys(e))e[s]&&this.shape[s]&&(t[s]=this.shape[s]);return new x({...this._def,shape:()=>t})}omit(e){const t={};for(const s of g.objectKeys(this.shape))e[s]||(t[s]=this.shape[s]);return new x({...this._def,shape:()=>t})}deepPartial(){return R(this)}partial(e){const t={};for(const s of g.objectKeys(this.shape)){const a=this.shape[s];e&&!e[s]?t[s]=a:t[s]=a.optional()}return new x({...this._def,shape:()=>t})}required(e){const t={};for(const s of g.objectKeys(this.shape))if(e&&!e[s])t[s]=this.shape[s];else{let n=this.shape[s];for(;n instanceof O;)n=n._def.innerType;t[s]=n}return new x({...this._def,shape:()=>t})}keyof(){return ke(g.objectKeys(this.shape))}}x.create=(r,e)=>new x({shape:()=>r,unknownKeys:"strip",catchall:A.create(),typeName:p.ZodObject,..._(e)});x.strictCreate=(r,e)=>new x({shape:()=>r,unknownKeys:"strict",catchall:A.create(),typeName:p.ZodObject,..._(e)});x.lazycreate=(r,e)=>new x({shape:r,unknownKeys:"strip",catchall:A.create(),typeName:p.ZodObject,..._(e)});class F extends y{_parse(e){const{ctx:t}=this._processInputParams(e),s=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 T(d.ctx.common.issues));return o(t,{code:c.invalid_union,unionErrors:i}),m}if(t.common.async)return Promise.all(s.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 s){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 T(h));return o(t,{code:c.invalid_union,unionErrors:d}),m}}get options(){return this._def.options}}F.create=(r,e)=>new F({options:r,typeName:p.ZodUnion,..._(e)});function Y(r,e){const t=C(r),s=C(e);if(r===e)return{valid:!0,data:r};if(t===u.object&&s===u.object){const a=g.objectKeys(e),n=g.objectKeys(r).filter(d=>a.indexOf(d)!==-1),i={...r,...e};for(const d of n){const h=Y(r[d],e[d]);if(!h.valid)return{valid:!1};i[d]=h.data}return{valid:!0,data:i}}else if(t===u.array&&s===u.array){if(r.length!==e.length)return{valid:!1};const a=[];for(let n=0;n<r.length;n++){const i=r[n],d=e[n],h=Y(i,d);if(!h.valid)return{valid:!1};a.push(h.data)}return{valid:!0,data:a}}else return t===u.date&&s===u.date&&+r==+e?{valid:!0,data:r}:{valid:!1}}class B extends y{_parse(e){const{status:t,ctx:s}=this._processInputParams(e),a=(n,i)=>{if(te(n)||te(i))return m;const d=Y(n.value,i.value);return d.valid?((re(n)||re(i))&&t.dirty(),{status:t.value,value:d.data}):(o(s,{code:c.invalid_intersection_types}),m)};return s.common.async?Promise.all([this._def.left._parseAsync({data:s.data,path:s.path,parent:s}),this._def.right._parseAsync({data:s.data,path:s.path,parent:s})]).then(([n,i])=>a(n,i)):a(this._def.left._parseSync({data:s.data,path:s.path,parent:s}),this._def.right._parseSync({data:s.data,path:s.path,parent:s}))}}B.create=(r,e,t)=>new B({left:r,right:e,typeName:p.ZodIntersection,..._(t)});class Z extends y{_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==u.array)return o(s,{code:c.invalid_type,expected:u.array,received:s.parsedType}),m;if(s.data.length<this._def.items.length)return o(s,{code:c.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),m;!this._def.rest&&s.data.length>this._def.items.length&&(o(s,{code:c.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const n=[...s.data].map((i,d)=>{const h=this._def.items[d]||this._def.rest;return h?h._parse(new S(s,i,s.path,d)):null}).filter(i=>!!i);return s.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=(r,e)=>{if(!Array.isArray(r))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Z({items:r,typeName:p.ZodTuple,rest:null,..._(e)})};class le extends y{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==u.map)return o(s,{code:c.invalid_type,expected:u.map,received:s.parsedType}),m;const a=this._def.keyType,n=this._def.valueType,i=[...s.data.entries()].map(([d,h],f)=>({key:a._parse(new S(s,d,s.path,[f,"key"])),value:n._parse(new S(s,h,s.path,[f,"value"]))}));if(s.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}}}}le.create=(r,e,t)=>new le({valueType:e,keyType:r,typeName:p.ZodMap,..._(t)});class z extends y{_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==u.set)return o(s,{code:c.invalid_type,expected:u.set,received:s.parsedType}),m;const a=this._def;a.minSize!==null&&s.data.size<a.minSize.value&&(o(s,{code:c.too_small,minimum:a.minSize.value,type:"set",inclusive:!0,exact:!1,message:a.minSize.message}),t.dirty()),a.maxSize!==null&&s.data.size>a.maxSize.value&&(o(s,{code:c.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=[...s.data.values()].map((h,f)=>n._parse(new S(s,h,s.path,f)));return s.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=(r,e)=>new z({valueType:r,minSize:null,maxSize:null,typeName:p.ZodSet,..._(e)});class he 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})}}he.create=(r,e)=>new he({getter:r,typeName:p.ZodLazy,..._(e)});class fe extends y{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return o(t,{received:t.data,code:c.invalid_literal,expected:this._def.value}),m}return{status:"valid",value:e.data}}get value(){return this._def.value}}fe.create=(r,e)=>new fe({value:r,typeName:p.ZodLiteral,..._(e)});function ke(r,e){return new j({values:r,typeName:p.ZodEnum,..._(e)})}class j extends y{_parse(e){if(typeof e.data!="string"){const t=this._getOrReturnCtx(e),s=this._def.values;return o(t,{expected:g.joinValues(s),received:t.parsedType,code:c.invalid_type}),m}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){const t=this._getOrReturnCtx(e),s=this._def.values;return o(t,{received:t.data,code:c.invalid_enum_value,options:s}),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(s=>!e.includes(s)),{...this._def,...t})}}j.create=ke;class me extends y{_parse(e){const t=g.getValidEnumValues(this._def.values),s=this._getOrReturnCtx(e);if(s.parsedType!==u.string&&s.parsedType!==u.number){const a=g.objectValues(t);return o(s,{expected:g.joinValues(a),received:s.parsedType,code:c.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 o(s,{received:s.data,code:c.invalid_enum_value,options:a}),m}return b(e.data)}get enum(){return this._def.values}}me.create=(r,e)=>new me({values:r,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 o(t,{code:c.invalid_type,expected:u.promise,received:t.parsedType}),m;const s=t.parsedType===u.promise?t.data:Promise.resolve(t.data);return b(s.then(a=>this._def.type.parseAsync(a,{path:t.path,errorMap:t.common.contextualErrorMap})))}}W.create=(r,e)=>new W({type:r,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:s}=this._processInputParams(e),a=this._def.effect||null,n={addIssue:i=>{o(s,i),i.fatal?t.abort():t.dirty()},get path(){return s.path}};if(n.addIssue=n.addIssue.bind(n),a.type==="preprocess"){const i=a.transform(s.data,n);if(s.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:s.path,parent:s});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:s.path,parent:s});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(s.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(s.common.async===!1){const d=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});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:s.data,path:s.path,parent:s}).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(s.common.async===!1){const i=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});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:s.data,path:s.path,parent:s}).then(i=>I(i)?Promise.resolve(a.transform(i.value,n)).then(d=>({status:t.value,value:d})):m);g.assertNever(a)}}$.create=(r,e,t)=>new $({schema:r,typeName:p.ZodEffects,effect:e,..._(t)});$.createWithPreprocess=(r,e,t)=>new $({schema:e,effect:{type:"preprocess",transform:r},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=(r,e)=>new O({innerType:r,typeName:p.ZodOptional,..._(e)});class V extends y{_parse(e){return this._getType(e)===u.null?b(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}V.create=(r,e)=>new V({innerType:r,typeName:p.ZodNullable,..._(e)});class H extends y{_parse(e){const{ctx:t}=this._processInputParams(e);let s=t.data;return t.parsedType===u.undefined&&(s=this._def.defaultValue()),this._def.innerType._parse({data:s,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}H.create=(r,e)=>new H({innerType:r,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),s={...t,common:{...t.common,issues:[]}},a=this._def.innerType._parse({data:s.data,path:s.path,parent:{...s}});return D(a)?a.then(n=>({status:"valid",value:n.status==="valid"?n.value:this._def.catchValue({get error(){return new T(s.common.issues)},input:s.data})})):{status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new T(s.common.issues)},input:s.data})}}removeCatch(){return this._def.innerType}}G.create=(r,e)=>new G({innerType:r,typeName:p.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,..._(e)});class pe extends y{_parse(e){if(this._getType(e)!==u.nan){const s=this._getOrReturnCtx(e);return o(s,{code:c.invalid_type,expected:u.nan,received:s.parsedType}),m}return{status:"valid",value:e.data}}}pe.create=r=>new pe({typeName:p.ZodNaN,..._(r)});class rt extends y{_parse(e){const{ctx:t}=this._processInputParams(e),s=t.data;return this._def.type._parse({data:s,path:t.path,parent:t})}unwrap(){return this._def.type}}class K extends y{_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.common.async)return(async()=>{const n=await this._def.in._parseAsync({data:s.data,path:s.path,parent:s});return n.status==="aborted"?m:n.status==="dirty"?(t.dirty(),M(n.value)):this._def.out._parseAsync({data:n.value,path:s.path,parent:s})})();{const a=this._def.in._parseSync({data:s.data,path:s.path,parent:s});return a.status==="aborted"?m:a.status==="dirty"?(t.dirty(),{status:"dirty",value:a.value}):this._def.out._parseSync({data:a.value,path:s.path,parent:s})}}static create(e,t){return new K({in:e,out:t,typeName:p.ZodPipeline})}}class Q extends y{_parse(e){const t=this._def.innerType._parse(e),s=a=>(I(a)&&(a.value=Object.freeze(a.value)),a);return D(t)?t.then(a=>s(a)):s(t)}unwrap(){return this._def.innerType}}Q.create=(r,e)=>new Q({innerType:r,typeName:p.ZodReadonly,..._(e)});var p;(function(r){r.ZodString="ZodString",r.ZodNumber="ZodNumber",r.ZodNaN="ZodNaN",r.ZodBigInt="ZodBigInt",r.ZodBoolean="ZodBoolean",r.ZodDate="ZodDate",r.ZodSymbol="ZodSymbol",r.ZodUndefined="ZodUndefined",r.ZodNull="ZodNull",r.ZodAny="ZodAny",r.ZodUnknown="ZodUnknown",r.ZodNever="ZodNever",r.ZodVoid="ZodVoid",r.ZodArray="ZodArray",r.ZodObject="ZodObject",r.ZodUnion="ZodUnion",r.ZodDiscriminatedUnion="ZodDiscriminatedUnion",r.ZodIntersection="ZodIntersection",r.ZodTuple="ZodTuple",r.ZodRecord="ZodRecord",r.ZodMap="ZodMap",r.ZodSet="ZodSet",r.ZodFunction="ZodFunction",r.ZodLazy="ZodLazy",r.ZodLiteral="ZodLiteral",r.ZodEnum="ZodEnum",r.ZodEffects="ZodEffects",r.ZodNativeEnum="ZodNativeEnum",r.ZodOptional="ZodOptional",r.ZodNullable="ZodNullable",r.ZodDefault="ZodDefault",r.ZodCatch="ZodCatch",r.ZodPromise="ZodPromise",r.ZodBranded="ZodBranded",r.ZodPipeline="ZodPipeline",r.ZodReadonly="ZodReadonly"})(p||(p={}));const _e=N.create,st=E.create;A.create;w.create;const at=x.create;F.create;B.create;Z.create;j.create;W.create;O.create;V.create;const nt="0x06fdde03",it=[],dt=[{type:"string"}];async function ct(r){return X({contract:r.contract,method:[nt,it,dt],params:[]})}async function ot(r){return ge(()=>ct(r),{cacheKey:`${r.contract.chain.id}:${r.contract.address}:name`,cacheTime:Number.POSITIVE_INFINITY})}const ut="0x95d89b41",lt=[],ht=[{type:"string"}];async function ft(r){return X({contract:r.contract,method:[ut,lt,ht],params:[]})}async function mt(r){return ge(()=>ft(r),{cacheKey:`${r.contract.chain.id}:${r.contract.address}:symbol`,cacheTime:Number.POSITIVE_INFINITY})}const ye=at({name:_e().default("Ether"),symbol:_e().default("ETH"),decimals:st().default(18)}).default({name:"Ether",symbol:"ETH",decimals:18});async function pt(r){if(we(r.contract.address)){if(!r.contract.chain.nativeCurrency||!r.contract.chain.nativeCurrency.name||!r.contract.chain.nativeCurrency.symbol||!r.contract.chain.nativeCurrency.decimals)try{const{getChainMetadata:e}=await Ce(async()=>{const{getChainMetadata:s}=await import("./utils-B3vUvlNq.js").then(a=>a.u);return{getChainMetadata:s}},[]),t=await e(r.contract.chain);return ye.parse({...t.nativeCurrency,...r.contract.chain.nativeCurrency})}catch{}return ye.parse(r.contract.chain.nativeCurrency)}try{const[e,t,s]=await Promise.all([ot(r).catch(()=>""),mt(r),Ne(r)]);return{decimals:s,name:e,symbol:t}}catch(e){throw new Error(`Invalid currency token: ${e}`)}}async function xt(r){const[e,t]=await Promise.all([Ze(r),pt(r)]);return{...t,chainId:r.contract.chain.id,displayValue:Te(e,t.decimals),tokenAddress:r.contract.address,value:e}}export{xt as getBalance};
1
+ import{am as X,cT as we,J as Te}from"./signing-B1K_Jdsm.js";import{g as Ce}from"./index-DN2JqH-l.js";import{w as ge}from"./utils-B3vUvlNq.js";import{d as Ne}from"./decimals-BB5yEnWu.js";const Oe="0x70a08231",Se=[{name:"_address",type:"address"}],Ae=[{type:"uint256"}];async function Ze(r){return X({contract:r.contract,method:[Oe,Se,Ae],params:[r.address]})}var g;(function(r){r.assertEqual=a=>{};function e(a){}r.assertIs=e;function t(a){throw new Error}r.assertNever=t,r.arrayToEnum=a=>{const n={};for(const i of a)n[i]=i;return n},r.getValidEnumValues=a=>{const n=r.objectKeys(a).filter(d=>typeof a[a[d]]!="number"),i={};for(const d of n)i[d]=a[d];return r.objectValues(i)},r.objectValues=a=>r.objectKeys(a).map(function(n){return a[n]}),r.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},r.find=(a,n)=>{for(const i of a)if(n(i))return i},r.isInteger=typeof Number.isInteger=="function"?a=>Number.isInteger(a):a=>typeof a=="number"&&Number.isFinite(a)&&Math.floor(a)===a;function s(a,n=" | "){return a.map(i=>typeof i=="string"?`'${i}'`:i).join(n)}r.joinValues=s,r.jsonStringifyReplacer=(a,n)=>typeof n=="bigint"?n.toString():n})(g||(g={}));var ee;(function(r){r.mergeShapes=(e,t)=>({...e,...t})})(ee||(ee={}));const u=g.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),C=r=>{switch(typeof r){case"undefined":return u.undefined;case"string":return u.string;case"number":return Number.isNaN(r)?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(r)?u.array:r===null?u.null:r.then&&typeof r.then=="function"&&r.catch&&typeof r.catch=="function"?u.promise:typeof Map<"u"&&r instanceof Map?u.map:typeof Set<"u"&&r instanceof Set?u.set:typeof Date<"u"&&r instanceof Date?u.date:u.object;default:return u.unknown}},c=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 T extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=s=>{this.issues=[...this.issues,s]},this.addIssues=(s=[])=>{this.issues=[...this.issues,...s]};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},s={_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)s._errors.push(t(i));else{let d=s,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),s}static assert(e){if(!(e instanceof T))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={},s=[];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 s.push(e(a));return{formErrors:s,fieldErrors:t}}get formErrors(){return this.flatten()}}T.create=r=>new T(r);const J=(r,e)=>{let t;switch(r.code){case c.invalid_type:r.received===u.undefined?t="Required":t=`Expected ${r.expected}, received ${r.received}`;break;case c.invalid_literal:t=`Invalid literal value, expected ${JSON.stringify(r.expected,g.jsonStringifyReplacer)}`;break;case c.unrecognized_keys:t=`Unrecognized key(s) in object: ${g.joinValues(r.keys,", ")}`;break;case c.invalid_union:t="Invalid input";break;case c.invalid_union_discriminator:t=`Invalid discriminator value. Expected ${g.joinValues(r.options)}`;break;case c.invalid_enum_value:t=`Invalid enum value. Expected ${g.joinValues(r.options)}, received '${r.received}'`;break;case c.invalid_arguments:t="Invalid function arguments";break;case c.invalid_return_type:t="Invalid function return type";break;case c.invalid_date:t="Invalid date";break;case c.invalid_string:typeof r.validation=="object"?"includes"in r.validation?(t=`Invalid input: must include "${r.validation.includes}"`,typeof r.validation.position=="number"&&(t=`${t} at one or more positions greater than or equal to ${r.validation.position}`)):"startsWith"in r.validation?t=`Invalid input: must start with "${r.validation.startsWith}"`:"endsWith"in r.validation?t=`Invalid input: must end with "${r.validation.endsWith}"`:g.assertNever(r.validation):r.validation!=="regex"?t=`Invalid ${r.validation}`:t="Invalid";break;case c.too_small:r.type==="array"?t=`Array must contain ${r.exact?"exactly":r.inclusive?"at least":"more than"} ${r.minimum} element(s)`:r.type==="string"?t=`String must contain ${r.exact?"exactly":r.inclusive?"at least":"over"} ${r.minimum} character(s)`:r.type==="number"?t=`Number must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${r.minimum}`:r.type==="bigint"?t=`Number must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${r.minimum}`:r.type==="date"?t=`Date must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(r.minimum))}`:t="Invalid input";break;case c.too_big:r.type==="array"?t=`Array must contain ${r.exact?"exactly":r.inclusive?"at most":"less than"} ${r.maximum} element(s)`:r.type==="string"?t=`String must contain ${r.exact?"exactly":r.inclusive?"at most":"under"} ${r.maximum} character(s)`:r.type==="number"?t=`Number must be ${r.exact?"exactly":r.inclusive?"less than or equal to":"less than"} ${r.maximum}`:r.type==="bigint"?t=`BigInt must be ${r.exact?"exactly":r.inclusive?"less than or equal to":"less than"} ${r.maximum}`:r.type==="date"?t=`Date must be ${r.exact?"exactly":r.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(r.maximum))}`:t="Invalid input";break;case c.custom:t="Invalid input";break;case c.invalid_intersection_types:t="Intersection results could not be merged";break;case c.not_multiple_of:t=`Number must be a multiple of ${r.multipleOf}`;break;case c.not_finite:t="Number must be finite";break;default:t=e.defaultError,g.assertNever(r)}return{message:t}};let Re=J;function Ie(){return Re}const Ee=r=>{const{data:e,path:t,errorMaps:s,issueData:a}=r,n=[...t,...a.path||[]],i={...a,path:n};if(a.message!==void 0)return{...a,path:n,message:a.message};let d="";const h=s.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 o(r,e){const t=Ie(),s=Ee({issueData:e,data:r.data,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,t,t===J?void 0:J].filter(a=>!!a)});r.common.issues.push(s)}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 s=[];for(const a of t){if(a.status==="aborted")return m;a.status==="dirty"&&e.dirty(),s.push(a.value)}return{status:e.value,value:s}}static async mergeObjectAsync(e,t){const s=[];for(const a of t){const n=await a.key,i=await a.value;s.push({key:n,value:i})}return k.mergeObjectSync(e,s)}static mergeObjectSync(e,t){const s={};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)&&(s[n.value]=i.value)}return{status:e.value,value:s}}}const m=Object.freeze({status:"aborted"}),M=r=>({status:"dirty",value:r}),b=r=>({status:"valid",value:r}),te=r=>r.status==="aborted",re=r=>r.status==="dirty",I=r=>r.status==="valid",D=r=>typeof Promise<"u"&&r instanceof Promise;var l;(function(r){r.errToObj=e=>typeof e=="string"?{message:e}:e||{},r.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(l||(l={}));class S{constructor(e,t,s,a){this._cachedPath=[],this.parent=e,this.data=t,this._path=s,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 se=(r,e)=>{if(I(e))return{success:!0,data:e.value};if(!r.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 T(r.common.issues);return this._error=t,this._error}}};function _(r){if(!r)return{};const{errorMap:e,invalid_type_error:t,required_error:s,description:a}=r;if(e&&(t||s))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}=r;return i.code==="invalid_enum_value"?{message:h??d.defaultError}:typeof d.data>"u"?{message:h??s??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 C(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:C(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:C(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 s=this.safeParse(e,t);if(s.success)return s.data;throw s.error}safeParse(e,t){const s={common:{issues:[],async:(t==null?void 0:t.async)??!1,contextualErrorMap:t==null?void 0:t.errorMap},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:C(e)},a=this._parseSync({data:e,path:s.path,parent:s});return se(s,a)}"~validate"(e){var s,a;const t={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:C(e)};if(!this["~standard"].async)try{const n=this._parseSync({data:e,path:[],parent:t});return I(n)?{value:n.value}:{issues:t.common.issues}}catch(n){(a=(s=n==null?void 0:n.message)==null?void 0:s.toLowerCase())!=null&&a.includes("encountered")&&(this["~standard"].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(n=>I(n)?{value:n.value}:{issues:t.common.issues})}async parseAsync(e,t){const s=await this.safeParseAsync(e,t);if(s.success)return s.data;throw s.error}async safeParseAsync(e,t){const s={common:{issues:[],contextualErrorMap:t==null?void 0:t.errorMap,async:!0},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:C(e)},a=this._parse({data:e,path:s.path,parent:s}),n=await(D(a)?a:Promise.resolve(a));return se(s,n)}refine(e,t){const s=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:c.custom,...s(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((s,a)=>e(s)?!0:(a.addIssue(typeof t=="function"?t(s,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 V.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 H({..._(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 K.create(this,e)}readonly(){return Q.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const je=/^c[^\s-]{8,}$/i,$e=/^[0-9a-z]+$/,Ve=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Pe=/^[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,Me=/^[a-z0-9_-]{21}$/i,Le=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,ze=/^[-+]?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)?)??$/,De=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Ue="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let q;const Fe=/^(?:(?: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])$/,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])\/(3[0-2]|[12]?[0-9])$/,We=/^(([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]))$/,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]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Je=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Ye=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,ve="((\\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])))",He=new RegExp(`^${ve}$`);function xe(r){let e="[0-5]\\d";r.precision?e=`${e}\\.\\d{${r.precision}}`:r.precision==null&&(e=`${e}(\\.\\d+)?`);const t=r.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${t}`}function Ge(r){return new RegExp(`^${xe(r)}$`)}function Qe(r){let e=`${ve}T${xe(r)}`;const t=[];return t.push(r.local?"Z?":"Z"),r.offset&&t.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${t.join("|")})`,new RegExp(`^${e}$`)}function Xe(r,e){return!!((e==="v4"||!e)&&Fe.test(r)||(e==="v6"||!e)&&We.test(r))}function Ke(r,e){if(!Le.test(r))return!1;try{const[t]=r.split(".");if(!t)return!1;const s=t.replace(/-/g,"+").replace(/_/g,"/").padEnd(t.length+(4-t.length%4)%4,"="),a=JSON.parse(atob(s));return!(typeof a!="object"||a===null||"typ"in a&&(a==null?void 0:a.typ)!=="JWT"||!a.alg||e&&a.alg!==e)}catch{return!1}}function et(r,e){return!!((e==="v4"||!e)&&Be.test(r)||(e==="v6"||!e)&&qe.test(r))}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 o(n,{code:c.invalid_type,expected:u.string,received:n.parsedType}),m}const s=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),o(a,{code:c.too_small,minimum:n.value,type:"string",inclusive:!0,exact:!1,message:n.message}),s.dirty());else if(n.kind==="max")e.data.length>n.value&&(a=this._getOrReturnCtx(e,a),o(a,{code:c.too_big,maximum:n.value,type:"string",inclusive:!0,exact:!1,message:n.message}),s.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?o(a,{code:c.too_big,maximum:n.value,type:"string",inclusive:!0,exact:!0,message:n.message}):d&&o(a,{code:c.too_small,minimum:n.value,type:"string",inclusive:!0,exact:!0,message:n.message}),s.dirty())}else if(n.kind==="email")De.test(e.data)||(a=this._getOrReturnCtx(e,a),o(a,{validation:"email",code:c.invalid_string,message:n.message}),s.dirty());else if(n.kind==="emoji")q||(q=new RegExp(Ue,"u")),q.test(e.data)||(a=this._getOrReturnCtx(e,a),o(a,{validation:"emoji",code:c.invalid_string,message:n.message}),s.dirty());else if(n.kind==="uuid")Pe.test(e.data)||(a=this._getOrReturnCtx(e,a),o(a,{validation:"uuid",code:c.invalid_string,message:n.message}),s.dirty());else if(n.kind==="nanoid")Me.test(e.data)||(a=this._getOrReturnCtx(e,a),o(a,{validation:"nanoid",code:c.invalid_string,message:n.message}),s.dirty());else if(n.kind==="cuid")je.test(e.data)||(a=this._getOrReturnCtx(e,a),o(a,{validation:"cuid",code:c.invalid_string,message:n.message}),s.dirty());else if(n.kind==="cuid2")$e.test(e.data)||(a=this._getOrReturnCtx(e,a),o(a,{validation:"cuid2",code:c.invalid_string,message:n.message}),s.dirty());else if(n.kind==="ulid")Ve.test(e.data)||(a=this._getOrReturnCtx(e,a),o(a,{validation:"ulid",code:c.invalid_string,message:n.message}),s.dirty());else if(n.kind==="url")try{new URL(e.data)}catch{a=this._getOrReturnCtx(e,a),o(a,{validation:"url",code:c.invalid_string,message:n.message}),s.dirty()}else n.kind==="regex"?(n.regex.lastIndex=0,n.regex.test(e.data)||(a=this._getOrReturnCtx(e,a),o(a,{validation:"regex",code:c.invalid_string,message:n.message}),s.dirty())):n.kind==="trim"?e.data=e.data.trim():n.kind==="includes"?e.data.includes(n.value,n.position)||(a=this._getOrReturnCtx(e,a),o(a,{code:c.invalid_string,validation:{includes:n.value,position:n.position},message:n.message}),s.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),o(a,{code:c.invalid_string,validation:{startsWith:n.value},message:n.message}),s.dirty()):n.kind==="endsWith"?e.data.endsWith(n.value)||(a=this._getOrReturnCtx(e,a),o(a,{code:c.invalid_string,validation:{endsWith:n.value},message:n.message}),s.dirty()):n.kind==="datetime"?Qe(n).test(e.data)||(a=this._getOrReturnCtx(e,a),o(a,{code:c.invalid_string,validation:"datetime",message:n.message}),s.dirty()):n.kind==="date"?He.test(e.data)||(a=this._getOrReturnCtx(e,a),o(a,{code:c.invalid_string,validation:"date",message:n.message}),s.dirty()):n.kind==="time"?Ge(n).test(e.data)||(a=this._getOrReturnCtx(e,a),o(a,{code:c.invalid_string,validation:"time",message:n.message}),s.dirty()):n.kind==="duration"?ze.test(e.data)||(a=this._getOrReturnCtx(e,a),o(a,{validation:"duration",code:c.invalid_string,message:n.message}),s.dirty()):n.kind==="ip"?Xe(e.data,n.version)||(a=this._getOrReturnCtx(e,a),o(a,{validation:"ip",code:c.invalid_string,message:n.message}),s.dirty()):n.kind==="jwt"?Ke(e.data,n.alg)||(a=this._getOrReturnCtx(e,a),o(a,{validation:"jwt",code:c.invalid_string,message:n.message}),s.dirty()):n.kind==="cidr"?et(e.data,n.version)||(a=this._getOrReturnCtx(e,a),o(a,{validation:"cidr",code:c.invalid_string,message:n.message}),s.dirty()):n.kind==="base64"?Je.test(e.data)||(a=this._getOrReturnCtx(e,a),o(a,{validation:"base64",code:c.invalid_string,message:n.message}),s.dirty()):n.kind==="base64url"?Ye.test(e.data)||(a=this._getOrReturnCtx(e,a),o(a,{validation:"base64url",code:c.invalid_string,message:n.message}),s.dirty()):g.assertNever(n);return{status:s.value,value:e.data}}_regex(e,t,s){return this.refinement(a=>e.test(a),{validation:t,code:c.invalid_string,...l.errToObj(s)})}_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==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(e==null?void 0:e.offset)??!1,local:(e==null?void 0:e.local)??!1,...l.errToObj(e==null?void 0: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==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,...l.errToObj(e==null?void 0: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==null?void 0:t.position,...l.errToObj(t==null?void 0: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=r=>new N({checks:[],typeName:p.ZodString,coerce:(r==null?void 0:r.coerce)??!1,..._(r)});function tt(r,e){const t=(r.toString().split(".")[1]||"").length,s=(e.toString().split(".")[1]||"").length,a=t>s?t:s,n=Number.parseInt(r.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 o(n,{code:c.invalid_type,expected:u.number,received:n.parsedType}),m}let s;const a=new k;for(const n of this._def.checks)n.kind==="int"?g.isInteger(e.data)||(s=this._getOrReturnCtx(e,s),o(s,{code:c.invalid_type,expected:"integer",received:"float",message:n.message}),a.dirty()):n.kind==="min"?(n.inclusive?e.data<n.value:e.data<=n.value)&&(s=this._getOrReturnCtx(e,s),o(s,{code:c.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)&&(s=this._getOrReturnCtx(e,s),o(s,{code:c.too_big,maximum:n.value,type:"number",inclusive:n.inclusive,exact:!1,message:n.message}),a.dirty()):n.kind==="multipleOf"?tt(e.data,n.value)!==0&&(s=this._getOrReturnCtx(e,s),o(s,{code:c.not_multiple_of,multipleOf:n.value,message:n.message}),a.dirty()):n.kind==="finite"?Number.isFinite(e.data)||(s=this._getOrReturnCtx(e,s),o(s,{code:c.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,s,a){return new E({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:s,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 s of this._def.checks){if(s.kind==="finite"||s.kind==="int"||s.kind==="multipleOf")return!0;s.kind==="min"?(t===null||s.value>t)&&(t=s.value):s.kind==="max"&&(e===null||s.value<e)&&(e=s.value)}return Number.isFinite(t)&&Number.isFinite(e)}}E.create=r=>new E({checks:[],typeName:p.ZodNumber,coerce:(r==null?void 0:r.coerce)||!1,..._(r)});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 s;const a=new k;for(const n of this._def.checks)n.kind==="min"?(n.inclusive?e.data<n.value:e.data<=n.value)&&(s=this._getOrReturnCtx(e,s),o(s,{code:c.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)&&(s=this._getOrReturnCtx(e,s),o(s,{code:c.too_big,type:"bigint",maximum:n.value,inclusive:n.inclusive,message:n.message}),a.dirty()):n.kind==="multipleOf"?e.data%n.value!==BigInt(0)&&(s=this._getOrReturnCtx(e,s),o(s,{code:c.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 o(t,{code:c.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,s,a){return new L({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:s,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=r=>new L({checks:[],typeName:p.ZodBigInt,coerce:(r==null?void 0:r.coerce)??!1,..._(r)});class ae extends y{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==u.boolean){const s=this._getOrReturnCtx(e);return o(s,{code:c.invalid_type,expected:u.boolean,received:s.parsedType}),m}return b(e.data)}}ae.create=r=>new ae({typeName:p.ZodBoolean,coerce:(r==null?void 0:r.coerce)||!1,..._(r)});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 o(n,{code:c.invalid_type,expected:u.date,received:n.parsedType}),m}if(Number.isNaN(e.data.getTime())){const n=this._getOrReturnCtx(e);return o(n,{code:c.invalid_date}),m}const s=new k;let a;for(const n of this._def.checks)n.kind==="min"?e.data.getTime()<n.value&&(a=this._getOrReturnCtx(e,a),o(a,{code:c.too_small,message:n.message,inclusive:!0,exact:!1,minimum:n.value,type:"date"}),s.dirty()):n.kind==="max"?e.data.getTime()>n.value&&(a=this._getOrReturnCtx(e,a),o(a,{code:c.too_big,message:n.message,inclusive:!0,exact:!1,maximum:n.value,type:"date"}),s.dirty()):g.assertNever(n);return{status:s.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=r=>new U({checks:[],coerce:(r==null?void 0:r.coerce)||!1,typeName:p.ZodDate,..._(r)});class ne extends y{_parse(e){if(this._getType(e)!==u.symbol){const s=this._getOrReturnCtx(e);return o(s,{code:c.invalid_type,expected:u.symbol,received:s.parsedType}),m}return b(e.data)}}ne.create=r=>new ne({typeName:p.ZodSymbol,..._(r)});class ie extends y{_parse(e){if(this._getType(e)!==u.undefined){const s=this._getOrReturnCtx(e);return o(s,{code:c.invalid_type,expected:u.undefined,received:s.parsedType}),m}return b(e.data)}}ie.create=r=>new ie({typeName:p.ZodUndefined,..._(r)});class de extends y{_parse(e){if(this._getType(e)!==u.null){const s=this._getOrReturnCtx(e);return o(s,{code:c.invalid_type,expected:u.null,received:s.parsedType}),m}return b(e.data)}}de.create=r=>new de({typeName:p.ZodNull,..._(r)});class ce extends y{constructor(){super(...arguments),this._any=!0}_parse(e){return b(e.data)}}ce.create=r=>new ce({typeName:p.ZodAny,..._(r)});class oe extends y{constructor(){super(...arguments),this._unknown=!0}_parse(e){return b(e.data)}}oe.create=r=>new oe({typeName:p.ZodUnknown,..._(r)});class A extends y{_parse(e){const t=this._getOrReturnCtx(e);return o(t,{code:c.invalid_type,expected:u.never,received:t.parsedType}),m}}A.create=r=>new A({typeName:p.ZodNever,..._(r)});class ue extends y{_parse(e){if(this._getType(e)!==u.undefined){const s=this._getOrReturnCtx(e);return o(s,{code:c.invalid_type,expected:u.void,received:s.parsedType}),m}return b(e.data)}}ue.create=r=>new ue({typeName:p.ZodVoid,..._(r)});class w extends y{_parse(e){const{ctx:t,status:s}=this._processInputParams(e),a=this._def;if(t.parsedType!==u.array)return o(t,{code:c.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)&&(o(t,{code:i?c.too_big:c.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}),s.dirty())}if(a.minLength!==null&&t.data.length<a.minLength.value&&(o(t,{code:c.too_small,minimum:a.minLength.value,type:"array",inclusive:!0,exact:!1,message:a.minLength.message}),s.dirty()),a.maxLength!==null&&t.data.length>a.maxLength.value&&(o(t,{code:c.too_big,maximum:a.maxLength.value,type:"array",inclusive:!0,exact:!1,message:a.maxLength.message}),s.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(s,i));const n=[...t.data].map((i,d)=>a.type._parseSync(new S(t,i,t.path,d)));return k.mergeArray(s,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=(r,e)=>new w({type:r,minLength:null,maxLength:null,exactLength:null,typeName:p.ZodArray,..._(e)});function R(r){if(r instanceof x){const e={};for(const t in r.shape){const s=r.shape[t];e[t]=O.create(R(s))}return new x({...r._def,shape:()=>e})}else return r instanceof w?new w({...r._def,type:R(r.element)}):r instanceof O?O.create(R(r.unwrap())):r instanceof V?V.create(R(r.unwrap())):r instanceof Z?Z.create(r.items.map(e=>R(e))):r}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 o(f,{code:c.invalid_type,expected:u.object,received:f.parsedType}),m}const{status:s,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],P=a.data[f];h.push({key:{status:"valid",value:f},value:v._parse(new S(a,P,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&&(o(a,{code:c.unrecognized_keys,keys:d}),s.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 P=a.data[v];h.push({key:{status:"valid",value:v},value:f._parse(new S(a,P,a.path,v)),alwaysSet:v in a.data})}}return a.common.async?Promise.resolve().then(async()=>{const f=[];for(const v of h){const P=await v.key,be=await v.value;f.push({key:P,value:be,alwaysSet:v.alwaysSet})}return f}).then(f=>k.mergeObjectSync(s,f)):k.mergeObjectSync(s,h)}get shape(){return this._def.shape()}strict(e){return l.errToObj,new x({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(t,s)=>{var n,i;const a=((i=(n=this._def).errorMap)==null?void 0:i.call(n,t,s).message)??s.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 s of g.objectKeys(e))e[s]&&this.shape[s]&&(t[s]=this.shape[s]);return new x({...this._def,shape:()=>t})}omit(e){const t={};for(const s of g.objectKeys(this.shape))e[s]||(t[s]=this.shape[s]);return new x({...this._def,shape:()=>t})}deepPartial(){return R(this)}partial(e){const t={};for(const s of g.objectKeys(this.shape)){const a=this.shape[s];e&&!e[s]?t[s]=a:t[s]=a.optional()}return new x({...this._def,shape:()=>t})}required(e){const t={};for(const s of g.objectKeys(this.shape))if(e&&!e[s])t[s]=this.shape[s];else{let n=this.shape[s];for(;n instanceof O;)n=n._def.innerType;t[s]=n}return new x({...this._def,shape:()=>t})}keyof(){return ke(g.objectKeys(this.shape))}}x.create=(r,e)=>new x({shape:()=>r,unknownKeys:"strip",catchall:A.create(),typeName:p.ZodObject,..._(e)});x.strictCreate=(r,e)=>new x({shape:()=>r,unknownKeys:"strict",catchall:A.create(),typeName:p.ZodObject,..._(e)});x.lazycreate=(r,e)=>new x({shape:r,unknownKeys:"strip",catchall:A.create(),typeName:p.ZodObject,..._(e)});class F extends y{_parse(e){const{ctx:t}=this._processInputParams(e),s=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 T(d.ctx.common.issues));return o(t,{code:c.invalid_union,unionErrors:i}),m}if(t.common.async)return Promise.all(s.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 s){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 T(h));return o(t,{code:c.invalid_union,unionErrors:d}),m}}get options(){return this._def.options}}F.create=(r,e)=>new F({options:r,typeName:p.ZodUnion,..._(e)});function Y(r,e){const t=C(r),s=C(e);if(r===e)return{valid:!0,data:r};if(t===u.object&&s===u.object){const a=g.objectKeys(e),n=g.objectKeys(r).filter(d=>a.indexOf(d)!==-1),i={...r,...e};for(const d of n){const h=Y(r[d],e[d]);if(!h.valid)return{valid:!1};i[d]=h.data}return{valid:!0,data:i}}else if(t===u.array&&s===u.array){if(r.length!==e.length)return{valid:!1};const a=[];for(let n=0;n<r.length;n++){const i=r[n],d=e[n],h=Y(i,d);if(!h.valid)return{valid:!1};a.push(h.data)}return{valid:!0,data:a}}else return t===u.date&&s===u.date&&+r==+e?{valid:!0,data:r}:{valid:!1}}class B extends y{_parse(e){const{status:t,ctx:s}=this._processInputParams(e),a=(n,i)=>{if(te(n)||te(i))return m;const d=Y(n.value,i.value);return d.valid?((re(n)||re(i))&&t.dirty(),{status:t.value,value:d.data}):(o(s,{code:c.invalid_intersection_types}),m)};return s.common.async?Promise.all([this._def.left._parseAsync({data:s.data,path:s.path,parent:s}),this._def.right._parseAsync({data:s.data,path:s.path,parent:s})]).then(([n,i])=>a(n,i)):a(this._def.left._parseSync({data:s.data,path:s.path,parent:s}),this._def.right._parseSync({data:s.data,path:s.path,parent:s}))}}B.create=(r,e,t)=>new B({left:r,right:e,typeName:p.ZodIntersection,..._(t)});class Z extends y{_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==u.array)return o(s,{code:c.invalid_type,expected:u.array,received:s.parsedType}),m;if(s.data.length<this._def.items.length)return o(s,{code:c.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),m;!this._def.rest&&s.data.length>this._def.items.length&&(o(s,{code:c.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const n=[...s.data].map((i,d)=>{const h=this._def.items[d]||this._def.rest;return h?h._parse(new S(s,i,s.path,d)):null}).filter(i=>!!i);return s.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=(r,e)=>{if(!Array.isArray(r))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Z({items:r,typeName:p.ZodTuple,rest:null,..._(e)})};class le extends y{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==u.map)return o(s,{code:c.invalid_type,expected:u.map,received:s.parsedType}),m;const a=this._def.keyType,n=this._def.valueType,i=[...s.data.entries()].map(([d,h],f)=>({key:a._parse(new S(s,d,s.path,[f,"key"])),value:n._parse(new S(s,h,s.path,[f,"value"]))}));if(s.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}}}}le.create=(r,e,t)=>new le({valueType:e,keyType:r,typeName:p.ZodMap,..._(t)});class z extends y{_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==u.set)return o(s,{code:c.invalid_type,expected:u.set,received:s.parsedType}),m;const a=this._def;a.minSize!==null&&s.data.size<a.minSize.value&&(o(s,{code:c.too_small,minimum:a.minSize.value,type:"set",inclusive:!0,exact:!1,message:a.minSize.message}),t.dirty()),a.maxSize!==null&&s.data.size>a.maxSize.value&&(o(s,{code:c.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=[...s.data.values()].map((h,f)=>n._parse(new S(s,h,s.path,f)));return s.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=(r,e)=>new z({valueType:r,minSize:null,maxSize:null,typeName:p.ZodSet,..._(e)});class he 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})}}he.create=(r,e)=>new he({getter:r,typeName:p.ZodLazy,..._(e)});class fe extends y{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return o(t,{received:t.data,code:c.invalid_literal,expected:this._def.value}),m}return{status:"valid",value:e.data}}get value(){return this._def.value}}fe.create=(r,e)=>new fe({value:r,typeName:p.ZodLiteral,..._(e)});function ke(r,e){return new j({values:r,typeName:p.ZodEnum,..._(e)})}class j extends y{_parse(e){if(typeof e.data!="string"){const t=this._getOrReturnCtx(e),s=this._def.values;return o(t,{expected:g.joinValues(s),received:t.parsedType,code:c.invalid_type}),m}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){const t=this._getOrReturnCtx(e),s=this._def.values;return o(t,{received:t.data,code:c.invalid_enum_value,options:s}),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(s=>!e.includes(s)),{...this._def,...t})}}j.create=ke;class me extends y{_parse(e){const t=g.getValidEnumValues(this._def.values),s=this._getOrReturnCtx(e);if(s.parsedType!==u.string&&s.parsedType!==u.number){const a=g.objectValues(t);return o(s,{expected:g.joinValues(a),received:s.parsedType,code:c.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 o(s,{received:s.data,code:c.invalid_enum_value,options:a}),m}return b(e.data)}get enum(){return this._def.values}}me.create=(r,e)=>new me({values:r,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 o(t,{code:c.invalid_type,expected:u.promise,received:t.parsedType}),m;const s=t.parsedType===u.promise?t.data:Promise.resolve(t.data);return b(s.then(a=>this._def.type.parseAsync(a,{path:t.path,errorMap:t.common.contextualErrorMap})))}}W.create=(r,e)=>new W({type:r,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:s}=this._processInputParams(e),a=this._def.effect||null,n={addIssue:i=>{o(s,i),i.fatal?t.abort():t.dirty()},get path(){return s.path}};if(n.addIssue=n.addIssue.bind(n),a.type==="preprocess"){const i=a.transform(s.data,n);if(s.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:s.path,parent:s});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:s.path,parent:s});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(s.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(s.common.async===!1){const d=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});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:s.data,path:s.path,parent:s}).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(s.common.async===!1){const i=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});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:s.data,path:s.path,parent:s}).then(i=>I(i)?Promise.resolve(a.transform(i.value,n)).then(d=>({status:t.value,value:d})):m);g.assertNever(a)}}$.create=(r,e,t)=>new $({schema:r,typeName:p.ZodEffects,effect:e,..._(t)});$.createWithPreprocess=(r,e,t)=>new $({schema:e,effect:{type:"preprocess",transform:r},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=(r,e)=>new O({innerType:r,typeName:p.ZodOptional,..._(e)});class V extends y{_parse(e){return this._getType(e)===u.null?b(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}V.create=(r,e)=>new V({innerType:r,typeName:p.ZodNullable,..._(e)});class H extends y{_parse(e){const{ctx:t}=this._processInputParams(e);let s=t.data;return t.parsedType===u.undefined&&(s=this._def.defaultValue()),this._def.innerType._parse({data:s,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}H.create=(r,e)=>new H({innerType:r,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),s={...t,common:{...t.common,issues:[]}},a=this._def.innerType._parse({data:s.data,path:s.path,parent:{...s}});return D(a)?a.then(n=>({status:"valid",value:n.status==="valid"?n.value:this._def.catchValue({get error(){return new T(s.common.issues)},input:s.data})})):{status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new T(s.common.issues)},input:s.data})}}removeCatch(){return this._def.innerType}}G.create=(r,e)=>new G({innerType:r,typeName:p.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,..._(e)});class pe extends y{_parse(e){if(this._getType(e)!==u.nan){const s=this._getOrReturnCtx(e);return o(s,{code:c.invalid_type,expected:u.nan,received:s.parsedType}),m}return{status:"valid",value:e.data}}}pe.create=r=>new pe({typeName:p.ZodNaN,..._(r)});class rt extends y{_parse(e){const{ctx:t}=this._processInputParams(e),s=t.data;return this._def.type._parse({data:s,path:t.path,parent:t})}unwrap(){return this._def.type}}class K extends y{_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.common.async)return(async()=>{const n=await this._def.in._parseAsync({data:s.data,path:s.path,parent:s});return n.status==="aborted"?m:n.status==="dirty"?(t.dirty(),M(n.value)):this._def.out._parseAsync({data:n.value,path:s.path,parent:s})})();{const a=this._def.in._parseSync({data:s.data,path:s.path,parent:s});return a.status==="aborted"?m:a.status==="dirty"?(t.dirty(),{status:"dirty",value:a.value}):this._def.out._parseSync({data:a.value,path:s.path,parent:s})}}static create(e,t){return new K({in:e,out:t,typeName:p.ZodPipeline})}}class Q extends y{_parse(e){const t=this._def.innerType._parse(e),s=a=>(I(a)&&(a.value=Object.freeze(a.value)),a);return D(t)?t.then(a=>s(a)):s(t)}unwrap(){return this._def.innerType}}Q.create=(r,e)=>new Q({innerType:r,typeName:p.ZodReadonly,..._(e)});var p;(function(r){r.ZodString="ZodString",r.ZodNumber="ZodNumber",r.ZodNaN="ZodNaN",r.ZodBigInt="ZodBigInt",r.ZodBoolean="ZodBoolean",r.ZodDate="ZodDate",r.ZodSymbol="ZodSymbol",r.ZodUndefined="ZodUndefined",r.ZodNull="ZodNull",r.ZodAny="ZodAny",r.ZodUnknown="ZodUnknown",r.ZodNever="ZodNever",r.ZodVoid="ZodVoid",r.ZodArray="ZodArray",r.ZodObject="ZodObject",r.ZodUnion="ZodUnion",r.ZodDiscriminatedUnion="ZodDiscriminatedUnion",r.ZodIntersection="ZodIntersection",r.ZodTuple="ZodTuple",r.ZodRecord="ZodRecord",r.ZodMap="ZodMap",r.ZodSet="ZodSet",r.ZodFunction="ZodFunction",r.ZodLazy="ZodLazy",r.ZodLiteral="ZodLiteral",r.ZodEnum="ZodEnum",r.ZodEffects="ZodEffects",r.ZodNativeEnum="ZodNativeEnum",r.ZodOptional="ZodOptional",r.ZodNullable="ZodNullable",r.ZodDefault="ZodDefault",r.ZodCatch="ZodCatch",r.ZodPromise="ZodPromise",r.ZodBranded="ZodBranded",r.ZodPipeline="ZodPipeline",r.ZodReadonly="ZodReadonly"})(p||(p={}));const _e=N.create,st=E.create;A.create;w.create;const at=x.create;F.create;B.create;Z.create;j.create;W.create;O.create;V.create;const nt="0x06fdde03",it=[],dt=[{type:"string"}];async function ct(r){return X({contract:r.contract,method:[nt,it,dt],params:[]})}async function ot(r){return ge(()=>ct(r),{cacheKey:`${r.contract.chain.id}:${r.contract.address}:name`,cacheTime:Number.POSITIVE_INFINITY})}const ut="0x95d89b41",lt=[],ht=[{type:"string"}];async function ft(r){return X({contract:r.contract,method:[ut,lt,ht],params:[]})}async function mt(r){return ge(()=>ft(r),{cacheKey:`${r.contract.chain.id}:${r.contract.address}:symbol`,cacheTime:Number.POSITIVE_INFINITY})}const ye=at({name:_e().default("Ether"),symbol:_e().default("ETH"),decimals:st().default(18)}).default({name:"Ether",symbol:"ETH",decimals:18});async function pt(r){if(we(r.contract.address)){if(!r.contract.chain.nativeCurrency||!r.contract.chain.nativeCurrency.name||!r.contract.chain.nativeCurrency.symbol||!r.contract.chain.nativeCurrency.decimals)try{const{getChainMetadata:e}=await Ce(async()=>{const{getChainMetadata:s}=await import("./utils-B3vUvlNq.js").then(a=>a.u);return{getChainMetadata:s}},[]),t=await e(r.contract.chain);return ye.parse({...t.nativeCurrency,...r.contract.chain.nativeCurrency})}catch{}return ye.parse(r.contract.chain.nativeCurrency)}try{const[e,t,s]=await Promise.all([ot(r).catch(()=>""),mt(r),Ne(r)]);return{decimals:s,name:e,symbol:t}}catch(e){throw new Error(`Invalid currency token: ${e}`)}}async function xt(r){const[e,t]=await Promise.all([Ze(r),pt(r)]);return{...t,chainId:r.contract.chain.id,displayValue:Te(e,t.decimals),tokenAddress:r.contract.address,value:e}}export{xt as getBalance};
@@ -1 +1 @@
1
- import{M as s,am as a}from"./signing-CQ15XHyj.js";import{d as r}from"./detectExtension-CTJS_83C.js";import"./utils-B3vUvlNq.js";import"./index-DlDkzdhK.js";const 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 d(e){return r({availableSelectors:e,method:[n,o,t]})}function i(e){return s(t,e)[0]}async function u(e){return a({contract:e.contract,method:[n,o,t],params:[]})}export{n as FN_SELECTOR,i as decodeGetInstalledModulesResult,u as getInstalledModules,d as isGetInstalledModulesSupported};
1
+ import{M as s,am as a}from"./signing-B1K_Jdsm.js";import{d as r}from"./detectExtension-BOyq5ueD.js";import"./utils-B3vUvlNq.js";import"./index-DN2JqH-l.js";const 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 d(e){return r({availableSelectors:e,method:[n,o,t]})}function i(e){return s(t,e)[0]}async function u(e){return a({contract:e.contract,method:[n,o,t],params:[]})}export{n as FN_SELECTOR,i as decodeGetInstalledModulesResult,u as getInstalledModules,d as isGetInstalledModulesSupported};
@@ -1 +1 @@
1
- import{g as a}from"./thirdweb-BEvIP-fy.js";import{f as o}from"./fetchTokenMetadata-BVwYMovl.js";import{parseNFT as i}from"./parseNft-C-gFG5mL.js";import{totalSupply as d}from"./totalSupply-DYVdetcS.js";import{am as m}from"./signing-CQ15XHyj.js";import"./utils-B3vUvlNq.js";import"./index-DlDkzdhK.js";import"./wait-for-tx-receipt-BWZbdlKf.js";import"./sleep-mAKpSMLY.js";import"./eth_estimateGas-DylIsdQK.js";import"./eth_getStorageAt-D6adTFW0.js";import"./eth_getTransactionCount-BIhOSWd4.js";import"./decimals-DrdfxUxV.js";import"./decimals-BBBuCBiH.js";import"./zora-sepolia-CZ4Tf1UH.js";import"./send-batch-transaction-DexqN5g2.js";import"./uint8-array-CjVHUazS.js";import"./detectExtension-CTJS_83C.js";const u="0x0e89341c",I=[{name:"tokenId",type:"uint256"}],k=[{type:"string"}];async function f(t){return m({contract:t.contract,method:[u,I,k],params:[t.tokenId]})}async function O(t){const{useIndexer:r=!0}=t;if(r)try{return await p(t)}catch{return await c(t)}return await c(t)}async function p(t){const r=await a({chain:t.contract.chain,client:t.contract.client,contractAddress:t.contract.address,tokenId:t.tokenId});return r||c(t)}async function c(t){const[r,e]=await Promise.all([f({contract:t.contract,tokenId:t.tokenId}),d({contract:t.contract,id:t.tokenId}).catch(()=>0n)]);return i(await o({client:t.contract.client,tokenId:t.tokenId,tokenUri:r}).then(n=>n||{id:t.tokenId,type:"ERC1155",uri:r}).catch(()=>({id:t.tokenId,type:"ERC1155",uri:r})),{chainId:t.contract.chain.id,owner:null,supply:e,tokenAddress:t.contract.address,tokenId:t.tokenId,tokenUri:r,type:"ERC1155"})}export{O as getNFT};
1
+ import{g as a}from"./thirdweb-0Fl_ECmE.js";import{f as o}from"./fetchTokenMetadata-ClRC5ORW.js";import{parseNFT as i}from"./parseNft-BmEusGKu.js";import{totalSupply as d}from"./totalSupply-ClM38QOc.js";import{am as m}from"./signing-B1K_Jdsm.js";import"./utils-B3vUvlNq.js";import"./index-DN2JqH-l.js";import"./wait-for-tx-receipt-pc2BJc62.js";import"./sleep-mAKpSMLY.js";import"./eth_estimateGas-A6ba-Fl3.js";import"./eth_getStorageAt-DiqyV3Wq.js";import"./eth_getTransactionCount-CF50onAO.js";import"./decimals-D7yTLBH-.js";import"./decimals-BB5yEnWu.js";import"./zora-sepolia-CZ4Tf1UH.js";import"./send-batch-transaction-DfUNUZ4Z.js";import"./uint8-array-CjVHUazS.js";import"./detectExtension-BOyq5ueD.js";const u="0x0e89341c",I=[{name:"tokenId",type:"uint256"}],k=[{type:"string"}];async function f(t){return m({contract:t.contract,method:[u,I,k],params:[t.tokenId]})}async function O(t){const{useIndexer:r=!0}=t;if(r)try{return await p(t)}catch{return await c(t)}return await c(t)}async function p(t){const r=await a({chain:t.contract.chain,client:t.contract.client,contractAddress:t.contract.address,tokenId:t.tokenId});return r||c(t)}async function c(t){const[r,e]=await Promise.all([f({contract:t.contract,tokenId:t.tokenId}),d({contract:t.contract,id:t.tokenId}).catch(()=>0n)]);return i(await o({client:t.contract.client,tokenId:t.tokenId,tokenUri:r}).then(n=>n||{id:t.tokenId,type:"ERC1155",uri:r}).catch(()=>({id:t.tokenId,type:"ERC1155",uri:r})),{chainId:t.contract.chain.id,owner:null,supply:e,tokenAddress:t.contract.address,tokenId:t.tokenId,tokenUri:r,type:"ERC1155"})}export{O as getNFT};
@@ -1,2 +1,2 @@
1
- const __vite__fileDeps=["assets/ownerOf-H_15UHmZ.js","assets/signing-CQ15XHyj.js","assets/utils-B3vUvlNq.js","assets/index-DlDkzdhK.js","assets/detectExtension-CTJS_83C.js"],__vite__mapDeps=i=>i.map(i=>__vite__fileDeps[i]);
2
- import{g as o}from"./index-DlDkzdhK.js";import{f as m}from"./fetchTokenMetadata-BVwYMovl.js";import{parseNFT as i}from"./parseNft-C-gFG5mL.js";import{am as d}from"./signing-CQ15XHyj.js";import{g as u}from"./thirdweb-BEvIP-fy.js";import"./uint8-array-CjVHUazS.js";import"./utils-B3vUvlNq.js";import"./wait-for-tx-receipt-BWZbdlKf.js";import"./sleep-mAKpSMLY.js";import"./eth_estimateGas-DylIsdQK.js";import"./eth_getStorageAt-D6adTFW0.js";import"./eth_getTransactionCount-BIhOSWd4.js";import"./decimals-DrdfxUxV.js";import"./decimals-BBBuCBiH.js";import"./zora-sepolia-CZ4Tf1UH.js";import"./send-batch-transaction-DexqN5g2.js";const f="0xc87b56dd",y=[{name:"_tokenId",type:"uint256"}],I=[{type:"string"}];async function h(t){return d({contract:t.contract,method:[f,y,I],params:[t.tokenId]})}const k="0x4f6ccce7",l=[{name:"_index",type:"uint256"}],s=[{type:"uint256"}];async function T(t){return d({contract:t.contract,method:[k,l,s],params:[t.index]})}async function v(t){const{useIndexer:r=!0}=t;if(r)try{return await _(t)}catch{return await e(t)}return await e(t)}async function _(t){const r=await u({chain:t.contract.chain,client:t.contract.client,contractAddress:t.contract.address,includeOwners:t.includeOwner,tokenId:t.tokenId});return r||e(t)}async function e(t){let r=t.tokenId;if(t.tokenByIndex)try{r=await T({contract:t.contract,index:t.tokenId})}catch{}const[n,a]=await Promise.all([h({contract:t.contract,tokenId:r}).catch(()=>null),t.includeOwner?o(()=>import("./ownerOf-H_15UHmZ.js"),__vite__mapDeps([0,1,2,3,4])).then(c=>c.ownerOf({contract:t.contract,tokenId:r})).catch(()=>null):null]);return n!=null&&n.trim()?i(await m({client:t.contract.client,tokenId:r,tokenUri:n}).then(c=>c||{id:r,type:"ERC721",uri:n}).catch(()=>({id:r,type:"ERC721",uri:n})),{chainId:t.contract.chain.id,owner:a,tokenAddress:t.contract.address,tokenId:r,tokenUri:n,type:"ERC721"}):i({id:r,type:"ERC721",uri:""},{chainId:t.contract.chain.id,owner:a,tokenAddress:t.contract.address,tokenId:r,tokenUri:"",type:"ERC721"})}export{v as getNFT};
1
+ const __vite__fileDeps=["assets/ownerOf-ClSM4brX.js","assets/signing-B1K_Jdsm.js","assets/utils-B3vUvlNq.js","assets/index-DN2JqH-l.js","assets/detectExtension-BOyq5ueD.js"],__vite__mapDeps=i=>i.map(i=>__vite__fileDeps[i]);
2
+ import{g as o}from"./index-DN2JqH-l.js";import{f as m}from"./fetchTokenMetadata-ClRC5ORW.js";import{parseNFT as i}from"./parseNft-BmEusGKu.js";import{am as d}from"./signing-B1K_Jdsm.js";import{g as u}from"./thirdweb-0Fl_ECmE.js";import"./uint8-array-CjVHUazS.js";import"./utils-B3vUvlNq.js";import"./wait-for-tx-receipt-pc2BJc62.js";import"./sleep-mAKpSMLY.js";import"./eth_estimateGas-A6ba-Fl3.js";import"./eth_getStorageAt-DiqyV3Wq.js";import"./eth_getTransactionCount-CF50onAO.js";import"./decimals-D7yTLBH-.js";import"./decimals-BB5yEnWu.js";import"./zora-sepolia-CZ4Tf1UH.js";import"./send-batch-transaction-DfUNUZ4Z.js";const f="0xc87b56dd",y=[{name:"_tokenId",type:"uint256"}],I=[{type:"string"}];async function h(t){return d({contract:t.contract,method:[f,y,I],params:[t.tokenId]})}const k="0x4f6ccce7",l=[{name:"_index",type:"uint256"}],s=[{type:"uint256"}];async function T(t){return d({contract:t.contract,method:[k,l,s],params:[t.index]})}async function v(t){const{useIndexer:r=!0}=t;if(r)try{return await _(t)}catch{return await e(t)}return await e(t)}async function _(t){const r=await u({chain:t.contract.chain,client:t.contract.client,contractAddress:t.contract.address,includeOwners:t.includeOwner,tokenId:t.tokenId});return r||e(t)}async function e(t){let r=t.tokenId;if(t.tokenByIndex)try{r=await T({contract:t.contract,index:t.tokenId})}catch{}const[n,a]=await Promise.all([h({contract:t.contract,tokenId:r}).catch(()=>null),t.includeOwner?o(()=>import("./ownerOf-ClSM4brX.js"),__vite__mapDeps([0,1,2,3,4])).then(c=>c.ownerOf({contract:t.contract,tokenId:r})).catch(()=>null):null]);return n!=null&&n.trim()?i(await m({client:t.contract.client,tokenId:r,tokenUri:n}).then(c=>c||{id:r,type:"ERC721",uri:n}).catch(()=>({id:r,type:"ERC721",uri:n})),{chainId:t.contract.chain.id,owner:a,tokenAddress:t.contract.address,tokenId:r,tokenUri:n,type:"ERC721"}):i({id:r,type:"ERC721",uri:""},{chainId:t.contract.chain.id,owner:a,tokenAddress:t.contract.address,tokenId:r,tokenUri:"",type:"ERC721"})}export{v as getNFT};
@@ -1,4 +1,4 @@
1
- import{w as i}from"./core-FalccOZQ.js";import"./index-DlDkzdhK.js";import"./events-BSf9wyey.js";import"./index.es-B3ObrDkW.js";import"./index-nibyPLVP.js";import"./index.es-vOkXvnBD.js";const a=i`<svg fill="none" viewBox="0 0 40 40">
1
+ import{w as i}from"./core-f4taWsy5.js";import"./index-DN2JqH-l.js";import"./events-CjOrSHaz.js";import"./index.es-MXG0VeeZ.js";import"./index-nibyPLVP.js";import"./index.es-BEAksKXY.js";const a=i`<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-FalccOZQ.js";import"./index-DlDkzdhK.js";import"./events-BSf9wyey.js";import"./index.es-B3ObrDkW.js";import"./index-nibyPLVP.js";import"./index.es-vOkXvnBD.js";const v=l`<svg fill="none" viewBox="0 0 40 40">
1
+ import{w as l}from"./core-f4taWsy5.js";import"./index-DN2JqH-l.js";import"./events-CjOrSHaz.js";import"./index.es-MXG0VeeZ.js";import"./index-nibyPLVP.js";import"./index.es-BEAksKXY.js";const v=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 +1 @@
1
- import{aZ as u,a_ as A,a$ as l,f as I,b0 as M,b1 as _,b2 as k,b3 as C,b4 as N,b5 as g,b6 as O,b7 as B,b8 as T,b9 as E}from"./signing-CQ15XHyj.js";function L(e){const t=u(`0x${e.substring(4)}`).substring(26);return A(`0x${t}`)}function Z(e,{errorInstance:t=new Error("timed out"),timeout:s,signal:n}){return new Promise((r,a)=>{(async()=>{let o;try{const i=new AbortController;s>0&&(o=setTimeout(()=>{n?i.abort():a(t)},s)),r(await e({signal:(i==null?void 0:i.signal)||null}))}catch(i){(i==null?void 0:i.name)==="AbortError"&&a(t),a(i)}finally{clearTimeout(o)}})()})}class H extends l{constructor({domain:t}){super(`Invalid domain "${I(t)}".`,{metaMessages:["Must be a valid EIP-712 domain."]})}}class R extends l{constructor({primaryType:t,types:s}){super(`Invalid primary type \`${t}\` must be one of \`${JSON.stringify(Object.keys(s))}\`.`,{docsPath:"/api/glossary/Errors#typeddatainvalidprimarytypeerror",metaMessages:["Check that the primary type is a key in `types`."]})}}class W extends l{constructor({type:t}){super(`Struct type "${t}" is invalid.`,{metaMessages:["Struct type must not be a Solidity type."],name:"InvalidStructTypeError"})}}function q(e){const{domain:t,message:s,primaryType:n,types:r}=e,a=(m,b)=>{const p={...b};for(const c of m){const{name:f,type:d}=c;d==="address"&&(p[f]=p[f].toLowerCase())}return p},o=r.EIP712Domain?t?a(r.EIP712Domain,t):{}:{},i=(()=>{if(n!=="EIP712Domain")return a(r[n],s)})();return I({domain:o,message:i,primaryType:n,types:r})}function F(e){const{domain:t,message:s,primaryType:n,types:r}=e,a=(o,i)=>{for(const m of o){const{name:b,type:p}=m,c=i[b],f=p.match(M);if(f&&(typeof c=="number"||typeof c=="bigint")){const[$,y,z]=f;_(c,{signed:y==="int",size:Number.parseInt(z,10)/8})}if(p==="address"&&typeof c=="string"&&!k(c))throw new C({address:c});const d=p.match(N);if(d){const[$,y]=d;if(y&&g(c)!==Number.parseInt(y,10))throw new O({expectedSize:Number.parseInt(y,10),givenSize:g(c)})}const h=r[p];h&&(V(p),a(h,c))}};if(r.EIP712Domain&&t){if(typeof t!="object")throw new H({domain:t});a(r.EIP712Domain,t)}if(n!=="EIP712Domain")if(r[n])a(r[n],s);else throw new R({primaryType:n,types:r})}function D({domain:e}){return[typeof(e==null?void 0:e.name)=="string"&&{name:"name",type:"string"},(e==null?void 0:e.version)&&{name:"version",type:"string"},(typeof(e==null?void 0:e.chainId)=="number"||typeof(e==null?void 0:e.chainId)=="bigint")&&{name:"chainId",type:"uint256"},(e==null?void 0:e.verifyingContract)&&{name:"verifyingContract",type:"address"},(e==null?void 0:e.salt)&&{name:"salt",type:"bytes32"}].filter(Boolean)}function G({domain:e}){return w({domain:e,types:{EIP712Domain:D({domain:e})}})}function V(e){if(e==="address"||e==="bool"||e==="string"||e.startsWith("bytes")||e.startsWith("uint")||e.startsWith("int"))throw new W({type:e})}function Q(e){const{domain:t={},message:s,primaryType:n}=e,r={EIP712Domain:D({domain:t}),...e.types};F({domain:t,message:s,primaryType:n,types:r});const a=["0x1901"];return t&&a.push(w({domain:t,types:r})),n!=="EIP712Domain"&&a.push(P({data:s,primaryType:n,types:r})),u(B(a))}function w({domain:e,types:t}){return P({data:e,primaryType:"EIP712Domain",types:t})}function P({data:e,primaryType:t,types:s}){const n=v({data:e,primaryType:t,types:s});return u(n)}function v({data:e,primaryType:t,types:s}){const n=[{type:"bytes32"}],r=[j({primaryType:t,types:s})];for(const a of s[t]){const[o,i]=S({types:s,name:a.name,type:a.type,value:e[a.name]});n.push(o),r.push(i)}return T(n,r)}function j({primaryType:e,types:t}){const s=E(J({primaryType:e,types:t}));return u(s)}function J({primaryType:e,types:t}){let s="";const n=x({primaryType:e,types:t});n.delete(e);const r=[e,...Array.from(n).sort()];for(const a of r)s+=`${a}(${t[a].map(({name:o,type:i})=>`${i} ${o}`).join(",")})`;return s}function x({primaryType:e,types:t},s=new Set){const n=e.match(/^\w*/u),r=n==null?void 0:n[0];if(s.has(r)||t[r]===void 0)return s;s.add(r);for(const a of t[r])x({primaryType:a.type,types:t},s);return s}function S({types:e,name:t,type:s,value:n}){if(e[s]!==void 0)return[{type:"bytes32"},u(v({data:n,primaryType:s,types:e}))];if(s==="bytes")return n=`0x${(n.length%2?"0":"")+n.slice(2)}`,[{type:"bytes32"},u(n)];if(s==="string")return[{type:"bytes32"},u(E(n))];if(s.lastIndexOf("]")===s.length-1){const r=s.slice(0,s.lastIndexOf("[")),a=n.map(o=>S({name:t,type:r,types:e,value:o}));return[{type:"bytes32"},u(T(a.map(([o])=>o),a.map(([,o])=>o)))]}return[{type:s},n]}export{H as I,R as a,W as b,w as c,G as d,P as e,D as g,Q as h,L as p,q as s,F as v,Z as w};
1
+ import{aZ as u,a_ as A,a$ as l,f as I,b0 as M,b1 as _,b2 as k,b3 as C,b4 as N,b5 as g,b6 as O,b7 as B,b8 as T,b9 as E}from"./signing-B1K_Jdsm.js";function L(e){const t=u(`0x${e.substring(4)}`).substring(26);return A(`0x${t}`)}function Z(e,{errorInstance:t=new Error("timed out"),timeout:s,signal:n}){return new Promise((r,a)=>{(async()=>{let o;try{const i=new AbortController;s>0&&(o=setTimeout(()=>{n?i.abort():a(t)},s)),r(await e({signal:(i==null?void 0:i.signal)||null}))}catch(i){(i==null?void 0:i.name)==="AbortError"&&a(t),a(i)}finally{clearTimeout(o)}})()})}class H extends l{constructor({domain:t}){super(`Invalid domain "${I(t)}".`,{metaMessages:["Must be a valid EIP-712 domain."]})}}class R extends l{constructor({primaryType:t,types:s}){super(`Invalid primary type \`${t}\` must be one of \`${JSON.stringify(Object.keys(s))}\`.`,{docsPath:"/api/glossary/Errors#typeddatainvalidprimarytypeerror",metaMessages:["Check that the primary type is a key in `types`."]})}}class W extends l{constructor({type:t}){super(`Struct type "${t}" is invalid.`,{metaMessages:["Struct type must not be a Solidity type."],name:"InvalidStructTypeError"})}}function q(e){const{domain:t,message:s,primaryType:n,types:r}=e,a=(m,b)=>{const p={...b};for(const c of m){const{name:f,type:d}=c;d==="address"&&(p[f]=p[f].toLowerCase())}return p},o=r.EIP712Domain?t?a(r.EIP712Domain,t):{}:{},i=(()=>{if(n!=="EIP712Domain")return a(r[n],s)})();return I({domain:o,message:i,primaryType:n,types:r})}function F(e){const{domain:t,message:s,primaryType:n,types:r}=e,a=(o,i)=>{for(const m of o){const{name:b,type:p}=m,c=i[b],f=p.match(M);if(f&&(typeof c=="number"||typeof c=="bigint")){const[$,y,z]=f;_(c,{signed:y==="int",size:Number.parseInt(z,10)/8})}if(p==="address"&&typeof c=="string"&&!k(c))throw new C({address:c});const d=p.match(N);if(d){const[$,y]=d;if(y&&g(c)!==Number.parseInt(y,10))throw new O({expectedSize:Number.parseInt(y,10),givenSize:g(c)})}const h=r[p];h&&(V(p),a(h,c))}};if(r.EIP712Domain&&t){if(typeof t!="object")throw new H({domain:t});a(r.EIP712Domain,t)}if(n!=="EIP712Domain")if(r[n])a(r[n],s);else throw new R({primaryType:n,types:r})}function D({domain:e}){return[typeof(e==null?void 0:e.name)=="string"&&{name:"name",type:"string"},(e==null?void 0:e.version)&&{name:"version",type:"string"},(typeof(e==null?void 0:e.chainId)=="number"||typeof(e==null?void 0:e.chainId)=="bigint")&&{name:"chainId",type:"uint256"},(e==null?void 0:e.verifyingContract)&&{name:"verifyingContract",type:"address"},(e==null?void 0:e.salt)&&{name:"salt",type:"bytes32"}].filter(Boolean)}function G({domain:e}){return w({domain:e,types:{EIP712Domain:D({domain:e})}})}function V(e){if(e==="address"||e==="bool"||e==="string"||e.startsWith("bytes")||e.startsWith("uint")||e.startsWith("int"))throw new W({type:e})}function Q(e){const{domain:t={},message:s,primaryType:n}=e,r={EIP712Domain:D({domain:t}),...e.types};F({domain:t,message:s,primaryType:n,types:r});const a=["0x1901"];return t&&a.push(w({domain:t,types:r})),n!=="EIP712Domain"&&a.push(P({data:s,primaryType:n,types:r})),u(B(a))}function w({domain:e,types:t}){return P({data:e,primaryType:"EIP712Domain",types:t})}function P({data:e,primaryType:t,types:s}){const n=v({data:e,primaryType:t,types:s});return u(n)}function v({data:e,primaryType:t,types:s}){const n=[{type:"bytes32"}],r=[j({primaryType:t,types:s})];for(const a of s[t]){const[o,i]=S({types:s,name:a.name,type:a.type,value:e[a.name]});n.push(o),r.push(i)}return T(n,r)}function j({primaryType:e,types:t}){const s=E(J({primaryType:e,types:t}));return u(s)}function J({primaryType:e,types:t}){let s="";const n=x({primaryType:e,types:t});n.delete(e);const r=[e,...Array.from(n).sort()];for(const a of r)s+=`${a}(${t[a].map(({name:o,type:i})=>`${i} ${o}`).join(",")})`;return s}function x({primaryType:e,types:t},s=new Set){const n=e.match(/^\w*/u),r=n==null?void 0:n[0];if(s.has(r)||t[r]===void 0)return s;s.add(r);for(const a of t[r])x({primaryType:a.type,types:t},s);return s}function S({types:e,name:t,type:s,value:n}){if(e[s]!==void 0)return[{type:"bytes32"},u(v({data:n,primaryType:s,types:e}))];if(s==="bytes")return n=`0x${(n.length%2?"0":"")+n.slice(2)}`,[{type:"bytes32"},u(n)];if(s==="string")return[{type:"bytes32"},u(E(n))];if(s.lastIndexOf("]")===s.length-1){const r=s.slice(0,s.lastIndexOf("[")),a=n.map(o=>S({name:t,type:r,types:e,value:o}));return[{type:"bytes32"},u(T(a.map(([o])=>o),a.map(([,o])=>o)))]}return[{type:s},n]}export{H as I,R as a,W as b,w as c,G as d,P as e,D as g,Q as h,L as p,q as s,F as v,Z as w};
@@ -1,4 +1,4 @@
1
- import{w as l}from"./core-FalccOZQ.js";import"./index-DlDkzdhK.js";import"./events-BSf9wyey.js";import"./index.es-B3ObrDkW.js";import"./index-nibyPLVP.js";import"./index.es-vOkXvnBD.js";const c=l`<svg fill="none" viewBox="0 0 16 16">
1
+ import{w as l}from"./core-f4taWsy5.js";import"./index-DN2JqH-l.js";import"./events-CjOrSHaz.js";import"./index.es-MXG0VeeZ.js";import"./index-nibyPLVP.js";import"./index.es-BEAksKXY.js";const c=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-FalccOZQ.js";import"./index-DlDkzdhK.js";import"./events-BSf9wyey.js";import"./index.es-B3ObrDkW.js";import"./index-nibyPLVP.js";import"./index.es-vOkXvnBD.js";const v=c`<svg
1
+ import{w as c}from"./core-f4taWsy5.js";import"./index-DN2JqH-l.js";import"./events-CjOrSHaz.js";import"./index.es-MXG0VeeZ.js";import"./index-nibyPLVP.js";import"./index.es-BEAksKXY.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-FalccOZQ.js";import"./index-DlDkzdhK.js";import"./events-BSf9wyey.js";import"./index.es-B3ObrDkW.js";import"./index-nibyPLVP.js";import"./index.es-vOkXvnBD.js";const p=C`<svg width="14" height="14" viewBox="0 0 14 14" fill="none">
1
+ import{w as C}from"./core-f4taWsy5.js";import"./index-DN2JqH-l.js";import"./events-CjOrSHaz.js";import"./index.es-MXG0VeeZ.js";import"./index-nibyPLVP.js";import"./index.es-BEAksKXY.js";const p=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{p as imageSvg};
@@ -1 +1 @@
1
- import{a as p}from"./wait-for-tx-receipt-BWZbdlKf.js";import{v as h}from"./signing-CQ15XHyj.js";import{a as m,s as f}from"./send-batch-transaction-DexqN5g2.js";import{L as b}from"./utils-B3vUvlNq.js";import{r as g}from"./wallets-CCAGQYIy.js";import"./sleep-mAKpSMLY.js";import"./index-DlDkzdhK.js";import"./hashTypedData-621x-e3F.js";import"./events-BSf9wyey.js";import"./index.es-B3ObrDkW.js";import"./index-nibyPLVP.js";import"./ethereum-Bb-GI0c-.js";const u=new b(1e3);async function B(i){const{account:n,calls:l}=i,o=l.map(a=>({...a,chain:i.chain})),s=[],c=g(65);if(u.set(c,s),n.sendBatchTransaction){const a=await m({account:n,transactions:o});s.push(a.transactionHash),u.set(c,s)}else for(const a of o){const r=await f({account:n,transaction:a});s.push(r.transactionHash),u.set(c,s)}return c}async function R(i){const{chain:n,client:l,id:o}=i,s=u.get(o);if(!s)throw new Error("Failed to get calls status, unknown bundle id");const c=h({chain:n,client:l});let a="success";const r=await Promise.all(s.map(d=>p(c,{hash:d}).then(t=>({blockHash:t.blockHash,blockNumber:t.blockNumber,gasUsed:t.gasUsed,logs:t.logs.map(e=>({address:e.address,data:e.data,topics:e.topics})),status:t.status,transactionHash:t.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 W(i){const{chain:n,client:l,id:o}=i,s=u.get(o);if(!s)throw new Error("Failed to get calls status, unknown bundle id");const c=h({chain:n,client:l});let a=200;const r=[];for(const d of s)try{const t=await p(c,{hash:d});r.push({blockHash:t.blockHash,blockNumber:`0x${t.blockNumber.toString(16)}`,gasUsed:`0x${t.gasUsed.toString(16)}`,logs:t.logs.map(e=>({address:e.address,data:e.data,topics:e.topics})),status:t.status==="success"?"0x1":"0x0",transactionHash:t.transactionHash})}catch{a=100}return{atomic:!1,chainId:`0x${n.id.toString(16)}`,id:o,receipts:r,status:a,version:"2.0.0"}}export{R as inAppWalletGetCallsStatus,W as inAppWalletGetCallsStatusRaw,B as inAppWalletSendCalls};
1
+ import{a as p}from"./wait-for-tx-receipt-pc2BJc62.js";import{v as h}from"./signing-B1K_Jdsm.js";import{a as m,s as f}from"./send-batch-transaction-DfUNUZ4Z.js";import{L as b}from"./utils-B3vUvlNq.js";import{r as g}from"./wallets-Dj6CY1yi.js";import"./sleep-mAKpSMLY.js";import"./index-DN2JqH-l.js";import"./hashTypedData-7WNMs5EV.js";import"./events-CjOrSHaz.js";import"./index.es-MXG0VeeZ.js";import"./index-nibyPLVP.js";import"./ethereum-Bb-GI0c-.js";const u=new b(1e3);async function B(i){const{account:n,calls:l}=i,o=l.map(a=>({...a,chain:i.chain})),s=[],c=g(65);if(u.set(c,s),n.sendBatchTransaction){const a=await m({account:n,transactions:o});s.push(a.transactionHash),u.set(c,s)}else for(const a of o){const r=await f({account:n,transaction:a});s.push(r.transactionHash),u.set(c,s)}return c}async function R(i){const{chain:n,client:l,id:o}=i,s=u.get(o);if(!s)throw new Error("Failed to get calls status, unknown bundle id");const c=h({chain:n,client:l});let a="success";const r=await Promise.all(s.map(d=>p(c,{hash:d}).then(t=>({blockHash:t.blockHash,blockNumber:t.blockNumber,gasUsed:t.gasUsed,logs:t.logs.map(e=>({address:e.address,data:e.data,topics:e.topics})),status:t.status,transactionHash:t.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 W(i){const{chain:n,client:l,id:o}=i,s=u.get(o);if(!s)throw new Error("Failed to get calls status, unknown bundle id");const c=h({chain:n,client:l});let a=200;const r=[];for(const d of s)try{const t=await p(c,{hash:d});r.push({blockHash:t.blockHash,blockNumber:`0x${t.blockNumber.toString(16)}`,gasUsed:`0x${t.gasUsed.toString(16)}`,logs:t.logs.map(e=>({address:e.address,data:e.data,topics:e.topics})),status:t.status==="success"?"0x1":"0x0",transactionHash:t.transactionHash})}catch{a=100}return{atomic:!1,chainId:`0x${n.id.toString(16)}`,id:o,receipts:r,status:a,version:"2.0.0"}}export{R as inAppWalletGetCallsStatus,W as inAppWalletGetCallsStatusRaw,B as inAppWalletSendCalls};