@dcl/shop 1.11.4-33205535310.commit-7a8aa97 → 1.11.4-33732305897.commit-1e7324f

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (229) hide show
  1. package/_assets/{Activity-DnZHUo9l.js → Activity-Cx802b5N.js} +4 -4
  2. package/_assets/{AnimatedBackground-BA1Cu3C9.js → AnimatedBackground-CdbRock2.js} +6 -6
  3. package/_assets/{Assets-BLKlgj00.js → Assets-Cso_98af.js} +7 -7
  4. package/_assets/{Authorizations-D-70ZhQL.js → Authorizations-Dp6DDvM0.js} +2 -2
  5. package/_assets/{Cart-Dwe9BV_l.js → Cart-DIZRo9El.js} +2 -2
  6. package/_assets/{Collection-MkFzHUcz.js → Collection-CYfbROlU.js} +2 -2
  7. package/_assets/{CollectionCarousel-Db3_b5uH.js → CollectionCarousel-qayOu3OX.js} +3 -3
  8. package/_assets/{Confetti-DEHU9-Cr.js → Confetti-C6l6x2P5.js} +4 -4
  9. package/_assets/{ConstantsUtil-Dxcnn2id.js → ConstantsUtil-BXwnLwQf.js} +2 -2
  10. package/_assets/{ContentClient-CywbUyw3.js → ContentClient-zja3_MJn.js} +2 -2
  11. package/_assets/{Creator-2rvY4LIF.js → Creator-rcfscFm-.js} +2 -2
  12. package/_assets/{DeploymentBuilder-ColC2-cu.js → DeploymentBuilder-BSMrkYtO.js} +2 -2
  13. package/_assets/{EmotePlaybackBar-DYtrEMrf.js → EmotePlaybackBar-Cf_gwNRt.js} +5 -5
  14. package/_assets/{ErrorNotice-Dn6mBZT0.js → ErrorNotice-D7e9fD_T.js} +2 -2
  15. package/_assets/{ExchangeController-PeHR0sdb.js → ExchangeController-88RGEomq.js} +2 -2
  16. package/_assets/{Faq-CslVoYf1.js → Faq-DAjiL76E.js} +2 -2
  17. package/_assets/{GetCredits-TYa72Ri7.js → GetCredits-DLPhUtv4.js} +2 -2
  18. package/_assets/{Grow-ZhAzQ0S2.js → Grow-Cl7mR__9.js} +2 -2
  19. package/_assets/{HelpersUtil-Cu5qC5Wy.js → HelpersUtil-BLuGqr0g.js} +2 -2
  20. package/_assets/ItemDetail-CIxjBuEI.js +3685 -0
  21. package/_assets/{LoadMore-5CenCiPM.js → LoadMore-CR1nt5IY.js} +2 -2
  22. package/_assets/{ManaPricingBanner.styles-Cy27_rUQ.js → ManaPricingBanner.styles-d3D_Xifp.js} +2 -2
  23. package/_assets/{MyAssets-DuAeZqwH.js → MyAssets-CfQMQL5R.js} +2 -2
  24. package/_assets/{MyFavorites-BZ3ZOCr-.js → MyFavorites-DHAFlu5a.js} +2 -2
  25. package/_assets/{NetworkUtil-DuoZ256g.js → NetworkUtil-CUCblhjb.js} +2 -2
  26. package/_assets/{NotFound-BJHV0sZO.js → NotFound-I6cmEbZT.js} +2 -2
  27. package/_assets/{NotificationsBell-BoXP2nH_.js → NotificationsBell-DkG1pPAu.js} +2 -2
  28. package/_assets/{OutfitDetail-eAhZPsU3.js → OutfitDetail-CzoGXF0u.js} +2 -2
  29. package/_assets/{OutfitPreview-BKQvARws.js → OutfitPreview-xZDEXOW9.js} +2 -2
  30. package/_assets/{OutfitStudio-Dd4huqy5.js → OutfitStudio-HfMrtN23.js} +2 -2
  31. package/_assets/{StoreSettings-CRp_cwd6.js → StoreSettings-DJ7uoT6K.js} +22 -22
  32. package/_assets/{Success-D8mYOb6V.js → Success-DYx_37Ay.js} +2 -2
  33. package/_assets/{SwapController-CXZfwDqu.js → SwapController-CiKd8M9-.js} +2 -2
  34. package/_assets/{TradeService-BIBakMca.js → TradeService-DLDnEWfW.js} +2 -2
  35. package/_assets/{W3MFrameProviderSingleton-C4bKPnoW.js → W3MFrameProviderSingleton-BZxOUMEf.js} +4 -4
  36. package/_assets/{WebCryptoP256-Cnh-yMoM.js → WebCryptoP256-BGs-m2fW.js} +2 -2
  37. package/_assets/{authorizations-DVcnP4OW.js → authorizations-9V7aWjZQ.js} +2 -2
  38. package/_assets/{basic-MwqK24dP.js → basic-8Obxw1Tt.js} +2 -2
  39. package/_assets/{biconomy-B-AF7YPz.js → biconomy-BWWmhakt.js} +2 -2
  40. package/_assets/{browseLayout.styles-CkyyQm-Z.js → browseLayout.styles-Bhm7l2yL.js} +2 -2
  41. package/_assets/{browser-Dcdfma-b.js → browser-DJLq-3J-.js} +2 -2
  42. package/_assets/{browser-ponyfill-B1rBgIk4.js → browser-ponyfill-Dvf1ZyJ8.js} +2 -2
  43. package/_assets/{builder-CXuY5Bw4.js → builder-DORX-23E.js} +2 -2
  44. package/_assets/{buy-DNqcsljj.js → buy-DEqsVztl.js} +2 -2
  45. package/_assets/{buy-gasless-6sL_DNZf.js → buy-gasless-C6HcNbUA.js} +2 -2
  46. package/_assets/{categories-Btqn8toI.js → categories-CwOJ2g25.js} +2 -2
  47. package/_assets/{ccip-D6Mr8Beb.js → ccip-DOIKfY-r.js} +2 -2
  48. package/_assets/{ccip-BE0wd_6W.js → ccip-t9OGim7e.js} +2 -2
  49. package/_assets/{chains-CzyXmUAh.js → chains-CJ5puEsf.js} +2 -2
  50. package/_assets/collectionPage.styles-D8mS4okV.js +41 -0
  51. package/_assets/{common-BpvR0PD7.js → common-DDUK0SnQ.js} +2 -2
  52. package/_assets/{controller-DQKYnVYG.js → controller-6VPVhW4x.js} +3 -3
  53. package/_assets/{core-BA652j12.js → core-c6b_bR-6.js} +5 -5
  54. package/_assets/{createSvgIcon-B9t67KVh.js → createSvgIcon-vxgiUsZ8.js} +2 -2
  55. package/_assets/{crumbs.styles-BBVqDdKT.js → crumbs.styles-DuD2nYKt.js} +2 -2
  56. package/_assets/{custom-C2Ynj54q.js → custom-B-DBmMBT.js} +2 -2
  57. package/_assets/{data-capture-BTmjKf__.js → data-capture-jj2Gx94-.js} +2 -2
  58. package/_assets/{dcl-schemas-CGG1jvt5.js → dcl-schemas-DomYdfSu.js} +2 -2
  59. package/_assets/{decimals-DHOGSr5H.js → decimals-B1-HCH4o.js} +2 -2
  60. package/_assets/{decimals-BQPVO3ja.js → decimals-D_FZwEan.js} +2 -2
  61. package/_assets/{detectExtension-DMFtS9WA.js → detectExtension-CWa-6_2f.js} +2 -2
  62. package/_assets/{disposePreview-DXiF2HTT.js → disposePreview-07YPRIAs.js} +2 -2
  63. package/_assets/{email-B0gMrrpv.js → email-aaQBtCb5.js} +2 -2
  64. package/_assets/{embedded-wallet-DA1oCEio.js → embedded-wallet-BdtgYcgd.js} +2 -2
  65. package/_assets/{emotion-styled.browser.esm-O5t6A-xa.js → emotion-styled.browser.esm-j64b3Tjj.js} +2 -2
  66. package/_assets/{engine-CelyR7dQ.js → engine-CbVRXgIZ.js} +2 -2
  67. package/_assets/{errors-Da6uevGV.js → errors-BRe26Jfh.js} +2 -2
  68. package/_assets/{estimate-l1-fee-igEerjNc.js → estimate-l1-fee-QZY2dl9c.js} +2 -2
  69. package/_assets/{eth_estimateGas-CFbqTjIi.js → eth_estimateGas-BNHHtt_v.js} +2 -2
  70. package/_assets/{eth_getStorageAt-CXK-0J7p.js → eth_getStorageAt-BrUSFI3L.js} +2 -2
  71. package/_assets/{eth_getTransactionCount-upwizO7f.js → eth_getTransactionCount-Cz-QYrW7.js} +2 -2
  72. package/_assets/{ethereum-C2DTtUXT.js → ethereum-DymTbk_A.js} +2 -2
  73. package/_assets/{ethers-DsOeUsXW.js → ethers-lJUVMKsu.js} +2 -2
  74. package/_assets/{events-BGkO5_9X.js → events-DmqgnxYn.js} +2 -2
  75. package/_assets/{execute-Doh-o6b4.js → execute-7sS5TYiC.js} +3 -3
  76. package/_assets/{extractIPFS-xzGbPd6t.js → extractIPFS-Bw8oBiZX.js} +2 -2
  77. package/_assets/{features-BpUb2MYF.js → features-xz2G4uEQ.js} +2 -2
  78. package/_assets/{fetchTokenMetadata-D00PQ-V_.js → fetchTokenMetadata-vSJgaR6g.js} +3 -3
  79. package/_assets/{field.styles-DVMkItfG.js → field.styles-D1SXDqdV.js} +2 -2
  80. package/_assets/{fortmatic-8MpxeR7F.js → fortmatic-gJx4GubC.js} +2 -2
  81. package/_assets/{get-bytecode-FRjyagdO.js → get-bytecode-MyuYdLGE.js} +2 -2
  82. package/_assets/{get-ecosystem-wallet-info-B_bTTuBG.js → get-ecosystem-wallet-info-CkBTWtMQ.js} +2 -2
  83. package/_assets/{getBalance-D5tT_nQF.js → getBalance-Dm8gCwzR.js} +3 -3
  84. package/_assets/{getInstalledModules-CecnPwhy.js → getInstalledModules-DWgOMGf-.js} +2 -2
  85. package/_assets/{getNFT-vJtLMdKT.js → getNFT-ClPLzjfc.js} +2 -2
  86. package/_assets/{getNFT-DSGt0kN-.js → getNFT-nMNheg0y.js} +3 -3
  87. package/_assets/{grid.styles-CQw2SW8V.js → grid.styles-DM_pjmHa.js} +2 -2
  88. package/_assets/{hashTypedData-DUJqNK4S.js → hashTypedData-Dd7KjMKN.js} +2 -2
  89. package/_assets/{hashTypedData-CGMf0bG3.js → hashTypedData-y7_Tr4xZ.js} +2 -2
  90. package/_assets/{in-app-BOVcQ26g.js → in-app-BvxDIS--.js} +2 -2
  91. package/_assets/{in-app-wallet-calls-CPy2VezJ.js → in-app-wallet-calls-Ee5YhUqD.js} +2 -2
  92. package/_assets/{index-Vvwta9o4.js → index--o_-OJuT.js} +2 -2
  93. package/_assets/{index-DwSBdU0n.js → index-2yKnWScC.js} +2 -2
  94. package/_assets/{index-D7Rj4sfO.js → index-4MTTH2jF.js} +2 -2
  95. package/_assets/{index-CAqCUDS4.js → index-8hxPoN1J.js} +2 -2
  96. package/_assets/{index-fAHr1z7g.js → index-B5w1yBSS.js} +2 -2
  97. package/_assets/{index-gcU34l-W.js → index-BAchvpdD.js} +2 -2
  98. package/_assets/{index-CxswY7e9.js → index-BAwv5IRG.js} +2 -2
  99. package/_assets/{index-B-v2NL0w.js → index-BBa2VK-f.js} +2 -2
  100. package/_assets/{index-xCdWsqN9.js → index-BESAfoqp.js} +2 -2
  101. package/_assets/{index-2x7zp-10.js → index-BFnNrQKW.js} +2 -2
  102. package/_assets/{index-BMPgVlNF.js → index-BPrU7S25.js} +2 -2
  103. package/_assets/{index-BzcOLtVK.js → index-BRU8_4Hh.js} +278 -278
  104. package/_assets/{index-lCksbDpF.js → index-BZBuIEvg.js} +2 -2
  105. package/_assets/{index-B6cKBWI8.js → index-Bbpseq-g.js} +2 -2
  106. package/_assets/{index-CZCaZvqv.js → index-Bd5O6EVu.js} +2 -2
  107. package/_assets/{index-DA8FNTXG.js → index-Bkksc2DS.js} +2 -2
  108. package/_assets/{index-4aABSizu.js → index-BqmYgiiA.js} +2 -2
  109. package/_assets/{index-RcwJybRY.js → index-Bu4ieETV.js} +2 -2
  110. package/_assets/{index-Re8HCxdE.js → index-BxVEbH5g.js} +4 -4
  111. package/_assets/{index-C_Kttocz.js → index-Bxh3xmjS.js} +3 -3
  112. package/_assets/{index-ezGVX9vD.js → index-C21h6RcO.js} +2 -2
  113. package/_assets/{index-Cio2-dWN.js → index-C6G8H-i2.js} +2 -2
  114. package/_assets/{index-70R-JS4k.js → index-C7fTmQXx.js} +2 -2
  115. package/_assets/{index-A9oz3hpe.js → index-C8ML1MUF.js} +2 -2
  116. package/_assets/{index-C6woera9.js → index-CBtHeLtX.js} +2 -2
  117. package/_assets/{index-DGwfwUpM.js → index-CC0705fK.js} +2 -2
  118. package/_assets/{index-BP0i9VZB.js → index-CK3TSCbT.js} +2 -2
  119. package/_assets/{index-nVEHjnIF.js → index-CKjEPC6b.js} +2 -2
  120. package/_assets/{index-s6e_pMXb.js → index-CLno03dC.js} +2 -2
  121. package/_assets/{index-CiZ_WKdY.js → index-CRJhbyzw.js} +2 -2
  122. package/_assets/{index-BRFgK8K_.js → index-CT7iKOLJ.js} +2 -2
  123. package/_assets/{index-CnQeqGNS.js → index-CXm5cLJF.js} +2 -2
  124. package/_assets/{index-Cpvcv3uX.js → index-CXyfi-oV.js} +3 -3
  125. package/_assets/{index-DtxBPE1q.js → index-CZSABpkP.js} +2 -2
  126. package/_assets/{index-BcIQCuIL.js → index-CdQT2cdk.js} +2 -2
  127. package/_assets/{index-DkK4yOyB.js → index-CkMYP1rZ.js} +2 -2
  128. package/_assets/{index-CwuiV47y.js → index-Cm1EeBJX.js} +2 -2
  129. package/_assets/{index-CWUxuCsZ.js → index-CujRtp21.js} +3 -3
  130. package/_assets/{index-irRAef4L.js → index-Cvd_cEZn.js} +2 -2
  131. package/_assets/{index-DdA9TDBD.js → index-D2Yhlar0.js} +2 -2
  132. package/_assets/{index-DGVKt-7e.js → index-D8d6Ec8E.js} +2 -2
  133. package/_assets/{index-Rsu__56e.js → index-DHwlTubo.js} +2 -2
  134. package/_assets/{index-0SNGviEP.js → index-DIbkRkqV.js} +2 -2
  135. package/_assets/{index-CakLInAG.js → index-DKjHNccw.js} +2 -2
  136. package/_assets/{index-CYymIrE1.js → index-DPTxCd6G.js} +2 -2
  137. package/_assets/{index-CutOqyFr.js → index-D_lvTSK4.js} +2 -2
  138. package/_assets/{index-Xuevff6V.js → index-DcO94W4Y.js} +2 -2
  139. package/_assets/{index-CRXpwNDJ.js → index-DjRCJyNX.js} +2 -2
  140. package/_assets/{index-CGSz8BTC.js → index-DjYJklgS.js} +2 -2
  141. package/_assets/{index-LDPWy5A7.js → index-Do_3YTno.js} +2 -2
  142. package/_assets/{index-BGafRQi1.js → index-DqDqtQYO.js} +2 -2
  143. package/_assets/{index-DBfNN3Kn.js → index-DseJbd5R.js} +2 -2
  144. package/_assets/{index-DkYJNtfw.js → index-H071WQsj.js} +2 -2
  145. package/_assets/{index-C-CF-Ibo.js → index-KhsHdzzf.js} +3 -3
  146. package/_assets/{index-C98gu7rH.js → index-Kvsk-w7C.js} +2 -2
  147. package/_assets/{index-DXDNY5rD.js → index-NSa1wzrj.js} +4 -4
  148. package/_assets/{index--zP7-a27.js → index-QrNoSRRk.js} +2 -2
  149. package/_assets/{index-Cg-RmLfH.js → index-SvZc89jX.js} +2 -2
  150. package/_assets/{index-qeiK8ZbE.js → index-_j-22RDf.js} +2 -2
  151. package/_assets/{index-BCn-f317.js → index-eziTHz08.js} +2 -2
  152. package/_assets/{index-BQCoqhZr.js → index-gunIJk2I.js} +2 -2
  153. package/_assets/{index-67UXSZ6-.js → index-nMRW32cT.js} +2 -2
  154. package/_assets/{index-DrjMfn32.js → index-p9NMF1hb.js} +2 -2
  155. package/_assets/{index-D3KgziRE.js → index-pJ3chOBq.js} +2 -2
  156. package/_assets/{index-BhPsm3Ao.js → index-sw946bja.js} +2 -2
  157. package/_assets/{index-CIM1mTp5.js → index-xSDiEZ6K.js} +4 -4
  158. package/_assets/{index-_2Yqw3KG.js → index-y6H3-XpH.js} +2 -2
  159. package/_assets/{index.es-Ldc81uln.js → index.es-B2RBfeIa.js} +2 -2
  160. package/_assets/{index.es-x_f-eS2G.js → index.es-BnZg7Xd1.js} +2 -2
  161. package/_assets/{index.es-D_Vs6Oyb.js → index.es-C9BgzNkd.js} +5 -5
  162. package/_assets/{index.es-4B3saysd.js → index.es-Cta59W14.js} +2 -2
  163. package/_assets/{items-empty-Cd6EybvW.js → items-empty-Dx3wrNdB.js} +2 -2
  164. package/_assets/{jump-BMy90ViU.js → jump-D7CqhrvB.js} +2 -2
  165. package/_assets/{linkAccount-Cn4Eox_U.js → linkAccount-CkJc9A3Z.js} +2 -2
  166. package/_assets/{localBatchGatewayRequest-COR40qxR.js → localBatchGatewayRequest-ux9ObxjO.js} +2 -2
  167. package/_assets/{native-DfGXj3-R.js → native-Dct9kcJr.js} +2 -2
  168. package/_assets/{networks-DSZpXRf7.js → networks-Ctf9gQ-h.js} +2 -2
  169. package/_assets/{onramp-CguINIEn.js → onramp-DKLhqwp-.js} +2 -2
  170. package/_assets/{openzeppelin-BCw2yDFA.js → openzeppelin-DdTAS0HR.js} +2 -2
  171. package/_assets/{ownerOf-Cn_YhfgN.js → ownerOf-_Vt0Z2wF.js} +2 -2
  172. package/_assets/{parseNft-BYwAnXmk.js → parseNft-uetMMM9V.js} +3 -3
  173. package/_assets/{parseSignature-DMViPGBk.js → parseSignature-CqzzLINO.js} +2 -2
  174. package/_assets/{parseSignature-Dcx4ssnE.js → parseSignature-DwDfJlaE.js} +4 -4
  175. package/_assets/{passkeys-CKnh5tB5.js → passkeys-Bok2lqqP.js} +2 -2
  176. package/_assets/{pay-with-exchange-BhM0qHz7.js → pay-with-exchange-C9p-SvWF.js} +2 -2
  177. package/_assets/{prepare-contract-call-CBUo3pmv.js → prepare-contract-call-Dm4BG9qV.js} +2 -2
  178. package/_assets/{qr-overlay-DtV6K685.js → qr-overlay-BVlxyxhh.js} +4 -4
  179. package/_assets/{react-jpAgvPLt.js → react-CO8J9utQ.js} +2 -2
  180. package/_assets/{receive-CI2HQNzi.js → receive-Bw8G1dr3.js} +2 -2
  181. package/_assets/{resolveImplementation-DyjFqOTz.js → resolveImplementation-Dl4sSBLo.js} +2 -2
  182. package/_assets/{resume-buy-LJxXaIAR.js → resume-buy-Bi8j_aT3.js} +2 -2
  183. package/_assets/{rpc-C6zzI9OZ.js → rpc-Btthh9Al.js} +2 -2
  184. package/_assets/{sales-empty-CQR6Cl2E.js → sales-empty-CCnR6rVA.js} +2 -2
  185. package/_assets/{search-empty-SNhvMEDl.js → search-empty-CXyPZHgu.js} +2 -2
  186. package/_assets/{secp256k1-BDqFIsVX.js → secp256k1-B8Ne-404.js} +2 -2
  187. package/_assets/{secp256k1-BZ58GGCE.js → secp256k1-Dbb07C3S.js} +2 -2
  188. package/_assets/{secp256k1-DXV_X-aA.js → secp256k1-DpXUZshB.js} +2 -2
  189. package/_assets/{send-DW0Ds3YN.js → send-DVZ6tnPw.js} +2 -2
  190. package/_assets/{send-batch-transaction-CW9GvjLq.js → send-batch-transaction-jebmiWQH.js} +2 -2
  191. package/_assets/{send-eip712-transaction-GtDkXTmK.js → send-eip712-transaction-CF7y1X4f.js} +3 -3
  192. package/_assets/{send-gasless-transaction-CWLP91Io.js → send-gasless-transaction-DDJSjJYf.js} +3 -3
  193. package/_assets/{send-transaction-CS2KkJSz.js → send-transaction-DvLGm3el.js} +3 -3
  194. package/_assets/{sendMetaTransaction-TAXZbOgU.js → sendMetaTransaction-BlBggQ5M.js} +2 -2
  195. package/_assets/{sendRawTransaction-DDaqC6Te.js → sendRawTransaction-7obVHnsN.js} +4 -4
  196. package/_assets/{sentry-B_JVKDG7.js → sentry-DYLA9B0R.js} +3 -3
  197. package/_assets/{serializeTransaction-Dzg7Wvls.js → serializeTransaction-C0q-4ciO.js} +2 -2
  198. package/_assets/{session-proposal-CfdMjuUM.js → session-proposal-C4dZCgCX.js} +2 -2
  199. package/_assets/{session-request-MX7JBX3K.js → session-request-DyezUY41.js} +3 -3
  200. package/_assets/{sha256-lP3uOOAn.js → sha256-OW4Z2URB.js} +2 -2
  201. package/_assets/{signing-Dzl91--e.js → signing-DxtkJWSs.js} +4 -4
  202. package/_assets/{skeleton.styles-C7n7Q1Xj.js → skeleton.styles-Duw3r1-f.js} +2 -2
  203. package/_assets/{socials-Bg-0FGl4.js → socials-DWZzZP7D.js} +2 -2
  204. package/_assets/{styled-DvlPUnRd.js → styled-BxX3T8NU.js} +2 -2
  205. package/_assets/{swaps-CjqMx5HP.js → swaps-Cg068wbj.js} +2 -2
  206. package/_assets/{thirdweb-D48UBlWS.js → thirdweb-Cj4YLEBK.js} +4 -4
  207. package/_assets/{to-serializable-transaction-YBTVpWil.js → to-serializable-transaction-CnmzxsxK.js} +3 -3
  208. package/_assets/{totalSupply-BFtbLmZw.js → totalSupply-V-w-XBfK.js} +2 -2
  209. package/_assets/{transaction-CZ1ehN2t.js → transaction-DeMruh4y.js} +2 -2
  210. package/_assets/{transactionReceipt-yESuKxXC.js → transactionReceipt-BUN5FmDU.js} +2 -2
  211. package/_assets/{transactions-Q-uFleYS.js → transactions-DV1UJBQD.js} +2 -2
  212. package/_assets/{useCreditPacks-mY4iSSJ4.js → useCreditPacks-C44m9MGN.js} +2 -2
  213. package/_assets/{useInfiniteGrid-Dmt2BhNA.js → useInfiniteGrid-BpgyqBYU.js} +2 -2
  214. package/_assets/{useStore-DCRztfDp.js → useStore-AVB0bigD.js} +3 -3
  215. package/_assets/{useTheme-BlwH8WXr.js → useTheme-CxHoB_nr.js} +2 -2
  216. package/_assets/{utils-BwbUCluR.js → utils-BEdOrVE1.js} +2 -2
  217. package/_assets/{verifyHash-Dg88Mnhe.js → verifyHash-XogOyjnx.js} +2 -2
  218. package/_assets/{w3m-modal-vxDi7BAE.js → w3m-modal-CVVSMyoo.js} +2 -2
  219. package/_assets/{w3m-modal-CaJHArzK.js → w3m-modal-Cscrrutb.js} +2 -2
  220. package/_assets/{wait-for-tx-receipt-_T-7FsA0.js → wait-for-tx-receipt-DEUnYeJ_.js} +2 -2
  221. package/_assets/{wallets-zL-_apND.js → wallets-DDmNSvOs.js} +6 -6
  222. package/_assets/{web-connector-Bm3m-1dj.js → web-connector-DMpf7sGG.js} +4 -4
  223. package/_assets/{writeContract-DGHQKd47.js → writeContract-DdTp54CW.js} +2 -2
  224. package/_assets/{zora-sepolia-Dt71AJJ6.js → zora-sepolia-BI6rCNAG.js} +2 -2
  225. package/_assets/{zoraTestnet-ByKMc0Ff.js → zoraTestnet-DSrKIE0U.js} +2 -2
  226. package/index.html +11 -11
  227. package/package.json +2 -2
  228. package/_assets/ItemDetail-9CUHqRPY.js +0 -3685
  229. package/_assets/collectionPage.styles-DXpjCqco.js +0 -41
