@dcl/shop 1.9.3-32495537062.commit-4b3f64e → 1.9.3-32728193174.commit-a3b6c07

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 (234) hide show
  1. package/_assets/{Activity-DWErXnoG.js → Activity-Dm0dO2UR.js} +9 -9
  2. package/_assets/{AnimatedBackground-Bi_ZNPrR.js → AnimatedBackground-w2aXmoQq.js} +6 -6
  3. package/_assets/{Assets-Bm9m_x2b.js → Assets-NfL4oA5m.js} +14 -14
  4. package/_assets/{Authorizations-z2mO1b2b.js → Authorizations-DsHPQkZm.js} +2 -2
  5. package/_assets/{Cart-C4caiTwW.js → Cart-BoxMvmha.js} +2 -2
  6. package/_assets/{CircularProgress-nhJG5H4b.js → CircularProgress-Cc1MD1yB.js} +2 -2
  7. package/_assets/{Collection-DFn6jEth.js → Collection-BzHSn1CL.js} +3 -3
  8. package/_assets/{CollectionCarousel-CwBx4eRn.js → CollectionCarousel-Cmf4W8MU.js} +120 -120
  9. package/_assets/{Confetti-Decijdru.js → Confetti-OKFRNTpp.js} +4 -4
  10. package/_assets/{ConstantsUtil-Cra_bkL1.js → ConstantsUtil-Dcta2h-d.js} +2 -2
  11. package/_assets/{ContentClient-DKGhEgXy.js → ContentClient-CX_gSPW2.js} +2 -2
  12. package/_assets/{Creator-CswxQ6LD.js → Creator-A1le9Qw8.js} +9 -9
  13. package/_assets/{DeploymentBuilder-CNLiq2Oi.js → DeploymentBuilder-D-fEt3yi.js} +2 -2
  14. package/_assets/{EmotePlaybackBar-viwAJ495.js → EmotePlaybackBar-Vlv7Igss.js} +5 -5
  15. package/_assets/{ErrorNotice-CYAwTYLU.js → ErrorNotice-CBDZFAVu.js} +2 -2
  16. package/_assets/{ExchangeController-CD5-dSbC.js → ExchangeController-D24VhUyK.js} +2 -2
  17. package/_assets/{Faq-h5xtpvRB.js → Faq-CZvhCP1p.js} +2 -2
  18. package/_assets/{GetCredits-RrAF2H_B.js → GetCredits-DIEk9RdZ.js} +9 -9
  19. package/_assets/{Grow-Ca7HwRTp.js → Grow-CUZ2KWyq.js} +2 -2
  20. package/_assets/{HelpersUtil-BJ6r84TK.js → HelpersUtil-H1qidvUb.js} +2 -2
  21. package/_assets/{ItemDetail-Doz_Pu-P.js → ItemDetail-C9IfE3pI.js} +2 -2
  22. package/_assets/{LoadMore-BPpiXldG.js → LoadMore-DIb6xx_d.js} +2 -2
  23. package/_assets/{ManaPricingBanner.styles-Belo9roz.js → ManaPricingBanner.styles-BL9yfyU9.js} +6 -6
  24. package/_assets/{MyAssets-B7XoI2Ln.js → MyAssets-BMROKjAQ.js} +4 -4
  25. package/_assets/{MyFavorites-CBl-2zFL.js → MyFavorites-C8kCWWlQ.js} +2 -2
  26. package/_assets/{NetworkUtil-Co9cUNqJ.js → NetworkUtil-sAg1dUn7.js} +2 -2
  27. package/_assets/{NotFound-B3Qs9xW-.js → NotFound-LKGfaFaN.js} +2 -2
  28. package/_assets/{NotificationsBell-7HthTzrx.js → NotificationsBell-DiAEzuJB.js} +2 -2
  29. package/_assets/{OutfitDetail-DTf8kmup.js → OutfitDetail-BqoUHtuh.js} +2 -2
  30. package/_assets/OutfitPreview-z7rwGvWe.js +7 -0
  31. package/_assets/{OutfitStudio-BT-swDyc.js → OutfitStudio-BtkB_gIv.js} +2 -2
  32. package/_assets/{StoreSettings-BRKnXgWV.js → StoreSettings-BF0Ro3Zg.js} +22 -22
  33. package/_assets/{Success--ZC3bjcu.js → Success-BJM7tqkO.js} +2 -2
  34. package/_assets/{SwapController-JZU1t_q6.js → SwapController-P-3HtdUM.js} +2 -2
  35. package/_assets/{TradeService-CFUGHrQd.js → TradeService-BJokYFbI.js} +2 -2
  36. package/_assets/{W3MFrameProviderSingleton-BnH_E1kT.js → W3MFrameProviderSingleton-D7l7kP_B.js} +4 -4
  37. package/_assets/{WebCryptoP256-iK7ppmQU.js → WebCryptoP256-Bw3HSgmQ.js} +2 -2
  38. package/_assets/authorizations-DRvMaw3F.js +2 -0
  39. package/_assets/{basic-Dt5X1JGI.js → basic-ChRj0F7z.js} +2 -2
  40. package/_assets/{biconomy-XbHYt574.js → biconomy-LH02gXZ3.js} +2 -2
  41. package/_assets/{browseLayout.styles-D96b8vY4.js → browseLayout.styles-CxyoQw4D.js} +2 -2
  42. package/_assets/{browser-BvaC8Ot5.js → browser-CvKc6KZ5.js} +2 -2
  43. package/_assets/{browser-ponyfill-CQHa8RWT.js → browser-ponyfill-D4GeAT6b.js} +2 -2
  44. package/_assets/{builder-B2wSSJjY.js → builder-D2ePNso8.js} +2 -2
  45. package/_assets/buy-DUn7KFQP.js +2 -0
  46. package/_assets/{buy-gasless-CE0-H487.js → buy-gasless-CFKb7tEe.js} +2 -2
  47. package/_assets/{categories-MN5mCyH2.js → categories-QGxmYBHt.js} +2 -2
  48. package/_assets/{ccip-DSU_WQmX.js → ccip-MJGLlt3C.js} +2 -2
  49. package/_assets/{ccip-tWVaTipE.js → ccip-eH-x3oBJ.js} +2 -2
  50. package/_assets/{chains-CDYI3IM5.js → chains-C4wQrAFB.js} +2 -2
  51. package/_assets/collectionPage.styles-uia3brFh.js +40 -0
  52. package/_assets/{common-BtCoQcin.js → common-BcfR4HfI.js} +2 -2
  53. package/_assets/{controller-DkGp9b_f.js → controller-Bse_kTm5.js} +3 -3
  54. package/_assets/{core-L9gvijT8.js → core-BLozSnzB.js} +5 -5
  55. package/_assets/{createSvgIcon-C8sQA4lI.js → createSvgIcon-C5jHgbqh.js} +6 -6
  56. package/_assets/{custom-B6mbPqbQ.js → custom--4pqSbtz.js} +2 -2
  57. package/_assets/{data-capture-V56TJR76.js → data-capture-8hbAY-86.js} +2 -2
  58. package/_assets/{dcl-schemas-R5THIzlU.js → dcl-schemas-Dl-k4VpC.js} +2 -2
  59. package/_assets/{decimals-CHLw9Iw2.js → decimals-C2P4FFP8.js} +2 -2
  60. package/_assets/{decimals-2ZNvVlro.js → decimals-UARkiEd7.js} +2 -2
  61. package/_assets/{detectExtension-C_WyqisC.js → detectExtension-CudrD1yZ.js} +2 -2
  62. package/_assets/{disposePreview-B6hgPdBs.js → disposePreview-_bOR6h0Q.js} +2 -2
  63. package/_assets/{email-C3uEYFr_.js → email-BsdlDlrH.js} +2 -2
  64. package/_assets/{embedded-wallet-BhmVMjpl.js → embedded-wallet-mS9fntil.js} +2 -2
  65. package/_assets/{emotion-styled.browser.esm-DspSDSIa.js → emotion-styled.browser.esm-C6EH34aE.js} +2 -2
  66. package/_assets/{engine-Bgo5ZX5y.js → engine-An26ZFzK.js} +2 -2
  67. package/_assets/{errors-DCouue4C.js → errors-BDvs-eCk.js} +2 -2
  68. package/_assets/{estimate-l1-fee-DcEkKsCz.js → estimate-l1-fee-t6Ag8l2L.js} +2 -2
  69. package/_assets/{eth_estimateGas-CBvse6vc.js → eth_estimateGas-bE2x2e20.js} +2 -2
  70. package/_assets/{eth_getStorageAt-8wY1-CzV.js → eth_getStorageAt-DPIXamAU.js} +2 -2
  71. package/_assets/{eth_getTransactionCount-BecQPx9O.js → eth_getTransactionCount-Dx7_wrUZ.js} +2 -2
  72. package/_assets/{ethereum-CfEbuV4R.js → ethereum-BJIBECD-.js} +2 -2
  73. package/_assets/{ethers-CUiF5uXN.js → ethers-Dq9su_9o.js} +2 -2
  74. package/_assets/{events-BQTzxgVG.js → events-Bcll2zcr.js} +2 -2
  75. package/_assets/{execute-CKC06Jt8.js → execute-DHrn_0bC.js} +3 -3
  76. package/_assets/{extractIPFS-mEEmvaQL.js → extractIPFS-LnEaUDUd.js} +2 -2
  77. package/_assets/{features-it-aCGx-.js → features-CU9XxKJA.js} +2 -2
  78. package/_assets/{fetchTokenMetadata-V1GTBa_Q.js → fetchTokenMetadata-BGzxhXqQ.js} +3 -3
  79. package/_assets/{field.styles-DwE32JYQ.js → field.styles-CpgReEMz.js} +2 -2
  80. package/_assets/{fortmatic-Dkqs4j6d.js → fortmatic-Bf_VL2f9.js} +2 -2
  81. package/_assets/{get-bytecode-C7IGKwo-.js → get-bytecode-DqX1Al_W.js} +2 -2
  82. package/_assets/{get-ecosystem-wallet-info-Df7w3wEq.js → get-ecosystem-wallet-info-CmTbkxOn.js} +2 -2
  83. package/_assets/{getBalance-C9CAa_6l.js → getBalance-BURUBgCK.js} +3 -3
  84. package/_assets/{getInstalledModules-C--_8s8a.js → getInstalledModules-dyocB5Xp.js} +2 -2
  85. package/_assets/{getNFT-B92RLrY4.js → getNFT-9rokRcrH.js} +2 -2
  86. package/_assets/{getNFT-Cz3tT2Ff.js → getNFT-CcMW8HCX.js} +3 -3
  87. package/_assets/{grid.styles-D311Q8GR.js → grid.styles-BTAyUGJl.js} +2 -2
  88. package/_assets/{hashTypedData-BJQTyGsM.js → hashTypedData-B3ytET7v.js} +2 -2
  89. package/_assets/{hashTypedData-TAgumUHu.js → hashTypedData-QtYhVmQf.js} +2 -2
  90. package/_assets/{in-app-BxCpBmZh.js → in-app-D8_Iw0RN.js} +2 -2
  91. package/_assets/{in-app-wallet-calls-_aHHkEzw.js → in-app-wallet-calls-Cu_014LQ.js} +2 -2
  92. package/_assets/{index-BZkJXucS.js → index-27_Tbm5h.js} +2 -2
  93. package/_assets/{index-EMT4O8Nt.js → index-8qlmShPZ.js} +2 -2
  94. package/_assets/{index-DIleAf3C.js → index-B06TJSil.js} +2 -2
  95. package/_assets/{index-DAYou4hS.js → index-B1BKkuYE.js} +2 -2
  96. package/_assets/{index-CoJa8tNh.js → index-B6in1fcC.js} +3 -3
  97. package/_assets/{index-ClC31BHC.js → index-BAHp_tAL.js} +2 -2
  98. package/_assets/{index-C7iYKZUj.js → index-BCQbBnkt.js} +2 -2
  99. package/_assets/{index-B_HPXnbd.js → index-BLIyqPsL.js} +2 -2
  100. package/_assets/{index-BsyVRGj2.js → index-BMJd00wv.js} +2 -2
  101. package/_assets/{index-C6Ypgr3l.js → index-BORbfC-5.js} +4 -4
  102. package/_assets/{index-DsLCaMV7.js → index-BSg8VZvV.js} +13 -13
  103. package/_assets/{index-v2l7Irsy.js → index-BTYJcGce.js} +2 -2
  104. package/_assets/{index-eho6x0GI.js → index-BUOASSo6.js} +2 -2
  105. package/_assets/{index-2p9clekp.js → index-BVTS9Y31.js} +2 -2
  106. package/_assets/{index-DFAMIlO1.js → index-BaPAaulu.js} +2 -2
  107. package/_assets/{index-DS7H5aDK.js → index-Bb3xz4xb.js} +2 -2
  108. package/_assets/{index-sYVzylkf.js → index-BcNp5DoC.js} +2 -2
  109. package/_assets/{index-BOqR76jL.js → index-BdxgTeua.js} +6 -6
  110. package/_assets/{index-bY3kQcGs.js → index-BfAWbSkl.js} +2 -2
  111. package/_assets/{index-DZi6vCKV.js → index-BjtAQkLO.js} +3 -3
  112. package/_assets/{index-wzigLAYd.js → index-BkZvJF2l.js} +2 -2
  113. package/_assets/{index-lS-7AJyG.js → index-BpN5fwuS.js} +3 -3
  114. package/_assets/{index-BnRsxUTH.js → index-BrWlv3uP.js} +2 -2
  115. package/_assets/{index-Cmsb__rT.js → index-BvUT88f1.js} +2 -2
  116. package/_assets/{index-CSNTL6wb.js → index-Bzzh1cDv.js} +2 -2
  117. package/_assets/{index-CdzMJMCm.js → index-C5tIkAaa.js} +2 -2
  118. package/_assets/{index-CcJ5W3zK.js → index-CE1b4AeN.js} +2 -2
  119. package/_assets/{index-CBk3biEW.js → index-CIiwqcHD.js} +2 -2
  120. package/_assets/{index-ChgEFkID.js → index-CKyFwJ-h.js} +2 -2
  121. package/_assets/{index-BoHxnXAi.js → index-CTq7n-ms.js} +2 -2
  122. package/_assets/{index-BTnsc5e9.js → index-CUw_0m5M.js} +13 -13
  123. package/_assets/{index-CrAcUSLM.js → index-CVNmiv2K.js} +2 -2
  124. package/_assets/{index-D3Na_Dh4.js → index-CZixjTys.js} +2 -2
  125. package/_assets/{index-DyyTwmpW.js → index-CaxOc8Iz.js} +2 -2
  126. package/_assets/{index-DPF2ELZ4.js → index-Cc8RObdg.js} +2 -2
  127. package/_assets/{index-eoSXlQKf.js → index-Cdg6ULro.js} +2 -2
  128. package/_assets/{index-Bth4ie0r.js → index-CdmTk-RT.js} +3 -3
  129. package/_assets/{index-B0-jp1MR.js → index-CdxSNVxA.js} +2 -2
  130. package/_assets/{index-B3XTiWfO.js → index-CpA7kzxj.js} +2 -2
  131. package/_assets/{index-C0kJwfxZ.js → index-CpzhsPu_.js} +2 -2
  132. package/_assets/{index-DL3cpWqR.js → index-Cx6QEpJx.js} +2 -2
  133. package/_assets/{index-D9XwwJWD.js → index-D0dt_S-T.js} +4 -4
  134. package/_assets/{index-D4MkEK6W.js → index-D1ZSjMqq.js} +2 -2
  135. package/_assets/{index-Bwy_HhfH.js → index-D4y2KTTW.js} +2 -2
  136. package/_assets/{index-D3pDtf-r.js → index-DAF9lyy2.js} +2 -2
  137. package/_assets/{index-CEQABEF_.js → index-DRuyZsQo.js} +2 -2
  138. package/_assets/{index-BPTaE6ud.js → index-DTr7cro8.js} +3 -3
  139. package/_assets/index-DX35iaxI.js +2 -0
  140. package/_assets/{index-DhTc4qG3.js → index-DXbhtZbn.js} +2 -2
  141. package/_assets/{index-CVTPkoXG.js → index-DZvOfVu-.js} +2 -2
  142. package/_assets/{index-DmF0vwFf.js → index-D_aLFv0x.js} +2 -2
  143. package/_assets/{index-iKDkGBG5.js → index-DdzRMswS.js} +2 -2
  144. package/_assets/{index-CICsqLb7.js → index-Dkx9pn51.js} +2 -2
  145. package/_assets/{index-DZeFUwxM.js → index-DltEBNsV.js} +4 -4
  146. package/_assets/{index-DNQTtwwG.js → index-DmF9QU3H.js} +2 -2
  147. package/_assets/{index-CHif1dyu.js → index-Dp-ToJpj.js} +2 -2
  148. package/_assets/{index-DOQpdgdm.js → index-Dqfo0XqR.js} +2 -2
  149. package/_assets/{index-Do8hcDMw.js → index-DyDHHeNX.js} +2 -2
  150. package/_assets/{index-DXoV3ecr.js → index-Lgts1qwz.js} +2 -2
  151. package/_assets/{index-CNzqjMcQ.js → index-Uhdv3n13.js} +2 -2
  152. package/_assets/{index-vdjTOzg_.js → index-dYSAmFJ7.js} +2 -2
  153. package/_assets/{index-DW_lLoQU.js → index-fZKlJKep.js} +2 -2
  154. package/_assets/{index-BWBKr-zT.js → index-g4s7zuQI.js} +2 -2
  155. package/_assets/{index-BLeQJZWq.js → index-tsqLV9oO.js} +2 -2
  156. package/_assets/{index-7umWvCDe.js → index-uqnvC7l7.js} +2 -2
  157. package/_assets/{index-Cb4UGBWV.js → index-uwQLkrl6.js} +2 -2
  158. package/_assets/{index-lu_VAe-4.js → index-xa2uYCGd.js} +2 -2
  159. package/_assets/{index.es-Jeut0jjZ.js → index.es-00XRDWBM.js} +2 -2
  160. package/_assets/{index.es-B6BSgw1Z.js → index.es-6c-Ctz__.js} +2 -2
  161. package/_assets/{index.es-lOiMfIH0.js → index.es-B4VsPPfg.js} +2 -2
  162. package/_assets/{index.es-DLUz1-d2.js → index.es-B9zzQzkV.js} +5 -5
  163. package/_assets/{items-empty-DiS1_SCG.js → items-empty-ANVELue6.js} +2 -2
  164. package/_assets/{jump-D5MaL3yK.js → jump-C4ZFP74_.js} +2 -2
  165. package/_assets/{linkAccount-D5u83eIC.js → linkAccount-DP8gL9lV.js} +2 -2
  166. package/_assets/{localBatchGatewayRequest-sy7OIJ0B.js → localBatchGatewayRequest-NPQW8p4h.js} +2 -2
  167. package/_assets/{native-BVqh2SsO.js → native-C9GEAS3b.js} +2 -2
  168. package/_assets/{networks-Cw1IyIox.js → networks-C8GQvzxn.js} +2 -2
  169. package/_assets/{onramp-DY9fhg8x.js → onramp-BuNrplw5.js} +2 -2
  170. package/_assets/{openzeppelin-CvN6jJ7C.js → openzeppelin-0j8T8Jdq.js} +2 -2
  171. package/_assets/{ownerOf-DTeQ3rbo.js → ownerOf-DkDXUvho.js} +2 -2
  172. package/_assets/{parseNft-DGCRi9OQ.js → parseNft-CKQzh2mW.js} +3 -3
  173. package/_assets/{parseSignature-BkU6aTfx.js → parseSignature-B-JBxh9x.js} +2 -2
  174. package/_assets/{parseSignature-MC882UjP.js → parseSignature-Bt2mdHJm.js} +4 -4
  175. package/_assets/{passkeys-Q8sF6RTK.js → passkeys-BDfdVc1D.js} +2 -2
  176. package/_assets/{pay-with-exchange-cOj83FVY.js → pay-with-exchange-Cqe8PaI-.js} +2 -2
  177. package/_assets/{prepare-contract-call-BhRNh7Au.js → prepare-contract-call-DqRF2ZX_.js} +2 -2
  178. package/_assets/{qr-overlay-Bwj1ydp_.js → qr-overlay-vGhmbaMe.js} +4 -4
  179. package/_assets/{react-DsDsjqAs.js → react-tQZQlQ39.js} +2 -2
  180. package/_assets/{receive-DLpHUwGV.js → receive-7CHKFYlu.js} +2 -2
  181. package/_assets/{resolveImplementation-STpHoraq.js → resolveImplementation-D4dQhhYM.js} +2 -2
  182. package/_assets/{resume-buy-6We253DL.js → resume-buy-DzFS6fo6.js} +2 -2
  183. package/_assets/{rpc-B4AsVlaK.js → rpc-CLABf_bn.js} +2 -2
  184. package/_assets/{sales-empty-DHh_uP3J.js → sales-empty-BqxwjlKJ.js} +2 -2
  185. package/_assets/{search-empty-MI095Wg1.js → search-empty-Cfm_CM4N.js} +2 -2
  186. package/_assets/{secp256k1-Decs88Fo.js → secp256k1-DN11xd9l.js} +2 -2
  187. package/_assets/{secp256k1-CshEyu2g.js → secp256k1-DtszAauU.js} +2 -2
  188. package/_assets/{secp256k1-CuC6ieAM.js → secp256k1-IICsLZZt.js} +2 -2
  189. package/_assets/{send-5To8If8-.js → send-Dw6_OrFk.js} +2 -2
  190. package/_assets/{send-batch-transaction-CCcWJ9b1.js → send-batch-transaction-DHsrfZgH.js} +2 -2
  191. package/_assets/{send-eip712-transaction-COz0J_0Y.js → send-eip712-transaction-D7Q8fGQ5.js} +3 -3
  192. package/_assets/{send-gasless-transaction-Dkd_pGRV.js → send-gasless-transaction-CaNouBbf.js} +3 -3
  193. package/_assets/{send-transaction-C_oJlWQQ.js → send-transaction-Cew9Apoj.js} +3 -3
  194. package/_assets/sendMetaTransaction-BQlYsIba.js +2 -0
  195. package/_assets/{sendRawTransaction-BfhYBZ4D.js → sendRawTransaction-Dh1HrrCC.js} +4 -4
  196. package/_assets/{sentry-Bo5AM9lU.js → sentry-n8d7aKnp.js} +3 -3
  197. package/_assets/{serializeTransaction-uYkTf444.js → serializeTransaction-loNQYfV-.js} +2 -2
  198. package/_assets/{session-proposal-BGkA2NKO.js → session-proposal-BV9Tk31d.js} +2 -2
  199. package/_assets/{session-request-CcqkNiLD.js → session-request-B6ZYZxAf.js} +3 -3
  200. package/_assets/{sha256-BJjzJgE2.js → sha256-Cy3kEBfL.js} +2 -2
  201. package/_assets/{signing-BkaQdh-F.js → signing-Lhe8_ZSh.js} +4 -4
  202. package/_assets/{skeleton.styles-x-kJirI8.js → skeleton.styles-qVf1vDb1.js} +2 -2
  203. package/_assets/{socials-CDSMMTVo.js → socials-D1q1x5Cj.js} +2 -2
  204. package/_assets/{styled-B-GFNFFF.js → styled-BZvgZykb.js} +3 -3
  205. package/_assets/{swaps-B3nEJqdL.js → swaps-C24qFtPN.js} +2 -2
  206. package/_assets/{thirdweb-BCVgyan2.js → thirdweb-_zGUEbgR.js} +4 -4
  207. package/_assets/{to-serializable-transaction-ChOvm_xu.js → to-serializable-transaction-BrADTD6-.js} +3 -3
  208. package/_assets/{totalSupply-B8Hxyv3N.js → totalSupply-CLFw9GT0.js} +2 -2
  209. package/_assets/{transaction-Cbl1Q4He.js → transaction-Dp-Kf3I5.js} +2 -2
  210. package/_assets/{transactionReceipt-B_XS2efd.js → transactionReceipt-BRQexWxf.js} +2 -2
  211. package/_assets/{transactions-D_Dx3lL7.js → transactions-afWqQ-2T.js} +2 -2
  212. package/_assets/{useCreditPacks-0pkvd2Tt.js → useCreditPacks-DXToQd7k.js} +2 -2
  213. package/_assets/useInfiniteGrid-gXlJd6gK.js +2 -0
  214. package/_assets/{useStore-DzWyl7-U.js → useStore-Bu1zMllB.js} +3 -3
  215. package/_assets/{useTheme-D88KFRdA.js → useTheme-D2heyDeZ.js} +2 -2
  216. package/_assets/{utils-CsRnLCEP.js → utils-DuiWcMn5.js} +2 -2
  217. package/_assets/{verifyHash-Bzbh_Hdq.js → verifyHash-kw8AQVx5.js} +2 -2
  218. package/_assets/{w3m-modal-qhNxMiKI.js → w3m-modal-6CpW32M3.js} +2 -2
  219. package/_assets/{w3m-modal-B0dQd7lO.js → w3m-modal-HWlQarQE.js} +2 -2
  220. package/_assets/{wait-for-tx-receipt-B_ak9jAY.js → wait-for-tx-receipt-BlxDch1i.js} +2 -2
  221. package/_assets/{wallets-CuKcpbWz.js → wallets-BWPy3arI.js} +6 -6
  222. package/_assets/{web-connector-Cl1KOeqv.js → web-connector-viwwKEfv.js} +4 -4
  223. package/_assets/{writeContract-i3X5PRyK.js → writeContract-CDWIf_zJ.js} +2 -2
  224. package/_assets/{zora-sepolia-YLHY_SZt.js → zora-sepolia-C3s9boeJ.js} +2 -2
  225. package/_assets/{zoraTestnet-CIwe9ea3.js → zoraTestnet--z9T8lQF.js} +2 -2
  226. package/index.html +11 -11
  227. package/package.json +2 -2
  228. package/_assets/OutfitPreview-BxOkx3ec.js +0 -7
  229. package/_assets/authorizations-U-zuQc7g.js +0 -2
  230. package/_assets/buy-CQ1dwjTs.js +0 -2
  231. package/_assets/collectionPage.styles-BEvZWozs.js +0 -40
  232. package/_assets/index-nYNwcllY.js +0 -2
  233. package/_assets/sendMetaTransaction-DF7zEAn4.js +0 -2
  234. package/_assets/useInfiniteGrid-CQfjuTWX.js +0 -2
