@dcl/shop 0.1.0-30461849576.commit-12d07d4 → 0.1.0-30465483842.commit-35256d2

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 (227) hide show
  1. package/assets/{Activity-CSuhDydH.js → Activity-BeTqkBj9.js} +7 -7
  2. package/assets/{AnimatedBackground-8Z_8Mlol.js → AnimatedBackground-Cn4Zf2W1.js} +1 -1
  3. package/assets/{Assets-SN3Y76GI.js → Assets-DudI0KEf.js} +7 -7
  4. package/assets/{Assets.styles-ciQtjliZ.js → Assets.styles-BVt9ny1H.js} +1 -1
  5. package/assets/{Authorizations-lx92TdPJ.js → Authorizations-BAz8f3JR.js} +1 -1
  6. package/assets/{Cart-B21LiuAo.js → Cart-ivYSIGG2.js} +2 -2
  7. package/assets/{CircularProgress-Djai3zyH.js → CircularProgress-CtiP6dpx.js} +1 -1
  8. package/assets/{Collection-CEQxSX4E.js → Collection-DtymV7vw.js} +1 -1
  9. package/assets/{CollectionCarousel-DfMAEnsm.js → CollectionCarousel-cAnwcIFc.js} +1 -1
  10. package/assets/{ConstantsUtil-CJLq5-wb.js → ConstantsUtil-CtukCvy7.js} +1 -1
  11. package/assets/{ContentClient-Dt2-TsxC.js → ContentClient-Y4SsAlAh.js} +1 -1
  12. package/assets/Creator-BXEtxAG-.js +306 -0
  13. package/assets/{DeploymentBuilder-Cu-VDjOR.js → DeploymentBuilder-GpEcBaRI.js} +1 -1
  14. package/assets/{ErrorNotice-CyxiR_Rh.js → ErrorNotice-CCmfdXO-.js} +1 -1
  15. package/assets/{ExchangeController-Z_fhiIuM.js → ExchangeController-DricVZKh.js} +1 -1
  16. package/assets/{GetCredits-Ctz5CKT1.js → GetCredits-CteYpfxR.js} +4 -4
  17. package/assets/{HelpersUtil-CfY7XYFI.js → HelpersUtil-CGIcCkK_.js} +1 -1
  18. package/assets/{ImportListings-DmVwt0Ax.js → ImportListings-Bbmrn90L.js} +8 -8
  19. package/assets/{ItemDetail-CX5br1KM.js → ItemDetail-0VoDt4ER.js} +3 -3
  20. package/assets/{LoadMore-BpBgRt6U.js → LoadMore-C4ahcKGI.js} +1 -1
  21. package/assets/{MenuList-D6x9iVBq.js → MenuList-B2tx2Rax.js} +1 -1
  22. package/assets/{MyAssets-BexRoK4a.js → MyAssets-CN-grtYY.js} +1 -1
  23. package/assets/{MyFavorites-YMHXyXLK.js → MyFavorites-BbfXGeat.js} +1 -1
  24. package/assets/{NetworkUtil-DrZx-6FF.js → NetworkUtil-DXqql1Wz.js} +1 -1
  25. package/assets/{NotFound-BGBtr9uR.js → NotFound-3nwiotnn.js} +1 -1
  26. package/assets/{NotificationsBell-DC-1Irju.js → NotificationsBell-HgkcWigI.js} +1 -1
  27. package/assets/{StoreSettings-U-7XtzFv.js → StoreSettings-qabn4ON-.js} +1 -1
  28. package/assets/{Success-DpsXoJt6.js → Success-CjzxOGc_.js} +1 -1
  29. package/assets/{SwapController-DYEFHcHa.js → SwapController-DMsZNMmX.js} +1 -1
  30. package/assets/{Tooltip-azUGAy-5.js → Tooltip-C7o9WgVx.js} +1 -1
  31. package/assets/{TradeService-DctYnk8d.js → TradeService-DPp_8P7A.js} +1 -1
  32. package/assets/{W3MFrameProviderSingleton-E3LZaKPB.js → W3MFrameProviderSingleton-CTol_EUI.js} +3 -3
  33. package/assets/{WebCryptoP256-CVsQ_o8H.js → WebCryptoP256-DpdlkbHJ.js} +1 -1
  34. package/assets/{authorizations-wLlzXVR-.js → authorizations-93IYCFGd.js} +1 -1
  35. package/assets/{basic-CKpMAJq4.js → basic-CpElrsn8.js} +1 -1
  36. package/assets/{biconomy-C-ggcRFD.js → biconomy-DxKbEqvI.js} +1 -1
  37. package/assets/{browseLayout.styles-4wApiFUk.js → browseLayout.styles-oJ6cJp3z.js} +1 -1
  38. package/assets/{browser-CNT004n0.js → browser-DxF-qILS.js} +1 -1
  39. package/assets/browser-ponyfill-Bfl4ugg_.js +1 -0
  40. package/assets/{browser-ponyfill-C5PEoXZC.js → browser-ponyfill-CxIDDbrC.js} +1 -1
  41. package/assets/{builder-DMvOfu4D.js → builder-BxP8tT4f.js} +1 -1
  42. package/assets/{buy-F5h0O1Oz.js → buy-BYXdfz24.js} +1 -1
  43. package/assets/{buy-gasless-Bx1g9q5n.js → buy-gasless-BS7n5_qI.js} +1 -1
  44. package/assets/{categories-DSuB3dEO.js → categories-5tCT8xWh.js} +1 -1
  45. package/assets/{ccip-BO523Iyo.js → ccip-Bl6ljmaH.js} +1 -1
  46. package/assets/{ccip-DFl4XluK.js → ccip-D8XoWaW0.js} +1 -1
  47. package/assets/{chains-B1nqR6QI.js → chains-Dlj4CXzw.js} +1 -1
  48. package/assets/{clsx-CdAehort.js → clsx-GM87-Mfi.js} +2 -2
  49. package/assets/{common-D06fGQP-.js → common-B0ixkeRu.js} +1 -1
  50. package/assets/{controller--bXZwMEA.js → controller-B9756Ryj.js} +2 -2
  51. package/assets/{core-BBTEsxmO.js → core-CnxuTyuu.js} +4 -4
  52. package/assets/{createSvgIcon-CthtS2fU.js → createSvgIcon-tZB5vU5t.js} +2 -2
  53. package/assets/{custom-CsWArT5d.js → custom-BpAwBsCt.js} +1 -1
  54. package/assets/{data-capture-kKOdMtvw.js → data-capture-CHeYJ3vX.js} +1 -1
  55. package/assets/decimals-CMCAWgOh.js +1 -0
  56. package/assets/{decimals-DxZ5UHfB.js → decimals-CqRsKj6U.js} +1 -1
  57. package/assets/{detectExtension-FEABfJC9.js → detectExtension-DX7grDLh.js} +1 -1
  58. package/assets/{email-vr9UbC4V.js → email-XSD702LD.js} +1 -1
  59. package/assets/{embedded-wallet-DFmANWep.js → embedded-wallet-DXacld5x.js} +1 -1
  60. package/assets/{emotion-styled.browser.esm-BjmVKpEM.js → emotion-styled.browser.esm-CDVeR2pU.js} +1 -1
  61. package/assets/{engine-CIkOAXtz.js → engine-Dh3r5QUk.js} +1 -1
  62. package/assets/{errors-BHFRAZhi.js → errors-DLr34B3-.js} +1 -1
  63. package/assets/estimate-l1-fee-2qvKT5Nf.js +1 -0
  64. package/assets/eth_estimateGas-BZtzeL48.js +1 -0
  65. package/assets/{eth_getStorageAt-DTRcHmRI.js → eth_getStorageAt-E4OzrSEc.js} +1 -1
  66. package/assets/eth_getTransactionCount-Ck8bEyl_.js +1 -0
  67. package/assets/{ethereum-BtCbkX0F.js → ethereum-CBeS7QFR.js} +1 -1
  68. package/assets/{ethers-C3WgUna9.js → ethers--abqWJu6.js} +1 -1
  69. package/assets/{execute-DXk7xWDJ.js → execute-BjxgVD5q.js} +2 -2
  70. package/assets/{extractIPFS-CSmwBy8V.js → extractIPFS-ChPZSPQw.js} +1 -1
  71. package/assets/{features-CB_msUrB.js → features-ZVa1PXQo.js} +1 -1
  72. package/assets/{fetchTokenMetadata-BonBD4HK.js → fetchTokenMetadata-BonGxoWN.js} +2 -2
  73. package/assets/{fortmatic-ClwQlaPX.js → fortmatic-HaPICQeD.js} +1 -1
  74. package/assets/{get-bytecode-DKGahtxz.js → get-bytecode-BRKTQsHC.js} +1 -1
  75. package/assets/get-ecosystem-wallet-info-BxqcPq0B.js +1 -0
  76. package/assets/{getBalance-CthDORPr.js → getBalance-D4riIp1B.js} +2 -2
  77. package/assets/{getInstalledModules-Cox2YDyF.js → getInstalledModules-DbNUTCf0.js} +1 -1
  78. package/assets/{getNFT-Bjg_w6DD.js → getNFT-BZdDzwN-.js} +2 -2
  79. package/assets/getNFT-D06wHDW0.js +1 -0
  80. package/assets/{getThemeProps-B7lAOokG.js → getThemeProps-_DRrmPGx.js} +1 -1
  81. package/assets/{grid.styles-BWHADUFG.js → grid.styles-Cw26IyBx.js} +1 -1
  82. package/assets/{hashTypedData-D3KNbXgE.js → hashTypedData-4FQ0aWPB.js} +1 -1
  83. package/assets/{hashTypedData-BXeSV9EI.js → hashTypedData-DjUej2SL.js} +1 -1
  84. package/assets/{import-C0ulsb8r.js → import-BDu1boR-.js} +1 -1
  85. package/assets/{in-app-8FmH0RQh.js → in-app-BS6ANRK_.js} +1 -1
  86. package/assets/{in-app-wallet-calls-BFluJbdo.js → in-app-wallet-calls-DISlGB0f.js} +1 -1
  87. package/assets/{index-CFTDHoZh.js → index-798yU1Mw.js} +1 -1
  88. package/assets/{index-C1OJ-tO9.js → index-Am_UuYtn.js} +1 -1
  89. package/assets/{index-CDf3efkp.js → index-B-BkGVd_.js} +2 -2
  90. package/assets/{index-DLXZ5p81.js → index-B25RdNLD.js} +1 -1
  91. package/assets/{index-DoxTF6om.js → index-B4kPBdQm.js} +1 -1
  92. package/assets/{index-cZ6tjlq1.js → index-BDJa77HS.js} +1 -1
  93. package/assets/{index-IwNV31qY.js → index-BJvvuyHt.js} +1 -1
  94. package/assets/{index-DH1wbhHD.js → index-BQEI0eWt.js} +1 -1
  95. package/assets/{index-3AqvKhGz.js → index-BQgkgQ46.js} +1 -1
  96. package/assets/{index-12wxaJ06.js → index-BSGQxCOa.js} +1 -1
  97. package/assets/{index-BUxWfTma.js → index-BX3lLNL7.js} +1 -1
  98. package/assets/{index-Bsc1WoyD.js → index-BoRS8U2O.js} +1 -1
  99. package/assets/{index-C7NK0fVJ.js → index-BqbJpa0j.js} +1 -1
  100. package/assets/{index-C76nP1O6.js → index-BuvFoyTD.js} +1 -1
  101. package/assets/{index-JCA7K3yc.js → index-BxLxzt3o.js} +1 -1
  102. package/assets/{index-DuM4noYk.js → index-BzdD6V6H.js} +1 -1
  103. package/assets/{index-CnNIEazo.js → index-C1Asz4E8.js} +1 -1
  104. package/assets/{index-BWWTHnLr.js → index-C7XgriCO.js} +1 -1
  105. package/assets/{index-CBA5ujss.js → index-C8dqc2e-.js} +1 -1
  106. package/assets/{index-DN4XOFSE.js → index-CCfTPrm0.js} +1 -1
  107. package/assets/{index-DNViA462.js → index-CDthvVRG.js} +1 -1
  108. package/assets/{index-CUCrSrys.js → index-CLqMYMp_.js} +1 -1
  109. package/assets/{index-BEgz8ixE.js → index-CLrPXCJt.js} +1 -1
  110. package/assets/{index-BO_zSTNJ.js → index-CWWazwi9.js} +1 -1
  111. package/assets/{index-DV8kBwEP.js → index-C_NJ5W3Q.js} +1 -1
  112. package/assets/{index-C29PIOfp.js → index-C_q9eRuG.js} +1 -1
  113. package/assets/{index-D8AjAhj_.js → index-CbCySxiP.js} +1 -1
  114. package/assets/{index-C2y7hJrh.js → index-CeV-QjPU.js} +1 -1
  115. package/assets/{index-VW-lnGw2.js → index-Cg7CPUHg.js} +1 -1
  116. package/assets/{index-cfvsnH5y.js → index-CpLfF_C5.js} +1 -1
  117. package/assets/{index-Bhux6d7O.js → index-CtOaoAtu.js} +1 -1
  118. package/assets/{index-CyJEkuRi.js → index-CwklEm59.js} +1 -1
  119. package/assets/{index-BD3ZPd_8.js → index-D19PQguq.js} +1 -1
  120. package/assets/{index-CyiPWf5n.js → index-D8oxVq2h.js} +1 -1
  121. package/assets/{index-Bycb_NiK.js → index-DGHjUc9b.js} +2 -2
  122. package/assets/{index-M0lk4EtX.js → index-DGZgLX5H.js} +1 -1
  123. package/assets/{index-DMlCumM5.js → index-DLR5U5u7.js} +1 -1
  124. package/assets/{index-ce0Tcydb.js → index-DMKlwtPQ.js} +3 -3
  125. package/assets/{index-C4j5Yt0J.js → index-DN_GgU69.js} +1 -1
  126. package/assets/{index-B6O6tYQ5.js → index-DO6Qu3WW.js} +3 -3
  127. package/assets/{index-C80znnDW.js → index-DOjpmFkl.js} +1 -1
  128. package/assets/{index-Brd7ji4Z.js → index-DQ6JWiqD.js} +552 -463
  129. package/assets/{index-rLHhvU40.js → index-DSiEomXM.js} +2 -2
  130. package/assets/{index-CAnUnOx3.js → index-DTDCTp2g.js} +1 -1
  131. package/assets/{index-DX3DHT9n.js → index-DVuMdLqo.js} +1 -1
  132. package/assets/index-DbLpdy-5.js +1 -0
  133. package/assets/{index-D3kilUkp.js → index-DbPcoBNe.js} +1 -1
  134. package/assets/{index-PPPdjER1.js → index-DgrIRrjH.js} +3 -3
  135. package/assets/{index-CgvLEwoy.js → index-Dh0Sv0e8.js} +1 -1
  136. package/assets/{index-pYqFSwbF.js → index-DoKViOPe.js} +2 -2
  137. package/assets/{index-Cjb2XrcZ.js → index-LJjUqlEi.js} +1 -1
  138. package/assets/{index-Dig_dNhS.js → index-M7UEwjGY.js} +1 -1
  139. package/assets/{index-CUa9_lhM.js → index-OMa8Tj-T.js} +1 -1
  140. package/assets/{index-9-Neoanw.js → index-T2XOIIOd.js} +1 -1
  141. package/assets/{index-CuZV-f-I.js → index-_c5LJlQE.js} +1 -1
  142. package/assets/{index-DdfWi7TC.js → index-d7uAVQJc.js} +1 -1
  143. package/assets/{index-DkOjkCdA.js → index-eFPFED8d.js} +1 -1
  144. package/assets/{index-CMZZ1Nga.js → index-eefVCnI5.js} +1 -1
  145. package/assets/{index-Cq2ACCOS.js → index-gugejC0m.js} +1 -1
  146. package/assets/{index-B17_4zRY.js → index-tvUXHAjm.js} +1 -1
  147. package/assets/{index-DwMtnb8J.js → index-vHUJJrBU.js} +1 -1
  148. package/assets/{index-kLxn63lr.js → index-w01WQ1OT.js} +1 -1
  149. package/assets/{index-CnxZGgAx.js → index-zwRq9h0X.js} +1 -1
  150. package/assets/{index.es-CO16vBVD.js → index.es-B7o2FOqd.js} +1 -1
  151. package/assets/{index.es-BTrwCm6j.js → index.es-DF0fPg1w.js} +1 -1
  152. package/assets/{index.es-ZvhCWtmg.js → index.es-DwC36uQk.js} +4 -4
  153. package/assets/{linkAccount-D6C-iWP9.js → linkAccount-BtAQZlYa.js} +1 -1
  154. package/assets/{localBatchGatewayRequest-D0lgdcRM.js → localBatchGatewayRequest-CMQNhumX.js} +1 -1
  155. package/assets/{mana-convert-BSx_Udpc.js → mana-convert-DVF4taBh.js} +1 -1
  156. package/assets/{mana-rate-BZhaJjml.js → mana-rate-DghhfRg4.js} +1 -1
  157. package/assets/{native-DzURTJjQ.js → native-CPZ4GKee.js} +1 -1
  158. package/assets/{networks-DPBJRt6B.js → networks-CTtxcDaZ.js} +1 -1
  159. package/assets/{onramp-D-V8FIFR.js → onramp-DH1m5q3Z.js} +1 -1
  160. package/assets/{openzeppelin-B7Q08QJ0.js → openzeppelin-C43jcpbd.js} +1 -1
  161. package/assets/{ownerOf-6qjJmcwz.js → ownerOf-DmpjD1-R.js} +1 -1
  162. package/assets/{parseNft-CZxwd5ZF.js → parseNft-DfOGe9m5.js} +2 -2
  163. package/assets/{parseSignature-3qwrNvoW.js → parseSignature-DikUb694.js} +1 -1
  164. package/assets/{parseSignature-CtyJ-6L0.js → parseSignature-aw_zZz28.js} +3 -3
  165. package/assets/{passkeys-Cj0tHoDP.js → passkeys-nBMLF2xb.js} +1 -1
  166. package/assets/{pay-with-exchange-B3f1_w5e.js → pay-with-exchange-BvzhQXq9.js} +1 -1
  167. package/assets/{prepare-contract-call-ydWcAfZ2.js → prepare-contract-call-DDzIRXLv.js} +1 -1
  168. package/assets/{qr-overlay-DWPthnKn.js → qr-overlay-DraTWZGb.js} +3 -3
  169. package/assets/{react-CDiFgvN_.js → react-BYHuwl8r.js} +1 -1
  170. package/assets/{receive-CsXmvAKt.js → receive-4VdJwQ5p.js} +1 -1
  171. package/assets/{resolveImplementation-BOT-NVc7.js → resolveImplementation-BeIaeyw0.js} +1 -1
  172. package/assets/{rpc-DSWXzB82.js → rpc-BBuy0siA.js} +1 -1
  173. package/assets/{secp256k1-ByXzWbcW.js → secp256k1-BB8knln0.js} +1 -1
  174. package/assets/{secp256k1-BaOo-or_.js → secp256k1-CNxo_fPH.js} +1 -1
  175. package/assets/{secp256k1-uUJiV589.js → secp256k1-vpgDrCPF.js} +1 -1
  176. package/assets/{send-C05YEc1T.js → send-DVC7onZT.js} +1 -1
  177. package/assets/{send-batch-transaction-Be0wAoEe.js → send-batch-transaction-98lAmXJd.js} +1 -1
  178. package/assets/{send-eip712-transaction-BJNkYYKf.js → send-eip712-transaction-Eg93axAQ.js} +2 -2
  179. package/assets/send-gasless-transaction-B7IHL-9x.js +2 -0
  180. package/assets/{send-transaction-Bes27L5G.js → send-transaction-DIVDHo0b.js} +2 -2
  181. package/assets/{sendMetaTransaction-CDDozl0u.js → sendMetaTransaction-BjStTgy8.js} +1 -1
  182. package/assets/{sendRawTransaction-CaQYbFlQ.js → sendRawTransaction-C0hCcwaF.js} +3 -3
  183. package/assets/{sentry-DGsLxYkt.js → sentry-Dx-KuLV3.js} +1 -1
  184. package/assets/{serializeTransaction-DLXlE_fY.js → serializeTransaction-CTD81sCU.js} +1 -1
  185. package/assets/{session-proposal-269TY8JU.js → session-proposal-BqbaK0vH.js} +1 -1
  186. package/assets/{session-request-DxaePUXl.js → session-request-DQi229nq.js} +2 -2
  187. package/assets/{sha256-BkM0tz1g.js → sha256-CfLwtdyC.js} +1 -1
  188. package/assets/{signing-ZKf523YR.js → signing-C-hS2sII.js} +3 -3
  189. package/assets/{socials-JFjng574.js → socials-CBTjIC0C.js} +1 -1
  190. package/assets/{swaps-Cq3Wdoki.js → swaps-BMaKKFJL.js} +1 -1
  191. package/assets/{thirdweb-BNmNZhah.js → thirdweb-gVaYX1Nm.js} +3 -3
  192. package/assets/{to-serializable-transaction-PJm0PzIG.js → to-serializable-transaction-BRT7Q8xs.js} +2 -2
  193. package/assets/{totalSupply-C71_H-lN.js → totalSupply-DRNaCAzP.js} +1 -1
  194. package/assets/{trade-encoding-BmLGOyo-.js → trade-encoding-BTpnbAqu.js} +1 -1
  195. package/assets/{transaction-DLOHYmaw.js → transaction-Col-q-Ce.js} +1 -1
  196. package/assets/{transactionReceipt-CSJT-pKm.js → transactionReceipt-DKKCsI26.js} +1 -1
  197. package/assets/{transactions-DDewGRUS.js → transactions-CadGL-lV.js} +1 -1
  198. package/assets/{useCreditPacks-Bqe9pTXx.js → useCreditPacks-B4TLB8Ir.js} +1 -1
  199. package/assets/{useInfiniteGrid-C1qvdQfd.js → useInfiniteGrid-C6HwGwYR.js} +1 -1
  200. package/assets/useManaRate-iYCZTzak.js +1 -0
  201. package/assets/{useSecondarySales-CVaNw0md.js → useSecondarySales-BTqJsuhI.js} +1 -1
  202. package/assets/{useStore-oZmFLyam.js → useStore-BzU6Jh1o.js} +2 -2
  203. package/assets/useTheme-BoNwKDMf.js +1 -0
  204. package/assets/{utils-a6twR_kC.js → utils-BQF5MiO5.js} +1 -1
  205. package/assets/{verifyHash-BPxoGPRB.js → verifyHash-u7AIFmcv.js} +1 -1
  206. package/assets/{w3m-modal-BKND42Yg.js → w3m-modal-D-H2XJii.js} +1 -1
  207. package/assets/{w3m-modal-B7e4dFsC.js → w3m-modal-pEA1kWyU.js} +1 -1
  208. package/assets/{wait-for-tx-receipt-Dkm_Ycmc.js → wait-for-tx-receipt-h9USNCLV.js} +1 -1
  209. package/assets/{wallets-Dcnx0DBg.js → wallets-BwDMgJZD.js} +5 -5
  210. package/assets/{web-connector-B41jHtWN.js → web-connector-CPZEHhv9.js} +3 -3
  211. package/assets/{writeContract-BBk0XlYd.js → writeContract-D2343X96.js} +1 -1
  212. package/assets/{zora-sepolia-o_iB8zm8.js → zora-sepolia-5SAdD430.js} +1 -1
  213. package/assets/{zoraTestnet-AMJQiMJL.js → zoraTestnet-C10IoprX.js} +1 -1
  214. package/index.html +11 -11
  215. package/package.json +2 -2
  216. package/assets/Creator-BPKqpaQ0.js +0 -283
  217. package/assets/browser-ponyfill-U6QFC0pq.js +0 -1
  218. package/assets/decimals-2E8lbkVo.js +0 -1
  219. package/assets/estimate-l1-fee-DKfVBk0L.js +0 -1
  220. package/assets/eth_estimateGas-CYhr9GQg.js +0 -1
  221. package/assets/eth_getTransactionCount-ZhW4UX5p.js +0 -1
  222. package/assets/get-ecosystem-wallet-info-B_lrKX-x.js +0 -1
  223. package/assets/getNFT-BTjqjEEe.js +0 -1
  224. package/assets/index-867E6STW.js +0 -1
  225. package/assets/send-gasless-transaction-ytRd_Rwn.js +0 -2
  226. package/assets/useManaRate-LgUHZXYp.js +0 -1
  227. package/assets/useTheme-1sGnebNp.js +0 -1
