@dcl/shop 0.1.0 → 0.1.1-30909439604.commit-4721d83
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-BwdIaUnW.js → Activity-CiQm3fPZ.js} +7 -7
- package/_assets/{AnimatedBackground-DP8XKTVN.js → AnimatedBackground-BFRTkuDo.js} +1 -1
- package/_assets/{Assets-Degiynxt.js → Assets--cn5UbRN.js} +50 -50
- package/_assets/{Assets.styles-CmDKBB8r.js → Assets.styles-CkJWzjdk.js} +1 -1
- package/_assets/{Authorizations-CJeq3VNJ.js → Authorizations-Cqqxn9wD.js} +7 -7
- package/_assets/{Cart-DsUb4sI3.js → Cart-ByLo0Q5U.js} +12 -12
- package/_assets/{CircularProgress-CNroeQ3o.js → CircularProgress-Cv24wKWu.js} +5 -5
- package/_assets/Collection-DbZpN_eH.js +119 -0
- package/_assets/{CollectionCarousel-D36c6dts.js → CollectionCarousel-DKVvizGs.js} +7 -7
- package/_assets/{ConstantsUtil-Dfwpy1eP.js → ConstantsUtil-CNJ3pGKv.js} +1 -1
- package/_assets/{ContentClient-D6ofwSpu.js → ContentClient-BJFWm8Bs.js} +1 -1
- package/_assets/Creator-CtdwyJXl.js +306 -0
- package/_assets/{DeploymentBuilder-ku3det23.js → DeploymentBuilder-CXBC22K0.js} +1 -1
- package/_assets/{ErrorNotice-COIh7ro4.js → ErrorNotice-51eOicue.js} +1 -1
- package/_assets/{ExchangeController-DOL-_brz.js → ExchangeController--vn2md5b.js} +1 -1
- package/_assets/{GetCredits-BkjOQ5or.js → GetCredits-CnE9Mkj3.js} +10 -10
- package/_assets/{HelpersUtil-2hZP33Du.js → HelpersUtil-Dg90boC1.js} +1 -1
- package/_assets/ImportListings-BxeqcxAE.js +461 -0
- package/_assets/{ItemDetail-D57x9bXl.js → ItemDetail-CqkeMLxu.js} +251 -281
- package/_assets/LoadMore-BolkAKn7.js +7 -0
- package/_assets/ManaPricingBanner.styles-DKUacHFQ.js +74 -0
- package/_assets/{MenuList-d6ca0DH6.js → MenuList-D4kLbIwO.js} +2 -2
- package/_assets/MyAssets-v3gryjCk.js +381 -0
- package/_assets/{MyFavorites-DxYh88wB.js → MyFavorites-Bg2hc3VG.js} +2 -2
- package/_assets/{NetworkUtil-HlUKXKcF.js → NetworkUtil-Dh3JWXso.js} +1 -1
- package/_assets/{NotFound-DA15lCMu.js → NotFound-R9sTwMQk.js} +1 -1
- package/_assets/{NotificationsBell-C8r1c8mg.js → NotificationsBell-BoefPrvQ.js} +1 -1
- package/_assets/StoreSettings-GYoZCBBR.js +239 -0
- package/_assets/Success-CGQGJeM-.js +296 -0
- package/_assets/{SwapController-CRz8E17o.js → SwapController-BcfprLwB.js} +1 -1
- package/_assets/{Tooltip-D92WFEmr.js → Tooltip-CoMCVLgL.js} +1 -1
- package/_assets/{TradeService-DIWR3GwD.js → TradeService-Be5Jm26-.js} +1 -1
- package/_assets/{W3MFrameProviderSingleton-BuQKbZaF.js → W3MFrameProviderSingleton-BLAdE798.js} +3 -3
- package/_assets/{WebCryptoP256-BFDAPngw.js → WebCryptoP256-B2g3GckQ.js} +1 -1
- package/_assets/{authorizations-BNs0emga.js → authorizations-FkFZVBeE.js} +1 -1
- package/_assets/{basic-C6XisVyZ.js → basic-DEelCa7C.js} +1 -1
- package/_assets/{biconomy-09nDKxxN.js → biconomy-BuAmKMqp.js} +1 -1
- package/_assets/{browseLayout.styles-CTl6D_zv.js → browseLayout.styles-6Bx0cPB_.js} +6 -6
- package/_assets/{browser-BGlawS--.js → browser-CMge1DAk.js} +1 -1
- package/_assets/{browser-ponyfill-Dm9rZGtt.js → browser-ponyfill-DdemUjDS.js} +1 -1
- package/_assets/{builder-C8hUH3RB.js → builder-Z4iUHEpn.js} +1 -1
- package/_assets/{buy-Cl7snZzi.js → buy-DiLzTHFT.js} +1 -1
- package/_assets/{buy-gasless-DVLP7U8S.js → buy-gasless-Cn4_YLUa.js} +1 -1
- package/_assets/{categories-BGGjSLd9.js → categories-Byz019bF.js} +8 -8
- package/_assets/{ccip-Dx_KcJBs.js → ccip-CCZIckpG.js} +1 -1
- package/_assets/{ccip-DLDLk2fK.js → ccip-DUqe0wPP.js} +1 -1
- package/_assets/{chains-DjVUcpdx.js → chains-DwiEm2Ny.js} +1 -1
- package/_assets/{clsx-BY1AO2V7.js → clsx-sy6nSRXN.js} +2 -2
- package/_assets/{common-BzdjGk0Y.js → common-ChK99Sbg.js} +1 -1
- package/_assets/confettiAnimation-BpyTLLuX.js +1 -0
- package/_assets/{controller-ZqrzYJ4o.js → controller-D2U901D4.js} +2 -2
- package/_assets/{core-CWR04nJr.js → core-BqndrHwC.js} +4 -4
- package/_assets/{createSvgIcon-BUIodiet.js → createSvgIcon-nAlfqqgf.js} +5 -5
- package/_assets/{custom-DMjRmtpL.js → custom-DJvYgxJy.js} +1 -1
- package/_assets/{data-capture-SoaOqGRY.js → data-capture-CLOU8jih.js} +1 -1
- package/_assets/{decimals-rMqzXjFU.js → decimals-C49MnWnC.js} +1 -1
- package/_assets/decimals-DenLQ0L2.js +1 -0
- package/_assets/{detectExtension-0JcORGBX.js → detectExtension-Bs6N_T7E.js} +1 -1
- package/_assets/{email-i8v6FMCW.js → email-BxF_EMmd.js} +1 -1
- package/_assets/{embedded-wallet-DBT_Ev8g.js → embedded-wallet-6IYwV5B_.js} +1 -1
- package/_assets/emotion-styled.browser.esm-9O-_UQ_M.js +1 -0
- package/_assets/{engine-Bn2HNIpq.js → engine-CDTFOGA6.js} +1 -1
- package/_assets/{errors-Ce5OngHE.js → errors-sJnX14Ki.js} +1 -1
- package/_assets/estimate-l1-fee-B4XbNvFY.js +1 -0
- package/_assets/eth_estimateGas-DaegCW9w.js +1 -0
- package/_assets/{eth_getStorageAt-DIGus6Ic.js → eth_getStorageAt-g-V8ByC9.js} +1 -1
- package/_assets/eth_getTransactionCount-ChnmCar0.js +1 -0
- package/_assets/{ethereum-7duKFA0R.js → ethereum-DdnrEX6r.js} +1 -1
- package/_assets/{ethers-CXBJm_wN.js → ethers-rFeF6PNV.js} +1 -1
- package/_assets/{execute-DO9Rpu0c.js → execute-D8YtDqpj.js} +2 -2
- package/_assets/{extractIPFS-CTs5XnuT.js → extractIPFS-DiQ3ktqZ.js} +1 -1
- package/_assets/{features-5tSUGHg0.js → features-B8MZg8q9.js} +1 -1
- package/_assets/{fetchTokenMetadata-CHnDbBcr.js → fetchTokenMetadata-Cn6UkNbd.js} +2 -2
- package/_assets/field.styles-o0yoMx97.js +70 -0
- package/_assets/{fortmatic-CCMQbesB.js → fortmatic-ZrVXe0if.js} +1 -1
- package/_assets/{get-bytecode-Bg8NviKV.js → get-bytecode-B5xpAv7a.js} +1 -1
- package/_assets/get-ecosystem-wallet-info-DyEERgSx.js +1 -0
- package/_assets/{getBalance-BU5lPIM1.js → getBalance-pdi104jy.js} +2 -2
- package/_assets/{getInstalledModules-KP-LSI0j.js → getInstalledModules-vRyVzBkY.js} +1 -1
- package/_assets/{getNFT-Ctbterca.js → getNFT-ChdTpPL_.js} +2 -2
- package/_assets/getNFT-JwHQ_s5F.js +1 -0
- package/_assets/{getThemeProps-xrG7EYWl.js → getThemeProps-CFDZlxj4.js} +1 -1
- package/_assets/{grid.styles-B1mDfzvi.js → grid.styles-DVBPQuRz.js} +1 -1
- package/_assets/{hashTypedData-DaCcjWXS.js → hashTypedData-2Z2_gEL6.js} +1 -1
- package/_assets/{hashTypedData-BiojmScK.js → hashTypedData-DP9JOjjX.js} +1 -1
- package/_assets/{in-app-Sb-fFEpv.js → in-app-CRH3jQep.js} +1 -1
- package/_assets/{in-app-wallet-calls-BYLiaB1J.js → in-app-wallet-calls-Dp9TxCgN.js} +1 -1
- package/_assets/{index-BbxUYBIl.js → index--coIj_2Q.js} +2 -2
- package/_assets/{index-BV7d8LIf.js → index-5o0_4PJn.js} +1 -1
- package/_assets/{index-CcRW7qMf.js → index-6_pDklk8.js} +1 -1
- package/_assets/{index-BBM5Da88.js → index-72R1sLRe.js} +1 -1
- package/_assets/{index-CcrwUr4B.js → index-B1YUW9FQ.js} +2 -2
- package/_assets/index-B2O7rGJL.js +1 -0
- package/_assets/{index-BCG-_RTT.js → index-B8_IX_3e.js} +1 -1
- package/_assets/{index-Cw22meEP.js → index-BGPVOBHa.js} +1 -1
- package/_assets/{index-DQ2tXB-9.js → index-BHMMC_4O.js} +1 -1
- package/_assets/{index-DmGcqzuR.js → index-BLpG8mks.js} +1 -1
- package/_assets/{index-CD9t0mSF.js → index-BRGDK96N.js} +1 -1
- package/_assets/{index-BzC7P3rh.js → index-BUbZ4ieP.js} +1 -1
- package/_assets/{index-BdWG2PoE.js → index-BWXsvDqD.js} +1 -1
- package/_assets/{index-CKo0vnRV.js → index-BZWNTqaV.js} +1 -1
- package/_assets/{index-DjcstBXY.js → index-BaUli81x.js} +1 -1
- package/_assets/index-Bbgy14tN.js +1 -0
- package/_assets/index-BiIZh9R9.js +2820 -0
- package/_assets/{index-CE-Z89iI.js → index-BkP6Akod.js} +1 -1
- package/_assets/{index-8EYFemjW.js → index-BszwI7-F.js} +1 -1
- package/_assets/{index-CEP90DOS.js → index-BtLL7F-4.js} +1 -1
- package/_assets/{index-DC-Z7MbP.js → index-BtkxBg3h.js} +2 -2
- package/_assets/{index-DWFCwLfs.js → index-Bu5mtkuE.js} +1 -1
- package/_assets/{index-6HemuoHH.js → index-C-E_Jk-6.js} +1 -1
- package/_assets/{index-Bb2mLVTh.js → index-C4AfvPtb.js} +1 -1
- package/_assets/{index-CSqaG5Rs.js → index-CBrp3dUZ.js} +1 -1
- package/_assets/{index-DgMAf2q5.js → index-CCoJpS6M.js} +1 -1
- package/_assets/{index-DMKhInQc.js → index-CDCj0Qak.js} +2 -2
- package/_assets/{index-DvlgcdsJ.js → index-CJ03r2wd.js} +1 -1
- package/_assets/{index-hesFTmUX.js → index-CY1VUN_S.js} +1 -1
- package/_assets/{index-DgKHc2Pp.js → index-CYEynknO.js} +1 -1
- package/_assets/{index-OiKTI-o_.js → index-CZQ-Avg8.js} +1 -1
- package/_assets/{index-BNnLGudB.js → index-ClSZl7Vh.js} +1 -1
- package/_assets/{index-3x98-rKq.js → index-CsEaqK5K.js} +1 -1
- package/_assets/{index-DbkHKS7K.js → index-Csd0nRMS.js} +2 -2
- package/_assets/{index-BpA1I7hL.js → index-CwLvQ9MJ.js} +1 -1
- package/_assets/{index-cSAleFRI.js → index-CyyhNrl2.js} +1 -1
- package/_assets/{index-CSu0sG0T.js → index-D0JhTMR7.js} +1 -1
- package/_assets/{index-CrlwRjah.js → index-D29EUWHC.js} +1 -1
- package/_assets/{index-BsQQxLJN.js → index-D3OKsJLK.js} +1 -1
- package/_assets/{index-DLEx9ISf.js → index-D9Dv7ZRq.js} +1 -1
- package/_assets/{index-PJSp7ijP.js → index-DDqqXhJL.js} +3 -3
- package/_assets/{index-BQG7R5QF.js → index-DGuNIM9a.js} +1 -1
- package/_assets/{index-Cv-5v5Ze.js → index-DHFAjoyI.js} +1 -1
- package/_assets/{index-BgKl-ydS.js → index-DXe1QzPN.js} +1 -1
- package/_assets/{index-CcZyuO92.js → index-DaBMwl5V.js} +1 -1
- package/_assets/{index-C6rpfPMS.js → index-DbyPzhzJ.js} +1 -1
- package/_assets/{index-BIJ2qchS.js → index-Det24uTr.js} +3 -3
- package/_assets/{index-BEtbI0Zv.js → index-Dhe2yejG.js} +1 -1
- package/_assets/{index-B4EKT3oF.js → index-DitauyL5.js} +1 -1
- package/_assets/{index-DFzHpbP5.js → index-DkdxS38k.js} +1 -1
- package/_assets/{index-DyGnajSZ.js → index-DkmumT6q.js} +1 -1
- package/_assets/{index-CviVJpxw.js → index-DquJiMJI.js} +1 -1
- package/_assets/{index-Bor4cMvk.js → index-Duy_bLYT.js} +1 -1
- package/_assets/{index-qVmIz0zn.js → index-Dz7l4WRb.js} +1 -1
- package/_assets/{index-ZoIpzYhg.js → index-PfgUlDb3.js} +1 -1
- package/_assets/{index-RSxxMPji.js → index-Rjrwrr8k.js} +1 -1
- package/_assets/{index-BNEWEGXe.js → index-ThwwXj7K.js} +1 -1
- package/_assets/{index-DNaX9VGC.js → index-UOQDoXBN.js} +1 -1
- package/_assets/index-XMkvXJnG.js +2 -0
- package/_assets/{index-Cso0PIKg.js → index-efx_UGwj.js} +3 -3
- package/_assets/{index-D20v1ehb.js → index-hBIDXrfA.js} +1 -1
- package/_assets/{index-Fyrl3bgj.js → index-jDLQZQqn.js} +1 -1
- package/_assets/{index-DETprG7w.js → index-klYUwFTu.js} +1 -1
- package/_assets/index.es-CWcx_MPC.js +11 -0
- package/_assets/{index.es-4ugP_xPq.js → index.es-DGdQax5Y.js} +1 -1
- package/_assets/{index.es-DWjGiGDB.js → index.es-DWEmsLX5.js} +4 -4
- package/_assets/{index.es-BWoKVfSl.js → index.es-gS9A1DPX.js} +1 -1
- package/_assets/{linkAccount-D303ryxj.js → linkAccount-DktwtO-V.js} +1 -1
- package/_assets/{localBatchGatewayRequest-DxATZPfq.js → localBatchGatewayRequest-DoA6w-sg.js} +1 -1
- package/_assets/{mana-convert-BAmJatVq.js → mana-convert-8bdglmK2.js} +1 -1
- package/_assets/{mana-rate-COZYJ-5D.js → mana-rate-pg062I50.js} +1 -1
- package/_assets/{native-BbO8hggJ.js → native-DUHK6GYV.js} +1 -1
- package/_assets/{networks-BgOd8fAQ.js → networks-CS3wn-YQ.js} +1 -1
- package/_assets/{onramp-C1zk7UMI.js → onramp-_fU1CUPx.js} +1 -1
- package/_assets/{openzeppelin-JqnI3fjU.js → openzeppelin-Byo7VjiL.js} +1 -1
- package/_assets/{ownerOf-B0AowHTZ.js → ownerOf-9FPRCliB.js} +1 -1
- package/_assets/parseNft-f2SijHni.js +2 -0
- package/_assets/{parseSignature-DDl2oW2S.js → parseSignature-7zbxP3S5.js} +3 -3
- package/_assets/{parseSignature-Zp5jbuFC.js → parseSignature-B4bdR_8K.js} +1 -1
- package/_assets/{passkeys-D630VzP0.js → passkeys--fWD2NEw.js} +1 -1
- package/_assets/{pay-with-exchange-DB12e4gP.js → pay-with-exchange-Dk9Xcd3H.js} +1 -1
- package/_assets/{prepare-contract-call-BreQKHF6.js → prepare-contract-call-CUP20AbD.js} +1 -1
- package/_assets/{qr-overlay-BFMFKV4B.js → qr-overlay-DkdnRl_0.js} +3 -3
- package/_assets/{react-vyZjIDcS.js → react-IQWs2nb4.js} +1 -1
- package/_assets/{receive-C0p5nZhH.js → receive-C29mXrSs.js} +1 -1
- package/_assets/{resolveImplementation-Cpqxrq_P.js → resolveImplementation-Brjkq9B3.js} +1 -1
- package/_assets/{rpc-BGoWvIYj.js → rpc-Oikc4qrs.js} +1 -1
- package/_assets/{secp256k1-CxwkeDtE.js → secp256k1-CUWzbXuP.js} +1 -1
- package/_assets/{secp256k1-JugqR1gN.js → secp256k1-WT42JaIN.js} +1 -1
- package/_assets/{secp256k1-DN4fbJll.js → secp256k1-v_OYVKpT.js} +1 -1
- package/_assets/{send-DQo6irxp.js → send-CSdyFqol.js} +1 -1
- package/_assets/{send-batch-transaction-BwQeKmX0.js → send-batch-transaction-BlExRlz8.js} +1 -1
- package/_assets/{send-eip712-transaction-Di3Pi2C5.js → send-eip712-transaction-DyfTHBv1.js} +2 -2
- package/_assets/send-gasless-transaction-Daukbk69.js +2 -0
- package/_assets/{send-transaction-CboskMcL.js → send-transaction-kmfCvyrI.js} +2 -2
- package/_assets/{sendMetaTransaction-DfeiXpP_.js → sendMetaTransaction-BA-2MGdZ.js} +1 -1
- package/_assets/{sendRawTransaction-BgAwN3aK.js → sendRawTransaction-CTjGjbSv.js} +3 -3
- package/_assets/{sentry-B35L1FdR.js → sentry-DvOx8Rfb.js} +1 -1
- package/_assets/{serializeTransaction-Cn_3vzYE.js → serializeTransaction-BmaoI9rx.js} +1 -1
- package/_assets/{session-proposal-B7rpIMJh.js → session-proposal-nGkLb8fO.js} +1 -1
- package/_assets/{session-request--BJtbaZK.js → session-request-QSI6Jos8.js} +2 -2
- package/_assets/{sha256-NdAeiB0X.js → sha256-Dx4Jqb1P.js} +1 -1
- package/_assets/{signing-DiwulEsw.js → signing-VekuwpLK.js} +3 -3
- package/_assets/{socials-054eJtzB.js → socials-BkZgS9yz.js} +1 -1
- package/_assets/{swaps-BPYOHTwx.js → swaps-CAZTnQ-D.js} +1 -1
- package/_assets/{thirdweb-bX_k_ayM.js → thirdweb-Xk7WShny.js} +3 -3
- package/_assets/{to-serializable-transaction-caU-fqUx.js → to-serializable-transaction-C5BoASVF.js} +2 -2
- package/_assets/{totalSupply-BVfGieGk.js → totalSupply-CLQexq9U.js} +1 -1
- package/_assets/{trade-encoding-CXbhpVj8.js → trade-encoding-DgV-A2zO.js} +1 -1
- package/_assets/{transaction-8aHmZ7ni.js → transaction-ToPxlTkC.js} +1 -1
- package/_assets/{transactionReceipt-BzQM-iWX.js → transactionReceipt-BHGI1PBX.js} +1 -1
- package/_assets/{transactions-UfEKiBWb.js → transactions-paKZZL-W.js} +1 -1
- package/_assets/useCreditPacks-CaE-vAPX.js +1 -0
- package/_assets/useInfiniteGrid-CeEt3Zid.js +1 -0
- package/_assets/useManaRate-D4_9UlI5.js +1 -0
- package/_assets/{useSecondarySales-BUPg_0HB.js → useSecondarySales-3tEx5YvY.js} +1 -1
- package/_assets/{useStore-j0moew7P.js → useStore-ByHpJuVH.js} +2 -2
- package/_assets/useTheme-xAwBEFWH.js +1 -0
- package/_assets/{utils-jd03xFBb.js → utils-BgbaLlfC.js} +1 -1
- package/_assets/{verifyHash-BlPjp8uI.js → verifyHash-uE8nq1-h.js} +1 -1
- package/_assets/{w3m-modal-CJSqLQbS.js → w3m-modal-BWkASM7Q.js} +1 -1
- package/_assets/{w3m-modal-B1fkdBpv.js → w3m-modal-CIhzAZkD.js} +1 -1
- package/_assets/{wait-for-tx-receipt-nJ13gHYr.js → wait-for-tx-receipt-Ban9Kz9f.js} +1 -1
- package/_assets/{wallets-BfXeGzQ3.js → wallets-COZ4xX__.js} +5 -5
- package/_assets/{web-connector-D6DeRRYN.js → web-connector-gi_cmfjU.js} +3 -3
- package/_assets/{writeContract-D1XhZg5B.js → writeContract-MVlwq6Xg.js} +1 -1
- package/_assets/{zora-sepolia-Bt1F-uU9.js → zora-sepolia-BOt0KLBF.js} +1 -1
- package/_assets/{zoraTestnet-YWrqaPWn.js → zoraTestnet-BcRH2RHD.js} +1 -1
- package/index.html +11 -11
- package/package.json +2 -2
- package/_assets/Collection-CP0tfCsZ.js +0 -119
- package/_assets/Creator-CWs_Cx5f.js +0 -306
- package/_assets/ImportListings-DryzCKJV.js +0 -447
- package/_assets/LoadMore-BsvftUzw.js +0 -7
- package/_assets/MyAssets-OTnYju0y.js +0 -258
- package/_assets/StoreSettings-2jXFUoeV.js +0 -253
- package/_assets/Success-2HbLWhw3.js +0 -276
- package/_assets/decimals-CTAJwKFW.js +0 -1
- package/_assets/emotion-styled.browser.esm-C5sYTDtN.js +0 -1
- package/_assets/estimate-l1-fee-BYqkQ2bZ.js +0 -1
- package/_assets/eth_estimateGas-BfIHMLbI.js +0 -1
- package/_assets/eth_getTransactionCount-CmmgCgZ1.js +0 -1
- package/_assets/get-ecosystem-wallet-info-43Mjiw6m.js +0 -1
- package/_assets/getNFT-bNpY4yta.js +0 -1
- package/_assets/import-DbH_aWZX.js +0 -1
- package/_assets/index-9H7pG6F1.js +0 -1
- package/_assets/index-B3FH4SmC.js +0 -1
- package/_assets/index-CVMO2zcQ.js +0 -2
- package/_assets/index-Cn-oc3fB.js +0 -2835
- package/_assets/parseNft-yDYimY68.js +0 -2
- package/_assets/send-gasless-transaction-CCblCzAN.js +0 -2
- package/_assets/useCreditPacks-Ceg0Oam0.js +0 -1
- package/_assets/useInfiniteGrid-YGnKZcnB.js +0 -1
- package/_assets/useManaRate-BhMxx3e3.js +0 -1
- package/_assets/useTheme-cGCeJmwR.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as j,j as e,L as Q,
|
|
1
|
+
import{r as j,j as e,L as Q,a as dt}from"./react-IQWs2nb4.js";import{aL as lt,s as l,t as o,l as ut,B as ht,m as xt,e as d,n as mt,u as v,I as f,aM as G,aN as K,aO as pt,p as k,aP as gt,ao as T,Y as ft,aQ as yt,aR as C}from"./index-BiIZh9R9.js";import{a as bt}from"./mana-convert-8bdglmK2.js";import{u as jt}from"./useManaRate-D4_9UlI5.js";import{L as vt}from"./LoadMore-BolkAKn7.js";import{u as y}from"./useInfiniteGrid-CeEt3Zid.js";import{m as X}from"./mana-matic-C4e1sNO3.js";import"./sentry-DvOx8Rfb.js";import"./dcl-schemas-BICTSpB5.js";import"./ethers-rFeF6PNV.js";import"./intl-CBcMB1D2.js";import"./mana-rate-pg062I50.js";const kt=15e3;function It(t,n){return t.txHash&&n.txHash?t.txHash===n.txHash:t.txHash||n.txHash?!1:t.status===n.status&&Math.abs(t.createdAt-n.createdAt)<=kt}function At(t){const n=[...t].sort((i,a)=>a.createdAt-i.createdAt),s=[];for(const i of n){const a=s[s.length-1];a&&It(a[a.length-1],i)?a.push(i):s.push([i])}return s.map(i=>{var a;return{id:((a=i.find(c=>c.txHash))==null?void 0:a.txHash)??i[i.length-1].id,createdAt:Math.max(...i.map(c=>c.createdAt)),status:i.some(c=>c.status==="PENDING")?"PENDING":"SETTLED",totalCredits:i.reduce((c,h)=>c+h.credits,0),lines:i}})}function wt(t){return t.tradeId?`trade:${t.tradeId}`:t.contractAddress&&t.itemId?`item:${t.contractAddress.toLowerCase()}:${t.itemId}`:null}function $t(t){const n=[],s=new Map;for(const i of t){const a=wt(i);if(!a){n.push({key:i.id,tradeId:null,contractAddress:i.contractAddress??null,itemId:i.itemId??null,quantity:1,credits:i.credits});continue}const c=s.get(a);if(c){c.quantity+=1,c.credits+=i.credits;continue}const h={key:a,tradeId:i.tradeId,contractAddress:i.contractAddress??null,itemId:i.itemId??null,quantity:1,credits:i.credits};s.set(a,h),n.push(h)}return n}function Pt(t,n){return{id:t.id,contractAddress:t.contractAddress,tokenId:t.tokenId,itemId:t.itemId,counterparty:t.buyer,credits:n?bt(t.manaWei,n):null,manaWei:t.manaWei,createdAt:t.createdAt,txHash:t.txHash}}function Lt(t){const s=At(t.purchases.filter(r=>r.status!=="EXPIRED")).map(r=>({kind:"purchase",id:`purchase:${r.id}`,createdAt:r.createdAt,order:r})),i=t.sales.map(r=>{const x=Pt(r,t.rate);return{kind:"sale",id:`sale:${x.id}`,createdAt:x.createdAt,sale:x}}),a=(t.creditOrders??[]).filter(r=>r.status!=="failed"&&r.status!=="abandoned").map(r=>({kind:"credit",id:`credit:${r.id}`,createdAt:r.createdAt,order:r})),c=new Set(t.purchases.filter(r=>r.txHash).map(r=>r.txHash.toLowerCase())),h=(t.manaPurchases??[]).filter(r=>!c.has(r.txHash.toLowerCase())).map(r=>({kind:"mana-purchase",id:`mana-purchase:${r.id}`,createdAt:r.createdAt,sale:r}));return[...s,...i,...a,...h].sort((r,x)=>x.createdAt-r.createdAt||(r.id<x.id?-1:1))}function Nt(t,n){return n==="all"?t:n==="sales"?t.filter(s=>s.kind==="sale"):t.filter(s=>s.kind==="purchase"||s.kind==="credit"||s.kind==="mana-purchase")}const Y=t=>t.trim().toLowerCase();function Et(t){const n=new Map;for(const s of t??[]){const i=Y(s.txHash??"");if(!i)continue;const a=n.get(i);a?a.push(s):n.set(i,[s])}return n}function Tt(t,n,s=Date.now()){const i=n.txHash?t.get(Y(n.txHash)):void 0;if(!i||i.length===0)return{kind:"direct"};const a=i.length===1?Ct(i[0].netCents):null,c=i.filter(r=>!r.available&&r.availableAt>s);if(c.length===0)return{kind:"credited",credits:a};const h=c.reduce((r,x)=>Math.max(r,x.availableAt),0);return{kind:"pending",credits:a,availableAt:h}}function Ct(t){return lt(t)}const Ft="https://cdn.decentraland.org/@dcl/shop/0.1.1-30909439604.commit-4721d83/_assets/credits-product-vs4Q6u6l.svg",F=ut`
|
|
2
2
|
0% { background-position: 200% 0; }
|
|
3
3
|
100% { background-position: -200% 0; }
|
|
4
4
|
`,St=l.section`
|
|
@@ -150,7 +150,7 @@ import{r as j,j as e,L as Q,d as dt}from"./react-vyZjIDcS.js";import{aK as lt,s
|
|
|
150
150
|
&[data-kind='income'] {
|
|
151
151
|
color: ${o.colors.okStrong};
|
|
152
152
|
}
|
|
153
|
-
`,
|
|
153
|
+
`,Z=l.img`
|
|
154
154
|
width: 16px;
|
|
155
155
|
height: 16px;
|
|
156
156
|
vertical-align: -0.15em;
|
|
@@ -251,7 +251,7 @@ import{r as j,j as e,L as Q,d as dt}from"./react-vyZjIDcS.js";import{aK as lt,s
|
|
|
251
251
|
`,q=l.span`
|
|
252
252
|
font-size: 13px;
|
|
253
253
|
color: ${o.colors.muted};
|
|
254
|
-
`,
|
|
254
|
+
`,Rt=l.div`
|
|
255
255
|
display: flex;
|
|
256
256
|
align-items: center;
|
|
257
257
|
gap: 4px;
|
|
@@ -274,7 +274,7 @@ import{r as j,j as e,L as Q,d as dt}from"./react-vyZjIDcS.js";import{aK as lt,s
|
|
|
274
274
|
@media (prefers-reduced-motion: reduce) {
|
|
275
275
|
animation: none;
|
|
276
276
|
}
|
|
277
|
-
`,
|
|
277
|
+
`,J=l.div`
|
|
278
278
|
display: flex;
|
|
279
279
|
flex-direction: column;
|
|
280
280
|
align-items: center;
|
|
@@ -282,10 +282,10 @@ import{r as j,j as e,L as Q,d as dt}from"./react-vyZjIDcS.js";import{aK as lt,s
|
|
|
282
282
|
text-align: center;
|
|
283
283
|
padding: 90px 20px;
|
|
284
284
|
min-height: 50vh;
|
|
285
|
-
`,
|
|
285
|
+
`,V=l.p`
|
|
286
286
|
font-size: 22px;
|
|
287
287
|
font-weight: 700;
|
|
288
288
|
margin: 6px 0 0;
|
|
289
|
-
`,
|
|
289
|
+
`,Bt=l(ht)`
|
|
290
290
|
margin-top: 12px;
|
|
291
|
-
`,W=E.withComponent(Q),b=24,Gt=["all","purchases","sales"];function g(t){try{return new Date(t).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})}catch{return""}}function tt(t){return t.length>10?`${t.slice(0,6)}…${t.slice(-4)}`:t}function et(t){const n=Number(t)/1e18;return Number.isFinite(n)?n.toLocaleString("en",{maximumFractionDigits:2}):"0"}function it({children:t}){const n=j.useRef(null),[s,i]=j.useState(null),a=()=>{var h;const c=(h=n.current)==null?void 0:h.getBoundingClientRect();c&&i({top:c.bottom+8,left:c.left+c.width/2})};return e.jsxs(qt,{ref:n,tabIndex:0,onMouseEnter:a,onMouseLeave:()=>i(null),onFocus:a,onBlur:()=>i(null),children:[t,s?dt.createPortal(e.jsx(Wt,{style:{top:s.top,left:s.left},role:"tooltip",children:d("activity.polygonMana")}),document.body):null]})}function Kt({item:t}){const n=!!t.contractAddress&&!!t.itemId,s=!!t.tradeId||n,{data:i,isLoading:a}=v({queryKey:["order-line-display",t.tradeId,t.contractAddress,t.itemId],queryFn:()=>t.tradeId?yt(t.tradeId):C(t.contractAddress,{itemId:t.itemId}),enabled:s,staleTime:5*6e4}),c=s&&a,h=(i==null?void 0:i.name)??d("activity.itemFallback"),r=(i==null?void 0:i.thumbnail)??"",x=T({contractAddress:i==null?void 0:i.contractAddress,tokenId:i==null?void 0:i.tokenId,itemId:i==null?void 0:i.itemId})??void 0,p=e.jsxs(e.Fragment,{children:[c?e.jsx(D,{}):e.jsx(M,{children:r?e.jsx("img",{src:r,alt:h}):e.jsx(f,{name:"cart",size:20})}),e.jsxs(H,{children:[c?e.jsx(O,{}):e.jsx(z,{title:h,children:h}),t.quantity>1?e.jsx(q,{children:d("activity.quantity",{count:t.quantity})}):null]}),e.jsxs(
|
|
291
|
+
`,W=E.withComponent(Q),b=24,Gt=["all","purchases","sales"];function g(t){try{return new Date(t).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})}catch{return""}}function tt(t){return t.length>10?`${t.slice(0,6)}…${t.slice(-4)}`:t}function et(t){const n=Number(t)/1e18;return Number.isFinite(n)?n.toLocaleString("en",{maximumFractionDigits:2}):"0"}function it({children:t}){const n=j.useRef(null),[s,i]=j.useState(null),a=()=>{var h;const c=(h=n.current)==null?void 0:h.getBoundingClientRect();c&&i({top:c.bottom+8,left:c.left+c.width/2})};return e.jsxs(qt,{ref:n,tabIndex:0,onMouseEnter:a,onMouseLeave:()=>i(null),onFocus:a,onBlur:()=>i(null),children:[t,s?dt.createPortal(e.jsx(Wt,{style:{top:s.top,left:s.left},role:"tooltip",children:d("activity.polygonMana")}),document.body):null]})}function Kt({item:t}){const n=!!t.contractAddress&&!!t.itemId,s=!!t.tradeId||n,{data:i,isLoading:a}=v({queryKey:["order-line-display",t.tradeId,t.contractAddress,t.itemId],queryFn:()=>t.tradeId?yt(t.tradeId):C(t.contractAddress,{itemId:t.itemId}),enabled:s,staleTime:5*6e4}),c=s&&a,h=(i==null?void 0:i.name)??d("activity.itemFallback"),r=(i==null?void 0:i.thumbnail)??"",x=T({contractAddress:i==null?void 0:i.contractAddress,tokenId:i==null?void 0:i.tokenId,itemId:i==null?void 0:i.itemId})??void 0,p=e.jsxs(e.Fragment,{children:[c?e.jsx(D,{}):e.jsx(M,{children:r?e.jsx("img",{src:r,alt:h}):e.jsx(f,{name:"cart",size:20})}),e.jsxs(H,{children:[c?e.jsx(O,{}):e.jsx(z,{title:h,children:h}),t.quantity>1?e.jsx(q,{children:d("activity.quantity",{count:t.quantity})}):null]}),e.jsxs(Rt,{children:[e.jsx(k,{className:"ccy-mark"})," ",t.credits]})]});return x?e.jsx(W,{to:x,"data-link":"true",children:p}):e.jsx(E,{children:p})}function _t({order:t}){const n=$t(t.lines),s=n.reduce((i,a)=>i+a.quantity,0);return e.jsxs(I,{"data-testid":"purchase-order",children:[e.jsxs(A,{children:[e.jsxs(w,{children:[e.jsx($,{children:g(t.createdAt)}),e.jsxs(P,{children:[d("activity.purchaseLabel")," · ",d("activity.itemCount",{count:s})]})]}),e.jsxs(L,{children:[e.jsx(N,{"data-status":t.status,children:t.status==="PENDING"?d("activity.processing"):d("activity.completed")}),e.jsxs(m,{children:[e.jsx(k,{className:"ccy-mark"})," ",t.totalCredits]})]})]}),e.jsx(S,{children:n.map(i=>e.jsx(Kt,{item:i},i.key))})]})}function Ut({sale:t}){const{data:n,isLoading:s}=v({queryKey:["asset-display",t.contractAddress,t.tokenId,t.itemId],queryFn:()=>C(t.contractAddress,{tokenId:t.tokenId,itemId:t.itemId}),enabled:!!t.contractAddress,staleTime:3e5}),i=(n==null?void 0:n.name)??d("activity.itemFallback"),a=(n==null?void 0:n.thumbnail)??"",c=T({contractAddress:t.contractAddress,tokenId:t.tokenId,itemId:t.itemId})??void 0,h=e.jsxs(e.Fragment,{children:[s?e.jsx(D,{}):e.jsx(M,{children:a?e.jsx("img",{src:a,alt:i}):e.jsx(f,{name:"offer",size:20})}),e.jsxs(H,{children:[s?e.jsx(O,{}):e.jsx(z,{title:i,children:i}),e.jsx(q,{children:d("activity.boughtFrom",{account:tt(t.seller)})})]})]});return e.jsxs(I,{"data-testid":"activity-mana-purchase",children:[e.jsxs(A,{children:[e.jsxs(w,{children:[e.jsx($,{children:g(t.createdAt)}),e.jsx(P,{children:d("activity.paidWithMana")})]}),e.jsxs(L,{children:[e.jsx(N,{"data-status":"SETTLED",children:d("activity.completed")}),e.jsxs(m,{children:[et(t.manaWei)," ",e.jsx(it,{children:e.jsx(Z,{src:X,alt:"MANA"})})]})]})]}),e.jsx(S,{children:c?e.jsx(W,{to:c,"data-link":"true",children:h}):e.jsx(E,{children:h})})]})}function Qt({sale:t,payout:n}){const{data:s,isLoading:i}=v({queryKey:["asset-display",t.contractAddress,t.tokenId,t.itemId],queryFn:()=>C(t.contractAddress,{tokenId:t.tokenId,itemId:t.itemId}),enabled:!!t.contractAddress,staleTime:3e5}),a=(s==null?void 0:s.name)??d("activity.itemFallback"),c=(s==null?void 0:s.thumbnail)??"",h=T({contractAddress:t.contractAddress,tokenId:t.tokenId,itemId:t.itemId})??void 0,r=e.jsxs(e.Fragment,{children:[i?e.jsx(D,{}):e.jsx(M,{children:c?e.jsx("img",{src:c,alt:a}):e.jsx(f,{name:"offer",size:20})}),e.jsxs(H,{children:[i?e.jsx(O,{}):e.jsx(z,{title:a,children:a}),e.jsxs(q,{children:[d("activity.soldTo",{account:tt(t.counterparty)}),n.kind==="pending"?` · ${d("activity.payoutPendingOn",{date:g(n.availableAt)})}`:""]})]})]});return e.jsxs(I,{"data-testid":"activity-sale",children:[e.jsxs(A,{children:[e.jsxs(w,{children:[e.jsx($,{children:g(t.createdAt)}),e.jsx(P,{children:d("activity.saleLabel")})]}),e.jsxs(L,{children:[e.jsx(N,{"data-status":n.kind==="pending"?"PENDING":"SOLD",children:n.kind==="pending"?d("activity.payoutPending"):d("activity.sold")}),n.kind==="direct"?e.jsxs(m,{"data-kind":"income",children:["+",et(t.manaWei)," ",e.jsx(it,{children:e.jsx(Z,{src:X,alt:"MANA"})})]}):n.credits!==null?e.jsxs(m,{"data-kind":"income",children:[e.jsx(k,{className:"ccy-mark"})," +",ft(n.credits)]}):e.jsx(m,{"data-kind":"income",children:d("activity.payoutCredited")})]})]}),e.jsx(S,{children:h?e.jsx(W,{to:h,"data-link":"true",children:r}):e.jsx(E,{children:r})})]})}function Xt({order:t}){const n=`$${(t.usdCents/100).toFixed(2)}`,s=gt(t.status),i=s==="SETTLED"?d("activity.completed"):s==="FAILED"?d("activity.failed"):d("activity.processing");return e.jsx(I,{"data-testid":"credit-order",children:e.jsxs(A,{children:[e.jsx(Ot,{children:e.jsx("img",{src:Ft,alt:"","aria-hidden":!0})}),e.jsxs(w,{children:[e.jsx($,{children:g(t.createdAt)}),e.jsxs(P,{children:[d("activity.creditPurchaseLabel")," · ",d("activity.creditPaid",{usd:n})]})]}),e.jsxs(L,{children:[e.jsx(N,{"data-status":s,children:i}),e.jsxs(m,{"data-kind":"income",children:["+",e.jsx(k,{className:"ccy-mark"})," ",t.credits]})]})]})})}function Yt({filter:t}){const n={all:{icon:"clock",title:d("activity.emptyAllTitle"),body:d("activity.emptyAllBody")},purchases:{icon:"cart",title:d("activity.emptyPurchasesTitle"),body:d("activity.emptyPurchasesBody")},sales:{icon:"offer",title:d("activity.emptySalesTitle"),body:d("activity.emptySalesBody")}}[t];return e.jsxs(J,{children:[e.jsx(f,{name:n.icon,size:40,color:o.colors.muted2}),e.jsx(V,{children:n.title}),e.jsx("p",{className:"muted",children:n.body}),t!=="sales"?e.jsx(Bt,{as:Q,to:"/assets",variant:"purple",children:d("notFound.cta")}):null]})}function de(){xt({title:d("nav.activity"),noindex:!0});const{session:t}=mt(),[n,s]=j.useState("all"),i=!!t&&n!=="sales",a=!!t&&n!=="purchases",c=y(["purchases",t==null?void 0:t.address],u=>pt(t.address,t.identity,{first:b,skip:u}),{enabled:i}),h=y(["sales",t==null?void 0:t.address],u=>G(t.address,{role:"seller",first:b,skip:u}),{enabled:a}),r=y(["credit-orders",t==null?void 0:t.address],u=>K(t.address,t.identity,{first:b,skip:u}),{enabled:i}),x=y(["mana-purchases",t==null?void 0:t.address],u=>G(t.address,{role:"buyer",first:b,skip:u}),{enabled:i}),{data:p}=v({queryKey:["sale-payouts",t==null?void 0:t.address],queryFn:()=>K(t.address,t.identity,{first:200}).then(u=>u.payouts),enabled:a,staleTime:6e4}),nt=j.useMemo(()=>Et(p),[p]),{data:st}=jt(a);if(!t)return e.jsxs(J,{children:[e.jsx(f,{name:"clock",size:40,color:o.colors.muted2}),e.jsx(V,{children:d("activity.signInTitle")}),e.jsx("p",{className:"muted",children:d("activity.signInBody")})]});const R=Nt(Lt({purchases:i?c.items:[],sales:a?h.items:[],creditOrders:i?r.items:[],manaPurchases:i?x.items:[],rate:st}),n),at=i&&(c.isLoading||r.isLoading||x.isLoading)||a&&h.isLoading,B=i&&(c.isFetchingNextPage||r.isFetchingNextPage||x.isFetchingNextPage)||a&&h.isFetchingNextPage,rt=i&&(c.hasNextPage||r.hasNextPage||x.hasNextPage)||a&&h.hasNextPage;function ot(){i&&c.hasNextPage&&c.fetchNextPage(),i&&r.hasNextPage&&r.fetchNextPage(),i&&x.hasNextPage&&x.fetchNextPage(),a&&h.hasNextPage&&h.fetchNextPage()}return e.jsxs(St,{children:[e.jsx(Mt,{children:e.jsx(Dt,{children:d("nav.activity")})}),e.jsx(Ht,{role:"tablist","aria-label":d("nav.activity"),children:Gt.map(u=>e.jsx(zt,{type:"button",role:"tab","aria-selected":n===u,"data-active":n===u,"data-testid":`activity-filter-${u}`,onClick:()=>s(u),children:d(`activity.filter.${u}`)},u))}),at?e.jsx(_,{children:Array.from({length:5}).map((u,ct)=>e.jsx(U,{},ct))}):R.length===0?e.jsx(Yt,{filter:n}):e.jsxs(e.Fragment,{children:[e.jsxs(_,{children:[R.map(u=>u.kind==="purchase"?e.jsx(_t,{order:u.order},u.id):u.kind==="credit"?e.jsx(Xt,{order:u.order},u.id):u.kind==="mana-purchase"?e.jsx(Ut,{sale:u.sale},u.id):e.jsx(Qt,{sale:u.sale,payout:Tt(nt,u.sale)},u.id)),B?e.jsx(U,{}):null]}),e.jsx(vt,{hasNextPage:rt,isFetching:B,onLoadMore:ot})]})]})}export{de as Activity};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as l,j as v}from"./react-
|
|
1
|
+
import{r as l,j as v}from"./react-IQWs2nb4.js";import{s as u}from"./index-BiIZh9R9.js";import"./sentry-DvOx8Rfb.js";import"./dcl-schemas-BICTSpB5.js";import"./ethers-rFeF6PNV.js";import"./intl-CBcMB1D2.js";const S="https://cdn.decentraland.org/@dcl/shop/0.1.1-30909439604.commit-4721d83/_assets/custom-welcome-background-BxlFQma9.webp",b="https://cdn.decentraland.org/@dcl/shop/0.1.1-30909439604.commit-4721d83/_assets/DCL_LogoPattern-BryBPc3d.png",U=`
|
|
2
2
|
attribute vec2 a_position;
|
|
3
3
|
varying vec2 v_uv;
|
|
4
4
|
void main() {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{b as We,r as
|
|
1
|
+
import{b as We,r as f,j as e,e as Qe}from"./react-IQWs2nb4.js";import{c as F,au as Xe,av as Ye,d as et,s,t,n as Be,ak as tt,q as nt,Y as ge,e as n,o as st,I as S,p as M,aY as ne,ai as ot,aq as Y,ay as it,ax as rt,m as Fe,H as at,S as _e,K as q,aZ as lt,a_ as ct}from"./index-BiIZh9R9.js";import{u as dt}from"./useSecondarySales-3tEx5YvY.js";import{m as pt,a as Le}from"./mana-convert-8bdglmK2.js";import{u as Ue}from"./useManaRate-D4_9UlI5.js";import{g as ht,h as xt,i as mt,j as ft,k as ut,C as gt,l as bt,o as yt,m as wt,n as jt,M as vt,p as $t,E as Ct,q as kt,r as St,s as Et,t as Rt,u as _t,v as Tt}from"./Assets.styles-CkJWzjdk.js";import{S as Te,R as zt,F as It,e as At}from"./categories-Byz019bF.js";import{L as Nt}from"./LoadMore-BolkAKn7.js";import{u as Mt}from"./useInfiniteGrid-CeEt3Zid.js";import{E as Pt}from"./ErrorNotice-51eOicue.js";import{d as Wt}from"./dcl-schemas-BICTSpB5.js";import{s as Bt,G as Ft,w as Lt,S as Ut}from"./buy-gasless-Cn4_YLUa.js";import{s as Ht}from"./buy-DiLzTHFT.js";import{i as Ot}from"./trade-encoding-DgV-A2zO.js";import{r as Gt}from"./mana-rate-pg062I50.js";import{f as Dt}from"./errors-sJnX14Ki.js";import{J as qt,C as Vt,B as be}from"./ethers-rFeF6PNV.js";import{n as Zt}from"./Tooltip-CoMCVLgL.js";import{G as Kt}from"./grid.styles-DVBPQuRz.js";import"./sentry-DvOx8Rfb.js";import"./intl-CBcMB1D2.js";import"./authorizations-FkFZVBeE.js";import"./sendMetaTransaction-BA-2MGdZ.js";function V(o){const i=o.source??"item",a=o.tradeId||`${o.contractAddress}-${o.tokenId??o.itemId??""}`;return`${i}:${a}`}const L="100000000000000000000",He=2,ee=15,Jt=/^[a-zA-Z0-9]+$/;function ze(o){const i=o.trim();return i.length===0?{ok:!1,reason:"empty"}:Jt.test(i)?i.length<He?{ok:!1,reason:"too-short"}:i.length>ee?{ok:!1,reason:"too-long"}:{ok:!0}:{ok:!1,reason:"invalid-chars"}}function Qt(o){return o.replace(/[^a-zA-Z0-9]/g,"").slice(0,ee)}const Xt=["function available(string _subdomain) view returns (bool)"],Ie={mainnet:{rpc:"https://rpc.decentraland.org/mainnet",address:"0x2a187453064356c898cae034eaed119e1663acb8"},sepolia:{rpc:"https://rpc.decentraland.org/sepolia",address:"0x7518456ae93eb98f3e64571b689c626616bb7f30"}};function Yt(){return F.chainId===Number(Wt.ChainId.MATIC_MAINNET)?Ie.mainnet:Ie.sepolia}async function en(o,i={}){var p;const{rpc:a,address:h}=Yt(),l=new qt(a),d=new Vt(h,Xt,l);console.info(`[names] availability check → DCLRegistrar(${h}).available("${o}") on ${a}`);const x=await d.available(o);if((p=i.signal)!=null&&p.aborted)throw new DOMException("Aborted","AbortError");return console.info(`[names] "${o}" available=${x}`),x?"available":"taken"}const tn="https://app.across.to/api";class ye extends Error{constructor(){super("Name registration is temporarily unavailable due to high network costs"),this.name="NameRouteCostTooHighError"}}function nn(o){return pt(L,o)}async function sn(o,i,a={}){var p;const h=a.chainId??F.chainId,l=a.provider??"across",d=`${F.creditsServerUrl}/credits-name-route?name=${encodeURIComponent(i)}&chainId=${h}&provider=${l}`,x=await et(d,{method:"GET",identity:o,metadata:{}});if(!x.ok){let r;try{r=(p=await x.json())==null?void 0:p.code}catch{}throw r==="ROUTE_COST_TOO_HIGH"?new ye:new Error(`fetchNameCreditRoute ${x.status}`)}return x.json()}function on(o,i){const a=be.from(o.availableAmount),l=be.from(L).sub(a);return{credits:[{value:o.amount,expiresAt:Number(o.expiresAt),salt:Ot(o.id)}],creditsSignatures:[o.signature],externalCall:{target:i.externalCall.target,selector:i.externalCall.selector,data:i.externalCall.data,expiresAt:i.externalCall.expiresAt,salt:i.externalCall.salt},customExternalCallSignature:i.customExternalCallSignature,maxUncreditedValue:l.isNegative()?"0":l.toString(),maxCreditedValue:L}}async function rn(o,i={}){const a=tn,h=i.intervalMs??1e4,l=i.maxAttempts??60;let d={status:"pending",destinationTxHash:null,actionsSucceeded:!1};for(let x=0;x<l;x++){try{const p=await fetch(`${a}/deposit/status?originChainId=137&depositTxHash=${o}`);if(p.ok){const r=await p.json(),u=(r.status??"pending").toLowerCase(),g=r.fillTx??r.fillTxnRef??null,w=r.actionsSucceeded!==!1;if(u==="filled")return{status:"filled",destinationTxHash:g,actionsSucceeded:w};if(u==="refunded"||u==="expired")return{status:u,destinationTxHash:null,actionsSucceeded:!1};d={status:"pending",destinationTxHash:g,actionsSucceeded:w}}}catch{}x<l-1&&await new Promise(p=>setTimeout(p,h))}return d}async function an(o){const{name:i,identity:a,signer:h}=o,l=o.chainId??F.chainId,d=o.provider??"across",x=(o.beneficiary??await h.getAddress()).toLowerCase();let p=null,r=!1;console.info("[names] register start",{name:i,buyer:x,chainId:l,provider:d});try{const u=await Gt(l),g=nn(u);console.info("[names] step 1/6 sized reservation",{usdCents:g,manaRate:u});const w=await sn(a,i,{chainId:l,provider:d});console.info("[names] step 2/6 route fetched",{target:w.externalCall.target,selector:w.externalCall.selector,provider:w.provider,quoteId:w.quoteId});const j=await Xe(a,g);if(p=j.credit.id,console.info("[names] step 3/6 credit authorized",{creditId:j.credit.id,maxCreditedValue:j.maxCreditedValue}),be.from(j.maxCreditedValue).lt(L))throw new Error("Credit under-sized for the name price");const k=on(j.credit,w);let m;try{m=await Bt({chainId:l,buyer:x,signer:h,args:k})}catch(b){if(!(b instanceof Ft))throw b;m=await Ht(l,k,h)}if(console.info("[names] step 4/6 useCredits submitted (Polygon origin tx)",{originTxHash:m}),await Lt(m),r=!0,console.info("[names] step 5/6 origin tx confirmed",{originTxHash:m}),d==="across"){const b=await rn(m,o.acrossPoll);if(console.info("[names] step 6/6 across status",b),b.status==="pending")return{status:"pending",originTxHash:m};if(b.status!=="filled"||!b.actionsSucceeded)throw new Error("The name could not be registered on Ethereum; your funds were recovered.");return{status:"registered",originTxHash:m,destinationTxHash:b.destinationTxHash}}return{status:"pending",originTxHash:m}}catch(u){if(console.error("[names] register failed — raw error:",u,{name:i,buyer:x,originConfirmed:r}),u instanceof Ut)return{status:"pending",originTxHash:u.txHash};if(p&&!r&&await Ye(a,[p]).catch(()=>{}),u instanceof ye)throw u;const g=new Error(Dt(u,"Couldn't register the name. Please try again.",{sale:!0}));throw g.cause=u,g}}const ln=s.div`
|
|
2
2
|
position: fixed;
|
|
3
3
|
inset: 0;
|
|
4
4
|
z-index: 10000;
|
|
@@ -7,7 +7,7 @@ import{b as We,r as m,j as e,u as Je}from"./react-vyZjIDcS.js";import{c as F,av
|
|
|
7
7
|
justify-content: center;
|
|
8
8
|
padding: 16px;
|
|
9
9
|
background: rgba(22, 21, 24, 0.55);
|
|
10
|
-
`,
|
|
10
|
+
`,cn=s.div`
|
|
11
11
|
width: 560px;
|
|
12
12
|
max-width: 100%;
|
|
13
13
|
max-height: 92vh;
|
|
@@ -127,17 +127,17 @@ import{b as We,r as m,j as e,u as Je}from"./react-vyZjIDcS.js";import{c as F,av
|
|
|
127
127
|
height: 22px;
|
|
128
128
|
color: ${t.colors.brandViolet};
|
|
129
129
|
}
|
|
130
|
-
`,
|
|
130
|
+
`,dn=s.div`
|
|
131
131
|
margin-top: 16px;
|
|
132
132
|
padding: 16px;
|
|
133
133
|
border-radius: 12px;
|
|
134
134
|
background: #f2e7fc;
|
|
135
|
-
`,
|
|
135
|
+
`,pn=s.div`
|
|
136
136
|
font-family: ${t.font.sans};
|
|
137
137
|
font-weight: 700;
|
|
138
138
|
font-size: 16px;
|
|
139
139
|
color: ${t.colors.text};
|
|
140
|
-
`,
|
|
140
|
+
`,hn=s.p`
|
|
141
141
|
margin: 8px 0 16px;
|
|
142
142
|
font-family: ${t.font.sans};
|
|
143
143
|
font-size: 14px;
|
|
@@ -148,7 +148,7 @@ import{b as We,r as m,j as e,u as Je}from"./react-vyZjIDcS.js";import{c as F,av
|
|
|
148
148
|
font-weight: 700;
|
|
149
149
|
color: ${t.colors.brandViolet};
|
|
150
150
|
}
|
|
151
|
-
`,
|
|
151
|
+
`,xn=s.label`
|
|
152
152
|
display: flex;
|
|
153
153
|
align-items: center;
|
|
154
154
|
gap: 8px;
|
|
@@ -161,7 +161,7 @@ import{b as We,r as m,j as e,u as Je}from"./react-vyZjIDcS.js";import{c as F,av
|
|
|
161
161
|
&:focus-within {
|
|
162
162
|
border-color: ${t.colors.magenta};
|
|
163
163
|
}
|
|
164
|
-
`,
|
|
164
|
+
`,mn=s.span`
|
|
165
165
|
flex: none;
|
|
166
166
|
font-family: ${t.font.sans};
|
|
167
167
|
font-size: 18px;
|
|
@@ -181,7 +181,7 @@ import{b as We,r as m,j as e,u as Je}from"./react-vyZjIDcS.js";import{c as F,av
|
|
|
181
181
|
color: ${t.colors.muted2};
|
|
182
182
|
font-weight: 400;
|
|
183
183
|
}
|
|
184
|
-
`,
|
|
184
|
+
`,un=s.span`
|
|
185
185
|
flex: none;
|
|
186
186
|
font-family: ${t.font.sans};
|
|
187
187
|
font-size: 16px;
|
|
@@ -213,27 +213,27 @@ import{b as We,r as m,j as e,u as Je}from"./react-vyZjIDcS.js";import{c as F,av
|
|
|
213
213
|
background: #ddc7ec;
|
|
214
214
|
color: #f4ecfa;
|
|
215
215
|
}
|
|
216
|
-
`,
|
|
216
|
+
`,gn=s.div`
|
|
217
217
|
display: flex;
|
|
218
218
|
flex-direction: column;
|
|
219
219
|
align-items: flex-start;
|
|
220
220
|
gap: 20px;
|
|
221
221
|
padding: 32px 0 8px;
|
|
222
|
-
`,
|
|
222
|
+
`,bn=s.img`
|
|
223
223
|
align-self: center;
|
|
224
224
|
width: 56px;
|
|
225
225
|
height: 56px;
|
|
226
|
-
`,
|
|
226
|
+
`,yn=s.div`
|
|
227
227
|
font-family: ${t.font.sans};
|
|
228
228
|
font-weight: 700;
|
|
229
229
|
font-size: 18px;
|
|
230
230
|
color: ${t.colors.text};
|
|
231
|
-
`,
|
|
231
|
+
`,wn=s.div`
|
|
232
232
|
display: flex;
|
|
233
233
|
align-items: center;
|
|
234
234
|
gap: 12px;
|
|
235
235
|
width: 100%;
|
|
236
|
-
`,
|
|
236
|
+
`,jn=s.div`
|
|
237
237
|
flex: 1;
|
|
238
238
|
height: 8px;
|
|
239
239
|
border-radius: 999px;
|
|
@@ -257,12 +257,12 @@ import{b as We,r as m,j as e,u as Je}from"./react-vyZjIDcS.js";import{c as F,av
|
|
|
257
257
|
transform: translateX(320%);
|
|
258
258
|
}
|
|
259
259
|
}
|
|
260
|
-
`,
|
|
260
|
+
`,vn=s.span`
|
|
261
261
|
flex: none;
|
|
262
262
|
font-family: ${t.font.sans};
|
|
263
263
|
font-size: 14px;
|
|
264
264
|
color: ${t.colors.muted};
|
|
265
|
-
|
|
265
|
+
`,$n=s.div`
|
|
266
266
|
display: flex;
|
|
267
267
|
flex-direction: column;
|
|
268
268
|
align-items: center;
|
|
@@ -271,7 +271,7 @@ import{b as We,r as m,j as e,u as Je}from"./react-vyZjIDcS.js";import{c as F,av
|
|
|
271
271
|
border-radius: 12px;
|
|
272
272
|
background: #e2f5ea;
|
|
273
273
|
text-align: center;
|
|
274
|
-
|
|
274
|
+
`,Cn=s.div`
|
|
275
275
|
display: grid;
|
|
276
276
|
place-items: center;
|
|
277
277
|
width: 56px;
|
|
@@ -284,7 +284,7 @@ import{b as We,r as m,j as e,u as Je}from"./react-vyZjIDcS.js";import{c as F,av
|
|
|
284
284
|
width: 30px;
|
|
285
285
|
height: 30px;
|
|
286
286
|
}
|
|
287
|
-
`,
|
|
287
|
+
`,kn=s.p`
|
|
288
288
|
margin: 0;
|
|
289
289
|
font-family: ${t.font.sans};
|
|
290
290
|
font-size: 16px;
|
|
@@ -323,7 +323,7 @@ import{b as We,r as m,j as e,u as Je}from"./react-vyZjIDcS.js";import{c as F,av
|
|
|
323
323
|
outline: 2px solid ${t.colors.accent};
|
|
324
324
|
outline-offset: 2px;
|
|
325
325
|
}
|
|
326
|
-
`,
|
|
326
|
+
`,Sn=s.a`
|
|
327
327
|
flex: 1;
|
|
328
328
|
display: inline-flex;
|
|
329
329
|
align-items: center;
|
|
@@ -347,7 +347,7 @@ import{b as We,r as m,j as e,u as Je}from"./react-vyZjIDcS.js";import{c as F,av
|
|
|
347
347
|
outline: 2px solid ${t.colors.accent};
|
|
348
348
|
outline-offset: 2px;
|
|
349
349
|
}
|
|
350
|
-
`,
|
|
350
|
+
`,me=s.div`
|
|
351
351
|
display: flex;
|
|
352
352
|
align-items: flex-start;
|
|
353
353
|
gap: 12px;
|
|
@@ -379,10 +379,10 @@ import{b as We,r as m,j as e,u as Je}from"./react-vyZjIDcS.js";import{c as F,av
|
|
|
379
379
|
color: ${t.colors.accent};
|
|
380
380
|
}
|
|
381
381
|
}
|
|
382
|
-
`;function
|
|
382
|
+
`;function En({name:o,priceCredits:i,onClose:a}){const{session:h}=Be(),{data:l,isError:d}=tt(h),x=nt(),p=We(),[r,u]=f.useState("confirm"),[g,w]=f.useState(""),[j,k]=f.useState(null),m=f.useRef(!1),b=g.trim().toLowerCase()===o.toLowerCase(),v=r==="completing",E=i!=null?ge(i):"—",C=i==null,T=l==null?void 0:l.credits,R=i!=null&&T!=null?i-T:0,$=R>0,z=C?n("names.priceUnavailable"):$?n("names.insufficientCredits",{credits:ge(R)}):null;f.useEffect(()=>{const y=H=>{H.key==="Escape"&&!v&&a()};document.addEventListener("keydown",y);const U=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",y),document.body.style.overflow=U}},[v,a]);async function I(){if(!(!h||!b||C||$||m.current)){m.current=!0,u("completing"),k(null);try{const y=await an({name:o,identity:h.identity,signer:h.signer});Y("Shop Completed Purchase",{purchase_type:"name",is_primary:!0,payment_type:"credits",value_credits:i??null,settlement:y.status}),x.invalidateQueries({queryKey:["usd-balance"]}),x.invalidateQueries({queryKey:["my-assets"]}),u(y.status==="registered"?"success":"pending")}catch(y){Y(rt(y)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:it(y),purchase_type:"name"}),k(y instanceof ye?n("names.errorRouteCost"):(y==null?void 0:y.message)||n("names.errorGeneric")),u("error")}finally{m.current=!1}}}const A=r!=="success"&&r!=="pending",te=st(h==null?void 0:h.providerType);return e.jsx(ln,{onClick:v?void 0:a,role:"presentation",children:e.jsxs(cn,{role:"dialog","aria-modal":"true","aria-label":n("names.buyTitle"),onClick:y=>y.stopPropagation(),children:[A&&e.jsxs(e.Fragment,{children:[e.jsxs(se,{children:[e.jsx(oe,{children:r==="error"?n("names.errorTitle"):n("names.buyTitle")}),e.jsx(ie,{onClick:a,disabled:v,"aria-label":n("buyModal.close"),children:e.jsx(S,{name:"close"})})]}),e.jsxs(re,{children:[n("names.myCreditsBalance")," ",e.jsx(M,{})," ",ne(l,d)]}),e.jsx(ae,{})]}),(r==="confirm"||r==="error")&&e.jsxs(e.Fragment,{children:[e.jsxs(le,{children:[e.jsx(ce,{"aria-hidden":!0,children:"@"}),e.jsxs(de,{children:[e.jsxs(pe,{children:[o,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(he,{children:n("names.subtitle")})]}),e.jsxs(xe,{children:[e.jsx(M,{}),E]})]}),r==="error"?e.jsxs(e.Fragment,{children:[e.jsxs(me,{children:[e.jsx(S,{name:"info","aria-hidden":!0}),e.jsx("span",{children:j})]}),e.jsx(Ae,{onClick:()=>u("confirm"),children:n("names.tryAgain")})]}):e.jsxs(e.Fragment,{children:[e.jsxs(dn,{children:[e.jsx(pn,{children:n("names.confirmTitle")}),e.jsx(hn,{dangerouslySetInnerHTML:{__html:n("names.confirmBody",{name:`<b>@${Rn(o)}</b>`})}}),e.jsxs(xn,{children:[e.jsx(mn,{"aria-hidden":!0,children:"@"}),e.jsx(fn,{value:g,onChange:y=>w(y.target.value.replace(/[^a-zA-Z0-9]/g,"")),placeholder:"yourname","aria-label":n("names.reenterAria"),autoComplete:"off",spellCheck:!1,style:{width:`${Math.max(g.length,8)}ch`}}),e.jsx(un,{children:".dcl.eth"})]})]}),z?e.jsxs(me,{"data-tone":"info","data-testid":"name-blocked-reason",children:[e.jsx(S,{name:"info","aria-hidden":!0}),e.jsx("span",{children:z})]}):null,e.jsx(Ae,{onClick:()=>void I(),disabled:!b||!h||C||$,children:n("names.buyCta")})]})]}),r==="completing"&&e.jsxs(gn,{children:[e.jsx(bn,{src:ot,alt:"",width:56,height:56}),e.jsx(yn,{children:te?n("names.confirming"):n("names.completing")}),e.jsxs(wn,{children:[e.jsx(jn,{"aria-hidden":!0,children:e.jsx("span",{})}),e.jsx(vn,{children:"1/1"})]})]}),r==="pending"&&e.jsxs(e.Fragment,{children:[e.jsxs(se,{children:[e.jsx(oe,{children:n("names.pendingHeaderTitle")}),e.jsx(ie,{onClick:a,"aria-label":n("buyModal.close"),children:e.jsx(S,{name:"close"})})]}),e.jsxs(re,{children:[n("names.myCreditsBalance")," ",e.jsx(M,{})," ",ne(l,d)]}),e.jsx(ae,{}),e.jsxs(me,{"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(le,{style:{marginTop:20},children:[e.jsx(ce,{"aria-hidden":!0,children:"@"}),e.jsxs(de,{children:[e.jsxs(pe,{children:[o,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(he,{children:n("names.subtitle")})]}),e.jsxs(xe,{children:[e.jsx(M,{}),E]})]}),e.jsx(Ne,{children:e.jsx(Me,{onClick:()=>{a(),p("/my-assets")},children:n("names.myItems")})})]}),r==="success"&&e.jsxs(e.Fragment,{children:[e.jsxs(se,{children:[e.jsx(oe,{children:n("names.successHeaderTitle")}),e.jsx(ie,{onClick:a,"aria-label":n("buyModal.close"),children:e.jsx(S,{name:"close"})})]}),e.jsxs(re,{children:[n("names.myCreditsBalance")," ",e.jsx(M,{})," ",ne(l,d)]}),e.jsx(ae,{}),e.jsxs($n,{children:[e.jsx(Cn,{"aria-hidden":!0,children:e.jsx(S,{name:"check"})}),e.jsxs(kn,{children:[e.jsx("b",{children:n("names.successBannerBold")})," ",n("names.successBannerRest")]})]}),e.jsxs(le,{style:{marginTop:20},children:[e.jsx(ce,{"aria-hidden":!0,children:"@"}),e.jsxs(de,{children:[e.jsxs(pe,{children:[o,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(he,{children:n("names.subtitle")})]}),e.jsxs(xe,{children:[e.jsx(M,{}),E]})]}),e.jsxs(Ne,{children:[e.jsx(Me,{onClick:()=>{a(),p("/my-assets")},children:n("names.myItems")}),e.jsx(Sn,{href:F.profileUrl,target:"_blank",rel:"noopener noreferrer",children:n("names.assignToAvatar")})]})]})]})})}function Rn(o){return o.replace(/[&<>"']/g,i=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[i])}const _n="https://cdn.decentraland.org/@dcl/shop/0.1.1-30909439604.commit-4721d83/_assets/identity-B4DXDuJP.webp",Tn="https://cdn.decentraland.org/@dcl/shop/0.1.1-30909439604.commit-4721d83/_assets/world-B-9aPlxu.webp",zn="https://cdn.decentraland.org/@dcl/shop/0.1.1-30909439604.commit-4721d83/_assets/invite-BfwIhP2C.webp",In="https://cdn.decentraland.org/@dcl/shop/0.1.1-30909439604.commit-4721d83/_assets/governance-DnazlIjy.webp",An=s.div`
|
|
383
383
|
width: 100%;
|
|
384
384
|
min-width: 0;
|
|
385
|
-
`,
|
|
385
|
+
`,Nn=s.nav`
|
|
386
386
|
display: flex;
|
|
387
387
|
align-items: center;
|
|
388
388
|
gap: 6px;
|
|
@@ -391,7 +391,7 @@ import{b as We,r as m,j as e,u as Je}from"./react-vyZjIDcS.js";import{c as F,av
|
|
|
391
391
|
font-size: 12px;
|
|
392
392
|
line-height: 1;
|
|
393
393
|
color: ${t.colors.muted};
|
|
394
|
-
`,
|
|
394
|
+
`,Mn=s.button`
|
|
395
395
|
border: 0;
|
|
396
396
|
background: none;
|
|
397
397
|
padding: 0;
|
|
@@ -406,10 +406,10 @@ import{b as We,r as m,j as e,u as Je}from"./react-vyZjIDcS.js";import{c as F,av
|
|
|
406
406
|
outline: 2px solid ${t.colors.accent};
|
|
407
407
|
outline-offset: 2px;
|
|
408
408
|
}
|
|
409
|
-
`,
|
|
409
|
+
`,Pn=s.span`
|
|
410
410
|
font-weight: 700;
|
|
411
411
|
color: ${t.colors.muted};
|
|
412
|
-
`,
|
|
412
|
+
`,Wn=s.div`
|
|
413
413
|
display: flex;
|
|
414
414
|
flex-direction: column;
|
|
415
415
|
gap: 48px;
|
|
@@ -422,7 +422,7 @@ import{b as We,r as m,j as e,u as Je}from"./react-vyZjIDcS.js";import{c as F,av
|
|
|
422
422
|
gap: 32px;
|
|
423
423
|
padding-bottom: 32px;
|
|
424
424
|
}
|
|
425
|
-
`,
|
|
425
|
+
`,Bn=s.div`
|
|
426
426
|
position: relative;
|
|
427
427
|
border-radius: ${t.radius.banner};
|
|
428
428
|
overflow: hidden;
|
|
@@ -438,12 +438,12 @@ import{b as We,r as m,j as e,u as Je}from"./react-vyZjIDcS.js";import{c as F,av
|
|
|
438
438
|
padding: 40px 20px;
|
|
439
439
|
gap: 28px;
|
|
440
440
|
}
|
|
441
|
-
`,
|
|
441
|
+
`,Fn=s.div`
|
|
442
442
|
display: flex;
|
|
443
443
|
flex-direction: column;
|
|
444
444
|
align-items: center;
|
|
445
445
|
gap: 12px;
|
|
446
|
-
`,
|
|
446
|
+
`,Ln=s.h1`
|
|
447
447
|
margin: 0;
|
|
448
448
|
font-family: ${t.font.sans};
|
|
449
449
|
font-weight: 600;
|
|
@@ -454,7 +454,7 @@ import{b as We,r as m,j as e,u as Je}from"./react-vyZjIDcS.js";import{c as F,av
|
|
|
454
454
|
${t.media.maxWidth("mobile")} {
|
|
455
455
|
font-size: 26px;
|
|
456
456
|
}
|
|
457
|
-
`,
|
|
457
|
+
`,Un=s.p`
|
|
458
458
|
margin: 0;
|
|
459
459
|
max-width: 760px;
|
|
460
460
|
font-family: ${t.font.sans};
|
|
@@ -466,14 +466,14 @@ import{b as We,r as m,j as e,u as Je}from"./react-vyZjIDcS.js";import{c as F,av
|
|
|
466
466
|
${t.media.maxWidth("mobile")} {
|
|
467
467
|
font-size: 16px;
|
|
468
468
|
}
|
|
469
|
-
`,
|
|
469
|
+
`,Hn=s.div`
|
|
470
470
|
width: min(785px, 100%);
|
|
471
471
|
display: flex;
|
|
472
472
|
flex-direction: column;
|
|
473
473
|
gap: 12px;
|
|
474
|
-
`,
|
|
474
|
+
`,On=s.div`
|
|
475
475
|
position: relative;
|
|
476
|
-
`,
|
|
476
|
+
`,Gn=s("div",Zt("invalid"))`
|
|
477
477
|
display: flex;
|
|
478
478
|
align-items: center;
|
|
479
479
|
gap: 8px;
|
|
@@ -504,7 +504,7 @@ import{b as We,r as m,j as e,u as Je}from"./react-vyZjIDcS.js";import{c as F,av
|
|
|
504
504
|
${t.media.maxWidth("mobile")} {
|
|
505
505
|
font-size: 16px;
|
|
506
506
|
}
|
|
507
|
-
`,
|
|
507
|
+
`,qn=s.div`
|
|
508
508
|
position: absolute;
|
|
509
509
|
top: calc(100% + 8px);
|
|
510
510
|
left: 0;
|
|
@@ -529,7 +529,7 @@ import{b as We,r as m,j as e,u as Je}from"./react-vyZjIDcS.js";import{c as F,av
|
|
|
529
529
|
align-items: flex-start;
|
|
530
530
|
flex-wrap: wrap;
|
|
531
531
|
}
|
|
532
|
-
`,
|
|
532
|
+
`,Vn=s.a`
|
|
533
533
|
display: inline-flex;
|
|
534
534
|
align-items: center;
|
|
535
535
|
gap: 2px;
|
|
@@ -543,7 +543,7 @@ import{b as We,r as m,j as e,u as Je}from"./react-vyZjIDcS.js";import{c as F,av
|
|
|
543
543
|
${t.media.maxWidth("mobile")} {
|
|
544
544
|
margin-left: 0;
|
|
545
545
|
}
|
|
546
|
-
`,
|
|
546
|
+
`,Zn=s.label`
|
|
547
547
|
flex: 1;
|
|
548
548
|
min-width: 0;
|
|
549
549
|
display: flex;
|
|
@@ -563,7 +563,7 @@ import{b as We,r as m,j as e,u as Je}from"./react-vyZjIDcS.js";import{c as F,av
|
|
|
563
563
|
${t.media.maxWidth("mobile")} {
|
|
564
564
|
font-size: 20px;
|
|
565
565
|
}
|
|
566
|
-
`,
|
|
566
|
+
`,Jn=s.input`
|
|
567
567
|
flex: 0 1 auto;
|
|
568
568
|
min-width: 0;
|
|
569
569
|
max-width: 100%;
|
|
@@ -585,7 +585,7 @@ import{b as We,r as m,j as e,u as Je}from"./react-vyZjIDcS.js";import{c as F,av
|
|
|
585
585
|
${t.media.maxWidth("mobile")} {
|
|
586
586
|
font-size: 16px;
|
|
587
587
|
}
|
|
588
|
-
`,
|
|
588
|
+
`,Qn=s.span`
|
|
589
589
|
flex: none;
|
|
590
590
|
margin-left: 2px;
|
|
591
591
|
font-family: ${t.font.sans};
|
|
@@ -597,7 +597,7 @@ import{b as We,r as m,j as e,u as Je}from"./react-vyZjIDcS.js";import{c as F,av
|
|
|
597
597
|
${t.media.maxWidth("mobile")} {
|
|
598
598
|
font-size: 16px;
|
|
599
599
|
}
|
|
600
|
-
`,
|
|
600
|
+
`,Xn=s.span`
|
|
601
601
|
flex: none;
|
|
602
602
|
font-family: ${t.font.sans};
|
|
603
603
|
font-size: 13px;
|
|
@@ -639,7 +639,7 @@ import{b as We,r as m,j as e,u as Je}from"./react-vyZjIDcS.js";import{c as F,av
|
|
|
639
639
|
${t.media.maxWidth("mobile")} {
|
|
640
640
|
display: none;
|
|
641
641
|
}
|
|
642
|
-
`,
|
|
642
|
+
`,Yn=s(Oe)`
|
|
643
643
|
display: none;
|
|
644
644
|
|
|
645
645
|
${t.media.maxWidth("mobile")} {
|
|
@@ -648,7 +648,7 @@ import{b as We,r as m,j as e,u as Je}from"./react-vyZjIDcS.js";import{c as F,av
|
|
|
648
648
|
height: 48px;
|
|
649
649
|
border-radius: 12px;
|
|
650
650
|
}
|
|
651
|
-
`,
|
|
651
|
+
`,es=s.span`
|
|
652
652
|
display: inline-flex;
|
|
653
653
|
align-items: center;
|
|
654
654
|
gap: 4px;
|
|
@@ -658,7 +658,7 @@ import{b as We,r as m,j as e,u as Je}from"./react-vyZjIDcS.js";import{c as F,av
|
|
|
658
658
|
width: 16px;
|
|
659
659
|
height: 16px;
|
|
660
660
|
}
|
|
661
|
-
`,
|
|
661
|
+
`,fe=s.div`
|
|
662
662
|
display: flex;
|
|
663
663
|
align-items: center;
|
|
664
664
|
gap: 8px;
|
|
@@ -677,7 +677,7 @@ import{b as We,r as m,j as e,u as Je}from"./react-vyZjIDcS.js";import{c as F,av
|
|
|
677
677
|
height: 16px;
|
|
678
678
|
flex: none;
|
|
679
679
|
}
|
|
680
|
-
`,
|
|
680
|
+
`,ts=s.section`
|
|
681
681
|
display: flex;
|
|
682
682
|
flex-direction: column;
|
|
683
683
|
gap: 48px;
|
|
@@ -687,12 +687,12 @@ import{b as We,r as m,j as e,u as Je}from"./react-vyZjIDcS.js";import{c as F,av
|
|
|
687
687
|
gap: 32px;
|
|
688
688
|
padding: 0 20px;
|
|
689
689
|
}
|
|
690
|
-
`,
|
|
690
|
+
`,ns=s.div`
|
|
691
691
|
display: flex;
|
|
692
692
|
flex-direction: column;
|
|
693
693
|
align-items: center;
|
|
694
694
|
gap: 24px;
|
|
695
|
-
`,
|
|
695
|
+
`,ss=s.h2`
|
|
696
696
|
margin: 0;
|
|
697
697
|
text-align: center;
|
|
698
698
|
font-family: ${t.font.sans};
|
|
@@ -704,7 +704,7 @@ import{b as We,r as m,j as e,u as Je}from"./react-vyZjIDcS.js";import{c as F,av
|
|
|
704
704
|
${t.media.maxWidth("mobile")} {
|
|
705
705
|
font-size: 22px;
|
|
706
706
|
}
|
|
707
|
-
`,
|
|
707
|
+
`,os=s.p`
|
|
708
708
|
margin: 0;
|
|
709
709
|
max-width: 907px;
|
|
710
710
|
text-align: center;
|
|
@@ -717,7 +717,7 @@ import{b as We,r as m,j as e,u as Je}from"./react-vyZjIDcS.js";import{c as F,av
|
|
|
717
717
|
${t.media.maxWidth("mobile")} {
|
|
718
718
|
font-size: 16px;
|
|
719
719
|
}
|
|
720
|
-
`,
|
|
720
|
+
`,is=s.div`
|
|
721
721
|
display: grid;
|
|
722
722
|
grid-template-columns: repeat(4, 1fr);
|
|
723
723
|
gap: 24px;
|
|
@@ -729,7 +729,7 @@ import{b as We,r as m,j as e,u as Je}from"./react-vyZjIDcS.js";import{c as F,av
|
|
|
729
729
|
${t.media.maxWidth("mobile")} {
|
|
730
730
|
grid-template-columns: 1fr;
|
|
731
731
|
}
|
|
732
|
-
`,
|
|
732
|
+
`,Z=s.article`
|
|
733
733
|
min-width: 0;
|
|
734
734
|
display: flex;
|
|
735
735
|
flex-direction: column;
|
|
@@ -737,7 +737,7 @@ import{b as We,r as m,j as e,u as Je}from"./react-vyZjIDcS.js";import{c as F,av
|
|
|
737
737
|
border: 0.25px solid ${t.colors.muted2};
|
|
738
738
|
border-radius: ${t.radius.card};
|
|
739
739
|
overflow: hidden;
|
|
740
|
-
`,
|
|
740
|
+
`,K=s.img`
|
|
741
741
|
display: block;
|
|
742
742
|
width: 100%;
|
|
743
743
|
aspect-ratio: 388 / 235;
|
|
@@ -763,7 +763,7 @@ import{b as We,r as m,j as e,u as Je}from"./react-vyZjIDcS.js";import{c as F,av
|
|
|
763
763
|
font-size: 14px;
|
|
764
764
|
line-height: 1.57;
|
|
765
765
|
color: ${t.colors.text};
|
|
766
|
-
`,
|
|
766
|
+
`,rs=s.span`
|
|
767
767
|
font-weight: 600;
|
|
768
768
|
color: ${t.colors.accent};
|
|
769
769
|
`,Pe=s.a`
|
|
@@ -787,7 +787,7 @@ import{b as We,r as m,j as e,u as Je}from"./react-vyZjIDcS.js";import{c as F,av
|
|
|
787
787
|
width: 13px;
|
|
788
788
|
height: 13px;
|
|
789
789
|
}
|
|
790
|
-
`,
|
|
790
|
+
`,as=s.span`
|
|
791
791
|
position: absolute;
|
|
792
792
|
width: 1px;
|
|
793
793
|
height: 1px;
|
|
@@ -797,4 +797,4 @@ import{b as We,r as m,j as e,u as Je}from"./react-vyZjIDcS.js";import{c as F,av
|
|
|
797
797
|
clip: rect(0, 0, 0, 0);
|
|
798
798
|
white-space: nowrap;
|
|
799
799
|
border: 0;
|
|
800
|
-
`,as="https://docs.decentraland.org/creator/worlds/about/",ls="https://governance.decentraland.org";function cs(o){const i=typeof window<"u"?window.location.hostname:"";return`${i.endsWith("decentraland.org")?"https://decentraland.org":i.endsWith("decentraland.today")?"https://decentraland.today":"https://decentraland.zone"}/marketplace/names/browse?search=${encodeURIComponent(o)}`}function ds({onBack:o}){Fe({title:n("seo.names.title"),description:n("seo.names.description")});const{session:i,signIn:a}=Be(),{data:h}=Ue(),l=h?Le(L,h):null,[d,x]=m.useState(""),[p,r]=m.useState("idle"),[u,g]=m.useState(!1),w=m.useRef(null),[j,k]=m.useState(void 0);m.useLayoutEffect(()=>{w.current&&k(w.current.offsetWidth)},[d]),m.useEffect(()=>{if(!ze(d).ok){r(d.length===0?"idle":"invalid");return}r("checking");const _=new AbortController,R=setTimeout(()=>{(async()=>{try{const $=await Yt(d,{signal:_.signal});r($)}catch($){if(($==null?void 0:$.name)==="AbortError")return;r("error")}})()},400);return()=>{clearTimeout(R),_.abort()}},[d]);const f=ze(d),b=f.ok&&(p==="available"||p==="error");function v(){if(b){if(!i){a();return}g(!0)}}const E=e.jsxs(e.Fragment,{children:[n("names.claim"),l!=null?e.jsxs(Yn,{children:[e.jsx(M,{}),ge(l)]}):null]});return e.jsxs(In,{"data-testid":"names-page",children:[e.jsxs(An,{"aria-label":n("names.breadcrumbAria"),children:[e.jsx(Nn,{onClick:o,children:n("names.breadcrumbCollectibles")}),e.jsx("span",{"aria-hidden":!0,children:">"}),e.jsx(Mn,{children:n("names.breadcrumbCurrent")})]}),e.jsxs(Pn,{children:[e.jsxs(Wn,{children:[e.jsxs(Bn,{children:[e.jsx(Fn,{children:n("names.heroTitle")}),e.jsx(Ln,{children:n("names.heroSubtitle")})]}),e.jsxs(Un,{children:[e.jsxs(Hn,{children:[e.jsxs(On,{invalid:p==="taken",children:[e.jsxs(Vn,{children:[e.jsx(Kn,{"aria-hidden":!0,children:"@"}),e.jsx(Zn,{value:d,onChange:C=>x(Jt(C.target.value)),placeholder:n("names.inputPlaceholder"),"aria-label":n("names.inputAria"),autoComplete:"off",spellCheck:!1,maxLength:ee,style:{width:j!=null?`${j}px`:void 0}}),e.jsx(Dn,{ref:w,"aria-hidden":!0,children:d||n("names.inputPlaceholder")}),e.jsx(Jn,{children:n("names.suffix")})]}),d.length>0?e.jsxs(Qn,{"aria-hidden":!0,children:[d.length,"/",ee]}):null,e.jsx(Oe,{onClick:v,disabled:!b,"data-testid":"names-claim",children:E})]}),p==="taken"?e.jsxs(Gn,{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(qn,{href:cs(d),target:"_blank",rel:"noopener noreferrer",children:[n("names.takenMakeOffer"),e.jsx(S,{name:"external-link",size:13,"aria-hidden":!0})]})]}):null]}),e.jsx(Xn,{onClick:v,disabled:!b,children:E}),p==="checking"?e.jsx(me,{tone:"muted",role:"status","data-testid":"names-checking",children:n("names.checking")}):p==="error"?e.jsx(me,{tone:"muted",role:"status",children:n("names.checkError")}):p==="invalid"&&!f.ok&&f.reason==="too-short"?e.jsx(me,{tone:"muted",role:"status",children:n("names.tooShort",{min:He})}):null,e.jsx(rs,{role:"status","aria-live":"polite",children:p==="available"?n("names.available",{name:d}):""})]})]}),e.jsxs(es,{children:[e.jsxs(ts,{children:[e.jsx(ns,{children:n("names.whyTitle")}),e.jsx(ss,{children:n("names.whyIntro")})]}),e.jsxs(os,{children:[e.jsxs(K,{children:[e.jsx(Z,{src:Rn,alt:""}),e.jsxs(J,{children:[e.jsx(Q,{children:n("names.why1Title")}),e.jsx(X,{children:n("names.why1")})]})]}),e.jsxs(K,{children:[e.jsx(Z,{src:Tn,alt:""}),e.jsxs(J,{children:[e.jsx(Q,{children:n("names.why2Title")}),e.jsxs(X,{children:[n("names.why2")," ",e.jsx(is,{children:n("names.why2Address")})]}),e.jsxs(Pe,{href:as,target:"_blank",rel:"noopener noreferrer",children:[n("names.learnMore"),e.jsx(S,{name:"external-link","aria-hidden":!0})]})]})]}),e.jsxs(K,{children:[e.jsx(Z,{src:_n,alt:""}),e.jsxs(J,{children:[e.jsx(Q,{children:n("names.why3Title")}),e.jsx(X,{children:n("names.why3")})]})]}),e.jsxs(K,{children:[e.jsx(Z,{src:zn,alt:""}),e.jsxs(J,{children:[e.jsx(Q,{children:n("names.why4Title")}),e.jsx(X,{children:n("names.why4")}),e.jsxs(Pe,{href:ls,target:"_blank",rel:"noopener noreferrer",children:[n("names.learnMore"),e.jsx(S,{name:"external-link","aria-hidden":!0})]})]})]})]})]})]}),u?e.jsx(Sn,{name:d,priceCredits:l,onClose:()=>g(!1)}):null]})}const ps="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",ue=48;function Ms(){const[o]=Je(),i=We(),a=(o.get("q")??"").trim().toLowerCase(),h=(o.get("q")??"").trim();Fe({title:h?n("seo.collectibles.searchTitle",{query:h}):n("seo.collectibles.title"),description:n("seo.collectibles.description")});const[l,d]=m.useState("wearable"),[x,p]=m.useState(null),[r,u]=m.useState([]),[g,w]=m.useState(""),[j,k]=m.useState(""),[f,b]=m.useState("on_sale"),[v,E]=m.useState(!1),[C,_]=m.useState("newest"),[R,$]=m.useState(!1);m.useEffect(()=>{if(!R)return;const c=W=>{W.key==="Escape"&&$(!1)};document.addEventListener("keydown",c);const T=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",c),document.body.style.overflow=T}},[R]);const z=f==="on_sale",I=g&&!Number.isNaN(Number(g))?Number(g):void 0,A=j&&!Number.isNaN(Number(j))?Number(j):void 0,te=ct(),y=x?It[x]:void 0,U=(_e.find(c=>c.key===C)??_e[0]).server,H={category:l,rarities:r.length?r:void 0,wearableCategories:y,minPriceCredits:I,maxPriceCredits:A,search:a||void 0,sortBy:U,isSmart:v||void 0,onSale:!0,listingType:te?void 0:"primary"},we={category:l,rarities:r.length?r:void 0,wearableCategories:y,search:a||void 0,sortBy:U,isWearableSmart:v||void 0,isOnSale:f==="not_for_sale"?!1:void 0},{items:O,total:je,isLoading:N,isPlaceholderData:P,error:ve,hasNextPage:De,isFetchingNextPage:$e,fetchNextPage:Ge}=Nt(z?["shop-items",H]:["catalog-items",we],c=>z?at({...H,first:ue,skip:c}):lt({...we,first:ue,skip:c}),{enabled:l!=="names"}),D=je,Ce=N||P,qe=N?15:Math.min(Math.max(O.length,1),ue),{data:ke,isError:Ve}=Ue(),Ke=c=>ke&&c.manaWei?Le(c.manaWei,ke):null,Se=m.useRef(null);m.useEffect(()=>{N||P||!a||Se.current===a||(Se.current=a,Y("Shop Searched",{query:a,result_count:D}))},[a,N,P,D]);const G=m.useRef("__init__");m.useEffect(()=>{if(N||P)return;const c=JSON.stringify({category:l,subCategory:x,rarities:r,min:I,max:A,sort:C,status:f,smart:v});if(G.current==="__init__"||G.current===c){G.current=c;return}G.current=c,Y("Shop Applied Filter",{filters:{category:l,sub_category:x,rarities:r,min_price_credits:I??null,max_price_credits:A??null,status:f,smart:v,sort:C},result_count:D})},[l,x,r,I,A,C,f,v,N,P,D]);function Ee(c){d(c),p(null)}function Re(c){u(T=>T.includes(c)?T.filter(W=>W!==c):[...T,c])}function Ze(){d("wearable"),p(null),u([]),w(""),k(""),b("on_sale"),E(!1)}const B=[];(I!=null||A!=null)&&B.push({key:"price",label:n("filter.price"),onRemove:()=>{w(""),k("")}});for(const c of _t)r.includes(c)&&B.push({key:`rarity-${c}`,label:rt(c),onRemove:()=>Re(c)});return v&&B.push({key:"smart",label:n("filter.smart"),onRemove:()=>E(!1)}),f!=="on_sale"&&B.push({key:"status",label:f==="all"?n("filter.statusAll"):n("filter.notForSale"),onRemove:()=>b("on_sale")}),e.jsxs(pt,{"data-testid":"browse",children:[l!=="names"&&e.jsxs(e.Fragment,{children:[R?e.jsx(ht,{onClick:()=>$(!1),"aria-hidden":!0}):null,e.jsxs(xt,{"data-open":R||void 0,"data-testid":"browse-sidebar",children:[e.jsxs(ft,{children:[e.jsx(mt,{children:n("assets.filters")}),e.jsx(ut,{onClick:()=>$(!1),"aria-label":n("assets.closeFilters"),children:"✕"})]}),e.jsx(gt,{children:e.jsx(bt,{category:l,subCategory:x,onCategory:Ee,onSub:p,priceMin:g,priceMax:j,onPriceMin:w,onPriceMax:k,rarities:r,onToggleRarity:Re,status:f,onStatus:b,smart:v,onSmart:E})}),e.jsx(yt,{children:e.jsx(wt,{type:"button",onClick:()=>$(!1),children:n("assets.showItems")})})]})]}),e.jsx(jt,{children:l==="names"?e.jsx(ds,{onBack:()=>Ee("wearable")}):e.jsxs(e.Fragment,{children:[e.jsx(zt,{sort:C,onSort:_,total:je,loading:N||P,query:a,onOpenFilters:()=>$(!0),chips:B,onClearChips:Ze}),Ve&&z&&O.some(c=>c.source==="legacy")?e.jsx(vt,{"data-variant":"warn",children:n("assets.marketUnavailable")}):null,ve?e.jsx(Mt,{message:n("assets.loadError"),testId:"browse-error"}):null,!Ce&&O.length===0&&!ve?e.jsxs($t,{"data-testid":"browse-empty",children:[e.jsx(Ct,{src:ps,alt:""}),e.jsxs(kt,{children:[e.jsx(St,{children:n("assets.empty.title")}),e.jsx(Et,{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(Rt,{children:e.jsx(Tt,{type:"button",onClick:()=>i("/overview"),children:n("assets.empty.cta")})})]}):e.jsxs(e.Fragment,{children:[e.jsx(Kt,{"data-testid":"grid",children:Ce?e.jsx(Te,{count:qe}):e.jsxs(e.Fragment,{children:[O.map(c=>{if(!z)return e.jsx(q,{item:c,mode:"view"},V(c));const T=c;if(T.source!=="legacy")return e.jsx(q,{item:c},V(c));const W=Ke(T);return W==null?e.jsx(q,{item:c,mode:"view"},V(c)):e.jsx(q,{item:{...T,priceCredits:W}},V(c))}),$e?e.jsx(Te,{count:6}):null]})}),e.jsx(At,{hasNextPage:De,isFetching:$e,onLoadMore:()=>void Ge()})]})]})})]})}export{Ms as Assets};
|
|
800
|
+
`,ls="https://docs.decentraland.org/creator/worlds/about/",cs="https://governance.decentraland.org";function ds(o){const i=typeof window<"u"?window.location.hostname:"";return`${i.endsWith("decentraland.org")?"https://decentraland.org":i.endsWith("decentraland.today")?"https://decentraland.today":"https://decentraland.zone"}/marketplace/names/browse?search=${encodeURIComponent(o)}`}function ps({onBack:o}){Fe({title:n("seo.names.title"),description:n("seo.names.description")});const{session:i,signIn:a}=Be(),{data:h}=Ue(),l=h?Le(L,h):null,[d,x]=f.useState(""),[p,r]=f.useState("idle"),[u,g]=f.useState(!1),w=f.useRef(null),[j,k]=f.useState(void 0);f.useLayoutEffect(()=>{w.current&&k(w.current.offsetWidth)},[d]),f.useEffect(()=>{if(!ze(d).ok){r(d.length===0?"idle":"invalid");return}r("checking");const T=new AbortController,R=setTimeout(()=>{(async()=>{try{const $=await en(d,{signal:T.signal});r($)}catch($){if(($==null?void 0:$.name)==="AbortError")return;r("error")}})()},400);return()=>{clearTimeout(R),T.abort()}},[d]);const m=ze(d),b=m.ok&&(p==="available"||p==="error");function v(){if(b){if(!i){a();return}g(!0)}}const E=e.jsxs(e.Fragment,{children:[n("names.claim"),l!=null?e.jsxs(es,{children:[e.jsx(M,{}),ge(l)]}):null]});return e.jsxs(An,{"data-testid":"names-page",children:[e.jsxs(Nn,{"aria-label":n("names.breadcrumbAria"),children:[e.jsx(Mn,{onClick:o,children:n("names.breadcrumbCollectibles")}),e.jsx("span",{"aria-hidden":!0,children:">"}),e.jsx(Pn,{children:n("names.breadcrumbCurrent")})]}),e.jsxs(Wn,{children:[e.jsxs(Bn,{children:[e.jsxs(Fn,{children:[e.jsx(Ln,{children:n("names.heroTitle")}),e.jsx(Un,{children:n("names.heroSubtitle")})]}),e.jsxs(Hn,{children:[e.jsxs(On,{children:[e.jsxs(Gn,{invalid:p==="taken",children:[e.jsxs(Zn,{children:[e.jsx(Kn,{"aria-hidden":!0,children:"@"}),e.jsx(Jn,{value:d,onChange:C=>x(Qt(C.target.value)),placeholder:n("names.inputPlaceholder"),"aria-label":n("names.inputAria"),autoComplete:"off",spellCheck:!1,maxLength:ee,style:{width:j!=null?`${j}px`:void 0}}),e.jsx(Dn,{ref:w,"aria-hidden":!0,children:d||n("names.inputPlaceholder")}),e.jsx(Qn,{children:n("names.suffix")})]}),d.length>0?e.jsxs(Xn,{"aria-hidden":!0,children:[d.length,"/",ee]}):null,e.jsx(Oe,{onClick:v,disabled:!b,"data-testid":"names-claim",children:E})]}),p==="taken"?e.jsxs(qn,{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(Vn,{href:ds(d),target:"_blank",rel:"noopener noreferrer",children:[n("names.takenMakeOffer"),e.jsx(S,{name:"external-link",size:13,"aria-hidden":!0})]})]}):null]}),e.jsx(Yn,{onClick:v,disabled:!b,children:E}),p==="checking"?e.jsx(fe,{tone:"muted",role:"status","data-testid":"names-checking",children:n("names.checking")}):p==="error"?e.jsx(fe,{tone:"muted",role:"status",children:n("names.checkError")}):p==="invalid"&&!m.ok&&m.reason==="too-short"?e.jsx(fe,{tone:"muted",role:"status",children:n("names.tooShort",{min:He})}):null,e.jsx(as,{role:"status","aria-live":"polite",children:p==="available"?n("names.available",{name:d}):""})]})]}),e.jsxs(ts,{children:[e.jsxs(ns,{children:[e.jsx(ss,{children:n("names.whyTitle")}),e.jsx(os,{children:n("names.whyIntro")})]}),e.jsxs(is,{children:[e.jsxs(Z,{children:[e.jsx(K,{src:_n,alt:""}),e.jsxs(J,{children:[e.jsx(Q,{children:n("names.why1Title")}),e.jsx(X,{children:n("names.why1")})]})]}),e.jsxs(Z,{children:[e.jsx(K,{src:Tn,alt:""}),e.jsxs(J,{children:[e.jsx(Q,{children:n("names.why2Title")}),e.jsxs(X,{children:[n("names.why2")," ",e.jsx(rs,{children:n("names.why2Address")})]}),e.jsxs(Pe,{href:ls,target:"_blank",rel:"noopener noreferrer",children:[n("names.learnMore"),e.jsx(S,{name:"external-link","aria-hidden":!0})]})]})]}),e.jsxs(Z,{children:[e.jsx(K,{src:zn,alt:""}),e.jsxs(J,{children:[e.jsx(Q,{children:n("names.why3Title")}),e.jsx(X,{children:n("names.why3")})]})]}),e.jsxs(Z,{children:[e.jsx(K,{src:In,alt:""}),e.jsxs(J,{children:[e.jsx(Q,{children:n("names.why4Title")}),e.jsx(X,{children:n("names.why4")}),e.jsxs(Pe,{href:cs,target:"_blank",rel:"noopener noreferrer",children:[n("names.learnMore"),e.jsx(S,{name:"external-link","aria-hidden":!0})]})]})]})]})]})]}),u?e.jsx(En,{name:d,priceCredits:l,onClose:()=>g(!1)}):null]})}const hs="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",ue=48;function Ps(){const[o]=Qe(),i=We(),a=(o.get("q")??"").trim().toLowerCase(),h=(o.get("q")??"").trim();Fe({title:h?n("seo.collectibles.searchTitle",{query:h}):n("seo.collectibles.title"),description:n("seo.collectibles.description")});const[l,d]=f.useState("wearable"),[x,p]=f.useState(null),[r,u]=f.useState([]),[g,w]=f.useState(""),[j,k]=f.useState(""),[m,b]=f.useState("on_sale"),[v,E]=f.useState(!1),[C,T]=f.useState("newest"),[R,$]=f.useState(!1);f.useEffect(()=>{if(!R)return;const c=W=>{W.key==="Escape"&&$(!1)};document.addEventListener("keydown",c);const _=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",c),document.body.style.overflow=_}},[R]);const z=m==="on_sale",I=g&&!Number.isNaN(Number(g))?Number(g):void 0,A=j&&!Number.isNaN(Number(j))?Number(j):void 0,te=dt(),y=x?At[x]:void 0,U=(Te.find(c=>c.key===C)??Te[0]).server,H={category:l,rarities:r.length?r:void 0,wearableCategories:y,minPriceCredits:I,maxPriceCredits:A,search:a||void 0,sortBy:U,isSmart:v||void 0,onSale:!0,listingType:te?void 0:"primary"},we={category:l,rarities:r.length?r:void 0,wearableCategories:y,search:a||void 0,sortBy:U,isWearableSmart:v||void 0,isOnSale:m==="not_for_sale"?!1:void 0},{items:O,total:je,isLoading:N,isPlaceholderData:P,error:ve,hasNextPage:Ge,isFetchingNextPage:$e,isFetchNextPageError:De,fetchNextPage:qe}=Mt(z?["shop-items",H]:["catalog-items",we],c=>z?lt({...H,first:ue,skip:c}):ct({...we,first:ue,skip:c}),{enabled:l!=="names"}),G=je,Ce=N||P,Ve=N?15:Math.min(Math.max(O.length,1),ue),{data:ke,isError:Ze}=Ue(),Ke=c=>ke&&c.manaWei?Le(c.manaWei,ke):null,Se=f.useRef(null);f.useEffect(()=>{N||P||!a||Se.current===a||(Se.current=a,Y("Shop Searched",{query:a,result_count:G}))},[a,N,P,G]);const D=f.useRef("__init__");f.useEffect(()=>{if(N||P)return;const c=JSON.stringify({category:l,subCategory:x,rarities:r,min:I,max:A,sort:C,status:m,smart:v});if(D.current==="__init__"||D.current===c){D.current=c;return}D.current=c,Y("Shop Applied Filter",{filters:{category:l,sub_category:x,rarities:r,min_price_credits:I??null,max_price_credits:A??null,status:m,smart:v,sort:C},result_count:G})},[l,x,r,I,A,C,m,v,N,P,G]);function Ee(c){d(c),p(null)}function Re(c){u(_=>_.includes(c)?_.filter(W=>W!==c):[..._,c])}function Je(){d("wearable"),p(null),u([]),w(""),k(""),b("on_sale"),E(!1)}const B=[];(I!=null||A!=null)&&B.push({key:"price",label:n("filter.price"),onRemove:()=>{w(""),k("")}});for(const c of zt)r.includes(c)&&B.push({key:`rarity-${c}`,label:at(c),onRemove:()=>Re(c)});return v&&B.push({key:"smart",label:n("filter.smart"),onRemove:()=>E(!1)}),m!=="on_sale"&&B.push({key:"status",label:m==="all"?n("filter.statusAll"):n("filter.notForSale"),onRemove:()=>b("on_sale")}),e.jsxs(ht,{"data-testid":"browse",children:[l!=="names"&&e.jsxs(e.Fragment,{children:[R?e.jsx(xt,{onClick:()=>$(!1),"aria-hidden":!0}):null,e.jsxs(mt,{"data-open":R||void 0,"data-testid":"browse-sidebar",children:[e.jsxs(ft,{children:[e.jsx(ut,{children:n("assets.filters")}),e.jsx(gt,{onClick:()=>$(!1),"aria-label":n("assets.closeFilters"),children:"✕"})]}),e.jsx(bt,{children:e.jsx(yt,{category:l,subCategory:x,onCategory:Ee,onSub:p,priceMin:g,priceMax:j,onPriceMin:w,onPriceMax:k,rarities:r,onToggleRarity:Re,status:m,onStatus:b,smart:v,onSmart:E})}),e.jsx(wt,{children:e.jsx(jt,{type:"button",onClick:()=>$(!1),children:n("assets.showItems")})})]})]}),e.jsx(vt,{children:l==="names"?e.jsx(ps,{onBack:()=>Ee("wearable")}):e.jsxs(e.Fragment,{children:[e.jsx(It,{sort:C,onSort:T,total:je,loading:N||P,query:a,onOpenFilters:()=>$(!0),chips:B,onClearChips:Je}),Ze&&z&&O.some(c=>c.source==="legacy")?e.jsx($t,{"data-variant":"warn",children:n("assets.marketUnavailable")}):null,ve?e.jsx(Pt,{message:n("assets.loadError"),testId:"browse-error"}):null,!Ce&&O.length===0&&!ve?e.jsxs(Ct,{"data-testid":"browse-empty",children:[e.jsx(kt,{src:hs,alt:""}),e.jsxs(St,{children:[e.jsx(Et,{children:n("assets.empty.title")}),e.jsx(Rt,{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(_t,{children:e.jsx(Tt,{type:"button",onClick:()=>i("/overview"),children:n("assets.empty.cta")})})]}):e.jsxs(e.Fragment,{children:[e.jsx(Kt,{"data-testid":"grid",children:Ce?e.jsx(_e,{count:Ve}):e.jsxs(e.Fragment,{children:[O.map(c=>{if(!z)return e.jsx(q,{item:c,mode:"view"},V(c));const _=c;if(_.source!=="legacy")return e.jsx(q,{item:c},V(c));const W=Ke(_);return W==null?e.jsx(q,{item:c,mode:"view"},V(c)):e.jsx(q,{item:{..._,priceCredits:W}},V(c))}),$e?e.jsx(_e,{count:6}):null]})}),e.jsx(Nt,{hasNextPage:Ge,isFetching:$e,isError:De,onLoadMore:()=>void qe()})]})]})})]})}export{Ps as Assets};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as $,j as t}from"./react-
|
|
1
|
+
import{r as $,j as t}from"./react-IQWs2nb4.js";import{R as C,C as oe,a as ie,b as ne}from"./categories-Byz019bF.js";import{n as c,T as se}from"./Tooltip-CoMCVLgL.js";import{t as e,s as o,I as g,e as s,H as ae,f as v}from"./index-BiIZh9R9.js";const re=o.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
gap: 12px;
|