@dcl/shop 1.7.1-31588894536.commit-0f93920 → 1.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (229) hide show
  1. package/_assets/{Activity-CAIMQmev.js → Activity-DSCP3qVT.js} +4 -4
  2. package/_assets/{AnimatedBackground-DKm2k4Wc.js → AnimatedBackground-DI6E3R8h.js} +6 -6
  3. package/_assets/{Assets-DyNBGiYV.js → Assets-BoDVV5Un.js} +7 -7
  4. package/_assets/{Authorizations-868XMoyJ.js → Authorizations-DlT06os0.js} +2 -2
  5. package/_assets/{Cart-DhZ_Dzy8.js → Cart-98H8SEDi.js} +2 -2
  6. package/_assets/{CircularProgress-CEUgemCx.js → CircularProgress-CVMElXyN.js} +2 -2
  7. package/_assets/{Collection-CCiTPgGM.js → Collection-kp118x-L.js} +2 -2
  8. package/_assets/{CollectionCarousel-BrW6NiqU.js → CollectionCarousel-Bi0QxTqN.js} +3 -3
  9. package/_assets/{Confetti-CVU-1nr5.js → Confetti-W3F-dgtT.js} +4 -4
  10. package/_assets/{ConstantsUtil-0F9G_2vd.js → ConstantsUtil-H5MzXw_a.js} +2 -2
  11. package/_assets/{ContentClient-Bfa96vUa.js → ContentClient-CouwHQze.js} +2 -2
  12. package/_assets/{Creator-DmmqINo6.js → Creator-DuIxXv5-.js} +2 -2
  13. package/_assets/{DeploymentBuilder-DHs8vMi-.js → DeploymentBuilder-RTPThLbC.js} +2 -2
  14. package/_assets/{EmotePlaybackBar-C4pC2y75.js → EmotePlaybackBar-CwnUkIi2.js} +3 -3
  15. package/_assets/{ErrorNotice-CFo7FDnC.js → ErrorNotice-DInl_aPc.js} +2 -2
  16. package/_assets/{ExchangeController-CAu607Z8.js → ExchangeController-BHhqTqpp.js} +2 -2
  17. package/_assets/{Faq-ygN1-ye9.js → Faq-CaLlq-Oz.js} +2 -2
  18. package/_assets/{GetCredits-C-AFbRmX.js → GetCredits-DrG2HYOY.js} +8 -8
  19. package/_assets/{Grow-ld_qJ4E5.js → Grow-BuawLV7j.js} +2 -2
  20. package/_assets/{HelpersUtil-51efUM7f.js → HelpersUtil-DxE7pdoJ.js} +2 -2
  21. package/_assets/{ItemDetail-Bk6Ilhzl.js → ItemDetail-D1lNYrvj.js} +2 -2
  22. package/_assets/{JumpInIcon-BAljRyGG.js → JumpInIcon-gwWkyigc.js} +2 -2
  23. package/_assets/{LoadMore-C29kowIa.js → LoadMore-BLj9usRy.js} +2 -2
  24. package/_assets/{ManaPricingBanner.styles-CKrSDo3j.js → ManaPricingBanner.styles-C5QyYWv_.js} +2 -2
  25. package/_assets/{MyAssets-BQcUf9AL.js → MyAssets-BHHo-axx.js} +2 -2
  26. package/_assets/{MyFavorites-DhZyns5f.js → MyFavorites-qN6xot5-.js} +2 -2
  27. package/_assets/{NetworkUtil-nRqmIpnu.js → NetworkUtil-eeGGUC7p.js} +2 -2
  28. package/_assets/{NotFound-fkbp1O4l.js → NotFound-CjS_h0nT.js} +2 -2
  29. package/_assets/{NotificationsBell-CKHYNAPf.js → NotificationsBell-BxNn8kmF.js} +2 -2
  30. package/_assets/{OutfitDetail--VIHFbs3.js → OutfitDetail-DcwkX_BA.js} +2 -2
  31. package/_assets/{OutfitPreview-CJckSXtv.js → OutfitPreview-Dzwv8CZm.js} +2 -2
  32. package/_assets/{OutfitStudio-DW_Rh-vh.js → OutfitStudio-Kg0wPrSp.js} +2 -2
  33. package/_assets/{StoreSettings-BWf3Inde.js → StoreSettings-BMhll_uY.js} +2 -2
  34. package/_assets/{Success-BVsFyguM.js → Success--EmgMp_h.js} +2 -2
  35. package/_assets/{SwapController-BJNuSCji.js → SwapController-DBYu3_GC.js} +2 -2
  36. package/_assets/{Tooltip-CEyw56qd.js → Tooltip-DRKOJG6M.js} +2 -2
  37. package/_assets/{TradeService-BEAx6ShY.js → TradeService-CMmg1hhm.js} +2 -2
  38. package/_assets/{W3MFrameProviderSingleton-BM7gIcXH.js → W3MFrameProviderSingleton-BZDRIDaX.js} +4 -4
  39. package/_assets/{WebCryptoP256-CvHQrgjm.js → WebCryptoP256-DngvQsIc.js} +2 -2
  40. package/_assets/{authorizations-BCPty3xr.js → authorizations-Bp29CgB8.js} +2 -2
  41. package/_assets/{basic-B-ECNtDn.js → basic-D-nCiahk.js} +2 -2
  42. package/_assets/{biconomy-CpqXbU_3.js → biconomy-ChcwZEzk.js} +2 -2
  43. package/_assets/{browseLayout.styles-CPQhzf_a.js → browseLayout.styles-EyGWvLIQ.js} +2 -2
  44. package/_assets/{browser-1PSFOf0k.js → browser-8yCVpLQu.js} +2 -2
  45. package/_assets/{browser-ponyfill-B0XPdVp-.js → browser-ponyfill-BmvHJGnt.js} +2 -2
  46. package/_assets/{builder-zmK3sqCQ.js → builder-DSIPU3qH.js} +2 -2
  47. package/_assets/{buy-rQO3scaA.js → buy-4aaQ0a-u.js} +2 -2
  48. package/_assets/{buy-gasless-1kYMw-nW.js → buy-gasless-BVf_EoZF.js} +2 -2
  49. package/_assets/{ccip-CW_DY1sp.js → ccip-C2v3VpEN.js} +2 -2
  50. package/_assets/{ccip-joV7eJHU.js → ccip-tsmIe2rK.js} +2 -2
  51. package/_assets/{chains-DWKINAq9.js → chains-ZGrkcPp8.js} +2 -2
  52. package/_assets/{collectionPage.styles-trKfK7L_.js → collectionPage.styles-x9Ys9-EJ.js} +7 -7
  53. package/_assets/{common-cfcqSmek.js → common-DbVrNU8d.js} +2 -2
  54. package/_assets/{controller-DjFNAIiu.js → controller-BxLT4wSK.js} +3 -3
  55. package/_assets/{core-QBdCXyMS.js → core-fYHKdQB7.js} +5 -5
  56. package/_assets/{createSvgIcon-1GoZim_f.js → createSvgIcon-DK7LeDz8.js} +2 -2
  57. package/_assets/{custom-Bq3ndvnI.js → custom-CNWBSH0Y.js} +2 -2
  58. package/_assets/{data-capture-M46PQV3c.js → data-capture-BRE7a_Af.js} +2 -2
  59. package/_assets/{dcl-schemas-CwIIbqmb.js → dcl-schemas--SOz4s6t.js} +2 -2
  60. package/_assets/{decimals-DQfw6mEf.js → decimals-BRIIwlS4.js} +2 -2
  61. package/_assets/{decimals-DC1J1Mjn.js → decimals-Cwkjreuy.js} +2 -2
  62. package/_assets/{detectExtension-DVKUUhe6.js → detectExtension-D_bmEQsq.js} +2 -2
  63. package/_assets/{disposePreview-BCROAJ5X.js → disposePreview-BM0qOKtx.js} +2 -2
  64. package/_assets/{email-BwhRV6HZ.js → email-BmAjF25r.js} +2 -2
  65. package/_assets/{embedded-wallet-D3735tM1.js → embedded-wallet-CrYsPIo3.js} +2 -2
  66. package/_assets/{emotion-styled.browser.esm-DkeqJInM.js → emotion-styled.browser.esm-QAN7vOQx.js} +2 -2
  67. package/_assets/{engine-D6RYOBCQ.js → engine-Qfbe01DZ.js} +2 -2
  68. package/_assets/{errors-CWKJBVf4.js → errors-Pkf3SgsD.js} +2 -2
  69. package/_assets/{estimate-l1-fee-DgrWJfBK.js → estimate-l1-fee-BhPYKs0i.js} +2 -2
  70. package/_assets/{eth_estimateGas-CRdk7aYf.js → eth_estimateGas-DJtpIKCF.js} +2 -2
  71. package/_assets/{eth_getStorageAt-DCZoOmQN.js → eth_getStorageAt-BvVTVakd.js} +2 -2
  72. package/_assets/{eth_getTransactionCount-TeS0FP0G.js → eth_getTransactionCount-CTg3O9yy.js} +2 -2
  73. package/_assets/{ethereum-DHaveOx9.js → ethereum-BHI7M48A.js} +2 -2
  74. package/_assets/{ethers-DVDHopXp.js → ethers-BGK6CGbc.js} +2 -2
  75. package/_assets/{events-CpKVlcAM.js → events-dtXWOsMC.js} +2 -2
  76. package/_assets/{execute-BIAHnJjd.js → execute-C8YYpwHp.js} +3 -3
  77. package/_assets/{extractIPFS-DK-PFdZt.js → extractIPFS-K2F3vQ0J.js} +2 -2
  78. package/_assets/{features-Bqif8VHC.js → features-CXUhxSHE.js} +2 -2
  79. package/_assets/{fetchTokenMetadata-Dk-57tBc.js → fetchTokenMetadata-D2sHJ20d.js} +3 -3
  80. package/_assets/{field.styles-uQ1PnRAy.js → field.styles-lQKL7wnA.js} +2 -2
  81. package/_assets/{fortmatic-CIKCsIdC.js → fortmatic-VbcTaYCb.js} +2 -2
  82. package/_assets/{get-bytecode-BCcQ6kd9.js → get-bytecode-CHdK0jd1.js} +2 -2
  83. package/_assets/{get-ecosystem-wallet-info-BVmqcC9R.js → get-ecosystem-wallet-info-BTsiiXK0.js} +2 -2
  84. package/_assets/{getBalance-Dp4dteCv.js → getBalance-Cc-ynq9O.js} +3 -3
  85. package/_assets/{getInstalledModules-DC3XrovY.js → getInstalledModules-CUmb37N4.js} +2 -2
  86. package/_assets/{getNFT-Djj34AfA.js → getNFT-DrE5xjA6.js} +2 -2
  87. package/_assets/{getNFT-f3v5trY8.js → getNFT-quDZXBOG.js} +3 -3
  88. package/_assets/{grid.styles-ZppzttG-.js → grid.styles-ZTmDzFjp.js} +2 -2
  89. package/_assets/{hashTypedData-C04Nhun4.js → hashTypedData-Cw8rSdk5.js} +2 -2
  90. package/_assets/{hashTypedData-DZiH6ccZ.js → hashTypedData-DtLk4Oqc.js} +2 -2
  91. package/_assets/{in-app-BgOWwUKo.js → in-app-XuiUAS3s.js} +2 -2
  92. package/_assets/{in-app-wallet-calls-Cv6gBRr6.js → in-app-wallet-calls-dlWnJrek.js} +2 -2
  93. package/_assets/{index-BszDg5_5.js → index-7EHHt4dM.js} +2 -2
  94. package/_assets/{index-CyfmBuu_.js → index-7gPoET6B.js} +2 -2
  95. package/_assets/{index-C_f2zaIz.js → index-B-AIFgeo.js} +2 -2
  96. package/_assets/{index-BHfQ9_H8.js → index-B-_i8PBE.js} +2 -2
  97. package/_assets/{index-DhHMj7KI.js → index-B0KcUDm0.js} +2 -2
  98. package/_assets/{index-BFzAz8op.js → index-B2VG6Otl.js} +3 -3
  99. package/_assets/{index-gxYhXczt.js → index-B4WtCx0a.js} +2 -2
  100. package/_assets/{index-LbOK9eTW.js → index-B6F_Rucm.js} +2 -2
  101. package/_assets/{index-b-_4YTQv.js → index-B6rGZKVV.js} +2 -2
  102. package/_assets/{index-BcgdIpKl.js → index-B8X_PuAG.js} +2 -2
  103. package/_assets/{index-Dg3OQ8Xt.js → index-BFbab9CT.js} +2 -2
  104. package/_assets/{index-D8iKBIYy.js → index-BGx3L_1D.js} +2 -2
  105. package/_assets/{index-DWFvqWtb.js → index-BHP4R-KS.js} +4 -4
  106. package/_assets/{index-B-FPzTKZ.js → index-BSiRCa0g.js} +2 -2
  107. package/_assets/{index-D5LMwbLL.js → index-BXHRk0yG.js} +2 -2
  108. package/_assets/{index-B1TDG-Vi.js → index-BeGu1OK5.js} +2 -2
  109. package/_assets/{index-B_XTf3G-.js → index-Bfwb72mL.js} +2 -2
  110. package/_assets/{index-BgtMbLPk.js → index-BjbppcFc.js} +2 -2
  111. package/_assets/{index-BaeQkftI.js → index-BmPDz-lq.js} +2 -2
  112. package/_assets/{index-DwK8uZkt.js → index-Bp5YE3NX.js} +2 -2
  113. package/_assets/{index-B9flCgCU.js → index-BzXbsAOr.js} +2 -2
  114. package/_assets/{index-sazFNMlE.js → index-C2if4RD2.js} +2 -2
  115. package/_assets/{index-CLuPIiE9.js → index-C6eQqGHR.js} +2 -2
  116. package/_assets/{index-592VJ4uv.js → index-C8V_2yLm.js} +2 -2
  117. package/_assets/{index-CEV9OhE3.js → index-CA2RKWQC.js} +2 -2
  118. package/_assets/{index-RE_putUI.js → index-CGKgopQY.js} +3 -3
  119. package/_assets/{index-xyFKJe3z.js → index-CHQz8mM1.js} +3 -3
  120. package/_assets/{index-BbwaRI_i.js → index-CPvTZ3mm.js} +2 -2
  121. package/_assets/{index-jF6K-3oZ.js → index-CTOwNiNy.js} +2 -2
  122. package/_assets/{index-7fwNS7y4.js → index-CTlXshC8.js} +2 -2
  123. package/_assets/{index-C_Ndb12H.js → index-CWaSn_Fb.js} +2 -2
  124. package/_assets/{index-P2_o9BRS.js → index-CXF1GvZf.js} +2 -2
  125. package/_assets/{index-DuUvt_hl.js → index-Cew2sd8o.js} +2 -2
  126. package/_assets/{index-DzyBsQ1a.js → index-CmHFYeQW.js} +2 -2
  127. package/_assets/{index-CvCjQTmN.js → index-Cp6zKIzb.js} +2 -2
  128. package/_assets/{index-DTQ-uvG4.js → index-Cs9MFQFw.js} +2 -2
  129. package/_assets/{index-oofnocyt.js → index-Ct4f_kk7.js} +2 -2
  130. package/_assets/{index-BdS2FUJe.js → index-D7Vr2oVM.js} +12 -12
  131. package/_assets/{index-B1m7u3wT.js → index-D7qOh2Pb.js} +2 -2
  132. package/_assets/{index-DttPdeAl.js → index-DFae84bA.js} +2 -2
  133. package/_assets/{index-DdW8GqwI.js → index-DHcc1n0K.js} +2 -2
  134. package/_assets/{index-BocL0tbY.js → index-DJFSJQ6v.js} +2 -2
  135. package/_assets/{index-CYXFiWVm.js → index-DJY8bktM.js} +2 -2
  136. package/_assets/{index-DEqk3G2e.js → index-DKKtGhbW.js} +2 -2
  137. package/_assets/{index-uX5ZPCnv.js → index-DLpbip__.js} +2 -2
  138. package/_assets/{index-BMMXte8W.js → index-DNEXEMAx.js} +2 -2
  139. package/_assets/{index-BblsXhnJ.js → index-DS0AiyWl.js} +2 -2
  140. package/_assets/{index-CsU0I8ti.js → index-DVG-jLyq.js} +2 -2
  141. package/_assets/{index-CI3RUzKD.js → index-DWCrguT4.js} +2 -2
  142. package/_assets/{index-ZcfwfPlU.js → index-DevU24aH.js} +2 -2
  143. package/_assets/{index-Cd5TFRIE.js → index-DiNnPlO5.js} +4 -4
  144. package/_assets/{index-Di4xoesU.js → index-DiwLErnV.js} +2 -2
  145. package/_assets/{index-CW_4Ejbn.js → index-GC1Q65VQ.js} +2 -2
  146. package/_assets/{index-BYkw73Yq.js → index-GLWmYkx4.js} +2 -2
  147. package/_assets/{index-DCJZfsmv.js → index-Ja9_mxz7.js} +4 -4
  148. package/_assets/{index-DVb7mReH.js → index-TQ31Dj9G.js} +2 -2
  149. package/_assets/{index-DQyOKqo7.js → index-Wa87Q05Z.js} +2 -2
  150. package/_assets/{index-LF4DSHm1.js → index-X6c4Uv6E.js} +2 -2
  151. package/_assets/{index-7I03gVBf.js → index-XX0RysAj.js} +2 -2
  152. package/_assets/{index-BhGLhtmx.js → index-XmZ_5wbk.js} +2 -2
  153. package/_assets/{index-9LtJJQuT.js → index-gEDrLFcO.js} +2 -2
  154. package/_assets/{index-CXayA0NQ.js → index-hcGr914s.js} +2 -2
  155. package/_assets/{index-Cy7KYvRk.js → index-pSNJtHsU.js} +2 -2
  156. package/_assets/{index-BWKvSm0u.js → index-sLrcgF-e.js} +2 -2
  157. package/_assets/{index-Dx1MrVL-.js → index-yN1Hh4Se.js} +2 -2
  158. package/_assets/{index-DIvTCArL.js → index-ydLU_5Gn.js} +3 -3
  159. package/_assets/{index-eT2k9D8b.js → index-zxKYmTZp.js} +2 -2
  160. package/_assets/{index.es-iV0rTxkP.js → index.es-C5gwSK8p.js} +5 -5
  161. package/_assets/{index.es-CNTylbzh.js → index.es-DCk5s8aZ.js} +2 -2
  162. package/_assets/{index.es-GvnbEZn3.js → index.es-DXO6gTHr.js} +2 -2
  163. package/_assets/{index.es-DNhPk9Fo.js → index.es-DgIVXTLg.js} +2 -2
  164. package/_assets/items-empty-Ch7uK_cC.js +2 -0
  165. package/_assets/{linkAccount-D5r12047.js → linkAccount-tKw9D7Vs.js} +2 -2
  166. package/_assets/{localBatchGatewayRequest-BqW9sMFu.js → localBatchGatewayRequest-BDIxXCol.js} +2 -2
  167. package/_assets/{native-Cn4JqdZY.js → native-Bz1HptbK.js} +2 -2
  168. package/_assets/{networks-DEgoVb33.js → networks-Br0BLqPR.js} +2 -2
  169. package/_assets/{onramp-8CvJsTZc.js → onramp-CuUrfCki.js} +2 -2
  170. package/_assets/{openzeppelin-hcNQGy7v.js → openzeppelin-D-JFhdr0.js} +2 -2
  171. package/_assets/{ownerOf-C-KdeCaS.js → ownerOf-BYoH6fJy.js} +2 -2
  172. package/_assets/{parseNft-C2_pKVvN.js → parseNft-SkdP6ZWl.js} +3 -3
  173. package/_assets/{parseSignature-CgLtCFJB.js → parseSignature-0MbHeBsG.js} +2 -2
  174. package/_assets/{parseSignature-BtgjmsYZ.js → parseSignature-DyGLTNfl.js} +4 -4
  175. package/_assets/{passkeys-BqumdcNE.js → passkeys-DyqK36QT.js} +2 -2
  176. package/_assets/{pay-with-exchange-HrN-VYJ9.js → pay-with-exchange-Dwi8NtSl.js} +2 -2
  177. package/_assets/{prepare-contract-call-bgG5M2HL.js → prepare-contract-call-DSjIXieB.js} +2 -2
  178. package/_assets/{qr-overlay-DY_CWHzc.js → qr-overlay-CmEL3PEn.js} +4 -4
  179. package/_assets/{react-C_Ms5avg.js → react-CPKOypa5.js} +2 -2
  180. package/_assets/{receive-Uf_y-NNP.js → receive-DsBylJty.js} +2 -2
  181. package/_assets/{resolveImplementation-CZmv0eXl.js → resolveImplementation-DbQfhb72.js} +2 -2
  182. package/_assets/{resume-buy-CfeXSfok.js → resume-buy-7yxAf7iG.js} +2 -2
  183. package/_assets/{rpc-PrD7jBR2.js → rpc-CPWgZb0d.js} +2 -2
  184. package/_assets/{sales-empty-CGZDCb5B.js → sales-empty-000uqg0s.js} +2 -2
  185. package/_assets/{search-empty-ozG3xThw.js → search-empty-h0zJ0pvu.js} +2 -2
  186. package/_assets/{secp256k1-BhrDYyFa.js → secp256k1-CRcsJ61A.js} +2 -2
  187. package/_assets/{secp256k1-BHI-vx_v.js → secp256k1-CyDqUXh0.js} +2 -2
  188. package/_assets/{secp256k1-WdjnTGos.js → secp256k1-QdDJCZZ8.js} +2 -2
  189. package/_assets/{send-shBVQAvk.js → send-YURKn6T0.js} +2 -2
  190. package/_assets/{send-batch-transaction-D9wyH-wg.js → send-batch-transaction-DlrF3ECN.js} +2 -2
  191. package/_assets/{send-eip712-transaction-CkL3rqV4.js → send-eip712-transaction-DL0MdBtR.js} +3 -3
  192. package/_assets/{send-gasless-transaction-zq2sgcaX.js → send-gasless-transaction-Lit3VLzk.js} +3 -3
  193. package/_assets/{send-transaction-DJTo0ZnC.js → send-transaction-eG41zAfO.js} +3 -3
  194. package/_assets/{sendMetaTransaction-Ac4epPGJ.js → sendMetaTransaction-LMY2d53Q.js} +2 -2
  195. package/_assets/{sendRawTransaction-0YEWbBCH.js → sendRawTransaction-ZBmmYmyk.js} +4 -4
  196. package/_assets/{sentry-Bhm9UKEB.js → sentry-Dhl3FQKR.js} +3 -3
  197. package/_assets/{serializeTransaction-BpfoDzd2.js → serializeTransaction-BV8O5uLy.js} +2 -2
  198. package/_assets/{session-proposal-Bf5YI7id.js → session-proposal-xqSYsPIQ.js} +2 -2
  199. package/_assets/{session-request-C0jXYn1e.js → session-request-BcCCmadp.js} +3 -3
  200. package/_assets/{sha256-C2OBeEaI.js → sha256-BOQDDqPA.js} +2 -2
  201. package/_assets/{signing-CbF1Pvq_.js → signing-CNpKg_vp.js} +4 -4
  202. package/_assets/{skeleton.styles-Bq-VPRTX.js → skeleton.styles-Dtw6XMDS.js} +2 -2
  203. package/_assets/{socials-Cn_X4rb2.js → socials-D58ZHtqS.js} +2 -2
  204. package/_assets/{styled-D7NeVRtc.js → styled-BUVq9rPS.js} +2 -2
  205. package/_assets/{swaps-CfAU4-9c.js → swaps-xcPgt9Tf.js} +2 -2
  206. package/_assets/{thirdweb-BcvsUXDi.js → thirdweb-4dN90LaI.js} +4 -4
  207. package/_assets/{to-serializable-transaction-Bg-YYBoQ.js → to-serializable-transaction-Bsbzt-I2.js} +3 -3
  208. package/_assets/{totalSupply-BfKwFr-Z.js → totalSupply-C8piMspG.js} +2 -2
  209. package/_assets/{transaction-C3WLAVV3.js → transaction-DKG_a6g-.js} +2 -2
  210. package/_assets/{transactionReceipt-Ddkj8GMA.js → transactionReceipt-Co69hre1.js} +2 -2
  211. package/_assets/{transactions-B9yMU6jG.js → transactions-Cx163gKY.js} +2 -2
  212. package/_assets/useCreditPacks-BFMlIcuP.js +2 -0
  213. package/_assets/{useInfiniteGrid-CM1L7iyF.js → useInfiniteGrid-D4LyqgVq.js} +2 -2
  214. package/_assets/{useStore-lYCt-umU.js → useStore-CUpQXMuK.js} +3 -3
  215. package/_assets/{useTheme-CtvPOYgK.js → useTheme-By5MMSvI.js} +2 -2
  216. package/_assets/{utils-Jm1Wnn2P.js → utils-C3caSBM-.js} +2 -2
  217. package/_assets/{verifyHash-Crkjpl3l.js → verifyHash-BEhRQ8gC.js} +2 -2
  218. package/_assets/{w3m-modal-BGOUdQ83.js → w3m-modal-9oohg6Nw.js} +2 -2
  219. package/_assets/{w3m-modal-BCqa7kHV.js → w3m-modal-BJSRAvV3.js} +2 -2
  220. package/_assets/{wait-for-tx-receipt-DHQ8UCIP.js → wait-for-tx-receipt-BZg4176M.js} +2 -2
  221. package/_assets/{wallets-DMveBGFJ.js → wallets-BgFKM5Un.js} +6 -6
  222. package/_assets/{web-connector-DmQZHgH0.js → web-connector-13zKCG8W.js} +4 -4
  223. package/_assets/{writeContract-BaWaaGJQ.js → writeContract-BCrBUtwK.js} +2 -2
  224. package/_assets/{zora-sepolia-BOr0SWJ7.js → zora-sepolia-BKmyGkTB.js} +2 -2
  225. package/_assets/{zoraTestnet-CStlCn_A.js → zoraTestnet-BYfzXpe9.js} +2 -2
  226. package/index.html +11 -11
  227. package/package.json +2 -2
  228. package/_assets/items-empty-Hnl1Qssg.js +0 -2
  229. package/_assets/useCreditPacks-BZi7jTOh.js +0 -2
