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

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 (303) hide show
  1. package/assets/QueryClientProvider-mZKMZTwe.js +2 -0
  2. package/assets/RoobertPRO-Bold-DDyOqNrI.woff2 +0 -0
  3. package/assets/SignInRedirect-CXUOqOjy.js +11 -0
  4. package/assets/X-3yocgepi.js +15 -0
  5. package/assets/___vite-browser-external_commonjs-proxy-BqV5D26a.js +1 -0
  6. package/assets/__federation_expose_App-CMGDAIUH.js +1 -0
  7. package/assets/__federation_fn_import-C51lglKS.js +1 -0
  8. package/assets/__federation_shared_@dcl/hooks-Dm9PRmKy.js +535 -0
  9. package/assets/__federation_shared_@dcl/schemas-CVwtHlVJ.js +1 -0
  10. package/assets/__federation_shared_@emotion/react-AmEOkpjC.js +1 -0
  11. package/assets/__federation_shared_@emotion/styled-aZ9bk9Xh.js +1 -0
  12. package/assets/__federation_shared_@reduxjs/toolkit-DIZvwqf7.js +1 -0
  13. package/assets/__federation_shared_decentraland-ui2-KxrbFOTA.js +358 -0
  14. package/assets/__federation_shared_react-B3tlNTLg.js +1 -0
  15. package/assets/__federation_shared_react-dom-CCS4dT_K.js +1 -0
  16. package/assets/__federation_shared_react-redux-Ckcz2edF.js +13 -0
  17. package/assets/__federation_shared_react-router-dom-jUWpDOjR.js +49 -0
  18. package/assets/__federation_shared_viem-Cdp7wK0V.js +2 -0
  19. package/assets/__federation_shared_wagmi-CHWRoybR.js +17 -0
  20. package/assets/__vite-optional-peer-dep_lottie-react_decentraland-ui2-BIHI7g3E.js +1 -0
  21. package/assets/_commonjsHelpers-C4iS2aBk.js +1 -0
  22. package/assets/{add-zf09jsz8.js → add-DHMb_tRw.js} +2 -2
  23. package/assets/all-wallets-Bo3QRxXL.js +6 -0
  24. package/assets/{app-store-C64E-ygN.js → app-store-BHwDXU8D.js} +2 -2
  25. package/assets/{apple-B11br0RG.js → apple-BFX-plRw.js} +2 -2
  26. package/assets/arrow-bottom-Djx9NXV2.js +8 -0
  27. package/assets/{arrow-bottom-circle-BYISwBN-.js → arrow-bottom-circle-DcJnW2eo.js} +2 -2
  28. package/assets/arrow-left-BS_dJGSP.js +8 -0
  29. package/assets/arrow-right-B-mwy0Iu.js +8 -0
  30. package/assets/arrow-top-Di1bbZG1.js +8 -0
  31. package/assets/auto-track-pkMvCaah.js +1 -0
  32. package/assets/{bank-q4oLVSZ1.js → bank-B9SMq-ix.js} +2 -2
  33. package/assets/{basic-CGdBHVeA.js → basic-DijYF-IW.js} +124 -124
  34. package/assets/biconomy-CCw3vtwR.js +1 -0
  35. package/assets/{browser-BH_NdFte.js → browser-CdKdszu-.js} +2 -2
  36. package/assets/{card-CU8Sx8aZ.js → card-CQu4Eu8c.js} +2 -2
  37. package/assets/ccip-AgQ5AD9v.js +1 -0
  38. package/assets/chains-D88UzVoE.js +1 -0
  39. package/assets/{checkmark-CJQv14xB.js → checkmark-D2vezo75.js} +2 -2
  40. package/assets/{checkmark-bold-yZPChLqH.js → checkmark-bold-DriAapzP.js} +2 -2
  41. package/assets/chevron-bottom-CcFEOVdH.js +8 -0
  42. package/assets/chevron-left-BXS-ybhL.js +8 -0
  43. package/assets/chevron-right-TvO5COya.js +8 -0
  44. package/assets/chevron-top-D84SgxMg.js +8 -0
  45. package/assets/{chrome-store-uudWD7dl.js → chrome-store-rpsfVQln.js} +2 -2
  46. package/assets/{clock-BtHKgq8x.js → clock-BMJ2gt7b.js} +2 -2
  47. package/assets/close-kAWkeKAP.js +8 -0
  48. package/assets/{coinPlaceholder-4wrqCYAs.js → coinPlaceholder-Dz8MKewa.js} +2 -2
  49. package/assets/common-D37S_OFt.js +1 -0
  50. package/assets/{compass-DfOzkjuQ.js → compass-BednEqu-.js} +2 -2
  51. package/assets/controller-D0Gc4Hsp.js +2 -0
  52. package/assets/{copy-BDn55LjS.js → copy-D7rBk-hZ.js} +2 -2
  53. package/assets/core-Bn8Mr-tS.js +907 -0
  54. package/assets/create-submenu-Bu20F8-Z.webp +0 -0
  55. package/assets/createBundlerClient-DhRCLsYO.js +4 -0
  56. package/assets/createClient-C9QPJaZu.js +1 -0
  57. package/assets/cursor-C8UG2IDe.js +3 -0
  58. package/assets/{cursor-transparent-B0-Mw3Y1.js → cursor-transparent-CyP0H3C5.js} +2 -2
  59. package/assets/decimals-B7Pm5rZk.js +1 -0
  60. package/assets/decimals-DedKFk8m.js +1 -0
  61. package/assets/defineChain-7I0Ce1VT.js +1 -0
  62. package/assets/{desktop-Cm0fPOoG.js → desktop-LBcRpcZE.js} +2 -2
  63. package/assets/detectExtension-C2uVeK-n.js +1 -0
  64. package/assets/{disconnect-BuA91iia.js → disconnect-DEBEe-yK.js} +2 -2
  65. package/assets/{discord-CEAkeZ_H.js → discord-BlVFKMf0.js} +2 -2
  66. package/assets/emotion-react.browser.esm-BzYQLDSp.js +8 -0
  67. package/assets/emotion-use-insertion-effect-with-fallbacks.browser.esm-TsHx33zg.js +1 -0
  68. package/assets/encode-DvvW4ZKt.js +2 -0
  69. package/assets/engine-CD7SeAap.js +1 -0
  70. package/assets/estimate-gas-CeHGaIbG.js +3 -0
  71. package/assets/estimate-l1-fee-ClMO5l7U.js +1 -0
  72. package/assets/eth_estimateGas-C2ENZ_HR.js +1 -0
  73. package/assets/eth_getStorageAt-BHgF2qz5.js +1 -0
  74. package/assets/eth_getTransactionCount-DWnnw2mX.js +1 -0
  75. package/assets/ethereum-dN7ENYl_.js +1 -0
  76. package/assets/{etherscan-WCjozDmo.js → etherscan-C_pqcV9R.js} +2 -2
  77. package/assets/events-B5inrCVE.js +1 -0
  78. package/assets/{exclamation-triangle-CXoNKPez.js → exclamation-triangle-R9Xq3IaG.js} +2 -2
  79. package/assets/explore-submenu-BFVuYMi9.webp +0 -0
  80. package/assets/{extension-BszEBTVU.js → extension-DkA_7Cbg.js} +2 -2
  81. package/assets/external-link-BPOw_fuW.js +8 -0
  82. package/assets/extractIPFS-B4LGER25.js +1 -0
  83. package/assets/{facebook-4SsNdpO8.js → facebook-CMZk_t1A.js} +2 -2
  84. package/assets/{farcaster-ayvvFuu8.js → farcaster-CveILPqa.js} +2 -2
  85. package/assets/fee-data-BKBGP5kG.js +1 -0
  86. package/assets/fetchTokenMetadata-BLDHgO8L.js +2 -0
  87. package/assets/{filters-CaJPoSbo.js → filters-BspTrZpX.js} +2 -2
  88. package/assets/get-ecosystem-wallet-info-D3PrM5FE.js +1 -0
  89. package/assets/getBalance-D7nzATjL.js +2 -0
  90. package/assets/getInstalledModules-Ck_Gj8FO.js +1 -0
  91. package/assets/getNFT-BcCS23O_.js +1 -0
  92. package/assets/getNFT-DXdMP0Q5.js +2 -0
  93. package/assets/{github-Agge6OPm.js → github-DoFHEMIF.js} +2 -2
  94. package/assets/{google-BCp2rRpD.js → google-NTQi9GVe.js} +2 -2
  95. package/assets/governance-submenu-VTIKvCIL.webp +0 -0
  96. package/assets/{help-circle-BglhVJJg.js → help-circle-DV0uNPdn.js} +2 -2
  97. package/assets/hex-B0Rx0hII.js +2 -0
  98. package/assets/{id-DJWOh1yx.js → id-UAVc1FOO.js} +1 -1
  99. package/assets/{image-XVP-TFUR.js → image-BeHBzCPG.js} +2 -2
  100. package/assets/in-app-wallet-calls-CvFtsXP9.js +1 -0
  101. package/assets/index-B2OCb4Ez.js +1 -0
  102. package/assets/index-B65z14KI.js +4 -0
  103. package/assets/index-BAhlRyDG.js +1 -0
  104. package/assets/{index-DOqN8xaU.js → index-BTtTX-5z.js} +1 -1
  105. package/assets/index-BjzJcZq6.js +1 -0
  106. package/assets/index-BjzJcZq6__bundled.js +24 -0
  107. package/assets/index-BozJS3za.js +12 -0
  108. package/assets/index-C05H8NDX.js +1 -0
  109. package/assets/index-C1IoT2if.js +3 -0
  110. package/assets/index-C2hdqzGT.js +2 -0
  111. package/assets/index-CgMDPZul.js +13 -0
  112. package/assets/index-CjuQOkbh.js +2 -0
  113. package/assets/index-CpR9p5nk.js +1 -0
  114. package/assets/index-D1lXZVQu.js +45 -0
  115. package/assets/index-D6ZAha0r.js +395 -0
  116. package/assets/{index-X-a697cI.js → index-DJ7GgcJ9.js} +2 -2
  117. package/assets/index-DajuSfcu.js +2 -0
  118. package/assets/index-DeklogZX.js +1 -0
  119. package/assets/index-DmAaXUNv.js +1 -0
  120. package/assets/index-Dy0yjznp.js +1 -0
  121. package/assets/index-Dy0yjznp__bundled.js +9 -0
  122. package/assets/index-HvoTJwGm.js +1 -0
  123. package/assets/index-MYKNZAUu.js +8 -0
  124. package/assets/index-Tsk25L8E.js +1 -0
  125. package/assets/index.es-C8Kfv-K1.js +11 -0
  126. package/assets/index.es-CAXGMBEH.js +1 -0
  127. package/assets/index.es-D3pP9hN4.js +27 -0
  128. package/assets/index.es-D5YKsq2-.js +2 -0
  129. package/assets/index.umd-DK712HHb.js +1 -0
  130. package/assets/{info-Ce-k8YeY.js → info-CzcA85TO.js} +2 -2
  131. package/assets/{info-circle-DWKsUP7S.js → info-circle-D3Mr3R9u.js} +2 -2
  132. package/assets/is-plan-event-enabled-DeNtQvA5.js +1 -0
  133. package/assets/json-BHzNJmTy.js +1 -0
  134. package/assets/jsx-runtime-DncYoG30.js +1 -0
  135. package/assets/jsx-runtime-DncYoG30__bundled.js +9 -0
  136. package/assets/learn-submenu-sfxVP5Db.webp +0 -0
  137. package/assets/{lightbulb-WJ_BxNVb.js → lightbulb-B2FZtM_8.js} +2 -2
  138. package/assets/localBatchGatewayRequest-BIEAG3VG.js +1 -0
  139. package/assets/{mail-KoHfgvFC.js → mail-CkhGbows.js} +2 -2
  140. package/assets/marketplace-submenu-CixWTv8_.webp +0 -0
  141. package/assets/{mobile-DgiOcfZl.js → mobile-1H3FtqAS.js} +2 -2
  142. package/assets/{more-DQ2sX7uC.js → more-CZiQi624.js} +2 -2
  143. package/assets/{network-placeholder-J46GlKpA.js → network-placeholder-DA2bm2rC.js} +2 -2
  144. package/assets/{nftPlaceholder-DJzkRgNi.js → nftPlaceholder-C9t5Ydxp.js} +2 -2
  145. package/assets/off-D8z0OQ3M.js +8 -0
  146. package/assets/op-gas-fee-reducer-CfxMcvXl.js +1 -0
  147. package/assets/openzeppelin-ZKz6sLW9.js +1 -0
  148. package/assets/ownerOf-D1aXOt9Q.js +1 -0
  149. package/assets/parseNft-LjEwmOst.js +2 -0
  150. package/assets/passkeys-CTJ4NPfL.js +1 -0
  151. package/assets/{play-store-DnrAN_Zk.js → play-store-_X5LrPwx.js} +2 -2
  152. package/assets/{plus-CG21jVu3.js → plus-JriDhMxt.js} +2 -2
  153. package/assets/preload-helper-BorDCKdG.js +1 -0
  154. package/assets/publicKeyToAddress-CxEKPAKT.js +1 -0
  155. package/assets/{qr-code-DCN5HoIC.js → qr-code-DaB080BF.js} +2 -2
  156. package/assets/{qr-overlay-DZM2US31.js → qr-overlay-CGnFhcTk.js} +1 -1
  157. package/assets/{recycle-horizontal-pV5cKVIC.js → recycle-horizontal-CGeFmMrT.js} +2 -2
  158. package/assets/redux-BNDF-Lt-.js +1 -0
  159. package/assets/{refresh-DDAlbnMR.js → refresh-Dgvxxw5C.js} +2 -2
  160. package/assets/remoteEntry.js +1 -0
  161. package/assets/{reown-logo-BgBTRPqh.js → reown-logo-CBX48aN9.js} +2 -2
  162. package/assets/resolveImplementation-Cb2bL1tx.js +1 -0
  163. package/assets/rich-text-react-renderer.es5-D_tE7AHo.js +2 -0
  164. package/assets/rpc-ti0b0r_u.js +3 -0
  165. package/assets/search-DamXBOxM.js +8 -0
  166. package/assets/secp256k1-UEF-yOzn.js +1 -0
  167. package/assets/{send-1sOEDYYV.js → send-BLpUSx_G.js} +2 -2
  168. package/assets/send-batch-transaction-DnH876GL.js +1 -0
  169. package/assets/send-eip712-transaction-D_FU-Avh.js +2 -0
  170. package/assets/send-gasless-transaction-MP1Q_mLW.js +2 -0
  171. package/assets/serializeTransaction-mtsVBaO6.js +1 -0
  172. package/assets/session-proposal-CM3P7DaL.js +1 -0
  173. package/assets/session-request-Dqw67u3p.js +2 -0
  174. package/assets/sha256-DYtpy1Qz.js +1 -0
  175. package/assets/signing-BFeVjjPi.js +5 -0
  176. package/assets/store-DOLZnwHk.js +1 -0
  177. package/assets/{swapHorizontal-DwtkaBY9.js → swapHorizontal-Br-MZ1tO.js} +2 -2
  178. package/assets/{swapHorizontalBold-DjH3VBED.js → swapHorizontalBold-CkUNbZ1G.js} +2 -2
  179. package/assets/{swapHorizontalMedium-B8m-zSxH.js → swapHorizontalMedium-D3qEQNb5.js} +2 -2
  180. package/assets/{swapHorizontalRoundedBold-CcKr4oU5.js → swapHorizontalRoundedBold-CzzBPCtt.js} +2 -2
  181. package/assets/{swapVertical-Vhgw_9G1.js → swapVertical-Mrn3zm_W.js} +2 -2
  182. package/assets/{telegram-CItwttXQ.js → telegram-ZTLC9FiA.js} +2 -2
  183. package/assets/thirdweb-CHfVLLbM.js +1 -0
  184. package/assets/thirdweb-D5ezTmuN.js +27 -0
  185. package/assets/{three-dots-DcElkEG2.js → three-dots-DYl4uQjm.js} +2 -2
  186. package/assets/totalSupply-B5jHW8gx.js +1 -0
  187. package/assets/tslib.es6-DbvBTznf.js +1 -0
  188. package/assets/{twitch-DIYf-ntg.js → twitch-DPLkA98Q.js} +2 -2
  189. package/assets/{twitterIcon-xMs4TJuA.js → twitterIcon-BEY_UAyG.js} +2 -2
  190. package/assets/uid-D00jCazq.js +44 -0
  191. package/assets/{uint8-array-CjVHUazS.js → uint8-array-DZKEMhA1.js} +1 -1
  192. package/assets/utils-C7urdXtO.js +2 -0
  193. package/assets/utils-CozXUO91.js +1 -0
  194. package/assets/{verify-CJQEOvVE.js → verify-DuPdiufm.js} +2 -2
  195. package/assets/{verify-filled-Dm46z2W0.js → verify-filled-CdqEW5AP.js} +2 -2
  196. package/assets/{w3m-modal-ime9_H71.js → w3m-modal-BLzhBUlF.js} +34 -34
  197. package/assets/wait-for-tx-receipt-B-o5aPQ8.js +1 -0
  198. package/assets/{wallet-DsKK0DZZ.js → wallet-CZw1g3L8.js} +2 -2
  199. package/assets/{wallet-placeholder-lVvJajkJ.js → wallet-placeholder-OAkoJuru.js} +2 -2
  200. package/assets/{walletconnect-BzBoiyAH.js → walletconnect-BJ3w7-IU.js} +4 -4
  201. package/assets/wallets-Q5RcRyG6.js +16 -0
  202. package/assets/{warning-circle-DPKmaE0h.js → warning-circle-DpDeOZKv.js} +2 -2
  203. package/assets/web-connector-CB7tpRui.js +9 -0
  204. package/assets/webSocket-dQW3n9NM.js +3 -0
  205. package/assets/withCache-DYumIHzL.js +1 -0
  206. package/assets/{x-DEpEErGT.js → x-liJqLZUi.js} +2 -2
  207. package/assets/zora-sepolia-DNJ2DQat.js +1 -0
  208. package/index.html +17 -3
  209. package/package.json +3 -3
  210. package/assets/RoobertPRO-Bold-BLoSpx-h.otf +0 -0
  211. package/assets/all-wallets-tVLLlnWi.js +0 -6
  212. package/assets/arrow-bottom-DifqQKT2.js +0 -8
  213. package/assets/arrow-left-DTR_KHWL.js +0 -8
  214. package/assets/arrow-right-DU6_D0VV.js +0 -8
  215. package/assets/arrow-top-B_CgJVlG.js +0 -8
  216. package/assets/auto-track-BxXPoe4g.js +0 -1
  217. package/assets/biconomy-6NHz5Iqa.js +0 -1
  218. package/assets/ccip-BfmMG-TS.js +0 -1
  219. package/assets/chains-BJ1WS73W.js +0 -1
  220. package/assets/chevron-bottom-DTs-26Eq.js +0 -8
  221. package/assets/chevron-left-CWQcI0TP.js +0 -8
  222. package/assets/chevron-right-zjZwGM3P.js +0 -8
  223. package/assets/chevron-top-DiPqYm2O.js +0 -8
  224. package/assets/close-C0UXp_W-.js +0 -8
  225. package/assets/common-B5-2TPMC.js +0 -1
  226. package/assets/controller-zOLBxAda.js +0 -2
  227. package/assets/core-FalccOZQ.js +0 -908
  228. package/assets/create-submenu-DEFVbrc5.png +0 -0
  229. package/assets/createBundlerClient-ceEjCqsz.js +0 -8
  230. package/assets/cursor-BQJeaiqW.js +0 -3
  231. package/assets/decimals-BBBuCBiH.js +0 -1
  232. package/assets/decimals-DrdfxUxV.js +0 -1
  233. package/assets/detectExtension-CTJS_83C.js +0 -1
  234. package/assets/engine-1bZj5J3h.js +0 -1
  235. package/assets/estimate-l1-fee-C9trXYSy.js +0 -1
  236. package/assets/eth_estimateGas-DylIsdQK.js +0 -1
  237. package/assets/eth_getStorageAt-D6adTFW0.js +0 -1
  238. package/assets/eth_getTransactionCount-BIhOSWd4.js +0 -1
  239. package/assets/ethereum-Bb-GI0c-.js +0 -1
  240. package/assets/events-BSf9wyey.js +0 -1
  241. package/assets/explore-submenu-KVl6Dc-h.png +0 -0
  242. package/assets/external-link-Dd_ZWmsS.js +0 -8
  243. package/assets/extractIPFS-GqdL13gj.js +0 -1
  244. package/assets/fetchTokenMetadata-BVwYMovl.js +0 -2
  245. package/assets/get-ecosystem-wallet-info-Q0K86GGt.js +0 -1
  246. package/assets/getBalance-B57AUVbe.js +0 -1
  247. package/assets/getInstalledModules-CAje9rp8.js +0 -1
  248. package/assets/getNFT-Bb-t59ds.js +0 -2
  249. package/assets/getNFT-CpvjLK0Y.js +0 -1
  250. package/assets/governance-submenu-CXxLX9nT.png +0 -0
  251. package/assets/hashTypedData-621x-e3F.js +0 -1
  252. package/assets/in-app-wallet-calls-C4soc9zT.js +0 -1
  253. package/assets/index-B1P0UjN9.js +0 -1
  254. package/assets/index-BAkdueH0.js +0 -1
  255. package/assets/index-CUn0wuu2.js +0 -2
  256. package/assets/index-CecZD-vJ.js +0 -395
  257. package/assets/index-CmTH1mn1.js +0 -1
  258. package/assets/index-D4HP5DQC.js +0 -1
  259. package/assets/index-DSxj-vNU.js +0 -3
  260. package/assets/index-DX_PNZlK.js +0 -2
  261. package/assets/index-DlDkzdhK.js +0 -895
  262. package/assets/index-DoKNVID8.js +0 -2
  263. package/assets/index-Dw1-bBaI.js +0 -1
  264. package/assets/index-LCDpDH8Q.js +0 -4
  265. package/assets/index-Mb-EqEoD.js +0 -23
  266. package/assets/index-VloZUDIL.js +0 -12
  267. package/assets/index-X1qL-0B0.js +0 -13
  268. package/assets/index.es-B3ObrDkW.js +0 -27
  269. package/assets/index.es-ClZCnaxS.js +0 -1
  270. package/assets/index.es-DqGsvA8g.js +0 -12
  271. package/assets/index.es-vOkXvnBD.js +0 -2
  272. package/assets/index.umd-CrjosV4X.js +0 -1
  273. package/assets/is-plan-event-enabled-DS1Agtkw.js +0 -1
  274. package/assets/learn-submenu-Xs1jOwfy.png +0 -0
  275. package/assets/localBatchGatewayRequest-DbABcKyV.js +0 -1
  276. package/assets/marketplace-submenu-CjxTqNhj.png +0 -0
  277. package/assets/off-Bx4KjNoN.js +0 -8
  278. package/assets/openzeppelin-CDBEZ0A6.js +0 -1
  279. package/assets/ownerOf-H_15UHmZ.js +0 -1
  280. package/assets/parseNft-C-gFG5mL.js +0 -2
  281. package/assets/passkeys-CqFedyqV.js +0 -1
  282. package/assets/resolveImplementation--0Bj03XB.js +0 -1
  283. package/assets/rpc-BMTq3WxT.js +0 -3
  284. package/assets/search-F5Kt2PDD.js +0 -8
  285. package/assets/secp256k1-D0j47cev.js +0 -1
  286. package/assets/secp256k1-DTovG4r4.js +0 -1
  287. package/assets/secp256k1-HF3nQqZj.js +0 -1
  288. package/assets/send-batch-transaction-DexqN5g2.js +0 -1
  289. package/assets/send-eip712-transaction-CzOG_yjy.js +0 -2
  290. package/assets/send-gasless-transaction-BerY-rcr.js +0 -2
  291. package/assets/session-proposal-BxP6Eg-Q.js +0 -1
  292. package/assets/session-request-BmUVvzLs.js +0 -2
  293. package/assets/sha256-CBZo01eO.js +0 -1
  294. package/assets/signing-CQ15XHyj.js +0 -30
  295. package/assets/thirdweb-BEvIP-fy.js +0 -27
  296. package/assets/thirdweb-DZ2vK6IO.js +0 -1
  297. package/assets/totalSupply-DYVdetcS.js +0 -1
  298. package/assets/utils-B3vUvlNq.js +0 -1
  299. package/assets/wait-for-tx-receipt-BWZbdlKf.js +0 -1
  300. package/assets/wallets-CCAGQYIy.js +0 -17
  301. package/assets/web-connector-BiJHWbvm.js +0 -9
  302. package/assets/zora-sepolia-CZ4Tf1UH.js +0 -1
  303. package/dcl-blog-site-0.2.2-23649734878.commit-de1a383.tgz +0 -0