@@ -1,5 +1,5 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["_assets/index-DsLCaMV7.js","_assets/react-DsDsjqAs.js","_assets/index-BTnsc5e9.js","_assets/dcl-schemas-R5THIzlU.js","_assets/sentry-Bo5AM9lU.js","_assets/ethers-CUiF5uXN.js","_assets/intl-AKLEHPeO.js","_assets/index-CKGO8NWe.css","_assets/sales-empty-DHh_uP3J.js","_assets/buy-CQ1dwjTs.js","_assets/authorizations-U-zuQc7g.js","_assets/sendMetaTransaction-DF7zEAn4.js","_assets/ManaPricingBanner.styles-Belo9roz.js","_assets/Faq-h5xtpvRB.js","_assets/field.styles-DwE32JYQ.js"])))=>i.map(i=>d[i]);
2
- import{Y as we,bP as Ie,o as U,l as A,bQ as Ae,t as o,s as l,m as Ee,n as Le,b as r,N as Ne,I as T,bR as se,bS as ne,bT as $e,_ as Pe,P as Te,q as E,aq as K,bU as Se,r as Ce,aK as B,E as Fe,bV as De,w as N,bW as Me,bX as Q}from"./index-BTnsc5e9.js";import{r as g,u as He,j as t,e as qe,L as Re}from"./react-DsDsjqAs.js";import{u as Oe,s as _e}from"./sales-empty-DHh_uP3J.js";import{L as ze}from"./LoadMore-BPpiXldG.js";import{u as $}from"./useInfiniteGrid-CQfjuTWX.js";import{m as de}from"./mana-matic-CEqvSwrJ.js";import{n as We}from"./name-glyph-aUugT8vq.js";import"./dcl-schemas-R5THIzlU.js";import"./sentry-Bo5AM9lU.js";import"./ethers-CUiF5uXN.js";import"./intl-AKLEHPeO.js";import"./buy-CQ1dwjTs.js";import"./authorizations-U-zuQc7g.js";import"./sendMetaTransaction-DF7zEAn4.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]="183fb2b6-46c4-4eca-a634-e9f5de1953e5",e._sentryDebugIdIdentifier="sentry-dbid-183fb2b6-46c4-4eca-a634-e9f5de1953e5")}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 Ye(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 Ze(e){return e.status!=="EXPIRED"||!!e.submittedTxHash}function Je(e){const n=Ke(e.purchases.filter(Ze)).map(c=>({kind:"purchase",id:`purchase:${c.id}`,createdAt:c.createdAt,order:c})),i=e.sales.map(c=>{const m=Ye(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.9.3-32495537062.commit-4b3f64e/_assets/credits-product-vs4Q6u6l.svg",X=Ee`
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["_assets/index-BSg8VZvV.js","_assets/react-tQZQlQ39.js","_assets/index-CUw_0m5M.js","_assets/dcl-schemas-Dl-k4VpC.js","_assets/sentry-n8d7aKnp.js","_assets/ethers-Dq9su_9o.js","_assets/intl-AKLEHPeO.js","_assets/index-CKGO8NWe.css","_assets/sales-empty-BqxwjlKJ.js","_assets/buy-DUn7KFQP.js","_assets/authorizations-DRvMaw3F.js","_assets/sendMetaTransaction-BQlYsIba.js","_assets/ManaPricingBanner.styles-BL9yfyU9.js","_assets/Faq-CZvhCP1p.js","_assets/field.styles-CpgReEMz.js"])))=>i.map(i=>d[i]);
2
+ import{Y as we,bQ as Ie,o as U,l as A,bR as Ae,t as o,s as l,m as Ee,n as Le,b as r,N as Ne,I as T,bS as se,bT as ne,bU as $e,_ as Pe,P as Te,q as E,as as K,bV as Se,r as Ce,aM as B,E as Fe,bW as De,w as N,bX as Me,bY as Q}from"./index-CUw_0m5M.js";import{r as g,u as He,j as t,e as Re,L as qe}from"./react-tQZQlQ39.js";import{u as Oe,s as _e}from"./sales-empty-BqxwjlKJ.js";import{L as ze}from"./LoadMore-DIb6xx_d.js";import{u as $}from"./useInfiniteGrid-gXlJd6gK.js";import{m as de}from"./mana-matic-CEqvSwrJ.js";import{n as We}from"./name-glyph-aUugT8vq.js";import"./dcl-schemas-Dl-k4VpC.js";import"./sentry-n8d7aKnp.js";import"./ethers-Dq9su_9o.js";import"./intl-AKLEHPeO.js";import"./buy-DUn7KFQP.js";import"./authorizations-DRvMaw3F.js";import"./sendMetaTransaction-BQlYsIba.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]="1945ca0a-c79f-4098-9350-016c7eeff00c",e._sentryDebugIdIdentifier="sentry-dbid-1945ca0a-c79f-4098-9350-016c7eeff00c")}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 Ye(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 Ze(e){return e.status!=="EXPIRED"||!!e.submittedTxHash}function Je(e){const n=Ke(e.purchases.filter(Ze)).map(c=>({kind:"purchase",id:`purchase:${c.id}`,createdAt:c.createdAt,order:c})),i=e.sales.map(c=>{const m=Ye(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.9.3-32728193174.commit-a3b6c07/_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`
@@ -157,7 +157,7 @@ import{Y as we,bP as Ie,o as U,l as A,bQ as Ae,t as o,s as l,m as Ee,n as Le,b a
157
157
  height: 30px;
158
158
  display: block;
159
159
  }
160
- `,q=l.span`
160
+ `,R=l.span`
161
161
  font-size: 11px;
162
162
  font-weight: 700;
163
163
  text-transform: uppercase;
@@ -281,7 +281,7 @@ import{Y as we,bP as Ie,o as U,l as A,bQ as Ae,t as o,s as l,m as Ee,n as Le,b a
281
281
  outline: 2px solid ${o.colors.accent};
282
282
  outline-offset: -2px;
283
283
  }
284
- `,R=l.div`
284
+ `,q=l.div`
285
285
  width: 52px;
286
286
  height: 52px;
287
287
  border-radius: 10px;
