@dcl/shop 1.1.1-31102625765.commit-10fdc9c → 1.2.0

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 (175) hide show
  1. package/_assets/{Activity-QfD0tvUz.js → Activity-WzrsBYzd.js} +3 -3
  2. package/_assets/{AnimatedBackground-DJdtstZg.js → AnimatedBackground-DjLtC0in.js} +1 -1
  3. package/_assets/Assets-W5ljHZz_.js +895 -0
  4. package/_assets/{Assets.styles-B9IlZUiU.js → Assets.styles-B1wjUn65.js} +1 -1
  5. package/_assets/{Authorizations-RfBfVCWP.js → Authorizations-B5p2iUHM.js} +1 -1
  6. package/_assets/{Cart-0KOJq4kv.js → Cart-Bh-HgdN6.js} +1 -1
  7. package/_assets/{CircularProgress-DWhieah-.js → CircularProgress-CRPaZUaF.js} +1 -1
  8. package/_assets/{Collection-Dy1W6f2d.js → Collection-BaGhHdl0.js} +1 -1
  9. package/_assets/{CollectionCarousel-FvbsGSp0.js → CollectionCarousel-TGpCTmUQ.js} +2 -2
  10. package/_assets/{Confetti-BfqSZ5eN.js → Confetti-BN_pNgmM.js} +1 -1
  11. package/_assets/{Creator-c5pNs6YM.js → Creator-ciJxZjs_.js} +1 -1
  12. package/_assets/{ErrorNotice-PgVICMnD.js → ErrorNotice-jD-FwtiS.js} +1 -1
  13. package/_assets/{ExchangeController-C_nxxLez.js → ExchangeController-OeggugXi.js} +1 -1
  14. package/_assets/{Faq-Yv2mYyMA.js → Faq-wg7vWcKf.js} +1 -1
  15. package/_assets/{GetCredits-BcYVWAwQ.js → GetCredits-BAjH3baH.js} +1 -1
  16. package/_assets/{Grow-WMGgjDBX.js → Grow-BCaCEq9-.js} +1 -1
  17. package/_assets/{HelpersUtil-s-En5wkS.js → HelpersUtil-gxfrB6dz.js} +1 -1
  18. package/_assets/{ItemDetail-BiQci__g.js → ItemDetail-BvMU6_Oq.js} +1 -1
  19. package/_assets/LazyEmoteControls-DE5H6ZZm.js +2 -0
  20. package/_assets/{LoadMore-CrfOeX75.js → LoadMore-L0jdHqAb.js} +1 -1
  21. package/_assets/{ManaPricingBanner.styles-Dp4OJnuy.js → ManaPricingBanner.styles-BpgJKPnW.js} +1 -1
  22. package/_assets/{MyAssets-DpzWXmRQ.js → MyAssets-Dz1TnFDV.js} +1 -1
  23. package/_assets/{MyFavorites-e30lF3wU.js → MyFavorites-4bqQmhDd.js} +1 -1
  24. package/_assets/{NotFound-CdeSUzQ2.js → NotFound-DmWOqezH.js} +1 -1
  25. package/_assets/{NotificationsBell-DXVFukVB.js → NotificationsBell-DzlKi2q2.js} +1 -1
  26. package/_assets/{OutfitDetail-hRCnBCPm.js → OutfitDetail-DUkrlHGK.js} +1 -1
  27. package/_assets/{OutfitPreview-ChN2oM8x.js → OutfitPreview-CVrRVAqt.js} +1 -1
  28. package/_assets/{OutfitStudio-DvPdY3_G.js → OutfitStudio-_8tw7nfU.js} +1 -1
  29. package/_assets/{StoreSettings-Bsa0eSTC.js → StoreSettings--Y44v8MH.js} +1 -1
  30. package/_assets/{Success-BFki0m5-.js → Success-Dyq6VNoV.js} +1 -1
  31. package/_assets/{SwapController-D_7CXLpx.js → SwapController-DT-2LK9L.js} +1 -1
  32. package/_assets/{Tooltip-tvzqarUY.js → Tooltip-BPV6o6wG.js} +1 -1
  33. package/_assets/{TradeService-D3cOzoGH.js → TradeService-oPf4Uv1h.js} +1 -1
  34. package/_assets/{W3MFrameProviderSingleton-wNL5u-dk.js → W3MFrameProviderSingleton-KChYZ3ey.js} +3 -3
  35. package/_assets/{WebCryptoP256-X6DlaRaZ.js → WebCryptoP256-DOqIQjou.js} +1 -1
  36. package/_assets/{authorizations-BGawCoH1.js → authorizations-_of_k_s-.js} +1 -1
  37. package/_assets/{basic-CNpJUgnr.js → basic-BKiPxjPG.js} +1 -1
  38. package/_assets/{biconomy-CYAKcDdU.js → biconomy-DVmLydy3.js} +1 -1
  39. package/_assets/{builder-DXMbd3YE.js → builder-Bxf4v20g.js} +1 -1
  40. package/_assets/{buy-wbuVsA9p.js → buy-BUDAT54T.js} +1 -1
  41. package/_assets/{buy-gasless-BSrNpwqu.js → buy-gasless-lErDvRBB.js} +1 -1
  42. package/_assets/{categories-CjNfJsvg.js → categories-C7-Px0Cz.js} +1 -1
  43. package/_assets/{ccip-C2PwR6WA.js → ccip-DJsgfNx_.js} +1 -1
  44. package/_assets/{ccip-Y9Z5crdp.js → ccip-rnalXDmy.js} +1 -1
  45. package/_assets/{collectionPage.styles-dzdIlHWn.js → collectionPage.styles-CnMRUv4w.js} +6 -6
  46. package/_assets/{controller-DLNV1Auw.js → controller-C5lSv65X.js} +2 -2
  47. package/_assets/{core-Dv1KiMHA.js → core-DFmP0EWm.js} +4 -4
  48. package/_assets/{createSvgIcon-CF9RuVXo.js → createSvgIcon-BiLn2Sm6.js} +1 -1
  49. package/_assets/{custom-CjOThmqq.js → custom-D6LBCLjl.js} +1 -1
  50. package/_assets/{data-capture-Dvwz87cd.js → data-capture-DnJW2etD.js} +1 -1
  51. package/_assets/{email-BM43tTLo.js → email-BQMNABmp.js} +1 -1
  52. package/_assets/{embedded-wallet-DBJV0zvO.js → embedded-wallet-BEAvOQ4J.js} +1 -1
  53. package/_assets/{emotion-styled.browser.esm-ZrVL_gaZ.js → emotion-styled.browser.esm-DjUJkz5C.js} +1 -1
  54. package/_assets/{engine-DLQID_vj.js → engine-Cxz0taSI.js} +1 -1
  55. package/_assets/{errors-4nY8CgwM.js → errors-C5pxH9hH.js} +1 -1
  56. package/_assets/{estimate-l1-fee-CoXXFjSH.js → estimate-l1-fee-UP3UBoYC.js} +1 -1
  57. package/_assets/{execute-DFrVqDeh.js → execute-BS0Y5pHb.js} +2 -2
  58. package/_assets/{features-BCr6ZOyd.js → features-CCkzoVM7.js} +1 -1
  59. package/_assets/{fetchTokenMetadata-Dj0xFl8d.js → fetchTokenMetadata-BTavNlze.js} +2 -2
  60. package/_assets/{field.styles-B3Ufd7iA.js → field.styles-Cxl6HEei.js} +1 -1
  61. package/_assets/{get-ecosystem-wallet-info-BsT3sidl.js → get-ecosystem-wallet-info-DBkCo9Dd.js} +1 -1
  62. package/_assets/{getBalance-Cn9WF9Tb.js → getBalance-oQUSwk6i.js} +1 -1
  63. package/_assets/{getNFT-DfOOA5eO.js → getNFT-C7oN1xz2.js} +1 -1
  64. package/_assets/{getNFT-DfnPVHZ5.js → getNFT-DdyxRcHy.js} +1 -1
  65. package/_assets/{grid.styles-INZ4nIxL.js → grid.styles-BQjREFrV.js} +1 -1
  66. package/_assets/{hashTypedData-B_4IvbDB.js → hashTypedData-B6zZpjUD.js} +1 -1
  67. package/_assets/{hashTypedData-DfLHQ6NJ.js → hashTypedData-DiCfu9px.js} +1 -1
  68. package/_assets/{in-app-CEPTXxSp.js → in-app-B_q2Ngeh.js} +1 -1
  69. package/_assets/{in-app-wallet-calls-QnUVTgv-.js → in-app-wallet-calls-D_4POGr9.js} +1 -1
  70. package/_assets/{index-CjkD4uOi.js → index-6BIeeYcK.js} +1 -1
  71. package/_assets/{index-DD9CVdaW.js → index-B3HeHO54.js} +1 -1
  72. package/_assets/{index-SPlBYxDN.js → index-B4DUxntk.js} +1 -1
  73. package/_assets/{index-CP8_gkMR.js → index-B58dWY5c.js} +1 -1
  74. package/_assets/{index-BzKKpH4z.js → index-B5yDM3Cs.js} +1 -1
  75. package/_assets/{index-Dfm80u9p.js → index-B6_DHTJR.js} +1 -1
  76. package/_assets/{index-CxqtPM7K.js → index-B6qnjAt3.js} +1 -1
  77. package/_assets/{index-DjTkGsKb.js → index-B7mvz5SS.js} +1 -1
  78. package/_assets/{index-B-B3AF4h.js → index-B7wTdynS.js} +1 -1
  79. package/_assets/{index-pFp5OCxA.js → index-B8PyPptj.js} +1 -1
  80. package/_assets/{index-BeFgPYGe.js → index-BDhI4OFC.js} +1 -1
  81. package/_assets/{index-DhZwZ0t_.js → index-BEprhHZ1.js} +1 -1
  82. package/_assets/{index-BdsNVjaO.js → index-BFPqoraR.js} +1 -1
  83. package/_assets/{index-DxYT-EMB.js → index-BRQOOFsy.js} +3 -3
  84. package/_assets/{index-C4myjq7f.js → index-BVlv1YIR.js} +1 -1
  85. package/_assets/{index-D9CBkgIa.js → index-BYZ-uB-6.js} +1 -1
  86. package/_assets/{index-Be2OPswD.js → index-BaBVZyxJ.js} +1 -1
  87. package/_assets/{index--cPvq__j.js → index-BgYHNOmZ.js} +1 -1
  88. package/_assets/{index-CDW7b6q5.js → index-BiLeVGAb.js} +1 -1
  89. package/_assets/{index-DZsDNaLC.js → index-BpzsK6nD.js} +2 -2
  90. package/_assets/{index-C1opa0Zw.js → index-C3FfSJFt.js} +1 -1
  91. package/_assets/{index-DHyqH6ml.js → index-CF-kXP_a.js} +1 -1
  92. package/_assets/{index-C4Icjsra.js → index-CQ9RhRXs.js} +1 -1
  93. package/_assets/{index-BWTB7fRY.js → index-CW16IEJ1.js} +1 -1
  94. package/_assets/{index-DMaNadWp.js → index-CaSykQgm.js} +1 -1
  95. package/_assets/{index-Bf4BNxBt.js → index-CyEy9W2J.js} +1 -1
  96. package/_assets/{index-DZSPT_NS.js → index-D0yb7tx6.js} +62 -62
  97. package/_assets/{index-BPU88wTK.js → index-D4tyAO9v.js} +1 -1
  98. package/_assets/{index-BznwH6bf.js → index-DEJqqCqu.js} +1 -1
  99. package/_assets/{index-D21clree.js → index-DGzakxGf.js} +1 -1
  100. package/_assets/{index-Bh59hgYg.js → index-DJ2lLMDk.js} +1 -1
  101. package/_assets/{index-DvgMl7JF.js → index-DQrAFSz9.js} +1 -1
  102. package/_assets/{index-BdjqM4EA.js → index-DVbI8VHx.js} +2 -2
  103. package/_assets/{index-CuKEGIkk.js → index-DW_rAGmE.js} +1 -1
  104. package/_assets/{index-DqhfJNd8.js → index-DaCjd07S.js} +1 -1
  105. package/_assets/{index-w8p5ELVi.js → index-Dffppy0t.js} +1 -1
  106. package/_assets/{index-l3So6VdT.js → index-DgCoC9NB.js} +1 -1
  107. package/_assets/{index-DOat9oKK.js → index-Dhnm9LzO.js} +1 -1
  108. package/_assets/{index-Be1ejvaF.js → index-DiTI5DKB.js} +1 -1
  109. package/_assets/{index-Bxt9z70g.js → index-DiaaCzn0.js} +1 -1
  110. package/_assets/{index-r-yfi_Cc.js → index-DsDbzqMK.js} +1 -1
  111. package/_assets/{index-q-pHaHea.js → index-FeLelpWN.js} +1 -1
  112. package/_assets/{index-CYkW98xi.js → index-M1o372c7.js} +2 -2
  113. package/_assets/{index-Ce3s9yr1.js → index-PgbjDVbM.js} +1 -1
  114. package/_assets/{index-BO4pDEKE.js → index-Xusi9FS-.js} +3 -3
  115. package/_assets/{index-BYQwquqQ.js → index-_IvJKRy-.js} +1 -1
  116. package/_assets/{index-9VyDiM0b.js → index-kKHHg57w.js} +1 -1
  117. package/_assets/{index-ClPXi4qM.js → index-lxi2Pbq1.js} +1 -1
  118. package/_assets/{index-BbyyE3QZ.js → index-prEKQove.js} +1 -1
  119. package/_assets/{index-BZx3Hl2S.js → index-qPWw21a_.js} +1 -1
  120. package/_assets/{index-jUk6xFSZ.js → index-rynehCHP.js} +3 -3
  121. package/_assets/{index-JsjyQHhW.js → index-tZz3YEeL.js} +1 -1
  122. package/_assets/{index.es-CUXuVaDL.js → index.es-C4u3tLXm.js} +1 -1
  123. package/_assets/{index.es-CPt8ObVR.js → index.es-DAi3k6BS.js} +4 -4
  124. package/_assets/{index.es-5BKW5ukU.js → index.es-Zzz8NtPw.js} +1 -1
  125. package/_assets/{localBatchGatewayRequest-C1UcVI6d.js → localBatchGatewayRequest-OZkr4GaA.js} +1 -1
  126. package/_assets/{networks-Ecij3_0f.js → networks-KQJEgu0R.js} +1 -1
  127. package/_assets/{onramp-DE7pdvSk.js → onramp-D1TyCpmq.js} +1 -1
  128. package/_assets/{openzeppelin-C2JIuNlE.js → openzeppelin-COMQt6C0.js} +1 -1
  129. package/_assets/{parseNft-DRjeFTLz.js → parseNft-BDWge50l.js} +2 -2
  130. package/_assets/{parseSignature-iD6WB0Rv.js → parseSignature-BM5NvifW.js} +1 -1
  131. package/_assets/{parseSignature-Dnd81NC6.js → parseSignature-Wc6hp9uQ.js} +3 -3
  132. package/_assets/{passkeys-BkyTf0eV.js → passkeys-DrykTNZ2.js} +1 -1
  133. package/_assets/{pay-with-exchange-DPXvNbJL.js → pay-with-exchange-XXB29ZOp.js} +1 -1
  134. package/_assets/{qr-overlay-BhVHMnu6.js → qr-overlay-bXfX0IcB.js} +1 -1
  135. package/_assets/{receive-eVaQDREh.js → receive-nP-U5W2i.js} +1 -1
  136. package/_assets/{resolveImplementation-CFgY9LCD.js → resolveImplementation-BBJbUE3Z.js} +1 -1
  137. package/_assets/{rpc-CxZzFlD_.js → rpc-DCSM-4bg.js} +1 -1
  138. package/_assets/{secp256k1-B_W52ZUf.js → secp256k1-C2O_LFWe.js} +1 -1
  139. package/_assets/{secp256k1-dsaLnqmL.js → secp256k1-CgXAHR4D.js} +1 -1
  140. package/_assets/{secp256k1-DnfTzSex.js → secp256k1-DwDjCBcY.js} +1 -1
  141. package/_assets/{send-D4fV5XeL.js → send-Nwbt1L9h.js} +1 -1
  142. package/_assets/{send-batch-transaction-BYfh-S_2.js → send-batch-transaction-B1AHQzYS.js} +1 -1
  143. package/_assets/{send-eip712-transaction-D0HdHzLM.js → send-eip712-transaction-tjLA0QA7.js} +2 -2
  144. package/_assets/{send-gasless-transaction-DUDjLqeP.js → send-gasless-transaction-DcMpXxHQ.js} +2 -2
  145. package/_assets/{send-transaction-BqcOJrAL.js → send-transaction-DKMldJ0x.js} +2 -2
  146. package/_assets/{sendMetaTransaction-C0JzN9LI.js → sendMetaTransaction-BMdYRDeG.js} +1 -1
  147. package/_assets/{sendRawTransaction-Bfa9uLgL.js → sendRawTransaction-DCwkPyxN.js} +3 -3
  148. package/_assets/{serializeTransaction-QTvQ4Pcp.js → serializeTransaction-D7_FswuO.js} +1 -1
  149. package/_assets/{session-proposal-DWHkM92-.js → session-proposal-CuU2AfGE.js} +1 -1
  150. package/_assets/{session-request-DjGW8Qkl.js → session-request-DyvJhVCV.js} +2 -2
  151. package/_assets/{signing-DyK_lDFH.js → signing-NZTFOMTf.js} +3 -3
  152. package/_assets/{skeleton.styles-Dc_ZERtv.js → skeleton.styles-BxGPvRcr.js} +1 -1
  153. package/_assets/{socials-B_-om-t3.js → socials-DEw3CQ73.js} +1 -1
  154. package/_assets/{styled-Cj96yFi3.js → styled-Dp53Pb8_.js} +1 -1
  155. package/_assets/{swaps-Cmi2Gunc.js → swaps-B5ijNnAD.js} +1 -1
  156. package/_assets/{thirdweb-CMey7U_9.js → thirdweb-qQf9W59E.js} +3 -3
  157. package/_assets/{to-serializable-transaction-CwBzwgfs.js → to-serializable-transaction-w7hB_nia.js} +2 -2
  158. package/_assets/{transactionReceipt-DfMLC-1R.js → transactionReceipt-DZ540nfl.js} +1 -1
  159. package/_assets/{transactions-BT6vB4tY.js → transactions-iaPs2nV1.js} +1 -1
  160. package/_assets/{useCreditPacks-C_jgnHRc.js → useCreditPacks-CO4R81xj.js} +1 -1
  161. package/_assets/{useImportable-QV1qlFEy.js → useImportable-DxGmRiy1.js} +1 -1
  162. package/_assets/{useInfiniteGrid-C5uj0xks.js → useInfiniteGrid-DuP2ljFn.js} +1 -1
  163. package/_assets/{useTheme-BVc_OeyE.js → useTheme-BoTQmO03.js} +1 -1
  164. package/_assets/{verifyHash-DGy8u5b_.js → verifyHash-ChBtWS-V.js} +1 -1
  165. package/_assets/{w3m-modal-02XMSJu1.js → w3m-modal-CYiZhvkD.js} +1 -1
  166. package/_assets/{w3m-modal-CkTpDIV_.js → w3m-modal-Cue_2Zn9.js} +1 -1
  167. package/_assets/{wait-for-tx-receipt-BERyJmw5.js → wait-for-tx-receipt-Bswrc--t.js} +1 -1
  168. package/_assets/{wallets-B-2ulsIc.js → wallets-CX0kZMtf.js} +5 -5
  169. package/_assets/{web-connector-MP_30hTS.js → web-connector-DbZBNbcb.js} +3 -3
  170. package/_assets/{writeContract-C15uBGzX.js → writeContract-CyCztfKW.js} +1 -1
  171. package/_assets/{zoraTestnet-Dvl-D6P3.js → zoraTestnet-Bhd25heA.js} +1 -1
  172. package/index.html +11 -11
  173. package/package.json +2 -2
  174. package/_assets/Assets-DCZpVEl1.js +0 -895
  175. package/_assets/LazyEmoteControls-C5-pSXyf.js +0 -2