@@ -1 +0,0 @@
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 +0,0 @@
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,2 +0,0 @@
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 +0,0 @@
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 +0,0 @@
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 +0,0 @@
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 +0,0 @@
1
- var p=Object.defineProperty;var u=(e,t,i)=>t in e?p(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i;var l=(e,t,i)=>u(e,typeof t!="symbol"?t+"":t,i);import{a as g,j as h}from"./index-X-a697cI.js";var E=(e=>(e.Start="magic_oauth_login_with_redirect_start",e.Verify="magic_oauth_login_with_redirect_verify",e.Popup="magic_oauth_login_with_popup",e.VerifyTelegramData="magic_oauth_verify_telegram_data",e))(E||{}),v=(e=>(e.InvalidRequest="invalid_request",e.InvalidClient="invalid_client",e.InvalidScope="invalid_scope",e.InvalidGrant="invalid_grant",e.UnauthorizedClient="unauthorized_client",e.UnsupportedResponseType="unsupported_response_type",e.UnsupportedGrantType="unsupported_grant_type",e.UnsupportedTokenType="unsupported_token_type",e.AccessDenied="access_denied",e.ServerError="server_error",e.TemporarilyUnavailable="temporarily_unavailable",e))(v||{}),y=(e=>(e.MissingApiKey="MISSING_API_KEY",e.ModalNotReady="MODAL_NOT_READY",e.ConnectionLost="CONNECTION_WAS_LOST",e.MalformedResponse="MALFORMED_RESPONSE",e.InvalidArgument="INVALID_ARGUMENT",e.ExtensionNotInitialized="EXTENSION_NOT_INITIALIZED",e.IncompatibleExtensions="INCOMPATIBLE_EXTENSIONS",e))(y||{}),I=(e=>(e.SyncWeb3Method="SYNC_WEB3_METHOD",e.DuplicateIframe="DUPLICATE_IFRAME",e.ReactNativeEndpointConfiguration="REACT_NATIVE_ENDPOINT_CONFIGURATION",e.DeprecationNotice="DEPRECATION_NOTICE",e.ProductAnnouncement="ANNOUNCEMENT",e))(I||{}),f=(e=>(e[e.ParseError=-32700]="ParseError",e[e.InvalidRequest=-32600]="InvalidRequest",e[e.MethodNotFound=-32601]="MethodNotFound",e[e.InvalidParams=-32602]="InvalidParams",e[e.InternalError=-32603]="InternalError",e[e.MagicLinkFailedVerification=-1e4]="MagicLinkFailedVerification",e[e.MagicLinkExpired=-10001]="MagicLinkExpired",e[e.MagicLinkRateLimited=-10002]="MagicLinkRateLimited",e[e.MagicLinkInvalidRedirectURL=-10006]="MagicLinkInvalidRedirectURL",e[e.UserAlreadyLoggedIn=-10003]="UserAlreadyLoggedIn",e[e.UpdateEmailFailed=-10004]="UpdateEmailFailed",e[e.UserRequestEditEmail=-10005]="UserRequestEditEmail",e[e.InactiveRecipient=-10010]="InactiveRecipient",e[e.AccessDeniedToUser=-10011]="AccessDeniedToUser",e[e.RedirectLoginComplete=-10015]="RedirectLoginComplete",e[e.DpopInvalidated=-10019]="DpopInvalidated",e))(f||{}),R=(e=>(e.PROVIDER="magic_3pw_provider",e.ADDRESS="magic_3pw_address",e.CHAIN_ID="magic_3pw_chainId",e))(R||{}),A=(e=>(e.WalletConnected="wallet_connected",e.WalletRejected="wallet_rejected",e.Web3ModalSelected="web3modal_selected",e))(A||{}),M=(e=>(e.LoginWithSms="magic_auth_login_with_sms",e.LoginWithEmailOTP="magic_auth_login_with_email_otp",e.LoginWithMagicLink="magic_auth_login_with_magic_link",e.LoginWithCredential="magic_auth_login_with_credential",e.SetAuthorizationToken="magic_auth_set_authorization_token",e.GetIdToken="magic_auth_get_id_token",e.GenerateIdToken="magic_auth_generate_id_token",e.GetMetadata="magic_auth_get_metadata",e.IsLoggedIn="magic_is_logged_in",e.Logout="magic_auth_logout",e.UpdateEmail="magic_auth_update_email",e.UserSettings="magic_auth_settings",e.UserSettingsTestMode="magic_auth_settings_testing_mode",e.LoginWithSmsTestMode="magic_auth_login_with_sms_testing_mode",e.LoginWithEmailOTPTestMode="magic_auth_login_with_email_otp_testing_mode",e.LoginWithMagicLinkTestMode="magic_login_with_magic_link_testing_mode",e.LoginWithCredentialTestMode="magic_auth_login_with_credential_testing_mode",e.GetIdTokenTestMode="magic_auth_get_id_token_testing_mode",e.GenerateIdTokenTestMode="magic_auth_generate_id_token_testing_mode",e.GetMetadataTestMode="magic_auth_get_metadata_testing_mode",e.IsLoggedInTestMode="magic_auth_is_logged_in_testing_mode",e.LogoutTestMode="magic_auth_logout_testing_mode",e.UpdateEmailTestMode="magic_auth_update_email_testing_mode",e.IntermediaryEvent="magic_intermediary_event",e.RequestAccounts="eth_requestAccounts",e.GetInfo="magic_get_info",e.ShowUI="magic_wallet",e.NFTPurchase="magic_nft_purchase",e.NFTCheckout="magic_nft_checkout",e.NFTTransfer="magic_nft_transfer",e.RequestUserInfoWithUI="mc_request_user_info",e.Disconnect="mc_disconnect",e.RecoverAccount="magic_auth_recover_account",e.RecoverAccountTestMode="magic_auth_recover_account_testing_mode",e.MagicBoxHeartBeat="magic_box_heart_beat",e.AutoConnect="mc_auto_connect",e.Login="mc_login",e.EncryptV1="magic_auth_encrypt_v1",e.DecryptV1="magic_auth_decrypt_v1",e.ShowNFTs="magic_show_nfts",e.ShowOnRamp="magic_show_fiat_onramp",e.ShowSendTokensUI="magic_show_send_tokens_ui",e.ShowAddress="magic_show_address",e.ShowBalances="magic_show_balances",e.SendGaslessTransaction="eth_sendGaslessTransaction",e.RevealPK="magic_reveal_key",e.EnableMFA="magic_auth_enable_mfa_flow",e.DisableMFA="magic_auth_disable_mfa_flow",e.GetMultichainPublicAddress="magic_get_multichain_public_address",e))(M||{}),w=(e=>(e.MAGIC_HANDLE_RESPONSE="MAGIC_HANDLE_RESPONSE",e.MAGIC_OVERLAY_READY="MAGIC_OVERLAY_READY",e.MAGIC_SHOW_OVERLAY="MAGIC_SHOW_OVERLAY",e.MAGIC_HIDE_OVERLAY="MAGIC_HIDE_OVERLAY",e.MAGIC_HANDLE_EVENT="MAGIC_HANDLE_EVENT",e.MAGIC_MG_BOX_SEND_RECEIPT="MAGIC_MG_BOX_SEND_RECEIPT",e.MAGIC_SEND_PRODUCT_ANNOUNCEMENT="MAGIC_SEND_PRODUCT_ANNOUNCEMENT",e.MAGIC_PONG="MAGIC_PONG",e.MAGIC_POPUP_RESPONSE="MAGIC_POPUP_RESPONSE",e.MAGIC_POPUP_OAUTH_VERIFY_RESPONSE="MAGIC_POPUP_OAUTH_VERIFY_RESPONSE",e))(w||{}),C=(e=>(e.MAGIC_HANDLE_REQUEST="MAGIC_HANDLE_REQUEST",e.MAGIC_PING="MAGIC_PING",e))(C||{}),N=(e=>(e.UpdateEmail="update-email",e.MFA="mfa",e.Recovery="recovery",e))(N||{}),S=(e=>(e.Retry="retry",e))(S||{}),O=(e=>(e.EmailSent="email-sent",e.EmailNotDeliverable="email-not-deliverable",e))(O||{}),T=(e=>(e.VerifyEmailOtp="verify-email-otp",e.VerifyMFACode="verify-mfa-code",e.LostDevice="lost-device",e.VerifyRecoveryCode="verify-recovery-code",e.Cancel="cancel",e))(T||{}),U=(e=>(e.VerifySmsOtp="verify-sms-otp",e.Cancel="cancel",e.Retry="retry",e))(U||{}),P=(e=>(e.SmsOTPSent="sms-otp-sent",e.InvalidSmsOtp="invalid-sms-otp",e.ExpiredSmsOtp="expired-sms-otp",e))(P||{}),L=(e=>(e.EmailOTPSent="email-otp-sent",e.InvalidEmailOtp="invalid-email-otp",e.InvalidMfaOtp="invalid-mfa-otp",e.ExpiredEmailOtp="expired-email-otp",e.MfaSentHandle="mfa-sent-handle",e.RecoveryCodeSentHandle="recovery-code-sent-handle",e.InvalidRecoveryCode="invalid-recovery-code",e.RecoveryCodeSuccess="recovery-code-success",e.LoginThrottled="login-throttled",e.MaxAttemptsReached="max-attempts-reached",e))(L||{}),D=(e=>(e.Retry="device-retry",e))(D||{}),k=(e=>(e.DeviceApproved="device-approved",e.DeviceNeedsApproval="device-needs-approval",e.DeviceVerificationLinkExpired="device-verification-link-expired",e.DeviceVerificationEmailSent="device-verification-email-sent",e))(k||{}),G=(e=>(e.Retry="Recency/auth-factor-retry",e.Cancel="Recency/auth-factor-verification-cancel",e.VerifyEmailOtp="Recency/auth-factor-verify-email-otp",e.VerifyMFACode="Recency/verify-mfa-code",e))(G||{}),b=(e=>(e.PrimaryAuthFactorNeedsVerification="Recency/auth-factor-needs-verification",e.PrimaryAuthFactorVerified="Recency/auth-factor-verified",e.InvalidEmailOtp="Recency/auth-factor-invalid-email-otp",e.EmailExpired="Recency/auth-factor-verification-email-expired",e.EmailSent="Recency/auth-factor-verification-email-sent",e.EmailNotDeliverable="Recency/auth-factor-verification-email-not-deliverable",e))(b||{}),F=(e=>(e.RetryWithNewEmail="UpdateEmail/retry-with-new-email",e.Cancel="UpdateEmail/new-email-verification-cancel",e.VerifyEmailOtp="UpdateEmail/new-email-verify-otp",e))(F||{}),V=(e=>(e.NewAuthFactorNeedsVerification="UpdateEmail/new-email-needs-verification",e.EmailUpdated="UpdateEmail/email-updated",e.InvalidEmailOtp="UpdateEmail/new-email-invalid-email-otp",e.EmailExpired="UpdateEmail/new-email-verification-email-expired",e.EmailSent="UpdateEmail/new-email-verification-email-sent",e.EmailNotDeliverable="UpdateEmail/new-email-verification-email-not-deliverable",e.InvalidEmail="UpdateEmail/new-email-invalid",e.EmailAlreadyExists="UpdateEmail/new-email-already-exists",e))(V||{}),x=(e=>(e.IDTokenCreated="Auth/id-token-created",e))(x||{}),W=(e=>(e.Cancel="Farcaster/cancel",e))(W||{}),q=(e=>(e.MFASecretGenerated="mfa-secret-generated",e.InvalidMFAOtp="invalid-mfa-otp",e.MFARecoveryCodes="mfa-recovery-codes",e))(q||{}),H=(e=>(e.VerifyMFACode="verify-mfa-code",e.Cancel="cancel-mfa-setup",e))(H||{}),Y=(e=>(e.MFACodeRequested="mfa-code-requested",e.InvalidMFAOtp="invalid-mfa-otp",e.InvalidRecoveryCode="invalid-recovery-code",e))(Y||{}),B=(e=>(e.VerifyMFACode="verify-mfa-code",e.LostDevice="lost-device",e.Cancel="cancel-mfa-disable",e))(B||{}),K=(e=>(e.Harmony="HARMONY",e))(K||{}),z=(e=>(e.ClosedByUser="closed-by-user",e))(z||{}),j=(e=>(e.ClosedByUser="closed-by-user-on-received",e))(j||{}),J=(e=>(e.EnterNewPhoneNumber="enter-new-phone-number",e.EnterOtpCode="enter-otp-code",e.RecoveryFactorAlreadyExists="recovery-factor-already-exists",e.MalformedPhoneNumber="malformed-phone-number",e.InvalidOtpCode="invalid-otp-code",e.RecoveryFactorUpdated="recovery-factor-updated",e.RecoveryFactorDeleted="recovery-factor-deleted",e))(J||{}),X=(e=>(e.SendNewPhoneNumber="send-new-phone-number",e.SendOtpCode="send-otp-code",e.Cancel="cancel",e.StartEditPhoneNumber="start-edit-phone-number",e))(X||{}),Q=(e=>(e.PhoneNumber="phone_number",e))(Q||{}),$=(e=>(e.SmsOtpSent="sms-otp-sent",e.LoginThrottled="login-throttled",e.InvalidSmsOtp="invalid-sms-otp",e.SmsVerified="sms-verified",e.AccountRecovered="account-recovered",e.UpdateEmailRequired="update-email-required",e))($||{}),Z=(e=>(e.Cancel="cancel",e.VerifyOtp="verify-otp-code",e.ResendSms="resend-sms-otp",e.UpdateEmail="update-email",e))(Z||{}),ee=(e=>(e.Success="nft-checkout-success",e.Failure="nft-checkout-failure",e.Initiated="nft-checkout-initiated",e.Disconnect="disconnect",e))(ee||{}),te=(e=>(e.WalletInfoFetched="Wallet/wallet-info-fetched",e))(te||{}),ie=(e=>(e.CloseMagicWindow="close-magic-window",e))(ie||{}),m=(e=>(e.PopupUrl="popup-url",e))(m||{}),s=(e=>(e.PopupEvent="popup-event",e.Cancel="cancel",e))(s||{}),ne=class extends g.Internal{constructor(){super();l(this,"name","oauth2");l(this,"config",{});l(this,"compat",{"magic-sdk":">=2.4.6","@magic-sdk/react-native":!1,"@magic-sdk/react-native-bare":!1,"@magic-sdk/react-native-expo":!1});this.seamlessTelegramLogin()}loginWithRedirect(t){return this.utils.createPromiEvent(async(i,r)=>{let c=this.utils.createJsonRpcRequestPayload("magic_oauth_login_with_redirect_start",[{...t,apiKey:this.sdk.apiKey,platform:"web"}]),n=await this.request(c),a=n,o=n;if(o.error&&r(this.createError(o.error,o.error_description??"An error occurred.",{errorURI:o.error_uri,provider:o.provider})),a==null?void 0:a.oauthAuthoriationURI){let d=a.useMagicServerCallback?new URL(a.oauthAuthoriationURI,this.sdk.endpoint).href:a.oauthAuthoriationURI;a!=null&&a.shouldReturnURI?i(d):window.location.href=d}i(null)})}getRedirectResult(t={}){let i=(t==null?void 0:t.optionalQueryString)||window.location.search,r=window.location.origin+window.location.pathname;return window.history.replaceState(null,"",r),ae.call(this,t,i)}loginWithPopup(t){let i=this.utils.createJsonRpcRequestPayload("magic_oauth_login_with_popup",[{...t,returnTo:window.location.href,apiKey:this.sdk.apiKey,platform:"web"}]),r=h(async(c,n)=>{try{let a=this.request(i),o=_=>{this.createIntermediaryEvent(s.PopupEvent,i.id)(_.data)};t.shouldReturnURI&&a.on(m.PopupUrl,_=>{window.addEventListener("message",o),r.emit(m.PopupUrl,_)});let d=await a;window.removeEventListener("message",o),d.error?n(d):c(d)}catch(a){n(a)}});return r.on(s.Cancel,()=>{this.createIntermediaryEvent(s.Cancel,i.id)()}),r}seamlessTelegramLogin(){try{if(!window.location.hash.toString().includes("#tgWebAppData"))return;let t=document.createElement("script");t.src="https://telegram.org/js/telegram-web-app.js",document.head.prepend(t),t.onload=async()=>{var i;try{let r=(i=window.Telegram)==null?void 0:i.WebApp.initData,c=this.utils.createJsonRpcRequestPayload("magic_oauth_verify_telegram_data",[{userData:r,isMiniApp:!0}]);await this.request(c)}catch(r){console.log("Error while verifying telegram data",r)}}}catch(t){console.log("Error while loading telegram-web-app script",t)}}};function ae(e,t){return this.utils.createPromiEvent(async(i,r)=>{let c=this.utils.createJsonRpcRequestPayload("magic_oauth_login_with_redirect_verify",[{authorizationResponseParams:t,magicApiKey:this.sdk.apiKey,platform:"web",...e}]),n=await this.request(c),a=n,o=n;o.error&&r(this.createError(o.error,o.error_description??"An error occurred.",{errorURI:o.error_uri,provider:o.provider})),i(a)})}export{v as OAuthErrorCode,ne as OAuthExtension,E as OAuthPayloadMethods};
@@ -1 +0,0 @@
1
- import{a as s}from"./index-DlDkzdhK.js";import{i as c}from"./is-plan-event-enabled-DS1Agtkw.js";function l(r,u){var i,n;if(!r||!Object.keys(r))return{};var o=r.integrations?Object.keys(r.integrations).filter(function(e){return r.integrations[e]===!1}):[],a=[];return((i=u.remotePlugins)!==null&&i!==void 0?i:[]).forEach(function(e){o.forEach(function(t){e.creationName==t&&a.push(e.name)})}),((n=u.remotePlugins)!==null&&n!==void 0?n:[]).reduce(function(e,t){return t.settings.subscriptions&&a.includes(t.name)&&t.settings.subscriptions.forEach(function(f){return e["".concat(t.name," ").concat(f.partnerAction)]=!1}),e},{})}function v(r,u){function i(n){var o=r,a=n.event.event;if(o&&a){var e=o[a];if(c(o,e)){var t=l(e,u);n.updateEvent("integrations",s(s(s({},n.event.integrations),e==null?void 0:e.integrations),t))}else return n.updateEvent("integrations",s(s({},n.event.integrations),{All:!1,"Segment.io":!0})),n}return n}return{name:"Schema Filter",version:"0.1.0",isLoaded:function(){return!0},load:function(){return Promise.resolve()},type:"before",page:i,alias:i,track:i,identify:i,group:i}}export{v as schemaFilter};
@@ -1,2 +0,0 @@
1
- const __vite__fileDeps=["assets/auto-track-BxXPoe4g.js","assets/index-DlDkzdhK.js","assets/inherits_browser-BlmhoU4v.js","assets/index-Dw1-bBaI.js","assets/index-CmTH1mn1.js","assets/is-plan-event-enabled-DS1Agtkw.js","assets/index-DX_PNZlK.js","assets/index-BAkdueH0.js","assets/index-D4HP5DQC.js"],__vite__mapDeps=i=>i.map(i=>__vite__fileDeps[i]);
2
- import{_ as L,a as f,b as Ht,c as C,d as y,e as g,f as M,g as q}from"./index-DlDkzdhK.js";import{i as se}from"./inherits_browser-BlmhoU4v.js";function Xe(e,t,r){t.split&&(t=t.split("."));for(var n=0,i=t.length,o=e,a,u;n<i&&(u=""+t[n++],!(u==="__proto__"||u==="constructor"||u==="prototype"));)o=o[u]=n===i?r:typeof(a=o[u])==typeof t?a:t[n]*0!==0||~(""+t[n]).indexOf(".")?{}:[]}var Nr=function(e,t){return Object.keys(e).filter(function(r){return t(r,e[r])}).reduce(function(r,n){return r[n]=e[n],r},{})},oe=function(e){L(t,e);function t(r,n){var i=e.call(this,"".concat(r," ").concat(n))||this;return i.field=r,i}return t}(Error);function ee(e){return typeof e=="string"}function Ze(e){return typeof e=="number"}function he(e){return typeof e=="function"}function Lr(e){return e!=null}function U(e){return Object.prototype.toString.call(e).slice(8,-1).toLowerCase()==="object"}var st="is not a string",ct="is not an object",Rr="is nil";function qr(e){if(!Lr(e))throw new oe("Event",Rr);if(typeof e!="object")throw new oe("Event",ct)}function Ur(e){if(!ee(e.type))throw new oe(".type",st)}function zr(e){if(!ee(e.event))throw new oe(".event",st)}function Br(e){if(!U(e.properties))throw new oe(".properties",ct)}function Kr(e){if(!U(e.traits))throw new oe(".traits",ct)}function $r(e){if(!ee(e.messageId))throw new oe(".messageId",st)}function Vr(e){qr(e),Ur(e),$r(e),e.type==="track"&&(zr(e),Br(e)),["group","identify"].includes(e.type)&&Kr(e)}var Gr=function(){function e(t){var r,n;this.settings=t,this.createMessageId=t.createMessageId,this.onEventMethodCall=(r=t.onEventMethodCall)!==null&&r!==void 0?r:function(){},this.onFinishedEvent=(n=t.onFinishedEvent)!==null&&n!==void 0?n:function(){}}return e}(),Jr=function(){function e(t){this.settings=new Gr(t)}return e.prototype.track=function(t,r,n,i){return this.settings.onEventMethodCall({type:"track",options:n}),this.normalize(f(f({},this.baseEvent()),{event:t,type:"track",properties:r??{},options:f({},n),integrations:f({},i)}))},e.prototype.page=function(t,r,n,i,o){var a;this.settings.onEventMethodCall({type:"page",options:i});var u={type:"page",properties:f({},n),options:f({},i),integrations:f({},o)};return t!==null&&(u.category=t,u.properties=(a=u.properties)!==null&&a!==void 0?a:{},u.properties.category=t),r!==null&&(u.name=r),this.normalize(f(f({},this.baseEvent()),u))},e.prototype.screen=function(t,r,n,i,o){this.settings.onEventMethodCall({type:"screen",options:i});var a={type:"screen",properties:f({},n),options:f({},i),integrations:f({},o)};return t!==null&&(a.category=t),r!==null&&(a.name=r),this.normalize(f(f({},this.baseEvent()),a))},e.prototype.identify=function(t,r,n,i){return this.settings.onEventMethodCall({type:"identify",options:n}),this.normalize(f(f({},this.baseEvent()),{type:"identify",userId:t,traits:r??{},options:f({},n),integrations:i}))},e.prototype.group=function(t,r,n,i){return this.settings.onEventMethodCall({type:"group",options:n}),this.normalize(f(f({},this.baseEvent()),{type:"group",traits:r??{},options:f({},n),integrations:f({},i),groupId:t}))},e.prototype.alias=function(t,r,n,i){this.settings.onEventMethodCall({type:"alias",options:n});var o={userId:t,type:"alias",options:f({},n),integrations:f({},i)};return r!==null&&(o.previousId=r),t===void 0?this.normalize(f(f({},o),this.baseEvent())):this.normalize(f(f({},this.baseEvent()),o))},e.prototype.baseEvent=function(){return{integrations:{},options:{}}},e.prototype.context=function(t){var r,n=["userId","anonymousId","timestamp","messageId"];delete t.integrations;var i=Object.keys(t),o=(r=t.context)!==null&&r!==void 0?r:{},a={};return i.forEach(function(u){u!=="context"&&(n.includes(u)?Xe(a,u,t[u]):Xe(o,u,t[u]))}),[o,a]},e.prototype.normalize=function(t){var r,n,i=Object.keys((r=t.integrations)!==null&&r!==void 0?r:{}).reduce(function(p,h){var v,m;return f(f({},p),(v={},v[h]=!!(!((m=t.integrations)===null||m===void 0)&&m[h]),v))},{});t.options=Nr(t.options||{},function(p,h){return h!==void 0});var o=f(f({},i),(n=t.options)===null||n===void 0?void 0:n.integrations),a=t.options?this.context(t.options):[],u=a[0],s=a[1],c=t.options,l=Ht(t,["options"]),d=f(f(f(f({timestamp:new Date},l),{context:u,integrations:o}),s),{messageId:c.messageId||this.settings.createMessageId()});return this.settings.onFinishedEvent(d),Vr(d),d},e}();function Wr(e,t){return new Promise(function(r,n){var i=setTimeout(function(){n(Error("Promise timed out"))},t);e.then(function(o){return clearTimeout(i),r(o)}).catch(n)})}function Qr(e){return new Promise(function(t){return setTimeout(t,e)})}function Hr(e,t,r){var n=function(){try{return Promise.resolve(t(e))}catch(i){return Promise.reject(i)}};return Qr(r).then(function(){return Wr(n(),1e3)}).catch(function(i){e==null||e.log("warn","Callback Error",{error:i}),e==null||e.stats.increment("callback_error")}).then(function(){return e})}var Xt=function(){var e,t,r=!1,n=new Promise(function(i,o){e=function(){for(var a=[],u=0;u<arguments.length;u++)a[u]=arguments[u];r=!0,i.apply(void 0,a)},t=function(){for(var a=[],u=0;u<arguments.length;u++)a[u]=arguments[u];r=!0,o.apply(void 0,a)}});return{resolve:e,reject:t,promise:n,isSettled:function(){return r}}},lt=function(){function e(t){var r;this.callbacks={},this.warned=!1,this.maxListeners=(r=t==null?void 0:t.maxListeners)!==null&&r!==void 0?r:10}return e.prototype.warnIfPossibleMemoryLeak=function(t){this.warned||this.maxListeners&&this.callbacks[t].length>this.maxListeners&&(console.warn("Event Emitter: Possible memory leak detected; ".concat(String(t)," has exceeded ").concat(this.maxListeners," listeners.")),this.warned=!0)},e.prototype.on=function(t,r){return this.callbacks[t]?(this.callbacks[t].push(r),this.warnIfPossibleMemoryLeak(t)):this.callbacks[t]=[r],this},e.prototype.once=function(t,r){var n=this,i=function(){for(var o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];n.off(t,i),r.apply(n,o)};return this.on(t,i),this},e.prototype.off=function(t,r){var n,i=(n=this.callbacks[t])!==null&&n!==void 0?n:[],o=i.filter(function(a){return a!==r});return this.callbacks[t]=o,this},e.prototype.emit=function(t){for(var r=this,n,i=[],o=1;o<arguments.length;o++)i[o-1]=arguments[o];var a=(n=this.callbacks[t])!==null&&n!==void 0?n:[];return a.forEach(function(u){u.apply(r,i)}),this},e}();function Xr(e){var t=Math.random()+1,r=e.minTimeout,n=r===void 0?500:r,i=e.factor,o=i===void 0?2:i,a=e.attempt,u=e.maxTimeout,s=u===void 0?1/0:u;return Math.min(t*n*Math.pow(o,a),s)}var Zt="onRemoveFromFuture",ft=function(e){L(t,e);function t(r,n,i){var o=e.call(this)||this;return o.future=[],o.maxAttempts=r,o.queue=n,o.seen=i??{},o}return t.prototype.push=function(){for(var r=this,n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];var o=n.map(function(a){var u=r.updateAttempts(a);return u>r.maxAttempts||r.includes(a)?!1:(r.queue.push(a),!0)});return this.queue=this.queue.sort(function(a,u){return r.getAttempts(a)-r.getAttempts(u)}),o},t.prototype.pushWithBackoff=function(r,n){var i=this;if(n===void 0&&(n=0),n==0&&this.getAttempts(r)===0)return this.push(r)[0];var o=this.updateAttempts(r);if(o>this.maxAttempts||this.includes(r))return!1;var a=Xr({attempt:o-1});return n>0&&a<n&&(a=n),setTimeout(function(){i.queue.push(r),i.future=i.future.filter(function(u){return u.id!==r.id}),i.emit(Zt)},a),this.future.push(r),!0},t.prototype.getAttempts=function(r){var n;return(n=this.seen[r.id])!==null&&n!==void 0?n:0},t.prototype.updateAttempts=function(r){return this.seen[r.id]=this.getAttempts(r)+1,this.getAttempts(r)},t.prototype.includes=function(r){return this.queue.includes(r)||this.future.includes(r)||!!this.queue.find(function(n){return n.id===r.id})||!!this.future.find(function(n){return n.id===r.id})},t.prototype.pop=function(){return this.queue.shift()},Object.defineProperty(t.prototype,"length",{get:function(){return this.queue.length},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"todo",{get:function(){return this.queue.length+this.future.length},enumerable:!1,configurable:!0}),t}(lt),ne=256,Ce=[],Oe;for(;ne--;)Ce[ne]=(ne+256).toString(16).substring(1);function dt(){var e=0,t,r="";if(!Oe||ne+16>256){for(Oe=Array(e=256);e--;)Oe[e]=256*Math.random()|0;e=ne=0}for(;e<16;e++)t=Oe[ne+e],e==6?r+=Ce[t&15|64]:e==8?r+=Ce[t&63|128]:r+=Ce[t],e&1&&e>1&&e<11&&(r+="-");return ne++,r}var Zr=function(){function e(){this._logs=[]}return e.prototype.log=function(t,r,n){var i=new Date;this._logs.push({level:t,message:r,time:i,extras:n})},Object.defineProperty(e.prototype,"logs",{get:function(){return this._logs},enumerable:!1,configurable:!0}),e.prototype.flush=function(){if(this.logs.length>1){var t=this._logs.reduce(function(r,n){var i,o,a,u=f(f({},n),{json:JSON.stringify(n.extras,null," "),extras:n.extras});delete u.time;var s=(a=(o=n.time)===null||o===void 0?void 0:o.toISOString())!==null&&a!==void 0?a:"";return r[s]&&(s="".concat(s,"-").concat(Math.random())),f(f({},r),(i={},i[s]=u,i))},{});console.table?console.table(t):console.log(t)}else this.logs.forEach(function(r){var n=r.level,i=r.message,o=r.extras;n==="info"||n==="debug"?console.log(i,o??""):console[n](i,o??"")});this._logs=[]},e}(),Yr=function(e){var t={gauge:"g",counter:"c"};return t[e]},Yt=function(){function e(){this.metrics=[]}return e.prototype.increment=function(t,r,n){r===void 0&&(r=1),this.metrics.push({metric:t,value:r,tags:n??[],type:"counter",timestamp:Date.now()})},e.prototype.gauge=function(t,r,n){this.metrics.push({metric:t,value:r,tags:n??[],type:"gauge",timestamp:Date.now()})},e.prototype.flush=function(){var t=this.metrics.map(function(r){return f(f({},r),{tags:r.tags.join(",")})});console.table?console.table(t):console.log(t),this.metrics=[]},e.prototype.serialize=function(){return this.metrics.map(function(t){return{m:t.metric,v:t.value,t:t.tags,k:Yr(t.type),e:t.timestamp}})},e}(),en=function(e){L(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.gauge=function(){},t.prototype.increment=function(){},t.prototype.flush=function(){},t.prototype.serialize=function(){return[]},t}(Yt),ae=function(){function e(t){var r,n,i;this.retry=(r=t.retry)!==null&&r!==void 0?r:!0,this.type=(n=t.type)!==null&&n!==void 0?n:"plugin Error",this.reason=(i=t.reason)!==null&&i!==void 0?i:""}return e}(),De=function(){function e(t,r,n,i){r===void 0&&(r=dt()),n===void 0&&(n=new en),i===void 0&&(i=new Zr),this.attempts=0,this.event=t,this._id=r,this.logger=i,this.stats=n}return e.system=function(){},e.prototype.isSame=function(t){return t.id===this.id},e.prototype.cancel=function(t){throw t||new ae({reason:"Context Cancel"})},e.prototype.log=function(t,r,n){this.logger.log(t,r,n)},Object.defineProperty(e.prototype,"id",{get:function(){return this._id},enumerable:!1,configurable:!0}),e.prototype.updateEvent=function(t,r){var n;if(t.split(".")[0]==="integrations"){var i=t.split(".")[1];if(((n=this.event.integrations)===null||n===void 0?void 0:n[i])===!1)return this.event}return Xe(this.event,t,r),this.event},e.prototype.failedDelivery=function(){return this._failedDelivery},e.prototype.setFailedDelivery=function(t){this._failedDelivery=t},e.prototype.logs=function(){return this.logger.logs},e.prototype.flush=function(){this.logger.flush(),this.stats.flush()},e.prototype.toJSON=function(){return{id:this._id,event:this.event,logs:this.logger.logs,metrics:this.stats.metrics}},e}();function tn(e,t){var r={};return e.forEach(function(n){var i,o=void 0;{var a=n[t];o=typeof a!="string"?JSON.stringify(a):a}o!==void 0&&(r[o]=C(C([],(i=r[o])!==null&&i!==void 0?i:[],!0),[n],!1))}),r}var rn=function(e){return typeof e=="object"&&e!==null&&"then"in e&&typeof e.then=="function"},nn=function(){var e,t,r=0;return{done:function(){return e},run:function(n){var i=n();return rn(i)&&(++r===1&&(e=new Promise(function(o){return t=o})),i.finally(function(){return--r===0&&t()})),i}}};function on(e){return y(this,void 0,void 0,function(){var t;return g(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,e()];case 1:return[2,r.sent()];case 2:return t=r.sent(),[2,Promise.reject(t)];case 3:return[2]}})})}function Se(e,t){e.log("debug","plugin",{plugin:t.name});var r=new Date().getTime(),n=t[e.event.type];if(n===void 0)return Promise.resolve(e);var i=on(function(){return n.apply(t,[e])}).then(function(o){var a=new Date().getTime()-r;return o.stats.gauge("plugin_time",a,["plugin:".concat(t.name)]),o}).catch(function(o){if(o instanceof ae&&o.type==="middleware_cancellation")throw o;return o instanceof ae?(e.log("warn",o.type,{plugin:t.name,error:o}),o):(e.log("error","plugin Error",{plugin:t.name,error:o}),e.stats.increment("plugin_error",1,["plugin:".concat(t.name)]),o)});return i}function an(e,t){return Se(e,t).then(function(r){if(r instanceof De)return r;e.log("debug","Context canceled"),e.stats.increment("context_canceled"),e.cancel(r)})}var un=function(e){L(t,e);function t(r){var n=e.call(this)||this;return n.criticalTasks=nn(),n.plugins=[],n.failedInitializations=[],n.flushing=!1,n.queue=r,n.queue.on(Zt,function(){n.scheduleFlush(0)}),n}return t.prototype.register=function(r,n,i){return y(this,void 0,void 0,function(){var o,a,u=this;return g(this,function(s){switch(s.label){case 0:return this.plugins.push(n),o=function(c){u.failedInitializations.push(n.name),u.emit("initialization_failure",n),console.warn(n.name,c),r.log("warn","Failed to load destination",{plugin:n.name,error:c}),u.plugins=u.plugins.filter(function(l){return l!==n})},n.type==="destination"&&n.name!=="Segment.io"?(n.load(r,i).catch(o),[3,4]):[3,1];case 1:return s.trys.push([1,3,,4]),[4,n.load(r,i)];case 2:return s.sent(),[3,4];case 3:return a=s.sent(),o(a),[3,4];case 4:return[2]}})})},t.prototype.deregister=function(r,n,i){return y(this,void 0,void 0,function(){var o;return g(this,function(a){switch(a.label){case 0:return a.trys.push([0,3,,4]),n.unload?[4,Promise.resolve(n.unload(r,i))]:[3,2];case 1:a.sent(),a.label=2;case 2:return this.plugins=this.plugins.filter(function(u){return u.name!==n.name}),[3,4];case 3:return o=a.sent(),r.log("warn","Failed to unload destination",{plugin:n.name,error:o}),[3,4];case 4:return[2]}})})},t.prototype.dispatch=function(r){return y(this,void 0,void 0,function(){var n;return g(this,function(i){return r.log("debug","Dispatching"),r.stats.increment("message_dispatched"),this.queue.push(r),n=this.subscribeToDelivery(r),this.scheduleFlush(0),[2,n]})})},t.prototype.subscribeToDelivery=function(r){return y(this,void 0,void 0,function(){var n=this;return g(this,function(i){return[2,new Promise(function(o){var a=function(u,s){u.isSame(r)&&(n.off("flush",a),o(u))};n.on("flush",a)})]})})},t.prototype.dispatchSingle=function(r){return y(this,void 0,void 0,function(){var n=this;return g(this,function(i){return r.log("debug","Dispatching"),r.stats.increment("message_dispatched"),this.queue.updateAttempts(r),r.attempts=1,[2,this.deliver(r).catch(function(o){var a=n.enqueuRetry(o,r);return a?n.subscribeToDelivery(r):(r.setFailedDelivery({reason:o}),r)})]})})},t.prototype.isEmpty=function(){return this.queue.length===0},t.prototype.scheduleFlush=function(r){var n=this;r===void 0&&(r=500),!this.flushing&&(this.flushing=!0,setTimeout(function(){n.flush().then(function(){setTimeout(function(){n.flushing=!1,n.queue.length&&n.scheduleFlush(0)},0)})},r))},t.prototype.deliver=function(r){return y(this,void 0,void 0,function(){var n,i,o,a;return g(this,function(u){switch(u.label){case 0:return[4,this.criticalTasks.done()];case 1:u.sent(),n=Date.now(),u.label=2;case 2:return u.trys.push([2,4,,5]),[4,this.flushOne(r)];case 3:return r=u.sent(),i=Date.now()-n,this.emit("delivery_success",r),r.stats.gauge("delivered",i),r.log("debug","Delivered",r.event),[2,r];case 4:throw o=u.sent(),a=o,r.log("error","Failed to deliver",a),this.emit("delivery_failure",r,a),r.stats.increment("delivery_failed"),o;case 5:return[2]}})})},t.prototype.enqueuRetry=function(r,n){var i=!(r instanceof ae)||r.retry;return i?this.queue.pushWithBackoff(n):!1},t.prototype.flush=function(){return y(this,void 0,void 0,function(){var r,n,i;return g(this,function(o){switch(o.label){case 0:if(this.queue.length===0)return[2,[]];if(r=this.queue.pop(),!r)return[2,[]];r.attempts=this.queue.getAttempts(r),o.label=1;case 1:return o.trys.push([1,3,,4]),[4,this.deliver(r)];case 2:return r=o.sent(),this.emit("flush",r,!0),[3,4];case 3:return n=o.sent(),i=this.enqueuRetry(n,r),i||(r.setFailedDelivery({reason:n}),this.emit("flush",r,!1)),[2,[]];case 4:return[2,[r]]}})})},t.prototype.isReady=function(){return!0},t.prototype.availableExtensions=function(r){var n=this.plugins.filter(function(h){var v,m,S;if(h.type!=="destination"&&h.name!=="Segment.io")return!0;var _=void 0;return(v=h.alternativeNames)===null||v===void 0||v.forEach(function(b){r[b]!==void 0&&(_=r[b])}),(S=(m=r[h.name])!==null&&m!==void 0?m:_)!==null&&S!==void 0?S:(h.name==="Segment.io"?!0:r.All)!==!1}),i=tn(n,"type"),o=i.before,a=o===void 0?[]:o,u=i.enrichment,s=u===void 0?[]:u,c=i.destination,l=c===void 0?[]:c,d=i.after,p=d===void 0?[]:d;return{before:a,enrichment:s,destinations:l,after:p}},t.prototype.flushOne=function(r){var n,i;return y(this,void 0,void 0,function(){var o,a,u,s,c,l,v,d,p,h,v,m,S,_,b;return g(this,function(E){switch(E.label){case 0:if(!this.isReady())throw new Error("Not ready");r.attempts>1&&this.emit("delivery_retry",r),o=this.availableExtensions((n=r.event.integrations)!==null&&n!==void 0?n:{}),a=o.before,u=o.enrichment,s=0,c=a,E.label=1;case 1:return s<c.length?(l=c[s],[4,an(r,l)]):[3,4];case 2:v=E.sent(),v instanceof De&&(r=v),this.emit("message_enriched",r,l),E.label=3;case 3:return s++,[3,1];case 4:d=0,p=u,E.label=5;case 5:return d<p.length?(h=p[d],[4,Se(r,h)]):[3,8];case 6:v=E.sent(),v instanceof De&&(r=v),this.emit("message_enriched",r,h),E.label=7;case 7:return d++,[3,5];case 8:return m=this.availableExtensions((i=r.event.integrations)!==null&&i!==void 0?i:{}),S=m.destinations,_=m.after,[4,new Promise(function(O,I){setTimeout(function(){var x=S.map(function(k){return Se(r,k)});Promise.all(x).then(O).catch(I)},0)})];case 9:return E.sent(),r.stats.increment("message_delivered"),this.emit("message_delivered",r),b=_.map(function(O){return Se(r,O)}),[4,Promise.all(b)];case 10:return E.sent(),[2,r]}})})},t}(lt),sn=function(e,t){var r=Date.now()-e;return Math.max((t??300)-r,0)};function cn(e,t,r,n){return y(this,void 0,void 0,function(){var i,o;return g(this,function(a){switch(a.label){case 0:return r.emit("dispatch_start",e),i=Date.now(),t.isEmpty()?[4,t.dispatchSingle(e)]:[3,2];case 1:return o=a.sent(),[3,4];case 2:return[4,t.dispatch(e)];case 3:o=a.sent(),a.label=4;case 4:return n!=null&&n.callback?[4,Hr(o,n.callback,sn(i,n.timeout))]:[3,6];case 5:o=a.sent(),a.label=6;case 6:return n!=null&&n.debug&&o.flush(),[2,o]}})})}function er(e,t,r,n){var i,o=[e,t,r,n],a=U(e)?e.event:e;if(!a||!ee(a))throw new Error("Event missing");var u=U(e)?(i=e.properties)!==null&&i!==void 0?i:{}:U(t)?t:{},s={};he(r)||(s=r??{}),U(e)&&!he(t)&&(s=t??{});var c=o.find(he);return[a,u,s,c]}function Ye(e,t,r,n,i){var o,a,u=null,s=null,c=[e,t,r,n,i],l=c.filter(ee);l.length===1?ee(c[1])?(s=c[1],u=null):(s=l[0],u=null):l.length===2&&(typeof c[0]=="string"&&(u=c[0]),typeof c[1]=="string"&&(s=c[1]));var d=c.find(he),p=c.filter(U);return p.length===1?U(c[2])?(a={},o=c[2]):U(c[3])?(o={},a=c[3]):(o=p[0],a={}):p.length===2&&(o=p[0],a=p[1]),[u,s,o??(o={}),a??(a={}),d]}var et=function(e){return function(){for(var t,r,n,i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];for(var a={},u=["callback","options","traits","id"],s=0,c=i;s<c.length;s++){var l=c[s],d=u.pop();if(d==="id"){if(ee(l)||Ze(l)){a.id=l.toString();continue}if(l==null)continue;d=u.pop()}if((d==="traits"||d==="options")&&(l==null||U(l))&&(a[d]=l),he(l)){a.callback=l;break}}return[(t=a.id)!==null&&t!==void 0?t:e.id(),(r=a.traits)!==null&&r!==void 0?r:{},(n=a.options)!==null&&n!==void 0?n:{},a.callback]}};function tr(e,t,r,n){Ze(e)&&(e=e.toString()),Ze(t)&&(t=t.toString());var i=[e,t,r,n],o=i.filter(ee),a=o[0],u=a===void 0?e:a,s=o[1],c=s===void 0?null:s,l=i.filter(U)[0],d=l===void 0?{}:l,p=i.find(he);return[u,c,d,p]}function vt(){return typeof window<"u"}function Po(){return!vt()}function ln(){return vt()?window.navigator.onLine:!0}function Ee(){return!ln()}function fn(e,t){return t=t||{},new Promise(function(r,n){var i=new XMLHttpRequest,o=[],a=[],u={},s=function(){return{ok:(i.status/100|0)==2,statusText:i.statusText,status:i.status,url:i.responseURL,text:function(){return Promise.resolve(i.responseText)},json:function(){return Promise.resolve(i.responseText).then(JSON.parse)},blob:function(){return Promise.resolve(new Blob([i.response]))},clone:s,headers:{keys:function(){return o},entries:function(){return a},get:function(l){return u[l.toLowerCase()]},has:function(l){return l.toLowerCase()in u}}}};for(var c in i.open(t.method||"get",e,!0),i.onload=function(){i.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,function(l,d,p){o.push(d=d.toLowerCase()),a.push([d,p]),u[d]=u[d]?u[d]+","+p:p}),r(s())},i.onerror=n,i.withCredentials=t.credentials=="include",t.headers)i.setRequestHeader(c,t.headers[c]);i.send(t.body||null)})}var ht=function(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:null},Te=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=ht();return(r&&r.fetch||fn).apply(void 0,e)},je="1.82.0",rr="api.segment.io/v1",dn=function(e,t,r){var n=t.reduce(function(i,o){var a=o.split(":"),u=a[0],s=a[1];return i[u]=s,i},{});return{type:"Counter",metric:e,value:1,tags:f(f({},n),{library:"analytics.js",library_version:"npm:next-".concat(je)})}};function Ve(e){console.error("Error sending segment performance metrics",e)}var vn=function(){function e(t){var r=this,n,i,o,a,u;if(this.host=(n=t==null?void 0:t.host)!==null&&n!==void 0?n:rr,this.sampleRate=(i=t==null?void 0:t.sampleRate)!==null&&i!==void 0?i:1,this.flushTimer=(o=t==null?void 0:t.flushTimer)!==null&&o!==void 0?o:30*1e3,this.maxQueueSize=(a=t==null?void 0:t.maxQueueSize)!==null&&a!==void 0?a:20,this.protocol=(u=t==null?void 0:t.protocol)!==null&&u!==void 0?u:"https",this.queue=[],this.sampleRate>0){var s=!1,c=function(){s||(s=!0,r.flush().catch(Ve),s=!1,setTimeout(c,r.flushTimer))};c()}}return e.prototype.increment=function(t,r){if(t.includes("analytics_js.")&&r.length!==0&&!(Math.random()>this.sampleRate)&&!(this.queue.length>=this.maxQueueSize)){var n=dn(t,r);this.queue.push(n),t.includes("error")&&this.flush().catch(Ve)}},e.prototype.flush=function(){return y(this,void 0,void 0,function(){var t=this;return g(this,function(r){switch(r.label){case 0:return this.queue.length<=0?[2]:[4,this.send().catch(function(n){Ve(n),t.sampleRate=0})];case 1:return r.sent(),[2]}})})},e.prototype.send=function(){return y(this,void 0,void 0,function(){var t,r,n;return g(this,function(i){return t={series:this.queue},this.queue=[],r={"Content-Type":"text/plain"},n="".concat(this.protocol,"://").concat(this.host,"/m"),[2,Te(n,{headers:r,body:JSON.stringify(t),method:"POST"})]})})},e}(),xe,nr=function(e){L(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.initRemoteMetrics=function(r){xe=new vn(r)},t.prototype.increment=function(r,n,i){e.prototype.increment.call(this,r,n,i),xe==null||xe.increment(r,i??[])},t}(Yt),z=function(e){L(t,e);function t(r,n){return e.call(this,r,n,new nr)||this}return t.system=function(){return new this({type:"track",event:"system"})},t}(De);function hn(e){return Object.prototype.toString.call(e).slice(8,-1).toLowerCase()==="object"}var ir="bpc",or=function(e,t,r,n,i,o){return{__t:ir,c:t,p:n,u:e,s:r,t:i,r:o}},pn=Object.keys(or("","","","","",""));function yn(e){if(!hn(e)||e.__t!==ir)return!1;for(var t in e)if(!pn.includes(t))return!1;return!0}var gn=function(e,t){return e.indexOf("?")>-1?e:e+t},mn=function(e){var t=e.indexOf("#");return t===-1?e:e.slice(0,t)},bn=function(e){try{return new URL(e).pathname}catch{return e[0]==="/"?e:"/"+e}},ar=function(e){var t=e.c,r=e.p,n=e.s,i=e.u,o=e.r,a=e.t,u=t?bn(t):r,s=t?gn(t,n):mn(i);return{path:u,referrer:o,search:n,title:a,url:s}},ur=function(){var e=document.querySelector("link[rel='canonical']");return or(location.href,e&&e.getAttribute("href")||void 0,location.search,location.pathname,document.title,document.referrer)},_n=function(){return ar(ur())};function wn(e,t){return Object.assign.apply(Object,C([{}],t.map(function(r){var n;if(e&&Object.prototype.hasOwnProperty.call(e,r))return n={},n[r]=e[r],n}),!1))}var le=function(e,t){t===void 0&&(t=_n());var r=e.context,n;e.type==="page"&&(n=e.properties&&wn(e.properties,Object.keys(t)),e.properties=f(f(f({},t),e.properties),e.name?{name:e.name}:{})),r.page=f(f(f({},t),n),r.page)},sr=function(e){L(t,e);function t(r){var n=e.call(this,{createMessageId:function(){return"ajs-next-".concat(Date.now(),"-").concat(dt())},onEventMethodCall:function(i){var o=i.options;n.maybeUpdateAnonId(o)},onFinishedEvent:function(i){return n.addIdentity(i),i}})||this;return n.user=r,n}return t.prototype.maybeUpdateAnonId=function(r){r!=null&&r.anonymousId&&this.user.anonymousId(r.anonymousId)},t.prototype.addIdentity=function(r){this.user.id()&&(r.userId=this.user.id()),this.user.anonymousId()&&(r.anonymousId=this.user.anonymousId())},t.prototype.track=function(r,n,i,o,a){var u=e.prototype.track.call(this,r,n,i,o);return le(u,a),u},t.prototype.page=function(r,n,i,o,a,u){var s=e.prototype.page.call(this,r,n,i,o,a);return le(s,u),s},t.prototype.screen=function(r,n,i,o,a,u){var s=e.prototype.screen.call(this,r,n,i,o,a);return le(s,u),s},t.prototype.identify=function(r,n,i,o,a){var u=e.prototype.identify.call(this,r,n,i,o);return le(u,a),u},t.prototype.group=function(r,n,i,o,a){var u=e.prototype.group.call(this,r,n,i,o);return le(u,a),u},t.prototype.alias=function(r,n,i,o,a){var u=e.prototype.alias.call(this,r,n,i,o);return le(u,a),u},t}(Jr),cr=function(e){return"addMiddleware"in e&&e.type==="destination"},V={getItem:function(){},setItem:function(){},removeItem:function(){}};try{V=vt()&&window.localStorage?window.localStorage:V}catch(e){console.warn("Unable to access localStorage",e)}function lr(e){var t=V.getItem(e);return(t?JSON.parse(t):[]).map(function(r){return new z(r.event,r.id)})}function Sn(e,t){var r=lr(e),n=C(C([],t,!0),r,!0),i=n.reduce(function(o,a){var u;return f(f({},o),(u={},u[a.id]=a,u))},{});V.setItem(e,JSON.stringify(Object.values(i)))}function fr(e){var t=V.getItem(e);return t?JSON.parse(t):{}}function En(e,t){var r=fr(e);V.setItem(e,JSON.stringify(f(f({},r),t)))}function Ut(e){V.removeItem(e)}var In=function(){return new Date().getTime()};function tt(e,t,r){r===void 0&&(r=0);var n=50,i="persisted-queue:v1:".concat(e,":lock"),o=function(c){return new Date().getTime()>c},a=V.getItem(i),u=a?JSON.parse(a):null,s=u===null||o(u);if(s){V.setItem(i,JSON.stringify(In()+n)),t(),V.removeItem(i);return}!s&&r<3?setTimeout(function(){tt(e,t,r+1)},n):console.error("Unable to retrieve lock")}var pt=function(e){L(t,e);function t(r,n){var i=e.call(this,r,[])||this,o="persisted-queue:v1:".concat(n,":items"),a="persisted-queue:v1:".concat(n,":seen"),u=[],s={};return tt(n,function(){try{u=lr(o),s=fr(a),Ut(o),Ut(a),i.queue=C(C([],u,!0),i.queue,!0),i.seen=f(f({},s),i.seen)}catch(c){console.error(c)}}),window.addEventListener("pagehide",function(){if(i.todo>0){var c=C(C([],i.queue,!0),i.future,!0);try{tt(n,function(){Sn(o,c),En(a,i.seen)})}catch(l){console.error(l)}}}),i}return t}(ft),Pn=function(e){L(t,e);function t(r){return e.call(this,typeof r=="string"?new pt(4,r):r)||this}return t.prototype.flush=function(){return y(this,void 0,void 0,function(){return g(this,function(r){return Ee()?[2,[]]:[2,e.prototype.flush.call(this)]})})},t}(un);function yt(e){for(var t=e.constructor.prototype,r=0,n=Object.getOwnPropertyNames(t);r<n.length;r++){var i=n[r];if(i!=="constructor"){var o=Object.getOwnPropertyDescriptor(e.constructor.prototype,i);o&&typeof o.value=="function"&&(e[i]=e[i].bind(e))}}return e}/*! js-cookie v3.0.1 | MIT */function Me(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)e[n]=r[n]}return e}var An={read:function(e){return e[0]==='"'&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function rt(e,t){function r(i,o,a){if(!(typeof document>"u")){a=Me({},t,a),typeof a.expires=="number"&&(a.expires=new Date(Date.now()+a.expires*864e5)),a.expires&&(a.expires=a.expires.toUTCString()),i=encodeURIComponent(i).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var u="";for(var s in a)a[s]&&(u+="; "+s,a[s]!==!0&&(u+="="+a[s].split(";")[0]));return document.cookie=i+"="+e.write(o,i)+u}}function n(i){if(!(typeof document>"u"||arguments.length&&!i)){for(var o=document.cookie?document.cookie.split("; "):[],a={},u=0;u<o.length;u++){var s=o[u].split("="),c=s.slice(1).join("=");try{var l=decodeURIComponent(s[0]);if(a[l]=e.read(c,l),i===l)break}catch{}}return i?a[i]:a}}return Object.create({set:r,get:n,remove:function(i,o){r(i,"",Me({},o,{expires:-1}))},withAttributes:function(i){return rt(this.converter,Me({},this.attributes,i))},withConverter:function(i){return rt(Me({},this.converter,i),this.attributes)}},{attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(e)}})}var W=rt(An,{path:"/"});function On(e){var t=e.hostname,r=t.split("."),n=r[r.length-1],i=[];if(r.length===4&&parseInt(n,10)>0||r.length<=1)return i;for(var o=r.length-2;o>=0;--o)i.push(r.slice(o).join("."));return i}function xn(e){try{return new URL(e)}catch{return}}function dr(e){var t=xn(e);if(t)for(var r=On(t),n=0;n<r.length;++n){var i="__tld__",o=r[n],a={domain:"."+o};try{if(W.set(i,"1",a),W.get(i))return W.remove(i,a),o}catch{return}}}var Mn=365,vr=function(){function e(t){t===void 0&&(t=e.defaults),this.options=f(f({},e.defaults),t)}return Object.defineProperty(e,"defaults",{get:function(){return{maxage:Mn,domain:dr(window.location.href),path:"/",sameSite:"Lax"}},enumerable:!1,configurable:!0}),e.prototype.opts=function(){return{sameSite:this.options.sameSite,expires:this.options.maxage,domain:this.options.domain,path:this.options.path,secure:this.options.secure}},e.prototype.get=function(t){var r;try{var n=W.get(t);if(n==null)return null;try{return(r=JSON.parse(n))!==null&&r!==void 0?r:null}catch{return n??null}}catch{return null}},e.prototype.set=function(t,r){typeof r=="string"?W.set(t,r,this.opts()):r===null?W.remove(t,this.opts()):W.set(t,JSON.stringify(r),this.opts())},e.prototype.remove=function(t){return W.remove(t,this.opts())},e}(),Cn=function(){function e(){}return e.prototype.localStorageWarning=function(t,r){console.warn("Unable to access ".concat(t,", localStorage may be ").concat(r))},e.prototype.get=function(t){var r;try{var n=localStorage.getItem(t);if(n===null)return null;try{return(r=JSON.parse(n))!==null&&r!==void 0?r:null}catch{return n??null}}catch{return this.localStorageWarning(t,"unavailable"),null}},e.prototype.set=function(t,r){try{localStorage.setItem(t,JSON.stringify(r))}catch{this.localStorageWarning(t,"full")}},e.prototype.remove=function(t){try{return localStorage.removeItem(t)}catch{this.localStorageWarning(t,"unavailable")}},e}(),gt=function(){function e(){this.cache={}}return e.prototype.get=function(t){var r;return(r=this.cache[t])!==null&&r!==void 0?r:null},e.prototype.set=function(t,r){this.cache[t]=r},e.prototype.remove=function(t){delete this.cache[t]},e}(),j={Cookie:"cookie",LocalStorage:"localStorage",Memory:"memory"};function hr(e){return e&&e.stores&&Array.isArray(e.stores)&&e.stores.every(function(t){return Object.values(j).includes(t)})}function kn(e){return typeof e=="object"&&e.name!==void 0}var Ge=function(e,t,r,n){console.warn("".concat(e.constructor.name,": Can't ").concat(t,' key "').concat(r,'" | Err: ').concat(n))},Y=function(){function e(t){this.stores=t}return e.prototype.get=function(t){for(var r=null,n=0,i=this.stores;n<i.length;n++){var o=i[n];try{if(r=o.get(t),r!=null)return r}catch(a){Ge(o,"get",t,a)}}return null},e.prototype.set=function(t,r){this.stores.forEach(function(n){try{n.set(t,r)}catch(i){Ge(n,"set",t,i)}})},e.prototype.clear=function(t){this.stores.forEach(function(r){try{r.remove(t)}catch(n){Ge(r,"remove",t,n)}})},e.prototype.getAndSync=function(t){var r=this.get(t),n=typeof r=="number"?r.toString():r;return this.set(t,n),n},e}();function nt(e){var t=e.map(function(r){var n,i;switch(kn(r)?(n=r.name,i=r.settings):n=r,n){case j.Cookie:return new vr(i);case j.LocalStorage:return new Cn;case j.Memory:return new gt;default:throw new Error("Unknown Store Type: ".concat(r))}});return t}function pr(e,t){return e.map(function(r){return t&&r===j.Cookie?{name:r,settings:t}:r})}var re={persist:!0,cookie:{key:"ajs_user_id",oldKey:"ajs_user"},localStorage:{key:"ajs_user_traits"}},mt=function(){function e(t,r){t===void 0&&(t=re);var n=this,i,o,a,u;this.options={},this.id=function(c){if(n.options.disable)return null;var l=n.identityStore.getAndSync(n.idKey);if(c!==void 0){n.identityStore.set(n.idKey,c);var d=c!==l&&l!==null&&c!==null;d&&n.anonymousId(null)}var p=n.identityStore.getAndSync(n.idKey);if(p)return p;var h=n.legacyUserStore.get(re.cookie.oldKey);return h?typeof h=="object"?h.id:h:null},this.anonymousId=function(c){var l,d;if(n.options.disable)return null;if(c===void 0){var p=(l=n.identityStore.getAndSync(n.anonKey))!==null&&l!==void 0?l:(d=n.legacySIO())===null||d===void 0?void 0:d[0];if(p)return p}return c===null?(n.identityStore.set(n.anonKey,null),n.identityStore.getAndSync(n.anonKey)):(n.identityStore.set(n.anonKey,c??dt()),n.identityStore.getAndSync(n.anonKey))},this.traits=function(c){var l;if(!n.options.disable)return c===null&&(c={}),c&&n.traitsStore.set(n.traitsKey,c??{}),(l=n.traitsStore.get(n.traitsKey))!==null&&l!==void 0?l:{}},this.options=f(f({},re),t),this.cookieOptions=r,this.idKey=(o=(i=t.cookie)===null||i===void 0?void 0:i.key)!==null&&o!==void 0?o:re.cookie.key,this.traitsKey=(u=(a=t.localStorage)===null||a===void 0?void 0:a.key)!==null&&u!==void 0?u:re.localStorage.key,this.anonKey="ajs_anonymous_id",this.identityStore=this.createStorage(this.options,r),this.legacyUserStore=this.createStorage(this.options,r,function(c){return c===j.Cookie}),this.traitsStore=this.createStorage(this.options,r,function(c){return c!==j.Cookie});var s=this.legacyUserStore.get(re.cookie.oldKey);s&&typeof s=="object"&&(s.id&&this.id(s.id),s.traits&&this.traits(s.traits)),yt(this)}return e.prototype.legacySIO=function(){var t=this.legacyUserStore.get("_sio");if(!t)return null;var r=t.split("----"),n=r[0],i=r[1];return[n,i]},e.prototype.identify=function(t,r){if(!this.options.disable){r=r??{};var n=this.id();(n===null||n===t)&&(r=f(f({},this.traits()),r)),t&&this.id(t),this.traits(r)}},e.prototype.logout=function(){this.anonymousId(null),this.id(null),this.traits({})},e.prototype.reset=function(){this.logout(),this.identityStore.clear(this.idKey),this.identityStore.clear(this.anonKey),this.traitsStore.clear(this.traitsKey)},e.prototype.load=function(){return new e(this.options,this.cookieOptions)},e.prototype.save=function(){return!0},e.prototype.createStorage=function(t,r,n){var i=[j.LocalStorage,j.Cookie,j.Memory];return t.disable?new Y([]):t.persist?(t.storage!==void 0&&t.storage!==null&&hr(t.storage)&&(i=t.storage.stores),t.localStorageFallbackDisabled&&(i=i.filter(function(o){return o!==j.LocalStorage})),n&&(i=i.filter(n)),new Y(nt(pr(i,r)))):new Y([new gt])},e.defaults=re,e}(),zt={persist:!0,cookie:{key:"ajs_group_id"},localStorage:{key:"ajs_group_properties"}},yr=function(e){L(t,e);function t(r,n){r===void 0&&(r=zt);var i=e.call(this,f(f({},zt),r),n)||this;return i.anonymousId=function(o){},yt(i),i}return t}(mt),bt="analytics";function _t(){return window[bt]}function Dn(e){bt=e}function Fn(e){window[bt]=e}var Tn=function(e){return typeof e=="object"&&e!==null&&"then"in e&&typeof e.then=="function"},gr=function(e,t,r){r.getAndRemove(e).forEach(function(n){Ne(t,n).catch(console.error)})},jn=function(e,t){return y(void 0,void 0,void 0,function(){var r,n,i;return g(this,function(o){switch(o.label){case 0:r=0,n=t.getAndRemove("addSourceMiddleware"),o.label=1;case 1:return r<n.length?(i=n[r],[4,Ne(e,i).catch(console.error)]):[3,4];case 2:o.sent(),o.label=3;case 3:return r++,[3,1];case 4:return[2]}})})},Nn=function(e,t){return y(void 0,void 0,void 0,function(){var r,n,i;return g(this,function(o){switch(o.label){case 0:r=0,n=t.getAndRemove("register"),o.label=1;case 1:return r<n.length?(i=n[r],[4,Ne(e,i).catch(console.error)]):[3,4];case 2:o.sent(),o.label=3;case 3:return r++,[3,1];case 4:return[2]}})})},Ln=gr.bind(void 0,"on"),Rn=gr.bind(void 0,"setAnonymousId"),qn=function(e,t){Object.keys(t.calls).forEach(function(r){t.getAndRemove(r).forEach(function(n){setTimeout(function(){Ne(e,n).catch(console.error)},0)})})},fe=function(e){if(mr(e)){var t=e.pop();return ar(t)}},mr=function(e){var t=e[e.length-1];return yn(t)},it=function(){function e(t,r,n,i){n===void 0&&(n=function(){}),i===void 0&&(i=console.error),this.method=t,this.resolve=n,this.reject=i,this.called=!1,this.args=r}return e}(),Un=function(){function e(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];this._callMap={},this.add.apply(this,t)}return Object.defineProperty(e.prototype,"calls",{get:function(){return this._pushSnippetWindowBuffer(),this._callMap},set:function(t){this._callMap=t},enumerable:!1,configurable:!0}),e.prototype.get=function(t){var r;return(r=this.calls[t])!==null&&r!==void 0?r:[]},e.prototype.getAndRemove=function(t){var r=this.get(t);return this.calls[t]=[],r},e.prototype.add=function(){for(var t=this,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];r.forEach(function(i){var o=["track","screen","alias","group","page","identify"];o.includes(i.method)&&!mr(i.args)&&(i.args=C(C([],i.args,!0),[ur()],!1)),t.calls[i.method]?t.calls[i.method].push(i):t.calls[i.method]=[i]})},e.prototype.clear=function(){this._pushSnippetWindowBuffer(),this.calls={}},e.prototype.toArray=function(){var t;return(t=[]).concat.apply(t,Object.values(this.calls))},e.prototype._pushSnippetWindowBuffer=function(){},e}();function Ne(e,t){return y(this,void 0,void 0,function(){var r,n;return g(this,function(i){switch(i.label){case 0:return i.trys.push([0,3,,4]),t.called?[2,void 0]:(t.called=!0,r=e[t.method].apply(e,t.args),Tn(r)?[4,r]:[3,2]);case 1:i.sent(),i.label=2;case 2:return t.resolve(r),[3,4];case 3:return n=i.sent(),t.reject(n),[3,4];case 4:return[2]}})})}var zn=function(){function e(t){var r=this;this.trackSubmit=this._createMethod("trackSubmit"),this.trackClick=this._createMethod("trackClick"),this.trackLink=this._createMethod("trackLink"),this.pageView=this._createMethod("pageview"),this.identify=this._createMethod("identify"),this.reset=this._createMethod("reset"),this.group=this._createMethod("group"),this.track=this._createMethod("track"),this.ready=this._createMethod("ready"),this.alias=this._createMethod("alias"),this.debug=this._createChainableMethod("debug"),this.page=this._createMethod("page"),this.once=this._createChainableMethod("once"),this.off=this._createChainableMethod("off"),this.on=this._createChainableMethod("on"),this.addSourceMiddleware=this._createMethod("addSourceMiddleware"),this.setAnonymousId=this._createMethod("setAnonymousId"),this.addDestinationMiddleware=this._createMethod("addDestinationMiddleware"),this.screen=this._createMethod("screen"),this.register=this._createMethod("register"),this.deregister=this._createMethod("deregister"),this.user=this._createMethod("user"),this.VERSION=je,this._preInitBuffer=new Un,this._promise=t(this._preInitBuffer),this._promise.then(function(n){var i=n[0],o=n[1];r.instance=i,r.ctx=o}).catch(function(){})}return e.prototype.then=function(){for(var t,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return(t=this._promise).then.apply(t,r)},e.prototype.catch=function(){for(var t,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return(t=this._promise).catch.apply(t,r)},e.prototype.finally=function(){for(var t,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return(t=this._promise).finally.apply(t,r)},e.prototype._createMethod=function(t){var r=this;return function(){for(var n,i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];if(r.instance){var a=(n=r.instance)[t].apply(n,i);return Promise.resolve(a)}return new Promise(function(u,s){r._preInitBuffer.add(new it(t,i,u,s))})}},e.prototype._createChainableMethod=function(t){var r=this;return function(){for(var n,i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];return r.instance?((n=r.instance)[t].apply(n,i),r):(r._preInitBuffer.add(new it(t,i)),r)}},e}(),X={},G={},wt={},br={exports:{}};(function(e){e.exports=t(r),e.exports.find=e.exports,e.exports.replace=function(u,s,c,l){return t(i).call(this,u,s,c,l),u},e.exports.del=function(u,s,c){return t(n).call(this,u,s,null,c),u};function t(u){return function(s,c,l,d){var p=d&&a(d.normalizer)?d.normalizer:o;c=p(c);for(var h,v=!1;!v;)m();function m(){for(h in s){var S=p(h);if(c.indexOf(S)===0){var _=c.substr(S.length);if(_.charAt(0)==="."||_.length===0){c=_.substr(1);var b=s[h];if(b==null){v=!0;return}if(!c.length){v=!0;return}s=b;return}}}h=void 0,v=!0}if(h)return s==null?s:u(s,h,l)}}function r(u,s){if(u.hasOwnProperty(s))return u[s]}function n(u,s){return u.hasOwnProperty(s)&&delete u[s],u}function i(u,s,c){return u.hasOwnProperty(s)&&(u[s]=c),u}function o(u){return u.replace(/[^a-zA-Z0-9\.]+/g,"").toLowerCase()}function a(u){return typeof u=="function"}})(br);var Le=br.exports,Bn=M&&M.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(wt,"__esModule",{value:!0});var H=Bn(Le);function de(e,t){return function(){var r=this.traits(),n=this.properties?this.properties():{};return H.default(r,"address."+e)||H.default(r,e)||(t?H.default(r,"address."+t):null)||(t?H.default(r,t):null)||H.default(n,"address."+e)||H.default(n,e)||(t?H.default(n,"address."+t):null)||(t?H.default(n,t):null)}}function Kn(e){e.zip=de("postalCode","zip"),e.country=de("country"),e.street=de("street"),e.state=de("state"),e.city=de("city"),e.region=de("region")}wt.default=Kn;var Re={};Object.defineProperty(Re,"__esModule",{value:!0});Re.clone=void 0;function ot(e){if(typeof e!="object")return e;if(Object.prototype.toString.call(e)==="[object Object]"){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=ot(e[r]));return t}else return Array.isArray(e)?e.map(ot):e}Re.clone=ot;var St={};Object.defineProperty(St,"__esModule",{value:!0});var $n={Salesforce:!0};function Vn(e){return!$n[e]}St.default=Vn;var qe={},_r=/^(\d{4})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:([ T])(\d{2}):?(\d{2})(?::?(\d{2})(?:[,\.](\d{1,}))?)?(?:(Z)|([+\-])(\d{2})(?::?(\d{2}))?)?)?$/;qe.parse=function(e){var t=[1,5,6,7,11,12],r=_r.exec(e),n=0;if(!r)return new Date(e);for(var i=0,o;o=t[i];i++)r[o]=parseInt(r[o],10)||0;r[2]=parseInt(r[2],10)||1,r[3]=parseInt(r[3],10)||1,r[2]--,r[8]=r[8]?(r[8]+"00").substring(0,3):0,r[4]===" "?n=new Date().getTimezoneOffset():r[9]!=="Z"&&r[10]&&(n=r[11]*60+r[12],r[10]==="+"&&(n=0-n));var a=Date.UTC(r[1],r[2],r[3],r[5],r[6]+n,r[7],r[8]);return new Date(a)};qe.is=function(e,t){return typeof e!="string"||t&&/^\d{4}-\d{2}-\d{2}/.test(e)===!1?!1:_r.test(e)};var Et={},Gn=/\d{13}/;Et.is=function(e){return Gn.test(e)};Et.parse=function(e){return e=parseInt(e,10),new Date(e)};var It={},Jn=/\d{10}/;It.is=function(e){return Jn.test(e)};It.parse=function(e){var t=parseInt(e,10)*1e3;return new Date(t)};var Bt=qe,Kt=Et,$t=It,Wn=Object.prototype,wr=Wn.toString;function Qn(e){return wr.call(e)==="[object Date]"}function Hn(e){return wr.call(e)==="[object Number]"}var Pt=function(t){return Qn(t)?t:Hn(t)?new Date(Xn(t)):Bt.is(t)?Bt.parse(t):Kt.is(t)?Kt.parse(t):$t.is(t)?$t.parse(t):new Date(t)};function Xn(e){return e<315576e5?e*1e3:e}var Vt=qe,Zn=At;function At(e,t){return t===void 0&&(t=!0),e&&typeof e=="object"?Yn(e,t):Array.isArray(e)?ei(e,t):Vt.is(e,t)?Vt.parse(e):e}function Yn(e,t){return Object.keys(e).forEach(function(r){e[r]=At(e[r],t)}),e}function ei(e,t){return e.forEach(function(r,n){e[n]=At(r,t)}),e}var Ie=M&&M.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(G,"__esModule",{value:!0});G.Facade=void 0;var ti=Ie(wt),ye=Re,ri=Ie(St),ni=Ie(Pt),at=Ie(Le),ii=Ie(Zn);function R(e,t){t=t||{},this.raw=ye.clone(e),"clone"in t||(t.clone=!0),t.clone&&(e=ye.clone(e)),"traverse"in t||(t.traverse=!0),"timestamp"in e?e.timestamp=ni.default(e.timestamp):e.timestamp=new Date,t.traverse&&ii.default(e),this.opts=t,this.obj=e}G.Facade=R;var P=R.prototype;P.proxy=function(e){var t=e.split(".");e=t.shift();var r=this[e]||this.obj[e];return r&&(typeof r=="function"&&(r=r.call(this)||{}),t.length===0?this.opts.clone?ut(r):r:(r=at.default(r,t.join(".")),this.opts.clone?ut(r):r))};P.field=function(e){var t=this.obj[e];return this.opts.clone?ut(t):t};R.proxy=function(e){return function(){return this.proxy(e)}};R.field=function(e){return function(){return this.field(e)}};R.multi=function(e){return function(){var t=this.proxy(e+"s");if(Array.isArray(t))return t;var r=this.proxy(e);return r&&(r=[this.opts.clone?ye.clone(r):r]),r||[]}};R.one=function(e){return function(){var t=this.proxy(e);if(t)return t;var r=this.proxy(e+"s");if(Array.isArray(r))return r[0]}};P.json=function(){var e=this.opts.clone?ye.clone(this.obj):this.obj;return this.type&&(e.type=this.type()),e};P.rawEvent=function(){return this.raw};P.options=function(e){var t=this.obj.options||this.obj.context||{},r=this.opts.clone?ye.clone(t):t;if(!e)return r;if(this.enabled(e)){var n=this.integrations(),i=n[e]||at.default(n,e);return typeof i!="object"&&(i=at.default(this.options(),e)),typeof i=="object"?i:{}}};P.context=P.options;P.enabled=function(e){var t=this.proxy("options.providers.all");typeof t!="boolean"&&(t=this.proxy("options.all")),typeof t!="boolean"&&(t=this.proxy("integrations.all")),typeof t!="boolean"&&(t=!0);var r=t&&ri.default(e),n=this.integrations();if(n.providers&&n.providers.hasOwnProperty(e)&&(r=n.providers[e]),n.hasOwnProperty(e)){var i=n[e];typeof i=="boolean"?r=i:r=!0}return!!r};P.integrations=function(){return this.obj.integrations||this.proxy("options.providers")||this.options()};P.active=function(){var e=this.proxy("options.active");return e==null&&(e=!0),e};P.anonymousId=function(){return this.field("anonymousId")||this.field("sessionId")};P.sessionId=P.anonymousId;P.groupId=R.proxy("options.groupId");P.traits=function(e){var t=this.proxy("options.traits")||{},r=this.userId();e=e||{},r&&(t.id=r);for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var i=this[n]==null?this.proxy("options.traits."+n):this[n]();if(i==null)continue;t[e[n]]=i,delete t[n]}return t};P.library=function(){var e=this.proxy("options.library");return e?typeof e=="string"?{name:e,version:null}:e:{name:"unknown",version:null}};P.device=function(){var e=this.proxy("context.device");(typeof e!="object"||e===null)&&(e={});var t=this.library().name;return e.type||(t.indexOf("ios")>-1&&(e.type="ios"),t.indexOf("android")>-1&&(e.type="android")),e};P.userAgent=R.proxy("context.userAgent");P.timezone=R.proxy("context.timezone");P.timestamp=R.field("timestamp");P.channel=R.field("channel");P.ip=R.proxy("context.ip");P.userId=R.field("userId");ti.default(P);function ut(e){return ye.clone(e)}var Ue={},oi=M&&M.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ue,"__esModule",{value:!0});Ue.Alias=void 0;var ai=oi(se),Sr=G;function B(e,t){Sr.Facade.call(this,e,t)}Ue.Alias=B;ai.default(B,Sr.Facade);B.prototype.action=function(){return"alias"};B.prototype.type=B.prototype.action;B.prototype.previousId=function(){return this.field("previousId")||this.field("from")};B.prototype.from=B.prototype.previousId;B.prototype.userId=function(){return this.field("userId")||this.field("to")};B.prototype.to=B.prototype.userId;var ze={},ge={};Object.defineProperty(ge,"__esModule",{value:!0});var ui=/.+\@.+\..+/;function si(e){return ui.test(e)}ge.default=si;var Ot=M&&M.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ze,"__esModule",{value:!0});ze.Group=void 0;var ci=Ot(se),li=Ot(ge),fi=Ot(Pt),me=G;function xt(e,t){me.Facade.call(this,e,t)}ze.Group=xt;ci.default(xt,me.Facade);var K=xt.prototype;K.action=function(){return"group"};K.type=K.action;K.groupId=me.Facade.field("groupId");K.created=function(){var e=this.proxy("traits.createdAt")||this.proxy("traits.created")||this.proxy("properties.createdAt")||this.proxy("properties.created");if(e)return fi.default(e)};K.email=function(){var e=this.proxy("traits.email");if(e)return e;var t=this.groupId();if(li.default(t))return t};K.traits=function(e){var t=this.properties(),r=this.groupId();e=e||{},r&&(t.id=r);for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var i=this[n]==null?this.proxy("traits."+n):this[n]();if(i==null)continue;t[e[n]]=i,delete t[n]}return t};K.name=me.Facade.proxy("traits.name");K.industry=me.Facade.proxy("traits.industry");K.employees=me.Facade.proxy("traits.employees");K.properties=function(){return this.field("traits")||this.field("properties")||{}};var Pe={},Be=M&&M.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Pe,"__esModule",{value:!0});Pe.Identify=void 0;var J=G,pe=Be(Le),di=Be(se),vi=Be(ge),Er=Be(Pt),ie=function(e){return e.trim()};function Mt(e,t){J.Facade.call(this,e,t)}Pe.Identify=Mt;di.default(Mt,J.Facade);var A=Mt.prototype;A.action=function(){return"identify"};A.type=A.action;A.traits=function(e){var t=this.field("traits")||{},r=this.userId();e=e||{},r&&(t.id=r);for(var n in e){var i=this[n]==null?this.proxy("traits."+n):this[n]();i!=null&&(t[e[n]]=i,n!==e[n]&&delete t[n])}return t};A.email=function(){var e=this.proxy("traits.email");if(e)return e;var t=this.userId();if(vi.default(t))return t};A.created=function(){var e=this.proxy("traits.created")||this.proxy("traits.createdAt");if(e)return Er.default(e)};A.companyCreated=function(){var e=this.proxy("traits.company.created")||this.proxy("traits.company.createdAt");if(e)return Er.default(e)};A.companyName=function(){return this.proxy("traits.company.name")};A.name=function(){var e=this.proxy("traits.name");if(typeof e=="string")return ie(e);var t=this.firstName(),r=this.lastName();if(t&&r)return ie(t+" "+r)};A.firstName=function(){var e=this.proxy("traits.firstName");if(typeof e=="string")return ie(e);var t=this.proxy("traits.name");if(typeof t=="string")return ie(t).split(" ")[0]};A.lastName=function(){var e=this.proxy("traits.lastName");if(typeof e=="string")return ie(e);var t=this.proxy("traits.name");if(typeof t=="string"){var r=ie(t).indexOf(" ");if(r!==-1)return ie(t.substr(r+1))}};A.uid=function(){return this.userId()||this.username()||this.email()};A.description=function(){return this.proxy("traits.description")||this.proxy("traits.background")};A.age=function(){var e=this.birthday(),t=pe.default(this.traits(),"age");if(t!=null)return t;if(e instanceof Date){var r=new Date;return r.getFullYear()-e.getFullYear()}};A.avatar=function(){var e=this.traits();return pe.default(e,"avatar")||pe.default(e,"photoUrl")||pe.default(e,"avatarUrl")};A.position=function(){var e=this.traits();return pe.default(e,"position")||pe.default(e,"jobTitle")};A.username=J.Facade.proxy("traits.username");A.website=J.Facade.one("traits.website");A.websites=J.Facade.multi("traits.website");A.phone=J.Facade.one("traits.phone");A.phones=J.Facade.multi("traits.phone");A.address=J.Facade.proxy("traits.address");A.gender=J.Facade.proxy("traits.gender");A.birthday=J.Facade.proxy("traits.birthday");var be={},Ct=M&&M.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(be,"__esModule",{value:!0});be.Track=void 0;var hi=Ct(se),F=G,pi=Pe,yi=Ct(ge),Ir=Ct(Le);function kt(e,t){F.Facade.call(this,e,t)}be.Track=kt;hi.default(kt,F.Facade);var w=kt.prototype;w.action=function(){return"track"};w.type=w.action;w.event=F.Facade.field("event");w.value=F.Facade.proxy("properties.value");w.category=F.Facade.proxy("properties.category");w.id=F.Facade.proxy("properties.id");w.productId=function(){return this.proxy("properties.product_id")||this.proxy("properties.productId")};w.promotionId=function(){return this.proxy("properties.promotion_id")||this.proxy("properties.promotionId")};w.cartId=function(){return this.proxy("properties.cart_id")||this.proxy("properties.cartId")};w.checkoutId=function(){return this.proxy("properties.checkout_id")||this.proxy("properties.checkoutId")};w.paymentId=function(){return this.proxy("properties.payment_id")||this.proxy("properties.paymentId")};w.couponId=function(){return this.proxy("properties.coupon_id")||this.proxy("properties.couponId")};w.wishlistId=function(){return this.proxy("properties.wishlist_id")||this.proxy("properties.wishlistId")};w.reviewId=function(){return this.proxy("properties.review_id")||this.proxy("properties.reviewId")};w.orderId=function(){return this.proxy("properties.id")||this.proxy("properties.order_id")||this.proxy("properties.orderId")};w.sku=F.Facade.proxy("properties.sku");w.tax=F.Facade.proxy("properties.tax");w.name=F.Facade.proxy("properties.name");w.price=F.Facade.proxy("properties.price");w.total=F.Facade.proxy("properties.total");w.repeat=F.Facade.proxy("properties.repeat");w.coupon=F.Facade.proxy("properties.coupon");w.shipping=F.Facade.proxy("properties.shipping");w.discount=F.Facade.proxy("properties.discount");w.shippingMethod=function(){return this.proxy("properties.shipping_method")||this.proxy("properties.shippingMethod")};w.paymentMethod=function(){return this.proxy("properties.payment_method")||this.proxy("properties.paymentMethod")};w.description=F.Facade.proxy("properties.description");w.plan=F.Facade.proxy("properties.plan");w.subtotal=function(){var e=Ir.default(this.properties(),"subtotal"),t=this.total()||this.revenue();if(e)return e;if(!t)return 0;if(this.total()){var r=this.tax();r&&(t-=r),r=this.shipping(),r&&(t-=r),r=this.discount(),r&&(t+=r)}return t};w.products=function(){var e=this.properties(),t=Ir.default(e,"products");return Array.isArray(t)?t.filter(function(r){return r!==null}):[]};w.quantity=function(){var e=this.obj.properties||{};return e.quantity||1};w.currency=function(){var e=this.obj.properties||{};return e.currency||"USD"};w.referrer=function(){return this.proxy("context.referrer.url")||this.proxy("context.page.referrer")||this.proxy("properties.referrer")};w.query=F.Facade.proxy("options.query");w.properties=function(e){var t=this.field("properties")||{};e=e||{};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var n=this[r]==null?this.proxy("properties."+r):this[r]();if(n==null)continue;t[e[r]]=n,delete t[r]}return t};w.username=function(){return this.proxy("traits.username")||this.proxy("properties.username")||this.userId()||this.sessionId()};w.email=function(){var e=this.proxy("traits.email")||this.proxy("properties.email")||this.proxy("options.traits.email");if(e)return e;var t=this.userId();if(yi.default(t))return t};w.revenue=function(){var e=this.proxy("properties.revenue"),t=this.event(),r=/^[ _]?completed[ _]?order[ _]?|^[ _]?order[ _]?completed[ _]?$/i;return!e&&t&&t.match(r)&&(e=this.proxy("properties.total")),gi(e)};w.cents=function(){var e=this.revenue();return typeof e!="number"?this.value()||0:e*100};w.identify=function(){var e=this.json();return e.traits=this.traits(),new pi.Identify(e,this.opts)};function gi(e){if(e){if(typeof e=="number")return e;if(typeof e=="string"&&(e=e.replace(/\$/g,""),e=parseFloat(e),!isNaN(e)))return e}}var Ae={},Pr=M&&M.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ae,"__esModule",{value:!0});Ae.Page=void 0;var mi=Pr(se),ce=G,bi=be,_i=Pr(ge);function Dt(e,t){ce.Facade.call(this,e,t)}Ae.Page=Dt;mi.default(Dt,ce.Facade);var N=Dt.prototype;N.action=function(){return"page"};N.type=N.action;N.category=ce.Facade.field("category");N.name=ce.Facade.field("name");N.title=ce.Facade.proxy("properties.title");N.path=ce.Facade.proxy("properties.path");N.url=ce.Facade.proxy("properties.url");N.referrer=function(){return this.proxy("context.referrer.url")||this.proxy("context.page.referrer")||this.proxy("properties.referrer")};N.properties=function(e){var t=this.field("properties")||{},r=this.category(),n=this.name();e=e||{},r&&(t.category=r),n&&(t.name=n);for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var o=this[i]==null?this.proxy("properties."+i):this[i]();if(o==null)continue;t[e[i]]=o,i!==e[i]&&delete t[i]}return t};N.email=function(){var e=this.proxy("context.traits.email")||this.proxy("properties.email");if(e)return e;var t=this.userId();if(_i.default(t))return t};N.fullName=function(){var e=this.category(),t=this.name();return t&&e?e+" "+t:t};N.event=function(e){return e?"Viewed "+e+" Page":"Loaded a Page"};N.track=function(e){var t=this.json();return t.event=this.event(e),t.timestamp=this.timestamp(),t.properties=this.properties(),new bi.Track(t,this.opts)};var Ke={},wi=M&&M.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ke,"__esModule",{value:!0});Ke.Screen=void 0;var Si=wi(se),Ar=Ae,Ei=be;function ue(e,t){Ar.Page.call(this,e,t)}Ke.Screen=ue;Si.default(ue,Ar.Page);ue.prototype.action=function(){return"screen"};ue.prototype.type=ue.prototype.action;ue.prototype.event=function(e){return e?"Viewed "+e+" Screen":"Loaded a Screen"};ue.prototype.track=function(e){var t=this.json();return t.event=this.event(e),t.timestamp=this.timestamp(),t.properties=this.properties(),new Ei.Track(t,this.opts)};var $e={},Ii=M&&M.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty($e,"__esModule",{value:!0});$e.Delete=void 0;var Pi=Ii(se),Or=G;function Ft(e,t){Or.Facade.call(this,e,t)}$e.Delete=Ft;Pi.default(Ft,Or.Facade);Ft.prototype.type=function(){return"delete"};(function(e){var t=M&&M.__assign||function(){return t=Object.assign||function(l){for(var d,p=1,h=arguments.length;p<h;p++){d=arguments[p];for(var v in d)Object.prototype.hasOwnProperty.call(d,v)&&(l[v]=d[v])}return l},t.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.Delete=e.Screen=e.Page=e.Track=e.Identify=e.Group=e.Alias=e.Facade=void 0;var r=G;Object.defineProperty(e,"Facade",{enumerable:!0,get:function(){return r.Facade}});var n=Ue;Object.defineProperty(e,"Alias",{enumerable:!0,get:function(){return n.Alias}});var i=ze;Object.defineProperty(e,"Group",{enumerable:!0,get:function(){return i.Group}});var o=Pe;Object.defineProperty(e,"Identify",{enumerable:!0,get:function(){return o.Identify}});var a=be;Object.defineProperty(e,"Track",{enumerable:!0,get:function(){return a.Track}});var u=Ae;Object.defineProperty(e,"Page",{enumerable:!0,get:function(){return u.Page}});var s=Ke;Object.defineProperty(e,"Screen",{enumerable:!0,get:function(){return s.Screen}});var c=$e;Object.defineProperty(e,"Delete",{enumerable:!0,get:function(){return c.Delete}}),e.default=t(t({},r.Facade),{Alias:n.Alias,Group:i.Group,Identify:o.Identify,Track:a.Track,Page:u.Page,Screen:s.Screen,Delete:c.Delete})})(X);function Fe(e,t){var r=new X.Facade(e,t);return e.type==="track"&&(r=new X.Track(e,t)),e.type==="identify"&&(r=new X.Identify(e,t)),e.type==="page"&&(r=new X.Page(e,t)),e.type==="alias"&&(r=new X.Alias(e,t)),e.type==="group"&&(r=new X.Group(e,t)),e.type==="screen"&&(r=new X.Screen(e,t)),Object.defineProperty(r,"obj",{value:e,writable:!0}),r}var Ai=function(e){var t=!1;window.addEventListener("pagehide",function(){t||(t=!0,e(t))}),document.addEventListener("visibilitychange",function(){if(document.visibilityState=="hidden"){if(t)return;t=!0}else t=!1;e(t)})},xr=function(e){L(t,e);function t(r,n){var i=e.call(this,r)||this;return i.retryTimeout=n,i.name="RateLimitError",i}return t}(Error),Mr=function(e){return f({"Content-Type":"text/plain"},typeof e=="function"?e():e)},Oi=500,xi=64;function Tt(e){var t=encodeURI(JSON.stringify(e)).split(/%..|./).length-1;return t/1024}function Mi(e){return Tt(e)>=Oi-50}function Ci(e){return Tt(e)>=xi-10}function ki(e){var t=[],r=0;return e.forEach(function(n){var i=Tt(t[r]);i>=64&&r++,t[r]?t[r].push(n):t[r]=[n]}),t}function Di(e,t){var r,n,i=[],o=!1,a=(r=t==null?void 0:t.size)!==null&&r!==void 0?r:10,u=(n=t==null?void 0:t.timeout)!==null&&n!==void 0?n:5e3,s=0;function c(v){var m;if(v.length!==0){var S=(m=v[0])===null||m===void 0?void 0:m.writeKey,_=v.map(function(b){var E=b;E.sentAt;var O=Ht(E,["sentAt"]);return O});return Te("https://".concat(e,"/b"),{credentials:t==null?void 0:t.credentials,keepalive:(t==null?void 0:t.keepalive)||o,headers:Mr(t==null?void 0:t.headers),method:"post",body:JSON.stringify({writeKey:S,batch:_,sentAt:new Date().toISOString()}),priority:t==null?void 0:t.priority}).then(function(b){var E;if(b.status>=500)throw new Error("Bad response from server: ".concat(b.status));if(b.status===429){var O=(E=b.headers)===null||E===void 0?void 0:E.get("x-ratelimit-reset"),I=typeof O=="string"?parseInt(O)*1e3:u;throw new xr("Rate limit exceeded: ".concat(b.status),I)}})}}function l(v){var m;return v===void 0&&(v=1),y(this,void 0,void 0,function(){var S;return g(this,function(_){return i.length?(S=i,i=[],[2,(m=c(S))===null||m===void 0?void 0:m.catch(function(b){var E,O=z.system();O.log("error","Error sending batch",b),v<=((E=t==null?void 0:t.maxRetries)!==null&&E!==void 0?E:10)&&(b.name==="RateLimitError"&&(s=b.retryTimeout),i.push.apply(i,S),i.map(function(I){if("_metadata"in I){var x=I;x._metadata=f(f({},x._metadata),{retryCount:v})}}),p(v+1))})]):[2]})})}var d;function p(v){v===void 0&&(v=1),!d&&(d=setTimeout(function(){d=void 0,l(v).catch(console.error)},s||u),s=0)}Ai(function(v){if(o=v,o&&i.length){var m=ki(i).map(c);Promise.all(m).catch(console.error)}});function h(v,m){return y(this,void 0,void 0,function(){var S;return g(this,function(_){return i.push(m),S=i.length>=a||Mi(i)||(t==null?void 0:t.keepalive)&&Ci(i),[2,S||o?l():p()]})})}return{dispatch:h}}function Fi(e){function t(r,n){return Te(r,{credentials:e==null?void 0:e.credentials,keepalive:e==null?void 0:e.keepalive,headers:Mr(e==null?void 0:e.headers),method:"post",body:JSON.stringify(n),priority:e==null?void 0:e.priority}).then(function(i){var o;if(i.status>=500)throw new Error("Bad response from server: ".concat(i.status));if(i.status===429){var a=(o=i.headers)===null||o===void 0?void 0:o.get("x-ratelimit-reset"),u=a?parseInt(a)*1e3:5e3;throw new xr("Rate limit exceeded: ".concat(i.status),u)}})}return{dispatch:t}}function Ti(e,t,r,n,i){var o,a=e.user();delete t.options,t.writeKey=r==null?void 0:r.apiKey,t.userId=t.userId||a.id(),t.anonymousId=t.anonymousId||a.anonymousId(),t.sentAt=new Date;var u=e.queue.failedInitializations||[];u.length>0&&(t._metadata={failedInitializations:u}),i!=null&&(i.attempts>1&&(t._metadata=f(f({},t._metadata),{retryCount:i.attempts})),i.attempts++);var s=[],c=[];for(var l in n){var d=n[l];l==="Segment.io"&&s.push(l),d.bundlingStatus==="bundled"&&s.push(l),d.bundlingStatus==="unbundled"&&c.push(l)}for(var p=0,h=(r==null?void 0:r.unbundledIntegrations)||[];p<h.length;p++){var v=h[p];c.includes(v)||c.push(v)}var m=(o=r==null?void 0:r.maybeBundledConfigIds)!==null&&o!==void 0?o:{},S=[];return s.sort().forEach(function(_){var b;((b=m[_])!==null&&b!==void 0?b:[]).forEach(function(E){S.push(E)})}),(r==null?void 0:r.addBundledMetadata)!==!1&&(t._metadata=f(f({},t._metadata),{bundled:s.sort(),unbundled:c.sort(),bundledIds:S})),t}var ji=function(e,t){return y(void 0,void 0,void 0,function(){var r;return g(this,function(n){return r=function(i){return y(void 0,void 0,void 0,function(){var o;return g(this,function(a){switch(a.label){case 0:return e(i)?(o=r,[4,t()]):[3,2];case 1:return[2,o.apply(void 0,[a.sent()])];case 2:return[2]}})})},[2,r(void 0)]})})};function Ni(e,t){return y(this,void 0,void 0,function(){var r,n=this;return g(this,function(i){switch(i.label){case 0:return r=[],Ee()?[2,t]:[4,ji(function(){return t.length>0&&!Ee()},function(){return y(n,void 0,void 0,function(){var o,a,u;return g(this,function(s){switch(s.label){case 0:return o=t.pop(),o?[4,Se(o,e)]:[2];case 1:return a=s.sent(),u=a instanceof z,u||r.push(o),[2]}})})})];case 1:return i.sent(),r.map(function(o){return t.pushWithBackoff(o)}),[2,t]}})})}function ve(e,t,r,n){var i=this;e||setTimeout(function(){return y(i,void 0,void 0,function(){var o,a;return g(this,function(u){switch(u.label){case 0:return o=!0,[4,Ni(r,t)];case 1:return a=u.sent(),o=!1,t.todo>0&&n(o,a,r,n),[2]}})})},Math.random()*5e3)}function Li(e,t){var r,n,i,o,a=e.user();return t.previousId=(i=(n=(r=t.previousId)!==null&&r!==void 0?r:t.from)!==null&&n!==void 0?n:a.id())!==null&&i!==void 0?i:a.anonymousId(),t.userId=(o=t.userId)!==null&&o!==void 0?o:t.to,delete t.from,delete t.to,t}var Ri=function(e){return e.name==="Segment.io"};function Cr(e,t,r){var n,i,o;window.addEventListener("pagehide",function(){u.push.apply(u,Array.from(s)),s.clear()});var a=(n=t==null?void 0:t.apiKey)!==null&&n!==void 0?n:"",u=e.options.disableClientPersistence?new ft(e.queue.queue.maxAttempts,[]):new pt(e.queue.queue.maxAttempts,"".concat(a,":dest-Segment.io")),s=new Set,c=!1,l=(i=t==null?void 0:t.apiHost)!==null&&i!==void 0?i:rr,d=(o=t==null?void 0:t.protocol)!==null&&o!==void 0?o:"https",p="".concat(d,"://").concat(l),h=t==null?void 0:t.deliveryStrategy,v=h&&"strategy"in h&&h.strategy==="batching"?Di(l,h.config):Fi(h==null?void 0:h.config);function m(_){return y(this,void 0,void 0,function(){var b,E;return g(this,function(O){return Ee()?(u.push(_),ve(c,u,S,ve),[2,_]):(s.add(_),b=_.event.type.charAt(0),E=Fe(_.event).json(),_.event.type==="track"&&delete E.traits,_.event.type==="alias"&&(E=Li(e,E)),u.getAttempts(_)>=u.maxAttempts?(s.delete(_),[2,_]):[2,v.dispatch("".concat(p,"/").concat(b),Ti(e,E,t,r,_)).then(function(){return _}).catch(function(I){if(_.log("error","Error sending event",I),I.name==="RateLimitError"){var x=I.retryTimeout;u.pushWithBackoff(_,x)}else u.pushWithBackoff(_);return ve(c,u,S,ve),_}).finally(function(){s.delete(_)})])})})}var S={metadata:{writeKey:a,apiHost:l,protocol:d},name:"Segment.io",type:"destination",version:"0.1.0",isLoaded:function(){return!0},load:function(){return Promise.resolve()},track:m,identify:m,page:m,alias:m,group:m,screen:m};return u.todo&&ve(c,u,S,ve),S}var Z="This is being deprecated and will be not be available in future releases of Analytics JS",Je=ht(),We=Je==null?void 0:Je.analytics;function qi(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!1);var n=t?10:1,i=r?new ft(n,[]):new pt(n,e);return new Pn(i)}var Ui=function(){function e(t,r){var n;this.timeout=300,this._getSegmentPluginMetadata=function(){var o;return(o=r.plugins.find(Ri))===null||o===void 0?void 0:o.metadata},this.writeKey=t.writeKey;var i={integrations:{"Segment.io":{apiKey:""}}};this.cdnSettings=(n=t.cdnSettings)!==null&&n!==void 0?n:i,this.cdnURL=t.cdnURL}return Object.defineProperty(e.prototype,"apiHost",{get:function(){var t,r;return(r=(t=this._getSegmentPluginMetadata)===null||t===void 0?void 0:t.call(this))===null||r===void 0?void 0:r.apiHost},enumerable:!1,configurable:!0}),e}();function $(){console.warn(Z)}var jt=function(e){L(t,e);function t(r,n,i,o,a){var u=this,s,c;u=e.call(this)||this,u._debug=!1,u.initialized=!1,u.user=function(){return u._user},u.init=u.initialize.bind(u),u.log=$,u.addIntegrationMiddleware=$,u.listeners=$,u.addEventListener=$,u.removeAllListeners=$,u.removeListener=$,u.removeEventListener=$,u.hasListeners=$,u.add=$,u.addIntegration=$;var l=n==null?void 0:n.cookie,d=(s=n==null?void 0:n.disableClientPersistence)!==null&&s!==void 0?s:!1;u.queue=i??qi("".concat(r.writeKey,":event-queue"),n==null?void 0:n.retryQueue,d),u.settings=new Ui(r,u.queue);var p=n==null?void 0:n.storage;return u._universalStorage=u.createStore(d,p,l),u._user=o??new mt(f({persist:!d,storage:n==null?void 0:n.storage},n==null?void 0:n.user),l).load(),u._group=a??new yr(f({persist:!d,storage:n==null?void 0:n.storage},n==null?void 0:n.group),l).load(),u.eventFactory=new sr(u._user),u.integrations=(c=n==null?void 0:n.integrations)!==null&&c!==void 0?c:{},u.options=n??{},yt(u),u}return t.prototype.createStore=function(r,n,i){return r?new Y([new gt]):n&&hr(n)?new Y(nt(pr(n.stores,i))):new Y(nt([j.LocalStorage,{name:j.Cookie,settings:i},j.Memory]))},Object.defineProperty(t.prototype,"storage",{get:function(){return this._universalStorage},enumerable:!1,configurable:!0}),t.prototype.track=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return y(this,void 0,void 0,function(){var i,o,a,u,s,c,l,d=this;return g(this,function(p){return i=fe(r),o=er.apply(void 0,r),a=o[0],u=o[1],s=o[2],c=o[3],l=this.eventFactory.track(a,u,s,this.integrations,i),[2,this._dispatch(l,c).then(function(h){return d.emit("track",a,h.event.properties,h.event.options),h})]})})},t.prototype.page=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return y(this,void 0,void 0,function(){var i,o,a,u,s,c,l,d,p=this;return g(this,function(h){return i=fe(r),o=Ye.apply(void 0,r),a=o[0],u=o[1],s=o[2],c=o[3],l=o[4],d=this.eventFactory.page(a,u,s,c,this.integrations,i),[2,this._dispatch(d,l).then(function(v){return p.emit("page",a,u,v.event.properties,v.event.options),v})]})})},t.prototype.identify=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return y(this,void 0,void 0,function(){var i,o,a,u,s,c,l,d=this;return g(this,function(p){return i=fe(r),o=et(this._user).apply(void 0,r),a=o[0],u=o[1],s=o[2],c=o[3],this._user.identify(a,u),l=this.eventFactory.identify(this._user.id(),this._user.traits(),s,this.integrations,i),[2,this._dispatch(l,c).then(function(h){return d.emit("identify",h.event.userId,h.event.traits,h.event.options),h})]})})},t.prototype.group=function(){for(var r=this,n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];var o=fe(n);if(n.length===0)return this._group;var a=et(this._group).apply(void 0,n),u=a[0],s=a[1],c=a[2],l=a[3];this._group.identify(u,s);var d=this._group.id(),p=this._group.traits(),h=this.eventFactory.group(d,p,c,this.integrations,o);return this._dispatch(h,l).then(function(v){return r.emit("group",v.event.groupId,v.event.traits,v.event.options),v})},t.prototype.alias=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return y(this,void 0,void 0,function(){var i,o,a,u,s,c,l,d=this;return g(this,function(p){return i=fe(r),o=tr.apply(void 0,r),a=o[0],u=o[1],s=o[2],c=o[3],l=this.eventFactory.alias(a,u,s,this.integrations,i),[2,this._dispatch(l,c).then(function(h){return d.emit("alias",a,u,h.event.options),h})]})})},t.prototype.screen=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return y(this,void 0,void 0,function(){var i,o,a,u,s,c,l,d,p=this;return g(this,function(h){return i=fe(r),o=Ye.apply(void 0,r),a=o[0],u=o[1],s=o[2],c=o[3],l=o[4],d=this.eventFactory.screen(a,u,s,c,this.integrations,i),[2,this._dispatch(d,l).then(function(v){return p.emit("screen",a,u,v.event.properties,v.event.options),v})]})})},t.prototype.trackClick=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return y(this,void 0,void 0,function(){var i,o;return g(this,function(a){switch(a.label){case 0:return[4,q(()=>import("./auto-track-BxXPoe4g.js"),__vite__mapDeps([0,1,2]))];case 1:return i=a.sent(),[2,(o=i.link).call.apply(o,C([this],r,!1))]}})})},t.prototype.trackLink=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return y(this,void 0,void 0,function(){var i,o;return g(this,function(a){switch(a.label){case 0:return[4,q(()=>import("./auto-track-BxXPoe4g.js"),__vite__mapDeps([0,1,2]))];case 1:return i=a.sent(),[2,(o=i.link).call.apply(o,C([this],r,!1))]}})})},t.prototype.trackSubmit=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return y(this,void 0,void 0,function(){var i,o;return g(this,function(a){switch(a.label){case 0:return[4,q(()=>import("./auto-track-BxXPoe4g.js"),__vite__mapDeps([0,1,2]))];case 1:return i=a.sent(),[2,(o=i.form).call.apply(o,C([this],r,!1))]}})})},t.prototype.trackForm=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return y(this,void 0,void 0,function(){var i,o;return g(this,function(a){switch(a.label){case 0:return[4,q(()=>import("./auto-track-BxXPoe4g.js"),__vite__mapDeps([0,1,2]))];case 1:return i=a.sent(),[2,(o=i.form).call.apply(o,C([this],r,!1))]}})})},t.prototype.register=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return y(this,void 0,void 0,function(){var i,o,a=this;return g(this,function(u){switch(u.label){case 0:return i=z.system(),o=r.map(function(s){return a.queue.register(i,s,a)}),[4,Promise.all(o)];case 1:return u.sent(),[2,i]}})})},t.prototype.deregister=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return y(this,void 0,void 0,function(){var i,o,a=this;return g(this,function(u){switch(u.label){case 0:return i=z.system(),o=r.map(function(s){var c=a.queue.plugins.find(function(l){return l.name===s});if(c)return a.queue.deregister(i,c,a);i.log("warn","plugin ".concat(s," not found"))}),[4,Promise.all(o)];case 1:return u.sent(),[2,i]}})})},t.prototype.debug=function(r){return r===!1&&localStorage.getItem("debug")&&localStorage.removeItem("debug"),this._debug=r,this},t.prototype.reset=function(){this._user.reset(),this._group.reset(),this.emit("reset")},t.prototype.timeout=function(r){this.settings.timeout=r},t.prototype._dispatch=function(r,n){return y(this,void 0,void 0,function(){var i;return g(this,function(o){return i=new z(r),i.stats.increment("analytics_js.invoke",1,[r.type]),Ee()&&!this.options.retryQueue?[2,i]:[2,cn(i,this.queue,this,{callback:n,debug:this._debug,timeout:this.settings.timeout})]})})},t.prototype.addSourceMiddleware=function(r){return y(this,void 0,void 0,function(){var n=this;return g(this,function(i){switch(i.label){case 0:return[4,this.queue.criticalTasks.run(function(){return y(n,void 0,void 0,function(){var o,a,u;return g(this,function(s){switch(s.label){case 0:return[4,q(()=>Promise.resolve().then(()=>no),void 0)];case 1:return o=s.sent().sourceMiddlewarePlugin,a={},this.queue.plugins.forEach(function(c){if(c.type==="destination")return a[c.name]=!0}),u=o(r,a),[4,this.register(u)];case 2:return s.sent(),[2]}})})})];case 1:return i.sent(),[2,this]}})})},t.prototype.addDestinationMiddleware=function(r){for(var n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];return this.queue.plugins.filter(cr).forEach(function(o){(r==="*"||o.name.toLowerCase()===r.toLowerCase())&&o.addMiddleware.apply(o,n)}),Promise.resolve(this)},t.prototype.setAnonymousId=function(r){return this._user.anonymousId(r)},t.prototype.queryString=function(r){return y(this,void 0,void 0,function(){var n;return g(this,function(i){switch(i.label){case 0:return this.options.useQueryString===!1?[2,[]]:[4,q(()=>import("./index-Dw1-bBaI.js"),__vite__mapDeps([3,1,2]))];case 1:return n=i.sent().queryString,[2,n(this,r)]}})})},t.prototype.use=function(r){return r(this),this},t.prototype.ready=function(r){return r===void 0&&(r=function(n){return n}),y(this,void 0,void 0,function(){return g(this,function(n){return[2,Promise.all(this.queue.plugins.map(function(i){return i.ready?i.ready():Promise.resolve()})).then(function(i){return r(i),i})]})})},t.prototype.noConflict=function(){return console.warn(Z),Fn(We??this),this},t.prototype.normalize=function(r){return console.warn(Z),this.eventFactory.normalize(r)},Object.defineProperty(t.prototype,"failedInitializations",{get:function(){return console.warn(Z),this.queue.failedInitializations},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"VERSION",{get:function(){return je},enumerable:!1,configurable:!0}),t.prototype.initialize=function(r,n){return y(this,void 0,void 0,function(){return g(this,function(i){return console.warn(Z),[2,Promise.resolve(this)]})})},t.prototype.pageview=function(r){return y(this,void 0,void 0,function(){return g(this,function(n){switch(n.label){case 0:return console.warn(Z),[4,this.page({path:r})];case 1:return n.sent(),[2,this]}})})},Object.defineProperty(t.prototype,"plugins",{get:function(){var r;return console.warn(Z),(r=this._plugins)!==null&&r!==void 0?r:{}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"Integrations",{get:function(){console.warn(Z);var r=this.queue.plugins.filter(function(n){return n.type==="destination"}).reduce(function(n,i){var o="".concat(i.name.toLowerCase().replace(".","").split(" ").join("-"),"Integration"),a=window[o];if(!a)return n;var u=a.Integration;return u?(n[i.name]=u,n):(n[i.name]=a,n)},{});return r},enumerable:!1,configurable:!0}),t.prototype.push=function(r){var n=this,i=r.shift();i&&!n[i]||n[i].apply(this,r)},t}(lt),Gt=function(e){L(t,e);function t(){var r=e.call(this,{writeKey:""},{disableClientPersistence:!0})||this;return r.initialized=!0,r}return t}(jt),Jt={};function kr(){return typeof process>"u"||!Jt?{}:Jt}var zi=/(https:\/\/.*)\/analytics\.js\/v1\/(?:.*?)\/(?:platform|analytics.*)?/,Bi=function(){var e,t=Array.prototype.slice.call(document.querySelectorAll("script"));return t.forEach(function(r){var n,i=(n=r.getAttribute("src"))!==null&&n!==void 0?n:"",o=zi.exec(i);o&&o[1]&&(e=o[1])}),e},ke,Ki=function(){var e,t=ke??((e=_t())===null||e===void 0?void 0:e._cdn);return t},$i=function(e){var t=_t();t&&(t._cdn=e),ke=e},Nt=function(){var e=Ki();if(e)return e;var t=Bi();return t||"https://cdn.segment.com"},Ao=function(){var e=Nt();return"".concat(e,"/next-integrations")};function Vi(e,t){var r,n=Object.entries((r=t.integrations)!==null&&r!==void 0?r:{}).reduce(function(i,o){var a,u,s=o[0],c=o[1];return typeof c=="object"?f(f({},i),(a={},a[s]=c,a)):f(f({},i),(u={},u[s]={},u))},{});return Object.entries(e.integrations).reduce(function(i,o){var a,u=o[0],s=o[1];return f(f({},i),(a={},a[u]=f(f({},s),n[u]),a))},{})}function Gi(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch{return e}}function Ji(e){return y(this,void 0,void 0,function(){var t;return g(this,function(r){return t=navigator.userAgentData,t?e?[2,t.getHighEntropyValues(e).catch(function(){return t.toJSON()})]:[2,t.toJSON()]:[2,void 0]})})}var _e;function Wi(){if(_e)return _e;var e=dr(window.location.href);return _e={expires:31536e6,secure:!1,path:"/"},e&&(_e.domain=e),_e}function Qi(e){var t={btid:"dataxu",urid:"millennial-media"};e.startsWith("?")&&(e=e.substring(1)),e=e.replace(/\?/g,"&");for(var r=e.split("&"),n=0,i=r;n<i.length;n++){var o=i[n],a=o.split("="),u=a[0],s=a[1];if(t[u])return{id:s,type:t[u]}}}function Hi(e){return e.startsWith("?")&&(e=e.substring(1)),e=e.replace(/\?/g,"&"),e.split("&").reduce(function(t,r){var n=r.split("="),i=n[0],o=n[1],a=o===void 0?"":o;if(i.includes("utm_")&&i.length>4){var u=i.slice(4);u==="campaign"&&(u="name"),t[u]=Gi(a)}return t},{})}function Xi(){var e=W.get("_ga");if(e&&e.startsWith("amp"))return e}function Zi(e,t,r){var n,i=new Y(r?[]:[new vr(Wi())]),o=i.get("s:context.referrer"),a=(n=Qi(e))!==null&&n!==void 0?n:o;a&&(t&&(t.referrer=f(f({},t.referrer),a)),i.set("s:context.referrer",a))}var Yi=function(e){try{var t=new URLSearchParams;return Object.entries(e).forEach(function(r){var n=r[0],i=r[1];Array.isArray(i)?i.forEach(function(o){return t.append(n,o)}):t.append(n,i)}),t.toString()}catch{return""}},eo=function(){function e(){var t=this;this.name="Page Enrichment",this.type="before",this.version="0.1.0",this.isLoaded=function(){return!0},this.load=function(r,n){return y(t,void 0,void 0,function(){var i;return g(this,function(o){switch(o.label){case 0:this.instance=n,o.label=1;case 1:return o.trys.push([1,3,,4]),i=this,[4,Ji(this.instance.options.highEntropyValuesClientHints)];case 2:return i.userAgentData=o.sent(),[3,4];case 3:return o.sent(),[3,4];case 4:return[2,Promise.resolve()]}})})},this.enrich=function(r){var n,i,o=r.event.context,a=o.page.search||"",u=typeof a=="object"?Yi(a):a;o.userAgent=navigator.userAgent,o.userAgentData=t.userAgentData;var s=navigator.userLanguage||navigator.language;typeof o.locale>"u"&&typeof s<"u"&&(o.locale=s),(n=o.library)!==null&&n!==void 0||(o.library={name:"analytics.js",version:"".concat("npm:next","-").concat(je)}),u&&!o.campaign&&(o.campaign=Hi(u));var c=Xi();c&&(o.amp={id:c}),Zi(u,o,(i=t.instance.options.disableClientPersistence)!==null&&i!==void 0?i:!1);try{o.timezone=Intl.DateTimeFormat().resolvedOptions().timeZone}catch{}return r},this.track=this.enrich,this.identify=this.enrich,this.page=this.enrich,this.group=this.enrich,this.alias=this.enrich,this.screen=this.enrich}return e}(),to=new eo;function Dr(e){var t=Array.prototype.slice.call(window.document.querySelectorAll("script"));return t.find(function(r){return r.src===e})}function Qe(e,t){var r=Dr(e);if(r!==void 0){var n=r==null?void 0:r.getAttribute("status");if(n==="loaded")return Promise.resolve(r);if(n==="loading")return new Promise(function(i,o){r.addEventListener("load",function(){return i(r)}),r.addEventListener("error",function(a){return o(a)})})}return new Promise(function(i,o){var a,u=window.document.createElement("script");u.type="text/javascript",u.src=e,u.async=!0,u.setAttribute("status","loading");for(var s=0,c=Object.entries({});s<c.length;s++){var l=c[s],d=l[0],p=l[1];u.setAttribute(d,p)}u.onload=function(){u.onerror=u.onload=null,u.setAttribute("status","loaded"),i(u)},u.onerror=function(){u.onerror=u.onload=null,u.setAttribute("status","error"),o(new Error("Failed to load ".concat(e)))};var h=window.document.querySelector("script");h?(a=h.parentElement)===null||a===void 0||a.insertBefore(u,h):window.document.head.appendChild(u)})}function Oo(e){var t=Dr(e);return t!==void 0&&t.remove(),Promise.resolve()}function Fr(e,t,r){return y(this,void 0,void 0,function(){function n(c,l){return y(this,void 0,void 0,function(){var d,p,h;return g(this,function(v){switch(v.label){case 0:return d=!1,p=null,[4,l({payload:Fe(c,{clone:!0,traverse:!1}),integration:e,next:function(m){d=!0,m===null&&(p=null),m&&(p=m.obj)}})];case 1:return v.sent(),!d&&p!==null&&(p=p,p.integrations=f(f({},c.integrations),(h={},h[e]=!1,h))),[2,p]}})})}var i,o,a,u,s;return g(this,function(c){switch(c.label){case 0:i=Fe(t,{clone:!0,traverse:!1}).rawEvent(),o=0,a=r,c.label=1;case 1:return o<a.length?(u=a[o],[4,n(i,u)]):[3,4];case 2:if(s=c.sent(),s===null)return[2,null];i=s,c.label=3;case 3:return o++,[3,1];case 4:return[2,i]}})})}function ro(e,t){function r(n){return y(this,void 0,void 0,function(){var i;return g(this,function(o){switch(o.label){case 0:return i=!1,[4,e({payload:Fe(n.event,{clone:!0,traverse:!1}),integrations:t??{},next:function(a){i=!0,a&&(n.event=a.obj)}})];case 1:if(o.sent(),!i)throw new ae({retry:!1,type:"middleware_cancellation",reason:"Middleware `next` function skipped"});return[2,n]}})})}return{name:"Source Middleware ".concat(e.name),type:"before",version:"0.1.0",isLoaded:function(){return!0},load:function(n){return Promise.resolve(n)},track:r,page:r,screen:r,identify:r,alias:r,group:r}}const no=Object.freeze(Object.defineProperty({__proto__:null,applyDestinationMiddleware:Fr,sourceMiddlewarePlugin:ro},Symbol.toStringTag,{value:"Module"}));function we(e,t){var r=t.methodName,n=t.integrationName,i=t.type,o=t.didError,a=o===void 0?!1:o;e.stats.increment("analytics_js.integration.invoke".concat(a?".error":""),1,["method:".concat(r),"integration_name:".concat(n),"type:".concat(i)])}var io=function(){function e(t,r){this.version="1.0.0",this.alternativeNames=[],this.loadPromise=Xt(),this.middleware=[],this.alias=this._createMethod("alias"),this.group=this._createMethod("group"),this.identify=this._createMethod("identify"),this.page=this._createMethod("page"),this.screen=this._createMethod("screen"),this.track=this._createMethod("track"),this.action=r,this.name=t,this.type=r.type,this.alternativeNames.push(r.name)}return e.prototype.addMiddleware=function(){for(var t,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];this.type==="destination"&&(t=this.middleware).push.apply(t,r)},e.prototype.transform=function(t){return y(this,void 0,void 0,function(){var r;return g(this,function(n){switch(n.label){case 0:return[4,Fr(this.name,t.event,this.middleware)];case 1:return r=n.sent(),r===null&&t.cancel(new ae({retry:!1,reason:"dropped by destination middleware"})),[2,new z(r)]}})})},e.prototype._createMethod=function(t){var r=this;return function(n){return y(r,void 0,void 0,function(){var i,o;return g(this,function(a){switch(a.label){case 0:return this.action[t]?(i=n,this.type!=="destination"?[3,2]:[4,this.transform(n)]):[2,n];case 1:i=a.sent(),a.label=2;case 2:return a.trys.push([2,5,,6]),[4,this.ready()];case 3:if(!a.sent())throw new Error("Something prevented the destination from getting ready");return we(n,{integrationName:this.action.name,methodName:t,type:"action"}),[4,this.action[t](i)];case 4:return a.sent(),[3,6];case 5:throw o=a.sent(),we(n,{integrationName:this.action.name,methodName:t,type:"action",didError:!0}),o;case 6:return[2,n]}})})}},e.prototype.isLoaded=function(){return this.action.isLoaded()},e.prototype.ready=function(){return y(this,void 0,void 0,function(){return g(this,function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,this.loadPromise.promise];case 1:return t.sent(),[2,!0];case 2:return t.sent(),[2,!1];case 3:return[2]}})})},e.prototype.load=function(t,r){return y(this,void 0,void 0,function(){var n,i,o,a;return g(this,function(u){switch(u.label){case 0:if(this.loadPromise.isSettled())return[2,this.loadPromise.promise];u.label=1;case 1:return u.trys.push([1,3,,4]),we(t,{integrationName:this.action.name,methodName:"load",type:"action"}),n=this.action.load(t,r),o=(i=this.loadPromise).resolve,[4,n];case 2:return o.apply(i,[u.sent()]),[2,n];case 3:throw a=u.sent(),we(t,{integrationName:this.action.name,methodName:"load",type:"action",didError:!0}),this.loadPromise.reject(a),a;case 4:return[2]}})})},e.prototype.unload=function(t,r){var n,i;return(i=(n=this.action).unload)===null||i===void 0?void 0:i.call(n,t,r)},e}();function oo(e){if(!Array.isArray(e))throw new Error("Not a valid list of plugins");var t=["load","isLoaded","name","version","type"];return e.forEach(function(r){t.forEach(function(n){var i;if(r[n]===void 0)throw new Error("Plugin: ".concat((i=r.name)!==null&&i!==void 0?i:"unknown"," missing required function ").concat(n))})}),!0}function ao(e,t){var r=e[t.creationName],n=e[t.name];return e.All===!1&&!r&&!n||r===!1||n===!1}function uo(e,t){return y(this,void 0,void 0,function(){var r,n,i,o,a,u;return g(this,function(s){switch(s.label){case 0:if(s.trys.push([0,9,,10]),r=new RegExp("https://cdn.segment.(com|build)"),n=Nt(),!t)return[3,6];i=e.url.split("/"),o=i[i.length-2],a=e.url.replace(o,btoa(o).replace(/=/g,"")),s.label=1;case 1:return s.trys.push([1,3,,5]),[4,Qe(a.replace(r,n))];case 2:return s.sent(),[3,5];case 3:return s.sent(),[4,Qe(e.url.replace(r,n))];case 4:return s.sent(),[3,5];case 5:return[3,8];case 6:return[4,Qe(e.url.replace(r,n))];case 7:s.sent(),s.label=8;case 8:return typeof window[e.libraryName]=="function"?[2,window[e.libraryName]]:[3,10];case 9:throw u=s.sent(),console.error("Failed to create PluginFactory",e),u;case 10:return[2]}})})}function so(e,t,r,n,i,o){var a,u,s;return y(this,void 0,void 0,function(){var c,l,d,p=this;return g(this,function(h){switch(h.label){case 0:return c=[],l=(u=(a=e.middlewareSettings)===null||a===void 0?void 0:a.routingRules)!==null&&u!==void 0?u:[],d=((s=e.remotePlugins)!==null&&s!==void 0?s:[]).map(function(v){return y(p,void 0,void 0,function(){var m,S,_,b,E,O,I;return g(this,function(x){switch(x.label){case 0:if(ao(t,v))return[2];x.label=1;case 1:return x.trys.push([1,6,,7]),S=o==null?void 0:o.find(function(k){var Q=k.pluginName;return Q===v.name}),S?[3,3]:[4,uo(v,n==null?void 0:n.obfuscate)];case 2:S=x.sent(),x.label=3;case 3:return m=S,m?(_=r[v.name],[4,m(f(f({},v.settings),_))]):[3,5];case 4:b=x.sent(),E=Array.isArray(b)?b:[b],oo(E),O=l.filter(function(k){return k.destinationName===v.creationName}),E.forEach(function(k){var Q=new io(v.creationName,k);O.length&&i&&Q.addMiddleware(i),c.push(Q)}),x.label=5;case 5:return[3,7];case 6:return I=x.sent(),console.warn("Failed to load Remote Plugin",I),we(z.system(),{integrationName:v.name,methodName:"load",type:"action",didError:!0}),[3,7];case 7:return[2]}})})}),[4,Promise.all(d)];case 1:return h.sent(),[2,c.filter(Boolean)]}})})}var He,Wt,co=ht(),Qt=(He=(Wt=co).__SEGMENT_INSPECTOR__)!==null&&He!==void 0?He:Wt.__SEGMENT_INSPECTOR__={},lo=function(e){var t;return(t=Qt.attach)===null||t===void 0?void 0:t.call(Qt,e)};function fo(e,t){return Te("".concat(t,"/v1/projects/").concat(e,"/settings")).then(function(r){return r.ok?r.json():r.text().then(function(n){throw new Error(n)})}).catch(function(r){throw console.error(r.message),r})}function vo(e){return kr().NODE_ENV!=="test"&&Object.keys(e.integrations).length>1}function ho(e){var t,r,n;return kr().NODE_ENV!=="test"&&((n=(r=(t=e.middlewareSettings)===null||t===void 0?void 0:t.routingRules)===null||r===void 0?void 0:r.length)!==null&&n!==void 0?n:0)>0}function po(e,t){Rn(e,t),Ln(e,t)}function yo(e,t,r){return y(this,void 0,void 0,function(){return g(this,function(n){switch(n.label){case 0:return[4,mo(e,t)];case 1:return n.sent(),qn(e,r),[2]}})})}var go=function(){var e,t,r=(e=window.location.hash)!==null&&e!==void 0?e:"",n=(t=window.location.search)!==null&&t!==void 0?t:"",i=n.length?n:r.replace(/(?=#).*(?=\?)/,"");return i},mo=function(e,t){return y(void 0,void 0,void 0,function(){return g(this,function(r){switch(r.label){case 0:return t.includes("ajs_")?[4,e.queryString(t).catch(console.error)]:[3,2];case 1:r.sent(),r.label=2;case 2:return[2]}})})};function bo(e,t,r,n,i,o,a){var u,s,c;return i===void 0&&(i=[]),y(this,void 0,void 0,function(){var l,d,p,h,v,m,S,_,b,E,O,I,x,k,Q,Tr=this;return g(this,function(T){switch(T.label){case 0:return po(r,a),l=i==null?void 0:i.filter(function(D){return typeof D=="object"}),d=i==null?void 0:i.filter(function(D){return typeof D=="function"&&typeof D.pluginName=="string"}),ho(t)?[4,q(()=>import("./index-SSgaCJsD.js"),[]).then(function(D){return D.tsubMiddleware(t.middlewareSettings.routingRules)})]:[3,2];case 1:return h=T.sent(),[3,3];case 2:h=void 0,T.label=3;case 3:return p=h,vo(t)||o.length>0?[4,q(()=>import("./index-CmTH1mn1.js"),__vite__mapDeps([4,1,5,2])).then(function(D){return D.ajsDestinations(e,t,r.integrations,n,p,o)})]:[3,5];case 4:return m=T.sent(),[3,6];case 5:m=[],T.label=6;case 6:return v=m,t.legacyVideoPluginsEnabled?[4,q(()=>import("./index-DX_PNZlK.js"),__vite__mapDeps([6,1])).then(function(D){return D.loadLegacyVideoPlugins(r)})]:[3,8];case 7:T.sent(),T.label=8;case 8:return!((u=n.plan)===null||u===void 0)&&u.track?[4,q(()=>import("./index-BAkdueH0.js"),__vite__mapDeps([7,1,5])).then(function(D){var te;return D.schemaFilter((te=n.plan)===null||te===void 0?void 0:te.track,t)})]:[3,10];case 9:return _=T.sent(),[3,11];case 10:_=void 0,T.label=11;case 11:return S=_,b=Vi(t,n),[4,so(t,r.integrations,b,n,p,d).catch(function(D){return console.error("Failed to load remote plugins",D),[]})];case 12:return E=T.sent(),O=C(C([to],v,!0),E,!0),S&&O.push(S),I=((s=n.integrations)===null||s===void 0?void 0:s.All)===!1&&!n.integrations["Segment.io"]||n.integrations&&n.integrations["Segment.io"]===!1,I?[3,14]:(k=(x=O).push,[4,Cr(r,b["Segment.io"],t.integrations)]);case 13:k.apply(x,[T.sent()]),T.label=14;case 14:return[4,r.register.apply(r,C(C([],O,!1),l,!1))];case 15:return Q=T.sent(),[4,Nn(r,a)];case 16:return T.sent(),Object.entries((c=t.enabledMiddleware)!==null&&c!==void 0?c:{}).some(function(D){var te=D[1];return te})?[4,q(()=>import("./index-D4HP5DQC.js"),__vite__mapDeps([8,1,2])).then(function(D){var te=D.remoteMiddlewares;return y(Tr,void 0,void 0,function(){var Lt,Rt;return g(this,function(qt){switch(qt.label){case 0:return[4,te(Q,t,n.obfuscate)];case 1:return Lt=qt.sent(),Rt=Lt.map(function(jr){return r.addSourceMiddleware(jr)}),[2,Promise.all(Rt)]}})})})]:[3,18];case 17:T.sent(),T.label=18;case 18:return[4,jn(r,a)];case 19:return T.sent(),[2,Q]}})})}function _o(e,t,r){var n,i,o,a,u,s,c,l,d;return t===void 0&&(t={}),y(this,void 0,void 0,function(){var p,h,v,m,S,_,b,E,O,I,x;return g(this,function(k){switch(k.label){case 0:return t.disable===!0?[2,[new Gt,z.system()]]:(t.globalAnalyticsKey&&Dn(t.globalAnalyticsKey),e.cdnURL&&$i(e.cdnURL),t.initialPageview&&r.add(new it("page",[])),p=go(),h=(n=e.cdnURL)!==null&&n!==void 0?n:Nt(),(i=e.cdnSettings)!==null&&i!==void 0?(m=i,[3,3]):[3,1]);case 1:return[4,fo(e.writeKey,h)];case 2:m=k.sent(),k.label=3;case 3:return v=m,t.updateCDNSettings&&(v=t.updateCDNSettings(v)),typeof t.disable!="function"?[3,5]:[4,t.disable(v)];case 4:if(S=k.sent(),S)return[2,[new Gt,z.system()]];k.label=5;case 5:return _=(a=(o=v.integrations["Segment.io"])===null||o===void 0?void 0:o.retryQueue)!==null&&a!==void 0?a:!0,t=f({retryQueue:_},t),b=new jt(f(f({},e),{cdnSettings:v,cdnURL:h}),t),lo(b),E=(u=e.plugins)!==null&&u!==void 0?u:[],O=(s=e.classicIntegrations)!==null&&s!==void 0?s:[],I=(c=t.integrations)===null||c===void 0?void 0:c["Segment.io"],nr.initRemoteMetrics(f(f({},v.metrics),{host:(l=I==null?void 0:I.apiHost)!==null&&l!==void 0?l:(d=v.metrics)===null||d===void 0?void 0:d.host,protocol:I==null?void 0:I.protocol})),[4,bo(e.writeKey,v,b,t,E,O,r)];case 6:return x=k.sent(),b.initialized=!0,b.emit("initialize",e,t),[4,yo(b,p,r)];case 7:return k.sent(),[2,[b,x]]}})})}var wo=function(e){L(t,e);function t(){var r=this,n=Xt(),i=n.promise,o=n.resolve;return r=e.call(this,function(a){return i.then(function(u){var s=u[0],c=u[1];return _o(s,c,a)})})||this,r._resolveLoadStart=function(a,u){return o([a,u])},r}return t.prototype.load=function(r,n){return n===void 0&&(n={}),this._resolveLoadStart(r,n),this},t.load=function(r,n){return n===void 0&&(n={}),new t().load(r,n)},t.standalone=function(r,n){return t.load({writeKey:r},n).then(function(i){return i[0]})},t}(zn),So=function(){function e(){}return e.load=function(){return Promise.reject(new Error("AnalyticsNode is not available in browsers."))},e}();const xo=Object.freeze(Object.defineProperty({__proto__:null,Analytics:jt,AnalyticsBrowser:wo,AnalyticsNode:So,Context:z,ContextCancelation:ae,EventFactory:sr,Group:yr,UniversalStorage:Y,User:mt,getGlobalAnalytics:_t,isDestinationPluginWithAddMiddleware:cr,resolveAliasArguments:tr,resolveArguments:er,resolvePageArguments:Ye,resolveUserArguments:et,segmentio:Cr},Symbol.toStringTag,{value:"Module"}));export{ae as C,ft as P,Ao as a,Ee as b,Fr as c,X as d,Po as e,Xt as f,Gi as g,pt as h,U as i,ji as j,Se as k,Qe as l,Vi as m,z as n,ln as o,Wr as p,xo as q,we as r,Oo as u};