@@ -357,11 +357,11 @@ import{Y as we,bP as Ie,o as U,l as A,bQ as Ae,t as o,s as l,m as Ee,n as Le,b a
357
357
  @media (prefers-reduced-motion: reduce) {
358
358
  animation: none;
359
359
  }
360
- `,bt=l.div`
360
+ `,yt=l.div`
361
361
  display: flex;
362
362
  flex-direction: column;
363
363
  align-items: center;
364
- `,yt=l.div`
364
+ `,bt=l.div`
365
365
  display: flex;
366
366
  flex-direction: column;
367
367
  align-items: center;
@@ -377,7 +377,7 @@ import{Y as we,bP as Ie,o as U,l as A,bQ as Ae,t as o,s as l,m as Ee,n as Le,b a
377
377
  `,jt=l.p`
378
378
  margin: 0;
379
379
  color: ${o.colors.softWhite};
380
- `,kt=l(R)`
380
+ `,kt=l(q)`
381
381
  background: ${o.gradients.amethyst};
382
382
 
383
383
  img {
@@ -385,5 +385,5 @@ import{Y as we,bP as Ie,o as U,l as A,bQ as Ae,t as o,s as l,m as Ee,n as Le,b a
385
385
  height: 26px;
386
386
  object-fit: contain;
387
387
  }
388
- `,J=L.withComponent(Re),wt=g.lazy(()=>Pe(()=>import("./index-DsLCaMV7.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?qe.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(Y,{}):t.jsx(R,{children:c?t.jsx("img",{src:c,alt:h}):t.jsx(T,{name:"cart",size:20})}),t.jsxs(O,{children:[a?t.jsx(Z,{}):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(J,{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(O,{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(q,{"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(Y,{}):t.jsx(R,{children:d?t.jsx("img",{src:d,alt:i}):t.jsx(T,{name:"offer",size:20})}),t.jsxs(O,{children:[n?t.jsx(Z,{}):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(q,{"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(J,{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(Y,{}):t.jsx(R,{children:a?t.jsx("img",{src:a,alt:d}):t.jsx(T,{name:"offer",size:20})}),t.jsxs(O,{children:[i?t.jsx(Z,{}):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(q,{"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(J,{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(q,{"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}=Oe(),{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(Je({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-DWErXnoG.js.map
388
+ `,J=L.withComponent(qe),wt=g.lazy(()=>Pe(()=>import("./index-BSg8VZvV.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?Re.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(Y,{}):t.jsx(q,{children:c?t.jsx("img",{src:c,alt:h}):t.jsx(T,{name:"cart",size:20})}),t.jsxs(O,{children:[a?t.jsx(Z,{}):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(J,{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(O,{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(R,{"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(Y,{}):t.jsx(q,{children:d?t.jsx("img",{src:d,alt:i}):t.jsx(T,{name:"offer",size:20})}),t.jsxs(O,{children:[n?t.jsx(Z,{}):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(R,{"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(J,{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(Y,{}):t.jsx(q,{children:a?t.jsx("img",{src:a,alt:d}):t.jsx(T,{name:"offer",size:20})}),t.jsxs(O,{children:[i?t.jsx(Z,{}):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(R,{"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(J,{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(R,{"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(yt,{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}=Oe(),{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",y=$(["purchases",e==null?void 0:e.address],u=>$e(e.address,e.identity,{first:P,skip:u}),{enabled:p}),b=$(["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(bt,{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(Je({purchases:p?y.items:[],sales:x?b.items:[],creditOrders:p?v.items:[],manaPurchases:p?j.items:[],rate:fe}),s),ye=p&&(y.isLoading||v.isLoading||j.isLoading)||x&&b.isLoading,ie=p&&(y.isFetchingNextPage||v.isFetchingNextPage||j.isFetchingNextPage)||x&&b.isFetchingNextPage,be=p&&(y.hasNextPage||v.hasNextPage||j.hasNextPage)||x&&b.hasNextPage;function ve(){p&&y.hasNextPage&&y.fetchNextPage(),p&&v.hasNextPage&&v.fetchNextPage(),p&&j.hasNextPage&&j.fetchNextPage(),x&&b.hasNextPage&&b.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,{})}):ye?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:be,isFetching:ie,onLoadMore:ve})]})]})}export{Bt as Activity};
389
+ //# sourceMappingURL=Activity-Dm0dO2UR.js.map
@@ -1,4 +1,4 @@
1
- import{r as u,j as d}from"./react-DsDsjqAs.js";import{s as f}from"./index-BTnsc5e9.js";import"./dcl-schemas-R5THIzlU.js";import"./sentry-Bo5AM9lU.js";import"./ethers-CUiF5uXN.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]="e6f688c4-9de5-4d7f-933b-fac78e71a416",e._sentryDebugIdIdentifier="sentry-dbid-e6f688c4-9de5-4d7f-933b-fac78e71a416")}catch{}})();const D="https://cdn.decentraland.org/@dcl/shop/1.9.3-32495537062.commit-4b3f64e/_assets/custom-welcome-background-BxlFQma9.webp",P="https://cdn.decentraland.org/@dcl/shop/1.9.3-32495537062.commit-4b3f64e/_assets/DCL_LogoPattern-BryBPc3d.png",L=`
1
+ import{r as u,j as d}from"./react-tQZQlQ39.js";import{s as m}from"./index-CUw_0m5M.js";import"./dcl-schemas-Dl-k4VpC.js";import"./sentry-n8d7aKnp.js";import"./ethers-Dq9su_9o.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]="276bed55-8b71-49a2-b482-f2e804511295",e._sentryDebugIdIdentifier="sentry-dbid-276bed55-8b71-49a2-b482-f2e804511295")}catch{}})();const D="https://cdn.decentraland.org/@dcl/shop/1.9.3-32728193174.commit-a3b6c07/_assets/custom-welcome-background-BxlFQma9.webp",P="https://cdn.decentraland.org/@dcl/shop/1.9.3-32728193174.commit-a3b6c07/_assets/DCL_LogoPattern-BryBPc3d.png",L=`
2
2
  attribute vec2 a_position;
3
3
  varying vec2 v_uv;
4
4
  void main() {
@@ -77,11 +77,11 @@ void main() {
77
77
 
78
78
  gl_FragColor = result;
79
79
  }
80
- `;function p(e,a,n){const r=e.createShader(a);return r?(e.shaderSource(r,n),e.compileShader(r),e.getShaderParameter(r,e.COMPILE_STATUS)?r:(console.error("Shader compile error:",e.getShaderInfoLog(r)),e.deleteShader(r),null)):null}function B(e,a,n){const r=e.createProgram();return r?(e.attachShader(r,a),e.attachShader(r,n),e.linkProgram(r),e.getProgramParameter(r,e.LINK_STATUS)?r:(console.error("Program link error:",e.getProgramInfoLog(r)),e.deleteProgram(r),null)):null}function F(e,a,n){const r=e.createTexture();if(!r)return null;e.bindTexture(e.TEXTURE_2D,r),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,1,1,0,e.RGBA,e.UNSIGNED_BYTE,new Uint8Array([128,128,128,255]));const o=new Image;return o.crossOrigin="anonymous",o.onload=()=>{n!=null&&n()||(e.bindTexture(e.TEXTURE_2D,r),e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,!0),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,o),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.REPEAT),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.REPEAT),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR_MIPMAP_LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR),e.generateMipmap(e.TEXTURE_2D))},o.src=a,r}const C=f.div`
80
+ `;function p(e,a,n){const r=e.createShader(a);return r?(e.shaderSource(r,n),e.compileShader(r),e.getShaderParameter(r,e.COMPILE_STATUS)?r:(console.error("Shader compile error:",e.getShaderInfoLog(r)),e.deleteShader(r),null)):null}function B(e,a,n){const r=e.createProgram();return r?(e.attachShader(r,a),e.attachShader(r,n),e.linkProgram(r),e.getProgramParameter(r,e.LINK_STATUS)?r:(console.error("Program link error:",e.getProgramInfoLog(r)),e.deleteProgram(r),null)):null}function F(e,a,n){const r=e.createTexture();if(!r)return null;e.bindTexture(e.TEXTURE_2D,r),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,1,1,0,e.RGBA,e.UNSIGNED_BYTE,new Uint8Array([128,128,128,255]));const o=new Image;return o.crossOrigin="anonymous",o.onload=()=>{n!=null&&n()||(e.bindTexture(e.TEXTURE_2D,r),e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,!0),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,o),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.REPEAT),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.REPEAT),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR_MIPMAP_LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR),e.generateMipmap(e.TEXTURE_2D))},o.src=a,r}const C=m.div`
81
81
  position: absolute;
82
82
  inset: 0;
83
83
  overflow: hidden;
84
- `,k=f.div`
84
+ `,k=m.div`
85
85
  position: absolute;
86
86
  inset: 0;
87
87
  width: 100%;
@@ -89,10 +89,10 @@ void main() {
89
89
  background-size: cover;
90
90
  background-position: center;
91
91
  background-repeat: no-repeat;
92
- `,V=f.canvas`
92
+ `,V=m.canvas`
93
93
  position: absolute;
94
94
  inset: 0;
95
95
  width: 100%;
96
96
  height: 100%;
97
- `;function K({patternTiling:e=1.66}){const a=u.useRef(null),n=u.useRef(0),r=u.useRef(e);return r.current=e,u.useEffect(()=>{var _;const o=a.current;if(!o||(_=window.matchMedia)!=null&&_.call(window,"(prefers-reduced-motion: reduce)").matches)return;const t=o.getContext("webgl",{alpha:!1,antialias:!1});if(!t)return;const c=p(t,t.VERTEX_SHADER,L),s=p(t,t.FRAGMENT_SHADER,I);if(!c||!s){c&&t.deleteShader(c),s&&t.deleteShader(s);return}const i=B(t,c,s);if(!i){t.deleteShader(c),t.deleteShader(s);return}const m=t.getAttribLocation(i,"a_position"),R=t.getUniformLocation(i,"u_time"),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-Bi_ZNPrR.js.map
97
+ `;function K({patternTiling:e=1.66}){const a=u.useRef(null),n=u.useRef(0),r=u.useRef(e);return r.current=e,u.useEffect(()=>{var _;const o=a.current;if(!o||(_=window.matchMedia)!=null&&_.call(window,"(prefers-reduced-motion: reduce)").matches)return;const t=o.getContext("webgl",{alpha:!1,antialias:!1});if(!t)return;const c=p(t,t.VERTEX_SHADER,L),s=p(t,t.FRAGMENT_SHADER,I);if(!c||!s){c&&t.deleteShader(c),s&&t.deleteShader(s);return}const i=B(t,c,s);if(!i){t.deleteShader(c),t.deleteShader(s);return}const f=t.getAttribLocation(i,"a_position"),R=t.getUniformLocation(i,"u_time"),b=t.getUniformLocation(i,"u_resolution"),w=t.getUniformLocation(i,"u_overlayTex"),A=t.getUniformLocation(i,"u_overlayTiling"),v=t.createBuffer();t.bindBuffer(t.ARRAY_BUFFER,v),t.bufferData(t.ARRAY_BUFFER,new Float32Array([-1,-1,1,-1,-1,1,-1,1,1,-1,1,1]),t.STATIC_DRAW);let g=!1;const h=F(t,P,()=>g),S=()=>{const l=window.devicePixelRatio||1,E=o.clientWidth*l,x=o.clientHeight*l;(o.width!==E||o.height!==x)&&(o.width=E,o.height=x)},U=performance.now()/1e3,y=()=>{S(),t.viewport(0,0,o.width,o.height),t.useProgram(i),t.uniform1f(R,performance.now()/1e3-U),t.uniform2f(b,o.width,o.height),t.uniform1f(A,r.current),t.activeTexture(t.TEXTURE0),t.bindTexture(t.TEXTURE_2D,h),t.uniform1i(w,0),t.enableVertexAttribArray(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-w2aXmoQq.js.map
@@ -1,4 +1,4 @@
1
- import{r as u,b as He,j as e,u as et}from"./react-DsDsjqAs.js";import{u as tt,s as nt}from"./search-empty-MI095Wg1.js";import{u as st,t as Ie,R as it,j as ot,k as rt,l as at,m as lt,n as ct,o as dt,p as ht,v as pt,q as ut,r as ft,M as mt,s as xt}from"./browseLayout.styles-D96b8vY4.js";import{c as V,X as gt,aP as bt,aQ as yt,aW as wt,a as jt,l as vt,cq as Ct,cr as $t,s as i,t,o as Oe,aE as kt,r as St,E as je,b as n,p as Et,I as E,q as O,cs as le,aC as Tt,af as oe,aM as Ne,aU as Rt,aT as _t,n as De,N as Ge,Y as qe,Z as It,at as Nt,P as Lt,S as Le,Q as X,b2 as zt,bN as At}from"./index-BTnsc5e9.js";import{L as Mt}from"./LoadMore-BPpiXldG.js";import{u as Wt}from"./useInfiniteGrid-CQfjuTWX.js";import{n as Pt,S as Bt}from"./categories-MN5mCyH2.js";import{E as Ft}from"./ErrorNotice-CYAwTYLU.js";import{d as Ut}from"./dcl-schemas-R5THIzlU.js";import{s as Ht,G as Ot,w as Dt,S as Gt}from"./buy-gasless-CE0-H487.js";import{s as qt,j as Vt}from"./buy-CQ1dwjTs.js";import{f as Qt}from"./errors-DCouue4C.js";import{J as Zt,C as Kt,B as ve}from"./ethers-CUiF5uXN.js";import{n as Xt}from"./name-glyph-aUugT8vq.js";import{G as Jt}from"./grid.styles-D311Q8GR.js";import"./skeleton.styles-x-kJirI8.js";import"./sentry-Bo5AM9lU.js";import"./intl-AKLEHPeO.js";import"./authorizations-U-zuQc7g.js";import"./sendMetaTransaction-DF7zEAn4.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]="912910ce-5f49-4c94-b87c-e6e3a88d19b6",s._sentryDebugIdIdentifier="sentry-dbid-912910ce-5f49-4c94-b87c-e6e3a88d19b6")}catch{}})();function J(s){const o=s.source??"item",r=s.tradeId||`${s.contractAddress}-${s.tokenId??s.itemId??""}`;return`${o}:${r}`}const Q="100000000000000000000",Ve=2,re=15,Yt=/^[a-zA-Z0-9]+$/;function ze(s){const o=s.trim();return o.length===0?{ok:!1,reason:"empty"}:Yt.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 en(s){return s.replace(/[^a-zA-Z0-9]/g,"").slice(0,re)}const tn=["function available(string _subdomain) view returns (bool)"],Ae={mainnet:{rpc:"https://rpc.decentraland.org/mainnet",address:"0x2a187453064356c898cae034eaed119e1663acb8"},sepolia:{rpc:"https://rpc.decentraland.org/sepolia",address:"0x7518456ae93eb98f3e64571b689c626616bb7f30"}};function nn(){return V.chainId===Number(Ut.ChainId.MATIC_MAINNET)?Ae.mainnet:Ae.sepolia}async function sn(s,o={}){var m;const{rpc:r,address:d}=nn(),h=new Zt(r),f=new Kt(d,tn,h);console.info(`[names] availability check → DCLRegistrar(${d}).available("${s}") on ${r}`);const l=await f.available(s);if((m=o.signal)!=null&&m.aborted)throw new DOMException("Aborted","AbortError");return console.info(`[names] "${s}" available=${l}`),l?"available":"taken"}const on="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 rn(s){return wt(Q,s)}async function an(s,o,r={}){var m;const d=r.chainId??V.chainId,h=r.provider??"across",f=`${V.creditsServerUrl}/credits-name-route?name=${encodeURIComponent(o)}&chainId=${d}&provider=${h}`,l=await jt(f,{method:"GET",identity:s,metadata:{}});if(!l.ok){let c;try{c=(m=await l.json())==null?void 0:m.code}catch{}throw c==="ROUTE_COST_TOO_HIGH"?new ke:new Error(`fetchNameCreditRoute ${l.status}`)}return l.json()}function ln(s,o){const r=ve.from(s.availableAmount),h=ve.from(Q).sub(r);return{credits:[{value:s.amount,expiresAt:Number(s.expiresAt),salt:Vt(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:Q}}async function cn(s,o={}){const r=on,d=o.intervalMs??1e4,h=o.maxAttempts??60;let f={status:"pending",destinationTxHash:null,actionsSucceeded:null};for(let l=0;l<h;l++){try{const m=await fetch(`${r}/deposit/status?originChainId=137&depositTxHash=${s}`);if(m.ok){const c=await m.json(),g=(c.status??"pending").toLowerCase(),p=c.fillTx??c.fillTxnRef??null,b=typeof c.actionsSucceeded=="boolean"?c.actionsSucceeded:null;if(g==="filled")return{status:"filled",destinationTxHash:p,actionsSucceeded:b};if(g==="refunded"||g==="expired")return{status:g,destinationTxHash:null,actionsSucceeded:!1};f={status:"pending",destinationTxHash:p,actionsSucceeded:b}}}catch{}l<h-1&&await new Promise(m=>setTimeout(m,d))}return f}async function dn(s){const{name:o,identity:r,signer:d}=s,h=p=>{var b;try{(b=s.onProgress)==null||b.call(s,p)}catch{}},f=s.chainId??V.chainId,l=s.provider??"across",m=(s.beneficiary??await d.getAddress()).toLowerCase();let c=null,g="unconfirmed";console.info("[names] register start",{name:o,buyer:m,chainId:f,provider:l}),h("preparing");try{const p=await gt(f),b=rn(p);console.info("[names] step 1/6 sized reservation",{usdCents:b,manaRate:p});const C=await an(r,o,{chainId:f,provider:l});console.info("[names] step 2/6 route fetched",{target:C.externalCall.target,selector:C.externalCall.selector,provider:C.provider,quoteId:C.quoteId});const w=await bt(r,b,void 0,void 0,o);if(c=w.credit.id,console.info("[names] step 3/6 credit authorized",{creditId:w.credit.id,maxCreditedValue:w.maxCreditedValue}),ve.from(w.maxCreditedValue).lt(Q))throw new Error("Credit under-sized for the name price");h("awaiting-confirmation");const $=ln(w.credit,C);let j;try{j=await Ht({chainId:f,buyer:m,signer:d,args:$})}catch(x){if(!(x instanceof Ot))throw x;if(x.reason==="relayer-unreachable"){g="unobservable";const k=new $e;throw k.cause=x,k}j=await qt(f,$,d)}if(console.info("[names] step 4/6 useCredits submitted (Polygon origin tx)",{originTxHash:j}),h("confirming"),await Dt(j),g="confirmed",console.info("[names] step 5/6 origin tx confirmed",{originTxHash:j}),l==="across"){h("registering");const x=await cn(j,s.acrossPoll);if(console.info("[names] step 6/6 across status",x),x.status==="pending")return{status:"pending",originTxHash:j};if(x.status==="filled"&&x.actionsSucceeded===null)return console.warn("[names] across filled without reporting actionsSucceeded — reporting pending",{originTxHash:j}),{status:"pending",originTxHash:j};if(x.status!=="filled"||x.actionsSucceeded!==!0)throw new Ce;return{status:"registered",originTxHash:j,destinationTxHash:x.destinationTxHash}}return{status:"pending",originTxHash:j}}catch(p){if(console.error("[names] register failed — raw error:",p,{name:o,buyer:m,originState:g}),p instanceof Gt)return{status:"pending",originTxHash:p.txHash};if(c&&g==="unconfirmed"&&await yt(r,[c]).catch(()=>{}),p instanceof ke||p instanceof Ce||p instanceof $e)throw p;const b=new Error(Qt(p,"Couldn't register the name. Please try again.",{sale:!0}));throw b.cause=p,b}}function hn(){const{data:s}=vt({queryKey:["feature-flag","shop-names"],queryFn:()=>Ct($t.SHOP_NAMES),staleTime:6e4,refetchOnWindowFocus:!0,retry:1});return s===!0}const pn=60,un=700,fn=25;function mn(s){if(!s)return[];const o=[];for(let r=1;r<=s.length;r++)o.push({text:s.slice(0,r),delay:pn});o[o.length-1]={text:s,delay:un};for(let r=s.length-1;r>=1;r--)o.push({text:s.slice(0,r),delay:fn});return o}function xn(s){return s.flatMap(mn)}function gn(s,o){const r=u.useMemo(()=>xn(s),[s]),[d,h]=u.useState(0);return u.useEffect(()=>{if(!o||r.length===0)return;const f=setTimeout(()=>h(l=>(l+1)%r.length),r[d%r.length].delay);return()=>clearTimeout(f)},[d,o,r]),!o||r.length===0?"":r[d%r.length].text}const bn="https://cdn.decentraland.org/@dcl/shop/1.9.3-32495537062.commit-4b3f64e/_assets/name-verified-oGwQ3ntb.svg",yn="#34fee6",wn=i.div`
1
+ import{r as u,b as Oe,j as e,u as et}from"./react-tQZQlQ39.js";import{u as tt,s as nt}from"./search-empty-Cfm_CM4N.js";import{u as st,t as Ie,R as it,j as ot,k as at,l as rt,m as lt,n as ct,o as dt,p as ht,v as pt,q as ut,r as ft,M as mt,s as xt}from"./browseLayout.styles-CxyoQw4D.js";import{c as V,X as gt,aR as bt,aS as yt,aX as wt,a as jt,l as vt,cr as Ct,cs as $t,s as i,t,o as He,aG as kt,r as St,E as je,b as n,p as Et,I as E,q as H,ct as le,aE as Tt,ah as oe,aO as Ne,aV as Rt,aU as _t,n as De,N as Ge,Y as qe,Z as It,av as Nt,P as Lt,S as Le,Q as X,b3 as zt,bO as At}from"./index-CUw_0m5M.js";import{L as Mt}from"./LoadMore-DIb6xx_d.js";import{u as Wt}from"./useInfiniteGrid-gXlJd6gK.js";import{n as Pt,S as Bt}from"./categories-QGxmYBHt.js";import{E as Ft}from"./ErrorNotice-CBDZFAVu.js";import{d as Ut}from"./dcl-schemas-Dl-k4VpC.js";import{s as Ot,G as Ht,w as Dt,S as Gt}from"./buy-gasless-CFKb7tEe.js";import{s as qt,j as Vt}from"./buy-DUn7KFQP.js";import{f as Zt}from"./errors-BDvs-eCk.js";import{J as Qt,C as Kt,B as ve}from"./ethers-Dq9su_9o.js";import{n as Xt}from"./name-glyph-aUugT8vq.js";import{G as Jt}from"./grid.styles-BTAyUGJl.js";import"./skeleton.styles-qVf1vDb1.js";import"./sentry-n8d7aKnp.js";import"./intl-AKLEHPeO.js";import"./authorizations-DRvMaw3F.js";import"./sendMetaTransaction-BQlYsIba.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]="58b9b1bf-51a6-49fc-9a20-daee1f8925f6",s._sentryDebugIdIdentifier="sentry-dbid-58b9b1bf-51a6-49fc-9a20-daee1f8925f6")}catch{}})();function J(s){const o=s.source??"item",a=s.tradeId||`${s.contractAddress}-${s.tokenId??s.itemId??""}`;return`${o}:${a}`}const Z="100000000000000000000",Ve=2,ae=15,Yt=/^[a-zA-Z0-9]+$/;function ze(s){const o=s.trim();return o.length===0?{ok:!1,reason:"empty"}:Yt.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 en(s){return s.replace(/[^a-zA-Z0-9]/g,"").slice(0,ae)}const tn=["function available(string _subdomain) view returns (bool)"],Ae={mainnet:{rpc:"https://rpc.decentraland.org/mainnet",address:"0x2a187453064356c898cae034eaed119e1663acb8"},sepolia:{rpc:"https://rpc.decentraland.org/sepolia",address:"0x7518456ae93eb98f3e64571b689c626616bb7f30"}};function nn(){return V.chainId===Number(Ut.ChainId.MATIC_MAINNET)?Ae.mainnet:Ae.sepolia}async function sn(s,o={}){var m;const{rpc:a,address:d}=nn(),h=new Qt(a),f=new Kt(d,tn,h);console.info(`[names] availability check → DCLRegistrar(${d}).available("${s}") on ${a}`);const l=await f.available(s);if((m=o.signal)!=null&&m.aborted)throw new DOMException("Aborted","AbortError");return console.info(`[names] "${s}" available=${l}`),l?"available":"taken"}const on="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 an(s){return wt(Z,s)}async function rn(s,o,a={}){var m;const d=a.chainId??V.chainId,h=a.provider??"across",f=`${V.creditsServerUrl}/credits-name-route?name=${encodeURIComponent(o)}&chainId=${d}&provider=${h}`,l=await jt(f,{method:"GET",identity:s,metadata:{}});if(!l.ok){let c;try{c=(m=await l.json())==null?void 0:m.code}catch{}throw c==="ROUTE_COST_TOO_HIGH"?new ke:new Error(`fetchNameCreditRoute ${l.status}`)}return l.json()}function ln(s,o){const a=ve.from(s.availableAmount),h=ve.from(Z).sub(a);return{credits:[{value:s.amount,expiresAt:Number(s.expiresAt),salt:Vt(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:Z}}async function cn(s,o={}){const a=on,d=o.intervalMs??1e4,h=o.maxAttempts??60;let f={status:"pending",destinationTxHash:null,actionsSucceeded:null};for(let l=0;l<h;l++){try{const m=await fetch(`${a}/deposit/status?originChainId=137&depositTxHash=${s}`);if(m.ok){const c=await m.json(),g=(c.status??"pending").toLowerCase(),p=c.fillTx??c.fillTxnRef??null,b=typeof c.actionsSucceeded=="boolean"?c.actionsSucceeded:null;if(g==="filled")return{status:"filled",destinationTxHash:p,actionsSucceeded:b};if(g==="refunded"||g==="expired")return{status:g,destinationTxHash:null,actionsSucceeded:!1};f={status:"pending",destinationTxHash:p,actionsSucceeded:b}}}catch{}l<h-1&&await new Promise(m=>setTimeout(m,d))}return f}async function dn(s){const{name:o,identity:a,signer:d}=s,h=p=>{var b;try{(b=s.onProgress)==null||b.call(s,p)}catch{}},f=s.chainId??V.chainId,l=s.provider??"across",m=(s.beneficiary??await d.getAddress()).toLowerCase();let c=null,g="unconfirmed";console.info("[names] register start",{name:o,buyer:m,chainId:f,provider:l}),h("preparing");try{const p=await gt(f),b=an(p);console.info("[names] step 1/6 sized reservation",{usdCents:b,manaRate:p});const C=await rn(a,o,{chainId:f,provider:l});console.info("[names] step 2/6 route fetched",{target:C.externalCall.target,selector:C.externalCall.selector,provider:C.provider,quoteId:C.quoteId});const w=await bt(a,b,void 0,void 0,o);if(c=w.credit.id,console.info("[names] step 3/6 credit authorized",{creditId:w.credit.id,maxCreditedValue:w.maxCreditedValue}),ve.from(w.maxCreditedValue).lt(Z))throw new Error("Credit under-sized for the name price");h("awaiting-confirmation");const $=ln(w.credit,C);let j;try{j=await Ot({chainId:f,buyer:m,signer:d,args:$})}catch(x){if(!(x instanceof Ht))throw x;if(x.reason==="relayer-unreachable"){g="unobservable";const k=new $e;throw k.cause=x,k}j=await qt(f,$,d)}if(console.info("[names] step 4/6 useCredits submitted (Polygon origin tx)",{originTxHash:j}),h("confirming"),await Dt(j),g="confirmed",console.info("[names] step 5/6 origin tx confirmed",{originTxHash:j}),l==="across"){h("registering");const x=await cn(j,s.acrossPoll);if(console.info("[names] step 6/6 across status",x),x.status==="pending")return{status:"pending",originTxHash:j};if(x.status==="filled"&&x.actionsSucceeded===null)return console.warn("[names] across filled without reporting actionsSucceeded — reporting pending",{originTxHash:j}),{status:"pending",originTxHash:j};if(x.status!=="filled"||x.actionsSucceeded!==!0)throw new Ce;return{status:"registered",originTxHash:j,destinationTxHash:x.destinationTxHash}}return{status:"pending",originTxHash:j}}catch(p){if(console.error("[names] register failed — raw error:",p,{name:o,buyer:m,originState:g}),p instanceof Gt)return{status:"pending",originTxHash:p.txHash};if(c&&g==="unconfirmed"&&await yt(a,[c]).catch(()=>{}),p instanceof ke||p instanceof Ce||p instanceof $e)throw p;const b=new Error(Zt(p,"Couldn't register the name. Please try again.",{sale:!0}));throw b.cause=p,b}}function hn(){const{data:s}=vt({queryKey:["feature-flag","shop-names"],queryFn:()=>Ct($t.SHOP_NAMES),staleTime:6e4,refetchOnWindowFocus:!0,retry:1});return s===!0}const pn=60,un=700,fn=25;function mn(s){if(!s)return[];const o=[];for(let a=1;a<=s.length;a++)o.push({text:s.slice(0,a),delay:pn});o[o.length-1]={text:s,delay:un};for(let a=s.length-1;a>=1;a--)o.push({text:s.slice(0,a),delay:fn});return o}function xn(s){return s.flatMap(mn)}function gn(s,o){const a=u.useMemo(()=>xn(s),[s]),[d,h]=u.useState(0);return u.useEffect(()=>{if(!o||a.length===0)return;const f=setTimeout(()=>h(l=>(l+1)%a.length),a[d%a.length].delay);return()=>clearTimeout(f)},[d,o,a]),!o||a.length===0?"":a[d%a.length].text}const bn="https://cdn.decentraland.org/@dcl/shop/1.9.3-32728193174.commit-a3b6c07/_assets/name-verified-oGwQ3ntb.svg",yn="#34fee6",wn=i.div`
2
2
  position: fixed;
3
3
  inset: 0;
4
4
  z-index: 10000;
@@ -350,7 +350,7 @@ import{r as u,b as He,j as e,u as et}from"./react-DsDsjqAs.js";import{u as tt,s
350
350
  border-radius: 12px;
351
351
  background: #e2f5ea;
352
352
  text-align: center;
353
- `,Hn=i.div`
353
+ `,On=i.div`
354
354
  display: grid;
355
355
  place-items: center;
356
356
  width: 56px;
@@ -363,7 +363,7 @@ import{r as u,b as He,j as e,u as et}from"./react-DsDsjqAs.js";import{u as tt,s
363
363
  width: 30px;
364
364
  height: 30px;
365
365
  }
366
- `,On=i.p`
366
+ `,Hn=i.p`
367
367
  margin: 0;
368
368
  font-family: ${t.font.sans};
369
369
  font-size: 16px;
@@ -458,7 +458,7 @@ import{r as u,b as He,j as e,u as et}from"./react-DsDsjqAs.js";import{u as tt,s
458
458
  color: ${t.colors.accent};
459
459
  }
460
460
  }
461
- `;function Gn({name:s,priceCredits:o,onClose:r}){const{session:d}=Oe(),{data:h,isError:f}=kt(d),l=St(),m=He(),[c,g]=u.useState("confirm"),[p,b]=u.useState(""),[C,w]=u.useState(null),[$,j]=u.useState(!1),[x,k]=u.useState("preparing"),N=u.useRef(!1),T=p.trim().toLowerCase()===s.toLowerCase(),L=c==="completing",M=o!=null?je(o):"—",P=o==null,W=h==null?void 0:h.credits,B=o!=null&&W!=null?o-W:0,S=B>0,F=P?n("names.priceUnavailable"):S?n("names.insufficientCredits",{credits:je(B)}):null;u.useEffect(()=>{const y=G=>{G.key==="Escape"&&!L&&r()};document.addEventListener("keydown",y);const D=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",y),document.body.style.overflow=D}},[L,r]);async function R(){if(!(!d||!T||P||S||N.current)){N.current=!0,g("completing"),w(null),k("preparing");try{const y=await dn({name:s,identity:d.identity,signer:d.signer,onProgress:k});oe("Shop Completed Purchase",{items:[{item_id:null,contract_address:null,token_id:null,price_usd:Ne(o??0),category:"name",is_smart:!1}],purchase_type:"name",is_primary:!0,payment_type:"credits",value_credits:o??null,value_usd:Ne(o??0),transaction_hash:y.originTxHash??null,settlement:y.status}),l.invalidateQueries({queryKey:["usd-balance"]}),l.invalidateQueries({queryKey:["my-assets"]}),g(y.status==="registered"?"success":"pending")}catch(y){oe(_t(y)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:Rt(y),purchase_type:"name"});const D=y instanceof Ce,G=y instanceof $e;w(y instanceof ke?n("names.errorRouteCost"):D?n("names.errorNotRegistered"):G?n("names.errorSettlementUnknown"):(y==null?void 0:y.message)||n("names.errorGeneric")),j(D||G),g("error")}finally{N.current=!1}}}const _=c!=="success"&&c!=="pending",v=Et(d==null?void 0:d.providerType),z=v?2:1,A=v&&(x==="preparing"||x==="awaiting-confirmation"),I=A?1:z,ae=A?n("names.confirming"):n("names.completing"),U=x==="registering"?n("names.processingRegistering"):null;return e.jsx(wn,{onClick:L?void 0:r,role:"presentation",children:e.jsxs(jn,{role:"dialog","aria-modal":"true","aria-label":n("names.buyTitle"),onClick:y=>y.stopPropagation(),children:[_&&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:L,"aria-label":n("buyModal.close"),children:e.jsx(E,{name:"close"})})]}),e.jsxs(pe,{children:[n("names.myCreditsBalance")," ",e.jsx(O,{})," ",le(h,f)]}),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,{}),M]})]}),c==="error"?e.jsxs(e.Fragment,{children:[e.jsxs(we,{children:[e.jsx(E,{name:"info","aria-hidden":!0}),e.jsx("span",{children:C})]}),$?e.jsx(ye,{onClick:r,children:n("names.errorSpentDismiss")}):e.jsx(ye,{onClick:()=>g("confirm"),children:n("names.tryAgain")})]}):e.jsxs(e.Fragment,{children:[e.jsxs(Sn,{children:[e.jsx(En,{children:n("names.confirmTitle")}),e.jsx(Tn,{dangerouslySetInnerHTML:{__html:n("names.confirmBody",{name:`<b>@${qn(s)}</b>`})}}),e.jsxs(Rn,{children:[e.jsx(_n,{"aria-hidden":!0,children:"@"}),e.jsx(In,{value:p,onChange:y=>b(y.target.value.replace(/[^a-zA-Z0-9]/g,"")),placeholder:"yourname","aria-label":n("names.reenterAria"),autoComplete:"off",spellCheck:!1,style:{width:`${Math.max(p.length,8)}ch`}}),e.jsx(Nn,{children:".dcl.eth"})]})]}),F?e.jsxs(we,{"data-tone":"info","data-testid":"name-blocked-reason",children:[e.jsx(E,{name:"info","aria-hidden":!0}),e.jsx("span",{children:F})]}):null,e.jsx(ye,{onClick:()=>void R(),disabled:!T||!d||P||S,children:n("names.buyCta")})]})]}),c==="completing"&&e.jsxs(Ln,{children:[e.jsx(zn,{src:Tt,alt:"",width:61,height:61}),e.jsxs(An,{children:[e.jsx(Mn,{children:ae}),e.jsxs(Pn,{children:[e.jsx(Bn,{"aria-hidden":!0,children:e.jsx("span",{})}),e.jsx(Fn,{"data-testid":"name-progress-count",children:`${I}/${z}`})]}),U?e.jsx(Wn,{children:U}):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,f)]}),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,{}),M]})]}),e.jsx(We,{children:e.jsx(Pe,{onClick:()=>{r(),m("/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,f)]}),e.jsx(ue,{}),e.jsxs(Un,{children:[e.jsx(Hn,{"aria-hidden":!0,children:e.jsx(E,{name:"check"})}),e.jsxs(On,{children:[e.jsx("b",{children:n("names.successBannerBold")})," ",n("names.successBannerRest")]})]}),e.jsxs(fe,{style:{marginTop:20},children:[e.jsxs(vn,{"data-testid":"name-success-tile",children:[e.jsx(Cn,{src:Xt,alt:"","aria-hidden":!0,width:47,height:47}),e.jsxs($n,{children:[e.jsx("span",{"aria-hidden":!0,children:s}),e.jsx(kn,{src:bn,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,{}),M]})]}),e.jsxs(We,{children:[e.jsx(Pe,{onClick:()=>{r(),m("/my-items")},children:n("names.myItems")}),e.jsx(Dn,{href:V.profileUrl,target:"_blank",rel:"noopener noreferrer",children:n("names.assignToAvatar")})]})]})]})})}function qn(s){return s.replace(/[&<>"']/g,o=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"})[o])}const Vn="https://cdn.decentraland.org/@dcl/shop/1.9.3-32495537062.commit-4b3f64e/_assets/identity-icon-C8yAW_Gq.svg",Qn="https://cdn.decentraland.org/@dcl/shop/1.9.3-32495537062.commit-4b3f64e/_assets/world-icon-6xQ-PmmW.svg",Zn="https://cdn.decentraland.org/@dcl/shop/1.9.3-32495537062.commit-4b3f64e/_assets/invite-icon-Bz6lCTuB.svg",Kn="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",Xn=i.div`
461
+ `;function Gn({name:s,priceCredits:o,onClose:a}){const{session:d}=He(),{data:h,isError:f}=kt(d),l=St(),m=Oe(),[c,g]=u.useState("confirm"),[p,b]=u.useState(""),[C,w]=u.useState(null),[$,j]=u.useState(!1),[x,k]=u.useState("preparing"),N=u.useRef(!1),T=p.trim().toLowerCase()===s.toLowerCase(),L=c==="completing",M=o!=null?je(o):"—",P=o==null,W=h==null?void 0:h.credits,B=o!=null&&W!=null?o-W:0,S=B>0,F=P?n("names.priceUnavailable"):S?n("names.insufficientCredits",{credits:je(B)}):null;u.useEffect(()=>{const y=G=>{G.key==="Escape"&&!L&&a()};document.addEventListener("keydown",y);const D=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",y),document.body.style.overflow=D}},[L,a]);async function R(){if(!(!d||!T||P||S||N.current)){N.current=!0,g("completing"),w(null),k("preparing");try{const y=await dn({name:s,identity:d.identity,signer:d.signer,onProgress:k});oe("Shop Completed Purchase",{items:[{item_id:null,contract_address:null,token_id:null,price_usd:Ne(o??0),category:"name",is_smart:!1}],purchase_type:"name",is_primary:!0,payment_type:"credits",value_credits:o??null,value_usd:Ne(o??0),transaction_hash:y.originTxHash??null,settlement:y.status}),l.invalidateQueries({queryKey:["usd-balance"]}),l.invalidateQueries({queryKey:["my-assets"]}),g(y.status==="registered"?"success":"pending")}catch(y){oe(_t(y)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:Rt(y),purchase_type:"name"});const D=y instanceof Ce,G=y instanceof $e;w(y instanceof ke?n("names.errorRouteCost"):D?n("names.errorNotRegistered"):G?n("names.errorSettlementUnknown"):(y==null?void 0:y.message)||n("names.errorGeneric")),j(D||G),g("error")}finally{N.current=!1}}}const _=c!=="success"&&c!=="pending",v=Et(d==null?void 0:d.providerType),z=v?2:1,A=v&&(x==="preparing"||x==="awaiting-confirmation"),I=A?1:z,re=A?n("names.confirming"):n("names.completing"),U=x==="registering"?n("names.processingRegistering"):null;return e.jsx(wn,{onClick:L?void 0:a,role:"presentation",children:e.jsxs(jn,{role:"dialog","aria-modal":"true","aria-label":n("names.buyTitle"),onClick:y=>y.stopPropagation(),children:[_&&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:L,"aria-label":n("buyModal.close"),children:e.jsx(E,{name:"close"})})]}),e.jsxs(pe,{children:[n("names.myCreditsBalance")," ",e.jsx(H,{})," ",le(h,f)]}),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(H,{}),M]})]}),c==="error"?e.jsxs(e.Fragment,{children:[e.jsxs(we,{children:[e.jsx(E,{name:"info","aria-hidden":!0}),e.jsx("span",{children:C})]}),$?e.jsx(ye,{onClick:a,children:n("names.errorSpentDismiss")}):e.jsx(ye,{onClick:()=>g("confirm"),children:n("names.tryAgain")})]}):e.jsxs(e.Fragment,{children:[e.jsxs(Sn,{children:[e.jsx(En,{children:n("names.confirmTitle")}),e.jsx(Tn,{dangerouslySetInnerHTML:{__html:n("names.confirmBody",{name:`<b>@${qn(s)}</b>`})}}),e.jsxs(Rn,{children:[e.jsx(_n,{"aria-hidden":!0,children:"@"}),e.jsx(In,{value:p,onChange:y=>b(y.target.value.replace(/[^a-zA-Z0-9]/g,"")),placeholder:"yourname","aria-label":n("names.reenterAria"),autoComplete:"off",spellCheck:!1,style:{width:`${Math.max(p.length,8)}ch`}}),e.jsx(Nn,{children:".dcl.eth"})]})]}),F?e.jsxs(we,{"data-tone":"info","data-testid":"name-blocked-reason",children:[e.jsx(E,{name:"info","aria-hidden":!0}),e.jsx("span",{children:F})]}):null,e.jsx(ye,{onClick:()=>void R(),disabled:!T||!d||P||S,children:n("names.buyCta")})]})]}),c==="completing"&&e.jsxs(Ln,{children:[e.jsx(zn,{src:Tt,alt:"",width:61,height:61}),e.jsxs(An,{children:[e.jsx(Mn,{children:re}),e.jsxs(Pn,{children:[e.jsx(Bn,{"aria-hidden":!0,children:e.jsx("span",{})}),e.jsx(Fn,{"data-testid":"name-progress-count",children:`${I}/${z}`})]}),U?e.jsx(Wn,{children:U}):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(H,{})," ",le(h,f)]}),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(H,{}),M]})]}),e.jsx(We,{children:e.jsx(Pe,{onClick:()=>{a(),m("/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(H,{})," ",le(h,f)]}),e.jsx(ue,{}),e.jsxs(Un,{children:[e.jsx(On,{"aria-hidden":!0,children:e.jsx(E,{name:"check"})}),e.jsxs(Hn,{children:[e.jsx("b",{children:n("names.successBannerBold")})," ",n("names.successBannerRest")]})]}),e.jsxs(fe,{style:{marginTop:20},children:[e.jsxs(vn,{"data-testid":"name-success-tile",children:[e.jsx(Cn,{src:Xt,alt:"","aria-hidden":!0,width:47,height:47}),e.jsxs($n,{children:[e.jsx("span",{"aria-hidden":!0,children:s}),e.jsx(kn,{src:bn,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(H,{}),M]})]}),e.jsxs(We,{children:[e.jsx(Pe,{onClick:()=>{a(),m("/my-items")},children:n("names.myItems")}),e.jsx(Dn,{href:V.profileUrl,target:"_blank",rel:"noopener noreferrer",children:n("names.assignToAvatar")})]})]})]})})}function qn(s){return s.replace(/[&<>"']/g,o=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"})[o])}const Vn="https://cdn.decentraland.org/@dcl/shop/1.9.3-32728193174.commit-a3b6c07/_assets/identity-icon-C8yAW_Gq.svg",Zn="https://cdn.decentraland.org/@dcl/shop/1.9.3-32728193174.commit-a3b6c07/_assets/world-icon-6xQ-PmmW.svg",Qn="https://cdn.decentraland.org/@dcl/shop/1.9.3-32728193174.commit-a3b6c07/_assets/invite-icon-Bz6lCTuB.svg",Kn="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",Xn=i.div`
462
462
  width: 100%;
463
463
  min-width: 0;
464
464
  `,Jn=i.nav`
@@ -544,12 +544,12 @@ import{r as u,b as He,j as e,u as et}from"./react-DsDsjqAs.js";import{u as tt,s
544
544
  ${t.media.maxWidth("mobile")} {
545
545
  font-size: 16px;
546
546
  }
547
- `,rs=i.div`
547
+ `,as=i.div`
548
548
  width: min(785px, 100%);
549
549
  display: flex;
550
550
  flex-direction: column;
551
551
  gap: 12px;
552
- `,as=i.div`
552
+ `,rs=i.div`
553
553
  position: relative;
554
554
  `,ls=i("div",Pt("invalid"))`
555
555
  display: flex;
@@ -616,7 +616,7 @@ import{r as u,b as He,j as e,u as et}from"./react-DsDsjqAs.js";import{u as tt,s
616
616
  align-items: flex-start;
617
617
  flex-wrap: wrap;
618
618
  }
619
- `,Qe=i.a`
619
+ `,Ze=i.a`
620
620
  display: inline-flex;
621
621
  align-items: center;
622
622
  gap: 2px;
@@ -629,7 +629,7 @@ import{r as u,b as He,j as e,u as et}from"./react-DsDsjqAs.js";import{u as tt,s
629
629
  ${t.media.maxWidth("mobile")} {
630
630
  margin-left: 0;
631
631
  }
632
- `,hs=i(Qe)`
632
+ `,hs=i(Ze)`
633
633
  color: #ec303a;
634
634
  `,ps=i.label`
635
635
  flex: 1;
@@ -697,7 +697,7 @@ import{r as u,b as He,j as e,u as et}from"./react-DsDsjqAs.js";import{u as tt,s
697
697
  line-height: 1.43;
698
698
  color: ${t.colors.muted2};
699
699
  white-space: nowrap;
700
- `,Ze=i.button`
700
+ `,Qe=i.button`
701
701
  flex: none;
702
702
  display: inline-flex;
703
703
  align-items: center;
@@ -736,7 +736,7 @@ import{r as u,b as He,j as e,u as et}from"./react-DsDsjqAs.js";import{u as tt,s
736
736
  ${t.media.maxWidth("mobile")} {
737
737
  display: none;
738
738
  }
739
- `,gs=i(Ze)`
739
+ `,gs=i(Qe)`
740
740
  display: none;
741
741
 
742
742
  ${t.media.maxWidth("mobile")} {
@@ -788,7 +788,7 @@ import{r as u,b as He,j as e,u as et}from"./react-DsDsjqAs.js";import{u as tt,s
788
788
  position: static;
789
789
  margin-top: 8px;
790
790
  }
791
- `,ws=i(Qe)`
791
+ `,ws=i(Ze)`
792
792
  color: inherit;
793
793
  `,js=i.section`
794
794
  display: flex;
@@ -918,7 +918,7 @@ import{r as u,b as He,j as e,u as et}from"./react-DsDsjqAs.js";import{u as tt,s
918
918
  clip: rect(0, 0, 0, 0);
919
919
  white-space: nowrap;
920
920
  border: 0;
921
- `,Ts="https://docs.decentraland.org/creator/worlds/about/",Rs="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 _s({onBack:s}){De({title:n("seo.names.title"),description:n("seo.names.description")});const{session:o,signIn:r}=Oe(),d=hn(),{data:h}=Ge(),f=h?qe(Q,h):null,[l,m]=u.useState(""),[c,g]=u.useState("idle"),[p,b]=u.useState(!1),[C,w]=u.useState(!1),[$,j]=u.useState(()=>{var v;return typeof window<"u"&&!!((v=window.matchMedia)!=null&&v.call(window,"(prefers-reduced-motion: reduce)").matches)});u.useEffect(()=>{var A;const v=(A=window.matchMedia)==null?void 0:A.call(window,"(prefers-reduced-motion: reduce)");if(!v)return;const z=I=>j(I.matches);return v.addEventListener("change",z),()=>v.removeEventListener("change",z)},[]);const x=n("names.placeholderExamples"),k=u.useMemo(()=>x.split(",").map(v=>v.trim()).filter(Boolean),[x]),T=gn(k,!C&&!l&&!$)||n("names.inputPlaceholder"),L=u.useRef(null),[M,P]=u.useState(void 0);u.useLayoutEffect(()=>{L.current&&P(L.current.getBoundingClientRect().width)},[l,T]),u.useEffect(()=>{if(!ze(l).ok){g(l.length===0?"idle":"invalid");return}g("checking");const z=new AbortController,A=setTimeout(()=>{(async()=>{try{const I=await sn(l,{signal:z.signal});g(I)}catch(I){if((I==null?void 0:I.name)==="AbortError")return;g("error")}})()},400);return()=>{clearTimeout(A),z.abort()}},[l]);const W=ze(l),B=W.ok&&(c==="available"||c==="error"),S=d&&B,F=!d&&B;function R(){if(S){if(!o){r();return}b(!0)}}const _=e.jsxs(e.Fragment,{children:[n("names.claim"),f!=null?e.jsxs(bs,{children:[e.jsx(O,{}),je(f)]}):null]});return e.jsxs(Xn,{"data-testid":"names-page",children:[e.jsxs(Jn,{"aria-label":n("names.breadcrumbAria"),children:[e.jsx(Yn,{onClick:s,children:n("names.breadcrumbCollectibles")}),e.jsx("span",{"aria-hidden":!0,children:">"}),e.jsx(es,{children:n("names.breadcrumbCurrent")})]}),e.jsxs(ts,{children:[e.jsxs(ns,{children:[e.jsxs(ss,{children:[e.jsx(is,{children:n("names.heroTitle")}),e.jsx(os,{children:n("names.heroSubtitle")})]}),e.jsxs(rs,{children:[e.jsxs(as,{"data-testid":"names-input-wrap",children:[e.jsxs(ls,{invalid:c==="taken",children:[e.jsxs(ps,{children:[e.jsx(us,{"aria-hidden":!0,children:"@"}),e.jsx(fs,{value:l,onChange:v=>m(en(v.target.value)),placeholder:T,"aria-label":n("names.inputAria"),autoComplete:"off",spellCheck:!1,maxLength:re,onFocus:()=>w(!0),style:{width:M!=null?`${M}px`:void 0}}),e.jsx(cs,{ref:L,"aria-hidden":!0,"data-placeholder":!l||void 0,children:l||T}),e.jsx(ms,{children:n("names.suffix")})]}),l.length>0?e.jsxs(xs,{"aria-hidden":!0,children:[l.length,"/",re]}):null,e.jsx(Ze,{onClick:R,disabled:!S,"data-testid":"names-claim",children:_})]}),c==="taken"?e.jsxs(ds,{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(hs,{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")}):F?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(ws,{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"&&!W.ok&&W.reason==="too-short"?e.jsx(Y,{tone:"muted",role:"status",children:n("names.tooShort",{min:Ve})}):null]}),e.jsx(gs,{onClick:R,disabled:!S,children:_}),e.jsx(Es,{role:"status","aria-live":"polite",children:c==="available"?n("names.available",{name:l}):""})]})]}),e.jsxs(js,{children:[e.jsxs(vs,{children:[e.jsx(Cs,{children:n("names.whyTitle")}),e.jsx($s,{children:n("names.whyIntro")})]}),e.jsxs(ks,{children:[e.jsxs(ee,{children:[e.jsx(te,{src:Vn,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:Qn,alt:""}),e.jsxs(ne,{children:[e.jsx(se,{children:n("names.why2Title")}),e.jsxs(ie,{children:[n("names.why2")," ",e.jsx(Ss,{children:n("names.why2Address")})]}),e.jsxs(Be,{href:Ts,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:Zn,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:Kn,alt:""}),e.jsxs(ne,{children:[e.jsx(se,{children:n("names.why4Title")}),e.jsx(ie,{children:n("names.why4")}),e.jsxs(Be,{href:Rs,target:"_blank",rel:"noopener noreferrer",children:[n("names.learnMore"),e.jsx(E,{name:"external-link","aria-hidden":!0})]})]})]})]})]})]}),p?e.jsx(Gn,{name:l,priceCredits:f,onClose:()=>b(!1)}):null]})}const Is=i.p`
921
+ `,Ts="https://docs.decentraland.org/creator/worlds/about/",Rs="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 _s({onBack:s}){De({title:n("seo.names.title"),description:n("seo.names.description")});const{session:o,signIn:a}=He(),d=hn(),{data:h}=Ge(),f=h?qe(Z,h):null,[l,m]=u.useState(""),[c,g]=u.useState("idle"),[p,b]=u.useState(!1),[C,w]=u.useState(!1),[$,j]=u.useState(()=>{var v;return typeof window<"u"&&!!((v=window.matchMedia)!=null&&v.call(window,"(prefers-reduced-motion: reduce)").matches)});u.useEffect(()=>{var A;const v=(A=window.matchMedia)==null?void 0:A.call(window,"(prefers-reduced-motion: reduce)");if(!v)return;const z=I=>j(I.matches);return v.addEventListener("change",z),()=>v.removeEventListener("change",z)},[]);const x=n("names.placeholderExamples"),k=u.useMemo(()=>x.split(",").map(v=>v.trim()).filter(Boolean),[x]),T=gn(k,!C&&!l&&!$)||n("names.inputPlaceholder"),L=u.useRef(null),[M,P]=u.useState(void 0);u.useLayoutEffect(()=>{L.current&&P(L.current.getBoundingClientRect().width)},[l,T]),u.useEffect(()=>{if(!ze(l).ok){g(l.length===0?"idle":"invalid");return}g("checking");const z=new AbortController,A=setTimeout(()=>{(async()=>{try{const I=await sn(l,{signal:z.signal});g(I)}catch(I){if((I==null?void 0:I.name)==="AbortError")return;g("error")}})()},400);return()=>{clearTimeout(A),z.abort()}},[l]);const W=ze(l),B=W.ok&&(c==="available"||c==="error"),S=d&&B,F=!d&&B;function R(){if(S){if(!o){a();return}b(!0)}}const _=e.jsxs(e.Fragment,{children:[n("names.claim"),f!=null?e.jsxs(bs,{children:[e.jsx(H,{}),je(f)]}):null]});return e.jsxs(Xn,{"data-testid":"names-page",children:[e.jsxs(Jn,{"aria-label":n("names.breadcrumbAria"),children:[e.jsx(Yn,{onClick:s,children:n("names.breadcrumbCollectibles")}),e.jsx("span",{"aria-hidden":!0,children:">"}),e.jsx(es,{children:n("names.breadcrumbCurrent")})]}),e.jsxs(ts,{children:[e.jsxs(ns,{children:[e.jsxs(ss,{children:[e.jsx(is,{children:n("names.heroTitle")}),e.jsx(os,{children:n("names.heroSubtitle")})]}),e.jsxs(as,{children:[e.jsxs(rs,{"data-testid":"names-input-wrap",children:[e.jsxs(ls,{invalid:c==="taken",children:[e.jsxs(ps,{children:[e.jsx(us,{"aria-hidden":!0,children:"@"}),e.jsx(fs,{value:l,onChange:v=>m(en(v.target.value)),placeholder:T,"aria-label":n("names.inputAria"),autoComplete:"off",spellCheck:!1,maxLength:ae,onFocus:()=>w(!0),style:{width:M!=null?`${M}px`:void 0}}),e.jsx(cs,{ref:L,"aria-hidden":!0,"data-placeholder":!l||void 0,children:l||T}),e.jsx(ms,{children:n("names.suffix")})]}),l.length>0?e.jsxs(xs,{"aria-hidden":!0,children:[l.length,"/",ae]}):null,e.jsx(Qe,{onClick:R,disabled:!S,"data-testid":"names-claim",children:_})]}),c==="taken"?e.jsxs(ds,{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(hs,{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")}):F?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(ws,{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"&&!W.ok&&W.reason==="too-short"?e.jsx(Y,{tone:"muted",role:"status",children:n("names.tooShort",{min:Ve})}):null]}),e.jsx(gs,{onClick:R,disabled:!S,children:_}),e.jsx(Es,{role:"status","aria-live":"polite",children:c==="available"?n("names.available",{name:l}):""})]})]}),e.jsxs(js,{children:[e.jsxs(vs,{children:[e.jsx(Cs,{children:n("names.whyTitle")}),e.jsx($s,{children:n("names.whyIntro")})]}),e.jsxs(ks,{children:[e.jsxs(ee,{children:[e.jsx(te,{src:Vn,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:Zn,alt:""}),e.jsxs(ne,{children:[e.jsx(se,{children:n("names.why2Title")}),e.jsxs(ie,{children:[n("names.why2")," ",e.jsx(Ss,{children:n("names.why2Address")})]}),e.jsxs(Be,{href:Ts,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:Qn,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:Kn,alt:""}),e.jsxs(ne,{children:[e.jsx(se,{children:n("names.why4Title")}),e.jsx(ie,{children:n("names.why4")}),e.jsxs(Be,{href:Rs,target:"_blank",rel:"noopener noreferrer",children:[n("names.learnMore"),e.jsx(E,{name:"external-link","aria-hidden":!0})]})]})]})]})]})]}),p?e.jsx(Gn,{name:l,priceCredits:f,onClose:()=>b(!1)}):null]})}const Is=i.p`
922
922
  display: flex;
923
923
  align-items: center;
924
924
  gap: 10px;
@@ -934,5 +934,5 @@ import{r as u,b as He,j as e,u as et}from"./react-DsDsjqAs.js";import{u as tt,s
934
934
  background: rgba(211, 51, 51, 0.1);
935
935
  color: ${t.colors.err};
936
936
  }
937
- `,Ue=48,Ns=["all","on_sale","not_for_sale"];function Ys(){const[s]=et(),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=u.useMemo(()=>({category:"all",status:"on_sale",subCategory:null,rarities:[],priceMin:"",priceMax:"",smart:!1,sort:"newest"}),[]),[f,l]=tt(h),{subCategory:m,rarities:c,priceMin:g,priceMax:p,smart:b,sort:C}=f,w=f.category,$=Ns.includes(f.status)?f.status:"on_sale";st(`${w}:${m??""}`);const[j,x]=u.useState(!1);u.useEffect(()=>{if(!j)return;const a=K=>{K.key==="Escape"&&x(!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}},[j]);const k=$==="on_sale",N=g&&!Number.isNaN(Number(g))?Number(g):void 0,T=p&&!Number.isNaN(Number(p))?Number(p):void 0,L=It(),M=m?Bt[m]:void 0,P=(Ie.find(a=>a.key===C)??Ie[0]).server,W={category:w,rarities:c.length?c:void 0,wearableCategories:M,minPriceCredits:N,maxPriceCredits:T,search:r||void 0,sortBy:P,isSmart:b||void 0,onSale:!0,listingType:L?void 0:"primary"},B={category:w,rarities:c.length?c:void 0,wearableCategories:M,search:r||void 0,sortBy:P,isWearableSmart:b||void 0,isOnSale:$==="not_for_sale"?!1:void 0},{items:S,total:F,isLoading:R,isPlaceholderData:_,error:v,hasNextPage:z,isFetchingNextPage:A,isFetchNextPageError:I,fetchNextPage:ae}=Wt(k?["shop-items",W]:["catalog-items",B],a=>k?zt({...W,first:Ue,skip:a}):At({...B,first:Ue,skip:a}),{enabled:w!=="names"}),U=F,{data:y,isError:D,isPending:G}=Ge(),Ke=a=>y&&a.manaWei?qe(a.manaWei,y):null,Xe=k&&G&&S.some(a=>a.source==="legacy"),Se=R||_||Xe,Je=R?15:Math.max(S.length,1),Ee=u.useRef(null);u.useEffect(()=>{R||_||!r||Ee.current===r||(Ee.current=r,oe("Shop Searched",{query:r,result_count:U}))},[r,R,_,U]);const Z=u.useRef("__init__");u.useEffect(()=>{if(R||_)return;const a=JSON.stringify({category:w,subCategory:m,rarities:c,min:N,max:T,sort:C,status:$,smart:b});if(Z.current==="__init__"||Z.current===a){Z.current=a;return}Z.current=a,oe("Shop Applied Filter",{filters:{category:w,sub_category:m,rarities:c,min_price_credits:N??null,max_price_credits:T??null,status:$,smart:b,sort:C},result_count:U})},[w,m,c,N,T,C,$,b,R,_,U]);function Te(a){l({category:a,subCategory:null})}function Re(a){l({status:a})}function _e(a){l({rarities:c.includes(a)?c.filter(H=>H!==a):[...c,a]})}function Ye(){l(h)}const q=[];(N!=null||T!=null)&&q.push({key:"price",label:n("filter.price"),onRemove:()=>{l({priceMin:"",priceMax:""})}});for(const a of it)c.includes(a)&&q.push({key:`rarity-${a}`,label:Nt(a),onRemove:()=>_e(a)});return b&&q.push({key:"smart",label:n("filter.smart"),onRemove:()=>l({smart:!1})}),$!=="on_sale"&&q.push({key:"status",label:$==="all"?n("filter.statusAll"):n("filter.notForSale"),onRemove:()=>Re("on_sale")}),e.jsxs(ot,{"data-testid":"browse",children:[w!=="names"&&e.jsxs(e.Fragment,{children:[j?e.jsx(rt,{onClick:()=>x(!1),"aria-hidden":!0}):null,e.jsxs(at,{"data-open":j||void 0,"data-testid":"browse-sidebar",children:[e.jsxs(lt,{children:[e.jsx(ct,{children:n("assets.filters")}),e.jsx(dt,{onClick:()=>x(!1),"aria-label":n("assets.closeFilters"),children:"✕"})]}),e.jsx(ht,{children:e.jsx(pt,{category:w,subCategory:m,onCategory:Te,onSub:a=>l({subCategory:a}),priceMin:g,priceMax:p,onPriceMin:a=>l({priceMin:a}),onPriceMax:a=>l({priceMax:a}),rarities:c,onToggleRarity:_e,status:$,onStatus:Re,smart:b,onSmart:a=>l({smart:a})})}),e.jsx(ut,{children:e.jsx(ft,{type:"button",onClick:()=>x(!1),children:n("assets.showItems")})})]})]}),e.jsx(mt,{children:w==="names"?e.jsx(_s,{onBack:()=>Te("all")}):e.jsxs(e.Fragment,{children:[e.jsx(xt,{sort:C,onSort:a=>l({sort:a}),total:F,loading:R||_,query:r,onOpenFilters:()=>x(!0),chips:q,onClearChips:Ye}),D&&k&&S.some(a=>a.source==="legacy")?e.jsx(Is,{"data-variant":"warn",children:n("assets.marketUnavailable")}):null,v?e.jsx(Ft,{message:n("assets.loadError"),testId:"browse-error"}):null,!Se&&S.length===0&&!v?e.jsx(Lt,{testId:"browse-empty",icon:nt,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(Jt,{"data-testid":"grid",children:Se?e.jsx(Le,{count:Je}):e.jsxs(e.Fragment,{children:[S.map(a=>{if(!k)return e.jsx(X,{item:a,mode:"view"},J(a));const H=a;if(H.source!=="legacy")return e.jsx(X,{item:a},J(a));const K=Ke(H);return K==null?e.jsx(X,{item:a,mode:"view"},J(a)):e.jsx(X,{item:{...H,priceCredits:K}},J(a))}),A?e.jsx(Le,{count:6}):null]})}),e.jsx(Mt,{hasNextPage:z,isFetching:A,isError:I,onLoadMore:()=>void ae()})]})]})})]})}export{Ys as Assets};
938
- //# sourceMappingURL=Assets-Bm9m_x2b.js.map
937
+ `,Ue=48,Ns=["all","on_sale","not_for_sale"];function Ys(){const[s]=et(),o=Oe(),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=u.useMemo(()=>({category:"all",status:"on_sale",subCategory:null,rarities:[],priceMin:"",priceMax:"",smart:!1,sort:"newest"}),[]),[f,l]=tt(h),{subCategory:m,rarities:c,priceMin:g,priceMax:p,smart:b,sort:C}=f,w=f.category,$=Ns.includes(f.status)?f.status:"on_sale";st(`${w}:${m??""}`);const[j,x]=u.useState(!1);u.useEffect(()=>{if(!j)return;const r=K=>{K.key==="Escape"&&x(!1)};document.addEventListener("keydown",r);const O=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",r),document.body.style.overflow=O}},[j]);const k=$==="on_sale",N=g&&!Number.isNaN(Number(g))?Number(g):void 0,T=p&&!Number.isNaN(Number(p))?Number(p):void 0,L=It(),M=m?Bt[m]:void 0,P=(Ie.find(r=>r.key===C)??Ie[0]).server,W={category:w,rarities:c.length?c:void 0,wearableCategories:M,minPriceCredits:N,maxPriceCredits:T,search:a||void 0,sortBy:P,isSmart:b||void 0,onSale:!0,listingType:L?void 0:"primary"},B={category:w,rarities:c.length?c:void 0,wearableCategories:M,search:a||void 0,sortBy:P,isWearableSmart:b||void 0,isOnSale:$==="not_for_sale"?!1:void 0},{items:S,total:F,isLoading:R,isPlaceholderData:_,error:v,hasNextPage:z,isFetchingNextPage:A,isFetchNextPageError:I,fetchNextPage:re}=Wt(k?["shop-items",W]:["catalog-items",B],r=>k?zt({...W,first:Ue,skip:r}):At({...B,first:Ue,skip:r}),{enabled:w!=="names"}),U=F,{data:y,isError:D,isPending:G}=Ge(),Ke=r=>y&&r.manaWei?qe(r.manaWei,y):null,Xe=k&&G&&S.some(r=>r.source==="legacy"),Se=R||_||Xe,Je=R?15:Math.max(S.length,1),Ee=u.useRef(null);u.useEffect(()=>{R||_||!a||Ee.current===a||(Ee.current=a,oe("Shop Searched",{query:a,result_count:U}))},[a,R,_,U]);const Q=u.useRef("__init__");u.useEffect(()=>{if(R||_)return;const r=JSON.stringify({category:w,subCategory:m,rarities:c,min:N,max:T,sort:C,status:$,smart:b});if(Q.current==="__init__"||Q.current===r){Q.current=r;return}Q.current=r,oe("Shop Applied Filter",{filters:{category:w,sub_category:m,rarities:c,min_price_credits:N??null,max_price_credits:T??null,status:$,smart:b,sort:C},result_count:U})},[w,m,c,N,T,C,$,b,R,_,U]);function Te(r){l({category:r,subCategory:null})}function Re(r){l({status:r})}function _e(r){l({rarities:c.includes(r)?c.filter(O=>O!==r):[...c,r]})}function Ye(){l(h)}const q=[];(N!=null||T!=null)&&q.push({key:"price",label:n("filter.price"),onRemove:()=>{l({priceMin:"",priceMax:""})}});for(const r of it)c.includes(r)&&q.push({key:`rarity-${r}`,label:Nt(r),onRemove:()=>_e(r)});return b&&q.push({key:"smart",label:n("filter.smart"),onRemove:()=>l({smart:!1})}),$!=="on_sale"&&q.push({key:"status",label:$==="all"?n("filter.statusAll"):n("filter.notForSale"),onRemove:()=>Re("on_sale")}),e.jsxs(ot,{"data-testid":"browse",children:[w!=="names"&&e.jsxs(e.Fragment,{children:[j?e.jsx(at,{onClick:()=>x(!1),"aria-hidden":!0}):null,e.jsxs(rt,{"data-open":j||void 0,"data-testid":"browse-sidebar",children:[e.jsxs(lt,{children:[e.jsx(ct,{children:n("assets.filters")}),e.jsx(dt,{onClick:()=>x(!1),"aria-label":n("assets.closeFilters"),children:"✕"})]}),e.jsx(ht,{children:e.jsx(pt,{category:w,subCategory:m,onCategory:Te,onSub:r=>l({subCategory:r}),priceMin:g,priceMax:p,onPriceMin:r=>l({priceMin:r}),onPriceMax:r=>l({priceMax:r}),rarities:c,onToggleRarity:_e,status:$,onStatus:Re,smart:b,onSmart:r=>l({smart:r})})}),e.jsx(ut,{children:e.jsx(ft,{type:"button",onClick:()=>x(!1),children:n("assets.showItems")})})]})]}),e.jsx(mt,{children:w==="names"?e.jsx(_s,{onBack:()=>Te("all")}):e.jsxs(e.Fragment,{children:[e.jsx(xt,{sort:C,onSort:r=>l({sort:r}),total:F,loading:R||_,query:a,onOpenFilters:()=>x(!0),chips:q,onClearChips:Ye}),D&&k&&S.some(r=>r.source==="legacy")?e.jsx(Is,{"data-variant":"warn",children:n("assets.marketUnavailable")}):null,v?e.jsx(Ft,{message:n("assets.loadError"),testId:"browse-error"}):null,!Se&&S.length===0&&!v?e.jsx(Lt,{testId:"browse-empty",icon:nt,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(Jt,{"data-testid":"grid",children:Se?e.jsx(Le,{count:Je}):e.jsxs(e.Fragment,{children:[S.map(r=>{if(!k)return e.jsx(X,{item:r,mode:"view"},J(r));const O=r;if(O.source!=="legacy")return e.jsx(X,{item:r},J(r));const K=Ke(O);return K==null?e.jsx(X,{item:r,mode:"view"},J(r)):e.jsx(X,{item:{...O,priceCredits:K}},J(r))}),A?e.jsx(Le,{count:6}):null]})}),e.jsx(Mt,{hasNextPage:z,isFetching:A,isError:I,onLoadMore:()=>void re()})]})]})})]})}export{Ys as Assets};
938
+ //# sourceMappingURL=Assets-NfL4oA5m.js.map
@@ -1,4 +1,4 @@
1
- import{j as e,L as W,r as P}from"./react-DsDsjqAs.js";import{t as o,s as n,B,m as R,n as F,b as i,o as G,p as O,I as z,q as K,l as w,r as Q,c as H,v as X,w as A,h as Z,x as J,y as I}from"./index-BTnsc5e9.js";import{a as U,b as V,c as Y,d as tt,s as et,e as it}from"./authorizations-U-zuQc7g.js";import{f as ot}from"./builder-B2wSSJjY.js";import{m as at}from"./mana-matic-CEqvSwrJ.js";import{f as nt}from"./errors-DCouue4C.js";import"./dcl-schemas-R5THIzlU.js";import"./sentry-Bo5AM9lU.js";import"./ethers-CUiF5uXN.js";import"./intl-AKLEHPeO.js";import"./sendMetaTransaction-DF7zEAn4.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]="c2ec6301-beed-4385-8d18-7f5357a4a2c4",t._sentryDebugIdIdentifier="sentry-dbid-c2ec6301-beed-4385-8d18-7f5357a4a2c4")}catch{}})();const st=R`
1
+ import{j as e,L as W,r as P}from"./react-tQZQlQ39.js";import{t as o,s as n,B,m as R,n as F,b as i,o as G,p as O,I as z,q as K,l as w,r as Q,c as H,v as X,w as A,h as Z,x as J,y as I}from"./index-CUw_0m5M.js";import{a as U,b as V,c as Y,d as tt,s as et,e as it}from"./authorizations-DRvMaw3F.js";import{f as ot}from"./builder-D2ePNso8.js";import{m as at}from"./mana-matic-CEqvSwrJ.js";import{f as nt}from"./errors-BDvs-eCk.js";import"./dcl-schemas-Dl-k4VpC.js";import"./sentry-n8d7aKnp.js";import"./ethers-Dq9su_9o.js";import"./intl-AKLEHPeO.js";import"./sendMetaTransaction-BQlYsIba.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]="c2ec6301-beed-4385-8d18-7f5357a4a2c4",t._sentryDebugIdIdentifier="sentry-dbid-c2ec6301-beed-4385-8d18-7f5357a4a2c4")}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 e,L as W,r as P}from"./react-DsDsjqAs.js";import{t as o,s as n,B,m 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:()=>it(t,s),staleTime:3e4});async function m(){if(h||g)return;const b=!u;y(!0);try{await et({auth:t,signer:r,active:b}),await d(),v.setQueryData(["authorization",t.id,s],b),A.success(b?i("authorizations.toastActivated",{name:a}):i("authorizations.toastDeactivated",{name:a}))}catch(C){Z(C,{flow:"authorizations",step:b?"grant":"revoke"}),A.error(nt(C,i("authorizations.errorGeneric")))}finally{y(!1)}}const N=g?i("authorizations.checking"):u?i("authorizations.active"):i("authorizations.inactive");return e.jsxs(ht,{"data-testid":`authorization-${t.id}`,"data-active":!!u,children:[e.jsx(gt,{children:l?e.jsx("img",{src:l,alt:""}):p}),e.jsxs(mt,{children:[e.jsx(ft,{title:a,children:a}),e.jsx(xt,{children:c})]}),e.jsxs(bt,{children:[e.jsx(yt,{"data-active":!!u,children:N}),h?e.jsx(jt,{"aria-label":i("authorizations.working")}):e.jsx(zt,{type:"button","data-testid":`authorization-toggle-${t.id}`,"data-active":!!u,role:"switch","aria-checked":!!u,"aria-label":u?i("authorizations.deactivateAria",{name:a}):i("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?i("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:i("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 e.jsxs(D,{children:[e.jsx(z,{name:"info",size:40,color:o.colors.muted2}),e.jsx(S,{children:i("authorizations.signInTitle")}),e.jsx(L,{children:i("authorizations.signInBody")}),e.jsx(M,{variant:"white",onClick:()=>s(),children:i("storeSettings.signIn")})]});if(!a)return e.jsxs(D,{children:[e.jsx(z,{name:"check",size:40,color:o.colors.ok}),e.jsx(S,{children:i("authorizations.managedTitle")}),e.jsx(L,{children:i("authorizations.managedBody")}),e.jsx(M,{as:W,to:"/items",variant:"white",children:i("authorizations.managedCta")})]});const u=U(r),g=V(r);return e.jsxs(ct,{children:[e.jsxs(lt,{children:[e.jsx(dt,{children:i("authorizations.title")}),e.jsx(ut,{children:i("authorizations.intro")})]}),e.jsxs(k,{children:[e.jsx($,{children:i("authorizations.buyingTitle")}),e.jsxs(f,{children:[e.jsx(j,{descriptor:u,owner:t.address,signer:t.signer,name:i("authorizations.creditsName"),description:i("authorizations.creditsDesc"),icon:e.jsx(K,{className:"ccy-mark"})}),e.jsx(j,{descriptor:g,owner:t.address,signer:t.signer,name:i("authorizations.manaName"),description:i("authorizations.manaDesc"),icon:e.jsx(pt,{src:at,alt:"","aria-hidden":!0})})]})]}),e.jsxs(k,{children:[e.jsx($,{children:i("authorizations.sellingTitle")}),c!=null&&c.truncated?e.jsx(wt,{"data-testid":"authorizations-selling-truncated",children:i("authorizations.sellingTruncated",{count:c.scanned})}):null,l||v?e.jsx(f,{"aria-busy":"true","aria-label":i("authorizations.checking"),children:Array.from({length:3}).map((d,m)=>e.jsx(E,{"aria-hidden":!0},m))}):c&&c.collections.length>0?e.jsx(f,{children:c.collections.map(d=>e.jsx(j,{descriptor:Y(d.contractAddress,r),owner:t.address,signer:t.signer,name:Ct(d.contractAddress,p),description:i("authorizations.sellingDesc"),image:d.image,icon:e.jsx(z,{name:"pen",size:18})},d.contractAddress))}):e.jsx(T,{children:i("authorizations.sellingEmpty")})]}),e.jsxs(k,{children:[e.jsx($,{children:i("authorizations.mintingTitle")}),y?e.jsx(f,{"aria-busy":"true","aria-label":i("authorizations.checking"),children:Array.from({length:3}).map((d,m)=>e.jsx(E,{"aria-hidden":!0},m))}):h&&h.length>0?e.jsx(f,{children:h.map(d=>e.jsx(j,{descriptor:tt(d.contractAddress,r),owner:t.address,signer:t.signer,name:d.name||i("authorizations.collectionFallback"),description:i("authorizations.mintingDesc"),icon:e.jsx(z,{name:"pen",size:18})},d.contractAddress))}):e.jsx(T,{children:i("authorizations.mintingEmpty")})]})]})}export{Wt as Authorizations};
192
- //# sourceMappingURL=Authorizations-z2mO1b2b.js.map
192
+ //# sourceMappingURL=Authorizations-DsHPQkZm.js.map
@@ -1,4 +1,4 @@
1
- import{j as e,L as Rt,r as T,b as oa,a as ca}from"./react-DsDsjqAs.js";import{t as ue,s as r,b as a,E as he,C as Se,aC as la,D as ze,aD as da,z as ua,I as J,q as _t,A as Ue,n as ha,ad as G,M as mt,o as pa,Z as ga,l as ma,aE as fa,r as xa,aF as ya,N as ba,aG as va,aH as ft,P as wa,aI as Ca,aJ as ja,aK as ka,aq as Re,p as Sa,aL as xt,af as V,aM as yt,aN as $a,h as ae,X as Ma,c as bt,aO as Ta,aP as vt,aQ as _e,aR as Ia,aS as ve,aT as we,aU as wt,g as Ct,f as jt,aV as Pa}from"./index-BTnsc5e9.js";import{M as Aa,S as Ea,C as qa,H as za,a as Ra,T as _a,X as Ba,b as Fa,B as Wa,c as La,d as kt,e as Ka,f as $e,P as Bt,g as Na,h as Qa,i as Ua,j as Ga,k as Qe,l as pe,L as Oa,m as Ha,n as St,o as $t,W as Da,p as Va,q as Ja,r as Xa,A as Ya,s as Za,t as es,u as ts,v as as,w as ss,x as ns,y as is,z as rs,D as os,E as cs,F as ls,G as ds,I as us,J as hs,K as ps,N as gs,O as Be,Q as ms,R as fs,U as xs,V as ys,Y as Mt,Z as Tt,_ as bs,$ as vs,a0 as ws,a1 as Cs,a2 as It,a3 as js}from"./CollectionCarousel-CwBx4eRn.js";import{f as ks,h as Ss,e as $s,n as Ms,i as Ts,A as Is}from"./authorizations-U-zuQc7g.js";import{g as Ps,h as Fe,p as As}from"./buy-CQ1dwjTs.js";import{w as Es,S as We,b as qs,G as zs}from"./buy-gasless-CE0-H487.js";import{u as Rs,M as _s,R as Ce,r as Bs,c as Fs,p as Pt,a as Le}from"./useCreditPacks-0pkvd2Tt.js";import{i as Ws,a as Ls}from"./errors-DCouue4C.js";import{E as Ks}from"./ErrorNotice-CYAwTYLU.js";import"./dcl-schemas-R5THIzlU.js";import"./sentry-Bo5AM9lU.js";import"./ethers-CUiF5uXN.js";import"./intl-AKLEHPeO.js";import"./sendMetaTransaction-DF7zEAn4.js";(function(){try{var i=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},u=new i.Error().stack;u&&(i._sentryDebugIds=i._sentryDebugIds||{},i._sentryDebugIds[u]="c33221ae-f2f9-484d-a349-0917fc0e3a7a",i._sentryDebugIdIdentifier="sentry-dbid-c33221ae-f2f9-484d-a349-0917fc0e3a7a")}catch{}})();const{colors:se,radius:Ns}=ue,Qs=r.div`
1
+ import{j as e,L as Rt,r as T,b as oa,a as ca}from"./react-tQZQlQ39.js";import{t as ue,s as r,b as a,E as he,C as Se,aE as la,D as ze,aF as da,z as ua,I as J,q as _t,A as Ue,n as ha,af as G,M as mt,o as pa,Z as ga,l as ma,aG as fa,r as xa,aH as ya,N as ba,aI as va,aJ as ft,P as wa,aK as Ca,aL as ja,aM as ka,as as Re,p as Sa,aN as xt,ah as V,aO as yt,aP as $a,h as ae,X as Ma,c as bt,aQ as Ta,aR as vt,aS as _e,$ as Ia,aT as ve,aU as we,aV as wt,g as Ct,f as jt,aW as Pa}from"./index-CUw_0m5M.js";import{M as Aa,S as Ea,C as qa,H as za,a as Ra,T as _a,X as Ba,b as Fa,B as Wa,c as La,d as kt,e as Ka,f as $e,P as Bt,g as Na,h as Qa,i as Ua,j as Ga,k as Qe,l as pe,L as Oa,m as Ha,n as St,o as $t,W as Da,p as Va,q as Ja,r as Xa,A as Ya,s as Za,t as es,u as ts,v as as,w as ss,x as ns,y as is,z as rs,D as os,E as cs,F as ls,G as ds,I as us,J as hs,K as ps,N as gs,O as Be,Q as ms,R as fs,U as xs,V as ys,Y as Mt,Z as Tt,_ as bs,$ as vs,a0 as ws,a1 as Cs,a2 as It,a3 as js}from"./CollectionCarousel-Cmf4W8MU.js";import{f as ks,h as Ss,e as $s,n as Ms,i as Ts,A as Is}from"./authorizations-DRvMaw3F.js";import{g as Ps,h as Fe,p as As}from"./buy-DUn7KFQP.js";import{w as Es,S as We,b as qs,G as zs}from"./buy-gasless-CFKb7tEe.js";import{u as Rs,M as _s,R as Ce,r as Bs,c as Fs,p as Pt,a as Le}from"./useCreditPacks-DXToQd7k.js";import{i as Ws,a as Ls}from"./errors-BDvs-eCk.js";import{E as Ks}from"./ErrorNotice-CBDZFAVu.js";import"./dcl-schemas-Dl-k4VpC.js";import"./sentry-n8d7aKnp.js";import"./ethers-Dq9su_9o.js";import"./intl-AKLEHPeO.js";import"./sendMetaTransaction-BQlYsIba.js";(function(){try{var i=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},u=new i.Error().stack;u&&(i._sentryDebugIds=i._sentryDebugIds||{},i._sentryDebugIds[u]="6872120e-f37d-4ed8-af3a-a714d932a745",i._sentryDebugIdIdentifier="sentry-dbid-6872120e-f37d-4ed8-af3a-a714d932a745")}catch{}})();const{colors:se,radius:Ns}=ue,Qs=r.div`
2
2
  display: flex;
3
3
  align-items: center;
4
4
  justify-content: center;
@@ -642,4 +642,4 @@ import{j as e,L as Rt,r as T,b as oa,a as ca}from"./react-DsDsjqAs.js";import{t
642
642
  margin-top: 0;
643
643
  }
644
644
  `;function Ke(i){if(Ws(i))return a("errors.rejected");const u=(i.message??"").toLowerCase();return u.includes("insufficient")?a("cart.error.insufficient",{currency:Se.name}):u.includes("no active listing")||u.includes("your own listing")?a("cart.error.listingChanged"):a("marketCheckout.error.generic")}const Nn=12e4;function Qn(i){const u=[];return i.unavailable.length&&u.push(a("cart.drop.unavailable",{count:i.unavailable.length})),i.own.length&&u.push(a("cart.drop.own",{count:i.own.length})),a("cart.drop.removed",{items:u.join(` ${a("cart.drop.and")} `)})}const Ne=i=>i.reduce((u,I)=>u+I.priceCredits*I.quantity,0),ke=i=>i.flatMap(u=>Array.from({length:u.quantity},()=>({...u,quantity:1})));function ni(){var gt;ha({title:a("nav.cart"),noindex:!0});const i=G(t=>t.items),u=G(t=>t.remove),I=G(t=>t.increment),A=G(t=>t.decrement),F=G(t=>t.clear),X=G(t=>t.restore),Y=G(t=>t.setFittingOpen),N=mt(t=>t.items),ie=mt(t=>t.toggle),{session:n,signIn:Q}=pa(),Nt=ga(),ge=Rs().packs.slice(0,_s);T.useEffect(()=>(document.body.classList.add("shop-cart-bg"),()=>document.body.classList.remove("shop-cart-bg")),[]);const Qt=i.some(t=>t.category!=="emote"),{data:Me}=ma({queryKey:["upsell-listings"],queryFn:()=>Pa({first:40}),staleTime:6e4}),{data:j}=fa(n),b=xa(),Z=oa(),{state:z}=ca(),[Ut,re]=T.useState(null),[Ge,me]=T.useState(null),[Gt,R]=T.useState(!1),[_,O]=T.useState(null),Oe=T.useRef(0),[p,S]=T.useState(null),{data:fe}=ya(n),{data:oe}=ba(!0),[Te,He]=T.useState(""),ce=T.useRef(null),De=va(i),Ve=t=>xt(De[t.id]),Ie=i.filter(Ve),Je=i.length>0&&Ie.length===0,Ot=Ie.reduce((t,s)=>t+s.priceCredits*s.quantity,0),Ht=i.reduce((t,s)=>t+s.quantity,0),Dt=Ie.reduce((t,s)=>t+s.quantity,0),Xe=_?_.liveTotalCredits:Ot,Vt=new Set(i.map(t=>t.id)),Ye=((Me==null?void 0:Me.items)??[]).filter(t=>!Vt.has(t.id)).slice(0,12),Jt=new Map(_==null?void 0:_.buyable.map(t=>[t.item.id,t])),xe=(j==null?void 0:j.credits)??0,Pe=Xe*10,Xt=oe?ft(Pe,oe):0n,Ae=Be({priceCents:Pe,priceManaWei:Xt,balanceCents:(j==null?void 0:j.balanceCents)??0,manaBalanceWei:fe??0n}),Yt=t=>t.flatMap(s=>{const c=Le(s);return c.kind==="store"?[c.mint]:[]}),Zt=t=>t.flatMap(s=>s.acquisition==="trade"?[s.trade]:[]),ea=$a,ta=t=>Ta(t.contractAddress,String(t.itemId));function ye(t){t(),O(null),me(null),re(null)}function aa(){S(null),R(!1)}function Ze(t){const s=Ne(t),c=Math.max(0,s-xe),o=ge.find(d=>d.credits>=c)??ge[ge.length-1];He(o.id),V("Shop Buy Credits Prompted",{from:"cart_checkout",credits_needed:s,credits_balance:xe,shortfall:c}),S({phase:"nofunds",lines:t.map(d=>({item:d.item,priceCredits:d.priceCredits,quantity:d.quantity})),shortfall:c}),R(!1)}async function Ee(t){if(!n||t.length===0)return;const s=ke(t),c=s.map(f=>({...f.item,priceCredits:f.priceCredits})),o=t.map(f=>({...f.item,priceCredits:f.priceCredits,quantity:f.quantity})),d=[];let v="authorize";const m=new Set,M=new Set,W=new Set,B=[];let w=!1;S({phase:"processing",stage:"reserving",step:1,total:s.length});try{const f=[];for(let g=0;g<s.length;g++){const h=s[g];S({phase:"processing",stage:"reserving",step:g+1,total:s.length});try{const x=h.acquisition==="trade"?h.trade.id:void 0,k=h.item.contractAddress&&h.item.itemId!=null?{contractAddress:h.item.contractAddress,itemId:String(h.item.itemId)}:void 0,{credit:K,maxCreditedValue:D}=await vt(n.identity,h.usdCents,x,k);d.push({salt:K.id,itemId:h.item.id}),f.push(h.acquisition==="store"?{kind:"store",item:{collection:h.item.contractAddress,itemId:String(h.item.itemId),priceWei:h.priceWei},credits:[K],maxCreditedValue:D,chainId:h.item.chainId}:{kind:"trade",trade:h.trade,credits:[K],maxCreditedValue:D})}catch(x){if(Ls(x)){if(d.length){try{await _e(n.identity,d.map(k=>k.salt))}catch(k){ae(k,{flow:"cart_checkout",step:"release"})}b.invalidateQueries({queryKey:["usd-balance"]})}Ze(t);return}throw x}}d.length&&b.invalidateQueries({queryKey:["usd-balance"]}),v="submit";const $=Ps(f).length,U=g=>$>1?{current:g,total:$}:void 0,L=(g,h)=>S({phase:"processing",stage:g,step:s.length,total:s.length,signatures:U(h)}),H=g=>g<$?L("awaiting-signature",g+1):L("settling",$);L("awaiting-signature",1);let E=[];const C=new Map,y=async g=>{const h=await Promise.allSettled(g.map(x=>Es(x)));return h.forEach((x,k)=>{const K=C.get(g[k])??[];x.status==="fulfilled"?(K.forEach(D=>M.add(D)),B.push(g[k])):x.reason instanceof We||K.forEach(D=>W.add(D))}),h.flatMap(x=>x.status==="rejected"?[x.reason]:[])};if(ks())try{let g=0;E=await qs({purchases:f,buyer:n.address,signer:n.signer,onSigned:()=>L("settling",Math.min(g+1,$)),onBroadcast:({txHash:x,salts:k})=>{g+=1,C.set(x,k),k.forEach(K=>m.add(K))},onGroupSettling:({settled:x})=>L("settling",x)});const h=await y(E);if(h.length&&!h.some(x=>x instanceof We))throw h[0];w=!0}catch(g){if(g instanceof We)throw await y([...C.keys()]),g;if(!(g instanceof zs)||!Ia(n.providerType))throw g;E=await Fe({purchases:f,buyer:n.address,signer:n.signer,onSigned:H,onBroadcast:({salts:h})=>h.forEach(x=>m.add(x)),onSettled:({txHash:h,salts:x})=>{x.forEach(k=>M.add(k)),B.push(h)},onReverted:({salts:h})=>h.forEach(x=>W.add(x))})}else E=await Fe({purchases:f,buyer:n.address,signer:n.signer,onSigned:H,onBroadcast:({salts:g})=>g.forEach(h=>m.add(h)),onSettled:({txHash:g,salts:h})=>{h.forEach(x=>M.add(x)),B.push(g)},onReverted:({salts:g})=>g.forEach(h=>W.add(h))});t.forEach(g=>u(g.item.id)),O(null),V("Shop Completed Purchase",{...ve(c),payment_type:"credits",no_crypto_step:w,transaction_hash:E[0]??null}),Tt(b);const q=ce.current;ce.current=null,S(null),R(!1);const de={items:o,txHash:E[0]??void 0,txHashes:E,settled:!0,...q?{creditsAdded:q}:{}};Z("/success",{state:de,replace:!0})}catch(f){we(f)||ae(f,{flow:"cart_checkout",step:v,cart_size:t.length});const $=new Set([...m].filter(y=>!W.has(y))),{toRelease:U,boughtItemIds:L}=Pt({reservations:d,spent:$,settled:M}),H=[...$].some(y=>!M.has(y)),E=c.filter(y=>L.includes(y.id)),C=c.filter(y=>!L.includes(y.id));if(V(we(f)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:v,error_code:wt(f),value_usd:yt(C.reduce((y,q)=>y+q.priceCredits,0)),cart_size:s.length,partial:E.length>0}),U.length)try{await _e(n.identity,U)}catch(y){ae(y,{flow:"cart_checkout",step:"release"})}if(b.invalidateQueries({queryKey:["usd-balance"]}),E.length>0){L.forEach(y=>u(y)),O(null),Tt(b),V("Shop Completed Purchase",{...ve(E),payment_type:"credits",no_crypto_step:w,transaction_hash:B[0]??null,partial:!0}),S({phase:"error",message:a("cart.error.partiallyBought"),heldCredits:H}),R(!1);return}S({phase:"error",message:H?void 0:Ke(f),heldCredits:H})}}function et(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=ce.current;ce.current=null,S(null),R(!1);const o={items:t,txHash:s[0]??void 0,txHashes:s,settled:!0,...c?{creditsAdded:c}:{}};Z("/success",{state:o,replace:!0})}function tt(t,s){we(t)||ae(t,{flow:s,step:"submit"}),V(we(t)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:wt(t)}),S({phase:"error",message:Ke(t)}),R(!1)}async function sa(t,s,c){const o=Ct(jt.MANAToken,s),d=Ct(jt.CreditsManager,s);await Ts({auth:{kind:Is.Allowance,contractAddress:o.address,spenderAddress:d.address,chainId:s},signer:t,requiredWei:c})}async function at(){if(oe)return oe;try{return await b.fetchQuery({queryKey:["mana-rate",bt.chainId],queryFn:()=>Ma(bt.chainId),staleTime:6e4})}catch{return}}async function na(t){const s=ke(t).reduce((v,m)=>v+m.usdCents,0),o=(fe??0n)>0n?await at():oe,d=o?ft(s,o):0n;return{totalCents:s,manaWei:d}}async function st(t,s){const c=Ne(t),{totalCents:o,manaWei:d}=await na(t),v=Be({priceCents:o,priceManaWei:d,balanceCents:(j==null?void 0:j.balanceCents)??0,manaBalanceWei:fe??0n});if(s&&v.options.some(m=>m.method===s)){if(s==="credits"){Ee(t);return}const m=ot(v,s);await it(nt(s,t),m,()=>s==="mana"?void ct(t,m):void lt(t,o,d));return}if(v.options.some(m=>m.method==="mana"||m.method==="combined")){S({phase:"choose",lines:t,totalCents:o,manaWei:d}),R(!1);return}if(j!=null&&j.credits<c){Ze(t);return}Ee(t)}function qe(t){return Be({priceCents:t.totalCents,priceManaWei:t.manaWei,balanceCents:(j==null?void 0:j.balanceCents)??0,manaBalanceWei:fe??0n})}const[le,be]=T.useState(null);function nt(t,s){const c=new Map;for(const o of s){const d=bs(t,Le(o));c.set(`${d.chainId}:${d.spender.toLowerCase()}`,d)}return[...c.values()]}async function it(t,s,c){const o=[];for(const{spender:d,chainId:v}of t){const m=Ss(v,d),M=n?await $s(m,n.address,s).catch(()=>!0):!0;Ms(n==null?void 0:n.providerType,M)&&o.push(m)}if(o.length===0){c();return}R(!1),rt(o,0,c)}function rt(t,s,c){be({auth:t[s],index:s+1,total:t.length,run:()=>s+1<t.length?rt(t,s+1,c):c()})}function ot(t,s){var c;return((c=t.options.find(o=>o.method===s))==null?void 0:c.manaWei)??0n}function ia(t){if((p==null?void 0:p.phase)!=="choose")return;const{lines:s,totalCents:c,manaWei:o}=p;if(t==="credits"){Ee(s);return}const d=ot(qe(p),t);it(nt(t,s),d,()=>t==="mana"?void ct(s,d):void lt(s,c,o))}async function ct(t,s){if(!n||t.length===0)return;const c=ke(t),o=c.map(m=>({...m.item,priceCredits:m.priceCredits})),d=t.map(m=>({...m.item,priceCredits:m.priceCredits,quantity:m.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 m=await vs({trades:Zt(c),mints:Yt(c),buyer:n.address,signer:n.signer,onSigned:v,manaWei:s});t.forEach(M=>u(M.item.id)),O(null),V("Shop Completed Purchase",{...ve(o),payment_type:"mana",transaction_hash:m[0]??null}),b.invalidateQueries({queryKey:["mana-balance"]}),et(d,m)}catch(m){tt(m,"buy_cart_mana")}}async function lt(t,s,c){if(!n||t.length===0)return;const o=ke(t),d=o.map(w=>({...w.item,priceCredits:w.priceCredits})),v=t.map(w=>({...w.item,priceCredits:w.priceCredits,quantity:w.quantity})),m=ws(o.map(w=>w.usdCents),(j==null?void 0:j.balanceCents)??0),M=[],W=new Set,B=new Set;S({phase:"processing",stage:"reserving",step:1,total:o.length});try{const w=o.map(Le),f=[],$=new Map,U=new Map;for(let C=0;C<o.length;C++){const y=o[C],q=w[C],de=m[C],g=Cs(Math.max(0,y.usdCents-de),s,c);let h;if(de<=0)h=It(q,[],"0");else{S({phase:"processing",stage:"reserving",step:C+1,total:o.length});const k=y.item,{credit:K,maxCreditedValue:D}=await vt(n.identity,de,q.kind==="trade"?q.trade.id:void 0,k.contractAddress&&k.itemId!=null?{contractAddress:k.contractAddress,itemId:String(k.itemId)}:void 0);M.push({salt:K.id,itemId:k.id}),h=It(q,[K],D)}const x=As(h);$.set(x,($.get(x)??0n)+g),U.has(x)||U.set(x,f.length),f.push(h)}M.length&&b.invalidateQueries({queryKey:["usd-balance"]});for(const[C,y]of $){const q=U.get(C);q==null||y<=0n||(f[q]={...f[q],maxCreditedValue:(BigInt(f[q].maxCreditedValue)+y).toString()})}const L=[...$.values()].reduce((C,y)=>C+y,0n);await sa(n.signer,js(w[0]),L);const H=()=>S({phase:"processing",stage:"settling",step:o.length,total:o.length});S({phase:"processing",stage:"awaiting-signature",step:o.length,total:o.length});const E=await Fe({purchases:f,buyer:n.address,signer:n.signer,onSigned:H,onBroadcast:({salts:C})=>C.forEach(y=>W.add(y)),onReverted:({salts:C})=>C.forEach(y=>B.add(y))});t.forEach(C=>u(C.item.id)),O(null),V("Shop Completed Purchase",{...ve(d),payment_type:"credits_and_mana",transaction_hash:E[0]??null}),b.invalidateQueries({queryKey:["mana-balance"]}),et(v,E)}catch(w){const{toRelease:f}=Pt({reservations:M,spent:new Set([...W].filter($=>!B.has($))),settled:new Set});f.length&&_e(n.identity,f).catch(()=>{}),M.length&&b.invalidateQueries({queryKey:["usd-balance"]}),tt(w,"buy_cart_combined")}}async function ee(t){if(!n){Mt({type:"cart-checkout"}),Q();return}const s=G.getState().items.filter(Ve);if(s.length===0)return;re(null),me(null),R(!0);const c=s.reduce((o,d)=>o+d.priceCredits*d.quantity,0);V("Shop Started Checkout",{checkout_source:"cart",cart_size:s.length,cart_value_credits:c,cart_value_usd:yt(c),has_sufficient_credits:xe>=c});try{const o=await Bs(s,n.address,ea,await at(),ta),d=[...o.unavailable,...o.own];if(d.length&&(d.forEach(v=>u(v.id)),me(Qn(o))),o.buyable.length===0){re(a("cart.error.noneAvailable")),O(null);return}if(o.orderChanged){O(o),Oe.current=Date.now();return}await st(o.buyable,t)}catch(o){ae(o,{flow:"cart_checkout",step:"review",cart_size:s.length}),re(Ke(o))}finally{R(!1)}}async function dt(){if(_){if(!n){Mt({type:"cart-checkout"}),Q();return}if(Date.now()-Oe.current>Nn){O(null),me(null),await ee();return}re(null),st(_.buyable)}}async function ra(){if(Te){try{sessionStorage.setItem(Ce,JSON.stringify(G.getState().items))}catch{}R(!0);try{const t=await Fs(Te,n?{address:n.address,identity:n.identity}:void 0);if(t.url){window.location.href=t.url;return}Z("/credits")}catch(t){try{sessionStorage.removeItem(Ce)}catch{}ae(t,{flow:"cart_buy_credits"}),S({phase:"error",message:a("buyModal.error.creditsCheckout")})}finally{R(!1)}}}const ut=T.useRef(!1);T.useEffect(()=>{if(!n||ut.current||!ms("cart-checkout"))return;ut.current=!0;const t=setTimeout(()=>void ee(),0);return()=>clearTimeout(t)},[n]);const ht=T.useRef(!1);T.useEffect(()=>{if(!(z!=null&&z.resumeCheckout)||ht.current)return;ht.current=!0,ce.current=z.creditsAdded??null;try{const s=sessionStorage.getItem(Ce);if(s){sessionStorage.removeItem(Ce);const c=JSON.parse(s);Array.isArray(c)&&c.length&&X(c)}}catch{}b.invalidateQueries({queryKey:["usd-balance"]});const t=setTimeout(()=>void ee(),0);return()=>clearTimeout(t)},[z==null?void 0:z.resumeCheckout]);const pt=T.useRef(!1);T.useEffect(()=>{if(!(z!=null&&z.startCheckout)||pt.current)return;pt.current=!0,Z(".",{replace:!0,state:null});const t=setTimeout(()=>void ee(),0);return()=>clearTimeout(t)},[z==null?void 0:z.startCheckout]);const te=Gt||(p==null?void 0:p.phase)==="processing";return i.length===0&&!p?e.jsx(At,{children:e.jsxs(qt,{children:[e.jsxs(Et,{onClick:()=>Z(-1),type:"button",children:[e.jsx(J,{name:"arrow-left"}),a("nav.cart")]}),e.jsx(sn,{children:e.jsx(wa,{variant:"light",testId:"cart-empty",icon:Ca,title:a("cart.empty.title"),body:a("cart.empty.body"),cta:{label:a("cart.empty.cta"),to:"/items"}})})]})}):e.jsxs(At,{children:[e.jsxs(qt,{children:[e.jsxs(Et,{onClick:()=>Z(-1),type:"button",children:[e.jsx(J,{name:"arrow-left"}),a("nav.cart")]}),e.jsxs(Zs,{children:[e.jsxs(en,{children:[e.jsxs(tn,{children:[e.jsx(nn,{onClick:()=>Z(-1),type:"button","aria-label":a("cart.goBack"),children:e.jsx(J,{name:"arrow-left"})}),e.jsx(rn,{children:a("cart.panelTitle",{count:Ht})}),Qt?e.jsxs(on,{onClick:()=>Y(!0),disabled:te,children:[e.jsx(J,{name:"fitting-room"}),a("cart.fittingRoom")]}):null]}),e.jsxs(an,{children:[e.jsx(cn,{children:i.map(t=>{const s=Jt.get(t.id),c=s?s.priceCredits:t.priceCredits,o=!!s&&s.priceCredits!==t.priceCredits,d=!t.tokenId,v=t.quantity,m=typeof t.available=="number"&&v>=t.available,M=c*v,W=ja(t),B=!!W&&!!N[W],w=ka(t),f=De[t.id],$=!xt(f),U=f==="sold-out"?a("cart.availability.soldOut"):a("cart.availability.unavailable");return e.jsxs(ln,{"data-unavailable":$||void 0,children:[e.jsxs(dn,{"data-thumb":!0,children:[w?e.jsx(un,{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(hn,{"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(pn,{children:[e.jsxs(gn,{"data-desc":!0,children:[w?e.jsx(fn,{to:w,state:{item:t,tradeId:t.tradeId},title:t.name,children:t.name}):e.jsx(mn,{title:t.name,children:t.name}),t.creator?e.jsx(xn,{address:t.creator,linkToProfile:!0}):null,Nt&&d?e.jsxs(Mn,{"data-testid":"cart-creator-tag",children:[e.jsx(Tn,{name:"buy-from-creator"}),a("cart.creatorTag")]}):null]}),e.jsx(yn,{children:$?e.jsxs(Sn,{children:[e.jsx($n,{name:"warning-fill",size:24}),U]}):e.jsxs(e.Fragment,{children:[d?e.jsxs(bn,{children:[e.jsx(zt,{onClick:()=>ye(()=>A(t.id)),disabled:te||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(vn,{children:v}),e.jsx(zt,{onClick:()=>ye(()=>I(t.id)),disabled:te||m,"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(wn,{children:[e.jsx(Cn,{})," ",e.jsx(Re,{credits:M}),o?e.jsx(jn,{children:e.jsx(Re,{credits:t.priceCredits*v})}):null]})]})})]}),e.jsxs(kn,{children:[W?e.jsx(In,{"data-on":B||void 0,onClick:()=>ie(t),"aria-label":B?a("cart.removeFromFavorites",{name:t.name}):a("cart.addToFavorites",{name:t.name}),title:B?a("assetCard.removeFromFavorites"):a("assetCard.addToFavorites"),children:e.jsx(J,{name:B?"heart-solid":"heart"})}):null,e.jsx(Pn,{onClick:()=>ye(()=>u(t.id)),disabled:te,"aria-label":a("cart.remove",{name:t.name}),title:a("cart.removeTitle"),children:e.jsx(J,{name:"trash",size:24})})]})]},t.id)})}),e.jsx(An,{children:e.jsx("button",{className:"link",onClick:()=>ye(F),disabled:te,children:a("cart.clearCart")})})]})]}),e.jsxs(En,{children:[e.jsx(qn,{children:a("cart.purchaseSummary")}),e.jsxs(zn,{children:[e.jsxs(Rn,{children:[e.jsx(_n,{children:a("cart.totalItems",{count:Dt})}),e.jsx(Fn,{children:e.jsxs(Bn,{children:[e.jsx(Wn,{})," ",e.jsx(Re,{credits:Xe})]})})]}),e.jsx(Bt,{options:Ae.options,totalCents:Pe,shortfall:Ae.manaShortfall,showCreditsAmount:!1,creditsLabel:_?a("marketCheckout.confirmPurchase"):Ae.options.length>1?a("cart.buyWithCredits"):a("cart.checkout"),busy:te||Je,onPay:t=>void(_?dt():ee(t)),creditsFallback:{label:te?a("cart.working"):_?a("marketCheckout.confirmPurchase"):a("cart.checkout"),onClick:()=>void(_?dt():ee())}}),Je?e.jsx(je,{className:"muted",children:a("cart.allUnavailable")}):null,n?null:e.jsx(je,{className:"muted",children:a("cart.signInHint")}),_?e.jsx(je,{className:"muted",children:a("cart.priceChanged")}):null,Ge?e.jsx(je,{className:"muted",children:Ge}):null,e.jsx(Ln,{message:Ut})]})]})]})]}),Ye.length>0?e.jsx(Kn,{children:e.jsx(fs,{title:a("cart.youMightAlsoLike"),items:Ye})}):null,le&&n?e.jsx(xs,{auth:le.auth,signer:n.signer,step:{index:le.index,total:le.total},title:a("authorizeStep.manaTitle"),name:a("authorizeStep.manaName"),reason:a("authorizeStep.manaReason"),icon:e.jsx("img",{src:ys,width:24,height:24,alt:"","aria-hidden":!0}),onAuthorized:()=>{const{run:t}=le;be(null),t()},onCancel:()=>be(null),onClose:()=>be(null)}):null,p?e.jsx(Vs,{phase:p.phase,balanceCredits:xe,heldCreditsCount:((gt=j==null?void 0:j.held)==null?void 0:gt.credits)??null,onClose:aa,stage:p.phase==="processing"?p.stage:void 0,step:p.phase==="processing"?p.step:void 0,total:p.phase==="processing"?p.total:void 0,isSelfCustody:Sa(n==null?void 0:n.providerType),signatures:p.phase==="processing"?p.signatures:void 0,options:p.phase==="choose"?qe(p).options:void 0,shortfall:p.phase==="choose"?qe(p).manaShortfall:void 0,onPay:ia,totalCents:p.phase==="choose"?p.totalCents:void 0,totalManaWei:p.phase==="choose"?p.manaWei:void 0,totalCredits:p.phase==="choose"?Ne(p.lines):void 0,lines:p.phase==="nofunds"?p.lines:void 0,shortfallCredits:p.phase==="nofunds"?p.shortfall:void 0,packs:ge,selectedPack:Te,onSelectPack:He,onBuyPacks:()=>void ra(),message:p.phase==="error"?p.message:void 0,heldCredits:p.phase==="error"&&!!p.heldCredits,onRetry:()=>void ee()}):null]})}export{ni as Cart};
645
- //# sourceMappingURL=Cart-C4caiTwW.js.map
645
+ //# sourceMappingURL=Cart-BoxMvmha.js.map
@@ -1,4 +1,4 @@
1
- import{H as R,J as j,K as o,L as c,A as _,m as $}from"./index-BTnsc5e9.js";import{r as N,j as h}from"./react-DsDsjqAs.js";import{g as E,a as U,c as z,b as K}from"./clsx-BEtG4eYu.js";import{s as y}from"./styled-B-GFNFFF.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new r.Error().stack;e&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[e]="14e4f101-fa19-49c3-9ff4-e91b8cbd61dd",r._sentryDebugIdIdentifier="sentry-dbid-14e4f101-fa19-49c3-9ff4-e91b8cbd61dd")}catch{}})();function F(r){return E("MuiCircularProgress",r)}U("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const L=["className","color","disableShrink","size","style","thickness","value","variant"];let l=r=>r,C,P,D,S;const t=44,W=$(C||(C=l`
1
+ import{H as R,J as j,K as o,L as c,A as _,m as $}from"./index-CUw_0m5M.js";import{r as N,j as h}from"./react-tQZQlQ39.js";import{g as E,a as U,c as z,b as K}from"./clsx-BEtG4eYu.js";import{s as y}from"./styled-BZvgZykb.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new r.Error().stack;e&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[e]="14e4f101-fa19-49c3-9ff4-e91b8cbd61dd",r._sentryDebugIdIdentifier="sentry-dbid-14e4f101-fa19-49c3-9ff4-e91b8cbd61dd")}catch{}})();function F(r){return E("MuiCircularProgress",r)}U("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const L=["className","color","disableShrink","size","style","thickness","value","variant"];let l=r=>r,C,P,D,S;const t=44,W=$(C||(C=l`
2
2
  0% {
3
3
  transform: rotate(0deg);
4
4
  }
@@ -26,4 +26,4 @@ import{H as R,J as j,K as o,L as c,A as _,m as $}from"./index-BTnsc5e9.js";impor
26
26
  `),W)),H=y("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(r,e)=>e.svg})({display:"block"}),J=y("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(r,e)=>{const{ownerState:s}=r;return[e.circle,e[`circle${c(s.variant)}`],s.disableShrink&&e.circleDisableShrink]}})(({ownerState:r,theme:e})=>o({stroke:"currentColor"},r.variant==="determinate"&&{transition:e.transitions.create("stroke-dashoffset")},r.variant==="indeterminate"&&{strokeDasharray:"80px, 200px",strokeDashoffset:0}),({ownerState:r})=>r.variant==="indeterminate"&&!r.disableShrink&&_(S||(S=l`
27
27
  animation: ${0} 1.4s ease-in-out infinite;
28
28
  `),A)),Q=N.forwardRef(function(e,s){const a=R({props:e,name:"MuiCircularProgress"}),{className:d,color:f="primary",disableShrink:w=!1,size:u=40,style:I,thickness:i=3.6,value:m=0,variant:v="indeterminate"}=a,M=j(a,L),n=o({},a,{color:f,disableShrink:w,size:u,thickness:i,value:m,variant:v}),p=B(n),g={},k={},x={};if(v==="determinate"){const b=2*Math.PI*((t-i)/2);g.strokeDasharray=b.toFixed(3),x["aria-valuenow"]=Math.round(m),g.strokeDashoffset=`${((100-m)/100*b).toFixed(3)}px`,k.transform="rotate(-90deg)"}return h.jsx(G,o({className:z(p.root,d),style:o({width:u,height:u},k,I),ownerState:n,ref:s,role:"progressbar"},x,M,{children:h.jsx(H,{className:p.svg,ownerState:n,viewBox:`${t/2} ${t/2} ${t} ${t}`,children:h.jsx(J,{className:p.circle,style:g,ownerState:n,cx:t,cy:t,r:(t-i)/2,fill:"none",strokeWidth:i})})}))});export{Q as C};
29
- //# sourceMappingURL=CircularProgress-nhJG5H4b.js.map
29
+ //# sourceMappingURL=CircularProgress-Cc1MD1yB.js.map