@@ -1,4 +1,4 @@
1
- import{j as n,r as k}from"./react-C_Ms5avg.js";import{s as a,t as r,b as y,q as M,E as O,c1 as T,m as ce,I as K,h as N,aY as le,bO as pe,g as j,f as C,b1 as Q,$ as U,ap as he,cs as ue,ct as X,Q as ge}from"./index-BdS2FUJe.js";import{s as xe,i as P,A as F,g as W,r as Z,m as J,k as G,l as Y}from"./authorizations-BCPty3xr.js";import{i as fe}from"./errors-CWKJBVf4.js";import{E as me}from"./ErrorNotice-CFo7FDnC.js";import{k as be,l as we,m as _,n as ye,o as ve}from"./buy-rQO3scaA.js";import{s as ee,M as te,E as ae}from"./sendMetaTransaction-Ac4epPGJ.js";import{I as ke,C as ne}from"./ethers-DVDHopXp.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="d80eb6c6-669d-4b7d-bf6f-9c759913387b",t._sentryDebugIdIdentifier="sentry-dbid-d80eb6c6-669d-4b7d-bf6f-9c759913387b")}catch{}})();const S="shop:resume_after_signin",je=900*1e3;function xt(t){try{sessionStorage.setItem(S,JSON.stringify({...t,at:Date.now()}))}catch{}}function ft(t){let e;try{e=sessionStorage.getItem(S)}catch{return null}if(!e)return null;try{sessionStorage.removeItem(S)}catch{}let i;try{i=JSON.parse(e)}catch{return null}return!i||i.type!==t||typeof i.at!="number"||Date.now()-i.at>je?null:i.type==="cart-checkout"?{type:"cart-checkout"}:{type:"item-buy",path:i.path}}const I="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Group%201'%3e%3cpath%20id='Vector'%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M12%202L22%2012L12%2022L2%2012L12%202ZM12%204.8L19.2%2012L12%2019.2L4.8%2012L12%204.8ZM12%2015.6C12.9548%2015.6001%2013.8705%2015.2209%2014.5457%2014.5459C15.2209%2013.8708%2015.6003%2012.9552%2015.6004%2012.0004C15.6005%2011.0456%2015.2213%2010.1299%2014.5463%209.45471C13.8712%208.7795%2012.9556%208.40011%2012.0008%208.4C11.0461%208.4%2010.1304%208.77928%209.45525%209.45442C8.78012%2010.1295%208.40083%2011.0452%208.40083%2012C8.40083%2012.9548%208.78012%2013.8705%209.45525%2014.5456C10.1304%2015.2207%2011.0461%2015.6%2012.0008%2015.6H12Z'%20fill='white'/%3e%3cg%20id='Rectangle%201'%3e%3c/g%3e%3c/g%3e%3c/svg%3e",Ce=a.div`
1
+ import{j as n,r as k}from"./react-CPKOypa5.js";import{s as a,t as r,b as y,q as M,E as O,c1 as T,m as ce,I as K,h as N,aY as le,bO as pe,g as j,f as C,b1 as Q,$ as U,ap as he,cs as ue,ct as X,Q as ge}from"./index-D7Vr2oVM.js";import{s as xe,i as P,A as F,g as W,r as Z,m as J,k as G,l as Y}from"./authorizations-Bp29CgB8.js";import{i as fe}from"./errors-Pkf3SgsD.js";import{E as me}from"./ErrorNotice-DInl_aPc.js";import{k as be,l as we,m as _,n as ye,o as ve}from"./buy-4aaQ0a-u.js";import{s as ee,M as te,E as ae}from"./sendMetaTransaction-LMY2d53Q.js";import{I as ke,C as ne}from"./ethers-BGK6CGbc.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="ad0afe90-6cbc-4acb-ad02-a2781832737a",t._sentryDebugIdIdentifier="sentry-dbid-ad0afe90-6cbc-4acb-ad02-a2781832737a")}catch{}})();const S="shop:resume_after_signin",je=900*1e3;function xt(t){try{sessionStorage.setItem(S,JSON.stringify({...t,at:Date.now()}))}catch{}}function ft(t){let e;try{e=sessionStorage.getItem(S)}catch{return null}if(!e)return null;try{sessionStorage.removeItem(S)}catch{}let i;try{i=JSON.parse(e)}catch{return null}return!i||i.type!==t||typeof i.at!="number"||Date.now()-i.at>je?null:i.type==="cart-checkout"?{type:"cart-checkout"}:{type:"item-buy",path:i.path}}const I="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Group%201'%3e%3cpath%20id='Vector'%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M12%202L22%2012L12%2022L2%2012L12%202ZM12%204.8L19.2%2012L12%2019.2L4.8%2012L12%204.8ZM12%2015.6C12.9548%2015.6001%2013.8705%2015.2209%2014.5457%2014.5459C15.2209%2013.8708%2015.6003%2012.9552%2015.6004%2012.0004C15.6005%2011.0456%2015.2213%2010.1299%2014.5463%209.45471C13.8712%208.7795%2012.9556%208.40011%2012.0008%208.4C11.0461%208.4%2010.1304%208.77928%209.45525%209.45442C8.78012%2010.1295%208.40083%2011.0452%208.40083%2012C8.40083%2012.9548%208.78012%2013.8705%209.45525%2014.5456C10.1304%2015.2207%2011.0461%2015.6%2012.0008%2015.6H12Z'%20fill='white'/%3e%3cg%20id='Rectangle%201'%3e%3c/g%3e%3c/g%3e%3c/svg%3e",Ce=a.div`
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  gap: 12px;
@@ -287,7 +287,7 @@ import{j as n,r as k}from"./react-C_Ms5avg.js";import{s as a,t as r,b as y,q as
287
287
  @media (prefers-reduced-motion: reduce) {
288
288
  animation: none;
289
289
  }
290
- `;function wt({auth:t,signer:e,step:i,title:o,reason:d,name:c,image:m,icon:g,onAuthorized:w,onCancel:u,onClose:x}){const[f,p]=k.useState(!1),[l,v]=k.useState(null);async function b(){p(!0),v(null);try{await xe({auth:t,signer:e,active:!0}),w()}catch(h){fe(h)?v(y("authorizeStep.errorRejected")):(N(h,{flow:"authorize_step",kind:t.kind}),v(y("authorizeStep.errorGeneric"))),p(!1)}}return n.jsx($e,{onClick:f?void 0:x,role:"presentation","data-testid":"authorize-step-scrim",children:n.jsxs(Te,{onClick:h=>h.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":o,children:[n.jsxs(Ie,{children:[n.jsx(Be,{children:o}),i&&i.total>1?n.jsx(Se,{"data-testid":"authorize-step-count",children:y("authorizeStep.stepOf",{index:i.index,total:i.total})}):null,n.jsx(Ee,{onClick:x,disabled:f,"aria-label":y("authorizeStep.close"),children:n.jsx(K,{name:"close",className:"ico"})})]}),n.jsxs(Ne,{"data-testid":"authorize-step-row",children:[n.jsx(Pe,{children:m?n.jsx("img",{src:m,alt:""}):g}),n.jsxs(Fe,{children:[n.jsx(Ve,{title:c,children:c}),n.jsx(qe,{children:d})]})]}),n.jsx(De,{children:y("authorizeStep.note")}),n.jsx(me,{message:l}),n.jsxs(Le,{children:[n.jsx(Oe,{type:"button",onClick:u,disabled:f,children:y("authorizeStep.cancel")}),n.jsx(Xe,{type:"button","data-testid":"authorize-step-action",onClick:()=>void b(),disabled:f,children:f?n.jsxs(n.Fragment,{children:[n.jsx(He,{"aria-hidden":!0}),y("authorizeStep.authorizing")]}):y("authorizeStep.authorize")})]})]})})}const yt="data:image/webp;base64,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",vt="https://cdn.decentraland.org/@dcl/shop/1.7.1-31588894536.commit-0f93920/_assets/buy-error-22UunaPC.png";function Re(t,e){return(t+e-1n)/e}function Ke(t,e,i){return t<=0||e<=0?0n:t>=e?i:Re(i*BigInt(t),BigInt(e))}function kt(t){var u,x,f;const e=Number.isFinite(t.priceCents)?Math.max(0,Math.trunc(t.priceCents)):0,i=Number.isFinite(t.balanceCents)?Math.max(0,Math.trunc(t.balanceCents)):0,o=t.priceManaWei>0n?t.priceManaWei:0n,d=t.manaBalanceWei>0n?t.manaBalanceWei:0n;if(e<=0)return{options:[],preferred:null,manaShortfall:null};const c=[];if(i>=e&&c.push({method:"credits",creditsCents:e,credits:le(e),manaWei:0n}),o>0n&&i>0&&i<e){const p=e-i,l=Ke(p,e,o);d>=l&&c.push({method:"combined",creditsCents:i,credits:pe(i),manaWei:l})}o>0n&&d>=o&&c.push({method:"mana",creditsCents:0,credits:0,manaWei:o});const m=((u=c.find(p=>p.method==="credits"))==null?void 0:u.method)??((x=c.find(p=>p.method==="combined"))==null?void 0:x.method)??((f=c.find(p=>p.method==="mana"))==null?void 0:f.method)??null,w=!c.some(p=>p.method==="mana"||p.method==="combined")&&o>0n&&d>0n?{manaWei:d,manaCents:Qe(d,e,o),priceCents:e}:null;return{options:c,preferred:m,manaShortfall:w}}function Qe(t,e,i){return Number(t*BigInt(e)/i)}function jt(t,e){let i=Number.isFinite(e)?Math.max(0,Math.trunc(e)):0;return t.map(o=>{const d=Number.isFinite(o)?Math.max(0,Math.trunc(o)):0,c=Math.min(d,i);return i-=c,c})}function Ct(t,e){return t.options.find(i=>i.method===e)??null}async function Mt(t){const[e]=await re({...t,trades:[t.trade]});return e}async function At(t){const[e]=await re({...t,trades:[],mints:[t.mint]});return e}async function re(t){const{trades:e,mints:i=[],buyer:o,signer:d,onSigned:c,manaWei:m}=t;if(e.length===0&&i.length===0)throw new Error("No items to buy");const g=new Map;for(const x of e){const f=`${x.chainId}:${x.contract.toLowerCase()}`,p=g.get(f);p?p.push(x):g.set(f,[x])}const w=new Map;for(const x of i){const f=w.get(x.chainId);f?f.push(x):w.set(x.chainId,[x])}const u=[];for(const x of g.values())u.push(await Ue({trades:x,buyer:o,signer:d,onSigned:c,requiredManaWei:m}));for(const[x,f]of w){const p=m??f.reduce((l,v)=>l+BigInt(v.item.priceWei),0n);u.push(await Ze({mints:f,chainId:x,buyer:o,signer:d,onSigned:c,requiredManaWei:p}))}return u}async function Ue(t){const{trades:e,buyer:i,signer:o,onSigned:d,requiredManaWei:c}=t,m=e[0],g=j(Q(m.contract),m.chainId),w=j(C.MANAToken,m.chainId);await P({auth:{kind:F.Allowance,contractAddress:w.address,spenderAddress:g.address,chainId:m.chainId},signer:o,requiredWei:c});const u=e.map(l=>we(l,i));if(W.enabled)try{const l=new ke(g.abi).encodeFunctionData("accept",[u]),v=Z(),b=J(o.provider,v),h=await ee(b,v,l,g,{serverURL:W.relayerUrl});return d==null||d(),await G(h,"the MANA purchase"),h}catch(l){if(l instanceof te&&l.code===ae.USER_DENIED||l instanceof Y)throw l;N(l,{flow:"buy_mana",step:"gasless_fallback"})}await U(o.provider,m.chainId);const f=await new ne(g.address,g.abi,o).accept(u,_(m.chainId));return d==null||d(),(await f.wait()).transactionHash}async function Ze(t){const{mints:e,chainId:i,buyer:o,signer:d,onSigned:c,requiredManaWei:m}=t,g=j(C.CollectionStore,i),w=j(C.MANAToken,i),u=e.map(l=>l.item);if(await P({auth:{kind:F.Allowance,contractAddress:w.address,spenderAddress:g.address,chainId:i},signer:d,requiredWei:m}),W.enabled)try{const l=ye(u,o,g.abi),v=Z(),b=J(d.provider,v),h=await ee(b,v,l,g,{serverURL:W.relayerUrl});return c==null||c(),await G(h,"the MANA purchase"),h}catch(l){if(l instanceof te&&l.code===ae.USER_DENIED||l instanceof Y)throw l;N(l,{flow:"buy_mint_mana",step:"gasless_fallback"})}await U(d.provider,i);const f=await new ne(g.address,g.abi,d).buy(ve(u,o),_(i));return c==null||c(),(await f.wait()).transactionHash}async function zt(t){const{trade:e,...i}=t;return oe({target:{kind:"trade",trade:e},...i})}async function Wt(t){const{mint:e,...i}=t;return oe({target:{kind:"store",mint:e},...i})}async function oe(t){const{target:e,buyer:i,signer:o,credits:d,manaGapWei:c,onBroadcast:m,onReverted:g}=t;if(d.length===0)throw new Error("No credits to spend — use the MANA-only rail for that");if(c<=0n)throw new Error("No MANA gap to cover — use the credits-only rail for that");const w=se(e),u=j(C.MANAToken,w),x=j(C.CreditsManager,w);await P({auth:{kind:F.Allowance,contractAddress:u.address,spenderAddress:x.address,chainId:w},signer:o,requiredWei:c});const p=(d.reduce((l,v)=>l+BigInt(v.availableAmount),0n)+c).toString();return be({purchase:Je(e,d,p),buyer:i,signer:o,onBroadcast:m,onReverted:g})}function se(t){return t.kind==="trade"?t.trade.chainId:t.mint.chainId}function Je(t,e,i){return t.kind==="trade"?{kind:"trade",trade:t.trade,credits:e,maxCreditedValue:i}:{kind:"store",item:t.mint.item,chainId:t.mint.chainId,credits:e,maxCreditedValue:i}}function $t(t,e){const i=se(e);return t==="combined"?{spender:j(C.CreditsManager,i).address,chainId:i}:{spender:e.kind==="trade"?j(Q(e.trade.contract),i).address:j(C.CollectionStore,i).address,chainId:i}}function Tt(t){return n.jsx("svg",{viewBox:"0 0 18 18",width:"18",height:"18","aria-hidden":!0,...t,children:n.jsx("path",{d:"M4 4l10 10M14 4L4 14",stroke:"#161518",strokeWidth:"1.8",strokeLinecap:"round"})})}function It(t){return n.jsx("svg",{viewBox:"0 0 20 20",width:"24",height:"24","aria-hidden":!0,...t,children:n.jsx("path",{fill:"#f48221",d:"M10 0a10 10 0 1 1 0 20 10 10 0 0 1 0-20Zm0 2a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm0 11a1 1 0 1 1 0 2 1 1 0 0 1 0-2Zm0-8a1 1 0 0 1 1 1v5a1 1 0 1 1-2 0V6a1 1 0 0 1 1-1Z"})})}const{colors:s,gradients:V,radius:de,z:Ge}=r,Bt=a.div`
290
+ `;function wt({auth:t,signer:e,step:i,title:o,reason:d,name:c,image:m,icon:g,onAuthorized:w,onCancel:u,onClose:x}){const[f,p]=k.useState(!1),[l,v]=k.useState(null);async function b(){p(!0),v(null);try{await xe({auth:t,signer:e,active:!0}),w()}catch(h){fe(h)?v(y("authorizeStep.errorRejected")):(N(h,{flow:"authorize_step",kind:t.kind}),v(y("authorizeStep.errorGeneric"))),p(!1)}}return n.jsx($e,{onClick:f?void 0:x,role:"presentation","data-testid":"authorize-step-scrim",children:n.jsxs(Te,{onClick:h=>h.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":o,children:[n.jsxs(Ie,{children:[n.jsx(Be,{children:o}),i&&i.total>1?n.jsx(Se,{"data-testid":"authorize-step-count",children:y("authorizeStep.stepOf",{index:i.index,total:i.total})}):null,n.jsx(Ee,{onClick:x,disabled:f,"aria-label":y("authorizeStep.close"),children:n.jsx(K,{name:"close",className:"ico"})})]}),n.jsxs(Ne,{"data-testid":"authorize-step-row",children:[n.jsx(Pe,{children:m?n.jsx("img",{src:m,alt:""}):g}),n.jsxs(Fe,{children:[n.jsx(Ve,{title:c,children:c}),n.jsx(qe,{children:d})]})]}),n.jsx(De,{children:y("authorizeStep.note")}),n.jsx(me,{message:l}),n.jsxs(Le,{children:[n.jsx(Oe,{type:"button",onClick:u,disabled:f,children:y("authorizeStep.cancel")}),n.jsx(Xe,{type:"button","data-testid":"authorize-step-action",onClick:()=>void b(),disabled:f,children:f?n.jsxs(n.Fragment,{children:[n.jsx(He,{"aria-hidden":!0}),y("authorizeStep.authorizing")]}):y("authorizeStep.authorize")})]})]})})}const yt="data:image/webp;base64,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",vt="https://cdn.decentraland.org/@dcl/shop/1.8.0/_assets/buy-error-22UunaPC.png";function Re(t,e){return(t+e-1n)/e}function Ke(t,e,i){return t<=0||e<=0?0n:t>=e?i:Re(i*BigInt(t),BigInt(e))}function kt(t){var u,x,f;const e=Number.isFinite(t.priceCents)?Math.max(0,Math.trunc(t.priceCents)):0,i=Number.isFinite(t.balanceCents)?Math.max(0,Math.trunc(t.balanceCents)):0,o=t.priceManaWei>0n?t.priceManaWei:0n,d=t.manaBalanceWei>0n?t.manaBalanceWei:0n;if(e<=0)return{options:[],preferred:null,manaShortfall:null};const c=[];if(i>=e&&c.push({method:"credits",creditsCents:e,credits:le(e),manaWei:0n}),o>0n&&i>0&&i<e){const p=e-i,l=Ke(p,e,o);d>=l&&c.push({method:"combined",creditsCents:i,credits:pe(i),manaWei:l})}o>0n&&d>=o&&c.push({method:"mana",creditsCents:0,credits:0,manaWei:o});const m=((u=c.find(p=>p.method==="credits"))==null?void 0:u.method)??((x=c.find(p=>p.method==="combined"))==null?void 0:x.method)??((f=c.find(p=>p.method==="mana"))==null?void 0:f.method)??null,w=!c.some(p=>p.method==="mana"||p.method==="combined")&&o>0n&&d>0n?{manaWei:d,manaCents:Qe(d,e,o),priceCents:e}:null;return{options:c,preferred:m,manaShortfall:w}}function Qe(t,e,i){return Number(t*BigInt(e)/i)}function jt(t,e){let i=Number.isFinite(e)?Math.max(0,Math.trunc(e)):0;return t.map(o=>{const d=Number.isFinite(o)?Math.max(0,Math.trunc(o)):0,c=Math.min(d,i);return i-=c,c})}function Ct(t,e){return t.options.find(i=>i.method===e)??null}async function Mt(t){const[e]=await re({...t,trades:[t.trade]});return e}async function At(t){const[e]=await re({...t,trades:[],mints:[t.mint]});return e}async function re(t){const{trades:e,mints:i=[],buyer:o,signer:d,onSigned:c,manaWei:m}=t;if(e.length===0&&i.length===0)throw new Error("No items to buy");const g=new Map;for(const x of e){const f=`${x.chainId}:${x.contract.toLowerCase()}`,p=g.get(f);p?p.push(x):g.set(f,[x])}const w=new Map;for(const x of i){const f=w.get(x.chainId);f?f.push(x):w.set(x.chainId,[x])}const u=[];for(const x of g.values())u.push(await Ue({trades:x,buyer:o,signer:d,onSigned:c,requiredManaWei:m}));for(const[x,f]of w){const p=m??f.reduce((l,v)=>l+BigInt(v.item.priceWei),0n);u.push(await Ze({mints:f,chainId:x,buyer:o,signer:d,onSigned:c,requiredManaWei:p}))}return u}async function Ue(t){const{trades:e,buyer:i,signer:o,onSigned:d,requiredManaWei:c}=t,m=e[0],g=j(Q(m.contract),m.chainId),w=j(C.MANAToken,m.chainId);await P({auth:{kind:F.Allowance,contractAddress:w.address,spenderAddress:g.address,chainId:m.chainId},signer:o,requiredWei:c});const u=e.map(l=>we(l,i));if(W.enabled)try{const l=new ke(g.abi).encodeFunctionData("accept",[u]),v=Z(),b=J(o.provider,v),h=await ee(b,v,l,g,{serverURL:W.relayerUrl});return d==null||d(),await G(h,"the MANA purchase"),h}catch(l){if(l instanceof te&&l.code===ae.USER_DENIED||l instanceof Y)throw l;N(l,{flow:"buy_mana",step:"gasless_fallback"})}await U(o.provider,m.chainId);const f=await new ne(g.address,g.abi,o).accept(u,_(m.chainId));return d==null||d(),(await f.wait()).transactionHash}async function Ze(t){const{mints:e,chainId:i,buyer:o,signer:d,onSigned:c,requiredManaWei:m}=t,g=j(C.CollectionStore,i),w=j(C.MANAToken,i),u=e.map(l=>l.item);if(await P({auth:{kind:F.Allowance,contractAddress:w.address,spenderAddress:g.address,chainId:i},signer:d,requiredWei:m}),W.enabled)try{const l=ye(u,o,g.abi),v=Z(),b=J(d.provider,v),h=await ee(b,v,l,g,{serverURL:W.relayerUrl});return c==null||c(),await G(h,"the MANA purchase"),h}catch(l){if(l instanceof te&&l.code===ae.USER_DENIED||l instanceof Y)throw l;N(l,{flow:"buy_mint_mana",step:"gasless_fallback"})}await U(d.provider,i);const f=await new ne(g.address,g.abi,d).buy(ve(u,o),_(i));return c==null||c(),(await f.wait()).transactionHash}async function zt(t){const{trade:e,...i}=t;return oe({target:{kind:"trade",trade:e},...i})}async function Wt(t){const{mint:e,...i}=t;return oe({target:{kind:"store",mint:e},...i})}async function oe(t){const{target:e,buyer:i,signer:o,credits:d,manaGapWei:c,onBroadcast:m,onReverted:g}=t;if(d.length===0)throw new Error("No credits to spend — use the MANA-only rail for that");if(c<=0n)throw new Error("No MANA gap to cover — use the credits-only rail for that");const w=se(e),u=j(C.MANAToken,w),x=j(C.CreditsManager,w);await P({auth:{kind:F.Allowance,contractAddress:u.address,spenderAddress:x.address,chainId:w},signer:o,requiredWei:c});const p=(d.reduce((l,v)=>l+BigInt(v.availableAmount),0n)+c).toString();return be({purchase:Je(e,d,p),buyer:i,signer:o,onBroadcast:m,onReverted:g})}function se(t){return t.kind==="trade"?t.trade.chainId:t.mint.chainId}function Je(t,e,i){return t.kind==="trade"?{kind:"trade",trade:t.trade,credits:e,maxCreditedValue:i}:{kind:"store",item:t.mint.item,chainId:t.mint.chainId,credits:e,maxCreditedValue:i}}function $t(t,e){const i=se(e);return t==="combined"?{spender:j(C.CreditsManager,i).address,chainId:i}:{spender:e.kind==="trade"?j(Q(e.trade.contract),i).address:j(C.CollectionStore,i).address,chainId:i}}function Tt(t){return n.jsx("svg",{viewBox:"0 0 18 18",width:"18",height:"18","aria-hidden":!0,...t,children:n.jsx("path",{d:"M4 4l10 10M14 4L4 14",stroke:"#161518",strokeWidth:"1.8",strokeLinecap:"round"})})}function It(t){return n.jsx("svg",{viewBox:"0 0 20 20",width:"24",height:"24","aria-hidden":!0,...t,children:n.jsx("path",{fill:"#f48221",d:"M10 0a10 10 0 1 1 0 20 10 10 0 0 1 0-20Zm0 2a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm0 11a1 1 0 1 1 0 2 1 1 0 0 1 0-2Zm0-8a1 1 0 0 1 1 1v5a1 1 0 1 1-2 0V6a1 1 0 0 1 1-1Z"})})}const{colors:s,gradients:V,radius:de,z:Ge}=r,Bt=a.div`
291
291
  position: fixed;
292
292
  inset: 0;
293
293
  z-index: ${Ge.overlay};
@@ -908,4 +908,4 @@ import{j as n,r as k}from"./react-C_Ms5avg.js";import{s as a,t as r,b as y,q as
908
908
  transform: scale(1.1);
909
909
  }
910
910
  `;function ya({title:t,items:e,onViewAll:i}){const o=k.useRef(null),[d,c]=k.useState(1),[m,g]=k.useState(0),[w,u]=k.useState(!0),[x,f]=k.useState(!1),p=k.useCallback(()=>{const b=o.current;if(!b)return;const{scrollLeft:h,scrollWidth:D,clientWidth:$}=b,L=Math.max(1,Math.ceil(D/$));c(L),g(Math.min(L-1,Math.round(h/$))),u(h<=1),f(h+$>=D-1)},[]);if(k.useEffect(()=>{p();const b=o.current;if(b)return b.addEventListener("scroll",p,{passive:!0}),window.addEventListener("resize",p),()=>{b.removeEventListener("scroll",p),window.removeEventListener("resize",p)}},[p,e.length]),e.length===0)return null;function l(b){const h=o.current;h&&h.scrollBy({left:b*h.clientWidth,behavior:"smooth"})}function v(b){const h=o.current;h&&h.scrollTo({left:b*h.clientWidth,behavior:"smooth"})}return n.jsxs(Ye,{"data-testid":"carousel",children:[n.jsxs(_e,{children:[n.jsx(et,{children:t}),i?n.jsxs(tt,{onClick:i,children:[y("collectionCarousel.viewAll"),n.jsx(at,{name:"chevron-down",size:16})]}):null]}),n.jsxs(nt,{children:[n.jsx(R,{"data-side":"left",onClick:()=>l(-1),"aria-label":y("collectionCarousel.scrollLeft"),disabled:w,children:n.jsx("img",{src:X,alt:"","aria-hidden":!0})}),n.jsx(it,{ref:o,children:e.map(b=>n.jsx(ge,{item:b},b.id))}),n.jsx(R,{"data-side":"right",onClick:()=>l(1),"aria-label":y("collectionCarousel.scrollRight"),disabled:x,children:n.jsx("img",{src:X,alt:"","aria-hidden":!0})})]}),d>1?n.jsx(rt,{"aria-label":y("collectionCarousel.pages"),children:Array.from({length:d}).map((b,h)=>n.jsx(ot,{"data-active":h===m||void 0,"aria-label":y("collectionCarousel.goToPage",{page:h+1}),"aria-current":h===m?"true":void 0,onClick:()=>v(h)},h))}):null]})}export{re as $,Ht as A,qt as B,St as C,aa as D,yt as E,na as F,ia as G,Nt as H,ra as I,oa as J,sa as K,pa as L,Bt as M,da as N,kt as O,mt as P,ft as Q,ya as R,Et as S,Ft as T,wt as U,I as V,Gt as W,Vt as X,xt as Y,bt as Z,$t as _,Pt as a,jt as a0,Ke as a1,Je as a2,se as a3,ba as a4,wa as a5,Ct as a6,Mt as a7,At as a8,zt as a9,Wt as aa,Tt as b,Dt as c,Lt as d,Ot as e,Xt as f,ha as g,ua as h,vt as i,ga as j,ca as k,la as l,xa as m,fa as n,ma as o,It as p,Yt as q,_t as r,Rt as s,Kt as t,Qt as u,Ut as v,Zt as w,Jt as x,ea as y,ta as z};
911
- //# sourceMappingURL=CollectionCarousel-BrW6NiqU.js.map
911
+ //# sourceMappingURL=CollectionCarousel-Bi0QxTqN.js.map
@@ -1,5 +1,5 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["_assets/index.es-DNhPk9Fo.js","_assets/react-C_Ms5avg.js"])))=>i.map(i=>d[i]);
2
- import{s,_ as a}from"./index-BdS2FUJe.js";import{r as n,j as i}from"./react-C_Ms5avg.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="74eb0b6c-47a3-49ba-9713-b9aa32ed10b4",e._sentryDebugIdIdentifier="sentry-dbid-74eb0b6c-47a3-49ba-9713-b9aa32ed10b4")}catch{}})();const o=s.div`
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["_assets/index.es-DgIVXTLg.js","_assets/react-CPKOypa5.js"])))=>i.map(i=>d[i]);
2
+ import{s,_ as a}from"./index-D7Vr2oVM.js";import{r as n,j as i}from"./react-CPKOypa5.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="74eb0b6c-47a3-49ba-9713-b9aa32ed10b4",e._sentryDebugIdIdentifier="sentry-dbid-74eb0b6c-47a3-49ba-9713-b9aa32ed10b4")}catch{}})();const o=s.div`
3
3
  position: fixed;
