@dcl/shop 1.19.1-36725058668.commit-fcdf1ab → 1.19.1-36725100317.commit-9ad1d65

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 (243) hide show
  1. package/_assets/{Activity-Bjf6BCq_.js → Activity-B5zzd848.js} +4 -4
  2. package/_assets/{AnimatedBackground-CrMQFUxR.js → AnimatedBackground-VRW8L0l_.js} +6 -6
  3. package/_assets/{Assets-BcAPRFEI.js → Assets-DElD46e4.js} +10 -10
  4. package/_assets/{Cart-DHXpbyUV.js → Cart-NYBgZajK.js} +2 -2
  5. package/_assets/{Collection-CKuz93x8.js → Collection-VReUKYX4.js} +2 -2
  6. package/_assets/{CollectionCarousel-C4vshHdz.js → CollectionCarousel-BsmjChqj.js} +5 -5
  7. package/_assets/{Confetti-xe8Or0ZL.js → Confetti-B6lJh05A.js} +4 -4
  8. package/_assets/{ConstantsUtil-Bk-GKX_2.js → ConstantsUtil-DOzjbTf_.js} +2 -2
  9. package/_assets/{ContentClient-DZhQQcBN.js → ContentClient-QWJ-MRTv.js} +2 -2
  10. package/_assets/{Creator-CUn96PK8.js → Creator-iEzjKmAX.js} +2 -2
  11. package/_assets/{CreditPackPicker-BErMoUfP.js → CreditPackPicker-IzExNyem.js} +2 -2
  12. package/_assets/{CreditRate-CgFKNVxs.js → CreditRate-DPEqOjze.js} +2 -2
  13. package/_assets/{DeploymentBuilder-BTnaG5tJ.js → DeploymentBuilder-Div5A3ap.js} +2 -2
  14. package/_assets/{EmotePlaybackBar-ST5d25CO.js → EmotePlaybackBar-DPdREWpy.js} +3 -3
  15. package/_assets/{ErrorNotice-D4gUUlIi.js → ErrorNotice-l-B8k9a3.js} +2 -2
  16. package/_assets/{Event-CFdV_-ZT.js → Event-DHx3wxY2.js} +2 -2
  17. package/_assets/{ExchangeController-BVNSR8eW.js → ExchangeController-BBXxCflh.js} +2 -2
  18. package/_assets/{Faq-2ENpVHoM.js → Faq-Q5u9p2nz.js} +2 -2
  19. package/_assets/{Filters-CE5Se0va.js → Filters-CEz8bjG2.js} +2 -2
  20. package/_assets/{GetCredits-1N_Xk_Lj.js → GetCredits-Cp2uSMun.js} +2 -2
  21. package/_assets/{Grow-D2MdUcIl.js → Grow-PRJNv7kv.js} +2 -2
  22. package/_assets/{HelpersUtil-p6TdtJIf.js → HelpersUtil-CYntPdrM.js} +2 -2
  23. package/_assets/{IssueModal-B9jpv3dg.js → IssueModal-dfPBFkoi.js} +2 -2
  24. package/_assets/{ItemDetail-DzgwFMar.js → ItemDetail-DCEFhzk9.js} +2 -2
  25. package/_assets/{LoadMore-BkE5uYS9.js → LoadMore-BTzn9wsv.js} +2 -2
  26. package/_assets/{ManaPricingBanner-CtYibCVm.js → ManaPricingBanner-BUmW2vNE.js} +2 -2
  27. package/_assets/{ManaPricingBanner.styles-BcKoeAdm.js → ManaPricingBanner.styles-GJHj3SUT.js} +2 -2
  28. package/_assets/{MyAssets-CiP8gE8S.js → MyAssets-BNLjGljT.js} +2 -2
  29. package/_assets/{MyFavorites-BsKvxP9W.js → MyFavorites-K6mJFdxE.js} +2 -2
  30. package/_assets/{MyStore-UtaDqttk.js → MyStore-B5MwHZ_b.js} +30 -26
  31. package/_assets/{NetworkUtil-Dvc0TByz.js → NetworkUtil-BSR_v9Du.js} +2 -2
  32. package/_assets/{NotFound-JlFNbQMW.js → NotFound-D-sp5ygF.js} +2 -2
  33. package/_assets/{NotificationsBell-BxcZlNGr.js → NotificationsBell-RixvtH4A.js} +2 -2
  34. package/_assets/{OutfitDetail-D41AS0Gj.js → OutfitDetail-C4QbGOBC.js} +2 -2
  35. package/_assets/{OutfitPreview-DiHZJkhC.js → OutfitPreview-8mWTX3pc.js} +2 -2
  36. package/_assets/{OutfitStudio-B9CHpaAA.js → OutfitStudio-BYEs3DVt.js} +2 -2
  37. package/_assets/{PaymentMethodStep-Ds38VNPS.js → PaymentMethodStep-DM8c-3bT.js} +5 -5
  38. package/_assets/{SaleCountdown-CV4Tyohg.js → SaleCountdown-kZl2m740.js} +2 -2
  39. package/_assets/{Spinner-DQfTXjYL.js → Spinner-B9OmHQ8e.js} +2 -2
  40. package/_assets/{StoreSettings-Ddeyuah5.js → StoreSettings-DI4f6kta.js} +2 -2
  41. package/_assets/{Success-J7da4nDR.js → Success-B1oc-SkP.js} +2 -2
  42. package/_assets/{SwapController-D1aY4C8g.js → SwapController-DOA12iBg.js} +2 -2
  43. package/_assets/{Tooltip-l5J-TLhj.js → Tooltip-DlenNQy2.js} +2 -2
  44. package/_assets/{TradeService-CxNCBsFn.js → TradeService-BCmWH8n7.js} +2 -2
  45. package/_assets/{W3MFrameProviderSingleton-Dq0G-Mko.js → W3MFrameProviderSingleton-XFSCy2hy.js} +4 -4
  46. package/_assets/{WebCryptoP256-_L0pN4Yf.js → WebCryptoP256-DORCJv8C.js} +2 -2
  47. package/_assets/{basic-D8uRG85P.js → basic-BGVPmU8x.js} +2 -2
  48. package/_assets/{biconomy-BsbVUel6.js → biconomy-DcHldalF.js} +2 -2
  49. package/_assets/{browseLayout.styles-BS0Dz4kA.js → browseLayout.styles-Bgc_8ycQ.js} +2 -2
  50. package/_assets/{browser-CCtVZ7NR.js → browser-4rzkrzV9.js} +2 -2
  51. package/_assets/{browser-BLZ-w9El.js → browser-DOFnfp7B.js} +2 -2
  52. package/_assets/{browser-ponyfill-B47peaKh.js → browser-ponyfill-DRmdLBfF.js} +2 -2
  53. package/_assets/{buy-ClGvxms1.js → buy-GBacz4js.js} +2 -2
  54. package/_assets/{buy-gasless-C0avfgHT.js → buy-gasless-_RaoHNGk.js} +2 -2
  55. package/_assets/{ccip-DeOIWyCa.js → ccip-BiQiXx6N.js} +2 -2
  56. package/_assets/{ccip-DH3bzZic.js → ccip-DXlhCvFp.js} +2 -2
  57. package/_assets/{chains-D6DjSHFH.js → chains-B3KZmkxv.js} +2 -2
  58. package/_assets/{collectionPage.styles-DlbrCCm2.js → collectionPage.styles-Dfsxcebr.js} +8 -8
  59. package/_assets/{common-BCK77Lgx.js → common-CHcYC1R_.js} +2 -2
  60. package/_assets/{controller-ccQRynWp.js → controller-DHzYDV7e.js} +3 -3
  61. package/_assets/{core-DXSxhy3U.js → core-yLLyJpF5.js} +5 -5
  62. package/_assets/{createSvgIcon-BEIZxFsp.js → createSvgIcon-OaR93ddo.js} +2 -2
  63. package/_assets/{crumbs.styles-Bz51sAXJ.js → crumbs.styles-CHgrOACG.js} +2 -2
  64. package/_assets/{custom-DcdN4jMZ.js → custom-CbWKfXO0.js} +2 -2
  65. package/_assets/{data-capture-uxGUHU6z.js → data-capture-DFDvS1Sq.js} +2 -2
  66. package/_assets/{dcl-schemas-BzKcn35u.js → dcl-schemas-FmJ72SB7.js} +2 -2
  67. package/_assets/{decimals-DgaM2g8d.js → decimals-CwcSBm8w.js} +2 -2
  68. package/_assets/{decimals-BoOMebqM.js → decimals-DRg7-_Pl.js} +2 -2
  69. package/_assets/{detectExtension-B3bPC95r.js → detectExtension-CQyVqPFR.js} +2 -2
  70. package/_assets/{disposePreview-CT-fIvrH.js → disposePreview-C9JqnFBy.js} +2 -2
  71. package/_assets/{email-C3e-tHpI.js → email-BxUpfNZp.js} +2 -2
  72. package/_assets/{embedded-wallet-Ba4ti2VJ.js → embedded-wallet-Cc40BA4b.js} +2 -2
  73. package/_assets/{emotion-styled.browser.esm-DwqGfVyv.js → emotion-styled.browser.esm-DHoc-ElH.js} +2 -2
  74. package/_assets/{engine-DsAq4H6U.js → engine-BzFhB8jG.js} +2 -2
  75. package/_assets/{errors-CZmHqf_k.js → errors-BxIUc_Lk.js} +2 -2
  76. package/_assets/{estimate-l1-fee-XoWjdi_H.js → estimate-l1-fee-Dcho55E-.js} +2 -2
  77. package/_assets/{eth_estimateGas-CCdGkwTr.js → eth_estimateGas-Drstbp2I.js} +2 -2
  78. package/_assets/{eth_getStorageAt-DNCCJ8cB.js → eth_getStorageAt-Br3mY6Fb.js} +2 -2
  79. package/_assets/{eth_getTransactionCount-BT0Jpcx7.js → eth_getTransactionCount-DYJpMF_Z.js} +2 -2
  80. package/_assets/{ethereum-CQ9tQZBf.js → ethereum-DPj5nzcJ.js} +2 -2
  81. package/_assets/{ethers-BucT1p_V.js → ethers-CoY9-2x5.js} +2 -2
  82. package/_assets/{events-Z-L0Wj_X.js → events-DWMHJjPM.js} +2 -2
  83. package/_assets/{execute-C8f5Bjli.js → execute-BLW-CT-V.js} +3 -3
  84. package/_assets/{extractIPFS-tIVEPzyk.js → extractIPFS-TyIRHhJV.js} +2 -2
  85. package/_assets/{features-Be-TOvcO.js → features-D9zeh0cl.js} +2 -2
  86. package/_assets/{fetchTokenMetadata-CUlNaVp_.js → fetchTokenMetadata-60xWvDhP.js} +3 -3
  87. package/_assets/{field.styles-acpa992x.js → field.styles-DI8HERk5.js} +2 -2
  88. package/_assets/{fortmatic-D41WsY2E.js → fortmatic-vBzX1ydL.js} +2 -2
  89. package/_assets/{get-bytecode-uwBsnyUf.js → get-bytecode-Cb_yJGtN.js} +2 -2
  90. package/_assets/{get-ecosystem-wallet-info-d8hbz1x0.js → get-ecosystem-wallet-info-Bd4g5Zw8.js} +2 -2
  91. package/_assets/{getBalance-DcoYM_Qa.js → getBalance-CaaVT6UI.js} +3 -3
  92. package/_assets/{getInstalledModules-BBEIcbOl.js → getInstalledModules-DYBYgDg7.js} +2 -2
  93. package/_assets/{getNFT-BPVt9KOd.js → getNFT-CWtHB9-T.js} +3 -3
  94. package/_assets/{getNFT-CjcnE7st.js → getNFT-_8vJS1-l.js} +2 -2
  95. package/_assets/{grid.styles-BptDd5gG.js → grid.styles-DdTmyIUo.js} +2 -2
  96. package/_assets/{hashTypedData-fRDxW8bJ.js → hashTypedData-Dj3XLLHc.js} +2 -2
  97. package/_assets/{hashTypedData-DaeJ9Hdn.js → hashTypedData-UMFCbF0p.js} +2 -2
  98. package/_assets/{import-A1sEAGFI.js → import-C1v3FZg6.js} +2 -2
  99. package/_assets/{in-app-BiLt1ByR.js → in-app-BZlrKs3p.js} +2 -2
  100. package/_assets/{in-app-wallet-calls-C6YR7m0d.js → in-app-wallet-calls-BzIIGkNz.js} +2 -2
  101. package/_assets/{index-DT_AMIzK.js → index-5M6_eVo-.js} +2 -2
  102. package/_assets/{index-DsgQ6qO3.js → index-7C6mSaWj.js} +2 -2
  103. package/_assets/{index-D8PisgBj.js → index-9aOhqqIs.js} +2 -2
  104. package/_assets/{index-mKmdW9nr.js → index-Adj98LWl.js} +2 -2
  105. package/_assets/{index-BMM29O69.js → index-B6qfheZ6.js} +2 -2
  106. package/_assets/{index-BP-EbutC.js → index-BAWLMZqu.js} +2 -2
  107. package/_assets/{index-DjiQ2Hy8.js → index-BEnfmGyx.js} +3 -3
  108. package/_assets/{index-C64JBuXf.js → index-BFRQ9NTI.js} +4 -4
  109. package/_assets/{index-Dm-uSbfV.js → index-BKbQPGFF.js} +2 -2
  110. package/_assets/{index-BP8N2xR2.js → index-BU_ecs3N.js} +2 -2
  111. package/_assets/{index-DQqptV8b.js → index-BW5gL32y.js} +2 -2
  112. package/_assets/{index-F4Po33a6.js → index-BW8gxEMo.js} +2 -2
  113. package/_assets/{index-BM3Mtu3r.js → index-BaHkI_B1.js} +4 -4
  114. package/_assets/{index-CdZ8Zg__.js → index-BbKlIxsP.js} +2 -2
  115. package/_assets/{index-CvUlW-iU.js → index-BjmgJGeK.js} +2 -2
  116. package/_assets/{index-o9WyeeY4.js → index-BoHahzW3.js} +2 -2
  117. package/_assets/{index-jiH5G6b6.js → index-BoltC-GJ.js} +2 -2
  118. package/_assets/{index-Di3syWW5.js → index-Bvt8xmPz.js} +2 -2
  119. package/_assets/{index-Bu_yU99_.js → index-BwTDQfAT.js} +2 -2
  120. package/_assets/{index-nhft5VGq.js → index-BzRgNHY8.js} +2 -2
  121. package/_assets/{index-CDxlBBSH.js → index-C0GTHzFa.js} +2 -2
  122. package/_assets/{index-CzQxDBg2.js → index-C2Hxxi-Q.js} +2 -2
  123. package/_assets/{index-XR5BDdGo.js → index-CErshIiR.js} +3 -3
  124. package/_assets/{index-DfpEF01c.js → index-CIVojUUe.js} +2 -2
  125. package/_assets/{index-BP9TVVh7.js → index-CLsU9Us6.js} +2 -2
  126. package/_assets/{index-BfZn9tSu.js → index-CQUZItXg.js} +2 -2
  127. package/_assets/{index-zkTBzPGo.js → index-CVW3P_kL.js} +2 -2
  128. package/_assets/{index-MqIPuLSH.js → index-C_fp-QkR.js} +2 -2
  129. package/_assets/{index-BhFS1U2-.js → index-Ca0gd--2.js} +2 -2
  130. package/_assets/{index-3n6vE-ik.js → index-Cl8rT0qs.js} +2 -2
  131. package/_assets/{index-CWGoGKHP.css → index-Cq0onVvh.css} +1 -1
  132. package/_assets/{index-Dsn_c-uC.js → index-CrOlXAe5.js} +2 -2
  133. package/_assets/{index-B48-3GwO.js → index-Cs9vTJKk.js} +2 -2
  134. package/_assets/{index-B_3V4dT2.js → index-CzaeKGrw.js} +2 -2
  135. package/_assets/{index-DN1xCXbB.js → index-D6p92lEH.js} +2 -2
  136. package/_assets/{index-DbFELIY3.js → index-D8oZkgav.js} +2 -2
  137. package/_assets/{index-CU5_wiNx.js → index-DHssnYnf.js} +2 -2
  138. package/_assets/{index-BEKyweVH.js → index-DIDouAeE.js} +2 -2
  139. package/_assets/{index-YLCH_F2d.js → index-DInwahnT.js} +2 -2
  140. package/_assets/{index-CfOKhwIX.js → index-DJjYX8gh.js} +2 -2
  141. package/_assets/{index-nSSZPEcQ.js → index-DTrZkeIu.js} +17 -17
  142. package/_assets/{index-DBXCnanr.js → index-DYWkWVmK.js} +2 -2
  143. package/_assets/{index-o1gQo_Pt.js → index-DcUgUEmh.js} +2 -2
  144. package/_assets/{index-BaCNXGH1.js → index-DdJ0U3Bv.js} +2 -2
  145. package/_assets/{index-QZB8-Apu.js → index-DdTQHWaU.js} +2 -2
  146. package/_assets/{index-D_N2oA_k.js → index-Dd_3sQrV.js} +2 -2
  147. package/_assets/{index-Cjm4ECrv.js → index-Dj1bWud-.js} +2 -2
  148. package/_assets/{index-DV54bsVU.js → index-DjioGNLv.js} +2 -2
  149. package/_assets/{index-BBiWtG0g.js → index-DmOqW7ID.js} +2 -2
  150. package/_assets/{index-cQbLEoAS.js → index-DpvpkoQ0.js} +2 -2
  151. package/_assets/{index-DOex_ICM.js → index-DtDLU2a9.js} +4 -4
  152. package/_assets/{index-DYwaxf05.js → index-GH6OfUWR.js} +2 -2
  153. package/_assets/{index-BitA8Nba.js → index-GxteE6lf.js} +2 -2
  154. package/_assets/{index-C_WGH3wX.js → index-NoN5x1nz.js} +2 -2
  155. package/_assets/{index-B1MwuBWf.js → index-XKwyHlB2.js} +2 -2
  156. package/_assets/{index-D8EbPi9j.js → index-XzToQ7aY.js} +3 -3
  157. package/_assets/{index-OmppLbEd.js → index-YBYadTEg.js} +2 -2
  158. package/_assets/{index-Cnr3cTY_.js → index-ZXxgpnOf.js} +2 -2
  159. package/_assets/{index-ZUkucJt8.js → index-_VvtbCqs.js} +2 -2
  160. package/_assets/{index-DmF8ww-R.js → index-cYk-1viY.js} +2 -2
  161. package/_assets/{index-CofDfqF3.js → index-eJg8MXSt.js} +2 -2
  162. package/_assets/{index-C119yee6.js → index-f7vr2q_j.js} +2 -2
  163. package/_assets/{index-CIgJY2eV.js → index-ghzpJVqr.js} +2 -2
  164. package/_assets/{index-jB9t0KnZ.js → index-ijJEnkwz.js} +2 -2
  165. package/_assets/{index-BWqRPQcC.js → index-q0c0vsR2.js} +2 -2
  166. package/_assets/{index-Dhw6uy_-.js → index-vTlVsaSl.js} +2 -2
  167. package/_assets/{index-Ck04yxos.js → index-wskVYfZA.js} +3 -3
  168. package/_assets/{index-B1tzXuAP.js → index-yd4Dlps5.js} +2 -2
  169. package/_assets/{index.es-D_8xduR6.js → index.es--ydSTC_l.js} +2 -2
  170. package/_assets/{index.es-CDtXm9IW.js → index.es-COe-GykO.js} +2 -2
  171. package/_assets/{index.es-CFyh4SJW.js → index.es-DIBXMx9z.js} +5 -5
  172. package/_assets/{index.es-Bd6tZJj6.js → index.es-hQqJiNdl.js} +2 -2
  173. package/_assets/{items-empty-BQMqRqK7.js → items-empty-DnQGAZwp.js} +2 -2
  174. package/_assets/{jump-Uv1xGELv.js → jump-DJswe6Ae.js} +2 -2
  175. package/_assets/{linkAccount-Dl5blcnP.js → linkAccount-9C48a6_7.js} +2 -2
  176. package/_assets/{loader-logo-DwsS7kg_.js → loader-logo-BBzKPg1y.js} +2 -2
  177. package/_assets/{localBatchGatewayRequest-DpsNp-Lx.js → localBatchGatewayRequest-C9xZI8oS.js} +2 -2
  178. package/_assets/{modal.styles-_dmLHCwA.js → modal.styles-CLHnTiB3.js} +2 -2
  179. package/_assets/{native-QPCM_JyZ.js → native-omCw0w8m.js} +2 -2
  180. package/_assets/{networks-BVIE-WGj.js → networks-Da6syNCw.js} +2 -2
  181. package/_assets/{onramp-Dwm3iosj.js → onramp-DRqEDmTQ.js} +2 -2
  182. package/_assets/{openzeppelin-Ci3uY8sr.js → openzeppelin-Clseo9ka.js} +2 -2
  183. package/_assets/{ownerOf-BI6dLAga.js → ownerOf-Dd5_GHhw.js} +2 -2
  184. package/_assets/{parseNft-DWobRiAl.js → parseNft-1IWlAoKo.js} +3 -3
  185. package/_assets/{parseSignature-D8_DB2pm.js → parseSignature-BGmvXXOn.js} +4 -4
  186. package/_assets/{parseSignature-BBoOBIIM.js → parseSignature-BllS_BWA.js} +2 -2
  187. package/_assets/{passkeys-_7tbXQjV.js → passkeys-3_DMidJz.js} +2 -2
  188. package/_assets/{pay-with-exchange-B6PdtzMO.js → pay-with-exchange-BqKZosni.js} +2 -2
  189. package/_assets/{prepare-contract-call-nAlUYM3Z.js → prepare-contract-call-CHYnA8up.js} +2 -2
  190. package/_assets/{qr-overlay-C40ZV3vE.js → qr-overlay-_JDLHEK5.js} +4 -4
  191. package/_assets/{react-FXc7nqwH.js → react-BFIm3j2a.js} +2 -2
  192. package/_assets/{receive-D9eWYP_L.js → receive-Cpz9Dvnd.js} +2 -2
  193. package/_assets/{resolveImplementation-BoxKh6mG.js → resolveImplementation-BlJBvV4D.js} +2 -2
  194. package/_assets/{resume-buy-CipoTQ_1.js → resume-buy-C9bQiOkt.js} +2 -2
  195. package/_assets/{resume-name-CTD9LAM1.js → resume-name-1aj-wXcn.js} +2 -2
  196. package/_assets/{rpc-SpzEsDVW.js → rpc-CIKW934B.js} +2 -2
  197. package/_assets/{sales-empty-YNtMT8sq.js → sales-empty-DmQJlGlw.js} +2 -2
  198. package/_assets/{search-empty-A1mcW5hg.js → search-empty-ClovaM0p.js} +2 -2
  199. package/_assets/{secp256k1-CodSRXYz.js → secp256k1--aLIyn0e.js} +2 -2
  200. package/_assets/{secp256k1-BtQzpoy1.js → secp256k1-D1ZsQmZN.js} +2 -2
  201. package/_assets/{secp256k1-DYUVZ41O.js → secp256k1-lqnaHC1F.js} +2 -2
  202. package/_assets/{send-DH80L191.js → send-D2VacgND.js} +2 -2
  203. package/_assets/{send-batch-transaction-sY4wBTJz.js → send-batch-transaction-CoHZwUyR.js} +2 -2
  204. package/_assets/{send-eip712-transaction-BZsO3N0k.js → send-eip712-transaction-C6KHb1zG.js} +3 -3
  205. package/_assets/{send-gasless-transaction-CE3qA6KZ.js → send-gasless-transaction-CLE3XbRn.js} +3 -3
  206. package/_assets/{send-transaction-C89xXBib.js → send-transaction-CZvXYdNb.js} +3 -3
  207. package/_assets/{sendMetaTransaction-D3hyCNbd.js → sendMetaTransaction-yPqWszKC.js} +2 -2
  208. package/_assets/{sendRawTransaction-BQpYQGHM.js → sendRawTransaction-DtuKJu2h.js} +4 -4
  209. package/_assets/{sentry-Dqbs4IC8.js → sentry-B6w4u-W-.js} +3 -3
  210. package/_assets/{serializeTransaction-uOTrScbp.js → serializeTransaction-B4Lft1zQ.js} +2 -2
  211. package/_assets/{session-proposal-yPDlqadk.js → session-proposal-Bok0ewYM.js} +2 -2
  212. package/_assets/{session-request-dX8eQYKY.js → session-request-P-qLAoMp.js} +3 -3
  213. package/_assets/{sha256-5SlKwQG4.js → sha256-9qKLuRf7.js} +2 -2
  214. package/_assets/{sha3-CqpFZRUQ.js → sha3-B_iCbd3-.js} +2 -2
  215. package/_assets/signin-empty-CLubNUT9.js +2 -0
  216. package/_assets/{signing-e40DAOkD.js → signing-DOjNaoui.js} +4 -4
  217. package/_assets/{skeleton.styles-CZZ4EBRf.js → skeleton.styles-bqklkUaQ.js} +2 -2
  218. package/_assets/{socials-CiahLieD.js → socials-BdmGZ8N0.js} +2 -2
  219. package/_assets/{styled-CBkFXZwx.js → styled-lGmgQ1lM.js} +2 -2
  220. package/_assets/{swaps-C2iO2JTe.js → swaps-BhC4sHay.js} +2 -2
  221. package/_assets/{thirdweb-Cq5uSSF_.js → thirdweb-CF4WVvcp.js} +4 -4
  222. package/_assets/{to-serializable-transaction-DnxgD6yn.js → to-serializable-transaction-DF9zSsrr.js} +3 -3
  223. package/_assets/{totalSupply-DurLf7Hx.js → totalSupply-DWW8ZEYi.js} +2 -2
  224. package/_assets/{trade-encoding-DL68aw8i.js → trade-encoding-CmoxrKUz.js} +2 -2
  225. package/_assets/{transaction-BApjOHoi.js → transaction-BAxmRdS0.js} +2 -2
  226. package/_assets/{transactionReceipt-DuRTmWqW.js → transactionReceipt-m-OPklcn.js} +2 -2
  227. package/_assets/{transactions-DpflvQoW.js → transactions-BApyx2lL.js} +2 -2
  228. package/_assets/{useInfiniteGrid-BqiJGvSL.js → useInfiniteGrid-Cv5x7S43.js} +2 -2
  229. package/_assets/{useStore-BJx4JKX-.js → useStore-Cdj6cI4_.js} +3 -3
  230. package/_assets/{useTheme-DTPC7pwH.js → useTheme-BvDZFuzM.js} +2 -2
  231. package/_assets/{utils-BRLmR1gO.js → utils-BQvdggqk.js} +2 -2
  232. package/_assets/{verifyHash-CEwKQyIB.js → verifyHash-CDmnZABd.js} +2 -2
  233. package/_assets/{w3m-modal-CKwt_SOF.js → w3m-modal-BdzGNIQA.js} +2 -2
  234. package/_assets/{w3m-modal-BJfPCVWr.js → w3m-modal-Btz69Cn8.js} +2 -2
  235. package/_assets/{wait-for-tx-receipt-WBFoHPt-.js → wait-for-tx-receipt-CcQMwiVN.js} +2 -2
  236. package/_assets/{wallets-BwJYPZ5z.js → wallets-D8ssVzB1.js} +6 -6
  237. package/_assets/{web-connector-CnJV_JDI.js → web-connector-BHtXIcZT.js} +4 -4
  238. package/_assets/{writeContract-DgmAmtpM.js → writeContract-ByRqOW08.js} +2 -2
  239. package/_assets/{zora-sepolia-pjyYcAmF.js → zora-sepolia-iUwERgIH.js} +2 -2
  240. package/_assets/{zoraTestnet-BOZ9eX6-.js → zoraTestnet-DFaqLqOm.js} +2 -2
  241. package/index.html +12 -12
  242. package/package.json +2 -2
  243. package/_assets/signin-empty-DSX7D7gD.js +0 -2
