@dcl/shop 0.1.0-30279564518.commit-0ea36ab → 0.1.0-30341633105.commit-bfa7613

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 (233) hide show
  1. package/assets/{Activity-CjKP24SM.js → Activity-DUQW_Z22.js} +4 -4
  2. package/assets/{AnimatedBackground-D2jsXv_Q.js → AnimatedBackground-D5TaGH4y.js} +1 -1
  3. package/assets/{Assets-DjrlGGuo.js → Assets-B4NCA-FL.js} +54 -54
  4. package/assets/{Assets.styles-DKu0M-fo.js → Assets.styles-CE4c2s9w.js} +1 -1
  5. package/assets/{Authorizations-DfNkZpjD.js → Authorizations-FSevrZuz.js} +1 -1
  6. package/assets/{Button-DUuwMw2g.js → Button-CVXKA5VS.js} +2 -2
  7. package/assets/Cart-Bwa3a9Hp.js +1 -0
  8. package/assets/{CircularProgress-BOITSQXA.js → CircularProgress-B7WalF_4.js} +1 -1
  9. package/assets/{Collection-0X39SWqr.js → Collection-DdHzXaav.js} +1 -1
  10. package/assets/CollectionCarousel-BLfBmiC7.js +292 -0
  11. package/assets/{ConstantsUtil-DTrOBzCe.js → ConstantsUtil-CqaPdSAF.js} +1 -1
  12. package/assets/{ContentClient-jyMKirlf.js → ContentClient-0BEnf6CP.js} +1 -1
  13. package/assets/{Creator-BjoPunwO.js → Creator-B9a3v2rB.js} +1 -1
  14. package/assets/{DeploymentBuilder-j08uBP-r.js → DeploymentBuilder-Df9ZJakk.js} +1 -1
  15. package/assets/{ErrorNotice-BG40E5Ff.js → ErrorNotice-D_Z5OVFI.js} +1 -1
  16. package/assets/{ExchangeController--3J53YgS.js → ExchangeController-DTUPu5lZ.js} +1 -1
  17. package/assets/{GetCredits-BcZpGmti.js → GetCredits-CEruTT5O.js} +6 -6
  18. package/assets/{HelpersUtil-DWI18gI9.js → HelpersUtil-DY1hA3MT.js} +1 -1
  19. package/assets/{ImportListings-DNcnjuRU.js → ImportListings-CUNQkt5i.js} +2 -2
  20. package/assets/ItemDetail-gPIjOR_D.js +2406 -0
  21. package/assets/{LoadMore-Cv8ieNqf.js → LoadMore-K8EfO7If.js} +1 -1
  22. package/assets/MarketCheckout-BlfeUpjX.js +3 -0
  23. package/assets/{MenuList-Dpn2ZgKk.js → MenuList-DPrUOTQw.js} +1 -1
  24. package/assets/{MyAssets-yXg0a1Zj.js → MyAssets-qLOA_5tD.js} +1 -1
  25. package/assets/{MyFavorites-C6oOSvkj.js → MyFavorites-C1SUs-Jy.js} +1 -1
  26. package/assets/{NetworkUtil-C1aEwuOK.js → NetworkUtil-DQZGJzap.js} +1 -1
  27. package/assets/{NotFound-BMCYiONc.js → NotFound-hEgIvZDQ.js} +1 -1
  28. package/assets/{NotificationsBell-5E6mEGEn.js → NotificationsBell-BPdngTao.js} +1 -1
  29. package/assets/{StoreSettings-DbdH6mzE.js → StoreSettings-BvrwDCuq.js} +5 -5
  30. package/assets/{Success-D7KdjdBY.js → Success-DfPUnbUp.js} +2 -2
  31. package/assets/{SwapController-C0FvCHWq.js → SwapController-Cvanu67b.js} +1 -1
  32. package/assets/{Tooltip-DSEH6tal.js → Tooltip-8SR8hseo.js} +5 -5
  33. package/assets/{TradeService-CbFSATer.js → TradeService-DH4vjiAB.js} +1 -1
  34. package/assets/{W3MFrameProviderSingleton-CCVyEXOJ.js → W3MFrameProviderSingleton-DtrTVFth.js} +3 -3
  35. package/assets/{WebCryptoP256-CxdV7gm_.js → WebCryptoP256-B_JP0jDJ.js} +1 -1
  36. package/assets/{authorizations-Bt-yiKpU.js → authorizations-Dtu8Ye0y.js} +1 -1
  37. package/assets/{basic-1GkOUAUg.js → basic-DljOvbvB.js} +1 -1
  38. package/assets/{biconomy-CEgRNCV3.js → biconomy-ik7MjMyj.js} +1 -1
  39. package/assets/{browser-CTzRZpIE.js → browser-BgOlLsTO.js} +1 -1
  40. package/assets/{browser-ponyfill-CI1-rMvf.js → browser-ponyfill-CMZ3i8tY.js} +1 -1
  41. package/assets/browser-ponyfill-lfpnveOA.js +1 -0
  42. package/assets/{builder-ChMzGlEf.js → builder-BsAwBvGZ.js} +1 -1
  43. package/assets/{buy-C8thJCOQ.js → buy-CyhVI8ih.js} +1 -1
  44. package/assets/buy-gasless-D6tjB5nW.js +1 -0
  45. package/assets/{cart-checkout-DtChJ5jV.js → cart-checkout-Bp3fmOrE.js} +1 -1
  46. package/assets/{categories-CQDU6eKt.js → categories-Jh3tfbEa.js} +1 -1
  47. package/assets/{ccip-DHMKr_5U.js → ccip-Dn5CKGMr.js} +1 -1
  48. package/assets/{ccip-D0x94rIy.js → ccip-fs__7FtW.js} +1 -1
  49. package/assets/{chains-Znt1BTfw.js → chains-Bk8fyLPj.js} +1 -1
  50. package/assets/collection-Cbl5FMco.js +1 -0
  51. package/assets/{common-D9tSChDa.js → common-CI-kmbOq.js} +1 -1
  52. package/assets/{controller-BkyUM4Zl.js → controller-CFA_t_aX.js} +2 -2
  53. package/assets/{core-xNSXcK8v.js → core-bscEUkDr.js} +4 -4
  54. package/assets/{custom-DbKBJS0m.js → custom-CBNtVqpj.js} +1 -1
  55. package/assets/{data-capture-DDPGGwVG.js → data-capture-OumUBjqI.js} +1 -1
  56. package/assets/{decimals-C4nLn1ac.js → decimals-CIbX1tiW.js} +1 -1
  57. package/assets/decimals-CS6j__sw.js +1 -0
  58. package/assets/{detectExtension-BgMIFAUw.js → detectExtension-DObVoAzH.js} +1 -1
  59. package/assets/{email-Bdh6R3aN.js → email-Psj4ILkk.js} +1 -1
  60. package/assets/{embedded-wallet-D6Oykct7.js → embedded-wallet-8Rn02F-5.js} +1 -1
  61. package/assets/{emotion-styled.browser.esm-D7LnnFGM.js → emotion-styled.browser.esm-D1IYcc-A.js} +1 -1
  62. package/assets/{engine-DKBZ9rvO.js → engine-FKONhXUm.js} +1 -1
  63. package/assets/{errors-CGr_h4qk.js → errors-C_tFJwwX.js} +1 -1
  64. package/assets/estimate-l1-fee-CQQK05Yj.js +1 -0
  65. package/assets/eth_estimateGas-D2jEM0E-.js +1 -0
  66. package/assets/{eth_getStorageAt--oQrWy0Q.js → eth_getStorageAt-y8U-lfEv.js} +1 -1
  67. package/assets/eth_getTransactionCount-CME439qZ.js +1 -0
  68. package/assets/{ethereum-3zUUm4Pr.js → ethereum-D72JFjbG.js} +1 -1
  69. package/assets/{ethers-CtVvB8eG.js → ethers-BteKixT0.js} +1 -1
  70. package/assets/{execute-BNAgRbv2.js → execute-DvgHhaNY.js} +2 -2
  71. package/assets/{extractIPFS-BmriCqG8.js → extractIPFS-BVwwoxM1.js} +1 -1
  72. package/assets/{features-yBnE0kv6.js → features-C_I0ed0g.js} +1 -1
  73. package/assets/{fetchTokenMetadata-BgTzU1uv.js → fetchTokenMetadata-DXP5pKit.js} +2 -2
  74. package/assets/{fortmatic-DM_o40Lo.js → fortmatic-uodRBNqF.js} +1 -1
  75. package/assets/{get-bytecode-C6TlbHJu.js → get-bytecode-PhqNpgKV.js} +1 -1
  76. package/assets/get-ecosystem-wallet-info-CojUzYKW.js +1 -0
  77. package/assets/{getBalance-Ck3AgdKh.js → getBalance-Bi0yMf6a.js} +2 -2
  78. package/assets/{getInstalledModules-BLQxYEXn.js → getInstalledModules-DS4FSkHX.js} +1 -1
  79. package/assets/{getNFT-Ticzp8Hs.js → getNFT-CebGWsfS.js} +2 -2
  80. package/assets/getNFT-uBr4IPr-.js +1 -0
  81. package/assets/getThemeProps-D9znDKcF.js +1 -0
  82. package/assets/{hashTypedData-vyJGLMpP.js → hashTypedData-CmwGgOTV.js} +1 -1
  83. package/assets/{hashTypedData-D-QtOqRa.js → hashTypedData-CvnET0ek.js} +1 -1
  84. package/assets/{import-DaK3l2L4.js → import-5htnR-24.js} +1 -1
  85. package/assets/{in-app-VsfJDWao.js → in-app-CXNVMtY6.js} +1 -1
  86. package/assets/{in-app-wallet-calls-Cc6TEySq.js → in-app-wallet-calls-CL_h73Vx.js} +1 -1
  87. package/assets/{index-BvrGtJes.js → index-5PxxT_Hi.js} +1 -1
  88. package/assets/{index-m5R1RgvV.js → index-9s4_sQX7.js} +1 -1
  89. package/assets/{index-Bek4_t_L.js → index-B8HPZU8G.js} +1 -1
  90. package/assets/{index-DNoUzleZ.js → index-BBFf3j9R.js} +1 -1
  91. package/assets/{index-DEKVNi4L.js → index-BEwgqhCL.js} +1 -1
  92. package/assets/{index-CJxmpG1K.js → index-BF0jg5eX.js} +1 -1
  93. package/assets/{index-D_DMIRz9.js → index-BUuFv1bp.js} +1 -1
  94. package/assets/{index-Cpv_qKx8.js → index-BZVhR8G8.js} +1 -1
  95. package/assets/{index--P2VwVy3.js → index-BaeTuT24.js} +1 -1
  96. package/assets/{index-BYz2fOpG.js → index-BjJBV4qL.js} +1 -1
  97. package/assets/{index-BCx0SxC7.js → index-BksD36hR.js} +1 -1
  98. package/assets/{index-DGwlKYP1.js → index-BofIoUki.js} +1 -1
  99. package/assets/{index-CKwiZFh4.js → index-BqdSTJ_h.js} +1 -1
  100. package/assets/{index-Bx2U1tYr.js → index-BwVcZ3vw.js} +1 -1
  101. package/assets/{index-L08mwnOc.js → index-C-3NWHgA.js} +1 -1
  102. package/assets/{index-CWzvA55Z.js → index-C-dFvnUH.js} +1 -1
  103. package/assets/{index-Bxhq99ht.js → index-C1Tsxo3r.js} +1 -1
  104. package/assets/{index-C8RikeW4.js → index-C1UJcewJ.js} +1 -1
  105. package/assets/{index-BG7lZdfP.js → index-C3SS5bz4.js} +1 -1
  106. package/assets/{index-BVMw5QjZ.js → index-C4GKDkj4.js} +1 -1
  107. package/assets/{index-B56Mz2YS.js → index-C5V5wALq.js} +1 -1
  108. package/assets/{index-jsB1K3Ty.js → index-CAPIrEyl.js} +1 -1
  109. package/assets/{index-C9AUsopd.js → index-CBgD93CB.js} +1 -1
  110. package/assets/{index-BzD7Ebgn.js → index-CFnxUGBP.js} +1 -1
  111. package/assets/{index-z80r03Cx.js → index-CIRaZxV0.js} +1 -1
  112. package/assets/{index-BDwWglvl.js → index-CJIwpbLW.js} +1 -1
  113. package/assets/{index-7KtzBMW3.js → index-CLiiVHBN.js} +1 -1
  114. package/assets/{index-BZ6S4-Qy.js → index-CMYPEZgT.js} +1 -1
  115. package/assets/{index-SvOsIc3H.js → index-CSdulB00.js} +3 -3
  116. package/assets/{index-tFmbSlHL.js → index-CVi7PdPM.js} +1 -1
  117. package/assets/{index-B2DUxMjO.js → index-CdccZQ_A.js} +1 -1
  118. package/assets/{index-DiGXPxzb.js → index-CjxT1gx4.js} +1 -1
  119. package/assets/{index-B13clZOY.js → index-CkYGCiA-.js} +1 -1
  120. package/assets/{index-Cmu7kehM.js → index-Cp-efrxt.js} +2 -2
  121. package/assets/{index-DdJ_OK_4.js → index-Cq9m0rf1.js} +1 -1
  122. package/assets/{index-ColsJYiD.js → index-CvxSD2TZ.js} +1 -1
  123. package/assets/{index-DbSgqncZ.js → index-D-BpvO4i.js} +1 -1
  124. package/assets/{index-DUxDUxur.js → index-D3MkM_Ow.js} +2 -2
  125. package/assets/{index-CSZuXP_O.js → index-D7uajZIF.js} +1 -1
  126. package/assets/{index-Bf27DWaL.js → index-D9zmC2OF.js} +1 -1
  127. package/assets/{index-DHxeKfAR.js → index-DTjLQDJj.js} +3 -3
  128. package/assets/{index-Ceh4tqVd.js → index-DVCrh7RP.js} +1 -1
  129. package/assets/{index-Cf5UQJ_k.js → index-DXqFhRIG.js} +2 -2
  130. package/assets/{index-ehEPbUUu.js → index-D_GOecnW.js} +1 -1
  131. package/assets/{index-32dihjZM.js → index-Dcx57z9h.js} +1 -1
  132. package/assets/{index-n-ml-ClE.js → index-De5m0zpT.js} +1 -1
  133. package/assets/{index-BTV13rXH.js → index-Ded3SJr4.js} +1 -1
  134. package/assets/{index-8eIQG8Kl.js → index-DhbTDQu0.js} +1 -1
  135. package/assets/{index-BIgVkoHN.js → index-DiarXSIn.js} +1 -1
  136. package/assets/{index-DB0uJXc-.js → index-Dlw2S5cF.js} +3 -3
  137. package/assets/index-DpPUc0sl.js +1 -0
  138. package/assets/{index-DGZZiECR.js → index-Ds0rGqyb.js} +1 -1
  139. package/assets/{index-unwNWDy6.js → index-Ds6dHrLZ.js} +1 -1
  140. package/assets/{index-Dcg9IkwS.js → index-DsV59IEv.js} +1 -1
  141. package/assets/{index-CEUqEDHj.js → index-VchcND_n.js} +11 -11
  142. package/assets/{index-DsgKSUtS.js → index-VdY2qv1p.js} +1 -1
  143. package/assets/{index-Bd6gPKw4.js → index-aP6PSm0J.js} +1 -1
  144. package/assets/{index-CZQ2_otu.js → index-lJWah8De.js} +1 -1
  145. package/assets/{index-CkWJ4sTo.js → index-nJZkl4yb.js} +1 -1
  146. package/assets/{index-6uEdFIR0.js → index-sW-sKm0x.js} +2 -2
  147. package/assets/{index-COEkUMH9.js → index-scsn5pcE.js} +1 -1
  148. package/assets/{index-C6PL2Fdt.js → index-tf9y--bx.js} +1 -1
  149. package/assets/{index-jX2jQJPr.js → index-zLpiSX4V.js} +2 -2
  150. package/assets/{index.es-DI7x2TJx.js → index.es-9B4hUsAR.js} +1 -1
  151. package/assets/{index.es-BZebHuYA.js → index.es-9Zrxu-nr.js} +4 -4
  152. package/assets/{index.es-DpokeYPv.js → index.es-BwS14sFg.js} +1 -1
  153. package/assets/{linkAccount-BR5_llhd.js → linkAccount-6BFCh5cx.js} +1 -1
  154. package/assets/{localBatchGatewayRequest-B9Ybd7dg.js → localBatchGatewayRequest-BHik-cdx.js} +1 -1
  155. package/assets/{mana-rate-D7GRB_Ot.js → mana-rate-CY9tOCr1.js} +1 -1
  156. package/assets/{native-BSpg_u0K.js → native-15jVjX8Y.js} +1 -1
  157. package/assets/{networks-fMdVA1sr.js → networks-Ddkp84aU.js} +1 -1
  158. package/assets/{onramp-B2Q3gTV8.js → onramp-CeSaj6Aa.js} +1 -1
  159. package/assets/{openzeppelin-Dfbjq166.js → openzeppelin-CDpkjcS1.js} +1 -1
  160. package/assets/{ownerOf-D9UDfElT.js → ownerOf-CFrKicrH.js} +1 -1
  161. package/assets/{parseNft-D4L1MnwK.js → parseNft-ChsA4Coa.js} +2 -2
  162. package/assets/{parseSignature-B2YsV13I.js → parseSignature--QSaxzyZ.js} +3 -3
  163. package/assets/{parseSignature-Ch8Ikh9R.js → parseSignature-DFSq1jun.js} +1 -1
  164. package/assets/{passkeys-CRQs5lh-.js → passkeys-CUsQnAGE.js} +1 -1
  165. package/assets/{pay-with-exchange-DwcPixRd.js → pay-with-exchange-DD3fWFhp.js} +1 -1
  166. package/assets/{prepare-contract-call-CHrp3EL4.js → prepare-contract-call-DUVOtgM0.js} +1 -1
  167. package/assets/{qr-overlay-WecOYNdc.js → qr-overlay-FXDRFg86.js} +3 -3
  168. package/assets/{react-BW1xvPTF.js → react-B36MyIP_.js} +1 -1
  169. package/assets/{receive-r6itEu_X.js → receive-YGf7MQMM.js} +1 -1
  170. package/assets/{resolveImplementation-DuORFImi.js → resolveImplementation-ChZxSPSt.js} +1 -1
  171. package/assets/{rpc--KkC2qWz.js → rpc-DcocuHbv.js} +1 -1
  172. package/assets/{secp256k1-7vUkF5ib.js → secp256k1-2n6IN3fh.js} +1 -1
  173. package/assets/{secp256k1-CSfTjZp_.js → secp256k1-B6R4GN3D.js} +1 -1
  174. package/assets/{secp256k1-DRVSRXu6.js → secp256k1-Da2UK_yU.js} +1 -1
  175. package/assets/{send-BRRQlzci.js → send-DM7q2CKX.js} +1 -1
  176. package/assets/{send-batch-transaction-BASQMYYn.js → send-batch-transaction-BQiw5Eds.js} +1 -1
  177. package/assets/{send-eip712-transaction-Cb0e5jgJ.js → send-eip712-transaction-D9_VwAnb.js} +2 -2
  178. package/assets/send-gasless-transaction-fl9Lqf73.js +2 -0
  179. package/assets/{send-transaction-URhXksgR.js → send-transaction-lapcUIfe.js} +2 -2
  180. package/assets/{sendMetaTransaction-DnNlMy1f.js → sendMetaTransaction-CydgYVdt.js} +1 -1
  181. package/assets/{sendRawTransaction-Cp9PwWbz.js → sendRawTransaction-CkQeCcPa.js} +3 -3
  182. package/assets/{sentry-BV_ZSgtd.js → sentry-gZJVwIqQ.js} +1 -1
  183. package/assets/{serializeTransaction-D6bPY-5e.js → serializeTransaction-CiKWV5oi.js} +1 -1
  184. package/assets/{session-proposal-CO8C9FgE.js → session-proposal-C1hZCkvv.js} +1 -1
  185. package/assets/{session-request-CU3My76o.js → session-request-BTvx34S0.js} +2 -2
  186. package/assets/{sha256-BImz_UXn.js → sha256-DDEIajFz.js} +1 -1
  187. package/assets/{signing-C1foQi87.js → signing-clXGZp7N.js} +3 -3
  188. package/assets/{socials-Bsjh-kcj.js → socials-Djo-_tRh.js} +1 -1
  189. package/assets/{swaps-D4LpMI-N.js → swaps-BwoxWJmp.js} +1 -1
  190. package/assets/{thirdweb-D1z-XTZ-.js → thirdweb-DIYiKqri.js} +3 -3
  191. package/assets/{to-serializable-transaction-B7zKZp3o.js → to-serializable-transaction-_IYF-b5r.js} +2 -2
  192. package/assets/{totalSupply-D4j1WOYW.js → totalSupply-CGOKYv2C.js} +1 -1
  193. package/assets/trade-encoding-DbssSNOL.js +1 -0
  194. package/assets/{transaction-BOS1fhp8.js → transaction-C_LVUDbA.js} +1 -1
  195. package/assets/{transactionReceipt-TiskXrB6.js → transactionReceipt-dAN1T4b9.js} +1 -1
  196. package/assets/{transactions-B5kAYK1L.js → transactions-V175lLd8.js} +1 -1
  197. package/assets/useCreditPacks-B8su_g3G.js +1 -0
  198. package/assets/{useInfiniteGrid-CiDuQRnP.js → useInfiniteGrid-S2Upf1Ae.js} +1 -1
  199. package/assets/useManaRate-CCWK1pxl.js +1 -0
  200. package/assets/{useStore-BF0NEfcO.js → useStore-BEtv4alq.js} +2 -2
  201. package/assets/useTheme-BoNUL1hb.js +1 -0
  202. package/assets/{utils-B7rjkjB1.js → utils-swuB5ZX6.js} +1 -1
  203. package/assets/{verifyHash-BLnnKj_-.js → verifyHash-CSBAlIiR.js} +1 -1
  204. package/assets/{w3m-modal-D2jSpmw2.js → w3m-modal-CXjKWsrV.js} +1 -1
  205. package/assets/{w3m-modal-CRKh97nT.js → w3m-modal-DVav-Ijf.js} +1 -1
  206. package/assets/{wait-for-tx-receipt-CUP8flYl.js → wait-for-tx-receipt-CRuc-ylw.js} +1 -1
  207. package/assets/{wallets-CBncd5Al.js → wallets-C2Qy7KSV.js} +5 -5
  208. package/assets/{web-connector-BbbFAPbG.js → web-connector-D4itPEVN.js} +3 -3
  209. package/assets/{writeContract-DeZcPQuU.js → writeContract-BR9KO0Ok.js} +1 -1
  210. package/assets/{zora-sepolia-CVS3owSi.js → zora-sepolia-BltAzWAs.js} +1 -1
  211. package/assets/{zoraTestnet-Dea0RHqm.js → zoraTestnet-VaouiZC2.js} +1 -1
  212. package/index.html +11 -11
  213. package/package.json +2 -2
  214. package/assets/Cart-DYkqiuyJ.js +0 -1
  215. package/assets/CollectionCarousel-B0A1YOX-.js +0 -292
  216. package/assets/ItemDetail-By9hJU7O.js +0 -2406
  217. package/assets/MarketCheckout-B7kj-ofT.js +0 -3
  218. package/assets/browser-ponyfill-6L1OGOLN.js +0 -1
  219. package/assets/buy-gasless-kzWGfidX.js +0 -1
  220. package/assets/collection-4qJRowPN.js +0 -1
  221. package/assets/decimals-Bmvg-V50.js +0 -1
  222. package/assets/estimate-l1-fee-CoGVlirt.js +0 -1
  223. package/assets/eth_estimateGas-JYqF9U1i.js +0 -1
  224. package/assets/eth_getTransactionCount-BEhAgz2O.js +0 -1
  225. package/assets/get-ecosystem-wallet-info-DCVnaTdL.js +0 -1
  226. package/assets/getNFT-v9ULC-Df.js +0 -1
  227. package/assets/getThemeProps-BcAfOiiP.js +0 -1
  228. package/assets/index-B6MKNzS8.js +0 -1
  229. package/assets/send-gasless-transaction-TLFFm8L4.js +0 -2
  230. package/assets/trade-encoding-rbwEO5I2.js +0 -1
  231. package/assets/useCreditPacks-DPTBuCyg.js +0 -1
  232. package/assets/useManaRate-WxBKKUcB.js +0 -1
  233. package/assets/useTheme-BhK6j6Fd.js +0 -1
