@dcl/shop 1.4.2-31322163896.commit-c11a5d7 → 1.4.2-31322494096.commit-984acea
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.
- package/_assets/Activity-DH3M_bvV.js +378 -0
- package/_assets/{AnimatedBackground-CKM7MsfQ.js → AnimatedBackground-yDJGFuXs.js} +1 -1
- package/_assets/Assets-DNZmp0kB.js +921 -0
- package/_assets/{Assets.styles-DpkvdYck.js → Assets.styles-BOAoaKYw.js} +1 -1
- package/_assets/{Authorizations-UyA_5H8_.js → Authorizations-BjZqkvFP.js} +1 -1
- package/_assets/{Cart-C7AG_WL0.js → Cart-18jfr2ZI.js} +1 -1
- package/_assets/{CircularProgress-p3HJhbZr.js → CircularProgress-CP3qplJi.js} +1 -1
- package/_assets/{Collection-DHDVQ5jd.js → Collection-Ct93QOl7.js} +1 -1
- package/_assets/{CollectionCarousel-CZEC0usz.js → CollectionCarousel-BBYLCc51.js} +2 -2
- package/_assets/{Confetti-D5O8qKdu.js → Confetti-CSSh6Q3n.js} +1 -1
- package/_assets/{ConstantsUtil-Dfhn6Y4d.js → ConstantsUtil-DU-HtIqA.js} +1 -1
- package/_assets/{ContentClient-BloDDk0B.js → ContentClient-Br0TlHB0.js} +1 -1
- package/_assets/{Creator-Bhj7mw9U.js → Creator-CZ-u7pJQ.js} +1 -1
- package/_assets/{DeploymentBuilder-450puxSE.js → DeploymentBuilder-B9ep1TYQ.js} +1 -1
- package/_assets/{ErrorNotice-hs5K8F6l.js → ErrorNotice-D_pEmaKa.js} +1 -1
- package/_assets/{ExchangeController-BjPxbUpR.js → ExchangeController-BMOFU2Yk.js} +1 -1
- package/_assets/{Faq-BYxPCNDM.js → Faq-SyWZBPv3.js} +1 -1
- package/_assets/{GetCredits-DZxa-k2C.js → GetCredits-Cj0sC8-8.js} +1 -1
- package/_assets/{Grow-CpozCB3r.js → Grow-BvQyOM08.js} +1 -1
- package/_assets/{HelpersUtil-D0v-xrZn.js → HelpersUtil-DA7I_LJN.js} +1 -1
- package/_assets/{ItemDetail-CtiVhH5k.js → ItemDetail-Aw5EeYPI.js} +2 -2
- package/_assets/LazyEmoteControls-BonklT4k.js +2 -0
- package/_assets/{LoadMore-P2aoXnOl.js → LoadMore-CWOcL7-R.js} +1 -1
- package/_assets/{ManaPricingBanner.styles-CsglnHnE.js → ManaPricingBanner.styles-9rG2J5jf.js} +1 -1
- package/_assets/{MyAssets-DMJoXmre.js → MyAssets-BUD8t5K1.js} +2 -2
- package/_assets/{MyFavorites-DDbq6RT6.js → MyFavorites-C4-JhNjZ.js} +1 -1
- package/_assets/{NetworkUtil-zqltyv7-.js → NetworkUtil-Bj4dy73o.js} +1 -1
- package/_assets/{NotFound-CeqFZnX6.js → NotFound-CG1KO7xT.js} +1 -1
- package/_assets/{NotificationsBell-addge6IA.js → NotificationsBell-BsUCxrEm.js} +1 -1
- package/_assets/{OutfitDetail-BxVmfGC6.js → OutfitDetail-uGWxg-j2.js} +1 -1
- package/_assets/{OutfitPreview-B3mjcQE-.js → OutfitPreview-D2fEID3k.js} +1 -1
- package/_assets/{OutfitStudio-DVGOjY1k.js → OutfitStudio-BtcNDXsS.js} +1 -1
- package/_assets/{StoreSettings-Czbnf83A.js → StoreSettings-DgR8kapL.js} +1 -1
- package/_assets/{Success-CQlF0xaE.js → Success-D2k8YVGQ.js} +1 -1
- package/_assets/{SwapController-kDfKNMbc.js → SwapController-Cugeklr7.js} +1 -1
- package/_assets/{Tooltip-xpXFJ3dh.js → Tooltip-Crq74Yk1.js} +1 -1
- package/_assets/{TradeService-QZB_Givy.js → TradeService-BF-TBU32.js} +1 -1
- package/_assets/{W3MFrameProviderSingleton-DoBeE5H4.js → W3MFrameProviderSingleton-B32zOdWK.js} +3 -3
- package/_assets/{WebCryptoP256-R6mZOWUL.js → WebCryptoP256-BCgTqIAD.js} +1 -1
- package/_assets/{authorizations-CmPOjjmJ.js → authorizations-hJkxcnlY.js} +1 -1
- package/_assets/{basic-B5MKrQ5L.js → basic-Q439CW_S.js} +1 -1
- package/_assets/{biconomy-oKWX1n-d.js → biconomy-BsrQT-jW.js} +1 -1
- package/_assets/{builder-BsYrCdyY.js → builder-CwiQ4DZP.js} +1 -1
- package/_assets/{buy-iFICWIOi.js → buy-BufCe-jB.js} +1 -1
- package/_assets/{buy-gasless-BlsaAybr.js → buy-gasless-Ce4W7rkQ.js} +1 -1
- package/_assets/{categories-BYn-Yv7e.js → categories-Daeah9jY.js} +1 -1
- package/_assets/{ccip-ZY5Yh25x.js → ccip-Bjd61y2d.js} +1 -1
- package/_assets/{ccip-C_ziReDw.js → ccip-CkvN4cy3.js} +1 -1
- package/_assets/{chains-BakloPPh.js → chains-CT4rY2Dl.js} +1 -1
- package/_assets/{collectionPage.styles-UxDCyRkC.js → collectionPage.styles-c51u5sBI.js} +4 -4
- package/_assets/{common-C190MjsY.js → common-CBJkiZuG.js} +1 -1
- package/_assets/{controller-BCNQUz_E.js → controller-Drr-zqI0.js} +2 -2
- package/_assets/{core-7vYFg0UV.js → core-T9VWkzal.js} +4 -4
- package/_assets/{createSvgIcon-qMwWvtyG.js → createSvgIcon-BUNycQ7O.js} +1 -1
- package/_assets/{custom-CY0bvQTh.js → custom-B-yfwqNO.js} +1 -1
- package/_assets/{data-capture-DB13neeM.js → data-capture-CnAKe3GD.js} +1 -1
- package/_assets/decimals-BXz32UcZ.js +1 -0
- package/_assets/{decimals-COTZiiWv.js → decimals-D78gtlm7.js} +1 -1
- package/_assets/{detectExtension-dh9aZK_P.js → detectExtension-DdzKJuxz.js} +1 -1
- package/_assets/{email-DFGM9lFp.js → email-Dh44BYbJ.js} +1 -1
- package/_assets/{embedded-wallet-Cg613Im9.js → embedded-wallet-K1rjcsUE.js} +1 -1
- package/_assets/{emotion-styled.browser.esm-B7ahKXeO.js → emotion-styled.browser.esm-BB594k_t.js} +1 -1
- package/_assets/{engine-BZfLYPo7.js → engine-DLlN9N1e.js} +1 -1
- package/_assets/{errors-9UQKYqiw.js → errors-X12fPjsF.js} +1 -1
- package/_assets/{estimate-l1-fee-CZBrponR.js → estimate-l1-fee-DQEWUbn7.js} +1 -1
- package/_assets/{eth_estimateGas-Bwe9Bvt6.js → eth_estimateGas-BlvaHHP6.js} +1 -1
- package/_assets/{eth_getStorageAt-D5dVcL2h.js → eth_getStorageAt-BnlbpEeM.js} +1 -1
- package/_assets/{eth_getTransactionCount--bzZD5y_.js → eth_getTransactionCount-wa7Lg-Bw.js} +1 -1
- package/_assets/{ethereum-B4N6XpDq.js → ethereum-D6hcrVKr.js} +1 -1
- package/_assets/{ethers-_rP5925d.js → ethers-BW12Sk6C.js} +1 -1
- package/_assets/{execute-3SUZ7J35.js → execute-CnzbuAor.js} +2 -2
- package/_assets/{extractIPFS-DwUIZ9UT.js → extractIPFS-DZpRWJUo.js} +1 -1
- package/_assets/{features-BVc0NzEu.js → features-CVWY4Y16.js} +1 -1
- package/_assets/{fetchTokenMetadata-D6lc_e8g.js → fetchTokenMetadata-Cv4i3eUm.js} +2 -2
- package/_assets/{field.styles-Klgn4ug8.js → field.styles-C4ptqp5d.js} +1 -1
- package/_assets/{get-bytecode-C5SGLuRO.js → get-bytecode-CJQVu_Sy.js} +1 -1
- package/_assets/get-ecosystem-wallet-info-BmsGe2JV.js +1 -0
- package/_assets/{getBalance-Cc7Sj6xt.js → getBalance-DFbuu6jU.js} +2 -2
- package/_assets/{getInstalledModules-Z7nqEK0O.js → getInstalledModules-DELpVjJN.js} +1 -1
- package/_assets/{getNFT-DwfjMgKy.js → getNFT-C_gk9oBP.js} +2 -2
- package/_assets/getNFT-D3eoxL4a.js +1 -0
- package/_assets/{grid.styles-DZ3rDvUI.js → grid.styles-rSbKZ0v1.js} +1 -1
- package/_assets/{hashTypedData-BID7GN02.js → hashTypedData-BcHyl6VZ.js} +1 -1
- package/_assets/{hashTypedData-56MUV1oL.js → hashTypedData-DsCdFFSj.js} +1 -1
- package/_assets/{in-app-CZl5e1Kr.js → in-app-ASu9R97D.js} +1 -1
- package/_assets/{in-app-wallet-calls-DpdE6vQx.js → in-app-wallet-calls-DZ3CNvzA.js} +1 -1
- package/_assets/{index-CCyE2f90.js → index-4l5lQG6P.js} +12 -12
- package/_assets/{index-DgvbfqBQ.js → index-6xyHFGDx.js} +1 -1
- package/_assets/{index-Cg96CnRw.js → index-B3t0Akyi.js} +1 -1
- package/_assets/{index-D8c_AyRU.js → index-B4j4OZHM.js} +1 -1
- package/_assets/{index-Cgtc8RZe.js → index-B5HKp0Vi.js} +1 -1
- package/_assets/{index-BVxrYPq7.js → index-B7MTfURE.js} +1 -1
- package/_assets/{index-D4YGV8PF.js → index-BAaRF1Kt.js} +3 -3
- package/_assets/{index-BaA6HARF.js → index-BAq41SqM.js} +1 -1
- package/_assets/{index-DdwI0RG2.js → index-BDQl0sBK.js} +1 -1
- package/_assets/{index-ByR0_8d4.js → index-BM1ICnW9.js} +1 -1
- package/_assets/{index-BLkHQeA6.js → index-BST4drMR.js} +1 -1
- package/_assets/{index-YEcaoA6l.js → index-BT9sShn9.js} +1 -1
- package/_assets/{index-DNf5l8b7.js → index-BTLnCH8f.js} +1 -1
- package/_assets/{index-CBmQHJ_9.js → index-BY2CCydA.js} +2 -2
- package/_assets/{index-LrYAsAiw.js → index-Bd_k4IIg.js} +1 -1
- package/_assets/{index-DvaRobab.js → index-Bey_ceBS.js} +1 -1
- package/_assets/{index-C_ScirvD.js → index-Bm4ND0ad.js} +1 -1
- package/_assets/{index-CBtNGXwJ.js → index-BpBNDR7U.js} +1 -1
- package/_assets/{index-BeoFzNRt.js → index-BrMDkuYR.js} +1 -1
- package/_assets/{index-xWGCqA-3.js → index-Br_8qIDa.js} +1 -1
- package/_assets/{index-C1g9IX3n.js → index-Bsu-4fMn.js} +1 -1
- package/_assets/{index-DnFLkNy-.js → index-BtA0WZKk.js} +1 -1
- package/_assets/{index-DiR2LHPu.js → index-BuhEnsVy.js} +1 -1
- package/_assets/{index-BcLEcQ4q.js → index-C42GIhEX.js} +1 -1
- package/_assets/{index-804rrCgh.js → index-C4q1AOAT.js} +1 -1
- package/_assets/{index-DAvtbkI4.js → index-C90fpqFv.js} +1 -1
- package/_assets/{index-CxToMzwr.js → index-CBUEDYhH.js} +1 -1
- package/_assets/{index-DnsK8fzl.js → index-CFa_f09j.js} +1 -1
- package/_assets/{index-DnriQTDn.js → index-CW4tU326.js} +1 -1
- package/_assets/{index-B4MDdxfM.js → index-CYr5viwL.js} +1 -1
- package/_assets/{index-xzy-u452.js → index-CZynYiAt.js} +1 -1
- package/_assets/{index-CQEymLnN.js → index-Cbkq3v8Q.js} +1 -1
- package/_assets/{index-hwJov5sC.js → index-ClPGOmky.js} +2 -2
- package/_assets/{index-Bn4X5QbZ.js → index-CpstG8j_.js} +1 -1
- package/_assets/{index--LA9M9Pj.js → index-CvtTLzrw.js} +1 -1
- package/_assets/{index-cJxrRK3E.js → index-D-o8XxwM.js} +1 -1
- package/_assets/{index-CR1iQg65.js → index-D61v6G1k.js} +1 -1
- package/_assets/{index-C-i9VJ8C.js → index-DCUosWWt.js} +1 -1
- package/_assets/{index-CtTpqcLV.js → index-DFub6yV4.js} +1 -1
- package/_assets/{index-DoLRvtbc.js → index-DG5pCQ1l.js} +2 -2
- package/_assets/{index-CyEhTcWl.js → index-DHimBJeb.js} +3 -3
- package/_assets/{index-DTESDEE2.js → index-DNsqNhGy.js} +1 -1
- package/_assets/{index-B7bl2OSr.js → index-DPp-ESea.js} +1 -1
- package/_assets/{index-BFMbeScp.js → index-Dd_cpmzS.js} +3 -3
- package/_assets/{index-CZedfMyq.js → index-DjZaFE0D.js} +1 -1
- package/_assets/{index-C4BKvCI1.js → index-DtKJjd3G.js} +1 -1
- package/_assets/{index-DTlaX22s.js → index-DvIRIwYS.js} +1 -1
- package/_assets/{index-Bf2dQxi6.js → index-DwgAiRxn.js} +1 -1
- package/_assets/{index-DPEq9zcm.js → index-DzXDBt2v.js} +1 -1
- package/_assets/{index-CpUlUKJN.js → index-GyBz3V-v.js} +1 -1
- package/_assets/{index-BmL20XLJ.js → index-N3BoWSGy.js} +1 -1
- package/_assets/{index-CjiK5NnO.js → index-OnR82uEt.js} +1 -1
- package/_assets/{index-jzZmQq0v.js → index-V1R0ZrK8.js} +1 -1
- package/_assets/{index-BoYd0Jpe.js → index-VoG2nd6o.js} +1 -1
- package/_assets/{index-DiulKQpq.js → index-gKCSgSoz.js} +1 -1
- package/_assets/{index-Krf7CJYA.js → index-iA_-wyby.js} +1 -1
- package/_assets/{index-ZkPpBdm1.js → index-j-I68K_j.js} +1 -1
- package/_assets/{index-FRfS11q_.js → index-l-kM20sQ.js} +1 -1
- package/_assets/{index-DrJoBSKu.js → index-ou7_MVjV.js} +1 -1
- package/_assets/{index-BfL2C8xK.js → index-smN0JdKJ.js} +1 -1
- package/_assets/{index-B2MtIHCS.js → index-tgZAnVTI.js} +1 -1
- package/_assets/{index-BkP8PEzM.js → index-wPcVB-NE.js} +2 -2
- package/_assets/{index.es-DjHO05gI.js → index.es-9addtGV6.js} +4 -4
- package/_assets/{index.es-CZEh_LMc.js → index.es-B_FpSEI8.js} +1 -1
- package/_assets/{index.es-BEvd8dUP.js → index.es-o1twLNBp.js} +1 -1
- package/_assets/{linkAccount-GOFV9efg.js → linkAccount-DbSkR5qI.js} +1 -1
- package/_assets/{localBatchGatewayRequest-L2Z9Ijgj.js → localBatchGatewayRequest-Ce2qdeYU.js} +1 -1
- package/_assets/{native-CpMB0bU0.js → native-DP1zuDzq.js} +1 -1
- package/_assets/{networks-t9wxlh07.js → networks-GHAOIb1u.js} +1 -1
- package/_assets/{onramp-CfQ9gD4z.js → onramp-ChGRuE_I.js} +1 -1
- package/_assets/{openzeppelin-TG846BEA.js → openzeppelin-BpVt2ax-.js} +1 -1
- package/_assets/{ownerOf-Bpjdb_o4.js → ownerOf-D3oh4dw9.js} +1 -1
- package/_assets/{parseNft-D86d-w8e.js → parseNft-CpHXr1f9.js} +2 -2
- package/_assets/{parseSignature-silrrid_.js → parseSignature-Biy-M_Ls.js} +3 -3
- package/_assets/{parseSignature-CIIb-kRC.js → parseSignature-CkpIuMXG.js} +1 -1
- package/_assets/{passkeys-DeFlppEM.js → passkeys-Bzya5Xwz.js} +1 -1
- package/_assets/{pay-with-exchange-Zu7I9j6h.js → pay-with-exchange-DJvHsdHS.js} +1 -1
- package/_assets/{prepare-contract-call-B9mXRJfw.js → prepare-contract-call-CCknEo7R.js} +1 -1
- package/_assets/{qr-overlay-BpUgZXeh.js → qr-overlay-CiuMbJzl.js} +1 -1
- package/_assets/{receive-BWu7BjMe.js → receive-BUDrQ_j7.js} +1 -1
- package/_assets/{resolveImplementation-DmURxNTC.js → resolveImplementation-CmrD7-Qy.js} +1 -1
- package/_assets/{rpc-BlPg8ZAg.js → rpc-BuSBKN7B.js} +1 -1
- package/_assets/{secp256k1-DiIkUPTD.js → secp256k1-Bgx_ahIh.js} +1 -1
- package/_assets/{secp256k1-B319VV12.js → secp256k1-C7HcLsFI.js} +1 -1
- package/_assets/{secp256k1-DC_C3A1c.js → secp256k1-DqvSFleR.js} +1 -1
- package/_assets/{send-BP48HeuW.js → send-BH9IbnPj.js} +1 -1
- package/_assets/{send-batch-transaction-NV5EQh1I.js → send-batch-transaction-C8_wxAl6.js} +1 -1
- package/_assets/{send-eip712-transaction-DZyaTBBu.js → send-eip712-transaction-DTqP7bXj.js} +2 -2
- package/_assets/send-gasless-transaction-BYT_cS3b.js +2 -0
- package/_assets/{send-transaction-DV0tCM7a.js → send-transaction-CBeHX_MY.js} +2 -2
- package/_assets/{sendMetaTransaction-BVcYwiRN.js → sendMetaTransaction-CAjsqDgk.js} +1 -1
- package/_assets/{sendRawTransaction-BlQ177J_.js → sendRawTransaction-B1_XLL_b.js} +3 -3
- package/_assets/{sentry-1-UJ8Dlp.js → sentry-CSXKq8As.js} +1 -1
- package/_assets/{serializeTransaction-DFVnOzTW.js → serializeTransaction-Cy2l29rW.js} +1 -1
- package/_assets/{session-proposal-B9gCpqkn.js → session-proposal-CQXFswbd.js} +1 -1
- package/_assets/{session-request-D9s_dTCJ.js → session-request-D1aaTCYR.js} +2 -2
- package/_assets/{sha256-DJGZOZp0.js → sha256-BSj1fVMj.js} +1 -1
- package/_assets/{signing-BDTZaD7_.js → signing-CjfMxOl5.js} +3 -3
- package/_assets/{skeleton.styles-C1hmzMhl.js → skeleton.styles-aYFCDYET.js} +1 -1
- package/_assets/{socials-DBWfUwFY.js → socials-D6cE3xEM.js} +1 -1
- package/_assets/{styled-BqLVBTHQ.js → styled-BG3p97YR.js} +1 -1
- package/_assets/{swaps-uHyjiHRG.js → swaps-CHmAzwqq.js} +1 -1
- package/_assets/{thirdweb-BMkdZwWw.js → thirdweb-DnrIo8LX.js} +3 -3
- package/_assets/{to-serializable-transaction-DEAMprU3.js → to-serializable-transaction-BJo6e6cC.js} +2 -2
- package/_assets/{totalSupply-Cz6ux52n.js → totalSupply-BHy3jN3T.js} +1 -1
- package/_assets/{transaction-Ct0jhBgA.js → transaction-EJzw2A1o.js} +1 -1
- package/_assets/{transactionReceipt-CXsNSIDA.js → transactionReceipt-Bgj48RCD.js} +1 -1
- package/_assets/{transactions-CrjtRJhE.js → transactions-B9e1qYux.js} +1 -1
- package/_assets/{useCreditPacks-C4SJKRzl.js → useCreditPacks-DWPKNzJV.js} +1 -1
- package/_assets/{useImportable-BkM8VaKA.js → useImportable-BA7ZiV_e.js} +1 -1
- package/_assets/{useInfiniteGrid-LHcsuwn8.js → useInfiniteGrid-C2jLQlnX.js} +1 -1
- package/_assets/{useStore-DZaAf_Z_.js → useStore-Bcu8D3OM.js} +2 -2
- package/_assets/{useTheme-DHAxbKaV.js → useTheme-DwmRtz-q.js} +1 -1
- package/_assets/{utils-fFmjnV0E.js → utils-CrzpKf7A.js} +1 -1
- package/_assets/{verifyHash-Cfa2Nk1I.js → verifyHash-B457rphK.js} +1 -1
- package/_assets/{w3m-modal-B2IOzwDP.js → w3m-modal-Bk3PvXDz.js} +1 -1
- package/_assets/{w3m-modal-CcoqUQGC.js → w3m-modal-jpev0Y86.js} +1 -1
- package/_assets/{wait-for-tx-receipt-GIZS_VW5.js → wait-for-tx-receipt-B46W8tR-.js} +1 -1
- package/_assets/{wallets-Cg9D1JAM.js → wallets-CAbZ_EVb.js} +5 -5
- package/_assets/{web-connector-Cn2Y4WeA.js → web-connector-BAFqrIFK.js} +3 -3
- package/_assets/{writeContract-CrWid7Q5.js → writeContract-CVV87MRB.js} +1 -1
- package/_assets/{zora-sepolia-DIycoSSN.js → zora-sepolia-F6QrxqAf.js} +1 -1
- package/_assets/{zoraTestnet-DWCcxV2Z.js → zoraTestnet-BOKqoV8O.js} +1 -1
- package/index.html +11 -11
- package/package.json +2 -2
- package/_assets/Activity-DpBHJEZV.js +0 -378
- package/_assets/Assets-vU9DV435.js +0 -921
- package/_assets/LazyEmoteControls-EsFqAP2S.js +0 -2
- package/_assets/decimals-D1xLDApm.js +0 -1
- package/_assets/get-ecosystem-wallet-info-BrxS5rv7.js +0 -1
- package/_assets/getNFT-CbdOY_qD.js +0 -1
- package/_assets/send-gasless-transaction-BQHUFfF9.js +0 -2
|
@@ -0,0 +1,921 @@
|
|
|
1
|
+
import{r as u,b as Ue,j as e,u as et}from"./react-BYHuwl8r.js";import{u as tt}from"./useUrlFilters-DH-gxdfV.js";import{u as nt,S as _e,R as st,F as it,e as ot}from"./categories-Daeah9jY.js";import{c as q,r as at,aK as rt,aL as lt,aR as ct,a as dt,l as ht,ch as pt,ci as ut,s,t,v as Oe,aA as mt,D as ft,L as Ce,b as n,z as xt,I as E,A as O,cj as le,ax as gt,Z as oe,aH as Me,aP as yt,aO as bt,y as Ge,an as De,q as Ze,w as wt,ac as Ct,ap as Fe,aq as J,aZ as vt,bD as jt}from"./index-4l5lQG6P.js";import{R as $t,S as kt,a as St,D as Et,b as Tt,C as Lt,c as Rt,F as _t,d as Mt,e as Ft,M as Nt,u as At,g as It,v as zt,E as Bt,h as Wt,f as Pt,i as Ht,j as Ut}from"./Assets.styles-BOAoaKYw.js";import{L as Ot}from"./LoadMore-CWOcL7-R.js";import{u as Gt}from"./useInfiniteGrid-C2jLQlnX.js";import{E as Dt}from"./ErrorNotice-D_pEmaKa.js";import{d as Zt}from"./dcl-schemas-CmtP3U6y.js";import{s as qt,G as Vt,w as Kt,S as Qt}from"./buy-gasless-Ce4W7rkQ.js";import{s as Jt,j as Xt}from"./buy-BufCe-jB.js";import{f as Yt}from"./errors-X12fPjsF.js";import{J as en,C as tn,B as ve}from"./ethers-BW12Sk6C.js";import{n as nn}from"./Tooltip-Crq74Yk1.js";import{G as sn}from"./grid.styles-rSbKZ0v1.js";import"./skeleton.styles-aYFCDYET.js";import"./sentry-CSXKq8As.js";import"./intl-CBcMB1D2.js";import"./authorizations-hJkxcnlY.js";import"./sendMetaTransaction-CAjsqDgk.js";function X(i){const a=i.source??"item",o=i.tradeId||`${i.contractAddress}-${i.tokenId??i.itemId??""}`;return`${a}:${o}`}const V="100000000000000000000",qe=2,ae=15,on=/^[a-zA-Z0-9]+$/;function Ne(i){const a=i.trim();return a.length===0?{ok:!1,reason:"empty"}:on.test(a)?a.length<qe?{ok:!1,reason:"too-short"}:a.length>ae?{ok:!1,reason:"too-long"}:{ok:!0}:{ok:!1,reason:"invalid-chars"}}function an(i){return i.replace(/[^a-zA-Z0-9]/g,"").slice(0,ae)}const rn=["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 ln(){return q.chainId===Number(Zt.ChainId.MATIC_MAINNET)?Ae.mainnet:Ae.sepolia}async function cn(i,a={}){var f;const{rpc:o,address:d}=ln(),h=new en(o),m=new tn(d,rn,h);console.info(`[names] availability check → DCLRegistrar(${d}).available("${i}") on ${o}`);const l=await m.available(i);if((f=a.signal)!=null&&f.aborted)throw new DOMException("Aborted","AbortError");return console.info(`[names] "${i}" available=${l}`),l?"available":"taken"}const dn="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 je 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 hn(i){return ct(V,i)}async function pn(i,a,o={}){var f;const d=o.chainId??q.chainId,h=o.provider??"across",m=`${q.creditsServerUrl}/credits-name-route?name=${encodeURIComponent(a)}&chainId=${d}&provider=${h}`,l=await dt(m,{method:"GET",identity:i,metadata:{}});if(!l.ok){let c;try{c=(f=await l.json())==null?void 0:f.code}catch{}throw c==="ROUTE_COST_TOO_HIGH"?new ke:new Error(`fetchNameCreditRoute ${l.status}`)}return l.json()}function un(i,a){const o=ve.from(i.availableAmount),h=ve.from(V).sub(o);return{credits:[{value:i.amount,expiresAt:Number(i.expiresAt),salt:Xt(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:h.isNegative()?"0":h.toString(),maxCreditedValue:V}}async function mn(i,a={}){const o=dn,d=a.intervalMs??1e4,h=a.maxAttempts??60;let m={status:"pending",destinationTxHash:null,actionsSucceeded:null};for(let l=0;l<h;l++){try{const f=await fetch(`${o}/deposit/status?originChainId=137&depositTxHash=${i}`);if(f.ok){const c=await f.json(),g=(c.status??"pending").toLowerCase(),p=c.fillTx??c.fillTxnRef??null,y=typeof c.actionsSucceeded=="boolean"?c.actionsSucceeded:null;if(g==="filled")return{status:"filled",destinationTxHash:p,actionsSucceeded:y};if(g==="refunded"||g==="expired")return{status:g,destinationTxHash:null,actionsSucceeded:!1};m={status:"pending",destinationTxHash:p,actionsSucceeded:y}}}catch{}l<h-1&&await new Promise(f=>setTimeout(f,d))}return m}async function fn(i){const{name:a,identity:o,signer:d}=i,h=p=>{var y;try{(y=i.onProgress)==null||y.call(i,p)}catch{}},m=i.chainId??q.chainId,l=i.provider??"across",f=(i.beneficiary??await d.getAddress()).toLowerCase();let c=null,g="unconfirmed";console.info("[names] register start",{name:a,buyer:f,chainId:m,provider:l}),h("preparing");try{const p=await at(m),y=hn(p);console.info("[names] step 1/6 sized reservation",{usdCents:y,manaRate:p});const j=await pn(o,a,{chainId:m,provider:l});console.info("[names] step 2/6 route fetched",{target:j.externalCall.target,selector:j.externalCall.selector,provider:j.provider,quoteId:j.quoteId});const w=await rt(o,y);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(V))throw new Error("Credit under-sized for the name price");h("awaiting-confirmation");const $=un(w.credit,j);let C;try{C=await qt({chainId:m,buyer:f,signer:d,args:$})}catch(x){if(!(x instanceof Vt))throw x;if(x.reason==="relayer-unreachable"){g="unobservable";const k=new $e;throw k.cause=x,k}C=await Jt(m,$,d)}if(console.info("[names] step 4/6 useCredits submitted (Polygon origin tx)",{originTxHash:C}),h("confirming"),await Kt(C),g="confirmed",console.info("[names] step 5/6 origin tx confirmed",{originTxHash:C}),l==="across"){h("registering");const x=await mn(C,i.acrossPoll);if(console.info("[names] step 6/6 across status",x),x.status==="pending")return{status:"pending",originTxHash:C};if(x.status==="filled"&&x.actionsSucceeded===null)return console.warn("[names] across filled without reporting actionsSucceeded — reporting pending",{originTxHash:C}),{status:"pending",originTxHash:C};if(x.status!=="filled"||x.actionsSucceeded!==!0)throw new je;return{status:"registered",originTxHash:C,destinationTxHash:x.destinationTxHash}}return{status:"pending",originTxHash:C}}catch(p){if(console.error("[names] register failed — raw error:",p,{name:a,buyer:f,originState:g}),p instanceof Qt)return{status:"pending",originTxHash:p.txHash};if(c&&g==="unconfirmed"&&await lt(o,[c]).catch(()=>{}),p instanceof ke||p instanceof je||p instanceof $e)throw p;const y=new Error(Yt(p,"Couldn't register the name. Please try again.",{sale:!0}));throw y.cause=p,y}}function xn(){const{data:i}=ht({queryKey:["feature-flag","shop-names"],queryFn:()=>pt(ut.SHOP_NAMES),staleTime:6e4,refetchOnWindowFocus:!0,retry:1});return i===!0}const gn=60,yn=700,bn=25;function wn(i){if(!i)return[];const a=[];for(let o=1;o<=i.length;o++)a.push({text:i.slice(0,o),delay:gn});a[a.length-1]={text:i,delay:yn};for(let o=i.length-1;o>=1;o--)a.push({text:i.slice(0,o),delay:bn});return a}function Cn(i){return i.flatMap(wn)}function vn(i,a){const o=u.useMemo(()=>Cn(i),[i]),[d,h]=u.useState(0);return u.useEffect(()=>{if(!a||o.length===0)return;const m=setTimeout(()=>h(l=>(l+1)%o.length),o[d%o.length].delay);return()=>clearTimeout(m)},[d,a,o]),!a||o.length===0?"":o[d%o.length].text}const jn="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",$n="https://cdn.decentraland.org/@dcl/shop/1.4.2-31322494096.commit-984acea/_assets/name-verified-oGwQ3ntb.svg",kn="#34fee6",Sn=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
|
+
`,En=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
|
+
`,ce=s.div`
|
|
24
|
+
display: flex;
|
|
25
|
+
align-items: flex-start;
|
|
26
|
+
justify-content: space-between;
|
|
27
|
+
gap: 12px;
|
|
28
|
+
`,de=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
|
+
`,he=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
|
+
`,pe=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
|
+
`,ue=s.hr`
|
|
73
|
+
border: 0;
|
|
74
|
+
border-top: 1px solid ${t.colors.line};
|
|
75
|
+
margin: 16px 0;
|
|
76
|
+
`,me=s.div`
|
|
77
|
+
display: flex;
|
|
78
|
+
align-items: center;
|
|
79
|
+
gap: 16px;
|
|
80
|
+
`,Tn=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
|
+
`,Rn=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: ${kn};
|
|
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
|
+
`,_n=s.img`
|
|
119
|
+
flex: none;
|
|
120
|
+
display: block;
|
|
121
|
+
width: 14px;
|
|
122
|
+
height: 14px;
|
|
123
|
+
`,Ie=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
|
+
`,fe=s.div`
|
|
138
|
+
flex: 1;
|
|
139
|
+
min-width: 0;
|
|
140
|
+
`,xe=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
|
+
`,ge=s.div`
|
|
155
|
+
font-family: ${t.font.sans};
|
|
156
|
+
font-size: 14px;
|
|
157
|
+
color: ${t.colors.muted2};
|
|
158
|
+
`,ye=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
|
+
`,Mn=s.div`
|
|
174
|
+
margin-top: 16px;
|
|
175
|
+
padding: 16px;
|
|
176
|
+
border-radius: 12px;
|
|
177
|
+
background: ${t.colors.promptLilac};
|
|
178
|
+
`,Fn=s.div`
|
|
179
|
+
font-family: ${t.font.sans};
|
|
180
|
+
font-weight: 700;
|
|
181
|
+
font-size: 16px;
|
|
182
|
+
color: ${t.colors.text};
|
|
183
|
+
`,Nn=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
|
+
`,In=s.span`
|
|
215
|
+
flex: none;
|
|
216
|
+
font-family: ${t.font.sans};
|
|
217
|
+
font-size: 18px;
|
|
218
|
+
color: ${t.colors.muted2};
|
|
219
|
+
`,zn=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
|
+
`,Bn=s.span`
|
|
235
|
+
flex: none;
|
|
236
|
+
font-family: ${t.font.sans};
|
|
237
|
+
font-size: 16px;
|
|
238
|
+
color: ${t.colors.muted2};
|
|
239
|
+
`,be=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: 1;
|
|
272
|
+
flex-direction: column;
|
|
273
|
+
align-items: center;
|
|
274
|
+
justify-content: center;
|
|
275
|
+
gap: 32px;
|
|
276
|
+
padding: 32px 0 8px;
|
|
277
|
+
`,Pn=s.img`
|
|
278
|
+
width: 61px;
|
|
279
|
+
height: 61px;
|
|
280
|
+
`,Hn=s.div`
|
|
281
|
+
display: flex;
|
|
282
|
+
flex-direction: column;
|
|
283
|
+
align-items: center;
|
|
284
|
+
gap: 8px;
|
|
285
|
+
width: 100%;
|
|
286
|
+
`,Un=s.div`
|
|
287
|
+
font-family: ${t.font.sans};
|
|
288
|
+
font-weight: 700;
|
|
289
|
+
font-size: 20px;
|
|
290
|
+
line-height: 1.6;
|
|
291
|
+
color: ${t.colors.text2};
|
|
292
|
+
text-align: center;
|
|
293
|
+
`,On=s.p`
|
|
294
|
+
max-width: 400px;
|
|
295
|
+
font-family: ${t.font.sans};
|
|
296
|
+
font-size: 14px;
|
|
297
|
+
line-height: 1.57;
|
|
298
|
+
color: ${t.colors.muted};
|
|
299
|
+
text-align: center;
|
|
300
|
+
`,Gn=s.div`
|
|
301
|
+
display: flex;
|
|
302
|
+
align-items: center;
|
|
303
|
+
justify-content: center;
|
|
304
|
+
gap: 8px;
|
|
305
|
+
width: 100%;
|
|
306
|
+
`,Dn=s.div`
|
|
307
|
+
flex: 1;
|
|
308
|
+
max-width: 400px;
|
|
309
|
+
height: 10px;
|
|
310
|
+
border-radius: 100px;
|
|
311
|
+
background: rgba(0, 0, 0, 0.1);
|
|
312
|
+
overflow: hidden;
|
|
313
|
+
|
|
314
|
+
span {
|
|
315
|
+
display: block;
|
|
316
|
+
height: 100%;
|
|
317
|
+
width: 33%;
|
|
318
|
+
border-radius: 100px;
|
|
319
|
+
background: ${t.gradients.buyBtn};
|
|
320
|
+
animation: nameProgress 1.1s ease-in-out infinite;
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
@keyframes nameProgress {
|
|
324
|
+
0% {
|
|
325
|
+
transform: translateX(-100%);
|
|
326
|
+
}
|
|
327
|
+
100% {
|
|
328
|
+
transform: translateX(320%);
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
@media (prefers-reduced-motion: reduce) {
|
|
333
|
+
span {
|
|
334
|
+
width: 33%;
|
|
335
|
+
animation: none;
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
`,Zn=s.span`
|
|
339
|
+
flex: none;
|
|
340
|
+
font-family: ${t.font.sans};
|
|
341
|
+
font-size: 16px;
|
|
342
|
+
line-height: 22px;
|
|
343
|
+
color: ${t.colors.text2};
|
|
344
|
+
`,qn=s.div`
|
|
345
|
+
display: flex;
|
|
346
|
+
flex-direction: column;
|
|
347
|
+
align-items: center;
|
|
348
|
+
gap: 16px;
|
|
349
|
+
padding: 24px;
|
|
350
|
+
border-radius: 12px;
|
|
351
|
+
background: #e2f5ea;
|
|
352
|
+
text-align: center;
|
|
353
|
+
`,Vn=s.div`
|
|
354
|
+
display: grid;
|
|
355
|
+
place-items: center;
|
|
356
|
+
width: 56px;
|
|
357
|
+
height: 56px;
|
|
358
|
+
border-radius: 50%;
|
|
359
|
+
background: ${t.colors.ok};
|
|
360
|
+
color: ${t.colors.white};
|
|
361
|
+
|
|
362
|
+
.ico {
|
|
363
|
+
width: 30px;
|
|
364
|
+
height: 30px;
|
|
365
|
+
}
|
|
366
|
+
`,Kn=s.p`
|
|
367
|
+
margin: 0;
|
|
368
|
+
font-family: ${t.font.sans};
|
|
369
|
+
font-size: 16px;
|
|
370
|
+
line-height: 1.4;
|
|
371
|
+
color: ${t.colors.text};
|
|
372
|
+
|
|
373
|
+
b {
|
|
374
|
+
font-weight: 700;
|
|
375
|
+
}
|
|
376
|
+
`,ze=s.div`
|
|
377
|
+
display: flex;
|
|
378
|
+
gap: 16px;
|
|
379
|
+
margin-top: 20px;
|
|
380
|
+
|
|
381
|
+
${t.media.maxWidth("mobile")} {
|
|
382
|
+
flex-direction: column;
|
|
383
|
+
}
|
|
384
|
+
`,Be=s.button`
|
|
385
|
+
flex: 1;
|
|
386
|
+
height: 48px;
|
|
387
|
+
border: 1px solid ${t.colors.accent};
|
|
388
|
+
border-radius: 8px;
|
|
389
|
+
background: ${t.colors.white};
|
|
390
|
+
color: ${t.colors.accent};
|
|
391
|
+
cursor: pointer;
|
|
392
|
+
font-family: ${t.font.sans};
|
|
393
|
+
font-weight: 600;
|
|
394
|
+
font-size: 13px;
|
|
395
|
+
letter-spacing: 0.46px;
|
|
396
|
+
text-transform: uppercase;
|
|
397
|
+
|
|
398
|
+
&:hover {
|
|
399
|
+
background: rgba(105, 31, 169, 0.06);
|
|
400
|
+
}
|
|
401
|
+
&:focus-visible {
|
|
402
|
+
outline: 2px solid ${t.colors.accent};
|
|
403
|
+
outline-offset: 2px;
|
|
404
|
+
}
|
|
405
|
+
`,Qn=s.a`
|
|
406
|
+
flex: 1;
|
|
407
|
+
display: inline-flex;
|
|
408
|
+
align-items: center;
|
|
409
|
+
justify-content: center;
|
|
410
|
+
height: 48px;
|
|
411
|
+
border-radius: 8px;
|
|
412
|
+
background: ${t.colors.dclRed};
|
|
413
|
+
color: ${t.colors.softWhite};
|
|
414
|
+
cursor: pointer;
|
|
415
|
+
text-decoration: none;
|
|
416
|
+
font-family: ${t.font.sans};
|
|
417
|
+
font-weight: 600;
|
|
418
|
+
font-size: 13px;
|
|
419
|
+
letter-spacing: 0.46px;
|
|
420
|
+
text-transform: uppercase;
|
|
421
|
+
|
|
422
|
+
&:hover {
|
|
423
|
+
filter: brightness(1.05);
|
|
424
|
+
}
|
|
425
|
+
&:focus-visible {
|
|
426
|
+
outline: 2px solid ${t.colors.accent};
|
|
427
|
+
outline-offset: 2px;
|
|
428
|
+
}
|
|
429
|
+
`,we=s.div`
|
|
430
|
+
display: flex;
|
|
431
|
+
align-items: flex-start;
|
|
432
|
+
gap: 12px;
|
|
433
|
+
padding: 16px;
|
|
434
|
+
margin-top: 8px;
|
|
435
|
+
border-radius: 12px;
|
|
436
|
+
background: rgba(255, 45, 85, 0.1);
|
|
437
|
+
font-family: ${t.font.sans};
|
|
438
|
+
font-size: 14px;
|
|
439
|
+
line-height: 1.5;
|
|
440
|
+
color: ${t.colors.text};
|
|
441
|
+
|
|
442
|
+
.ico {
|
|
443
|
+
width: 22px;
|
|
444
|
+
height: 22px;
|
|
445
|
+
flex: none;
|
|
446
|
+
color: ${t.colors.dclRed};
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
/**
|
|
450
|
+
* Informational, not a failure. Used for "your payment went through, the NAME is on its way" and for the
|
|
451
|
+
* reason a purchase is not available yet (no price, not enough credits) — none of which is an error, and
|
|
452
|
+
* all of which would contradict themselves rendered in the red error treatment.
|
|
453
|
+
*/
|
|
454
|
+
&[data-tone='info'] {
|
|
455
|
+
background: ${t.colors.panel};
|
|
456
|
+
|
|
457
|
+
.ico {
|
|
458
|
+
color: ${t.colors.accent};
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
`;function Jn({name:i,priceCredits:a,onClose:o}){const{session:d}=Oe(),{data:h,isError:m}=mt(d),l=ft(),f=Ue(),[c,g]=u.useState("confirm"),[p,y]=u.useState(""),[j,w]=u.useState(null),[$,C]=u.useState(!1),[x,k]=u.useState("preparing"),M=u.useRef(!1),T=p.trim().toLowerCase()===i.toLowerCase(),F=c==="completing",I=a!=null?Ce(a):"—",B=a==null,z=h==null?void 0:h.credits,W=a!=null&&z!=null?a-z:0,S=W>0,P=B?n("names.priceUnavailable"):S?n("names.insufficientCredits",{credits:Ce(W)}):null;u.useEffect(()=>{const b=D=>{D.key==="Escape"&&!F&&o()};document.addEventListener("keydown",b);const G=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",b),document.body.style.overflow=G}},[F,o]);async function L(){if(!(!d||!T||B||S||M.current)){M.current=!0,g("completing"),w(null),k("preparing");try{const b=await fn({name:i,identity:d.identity,signer:d.signer,onProgress:k});oe("Shop Completed Purchase",{items:[{item_id:null,contract_address:null,token_id:null,price_usd:Me(a??0),category:"name",is_smart:!1}],purchase_type:"name",is_primary:!0,payment_type:"credits",value_credits:a??null,value_usd:Me(a??0),transaction_hash:b.originTxHash??null,settlement:b.status}),l.invalidateQueries({queryKey:["usd-balance"]}),l.invalidateQueries({queryKey:["my-assets"]}),g(b.status==="registered"?"success":"pending")}catch(b){oe(bt(b)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:yt(b),purchase_type:"name"});const G=b instanceof je,D=b instanceof $e;w(b instanceof ke?n("names.errorRouteCost"):G?n("names.errorNotRegistered"):D?n("names.errorSettlementUnknown"):(b==null?void 0:b.message)||n("names.errorGeneric")),C(G||D),g("error")}finally{M.current=!1}}}const R=c!=="success"&&c!=="pending",v=xt(d==null?void 0:d.providerType),N=v?2:1,A=v&&(x==="preparing"||x==="awaiting-confirmation"),_=A?1:N,re=A?n("names.confirming"):n("names.completing"),H=x==="registering"?n("names.processingRegistering"):null;return e.jsx(Sn,{onClick:F?void 0:o,role:"presentation",children:e.jsxs(En,{role:"dialog","aria-modal":"true","aria-label":n("names.buyTitle"),onClick:b=>b.stopPropagation(),children:[R&&e.jsxs(e.Fragment,{children:[e.jsxs(ce,{children:[e.jsx(de,{children:c==="error"?n("names.errorTitle"):n("names.buyTitle")}),e.jsx(he,{onClick:o,disabled:F,"aria-label":n("buyModal.close"),children:e.jsx(E,{name:"close"})})]}),e.jsxs(pe,{children:[n("names.myCreditsBalance")," ",e.jsx(O,{})," ",le(h,m)]}),e.jsx(ue,{})]}),(c==="confirm"||c==="error")&&e.jsxs(e.Fragment,{children:[e.jsxs(me,{children:[e.jsx(Ie,{"aria-hidden":!0,children:"@"}),e.jsxs(fe,{children:[e.jsxs(xe,{children:[i,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(ge,{children:n("names.subtitle")})]}),e.jsxs(ye,{children:[e.jsx(O,{}),I]})]}),c==="error"?e.jsxs(e.Fragment,{children:[e.jsxs(we,{children:[e.jsx(E,{name:"info","aria-hidden":!0}),e.jsx("span",{children:j})]}),$?e.jsx(be,{onClick:o,children:n("names.errorSpentDismiss")}):e.jsx(be,{onClick:()=>g("confirm"),children:n("names.tryAgain")})]}):e.jsxs(e.Fragment,{children:[e.jsxs(Mn,{children:[e.jsx(Fn,{children:n("names.confirmTitle")}),e.jsx(Nn,{dangerouslySetInnerHTML:{__html:n("names.confirmBody",{name:`<b>@${Xn(i)}</b>`})}}),e.jsxs(An,{children:[e.jsx(In,{"aria-hidden":!0,children:"@"}),e.jsx(zn,{value:p,onChange:b=>y(b.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(Bn,{children:".dcl.eth"})]})]}),P?e.jsxs(we,{"data-tone":"info","data-testid":"name-blocked-reason",children:[e.jsx(E,{name:"info","aria-hidden":!0}),e.jsx("span",{children:P})]}):null,e.jsx(be,{onClick:()=>void L(),disabled:!T||!d||B||S,children:n("names.buyCta")})]})]}),c==="completing"&&e.jsxs(Wn,{children:[e.jsx(Pn,{src:gt,alt:"",width:61,height:61}),e.jsxs(Hn,{children:[e.jsx(Un,{children:re}),e.jsxs(Gn,{children:[e.jsx(Dn,{"aria-hidden":!0,children:e.jsx("span",{})}),e.jsx(Zn,{"data-testid":"name-progress-count",children:`${_}/${N}`})]}),H?e.jsx(On,{children:H}):null]})]}),c==="pending"&&e.jsxs(e.Fragment,{children:[e.jsxs(ce,{children:[e.jsx(de,{children:n("names.pendingHeaderTitle")}),e.jsx(he,{onClick:o,"aria-label":n("buyModal.close"),children:e.jsx(E,{name:"close"})})]}),e.jsxs(pe,{children:[n("names.myCreditsBalance")," ",e.jsx(O,{})," ",le(h,m)]}),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(me,{style:{marginTop:20},children:[e.jsx(Ie,{"aria-hidden":!0,children:"@"}),e.jsxs(fe,{children:[e.jsxs(xe,{children:[i,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(ge,{children:n("names.subtitle")})]}),e.jsxs(ye,{children:[e.jsx(O,{}),I]})]}),e.jsx(ze,{children:e.jsx(Be,{onClick:()=>{o(),f("/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:o,"aria-label":n("buyModal.close"),children:e.jsx(E,{name:"close"})})]}),e.jsxs(pe,{children:[n("names.myCreditsBalance")," ",e.jsx(O,{})," ",le(h,m)]}),e.jsx(ue,{}),e.jsxs(qn,{children:[e.jsx(Vn,{"aria-hidden":!0,children:e.jsx(E,{name:"check"})}),e.jsxs(Kn,{children:[e.jsx("b",{children:n("names.successBannerBold")})," ",n("names.successBannerRest")]})]}),e.jsxs(me,{style:{marginTop:20},children:[e.jsxs(Tn,{"data-testid":"name-success-tile",children:[e.jsx(Ln,{src:jn,alt:"","aria-hidden":!0,width:47,height:47}),e.jsxs(Rn,{children:[e.jsx("span",{"aria-hidden":!0,children:i}),e.jsx(_n,{src:$n,alt:"","aria-hidden":!0,width:14,height:14})]})]}),e.jsxs(fe,{children:[e.jsxs(xe,{children:[i,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(ge,{children:n("names.subtitle")})]}),e.jsxs(ye,{children:[e.jsx(O,{}),I]})]}),e.jsxs(ze,{children:[e.jsx(Be,{onClick:()=>{o(),f("/my-items")},children:n("names.myItems")}),e.jsx(Qn,{href:q.profileUrl,target:"_blank",rel:"noopener noreferrer",children:n("names.assignToAvatar")})]})]})]})})}function Xn(i){return i.replace(/[&<>"']/g,a=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[a])}const Yn="https://cdn.decentraland.org/@dcl/shop/1.4.2-31322494096.commit-984acea/_assets/identity-icon-C8yAW_Gq.svg",es="https://cdn.decentraland.org/@dcl/shop/1.4.2-31322494096.commit-984acea/_assets/world-icon-6xQ-PmmW.svg",ts="https://cdn.decentraland.org/@dcl/shop/1.4.2-31322494096.commit-984acea/_assets/invite-icon-Bz6lCTuB.svg",ns="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",ss=s.div`
|
|
462
|
+
width: 100%;
|
|
463
|
+
min-width: 0;
|
|
464
|
+
`,is=s.nav`
|
|
465
|
+
display: flex;
|
|
466
|
+
align-items: center;
|
|
467
|
+
gap: 6px;
|
|
468
|
+
margin: 4px 0 16px;
|
|
469
|
+
font-family: ${t.font.sans};
|
|
470
|
+
font-size: 12px;
|
|
471
|
+
line-height: 1;
|
|
472
|
+
color: ${t.colors.gray4};
|
|
473
|
+
`,os=s.button`
|
|
474
|
+
border: 0;
|
|
475
|
+
background: none;
|
|
476
|
+
padding: 0;
|
|
477
|
+
cursor: pointer;
|
|
478
|
+
font: inherit;
|
|
479
|
+
color: ${t.colors.gray4};
|
|
480
|
+
|
|
481
|
+
&:hover {
|
|
482
|
+
color: ${t.colors.white};
|
|
483
|
+
text-decoration: underline;
|
|
484
|
+
}
|
|
485
|
+
&:focus-visible {
|
|
486
|
+
outline: 2px solid ${t.colors.white};
|
|
487
|
+
outline-offset: 2px;
|
|
488
|
+
}
|
|
489
|
+
`,as=s.span`
|
|
490
|
+
font-weight: 700;
|
|
491
|
+
color: ${t.colors.softWhite};
|
|
492
|
+
`,rs=s.div`
|
|
493
|
+
display: flex;
|
|
494
|
+
flex-direction: column;
|
|
495
|
+
gap: 48px;
|
|
496
|
+
padding-bottom: 48px;
|
|
497
|
+
|
|
498
|
+
${t.media.maxWidth("mobile")} {
|
|
499
|
+
gap: 32px;
|
|
500
|
+
padding-bottom: 32px;
|
|
501
|
+
}
|
|
502
|
+
`,ls=s.div`
|
|
503
|
+
position: relative;
|
|
504
|
+
border: 1px solid ${t.colors.magenta};
|
|
505
|
+
border-radius: 24px;
|
|
506
|
+
overflow: hidden;
|
|
507
|
+
padding: 88px 48px;
|
|
508
|
+
display: flex;
|
|
509
|
+
flex-direction: column;
|
|
510
|
+
align-items: center;
|
|
511
|
+
gap: 48px;
|
|
512
|
+
text-align: center;
|
|
513
|
+
background: ${t.colors.overlay};
|
|
514
|
+
|
|
515
|
+
${t.media.maxWidth("mobile")} {
|
|
516
|
+
padding: 40px 20px;
|
|
517
|
+
gap: 28px;
|
|
518
|
+
}
|
|
519
|
+
`,cs=s.div`
|
|
520
|
+
display: flex;
|
|
521
|
+
flex-direction: column;
|
|
522
|
+
align-items: center;
|
|
523
|
+
gap: 12px;
|
|
524
|
+
`,ds=s.h1`
|
|
525
|
+
margin: 0;
|
|
526
|
+
font-family: ${t.font.sans};
|
|
527
|
+
font-weight: 600;
|
|
528
|
+
font-size: 40px;
|
|
529
|
+
line-height: 1.167;
|
|
530
|
+
color: ${t.colors.white};
|
|
531
|
+
|
|
532
|
+
${t.media.maxWidth("mobile")} {
|
|
533
|
+
font-size: 26px;
|
|
534
|
+
}
|
|
535
|
+
`,hs=s.p`
|
|
536
|
+
margin: 0;
|
|
537
|
+
max-width: 760px;
|
|
538
|
+
font-family: ${t.font.sans};
|
|
539
|
+
font-weight: 500;
|
|
540
|
+
font-size: 24px;
|
|
541
|
+
line-height: 1.334;
|
|
542
|
+
color: #ecebed;
|
|
543
|
+
|
|
544
|
+
${t.media.maxWidth("mobile")} {
|
|
545
|
+
font-size: 16px;
|
|
546
|
+
}
|
|
547
|
+
`,ps=s.div`
|
|
548
|
+
width: min(785px, 100%);
|
|
549
|
+
display: flex;
|
|
550
|
+
flex-direction: column;
|
|
551
|
+
gap: 12px;
|
|
552
|
+
`,us=s.div`
|
|
553
|
+
position: relative;
|
|
554
|
+
`,ms=s("div",nn("invalid"))`
|
|
555
|
+
display: flex;
|
|
556
|
+
align-items: center;
|
|
557
|
+
gap: 8px;
|
|
558
|
+
padding: 8px 8px 8px 16px;
|
|
559
|
+
background: ${t.colors.softWhite};
|
|
560
|
+
/* Figma 1368:349148 gives the field a 3px Orange edge — it is the page's one input, and the design
|
|
561
|
+
leans on that weight to carry it. Red only when what has been typed cannot be claimed. */
|
|
562
|
+
border: 3px solid ${({invalid:i})=>i?t.colors.dclRed:t.colors.orange};
|
|
563
|
+
border-radius: 20px;
|
|
564
|
+
|
|
565
|
+
&:focus-within {
|
|
566
|
+
border-color: ${({invalid:i})=>i?t.colors.dclRed:t.colors.magenta};
|
|
567
|
+
}
|
|
568
|
+
|
|
569
|
+
${t.media.maxWidth("mobile")} {
|
|
570
|
+
border-radius: 16px;
|
|
571
|
+
}
|
|
572
|
+
`,fs=s.span`
|
|
573
|
+
position: absolute;
|
|
574
|
+
left: -9999px;
|
|
575
|
+
top: 0;
|
|
576
|
+
visibility: hidden;
|
|
577
|
+
pointer-events: none;
|
|
578
|
+
white-space: pre;
|
|
579
|
+
font-family: ${t.font.sans};
|
|
580
|
+
font-size: 20px;
|
|
581
|
+
font-weight: 600;
|
|
582
|
+
line-height: 1.6;
|
|
583
|
+
|
|
584
|
+
/* An empty field paints the PLACEHOLDER, which is lighter than a typed value — so the mirror has to
|
|
585
|
+
be lighter too. Measuring the placeholder at the value's weight made the box a few pixels wider
|
|
586
|
+
than the text in it, and ".dcl.eth" sat that far off the end of the word. */
|
|
587
|
+
&[data-placeholder] {
|
|
588
|
+
font-weight: 400;
|
|
589
|
+
}
|
|
590
|
+
|
|
591
|
+
${t.media.maxWidth("mobile")} {
|
|
592
|
+
font-size: 16px;
|
|
593
|
+
}
|
|
594
|
+
`,xs=s.div`
|
|
595
|
+
position: absolute;
|
|
596
|
+
top: calc(100% + 8px);
|
|
597
|
+
left: 0;
|
|
598
|
+
right: 0;
|
|
599
|
+
z-index: 2;
|
|
600
|
+
display: flex;
|
|
601
|
+
align-items: center;
|
|
602
|
+
gap: 8px;
|
|
603
|
+
padding: 8px 12px;
|
|
604
|
+
border-radius: 8px;
|
|
605
|
+
background: #ffcdd4;
|
|
606
|
+
color: #ec303a;
|
|
607
|
+
font-family: ${t.font.sans};
|
|
608
|
+
font-size: 14px;
|
|
609
|
+
font-weight: 500;
|
|
610
|
+
line-height: 1.2;
|
|
611
|
+
text-align: left;
|
|
612
|
+
|
|
613
|
+
${t.media.maxWidth("mobile")} {
|
|
614
|
+
position: static;
|
|
615
|
+
margin-top: 8px;
|
|
616
|
+
align-items: flex-start;
|
|
617
|
+
flex-wrap: wrap;
|
|
618
|
+
}
|
|
619
|
+
`,Ve=s.a`
|
|
620
|
+
display: inline-flex;
|
|
621
|
+
align-items: center;
|
|
622
|
+
gap: 2px;
|
|
623
|
+
margin-left: auto;
|
|
624
|
+
font-weight: 600;
|
|
625
|
+
text-decoration: underline;
|
|
626
|
+
text-transform: uppercase;
|
|
627
|
+
white-space: nowrap;
|
|
628
|
+
|
|
629
|
+
${t.media.maxWidth("mobile")} {
|
|
630
|
+
margin-left: 0;
|
|
631
|
+
}
|
|
632
|
+
`,gs=s(Ve)`
|
|
633
|
+
color: #ec303a;
|
|
634
|
+
`,ys=s.label`
|
|
635
|
+
flex: 1;
|
|
636
|
+
min-width: 0;
|
|
637
|
+
display: flex;
|
|
638
|
+
align-items: center;
|
|
639
|
+
gap: 0;
|
|
640
|
+
cursor: text;
|
|
641
|
+
overflow: hidden;
|
|
642
|
+
`,bs=s.span`
|
|
643
|
+
flex: none;
|
|
644
|
+
margin-right: 8px;
|
|
645
|
+
font-family: ${t.font.sans};
|
|
646
|
+
font-size: 26px;
|
|
647
|
+
font-weight: 500;
|
|
648
|
+
line-height: 1;
|
|
649
|
+
color: ${t.colors.muted2};
|
|
650
|
+
|
|
651
|
+
${t.media.maxWidth("mobile")} {
|
|
652
|
+
font-size: 20px;
|
|
653
|
+
}
|
|
654
|
+
`,ws=s.input`
|
|
655
|
+
flex: 0 1 auto;
|
|
656
|
+
min-width: 0;
|
|
657
|
+
max-width: 100%;
|
|
658
|
+
border: 0;
|
|
659
|
+
outline: none;
|
|
660
|
+
background: transparent;
|
|
661
|
+
font-family: ${t.font.sans};
|
|
662
|
+
font-size: 20px;
|
|
663
|
+
font-weight: 600;
|
|
664
|
+
line-height: 1.6;
|
|
665
|
+
color: ${t.colors.text};
|
|
666
|
+
padding: 0;
|
|
667
|
+
|
|
668
|
+
&::placeholder {
|
|
669
|
+
color: ${t.colors.muted1};
|
|
670
|
+
font-weight: 400;
|
|
671
|
+
}
|
|
672
|
+
|
|
673
|
+
${t.media.maxWidth("mobile")} {
|
|
674
|
+
font-size: 16px;
|
|
675
|
+
}
|
|
676
|
+
`,Cs=s.span`
|
|
677
|
+
flex: none;
|
|
678
|
+
/* Flush against the name: "yourname.dcl.eth" has to read as one address, and at 20px even a couple of
|
|
679
|
+
pixels here look like a space someone typed by mistake. */
|
|
680
|
+
margin-left: 0;
|
|
681
|
+
/* Not selectable: it is the fixed part of the address, not something the reader typed. */
|
|
682
|
+
user-select: none;
|
|
683
|
+
-webkit-user-select: none;
|
|
684
|
+
font-family: ${t.font.sans};
|
|
685
|
+
font-size: 20px;
|
|
686
|
+
font-weight: 400;
|
|
687
|
+
line-height: 1.6;
|
|
688
|
+
color: ${t.colors.muted1};
|
|
689
|
+
|
|
690
|
+
${t.media.maxWidth("mobile")} {
|
|
691
|
+
font-size: 16px;
|
|
692
|
+
}
|
|
693
|
+
`,vs=s.span`
|
|
694
|
+
flex: none;
|
|
695
|
+
font-family: ${t.font.sans};
|
|
696
|
+
font-size: 14px;
|
|
697
|
+
line-height: 1.43;
|
|
698
|
+
color: ${t.colors.muted2};
|
|
699
|
+
white-space: nowrap;
|
|
700
|
+
`,Ke=s.button`
|
|
701
|
+
flex: none;
|
|
702
|
+
display: inline-flex;
|
|
703
|
+
align-items: center;
|
|
704
|
+
justify-content: center;
|
|
705
|
+
gap: 8px;
|
|
706
|
+
height: 52px;
|
|
707
|
+
padding: 0 24px;
|
|
708
|
+
border: 0;
|
|
709
|
+
border-radius: 12px;
|
|
710
|
+
cursor: pointer;
|
|
711
|
+
background: ${t.gradients.buyBtn};
|
|
712
|
+
color: ${t.colors.softWhite};
|
|
713
|
+
font-family: ${t.font.sans};
|
|
714
|
+
font-weight: 600;
|
|
715
|
+
font-size: 15px;
|
|
716
|
+
letter-spacing: 0.46px;
|
|
717
|
+
line-height: 24px;
|
|
718
|
+
text-transform: uppercase;
|
|
719
|
+
transition: background-image 0.15s ease;
|
|
720
|
+
|
|
721
|
+
/* Both ends stay on background-IMAGE: a gradient cannot interpolate to a plain colour, so swapping
|
|
722
|
+
the background shorthand instead blanks the button for the length of the transition. */
|
|
723
|
+
&:hover:not(:disabled),
|
|
724
|
+
&:active:not(:disabled) {
|
|
725
|
+
background-image: linear-gradient(${t.colors.dclRed}, ${t.colors.dclRed});
|
|
726
|
+
}
|
|
727
|
+
&:focus-visible {
|
|
728
|
+
outline: 2px solid ${t.colors.white};
|
|
729
|
+
outline-offset: 2px;
|
|
730
|
+
}
|
|
731
|
+
&:disabled {
|
|
732
|
+
cursor: not-allowed;
|
|
733
|
+
opacity: 0.5;
|
|
734
|
+
}
|
|
735
|
+
|
|
736
|
+
${t.media.maxWidth("mobile")} {
|
|
737
|
+
display: none;
|
|
738
|
+
}
|
|
739
|
+
`,js=s(Ke)`
|
|
740
|
+
display: none;
|
|
741
|
+
|
|
742
|
+
${t.media.maxWidth("mobile")} {
|
|
743
|
+
display: inline-flex;
|
|
744
|
+
width: 100%;
|
|
745
|
+
height: 48px;
|
|
746
|
+
border-radius: 12px;
|
|
747
|
+
}
|
|
748
|
+
`,$s=s.span`
|
|
749
|
+
display: inline-flex;
|
|
750
|
+
align-items: center;
|
|
751
|
+
gap: 4px;
|
|
752
|
+
font-size: 18px;
|
|
753
|
+
font-weight: 600;
|
|
754
|
+
|
|
755
|
+
.ico {
|
|
756
|
+
width: 13.26px;
|
|
757
|
+
height: 14px;
|
|
758
|
+
}
|
|
759
|
+
`,ks=s.div`
|
|
760
|
+
display: flex;
|
|
761
|
+
align-items: center;
|
|
762
|
+
gap: 8px;
|
|
763
|
+
padding: 8px 14px;
|
|
764
|
+
border-radius: 8px;
|
|
765
|
+
font-family: ${t.font.sans};
|
|
766
|
+
font-size: 13px;
|
|
767
|
+
font-weight: 500;
|
|
768
|
+
text-align: left;
|
|
769
|
+
|
|
770
|
+
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)"};
|
|
771
|
+
color: ${({tone:i})=>i==="error"?t.colors.dclRed:i==="ok"?"#0f7a4f":"#ecebed"};
|
|
772
|
+
|
|
773
|
+
.ico {
|
|
774
|
+
width: 16px;
|
|
775
|
+
height: 16px;
|
|
776
|
+
flex: none;
|
|
777
|
+
}
|
|
778
|
+
`,Y=s(ks)`
|
|
779
|
+
position: absolute;
|
|
780
|
+
top: calc(100% + 8px);
|
|
781
|
+
left: 0;
|
|
782
|
+
right: 0;
|
|
783
|
+
z-index: 2;
|
|
784
|
+
|
|
785
|
+
/* Static on mobile, as TakenBanner is: the claim button sits below InputWrap there, so anything
|
|
786
|
+
floating out of the input lands on top of it. */
|
|
787
|
+
${t.media.maxWidth("mobile")} {
|
|
788
|
+
position: static;
|
|
789
|
+
margin-top: 8px;
|
|
790
|
+
}
|
|
791
|
+
`,Ss=s(Ve)`
|
|
792
|
+
color: inherit;
|
|
793
|
+
`,Es=s.section`
|
|
794
|
+
display: flex;
|
|
795
|
+
flex-direction: column;
|
|
796
|
+
gap: 48px;
|
|
797
|
+
padding: 0 48px;
|
|
798
|
+
|
|
799
|
+
${t.media.maxWidth("mobile")} {
|
|
800
|
+
gap: 32px;
|
|
801
|
+
padding: 0 20px;
|
|
802
|
+
}
|
|
803
|
+
`,Ts=s.div`
|
|
804
|
+
display: flex;
|
|
805
|
+
flex-direction: column;
|
|
806
|
+
align-items: center;
|
|
807
|
+
gap: 24px;
|
|
808
|
+
`,Ls=s.h2`
|
|
809
|
+
margin: 0;
|
|
810
|
+
text-align: center;
|
|
811
|
+
font-family: ${t.font.sans};
|
|
812
|
+
font-weight: 600;
|
|
813
|
+
font-size: 32px;
|
|
814
|
+
line-height: 1.167;
|
|
815
|
+
color: ${t.colors.white};
|
|
816
|
+
|
|
817
|
+
${t.media.maxWidth("mobile")} {
|
|
818
|
+
font-size: 22px;
|
|
819
|
+
}
|
|
820
|
+
`,Rs=s.p`
|
|
821
|
+
margin: 0;
|
|
822
|
+
max-width: 907px;
|
|
823
|
+
text-align: center;
|
|
824
|
+
font-family: ${t.font.sans};
|
|
825
|
+
font-weight: 400;
|
|
826
|
+
font-size: 20px;
|
|
827
|
+
line-height: 1.57;
|
|
828
|
+
color: ${t.colors.gray4};
|
|
829
|
+
|
|
830
|
+
${t.media.maxWidth("mobile")} {
|
|
831
|
+
font-size: 16px;
|
|
832
|
+
}
|
|
833
|
+
`,_s=s.div`
|
|
834
|
+
display: grid;
|
|
835
|
+
grid-template-columns: repeat(4, 1fr);
|
|
836
|
+
gap: 24px;
|
|
837
|
+
align-items: stretch;
|
|
838
|
+
|
|
839
|
+
${t.media.maxWidth("lg")} {
|
|
840
|
+
grid-template-columns: repeat(2, 1fr);
|
|
841
|
+
}
|
|
842
|
+
${t.media.maxWidth("mobile")} {
|
|
843
|
+
grid-template-columns: 1fr;
|
|
844
|
+
}
|
|
845
|
+
`,ee=s.article`
|
|
846
|
+
min-width: 0;
|
|
847
|
+
display: flex;
|
|
848
|
+
flex-direction: column;
|
|
849
|
+
gap: 32px;
|
|
850
|
+
padding: 24px;
|
|
851
|
+
background: ${t.colors.overlay};
|
|
852
|
+
border-radius: 24px;
|
|
853
|
+
|
|
854
|
+
@media (forced-colors: active) {
|
|
855
|
+
outline: 1px solid CanvasText;
|
|
856
|
+
}
|
|
857
|
+
|
|
858
|
+
${t.media.maxWidth("mobile")} {
|
|
859
|
+
gap: 20px;
|
|
860
|
+
padding: 20px;
|
|
861
|
+
}
|
|
862
|
+
`,te=s.img`
|
|
863
|
+
display: block;
|
|
864
|
+
align-self: flex-start;
|
|
865
|
+
height: 55px;
|
|
866
|
+
width: auto;
|
|
867
|
+
`,ne=s.div`
|
|
868
|
+
flex: 1;
|
|
869
|
+
display: flex;
|
|
870
|
+
flex-direction: column;
|
|
871
|
+
gap: 12px;
|
|
872
|
+
`,se=s.h3`
|
|
873
|
+
margin: 0;
|
|
874
|
+
font-family: ${t.font.sans};
|
|
875
|
+
font-weight: 700;
|
|
876
|
+
font-size: 20px;
|
|
877
|
+
line-height: 1.57;
|
|
878
|
+
text-transform: uppercase;
|
|
879
|
+
color: ${t.colors.white};
|
|
880
|
+
`,ie=s.p`
|
|
881
|
+
margin: 0;
|
|
882
|
+
font-family: ${t.font.sans};
|
|
883
|
+
font-weight: 400;
|
|
884
|
+
font-size: 14px;
|
|
885
|
+
line-height: 1.57;
|
|
886
|
+
color: ${t.colors.media};
|
|
887
|
+
`,Ms=s.span`
|
|
888
|
+
font-weight: 700;
|
|
889
|
+
color: ${t.colors.white};
|
|
890
|
+
`,We=s.a`
|
|
891
|
+
display: inline-flex;
|
|
892
|
+
align-items: center;
|
|
893
|
+
gap: 2px;
|
|
894
|
+
margin-top: auto;
|
|
895
|
+
font-family: ${t.font.sans};
|
|
896
|
+
font-weight: 500;
|
|
897
|
+
font-size: 14px;
|
|
898
|
+
line-height: 30px;
|
|
899
|
+
color: ${t.colors.softWhite};
|
|
900
|
+
text-decoration: underline;
|
|
901
|
+
|
|
902
|
+
&:focus-visible {
|
|
903
|
+
outline: 2px solid ${t.colors.softWhite};
|
|
904
|
+
outline-offset: 2px;
|
|
905
|
+
}
|
|
906
|
+
|
|
907
|
+
.ico {
|
|
908
|
+
width: 13px;
|
|
909
|
+
height: 13px;
|
|
910
|
+
}
|
|
911
|
+
`,Fs=s.span`
|
|
912
|
+
position: absolute;
|
|
913
|
+
width: 1px;
|
|
914
|
+
height: 1px;
|
|
915
|
+
padding: 0;
|
|
916
|
+
margin: -1px;
|
|
917
|
+
overflow: hidden;
|
|
918
|
+
clip: rect(0, 0, 0, 0);
|
|
919
|
+
white-space: nowrap;
|
|
920
|
+
border: 0;
|
|
921
|
+
`,Ns="https://docs.decentraland.org/creator/worlds/about/",As="https://governance.decentraland.org";function Pe(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 Is({onBack:i}){Ge({title:n("seo.names.title"),description:n("seo.names.description")});const{session:a,signIn:o}=Oe(),d=xn(),{data:h}=De(),m=h?Ze(V,h):null,[l,f]=u.useState(""),[c,g]=u.useState("idle"),[p,y]=u.useState(!1),[j,w]=u.useState(!1),[$,C]=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 N=_=>C(_.matches);return v.addEventListener("change",N),()=>v.removeEventListener("change",N)},[]);const x=n("names.placeholderExamples"),k=u.useMemo(()=>x.split(",").map(v=>v.trim()).filter(Boolean),[x]),T=vn(k,!j&&!l&&!$)||n("names.inputPlaceholder"),F=u.useRef(null),[I,B]=u.useState(void 0);u.useLayoutEffect(()=>{F.current&&B(F.current.getBoundingClientRect().width)},[l,T]),u.useEffect(()=>{if(!Ne(l).ok){g(l.length===0?"idle":"invalid");return}g("checking");const N=new AbortController,A=setTimeout(()=>{(async()=>{try{const _=await cn(l,{signal:N.signal});g(_)}catch(_){if((_==null?void 0:_.name)==="AbortError")return;g("error")}})()},400);return()=>{clearTimeout(A),N.abort()}},[l]);const z=Ne(l),W=z.ok&&(c==="available"||c==="error"),S=d&&W,P=!d&&W;function L(){if(S){if(!a){o();return}y(!0)}}const R=e.jsxs(e.Fragment,{children:[n("names.claim"),m!=null?e.jsxs($s,{children:[e.jsx(O,{}),Ce(m)]}):null]});return e.jsxs(ss,{"data-testid":"names-page",children:[e.jsxs(is,{"aria-label":n("names.breadcrumbAria"),children:[e.jsx(os,{onClick:i,children:n("names.breadcrumbCollectibles")}),e.jsx("span",{"aria-hidden":!0,children:">"}),e.jsx(as,{children:n("names.breadcrumbCurrent")})]}),e.jsxs(rs,{children:[e.jsxs(ls,{children:[e.jsxs(cs,{children:[e.jsx(ds,{children:n("names.heroTitle")}),e.jsx(hs,{children:n("names.heroSubtitle")})]}),e.jsxs(ps,{children:[e.jsxs(us,{"data-testid":"names-input-wrap",children:[e.jsxs(ms,{invalid:c==="taken",children:[e.jsxs(ys,{children:[e.jsx(bs,{"aria-hidden":!0,children:"@"}),e.jsx(ws,{value:l,onChange:v=>f(an(v.target.value)),placeholder:T,"aria-label":n("names.inputAria"),autoComplete:"off",spellCheck:!1,maxLength:ae,onFocus:()=>w(!0),style:{width:I!=null?`${I}px`:void 0}}),e.jsx(fs,{ref:F,"aria-hidden":!0,"data-placeholder":!l||void 0,children:l||T}),e.jsx(Cs,{children:n("names.suffix")})]}),l.length>0?e.jsxs(vs,{"aria-hidden":!0,children:[l.length,"/",ae]}):null,e.jsx(Ke,{onClick:L,disabled:!S,"data-testid":"names-claim",children:R})]}),c==="taken"?e.jsxs(xs,{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(gs,{href:Pe(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")}):P?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(Ss,{href:Pe(l),target:"_blank",rel:"noopener noreferrer",children:[n("names.registrationDisabledLink"),e.jsx(E,{name:"external-link",size:13,"aria-hidden":!0})]})]}):c==="error"?e.jsx(Y,{tone:"muted",role:"status",children:n("names.checkError")}):c==="invalid"&&!z.ok&&z.reason==="too-short"?e.jsx(Y,{tone:"muted",role:"status",children:n("names.tooShort",{min:qe})}):null]}),e.jsx(js,{onClick:L,disabled:!S,children:R}),e.jsx(Fs,{role:"status","aria-live":"polite",children:c==="available"?n("names.available",{name:l}):""})]})]}),e.jsxs(Es,{children:[e.jsxs(Ts,{children:[e.jsx(Ls,{children:n("names.whyTitle")}),e.jsx(Rs,{children:n("names.whyIntro")})]}),e.jsxs(_s,{children:[e.jsxs(ee,{children:[e.jsx(te,{src:Yn,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:es,alt:""}),e.jsxs(ne,{children:[e.jsx(se,{children:n("names.why2Title")}),e.jsxs(ie,{children:[n("names.why2")," ",e.jsx(Ms,{children:n("names.why2Address")})]}),e.jsxs(We,{href:Ns,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:ts,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:ns,alt:""}),e.jsxs(ne,{children:[e.jsx(se,{children:n("names.why4Title")}),e.jsx(ie,{children:n("names.why4")}),e.jsxs(We,{href:As,target:"_blank",rel:"noopener noreferrer",children:[n("names.learnMore"),e.jsx(E,{name:"external-link","aria-hidden":!0})]})]})]})]})]})]}),p?e.jsx(Jn,{name:l,priceCredits:m,onClose:()=>y(!1)}):null]})}const zs="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",He=48,Bs=["all","on_sale","not_for_sale"];function oi(){const[i]=et(),a=Ue(),o=(i.get("q")??"").trim().toLowerCase(),d=(i.get("q")??"").trim();Ge({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"}),[]),[m,l]=tt(h),{subCategory:f,rarities:c,priceMin:g,priceMax:p,smart:y,sort:j}=m,w=m.category,$=Bs.includes(m.status)?m.status:"on_sale";nt(`${w}:${f??""}`);const[C,x]=u.useState(!1);u.useEffect(()=>{if(!C)return;const r=Q=>{Q.key==="Escape"&&x(!1)};document.addEventListener("keydown",r);const U=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",r),document.body.style.overflow=U}},[C]);const k=$==="on_sale",M=g&&!Number.isNaN(Number(g))?Number(g):void 0,T=p&&!Number.isNaN(Number(p))?Number(p):void 0,F=wt(),I=f?ot[f]:void 0,B=(_e.find(r=>r.key===j)??_e[0]).server,z={category:w,rarities:c.length?c:void 0,wearableCategories:I,minPriceCredits:M,maxPriceCredits:T,search:o||void 0,sortBy:B,isSmart:y||void 0,onSale:!0,listingType:F?void 0:"primary"},W={category:w,rarities:c.length?c:void 0,wearableCategories:I,search:o||void 0,sortBy:B,isWearableSmart:y||void 0,isOnSale:$==="not_for_sale"?!1:void 0},{items:S,total:P,isLoading:L,isPlaceholderData:R,error:v,hasNextPage:N,isFetchingNextPage:A,isFetchNextPageError:_,fetchNextPage:re}=Gt(k?["shop-items",z]:["catalog-items",W],r=>k?vt({...z,first:He,skip:r}):jt({...W,first:He,skip:r}),{enabled:w!=="names"}),H=P,{data:b,isError:G,isPending:D}=De(),Qe=r=>b&&r.manaWei?Ze(r.manaWei,b):null,Je=k&&D&&S.some(r=>r.source==="legacy"),Se=L||R||Je,Xe=L?15:Math.max(S.length,1),Ee=u.useRef(null);u.useEffect(()=>{L||R||!o||Ee.current===o||(Ee.current=o,oe("Shop Searched",{query:o,result_count:H}))},[o,L,R,H]);const K=u.useRef("__init__");u.useEffect(()=>{if(L||R)return;const r=JSON.stringify({category:w,subCategory:f,rarities:c,min:M,max:T,sort:j,status:$,smart:y});if(K.current==="__init__"||K.current===r){K.current=r;return}K.current=r,oe("Shop Applied Filter",{filters:{category:w,sub_category:f,rarities:c,min_price_credits:M??null,max_price_credits:T??null,status:$,smart:y,sort:j},result_count:H})},[w,f,c,M,T,j,$,y,L,R,H]);function Te(r){l({category:r,subCategory:null})}function Le(r){l({status:r})}function Re(r){l({rarities:c.includes(r)?c.filter(U=>U!==r):[...c,r]})}function Ye(){l(h)}const Z=[];(M!=null||T!=null)&&Z.push({key:"price",label:n("filter.price"),onRemove:()=>{l({priceMin:"",priceMax:""})}});for(const r of st)c.includes(r)&&Z.push({key:`rarity-${r}`,label:Ct(r),onRemove:()=>Re(r)});return y&&Z.push({key:"smart",label:n("filter.smart"),onRemove:()=>l({smart:!1})}),$!=="on_sale"&&Z.push({key:"status",label:$==="all"?n("filter.statusAll"):n("filter.notForSale"),onRemove:()=>Le("on_sale")}),e.jsxs($t,{"data-testid":"browse",children:[w!=="names"&&e.jsxs(e.Fragment,{children:[C?e.jsx(kt,{onClick:()=>x(!1),"aria-hidden":!0}):null,e.jsxs(St,{"data-open":C||void 0,"data-testid":"browse-sidebar",children:[e.jsxs(Et,{children:[e.jsx(Tt,{children:n("assets.filters")}),e.jsx(Lt,{onClick:()=>x(!1),"aria-label":n("assets.closeFilters"),children:"✕"})]}),e.jsx(Rt,{children:e.jsx(_t,{category:w,subCategory:f,onCategory:Te,onSub:r=>l({subCategory:r}),priceMin:g,priceMax:p,onPriceMin:r=>l({priceMin:r}),onPriceMax:r=>l({priceMax:r}),rarities:c,onToggleRarity:Re,status:$,onStatus:Le,smart:y,onSmart:r=>l({smart:r})})}),e.jsx(Mt,{children:e.jsx(Ft,{type:"button",onClick:()=>x(!1),children:n("assets.showItems")})})]})]}),e.jsx(Nt,{children:w==="names"?e.jsx(Is,{onBack:()=>Te("all")}):e.jsxs(e.Fragment,{children:[e.jsx(it,{sort:j,onSort:r=>l({sort:r}),total:P,loading:L||R,query:o,onOpenFilters:()=>x(!0),chips:Z,onClearChips:Ye}),G&&k&&S.some(r=>r.source==="legacy")?e.jsx(At,{"data-variant":"warn",children:n("assets.marketUnavailable")}):null,v?e.jsx(Dt,{message:n("assets.loadError"),testId:"browse-error"}):null,!Se&&S.length===0&&!v?e.jsxs(It,{"data-testid":"browse-empty",children:[e.jsx(zt,{src:zs,alt:""}),e.jsxs(Bt,{children:[e.jsx(Wt,{children:n("assets.empty.title")}),e.jsx(Pt,{children:d?e.jsxs(e.Fragment,{children:[n("assets.empty.searchBefore"),e.jsx("b",{children:d}),n("assets.empty.searchAfter")]}):n("assets.empty.filters")})]}),e.jsx(Ht,{children:e.jsx(Ut,{type:"button",onClick:()=>a("/overview"),children:n("assets.empty.cta")})})]}):e.jsxs(e.Fragment,{children:[e.jsx(sn,{"data-testid":"grid",children:Se?e.jsx(Fe,{count:Xe}):e.jsxs(e.Fragment,{children:[S.map(r=>{if(!k)return e.jsx(J,{item:r,mode:"view"},X(r));const U=r;if(U.source!=="legacy")return e.jsx(J,{item:r},X(r));const Q=Qe(U);return Q==null?e.jsx(J,{item:r,mode:"view"},X(r)):e.jsx(J,{item:{...U,priceCredits:Q}},X(r))}),A?e.jsx(Fe,{count:6}):null]})}),e.jsx(Ot,{hasNextPage:N,isFetching:A,isError:_,onLoadMore:()=>void re()})]})]})})]})}export{oi as Assets};
|