@@ -1,5 +1,5 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["_assets/index-CakLInAG.js","_assets/react-jpAgvPLt.js","_assets/index-BzcOLtVK.js","_assets/dcl-schemas-CGG1jvt5.js","_assets/sentry-B_JVKDG7.js","_assets/ethers-DsOeUsXW.js","_assets/intl-AKLEHPeO.js","_assets/index-CKGO8NWe.css","_assets/sales-empty-CQR6Cl2E.js","_assets/buy-DNqcsljj.js","_assets/authorizations-DVcnP4OW.js","_assets/sendMetaTransaction-TAXZbOgU.js","_assets/ManaPricingBanner.styles-Cy27_rUQ.js","_assets/Faq-CslVoYf1.js","_assets/field.styles-DVMkItfG.js"])))=>i.map(i=>d[i]);
2
- import{U as we,bG as Ie,p as U,m as A,bH as Ae,t as o,s as l,n as Ee,o as Le,b as r,J as Ne,I as T,bI as se,bJ as ne,bK as $e,_ as Pe,L as Te,r as E,ao as K,bL as Se,v as Ce,bl as B,E as Fe,bM as De,x as N,bN as Me,bO as Q}from"./index-BzcOLtVK.js";import{r as g,u as He,j as t,e as Oe,L as Re}from"./react-jpAgvPLt.js";import{u as qe,s as _e}from"./sales-empty-CQR6Cl2E.js";import{L as ze}from"./LoadMore-5CenCiPM.js";import{u as $}from"./useInfiniteGrid-Dmt2BhNA.js";import{m as de}from"./mana-matic-CEqvSwrJ.js";import{n as We}from"./name-glyph-aUugT8vq.js";import"./dcl-schemas-CGG1jvt5.js";import"./sentry-B_JVKDG7.js";import"./ethers-DsOeUsXW.js";import"./intl-AKLEHPeO.js";import"./buy-DNqcsljj.js";import"./authorizations-DVcnP4OW.js";import"./sendMetaTransaction-TAXZbOgU.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},s=new e.Error().stack;s&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[s]="fe7b3b3b-5ce3-48dd-988c-c9984f731c95",e._sentryDebugIdIdentifier="sentry-dbid-fe7b3b3b-5ce3-48dd-988c-c9984f731c95")}catch{}})();const Ge=15e3;function Ue(e,s){return e.txHash&&s.txHash?e.txHash===s.txHash:e.txHash||s.txHash?!1:e.status===s.status&&Math.abs(e.createdAt-s.createdAt)<=Ge}function Ke(e){const s=[...e].sort((i,d)=>d.createdAt-i.createdAt),n=[];for(const i of s){const d=n[n.length-1];d&&Ue(d[d.length-1],i)?d.push(i):n.push([i])}return n.map(i=>{var d;return{id:((d=i.find(a=>a.txHash))==null?void 0:d.txHash)??i[i.length-1].id,createdAt:Math.max(...i.map(a=>a.createdAt)),status:Be(i),totalCredits:i.reduce((a,h)=>a+h.credits,0),lines:i}})}function Be(e){return e.some(s=>s.status==="PENDING")?"PENDING":e.some(s=>s.status==="SETTLED")?"SETTLED":"EXPIRED"}function Qe(e){return e==="SETTLED"?"SETTLED":e==="EXPIRED"?"FAILED":"PENDING"}function Xe(e){return e.tradeId?`trade:${e.tradeId}`:e.contractAddress&&e.itemId?`item:${e.contractAddress.toLowerCase()}:${e.itemId}`:null}function Ve(e){const s=[],n=new Map;for(const i of e){const d=Xe(i);if(!d){s.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 a=n.get(d);if(a){a.quantity+=1,a.credits+=i.credits;continue}const h={key:d,tradeId:i.tradeId,contractAddress:i.contractAddress??null,itemId:i.itemId??null,registeredName:i.registeredName??null,quantity:1,credits:i.credits};n.set(d,h),s.push(h)}return s}function Je(e,s){return{id:e.id,contractAddress:e.contractAddress,tokenId:e.tokenId,itemId:e.itemId,counterparty:e.buyer,credits:s?we(e.manaWei,s):null,manaWei:e.manaWei,createdAt:e.createdAt,txHash:e.txHash}}function Ye(e){return e.status!=="EXPIRED"||!!e.submittedTxHash}function Ze(e){const n=Ke(e.purchases.filter(Ye)).map(c=>({kind:"purchase",id:`purchase:${c.id}`,createdAt:c.createdAt,order:c})),i=e.sales.map(c=>{const m=Je(c,e.rate);return{kind:"sale",id:`sale:${m.id}`,createdAt:m.createdAt,sale:m}}),d=(e.creditOrders??[]).filter(c=>c.status!=="failed"&&c.status!=="abandoned").map(c=>({kind:"credit",id:`credit:${c.id}`,createdAt:c.createdAt,order:c})),a=new Set(e.purchases.filter(c=>c.txHash).map(c=>c.txHash.toLowerCase())),h=(e.manaPurchases??[]).filter(c=>!a.has(c.txHash.toLowerCase())).map(c=>({kind:"mana-purchase",id:`mana-purchase:${c.id}`,createdAt:c.createdAt,sale:c}));return[...n,...i,...d,...h].sort((c,m)=>m.createdAt-c.createdAt||(c.id<m.id?-1:1))}function et(e,s){return s==="all"?e:s==="sales"?e.filter(n=>n.kind==="sale"):e.filter(n=>n.kind==="purchase"||n.kind==="credit"||n.kind==="mana-purchase")}const ce=e=>e.trim().toLowerCase();function tt(e){const s=new Map;for(const n of e??[]){const i=ce(n.txHash??"");if(!i)continue;const d=s.get(i);d?d.push(n):s.set(i,[n])}return s}function it(e,s,n=Date.now()){const i=s.txHash?e.get(ce(s.txHash)):void 0;if(!i||i.length===0)return{kind:"direct"};const d=i.length===1?st(i[0].netCents):null,a=i.filter(c=>!c.available&&c.availableAt>n);if(a.length===0)return{kind:"credited",credits:d};const h=a.reduce((c,m)=>Math.max(c,m.availableAt),0);return{kind:"pending",credits:d,availableAt:h}}function st(e){return Ie(e)}function nt(){const e=U(i=>{var d;return(d=i.session)==null?void 0:d.address}),{data:s,isLoading:n}=A({queryKey:["listing-count",e],queryFn:()=>Ae({creator:e,onSale:!0,first:1}),enabled:!!e,staleTime:5*6e4});return{count:s==null?void 0:s.total,isLoading:n}}const at="https://cdn.decentraland.org/@dcl/shop/1.11.4-33205535310.commit-7a8aa97/_assets/credits-product-vs4Q6u6l.svg",X=Ee`
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["_assets/index-DKjHNccw.js","_assets/react-CO8J9utQ.js","_assets/index-BRU8_4Hh.js","_assets/dcl-schemas-DomYdfSu.js","_assets/sentry-DYLA9B0R.js","_assets/ethers-lJUVMKsu.js","_assets/intl-AKLEHPeO.js","_assets/index-CKGO8NWe.css","_assets/sales-empty-CCnR6rVA.js","_assets/buy-DEqsVztl.js","_assets/authorizations-9V7aWjZQ.js","_assets/sendMetaTransaction-BlBggQ5M.js","_assets/ManaPricingBanner.styles-d3D_Xifp.js","_assets/Faq-DAjiL76E.js","_assets/field.styles-D1SXDqdV.js"])))=>i.map(i=>d[i]);
2
+ import{U as we,bG as Ie,p as U,m as A,bH as Ae,t as o,s as l,n as Ee,o as Le,b as r,J as Ne,I as T,bI as se,bJ as ne,bK as $e,_ as Pe,L as Te,r as E,ao as K,bL as Se,v as Ce,bl as B,E as Fe,bM as De,x as N,bN as Me,bO as Q}from"./index-BRU8_4Hh.js";import{r as g,u as He,j as t,e as Oe,L as Re}from"./react-CO8J9utQ.js";import{u as qe,s as _e}from"./sales-empty-CCnR6rVA.js";import{L as ze}from"./LoadMore-CR1nt5IY.js";import{u as $}from"./useInfiniteGrid-BpgyqBYU.js";import{m as de}from"./mana-matic-CEqvSwrJ.js";import{n as We}from"./name-glyph-aUugT8vq.js";import"./dcl-schemas-DomYdfSu.js";import"./sentry-DYLA9B0R.js";import"./ethers-lJUVMKsu.js";import"./intl-AKLEHPeO.js";import"./buy-DEqsVztl.js";import"./authorizations-9V7aWjZQ.js";import"./sendMetaTransaction-BlBggQ5M.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},s=new e.Error().stack;s&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[s]="0a2c79df-0421-42a7-afc5-d8b3bc9763af",e._sentryDebugIdIdentifier="sentry-dbid-0a2c79df-0421-42a7-afc5-d8b3bc9763af")}catch{}})();const Ge=15e3;function Ue(e,s){return e.txHash&&s.txHash?e.txHash===s.txHash:e.txHash||s.txHash?!1:e.status===s.status&&Math.abs(e.createdAt-s.createdAt)<=Ge}function Ke(e){const s=[...e].sort((i,d)=>d.createdAt-i.createdAt),n=[];for(const i of s){const d=n[n.length-1];d&&Ue(d[d.length-1],i)?d.push(i):n.push([i])}return n.map(i=>{var d;return{id:((d=i.find(a=>a.txHash))==null?void 0:d.txHash)??i[i.length-1].id,createdAt:Math.max(...i.map(a=>a.createdAt)),status:Be(i),totalCredits:i.reduce((a,h)=>a+h.credits,0),lines:i}})}function Be(e){return e.some(s=>s.status==="PENDING")?"PENDING":e.some(s=>s.status==="SETTLED")?"SETTLED":"EXPIRED"}function Qe(e){return e==="SETTLED"?"SETTLED":e==="EXPIRED"?"FAILED":"PENDING"}function Xe(e){return e.tradeId?`trade:${e.tradeId}`:e.contractAddress&&e.itemId?`item:${e.contractAddress.toLowerCase()}:${e.itemId}`:null}function Ve(e){const s=[],n=new Map;for(const i of e){const d=Xe(i);if(!d){s.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 a=n.get(d);if(a){a.quantity+=1,a.credits+=i.credits;continue}const h={key:d,tradeId:i.tradeId,contractAddress:i.contractAddress??null,itemId:i.itemId??null,registeredName:i.registeredName??null,quantity:1,credits:i.credits};n.set(d,h),s.push(h)}return s}function Je(e,s){return{id:e.id,contractAddress:e.contractAddress,tokenId:e.tokenId,itemId:e.itemId,counterparty:e.buyer,credits:s?we(e.manaWei,s):null,manaWei:e.manaWei,createdAt:e.createdAt,txHash:e.txHash}}function Ye(e){return e.status!=="EXPIRED"||!!e.submittedTxHash}function Ze(e){const n=Ke(e.purchases.filter(Ye)).map(c=>({kind:"purchase",id:`purchase:${c.id}`,createdAt:c.createdAt,order:c})),i=e.sales.map(c=>{const m=Je(c,e.rate);return{kind:"sale",id:`sale:${m.id}`,createdAt:m.createdAt,sale:m}}),d=(e.creditOrders??[]).filter(c=>c.status!=="failed"&&c.status!=="abandoned").map(c=>({kind:"credit",id:`credit:${c.id}`,createdAt:c.createdAt,order:c})),a=new Set(e.purchases.filter(c=>c.txHash).map(c=>c.txHash.toLowerCase())),h=(e.manaPurchases??[]).filter(c=>!a.has(c.txHash.toLowerCase())).map(c=>({kind:"mana-purchase",id:`mana-purchase:${c.id}`,createdAt:c.createdAt,sale:c}));return[...n,...i,...d,...h].sort((c,m)=>m.createdAt-c.createdAt||(c.id<m.id?-1:1))}function et(e,s){return s==="all"?e:s==="sales"?e.filter(n=>n.kind==="sale"):e.filter(n=>n.kind==="purchase"||n.kind==="credit"||n.kind==="mana-purchase")}const ce=e=>e.trim().toLowerCase();function tt(e){const s=new Map;for(const n of e??[]){const i=ce(n.txHash??"");if(!i)continue;const d=s.get(i);d?d.push(n):s.set(i,[n])}return s}function it(e,s,n=Date.now()){const i=s.txHash?e.get(ce(s.txHash)):void 0;if(!i||i.length===0)return{kind:"direct"};const d=i.length===1?st(i[0].netCents):null,a=i.filter(c=>!c.available&&c.availableAt>n);if(a.length===0)return{kind:"credited",credits:d};const h=a.reduce((c,m)=>Math.max(c,m.availableAt),0);return{kind:"pending",credits:d,availableAt:h}}function st(e){return Ie(e)}function nt(){const e=U(i=>{var d;return(d=i.session)==null?void 0:d.address}),{data:s,isLoading:n}=A({queryKey:["listing-count",e],queryFn:()=>Ae({creator:e,onSale:!0,first:1}),enabled:!!e,staleTime:5*6e4});return{count:s==null?void 0:s.total,isLoading:n}}const at="https://cdn.decentraland.org/@dcl/shop/1.11.4-33732305897.commit-1e7324f/_assets/credits-product-vs4Q6u6l.svg",X=Ee`
3
3
  0% { background-position: 200% 0; }
4
4
  100% { background-position: -200% 0; }
5
5
  `,rt=l.section`
@@ -385,5 +385,5 @@ import{U as we,bG as Ie,p as U,m as A,bH as Ae,t as o,s as l,n as Ee,o as Le,b a
385
385
  height: 26px;
386
386
  object-fit: contain;
387
387
  }