@@ -1,5 +1,5 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["_assets/index-BMM29O69.js","_assets/react-FXc7nqwH.js","_assets/index-nSSZPEcQ.js","_assets/dcl-schemas-BzKcn35u.js","_assets/sentry-Dqbs4IC8.js","_assets/ethers-BucT1p_V.js","_assets/intl-AKLEHPeO.js","_assets/index-CWGoGKHP.css","_assets/import-A1sEAGFI.js","_assets/buy-ClGvxms1.js","_assets/trade-encoding-DL68aw8i.js","_assets/sendMetaTransaction-D3hyCNbd.js","_assets/modal.styles-_dmLHCwA.js","_assets/CreditRate-CgFKNVxs.js","_assets/Faq-2ENpVHoM.js","_assets/sales-empty-YNtMT8sq.js","_assets/field.styles-acpa992x.js","_assets/ManaPricingBanner.styles-BcKoeAdm.js"])))=>i.map(i=>d[i]);
2
- import{m as Ae,bI as Ee,x as U,w as E,bW as Le,s as u,a as d,k as Ne,B as Te,t as o,a0 as $e,aK as Pe,a2 as ce,bX as se,bY as ne,bZ as Se,_ as Ce,z as L,av as B,b_ as Fe,X as De,bv as K,I as V,F as Me,b$ as He,Y as T,c0 as Re,c1 as X}from"./index-nSSZPEcQ.js";import{r as f,u as We,j as t,d as _e,L as qe}from"./react-FXc7nqwH.js";import{u as Oe,s as ze}from"./sales-empty-YNtMT8sq.js";import{L as Ge}from"./LoadMore-BkE5uYS9.js";import{u as $}from"./useInfiniteGrid-BqiJGvSL.js";import{m as le}from"./mana-matic-CEqvSwrJ.js";import{n as Ue}from"./name-glyph-aUugT8vq.js";import{s as Be}from"./signin-empty-DSX7D7gD.js";import"./dcl-schemas-BzKcn35u.js";import"./sentry-Dqbs4IC8.js";import"./ethers-BucT1p_V.js";import"./intl-AKLEHPeO.js";import"./import-A1sEAGFI.js";import"./buy-ClGvxms1.js";import"./trade-encoding-DL68aw8i.js";import"./sendMetaTransaction-D3hyCNbd.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},a=new e.Error().stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="224f3c2d-ceb0-456e-8468-2341f9ae7a2d",e._sentryDebugIdIdentifier="sentry-dbid-224f3c2d-ceb0-456e-8468-2341f9ae7a2d")}catch{}})();const Ke=15e3;function Ve(e,a){return e.txHash&&a.txHash?e.txHash===a.txHash:e.txHash||a.txHash?!1:e.status===a.status&&Math.abs(e.createdAt-a.createdAt)<=Ke}function Xe(e){const a=[...e].sort((i,n)=>n.createdAt-i.createdAt),s=[];for(const i of a){const n=s[s.length-1];n&&Ve(n[n.length-1],i)?n.push(i):s.push([i])}return s.map(i=>{var n;return{id:((n=i.find(c=>c.txHash))==null?void 0:n.txHash)??i[i.length-1].id,createdAt:Math.max(...i.map(c=>c.createdAt)),status:Qe(i),totalCredits:i.reduce((c,l)=>c+l.credits,0),lines:i}})}function Qe(e){return e.some(a=>a.status==="PENDING")?"PENDING":e.some(a=>a.status==="SETTLED")?"SETTLED":"EXPIRED"}function Ye(e){return e==="SETTLED"?"SETTLED":e==="EXPIRED"?"FAILED":"PENDING"}function Ze(e){return e.tradeId?`trade:${e.tradeId}`:e.contractAddress&&e.itemId?`item:${e.contractAddress.toLowerCase()}:${e.itemId}`:null}function Je(e){const a=[],s=new Map;for(const i of e){const n=Ze(i);if(!n){a.push({key:i.id,tradeId:null,contractAddress:i.contractAddress??null,itemId:i.itemId??null,registeredName:i.registeredName??null,quantity:1,credits:i.credits});continue}const c=s.get(n);if(c){c.quantity+=1,c.credits+=i.credits;continue}const l={key:n,tradeId:i.tradeId,contractAddress:i.contractAddress??null,itemId:i.itemId??null,registeredName:i.registeredName??null,quantity:1,credits:i.credits};s.set(n,l),a.push(l)}return a}function et(e,a){return{id:e.id,contractAddress:e.contractAddress,tokenId:e.tokenId,itemId:e.itemId,counterparty:e.buyer,credits:a?Ae(e.manaWei,a):null,manaWei:e.manaWei,createdAt:e.createdAt,txHash:e.txHash}}function tt(e){return e.status!=="EXPIRED"||!!e.submittedTxHash}function it(e){const s=Xe(e.purchases.filter(tt)).map(r=>({kind:"purchase",id:`purchase:${r.id}`,createdAt:r.createdAt,order:r})),i=e.sales.map(r=>{const p=et(r,e.rate);return{kind:"sale",id:`sale:${p.id}`,createdAt:p.createdAt,sale:p}}),n=(e.creditOrders??[]).filter(r=>r.status!=="failed"&&r.status!=="abandoned").map(r=>({kind:"credit",id:`credit:${r.id}`,createdAt:r.createdAt,order:r})),c=new Set(e.purchases.filter(r=>r.txHash).map(r=>r.txHash.toLowerCase())),l=(e.manaPurchases??[]).filter(r=>!c.has(r.txHash.toLowerCase())).map(r=>({kind:"mana-purchase",id:`mana-purchase:${r.id}`,createdAt:r.createdAt,sale:r}));return[...s,...i,...n,...l].sort((r,p)=>p.createdAt-r.createdAt||(r.id<p.id?-1:1))}function at(e,a){return a==="all"?e:a==="sales"?e.filter(s=>s.kind==="sale"):e.filter(s=>s.kind==="purchase"||s.kind==="credit"||s.kind==="mana-purchase")}const he=e=>e.trim().toLowerCase();function st(e){const a=new Map;for(const s of e??[]){const i=he(s.txHash??"");if(!i)continue;const n=a.get(i);n?n.push(s):a.set(i,[s])}return a}function nt(e,a,s=Date.now()){const i=a.txHash?e.get(he(a.txHash)):void 0;if(!i||i.length===0)return{kind:"direct"};const n=i.length===1?rt(i[0].netCents):null,c=i.filter(r=>!r.available&&r.availableAt>s);if(c.length===0)return{kind:"credited",credits:n};const l=c.reduce((r,p)=>Math.max(r,p.availableAt),0);return{kind:"pending",credits:n,availableAt:l}}function rt(e){return Ee(e)}function ot(){const e=U(i=>{var n;return(n=i.session)==null?void 0:n.address}),{data:a,isLoading:s}=E({queryKey:["listing-count",e],queryFn:()=>Le({creator:e,onSale:!0,first:1}),enabled:!!e,staleTime:5*6e4});return{count:a==null?void 0:a.total,isLoading:s}}const dt="https://cdn.decentraland.org/@dcl/shop/1.19.1-36725058668.commit-fcdf1ab/_assets/credits-product-vs4Q6u6l.svg",Q=Ne`
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["_assets/index-B6qfheZ6.js","_assets/react-BFIm3j2a.js","_assets/index-DTrZkeIu.js","_assets/dcl-schemas-FmJ72SB7.js","_assets/sentry-B6w4u-W-.js","_assets/ethers-CoY9-2x5.js","_assets/intl-AKLEHPeO.js","_assets/index-Cq0onVvh.css","_assets/import-C1v3FZg6.js","_assets/buy-GBacz4js.js","_assets/trade-encoding-CmoxrKUz.js","_assets/sendMetaTransaction-yPqWszKC.js","_assets/modal.styles-CLHnTiB3.js","_assets/CreditRate-DPEqOjze.js","_assets/Faq-Q5u9p2nz.js","_assets/sales-empty-DmQJlGlw.js","_assets/field.styles-DI8HERk5.js","_assets/ManaPricingBanner.styles-GJHj3SUT.js"])))=>i.map(i=>d[i]);
2
+ import{m as Ae,bI as Ee,x as U,w as E,bW as Le,s as u,a as d,k as Ne,B as Te,t as o,a0 as $e,aK as Pe,a2 as ce,bX as se,bY as ne,bZ as Se,_ as Ce,z as L,av as B,b_ as Fe,X as De,bv as K,I as V,F as Me,b$ as He,Y as T,c0 as Re,c1 as X}from"./index-DTrZkeIu.js";import{r as f,u as We,j as t,d as _e,L as qe}from"./react-BFIm3j2a.js";import{u as Oe,s as ze}from"./sales-empty-DmQJlGlw.js";import{L as Ge}from"./LoadMore-BTzn9wsv.js";import{u as $}from"./useInfiniteGrid-Cv5x7S43.js";import{m as le}from"./mana-matic-CEqvSwrJ.js";import{n as Ue}from"./name-glyph-aUugT8vq.js";import{s as Be}from"./signin-empty-CLubNUT9.js";import"./dcl-schemas-FmJ72SB7.js";import"./sentry-B6w4u-W-.js";import"./ethers-CoY9-2x5.js";import"./intl-AKLEHPeO.js";import"./import-C1v3FZg6.js";import"./buy-GBacz4js.js";import"./trade-encoding-CmoxrKUz.js";import"./sendMetaTransaction-yPqWszKC.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},a=new e.Error().stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="6d69c65f-0404-45a8-b94b-97045361a7e8",e._sentryDebugIdIdentifier="sentry-dbid-6d69c65f-0404-45a8-b94b-97045361a7e8")}catch{}})();const Ke=15e3;function Ve(e,a){return e.txHash&&a.txHash?e.txHash===a.txHash:e.txHash||a.txHash?!1:e.status===a.status&&Math.abs(e.createdAt-a.createdAt)<=Ke}function Xe(e){const a=[...e].sort((i,n)=>n.createdAt-i.createdAt),s=[];for(const i of a){const n=s[s.length-1];n&&Ve(n[n.length-1],i)?n.push(i):s.push([i])}return s.map(i=>{var n;return{id:((n=i.find(c=>c.txHash))==null?void 0:n.txHash)??i[i.length-1].id,createdAt:Math.max(...i.map(c=>c.createdAt)),status:Qe(i),totalCredits:i.reduce((c,l)=>c+l.credits,0),lines:i}})}function Qe(e){return e.some(a=>a.status==="PENDING")?"PENDING":e.some(a=>a.status==="SETTLED")?"SETTLED":"EXPIRED"}function Ye(e){return e==="SETTLED"?"SETTLED":e==="EXPIRED"?"FAILED":"PENDING"}function Ze(e){return e.tradeId?`trade:${e.tradeId}`:e.contractAddress&&e.itemId?`item:${e.contractAddress.toLowerCase()}:${e.itemId}`:null}function Je(e){const a=[],s=new Map;for(const i of e){const n=Ze(i);if(!n){a.push({key:i.id,tradeId:null,contractAddress:i.contractAddress??null,itemId:i.itemId??null,registeredName:i.registeredName??null,quantity:1,credits:i.credits});continue}const c=s.get(n);if(c){c.quantity+=1,c.credits+=i.credits;continue}const l={key:n,tradeId:i.tradeId,contractAddress:i.contractAddress??null,itemId:i.itemId??null,registeredName:i.registeredName??null,quantity:1,credits:i.credits};s.set(n,l),a.push(l)}return a}function et(e,a){return{id:e.id,contractAddress:e.contractAddress,tokenId:e.tokenId,itemId:e.itemId,counterparty:e.buyer,credits:a?Ae(e.manaWei,a):null,manaWei:e.manaWei,createdAt:e.createdAt,txHash:e.txHash}}function tt(e){return e.status!=="EXPIRED"||!!e.submittedTxHash}function it(e){const s=Xe(e.purchases.filter(tt)).map(r=>({kind:"purchase",id:`purchase:${r.id}`,createdAt:r.createdAt,order:r})),i=e.sales.map(r=>{const p=et(r,e.rate);return{kind:"sale",id:`sale:${p.id}`,createdAt:p.createdAt,sale:p}}),n=(e.creditOrders??[]).filter(r=>r.status!=="failed"&&r.status!=="abandoned").map(r=>({kind:"credit",id:`credit:${r.id}`,createdAt:r.createdAt,order:r})),c=new Set(e.purchases.filter(r=>r.txHash).map(r=>r.txHash.toLowerCase())),l=(e.manaPurchases??[]).filter(r=>!c.has(r.txHash.toLowerCase())).map(r=>({kind:"mana-purchase",id:`mana-purchase:${r.id}`,createdAt:r.createdAt,sale:r}));return[...s,...i,...n,...l].sort((r,p)=>p.createdAt-r.createdAt||(r.id<p.id?-1:1))}function at(e,a){return a==="all"?e:a==="sales"?e.filter(s=>s.kind==="sale"):e.filter(s=>s.kind==="purchase"||s.kind==="credit"||s.kind==="mana-purchase")}const he=e=>e.trim().toLowerCase();function st(e){const a=new Map;for(const s of e??[]){const i=he(s.txHash??"");if(!i)continue;const n=a.get(i);n?n.push(s):a.set(i,[s])}return a}function nt(e,a,s=Date.now()){const i=a.txHash?e.get(he(a.txHash)):void 0;if(!i||i.length===0)return{kind:"direct"};const n=i.length===1?rt(i[0].netCents):null,c=i.filter(r=>!r.available&&r.availableAt>s);if(c.length===0)return{kind:"credited",credits:n};const l=c.reduce((r,p)=>Math.max(r,p.availableAt),0);return{kind:"pending",credits:n,availableAt:l}}function rt(e){return Ee(e)}function ot(){const e=U(i=>{var n;return(n=i.session)==null?void 0:n.address}),{data:a,isLoading:s}=E({queryKey:["listing-count",e],queryFn:()=>Le({creator:e,onSale:!0,first:1}),enabled:!!e,staleTime:5*6e4});return{count:a==null?void 0:a.total,isLoading:s}}const dt="https://cdn.decentraland.org/@dcl/shop/1.19.1-36725100317.commit-9ad1d65/_assets/credits-product-vs4Q6u6l.svg",Q=Ne`
3
3
  0% { background-position: 200% 0; }
4
4
  100% { background-position: -200% 0; }
5
5
  `,ct=u.section`
@@ -396,5 +396,5 @@ import{m as Ae,bI as Ee,x as U,w as E,bW as Le,s as u,a as d,k as Ne,B as Te,t a
396
396
  height: 26px;
397
397
  object-fit: contain;
398
398
  }
