@dcl/shop 1.4.2-31320710520.commit-47b5e79 → 1.4.2-31321510979.commit-eaccdfa
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-Bj50vKR0.js → Activity-Du3v4d55.js} +6 -6
- package/_assets/{AnimatedBackground-DM_J9sFS.js → AnimatedBackground-cJyJ3k37.js} +1 -1
- package/_assets/{Assets-Le2w7iQI.js → Assets-CgKshhdA.js} +5 -5
- package/_assets/{Assets.styles-CpqF_Fdz.js → Assets.styles-C7r9wHQF.js} +1 -1
- package/_assets/{Authorizations-_Wg34m7S.js → Authorizations-BJbX0ZkC.js} +1 -1
- package/_assets/Cart-DK4zdt7W.js +705 -0
- package/_assets/{CircularProgress-CxEoMF4A.js → CircularProgress-BI-Efq9-.js} +1 -1
- package/_assets/{Collection-VHStAFNx.js → Collection-Cf172utI.js} +1 -1
- package/_assets/{CollectionCarousel-myES4XcG.js → CollectionCarousel-BxoPvgOg.js} +2 -2
- package/_assets/{Confetti-DeVL3NXt.js → Confetti-D2X3FtD_.js} +1 -1
- package/_assets/{ConstantsUtil-DdEaqFLk.js → ConstantsUtil-BYkVBz19.js} +1 -1
- package/_assets/{ContentClient-DoEKbMYH.js → ContentClient-BkLWw6Rk.js} +1 -1
- package/_assets/{Creator-PDdG-iXV.js → Creator-BFj8KtJ0.js} +1 -1
- package/_assets/{DeploymentBuilder-CLcel3Eo.js → DeploymentBuilder-8E575y44.js} +1 -1
- package/_assets/{ErrorNotice-CHfdCZkq.js → ErrorNotice-BYO5Bvyc.js} +1 -1
- package/_assets/{ExchangeController-BsfHECP_.js → ExchangeController-BA0Eliky.js} +1 -1
- package/_assets/{Faq-DZoTGHut.js → Faq-CaXi1BNV.js} +1 -1
- package/_assets/{GetCredits-DUBcWOB1.js → GetCredits-khV-GXU_.js} +1 -1
- package/_assets/{Grow-DgEI6Im-.js → Grow-DVmpJZOV.js} +1 -1
- package/_assets/{HelpersUtil-Dy-rbv5K.js → HelpersUtil-DynUp31-.js} +1 -1
- package/_assets/{ItemDetail-BkJjwdIs.js → ItemDetail-DDdnprOE.js} +17 -17
- package/_assets/LazyEmoteControls-BlgXCM-V.js +2 -0
- package/_assets/{LoadMore-CX0YRQgF.js → LoadMore-CYVBsAhd.js} +1 -1
- package/_assets/{ManaPricingBanner.styles-BwFSl7LS.js → ManaPricingBanner.styles-C44WWkRh.js} +1 -1
- package/_assets/{MyAssets-BjStqGxu.js → MyAssets-ogqvhbaY.js} +2 -2
- package/_assets/{MyFavorites-Dvo5uJVF.js → MyFavorites-D8erMGcd.js} +1 -1
- package/_assets/{NetworkUtil-B-eKNJQq.js → NetworkUtil-BsEXGHJo.js} +1 -1
- package/_assets/{NotFound-CuEmIcZw.js → NotFound-D5seDwlz.js} +1 -1
- package/_assets/{NotificationsBell-lm3dBPHl.js → NotificationsBell-uJCcRX8e.js} +1 -1
- package/_assets/{OutfitDetail-D2DXT1hX.js → OutfitDetail-Cnd07GLk.js} +45 -45
- package/_assets/{OutfitPreview-FcBW6hyj.js → OutfitPreview-BADnZcBi.js} +1 -1
- package/_assets/{OutfitStudio-BKGN4eJn.js → OutfitStudio-DsQnrk15.js} +1 -1
- package/_assets/{StoreSettings-CuE1xosG.js → StoreSettings-Du81JVhq.js} +21 -21
- package/_assets/{Success-cy7VeSoE.js → Success-CSByCd9s.js} +1 -1
- package/_assets/{SwapController-CDs7ZYXx.js → SwapController-Dl69afRt.js} +1 -1
- package/_assets/{Tooltip-CXFRnod1.js → Tooltip-Cz34W2WD.js} +1 -1
- package/_assets/{TradeService-xoqTPgqX.js → TradeService-DYWoUp2O.js} +1 -1
- package/_assets/{W3MFrameProviderSingleton-PClCN64a.js → W3MFrameProviderSingleton-DMgnEflU.js} +3 -3
- package/_assets/{WebCryptoP256-BUPseViS.js → WebCryptoP256-DvJwZjAY.js} +1 -1
- package/_assets/{authorizations-BwORYJQ9.js → authorizations-CHiv1Pa7.js} +1 -1
- package/_assets/{basic-C4se6tSm.js → basic-CgCNtuea.js} +1 -1
- package/_assets/{biconomy-Du_8Umsh.js → biconomy-ChCoIucR.js} +1 -1
- package/_assets/{builder-DfX-mH6j.js → builder-UN5pIfno.js} +1 -1
- package/_assets/{buy-Gj-kpaAH.js → buy-BsMK5C0W.js} +1 -1
- package/_assets/{buy-gasless-DIKNMgNF.js → buy-gasless-CChLhkv0.js} +1 -1
- package/_assets/{categories-CwxnAvm3.js → categories-BoH_BcuN.js} +1 -1
- package/_assets/{ccip-3LUdJIKA.js → ccip-BoCyT5Kw.js} +1 -1
- package/_assets/{ccip-L6Ofyz0j.js → ccip-ci60pO9_.js} +1 -1
- package/_assets/{chains-MlB0BpGt.js → chains-BXxRVqOL.js} +1 -1
- package/_assets/{collectionPage.styles-B3Xgj9MA.js → collectionPage.styles-BK-K9Hp7.js} +6 -6
- package/_assets/{common-CdWgKbjo.js → common-pfIErvdh.js} +1 -1
- package/_assets/{controller-LFh_Ka-C.js → controller-Bmdml4vJ.js} +2 -2
- package/_assets/{core-BgYGhM-G.js → core-DSyHKtkv.js} +4 -4
- package/_assets/{createSvgIcon-CdDr--Ku.js → createSvgIcon-B7oSzltn.js} +1 -1
- package/_assets/{custom-BE1FXlr9.js → custom-CpeFfUh_.js} +1 -1
- package/_assets/{data-capture-bmPXPZw0.js → data-capture-D82nwrKY.js} +1 -1
- package/_assets/decimals-C8Nkd-f-.js +1 -0
- package/_assets/{decimals-DY2Q4K8y.js → decimals-CufGxqGB.js} +1 -1
- package/_assets/{detectExtension-DuOOm9SA.js → detectExtension-DJir-uLI.js} +1 -1
- package/_assets/{email-D4q8Zaeb.js → email-B3_G7aNG.js} +1 -1
- package/_assets/{embedded-wallet-B2KDebTr.js → embedded-wallet-CbWrcRQY.js} +1 -1
- package/_assets/{emotion-styled.browser.esm-BbJO6XrC.js → emotion-styled.browser.esm-mKrb76ZC.js} +1 -1
- package/_assets/{engine-BDy2Ae8T.js → engine-Ck8sAaZu.js} +1 -1
- package/_assets/{errors-BMIEJWrl.js → errors-CvYDNXLT.js} +1 -1
- package/_assets/{estimate-l1-fee-BWxIEsdB.js → estimate-l1-fee-BrAAemAM.js} +1 -1
- package/_assets/{eth_estimateGas-DBodmhEo.js → eth_estimateGas-D9Pu3PNx.js} +1 -1
- package/_assets/{eth_getStorageAt-CekC9DsJ.js → eth_getStorageAt-BSkNzsMl.js} +1 -1
- package/_assets/{eth_getTransactionCount-Bvc7o7xs.js → eth_getTransactionCount-DpXnQ6cd.js} +1 -1
- package/_assets/{ethereum-DoUOPHwc.js → ethereum-D1MZ_SH0.js} +1 -1
- package/_assets/{ethers-C2aT6vPn.js → ethers-BKEzvwKN.js} +1 -1
- package/_assets/{execute-C4QWK6aN.js → execute-DFgCeynW.js} +2 -2
- package/_assets/{extractIPFS-Cc3nmFwl.js → extractIPFS-DuxYPj2T.js} +1 -1
- package/_assets/{features-CeMZQtN_.js → features-CAYyw2t4.js} +1 -1
- package/_assets/{fetchTokenMetadata-XeM6tKfs.js → fetchTokenMetadata-CpttgW84.js} +2 -2
- package/_assets/{field.styles-qh9N2rfp.js → field.styles-DKv8B53l.js} +1 -1
- package/_assets/{get-bytecode-D4K-YBIB.js → get-bytecode-CL7QG9KN.js} +1 -1
- package/_assets/get-ecosystem-wallet-info-ClVaJBNf.js +1 -0
- package/_assets/{getBalance-DXAGBbVC.js → getBalance-B2ObTKo9.js} +2 -2
- package/_assets/{getInstalledModules-BTjlPGjb.js → getInstalledModules-OWhC7ilZ.js} +1 -1
- package/_assets/getNFT-BSQnVoEz.js +1 -0
- package/_assets/{getNFT-CNJ-_M01.js → getNFT-DEL-8DlX.js} +2 -2
- package/_assets/{grid.styles-BL-AZNEl.js → grid.styles-CLaodk5Q.js} +1 -1
- package/_assets/{hashTypedData-D4XG2ByP.js → hashTypedData-DejwI0fC.js} +1 -1
- package/_assets/{hashTypedData-DlLD_1k9.js → hashTypedData-l-4TMklh.js} +1 -1
- package/_assets/{in-app-CvvyDaIR.js → in-app-CAxC4Ivh.js} +1 -1
- package/_assets/{in-app-wallet-calls-KwCyTYu4.js → in-app-wallet-calls-B4qBtbAF.js} +1 -1
- package/_assets/{index-S_HE117X.js → index-1QstDrwj.js} +1 -1
- package/_assets/{index-DD9-eNIh.js → index-1hFNP4-J.js} +1 -1
- package/_assets/{index-LXqcIZPG.js → index-9KWmRLJY.js} +1 -1
- package/_assets/{index-CTbMQcYM.js → index-BHsHyxTp.js} +1 -1
- package/_assets/{index-TI6_sn0N.js → index-BJSqjAz5.js} +1 -1
- package/_assets/{index--vfgdtJH.js → index-BKv8igl6.js} +1 -1
- package/_assets/{index-BgGXHJAj.js → index-BLuTTbXE.js} +1 -1
- package/_assets/{index-D3_WugnV.js → index-BMx0J1W7.js} +1 -1
- package/_assets/{index-D2d8wxlg.js → index-BS30HDvk.js} +1 -1
- package/_assets/{index-k89JybTR.js → index-BVi-9LKN.js} +1 -1
- package/_assets/{index-CYj_dZQu.js → index-BWHG3_yU.js} +1 -1
- package/_assets/{index-Dqi1Ahna.js → index-BYLXLXoc.js} +1 -1
- package/_assets/{index-DScU3nKX.js → index-BbVTIE6o.js} +1 -1
- package/_assets/{index-BNKhGWJy.js → index-BeR8agGt.js} +1 -1
- package/_assets/{index-u8AU6tTj.js → index-Bf9Jh6ty.js} +3 -3
- package/_assets/{index-fAYbiDnu.js → index-BfOmf_Cp.js} +1 -1
- package/_assets/{index-ULJcIHe0.js → index-Bh6adykR.js} +510 -441
- package/_assets/{index-C4sZNEwQ.js → index-BkyZYtvZ.js} +1 -1
- package/_assets/{index-5MPkg-ua.js → index-BoAHsqWZ.js} +3 -3
- package/_assets/{index-CanVHHXT.js → index-Bv9rCbrF.js} +1 -1
- package/_assets/{index-BiF7cs9Y.js → index-BvqQC62-.js} +1 -1
- package/_assets/{index-iBFKBxN1.js → index-BxnUk4ME.js} +1 -1
- package/_assets/{index-C5A8Yad0.js → index-C0Q2Xw9m.js} +2 -2
- package/_assets/{index-fTsVEPz3.js → index-CEyMhxNB.js} +1 -1
- package/_assets/{index-25UlwZ8K.js → index-CK61l8v-.js} +1 -1
- package/_assets/{index-CiO812Ca.js → index-CPeIXfrM.js} +1 -1
- package/_assets/{index-fAxVQOAa.js → index-CRzzQfOr.js} +1 -1
- package/_assets/{index-C_2YgwDC.js → index-CXVjVFyf.js} +2 -2
- package/_assets/{index-CSC4uqgH.js → index-Cg55UGkV.js} +1 -1
- package/_assets/{index-BjQITz-8.js → index-ChXE0-3A.js} +1 -1
- package/_assets/{index-BXw_7R9L.js → index-Cmjegovo.js} +1 -1
- package/_assets/{index-CEWixcPf.js → index-Cumq3JZH.js} +3 -3
- package/_assets/{index-Dj4N1S4W.js → index-CzLF63y-.js} +1 -1
- package/_assets/{index-5qxNhTDL.js → index-D5hR2snR.js} +1 -1
- package/_assets/{index-BDMLisxX.js → index-D7lxJ3dw.js} +1 -1
- package/_assets/{index-B30MVCe4.js → index-DEJfCl92.js} +1 -1
- package/_assets/{index-Df6NB0bD.js → index-DFBE_Qdk.js} +1 -1
- package/_assets/{index-DRQk28IU.js → index-DGlvMnC6.js} +1 -1
- package/_assets/{index-CjCe04F0.js → index-DHGhfu2F.js} +1 -1
- package/_assets/{index-B6Yc6mtH.js → index-DKT5zOvs.js} +1 -1
- package/_assets/{index-Y7QBjYCj.js → index-DOLSZTRS.js} +1 -1
- package/_assets/{index-CyhH3Owi.js → index-DP6QK5zD.js} +1 -1
- package/_assets/{index-BSkXuNTI.js → index-DPwpeXbZ.js} +1 -1
- package/_assets/{index-CLMqQAew.js → index-DUOQXffc.js} +1 -1
- package/_assets/{index-Boa_g2os.js → index-DVLRWBza.js} +1 -1
- package/_assets/{index-DXbJCnmP.js → index-DakB46KR.js} +1 -1
- package/_assets/{index-BY0Bney7.js → index-DawlAKc2.js} +1 -1
- package/_assets/{index-DJmB870S.js → index-Dcr_mOap.js} +1 -1
- package/_assets/{index-DSwVpxq2.js → index-Dhix6rUc.js} +1 -1
- package/_assets/{index-4baAkBo1.js → index-DiIBE3vJ.js} +1 -1
- package/_assets/{index-DnB7f-EM.js → index-DiWnKuWQ.js} +2 -2
- package/_assets/{index-xFci8055.js → index-DkPrBpEu.js} +1 -1
- package/_assets/{index-CPO0SyLp.js → index-DqhO9Fg3.js} +1 -1
- package/_assets/{index-3xmjR6aV.js → index-DvYOZ9Sr.js} +2 -2
- package/_assets/{index-FmQ2Znb5.js → index-EF_jUQ8k.js} +1 -1
- package/_assets/{index-D4ZnNcOV.js → index-PKeNbFmQ.js} +1 -1
- package/_assets/{index-Dl6uuY7g.js → index-R9nHgWvM.js} +1 -1
- package/_assets/{index-ClaGX2vw.js → index-Uf7j7Muh.js} +1 -1
- package/_assets/{index-CLl3mIl8.js → index-Zf4oaxuE.js} +1 -1
- package/_assets/{index-ClmS_QYw.js → index-eNelMLKH.js} +1 -1
- package/_assets/{index-Bj6eP-0Y.js → index-hKJudHRw.js} +1 -1
- package/_assets/{index-Ce8ihRu4.js → index-tslnPDXe.js} +1 -1
- package/_assets/{index.es-DQ8XF9bt.js → index.es-BrdXKoNI.js} +1 -1
- package/_assets/{index.es-C8QCn5tW.js → index.es-CpRZxgSI.js} +1 -1
- package/_assets/{index.es-Dka5Kgw7.js → index.es-mC-IwkBp.js} +4 -4
- package/_assets/{linkAccount-D43nvVpf.js → linkAccount-BC_9YSzE.js} +1 -1
- package/_assets/{localBatchGatewayRequest-DhJVA43e.js → localBatchGatewayRequest-Sqedi9_T.js} +1 -1
- package/_assets/{native-BulWZ7QV.js → native-Dc2tC-qn.js} +1 -1
- package/_assets/{networks-BnMbPdpN.js → networks-D1KxTI6W.js} +1 -1
- package/_assets/{onramp-DMJQHKg-.js → onramp-DoImupnC.js} +1 -1
- package/_assets/{openzeppelin-C3Pl3yuu.js → openzeppelin-BgxtMme5.js} +1 -1
- package/_assets/{ownerOf-CRxTSA2c.js → ownerOf-3KXrH0u3.js} +1 -1
- package/_assets/{parseNft-Bs-RQe4T.js → parseNft-PSXPX8Qm.js} +2 -2
- package/_assets/{parseSignature-RYls3v4v.js → parseSignature-CYlDxQ9k.js} +3 -3
- package/_assets/{parseSignature-rsOf3_qw.js → parseSignature-DTi4uU4Z.js} +1 -1
- package/_assets/{passkeys-BUxRhn2L.js → passkeys-5lnypzRC.js} +1 -1
- package/_assets/{pay-with-exchange-DHW-C64V.js → pay-with-exchange-CWcjyYs3.js} +1 -1
- package/_assets/{prepare-contract-call-e3f1C8XP.js → prepare-contract-call-Bc4Cpa9D.js} +1 -1
- package/_assets/{qr-overlay-Cg-WkKuT.js → qr-overlay-NPhJDGVq.js} +1 -1
- package/_assets/{receive-Cu-ZV-cu.js → receive-VPgnkZS_.js} +1 -1
- package/_assets/{resolveImplementation-Bh36MQvx.js → resolveImplementation-fHRuJM82.js} +1 -1
- package/_assets/{rpc-6d6u8O5r.js → rpc-DZP--mgd.js} +1 -1
- package/_assets/{secp256k1-D2taLWYD.js → secp256k1-C3Qb75Qb.js} +1 -1
- package/_assets/{secp256k1-B92Ywaq1.js → secp256k1-oNvcpUA1.js} +1 -1
- package/_assets/{secp256k1-D1m__--i.js → secp256k1-sqjfgWa7.js} +1 -1
- package/_assets/{send-batch-transaction-CvTCh5wP.js → send-batch-transaction-C5BOzhrb.js} +1 -1
- package/_assets/{send-eip712-transaction-B9AdogZT.js → send-eip712-transaction-BfXD1pXX.js} +2 -2
- package/_assets/send-gasless-transaction-DTd_ER_v.js +2 -0
- package/_assets/{send-transaction-B69VAvsk.js → send-transaction-DLLBmyZ2.js} +2 -2
- package/_assets/{send-heKmoW9F.js → send-yMlzgxV3.js} +1 -1
- package/_assets/{sendMetaTransaction-DpVGu658.js → sendMetaTransaction-DCqRrKxD.js} +1 -1
- package/_assets/{sendRawTransaction-DV4GVVoj.js → sendRawTransaction-k2Sfh7AJ.js} +3 -3
- package/_assets/{sentry-BK5fu_HX.js → sentry-1ai9esXb.js} +1 -1
- package/_assets/{serializeTransaction-DlpejkUw.js → serializeTransaction-CwlY06pE.js} +1 -1
- package/_assets/{session-proposal-Dx3yOKUi.js → session-proposal-BR4gno3D.js} +1 -1
- package/_assets/{session-request-DCyVYhuz.js → session-request-DelvKYtg.js} +2 -2
- package/_assets/{sha256-CnRuTod2.js → sha256-CeTmPq_Q.js} +1 -1
- package/_assets/{signing-D2s4UaW5.js → signing-DBPT8c_m.js} +3 -3
- package/_assets/{skeleton.styles-D7VHybuU.js → skeleton.styles-S0BlHaZF.js} +1 -1
- package/_assets/{socials-CakRupC1.js → socials-HhtoVIIu.js} +1 -1
- package/_assets/{styled-HBeZsj4_.js → styled-9SIjAP06.js} +1 -1
- package/_assets/{swaps-DqDP1lId.js → swaps-BzqeewT0.js} +1 -1
- package/_assets/{thirdweb-DQKaNdML.js → thirdweb-YIX7a_02.js} +3 -3
- package/_assets/{to-serializable-transaction-BdIactDO.js → to-serializable-transaction-DqDYMKiS.js} +2 -2
- package/_assets/{totalSupply-iZRkxhL1.js → totalSupply-7X9a1Ctp.js} +1 -1
- package/_assets/{transaction-C4vjl2Fm.js → transaction-DcVIFcB7.js} +1 -1
- package/_assets/{transactionReceipt-BQu434pp.js → transactionReceipt-CdHeShcY.js} +1 -1
- package/_assets/{transactions-CNPMMMBr.js → transactions-DG7v8Ic7.js} +1 -1
- package/_assets/{useCreditPacks-BWVDizmd.js → useCreditPacks-vq0qzOlC.js} +1 -1
- package/_assets/{useImportable-yzPDMI0N.js → useImportable-BJCj_pDd.js} +1 -1
- package/_assets/{useInfiniteGrid-CTKQTKU7.js → useInfiniteGrid-BzWCN8NZ.js} +1 -1
- package/_assets/{useStore-Dkbc_tki.js → useStore-CQ5asPEA.js} +2 -2
- package/_assets/{useTheme-DXtBSimm.js → useTheme-BzrLLDZ8.js} +1 -1
- package/_assets/{utils-DeM1E6iD.js → utils-DPjdBMrV.js} +1 -1
- package/_assets/{verifyHash-CBVL_1yb.js → verifyHash-B6Vh-Wda.js} +1 -1
- package/_assets/{w3m-modal-BmABaD4G.js → w3m-modal-BBx0I47s.js} +1 -1
- package/_assets/{w3m-modal-CXIA1TIS.js → w3m-modal-DSuObTMF.js} +1 -1
- package/_assets/{wait-for-tx-receipt-FGfPKCKV.js → wait-for-tx-receipt-dL7u4t_k.js} +1 -1
- package/_assets/{wallets-DCgEemEi.js → wallets-DUR60lPP.js} +5 -5
- package/_assets/{web-connector-ClK8-EsV.js → web-connector-CehjxsVA.js} +3 -3
- package/_assets/{writeContract-DudS1oCU.js → writeContract-C0-n2OaV.js} +1 -1
- package/_assets/{zora-sepolia-lz4GmBCL.js → zora-sepolia-k6yl8DpC.js} +1 -1
- package/_assets/{zoraTestnet-p_eIbpZq.js → zoraTestnet-7xxdYXjY.js} +1 -1
- package/index.html +11 -11
- package/package.json +2 -2
- package/_assets/Cart-wplxHX39.js +0 -696
- package/_assets/LazyEmoteControls-rTlV3yXE.js +0 -2
- package/_assets/decimals-DaugtsOj.js +0 -1
- package/_assets/get-ecosystem-wallet-info-Cy3ItbjQ.js +0 -1
- package/_assets/getNFT-D10rHe0g.js +0 -1
- package/_assets/send-gasless-transaction-md4Lgjib.js +0 -2
package/_assets/Cart-wplxHX39.js
DELETED
|
@@ -1,696 +0,0 @@
|
|
|
1
|
-
import{j as e,L as Ne,r as T,b as ra,a as oa}from"./react-BYHuwl8r.js";import{t as ue,s as i,b as a,L as le,C as Le,ax as ca,ay as Ee,az as la,J as da,I as O,A as zt,K as Qe,y as ua,X as H,am as ut,v as ha,w as pa,l as ga,aA as ma,D as xa,aB as fa,an as ya,aC as ba,aD as ht,aE as va,aF as wa,z as Ca,aG as pt,Z as D,aH as gt,aI as ja,k as se,r as ka,c as mt,aJ as $a,aK as xt,aL as Be,aM as Sa,aN as ye,aO as be,aP as ft,g as yt,f as bt,aQ as Ma}from"./index-ULJcIHe0.js";import{M as Ta,S as Ia,C as Pa,H as Aa,a as za,T as Ea,X as Ba,b as Ra,B as qa,c as Fa,d as vt,e as _a,f as je,P as Et,g as Wa,h as La,i as Ka,j as Na,k as Ke,l as de,L as Qa,m as Ua,n as wt,o as Ct,W as Ga,p as Ha,q as Oa,r as Va,A as Da,s as Ja,t as Xa,u as Ya,v as Za,w as es,x as ts,y as as,z as ss,D as ns,E as is,F as rs,G as os,I as cs,J as ls,K as ds,N as us,O as Re,Q as hs,R as ps,U as gs,V as ms,Y as jt,Z as kt,_ as xs,$ as fs,a0 as ys,a1 as bs,a2 as $t,a3 as vs}from"./CollectionCarousel-myES4XcG.js";import{f as ws,h as Cs,a as js,n as ks,i as $s,A as Ss}from"./authorizations-BwORYJQ9.js";import{g as Ms,h as qe,p as Ts}from"./buy-Gj-kpaAH.js";import{b as Is,w as Ps,S as St,G as As}from"./buy-gasless-DIKNMgNF.js";import{u as zs,M as Es,R as ve,r as Bs,c as Rs,p as Mt,a as Fe}from"./useCreditPacks-BWVDizmd.js";import{i as qs,a as Fs}from"./errors-BMIEJWrl.js";import{E as _s}from"./ErrorNotice-CHfdCZkq.js";import"./dcl-schemas-CmtP3U6y.js";import"./sentry-BK5fu_HX.js";import"./ethers-C2aT6vPn.js";import"./intl-CBcMB1D2.js";import"./sendMetaTransaction-DpVGu658.js";const{colors:ne,radius:Ws}=ue,Ls=i.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
align-items: center;
|
|
4
|
-
justify-content: center;
|
|
5
|
-
gap: 8px;
|
|
6
|
-
width: 100%;
|
|
7
|
-
`,Ks=i.span`
|
|
8
|
-
font-size: 16px;
|
|
9
|
-
line-height: 22px;
|
|
10
|
-
color: ${ne.text2};
|
|
11
|
-
text-transform: capitalize;
|
|
12
|
-
white-space: nowrap;
|
|
13
|
-
`,Ns=i.div`
|
|
14
|
-
display: flex;
|
|
15
|
-
flex-direction: column;
|
|
16
|
-
gap: 12px;
|
|
17
|
-
/* The list is the modal's elastic region: inside a viewport-capped card it gives up height first, so
|
|
18
|
-
the pack picker, total and Cancel/Buy below it stay on screen without scrolling. The floor is an
|
|
19
|
-
explicit ~one row because a scroll container's automatic minimum size is zero — it would otherwise
|
|
20
|
-
collapse to nothing on a short screen. */
|
|
21
|
-
min-height: 120px;
|
|
22
|
-
max-height: 360px;
|
|
23
|
-
overflow-y: auto;
|
|
24
|
-
width: 100%;
|
|
25
|
-
scrollbar-width: thin;
|
|
26
|
-
scrollbar-color: #a2a2a2 ${ne.media};
|
|
27
|
-
|
|
28
|
-
&::-webkit-scrollbar {
|
|
29
|
-
width: 8px;
|
|
30
|
-
}
|
|
31
|
-
&::-webkit-scrollbar-track {
|
|
32
|
-
background: ${ne.media};
|
|
33
|
-
border-radius: 10px;
|
|
34
|
-
}
|
|
35
|
-
&::-webkit-scrollbar-thumb {
|
|
36
|
-
background: #a2a2a2;
|
|
37
|
-
border-radius: ${Ws.btn};
|
|
38
|
-
}
|
|
39
|
-
`,Qs=i.span`
|
|
40
|
-
margin-left: 8px;
|
|
41
|
-
font-size: 13px;
|
|
42
|
-
font-weight: 600;
|
|
43
|
-
color: ${ne.muted};
|
|
44
|
-
`,Us=i.div`
|
|
45
|
-
display: flex;
|
|
46
|
-
align-items: center;
|
|
47
|
-
justify-content: space-between;
|
|
48
|
-
gap: 12px;
|
|
49
|
-
padding: 0 0 12px;
|
|
50
|
-
font-size: 14px;
|
|
51
|
-
color: ${ne.muted};
|
|
52
|
-
|
|
53
|
-
& strong {
|
|
54
|
-
display: inline-flex;
|
|
55
|
-
align-items: center;
|
|
56
|
-
gap: 6px;
|
|
57
|
-
font-size: 20px;
|
|
58
|
-
font-weight: 700;
|
|
59
|
-
color: ${ne.text};
|
|
60
|
-
}
|
|
61
|
-
`;function Gs(o){const{phase:p,balanceCredits:P,onClose:A}=o,W=p==="processing",J=p==="error"?a("cartCheckout.errorTitle"):p==="nofunds"?a("cartCheckout.titleNoFunds"):p==="choose"?a("buyModal.choosePayment"):a("cartCheckout.titleBuy"),X=p==="processing";return e.jsxs(Ta,{role:"dialog","aria-modal":"true","aria-label":a("cartCheckout.dialogAria"),children:[e.jsx(Ia,{onClick:W?void 0:A,"aria-hidden":!0}),e.jsxs(Pa,{"data-tall":X||void 0,children:[e.jsxs(Aa,{children:[e.jsxs(za,{children:[e.jsx(Ea,{children:J}),!W&&e.jsx(Ba,{onClick:A,"aria-label":a("buyModal.close"),children:e.jsx(Ra,{})})]}),e.jsxs(qa,{children:[e.jsx(Fa,{children:p==="nofunds"?a("buyModal.dclBalance"):a("buyModal.myCreditsBalance")}),e.jsx(vt,{}),e.jsx(_a,{children:le(P)})]})]}),p==="choose"&&e.jsxs(je,{children:[e.jsxs(Us,{children:[e.jsx("span",{children:a("cart.purchaseSummary")}),e.jsxs("strong",{children:[e.jsx(vt,{}),le(o.totalCredits??0)]})]}),e.jsx(Et,{options:o.options??[],totalCents:o.totalCents??0,shortfall:o.shortfall,onPay:o.onPay??(()=>{})})]}),p==="processing"&&e.jsx(Hs,{stage:o.stage??"reserving",step:o.step??1,total:o.total??1,isSelfCustody:!!o.isSelfCustody,signatures:o.signatures}),p==="nofunds"&&e.jsx(Os,{lines:o.lines??[],shortfallCredits:o.shortfallCredits??0,packs:o.packs??[],selectedPack:o.selectedPack??"",onSelectPack:o.onSelectPack??(()=>{}),onBuyPacks:o.onBuyPacks??(()=>{}),onCancel:A}),p==="error"&&e.jsxs(je,{children:[e.jsxs(Wa,{"data-testid":"buy-error",children:[e.jsx(La,{src:Ka,alt:"",width:64,height:80}),e.jsxs(Na,{children:[e.jsx("b",{children:a("cartCheckout.errorHeadline")})," ",o.heldCredits?e.jsxs(e.Fragment,{children:[o.message?e.jsxs(e.Fragment,{children:[o.message," "]}):null,a("cartCheckout.heldLead",{currency:Le.name}),e.jsx("b",{children:a("cartCheckout.heldBold")}),a("cartCheckout.heldTail",{currency:Le.name})]}):o.message??a("cartCheckout.errorBody")]})]}),o.heldCredits?e.jsx(Ke,{children:e.jsx(de,{"data-variant":"purple","data-full":!0,onClick:A,children:a("cartCheckout.gotIt")})}):e.jsxs(Ke,{children:[e.jsx(de,{"data-variant":"outline",onClick:A,children:a("buyModal.cancel")}),e.jsx(de,{"data-variant":"purple",onClick:o.onRetry??A,children:a("cartCheckout.tryAgain")})]})]})]})]})}function Hs({stage:o,step:p,total:P,isSelfCustody:A,signatures:W}){const J=o==="reserving",X=P>0?Math.min(100,Math.round(p/P*100)):0,K=A&&W&&W.total>1,ie=o==="awaiting-signature"?A?K?a("cartCheckout.confirmMultiple",{current:W.current,total:W.total}):a("buyModal.confirmToContinue"):a("buyModal.completingTransaction"):o==="settling"?a("buyModal.completingTransaction"):a("cartCheckout.preparing");return e.jsxs(je,{"data-processing":!0,children:[e.jsx(Qa,{src:ca,alt:"",width:61,height:61}),e.jsx(Ua,{children:ie}),J?e.jsxs(Ls,{children:[e.jsx(wt,{"aria-hidden":!0,children:e.jsx(Ct,{"data-step":!0,style:{width:`${X}%`}})}),P>1?e.jsxs(Ks,{children:[p,"/",P]}):null]}):e.jsx(wt,{"aria-hidden":!0,children:e.jsx(Ct,{})})]})}function Os({lines:o,shortfallCredits:p,packs:P,selectedPack:A,onSelectPack:W,onBuyPacks:J,onCancel:X}){const K=P.find(n=>n.id===A),ie=o.reduce((n,N)=>n+(N.quantity??1),0);return e.jsxs(je,{children:[e.jsxs(Ga,{"data-testid":"nofunds-warning",children:[e.jsx(Ha,{}),e.jsxs(Oa,{children:[e.jsx("b",{children:a("buyModal.insufficientFunds")})," ",a("buyModal.warningNeedToBuy")," ",e.jsx("b",{children:a("buyModal.warningCreditsAmount",{count:Math.max(0,p)})})," ",a("buyModal.warningToPurchase",{count:ie}),Ee()?null:e.jsxs(e.Fragment,{children:[e.jsx("br",{}),e.jsx(Va,{href:la("/credits"),target:"_blank",rel:"noopener noreferrer",children:a("buyModal.warningLearnMore")})]})]})]}),e.jsx(Ns,{children:o.map(n=>{const N=n.quantity??1;return e.jsxs(Da,{children:[e.jsx(Ja,{children:n.item.thumbnail?e.jsx("img",{src:n.item.thumbnail,alt:""}):null}),e.jsxs(Xa,{children:[e.jsxs("div",{children:[e.jsxs(Ya,{title:n.item.name,children:[n.item.name||a("buyModal.itemFallback"),N>1?e.jsx(Qs,{children:a("cartCheckout.qty",{count:N})}):null]}),n.item.creator?e.jsx(Za,{address:n.item.creator}):null]}),e.jsxs(es,{children:[e.jsx(ts,{}),e.jsx("span",{children:le(n.priceCredits*N)})]})]})]},n.item.id)})}),Ee()?null:e.jsxs(e.Fragment,{children:[e.jsx(as,{children:P.map(n=>{const N=n.id===A;return e.jsxs(ss,{"data-testid":"credit-pack","data-on":N||void 0,onClick:()=>W(n.id),children:[e.jsx(ns,{src:is,alt:""}),e.jsx(rs,{children:le(n.credits)}),e.jsxs(os,{children:["($",n.usd.toFixed(2),")"]})]},n.id)})}),e.jsxs(cs,{children:[e.jsxs(ls,{children:[e.jsx(ds,{}),e.jsx("span",{children:le((K==null?void 0:K.credits)??0)})]}),e.jsxs(us,{children:["$",((K==null?void 0:K.usd)??0).toFixed(2)]})]})]}),e.jsxs(Ke,{children:[e.jsx(de,{"data-variant":"outline",onClick:X,children:a("buyModal.cancel")}),Ee()?null:e.jsx(de,{"data-variant":"gradient",onClick:J,children:a("buyModal.buy")})]})]})}const{colors:l,gradients:Vs,radius:te}=ue,Bt="@media (max-width: 1080px)",I="@media (max-width: 880px)",Tt=i.div`
|
|
62
|
-
max-width: 1510px;
|
|
63
|
-
margin: 0 auto;
|
|
64
|
-
/* Grows into the page's leftover height and passes it down to Upsell, so the white cross-sell band ends at
|
|
65
|
-
the footer rather than leaving a gray strip. Needs .page[data-route="/cart"] to be a flex column. */
|
|
66
|
-
width: 100%;
|
|
67
|
-
flex: 1 0 auto;
|
|
68
|
-
display: flex;
|
|
69
|
-
flex-direction: column;
|
|
70
|
-
|
|
71
|
-
${I} {
|
|
72
|
-
padding-bottom: 188px; /* room for the fixed summary bar */
|
|
73
|
-
}
|
|
74
|
-
`,It=i.button`
|
|
75
|
-
display: inline-flex;
|
|
76
|
-
align-items: center;
|
|
77
|
-
gap: 6px;
|
|
78
|
-
margin: 0 0 16px;
|
|
79
|
-
padding: 0;
|
|
80
|
-
border: 0;
|
|
81
|
-
background: none;
|
|
82
|
-
color: ${l.text2};
|
|
83
|
-
font-size: 14px;
|
|
84
|
-
font-weight: 600;
|
|
85
|
-
letter-spacing: 0.02em;
|
|
86
|
-
text-transform: uppercase;
|
|
87
|
-
cursor: pointer;
|
|
88
|
-
transition: color 0.15s ease;
|
|
89
|
-
|
|
90
|
-
&:hover {
|
|
91
|
-
color: ${l.accent};
|
|
92
|
-
}
|
|
93
|
-
& .ico {
|
|
94
|
-
width: 18px;
|
|
95
|
-
height: 18px;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
${I} {
|
|
99
|
-
display: none;
|
|
100
|
-
}
|
|
101
|
-
`,Ds=i.div`
|
|
102
|
-
display: grid;
|
|
103
|
-
grid-template-columns: minmax(0, 1fr) 615px;
|
|
104
|
-
gap: 24px;
|
|
105
|
-
align-items: start;
|
|
106
|
-
|
|
107
|
-
${Bt} {
|
|
108
|
-
grid-template-columns: 1fr;
|
|
109
|
-
}
|
|
110
|
-
`,Pt=i.div`
|
|
111
|
-
position: relative;
|
|
112
|
-
/* The gray band is 733px in Figma (1553-317103) — taller than the panels inside it, deliberately. Without
|
|
113
|
-
this it collapsed to the panels' height, and the page shell's own viewport-filling min-height then padded
|
|
114
|
-
the page out BELOW the cross-sell, so a strip of gray showed under "You might also like" instead of the
|
|
115
|
-
footer. Giving the band its designed height puts the leftover space where the design wants it. */
|
|
116
|
-
min-height: 733px;
|
|
117
|
-
/* Gray below the panels so the band never hugs the last card: Figma's band runs y152–950 with the
|
|
118
|
-
content ending at 854. The min-height above only covers a SHORT cart — once the list outgrows it
|
|
119
|
-
the band tracks the content, and without this padding it would butt straight into the purple. */
|
|
120
|
-
padding-bottom: 96px;
|
|
121
|
-
|
|
122
|
-
&::before {
|
|
123
|
-
content: '';
|
|
124
|
-
position: absolute;
|
|
125
|
-
top: -28px;
|
|
126
|
-
bottom: 0;
|
|
127
|
-
left: 50%;
|
|
128
|
-
width: 100vw;
|
|
129
|
-
transform: translateX(-50%);
|
|
130
|
-
background: ${l.media};
|
|
131
|
-
z-index: 0;
|
|
132
|
-
}
|
|
133
|
-
& > * {
|
|
134
|
-
position: relative;
|
|
135
|
-
z-index: 1;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
${I} {
|
|
139
|
-
/* The single-column layout is already taller than the desktop band, and the fixed summary bar sits over
|
|
140
|
-
the bottom of it — a floor here would only add empty gray. */
|
|
141
|
-
min-height: 0;
|
|
142
|
-
|
|
143
|
-
/* The fixed summary bar already reserves room at the bottom on mobile (see Checkout). */
|
|
144
|
-
padding-bottom: 32px;
|
|
145
|
-
|
|
146
|
-
&::before {
|
|
147
|
-
top: -16px; /* .page's mobile padding */
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
`,Js=i.div`
|
|
151
|
-
min-width: 0;
|
|
152
|
-
display: flex;
|
|
153
|
-
flex-direction: column;
|
|
154
|
-
gap: 12px;
|
|
155
|
-
`,Xs=i.div`
|
|
156
|
-
display: flex;
|
|
157
|
-
align-items: center;
|
|
158
|
-
justify-content: space-between;
|
|
159
|
-
gap: 12px;
|
|
160
|
-
background: ${l.white};
|
|
161
|
-
border-radius: 16px;
|
|
162
|
-
padding: 12px 12px 12px 24px;
|
|
163
|
-
|
|
164
|
-
${I} {
|
|
165
|
-
gap: 8px;
|
|
166
|
-
padding: 8px 16px;
|
|
167
|
-
}
|
|
168
|
-
`,Rt=i.section`
|
|
169
|
-
min-width: 0;
|
|
170
|
-
background: ${l.white};
|
|
171
|
-
border-radius: 16px;
|
|
172
|
-
padding: 24px;
|
|
173
|
-
|
|
174
|
-
${I} {
|
|
175
|
-
padding: 16px;
|
|
176
|
-
}
|
|
177
|
-
`,Ys=i(Rt)`
|
|
178
|
-
display: flex;
|
|
179
|
-
flex-direction: column;
|
|
180
|
-
align-items: center;
|
|
181
|
-
justify-content: center;
|
|
182
|
-
gap: 24px;
|
|
183
|
-
min-height: 420px;
|
|
184
|
-
padding: 48px 16px;
|
|
185
|
-
text-align: center;
|
|
186
|
-
color: ${l.text};
|
|
187
|
-
|
|
188
|
-
${ue.media.maxWidth("mobile")} {
|
|
189
|
-
min-height: 320px;
|
|
190
|
-
padding: 32px 16px;
|
|
191
|
-
}
|
|
192
|
-
`,Zs=i.div`
|
|
193
|
-
display: flex;
|
|
194
|
-
flex-direction: column;
|
|
195
|
-
align-items: center;
|
|
196
|
-
gap: 12px;
|
|
197
|
-
padding-bottom: 16px;
|
|
198
|
-
`,en=i.p`
|
|
199
|
-
margin: 0;
|
|
200
|
-
font-size: 24px;
|
|
201
|
-
font-weight: 700;
|
|
202
|
-
line-height: 1.6;
|
|
203
|
-
|
|
204
|
-
${ue.media.maxWidth("mobile")} {
|
|
205
|
-
font-size: 20px;
|
|
206
|
-
}
|
|
207
|
-
`,tn=i.p`
|
|
208
|
-
margin: 0;
|
|
209
|
-
font-size: 20px;
|
|
210
|
-
font-weight: 400;
|
|
211
|
-
line-height: 1.6;
|
|
212
|
-
|
|
213
|
-
${ue.media.maxWidth("mobile")} {
|
|
214
|
-
font-size: 16px;
|
|
215
|
-
}
|
|
216
|
-
`,an=i(Ne)`
|
|
217
|
-
display: inline-flex;
|
|
218
|
-
align-items: center;
|
|
219
|
-
justify-content: center;
|
|
220
|
-
width: 310px;
|
|
221
|
-
max-width: 100%;
|
|
222
|
-
height: 56px;
|
|
223
|
-
padding: 0 12px;
|
|
224
|
-
border-radius: ${te.card};
|
|
225
|
-
background: ${l.accent};
|
|
226
|
-
color: ${l.softWhite};
|
|
227
|
-
font-size: 15px;
|
|
228
|
-
font-weight: 600;
|
|
229
|
-
line-height: 24px;
|
|
230
|
-
letter-spacing: 0.46px;
|
|
231
|
-
text-transform: uppercase;
|
|
232
|
-
text-decoration: none;
|
|
233
|
-
transition: background 0.15s ease;
|
|
234
|
-
|
|
235
|
-
&:hover {
|
|
236
|
-
background: ${l.accentHover};
|
|
237
|
-
}
|
|
238
|
-
&:focus-visible {
|
|
239
|
-
outline: 2px solid ${l.accent};
|
|
240
|
-
outline-offset: 2px;
|
|
241
|
-
}
|
|
242
|
-
`,sn=i.button`
|
|
243
|
-
display: none;
|
|
244
|
-
|
|
245
|
-
${I} {
|
|
246
|
-
display: inline-flex;
|
|
247
|
-
align-items: center;
|
|
248
|
-
flex-shrink: 0;
|
|
249
|
-
border: 0;
|
|
250
|
-
background: none;
|
|
251
|
-
padding: 0;
|
|
252
|
-
color: ${l.text};
|
|
253
|
-
cursor: pointer;
|
|
254
|
-
|
|
255
|
-
& .ico {
|
|
256
|
-
width: 20px;
|
|
257
|
-
height: 20px;
|
|
258
|
-
}
|
|
259
|
-
}
|
|
260
|
-
`,nn=i.h1`
|
|
261
|
-
margin: 0;
|
|
262
|
-
font-size: 14px;
|
|
263
|
-
font-weight: 600;
|
|
264
|
-
line-height: 1.57;
|
|
265
|
-
color: ${l.text};
|
|
266
|
-
|
|
267
|
-
${I} {
|
|
268
|
-
flex: 1;
|
|
269
|
-
min-width: 0;
|
|
270
|
-
font-size: 16px;
|
|
271
|
-
}
|
|
272
|
-
`,rn=i.button`
|
|
273
|
-
display: inline-flex;
|
|
274
|
-
align-items: center;
|
|
275
|
-
justify-content: center;
|
|
276
|
-
gap: 8px;
|
|
277
|
-
height: 40px;
|
|
278
|
-
padding: 0 12px;
|
|
279
|
-
border: 2px solid ${l.text2};
|
|
280
|
-
border-radius: ${te.btn};
|
|
281
|
-
background: none;
|
|
282
|
-
color: ${l.text2};
|
|
283
|
-
font-size: 13px;
|
|
284
|
-
font-weight: 600;
|
|
285
|
-
line-height: 24px;
|
|
286
|
-
letter-spacing: 0.46px;
|
|
287
|
-
text-transform: uppercase;
|
|
288
|
-
white-space: nowrap;
|
|
289
|
-
cursor: pointer;
|
|
290
|
-
transition:
|
|
291
|
-
background 0.15s ease,
|
|
292
|
-
filter 0.15s ease;
|
|
293
|
-
|
|
294
|
-
/* Mixed from currentColor so the wash cannot drift from the border colour. */
|
|
295
|
-
&:hover:not(:disabled) {
|
|
296
|
-
background: color-mix(in srgb, currentColor 6%, transparent);
|
|
297
|
-
}
|
|
298
|
-
&:active:not(:disabled) {
|
|
299
|
-
filter: brightness(0.97);
|
|
300
|
-
}
|
|
301
|
-
&:disabled {
|
|
302
|
-
opacity: 0.55;
|
|
303
|
-
cursor: default;
|
|
304
|
-
}
|
|
305
|
-
|
|
306
|
-
/* Mobile keeps the full 40px button and thins the outline to 1px (1182:236892) rather than shrinking
|
|
307
|
-
the type, which had it reading smaller than the row title beside it. */
|
|
308
|
-
${I} {
|
|
309
|
-
border-width: 1px;
|
|
310
|
-
border-color: ${l.text};
|
|
311
|
-
color: ${l.text};
|
|
312
|
-
}
|
|
313
|
-
`,on=i.div`
|
|
314
|
-
display: flex;
|
|
315
|
-
flex-direction: column;
|
|
316
|
-
gap: 24px;
|
|
317
|
-
`,cn=i.div`
|
|
318
|
-
position: relative;
|
|
319
|
-
display: flex;
|
|
320
|
-
align-items: stretch;
|
|
321
|
-
gap: 12px;
|
|
322
|
-
background: ${l.white};
|
|
323
|
-
border: 1px solid ${l.gray4};
|
|
324
|
-
border-radius: ${te.card};
|
|
325
|
-
overflow: hidden;
|
|
326
|
-
|
|
327
|
-
&[data-unavailable] [data-thumb] {
|
|
328
|
-
opacity: 0.5;
|
|
329
|
-
}
|
|
330
|
-
&[data-unavailable] [data-check] {
|
|
331
|
-
display: none;
|
|
332
|
-
}
|
|
333
|
-
&[data-unavailable] [data-desc] {
|
|
334
|
-
opacity: 0.7;
|
|
335
|
-
}
|
|
336
|
-
`,ln=i.div`
|
|
337
|
-
position: relative;
|
|
338
|
-
flex-shrink: 0;
|
|
339
|
-
width: 137.5px;
|
|
340
|
-
height: 137px;
|
|
341
|
-
background: ${l.media};
|
|
342
|
-
border-radius: ${te.card};
|
|
343
|
-
display: grid;
|
|
344
|
-
place-items: center;
|
|
345
|
-
overflow: hidden;
|
|
346
|
-
|
|
347
|
-
& img {
|
|
348
|
-
width: 83%;
|
|
349
|
-
height: 83%;
|
|
350
|
-
object-fit: contain;
|
|
351
|
-
filter: drop-shadow(0.56px 2.25px 2.8px rgba(0, 0, 0, 0.1));
|
|
352
|
-
}
|
|
353
|
-
|
|
354
|
-
${I} {
|
|
355
|
-
width: 120px;
|
|
356
|
-
height: 120px;
|
|
357
|
-
}
|
|
358
|
-
`,dn=i(Ne)`
|
|
359
|
-
position: absolute;
|
|
360
|
-
inset: 0;
|
|
361
|
-
display: grid;
|
|
362
|
-
place-items: center;
|
|
363
|
-
`,un=i.span`
|
|
364
|
-
position: absolute;
|
|
365
|
-
top: 7.5px;
|
|
366
|
-
left: 7.5px;
|
|
367
|
-
width: 20px;
|
|
368
|
-
height: 20px;
|
|
369
|
-
border-radius: 50%;
|
|
370
|
-
background: #34ce77;
|
|
371
|
-
display: grid;
|
|
372
|
-
place-items: center;
|
|
373
|
-
`,hn=i.div`
|
|
374
|
-
flex: 1;
|
|
375
|
-
min-width: 0;
|
|
376
|
-
display: flex;
|
|
377
|
-
flex-direction: column;
|
|
378
|
-
justify-content: space-between;
|
|
379
|
-
gap: 8px;
|
|
380
|
-
padding: 16px 8px;
|
|
381
|
-
|
|
382
|
-
${I} {
|
|
383
|
-
padding: 12px 4px 12px 0;
|
|
384
|
-
}
|
|
385
|
-
`,pn=i.div`
|
|
386
|
-
display: flex;
|
|
387
|
-
flex-direction: column;
|
|
388
|
-
gap: 4px;
|
|
389
|
-
min-width: 0;
|
|
390
|
-
padding-right: 64px; /* clear the top-right favourite + remove group */
|
|
391
|
-
`,qt=Qe`
|
|
392
|
-
display: block;
|
|
393
|
-
font-size: 16px;
|
|
394
|
-
font-weight: 600;
|
|
395
|
-
line-height: 1.2;
|
|
396
|
-
color: ${l.text};
|
|
397
|
-
text-decoration: none;
|
|
398
|
-
overflow: hidden;
|
|
399
|
-
text-overflow: ellipsis;
|
|
400
|
-
white-space: nowrap;
|
|
401
|
-
|
|
402
|
-
a&:hover {
|
|
403
|
-
color: ${l.accent};
|
|
404
|
-
}
|
|
405
|
-
|
|
406
|
-
${I} {
|
|
407
|
-
white-space: normal;
|
|
408
|
-
display: -webkit-box;
|
|
409
|
-
-webkit-line-clamp: 2;
|
|
410
|
-
line-clamp: 2;
|
|
411
|
-
-webkit-box-orient: vertical;
|
|
412
|
-
}
|
|
413
|
-
`,gn=i.div`
|
|
414
|
-
${qt};
|
|
415
|
-
`,mn=i(Ne)`
|
|
416
|
-
${qt};
|
|
417
|
-
`,xn=i(da)`
|
|
418
|
-
font-size: 10px;
|
|
419
|
-
line-height: 1.43;
|
|
420
|
-
color: ${l.muted};
|
|
421
|
-
|
|
422
|
-
& [data-avatar] {
|
|
423
|
-
display: none;
|
|
424
|
-
}
|
|
425
|
-
& [data-testid='creator-name'] {
|
|
426
|
-
font-size: 10px;
|
|
427
|
-
line-height: 1.43;
|
|
428
|
-
}
|
|
429
|
-
`,fn=i.div`
|
|
430
|
-
display: flex;
|
|
431
|
-
align-items: center;
|
|
432
|
-
justify-content: space-between;
|
|
433
|
-
gap: 12px;
|
|
434
|
-
padding-right: 8px;
|
|
435
|
-
`,yn=i.div`
|
|
436
|
-
display: inline-flex;
|
|
437
|
-
align-items: center;
|
|
438
|
-
gap: 8px;
|
|
439
|
-
padding: 6px;
|
|
440
|
-
border: 0.5px solid ${l.muted2};
|
|
441
|
-
border-radius: ${te.pill};
|
|
442
|
-
`,At=i.button`
|
|
443
|
-
display: grid;
|
|
444
|
-
place-items: center;
|
|
445
|
-
width: 16px;
|
|
446
|
-
height: 16px;
|
|
447
|
-
padding: 0;
|
|
448
|
-
border: 0;
|
|
449
|
-
background: none;
|
|
450
|
-
color: ${l.text};
|
|
451
|
-
cursor: pointer;
|
|
452
|
-
|
|
453
|
-
&:disabled {
|
|
454
|
-
color: ${l.muted2};
|
|
455
|
-
cursor: default;
|
|
456
|
-
}
|
|
457
|
-
`,bn=i.span`
|
|
458
|
-
min-width: 12px;
|
|
459
|
-
font-size: 14px;
|
|
460
|
-
font-weight: 500;
|
|
461
|
-
line-height: 1.2;
|
|
462
|
-
color: ${l.text};
|
|
463
|
-
text-align: center;
|
|
464
|
-
`,vn=i.div`
|
|
465
|
-
display: inline-flex;
|
|
466
|
-
align-items: center;
|
|
467
|
-
gap: 4px;
|
|
468
|
-
/* Always right-aligned: with a stepper present space-between handles it; for secondary/unique lines
|
|
469
|
-
(no stepper) the auto margin keeps the lone price on the right instead of falling to the left. */
|
|
470
|
-
margin-left: auto;
|
|
471
|
-
font-size: 24px;
|
|
472
|
-
font-weight: 600;
|
|
473
|
-
color: ${l.text2};
|
|
474
|
-
|
|
475
|
-
${I} {
|
|
476
|
-
font-size: 20px;
|
|
477
|
-
}
|
|
478
|
-
`,wn=i(zt)`
|
|
479
|
-
width: 24px;
|
|
480
|
-
height: 24px;
|
|
481
|
-
background: ${l.text};
|
|
482
|
-
|
|
483
|
-
${I} {
|
|
484
|
-
width: 20px;
|
|
485
|
-
height: 20px;
|
|
486
|
-
}
|
|
487
|
-
`,Cn=i.span`
|
|
488
|
-
margin-left: 6px;
|
|
489
|
-
font-size: 14px;
|
|
490
|
-
font-weight: 500;
|
|
491
|
-
color: ${l.muted};
|
|
492
|
-
text-decoration: line-through;
|
|
493
|
-
`,jn=i.div`
|
|
494
|
-
position: absolute;
|
|
495
|
-
top: 9px;
|
|
496
|
-
right: 7px;
|
|
497
|
-
display: flex;
|
|
498
|
-
align-items: flex-start;
|
|
499
|
-
gap: 12px;
|
|
500
|
-
`,kn=i.span`
|
|
501
|
-
display: inline-flex;
|
|
502
|
-
align-items: center;
|
|
503
|
-
gap: 4px;
|
|
504
|
-
font-size: 12px;
|
|
505
|
-
font-weight: 600;
|
|
506
|
-
line-height: 1;
|
|
507
|
-
text-transform: uppercase;
|
|
508
|
-
color: ${l.text2};
|
|
509
|
-
`,$n=i(O)`
|
|
510
|
-
color: #f48221;
|
|
511
|
-
`,Sn=i.span`
|
|
512
|
-
align-self: flex-start;
|
|
513
|
-
display: inline-flex;
|
|
514
|
-
align-items: center;
|
|
515
|
-
gap: 4px;
|
|
516
|
-
padding: 2px 4px;
|
|
517
|
-
border-radius: ${te.chip};
|
|
518
|
-
background: #f4e9ff;
|
|
519
|
-
font-size: 10px;
|
|
520
|
-
font-weight: 400;
|
|
521
|
-
line-height: 14px;
|
|
522
|
-
color: ${l.text};
|
|
523
|
-
`,Mn=i(O)`
|
|
524
|
-
width: 11.31px;
|
|
525
|
-
height: 10.94px;
|
|
526
|
-
background: ${l.text};
|
|
527
|
-
`,Ft=Qe`
|
|
528
|
-
display: grid;
|
|
529
|
-
place-items: center;
|
|
530
|
-
width: 24px;
|
|
531
|
-
height: 24px;
|
|
532
|
-
padding: 0;
|
|
533
|
-
border: 0;
|
|
534
|
-
background: none;
|
|
535
|
-
color: ${l.muted};
|
|
536
|
-
cursor: pointer;
|
|
537
|
-
transition: color 0.12s ease;
|
|
538
|
-
|
|
539
|
-
&:disabled {
|
|
540
|
-
opacity: 0.5;
|
|
541
|
-
cursor: default;
|
|
542
|
-
}
|
|
543
|
-
`,Tn=i.button`
|
|
544
|
-
${Ft};
|
|
545
|
-
|
|
546
|
-
&:hover:not(:disabled) {
|
|
547
|
-
color: ${l.text};
|
|
548
|
-
}
|
|
549
|
-
&[data-on] {
|
|
550
|
-
color: ${l.dclRed};
|
|
551
|
-
}
|
|
552
|
-
`,In=i.button`
|
|
553
|
-
${Ft};
|
|
554
|
-
|
|
555
|
-
&:hover:not(:disabled) {
|
|
556
|
-
color: ${l.dclRed};
|
|
557
|
-
}
|
|
558
|
-
`,Pn=i.div`
|
|
559
|
-
display: flex;
|
|
560
|
-
gap: 20px;
|
|
561
|
-
margin-top: 16px;
|
|
562
|
-
|
|
563
|
-
& .link {
|
|
564
|
-
font-size: 13px;
|
|
565
|
-
color: ${l.muted};
|
|
566
|
-
font-weight: 600;
|
|
567
|
-
}
|
|
568
|
-
& .link:hover:not(:disabled) {
|
|
569
|
-
color: ${l.text};
|
|
570
|
-
}
|
|
571
|
-
`,An=i.aside`
|
|
572
|
-
position: sticky;
|
|
573
|
-
top: 172px;
|
|
574
|
-
display: flex;
|
|
575
|
-
flex-direction: column;
|
|
576
|
-
background: ${l.white};
|
|
577
|
-
box-shadow: 0 1px 3px rgba(22, 21, 24, 0.06);
|
|
578
|
-
border-radius: 16px;
|
|
579
|
-
padding: 16px;
|
|
580
|
-
|
|
581
|
-
${Bt} {
|
|
582
|
-
position: static;
|
|
583
|
-
}
|
|
584
|
-
${I} {
|
|
585
|
-
position: fixed;
|
|
586
|
-
left: 0;
|
|
587
|
-
right: 0;
|
|
588
|
-
top: auto;
|
|
589
|
-
bottom: 0;
|
|
590
|
-
z-index: 30;
|
|
591
|
-
border: 0;
|
|
592
|
-
/* Square and hard-edged against the page (1182:236910): it is a bar docked to the bottom, not a sheet
|
|
593
|
-
lifted off it. */
|
|
594
|
-
border-radius: 0;
|
|
595
|
-
box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.25);
|
|
596
|
-
}
|
|
597
|
-
`,zn=i.h2`
|
|
598
|
-
margin: 0 0 24px;
|
|
599
|
-
padding-bottom: 16px;
|
|
600
|
-
border-bottom: 1px solid ${l.gray4};
|
|
601
|
-
font-size: 24px;
|
|
602
|
-
font-weight: 600;
|
|
603
|
-
color: ${l.text};
|
|
604
|
-
|
|
605
|
-
${I} {
|
|
606
|
-
margin-bottom: 12px;
|
|
607
|
-
padding-bottom: 8px;
|
|
608
|
-
font-size: 16px;
|
|
609
|
-
line-height: 1.6;
|
|
610
|
-
}
|
|
611
|
-
`,En=i.div`
|
|
612
|
-
display: flex;
|
|
613
|
-
flex-direction: column;
|
|
614
|
-
gap: 12px;
|
|
615
|
-
`,Bn=i.div`
|
|
616
|
-
display: flex;
|
|
617
|
-
align-items: flex-start;
|
|
618
|
-
justify-content: space-between;
|
|
619
|
-
gap: 12px;
|
|
620
|
-
`,Rn=i.span`
|
|
621
|
-
font-size: 14px;
|
|
622
|
-
font-weight: 600;
|
|
623
|
-
line-height: 1.57;
|
|
624
|
-
color: ${l.muted1};
|
|
625
|
-
`,qn=i.span`
|
|
626
|
-
display: inline-flex;
|
|
627
|
-
align-items: center;
|
|
628
|
-
gap: 8px;
|
|
629
|
-
font-size: 24px;
|
|
630
|
-
font-weight: 700;
|
|
631
|
-
color: ${l.text};
|
|
632
|
-
`,Fn=i.span`
|
|
633
|
-
display: flex;
|
|
634
|
-
flex-direction: column;
|
|
635
|
-
align-items: flex-end;
|
|
636
|
-
justify-content: center;
|
|
637
|
-
gap: 4px;
|
|
638
|
-
`;i.span`
|
|
639
|
-
font-size: 12px;
|
|
640
|
-
font-weight: 400;
|
|
641
|
-
line-height: 1;
|
|
642
|
-
color: ${l.muted};
|
|
643
|
-
`;const _n=i(zt)`
|
|
644
|
-
width: 30px;
|
|
645
|
-
height: 30px;
|
|
646
|
-
background: ${l.text};
|
|
647
|
-
-webkit-mask-size: 24px 24px;
|
|
648
|
-
mask-size: 24px 24px;
|
|
649
|
-
-webkit-mask-position: left center;
|
|
650
|
-
mask-position: left center;
|
|
651
|
-
`;i.button`
|
|
652
|
-
width: 100%;
|
|
653
|
-
height: 56px;
|
|
654
|
-
border: 0;
|
|
655
|
-
border-radius: ${te.btn};
|
|
656
|
-
background: ${Vs.buyBtn};
|
|
657
|
-
color: ${l.softWhite};
|
|
658
|
-
font-size: 15px;
|
|
659
|
-
font-weight: 600;
|
|
660
|
-
letter-spacing: 0.046em;
|
|
661
|
-
text-transform: uppercase;
|
|
662
|
-
cursor: pointer;
|
|
663
|
-
transition: background-image 0.15s ease;
|
|
664
|
-
|
|
665
|
-
/* Primary hover/pressed is the solid Primary red (Figma 738:53252 / 738:53262) — the gradient is
|
|
666
|
-
the RESTING fill only. Painted as a flat GRADIENT, not a background-color: the shorthand can't
|
|
667
|
-
interpolate background-image, so gradient -> colour dropped the image midway while the colour was
|
|
668
|
-
still half transparent and the button visibly blinked. Same property both ends = a clean swap. */
|
|
669
|
-
&:hover:not(:disabled),
|
|
670
|
-
&:active:not(:disabled) {
|
|
671
|
-
background-image: linear-gradient(${l.dclRed}, ${l.dclRed});
|
|
672
|
-
}
|
|
673
|
-
&:disabled {
|
|
674
|
-
opacity: 0.6;
|
|
675
|
-
cursor: default;
|
|
676
|
-
}
|
|
677
|
-
`;const _t=Qe`
|
|
678
|
-
margin: 0;
|
|
679
|
-
font-size: 13px;
|
|
680
|
-
`,we=i.p`
|
|
681
|
-
${_t};
|
|
682
|
-
`,Wn=i(_s)`
|
|
683
|
-
${_t};
|
|
684
|
-
`,Ln=i.div`
|
|
685
|
-
position: relative;
|
|
686
|
-
flex: 1 0 auto;
|
|
687
|
-
margin-top: 48px;
|
|
688
|
-
/* Below the gray band the cross-sell sits straight on the purple field (Figma) — hence no band of its
|
|
689
|
-
own. The padding is the whole gap from the top of the section to the heading; the shared carousel's
|
|
690
|
-
own top margin is zeroed below so the two don't stack. */
|
|
691
|
-
padding: 47px 0 24px;
|
|
692
|
-
|
|
693
|
-
& section {
|
|
694
|
-
margin-top: 0;
|
|
695
|
-
}
|
|
696
|
-
`;function _e(o){if(qs(o))return a("errors.rejected");const p=(o.message??"").toLowerCase();return p.includes("insufficient")?a("cart.error.insufficient",{currency:Le.name}):p.includes("no active listing")||p.includes("your own listing")?a("cart.error.listingChanged"):a("marketCheckout.error.generic")}const Kn=12e4;function Nn(o){const p=[];return o.unavailable.length&&p.push(a("cart.drop.unavailable",{count:o.unavailable.length})),o.own.length&&p.push(a("cart.drop.own",{count:o.own.length})),a("cart.drop.removed",{items:p.join(` ${a("cart.drop.and")} `)})}const We=o=>o.reduce((p,P)=>p+P.priceCredits*P.quantity,0),Ce=o=>o.flatMap(p=>Array.from({length:p.quantity},()=>({...p,quantity:1})));function si(){ua({title:a("nav.cart"),noindex:!0});const o=H(t=>t.items),p=H(t=>t.remove),P=H(t=>t.increment),A=H(t=>t.decrement),W=H(t=>t.clear),J=H(t=>t.restore),X=H(t=>t.setFittingOpen),K=ut(t=>t.items),ie=ut(t=>t.toggle),{session:n,signIn:N}=ha(),Wt=pa(),he=zs().packs.slice(0,Es);T.useEffect(()=>(document.body.classList.add("shop-cart-bg"),()=>document.body.classList.remove("shop-cart-bg")),[]);const Lt=o.some(t=>t.category!=="emote"),{data:ke}=ga({queryKey:["upsell-listings"],queryFn:()=>Ma({first:40}),staleTime:6e4}),{data:S}=ma(n),v=xa(),Y=ra(),{state:E}=oa(),[Kt,re]=T.useState(null),[Ue,pe]=T.useState(null),[Nt,q]=T.useState(!1),[F,V]=T.useState(null),Ge=T.useRef(0),[h,j]=T.useState(null),{data:ge}=fa(n),{data:oe}=ya(!0),[$e,He]=T.useState(""),ce=T.useRef(null),Oe=ba(o),Ve=t=>pt(Oe[t.id]),Se=o.filter(Ve),De=o.length>0&&Se.length===0,Qt=Se.reduce((t,s)=>t+s.priceCredits*s.quantity,0),Ut=o.reduce((t,s)=>t+s.quantity,0),Gt=Se.reduce((t,s)=>t+s.quantity,0),Je=F?F.liveTotalCredits:Qt,Ht=new Set(o.map(t=>t.id)),Xe=((ke==null?void 0:ke.items)??[]).filter(t=>!Ht.has(t.id)).slice(0,12),Ot=new Map(F==null?void 0:F.buyable.map(t=>[t.item.id,t])),me=(S==null?void 0:S.credits)??0,Me=Je*10,Vt=oe?ht(Me,oe):0n,Te=Re({priceCents:Me,priceManaWei:Vt,balanceCents:(S==null?void 0:S.balanceCents)??0,manaBalanceWei:ge??0n}),Dt=t=>t.flatMap(s=>{const c=Fe(s);return c.kind==="store"?[c.mint]:[]}),Jt=t=>t.flatMap(s=>s.acquisition==="trade"?[s.trade]:[]),Xt=ja,Yt=t=>$a(t.contractAddress,String(t.itemId));function xe(t){t(),V(null),pe(null),re(null)}function Zt(){j(null),q(!1)}function Ye(t){const s=We(t),c=Math.max(0,s-me),r=he.find(d=>d.credits>=c)??he[he.length-1];He(r.id),D("Shop Buy Credits Prompted",{from:"cart_checkout",credits_needed:s,credits_balance:me,shortfall:c}),j({phase:"nofunds",lines:t.map(d=>({item:d.item,priceCredits:d.priceCredits,quantity:d.quantity})),shortfall:c}),q(!1)}async function Ie(t){if(!n||t.length===0)return;const s=Ce(t),c=s.map(m=>({...m.item,priceCredits:m.priceCredits})),r=t.map(m=>({...m.item,priceCredits:m.priceCredits,quantity:m.quantity})),d=[];let b="authorize";const x=new Set,B=new Set,L=new Set,_=[];let w=!1;j({phase:"processing",stage:"reserving",step:1,total:s.length});try{const m=[];for(let u=0;u<s.length;u++){const g=s[u];j({phase:"processing",stage:"reserving",step:u+1,total:s.length});try{const $=g.acquisition==="trade"?g.trade.id:void 0,y=g.item.contractAddress&&g.item.itemId!=null?{contractAddress:g.item.contractAddress,itemId:String(g.item.itemId)}:void 0,{credit:z,maxCreditedValue:R}=await xt(n.identity,g.usdCents,$,y);d.push({salt:z.id,itemId:g.item.id}),m.push(g.acquisition==="store"?{kind:"store",item:{collection:g.item.contractAddress,itemId:String(g.item.itemId),priceWei:g.priceWei},credits:[z],maxCreditedValue:R,chainId:g.item.chainId}:{kind:"trade",trade:g.trade,credits:[z],maxCreditedValue:R})}catch($){if(Fs($)){if(d.length){try{await Be(n.identity,d.map(y=>y.salt))}catch(y){se(y,{flow:"cart_checkout",step:"release"})}v.invalidateQueries({queryKey:["usd-balance"]})}Ye(t);return}throw $}}b="submit";const k=Ms(m).length,Q=u=>k>1?{current:u,total:k}:void 0,U=(u,g)=>j({phase:"processing",stage:u,step:s.length,total:s.length,signatures:Q(g)}),G=u=>u<k?U("awaiting-signature",u+1):U("settling",k);U("awaiting-signature",1);let M=[];if(ws())try{const u=new Map;M=await Is({purchases:m,buyer:n.address,signer:n.signer,onSigned:()=>G(k),onBroadcast:({txHash:y,salts:z})=>{u.set(y,z),z.forEach(R=>x.add(R))}});const g=await Promise.allSettled(M.map(y=>Ps(y)));g.forEach((y,z)=>{const R=u.get(M[z])??[];y.status==="fulfilled"?(R.forEach(ae=>B.add(ae)),_.push(M[z])):y.reason instanceof St||R.forEach(ae=>L.add(ae))});const $=g.flatMap(y=>y.status==="rejected"?[y.reason]:[]);if($.length&&!$.some(y=>y instanceof St))throw $[0];w=!0}catch(u){if(!(u instanceof As)||!Sa(n.providerType))throw u;M=await qe({purchases:m,buyer:n.address,signer:n.signer,onSigned:G,onBroadcast:({salts:g})=>g.forEach($=>x.add($)),onSettled:({txHash:g,salts:$})=>{$.forEach(y=>B.add(y)),_.push(g)},onReverted:({salts:g})=>g.forEach($=>L.add($))})}else M=await qe({purchases:m,buyer:n.address,signer:n.signer,onSigned:G,onBroadcast:({salts:u})=>u.forEach(g=>x.add(g)),onSettled:({txHash:u,salts:g})=>{g.forEach($=>B.add($)),_.push(u)},onReverted:({salts:u})=>u.forEach(g=>L.add(g))});t.forEach(u=>p(u.item.id)),V(null),D("Shop Completed Purchase",{...ye(c),payment_type:"credits",no_crypto_step:w,transaction_hash:M[0]??null}),kt(v);const C=ce.current;ce.current=null,j(null),q(!1);const f={items:r,txHash:M[0]??void 0,txHashes:M,settled:!0,...C?{creditsAdded:C}:{}};Y("/success",{state:f,replace:!0})}catch(m){be(m)||se(m,{flow:"cart_checkout",step:b,cart_size:t.length});const k=new Set([...x].filter(f=>!L.has(f))),{toRelease:Q,boughtItemIds:U}=Mt({reservations:d,spent:k,settled:B}),G=[...k].some(f=>!B.has(f)),M=c.filter(f=>U.includes(f.id)),C=c.filter(f=>!U.includes(f.id));if(D(be(m)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:b,error_code:ft(m),value_usd:gt(C.reduce((f,u)=>f+u.priceCredits,0)),cart_size:s.length,partial:M.length>0}),Q.length)try{await Be(n.identity,Q)}catch(f){se(f,{flow:"cart_checkout",step:"release"})}if(v.invalidateQueries({queryKey:["usd-balance"]}),M.length>0){U.forEach(f=>p(f)),V(null),kt(v),D("Shop Completed Purchase",{...ye(M),payment_type:"credits",no_crypto_step:w,transaction_hash:_[0]??null,partial:!0}),j({phase:"error",message:a("cart.error.partiallyBought"),heldCredits:G}),q(!1);return}j({phase:"error",message:G?void 0:_e(m),heldCredits:G})}}function Ze(t,s){v.invalidateQueries({queryKey:["usd-balance"]}),v.invalidateQueries({queryKey:["detail-trade"]}),v.invalidateQueries({queryKey:["shop-item"]}),v.invalidateQueries({queryKey:["owned-token"]}),v.invalidateQueries({queryKey:["public-token"]}),v.invalidateQueries({queryKey:["item-resales"]}),v.invalidateQueries({queryKey:["shop-items"]}),v.invalidateQueries({queryKey:["catalog-items"]}),v.invalidateQueries({queryKey:["my-assets"]}),v.invalidateQueries({queryKey:["purchases"]}),v.invalidateQueries({queryKey:["owned-item-count"]}),v.invalidateQueries({queryKey:["overview-listings"]}),v.invalidateQueries({queryKey:["upsell-listings"]});const c=ce.current;ce.current=null,j(null),q(!1);const r={items:t,txHash:s[0]??void 0,txHashes:s,settled:!0,...c?{creditsAdded:c}:{}};Y("/success",{state:r,replace:!0})}function et(t,s){be(t)||se(t,{flow:s,step:"submit"}),D(be(t)?"Shop Purchase Cancelled":"Shop Purchase Failed",{step:"submit",error_code:ft(t)}),j({phase:"error",message:_e(t)}),q(!1)}async function ea(t,s,c){const r=yt(bt.MANAToken,s),d=yt(bt.CreditsManager,s);await $s({auth:{kind:Ss.Allowance,contractAddress:r.address,spenderAddress:d.address,chainId:s},signer:t,requiredWei:c})}async function tt(){if(oe)return oe;try{return await v.fetchQuery({queryKey:["mana-rate",mt.chainId],queryFn:()=>ka(mt.chainId),staleTime:6e4})}catch{return}}async function ta(t){const s=Ce(t).reduce((b,x)=>b+x.usdCents,0),r=(ge??0n)>0n?await tt():oe,d=r?ht(s,r):0n;return{totalCents:s,manaWei:d}}async function at(t,s){const c=We(t),{totalCents:r,manaWei:d}=await ta(t),b=Re({priceCents:r,priceManaWei:d,balanceCents:(S==null?void 0:S.balanceCents)??0,manaBalanceWei:ge??0n});if(s&&b.options.some(x=>x.method===s)){if(s==="credits"){Ie(t);return}const x=nt(b,s);await ze(st(s,t),x,()=>s==="mana"?void it(t,x):void rt(t,r,d));return}if(b.options.some(x=>x.method==="mana"||x.method==="combined")){j({phase:"choose",lines:t,totalCents:r,manaWei:d}),q(!1);return}if(S!=null&&S.credits<c){Ye(t);return}Ie(t)}function Pe(t){return Re({priceCents:t.totalCents,priceManaWei:t.manaWei,balanceCents:(S==null?void 0:S.balanceCents)??0,manaBalanceWei:ge??0n})}const[Ae,fe]=T.useState(null);function st(t,s){const c=new Map;for(const r of s){const d=xs(t,Fe(r));c.set(`${d.chainId}:${d.spender.toLowerCase()}`,d)}return[...c.values()]}async function ze(t,s,c){const[r,...d]=t;if(!r){c();return}await aa(r.spender,r.chainId,s,()=>void ze(d,s,c))}async function aa(t,s,c,r){const d=Cs(s,t),b=n?await js(d,n.address,c).catch(()=>!0):!0;if(ks(n==null?void 0:n.providerType,b)){q(!1),fe({auth:d,run:r});return}r()}function nt(t,s){var c;return((c=t.options.find(r=>r.method===s))==null?void 0:c.manaWei)??0n}function sa(t){if((h==null?void 0:h.phase)!=="choose")return;const{lines:s,totalCents:c,manaWei:r}=h;if(t==="credits"){Ie(s);return}const d=nt(Pe(h),t);ze(st(t,s),d,()=>t==="mana"?void it(s,d):void rt(s,c,r))}async function it(t,s){if(!n||t.length===0)return;const c=Ce(t),r=c.map(x=>({...x.item,priceCredits:x.priceCredits})),d=t.map(x=>({...x.item,priceCredits:x.priceCredits,quantity:x.quantity})),b=()=>j({phase:"processing",stage:"settling",step:c.length,total:c.length});j({phase:"processing",stage:"awaiting-signature",step:c.length,total:c.length});try{const x=await fs({trades:Jt(c),mints:Dt(c),buyer:n.address,signer:n.signer,onSigned:b,manaWei:s});t.forEach(B=>p(B.item.id)),V(null),D("Shop Completed Purchase",{...ye(r),payment_type:"mana",transaction_hash:x[0]??null}),v.invalidateQueries({queryKey:["mana-balance"]}),Ze(d,x)}catch(x){et(x,"buy_cart_mana")}}async function rt(t,s,c){if(!n||t.length===0)return;const r=Ce(t),d=r.map(w=>({...w.item,priceCredits:w.priceCredits})),b=t.map(w=>({...w.item,priceCredits:w.priceCredits,quantity:w.quantity})),x=ys(r.map(w=>w.usdCents),(S==null?void 0:S.balanceCents)??0),B=[],L=new Set,_=new Set;j({phase:"processing",stage:"reserving",step:1,total:r.length});try{const w=r.map(Fe),m=[],k=new Map,Q=new Map;for(let C=0;C<r.length;C++){const f=r[C],u=w[C],g=x[C],$=bs(Math.max(0,f.usdCents-g),s,c);let y;if(g<=0)y=$t(u,[],"0");else{j({phase:"processing",stage:"reserving",step:C+1,total:r.length});const R=f.item,{credit:ae,maxCreditedValue:ia}=await xt(n.identity,g,u.kind==="trade"?u.trade.id:void 0,R.contractAddress&&R.itemId!=null?{contractAddress:R.contractAddress,itemId:String(R.itemId)}:void 0);B.push({salt:ae.id,itemId:R.id}),y=$t(u,[ae],ia)}const z=Ts(y);k.set(z,(k.get(z)??0n)+$),Q.has(z)||Q.set(z,m.length),m.push(y)}for(const[C,f]of k){const u=Q.get(C);u==null||f<=0n||(m[u]={...m[u],maxCreditedValue:(BigInt(m[u].maxCreditedValue)+f).toString()})}const U=[...k.values()].reduce((C,f)=>C+f,0n);await ea(n.signer,vs(w[0]),U);const G=()=>j({phase:"processing",stage:"settling",step:r.length,total:r.length});j({phase:"processing",stage:"awaiting-signature",step:r.length,total:r.length});const M=await qe({purchases:m,buyer:n.address,signer:n.signer,onSigned:G,onBroadcast:({salts:C})=>C.forEach(f=>L.add(f)),onReverted:({salts:C})=>C.forEach(f=>_.add(f))});t.forEach(C=>p(C.item.id)),V(null),D("Shop Completed Purchase",{...ye(d),payment_type:"credits_and_mana",transaction_hash:M[0]??null}),v.invalidateQueries({queryKey:["mana-balance"]}),Ze(b,M)}catch(w){const{toRelease:m}=Mt({reservations:B,spent:new Set([...L].filter(k=>!_.has(k))),settled:new Set});m.length&&Be(n.identity,m).catch(()=>{}),B.length&&v.invalidateQueries({queryKey:["usd-balance"]}),et(w,"buy_cart_combined")}}async function Z(t){if(!n){jt({type:"cart-checkout"}),N();return}const s=H.getState().items.filter(Ve);if(s.length===0)return;re(null),pe(null),q(!0);const c=s.reduce((r,d)=>r+d.priceCredits*d.quantity,0);D("Shop Started Checkout",{cart_size:s.length,cart_value_credits:c,cart_value_usd:gt(c),has_sufficient_credits:me>=c});try{const r=await Bs(s,n.address,Xt,await tt(),Yt),d=[...r.unavailable,...r.own];if(d.length&&(d.forEach(b=>p(b.id)),pe(Nn(r))),r.buyable.length===0){re(a("cart.error.noneAvailable")),V(null);return}if(r.orderChanged){V(r),Ge.current=Date.now();return}await at(r.buyable,t)}catch(r){se(r,{flow:"cart_checkout",step:"review",cart_size:s.length}),re(_e(r))}finally{q(!1)}}async function ot(){if(F){if(!n){jt({type:"cart-checkout"}),N();return}if(Date.now()-Ge.current>Kn){V(null),pe(null),await Z();return}re(null),at(F.buyable)}}async function na(){if($e){try{sessionStorage.setItem(ve,JSON.stringify(H.getState().items))}catch{}q(!0);try{const t=await Rs($e,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(ve)}catch{}se(t,{flow:"cart_buy_credits"}),j({phase:"error",message:a("buyModal.error.creditsCheckout")})}finally{q(!1)}}}const ct=T.useRef(!1);T.useEffect(()=>{if(!n||ct.current||!hs("cart-checkout"))return;ct.current=!0;const t=setTimeout(()=>void Z(),0);return()=>clearTimeout(t)},[n]);const lt=T.useRef(!1);T.useEffect(()=>{if(!(E!=null&&E.resumeCheckout)||lt.current)return;lt.current=!0,ce.current=E.creditsAdded??null;try{const s=sessionStorage.getItem(ve);if(s){sessionStorage.removeItem(ve);const c=JSON.parse(s);Array.isArray(c)&&c.length&&J(c)}}catch{}v.invalidateQueries({queryKey:["usd-balance"]});const t=setTimeout(()=>void Z(),0);return()=>clearTimeout(t)},[E==null?void 0:E.resumeCheckout]);const dt=T.useRef(!1);T.useEffect(()=>{if(!(E!=null&&E.startCheckout)||dt.current)return;dt.current=!0,Y(".",{replace:!0,state:null});const t=setTimeout(()=>void Z(),0);return()=>clearTimeout(t)},[E==null?void 0:E.startCheckout]);const ee=Nt||(h==null?void 0:h.phase)==="processing";return o.length===0&&!h?e.jsx(Tt,{children:e.jsxs(Pt,{children:[e.jsxs(It,{onClick:()=>Y(-1),type:"button",children:[e.jsx(O,{name:"arrow-left"}),a("nav.cart")]}),e.jsxs(Ys,{"data-testid":"cart-empty",children:[e.jsx(O,{name:"cart-plus",size:110}),e.jsxs(Zs,{children:[e.jsx(en,{children:a("cart.empty.title")}),e.jsx(tn,{children:a("cart.empty.body")})]}),e.jsx(an,{to:"/items",children:a("cart.empty.cta")})]})]})}):e.jsxs(Tt,{children:[e.jsxs(Pt,{children:[e.jsxs(It,{onClick:()=>Y(-1),type:"button",children:[e.jsx(O,{name:"arrow-left"}),a("nav.cart")]}),e.jsxs(Ds,{children:[e.jsxs(Js,{children:[e.jsxs(Xs,{children:[e.jsx(sn,{onClick:()=>Y(-1),type:"button","aria-label":a("cart.goBack"),children:e.jsx(O,{name:"arrow-left"})}),e.jsx(nn,{children:a("cart.panelTitle",{count:Ut})}),Lt?e.jsxs(rn,{onClick:()=>X(!0),disabled:ee,children:[e.jsx(O,{name:"fitting-room"}),a("cart.fittingRoom")]}):null]}),e.jsxs(Rt,{children:[e.jsx(on,{children:o.map(t=>{const s=Ot.get(t.id),c=s?s.priceCredits:t.priceCredits,r=!!s&&s.priceCredits!==t.priceCredits,d=!t.tokenId,b=t.quantity,x=typeof t.available=="number"&&b>=t.available,B=c*b,L=va(t),_=!!L&&!!K[L],w=wa(t),m=Oe[t.id],k=!pt(m),Q=m==="sold-out"?a("cart.availability.soldOut"):a("cart.availability.unavailable");return e.jsxs(cn,{"data-unavailable":k||void 0,children:[e.jsxs(ln,{"data-thumb":!0,children:[w?e.jsx(dn,{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(un,{"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(hn,{children:[e.jsxs(pn,{"data-desc":!0,children:[w?e.jsx(mn,{to:w,state:{item:t,tradeId:t.tradeId},title:t.name,children:t.name}):e.jsx(gn,{title:t.name,children:t.name}),t.creator?e.jsx(xn,{address:t.creator,linkToProfile:!0}):null,Wt&&d?e.jsxs(Sn,{"data-testid":"cart-creator-tag",children:[e.jsx(Mn,{name:"buy-from-creator"}),a("cart.creatorTag")]}):null]}),e.jsx(fn,{children:k?e.jsxs(kn,{children:[e.jsx($n,{name:"warning-fill",size:24}),Q]}):e.jsxs(e.Fragment,{children:[d?e.jsxs(yn,{children:[e.jsx(At,{onClick:()=>xe(()=>A(t.id)),disabled:ee||b<=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(bn,{children:b}),e.jsx(At,{onClick:()=>xe(()=>P(t.id)),disabled:ee||x,"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(vn,{children:[e.jsx(wn,{})," ",B,r?e.jsx(Cn,{children:t.priceCredits*b}):null]})]})})]}),e.jsxs(jn,{children:[L?e.jsx(Tn,{"data-on":_||void 0,onClick:()=>ie(t),"aria-label":_?a("cart.removeFromFavorites",{name:t.name}):a("cart.addToFavorites",{name:t.name}),title:_?a("assetCard.removeFromFavorites"):a("assetCard.addToFavorites"),children:e.jsx(O,{name:_?"heart-solid":"heart"})}):null,e.jsx(In,{onClick:()=>xe(()=>p(t.id)),disabled:ee,"aria-label":a("cart.remove",{name:t.name}),title:a("cart.removeTitle"),children:e.jsx(O,{name:"trash",size:24})})]})]},t.id)})}),e.jsx(Pn,{children:e.jsx("button",{className:"link",onClick:()=>xe(W),disabled:ee,children:a("cart.clearCart")})})]})]}),e.jsxs(An,{children:[e.jsx(zn,{children:a("cart.purchaseSummary")}),e.jsxs(En,{children:[e.jsxs(Bn,{children:[e.jsx(Rn,{children:a("cart.totalItems",{count:Gt})}),e.jsx(Fn,{children:e.jsxs(qn,{children:[e.jsx(_n,{})," ",Je]})})]}),e.jsx(Et,{options:Te.options,totalCents:Me,shortfall:Te.manaShortfall,showCreditsAmount:!1,creditsLabel:F?a("marketCheckout.confirmPurchase"):Te.options.length>1?a("cart.buyWithCredits"):a("cart.checkout"),busy:ee||De,onPay:t=>void(F?ot():Z(t)),creditsFallback:{label:ee?a("cart.working"):F?a("marketCheckout.confirmPurchase"):a("cart.checkout"),onClick:()=>void(F?ot():Z())}}),De?e.jsx(we,{className:"muted",children:a("cart.allUnavailable")}):null,n?null:e.jsx(we,{className:"muted",children:a("cart.signInHint")}),F?e.jsx(we,{className:"muted",children:a("cart.priceChanged")}):null,Ue?e.jsx(we,{className:"muted",children:Ue}):null,e.jsx(Wn,{message:Kt})]})]})]})]}),Xe.length>0?e.jsx(Ln,{children:e.jsx(ps,{title:a("cart.youMightAlsoLike"),items:Xe})}):null,Ae&&n?e.jsx(gs,{auth:Ae.auth,signer:n.signer,title:a("authorizeStep.manaTitle"),name:a("authorizeStep.manaName"),reason:a("authorizeStep.manaReason"),icon:e.jsx("img",{src:ms,width:24,height:24,alt:"","aria-hidden":!0}),onAuthorized:()=>{const{run:t}=Ae;fe(null),t()},onCancel:()=>fe(null),onClose:()=>fe(null)}):null,h?e.jsx(Gs,{phase:h.phase,balanceCredits:me,onClose:Zt,stage:h.phase==="processing"?h.stage:void 0,step:h.phase==="processing"?h.step:void 0,total:h.phase==="processing"?h.total:void 0,isSelfCustody:Ca(n==null?void 0:n.providerType),signatures:h.phase==="processing"?h.signatures:void 0,options:h.phase==="choose"?Pe(h).options:void 0,shortfall:h.phase==="choose"?Pe(h).manaShortfall:void 0,onPay:sa,totalCents:h.phase==="choose"?h.totalCents:void 0,totalManaWei:h.phase==="choose"?h.manaWei:void 0,totalCredits:h.phase==="choose"?We(h.lines):void 0,lines:h.phase==="nofunds"?h.lines:void 0,shortfallCredits:h.phase==="nofunds"?h.shortfall:void 0,packs:he,selectedPack:$e,onSelectPack:He,onBuyPacks:()=>void na(),message:h.phase==="error"?h.message:void 0,heldCredits:h.phase==="error"&&!!h.heldCredits,onRetry:()=>void Z()}):null]})}export{si as Cart};
|