388
- `,Z=L.withComponent(Re),wt=g.lazy(()=>Pe(()=>import("./index-CakLInAG.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14])).then(e=>({default:e.ImportListings}))),P=24,It=["all","purchases","sales"],W="section",oe="listings",G="view",At="migrate";function I(e){try{return new Date(e).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})}catch{return""}}function pe(e){return e.length>10?`${e.slice(0,6)}…${e.slice(-4)}`:e}function me(e){const s=Number(e)/1e18;return Number.isFinite(s)?s.toLocaleString("en",{maximumFractionDigits:2}):"0"}function xe({children:e}){const s=g.useRef(null),[n,i]=g.useState(null),d=()=>{var h;const a=(h=s.current)==null?void 0:h.getBoundingClientRect();a&&i({top:a.bottom+8,left:a.left+a.width/2})};return t.jsxs(xt,{ref:s,tabIndex:0,onMouseEnter:d,onMouseLeave:()=>i(null),onFocus:d,onBlur:()=>i(null),children:[e,n?Oe.createPortal(t.jsx(gt,{style:{top:n.top,left:n.left},role:"tooltip",children:r("activity.polygonMana")}),document.body):null]})}function Et({item:e}){const s=!!e.contractAddress&&!!e.itemId,n=!!e.tradeId||s,{data:i,isLoading:d}=A({queryKey:["order-line-display",e.tradeId,e.contractAddress,e.itemId],queryFn:()=>e.tradeId?Me(e.tradeId):Q(e.contractAddress,{itemId:e.itemId}),enabled:n,staleTime:5*6e4}),a=n&&d,h=(i==null?void 0:i.name)??r("activity.itemFallback"),c=(i==null?void 0:i.thumbnail)??"",m=B({contractAddress:i==null?void 0:i.contractAddress,tokenId:i==null?void 0:i.tokenId,itemId:i==null?void 0:i.itemId})??void 0,f=t.jsxs(t.Fragment,{children:[a?t.jsx(J,{}):t.jsx(R,{children:c?t.jsx("img",{src:c,alt:h}):t.jsx(T,{name:"cart",size:20})}),t.jsxs(q,{children:[a?t.jsx(Y,{}):t.jsx(_,{title:h,children:h}),e.quantity>1?t.jsx(z,{children:r("activity.quantity",{count:e.quantity})}):null]}),t.jsxs(he,{children:[t.jsx(E,{className:"ccy-mark"})," ",t.jsx(K,{credits:e.credits})]})]});return m?t.jsx(Z,{to:m,"data-link":"true",children:f}):t.jsx(L,{children:f})}function Lt({item:e}){const s=`@${e.registeredName}`;return t.jsxs(L,{"data-testid":"activity-name-line",children:[t.jsx(kt,{children:t.jsx("img",{src:We,alt:""})}),t.jsxs(q,{children:[t.jsx(_,{title:s,children:s}),t.jsx(z,{children:r("activity.nameRegistration")})]}),t.jsxs(he,{children:[t.jsx(E,{className:"ccy-mark"})," ",e.credits]})]})}function Nt({order:e}){const s=Ve(e.lines),n=s.reduce((a,h)=>a+h.quantity,0),i=Qe(e.status),d=i==="SETTLED"?r("activity.completed"):i==="FAILED"?r("activity.failed"):r("activity.processing");return t.jsxs(S,{"data-testid":"purchase-order",children:[t.jsxs(C,{children:[t.jsxs(F,{children:[t.jsx(D,{children:I(e.createdAt)}),t.jsxs(M,{children:[r("activity.purchaseLabel")," · ",r("activity.itemCount",{count:n})]})]}),t.jsxs(H,{children:[t.jsx(O,{"data-status":i,children:d}),t.jsxs(k,{children:[t.jsx(E,{className:"ccy-mark"})," ",t.jsx(K,{credits:e.totalCredits})]})]})]}),i==="FAILED"?t.jsx(ft,{children:r("activity.purchaseFailedNote")}):null,t.jsx(V,{children:s.map(a=>a.registeredName?t.jsx(Lt,{item:a},a.key):t.jsx(Et,{item:a},a.key))})]})}function $t({sale:e}){const{data:s,isLoading:n}=A({queryKey:["asset-display",e.contractAddress,e.tokenId,e.itemId],queryFn:()=>Q(e.contractAddress,{tokenId:e.tokenId,itemId:e.itemId}),enabled:!!e.contractAddress,staleTime:3e5}),i=(s==null?void 0:s.name)??r("activity.itemFallback"),d=(s==null?void 0:s.thumbnail)??"",a=B({contractAddress:e.contractAddress,tokenId:e.tokenId,itemId:e.itemId})??void 0,h=t.jsxs(t.Fragment,{children:[n?t.jsx(J,{}):t.jsx(R,{children:d?t.jsx("img",{src:d,alt:i}):t.jsx(T,{name:"offer",size:20})}),t.jsxs(q,{children:[n?t.jsx(Y,{}):t.jsx(_,{title:i,children:i}),t.jsx(z,{children:r("activity.boughtFrom",{account:pe(e.seller)})})]})]});return t.jsxs(S,{"data-testid":"activity-mana-purchase",children:[t.jsxs(C,{children:[t.jsxs(F,{children:[t.jsx(D,{children:I(e.createdAt)}),t.jsx(M,{children:r("activity.paidWithMana")})]}),t.jsxs(H,{children:[t.jsx(O,{"data-status":"SETTLED",children:r("activity.completed")}),t.jsxs(k,{children:[me(e.manaWei)," ",t.jsx(xe,{children:t.jsx(ue,{src:de,alt:"MANA"})})]})]})]}),t.jsx(V,{children:a?t.jsx(Z,{to:a,"data-link":"true",children:h}):t.jsx(L,{children:h})})]})}function Pt({sale:e,payout:s}){const{data:n,isLoading:i}=A({queryKey:["asset-display",e.contractAddress,e.tokenId,e.itemId],queryFn:()=>Q(e.contractAddress,{tokenId:e.tokenId,itemId:e.itemId}),enabled:!!e.contractAddress,staleTime:3e5}),d=(n==null?void 0:n.name)??r("activity.itemFallback"),a=(n==null?void 0:n.thumbnail)??"",h=B({contractAddress:e.contractAddress,tokenId:e.tokenId,itemId:e.itemId})??void 0,c=t.jsxs(t.Fragment,{children:[i?t.jsx(J,{}):t.jsx(R,{children:a?t.jsx("img",{src:a,alt:d}):t.jsx(T,{name:"offer",size:20})}),t.jsxs(q,{children:[i?t.jsx(Y,{}):t.jsx(_,{title:d,children:d}),t.jsxs(z,{children:[r("activity.soldTo",{account:pe(e.counterparty)}),s.kind==="pending"?` · ${r("activity.payoutPendingOn",{date:I(s.availableAt)})}`:""]})]})]});return t.jsxs(S,{"data-testid":"activity-sale",children:[t.jsxs(C,{children:[t.jsxs(F,{children:[t.jsx(D,{children:I(e.createdAt)}),t.jsx(M,{children:r("activity.saleLabel")})]}),t.jsxs(H,{children:[t.jsx(O,{"data-status":s.kind==="pending"?"PENDING":"SOLD",children:s.kind==="pending"?r("activity.payoutPending"):r("activity.sold")}),s.kind==="direct"?t.jsxs(k,{"data-kind":"income",children:["+",me(e.manaWei)," ",t.jsx(xe,{children:t.jsx(ue,{src:de,alt:"MANA"})})]}):s.credits!==null?t.jsxs(k,{"data-kind":"income",children:[t.jsx(E,{className:"ccy-mark"})," +",Fe(s.credits)]}):t.jsx(k,{"data-kind":"income",children:r("activity.payoutCredited")})]})]}),t.jsx(V,{children:h?t.jsx(Z,{to:h,"data-link":"true",children:c}):t.jsx(L,{children:c})})]})}function Tt({order:e}){const s=`$${(e.usdCents/100).toFixed(2)}`,n=Se(e.status),i=n==="SETTLED"?r("activity.completed"):n==="FAILED"?r("activity.failed"):n==="UNFINISHED"?r("activity.unfinished"):r("activity.processing"),d=U(p=>p.session),a=Ce(),[h,c]=g.useState(!1),m=e.status==="initiated"&&!!d;g.useEffect(()=>{const p=()=>c(!1);return window.addEventListener("pageshow",p),()=>window.removeEventListener("pageshow",p)},[]);async function f(){if(!(!d||h)){c(!0);try{const p=await De(e.id,d.identity);if(p.kind==="url"){if(/^https:\/\/([a-z0-9-]+\.)*stripe\.com\//i.test(p.url)){window.location.href=p.url;return}N.error(r("activity.resumeUnavailable"))}else p.kind==="expired"?(N.info(r("activity.resumeExpired")),a.invalidateQueries({queryKey:["credit-orders"]})):p.kind==="paid"?(N.success(r("activity.resumePaid")),a.invalidateQueries({queryKey:["credit-orders"]})):N.error(r("activity.resumeUnavailable"));c(!1)}catch{c(!1)}}}return t.jsx(S,{"data-testid":"credit-order",children:t.jsxs(C,{children:[t.jsx(pt,{children:t.jsx("img",{src:at,alt:"","aria-hidden":!0})}),t.jsxs(F,{children:[t.jsx(D,{children:I(e.createdAt)}),t.jsxs(M,{children:[r("activity.creditPurchaseLabel")," · ",r("activity.creditPaid",{usd:s})]})]}),t.jsxs(H,{children:[m?t.jsx(mt,{type:"button",onClick:()=>void f(),disabled:h,"data-testid":"resume-order",children:h?r("activity.resuming"):r("activity.resume")}):null,t.jsx(O,{"data-status":n,children:i}),t.jsxs(k,{"data-kind":n==="UNFINISHED"?void 0:"income",children:[n==="UNFINISHED"?"":"+",t.jsx(E,{className:"ccy-mark"})," ",t.jsx(K,{credits:e.credits})]})]})]})})}function St({filter:e}){const s={all:r("activity.emptyAllBody"),purchases:r("activity.emptyPurchasesBody"),sales:r("activity.emptySalesBody")}[e];return t.jsx(bt,{children:t.jsx(Te,{testId:`activity-empty-${e}`,icon:_e,title:r("activity.emptyTitle"),body:s,cta:{label:r("assets.empty.cta"),to:"/items"}})})}function Bt(){const{session:e}=U(),[s,n]=g.useState("all"),[i,d]=He(),a=i.get(W)===oe||i.get(G)===At;Le({title:a?r("seo.import.title"):r("nav.activity"),noindex:!0});const{count:h}=qe(),{count:c}=nt(),f=h!==void 0&&c!==void 0&&(h>0||c>0||a),p=!!e&&!a&&s!=="sales",x=!!e&&!a&&s!=="purchases",b=$(["purchases",e==null?void 0:e.address],u=>$e(e.address,e.identity,{first:P,skip:u}),{enabled:p}),y=$(["sales",e==null?void 0:e.address],u=>se(e.address,{role:"seller",first:P,skip:u}),{enabled:x}),v=$(["credit-orders",e==null?void 0:e.address],u=>ne(e.address,e.identity,{first:P,skip:u}),{enabled:p}),j=$(["mana-purchases",e==null?void 0:e.address],u=>se(e.address,{role:"buyer",first:P,skip:u}),{enabled:p}),{data:ee}=A({queryKey:["sale-payouts",e==null?void 0:e.address],queryFn:()=>ne(e.address,e.identity,{first:200}).then(u=>u.payouts),enabled:x,staleTime:6e4}),ge=g.useMemo(()=>tt(ee),[ee]),{data:fe}=Ne(x);if(!e)return t.jsxs(yt,{children:[t.jsx(T,{name:"clock",size:40,color:o.colors.muted2}),t.jsx(vt,{children:r("activity.signInTitle")}),t.jsx(jt,{children:r("activity.signInBody")})]});const te=et(Ze({purchases:p?b.items:[],sales:x?y.items:[],creditOrders:p?v.items:[],manaPurchases:p?j.items:[],rate:fe}),s),be=p&&(b.isLoading||v.isLoading||j.isLoading)||x&&y.isLoading,ie=p&&(b.isFetchingNextPage||v.isFetchingNextPage||j.isFetchingNextPage)||x&&y.isFetchingNextPage,ye=p&&(b.hasNextPage||v.hasNextPage||j.hasNextPage)||x&&y.hasNextPage;function ve(){p&&b.hasNextPage&&b.fetchNextPage(),p&&v.hasNextPage&&v.fetchNextPage(),p&&j.hasNextPage&&j.fetchNextPage(),x&&y.hasNextPage&&y.fetchNextPage()}function je(u){if(n(u),!a)return;const w=new URLSearchParams(i);w.delete(W),w.delete(G),d(w,{replace:!0})}function ke(){const u=new URLSearchParams(i);u.set(W,oe),u.delete(G),d(u,{replace:!0})}return t.jsxs(rt,{children:[t.jsx(ot,{children:t.jsx(dt,{children:r("nav.activity")})}),t.jsxs(ct,{role:"tablist","aria-label":r("nav.activity"),children:[It.map(u=>t.jsx(le,{type:"button",role:"tab","aria-selected":!a&&s===u,"data-active":!a&&s===u,"data-testid":`activity-filter-${u}`,onClick:()=>je(u),children:r(`activity.filter.${u}`)},u)),f?t.jsxs(lt,{type:"button",role:"tab","aria-selected":a,"data-active":a,"data-testid":"activity-filter-migrate","aria-label":h?r("activity.migrate.chipAria",{count:h}):void 0,onClick:ke,children:[r("activity.migrate.chip"),h?t.jsx(ut,{"data-testid":"activity-migrate-count","aria-hidden":!0,children:h}):null]}):null]}),a?t.jsx(g.Suspense,{fallback:t.jsx(ht,{"aria-busy":"true"}),children:t.jsx(wt,{})}):be?t.jsx(ae,{children:Array.from({length:5}).map((u,w)=>t.jsx(re,{},w))}):te.length===0?t.jsx(St,{filter:s}):t.jsxs(t.Fragment,{children:[t.jsxs(ae,{children:[te.map(u=>u.kind==="purchase"?t.jsx(Nt,{order:u.order},u.id):u.kind==="credit"?t.jsx(Tt,{order:u.order},u.id):u.kind==="mana-purchase"?t.jsx($t,{sale:u.sale},u.id):t.jsx(Pt,{sale:u.sale,payout:it(ge,u.sale)},u.id)),ie?t.jsx(re,{}):null]}),t.jsx(ze,{hasNextPage:ye,isFetching:ie,onLoadMore:ve})]})]})}export{Bt as Activity};
389
- //# sourceMappingURL=Activity-DnZHUo9l.js.map
388
+ `,Z=L.withComponent(Re),wt=g.lazy(()=>Pe(()=>import("./index-DKjHNccw.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14])).then(e=>({default:e.ImportListings}))),P=24,It=["all","purchases","sales"],W="section",oe="listings",G="view",At="migrate";function I(e){try{return new Date(e).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})}catch{return""}}function pe(e){return e.length>10?`${e.slice(0,6)}…${e.slice(-4)}`:e}function me(e){const s=Number(e)/1e18;return Number.isFinite(s)?s.toLocaleString("en",{maximumFractionDigits:2}):"0"}function xe({children:e}){const s=g.useRef(null),[n,i]=g.useState(null),d=()=>{var h;const a=(h=s.current)==null?void 0:h.getBoundingClientRect();a&&i({top:a.bottom+8,left:a.left+a.width/2})};return t.jsxs(xt,{ref:s,tabIndex:0,onMouseEnter:d,onMouseLeave:()=>i(null),onFocus:d,onBlur:()=>i(null),children:[e,n?Oe.createPortal(t.jsx(gt,{style:{top:n.top,left:n.left},role:"tooltip",children:r("activity.polygonMana")}),document.body):null]})}function Et({item:e}){const s=!!e.contractAddress&&!!e.itemId,n=!!e.tradeId||s,{data:i,isLoading:d}=A({queryKey:["order-line-display",e.tradeId,e.contractAddress,e.itemId],queryFn:()=>e.tradeId?Me(e.tradeId):Q(e.contractAddress,{itemId:e.itemId}),enabled:n,staleTime:5*6e4}),a=n&&d,h=(i==null?void 0:i.name)??r("activity.itemFallback"),c=(i==null?void 0:i.thumbnail)??"",m=B({contractAddress:i==null?void 0:i.contractAddress,tokenId:i==null?void 0:i.tokenId,itemId:i==null?void 0:i.itemId})??void 0,f=t.jsxs(t.Fragment,{children:[a?t.jsx(J,{}):t.jsx(R,{children:c?t.jsx("img",{src:c,alt:h}):t.jsx(T,{name:"cart",size:20})}),t.jsxs(q,{children:[a?t.jsx(Y,{}):t.jsx(_,{title:h,children:h}),e.quantity>1?t.jsx(z,{children:r("activity.quantity",{count:e.quantity})}):null]}),t.jsxs(he,{children:[t.jsx(E,{className:"ccy-mark"})," ",t.jsx(K,{credits:e.credits})]})]});return m?t.jsx(Z,{to:m,"data-link":"true",children:f}):t.jsx(L,{children:f})}function Lt({item:e}){const s=`@${e.registeredName}`;return t.jsxs(L,{"data-testid":"activity-name-line",children:[t.jsx(kt,{children:t.jsx("img",{src:We,alt:""})}),t.jsxs(q,{children:[t.jsx(_,{title:s,children:s}),t.jsx(z,{children:r("activity.nameRegistration")})]}),t.jsxs(he,{children:[t.jsx(E,{className:"ccy-mark"})," ",e.credits]})]})}function Nt({order:e}){const s=Ve(e.lines),n=s.reduce((a,h)=>a+h.quantity,0),i=Qe(e.status),d=i==="SETTLED"?r("activity.completed"):i==="FAILED"?r("activity.failed"):r("activity.processing");return t.jsxs(S,{"data-testid":"purchase-order",children:[t.jsxs(C,{children:[t.jsxs(F,{children:[t.jsx(D,{children:I(e.createdAt)}),t.jsxs(M,{children:[r("activity.purchaseLabel")," · ",r("activity.itemCount",{count:n})]})]}),t.jsxs(H,{children:[t.jsx(O,{"data-status":i,children:d}),t.jsxs(k,{children:[t.jsx(E,{className:"ccy-mark"})," ",t.jsx(K,{credits:e.totalCredits})]})]})]}),i==="FAILED"?t.jsx(ft,{children:r("activity.purchaseFailedNote")}):null,t.jsx(V,{children:s.map(a=>a.registeredName?t.jsx(Lt,{item:a},a.key):t.jsx(Et,{item:a},a.key))})]})}function $t({sale:e}){const{data:s,isLoading:n}=A({queryKey:["asset-display",e.contractAddress,e.tokenId,e.itemId],queryFn:()=>Q(e.contractAddress,{tokenId:e.tokenId,itemId:e.itemId}),enabled:!!e.contractAddress,staleTime:3e5}),i=(s==null?void 0:s.name)??r("activity.itemFallback"),d=(s==null?void 0:s.thumbnail)??"",a=B({contractAddress:e.contractAddress,tokenId:e.tokenId,itemId:e.itemId})??void 0,h=t.jsxs(t.Fragment,{children:[n?t.jsx(J,{}):t.jsx(R,{children:d?t.jsx("img",{src:d,alt:i}):t.jsx(T,{name:"offer",size:20})}),t.jsxs(q,{children:[n?t.jsx(Y,{}):t.jsx(_,{title:i,children:i}),t.jsx(z,{children:r("activity.boughtFrom",{account:pe(e.seller)})})]})]});return t.jsxs(S,{"data-testid":"activity-mana-purchase",children:[t.jsxs(C,{children:[t.jsxs(F,{children:[t.jsx(D,{children:I(e.createdAt)}),t.jsx(M,{children:r("activity.paidWithMana")})]}),t.jsxs(H,{children:[t.jsx(O,{"data-status":"SETTLED",children:r("activity.completed")}),t.jsxs(k,{children:[me(e.manaWei)," ",t.jsx(xe,{children:t.jsx(ue,{src:de,alt:"MANA"})})]})]})]}),t.jsx(V,{children:a?t.jsx(Z,{to:a,"data-link":"true",children:h}):t.jsx(L,{children:h})})]})}function Pt({sale:e,payout:s}){const{data:n,isLoading:i}=A({queryKey:["asset-display",e.contractAddress,e.tokenId,e.itemId],queryFn:()=>Q(e.contractAddress,{tokenId:e.tokenId,itemId:e.itemId}),enabled:!!e.contractAddress,staleTime:3e5}),d=(n==null?void 0:n.name)??r("activity.itemFallback"),a=(n==null?void 0:n.thumbnail)??"",h=B({contractAddress:e.contractAddress,tokenId:e.tokenId,itemId:e.itemId})??void 0,c=t.jsxs(t.Fragment,{children:[i?t.jsx(J,{}):t.jsx(R,{children:a?t.jsx("img",{src:a,alt:d}):t.jsx(T,{name:"offer",size:20})}),t.jsxs(q,{children:[i?t.jsx(Y,{}):t.jsx(_,{title:d,children:d}),t.jsxs(z,{children:[r("activity.soldTo",{account:pe(e.counterparty)}),s.kind==="pending"?` · ${r("activity.payoutPendingOn",{date:I(s.availableAt)})}`:""]})]})]});return t.jsxs(S,{"data-testid":"activity-sale",children:[t.jsxs(C,{children:[t.jsxs(F,{children:[t.jsx(D,{children:I(e.createdAt)}),t.jsx(M,{children:r("activity.saleLabel")})]}),t.jsxs(H,{children:[t.jsx(O,{"data-status":s.kind==="pending"?"PENDING":"SOLD",children:s.kind==="pending"?r("activity.payoutPending"):r("activity.sold")}),s.kind==="direct"?t.jsxs(k,{"data-kind":"income",children:["+",me(e.manaWei)," ",t.jsx(xe,{children:t.jsx(ue,{src:de,alt:"MANA"})})]}):s.credits!==null?t.jsxs(k,{"data-kind":"income",children:[t.jsx(E,{className:"ccy-mark"})," +",Fe(s.credits)]}):t.jsx(k,{"data-kind":"income",children:r("activity.payoutCredited")})]})]}),t.jsx(V,{children:h?t.jsx(Z,{to:h,"data-link":"true",children:c}):t.jsx(L,{children:c})})]})}function Tt({order:e}){const s=`$${(e.usdCents/100).toFixed(2)}`,n=Se(e.status),i=n==="SETTLED"?r("activity.completed"):n==="FAILED"?r("activity.failed"):n==="UNFINISHED"?r("activity.unfinished"):r("activity.processing"),d=U(p=>p.session),a=Ce(),[h,c]=g.useState(!1),m=e.status==="initiated"&&!!d;g.useEffect(()=>{const p=()=>c(!1);return window.addEventListener("pageshow",p),()=>window.removeEventListener("pageshow",p)},[]);async function f(){if(!(!d||h)){c(!0);try{const p=await De(e.id,d.identity);if(p.kind==="url"){if(/^https:\/\/([a-z0-9-]+\.)*stripe\.com\//i.test(p.url)){window.location.href=p.url;return}N.error(r("activity.resumeUnavailable"))}else p.kind==="expired"?(N.info(r("activity.resumeExpired")),a.invalidateQueries({queryKey:["credit-orders"]})):p.kind==="paid"?(N.success(r("activity.resumePaid")),a.invalidateQueries({queryKey:["credit-orders"]})):N.error(r("activity.resumeUnavailable"));c(!1)}catch{c(!1)}}}return t.jsx(S,{"data-testid":"credit-order",children:t.jsxs(C,{children:[t.jsx(pt,{children:t.jsx("img",{src:at,alt:"","aria-hidden":!0})}),t.jsxs(F,{children:[t.jsx(D,{children:I(e.createdAt)}),t.jsxs(M,{children:[r("activity.creditPurchaseLabel")," · ",r("activity.creditPaid",{usd:s})]})]}),t.jsxs(H,{children:[m?t.jsx(mt,{type:"button",onClick:()=>void f(),disabled:h,"data-testid":"resume-order",children:h?r("activity.resuming"):r("activity.resume")}):null,t.jsx(O,{"data-status":n,children:i}),t.jsxs(k,{"data-kind":n==="UNFINISHED"?void 0:"income",children:[n==="UNFINISHED"?"":"+",t.jsx(E,{className:"ccy-mark"})," ",t.jsx(K,{credits:e.credits})]})]})]})})}function St({filter:e}){const s={all:r("activity.emptyAllBody"),purchases:r("activity.emptyPurchasesBody"),sales:r("activity.emptySalesBody")}[e];return t.jsx(bt,{children:t.jsx(Te,{testId:`activity-empty-${e}`,icon:_e,title:r("activity.emptyTitle"),body:s,cta:{label:r("assets.empty.cta"),to:"/items"}})})}function Bt(){const{session:e}=U(),[s,n]=g.useState("all"),[i,d]=He(),a=i.get(W)===oe||i.get(G)===At;Le({title:a?r("seo.import.title"):r("nav.activity"),noindex:!0});const{count:h}=qe(),{count:c}=nt(),f=h!==void 0&&c!==void 0&&(h>0||c>0||a),p=!!e&&!a&&s!=="sales",x=!!e&&!a&&s!=="purchases",b=$(["purchases",e==null?void 0:e.address],u=>$e(e.address,e.identity,{first:P,skip:u}),{enabled:p}),y=$(["sales",e==null?void 0:e.address],u=>se(e.address,{role:"seller",first:P,skip:u}),{enabled:x}),v=$(["credit-orders",e==null?void 0:e.address],u=>ne(e.address,e.identity,{first:P,skip:u}),{enabled:p}),j=$(["mana-purchases",e==null?void 0:e.address],u=>se(e.address,{role:"buyer",first:P,skip:u}),{enabled:p}),{data:ee}=A({queryKey:["sale-payouts",e==null?void 0:e.address],queryFn:()=>ne(e.address,e.identity,{first:200}).then(u=>u.payouts),enabled:x,staleTime:6e4}),ge=g.useMemo(()=>tt(ee),[ee]),{data:fe}=Ne(x);if(!e)return t.jsxs(yt,{children:[t.jsx(T,{name:"clock",size:40,color:o.colors.muted2}),t.jsx(vt,{children:r("activity.signInTitle")}),t.jsx(jt,{children:r("activity.signInBody")})]});const te=et(Ze({purchases:p?b.items:[],sales:x?y.items:[],creditOrders:p?v.items:[],manaPurchases:p?j.items:[],rate:fe}),s),be=p&&(b.isLoading||v.isLoading||j.isLoading)||x&&y.isLoading,ie=p&&(b.isFetchingNextPage||v.isFetchingNextPage||j.isFetchingNextPage)||x&&y.isFetchingNextPage,ye=p&&(b.hasNextPage||v.hasNextPage||j.hasNextPage)||x&&y.hasNextPage;function ve(){p&&b.hasNextPage&&b.fetchNextPage(),p&&v.hasNextPage&&v.fetchNextPage(),p&&j.hasNextPage&&j.fetchNextPage(),x&&y.hasNextPage&&y.fetchNextPage()}function je(u){if(n(u),!a)return;const w=new URLSearchParams(i);w.delete(W),w.delete(G),d(w,{replace:!0})}function ke(){const u=new URLSearchParams(i);u.set(W,oe),u.delete(G),d(u,{replace:!0})}return t.jsxs(rt,{children:[t.jsx(ot,{children:t.jsx(dt,{children:r("nav.activity")})}),t.jsxs(ct,{role:"tablist","aria-label":r("nav.activity"),children:[It.map(u=>t.jsx(le,{type:"button",role:"tab","aria-selected":!a&&s===u,"data-active":!a&&s===u,"data-testid":`activity-filter-${u}`,onClick:()=>je(u),children:r(`activity.filter.${u}`)},u)),f?t.jsxs(lt,{type:"button",role:"tab","aria-selected":a,"data-active":a,"data-testid":"activity-filter-migrate","aria-label":h?r("activity.migrate.chipAria",{count:h}):void 0,onClick:ke,children:[r("activity.migrate.chip"),h?t.jsx(ut,{"data-testid":"activity-migrate-count","aria-hidden":!0,children:h}):null]}):null]}),a?t.jsx(g.Suspense,{fallback:t.jsx(ht,{"aria-busy":"true"}),children:t.jsx(wt,{})}):be?t.jsx(ae,{children:Array.from({length:5}).map((u,w)=>t.jsx(re,{},w))}):te.length===0?t.jsx(St,{filter:s}):t.jsxs(t.Fragment,{children:[t.jsxs(ae,{children:[te.map(u=>u.kind==="purchase"?t.jsx(Nt,{order:u.order},u.id):u.kind==="credit"?t.jsx(Tt,{order:u.order},u.id):u.kind==="mana-purchase"?t.jsx($t,{sale:u.sale},u.id):t.jsx(Pt,{sale:u.sale,payout:it(ge,u.sale)},u.id)),ie?t.jsx(re,{}):null]}),t.jsx(ze,{hasNextPage:ye,isFetching:ie,onLoadMore:ve})]})]})}export{Bt as Activity};
389
+ //# sourceMappingURL=Activity-Cx802b5N.js.map
@@ -1,4 +1,4 @@
1
- import{r as u,j as d}from"./react-jpAgvPLt.js";import{s as m}from"./index-BzcOLtVK.js";import"./dcl-schemas-CGG1jvt5.js";import"./sentry-B_JVKDG7.js";import"./ethers-DsOeUsXW.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]="1701841a-256f-4ed4-9106-9e57201a2c2d",e._sentryDebugIdIdentifier="sentry-dbid-1701841a-256f-4ed4-9106-9e57201a2c2d")}catch{}})();const D="https://cdn.decentraland.org/@dcl/shop/1.11.4-33205535310.commit-7a8aa97/_assets/custom-welcome-background-BxlFQma9.webp",P="https://cdn.decentraland.org/@dcl/shop/1.11.4-33205535310.commit-7a8aa97/_assets/DCL_LogoPattern-BryBPc3d.png",L=`
1
+ import{r as u,j as d}from"./react-CO8J9utQ.js";import{s as f}from"./index-BRU8_4Hh.js";import"./dcl-schemas-DomYdfSu.js";import"./sentry-DYLA9B0R.js";import"./ethers-lJUVMKsu.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]="91be14d1-5ebe-4287-981e-32ed1ae6208f",e._sentryDebugIdIdentifier="sentry-dbid-91be14d1-5ebe-4287-981e-32ed1ae6208f")}catch{}})();const D="https://cdn.decentraland.org/@dcl/shop/1.11.4-33732305897.commit-1e7324f/_assets/custom-welcome-background-BxlFQma9.webp",P="https://cdn.decentraland.org/@dcl/shop/1.11.4-33732305897.commit-1e7324f/_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=m.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=f.div`
81
81
  position: absolute;
82
82
  inset: 0;
83
83
  overflow: hidden;
84
- `,k=m.div`
84
+ `,k=f.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=m.canvas`
92
+ `,V=f.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 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-BA1Cu3C9.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 m=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(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-CdbRock2.js.map
@@ -1,4 +1,4 @@
1
- import{r as m,b as He,j as e,u as tt}from"./react-jpAgvPLt.js";import{u as nt,s as st}from"./search-empty-SNhvMEDl.js";import{u as it,t as Ie,R as ot,j as at,k as rt,l as lt,m as ct,n as dt,o as ht,p as pt,v as ut,q as ft,r as mt,M as xt,s as gt}from"./browseLayout.styles-CkyyQm-Z.js";import{c as q,R as bt,bv as yt,br as wt,aA as vt,a as jt,m as Ct,cw as $t,cx as kt,s as i,t,p as Oe,bf as St,v as Et,E as ve,b as n,q as Tt,I as E,r as O,cy as le,bd as Rt,ad as oe,bn as Le,bu as _t,bt as It,o as De,J as Ge,U as qe,V as Lt,ar as Nt,L as At,S as Ne,M as J,aI as zt,bE as Mt}from"./index-BzcOLtVK.js";import{L as Wt}from"./LoadMore-5CenCiPM.js";import{u as Bt}from"./useInfiniteGrid-Dmt2BhNA.js";import{n as Pt,S as Ft}from"./categories-Btqn8toI.js";import{E as Ut}from"./ErrorNotice-Dn6mBZT0.js";import{d as Ht}from"./dcl-schemas-CGG1jvt5.js";import{s as Ot,G as Dt,w as Gt,S as qt}from"./buy-gasless-6sL_DNZf.js";import{s as Vt,o as Zt}from"./buy-DNqcsljj.js";import{f as Qt}from"./errors-Da6uevGV.js";import{J as Kt,C as Jt,B as je}from"./ethers-DsOeUsXW.js";import{n as Xt}from"./name-glyph-aUugT8vq.js";import{c as Yt}from"./crumbs.styles-BBVqDdKT.js";import{G as en}from"./grid.styles-CQw2SW8V.js";import"./skeleton.styles-C7n7Q1Xj.js";import"./sentry-B_JVKDG7.js";import"./intl-AKLEHPeO.js";import"./authorizations-DVcnP4OW.js";import"./sendMetaTransaction-TAXZbOgU.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},o=new s.Error().stack;o&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[o]="ee7a4925-ca91-482a-8cfc-9bdabe617db4",s._sentryDebugIdIdentifier="sentry-dbid-ee7a4925-ca91-482a-8cfc-9bdabe617db4")}catch{}})();function X(s){const o=s.source??"item",a=s.tradeId||`${s.contractAddress}-${s.tokenId??s.itemId??""}`;return`${o}:${a}`}const V="100000000000000000000",Ve=2,ae=15,tn=/^[a-zA-Z0-9]+$/;function Ae(s){const o=s.trim();return o.length===0?{ok:!1,reason:"empty"}:tn.test(o)?o.length<Ve?{ok:!1,reason:"too-short"}:o.length>ae?{ok:!1,reason:"too-long"}:{ok:!0}:{ok:!1,reason:"invalid-chars"}}function nn(s){return s.replace(/[^a-zA-Z0-9]/g,"").slice(0,ae)}const sn=["function available(string _subdomain) view returns (bool)"],ze={mainnet:{rpc:"https://rpc.decentraland.org/mainnet",address:"0x2a187453064356c898cae034eaed119e1663acb8"},sepolia:{rpc:"https://rpc.decentraland.org/sepolia",address:"0x7518456ae93eb98f3e64571b689c626616bb7f30"}};function on(){return q.chainId===Number(Ht.ChainId.MATIC_MAINNET)?ze.mainnet:ze.sepolia}async function an(s,o={}){var u;const{rpc:a,address:d}=on(),h=new Kt(a),x=new Jt(d,sn,h);console.info(`[names] availability check → DCLRegistrar(${d}).available("${s}") on ${a}`);const l=await x.available(s);if((u=o.signal)!=null&&u.aborted)throw new DOMException("Aborted","AbortError");return console.info(`[names] "${s}" available=${l}`),l?"available":"taken"}const rn="https://app.across.to/api";class ke extends Error{constructor(){super("Name registration is temporarily unavailable due to high network costs"),this.name="NameRouteCostTooHighError"}}class Ce extends Error{constructor(){super("The name could not be registered on Ethereum; your funds were recovered."),this.name="NameNotRegisteredError"}}class $e extends Error{constructor(){super("We couldn't confirm whether the purchase went through."),this.name="NameSettlementUnknownError"}}function ln(s){return vt(V,s)}async function cn(s,o,a={}){var u;const d=a.chainId??q.chainId,h=a.provider??"across",x=`${q.creditsServerUrl}/credits-name-route?name=${encodeURIComponent(o)}&chainId=${d}&provider=${h}`,l=await jt(x,{method:"GET",identity:s,metadata:{}});if(!l.ok){let c;try{c=(u=await l.json())==null?void 0:u.code}catch{}throw c==="ROUTE_COST_TOO_HIGH"?new ke:new Error(`fetchNameCreditRoute ${l.status}`)}return l.json()}function dn(s,o){const a=je.from(s.availableAmount),h=je.from(V).sub(a);return{credits:[{value:s.amount,expiresAt:Number(s.expiresAt),salt:Zt(s.id)}],creditsSignatures:[s.signature],externalCall:{target:o.externalCall.target,selector:o.externalCall.selector,data:o.externalCall.data,expiresAt:o.externalCall.expiresAt,salt:o.externalCall.salt},customExternalCallSignature:o.customExternalCallSignature,maxUncreditedValue:h.isNegative()?"0":h.toString(),maxCreditedValue:V}}async function hn(s,o={}){const a=rn,d=o.intervalMs??1e4,h=o.maxAttempts??60;let x={status:"pending",destinationTxHash:null,actionsSucceeded:null};for(let l=0;l<h;l++){try{const u=await fetch(`${a}/deposit/status?originChainId=137&depositTxHash=${s}`);if(u.ok){const c=await u.json(),p=(c.status??"pending").toLowerCase(),f=c.fillTx??c.fillTxnRef??null,w=typeof c.actionsSucceeded=="boolean"?c.actionsSucceeded:null;if(p==="filled")return{status:"filled",destinationTxHash:f,actionsSucceeded:w};if(p==="refunded"||p==="expired")return{status:p,destinationTxHash:null,actionsSucceeded:!1};x={status:"pending",destinationTxHash:f,actionsSucceeded:w}}}catch{}l<h-1&&await new Promise(u=>setTimeout(u,d))}return x}async function pn(s){const{name:o,identity:a,signer:d}=s,h=f=>{var w;try{(w=s.onProgress)==null||w.call(s,f)}catch{}},x=s.chainId??q.chainId,l=s.provider??"across",u=(s.beneficiary??await d.getAddress()).toLowerCase();let c=null,p="unconfirmed";console.info("[names] register start",{name:o,buyer:u,chainId:x,provider:l}),h("preparing");try{const f=await bt(x),w=ln(f);console.info("[names] step 1/6 sized reservation",{usdCents:w,manaRate:f});const j=await cn(a,o,{chainId:x,provider:l});console.info("[names] step 2/6 route fetched",{target:j.externalCall.target,selector:j.externalCall.selector,provider:j.provider,quoteId:j.quoteId});const $=await yt(a,w,void 0,void 0,o);if(c=$.credit.id,console.info("[names] step 3/6 credit authorized",{creditId:$.credit.id,maxCreditedValue:$.maxCreditedValue}),je.from($.maxCreditedValue).lt(V))throw new Error("Credit under-sized for the name price");h("awaiting-confirmation");const C=dn($.credit,j);let g;try{g=await Ot({chainId:x,buyer:u,signer:d,args:C})}catch(b){if(!(b instanceof Dt))throw b;if(b.reason==="relayer-unreachable"){p="unobservable";const S=new $e;throw S.cause=b,S}g=await Vt(x,C,d)}if(console.info("[names] step 4/6 useCredits submitted (Polygon origin tx)",{originTxHash:g}),h("confirming"),await Gt(g),p="confirmed",console.info("[names] step 5/6 origin tx confirmed",{originTxHash:g}),l==="across"){h("registering");const b=await hn(g,s.acrossPoll);if(console.info("[names] step 6/6 across status",b),b.status==="pending")return{status:"pending",originTxHash:g};if(b.status==="filled"&&b.actionsSucceeded===null)return console.warn("[names] across filled without reporting actionsSucceeded — reporting pending",{originTxHash:g}),{status:"pending",originTxHash:g};if(b.status!=="filled"||b.actionsSucceeded!==!0)throw new Ce;return{status:"registered",originTxHash:g,destinationTxHash:b.destinationTxHash}}return{status:"pending",originTxHash:g}}catch(f){if(console.error("[names] register failed — raw error:",f,{name:o,buyer:u,originState:p}),f instanceof qt)return{status:"pending",originTxHash:f.txHash};if(c&&p==="unconfirmed"&&await wt(a,[c]).catch(()=>{}),f instanceof ke||f instanceof Ce||f instanceof $e)throw f;const w=new Error(Qt(f,"Couldn't register the name. Please try again.",{sale:!0}));throw w.cause=f,w}}function un(){const{data:s}=Ct({queryKey:["feature-flag","shop-names"],queryFn:()=>$t(kt.SHOP_NAMES),staleTime:6e4,refetchOnWindowFocus:!0,retry:1});return s===!0}const fn=60,mn=700,xn=25;function gn(s){if(!s)return[];const o=[];for(let a=1;a<=s.length;a++)o.push({text:s.slice(0,a),delay:fn});o[o.length-1]={text:s,delay:mn};for(let a=s.length-1;a>=1;a--)o.push({text:s.slice(0,a),delay:xn});return o}function bn(s){return s.flatMap(gn)}function yn(s,o){const a=m.useMemo(()=>bn(s),[s]),[d,h]=m.useState(0);return m.useEffect(()=>{if(!o||a.length===0)return;const x=setTimeout(()=>h(l=>(l+1)%a.length),a[d%a.length].delay);return()=>clearTimeout(x)},[d,o,a]),!o||a.length===0?"":a[d%a.length].text}const wn="https://cdn.decentraland.org/@dcl/shop/1.11.4-33205535310.commit-7a8aa97/_assets/name-verified-oGwQ3ntb.svg",vn="#34fee6",jn=i.div`
1
+ import{r as m,b as He,j as e,u as tt}from"./react-CO8J9utQ.js";import{u as nt,s as st}from"./search-empty-CXyPZHgu.js";import{u as it,t as Ie,R as ot,j as rt,k as at,l as lt,m as ct,n as dt,o as ht,p as pt,v as ut,q as ft,r as mt,M as xt,s as gt}from"./browseLayout.styles-Bhm7l2yL.js";import{c as q,R as bt,bv as yt,br as wt,aA as vt,a as jt,m as Ct,cw as $t,cx as kt,s as i,t,p as Oe,bf as St,v as Et,E as ve,b as n,q as Tt,I as E,r as O,cy as le,bd as Rt,ad as oe,bn as Le,bu as _t,bt as It,o as De,J as Ge,U as qe,V as Lt,ar as Nt,L as At,S as Ne,M as J,aI as zt,bE as Mt}from"./index-BRU8_4Hh.js";import{L as Wt}from"./LoadMore-CR1nt5IY.js";import{u as Bt}from"./useInfiniteGrid-BpgyqBYU.js";import{n as Pt,S as Ft}from"./categories-CwOJ2g25.js";import{E as Ut}from"./ErrorNotice-D7e9fD_T.js";import{d as Ht}from"./dcl-schemas-DomYdfSu.js";import{s as Ot,G as Dt,w as Gt,S as qt}from"./buy-gasless-C6HcNbUA.js";import{s as Vt,o as Zt}from"./buy-DEqsVztl.js";import{f as Qt}from"./errors-BRe26Jfh.js";import{J as Kt,C as Jt,B as je}from"./ethers-lJUVMKsu.js";import{n as Xt}from"./name-glyph-aUugT8vq.js";import{c as Yt}from"./crumbs.styles-DuD2nYKt.js";import{G as en}from"./grid.styles-DM_pjmHa.js";import"./skeleton.styles-Duw3r1-f.js";import"./sentry-DYLA9B0R.js";import"./intl-AKLEHPeO.js";import"./authorizations-9V7aWjZQ.js";import"./sendMetaTransaction-BlBggQ5M.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},o=new s.Error().stack;o&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[o]="0b7172fe-c01a-4828-a8af-366fb9ca6628",s._sentryDebugIdIdentifier="sentry-dbid-0b7172fe-c01a-4828-a8af-366fb9ca6628")}catch{}})();function X(s){const o=s.source??"item",r=s.tradeId||`${s.contractAddress}-${s.tokenId??s.itemId??""}`;return`${o}:${r}`}const V="100000000000000000000",Ve=2,re=15,tn=/^[a-zA-Z0-9]+$/;function Ae(s){const o=s.trim();return o.length===0?{ok:!1,reason:"empty"}:tn.test(o)?o.length<Ve?{ok:!1,reason:"too-short"}:o.length>re?{ok:!1,reason:"too-long"}:{ok:!0}:{ok:!1,reason:"invalid-chars"}}function nn(s){return s.replace(/[^a-zA-Z0-9]/g,"").slice(0,re)}const sn=["function available(string _subdomain) view returns (bool)"],ze={mainnet:{rpc:"https://rpc.decentraland.org/mainnet",address:"0x2a187453064356c898cae034eaed119e1663acb8"},sepolia:{rpc:"https://rpc.decentraland.org/sepolia",address:"0x7518456ae93eb98f3e64571b689c626616bb7f30"}};function on(){return q.chainId===Number(Ht.ChainId.MATIC_MAINNET)?ze.mainnet:ze.sepolia}async function rn(s,o={}){var u;const{rpc:r,address:d}=on(),h=new Kt(r),x=new Jt(d,sn,h);console.info(`[names] availability check → DCLRegistrar(${d}).available("${s}") on ${r}`);const l=await x.available(s);if((u=o.signal)!=null&&u.aborted)throw new DOMException("Aborted","AbortError");return console.info(`[names] "${s}" available=${l}`),l?"available":"taken"}const an="https://app.across.to/api";class ke extends Error{constructor(){super("Name registration is temporarily unavailable due to high network costs"),this.name="NameRouteCostTooHighError"}}class Ce extends Error{constructor(){super("The name could not be registered on Ethereum; your funds were recovered."),this.name="NameNotRegisteredError"}}class $e extends Error{constructor(){super("We couldn't confirm whether the purchase went through."),this.name="NameSettlementUnknownError"}}function ln(s){return vt(V,s)}async function cn(s,o,r={}){var u;const d=r.chainId??q.chainId,h=r.provider??"across",x=`${q.creditsServerUrl}/credits-name-route?name=${encodeURIComponent(o)}&chainId=${d}&provider=${h}`,l=await jt(x,{method:"GET",identity:s,metadata:{}});if(!l.ok){let c;try{c=(u=await l.json())==null?void 0:u.code}catch{}throw c==="ROUTE_COST_TOO_HIGH"?new ke:new Error(`fetchNameCreditRoute ${l.status}`)}return l.json()}function dn(s,o){const r=je.from(s.availableAmount),h=je.from(V).sub(r);return{credits:[{value:s.amount,expiresAt:Number(s.expiresAt),salt:Zt(s.id)}],creditsSignatures:[s.signature],externalCall:{target:o.externalCall.target,selector:o.externalCall.selector,data:o.externalCall.data,expiresAt:o.externalCall.expiresAt,salt:o.externalCall.salt},customExternalCallSignature:o.customExternalCallSignature,maxUncreditedValue:h.isNegative()?"0":h.toString(),maxCreditedValue:V}}async function hn(s,o={}){const r=an,d=o.intervalMs??1e4,h=o.maxAttempts??60;let x={status:"pending",destinationTxHash:null,actionsSucceeded:null};for(let l=0;l<h;l++){try{const u=await fetch(`${r}/deposit/status?originChainId=137&depositTxHash=${s}`);if(u.ok){const c=await u.json(),p=(c.status??"pending").toLowerCase(),f=c.fillTx??c.fillTxnRef??null,w=typeof c.actionsSucceeded=="boolean"?c.actionsSucceeded:null;if(p==="filled")return{status:"filled",destinationTxHash:f,actionsSucceeded:w};if(p==="refunded"||p==="expired")return{status:p,destinationTxHash:null,actionsSucceeded:!1};x={status:"pending",destinationTxHash:f,actionsSucceeded:w}}}catch{}l<h-1&&await new Promise(u=>setTimeout(u,d))}return x}async function pn(s){const{name:o,identity:r,signer:d}=s,h=f=>{var w;try{(w=s.onProgress)==null||w.call(s,f)}catch{}},x=s.chainId??q.chainId,l=s.provider??"across",u=(s.beneficiary??await d.getAddress()).toLowerCase();let c=null,p="unconfirmed";console.info("[names] register start",{name:o,buyer:u,chainId:x,provider:l}),h("preparing");try{const f=await bt(x),w=ln(f);console.info("[names] step 1/6 sized reservation",{usdCents:w,manaRate:f});const j=await cn(r,o,{chainId:x,provider:l});console.info("[names] step 2/6 route fetched",{target:j.externalCall.target,selector:j.externalCall.selector,provider:j.provider,quoteId:j.quoteId});const $=await yt(r,w,void 0,void 0,o);if(c=$.credit.id,console.info("[names] step 3/6 credit authorized",{creditId:$.credit.id,maxCreditedValue:$.maxCreditedValue}),je.from($.maxCreditedValue).lt(V))throw new Error("Credit under-sized for the name price");h("awaiting-confirmation");const C=dn($.credit,j);let g;try{g=await Ot({chainId:x,buyer:u,signer:d,args:C})}catch(b){if(!(b instanceof Dt))throw b;if(b.reason==="relayer-unreachable"){p="unobservable";const S=new $e;throw S.cause=b,S}g=await Vt(x,C,d)}if(console.info("[names] step 4/6 useCredits submitted (Polygon origin tx)",{originTxHash:g}),h("confirming"),await Gt(g),p="confirmed",console.info("[names] step 5/6 origin tx confirmed",{originTxHash:g}),l==="across"){h("registering");const b=await hn(g,s.acrossPoll);if(console.info("[names] step 6/6 across status",b),b.status==="pending")return{status:"pending",originTxHash:g};if(b.status==="filled"&&b.actionsSucceeded===null)return console.warn("[names] across filled without reporting actionsSucceeded — reporting pending",{originTxHash:g}),{status:"pending",originTxHash:g};if(b.status!=="filled"||b.actionsSucceeded!==!0)throw new Ce;return{status:"registered",originTxHash:g,destinationTxHash:b.destinationTxHash}}return{status:"pending",originTxHash:g}}catch(f){if(console.error("[names] register failed — raw error:",f,{name:o,buyer:u,originState:p}),f instanceof qt)return{status:"pending",originTxHash:f.txHash};if(c&&p==="unconfirmed"&&await wt(r,[c]).catch(()=>{}),f instanceof ke||f instanceof Ce||f instanceof $e)throw f;const w=new Error(Qt(f,"Couldn't register the name. Please try again.",{sale:!0}));throw w.cause=f,w}}function un(){const{data:s}=Ct({queryKey:["feature-flag","shop-names"],queryFn:()=>$t(kt.SHOP_NAMES),staleTime:6e4,refetchOnWindowFocus:!0,retry:1});return s===!0}const fn=60,mn=700,xn=25;function gn(s){if(!s)return[];const o=[];for(let r=1;r<=s.length;r++)o.push({text:s.slice(0,r),delay:fn});o[o.length-1]={text:s,delay:mn};for(let r=s.length-1;r>=1;r--)o.push({text:s.slice(0,r),delay:xn});return o}function bn(s){return s.flatMap(gn)}function yn(s,o){const r=m.useMemo(()=>bn(s),[s]),[d,h]=m.useState(0);return m.useEffect(()=>{if(!o||r.length===0)return;const x=setTimeout(()=>h(l=>(l+1)%r.length),r[d%r.length].delay);return()=>clearTimeout(x)},[d,o,r]),!o||r.length===0?"":r[d%r.length].text}const wn="https://cdn.decentraland.org/@dcl/shop/1.11.4-33732305897.commit-1e7324f/_assets/name-verified-oGwQ3ntb.svg",vn="#34fee6",jn=i.div`
2
2
  position: fixed;
3
3
  inset: 0;
4
4
  z-index: 10000;
@@ -458,7 +458,7 @@ import{r as m,b as He,j as e,u as tt}from"./react-jpAgvPLt.js";import{u as nt,s
458
458
  color: ${t.colors.accent};
459
459
  }
460
460
  }
461
- `;function Vn({name:s,priceCredits:o,onClose:a}){const{session:d}=Oe(),{data:h,isError:x}=St(d),l=Et(),u=He(),[c,p]=m.useState("confirm"),[f,w]=m.useState(""),[j,$]=m.useState(null),[C,g]=m.useState(!1),[b,S]=m.useState("preparing"),L=m.useRef(!1),T=f.trim().toLowerCase()===s.toLowerCase(),k=c==="completing",W=o!=null?ve(o):"—",B=o==null,z=h==null?void 0:h.credits,P=o!=null&&z!=null?o-z:0,N=P>0,A=B?n("names.priceUnavailable"):N?n("names.insufficientCredits",{credits:ve(P)}):null;m.useEffect(()=>{const y=D=>{D.key==="Escape"&&!k&&a()};document.addEventListener("keydown",y);const U=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",y),document.body.style.overflow=U}},[k,a]);async function F(){if(!(!d||!T||B||N||L.current)){L.current=!0,p("completing"),$(null),S("preparing");try{const y=await pn({name:s,identity:d.identity,signer:d.signer,onProgress:S});oe("Shop Completed Purchase",{items:[{item_id:null,contract_address:null,token_id:null,price_usd:Le(o??0),category:"name",is_smart:!1}],purchase_type:"name",is_primary:!0,payment_type:"credits",value_credits:o??null,value_usd:Le(o??0),transaction_hash:y.originTxHash??null,settlement:y.status}),l.invalidateQueries({queryKey:["usd-balance"]}),l.invalidateQueries({queryKey:["my-assets"]}),p(y.status==="registered"?"success":"pending")}catch(y){oe(It(y)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:_t(y),purchase_type:"name"});const U=y instanceof Ce,D=y instanceof $e;$(y instanceof ke?n("names.errorRouteCost"):U?n("names.errorNotRegistered"):D?n("names.errorSettlementUnknown"):(y==null?void 0:y.message)||n("names.errorGeneric")),g(U||D),p("error")}finally{L.current=!1}}}const R=c!=="success"&&c!=="pending",v=Tt(d==null?void 0:d.providerType),I=v?2:1,M=v&&(b==="preparing"||b==="awaiting-confirmation"),_=M?1:I,re=M?n("names.confirming"):n("names.completing"),Z=b==="registering"?n("names.processingRegistering"):null;return e.jsx(jn,{onClick:k?void 0:a,role:"presentation",children:e.jsxs(Cn,{role:"dialog","aria-modal":"true","aria-label":n("names.buyTitle"),onClick:y=>y.stopPropagation(),children:[R&&e.jsxs(e.Fragment,{children:[e.jsxs(ce,{children:[e.jsx(de,{children:c==="error"?n("names.errorTitle"):n("names.buyTitle")}),e.jsx(he,{onClick:a,disabled:k,"aria-label":n("buyModal.close"),children:e.jsx(E,{name:"close"})})]}),e.jsxs(pe,{children:[n("names.myCreditsBalance")," ",e.jsx(O,{})," ",le(h,x)]}),e.jsx(ue,{})]}),(c==="confirm"||c==="error")&&e.jsxs(e.Fragment,{children:[e.jsxs(fe,{children:[e.jsx(Me,{"aria-hidden":!0,children:"@"}),e.jsxs(me,{children:[e.jsxs(xe,{children:[s,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(ge,{children:n("names.subtitle")})]}),e.jsxs(be,{children:[e.jsx(O,{}),W]})]}),c==="error"?e.jsxs(e.Fragment,{children:[e.jsxs(we,{children:[e.jsx(E,{name:"info","aria-hidden":!0}),e.jsx("span",{children:j})]}),C?e.jsx(ye,{onClick:a,children:n("names.errorSpentDismiss")}):e.jsx(ye,{onClick:()=>p("confirm"),children:n("names.tryAgain")})]}):e.jsxs(e.Fragment,{children:[e.jsxs(Tn,{children:[e.jsx(Rn,{children:n("names.confirmTitle")}),e.jsx(_n,{dangerouslySetInnerHTML:{__html:n("names.confirmBody",{name:`<b>@${Zn(s)}</b>`})}}),e.jsxs(In,{children:[e.jsx(Ln,{"aria-hidden":!0,children:"@"}),e.jsx(Nn,{value:f,onChange:y=>w(y.target.value.replace(/[^a-zA-Z0-9]/g,"")),placeholder:"yourname","aria-label":n("names.reenterAria"),autoComplete:"off",spellCheck:!1,style:{width:`${Math.max(f.length,8)}ch`}}),e.jsx(An,{children:".dcl.eth"})]})]}),A?e.jsxs(we,{"data-tone":"info","data-testid":"name-blocked-reason",children:[e.jsx(E,{name:"info","aria-hidden":!0}),e.jsx("span",{children:A})]}):null,e.jsx(ye,{onClick:()=>void F(),disabled:!T||!d||B||N,children:n("names.buyCta")})]})]}),c==="completing"&&e.jsxs(zn,{children:[e.jsx(Mn,{src:Rt,alt:"",width:61,height:61}),e.jsxs(Wn,{children:[e.jsx(Bn,{children:re}),e.jsxs(Fn,{children:[e.jsx(Un,{"aria-hidden":!0,children:e.jsx("span",{})}),e.jsx(Hn,{"data-testid":"name-progress-count",children:`${_}/${I}`})]}),Z?e.jsx(Pn,{children:Z}):null]})]}),c==="pending"&&e.jsxs(e.Fragment,{children:[e.jsxs(ce,{children:[e.jsx(de,{children:n("names.pendingHeaderTitle")}),e.jsx(he,{onClick:a,"aria-label":n("buyModal.close"),children:e.jsx(E,{name:"close"})})]}),e.jsxs(pe,{children:[n("names.myCreditsBalance")," ",e.jsx(O,{})," ",le(h,x)]}),e.jsx(ue,{}),e.jsxs(we,{"data-tone":"info",children:[e.jsx(E,{name:"info","aria-hidden":!0}),e.jsxs("span",{children:[e.jsx("b",{children:n("names.pendingBannerBold")})," ",n("names.pendingBannerRest")]})]}),e.jsxs(fe,{style:{marginTop:20},children:[e.jsx(Me,{"aria-hidden":!0,children:"@"}),e.jsxs(me,{children:[e.jsxs(xe,{children:[s,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(ge,{children:n("names.subtitle")})]}),e.jsxs(be,{children:[e.jsx(O,{}),W]})]}),e.jsx(We,{children:e.jsx(Be,{onClick:()=>{a(),u("/my-items")},children:n("names.myItems")})})]}),c==="success"&&e.jsxs(e.Fragment,{children:[e.jsxs(ce,{children:[e.jsx(de,{children:n("names.successHeaderTitle")}),e.jsx(he,{onClick:a,"aria-label":n("buyModal.close"),children:e.jsx(E,{name:"close"})})]}),e.jsxs(pe,{children:[n("names.myCreditsBalance")," ",e.jsx(O,{})," ",le(h,x)]}),e.jsx(ue,{}),e.jsxs(On,{children:[e.jsx(Dn,{"aria-hidden":!0,children:e.jsx(E,{name:"check"})}),e.jsxs(Gn,{children:[e.jsx("b",{children:n("names.successBannerBold")})," ",n("names.successBannerRest")]})]}),e.jsxs(fe,{style:{marginTop:20},children:[e.jsxs($n,{"data-testid":"name-success-tile",children:[e.jsx(kn,{src:Xt,alt:"","aria-hidden":!0,width:47,height:47}),e.jsxs(Sn,{children:[e.jsx("span",{"aria-hidden":!0,children:s}),e.jsx(En,{src:wn,alt:"","aria-hidden":!0,width:14,height:14})]})]}),e.jsxs(me,{children:[e.jsxs(xe,{children:[s,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(ge,{children:n("names.subtitle")})]}),e.jsxs(be,{children:[e.jsx(O,{}),W]})]}),e.jsxs(We,{children:[e.jsx(Be,{onClick:()=>{a(),u("/my-items")},children:n("names.myItems")}),e.jsx(qn,{href:q.profileUrl,target:"_blank",rel:"noopener noreferrer",children:n("names.assignToAvatar")})]})]})]})})}function Zn(s){return s.replace(/[&<>"']/g,o=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"})[o])}const Qn="https://cdn.decentraland.org/@dcl/shop/1.11.4-33205535310.commit-7a8aa97/_assets/identity-icon-C8yAW_Gq.svg",Kn="https://cdn.decentraland.org/@dcl/shop/1.11.4-33205535310.commit-7a8aa97/_assets/world-icon-6xQ-PmmW.svg",Jn="https://cdn.decentraland.org/@dcl/shop/1.11.4-33205535310.commit-7a8aa97/_assets/invite-icon-Bz6lCTuB.svg",Xn="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",Yn=i.div`
461
+ `;function Vn({name:s,priceCredits:o,onClose:r}){const{session:d}=Oe(),{data:h,isError:x}=St(d),l=Et(),u=He(),[c,p]=m.useState("confirm"),[f,w]=m.useState(""),[j,$]=m.useState(null),[C,g]=m.useState(!1),[b,S]=m.useState("preparing"),L=m.useRef(!1),T=f.trim().toLowerCase()===s.toLowerCase(),k=c==="completing",W=o!=null?ve(o):"—",B=o==null,z=h==null?void 0:h.credits,P=o!=null&&z!=null?o-z:0,N=P>0,A=B?n("names.priceUnavailable"):N?n("names.insufficientCredits",{credits:ve(P)}):null;m.useEffect(()=>{const y=D=>{D.key==="Escape"&&!k&&r()};document.addEventListener("keydown",y);const U=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",y),document.body.style.overflow=U}},[k,r]);async function F(){if(!(!d||!T||B||N||L.current)){L.current=!0,p("completing"),$(null),S("preparing");try{const y=await pn({name:s,identity:d.identity,signer:d.signer,onProgress:S});oe("Shop Completed Purchase",{items:[{item_id:null,contract_address:null,token_id:null,price_usd:Le(o??0),category:"name",is_smart:!1}],purchase_type:"name",is_primary:!0,payment_type:"credits",value_credits:o??null,value_usd:Le(o??0),transaction_hash:y.originTxHash??null,settlement:y.status}),l.invalidateQueries({queryKey:["usd-balance"]}),l.invalidateQueries({queryKey:["my-assets"]}),p(y.status==="registered"?"success":"pending")}catch(y){oe(It(y)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:_t(y),purchase_type:"name"});const U=y instanceof Ce,D=y instanceof $e;$(y instanceof ke?n("names.errorRouteCost"):U?n("names.errorNotRegistered"):D?n("names.errorSettlementUnknown"):(y==null?void 0:y.message)||n("names.errorGeneric")),g(U||D),p("error")}finally{L.current=!1}}}const R=c!=="success"&&c!=="pending",v=Tt(d==null?void 0:d.providerType),I=v?2:1,M=v&&(b==="preparing"||b==="awaiting-confirmation"),_=M?1:I,ae=M?n("names.confirming"):n("names.completing"),Z=b==="registering"?n("names.processingRegistering"):null;return e.jsx(jn,{onClick:k?void 0:r,role:"presentation",children:e.jsxs(Cn,{role:"dialog","aria-modal":"true","aria-label":n("names.buyTitle"),onClick:y=>y.stopPropagation(),children:[R&&e.jsxs(e.Fragment,{children:[e.jsxs(ce,{children:[e.jsx(de,{children:c==="error"?n("names.errorTitle"):n("names.buyTitle")}),e.jsx(he,{onClick:r,disabled:k,"aria-label":n("buyModal.close"),children:e.jsx(E,{name:"close"})})]}),e.jsxs(pe,{children:[n("names.myCreditsBalance")," ",e.jsx(O,{})," ",le(h,x)]}),e.jsx(ue,{})]}),(c==="confirm"||c==="error")&&e.jsxs(e.Fragment,{children:[e.jsxs(fe,{children:[e.jsx(Me,{"aria-hidden":!0,children:"@"}),e.jsxs(me,{children:[e.jsxs(xe,{children:[s,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(ge,{children:n("names.subtitle")})]}),e.jsxs(be,{children:[e.jsx(O,{}),W]})]}),c==="error"?e.jsxs(e.Fragment,{children:[e.jsxs(we,{children:[e.jsx(E,{name:"info","aria-hidden":!0}),e.jsx("span",{children:j})]}),C?e.jsx(ye,{onClick:r,children:n("names.errorSpentDismiss")}):e.jsx(ye,{onClick:()=>p("confirm"),children:n("names.tryAgain")})]}):e.jsxs(e.Fragment,{children:[e.jsxs(Tn,{children:[e.jsx(Rn,{children:n("names.confirmTitle")}),e.jsx(_n,{dangerouslySetInnerHTML:{__html:n("names.confirmBody",{name:`<b>@${Zn(s)}</b>`})}}),e.jsxs(In,{children:[e.jsx(Ln,{"aria-hidden":!0,children:"@"}),e.jsx(Nn,{value:f,onChange:y=>w(y.target.value.replace(/[^a-zA-Z0-9]/g,"")),placeholder:"yourname","aria-label":n("names.reenterAria"),autoComplete:"off",spellCheck:!1,style:{width:`${Math.max(f.length,8)}ch`}}),e.jsx(An,{children:".dcl.eth"})]})]}),A?e.jsxs(we,{"data-tone":"info","data-testid":"name-blocked-reason",children:[e.jsx(E,{name:"info","aria-hidden":!0}),e.jsx("span",{children:A})]}):null,e.jsx(ye,{onClick:()=>void F(),disabled:!T||!d||B||N,children:n("names.buyCta")})]})]}),c==="completing"&&e.jsxs(zn,{children:[e.jsx(Mn,{src:Rt,alt:"",width:61,height:61}),e.jsxs(Wn,{children:[e.jsx(Bn,{children:ae}),e.jsxs(Fn,{children:[e.jsx(Un,{"aria-hidden":!0,children:e.jsx("span",{})}),e.jsx(Hn,{"data-testid":"name-progress-count",children:`${_}/${I}`})]}),Z?e.jsx(Pn,{children:Z}):null]})]}),c==="pending"&&e.jsxs(e.Fragment,{children:[e.jsxs(ce,{children:[e.jsx(de,{children:n("names.pendingHeaderTitle")}),e.jsx(he,{onClick:r,"aria-label":n("buyModal.close"),children:e.jsx(E,{name:"close"})})]}),e.jsxs(pe,{children:[n("names.myCreditsBalance")," ",e.jsx(O,{})," ",le(h,x)]}),e.jsx(ue,{}),e.jsxs(we,{"data-tone":"info",children:[e.jsx(E,{name:"info","aria-hidden":!0}),e.jsxs("span",{children:[e.jsx("b",{children:n("names.pendingBannerBold")})," ",n("names.pendingBannerRest")]})]}),e.jsxs(fe,{style:{marginTop:20},children:[e.jsx(Me,{"aria-hidden":!0,children:"@"}),e.jsxs(me,{children:[e.jsxs(xe,{children:[s,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(ge,{children:n("names.subtitle")})]}),e.jsxs(be,{children:[e.jsx(O,{}),W]})]}),e.jsx(We,{children:e.jsx(Be,{onClick:()=>{r(),u("/my-items")},children:n("names.myItems")})})]}),c==="success"&&e.jsxs(e.Fragment,{children:[e.jsxs(ce,{children:[e.jsx(de,{children:n("names.successHeaderTitle")}),e.jsx(he,{onClick:r,"aria-label":n("buyModal.close"),children:e.jsx(E,{name:"close"})})]}),e.jsxs(pe,{children:[n("names.myCreditsBalance")," ",e.jsx(O,{})," ",le(h,x)]}),e.jsx(ue,{}),e.jsxs(On,{children:[e.jsx(Dn,{"aria-hidden":!0,children:e.jsx(E,{name:"check"})}),e.jsxs(Gn,{children:[e.jsx("b",{children:n("names.successBannerBold")})," ",n("names.successBannerRest")]})]}),e.jsxs(fe,{style:{marginTop:20},children:[e.jsxs($n,{"data-testid":"name-success-tile",children:[e.jsx(kn,{src:Xt,alt:"","aria-hidden":!0,width:47,height:47}),e.jsxs(Sn,{children:[e.jsx("span",{"aria-hidden":!0,children:s}),e.jsx(En,{src:wn,alt:"","aria-hidden":!0,width:14,height:14})]})]}),e.jsxs(me,{children:[e.jsxs(xe,{children:[s,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(ge,{children:n("names.subtitle")})]}),e.jsxs(be,{children:[e.jsx(O,{}),W]})]}),e.jsxs(We,{children:[e.jsx(Be,{onClick:()=>{r(),u("/my-items")},children:n("names.myItems")}),e.jsx(qn,{href:q.profileUrl,target:"_blank",rel:"noopener noreferrer",children:n("names.assignToAvatar")})]})]})]})})}function Zn(s){return s.replace(/[&<>"']/g,o=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"})[o])}const Qn="https://cdn.decentraland.org/@dcl/shop/1.11.4-33732305897.commit-1e7324f/_assets/identity-icon-C8yAW_Gq.svg",Kn="https://cdn.decentraland.org/@dcl/shop/1.11.4-33732305897.commit-1e7324f/_assets/world-icon-6xQ-PmmW.svg",Jn="https://cdn.decentraland.org/@dcl/shop/1.11.4-33732305897.commit-1e7324f/_assets/invite-icon-Bz6lCTuB.svg",Xn="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",Yn=i.div`
462
462
  width: 100%;
463
463
  min-width: 0;
464
464
  `,es=i.nav`
@@ -522,7 +522,7 @@ import{r as m,b as He,j as e,u as tt}from"./react-jpAgvPLt.js";import{u as nt,s
522
522
  flex-direction: column;
523
523
  align-items: center;
524
524
  gap: 12px;
525
- `,as=i.h1`
525
+ `,rs=i.h1`
526
526
  margin: 0;
527
527
  font-family: ${t.font.sans};
528
528
  font-weight: 600;
@@ -533,7 +533,7 @@ import{r as m,b as He,j as e,u as tt}from"./react-jpAgvPLt.js";import{u as nt,s
533
533
  ${t.media.maxWidth("mobile")} {
534
534
  font-size: 26px;
535
535
  }
536
- `,rs=i.p`
536
+ `,as=i.p`
537
537
  margin: 0;
538
538
  max-width: 760px;
539
539
  font-family: ${t.font.sans};
@@ -919,7 +919,7 @@ import{r as m,b as He,j as e,u as tt}from"./react-jpAgvPLt.js";import{u as nt,s
919
919
  clip: rect(0, 0, 0, 0);
920
920
  white-space: nowrap;
921
921
  border: 0;
922
- `,_s="https://docs.decentraland.org/creator/worlds/about/",Is="https://governance.decentraland.org";function Fe(s){const o=typeof window<"u"?window.location.hostname:"";return`${o.endsWith("decentraland.org")?"https://decentraland.org":o.endsWith("decentraland.today")?"https://decentraland.today":"https://decentraland.zone"}/marketplace/names/browse?search=${encodeURIComponent(s)}`}function Ls({onBack:s}){De({title:n("seo.names.title"),description:n("seo.names.description")});const{session:o,signIn:a}=Oe(),d=un(),{data:h}=Ge(),x=h?qe(V,h):null,[l,u]=m.useState(""),[c,p]=m.useState("idle"),[f,w]=m.useState(!1),[j,$]=m.useState(!1),[C,g]=m.useState(()=>{var v;return typeof window<"u"&&!!((v=window.matchMedia)!=null&&v.call(window,"(prefers-reduced-motion: reduce)").matches)});m.useEffect(()=>{var M;const v=(M=window.matchMedia)==null?void 0:M.call(window,"(prefers-reduced-motion: reduce)");if(!v)return;const I=_=>g(_.matches);return v.addEventListener("change",I),()=>v.removeEventListener("change",I)},[]);const b=n("names.placeholderExamples"),S=m.useMemo(()=>b.split(",").map(v=>v.trim()).filter(Boolean),[b]),T=yn(S,!j&&!l&&!C)||n("names.inputPlaceholder"),k=m.useRef(null),[W,B]=m.useState(void 0);m.useLayoutEffect(()=>{k.current&&B(k.current.getBoundingClientRect().width)},[l,T]),m.useEffect(()=>{if(!Ae(l).ok){p(l.length===0?"idle":"invalid");return}p("checking");const I=new AbortController,M=setTimeout(()=>{(async()=>{try{const _=await an(l,{signal:I.signal});p(_)}catch(_){if((_==null?void 0:_.name)==="AbortError")return;p("error")}})()},400);return()=>{clearTimeout(M),I.abort()}},[l]);const z=Ae(l),P=z.ok&&(c==="available"||c==="error"),N=d&&P,A=!d&&P;function F(){if(N){if(!o){a();return}w(!0)}}const R=e.jsxs(e.Fragment,{children:[n("names.claim"),x!=null?e.jsxs(ws,{children:[e.jsx(O,{}),ve(x)]}):null]});return e.jsxs(Yn,{"data-testid":"names-page",children:[e.jsxs(es,{"aria-label":n("names.breadcrumbAria"),children:[e.jsx(ts,{onClick:s,children:n("names.breadcrumbCollectibles")}),e.jsx("span",{"aria-hidden":!0,children:">"}),e.jsx(ns,{children:n("names.breadcrumbCurrent")})]}),e.jsxs(ss,{children:[e.jsxs(is,{children:[e.jsxs(os,{children:[e.jsx(as,{children:n("names.heroTitle")}),e.jsx(rs,{children:n("names.heroSubtitle")})]}),e.jsxs(ls,{children:[e.jsxs(cs,{"data-testid":"names-input-wrap",children:[e.jsxs(ds,{invalid:c==="taken",children:[e.jsxs(fs,{children:[e.jsx(ms,{"aria-hidden":!0,children:"@"}),e.jsx(xs,{value:l,onChange:v=>u(nn(v.target.value)),placeholder:T,"aria-label":n("names.inputAria"),autoComplete:"off",spellCheck:!1,maxLength:ae,onFocus:()=>$(!0),style:{width:W!=null?`${W}px`:void 0}}),e.jsx(hs,{ref:k,"aria-hidden":!0,"data-placeholder":!l||void 0,children:l||T}),e.jsx(gs,{children:n("names.suffix")})]}),l.length>0?e.jsxs(bs,{"aria-hidden":!0,children:[l.length,"/",ae]}):null,e.jsx(Qe,{onClick:F,disabled:!N,"data-testid":"names-claim",children:R})]}),c==="taken"?e.jsxs(ps,{role:"status","data-testid":"names-taken",children:[e.jsx(E,{name:"info",size:16,"aria-hidden":!0}),e.jsx("span",{children:n("names.taken")}),e.jsxs(us,{href:Fe(l),target:"_blank",rel:"noopener noreferrer",children:[n("names.takenMakeOffer"),e.jsx(E,{name:"external-link",size:13,"aria-hidden":!0})]})]}):null,c==="checking"?e.jsx(Y,{tone:"muted",role:"status","data-testid":"names-checking",children:n("names.checking")}):A?e.jsxs(Y,{tone:"muted",role:"status","data-testid":"names-disabled",children:[e.jsx(E,{name:"info",size:16,"aria-hidden":!0}),e.jsx("span",{children:n("names.registrationDisabled")}),e.jsxs(js,{href:Fe(l),target:"_blank",rel:"noopener noreferrer",children:[n("names.registrationDisabledLink"),e.jsx(E,{name:"external-link",size:13,"aria-hidden":!0})]})]}):c==="error"?e.jsx(Y,{tone:"muted",role:"status",children:n("names.checkError")}):c==="invalid"&&!z.ok&&z.reason==="too-short"?e.jsx(Y,{tone:"muted",role:"status",children:n("names.tooShort",{min:Ve})}):null]}),e.jsx(ys,{onClick:F,disabled:!N,children:R}),e.jsx(Rs,{role:"status","aria-live":"polite",children:c==="available"?n("names.available",{name:l}):""})]})]}),e.jsxs(Cs,{children:[e.jsxs($s,{children:[e.jsx(ks,{children:n("names.whyTitle")}),e.jsx(Ss,{children:n("names.whyIntro")})]}),e.jsxs(Es,{children:[e.jsxs(ee,{children:[e.jsx(te,{src:Qn,alt:""}),e.jsxs(ne,{children:[e.jsx(se,{children:n("names.why1Title")}),e.jsx(ie,{children:n("names.why1")})]})]}),e.jsxs(ee,{children:[e.jsx(te,{src:Kn,alt:""}),e.jsxs(ne,{children:[e.jsx(se,{children:n("names.why2Title")}),e.jsxs(ie,{children:[n("names.why2")," ",e.jsx(Ts,{children:n("names.why2Address")})]}),e.jsxs(Pe,{href:_s,target:"_blank",rel:"noopener noreferrer",children:[n("names.learnMore"),e.jsx(E,{name:"external-link","aria-hidden":!0})]})]})]}),e.jsxs(ee,{children:[e.jsx(te,{src:Jn,alt:""}),e.jsxs(ne,{children:[e.jsx(se,{children:n("names.why3Title")}),e.jsx(ie,{children:n("names.why3")})]})]}),e.jsxs(ee,{children:[e.jsx(te,{src:Xn,alt:""}),e.jsxs(ne,{children:[e.jsx(se,{children:n("names.why4Title")}),e.jsx(ie,{children:n("names.why4")}),e.jsxs(Pe,{href:Is,target:"_blank",rel:"noopener noreferrer",children:[n("names.learnMore"),e.jsx(E,{name:"external-link","aria-hidden":!0})]})]})]})]})]})]}),f?e.jsx(Vn,{name:l,priceCredits:x,onClose:()=>w(!1)}):null]})}const Ns=i.p`
922
+ `,_s="https://docs.decentraland.org/creator/worlds/about/",Is="https://governance.decentraland.org";function Fe(s){const o=typeof window<"u"?window.location.hostname:"";return`${o.endsWith("decentraland.org")?"https://decentraland.org":o.endsWith("decentraland.today")?"https://decentraland.today":"https://decentraland.zone"}/marketplace/names/browse?search=${encodeURIComponent(s)}`}function Ls({onBack:s}){De({title:n("seo.names.title"),description:n("seo.names.description")});const{session:o,signIn:r}=Oe(),d=un(),{data:h}=Ge(),x=h?qe(V,h):null,[l,u]=m.useState(""),[c,p]=m.useState("idle"),[f,w]=m.useState(!1),[j,$]=m.useState(!1),[C,g]=m.useState(()=>{var v;return typeof window<"u"&&!!((v=window.matchMedia)!=null&&v.call(window,"(prefers-reduced-motion: reduce)").matches)});m.useEffect(()=>{var M;const v=(M=window.matchMedia)==null?void 0:M.call(window,"(prefers-reduced-motion: reduce)");if(!v)return;const I=_=>g(_.matches);return v.addEventListener("change",I),()=>v.removeEventListener("change",I)},[]);const b=n("names.placeholderExamples"),S=m.useMemo(()=>b.split(",").map(v=>v.trim()).filter(Boolean),[b]),T=yn(S,!j&&!l&&!C)||n("names.inputPlaceholder"),k=m.useRef(null),[W,B]=m.useState(void 0);m.useLayoutEffect(()=>{k.current&&B(k.current.getBoundingClientRect().width)},[l,T]),m.useEffect(()=>{if(!Ae(l).ok){p(l.length===0?"idle":"invalid");return}p("checking");const I=new AbortController,M=setTimeout(()=>{(async()=>{try{const _=await rn(l,{signal:I.signal});p(_)}catch(_){if((_==null?void 0:_.name)==="AbortError")return;p("error")}})()},400);return()=>{clearTimeout(M),I.abort()}},[l]);const z=Ae(l),P=z.ok&&(c==="available"||c==="error"),N=d&&P,A=!d&&P;function F(){if(N){if(!o){r();return}w(!0)}}const R=e.jsxs(e.Fragment,{children:[n("names.claim"),x!=null?e.jsxs(ws,{children:[e.jsx(O,{}),ve(x)]}):null]});return e.jsxs(Yn,{"data-testid":"names-page",children:[e.jsxs(es,{"aria-label":n("names.breadcrumbAria"),children:[e.jsx(ts,{onClick:s,children:n("names.breadcrumbCollectibles")}),e.jsx("span",{"aria-hidden":!0,children:">"}),e.jsx(ns,{children:n("names.breadcrumbCurrent")})]}),e.jsxs(ss,{children:[e.jsxs(is,{children:[e.jsxs(os,{children:[e.jsx(rs,{children:n("names.heroTitle")}),e.jsx(as,{children:n("names.heroSubtitle")})]}),e.jsxs(ls,{children:[e.jsxs(cs,{"data-testid":"names-input-wrap",children:[e.jsxs(ds,{invalid:c==="taken",children:[e.jsxs(fs,{children:[e.jsx(ms,{"aria-hidden":!0,children:"@"}),e.jsx(xs,{value:l,onChange:v=>u(nn(v.target.value)),placeholder:T,"aria-label":n("names.inputAria"),autoComplete:"off",spellCheck:!1,maxLength:re,onFocus:()=>$(!0),style:{width:W!=null?`${W}px`:void 0}}),e.jsx(hs,{ref:k,"aria-hidden":!0,"data-placeholder":!l||void 0,children:l||T}),e.jsx(gs,{children:n("names.suffix")})]}),l.length>0?e.jsxs(bs,{"aria-hidden":!0,children:[l.length,"/",re]}):null,e.jsx(Qe,{onClick:F,disabled:!N,"data-testid":"names-claim",children:R})]}),c==="taken"?e.jsxs(ps,{role:"status","data-testid":"names-taken",children:[e.jsx(E,{name:"info",size:16,"aria-hidden":!0}),e.jsx("span",{children:n("names.taken")}),e.jsxs(us,{href:Fe(l),target:"_blank",rel:"noopener noreferrer",children:[n("names.takenMakeOffer"),e.jsx(E,{name:"external-link",size:13,"aria-hidden":!0})]})]}):null,c==="checking"?e.jsx(Y,{tone:"muted",role:"status","data-testid":"names-checking",children:n("names.checking")}):A?e.jsxs(Y,{tone:"muted",role:"status","data-testid":"names-disabled",children:[e.jsx(E,{name:"info",size:16,"aria-hidden":!0}),e.jsx("span",{children:n("names.registrationDisabled")}),e.jsxs(js,{href:Fe(l),target:"_blank",rel:"noopener noreferrer",children:[n("names.registrationDisabledLink"),e.jsx(E,{name:"external-link",size:13,"aria-hidden":!0})]})]}):c==="error"?e.jsx(Y,{tone:"muted",role:"status",children:n("names.checkError")}):c==="invalid"&&!z.ok&&z.reason==="too-short"?e.jsx(Y,{tone:"muted",role:"status",children:n("names.tooShort",{min:Ve})}):null]}),e.jsx(ys,{onClick:F,disabled:!N,children:R}),e.jsx(Rs,{role:"status","aria-live":"polite",children:c==="available"?n("names.available",{name:l}):""})]})]}),e.jsxs(Cs,{children:[e.jsxs($s,{children:[e.jsx(ks,{children:n("names.whyTitle")}),e.jsx(Ss,{children:n("names.whyIntro")})]}),e.jsxs(Es,{children:[e.jsxs(ee,{children:[e.jsx(te,{src:Qn,alt:""}),e.jsxs(ne,{children:[e.jsx(se,{children:n("names.why1Title")}),e.jsx(ie,{children:n("names.why1")})]})]}),e.jsxs(ee,{children:[e.jsx(te,{src:Kn,alt:""}),e.jsxs(ne,{children:[e.jsx(se,{children:n("names.why2Title")}),e.jsxs(ie,{children:[n("names.why2")," ",e.jsx(Ts,{children:n("names.why2Address")})]}),e.jsxs(Pe,{href:_s,target:"_blank",rel:"noopener noreferrer",children:[n("names.learnMore"),e.jsx(E,{name:"external-link","aria-hidden":!0})]})]})]}),e.jsxs(ee,{children:[e.jsx(te,{src:Jn,alt:""}),e.jsxs(ne,{children:[e.jsx(se,{children:n("names.why3Title")}),e.jsx(ie,{children:n("names.why3")})]})]}),e.jsxs(ee,{children:[e.jsx(te,{src:Xn,alt:""}),e.jsxs(ne,{children:[e.jsx(se,{children:n("names.why4Title")}),e.jsx(ie,{children:n("names.why4")}),e.jsxs(Pe,{href:Is,target:"_blank",rel:"noopener noreferrer",children:[n("names.learnMore"),e.jsx(E,{name:"external-link","aria-hidden":!0})]})]})]})]})]})]}),f?e.jsx(Vn,{name:l,priceCredits:x,onClose:()=>w(!1)}):null]})}const Ns=i.p`
923
923
  display: flex;
924
924
  align-items: center;
925
925
  gap: 10px;
@@ -935,5 +935,5 @@ import{r as m,b as He,j as e,u as tt}from"./react-jpAgvPLt.js";import{u as nt,s
935
935
  background: rgba(211, 51, 51, 0.1);
936
936
  color: ${t.colors.err};
937
937
  }
938
- `,Ue=48,As=["all","on_sale","not_for_sale"],zs=s=>s?"all":"on_sale";function si(){const[s]=tt(),o=He(),a=(s.get("q")??"").trim().toLowerCase(),d=(s.get("q")??"").trim();De({title:d?n("seo.collectibles.searchTitle",{query:d}):n("seo.collectibles.title"),description:n("seo.collectibles.description")});const h=zs(!!a),x=m.useMemo(()=>({category:"all",status:h,subCategory:null,rarities:[],priceMin:"",priceMax:"",smart:!1,sort:"newest"}),[h]),[l,u]=nt(x),{subCategory:c,rarities:p,priceMin:f,priceMax:w,smart:j,sort:$}=l,C=l.category,g=As.includes(l.status)?l.status:h;it(`${C}:${c??""}`);const[b,S]=m.useState(!1);m.useEffect(()=>{if(!b)return;const r=K=>{K.key==="Escape"&&S(!1)};document.addEventListener("keydown",r);const H=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",r),document.body.style.overflow=H}},[b]);const L=g==="on_sale",T=f&&!Number.isNaN(Number(f))?Number(f):void 0,k=w&&!Number.isNaN(Number(w))?Number(w):void 0,W=Lt(),B=c?Ft[c]:void 0,z=(Ie.find(r=>r.key===$)??Ie[0]).server,P={category:C,rarities:p.length?p:void 0,wearableCategories:B,minPriceCredits:T,maxPriceCredits:k,search:a||void 0,sortBy:z,isSmart:j||void 0,onSale:!0,listingType:W?void 0:"primary"},N={category:C,rarities:p.length?p:void 0,wearableCategories:B,search:a||void 0,sortBy:z,isWearableSmart:j||void 0,isOnSale:g==="not_for_sale"?!1:void 0},{items:A,total:F,isLoading:R,isPlaceholderData:v,error:I,hasNextPage:M,isFetchingNextPage:_,isFetchNextPageError:re,fetchNextPage:Z}=Bt(L?["shop-items",P]:["catalog-items",N],r=>L?zt({...P,first:Ue,skip:r}):Mt({...N,first:Ue,skip:r}),{enabled:C!=="names"}),y=F,{data:U,isError:D,isPending:Ke}=Ge(),Je=r=>U&&r.manaWei?qe(r.manaWei,U):null,Xe=L&&Ke&&A.some(r=>r.source==="legacy"),Se=R||v||Xe,Ye=R?15:Math.max(A.length,1),Ee=m.useRef(null);m.useEffect(()=>{R||v||!a||Ee.current===a||(Ee.current=a,oe("Shop Searched",{query:a,result_count:y}))},[a,R,v,y]);const Q=m.useRef("__init__");m.useEffect(()=>{if(R||v)return;const r=JSON.stringify({category:C,subCategory:c,rarities:p,min:T,max:k,sort:$,status:g,smart:j});if(Q.current==="__init__"||Q.current===r){Q.current=r;return}Q.current=r,oe("Shop Applied Filter",{filters:{category:C,sub_category:c,rarities:p,min_price_credits:T??null,max_price_credits:k??null,status:g,smart:j,sort:$},result_count:y})},[C,c,p,T,k,$,g,j,R,v,y]);function Te(r){u({category:r,subCategory:null})}function Re(r){u({status:r})}function _e(r){u({rarities:p.includes(r)?p.filter(H=>H!==r):[...p,r]})}function et(){u(x)}const G=[];(T!=null||k!=null)&&G.push({key:"price",label:n("filter.price"),onRemove:()=>{u({priceMin:"",priceMax:""})}});for(const r of ot)p.includes(r)&&G.push({key:`rarity-${r}`,label:Nt(r),onRemove:()=>_e(r)});return j&&G.push({key:"smart",label:n("filter.smart"),onRemove:()=>u({smart:!1})}),g!==h&&G.push({key:"status",label:g==="all"?n("filter.statusAll"):g==="on_sale"?n("filter.onSale"):n("filter.notForSale"),onRemove:()=>Re(h)}),e.jsxs(at,{"data-testid":"browse",children:[C!=="names"&&e.jsxs(e.Fragment,{children:[b?e.jsx(rt,{onClick:()=>S(!1),"aria-hidden":!0}):null,e.jsxs(lt,{"data-open":b||void 0,"data-testid":"browse-sidebar",children:[e.jsxs(ct,{children:[e.jsx(dt,{children:n("assets.filters")}),e.jsx(ht,{onClick:()=>S(!1),"aria-label":n("assets.closeFilters"),children:"✕"})]}),e.jsx(pt,{children:e.jsx(ut,{category:C,subCategory:c,onCategory:Te,onSub:r=>u({subCategory:r}),priceMin:f,priceMax:w,onPriceMin:r=>u({priceMin:r}),onPriceMax:r=>u({priceMax:r}),rarities:p,onToggleRarity:_e,status:g,onStatus:Re,smart:j,onSmart:r=>u({smart:r})})}),e.jsx(ft,{children:e.jsx(mt,{type:"button",onClick:()=>S(!1),children:n("assets.showItems")})})]})]}),e.jsx(xt,{children:C==="names"?e.jsx(Ls,{onBack:()=>Te("all")}):e.jsxs(e.Fragment,{children:[e.jsx(gt,{sort:$,onSort:r=>u({sort:r}),total:F,loading:R||v,query:a,onOpenFilters:()=>S(!0),chips:G,onClearChips:et}),D&&L&&A.some(r=>r.source==="legacy")?e.jsx(Ns,{"data-variant":"warn",children:n("assets.marketUnavailable")}):null,I?e.jsx(Ut,{message:n("assets.loadError"),testId:"browse-error"}):null,!Se&&A.length===0&&!I?e.jsx(At,{testId:"browse-empty",icon:st,title:n("assets.empty.title"),body:d?e.jsxs(e.Fragment,{children:[n("assets.empty.searchBefore"),e.jsx("b",{children:d}),n("assets.empty.searchAfter")]}):n("assets.empty.filters"),cta:{label:n("assets.empty.cta"),onClick:()=>o("/overview")}}):e.jsxs(e.Fragment,{children:[e.jsx(en,{"data-testid":"grid",children:Se?e.jsx(Ne,{count:Ye}):e.jsxs(e.Fragment,{children:[A.map(r=>{if(!L)return e.jsx(J,{item:r,mode:"view"},X(r));const H=r;if(H.source!=="legacy")return e.jsx(J,{item:r},X(r));const K=Je(H);return K==null?e.jsx(J,{item:r,mode:"view"},X(r)):e.jsx(J,{item:{...H,priceCredits:K}},X(r))}),_?e.jsx(Ne,{count:6}):null]})}),e.jsx(Wt,{hasNextPage:M,isFetching:_,isError:re,onLoadMore:()=>void Z()})]})]})})]})}export{si as Assets};
939
- //# sourceMappingURL=Assets-BLKlgj00.js.map
938
+ `,Ue=48,As=["all","on_sale","not_for_sale"],zs=s=>s?"all":"on_sale";function si(){const[s]=tt(),o=He(),r=(s.get("q")??"").trim().toLowerCase(),d=(s.get("q")??"").trim();De({title:d?n("seo.collectibles.searchTitle",{query:d}):n("seo.collectibles.title"),description:n("seo.collectibles.description")});const h=zs(!!r),x=m.useMemo(()=>({category:"all",status:h,subCategory:null,rarities:[],priceMin:"",priceMax:"",smart:!1,sort:"newest"}),[h]),[l,u]=nt(x),{subCategory:c,rarities:p,priceMin:f,priceMax:w,smart:j,sort:$}=l,C=l.category,g=As.includes(l.status)?l.status:h;it(`${C}:${c??""}`);const[b,S]=m.useState(!1);m.useEffect(()=>{if(!b)return;const a=K=>{K.key==="Escape"&&S(!1)};document.addEventListener("keydown",a);const H=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",a),document.body.style.overflow=H}},[b]);const L=g==="on_sale",T=f&&!Number.isNaN(Number(f))?Number(f):void 0,k=w&&!Number.isNaN(Number(w))?Number(w):void 0,W=Lt(),B=c?Ft[c]:void 0,z=(Ie.find(a=>a.key===$)??Ie[0]).server,P={category:C,rarities:p.length?p:void 0,wearableCategories:B,minPriceCredits:T,maxPriceCredits:k,search:r||void 0,sortBy:z,isSmart:j||void 0,onSale:!0,listingType:W?void 0:"primary"},N={category:C,rarities:p.length?p:void 0,wearableCategories:B,search:r||void 0,sortBy:z,isWearableSmart:j||void 0,isOnSale:g==="not_for_sale"?!1:void 0},{items:A,total:F,isLoading:R,isPlaceholderData:v,error:I,hasNextPage:M,isFetchingNextPage:_,isFetchNextPageError:ae,fetchNextPage:Z}=Bt(L?["shop-items",P]:["catalog-items",N],a=>L?zt({...P,first:Ue,skip:a}):Mt({...N,first:Ue,skip:a}),{enabled:C!=="names"}),y=F,{data:U,isError:D,isPending:Ke}=Ge(),Je=a=>U&&a.manaWei?qe(a.manaWei,U):null,Xe=L&&Ke&&A.some(a=>a.source==="legacy"),Se=R||v||Xe,Ye=R?15:Math.max(A.length,1),Ee=m.useRef(null);m.useEffect(()=>{R||v||!r||Ee.current===r||(Ee.current=r,oe("Shop Searched",{query:r,result_count:y}))},[r,R,v,y]);const Q=m.useRef("__init__");m.useEffect(()=>{if(R||v)return;const a=JSON.stringify({category:C,subCategory:c,rarities:p,min:T,max:k,sort:$,status:g,smart:j});if(Q.current==="__init__"||Q.current===a){Q.current=a;return}Q.current=a,oe("Shop Applied Filter",{filters:{category:C,sub_category:c,rarities:p,min_price_credits:T??null,max_price_credits:k??null,status:g,smart:j,sort:$},result_count:y})},[C,c,p,T,k,$,g,j,R,v,y]);function Te(a){u({category:a,subCategory:null})}function Re(a){u({status:a})}function _e(a){u({rarities:p.includes(a)?p.filter(H=>H!==a):[...p,a]})}function et(){u(x)}const G=[];(T!=null||k!=null)&&G.push({key:"price",label:n("filter.price"),onRemove:()=>{u({priceMin:"",priceMax:""})}});for(const a of ot)p.includes(a)&&G.push({key:`rarity-${a}`,label:Nt(a),onRemove:()=>_e(a)});return j&&G.push({key:"smart",label:n("filter.smart"),onRemove:()=>u({smart:!1})}),g!==h&&G.push({key:"status",label:g==="all"?n("filter.statusAll"):g==="on_sale"?n("filter.onSale"):n("filter.notForSale"),onRemove:()=>Re(h)}),e.jsxs(rt,{"data-testid":"browse",children:[C!=="names"&&e.jsxs(e.Fragment,{children:[b?e.jsx(at,{onClick:()=>S(!1),"aria-hidden":!0}):null,e.jsxs(lt,{"data-open":b||void 0,"data-testid":"browse-sidebar",children:[e.jsxs(ct,{children:[e.jsx(dt,{children:n("assets.filters")}),e.jsx(ht,{onClick:()=>S(!1),"aria-label":n("assets.closeFilters"),children:"✕"})]}),e.jsx(pt,{children:e.jsx(ut,{category:C,subCategory:c,onCategory:Te,onSub:a=>u({subCategory:a}),priceMin:f,priceMax:w,onPriceMin:a=>u({priceMin:a}),onPriceMax:a=>u({priceMax:a}),rarities:p,onToggleRarity:_e,status:g,onStatus:Re,smart:j,onSmart:a=>u({smart:a})})}),e.jsx(ft,{children:e.jsx(mt,{type:"button",onClick:()=>S(!1),children:n("assets.showItems")})})]})]}),e.jsx(xt,{children:C==="names"?e.jsx(Ls,{onBack:()=>Te("all")}):e.jsxs(e.Fragment,{children:[e.jsx(gt,{sort:$,onSort:a=>u({sort:a}),total:F,loading:R||v,query:r,onOpenFilters:()=>S(!0),chips:G,onClearChips:et}),D&&L&&A.some(a=>a.source==="legacy")?e.jsx(Ns,{"data-variant":"warn",children:n("assets.marketUnavailable")}):null,I?e.jsx(Ut,{message:n("assets.loadError"),testId:"browse-error"}):null,!Se&&A.length===0&&!I?e.jsx(At,{testId:"browse-empty",icon:st,title:n("assets.empty.title"),body:d?e.jsxs(e.Fragment,{children:[n("assets.empty.searchBefore"),e.jsx("b",{children:d}),n("assets.empty.searchAfter")]}):n("assets.empty.filters"),cta:{label:n("assets.empty.cta"),onClick:()=>o("/overview")}}):e.jsxs(e.Fragment,{children:[e.jsx(en,{"data-testid":"grid",children:Se?e.jsx(Ne,{count:Ye}):e.jsxs(e.Fragment,{children:[A.map(a=>{if(!L)return e.jsx(J,{item:a,mode:"view"},X(a));const H=a;if(H.source!=="legacy")return e.jsx(J,{item:a},X(a));const K=Je(H);return K==null?e.jsx(J,{item:a,mode:"view"},X(a)):e.jsx(J,{item:{...H,priceCredits:K}},X(a))}),_?e.jsx(Ne,{count:6}):null]})}),e.jsx(Wt,{hasNextPage:M,isFetching:_,isError:ae,onLoadMore:()=>void Z()})]})]})})]})}export{si as Assets};
939
+ //# sourceMappingURL=Assets-Cso_98af.js.map
@@ -1,4 +1,4 @@
1
- import{j as i,L as W,r as P}from"./react-jpAgvPLt.js";import{t as o,s as n,B,n as R,o as F,b as e,p as G,q as O,I as z,r as K,m as w,v as Q,c as H,w as X,x as A,h as Z,y as J,z as I}from"./index-BzcOLtVK.js";import{a as U,b as V,c as Y,d as tt,s as it,e as et}from"./authorizations-DVcnP4OW.js";import{f as ot}from"./builder-CXuY5Bw4.js";import{m as at}from"./mana-matic-CEqvSwrJ.js";import{f as nt}from"./errors-Da6uevGV.js";import"./dcl-schemas-CGG1jvt5.js";import"./sentry-B_JVKDG7.js";import"./ethers-DsOeUsXW.js";import"./intl-AKLEHPeO.js";import"./sendMetaTransaction-TAXZbOgU.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},s=new t.Error().stack;s&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[s]="49426bfe-f558-49cb-9614-b6b413b0d2b5",t._sentryDebugIdIdentifier="sentry-dbid-49426bfe-f558-49cb-9614-b6b413b0d2b5")}catch{}})();const st=R`
1
+ import{j as i,L as W,r as P}from"./react-CO8J9utQ.js";import{t as o,s as n,B,n as R,o as F,b as e,p as G,q as O,I as z,r as K,m as w,v as Q,c as H,w as X,x as A,h as Z,y as J,z as I}from"./index-BRU8_4Hh.js";import{a as U,b as V,c as Y,d as tt,s as it,e as et}from"./authorizations-9V7aWjZQ.js";import{f as ot}from"./builder-DORX-23E.js";import{m as at}from"./mana-matic-CEqvSwrJ.js";import{f as nt}from"./errors-BRe26Jfh.js";import"./dcl-schemas-DomYdfSu.js";import"./sentry-DYLA9B0R.js";import"./ethers-lJUVMKsu.js";import"./intl-AKLEHPeO.js";import"./sendMetaTransaction-BlBggQ5M.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},s=new t.Error().stack;s&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[s]="49426bfe-f558-49cb-9614-b6b413b0d2b5",t._sentryDebugIdIdentifier="sentry-dbid-49426bfe-f558-49cb-9614-b6b413b0d2b5")}catch{}})();const st=R`
2
2
  to { transform: rotate(360deg); }
3
3
  `,rt=R`
4
4
  to { background-position: -200% 0; }
@@ -189,4 +189,4 @@ import{j as i,L as W,r as P}from"./react-jpAgvPLt.js";import{t as o,s as n,B,n a
189
189
  `,M=n(B)`
190
190
  margin-top: 12px;
191
191
  `;function j({descriptor:t,owner:s,signer:r,name:a,description:c,image:l,icon:p}){const v=Q(),[h,y]=P.useState(!1),{data:u,isLoading:g,refetch:d}=w({queryKey:["authorization",t.id,s],queryFn:()=>et(t,s),staleTime:3e4});async function m(){if(h||g)return;const b=!u;y(!0);try{await it({auth:t,signer:r,active:b}),await d(),v.setQueryData(["authorization",t.id,s],b),A.success(b?e("authorizations.toastActivated",{name:a}):e("authorizations.toastDeactivated",{name:a}))}catch(C){Z(C,{flow:"authorizations",step:b?"grant":"revoke"}),A.error(nt(C,e("authorizations.errorGeneric")))}finally{y(!1)}}const N=g?e("authorizations.checking"):u?e("authorizations.active"):e("authorizations.inactive");return i.jsxs(ht,{"data-testid":`authorization-${t.id}`,"data-active":!!u,children:[i.jsx(gt,{children:l?i.jsx("img",{src:l,alt:""}):p}),i.jsxs(mt,{children:[i.jsx(ft,{title:a,children:a}),i.jsx(xt,{children:c})]}),i.jsxs(bt,{children:[i.jsx(yt,{"data-active":!!u,children:N}),h?i.jsx(jt,{"aria-label":e("authorizations.working")}):i.jsx(zt,{type:"button","data-testid":`authorization-toggle-${t.id}`,"data-active":!!u,role:"switch","aria-checked":!!u,"aria-label":u?e("authorizations.deactivateAria",{name:a}):e("authorizations.activateAria",{name:a}),disabled:g,onClick:()=>void m()})]})]})}const x=500,q=10,vt=x*q;async function _(t,s){const r=await I(t,{category:s,first:x}),a=Math.min(Math.ceil(r.total/x),q),c=await Promise.all(Array.from({length:Math.max(0,a-1)},(l,p)=>I(t,{category:s,first:x,skip:(p+1)*x})));return{assets:[...r.assets,...c.flatMap(l=>l.assets)],truncated:r.total>vt}}function kt(t){return w({queryKey:["owned-collections",t],enabled:!!t,staleTime:6e4,queryFn:async()=>{const[s,r]=await Promise.all([_(t,"wearable"),_(t,"emote")]),a=new Map;for(const c of[...s.assets,...r.assets]){const l=c.contractAddress.toLowerCase();a.has(l)||a.set(l,c)}return{collections:[...a.values()],truncated:s.truncated||r.truncated,scanned:s.assets.length+r.assets.length}}})}function $t(t){return w({queryKey:["contract-registry"],enabled:t,staleTime:1/0,gcTime:1/0,queryFn:J})}function Ct(t,s){const r=s==null?void 0:s.get(t.toLowerCase());if(r)return r;const a=X(t);return a===t?e("authorizations.collectionFallback"):a}function At(t,s){return w({queryKey:["creator-collections",t],enabled:!!t&&!!s,staleTime:6e4,queryFn:async()=>{const r=await ot(t,s),a=new Map;for(const c of r){const l=c.contractAddress.toLowerCase();a.has(l)||a.set(l,c)}return[...a.values()]}})}function Wt(){F({title:e("authorizations.title"),noindex:!0});const{session:t,signIn:s}=G(),r=H.chainId,a=O(t==null?void 0:t.providerType),{data:c,isLoading:l}=kt(a?t==null?void 0:t.address:void 0),{data:p,isLoading:v}=$t(!!a&&!!(t!=null&&t.address)),{data:h,isLoading:y}=At(a?t==null?void 0:t.address:void 0,a?t==null?void 0:t.identity:void 0);if(!t)return i.jsxs(D,{children:[i.jsx(z,{name:"info",size:40,color:o.colors.muted2}),i.jsx(S,{children:e("authorizations.signInTitle")}),i.jsx(L,{children:e("authorizations.signInBody")}),i.jsx(M,{variant:"white",onClick:()=>s(),children:e("storeSettings.signIn")})]});if(!a)return i.jsxs(D,{children:[i.jsx(z,{name:"check",size:40,color:o.colors.ok}),i.jsx(S,{children:e("authorizations.managedTitle")}),i.jsx(L,{children:e("authorizations.managedBody")}),i.jsx(M,{as:W,to:"/items",variant:"white",children:e("authorizations.managedCta")})]});const u=U(r),g=V(r);return i.jsxs(ct,{children:[i.jsxs(lt,{children:[i.jsx(dt,{children:e("authorizations.title")}),i.jsx(ut,{children:e("authorizations.intro")})]}),i.jsxs(k,{children:[i.jsx($,{children:e("authorizations.buyingTitle")}),i.jsxs(f,{children:[i.jsx(j,{descriptor:u,owner:t.address,signer:t.signer,name:e("authorizations.creditsName"),description:e("authorizations.creditsDesc"),icon:i.jsx(K,{className:"ccy-mark"})}),i.jsx(j,{descriptor:g,owner:t.address,signer:t.signer,name:e("authorizations.manaName"),description:e("authorizations.manaDesc"),icon:i.jsx(pt,{src:at,alt:"","aria-hidden":!0})})]})]}),i.jsxs(k,{children:[i.jsx($,{children:e("authorizations.sellingTitle")}),c!=null&&c.truncated?i.jsx(wt,{"data-testid":"authorizations-selling-truncated",children:e("authorizations.sellingTruncated",{count:c.scanned})}):null,l||v?i.jsx(f,{"aria-busy":"true","aria-label":e("authorizations.checking"),children:Array.from({length:3}).map((d,m)=>i.jsx(E,{"aria-hidden":!0},m))}):c&&c.collections.length>0?i.jsx(f,{children:c.collections.map(d=>i.jsx(j,{descriptor:Y(d.contractAddress,r),owner:t.address,signer:t.signer,name:Ct(d.contractAddress,p),description:e("authorizations.sellingDesc"),image:d.image,icon:i.jsx(z,{name:"pen",size:18})},d.contractAddress))}):i.jsx(T,{children:e("authorizations.sellingEmpty")})]}),i.jsxs(k,{children:[i.jsx($,{children:e("authorizations.mintingTitle")}),y?i.jsx(f,{"aria-busy":"true","aria-label":e("authorizations.checking"),children:Array.from({length:3}).map((d,m)=>i.jsx(E,{"aria-hidden":!0},m))}):h&&h.length>0?i.jsx(f,{children:h.map(d=>i.jsx(j,{descriptor:tt(d.contractAddress,r),owner:t.address,signer:t.signer,name:d.name||e("authorizations.collectionFallback"),description:e("authorizations.mintingDesc"),icon:i.jsx(z,{name:"pen",size:18})},d.contractAddress))}):i.jsx(T,{children:e("authorizations.mintingEmpty")})]})]})}export{Wt as Authorizations};
192
- //# sourceMappingURL=Authorizations-D-70ZhQL.js.map
192
+ //# sourceMappingURL=Authorizations-Dp6DDvM0.js.map
@@ -1,4 +1,4 @@
1
- import{j as e,L as Ut,r as T,b as fa,a as ma}from"./react-jpAgvPLt.js";import{s as i,t as E,b as a,r as Ie,E as ae,bc as Fe,C as Me,bd as ya,D as Le,be as ba,A as va,I as Y,j as Xe,o as wa,ab as O,H as jt,p as Ca,V as ja,m as ka,bf as $a,v as Sa,bg as Ma,J as Ta,bh as Ia,bi as kt,L as Pa,bj as Aa,bk as za,bl as Ea,ao as Ke,q as Ra,bm as $t,ad as V,bn as St,bo as Ba,h as re,R as qa,c as Mt,bp as _a,bq as Wa,br as Ne,W as Fa,bs as we,bt as Ce,bu as Tt,bv as La,g as It,f as Pt,bw as Ka}from"./index-BzcOLtVK.js";import{m as Te,M as Na,S as Qa,C as Ua,H as Ga,a as Ha,T as Oa,X as Da,b as Va,B as Ya,c as Ja,d as At,e as Xa,f as Pe,g as Za,h as es,i as ts,j as as,k as Je,l as pe,L as ss,P as ns,n as zt,o as Et,W as is,p as rs,q as os,r as cs,A as ls,s as ds,t as us,u as hs,v as ps,w as gs,x as xs,y as fs,z as ms,D as ys,E as bs,F as vs,G as ws,I as Cs,J as js,K as ks,N as $s,O as Qe,Q as Ss,R as Ms,U as Ts,V as Rt,Y as Bt,Z as Is,_ as Ps,$ as As,a0 as zs,a1 as qt,a2 as Es}from"./CollectionCarousel-Db3_b5uH.js";import{k as Rs,l as Bs,e as qs,n as _s,f as Ws,A as Fs}from"./authorizations-DVcnP4OW.js";import{p as _t,g as Ls,h as Ue}from"./buy-DNqcsljj.js";import{w as Ks,S as Ge,b as Ns,G as Qs}from"./buy-gasless-6sL_DNZf.js";import{u as Us,M as Gs,R as je,r as Hs,c as Os,g as Ds,a as Vs,p as Wt,b as He}from"./useCreditPacks-mY4iSSJ4.js";import{i as Ys,a as Js}from"./errors-Da6uevGV.js";import{E as Xs}from"./ErrorNotice-Dn6mBZT0.js";import"./dcl-schemas-CGG1jvt5.js";import"./sentry-B_JVKDG7.js";import"./ethers-DsOeUsXW.js";import"./intl-AKLEHPeO.js";import"./sendMetaTransaction-TAXZbOgU.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},d=new r.Error().stack;d&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[d]="fb3836f6-4cf7-439f-8ab0-796241a08830",r._sentryDebugIdIdentifier="sentry-dbid-fb3836f6-4cf7-439f-8ab0-796241a08830")}catch{}})();const Zs=i.div`
1
+ import{j as e,L as Ut,r as T,b as fa,a as ma}from"./react-CO8J9utQ.js";import{s as i,t as E,b as a,r as Ie,E as ae,bc as Fe,C as Me,bd as ya,D as Le,be as ba,A as va,I as Y,j as Xe,o as wa,ab as O,H as jt,p as Ca,V as ja,m as ka,bf as $a,v as Sa,bg as Ma,J as Ta,bh as Ia,bi as kt,L as Pa,bj as Aa,bk as za,bl as Ea,ao as Ke,q as Ra,bm as $t,ad as V,bn as St,bo as Ba,h as re,R as qa,c as Mt,bp as _a,bq as Wa,br as Ne,W as Fa,bs as we,bt as Ce,bu as Tt,bv as La,g as It,f as Pt,bw as Ka}from"./index-BRU8_4Hh.js";import{m as Te,M as Na,S as Qa,C as Ua,H as Ga,a as Ha,T as Oa,X as Da,b as Va,B as Ya,c as Ja,d as At,e as Xa,f as Pe,g as Za,h as es,i as ts,j as as,k as Je,l as pe,L as ss,P as ns,n as zt,o as Et,W as is,p as rs,q as os,r as cs,A as ls,s as ds,t as us,u as hs,v as ps,w as gs,x as xs,y as fs,z as ms,D as ys,E as bs,F as vs,G as ws,I as Cs,J as js,K as ks,N as $s,O as Qe,Q as Ss,R as Ms,U as Ts,V as Rt,Y as Bt,Z as Is,_ as Ps,$ as As,a0 as zs,a1 as qt,a2 as Es}from"./CollectionCarousel-qayOu3OX.js";import{k as Rs,l as Bs,e as qs,n as _s,f as Ws,A as Fs}from"./authorizations-9V7aWjZQ.js";import{p as _t,g as Ls,h as Ue}from"./buy-DEqsVztl.js";import{w as Ks,S as Ge,b as Ns,G as Qs}from"./buy-gasless-C6HcNbUA.js";import{u as Us,M as Gs,R as je,r as Hs,c as Os,g as Ds,a as Vs,p as Wt,b as He}from"./useCreditPacks-C44m9MGN.js";import{i as Ys,a as Js}from"./errors-BRe26Jfh.js";import{E as Xs}from"./ErrorNotice-D7e9fD_T.js";import"./dcl-schemas-DomYdfSu.js";import"./sentry-DYLA9B0R.js";import"./ethers-lJUVMKsu.js";import"./intl-AKLEHPeO.js";import"./sendMetaTransaction-BlBggQ5M.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},d=new r.Error().stack;d&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[d]="fb3836f6-4cf7-439f-8ab0-796241a08830",r._sentryDebugIdIdentifier="sentry-dbid-fb3836f6-4cf7-439f-8ab0-796241a08830")}catch{}})();const Zs=i.div`
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  gap: 12px;
@@ -745,4 +745,4 @@ import{j as e,L as Ut,r as T,b as fa,a as ma}from"./react-jpAgvPLt.js";import{s
745
745
  margin-top: 0;
746
746
  }
747
747
  `;function Ve(r){if(Ys(r))return a("errors.rejected");const d=(r.message??"").toLowerCase();return d.includes("insufficient")?a("cart.error.insufficient",{currency:Me.name}):d.includes("no active listing")||d.includes("your own listing")?a("cart.error.listingChanged"):a("marketCheckout.error.generic")}const si=12e4;function ni(r){const d=[];return r.unavailable.length&&d.push(a("cart.drop.unavailable",{count:r.unavailable.length})),r.own.length&&d.push(a("cart.drop.own",{count:r.own.length})),a("cart.drop.removed",{items:d.join(` ${a("cart.drop.and")} `)})}const Ye=r=>r.reduce((d,k)=>d+k.priceCredits*k.quantity,0),Se=r=>r.flatMap(d=>Array.from({length:d.quantity},()=>({...d,quantity:1})));function bi(){var Ct;wa({title:a("nav.cart"),noindex:!0});const r=O(t=>t.items),d=O(t=>t.remove),k=O(t=>t.increment),$=O(t=>t.decrement),R=O(t=>t.clear),U=O(t=>t.restore),H=O(t=>t.setFittingOpen),A=jt(t=>t.items),J=jt(t=>t.toggle),{session:n,signIn:G}=Ca(),Jt=ja(),ge=Us().packs.slice(0,Gs);T.useEffect(()=>(document.body.classList.add("shop-cart-bg"),()=>document.body.classList.remove("shop-cart-bg")),[]);const Xt=r.some(t=>t.category!=="emote"),{data:Ae}=ka({queryKey:["upsell-listings"],queryFn:()=>Ka({first:40}),staleTime:6e4}),{data:j}=$a(n),b=Sa(),X=fa(),{state:B}=ma(),[Zt,le]=T.useState(null),[Ze,xe]=T.useState(null),[ea,q]=T.useState(!1),[_,D]=T.useState(null),et=T.useRef(0),[h,S]=T.useState(null),{data:fe}=Ma(n),{data:de}=Ta(!0),[ze,tt]=T.useState(""),ue=T.useRef(null),at=Ia(r),st=t=>$t(at[t.id]),Ee=r.filter(st),nt=r.length>0&&Ee.length===0,ta=Ee.reduce((t,s)=>t+s.priceCredits*s.quantity,0),aa=r.reduce((t,s)=>t+s.quantity,0),sa=Ee.reduce((t,s)=>t+s.quantity,0),it=_?_.liveTotalCredits:ta,na=new Set(r.map(t=>t.id)),rt=((Ae==null?void 0:Ae.items)??[]).filter(t=>!na.has(t.id)).slice(0,12),ia=new Map(_==null?void 0:_.buyable.map(t=>[t.item.id,t])),me=(j==null?void 0:j.credits)??0,Re=it*10,ra=de?kt(Re,de):0n,Be=Qe({priceCents:Re,priceManaWei:ra,balanceCents:(j==null?void 0:j.balanceCents)??0,manaBalanceWei:fe??0n}),oa=t=>t.flatMap(s=>{const c=He(s);return c.kind==="store"?[c.mint]:[]}),ca=t=>t.flatMap(s=>s.acquisition==="trade"?[s.trade]:[]),la=Ba,da=t=>_a(t.contractAddress,String(t.itemId));function ye(t){t(),D(null),xe(null),le(null)}function ua(){S(null),q(!1)}function ot(t){const s=Ye(t),c=Math.max(0,s-me),o=ge.find(u=>u.credits>=c)??ge[ge.length-1];tt(o.id),V("Shop Buy Credits Prompted",{from:"cart_checkout",credits_needed:s,credits_balance:me,shortfall:c}),S({phase:"nofunds",lines:t.map(u=>({item:u.item,priceCredits:u.priceCredits,quantity:u.quantity})),shortfall:c}),q(!1)}async function qe(t){if(!n||t.length===0)return;const s=Se(t),c=s.map(m=>({...m.item,priceCredits:m.priceCredits})),o=t.map(m=>({...m.item,priceCredits:m.priceCredits,quantity:m.quantity})),u=[];let v="authorize";const g=new Set,M=new Set,L=new Set,W=[];let w=!1;S({phase:"processing",stage:"reserving",step:1,total:s.length});try{const m=[],z=Ds(s,_t);let K=0;for(const p of z){S({phase:"processing",stage:"reserving",step:K+1,total:s.length});try{const{credit:f,maxCreditedValue:y}=await Wa(n.identity,p.units.map(Vs));p.units.forEach((Q,ie)=>{u.push({salt:f.id,itemId:Q.item.id}),m.push({...p.drafts[ie],credits:[f],maxCreditedValue:y})}),K+=p.units.length}catch(f){if(Js(f)){if(u.length){try{await Ne(n.identity,[...new Set(u.map(y=>y.salt))])}catch(y){re(y,{flow:"cart_checkout",step:"release"})}b.invalidateQueries({queryKey:["usd-balance"]})}ot(t);return}throw f}}u.length&&b.invalidateQueries({queryKey:["usd-balance"]}),v="submit";const N=Ls(m).length,te=p=>N>1?{current:p,total:N}:void 0,F=(p,f)=>S({phase:"processing",stage:p,step:s.length,total:s.length,signatures:te(f)}),C=p=>p<N?F("awaiting-signature",p+1):F("settling",N);F("awaiting-signature",1);let x=[];const I=new Map,se=async p=>{const f=await Promise.allSettled(p.map(y=>Ks(y)));return f.forEach((y,Q)=>{const ie=I.get(p[Q])??[];y.status==="fulfilled"?(ie.forEach(We=>M.add(We)),W.push(p[Q])):y.reason instanceof Ge||ie.forEach(We=>L.add(We))}),f.flatMap(y=>y.status==="rejected"?[y.reason]:[])};if(Rs())try{let p=0;x=await Ns({purchases:m,buyer:n.address,signer:n.signer,identity:n.identity,onSigned:()=>F("settling",Math.min(p+1,N)),onBroadcast:({txHash:y,salts:Q})=>{p+=1,I.set(y,Q),Q.forEach(ie=>g.add(ie))},onGroupSettling:({settled:y})=>F("settling",y)});const f=await se(x);if(f.length&&!f.some(y=>y instanceof Ge))throw f[0];w=!0}catch(p){if(p instanceof Ge)throw await se([...I.keys()]),p;if(!(p instanceof Qs)||!Fa(n.providerType))throw p;x=await Ue({purchases:m,buyer:n.address,signer:n.signer,onSigned:C,onBroadcast:({salts:f})=>f.forEach(y=>g.add(y)),onSettled:({txHash:f,salts:y})=>{y.forEach(Q=>M.add(Q)),W.push(f)},onReverted:({salts:f})=>f.forEach(y=>L.add(y))})}else x=await Ue({purchases:m,buyer:n.address,signer:n.signer,onSigned:C,onBroadcast:({salts:p})=>p.forEach(f=>g.add(f)),onSettled:({txHash:p,salts:f})=>{f.forEach(y=>M.add(y)),W.push(p)},onReverted:({salts:p})=>p.forEach(f=>L.add(f))});t.forEach(p=>d(p.item.id)),D(null),V("Shop Completed Purchase",{...we(c),payment_type:"credits",no_crypto_step:w,transaction_hash:x[0]??null}),Bt(b);const ve=ue.current;ue.current=null,S(null),q(!1);const ne={items:o,txHash:x[0]??void 0,txHashes:x,settled:!0,...ve?{creditsAdded:ve}:{}};X("/success",{state:ne,replace:!0})}catch(m){Ce(m)||re(m,{flow:"cart_checkout",step:v,cart_size:t.length});const z=new Set([...g].filter(x=>!L.has(x))),{toRelease:K,boughtItemIds:N}=Wt({reservations:u,spent:z,settled:M}),te=[...z].some(x=>!M.has(x)),F=c.filter(x=>N.includes(x.id)),C=c.filter(x=>!N.includes(x.id));if(V(Ce(m)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:v,error_code:Tt(m),value_usd:St(C.reduce((x,I)=>x+I.priceCredits,0)),cart_size:s.length,partial:F.length>0}),K.length)try{await Ne(n.identity,K)}catch(x){re(x,{flow:"cart_checkout",step:"release"})}if(b.invalidateQueries({queryKey:["usd-balance"]}),F.length>0){N.forEach(x=>d(x)),D(null),Bt(b),V("Shop Completed Purchase",{...we(F),payment_type:"credits",no_crypto_step:w,transaction_hash:W[0]??null,partial:!0}),S({phase:"error",message:a("cart.error.partiallyBought"),heldCredits:te}),q(!1);return}S({phase:"error",message:te?void 0:Ve(m),heldCredits:te})}}function ct(t,s){b.invalidateQueries({queryKey:["usd-balance"]}),b.invalidateQueries({queryKey:["detail-trade"]}),b.invalidateQueries({queryKey:["shop-item"]}),b.invalidateQueries({queryKey:["owned-token"]}),b.invalidateQueries({queryKey:["public-token"]}),b.invalidateQueries({queryKey:["item-resales"]}),b.invalidateQueries({queryKey:["shop-items"]}),b.invalidateQueries({queryKey:["catalog-items"]}),b.invalidateQueries({queryKey:["my-assets"]}),b.invalidateQueries({queryKey:["purchases"]}),b.invalidateQueries({queryKey:["owned-item-count"]}),b.invalidateQueries({queryKey:["overview-listings"]}),b.invalidateQueries({queryKey:["upsell-listings"]});const c=ue.current;ue.current=null,S(null),q(!1);const o={items:t,txHash:s[0]??void 0,txHashes:s,settled:!0,...c?{creditsAdded:c}:{}};X("/success",{state:o,replace:!0})}function lt(t,s){Ce(t)||re(t,{flow:s,step:"submit"}),V(Ce(t)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:Tt(t)}),S({phase:"error",message:Ve(t)}),q(!1)}async function ha(t,s,c){const o=It(Pt.MANAToken,s),u=It(Pt.CreditsManager,s);await Ws({auth:{kind:Fs.Allowance,contractAddress:o.address,spenderAddress:u.address,chainId:s},signer:t,requiredWei:c})}async function dt(){if(de)return de;try{return await b.fetchQuery({queryKey:["mana-rate",Mt.chainId],queryFn:()=>qa(Mt.chainId),staleTime:6e4})}catch{return}}async function pa(t){const s=Se(t).reduce((v,g)=>v+g.usdCents,0),o=(fe??0n)>0n?await dt():de,u=o?kt(s,o):0n;return{totalCents:s,manaWei:u}}async function ut(t,s){const c=Ye(t),{totalCents:o,manaWei:u}=await pa(t),v=Qe({priceCents:o,priceManaWei:u,balanceCents:(j==null?void 0:j.balanceCents)??0,manaBalanceWei:fe??0n});if(s&&v.options.some(g=>g.method===s)){if(s==="credits"){qe(t);return}const g=xt(v,s);await pt(ht(s,t),g,()=>s==="mana"?void ft(t,g):void mt(t,o,u));return}if(v.options.some(g=>g.method==="mana"||g.method==="combined")){S({phase:"choose",lines:t,totalCents:o,manaWei:u}),q(!1);return}if(j!=null&&j.credits<c){ot(t);return}qe(t)}function _e(t){return Qe({priceCents:t.totalCents,priceManaWei:t.manaWei,balanceCents:(j==null?void 0:j.balanceCents)??0,manaBalanceWei:fe??0n})}const[he,be]=T.useState(null);function ht(t,s){const c=new Map;for(const o of s){const u=Is(t,He(o));c.set(`${u.chainId}:${u.spender.toLowerCase()}`,u)}return[...c.values()]}async function pt(t,s,c){const o=[];for(const{spender:u,chainId:v}of t){const g=Bs(v,u),M=n?await qs(g,n.address,s).catch(()=>!0):!0;_s(n==null?void 0:n.providerType,M)&&o.push(g)}if(o.length===0){c();return}q(!1),gt(o,0,c)}function gt(t,s,c){be({auth:t[s],index:s+1,total:t.length,run:()=>s+1<t.length?gt(t,s+1,c):c()})}function xt(t,s){var c;return((c=t.options.find(o=>o.method===s))==null?void 0:c.manaWei)??0n}function ga(t){if((h==null?void 0:h.phase)!=="choose")return;const{lines:s,totalCents:c,manaWei:o}=h;if(t==="credits"){qe(s);return}const u=xt(_e(h),t);pt(ht(t,s),u,()=>t==="mana"?void ft(s,u):void mt(s,c,o))}async function ft(t,s){if(!n||t.length===0)return;const c=Se(t),o=c.map(g=>({...g.item,priceCredits:g.priceCredits})),u=t.map(g=>({...g.item,priceCredits:g.priceCredits,quantity:g.quantity})),v=()=>S({phase:"processing",stage:"settling",step:c.length,total:c.length});S({phase:"processing",stage:"awaiting-signature",step:c.length,total:c.length});try{const g=await Ps({trades:ca(c),mints:oa(c),buyer:n.address,signer:n.signer,onSigned:v,manaWei:s});t.forEach(M=>d(M.item.id)),D(null),V("Shop Completed Purchase",{...we(o),payment_type:"mana",transaction_hash:g[0]??null}),b.invalidateQueries({queryKey:["mana-balance"]}),ct(u,g)}catch(g){lt(g,"buy_cart_mana")}}async function mt(t,s,c){if(!n||t.length===0)return;const o=Se(t),u=o.map(w=>({...w.item,priceCredits:w.priceCredits})),v=t.map(w=>({...w.item,priceCredits:w.priceCredits,quantity:w.quantity})),g=As(o.map(w=>w.usdCents),(j==null?void 0:j.balanceCents)??0),M=[],L=new Set,W=new Set;S({phase:"processing",stage:"reserving",step:1,total:o.length});try{const w=o.map(He),m=[],z=new Map,K=new Map;for(let C=0;C<o.length;C++){const x=o[C],I=w[C],se=g[C],ve=zs(Math.max(0,x.usdCents-se),s,c);let ne;if(se<=0)ne=qt(I,[],"0");else{S({phase:"processing",stage:"reserving",step:C+1,total:o.length});const f=x.item,{credit:y,maxCreditedValue:Q}=await La(n.identity,se,I.kind==="trade"?I.trade.id:void 0,f.contractAddress&&f.itemId!=null?{contractAddress:f.contractAddress,itemId:String(f.itemId)}:void 0);M.push({salt:y.id,itemId:f.id}),ne=qt(I,[y],Q)}const p=_t(ne);z.set(p,(z.get(p)??0n)+ve),K.has(p)||K.set(p,m.length),m.push(ne)}M.length&&b.invalidateQueries({queryKey:["usd-balance"]});for(const[C,x]of z){const I=K.get(C);I==null||x<=0n||(m[I]={...m[I],maxCreditedValue:(BigInt(m[I].maxCreditedValue)+x).toString()})}const N=[...z.values()].reduce((C,x)=>C+x,0n);await ha(n.signer,Es(w[0]),N);const te=()=>S({phase:"processing",stage:"settling",step:o.length,total:o.length});S({phase:"processing",stage:"awaiting-signature",step:o.length,total:o.length});const F=await Ue({purchases:m,buyer:n.address,signer:n.signer,onSigned:te,onBroadcast:({salts:C})=>C.forEach(x=>L.add(x)),onReverted:({salts:C})=>C.forEach(x=>W.add(x))});t.forEach(C=>d(C.item.id)),D(null),V("Shop Completed Purchase",{...we(u),payment_type:"credits_and_mana",transaction_hash:F[0]??null}),b.invalidateQueries({queryKey:["mana-balance"]}),ct(v,F)}catch(w){const{toRelease:m}=Wt({reservations:M,spent:new Set([...L].filter(z=>!W.has(z))),settled:new Set});m.length&&Ne(n.identity,m).catch(()=>{}),M.length&&b.invalidateQueries({queryKey:["usd-balance"]}),lt(w,"buy_cart_combined")}}async function Z(t){if(!n){Rt({type:"cart-checkout"}),G();return}const s=O.getState().items.filter(st);if(s.length===0)return;le(null),xe(null),q(!0);const c=s.reduce((o,u)=>o+u.priceCredits*u.quantity,0);V("Shop Started Checkout",{checkout_source:"cart",cart_size:s.length,cart_value_credits:c,cart_value_usd:St(c),has_sufficient_credits:me>=c});try{const o=await Hs(s,n.address,la,await dt(),da),u=[...o.unavailable,...o.own];if(u.length&&(u.forEach(v=>d(v.id)),xe(ni(o))),o.buyable.length===0){le(a("cart.error.noneAvailable")),D(null);return}if(o.orderChanged){D(o),et.current=Date.now();return}await ut(o.buyable,t)}catch(o){re(o,{flow:"cart_checkout",step:"review",cart_size:s.length}),le(Ve(o))}finally{q(!1)}}async function yt(){if(_){if(!n){Rt({type:"cart-checkout"}),G();return}if(Date.now()-et.current>si){D(null),xe(null),await Z();return}le(null),ut(_.buyable)}}async function xa(){if(ze){try{sessionStorage.setItem(je,JSON.stringify(O.getState().items))}catch{}q(!0);try{const t=await Os(ze,n?{address:n.address,identity:n.identity}:void 0);if(t.url){window.location.href=t.url;return}X("/credits")}catch(t){try{sessionStorage.removeItem(je)}catch{}re(t,{flow:"cart_buy_credits"}),S({phase:"error",message:a("buyModal.error.creditsCheckout")})}finally{q(!1)}}}const bt=T.useRef(!1);T.useEffect(()=>{if(!n||bt.current||!Ss("cart-checkout"))return;bt.current=!0;const t=setTimeout(()=>void Z(),0);return()=>clearTimeout(t)},[n]);const vt=T.useRef(!1);T.useEffect(()=>{if(!(B!=null&&B.resumeCheckout)||vt.current)return;vt.current=!0,ue.current=B.creditsAdded??null;try{const s=sessionStorage.getItem(je);if(s){sessionStorage.removeItem(je);const c=JSON.parse(s);Array.isArray(c)&&c.length&&U(c)}}catch{}b.invalidateQueries({queryKey:["usd-balance"]});const t=setTimeout(()=>void Z(),0);return()=>clearTimeout(t)},[B==null?void 0:B.resumeCheckout]);const wt=T.useRef(!1);T.useEffect(()=>{if(!(B!=null&&B.startCheckout)||wt.current)return;wt.current=!0,X(".",{replace:!0,state:null});const t=setTimeout(()=>void Z(),0);return()=>clearTimeout(t)},[B==null?void 0:B.startCheckout]);const ee=ea||(h==null?void 0:h.phase)==="processing";return r.length===0&&!h?e.jsx(Lt,{children:e.jsxs(Nt,{children:[e.jsxs(Kt,{onClick:()=>X(-1),type:"button",children:[e.jsx(Y,{name:"arrow-left"}),a("nav.cart")]}),e.jsx(bn,{children:e.jsx(Pa,{variant:"light",testId:"cart-empty",icon:Aa,title:a("cart.empty.title"),body:a("cart.empty.body"),cta:{label:a("cart.empty.cta"),to:"/items"}})})]})}):e.jsxs(Lt,{children:[e.jsxs(Nt,{children:[e.jsxs(Kt,{onClick:()=>X(-1),type:"button",children:[e.jsx(Y,{name:"arrow-left"}),a("nav.cart")]}),e.jsxs(xn,{children:[e.jsxs(fn,{children:[e.jsxs(mn,{children:[e.jsx(vn,{onClick:()=>X(-1),type:"button","aria-label":a("cart.goBack"),children:e.jsx(Y,{name:"arrow-left"})}),e.jsx(wn,{children:a("cart.panelTitle",{count:aa})}),Xt?e.jsxs(Cn,{onClick:()=>H(!0),disabled:ee,children:[e.jsx(Y,{name:"fitting-room"}),a("cart.fittingRoom")]}):null]}),e.jsxs(yn,{children:[e.jsx(jn,{children:r.map(t=>{const s=ia.get(t.id),c=s?s.priceCredits:t.priceCredits,o=!!s&&s.priceCredits!==t.priceCredits,u=!t.tokenId,v=t.quantity,g=typeof t.available=="number"&&v>=t.available,M=c*v,L=za(t),W=!!L&&!!A[L],w=Ea(t),m=at[t.id],z=!$t(m),K=m==="sold-out"?a("cart.availability.soldOut"):a("cart.availability.unavailable");return e.jsxs(kn,{"data-unavailable":z||void 0,children:[e.jsxs($n,{"data-thumb":!0,children:[w?e.jsx(Sn,{to:w,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(Mn,{"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(Tn,{children:[e.jsxs(In,{"data-desc":!0,children:[w?e.jsx(An,{to:w,state:{item:t,tradeId:t.tradeId},title:t.name,children:t.name}):e.jsx(Pn,{title:t.name,children:t.name}),t.creator?e.jsx(zn,{address:t.creator,linkToProfile:!0}):null,Jt&&u?e.jsxs(Nn,{"data-testid":"cart-creator-tag",children:[e.jsx(Qn,{name:"buy-from-creator"}),a("cart.creatorTag")]}):null]}),e.jsx(En,{children:z?e.jsxs(Ln,{children:[e.jsx(Kn,{name:"warning-fill",size:24}),K]}):e.jsxs(e.Fragment,{children:[u?e.jsxs(Rn,{children:[e.jsx(Qt,{onClick:()=>ye(()=>$(t.id)),disabled:ee||v<=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(Bn,{children:v}),e.jsx(Qt,{onClick:()=>ye(()=>k(t.id)),disabled:ee||g,"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(qn,{children:[e.jsx(_n,{})," ",e.jsx(Ke,{credits:M}),o?e.jsx(Wn,{children:e.jsx(Ke,{credits:t.priceCredits*v})}):null]})]})})]}),e.jsxs(Fn,{children:[L?e.jsx(Un,{"data-on":W||void 0,onClick:()=>J(t),"aria-label":W?a("cart.removeFromFavorites",{name:t.name}):a("cart.addToFavorites",{name:t.name}),title:W?a("assetCard.removeFromFavorites"):a("assetCard.addToFavorites"),children:e.jsx(Y,{name:W?"heart-solid":"heart"})}):null,e.jsx(Gn,{onClick:()=>ye(()=>d(t.id)),disabled:ee,"aria-label":a("cart.remove",{name:t.name}),title:a("cart.removeTitle"),children:e.jsx(Y,{name:"trash",size:24})})]})]},t.id)})}),e.jsx(Hn,{children:e.jsx("button",{className:"link",onClick:()=>ye(R),disabled:ee,children:a("cart.clearCart")})})]})]}),e.jsxs(On,{children:[e.jsx(Dn,{children:a("cart.purchaseSummary")}),e.jsxs(Vn,{children:[e.jsxs(Yn,{children:[e.jsx(Jn,{children:a("cart.totalItems",{count:sa})}),e.jsx(Zn,{children:e.jsxs(Xn,{children:[e.jsx(ei,{})," ",e.jsx(Ke,{credits:it})]})})]}),e.jsx(Ht,{options:Be.options,totalCents:Re,shortfall:Be.manaShortfall,showCreditsAmount:!1,creditsLabel:_?a("marketCheckout.confirmPurchase"):Be.options.length>1?a("cart.buyWithCredits"):a("cart.checkout"),busy:ee||nt,onPay:t=>void(_?yt():Z(t)),creditsFallback:{label:ee?a("cart.working"):_?a("marketCheckout.confirmPurchase"):a("cart.checkout"),onClick:()=>void(_?yt():Z())}}),nt?e.jsx($e,{className:"muted",children:a("cart.allUnavailable")}):null,n?null:e.jsx($e,{className:"muted",children:a("cart.signInHint")}),_?e.jsx($e,{className:"muted",children:a("cart.priceChanged")}):null,Ze?e.jsx($e,{className:"muted",children:Ze}):null,e.jsx(ti,{message:Zt})]})]})]})]}),rt.length>0?e.jsx(ai,{children:e.jsx(Ms,{title:a("cart.youMightAlsoLike"),items:rt})}):null,he&&n?e.jsx(Ts,{auth:he.auth,signer:n.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;be(null),t()},onCancel:()=>be(null),onClose:()=>be(null)}):null,h?e.jsx(un,{phase:h.phase,balanceCredits:me,heldCreditsCount:((Ct=j==null?void 0:j.held)==null?void 0:Ct.credits)??null,onClose:ua,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:Ra(n==null?void 0:n.providerType),signatures:h.phase==="processing"?h.signatures:void 0,options:h.phase==="choose"?_e(h).options:void 0,shortfall:h.phase==="choose"?_e(h).manaShortfall:void 0,onPay:ga,totalCents:h.phase==="choose"?h.totalCents:void 0,totalManaWei:h.phase==="choose"?h.manaWei:void 0,totalCredits:h.phase==="choose"?Ye(h.lines):void 0,lines:h.phase==="nofunds"?h.lines:void 0,shortfallCredits:h.phase==="nofunds"?h.shortfall:void 0,packs:ge,selectedPack:ze,onSelectPack:tt,onBuyPacks:()=>void xa(),message:h.phase==="error"?h.message:void 0,heldCredits:h.phase==="error"&&!!h.heldCredits,onRetry:()=>void Z()}):null]})}export{bi as Cart};
748
- //# sourceMappingURL=Cart-Dwe9BV_l.js.map
748
+ //# sourceMappingURL=Cart-DIZRo9El.js.map
@@ -1,4 +1,4 @@
1
- import{j as e,r as h,d as te,b as oe}from"./react-jpAgvPLt.js";import{t as b,s as u,h as se,I as re,n as ae,b as r,Z as q,w as F,bC as ie,bD as ne,c as ce,m as le,o as de,ar as ue,L as me,S as W,M as pe,bE as fe,bR as he}from"./index-BzcOLtVK.js";import{E as xe}from"./ErrorNotice-Dn6mBZT0.js";import{d as be,P as ge,C as ye,a as N,b as ve,S as je}from"./collectionPage.styles-DXpjCqco.js";import{u as we}from"./useStore-DCRztfDp.js";import{u as Ce,t as G,R as ke,j as Se,k as $e,l as Ee,m as Ne,n as Me,o as Fe,p as Ie,v as Re,q as Te,r as _e,M as Ae,s as Pe}from"./browseLayout.styles-CkyyQm-Z.js";import{L as De}from"./LoadMore-5CenCiPM.js";import{u as Le}from"./useInfiniteGrid-Dmt2BhNA.js";import{u as Be,s as ze}from"./search-empty-SNhvMEDl.js";import{S as Oe}from"./categories-Btqn8toI.js";import{G as We}from"./grid.styles-CQw2SW8V.js";import"./dcl-schemas-CGG1jvt5.js";import"./sentry-B_JVKDG7.js";import"./ethers-DsOeUsXW.js";import"./intl-AKLEHPeO.js";import"./crumbs.styles-BBVqDdKT.js";import"./skeleton.styles-C7n7Q1Xj.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},o=new s.Error().stack;o&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[o]="5c99c4be-4028-4edf-9d53-affc4c093cf4",s._sentryDebugIdIdentifier="sentry-dbid-5c99c4be-4028-4edf-9d53-affc4c093cf4")}catch{}})();const Ge=u.section`
1
+ import{j as e,r as h,d as te,b as oe}from"./react-CO8J9utQ.js";import{t as b,s as u,h as se,I as re,n as ae,b as r,Z as q,w as F,bC as ie,bD as ne,c as ce,m as le,o as de,ar as ue,L as me,S as W,M as pe,bE as fe,bR as he}from"./index-BRU8_4Hh.js";import{E as xe}from"./ErrorNotice-D7e9fD_T.js";import{d as be,P as ge,C as ye,a as N,b as ve,S as je}from"./collectionPage.styles-D8mS4okV.js";import{u as we}from"./useStore-AVB0bigD.js";import{u as Ce,t as G,R as ke,j as Se,k as $e,l as Ee,m as Ne,n as Me,o as Fe,p as Ie,v as Re,q as Te,r as _e,M as Ae,s as Pe}from"./browseLayout.styles-Bhm7l2yL.js";import{L as De}from"./LoadMore-CR1nt5IY.js";import{u as Le}from"./useInfiniteGrid-BpgyqBYU.js";import{u as Be,s as ze}from"./search-empty-CXyPZHgu.js";import{S as Oe}from"./categories-CwOJ2g25.js";import{G as We}from"./grid.styles-DM_pjmHa.js";import"./dcl-schemas-DomYdfSu.js";import"./sentry-DYLA9B0R.js";import"./ethers-lJUVMKsu.js";import"./intl-AKLEHPeO.js";import"./crumbs.styles-DuD2nYKt.js";import"./skeleton.styles-Duw3r1-f.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},o=new s.Error().stack;o&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[o]="5c99c4be-4028-4edf-9d53-affc4c093cf4",s._sentryDebugIdIdentifier="sentry-dbid-5c99c4be-4028-4edf-9d53-affc4c093cf4")}catch{}})();const Ge=u.section`
2
2
  position: relative;
3
3
  border-radius: ${b.radius.card};
4
4
  overflow: hidden;
@@ -131,4 +131,4 @@ import{j as e,r as h,d as te,b as oe}from"./react-jpAgvPLt.js";import{t as b,s a
131
131
  background: ${j.blackBtn};
132
132
  }
133
133
  `;function it({address:s}){var d,n;const{data:o}=q(s);if(!s)return null;const i=(o==null?void 0:o.name)||F(s),c=(n=(d=o==null?void 0:o.avatar)==null?void 0:d.snapshots)==null?void 0:n.face256,a=`${ce.profileUrl}/${s}`,m=ie(ne({name:o==null?void 0:o.name,hasClaimedName:o==null?void 0:o.hasClaimedName,ethAddress:(o==null?void 0:o.ethAddress)??s}));return e.jsxs(st,{"data-testid":"creator-card",children:[c?e.jsx(U,{src:c,alt:"",loading:"eager",style:{backgroundColor:m}}):e.jsx(U,{as:"span","aria-hidden":!0,style:{backgroundColor:m}}),e.jsx(rt,{title:i,children:i}),e.jsx(tt,{value:s,label:r("collection.copyAddress"),flow:"copy_creator_address",testId:"creator-card-copy",children:e.jsx("span",{children:F(s)})}),e.jsx(at,{"data-testid":"creator-card-view",href:a,target:"_blank",rel:"noopener noreferrer",children:r("collection.viewProfile")})]})}const nt=48,ct=["all","on_sale","not_for_sale"];function $t(){var O;const{contractAddress:s}=te(),o=oe(),i=h.useMemo(()=>({category:"all",status:"all",subCategory:null,rarities:[],priceMin:"",priceMax:"",smart:!1,sort:"newest"}),[]),[c,a]=Be(i),{category:m,subCategory:d,rarities:n,priceMin:x,priceMax:f,smart:C,sort:I}=c,g=ct.includes(c.status)?c.status:"all",R=t=>a({status:t});Ce(`${m}:${d??""}`);const[w,y]=h.useState(!1);h.useEffect(()=>{if(!w)return;const t=ee=>{ee.key==="Escape"&&y(!1)};document.addEventListener("keydown",t);const E=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",t),document.body.style.overflow=E}},[w]);const T=x&&!Number.isNaN(Number(x))?Number(x):void 0,_=f&&!Number.isNaN(Number(f))?Number(f):void 0,H=d?Oe[d]:void 0,K=(G.find(t=>t.key===I)??G[0]).server,A={contractAddress:s,category:m,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:k,total:Z,isLoading:S,error:P,hasNextPage:Q,isFetchingNextPage:D,isFetchNextPageError:V,fetchNextPage:J}=Le(["collection-page",A],t=>fe({...A,first:nt,skip:t}),{enabled:!!s}),{data:l}=le({queryKey:["collection-meta",s],queryFn:()=>he(s),enabled:!!s,staleTime:5*6e4}),L=(l==null?void 0:l.name)||r("collection.fallbackTitle");de({title:l==null?void 0:l.name,description:l!=null&&l.name?r("seo.collection.description",{name:l.name}):void 0});const p=(l==null?void 0:l.creator)||((O=k[0])==null?void 0:O.creator),{data:$}=q(p),X=($==null?void 0:$.name)||(p?F(p):"");function Y(t){a({category:t,subCategory:null})}function B(t){a({rarities:n.includes(t)?n.filter(E=>E!==t):[...n,t]})}function z(){a(i)}const v=[];(T!=null||_!=null)&&v.push({key:"price",label:r("filter.price"),onRemove:()=>{a({priceMin:"",priceMax:""})}});for(const t of ke)n.includes(t)&&v.push({key:`rarity-${t}`,label:ue(t),onRemove:()=>B(t)});return C&&v.push({key:"smart",label:r("filter.smart"),onRemove:()=>a({smart:!1})}),g!=="all"&&v.push({key:"status",label:g==="on_sale"?r("filter.onSale"):r("filter.notForSale"),onRemove:()=>R("all")}),e.jsxs(ge,{"data-testid":"collection-page",children:[e.jsxs(ye,{"aria-label":r("collection.breadcrumbAria"),children:[e.jsx(N,{onClick:()=>o("/items"),children:r("collection.breadcrumb")}),p?e.jsxs(e.Fragment,{children:[e.jsx("span",{children:"/"}),e.jsx(N,{onClick:()=>o(`/items/creator/${p}`),children:X}),e.jsx("span",{children:"/"}),e.jsx(N,{onClick:()=>o(`/items/creator/${p}?collections`),children:r("categories.collections")})]}):null,e.jsx("span",{children:"/"}),e.jsx(ve,{children:L})]}),e.jsx(Ze,{name:L,creator:p}),e.jsxs(Se,{"data-testid":"browse",children:[w?e.jsx($e,{onClick:()=>y(!1),"aria-hidden":!0}):null,e.jsxs(je,{children:[e.jsx(it,{address:p}),e.jsxs(Ee,{"data-open":w||void 0,"data-static":!0,"data-testid":"browse-sidebar",children:[e.jsxs(Ne,{children:[e.jsx(Me,{children:r("assets.filters")}),e.jsx(Fe,{onClick:()=>y(!1),"aria-label":r("assets.closeFilters"),children:"✕"})]}),e.jsx(Ie,{children:e.jsx(Re,{category:m,subCategory:d,onCategory:Y,onSub:t=>a({subCategory:t}),priceMin:x,priceMax:f,onPriceMin:t=>a({priceMin:t}),onPriceMax:t=>a({priceMax:t}),rarities:n,onToggleRarity:B,status:g,onStatus:R,smart:C,onSmart:t=>a({smart:t}),hideNames:!0})}),e.jsx(Te,{children:e.jsx(_e,{type:"button",onClick:()=>y(!1),children:r("assets.showItems")})})]})]}),e.jsxs(Ae,{children:[e.jsx(Pe,{sort:I,onSort:t=>a({sort:t}),total:Z,loading:S,onOpenFilters:()=>y(!0),chips:v,onClearChips:z}),P?e.jsx(xe,{message:r("collection.error")}):null,!S&&!P&&k.length===0?e.jsx(me,{testId:"collection-empty",icon:ze,title:r("assets.empty.title"),body:r("collection.empty"),cta:{label:r("filterBar.clearAll"),onClick:z}}):e.jsxs(e.Fragment,{children:[e.jsx(We,{"data-testid":"grid",children:S?e.jsx(W,{count:15}):e.jsxs(e.Fragment,{children:[k.map(t=>e.jsx(pe,{item:t},t.id)),D?e.jsx(W,{count:6}):null]})}),e.jsx(De,{hasNextPage:Q,isFetching:D,isError:V,onLoadMore:()=>void J()})]})]})]})]})}export{$t as Collection,$t as default};
134
- //# sourceMappingURL=Collection-MkFzHUcz.js.map
134
+ //# sourceMappingURL=Collection-CYfbROlU.js.map