@@ -0,0 +1,895 @@
1
+ import{r as m,b as We,j as e,u as Ye}from"./react-BYHuwl8r.js";import{u as et}from"./useUrlFilters-DH-gxdfV.js";import{u as tt,S as Te,R as nt,F as st,e as it}from"./categories-C7-Px0Cz.js";import{c as O,r as ot,aK as at,aL as rt,aS as lt,a as ct,v as dt,cn as ht,co as pt,s,t,o as Be,aA as ft,A as ut,L as ye,b as n,y as mt,I as S,z as P,cp as ie,ax as xt,Z as ne,aP as gt,aO as yt,x as Pe,an as He,n as Ue,q as bt,ac as wt,ap as Re,aq as V,aY as Ct,bL as vt}from"./index-D0yb7tx6.js";import{g as jt,h as $t,i as kt,j as St,k as Et,C as Lt,l as Tt,o as Rt,m as _t,n as Mt,M as Ft,u as At,q as Nt,v as It,E as zt,r as Wt,p as Bt,s as Pt,t as Ht}from"./Assets.styles-B1wjUn65.js";import{L as Ut}from"./LoadMore-L0jdHqAb.js";import{u as Ot}from"./useInfiniteGrid-DuP2ljFn.js";import{E as Gt}from"./ErrorNotice-jD-FwtiS.js";import{d as Dt}from"./dcl-schemas-CmtP3U6y.js";import{s as qt,G as Zt,w as Vt,S as Kt}from"./buy-gasless-lErDvRBB.js";import{s as Qt,k as Jt}from"./buy-BUDAT54T.js";import{f as Xt}from"./errors-C5pxH9hH.js";import{J as Yt,C as en,B as be}from"./ethers-BDpbhgX6.js";import{n as tn}from"./Tooltip-BPV6o6wG.js";import{G as nn}from"./grid.styles-BQjREFrV.js";import"./skeleton.styles-BxGPvRcr.js";import"./sentry-Dx-KuLV3.js";import"./intl-CBcMB1D2.js";import"./authorizations-_of_k_s-.js";import"./sendMetaTransaction-BMdYRDeG.js";function K(i){const a=i.source??"item",o=i.tradeId||`${i.contractAddress}-${i.tokenId??i.itemId??""}`;return`${a}:${o}`}const G="100000000000000000000",Oe=2,se=15,sn=/^[a-zA-Z0-9]+$/;function _e(i){const a=i.trim();return a.length===0?{ok:!1,reason:"empty"}:sn.test(a)?a.length<Oe?{ok:!1,reason:"too-short"}:a.length>se?{ok:!1,reason:"too-long"}:{ok:!0}:{ok:!1,reason:"invalid-chars"}}function on(i){return i.replace(/[^a-zA-Z0-9]/g,"").slice(0,se)}const an=["function available(string _subdomain) view returns (bool)"],Me={mainnet:{rpc:"https://rpc.decentraland.org/mainnet",address:"0x2a187453064356c898cae034eaed119e1663acb8"},sepolia:{rpc:"https://rpc.decentraland.org/sepolia",address:"0x7518456ae93eb98f3e64571b689c626616bb7f30"}};function rn(){return O.chainId===Number(Dt.ChainId.MATIC_MAINNET)?Me.mainnet:Me.sepolia}async function ln(i,a={}){var u;const{rpc:o,address:h}=rn(),p=new Yt(o),x=new en(h,an,p);console.info(`[names] availability check → DCLRegistrar(${h}).available("${i}") on ${o}`);const l=await x.available(i);if((u=a.signal)!=null&&u.aborted)throw new DOMException("Aborted","AbortError");return console.info(`[names] "${i}" available=${l}`),l?"available":"taken"}const cn="https://app.across.to/api";class ve extends Error{constructor(){super("Name registration is temporarily unavailable due to high network costs"),this.name="NameRouteCostTooHighError"}}class we extends Error{constructor(){super("The name could not be registered on Ethereum; your funds were recovered."),this.name="NameNotRegisteredError"}}class Ce extends Error{constructor(){super("We couldn't confirm whether the purchase went through."),this.name="NameSettlementUnknownError"}}function dn(i){return lt(G,i)}async function hn(i,a,o={}){var u;const h=o.chainId??O.chainId,p=o.provider??"across",x=`${O.creditsServerUrl}/credits-name-route?name=${encodeURIComponent(a)}&chainId=${h}&provider=${p}`,l=await ct(x,{method:"GET",identity:i,metadata:{}});if(!l.ok){let c;try{c=(u=await l.json())==null?void 0:u.code}catch{}throw c==="ROUTE_COST_TOO_HIGH"?new ve:new Error(`fetchNameCreditRoute ${l.status}`)}return l.json()}function pn(i,a){const o=be.from(i.availableAmount),p=be.from(G).sub(o);return{credits:[{value:i.amount,expiresAt:Number(i.expiresAt),salt:Jt(i.id)}],creditsSignatures:[i.signature],externalCall:{target:a.externalCall.target,selector:a.externalCall.selector,data:a.externalCall.data,expiresAt:a.externalCall.expiresAt,salt:a.externalCall.salt},customExternalCallSignature:a.customExternalCallSignature,maxUncreditedValue:p.isNegative()?"0":p.toString(),maxCreditedValue:G}}async function fn(i,a={}){const o=cn,h=a.intervalMs??1e4,p=a.maxAttempts??60;let x={status:"pending",destinationTxHash:null,actionsSucceeded:null};for(let l=0;l<p;l++){try{const u=await fetch(`${o}/deposit/status?originChainId=137&depositTxHash=${i}`);if(u.ok){const c=await u.json(),d=(c.status??"pending").toLowerCase(),w=c.fillTx??c.fillTxnRef??null,y=typeof c.actionsSucceeded=="boolean"?c.actionsSucceeded:null;if(d==="filled")return{status:"filled",destinationTxHash:w,actionsSucceeded:y};if(d==="refunded"||d==="expired")return{status:d,destinationTxHash:null,actionsSucceeded:!1};x={status:"pending",destinationTxHash:w,actionsSucceeded:y}}}catch{}l<p-1&&await new Promise(u=>setTimeout(u,h))}return x}async function un(i){const{name:a,identity:o,signer:h}=i,p=i.chainId??O.chainId,x=i.provider??"across",l=(i.beneficiary??await h.getAddress()).toLowerCase();let u=null,c="unconfirmed";console.info("[names] register start",{name:a,buyer:l,chainId:p,provider:x});try{const d=await ot(p),w=dn(d);console.info("[names] step 1/6 sized reservation",{usdCents:w,manaRate:d});const y=await hn(o,a,{chainId:p,provider:x});console.info("[names] step 2/6 route fetched",{target:y.externalCall.target,selector:y.externalCall.selector,provider:y.provider,quoteId:y.quoteId});const j=await at(o,w);if(u=j.credit.id,console.info("[names] step 3/6 credit authorized",{creditId:j.credit.id,maxCreditedValue:j.maxCreditedValue}),be.from(j.maxCreditedValue).lt(G))throw new Error("Credit under-sized for the name price");const v=pn(j.credit,y);let g;try{g=await qt({chainId:p,buyer:l,signer:h,args:v})}catch(b){if(!(b instanceof Zt))throw b;if(b.reason==="relayer-unreachable"){c="unobservable";const $=new Ce;throw $.cause=b,$}g=await Qt(p,v,h)}if(console.info("[names] step 4/6 useCredits submitted (Polygon origin tx)",{originTxHash:g}),await Vt(g),c="confirmed",console.info("[names] step 5/6 origin tx confirmed",{originTxHash:g}),x==="across"){const b=await fn(g,i.acrossPoll);if(console.info("[names] step 6/6 across status",b),b.status==="pending")return{status:"pending",originTxHash:g};if(b.status==="filled"&&b.actionsSucceeded===null)return console.warn("[names] across filled without reporting actionsSucceeded — reporting pending",{originTxHash:g}),{status:"pending",originTxHash:g};if(b.status!=="filled"||b.actionsSucceeded!==!0)throw new we;return{status:"registered",originTxHash:g,destinationTxHash:b.destinationTxHash}}return{status:"pending",originTxHash:g}}catch(d){if(console.error("[names] register failed — raw error:",d,{name:a,buyer:l,originState:c}),d instanceof Kt)return{status:"pending",originTxHash:d.txHash};if(u&&c==="unconfirmed"&&await rt(o,[u]).catch(()=>{}),d instanceof ve||d instanceof we||d instanceof Ce)throw d;const w=new Error(Xt(d,"Couldn't register the name. Please try again.",{sale:!0}));throw w.cause=d,w}}function mn(){const{data:i}=dt({queryKey:["feature-flag","shop-names"],queryFn:()=>ht(pt.SHOP_NAMES),staleTime:6e4,refetchOnWindowFocus:!0,retry:1});return i===!0}const xn=60,gn=700,yn=25;function bn(i){if(!i)return[];const a=[];for(let o=1;o<=i.length;o++)a.push({text:i.slice(0,o),delay:xn});a[a.length-1]={text:i,delay:gn};for(let o=i.length-1;o>=1;o--)a.push({text:i.slice(0,o),delay:yn});return a}function wn(i){return i.flatMap(bn)}function Cn(i,a){const o=m.useMemo(()=>wn(i),[i]),[h,p]=m.useState(0);return m.useEffect(()=>{if(!a||o.length===0)return;const x=setTimeout(()=>p(l=>(l+1)%o.length),o[h%o.length].delay);return()=>clearTimeout(x)},[h,a,o]),!a||o.length===0?"":o[h%o.length].text}const vn="data:image/svg+xml,%3csvg%20preserveAspectRatio='none'%20overflow='visible'%20style='display:%20block;'%20width='46.999'%20height='46.999'%20viewBox='0%200%2046.999%2046.999'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Vector'%3e%3cpath%20d='M23.5861%2046.999C27.4441%2046.999%2031.1266%2046.1286%2034.3708%2044.475H12.8014C16.0456%2046.1286%2019.6405%2046.999%2023.5861%2046.999Z'%20fill='%23FCFCFC'%20fill-opacity='0.6'/%3e%3cpath%20d='M8.76807%2041.9509H38.1411C39.1056%2041.1676%2040.1577%2040.2102%2040.7715%2039.514H6.13765C7.01445%2040.3843%207.89126%2041.2547%208.76807%2041.9509Z'%20fill='%23FCFCFC'%20fill-opacity='0.6'/%3e%3cpath%20d='M25.0767%2034.0307H2.2797C2.80578%2035.0752%203.41955%2036.0326%204.03331%2036.9899H22.5339L25.0767%2034.0307Z'%20fill='%23FCFCFC'%20fill-opacity='0.6'/%3e%3cpath%20d='M23.5861%200C10.6094%200%200%2010.4442%200%2023.4125C0%2026.2846%200.526084%2029.0697%201.49057%2031.5938L10.6094%2020.7144L15.8702%2014.3608L28.6716%2029.679L32.3542%2025.2402L41.999%2036.7288H42.7882C45.5063%2032.8993%2046.9968%2028.2864%2046.9968%2023.3254C47.1722%2010.4442%2036.5628%200%2023.5861%200ZM15.7825%2012.272C13.9412%2012.272%2012.5383%2010.7924%2012.5383%209.05166C12.5383%207.31095%2014.0289%205.83136%2015.7825%205.83136C17.6238%205.83136%2019.0267%207.31095%2019.0267%209.05166C19.0267%2010.7924%2017.6238%2012.272%2015.7825%2012.272ZM32.8803%2022.8032C29.2853%2022.8032%2026.3919%2019.931%2026.3919%2016.3626C26.3919%2012.7942%2029.2853%209.92201%2032.8803%209.92201C36.4752%209.92201%2039.3686%2012.7942%2039.3686%2016.3626C39.4563%2019.931%2036.4752%2022.8032%2032.8803%2022.8032Z'%20fill='%23FCFCFC'%20fill-opacity='0.6'/%3e%3cpath%20d='M16.484%2018.7126V31.6808H27.2687L16.484%2018.7126Z'%20fill='%23FCFCFC'%20fill-opacity='0.6'/%3e%3cpath%20d='M33.1433%2037.164H39.2809L33.1433%2029.766V37.164Z'%20fill='%23FCFCFC'%20fill-opacity='0.6'/%3e%3c/g%3e%3c/svg%3e",jn="https://cdn.decentraland.org/@dcl/shop/1.2.0/_assets/name-verified-oGwQ3ntb.svg",$n="#34fee6",kn=s.div`
2
+ position: fixed;
3
+ inset: 0;
4
+ z-index: 10000;
5
+ display: flex;
6
+ align-items: center;
7
+ justify-content: center;
8
+ padding: 16px;
9
+ background: rgba(22, 21, 24, 0.55);
10
+ `,Sn=s.div`
11
+ width: 560px;
12
+ max-width: 100%;
13
+ max-height: 92vh;
14
+ overflow-y: auto;
15
+ background: ${t.colors.white};
16
+ border-radius: 16px;
17
+ padding: 20px 24px 24px;
18
+ box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
19
+
20
+ ${t.media.maxWidth("mobile")} {
21
+ padding: 16px;
22
+ }
23
+ `,oe=s.div`
24
+ display: flex;
25
+ align-items: flex-start;
26
+ justify-content: space-between;
27
+ gap: 12px;
28
+ `,ae=s.h2`
29
+ margin: 0;
30
+ font-family: ${t.font.sans};
31
+ font-weight: 700;
32
+ font-size: 20px;
33
+ line-height: 1.6;
34
+ color: ${t.colors.text};
35
+ `,re=s.button`
36
+ flex: none;
37
+ display: grid;
38
+ place-items: center;
39
+ width: 28px;
40
+ height: 28px;
41
+ border: 0;
42
+ background: none;
43
+ cursor: pointer;
44
+ color: ${t.colors.text};
45
+
46
+ .ico {
47
+ width: 18px;
48
+ height: 18px;
49
+ }
50
+ &:disabled {
51
+ opacity: 0.4;
52
+ cursor: default;
53
+ }
54
+ &:focus-visible {
55
+ outline: 2px solid ${t.colors.accent};
56
+ outline-offset: 2px;
57
+ }
58
+ `,le=s.div`
59
+ display: flex;
60
+ align-items: center;
61
+ gap: 6px;
62
+ margin-top: 4px;
63
+ font-family: ${t.font.sans};
64
+ font-size: 14px;
65
+ color: ${t.colors.text2};
66
+
67
+ .ico {
68
+ width: 16px;
69
+ height: 16px;
70
+ color: ${t.colors.brandViolet};
71
+ }
72
+ `,ce=s.hr`
73
+ border: 0;
74
+ border-top: 1px solid ${t.colors.line};
75
+ margin: 16px 0;
76
+ `,de=s.div`
77
+ display: flex;
78
+ align-items: center;
79
+ gap: 16px;
80
+ `,En=s.div`
81
+ flex: none;
82
+ display: flex;
83
+ flex-direction: column;
84
+ align-items: center;
85
+ justify-content: center;
86
+ gap: 12px;
87
+ width: 137px;
88
+ height: 137px;
89
+ padding: 20px 0;
90
+ border-radius: 12px;
91
+ overflow: hidden;
92
+ background: ${t.gradients.amethyst};
93
+ `,Ln=s.img`
94
+ display: block;
95
+ width: 47px;
96
+ height: 47px;
97
+ `,Tn=s.span`
98
+ display: inline-flex;
99
+ align-items: center;
100
+ gap: 2px;
101
+ max-width: 100%;
102
+ padding: 0 8px;
103
+ font-family: ${t.font.sans};
104
+ font-size: 18px;
105
+ font-weight: 600;
106
+ /* The design's cyan — it has to read against the purple, which the body text colour would not. */
107
+ color: ${$n};
108
+ white-space: nowrap;
109
+ overflow: hidden;
110
+
111
+ /* Truncation belongs on the flex item, not this box: text-overflow is inert on a flex container, and
112
+ the zero min-width is what lets the name shrink instead of pushing the tick out. */
113
+ > span {
114
+ min-width: 0;
115
+ overflow: hidden;
116
+ text-overflow: ellipsis;
117
+ }
118
+ `,Rn=s.img`
119
+ flex: none;
120
+ display: block;
121
+ width: 14px;
122
+ height: 14px;
123
+ `,Fe=s.div`
124
+ flex: none;
125
+ display: grid;
126
+ place-items: center;
127
+ width: 56px;
128
+ height: 56px;
129
+ border-radius: 10px;
130
+ background: ${t.gradients.amethyst};
131
+ color: ${t.colors.white};
132
+
133
+ .ico {
134
+ width: 30px;
135
+ height: 30px;
136
+ }
137
+ `,he=s.div`
138
+ flex: 1;
139
+ min-width: 0;
140
+ `,pe=s.div`
141
+ font-family: ${t.font.sans};
142
+ font-weight: 700;
143
+ font-size: 20px;
144
+ line-height: 1.3;
145
+ color: ${t.colors.text};
146
+ overflow: hidden;
147
+ text-overflow: ellipsis;
148
+ white-space: nowrap;
149
+
150
+ span {
151
+ font-weight: 400;
152
+ color: ${t.colors.muted2};
153
+ }
154
+ `,fe=s.div`
155
+ font-family: ${t.font.sans};
156
+ font-size: 14px;
157
+ color: ${t.colors.muted2};
158
+ `,ue=s.div`
159
+ flex: none;
160
+ display: flex;
161
+ align-items: center;
162
+ gap: 6px;
163
+ font-family: ${t.font.sans};
164
+ font-weight: 600;
165
+ font-size: 24px;
166
+ color: ${t.colors.text};
167
+
168
+ .ico {
169
+ width: 22px;
170
+ height: 22px;
171
+ color: ${t.colors.brandViolet};
172
+ }
173
+ `,_n=s.div`
174
+ margin-top: 16px;
175
+ padding: 16px;
176
+ border-radius: 12px;
177
+ background: ${t.colors.promptLilac};
178
+ `,Mn=s.div`
179
+ font-family: ${t.font.sans};
180
+ font-weight: 700;
181
+ font-size: 16px;
182
+ color: ${t.colors.text};
183
+ `,Fn=s.p`
184
+ margin: 8px 0 16px;
185
+ font-family: ${t.font.sans};
186
+ font-size: 14px;
187
+ line-height: 1.5;
188
+ color: ${t.colors.text2};
189
+
190
+ /* The chosen NAME is filled with the gradient the design runs through it (1356:335140), not a flat
191
+ violet — background-clip is the only way to paint a text run with one. */
192
+ b {
193
+ font-weight: 700;
194
+ background: linear-gradient(180deg, ${t.colors.dclRed}, ${t.colors.magenta});
195
+ background-clip: text;
196
+ -webkit-background-clip: text;
197
+ color: transparent;
198
+ }
199
+ `,An=s.label`
200
+ display: flex;
201
+ align-items: center;
202
+ gap: 8px;
203
+ padding: 12px 14px;
204
+ background: ${t.colors.softWhite};
205
+ /* A hairline in Gray 2, not a full pixel of soft-black: this field sits INSIDE the lilac panel and
206
+ the heavier edge made it read as the modal's primary control (Figma 1356:335172). */
207
+ border: 0.5px solid ${t.colors.muted};
208
+ border-radius: 8px;
209
+ cursor: text;
210
+
211
+ &:focus-within {
212
+ border-color: ${t.colors.magenta};
213
+ }
214
+ `,Nn=s.span`
215
+ flex: none;
216
+ font-family: ${t.font.sans};
217
+ font-size: 18px;
218
+ color: ${t.colors.muted2};
219
+ `,In=s.input`
220
+ flex: 0 1 auto;
221
+ min-width: 0;
222
+ border: 0;
223
+ outline: none;
224
+ background: transparent;
225
+ font-family: ${t.font.sans};
226
+ font-size: 16px;
227
+ font-weight: 600;
228
+ color: ${t.colors.text};
229
+
230
+ &::placeholder {
231
+ color: ${t.colors.muted2};
232
+ font-weight: 400;
233
+ }
234
+ `,zn=s.span`
235
+ flex: none;
236
+ font-family: ${t.font.sans};
237
+ font-size: 16px;
238
+ color: ${t.colors.muted2};
239
+ `,me=s.button`
240
+ margin-top: 16px;
241
+ width: 100%;
242
+ height: 46px;
243
+ border: 0;
244
+ border-radius: 12px;
245
+ cursor: pointer;
246
+ background: ${t.gradients.buyBtn};
247
+ color: ${t.colors.softWhite};
248
+ font-family: ${t.font.sans};
249
+ font-weight: 600;
250
+ font-size: 15px;
251
+ letter-spacing: 0.46px;
252
+ text-transform: uppercase;
253
+ transition: background-image 0.15s ease;
254
+
255
+ /* Both ends stay on background-IMAGE: a gradient cannot interpolate to a plain colour, so swapping
256
+ the shorthand instead blanks the button for the length of the transition. */
257
+ &:hover:not(:disabled),
258
+ &:active:not(:disabled) {
259
+ background-image: linear-gradient(${t.colors.dclRed}, ${t.colors.dclRed});
260
+ }
261
+ &:focus-visible {
262
+ outline: 2px solid ${t.colors.accent};
263
+ outline-offset: 2px;
264
+ }
265
+ &:disabled {
266
+ cursor: not-allowed;
267
+ opacity: 0.5;
268
+ }
269
+ `,Wn=s.div`
270
+ display: flex;
271
+ flex-direction: column;
272
+ align-items: flex-start;
273
+ gap: 20px;
274
+ padding: 32px 0 8px;
275
+ `,Bn=s.img`
276
+ align-self: center;
277
+ width: 56px;
278
+ height: 56px;
279
+ `,Pn=s.div`
280
+ font-family: ${t.font.sans};
281
+ font-weight: 700;
282
+ font-size: 18px;
283
+ color: ${t.colors.text};
284
+ `,Hn=s.div`
285
+ display: flex;
286
+ align-items: center;
287
+ gap: 12px;
288
+ width: 100%;
289
+ `,Un=s.div`
290
+ flex: 1;
291
+ height: 8px;
292
+ border-radius: 999px;
293
+ background: ${t.colors.chip};
294
+ overflow: hidden;
295
+
296
+ span {
297
+ display: block;
298
+ height: 100%;
299
+ width: 40%;
300
+ border-radius: 999px;
301
+ background: ${t.gradients.amethyst};
302
+ animation: nameProgress 1.1s ease-in-out infinite;
303
+ }
304
+
305
+ @keyframes nameProgress {
306
+ 0% {
307
+ transform: translateX(-100%);
308
+ }
309
+ 100% {
310
+ transform: translateX(320%);
311
+ }
312
+ }
313
+ `,On=s.span`
314
+ flex: none;
315
+ font-family: ${t.font.sans};
316
+ font-size: 14px;
317
+ color: ${t.colors.muted};
318
+ `,Gn=s.div`
319
+ display: flex;
320
+ flex-direction: column;
321
+ align-items: center;
322
+ gap: 16px;
323
+ padding: 24px;
324
+ border-radius: 12px;
325
+ background: #e2f5ea;
326
+ text-align: center;
327
+ `,Dn=s.div`
328
+ display: grid;
329
+ place-items: center;
330
+ width: 56px;
331
+ height: 56px;
332
+ border-radius: 50%;
333
+ background: ${t.colors.ok};
334
+ color: ${t.colors.white};
335
+
336
+ .ico {
337
+ width: 30px;
338
+ height: 30px;
339
+ }
340
+ `,qn=s.p`
341
+ margin: 0;
342
+ font-family: ${t.font.sans};
343
+ font-size: 16px;
344
+ line-height: 1.4;
345
+ color: ${t.colors.text};
346
+
347
+ b {
348
+ font-weight: 700;
349
+ }
350
+ `,Ae=s.div`
351
+ display: flex;
352
+ gap: 16px;
353
+ margin-top: 20px;
354
+
355
+ ${t.media.maxWidth("mobile")} {
356
+ flex-direction: column;
357
+ }
358
+ `,Ne=s.button`
359
+ flex: 1;
360
+ height: 48px;
361
+ border: 1px solid ${t.colors.accent};
362
+ border-radius: 8px;
363
+ background: ${t.colors.white};
364
+ color: ${t.colors.accent};
365
+ cursor: pointer;
366
+ font-family: ${t.font.sans};
367
+ font-weight: 600;
368
+ font-size: 13px;
369
+ letter-spacing: 0.46px;
370
+ text-transform: uppercase;
371
+
372
+ &:hover {
373
+ background: rgba(105, 31, 169, 0.06);
374
+ }
375
+ &:focus-visible {
376
+ outline: 2px solid ${t.colors.accent};
377
+ outline-offset: 2px;
378
+ }
379
+ `,Zn=s.a`
380
+ flex: 1;
381
+ display: inline-flex;
382
+ align-items: center;
383
+ justify-content: center;
384
+ height: 48px;
385
+ border-radius: 8px;
386
+ background: ${t.colors.dclRed};
387
+ color: ${t.colors.softWhite};
388
+ cursor: pointer;
389
+ text-decoration: none;
390
+ font-family: ${t.font.sans};
391
+ font-weight: 600;
392
+ font-size: 13px;
393
+ letter-spacing: 0.46px;
394
+ text-transform: uppercase;
395
+
396
+ &:hover {
397
+ filter: brightness(1.05);
398
+ }
399
+ &:focus-visible {
400
+ outline: 2px solid ${t.colors.accent};
401
+ outline-offset: 2px;
402
+ }
403
+ `,xe=s.div`
404
+ display: flex;
405
+ align-items: flex-start;
406
+ gap: 12px;
407
+ padding: 16px;
408
+ margin-top: 8px;
409
+ border-radius: 12px;
410
+ background: rgba(255, 45, 85, 0.1);
411
+ font-family: ${t.font.sans};
412
+ font-size: 14px;
413
+ line-height: 1.5;
414
+ color: ${t.colors.text};
415
+
416
+ .ico {
417
+ width: 22px;
418
+ height: 22px;
419
+ flex: none;
420
+ color: ${t.colors.dclRed};
421
+ }
422
+
423
+ /**
424
+ * Informational, not a failure. Used for "your payment went through, the NAME is on its way" and for the
425
+ * reason a purchase is not available yet (no price, not enough credits) — none of which is an error, and
426
+ * all of which would contradict themselves rendered in the red error treatment.
427
+ */
428
+ &[data-tone='info'] {
429
+ background: ${t.colors.panel};
430
+
431
+ .ico {
432
+ color: ${t.colors.accent};
433
+ }
434
+ }
435
+ `;function Vn({name:i,priceCredits:a,onClose:o}){const{session:h}=Be(),{data:p,isError:x}=ft(h),l=ut(),u=We(),[c,d]=m.useState("confirm"),[w,y]=m.useState(""),[j,v]=m.useState(null),[g,b]=m.useState(!1),$=m.useRef(!1),_=w.trim().toLowerCase()===i.toLowerCase(),T=c==="completing",k=a!=null?ye(a):"—",F=a==null,N=p==null?void 0:p.credits,z=a!=null&&N!=null?a-N:0,M=z>0,I=F?n("names.priceUnavailable"):M?n("names.insufficientCredits",{credits:ye(z)}):null;m.useEffect(()=>{const f=L=>{L.key==="Escape"&&!T&&o()};document.addEventListener("keydown",f);const C=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",f),document.body.style.overflow=C}},[T,o]);async function R(){if(!(!h||!_||F||M||$.current)){$.current=!0,d("completing"),v(null);try{const f=await un({name:i,identity:h.identity,signer:h.signer});ne("Shop Completed Purchase",{purchase_type:"name",is_primary:!0,payment_type:"credits",value_credits:a??null,settlement:f.status}),l.invalidateQueries({queryKey:["usd-balance"]}),l.invalidateQueries({queryKey:["my-assets"]}),d(f.status==="registered"?"success":"pending")}catch(f){ne(yt(f)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:gt(f),purchase_type:"name"});const C=f instanceof we,L=f instanceof Ce;v(f instanceof ve?n("names.errorRouteCost"):C?n("names.errorNotRegistered"):L?n("names.errorSettlementUnknown"):(f==null?void 0:f.message)||n("names.errorGeneric")),b(C||L),d("error")}finally{$.current=!1}}}const H=c!=="success"&&c!=="pending",E=mt(h==null?void 0:h.providerType);return e.jsx(kn,{onClick:T?void 0:o,role:"presentation",children:e.jsxs(Sn,{role:"dialog","aria-modal":"true","aria-label":n("names.buyTitle"),onClick:f=>f.stopPropagation(),children:[H&&e.jsxs(e.Fragment,{children:[e.jsxs(oe,{children:[e.jsx(ae,{children:c==="error"?n("names.errorTitle"):n("names.buyTitle")}),e.jsx(re,{onClick:o,disabled:T,"aria-label":n("buyModal.close"),children:e.jsx(S,{name:"close"})})]}),e.jsxs(le,{children:[n("names.myCreditsBalance")," ",e.jsx(P,{})," ",ie(p,x)]}),e.jsx(ce,{})]}),(c==="confirm"||c==="error")&&e.jsxs(e.Fragment,{children:[e.jsxs(de,{children:[e.jsx(Fe,{"aria-hidden":!0,children:"@"}),e.jsxs(he,{children:[e.jsxs(pe,{children:[i,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(fe,{children:n("names.subtitle")})]}),e.jsxs(ue,{children:[e.jsx(P,{}),k]})]}),c==="error"?e.jsxs(e.Fragment,{children:[e.jsxs(xe,{children:[e.jsx(S,{name:"info","aria-hidden":!0}),e.jsx("span",{children:j})]}),g?e.jsx(me,{onClick:o,children:n("names.errorSpentDismiss")}):e.jsx(me,{onClick:()=>d("confirm"),children:n("names.tryAgain")})]}):e.jsxs(e.Fragment,{children:[e.jsxs(_n,{children:[e.jsx(Mn,{children:n("names.confirmTitle")}),e.jsx(Fn,{dangerouslySetInnerHTML:{__html:n("names.confirmBody",{name:`<b>@${Kn(i)}</b>`})}}),e.jsxs(An,{children:[e.jsx(Nn,{"aria-hidden":!0,children:"@"}),e.jsx(In,{value:w,onChange:f=>y(f.target.value.replace(/[^a-zA-Z0-9]/g,"")),placeholder:"yourname","aria-label":n("names.reenterAria"),autoComplete:"off",spellCheck:!1,style:{width:`${Math.max(w.length,8)}ch`}}),e.jsx(zn,{children:".dcl.eth"})]})]}),I?e.jsxs(xe,{"data-tone":"info","data-testid":"name-blocked-reason",children:[e.jsx(S,{name:"info","aria-hidden":!0}),e.jsx("span",{children:I})]}):null,e.jsx(me,{onClick:()=>void R(),disabled:!_||!h||F||M,children:n("names.buyCta")})]})]}),c==="completing"&&e.jsxs(Wn,{children:[e.jsx(Bn,{src:xt,alt:"",width:56,height:56}),e.jsx(Pn,{children:E?n("names.confirming"):n("names.completing")}),e.jsxs(Hn,{children:[e.jsx(Un,{"aria-hidden":!0,children:e.jsx("span",{})}),e.jsx(On,{children:"1/1"})]})]}),c==="pending"&&e.jsxs(e.Fragment,{children:[e.jsxs(oe,{children:[e.jsx(ae,{children:n("names.pendingHeaderTitle")}),e.jsx(re,{onClick:o,"aria-label":n("buyModal.close"),children:e.jsx(S,{name:"close"})})]}),e.jsxs(le,{children:[n("names.myCreditsBalance")," ",e.jsx(P,{})," ",ie(p,x)]}),e.jsx(ce,{}),e.jsxs(xe,{"data-tone":"info",children:[e.jsx(S,{name:"info","aria-hidden":!0}),e.jsxs("span",{children:[e.jsx("b",{children:n("names.pendingBannerBold")})," ",n("names.pendingBannerRest")]})]}),e.jsxs(de,{style:{marginTop:20},children:[e.jsx(Fe,{"aria-hidden":!0,children:"@"}),e.jsxs(he,{children:[e.jsxs(pe,{children:[i,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(fe,{children:n("names.subtitle")})]}),e.jsxs(ue,{children:[e.jsx(P,{}),k]})]}),e.jsx(Ae,{children:e.jsx(Ne,{onClick:()=>{o(),u("/my-items")},children:n("names.myItems")})})]}),c==="success"&&e.jsxs(e.Fragment,{children:[e.jsxs(oe,{children:[e.jsx(ae,{children:n("names.successHeaderTitle")}),e.jsx(re,{onClick:o,"aria-label":n("buyModal.close"),children:e.jsx(S,{name:"close"})})]}),e.jsxs(le,{children:[n("names.myCreditsBalance")," ",e.jsx(P,{})," ",ie(p,x)]}),e.jsx(ce,{}),e.jsxs(Gn,{children:[e.jsx(Dn,{"aria-hidden":!0,children:e.jsx(S,{name:"check"})}),e.jsxs(qn,{children:[e.jsx("b",{children:n("names.successBannerBold")})," ",n("names.successBannerRest")]})]}),e.jsxs(de,{style:{marginTop:20},children:[e.jsxs(En,{"data-testid":"name-success-tile",children:[e.jsx(Ln,{src:vn,alt:"","aria-hidden":!0,width:47,height:47}),e.jsxs(Tn,{children:[e.jsx("span",{"aria-hidden":!0,children:i}),e.jsx(Rn,{src:jn,alt:"","aria-hidden":!0,width:14,height:14})]})]}),e.jsxs(he,{children:[e.jsxs(pe,{children:[i,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(fe,{children:n("names.subtitle")})]}),e.jsxs(ue,{children:[e.jsx(P,{}),k]})]}),e.jsxs(Ae,{children:[e.jsx(Ne,{onClick:()=>{o(),u("/my-items")},children:n("names.myItems")}),e.jsx(Zn,{href:O.profileUrl,target:"_blank",rel:"noopener noreferrer",children:n("names.assignToAvatar")})]})]})]})})}function Kn(i){return i.replace(/[&<>"']/g,a=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"})[a])}const Qn="https://cdn.decentraland.org/@dcl/shop/1.2.0/_assets/identity-icon-C8yAW_Gq.svg",Jn="https://cdn.decentraland.org/@dcl/shop/1.2.0/_assets/world-icon-6xQ-PmmW.svg",Xn="https://cdn.decentraland.org/@dcl/shop/1.2.0/_assets/invite-icon-Bz6lCTuB.svg",Yn="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",es=s.div`
436
+ width: 100%;
437
+ min-width: 0;
438
+ `,ts=s.nav`
439
+ display: flex;
440
+ align-items: center;
441
+ gap: 6px;
442
+ margin: 4px 0 16px;
443
+ font-family: ${t.font.sans};
444
+ font-size: 12px;
445
+ line-height: 1;
446
+ color: ${t.colors.gray4};
447
+ `,ns=s.button`
448
+ border: 0;
449
+ background: none;
450
+ padding: 0;
451
+ cursor: pointer;
452
+ font: inherit;
453
+ color: ${t.colors.gray4};
454
+
455
+ &:hover {
456
+ color: ${t.colors.white};
457
+ text-decoration: underline;
458
+ }
459
+ &:focus-visible {
460
+ outline: 2px solid ${t.colors.white};
461
+ outline-offset: 2px;
462
+ }
463
+ `,ss=s.span`
464
+ font-weight: 700;
465
+ color: ${t.colors.softWhite};
466
+ `,is=s.div`
467
+ display: flex;
468
+ flex-direction: column;
469
+ gap: 48px;
470
+ padding-bottom: 48px;
471
+
472
+ ${t.media.maxWidth("mobile")} {
473
+ gap: 32px;
474
+ padding-bottom: 32px;
475
+ }
476
+ `,os=s.div`
477
+ position: relative;
478
+ border: 1px solid ${t.colors.magenta};
479
+ border-radius: 24px;
480
+ overflow: hidden;
481
+ padding: 88px 48px;
482
+ display: flex;
483
+ flex-direction: column;
484
+ align-items: center;
485
+ gap: 48px;
486
+ text-align: center;
487
+ background: ${t.colors.overlay};
488
+
489
+ ${t.media.maxWidth("mobile")} {
490
+ padding: 40px 20px;
491
+ gap: 28px;
492
+ }
493
+ `,as=s.div`
494
+ display: flex;
495
+ flex-direction: column;
496
+ align-items: center;
497
+ gap: 12px;
498
+ `,rs=s.h1`
499
+ margin: 0;
500
+ font-family: ${t.font.sans};
501
+ font-weight: 600;
502
+ font-size: 40px;
503
+ line-height: 1.167;
504
+ color: ${t.colors.white};
505
+
506
+ ${t.media.maxWidth("mobile")} {
507
+ font-size: 26px;
508
+ }
509
+ `,ls=s.p`
510
+ margin: 0;
511
+ max-width: 760px;
512
+ font-family: ${t.font.sans};
513
+ font-weight: 500;
514
+ font-size: 24px;
515
+ line-height: 1.334;
516
+ color: #ecebed;
517
+
518
+ ${t.media.maxWidth("mobile")} {
519
+ font-size: 16px;
520
+ }
521
+ `,cs=s.div`
522
+ width: min(785px, 100%);
523
+ display: flex;
524
+ flex-direction: column;
525
+ gap: 12px;
526
+ `,ds=s.div`
527
+ position: relative;
528
+ `,hs=s("div",tn("invalid"))`
529
+ display: flex;
530
+ align-items: center;
531
+ gap: 8px;
532
+ padding: 8px 8px 8px 16px;
533
+ background: ${t.colors.softWhite};
534
+ /* Figma 1368:349148 gives the field a 3px Orange edge — it is the page's one input, and the design
535
+ leans on that weight to carry it. Red only when what has been typed cannot be claimed. */
536
+ border: 3px solid ${({invalid:i})=>i?t.colors.dclRed:t.colors.orange};
537
+ border-radius: 20px;
538
+
539
+ &:focus-within {
540
+ border-color: ${({invalid:i})=>i?t.colors.dclRed:t.colors.magenta};
541
+ }
542
+
543
+ ${t.media.maxWidth("mobile")} {
544
+ border-radius: 16px;
545
+ }
546
+ `,ps=s.span`
547
+ position: absolute;
548
+ left: -9999px;
549
+ top: 0;
550
+ visibility: hidden;
551
+ pointer-events: none;
552
+ white-space: pre;
553
+ font-family: ${t.font.sans};
554
+ font-size: 20px;
555
+ font-weight: 600;
556
+ line-height: 1.6;
557
+
558
+ /* An empty field paints the PLACEHOLDER, which is lighter than a typed value — so the mirror has to
559
+ be lighter too. Measuring the placeholder at the value's weight made the box a few pixels wider
560
+ than the text in it, and ".dcl.eth" sat that far off the end of the word. */
561
+ &[data-placeholder] {
562
+ font-weight: 400;
563
+ }
564
+
565
+ ${t.media.maxWidth("mobile")} {
566
+ font-size: 16px;
567
+ }
568
+ `,fs=s.div`
569
+ position: absolute;
570
+ top: calc(100% + 8px);
571
+ left: 0;
572
+ right: 0;
573
+ z-index: 2;
574
+ display: flex;
575
+ align-items: center;
576
+ gap: 8px;
577
+ padding: 8px 12px;
578
+ border-radius: 8px;
579
+ background: #ffcdd4;
580
+ color: #ec303a;
581
+ font-family: ${t.font.sans};
582
+ font-size: 14px;
583
+ font-weight: 500;
584
+ line-height: 1.2;
585
+ text-align: left;
586
+
587
+ ${t.media.maxWidth("mobile")} {
588
+ position: static;
589
+ margin-top: 8px;
590
+ align-items: flex-start;
591
+ flex-wrap: wrap;
592
+ }
593
+ `,Ge=s.a`
594
+ display: inline-flex;
595
+ align-items: center;
596
+ gap: 2px;
597
+ margin-left: auto;
598
+ font-weight: 600;
599
+ text-decoration: underline;
600
+ text-transform: uppercase;
601
+ white-space: nowrap;
602
+
603
+ ${t.media.maxWidth("mobile")} {
604
+ margin-left: 0;
605
+ }
606
+ `,us=s(Ge)`
607
+ color: #ec303a;
608
+ `,ms=s.label`
609
+ flex: 1;
610
+ min-width: 0;
611
+ display: flex;
612
+ align-items: center;
613
+ gap: 0;
614
+ cursor: text;
615
+ overflow: hidden;
616
+ `,xs=s.span`
617
+ flex: none;
618
+ margin-right: 8px;
619
+ font-family: ${t.font.sans};
620
+ font-size: 26px;
621
+ font-weight: 500;
622
+ line-height: 1;
623
+ color: ${t.colors.muted2};
624
+
625
+ ${t.media.maxWidth("mobile")} {
626
+ font-size: 20px;
627
+ }
628
+ `,gs=s.input`
629
+ flex: 0 1 auto;
630
+ min-width: 0;
631
+ max-width: 100%;
632
+ border: 0;
633
+ outline: none;
634
+ background: transparent;
635
+ font-family: ${t.font.sans};
636
+ font-size: 20px;
637
+ font-weight: 600;
638
+ line-height: 1.6;
639
+ color: ${t.colors.text};
640
+ padding: 0;
641
+
642
+ &::placeholder {
643
+ color: ${t.colors.muted1};
644
+ font-weight: 400;
645
+ }
646
+
647
+ ${t.media.maxWidth("mobile")} {
648
+ font-size: 16px;
649
+ }
650
+ `,ys=s.span`
651
+ flex: none;
652
+ /* Flush against the name: "yourname.dcl.eth" has to read as one address, and at 20px even a couple of
653
+ pixels here look like a space someone typed by mistake. */
654
+ margin-left: 0;
655
+ /* Not selectable: it is the fixed part of the address, not something the reader typed. */
656
+ user-select: none;
657
+ -webkit-user-select: none;
658
+ font-family: ${t.font.sans};
659
+ font-size: 20px;
660
+ font-weight: 400;
661
+ line-height: 1.6;
662
+ color: ${t.colors.muted1};
663
+
664
+ ${t.media.maxWidth("mobile")} {
665
+ font-size: 16px;
666
+ }
667
+ `,bs=s.span`
668
+ flex: none;
669
+ font-family: ${t.font.sans};
670
+ font-size: 14px;
671
+ line-height: 1.43;
672
+ color: ${t.colors.muted2};
673
+ white-space: nowrap;
674
+ `,De=s.button`
675
+ flex: none;
676
+ display: inline-flex;
677
+ align-items: center;
678
+ justify-content: center;
679
+ gap: 8px;
680
+ height: 52px;
681
+ padding: 0 24px;
682
+ border: 0;
683
+ border-radius: 12px;
684
+ cursor: pointer;
685
+ background: ${t.gradients.buyBtn};
686
+ color: ${t.colors.softWhite};
687
+ font-family: ${t.font.sans};
688
+ font-weight: 600;
689
+ font-size: 15px;
690
+ letter-spacing: 0.46px;
691
+ line-height: 24px;
692
+ text-transform: uppercase;
693
+ transition: background-image 0.15s ease;
694
+
695
+ /* Both ends stay on background-IMAGE: a gradient cannot interpolate to a plain colour, so swapping
696
+ the background shorthand instead blanks the button for the length of the transition. */
697
+ &:hover:not(:disabled),
698
+ &:active:not(:disabled) {
699
+ background-image: linear-gradient(${t.colors.dclRed}, ${t.colors.dclRed});
700
+ }
701
+ &:focus-visible {
702
+ outline: 2px solid ${t.colors.white};
703
+ outline-offset: 2px;
704
+ }
705
+ &:disabled {
706
+ cursor: not-allowed;
707
+ opacity: 0.5;
708
+ }
709
+
710
+ ${t.media.maxWidth("mobile")} {
711
+ display: none;
712
+ }
713
+ `,ws=s(De)`
714
+ display: none;
715
+
716
+ ${t.media.maxWidth("mobile")} {
717
+ display: inline-flex;
718
+ width: 100%;
719
+ height: 48px;
720
+ border-radius: 12px;
721
+ }
722
+ `,Cs=s.span`
723
+ display: inline-flex;
724
+ align-items: center;
725
+ gap: 4px;
726
+ font-size: 18px;
727
+ font-weight: 600;
728
+
729
+ .ico {
730
+ width: 13.26px;
731
+ height: 14px;
732
+ }
733
+ `,vs=s.div`
734
+ display: flex;
735
+ align-items: center;
736
+ gap: 8px;
737
+ padding: 8px 14px;
738
+ border-radius: 8px;
739
+ font-family: ${t.font.sans};
740
+ font-size: 13px;
741
+ font-weight: 500;
742
+ text-align: left;
743
+
744
+ background: ${({tone:i})=>i==="error"?"rgba(255, 45, 85, 0.12)":i==="ok"?"rgba(30, 166, 114, 0.14)":"rgba(255,255,255,0.14)"};
745
+ color: ${({tone:i})=>i==="error"?t.colors.dclRed:i==="ok"?"#0f7a4f":"#ecebed"};
746
+
747
+ .ico {
748
+ width: 16px;
749
+ height: 16px;
750
+ flex: none;
751
+ }
752
+ `,Q=s(vs)`
753
+ position: absolute;
754
+ top: calc(100% + 8px);
755
+ left: 0;
756
+ right: 0;
757
+ z-index: 2;
758
+
759
+ /* Static on mobile, as TakenBanner is: the claim button sits below InputWrap there, so anything
760
+ floating out of the input lands on top of it. */
761
+ ${t.media.maxWidth("mobile")} {
762
+ position: static;
763
+ margin-top: 8px;
764
+ }
765
+ `,js=s(Ge)`
766
+ color: inherit;
767
+ `,$s=s.section`
768
+ display: flex;
769
+ flex-direction: column;
770
+ gap: 48px;
771
+ padding: 0 48px;
772
+
773
+ ${t.media.maxWidth("mobile")} {
774
+ gap: 32px;
775
+ padding: 0 20px;
776
+ }
777
+ `,ks=s.div`
778
+ display: flex;
779
+ flex-direction: column;
780
+ align-items: center;
781
+ gap: 24px;
782
+ `,Ss=s.h2`
783
+ margin: 0;
784
+ text-align: center;
785
+ font-family: ${t.font.sans};
786
+ font-weight: 600;
787
+ font-size: 32px;
788
+ line-height: 1.167;
789
+ color: ${t.colors.white};
790
+
791
+ ${t.media.maxWidth("mobile")} {
792
+ font-size: 22px;
793
+ }
794
+ `,Es=s.p`
795
+ margin: 0;
796
+ max-width: 907px;
797
+ text-align: center;
798
+ font-family: ${t.font.sans};
799
+ font-weight: 400;
800
+ font-size: 20px;
801
+ line-height: 1.57;
802
+ color: ${t.colors.gray4};
803
+
804
+ ${t.media.maxWidth("mobile")} {
805
+ font-size: 16px;
806
+ }
807
+ `,Ls=s.div`
808
+ display: grid;
809
+ grid-template-columns: repeat(4, 1fr);
810
+ gap: 24px;
811
+ align-items: stretch;
812
+
813
+ ${t.media.maxWidth("lg")} {
814
+ grid-template-columns: repeat(2, 1fr);
815
+ }
816
+ ${t.media.maxWidth("mobile")} {
817
+ grid-template-columns: 1fr;
818
+ }
819
+ `,J=s.article`
820
+ min-width: 0;
821
+ display: flex;
822
+ flex-direction: column;
823
+ gap: 32px;
824
+ padding: 24px;
825
+ background: ${t.colors.overlay};
826
+ border-radius: 24px;
827
+
828
+ @media (forced-colors: active) {
829
+ outline: 1px solid CanvasText;
830
+ }
831
+
832
+ ${t.media.maxWidth("mobile")} {
833
+ gap: 20px;
834
+ padding: 20px;
835
+ }
836
+ `,X=s.img`
837
+ display: block;
838
+ align-self: flex-start;
839
+ height: 55px;
840
+ width: auto;
841
+ `,Y=s.div`
842
+ flex: 1;
843
+ display: flex;
844
+ flex-direction: column;
845
+ gap: 12px;
846
+ `,ee=s.h3`
847
+ margin: 0;
848
+ font-family: ${t.font.sans};
849
+ font-weight: 700;
850
+ font-size: 20px;
851
+ line-height: 1.57;
852
+ text-transform: uppercase;
853
+ color: ${t.colors.white};
854
+ `,te=s.p`
855
+ margin: 0;
856
+ font-family: ${t.font.sans};
857
+ font-weight: 400;
858
+ font-size: 14px;
859
+ line-height: 1.57;
860
+ color: ${t.colors.media};
861
+ `,Ts=s.span`
862
+ font-weight: 700;
863
+ color: ${t.colors.white};
864
+ `,Ie=s.a`
865
+ display: inline-flex;
866
+ align-items: center;
867
+ gap: 2px;
868
+ margin-top: auto;
869
+ font-family: ${t.font.sans};
870
+ font-weight: 500;
871
+ font-size: 14px;
872
+ line-height: 30px;
873
+ color: ${t.colors.softWhite};
874
+ text-decoration: underline;
875
+
876
+ &:focus-visible {
877
+ outline: 2px solid ${t.colors.softWhite};
878
+ outline-offset: 2px;
879
+ }
880
+
881
+ .ico {
882
+ width: 13px;
883
+ height: 13px;
884
+ }
885
+ `,Rs=s.span`
886
+ position: absolute;
887
+ width: 1px;
888
+ height: 1px;
889
+ padding: 0;
890
+ margin: -1px;
891
+ overflow: hidden;
892
+ clip: rect(0, 0, 0, 0);
893
+ white-space: nowrap;
894
+ border: 0;
895
+ `,_s="https://docs.decentraland.org/creator/worlds/about/",Ms="https://governance.decentraland.org";function ze(i){const a=typeof window<"u"?window.location.hostname:"";return`${a.endsWith("decentraland.org")?"https://decentraland.org":a.endsWith("decentraland.today")?"https://decentraland.today":"https://decentraland.zone"}/marketplace/names/browse?search=${encodeURIComponent(i)}`}function Fs({onBack:i}){Pe({title:n("seo.names.title"),description:n("seo.names.description")});const{session:a,signIn:o}=Be(),h=mn(),{data:p}=He(),x=p?Ue(G,p):null,[l,u]=m.useState(""),[c,d]=m.useState("idle"),[w,y]=m.useState(!1),[j,v]=m.useState(!1),[g,b]=m.useState(()=>{var C;return typeof window<"u"&&!!((C=window.matchMedia)!=null&&C.call(window,"(prefers-reduced-motion: reduce)").matches)});m.useEffect(()=>{var W;const C=(W=window.matchMedia)==null?void 0:W.call(window,"(prefers-reduced-motion: reduce)");if(!C)return;const L=A=>b(A.matches);return C.addEventListener("change",L),()=>C.removeEventListener("change",L)},[]);const $=n("names.placeholderExamples"),_=m.useMemo(()=>$.split(",").map(C=>C.trim()).filter(Boolean),[$]),k=Cn(_,!j&&!l&&!g)||n("names.inputPlaceholder"),F=m.useRef(null),[N,z]=m.useState(void 0);m.useLayoutEffect(()=>{F.current&&z(F.current.getBoundingClientRect().width)},[l,k]),m.useEffect(()=>{if(!_e(l).ok){d(l.length===0?"idle":"invalid");return}d("checking");const L=new AbortController,W=setTimeout(()=>{(async()=>{try{const A=await ln(l,{signal:L.signal});d(A)}catch(A){if((A==null?void 0:A.name)==="AbortError")return;d("error")}})()},400);return()=>{clearTimeout(W),L.abort()}},[l]);const M=_e(l),I=M.ok&&(c==="available"||c==="error"),R=h&&I,H=!h&&I;function E(){if(R){if(!a){o();return}y(!0)}}const f=e.jsxs(e.Fragment,{children:[n("names.claim"),x!=null?e.jsxs(Cs,{children:[e.jsx(P,{}),ye(x)]}):null]});return e.jsxs(es,{"data-testid":"names-page",children:[e.jsxs(ts,{"aria-label":n("names.breadcrumbAria"),children:[e.jsx(ns,{onClick:i,children:n("names.breadcrumbCollectibles")}),e.jsx("span",{"aria-hidden":!0,children:">"}),e.jsx(ss,{children:n("names.breadcrumbCurrent")})]}),e.jsxs(is,{children:[e.jsxs(os,{children:[e.jsxs(as,{children:[e.jsx(rs,{children:n("names.heroTitle")}),e.jsx(ls,{children:n("names.heroSubtitle")})]}),e.jsxs(cs,{children:[e.jsxs(ds,{"data-testid":"names-input-wrap",children:[e.jsxs(hs,{invalid:c==="taken",children:[e.jsxs(ms,{children:[e.jsx(xs,{"aria-hidden":!0,children:"@"}),e.jsx(gs,{value:l,onChange:C=>u(on(C.target.value)),placeholder:k,"aria-label":n("names.inputAria"),autoComplete:"off",spellCheck:!1,maxLength:se,onFocus:()=>v(!0),style:{width:N!=null?`${N}px`:void 0}}),e.jsx(ps,{ref:F,"aria-hidden":!0,"data-placeholder":!l||void 0,children:l||k}),e.jsx(ys,{children:n("names.suffix")})]}),l.length>0?e.jsxs(bs,{"aria-hidden":!0,children:[l.length,"/",se]}):null,e.jsx(De,{onClick:E,disabled:!R,"data-testid":"names-claim",children:f})]}),c==="taken"?e.jsxs(fs,{role:"status","data-testid":"names-taken",children:[e.jsx(S,{name:"info",size:16,"aria-hidden":!0}),e.jsx("span",{children:n("names.taken")}),e.jsxs(us,{href:ze(l),target:"_blank",rel:"noopener noreferrer",children:[n("names.takenMakeOffer"),e.jsx(S,{name:"external-link",size:13,"aria-hidden":!0})]})]}):null,c==="checking"?e.jsx(Q,{tone:"muted",role:"status","data-testid":"names-checking",children:n("names.checking")}):H?e.jsxs(Q,{tone:"muted",role:"status","data-testid":"names-disabled",children:[e.jsx(S,{name:"info",size:16,"aria-hidden":!0}),e.jsx("span",{children:n("names.registrationDisabled")}),e.jsxs(js,{href:ze(l),target:"_blank",rel:"noopener noreferrer",children:[n("names.registrationDisabledLink"),e.jsx(S,{name:"external-link",size:13,"aria-hidden":!0})]})]}):c==="error"?e.jsx(Q,{tone:"muted",role:"status",children:n("names.checkError")}):c==="invalid"&&!M.ok&&M.reason==="too-short"?e.jsx(Q,{tone:"muted",role:"status",children:n("names.tooShort",{min:Oe})}):null]}),e.jsx(ws,{onClick:E,disabled:!R,children:f}),e.jsx(Rs,{role:"status","aria-live":"polite",children:c==="available"?n("names.available",{name:l}):""})]})]}),e.jsxs($s,{children:[e.jsxs(ks,{children:[e.jsx(Ss,{children:n("names.whyTitle")}),e.jsx(Es,{children:n("names.whyIntro")})]}),e.jsxs(Ls,{children:[e.jsxs(J,{children:[e.jsx(X,{src:Qn,alt:""}),e.jsxs(Y,{children:[e.jsx(ee,{children:n("names.why1Title")}),e.jsx(te,{children:n("names.why1")})]})]}),e.jsxs(J,{children:[e.jsx(X,{src:Jn,alt:""}),e.jsxs(Y,{children:[e.jsx(ee,{children:n("names.why2Title")}),e.jsxs(te,{children:[n("names.why2")," ",e.jsx(Ts,{children:n("names.why2Address")})]}),e.jsxs(Ie,{href:_s,target:"_blank",rel:"noopener noreferrer",children:[n("names.learnMore"),e.jsx(S,{name:"external-link","aria-hidden":!0})]})]})]}),e.jsxs(J,{children:[e.jsx(X,{src:Xn,alt:""}),e.jsxs(Y,{children:[e.jsx(ee,{children:n("names.why3Title")}),e.jsx(te,{children:n("names.why3")})]})]}),e.jsxs(J,{children:[e.jsx(X,{src:Yn,alt:""}),e.jsxs(Y,{children:[e.jsx(ee,{children:n("names.why4Title")}),e.jsx(te,{children:n("names.why4")}),e.jsxs(Ie,{href:Ms,target:"_blank",rel:"noopener noreferrer",children:[n("names.learnMore"),e.jsx(S,{name:"external-link","aria-hidden":!0})]})]})]})]})]})]}),w?e.jsx(Vn,{name:l,priceCredits:x,onClose:()=>y(!1)}):null]})}const As="data:image/svg+xml,%3csvg%20width='101'%20height='101'%20viewBox='0%200%20101%20101'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M42.4493%2040.9855L30.7394%2052.6954'%20stroke='%23FF5A57'%20stroke-width='3.15625'%20stroke-linecap='round'/%3e%3cpath%20d='M30.7391%2040.9855L42.449%2052.6954'%20stroke='%23FF5A57'%20stroke-width='3.15625'%20stroke-linecap='round'/%3e%3cpath%20d='M36.2621%2071.0604C29.6047%2071.0604%2023.9709%2068.7542%2019.3608%2064.1416C14.7507%2059.5291%2012.4445%2053.8953%2012.442%2047.2404C12.4396%2040.5854%2014.7459%2034.9516%2019.3608%2030.3391C23.9758%2025.7266%2029.6096%2023.4203%2036.2621%2023.4203C42.9146%2023.4203%2048.5496%2025.7266%2053.167%2030.3391C57.7844%2034.9516%2060.0895%2040.5854%2060.0822%2047.2404C60.0822%2049.9277%2059.6546%2052.4624%2058.7995%2054.8445C57.9445%2057.2265%2056.784%2059.3336%2055.3181%2061.1659L75.84%2081.6878C76.5119%2082.3597%2076.8478%2083.2148%2076.8478%2084.2531C76.8478%2085.2914%2076.5119%2086.1465%2075.84%2086.8183C75.1682%2087.4902%2074.3131%2087.8261%2073.2748%2087.8261C72.2365%2087.8261%2071.3814%2087.4902%2070.7096%2086.8183L50.1877%2066.2964C48.3554%2067.7623%2046.2482%2068.9227%2043.8662%2069.7778C41.4842%2070.6329%2038.9495%2071.0604%2036.2621%2071.0604ZM36.2621%2063.7312C40.8429%2063.7312%2044.7372%2062.1285%2047.9449%2058.9232C51.1527%2055.7179%2052.7554%2051.8236%2052.7529%2047.2404C52.7505%2042.6571%2051.1478%2038.7641%2047.9449%2035.5612C44.742%2032.3583%2040.8478%2030.7544%2036.2621%2030.7495C31.6764%2030.7447%2027.7834%2032.3485%2024.5829%2035.5612C21.3825%2038.7739%2019.7786%2042.6669%2019.7713%2047.2404C19.764%2051.8138%2021.3678%2055.7081%2024.5829%2058.9232C27.798%2062.1383%2031.6911%2063.7409%2036.2621%2063.7312Z'%20fill='url(%23paint0_linear_search_empty)'/%3e%3cdefs%3e%3clinearGradient%20id='paint0_linear_search_empty'%20x1='10.4127'%20y1='55.6273'%20x2='124.009'%20y2='44.925'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23FF2D55'/%3e%3cstop%20offset='1'%20stop-color='%23FFBC5B'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e",ge=48,Ns=["all","on_sale","not_for_sale"];function ni(){const[i]=Ye(),a=We(),o=(i.get("q")??"").trim().toLowerCase(),h=(i.get("q")??"").trim();Pe({title:h?n("seo.collectibles.searchTitle",{query:h}):n("seo.collectibles.title"),description:n("seo.collectibles.description")});const p=m.useMemo(()=>({category:"all",status:"on_sale",subCategory:null,rarities:[],priceMin:"",priceMax:"",smart:!1,sort:"newest"}),[]),[x,l]=et(p),{subCategory:u,rarities:c,priceMin:d,priceMax:w,smart:y,sort:j}=x,v=x.category,g=Ns.includes(x.status)?x.status:"on_sale";tt(`${v}:${u??""}`);const[b,$]=m.useState(!1);m.useEffect(()=>{if(!b)return;const r=Z=>{Z.key==="Escape"&&$(!1)};document.addEventListener("keydown",r);const B=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",r),document.body.style.overflow=B}},[b]);const _=g==="on_sale",T=d&&!Number.isNaN(Number(d))?Number(d):void 0,k=w&&!Number.isNaN(Number(w))?Number(w):void 0,F=bt(),N=u?it[u]:void 0,z=(Te.find(r=>r.key===j)??Te[0]).server,M={category:v,rarities:c.length?c:void 0,wearableCategories:N,minPriceCredits:T,maxPriceCredits:k,search:o||void 0,sortBy:z,isSmart:y||void 0,onSale:!0,listingType:F?void 0:"primary"},I={category:v,rarities:c.length?c:void 0,wearableCategories:N,search:o||void 0,sortBy:z,isWearableSmart:y||void 0,isOnSale:g==="not_for_sale"?!1:void 0},{items:R,total:H,isLoading:E,isPlaceholderData:f,error:C,hasNextPage:L,isFetchingNextPage:W,isFetchNextPageError:A,fetchNextPage:qe}=Ot(_?["shop-items",M]:["catalog-items",I],r=>_?Ct({...M,first:ge,skip:r}):vt({...I,first:ge,skip:r}),{enabled:v!=="names"}),D=H,{data:je,isError:Ze,isPending:Ve}=He(),Ke=r=>je&&r.manaWei?Ue(r.manaWei,je):null,Qe=_&&Ve&&R.some(r=>r.source==="legacy"),$e=E||f||Qe,Je=E?15:Math.min(Math.max(R.length,1),ge),ke=m.useRef(null);m.useEffect(()=>{E||f||!o||ke.current===o||(ke.current=o,ne("Shop Searched",{query:o,result_count:D}))},[o,E,f,D]);const q=m.useRef("__init__");m.useEffect(()=>{if(E||f)return;const r=JSON.stringify({category:v,subCategory:u,rarities:c,min:T,max:k,sort:j,status:g,smart:y});if(q.current==="__init__"||q.current===r){q.current=r;return}q.current=r,ne("Shop Applied Filter",{filters:{category:v,sub_category:u,rarities:c,min_price_credits:T??null,max_price_credits:k??null,status:g,smart:y,sort:j},result_count:D})},[v,u,c,T,k,j,g,y,E,f,D]);function Se(r){l({category:r,subCategory:null})}function Ee(r){l({status:r})}function Le(r){l({rarities:c.includes(r)?c.filter(B=>B!==r):[...c,r]})}function Xe(){l(p)}const U=[];(T!=null||k!=null)&&U.push({key:"price",label:n("filter.price"),onRemove:()=>{l({priceMin:"",priceMax:""})}});for(const r of nt)c.includes(r)&&U.push({key:`rarity-${r}`,label:wt(r),onRemove:()=>Le(r)});return y&&U.push({key:"smart",label:n("filter.smart"),onRemove:()=>l({smart:!1})}),g!=="on_sale"&&U.push({key:"status",label:g==="all"?n("filter.statusAll"):n("filter.notForSale"),onRemove:()=>Ee("on_sale")}),e.jsxs(jt,{"data-testid":"browse",children:[v!=="names"&&e.jsxs(e.Fragment,{children:[b?e.jsx($t,{onClick:()=>$(!1),"aria-hidden":!0}):null,e.jsxs(kt,{"data-open":b||void 0,"data-testid":"browse-sidebar",children:[e.jsxs(St,{children:[e.jsx(Et,{children:n("assets.filters")}),e.jsx(Lt,{onClick:()=>$(!1),"aria-label":n("assets.closeFilters"),children:"✕"})]}),e.jsx(Tt,{children:e.jsx(Rt,{category:v,subCategory:u,onCategory:Se,onSub:r=>l({subCategory:r}),priceMin:d,priceMax:w,onPriceMin:r=>l({priceMin:r}),onPriceMax:r=>l({priceMax:r}),rarities:c,onToggleRarity:Le,status:g,onStatus:Ee,smart:y,onSmart:r=>l({smart:r})})}),e.jsx(_t,{children:e.jsx(Mt,{type:"button",onClick:()=>$(!1),children:n("assets.showItems")})})]})]}),e.jsx(Ft,{children:v==="names"?e.jsx(Fs,{onBack:()=>Se("all")}):e.jsxs(e.Fragment,{children:[e.jsx(st,{sort:j,onSort:r=>l({sort:r}),total:H,loading:E||f,query:o,onOpenFilters:()=>$(!0),chips:U,onClearChips:Xe}),Ze&&_&&R.some(r=>r.source==="legacy")?e.jsx(At,{"data-variant":"warn",children:n("assets.marketUnavailable")}):null,C?e.jsx(Gt,{message:n("assets.loadError"),testId:"browse-error"}):null,!$e&&R.length===0&&!C?e.jsxs(Nt,{"data-testid":"browse-empty",children:[e.jsx(It,{src:As,alt:""}),e.jsxs(zt,{children:[e.jsx(Wt,{children:n("assets.empty.title")}),e.jsx(Bt,{children:h?e.jsxs(e.Fragment,{children:[n("assets.empty.searchBefore"),e.jsx("b",{children:h}),n("assets.empty.searchAfter")]}):n("assets.empty.filters")})]}),e.jsx(Pt,{children:e.jsx(Ht,{type:"button",onClick:()=>a("/overview"),children:n("assets.empty.cta")})})]}):e.jsxs(e.Fragment,{children:[e.jsx(nn,{"data-testid":"grid",children:$e?e.jsx(Re,{count:Je}):e.jsxs(e.Fragment,{children:[R.map(r=>{if(!_)return e.jsx(V,{item:r,mode:"view"},K(r));const B=r;if(B.source!=="legacy")return e.jsx(V,{item:r},K(r));const Z=Ke(B);return Z==null?e.jsx(V,{item:r,mode:"view"},K(r)):e.jsx(V,{item:{...B,priceCredits:Z}},K(r))}),W?e.jsx(Re,{count:6}):null]})}),e.jsx(Ut,{hasNextPage:L,isFetching:W,isError:A,onLoadMore:()=>void qe()})]})]})})]})}export{ni as Assets};