4
4
  inset: 0;
5
5
  /**
@@ -14,5 +14,5 @@ import{s,_ as a}from"./index-BdS2FUJe.js";import{r as n,j as i}from"./react-C_Ms
14
14
  */
15
15
  z-index: -1;
16
16
  pointer-events: none;
17
- `,r=n.lazy(async()=>{const[{default:e},{default:t}]=await Promise.all([a(()=>import("./index.es-DNhPk9Fo.js"),__vite__mapDeps([0,1])),a(()=>import("./confettiAnimation-Btd6HRFo.js"),[])]);return{default:()=>i.jsx(e,{animationData:t,loop:1})}});function u(){const[e]=n.useState(()=>{var t;return!((t=window.matchMedia)!=null&&t.call(window,"(prefers-reduced-motion: reduce)").matches)});return e?i.jsx(o,{"aria-hidden":!0,"data-testid":"confetti",children:i.jsx(n.Suspense,{fallback:null,children:i.jsx(r,{})})}):null}export{u as C};
18
- //# sourceMappingURL=Confetti-CVU-1nr5.js.map
17
+ `,r=n.lazy(async()=>{const[{default:e},{default:t}]=await Promise.all([a(()=>import("./index.es-DgIVXTLg.js"),__vite__mapDeps([0,1])),a(()=>import("./confettiAnimation-Btd6HRFo.js"),[])]);return{default:()=>i.jsx(e,{animationData:t,loop:1})}});function u(){const[e]=n.useState(()=>{var t;return!((t=window.matchMedia)!=null&&t.call(window,"(prefers-reduced-motion: reduce)").matches)});return e?i.jsx(o,{"aria-hidden":!0,"data-testid":"confetti",children:i.jsx(n.Suspense,{fallback:null,children:i.jsx(r,{})})}):null}export{u as C};
18
+ //# sourceMappingURL=Confetti-W3F-dgtT.js.map
@@ -1,2 +1,2 @@
1
- import{p as o}from"./sentry-Bhm9UKEB.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="212e6b2b-00bf-4961-b68b-1d32c6f901a6",e._sentryDebugIdIdentifier="sentry-dbid-212e6b2b-00bf-4961-b68b-1d32c6f901a6")}catch{}})();var n={};const r={ACCOUNT_TABS:[{label:"Tokens"},{label:"Activity"}],SECURE_SITE_ORIGIN:(typeof o<"u"&&typeof n<"u"?n.NEXT_PUBLIC_SECURE_SITE_ORIGIN:void 0)||"https://secure.walletconnect.org",VIEW_DIRECTION:{Next:"next",Prev:"prev"},ANIMATION_DURATIONS:{HeaderText:120},VIEWS_WITH_LEGAL_FOOTER:["Connect","ConnectWallets","OnRampTokenSelect","OnRampFiatSelect","OnRampProviders"],VIEWS_WITH_DEFAULT_FOOTER:["Networks"]};export{r as C};
2
- //# sourceMappingURL=ConstantsUtil-0F9G_2vd.js.map
1
+ import{p as o}from"./sentry-Dhl3FQKR.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="212e6b2b-00bf-4961-b68b-1d32c6f901a6",e._sentryDebugIdIdentifier="sentry-dbid-212e6b2b-00bf-4961-b68b-1d32c6f901a6")}catch{}})();var n={};const r={ACCOUNT_TABS:[{label:"Tokens"},{label:"Activity"}],SECURE_SITE_ORIGIN:(typeof o<"u"&&typeof n<"u"?n.NEXT_PUBLIC_SECURE_SITE_ORIGIN:void 0)||"https://secure.walletconnect.org",VIEW_DIRECTION:{Next:"next",Prev:"prev"},ANIMATION_DURATIONS:{HeaderText:120},VIEWS_WITH_LEGAL_FOOTER:["Connect","ConnectWallets","OnRampTokenSelect","OnRampFiatSelect","OnRampProviders"],VIEWS_WITH_DEFAULT_FOOTER:["Networks"]};export{r as C};
2
+ //# sourceMappingURL=ConstantsUtil-H5MzXw_a.js.map
@@ -1,2 +1,2 @@
1
- import{g as z}from"./react-C_Ms5avg.js";import{r as W}from"./index-DdW8GqwI.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},d=new s.Error().stack;d&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[d]="301fc804-8c1b-4411-89d2-c1b8b4221706",s._sentryDebugIdIdentifier="sentry-dbid-301fc804-8c1b-4411-89d2-c1b8b4221706")}catch{}})();function Y(s,d){for(var F=0;F<d.length;F++){const P=d[F];if(typeof P!="string"&&!Array.isArray(P)){for(const f in P)if(f!=="default"&&!(f in s)){const m=Object.getOwnPropertyDescriptor(P,f);m&&Object.defineProperty(s,f,m.get?m:{enumerable:!0,get:()=>P[f]})}}}return Object.freeze(Object.defineProperty(s,Symbol.toStringTag,{value:"Module"}))}var O={},L={},D={},U={},I;function G(){if(I)return U;I=1,Object.defineProperty(U,"__esModule",{value:!0}),U.createFetchComponent=P;const s=new Set([400,401,403,404]),d=new Set(["GET","HEAD","OPTIONS","PUT","DELETE"]);async function F(f,m,y){var $;const{timeout:g,retryDelay:h,abortController:S}=y,q=S.signal;let M=y.attempts,w,_;do{w=void 0,_=void 0;let b=null;try{g&&(b=setTimeout(()=>S.abort(),g)),--M,w=await fetch(f,m)}catch(n){_=n}finally{b&&clearTimeout(b)}if(w&&(w.ok||s.has(w.status))||q.aborted||M===0)break;w&&await(($=w.body)==null?void 0:$.cancel().catch(()=>{})),await new Promise(n=>setTimeout(n,h))}while(!0);if(q.aborted)throw new Error("Request aborted (timed out)");if(!w)throw _;return w}function P(f){const m=f==null?void 0:f.defaultHeaders;async function y(g,h){const{timeout:S,method:q="GET",retryDelay:M=0,abortController:w,attempts:_,...$}={...f==null?void 0:f.defaultFetcherOptions,...h},b=w||new AbortController,n=d.has(q.toUpperCase())?_??1:1,e={...$,method:q,signal:b.signal};return m&&(e.headers={...m,...$.headers||{}}),F(g,e,{timeout:S,retryDelay:M,attempts:n,abortController:b})}return{fetch:y}}return U}var H;function X(){return H||(H=1,(function(s){Object.defineProperty(s,"__esModule",{value:!0}),s.createFetchComponent=void 0;var d=G();Object.defineProperty(s,"createFetchComponent",{enumerable:!0,get:function(){return d.createFetchComponent}})})(D)),D}const J="0.0.0-development",K={version:J};var Q;function Z(){return Q||(Q=1,(function(s){Object.defineProperty(s,"__esModule",{value:!0}),s.QueryBuilder=s.sanitizeUrl=s.mergeRequestOptions=s.convertFiltersToQueryParams=s.splitValuesIntoManyQueries=s.splitValuesIntoManyQueryBuilders=s.splitAndFetchPaginated=s.splitAndFetch=s.MAX_URL_LENGTH=s.addModelToFormData=s.getCurrentVersion=void 0;const d=X(),F=K;function P(){return F.version}s.getCurrentVersion=P;function f(n,e,i=""){for(const r in n){if(!n.hasOwnProperty(r)||n[r]===null||n[r]===void 0)continue;const t=i?`${i}[${r}]`:r;n[r]instanceof Date?e.append(t,n[r].toISOString()):n[r]instanceof Array?n[r].forEach((a,o)=>{const c=`${t}[${o}]`;f(a,e,c)}):typeof n[r]=="object"?f(n[r],e,t):e.append(t,n[r].toString())}return e}s.addModelToFormData=f;function m(n){return Array.from(new Set(n))}s.MAX_URL_LENGTH=2048;async function y({baseUrl:n,path:e,queryParams:i,fetcher:r,uniqueBy:t,options:a}){r=r||(0,d.createFetchComponent)();const o=q({baseUrl:n,path:e,queryParams:i}),c=new Map;for(const u of o)(await(await r.fetch(u,{...a,headers:{"Content-Type":"application/json"}})).json()).forEach(E=>c.set(t?E[t]:c.size,E));return Array.from(c.values())}s.splitAndFetch=y;const g=7;async function h({baseUrl:n,path:e,queryParams:i,elementsProperty:r,uniqueBy:t,options:a,fetcher:o}){o=o||(0,d.createFetchComponent)();const u=q({baseUrl:n,path:e,queryParams:i,reservedParams:new Map([["offset",g]])}),C=new Map;let E=!1;for(let v=0;v<u.length&&!E;v++){let l=u[v];for(;l&&!E;)try{const p=(await o.fetch(l,a)).json();p[r].forEach(j=>C.set(j[t],j));const T=p.pagination.next;l=T?new URL(T,l).toString():void 0}catch{E=!0}}return Array.from(C.values())}s.splitAndFetchPaginated=h;function S({queryParams:n,baseUrl:e,path:i,reservedParams:r}){const t="name"in n?new Map([[n.name,n.values]]):n;if(t.size===0)return[new b(e+i,t,r)];const o=Array.from(t.entries()).map(([l,p])=>[l,m(p)]).sort(([l,p],[A,T])=>p.length-T.length),c=new b(e+i,new Map,r);for(let l=0;l<o.length-1;l++){const[p,A]=o[l];if(!c.canSetParams(p,A))throw new Error("This library can split one query param into many HTTP requests, but it can't split more than one. You will need to do that on the client side.");c.setParams(p,A)}let u=b.clone(c);const[C,E]=o[o.length-1],v=[];for(const l of E)u.canAddParam(C,l)||(v.push(u),u=b.clone(c)),u.addParam(C,l);return v.push(u),v}s.splitValuesIntoManyQueryBuilders=S;function q(n){return S(n).map(i=>i.toString())}s.splitValuesIntoManyQueries=q;function M(n){if(!n)return new Map;const e=Object.entries(n).filter(([i,r])=>!!r).map(([i,r])=>{const t=i.endsWith("s")?i.slice(0,-1):i;let a;if(Array.isArray(r))a=[...r].filter(_).map(o=>`${o}`);else if(_(r))a=[`${r}`];else throw new Error("Query params must be either a string, a number, a boolean or an array of the types just mentioned");return[t,a]}).filter(([i,r])=>r.length>0);return new Map(e)}s.convertFiltersToQueryParams=M;function w(n,e){const i={...n==null?void 0:n.headers,...e==null?void 0:e.headers};return{...n,...e,headers:i}}s.mergeRequestOptions=w;function _(n){return typeof n=="string"||typeof n=="number"||typeof n=="boolean"}function $(n){return n=n.trim(),!n.startsWith("https://")&&!n.startsWith("http://")&&(n="https://"+n),n.endsWith("/")&&(n=n.slice(0,-1)),n}s.sanitizeUrl=$;class b{constructor(e,i=new Map,r=new Map){this.baseUrl=e,this.queryParams=i,this.reservedParams=r,this.length=this.calculateUrlLength(i,r)}canAddParam(e,i){return this.length+e.length+i.length+2<s.MAX_URL_LENGTH}addParam(e,i){if(!this.canAddParam(e,i))throw new Error(`You can't add this parameter '${e}', since it would exceed the max url length`);const r=this.queryParams.get(e),t=r||[];return t.push(i),this.queryParams.set(e,t),this.length+=this.calculateAddedLength(e,[i]),this}canSetParams(e,i){const r=new Map([...this.queryParams,[e,i]]);return this.calculateUrlLength(r,this.reservedParams)<s.MAX_URL_LENGTH}setParams(e,i){if(!this.canSetParams(e,i))throw new Error(`You can't add this parameter '${e}', since it would exceed the max url length`);return this.queryParams.set(e,i.map(r=>`${r}`)),this.length=this.calculateUrlLength(this.queryParams,this.reservedParams),this}setParam(e,i){return this.setParams(e,[i]),this}toString(){let e=this.baseUrl,i=!1;for(const[r,t]of this.queryParams)for(const a of t)i?e+=`&${r}=${a}`:(e+=`?${r}=${a}`,i=!0);return e}calculateUrlLength(e,i){let r=this.baseUrl.length;for(const[t,a]of i)this.queryParams.has(t)||(r+=t.length+2+a);for(const[t,a]of e)r+=this.calculateAddedLength(t,a);return r}static clone(e){return new b(e.baseUrl,new Map(e.queryParams),e.reservedParams)}calculateAddedLength(e,i){return this.calculateArrayLength(i)+(e.length+2)*i.length}calculateArrayLength(e){return e.map(i=>`${i}`).reduce((i,r)=>i+r.length,0)}}s.QueryBuilder=b})(L)),L}var R={},V;function x(){if(V)return R;V=1,Object.defineProperty(R,"__esModule",{value:!0}),R.retry=void 0;async function s(d,F,P,f){for(;P>0;)try{return await F()}catch(m){if(P--,P>0)console.info(`Failed to ${d}. Still have ${P} attempt/s left. Will try again in ${f}`),await new Promise(y=>setTimeout(y,f));else throw m}throw new Error("Please specify more than one attempt for the retry function")}return R.retry=s,R}var N;function ee(){if(N)return O;N=1,Object.defineProperty(O,"__esModule",{value:!0}),O.createContentClient=O.downloadContent=void 0;const s=W(),d=Z(),F=x();async function P(m,y,g,h){const{attempts:S=3,retryDelay:q=500}=h||{},M=h!=null&&h.timeout?{timeout:h.timeout}:{};return(0,F.retry)(`fetch file with hash ${g} from ${y}`,async()=>{const w=await m.fetch(`${y}/${g}`,M),_=new Uint8Array(await w.arrayBuffer());if(!(h!=null&&h.avoidChecks)&&(g.startsWith("Qm")?await(0,s.hashV0)(_):await(0,s.hashV1)(_))!==g)throw new Error(`Failed to fetch file with hash ${g} from ${y}`);return _},S,q)}O.downloadContent=P;function f(m){const{fetcher:y,logger:g}=m,h=(0,d.sanitizeUrl)(m.url),S=m==null?void 0:m.parallelConfig;async function q(t,a,o){const c=new AbortController,u=c.signal,C=(0,d.mergeRequestOptions)(o,{signal:u});return new Promise(async E=>{let v=t.length;const l=()=>{v--,v===0&&E([])},p=A=>A&&Array.isArray(A)&&A.length>0?(c.abort(),E(A),!0):!1;t.forEach(async A=>{try{const T=(0,d.sanitizeUrl)(A),j=await y.fetch(`${T}${a}`,C);if(u.aborted){l();return}const B=await j.json();p(B)||l()}catch(T){u.aborted||g==null||g.warn(`Failed to fetch from ${A}:`,T),l()}})})}async function M(t,a,o){const u=(await Promise.allSettled(t.map(async l=>{try{const p=(0,d.sanitizeUrl)(l);return await(await y.fetch(`${p}${a}`,o)).json()}catch(p){return g==null||g.warn(`Failed to fetch from ${l}:`,p),[]}}))).filter(l=>l.status==="fulfilled").map(l=>l.value||[]),C=u.flatMap(l=>l),E=u.filter(l=>l.length===0).length,v=new Map;return C.forEach(l=>{(!v.has(l.id)||l.timestamp>v.get(l.id).timestamp)&&v.set(l.id,l)}),{entities:Array.from(v.values()),emptyResults:E}}async function w(t,a){const o=new FormData;o.append("entityId",t.entityId),(0,d.addModelToFormData)(t.authChain,o,"authChain");const c=await i(Array.from(t.files.keys()),a);for(const[u,C]of t.files)(!c.has(u)||u===t.entityId)&&o.append(u,new Blob([C]),u);return o}async function _(t,a){const o=await w(t,a),c=(0,d.mergeRequestOptions)(a||{},{body:o,method:"POST"});return await y.fetch(`${h}/entities`,c)}async function $(t,a){if(t.length===0)return Promise.reject("You must set at least one pointer.");const o=(0,d.mergeRequestOptions)(a||{},{body:JSON.stringify({pointers:t}),method:"POST",headers:{"Content-Type":"application/json"}});return(await y.fetch(`${h}/entities/active`,o)).json()}async function b(t,a){if(t.length===0)return Promise.reject("You must set at least one id.");const o=(0,d.mergeRequestOptions)(a||{},{body:JSON.stringify({ids:t}),method:"POST",headers:{"Content-Type":"application/json"}}),c=(a==null?void 0:a.parallel)||S;return c!=null&&c.urls&&(c==null?void 0:c.urls.length)>0?q([h,...c.urls],"/entities/active",o):(await y.fetch(`${h}/entities/active`,o)).json()}async function n(t,a){const o=await b([t],a);return o.length===0?Promise.reject(`Failed to find an entity with id '${t}'.`):o[0]}function e(t,a){return t.length===0?Promise.reject("You must set at least one cid."):(0,d.splitAndFetch)({fetcher:y,options:a,baseUrl:h,path:"/available-content",queryParams:{name:"cid",values:t},uniqueBy:"cid"})}async function i(t,a){const c=(await e(t,a)).filter(u=>u.available).map(({cid:u})=>u);return new Set(c)}async function r(t,a){const o=(a==null?void 0:a.parallel)||S;if(!(o!=null&&o.urls)||o.urls.length===0)throw new Error("Parallel configuration is required for checking pointer consistency");const c=(0,d.mergeRequestOptions)(a||{},{body:JSON.stringify({pointers:[t]}),method:"POST",headers:{"Content-Type":"application/json"}}),u=[h,...o.urls],{entities:C,emptyResults:E}=await M(u,"/entities/active",c);if(C.length===0)return{isConsistent:!0,upToDateEntities:void 0,outdatedEntities:void 0};const v=Math.max(...C.map(T=>T.timestamp)),l=C.filter(T=>T.timestamp===v),p=C.filter(T=>T.timestamp<v);return{isConsistent:p.length===0&&E===0,upToDateEntities:l.length>0?l:void 0,outdatedEntities:p.length>0?p:void 0}}return{buildEntityFormDataForDeployment:w,fetchEntitiesByPointers:$,fetchEntitiesByIds:b,fetchEntityById:n,downloadContent:(t,a)=>P(y,h+"/contents",t,a),deploy:_,isContentAvailable:e,checkPointerConsistency:r}}return O.createContentClient=f,O}var k=ee();const te=z(k),ae=Y({__proto__:null,default:te},[k]);export{ae as C};
2
- //# sourceMappingURL=ContentClient-Bfa96vUa.js.map
1
+ import{g as z}from"./react-CPKOypa5.js";import{r as W}from"./index-DHcc1n0K.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},d=new s.Error().stack;d&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[d]="301fc804-8c1b-4411-89d2-c1b8b4221706",s._sentryDebugIdIdentifier="sentry-dbid-301fc804-8c1b-4411-89d2-c1b8b4221706")}catch{}})();function Y(s,d){for(var F=0;F<d.length;F++){const P=d[F];if(typeof P!="string"&&!Array.isArray(P)){for(const f in P)if(f!=="default"&&!(f in s)){const m=Object.getOwnPropertyDescriptor(P,f);m&&Object.defineProperty(s,f,m.get?m:{enumerable:!0,get:()=>P[f]})}}}return Object.freeze(Object.defineProperty(s,Symbol.toStringTag,{value:"Module"}))}var O={},L={},D={},U={},I;function G(){if(I)return U;I=1,Object.defineProperty(U,"__esModule",{value:!0}),U.createFetchComponent=P;const s=new Set([400,401,403,404]),d=new Set(["GET","HEAD","OPTIONS","PUT","DELETE"]);async function F(f,m,y){var $;const{timeout:g,retryDelay:h,abortController:S}=y,q=S.signal;let M=y.attempts,w,_;do{w=void 0,_=void 0;let b=null;try{g&&(b=setTimeout(()=>S.abort(),g)),--M,w=await fetch(f,m)}catch(n){_=n}finally{b&&clearTimeout(b)}if(w&&(w.ok||s.has(w.status))||q.aborted||M===0)break;w&&await(($=w.body)==null?void 0:$.cancel().catch(()=>{})),await new Promise(n=>setTimeout(n,h))}while(!0);if(q.aborted)throw new Error("Request aborted (timed out)");if(!w)throw _;return w}function P(f){const m=f==null?void 0:f.defaultHeaders;async function y(g,h){const{timeout:S,method:q="GET",retryDelay:M=0,abortController:w,attempts:_,...$}={...f==null?void 0:f.defaultFetcherOptions,...h},b=w||new AbortController,n=d.has(q.toUpperCase())?_??1:1,e={...$,method:q,signal:b.signal};return m&&(e.headers={...m,...$.headers||{}}),F(g,e,{timeout:S,retryDelay:M,attempts:n,abortController:b})}return{fetch:y}}return U}var H;function X(){return H||(H=1,(function(s){Object.defineProperty(s,"__esModule",{value:!0}),s.createFetchComponent=void 0;var d=G();Object.defineProperty(s,"createFetchComponent",{enumerable:!0,get:function(){return d.createFetchComponent}})})(D)),D}const J="0.0.0-development",K={version:J};var Q;function Z(){return Q||(Q=1,(function(s){Object.defineProperty(s,"__esModule",{value:!0}),s.QueryBuilder=s.sanitizeUrl=s.mergeRequestOptions=s.convertFiltersToQueryParams=s.splitValuesIntoManyQueries=s.splitValuesIntoManyQueryBuilders=s.splitAndFetchPaginated=s.splitAndFetch=s.MAX_URL_LENGTH=s.addModelToFormData=s.getCurrentVersion=void 0;const d=X(),F=K;function P(){return F.version}s.getCurrentVersion=P;function f(n,e,i=""){for(const r in n){if(!n.hasOwnProperty(r)||n[r]===null||n[r]===void 0)continue;const t=i?`${i}[${r}]`:r;n[r]instanceof Date?e.append(t,n[r].toISOString()):n[r]instanceof Array?n[r].forEach((a,o)=>{const c=`${t}[${o}]`;f(a,e,c)}):typeof n[r]=="object"?f(n[r],e,t):e.append(t,n[r].toString())}return e}s.addModelToFormData=f;function m(n){return Array.from(new Set(n))}s.MAX_URL_LENGTH=2048;async function y({baseUrl:n,path:e,queryParams:i,fetcher:r,uniqueBy:t,options:a}){r=r||(0,d.createFetchComponent)();const o=q({baseUrl:n,path:e,queryParams:i}),c=new Map;for(const u of o)(await(await r.fetch(u,{...a,headers:{"Content-Type":"application/json"}})).json()).forEach(E=>c.set(t?E[t]:c.size,E));return Array.from(c.values())}s.splitAndFetch=y;const g=7;async function h({baseUrl:n,path:e,queryParams:i,elementsProperty:r,uniqueBy:t,options:a,fetcher:o}){o=o||(0,d.createFetchComponent)();const u=q({baseUrl:n,path:e,queryParams:i,reservedParams:new Map([["offset",g]])}),C=new Map;let E=!1;for(let v=0;v<u.length&&!E;v++){let l=u[v];for(;l&&!E;)try{const p=(await o.fetch(l,a)).json();p[r].forEach(j=>C.set(j[t],j));const T=p.pagination.next;l=T?new URL(T,l).toString():void 0}catch{E=!0}}return Array.from(C.values())}s.splitAndFetchPaginated=h;function S({queryParams:n,baseUrl:e,path:i,reservedParams:r}){const t="name"in n?new Map([[n.name,n.values]]):n;if(t.size===0)return[new b(e+i,t,r)];const o=Array.from(t.entries()).map(([l,p])=>[l,m(p)]).sort(([l,p],[A,T])=>p.length-T.length),c=new b(e+i,new Map,r);for(let l=0;l<o.length-1;l++){const[p,A]=o[l];if(!c.canSetParams(p,A))throw new Error("This library can split one query param into many HTTP requests, but it can't split more than one. You will need to do that on the client side.");c.setParams(p,A)}let u=b.clone(c);const[C,E]=o[o.length-1],v=[];for(const l of E)u.canAddParam(C,l)||(v.push(u),u=b.clone(c)),u.addParam(C,l);return v.push(u),v}s.splitValuesIntoManyQueryBuilders=S;function q(n){return S(n).map(i=>i.toString())}s.splitValuesIntoManyQueries=q;function M(n){if(!n)return new Map;const e=Object.entries(n).filter(([i,r])=>!!r).map(([i,r])=>{const t=i.endsWith("s")?i.slice(0,-1):i;let a;if(Array.isArray(r))a=[...r].filter(_).map(o=>`${o}`);else if(_(r))a=[`${r}`];else throw new Error("Query params must be either a string, a number, a boolean or an array of the types just mentioned");return[t,a]}).filter(([i,r])=>r.length>0);return new Map(e)}s.convertFiltersToQueryParams=M;function w(n,e){const i={...n==null?void 0:n.headers,...e==null?void 0:e.headers};return{...n,...e,headers:i}}s.mergeRequestOptions=w;function _(n){return typeof n=="string"||typeof n=="number"||typeof n=="boolean"}function $(n){return n=n.trim(),!n.startsWith("https://")&&!n.startsWith("http://")&&(n="https://"+n),n.endsWith("/")&&(n=n.slice(0,-1)),n}s.sanitizeUrl=$;class b{constructor(e,i=new Map,r=new Map){this.baseUrl=e,this.queryParams=i,this.reservedParams=r,this.length=this.calculateUrlLength(i,r)}canAddParam(e,i){return this.length+e.length+i.length+2<s.MAX_URL_LENGTH}addParam(e,i){if(!this.canAddParam(e,i))throw new Error(`You can't add this parameter '${e}', since it would exceed the max url length`);const r=this.queryParams.get(e),t=r||[];return t.push(i),this.queryParams.set(e,t),this.length+=this.calculateAddedLength(e,[i]),this}canSetParams(e,i){const r=new Map([...this.queryParams,[e,i]]);return this.calculateUrlLength(r,this.reservedParams)<s.MAX_URL_LENGTH}setParams(e,i){if(!this.canSetParams(e,i))throw new Error(`You can't add this parameter '${e}', since it would exceed the max url length`);return this.queryParams.set(e,i.map(r=>`${r}`)),this.length=this.calculateUrlLength(this.queryParams,this.reservedParams),this}setParam(e,i){return this.setParams(e,[i]),this}toString(){let e=this.baseUrl,i=!1;for(const[r,t]of this.queryParams)for(const a of t)i?e+=`&${r}=${a}`:(e+=`?${r}=${a}`,i=!0);return e}calculateUrlLength(e,i){let r=this.baseUrl.length;for(const[t,a]of i)this.queryParams.has(t)||(r+=t.length+2+a);for(const[t,a]of e)r+=this.calculateAddedLength(t,a);return r}static clone(e){return new b(e.baseUrl,new Map(e.queryParams),e.reservedParams)}calculateAddedLength(e,i){return this.calculateArrayLength(i)+(e.length+2)*i.length}calculateArrayLength(e){return e.map(i=>`${i}`).reduce((i,r)=>i+r.length,0)}}s.QueryBuilder=b})(L)),L}var R={},V;function x(){if(V)return R;V=1,Object.defineProperty(R,"__esModule",{value:!0}),R.retry=void 0;async function s(d,F,P,f){for(;P>0;)try{return await F()}catch(m){if(P--,P>0)console.info(`Failed to ${d}. Still have ${P} attempt/s left. Will try again in ${f}`),await new Promise(y=>setTimeout(y,f));else throw m}throw new Error("Please specify more than one attempt for the retry function")}return R.retry=s,R}var N;function ee(){if(N)return O;N=1,Object.defineProperty(O,"__esModule",{value:!0}),O.createContentClient=O.downloadContent=void 0;const s=W(),d=Z(),F=x();async function P(m,y,g,h){const{attempts:S=3,retryDelay:q=500}=h||{},M=h!=null&&h.timeout?{timeout:h.timeout}:{};return(0,F.retry)(`fetch file with hash ${g} from ${y}`,async()=>{const w=await m.fetch(`${y}/${g}`,M),_=new Uint8Array(await w.arrayBuffer());if(!(h!=null&&h.avoidChecks)&&(g.startsWith("Qm")?await(0,s.hashV0)(_):await(0,s.hashV1)(_))!==g)throw new Error(`Failed to fetch file with hash ${g} from ${y}`);return _},S,q)}O.downloadContent=P;function f(m){const{fetcher:y,logger:g}=m,h=(0,d.sanitizeUrl)(m.url),S=m==null?void 0:m.parallelConfig;async function q(t,a,o){const c=new AbortController,u=c.signal,C=(0,d.mergeRequestOptions)(o,{signal:u});return new Promise(async E=>{let v=t.length;const l=()=>{v--,v===0&&E([])},p=A=>A&&Array.isArray(A)&&A.length>0?(c.abort(),E(A),!0):!1;t.forEach(async A=>{try{const T=(0,d.sanitizeUrl)(A),j=await y.fetch(`${T}${a}`,C);if(u.aborted){l();return}const B=await j.json();p(B)||l()}catch(T){u.aborted||g==null||g.warn(`Failed to fetch from ${A}:`,T),l()}})})}async function M(t,a,o){const u=(await Promise.allSettled(t.map(async l=>{try{const p=(0,d.sanitizeUrl)(l);return await(await y.fetch(`${p}${a}`,o)).json()}catch(p){return g==null||g.warn(`Failed to fetch from ${l}:`,p),[]}}))).filter(l=>l.status==="fulfilled").map(l=>l.value||[]),C=u.flatMap(l=>l),E=u.filter(l=>l.length===0).length,v=new Map;return C.forEach(l=>{(!v.has(l.id)||l.timestamp>v.get(l.id).timestamp)&&v.set(l.id,l)}),{entities:Array.from(v.values()),emptyResults:E}}async function w(t,a){const o=new FormData;o.append("entityId",t.entityId),(0,d.addModelToFormData)(t.authChain,o,"authChain");const c=await i(Array.from(t.files.keys()),a);for(const[u,C]of t.files)(!c.has(u)||u===t.entityId)&&o.append(u,new Blob([C]),u);return o}async function _(t,a){const o=await w(t,a),c=(0,d.mergeRequestOptions)(a||{},{body:o,method:"POST"});return await y.fetch(`${h}/entities`,c)}async function $(t,a){if(t.length===0)return Promise.reject("You must set at least one pointer.");const o=(0,d.mergeRequestOptions)(a||{},{body:JSON.stringify({pointers:t}),method:"POST",headers:{"Content-Type":"application/json"}});return(await y.fetch(`${h}/entities/active`,o)).json()}async function b(t,a){if(t.length===0)return Promise.reject("You must set at least one id.");const o=(0,d.mergeRequestOptions)(a||{},{body:JSON.stringify({ids:t}),method:"POST",headers:{"Content-Type":"application/json"}}),c=(a==null?void 0:a.parallel)||S;return c!=null&&c.urls&&(c==null?void 0:c.urls.length)>0?q([h,...c.urls],"/entities/active",o):(await y.fetch(`${h}/entities/active`,o)).json()}async function n(t,a){const o=await b([t],a);return o.length===0?Promise.reject(`Failed to find an entity with id '${t}'.`):o[0]}function e(t,a){return t.length===0?Promise.reject("You must set at least one cid."):(0,d.splitAndFetch)({fetcher:y,options:a,baseUrl:h,path:"/available-content",queryParams:{name:"cid",values:t},uniqueBy:"cid"})}async function i(t,a){const c=(await e(t,a)).filter(u=>u.available).map(({cid:u})=>u);return new Set(c)}async function r(t,a){const o=(a==null?void 0:a.parallel)||S;if(!(o!=null&&o.urls)||o.urls.length===0)throw new Error("Parallel configuration is required for checking pointer consistency");const c=(0,d.mergeRequestOptions)(a||{},{body:JSON.stringify({pointers:[t]}),method:"POST",headers:{"Content-Type":"application/json"}}),u=[h,...o.urls],{entities:C,emptyResults:E}=await M(u,"/entities/active",c);if(C.length===0)return{isConsistent:!0,upToDateEntities:void 0,outdatedEntities:void 0};const v=Math.max(...C.map(T=>T.timestamp)),l=C.filter(T=>T.timestamp===v),p=C.filter(T=>T.timestamp<v);return{isConsistent:p.length===0&&E===0,upToDateEntities:l.length>0?l:void 0,outdatedEntities:p.length>0?p:void 0}}return{buildEntityFormDataForDeployment:w,fetchEntitiesByPointers:$,fetchEntitiesByIds:b,fetchEntityById:n,downloadContent:(t,a)=>P(y,h+"/contents",t,a),deploy:_,isContentAvailable:e,checkPointerConsistency:r}}return O.createContentClient=f,O}var k=ee();const te=z(k),ae=Y({__proto__:null,default:te},[k]);export{ae as C};
2
+ //# sourceMappingURL=ContentClient-CouwHQze.js.map
@@ -1,4 +1,4 @@
1
- import{b as ce,j as e,L as Fe,e as Le,u as Me,r as L}from"./react-C_Ms5avg.js";import{u as _e,s as ze}from"./search-empty-ozG3xThw.js";import{u as Ae,t as Y,R as Re,i as Te,j as Be,k as De,l as We,m as Oe,n as Ge,o as Ke,v as Ue,p as He,q as qe,M as Ve,r as Qe,s as Je}from"./browseLayout.styles-CPQhzf_a.js";import{t as de,bF as Ye,a6 as Z,a5 as X,s as i,bG as Ze,z as Xe,bH as et,b as o,bI as tt,bJ as ee,B as ot,A as he,a0 as ue,o as rt,v as me,bK as st,bL as it,I as te,c as at,n as nt,l as lt,at as ct,N as dt,O as ht,S as M,P as A,Q as oe,bM as re,bN as ut}from"./index-BdS2FUJe.js";import{T as pe}from"./skeleton.styles-Bq-VPRTX.js";import{d as mt,P as pt,C as xt,a as gt,b as ft,c as bt,e as wt}from"./collectionPage.styles-trKfK7L_.js";import{u as yt,L as vt}from"./useStore-lYCt-umU.js";import{L as se}from"./LoadMore-C29kowIa.js";import{u as ie}from"./useInfiniteGrid-CM1L7iyF.js";import{E as R}from"./ErrorNotice-CFo7FDnC.js";import{c as jt,i as kt}from"./items-empty-Hnl1Qssg.js";import{G as ae}from"./grid.styles-ZppzttG-.js";import"./Tooltip-CEyw56qd.js";import"./dcl-schemas-CwIIbqmb.js";import"./sentry-Bhm9UKEB.js";import"./ethers-DVDHopXp.js";import"./intl-AKLEHPeO.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},s=new r.Error().stack;s&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[s]="90dbe867-4884-4c18-a320-f4a319bc337b",r._sentryDebugIdIdentifier="sentry-dbid-90dbe867-4884-4c18-a320-f4a319bc337b")}catch{}})();function Ct(r){const{gridLoading:s,gridError:a,gridCount:l,baselinePending:c,baselineError:d,baselineCount:b}=r;return s?"skeletons":a?"error":l>0?"items":c?"skeletons":d?"error":b===0?"no-creations":"filters"}const{colors:w,radius:$,media:$t}=de,St=i.article`
1
+ import{b as ce,j as e,L as Fe,e as Le,u as Me,r as L}from"./react-CPKOypa5.js";import{u as _e,s as ze}from"./search-empty-h0zJ0pvu.js";import{u as Ae,t as Y,R as Re,i as Te,j as Be,k as De,l as We,m as Oe,n as Ge,o as Ke,v as Ue,p as He,q as qe,M as Ve,r as Qe,s as Je}from"./browseLayout.styles-EyGWvLIQ.js";import{t as de,bF as Ye,a6 as Z,a5 as X,s as i,bG as Ze,z as Xe,bH as et,b as o,bI as tt,bJ as ee,B as ot,A as he,a0 as ue,o as rt,v as me,bK as st,bL as it,I as te,c as at,n as nt,l as lt,at as ct,N as dt,O as ht,S as M,P as A,Q as oe,bM as re,bN as ut}from"./index-D7Vr2oVM.js";import{T as pe}from"./skeleton.styles-Dtw6XMDS.js";import{d as mt,P as pt,C as xt,a as gt,b as ft,c as bt,e as wt}from"./collectionPage.styles-x9Ys9-EJ.js";import{u as yt,L as vt}from"./useStore-CUpQXMuK.js";import{L as se}from"./LoadMore-BLj9usRy.js";import{u as ie}from"./useInfiniteGrid-D4LyqgVq.js";import{E as R}from"./ErrorNotice-DInl_aPc.js";import{c as jt,i as kt}from"./items-empty-Ch7uK_cC.js";import{G as ae}from"./grid.styles-ZTmDzFjp.js";import"./Tooltip-DRKOJG6M.js";import"./dcl-schemas--SOz4s6t.js";import"./sentry-Dhl3FQKR.js";import"./ethers-BGK6CGbc.js";import"./intl-AKLEHPeO.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},s=new r.Error().stack;s&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[s]="90dbe867-4884-4c18-a320-f4a319bc337b",r._sentryDebugIdIdentifier="sentry-dbid-90dbe867-4884-4c18-a320-f4a319bc337b")}catch{}})();function Ct(r){const{gridLoading:s,gridError:a,gridCount:l,baselinePending:c,baselineError:d,baselineCount:b}=r;return s?"skeletons":a?"error":l>0?"items":c?"skeletons":d?"error":b===0?"no-creations":"filters"}const{colors:w,radius:$,media:$t}=de,St=i.article`
2
2
  height: 300px;