@@ -0,0 +1,306 @@
1
+ import{b as Y,j as e,L as ue,d as fe,u as be,r as y}from"./react-BYHuwl8r.js";import{t as Z,aw as we,ax as R,ay as _,s as a,az as je,F as ve,aA as Ce,d as t,aB as W,B as ye,G as q,ad as J,m as $e,ae as Q,I as T,c as ke,l as Ne,S,e as Pe,A as Se,av as Le,aC as Ae}from"./index-DQ6JWiqD.js";import{d as Me,g as ze,a as Fe,P as Be,C as Ee,b as Ie,c as Re,A as _e,B as We,S as Te,M as Ge,e as He,f as Ue}from"./browseLayout.styles-oJ6cJp3z.js";import{u as De,L as Ke}from"./useStore-BzU6Jh1o.js";import{c as G,a as Oe,F as Ve,d as Ye,P as Ze,e as qe,H as Je,S as Qe}from"./categories-5tCT8xWh.js";import{L as H}from"./LoadMore-C4ahcKGI.js";import{u as U}from"./useInfiniteGrid-C6HwGwYR.js";import{E as D}from"./ErrorNotice-CCmfdXO-.js";import{G as K}from"./grid.styles-Cw26IyBx.js";import"./sentry-Dx-KuLV3.js";import"./dcl-schemas-BICTSpB5.js";import"./ethers--abqWJu6.js";import"./intl-CBcMB1D2.js";const{colors:m,radius:X,media:Xe}=Z,et=a.article`
2
+ height: 300px;
3
+ background: ${m.bg};
4
+ border-radius: ${X.card};
5
+ overflow: hidden;
6
+ position: relative;
7
+ isolation: isolate;
8
+ display: flex;
9
+ flex-direction: column;
10
+ cursor: pointer;
11
+ transition: box-shadow 0.15s ease;
12
+
13
+ &::after {
14
+ ${we};
15
+ }
16
+
17
+ &:focus-visible {
18
+ ${R};
19
+ }
20
+ &:focus-visible::after {
21
+ ${_};
22
+ }
23
+
24
+ // The swap is a pointer affordance only: keyboard focus must not hide the creator row, whose profile
25
+ // link is focusable (visibility: hidden would drop it from the tab order). Enter/Space on the card
26
+ // already opens the collection.
27
+ @media (hover: hover) {
28
+ &:hover {
29
+ ${R};
30
+ }
31
+ &:hover::after {
32
+ ${_};
33
+ }
34
+ &:hover [data-view] {
35
+ visibility: visible;
36
+ }
37
+ &:hover [data-meta] {
38
+ visibility: hidden;
39
+ }
40
+ }
41
+ `,tt=a.div`
42
+ position: relative;
43
+ flex: 1;
44
+ min-height: 0;
45
+ background: ${m.media};
46
+ overflow: hidden;
47
+ `,it=a.img`
48
+ width: 100%;
49
+ height: 100%;
50
+ object-fit: cover;
51
+ display: block;
52
+ `,ot=a(je)`
53
+ & [data-testid='coll-thumb-cell'] img {
54
+ object-fit: contain;
55
+ padding: 10px;
56
+ }
57
+ `,at=a.div`
58
+ flex: 0 0 102px;
59
+ height: 102px;
60
+ padding: 12px 14px;
61
+ display: flex;
62
+ flex-direction: column;
63
+ gap: 8px;
64
+ `,rt=a.h3`
65
+ margin: 0;
66
+ font-weight: 700;
67
+ font-size: 18px;
68
+ line-height: 1.3;
69
+ color: ${m.text};
70
+ white-space: nowrap;
71
+ overflow: hidden;
72
+ text-overflow: ellipsis;
73
+
74
+ ${Xe.maxWidth("mobile")} {
75
+ font-size: 16px;
76
+ }
77
+ `,st=a.div`
78
+ flex: 1;
79
+ min-height: 0;
80
+ display: grid;
81
+ grid-template-areas: 'stack';
82
+ align-items: center;
83
+
84
+ & > * {
85
+ grid-area: stack;
86
+ }
87
+ `,nt=a.div`
88
+ display: flex;
89
+ align-items: center;
90
+ justify-content: space-between;
91
+ gap: 10px;
92
+ `,ct=a(ve)`
93
+ min-width: 0;
94
+ color: ${m.muted};
95
+
96
+ & [data-avatar] {
97
+ width: 24px;
98
+ height: 24px;
99
+ }
100
+ & [data-testid='creator-name'] {
101
+ font-size: 14px;
102
+ }
103
+ & [data-testid='creator-display'] {
104
+ color: ${m.dclRed};
105
+ font-weight: 700;
106
+ }
107
+ `,lt=a.span`
108
+ min-width: 0;
109
+ `,dt=a.span`
110
+ flex: none;
111
+ color: ${m.text};
112
+ font-weight: 600;
113
+ font-size: 14px;
114
+ white-space: nowrap;
115
+ `,ht=a.button`
116
+ visibility: hidden;
117
+ width: 100%;
118
+ height: 44px;
119
+ display: flex;
120
+ align-items: center;
121
+ justify-content: center;
122
+ background: ${m.accent};
123
+ color: ${m.softWhite};
124
+ border: 0;
125
+ border-radius: ${X.btn};
126
+ font-weight: 700;
127
+ font-size: 13px;
128
+ text-transform: uppercase;
129
+ letter-spacing: 0.046em;
130
+ transition: background 0.15s ease;
131
+
132
+ &:hover {
133
+ background: ${m.accentHover};
134
+ }
135
+ &:active {
136
+ background: ${m.accentActive};
137
+ }
138
+ `;function xt({collection:r,cover:i,itemCount:s}){const l=Y(),{contractAddress:x,name:u,creator:f}=r,C=i==null||s==null,{data:d}=Ce(x,C),w=i==null?(d==null?void 0:d.items)??[]:[],g=s??(d==null?void 0:d.total);function b(){l(`/collection/${x}`)}return e.jsxs(et,{"data-testid":"coll-card",role:"link",tabIndex:0,onClick:b,onKeyDown:h=>{(h.key==="Enter"||h.key===" ")&&(h.preventDefault(),b())},children:[e.jsx(tt,{children:i?e.jsx(it,{"data-testid":"coll-card-img",src:i,alt:"",loading:"lazy"}):w.length>0?e.jsx(ot,{items:w,tinted:!1}):null}),e.jsxs(at,{children:[e.jsx(rt,{title:u,children:u}),e.jsxs(st,{children:[e.jsxs(nt,{"data-meta":!0,"data-testid":"coll-card-meta",children:[f?e.jsx(ct,{address:f,linkToProfile:!0}):e.jsx(lt,{children:" "}),e.jsx(dt,{children:g==null?"…":t("collectionCard.itemCount",{count:g})})]}),e.jsx(ht,{"data-view":!0,"data-testid":"coll-card-view",onClick:h=>{h.stopPropagation(),b()},tabIndex:-1,children:t("collectionCard.viewCollection")})]})]})]})}function pt({address:r,className:i=""}){const s=W(x=>x.followed.includes(r.toLowerCase())),l=W(x=>x.toggle);return r?e.jsx(ye,{type:"button",size:"sm",variant:s?"ghost":"outline",className:i||void 0,"aria-pressed":s,title:s?t("creator.unfollowTitle"):t("creator.followTitle"),onClick:()=>l(r),children:s?t("creator.following"):t("creator.follow")}):null}const{colors:v,radius:ee,media:j}=Z,te=q`
139
+ display: inline-flex;
140
+ align-items: center;
141
+ justify-content: center;
142
+ height: 44px;
143
+ padding: 0 28px;
144
+ border: 2px solid ${v.white};
145
+ border-radius: ${ee.btn};
146
+ background: transparent;
147
+ color: ${v.white};
148
+ font-weight: 600;
149
+ font-size: 13px;
150
+ text-transform: uppercase;
151
+ letter-spacing: 0.046em;
152
+ text-decoration: none;
153
+ `,gt=a.section`
154
+ position: relative;
155
+ border-radius: ${ee.card};
156
+ overflow: hidden;
157
+ margin-bottom: 24px;
158
+ min-height: 360px;
159
+ display: flex;
160
+ align-items: center;
161
+ justify-content: center;
162
+
163
+ && .creator-hero__follow {
164
+ ${te};
165
+ }
166
+ && .creator-hero__follow:hover:not(:disabled) {
167
+ background: rgba(255, 255, 255, 0.14);
168
+ }
169
+
170
+ ${j.maxWidth("mobile")} {
171
+ min-height: 260px;
172
+ }
173
+ `,mt=a.div`
174
+ position: absolute;
175
+ inset: 0;
176
+ z-index: 0;
177
+ `,ut=a.img`
178
+ width: 100%;
179
+ height: 100%;
180
+ object-fit: cover;
181
+ display: block;
182
+ `,ft=a.div`
183
+ position: absolute;
184
+ inset: 0;
185
+ background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0.55) 100%);
186
+ `,bt=a.div`
187
+ position: absolute;
188
+ top: 16px;
189
+ right: 16px;
190
+ z-index: 2;
191
+ display: flex;
192
+ align-items: center;
193
+ gap: 8px;
194
+
195
+ ${j.maxWidth("mobile")} {
196
+ top: 12px;
197
+ right: 12px;
198
+ gap: 6px;
199
+ }
200
+ `,ie=q`
201
+ display: flex;
202
+ align-items: center;
203
+ justify-content: center;
204
+ color: ${v.white};
205
+ transition: opacity 0.15s linear;
206
+
207
+ &:hover {
208
+ opacity: 0.8;
209
+ }
210
+ & .ico {
211
+ width: 36px;
212
+ height: 36px;
213
+ }
214
+ ${j.maxWidth("mobile")} {
215
+ & .ico {
216
+ width: 30px;
217
+ height: 30px;
218
+ }
219
+ }
220
+ `,wt=a.a`
221
+ ${ie};
222
+ `,jt=a(ue)`
223
+ ${ie};
224
+ width: 32px;
225
+ height: 32px;
226
+ border-radius: 50%;
227
+ border: 2px solid ${v.white};
228
+ transition: background-color 0.15s linear;
229
+
230
+ &:hover {
231
+ opacity: 1;
232
+ background: rgba(255, 255, 255, 0.24);
233
+ }
234
+ & .ico {
235
+ width: 16px;
236
+ height: 16px;
237
+ }
238
+ ${j.maxWidth("mobile")} {
239
+ width: 28px;
240
+ height: 28px;
241
+ & .ico {
242
+ width: 14px;
243
+ height: 14px;
244
+ }
245
+ }
246
+ `,vt=a.div`
247
+ position: relative;
248
+ z-index: 1;
249
+ display: flex;
250
+ flex-direction: column;
251
+ align-items: center;
252
+ text-align: center;
253
+ gap: 24px;
254
+ padding: 32px 20px;
255
+
256
+ ${j.maxWidth("mobile")} {
257
+ padding: 56px 16px 24px;
258
+ }
259
+ `,O=a.img`
260
+ display: block;
261
+ width: 112px;
262
+ height: 112px;
263
+ border-radius: 50%;
264
+ object-fit: cover;
265
+ border: 4px solid ${v.white};
266
+ box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
267
+ background: #ff4bed;
268
+
269
+ ${j.maxWidth("mobile")} {
270
+ width: 88px;
271
+ height: 88px;
272
+ }
273
+ `,Ct=a.h2`
274
+ margin: 0;
275
+ font-size: 18px;
276
+ font-weight: 700;
277
+ color: ${v.white};
278
+ line-height: 1.6;
279
+
280
+ ${j.maxWidth("mobile")} {
281
+ font-size: 16px;
282
+ }
283
+ `,yt=a.p`
284
+ margin: 0;
285
+ font-size: 15px;
286
+ color: ${v.white};
287
+ line-height: 1.6;
288
+ max-width: 520px;
289
+
290
+ ${j.maxWidth("mobile")} {
291
+ font-size: 14px;
292
+ }
293
+ `,$t=a.div`
294
+ display: flex;
295
+ align-items: center;
296
+ gap: 12px;
297
+ flex-wrap: wrap;
298
+ justify-content: center;
299
+ `,kt=a.a`
300
+ ${te};
301
+ transition: background 0.15s ease;
302
+
303
+ &:hover {
304
+ background: rgba(255, 255, 255, 0.14);
305
+ }
306
+ `,Nt={website:"website",twitter:"twitter",discord:"discord",facebook:"facebook"};function Pt({address:r}){var h,$;const{data:i}=J(r),{data:s}=De(r),l=$e(c=>{var k;return(k=c.session)==null?void 0:k.address}),x=!!l&&l.toLowerCase()===r.toLowerCase(),u=(i==null?void 0:i.name)||Q(r),f=($=(h=i==null?void 0:i.avatar)==null?void 0:h.snapshots)==null?void 0:$.face256,C=(s==null?void 0:s.cover)||Me,d=s==null?void 0:s.description,w=`${ke.profileUrl}/${r}`,g=Ke.filter(c=>s==null?void 0:s.links[c]),b=ze(Fe({name:i==null?void 0:i.name,hasClaimedName:i==null?void 0:i.hasClaimedName,ethAddress:(i==null?void 0:i.ethAddress)??r}));return e.jsxs(gt,{"aria-label":`${u} storefront`,children:[e.jsxs(mt,{children:[e.jsx(ut,{src:C,alt:"",loading:"eager"}),e.jsx(ft,{"aria-hidden":!0})]}),(g.length>0||x)&&e.jsxs(bt,{children:[g.map(c=>e.jsx(wt,{"data-testid":"creator-hero-link",href:(s==null?void 0:s.links[c])??"",target:"_blank",rel:"noopener noreferrer",title:t(`creator.link.${c}`),"aria-label":t(`creator.link.${c}`),children:e.jsx(T,{name:Nt[c]})},c)),x&&e.jsx(jt,{to:"/store-settings",title:t("creator.editStore"),"aria-label":t("creator.editStore"),children:e.jsx(T,{name:"pen"})})]}),e.jsxs(vt,{children:[f?e.jsx(O,{src:f,alt:"",loading:"eager",style:{backgroundColor:b}}):e.jsx(O,{as:"span","aria-hidden":!0,style:{backgroundColor:b}}),e.jsxs("div",{children:[e.jsx(Ct,{children:u}),d?e.jsx(yt,{children:d}):null]}),e.jsxs($t,{children:[e.jsx(kt,{"data-testid":"creator-hero-view",href:w,target:"_blank",rel:"noopener noreferrer",children:t("creator.viewProfile")}),e.jsx(pt,{address:r,className:"creator-hero__follow"})]})]})]})}const V=48;function Gt(){const{address:r}=fe(),i=Y(),[s]=be(),l=s.has("collections"),{data:x}=J(r),u=(x==null?void 0:x.name)||(r?Q(r):t("creator.fallbackName"));Ne({title:u,description:t("seo.creator.description",{name:u})});const[f,C]=y.useState("wearable"),[d,w]=y.useState(null),[g,b]=y.useState([]),[h,$]=y.useState(""),[c,k]=y.useState(""),[A,oe]=y.useState("newest"),M=h&&!Number.isNaN(Number(h))?Number(h):void 0,z=c&&!Number.isNaN(Number(c))?Number(c):void 0,ae=d?Qe[d]:void 0,re=(G.find(o=>o.key===A)??G[0]).server,F={creator:r,category:f,rarities:g.length?g:void 0,wearableCategories:ae,minPriceCredits:M,maxPriceCredits:z,sortBy:re},{items:N,total:se,isLoading:P,error:B,hasNextPage:ne,isFetchingNextPage:E,fetchNextPage:ce}=U(["creator-listings",F],o=>Le({...F,first:V,skip:o}),{enabled:!!r&&!l}),p=U(["creator-collections",r],o=>Ae(r,{first:V,skip:o}).then(n=>({items:n.collections,total:n.total})),{enabled:!!r&&l});function le(o){C(o),w(null),l&&I()}function I(){const o=new URLSearchParams(s);o.delete("collections");const n=o.toString();i({search:n?`?${n}`:""},{replace:!0})}function de(){if(l){I();return}const o=new URLSearchParams(s);o.delete("collections");const n=o.toString();i({search:n?`?${n}&collections`:"?collections"},{replace:!0})}function he(o){b(n=>n.includes(o)?n.filter(me=>me!==o):[...n,o])}function xe(){C("wearable"),w(null),b([]),$(""),k("")}const L=!!(M||z),pe=L?`${h||"0"}–${c||"∞"}`:t("filter.price"),ge=f!=="wearable"||!!d||g.length>0||L;return e.jsxs(Be,{children:[e.jsxs(Ee,{"aria-label":t("creator.breadcrumbAria"),children:[e.jsx(Ie,{onClick:()=>i("/assets"),children:t("creator.breadcrumb")}),e.jsx("span",{children:"/"}),e.jsx(Re,{children:u})]}),r?e.jsx(Pt,{address:r}):null,!l&&!P&&N.length>0?e.jsx(_e,{items:N,source:"creator"}):null,e.jsxs(We,{children:[e.jsx(Te,{children:e.jsx(Oe,{category:f,subCategory:d,onCategory:le,onSub:w,title:t("creator.category"),flat:!0,collections:l,onCollections:de})}),e.jsx(Ge,{children:l?e.jsxs(e.Fragment,{children:[e.jsx(He,{children:e.jsx(Ue,{children:p.isLoading?"…":t("creator.collectionsCount",{count:p.total})})}),p.error?e.jsx(D,{message:t("creator.error")}):null,e.jsx(K,{"data-variant":"collections",children:p.isLoading?e.jsx(S,{count:9}):e.jsxs(e.Fragment,{children:[p.items.map(o=>e.jsx(xt,{collection:o,itemCount:o.itemCount},o.contractAddress)),p.isFetchingNextPage?e.jsx(S,{count:6}):null]})}),e.jsx(H,{hasNextPage:p.hasNextPage,isFetching:p.isFetchingNextPage,onLoadMore:()=>void p.fetchNextPage()}),!p.isLoading&&!p.error&&p.items.length===0?e.jsx("p",{className:"muted",children:t("creator.collectionsEmpty")}):null]}):e.jsxs(e.Fragment,{children:[e.jsx(Ve,{rarities:g,onToggleRarity:he,sort:A,onSort:oe,total:se,loading:P,anyActive:ge,onClear:xe,renderTrailing:o=>e.jsx(Ye,{panelKey:"price",label:pe,active:L,panel:o,children:e.jsxs(Ze,{"data-variant":"price",children:[e.jsxs(qe,{children:[e.jsx("input",{type:"number",min:"0","aria-label":t("creator.priceMin"),placeholder:t("creator.priceMinPlaceholder"),value:h,onChange:n=>$(n.target.value)}),e.jsx("span",{children:"–"}),e.jsx("input",{type:"number",min:"0","aria-label":t("creator.priceMax"),placeholder:t("creator.priceMaxPlaceholder"),value:c,onChange:n=>k(n.target.value)})]}),e.jsx(Je,{children:t("creator.priceHint",{currency:Pe.name})})]})})}),B?e.jsx(D,{message:t("creator.error")}):null,e.jsx(K,{children:P?e.jsx(S,{count:15}):e.jsxs(e.Fragment,{children:[N.map(o=>e.jsx(Se,{item:o},o.id)),E?e.jsx(S,{count:6}):null]})}),e.jsx(H,{hasNextPage:ne,isFetching:E,onLoadMore:()=>void ce()}),!P&&!B&&N.length===0?e.jsx("p",{className:"muted",children:t("creator.empty")}):null]})})]})]})}export{Gt as Creator,Gt as default};
@@ -1,3 +1,3 @@
1
- import{g as M}from"./react-CDiFgvN_.js";import{r as O}from"./index-DLXZ5p81.js";import{r as _}from"./dcl-schemas-BICTSpB5.js";function C(u,w){for(var m=0;m<w.length;m++){const f=w[m];if(typeof f!="string"&&!Array.isArray(f)){for(const h in f)if(h!=="default"&&!(h in u)){const v=Object.getOwnPropertyDescriptor(f,h);v&&Object.defineProperty(u,h,v.get?v:{enumerable:!0,get:()=>f[h]})}}}return Object.freeze(Object.defineProperty(u,Symbol.toStringTag,{value:"Module"}))}var d={},F;function P(){if(F)return d;F=1,Object.defineProperty(d,"__esModule",{value:!0}),d.getHashesByKey=d.buildEntityWithoutNewFiles=d.buildEntity=d.buildEntityAndFile=void 0;const u=O(),w=_();async function m({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 l={version:"v3",type:n,pointers:t,timestamp:e,content:a,metadata:r};if(a){const s=new Set;for(const b of a){const E=b.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(b.file)} is repeated`);s.add(E)}}const c=new TextEncoder().encode(JSON.stringify(l)),o={id:await(0,u.hashV1)(c),...l};if(!w.Entity.validate(o))throw new Error(`Generated entity is not valid:
1
+ import{g as M}from"./react-BYHuwl8r.js";import{r as O}from"./index-B25RdNLD.js";import{r as _}from"./dcl-schemas-BICTSpB5.js";function C(u,w){for(var m=0;m<w.length;m++){const f=w[m];if(typeof f!="string"&&!Array.isArray(f)){for(const h in f)if(h!=="default"&&!(h in u)){const v=Object.getOwnPropertyDescriptor(f,h);v&&Object.defineProperty(u,h,v.get?v:{enumerable:!0,get:()=>f[h]})}}}return Object.freeze(Object.defineProperty(u,Symbol.toStringTag,{value:"Module"}))}var d={},F;function P(){if(F)return d;F=1,Object.defineProperty(d,"__esModule",{value:!0}),d.getHashesByKey=d.buildEntityWithoutNewFiles=d.buildEntity=d.buildEntityAndFile=void 0;const u=O(),w=_();async function m({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 l={version:"v3",type:n,pointers:t,timestamp:e,content:a,metadata:r};if(a){const s=new Set;for(const b of a){const E=b.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(b.file)} is repeated`);s.add(E)}}const c=new TextEncoder().encode(JSON.stringify(l)),o={id:await(0,u.hashV1)(c),...l};if(!w.Entity.validate(o))throw new Error(`Generated entity is not valid:
2
2
  `+((i=w.Entity.validate.errors)===null||i===void 0?void 0:i.map(s=>s.message).join(`
3
3
  `)));return{entity:o,entityFile:c}}d.buildEntityAndFile=m;async function f({type:n,pointers:t,files:e,metadata:a,timestamp:r}){const i=Array.from(e||[]).map(([o,s])=>({key:o,content:s})),l=await Promise.all(i.map(async({key:o,content:s})=>({key:o,content:s,hash:await(0,u.hashV1)(s)}))),c=new Map(l.map(({hash:o,key:s})=>[s,o])),y=new Map(l.map(({hash:o,content:s})=>[o,s]));return v(n,t,{hashesByKey:c,filesByHash:y,metadata:a,timestamp:r})}d.buildEntity=f;async function h(n,{contentUrl:t,type:e,pointers:a,hashesByKey:r,metadata:i,timestamp:l}){const c=r??i?p(i):void 0;if(c&&A(e,c)){const y=await D(n,t,c),o=await H(y,i);return f({type:e,pointers:a,files:y,metadata:o,timestamp:l})}return v(e,a,{hashesByKey:r,metadata:i,timestamp:l})}d.buildEntityWithoutNewFiles=h;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(([o,s])=>({file:o,hash:s})),i=e!=null&&e.timestamp?e==null?void 0:e.timestamp:Date.now(),{entity:l,entityFile:c}=await m({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(l.id,c),{files:y,entityId:l.id}}function A(n,t){return n===w.EntityType.PROFILE&&Array.from(t).some(([,e])=>e.toLowerCase().startsWith("qm"))}async function g(n,t){const a=await(await n.fetch(t)).arrayBuffer();return new Uint8Array(a)}async function D(n,t,e){const a=e.get("body.png"),r=e.get("face256.png"),i=new URL(`${t}/contents/${a}`).toString(),l=new URL(`${t}/contents/${r}`).toString(),[c,y]=await Promise.all([g(n,i),g(n,l)]);return new Map([["body.png",c],["face256.png",y]])}async function H(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,u.hashV1)(r));const i=n.get("body.png");return i&&(a.body=await(0,u.hashV1)(i)),e.avatar.snapshots=a,e})),t)}function p(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 d.getHashesByKey=p,d}var B=P();const N=M(B),I=C({__proto__:null,default:N},[B]);export{I as D};
@@ -1 +1 @@
1
- import{j as r}from"./react-CDiFgvN_.js";import{I as i}from"./index-Brd7ji4Z.js";function a({message:e,className:o,testId:t}){return e?r.jsxs("p",{className:o?`error-notice ${o}`:"error-notice","data-testid":t,role:"alert",children:[r.jsx(i,{name:"alert",className:"error-notice__ico",size:18}),r.jsx("span",{className:"error-notice__msg",children:e})]}):null}export{a as E};
1
+ import{j as r}from"./react-BYHuwl8r.js";import{I as i}from"./index-DQ6JWiqD.js";function a({message:e,className:o,testId:t}){return e?r.jsxs("p",{className:o?`error-notice ${o}`:"error-notice","data-testid":t,role:"alert",children:[r.jsx(i,{name:"alert",className:"error-notice__ico",size:18}),r.jsx("span",{className:"error-notice__msg",children:e})]}):null}export{a as E};
@@ -1 +1 @@
1
- import{C as l,E as w,b as E,S as A,d as k,O as U,N as P,g as f,B as x,e as N,i as I,p as L}from"./W3MFrameProviderSingleton-E3LZaKPB.js";import{g as T,a as W,f as b,b as _,c as v}from"./index-B6O6tYQ5.js";const D=0,C={paymentAsset:null,amount:null,tokenAmount:0,priceLoading:!1,error:null,exchanges:[],isLoading:!1,currentPayment:void 0,isPaymentInProgress:!1,paymentId:"",assets:[]},e=L(C),m={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=v(t),s=await m.getAssetsImageAndPrice(n),r=n.map(a=>{var c,o,p,y;const u=a.asset==="native"?f():`${a.network}:${a.asset}`,i=s.find(S=>{var g,d,h;return((h=(d=(g=S.fungibles)==null?void 0:g[0])==null?void 0:d.address)==null?void 0:h.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:(y=(p=i==null?void 0:i.fungibles)==null?void 0:p[0])==null?void 0:y.iconUrl}}});return e.assets=r,r},async getAssetsImageAndPrice(t){const n=t.map(r=>r.asset==="native"?f():`${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=P.bigNumber(e.amount??0).round(8),n=P.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=m.getTokenAmount())},setPaymentAsset(t){e.paymentAsset=t},isPayWithExchangeEnabled(){var t;return(t=U.state.remoteFeatures)==null?void 0:t.payWithExchange},isPayWithExchangeSupported(){return m.isPayWithExchangeEnabled()&&l.state.activeCaipNetwork&&k.PAY_WITH_EXCHANGE_SUPPORTED_CHAIN_NAMESPACES.includes(l.state.activeCaipNetwork.chainNamespace)},async fetchExchanges(){var t;try{const n=m.isPayWithExchangeSupported();if(!e.paymentAsset||!n){e.exchanges=[],e.isLoading=!1;return}e.isLoading=!0;const s=await _({page:D,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 A.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 W({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=l.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=E.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 m.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",A.showError(e.error)}},async waitUntilComplete({exchangeId:t,sessionId:n,paymentId:s,retries:r=20}){const a=await m.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)}),m.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 T({sessionId:n,exchangeId:t});if(e.currentPayment.status=o.status,o.status==="SUCCESS"||o.status==="FAILED"){const p=(r=l.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"?E.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:p||"",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{m as E};
1
+ import{C as l,E as w,b as E,S as A,d as k,O as U,N as P,g as f,B as x,e as N,i as I,p as L}from"./W3MFrameProviderSingleton-CTol_EUI.js";import{g as T,a as W,f as b,b as _,c as v}from"./index-DO6Qu3WW.js";const D=0,C={paymentAsset:null,amount:null,tokenAmount:0,priceLoading:!1,error:null,exchanges:[],isLoading:!1,currentPayment:void 0,isPaymentInProgress:!1,paymentId:"",assets:[]},e=L(C),m={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=v(t),s=await m.getAssetsImageAndPrice(n),r=n.map(a=>{var c,o,p,y;const u=a.asset==="native"?f():`${a.network}:${a.asset}`,i=s.find(S=>{var g,d,h;return((h=(d=(g=S.fungibles)==null?void 0:g[0])==null?void 0:d.address)==null?void 0:h.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:(y=(p=i==null?void 0:i.fungibles)==null?void 0:p[0])==null?void 0:y.iconUrl}}});return e.assets=r,r},async getAssetsImageAndPrice(t){const n=t.map(r=>r.asset==="native"?f():`${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=P.bigNumber(e.amount??0).round(8),n=P.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=m.getTokenAmount())},setPaymentAsset(t){e.paymentAsset=t},isPayWithExchangeEnabled(){var t;return(t=U.state.remoteFeatures)==null?void 0:t.payWithExchange},isPayWithExchangeSupported(){return m.isPayWithExchangeEnabled()&&l.state.activeCaipNetwork&&k.PAY_WITH_EXCHANGE_SUPPORTED_CHAIN_NAMESPACES.includes(l.state.activeCaipNetwork.chainNamespace)},async fetchExchanges(){var t;try{const n=m.isPayWithExchangeSupported();if(!e.paymentAsset||!n){e.exchanges=[],e.isLoading=!1;return}e.isLoading=!0;const s=await _({page:D,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 A.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 W({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=l.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=E.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 m.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",A.showError(e.error)}},async waitUntilComplete({exchangeId:t,sessionId:n,paymentId:s,retries:r=20}){const a=await m.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)}),m.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 T({sessionId:n,exchangeId:t});if(e.currentPayment.status=o.status,o.status==="SUCCESS"||o.status==="FAILED"){const p=(r=l.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"?E.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:p||"",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{m as E};
@@ -1,4 +1,4 @@
1
- import{b as pe,u as xe,r as l,j as t}from"./react-CDiFgvN_.js";import{s as i,t as e,w as E,l as ue,d as r,e as p,m as he,D as ge,an as g,al as fe,k as G,au as U,I as ee,y as te,aJ as me}from"./index-Brd7ji4Z.js";import{R as N}from"./resume-buy-Bf0zIH7y.js";import{u as be,p as we,R as ye,c as ke,i as Ce}from"./useCreditPacks-Bqe9pTXx.js";import{l as H}from"./loader-logo-BzY9EKdC.js";import"./sentry-DGsLxYkt.js";import"./dcl-schemas-BICTSpB5.js";import"./ethers-C3WgUna9.js";import"./intl-CBcMB1D2.js";import"./mana-convert-BSx_Udpc.js";const S="https://cdn.decentraland.org/@dcl/shop/0.1.0-30461849576.commit-12d07d4/assets/pack-coins-BDh1ZDbh.webp",ie="https://cdn.decentraland.org/@dcl/shop/0.1.0-30461849576.commit-12d07d4/assets/pack-stacks-D-V2jSHW.webp",re="https://cdn.decentraland.org/@dcl/shop/0.1.0-30461849576.commit-12d07d4/assets/pack-chest-BX_j84xW.webp",je="https://cdn.decentraland.org/@dcl/shop/0.1.0-30461849576.commit-12d07d4/assets/credit-coin-CmcTCd5i.webp",$e="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",ve="https://cdn.decentraland.org/@dcl/shop/0.1.0-30461849576.commit-12d07d4/assets/packs-backdrop-BcXiUPeP.webp",D="linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0)",Se=i.div`
1
+ import{b as pe,u as xe,r as l,j as t}from"./react-BYHuwl8r.js";import{s as i,t as e,w as E,l as ue,d as r,e as p,m as he,D as ge,an as g,al as fe,k as G,au as U,I as ee,y as te,aM as me}from"./index-DQ6JWiqD.js";import{R as N}from"./resume-buy-Bf0zIH7y.js";import{u as be,p as we,R as ye,c as ke,i as Ce}from"./useCreditPacks-B4TLB8Ir.js";import{l as H}from"./loader-logo-BzY9EKdC.js";import"./sentry-Dx-KuLV3.js";import"./dcl-schemas-BICTSpB5.js";import"./ethers--abqWJu6.js";import"./intl-CBcMB1D2.js";import"./mana-convert-DVF4taBh.js";const S="https://cdn.decentraland.org/@dcl/shop/0.1.0-30465483842.commit-35256d2/assets/pack-coins-BDh1ZDbh.webp",ie="https://cdn.decentraland.org/@dcl/shop/0.1.0-30465483842.commit-35256d2/assets/pack-stacks-D-V2jSHW.webp",re="https://cdn.decentraland.org/@dcl/shop/0.1.0-30465483842.commit-35256d2/assets/pack-chest-BX_j84xW.webp",je="https://cdn.decentraland.org/@dcl/shop/0.1.0-30465483842.commit-35256d2/assets/credit-coin-CmcTCd5i.webp",$e="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",ve="https://cdn.decentraland.org/@dcl/shop/0.1.0-30465483842.commit-35256d2/assets/packs-backdrop-BcXiUPeP.webp",D="linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0)",Se=i.div`
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  gap: 24px;
@@ -408,12 +408,12 @@ import{b as pe,u as xe,r as l,j as t}from"./react-CDiFgvN_.js";import{s as i,t a
408
408
  `,Qe=i(ne)`
409
409
  width: 72px;
410
410
  height: 72px;
411
- `,Je=i.div`
411
+ `,Ze=i.div`
412
412
  display: flex;
413
413
  flex-direction: column;
414
414
  align-items: center;
415
415
  gap: 8px;
416
- `,Ze=i.p`
416
+ `,Je=i.p`
417
417
  margin: 0;
418
418
  font-family: ${e.font.sans};
419
419
  font-size: 20px;
@@ -631,4 +631,4 @@ import{b as pe,u as xe,r as l,j as t}from"./react-CDiFgvN_.js";import{s as i,t a
631
631
  margin: 0;
632
632
  font-family: ${e.font.sans};
633
633
  color: ${e.colors.err};
634
- `,C=Ce()?"mock":"stripe",J=[S,S,ie,re],mt={pack_5:S,pack_10:S,pack_25:ie,pack_50:re};function se(a,s){return mt[a.id]??J[s%J.length]}function bt(a,s){return a.artUrl??se(a,s)}const wt="https://docs.decentraland.org";function Z(a){const s=a;if((s==null?void 0:s.name)==="AbortError")return r("getCredits.errorCanceled");const f=((s==null?void 0:s.message)??"").toLowerCase();return f.includes("sign in")?r("getCredits.errorSignIn",{currency:p.name}):f.includes("timed out")?r("getCredits.errorTimeout",{currency:p.name}):r("getCredits.errorGeneric")}function At(){var I;ue({title:r("nav.getCredits",{currency:p.name}),noindex:!0});const a=pe(),{session:s,signIn:f}=he(),d=ge(),[m,j]=xe(),{packs:b,isLoading:oe}=be(),[u,x]=l.useState("select"),[c,T]=l.useState(null),[$,F]=l.useState(null),ae=($!=null?(I=b.find(n=>n.credits===$))==null?void 0:I.artUrl:void 0)??je,[de,y]=l.useState(null),[ce,P]=l.useState(!1),R=l.useRef(null);l.useEffect(()=>()=>{var n;return(n=R.current)==null?void 0:n.abort()},[]);const L=l.useCallback(()=>{j(n=>{const o=new URLSearchParams(n);return o.delete("order"),o.delete("canceled"),o},{replace:!0})},[j]),_=l.useCallback(async n=>{x("processing");const o=new AbortController;R.current=o;try{const h=await we(n,{signal:o.signal,address:s==null?void 0:s.address,identity:s==null?void 0:s.identity});if(h.status==="credited"){const w=h.creditsGranted??(c==null?void 0:c.credits)??0;F(w>0?w:null),x("success"),g("Shop Completed Buy Credits",{order_id:n,pack_usd:(c==null?void 0:c.usd)??null,credits:w>0?w:null,provider:C}),d.invalidateQueries({queryKey:["usd-balance"]});try{if(sessionStorage.getItem(ye)){const v={resumeCheckout:!0,...w>0?{creditsAdded:w}:{}};a("/cart",{state:v});return}}catch{}try{const v=sessionStorage.getItem(N);if(v){sessionStorage.removeItem(N);const W=JSON.parse(v),M=fe(W);if(M){a(M,{state:{item:W,resumeBuy:!0}});return}}}catch{}}else h.status==="pending"?(g("Shop Buy Credits Pending",{step:"grant",pack_usd:(c==null?void 0:c.usd)??null}),d.invalidateQueries({queryKey:["usd-balance"]}),x("pending")):(g("Shop Buy Credits Failed",{step:"grant",error_code:"grant_failed",pack_usd:(c==null?void 0:c.usd)??null}),y(h.error??r("getCredits.errorGrant",{currency:p.name})),x("error"))}catch(h){G(h,{flow:"get_credits",step:"grant",order_id:n}),g("Shop Buy Credits Failed",{step:"grant",error_code:U(h),pack_usd:(c==null?void 0:c.usd)??null}),y(Z(h)),x("error")}},[c,s,d,a]),le=l.useCallback(async n=>{if(!s){f();return}y(null),P(!1),T(n),x(C==="mock"?"processing":"redirecting"),g("Shop Started Buy Credits",{pack_usd:n.usd,credits:n.credits,provider:C});try{const o=await ke(n.id,{address:s.address,identity:s.identity});if(o.mock)_(o.orderId);else if(o.url)g("Shop Redirected To Stripe",{order_id:o.orderId,pack_usd:n.usd,credits:n.credits}),window.location.href=o.url;else throw new Error("Checkout did not return a redirect url")}catch(o){G(o,{flow:"get_credits",step:"checkout",provider:C}),g("Shop Buy Credits Failed",{step:"checkout",error_code:U(o),pack_usd:n.usd}),y(Z(o)),x("error")}},[s,f,_]),z=l.useRef(!1);l.useEffect(()=>{if(z.current)return;const n=m.get("order");if(m.get("canceled")!=null){z.current=!0,g("Shop Buy Credits Cancelled",{order_id:n,provider:C}),L(),P(!0),x("select");return}n&&(x("processing"),s&&(z.current=!0,L(),_(n)))},[m,s]);function A(){var n;(n=R.current)==null||n.abort(),x("select"),T(null),F(null),y(null),P(!1)}return t.jsxs(Se,{children:[(u==="select"||u==="redirecting")&&t.jsxs(Pe,{"data-testid":"credits-hero",children:[t.jsx(Re,{"aria-hidden":!0}),t.jsxs(_e,{$hidden:u==="redirecting",children:[t.jsxs(ze,{children:[t.jsx(Ae,{children:r("getCredits.title",{currency:p.name})}),t.jsxs(Ee,{children:[t.jsx(Be,{children:r("getCredits.subtitle",{currency:p.nameSingular})}),t.jsxs(Te,{href:wt,target:"_blank",rel:"noreferrer",children:[r("getCredits.learnMore"),t.jsx(ee,{name:"link-out"})]})]})]}),ce&&t.jsx(Fe,{role:"status",children:r("getCredits.canceledNote")}),t.jsx(yt,{packs:b,loading:oe,onSelect:n=>void le(n)})]}),u==="redirecting"&&t.jsxs(Ye,{role:"status","aria-live":"polite",children:[t.jsx(Qe,{src:H,alt:"",width:72,height:72}),t.jsx(Ve,{children:r("getCredits.redirecting")})]})]}),u==="processing"&&t.jsxs(qe,{role:"status","aria-live":"polite",children:[t.jsx(ne,{src:H,alt:"",width:61,height:61}),t.jsxs(Je,{children:[t.jsxs(Ze,{children:[t.jsx("strong",{children:r("getCredits.processing")}),"…"]}),t.jsxs(et,{"aria-hidden":!0,children:[t.jsx(it,{children:t.jsx(rt,{})}),t.jsx(nt,{children:"1/1"})]})]})]}),u==="success"&&t.jsxs(st,{role:"status","aria-live":"polite",children:[t.jsxs(ot,{children:[t.jsx(at,{src:$e,alt:"",width:60,height:60}),t.jsxs(dt,{children:[t.jsx("strong",{children:r("getCredits.successTitle")})," ",r("getCredits.successBody",{currency:p.name})]})]}),$!=null&&t.jsx(ct,{children:t.jsxs(lt,{children:[t.jsx(pt,{src:ae,alt:"",width:93,height:93}),t.jsxs(xt,{children:[t.jsx(te,{}),t.jsxs("span",{children:[t.jsx(ut,{children:r("getCredits.creditsAmount",{credits:$,currency:p.name})})," ",t.jsx(ht,{children:r("getCredits.creditsAdded")})]})]})]})}),t.jsxs(gt,{children:[t.jsx(k,{"data-variant":"outline",onClick:A,children:r("getCredits.buyMore",{currency:p.name})}),t.jsx(k,{onClick:()=>a("/assets"),children:r("getCredits.startShopping")})]})]}),u==="pending"&&t.jsxs(X,{role:"status","aria-live":"polite",children:[t.jsx(q,{children:r("getCredits.pendingTitle",{currency:p.name})}),t.jsx(Oe,{children:r("getCredits.pendingBody")}),t.jsxs(Q,{children:[t.jsx(k,{onClick:()=>a("/assets"),children:r("getCredits.startShopping")}),t.jsx(k,{"data-variant":"outline",onClick:A,children:r("getCredits.done")})]})]}),u==="error"&&t.jsxs(X,{role:"alert",children:[t.jsx(q,{"data-tone":"error",children:r("getCredits.errorTitle")}),t.jsx(ft,{children:de}),t.jsx(Q,{children:t.jsx(k,{onClick:A,children:r("getCredits.tryAgain")})})]})]})}function yt({packs:a,loading:s,onSelect:f}){return s?t.jsx(K,{"aria-busy":"true","aria-label":r("getCredits.packsLoading",{currency:p.name}),children:[0,1,2,3].map(d=>t.jsxs(O,{as:"div","data-skeleton":"true","data-testid":"pack-skeleton","aria-hidden":!0,children:[t.jsxs(Y,{children:[t.jsx(V,{children:t.jsx(He,{})}),t.jsx(De,{})]}),t.jsx(Ke,{})]},d))}):t.jsx(K,{children:a.map((d,m)=>t.jsxs(O,{type:"button","data-testid":"pack","data-best":d.bestValue?"true":void 0,onClick:()=>f(d),"aria-label":r("getCredits.packAria",{amount:me(d.credits),usd:d.usd}),children:[d.bestValue&&t.jsxs(Le,{children:[t.jsx(ee,{name:"star-rounded"}),r("getCredits.packBadge")]}),t.jsxs(Y,{children:[t.jsxs(V,{children:[t.jsxs(Ie,{children:[t.jsx(te,{}),t.jsx(We,{children:d.credits})]}),t.jsx(Me,{children:r("getCredits.packUnit",{currency:p.name})})]}),t.jsx(Ge,{children:t.jsx("img",{src:bt(d,m),alt:"",loading:"lazy",width:507,height:507,onError:j=>{const b=j.currentTarget;b.dataset.artFallback||(b.dataset.artFallback="done",b.src=se(d,m))}})})]}),t.jsxs(Ue,{children:["$",d.usd.toFixed(2)]})]},d.id))})}export{At as GetCredits,At as default};
634
+ `,C=Ce()?"mock":"stripe",Z=[S,S,ie,re],mt={pack_5:S,pack_10:S,pack_25:ie,pack_50:re};function se(a,s){return mt[a.id]??Z[s%Z.length]}function bt(a,s){return a.artUrl??se(a,s)}const wt="https://docs.decentraland.org";function J(a){const s=a;if((s==null?void 0:s.name)==="AbortError")return r("getCredits.errorCanceled");const f=((s==null?void 0:s.message)??"").toLowerCase();return f.includes("sign in")?r("getCredits.errorSignIn",{currency:p.name}):f.includes("timed out")?r("getCredits.errorTimeout",{currency:p.name}):r("getCredits.errorGeneric")}function At(){var I;ue({title:r("nav.getCredits",{currency:p.name}),noindex:!0});const a=pe(),{session:s,signIn:f}=he(),d=ge(),[m,j]=xe(),{packs:b,isLoading:oe}=be(),[u,x]=l.useState("select"),[c,T]=l.useState(null),[$,F]=l.useState(null),ae=($!=null?(I=b.find(n=>n.credits===$))==null?void 0:I.artUrl:void 0)??je,[de,y]=l.useState(null),[ce,P]=l.useState(!1),R=l.useRef(null);l.useEffect(()=>()=>{var n;return(n=R.current)==null?void 0:n.abort()},[]);const L=l.useCallback(()=>{j(n=>{const o=new URLSearchParams(n);return o.delete("order"),o.delete("canceled"),o},{replace:!0})},[j]),_=l.useCallback(async n=>{x("processing");const o=new AbortController;R.current=o;try{const h=await we(n,{signal:o.signal,address:s==null?void 0:s.address,identity:s==null?void 0:s.identity});if(h.status==="credited"){const w=h.creditsGranted??(c==null?void 0:c.credits)??0;F(w>0?w:null),x("success"),g("Shop Completed Buy Credits",{order_id:n,pack_usd:(c==null?void 0:c.usd)??null,credits:w>0?w:null,provider:C}),d.invalidateQueries({queryKey:["usd-balance"]});try{if(sessionStorage.getItem(ye)){const v={resumeCheckout:!0,...w>0?{creditsAdded:w}:{}};a("/cart",{state:v});return}}catch{}try{const v=sessionStorage.getItem(N);if(v){sessionStorage.removeItem(N);const W=JSON.parse(v),M=fe(W);if(M){a(M,{state:{item:W,resumeBuy:!0}});return}}}catch{}}else h.status==="pending"?(g("Shop Buy Credits Pending",{step:"grant",pack_usd:(c==null?void 0:c.usd)??null}),d.invalidateQueries({queryKey:["usd-balance"]}),x("pending")):(g("Shop Buy Credits Failed",{step:"grant",error_code:"grant_failed",pack_usd:(c==null?void 0:c.usd)??null}),y(h.error??r("getCredits.errorGrant",{currency:p.name})),x("error"))}catch(h){G(h,{flow:"get_credits",step:"grant",order_id:n}),g("Shop Buy Credits Failed",{step:"grant",error_code:U(h),pack_usd:(c==null?void 0:c.usd)??null}),y(J(h)),x("error")}},[c,s,d,a]),le=l.useCallback(async n=>{if(!s){f();return}y(null),P(!1),T(n),x(C==="mock"?"processing":"redirecting"),g("Shop Started Buy Credits",{pack_usd:n.usd,credits:n.credits,provider:C});try{const o=await ke(n.id,{address:s.address,identity:s.identity});if(o.mock)_(o.orderId);else if(o.url)g("Shop Redirected To Stripe",{order_id:o.orderId,pack_usd:n.usd,credits:n.credits}),window.location.href=o.url;else throw new Error("Checkout did not return a redirect url")}catch(o){G(o,{flow:"get_credits",step:"checkout",provider:C}),g("Shop Buy Credits Failed",{step:"checkout",error_code:U(o),pack_usd:n.usd}),y(J(o)),x("error")}},[s,f,_]),z=l.useRef(!1);l.useEffect(()=>{if(z.current)return;const n=m.get("order");if(m.get("canceled")!=null){z.current=!0,g("Shop Buy Credits Cancelled",{order_id:n,provider:C}),L(),P(!0),x("select");return}n&&(x("processing"),s&&(z.current=!0,L(),_(n)))},[m,s]);function A(){var n;(n=R.current)==null||n.abort(),x("select"),T(null),F(null),y(null),P(!1)}return t.jsxs(Se,{children:[(u==="select"||u==="redirecting")&&t.jsxs(Pe,{"data-testid":"credits-hero",children:[t.jsx(Re,{"aria-hidden":!0}),t.jsxs(_e,{$hidden:u==="redirecting",children:[t.jsxs(ze,{children:[t.jsx(Ae,{children:r("getCredits.title",{currency:p.name})}),t.jsxs(Ee,{children:[t.jsx(Be,{children:r("getCredits.subtitle",{currency:p.nameSingular})}),t.jsxs(Te,{href:wt,target:"_blank",rel:"noreferrer",children:[r("getCredits.learnMore"),t.jsx(ee,{name:"link-out"})]})]})]}),ce&&t.jsx(Fe,{role:"status",children:r("getCredits.canceledNote")}),t.jsx(yt,{packs:b,loading:oe,onSelect:n=>void le(n)})]}),u==="redirecting"&&t.jsxs(Ye,{role:"status","aria-live":"polite",children:[t.jsx(Qe,{src:H,alt:"",width:72,height:72}),t.jsx(Ve,{children:r("getCredits.redirecting")})]})]}),u==="processing"&&t.jsxs(qe,{role:"status","aria-live":"polite",children:[t.jsx(ne,{src:H,alt:"",width:61,height:61}),t.jsxs(Ze,{children:[t.jsxs(Je,{children:[t.jsx("strong",{children:r("getCredits.processing")}),"…"]}),t.jsxs(et,{"aria-hidden":!0,children:[t.jsx(it,{children:t.jsx(rt,{})}),t.jsx(nt,{children:"1/1"})]})]})]}),u==="success"&&t.jsxs(st,{role:"status","aria-live":"polite",children:[t.jsxs(ot,{children:[t.jsx(at,{src:$e,alt:"",width:60,height:60}),t.jsxs(dt,{children:[t.jsx("strong",{children:r("getCredits.successTitle")})," ",r("getCredits.successBody",{currency:p.name})]})]}),$!=null&&t.jsx(ct,{children:t.jsxs(lt,{children:[t.jsx(pt,{src:ae,alt:"",width:93,height:93}),t.jsxs(xt,{children:[t.jsx(te,{}),t.jsxs("span",{children:[t.jsx(ut,{children:r("getCredits.creditsAmount",{credits:$,currency:p.name})})," ",t.jsx(ht,{children:r("getCredits.creditsAdded")})]})]})]})}),t.jsxs(gt,{children:[t.jsx(k,{"data-variant":"outline",onClick:A,children:r("getCredits.buyMore",{currency:p.name})}),t.jsx(k,{onClick:()=>a("/assets"),children:r("getCredits.startShopping")})]})]}),u==="pending"&&t.jsxs(X,{role:"status","aria-live":"polite",children:[t.jsx(q,{children:r("getCredits.pendingTitle",{currency:p.name})}),t.jsx(Oe,{children:r("getCredits.pendingBody")}),t.jsxs(Q,{children:[t.jsx(k,{onClick:()=>a("/assets"),children:r("getCredits.startShopping")}),t.jsx(k,{"data-variant":"outline",onClick:A,children:r("getCredits.done")})]})]}),u==="error"&&t.jsxs(X,{role:"alert",children:[t.jsx(q,{"data-tone":"error",children:r("getCredits.errorTitle")}),t.jsx(ft,{children:de}),t.jsx(Q,{children:t.jsx(k,{onClick:A,children:r("getCredits.tryAgain")})})]})]})}function yt({packs:a,loading:s,onSelect:f}){return s?t.jsx(K,{"aria-busy":"true","aria-label":r("getCredits.packsLoading",{currency:p.name}),children:[0,1,2,3].map(d=>t.jsxs(O,{as:"div","data-skeleton":"true","data-testid":"pack-skeleton","aria-hidden":!0,children:[t.jsxs(Y,{children:[t.jsx(V,{children:t.jsx(He,{})}),t.jsx(De,{})]}),t.jsx(Ke,{})]},d))}):t.jsx(K,{children:a.map((d,m)=>t.jsxs(O,{type:"button","data-testid":"pack","data-best":d.bestValue?"true":void 0,onClick:()=>f(d),"aria-label":r("getCredits.packAria",{amount:me(d.credits),usd:d.usd}),children:[d.bestValue&&t.jsxs(Le,{children:[t.jsx(ee,{name:"star-rounded"}),r("getCredits.packBadge")]}),t.jsxs(Y,{children:[t.jsxs(V,{children:[t.jsxs(Ie,{children:[t.jsx(te,{}),t.jsx(We,{children:d.credits})]}),t.jsx(Me,{children:r("getCredits.packUnit",{currency:p.name})})]}),t.jsx(Ge,{children:t.jsx("img",{src:bt(d,m),alt:"",loading:"lazy",width:507,height:507,onError:j=>{const b=j.currentTarget;b.dataset.artFallback||(b.dataset.artFallback="done",b.src=se(d,m))}})})]}),t.jsxs(Ue,{children:["$",d.usd.toFixed(2)]})]},d.id))})}export{At as GetCredits,At as default};
@@ -1,4 +1,4 @@
1
- import{i as f,b as h}from"./lit-element-B3y9oplH.js";import{n as m}from"./class-map-CxwNmq0D.js";import{c as p}from"./index-CFTDHoZh.js";import{d as g,r as v}from"./index-B6O6tYQ5.js";import{C as c}from"./ConstantsUtil-CJLq5-wb.js";import{R as $,O as u}from"./W3MFrameProviderSingleton-E3LZaKPB.js";import{au as y}from"./NetworkUtil-DrZx-6FF.js";const b=g`
1
+ import{i as f,b as h}from"./lit-element-B3y9oplH.js";import{n as m}from"./class-map-CxwNmq0D.js";import{c as p}from"./index-798yU1Mw.js";import{d as g,r as v}from"./index-DO6Qu3WW.js";import{C as c}from"./ConstantsUtil-CtukCvy7.js";import{R as $,O as u}from"./W3MFrameProviderSingleton-CTol_EUI.js";import{au as y}from"./NetworkUtil-DXqql1Wz.js";const b=g`
2
2
  :host {
3
3
  display: flex;
4
4
  justify-content: center;
@@ -1,4 +1,4 @@
1
- import{j as e,b as ee,r as h,L as te}from"./react-CDiFgvN_.js";import{t as S,s as t,w as ie,x as se,d as i,e as B,B as I,y as z,an as ne,aI as K,k as W,l as re,m as oe,D as ae,u as de,E as ce}from"./index-Brd7ji4Z.js";import{i as le,R as pe,f as ge}from"./import-C0ulsb8r.js";import{u as xe}from"./useSecondarySales-CVaNw0md.js";import"./sentry-DGsLxYkt.js";import"./dcl-schemas-BICTSpB5.js";import"./ethers-C3WgUna9.js";import"./intl-CBcMB1D2.js";import"./buy-F5h0O1Oz.js";import"./authorizations-wLlzXVR-.js";import"./sendMetaTransaction-CDDozl0u.js";import"./trade-encoding-BmLGOyo-.js";import"./mana-rate-BZhaJjml.js";import"./mana-convert-BSx_Udpc.js";function U({size:o=12,...j}){return e.jsx("svg",{viewBox:"0 0 20 20",width:o,height:o,fill:"none","aria-hidden":!0,focusable:"false",...j,children:e.jsx("path",{d:"M5 10.5l3 3 7-7.5",stroke:"#fff",strokeWidth:"2.4",strokeLinecap:"round",strokeLinejoin:"round"})})}const{colors:R,radius:me,z:ue}=S,he=ie`
1
+ import{j as e,b as ee,r as h,L as te}from"./react-BYHuwl8r.js";import{t as S,s as t,w as ie,x as se,d as i,e as B,B as L,y as z,an as ne,aL as K,k as W,l as re,m as oe,D as ae,u as de,E as ce}from"./index-DQ6JWiqD.js";import{i as le,R as pe,f as ge}from"./import-BDu1boR-.js";import{u as xe}from"./useSecondarySales-BTqJsuhI.js";import"./sentry-Dx-KuLV3.js";import"./dcl-schemas-BICTSpB5.js";import"./ethers--abqWJu6.js";import"./intl-CBcMB1D2.js";import"./buy-BYXdfz24.js";import"./authorizations-93IYCFGd.js";import"./sendMetaTransaction-BjStTgy8.js";import"./trade-encoding-BTpnbAqu.js";import"./mana-rate-DghhfRg4.js";import"./mana-convert-DVF4taBh.js";function U({size:o=12,...j}){return e.jsx("svg",{viewBox:"0 0 20 20",width:o,height:o,fill:"none","aria-hidden":!0,focusable:"false",...j,children:e.jsx("path",{d:"M5 10.5l3 3 7-7.5",stroke:"#fff",strokeWidth:"2.4",strokeLinecap:"round",strokeLinejoin:"round"})})}const{colors:R,radius:me,z:ue}=S,he=ie`
2
2
  0% {
3
3
  transform: scale(0);
4
4
  opacity: 0;
@@ -110,7 +110,7 @@ import{j as e,b as ee,r as h,L as te}from"./react-CDiFgvN_.js";import{t as S,s a
110
110
  &[data-status='failed'] {
111
111
  opacity: 0.6;
112
112
  }
113
- `,Ie=t.span`
113
+ `,Le=t.span`
114
114
  width: 34px;
115
115
  height: 34px;
116
116
  border-radius: ${je.btn};
@@ -124,7 +124,7 @@ import{j as e,b as ee,r as h,L as te}from"./react-CDiFgvN_.js";import{t as S,s a
124
124
  height: 100%;
125
125
  object-fit: contain;
126
126
  }
127
- `,Le=t.span`
127
+ `,Ie=t.span`
128
128
  font-weight: 600;
129
129
  font-size: 14px;
130
130
  white-space: nowrap;
@@ -165,7 +165,7 @@ import{j as e,b as ee,r as h,L as te}from"./react-CDiFgvN_.js";import{t as S,s a
165
165
  font-size: 12px;
166
166
  `,Ne=t.p`
167
167
  margin: 12px 0 0;
168
- `;function Be({queue:o,session:j,onClose:w,onDone:m}){const k=ee(),p=se(j.providerType),[g,b]=h.useState(()=>o.map(()=>"pending")),[A,Q]=h.useState("running"),v=h.useRef(!1);h.useEffect(()=>{if(v.current)return;v.current=!0;let n=!1;return(async()=>{for(let a=0;a<o.length;a++){if(n)return;b(x=>x.map((u,f)=>f===a?"active":u));try{await le(o[a].item,o[a].priceCredits,j),ne("Shop Migrated Listing",{item_id:o[a].item.itemId??o[a].item.oldTradeId??null,contract_address:o[a].item.contractAddress,new_price_credits:o[a].priceCredits,new_price_usd:K(o[a].priceCredits)}),n||b(x=>x.map((u,f)=>f===a?"done":u))}catch(x){if(x instanceof pe)W(x,{flow:"import_listing",step:"relist",itemId:o[a].item.itemId??o[a].item.oldTradeId}),n||b(u=>u.map((f,C)=>C===a?"unlisted":f));else{const u=x,f=u.code===4001||/reject|denied|cancel/i.test(u.message??"");f||W(x,{flow:"import_listing",itemId:o[a].item.itemId??o[a].item.oldTradeId}),n||b(C=>C.map((N,P)=>P===a?f?"skipped":"failed":N))}}}n||Q("finished")})(),()=>{n=!0}},[]);const $=g.filter(n=>n==="done").length,M=g.findIndex(n=>n==="active"),E=Math.round(g.filter(n=>n!=="pending"&&n!=="active").length/o.length*100);function L(){m(),w()}if(A==="finished"){const n=g.filter(a=>a==="skipped"||a==="failed").length,l=g.filter(a=>a==="unlisted").length;return e.jsx(H,{role:"presentation",children:e.jsxs(Z,{"data-success":!0,role:"dialog","aria-modal":"true",children:[e.jsx(be,{"aria-hidden":!0,children:e.jsx(U,{size:30})}),e.jsx(O,{children:$>0?i("migrate.successTitle"):i("migrate.nothingTitle")}),e.jsxs("p",{className:"muted",style:{margin:0},children:[$>0?i("migrate.listedSummary",{count:$,currency:B.name}):i("migrate.noneListed"),n>0?" "+i("migrate.skippedSummary",{count:n}):"",l>0?" "+i("migrate.unlistedSummary",{count:l}):""]}),e.jsxs(fe,{"data-actions":!0,children:[e.jsx(I,{variant:"ghost",onClick:L,children:i("getCredits.done")}),l>0?e.jsx(I,{variant:"purple",onClick:()=>{m(),w(),k("/my-assets")},children:i("migrate.goToMyAssets")}):$>0?e.jsx(I,{variant:"purple",onClick:()=>{m(),w(),k("/assets")},children:i("migrate.viewInShop")}):null]})]})})}return e.jsx(H,{role:"presentation",children:e.jsxs(we,{"data-testid":"modal",role:"dialog","aria-modal":"true","aria-live":"polite",children:[e.jsx(O,{children:i("migrate.listingTitle")}),e.jsxs("p",{className:"muted small",style:{margin:"0 0 4px"},children:[p?i("migrate.subConfirm"):i("migrate.subManaged")," ",M>=0?i("migrate.progressCount",{current:M+1,total:o.length}):""]}),e.jsx(ke,{children:e.jsx(ve,{style:{width:`${E}%`}})}),e.jsx($e,{children:o.map((n,l)=>e.jsxs(Se,{"data-status":g[l],children:[e.jsx(Ie,{children:n.item.thumbnail?e.jsx("img",{src:n.item.thumbnail,alt:""}):null}),e.jsx(Le,{title:n.item.name,children:n.item.name||i("migrate.itemFallback")}),e.jsxs(Ce,{children:[e.jsx(z,{className:"ccy-mark"})," ",n.priceCredits.toLocaleString()]}),e.jsx(Te,{children:g[l]==="active"?e.jsxs(e.Fragment,{children:[e.jsx(Me,{className:"spinner","aria-hidden":!0})," ",p?i("migrate.statusConfirm"):i("migrate.statusAdding")]}):g[l]==="done"?e.jsx(Ee,{children:e.jsx(U,{})}):g[l]==="skipped"?e.jsx(_,{children:i("migrate.statusSkipped")}):g[l]==="failed"?e.jsx(_,{children:i("migrate.statusFailed")}):g[l]==="unlisted"?e.jsx(_,{title:i("migrate.unlistedTooltip"),children:i("migrate.statusUnlisted")}):e.jsx(ze,{children:i("migrate.statusWaiting")})})]},n.item.oldTradeId))}),e.jsx(Ne,{className:"muted small",children:p?i("migrate.hintConfirm"):i("migrate.hintManaged")})]})})}const{colors:r,gradients:Re,radius:Ae}=S,D="@media (max-width: 620px)",G=t.div`
168
+ `;function Be({queue:o,session:j,onClose:w,onDone:m}){const k=ee(),p=se(j.providerType),[g,b]=h.useState(()=>o.map(()=>"pending")),[A,Q]=h.useState("running"),v=h.useRef(!1);h.useEffect(()=>{if(v.current)return;v.current=!0;let n=!1;return(async()=>{for(let a=0;a<o.length;a++){if(n)return;b(x=>x.map((u,f)=>f===a?"active":u));try{await le(o[a].item,o[a].priceCredits,j),ne("Shop Migrated Listing",{item_id:o[a].item.itemId??o[a].item.oldTradeId??null,contract_address:o[a].item.contractAddress,new_price_credits:o[a].priceCredits,new_price_usd:K(o[a].priceCredits)}),n||b(x=>x.map((u,f)=>f===a?"done":u))}catch(x){if(x instanceof pe)W(x,{flow:"import_listing",step:"relist",itemId:o[a].item.itemId??o[a].item.oldTradeId}),n||b(u=>u.map((f,C)=>C===a?"unlisted":f));else{const u=x,f=u.code===4001||/reject|denied|cancel/i.test(u.message??"");f||W(x,{flow:"import_listing",itemId:o[a].item.itemId??o[a].item.oldTradeId}),n||b(C=>C.map((N,P)=>P===a?f?"skipped":"failed":N))}}}n||Q("finished")})(),()=>{n=!0}},[]);const $=g.filter(n=>n==="done").length,M=g.findIndex(n=>n==="active"),E=Math.round(g.filter(n=>n!=="pending"&&n!=="active").length/o.length*100);function I(){m(),w()}if(A==="finished"){const n=g.filter(a=>a==="skipped"||a==="failed").length,l=g.filter(a=>a==="unlisted").length;return e.jsx(H,{role:"presentation",children:e.jsxs(Z,{"data-success":!0,role:"dialog","aria-modal":"true",children:[e.jsx(be,{"aria-hidden":!0,children:e.jsx(U,{size:30})}),e.jsx(O,{children:$>0?i("migrate.successTitle"):i("migrate.nothingTitle")}),e.jsxs("p",{className:"muted",style:{margin:0},children:[$>0?i("migrate.listedSummary",{count:$,currency:B.name}):i("migrate.noneListed"),n>0?" "+i("migrate.skippedSummary",{count:n}):"",l>0?" "+i("migrate.unlistedSummary",{count:l}):""]}),e.jsxs(fe,{"data-actions":!0,children:[e.jsx(L,{variant:"ghost",onClick:I,children:i("getCredits.done")}),l>0?e.jsx(L,{variant:"purple",onClick:()=>{m(),w(),k("/my-assets")},children:i("migrate.goToMyAssets")}):$>0?e.jsx(L,{variant:"purple",onClick:()=>{m(),w(),k("/assets")},children:i("migrate.viewInShop")}):null]})]})})}return e.jsx(H,{role:"presentation",children:e.jsxs(we,{"data-testid":"modal",role:"dialog","aria-modal":"true","aria-live":"polite",children:[e.jsx(O,{children:i("migrate.listingTitle")}),e.jsxs("p",{className:"muted small",style:{margin:"0 0 4px"},children:[p?i("migrate.subConfirm"):i("migrate.subManaged")," ",M>=0?i("migrate.progressCount",{current:M+1,total:o.length}):""]}),e.jsx(ke,{children:e.jsx(ve,{style:{width:`${E}%`}})}),e.jsx($e,{children:o.map((n,l)=>e.jsxs(Se,{"data-status":g[l],children:[e.jsx(Le,{children:n.item.thumbnail?e.jsx("img",{src:n.item.thumbnail,alt:""}):null}),e.jsx(Ie,{title:n.item.name,children:n.item.name||i("migrate.itemFallback")}),e.jsxs(Ce,{children:[e.jsx(z,{className:"ccy-mark"})," ",n.priceCredits.toLocaleString()]}),e.jsx(Te,{children:g[l]==="active"?e.jsxs(e.Fragment,{children:[e.jsx(Me,{className:"spinner","aria-hidden":!0})," ",p?i("migrate.statusConfirm"):i("migrate.statusAdding")]}):g[l]==="done"?e.jsx(Ee,{children:e.jsx(U,{})}):g[l]==="skipped"?e.jsx(_,{children:i("migrate.statusSkipped")}):g[l]==="failed"?e.jsx(_,{children:i("migrate.statusFailed")}):g[l]==="unlisted"?e.jsx(_,{title:i("migrate.unlistedTooltip"),children:i("migrate.statusUnlisted")}):e.jsx(ze,{children:i("migrate.statusWaiting")})})]},n.item.oldTradeId))}),e.jsx(Ne,{className:"muted small",children:p?i("migrate.hintConfirm"):i("migrate.hintManaged")})]})})}const{colors:r,gradients:Re,radius:Ae}=S,D="@media (max-width: 620px)",G=t.div`
169
169
  max-width: 520px;
170
170
  margin: 0 auto;
171
171
  text-align: center;
@@ -180,7 +180,7 @@ import{j as e,b as ee,r as h,L as te}from"./react-CDiFgvN_.js";import{t as S,s a
180
180
  font-size: 26px;
181
181
  font-weight: 800;
182
182
  margin: 4px 0 0;
183
- `,V=t(I)`
183
+ `,V=t(L)`
184
184
  margin-top: 10px;
185
185
  `,Qe=t.div`
186
186
  max-width: 860px;
@@ -396,7 +396,7 @@ import{j as e,b as ee,r as h,L as te}from"./react-CDiFgvN_.js";import{t as S,s a
396
396
  grid-column: 2 / 4;
397
397
  justify-content: flex-start;
398
398
  }
399
- `,at=t(I)`
399
+ `,at=t(L)`
400
400
  && {
401
401
  background: ${r.media};
402
402
  color: ${r.text2};
@@ -428,6 +428,6 @@ import{j as e,b as ee,r as h,L as te}from"./react-CDiFgvN_.js";import{t as S,s a
428
428
  color: ${r.muted};
429
429
  `,gt=t.span`
430
430
  flex: 1 1 auto;
431
- `,xt=t(I)`
431
+ `,xt=t(L)`
432
432
  padding: 13px 24px;
433
- `,mt=[{key:"creations",title:"importListings.creations.title",sub:"importListings.creations.sub"},{key:"owned",title:"importListings.owned.title",sub:"importListings.owned.sub",secondary:!0}];function Tt(){re({title:i("seo.import.title"),noindex:!0});const{session:o,signIn:j,restore:w}=oe(),m=ae(),k=o==null?void 0:o.address;h.useEffect(()=>{w()},[w]);const{data:p,isLoading:g}=de({queryKey:["importable",k],queryFn:()=>ge(k),enabled:!!k}),b=xe(),A=h.useMemo(()=>mt.filter(d=>!d.secondary||b),[b]),[Q,v]=h.useState({}),[$,M]=h.useState(new Set),[E,L]=h.useState(null),n=h.useMemo(()=>[...(p==null?void 0:p.creations)??[],...b?(p==null?void 0:p.owned)??[]:[]],[p,b]);h.useEffect(()=>{n.length&&v(d=>{const c={...d};for(const s of n)c[s.oldTradeId]==null&&(c[s.oldTradeId]=s.suggestedCredits);return c})},[n]);const l=d=>!$.has(d),a=d=>Q[d.oldTradeId]??d.suggestedCredits,x=n.filter(d=>l(d.oldTradeId)),u=x.reduce((d,c)=>d+a(c),0);function f(d,c){const s=c.replace(/[^\d]/g,"");v(T=>({...T,[d]:s===""?0:parseInt(s,10)}))}function C(d){M(c=>{const s=new Set(c);return s.has(d)?s.delete(d):s.add(d),s})}function N(d){return d.map(c=>({item:c,priceCredits:Math.max(1,a(c))}))}function P(){m.invalidateQueries({queryKey:["importable"]}),m.invalidateQueries({queryKey:["shop-items"]}),m.invalidateQueries({queryKey:["catalog-items"]}),m.invalidateQueries({queryKey:["overview-listings"]}),m.invalidateQueries({queryKey:["upsell-listings"]}),m.invalidateQueries({queryKey:["my-assets"]}),m.invalidateQueries({queryKey:["collection-sale-state"]}),ce.success(i("importListings.toastUpdated"))}return o?!g&&n.length===0?e.jsxs(G,{children:[e.jsx(Y,{"aria-hidden":!0,children:"✨"}),e.jsx(J,{children:i("importListings.emptyTitle")}),e.jsx("p",{className:"muted",children:i("importListings.emptyBody")}),e.jsx(V,{as:te,to:"/my-assets",variant:"purple",children:i("importListings.goToMyAssets")})]}):e.jsxs(Qe,{children:[e.jsxs(Pe,{children:[e.jsx(Fe,{children:i("importListings.eyebrow")}),e.jsxs(_e,{children:[i("importListings.titleLead")," ",e.jsx(Ke,{children:i("importListings.titleAccent")})]}),e.jsx(De,{children:i("importListings.lede",{currency:B.name})})]}),e.jsxs(We,{children:[e.jsx(z,{className:"ccy-mark",color:S.colors.text})," ",i("importListings.rate",{currency:B.nameSingular})]}),g?e.jsx(X,{children:Array.from({length:4}).map((d,c)=>e.jsx(Je,{},c))}):A.map(d=>{const c=(p==null?void 0:p[d.key])??[];return c.length===0?null:e.jsxs(Ue,{children:[e.jsxs(He,{children:[e.jsx(Oe,{children:i(d.title)}),e.jsx(Ge,{children:i(d.sub)})]}),e.jsx(X,{children:c.map(s=>{const T=a(s),q=T!==s.suggestedCredits;return e.jsxs(Ye,{"data-off":l(s.oldTradeId)?void 0:!0,children:[e.jsx(Ve,{type:"checkbox",checked:l(s.oldTradeId),onChange:()=>C(s.oldTradeId),"aria-label":i("importListings.includeItem",{name:s.name})}),e.jsx(Xe,{children:s.thumbnail?e.jsx("img",{src:s.thumbnail,alt:""}):null}),e.jsxs(Ze,{children:[e.jsx(qe,{title:s.name,children:s.name||i("importListings.itemFallback")}),e.jsx(et,{children:s.rarity})]}),e.jsxs(tt,{children:[e.jsxs(it,{children:[e.jsx(z,{size:15,color:S.colors.text}),e.jsx(st,{"data-testid":"imp-price-input",inputMode:"numeric",value:T.toLocaleString(),onChange:F=>f(s.oldTradeId,F.target.value),"aria-label":i("importListings.priceAria",{currency:B.name,name:s.name})})]}),e.jsxs(nt,{children:[e.jsxs("span",{children:["$",K(T).toFixed(2)]}),q?e.jsxs(rt,{onClick:()=>v(F=>({...F,[s.oldTradeId]:s.suggestedCredits})),children:[i("importListings.resetTo")," ",e.jsx(z,{className:"ccy-mark"}),s.suggestedCredits.toLocaleString()]}):null]})]}),e.jsx(ot,{children:e.jsx(at,{size:"sm",disabled:!l(s.oldTradeId),onClick:()=>L(N([s])),children:i("importListings.list")})})]},s.oldTradeId)})})]},d.key)}),e.jsx(dt,{children:e.jsxs(ct,{children:[e.jsxs("div",{children:[e.jsxs(lt,{children:[e.jsx(z,{className:"ccy-mark",color:S.colors.text})," ",u.toLocaleString()]}),e.jsx(pt,{children:i("importListings.selectedSummary",{count:x.length,usd:K(u).toFixed(2)})})]}),e.jsx(gt,{}),e.jsx(xt,{variant:"purple",disabled:x.length===0,onClick:()=>L(N(x)),children:i("importListings.listAll",{count:x.length})})]})}),E&&o?e.jsx(Be,{queue:E,session:o,onClose:()=>L(null),onDone:P}):null]}):e.jsxs(G,{children:[e.jsx(Y,{"aria-hidden":!0,children:"📦"}),e.jsx(J,{children:i("importListings.signInTitle")}),e.jsx("p",{className:"muted",children:i("importListings.signInBody")}),e.jsx(V,{variant:"purple",onClick:()=>j(),children:i("storeSettings.signIn")})]})}export{Tt as ImportListings};
433
+ `,mt=[{key:"creations",title:"importListings.creations.title",sub:"importListings.creations.sub"},{key:"owned",title:"importListings.owned.title",sub:"importListings.owned.sub",secondary:!0}];function Tt(){re({title:i("seo.import.title"),noindex:!0});const{session:o,signIn:j,restore:w}=oe(),m=ae(),k=o==null?void 0:o.address;h.useEffect(()=>{w()},[w]);const{data:p,isLoading:g}=de({queryKey:["importable",k],queryFn:()=>ge(k),enabled:!!k}),b=xe(),A=h.useMemo(()=>mt.filter(d=>!d.secondary||b),[b]),[Q,v]=h.useState({}),[$,M]=h.useState(new Set),[E,I]=h.useState(null),n=h.useMemo(()=>[...(p==null?void 0:p.creations)??[],...b?(p==null?void 0:p.owned)??[]:[]],[p,b]);h.useEffect(()=>{n.length&&v(d=>{const c={...d};for(const s of n)c[s.oldTradeId]==null&&(c[s.oldTradeId]=s.suggestedCredits);return c})},[n]);const l=d=>!$.has(d),a=d=>Q[d.oldTradeId]??d.suggestedCredits,x=n.filter(d=>l(d.oldTradeId)),u=x.reduce((d,c)=>d+a(c),0);function f(d,c){const s=c.replace(/[^\d]/g,"");v(T=>({...T,[d]:s===""?0:parseInt(s,10)}))}function C(d){M(c=>{const s=new Set(c);return s.has(d)?s.delete(d):s.add(d),s})}function N(d){return d.map(c=>({item:c,priceCredits:Math.max(1,a(c))}))}function P(){m.invalidateQueries({queryKey:["importable"]}),m.invalidateQueries({queryKey:["shop-items"]}),m.invalidateQueries({queryKey:["catalog-items"]}),m.invalidateQueries({queryKey:["overview-listings"]}),m.invalidateQueries({queryKey:["upsell-listings"]}),m.invalidateQueries({queryKey:["my-assets"]}),m.invalidateQueries({queryKey:["collection-sale-state"]}),ce.success(i("importListings.toastUpdated"))}return o?!g&&n.length===0?e.jsxs(G,{children:[e.jsx(Y,{"aria-hidden":!0,children:"✨"}),e.jsx(J,{children:i("importListings.emptyTitle")}),e.jsx("p",{className:"muted",children:i("importListings.emptyBody")}),e.jsx(V,{as:te,to:"/my-assets",variant:"purple",children:i("importListings.goToMyAssets")})]}):e.jsxs(Qe,{children:[e.jsxs(Pe,{children:[e.jsx(Fe,{children:i("importListings.eyebrow")}),e.jsxs(_e,{children:[i("importListings.titleLead")," ",e.jsx(Ke,{children:i("importListings.titleAccent")})]}),e.jsx(De,{children:i("importListings.lede",{currency:B.name})})]}),e.jsxs(We,{children:[e.jsx(z,{className:"ccy-mark",color:S.colors.text})," ",i("importListings.rate",{currency:B.nameSingular})]}),g?e.jsx(X,{children:Array.from({length:4}).map((d,c)=>e.jsx(Je,{},c))}):A.map(d=>{const c=(p==null?void 0:p[d.key])??[];return c.length===0?null:e.jsxs(Ue,{children:[e.jsxs(He,{children:[e.jsx(Oe,{children:i(d.title)}),e.jsx(Ge,{children:i(d.sub)})]}),e.jsx(X,{children:c.map(s=>{const T=a(s),q=T!==s.suggestedCredits;return e.jsxs(Ye,{"data-off":l(s.oldTradeId)?void 0:!0,children:[e.jsx(Ve,{type:"checkbox",checked:l(s.oldTradeId),onChange:()=>C(s.oldTradeId),"aria-label":i("importListings.includeItem",{name:s.name})}),e.jsx(Xe,{children:s.thumbnail?e.jsx("img",{src:s.thumbnail,alt:""}):null}),e.jsxs(Ze,{children:[e.jsx(qe,{title:s.name,children:s.name||i("importListings.itemFallback")}),e.jsx(et,{children:s.rarity})]}),e.jsxs(tt,{children:[e.jsxs(it,{children:[e.jsx(z,{size:15,color:S.colors.text}),e.jsx(st,{"data-testid":"imp-price-input",inputMode:"numeric",value:T.toLocaleString(),onChange:F=>f(s.oldTradeId,F.target.value),"aria-label":i("importListings.priceAria",{currency:B.name,name:s.name})})]}),e.jsxs(nt,{children:[e.jsxs("span",{children:["$",K(T).toFixed(2)]}),q?e.jsxs(rt,{onClick:()=>v(F=>({...F,[s.oldTradeId]:s.suggestedCredits})),children:[i("importListings.resetTo")," ",e.jsx(z,{className:"ccy-mark"}),s.suggestedCredits.toLocaleString()]}):null]})]}),e.jsx(ot,{children:e.jsx(at,{size:"sm",disabled:!l(s.oldTradeId),onClick:()=>I(N([s])),children:i("importListings.list")})})]},s.oldTradeId)})})]},d.key)}),e.jsx(dt,{children:e.jsxs(ct,{children:[e.jsxs("div",{children:[e.jsxs(lt,{children:[e.jsx(z,{className:"ccy-mark",color:S.colors.text})," ",u.toLocaleString()]}),e.jsx(pt,{children:i("importListings.selectedSummary",{count:x.length,usd:K(u).toFixed(2)})})]}),e.jsx(gt,{}),e.jsx(xt,{variant:"purple",disabled:x.length===0,onClick:()=>I(N(x)),children:i("importListings.listAll",{count:x.length})})]})}),E&&o?e.jsx(Be,{queue:E,session:o,onClose:()=>I(null),onDone:P}):null]}):e.jsxs(G,{children:[e.jsx(Y,{"aria-hidden":!0,children:"📦"}),e.jsx(J,{children:i("importListings.signInTitle")}),e.jsx("p",{className:"muted",children:i("importListings.signInBody")}),e.jsx(V,{variant:"purple",onClick:()=>j(),children:i("storeSettings.signIn")})]})}export{Tt as ImportListings};