package/index.html CHANGED
@@ -16,10 +16,10 @@
16
16
  <link rel="canonical" href="https://shop.decentraland.org/" />
17
17
 
18
18
  <!-- Favicon: the Decentraland mark (same as the marketplace). -->
19
- <link rel="icon" type="image/x-icon" href="https://cdn.decentraland.org/@dcl/shop/0.1.0-30279564518.commit-0ea36ab/favicon.ico" sizes="16x16 32x32 48x48" />
20
- <link rel="apple-touch-icon" sizes="180x180" href="https://cdn.decentraland.org/@dcl/shop/0.1.0-30279564518.commit-0ea36ab/apple-touch-icon.png" />
19
+ <link rel="icon" type="image/x-icon" href="https://cdn.decentraland.org/@dcl/shop/0.1.0-30341633105.commit-bfa7613/favicon.ico" sizes="16x16 32x32 48x48" />
20
+ <link rel="apple-touch-icon" sizes="180x180" href="https://cdn.decentraland.org/@dcl/shop/0.1.0-30341633105.commit-bfa7613/apple-touch-icon.png" />
21
21
  <meta name="apple-mobile-web-app-title" content="DCL Shop" />
22
- <link rel="manifest" href="https://cdn.decentraland.org/@dcl/shop/0.1.0-30279564518.commit-0ea36ab/site.webmanifest" />
22
+ <link rel="manifest" href="https://cdn.decentraland.org/@dcl/shop/0.1.0-30341633105.commit-bfa7613/site.webmanifest" />
23
23
 