3
3
  /* No fill of its own (Figma 922:183803): the mosaic covers the top and the footer paints its own
4
4
  translucent black, so the page field is what shows through the corners. */
@@ -309,4 +309,4 @@ import{b as ce,j as e,L as Fe,e as Le,u as Me,r as L}from"./react-C_Ms5avg.js";i
309
309
  background: ${y.blackBtn};
310
310
  }
311
311
  `,Zt={website:"website",twitter:"twitter",discord:"discord",facebook:"facebook"};function Xt({address:r}){var m,k;const{data:s}=ue(r),{data:a}=yt(r),l=rt(p=>{var S;return(S=p.session)==null?void 0:S.address}),c=!!l&&l.toLowerCase()===r.toLowerCase(),d=(s==null?void 0:s.name)||me(r),b=(k=(m=s==null?void 0:s.avatar)==null?void 0:m.snapshots)==null?void 0:k.face256,j=(a==null?void 0:a.cover)||mt,n=a==null?void 0:a.description,g=`${at.profileUrl}/${r}`,f=vt.filter(p=>a==null?void 0:a.links[p]),h=st(it({name:s==null?void 0:s.name,hasClaimedName:s==null?void 0:s.hasClaimedName,ethAddress:(s==null?void 0:s.ethAddress)??r}));return e.jsxs(Dt,{"aria-label":`${d} storefront`,children:[e.jsxs(Wt,{children:[e.jsx(Ot,{src:j,alt:"",loading:"eager"}),e.jsx(Gt,{"aria-hidden":!0})]}),(f.length>0||c)&&e.jsxs(Kt,{children:[f.map(p=>e.jsx(Ut,{"data-testid":"creator-hero-link",href:(a==null?void 0:a.links[p])??"",target:"_blank",rel:"noopener noreferrer",title:o(`creator.link.${p}`),"aria-label":o(`creator.link.${p}`),children:e.jsx(te,{name:Zt[p]})},p)),c&&e.jsx(Ht,{to:"/store-settings",title:o("creator.editStore"),"aria-label":o("creator.editStore"),children:e.jsx(te,{name:"pen"})})]}),e.jsxs(qt,{children:[b?e.jsx(ne,{src:b,alt:"",loading:"eager",style:{backgroundColor:h}}):e.jsx(ne,{as:"span","aria-hidden":!0,style:{backgroundColor:h}}),e.jsxs("div",{children:[e.jsx(Vt,{children:d}),n?e.jsx(Qt,{children:n}):null]}),e.jsxs(Jt,{children:[e.jsx(Yt,{"data-testid":"creator-hero-view",href:g,target:"_blank",rel:"noopener noreferrer",children:o("creator.viewProfile")}),e.jsx(Bt,{address:r,className:"creator-hero__follow"})]})]})]})}const eo=["all","on_sale","not_for_sale"],le=48;function wo(){var Q,J;const{address:r}=Le(),s=ce(),[a]=Me(),l=a.has("collections"),{data:c}=ue(r),d=(c==null?void 0:c.name)||(r?me(r):o("creator.fallbackName"));nt({title:d,description:o("seo.creator.description",{name:d}),image:(J=(Q=c==null?void 0:c.avatar)==null?void 0:Q.snapshots)==null?void 0:J.face256});const b=L.useMemo(()=>({category:"all",status:"all",subCategory:null,rarities:[],priceMin:"",priceMax:"",smart:!1,sort:"newest"}),[]),[j,n]=_e(b),{category:g,subCategory:f,rarities:h,priceMin:m,priceMax:k,smart:p,sort:S}=j,N=eo.includes(j.status)?j.status:"all",T=t=>n({status:t});Ae(`${l}:${g}:${f??""}`);const[P,E]=L.useState(!1);L.useEffect(()=>{if(!P)return;const t=Ie=>{Ie.key==="Escape"&&E(!1)};document.addEventListener("keydown",t);const x=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",t),document.body.style.overflow=x}},[P]);const B=m&&!Number.isNaN(Number(m))?Number(m):void 0,D=k&&!Number.isNaN(Number(k))?Number(k):void 0,be=f?Je[f]:void 0,we=(Y.find(t=>t.key===S)??Y[0]).server,W={creator:r,category:g,rarities:h.length?h:void 0,wearableCategories:be,minPriceCredits:B,maxPriceCredits:D,isWearableSmart:p||void 0,isOnSale:N==="all"?void 0:N==="on_sale",sortBy:we},{items:_,total:ye,isLoading:ve,isPlaceholderData:je,error:O,hasNextPage:ke,isFetchingNextPage:G,isFetchNextPageError:Ce,fetchNextPage:$e}=ie(["creator-items",W],t=>re({...W,first:le,skip:t}),{enabled:!!r&&!l}),I=lt({queryKey:["creator-item-count",r],queryFn:()=>re({creator:r,first:1}).then(t=>t.total),enabled:!!r}),u=ie(["creator-collections",r],t=>ut(r,{first:le,skip:t}).then(x=>({items:x.collections,total:x.total})),{enabled:!!r&&l});function K(t){n({category:t,subCategory:null},{drop:l?["collections"]:void 0})}function Se(){const t=new URLSearchParams(a);t.delete("collections");const x=t.toString();s({search:x?`?${x}`:""},{replace:!0})}function Ne(){if(l){Se();return}const t=new URLSearchParams(a);t.delete("collections");const x=t.toString();s({search:x?`?${x}&collections`:"?collections"},{replace:!0})}function U(t){n({rarities:h.includes(t)?h.filter(x=>x!==t):[...h,t]})}function H(){n(b)}const C=[];(g==="wearable"||g==="emote")&&C.push({key:"category",label:o(g==="emote"?"categories.emotes":"categories.wearables"),onRemove:()=>K("all")}),(B!=null||D!=null)&&C.push({key:"price",label:o("filter.price"),onRemove:()=>{n({priceMin:"",priceMax:""})}});for(const t of Re)h.includes(t)&&C.push({key:`rarity-${t}`,label:ct(t),onRemove:()=>U(t)});p&&C.push({key:"smart",label:o("filter.smart"),onRemove:()=>n({smart:!1})}),N!=="all"&&C.push({key:"status",label:N==="on_sale"?o("filter.onSale"):o("filter.notForSale"),onRemove:()=>T("all")});const F=Ct({gridLoading:ve||je,gridError:!!O,gridCount:_.length,baselinePending:I.isPending,baselineError:I.isError,baselineCount:I.data}),q=F==="skeletons",{data:V}=dt(),Ee=L.useMemo(()=>_.map(t=>({...t,priceCredits:ht(t,V)})),[_,V]),Pe=t=>t.priceCredits>0||!!t.manaWei,z=F==="items"||F==="skeletons"?null:F;return e.jsxs(pt,{children:[e.jsxs(xt,{"aria-label":o("creator.breadcrumbAria"),children:[e.jsx(gt,{onClick:()=>s("/items"),children:o("creator.breadcrumb")}),e.jsx("span",{children:"/"}),e.jsx(ft,{children:d})]}),r?e.jsx(Xt,{address:r}):null,e.jsxs(Te,{children:[P?e.jsx(Be,{onClick:()=>E(!1),"aria-hidden":!0}):null,e.jsxs(De,{"data-open":P||void 0,"data-testid":"creator-sidebar",children:[e.jsxs(We,{children:[e.jsx(Oe,{children:o("assets.filters")}),e.jsx(Ge,{onClick:()=>E(!1),"aria-label":o("assets.closeFilters"),children:"✕"})]}),e.jsx(Ke,{children:e.jsx(Ue,{category:g,subCategory:f,onCategory:K,onSub:t=>n({subCategory:t}),priceMin:m,priceMax:k,onPriceMin:t=>n({priceMin:t}),onPriceMax:t=>n({priceMax:t}),rarities:h,onToggleRarity:U,status:N,onStatus:T,smart:p,onSmart:t=>n({smart:t}),hideNames:!0,collections:l,onCollections:Ne})}),e.jsx(He,{children:e.jsx(qe,{type:"button",onClick:()=>E(!1),children:o("assets.showItems")})})]}),e.jsx(Ve,{children:l?e.jsxs(e.Fragment,{children:[e.jsx(bt,{children:e.jsx(wt,{"data-testid":"creator-collections-count","aria-busy":u.isLoading||void 0,children:u.isLoading?e.jsx(pe,{className:"skeleton",width:72,"data-testid":"creator-collections-count-skeleton","aria-hidden":!0}):o("creator.collectionsCount",{count:u.total})})}),u.error?e.jsx(R,{message:o("creator.error")}):null,e.jsx(ae,{"data-variant":"collections",children:u.isLoading?e.jsx(M,{count:9}):e.jsxs(e.Fragment,{children:[u.items.map(t=>e.jsx(Tt,{collection:t,itemCount:t.itemCount},t.contractAddress)),u.isFetchingNextPage?e.jsx(M,{count:6}):null]})}),e.jsx(se,{hasNextPage:u.hasNextPage,isFetching:u.isFetchingNextPage,isError:u.isFetchNextPageError,onLoadMore:()=>void u.fetchNextPage()}),!u.isLoading&&!u.error&&u.items.length===0?e.jsx(A,{testId:"creator-collections-empty",icon:jt,title:o("creator.collectionsEmptyTitle"),body:o("creator.collectionsEmpty"),cta:{label:o("assets.empty.cta"),to:"/items"}}):null]}):e.jsxs(e.Fragment,{children:[e.jsx(Qe,{sort:S,onSort:t=>n({sort:t}),total:ye,loading:q,onOpenFilters:()=>E(!0),chips:C,onClearChips:H}),O?e.jsx(R,{message:o("creator.error"),testId:"creator-error"}):null,e.jsx(ae,{"data-testid":"creator-grid",children:q?e.jsx(M,{count:15}):e.jsxs(e.Fragment,{children:[Ee.map(t=>Pe(t)?e.jsx(oe,{item:t},t.id):e.jsx(oe,{item:t,mode:"view"},t.id)),G?e.jsx(M,{count:6}):null]})}),e.jsx(se,{hasNextPage:ke,isFetching:G,isError:Ce,onLoadMore:()=>void $e()}),z==="error"?e.jsx(R,{message:o("creator.error"),testId:"creator-empty-error"}):z==="no-creations"?e.jsx(A,{testId:"creator-empty-none",icon:kt,title:o("creator.emptyNoCreationsTitle"),body:o("creator.emptyNoCreations"),cta:{label:o("assets.empty.cta"),to:"/items"}}):z==="filters"?e.jsx(A,{testId:"creator-empty-filters",icon:ze,title:o("creator.emptyFilters.title"),body:o("creator.emptyFilters.body",{count:I.data??0}),cta:{label:o("filterBar.clearAll"),onClick:H}}):null]})})]})]})}export{wo as Creator,wo as default};
312
- //# sourceMappingURL=Creator-DmmqINo6.js.map
312
+ //# sourceMappingURL=Creator-DuIxXv5-.js.map
@@ -1,4 +1,4 @@
1
- import{g as I}from"./react-C_Ms5avg.js";import{r as H}from"./index-DdW8GqwI.js";import{r as M}from"./dcl-schemas-CwIIbqmb.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},u=new o.Error().stack;u&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[u]="73896ef9-8383-4c49-8dcb-a0fdf2a53582",o._sentryDebugIdIdentifier="sentry-dbid-73896ef9-8383-4c49-8dcb-a0fdf2a53582")}catch{}})();function O(o,u){for(var w=0;w<u.length;w++){const h=u[w];if(typeof h!="string"&&!Array.isArray(h)){for(const g in h)if(g!=="default"&&!(g in o)){const v=Object.getOwnPropertyDescriptor(h,g);v&&Object.defineProperty(o,g,v.get?v:{enumerable:!0,get:()=>h[g]})}}}return Object.freeze(Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}))}var c={},F;function C(){if(F)return c;F=1,Object.defineProperty(c,"__esModule",{value:!0}),c.getHashesByKey=c.buildEntityWithoutNewFiles=c.buildEntity=c.buildEntityAndFile=void 0;const o=H(),u=M();async function w({type:n,pointers:t,timestamp:e,content:a,metadata:r}){var i;if(t.length===0)throw new Error("All entities must have at least one pointer.");const d={version:"v3",type:n,pointers:t,timestamp:e,content:a,metadata:r};if(a){const s=new Set;for(const p of a){const E=p.file.toLowerCase();if(s.has(E))throw new Error(`Error creating the deployable entity: Decentraland's file system is case insensitive, the file ${JSON.stringify(p.file)} is repeated`);s.add(E)}}const f=new TextEncoder().encode(JSON.stringify(d)),l={id:await(0,o.hashV1)(f),...d};if(!u.Entity.validate(l))throw new Error(`Generated entity is not valid:
1
+ import{g as I}from"./react-CPKOypa5.js";import{r as H}from"./index-DHcc1n0K.js";import{r as M}from"./dcl-schemas--SOz4s6t.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},u=new o.Error().stack;u&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[u]="73896ef9-8383-4c49-8dcb-a0fdf2a53582",o._sentryDebugIdIdentifier="sentry-dbid-73896ef9-8383-4c49-8dcb-a0fdf2a53582")}catch{}})();function O(o,u){for(var w=0;w<u.length;w++){const h=u[w];if(typeof h!="string"&&!Array.isArray(h)){for(const g in h)if(g!=="default"&&!(g in o)){const v=Object.getOwnPropertyDescriptor(h,g);v&&Object.defineProperty(o,g,v.get?v:{enumerable:!0,get:()=>h[g]})}}}return Object.freeze(Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}))}var c={},F;function C(){if(F)return c;F=1,Object.defineProperty(c,"__esModule",{value:!0}),c.getHashesByKey=c.buildEntityWithoutNewFiles=c.buildEntity=c.buildEntityAndFile=void 0;const o=H(),u=M();async function w({type:n,pointers:t,timestamp:e,content:a,metadata:r}){var i;if(t.length===0)throw new Error("All entities must have at least one pointer.");const d={version:"v3",type:n,pointers:t,timestamp:e,content:a,metadata:r};if(a){const s=new Set;for(const p of a){const E=p.file.toLowerCase();if(s.has(E))throw new Error(`Error creating the deployable entity: Decentraland's file system is case insensitive, the file ${JSON.stringify(p.file)} is repeated`);s.add(E)}}const f=new TextEncoder().encode(JSON.stringify(d)),l={id:await(0,o.hashV1)(f),...d};if(!u.Entity.validate(l))throw new Error(`Generated entity is not valid:
2
2
  `+((i=u.Entity.validate.errors)===null||i===void 0?void 0:i.map(s=>s.message).join(`
