@dcl/shop 1.9.2-32490364182.commit-e2e4c6b → 1.9.2-32493339792.commit-9dd6f23
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-C4Kzn5fk.js → Activity-BOBru6F-.js} +60 -60
- package/_assets/{AnimatedBackground-BwuwfNrk.js → AnimatedBackground-ChPsWRtA.js} +6 -6
- package/_assets/{Assets-CTbQPjcM.js → Assets-DWI4NaVr.js} +7 -7
- package/_assets/{Authorizations-N-jDljmP.js → Authorizations-xVmNfbFf.js} +4 -4
- package/_assets/{Cart-ywFlNL9H.js → Cart-BGUrce5E.js} +2 -2
- package/_assets/{CircularProgress-DPY51kqk.js → CircularProgress-DO_ZwmA1.js} +2 -2
- package/_assets/{Collection-BbPumsdq.js → Collection-CHpDQHJq.js} +11 -11
- package/_assets/{CollectionCarousel-CoM9Gv9s.js → CollectionCarousel-BRzHQV17.js} +3 -3
- package/_assets/{Confetti-C0-okGdM.js → Confetti-BB86KAAN.js} +4 -4
- package/_assets/{ConstantsUtil-BX0kJSLy.js → ConstantsUtil-jo9GWluc.js} +2 -2
- package/_assets/{ContentClient-FkKb15O9.js → ContentClient-DxrhRvzn.js} +2 -2
- package/_assets/{Creator-B-q7Mpyx.js → Creator-CjNMUbTO.js} +2 -2
- package/_assets/{DeploymentBuilder-B-vRvz4q.js → DeploymentBuilder-83ix5TQu.js} +2 -2
- package/_assets/{EmotePlaybackBar-DLxsISmS.js → EmotePlaybackBar-19e05uCD.js} +5 -5
- package/_assets/{ErrorNotice-Bwbke-jb.js → ErrorNotice-BbDJ7oSM.js} +2 -2
- package/_assets/{ExchangeController-wLrEO73T.js → ExchangeController-DQz0ozwB.js} +2 -2
- package/_assets/{Faq-Bn3oD9jJ.js → Faq-RFP04LeF.js} +2 -2
- package/_assets/{GetCredits-1dwWdfH1.js → GetCredits-C4q9KCPa.js} +2 -2
- package/_assets/{Grow-A1ryBOre.js → Grow-DbyGwris.js} +2 -2
- package/_assets/{HelpersUtil-zE-WUDXf.js → HelpersUtil-sn-EX4sD.js} +2 -2
- package/_assets/ItemDetail-BT1EJeg9.js +3655 -0
- package/_assets/{LoadMore-D-zzUoTF.js → LoadMore-DWB-tGRB.js} +2 -2
- package/_assets/{ManaPricingBanner.styles-CdSp5zDl.js → ManaPricingBanner.styles-C9kR0xkR.js} +28 -24
- package/_assets/{MyAssets-vSbkMz3D.js → MyAssets-BcVgG-ED.js} +45 -45
- package/_assets/{MyFavorites-V0_oPzp8.js → MyFavorites-CJwXz0t5.js} +2 -2
- package/_assets/{NetworkUtil-C2E64C4n.js → NetworkUtil-BdwtOd1-.js} +2 -2
- package/_assets/{NotFound-BDte9RrV.js → NotFound-B-UIb9Nr.js} +2 -2
- package/_assets/{NotificationsBell-D2-6APUI.js → NotificationsBell-DaKv2283.js} +2 -2
- package/_assets/{OutfitDetail-2F7CkzM9.js → OutfitDetail-Dabdj6Zq.js} +2 -2
- package/_assets/{OutfitPreview-vLgRLTXf.js → OutfitPreview-CLNkogeE.js} +2 -2
- package/_assets/{OutfitStudio-B7-5-HLr.js → OutfitStudio-DxgrYDdK.js} +2 -2
- package/_assets/{StoreSettings-DYpES0Qy.js → StoreSettings-DpMAQomJ.js} +3 -3
- package/_assets/{Success-CbxoRTGm.js → Success-D4YczCOw.js} +2 -2
- package/_assets/{SwapController-CNhuabdS.js → SwapController-BTOBBLzw.js} +2 -2
- package/_assets/{TradeService-Dq5kA3hU.js → TradeService-h-QSpBV6.js} +2 -2
- package/_assets/{W3MFrameProviderSingleton-qLuUEBFJ.js → W3MFrameProviderSingleton-DNYBXqcl.js} +4 -4
- package/_assets/{WebCryptoP256-BNgcFtmR.js → WebCryptoP256-42HMh_PV.js} +2 -2
- package/_assets/{authorizations-Wa0_wT0Z.js → authorizations-DkRdd-1d.js} +2 -2
- package/_assets/{basic-CFDlu1LL.js → basic-xgd_UIZp.js} +2 -2
- package/_assets/{biconomy-CbaORytl.js → biconomy-LnVXJyVN.js} +2 -2
- package/_assets/{browseLayout.styles-CuE2syAy.js → browseLayout.styles-B8_UmpYi.js} +2 -2
- package/_assets/{browser-XADW-5I9.js → browser-DCf3IQS1.js} +2 -2
- package/_assets/{browser-ponyfill-ByHh5PGV.js → browser-ponyfill-Dqmkl3JZ.js} +2 -2
- package/_assets/{builder-Cil_nXWA.js → builder-lLfr3elt.js} +2 -2
- package/_assets/{buy-DAGs2gvU.js → buy-B_nE_K_L.js} +2 -2
- package/_assets/{buy-gasless-CXg0ob_0.js → buy-gasless-DK9YnK5W.js} +2 -2
- package/_assets/{categories-Bwi3LuIK.js → categories-CUsrLJsQ.js} +2 -2
- package/_assets/{ccip-DxEPKiwF.js → ccip-B2FezZBB.js} +2 -2
- package/_assets/{ccip-CABvxDcN.js → ccip-Bumbcuu6.js} +2 -2
- package/_assets/{chains-CKHFLxhm.js → chains-DAwnzJtp.js} +2 -2
- package/_assets/{collectionPage.styles-DZFdmcAO.js → collectionPage.styles-CMg9-nBi.js} +6 -6
- package/_assets/{common-AHgzOdSB.js → common-CZ2_t92X.js} +2 -2
- package/_assets/{controller-389ptNLt.js → controller-C_Z7GwZl.js} +3 -3
- package/_assets/{core-CWqAJwp-.js → core-C0V9LYxl.js} +5 -5
- package/_assets/{createSvgIcon-RTgYqIT0.js → createSvgIcon-BDETCLue.js} +3 -3
- package/_assets/{custom-B6FOcLFS.js → custom-Bpch6eDt.js} +2 -2
- package/_assets/{data-capture-DZoFqspx.js → data-capture-CgzhJSuI.js} +2 -2
- package/_assets/{dcl-schemas-CQsQxWYK.js → dcl-schemas-D-HY5c5S.js} +2 -2
- package/_assets/{decimals-BrfaLWeO.js → decimals-CMPrx8H9.js} +2 -2
- package/_assets/{decimals-B8ji3I9T.js → decimals-CvLYuks1.js} +2 -2
- package/_assets/{detectExtension-CBEeT0QS.js → detectExtension-eKsK5_7N.js} +2 -2
- package/_assets/{disposePreview-NijpZXe_.js → disposePreview-7gQAmFWx.js} +2 -2
- package/_assets/{email-WN7zlIKb.js → email-CzUruI1B.js} +2 -2
- package/_assets/{embedded-wallet-c9wepCXs.js → embedded-wallet-Dzt0EALS.js} +2 -2
- package/_assets/{emotion-styled.browser.esm-CYlNKf9I.js → emotion-styled.browser.esm-CKkXZGM0.js} +2 -2
- package/_assets/{engine-C91fSUt_.js → engine-BdqWc7md.js} +2 -2
- package/_assets/{errors-DGWrzcZ2.js → errors-gm41DtjH.js} +2 -2
- package/_assets/{estimate-l1-fee-BscyCbli.js → estimate-l1-fee-CNM3A5EY.js} +2 -2
- package/_assets/{eth_estimateGas-zf8E350c.js → eth_estimateGas-C51fArBf.js} +2 -2
- package/_assets/{eth_getStorageAt-C7mDOh_o.js → eth_getStorageAt-Cpp_9_JB.js} +2 -2
- package/_assets/{eth_getTransactionCount-BZuLOO7k.js → eth_getTransactionCount-DwpZpPfN.js} +2 -2
- package/_assets/{ethereum-RVBnTLaL.js → ethereum-CWRHwHnG.js} +2 -2
- package/_assets/{ethers-DXUQI3Ut.js → ethers-D5UuIc_H.js} +2 -2
- package/_assets/{events-DLLBOQYG.js → events-BgG191wB.js} +2 -2
- package/_assets/{execute-C57BG5lJ.js → execute-C13MuCL-.js} +3 -3
- package/_assets/{extractIPFS-BKXzy-Rh.js → extractIPFS-C0y057MY.js} +2 -2
- package/_assets/{features-ALZAg55_.js → features-DhJBxZ00.js} +2 -2
- package/_assets/{fetchTokenMetadata-Cr3PV6X1.js → fetchTokenMetadata-oE-PbhMg.js} +3 -3
- package/_assets/{field.styles-1qNXB2de.js → field.styles-CAUTIJXl.js} +2 -2
- package/_assets/{fortmatic-VEuLc1E0.js → fortmatic-2c1nSnhu.js} +2 -2
- package/_assets/{get-bytecode-Dgh4Jb3X.js → get-bytecode-LEW7S20n.js} +2 -2
- package/_assets/{get-ecosystem-wallet-info-Bo9paKe6.js → get-ecosystem-wallet-info-GQiNBhTt.js} +2 -2
- package/_assets/{getBalance-BE7W--GK.js → getBalance-Wt9rkI1m.js} +3 -3
- package/_assets/{getInstalledModules-BQ_ILdNe.js → getInstalledModules-CCjhRkB7.js} +2 -2
- package/_assets/{getNFT-C4VCKNcO.js → getNFT-BIVMfh86.js} +2 -2
- package/_assets/{getNFT-BYOtm54v.js → getNFT-DX_76hyk.js} +3 -3
- package/_assets/{grid.styles-DzvODQdq.js → grid.styles-B7j4ZE-1.js} +2 -2
- package/_assets/{hashTypedData-X0KUMzG4.js → hashTypedData-C2S6ISWi.js} +2 -2
- package/_assets/{hashTypedData-ChT5ZbgL.js → hashTypedData-OVmkM126.js} +2 -2
- package/_assets/{in-app-zluvfGQX.js → in-app-Baurkd2s.js} +2 -2
- package/_assets/{in-app-wallet-calls-BrnhR34A.js → in-app-wallet-calls-DYr60akb.js} +2 -2
- package/_assets/{index-D3jeiuFw.js → index-72qrJRLP.js} +2 -2
- package/_assets/{index-D6hTzS8e.js → index-B9CqKPcy.js} +2 -2
- package/_assets/{index-PPamm-Fm.js → index-BAZW_9En.js} +2 -2
- package/_assets/{index-DNuGqPWd.js → index-BAyQKXeX.js} +3 -3
- package/_assets/{index-DvfEbLUY.js → index-BCTIVQ38.js} +2 -2
- package/_assets/{index-BN-bGk3n.js → index-BKwSv05S.js} +3 -3
- package/_assets/{index-CarTIHBr.js → index-BM1Is6f3.js} +2 -2
- package/_assets/{index-BQ0ZshU5.js → index-BQ7twFQE.js} +2 -2
- package/_assets/{index-BzhoSaGz.js → index-BRQHDmfJ.js} +2 -2
- package/_assets/{index-Dbp8PJtv.js → index-Bk5SRPIO.js} +17 -17
- package/_assets/{index-C-SyxpJI.js → index-Bk62vTwq.js} +2 -2
- package/_assets/{index-D8CbiuvG.js → index-BksLSPkQ.js} +2 -2
- package/_assets/{index-CimY5gmO.js → index-BoJu_Nfn.js} +2 -2
- package/_assets/{index-D_3daVMJ.js → index-BoLVFQhU.js} +2 -2
- package/_assets/{index-drol9D68.js → index-BpwQPG2r.js} +2 -2
- package/_assets/{index-Cwx8-XY7.js → index-BqRCIJLW.js} +2 -2
- package/_assets/{index-SPFq-ZCl.js → index-Bs1IwEFK.js} +2 -2
- package/_assets/{index-C-cuJat3.js → index-Bth6O8wI.js} +2 -2
- package/_assets/{index-DlWdq6Mw.js → index-C1roXIZW.js} +2 -2
- package/_assets/{index-LDPyoGDo.js → index-C6i7o4u4.js} +403 -403
- package/_assets/{index-BGw5m7Uo.js → index-C8MVNekM.js} +3 -3
- package/_assets/{index-BPpGc36z.js → index-CBSi566e.js} +2 -2
- package/_assets/{index-DX-xaYge.js → index-CEpjUJOV.js} +2 -2
- package/_assets/index-CKGO8NWe.css +1 -0
- package/_assets/{index-DJA_1O-1.js → index-CMb63NTm.js} +2 -2
- package/_assets/{index-CZJQqq1_.js → index-CNPhraPm.js} +2 -2
- package/_assets/{index-BD0UDtYF.js → index-COAnC5q2.js} +2 -2
- package/_assets/{index-BJ83OlRb.js → index-CPRN9-ev.js} +2 -2
- package/_assets/{index-BAeUu19q.js → index-CSh0mTD_.js} +3 -3
- package/_assets/{index-DwCKhtFu.js → index-CU7TM-NA.js} +2 -2
- package/_assets/{index-CLfKjViB.js → index-CYBANRcc.js} +2 -2
- package/_assets/{index-fKbajirP.js → index-C_c-NZp-.js} +2 -2
- package/_assets/{index-OeIHT0cR.js → index-Cg7UsMUc.js} +2 -2
- package/_assets/{index-CQ3eT5S4.js → index-CieO3ayk.js} +2 -2
- package/_assets/{index-BcpaMHLt.js → index-ClNVZsZJ.js} +2 -2
- package/_assets/{index-DHM5xCcE.js → index-Cq6EUh9o.js} +2 -2
- package/_assets/{index-DDxLpm0Z.js → index-CwLlEfsN.js} +2 -2
- package/_assets/{index-CSBo6qrQ.js → index-CyOZb_GG.js} +4 -4
- package/_assets/{index-B9WM1WTc.js → index-D-XFph9c.js} +2 -2
- package/_assets/{index-CRP5QaPb.js → index-D5UBGQRC.js} +2 -2
- package/_assets/{index-36NDvu3w.js → index-D90e8KfQ.js} +2 -2
- package/_assets/{index-C8H2vLAP.js → index-D9i93oWe.js} +2 -2
- package/_assets/{index-C4iYwCkM.js → index-DJCj-1zL.js} +2 -2
- package/_assets/{index-g_xcW_-R.js → index-DRvURtEA.js} +2 -2
- package/_assets/{index-BuABw98X.js → index-DaAnU2xP.js} +2 -2
- package/_assets/index-Db70RtN9.js +2 -0
- package/_assets/{index-4dXpSk57.js → index-Dfsi8IW9.js} +2 -2
- package/_assets/{index-BpQETbke.js → index-DgewcXtQ.js} +4 -4
- package/_assets/{index-Cx1edpy0.js → index-Dm14m91b.js} +2 -2
- package/_assets/{index-C0fNNzGI.js → index-Do0EDxo0.js} +2 -2
- package/_assets/{index-DVqruI7F.js → index-Dqfr2bvx.js} +2 -2
- package/_assets/{index-CaHn1v4Y.js → index-Du4TWaea.js} +3 -3
- package/_assets/{index-6m82mLa-.js → index-DzcRYNtx.js} +2 -2
- package/_assets/{index-C5onHlUQ.js → index-Lmp-vKwx.js} +2 -2
- package/_assets/{index-DCSeDwHz.js → index-M6WjC5UC.js} +2 -2
- package/_assets/{index-NJ_79PUz.js → index-McQPTb3I.js} +2 -2
- package/_assets/{index-BrC_okhM.js → index-Mdjd149J.js} +2 -2
- package/_assets/{index-2QDRSKTI.js → index-at-KdJKv.js} +2 -2
- package/_assets/{index-DAuK57Cr.js → index-c8Ld0DY9.js} +2 -2
- package/_assets/{index-CTAs_Ona.js → index-i8480yQ2.js} +2 -2
- package/_assets/{index-CwlpUkJ3.js → index-lgfAposA.js} +2 -2
- package/_assets/{index-vnVB3yV9.js → index-mtunB8HD.js} +2 -2
- package/_assets/{index-CbZQowQ5.js → index-nfljjUsr.js} +6 -6
- package/_assets/{index-ioIg36Q5.js → index-rd-W7f1j.js} +4 -4
- package/_assets/{index-BZPiWmJM.js → index-sKrDbJHW.js} +2 -2
- package/_assets/{index-RYnkqAG_.js → index-uKWDNSAp.js} +2 -2
- package/_assets/{index-CwSVzkMY.js → index-wQXlFsU6.js} +2 -2
- package/_assets/{index-1nMFaDfq.js → index-yMykCGD4.js} +2 -2
- package/_assets/{index.es-Bmub6mvo.js → index.es-BjOWM-FW.js} +2 -2
- package/_assets/{index.es-B7WIB4xs.js → index.es-BmdpcFeJ.js} +2 -2
- package/_assets/{index.es-BmijG_o0.js → index.es-DAAXIk2h.js} +2 -2
- package/_assets/{index.es-DW9WuktD.js → index.es-m3UaQXcT.js} +5 -5
- package/_assets/{items-empty-Bs5yNmsR.js → items-empty-BKfeE0c0.js} +2 -2
- package/_assets/{jump-DpEhRseo.js → jump-DnjeXKXd.js} +2 -2
- package/_assets/{linkAccount-Ce-F8zrz.js → linkAccount-BWENOnOz.js} +2 -2
- package/_assets/{localBatchGatewayRequest-Dx1kkAvc.js → localBatchGatewayRequest-DM1HFidU.js} +2 -2
- package/_assets/{native-vLlkzvxI.js → native-mzGBZPh4.js} +2 -2
- package/_assets/{networks-DZ7rrynN.js → networks-z8EeFSod.js} +2 -2
- package/_assets/{onramp-DLuIEWh8.js → onramp-BBvFzwFo.js} +2 -2
- package/_assets/{openzeppelin-B3-AW1et.js → openzeppelin-Bxko_dSX.js} +2 -2
- package/_assets/{ownerOf-Dj22dy0c.js → ownerOf-sdNRPM2v.js} +2 -2
- package/_assets/{parseNft-DIyPdcOK.js → parseNft-CjIpSfSz.js} +3 -3
- package/_assets/{parseSignature-xueulJgr.js → parseSignature-BOKtx4yn.js} +4 -4
- package/_assets/{parseSignature-D8jGniDr.js → parseSignature-Mth-LmNb.js} +2 -2
- package/_assets/{passkeys-CZmD8fl-.js → passkeys-Cpm0QB1F.js} +2 -2
- package/_assets/{pay-with-exchange-Bc61S8fk.js → pay-with-exchange-rU1x0moE.js} +2 -2
- package/_assets/{prepare-contract-call-a0euYGw1.js → prepare-contract-call-DtjN716O.js} +2 -2
- package/_assets/{qr-overlay-Bxcymc80.js → qr-overlay-BImQqiJI.js} +4 -4
- package/_assets/{react-G9L2um0r.js → react-SYhE92K6.js} +2 -2
- package/_assets/{receive-B2L8XUAK.js → receive-DFIcjnfC.js} +2 -2
- package/_assets/{resolveImplementation-CyW7nJOY.js → resolveImplementation-CSCILjga.js} +2 -2
- package/_assets/{resume-buy-DjsRBHGc.js → resume-buy-BNBLokSW.js} +2 -2
- package/_assets/{rpc-HuV61zaY.js → rpc-jefUZ4Bj.js} +2 -2
- package/_assets/{sales-empty-C2d5fYtD.js → sales-empty-Ce36ffdP.js} +2 -2
- package/_assets/{search-empty-a5Cznk_m.js → search-empty-BJh8_Eyt.js} +2 -2
- package/_assets/{secp256k1-D_V4Ye8O.js → secp256k1-CTWVG6WG.js} +2 -2
- package/_assets/{secp256k1-DVs4vnDB.js → secp256k1-CbAignr4.js} +2 -2
- package/_assets/{secp256k1-DRRm-iBM.js → secp256k1-DO42QIx6.js} +2 -2
- package/_assets/{send-7zzvm8CG.js → send-DJzyFf15.js} +2 -2
- package/_assets/{send-batch-transaction-DzSQ0vye.js → send-batch-transaction-BOFIpnOE.js} +2 -2
- package/_assets/{send-eip712-transaction-C8xbqwl4.js → send-eip712-transaction-DuoqHyKY.js} +3 -3
- package/_assets/{send-gasless-transaction-BApkPjqX.js → send-gasless-transaction-YBxtKwo3.js} +3 -3
- package/_assets/{send-transaction-BWqOlzuO.js → send-transaction-Byed_Cu-.js} +3 -3
- package/_assets/{sendMetaTransaction-DtqCFoTt.js → sendMetaTransaction-CXtHI3NS.js} +2 -2
- package/_assets/{sendRawTransaction-DxOSpPmA.js → sendRawTransaction-DQMs5ieU.js} +4 -4
- package/_assets/{sentry-RCtiQtjC.js → sentry-flvYKJxM.js} +3 -3
- package/_assets/{serializeTransaction-DMjWbKEY.js → serializeTransaction-DqFhIpxY.js} +2 -2
- package/_assets/{session-proposal-CDANnhiF.js → session-proposal-C-GXMZMY.js} +2 -2
- package/_assets/{session-request-Bn0fkTkw.js → session-request-CsCmwm0y.js} +3 -3
- package/_assets/{sha256-Cbk06XOV.js → sha256-C5W5i7rt.js} +2 -2
- package/_assets/{signing-BH_9uHTG.js → signing-Dpz11FOI.js} +4 -4
- package/_assets/{skeleton.styles-KSeN66We.js → skeleton.styles-Dv2nMvXK.js} +2 -2
- package/_assets/{socials-DGCX2gsj.js → socials-B5INsQgB.js} +2 -2
- package/_assets/{styled-K_r8RfK3.js → styled-DrFcx2PN.js} +3 -3
- package/_assets/{swaps-CLkWisZt.js → swaps-CkTo6sG3.js} +2 -2
- package/_assets/{thirdweb-DbdkDnGO.js → thirdweb-C9Ryt_0k.js} +4 -4
- package/_assets/{to-serializable-transaction-DeE9YtTe.js → to-serializable-transaction-mjCZOK9T.js} +3 -3
- package/_assets/{totalSupply-f-_lj4s2.js → totalSupply-C3Y3dVY2.js} +2 -2
- package/_assets/{transaction-fETmGUb_.js → transaction-Cc9XNVmp.js} +2 -2
- package/_assets/{transactionReceipt-BHye7StB.js → transactionReceipt-BAc8T_v0.js} +2 -2
- package/_assets/{transactions-DUAV8yRm.js → transactions-0LjvD8Sd.js} +2 -2
- package/_assets/{useCreditPacks-DFJcm3cB.js → useCreditPacks-FF3y6iFZ.js} +2 -2
- package/_assets/{useInfiniteGrid-CLHeOKn3.js → useInfiniteGrid-9swTZj8O.js} +2 -2
- package/_assets/{useStore-BBUVWiPd.js → useStore-Cxw9Sr5l.js} +3 -3
- package/_assets/{useTheme-DD0IQ_3Z.js → useTheme-DdSZ7F1l.js} +2 -2
- package/_assets/{utils-u4hNmxb_.js → utils-CZTvMbsX.js} +2 -2
- package/_assets/{verifyHash-CY-z2bj3.js → verifyHash-CtlkCupL.js} +2 -2
- package/_assets/{w3m-modal-O6Eqk9dV.js → w3m-modal-BGxKEkzq.js} +2 -2
- package/_assets/{w3m-modal-CAKNlWwi.js → w3m-modal-CcPo41nd.js} +2 -2
- package/_assets/{wait-for-tx-receipt-1jFQBtZz.js → wait-for-tx-receipt-D9z3OJAO.js} +2 -2
- package/_assets/{wallets-D1PAyMOY.js → wallets-D0M1sVP6.js} +6 -6
- package/_assets/{web-connector-Dnqy9LKi.js → web-connector-CVpQzhWi.js} +4 -4
- package/_assets/{writeContract-V_-ojxW6.js → writeContract-nXAVqaHU.js} +2 -2
- package/_assets/{zora-sepolia-CIIRKC4C.js → zora-sepolia--H9g3TEn.js} +2 -2
- package/_assets/{zoraTestnet-C2UcAlsp.js → zoraTestnet-B8r51b6X.js} +2 -2
- package/index.html +11 -11
- package/package.json +2 -2
- package/_assets/ItemDetail-DtAVOGXV.js +0 -3490
- package/_assets/index-CpeNCh1-.js +0 -2
- package/_assets/index-l2QjlKjX.css +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as u,b as He,j as e,u as et}from"./react-
|
|
1
|
+
import{r as u,b as He,j as e,u as et}from"./react-SYhE92K6.js";import{u as tt,s as nt}from"./search-empty-BJh8_Eyt.js";import{u as st,t as Ie,R as it,j as ot,k as rt,l as at,m as lt,n as ct,o as dt,p as ht,v as pt,q as ut,r as ft,M as mt,s as xt}from"./browseLayout.styles-B8_UmpYi.js";import{c as V,X as gt,aP as bt,aQ as yt,aW as wt,a as jt,l as vt,cq as Ct,cr as $t,s as i,t,o as Oe,aE as kt,r as St,E as je,b as n,p as Et,I as E,q as O,cs as le,aC as Tt,af as oe,aM as Ne,aU as Rt,aT as _t,n as De,N as Ge,Y as qe,Z as It,at as Nt,P as Lt,S as Le,Q as X,b2 as zt,bN as At}from"./index-C6i7o4u4.js";import{L as Mt}from"./LoadMore-DWB-tGRB.js";import{u as Wt}from"./useInfiniteGrid-9swTZj8O.js";import{n as Pt,S as Bt}from"./categories-CUsrLJsQ.js";import{E as Ft}from"./ErrorNotice-BbDJ7oSM.js";import{d as Ut}from"./dcl-schemas-D-HY5c5S.js";import{s as Ht,G as Ot,w as Dt,S as Gt}from"./buy-gasless-DK9YnK5W.js";import{s as qt,j as Vt}from"./buy-B_nE_K_L.js";import{f as Qt}from"./errors-gm41DtjH.js";import{J as Zt,C as Kt,B as ve}from"./ethers-D5UuIc_H.js";import{n as Xt}from"./name-glyph-aUugT8vq.js";import{G as Jt}from"./grid.styles-B7j4ZE-1.js";import"./skeleton.styles-Dv2nMvXK.js";import"./sentry-flvYKJxM.js";import"./intl-AKLEHPeO.js";import"./authorizations-DkRdd-1d.js";import"./sendMetaTransaction-CXtHI3NS.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},o=new s.Error().stack;o&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[o]="e3db165c-87df-4201-8b4c-ef2c3d9b3625",s._sentryDebugIdIdentifier="sentry-dbid-e3db165c-87df-4201-8b4c-ef2c3d9b3625")}catch{}})();function J(s){const o=s.source??"item",r=s.tradeId||`${s.contractAddress}-${s.tokenId??s.itemId??""}`;return`${o}:${r}`}const Q="100000000000000000000",Ve=2,re=15,Yt=/^[a-zA-Z0-9]+$/;function ze(s){const o=s.trim();return o.length===0?{ok:!1,reason:"empty"}:Yt.test(o)?o.length<Ve?{ok:!1,reason:"too-short"}:o.length>re?{ok:!1,reason:"too-long"}:{ok:!0}:{ok:!1,reason:"invalid-chars"}}function en(s){return s.replace(/[^a-zA-Z0-9]/g,"").slice(0,re)}const tn=["function available(string _subdomain) view returns (bool)"],Ae={mainnet:{rpc:"https://rpc.decentraland.org/mainnet",address:"0x2a187453064356c898cae034eaed119e1663acb8"},sepolia:{rpc:"https://rpc.decentraland.org/sepolia",address:"0x7518456ae93eb98f3e64571b689c626616bb7f30"}};function nn(){return V.chainId===Number(Ut.ChainId.MATIC_MAINNET)?Ae.mainnet:Ae.sepolia}async function sn(s,o={}){var m;const{rpc:r,address:d}=nn(),h=new Zt(r),f=new Kt(d,tn,h);console.info(`[names] availability check → DCLRegistrar(${d}).available("${s}") on ${r}`);const l=await f.available(s);if((m=o.signal)!=null&&m.aborted)throw new DOMException("Aborted","AbortError");return console.info(`[names] "${s}" available=${l}`),l?"available":"taken"}const on="https://app.across.to/api";class ke extends Error{constructor(){super("Name registration is temporarily unavailable due to high network costs"),this.name="NameRouteCostTooHighError"}}class Ce extends Error{constructor(){super("The name could not be registered on Ethereum; your funds were recovered."),this.name="NameNotRegisteredError"}}class $e extends Error{constructor(){super("We couldn't confirm whether the purchase went through."),this.name="NameSettlementUnknownError"}}function rn(s){return wt(Q,s)}async function an(s,o,r={}){var m;const d=r.chainId??V.chainId,h=r.provider??"across",f=`${V.creditsServerUrl}/credits-name-route?name=${encodeURIComponent(o)}&chainId=${d}&provider=${h}`,l=await jt(f,{method:"GET",identity:s,metadata:{}});if(!l.ok){let c;try{c=(m=await l.json())==null?void 0:m.code}catch{}throw c==="ROUTE_COST_TOO_HIGH"?new ke:new Error(`fetchNameCreditRoute ${l.status}`)}return l.json()}function ln(s,o){const r=ve.from(s.availableAmount),h=ve.from(Q).sub(r);return{credits:[{value:s.amount,expiresAt:Number(s.expiresAt),salt:Vt(s.id)}],creditsSignatures:[s.signature],externalCall:{target:o.externalCall.target,selector:o.externalCall.selector,data:o.externalCall.data,expiresAt:o.externalCall.expiresAt,salt:o.externalCall.salt},customExternalCallSignature:o.customExternalCallSignature,maxUncreditedValue:h.isNegative()?"0":h.toString(),maxCreditedValue:Q}}async function cn(s,o={}){const r=on,d=o.intervalMs??1e4,h=o.maxAttempts??60;let f={status:"pending",destinationTxHash:null,actionsSucceeded:null};for(let l=0;l<h;l++){try{const m=await fetch(`${r}/deposit/status?originChainId=137&depositTxHash=${s}`);if(m.ok){const c=await m.json(),g=(c.status??"pending").toLowerCase(),p=c.fillTx??c.fillTxnRef??null,b=typeof c.actionsSucceeded=="boolean"?c.actionsSucceeded:null;if(g==="filled")return{status:"filled",destinationTxHash:p,actionsSucceeded:b};if(g==="refunded"||g==="expired")return{status:g,destinationTxHash:null,actionsSucceeded:!1};f={status:"pending",destinationTxHash:p,actionsSucceeded:b}}}catch{}l<h-1&&await new Promise(m=>setTimeout(m,d))}return f}async function dn(s){const{name:o,identity:r,signer:d}=s,h=p=>{var b;try{(b=s.onProgress)==null||b.call(s,p)}catch{}},f=s.chainId??V.chainId,l=s.provider??"across",m=(s.beneficiary??await d.getAddress()).toLowerCase();let c=null,g="unconfirmed";console.info("[names] register start",{name:o,buyer:m,chainId:f,provider:l}),h("preparing");try{const p=await gt(f),b=rn(p);console.info("[names] step 1/6 sized reservation",{usdCents:b,manaRate:p});const C=await an(r,o,{chainId:f,provider:l});console.info("[names] step 2/6 route fetched",{target:C.externalCall.target,selector:C.externalCall.selector,provider:C.provider,quoteId:C.quoteId});const w=await bt(r,b,void 0,void 0,o);if(c=w.credit.id,console.info("[names] step 3/6 credit authorized",{creditId:w.credit.id,maxCreditedValue:w.maxCreditedValue}),ve.from(w.maxCreditedValue).lt(Q))throw new Error("Credit under-sized for the name price");h("awaiting-confirmation");const $=ln(w.credit,C);let j;try{j=await Ht({chainId:f,buyer:m,signer:d,args:$})}catch(x){if(!(x instanceof Ot))throw x;if(x.reason==="relayer-unreachable"){g="unobservable";const k=new $e;throw k.cause=x,k}j=await qt(f,$,d)}if(console.info("[names] step 4/6 useCredits submitted (Polygon origin tx)",{originTxHash:j}),h("confirming"),await Dt(j),g="confirmed",console.info("[names] step 5/6 origin tx confirmed",{originTxHash:j}),l==="across"){h("registering");const x=await cn(j,s.acrossPoll);if(console.info("[names] step 6/6 across status",x),x.status==="pending")return{status:"pending",originTxHash:j};if(x.status==="filled"&&x.actionsSucceeded===null)return console.warn("[names] across filled without reporting actionsSucceeded — reporting pending",{originTxHash:j}),{status:"pending",originTxHash:j};if(x.status!=="filled"||x.actionsSucceeded!==!0)throw new Ce;return{status:"registered",originTxHash:j,destinationTxHash:x.destinationTxHash}}return{status:"pending",originTxHash:j}}catch(p){if(console.error("[names] register failed — raw error:",p,{name:o,buyer:m,originState:g}),p instanceof Gt)return{status:"pending",originTxHash:p.txHash};if(c&&g==="unconfirmed"&&await yt(r,[c]).catch(()=>{}),p instanceof ke||p instanceof Ce||p instanceof $e)throw p;const b=new Error(Qt(p,"Couldn't register the name. Please try again.",{sale:!0}));throw b.cause=p,b}}function hn(){const{data:s}=vt({queryKey:["feature-flag","shop-names"],queryFn:()=>Ct($t.SHOP_NAMES),staleTime:6e4,refetchOnWindowFocus:!0,retry:1});return s===!0}const pn=60,un=700,fn=25;function mn(s){if(!s)return[];const o=[];for(let r=1;r<=s.length;r++)o.push({text:s.slice(0,r),delay:pn});o[o.length-1]={text:s,delay:un};for(let r=s.length-1;r>=1;r--)o.push({text:s.slice(0,r),delay:fn});return o}function xn(s){return s.flatMap(mn)}function gn(s,o){const r=u.useMemo(()=>xn(s),[s]),[d,h]=u.useState(0);return u.useEffect(()=>{if(!o||r.length===0)return;const f=setTimeout(()=>h(l=>(l+1)%r.length),r[d%r.length].delay);return()=>clearTimeout(f)},[d,o,r]),!o||r.length===0?"":r[d%r.length].text}const bn="https://cdn.decentraland.org/@dcl/shop/1.9.2-32493339792.commit-9dd6f23/_assets/name-verified-oGwQ3ntb.svg",yn="#34fee6",wn=i.div`
|
|
2
2
|
position: fixed;
|
|
3
3
|
inset: 0;
|
|
4
4
|
z-index: 10000;
|
|
@@ -458,7 +458,7 @@ import{r as u,b as He,j as e,u as et}from"./react-G9L2um0r.js";import{u as tt,s
|
|
|
458
458
|
color: ${t.colors.accent};
|
|
459
459
|
}
|
|
460
460
|
}
|
|
461
|
-
`;function Gn({name:s,priceCredits:o,onClose:a}){const{session:d}=Oe(),{data:h,isError:f}=kt(d),l=St(),m=He(),[c,g]=u.useState("confirm"),[p,b]=u.useState(""),[C,w]=u.useState(null),[$,j]=u.useState(!1),[x,k]=u.useState("preparing"),N=u.useRef(!1),T=p.trim().toLowerCase()===s.toLowerCase(),L=c==="completing",M=o!=null?je(o):"—",P=o==null,W=h==null?void 0:h.credits,B=o!=null&&W!=null?o-W:0,S=B>0,F=P?n("names.priceUnavailable"):S?n("names.insufficientCredits",{credits:je(B)}):null;u.useEffect(()=>{const y=G=>{G.key==="Escape"&&!L&&a()};document.addEventListener("keydown",y);const D=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",y),document.body.style.overflow=D}},[L,a]);async function R(){if(!(!d||!T||P||S||N.current)){N.current=!0,g("completing"),w(null),k("preparing");try{const y=await dn({name:s,identity:d.identity,signer:d.signer,onProgress:k});oe("Shop Completed Purchase",{items:[{item_id:null,contract_address:null,token_id:null,price_usd:Ne(o??0),category:"name",is_smart:!1}],purchase_type:"name",is_primary:!0,payment_type:"credits",value_credits:o??null,value_usd:Ne(o??0),transaction_hash:y.originTxHash??null,settlement:y.status}),l.invalidateQueries({queryKey:["usd-balance"]}),l.invalidateQueries({queryKey:["my-assets"]}),g(y.status==="registered"?"success":"pending")}catch(y){oe(_t(y)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:Rt(y),purchase_type:"name"});const D=y instanceof Ce,G=y instanceof $e;w(y instanceof ke?n("names.errorRouteCost"):D?n("names.errorNotRegistered"):G?n("names.errorSettlementUnknown"):(y==null?void 0:y.message)||n("names.errorGeneric")),j(D||G),g("error")}finally{N.current=!1}}}const _=c!=="success"&&c!=="pending",v=Et(d==null?void 0:d.providerType),z=v?2:1,A=v&&(x==="preparing"||x==="awaiting-confirmation"),I=A?1:z,re=A?n("names.confirming"):n("names.completing"),U=x==="registering"?n("names.processingRegistering"):null;return e.jsx(wn,{onClick:L?void 0:a,role:"presentation",children:e.jsxs(jn,{role:"dialog","aria-modal":"true","aria-label":n("names.buyTitle"),onClick:y=>y.stopPropagation(),children:[_&&e.jsxs(e.Fragment,{children:[e.jsxs(ce,{children:[e.jsx(de,{children:c==="error"?n("names.errorTitle"):n("names.buyTitle")}),e.jsx(he,{onClick:a,disabled:L,"aria-label":n("buyModal.close"),children:e.jsx(E,{name:"close"})})]}),e.jsxs(pe,{children:[n("names.myCreditsBalance")," ",e.jsx(O,{})," ",le(h,f)]}),e.jsx(ue,{})]}),(c==="confirm"||c==="error")&&e.jsxs(e.Fragment,{children:[e.jsxs(fe,{children:[e.jsx(Me,{"aria-hidden":!0,children:"@"}),e.jsxs(me,{children:[e.jsxs(xe,{children:[s,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(ge,{children:n("names.subtitle")})]}),e.jsxs(be,{children:[e.jsx(O,{}),M]})]}),c==="error"?e.jsxs(e.Fragment,{children:[e.jsxs(we,{children:[e.jsx(E,{name:"info","aria-hidden":!0}),e.jsx("span",{children:C})]}),$?e.jsx(ye,{onClick:a,children:n("names.errorSpentDismiss")}):e.jsx(ye,{onClick:()=>g("confirm"),children:n("names.tryAgain")})]}):e.jsxs(e.Fragment,{children:[e.jsxs(Sn,{children:[e.jsx(En,{children:n("names.confirmTitle")}),e.jsx(Tn,{dangerouslySetInnerHTML:{__html:n("names.confirmBody",{name:`<b>@${qn(s)}</b>`})}}),e.jsxs(Rn,{children:[e.jsx(_n,{"aria-hidden":!0,children:"@"}),e.jsx(In,{value:p,onChange:y=>b(y.target.value.replace(/[^a-zA-Z0-9]/g,"")),placeholder:"yourname","aria-label":n("names.reenterAria"),autoComplete:"off",spellCheck:!1,style:{width:`${Math.max(p.length,8)}ch`}}),e.jsx(Nn,{children:".dcl.eth"})]})]}),F?e.jsxs(we,{"data-tone":"info","data-testid":"name-blocked-reason",children:[e.jsx(E,{name:"info","aria-hidden":!0}),e.jsx("span",{children:F})]}):null,e.jsx(ye,{onClick:()=>void R(),disabled:!T||!d||P||S,children:n("names.buyCta")})]})]}),c==="completing"&&e.jsxs(Ln,{children:[e.jsx(zn,{src:Tt,alt:"",width:61,height:61}),e.jsxs(An,{children:[e.jsx(Mn,{children:re}),e.jsxs(Pn,{children:[e.jsx(Bn,{"aria-hidden":!0,children:e.jsx("span",{})}),e.jsx(Fn,{"data-testid":"name-progress-count",children:`${I}/${z}`})]}),U?e.jsx(Wn,{children:U}):null]})]}),c==="pending"&&e.jsxs(e.Fragment,{children:[e.jsxs(ce,{children:[e.jsx(de,{children:n("names.pendingHeaderTitle")}),e.jsx(he,{onClick:a,"aria-label":n("buyModal.close"),children:e.jsx(E,{name:"close"})})]}),e.jsxs(pe,{children:[n("names.myCreditsBalance")," ",e.jsx(O,{})," ",le(h,f)]}),e.jsx(ue,{}),e.jsxs(we,{"data-tone":"info",children:[e.jsx(E,{name:"info","aria-hidden":!0}),e.jsxs("span",{children:[e.jsx("b",{children:n("names.pendingBannerBold")})," ",n("names.pendingBannerRest")]})]}),e.jsxs(fe,{style:{marginTop:20},children:[e.jsx(Me,{"aria-hidden":!0,children:"@"}),e.jsxs(me,{children:[e.jsxs(xe,{children:[s,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(ge,{children:n("names.subtitle")})]}),e.jsxs(be,{children:[e.jsx(O,{}),M]})]}),e.jsx(We,{children:e.jsx(Pe,{onClick:()=>{a(),m("/my-items")},children:n("names.myItems")})})]}),c==="success"&&e.jsxs(e.Fragment,{children:[e.jsxs(ce,{children:[e.jsx(de,{children:n("names.successHeaderTitle")}),e.jsx(he,{onClick:a,"aria-label":n("buyModal.close"),children:e.jsx(E,{name:"close"})})]}),e.jsxs(pe,{children:[n("names.myCreditsBalance")," ",e.jsx(O,{})," ",le(h,f)]}),e.jsx(ue,{}),e.jsxs(Un,{children:[e.jsx(Hn,{"aria-hidden":!0,children:e.jsx(E,{name:"check"})}),e.jsxs(On,{children:[e.jsx("b",{children:n("names.successBannerBold")})," ",n("names.successBannerRest")]})]}),e.jsxs(fe,{style:{marginTop:20},children:[e.jsxs(vn,{"data-testid":"name-success-tile",children:[e.jsx(Cn,{src:Xt,alt:"","aria-hidden":!0,width:47,height:47}),e.jsxs($n,{children:[e.jsx("span",{"aria-hidden":!0,children:s}),e.jsx(kn,{src:bn,alt:"","aria-hidden":!0,width:14,height:14})]})]}),e.jsxs(me,{children:[e.jsxs(xe,{children:[s,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(ge,{children:n("names.subtitle")})]}),e.jsxs(be,{children:[e.jsx(O,{}),M]})]}),e.jsxs(We,{children:[e.jsx(Pe,{onClick:()=>{a(),m("/my-items")},children:n("names.myItems")}),e.jsx(Dn,{href:V.profileUrl,target:"_blank",rel:"noopener noreferrer",children:n("names.assignToAvatar")})]})]})]})})}function qn(s){return s.replace(/[&<>"']/g,o=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[o])}const Vn="https://cdn.decentraland.org/@dcl/shop/1.9.2-32490364182.commit-e2e4c6b/_assets/identity-icon-C8yAW_Gq.svg",Qn="https://cdn.decentraland.org/@dcl/shop/1.9.2-32490364182.commit-e2e4c6b/_assets/world-icon-6xQ-PmmW.svg",Zn="https://cdn.decentraland.org/@dcl/shop/1.9.2-32490364182.commit-e2e4c6b/_assets/invite-icon-Bz6lCTuB.svg",Kn="data:image/svg+xml,%3csvg%20width='55.6797'%20height='63.6174'%20viewBox='0%200%2055.6797%2063.6174'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Vote'%3e%3cpath%20id='Vector'%20d='M0.055012%2039.1045C1.61191%2039.4989%202.83757%2039.3938%204.4307%2039.392L8.27108%2039.3878L20.7762%2039.3883L42.8819%2039.3904L50.0954%2039.3907C51.793%2039.3907%2054.0562%2039.5509%2055.6466%2039.0843C55.5909%2040.7931%2055.647%2042.8581%2055.6469%2044.5864L55.6479%2055.616L55.6559%2059.5618C55.6583%2060.6219%2055.8213%2061.9838%2055.261%2062.8837C55.2205%2062.9265%2055.1794%2062.9688%2055.1377%2063.0104C54.7986%2063.3482%2054.3791%2063.5594%2053.9021%2063.5761C52.0714%2063.642%2050.1544%2063.6097%2048.3241%2063.6078L37.4452%2063.6066L2.97352%2063.6103C2.2022%2063.6084%201.15943%2063.6718%200.589171%2063.0576C-0.204857%2062.2037%200.0327979%2060.3244%200.0349529%2059.1687L0.0414734%2054.3929C0.0413119%2049.3191%20-0.00749456%2044.1727%200.055012%2039.1045Z'%20fill='white'%20fill-opacity='0.8'/%3e%3cpath%20id='Subtract'%20d='M37.1168%200.00495927C38.1773%200.00461149%2039.2888%20-0.0284991%2040.3433%200.0811311C41.0714%200.15695%2041.7266%200.914583%2041.7857%201.63484C41.853%202.45491%2041.8268%203.31926%2041.8258%204.15144L41.8189%208.70418L41.8199%2023.9639L40.1099%2023.9659L13.8726%2023.963L13.8678%209.0909L13.8648%204.29793C13.8644%202.52652%2013.3942%200.34203%2015.6754%200.0342561C15.8907%200.016712%2016.237%200.0120998%2016.4557%200.0117952C21.6059%200.00480262%2026.761%200.0117634%2031.9107%200.00788896L37.1168%200.00495927ZM33.3834%206.17293C32.439%206.55612%2031.0531%208.12922%2030.3014%208.88191L25.8297%2013.3634C25.3537%2012.824%2023.3455%2010.7605%2022.8209%2010.4239C22.5581%2010.2549%2022.2566%2010.1546%2021.9449%2010.1329C21.4563%2010.1008%2020.9754%2010.2879%2020.6139%2010.6134C20.2442%2010.9428%2020.0227%2011.4077%2020.0006%2011.9024C19.9561%2013.0748%2021.3406%2014.1198%2022.1256%2014.8868C22.9429%2015.714%2024.1669%2017.1028%2025.1168%2017.67C26.1632%2018.2949%2027.3471%2017.2145%2027.9723%2016.4942C30.25%2014.2025%2032.5393%2011.9456%2034.8101%209.64949C35.2937%209.16062%2035.7138%208.69126%2035.6851%207.96199C35.6419%206.86558%2034.7821%206.09682%2033.6959%206.14656C33.5914%206.15085%2033.4872%206.16001%2033.3834%206.17293Z'%20fill='%23FF7439'/%3e%3cpath%20id='Vector_2'%20d='M45.5498%2015.976C46.6399%2015.986%2049.9504%2015.7705%2050.7361%2016.241C51.0104%2016.4053%2051.2831%2016.6446%2051.4181%2016.9397C51.892%2017.9763%2052.1015%2019.357%2052.3802%2020.4819L54.0582%2027.2308C54.5046%2028.9073%2054.9023%2030.6043%2055.3338%2032.2824C55.6029%2033.329%2055.9417%2034.4293%2054.9705%2035.2255C54.8158%2035.359%2054.4427%2035.5934%2054.2329%2035.6091C52.7731%2035.7184%2051.1693%2035.6701%2049.7108%2035.6679L39.4635%2035.6649L14.5239%2035.6632C10.471%2035.6631%206.41808%2035.6665%202.36531%2035.6698C1.79359%2035.6657%201.33794%2035.6604%200.844568%2035.337C-0.57365%2034.4073%200.381076%2032.2112%200.72189%2030.8501L1.93462%2025.9936L3.28579%2020.566C3.53371%2019.5688%203.77194%2018.5694%204.04289%2017.5781C4.30559%2016.6172%204.74298%2016.1492%205.73966%2015.9892C7.15095%2015.9419%208.72017%2015.9778%2010.1434%2015.9809L10.1451%2023.9585C7.37011%2024.097%207.74242%2027.5535%209.84963%2027.6469C11.6268%2027.7258%2013.6164%2027.6909%2015.4098%2027.691L26.229%2027.6915L39.1339%2027.691L43.273%2027.6909C44.748%2027.6909%2047.2174%2028.0848%2047.3773%2025.9908C47.4212%2025.4807%2047.2565%2024.9745%2046.9209%2024.5879C46.5265%2024.141%2046.1143%2024.0046%2045.5418%2023.9673L45.5498%2015.976Z'%20fill='white'/%3e%3c/g%3e%3c/svg%3e",Xn=i.div`
|
|
461
|
+
`;function Gn({name:s,priceCredits:o,onClose:r}){const{session:d}=Oe(),{data:h,isError:f}=kt(d),l=St(),m=He(),[c,g]=u.useState("confirm"),[p,b]=u.useState(""),[C,w]=u.useState(null),[$,j]=u.useState(!1),[x,k]=u.useState("preparing"),N=u.useRef(!1),T=p.trim().toLowerCase()===s.toLowerCase(),L=c==="completing",M=o!=null?je(o):"—",P=o==null,W=h==null?void 0:h.credits,B=o!=null&&W!=null?o-W:0,S=B>0,F=P?n("names.priceUnavailable"):S?n("names.insufficientCredits",{credits:je(B)}):null;u.useEffect(()=>{const y=G=>{G.key==="Escape"&&!L&&r()};document.addEventListener("keydown",y);const D=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",y),document.body.style.overflow=D}},[L,r]);async function R(){if(!(!d||!T||P||S||N.current)){N.current=!0,g("completing"),w(null),k("preparing");try{const y=await dn({name:s,identity:d.identity,signer:d.signer,onProgress:k});oe("Shop Completed Purchase",{items:[{item_id:null,contract_address:null,token_id:null,price_usd:Ne(o??0),category:"name",is_smart:!1}],purchase_type:"name",is_primary:!0,payment_type:"credits",value_credits:o??null,value_usd:Ne(o??0),transaction_hash:y.originTxHash??null,settlement:y.status}),l.invalidateQueries({queryKey:["usd-balance"]}),l.invalidateQueries({queryKey:["my-assets"]}),g(y.status==="registered"?"success":"pending")}catch(y){oe(_t(y)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:Rt(y),purchase_type:"name"});const D=y instanceof Ce,G=y instanceof $e;w(y instanceof ke?n("names.errorRouteCost"):D?n("names.errorNotRegistered"):G?n("names.errorSettlementUnknown"):(y==null?void 0:y.message)||n("names.errorGeneric")),j(D||G),g("error")}finally{N.current=!1}}}const _=c!=="success"&&c!=="pending",v=Et(d==null?void 0:d.providerType),z=v?2:1,A=v&&(x==="preparing"||x==="awaiting-confirmation"),I=A?1:z,ae=A?n("names.confirming"):n("names.completing"),U=x==="registering"?n("names.processingRegistering"):null;return e.jsx(wn,{onClick:L?void 0:r,role:"presentation",children:e.jsxs(jn,{role:"dialog","aria-modal":"true","aria-label":n("names.buyTitle"),onClick:y=>y.stopPropagation(),children:[_&&e.jsxs(e.Fragment,{children:[e.jsxs(ce,{children:[e.jsx(de,{children:c==="error"?n("names.errorTitle"):n("names.buyTitle")}),e.jsx(he,{onClick:r,disabled:L,"aria-label":n("buyModal.close"),children:e.jsx(E,{name:"close"})})]}),e.jsxs(pe,{children:[n("names.myCreditsBalance")," ",e.jsx(O,{})," ",le(h,f)]}),e.jsx(ue,{})]}),(c==="confirm"||c==="error")&&e.jsxs(e.Fragment,{children:[e.jsxs(fe,{children:[e.jsx(Me,{"aria-hidden":!0,children:"@"}),e.jsxs(me,{children:[e.jsxs(xe,{children:[s,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(ge,{children:n("names.subtitle")})]}),e.jsxs(be,{children:[e.jsx(O,{}),M]})]}),c==="error"?e.jsxs(e.Fragment,{children:[e.jsxs(we,{children:[e.jsx(E,{name:"info","aria-hidden":!0}),e.jsx("span",{children:C})]}),$?e.jsx(ye,{onClick:r,children:n("names.errorSpentDismiss")}):e.jsx(ye,{onClick:()=>g("confirm"),children:n("names.tryAgain")})]}):e.jsxs(e.Fragment,{children:[e.jsxs(Sn,{children:[e.jsx(En,{children:n("names.confirmTitle")}),e.jsx(Tn,{dangerouslySetInnerHTML:{__html:n("names.confirmBody",{name:`<b>@${qn(s)}</b>`})}}),e.jsxs(Rn,{children:[e.jsx(_n,{"aria-hidden":!0,children:"@"}),e.jsx(In,{value:p,onChange:y=>b(y.target.value.replace(/[^a-zA-Z0-9]/g,"")),placeholder:"yourname","aria-label":n("names.reenterAria"),autoComplete:"off",spellCheck:!1,style:{width:`${Math.max(p.length,8)}ch`}}),e.jsx(Nn,{children:".dcl.eth"})]})]}),F?e.jsxs(we,{"data-tone":"info","data-testid":"name-blocked-reason",children:[e.jsx(E,{name:"info","aria-hidden":!0}),e.jsx("span",{children:F})]}):null,e.jsx(ye,{onClick:()=>void R(),disabled:!T||!d||P||S,children:n("names.buyCta")})]})]}),c==="completing"&&e.jsxs(Ln,{children:[e.jsx(zn,{src:Tt,alt:"",width:61,height:61}),e.jsxs(An,{children:[e.jsx(Mn,{children:ae}),e.jsxs(Pn,{children:[e.jsx(Bn,{"aria-hidden":!0,children:e.jsx("span",{})}),e.jsx(Fn,{"data-testid":"name-progress-count",children:`${I}/${z}`})]}),U?e.jsx(Wn,{children:U}):null]})]}),c==="pending"&&e.jsxs(e.Fragment,{children:[e.jsxs(ce,{children:[e.jsx(de,{children:n("names.pendingHeaderTitle")}),e.jsx(he,{onClick:r,"aria-label":n("buyModal.close"),children:e.jsx(E,{name:"close"})})]}),e.jsxs(pe,{children:[n("names.myCreditsBalance")," ",e.jsx(O,{})," ",le(h,f)]}),e.jsx(ue,{}),e.jsxs(we,{"data-tone":"info",children:[e.jsx(E,{name:"info","aria-hidden":!0}),e.jsxs("span",{children:[e.jsx("b",{children:n("names.pendingBannerBold")})," ",n("names.pendingBannerRest")]})]}),e.jsxs(fe,{style:{marginTop:20},children:[e.jsx(Me,{"aria-hidden":!0,children:"@"}),e.jsxs(me,{children:[e.jsxs(xe,{children:[s,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(ge,{children:n("names.subtitle")})]}),e.jsxs(be,{children:[e.jsx(O,{}),M]})]}),e.jsx(We,{children:e.jsx(Pe,{onClick:()=>{r(),m("/my-items")},children:n("names.myItems")})})]}),c==="success"&&e.jsxs(e.Fragment,{children:[e.jsxs(ce,{children:[e.jsx(de,{children:n("names.successHeaderTitle")}),e.jsx(he,{onClick:r,"aria-label":n("buyModal.close"),children:e.jsx(E,{name:"close"})})]}),e.jsxs(pe,{children:[n("names.myCreditsBalance")," ",e.jsx(O,{})," ",le(h,f)]}),e.jsx(ue,{}),e.jsxs(Un,{children:[e.jsx(Hn,{"aria-hidden":!0,children:e.jsx(E,{name:"check"})}),e.jsxs(On,{children:[e.jsx("b",{children:n("names.successBannerBold")})," ",n("names.successBannerRest")]})]}),e.jsxs(fe,{style:{marginTop:20},children:[e.jsxs(vn,{"data-testid":"name-success-tile",children:[e.jsx(Cn,{src:Xt,alt:"","aria-hidden":!0,width:47,height:47}),e.jsxs($n,{children:[e.jsx("span",{"aria-hidden":!0,children:s}),e.jsx(kn,{src:bn,alt:"","aria-hidden":!0,width:14,height:14})]})]}),e.jsxs(me,{children:[e.jsxs(xe,{children:[s,e.jsx("span",{children:".dcl.eth"})]}),e.jsx(ge,{children:n("names.subtitle")})]}),e.jsxs(be,{children:[e.jsx(O,{}),M]})]}),e.jsxs(We,{children:[e.jsx(Pe,{onClick:()=>{r(),m("/my-items")},children:n("names.myItems")}),e.jsx(Dn,{href:V.profileUrl,target:"_blank",rel:"noopener noreferrer",children:n("names.assignToAvatar")})]})]})]})})}function qn(s){return s.replace(/[&<>"']/g,o=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[o])}const Vn="https://cdn.decentraland.org/@dcl/shop/1.9.2-32493339792.commit-9dd6f23/_assets/identity-icon-C8yAW_Gq.svg",Qn="https://cdn.decentraland.org/@dcl/shop/1.9.2-32493339792.commit-9dd6f23/_assets/world-icon-6xQ-PmmW.svg",Zn="https://cdn.decentraland.org/@dcl/shop/1.9.2-32493339792.commit-9dd6f23/_assets/invite-icon-Bz6lCTuB.svg",Kn="data:image/svg+xml,%3csvg%20width='55.6797'%20height='63.6174'%20viewBox='0%200%2055.6797%2063.6174'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Vote'%3e%3cpath%20id='Vector'%20d='M0.055012%2039.1045C1.61191%2039.4989%202.83757%2039.3938%204.4307%2039.392L8.27108%2039.3878L20.7762%2039.3883L42.8819%2039.3904L50.0954%2039.3907C51.793%2039.3907%2054.0562%2039.5509%2055.6466%2039.0843C55.5909%2040.7931%2055.647%2042.8581%2055.6469%2044.5864L55.6479%2055.616L55.6559%2059.5618C55.6583%2060.6219%2055.8213%2061.9838%2055.261%2062.8837C55.2205%2062.9265%2055.1794%2062.9688%2055.1377%2063.0104C54.7986%2063.3482%2054.3791%2063.5594%2053.9021%2063.5761C52.0714%2063.642%2050.1544%2063.6097%2048.3241%2063.6078L37.4452%2063.6066L2.97352%2063.6103C2.2022%2063.6084%201.15943%2063.6718%200.589171%2063.0576C-0.204857%2062.2037%200.0327979%2060.3244%200.0349529%2059.1687L0.0414734%2054.3929C0.0413119%2049.3191%20-0.00749456%2044.1727%200.055012%2039.1045Z'%20fill='white'%20fill-opacity='0.8'/%3e%3cpath%20id='Subtract'%20d='M37.1168%200.00495927C38.1773%200.00461149%2039.2888%20-0.0284991%2040.3433%200.0811311C41.0714%200.15695%2041.7266%200.914583%2041.7857%201.63484C41.853%202.45491%2041.8268%203.31926%2041.8258%204.15144L41.8189%208.70418L41.8199%2023.9639L40.1099%2023.9659L13.8726%2023.963L13.8678%209.0909L13.8648%204.29793C13.8644%202.52652%2013.3942%200.34203%2015.6754%200.0342561C15.8907%200.016712%2016.237%200.0120998%2016.4557%200.0117952C21.6059%200.00480262%2026.761%200.0117634%2031.9107%200.00788896L37.1168%200.00495927ZM33.3834%206.17293C32.439%206.55612%2031.0531%208.12922%2030.3014%208.88191L25.8297%2013.3634C25.3537%2012.824%2023.3455%2010.7605%2022.8209%2010.4239C22.5581%2010.2549%2022.2566%2010.1546%2021.9449%2010.1329C21.4563%2010.1008%2020.9754%2010.2879%2020.6139%2010.6134C20.2442%2010.9428%2020.0227%2011.4077%2020.0006%2011.9024C19.9561%2013.0748%2021.3406%2014.1198%2022.1256%2014.8868C22.9429%2015.714%2024.1669%2017.1028%2025.1168%2017.67C26.1632%2018.2949%2027.3471%2017.2145%2027.9723%2016.4942C30.25%2014.2025%2032.5393%2011.9456%2034.8101%209.64949C35.2937%209.16062%2035.7138%208.69126%2035.6851%207.96199C35.6419%206.86558%2034.7821%206.09682%2033.6959%206.14656C33.5914%206.15085%2033.4872%206.16001%2033.3834%206.17293Z'%20fill='%23FF7439'/%3e%3cpath%20id='Vector_2'%20d='M45.5498%2015.976C46.6399%2015.986%2049.9504%2015.7705%2050.7361%2016.241C51.0104%2016.4053%2051.2831%2016.6446%2051.4181%2016.9397C51.892%2017.9763%2052.1015%2019.357%2052.3802%2020.4819L54.0582%2027.2308C54.5046%2028.9073%2054.9023%2030.6043%2055.3338%2032.2824C55.6029%2033.329%2055.9417%2034.4293%2054.9705%2035.2255C54.8158%2035.359%2054.4427%2035.5934%2054.2329%2035.6091C52.7731%2035.7184%2051.1693%2035.6701%2049.7108%2035.6679L39.4635%2035.6649L14.5239%2035.6632C10.471%2035.6631%206.41808%2035.6665%202.36531%2035.6698C1.79359%2035.6657%201.33794%2035.6604%200.844568%2035.337C-0.57365%2034.4073%200.381076%2032.2112%200.72189%2030.8501L1.93462%2025.9936L3.28579%2020.566C3.53371%2019.5688%203.77194%2018.5694%204.04289%2017.5781C4.30559%2016.6172%204.74298%2016.1492%205.73966%2015.9892C7.15095%2015.9419%208.72017%2015.9778%2010.1434%2015.9809L10.1451%2023.9585C7.37011%2024.097%207.74242%2027.5535%209.84963%2027.6469C11.6268%2027.7258%2013.6164%2027.6909%2015.4098%2027.691L26.229%2027.6915L39.1339%2027.691L43.273%2027.6909C44.748%2027.6909%2047.2174%2028.0848%2047.3773%2025.9908C47.4212%2025.4807%2047.2565%2024.9745%2046.9209%2024.5879C46.5265%2024.141%2046.1143%2024.0046%2045.5418%2023.9673L45.5498%2015.976Z'%20fill='white'/%3e%3c/g%3e%3c/svg%3e",Xn=i.div`
|
|
462
462
|
width: 100%;
|
|
463
463
|
min-width: 0;
|
|
464
464
|
`,Jn=i.nav`
|
|
@@ -544,12 +544,12 @@ import{r as u,b as He,j as e,u as et}from"./react-G9L2um0r.js";import{u as tt,s
|
|
|
544
544
|
${t.media.maxWidth("mobile")} {
|
|
545
545
|
font-size: 16px;
|
|
546
546
|
}
|
|
547
|
-
`,
|
|
547
|
+
`,rs=i.div`
|
|
548
548
|
width: min(785px, 100%);
|
|
549
549
|
display: flex;
|
|
550
550
|
flex-direction: column;
|
|
551
551
|
gap: 12px;
|
|
552
|
-
`,
|
|
552
|
+
`,as=i.div`
|
|
553
553
|
position: relative;
|
|
554
554
|
`,ls=i("div",Pt("invalid"))`
|
|
555
555
|
display: flex;
|
|
@@ -918,7 +918,7 @@ import{r as u,b as He,j as e,u as et}from"./react-G9L2um0r.js";import{u as tt,s
|
|
|
918
918
|
clip: rect(0, 0, 0, 0);
|
|
919
919
|
white-space: nowrap;
|
|
920
920
|
border: 0;
|
|
921
|
-
`,Ts="https://docs.decentraland.org/creator/worlds/about/",Rs="https://governance.decentraland.org";function Fe(s){const o=typeof window<"u"?window.location.hostname:"";return`${o.endsWith("decentraland.org")?"https://decentraland.org":o.endsWith("decentraland.today")?"https://decentraland.today":"https://decentraland.zone"}/marketplace/names/browse?search=${encodeURIComponent(s)}`}function _s({onBack:s}){De({title:n("seo.names.title"),description:n("seo.names.description")});const{session:o,signIn:
|
|
921
|
+
`,Ts="https://docs.decentraland.org/creator/worlds/about/",Rs="https://governance.decentraland.org";function Fe(s){const o=typeof window<"u"?window.location.hostname:"";return`${o.endsWith("decentraland.org")?"https://decentraland.org":o.endsWith("decentraland.today")?"https://decentraland.today":"https://decentraland.zone"}/marketplace/names/browse?search=${encodeURIComponent(s)}`}function _s({onBack:s}){De({title:n("seo.names.title"),description:n("seo.names.description")});const{session:o,signIn:r}=Oe(),d=hn(),{data:h}=Ge(),f=h?qe(Q,h):null,[l,m]=u.useState(""),[c,g]=u.useState("idle"),[p,b]=u.useState(!1),[C,w]=u.useState(!1),[$,j]=u.useState(()=>{var v;return typeof window<"u"&&!!((v=window.matchMedia)!=null&&v.call(window,"(prefers-reduced-motion: reduce)").matches)});u.useEffect(()=>{var A;const v=(A=window.matchMedia)==null?void 0:A.call(window,"(prefers-reduced-motion: reduce)");if(!v)return;const z=I=>j(I.matches);return v.addEventListener("change",z),()=>v.removeEventListener("change",z)},[]);const x=n("names.placeholderExamples"),k=u.useMemo(()=>x.split(",").map(v=>v.trim()).filter(Boolean),[x]),T=gn(k,!C&&!l&&!$)||n("names.inputPlaceholder"),L=u.useRef(null),[M,P]=u.useState(void 0);u.useLayoutEffect(()=>{L.current&&P(L.current.getBoundingClientRect().width)},[l,T]),u.useEffect(()=>{if(!ze(l).ok){g(l.length===0?"idle":"invalid");return}g("checking");const z=new AbortController,A=setTimeout(()=>{(async()=>{try{const I=await sn(l,{signal:z.signal});g(I)}catch(I){if((I==null?void 0:I.name)==="AbortError")return;g("error")}})()},400);return()=>{clearTimeout(A),z.abort()}},[l]);const W=ze(l),B=W.ok&&(c==="available"||c==="error"),S=d&&B,F=!d&&B;function R(){if(S){if(!o){r();return}b(!0)}}const _=e.jsxs(e.Fragment,{children:[n("names.claim"),f!=null?e.jsxs(bs,{children:[e.jsx(O,{}),je(f)]}):null]});return e.jsxs(Xn,{"data-testid":"names-page",children:[e.jsxs(Jn,{"aria-label":n("names.breadcrumbAria"),children:[e.jsx(Yn,{onClick:s,children:n("names.breadcrumbCollectibles")}),e.jsx("span",{"aria-hidden":!0,children:">"}),e.jsx(es,{children:n("names.breadcrumbCurrent")})]}),e.jsxs(ts,{children:[e.jsxs(ns,{children:[e.jsxs(ss,{children:[e.jsx(is,{children:n("names.heroTitle")}),e.jsx(os,{children:n("names.heroSubtitle")})]}),e.jsxs(rs,{children:[e.jsxs(as,{"data-testid":"names-input-wrap",children:[e.jsxs(ls,{invalid:c==="taken",children:[e.jsxs(ps,{children:[e.jsx(us,{"aria-hidden":!0,children:"@"}),e.jsx(fs,{value:l,onChange:v=>m(en(v.target.value)),placeholder:T,"aria-label":n("names.inputAria"),autoComplete:"off",spellCheck:!1,maxLength:re,onFocus:()=>w(!0),style:{width:M!=null?`${M}px`:void 0}}),e.jsx(cs,{ref:L,"aria-hidden":!0,"data-placeholder":!l||void 0,children:l||T}),e.jsx(ms,{children:n("names.suffix")})]}),l.length>0?e.jsxs(xs,{"aria-hidden":!0,children:[l.length,"/",re]}):null,e.jsx(Ze,{onClick:R,disabled:!S,"data-testid":"names-claim",children:_})]}),c==="taken"?e.jsxs(ds,{role:"status","data-testid":"names-taken",children:[e.jsx(E,{name:"info",size:16,"aria-hidden":!0}),e.jsx("span",{children:n("names.taken")}),e.jsxs(hs,{href:Fe(l),target:"_blank",rel:"noopener noreferrer",children:[n("names.takenMakeOffer"),e.jsx(E,{name:"external-link",size:13,"aria-hidden":!0})]})]}):null,c==="checking"?e.jsx(Y,{tone:"muted",role:"status","data-testid":"names-checking",children:n("names.checking")}):F?e.jsxs(Y,{tone:"muted",role:"status","data-testid":"names-disabled",children:[e.jsx(E,{name:"info",size:16,"aria-hidden":!0}),e.jsx("span",{children:n("names.registrationDisabled")}),e.jsxs(ws,{href:Fe(l),target:"_blank",rel:"noopener noreferrer",children:[n("names.registrationDisabledLink"),e.jsx(E,{name:"external-link",size:13,"aria-hidden":!0})]})]}):c==="error"?e.jsx(Y,{tone:"muted",role:"status",children:n("names.checkError")}):c==="invalid"&&!W.ok&&W.reason==="too-short"?e.jsx(Y,{tone:"muted",role:"status",children:n("names.tooShort",{min:Ve})}):null]}),e.jsx(gs,{onClick:R,disabled:!S,children:_}),e.jsx(Es,{role:"status","aria-live":"polite",children:c==="available"?n("names.available",{name:l}):""})]})]}),e.jsxs(js,{children:[e.jsxs(vs,{children:[e.jsx(Cs,{children:n("names.whyTitle")}),e.jsx($s,{children:n("names.whyIntro")})]}),e.jsxs(ks,{children:[e.jsxs(ee,{children:[e.jsx(te,{src:Vn,alt:""}),e.jsxs(ne,{children:[e.jsx(se,{children:n("names.why1Title")}),e.jsx(ie,{children:n("names.why1")})]})]}),e.jsxs(ee,{children:[e.jsx(te,{src:Qn,alt:""}),e.jsxs(ne,{children:[e.jsx(se,{children:n("names.why2Title")}),e.jsxs(ie,{children:[n("names.why2")," ",e.jsx(Ss,{children:n("names.why2Address")})]}),e.jsxs(Be,{href:Ts,target:"_blank",rel:"noopener noreferrer",children:[n("names.learnMore"),e.jsx(E,{name:"external-link","aria-hidden":!0})]})]})]}),e.jsxs(ee,{children:[e.jsx(te,{src:Zn,alt:""}),e.jsxs(ne,{children:[e.jsx(se,{children:n("names.why3Title")}),e.jsx(ie,{children:n("names.why3")})]})]}),e.jsxs(ee,{children:[e.jsx(te,{src:Kn,alt:""}),e.jsxs(ne,{children:[e.jsx(se,{children:n("names.why4Title")}),e.jsx(ie,{children:n("names.why4")}),e.jsxs(Be,{href:Rs,target:"_blank",rel:"noopener noreferrer",children:[n("names.learnMore"),e.jsx(E,{name:"external-link","aria-hidden":!0})]})]})]})]})]})]}),p?e.jsx(Gn,{name:l,priceCredits:f,onClose:()=>b(!1)}):null]})}const Is=i.p`
|
|
922
922
|
display: flex;
|
|
923
923
|
align-items: center;
|
|
924
924
|
gap: 10px;
|
|
@@ -934,5 +934,5 @@ import{r as u,b as He,j as e,u as et}from"./react-G9L2um0r.js";import{u as tt,s
|
|
|
934
934
|
background: rgba(211, 51, 51, 0.1);
|
|
935
935
|
color: ${t.colors.err};
|
|
936
936
|
}
|
|
937
|
-
`,Ue=48,Ns=["all","on_sale","not_for_sale"];function Ys(){const[s]=et(),o=He(),
|
|
938
|
-
//# sourceMappingURL=Assets-
|
|
937
|
+
`,Ue=48,Ns=["all","on_sale","not_for_sale"];function Ys(){const[s]=et(),o=He(),r=(s.get("q")??"").trim().toLowerCase(),d=(s.get("q")??"").trim();De({title:d?n("seo.collectibles.searchTitle",{query:d}):n("seo.collectibles.title"),description:n("seo.collectibles.description")});const h=u.useMemo(()=>({category:"all",status:"on_sale",subCategory:null,rarities:[],priceMin:"",priceMax:"",smart:!1,sort:"newest"}),[]),[f,l]=tt(h),{subCategory:m,rarities:c,priceMin:g,priceMax:p,smart:b,sort:C}=f,w=f.category,$=Ns.includes(f.status)?f.status:"on_sale";st(`${w}:${m??""}`);const[j,x]=u.useState(!1);u.useEffect(()=>{if(!j)return;const a=K=>{K.key==="Escape"&&x(!1)};document.addEventListener("keydown",a);const H=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",a),document.body.style.overflow=H}},[j]);const k=$==="on_sale",N=g&&!Number.isNaN(Number(g))?Number(g):void 0,T=p&&!Number.isNaN(Number(p))?Number(p):void 0,L=It(),M=m?Bt[m]:void 0,P=(Ie.find(a=>a.key===C)??Ie[0]).server,W={category:w,rarities:c.length?c:void 0,wearableCategories:M,minPriceCredits:N,maxPriceCredits:T,search:r||void 0,sortBy:P,isSmart:b||void 0,onSale:!0,listingType:L?void 0:"primary"},B={category:w,rarities:c.length?c:void 0,wearableCategories:M,search:r||void 0,sortBy:P,isWearableSmart:b||void 0,isOnSale:$==="not_for_sale"?!1:void 0},{items:S,total:F,isLoading:R,isPlaceholderData:_,error:v,hasNextPage:z,isFetchingNextPage:A,isFetchNextPageError:I,fetchNextPage:ae}=Wt(k?["shop-items",W]:["catalog-items",B],a=>k?zt({...W,first:Ue,skip:a}):At({...B,first:Ue,skip:a}),{enabled:w!=="names"}),U=F,{data:y,isError:D,isPending:G}=Ge(),Ke=a=>y&&a.manaWei?qe(a.manaWei,y):null,Xe=k&&G&&S.some(a=>a.source==="legacy"),Se=R||_||Xe,Je=R?15:Math.max(S.length,1),Ee=u.useRef(null);u.useEffect(()=>{R||_||!r||Ee.current===r||(Ee.current=r,oe("Shop Searched",{query:r,result_count:U}))},[r,R,_,U]);const Z=u.useRef("__init__");u.useEffect(()=>{if(R||_)return;const a=JSON.stringify({category:w,subCategory:m,rarities:c,min:N,max:T,sort:C,status:$,smart:b});if(Z.current==="__init__"||Z.current===a){Z.current=a;return}Z.current=a,oe("Shop Applied Filter",{filters:{category:w,sub_category:m,rarities:c,min_price_credits:N??null,max_price_credits:T??null,status:$,smart:b,sort:C},result_count:U})},[w,m,c,N,T,C,$,b,R,_,U]);function Te(a){l({category:a,subCategory:null})}function Re(a){l({status:a})}function _e(a){l({rarities:c.includes(a)?c.filter(H=>H!==a):[...c,a]})}function Ye(){l(h)}const q=[];(N!=null||T!=null)&&q.push({key:"price",label:n("filter.price"),onRemove:()=>{l({priceMin:"",priceMax:""})}});for(const a of it)c.includes(a)&&q.push({key:`rarity-${a}`,label:Nt(a),onRemove:()=>_e(a)});return b&&q.push({key:"smart",label:n("filter.smart"),onRemove:()=>l({smart:!1})}),$!=="on_sale"&&q.push({key:"status",label:$==="all"?n("filter.statusAll"):n("filter.notForSale"),onRemove:()=>Re("on_sale")}),e.jsxs(ot,{"data-testid":"browse",children:[w!=="names"&&e.jsxs(e.Fragment,{children:[j?e.jsx(rt,{onClick:()=>x(!1),"aria-hidden":!0}):null,e.jsxs(at,{"data-open":j||void 0,"data-testid":"browse-sidebar",children:[e.jsxs(lt,{children:[e.jsx(ct,{children:n("assets.filters")}),e.jsx(dt,{onClick:()=>x(!1),"aria-label":n("assets.closeFilters"),children:"✕"})]}),e.jsx(ht,{children:e.jsx(pt,{category:w,subCategory:m,onCategory:Te,onSub:a=>l({subCategory:a}),priceMin:g,priceMax:p,onPriceMin:a=>l({priceMin:a}),onPriceMax:a=>l({priceMax:a}),rarities:c,onToggleRarity:_e,status:$,onStatus:Re,smart:b,onSmart:a=>l({smart:a})})}),e.jsx(ut,{children:e.jsx(ft,{type:"button",onClick:()=>x(!1),children:n("assets.showItems")})})]})]}),e.jsx(mt,{children:w==="names"?e.jsx(_s,{onBack:()=>Te("all")}):e.jsxs(e.Fragment,{children:[e.jsx(xt,{sort:C,onSort:a=>l({sort:a}),total:F,loading:R||_,query:r,onOpenFilters:()=>x(!0),chips:q,onClearChips:Ye}),D&&k&&S.some(a=>a.source==="legacy")?e.jsx(Is,{"data-variant":"warn",children:n("assets.marketUnavailable")}):null,v?e.jsx(Ft,{message:n("assets.loadError"),testId:"browse-error"}):null,!Se&&S.length===0&&!v?e.jsx(Lt,{testId:"browse-empty",icon:nt,title:n("assets.empty.title"),body:d?e.jsxs(e.Fragment,{children:[n("assets.empty.searchBefore"),e.jsx("b",{children:d}),n("assets.empty.searchAfter")]}):n("assets.empty.filters"),cta:{label:n("assets.empty.cta"),onClick:()=>o("/overview")}}):e.jsxs(e.Fragment,{children:[e.jsx(Jt,{"data-testid":"grid",children:Se?e.jsx(Le,{count:Je}):e.jsxs(e.Fragment,{children:[S.map(a=>{if(!k)return e.jsx(X,{item:a,mode:"view"},J(a));const H=a;if(H.source!=="legacy")return e.jsx(X,{item:a},J(a));const K=Ke(H);return K==null?e.jsx(X,{item:a,mode:"view"},J(a)):e.jsx(X,{item:{...H,priceCredits:K}},J(a))}),A?e.jsx(Le,{count:6}):null]})}),e.jsx(Mt,{hasNextPage:z,isFetching:A,isError:I,onLoadMore:()=>void ae()})]})]})})]})}export{Ys as Assets};
|
|
938
|
+
//# sourceMappingURL=Assets-DWI4NaVr.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as
|
|
1
|
+
import{j as e,L as W,r as P}from"./react-SYhE92K6.js";import{t as o,s as n,B,m as R,n as F,b as i,o as G,p as O,I as z,q as K,l as w,r as Q,c as H,v as X,w as A,h as Z,x as J,y as I}from"./index-C6i7o4u4.js";import{a as U,b as V,c as Y,d as tt,s as et,e as it}from"./authorizations-DkRdd-1d.js";import{f as ot}from"./builder-lLfr3elt.js";import{m as at}from"./mana-matic-CEqvSwrJ.js";import{f as nt}from"./errors-gm41DtjH.js";import"./dcl-schemas-D-HY5c5S.js";import"./sentry-flvYKJxM.js";import"./ethers-D5UuIc_H.js";import"./intl-AKLEHPeO.js";import"./sendMetaTransaction-CXtHI3NS.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},s=new t.Error().stack;s&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[s]="c2ec6301-beed-4385-8d18-7f5357a4a2c4",t._sentryDebugIdIdentifier="sentry-dbid-c2ec6301-beed-4385-8d18-7f5357a4a2c4")}catch{}})();const st=R`
|
|
2
2
|
to { transform: rotate(360deg); }
|
|
3
3
|
`,rt=R`
|
|
4
4
|
to { background-position: -200% 0; }
|
|
@@ -52,7 +52,7 @@ import{j as i,L as W,r as P}from"./react-G9L2um0r.js";import{t as o,s as n,B,m a
|
|
|
52
52
|
`,E=n.div`
|
|
53
53
|
height: 74px;
|
|
54
54
|
border-radius: 16px;
|
|
55
|
-
background: linear-gradient(100deg,
|
|
55
|
+
background: linear-gradient(100deg, var(--skeleton-lo) 30%, var(--skeleton-hi) 50%, var(--skeleton-lo) 70%);
|
|
56
56
|
background-size: 200% 100%;
|
|
57
57
|
animation: ${rt} 1.4s infinite linear;
|
|
58
58
|
|
|
@@ -188,5 +188,5 @@ import{j as i,L as W,r as P}from"./react-G9L2um0r.js";import{t as o,s as n,B,m a
|
|
|
188
188
|
color: ${o.colors.gray4};
|
|
189
189
|
`,M=n(B)`
|
|
190
190
|
margin-top: 12px;
|
|
191
|
-
`;function j({descriptor:t,owner:s,signer:r,name:a,description:c,image:l,icon:p}){const v=Q(),[h,y]=P.useState(!1),{data:u,isLoading:g,refetch:d}=w({queryKey:["authorization",t.id,s],queryFn:()=>
|
|
192
|
-
//# sourceMappingURL=Authorizations-
|
|
191
|
+
`;function j({descriptor:t,owner:s,signer:r,name:a,description:c,image:l,icon:p}){const v=Q(),[h,y]=P.useState(!1),{data:u,isLoading:g,refetch:d}=w({queryKey:["authorization",t.id,s],queryFn:()=>it(t,s),staleTime:3e4});async function m(){if(h||g)return;const b=!u;y(!0);try{await et({auth:t,signer:r,active:b}),await d(),v.setQueryData(["authorization",t.id,s],b),A.success(b?i("authorizations.toastActivated",{name:a}):i("authorizations.toastDeactivated",{name:a}))}catch(C){Z(C,{flow:"authorizations",step:b?"grant":"revoke"}),A.error(nt(C,i("authorizations.errorGeneric")))}finally{y(!1)}}const N=g?i("authorizations.checking"):u?i("authorizations.active"):i("authorizations.inactive");return e.jsxs(ht,{"data-testid":`authorization-${t.id}`,"data-active":!!u,children:[e.jsx(gt,{children:l?e.jsx("img",{src:l,alt:""}):p}),e.jsxs(mt,{children:[e.jsx(ft,{title:a,children:a}),e.jsx(xt,{children:c})]}),e.jsxs(bt,{children:[e.jsx(yt,{"data-active":!!u,children:N}),h?e.jsx(jt,{"aria-label":i("authorizations.working")}):e.jsx(zt,{type:"button","data-testid":`authorization-toggle-${t.id}`,"data-active":!!u,role:"switch","aria-checked":!!u,"aria-label":u?i("authorizations.deactivateAria",{name:a}):i("authorizations.activateAria",{name:a}),disabled:g,onClick:()=>void m()})]})]})}const x=500,q=10,vt=x*q;async function _(t,s){const r=await I(t,{category:s,first:x}),a=Math.min(Math.ceil(r.total/x),q),c=await Promise.all(Array.from({length:Math.max(0,a-1)},(l,p)=>I(t,{category:s,first:x,skip:(p+1)*x})));return{assets:[...r.assets,...c.flatMap(l=>l.assets)],truncated:r.total>vt}}function kt(t){return w({queryKey:["owned-collections",t],enabled:!!t,staleTime:6e4,queryFn:async()=>{const[s,r]=await Promise.all([_(t,"wearable"),_(t,"emote")]),a=new Map;for(const c of[...s.assets,...r.assets]){const l=c.contractAddress.toLowerCase();a.has(l)||a.set(l,c)}return{collections:[...a.values()],truncated:s.truncated||r.truncated,scanned:s.assets.length+r.assets.length}}})}function $t(t){return w({queryKey:["contract-registry"],enabled:t,staleTime:1/0,gcTime:1/0,queryFn:J})}function Ct(t,s){const r=s==null?void 0:s.get(t.toLowerCase());if(r)return r;const a=X(t);return a===t?i("authorizations.collectionFallback"):a}function At(t,s){return w({queryKey:["creator-collections",t],enabled:!!t&&!!s,staleTime:6e4,queryFn:async()=>{const r=await ot(t,s),a=new Map;for(const c of r){const l=c.contractAddress.toLowerCase();a.has(l)||a.set(l,c)}return[...a.values()]}})}function Wt(){F({title:i("authorizations.title"),noindex:!0});const{session:t,signIn:s}=G(),r=H.chainId,a=O(t==null?void 0:t.providerType),{data:c,isLoading:l}=kt(a?t==null?void 0:t.address:void 0),{data:p,isLoading:v}=$t(!!a&&!!(t!=null&&t.address)),{data:h,isLoading:y}=At(a?t==null?void 0:t.address:void 0,a?t==null?void 0:t.identity:void 0);if(!t)return e.jsxs(D,{children:[e.jsx(z,{name:"info",size:40,color:o.colors.muted2}),e.jsx(S,{children:i("authorizations.signInTitle")}),e.jsx(L,{children:i("authorizations.signInBody")}),e.jsx(M,{variant:"white",onClick:()=>s(),children:i("storeSettings.signIn")})]});if(!a)return e.jsxs(D,{children:[e.jsx(z,{name:"check",size:40,color:o.colors.ok}),e.jsx(S,{children:i("authorizations.managedTitle")}),e.jsx(L,{children:i("authorizations.managedBody")}),e.jsx(M,{as:W,to:"/items",variant:"white",children:i("authorizations.managedCta")})]});const u=U(r),g=V(r);return e.jsxs(ct,{children:[e.jsxs(lt,{children:[e.jsx(dt,{children:i("authorizations.title")}),e.jsx(ut,{children:i("authorizations.intro")})]}),e.jsxs(k,{children:[e.jsx($,{children:i("authorizations.buyingTitle")}),e.jsxs(f,{children:[e.jsx(j,{descriptor:u,owner:t.address,signer:t.signer,name:i("authorizations.creditsName"),description:i("authorizations.creditsDesc"),icon:e.jsx(K,{className:"ccy-mark"})}),e.jsx(j,{descriptor:g,owner:t.address,signer:t.signer,name:i("authorizations.manaName"),description:i("authorizations.manaDesc"),icon:e.jsx(pt,{src:at,alt:"","aria-hidden":!0})})]})]}),e.jsxs(k,{children:[e.jsx($,{children:i("authorizations.sellingTitle")}),c!=null&&c.truncated?e.jsx(wt,{"data-testid":"authorizations-selling-truncated",children:i("authorizations.sellingTruncated",{count:c.scanned})}):null,l||v?e.jsx(f,{"aria-busy":"true","aria-label":i("authorizations.checking"),children:Array.from({length:3}).map((d,m)=>e.jsx(E,{"aria-hidden":!0},m))}):c&&c.collections.length>0?e.jsx(f,{children:c.collections.map(d=>e.jsx(j,{descriptor:Y(d.contractAddress,r),owner:t.address,signer:t.signer,name:Ct(d.contractAddress,p),description:i("authorizations.sellingDesc"),image:d.image,icon:e.jsx(z,{name:"pen",size:18})},d.contractAddress))}):e.jsx(T,{children:i("authorizations.sellingEmpty")})]}),e.jsxs(k,{children:[e.jsx($,{children:i("authorizations.mintingTitle")}),y?e.jsx(f,{"aria-busy":"true","aria-label":i("authorizations.checking"),children:Array.from({length:3}).map((d,m)=>e.jsx(E,{"aria-hidden":!0},m))}):h&&h.length>0?e.jsx(f,{children:h.map(d=>e.jsx(j,{descriptor:tt(d.contractAddress,r),owner:t.address,signer:t.signer,name:d.name||i("authorizations.collectionFallback"),description:i("authorizations.mintingDesc"),icon:e.jsx(z,{name:"pen",size:18})},d.contractAddress))}):e.jsx(T,{children:i("authorizations.mintingEmpty")})]})]})}export{Wt as Authorizations};
|
|
192
|
+
//# sourceMappingURL=Authorizations-xVmNfbFf.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as e,L as zt,r as I,b as oa,a as ca}from"./react-
|
|
1
|
+
import{j as e,L as zt,r as I,b as oa,a as ca}from"./react-SYhE92K6.js";import{t as de,s as r,b as a,E as ue,C as ke,aC as la,D as qe,aD as da,z as ua,I as V,q as Rt,A as Ne,n as ha,ad as H,M as pt,o as pa,Z as ga,l as ma,aE as fa,r as xa,aF as ya,N as ba,aG as va,aH as gt,P as wa,aI as Ca,aJ as ja,aK as ka,aq as ze,p as Sa,aL as mt,af as D,aM as ft,aN as $a,h as ae,X as Ma,c as xt,aO as Ta,aP as yt,aQ as Re,aR as Ia,aS as be,aT as ve,aU as bt,g as vt,f as wt,aV as Pa}from"./index-C6i7o4u4.js";import{M as Aa,S as Ea,C as qa,H as za,a as Ra,T as _a,X as Ba,b as Fa,B as Wa,c as La,d as Ct,e as Ka,f as Se,P as _t,g as Na,h as Qa,i as Ua,j as Ga,k as Ke,l as he,L as Ha,m as Oa,n as jt,o as kt,W as Da,p as Va,q as Ja,r as Xa,A as Ya,s as Za,t as es,u as ts,v as as,w as ss,x as ns,y as is,z as rs,D as os,E as cs,F as ls,G as ds,I as us,J as hs,K as ps,N as gs,O as _e,Q as ms,R as fs,U as xs,V as ys,Y as St,Z as $t,_ as bs,$ as vs,a0 as ws,a1 as Cs,a2 as Mt,a3 as js}from"./CollectionCarousel-BRzHQV17.js";import{f as ks,h as Ss,e as $s,n as Ms,i as Ts,A as Is}from"./authorizations-DkRdd-1d.js";import{g as Ps,h as Be,p as As}from"./buy-B_nE_K_L.js";import{b as Es,w as qs,S as Tt,G as zs}from"./buy-gasless-DK9YnK5W.js";import{u as Rs,M as _s,R as we,r as Bs,c as Fs,p as It,a as Fe}from"./useCreditPacks-FF3y6iFZ.js";import{i as Ws,a as Ls}from"./errors-gm41DtjH.js";import{E as Ks}from"./ErrorNotice-BbDJ7oSM.js";import"./dcl-schemas-D-HY5c5S.js";import"./sentry-flvYKJxM.js";import"./ethers-D5UuIc_H.js";import"./intl-AKLEHPeO.js";import"./sendMetaTransaction-CXtHI3NS.js";(function(){try{var i=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},u=new i.Error().stack;u&&(i._sentryDebugIds=i._sentryDebugIds||{},i._sentryDebugIds[u]="db4dea1f-3770-47fb-bb3f-e8e7926d9413",i._sentryDebugIdIdentifier="sentry-dbid-db4dea1f-3770-47fb-bb3f-e8e7926d9413")}catch{}})();const{colors:se,radius:Ns}=de,Qs=r.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
align-items: center;
|
|
4
4
|
justify-content: center;
|
|
@@ -642,4 +642,4 @@ import{j as e,L as zt,r as I,b as oa,a as ca}from"./react-G9L2um0r.js";import{t
|
|
|
642
642
|
margin-top: 0;
|
|
643
643
|
}
|
|
644
644
|
`;function We(i){if(Ws(i))return a("errors.rejected");const u=(i.message??"").toLowerCase();return u.includes("insufficient")?a("cart.error.insufficient",{currency:ke.name}):u.includes("no active listing")||u.includes("your own listing")?a("cart.error.listingChanged"):a("marketCheckout.error.generic")}const Nn=12e4;function Qn(i){const u=[];return i.unavailable.length&&u.push(a("cart.drop.unavailable",{count:i.unavailable.length})),i.own.length&&u.push(a("cart.drop.own",{count:i.own.length})),a("cart.drop.removed",{items:u.join(` ${a("cart.drop.and")} `)})}const Le=i=>i.reduce((u,P)=>u+P.priceCredits*P.quantity,0),je=i=>i.flatMap(u=>Array.from({length:u.quantity},()=>({...u,quantity:1})));function ni(){var ht;ha({title:a("nav.cart"),noindex:!0});const i=H(t=>t.items),u=H(t=>t.remove),P=H(t=>t.increment),E=H(t=>t.decrement),W=H(t=>t.clear),J=H(t=>t.restore),X=H(t=>t.setFittingOpen),K=pt(t=>t.items),ie=pt(t=>t.toggle),{session:n,signIn:N}=pa(),Kt=ga(),pe=Rs().packs.slice(0,_s);I.useEffect(()=>(document.body.classList.add("shop-cart-bg"),()=>document.body.classList.remove("shop-cart-bg")),[]);const Nt=i.some(t=>t.category!=="emote"),{data:$e}=ma({queryKey:["upsell-listings"],queryFn:()=>Pa({first:40}),staleTime:6e4}),{data:j}=fa(n),y=xa(),Y=oa(),{state:z}=ca(),[Qt,re]=I.useState(null),[Qe,ge]=I.useState(null),[Ut,_]=I.useState(!1),[B,O]=I.useState(null),Ue=I.useRef(0),[p,k]=I.useState(null),{data:me}=ya(n),{data:oe}=ba(!0),[Me,Ge]=I.useState(""),ce=I.useRef(null),He=va(i),Oe=t=>mt(He[t.id]),Te=i.filter(Oe),De=i.length>0&&Te.length===0,Gt=Te.reduce((t,s)=>t+s.priceCredits*s.quantity,0),Ht=i.reduce((t,s)=>t+s.quantity,0),Ot=Te.reduce((t,s)=>t+s.quantity,0),Ve=B?B.liveTotalCredits:Gt,Dt=new Set(i.map(t=>t.id)),Je=(($e==null?void 0:$e.items)??[]).filter(t=>!Dt.has(t.id)).slice(0,12),Vt=new Map(B==null?void 0:B.buyable.map(t=>[t.item.id,t])),fe=(j==null?void 0:j.credits)??0,Ie=Ve*10,Jt=oe?gt(Ie,oe):0n,Pe=_e({priceCents:Ie,priceManaWei:Jt,balanceCents:(j==null?void 0:j.balanceCents)??0,manaBalanceWei:me??0n}),Xt=t=>t.flatMap(s=>{const c=Fe(s);return c.kind==="store"?[c.mint]:[]}),Yt=t=>t.flatMap(s=>s.acquisition==="trade"?[s.trade]:[]),Zt=$a,ea=t=>Ta(t.contractAddress,String(t.itemId));function xe(t){t(),O(null),ge(null),re(null)}function ta(){k(null),_(!1)}function Xe(t){const s=Le(t),c=Math.max(0,s-fe),o=pe.find(d=>d.credits>=c)??pe[pe.length-1];Ge(o.id),D("Shop Buy Credits Prompted",{from:"cart_checkout",credits_needed:s,credits_balance:fe,shortfall:c}),k({phase:"nofunds",lines:t.map(d=>({item:d.item,priceCredits:d.priceCredits,quantity:d.quantity})),shortfall:c}),_(!1)}async function Ae(t){if(!n||t.length===0)return;const s=je(t),c=s.map(f=>({...f.item,priceCredits:f.priceCredits})),o=t.map(f=>({...f.item,priceCredits:f.priceCredits,quantity:f.quantity})),d=[];let v="authorize";const m=new Set,M=new Set,L=new Set,F=[];let w=!1;k({phase:"processing",stage:"reserving",step:1,total:s.length});try{const f=[];for(let h=0;h<s.length;h++){const g=s[h];k({phase:"processing",stage:"reserving",step:h+1,total:s.length});try{const $=g.acquisition==="trade"?g.trade.id:void 0,b=g.item.contractAddress&&g.item.itemId!=null?{contractAddress:g.item.contractAddress,itemId:String(g.item.itemId)}:void 0,{credit:q,maxCreditedValue:R}=await yt(n.identity,g.usdCents,$,b);d.push({salt:q.id,itemId:g.item.id}),f.push(g.acquisition==="store"?{kind:"store",item:{collection:g.item.contractAddress,itemId:String(g.item.itemId),priceWei:g.priceWei},credits:[q],maxCreditedValue:R,chainId:g.item.chainId}:{kind:"trade",trade:g.trade,credits:[q],maxCreditedValue:R})}catch($){if(Ls($)){if(d.length){try{await Re(n.identity,d.map(b=>b.salt))}catch(b){ae(b,{flow:"cart_checkout",step:"release"})}y.invalidateQueries({queryKey:["usd-balance"]})}Xe(t);return}throw $}}d.length&&y.invalidateQueries({queryKey:["usd-balance"]}),v="submit";const S=Ps(f).length,Q=h=>S>1?{current:h,total:S}:void 0,U=(h,g)=>k({phase:"processing",stage:h,step:s.length,total:s.length,signatures:Q(g)}),G=h=>h<S?U("awaiting-signature",h+1):U("settling",S);U("awaiting-signature",1);let T=[];if(ks())try{const h=new Map;T=await Es({purchases:f,buyer:n.address,signer:n.signer,onSigned:()=>G(S),onBroadcast:({txHash:b,salts:q})=>{h.set(b,q),q.forEach(R=>m.add(R))}});const g=await Promise.allSettled(T.map(b=>qs(b)));g.forEach((b,q)=>{const R=h.get(T[q])??[];b.status==="fulfilled"?(R.forEach(te=>M.add(te)),F.push(T[q])):b.reason instanceof Tt||R.forEach(te=>L.add(te))});const $=g.flatMap(b=>b.status==="rejected"?[b.reason]:[]);if($.length&&!$.some(b=>b instanceof Tt))throw $[0];w=!0}catch(h){if(!(h instanceof zs)||!Ia(n.providerType))throw h;T=await Be({purchases:f,buyer:n.address,signer:n.signer,onSigned:G,onBroadcast:({salts:g})=>g.forEach($=>m.add($)),onSettled:({txHash:g,salts:$})=>{$.forEach(b=>M.add(b)),F.push(g)},onReverted:({salts:g})=>g.forEach($=>L.add($))})}else T=await Be({purchases:f,buyer:n.address,signer:n.signer,onSigned:G,onBroadcast:({salts:h})=>h.forEach(g=>m.add(g)),onSettled:({txHash:h,salts:g})=>{g.forEach($=>M.add($)),F.push(h)},onReverted:({salts:h})=>h.forEach(g=>L.add(g))});t.forEach(h=>u(h.item.id)),O(null),D("Shop Completed Purchase",{...be(c),payment_type:"credits",no_crypto_step:w,transaction_hash:T[0]??null}),$t(y);const C=ce.current;ce.current=null,k(null),_(!1);const x={items:o,txHash:T[0]??void 0,txHashes:T,settled:!0,...C?{creditsAdded:C}:{}};Y("/success",{state:x,replace:!0})}catch(f){ve(f)||ae(f,{flow:"cart_checkout",step:v,cart_size:t.length});const S=new Set([...m].filter(x=>!L.has(x))),{toRelease:Q,boughtItemIds:U}=It({reservations:d,spent:S,settled:M}),G=[...S].some(x=>!M.has(x)),T=c.filter(x=>U.includes(x.id)),C=c.filter(x=>!U.includes(x.id));if(D(ve(f)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:v,error_code:bt(f),value_usd:ft(C.reduce((x,h)=>x+h.priceCredits,0)),cart_size:s.length,partial:T.length>0}),Q.length)try{await Re(n.identity,Q)}catch(x){ae(x,{flow:"cart_checkout",step:"release"})}if(y.invalidateQueries({queryKey:["usd-balance"]}),T.length>0){U.forEach(x=>u(x)),O(null),$t(y),D("Shop Completed Purchase",{...be(T),payment_type:"credits",no_crypto_step:w,transaction_hash:F[0]??null,partial:!0}),k({phase:"error",message:a("cart.error.partiallyBought"),heldCredits:G}),_(!1);return}k({phase:"error",message:G?void 0:We(f),heldCredits:G})}}function Ye(t,s){y.invalidateQueries({queryKey:["usd-balance"]}),y.invalidateQueries({queryKey:["detail-trade"]}),y.invalidateQueries({queryKey:["shop-item"]}),y.invalidateQueries({queryKey:["owned-token"]}),y.invalidateQueries({queryKey:["public-token"]}),y.invalidateQueries({queryKey:["item-resales"]}),y.invalidateQueries({queryKey:["shop-items"]}),y.invalidateQueries({queryKey:["catalog-items"]}),y.invalidateQueries({queryKey:["my-assets"]}),y.invalidateQueries({queryKey:["purchases"]}),y.invalidateQueries({queryKey:["owned-item-count"]}),y.invalidateQueries({queryKey:["overview-listings"]}),y.invalidateQueries({queryKey:["upsell-listings"]});const c=ce.current;ce.current=null,k(null),_(!1);const o={items:t,txHash:s[0]??void 0,txHashes:s,settled:!0,...c?{creditsAdded:c}:{}};Y("/success",{state:o,replace:!0})}function Ze(t,s){ve(t)||ae(t,{flow:s,step:"submit"}),D(ve(t)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:bt(t)}),k({phase:"error",message:We(t)}),_(!1)}async function aa(t,s,c){const o=vt(wt.MANAToken,s),d=vt(wt.CreditsManager,s);await Ts({auth:{kind:Is.Allowance,contractAddress:o.address,spenderAddress:d.address,chainId:s},signer:t,requiredWei:c})}async function et(){if(oe)return oe;try{return await y.fetchQuery({queryKey:["mana-rate",xt.chainId],queryFn:()=>Ma(xt.chainId),staleTime:6e4})}catch{return}}async function sa(t){const s=je(t).reduce((v,m)=>v+m.usdCents,0),o=(me??0n)>0n?await et():oe,d=o?gt(s,o):0n;return{totalCents:s,manaWei:d}}async function tt(t,s){const c=Le(t),{totalCents:o,manaWei:d}=await sa(t),v=_e({priceCents:o,priceManaWei:d,balanceCents:(j==null?void 0:j.balanceCents)??0,manaBalanceWei:me??0n});if(s&&v.options.some(m=>m.method===s)){if(s==="credits"){Ae(t);return}const m=it(v,s);await st(at(s,t),m,()=>s==="mana"?void rt(t,m):void ot(t,o,d));return}if(v.options.some(m=>m.method==="mana"||m.method==="combined")){k({phase:"choose",lines:t,totalCents:o,manaWei:d}),_(!1);return}if(j!=null&&j.credits<c){Xe(t);return}Ae(t)}function Ee(t){return _e({priceCents:t.totalCents,priceManaWei:t.manaWei,balanceCents:(j==null?void 0:j.balanceCents)??0,manaBalanceWei:me??0n})}const[le,ye]=I.useState(null);function at(t,s){const c=new Map;for(const o of s){const d=bs(t,Fe(o));c.set(`${d.chainId}:${d.spender.toLowerCase()}`,d)}return[...c.values()]}async function st(t,s,c){const o=[];for(const{spender:d,chainId:v}of t){const m=Ss(v,d),M=n?await $s(m,n.address,s).catch(()=>!0):!0;Ms(n==null?void 0:n.providerType,M)&&o.push(m)}if(o.length===0){c();return}_(!1),nt(o,0,c)}function nt(t,s,c){ye({auth:t[s],index:s+1,total:t.length,run:()=>s+1<t.length?nt(t,s+1,c):c()})}function it(t,s){var c;return((c=t.options.find(o=>o.method===s))==null?void 0:c.manaWei)??0n}function na(t){if((p==null?void 0:p.phase)!=="choose")return;const{lines:s,totalCents:c,manaWei:o}=p;if(t==="credits"){Ae(s);return}const d=it(Ee(p),t);st(at(t,s),d,()=>t==="mana"?void rt(s,d):void ot(s,c,o))}async function rt(t,s){if(!n||t.length===0)return;const c=je(t),o=c.map(m=>({...m.item,priceCredits:m.priceCredits})),d=t.map(m=>({...m.item,priceCredits:m.priceCredits,quantity:m.quantity})),v=()=>k({phase:"processing",stage:"settling",step:c.length,total:c.length});k({phase:"processing",stage:"awaiting-signature",step:c.length,total:c.length});try{const m=await vs({trades:Yt(c),mints:Xt(c),buyer:n.address,signer:n.signer,onSigned:v,manaWei:s});t.forEach(M=>u(M.item.id)),O(null),D("Shop Completed Purchase",{...be(o),payment_type:"mana",transaction_hash:m[0]??null}),y.invalidateQueries({queryKey:["mana-balance"]}),Ye(d,m)}catch(m){Ze(m,"buy_cart_mana")}}async function ot(t,s,c){if(!n||t.length===0)return;const o=je(t),d=o.map(w=>({...w.item,priceCredits:w.priceCredits})),v=t.map(w=>({...w.item,priceCredits:w.priceCredits,quantity:w.quantity})),m=ws(o.map(w=>w.usdCents),(j==null?void 0:j.balanceCents)??0),M=[],L=new Set,F=new Set;k({phase:"processing",stage:"reserving",step:1,total:o.length});try{const w=o.map(Fe),f=[],S=new Map,Q=new Map;for(let C=0;C<o.length;C++){const x=o[C],h=w[C],g=m[C],$=Cs(Math.max(0,x.usdCents-g),s,c);let b;if(g<=0)b=Mt(h,[],"0");else{k({phase:"processing",stage:"reserving",step:C+1,total:o.length});const R=x.item,{credit:te,maxCreditedValue:ra}=await yt(n.identity,g,h.kind==="trade"?h.trade.id:void 0,R.contractAddress&&R.itemId!=null?{contractAddress:R.contractAddress,itemId:String(R.itemId)}:void 0);M.push({salt:te.id,itemId:R.id}),b=Mt(h,[te],ra)}const q=As(b);S.set(q,(S.get(q)??0n)+$),Q.has(q)||Q.set(q,f.length),f.push(b)}M.length&&y.invalidateQueries({queryKey:["usd-balance"]});for(const[C,x]of S){const h=Q.get(C);h==null||x<=0n||(f[h]={...f[h],maxCreditedValue:(BigInt(f[h].maxCreditedValue)+x).toString()})}const U=[...S.values()].reduce((C,x)=>C+x,0n);await aa(n.signer,js(w[0]),U);const G=()=>k({phase:"processing",stage:"settling",step:o.length,total:o.length});k({phase:"processing",stage:"awaiting-signature",step:o.length,total:o.length});const T=await Be({purchases:f,buyer:n.address,signer:n.signer,onSigned:G,onBroadcast:({salts:C})=>C.forEach(x=>L.add(x)),onReverted:({salts:C})=>C.forEach(x=>F.add(x))});t.forEach(C=>u(C.item.id)),O(null),D("Shop Completed Purchase",{...be(d),payment_type:"credits_and_mana",transaction_hash:T[0]??null}),y.invalidateQueries({queryKey:["mana-balance"]}),Ye(v,T)}catch(w){const{toRelease:f}=It({reservations:M,spent:new Set([...L].filter(S=>!F.has(S))),settled:new Set});f.length&&Re(n.identity,f).catch(()=>{}),M.length&&y.invalidateQueries({queryKey:["usd-balance"]}),Ze(w,"buy_cart_combined")}}async function Z(t){if(!n){St({type:"cart-checkout"}),N();return}const s=H.getState().items.filter(Oe);if(s.length===0)return;re(null),ge(null),_(!0);const c=s.reduce((o,d)=>o+d.priceCredits*d.quantity,0);D("Shop Started Checkout",{checkout_source:"cart",cart_size:s.length,cart_value_credits:c,cart_value_usd:ft(c),has_sufficient_credits:fe>=c});try{const o=await Bs(s,n.address,Zt,await et(),ea),d=[...o.unavailable,...o.own];if(d.length&&(d.forEach(v=>u(v.id)),ge(Qn(o))),o.buyable.length===0){re(a("cart.error.noneAvailable")),O(null);return}if(o.orderChanged){O(o),Ue.current=Date.now();return}await tt(o.buyable,t)}catch(o){ae(o,{flow:"cart_checkout",step:"review",cart_size:s.length}),re(We(o))}finally{_(!1)}}async function ct(){if(B){if(!n){St({type:"cart-checkout"}),N();return}if(Date.now()-Ue.current>Nn){O(null),ge(null),await Z();return}re(null),tt(B.buyable)}}async function ia(){if(Me){try{sessionStorage.setItem(we,JSON.stringify(H.getState().items))}catch{}_(!0);try{const t=await Fs(Me,n?{address:n.address,identity:n.identity}:void 0);if(t.url){window.location.href=t.url;return}Y("/credits")}catch(t){try{sessionStorage.removeItem(we)}catch{}ae(t,{flow:"cart_buy_credits"}),k({phase:"error",message:a("buyModal.error.creditsCheckout")})}finally{_(!1)}}}const lt=I.useRef(!1);I.useEffect(()=>{if(!n||lt.current||!ms("cart-checkout"))return;lt.current=!0;const t=setTimeout(()=>void Z(),0);return()=>clearTimeout(t)},[n]);const dt=I.useRef(!1);I.useEffect(()=>{if(!(z!=null&&z.resumeCheckout)||dt.current)return;dt.current=!0,ce.current=z.creditsAdded??null;try{const s=sessionStorage.getItem(we);if(s){sessionStorage.removeItem(we);const c=JSON.parse(s);Array.isArray(c)&&c.length&&J(c)}}catch{}y.invalidateQueries({queryKey:["usd-balance"]});const t=setTimeout(()=>void Z(),0);return()=>clearTimeout(t)},[z==null?void 0:z.resumeCheckout]);const ut=I.useRef(!1);I.useEffect(()=>{if(!(z!=null&&z.startCheckout)||ut.current)return;ut.current=!0,Y(".",{replace:!0,state:null});const t=setTimeout(()=>void Z(),0);return()=>clearTimeout(t)},[z==null?void 0:z.startCheckout]);const ee=Ut||(p==null?void 0:p.phase)==="processing";return i.length===0&&!p?e.jsx(Pt,{children:e.jsxs(Et,{children:[e.jsxs(At,{onClick:()=>Y(-1),type:"button",children:[e.jsx(V,{name:"arrow-left"}),a("nav.cart")]}),e.jsx(sn,{children:e.jsx(wa,{variant:"light",testId:"cart-empty",icon:Ca,title:a("cart.empty.title"),body:a("cart.empty.body"),cta:{label:a("cart.empty.cta"),to:"/items"}})})]})}):e.jsxs(Pt,{children:[e.jsxs(Et,{children:[e.jsxs(At,{onClick:()=>Y(-1),type:"button",children:[e.jsx(V,{name:"arrow-left"}),a("nav.cart")]}),e.jsxs(Zs,{children:[e.jsxs(en,{children:[e.jsxs(tn,{children:[e.jsx(nn,{onClick:()=>Y(-1),type:"button","aria-label":a("cart.goBack"),children:e.jsx(V,{name:"arrow-left"})}),e.jsx(rn,{children:a("cart.panelTitle",{count:Ht})}),Nt?e.jsxs(on,{onClick:()=>X(!0),disabled:ee,children:[e.jsx(V,{name:"fitting-room"}),a("cart.fittingRoom")]}):null]}),e.jsxs(an,{children:[e.jsx(cn,{children:i.map(t=>{const s=Vt.get(t.id),c=s?s.priceCredits:t.priceCredits,o=!!s&&s.priceCredits!==t.priceCredits,d=!t.tokenId,v=t.quantity,m=typeof t.available=="number"&&v>=t.available,M=c*v,L=ja(t),F=!!L&&!!K[L],w=ka(t),f=He[t.id],S=!mt(f),Q=f==="sold-out"?a("cart.availability.soldOut"):a("cart.availability.unavailable");return e.jsxs(ln,{"data-unavailable":S||void 0,children:[e.jsxs(dn,{"data-thumb":!0,children:[w?e.jsx(un,{to:w,state:{item:t,tradeId:t.tradeId},"aria-label":t.name,children:t.thumbnail?e.jsx("img",{src:t.thumbnail,alt:t.name}):null}):t.thumbnail?e.jsx("img",{src:t.thumbnail,alt:t.name}):null,e.jsx(hn,{"data-check":!0,"aria-hidden":!0,children:e.jsx("svg",{viewBox:"0 0 20 20",width:"12",height:"12",children:e.jsx("path",{d:"M5 10.5l3 3 7-7.5",fill:"none",stroke:"#fff",strokeWidth:"2.4",strokeLinecap:"round",strokeLinejoin:"round"})})})]}),e.jsxs(pn,{children:[e.jsxs(gn,{"data-desc":!0,children:[w?e.jsx(fn,{to:w,state:{item:t,tradeId:t.tradeId},title:t.name,children:t.name}):e.jsx(mn,{title:t.name,children:t.name}),t.creator?e.jsx(xn,{address:t.creator,linkToProfile:!0}):null,Kt&&d?e.jsxs(Mn,{"data-testid":"cart-creator-tag",children:[e.jsx(Tn,{name:"buy-from-creator"}),a("cart.creatorTag")]}):null]}),e.jsx(yn,{children:S?e.jsxs(Sn,{children:[e.jsx($n,{name:"warning-fill",size:24}),Q]}):e.jsxs(e.Fragment,{children:[d?e.jsxs(bn,{children:[e.jsx(qt,{onClick:()=>xe(()=>E(t.id)),disabled:ee||v<=1,"aria-label":a("cart.decreaseQuantity",{name:t.name}),children:e.jsx("svg",{viewBox:"0 0 16 16",fill:"none","aria-hidden":!0,focusable:"false",children:e.jsx("path",{d:"M3.5 8h9",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})}),e.jsx(vn,{children:v}),e.jsx(qt,{onClick:()=>xe(()=>P(t.id)),disabled:ee||m,"aria-label":a("cart.increaseQuantity"),children:e.jsx("svg",{viewBox:"0 0 16 16",fill:"none","aria-hidden":!0,focusable:"false",children:e.jsx("path",{d:"M8 3.5v9M3.5 8h9",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})})]}):null,e.jsxs(wn,{children:[e.jsx(Cn,{})," ",e.jsx(ze,{credits:M}),o?e.jsx(jn,{children:e.jsx(ze,{credits:t.priceCredits*v})}):null]})]})})]}),e.jsxs(kn,{children:[L?e.jsx(In,{"data-on":F||void 0,onClick:()=>ie(t),"aria-label":F?a("cart.removeFromFavorites",{name:t.name}):a("cart.addToFavorites",{name:t.name}),title:F?a("assetCard.removeFromFavorites"):a("assetCard.addToFavorites"),children:e.jsx(V,{name:F?"heart-solid":"heart"})}):null,e.jsx(Pn,{onClick:()=>xe(()=>u(t.id)),disabled:ee,"aria-label":a("cart.remove",{name:t.name}),title:a("cart.removeTitle"),children:e.jsx(V,{name:"trash",size:24})})]})]},t.id)})}),e.jsx(An,{children:e.jsx("button",{className:"link",onClick:()=>xe(W),disabled:ee,children:a("cart.clearCart")})})]})]}),e.jsxs(En,{children:[e.jsx(qn,{children:a("cart.purchaseSummary")}),e.jsxs(zn,{children:[e.jsxs(Rn,{children:[e.jsx(_n,{children:a("cart.totalItems",{count:Ot})}),e.jsx(Fn,{children:e.jsxs(Bn,{children:[e.jsx(Wn,{})," ",e.jsx(ze,{credits:Ve})]})})]}),e.jsx(_t,{options:Pe.options,totalCents:Ie,shortfall:Pe.manaShortfall,showCreditsAmount:!1,creditsLabel:B?a("marketCheckout.confirmPurchase"):Pe.options.length>1?a("cart.buyWithCredits"):a("cart.checkout"),busy:ee||De,onPay:t=>void(B?ct():Z(t)),creditsFallback:{label:ee?a("cart.working"):B?a("marketCheckout.confirmPurchase"):a("cart.checkout"),onClick:()=>void(B?ct():Z())}}),De?e.jsx(Ce,{className:"muted",children:a("cart.allUnavailable")}):null,n?null:e.jsx(Ce,{className:"muted",children:a("cart.signInHint")}),B?e.jsx(Ce,{className:"muted",children:a("cart.priceChanged")}):null,Qe?e.jsx(Ce,{className:"muted",children:Qe}):null,e.jsx(Ln,{message:Qt})]})]})]})]}),Je.length>0?e.jsx(Kn,{children:e.jsx(fs,{title:a("cart.youMightAlsoLike"),items:Je})}):null,le&&n?e.jsx(xs,{auth:le.auth,signer:n.signer,step:{index:le.index,total:le.total},title:a("authorizeStep.manaTitle"),name:a("authorizeStep.manaName"),reason:a("authorizeStep.manaReason"),icon:e.jsx("img",{src:ys,width:24,height:24,alt:"","aria-hidden":!0}),onAuthorized:()=>{const{run:t}=le;ye(null),t()},onCancel:()=>ye(null),onClose:()=>ye(null)}):null,p?e.jsx(Vs,{phase:p.phase,balanceCredits:fe,heldCreditsCount:((ht=j==null?void 0:j.held)==null?void 0:ht.credits)??null,onClose:ta,stage:p.phase==="processing"?p.stage:void 0,step:p.phase==="processing"?p.step:void 0,total:p.phase==="processing"?p.total:void 0,isSelfCustody:Sa(n==null?void 0:n.providerType),signatures:p.phase==="processing"?p.signatures:void 0,options:p.phase==="choose"?Ee(p).options:void 0,shortfall:p.phase==="choose"?Ee(p).manaShortfall:void 0,onPay:na,totalCents:p.phase==="choose"?p.totalCents:void 0,totalManaWei:p.phase==="choose"?p.manaWei:void 0,totalCredits:p.phase==="choose"?Le(p.lines):void 0,lines:p.phase==="nofunds"?p.lines:void 0,shortfallCredits:p.phase==="nofunds"?p.shortfall:void 0,packs:pe,selectedPack:Me,onSelectPack:Ge,onBuyPacks:()=>void ia(),message:p.phase==="error"?p.message:void 0,heldCredits:p.phase==="error"&&!!p.heldCredits,onRetry:()=>void Z()}):null]})}export{ni as Cart};
|
|
645
|
-
//# sourceMappingURL=Cart-
|
|
645
|
+
//# sourceMappingURL=Cart-BGUrce5E.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{H as R,J as j,K as o,L as c,A as _,m as $}from"./index-
|
|
1
|
+
import{H as R,J as j,K as o,L as c,A as _,m as $}from"./index-C6i7o4u4.js";import{r as N,j as h}from"./react-SYhE92K6.js";import{g as E,a as U,c as z,b as K}from"./clsx-BEtG4eYu.js";import{s as y}from"./styled-DrFcx2PN.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new r.Error().stack;e&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[e]="14e4f101-fa19-49c3-9ff4-e91b8cbd61dd",r._sentryDebugIdIdentifier="sentry-dbid-14e4f101-fa19-49c3-9ff4-e91b8cbd61dd")}catch{}})();function F(r){return E("MuiCircularProgress",r)}U("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const L=["className","color","disableShrink","size","style","thickness","value","variant"];let l=r=>r,C,P,D,S;const t=44,W=$(C||(C=l`
|
|
2
2
|
0% {
|
|
3
3
|
transform: rotate(0deg);
|
|
4
4
|
}
|
|
@@ -26,4 +26,4 @@ import{H as R,J as j,K as o,L as c,A as _,m as $}from"./index-LDPyoGDo.js";impor
|
|
|
26
26
|
`),W)),H=y("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(r,e)=>e.svg})({display:"block"}),J=y("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(r,e)=>{const{ownerState:s}=r;return[e.circle,e[`circle${c(s.variant)}`],s.disableShrink&&e.circleDisableShrink]}})(({ownerState:r,theme:e})=>o({stroke:"currentColor"},r.variant==="determinate"&&{transition:e.transitions.create("stroke-dashoffset")},r.variant==="indeterminate"&&{strokeDasharray:"80px, 200px",strokeDashoffset:0}),({ownerState:r})=>r.variant==="indeterminate"&&!r.disableShrink&&_(S||(S=l`
|
|
27
27
|
animation: ${0} 1.4s ease-in-out infinite;
|
|
28
28
|
`),A)),Q=N.forwardRef(function(e,s){const a=R({props:e,name:"MuiCircularProgress"}),{className:d,color:f="primary",disableShrink:w=!1,size:u=40,style:I,thickness:i=3.6,value:m=0,variant:v="indeterminate"}=a,M=j(a,L),n=o({},a,{color:f,disableShrink:w,size:u,thickness:i,value:m,variant:v}),p=B(n),g={},k={},x={};if(v==="determinate"){const b=2*Math.PI*((t-i)/2);g.strokeDasharray=b.toFixed(3),x["aria-valuenow"]=Math.round(m),g.strokeDashoffset=`${((100-m)/100*b).toFixed(3)}px`,k.transform="rotate(-90deg)"}return h.jsx(G,o({className:z(p.root,d),style:o({width:u,height:u},k,I),ownerState:n,ref:s,role:"progressbar"},x,M,{children:h.jsx(H,{className:p.svg,ownerState:n,viewBox:`${t/2} ${t/2} ${t} ${t}`,children:h.jsx(J,{className:p.circle,style:g,ownerState:n,cx:t,cy:t,r:(t-i)/2,fill:"none",strokeWidth:i})})}))});export{Q as C};
|
|
29
|
-
//# sourceMappingURL=CircularProgress-
|
|
29
|
+
//# sourceMappingURL=CircularProgress-DO_ZwmA1.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{j as e,r as h,d as te,b as oe}from"./react-
|
|
1
|
+
import{j as e,r as h,d as te,b as oe}from"./react-SYhE92K6.js";import{t as b,s as u,h as se,I as re,m as ae,b as r,a0 as q,v as F,bL as ie,bM as ne,c as le,l as ce,n as de,at as ue,P as me,S as W,Q as pe,bN as fe,b_ as he}from"./index-C6i7o4u4.js";import{E as xe}from"./ErrorNotice-BbDJ7oSM.js";import{d as be,P as ge,C as ye,a as E,b as ve,S as je}from"./collectionPage.styles-CMg9-nBi.js";import{u as we}from"./useStore-Cxw9Sr5l.js";import{u as Ce,t as G,R as ke,j as Se,k as $e,l as Ne,m as Ee,n as Me,o as Fe,p as Ie,v as _e,q as Re,r as Te,M as Ae,s as Pe}from"./browseLayout.styles-B8_UmpYi.js";import{L as De}from"./LoadMore-DWB-tGRB.js";import{u as Le}from"./useInfiniteGrid-9swTZj8O.js";import{u as Be,s as ze}from"./search-empty-BJh8_Eyt.js";import{S as Oe}from"./categories-CUsrLJsQ.js";import{G as We}from"./grid.styles-B7j4ZE-1.js";import"./dcl-schemas-D-HY5c5S.js";import"./sentry-flvYKJxM.js";import"./ethers-D5UuIc_H.js";import"./intl-AKLEHPeO.js";import"./skeleton.styles-Dv2nMvXK.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},o=new s.Error().stack;o&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[o]="c25418ca-7c82-4c8a-8531-1133c6f863a0",s._sentryDebugIdIdentifier="sentry-dbid-c25418ca-7c82-4c8a-8531-1133c6f863a0")}catch{}})();const Ge=u.section`
|
|
2
2
|
position: relative;
|
|
3
|
-
border-radius: ${
|
|
3
|
+
border-radius: ${b.radius.card};
|
|
4
4
|
overflow: hidden;
|
|
5
5
|
margin-bottom: 24px;
|
|
6
6
|
min-height: 200px;
|
|
@@ -8,7 +8,7 @@ import{j as e,r as h,d as te,b as oe}from"./react-G9L2um0r.js";import{t as x,s a
|
|
|
8
8
|
align-items: center;
|
|
9
9
|
justify-content: center;
|
|
10
10
|
|
|
11
|
-
${
|
|
11
|
+
${b.media.maxWidth("mobile")} {
|
|
12
12
|
min-height: 140px;
|
|
13
13
|
}
|
|
14
14
|
`,Ue=u.div`
|
|
@@ -20,17 +20,17 @@ import{j as e,r as h,d as te,b as oe}from"./react-G9L2um0r.js";import{t as x,s a
|
|
|
20
20
|
height: 100%;
|
|
21
21
|
object-fit: cover;
|
|
22
22
|
display: block;
|
|
23
|
-
`,
|
|
23
|
+
`,He=u.div`
|
|
24
24
|
position: absolute;
|
|
25
25
|
inset: 0;
|
|
26
26
|
background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0.55) 100%);
|
|
27
|
-
`,
|
|
27
|
+
`,Ke=u.h1`
|
|
28
28
|
position: relative;
|
|
29
29
|
z-index: 1;
|
|
30
30
|
margin: 0;
|
|
31
31
|
padding: 32px 24px;
|
|
32
32
|
text-align: center;
|
|
33
|
-
color: ${
|
|
33
|
+
color: ${b.colors.white};
|
|
34
34
|
font-size: 40px;
|
|
35
35
|
font-weight: 800;
|
|
36
36
|
line-height: 1.2;
|
|
@@ -38,11 +38,11 @@ import{j as e,r as h,d as te,b as oe}from"./react-G9L2um0r.js";import{t as x,s a
|
|
|
38
38
|
text-transform: uppercase;
|
|
39
39
|
text-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
|
|
40
40
|
|
|
41
|
-
${
|
|
41
|
+
${b.media.maxWidth("mobile")} {
|
|
42
42
|
padding: 24px 16px;
|
|
43
43
|
font-size: 26px;
|
|
44
44
|
}
|
|
45
|
-
`;function Qe({name:s,creator:o}){const{data:i}=we(o),l=(i==null?void 0:i.cover)||
|
|
45
|
+
`;function Qe({name:s,creator:o}){const{data:i}=we(o),l=(i==null?void 0:i.cover)||be;return e.jsxs(Ge,{"data-testid":"collection-hero","aria-label":s,children:[e.jsxs(Ue,{children:[e.jsx(qe,{src:l,alt:"",loading:"eager"}),e.jsx(He,{"aria-hidden":!0})]}),e.jsx(Ke,{"data-testid":"collection-hero-title",children:s})]})}const Ve=1500;function Ze(s){const[o,i]=h.useState(!1),l=h.useRef();h.useEffect(()=>()=>window.clearTimeout(l.current),[]);const a=h.useCallback(async m=>{try{await navigator.clipboard.writeText(m),i(!0),window.clearTimeout(l.current),l.current=window.setTimeout(()=>i(!1),Ve)}catch(d){se(d,{flow:s})}},[s]);return{copied:o,copy:a}}const{colors:M,radius:Je}=b,Xe=ae`
|
|
46
46
|
0% { transform: scale(0.6); opacity: 0; }
|
|
47
47
|
60% { transform: scale(1.15); }
|
|
48
48
|
100% { transform: scale(1); opacity: 1; }
|
|
@@ -77,7 +77,7 @@ import{j as e,r as h,d as te,b as oe}from"./react-G9L2um0r.js";import{t as x,s a
|
|
|
77
77
|
@media (prefers-reduced-motion: reduce) {
|
|
78
78
|
animation: none;
|
|
79
79
|
}
|
|
80
|
-
`;function tt({value:s,children:o,label:i,flow:l="copy_to_clipboard",size:a=16,className:m,testId:d}){const{copied:n,copy:
|
|
80
|
+
`;function tt({value:s,children:o,label:i,flow:l="copy_to_clipboard",size:a=16,className:m,testId:d}){const{copied:n,copy:x}=Ze(l),f=n?r("common.copied"):i??r("common.copy");return e.jsxs(Ye,{type:"button",onClick:()=>void x(s),title:f,"aria-label":f,"data-copied":n||void 0,className:m,"data-testid":d,children:[o,e.jsx(et,{name:n?"check":"copy",size:a},n?"ok":"idle")]})}const{colors:j,radius:ot}=b,st=u.div`
|
|
81
81
|
display: flex;
|
|
82
82
|
flex-direction: column;
|
|
83
83
|
align-items: center;
|
|
@@ -130,5 +130,5 @@ import{j as e,r as h,d as te,b as oe}from"./react-G9L2um0r.js";import{t as x,s a
|
|
|
130
130
|
&:hover {
|
|
131
131
|
background: ${j.blackBtn};
|
|
132
132
|
}
|
|
133
|
-
`;function it({address:s}){var d,n;const{data:o}=q(s);if(!s)return null;const i=(o==null?void 0:o.name)||F(s),l=(n=(d=o==null?void 0:o.avatar)==null?void 0:d.snapshots)==null?void 0:n.face256,a=`${le.profileUrl}/${s}`,m=ie(ne({name:o==null?void 0:o.name,hasClaimedName:o==null?void 0:o.hasClaimedName,ethAddress:(o==null?void 0:o.ethAddress)??s}));return e.jsxs(st,{"data-testid":"creator-card",children:[l?e.jsx(U,{src:l,alt:"",loading:"eager",style:{backgroundColor:m}}):e.jsx(U,{as:"span","aria-hidden":!0,style:{backgroundColor:m}}),e.jsx(rt,{title:i,children:i}),e.jsx(tt,{value:s,label:r("collection.copyAddress"),flow:"copy_creator_address",testId:"creator-card-copy",children:e.jsx("span",{children:F(s)})}),e.jsx(at,{"data-testid":"creator-card-view",href:a,target:"_blank",rel:"noopener noreferrer",children:r("collection.viewProfile")})]})}const nt=48,lt=["all","on_sale","not_for_sale"];function St(){var O;const{contractAddress:s}=te(),o=oe(),i=h.useMemo(()=>({category:"all",status:"all",subCategory:null,rarities:[],priceMin:"",priceMax:"",smart:!1,sort:"newest"}),[]),[l,a]=Be(i),{category:m,subCategory:d,rarities:n,priceMin:
|
|
134
|
-
//# sourceMappingURL=Collection-
|
|
133
|
+
`;function it({address:s}){var d,n;const{data:o}=q(s);if(!s)return null;const i=(o==null?void 0:o.name)||F(s),l=(n=(d=o==null?void 0:o.avatar)==null?void 0:d.snapshots)==null?void 0:n.face256,a=`${le.profileUrl}/${s}`,m=ie(ne({name:o==null?void 0:o.name,hasClaimedName:o==null?void 0:o.hasClaimedName,ethAddress:(o==null?void 0:o.ethAddress)??s}));return e.jsxs(st,{"data-testid":"creator-card",children:[l?e.jsx(U,{src:l,alt:"",loading:"eager",style:{backgroundColor:m}}):e.jsx(U,{as:"span","aria-hidden":!0,style:{backgroundColor:m}}),e.jsx(rt,{title:i,children:i}),e.jsx(tt,{value:s,label:r("collection.copyAddress"),flow:"copy_creator_address",testId:"creator-card-copy",children:e.jsx("span",{children:F(s)})}),e.jsx(at,{"data-testid":"creator-card-view",href:a,target:"_blank",rel:"noopener noreferrer",children:r("collection.viewProfile")})]})}const nt=48,lt=["all","on_sale","not_for_sale"];function St(){var O;const{contractAddress:s}=te(),o=oe(),i=h.useMemo(()=>({category:"all",status:"all",subCategory:null,rarities:[],priceMin:"",priceMax:"",smart:!1,sort:"newest"}),[]),[l,a]=Be(i),{category:m,subCategory:d,rarities:n,priceMin:x,priceMax:f,smart:C,sort:I}=l,g=lt.includes(l.status)?l.status:"all",_=t=>a({status:t});Ce(`${m}:${d??""}`);const[w,y]=h.useState(!1);h.useEffect(()=>{if(!w)return;const t=ee=>{ee.key==="Escape"&&y(!1)};document.addEventListener("keydown",t);const N=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",t),document.body.style.overflow=N}},[w]);const R=x&&!Number.isNaN(Number(x))?Number(x):void 0,T=f&&!Number.isNaN(Number(f))?Number(f):void 0,H=d?Oe[d]:void 0,K=(G.find(t=>t.key===I)??G[0]).server,A={contractAddress:s,category:m,rarities:n.length?n:void 0,wearableCategories:H,minPriceCredits:R,maxPriceCredits:T,isWearableSmart:C||void 0,isOnSale:g==="all"?void 0:g==="on_sale",sortBy:K},{items:k,total:Q,isLoading:S,error:P,hasNextPage:V,isFetchingNextPage:D,isFetchNextPageError:Z,fetchNextPage:J}=Le(["collection-page",A],t=>fe({...A,first:nt,skip:t}),{enabled:!!s}),{data:c}=ce({queryKey:["collection-meta",s],queryFn:()=>he(s),enabled:!!s,staleTime:5*6e4}),L=(c==null?void 0:c.name)||r("collection.fallbackTitle");de({title:c==null?void 0:c.name,description:c!=null&&c.name?r("seo.collection.description",{name:c.name}):void 0});const p=(c==null?void 0:c.creator)||((O=k[0])==null?void 0:O.creator),{data:$}=q(p),X=($==null?void 0:$.name)||(p?F(p):"");function Y(t){a({category:t,subCategory:null})}function B(t){a({rarities:n.includes(t)?n.filter(N=>N!==t):[...n,t]})}function z(){a(i)}const v=[];(R!=null||T!=null)&&v.push({key:"price",label:r("filter.price"),onRemove:()=>{a({priceMin:"",priceMax:""})}});for(const t of ke)n.includes(t)&&v.push({key:`rarity-${t}`,label:ue(t),onRemove:()=>B(t)});return C&&v.push({key:"smart",label:r("filter.smart"),onRemove:()=>a({smart:!1})}),g!=="all"&&v.push({key:"status",label:g==="on_sale"?r("filter.onSale"):r("filter.notForSale"),onRemove:()=>_("all")}),e.jsxs(ge,{"data-testid":"collection-page",children:[e.jsxs(ye,{"aria-label":r("collection.breadcrumbAria"),children:[e.jsx(E,{onClick:()=>o("/items"),children:r("collection.breadcrumb")}),p?e.jsxs(e.Fragment,{children:[e.jsx("span",{children:"/"}),e.jsx(E,{onClick:()=>o(`/items/creator/${p}`),children:X}),e.jsx("span",{children:"/"}),e.jsx(E,{onClick:()=>o(`/items/creator/${p}?collections`),children:r("categories.collections")})]}):null,e.jsx("span",{children:"/"}),e.jsx(ve,{children:L})]}),e.jsx(Qe,{name:L,creator:p}),e.jsxs(Se,{"data-testid":"browse",children:[w?e.jsx($e,{onClick:()=>y(!1),"aria-hidden":!0}):null,e.jsxs(je,{children:[e.jsx(it,{address:p}),e.jsxs(Ne,{"data-open":w||void 0,"data-static":!0,"data-testid":"browse-sidebar",children:[e.jsxs(Ee,{children:[e.jsx(Me,{children:r("assets.filters")}),e.jsx(Fe,{onClick:()=>y(!1),"aria-label":r("assets.closeFilters"),children:"✕"})]}),e.jsx(Ie,{children:e.jsx(_e,{category:m,subCategory:d,onCategory:Y,onSub:t=>a({subCategory:t}),priceMin:x,priceMax:f,onPriceMin:t=>a({priceMin:t}),onPriceMax:t=>a({priceMax:t}),rarities:n,onToggleRarity:B,status:g,onStatus:_,smart:C,onSmart:t=>a({smart:t}),hideNames:!0})}),e.jsx(Re,{children:e.jsx(Te,{type:"button",onClick:()=>y(!1),children:r("assets.showItems")})})]})]}),e.jsxs(Ae,{children:[e.jsx(Pe,{sort:I,onSort:t=>a({sort:t}),total:Q,loading:S,onOpenFilters:()=>y(!0),chips:v,onClearChips:z}),P?e.jsx(xe,{message:r("collection.error")}):null,!S&&!P&&k.length===0?e.jsx(me,{testId:"collection-empty",icon:ze,title:r("assets.empty.title"),body:r("collection.empty"),cta:{label:r("filterBar.clearAll"),onClick:z}}):e.jsxs(e.Fragment,{children:[e.jsx(We,{"data-testid":"grid",children:S?e.jsx(W,{count:15}):e.jsxs(e.Fragment,{children:[k.map(t=>e.jsx(pe,{item:t},t.id)),D?e.jsx(W,{count:6}):null]})}),e.jsx(De,{hasNextPage:V,isFetching:D,isError:Z,onLoadMore:()=>void J()})]})]})]})]})}export{St as Collection,St as default};
|
|
134
|
+
//# sourceMappingURL=Collection-CHpDQHJq.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as n,r as k}from"./react-
|
|
1
|
+
import{j as n,r as k}from"./react-SYhE92K6.js";import{s as a,t as o,b as y,q as M,E as O,c2 as $,m as ce,I as K,h as S,aY as le,bP as pe,g as j,f as C,b1 as Q,$ as U,ap as he,ct as ue,cu as R,Q as ge}from"./index-C6i7o4u4.js";import{s as xe,i as P,A as V,g as W,r as Z,m as G,k as J,l as Y}from"./authorizations-DkRdd-1d.js";import{i as fe}from"./errors-gm41DtjH.js";import{E as me}from"./ErrorNotice-BbDJ7oSM.js";import{k as be,l as we,m as _,n as ye,o as ve}from"./buy-B_nE_K_L.js";import{s as ee,M as te,E as ae}from"./sendMetaTransaction-CXtHI3NS.js";import{I as ke,C as ne}from"./ethers-D5UuIc_H.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="818ace5c-b220-4f75-9f95-f24d4cb756dd",t._sentryDebugIdIdentifier="sentry-dbid-818ace5c-b220-4f75-9f95-f24d4cb756dd")}catch{}})();const N="shop:resume_after_signin",je=900*1e3;function ft(t){try{sessionStorage.setItem(N,JSON.stringify({...t,at:Date.now()}))}catch{}}function mt(t){let e;try{e=sessionStorage.getItem(N)}catch{return null}if(!e)return null;try{sessionStorage.removeItem(N)}catch{}let i;try{i=JSON.parse(e)}catch{return null}return!i||i.type!==t||typeof i.at!="number"||Date.now()-i.at>je?null:i.type==="cart-checkout"?{type:"cart-checkout"}:{type:"item-buy",path:i.path}}const I="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Group%201'%3e%3cpath%20id='Vector'%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M12%202L22%2012L12%2022L2%2012L12%202ZM12%204.8L19.2%2012L12%2019.2L4.8%2012L12%204.8ZM12%2015.6C12.9548%2015.6001%2013.8705%2015.2209%2014.5457%2014.5459C15.2209%2013.8708%2015.6003%2012.9552%2015.6004%2012.0004C15.6005%2011.0456%2015.2213%2010.1299%2014.5463%209.45471C13.8712%208.7795%2012.9556%208.40011%2012.0008%208.4C11.0461%208.4%2010.1304%208.77928%209.45525%209.45442C8.78012%2010.1295%208.40083%2011.0452%208.40083%2012C8.40083%2012.9548%208.78012%2013.8705%209.45525%2014.5456C10.1304%2015.2207%2011.0461%2015.6%2012.0008%2015.6H12Z'%20fill='white'/%3e%3cg%20id='Rectangle%201'%3e%3c/g%3e%3c/g%3e%3c/svg%3e",Ce=a.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
gap: 12px;
|
|
@@ -287,7 +287,7 @@ import{j as n,r as k}from"./react-G9L2um0r.js";import{s as a,t as o,b as y,q as
|
|
|
287
287
|
@media (prefers-reduced-motion: reduce) {
|
|
288
288
|
animation: none;
|
|
289
289
|
}
|
|
290
|
-
`;function yt({auth:t,signer:e,step:i,title:r,reason:d,name:c,image:m,icon:g,onAuthorized:w,onCancel:u,onClose:x}){const[f,p]=k.useState(!1),[l,v]=k.useState(null);async function b(){p(!0),v(null);try{await xe({auth:t,signer:e,active:!0}),w()}catch(h){fe(h)?v(y("authorizeStep.errorRejected")):(S(h,{flow:"authorize_step",kind:t.kind}),v(y("authorizeStep.errorGeneric"))),p(!1)}}return n.jsx(Te,{onClick:f?void 0:x,role:"presentation","data-testid":"authorize-step-scrim",children:n.jsxs($e,{onClick:h=>h.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":r,children:[n.jsxs(Ie,{children:[n.jsx(Ee,{children:r}),i&&i.total>1?n.jsx(Ne,{"data-testid":"authorize-step-count",children:y("authorizeStep.stepOf",{index:i.index,total:i.total})}):null,n.jsx(Be,{onClick:x,disabled:f,"aria-label":y("authorizeStep.close"),children:n.jsx(K,{name:"close",className:"ico"})})]}),n.jsxs(Se,{"data-testid":"authorize-step-row",children:[n.jsx(Pe,{children:m?n.jsx("img",{src:m,alt:""}):g}),n.jsxs(Ve,{children:[n.jsx(Fe,{title:c,children:c}),n.jsx(Le,{children:d})]})]}),n.jsx(qe,{children:y("authorizeStep.note")}),n.jsx(me,{message:l}),n.jsxs(De,{children:[n.jsx(Oe,{type:"button",onClick:u,disabled:f,children:y("authorizeStep.cancel")}),n.jsx(Re,{type:"button","data-testid":"authorize-step-action",onClick:()=>void b(),disabled:f,children:f?n.jsxs(n.Fragment,{children:[n.jsx(He,{"aria-hidden":!0}),y("authorizeStep.authorizing")]}):y("authorizeStep.authorize")})]})]})})}const vt="data:image/webp;base64,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",kt="https://cdn.decentraland.org/@dcl/shop/1.9.2-32490364182.commit-e2e4c6b/_assets/buy-error-22UunaPC.png";function Xe(t,e){return(t+e-1n)/e}function Ke(t,e,i){return t<=0||e<=0?0n:t>=e?i:Xe(i*BigInt(t),BigInt(e))}function jt(t){var u,x,f;const e=Number.isFinite(t.priceCents)?Math.max(0,Math.trunc(t.priceCents)):0,i=Number.isFinite(t.balanceCents)?Math.max(0,Math.trunc(t.balanceCents)):0,r=t.priceManaWei>0n?t.priceManaWei:0n,d=t.manaBalanceWei>0n?t.manaBalanceWei:0n;if(e<=0)return{options:[],preferred:null,manaShortfall:null};const c=[];if(i>=e&&c.push({method:"credits",creditsCents:e,credits:le(e),manaWei:0n}),r>0n&&i>0&&i<e){const p=e-i,l=Ke(p,e,r);d>=l&&c.push({method:"combined",creditsCents:i,credits:pe(i),manaWei:l})}r>0n&&d>=r&&c.push({method:"mana",creditsCents:0,credits:0,manaWei:r});const m=((u=c.find(p=>p.method==="credits"))==null?void 0:u.method)??((x=c.find(p=>p.method==="combined"))==null?void 0:x.method)??((f=c.find(p=>p.method==="mana"))==null?void 0:f.method)??null,w=!c.some(p=>p.method==="mana"||p.method==="combined")&&r>0n&&d>0n?{manaWei:d,manaCents:Qe(d,e,r),priceCents:e}:null;return{options:c,preferred:m,manaShortfall:w}}function Qe(t,e,i){return Number(t*BigInt(e)/i)}function Ct(t,e){let i=Number.isFinite(e)?Math.max(0,Math.trunc(e)):0;return t.map(r=>{const d=Number.isFinite(r)?Math.max(0,Math.trunc(r)):0,c=Math.min(d,i);return i-=c,c})}function Mt(t,e){return t.options.find(i=>i.method===e)??null}async function At(t){const[e]=await oe({...t,trades:[t.trade]});return e}async function zt(t){const[e]=await oe({...t,trades:[],mints:[t.mint]});return e}async function oe(t){const{trades:e,mints:i=[],buyer:r,signer:d,onSigned:c,manaWei:m}=t;if(e.length===0&&i.length===0)throw new Error("No items to buy");const g=new Map;for(const x of e){const f=`${x.chainId}:${x.contract.toLowerCase()}`,p=g.get(f);p?p.push(x):g.set(f,[x])}const w=new Map;for(const x of i){const f=w.get(x.chainId);f?f.push(x):w.set(x.chainId,[x])}const u=[];for(const x of g.values())u.push(await Ue({trades:x,buyer:r,signer:d,onSigned:c,requiredManaWei:m}));for(const[x,f]of w){const p=m??f.reduce((l,v)=>l+BigInt(v.item.priceWei),0n);u.push(await Ze({mints:f,chainId:x,buyer:r,signer:d,onSigned:c,requiredManaWei:p}))}return u}async function Ue(t){const{trades:e,buyer:i,signer:r,onSigned:d,requiredManaWei:c}=t,m=e[0],g=j(Q(m.contract),m.chainId),w=j(C.MANAToken,m.chainId);await P({auth:{kind:V.Allowance,contractAddress:w.address,spenderAddress:g.address,chainId:m.chainId},signer:r,requiredWei:c});const u=e.map(l=>we(l,i));if(W.enabled)try{const l=new ke(g.abi).encodeFunctionData("accept",[u]),v=Z(),b=G(r.provider,v),h=await ee(b,v,l,g,{serverURL:W.relayerUrl});return d==null||d(),await J(h,"the MANA purchase"),h}catch(l){if(l instanceof te&&l.code===ae.USER_DENIED||l instanceof Y)throw l;S(l,{flow:"buy_mana",step:"gasless_fallback"})}await U(r.provider,m.chainId);const f=await new ne(g.address,g.abi,r).accept(u,_(m.chainId));return d==null||d(),(await f.wait()).transactionHash}async function Ze(t){const{mints:e,chainId:i,buyer:r,signer:d,onSigned:c,requiredManaWei:m}=t,g=j(C.CollectionStore,i),w=j(C.MANAToken,i),u=e.map(l=>l.item);if(await P({auth:{kind:V.Allowance,contractAddress:w.address,spenderAddress:g.address,chainId:i},signer:d,requiredWei:m}),W.enabled)try{const l=ye(u,r,g.abi),v=Z(),b=G(d.provider,v),h=await ee(b,v,l,g,{serverURL:W.relayerUrl});return c==null||c(),await J(h,"the MANA purchase"),h}catch(l){if(l instanceof te&&l.code===ae.USER_DENIED||l instanceof Y)throw l;S(l,{flow:"buy_mint_mana",step:"gasless_fallback"})}await U(d.provider,i);const f=await new ne(g.address,g.abi,d).buy(ve(u,r),_(i));return c==null||c(),(await f.wait()).transactionHash}async function Wt(t){const{trade:e,...i}=t;return re({target:{kind:"trade",trade:e},...i})}async function Tt(t){const{mint:e,...i}=t;return re({target:{kind:"store",mint:e},...i})}async function re(t){const{target:e,buyer:i,signer:r,credits:d,manaGapWei:c,onBroadcast:m,onReverted:g}=t;if(d.length===0)throw new Error("No credits to spend — use the MANA-only rail for that");if(c<=0n)throw new Error("No MANA gap to cover — use the credits-only rail for that");const w=se(e),u=j(C.MANAToken,w),x=j(C.CreditsManager,w);await P({auth:{kind:V.Allowance,contractAddress:u.address,spenderAddress:x.address,chainId:w},signer:r,requiredWei:c});const p=(d.reduce((l,v)=>l+BigInt(v.availableAmount),0n)+c).toString();return be({purchase:Ge(e,d,p),buyer:i,signer:r,onBroadcast:m,onReverted:g})}function se(t){return t.kind==="trade"?t.trade.chainId:t.mint.chainId}function Ge(t,e,i){return t.kind==="trade"?{kind:"trade",trade:t.trade,credits:e,maxCreditedValue:i}:{kind:"store",item:t.mint.item,chainId:t.mint.chainId,credits:e,maxCreditedValue:i}}function $t(t,e){const i=se(e);return t==="combined"?{spender:j(C.CreditsManager,i).address,chainId:i}:{spender:e.kind==="trade"?j(Q(e.trade.contract),i).address:j(C.CollectionStore,i).address,chainId:i}}function It(t){return n.jsx("svg",{viewBox:"0 0 18 18",width:"18",height:"18","aria-hidden":!0,...t,children:n.jsx("path",{d:"M4 4l10 10M14 4L4 14",stroke:"#161518",strokeWidth:"1.8",strokeLinecap:"round"})})}function Et(t){return n.jsx("svg",{viewBox:"0 0 20 20",width:"24",height:"24","aria-hidden":!0,...t,children:n.jsx("path",{fill:"#f48221",d:"M10 0a10 10 0 1 1 0 20 10 10 0 0 1 0-20Zm0 2a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm0 11a1 1 0 1 1 0 2 1 1 0 0 1 0-2Zm0-8a1 1 0 0 1 1 1v5a1 1 0 1 1-2 0V6a1 1 0 0 1 1-1Z"})})}const{colors:s,gradients:F,radius:de,z:Je}=o,Bt=a.div`
|
|
290
|
+
`;function yt({auth:t,signer:e,step:i,title:r,reason:d,name:c,image:m,icon:g,onAuthorized:w,onCancel:u,onClose:x}){const[f,p]=k.useState(!1),[l,v]=k.useState(null);async function b(){p(!0),v(null);try{await xe({auth:t,signer:e,active:!0}),w()}catch(h){fe(h)?v(y("authorizeStep.errorRejected")):(S(h,{flow:"authorize_step",kind:t.kind}),v(y("authorizeStep.errorGeneric"))),p(!1)}}return n.jsx(Te,{onClick:f?void 0:x,role:"presentation","data-testid":"authorize-step-scrim",children:n.jsxs($e,{onClick:h=>h.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":r,children:[n.jsxs(Ie,{children:[n.jsx(Ee,{children:r}),i&&i.total>1?n.jsx(Ne,{"data-testid":"authorize-step-count",children:y("authorizeStep.stepOf",{index:i.index,total:i.total})}):null,n.jsx(Be,{onClick:x,disabled:f,"aria-label":y("authorizeStep.close"),children:n.jsx(K,{name:"close",className:"ico"})})]}),n.jsxs(Se,{"data-testid":"authorize-step-row",children:[n.jsx(Pe,{children:m?n.jsx("img",{src:m,alt:""}):g}),n.jsxs(Ve,{children:[n.jsx(Fe,{title:c,children:c}),n.jsx(Le,{children:d})]})]}),n.jsx(qe,{children:y("authorizeStep.note")}),n.jsx(me,{message:l}),n.jsxs(De,{children:[n.jsx(Oe,{type:"button",onClick:u,disabled:f,children:y("authorizeStep.cancel")}),n.jsx(Re,{type:"button","data-testid":"authorize-step-action",onClick:()=>void b(),disabled:f,children:f?n.jsxs(n.Fragment,{children:[n.jsx(He,{"aria-hidden":!0}),y("authorizeStep.authorizing")]}):y("authorizeStep.authorize")})]})]})})}const vt="data:image/webp;base64,UklGRvgKAABXRUJQVlA4IOwKAADQKwCdASpgAGUAPjEUiEKiISEUnq8wIAMEtgBkC7j/3+G/I38cvlZrz9m/Bv7ucdsZLtP/U/cL2pPMH/Tb/Nfar3MfMJ+1P7ge7h/p/W5/dvUF/ln/R60X0FfLU/cP4VP2y/bv2Zf//dh/DX9N2THgHQ12q7Xn+Y33EAH0+/4PqITRFa4zT/1eWj619gr9Vf+j6x/rq/cX2Hv1j//7lHMptECj4S9oGS9bHSMqnYSXt0dT9/kqkBaEohWLz5fYi/Xc3O4w88eWX2PNn6f6HvokNQLshYmWuZVr+fWvmb8Mxmef32yaJFKhIrqBLsKH0p5i3G0l0My3DEGl5xNk8x8K5XQfwFnKNgmq56O8EtvsHrECHmK24etcKyXmPUNXqKG2wZt46qpzuG9FVqioXjkt+Ml5ZFMcX4Qt/gSM/pW5noqKyz52OQ+lnhtm6rvL/2wg1r915uiwJUqVqwoeahezVpjC5WF8gAD+//5xQfuw+m9CcVG4VSUxpYVbr28IJLI3JdtWufv0qzX1l/3///nmDOH9JxLbHvzElYZJh+KXu/Vm+DvLe+P3f899UasoAiqy0L6a080Zavene3J0LDFVwNKwBgTJhhnyHyXiivUCl9zFEJexNTm1uifLMn5AZB2Xhc14br6GW53pQRv/ZFIb42GbedOasp2CIgHD1AJtyBg/Yezhfuezuqo6BepEhErXb16zn+iTu/Au8DBrwz0ECgvcMrvW3Tl0jCaZqgsLwX93iEett0p1YS4pccTTlEJdxO4akcHPIoqkIq4x6COqE3W7HJ8lENPyAK9D22Zm6RAw7y23dzUt3eFk2R8ispGWbqcc/Bc4vmwZoglkFKho1lkVGOPPKjEME6mh3us+O7/UujXlQwLOh2O1Z37xfMuHPssVRIhAo8JjaMNPeY1Gc8OnuRjPp1KMfXaYQMqEVVqX7+p63Vg8xE7pnolcBqsi2123Sd1YQoFY/IdzmOWPpd1ArCvv7AJu1XlsrEbcbPt77rTmXqXgL7MTdrLwJTHSa9eMkhjkVSL2kQmiIeLlnlCTSDBW2VUJk70ZkAh1pxjwg7vagecieGvdjVPsg3qs4KdFjz8mQwdlU7nYiRLy4fs5XeEPHwuNRjqTZLmR4+P+g4i7Zld4R0BKjaNzU6io3Wg4nbeKP4Y+odsQRWTiMmULla/V5U4+shB6rhSyyxah5qNb8JF/AeM/ZEMC/ruNHFVt2z99+G334RjV11a2DLmDOKk9ULgM+aE+Yvf5FamiiBHu2zJyVP7tAllsCtG9RNmH0r5gx4OhIh17p5dfa8U78wK4Jbvcq14Zo7vgs1XwYcWKO2paQrmjei9+P5hbMwOlwQa5W1hnpxBU9gySq2/opHOaHYFiFqD8b9OReysGuVclXPTDKmqtCUHVSZYHmKP9SHubBuavbErBRmVY+Nmz5/B5SzRCnPk3+cfd7wYriQaMwOS/BOCOBvr1SO0gSrIIx4DZCbhAqPUhV9emH31oXt5i1r88/lsQKPT0LrwlaJslMnvEkMbyD9UoApwbtAZqvqugP84V2o6mM62j670PrgZQEfdrfU/Brf0uTzjZCvCUbO9oEswXg6unROfjUtgZnghqpTXVvThkder6/50kGKJje5eoSL8jwIInxFI/v/5hPjsO29Tu1V+3cT5pJ2NkOia+rW+0X3pvw9VEWQQngLrTZhrPuNAcaAWSvy+dppsI+zNXiWwCFwO+p9LyTusGvrw3oYM1FvmXff91gzvOTnyjBAeVacK1AOLetlzmatqtuQysM9IxbOLVnQ9tffTmqDbxmQTY36WqDIp2rFx05HMlrdU8jV2cl4FL70S9JSuBRoGBUYYTK1i94k3Gr2foiVl/1sktnyF95b+foK2ThVL47hB+FjNZl/Q5hTnB53rn1EppKC3jDCjN0RwIG+xO3/iwvVmdA1FEPlB/m+7K/PplluG+hMXZdqh3Vb9jGlnL1G331f68q/T4Nn53VaedqyO+K/EaZOEfFwFWbD3J0XY7eklhHvnvN+GHzT/+1ZZ/iSjsT5VcncMxDkPVAEE5+Iv8DKGs//vXXfBMs7evhxSafUuPe7x7/VPkmKnd3V+Ibc3YympmNS6TDTxtAQWCBWgJ+ZQPXvrj4Xg8lb5ZDvvVDXrXN+VzCMqq54jt2MMdkjh3QMHo32O5bPYOnQl9zl+KmVQf7XNUE3O2MxAzv2dA7w6RPbOP2OOIWRgwLdNy6OIn23vTZOirV3ufMnGIjTehD8YrfBtMhQjIpRyvVuNf8YzYoCwF8ybfcFoatV5hvAaQwhruxLD0XRSM+oAGPo44Kl6q8jz7/Qp2PtBCFVj56ostyJs0hg3PAAg+YjMvWuQMecMhPjns/mX//5XmYe9lHvfe79d91n/0puJ8C/mfnuGOTRostWX6xRZd2og1rRieHnM/8dJ58g7leMFibJD2gtq8r7n9Ce+wpYNpznRUmHcU/mP5Wlfbs/hGxk2K82pViHQElv+AumJhHOSR4Skb42vDdVFDsDyCYpN6qcJDwaDExGlckHBj2YfMCfhNFmFnEO/exYslmeNN7+UzbSW8dI1W5F/5JxVmygNHYODYFCxBcfUBf/KSOXMy+FnP9BXJx1JWZwFMeYk0JLF0cXByy84zX4WNi5IDCH6JVMx+EAzKiYrqFbfkqqWXPYzyyTFD7DQX9noCFp43nE3GNFJ/1Hg3aiFUzJuhIiBOcVnmdqcSXZmaoVN83qTB/UlqZlreRNmYOMhP1mB30Ap9yebO12VCfQ/t59iX/JHZAV4DOn3Wj10EdAmiJ4LIM7FFZuVoHwTIVBtCluMMQ5hm5kGsCp7tSnG6tgKv6r699n4BwegEJxjIBln/anJbwVigZdYOv9MJ9SmBt2yFttw3Ar3Aw1+o3Ux0CqBc23d3/urM30mJNJUyaHfuTVBXmKInUWQnT05RzFvEbS2qnBEiicuXN+h0dTN3MCAdChkQvF4nn7WeJDvg4KEdS6FN0s4TiFuWQVhloZV/3+PzN4lqrKEXSLCdzrf/gK1i2fVuLsZTulPvvcz6hhhKfA4Fni6xlMZqxVIsYoUySePySdGiyRwpzFmi3yeInf75Z8T3uqtArQNMwe3glLiiS5PUy7Y8Svsbg5xwXhr6aOPuUvj4NrXNcSgefLeNmL680LGBzBGg2M9qv2auWIpJohW8LDNngafslp+2ydYZ60t+jonPHmMDTK1R/BkkDSoxfARfSpzxRoQqCibQ/i/KfV3hnGHLWJQ9L9CaFbMy/xF1JrNXwBpZVVIEt3ivU4LwEGnaDWcgbd2t+QbDsrepZNFW9PsCU4T7IEvTthlSDAqV8HTsoCcCc0t2vD3+G8gy8h32cZaYPvipwofQ+Zd23iBld0QOVDxEDGInn4CucUTfC3/c9tjfveCPuFQTdp7Wrc2qmpty8Kn7IJOa+Hy3xJuNHAW7yTU8KHJTrxD/9fvFMkH6eDgNbEzJ5NOCoxFFplGXuhHd8jxk9u/k3bBVF6oLskpdipOj9NqvNNv7Dy1cNnPGqKJSTZ01tIQ7lIcMeBvj6Ov6rRVP4ue+EW7a/VxCfsIzlgflFXrjoKLs1k1hQW83BtGjQ37OmBhgI+6ULvZAWhooUlzBa7n+F/yXGW5dmI1gA3TANbTih2YGTLfBnAI9Z7QHGSJh6CMgmUr2kMgJYoxGft2beB7EXyDAwxQmjAEpZ2zFRVHDTYDjyz+H094nbYcAhgAAAAA=",kt="https://cdn.decentraland.org/@dcl/shop/1.9.2-32493339792.commit-9dd6f23/_assets/buy-error-22UunaPC.png";function Xe(t,e){return(t+e-1n)/e}function Ke(t,e,i){return t<=0||e<=0?0n:t>=e?i:Xe(i*BigInt(t),BigInt(e))}function jt(t){var u,x,f;const e=Number.isFinite(t.priceCents)?Math.max(0,Math.trunc(t.priceCents)):0,i=Number.isFinite(t.balanceCents)?Math.max(0,Math.trunc(t.balanceCents)):0,r=t.priceManaWei>0n?t.priceManaWei:0n,d=t.manaBalanceWei>0n?t.manaBalanceWei:0n;if(e<=0)return{options:[],preferred:null,manaShortfall:null};const c=[];if(i>=e&&c.push({method:"credits",creditsCents:e,credits:le(e),manaWei:0n}),r>0n&&i>0&&i<e){const p=e-i,l=Ke(p,e,r);d>=l&&c.push({method:"combined",creditsCents:i,credits:pe(i),manaWei:l})}r>0n&&d>=r&&c.push({method:"mana",creditsCents:0,credits:0,manaWei:r});const m=((u=c.find(p=>p.method==="credits"))==null?void 0:u.method)??((x=c.find(p=>p.method==="combined"))==null?void 0:x.method)??((f=c.find(p=>p.method==="mana"))==null?void 0:f.method)??null,w=!c.some(p=>p.method==="mana"||p.method==="combined")&&r>0n&&d>0n?{manaWei:d,manaCents:Qe(d,e,r),priceCents:e}:null;return{options:c,preferred:m,manaShortfall:w}}function Qe(t,e,i){return Number(t*BigInt(e)/i)}function Ct(t,e){let i=Number.isFinite(e)?Math.max(0,Math.trunc(e)):0;return t.map(r=>{const d=Number.isFinite(r)?Math.max(0,Math.trunc(r)):0,c=Math.min(d,i);return i-=c,c})}function Mt(t,e){return t.options.find(i=>i.method===e)??null}async function At(t){const[e]=await oe({...t,trades:[t.trade]});return e}async function zt(t){const[e]=await oe({...t,trades:[],mints:[t.mint]});return e}async function oe(t){const{trades:e,mints:i=[],buyer:r,signer:d,onSigned:c,manaWei:m}=t;if(e.length===0&&i.length===0)throw new Error("No items to buy");const g=new Map;for(const x of e){const f=`${x.chainId}:${x.contract.toLowerCase()}`,p=g.get(f);p?p.push(x):g.set(f,[x])}const w=new Map;for(const x of i){const f=w.get(x.chainId);f?f.push(x):w.set(x.chainId,[x])}const u=[];for(const x of g.values())u.push(await Ue({trades:x,buyer:r,signer:d,onSigned:c,requiredManaWei:m}));for(const[x,f]of w){const p=m??f.reduce((l,v)=>l+BigInt(v.item.priceWei),0n);u.push(await Ze({mints:f,chainId:x,buyer:r,signer:d,onSigned:c,requiredManaWei:p}))}return u}async function Ue(t){const{trades:e,buyer:i,signer:r,onSigned:d,requiredManaWei:c}=t,m=e[0],g=j(Q(m.contract),m.chainId),w=j(C.MANAToken,m.chainId);await P({auth:{kind:V.Allowance,contractAddress:w.address,spenderAddress:g.address,chainId:m.chainId},signer:r,requiredWei:c});const u=e.map(l=>we(l,i));if(W.enabled)try{const l=new ke(g.abi).encodeFunctionData("accept",[u]),v=Z(),b=G(r.provider,v),h=await ee(b,v,l,g,{serverURL:W.relayerUrl});return d==null||d(),await J(h,"the MANA purchase"),h}catch(l){if(l instanceof te&&l.code===ae.USER_DENIED||l instanceof Y)throw l;S(l,{flow:"buy_mana",step:"gasless_fallback"})}await U(r.provider,m.chainId);const f=await new ne(g.address,g.abi,r).accept(u,_(m.chainId));return d==null||d(),(await f.wait()).transactionHash}async function Ze(t){const{mints:e,chainId:i,buyer:r,signer:d,onSigned:c,requiredManaWei:m}=t,g=j(C.CollectionStore,i),w=j(C.MANAToken,i),u=e.map(l=>l.item);if(await P({auth:{kind:V.Allowance,contractAddress:w.address,spenderAddress:g.address,chainId:i},signer:d,requiredWei:m}),W.enabled)try{const l=ye(u,r,g.abi),v=Z(),b=G(d.provider,v),h=await ee(b,v,l,g,{serverURL:W.relayerUrl});return c==null||c(),await J(h,"the MANA purchase"),h}catch(l){if(l instanceof te&&l.code===ae.USER_DENIED||l instanceof Y)throw l;S(l,{flow:"buy_mint_mana",step:"gasless_fallback"})}await U(d.provider,i);const f=await new ne(g.address,g.abi,d).buy(ve(u,r),_(i));return c==null||c(),(await f.wait()).transactionHash}async function Wt(t){const{trade:e,...i}=t;return re({target:{kind:"trade",trade:e},...i})}async function Tt(t){const{mint:e,...i}=t;return re({target:{kind:"store",mint:e},...i})}async function re(t){const{target:e,buyer:i,signer:r,credits:d,manaGapWei:c,onBroadcast:m,onReverted:g}=t;if(d.length===0)throw new Error("No credits to spend — use the MANA-only rail for that");if(c<=0n)throw new Error("No MANA gap to cover — use the credits-only rail for that");const w=se(e),u=j(C.MANAToken,w),x=j(C.CreditsManager,w);await P({auth:{kind:V.Allowance,contractAddress:u.address,spenderAddress:x.address,chainId:w},signer:r,requiredWei:c});const p=(d.reduce((l,v)=>l+BigInt(v.availableAmount),0n)+c).toString();return be({purchase:Ge(e,d,p),buyer:i,signer:r,onBroadcast:m,onReverted:g})}function se(t){return t.kind==="trade"?t.trade.chainId:t.mint.chainId}function Ge(t,e,i){return t.kind==="trade"?{kind:"trade",trade:t.trade,credits:e,maxCreditedValue:i}:{kind:"store",item:t.mint.item,chainId:t.mint.chainId,credits:e,maxCreditedValue:i}}function $t(t,e){const i=se(e);return t==="combined"?{spender:j(C.CreditsManager,i).address,chainId:i}:{spender:e.kind==="trade"?j(Q(e.trade.contract),i).address:j(C.CollectionStore,i).address,chainId:i}}function It(t){return n.jsx("svg",{viewBox:"0 0 18 18",width:"18",height:"18","aria-hidden":!0,...t,children:n.jsx("path",{d:"M4 4l10 10M14 4L4 14",stroke:"#161518",strokeWidth:"1.8",strokeLinecap:"round"})})}function Et(t){return n.jsx("svg",{viewBox:"0 0 20 20",width:"24",height:"24","aria-hidden":!0,...t,children:n.jsx("path",{fill:"#f48221",d:"M10 0a10 10 0 1 1 0 20 10 10 0 0 1 0-20Zm0 2a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm0 11a1 1 0 1 1 0 2 1 1 0 0 1 0-2Zm0-8a1 1 0 0 1 1 1v5a1 1 0 1 1-2 0V6a1 1 0 0 1 1-1Z"})})}const{colors:s,gradients:F,radius:de,z:Je}=o,Bt=a.div`
|
|
291
291
|
position: fixed;
|
|
292
292
|
inset: 0;
|
|
293
293
|
z-index: ${Je.overlay};
|
|
@@ -934,4 +934,4 @@ import{j as n,r as k}from"./react-G9L2um0r.js";import{s as a,t as o,b as y,q as
|
|
|
934
934
|
transform: scale(1.1);
|
|
935
935
|
}
|
|
936
936
|
`;function va({title:t,items:e,onViewAll:i}){const r=k.useRef(null),[d,c]=k.useState(1),[m,g]=k.useState(0),[w,u]=k.useState(!0),[x,f]=k.useState(!1),p=k.useCallback(()=>{const b=r.current;if(!b)return;const{scrollLeft:h,scrollWidth:q,clientWidth:T}=b,D=Math.max(1,Math.ceil(q/T));c(D),g(Math.min(D-1,Math.round(h/T))),u(h<=1),f(h+T>=q-1)},[]);if(k.useEffect(()=>{p();const b=r.current;if(b)return b.addEventListener("scroll",p,{passive:!0}),window.addEventListener("resize",p),()=>{b.removeEventListener("scroll",p),window.removeEventListener("resize",p)}},[p,e.length]),e.length===0)return null;function l(b){const h=r.current;h&&h.scrollBy({left:b*h.clientWidth,behavior:"smooth"})}function v(b){const h=r.current;h&&h.scrollTo({left:b*h.clientWidth,behavior:"smooth"})}return n.jsxs(_e,{"data-testid":"carousel",children:[n.jsxs(et,{children:[n.jsx(tt,{children:t}),i?n.jsxs(at,{onClick:i,children:[y("collectionCarousel.viewAll"),n.jsx(nt,{name:"chevron-down",size:16})]}):null]}),n.jsxs(it,{children:[n.jsx(X,{"data-side":"left",onClick:()=>l(-1),"aria-label":y("collectionCarousel.scrollLeft"),disabled:w,children:n.jsx("img",{src:R,alt:"","aria-hidden":!0})}),n.jsx(ot,{ref:r,children:e.map(b=>n.jsx(ge,{item:b},b.id))}),n.jsx(X,{"data-side":"right",onClick:()=>l(1),"aria-label":y("collectionCarousel.scrollRight"),disabled:x,children:n.jsx("img",{src:R,alt:"","aria-hidden":!0})})]}),d>1?n.jsx(rt,{"aria-label":y("collectionCarousel.pages"),children:Array.from({length:d}).map((b,h)=>n.jsx(st,{"data-active":h===m||void 0,"aria-label":y("collectionCarousel.goToPage",{page:h+1}),"aria-current":h===m?"true":void 0,onClick:()=>v(h)},h))}):null]})}export{oe as $,Xt as A,qt as B,St as C,na as D,vt as E,ia as F,oa as G,Pt as H,ra as I,sa as J,da as K,ha as L,Bt as M,ca as N,jt as O,bt as P,mt as Q,va as R,Nt as S,Ft as T,yt as U,I as V,Yt as W,Lt as X,ft as Y,wt as Z,$t as _,Vt as a,Ct as a0,Ke as a1,Ge as a2,se as a3,wa as a4,ya as a5,pa as a6,Mt as a7,At as a8,zt as a9,Wt as aa,Tt as ab,It as b,Dt as c,Ot as d,Rt as e,Ht as f,ua as g,ga as h,kt as i,xa as j,la as k,Ye as l,fa as m,ma as n,ba as o,Et as p,_t as q,ea as r,Kt as s,Qt as t,Ut as u,Zt as v,Gt as w,Jt as x,ta as y,aa as z};
|
|
937
|
-
//# sourceMappingURL=CollectionCarousel-
|
|
937
|
+
//# sourceMappingURL=CollectionCarousel-BRzHQV17.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["_assets/index.es-
|
|
2
|
-
import{s as a,_ as s}from"./index-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["_assets/index.es-BjOWM-FW.js","_assets/react-SYhE92K6.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{s as a,_ as s}from"./index-C6i7o4u4.js";import{r as n,j as i}from"./react-SYhE92K6.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="6fa02be9-33fb-4ba3-9237-36b1dcd4bb39",e._sentryDebugIdIdentifier="sentry-dbid-6fa02be9-33fb-4ba3-9237-36b1dcd4bb39")}catch{}})();const o=a.div`
|
|
3
3
|
position: fixed;
|
|
4
4
|
inset: 0;
|
|
5
5
|
/**
|
|
@@ -14,5 +14,5 @@ import{s as a,_ as s}from"./index-LDPyoGDo.js";import{r as n,j as i}from"./react
|
|
|
14
14
|
*/
|
|
15
15
|
z-index: -1;
|
|
16
16
|
pointer-events: none;
|
|
17
|
-
`,r=n.lazy(async()=>{const[{default:e},{default:t}]=await Promise.all([s(()=>import("./index.es-
|
|
18
|
-
//# sourceMappingURL=Confetti-
|
|
17
|
+
`,r=n.lazy(async()=>{const[{default:e},{default:t}]=await Promise.all([s(()=>import("./index.es-BjOWM-FW.js"),__vite__mapDeps([0,1])),s(()=>import("./confettiAnimation-Btd6HRFo.js"),[])]);return{default:()=>i.jsx(e,{animationData:t,loop:1})}});function u(){const[e]=n.useState(()=>{var t;return!((t=window.matchMedia)!=null&&t.call(window,"(prefers-reduced-motion: reduce)").matches)});return e?i.jsx(o,{"aria-hidden":!0,"data-testid":"confetti",children:i.jsx(n.Suspense,{fallback:null,children:i.jsx(r,{})})}):null}export{u as C};
|
|
18
|
+
//# sourceMappingURL=Confetti-BB86KAAN.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{p as o}from"./sentry-
|
|
2
|
-
//# sourceMappingURL=ConstantsUtil-
|
|
1
|
+
import{p as o}from"./sentry-flvYKJxM.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="212e6b2b-00bf-4961-b68b-1d32c6f901a6",e._sentryDebugIdIdentifier="sentry-dbid-212e6b2b-00bf-4961-b68b-1d32c6f901a6")}catch{}})();var n={};const r={ACCOUNT_TABS:[{label:"Tokens"},{label:"Activity"}],SECURE_SITE_ORIGIN:(typeof o<"u"&&typeof n<"u"?n.NEXT_PUBLIC_SECURE_SITE_ORIGIN:void 0)||"https://secure.walletconnect.org",VIEW_DIRECTION:{Next:"next",Prev:"prev"},ANIMATION_DURATIONS:{HeaderText:120},VIEWS_WITH_LEGAL_FOOTER:["Connect","ConnectWallets","OnRampTokenSelect","OnRampFiatSelect","OnRampProviders"],VIEWS_WITH_DEFAULT_FOOTER:["Networks"]};export{r as C};
|
|
2
|
+
//# sourceMappingURL=ConstantsUtil-jo9GWluc.js.map
|