24
24
  <!-- Open Graph -->
25
25
  <meta property="og:type" content="website" />
@@ -48,7 +48,7 @@
48
48
  <meta name="twitter:image:alt" content="Decentraland Shop — wearables and emotes for your avatar" />
49
49
 
50
50
  <!-- Sitemap -->
51
- <link rel="sitemap" type="application/xml" title="Sitemap" href="https://cdn.decentraland.org/@dcl/shop/0.1.0-30279564518.commit-0ea36ab/sitemap.xml" />
51
+ <link rel="sitemap" type="application/xml" title="Sitemap" href="https://cdn.decentraland.org/@dcl/shop/0.1.0-30341633105.commit-bfa7613/sitemap.xml" />
52
52
 
53
53
  <!-- Warm the 3D preview / fonts -->
54
54
  <link rel="preconnect" href="https://fonts.googleapis.com" />
@@ -60,13 +60,13 @@
60
60
  <link rel="preconnect" href="https://wearable-preview.decentraland.org" />
61
61
  <link rel="preconnect" href="https://peer.decentraland.zone" crossorigin />
62
62
  <link rel="preconnect" href="https://peer.decentraland.org" crossorigin />
63
- <script type="module" crossorigin src="https://cdn.decentraland.org/@dcl/shop/0.1.0-30279564518.commit-0ea36ab/assets/index-CEUqEDHj.js"></script>
64
- <link rel="modulepreload" crossorigin href="https://cdn.decentraland.org/@dcl/shop/0.1.0-30279564518.commit-0ea36ab/assets/react-BW1xvPTF.js">
65
- <link rel="modulepreload" crossorigin href="https://cdn.decentraland.org/@dcl/shop/0.1.0-30279564518.commit-0ea36ab/assets/sentry-BV_ZSgtd.js">
66
- <link rel="modulepreload" crossorigin href="https://cdn.decentraland.org/@dcl/shop/0.1.0-30279564518.commit-0ea36ab/assets/dcl-schemas-BICTSpB5.js">
67
- <link rel="modulepreload" crossorigin href="https://cdn.decentraland.org/@dcl/shop/0.1.0-30279564518.commit-0ea36ab/assets/ethers-CtVvB8eG.js">
68
- <link rel="modulepreload" crossorigin href="https://cdn.decentraland.org/@dcl/shop/0.1.0-30279564518.commit-0ea36ab/assets/intl-CBcMB1D2.js">
69
- <link rel="stylesheet" crossorigin href="https://cdn.decentraland.org/@dcl/shop/0.1.0-30279564518.commit-0ea36ab/assets/index-DwufS2l2.css">
63
+ <script type="module" crossorigin src="https://cdn.decentraland.org/@dcl/shop/0.1.0-30341633105.commit-bfa7613/assets/index-VchcND_n.js"></script>
64
+ <link rel="modulepreload" crossorigin href="https://cdn.decentraland.org/@dcl/shop/0.1.0-30341633105.commit-bfa7613/assets/react-B36MyIP_.js">
65
+ <link rel="modulepreload" crossorigin href="https://cdn.decentraland.org/@dcl/shop/0.1.0-30341633105.commit-bfa7613/assets/sentry-gZJVwIqQ.js">
66
+ <link rel="modulepreload" crossorigin href="https://cdn.decentraland.org/@dcl/shop/0.1.0-30341633105.commit-bfa7613/assets/dcl-schemas-BICTSpB5.js">
67
+ <link rel="modulepreload" crossorigin href="https://cdn.decentraland.org/@dcl/shop/0.1.0-30341633105.commit-bfa7613/assets/ethers-BteKixT0.js">
68
+ <link rel="modulepreload" crossorigin href="https://cdn.decentraland.org/@dcl/shop/0.1.0-30341633105.commit-bfa7613/assets/intl-CBcMB1D2.js">
69
+ <link rel="stylesheet" crossorigin href="https://cdn.decentraland.org/@dcl/shop/0.1.0-30341633105.commit-bfa7613/assets/index-DwufS2l2.css">
70
70
  </head>
71
71
  <body>
72
72
  <div id="root"></div>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dcl/shop",
3
- "version": "0.1.0-30279564518.commit-0ea36ab",
3
+ "version": "0.1.0-30341633105.commit-bfa7613",
4
4
  "main": "index.js",
5
5
  "author": "Decentraland",
6
6
  "license": "Apache-2.0",
@@ -8,5 +8,5 @@
8
8
  "type": "git",
9
9
  "url": "git+https://github.com/decentraland/shop.git"
10
10
  },
11
- "commit": "0ea36ab635b858862af8d4bfc2a23694610b87aa"
11
+ "commit": "bfa76132145514261c996231a2f25f900f79f925"
12
12
  }