3
3
  `)));return{entity:l,entityFile:f}}c.buildEntityAndFile=w;async function h({type:n,pointers:t,files:e,metadata:a,timestamp:r}){const i=Array.from(e||[]).map(([l,s])=>({key:l,content:s})),d=await Promise.all(i.map(async({key:l,content:s})=>({key:l,content:s,hash:await(0,o.hashV1)(s)}))),f=new Map(d.map(({hash:l,key:s})=>[s,l])),y=new Map(d.map(({hash:l,content:s})=>[l,s]));return v(n,t,{hashesByKey:f,filesByHash:y,metadata:a,timestamp:r})}c.buildEntity=h;async function g(n,{contentUrl:t,type:e,pointers:a,hashesByKey:r,metadata:i,timestamp:d}){const f=r??i?m(i):void 0;if(f&&D(e,f)){const y=await _(n,t,f),l=await A(y,i);return h({type:e,pointers:a,files:y,metadata:l,timestamp:d})}return v(e,a,{hashesByKey:r,metadata:i,timestamp:d})}c.buildEntityWithoutNewFiles=g;async function v(n,t,e){if(t.length===0)throw new Error("All entities must have at least one pointer.");const a=e!=null&&e.hashesByKey?e==null?void 0:e.hashesByKey:new Map,r=Array.from(a.entries()).map(([l,s])=>({file:l,hash:s})),i=e!=null&&e.timestamp?e==null?void 0:e.timestamp:Date.now(),{entity:d,entityFile:f}=await w({type:n,pointers:t,timestamp:i,content:r,metadata:e==null?void 0:e.metadata}),y=e!=null&&e.filesByHash?e.filesByHash:new Map;return y.set(d.id,f),{files:y,entityId:d.id}}function D(n,t){return n===u.EntityType.PROFILE&&Array.from(t).some(([,e])=>e.toLowerCase().startsWith("qm"))}async function b(n,t){const a=await(await n.fetch(t)).arrayBuffer();return new Uint8Array(a)}async function _(n,t,e){const a=e.get("body.png"),r=e.get("face256.png"),i=new URL(`${t}/contents/${a}`).toString(),d=new URL(`${t}/contents/${r}`).toString(),[f,y]=await Promise.all([b(n,i),b(n,d)]);return new Map([["body.png",f],["face256.png",y]])}async function A(n,t){return t&&(t.avatars=await Promise.all(t.avatars.map(async e=>{const a={face256:"",body:""},r=n.get("face256.png");r&&(a.face256=await(0,o.hashV1)(r));const i=n.get("body.png");return i&&(a.body=await(0,o.hashV1)(i)),e.avatar.snapshots=a,e})),t)}function m(n){const t=n.avatars[0];if(t.avatar.snapshots)return new Map([["body.png",t.avatar.snapshots.body],["face256.png",t.avatar.snapshots.face256]])}return c.getHashesByKey=m,c}var B=C();const P=I(B),j=O({__proto__:null,default:P},[B]);export{j as D};
4
- //# sourceMappingURL=DeploymentBuilder-DHs8vMi-.js.map
4
+ //# sourceMappingURL=DeploymentBuilder-RTPThLbC.js.map
@@ -1,5 +1,5 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["_assets/index-BhGLhtmx.js","_assets/react-C_Ms5avg.js","_assets/dcl-schemas-CwIIbqmb.js","_assets/index-BdS2FUJe.js","_assets/sentry-Bhm9UKEB.js","_assets/ethers-DVDHopXp.js","_assets/intl-AKLEHPeO.js","_assets/index-l2QjlKjX.css","_assets/createSvgIcon-1GoZim_f.js","_assets/clsx-BEtG4eYu.js","_assets/styled-D7NeVRtc.js","_assets/emotion-styled.browser.esm-DkeqJInM.js","_assets/CircularProgress-CEUgemCx.js","_assets/index-DzyBsQ1a.js","_assets/useTheme-CtvPOYgK.js"])))=>i.map(i=>d[i]);
2
- import{j as r,r as s}from"./react-C_Ms5avg.js";import{_ as n,t as d,s as p}from"./index-BdS2FUJe.js";import{E as u}from"./sentry-Bhm9UKEB.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},o=new e.Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="b03afb1d-2aad-4cc0-a508-c92240c73bd2",e._sentryDebugIdIdentifier="sentry-dbid-b03afb1d-2aad-4cc0-a508-c92240c73bd2")}catch{}})();const l=s.lazy(async()=>{const[{EmoteControls:e},{Experimental_CssVarsProvider:o},{light:a}]=await Promise.all([n(()=>import("./index-BhGLhtmx.js").then(i=>i.i),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12])),n(()=>import("./index-DzyBsQ1a.js"),__vite__mapDeps([13,3,1,2,4,5,6,7,14,10])),n(()=>import("./index-BdS2FUJe.js").then(i=>i.dh),__vite__mapDeps([3,1,2,4,5,6,7]))]);return{default:i=>r.jsx(o,{theme:a,children:r.jsx(e,{...i})})}});function c(e){return r.jsx(u,{fallback:r.jsx(r.Fragment,{}),children:r.jsx(s.Suspense,{fallback:null,children:r.jsx(l,{...e})})})}const{colors:t,radius:b}=d,x=p.div`
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["_assets/index-XmZ_5wbk.js","_assets/react-CPKOypa5.js","_assets/dcl-schemas--SOz4s6t.js","_assets/index-D7Vr2oVM.js","_assets/sentry-Dhl3FQKR.js","_assets/ethers-BGK6CGbc.js","_assets/intl-AKLEHPeO.js","_assets/index-l2QjlKjX.css","_assets/createSvgIcon-DK7LeDz8.js","_assets/clsx-BEtG4eYu.js","_assets/styled-BUVq9rPS.js","_assets/emotion-styled.browser.esm-QAN7vOQx.js","_assets/CircularProgress-CVMElXyN.js","_assets/index-CmHFYeQW.js","_assets/useTheme-By5MMSvI.js"])))=>i.map(i=>d[i]);
2
+ import{j as r,r as s}from"./react-CPKOypa5.js";import{_ as n,t as d,s as p}from"./index-D7Vr2oVM.js";import{E as u}from"./sentry-Dhl3FQKR.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},o=new e.Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="b03afb1d-2aad-4cc0-a508-c92240c73bd2",e._sentryDebugIdIdentifier="sentry-dbid-b03afb1d-2aad-4cc0-a508-c92240c73bd2")}catch{}})();const l=s.lazy(async()=>{const[{EmoteControls:e},{Experimental_CssVarsProvider:o},{light:a}]=await Promise.all([n(()=>import("./index-XmZ_5wbk.js").then(i=>i.i),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12])),n(()=>import("./index-CmHFYeQW.js"),__vite__mapDeps([13,3,1,2,4,5,6,7,14,10])),n(()=>import("./index-D7Vr2oVM.js").then(i=>i.dh),__vite__mapDeps([3,1,2,4,5,6,7]))]);return{default:i=>r.jsx(o,{theme:a,children:r.jsx(e,{...i})})}});function c(e){return r.jsx(u,{fallback:r.jsx(r.Fragment,{}),children:r.jsx(s.Suspense,{fallback:null,children:r.jsx(l,{...e})})})}const{colors:t,radius:b}=d,x=p.div`
3
3
  /* Doubled class: a preview panel may size its children greedily (ItemDetail's stretches every child to
4
4
  fill the stage), and the bar's own geometry has to win that whichever order the styles land in. */