399
- `,ee=N.withComponent(qe),jt=f.lazy(()=>Ce(()=>import("./index-BMM29O69.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17])).then(e=>({default:e.ImportListings}))),P=24,It=["all","purchases","sales"],z="section",de="listings",G="view",At="migrate";function A(e){try{return new Date(e).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})}catch{return""}}function ge(e){return e.length>10?`${e.slice(0,6)}…${e.slice(-4)}`:e}function xe(e){const a=Number(e)/1e18;return Number.isFinite(a)?a.toLocaleString("en",{maximumFractionDigits:2}):"0"}function fe({children:e}){const a=f.useRef(null),[s,i]=f.useState(null),n=()=>{var l;const c=(l=a.current)==null?void 0:l.getBoundingClientRect();c&&i({top:c.bottom+8,left:c.left+c.width/2})};return t.jsxs(yt,{ref:a,tabIndex:0,onMouseEnter:n,onMouseLeave:()=>i(null),onFocus:n,onBlur:()=>i(null),children:[e,s?_e.createPortal(t.jsx(bt,{style:{top:s.top,left:s.left},role:"tooltip",children:o("activity.polygonMana")}),document.body):null]})}function Et({item:e}){const a=!!e.contractAddress&&!!e.itemId,s=!!e.tradeId||a,{data:i,isLoading:n}=E({queryKey:["order-line-display",e.tradeId,e.contractAddress,e.itemId],queryFn:()=>e.tradeId?Re(e.tradeId):X(e.contractAddress,{itemId:e.itemId}),enabled:s,staleTime:5*6e4}),c=s&&n,l=(i==null?void 0:i.name)??o("activity.itemFallback"),r=(i==null?void 0:i.thumbnail)??"",p=K({contractAddress:i==null?void 0:i.contractAddress,tokenId:i==null?void 0:i.tokenId,itemId:i==null?void 0:i.itemId})??void 0,j=t.jsxs(t.Fragment,{children:[c?t.jsx(Z,{}):t.jsx(W,{children:r?t.jsx("img",{src:r,alt:l}):t.jsx(V,{name:"cart",size:20})}),t.jsxs(_,{children:[c?t.jsx(J,{}):t.jsx(q,{title:l,children:l}),e.quantity>1?t.jsx(O,{children:o("activity.quantity",{count:e.quantity})}):null]}),t.jsxs(me,{children:[t.jsx(L,{className:"ccy-mark"})," ",t.jsx(B,{credits:e.credits})]})]});return p?t.jsx(ee,{to:p,"data-link":"true",children:j}):t.jsx(N,{children:j})}function Lt({item:e}){const a=`@${e.registeredName}`;return t.jsxs(N,{"data-testid":"activity-name-line",children:[t.jsx(kt,{children:t.jsx("img",{src:Ue,alt:""})}),t.jsxs(_,{children:[t.jsx(q,{title:a,children:a}),t.jsx(O,{children:o("activity.nameRegistration")})]}),t.jsxs(me,{children:[t.jsx(L,{className:"ccy-mark"})," ",e.credits]})]})}function Nt({order:e}){const a=Je(e.lines),s=a.reduce((c,l)=>c+l.quantity,0),i=Ye(e.status),n=i==="SETTLED"?o("activity.completed"):i==="FAILED"?o("activity.failed"):o("activity.processing");return t.jsxs(S,{"data-testid":"purchase-order",children:[t.jsxs(C,{children:[t.jsxs(F,{children:[t.jsx(D,{children:A(e.createdAt)}),t.jsxs(M,{children:[o("activity.purchaseLabel")," · ",o("activity.itemCount",{count:s})]})]}),t.jsxs(H,{children:[t.jsx(R,{"data-status":i,children:n}),t.jsxs(k,{children:[t.jsx(L,{className:"ccy-mark"})," ",t.jsx(B,{credits:e.totalCredits})]})]})]}),i==="FAILED"?t.jsx(vt,{children:o("activity.purchaseFailedNote")}):null,t.jsx(Y,{children:a.map(c=>c.registeredName?t.jsx(Lt,{item:c},c.key):t.jsx(Et,{item:c},c.key))})]})}function Tt({sale:e}){const{data:a,isLoading:s}=E({queryKey:["asset-display",e.contractAddress,e.tokenId,e.itemId],queryFn:()=>X(e.contractAddress,{tokenId:e.tokenId,itemId:e.itemId}),enabled:!!e.contractAddress,staleTime:3e5}),i=(a==null?void 0:a.name)??o("activity.itemFallback"),n=(a==null?void 0:a.thumbnail)??"",c=K({contractAddress:e.contractAddress,tokenId:e.tokenId,itemId:e.itemId})??void 0,l=t.jsxs(t.Fragment,{children:[s?t.jsx(Z,{}):t.jsx(W,{children:n?t.jsx("img",{src:n,alt:i}):t.jsx(V,{name:"offer",size:20})}),t.jsxs(_,{children:[s?t.jsx(J,{}):t.jsx(q,{title:i,children:i}),t.jsx(O,{children:o("activity.boughtFrom",{account:ge(e.seller)})})]})]});return t.jsxs(S,{"data-testid":"activity-mana-purchase",children:[t.jsxs(C,{children:[t.jsxs(F,{children:[t.jsx(D,{children:A(e.createdAt)}),t.jsx(M,{children:o("activity.paidWithMana")})]}),t.jsxs(H,{children:[t.jsx(R,{"data-status":"SETTLED",children:o("activity.completed")}),t.jsxs(k,{children:[xe(e.manaWei)," ",t.jsx(fe,{children:t.jsx(pe,{src:le,alt:"MANA"})})]})]})]}),t.jsx(Y,{children:c?t.jsx(ee,{to:c,"data-link":"true",children:l}):t.jsx(N,{children:l})})]})}function $t({sale:e,payout:a}){const{data:s,isLoading:i}=E({queryKey:["asset-display",e.contractAddress,e.tokenId,e.itemId],queryFn:()=>X(e.contractAddress,{tokenId:e.tokenId,itemId:e.itemId}),enabled:!!e.contractAddress,staleTime:3e5}),n=(s==null?void 0:s.name)??o("activity.itemFallback"),c=(s==null?void 0:s.thumbnail)??"",l=K({contractAddress:e.contractAddress,tokenId:e.tokenId,itemId:e.itemId})??void 0,r=t.jsxs(t.Fragment,{children:[i?t.jsx(Z,{}):t.jsx(W,{children:c?t.jsx("img",{src:c,alt:n}):t.jsx(V,{name:"offer",size:20})}),t.jsxs(_,{children:[i?t.jsx(J,{}):t.jsx(q,{title:n,children:n}),t.jsxs(O,{children:[o("activity.soldTo",{account:ge(e.counterparty)}),a.kind==="pending"?` · ${o("activity.payoutPendingOn",{date:A(a.availableAt)})}`:""]})]})]});return t.jsxs(S,{"data-testid":"activity-sale",children:[t.jsxs(C,{children:[t.jsxs(F,{children:[t.jsx(D,{children:A(e.createdAt)}),t.jsx(M,{children:o("activity.saleLabel")})]}),t.jsxs(H,{children:[t.jsx(R,{"data-status":a.kind==="pending"?"PENDING":"SOLD",children:a.kind==="pending"?o("activity.payoutPending"):o("activity.sold")}),a.kind==="direct"?t.jsxs(k,{"data-kind":"income",children:["+",xe(e.manaWei)," ",t.jsx(fe,{children:t.jsx(pe,{src:le,alt:"MANA"})})]}):a.credits!==null?t.jsxs(k,{"data-kind":"income",children:[t.jsx(L,{className:"ccy-mark"})," +",Me(a.credits)]}):t.jsx(k,{"data-kind":"income",children:o("activity.payoutCredited")})]})]}),t.jsx(Y,{children:l?t.jsx(ee,{to:l,"data-link":"true",children:r}):t.jsx(N,{children:r})})]})}function Pt({order:e}){const a=`$${(e.usdCents/100).toFixed(2)}`,s=Fe(e.status),i=s==="SETTLED"?o("activity.completed"):s==="FAILED"?o("activity.failed"):s==="UNFINISHED"?o("activity.unfinished"):o("activity.processing"),n=U(m=>m.session),c=De(),[l,r]=f.useState(!1),p=e.status==="initiated"&&!!n;f.useEffect(()=>{const m=()=>r(!1);return window.addEventListener("pageshow",m),()=>window.removeEventListener("pageshow",m)},[]);async function j(){if(!(!n||l)){r(!0);try{const m=await He(e.id,n.identity);if(m.kind==="url"){if(/^https:\/\/([a-z0-9-]+\.)*stripe\.com\//i.test(m.url)){window.location.href=m.url;return}T.error(o("activity.resumeUnavailable"))}else m.kind==="expired"?(T.info(o("activity.resumeExpired")),c.invalidateQueries({queryKey:["credit-orders"]})):m.kind==="paid"?(T.success(o("activity.resumePaid")),c.invalidateQueries({queryKey:["credit-orders"]})):T.error(o("activity.resumeUnavailable"));r(!1)}catch{r(!1)}}}return t.jsx(S,{"data-testid":"credit-order",children:t.jsxs(C,{children:[t.jsx(xt,{children:t.jsx("img",{src:dt,alt:"","aria-hidden":!0})}),t.jsxs(F,{children:[t.jsx(D,{children:A(e.createdAt)}),t.jsxs(M,{children:[o("activity.creditPurchaseLabel")," · ",o("activity.creditPaid",{usd:a})]})]}),t.jsxs(H,{children:[p?t.jsx(ft,{type:"button",onClick:()=>void j(),disabled:l,"data-testid":"resume-order",children:l?o("activity.resuming"):o("activity.resume")}):null,t.jsx(R,{"data-status":s,children:i}),t.jsxs(k,{"data-kind":s==="UNFINISHED"?void 0:"income",children:[s==="UNFINISHED"?"":"+",t.jsx(L,{className:"ccy-mark"})," ",t.jsx(B,{credits:e.credits})]})]})]})})}function St({filter:e}){const a={all:o("activity.emptyAllBody"),purchases:o("activity.emptyPurchasesBody"),sales:o("activity.emptySalesBody")}[e];return t.jsx(wt,{children:t.jsx(ce,{testId:`activity-empty-${e}`,icon:ze,title:o("activity.emptyTitle"),body:a,cta:{label:o("assets.empty.cta"),to:"/items"}})})}function Xt(){const{session:e,signIn:a}=U(),[s,i]=f.useState("all"),[n,c]=We(),l=n.get(z)===de||n.get(G)===At;Te({title:l?o("seo.import.title"):o("nav.activity"),noindex:!0});const{count:r}=Oe(),{count:p}=ot(),m=r!==void 0&&p!==void 0&&(r>0||p>0||l),g=!!e&&!l&&s!=="sales",x=!!e&&!l&&s!=="purchases",y=$(["purchases",e==null?void 0:e.address],h=>Se(e.address,e.identity,{first:P,skip:h}),{enabled:g}),b=$(["sales",e==null?void 0:e.address],h=>se(e.address,{role:"seller",first:P,skip:h}),{enabled:x}),v=$(["credit-orders",e==null?void 0:e.address],h=>ne(e.address,e.identity,{first:P,skip:h}),{enabled:g}),w=$(["mana-purchases",e==null?void 0:e.address],h=>se(e.address,{role:"buyer",first:P,skip:h}),{enabled:g}),{data:te}=E({queryKey:["sale-payouts",e==null?void 0:e.address],queryFn:()=>ne(e.address,e.identity,{first:200}).then(h=>h.payouts),enabled:x,staleTime:6e4}),ye=f.useMemo(()=>st(te),[te]),{data:be}=$e(x);if(!e)return t.jsx(Pe,{children:t.jsx(ce,{testId:"activity-signin",icon:Be,title:o("activity.signInTitle"),body:o("activity.signInBody"),cta:{label:o("storeSettings.signIn"),onClick:()=>a()},ctaVariant:"solid",fill:!0})});const ie=at(it({purchases:g?y.items:[],sales:x?b.items:[],creditOrders:g?v.items:[],manaPurchases:g?w.items:[],rate:be}),s),ve=g&&(y.isLoading||v.isLoading||w.isLoading)||x&&b.isLoading,ae=g&&(y.isFetchingNextPage||v.isFetchingNextPage||w.isFetchingNextPage)||x&&b.isFetchingNextPage,we=g&&(y.hasNextPage||v.hasNextPage||w.hasNextPage)||x&&b.hasNextPage;function ke(){g&&y.hasNextPage&&y.fetchNextPage(),g&&v.hasNextPage&&v.fetchNextPage(),g&&w.hasNextPage&&w.fetchNextPage(),x&&b.hasNextPage&&b.fetchNextPage()}function je(h){if(i(h),!l)return;const I=new URLSearchParams(n);I.delete(z),I.delete(G),c(I,{replace:!0})}function Ie(){const h=new URLSearchParams(n);h.set(z,de),h.delete(G),c(h,{replace:!0})}return t.jsxs(ct,{children:[t.jsx(lt,{children:t.jsx(ht,{children:o("nav.activity")})}),t.jsxs(ut,{role:"tablist","aria-label":o("nav.activity"),children:[It.map(h=>t.jsx(ue,{type:"button",role:"tab","aria-selected":!l&&s===h,"data-active":!l&&s===h,"data-testid":`activity-filter-${h}`,onClick:()=>je(h),children:o(`activity.filter.${h}`)},h)),m?t.jsxs(pt,{type:"button",role:"tab","aria-selected":l,"data-active":l,"data-testid":"activity-filter-migrate","aria-label":r?o("activity.migrate.chipAria",{count:r}):void 0,onClick:Ie,children:[o("activity.migrate.chip"),r?t.jsx(mt,{"data-testid":"activity-migrate-count","aria-hidden":!0,children:r}):null]}):null]}),l?t.jsx(f.Suspense,{fallback:t.jsx(gt,{"aria-busy":"true"}),children:t.jsx(jt,{})}):ve?t.jsx(re,{children:Array.from({length:5}).map((h,I)=>t.jsx(oe,{},I))}):ie.length===0?t.jsx(St,{filter:s}):t.jsxs(t.Fragment,{children:[t.jsxs(re,{children:[ie.map(h=>h.kind==="purchase"?t.jsx(Nt,{order:h.order},h.id):h.kind==="credit"?t.jsx(Pt,{order:h.order},h.id):h.kind==="mana-purchase"?t.jsx(Tt,{sale:h.sale},h.id):t.jsx($t,{sale:h.sale,payout:nt(ye,h.sale)},h.id)),ae?t.jsx(oe,{}):null]}),t.jsx(Ge,{hasNextPage:we,isFetching:ae,onLoadMore:ke})]})]})}export{Xt as Activity};
400
- //# sourceMappingURL=Activity-Bjf6BCq_.js.map
399
+ `,ee=N.withComponent(qe),jt=f.lazy(()=>Ce(()=>import("./index-B6qfheZ6.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17])).then(e=>({default:e.ImportListings}))),P=24,It=["all","purchases","sales"],z="section",de="listings",G="view",At="migrate";function A(e){try{return new Date(e).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})}catch{return""}}function ge(e){return e.length>10?`${e.slice(0,6)}…${e.slice(-4)}`:e}function xe(e){const a=Number(e)/1e18;return Number.isFinite(a)?a.toLocaleString("en",{maximumFractionDigits:2}):"0"}function fe({children:e}){const a=f.useRef(null),[s,i]=f.useState(null),n=()=>{var l;const c=(l=a.current)==null?void 0:l.getBoundingClientRect();c&&i({top:c.bottom+8,left:c.left+c.width/2})};return t.jsxs(yt,{ref:a,tabIndex:0,onMouseEnter:n,onMouseLeave:()=>i(null),onFocus:n,onBlur:()=>i(null),children:[e,s?_e.createPortal(t.jsx(bt,{style:{top:s.top,left:s.left},role:"tooltip",children:o("activity.polygonMana")}),document.body):null]})}function Et({item:e}){const a=!!e.contractAddress&&!!e.itemId,s=!!e.tradeId||a,{data:i,isLoading:n}=E({queryKey:["order-line-display",e.tradeId,e.contractAddress,e.itemId],queryFn:()=>e.tradeId?Re(e.tradeId):X(e.contractAddress,{itemId:e.itemId}),enabled:s,staleTime:5*6e4}),c=s&&n,l=(i==null?void 0:i.name)??o("activity.itemFallback"),r=(i==null?void 0:i.thumbnail)??"",p=K({contractAddress:i==null?void 0:i.contractAddress,tokenId:i==null?void 0:i.tokenId,itemId:i==null?void 0:i.itemId})??void 0,j=t.jsxs(t.Fragment,{children:[c?t.jsx(Z,{}):t.jsx(W,{children:r?t.jsx("img",{src:r,alt:l}):t.jsx(V,{name:"cart",size:20})}),t.jsxs(_,{children:[c?t.jsx(J,{}):t.jsx(q,{title:l,children:l}),e.quantity>1?t.jsx(O,{children:o("activity.quantity",{count:e.quantity})}):null]}),t.jsxs(me,{children:[t.jsx(L,{className:"ccy-mark"})," ",t.jsx(B,{credits:e.credits})]})]});return p?t.jsx(ee,{to:p,"data-link":"true",children:j}):t.jsx(N,{children:j})}function Lt({item:e}){const a=`@${e.registeredName}`;return t.jsxs(N,{"data-testid":"activity-name-line",children:[t.jsx(kt,{children:t.jsx("img",{src:Ue,alt:""})}),t.jsxs(_,{children:[t.jsx(q,{title:a,children:a}),t.jsx(O,{children:o("activity.nameRegistration")})]}),t.jsxs(me,{children:[t.jsx(L,{className:"ccy-mark"})," ",e.credits]})]})}function Nt({order:e}){const a=Je(e.lines),s=a.reduce((c,l)=>c+l.quantity,0),i=Ye(e.status),n=i==="SETTLED"?o("activity.completed"):i==="FAILED"?o("activity.failed"):o("activity.processing");return t.jsxs(S,{"data-testid":"purchase-order",children:[t.jsxs(C,{children:[t.jsxs(F,{children:[t.jsx(D,{children:A(e.createdAt)}),t.jsxs(M,{children:[o("activity.purchaseLabel")," · ",o("activity.itemCount",{count:s})]})]}),t.jsxs(H,{children:[t.jsx(R,{"data-status":i,children:n}),t.jsxs(k,{children:[t.jsx(L,{className:"ccy-mark"})," ",t.jsx(B,{credits:e.totalCredits})]})]})]}),i==="FAILED"?t.jsx(vt,{children:o("activity.purchaseFailedNote")}):null,t.jsx(Y,{children:a.map(c=>c.registeredName?t.jsx(Lt,{item:c},c.key):t.jsx(Et,{item:c},c.key))})]})}function Tt({sale:e}){const{data:a,isLoading:s}=E({queryKey:["asset-display",e.contractAddress,e.tokenId,e.itemId],queryFn:()=>X(e.contractAddress,{tokenId:e.tokenId,itemId:e.itemId}),enabled:!!e.contractAddress,staleTime:3e5}),i=(a==null?void 0:a.name)??o("activity.itemFallback"),n=(a==null?void 0:a.thumbnail)??"",c=K({contractAddress:e.contractAddress,tokenId:e.tokenId,itemId:e.itemId})??void 0,l=t.jsxs(t.Fragment,{children:[s?t.jsx(Z,{}):t.jsx(W,{children:n?t.jsx("img",{src:n,alt:i}):t.jsx(V,{name:"offer",size:20})}),t.jsxs(_,{children:[s?t.jsx(J,{}):t.jsx(q,{title:i,children:i}),t.jsx(O,{children:o("activity.boughtFrom",{account:ge(e.seller)})})]})]});return t.jsxs(S,{"data-testid":"activity-mana-purchase",children:[t.jsxs(C,{children:[t.jsxs(F,{children:[t.jsx(D,{children:A(e.createdAt)}),t.jsx(M,{children:o("activity.paidWithMana")})]}),t.jsxs(H,{children:[t.jsx(R,{"data-status":"SETTLED",children:o("activity.completed")}),t.jsxs(k,{children:[xe(e.manaWei)," ",t.jsx(fe,{children:t.jsx(pe,{src:le,alt:"MANA"})})]})]})]}),t.jsx(Y,{children:c?t.jsx(ee,{to:c,"data-link":"true",children:l}):t.jsx(N,{children:l})})]})}function $t({sale:e,payout:a}){const{data:s,isLoading:i}=E({queryKey:["asset-display",e.contractAddress,e.tokenId,e.itemId],queryFn:()=>X(e.contractAddress,{tokenId:e.tokenId,itemId:e.itemId}),enabled:!!e.contractAddress,staleTime:3e5}),n=(s==null?void 0:s.name)??o("activity.itemFallback"),c=(s==null?void 0:s.thumbnail)??"",l=K({contractAddress:e.contractAddress,tokenId:e.tokenId,itemId:e.itemId})??void 0,r=t.jsxs(t.Fragment,{children:[i?t.jsx(Z,{}):t.jsx(W,{children:c?t.jsx("img",{src:c,alt:n}):t.jsx(V,{name:"offer",size:20})}),t.jsxs(_,{children:[i?t.jsx(J,{}):t.jsx(q,{title:n,children:n}),t.jsxs(O,{children:[o("activity.soldTo",{account:ge(e.counterparty)}),a.kind==="pending"?` · ${o("activity.payoutPendingOn",{date:A(a.availableAt)})}`:""]})]})]});return t.jsxs(S,{"data-testid":"activity-sale",children:[t.jsxs(C,{children:[t.jsxs(F,{children:[t.jsx(D,{children:A(e.createdAt)}),t.jsx(M,{children:o("activity.saleLabel")})]}),t.jsxs(H,{children:[t.jsx(R,{"data-status":a.kind==="pending"?"PENDING":"SOLD",children:a.kind==="pending"?o("activity.payoutPending"):o("activity.sold")}),a.kind==="direct"?t.jsxs(k,{"data-kind":"income",children:["+",xe(e.manaWei)," ",t.jsx(fe,{children:t.jsx(pe,{src:le,alt:"MANA"})})]}):a.credits!==null?t.jsxs(k,{"data-kind":"income",children:[t.jsx(L,{className:"ccy-mark"})," +",Me(a.credits)]}):t.jsx(k,{"data-kind":"income",children:o("activity.payoutCredited")})]})]}),t.jsx(Y,{children:l?t.jsx(ee,{to:l,"data-link":"true",children:r}):t.jsx(N,{children:r})})]})}function Pt({order:e}){const a=`$${(e.usdCents/100).toFixed(2)}`,s=Fe(e.status),i=s==="SETTLED"?o("activity.completed"):s==="FAILED"?o("activity.failed"):s==="UNFINISHED"?o("activity.unfinished"):o("activity.processing"),n=U(m=>m.session),c=De(),[l,r]=f.useState(!1),p=e.status==="initiated"&&!!n;f.useEffect(()=>{const m=()=>r(!1);return window.addEventListener("pageshow",m),()=>window.removeEventListener("pageshow",m)},[]);async function j(){if(!(!n||l)){r(!0);try{const m=await He(e.id,n.identity);if(m.kind==="url"){if(/^https:\/\/([a-z0-9-]+\.)*stripe\.com\//i.test(m.url)){window.location.href=m.url;return}T.error(o("activity.resumeUnavailable"))}else m.kind==="expired"?(T.info(o("activity.resumeExpired")),c.invalidateQueries({queryKey:["credit-orders"]})):m.kind==="paid"?(T.success(o("activity.resumePaid")),c.invalidateQueries({queryKey:["credit-orders"]})):T.error(o("activity.resumeUnavailable"));r(!1)}catch{r(!1)}}}return t.jsx(S,{"data-testid":"credit-order",children:t.jsxs(C,{children:[t.jsx(xt,{children:t.jsx("img",{src:dt,alt:"","aria-hidden":!0})}),t.jsxs(F,{children:[t.jsx(D,{children:A(e.createdAt)}),t.jsxs(M,{children:[o("activity.creditPurchaseLabel")," · ",o("activity.creditPaid",{usd:a})]})]}),t.jsxs(H,{children:[p?t.jsx(ft,{type:"button",onClick:()=>void j(),disabled:l,"data-testid":"resume-order",children:l?o("activity.resuming"):o("activity.resume")}):null,t.jsx(R,{"data-status":s,children:i}),t.jsxs(k,{"data-kind":s==="UNFINISHED"?void 0:"income",children:[s==="UNFINISHED"?"":"+",t.jsx(L,{className:"ccy-mark"})," ",t.jsx(B,{credits:e.credits})]})]})]})})}function St({filter:e}){const a={all:o("activity.emptyAllBody"),purchases:o("activity.emptyPurchasesBody"),sales:o("activity.emptySalesBody")}[e];return t.jsx(wt,{children:t.jsx(ce,{testId:`activity-empty-${e}`,icon:ze,title:o("activity.emptyTitle"),body:a,cta:{label:o("assets.empty.cta"),to:"/items"}})})}function Xt(){const{session:e,signIn:a}=U(),[s,i]=f.useState("all"),[n,c]=We(),l=n.get(z)===de||n.get(G)===At;Te({title:l?o("seo.import.title"):o("nav.activity"),noindex:!0});const{count:r}=Oe(),{count:p}=ot(),m=r!==void 0&&p!==void 0&&(r>0||p>0||l),g=!!e&&!l&&s!=="sales",x=!!e&&!l&&s!=="purchases",y=$(["purchases",e==null?void 0:e.address],h=>Se(e.address,e.identity,{first:P,skip:h}),{enabled:g}),b=$(["sales",e==null?void 0:e.address],h=>se(e.address,{role:"seller",first:P,skip:h}),{enabled:x}),v=$(["credit-orders",e==null?void 0:e.address],h=>ne(e.address,e.identity,{first:P,skip:h}),{enabled:g}),w=$(["mana-purchases",e==null?void 0:e.address],h=>se(e.address,{role:"buyer",first:P,skip:h}),{enabled:g}),{data:te}=E({queryKey:["sale-payouts",e==null?void 0:e.address],queryFn:()=>ne(e.address,e.identity,{first:200}).then(h=>h.payouts),enabled:x,staleTime:6e4}),ye=f.useMemo(()=>st(te),[te]),{data:be}=$e(x);if(!e)return t.jsx(Pe,{children:t.jsx(ce,{testId:"activity-signin",icon:Be,title:o("activity.signInTitle"),body:o("activity.signInBody"),cta:{label:o("storeSettings.signIn"),onClick:()=>a()},ctaVariant:"solid",fill:!0})});const ie=at(it({purchases:g?y.items:[],sales:x?b.items:[],creditOrders:g?v.items:[],manaPurchases:g?w.items:[],rate:be}),s),ve=g&&(y.isLoading||v.isLoading||w.isLoading)||x&&b.isLoading,ae=g&&(y.isFetchingNextPage||v.isFetchingNextPage||w.isFetchingNextPage)||x&&b.isFetchingNextPage,we=g&&(y.hasNextPage||v.hasNextPage||w.hasNextPage)||x&&b.hasNextPage;function ke(){g&&y.hasNextPage&&y.fetchNextPage(),g&&v.hasNextPage&&v.fetchNextPage(),g&&w.hasNextPage&&w.fetchNextPage(),x&&b.hasNextPage&&b.fetchNextPage()}function je(h){if(i(h),!l)return;const I=new URLSearchParams(n);I.delete(z),I.delete(G),c(I,{replace:!0})}function Ie(){const h=new URLSearchParams(n);h.set(z,de),h.delete(G),c(h,{replace:!0})}return t.jsxs(ct,{children:[t.jsx(lt,{children:t.jsx(ht,{children:o("nav.activity")})}),t.jsxs(ut,{role:"tablist","aria-label":o("nav.activity"),children:[It.map(h=>t.jsx(ue,{type:"button",role:"tab","aria-selected":!l&&s===h,"data-active":!l&&s===h,"data-testid":`activity-filter-${h}`,onClick:()=>je(h),children:o(`activity.filter.${h}`)},h)),m?t.jsxs(pt,{type:"button",role:"tab","aria-selected":l,"data-active":l,"data-testid":"activity-filter-migrate","aria-label":r?o("activity.migrate.chipAria",{count:r}):void 0,onClick:Ie,children:[o("activity.migrate.chip"),r?t.jsx(mt,{"data-testid":"activity-migrate-count","aria-hidden":!0,children:r}):null]}):null]}),l?t.jsx(f.Suspense,{fallback:t.jsx(gt,{"aria-busy":"true"}),children:t.jsx(jt,{})}):ve?t.jsx(re,{children:Array.from({length:5}).map((h,I)=>t.jsx(oe,{},I))}):ie.length===0?t.jsx(St,{filter:s}):t.jsxs(t.Fragment,{children:[t.jsxs(re,{children:[ie.map(h=>h.kind==="purchase"?t.jsx(Nt,{order:h.order},h.id):h.kind==="credit"?t.jsx(Pt,{order:h.order},h.id):h.kind==="mana-purchase"?t.jsx(Tt,{sale:h.sale},h.id):t.jsx($t,{sale:h.sale,payout:nt(ye,h.sale)},h.id)),ae?t.jsx(oe,{}):null]}),t.jsx(Ge,{hasNextPage:we,isFetching:ae,onLoadMore:ke})]})]})}export{Xt as Activity};
400
+ //# sourceMappingURL=Activity-B5zzd848.js.map
@@ -1,4 +1,4 @@
1
- import{r as u,j as d}from"./react-FXc7nqwH.js";import{s as f}from"./index-nSSZPEcQ.js";import"./dcl-schemas-BzKcn35u.js";import"./sentry-Dqbs4IC8.js";import"./ethers-BucT1p_V.js";import"./intl-AKLEHPeO.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},a=new e.Error().stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="3c56d0e2-7eb3-43a6-aa84-b7c105ba4213",e._sentryDebugIdIdentifier="sentry-dbid-3c56d0e2-7eb3-43a6-aa84-b7c105ba4213")}catch{}})();const D="https://cdn.decentraland.org/@dcl/shop/1.19.1-36725058668.commit-fcdf1ab/_assets/custom-welcome-background-BxlFQma9.webp",P="https://cdn.decentraland.org/@dcl/shop/1.19.1-36725058668.commit-fcdf1ab/_assets/DCL_LogoPattern-BryBPc3d.png",L=`
1
+ import{r as u,j as d}from"./react-BFIm3j2a.js";import{s as m}from"./index-DTrZkeIu.js";import"./dcl-schemas-FmJ72SB7.js";import"./sentry-B6w4u-W-.js";import"./ethers-CoY9-2x5.js";import"./intl-AKLEHPeO.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},a=new e.Error().stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="242657d3-22aa-4182-a0a3-9be2d2233fda",e._sentryDebugIdIdentifier="sentry-dbid-242657d3-22aa-4182-a0a3-9be2d2233fda")}catch{}})();const D="https://cdn.decentraland.org/@dcl/shop/1.19.1-36725100317.commit-9ad1d65/_assets/custom-welcome-background-BxlFQma9.webp",P="https://cdn.decentraland.org/@dcl/shop/1.19.1-36725100317.commit-9ad1d65/_assets/DCL_LogoPattern-BryBPc3d.png",L=`
2
2
  attribute vec2 a_position;
3
3
  varying vec2 v_uv;
4
4
  void main() {
@@ -77,11 +77,11 @@ void main() {
77
77
 
78
78
  gl_FragColor = result;
79
79
  }
80
- `;function p(e,a,n){const r=e.createShader(a);return r?(e.shaderSource(r,n),e.compileShader(r),e.getShaderParameter(r,e.COMPILE_STATUS)?r:(console.error("Shader compile error:",e.getShaderInfoLog(r)),e.deleteShader(r),null)):null}function B(e,a,n){const r=e.createProgram();return r?(e.attachShader(r,a),e.attachShader(r,n),e.linkProgram(r),e.getProgramParameter(r,e.LINK_STATUS)?r:(console.error("Program link error:",e.getProgramInfoLog(r)),e.deleteProgram(r),null)):null}function F(e,a,n){const r=e.createTexture();if(!r)return null;e.bindTexture(e.TEXTURE_2D,r),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,1,1,0,e.RGBA,e.UNSIGNED_BYTE,new Uint8Array([128,128,128,255]));const o=new Image;return o.crossOrigin="anonymous",o.onload=()=>{n!=null&&n()||(e.bindTexture(e.TEXTURE_2D,r),e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,!0),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,o),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.REPEAT),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.REPEAT),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR_MIPMAP_LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR),e.generateMipmap(e.TEXTURE_2D))},o.src=a,r}const C=f.div`
80
+ `;function p(e,a,n){const r=e.createShader(a);return r?(e.shaderSource(r,n),e.compileShader(r),e.getShaderParameter(r,e.COMPILE_STATUS)?r:(console.error("Shader compile error:",e.getShaderInfoLog(r)),e.deleteShader(r),null)):null}function B(e,a,n){const r=e.createProgram();return r?(e.attachShader(r,a),e.attachShader(r,n),e.linkProgram(r),e.getProgramParameter(r,e.LINK_STATUS)?r:(console.error("Program link error:",e.getProgramInfoLog(r)),e.deleteProgram(r),null)):null}function F(e,a,n){const r=e.createTexture();if(!r)return null;e.bindTexture(e.TEXTURE_2D,r),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,1,1,0,e.RGBA,e.UNSIGNED_BYTE,new Uint8Array([128,128,128,255]));const o=new Image;return o.crossOrigin="anonymous",o.onload=()=>{n!=null&&n()||(e.bindTexture(e.TEXTURE_2D,r),e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,!0),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,o),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.REPEAT),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.REPEAT),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR_MIPMAP_LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR),e.generateMipmap(e.TEXTURE_2D))},o.src=a,r}const C=m.div`
81
81
  position: absolute;
82
82
  inset: 0;
83
83
  overflow: hidden;
84
- `,k=f.div`
84
+ `,k=m.div`
85
85
  position: absolute;
86
86
  inset: 0;
87
87
  width: 100%;
@@ -89,10 +89,10 @@ void main() {
89
89
  background-size: cover;
90
90
  background-position: center;
91
91
  background-repeat: no-repeat;
92
- `,V=f.canvas`
92
+ `,V=m.canvas`
93
93
  position: absolute;
94
94
  inset: 0;
95
95
  width: 100%;
96
96
  height: 100%;
97
- `;function K({patternTiling:e=1.66}){const a=u.useRef(null),n=u.useRef(0),r=u.useRef(e);return r.current=e,u.useEffect(()=>{var _;const o=a.current;if(!o||(_=window.matchMedia)!=null&&_.call(window,"(prefers-reduced-motion: reduce)").matches)return;const t=o.getContext("webgl",{alpha:!1,antialias:!1});if(!t)return;const c=p(t,t.VERTEX_SHADER,L),s=p(t,t.FRAGMENT_SHADER,I);if(!c||!s){c&&t.deleteShader(c),s&&t.deleteShader(s);return}const i=B(t,c,s);if(!i){t.deleteShader(c),t.deleteShader(s);return}const m=t.getAttribLocation(i,"a_position"),R=t.getUniformLocation(i,"u_time"),b=t.getUniformLocation(i,"u_resolution"),w=t.getUniformLocation(i,"u_overlayTex"),A=t.getUniformLocation(i,"u_overlayTiling"),v=t.createBuffer();t.bindBuffer(t.ARRAY_BUFFER,v),t.bufferData(t.ARRAY_BUFFER,new Float32Array([-1,-1,1,-1,-1,1,-1,1,1,-1,1,1]),t.STATIC_DRAW);let g=!1;const h=F(t,P,()=>g),S=()=>{const l=window.devicePixelRatio||1,E=o.clientWidth*l,x=o.clientHeight*l;(o.width!==E||o.height!==x)&&(o.width=E,o.height=x)},U=performance.now()/1e3,y=()=>{S(),t.viewport(0,0,o.width,o.height),t.useProgram(i),t.uniform1f(R,performance.now()/1e3-U),t.uniform2f(b,o.width,o.height),t.uniform1f(A,r.current),t.activeTexture(t.TEXTURE0),t.bindTexture(t.TEXTURE_2D,h),t.uniform1i(w,0),t.enableVertexAttribArray(m),t.bindBuffer(t.ARRAY_BUFFER,v),t.vertexAttribPointer(m,2,t.FLOAT,!1,0,0),t.drawArrays(t.TRIANGLES,0,6),n.current=requestAnimationFrame(y)},T=l=>{l.preventDefault(),cancelAnimationFrame(n.current),o.style.opacity="0"};return o.addEventListener("webglcontextlost",T,!1),n.current=requestAnimationFrame(y),()=>{g=!0,cancelAnimationFrame(n.current),o.removeEventListener("webglcontextlost",T),t.deleteProgram(i),t.deleteShader(c),t.deleteShader(s),t.deleteBuffer(v),t.deleteTexture(h)}},[]),d.jsxs(C,{"aria-hidden":!0,children:[d.jsx(k,{style:{backgroundImage:`url(${D})`}}),d.jsx(V,{ref:a})]})}export{K as default};
98
- //# sourceMappingURL=AnimatedBackground-CrMQFUxR.js.map
97
+ `;function K({patternTiling:e=1.66}){const a=u.useRef(null),n=u.useRef(0),r=u.useRef(e);return r.current=e,u.useEffect(()=>{var _;const o=a.current;if(!o||(_=window.matchMedia)!=null&&_.call(window,"(prefers-reduced-motion: reduce)").matches)return;const t=o.getContext("webgl",{alpha:!1,antialias:!1});if(!t)return;const c=p(t,t.VERTEX_SHADER,L),s=p(t,t.FRAGMENT_SHADER,I);if(!c||!s){c&&t.deleteShader(c),s&&t.deleteShader(s);return}const i=B(t,c,s);if(!i){t.deleteShader(c),t.deleteShader(s);return}const f=t.getAttribLocation(i,"a_position"),R=t.getUniformLocation(i,"u_time"),w=t.getUniformLocation(i,"u_resolution"),b=t.getUniformLocation(i,"u_overlayTex"),A=t.getUniformLocation(i,"u_overlayTiling"),v=t.createBuffer();t.bindBuffer(t.ARRAY_BUFFER,v),t.bufferData(t.ARRAY_BUFFER,new Float32Array([-1,-1,1,-1,-1,1,-1,1,1,-1,1,1]),t.STATIC_DRAW);let g=!1;const h=F(t,P,()=>g),S=()=>{const l=window.devicePixelRatio||1,E=o.clientWidth*l,x=o.clientHeight*l;(o.width!==E||o.height!==x)&&(o.width=E,o.height=x)},U=performance.now()/1e3,y=()=>{S(),t.viewport(0,0,o.width,o.height),t.useProgram(i),t.uniform1f(R,performance.now()/1e3-U),t.uniform2f(w,o.width,o.height),t.uniform1f(A,r.current),t.activeTexture(t.TEXTURE0),t.bindTexture(t.TEXTURE_2D,h),t.uniform1i(b,0),t.enableVertexAttribArray(f),t.bindBuffer(t.ARRAY_BUFFER,v),t.vertexAttribPointer(f,2,t.FLOAT,!1,0,0),t.drawArrays(t.TRIANGLES,0,6),n.current=requestAnimationFrame(y)},T=l=>{l.preventDefault(),cancelAnimationFrame(n.current),o.style.opacity="0"};return o.addEventListener("webglcontextlost",T,!1),n.current=requestAnimationFrame(y),()=>{g=!0,cancelAnimationFrame(n.current),o.removeEventListener("webglcontextlost",T),t.deleteProgram(i),t.deleteShader(c),t.deleteShader(s),t.deleteBuffer(v),t.deleteTexture(h)}},[]),d.jsxs(C,{"aria-hidden":!0,children:[d.jsx(k,{style:{backgroundImage:`url(${D})`}}),d.jsx(V,{ref:a})]})}export{K as default};
98
+ //# sourceMappingURL=AnimatedBackground-VRW8L0l_.js.map
@@ -1,4 +1,4 @@
1
- import{r as u,b as Ze,j as e,a as yt,u as wt}from"./react-FXc7nqwH.js";import{c as ie,r as jt,b as vt,bG as Ct,h as Xe,j as Ye,bD as $t,bd as kt,bb as St,w as Et,cW as Rt,cX as Tt,s as i,a as t,x as dt,bm as _t,X as Mt,F as ht,t as s,cY as At,bJ as We,D as Nt,I,z as X,cZ as ze,E as fe,bl as Lt,l as It,O as Re,bx as Je,Z as Wt,bF as zt,B as pt,a0 as ut,m as ft,cd as Pt,ce as Bt,y as Ft,bS as Ot,ay as Ut,a2 as Ht,a4 as et,a5 as me,aJ as Dt,bT as Gt,bU as qt}from"./index-nSSZPEcQ.js";import{u as Kt,s as Vt}from"./search-empty-A1mcW5hg.js";import{u as Zt,l as Qt,m as Xt,S as Yt,F as Jt,a as en}from"./Filters-CE5Se0va.js";import{R as tn,S as nn,a as sn,D as an,b as on,C as rn,c as ln,d as cn,e as dn,M as hn}from"./browseLayout.styles-BS0Dz4kA.js";import{L as pn}from"./LoadMore-BkE5uYS9.js";import{u as un}from"./useInfiniteGrid-BqiJGvSL.js";import{E as fn}from"./ErrorNotice-D4gUUlIi.js";import{d as mn}from"./dcl-schemas-BzKcn35u.js";import{s as xn,G as gn,w as bn,S as yn}from"./buy-gasless-C0avfgHT.js";import{s as wn}from"./buy-ClGvxms1.js";import{u as jn,A as vn,C as Cn}from"./trade-encoding-DL68aw8i.js";import{f as $n}from"./errors-CZmHqf_k.js";import{J as kn,C as Sn,B as Te}from"./ethers-BucT1p_V.js";import{z as En,D as Rn,w as Tn,W as _n,m as Mn,n as An,o as Nn,v as Ln,j as tt}from"./CreditPackPicker-BErMoUfP.js";import{u as In,M as Wn,o as zn,l as Pn,R as Bn,c as Fn}from"./loader-logo-DwsS7kg_.js";import{P as On}from"./PaymentMethodStep-Ds38VNPS.js";import{R as nt}from"./resume-name-CTD9LAM1.js";import{R as Un}from"./resume-buy-CipoTQ_1.js";import{n as Hn}from"./name-glyph-aUugT8vq.js";import{c as Dn}from"./crumbs.styles-Bz51sAXJ.js";import{n as Gn}from"./Tooltip-l5J-TLhj.js";import{G as qn}from"./grid.styles-BptDd5gG.js";import"./sentry-Dqbs4IC8.js";import"./intl-AKLEHPeO.js";import"./skeleton.styles-CZZ4EBRf.js";import"./sendMetaTransaction-D3hyCNbd.js";import"./mana-matic-CEqvSwrJ.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},a=new n.Error().stack;a&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[a]="02caf61b-f0fd-49c5-9bf6-251cc4d17ebd",n._sentryDebugIdIdentifier="sentry-dbid-02caf61b-f0fd-49c5-9bf6-251cc4d17ebd")}catch{}})();function xe(n){const a=n.source??"item",r=n.tradeId||`${n.contractAddress}-${n.tokenId??n.itemId??""}`;return`${a}:${r}`}const Y="100000000000000000000",mt=2,_e=15,Kn=/^[a-zA-Z0-9]+$/;function st(n){const a=n.trim();return a.length===0?{ok:!1,reason:"empty"}:Kn.test(a)?a.length<mt?{ok:!1,reason:"too-short"}:a.length>_e?{ok:!1,reason:"too-long"}:{ok:!0}:{ok:!1,reason:"invalid-chars"}}function Vn(n){return n.replace(/[^a-zA-Z0-9]/g,"").slice(0,_e)}const Zn=["function available(string _subdomain) view returns (bool)"],it={mainnet:{rpc:"https://rpc.decentraland.org/mainnet",address:"0x2a187453064356c898cae034eaed119e1663acb8"},sepolia:{rpc:"https://rpc.decentraland.org/sepolia",address:"0x7518456ae93eb98f3e64571b689c626616bb7f30"}};function Qn(){return ie.chainId===Number(mn.ChainId.MATIC_MAINNET)?it.mainnet:it.sepolia}async function Xn(n,a={}){var c;const{rpc:r,address:d}=Qn(),h=new kn(r),b=new Sn(d,Zn,h);console.info(`[names] availability check → DCLRegistrar(${d}).available("${n}") on ${r}`);const j=await b.available(n);if((c=a.signal)!=null&&c.aborted)throw new DOMException("Aborted","AbortError");return console.info(`[names] "${n}" available=${j}`),j?"available":"taken"}const Yn="https://app.across.to/api";class Qe extends Error{constructor(){super("Name registration is temporarily unavailable due to high network costs"),this.name="NameRouteCostTooHighError"}}class Ke extends Error{constructor(){super("The name could not be registered on Ethereum; your funds were recovered."),this.name="NameNotRegisteredError"}}class Ve extends Error{constructor(){super("We couldn't confirm whether the purchase went through."),this.name="NameSettlementUnknownError"}}function Jn(n){return kt(Y,n)}async function es(n,a,r={}){var c;const d=r.chainId??ie.chainId,h=r.provider??"across",b=`${ie.creditsServerUrl}/credits-name-route?name=${encodeURIComponent(a)}&chainId=${d}&provider=${h}`,j=await St(b,{method:"GET",identity:n,metadata:{}});if(!j.ok){let l;try{l=(c=await j.json())==null?void 0:c.code}catch{}throw l==="ROUTE_COST_TOO_HIGH"?new Qe:new Error(`fetchNameCreditRoute ${j.status}`)}return j.json()}function ts(n,a){const r=Te.from(n.availableAmount),h=Te.from(Y).sub(r);return{credits:[{value:n.amount,expiresAt:Number(n.expiresAt),salt:Cn(n.id)}],creditsSignatures:[n.signature],externalCall:{target:a.externalCall.target,selector:a.externalCall.selector,data:a.externalCall.data,expiresAt:a.externalCall.expiresAt,salt:a.externalCall.salt},customExternalCallSignature:a.customExternalCallSignature,maxUncreditedValue:h.isNegative()?"0":h.toString(),maxCreditedValue:Y}}async function ns(n,a={}){const r=Yn,d=a.intervalMs??1e4,h=a.maxAttempts??60;let b={status:"pending",destinationTxHash:null,actionsSucceeded:null};for(let j=0;j<h;j++){try{const c=await fetch(`${r}/deposit/status?originChainId=137&depositTxHash=${n}`);if(c.ok){const l=await c.json(),w=(l.status??"pending").toLowerCase(),g=l.fillTx??l.fillTxnRef??null,C=typeof l.actionsSucceeded=="boolean"?l.actionsSucceeded:null;if(w==="filled")return{status:"filled",destinationTxHash:g,actionsSucceeded:C};if(w==="refunded"||w==="expired")return{status:w,destinationTxHash:null,actionsSucceeded:!1};b={status:"pending",destinationTxHash:g,actionsSucceeded:C}}}catch{}j<h-1&&await new Promise(c=>setTimeout(c,d))}return b}async function ss(n){const{name:a,identity:r,signer:d}=n,h=g=>{var C;try{(C=n.onProgress)==null||C.call(n,g)}catch{}},b=n.chainId??ie.chainId,j=n.provider??"across",c=(n.beneficiary??await d.getAddress()).toLowerCase();let l=null,w="unconfirmed";console.info("[names] register start",{name:a,buyer:c,chainId:b,provider:j}),h("preparing");try{const g=await jt(vt(ie.chainId).address),C=Jn(g),y=n.creditsCents!=null?Math.max(1,Math.min(Math.trunc(n.creditsCents),C)):C,A=y<C;console.info("[names] step 1/6 sized reservation",{usdCents:y,fullPriceCents:C,payingWithMana:A,manaRate:g});const p=await es(r,a,{chainId:b,provider:j});console.info("[names] step 2/6 route fetched",{target:p.externalCall.target,selector:p.externalCall.selector,provider:p.provider,quoteId:p.quoteId});const v=await Ct(r,y,void 0,void 0,a);if(l=v.credit.id,console.info("[names] step 3/6 credit authorized",{creditId:v.credit.id,maxCreditedValue:v.maxCreditedValue}),!A&&Te.from(v.maxCreditedValue).lt(Y))throw new Error("Credit under-sized for the name price");if(A){const x=Te.from(Y).sub(v.credit.availableAmount);if(n.maxManaWei!=null&&x.gt(n.maxManaWei.toString()))throw new Error("The MANA needed moved past what was agreed");x.gt(0)&&(h("awaiting-confirmation"),await jn({auth:{kind:vn.Allowance,contractAddress:Xe(Ye.MANAToken,b).address,spenderAddress:Xe(Ye.CreditsManager,b).address,chainId:b},signer:d,requiredWei:BigInt(x.toString())}),console.info("[names] step 3b/6 mana allowance ensured",{gapWei:x.toString()}))}h("awaiting-confirmation");const m=ts(v.credit,p);let $;try{$=await xn({chainId:b,buyer:c,signer:d,args:m})}catch(x){if(!(x instanceof gn))throw x;if(x.reason==="relayer-unreachable"){w="unobservable";const T=new Ve;throw T.cause=x,T}$=await wn(b,m,d)}if(console.info("[names] step 4/6 useCredits submitted (Polygon origin tx)",{originTxHash:$}),h("confirming"),await bn($),w="confirmed",console.info("[names] step 5/6 origin tx confirmed",{originTxHash:$}),j==="across"){h("registering");const x=await ns($,n.acrossPoll);if(console.info("[names] step 6/6 across status",x),x.status==="pending")return{status:"pending",originTxHash:$};if(x.status==="filled"&&x.actionsSucceeded===null)return console.warn("[names] across filled without reporting actionsSucceeded — reporting pending",{originTxHash:$}),{status:"pending",originTxHash:$};if(x.status!=="filled"||x.actionsSucceeded!==!0)throw new Ke;return{status:"registered",originTxHash:$,destinationTxHash:x.destinationTxHash}}return{status:"pending",originTxHash:$}}catch(g){if(console.error("[names] register failed — raw error:",g,{name:a,buyer:c,originState:w}),g instanceof yn)return{status:"pending",originTxHash:g.txHash};if(l&&w==="unconfirmed"&&await $t(r,[l]).catch(()=>{}),g instanceof Qe||g instanceof Ke||g instanceof Ve)throw g;const C=new Error($n(g,"Couldn't register the name. Please try again.",{sale:!0}));throw C.cause=g,C}}function is(){const{data:n}=Et({queryKey:["feature-flag","shop-names"],queryFn:()=>Rt(Tt.SHOP_NAMES),staleTime:6e4,refetchOnWindowFocus:!0,retry:1});return n===!0}const as=60,os=700,rs=25;function ls(n){if(!n)return[];const a=[];for(let r=1;r<=n.length;r++)a.push({text:n.slice(0,r),delay:as});a[a.length-1]={text:n,delay:os};for(let r=n.length-1;r>=1;r--)a.push({text:n.slice(0,r),delay:rs});return a}function cs(n){return n.flatMap(ls)}function ds(n,a){const r=u.useMemo(()=>cs(n),[n]),[d,h]=u.useState(0);return u.useEffect(()=>{if(!a||r.length===0)return;const b=setTimeout(()=>h(j=>(j+1)%r.length),r[d%r.length].delay);return()=>clearTimeout(b)},[d,a,r]),!a||r.length===0?"":r[d%r.length].text}const hs="https://cdn.decentraland.org/@dcl/shop/1.19.1-36725058668.commit-fcdf1ab/_assets/name-verified-oGwQ3ntb.svg",ps="#34fee6",us=i.div`
1
+ import{r as u,b as Ze,j as e,a as yt,u as wt}from"./react-BFIm3j2a.js";import{c as ie,r as jt,b as vt,bG as Ct,h as Xe,j as Ye,bD as $t,bd as kt,bb as St,w as Et,cW as Rt,cX as Tt,s as i,a as t,x as dt,bm as _t,X as Mt,F as ht,t as s,cY as At,bJ as We,D as Nt,I,z as X,cZ as ze,E as me,bl as Lt,l as It,O as Re,bx as Je,Z as Wt,bF as zt,B as pt,a0 as ut,m as mt,cd as Pt,ce as Bt,y as Ft,bS as Ot,ay as Ut,a2 as Ht,a4 as et,a5 as fe,aJ as Dt,bT as Gt,bU as qt}from"./index-DTrZkeIu.js";import{u as Kt,s as Vt}from"./search-empty-ClovaM0p.js";import{u as Zt,l as Qt,m as Xt,S as Yt,F as Jt,a as en}from"./Filters-CEz8bjG2.js";import{R as tn,S as nn,a as sn,D as an,b as on,C as rn,c as ln,d as cn,e as dn,M as hn}from"./browseLayout.styles-Bgc_8ycQ.js";import{L as pn}from"./LoadMore-BTzn9wsv.js";import{u as un}from"./useInfiniteGrid-Cv5x7S43.js";import{E as mn}from"./ErrorNotice-l-B8k9a3.js";import{d as fn}from"./dcl-schemas-FmJ72SB7.js";import{s as xn,G as gn,w as bn,S as yn}from"./buy-gasless-_RaoHNGk.js";import{s as wn}from"./buy-GBacz4js.js";import{u as jn,A as vn,C as Cn}from"./trade-encoding-CmoxrKUz.js";import{f as $n}from"./errors-BxIUc_Lk.js";import{J as kn,C as Sn,B as Te}from"./ethers-CoY9-2x5.js";import{z as En,D as Rn,w as Tn,W as _n,m as Mn,n as An,o as Nn,v as Ln,j as tt}from"./CreditPackPicker-IzExNyem.js";import{u as In,M as Wn,o as zn,l as Pn,R as Bn,c as Fn}from"./loader-logo-BBzKPg1y.js";import{P as On}from"./PaymentMethodStep-DM8c-3bT.js";import{R as nt}from"./resume-name-1aj-wXcn.js";import{R as Un}from"./resume-buy-C9bQiOkt.js";import{n as Hn}from"./name-glyph-aUugT8vq.js";import{c as Dn}from"./crumbs.styles-CHgrOACG.js";import{n as Gn}from"./Tooltip-DlenNQy2.js";import{G as qn}from"./grid.styles-DdTmyIUo.js";import"./sentry-B6w4u-W-.js";import"./intl-AKLEHPeO.js";import"./skeleton.styles-bqklkUaQ.js";import"./sendMetaTransaction-yPqWszKC.js";import"./mana-matic-CEqvSwrJ.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},a=new n.Error().stack;a&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[a]="5cb3e364-7800-4145-a532-079d39be887a",n._sentryDebugIdIdentifier="sentry-dbid-5cb3e364-7800-4145-a532-079d39be887a")}catch{}})();function xe(n){const a=n.source??"item",r=n.tradeId||`${n.contractAddress}-${n.tokenId??n.itemId??""}`;return`${a}:${r}`}const Y="100000000000000000000",ft=2,_e=15,Kn=/^[a-zA-Z0-9]+$/;function st(n){const a=n.trim();return a.length===0?{ok:!1,reason:"empty"}:Kn.test(a)?a.length<ft?{ok:!1,reason:"too-short"}:a.length>_e?{ok:!1,reason:"too-long"}:{ok:!0}:{ok:!1,reason:"invalid-chars"}}function Vn(n){return n.replace(/[^a-zA-Z0-9]/g,"").slice(0,_e)}const Zn=["function available(string _subdomain) view returns (bool)"],it={mainnet:{rpc:"https://rpc.decentraland.org/mainnet",address:"0x2a187453064356c898cae034eaed119e1663acb8"},sepolia:{rpc:"https://rpc.decentraland.org/sepolia",address:"0x7518456ae93eb98f3e64571b689c626616bb7f30"}};function Qn(){return ie.chainId===Number(fn.ChainId.MATIC_MAINNET)?it.mainnet:it.sepolia}async function Xn(n,a={}){var c;const{rpc:r,address:d}=Qn(),h=new kn(r),b=new Sn(d,Zn,h);console.info(`[names] availability check → DCLRegistrar(${d}).available("${n}") on ${r}`);const j=await b.available(n);if((c=a.signal)!=null&&c.aborted)throw new DOMException("Aborted","AbortError");return console.info(`[names] "${n}" available=${j}`),j?"available":"taken"}const Yn="https://app.across.to/api";class Qe extends Error{constructor(){super("Name registration is temporarily unavailable due to high network costs"),this.name="NameRouteCostTooHighError"}}class Ke extends Error{constructor(){super("The name could not be registered on Ethereum; your funds were recovered."),this.name="NameNotRegisteredError"}}class Ve extends Error{constructor(){super("We couldn't confirm whether the purchase went through."),this.name="NameSettlementUnknownError"}}function Jn(n){return kt(Y,n)}async function es(n,a,r={}){var c;const d=r.chainId??ie.chainId,h=r.provider??"across",b=`${ie.creditsServerUrl}/credits-name-route?name=${encodeURIComponent(a)}&chainId=${d}&provider=${h}`,j=await St(b,{method:"GET",identity:n,metadata:{}});if(!j.ok){let l;try{l=(c=await j.json())==null?void 0:c.code}catch{}throw l==="ROUTE_COST_TOO_HIGH"?new Qe:new Error(`fetchNameCreditRoute ${j.status}`)}return j.json()}function ts(n,a){const r=Te.from(n.availableAmount),h=Te.from(Y).sub(r);return{credits:[{value:n.amount,expiresAt:Number(n.expiresAt),salt:Cn(n.id)}],creditsSignatures:[n.signature],externalCall:{target:a.externalCall.target,selector:a.externalCall.selector,data:a.externalCall.data,expiresAt:a.externalCall.expiresAt,salt:a.externalCall.salt},customExternalCallSignature:a.customExternalCallSignature,maxUncreditedValue:h.isNegative()?"0":h.toString(),maxCreditedValue:Y}}async function ns(n,a={}){const r=Yn,d=a.intervalMs??1e4,h=a.maxAttempts??60;let b={status:"pending",destinationTxHash:null,actionsSucceeded:null};for(let j=0;j<h;j++){try{const c=await fetch(`${r}/deposit/status?originChainId=137&depositTxHash=${n}`);if(c.ok){const l=await c.json(),w=(l.status??"pending").toLowerCase(),g=l.fillTx??l.fillTxnRef??null,C=typeof l.actionsSucceeded=="boolean"?l.actionsSucceeded:null;if(w==="filled")return{status:"filled",destinationTxHash:g,actionsSucceeded:C};if(w==="refunded"||w==="expired")return{status:w,destinationTxHash:null,actionsSucceeded:!1};b={status:"pending",destinationTxHash:g,actionsSucceeded:C}}}catch{}j<h-1&&await new Promise(c=>setTimeout(c,d))}return b}async function ss(n){const{name:a,identity:r,signer:d}=n,h=g=>{var C;try{(C=n.onProgress)==null||C.call(n,g)}catch{}},b=n.chainId??ie.chainId,j=n.provider??"across",c=(n.beneficiary??await d.getAddress()).toLowerCase();let l=null,w="unconfirmed";console.info("[names] register start",{name:a,buyer:c,chainId:b,provider:j}),h("preparing");try{const g=await jt(vt(ie.chainId).address),C=Jn(g),y=n.creditsCents!=null?Math.max(1,Math.min(Math.trunc(n.creditsCents),C)):C,A=y<C;console.info("[names] step 1/6 sized reservation",{usdCents:y,fullPriceCents:C,payingWithMana:A,manaRate:g});const p=await es(r,a,{chainId:b,provider:j});console.info("[names] step 2/6 route fetched",{target:p.externalCall.target,selector:p.externalCall.selector,provider:p.provider,quoteId:p.quoteId});const v=await Ct(r,y,void 0,void 0,a);if(l=v.credit.id,console.info("[names] step 3/6 credit authorized",{creditId:v.credit.id,maxCreditedValue:v.maxCreditedValue}),!A&&Te.from(v.maxCreditedValue).lt(Y))throw new Error("Credit under-sized for the name price");if(A){const x=Te.from(Y).sub(v.credit.availableAmount);if(n.maxManaWei!=null&&x.gt(n.maxManaWei.toString()))throw new Error("The MANA needed moved past what was agreed");x.gt(0)&&(h("awaiting-confirmation"),await jn({auth:{kind:vn.Allowance,contractAddress:Xe(Ye.MANAToken,b).address,spenderAddress:Xe(Ye.CreditsManager,b).address,chainId:b},signer:d,requiredWei:BigInt(x.toString())}),console.info("[names] step 3b/6 mana allowance ensured",{gapWei:x.toString()}))}h("awaiting-confirmation");const f=ts(v.credit,p);let $;try{$=await xn({chainId:b,buyer:c,signer:d,args:f})}catch(x){if(!(x instanceof gn))throw x;if(x.reason==="relayer-unreachable"){w="unobservable";const T=new Ve;throw T.cause=x,T}$=await wn(b,f,d)}if(console.info("[names] step 4/6 useCredits submitted (Polygon origin tx)",{originTxHash:$}),h("confirming"),await bn($),w="confirmed",console.info("[names] step 5/6 origin tx confirmed",{originTxHash:$}),j==="across"){h("registering");const x=await ns($,n.acrossPoll);if(console.info("[names] step 6/6 across status",x),x.status==="pending")return{status:"pending",originTxHash:$};if(x.status==="filled"&&x.actionsSucceeded===null)return console.warn("[names] across filled without reporting actionsSucceeded — reporting pending",{originTxHash:$}),{status:"pending",originTxHash:$};if(x.status!=="filled"||x.actionsSucceeded!==!0)throw new Ke;return{status:"registered",originTxHash:$,destinationTxHash:x.destinationTxHash}}return{status:"pending",originTxHash:$}}catch(g){if(console.error("[names] register failed — raw error:",g,{name:a,buyer:c,originState:w}),g instanceof yn)return{status:"pending",originTxHash:g.txHash};if(l&&w==="unconfirmed"&&await $t(r,[l]).catch(()=>{}),g instanceof Qe||g instanceof Ke||g instanceof Ve)throw g;const C=new Error($n(g,"Couldn't register the name. Please try again.",{sale:!0}));throw C.cause=g,C}}function is(){const{data:n}=Et({queryKey:["feature-flag","shop-names"],queryFn:()=>Rt(Tt.SHOP_NAMES),staleTime:6e4,refetchOnWindowFocus:!0,retry:1});return n===!0}const as=60,os=700,rs=25;function ls(n){if(!n)return[];const a=[];for(let r=1;r<=n.length;r++)a.push({text:n.slice(0,r),delay:as});a[a.length-1]={text:n,delay:os};for(let r=n.length-1;r>=1;r--)a.push({text:n.slice(0,r),delay:rs});return a}function cs(n){return n.flatMap(ls)}function ds(n,a){const r=u.useMemo(()=>cs(n),[n]),[d,h]=u.useState(0);return u.useEffect(()=>{if(!a||r.length===0)return;const b=setTimeout(()=>h(j=>(j+1)%r.length),r[d%r.length].delay);return()=>clearTimeout(b)},[d,a,r]),!a||r.length===0?"":r[d%r.length].text}const hs="https://cdn.decentraland.org/@dcl/shop/1.19.1-36725100317.commit-9ad1d65/_assets/name-verified-oGwQ3ntb.svg",ps="#34fee6",us=i.div`
2
2
  position: fixed;
3
3
  inset: 0;
4
4
  z-index: 10000;
@@ -7,7 +7,7 @@ import{r as u,b as Ze,j as e,a as yt,u as wt}from"./react-FXc7nqwH.js";import{c
7
7
  justify-content: center;
8
8
  padding: 16px;
9
9
  background: rgba(22, 21, 24, 0.55);
10
- `,fs=i.div`
10
+ `,ms=i.div`
11
11
  width: 560px;
12
12
  max-width: 100%;
13
13
  max-height: 92vh;
@@ -77,7 +77,7 @@ import{r as u,b as Ze,j as e,a as yt,u as wt}from"./react-FXc7nqwH.js";import{c
77
77
  display: flex;
78
78
  align-items: center;
79
79
  gap: 16px;
80
- `,ms=i.div`
80
+ `,fs=i.div`
81
81
  flex: none;
82
82
  display: flex;
83
83
  flex-direction: column;
@@ -509,7 +509,7 @@ import{r as u,b as Ze,j as e,a as yt,u as wt}from"./react-FXc7nqwH.js";import{c
509
509
  font-size: 32px;
510
510
  font-weight: 700;
511
511
  color: ${t.colors.white};
512
- `;function Os({name:n,priceCredits:a,onClose:r}){const{session:d}=dt(),{data:h,isError:b}=_t(d),j=Mt(),c=Ze(),[l,w]=u.useState("confirm"),[g,C]=u.useState(""),[y,A]=u.useState(""),[p,v]=u.useState(!1),[m,$]=u.useState(null),x=(m==null?void 0:m.rail)??"credits",[T,B]=u.useState(null),[V,ae]=u.useState(!1),[S,_]=u.useState("preparing"),F=u.useRef(!1),H=g.trim().toLowerCase()===n.toLowerCase(),W=l==="completing"||p,N=a!=null?ht(a):"—",L=a==null,O=h==null?void 0:h.credits,D=a!=null&&O!=null?a-O:0,z=D>0,U=L?s("names.priceUnavailable"):null,{data:Z}=At(d),Q=(Z==null?void 0:Z.matic)??0n,G=Tn({priceCents:a!=null?a*We:0,priceManaWei:BigInt(Y),balanceCents:(h==null?void 0:h.balanceCents)??0,manaBalanceWei:Q,manaOnlyRail:!1}),E=G.options.some(f=>f.method!=="credits"),M=G.options.find(f=>f.method==="combined"),P=m==null&&E&&!L,R=In().packs.slice(0,Wn),{packs:q,recommended:J,closesGap:Me}=zn(R,D),K=q.find(f=>f.id===y)??J;u.useEffect(()=>{const f=k=>{k.key==="Escape"&&!W&&r()};return document.addEventListener("keydown",f),()=>document.removeEventListener("keydown",f)},[W,r]);async function Ae(){if(!d||!H||L||F.current||x==="credits"&&z)return;F.current=!0;const f=x==="combined"?Math.floor(((m==null?void 0:m.creditsCents)??0)/We):a??null;w("completing"),B(null),_("preparing");try{const k=await ss({name:n,identity:d.identity,signer:d.signer,creditsCents:m==null?void 0:m.creditsCents,maxManaWei:m==null?void 0:m.manaWei,onProgress:_});Re("Shop Completed Purchase",{items:[{item_id:null,contract_address:null,token_id:null,price_usd:Je(a??0),category:"name",is_smart:!1}],purchase_type:"name",is_primary:!0,payment_type:x==="combined"?"credits_and_mana":"credits",value_credits:f,value_usd:Je(f??0),transaction_hash:k.originTxHash??null,settlement:k.status}),j.invalidateQueries({queryKey:["usd-balance"]}),j.invalidateQueries({queryKey:["my-assets"]}),w(k.status==="registered"?"success":"pending")}catch(k){Re(zt(k)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:Wt(k),purchase_type:"name"});const ce=k instanceof Ke,de=k instanceof Ve;B(k instanceof Qe?s("names.errorRouteCost"):ce?s("names.errorNotRegistered"):de?s("names.errorSettlementUnknown"):(k==null?void 0:k.message)||s("names.errorGeneric")),ae(ce||de),w("error")}finally{F.current=!1}}u.useEffect(()=>{const f=k=>{k.persisted&&v(!1)};return window.addEventListener("pageshow",f),()=>window.removeEventListener("pageshow",f)},[]);async function Ne(){if(!(!d||!K||p)){v(!0);try{sessionStorage.removeItem(Bn),sessionStorage.removeItem(Un),sessionStorage.setItem(nt,n)}catch{}try{const f=await Fn(K.id,{address:d.address,identity:d.identity});if(f.url){window.location.href=f.url;return}if(!f.orderId)throw new Error("Checkout returned neither a redirect url nor an order id");c(`/credits?order=${encodeURIComponent(f.orderId)}`)}catch(f){It(f,{flow:"name_buy_credits"});try{sessionStorage.removeItem(nt)}catch{}B(s("buyModal.error.creditsCheckout")),ae(!1),w("error"),v(!1)}}}const te=l!=="success"&&l!=="pending"&&!P,oe=Nt(d==null?void 0:d.providerType),he=oe?2:1,pe=oe&&(S==="preparing"||S==="awaiting-confirmation"),Le=pe?1:he,Ie=pe?s("names.confirming"):S==="registering"?s("names.registering"):s("names.completing"),re=S==="registering"?s("names.processingRegistering"):null,ne=l==="confirm"&&z&&!E,le=l==="error"?s("names.errorTitle"):ne?s("names.buyCreditsTitle"):s("names.buyTitle");return e.jsx(us,{onClick:W?void 0:r,role:"presentation",children:e.jsxs(fs,{role:"dialog","aria-modal":"true","aria-label":le,onClick:f=>f.stopPropagation(),children:[te&&e.jsxs(e.Fragment,{children:[e.jsxs(Pe,{children:[e.jsx(Be,{children:le}),e.jsx(Fe,{onClick:r,disabled:W,"aria-label":s("buyModal.close"),children:e.jsx(I,{name:"close"})})]}),e.jsxs(Oe,{children:[s("names.myCreditsBalance")," ",e.jsx(X,{})," ",ze(h,b)]}),e.jsx(Ue,{})]}),ne&&e.jsxs(Ps,{children:[e.jsxs(_n,{children:[e.jsx(Mn,{}),e.jsxs(An,{children:[e.jsx("b",{children:s("buyModal.insufficientFunds")})," ",s("buyModal.warningNeedToBuy")," ",e.jsx("b",{children:s("buyModal.warningCreditsAmount",{count:D})})," ",s("names.warningToPurchase"),fe()?null:e.jsxs(e.Fragment,{children:[" ",e.jsx(Nn,{href:Lt("/credits"),target:"_blank",rel:"noopener noreferrer",children:s("buyModal.warningLearnMore")})]})]})]}),fe()?e.jsxs(ge,{"data-testid":"name-row-iap",children:[e.jsx(He,{"aria-hidden":!0,children:"@"}),e.jsxs(be,{children:[e.jsxs(ye,{children:[n,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(we,{children:s("names.subtitle")})]}),e.jsxs(je,{children:[e.jsx(X,{}),N]})]}):null,fe()?null:e.jsx(e.Fragment,{children:e.jsx(Ln,{packs:q,selectedId:K==null?void 0:K.id,onSelect:A,recommendedId:Me?J==null?void 0:J.id:void 0})}),e.jsxs(Bs,{children:[e.jsx(tt,{"data-variant":"outline",onClick:r,disabled:W,"data-testid":"name-topup-cancel",children:s("buyModal.cancel")}),fe()?null:e.jsx(tt,{"data-variant":"gradient","data-testid":"name-buy-credits",disabled:!d||!K||p,onClick:()=>void Ne(),children:s("buyModal.buy")})]})]}),l==="confirm"&&!ne&&P&&e.jsx(On,{asset:{name:`${n}.dcl.eth`,caption:s("names.subtitle"),thumb:e.jsx(Fs,{"aria-hidden":!0,children:"@"})},priceCredits:a??0,priceCents:(a??0)*We,options:G.options,priceManaWei:BigInt(Y),balanceCredits:(h==null?void 0:h.credits)??0,manaBalanceWei:Q,onBuy:f=>{$(f==="combined"&&M?{rail:"combined",creditsCents:M.creditsCents,manaWei:M.manaWei}:{rail:"credits"})},onClose:r,busy:W}),(l==="confirm"||l==="error")&&!ne&&!P&&e.jsxs(e.Fragment,{children:[e.jsxs(ge,{children:[e.jsx(He,{"aria-hidden":!0,children:"@"}),e.jsxs(be,{children:[e.jsxs(ye,{children:[n,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(we,{children:s("names.subtitle")})]}),e.jsxs(je,{children:[e.jsx(X,{}),N]})]}),l==="error"?e.jsxs(e.Fragment,{children:[e.jsxs(Ge,{children:[e.jsx(I,{name:"info","aria-hidden":!0}),e.jsx("span",{children:T})]}),V?e.jsx(De,{onClick:r,children:s("names.errorSpentDismiss")}):e.jsx(De,{onClick:()=>w("confirm"),children:s("names.tryAgain")})]}):e.jsxs(e.Fragment,{children:[e.jsxs(ys,{children:[e.jsx(ws,{children:s("names.confirmTitle")}),e.jsx(js,{dangerouslySetInnerHTML:{__html:s("names.confirmBody",{name:`<b>@${Us(n)}</b>`})}}),e.jsxs(vs,{children:[e.jsx(Cs,{"aria-hidden":!0,children:"@"}),e.jsx($s,{value:g,onChange:f=>C(f.target.value.replace(/[^a-zA-Z0-9]/g,"")),placeholder:"yourname","aria-label":s("names.reenterAria"),autoComplete:"off",spellCheck:!1,style:{width:`${Math.max(g.length,8)}ch`}}),e.jsx(ks,{children:".dcl.eth"})]})]}),U?e.jsxs(Ge,{"data-tone":"info","data-testid":"name-blocked-reason",children:[e.jsx(I,{name:"info","aria-hidden":!0}),e.jsx("span",{children:U})]}):null,e.jsx(De,{onClick:()=>void Ae(),disabled:!H||!d||L||x==="credits"&&z,children:s("names.buyCta")})]})]}),l==="completing"&&e.jsxs(Ss,{children:[e.jsx(Es,{src:Pn,alt:"",width:61,height:61}),e.jsxs(Rs,{children:[e.jsx(Ts,{children:Ie}),e.jsxs(Ms,{children:[e.jsx(As,{"aria-hidden":!0,children:e.jsx("span",{})}),e.jsx(Ns,{"data-testid":"name-progress-count",children:`${Le}/${he}`})]}),re?e.jsx(_s,{children:re}):null]})]}),l==="pending"&&e.jsxs(e.Fragment,{children:[e.jsxs(Pe,{children:[e.jsx(Be,{children:s("names.pendingHeaderTitle")}),e.jsx(Fe,{onClick:r,"aria-label":s("buyModal.close"),children:e.jsx(I,{name:"close"})})]}),e.jsxs(Oe,{children:[s("names.myCreditsBalance")," ",e.jsx(X,{})," ",ze(h,b)]}),e.jsx(Ue,{}),e.jsxs(Ge,{"data-tone":"info",children:[e.jsx(I,{name:"info","aria-hidden":!0}),e.jsxs("span",{children:[e.jsx("b",{children:s("names.pendingBannerBold")})," ",s("names.pendingBannerRest")]})]}),e.jsxs(ge,{style:{marginTop:20},children:[e.jsx(He,{"aria-hidden":!0,children:"@"}),e.jsxs(be,{children:[e.jsxs(ye,{children:[n,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(we,{children:s("names.subtitle")})]}),e.jsxs(je,{children:[e.jsx(X,{}),N]})]}),e.jsx(at,{children:e.jsx(ot,{onClick:()=>{r(),c("/my-items")},children:s("names.myItems")})})]}),l==="success"&&e.jsxs(e.Fragment,{children:[e.jsxs(Pe,{children:[e.jsx(Be,{children:s("names.successHeaderTitle")}),e.jsx(Fe,{onClick:r,"aria-label":s("buyModal.close"),children:e.jsx(I,{name:"close"})})]}),e.jsxs(Oe,{children:[s("names.myCreditsBalance")," ",e.jsx(X,{})," ",ze(h,b)]}),e.jsx(Ue,{}),e.jsxs(Ls,{children:[e.jsx(Is,{"aria-hidden":!0,children:e.jsx(I,{name:"check"})}),e.jsxs(Ws,{children:[e.jsx("b",{children:s("names.successBannerBold")})," ",s("names.successBannerRest")]})]}),e.jsxs(ge,{style:{marginTop:20},children:[e.jsxs(ms,{"data-testid":"name-success-tile",children:[e.jsx(xs,{src:Hn,alt:"","aria-hidden":!0,width:47,height:47}),e.jsxs(gs,{children:[e.jsx("span",{"aria-hidden":!0,children:n}),e.jsx(bs,{src:hs,alt:"","aria-hidden":!0,width:14,height:14})]})]}),e.jsxs(be,{children:[e.jsxs(ye,{children:[n,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(we,{children:s("names.subtitle")})]}),e.jsxs(je,{children:[e.jsx(X,{}),N]})]}),e.jsxs(at,{children:[e.jsx(ot,{onClick:()=>{r(),c("/my-items")},children:s("names.myItems")}),e.jsx(zs,{href:ie.profileUrl,target:"_blank",rel:"noopener noreferrer",children:s("names.assignToAvatar")})]})]})]})})}function Us(n){return n.replace(/[&<>"']/g,a=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"})[a])}const Hs="https://cdn.decentraland.org/@dcl/shop/1.19.1-36725058668.commit-fcdf1ab/_assets/identity-icon-C8yAW_Gq.svg",Ds="https://cdn.decentraland.org/@dcl/shop/1.19.1-36725058668.commit-fcdf1ab/_assets/world-icon-6xQ-PmmW.svg",Gs="https://cdn.decentraland.org/@dcl/shop/1.19.1-36725058668.commit-fcdf1ab/_assets/invite-icon-Bz6lCTuB.svg",qs="data:image/svg+xml,%3csvg%20width='55.6797'%20height='63.6174'%20viewBox='0%200%2055.6797%2063.6174'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Vote'%3e%3cpath%20id='Vector'%20d='M0.055012%2039.1045C1.61191%2039.4989%202.83757%2039.3938%204.4307%2039.392L8.27108%2039.3878L20.7762%2039.3883L42.8819%2039.3904L50.0954%2039.3907C51.793%2039.3907%2054.0562%2039.5509%2055.6466%2039.0843C55.5909%2040.7931%2055.647%2042.8581%2055.6469%2044.5864L55.6479%2055.616L55.6559%2059.5618C55.6583%2060.6219%2055.8213%2061.9838%2055.261%2062.8837C55.2205%2062.9265%2055.1794%2062.9688%2055.1377%2063.0104C54.7986%2063.3482%2054.3791%2063.5594%2053.9021%2063.5761C52.0714%2063.642%2050.1544%2063.6097%2048.3241%2063.6078L37.4452%2063.6066L2.97352%2063.6103C2.2022%2063.6084%201.15943%2063.6718%200.589171%2063.0576C-0.204857%2062.2037%200.0327979%2060.3244%200.0349529%2059.1687L0.0414734%2054.3929C0.0413119%2049.3191%20-0.00749456%2044.1727%200.055012%2039.1045Z'%20fill='white'%20fill-opacity='0.8'/%3e%3cpath%20id='Subtract'%20d='M37.1168%200.00495927C38.1773%200.00461149%2039.2888%20-0.0284991%2040.3433%200.0811311C41.0714%200.15695%2041.7266%200.914583%2041.7857%201.63484C41.853%202.45491%2041.8268%203.31926%2041.8258%204.15144L41.8189%208.70418L41.8199%2023.9639L40.1099%2023.9659L13.8726%2023.963L13.8678%209.0909L13.8648%204.29793C13.8644%202.52652%2013.3942%200.34203%2015.6754%200.0342561C15.8907%200.016712%2016.237%200.0120998%2016.4557%200.0117952C21.6059%200.00480262%2026.761%200.0117634%2031.9107%200.00788896L37.1168%200.00495927ZM33.3834%206.17293C32.439%206.55612%2031.0531%208.12922%2030.3014%208.88191L25.8297%2013.3634C25.3537%2012.824%2023.3455%2010.7605%2022.8209%2010.4239C22.5581%2010.2549%2022.2566%2010.1546%2021.9449%2010.1329C21.4563%2010.1008%2020.9754%2010.2879%2020.6139%2010.6134C20.2442%2010.9428%2020.0227%2011.4077%2020.0006%2011.9024C19.9561%2013.0748%2021.3406%2014.1198%2022.1256%2014.8868C22.9429%2015.714%2024.1669%2017.1028%2025.1168%2017.67C26.1632%2018.2949%2027.3471%2017.2145%2027.9723%2016.4942C30.25%2014.2025%2032.5393%2011.9456%2034.8101%209.64949C35.2937%209.16062%2035.7138%208.69126%2035.6851%207.96199C35.6419%206.86558%2034.7821%206.09682%2033.6959%206.14656C33.5914%206.15085%2033.4872%206.16001%2033.3834%206.17293Z'%20fill='%23FF7439'/%3e%3cpath%20id='Vector_2'%20d='M45.5498%2015.976C46.6399%2015.986%2049.9504%2015.7705%2050.7361%2016.241C51.0104%2016.4053%2051.2831%2016.6446%2051.4181%2016.9397C51.892%2017.9763%2052.1015%2019.357%2052.3802%2020.4819L54.0582%2027.2308C54.5046%2028.9073%2054.9023%2030.6043%2055.3338%2032.2824C55.6029%2033.329%2055.9417%2034.4293%2054.9705%2035.2255C54.8158%2035.359%2054.4427%2035.5934%2054.2329%2035.6091C52.7731%2035.7184%2051.1693%2035.6701%2049.7108%2035.6679L39.4635%2035.6649L14.5239%2035.6632C10.471%2035.6631%206.41808%2035.6665%202.36531%2035.6698C1.79359%2035.6657%201.33794%2035.6604%200.844568%2035.337C-0.57365%2034.4073%200.381076%2032.2112%200.72189%2030.8501L1.93462%2025.9936L3.28579%2020.566C3.53371%2019.5688%203.77194%2018.5694%204.04289%2017.5781C4.30559%2016.6172%204.74298%2016.1492%205.73966%2015.9892C7.15095%2015.9419%208.72017%2015.9778%2010.1434%2015.9809L10.1451%2023.9585C7.37011%2024.097%207.74242%2027.5535%209.84963%2027.6469C11.6268%2027.7258%2013.6164%2027.6909%2015.4098%2027.691L26.229%2027.6915L39.1339%2027.691L43.273%2027.6909C44.748%2027.6909%2047.2174%2028.0848%2047.3773%2025.9908C47.4212%2025.4807%2047.2565%2024.9745%2046.9209%2024.5879C46.5265%2024.141%2046.1143%2024.0046%2045.5418%2023.9673L45.5498%2015.976Z'%20fill='white'/%3e%3c/g%3e%3c/svg%3e",Ks=i.div`
512
+ `;function Os({name:n,priceCredits:a,onClose:r}){const{session:d}=dt(),{data:h,isError:b}=_t(d),j=Mt(),c=Ze(),[l,w]=u.useState("confirm"),[g,C]=u.useState(""),[y,A]=u.useState(""),[p,v]=u.useState(!1),[f,$]=u.useState(null),x=(f==null?void 0:f.rail)??"credits",[T,B]=u.useState(null),[V,ae]=u.useState(!1),[S,_]=u.useState("preparing"),F=u.useRef(!1),H=g.trim().toLowerCase()===n.toLowerCase(),W=l==="completing"||p,N=a!=null?ht(a):"—",L=a==null,O=h==null?void 0:h.credits,D=a!=null&&O!=null?a-O:0,z=D>0,U=L?s("names.priceUnavailable"):null,{data:Z}=At(d),Q=(Z==null?void 0:Z.matic)??0n,G=Tn({priceCents:a!=null?a*We:0,priceManaWei:BigInt(Y),balanceCents:(h==null?void 0:h.balanceCents)??0,manaBalanceWei:Q,manaOnlyRail:!1}),E=G.options.some(m=>m.method!=="credits"),M=G.options.find(m=>m.method==="combined"),P=f==null&&E&&!L,R=In().packs.slice(0,Wn),{packs:q,recommended:J,closesGap:Me}=zn(R,D),K=q.find(m=>m.id===y)??J;u.useEffect(()=>{const m=k=>{k.key==="Escape"&&!W&&r()};return document.addEventListener("keydown",m),()=>document.removeEventListener("keydown",m)},[W,r]);async function Ae(){if(!d||!H||L||F.current||x==="credits"&&z)return;F.current=!0;const m=x==="combined"?Math.floor(((f==null?void 0:f.creditsCents)??0)/We):a??null;w("completing"),B(null),_("preparing");try{const k=await ss({name:n,identity:d.identity,signer:d.signer,creditsCents:f==null?void 0:f.creditsCents,maxManaWei:f==null?void 0:f.manaWei,onProgress:_});Re("Shop Completed Purchase",{items:[{item_id:null,contract_address:null,token_id:null,price_usd:Je(a??0),category:"name",is_smart:!1}],purchase_type:"name",is_primary:!0,payment_type:x==="combined"?"credits_and_mana":"credits",value_credits:m,value_usd:Je(m??0),transaction_hash:k.originTxHash??null,settlement:k.status}),j.invalidateQueries({queryKey:["usd-balance"]}),j.invalidateQueries({queryKey:["my-assets"]}),w(k.status==="registered"?"success":"pending")}catch(k){Re(zt(k)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:Wt(k),purchase_type:"name"});const ce=k instanceof Ke,de=k instanceof Ve;B(k instanceof Qe?s("names.errorRouteCost"):ce?s("names.errorNotRegistered"):de?s("names.errorSettlementUnknown"):(k==null?void 0:k.message)||s("names.errorGeneric")),ae(ce||de),w("error")}finally{F.current=!1}}u.useEffect(()=>{const m=k=>{k.persisted&&v(!1)};return window.addEventListener("pageshow",m),()=>window.removeEventListener("pageshow",m)},[]);async function Ne(){if(!(!d||!K||p)){v(!0);try{sessionStorage.removeItem(Bn),sessionStorage.removeItem(Un),sessionStorage.setItem(nt,n)}catch{}try{const m=await Fn(K.id,{address:d.address,identity:d.identity});if(m.url){window.location.href=m.url;return}if(!m.orderId)throw new Error("Checkout returned neither a redirect url nor an order id");c(`/credits?order=${encodeURIComponent(m.orderId)}`)}catch(m){It(m,{flow:"name_buy_credits"});try{sessionStorage.removeItem(nt)}catch{}B(s("buyModal.error.creditsCheckout")),ae(!1),w("error"),v(!1)}}}const te=l!=="success"&&l!=="pending"&&!P,oe=Nt(d==null?void 0:d.providerType),he=oe?2:1,pe=oe&&(S==="preparing"||S==="awaiting-confirmation"),Le=pe?1:he,Ie=pe?s("names.confirming"):S==="registering"?s("names.registering"):s("names.completing"),re=S==="registering"?s("names.processingRegistering"):null,ne=l==="confirm"&&z&&!E,le=l==="error"?s("names.errorTitle"):ne?s("names.buyCreditsTitle"):s("names.buyTitle");return e.jsx(us,{onClick:W?void 0:r,role:"presentation",children:e.jsxs(ms,{role:"dialog","aria-modal":"true","aria-label":le,onClick:m=>m.stopPropagation(),children:[te&&e.jsxs(e.Fragment,{children:[e.jsxs(Pe,{children:[e.jsx(Be,{children:le}),e.jsx(Fe,{onClick:r,disabled:W,"aria-label":s("buyModal.close"),children:e.jsx(I,{name:"close"})})]}),e.jsxs(Oe,{children:[s("names.myCreditsBalance")," ",e.jsx(X,{})," ",ze(h,b)]}),e.jsx(Ue,{})]}),ne&&e.jsxs(Ps,{children:[e.jsxs(_n,{children:[e.jsx(Mn,{}),e.jsxs(An,{children:[e.jsx("b",{children:s("buyModal.insufficientFunds")})," ",s("buyModal.warningNeedToBuy")," ",e.jsx("b",{children:s("buyModal.warningCreditsAmount",{count:D})})," ",s("names.warningToPurchase"),me()?null:e.jsxs(e.Fragment,{children:[" ",e.jsx(Nn,{href:Lt("/credits"),target:"_blank",rel:"noopener noreferrer",children:s("buyModal.warningLearnMore")})]})]})]}),me()?e.jsxs(ge,{"data-testid":"name-row-iap",children:[e.jsx(He,{"aria-hidden":!0,children:"@"}),e.jsxs(be,{children:[e.jsxs(ye,{children:[n,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(we,{children:s("names.subtitle")})]}),e.jsxs(je,{children:[e.jsx(X,{}),N]})]}):null,me()?null:e.jsx(e.Fragment,{children:e.jsx(Ln,{packs:q,selectedId:K==null?void 0:K.id,onSelect:A,recommendedId:Me?J==null?void 0:J.id:void 0})}),e.jsxs(Bs,{children:[e.jsx(tt,{"data-variant":"outline",onClick:r,disabled:W,"data-testid":"name-topup-cancel",children:s("buyModal.cancel")}),me()?null:e.jsx(tt,{"data-variant":"gradient","data-testid":"name-buy-credits",disabled:!d||!K||p,onClick:()=>void Ne(),children:s("buyModal.buy")})]})]}),l==="confirm"&&!ne&&P&&e.jsx(On,{asset:{name:`${n}.dcl.eth`,caption:s("names.subtitle"),thumb:e.jsx(Fs,{"aria-hidden":!0,children:"@"})},priceCredits:a??0,priceCents:(a??0)*We,options:G.options,priceManaWei:BigInt(Y),balanceCredits:(h==null?void 0:h.credits)??0,manaBalanceWei:Q,onBuy:m=>{$(m==="combined"&&M?{rail:"combined",creditsCents:M.creditsCents,manaWei:M.manaWei}:{rail:"credits"})},onClose:r,busy:W}),(l==="confirm"||l==="error")&&!ne&&!P&&e.jsxs(e.Fragment,{children:[e.jsxs(ge,{children:[e.jsx(He,{"aria-hidden":!0,children:"@"}),e.jsxs(be,{children:[e.jsxs(ye,{children:[n,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(we,{children:s("names.subtitle")})]}),e.jsxs(je,{children:[e.jsx(X,{}),N]})]}),l==="error"?e.jsxs(e.Fragment,{children:[e.jsxs(Ge,{children:[e.jsx(I,{name:"info","aria-hidden":!0}),e.jsx("span",{children:T})]}),V?e.jsx(De,{onClick:r,children:s("names.errorSpentDismiss")}):e.jsx(De,{onClick:()=>w("confirm"),children:s("names.tryAgain")})]}):e.jsxs(e.Fragment,{children:[e.jsxs(ys,{children:[e.jsx(ws,{children:s("names.confirmTitle")}),e.jsx(js,{dangerouslySetInnerHTML:{__html:s("names.confirmBody",{name:`<b>@${Us(n)}</b>`})}}),e.jsxs(vs,{children:[e.jsx(Cs,{"aria-hidden":!0,children:"@"}),e.jsx($s,{value:g,onChange:m=>C(m.target.value.replace(/[^a-zA-Z0-9]/g,"")),placeholder:"yourname","aria-label":s("names.reenterAria"),autoComplete:"off",spellCheck:!1,style:{width:`${Math.max(g.length,8)}ch`}}),e.jsx(ks,{children:".dcl.eth"})]})]}),U?e.jsxs(Ge,{"data-tone":"info","data-testid":"name-blocked-reason",children:[e.jsx(I,{name:"info","aria-hidden":!0}),e.jsx("span",{children:U})]}):null,e.jsx(De,{onClick:()=>void Ae(),disabled:!H||!d||L||x==="credits"&&z,children:s("names.buyCta")})]})]}),l==="completing"&&e.jsxs(Ss,{children:[e.jsx(Es,{src:Pn,alt:"",width:61,height:61}),e.jsxs(Rs,{children:[e.jsx(Ts,{children:Ie}),e.jsxs(Ms,{children:[e.jsx(As,{"aria-hidden":!0,children:e.jsx("span",{})}),e.jsx(Ns,{"data-testid":"name-progress-count",children:`${Le}/${he}`})]}),re?e.jsx(_s,{children:re}):null]})]}),l==="pending"&&e.jsxs(e.Fragment,{children:[e.jsxs(Pe,{children:[e.jsx(Be,{children:s("names.pendingHeaderTitle")}),e.jsx(Fe,{onClick:r,"aria-label":s("buyModal.close"),children:e.jsx(I,{name:"close"})})]}),e.jsxs(Oe,{children:[s("names.myCreditsBalance")," ",e.jsx(X,{})," ",ze(h,b)]}),e.jsx(Ue,{}),e.jsxs(Ge,{"data-tone":"info",children:[e.jsx(I,{name:"info","aria-hidden":!0}),e.jsxs("span",{children:[e.jsx("b",{children:s("names.pendingBannerBold")})," ",s("names.pendingBannerRest")]})]}),e.jsxs(ge,{style:{marginTop:20},children:[e.jsx(He,{"aria-hidden":!0,children:"@"}),e.jsxs(be,{children:[e.jsxs(ye,{children:[n,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(we,{children:s("names.subtitle")})]}),e.jsxs(je,{children:[e.jsx(X,{}),N]})]}),e.jsx(at,{children:e.jsx(ot,{onClick:()=>{r(),c("/my-items")},children:s("names.myItems")})})]}),l==="success"&&e.jsxs(e.Fragment,{children:[e.jsxs(Pe,{children:[e.jsx(Be,{children:s("names.successHeaderTitle")}),e.jsx(Fe,{onClick:r,"aria-label":s("buyModal.close"),children:e.jsx(I,{name:"close"})})]}),e.jsxs(Oe,{children:[s("names.myCreditsBalance")," ",e.jsx(X,{})," ",ze(h,b)]}),e.jsx(Ue,{}),e.jsxs(Ls,{children:[e.jsx(Is,{"aria-hidden":!0,children:e.jsx(I,{name:"check"})}),e.jsxs(Ws,{children:[e.jsx("b",{children:s("names.successBannerBold")})," ",s("names.successBannerRest")]})]}),e.jsxs(ge,{style:{marginTop:20},children:[e.jsxs(fs,{"data-testid":"name-success-tile",children:[e.jsx(xs,{src:Hn,alt:"","aria-hidden":!0,width:47,height:47}),e.jsxs(gs,{children:[e.jsx("span",{"aria-hidden":!0,children:n}),e.jsx(bs,{src:hs,alt:"","aria-hidden":!0,width:14,height:14})]})]}),e.jsxs(be,{children:[e.jsxs(ye,{children:[n,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(we,{children:s("names.subtitle")})]}),e.jsxs(je,{children:[e.jsx(X,{}),N]})]}),e.jsxs(at,{children:[e.jsx(ot,{onClick:()=>{r(),c("/my-items")},children:s("names.myItems")}),e.jsx(zs,{href:ie.profileUrl,target:"_blank",rel:"noopener noreferrer",children:s("names.assignToAvatar")})]})]})]})})}function Us(n){return n.replace(/[&<>"']/g,a=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"})[a])}const Hs="https://cdn.decentraland.org/@dcl/shop/1.19.1-36725100317.commit-9ad1d65/_assets/identity-icon-C8yAW_Gq.svg",Ds="https://cdn.decentraland.org/@dcl/shop/1.19.1-36725100317.commit-9ad1d65/_assets/world-icon-6xQ-PmmW.svg",Gs="https://cdn.decentraland.org/@dcl/shop/1.19.1-36725100317.commit-9ad1d65/_assets/invite-icon-Bz6lCTuB.svg",qs="data:image/svg+xml,%3csvg%20width='55.6797'%20height='63.6174'%20viewBox='0%200%2055.6797%2063.6174'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Vote'%3e%3cpath%20id='Vector'%20d='M0.055012%2039.1045C1.61191%2039.4989%202.83757%2039.3938%204.4307%2039.392L8.27108%2039.3878L20.7762%2039.3883L42.8819%2039.3904L50.0954%2039.3907C51.793%2039.3907%2054.0562%2039.5509%2055.6466%2039.0843C55.5909%2040.7931%2055.647%2042.8581%2055.6469%2044.5864L55.6479%2055.616L55.6559%2059.5618C55.6583%2060.6219%2055.8213%2061.9838%2055.261%2062.8837C55.2205%2062.9265%2055.1794%2062.9688%2055.1377%2063.0104C54.7986%2063.3482%2054.3791%2063.5594%2053.9021%2063.5761C52.0714%2063.642%2050.1544%2063.6097%2048.3241%2063.6078L37.4452%2063.6066L2.97352%2063.6103C2.2022%2063.6084%201.15943%2063.6718%200.589171%2063.0576C-0.204857%2062.2037%200.0327979%2060.3244%200.0349529%2059.1687L0.0414734%2054.3929C0.0413119%2049.3191%20-0.00749456%2044.1727%200.055012%2039.1045Z'%20fill='white'%20fill-opacity='0.8'/%3e%3cpath%20id='Subtract'%20d='M37.1168%200.00495927C38.1773%200.00461149%2039.2888%20-0.0284991%2040.3433%200.0811311C41.0714%200.15695%2041.7266%200.914583%2041.7857%201.63484C41.853%202.45491%2041.8268%203.31926%2041.8258%204.15144L41.8189%208.70418L41.8199%2023.9639L40.1099%2023.9659L13.8726%2023.963L13.8678%209.0909L13.8648%204.29793C13.8644%202.52652%2013.3942%200.34203%2015.6754%200.0342561C15.8907%200.016712%2016.237%200.0120998%2016.4557%200.0117952C21.6059%200.00480262%2026.761%200.0117634%2031.9107%200.00788896L37.1168%200.00495927ZM33.3834%206.17293C32.439%206.55612%2031.0531%208.12922%2030.3014%208.88191L25.8297%2013.3634C25.3537%2012.824%2023.3455%2010.7605%2022.8209%2010.4239C22.5581%2010.2549%2022.2566%2010.1546%2021.9449%2010.1329C21.4563%2010.1008%2020.9754%2010.2879%2020.6139%2010.6134C20.2442%2010.9428%2020.0227%2011.4077%2020.0006%2011.9024C19.9561%2013.0748%2021.3406%2014.1198%2022.1256%2014.8868C22.9429%2015.714%2024.1669%2017.1028%2025.1168%2017.67C26.1632%2018.2949%2027.3471%2017.2145%2027.9723%2016.4942C30.25%2014.2025%2032.5393%2011.9456%2034.8101%209.64949C35.2937%209.16062%2035.7138%208.69126%2035.6851%207.96199C35.6419%206.86558%2034.7821%206.09682%2033.6959%206.14656C33.5914%206.15085%2033.4872%206.16001%2033.3834%206.17293Z'%20fill='%23FF7439'/%3e%3cpath%20id='Vector_2'%20d='M45.5498%2015.976C46.6399%2015.986%2049.9504%2015.7705%2050.7361%2016.241C51.0104%2016.4053%2051.2831%2016.6446%2051.4181%2016.9397C51.892%2017.9763%2052.1015%2019.357%2052.3802%2020.4819L54.0582%2027.2308C54.5046%2028.9073%2054.9023%2030.6043%2055.3338%2032.2824C55.6029%2033.329%2055.9417%2034.4293%2054.9705%2035.2255C54.8158%2035.359%2054.4427%2035.5934%2054.2329%2035.6091C52.7731%2035.7184%2051.1693%2035.6701%2049.7108%2035.6679L39.4635%2035.6649L14.5239%2035.6632C10.471%2035.6631%206.41808%2035.6665%202.36531%2035.6698C1.79359%2035.6657%201.33794%2035.6604%200.844568%2035.337C-0.57365%2034.4073%200.381076%2032.2112%200.72189%2030.8501L1.93462%2025.9936L3.28579%2020.566C3.53371%2019.5688%203.77194%2018.5694%204.04289%2017.5781C4.30559%2016.6172%204.74298%2016.1492%205.73966%2015.9892C7.15095%2015.9419%208.72017%2015.9778%2010.1434%2015.9809L10.1451%2023.9585C7.37011%2024.097%207.74242%2027.5535%209.84963%2027.6469C11.6268%2027.7258%2013.6164%2027.6909%2015.4098%2027.691L26.229%2027.6915L39.1339%2027.691L43.273%2027.6909C44.748%2027.6909%2047.2174%2028.0848%2047.3773%2025.9908C47.4212%2025.4807%2047.2565%2024.9745%2046.9209%2024.5879C46.5265%2024.141%2046.1143%2024.0046%2045.5418%2023.9673L45.5498%2015.976Z'%20fill='white'/%3e%3c/g%3e%3c/svg%3e",Ks=i.div`
513
513
  width: 100%;
514
514
  min-width: 0;
515
515
  `,Vs=i.nav`
@@ -797,7 +797,7 @@ import{r as u,b as Ze,j as e,a as yt,u as wt}from"./react-FXc7nqwH.js";import{c
797
797
  height: 48px;
798
798
  border-radius: 12px;
799
799
  }
800
- `,fi=i.span`
800
+ `,mi=i.span`
801
801
  display: inline-flex;
802
802
  align-items: center;
803
803
  gap: 4px;
@@ -808,7 +808,7 @@ import{r as u,b as Ze,j as e,a as yt,u as wt}from"./react-FXc7nqwH.js";import{c
808
808
  width: 13.26px;
809
809
  height: 14px;
810
810
  }
811
- `,mi=i.div`
811
+ `,fi=i.div`
812
812
  display: flex;
813
813
  align-items: center;
814
814
  gap: 8px;
@@ -827,7 +827,7 @@ import{r as u,b as Ze,j as e,a as yt,u as wt}from"./react-FXc7nqwH.js";import{c
827
827
  height: 16px;
828
828
  flex: none;
829
829
  }
830
- `,ve=i(mi)`
830
+ `,ve=i(fi)`
831
831
  position: absolute;
832
832
  top: calc(100% + 8px);
833
833
  left: 0;
@@ -970,7 +970,7 @@ import{r as u,b as Ze,j as e,a as yt,u as wt}from"./react-FXc7nqwH.js";import{c
970
970
  clip: rect(0, 0, 0, 0);
971
971
  white-space: nowrap;
972
972
  border: 0;
973
- `,$i="https://docs.decentraland.org/creator/worlds/about/",ki="https://governance.decentraland.org";function lt(n){const a=typeof window<"u"?window.location.hostname:"";return`${a.endsWith("decentraland.org")?"https://decentraland.org":a.endsWith("decentraland.today")?"https://decentraland.today":"https://decentraland.zone"}/marketplace/names/browse?search=${encodeURIComponent(n)}`}function Si({onBack:n}){pt({title:s("seo.names.title"),description:s("seo.names.description")});const{session:a,signIn:r}=dt(),d=Ze(),h=yt(),{pathname:b,search:j}=h,c=h.state,l=typeof(c==null?void 0:c.resumeName)=="string"?c:void 0,w=is(),{data:g}=ut(),C=g?ft(Y,g):null,[y,A]=u.useState((l==null?void 0:l.resumeName)??""),[p,v]=u.useState("idle"),[m,$]=u.useState(!1),[x,T]=u.useState((l==null?void 0:l.resumeName)??""),[B,V]=u.useState(!!(l!=null&&l.resumeName)),[ae,S]=u.useState(()=>{var E;return typeof window<"u"&&!!((E=window.matchMedia)!=null&&E.call(window,"(prefers-reduced-motion: reduce)").matches)});u.useEffect(()=>{var P;const E=(P=window.matchMedia)==null?void 0:P.call(window,"(prefers-reduced-motion: reduce)");if(!E)return;const M=R=>S(R.matches);return E.addEventListener("change",M),()=>E.removeEventListener("change",M)},[]);const _=s("names.placeholderExamples"),F=u.useMemo(()=>_.split(",").map(E=>E.trim()).filter(Boolean),[_]),W=ds(F,!B&&!y&&!ae)||s("names.inputPlaceholder"),N=u.useRef(null),[L,O]=u.useState(void 0);u.useLayoutEffect(()=>{N.current&&O(N.current.getBoundingClientRect().width)},[y,W]),u.useEffect(()=>{if(!st(y).ok){v(y.length===0?"idle":"invalid");return}v("checking");const M=new AbortController,P=setTimeout(()=>{(async()=>{try{const R=await Xn(y,{signal:M.signal});v(R)}catch(R){if((R==null?void 0:R.name)==="AbortError")return;v("error")}})()},400);return()=>{clearTimeout(P),M.abort()}},[y]);const D=st(y),z=D.ok&&(p==="available"||p==="error"),U=w&&z,Z=!w&&z;function Q(){if(U){if(!a){r();return}$(!0)}}u.useEffect(()=>{l!=null&&l.resumeName&&d(`${b}${j}`,{replace:!0,state:null})},[l==null?void 0:l.resumeName,d,b,j]),u.useEffect(()=>{if(x){if(y.toLowerCase()!==x.toLowerCase()){T("");return}if(!(p==="idle"||p==="checking")){if(!z){T("");return}!w||!a||(T(""),$(!0))}}},[x,y,p,z,w,a]);const G=e.jsxs(e.Fragment,{children:[s("names.claim"),C!=null?e.jsxs(fi,{children:[e.jsx(X,{}),ht(C)]}):null]});return e.jsxs(Ks,{"data-testid":"names-page",children:[e.jsxs(Vs,{"aria-label":s("names.breadcrumbAria"),children:[e.jsx(Zs,{onClick:n,children:s("names.breadcrumbCollectibles")}),e.jsx("span",{"aria-hidden":!0,children:">"}),e.jsx(Qs,{children:s("names.breadcrumbCurrent")})]}),e.jsxs(Xs,{children:[e.jsxs(Ys,{children:[e.jsxs(Js,{children:[e.jsx(ei,{children:s("names.heroTitle")}),e.jsx(ti,{children:s("names.heroSubtitle")})]}),e.jsxs(ni,{children:[e.jsxs(si,{"data-testid":"names-input-wrap",children:[e.jsxs(ii,{invalid:p==="taken",children:[e.jsxs(li,{children:[e.jsx(ci,{"aria-hidden":!0,children:"@"}),e.jsx(di,{value:y,onChange:E=>A(Vn(E.target.value)),placeholder:W,"aria-label":s("names.inputAria"),autoComplete:"off",spellCheck:!1,maxLength:_e,onFocus:()=>V(!0),style:{width:L!=null?`${L}px`:void 0}}),e.jsx(ai,{ref:N,"aria-hidden":!0,"data-placeholder":!y||void 0,children:y||W}),e.jsx(hi,{children:s("names.suffix")})]}),y.length>0?e.jsxs(pi,{"aria-hidden":!0,children:[y.length,"/",_e]}):null,e.jsx(gt,{onClick:Q,disabled:!U,"data-testid":"names-claim",children:G})]}),p==="taken"?e.jsxs(oi,{role:"status","data-testid":"names-taken",children:[e.jsx(I,{name:"info",size:16,"aria-hidden":!0}),e.jsx("span",{children:s("names.taken")}),e.jsxs(ri,{href:lt(y),target:"_blank",rel:"noopener noreferrer",children:[s("names.takenMakeOffer"),e.jsx(I,{name:"external-link",size:13,"aria-hidden":!0})]})]}):null,p==="checking"?e.jsx(ve,{tone:"muted",role:"status","data-testid":"names-checking",children:s("names.checking")}):Z?e.jsxs(ve,{tone:"muted",role:"status","data-testid":"names-disabled",children:[e.jsx(I,{name:"info",size:16,"aria-hidden":!0}),e.jsx("span",{children:s("names.registrationDisabled")}),e.jsxs(xi,{href:lt(y),target:"_blank",rel:"noopener noreferrer",children:[s("names.registrationDisabledLink"),e.jsx(I,{name:"external-link",size:13,"aria-hidden":!0})]})]}):p==="error"?e.jsx(ve,{tone:"muted",role:"status",children:s("names.checkError")}):p==="invalid"&&!D.ok&&D.reason==="too-short"?e.jsx(ve,{tone:"muted",role:"status",children:s("names.tooShort",{min:mt})}):null]}),e.jsx(ui,{onClick:Q,disabled:!U,children:G}),e.jsx(Ci,{role:"status","aria-live":"polite",children:p==="available"?s("names.available",{name:y}):""})]})]}),e.jsxs(gi,{children:[e.jsxs(bi,{children:[e.jsx(yi,{children:s("names.whyTitle")}),e.jsx(wi,{children:s("names.whyIntro")})]}),e.jsxs(ji,{children:[e.jsxs(Ce,{children:[e.jsx($e,{src:Hs,alt:""}),e.jsxs(ke,{children:[e.jsx(Se,{children:s("names.why1Title")}),e.jsx(Ee,{children:s("names.why1")})]})]}),e.jsxs(Ce,{children:[e.jsx($e,{src:Ds,alt:""}),e.jsxs(ke,{children:[e.jsx(Se,{children:s("names.why2Title")}),e.jsxs(Ee,{children:[s("names.why2")," ",e.jsx(vi,{children:s("names.why2Address")})]}),e.jsxs(rt,{href:$i,target:"_blank",rel:"noopener noreferrer",children:[s("names.learnMore"),e.jsx(I,{name:"external-link","aria-hidden":!0})]})]})]}),e.jsxs(Ce,{children:[e.jsx($e,{src:Gs,alt:""}),e.jsxs(ke,{children:[e.jsx(Se,{children:s("names.why3Title")}),e.jsx(Ee,{children:s("names.why3")})]})]}),e.jsxs(Ce,{children:[e.jsx($e,{src:qs,alt:""}),e.jsxs(ke,{children:[e.jsx(Se,{children:s("names.why4Title")}),e.jsx(Ee,{children:s("names.why4")}),e.jsxs(rt,{href:ki,target:"_blank",rel:"noopener noreferrer",children:[s("names.learnMore"),e.jsx(I,{name:"external-link","aria-hidden":!0})]})]})]})]})]})]}),m?e.jsx(Os,{name:y,priceCredits:C,onClose:()=>$(!1)}):null]})}const Ei=i.p`
973
+ `,$i="https://docs.decentraland.org/creator/worlds/about/",ki="https://governance.decentraland.org";function lt(n){const a=typeof window<"u"?window.location.hostname:"";return`${a.endsWith("decentraland.org")?"https://decentraland.org":a.endsWith("decentraland.today")?"https://decentraland.today":"https://decentraland.zone"}/marketplace/names/browse?search=${encodeURIComponent(n)}`}function Si({onBack:n}){pt({title:s("seo.names.title"),description:s("seo.names.description")});const{session:a,signIn:r}=dt(),d=Ze(),h=yt(),{pathname:b,search:j}=h,c=h.state,l=typeof(c==null?void 0:c.resumeName)=="string"?c:void 0,w=is(),{data:g}=ut(),C=g?mt(Y,g):null,[y,A]=u.useState((l==null?void 0:l.resumeName)??""),[p,v]=u.useState("idle"),[f,$]=u.useState(!1),[x,T]=u.useState((l==null?void 0:l.resumeName)??""),[B,V]=u.useState(!!(l!=null&&l.resumeName)),[ae,S]=u.useState(()=>{var E;return typeof window<"u"&&!!((E=window.matchMedia)!=null&&E.call(window,"(prefers-reduced-motion: reduce)").matches)});u.useEffect(()=>{var P;const E=(P=window.matchMedia)==null?void 0:P.call(window,"(prefers-reduced-motion: reduce)");if(!E)return;const M=R=>S(R.matches);return E.addEventListener("change",M),()=>E.removeEventListener("change",M)},[]);const _=s("names.placeholderExamples"),F=u.useMemo(()=>_.split(",").map(E=>E.trim()).filter(Boolean),[_]),W=ds(F,!B&&!y&&!ae)||s("names.inputPlaceholder"),N=u.useRef(null),[L,O]=u.useState(void 0);u.useLayoutEffect(()=>{N.current&&O(N.current.getBoundingClientRect().width)},[y,W]),u.useEffect(()=>{if(!st(y).ok){v(y.length===0?"idle":"invalid");return}v("checking");const M=new AbortController,P=setTimeout(()=>{(async()=>{try{const R=await Xn(y,{signal:M.signal});v(R)}catch(R){if((R==null?void 0:R.name)==="AbortError")return;v("error")}})()},400);return()=>{clearTimeout(P),M.abort()}},[y]);const D=st(y),z=D.ok&&(p==="available"||p==="error"),U=w&&z,Z=!w&&z;function Q(){if(U){if(!a){r();return}$(!0)}}u.useEffect(()=>{l!=null&&l.resumeName&&d(`${b}${j}`,{replace:!0,state:null})},[l==null?void 0:l.resumeName,d,b,j]),u.useEffect(()=>{if(x){if(y.toLowerCase()!==x.toLowerCase()){T("");return}if(!(p==="idle"||p==="checking")){if(!z){T("");return}!w||!a||(T(""),$(!0))}}},[x,y,p,z,w,a]);const G=e.jsxs(e.Fragment,{children:[s("names.claim"),C!=null?e.jsxs(mi,{children:[e.jsx(X,{}),ht(C)]}):null]});return e.jsxs(Ks,{"data-testid":"names-page",children:[e.jsxs(Vs,{"aria-label":s("names.breadcrumbAria"),children:[e.jsx(Zs,{onClick:n,children:s("names.breadcrumbCollectibles")}),e.jsx("span",{"aria-hidden":!0,children:">"}),e.jsx(Qs,{children:s("names.breadcrumbCurrent")})]}),e.jsxs(Xs,{children:[e.jsxs(Ys,{children:[e.jsxs(Js,{children:[e.jsx(ei,{children:s("names.heroTitle")}),e.jsx(ti,{children:s("names.heroSubtitle")})]}),e.jsxs(ni,{children:[e.jsxs(si,{"data-testid":"names-input-wrap",children:[e.jsxs(ii,{invalid:p==="taken",children:[e.jsxs(li,{children:[e.jsx(ci,{"aria-hidden":!0,children:"@"}),e.jsx(di,{value:y,onChange:E=>A(Vn(E.target.value)),placeholder:W,"aria-label":s("names.inputAria"),autoComplete:"off",spellCheck:!1,maxLength:_e,onFocus:()=>V(!0),style:{width:L!=null?`${L}px`:void 0}}),e.jsx(ai,{ref:N,"aria-hidden":!0,"data-placeholder":!y||void 0,children:y||W}),e.jsx(hi,{children:s("names.suffix")})]}),y.length>0?e.jsxs(pi,{"aria-hidden":!0,children:[y.length,"/",_e]}):null,e.jsx(gt,{onClick:Q,disabled:!U,"data-testid":"names-claim",children:G})]}),p==="taken"?e.jsxs(oi,{role:"status","data-testid":"names-taken",children:[e.jsx(I,{name:"info",size:16,"aria-hidden":!0}),e.jsx("span",{children:s("names.taken")}),e.jsxs(ri,{href:lt(y),target:"_blank",rel:"noopener noreferrer",children:[s("names.takenMakeOffer"),e.jsx(I,{name:"external-link",size:13,"aria-hidden":!0})]})]}):null,p==="checking"?e.jsx(ve,{tone:"muted",role:"status","data-testid":"names-checking",children:s("names.checking")}):Z?e.jsxs(ve,{tone:"muted",role:"status","data-testid":"names-disabled",children:[e.jsx(I,{name:"info",size:16,"aria-hidden":!0}),e.jsx("span",{children:s("names.registrationDisabled")}),e.jsxs(xi,{href:lt(y),target:"_blank",rel:"noopener noreferrer",children:[s("names.registrationDisabledLink"),e.jsx(I,{name:"external-link",size:13,"aria-hidden":!0})]})]}):p==="error"?e.jsx(ve,{tone:"muted",role:"status",children:s("names.checkError")}):p==="invalid"&&!D.ok&&D.reason==="too-short"?e.jsx(ve,{tone:"muted",role:"status",children:s("names.tooShort",{min:ft})}):null]}),e.jsx(ui,{onClick:Q,disabled:!U,children:G}),e.jsx(Ci,{role:"status","aria-live":"polite",children:p==="available"?s("names.available",{name:y}):""})]})]}),e.jsxs(gi,{children:[e.jsxs(bi,{children:[e.jsx(yi,{children:s("names.whyTitle")}),e.jsx(wi,{children:s("names.whyIntro")})]}),e.jsxs(ji,{children:[e.jsxs(Ce,{children:[e.jsx($e,{src:Hs,alt:""}),e.jsxs(ke,{children:[e.jsx(Se,{children:s("names.why1Title")}),e.jsx(Ee,{children:s("names.why1")})]})]}),e.jsxs(Ce,{children:[e.jsx($e,{src:Ds,alt:""}),e.jsxs(ke,{children:[e.jsx(Se,{children:s("names.why2Title")}),e.jsxs(Ee,{children:[s("names.why2")," ",e.jsx(vi,{children:s("names.why2Address")})]}),e.jsxs(rt,{href:$i,target:"_blank",rel:"noopener noreferrer",children:[s("names.learnMore"),e.jsx(I,{name:"external-link","aria-hidden":!0})]})]})]}),e.jsxs(Ce,{children:[e.jsx($e,{src:Gs,alt:""}),e.jsxs(ke,{children:[e.jsx(Se,{children:s("names.why3Title")}),e.jsx(Ee,{children:s("names.why3")})]})]}),e.jsxs(Ce,{children:[e.jsx($e,{src:qs,alt:""}),e.jsxs(ke,{children:[e.jsx(Se,{children:s("names.why4Title")}),e.jsx(Ee,{children:s("names.why4")}),e.jsxs(rt,{href:ki,target:"_blank",rel:"noopener noreferrer",children:[s("names.learnMore"),e.jsx(I,{name:"external-link","aria-hidden":!0})]})]})]})]})]})]}),f?e.jsx(Os,{name:y,priceCredits:C,onClose:()=>$(!1)}):null]})}const Ei=i.p`
974
974
  display: flex;
975
975
  align-items: center;
976
976
  gap: 10px;
@@ -986,5 +986,5 @@ import{r as u,b as Ze,j as e,a as yt,u as wt}from"./react-FXc7nqwH.js";import{c
986
986
  background: rgba(211, 51, 51, 0.1);
987
987
  color: ${t.colors.err};
988
988
  }
989
- `,ct=48,Ri=["all","on_sale","not_for_sale"],Ti=n=>n?"all":"on_sale",qe=(n,a)=>n?"relevance":a?"discount":"newest";function ia({contracts:n,itemIds:a,hideNames:r=!1,seo:d,lockStatus:h}={}){const[b]=wt(),j=Ze(),c=(b.get("q")??"").trim().toLowerCase(),l=(b.get("q")??"").trim();pt(d??{title:l?s("seo.collectibles.searchTitle",{query:l}):s("seo.collectibles.title"),description:s("seo.collectibles.description")});const w=Ti(!!c),g=Pt(),C=g&&b.get("deals")==="true",y=u.useMemo(()=>({category:"all",status:w,subCategory:null,rarities:[],priceMin:"",priceMax:"",smart:!1,deals:!1,sort:qe(!!c,C)}),[w,C,c]),[A,p]=Kt(y),{subCategory:v,rarities:m,priceMin:$,priceMax:x,smart:T,sort:B}=A,V=g&&A.deals,S=Bt.map(o=>o.key).filter(o=>!(r&&o==="names")).includes(A.category)?A.category:"all",_=h??(Ri.includes(A.status)?A.status:w);Zt(`${S}:${v??""}`);const[F,H]=u.useState(!1);u.useEffect(()=>{if(!F)return;const o=ue=>{ue.key==="Escape"&&H(!1)};document.addEventListener("keydown",o);const ee=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",o),document.body.style.overflow=ee}},[F]);const W=(n!==void 0||a!==void 0)&&!(n!=null&&n.length)&&!(a!=null&&a.length),N=_==="on_sale",L=$&&!Number.isNaN(Number($))?Number($):void 0,O=x&&!Number.isNaN(Number(x))?Number(x):void 0,D=Ft(),z=v?qt[v]:void 0,U=[...c?[Qt]:[],...V?Xt:Yt],Z=U.find(o=>o.key===B)??U[0],Q=Z.server,G={category:S,rarities:m.length?m:void 0,wearableCategories:z,minPriceCredits:L,maxPriceCredits:O,search:c||void 0,sortBy:Q,isSmart:T||void 0,onSale:!0,discounted:V||void 0,listingType:D?void 0:"primary",contractAddresses:n!=null&&n.length?n:void 0,itemIds:a!=null&&a.length?a:void 0},E={category:S,rarities:m.length?m:void 0,wearableCategories:z,search:c||void 0,sortBy:Q,isWearableSmart:T||void 0,isOnSale:_==="not_for_sale"?!1:void 0,contractAddresses:n!=null&&n.length?n:void 0},{items:M,total:P,isLoading:R,isPlaceholderData:q,error:J,hasNextPage:Me,isFetchingNextPage:K,isFetchNextPageError:Ae,fetchNextPage:Ne}=un(N?["shop-items",G]:["catalog-items",E],o=>N?Dt({...G,first:ct,skip:o}):Gt({...E,first:ct,skip:o}),{enabled:S!=="names"&&!W}),te=P,{data:oe,isError:he,isPending:pe}=ut(),Le=o=>oe&&o.manaWei?ft(o.manaWei,oe):null,Ie=N&&pe&&M.some(o=>o.source==="legacy"),re=R||q||Ie,ne=R?15:Math.max(M.length,1),le=u.useRef(null);u.useEffect(()=>{R||q||!c||le.current===c||(le.current=c,Re("Shop Searched",{query:c,result_count:te}))},[c,R,q,te]);const f=u.useRef("__init__");u.useEffect(()=>{if(R||q)return;const o=JSON.stringify({category:S,subCategory:v,rarities:m,min:L,max:O,sort:B,status:_,smart:T});if(f.current==="__init__"||f.current===o){f.current=o;return}f.current=o,Re("Shop Applied Filter",{filters:{category:S,sub_category:v,rarities:m,min_price_credits:L??null,max_price_credits:O??null,status:_,smart:T,sort:B},result_count:te})},[S,v,m,L,O,B,_,T,R,q,te]);function k(o){p({category:o,subCategory:null})}function ce(o){p({status:o})}function de(o){p({rarities:m.includes(o)?m.filter(ee=>ee!==o):[...m,o]})}function bt(){p(y)}const se=[];(L!=null||O!=null)&&se.push({key:"price",label:s("filter.price"),onRemove:()=>{p({priceMin:"",priceMax:""})}});for(const o of Ot)m.includes(o)&&se.push({key:`rarity-${o}`,label:Ut(o),onRemove:()=>de(o)});return T&&se.push({key:"smart",label:s("filter.smart"),onRemove:()=>p({smart:!1})}),V&&se.push({key:"deals",label:s("filter.deals"),onRemove:()=>p({deals:!1,sort:qe(!!c,!1)})}),_!==w&&se.push({key:"status",label:_==="all"?s("filter.statusAll"):_==="on_sale"?s("filter.onSale"):s("filter.notForSale"),onRemove:()=>ce(w)}),e.jsxs(tn,{"data-testid":"browse",children:[S!=="names"&&e.jsxs(e.Fragment,{children:[F?e.jsx(nn,{onClick:()=>H(!1),"aria-hidden":!0}):null,e.jsxs(sn,{"data-open":F||void 0,"data-testid":"browse-sidebar",children:[e.jsxs(an,{children:[e.jsx(on,{children:s("assets.filters")}),e.jsx(rn,{onClick:()=>H(!1),"aria-label":s("assets.closeFilters"),children:"✕"})]}),e.jsx(ln,{children:e.jsx(Jt,{category:S,subCategory:v,onCategory:k,onSub:o=>p({subCategory:o}),priceMin:$,priceMax:x,onPriceMin:o=>p({priceMin:o}),onPriceMax:o=>p({priceMax:o}),rarities:m,onToggleRarity:de,status:_,onStatus:ce,hideNames:r,smart:T,onSmart:o=>p({smart:o}),deals:V,onDeals:g?o=>p({deals:o,sort:qe(!!c,o)}):void 0})}),e.jsx(cn,{children:e.jsx(dn,{type:"button",onClick:()=>H(!1),children:s("assets.showItems")})})]})]}),e.jsx(hn,{children:S==="names"?e.jsx(Si,{onBack:()=>k("all")}):e.jsxs(e.Fragment,{children:[e.jsx(en,{sort:Z.key,sortOptions:U,onSort:o=>p({sort:o}),total:P,loading:R||q,query:c,onOpenFilters:()=>H(!0),chips:se,onClearChips:bt}),he&&N&&M.some(o=>o.source==="legacy")?e.jsx(Ei,{"data-variant":"warn",children:s("assets.marketUnavailable")}):null,J?e.jsx(fn,{message:s("assets.loadError"),testId:"browse-error"}):null,!re&&M.length===0&&!J?e.jsx(Ht,{testId:"browse-empty",icon:Vt,title:s("assets.empty.title"),body:l?e.jsxs(e.Fragment,{children:[s("assets.empty.searchBefore"),e.jsx("b",{children:l}),s("assets.empty.searchAfter")]}):s("assets.empty.filters"),cta:{label:s("assets.empty.cta"),onClick:()=>j("/overview")}}):e.jsxs(e.Fragment,{children:[e.jsx(qn,{"data-testid":"grid",children:re?e.jsx(et,{count:ne}):e.jsxs(e.Fragment,{children:[M.map(o=>{if(!N)return e.jsx(me,{item:o,mode:"view"},xe(o));const ee=o;if(ee.source!=="legacy")return e.jsx(me,{item:o},xe(o));const ue=Le(ee);return ue==null?e.jsx(me,{item:o,mode:"view"},xe(o)):e.jsx(me,{item:{...ee,priceCredits:ue}},xe(o))}),K?e.jsx(et,{count:6}):null]})}),e.jsx(pn,{hasNextPage:Me,isFetching:K,isError:Ae,onLoadMore:()=>void Ne()})]})]})})]})}export{ia as Assets};
990
- //# sourceMappingURL=Assets-BcAPRFEI.js.map
989
+ `,ct=48,Ri=["all","on_sale","not_for_sale"],Ti=n=>n?"all":"on_sale",qe=(n,a)=>n?"relevance":a?"discount":"newest";function ia({contracts:n,itemIds:a,hideNames:r=!1,seo:d,lockStatus:h}={}){const[b]=wt(),j=Ze(),c=(b.get("q")??"").trim().toLowerCase(),l=(b.get("q")??"").trim();pt(d??{title:l?s("seo.collectibles.searchTitle",{query:l}):s("seo.collectibles.title"),description:s("seo.collectibles.description")});const w=Ti(!!c),g=Pt(),C=g&&b.get("deals")==="true",y=u.useMemo(()=>({category:"all",status:w,subCategory:null,rarities:[],priceMin:"",priceMax:"",smart:!1,deals:!1,sort:qe(!!c,C)}),[w,C,c]),[A,p]=Kt(y),{subCategory:v,rarities:f,priceMin:$,priceMax:x,smart:T,sort:B}=A,V=g&&A.deals,S=Bt.map(o=>o.key).filter(o=>!(r&&o==="names")).includes(A.category)?A.category:"all",_=h??(Ri.includes(A.status)?A.status:w);Zt(`${S}:${v??""}`);const[F,H]=u.useState(!1);u.useEffect(()=>{if(!F)return;const o=ue=>{ue.key==="Escape"&&H(!1)};document.addEventListener("keydown",o);const ee=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",o),document.body.style.overflow=ee}},[F]);const W=(n!==void 0||a!==void 0)&&!(n!=null&&n.length)&&!(a!=null&&a.length),N=_==="on_sale",L=$&&!Number.isNaN(Number($))?Number($):void 0,O=x&&!Number.isNaN(Number(x))?Number(x):void 0,D=Ft(),z=v?qt[v]:void 0,U=[...c?[Qt]:[],...V?Xt:Yt],Z=U.find(o=>o.key===B)??U[0],Q=Z.server,G={category:S,rarities:f.length?f:void 0,wearableCategories:z,minPriceCredits:L,maxPriceCredits:O,search:c||void 0,sortBy:Q,isSmart:T||void 0,onSale:!0,discounted:V||void 0,listingType:D?void 0:"primary",contractAddresses:n!=null&&n.length?n:void 0,itemIds:a!=null&&a.length?a:void 0},E={category:S,rarities:f.length?f:void 0,wearableCategories:z,search:c||void 0,sortBy:Q,isWearableSmart:T||void 0,isOnSale:_==="not_for_sale"?!1:void 0,contractAddresses:n!=null&&n.length?n:void 0},{items:M,total:P,isLoading:R,isPlaceholderData:q,error:J,hasNextPage:Me,isFetchingNextPage:K,isFetchNextPageError:Ae,fetchNextPage:Ne}=un(N?["shop-items",G]:["catalog-items",E],o=>N?Dt({...G,first:ct,skip:o}):Gt({...E,first:ct,skip:o}),{enabled:S!=="names"&&!W}),te=P,{data:oe,isError:he,isPending:pe}=ut(),Le=o=>oe&&o.manaWei?mt(o.manaWei,oe):null,Ie=N&&pe&&M.some(o=>o.source==="legacy"),re=R||q||Ie,ne=R?15:Math.max(M.length,1),le=u.useRef(null);u.useEffect(()=>{R||q||!c||le.current===c||(le.current=c,Re("Shop Searched",{query:c,result_count:te}))},[c,R,q,te]);const m=u.useRef("__init__");u.useEffect(()=>{if(R||q)return;const o=JSON.stringify({category:S,subCategory:v,rarities:f,min:L,max:O,sort:B,status:_,smart:T});if(m.current==="__init__"||m.current===o){m.current=o;return}m.current=o,Re("Shop Applied Filter",{filters:{category:S,sub_category:v,rarities:f,min_price_credits:L??null,max_price_credits:O??null,status:_,smart:T,sort:B},result_count:te})},[S,v,f,L,O,B,_,T,R,q,te]);function k(o){p({category:o,subCategory:null})}function ce(o){p({status:o})}function de(o){p({rarities:f.includes(o)?f.filter(ee=>ee!==o):[...f,o]})}function bt(){p(y)}const se=[];(L!=null||O!=null)&&se.push({key:"price",label:s("filter.price"),onRemove:()=>{p({priceMin:"",priceMax:""})}});for(const o of Ot)f.includes(o)&&se.push({key:`rarity-${o}`,label:Ut(o),onRemove:()=>de(o)});return T&&se.push({key:"smart",label:s("filter.smart"),onRemove:()=>p({smart:!1})}),V&&se.push({key:"deals",label:s("filter.deals"),onRemove:()=>p({deals:!1,sort:qe(!!c,!1)})}),_!==w&&se.push({key:"status",label:_==="all"?s("filter.statusAll"):_==="on_sale"?s("filter.onSale"):s("filter.notForSale"),onRemove:()=>ce(w)}),e.jsxs(tn,{"data-testid":"browse",children:[S!=="names"&&e.jsxs(e.Fragment,{children:[F?e.jsx(nn,{onClick:()=>H(!1),"aria-hidden":!0}):null,e.jsxs(sn,{"data-open":F||void 0,"data-testid":"browse-sidebar",children:[e.jsxs(an,{children:[e.jsx(on,{children:s("assets.filters")}),e.jsx(rn,{onClick:()=>H(!1),"aria-label":s("assets.closeFilters"),children:"✕"})]}),e.jsx(ln,{children:e.jsx(Jt,{category:S,subCategory:v,onCategory:k,onSub:o=>p({subCategory:o}),priceMin:$,priceMax:x,onPriceMin:o=>p({priceMin:o}),onPriceMax:o=>p({priceMax:o}),rarities:f,onToggleRarity:de,status:_,onStatus:ce,hideNames:r,smart:T,onSmart:o=>p({smart:o}),deals:V,onDeals:g?o=>p({deals:o,sort:qe(!!c,o)}):void 0})}),e.jsx(cn,{children:e.jsx(dn,{type:"button",onClick:()=>H(!1),children:s("assets.showItems")})})]})]}),e.jsx(hn,{children:S==="names"?e.jsx(Si,{onBack:()=>k("all")}):e.jsxs(e.Fragment,{children:[e.jsx(en,{sort:Z.key,sortOptions:U,onSort:o=>p({sort:o}),total:P,loading:R||q,query:c,onOpenFilters:()=>H(!0),chips:se,onClearChips:bt}),he&&N&&M.some(o=>o.source==="legacy")?e.jsx(Ei,{"data-variant":"warn",children:s("assets.marketUnavailable")}):null,J?e.jsx(mn,{message:s("assets.loadError"),testId:"browse-error"}):null,!re&&M.length===0&&!J?e.jsx(Ht,{testId:"browse-empty",icon:Vt,title:s("assets.empty.title"),body:l?e.jsxs(e.Fragment,{children:[s("assets.empty.searchBefore"),e.jsx("b",{children:l}),s("assets.empty.searchAfter")]}):s("assets.empty.filters"),cta:{label:s("assets.empty.cta"),onClick:()=>j("/overview")}}):e.jsxs(e.Fragment,{children:[e.jsx(qn,{"data-testid":"grid",children:re?e.jsx(et,{count:ne}):e.jsxs(e.Fragment,{children:[M.map(o=>{if(!N)return e.jsx(fe,{item:o,mode:"view"},xe(o));const ee=o;if(ee.source!=="legacy")return e.jsx(fe,{item:o},xe(o));const ue=Le(ee);return ue==null?e.jsx(fe,{item:o,mode:"view"},xe(o)):e.jsx(fe,{item:{...ee,priceCredits:ue}},xe(o))}),K?e.jsx(et,{count:6}):null]})}),e.jsx(pn,{hasNextPage:Me,isFetching:K,isError:Ae,onLoadMore:()=>void Ne()})]})]})})]})}export{ia as Assets};
990
+ //# sourceMappingURL=Assets-DElD46e4.js.map
@@ -1,4 +1,4 @@
1
- import{j as e,L as Yt,r as T,b as Sa,a as Ma}from"./react-FXc7nqwH.js";import{s as i,a as P,t as a,z as Ae,F as pe,W as Le,C as Me,E as Fe,bl as Ta,A as Aa,I as X,n as Je,B as Wa,aj as H,$ as Tt,x as Ia,y as Ea,w as Pa,bm as za,X as _a,bn as Ba,a0 as qa,bo as Ra,bp as La,bq as Fa,br as Na,bs as At,a2 as Ka,bt as Qa,bu as Ua,bv as Oa,av as Ne,a3 as Ga,D as Ha,bw as Wt,O as V,bx as It,by as Da,bz as Va,l as ie,bA as Xa,bB as Ya,bC as Ja,bD as Ke,bi as Za,bE as ve,bF as Ce,Z as Et,bG as es,h as Pt,j as zt,bH as ts}from"./index-nSSZPEcQ.js";import{C as as,b as ss,t as ns,a as is,A as rs,s as _t,r as Bt,i as qt,m as os,c as cs,p as Rt,d as ds}from"./CollectionCarousel-C4vshHdz.js";import{M as ls,S as hs,C as us,H as ps,a as gs,T as fs,X as ms,B as xs,b as bs,c as Lt,d as ys,e as We,f as ws,g as vs,h as Cs,i as Ye,j as ue,L as ks,P as js,k as Ft,l as Nt,W as $s,m as Ss,n as Ms,o as Ts,A as As,p as Ws,q as Is,r as Es,s as Ps,t as zs,u as _s,v as Bs,w as Qe,x as qs,y as Rs}from"./CreditPackPicker-BErMoUfP.js";import{m as Te}from"./mana-matic-light-Bl5duieC.js";import{q as Ls,s as Fs,g as Ns,t as Ks,u as Qs,A as Us}from"./trade-encoding-DL68aw8i.js";import{p as Kt,g as Os,a as Ue}from"./buy-ClGvxms1.js";import{w as Gs,S as Oe,b as Hs,G as Ds}from"./buy-gasless-C0avfgHT.js";import{l as Vs,u as Xs,M as Ys,R as ke,o as Js,r as Zs,c as en,g as tn,a as an,p as Qt,b as Ge}from"./loader-logo-DwsS7kg_.js";import{i as sn,a as nn}from"./errors-CZmHqf_k.js";import{E as rn}from"./ErrorNotice-D4gUUlIi.js";import"./dcl-schemas-BzKcn35u.js";import"./sentry-Dqbs4IC8.js";import"./ethers-BucT1p_V.js";import"./intl-AKLEHPeO.js";import"./sendMetaTransaction-D3hyCNbd.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},l=new n.Error().stack;l&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[l]="cb3cc0c6-c47f-4b9a-a284-6bb7ce19b9d3",n._sentryDebugIdIdentifier="sentry-dbid-cb3cc0c6-c47f-4b9a-a284-6bb7ce19b9d3")}catch{}})();const on=i.div`
1
+ import{j as e,L as Yt,r as T,b as Sa,a as Ma}from"./react-BFIm3j2a.js";import{s as i,a as P,t as a,z as Ae,F as pe,W as Le,C as Me,E as Fe,bl as Ta,A as Aa,I as X,n as Je,B as Wa,aj as H,$ as Tt,x as Ia,y as Ea,w as Pa,bm as za,X as _a,bn as Ba,a0 as qa,bo as Ra,bp as La,bq as Fa,br as Na,bs as At,a2 as Ka,bt as Qa,bu as Ua,bv as Oa,av as Ne,a3 as Ga,D as Ha,bw as Wt,O as V,bx as It,by as Da,bz as Va,l as ie,bA as Xa,bB as Ya,bC as Ja,bD as Ke,bi as Za,bE as ve,bF as Ce,Z as Et,bG as es,h as Pt,j as zt,bH as ts}from"./index-DTrZkeIu.js";import{C as as,b as ss,t as ns,a as is,A as rs,s as _t,r as Bt,i as qt,m as os,c as cs,p as Rt,d as ds}from"./CollectionCarousel-BsmjChqj.js";import{M as ls,S as hs,C as us,H as ps,a as gs,T as fs,X as ms,B as xs,b as bs,c as Lt,d as ys,e as We,f as ws,g as vs,h as Cs,i as Ye,j as ue,L as ks,P as js,k as Ft,l as Nt,W as $s,m as Ss,n as Ms,o as Ts,A as As,p as Ws,q as Is,r as Es,s as Ps,t as zs,u as _s,v as Bs,w as Qe,x as qs,y as Rs}from"./CreditPackPicker-IzExNyem.js";import{m as Te}from"./mana-matic-light-Bl5duieC.js";import{q as Ls,s as Fs,g as Ns,t as Ks,u as Qs,A as Us}from"./trade-encoding-CmoxrKUz.js";import{p as Kt,g as Os,a as Ue}from"./buy-GBacz4js.js";import{w as Gs,S as Oe,b as Hs,G as Ds}from"./buy-gasless-_RaoHNGk.js";import{l as Vs,u as Xs,M as Ys,R as ke,o as Js,r as Zs,c as en,g as tn,a as an,p as Qt,b as Ge}from"./loader-logo-BBzKPg1y.js";import{i as sn,a as nn}from"./errors-BxIUc_Lk.js";import{E as rn}from"./ErrorNotice-l-B8k9a3.js";import"./dcl-schemas-FmJ72SB7.js";import"./sentry-B6w4u-W-.js";import"./ethers-CoY9-2x5.js";import"./intl-AKLEHPeO.js";import"./sendMetaTransaction-yPqWszKC.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},l=new n.Error().stack;l&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[l]="cb3cc0c6-c47f-4b9a-a284-6bb7ce19b9d3",n._sentryDebugIdIdentifier="sentry-dbid-cb3cc0c6-c47f-4b9a-a284-6bb7ce19b9d3")}catch{}})();const on=i.div`
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  gap: 12px;
@@ -823,4 +823,4 @@ import{j as e,L as Yt,r as T,b as Sa,a as Ma}from"./react-FXc7nqwH.js";import{s
823
823
  margin-top: 0;
824
824
  }
825
825
  `;function Ve(n){if(sn(n))return a("errors.rejected");const l=(n.message??"").toLowerCase();return l.includes("insufficient")?a("cart.error.insufficient",{currency:Me.name}):l.includes("no active listing")||l.includes("your own listing")?a("cart.error.listingChanged"):a("marketCheckout.error.generic")}const hi=12e4;function ui(n){const l=[];return n.unavailable.length&&l.push(a("cart.drop.unavailable",{count:n.unavailable.length})),n.own.length&&l.push(a("cart.drop.own",{count:n.own.length})),a("cart.drop.removed",{items:l.join(` ${a("cart.drop.and")} `)})}const Xe=n=>n.reduce((l,j)=>l+j.priceCredits*j.quantity,0),Se=n=>n.flatMap(l=>Array.from({length:l.quantity},()=>({...l,quantity:1}))),Xt=8;function Ai(){var $t,St,Mt;Wa({title:a("nav.cart"),noindex:!0});const n=H(t=>t.items),l=H(t=>t.remove),j=H(t=>t.increment),$=H(t=>t.decrement),z=H(t=>t.clear),U=H(t=>t.restore),O=H(t=>t.setFittingOpen),G=Tt(t=>t.items),M=Tt(t=>t.toggle),{session:r,signIn:Ze}=Ia(),ia=Ea(),ge=Xs().packs.slice(0,Ys);T.useEffect(()=>(document.body.classList.add("shop-cart-bg"),()=>document.body.classList.remove("shop-cart-bg")),[]);const ra=n.some(t=>t.category!=="emote"),{data:Ie}=Pa({queryKey:["upsell-listings"],queryFn:()=>ts({first:40}),staleTime:6e4}),{data:k}=za(r),y=_a(),Y=Sa(),{state:_}=Ma(),[oa,ce]=T.useState(null),[et,fe]=T.useState(null),[ca,q]=T.useState(!1),[R,D]=T.useState(null),tt=T.useRef(0),[h,S]=T.useState(null),{data:me}=Ba(r),{data:de}=qa(!0),[Ee,at]=T.useState(""),le=T.useRef(null),st=Ra(n),nt=t=>Wt(st[t.id]),Pe=n.filter(nt),it=n.length>0&&Pe.length===0,da=Pe.reduce((t,s)=>t+s.priceCredits*s.quantity,0),la=n.reduce((t,s)=>t+s.quantity,0),ha=Pe.reduce((t,s)=>t+s.quantity,0),rt=R?R.liveTotalCredits:da,ua=new Set(n.map(t=>t.id)),ot=((Ie==null?void 0:Ie.items)??[]).filter(t=>!ua.has(t.id)).slice(0,12),ct=T.useMemo(()=>n.map(t=>t.contractAddress&&t.itemId?`${t.contractAddress.toLowerCase()}-${t.itemId}`:null).filter(t=>t!==null),[n]),te=La(Xt,{exclude:ct}),dt=Fa({enabled:te.enabled,hasSignal:te.hasSignal,isLoading:te.isLoading,isError:te.isError,personalized:($t=te.result)==null?void 0:$t.personalized,rowCount:Na(((St=te.result)==null?void 0:St.data)??[]).length}),pa=new Map(R==null?void 0:R.buyable.map(t=>[t.item.id,t])),xe=(k==null?void 0:k.credits)??0,ze=rt*10,ga=de?At(ze,de):0n,_e=Qe({priceCents:ze,priceManaWei:ga,balanceCents:(k==null?void 0:k.balanceCents)??0,manaBalanceWei:me??0n}),fa=t=>t.flatMap(s=>{const o=Ge(s);return o.kind==="store"?[o.mint]:[]}),ma=t=>t.flatMap(s=>s.acquisition==="trade"?[s.trade]:[]),xa=t=>Object.fromEntries(t.flatMap(s=>s.acquisition==="trade"&&s.coupon?[[s.trade.id,s.coupon]]:[])),ba=Da,ya=t=>Ya(t.contractAddress,String(t.itemId));function be(t){t(),D(null),fe(null),ce(null)}function wa(){S(null),q(!1)}function lt(t){const s=Xe(t),o=Math.max(0,s-xe),c=ge.find(u=>u.credits>=o)??ge[ge.length-1];at(c.id),V("Shop Buy Credits Prompted",{from:"cart_checkout",credits_needed:s,credits_balance:xe,shortfall:o}),S({phase:"nofunds",lines:t.map(u=>({item:u.item,priceCredits:u.priceCredits,quantity:u.quantity})),shortfall:o}),q(!1)}async function Be(t){if(!r||t.length===0)return;const s=Se(t),o=s.map(x=>({...x.item,priceCredits:x.priceCredits})),c=t.map(x=>({...x.item,priceCredits:x.priceCredits,quantity:x.quantity})),u=[];let w="authorize";const f=new Set,A=new Set,F=new Set,L=[];let v=!1;S({phase:"processing",stage:"reserving",step:1,total:s.length});try{const x=[],E=tn(s,Kt);let N=0;for(const p of E){S({phase:"processing",stage:"reserving",step:N+1,total:s.length});try{const{credit:m,maxCreditedValue:b}=await Ja(r.identity,p.units.map(an));p.units.forEach((Q,ne)=>{u.push({salt:m.id,itemId:Q.item.id}),x.push({...p.drafts[ne],credits:[m],maxCreditedValue:b})}),N+=p.units.length}catch(m){if(nn(m)){if(u.length){try{await Ke(r.identity,[...new Set(u.map(b=>b.salt))])}catch(b){ie(b,{flow:"cart_checkout",step:"release"})}y.invalidateQueries({queryKey:["usd-balance"]})}lt(t);return}throw m}}u.length&&y.invalidateQueries({queryKey:["usd-balance"]}),w="submit";const K=Os(x).length,ee=p=>K>1?{current:p,total:K}:void 0,B=(p,m)=>S({phase:"processing",stage:p,step:s.length,total:s.length,signatures:ee(m)}),C=p=>p<K?B("awaiting-signature",p+1):B("settling",K);B("awaiting-signature",1);let g=[];const I=new Map,ae=async p=>{const m=await Promise.allSettled(p.map(b=>Gs(b)));return m.forEach((b,Q)=>{const ne=I.get(p[Q])??[];b.status==="fulfilled"?(ne.forEach(Re=>A.add(Re)),L.push(p[Q])):b.reason instanceof Oe||ne.forEach(Re=>F.add(Re))}),m.flatMap(b=>b.status==="rejected"?[b.reason]:[])};if(Ls())try{let p=0;g=await Hs({purchases:x,buyer:r.address,signer:r.signer,identity:r.identity,onSigned:()=>B("settling",Math.min(p+1,K)),onBroadcast:({txHash:b,salts:Q})=>{p+=1,I.set(b,Q),Q.forEach(ne=>f.add(ne))},onGroupSettling:({settled:b})=>B("settling",b)});const m=await ae(g);if(m.length&&!m.some(b=>b instanceof Oe))throw m[0];v=!0}catch(p){if(p instanceof Oe)throw await ae([...I.keys()]),p;if(!(p instanceof Ds)||!Za(r.providerType))throw p;g=await Ue({purchases:x,buyer:r.address,signer:r.signer,onSigned:C,onBroadcast:({salts:m})=>m.forEach(b=>f.add(b)),onSettled:({txHash:m,salts:b})=>{b.forEach(Q=>A.add(Q)),L.push(m)},onReverted:({salts:m})=>m.forEach(b=>F.add(b))})}else g=await Ue({purchases:x,buyer:r.address,signer:r.signer,onSigned:C,onBroadcast:({salts:p})=>p.forEach(m=>f.add(m)),onSettled:({txHash:p,salts:m})=>{m.forEach(b=>A.add(b)),L.push(p)},onReverted:({salts:p})=>p.forEach(m=>F.add(m))});t.forEach(p=>l(p.item.id)),D(null),V("Shop Completed Purchase",{...ve(o),payment_type:"credits",no_crypto_step:v,transaction_hash:g[0]??null}),Bt(o.map(p=>p.coupon)),qt(y);const we=le.current;le.current=null,S(null),q(!1);const se={items:c,txHash:g[0]??void 0,txHashes:g,settled:!0,...we?{creditsAdded:we}:{}};Y("/success",{state:se,replace:!0})}catch(x){Ce(x)||ie(x,{flow:"cart_checkout",step:w,cart_size:t.length});const E=new Set([...f].filter(g=>!F.has(g))),{toRelease:N,boughtItemIds:K}=Qt({reservations:u,spent:E,settled:A}),ee=[...E].some(g=>!A.has(g)),B=o.filter(g=>K.includes(g.id)),C=o.filter(g=>!K.includes(g.id));if(V(Ce(x)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:w,error_code:Et(x),value_usd:It(C.reduce((g,I)=>g+I.priceCredits,0)),cart_size:s.length,partial:B.length>0}),N.length)try{await Ke(r.identity,N)}catch(g){ie(g,{flow:"cart_checkout",step:"release"})}if(y.invalidateQueries({queryKey:["usd-balance"]}),B.length>0){K.forEach(g=>l(g)),D(null),Bt(B.map(g=>g.coupon)),qt(y),V("Shop Completed Purchase",{...ve(B),payment_type:"credits",no_crypto_step:v,transaction_hash:L[0]??null,partial:!0}),S({phase:"error",message:a("cart.error.partiallyBought"),heldCredits:ee}),q(!1);return}S({phase:"error",message:ee?void 0:Ve(x),heldCredits:ee})}}function ht(t,s){y.invalidateQueries({queryKey:["usd-balance"]}),y.invalidateQueries({queryKey:["detail-trade"]}),y.invalidateQueries({queryKey:["shop-item"]}),y.invalidateQueries({queryKey:["owned-token"]}),y.invalidateQueries({queryKey:["public-token"]}),y.invalidateQueries({queryKey:["item-resales"]}),y.invalidateQueries({queryKey:["shop-items"]}),y.invalidateQueries({queryKey:["catalog-items"]}),y.invalidateQueries({queryKey:["my-assets"]}),y.invalidateQueries({queryKey:["purchases"]}),y.invalidateQueries({queryKey:["owned-item-count"]}),y.invalidateQueries({queryKey:["overview-listings"]}),y.invalidateQueries({queryKey:["upsell-listings"]});const o=le.current;le.current=null,S(null),q(!1);const c={items:t,txHash:s[0]??void 0,txHashes:s,settled:!0,...o?{creditsAdded:o}:{}};Y("/success",{state:c,replace:!0})}function ut(t,s){Ce(t)||ie(t,{flow:s,step:"submit"}),V(Ce(t)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:Et(t)}),S({phase:"error",message:Ve(t)}),q(!1)}async function va(t,s,o){const c=Pt(zt.MANAToken,s),u=Pt(zt.CreditsManager,s);await Qs({auth:{kind:Us.Allowance,contractAddress:c.address,spenderAddress:u.address,chainId:s},signer:t,requiredWei:o})}async function pt(){if(de)return de;try{return await y.fetchQuery(Xa())}catch{return}}async function Ca(t){const s=Se(t).reduce((w,f)=>w+f.usdCents,0),c=(me??0n)>0n?await pt():de,u=c?At(s,c):0n;return{totalCents:s,manaWei:u}}async function gt(t,s){const o=Xe(t),{totalCents:c,manaWei:u}=await Ca(t),w=Qe({priceCents:c,priceManaWei:u,balanceCents:(k==null?void 0:k.balanceCents)??0,manaBalanceWei:me??0n});if(s&&w.options.some(f=>f.method===s)){if(s==="credits"){Be(t);return}const f=bt(w,s);await mt(ft(s,t),f,()=>s==="mana"?void yt(t,f):void wt(t,c,u));return}if(w.options.some(f=>f.method==="mana"||f.method==="combined")){S({phase:"choose",lines:t,totalCents:c,manaWei:u}),q(!1);return}if(k!=null&&k.credits<o){lt(t);return}Be(t)}function qe(t){return Qe({priceCents:t.totalCents,priceManaWei:t.manaWei,balanceCents:(k==null?void 0:k.balanceCents)??0,manaBalanceWei:me??0n})}const[he,ye]=T.useState(null);function ft(t,s){const o=new Map;for(const c of s){const u=os(t,Ge(c));o.set(`${u.chainId}:${u.spender.toLowerCase()}`,u)}return[...o.values()]}async function mt(t,s,o){const c=[];for(const{spender:u,chainId:w}of t){const f=Fs(w,u),A=r?await Ns(f,r.address,s).catch(()=>!0):!0;Ks(r==null?void 0:r.providerType,A)&&c.push(f)}if(c.length===0){o();return}q(!1),xt(c,0,o)}function xt(t,s,o){ye({auth:t[s],index:s+1,total:t.length,run:()=>s+1<t.length?xt(t,s+1,o):o()})}function bt(t,s){var o;return((o=t.options.find(c=>c.method===s))==null?void 0:o.manaWei)??0n}function ka(t){if((h==null?void 0:h.phase)!=="choose")return;const{lines:s,totalCents:o,manaWei:c}=h;if(t==="credits"){Be(s);return}const u=bt(qe(h),t);mt(ft(t,s),u,()=>t==="mana"?void yt(s,u):void wt(s,o,c))}async function yt(t,s){if(!r||t.length===0)return;const o=Se(t),c=o.map(f=>({...f.item,priceCredits:f.priceCredits})),u=t.map(f=>({...f.item,priceCredits:f.priceCredits,quantity:f.quantity})),w=()=>S({phase:"processing",stage:"settling",step:o.length,total:o.length});S({phase:"processing",stage:"awaiting-signature",step:o.length,total:o.length});try{const f=await cs({trades:ma(o),coupons:xa(o),mints:fa(o),buyer:r.address,signer:r.signer,onSigned:w,manaWei:s});t.forEach(A=>l(A.item.id)),D(null),V("Shop Completed Purchase",{...ve(c),payment_type:"mana",transaction_hash:f[0]??null}),y.invalidateQueries({queryKey:["mana-balance"]}),ht(u,f)}catch(f){ut(f,"buy_cart_mana")}}async function wt(t,s,o){if(!r||t.length===0)return;const c=Se(t),u=c.map(v=>({...v.item,priceCredits:v.priceCredits})),w=t.map(v=>({...v.item,priceCredits:v.priceCredits,quantity:v.quantity})),f=qs(c.map(v=>v.usdCents),(k==null?void 0:k.balanceCents)??0),A=[],F=new Set,L=new Set;S({phase:"processing",stage:"reserving",step:1,total:c.length});try{const v=c.map(Ge),x=[],E=new Map,N=new Map;for(let C=0;C<c.length;C++){const g=c[C],I=v[C],ae=f[C],we=Rs(Math.max(0,g.usdCents-ae),s,o);let se;if(ae<=0)se=Rt(I,[],"0");else{S({phase:"processing",stage:"reserving",step:C+1,total:c.length});const m=g.item,{credit:b,maxCreditedValue:Q}=await es(r.identity,ae,I.kind==="trade"?I.trade.id:void 0,m.contractAddress&&m.itemId!=null?{contractAddress:m.contractAddress,itemId:String(m.itemId)}:void 0);A.push({salt:b.id,itemId:m.id}),se=Rt(I,[b],Q)}const p=Kt(se);E.set(p,(E.get(p)??0n)+we),N.has(p)||N.set(p,x.length),x.push(se)}A.length&&y.invalidateQueries({queryKey:["usd-balance"]});for(const[C,g]of E){const I=N.get(C);I==null||g<=0n||(x[I]={...x[I],maxCreditedValue:(BigInt(x[I].maxCreditedValue)+g).toString()})}const K=[...E.values()].reduce((C,g)=>C+g,0n);await va(r.signer,ds(v[0]),K);const ee=()=>S({phase:"processing",stage:"settling",step:c.length,total:c.length});S({phase:"processing",stage:"awaiting-signature",step:c.length,total:c.length});const B=await Ue({purchases:x,buyer:r.address,signer:r.signer,onSigned:ee,onBroadcast:({salts:C})=>C.forEach(g=>F.add(g)),onReverted:({salts:C})=>C.forEach(g=>L.add(g))});t.forEach(C=>l(C.item.id)),D(null),V("Shop Completed Purchase",{...ve(u),payment_type:"credits_and_mana",transaction_hash:B[0]??null}),y.invalidateQueries({queryKey:["mana-balance"]}),ht(w,B)}catch(v){const{toRelease:x}=Qt({reservations:A,spent:new Set([...F].filter(E=>!L.has(E))),settled:new Set});x.length&&Ke(r.identity,x).catch(()=>{}),A.length&&y.invalidateQueries({queryKey:["usd-balance"]}),ut(v,"buy_cart_combined")}}async function J(t){if(!r){_t({type:"cart-checkout"}),Ze();return}const s=H.getState().items.filter(nt);if(s.length===0)return;ce(null),fe(null),q(!0);const o=s.reduce((c,u)=>c+u.priceCredits*u.quantity,0);V("Shop Started Checkout",{checkout_source:"cart",cart_size:s.length,cart_value_credits:o,cart_value_usd:It(o),has_sufficient_credits:xe>=o});try{const c=await Zs(s,r.address,ba,await pt(),ya,Va),u=[...c.unavailable,...c.own];if(u.length&&(u.forEach(w=>l(w.id)),fe(ui(c))),c.buyable.length===0){ce(a("cart.error.noneAvailable")),D(null);return}if(c.orderChanged){D(c),tt.current=Date.now();return}await gt(c.buyable,t)}catch(c){ie(c,{flow:"cart_checkout",step:"review",cart_size:s.length}),ce(Ve(c))}finally{q(!1)}}async function vt(){if(R){if(!r){_t({type:"cart-checkout"}),Ze();return}if(Date.now()-tt.current>hi){D(null),fe(null),await J();return}ce(null),gt(R.buyable)}}async function ja(){if(Ee){try{sessionStorage.setItem(ke,JSON.stringify(H.getState().items))}catch{}q(!0);try{const t=await en(Ee,r?{address:r.address,identity:r.identity}:void 0);if(t.url){window.location.href=t.url;return}if(!t.orderId)throw new Error("Checkout returned neither a redirect url nor an order id");Y(`/credits?order=${encodeURIComponent(t.orderId)}`)}catch(t){try{sessionStorage.removeItem(ke)}catch{}ie(t,{flow:"cart_buy_credits"}),S({phase:"error",message:a("buyModal.error.creditsCheckout")})}finally{q(!1)}}}const Ct=T.useRef(!1);T.useEffect(()=>{if(!r||Ct.current||!ns("cart-checkout"))return;Ct.current=!0;const t=setTimeout(()=>void J(),0);return()=>clearTimeout(t)},[r]);const kt=T.useRef(!1);T.useEffect(()=>{if(!(_!=null&&_.resumeCheckout)||kt.current)return;kt.current=!0,le.current=_.creditsAdded??null;try{const s=sessionStorage.getItem(ke);if(s){sessionStorage.removeItem(ke);const o=JSON.parse(s);Array.isArray(o)&&o.length&&U(o)}}catch{}y.invalidateQueries({queryKey:["usd-balance"]});const t=setTimeout(()=>void J(),0);return()=>clearTimeout(t)},[_==null?void 0:_.resumeCheckout]);const jt=T.useRef(!1);T.useEffect(()=>{if(!(_!=null&&_.startCheckout)||jt.current)return;jt.current=!0,Y(".",{replace:!0,state:null});const t=setTimeout(()=>void J(),0);return()=>clearTimeout(t)},[_==null?void 0:_.startCheckout]);const Z=ca||(h==null?void 0:h.phase)==="processing";if(n.length===0&&!h)return e.jsx(Ot,{children:e.jsxs(Ht,{children:[e.jsxs(Gt,{onClick:()=>Y(-1),type:"button",children:[e.jsx(X,{name:"arrow-left"}),a("nav.cart")]}),e.jsx(Tn,{children:e.jsx(Ka,{testId:"cart-empty",icon:Qa,title:a("cart.empty.title"),body:a("cart.empty.body"),cta:{label:a("cart.empty.cta"),to:"/items"}})})]})});const $a=Js(ge,(h==null?void 0:h.phase)==="nofunds"?h.shortfall:0).packs;return e.jsxs(Ot,{children:[e.jsxs(Ht,{children:[e.jsxs(Gt,{onClick:()=>Y(-1),type:"button",children:[e.jsx(X,{name:"arrow-left"}),a("nav.cart")]}),e.jsxs(jn,{children:[e.jsx($n,{children:e.jsxs(Mn,{children:[e.jsxs(Sn,{children:[e.jsx(An,{onClick:()=>Y(-1),type:"button","aria-label":a("cart.goBack"),children:e.jsx(X,{name:"arrow-left"})}),e.jsx(Wn,{children:a("cart.panelTitle",{count:la})}),ra?e.jsxs(In,{onClick:()=>O(!0),disabled:Z,children:[e.jsx(X,{name:"fitting-room"}),a("cart.fittingRoom")]}):null]}),e.jsx(En,{children:n.map(t=>{const s=pa.get(t.id),o=s?s.priceCredits:t.priceCredits,c=!!s&&s.priceCredits!==t.priceCredits,u=!t.tokenId,w=t.quantity,f=typeof t.available=="number"&&w>=t.available,A=o*w,F=Ua(t),L=!!F&&!!G[F],v=Oa(t),x=st[t.id],E=!Wt(x),N=x==="sold-out"?a("cart.availability.soldOut"):a("cart.availability.unavailable");return e.jsxs(Pn,{"data-unavailable":E||void 0,children:[e.jsxs(zn,{"data-thumb":!0,children:[v?e.jsx(_n,{to:v,state:{item:t,tradeId:t.tradeId},"aria-label":t.name,children:t.thumbnail?e.jsx("img",{src:t.thumbnail,alt:t.name}):null}):t.thumbnail?e.jsx("img",{src:t.thumbnail,alt:t.name}):null,e.jsx(Bn,{"data-check":!0,"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(qn,{children:[e.jsxs(Rn,{"data-desc":!0,children:[v?e.jsx(Fn,{to:v,state:{item:t,tradeId:t.tradeId},title:t.name,children:t.name}):e.jsx(Ln,{title:t.name,children:t.name}),t.creator?e.jsx(Nn,{address:t.creator,linkToProfile:!0}):null,ia&&u?e.jsxs(Yn,{"data-testid":"cart-creator-tag",children:[e.jsx(Jn,{name:"buy-from-creator"}),a("cart.creatorTag")]}):null]}),e.jsx(Kn,{children:E?e.jsxs(Vn,{children:[e.jsx(Xn,{name:"warning-fill",size:24}),N]}):e.jsxs(e.Fragment,{children:[u?e.jsxs(Qn,{children:[e.jsx(Dt,{onClick:()=>be(()=>$(t.id)),disabled:Z||w<=1,"aria-label":a("cart.decreaseQuantity",{name:t.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(Un,{children:w}),e.jsx(Dt,{onClick:()=>be(()=>j(t.id)),disabled:Z||f,"aria-label":a("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(On,{children:[e.jsx(Gn,{})," ",e.jsx(Ne,{credits:A}),c?e.jsx(Hn,{children:e.jsx(Ne,{credits:t.priceCredits*w})}):null]})]})})]}),e.jsxs(Dn,{children:[F?e.jsx(Zn,{"data-on":L||void 0,onClick:()=>M(t),"aria-label":L?a("cart.removeFromFavorites",{name:t.name}):a("cart.addToFavorites",{name:t.name}),title:L?a("assetCard.removeFromFavorites"):a("assetCard.addToFavorites"),children:e.jsx(X,{name:L?"heart-solid":"heart"})}):null,e.jsx(ei,{onClick:()=>be(()=>l(t.id)),disabled:Z,"aria-label":a("cart.remove",{name:t.name}),title:a("cart.removeTitle"),children:e.jsx(X,{name:"trash",size:24})})]})]},t.id)})}),e.jsx(ti,{children:e.jsx("button",{className:"link",onClick:()=>be(z),disabled:Z,children:a("cart.clearCart")})})]})}),e.jsxs(ai,{children:[e.jsx(si,{children:a("cart.purchaseSummary")}),e.jsxs(ni,{children:[e.jsxs(ii,{children:[e.jsx(ri,{children:a("cart.totalItems",{count:ha})}),e.jsx(ci,{children:e.jsxs(oi,{children:[e.jsx(di,{})," ",e.jsx(Ne,{credits:rt})]})})]}),e.jsx(Zt,{options:_e.options,totalCents:ze,shortfall:_e.manaShortfall,showCreditsAmount:!1,creditsLabel:R?a("marketCheckout.confirmPurchase"):_e.options.length>1?a("cart.buyWithCredits"):a("cart.checkout"),busy:Z||it,onPay:t=>void(R?vt():J(t)),creditsFallback:{label:Z?a("cart.working"):R?a("marketCheckout.confirmPurchase"):a("cart.checkout"),onClick:()=>void(R?vt():J())}}),it?e.jsx($e,{className:"muted",children:a("cart.allUnavailable")}):null,r?null:e.jsx($e,{className:"muted",children:a("cart.signInHint")}),R?e.jsx($e,{className:"muted",children:a("cart.priceChanged")}):null,et?e.jsx($e,{className:"muted",children:et}):null,e.jsx(li,{message:oa})]})]})]})]}),dt===null&&e.jsx(Vt,{"data-testid":"cart-personal-upsell",children:e.jsx(Ga,{exclude:ct,title:a("cart.suggestedTitle"),surface:"cart",first:Xt})}),dt!==null&&ot.length>0?e.jsx(Vt,{children:e.jsx(is,{title:a("cart.youMightAlsoLike"),items:ot})}):null,he&&r?e.jsx(rs,{auth:he.auth,signer:r.signer,step:{index:he.index,total:he.total},title:a("authorizeStep.manaTitle"),name:a("authorizeStep.manaName"),reason:a("authorizeStep.manaReason"),icon:e.jsx("img",{src:Te,width:24,height:24,alt:"","aria-hidden":!0}),onAuthorized:()=>{const{run:t}=he;ye(null),t()},onCancel:()=>ye(null),onClose:()=>ye(null)}):null,h?e.jsx(bn,{phase:h.phase,balanceCredits:xe,heldCreditsCount:((Mt=k==null?void 0:k.held)==null?void 0:Mt.credits)??null,onClose:wa,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:Ha(r==null?void 0:r.providerType),signatures:h.phase==="processing"?h.signatures:void 0,options:h.phase==="choose"?qe(h).options:void 0,shortfall:h.phase==="choose"?qe(h).manaShortfall:void 0,onPay:ka,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:$a,selectedPack:Ee,onSelectPack:at,onBuyPacks:()=>void ja(),message:h.phase==="error"?h.message:void 0,heldCredits:h.phase==="error"&&!!h.heldCredits,onRetry:()=>void J()}):null]})}export{Ai as Cart};
826
- //# sourceMappingURL=Cart-DHXpbyUV.js.map
826
+ //# sourceMappingURL=Cart-NYBgZajK.js.map
@@ -1,4 +1,4 @@
1
- import{j as e,r as b,e as se,b as oe}from"./react-FXc7nqwH.js";import{a as x,s as m,l as ae,I as re,k as ie,t as a,a6 as q,bP as F,bQ as ne,bR as ce,c as le,c8 as de,w as me,B as ue,bS as pe,ay as fe,a2 as be,a4 as U,a5 as he,bT as xe,bU as ge,c9 as ye}from"./index-nSSZPEcQ.js";import{E as ve}from"./ErrorNotice-D4gUUlIi.js";import{d as je,P as we,C as Ce,a as E,b as ke,S as Se}from"./collectionPage.styles-DlbrCCm2.js";import{u as $e}from"./useStore-BJx4JKX-.js";import{u as Ne,S as W,F as Ee,a as Ie}from"./Filters-CE5Se0va.js";import{L as Fe}from"./LoadMore-BkE5uYS9.js";import{u as Me}from"./useInfiniteGrid-BqiJGvSL.js";import{u as Re,s as Te}from"./search-empty-A1mcW5hg.js";import{R as _e,S as Pe,a as Ae,D as De,b as Be,C as Le,c as ze,d as Oe,e as Ue,M as We}from"./browseLayout.styles-BS0Dz4kA.js";import{G as Ge}from"./grid.styles-BptDd5gG.js";import"./dcl-schemas-BzKcn35u.js";import"./sentry-Dqbs4IC8.js";import"./ethers-BucT1p_V.js";import"./intl-AKLEHPeO.js";import"./crumbs.styles-Bz51sAXJ.js";import"./Tooltip-l5J-TLhj.js";import"./skeleton.styles-CZZ4EBRf.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},s=new o.Error().stack;s&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[s]="0515c724-4bc9-4f4c-ab7a-383e5b555e5d",o._sentryDebugIdIdentifier="sentry-dbid-0515c724-4bc9-4f4c-ab7a-383e5b555e5d")}catch{}})();const qe=m.section`
1
+ import{j as e,r as b,e as se,b as oe}from"./react-BFIm3j2a.js";import{a as x,s as m,l as ae,I as re,k as ie,t as a,a6 as q,bP as F,bQ as ne,bR as ce,c as le,c8 as de,w as me,B as ue,bS as pe,ay as fe,a2 as be,a4 as U,a5 as he,bT as xe,bU as ge,c9 as ye}from"./index-DTrZkeIu.js";import{E as ve}from"./ErrorNotice-l-B8k9a3.js";import{d as je,P as we,C as Ce,a as E,b as ke,S as Se}from"./collectionPage.styles-Dfsxcebr.js";import{u as $e}from"./useStore-Cdj6cI4_.js";import{u as Ne,S as W,F as Ee,a as Ie}from"./Filters-CEz8bjG2.js";import{L as Fe}from"./LoadMore-BTzn9wsv.js";import{u as Me}from"./useInfiniteGrid-Cv5x7S43.js";import{u as Re,s as Te}from"./search-empty-ClovaM0p.js";import{R as _e,S as Pe,a as Ae,D as De,b as Be,C as Le,c as ze,d as Oe,e as Ue,M as We}from"./browseLayout.styles-Bgc_8ycQ.js";import{G as Ge}from"./grid.styles-DdTmyIUo.js";import"./dcl-schemas-FmJ72SB7.js";import"./sentry-B6w4u-W-.js";import"./ethers-CoY9-2x5.js";import"./intl-AKLEHPeO.js";import"./crumbs.styles-CHgrOACG.js";import"./Tooltip-DlenNQy2.js";import"./skeleton.styles-bqklkUaQ.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},s=new o.Error().stack;s&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[s]="0515c724-4bc9-4f4c-ab7a-383e5b555e5d",o._sentryDebugIdIdentifier="sentry-dbid-0515c724-4bc9-4f4c-ab7a-383e5b555e5d")}catch{}})();const qe=m.section`
2
2
  position: relative;
3
3
  border-radius: ${x.radius.card};
4
4
  overflow: hidden;
@@ -131,4 +131,4 @@ import{j as e,r as b,e as se,b as oe}from"./react-FXc7nqwH.js";import{a as x,s a
131
131
  background: ${j.blackBtn};
132
132
  }
133
133
  `;function ct({address:o}){var d,n;const{data:s}=q(o);if(!o)return null;const i=(s==null?void 0:s.name)||F(o),c=(n=(d=s==null?void 0:s.avatar)==null?void 0:d.snapshots)==null?void 0:n.face256,r=`${le.profileUrl}/${o}`,u=ne(ce({name:s==null?void 0:s.name,hasClaimedName:s==null?void 0:s.hasClaimedName,ethAddress:(s==null?void 0:s.ethAddress)??o}));return e.jsxs(rt,{"data-testid":"creator-card",children:[c?e.jsx(G,{src:c,alt:"",loading:"eager",style:{backgroundColor:u}}):e.jsx(G,{as:"span","aria-hidden":!0,style:{backgroundColor:u}}),e.jsx(it,{title:i,children:i}),e.jsx(ot,{value:o,label:a("collection.copyAddress"),flow:"copy_creator_address",testId:"creator-card-copy",children:e.jsx("span",{children:F(o)})}),e.jsx(nt,{"data-testid":"creator-card-view",href:r,target:"_blank",rel:"noopener noreferrer",children:a("collection.viewProfile")})]})}const lt=48,dt=["all","on_sale","not_for_sale"];function It(){var O;const{contractAddress:o}=se(),s=oe(),i=b.useMemo(()=>({category:"all",status:"all",subCategory:null,rarities:[],priceMin:"",priceMax:"",smart:!1,sort:"newest"}),[]),[c,r]=Re(i),{category:u,subCategory:d,rarities:n,priceMin:h,priceMax:f,smart:C,sort:M}=c,g=dt.includes(c.status)?c.status:"all",R=t=>r({status:t});Ne(`${u}:${d??""}`);const[w,y]=b.useState(!1);b.useEffect(()=>{if(!w)return;const t=te=>{te.key==="Escape"&&y(!1)};document.addEventListener("keydown",t);const N=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",t),document.body.style.overflow=N}},[w]);const T=h&&!Number.isNaN(Number(h))?Number(h):void 0,_=f&&!Number.isNaN(Number(f))?Number(f):void 0,H=d?ge[d]:void 0,K=(W.find(t=>t.key===M)??W[0]).server,P={contractAddress:o,category:u,rarities:n.length?n:void 0,wearableCategories:H,minPriceCredits:T,maxPriceCredits:_,isWearableSmart:C||void 0,isOnSale:g==="all"?void 0:g==="on_sale",sortBy:K},{items:Q,total:V,isLoading:k,error:A,hasNextPage:Z,isFetchingNextPage:D,isFetchNextPageError:J,fetchNextPage:X}=Me(["collection-page",P],t=>xe({...P,first:lt,skip:t}),{enabled:!!o}),S=de(Q),{data:l}=me({queryKey:["collection-meta",o],queryFn:()=>ye(o),enabled:!!o,staleTime:5*6e4}),B=(l==null?void 0:l.name)||a("collection.fallbackTitle");ue({title:l==null?void 0:l.name,description:l!=null&&l.name?a("seo.collection.description",{name:l.name}):void 0});const p=(l==null?void 0:l.creator)||((O=S[0])==null?void 0:O.creator),{data:$}=q(p),Y=($==null?void 0:$.name)||(p?F(p):"");function ee(t){r({category:t,subCategory:null})}function L(t){r({rarities:n.includes(t)?n.filter(N=>N!==t):[...n,t]})}function z(){r(i)}const v=[];(T!=null||_!=null)&&v.push({key:"price",label:a("filter.price"),onRemove:()=>{r({priceMin:"",priceMax:""})}});for(const t of pe)n.includes(t)&&v.push({key:`rarity-${t}`,label:fe(t),onRemove:()=>L(t)});return C&&v.push({key:"smart",label:a("filter.smart"),onRemove:()=>r({smart:!1})}),g!=="all"&&v.push({key:"status",label:g==="on_sale"?a("filter.onSale"):a("filter.notForSale"),onRemove:()=>R("all")}),e.jsxs(we,{"data-testid":"collection-page",children:[e.jsxs(Ce,{"aria-label":a("collection.breadcrumbAria"),children:[e.jsx(E,{onClick:()=>s("/items"),children:a("collection.breadcrumb")}),p?e.jsxs(e.Fragment,{children:[e.jsx("span",{children:"/"}),e.jsx(E,{onClick:()=>s(`/items/creator/${p}`),children:Y}),e.jsx("span",{children:"/"}),e.jsx(E,{onClick:()=>s(`/items/creator/${p}?collections`),children:a("categories.collections")})]}):null,e.jsx("span",{children:"/"}),e.jsx(ke,{children:B})]}),e.jsx(Ze,{name:B,creator:p}),e.jsxs(_e,{"data-testid":"browse",children:[w?e.jsx(Pe,{onClick:()=>y(!1),"aria-hidden":!0}):null,e.jsxs(Se,{children:[e.jsx(ct,{address:p}),e.jsxs(Ae,{"data-open":w||void 0,"data-static":!0,"data-testid":"browse-sidebar",children:[e.jsxs(De,{children:[e.jsx(Be,{children:a("assets.filters")}),e.jsx(Le,{onClick:()=>y(!1),"aria-label":a("assets.closeFilters"),children:"✕"})]}),e.jsx(ze,{children:e.jsx(Ee,{category:u,subCategory:d,onCategory:ee,onSub:t=>r({subCategory:t}),priceMin:h,priceMax:f,onPriceMin:t=>r({priceMin:t}),onPriceMax:t=>r({priceMax:t}),rarities:n,onToggleRarity:L,status:g,onStatus:R,smart:C,onSmart:t=>r({smart:t}),hideNames:!0})}),e.jsx(Oe,{children:e.jsx(Ue,{type:"button",onClick:()=>y(!1),children:a("assets.showItems")})})]})]}),e.jsxs(We,{children:[e.jsx(Ie,{sort:M,onSort:t=>r({sort:t}),total:V,loading:k,onOpenFilters:()=>y(!0),chips:v,onClearChips:z}),A?e.jsx(ve,{message:a("collection.error")}):null,!k&&!A&&S.length===0?e.jsx(be,{testId:"collection-empty",icon:Te,title:a("assets.empty.title"),body:a("collection.empty"),cta:{label:a("filterBar.clearAll"),onClick:z}}):e.jsxs(e.Fragment,{children:[e.jsx(Ge,{"data-testid":"grid",children:k?e.jsx(U,{count:15}):e.jsxs(e.Fragment,{children:[S.map(t=>e.jsx(he,{item:t},t.id)),D?e.jsx(U,{count:6}):null]})}),e.jsx(Fe,{hasNextPage:Z,isFetching:D,isError:J,onLoadMore:()=>void X()})]})]})]})]})}export{It as Collection,It as default};
134
- //# sourceMappingURL=Collection-CKuz93x8.js.map
134
+ //# sourceMappingURL=Collection-VReUKYX4.js.map