@@ -1 +0,0 @@
1
- import{j as e,r as j,u as pa,a as _a,L as te}from"./react-BW1xvPTF.js";import{t,C as L,A as G,ak as ga,x as ba,ai as P,Q as Ue,u as va,n as fa,a as xa,b as Ca,al as ja,am as ka,I as A,an as Na,z as wa,y as Ma,ao as Oe,j as W,ap as $e,aq as Sa,J as O,e as qa,h as Ve,c as pe,ar as _e,l as se,k as De,o as ne,q as Pa,r as ge,m as Ge,as as Aa}from"./index-CEUqEDHj.js";import{P as Ye,m as Xe,W as Ia,c as be,t as Ka,C as Qa,A as Ra,a as Ta,s as He,b as Fa,d as Ea,e as Wa}from"./CollectionCarousel-B0A1YOX-.js";import{u as La}from"./useManaRate-WxBKKUcB.js";import{u as Je,r as Ba}from"./mana-rate-D7GRB_Ot.js";import{g as za,j as Ua,h as Oa,n as $a,i as Va,A as Da}from"./authorizations-Bt-yiKpU.js";import{a as ve}from"./buy-C8thJCOQ.js";import{a as Ga,w as Ha,S as Ja,G as Ya}from"./buy-gasless-kzWGfidX.js";import{R as re,r as Xa}from"./cart-checkout-DtChJ5jV.js";import{u as Za,M as et,c as at}from"./useCreditPacks-DPTBuCyg.js";import{l as tt}from"./loader-logo-BzY9EKdC.js";import{i as st,a as nt}from"./errors-CGr_h4qk.js";import{E as rt}from"./ErrorNotice-BG40E5Ff.js";import"./sentry-BV_ZSgtd.js";import"./dcl-schemas-BICTSpB5.js";import"./ethers-CtVvB8eG.js";import"./intl-CBcMB1D2.js";import"./trade-encoding-rbwEO5I2.js";import"./sendMetaTransaction-DnNlMy1f.js";const it="https://cdn.decentraland.org/@dcl/shop/0.1.0-30279564518.commit-0ea36ab/assets/buy-error-22UunaPC.png";function ct(i){const{phase:o,balanceCredits:C,onClose:N}=i,I=o==="processing",R=o==="error"?t("cartCheckout.errorTitle"):o==="nofunds"?t("cartCheckout.titleNoFunds"):o==="choose"?t("buyModal.choosePayment"):t("cartCheckout.titleBuy"),T=o==="processing";return e.jsxs("div",{className:"buy-modal",role:"dialog","aria-modal":"true","aria-label":t("cartCheckout.dialogAria"),children:[e.jsx("div",{className:"buy-modal__scrim",onClick:I?void 0:N,"aria-hidden":!0}),e.jsxs("div",{className:`buy-modal__card${T?" buy-modal__card--tall":""}`,children:[e.jsxs("div",{className:"buy-modal__head",children:[e.jsxs("div",{className:"buy-modal__head-row",children:[e.jsx("h2",{className:"buy-modal__title",children:R}),!I&&e.jsx("button",{className:"buy-modal__x",onClick:N,"aria-label":t("buyModal.close"),children:e.jsx("svg",{viewBox:"0 0 18 18",width:"18",height:"18","aria-hidden":!0,children:e.jsx("path",{d:"M4 4l10 10M14 4L4 14",stroke:"#161518",strokeWidth:"1.8",strokeLinecap:"round"})})})]}),e.jsxs("div",{className:"buy-modal__balance",children:[e.jsx("span",{className:"buy-modal__balance-label",children:o==="nofunds"?t("buyModal.dclBalance"):t("buyModal.myCreditsBalance")}),e.jsx(L,{className:"buy-modal__balance-ico"}),e.jsx("span",{className:"buy-modal__balance-value",children:G(C)})]})]}),o==="choose"&&e.jsxs("div",{className:"buy-modal__body",children:[e.jsxs("div",{className:"cart-checkout__choose-total",children:[e.jsx("span",{children:t("cart.purchaseSummary")}),e.jsxs("strong",{children:[e.jsx(L,{className:"buy-modal__balance-ico"}),G(i.totalCredits??0)]})]}),e.jsx(Ye,{options:i.options??[],totalCents:i.totalCents??0,onPay:i.onPay??(()=>{}),rateNote:(()=>{const M=Xe(i.totalCents??0,i.totalManaWei??0n);return M!=null?t("buyModal.manaRate",{mana:M.toLocaleString("en",{maximumFractionDigits:2})}):null})()})]}),o==="processing"&&e.jsx(ot,{stage:i.stage??"reserving",step:i.step??1,total:i.total??1,isSelfCustody:!!i.isSelfCustody}),o==="nofunds"&&e.jsx(lt,{lines:i.lines??[],shortfallCredits:i.shortfallCredits??0,packs:i.packs??[],selectedPack:i.selectedPack??"",onSelectPack:i.onSelectPack??(()=>{}),onBuyPacks:i.onBuyPacks??(()=>{}),onCancel:N}),o==="error"&&e.jsxs("div",{className:"buy-modal__body",children:[e.jsxs("div",{className:"buy-error",children:[e.jsx("img",{className:"buy-error__art",src:it,alt:"",width:64,height:80}),e.jsxs("p",{className:"buy-error__text",children:[e.jsx("b",{children:t("cartCheckout.errorHeadline")})," ",t("cartCheckout.errorBody")]})]}),e.jsxs("div",{className:"buy-modal__ctas",children:[e.jsx("button",{className:"buy-modal__btn buy-modal__btn--outline",onClick:N,children:t("buyModal.cancel")}),e.jsx("button",{className:"buy-modal__btn buy-modal__btn--purple",onClick:i.onRetry??N,children:t("cartCheckout.tryAgain")})]})]})]})]})}function ot({stage:i,step:o,total:C,isSelfCustody:N}){const I=i==="reserving",R=C>0?Math.min(100,Math.round(o/C*100)):0,T=i==="awaiting-signature"?N?t("buyModal.confirmToContinue"):t("buyModal.completingTransaction"):i==="settling"?t("buyModal.completingTransaction"):t("cartCheckout.preparing");return e.jsxs("div",{className:"buy-modal__body buy-modal__processing",children:[e.jsx("img",{className:"buy-modal__logo",src:tt,alt:"",width:61,height:61}),e.jsx("div",{className:"buy-modal__processing-text",children:T}),I?e.jsxs("div",{className:"cart-checkout__progress-row",children:[e.jsx("div",{className:"buy-modal__progress","aria-hidden":!0,children:e.jsx("span",{className:"buy-modal__progress-fill buy-modal__progress-fill--step",style:{width:`${R}%`}})}),C>1?e.jsxs("span",{className:"cart-checkout__step",children:[o,"/",C]}):null]}):e.jsx("div",{className:"buy-modal__progress","aria-hidden":!0,children:e.jsx("span",{className:"buy-modal__progress-fill"})})]})}function lt({lines:i,shortfallCredits:o,packs:C,selectedPack:N,onSelectPack:I,onBuyPacks:R,onCancel:T}){const M=C.find(n=>n.id===N),ce=i.reduce((n,q)=>n+(q.quantity??1),0);return e.jsxs("div",{className:"buy-modal__body",children:[e.jsxs("div",{className:"buy-modal__warning",children:[e.jsx(Ia,{className:"buy-modal__warning-ico"}),e.jsxs("p",{className:"buy-modal__warning-text",children:[e.jsx("b",{children:t("buyModal.insufficientFunds")})," ",t("buyModal.warningNeedToBuy")," ",e.jsx("b",{children:t("buyModal.warningCreditsAmount",{count:Math.max(0,o)})})," ",t("buyModal.warningToPurchase",{count:ce})]})]}),e.jsx("div",{className:"cart-checkout__scroll",children:i.map(n=>{const q=n.quantity??1;return e.jsxs("div",{className:"buy-modal__asset",children:[e.jsx("div",{className:"buy-modal__asset-thumb",children:n.item.thumbnail?e.jsx("img",{src:n.item.thumbnail,alt:""}):null}),e.jsxs("div",{className:"buy-modal__asset-info",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"buy-modal__asset-name",title:n.item.name,children:[n.item.name||t("buyModal.itemFallback"),q>1?e.jsx("span",{className:"cart-checkout__qty-tag",children:t("cartCheckout.qty",{count:q})}):null]}),n.item.creator?e.jsx(ga,{address:n.item.creator,className:"buy-modal__asset-creator"}):null]}),e.jsxs("div",{className:"buy-modal__asset-price",children:[e.jsx(L,{className:"buy-modal__asset-price-ico"}),e.jsx("span",{children:G(n.priceCredits*q)})]})]})]},n.item.id)})}),e.jsx("div",{className:"buy-modal__packs",children:C.map(n=>{const q=n.id===N;return e.jsxs("button",{className:`buy-modal__pack${q?" buy-modal__pack--on":""}`,onClick:()=>I(n.id),children:[e.jsx(L,{className:"buy-modal__pack-ico"}),e.jsx("span",{className:"buy-modal__pack-amount",children:G(n.credits)}),e.jsxs("span",{className:"buy-modal__pack-usd",children:["($",n.usd.toFixed(2),")"]})]},n.id)})}),e.jsxs("div",{className:"buy-modal__total",children:[e.jsxs("div",{className:"buy-modal__total-credits",children:[e.jsx(L,{className:"buy-modal__total-ico"}),e.jsx("span",{children:G((M==null?void 0:M.credits)??0)})]}),e.jsxs("span",{className:"buy-modal__total-usd",children:["$",((M==null?void 0:M.usd)??0).toFixed(2)]})]}),e.jsxs("div",{className:"buy-modal__ctas",children:[e.jsx("button",{className:"buy-modal__btn buy-modal__btn--outline",onClick:T,children:t("buyModal.cancel")}),e.jsx("button",{className:"buy-modal__btn buy-modal__btn--gradient",onClick:R,children:t("buyModal.buy")})]})]})}function fe(i){if(st(i))return t("errors.rejected");const o=(i.message??"").toLowerCase();return o.includes("insufficient")?t("cart.error.insufficient",{currency:qa.name}):o.includes("no active listing")||o.includes("your own listing")?t("cart.error.listingChanged"):t("marketCheckout.error.generic")}const dt=12e4;function ut(i){const o=[];return i.unavailable.length&&o.push(t("cart.drop.unavailable",{count:i.unavailable.length})),i.own.length&&o.push(t("cart.drop.own",{count:i.own.length})),t("cart.drop.removed",{items:o.join(` ${t("cart.drop.and")} `)})}const xe=i=>i.reduce((o,C)=>o+C.priceCredits*C.quantity,0),ie=i=>i.flatMap(o=>Array.from({length:o.quantity},()=>({...o,quantity:1})));function At(){ba({title:t("nav.cart"),noindex:!0});const i=P(a=>a.items),o=P(a=>a.remove),C=P(a=>a.increment),N=P(a=>a.decrement),I=P(a=>a.clear),R=P(a=>a.restore),T=P(a=>a.setFittingOpen),M=Ue(a=>a.items),ce=Ue(a=>a.toggle),{session:n,signIn:q}=va(),H=Za().packs.slice(0,et);j.useEffect(()=>(document.body.classList.add("shop-cart-bg"),()=>document.body.classList.remove("shop-cart-bg")),[]);const Ze=i.some(a=>a.category!=="emote"),{data:oe}=fa({queryKey:["upsell-listings"],queryFn:()=>Aa({first:40}),staleTime:6e4}),{data:v}=xa(n),d=Ca(),B=pa(),{state:F}=_a(),[ea,$]=j.useState(null),[Ce,J]=j.useState(null),[aa,S]=j.useState(!1),[w,E]=j.useState(null),je=j.useRef(0),[h,g]=j.useState(null),{data:V}=ja(n),{data:le}=La(!0),[de,ke]=j.useState(""),D=j.useRef(null),Ne=ka(i),we=a=>Oe(Ne[a.id]),ue=i.filter(we),he=i.length>0&&ue.length===0,ta=ue.reduce((a,s)=>a+s.priceCredits*s.quantity,0),sa=i.reduce((a,s)=>a+s.quantity,0),na=ue.reduce((a,s)=>a+s.quantity,0),Me=w?w.liveTotalCredits:ta,ra=new Set(i.map(a=>a.id)),Se=((oe==null?void 0:oe.items)??[]).filter(a=>!ra.has(a.id)).slice(0,12),ia=new Map(w==null?void 0:w.buyable.map(a=>[a.item.id,a])),Y=(v==null?void 0:v.credits)??0,X=Me*10,qe=le?Je(X,le):0n,Z=be({priceCents:X,priceManaWei:qe,balanceCents:(v==null?void 0:v.balanceCents)??0,manaBalanceWei:V??0n}),Pe=Xe(X,qe),Ae=Pe!=null?t("buyModal.manaRate",{mana:Pe.toLocaleString("en",{maximumFractionDigits:2})}):null,ca=Sa;function ee(a){a(),E(null),J(null),$(null)}function oa(){g(null),S(!1)}function Ie(a){const s=xe(a),c=Math.max(0,s-Y),r=H.find(l=>l.credits>=c)??H[H.length-1];ke(r.id),W("Shop Buy Credits Prompted",{from:"cart_checkout",credits_needed:s,credits_balance:Y,shortfall:c}),g({phase:"nofunds",lines:a.map(l=>({item:l.item,priceCredits:l.priceCredits,quantity:l.quantity})),shortfall:c}),S(!1)}async function me(a){if(!n||a.length===0)return;const s=ie(a),c=s.map(y=>({...y.item,priceCredits:y.priceCredits})),r=a.map(y=>({...y.item,priceCredits:y.priceCredits,quantity:y.quantity})),l=[];let u="authorize",p=!1;g({phase:"processing",stage:"reserving",step:1,total:s.length});try{const y=[];for(let x=0;x<s.length;x++){const b=s[x];g({phase:"processing",stage:"reserving",step:x+1,total:s.length});try{const{credit:f,maxCreditedValue:U}=await Ve(n.identity,b.usdCents,b.trade.id);l.push(f.id),y.push({trade:b.trade,credits:[f],maxCreditedValue:U})}catch(f){if(nt(f)){if(l.length){try{await pe(n.identity,l)}catch(U){O(U,{flow:"cart_checkout",step:"release"})}d.invalidateQueries({queryKey:["usd-balance"]})}Ie(a);return}throw f}}u="submit";const k=()=>g({phase:"processing",stage:"settling",step:s.length,total:s.length});g({phase:"processing",stage:"awaiting-signature",step:s.length,total:s.length});let _=[];if(za())try{_=await Ga({purchases:y,buyer:n.address,signer:n.signer,onSigned:k});const b=(await Promise.allSettled(_.map(f=>Ha(f)))).flatMap(f=>f.status==="rejected"?[f.reason]:[]);if(b.length&&!b.some(f=>f instanceof Ja))throw b[0];p=!0}catch(x){if(!(x instanceof Ya))throw x;_=await ve({purchases:y,buyer:n.address,signer:n.signer,onSigned:k})}else _=await ve({purchases:y,buyer:n.address,signer:n.signer});a.forEach(x=>o(x.item.id)),E(null),W("Shop Completed Purchase",{..._e(c),payment_type:"credits",no_crypto_step:p,transaction_hash:_[0]??null}),d.invalidateQueries({queryKey:["usd-balance"]}),d.invalidateQueries({queryKey:["detail-trade"]}),d.invalidateQueries({queryKey:["shop-item"]}),d.invalidateQueries({queryKey:["owned-token"]}),d.invalidateQueries({queryKey:["public-token"]}),d.invalidateQueries({queryKey:["item-resales"]}),d.invalidateQueries({queryKey:["shop-items"]}),d.invalidateQueries({queryKey:["catalog-items"]}),d.invalidateQueries({queryKey:["my-assets"]}),d.invalidateQueries({queryKey:["purchases"]}),d.invalidateQueries({queryKey:["owned-item-count"]}),d.invalidateQueries({queryKey:["overview-listings"]}),d.invalidateQueries({queryKey:["upsell-listings"]});const m=D.current;D.current=null,g(null),S(!1);const Q={items:r,txHash:_[0]??void 0,settled:!0,...m?{creditsAdded:m}:{}};B("/success",{state:Q,replace:!0})}catch(y){if(se(y)||O(y,{flow:"cart_checkout",step:u,cart_size:a.length}),W(se(y)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:u,error_code:De(y),value_usd:$e(c.reduce((k,_)=>k+_.priceCredits,0)),cart_size:s.length}),l.length){try{await pe(n.identity,l)}catch(k){O(k,{flow:"cart_checkout",step:"release"})}d.invalidateQueries({queryKey:["usd-balance"]})}g({phase:"error",message:fe(y)})}}function Ke(a,s){d.invalidateQueries({queryKey:["usd-balance"]}),d.invalidateQueries({queryKey:["detail-trade"]}),d.invalidateQueries({queryKey:["shop-item"]}),d.invalidateQueries({queryKey:["owned-token"]}),d.invalidateQueries({queryKey:["public-token"]}),d.invalidateQueries({queryKey:["item-resales"]}),d.invalidateQueries({queryKey:["shop-items"]}),d.invalidateQueries({queryKey:["catalog-items"]}),d.invalidateQueries({queryKey:["my-assets"]}),d.invalidateQueries({queryKey:["purchases"]}),d.invalidateQueries({queryKey:["owned-item-count"]}),d.invalidateQueries({queryKey:["overview-listings"]}),d.invalidateQueries({queryKey:["upsell-listings"]});const c=D.current;D.current=null,g(null),S(!1);const r={items:a,txHash:s[0]??void 0,settled:!0,...c?{creditsAdded:c}:{}};B("/success",{state:r,replace:!0})}function Qe(a,s){se(a)||O(a,{flow:s,step:"submit"}),W(se(a)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:De(a)}),g({phase:"error",message:fe(a)}),S(!1)}async function la(a,s){const c=ne(ge.MANAToken,s),r=ne(ge.CreditsManager,s);await Va({auth:{kind:Da.Allowance,contractAddress:c.address,spenderAddress:r.address,chainId:s},signer:a})}async function da(a){const s=ie(a).reduce((u,p)=>u+p.usdCents,0),c=(V??0n)>0n;let r=le;if(!r&&c)try{r=await d.fetchQuery({queryKey:["mana-rate",Ge.chainId],queryFn:()=>Ba(Ge.chainId),staleTime:6e4})}catch{r=void 0}const l=r?Je(s,r):0n;return{totalCents:s,manaWei:l}}async function Re(a,s){const c=xe(a),{totalCents:r,manaWei:l}=await da(a),u=be({priceCents:r,priceManaWei:l,balanceCents:(v==null?void 0:v.balanceCents)??0,manaBalanceWei:V??0n});if(s&&u.options.some(p=>p.method===s)){if(s==="credits"){me(a);return}const{spender:p,chainId:y}=Te(s,a);await Fe(p,y,()=>s==="mana"?void Ee(a):void We(a,r,l));return}if(u.options.some(p=>p.method==="mana"||p.method==="combined")){g({phase:"choose",lines:a,totalCents:r,manaWei:l}),S(!1);return}if(v!=null&&v.credits<c){Ie(a);return}me(a)}function ua(a){return be({priceCents:a.totalCents,priceManaWei:a.manaWei,balanceCents:(v==null?void 0:v.balanceCents)??0,manaBalanceWei:V??0n})}const[ye,ae]=j.useState(null);function Te(a,s){const c=s[0].trade;return{spender:a==="mana"?ne(Pa(c.contract),c.chainId).address:ne(ge.CreditsManager,c.chainId).address,chainId:c.chainId}}async function Fe(a,s,c){const r=Ua(s,a),l=n?await Oa(r,n.address).catch(()=>!0):!0;if($a(n==null?void 0:n.providerType,l)){S(!1),ae({auth:r,run:c});return}c()}function ha(a){if((h==null?void 0:h.phase)!=="choose")return;const{lines:s,totalCents:c,manaWei:r}=h;if(a==="credits"){me(s);return}const{spender:l,chainId:u}=Te(a,s);Fe(l,u,()=>a==="mana"?void Ee(s):void We(s,c,r))}async function Ee(a){if(!n||a.length===0)return;const s=ie(a),c=s.map(u=>({...u.item,priceCredits:u.priceCredits})),r=a.map(u=>({...u.item,priceCredits:u.priceCredits,quantity:u.quantity})),l=()=>g({phase:"processing",stage:"settling",step:s.length,total:s.length});g({phase:"processing",stage:"awaiting-signature",step:s.length,total:s.length});try{const u=await Fa({trades:s.map(p=>p.trade),buyer:n.address,signer:n.signer,onSigned:l});a.forEach(p=>o(p.item.id)),E(null),W("Shop Completed Purchase",{..._e(c),payment_type:"mana",transaction_hash:u[0]??null}),d.invalidateQueries({queryKey:["mana-balance"]}),Ke(r,u)}catch(u){Qe(u,"buy_cart_mana")}}async function We(a,s,c){if(!n||a.length===0)return;const r=ie(a),l=r.map(m=>({...m.item,priceCredits:m.priceCredits})),u=a.map(m=>({...m.item,priceCredits:m.priceCredits,quantity:m.quantity})),p=Ea(r.map(m=>m.usdCents),(v==null?void 0:v.balanceCents)??0),y=p.reduce((m,Q)=>m+Q,0),k=Wa(Math.max(0,s-y),s,c),_=[];g({phase:"processing",stage:"reserving",step:1,total:r.length});try{const m=[];for(let b=0;b<r.length;b++){const f=p[b];if(f<=0)continue;g({phase:"processing",stage:"reserving",step:b+1,total:r.length});const{credit:U,maxCreditedValue:ya}=await Ve(n.identity,f,r[b].trade.id);_.push(U.id),m.push({trade:r[b].trade,credits:[U],maxCreditedValue:ya})}r.forEach((b,f)=>{p[f]<=0&&m.push({trade:b.trade,credits:[],maxCreditedValue:"0"})}),m[0]={...m[0],maxCreditedValue:(BigInt(m[0].maxCreditedValue)+k).toString()},await la(n.signer,r[0].trade.chainId);const Q=()=>g({phase:"processing",stage:"settling",step:r.length,total:r.length});g({phase:"processing",stage:"awaiting-signature",step:r.length,total:r.length});const x=await ve({purchases:m,buyer:n.address,signer:n.signer,onSigned:Q});a.forEach(b=>o(b.item.id)),E(null),W("Shop Completed Purchase",{..._e(l),payment_type:"credits_and_mana",transaction_hash:x[0]??null}),d.invalidateQueries({queryKey:["mana-balance"]}),Ke(u,x)}catch(m){_.length&&(pe(n.identity,_).catch(()=>{}),d.invalidateQueries({queryKey:["usd-balance"]})),Qe(m,"buy_cart_combined")}}async function z(a){if(!n){He({type:"cart-checkout"}),q();return}const s=P.getState().items.filter(we);if(s.length===0)return;$(null),J(null),S(!0);const c=s.reduce((r,l)=>r+l.priceCredits*l.quantity,0);W("Shop Started Checkout",{cart_size:s.length,cart_value_credits:c,cart_value_usd:$e(c),has_sufficient_credits:Y>=c});try{const r=await Xa(s,n.address,ca),l=[...r.unavailable,...r.own];if(l.length&&(l.forEach(u=>o(u.id)),J(ut(r))),r.buyable.length===0){$(t("cart.error.noneAvailable")),E(null);return}if(r.orderChanged){E(r),je.current=Date.now();return}await Re(r.buyable,a)}catch(r){O(r,{flow:"cart_checkout",step:"review",cart_size:s.length}),$(fe(r))}finally{S(!1)}}async function Le(){if(w){if(!n){He({type:"cart-checkout"}),q();return}if(Date.now()-je.current>dt){E(null),J(null),await z();return}$(null),Re(w.buyable)}}async function ma(){if(de){try{sessionStorage.setItem(re,JSON.stringify(P.getState().items))}catch{}S(!0);try{const a=await at(de,n?{address:n.address,identity:n.identity}:void 0);if(a.url){window.location.href=a.url;return}B("/credits")}catch(a){try{sessionStorage.removeItem(re)}catch{}O(a,{flow:"cart_buy_credits"}),g({phase:"error",message:t("buyModal.error.creditsCheckout")})}finally{S(!1)}}}const Be=j.useRef(!1);j.useEffect(()=>{if(!n||Be.current||!Ka("cart-checkout"))return;Be.current=!0;const a=setTimeout(()=>void z(),0);return()=>clearTimeout(a)},[n]);const ze=j.useRef(!1);j.useEffect(()=>{if(!(F!=null&&F.resumeCheckout)||ze.current)return;ze.current=!0,D.current=F.creditsAdded??null;try{const s=sessionStorage.getItem(re);if(s){sessionStorage.removeItem(re);const c=JSON.parse(s);Array.isArray(c)&&c.length&&R(c)}}catch{}d.invalidateQueries({queryKey:["usd-balance"]});const a=setTimeout(()=>void z(),0);return()=>clearTimeout(a)},[F==null?void 0:F.resumeCheckout]);const K=aa||(h==null?void 0:h.phase)==="processing";return i.length===0&&!h?e.jsx("div",{className:"checkout checkout--empty",children:e.jsxs("div",{className:"checkout__top",children:[e.jsxs("button",{className:"checkout__back",onClick:()=>B(-1),type:"button",children:[e.jsx(A,{name:"arrow-left"}),t("nav.cart")]}),e.jsxs("section",{className:"checkout__panel cart-empty","data-testid":"cart-empty",children:[e.jsx(A,{name:"cart-plus",size:110,className:"cart-empty__icon"}),e.jsxs("div",{className:"cart-empty__text",children:[e.jsx("p",{className:"cart-empty__title",children:t("cart.empty.title")}),e.jsx("p",{className:"cart-empty__body",children:t("cart.empty.body")})]}),e.jsx(te,{className:"cart-empty__cta",to:"/assets",children:t("cart.empty.cta")})]})]})}):e.jsxs("div",{className:"checkout",children:[e.jsxs("div",{className:"checkout__top",children:[e.jsxs("button",{className:"checkout__back",onClick:()=>B(-1),type:"button",children:[e.jsx(A,{name:"arrow-left"}),t("nav.cart")]}),e.jsxs("div",{className:"checkout__body",children:[e.jsxs("div",{className:"checkout__left",children:[e.jsxs("div",{className:"checkout__head-card",children:[e.jsx("button",{className:"checkout__panel-back",onClick:()=>B(-1),type:"button","aria-label":t("cart.goBack"),children:e.jsx(A,{name:"arrow-left"})}),e.jsx("h1",{className:"checkout__panel-title",children:t("cart.panelTitle",{count:sa})}),Ze?e.jsxs("button",{className:"checkout__fitting",onClick:()=>T(!0),disabled:K,children:[e.jsx(A,{name:"fitting-room"}),t("cart.fittingRoom")]}):null]}),e.jsxs("section",{className:"checkout__panel",children:[e.jsx("div",{className:"checkout__list",children:i.map(a=>{const s=ia.get(a.id),c=s?s.priceCredits:a.priceCredits,r=!!s&&s.priceCredits!==a.priceCredits,l=!a.tokenId,u=a.quantity,p=typeof a.available=="number"&&u>=a.available,y=c*u,k=!!M[a.id],_=Na(a),m=Ne[a.id],Q=!Oe(m),x=m==="sold-out"?t("cart.availability.soldOut"):t("cart.availability.unavailable");return e.jsxs("div",{className:`checkout__card${Q?" is-unavailable":""}`,children:[e.jsxs("div",{className:"checkout__thumb",children:[_?e.jsx(te,{className:"checkout__thumb-link",to:_,state:{item:a,tradeId:a.tradeId},"aria-label":a.name,children:a.thumbnail?e.jsx("img",{src:a.thumbnail,alt:a.name}):null}):a.thumbnail?e.jsx("img",{src:a.thumbnail,alt:a.name}):null,e.jsx("span",{className:"checkout__thumb-check","aria-hidden":!0,children:e.jsx("svg",{viewBox:"0 0 20 20",width:"12",height:"12",children:e.jsx("path",{d:"M5 10.5l3 3 7-7.5",fill:"none",stroke:"#fff",strokeWidth:"2.4",strokeLinecap:"round",strokeLinejoin:"round"})})})]}),e.jsxs("div",{className:"checkout__info",children:[e.jsxs("div",{className:"checkout__desc",children:[_?e.jsx(te,{className:"checkout__name",to:_,state:{item:a,tradeId:a.tradeId},title:a.name,children:a.name}):e.jsx("div",{className:"checkout__name",title:a.name,children:a.name}),a.creator?e.jsx(wa,{address:a.creator,className:"checkout__creator",linkToProfile:!0}):null,l?e.jsxs("span",{className:"checkout__creator-tag","data-testid":"cart-creator-tag",children:[e.jsx(A,{name:"buy-from-creator",className:"checkout__creator-tag-ico","aria-hidden":!0}),t("cart.creatorTag")]}):null]}),e.jsx("div",{className:"checkout__foot",children:Q?e.jsxs(e.Fragment,{children:[e.jsxs("span",{className:"checkout__unavailable",children:[e.jsx(A,{name:"warning-fill",size:24,className:"checkout__warn","aria-hidden":!0}),x]}),_?e.jsx(te,{className:"checkout__resales",to:_,state:{item:a,tradeId:a.tradeId},children:t("cart.availability.viewResales")}):null]}):e.jsxs(e.Fragment,{children:[l?e.jsxs("div",{className:"checkout__stepper",children:[e.jsx("button",{className:"checkout__step",onClick:()=>ee(()=>N(a.id)),disabled:K||u<=1,"aria-label":t("cart.decreaseQuantity",{name:a.name}),children:e.jsx("svg",{viewBox:"0 0 16 16",fill:"none","aria-hidden":!0,focusable:"false",children:e.jsx("path",{d:"M3.5 8h9",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})}),e.jsx("span",{className:"checkout__qty",children:u}),e.jsx("button",{className:"checkout__step",onClick:()=>ee(()=>C(a.id)),disabled:K||p,"aria-label":t("cart.increaseQuantity"),children:e.jsx("svg",{viewBox:"0 0 16 16",fill:"none","aria-hidden":!0,focusable:"false",children:e.jsx("path",{d:"M8 3.5v9M3.5 8h9",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})})]}):null,e.jsxs("div",{className:"checkout__price",children:[e.jsx(L,{className:"checkout__price-ico"})," ",y,r?e.jsx("span",{className:"checkout__price-was",children:a.priceCredits*u}):null]})]})})]}),e.jsxs("div",{className:"checkout__actions",children:[e.jsx("button",{className:`checkout__fav${k?" is-on":""}`,onClick:()=>ce(a),"aria-label":k?t("cart.removeFromFavorites",{name:a.name}):t("cart.addToFavorites",{name:a.name}),title:k?t("assetCard.removeFromFavorites"):t("assetCard.addToFavorites"),children:e.jsx(A,{name:k?"heart-solid":"heart"})}),e.jsx("button",{className:"checkout__remove",onClick:()=>ee(()=>o(a.id)),disabled:K,"aria-label":t("cart.remove",{name:a.name}),title:t("cart.removeTitle"),children:e.jsx(A,{name:"trash",size:24})})]})]},a.id)})}),e.jsx("div",{className:"checkout__utils",children:e.jsx("button",{className:"link",onClick:()=>ee(I),disabled:K,children:t("cart.clearCart")})})]})]}),e.jsxs("aside",{className:"checkout__summary",children:[e.jsx("h2",{className:"checkout__summary-title",children:t("cart.purchaseSummary")}),e.jsxs("div",{className:"checkout__summary-body",children:[e.jsxs("div",{className:"checkout__total-line",children:[e.jsx("span",{className:"checkout__total-label",children:t("cart.totalItems",{count:na})}),e.jsxs("span",{className:"checkout__total-side",children:[e.jsxs("span",{className:"checkout__total-value",children:[e.jsx(L,{className:"checkout__total-ico"})," ",Me]}),Ae&&(V??0n)>0n?e.jsx("span",{className:"checkout__total-rate","data-testid":"cart-mana-rate",children:Ae}):null]})]}),Z.options.length>0||Z.manaShortfall?e.jsx(Ye,{options:Z.options,totalCents:X,shortfall:Z.manaShortfall,creditsLabel:w?t("marketCheckout.confirmPurchase"):t("cart.buyWithCredits"),busy:K||he,onPay:a=>void(w?Le():z(a))}):e.jsx("button",{className:"checkout__cta",onClick:()=>void(w?Le():z()),disabled:K||he,children:K?t("cart.working"):w?t("marketCheckout.confirmPurchase"):t("assetCard.buyNow")}),he?e.jsx("p",{className:"muted checkout__msg",children:t("cart.allUnavailable")}):null,n?null:e.jsx("p",{className:"muted checkout__msg",children:t("cart.signInHint")}),w?e.jsx("p",{className:"muted checkout__msg",children:t("cart.priceChanged")}):null,Ce?e.jsx("p",{className:"muted checkout__msg",children:Ce}):null,e.jsx(rt,{message:ea,className:"checkout__msg"})]})]})]})]}),Se.length>0?e.jsx("div",{className:"cart-upsell",children:e.jsx(Qa,{title:t("cart.youMightAlsoLike"),items:Se})}):null,ye&&n?e.jsx(Ra,{auth:ye.auth,signer:n.signer,title:t("authorizeStep.manaTitle"),name:t("authorizeStep.manaName"),reason:t("authorizeStep.manaReason"),icon:e.jsx("img",{src:Ta,width:24,height:24,alt:"","aria-hidden":!0}),onAuthorized:()=>{const{run:a}=ye;ae(null),a()},onCancel:()=>ae(null),onClose:()=>ae(null)}):null,h?e.jsx(ct,{phase:h.phase,balanceCredits:Y,onClose:oa,stage:h.phase==="processing"?h.stage:void 0,step:h.phase==="processing"?h.step:void 0,total:h.phase==="processing"?h.total:void 0,isSelfCustody:Ma(n==null?void 0:n.providerType),options:h.phase==="choose"?ua(h).options:void 0,onPay:ha,totalCents:h.phase==="choose"?h.totalCents:void 0,totalManaWei:h.phase==="choose"?h.manaWei:void 0,totalCredits:h.phase==="choose"?xe(h.lines):void 0,lines:h.phase==="nofunds"?h.lines:void 0,shortfallCredits:h.phase==="nofunds"?h.shortfall:void 0,packs:H,selectedPack:de,onSelectPack:ke,onBuyPacks:()=>void ma(),message:h.phase==="error"?h.message:void 0,onRetry:()=>void z()}):null]})}export{At as Cart};
@@ -1,292 +0,0 @@
1
- import{j as e,r as w}from"./react-BW1xvPTF.js";import{s as l,K as r,t as m,C as R,A as v,aL as C,e as O,R as U,I as T,J as G,o as $,r as _,q as H,aM as L,M as J}from"./index-CEUqEDHj.js";import{s as K,i as F,A as P,a as B,r as V,m as Y,e as Z}from"./authorizations-Bt-yiKpU.js";import{i as q}from"./errors-CGr_h4qk.js";import{E as X}from"./ErrorNotice-BG40E5Ff.js";import{b as Q}from"./buy-C8thJCOQ.js";import{g as ee,d as te}from"./trade-encoding-rbwEO5I2.js";import{s as ne,M as ae,E as re}from"./sendMetaTransaction-DnNlMy1f.js";import{I as se,C as oe}from"./ethers-CtVvB8eG.js";const S="shop:resume_after_signin",ie=900*1e3;function Ge(n){try{sessionStorage.setItem(S,JSON.stringify({...n,at:Date.now()}))}catch{}}function He(n){let t;try{t=sessionStorage.getItem(S)}catch{return null}if(!t)return null;try{sessionStorage.removeItem(S)}catch{}let a;try{a=JSON.parse(t)}catch{return null}return!a||a.type!==n||typeof a.at!="number"||Date.now()-a.at>ie?null:a.type==="cart-checkout"?{type:"cart-checkout"}:{type:"item-buy",path:a.path}}function ce(n,t){return(n+t-1n)/t}function le(n,t,a){return n<=0||t<=0?0n:n>=t?a:ce(a*BigInt(n),BigInt(t))}function Je(n){var x,f,y;const t=Number.isFinite(n.priceCents)?Math.max(0,Math.trunc(n.priceCents)):0,a=Number.isFinite(n.balanceCents)?Math.max(0,Math.trunc(n.balanceCents)):0,s=n.priceManaWei>0n?n.priceManaWei:0n,i=n.manaBalanceWei>0n?n.manaBalanceWei:0n;if(t<=0)return{options:[],preferred:null,manaShortfall:null};const o=[];if(a>=t&&o.push({method:"credits",creditsCents:t,manaWei:0n}),s>0n&&a>0&&a<t){const c=t-a,g=le(c,t,s);i>=g&&o.push({method:"combined",creditsCents:a,manaWei:g})}s>0n&&i>=s&&o.push({method:"mana",creditsCents:0,manaWei:s});const d=((x=o.find(c=>c.method==="credits"))==null?void 0:x.method)??((f=o.find(c=>c.method==="combined"))==null?void 0:f.method)??((y=o.find(c=>c.method==="mana"))==null?void 0:y.method)??null,b=!o.some(c=>c.method==="mana"||c.method==="combined")&&s>0n&&i>0n?{manaWei:i,manaCents:de(i,t,s),priceCents:t}:null;return{options:o,preferred:d,manaShortfall:b}}function de(n,t,a){return Number(n*BigInt(t)/a)}function Ke(n,t){let a=Number.isFinite(t)?Math.max(0,Math.trunc(t)):0;return n.map(s=>{const i=Number.isFinite(s)?Math.max(0,Math.trunc(s)):0,o=Math.min(i,a);return a-=o,o})}function k(n){return Number.isFinite(n)?Math.max(0,n)/10:0}function Ve(n,t){return n.options.find(a=>a.method===t)??null}function Ye(n,t){if(!Number.isFinite(n)||n<=0||t<=0n)return null;const a=n/10;return Number(t)/1e18/a}const A="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",ue=l.div`
2
- display: flex;
3
- flex-direction: column;
4
- gap: 12px;
5
- align-items: stretch;
6
- width: 100%;
7
- `,D=`
8
- width: 100%;
9
- min-height: 56px;
10
- display: flex;
11
- align-items: center;
12
- justify-content: center;
13
- gap: 8px;
14
- flex-wrap: wrap;
15
- padding: 0 12px;
16
- border: 0;
17
- border-radius: 12px;
18
- cursor: pointer;
19
- transition:
20
- background 0.15s ease,
21
- filter 0.15s ease;
22
- font-family: ${r.font.sans};
23
- font-weight: 600;
24
- font-size: 15px;
25
- line-height: 24px;
26
- letter-spacing: 0.46px;
27
- text-transform: uppercase;
28
- color: ${r.colors.softWhite};
29
-
30
- &:focus-visible {
31
- outline: 2px solid ${r.colors.accent};
32
- outline-offset: 2px;
33
- }
34
- &:disabled {
35
- opacity: 0.6;
36
- cursor: default;
37
- }
38
- `,he=l.button`
39
- ${D}
40
- background: ${r.gradients.amethyst};
41
-
42
- &:hover:not(:disabled) {
43
- filter: brightness(1.08);
44
- }
45
- `,W=l.button`
46
- ${D}
47
- background: ${r.colors.text2};
48
-
49
- &:hover:not(:disabled) {
50
- background: ${r.colors.gray0};
51
- }
52
- `,M=l.span`
53
- display: inline-flex;
54
- align-items: center;
55
- gap: 6px;
56
- text-transform: none;
57
- letter-spacing: 0;
58
-
59
- span {
60
- font-size: 20px;
61
- font-weight: 600;
62
- line-height: normal;
63
- }
64
- .ico {
65
- width: 24px;
66
- height: 24px;
67
- background: ${r.colors.softWhite};
68
- }
69
- `,z=l.span`
70
- position: relative;
71
- display: block;
72
- width: 30px;
73
- height: 30px;
74
- flex: none;
75
-
76
- /* Centred in the slot, not pinned to its top: the slot is taller than the glyph and sits next to a
77
- vertically centred amount, so a top-pinned mark reads as floating above the number. */
78
- img {
79
- position: absolute;
80
- top: 50%;
81
- left: 0;
82
- transform: translateY(-50%);
83
- width: 24px;
84
- height: 24px;
85
- display: block;
86
- }
87
- `,pe=l.span`
88
- font-size: 13px;
89
- font-weight: 600;
90
- letter-spacing: 0.02em;
91
- opacity: 0.85;
92
- `,me=l.span`
93
- font-size: 18px;
94
- font-weight: 600;
95
- opacity: 0.7;
96
- `,fe=l.p`
97
- margin: 0;
98
- font-family: ${r.font.sans};
99
- font-weight: 400;
100
- font-size: 12px;
101
- line-height: 1;
102
- color: ${r.colors.muted};
103
- text-align: center;
104
- `,xe=l.p`
105
- margin: -4px 0 0;
106
- font-family: ${r.font.sans};
107
- font-weight: 400;
108
- font-size: 12px;
109
- line-height: 1.4;
110
- color: ${r.colors.muted};
111
- text-align: center;
112
- `;function Ze({options:n,totalCents:t,onPay:a,busy:s=!1,rateNote:i,creditsLabel:o,shortfall:d}){return e.jsxs(ue,{children:[n.map(u=>u.method==="credits"?e.jsxs(he,{type:"button","data-testid":"pay-with-credits",onClick:()=>a("credits"),disabled:s,children:[e.jsx("span",{children:o??m("buyModal.buy")}),e.jsxs(M,{children:[e.jsx(R,{}),e.jsx("span",{children:v(k(u.creditsCents))})]})]},"credits"):u.method==="mana"?e.jsxs(W,{type:"button","data-testid":"pay-with-mana",onClick:()=>a("mana"),disabled:s,children:[e.jsx("span",{children:m("buyModal.buyWithMana")}),e.jsxs(M,{children:[e.jsx(z,{children:e.jsx("img",{src:A,alt:"","aria-hidden":!0})}),e.jsx("span",{children:C(u.manaWei)})]})]},"mana"):e.jsxs(W,{type:"button","data-testid":"pay-with-combined",onClick:()=>a("combined"),disabled:s,children:[e.jsx("span",{children:m("buyModal.buyWith")}),e.jsxs(M,{children:[e.jsx(R,{}),e.jsx("span",{children:v(k(u.creditsCents))}),e.jsx(me,{children:"+"}),e.jsx(z,{children:e.jsx("img",{src:A,alt:"","aria-hidden":!0})}),e.jsx("span",{children:C(u.manaWei)}),e.jsx(pe,{children:"MANA"})]})]},"combined")),d?e.jsxs(e.Fragment,{children:[e.jsxs(W,{type:"button","data-testid":"pay-with-mana-disabled",disabled:!0,children:[e.jsx("span",{children:m("buyModal.buyWithMana")}),e.jsxs(M,{children:[e.jsx(z,{children:e.jsx("img",{src:A,alt:"","aria-hidden":!0})}),e.jsx("span",{children:C(d.manaWei)})]})]},"mana-short"),e.jsx(xe,{"data-testid":"mana-shortfall-note",children:m("buyModal.manaWorth",{mana:C(d.manaWei),credits:v(k(d.manaCents)),price:v(k(d.priceCents)),currency:O.name})})]}):null,i?e.jsx(fe,{"data-testid":"mana-rate-note",children:i}):null,e.jsx("span",{hidden:!0,"data-testid":"pay-total-cents",children:t})]})}const ge=U`
113
- to { transform: rotate(360deg); }
114
- `,be=l.div`
115
- position: fixed;
116
- inset: 0;
117
- z-index: 10000;
118
- display: flex;
119
- align-items: center;
120
- justify-content: center;
121
- padding: 16px;
122
- background: rgba(22, 21, 24, 0.55);
123
- `,ye=l.div`
124
- width: 480px;
125
- max-width: 100%;
126
- max-height: 92vh;
127
- overflow-y: auto;
128
- background: ${r.colors.white};
129
- border-radius: 16px;
130
- padding: 12px 16px 16px;
131
- box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
132
- display: flex;
133
- flex-direction: column;
134
- gap: 20px;
135
- `,we=l.div`
136
- display: flex;
137
- align-items: center;
138
- justify-content: space-between;
139
- gap: 8px;
140
- padding-bottom: 16px;
141
- border-bottom: 1px solid ${r.colors.gray4};
142
- `,je=l.h2`
143
- margin: 0;
144
- font-family: ${r.font.sans};
145
- font-weight: 600;
146
- font-size: 20px;
147
- line-height: 1.6;
148
- color: ${r.colors.text};
149
- `,ve=l.button`
150
- flex: none;
151
- display: grid;
152
- place-items: center;
153
- width: 24px;
154
- height: 24px;
155
- border: 0;
156
- background: none;
157
- cursor: pointer;
158
- color: ${r.colors.text};
159
-
160
- .ico {
161
- width: 18px;
162
- height: 18px;
163
- }
164
- &:disabled {
165
- opacity: 0.4;
166
- cursor: default;
167
- }
168
- &:focus-visible {
169
- outline: 2px solid ${r.colors.accent};
170
- outline-offset: 2px;
171
- }
172
- `,Ce=l.div`
173
- display: grid;
174
- grid-template-columns: 44px 1fr;
175
- align-items: center;
176
- gap: 14px;
177
- padding: 14px 18px;
178
- background: ${r.colors.white};
179
- border: 1px solid ${r.colors.line};
180
- border-radius: 16px;
181
- `,ke=l.div`
182
- width: 44px;
183
- height: 44px;
184
- border-radius: 10px;
185
- background: ${r.colors.media};
186
- overflow: hidden;
187
- display: flex;
188
- align-items: center;
189
- justify-content: center;
190
- color: ${r.colors.muted2};
191
-
192
- img {
193
- width: 100%;
194
- height: 100%;
195
- object-fit: contain;
196
- }
197
- .ccy-mark {
198
- width: 26px;
199
- height: 26px;
200
- }
201
- `,Me=l.div`
202
- min-width: 0;
203
- display: flex;
204
- flex-direction: column;
205
- gap: 4px;
206
- `,$e=l.span`
207
- font-weight: 700;
208
- color: ${r.colors.text};
209
- `,Ne=l.span`
210
- font-size: 13px;
211
- line-height: 1.45;
212
- color: ${r.colors.muted};
213
- `,Ae=l.p`
214
- margin: 0;
215
- font-size: 12px;
216
- line-height: 1.5;
217
- color: ${r.colors.muted2};
218
- `,We=l.div`
219
- display: flex;
220
- gap: 12px;
221
-
222
- ${r.media.down("mobile")} {
223
- flex-direction: column-reverse;
224
- }
225
- `,ze=l.button`
226
- flex: 1 1 0;
227
- height: 48px;
228
- border: 2px solid ${r.colors.accent};
229
- border-radius: 12px;
230
- background: transparent;
231
- color: ${r.colors.accent};
232
- cursor: pointer;
233
- font-family: ${r.font.sans};
234
- font-weight: 600;
235
- font-size: 13px;
236
- line-height: 24px;
237
- letter-spacing: 0.46px;
238
- text-transform: uppercase;
239
-
240
- &:hover:not(:disabled) {
241
- background: rgba(105, 31, 169, 0.06);
242
- }
243
- &:disabled {
244
- cursor: default;
245
- opacity: 0.5;
246
- }
247
- &:focus-visible {
248
- outline: 2px solid ${r.colors.accent};
249
- outline-offset: 2px;
250
- }
251
- `,_e=l.button`
252
- flex: 1 1 0;
253
- display: inline-flex;
254
- align-items: center;
255
- justify-content: center;
256
- gap: 8px;
257
- height: 48px;
258
- border: 0;
259
- border-radius: 12px;
260
- background: ${r.colors.accent};
261
- color: ${r.colors.softWhite};
262
- cursor: pointer;
263
- font-family: ${r.font.sans};
264
- font-weight: 600;
265
- font-size: 13px;
266
- line-height: 24px;
267
- letter-spacing: 0.46px;
268
- text-transform: uppercase;
269
-
270
- &:hover:not(:disabled) {
271
- background: ${r.colors.accentHover};
272
- }
273
- &:disabled {
274
- cursor: default;
275
- background: rgba(105, 31, 169, 0.4);
276
- }
277
- &:focus-visible {
278
- outline: 2px solid ${r.colors.accent};
279
- outline-offset: 2px;
280
- }
281
- `,Se=l.span`
282
- width: 16px;
283
- height: 16px;
284
- border-radius: 50%;
285
- border: 2px solid rgba(255, 255, 255, 0.5);
286
- border-top-color: ${r.colors.white};
287
- animation: ${ge} 0.7s linear infinite;
288
-
289
- @media (prefers-reduced-motion: reduce) {
290
- animation: none;
291
- }
292
- `;function qe({auth:n,signer:t,title:a,reason:s,name:i,image:o,icon:d,onAuthorized:u,onCancel:b,onClose:x}){const[f,y]=w.useState(!1),[c,g]=w.useState(null);async function j(){y(!0),g(null);try{await K({auth:n,signer:t,active:!0}),u()}catch(h){q(h)?g(m("authorizeStep.errorRejected")):(G(h,{flow:"authorize_step",kind:n.kind}),g(m("authorizeStep.errorGeneric"))),y(!1)}}return e.jsx(be,{onClick:f?void 0:x,role:"presentation",children:e.jsxs(ye,{onClick:h=>h.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":a,children:[e.jsxs(we,{children:[e.jsx(je,{children:a}),e.jsx(ve,{onClick:x,disabled:f,"aria-label":m("authorizeStep.close"),children:e.jsx(T,{name:"close",className:"ico"})})]}),e.jsxs(Ce,{"data-testid":"authorize-step-row",children:[e.jsx(ke,{children:o?e.jsx("img",{src:o,alt:""}):d}),e.jsxs(Me,{children:[e.jsx($e,{title:i,children:i}),e.jsx(Ne,{children:s})]})]}),e.jsx(Ae,{children:m("authorizeStep.note")}),e.jsx(X,{message:c}),e.jsxs(We,{children:[e.jsx(ze,{type:"button",onClick:b,disabled:f,children:m("authorizeStep.cancel")}),e.jsx(_e,{type:"button","data-testid":"authorize-step-action",onClick:()=>void j(),disabled:f,children:f?e.jsxs(e.Fragment,{children:[e.jsx(Se,{"aria-hidden":!0}),m("authorizeStep.authorizing")]}):m("authorizeStep.authorize")})]})]})})}async function Xe(n){const[t]=await Ie({...n,trades:[n.trade]});return t}async function Ie(n){const{trades:t,buyer:a,signer:s,onSigned:i}=n;if(t.length===0)throw new Error("No items to buy");const o=new Map;for(const u of t){const b=`${u.chainId}:${u.contract.toLowerCase()}`,x=o.get(b);x?x.push(u):o.set(b,[u])}const d=[];for(const u of o.values())d.push(await Ee({trades:u,buyer:a,signer:s,onSigned:i}));return d}async function Ee(n){const{trades:t,buyer:a,signer:s,onSigned:i}=n,o=t[0],d=$(H(o.contract),o.chainId),u=$(_.MANAToken,o.chainId);await F({auth:{kind:P.Allowance,contractAddress:u.address,spenderAddress:d.address,chainId:o.chainId},signer:s});const b=t.map(c=>ee(c,a));if(B.enabled)try{const c=new se(d.abi).encodeFunctionData("accept",[b]),g=V(),j=Y(s.provider,g),h=await ne(j,g,c,d,{serverURL:B.relayerUrl});return i==null||i(),await g.waitForTransaction(h,1,12e4),h}catch(c){if(c instanceof ae&&c.code===re.USER_DENIED)throw c;console.warn("[buyWithMana] gasless meta-tx failed, falling back to a direct tx:",c)}await Z(s.provider,o.chainId);const f=await new oe(d.address,d.abi,s).accept(b,te(o.chainId));return i==null||i(),(await f.wait()).transactionHash}async function Qe(n){const{trade:t,buyer:a,signer:s,credits:i,manaGapWei:o}=n;if(i.length===0)throw new Error("No credits to spend — use buyWithMana for a MANA-only purchase");if(o<=0n)throw new Error("No MANA gap to cover — use buyWithCredits for a credits-only purchase");const d=$(_.MANAToken,t.chainId),u=$(_.CreditsManager,t.chainId);await F({auth:{kind:P.Allowance,contractAddress:d.address,spenderAddress:u.address,chainId:t.chainId},signer:s});const x=(i.reduce((f,y)=>f+BigInt(y.availableAmount),0n)+o).toString();return Q({trade:t,buyer:a,signer:s,credits:i,maxCreditedValue:x})}function et({className:n}){return e.jsxs("svg",{viewBox:"0 0 24 24",width:"24",height:"24","aria-hidden":!0,className:n,children:[e.jsx("circle",{cx:"12",cy:"12",r:"9",fill:"none",stroke:"#691fa9",strokeWidth:"1.8"}),e.jsx("path",{d:"M12 7v6",stroke:"#691fa9",strokeWidth:"1.8",strokeLinecap:"round"}),e.jsx("circle",{cx:"12",cy:"16.5",r:"1.1",fill:"#691fa9"})]})}function tt({title:n,items:t,onViewAll:a}){const s=w.useRef(null),[i,o]=w.useState(1),[d,u]=w.useState(0),[b,x]=w.useState(!0),[f,y]=w.useState(!1),c=w.useCallback(()=>{const h=s.current;if(!h)return;const{scrollLeft:p,scrollWidth:I,clientWidth:N}=h,E=Math.max(1,Math.ceil(I/N));o(E),u(Math.min(E-1,Math.round(p/N))),x(p<=1),y(p+N>=I-1)},[]);if(w.useEffect(()=>{c();const h=s.current;if(h)return h.addEventListener("scroll",c,{passive:!0}),window.addEventListener("resize",c),()=>{h.removeEventListener("scroll",c),window.removeEventListener("resize",c)}},[c,t.length]),t.length===0)return null;function g(h){const p=s.current;p&&p.scrollBy({left:h*p.clientWidth,behavior:"smooth"})}function j(h){const p=s.current;p&&p.scrollTo({left:h*p.clientWidth,behavior:"smooth"})}return e.jsxs("section",{className:"collection-carousel",children:[e.jsxs("div",{className:"collection-carousel__head",children:[e.jsx("h2",{className:"collection-carousel__title",children:n}),a?e.jsxs("button",{className:"collection-carousel__viewall",onClick:a,children:[m("collectionCarousel.viewAll"),e.jsx(T,{name:"chevron-down",size:16,className:"collection-carousel__viewall-ico"})]}):null]}),e.jsxs("div",{className:"collection-carousel__viewport",children:[e.jsx("button",{className:"collection-carousel__arrow collection-carousel__arrow--left",onClick:()=>g(-1),"aria-label":m("collectionCarousel.scrollLeft"),disabled:b,children:e.jsx("img",{src:L,alt:"","aria-hidden":!0})}),e.jsx("div",{className:"collection-carousel__track",ref:s,children:t.map(h=>e.jsx(J,{item:h},h.id))}),e.jsx("button",{className:"collection-carousel__arrow collection-carousel__arrow--right",onClick:()=>g(1),"aria-label":m("collectionCarousel.scrollRight"),disabled:f,children:e.jsx("img",{src:L,alt:"","aria-hidden":!0})})]}),i>1?e.jsx("div",{className:"collection-carousel__dots","aria-label":m("collectionCarousel.pages"),children:Array.from({length:i}).map((h,p)=>e.jsx("button",{className:`collection-carousel__dot${p===d?" is-active":""}`,"aria-label":m("collectionCarousel.goToPage",{page:p+1}),"aria-current":p===d?"true":void 0,onClick:()=>j(p)},p))}):null]})}export{qe as A,tt as C,Ze as P,et as W,A as a,Ie as b,Je as c,Ke as d,le as e,k as f,Xe as g,Ve as h,Qe as i,Ye as m,Ge as s,He as t};