5
5
  && {
@@ -118,4 +118,4 @@ import{j as r,r as s}from"./react-C_Ms5avg.js";import{_ as n,t as d,s as p}from"
118
118
  outline-offset: 2px;
119
119
  }
120
120
  `;function f({previewId:e,testId:o="emote-controls"}){return r.jsx(x,{"data-preview-controls":!0,"data-testid":o,children:r.jsx(c,{wearablePreviewId:e,hideFrameInput:!0})})}export{f as E};
121
- //# sourceMappingURL=EmotePlaybackBar-C4pC2y75.js.map
121
+ //# sourceMappingURL=EmotePlaybackBar-CwnUkIi2.js.map
@@ -1,2 +1,2 @@
1
- import{j as n}from"./react-C_Ms5avg.js";import{I as o}from"./index-BdS2FUJe.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},r=new e.Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="c67eed24-9c07-42e3-aafe-ecbed75d6f90",e._sentryDebugIdIdentifier="sentry-dbid-c67eed24-9c07-42e3-aafe-ecbed75d6f90")}catch{}})();function i({message:e,className:r,testId:t}){return e?n.jsxs("p",{className:r?`error-notice ${r}`:"error-notice","data-testid":t,role:"alert",children:[n.jsx(o,{name:"alert",className:"error-notice__ico",size:18}),n.jsx("span",{className:"error-notice__msg",children:e})]}):null}export{i as E};
2
- //# sourceMappingURL=ErrorNotice-CFo7FDnC.js.map
1
+ import{j as n}from"./react-CPKOypa5.js";import{I as o}from"./index-D7Vr2oVM.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},r=new e.Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="c67eed24-9c07-42e3-aafe-ecbed75d6f90",e._sentryDebugIdIdentifier="sentry-dbid-c67eed24-9c07-42e3-aafe-ecbed75d6f90")}catch{}})();function i({message:e,className:r,testId:t}){return e?n.jsxs("p",{className:r?`error-notice ${r}`:"error-notice","data-testid":t,role:"alert",children:[n.jsx(o,{name:"alert",className:"error-notice__ico",size:18}),n.jsx("span",{className:"error-notice__msg",children:e})]}):null}export{i as E};
2
+ //# sourceMappingURL=ErrorNotice-DInl_aPc.js.map
@@ -1,2 +1,2 @@
1
- import{C as p,E as w,b as h,S as E,d as k,O as U,N as A,g as P,B as x,e as N,i as I,p as _}from"./W3MFrameProviderSingleton-BM7gIcXH.js";import{g as L,a as D,f as b,b as v,c as T}from"./index-DWFvqWtb.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},n=new t.Error().stack;n&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[n]="db5ef93b-895f-4f6f-8daf-c7042da4ce30",t._sentryDebugIdIdentifier="sentry-dbid-db5ef93b-895f-4f6f-8daf-c7042da4ce30")}catch{}})();const W=0,C={paymentAsset:null,amount:null,tokenAmount:0,priceLoading:!1,error:null,exchanges:[],isLoading:!1,currentPayment:void 0,isPaymentInProgress:!1,paymentId:"",assets:[]},e=_(C),d={state:e,subscribe(t){return I(e,()=>t(e))},subscribeKey(t,n){return N(e,t,n)},resetState(){Object.assign(e,{...C})},async getAssetsForNetwork(t){const n=T(t),s=await d.getAssetsImageAndPrice(n),r=n.map(a=>{var c,o,m,l;const u=a.asset==="native"?P():`${a.network}:${a.asset}`,i=s.find(S=>{var y,g,f;return((f=(g=(y=S.fungibles)==null?void 0:y[0])==null?void 0:g.address)==null?void 0:f.toLowerCase())===u.toLowerCase()});return{...a,price:((o=(c=i==null?void 0:i.fungibles)==null?void 0:c[0])==null?void 0:o.price)||1,metadata:{...a.metadata,iconUrl:(l=(m=i==null?void 0:i.fungibles)==null?void 0:m[0])==null?void 0:l.iconUrl}}});return e.assets=r,r},async getAssetsImageAndPrice(t){const n=t.map(r=>r.asset==="native"?P():`${r.network}:${r.asset}`);return await Promise.all(n.map(r=>x.fetchTokenPrice({addresses:[r]})))},getTokenAmount(){var s;if(!((s=e==null?void 0:e.paymentAsset)!=null&&s.price))throw new Error("Cannot get token price");const t=A.bigNumber(e.amount??0).round(8),n=A.bigNumber(e.paymentAsset.price).round(8);return t.div(n).round(8).toNumber()},setAmount(t){var n;e.amount=t,(n=e.paymentAsset)!=null&&n.price&&(e.tokenAmount=d.getTokenAmount())},setPaymentAsset(t){e.paymentAsset=t},isPayWithExchangeEnabled(){var t;return(t=U.state.remoteFeatures)==null?void 0:t.payWithExchange},isPayWithExchangeSupported(){return d.isPayWithExchangeEnabled()&&p.state.activeCaipNetwork&&k.PAY_WITH_EXCHANGE_SUPPORTED_CHAIN_NAMESPACES.includes(p.state.activeCaipNetwork.chainNamespace)},async fetchExchanges(){var t;try{const n=d.isPayWithExchangeSupported();if(!e.paymentAsset||!n){e.exchanges=[],e.isLoading=!1;return}e.isLoading=!0;const s=await v({page:W,asset:b(e.paymentAsset.network,e.paymentAsset.asset),amount:((t=e.amount)==null?void 0:t.toString())??"0"});e.exchanges=s.exchanges.slice(0,2)}catch{throw E.showError("Unable to get exchanges"),new Error("Unable to get exchanges")}finally{e.isLoading=!1}},async getPayUrl(t,n){try{const s=Number(n.amount),r=await D({exchangeId:t,asset:b(n.network,n.asset),amount:s.toString(),recipient:`${n.network}:${n.recipient}`});return w.sendEvent({type:"track",event:"PAY_EXCHANGE_SELECTED",properties:{exchange:{id:t},configuration:{network:n.network,asset:n.asset,recipient:n.recipient,amount:s},currentPayment:{type:"exchange",exchangeId:t},source:"fund-from-exchange",headless:!1}}),r}catch(s){throw s instanceof Error&&s.message.includes("is not supported")?new Error("Asset not supported"):new Error(s.message)}},async handlePayWithExchange(t){var n;try{const s=(n=p.getAccountData())==null?void 0:n.address;if(!s)throw new Error("No account connected");if(!e.paymentAsset)throw new Error("No payment asset selected");const r=h.returnOpenHref("","popupWindow","scrollbar=yes,width=480,height=720");if(!r)throw new Error("Could not create popup window");e.isPaymentInProgress=!0,e.paymentId=crypto.randomUUID(),e.currentPayment={type:"exchange",exchangeId:t};const{network:a,asset:u}=e.paymentAsset,i={network:a,asset:u,amount:e.tokenAmount,recipient:s},c=await d.getPayUrl(t,i);if(!c){try{r.close()}catch(o){console.error("Unable to close popup window",o)}throw new Error("Unable to initiate payment")}e.currentPayment.sessionId=c.sessionId,e.currentPayment.status="IN_PROGRESS",e.currentPayment.exchangeId=t,r.location.href=c.url}catch{e.error="Unable to initiate payment",E.showError(e.error)}},async waitUntilComplete({exchangeId:t,sessionId:n,paymentId:s,retries:r=20}){const a=await d.getBuyStatus(t,n,s);if(a.status==="SUCCESS"||a.status==="FAILED")return a;if(r===0)throw new Error("Unable to get deposit status");return await new Promise(u=>{setTimeout(u,5e3)}),d.waitUntilComplete({exchangeId:t,sessionId:n,paymentId:s,retries:r-1})},async getBuyStatus(t,n,s){var r,a,u,i,c;try{if(!e.currentPayment)throw new Error("No current payment");const o=await L({sessionId:n,exchangeId:t});if(e.currentPayment.status=o.status,o.status==="SUCCESS"||o.status==="FAILED"){const m=(r=p.getAccountData())==null?void 0:r.address;e.currentPayment.result=o.txHash,e.isPaymentInProgress=!1,w.sendEvent({type:"track",event:o.status==="SUCCESS"?"PAY_SUCCESS":"PAY_ERROR",properties:{message:o.status==="FAILED"?h.parseError(e.error):void 0,source:"fund-from-exchange",paymentId:s,configuration:{network:((a=e.paymentAsset)==null?void 0:a.network)||"",asset:((u=e.paymentAsset)==null?void 0:u.asset)||"",recipient:m||"",amount:e.amount??0},currentPayment:{type:"exchange",exchangeId:(i=e.currentPayment)==null?void 0:i.exchangeId,sessionId:(c=e.currentPayment)==null?void 0:c.sessionId,result:o.txHash}}})}return o}catch{return{status:"UNKNOWN",txHash:""}}},reset(){e.currentPayment=void 0,e.isPaymentInProgress=!1,e.paymentId="",e.paymentAsset=null,e.amount=0,e.tokenAmount=0,e.priceLoading=!1,e.error=null,e.exchanges=[],e.isLoading=!1}};export{d as E};
2
- //# sourceMappingURL=ExchangeController-CAu607Z8.js.map
1
+ import{C as p,E as w,b as h,S as E,d as k,O as U,N as A,g as P,B as x,e as N,i as I,p as _}from"./W3MFrameProviderSingleton-BZDRIDaX.js";import{g as L,a as D,f as b,b as v,c as T}from"./index-BHP4R-KS.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},n=new t.Error().stack;n&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[n]="db5ef93b-895f-4f6f-8daf-c7042da4ce30",t._sentryDebugIdIdentifier="sentry-dbid-db5ef93b-895f-4f6f-8daf-c7042da4ce30")}catch{}})();const W=0,C={paymentAsset:null,amount:null,tokenAmount:0,priceLoading:!1,error:null,exchanges:[],isLoading:!1,currentPayment:void 0,isPaymentInProgress:!1,paymentId:"",assets:[]},e=_(C),d={state:e,subscribe(t){return I(e,()=>t(e))},subscribeKey(t,n){return N(e,t,n)},resetState(){Object.assign(e,{...C})},async getAssetsForNetwork(t){const n=T(t),s=await d.getAssetsImageAndPrice(n),r=n.map(a=>{var c,o,m,l;const u=a.asset==="native"?P():`${a.network}:${a.asset}`,i=s.find(S=>{var y,g,f;return((f=(g=(y=S.fungibles)==null?void 0:y[0])==null?void 0:g.address)==null?void 0:f.toLowerCase())===u.toLowerCase()});return{...a,price:((o=(c=i==null?void 0:i.fungibles)==null?void 0:c[0])==null?void 0:o.price)||1,metadata:{...a.metadata,iconUrl:(l=(m=i==null?void 0:i.fungibles)==null?void 0:m[0])==null?void 0:l.iconUrl}}});return e.assets=r,r},async getAssetsImageAndPrice(t){const n=t.map(r=>r.asset==="native"?P():`${r.network}:${r.asset}`);return await Promise.all(n.map(r=>x.fetchTokenPrice({addresses:[r]})))},getTokenAmount(){var s;if(!((s=e==null?void 0:e.paymentAsset)!=null&&s.price))throw new Error("Cannot get token price");const t=A.bigNumber(e.amount??0).round(8),n=A.bigNumber(e.paymentAsset.price).round(8);return t.div(n).round(8).toNumber()},setAmount(t){var n;e.amount=t,(n=e.paymentAsset)!=null&&n.price&&(e.tokenAmount=d.getTokenAmount())},setPaymentAsset(t){e.paymentAsset=t},isPayWithExchangeEnabled(){var t;return(t=U.state.remoteFeatures)==null?void 0:t.payWithExchange},isPayWithExchangeSupported(){return d.isPayWithExchangeEnabled()&&p.state.activeCaipNetwork&&k.PAY_WITH_EXCHANGE_SUPPORTED_CHAIN_NAMESPACES.includes(p.state.activeCaipNetwork.chainNamespace)},async fetchExchanges(){var t;try{const n=d.isPayWithExchangeSupported();if(!e.paymentAsset||!n){e.exchanges=[],e.isLoading=!1;return}e.isLoading=!0;const s=await v({page:W,asset:b(e.paymentAsset.network,e.paymentAsset.asset),amount:((t=e.amount)==null?void 0:t.toString())??"0"});e.exchanges=s.exchanges.slice(0,2)}catch{throw E.showError("Unable to get exchanges"),new Error("Unable to get exchanges")}finally{e.isLoading=!1}},async getPayUrl(t,n){try{const s=Number(n.amount),r=await D({exchangeId:t,asset:b(n.network,n.asset),amount:s.toString(),recipient:`${n.network}:${n.recipient}`});return w.sendEvent({type:"track",event:"PAY_EXCHANGE_SELECTED",properties:{exchange:{id:t},configuration:{network:n.network,asset:n.asset,recipient:n.recipient,amount:s},currentPayment:{type:"exchange",exchangeId:t},source:"fund-from-exchange",headless:!1}}),r}catch(s){throw s instanceof Error&&s.message.includes("is not supported")?new Error("Asset not supported"):new Error(s.message)}},async handlePayWithExchange(t){var n;try{const s=(n=p.getAccountData())==null?void 0:n.address;if(!s)throw new Error("No account connected");if(!e.paymentAsset)throw new Error("No payment asset selected");const r=h.returnOpenHref("","popupWindow","scrollbar=yes,width=480,height=720");if(!r)throw new Error("Could not create popup window");e.isPaymentInProgress=!0,e.paymentId=crypto.randomUUID(),e.currentPayment={type:"exchange",exchangeId:t};const{network:a,asset:u}=e.paymentAsset,i={network:a,asset:u,amount:e.tokenAmount,recipient:s},c=await d.getPayUrl(t,i);if(!c){try{r.close()}catch(o){console.error("Unable to close popup window",o)}throw new Error("Unable to initiate payment")}e.currentPayment.sessionId=c.sessionId,e.currentPayment.status="IN_PROGRESS",e.currentPayment.exchangeId=t,r.location.href=c.url}catch{e.error="Unable to initiate payment",E.showError(e.error)}},async waitUntilComplete({exchangeId:t,sessionId:n,paymentId:s,retries:r=20}){const a=await d.getBuyStatus(t,n,s);if(a.status==="SUCCESS"||a.status==="FAILED")return a;if(r===0)throw new Error("Unable to get deposit status");return await new Promise(u=>{setTimeout(u,5e3)}),d.waitUntilComplete({exchangeId:t,sessionId:n,paymentId:s,retries:r-1})},async getBuyStatus(t,n,s){var r,a,u,i,c;try{if(!e.currentPayment)throw new Error("No current payment");const o=await L({sessionId:n,exchangeId:t});if(e.currentPayment.status=o.status,o.status==="SUCCESS"||o.status==="FAILED"){const m=(r=p.getAccountData())==null?void 0:r.address;e.currentPayment.result=o.txHash,e.isPaymentInProgress=!1,w.sendEvent({type:"track",event:o.status==="SUCCESS"?"PAY_SUCCESS":"PAY_ERROR",properties:{message:o.status==="FAILED"?h.parseError(e.error):void 0,source:"fund-from-exchange",paymentId:s,configuration:{network:((a=e.paymentAsset)==null?void 0:a.network)||"",asset:((u=e.paymentAsset)==null?void 0:u.asset)||"",recipient:m||"",amount:e.amount??0},currentPayment:{type:"exchange",exchangeId:(i=e.currentPayment)==null?void 0:i.exchangeId,sessionId:(c=e.currentPayment)==null?void 0:c.sessionId,result:o.txHash}}})}return o}catch{return{status:"UNKNOWN",txHash:""}}},reset(){e.currentPayment=void 0,e.isPaymentInProgress=!1,e.paymentId="",e.paymentAsset=null,e.amount=0,e.tokenAmount=0,e.priceLoading=!1,e.error=null,e.exchanges=[],e.isLoading=!1}};export{d as E};
2
+ //# sourceMappingURL=ExchangeController-BHhqTqpp.js.map
@@ -1,4 +1,4 @@
1
- import{r as x,j as o}from"./react-C_Ms5avg.js";import{t as e,s as a,b as h,I as w}from"./index-BdS2FUJe.js";(function(){try{var i=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},s=new i.Error().stack;s&&(i._sentryDebugIds=i._sentryDebugIds||{},i._sentryDebugIds[s]="25e1e28b-e95e-44f5-9c49-6561c3eb67b7",i._sentryDebugIdIdentifier="sentry-dbid-25e1e28b-e95e-44f5-9c49-6561c3eb67b7")}catch{}})();const m=a.section`
1
+ import{r as x,j as o}from"./react-CPKOypa5.js";import{t as e,s as a,b as h,I as w}from"./index-D7Vr2oVM.js";(function(){try{var i=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},s=new i.Error().stack;s&&(i._sentryDebugIds=i._sentryDebugIds||{},i._sentryDebugIds[s]="25e1e28b-e95e-44f5-9c49-6561c3eb67b7",i._sentryDebugIdIdentifier="sentry-dbid-25e1e28b-e95e-44f5-9c49-6561c3eb67b7")}catch{}})();const m=a.section`
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  gap: 36px;
@@ -172,4 +172,4 @@ import{r as x,j as o}from"./react-C_Ms5avg.js";import{t as e,s as a,b as h,I as
172
172
  }
173
173
  `;function S({title:i,entries:s,tone:l="light",className:u}){const[f,g]=x.useState(()=>new Set),p=x.useId();function b(t){g(n=>{const r=new Set(n);return r.delete(t)||r.add(t),r})}return o.jsxs(m,{className:u,"data-tone":l,"data-testid":"faq",children:[o.jsx(k,{"data-testid":"faq-title",children:h(i)}),o.jsx(v,{children:s.map(t=>{const n=f.has(t.question),r=`${p}-panel-${t.question}`,c=`${p}-header-${t.question}`;return o.jsxs($,{"data-open":n,"data-testid":"faq-item",children:[o.jsxs(y,{type:"button",onClick:()=>b(t.question),id:c,"aria-expanded":n,"aria-controls":n?r:void 0,"data-open":n,"data-testid":"faq-question",children:[o.jsx(q,{children:h(t.question)}),o.jsx(I,{"data-open":n,"aria-hidden":!0,children:o.jsx(w,{name:"chevron-up-line",size:36})})]}),n&&o.jsx(j,{id:r,role:"region","aria-labelledby":c,"data-testid":"faq-answer",children:h(t.answer).split(`
174
174
  `).map(d=>d.trim()).filter(Boolean).map(d=>o.jsx("p",{children:d},d))})]},t.question)})})]})}export{S as F};
175
- //# sourceMappingURL=Faq-ygN1-ye9.js.map
175
+ //# sourceMappingURL=Faq-CaLlq-Oz.js.map
@@ -1,4 +1,4 @@
1
- import{b as ue,u as xe,r as l,j as t}from"./react-C_Ms5avg.js";import{s as i,t as e,m as F,n as ge,b as o,C as h,o as fe,r as me,af as x,aK as be,h as M,aU as D,bX as we,aC as N,q as ie,I as ye,aq as ke,bY as Q}from"./index-BdS2FUJe.js";import{C as ve}from"./Confetti-CVU-1nr5.js";import{F as Ce}from"./Faq-ygN1-ye9.js";import{R as H}from"./resume-buy-CfeXSfok.js";import{u as $e,b as je,R as Se,c as Pe,i as _e,d as Ae}from"./useCreditPacks-BZi7jTOh.js";import"./dcl-schemas-CwIIbqmb.js";import"./sentry-Bhm9UKEB.js";import"./ethers-DVDHopXp.js";import"./intl-AKLEHPeO.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},n=new s.Error().stack;n&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[n]="bbe8cc68-d24e-4c2e-b6b5-19627f59ba35",s._sentryDebugIdIdentifier="sentry-dbid-bbe8cc68-d24e-4c2e-b6b5-19627f59ba35")}catch{}})();const _="https://cdn.decentraland.org/@dcl/shop/1.7.1-31588894536.commit-0f93920/_assets/pack-coins-BDh1ZDbh.webp",re="https://cdn.decentraland.org/@dcl/shop/1.7.1-31588894536.commit-0f93920/_assets/pack-stacks-D-V2jSHW.webp",ne="https://cdn.decentraland.org/@dcl/shop/1.7.1-31588894536.commit-0f93920/_assets/pack-chest-BX_j84xW.webp",Te="https://cdn.decentraland.org/@dcl/shop/1.7.1-31588894536.commit-0f93920/_assets/credit-coin-CmcTCd5i.webp",K="data:image/svg+xml,%3csvg%20width='60'%20height='60'%20viewBox='0%200%2060%2060'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20width='60'%20height='60'%20rx='30'%20fill='%2334CE77'/%3e%3cpath%20d='M21.6583%2046.1067L11.4656%2036.0591C10.1688%2034.829%2010.1905%2032.7207%2011.4769%2031.4622L13.6868%2029.3591C14.9732%2028.1006%2017.1615%2028.1058%2018.4582%2029.3359L23.8747%2034.6197L41.9704%2015.6527C43.2568%2014.3942%2045.4291%2014.2093%2046.7258%2015.4394L48.8765%2017.3628C50.1732%2018.5929%2050.3491%2020.6844%2049.0626%2021.9429L26.6112%2045.8766C25.1433%2047.342%2022.955%2047.3368%2021.6583%2046.1067Z'%20fill='%23FCFCFC'/%3e%3c/svg%3e",O="linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0)",Re=i.div`
1
+ import{b as ue,u as xe,r as l,j as t}from"./react-CPKOypa5.js";import{s as i,t as e,m as F,n as ge,b as s,C as h,o as fe,r as me,af as x,aK as be,h as M,aU as D,bX as we,aC as N,q as ie,I as ye,aq as ke,bY as Q}from"./index-D7Vr2oVM.js";import{C as ve}from"./Confetti-W3F-dgtT.js";import{F as Ce}from"./Faq-CaLlq-Oz.js";import{R as H}from"./resume-buy-7yxAf7iG.js";import{u as $e,b as je,R as Se,c as Pe,i as _e,d as Ae}from"./useCreditPacks-BFMlIcuP.js";import"./dcl-schemas--SOz4s6t.js";import"./sentry-Dhl3FQKR.js";import"./ethers-BGK6CGbc.js";import"./intl-AKLEHPeO.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},n=new o.Error().stack;n&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[n]="11c010cd-f5fa-44f5-b348-b591c422f8d2",o._sentryDebugIdIdentifier="sentry-dbid-11c010cd-f5fa-44f5-b348-b591c422f8d2")}catch{}})();const _="https://cdn.decentraland.org/@dcl/shop/1.8.0/_assets/pack-coins-BDh1ZDbh.webp",re="https://cdn.decentraland.org/@dcl/shop/1.8.0/_assets/pack-stacks-D-V2jSHW.webp",ne="https://cdn.decentraland.org/@dcl/shop/1.8.0/_assets/pack-chest-BX_j84xW.webp",Te="https://cdn.decentraland.org/@dcl/shop/1.8.0/_assets/credit-coin-CmcTCd5i.webp",K="data:image/svg+xml,%3csvg%20width='60'%20height='60'%20viewBox='0%200%2060%2060'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20width='60'%20height='60'%20rx='30'%20fill='%2334CE77'/%3e%3cpath%20d='M21.6583%2046.1067L11.4656%2036.0591C10.1688%2034.829%2010.1905%2032.7207%2011.4769%2031.4622L13.6868%2029.3591C14.9732%2028.1006%2017.1615%2028.1058%2018.4582%2029.3359L23.8747%2034.6197L41.9704%2015.6527C43.2568%2014.3942%2045.4291%2014.2093%2046.7258%2015.4394L48.8765%2017.3628C50.1732%2018.5929%2050.3491%2020.6844%2049.0626%2021.9429L26.6112%2045.8766C25.1433%2047.342%2022.955%2047.3368%2021.6583%2046.1067Z'%20fill='%23FCFCFC'/%3e%3c/svg%3e",O="linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0)",Re=i.div`
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  gap: 24px;
@@ -62,7 +62,7 @@ import{b as ue,u as xe,r as l,j as t}from"./react-C_Ms5avg.js";import{s as i,t a
62
62
  flex-direction: column;
63
63
  align-items: center;
64
64
  gap: 52px;
65
- ${({$hidden:s})=>s&&"visibility: hidden;"}
65
+ ${({$hidden:o})=>o&&"visibility: hidden;"}
66
66
 
67
67
  ${e.media.maxWidth("lg")} {
68
68
  gap: 32px;
@@ -514,7 +514,7 @@ import{b as ue,u as xe,r as l,j as t}from"./react-C_Ms5avg.js";import{s as i,t a
514
514
  gap: 32px;
515
515
  padding: 64px 24px;
516
516
  min-height: 42vh;
517
- `,oe=i.img`
517
+ `,se=i.img`
518
518
  width: 61px;
519
519
  height: 61px;
520
520
  animation: ${tt} 1.2s ease-in-out infinite;
@@ -522,7 +522,7 @@ import{b as ue,u as xe,r as l,j as t}from"./react-C_Ms5avg.js";import{s as i,t a
522
522
  @media (prefers-reduced-motion: reduce) {
523
523
  animation: none;
524
524
  }
525
- `,rt=i(oe)`
525
+ `,rt=i(se)`
526
526
  width: 72px;
527
527
  height: 72px;
528
528
  `,nt=i.div`
@@ -530,7 +530,7 @@ import{b as ue,u as xe,r as l,j as t}from"./react-C_Ms5avg.js";import{s as i,t a
530
530
  flex-direction: column;
531
531
  align-items: center;
532
532
  gap: 8px;
533
- `,ot=i.p`
533
+ `,st=i.p`
534
534
  margin: 0;
535
535
  font-family: ${e.font.sans};
536
536
  font-size: 20px;
@@ -540,7 +540,7 @@ import{b as ue,u as xe,r as l,j as t}from"./react-C_Ms5avg.js";import{s as i,t a
540
540
  strong {
541
541
  font-weight: 700;
542
542
  }
543
- `,st=i.div`
543
+ `,ot=i.div`
544
544
  display: flex;
545
545
  align-items: center;
546
546
  gap: 8px;
@@ -806,5 +806,5 @@ import{b as ue,u as xe,r as l,j as t}from"./react-C_Ms5avg.js";import{s as i,t a
806
806
  margin: 0;
807
807
  font-family: ${e.font.sans};
808
808
  color: ${e.colors.err};
809
- `,v=_e()?"mock":"stripe",ee=[_,_,re,ne],Bt={pack_5:_,pack_10:_,pack_25:re,pack_50:ne};function se(s,n){return Bt[s.id]??ee[n%ee.length]}function zt(s,n){return s.artUrl??se(s,n)}const Ft=[{question:"faq.buyers.whatAreQ",answer:"faq.buyers.whatAreA"},{question:"faq.buyers.whatCanIBuyQ",answer:"faq.buyers.whatCanIBuyA"},{question:"faq.buyers.whereBuyQ",answer:"faq.buyers.whereBuyA"},{question:"faq.buyers.whereUseQ",answer:"faq.buyers.whereUseA"},{question:"faq.buyers.expireQ",answer:"faq.buyers.expireA"},{question:"faq.buyers.transferQ",answer:"faq.buyers.transferA"}];function te(s){const n=s;if((n==null?void 0:n.name)==="AbortError")return o("getCredits.errorCanceled");const g=((n==null?void 0:n.message)??"").toLowerCase();return g.includes("sign in")?o("getCredits.errorSignIn",{currency:h.name}):g.includes("timed out")?o("getCredits.errorTimeout",{currency:h.name}):o("getCredits.errorGeneric")}function Ht(){var L;ge({title:o("nav.getCredits",{currency:h.name}),noindex:!0});const s=ue(),{session:n,signIn:g,restored:a}=fe(),m=me(),[b,$]=xe(),{packs:w,isLoading:ae}=$e(),[f,p]=l.useState("select"),[d,I]=l.useState(null),[j,q]=l.useState(null),de=(j!=null?(L=w.find(r=>r.credits===j))==null?void 0:L.artUrl:void 0)??Te,[ce,y]=l.useState(null),[le,S]=l.useState(!1),T=l.useRef(null);l.useEffect(()=>()=>{var r;return(r=T.current)==null?void 0:r.abort()},[]);const E=l.useCallback(()=>{$(r=>{const c=new URLSearchParams(r);return c.delete("order"),c.delete("canceled"),c},{replace:!0})},[$]),R=l.useCallback(async r=>{p("processing");const c=new AbortController;T.current=c;try{const u=await je(r,{signal:c.signal,address:n==null?void 0:n.address,identity:n==null?void 0:n.identity});if(u.status==="credited"){const k=u.creditsGranted??(d==null?void 0:d.credits)??0;q(k>0?k:null),p("success"),x("Shop Completed Buy Credits",{order_id:r,pack_usd:(d==null?void 0:d.usd)??null,credits:k>0?k:null,provider:v}),m.invalidateQueries({queryKey:["usd-balance"]});try{if(sessionStorage.getItem(Se)){const P={resumeCheckout:!0,...k>0?{creditsAdded:k}:{}};s("/cart",{state:P});return}}catch{}try{const P=sessionStorage.getItem(H);if(P){sessionStorage.removeItem(H);const U=JSON.parse(P),G=be(U);if(G){s(G,{state:{item:U,resumeBuy:!0}});return}}}catch{}}else u.status==="abandoned"||u.status==="initiated"?(x("Shop Buy Credits Cancelled",{order_id:r,provider:v,step:"grant"}),m.invalidateQueries({queryKey:["usd-balance"]}),S(!0),p("select")):u.status==="failed"?(x("Shop Buy Credits Failed",{step:"grant",error_code:"grant_failed",pack_usd:(d==null?void 0:d.usd)??null}),y(u.error??o("getCredits.errorGrant",{currency:h.name})),p("error")):(x("Shop Buy Credits Pending",{step:"grant",pack_usd:(d==null?void 0:d.usd)??null}),m.invalidateQueries({queryKey:["usd-balance"]}),p("pending"))}catch(u){M(u,{flow:"get_credits",step:"grant",order_id:r}),x("Shop Buy Credits Failed",{step:"grant",error_code:D(u),pack_usd:(d==null?void 0:d.usd)??null}),y(te(u)),p("error")}},[d,n,m,s]),pe=l.useCallback(async r=>{if(!n){g();return}y(null),S(!1),I(r),p(v==="mock"?"processing":"redirecting"),x("Shop Started Buy Credits",{pack_usd:r.usd,credits:r.credits,provider:v});try{const c=await Pe(r.id,{address:n.address,identity:n.identity});if(c.mock)R(c.orderId);else if(c.url)x("Shop Redirected To Stripe",{order_id:c.orderId,pack_usd:r.usd,credits:r.credits}),window.location.href=c.url;else throw new Error("Checkout did not return a redirect url")}catch(c){M(c,{flow:"get_credits",step:"checkout",provider:v}),x("Shop Buy Credits Failed",{step:"checkout",error_code:D(c),pack_usd:r.usd}),y(te(c)),p("error")}},[n,g,R]),B=l.useRef(!1),W=l.useRef(null);l.useEffect(()=>{if(B.current)return;const r=b.get("order");if(b.get("canceled")!=null){if(r&&!a)return;B.current=!0,x("Shop Buy Credits Cancelled",{order_id:r,provider:v}),r&&n&&we(r,n.identity),E(),S(!0),p("select");return}if(r){if(p("processing"),!n){a&&(x("Shop Buy Credits Failed",{step:"grant",error_code:"no_identity",pack_usd:(d==null?void 0:d.usd)??null}),y(o("getCredits.errorSignInAfterPay",{currency:h.name})),p("error"));return}B.current=!0,E(),R(r)}},[b,n,a]);function z(){var r;(r=T.current)==null||r.abort(),p("select"),I(null),q(null),y(null),S(!1)}function he(){const r=W.current;if(!r)return;const c=window.matchMedia("(prefers-reduced-motion: reduce)").matches;r.scrollIntoView({behavior:c?"auto":"smooth",block:"center"}),r.focus({preventScroll:!0})}return t.jsxs(Re,{children:[(f==="select"||f==="redirecting")&&t.jsxs(t.Fragment,{children:[t.jsx(Be,{"data-testid":"credits-hero",children:t.jsxs(ze,{children:[t.jsxs(Ie,{$hidden:f==="redirecting",children:[t.jsxs(qe,{children:[t.jsx(Ee,{children:o("getCredits.title")}),t.jsxs(We,{children:[t.jsx(Le,{children:o("getCredits.subtitle")}),t.jsx(Ue,{type:"button",onClick:he,"data-testid":"credits-learn-more",children:o("getCredits.learnMore")})]})]}),le&&t.jsx(Ge,{role:"status",children:o("getCredits.canceledNote")}),t.jsx(It,{packs:w,loading:ae,onSelect:r=>void pe(r)})]}),f==="redirecting"&&t.jsxs(Je,{role:"status","aria-live":"polite",children:[t.jsx(rt,{src:N,alt:"",width:72,height:72}),t.jsx(et,{children:o("getCredits.redirecting")})]})]})}),t.jsx(Fe,{ref:W,tabIndex:-1,"data-testid":"credits-faq",children:t.jsx(Ce,{title:"faq.title",entries:Ft,tone:"on-dark"})})]}),f==="processing"&&t.jsxs(it,{role:"status","aria-live":"polite",children:[t.jsx(oe,{src:N,alt:"",width:61,height:61}),t.jsxs(nt,{children:[t.jsxs(ot,{children:[t.jsx("strong",{children:o("getCredits.processing")}),"…"]}),t.jsxs(st,{"aria-hidden":!0,children:[t.jsx(dt,{children:t.jsx(ct,{})}),t.jsx(lt,{children:"1/1"})]})]})]}),f==="success"&&t.jsx(J,{children:t.jsxs(pt,{role:"status","aria-live":"polite",children:[t.jsx(ve,{}),t.jsxs(ht,{children:[t.jsx(ut,{src:K,alt:"",width:60,height:60}),t.jsxs(xt,{children:[t.jsx("strong",{children:o("getCredits.successTitle")})," ",o("getCredits.successBody",{currency:h.name})]})]}),j!=null&&t.jsx(gt,{children:t.jsxs(ft,{children:[t.jsx(mt,{src:de,alt:"",width:93,height:93}),t.jsxs(bt,{children:[t.jsx(ie,{}),t.jsxs("span",{children:[t.jsx(wt,{children:o("getCredits.creditsAmount",{credits:j,currency:h.name})})," ",t.jsx(yt,{children:o("getCredits.creditsAdded")})]})]})]})}),t.jsxs(kt,{children:[t.jsx(C,{"data-variant":"outline",onClick:z,children:o("getCredits.buyMore",{currency:h.name})}),t.jsx(C,{onClick:()=>s("/items"),children:o("getCredits.startShopping")})]})]})}),f==="pending"&&t.jsx(J,{children:t.jsxs(Ct,{role:"status","aria-live":"polite","data-testid":"credits-pending",children:[t.jsxs($t,{children:[t.jsx(jt,{src:K,alt:"",width:32,height:32}),t.jsx(St,{children:o("getCredits.pendingTitle",{currency:h.name})})]}),t.jsx(Pt,{children:o("getCredits.pendingBody")}),t.jsxs(_t,{children:[t.jsx(C,{"data-variant":"outline",onClick:()=>s("/items"),children:o("getCredits.goShopping")}),t.jsx(C,{"data-variant":"ruby",onClick:z,children:o("getCredits.gotIt")})]})]})}),f==="error"&&t.jsxs(vt,{role:"alert",children:[t.jsx(At,{"data-tone":"error",children:o("getCredits.errorTitle")}),t.jsx(Rt,{children:ce}),t.jsx(Tt,{children:t.jsx(C,{onClick:z,children:o("getCredits.tryAgain")})})]})]})}function It({packs:s,loading:n,onSelect:g}){return n?t.jsx(Y,{"aria-busy":"true","aria-label":o("getCredits.packsLoading",{currency:h.name}),children:[0,1,2,3].map(a=>t.jsxs(V,{as:"div","data-skeleton":"true","data-testid":"pack-skeleton","aria-hidden":!0,children:[t.jsxs(X,{children:[t.jsxs(Z,{children:[t.jsx(Ye,{}),t.jsx(Ve,{})]}),t.jsx(Xe,{})]}),t.jsx(Ze,{})]},a))}):t.jsx(Y,{children:s.map((a,m)=>{const b=Ae(a,s);return t.jsxs(V,{type:"button","data-testid":"pack","data-best":a.bestValue?"true":void 0,onClick:()=>g(a),"aria-label":b?o("getCredits.packAriaBonus",{amount:Q(a.credits),usd:a.usd,bonus:b.bonus,baseline:b.baseline}):o("getCredits.packAria",{amount:Q(a.credits),usd:a.usd}),children:[a.bestValue&&t.jsxs(Me,{children:[t.jsx(ye,{name:"star-rounded"}),o("getCredits.packBadge")]}),t.jsxs(X,{children:[t.jsxs(Z,{children:[t.jsxs(De,{children:[t.jsx(ie,{}),t.jsx(Ne,{children:t.jsx(ke,{credits:a.credits})})]}),t.jsx(Qe,{children:o("getCredits.packUnit",{currency:h.name})})]}),t.jsx(He,{children:t.jsx("img",{src:zt(a,m),alt:"",loading:"lazy",width:507,height:507,onError:$=>{const w=$.currentTarget;w.dataset.artFallback||(w.dataset.artFallback="done",w.src=se(a,m))}})})]}),t.jsxs(Ke,{children:["$",a.usd.toFixed(2)]})]},a.id)})})}export{Ht as GetCredits,Ht as default};
810
- //# sourceMappingURL=GetCredits-C-AFbRmX.js.map
809
+ `,v=_e()?"mock":"stripe",ee=[_,_,re,ne],Bt={pack_5:_,pack_10:_,pack_25:re,pack_50:ne};function oe(o,n){return Bt[o.id]??ee[n%ee.length]}function zt(o,n){return o.artUrl??oe(o,n)}const Ft=[{question:"faq.buyers.whatAreQ",answer:"faq.buyers.whatAreA"},{question:"faq.buyers.whatCanIBuyQ",answer:"faq.buyers.whatCanIBuyA"},{question:"faq.buyers.whereBuyQ",answer:"faq.buyers.whereBuyA"},{question:"faq.buyers.whereUseQ",answer:"faq.buyers.whereUseA"},{question:"faq.buyers.expireQ",answer:"faq.buyers.expireA"},{question:"faq.buyers.transferQ",answer:"faq.buyers.transferA"}];function te(o){const n=o;if((n==null?void 0:n.name)==="AbortError")return s("getCredits.errorCanceled");const g=((n==null?void 0:n.message)??"").toLowerCase();return g.includes("sign in")?s("getCredits.errorSignIn",{currency:h.name}):g.includes("timed out")?s("getCredits.errorTimeout",{currency:h.name}):s("getCredits.errorGeneric")}function Ht(){var L;ge({title:s("nav.getCredits",{currency:h.name}),noindex:!0});const o=ue(),{session:n,signIn:g,restored:a}=fe(),m=me(),[b,$]=xe(),{packs:w,isLoading:ae}=$e(),[f,p]=l.useState("select"),[d,I]=l.useState(null),[j,q]=l.useState(null),de=(j!=null?(L=w.find(r=>r.credits===j))==null?void 0:L.artUrl:void 0)??Te,[ce,y]=l.useState(null),[le,S]=l.useState(!1),T=l.useRef(null);l.useEffect(()=>()=>{var r;return(r=T.current)==null?void 0:r.abort()},[]);const E=l.useCallback(()=>{$(r=>{const c=new URLSearchParams(r);return c.delete("order"),c.delete("canceled"),c},{replace:!0})},[$]),R=l.useCallback(async r=>{p("processing");const c=new AbortController;T.current=c;try{const u=await je(r,{signal:c.signal,address:n==null?void 0:n.address,identity:n==null?void 0:n.identity});if(u.status==="credited"){const k=u.creditsGranted??(d==null?void 0:d.credits)??0;q(k>0?k:null),p("success"),x("Shop Completed Buy Credits",{order_id:r,pack_usd:(d==null?void 0:d.usd)??null,credits:k>0?k:null,provider:v}),m.invalidateQueries({queryKey:["usd-balance"]});try{if(sessionStorage.getItem(Se)){const P={resumeCheckout:!0,...k>0?{creditsAdded:k}:{}};o("/cart",{state:P});return}}catch{}try{const P=sessionStorage.getItem(H);if(P){sessionStorage.removeItem(H);const U=JSON.parse(P),G=be(U);if(G){o(G,{state:{item:U,resumeBuy:!0}});return}}}catch{}}else u.status==="abandoned"||u.status==="initiated"?(x("Shop Buy Credits Cancelled",{order_id:r,provider:v,step:"grant"}),m.invalidateQueries({queryKey:["usd-balance"]}),S(!0),p("select")):u.status==="failed"?(x("Shop Buy Credits Failed",{step:"grant",error_code:"grant_failed",pack_usd:(d==null?void 0:d.usd)??null}),y(u.error??s("getCredits.errorGrant",{currency:h.name})),p("error")):(x("Shop Buy Credits Pending",{step:"grant",pack_usd:(d==null?void 0:d.usd)??null}),m.invalidateQueries({queryKey:["usd-balance"]}),p("pending"))}catch(u){M(u,{flow:"get_credits",step:"grant",order_id:r}),x("Shop Buy Credits Failed",{step:"grant",error_code:D(u),pack_usd:(d==null?void 0:d.usd)??null}),y(te(u)),p("error")}},[d,n,m,o]),pe=l.useCallback(async r=>{if(!n){g();return}y(null),S(!1),I(r),p(v==="mock"?"processing":"redirecting"),x("Shop Started Buy Credits",{pack_usd:r.usd,credits:r.credits,provider:v});try{const c=await Pe(r.id,{address:n.address,identity:n.identity});if(c.mock)R(c.orderId);else if(c.url)x("Shop Redirected To Stripe",{order_id:c.orderId,pack_usd:r.usd,credits:r.credits}),window.location.href=c.url;else throw new Error("Checkout did not return a redirect url")}catch(c){M(c,{flow:"get_credits",step:"checkout",provider:v}),x("Shop Buy Credits Failed",{step:"checkout",error_code:D(c),pack_usd:r.usd}),y(te(c)),p("error")}},[n,g,R]),B=l.useRef(!1),W=l.useRef(null);l.useEffect(()=>{if(B.current)return;const r=b.get("order");if(b.get("canceled")!=null){if(r&&!a)return;B.current=!0,x("Shop Buy Credits Cancelled",{order_id:r,provider:v}),r&&n&&we(r,n.identity),E(),S(!0),p("select");return}if(r){if(p("processing"),!n){a&&(x("Shop Buy Credits Failed",{step:"grant",error_code:"no_identity",pack_usd:(d==null?void 0:d.usd)??null}),y(s("getCredits.errorSignInAfterPay",{currency:h.name})),p("error"));return}B.current=!0,E(),R(r)}},[b,n,a]);function z(){var r;(r=T.current)==null||r.abort(),p("select"),I(null),q(null),y(null),S(!1)}function he(){const r=W.current;if(!r)return;const c=window.matchMedia("(prefers-reduced-motion: reduce)").matches;r.scrollIntoView({behavior:c?"auto":"smooth",block:"center"}),r.focus({preventScroll:!0})}return t.jsxs(Re,{children:[(f==="select"||f==="redirecting")&&t.jsxs(t.Fragment,{children:[t.jsx(Be,{"data-testid":"credits-hero",children:t.jsxs(ze,{children:[t.jsxs(Ie,{$hidden:f==="redirecting",children:[t.jsxs(qe,{children:[t.jsx(Ee,{children:s("getCredits.title")}),t.jsxs(We,{children:[t.jsx(Le,{children:s("getCredits.subtitle")}),t.jsx(Ue,{type:"button",onClick:he,"data-testid":"credits-learn-more",children:s("getCredits.learnMore")})]})]}),le&&t.jsx(Ge,{role:"status",children:s("getCredits.canceledNote")}),t.jsx(It,{packs:w,loading:ae,onSelect:r=>void pe(r)})]}),f==="redirecting"&&t.jsxs(Je,{role:"status","aria-live":"polite",children:[t.jsx(rt,{src:N,alt:"",width:72,height:72}),t.jsx(et,{children:s("getCredits.redirecting")})]})]})}),t.jsx(Fe,{ref:W,tabIndex:-1,"data-testid":"credits-faq",children:t.jsx(Ce,{title:"faq.title",entries:Ft,tone:"on-dark"})})]}),f==="processing"&&t.jsxs(it,{role:"status","aria-live":"polite",children:[t.jsx(se,{src:N,alt:"",width:61,height:61}),t.jsxs(nt,{children:[t.jsxs(st,{children:[t.jsx("strong",{children:s("getCredits.processing")}),"…"]}),t.jsxs(ot,{"aria-hidden":!0,children:[t.jsx(dt,{children:t.jsx(ct,{})}),t.jsx(lt,{children:"1/1"})]})]})]}),f==="success"&&t.jsx(J,{children:t.jsxs(pt,{role:"status","aria-live":"polite",children:[t.jsx(ve,{}),t.jsxs(ht,{children:[t.jsx(ut,{src:K,alt:"",width:60,height:60}),t.jsxs(xt,{children:[t.jsx("strong",{children:s("getCredits.successTitle")})," ",s("getCredits.successBody",{currency:h.name})]})]}),j!=null&&t.jsx(gt,{children:t.jsxs(ft,{children:[t.jsx(mt,{src:de,alt:"",width:93,height:93}),t.jsxs(bt,{children:[t.jsx(ie,{}),t.jsxs("span",{children:[t.jsx(wt,{children:s("getCredits.creditsAmount",{credits:j,currency:h.name})})," ",t.jsx(yt,{children:s("getCredits.creditsAdded")})]})]})]})}),t.jsxs(kt,{children:[t.jsx(C,{"data-variant":"outline",onClick:z,children:s("getCredits.buyMore",{currency:h.name})}),t.jsx(C,{onClick:()=>o("/items"),children:s("getCredits.startShopping")})]})]})}),f==="pending"&&t.jsx(J,{children:t.jsxs(Ct,{role:"status","aria-live":"polite","data-testid":"credits-pending",children:[t.jsxs($t,{children:[t.jsx(jt,{src:K,alt:"",width:32,height:32}),t.jsx(St,{children:s("getCredits.pendingTitle",{currency:h.name})})]}),t.jsx(Pt,{children:s("getCredits.pendingBody")}),t.jsxs(_t,{children:[t.jsx(C,{"data-variant":"outline",onClick:()=>o("/items"),children:s("getCredits.goShopping")}),t.jsx(C,{"data-variant":"ruby",onClick:z,children:s("getCredits.gotIt")})]})]})}),f==="error"&&t.jsxs(vt,{role:"alert",children:[t.jsx(At,{"data-tone":"error",children:s("getCredits.errorTitle")}),t.jsx(Rt,{children:ce}),t.jsx(Tt,{children:t.jsx(C,{onClick:z,children:s("getCredits.tryAgain")})})]})]})}function It({packs:o,loading:n,onSelect:g}){return n?t.jsx(Y,{"aria-busy":"true","aria-label":s("getCredits.packsLoading",{currency:h.name}),children:[0,1,2,3].map(a=>t.jsxs(V,{as:"div","data-skeleton":"true","data-testid":"pack-skeleton","aria-hidden":!0,children:[t.jsxs(X,{children:[t.jsxs(Z,{children:[t.jsx(Ye,{}),t.jsx(Ve,{})]}),t.jsx(Xe,{})]}),t.jsx(Ze,{})]},a))}):t.jsx(Y,{children:o.map((a,m)=>{const b=Ae(a,o);return t.jsxs(V,{type:"button","data-testid":"pack","data-best":a.bestValue?"true":void 0,onClick:()=>g(a),"aria-label":b?s("getCredits.packAriaBonus",{amount:Q(a.credits),usd:a.usd,bonus:b.bonus,baseline:b.baseline}):s("getCredits.packAria",{amount:Q(a.credits),usd:a.usd}),children:[a.bestValue&&t.jsxs(Me,{children:[t.jsx(ye,{name:"star-rounded"}),s("getCredits.packBadge")]}),t.jsxs(X,{children:[t.jsxs(Z,{children:[t.jsxs(De,{children:[t.jsx(ie,{}),t.jsx(Ne,{children:t.jsx(ke,{credits:a.credits})})]}),t.jsx(Qe,{children:s("getCredits.packUnit",{currency:h.name})})]}),t.jsx(He,{children:t.jsx("img",{src:zt(a,m),alt:"",loading:"lazy",width:507,height:507,onError:$=>{const w=$.currentTarget;w.dataset.artFallback||(w.dataset.artFallback="done",w.src=oe(a,m))}})})]}),t.jsxs(Ke,{children:["$",a.usd.toFixed(2)]})]},a.id)})})}export{Ht as GetCredits,Ht as default};
810
+ //# sourceMappingURL=GetCredits-DrG2HYOY.js.map